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