wikiparser-node 1.15.1 → 1.16.1
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.es7.js +29 -29
- package/bundle/bundle.lsp.js +42 -0
- package/bundle/bundle.min.js +30 -30
- package/config/default.json +0 -2
- package/config/zhwiki.json +0 -2
- package/data/.schema.json +56 -0
- package/data/signatures.json +2673 -0
- package/dist/base.d.mts +217 -0
- package/dist/base.d.ts +108 -1
- package/dist/base.js +70 -64
- package/dist/base.mjs +74 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +10 -0
- package/dist/internal.d.ts +41 -41
- package/dist/lib/element.js +1 -1
- package/dist/lib/lsp.d.ts +87 -0
- package/dist/lib/lsp.js +792 -0
- package/dist/lib/node.js +2 -14
- package/dist/lib/rect.d.ts +3 -5
- package/dist/lib/rect.js +13 -10
- package/dist/lib/text.js +2 -1
- package/dist/lib/title.js +3 -0
- package/dist/src/attribute.js +3 -4
- package/dist/src/heading.js +3 -1
- package/dist/src/html.js +3 -4
- package/dist/src/magicLink.js +1 -1
- package/dist/src/nowiki/comment.d.ts +1 -1
- package/dist/src/nowiki/comment.js +1 -1
- package/dist/src/nowiki/quote.js +8 -12
- package/dist/src/transclude.js +3 -2
- package/dist/util/debug.js +13 -1
- package/dist/util/html.js +3 -1
- package/dist/util/lint.js +16 -4
- package/dist/util/sharable.js +5 -4
- package/dist/util/sharable.mjs +4 -4
- package/extensions/dist/base.js +106 -4
- package/extensions/dist/lsp.js +67 -0
- package/extensions/es7/base.js +114 -3
- package/extensions/typings.d.ts +16 -9
- package/package.json +33 -19
package/bundle/bundle.es7.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
"use strict";(()=>{var
|
|
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
|
-
`),Un=ur.length+C-1,Wn=ur[ur.length-1],Dn=ur.length===1?E+Wn.length:Wn.length,pt={rule:qo[R],message:b.msg('lonely "$1"',te||R==="h"?ne:R),severity:Jr,startIndex:pe,endIndex:Ve,startLine:Un,endLine:Un,startCol:Dn,endCol:Dn+Se};if(R==="<")pt.suggestions=[{desc:"escape",range:[pe,pe+1],text:"<"}];else if(R==="h"&&l!=="link-text"&&dn.test(pr||""))pt.suggestions=[{desc:"whitespace",range:[pe,pe],text:" "}];else if(R==="["&&l==="ext-link-text"){let ge=i.getAbsoluteIndex()+i.toString().length;pt.suggestions=[{desc:"escape",range:[ge,ge+1],text:"]"}]}else if(R==="]"&&f==="free-ext-link"&&Jr==="error"){let ge=e-o.toString().length;pt.fix={range:[ge,ge],text:"[",desc:"left bracket"}}else te&&(pt.suggestions=[...H[0]===ne?[]:[{desc:"uppercase",range:[pe,Ve],text:ne}],...qe===":"||qe==="\uFF1A"?[{desc:"whitespace",range:[Ve,Ve+1],text:" "}]:[]]);c.push(pt)}return c}replaceData(e){L(this,br,hi).call(this,e)}print(){return ht(this.data)}};br=new WeakSet,hi=function(e){this.setAttribute("data",e)}});var fe,Je=y(()=>{"use strict";ve();fe=(a=!0,r=!0)=>(e,t)=>{class n extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return Tr(n,e),n}});var Vt,xe,xt=y(()=>{"use strict";P();xe=class extends v{constructor(e,t,n,i,s,o){super(e,i,s,o);k(this,Vt);A(this,Vt,n)}get type(){return u(this,Vt)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};Vt=new WeakMap});var bt,z,Fe=y(()=>{"use strict";P();z=class extends v{constructor(e,t,n,i,s){super(e,n,i,s);k(this,bt);A(this,bt,t)}get type(){return u(this,bt)}set type(e){A(this,bt,e)}};bt=new WeakMap});var Oo,Ye,Ae,Me,$e,Qt=y(()=>{"use strict";j();Ce();K();J();F();P();Fe();Oo=a=>a==="redirect-target"||a==="link",$e=class extends v{constructor(e,t,n=b.getConfig(),i=[],s="|"){super(void 0,n,i,{});k(this,Ye,!0);k(this,Ae);k(this,Me);if(this.insertAt(new z(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,Ae,s)}afterBuild(){A(this,Me,this.getTitle()),u(this,Ae).includes("\0")&&A(this,Ae,this.buildFromStr(u(this,Ae),0)),this.setAttribute("name",u(this,Me).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?A(this,Ye,t):e==="title"?A(this,Me,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,u(this,Ae));return u(this,Ye)?`[[${t}]]`:t}text(){let e=super.text("|");return u(this,Ye)?`[[${e}]]`:e}getAttribute(e){return e==="title"?u(this,Me):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?u(this,Ae).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,Me),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:_e(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&&!Oo(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,Ye)?{pre:"[[",post:"]]",sep:u(this,Ae)}:{sep:u(this,Ae)})}};Ye=new WeakMap,Ae=new WeakMap,Me=new WeakMap});var ae,ze=y(()=>{"use strict";P();ae=class extends v{get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}}});var fi,gn,Mo,D,Ge=y(()=>{"use strict";Je();ze();fi=[fe()];D=class extends(Mo=ae){get type(){return"noinclude"}toString(r){return r?"":super.toString()}};gn=ue(Mo),D=he(gn,0,"NoincludeToken",fi,D),ce(gn,1,D)});var yr,xi=y(()=>{"use strict";j();Qt();Ge();yr=class extends $e{get type(){return"redirect-target"}constructor(r,e,t,n){super(r,void 0,t,n),e!==void 0&&this.insertAt(new D(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 bi,Ue,Tt,pn,zo,Ze,Ti=y(()=>{"use strict";Je();F();P();xt();xi();bi=[fe(!1,!1)];Ze=class extends(zo=v){constructor(e,t,n,i,s,o=b.getConfig(),l=[]){super(void 0,o,l);k(this,Ue);k(this,Tt);A(this,Ue,e),A(this,Tt,s);let p=new RegExp(String.raw`^(?:${o.redirection.join("|")})\s*(?::\s*)?$`,"iu");this.append(new xe(t,p,"redirect-syntax",o,l,{}),new yr(n,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?u(this,Ue).length:super.getAttribute(e)}toString(e){return u(this,Ue)+super.toString(e)+u(this,Tt)}lint(e=this.getAbsoluteIndex()){return this.lastChild.lint(e+u(this,Ue).length+this.firstChild.toString().length)}print(){return super.print({pre:u(this,Ue),post:u(this,Tt)})}};pn=ue(zo),Ue=new WeakMap,Tt=new WeakMap,Ze=he(pn,0,"RedirectToken",bi,Ze),ce(pn,1,Ze)});var yi={};le(yi,{parseRedirect:()=>Go});var Go,ki=y(()=>{"use strict";F();Ti();Go=(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 Ze(...t.slice(1),r,e),a):!1}});var kr,vi=y(()=>{"use strict";P();kr=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 We,yt,un=y(()=>{"use strict";P();yt=class extends v{constructor(e,t,n,i,s,o=[]){super(void 0,s);k(this,We);Q(this,"closed");Q(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),A(this,We,[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,We);return t?`<${s}${n.toString(e)}/>`:`<${s}${n.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=u(this,We);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?u(this,We)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=u(this,We);return super.print(this.selfClosing?{pre:`<${e}`,post:"/>"}:{pre:`<${e}`,sep:">",post:this.closed?`</${t}>`:""})}};We=new WeakMap});var Ai,cn,Uo,et,wi=y(()=>{"use strict";j();J();Je();F();un();Ai=[fe(!1)];et=class extends(Uo=yt){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}};cn=ue(Uo),et=he(cn,0,"IncludeToken",Ai,et),ce(cn,1,et)});var X,Si,Ci,Ar,hn,$i,kt,Ni,Ei,Ii,vr,Li,Fi,Ri,Pi,Bi=y(()=>{"use strict";X=new Set(["align"]),Si=new Set(["cite"]),Ci=new Set(["cite","datetime"]),Ar=new Set(["width"]),hn=new Set(["axis","align","bgcolor","height","width","valign"]),$i=new Set([...hn,"abbr","headers","scope","rowspan","colspan"]),kt=new Set(["type"]),Ni=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Ei=new Set(["clear"]),Ii=new Set(["bgcolor","align","valign"]),vr=new Set,Li=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"]),Fi={div:X,h1:X,h2:X,h3:X,h4:X,h5:X,h6:X,blockquote:Si,q:Si,p:X,br:Ei,pre:Ar,ins:Ci,del:Ci,ul:kt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Ni,"border"]),caption:X,tr:Ii,td:$i,th:$i,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:Ar,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:kt,poem:X,categorytree:X,combooption:X},Ri={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:vr,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:vr,inputbox:vr,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:vr,poll:new Set(["id","show-results-before-voting"]),sm2:kt,flashmp3:kt,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"])},Pi={table:Ni,td:new Set([...hn,"scope"]),th:hn,br:Ei,caption:X,div:X,hr:Ar,h1:X,h2:X,h3:X,h4:X,h5:X,h6:X,li:kt,p:X,pre:Ar,tr:Ii,ul:kt}});var Wo,Kt,vt,se,Ne,At,ji=y(()=>{"use strict";j();K();Ce();Bi();J();F();P();Fe();Wo=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,At=class extends v{constructor(e,t,n,i="",s,o=[],l=b.getConfig(),p=[]){let g=new z(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=Y(M({},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 z(s,"attr-value",l,p,{});super(void 0,l,p);k(this,Kt);k(this,vt);k(this,se);k(this,Ne);A(this,Kt,e),this.append(g,d),A(this,se,i),A(this,Ne,[...o]),A(this,vt,t),this.setAttribute("name",oe(n).trim().toLowerCase())}get type(){return u(this,Kt)}get tag(){return u(this,vt)}get balanced(){return!u(this,se)||u(this,Ne)[0]===u(this,Ne)[1]}afterBuild(){u(this,se).includes("\0")&&A(this,se,this.buildFromStr(u(this,se),0)),this.parentNode&&A(this,vt,this.parentNode.name),this.setAttribute("name",this.firstChild.toString(!0).trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",n=""]=u(this,Ne);return u(this,se)?super.toString(e,u(this,se)+t)+n:this.firstChild.toString(e)}text(){return u(this,se)?`${super.text(`${u(this,se).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return u(this,se)?u(this,se).length+((t=(e=u(this,Ne)[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,Ne)[0],desc:"close"}],n.push(T)}let h=Ri[g],m=Fi[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"||!Li.has(p))))n.push(Y(M({},$(s,c,"illegal-attr","illegal attribute name")),{suggestions:[{desc:"remove",range:[e,e+f],text:""}]}));else if((x=Pi[g])!=null&&x.has(p))n.push($(s,c,"obsolete-attr","obsolete attribute","warning"));else if(p==="style"&&typeof d=="string"&&Wo.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,se)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=u(this,Ne);return u(this,se)?super.print({sep:ht(u(this,se))+e,post:t}):super.print()}};Kt=new WeakMap,vt=new WeakMap,se=new WeakMap,Ne=new WeakMap});var qi,Do,mn,Jt,De,wr=y(()=>{"use strict";j();K();J();F();P();Fe();ji();qi=a=>a.slice(0,-1),Do=a=>`${qi(a)}-dirty`;try{mn=new RegExp(String.raw`[\p{L}\d]`,"u")}catch(a){mn=/[^\W_]/u}De=class extends v{constructor(e,t,n,i=b.getConfig(),s=[]){super(void 0,i,s,{});k(this,Jt);if(A(this,Jt,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)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu,l="",p=o.exec(e),g=0,d=()=>{l&&(super.insertAt(new z(l,Do(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(oe(m).trim())){let C=T!=null?T:S,E=[x,w],q=new At(qi(t),n,m,f,C,E,i,s);d(),super.insertAt(q)}else l+=h;({lastIndex:g}=o),p=o.exec(e)}l+=e.slice(g),d()}}get type(){return u(this,Jt)}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 At&&(!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 At){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",mn.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 z?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};Jt=new WeakMap});var Sr,_i=y(()=>{"use strict";Ce();F();P();Ge();Sr=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 D(o[0],e,t),new D(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 wt,fn=y(()=>{"use strict";j();J();Yt();F();P();Fe();wt=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=z;this.append(...e.split(`
|
|
5
|
-
`).map(o=>i?o:
|
|
1
|
+
"use strict";(()=>{var yo=Object.create;var gt=Object.defineProperty,ko=Object.defineProperties,Kn=Object.getOwnPropertyDescriptor,vo=Object.getOwnPropertyDescriptors,Ao=Object.getOwnPropertyNames,Xn=Object.getOwnPropertySymbols;var Jn=Object.prototype.hasOwnProperty,wo=Object.prototype.propertyIsEnumerable;var Yn=(a,r)=>(r=Symbol[a])?r:Symbol.for("Symbol."+a),pt=a=>{throw TypeError(a)};var cr=(a,r,e)=>r in a?gt(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,V=(a,r)=>{for(var e in r||(r={}))Jn.call(r,e)&&cr(a,e,r[e]);if(Xn)for(var e of Xn(r))wo.call(r,e)&&cr(a,e,r[e]);return a},oe=(a,r)=>ko(a,vo(r)),Qn=(a,r)=>gt(a,"name",{value:r,configurable:!0}),So=(a=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(a,{get:(r,e)=>(typeof require!="undefined"?require:r)[e]}):a)(function(a){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var k=(a,r)=>()=>(a&&(r=a(a=0)),r);var Co=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),ae=(a,r)=>{for(var e in r)gt(a,e,{get:r[e],enumerable:!0})},$o=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Ao(r))!Jn.call(a,n)&&n!==e&>(a,n,{get:()=>r[n],enumerable:!(t=Kn(r,n))||t.enumerable});return a};var J=a=>$o(gt({},"__esModule",{value:!0}),a);var pe=a=>{var r;return[,,,yo((r=a==null?void 0:a[Yn("metadata")])!=null?r:null)]},Zn=["class","method","getter","setter","accessor","field","value","get","set"],Gt=a=>a!==void 0&&typeof a!="function"?pt("Function expected"):a,No=(a,r,e,t,n)=>({kind:Zn[a],name:r,metadata:t,addInitializer:i=>e._?pt("Already initialized"):n.push(Gt(i||null))}),Eo=(a,r)=>cr(r,Yn("metadata"),a[3]),ue=(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},ce=(a,r,e,t,n,i)=>{var s,o,l,p,g,d=r&7,c=!!(r&8),m=!!(r&16),h=d>3?a.length+1:d?c?1:2:0,f=Zn[d+5],x=d>3&&(a[h-1]=[]),T=a[h]||(a[h]=[]),w=d&&(!m&&!c&&(n=n.prototype),d<5&&(d>3||!m)&&Kn(d<4?n:{get[e](){return u(this,i)},set[e](C){return A(this,i,C)}},e));d?m&&d<4&&Qn(i,(d>2?"set ":d>1?"get ":"")+e):Qn(n,e);for(var S=t.length-1;S>=0;S--)p=No(d,e,l={},a[3],T),d&&(p.static=c,p.private=m,g=p.access={has:m?C=>Io(n,C):C=>e in C},d^3&&(g.get=m?C=>(d^1?u:I)(C,n,d^4?i:w.get):C=>C[e]),d>2&&(g.set=m?(C,E)=>A(C,n,E,d^4?i:w.set):(C,E)=>C[e]=E)),o=(0,t[S])(d?d<4?m?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?m?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||Eo(a,n),w&>(n,e,w),m?d^4?i:w:n},re=(a,r,e)=>cr(a,typeof r!="symbol"?r+"":r,e),tn=(a,r,e)=>r.has(a)||pt("Cannot "+e),Io=(a,r)=>Object(r)!==r?pt('Cannot use the "in" operator on this value'):a.has(r),u=(a,r,e)=>(tn(a,r,"read from private field"),e?e.call(a):r.get(a)),y=(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)=>(tn(a,r,"write to private field"),t?t.call(a,e):r.set(a,e),e),I=(a,r,e)=>(tn(a,r,"access private method"),e);var mr=(a,r,e,t)=>({set _(n){A(a,r,n,e)},get _(){return u(a,r,t)}});var ei,ti,ri=k(()=>{"use strict";ei=(()=>{let a={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11};return Object.setPrototypeOf(a,null),a})(),ti=(()=>{let a=["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"];return Object.freeze(a),a})()});var qe,ni=k(()=>{"use strict";qe=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var ye,ii,Ne,Ee,Xe,si,ie,oi,me,Lo,Fo,Dt,ai,li,Ro,Po,ut,Ie,Q=k(()=>{"use strict";ni();ye=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,ii=String.raw`[^[\]<>"\0-\x1F\x7F${ye}\uFFFD]`,Ne=String.raw`(?:\[[\da-f:.]+\]|${ii})`,Ee=String.raw`(?:${ii}|\0\d+[cn!~]\x7F)*`,Xe=(a,r)=>e=>e.replace(a,r),si=Xe(/[\0\x7F]|\r$/gmu,""),ie=Xe(/\0\d+[cn]\x7F/gu,""),oi=Xe(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),me=(a,r="")=>a.map(e=>typeof e=="string"?e:e.text()).join(r),Lo={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Fo=Xe(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,r,e)=>r?String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r)):Lo[e.toLowerCase()]),Dt=a=>{var r;return typeof process=="object"&&typeof((r=process.versions)==null?void 0:r.node)=="string"?So("entities").decodeHTMLStrict(a).replace(/\xA0/gu," "):Fo(a)},ai=Xe(/&#(\d+|x[\da-f]+);/giu,(a,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),li=Xe(/\n/gu,String.raw`\n`),Ro={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Po=a=>Xe(a,r=>`&${Ro[r]};`),ut=Po(/[&<>]/gu),Ie=(a,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+a.map(i=>i.print()).join(n)+t}});var di=Co((Na,Bo)=>{Bo.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},variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],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":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var rn,gi=k(()=>{"use strict";rn=di()});var Wt,ct,Ut,Ht,nn,L,K=k(()=>{"use strict";L=class{constructor(r,e){y(this,Ht);y(this,Wt);y(this,ct);y(this,Ut);A(this,Wt,r),A(this,ct,e)}get start(){return u(this,ct)}get top(){return I(this,Ht,nn).call(this).top}get left(){return I(this,Ht,nn).call(this).left}};Wt=new WeakMap,ct=new WeakMap,Ut=new WeakMap,Ht=new WeakSet,nn=function(){var r;return(r=u(this,Ut))!=null||A(this,Ut,u(this,Wt).getRootNode().posFromIndex(u(this,ct))),u(this,Ut)}});var sn,pi,$,N,j=k(()=>{"use strict";K();F();sn=(a,r,e,t)=>({line:a+t-1,character:(t===1?r:0)+e}),pi=a=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof L?e:new L(r,s),{offsetHeight:p,offsetWidth:g}=r,{startIndex:d,startLine:c,startCol:m}=a(r,s,o,l),{line:h,character:f}=sn(c,m,g,p);return{rule:t,message:b.msg(n),severity:i,startIndex:d,endIndex:d+r.toString().length,startLine:c,endLine:h,startCol:m,endCol:f}},$=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 hr,ui=k(()=>{"use strict";hr=(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,mi,Vt,mt,fr,ht,on=k(()=>{"use strict";ci=a=>{let r=a.split(`
|
|
2
|
+
`),e=r.length;return{height:e,width:r[e-1].length}},mi=(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(){y(this,mt);re(this,"childNodes",[]);y(this,Vt)}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return u(this,Vt)}get nextSibling(){var e;let r=(e=this.parentNode)==null?void 0:e.childNodes;return r==null?void 0:r[r.indexOf(this)+1]}get previousSibling(){var e;let r=(e=this.parentNode)==null?void 0:e.childNodes;return r==null?void 0:r[r.indexOf(this)-1]}get offsetHeight(){return I(this,mt,fr).call(this).height}get offsetWidth(){return I(this,mt,fr).call(this).width}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){r==="parentNode"?A(this,Vt,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}=ci(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?mi(e.childNodes.indexOf(this),e):0}return mi(r,this)}getAbsoluteIndex(){let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0}getBoundingClientRect(){return V(V({},I(this,mt,fr).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}};Vt=new WeakMap,mt=new WeakSet,fr=function(){return ci(String(this))}});var Oe,an,ln,xr,hi=k(()=>{"use strict";Q();ke();ui();on();xr=class extends ht{constructor(){super(...arguments);y(this,Oe)}get length(){return this.childNodes.length}text(e){return me(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 dn(this,e,1)[0]}insertAt(e,t=this.length){return dn(this,t,0,[e]),e}closest(e){let t=hr(e,this),{parentNode:n}=this;for(;n;){if(t(n))return n;({parentNode:n}=n)}}querySelector(e){let t=hr(e,this);return I(this,Oe,an).call(this,t)}querySelectorAll(e){let t=hr(e,this);return I(this,Oe,ln).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}">`)+Ie(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let n=oe(V({},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}};Oe=new WeakSet,an=function(e){var t;for(let n of this.childNodes){if(n.type==="text")continue;if(e(n))return n;let i=I(t=n,Oe,an).call(t,e);if(i)return i}},ln=function(e){var n;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...I(n=i,Oe,ln).call(n,e)));return t}});var gn,fi,jo,qo,Oo,_o,Mo,zo,pn,br,xi,Xt,bi=k(()=>{"use strict";Q();j();F();on();gn=String.raw`[${ye}\t]*`,fi=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${gn}\d)|isbn(?=[-::]?${gn}(?:\d(?:${gn}|-)){6})`,jo=new RegExp(String.raw`${fi}|https?[:/]/+`,"giu"),qo=new RegExp(fi,"giu"),Oo=new Set(["attr-value","ext-link-text","link-text"]),_o={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Mo={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},zo=["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"];try{pn=new RegExp(String.raw`[\p{L}\d_]`,"u")}catch(a){pn=/\w/u}Xt=class extends ht{constructor(e){super();y(this,br);re(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"))?ie(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var z,B,ee;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:U,name:Y,tag:G}=g;if(U!=="ext-attr")d=!0;else if(G==="choose"&&(Y==="before"||Y==="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:jo),n.search(t)===-1)return[];t.lastIndex=0;let c=[],m=s==null?void 0:s.type,h=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),q=new Set(["onlyinclude","noinclude","includeonly",...w,...S[0],...S[1],...S[2],...zo]);for(let U=t.exec(n);U;U=t.exec(n)){let[,Y,G]=U,{index:H}=U,te=U[0].toLowerCase();if(G&&G!=="]"){let{length:de}=G;H+=de,te=te.slice(de)}let{0:R,length:Se}=te,Z=R==="r"||R==="p"||R==="i";if(R==="<"&&!q.has(Y.toLowerCase())||R==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(n.slice(H+1))||s!=null&&s.is("ext")&&h==="nowiki"&&((z=s.innerText)!=null&&z.includes("]")))||Z&&(!i.getAttribute("plain")||Oo.has(l)))continue;R==="]"&&(H||Se>1)&&t.lastIndex--;let ge=e+H,He=ge+Se,je=T[He],ur=T[ge-1],Jr=Se>1&&!(R==="<"&&!/[\s/>]/u.test(je!=null?je:"")||d&&(R==="["||R==="]")||Z&&l==="parameter-value")||R==="{"&&(je===R||ur==="-")||R==="}"&&(ur===R||je==="-")||R==="["&&(je===R||l==="ext-link-text"||m==="free-ext-link"&&!n.slice(H+1).trim())||R==="]"&&(ur===R||f==="free-ext-link"&&!n.slice(0,H).includes("]"))?"error":"warning",Yr=R==="{"||R==="[";if(Jr==="warning"&&(Yr||(R==="]"||R==="}"))){let de=_o[R],en=Yr?n.slice(H+1):n.slice(0,H);if(R==="{"&&((B=de.exec(en))==null?void 0:B[0])==="}"||R==="}"&&((ee=de.exec(en))==null?void 0:ee[0])==="{")continue;if(!en.includes(R)){let Vn=Yr?"nextSibling":"previousSibling",Ve=this[Vn];for(;Ve&&(Ve.type!=="text"||!de.test(Ve.data));)Ve=Ve[Vn];if(Ve&&de.exec(Ve.data)[0]!==R)continue}}Z&&(te=te.toUpperCase());let Zr=n.slice(0,H).split(`
|
|
4
|
+
`),To=Zr[Zr.length-1],{line:Un,character:Hn}=sn(C,E,To.length,Zr.length),dt={rule:Mo[R],message:b.msg('lonely "$1"',Z||R==="h"?te:R),severity:Jr,startIndex:ge,endIndex:He,startLine:Un,endLine:Un,startCol:Hn,endCol:Hn+Se};if(R==="<")dt.suggestions=[{desc:"escape",range:[ge,ge+1],text:"<"}];else if(R==="h"&&l!=="link-text"&&pn.test(ur||""))dt.suggestions=[{desc:"whitespace",range:[ge,ge],text:" "}];else if(R==="["&&l==="ext-link-text"){let de=i.getAbsoluteIndex()+i.toString().length;dt.suggestions=[{desc:"escape",range:[de,de+1],text:"]"}]}else if(R==="]"&&f==="free-ext-link"&&Jr==="error"){let de=e-o.toString().length;dt.fix={range:[de,de],text:"[",desc:"left bracket"}}else Z&&(dt.suggestions=[...U[0]===te?[]:[{desc:"uppercase",range:[ge,He],text:te}],...je===":"||je==="\uFF1A"?[{desc:"whitespace",range:[He,He+1],text:" "}]:[]]);c.push(dt)}return c}replaceData(e){I(this,br,xi).call(this,e)}print(){return ut(this.data)}};br=new WeakSet,xi=function(e){this.setAttribute("data",e)}});var he,Qe=k(()=>{"use strict";ke();he=(a=!0,r=!0)=>(e,t)=>{class n extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return Tr(n,e),n}});var Qt,fe,ft=k(()=>{"use strict";P();fe=class extends v{constructor(e,t,n,i,s,o){super(e,i,s,o);y(this,Qt);A(this,Qt,n)}get type(){return u(this,Qt)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};Qt=new WeakMap});var xt,M,Le=k(()=>{"use strict";P();M=class extends v{constructor(e,t,n,i,s){super(e,n,i,s);y(this,xt);A(this,xt,t)}get type(){return u(this,xt)}set type(e){A(this,xt,e)}};xt=new WeakMap});var Go,Ke,ve,_e,Ce,Kt=k(()=>{"use strict";j();Q();K();F();P();Le();Go=a=>a==="redirect-target"||a==="link",Ce=class extends v{constructor(e,t,n=b.getConfig(),i=[],s="|"){super(void 0,n,i,{});y(this,Ke,!0);y(this,ve);y(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,ve,s)}afterBuild(){A(this,_e,this.getTitle()),u(this,ve).includes("\0")&&A(this,ve,this.buildFromStr(u(this,ve),0)),this.setAttribute("name",u(this,_e).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?A(this,Ke,t):e==="title"?A(this,_e,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,u(this,ve));return u(this,Ke)?`[[${t}]]`:t}text(){let e=super.text("|");return u(this,Ke)?`[[${e}]]`:e}getAttribute(e){return e==="title"?u(this,_e):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?u(this,ve).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 L(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:qe(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"),m=c.startIndex+d.getRelativeIndex();c.suggestions=[{desc:"escape",range:[m,m+d.data.length],text:d.data.replace(/\|/gu,"|")}],n.push(c)}}if(p!==void 0&&!Go(o)){let d=$(i,g,"no-ignored","useless fragment"),c=i.childNodes.find(m=>m.type==="text"&&m.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,Ke)?{pre:"[[",post:"]]",sep:u(this,ve)}:{sep:u(this,ve)})}};Ke=new WeakMap,ve=new WeakMap,_e=new WeakMap});var se,Me=k(()=>{"use strict";P();se=class extends v{get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}}});var Ti,un,Do,W,ze=k(()=>{"use strict";Qe();Me();Ti=[he()];W=class extends(Do=se){get type(){return"noinclude"}toString(r){return r?"":super.toString()}};un=pe(Do),W=ce(un,0,"NoincludeToken",Ti,W),ue(un,1,W)});var yr,yi=k(()=>{"use strict";j();Kt();ze();yr=class extends Ce{get type(){return"redirect-target"}constructor(r,e,t,n){super(r,void 0,t,n),e!==void 0&&this.insertAt(new W(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 ki,Ge,bt,cn,Wo,Je,vi=k(()=>{"use strict";Qe();F();P();ft();yi();ki=[he(!1,!1)];Je=class extends(Wo=v){constructor(e,t,n,i,s,o=b.getConfig(),l=[]){super(void 0,o,l);y(this,Ge);y(this,bt);A(this,Ge,e),A(this,bt,s);let p=new RegExp(String.raw`^(?:${o.redirection.join("|")})\s*(?::\s*)?$`,"iu");this.append(new fe(t,p,"redirect-syntax",o,l,{}),new yr(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,bt)}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,bt)})}};cn=pe(Wo),Ge=new WeakMap,bt=new WeakMap,Je=ce(cn,0,"RedirectToken",ki,Je),ue(cn,1,Je)});var Ai={};ae(Ai,{parseRedirect:()=>Uo});var Uo,wi=k(()=>{"use strict";F();vi();Uo=(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 Je(...t.slice(1),r,e),a):!1}});var kr,Si=k(()=>{"use strict";P();kr=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 De,Tt,mn=k(()=>{"use strict";P();Tt=class extends v{constructor(e,t,n,i,s,o=[]){super(void 0,s);y(this,De);re(this,"closed");re(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),A(this,De,[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,De);return t?`<${s}${n.toString(e)}/>`:`<${s}${n.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=u(this,De);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?u(this,De)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=u(this,De);return super.print(this.selfClosing?{pre:`<${e}`,post:"/>"}:{pre:`<${e}`,sep:">",post:this.closed?`</${t}>`:""})}};De=new WeakMap});var Ci,hn,Ho,Ye,$i=k(()=>{"use strict";j();K();Qe();F();mn();Ci=[he(!1)];Ye=class extends(Ho=Tt){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 L(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}};hn=pe(Ho),Ye=ce(hn,0,"IncludeToken",Ci,Ye),ue(hn,1,Ye)});var X,Ni,Ei,Ar,fn,Ii,yt,Li,Fi,Ri,vr,Pi,Bi,ji,qi,Oi=k(()=>{"use strict";X=new Set(["align"]),Ni=new Set(["cite"]),Ei=new Set(["cite","datetime"]),Ar=new Set(["width"]),fn=new Set(["axis","align","bgcolor","height","width","valign"]),Ii=new Set([...fn,"abbr","headers","scope","rowspan","colspan"]),yt=new Set(["type"]),Li=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Fi=new Set(["clear"]),Ri=new Set(["bgcolor","align","valign"]),vr=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:X,h1:X,h2:X,h3:X,h4:X,h5:X,h6:X,blockquote:Ni,q:Ni,p:X,br:Fi,pre:Ar,ins:Ei,del:Ei,ul:yt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Li,"border"]),caption:X,tr:Ri,td:Ii,th:Ii,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:Ar,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:yt,poem:X,categorytree:X,combooption:X},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:vr,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:vr,inputbox:vr,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:vr,poll:new Set(["id","show-results-before-voting"]),sm2:yt,flashmp3:yt,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:Li,td:new Set([...fn,"scope"]),th:fn,br:Fi,caption:X,div:X,hr:Ar,h1:X,h2:X,h3:X,h4:X,h5:X,h6:X,li:yt,p:X,pre:Ar,tr:Ri,ul:yt}});var Vo,Jt,kt,ne,$e,vt,_i=k(()=>{"use strict";j();Q();Oi();K();F();P();Le();Vo=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,vt=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=oe(V({},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);y(this,Jt);y(this,kt);y(this,ne);y(this,$e);A(this,Jt,e),this.append(g,d),A(this,ne,i),A(this,$e,[...o]),A(this,kt,t),this.setAttribute("name",ie(n).trim().toLowerCase())}get type(){return u(this,Jt)}get tag(){return u(this,kt)}get balanced(){return!u(this,ne)||u(this,$e)[0]===u(this,$e)[1]}afterBuild(){u(this,ne).includes("\0")&&A(this,ne,this.buildFromStr(u(this,ne),0)),this.parentNode&&A(this,kt,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,ne)?super.toString(e,u(this,ne)+t)+n:this.firstChild.toString(e)}text(){return u(this,ne)?`${super.text(`${u(this,ne).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return u(this,ne)?u(this,ne).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 L(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 m=ji[g],h=Bi[g],{length:f}=this.toString();if(!(m!=null&&m.has(p))&&!(h!=null&&h.has(p))&&(l==="ext-attr"?m||h:!/\{\{[^{]+\}\}/u.test(p))&&(l==="ext-attr"&&!h||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(p)&&(g==="meta"||g==="link"||!Pi.has(p)))){let T=$(s,c,"illegal-attr","illegal attribute name");T.suggestions=[{desc:"remove",range:[e,e+f],text:""}],n.push(T)}else if((x=qi[g])!=null&&x.has(p))n.push($(s,c,"obsolete-attr","obsolete attribute","warning"));else if(p==="style"&&typeof d=="string"&&Vo.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,ne)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=u(this,$e);return u(this,ne)?super.print({sep:ut(u(this,ne))+e,post:t}):super.print()}};Jt=new WeakMap,kt=new WeakMap,ne=new WeakMap,$e=new WeakMap});var Mi,Xo,xn,Yt,We,wr=k(()=>{"use strict";j();Q();K();F();P();Le();_i();Mi=a=>a.slice(0,-1),Xo=a=>`${Mi(a)}-dirty`;try{xn=new RegExp(String.raw`[\p{L}\d]`,"u")}catch(a){xn=/[^\W_]/u}We=class extends v{constructor(e,t,n,i=b.getConfig(),s=[]){super(void 0,i,s,{});y(this,Yt);if(A(this,Yt,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)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu,l="",p=o.exec(e),g=0,d=()=>{l&&(super.insertAt(new M(l,Xo(t),i,s,{})),l="")};for(;p;){let{index:c,0:m,1:h,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(ie(h).trim())){let C=T!=null?T:S,E=[x,w],q=new vt(Mi(t),n,h,f,C,E,i,s);d(),super.insertAt(q)}else l+=m;({lastIndex:g}=o),p=o.exec(e)}l+=e.slice(g),d()}}get type(){return u(this,Yt)}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 vt&&(!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 L(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 vt){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",xn.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 m=c.getValue();return[c,m===!0?"":m]});n.push(...d.map(([c,m],h)=>{let f=$(c,p,"no-duplicate",b.msg("duplicated $1 attribute",g)),x={desc:"remove",range:[f.startIndex,f.endIndex],text:""};return!m||d.slice(0,h).some(([,T])=>T===m)?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>`:""}};Yt=new WeakMap});var Sr,zi=k(()=>{"use strict";F();P();ze();Sr=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 W(o[0],e,t),new W(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 At,bn=k(()=>{"use strict";j();K();Zt();F();P();Le();At=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:Ze(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,St,Cr,Ct,xn=y(()=>{"use strict";j();ve();J();F();P();xt();Ct=class extends v{constructor(e,t,n=b.getConfig(),i=[]){super(void 0,n,i);k(this,St);k(this,Zt);A(this,Zt,e);let s=new v(t[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let o=new xe(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,St,Cr);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=u(this,St,Cr);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($t("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],Y(M({},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,St,Cr);return super.print({pre:e,sep:e})}json(){let e=super.json();return e.level=this.level,e}};Zt=new WeakMap,St=new WeakSet,Cr=function(){return"=".repeat(this.level)}});var Ho,$r,Oi=y(()=>{"use strict";K();j();F();P();Ho=new RegExp(`https?://${Ee}${Ie}$`,"iu"),$r=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=Ho.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 tr,rt,nt,it,bn,Mi,er,zi=y(()=>{"use strict";K();j();ve();Ce();J();F();P();Oi();Fe();xt();er=class extends v{constructor(e,t,n=b.getConfig(),i=[]){var f,x;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,it);Q(this,"modifier","");k(this,tr,"template");k(this,rt,!1);k(this,nt,new Map);let{parserFunction:[l,p],variable:g}=n,d=(f=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:f[0];if(d)this.setAttribute("modifier",d),e=e.slice(d.length);else if(e.includes(":")){let[T,...w]=e.split(":"),[S]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((x=w[0])!=null?x:"");this.setModifier(`${T}:${S}`)&&(e=w.join(":").slice(S.length))}let c=e.includes(":");if(c||t.length===0&&!u(this,rt)){let[T,...w]=e.split(":"),S=oe(T),C=S[w.length>0?"trimStart":"trim"](),E=C.toLowerCase(),q=Array.isArray(p),G=q?p.includes(C):Object.prototype.hasOwnProperty.call(p,C),B=Object.prototype.hasOwnProperty.call(l,E)&&l[E]||!q&&G&&p[C];if(q&&G||g.includes(B)||c&&B){this.setAttribute("name",B||E.replace(/^#/u,"")),A(this,tr,"magic-word");let H=new RegExp(String.raw`^\s*${C}\s*$`,G?"u":"iu"),ee=new xe(T,H,"magic-word-name",n,i,{});if(super.insertAt(ee),w.length>0&&t.unshift([w.join(":")]),this.name==="invoke")for(let U=0;U<2;U++){let V=t.shift();if(!V)break;let ne=new z(V.join("="),`invoke-${U?"function":"module"}`,n,i);super.insertAt(ne)}}}if(this.type==="template"){let T=oe(e).trim();if(!this.normalizeTitle(T,10,!0).valid)throw i.pop(),new SyntaxError("Invalid template name");let w=new z(e,"template-name",n,i,{});super.insertAt(w)}typeof s=="number"&&(i[s]=void 0);let h=this.isTemplate(),m=1;for(let[T,w]of t.entries())h||this.name==="switch"&&T>0||this.name==="tag"&&T>1||(w[0]=w.join("="),w.length=1),w.length===1&&(w.unshift(m),m++),this.insertAt(new $r(...w,n,i));this.seal("modifier")}get type(){return u(this,tr)}setModifier(e){let{parserFunction:[,,t,n]}=this.getAttribute("config"),i=oe(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,rt)&&o||!u(this,rt)&&(l||e==="")||(we.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),A(this,rt,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,it,bn).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?"":":")+me(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,it,bn).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"&&Wt(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"));if(g.length>0)for(let[,d]of g)n.push(...d.map(c=>{let h=$(c,l,"no-duplicate","duplicated parameter");return h.suggestions=[{desc:"remove",range:[h.startIndex-1,h.endIndex],text:""}],h}));return n}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?L(this,it,Mi).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter($t("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,nt).has(i)?s=u(this,nt).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),u(this,nt).set(i,s)),s}getDuplicatedArgs(){return[...u(this,nt)].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}">{{${ht(i)}${s==="magic-word"?n.print()+(t===1?"":":")+Le(e.slice(1),{sep:"|"}):Le(e,{sep:"|"})}}}</span>`}};tr=new WeakMap,rt=new WeakMap,nt=new WeakMap,it=new WeakSet,bn=function(){let e=this.type==="template",t=this.childNodes[e?0:1];return this.normalizeTitle(t.toString(!0),e?10:828)},Mi=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 Gi,Tn,Vo,st,Ui=y(()=>{"use strict";Je();P();Gi=[fe()];st=class extends(Vo=v){get type(){return"hidden"}};Tn=ue(Vo),st=he(Tn,0,"HiddenToken",Gi,st),ce(Tn,1,st)});var Er,Wi,Nr,Di=y(()=>{"use strict";K();j();J();F();P();Fe();Ui();Nr=class extends v{constructor(e,t=b.getConfig(),n=[]){super(void 0,t,n,{});k(this,Er);for(let[i,s]of e.entries())if(i===0){let o=new z(s,"arg-name",t,n,{});super.insertAt(o)}else if(i>1){let o=new st(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`{{{${me(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}afterBuild(){L(this,Er,Wi).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:"|"})}};Er=new WeakSet,Wi=function(){this.setAttribute("name",this.firstChild.toString(!0).trim())}});var Vi={};le(Vi,{parseBraces:()=>rr});var Xo,Hi,yn,Qo,rr,Ir=y(()=>{"use strict";K();xn();zi();Di();Xo={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},Hi=String.raw`|\{{2,}`,yn=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),Qo=/\{\{\s*([^\s\0<>[\]{}|_#&%:.]+)\s*\}\}(?!\})/gu,rr=(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(Qo,(T,w)=>{var S;return new er(T.slice(2,-2),[],r,e),`\0${e.length-2}${(S=yn.get(w.toLowerCase()))!=null?S:"t"}\x7F`});let s=a.lastIndexOf("}}")-a.length,o=s+a.length!==-1,l=new RegExp(t+(o?Hi:""),"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:U}]=p;p[0]=p[0].slice(U),p.index+=U}let{0:T,index:w}=p!=null?p:{0:`
|
|
9
|
-
`,index:a.length},S=(
|
|
10
|
-
`){g=w+1;let{pos:
|
|
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 L(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 er,wt,Cr,St,Tn=k(()=>{"use strict";j();ke();K();F();P();ft();St=class extends v{constructor(e,t,n=b.getConfig(),i=[]){super(void 0,n,i);y(this,wt);y(this,er);A(this,er,e);let s=new v(t[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let o=new fe(t[1],/^\s*$/u,"heading-trail",n,i,{});this.append(s,o)}get type(){return"heading"}get level(){return u(this,er)}toString(e){let t=u(this,wt,Cr);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=u(this,wt,Cr);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(Ct("quote")),d=g.filter(({bold:f})=>f),c=g.filter(({italic:f})=>f),m=new L(this,e);if(this.level===1){let f=$(i,m,"h1","<h1>");p||(f.suggestions=[{desc:"h2",range:[f.startIndex,f.endIndex],text:`=${o}=`}]),n.push(f)}if(p){let f=$(i,m,"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,m,"parsing-order","section header in a HTML tag"));let h=this.getRootNode().toString();if(d.length%2){let f=$(d[d.length-1],oe(V({},m),{start:e+s,left:m.left+s}),"format-leakage",b.msg("unbalanced $1 in a section header","bold apostrophes")),x=e+s+o.length;h.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=h.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,wt,Cr);return super.print({pre:e,sep:e})}json(){let e=super.json();return e.level=this.level,e}};er=new WeakMap,wt=new WeakSet,Cr=function(){return"=".repeat(this.level)}});var Qo,$r,Gi=k(()=>{"use strict";Q();j();F();P();Qo=new RegExp(`https?://${Ne}${Ee}$`,"iu"),$r=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=Qo.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 rr,et,tt,rt,yn,Di,tr,Wi=k(()=>{"use strict";Q();j();ke();K();F();P();Gi();Le();ft();tr=class extends v{constructor(e,t,n=b.getConfig(),i=[]){var f,x;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,{});y(this,rt);re(this,"modifier","");y(this,rr,"template");y(this,et,!1);y(this,tt,new Map);let{parserFunction:[l,p],variable:g}=n,d=(f=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:f[0];if(d)this.setAttribute("modifier",d),e=e.slice(d.length);else if(e.includes(":")){let[T,...w]=e.split(":"),[S]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((x=w[0])!=null?x:"");this.setModifier(`${T}:${S}`)&&(e=w.join(":").slice(S.length))}let c=e.includes(":");if(c||t.length===0&&!u(this,et)){let[T,...w]=e.split(":"),S=ie(T),C=S[w.length>0?"trimStart":"trim"](),E=C.toLowerCase(),q=Array.isArray(p),z=q?p.includes(C):Object.prototype.hasOwnProperty.call(p,C),B=!q&&z?p[C]:Object.prototype.hasOwnProperty.call(l,E)&&l[E];if(q&&z||g.includes(B)||c&&B){this.setAttribute("name",B||E.replace(/^#/u,"")),A(this,rr,"magic-word");let U=new RegExp(String.raw`^\s*${C}\s*$`,z?"u":"iu"),Y=new fe(T,U,"magic-word-name",n,i,{});if(super.insertAt(Y),w.length>0&&t.unshift([w.join(":")]),this.name==="invoke")for(let G=0;G<2;G++){let H=t.shift();if(!H)break;let te=new M(H.join("="),`invoke-${G?"function":"module"}`,n,i);super.insertAt(te)}}}if(this.type==="template"){let T=ie(e).trim();if(!this.normalizeTitle(T,10,!0).valid)throw i.pop(),new SyntaxError("Invalid template name");let w=new M(e,"template-name",n,i,{});super.insertAt(w)}typeof s=="number"&&(i[s]=void 0);let m=this.isTemplate(),h=1;for(let[T,w]of t.entries())m||this.name==="switch"&&T>0||this.name==="tag"&&T>1||(w[0]=w.join("="),w.length=1),w.length===1&&(w.unshift(h),h++),this.insertAt(new $r(...w,n,i));this.seal("modifier")}get type(){return u(this,rr)}setModifier(e){let{parserFunction:[,,t,n]}=this.getAttribute("config"),i=ie(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,et)&&o||!u(this,et)&&(l||e==="")||(we.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),A(this,et,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",I(this,rt,yn).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?"":":")+me(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 L(this,e),p=i==="magic-word";if(p&&!I(this,rt,yn).call(this).valid)n.push($(s[1],l,"invalid-invoke","illegal module name"));else{let d=s[p?1:0],c=d.childNodes.find(m=>m.type==="text"&&Dt(m.data).includes("#"));if(c){let m=$(d,l,"no-ignored","useless fragment");m.fix={range:[m.startIndex+c.getRelativeIndex()+c.data.indexOf("#"),m.endIndex],text:"",desc:"remove"},n.push(m)}}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"));if(g.length>0)for(let[,d]of g)n.push(...d.map(c=>{let m=$(c,l,"no-duplicate","duplicated parameter");return m.suggestions=[{desc:"remove",range:[m.startIndex-1,m.endIndex],text:""}],m}));return n}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?I(this,rt,Di).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(Ct("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,tt).has(i)?s=u(this,tt).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),u(this,tt).set(i,s)),s}getDuplicatedArgs(){return[...u(this,tt)].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?"":":")+Ie(e.slice(1),{sep:"|"}):Ie(e,{sep:"|"})}}}</span>`}};rr=new WeakMap,et=new WeakMap,tt=new WeakMap,rt=new WeakSet,yn=function(){let e=this.type==="template",t=this.childNodes[e?0:1];return this.normalizeTitle(t.toString(!0),e?10:828)},Di=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 Ui,kn,Ko,nt,Hi=k(()=>{"use strict";Qe();P();Ui=[he()];nt=class extends(Ko=v){get type(){return"hidden"}};kn=pe(Ko),nt=ce(kn,0,"HiddenToken",Ui,nt),ue(kn,1,nt)});var Er,Vi,Nr,Xi=k(()=>{"use strict";Q();j();K();F();P();Le();Hi();Nr=class extends v{constructor(e,t=b.getConfig(),n=[]){super(void 0,t,n,{});y(this,Er);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 nt(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`{{{${me(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}afterBuild(){I(this,Er,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.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 L(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:"|"})}};Er=new WeakSet,Vi=function(){this.setAttribute("name",this.firstChild.toString(!0).trim())}});var Ki={};ae(Ki,{parseBraces:()=>nr});var Jo,Qi,vn,Yo,nr,Ir=k(()=>{"use strict";Q();Tn();Wi();Xi();Jo={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},Qi=String.raw`|\{{2,}`,vn=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),Yo=/\{\{\s*([^\s\0<>[\]{}|_#&%:.]+)\s*\}\}(?!\})/gu,nr=(a,r,e)=>{var d,c,m,h,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(Yo,(T,w)=>{var S;return new tr(T.slice(2,-2),[],r,e),`\0${e.length-2}${(S=vn.get(w.toLowerCase()))!=null?S:"t"}\x7F`});let s=a.lastIndexOf("}}")-a.length,o=s+a.length!==-1,l=new RegExp(t+(o?Qi:""),"gmu"),p=l.exec(a),g;for(;p||g!==void 0&&g<=a.length&&((m=(c=i[i.length-1])==null?void 0:c[0])!=null&&m.startsWith("="));){if(p!=null&&p[1]){let[,{length:G}]=p;p[0]=p[0].slice(G),p.index+=G}let{0:T,index:w}=p!=null?p:{0:`
|
|
9
|
+
`,index:a.length},S=(h=i.pop())!=null?h:{},{0:C,index:E,parts:q,findEqual:z,pos:B}=S,ee=T==="="&&z,U=G=>{q[q.length-1].push(G.slice(B,w))};if(T==="]]"||T==="}-")g=w+2;else if(T===`
|
|
10
|
+
`){g=w+1;let{pos:G,findEqual:H}=(f=i[i.length-1])!=null?f:{};if(G===void 0||H||ie(a.slice(G,E))!==""){let te=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(E,w));te&&(a=`${a.slice(0,E)}\0${e.length}h\x7F${a.slice(w)}`,g=E+4+String(e.length).length,new St(te[1].length,te.slice(2),r,e))}}else if(T==="|"||ee)g=w+1,U(a),T==="|"&&q.push([]),S.pos=g,S.findEqual=T==="|",i.push(S);else if(T.startsWith("}}")){let G=T.slice(0,Math.min(C.length,3)),H=C.length-G.length,{length:te}=e;g=w+G.length,U(a);let R=!1,Se="t";if(G.length===3){let Z=q.map(He=>He.join("=")),ge=Z.length>1&&ie(Z[1]).trim();new Nr(Z,r,e),ge&&ge.endsWith(":")&&n.includes(ge.slice(0,-1).toLowerCase())&&(Se="s")}else try{new tr(q[0][0],q.slice(1),r,e);let Z=ie(q[0][0]).trim();vn.has(Z.toLowerCase())?Se=vn.get(Z.toLowerCase()):/^(?:filepath|(?:full|canonical)urle?):./iu.test(Z)?Se="m":/^#vardefine:./iu.test(Z)&&(Se="n")}catch(Z){if(Z instanceof SyntaxError&&Z.message==="Invalid template name")R=!0;else throw Z}R||(a=`${a.slice(0,E+H)}\0${te}${Se}\x7F${a.slice(g)}`,g=E+H+3+String(te).length,H>1?i.push({0:C.slice(0,H),index:E,pos:E+H,parts:[[]]}):H===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 Y=i[i.length-1];if(o&&s+a.length<g)for(o=!1;(x=Y==null?void 0:Y[0])!=null&&x.startsWith("{");)i.pop(),Y=i[i.length-1];l=new RegExp(t+(o?Qi:"")+(Y?`|${Jo[Y[0][0]]}${Y.findEqual?"|=":""}`:""),"gmu"),l.lastIndex=g,p=l.exec(a)}return a}});var Lr,Ji=k(()=>{"use strict";Zt();Ir();F();bn();Lr=class extends At{constructor(r,e,t=b.getConfig(),n=[]){let i=Symbol("InputboxToken"),{length:s}=n;n.push(i),e&&(e=Ze(e,t,n,r)),e&&(e=nr(e,t,n)),n.splice(s,1),super(r,e,t,n,{})}}});function Yi(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}|//)${Ne}|\0\d+m\x7F)${Ee}$`,"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 Zo,le,Rr,Zi,Fr,es=k(()=>{"use strict";Q();j();F();P();Zo=new Set(["alt","link","lang","page","caption"]);Fr=class extends v{constructor(e,t,n=b.getConfig(),i){var r=(...fg)=>(super(...fg),y(this,Rr),y(this,le,""),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||Yi(g,s[2],n,!0,t)!==!1)));if(l&&s){s.length===3?(r(void 0,n,i),A(this,le,e)):(r(s[2],n,i,{}),A(this,le,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}r(e,oe(V({},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"?Yi("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!Zo.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return u(this,le)?u(this,le).replace("$1",super.toString(e)):super.toString(e)}text(){return u(this,le)?u(this,le).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,u(this,le).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:qe(this.text())}],n.push(o)}return n}getValue(){return this.name==="invalid"?this.text():I(this,Rr,Zi).call(this)||super.text()}print(){return u(this,le)?`<span class="wpb-image-parameter">${u(this,le).replace("$1",`<span class="wpb-image-caption">${Ie(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};le=new WeakMap,Rr=new WeakSet,Zi=function(){return u(this,le)&&!u(this,le).includes("$1")}});var ts,rs,ns,ea,$t,An=k(()=>{"use strict";Q();j();K();F();Kt();es();ts=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),rs=new Set(["left","right","center","none"]),ns=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),ea=(a,r,e,t)=>{if(t===void 0)return[];let n=new RegExp(`${[a,r,e].map(oi).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},$t=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(...ea("-{","}-","|",e).map(o=>new Fr(o,s,t,n)))}lint(r=this.getAbsoluteIndex(),e){var m;let t=super.lint(r,e),n=this.getAllArgs().filter(({childNodes:h})=>{let f=h.filter(x=>x.text().trim());return f.length!==1||f[0].type!=="arg"}),i=[...new Set(n.map(({name:h})=>h))],s=i.filter(h=>ts.has(h)),o=i.filter(h=>rs.has(h)),l=i.filter(h=>ns.has(h)),[p]=s,g=p==="framed"||p==="manualthumb",d=new L(this,r);if(this.closest("ext-link-text")&&((m=this.getValue("link"))==null?void 0:m.trim())!==""&&t.push(N(this,d,"nested-link","internal link in an external link")),g)for(let h of n.filter(({name:f})=>f==="width")){let f=$(h,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=(h,f)=>x=>{let T=$(x,d,"no-duplicate",b.msg(`${h} image $1 parameter`,f));return T.suggestions=[{desc:"remove",range:[T.startIndex-1,T.endIndex],text:""}],T};for(let h of i){if(h==="invalid"||h==="width"&&g)continue;let f=n.filter(({name:x})=>x===h);h==="caption"&&(f=[...f.slice(0,-1).filter(x=>x.text()),...f.slice(-1)]),f.length>1&&t.push(...f.map(c("duplicated",h)))}return s.length>1&&t.push(...n.filter(({name:h})=>ts.has(h)).map(c("conflicting","frame"))),o.length>1&&t.push(...n.filter(({name:h})=>rs.has(h)).map(c("conflicting","horizontal-alignment"))),l.length>1&&t.push(...n.filter(({name:h})=>ns.has(h)).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 Nt,wn=k(()=>{"use strict";j();F();P();An();Nt=class extends $t{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);re(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 Br,is,Pr,ss=k(()=>{"use strict";F();P();wn();ze();Pr=class extends v{constructor(e,t=b.getConfig(),n=[]){var i;super(void 0,t,n,{});y(this,Br);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 W(s,t,n):s);continue}let[,l,p]=o;I(this,Br,is).call(this,l)?super.insertAt(new Nt("gallery",l,p,t,n)):super.insertAt(new W(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,
|
|
16
|
-
`})}};Br=new WeakSet,
|
|
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,m=o?0:i;if(l.type==="noinclude"&&d&&!/^<!--.*-->$/u.test(d)){let h=e+g;s.push({rule:"no-ignored",message:b.msg("invalid content in <$1>","gallery"),severity:d.startsWith("|")?"warning":"error",startIndex:e,endIndex:h,startLine:c,endLine:c,startCol:m,endCol:m+g,suggestions:[{desc:"remove",range:[e,h],text:""},{desc:"comment",range:[e,h],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
|
+
`})}};Br=new WeakSet,is=function(e){return this.normalizeTitle(e,6,!0,!0).valid}});var Et,Sn=k(()=>{"use strict";j();Kt();Et=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 ta,ra,ir,Fe,jr=k(()=>{"use strict";j();Q();K();F();P();ta=String.raw`(?:[${ye}\t]| |�*160;|&#[xX]0*[aA]0;)`,ra=new RegExp(`${ta}+`,"gu"),Fe=class extends v{constructor(e,t="free-ext-link",n=b.getConfig(),i){super(e,n,i,{});y(this,ir);A(this,ir,t)}get type(){return u(this,ir)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=me(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(ra," ")),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:ai(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new L(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,m)=>d+c*(10-m),0)%11||g.length===13&&(g[12]===10||g.reduce((d,c,m)=>d+c*(m%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),m=g.startIndex+d;g.suggestions=s?[{desc:"whitespace",range:[m,m+1],text:" "}]:[{desc:"whitespace",range:[m,m],text:" "},{desc:"escape",range:[m,m+c.length],text:encodeURI(c)}],n.push(g)}return n}};ir=new WeakMap});var Re,It,Cn=k(()=>{"use strict";j();F();P();jr();It=class extends v{constructor(e,t="",n="",i=b.getConfig(),s=[]){super(void 0,i,s,{});y(this,Re);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new Fe(e,"ext-link-url",i,s);if(this.insertAt(o),A(this,Re,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,Re)}]`:`[${super.toString(e,u(this,Re))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return u(this,Re).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,Re)}]`}:{pre:"[",sep:u(this,Re),post:"]"})}};Re=new WeakMap});var sr,os=k(()=>{"use strict";F();P();ze();Sn();Cn();sr=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 Et(...e,n,i):new It(...e,n,i),new W(t,n,i))}}});var qr,as=k(()=>{"use strict";j();ke();K();F();P();ze();wn();os();qr=class extends v{get type(){return"ext-inner"}get image(){return this.childNodes.find(Ct("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=W,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("|"),m=this.normalizeTitle(d,0,!0);if(m.valid&&!m.interwiki&&m.ns===6){let h=new Nt("imagemap",d,c.length>0?c.join("|"):void 0,e,t);super.insertAt(h),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),m=/^\[\[([^|]+)(?:\|([^\]]+))?\]\][\w\s]*$/u.exec(c);if(m){if(this.normalizeTitle(m[1],0,!0,!1,!0).valid){super.insertAt(new sr(p.slice(0,d),m.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 h=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(c);if(h){super.insertAt(new sr(p.slice(0,d),h.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 _r,ss=y(()=>{"use strict";j();F();ze();_r=class extends ae{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 Or={};le(Or,{NestedToken:()=>Sn});var ea,sr,Ft,Sn,Mr=y(()=>{"use strict";j();J();Yt();Ir();F();P();Cn();Ge();ea=new Set(["comment","include","arg","template","magic-word"]),Sn=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=tt(e,i,s,t)),e&&(e=rr(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 Rt(l,p,g,d,i,!1,s),c}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,p)=>(new D(p,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);k(this,sr);k(this,Ft);A(this,sr,[...n]),A(this,Ft,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let n=new I(this,e),i=u(this,Ft)?"includeonly":"noinclude",s=typeof u(this,Ft)=="boolean"?new RegExp(String.raw`^(?:<${i}(?:\s[^>]*)?/?>|</${i}\s*>)$`,"iu"):/^<!--[\s\S]*-->$/u;return[...super.lint(e,t),...this.childNodes.filter(o=>{if(o.type==="ext")return!u(this,sr).includes(o.name);if(ea.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})]}};sr=new WeakMap,Ft=new WeakMap});var os,Rt,Cn=y(()=>{"use strict";j();J();F();P();un();wr();_i();fn();Xi();rs();is();ss();os=(a,r)=>{let e=new Set(a);return e.delete(r),[...e]},Rt=class extends yt{get type(){return"ext"}constructor(r,e,t,n,i=b.getConfig(),s=!1,o=[]){var c;let l=r.toLowerCase(),p=new De(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),g=Y(M({},i),{ext:os(i.ext,l),excludes:[...(c=i.excludes)!=null?c:[]]}),d;switch(g.inExt=!0,l){case"tab":g.ext=os(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 Sr(t,g,o);break;case"dynamicpagelist":d=new wt(s,t,g,o);break;case"inputbox":g.excludes.push("heading"),d=new Lr(s,t,g,o);break;case"references":{let{NestedToken:h}=(Mr(),Z(Or));g.excludes.push("heading"),d=new h(t,s,["ref"],g,o);break}case"choose":{let{NestedToken:h}=(Mr(),Z(Or));d=new h(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],g,o);break}case"combobox":{let{NestedToken:h}=(Mr(),Z(Or));d=new h(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],g,o);break}case"gallery":d=new Pr(t,g,o);break;case"imagemap":d=new qr(t,g,o);break;default:d=new _r(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 as,$n,ta,ot,ls=y(()=>{"use strict";j();Je();F();ze();as=[fe(!1)];ot=class extends(ta=ae){constructor(e,t=!0,n,i){super(e,n,i);Q(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?"-->":""})}};$n=ue(ta),ot=he($n,0,"CommentToken",as,ot),ce($n,1,ot)});var ps={};le(ps,{parseCommentAndExt:()=>tt});var gs,ra,Nn,ds,tt,Yt=y(()=>{"use strict";vi();Ge();wi();Cn();ls();gs="<onlyinclude>",ra="</onlyinclude>",{length:Nn}=gs,ds=a=>{let r=a.indexOf(gs);return{i:r,j:a.indexOf(ra,r+Nn)}},tt=(a,r,e,t)=>{if(t){let{i:l,j:p}=ds(a);if(l!==-1&&p!==-1){let g="",d=c=>{new D(c,r,e),g+=`\0${e.length-1}n\x7F`};for(;l!==-1&&p!==-1;){let c=`\0${e.length}e\x7F`;new kr(a.slice(l+Nn,p),r,e),l>0&&d(a.slice(0,l)),g+=c,a=a.slice(p+Nn+1),{i:l,j:p}=ds(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`<!--[\s\S]*?(?:-->|$)|<${i}(?:\s[^>]*)?/?>|</${i}\s*>|<(${n})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${s})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${s}\s*)>|$))`,"giu");return a.replace(o,(l,p,g,d,c,h,m,f,x)=>{let T=e.length,w="n";if(p)w="e",new Rt(p,g,d,c,r,h,e);else if(l.startsWith("<!--")){w="c";let S=l.endsWith("-->");new ot(l.slice(4,S?-3:void 0),S,r,e)}else h?new et(h,m,f,x,r,e):new D(l,r,e);return`\0${T}${w}\x7F`})}});var na,ia,sa,Pt,be,He,zr,us=y(()=>{"use strict";j();K();J();P();na=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),ia=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"]),sa=new Set(["strike","big","center","font","tt"]),zr=class extends v{constructor(e,t,n,i,s,o){super(void 0,s,o);k(this,Pt);k(this,be);k(this,He);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),A(this,Pt,n),A(this,be,i),A(this,He,e)}get type(){return"html"}get selfClosing(){return u(this,be)}get closing(){return u(this,Pt)}toString(e){return`<${this.closing?"/":""}${u(this,He)}${super.toString(e)}${u(this,be)?"/":""}>`}text(){let{closing:e}=this,t=u(this,He)+(e?"":super.text());return`<${e?"/":""}${t}${u(this,be)?"/":""}>`}getAttribute(e){return e==="padding"?u(this,He).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(Y(M({},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;ia.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&&na.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 sa.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=oi(this.toString());if(o&&(u(this,be)||n.includes(i)))throw new SyntaxError(`Tag that is both closing and self-closing: ${l}`);if(n.includes(i)||u(this,be)&&t.includes(i))return this;if(u(this,be)&&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,Pt)?c--:c++,c===0)return h;throw new SyntaxError(`${o?"Unmatched closing":"Unclosed"} tag: ${l}`)}print(){return super.print({pre:`<${this.closing?"/":""}${u(this,He)}`,post:`${u(this,be)?"/":""}>`})}json(){let e=super.json();return Object.assign(e,{closing:this.closing,selfClosing:u(this,be)}),e}};Pt=new WeakMap,be=new WeakMap,He=new WeakMap});var cs={};le(cs,{parseHtml:()=>aa});var oa,aa,hs=y(()=>{"use strict";wr();us();oa=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,aa=(a,r,e)=>{var s;let{html:t}=r;(s=r.htmlElements)!=null||(r.htmlElements=new Set([...t[0],...t[1],...t[2]]));let n=a.split("<"),i=n.shift();for(let o of n){let l=oa.exec(o),p=l==null?void 0:l[2],g=p==null?void 0:p.toLowerCase();if(!l||!r.htmlElements.has(g)){i+=`<${o}`;continue}let[,d,,c="",h,m]=l,{length:f}=e,x=new De(c,"html-attrs",g,r,e),T=x.getAttr("itemprop");if(g==="meta"&&(T===void 0||x.getAttr("content")===void 0)||g==="link"&&(T===void 0||x.getAttr("href")===void 0)){i+=`<${o}`,e.length=f;continue}i+=`\0${e.length}x\x7F${m}`,new zr(p,x,d==="/",h==="/>",r,e)}return i}});var ms,xs=y(()=>{"use strict";ve();ms=(a=0)=>(r,e)=>{var n,fs;class t extends r{constructor(){super(...arguments);k(this,n)}getAttr(l){return u(this,n,fs).getAttr(l)}}return n=new WeakSet,fs=function(){return this.childNodes[a]},Tr(t,r),t}});var Bt,En=y(()=>{"use strict";xs();F();P();xt();wr();Bt=class extends ms(1)(v){constructor(r,e,t,n,i=b.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new xe(e,r,"table-syntax",i,s,{}),new De(n,"table-attrs",t,i,s))}}});var Te,or,lt,In,bs,at,Ln=y(()=>{"use strict";j();Ce();ve();J();F();P();En();at=class extends Bt{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,lt);k(this,Te,"");k(this,or);s&&([hr(this,Te)._]=s);let l=new v(t==null?void 0:t.slice(((p=s==null?void 0:s.index)!=null?p:NaN)+u(this,Te).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,lt,In).call(this).subtype}afterBuild(){u(this,Te).includes("\0")&&A(this,Te,this.buildFromStr(u(this,Te),0)),super.afterBuild()}toString(e){let{childNodes:[t,n,i]}=this;return t.toString(e)+n.toString(e)+u(this,Te)+i.toString(e)}text(){let{childNodes:[e,t,n]}=this;return e.text()+t.text()+u(this,Te)+n.text()}getGaps(e){return e===1?u(this,Te).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,`
|
|
20
|
+
`)}getGaps(){return 1}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new L(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 Or,ls=k(()=>{"use strict";j();F();Me();Or=class extends se{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 _r={};ae(_r,{NestedToken:()=>$n});var na,or,Lt,$n,Mr=k(()=>{"use strict";j();K();Zt();Ir();F();P();Nn();ze();na=new Set(["comment","include","arg","template","magic-word"]),$n=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=Ze(e,i,s,t)),e&&(e=nr(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 Ft(l,p,g,d,i,!1,s),c}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,p)=>(new W(p,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);y(this,or);y(this,Lt);A(this,or,[...n]),A(this,Lt,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let n=new L(this,e),i=u(this,Lt)?"includeonly":"noinclude",s=typeof u(this,Lt)=="boolean"?new RegExp(String.raw`^(?:<${i}(?:\s[^>]*)?/?>|</${i}\s*>)$`,"iu"):/^<!--[\s\S]*-->$/u;return[...super.lint(e,t),...this.childNodes.filter(o=>{if(o.type==="ext")return!u(this,or).includes(o.name);if(na.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})]}};or=new WeakMap,Lt=new WeakMap});var ds,Ft,Nn=k(()=>{"use strict";j();K();F();P();mn();wr();zi();bn();Ji();ss();as();ls();ds=(a,r)=>{let e=new Set(a);return e.delete(r),[...e]},Ft=class extends Tt{get type(){return"ext"}constructor(r,e,t,n,i=b.getConfig(),s=!1,o=[]){var c;let l=r.toLowerCase(),p=new We(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),g=oe(V({},i),{ext:ds(i.ext,l),excludes:[...(c=i.excludes)!=null?c:[]]}),d;switch(g.inExt=!0,l){case"tab":g.ext=ds(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 Sr(t,g,o);break;case"dynamicpagelist":d=new At(s,t,g,o);break;case"inputbox":g.excludes.push("heading"),d=new Lr(s,t,g,o);break;case"references":{let{NestedToken:m}=(Mr(),J(_r));g.excludes.push("heading"),d=new m(t,s,["ref"],g,o);break}case"choose":{let{NestedToken:m}=(Mr(),J(_r));d=new m(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],g,o);break}case"combobox":{let{NestedToken:m}=(Mr(),J(_r));d=new m(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],g,o);break}case"gallery":d=new Pr(t,g,o);break;case"imagemap":d=new qr(t,g,o);break;default:d=new Or(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 L(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 gs,En,ia,it,ps=k(()=>{"use strict";j();Qe();F();Me();gs=[he(!1)];it=class extends(ia=se){constructor(e,t,n,i){super(e,n,i);re(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?"-->":""})}};En=pe(ia),it=ce(En,0,"CommentToken",gs,it),ue(En,1,it)});var ms={};ae(ms,{parseCommentAndExt:()=>Ze});var cs,sa,In,us,Ze,Zt=k(()=>{"use strict";Si();ze();$i();Nn();ps();cs="<onlyinclude>",sa="</onlyinclude>",{length:In}=cs,us=a=>{let r=a.indexOf(cs);return{i:r,j:a.indexOf(sa,r+In)}},Ze=(a,r,e,t)=>{if(t){let{i:l,j:p}=us(a);if(l!==-1&&p!==-1){let g="",d=c=>{new W(c,r,e),g+=`\0${e.length-1}n\x7F`};for(;l!==-1&&p!==-1;){let c=`\0${e.length}e\x7F`;new kr(a.slice(l+In,p),r,e),l>0&&d(a.slice(0,l)),g+=c,a=a.slice(p+In+1),{i:l,j:p}=us(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`<!--[\s\S]*?(?:-->|$)|<${i}(?:\s[^>]*)?/?>|</${i}\s*>|<(${n})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${s})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${s}\s*)>|$))`,"giu");return a.replace(o,(l,p,g,d,c,m,h,f,x)=>{let T=e.length,w="n";if(p)w="e",new Ft(p,g,d,c,r,m,e);else if(l.startsWith("<!--")){w="c";let S=l.endsWith("-->");new it(l.slice(4,S?-3:void 0),S,r,e)}else m?new Ye(m,h,f,x,r,e):new W(l,r,e);return`\0${T}${w}\x7F`})}});var oa,aa,la,Rt,xe,Ue,zr,hs=k(()=>{"use strict";j();Q();K();P();oa=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),aa=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"]),la=new Set(["strike","big","center","font","tt"]),zr=class extends v{constructor(e,t,n,i,s,o){super(void 0,s,o);y(this,Rt);y(this,xe);y(this,Ue);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),A(this,Rt,n),A(this,xe,i),A(this,Ue,e)}get type(){return"html"}get selfClosing(){return u(this,xe)}get closing(){return u(this,Rt)}toString(e){return`<${this.closing?"/":""}${u(this,Ue)}${super.toString(e)}${u(this,xe)?"/":""}>`}text(){let{closing:e}=this,t=u(this,Ue)+(e?"":super.text());return`<${e?"/":""}${t}${u(this,xe)?"/":""}>`}getAttribute(e){return e==="padding"?u(this,Ue).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){var s;let n=super.lint(e,t),i=new L(this,e);if(this.name==="h1"&&!this.closing){let o=N(this,i,"h1","<h1>");o.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],n.push(o)}if(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;aa.has(this.name)&&(c!=null&&c.slice(0,c.indexOf(this)).some(({type:m,name:h})=>m==="html"&&h===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&&oa.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,,m]}=this.getAttribute("config"),h={desc:"open",range:[e+1,e+2],text:""};m.includes(this.name)?g.fix=h:c.includes(this.name)?g.fix=d:g.suggestions=[h,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 la.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=li(this.toString());if(o&&(u(this,xe)||n.includes(i)))throw new SyntaxError(`Tag that is both closing and self-closing: ${l}`);if(n.includes(i)||u(this,xe)&&t.includes(i))return this;if(u(this,xe)&&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(m=>m.type==="html"&&m.name===i),c=o?-1:1;for(let m of d)if(u(m,Rt)?c--:c++,c===0)return m;throw new SyntaxError(`${o?"Unmatched closing":"Unclosed"} tag: ${l}`)}print(){return super.print({pre:`<${this.closing?"/":""}${u(this,Ue)}`,post:`${u(this,xe)?"/":""}>`})}json(){let e=super.json();return Object.assign(e,{closing:this.closing,selfClosing:u(this,xe)}),e}};Rt=new WeakMap,xe=new WeakMap,Ue=new WeakMap});var fs={};ae(fs,{parseHtml:()=>ga});var da,ga,xs=k(()=>{"use strict";wr();hs();da=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,ga=(a,r,e)=>{var s;let{html:t}=r;(s=r.htmlElements)!=null||(r.htmlElements=new Set([...t[0],...t[1],...t[2]]));let n=a.split("<"),i=n.shift();for(let o of n){let l=da.exec(o),p=l==null?void 0:l[2],g=p==null?void 0:p.toLowerCase();if(!l||!r.htmlElements.has(g)){i+=`<${o}`;continue}let[,d,,c="",m,h]=l,{length:f}=e,x=new We(c,"html-attrs",g,r,e),T=x.getAttr("itemprop");if(g==="meta"&&(T===void 0||x.getAttr("content")===void 0)||g==="link"&&(T===void 0||x.getAttr("href")===void 0)){i+=`<${o}`,e.length=f;continue}i+=`\0${e.length}x\x7F${h}`,new zr(p,x,d==="/",m==="/>",r,e)}return i}});var bs,ys=k(()=>{"use strict";ke();bs=(a=0)=>(r,e)=>{var n,Ts;class t extends r{constructor(){super(...arguments);y(this,n)}getAttr(l){return u(this,n,Ts).getAttr(l)}}return n=new WeakSet,Ts=function(){return this.childNodes[a]},Tr(t,r),t}});var Pt,Ln=k(()=>{"use strict";ys();F();P();ft();wr();Pt=class extends bs(1)(v){constructor(r,e,t,n,i=b.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new fe(e,r,"table-syntax",i,s,{}),new We(n,"table-attrs",t,i,s))}}});var be,ar,ot,Fn,ks,st,Rn=k(()=>{"use strict";j();ke();K();F();P();Ln();st=class extends Pt{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);y(this,ot);y(this,be,"");y(this,ar);s&&([mr(this,be)._]=s);let l=new v(t==null?void 0:t.slice(((p=s==null?void 0:s.index)!=null?p:NaN)+u(this,be).length),n,i);l.type="td-inner",l.setAttribute("stage",4),this.insertAt(l)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return I(this,ot,Fn).call(this).subtype}afterBuild(){u(this,be).includes("\0")&&A(this,be,this.buildFromStr(u(this,be),0)),super.afterBuild()}toString(e){let{childNodes:[t,n,i]}=this;return t.toString(e)+n.toString(e)+u(this,be)+i.toString(e)}text(){let{childNodes:[e,t,n]}=this;return e.text()+t.text()+u(this,be)+n.text()}getGaps(e){return e===1?u(this,be).length:0}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new L(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
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,
|
|
24
|
-
|}`,e){let t=this.getAttribute("config"),n=this.getAttribute("accum"),i=e?[r]:b.parse(r,this.getAttribute("include"),2,t).childNodes;we.run(()=>{let s=new
|
|
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,be)}${n.print()}</span>`}json(){let e=super.json();return e.subtype=this.subtype,e}};be=new WeakMap,ar=new WeakMap,ot=new WeakSet,Fn=function(){var t;let{rev:e}=we;return(t=u(this,ar))!=null||A(this,ar,[e,I(this,ot,ks).call(this)]),u(this,ar)[1]},ks=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 V({},I(o=i,ot,Fn).call(o))}});var Bt,Pn=k(()=>{"use strict";j();Ln();Rn();Bt=class extends Pt{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 st&&r.isIndependent()&&!r.firstChild.text().endsWith("+")))}getNthCol(r,e){let t=0;for(let n of this.childNodes.slice(2))if(n instanceof st&&(n.isIndependent()&&(t=+(n.subtype!=="caption")),r-=t,r<0))return n}}});var pa,ua,Bn,Gr,vs=k(()=>{"use strict";j();ke();K();F();Pn();ft();pa=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u,ua=({type:a})=>a==="tr"||a==="table-syntax",Bn=class extends Array{},Gr=class extends Bt{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 L(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;we.run(()=>{let s=new fe(void 0,pa,"table-syntax",t,n,{});super.insertAt(s)}),this.lastChild.replaceChildren(...i)}getLayout(r){let e=this.getAllRows(),{length:t}=e,n=new Bn(...As(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:m}=g;for(o++;s[l];)l++;for(let h=i;h<Math.min(i+c,t);h++)for(let f=l;f<l+m;f++)n[h][f]=d;l+=m}}else if(ua(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 Dr,ws=k(()=>{"use strict";Pn();Dr=class extends Bt{get type(){return"tr"}constructor(r,e,t,n){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,r,"tr",e,t,n,{})}}});var jt,jn=k(()=>{"use strict";Me();jt=class extends se{}});var qt,qn=k(()=>{"use strict";jn();qt=class extends jt{get type(){return"dd"}}});var Cs={};ae(Cs,{parseTable:()=>ma});var ca,Ss,ma,$s=k(()=>{"use strict";P();vs();ws();Rn();qn();ca=a=>a.lastChild.constructor!==v,Ss=(a,r)=>a.type==="td"?r.pop():a,ma=({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=(g,d)=>{if(!d){o+=g;return}let{lastChild:c}=d;if(
|
|
26
|
+
${s.shift()}`,l,p=(g,d)=>{if(!d){o+=g;return}let{lastChild:c}=d;if(ca(d)){let m=new v(g,t,n);m.type="table-inter",m.setAttribute("stage",3),d.insertAt(m)}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),m=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(c);if(m){for(;l&&l.type!=="td";)l=i.pop();let[,S,C,E,q]=m;S&&new qt(S,t,n),p(`
|
|
27
27
|
${d}${S&&`\0${n.length-1}d\x7F`}${C}\0${n.length}b\x7F`,l),i.push(...l?[l]:[],new Gr(E,q,t,n));continue}else if(!l){o+=`
|
|
28
|
-
${g}`;continue}let
|
|
29
|
-
${g}`,l),i.push(l);continue}let[,f,x,T,w]=
|
|
30
|
-
${d}${f}`,!0),p(w,i[i.length-1])}else if(x){l=
|
|
31
|
-
${d}${x}`,w,t,n);i.push(l,S),l.insertAt(S)}else{l=
|
|
32
|
-
${d}${T}`,G=B=>{let re=new at(q,w.slice(E,C==null?void 0:C.index),t,n);return B.insertAt(re),re};for(;C;)G(l),{lastIndex:E}=S,[q]=C,C=S.exec(w);i.push(l,G(l))}}return o.slice(1)}});var Wr,Ss=y(()=>{"use strict";ze();Wr=class extends ae{get type(){return"hr"}}});var Cs,jn,ua,dt,$s=y(()=>{"use strict";Je();F();ze();Cs=[fe()];dt=class extends(ua=ae){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:"__"})}};jn=ue(ua),dt=he(jn,0,"DoubleUnderscoreToken",Cs,dt),ce(jn,1,dt)});var Ns={};le(Ns,{parseHrAndDoubleUnderscore:()=>ca});var ca,Es=y(()=>{"use strict";Ss();$s();xn();ca=({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 Wr(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 dt(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 Ct(h.length,[m,f],t,n),x}),r==="root"||r==="ext-inner"&&e==="poem"?a:a.slice(1)}});var Dr,Is=y(()=>{"use strict";j();J();F();ze();Dr=class extends ae{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(Y(M({},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(Y(M({},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(Y(M({},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 Ls={};le(Ls,{parseQuotes:()=>qn});var qn,_n=y(()=>{"use strict";Is();qn=(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 Dr(t[d],r,e),t[d]=`\0${e.length-1}q\x7F`;return t.join("")}});var Fs={};le(Fs,{parseExternalLinks:()=>On});var On,Mn=y(()=>{"use strict";K();wn();jr();On=(a,r,e,t)=>{var n;return(n=r.regexExternalLinks)!=null||(r.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${r.protocol}|//)${Ee}|\0\d+m\x7F)${Ie}(?=[[\]<>"\t${ke}]|\0\d))([${ke}]*(?![${ke}]))([^\]\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&&(o="",l=s.slice(g.index)+o+l,s=s.slice(0,g.index)),t?(new Re(s,"ext-link-url",r,e),`[\0${p}f\x7F${o}${l}]`):(new Lt(s,o,l,r,e),`\0${p}w\x7F`)})}});var Hr,Rs=y(()=>{"use strict";Qt();Hr=class extends $e{get type(){return"category"}}});var Bs={};le(Bs,{parseLinks:()=>Ps});var ha,Ps,js=y(()=>{"use strict";F();_n();Mn();An();kn();Rs();ha=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Ps=(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)([\s\S]*?[^\]]))?\]\]([\s\S]*)$/u:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]])?)?\]\]([\s\S]*)$/u,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=ha.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 q=n[o],G=q.split("]]");if(G.length>2){E=!0,d+=`[[${G[0]}]]${G[1]}`,c=G.slice(2).join("]]");break}else if(G.length===2)d+=`[[${G[0]}]]${G[1]}`;else{d+=`[[${q}`;break}}if(d=Ps(d,r,e),!E){i+=`[[${p}${g}${d}`;continue}}}else{i+=`[[${h}`;continue}d&&(d=qn(d,r,e));let C=It;f||(!S&&T===6?(d&&(d=On(d,r,e,!0)),C=Nt):!S&&T===14&&(C=Hr)),d===void 0&&g&&(d=""),i+=`\0${e.length}l\x7F${c}`,new C(p,d,r,e,g)}return i}});var zs={};le(zs,{parseMagicLinks:()=>ma});var Ms,qs,_s,Os,ma,Gs=y(()=>{"use strict";K();jr();Ms=String.raw`[${ke}\t]| |�*160;|�*a0;`,qs=`(?:${Ms})+`,_s=`(?:${Ms}|-)`,Os=String.raw`(?:RFC|PMID)${qs}\d+\b|ISBN${qs}(?:97[89]${_s}?)?(?:\d${_s}?){9}[\dx]\b`,ma=(a,r,e)=>{if(!r.regexMagicLinks)try{r.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${r.protocol})(${Ee}${Ie})|${Os})`,"giu")}catch(t){r.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${r.protocol})(${Ee}${Ie})|${Os})`,"giu")}return a.replace(r.regexMagicLinks,(t,n,i)=>{let s=n?t.slice(n.length):t;if(i){let o="",l=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(o=s.slice(l.index),s=s.slice(0,l.index));let p=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,g=p.exec(s);if(g){let d=1;g[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,g.index))&&(d=2),o=s.slice(g.index+d)+o,s=s.slice(0,g.index+d)}return o.length>=i.length?t:(new Re(s,void 0,r,e),`${n}\0${e.length-1}w\x7F${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new Re(s,"magic-link",r,e),`${n}\0${e.length-1}i\x7F`})}});var Us,Ws=y(()=>{"use strict";Us=(a,r)=>a.startsWith(r)?r.length:[...r].findIndex((e,t)=>e!==a[t])});var Vr,Ds=y(()=>{"use strict";Pn();Vr=class extends qt{get type(){return"list"}}});var Hs={};le(Hs,{parseList:()=>fa});var fa,Vs=y(()=>{"use strict";Ws();Ds();Bn();fa=(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=Us(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,re)=>`\0${t.length+re}d\x7F`).join("")+a.slice(i.length);for(let B of g)new Vr(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,q=(B,re)=>(new _t(B,e,t),`${h.slice(0,re)}\0${t.length-1}d\x7F${h.slice(re+B.length)}`),G=B=>{B?w&&w--:w++};for(;T&&c;){let{0:B,index:re}=T;if(B==="-{"){if(!E){let{lastIndex:H}=x;x=/-\{|\}-/gu,x.lastIndex=H}E++}else if(B==="}-"){if(E--,!E){let{lastIndex:H}=x;x=f,x.lastIndex=H}}else if(B.endsWith("x\x7F")){let{name:H,closing:ee,selfClosing:U}=t[Number(B.slice(1,-2))];(!U||m.includes(H))&&G(ee)}else if(B.endsWith("q\x7F")){let{bold:H,italic:ee}=t[Number(B.slice(1,-2))];H&&(G(S),S=!S),ee&&(G(C),C=!C)}else if(w===0){if(B.length>=c)return q(B.slice(0,c),re);c-=B.length,x.lastIndex=re+4+String(t.length).length,h=q(B,re)}T=x.exec(h)}return h}});var Xs,Be,Xr,Qs=y(()=>{"use strict";j();J();F();P();Fe();Xs=new Set(["A","T","R","D","-","H","N"]),Xr=class extends v{constructor(e,t=b.getConfig(),n=[]){super(void 0,t,n,{});k(this,Be);this.append(...e.map(i=>new z(i,"converter-flag",t,n)))}get type(){return"converter-flags"}afterBuild(){A(this,Be,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,Be).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(u(this,Be).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(u(this,Be).filter(d=>Xs.has(d))),o=u(this,Be).filter(d=>!d).length,l=u(this,Be).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&&Xs.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:";"})}};Be=new WeakMap});var Ot,Ks=y(()=>{"use strict";F();P();Fe();Ot=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 z(o,"converter-rule-variant",t,n)),super.insertAt(new z(r.slice(i+1),"converter-rule-to",t,n)),s!==-1&&super.insertAt(new z(r.slice(0,s),"converter-rule-from",t,n),0)):super.insertAt(new z(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 Qr,Js=y(()=>{"use strict";K();F();P();Qs();Ks();Qr=class extends v{get type(){return"converter"}constructor(r,e,t=b.getConfig(),n=[]){super(void 0,t,n),this.append(new Xr(r,t,n));let[i]=e,s=i.includes(":"),o=new Ot(i,s,t,n);s&&o.length===1||!s&&e.length===2&&!oe(e[1]).trim()?this.insertAt(new Ot(e.join(";"),!1,t,n)):this.append(o,...e.slice(1).map(l=>new Ot(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()}|${me(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?"|":""}${Le(e,{sep:";"})}}-</span>`}}});var Ys={};le(Ys,{parseConverter:()=>xa});var xa,Zs=y(()=>{"use strict";Js();xa=(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 Qr(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 Kr={};le(Kr,{Token:()=>v});var ar,ye,_,W,gt,Mt,lr,O,eo,to,ro,no,io,so,oo,ao,lo,go,po,uo,zn,v,P=y(()=>{"use strict";K();Ce();ve();j();F();ui();mi();zn=class zn extends xr{constructor(e,t=b.getConfig(),n=[],i){super();k(this,O);k(this,ar,"plain");k(this,ye,0);k(this,_);k(this,W);k(this,gt);k(this,Mt,!1);k(this,lr);typeof e=="string"&&this.insertAt(e),A(this,_,t),A(this,W,n),n.push(this)}get type(){return u(this,ar)}set type(e){A(this,ar,e)}parseOnce(e=u(this,ye),t=!1){if(e<u(this,ye)||this.length===0||!this.getAttribute("plain"))return this;if(u(this,ye)>=11)return this;switch(e){case 0:if(this.type==="root"){u(this,W).pop();let n=L(this,O,eo).call(this);t&&(t=!n)}A(this,gt,t),L(this,O,to).call(this,t);break;case 1:L(this,O,ro).call(this);break;case 2:L(this,O,no).call(this);break;case 3:L(this,O,io).call(this);break;case 4:L(this,O,so).call(this);break;case 5:L(this,O,oo).call(this);break;case 6:L(this,O,ao).call(this);break;case 7:L(this,O,lo).call(this);break;case 8:L(this,O,go).call(this);break;case 9:L(this,O,po).call(this);break;case 10:L(this,O,uo).call(this)}if(this.type==="root")for(let n of u(this,W))n==null||n.parseOnce(e,t);return hr(this,ye)._++,this}buildFromStr(e,t){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new Ht(i);if(isNaN(i.slice(-1)))return u(this,W)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?n.map(String).join(""):t===1?me(n):n}build(){A(this,ye,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,W))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of u(this,W))e==null||e.afterBuild();A(this,Mt,!0)}parse(e=11,t){for(e=Math.min(e,11);u(this,ye)<e;)this.parseOnce(u(this,ye),t);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===zn;case"config":return u(this,_);case"include":return(t=u(this,gt))!=null?t:!!u(this.getRootNode(),gt);case"accum":return u(this,W);case"built":return u(this,Mt);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":u(this,ye)===0&&this.type==="root"&&u(this,W).shift(),A(this,ye,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let n=typeof e=="string"?new Ht(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,gt),u(this,_),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:
|
|
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
|
-
`))},
|
|
28
|
+
${g}`;continue}let h=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(c);if(!h){p(`
|
|
29
|
+
${g}`,l),i.push(l);continue}let[,f,x,T,w]=h;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=Ss(l,i),l.type==="tr"&&(l=i.pop());let S=new Dr(`
|
|
31
|
+
${d}${x}`,w,t,n);i.push(l,S),l.insertAt(S)}else{l=Ss(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,q=`
|
|
32
|
+
${d}${T}`,z=B=>{let ee=new st(q,w.slice(E,C==null?void 0:C.index),t,n);return B.insertAt(ee),ee};for(;C;)z(l),{lastIndex:E}=S,[q]=C,C=S.exec(w);i.push(l,z(l))}}return o.slice(1)}});var Wr,Ns=k(()=>{"use strict";Me();Wr=class extends se{get type(){return"hr"}}});var Es,On,ha,at,Is=k(()=>{"use strict";Qe();F();Me();Es=[he()];at=class extends(ha=se){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:"__"})}};On=pe(ha),at=ce(On,0,"DoubleUnderscoreToken",Es,at),ue(On,1,at)});var Ls={};ae(Ls,{parseHrAndDoubleUnderscore:()=>fa});var fa,Fs=k(()=>{"use strict";Ns();Is();Tn();fa=({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,m)=>(new Wr(m,t,n),`${c}\0${n.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(d,c)=>{var x;let m=t.sensitiveDoubleUnderscore.has(c),h=c.toLowerCase(),f=t.insensitiveDoubleUnderscore.has(h);return m||f?(new at(c,m,t,n),`\0${n.length-1}${f&&((x=o==null?void 0:o[h])!=null?x:h)==="toc"?"u":"n"}\x7F`):d}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(d,c,m,h,f)=>{let x=`${c}\0${n.length}h\x7F`;return new St(m.length,[h,f],t,n),x}),r==="root"||r==="ext-inner"&&e==="poem"?a:a.slice(1)}});var Ur,Rs=k(()=>{"use strict";j();K();F();Me();Ur=class extends se{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 L(this,r),l=(p,g,d)=>[{desc:"escape",range:[p,g],text:"'".repeat(d)},{desc:"remove",range:[p,g],text:""}];if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){let p=N(this,o,"lonely-apos",i),{startIndex:g,startLine:d,startCol:c}=p,[,{length:m}]=/(?:^|[^'])('+)$/u.exec(e.data),h=r-m;s.push(oe(V({},p),{startIndex:h,endIndex:g,endLine:d,startCol:c-m,endCol:c,suggestions:l(h,g,m)}))}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){let p=N(this,o,"lonely-apos",i),{endIndex:g,endLine:d,endCol:c}=p,[{length:m}]=/^'+/u.exec(t.data),h=g+m;s.push(oe(V({},p),{startIndex:g,endIndex:h,startLine:d,startCol:c,endCol:c+m,suggestions:l(g,h,m)}))}if(n&&this.closest("heading-title")){let p=N(this,o,"bold-header","bold in section header","warning");p.suggestions=[{desc:"remove",range:[r,r+3],text:""}],s.push(p)}return s}json(){let r=super.json();return Object.assign(r,{bold:this.bold,italic:this.italic}),r}}});var Ps={};ae(Ps,{parseQuotes:()=>_n});var _n,Mn=k(()=>{"use strict";Rs();_n=(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 Bs={};ae(Bs,{parseExternalLinks:()=>zn});var zn,Gn=k(()=>{"use strict";Q();Cn();jr();zn=(a,r,e,t)=>{var n;return(n=r.regexExternalLinks)!=null||(r.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${r.protocol}|//)${Ne}|\0\d+m\x7F)${Ee}(?=[[\]<>"\t${ye}]|\0\d))([${ye}]*(?![${ye}]))([^\]\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&&(o="",l=s.slice(g.index)+o+l,s=s.slice(0,g.index)),t?(new Fe(s,"ext-link-url",r,e),`[\0${p}f\x7F${o}${l}]`):(new It(s,o,l,r,e),`\0${p}w\x7F`)})}});var Hr,js=k(()=>{"use strict";Kt();Hr=class extends Ce{get type(){return"category"}}});var Os={};ae(Os,{parseLinks:()=>qs});var xa,qs,_s=k(()=>{"use strict";F();Mn();Gn();Sn();An();js();xa=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,qs=(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)([\s\S]*?[^\]]))?\]\]([\s\S]*)$/u:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]])?)?\]\]([\s\S]*)$/u,n=a.split("[["),i=n.shift();for(let o=0;o<n.length;o++){let l=!1,p,g,d,c,m=n[o],h=t.exec(m);if(h)[,p,g,d,c]=h,c.startsWith("]")&&(d!=null&&d.includes("["))&&(d+="]",c=c.slice(1));else{let E=xa.exec(m);E&&(l=!0,[,p,g,d]=E)}if(p===void 0||r.regexLinks.test(p)||/\0\d+[exhbru]\x7F/u.test(p)){i+=`[[${m}`;continue}let f=p.trim().startsWith(":");if(f&&l){i+=`[[${m}`;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+=`[[${m}`;continue}let E=!1;for(o++;o<n.length;o++){let q=n[o],z=q.split("]]");if(z.length>2){E=!0,d+=`[[${z[0]}]]${z[1]}`,c=z.slice(2).join("]]");break}else if(z.length===2)d+=`[[${z[0]}]]${z[1]}`;else{d+=`[[${q}`;break}}if(d=qs(d,r,e),!E){i+=`[[${p}${g}${d}`;continue}}}else{i+=`[[${m}`;continue}d&&(d=_n(d,r,e));let C=Et;f||(!S&&T===6?(d&&(d=zn(d,r,e,!0)),C=$t):!S&&T===14&&(C=Hr)),d===void 0&&g&&(d=""),i+=`\0${e.length}l\x7F${c}`,new C(p,d,r,e,g)}return i}});var Ws={};ae(Ws,{parseMagicLinks:()=>ba});var Ds,Ms,zs,Gs,ba,Us=k(()=>{"use strict";Q();jr();Ds=String.raw`[${ye}\t]| |�*160;|�*a0;`,Ms=`(?:${Ds})+`,zs=`(?:${Ds}|-)`,Gs=String.raw`(?:RFC|PMID)${Ms}\d+\b|ISBN${Ms}(?:97[89]${zs}?)?(?:\d${zs}?){9}[\dx]\b`,ba=(a,r,e)=>{if(!r.regexMagicLinks)try{r.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${r.protocol})(${Ne}${Ee})|${Gs})`,"giu")}catch(t){r.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${r.protocol})(${Ne}${Ee})|${Gs})`,"giu")}return a.replace(r.regexMagicLinks,(t,n,i)=>{let s=n?t.slice(n.length):t;if(i){let o="",l=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(o=s.slice(l.index),s=s.slice(0,l.index));let p=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,g=p.exec(s);if(g){let d=1;g[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,g.index))&&(d=2),o=s.slice(g.index+d)+o,s=s.slice(0,g.index+d)}return o.length>=i.length?t:(new Fe(s,void 0,r,e),`${n}\0${e.length-1}w\x7F${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new Fe(s,"magic-link",r,e),`${n}\0${e.length-1}i\x7F`})}});var Hs,Vs=k(()=>{"use strict";Hs=(a,r)=>a.startsWith(r)?r.length:[...r].findIndex((e,t)=>e!==a[t])});var Vr,Xs=k(()=>{"use strict";jn();Vr=class extends jt{get type(){return"list"}}});var Qs={};ae(Qs,{parseList:()=>Ta});var Ta,Ks=k(()=>{"use strict";Vs();Xs();qn();Ta=(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=Hs(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 m=s+g.map((B,ee)=>`\0${t.length+ee}d\x7F`).join("")+a.slice(i.length);for(let B of g)new Vr(B,e,t);if(!c)return m;let{html:[h]}=e,f=/:+|-\{|\0\d+[xq]\x7F/gu,x=f,T=x.exec(m),w=0,S=!1,C=!1,E=0,q=(B,ee)=>(new qt(B,e,t),`${m.slice(0,ee)}\0${t.length-1}d\x7F${m.slice(ee+B.length)}`),z=B=>{B?w&&w--:w++};for(;T&&c;){let{0:B,index:ee}=T;if(B==="-{"){if(!E){let{lastIndex:U}=x;x=/-\{|\}-/gu,x.lastIndex=U}E++}else if(B==="}-"){if(E--,!E){let{lastIndex:U}=x;x=f,x.lastIndex=U}}else if(B.endsWith("x\x7F")){let{name:U,closing:Y,selfClosing:G}=t[Number(B.slice(1,-2))];(!G||h.includes(U))&&z(Y)}else if(B.endsWith("q\x7F")){let{bold:U,italic:Y}=t[Number(B.slice(1,-2))];U&&(z(S),S=!S),Y&&(z(C),C=!C)}else if(w===0){if(B.length>=c)return q(B.slice(0,c),ee);c-=B.length,x.lastIndex=ee+4+String(t.length).length,m=q(B,ee)}T=x.exec(m)}return m}});var Js,Pe,Xr,Ys=k(()=>{"use strict";j();K();F();P();Le();Js=new Set(["A","T","R","D","-","H","N"]),Xr=class extends v{constructor(e,t=b.getConfig(),n=[]){super(void 0,t,n,{});y(this,Pe);this.append(...e.map(i=>new M(i,"converter-flag",t,n)))}get type(){return"converter-flags"}afterBuild(){A(this,Pe,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,Pe).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(u(this,Pe).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(u(this,Pe).filter(d=>Js.has(d))),o=u(this,Pe).filter(d=>!d).length,l=u(this,Pe).length-i.size-o,p=super.lint(e,t);if(n.size===l||s.size===l)return p;let g=new L(this,e);for(let[d,c]of this.childNodes.entries()){let m=c.text().trim();if(m&&!n.has(m)&&!i.has(m)&&(n.size>0||!s.has(m))){let h=$(c,g,"no-ignored","invalid conversion flag");n.size===0&&Js.has(m.toUpperCase())?h.fix={range:[h.startIndex,h.endIndex],text:m.toUpperCase(),desc:"uppercase"}:h.suggestions=[{desc:"remove",range:[h.startIndex-(d&&1),h.endIndex],text:""}],p.push(h)}}return p}print(){return super.print({sep:";"})}};Pe=new WeakMap});var Ot,Zs=k(()=>{"use strict";F();P();Le();Ot=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 Qr,eo=k(()=>{"use strict";Q();F();P();Ys();Zs();Qr=class extends v{get type(){return"converter"}constructor(r,e,t=b.getConfig(),n=[]){super(void 0,t,n),this.append(new Xr(r,t,n));let[i]=e,s=i.includes(":"),o=new Ot(i,s,t,n);s&&o.length===1||!s&&e.length===2&&!ie(e[1]).trim()?this.insertAt(new Ot(e.join(";"),!1,t,n)):this.append(o,...e.slice(1).map(l=>new Ot(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()}|${me(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?"|":""}${Ie(e,{sep:";"})}}-</span>`}}});var to={};ae(to,{parseConverter:()=>ya});var ya,ro=k(()=>{"use strict";eo();ya=(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,m=a.slice(d.index+2,g),h=m.indexOf("|"),[f,x]=h===-1?[[],m]:[m.slice(0,h).split(";"),m.slice(h+1)],T=x.replace(/(&[#a-z\d]+);/giu,"$1"),w=T.split(r.regexConverter).map(S=>S.replace(/\x01/gu,";"));new Qr(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 Kr={};ae(Kr,{Token:()=>v});var lr,Te,O,D,lt,_t,dr,_,no,io,so,oo,ao,lo,go,po,uo,co,mo,ho,Dn,v,P=k(()=>{"use strict";Q();ke();j();F();hi();bi();Dn=class Dn extends xr{constructor(e,t=b.getConfig(),n=[],i){super();y(this,_);y(this,lr,"plain");y(this,Te,0);y(this,O);y(this,D);y(this,lt);y(this,_t,!1);y(this,dr);typeof e=="string"&&this.insertAt(e),A(this,O,t),A(this,D,n),n.push(this)}get type(){return u(this,lr)}set type(e){A(this,lr,e)}parseOnce(e=u(this,Te),t=!1){if(e<u(this,Te)||this.length===0||!this.getAttribute("plain"))return this;if(u(this,Te)>=11)return this;switch(e){case 0:if(this.type==="root"){u(this,D).pop();let n=I(this,_,no).call(this);t&&(t=!n)}A(this,lt,t),I(this,_,io).call(this,t);break;case 1:I(this,_,so).call(this);break;case 2:I(this,_,oo).call(this);break;case 3:I(this,_,ao).call(this);break;case 4:I(this,_,lo).call(this);break;case 5:I(this,_,go).call(this);break;case 6:I(this,_,po).call(this);break;case 7:I(this,_,uo).call(this);break;case 8:I(this,_,co).call(this);break;case 9:I(this,_,mo).call(this);break;case 10:I(this,_,ho).call(this)}if(this.type==="root")for(let n of u(this,D))n==null||n.parseOnce(e,t);return mr(this,Te)._++,this}buildFromStr(e,t){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new Xt(i);if(isNaN(i.slice(-1)))return u(this,D)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?n.map(String).join(""):t===1?me(n):n}build(){A(this,Te,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,D))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of u(this,D))e==null||e.afterBuild();A(this,_t,!0)}parse(e=11,t){for(e=Math.min(e,11);u(this,Te)<e;)this.parseOnce(u(this,Te),t);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===Dn;case"config":return u(this,O);case"include":return(t=u(this,lt))!=null?t:!!u(this.getRootNode(),lt);case"accum":return u(this,D);case"built":return u(this,_t);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":u(this,Te)===0&&this.type==="root"&&u(this,D).shift(),A(this,Te,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let n=typeof e=="string"?new Xt(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,lt),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";for(let h of this.querySelectorAll(o)){let f;if(h.type==="category")f=h.name;else{let x=h.getValue();x&&x!==!0&&(f=`#${x}`)}if(f){let x=s.get(f);x?x.add(h):s.set(f,new Set([h]))}}for(let[h,f]of s)if(f.size>1&&!h.startsWith("#mw-customcollapsible-")){let x=!h.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,m=0;for(;d;){let{1:h,index:f}=d,x=(i=d[2])==null?void 0:i.trim();m+=p.slice(c,f).split(`
|
|
33
|
+
`).length-1,c=f,g.push({line:m+(h==="disable-line"?0:1),from:h==="disable"?l.lastIndex:void 0,to:h==="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:h,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(h))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}=we,i=this.getRootNode();return!e&&i.type==="root"&&u(i,_t)?((s=u(this,dr))!=null||A(this,dr,[n,super.toString(!1,t)]),u(this,dr)[1]):super.toString(e,t)}};lr=new WeakMap,Te=new WeakMap,O=new WeakMap,D=new WeakMap,lt=new WeakMap,_t=new WeakMap,dr=new WeakMap,_=new WeakSet,no=function(){let{parseRedirect:e}=(wi(),J(Ai)),t=this.firstChild.toString(),n=e(t,u(this,O),u(this,D));return n&&this.setText(n),!!n},io=function(e){let{parseCommentAndExt:t}=(Zt(),J(ms));this.setText(t(this.firstChild.toString(),u(this,O),u(this,D),e))},so=function(){let{parseBraces:e}=(Ir(),J(Ki)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(t,u(this,O),u(this,D));this.setText(this.type==="root"?n:n.slice(1))},oo=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(xs(),J(fs));this.setText(e(this.firstChild.toString(),u(this,O),u(this,D)))},ao=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=($s(),J(Cs));this.setText(e(this,u(this,O),u(this,D)))},lo=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Fs(),J(Ls));this.setText(e(this,u(this,O),u(this,D)))},go=function(){let{parseLinks:e}=(_s(),J(Os));this.setText(e(this.firstChild.toString(),u(this,O),u(this,D)))},po=function(){var n;if((n=u(this,O).excludes)!=null&&n.includes("quote"))return;let{parseQuotes:e}=(Mn(),J(Ps)),t=this.firstChild.toString().split(`
|
|
34
|
+
`);for(let i=0;i<t.length;i++)t[i]=e(t[i],u(this,O),u(this,D));this.setText(t.join(`
|
|
35
|
+
`))},uo=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("extLink"))return;let{parseExternalLinks:e}=(Gn(),J(Bs));this.setText(e(this.firstChild.toString(),u(this,O),u(this,D)))},co=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("magicLink"))return;let{parseMagicLinks:e}=(Us(),J(Ws));this.setText(e(this.firstChild.toString(),u(this,O),u(this,D)))},mo=function(){var s;if((s=u(this,O).excludes)!=null&&s.includes("list"))return;let{parseList:e}=(Ks(),J(Qs)),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,O),u(this,D));this.setText(t.join(`
|
|
37
|
+
`))},ho=function(){if(u(this,O).variants.length>0){let{parseConverter:e}=(ro(),J(to));this.setText(e(this.firstChild.toString(),u(this,O),u(this,D)))}};v=Dn});var we,Ct,dn,As,Tr,ke=k(()=>{"use strict";we={running:!1,run(a){let{running:r}=this;this.running=!0;try{let{Token:e}=(P(),J(Kr)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=r,t}catch(e){throw this.running=r,e}},rev:0},Ct=a=>r=>r.type===a,dn=(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},As=(a,r)=>new Array(a).fill(void 0).map((e,t)=>r(t)),Tr=(a,r)=>{Object.defineProperty(a,"name",{value:r.name})}});var fo={};ae(fo,{Title:()=>Wn});var gr,pr,Mt,Be,Wn,xo=k(()=>{"use strict";Q();Wn=class{constructor(r,e,t,n,i){y(this,gr);y(this,pr);y(this,Mt);y(this,Be);re(this,"interwiki","");re(this,"valid");re(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=qe(r),this.encoded=l}catch(l){}if(r=Dt(r).replace(/[_ ]+/gu," ").trim(),s)A(this,Mt,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,Mt,l)}let o=r.indexOf("#");if(o!==-1){let l=r.slice(o).trim().slice(1);if(l.includes("%"))try{l=qe(l)}catch(p){}A(this,Be,l.replace(/ /gu,"_")),r=r.slice(0,o).trim()}this.valid=!!(r||this.interwiki||i&&this.ns===0&&u(this,Be)!==void 0)&&Dt(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,pr,t.namespaces)}get ns(){return u(this,Mt)}get fragment(){return u(this,Be)}get main(){return u(this,gr)}set main(r){r=r.replace(/_/gu," ").trim(),A(this,gr,r&&r[0].toUpperCase()+r.slice(1))}get prefix(){let r=u(this,pr)[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,Be)===void 0?"":`#${u(this,Be)}`)}getRedirection(){return[!1,(this.interwiki+(this.interwiki&&":")+this.prefix+this.main).replace(/ /gu,"_")]}setFragment(r){A(this,Be,r)}};gr=new WeakMap,pr=new WeakMap,Mt=new WeakMap,Be=new WeakMap});var zt,bo,ka,b,F=k(()=>{ri();ke();gi();Q();zt={config:rn,i18n:void 0,rules:ti,getConfig(){let{doubleUnderscore:a}=this.config;for(let r=0;r<2;r++)a.length>r+2&&a[r].length===0&&(a[r]=Object.keys(a[r+2]));return oe(V(V({},rn),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=zt.getConfig(),n,i=!1,s=!1){let{Title:o}=(xo(),J(fo)),l;if(n)l=new o(a,r,t,i,s);else{let{Token:p}=(P(),J(Kr));l=we.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 m=d[c];if(m!=null&&m.includes("\0")){let h=g.buildFromStr(m,1);c==="main"?d.main=h:d.setFragment(h)}}return d})}return l},parse(a,r,e=11,t=zt.getConfig()){if(a=si(a),typeof e!="number"){let s=Array.isArray(e)?e:[e];e=Math.max(...s.map(o=>ei[o]||11))}let{Token:n}=(P(),J(Kr));return we.run(()=>{let s=new n(a,t);return s.type="root",s.parse(e,r)})},createLanguageService(a){var n;let r,{LanguageService:e,tasks:t}=r;return(n=t.get(a))!=null?n:new e(a)}},bo={},ka=new Set(["normalizeTitle","parse","createLanguageService"]);for(let a in zt)ka.has(a)||(bo[a]={enumerable:!1});Object.defineProperties(zt,bo);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:zt});b=zt});F();})();
|