wikiparser-node 1.3.1-b → 1.3.2-b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,36 +1,36 @@
1
- "use strict";(()=>{var ut=Object.defineProperty;var wi=Object.getOwnPropertyDescriptor;var Ci=Object.getOwnPropertyNames;var Ni=Object.prototype.hasOwnProperty;var Fi=(l,i,e)=>i in l?ut(l,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[i]=e;var b=(l,i)=>()=>(l&&(i=l(l=0)),i);var Ei=(l,i)=>()=>(i||l((i={exports:{}}).exports,i),i.exports),M=(l,i)=>{for(var e in i)ut(l,e,{get:i[e],enumerable:!0})},Li=(l,i,e,t)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of Ci(i))!Ni.call(l,r)&&r!==e&&ut(l,r,{get:()=>i[r],enumerable:!(t=wi(i,r))||t.enumerable});return l};var P=l=>Li(ut({},"__esModule",{value:!0}),l);var f=(l,i,e)=>(Fi(l,typeof i!="symbol"?i+"":i,e),e),sr=(l,i,e)=>{if(!i.has(l))throw TypeError("Cannot "+e)};var u=(l,i,e)=>(sr(l,i,"read from private field"),e?e.call(l):i.get(l)),k=(l,i,e)=>{if(i.has(l))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(l):i.set(l,e)},$=(l,i,e,t)=>(sr(l,i,"write to private field"),t?t.call(l,e):i.set(l,e),e);var ht=(l,i,e,t)=>({set _(r){$(l,i,r,e)},get _(){return u(l,i,t)}}),N=(l,i,e)=>(sr(l,i,"access private method"),e);var tt,or=b(()=>{"use strict";tt={run(l){return l()}}});var Mr=Ei((os,Ii)=>{Ii.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","img"]],namespaces:{},nsid:{file:6,category:14},parserFunction:[{"#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#regex":"regex","#related":"related","#cscore":"cscore"},["!","="],["msg","\u539F\u59CB","raw"],["\u66FF\u4EE3","subst","\u5B89\u5168\u66FF\u4EE3","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:",interwiki:[],img:{},variants:[]}});var _r,ce=b(()=>{"use strict";_r=Mr()});var fe,xe,J,Ur,se,mt,ct,oe,H=b(()=>{"use strict";fe='(?:\\[[\\da-f:.]+\\]|[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD])',xe='(?:[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD]|\\0\\d+[c!~]\\x7F)*',J=l=>l.replace(/\0\d+c\x7F/gu,""),Ur=l=>l.replace(/[\\{}()|.?*+^$[\]]/gu,"\\$&"),se=(l,i="")=>l.map(e=>typeof e=="string"?e:e.text()).join(i),mt=l=>l.replace(/&#(\d+|x[\da-f]+);/giu,(i,e)=>String.fromCodePoint(+`${e.toLowerCase().startsWith("x")?"0":""}${e}`)),ct=l=>l.replace(/\n/gu,"\\n"),oe=(l,i={})=>{let{pre:e="",post:t="",sep:r=""}=i;return`${e}${l.map(n=>n.print()).join(r)}${t}`}});var Dr={};M(Dr,{Title:()=>ar});var ar,Hr=b(()=>{"use strict";H();y();ar=class{constructor(i,e=0,t=h.getConfig(),r=!1,n=!1){f(this,"valid");f(this,"ns");f(this,"fragment");f(this,"encoded",!1);let{nsid:s}=t;if(i=mt(i),r&&i.includes("%"))try{let g=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(i);i=decodeURIComponent(i),this.encoded=g}catch(g){}i=i.replace(/_/gu," ").trim();let o=e;i.startsWith(":")&&(o=0,i=i.slice(1).trim());let a=i.split(":");if(a.length>1){let g=s[a[0].trim().toLowerCase()];g!==void 0&&(o=g,i=a.slice(1).join(":").trim())}this.ns=o;let p=i.indexOf("#");if(p!==-1){let g=i.slice(p+1).trim();this.fragment=g,i=i.slice(0,p).trim()}this.valid=!!(i||n&&this.fragment!==void 0)&&!/\0\d+[eh!+-]\x7F|[<>[\]{}|]|%[\da-f]{2}/iu.test(i)}}});var rt,nt,lr,Re,dr=b(()=>{"use strict";Re=class{constructor(){k(this,nt);f(this,"childNodes",[]);k(this,rt,void 0)}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return u(this,rt)}get nextSibling(){var e;let i=(e=this.parentNode)==null?void 0:e.childNodes;return i&&i[i.indexOf(this)+1]}get previousSibling(){var e;let i=(e=this.parentNode)==null?void 0:e.childNodes;return i&&i[i.indexOf(this)-1]}get offsetHeight(){return N(this,nt,lr).call(this).height}get offsetWidth(){return N(this,nt,lr).call(this).width}getAttribute(i){return i==="padding"?0:i in this?String(this[i]):void 0}setAttribute(i,e){i==="parentNode"?$(this,rt,e):this[i]=e}getRootNode(){let{parentNode:i}=this;for(;i!=null&&i.parentNode;)({parentNode:i}=i);return i!=null?i:this}posFromIndex(i){let e=String(this);if(i>=-e.length&&i<=e.length){let t=e.slice(0,i).split(`
2
- `);return{top:t.length-1,left:t[t.length-1].length}}}getGaps(i){return 0}getRelativeIndex(i){let e,t=(r,n)=>e.slice(0,r).reduce((s,o,a)=>s+String(o).length+n.getGaps(a),0)+n.getAttribute("padding");if(i===void 0){let{parentNode:r}=this;return r?({childNodes:e}=r,t(e.indexOf(this),r)):0}return{childNodes:e}=this,t(i,this)}getAbsoluteIndex(){let{parentNode:i}=this;return i?i.getAbsoluteIndex()+this.getRelativeIndex():0}};rt=new WeakMap,nt=new WeakSet,lr=function(){let i=String(this).split(`
3
- `);return{height:i.length,width:i[i.length-1].length}}});var Vr={};M(Vr,{SyntaxToken:()=>ee});var ee,Ge=b(()=>{"use strict";y();C();ee=class extends x{constructor(i,e,t="plain",r=h.getConfig(),n=[],s){super(i,r,n,s),this.type=t}}});var Pi,ft,Xr=b(()=>{"use strict";H();dr();Pi=new Set(["nowiki","pre","charinsert","score","syntaxhighlight","source","math","chem","ce","graph","mapframe","maplink","quiz","templatedata","timeline"]),ft=class extends Re{get length(){return this.childNodes.length}text(i){return se(this.childNodes,i)}normalize(){let{childNodes:i}=this;for(let e=i.length-1;e>=0;e--){let{type:t,data:r}=i[e],n=i[e-1];t!=="text"||this.getGaps(e-1)||(r===""?i.splice(e,1):(n==null?void 0:n.type)==="text"&&(n.setAttribute("data",n.data+r),i.splice(e,1)))}}removeAt(i){let{childNodes:e}=this,[t]=e.splice(i,1);return t}insertAt(i,e=this.length){let{childNodes:t}=this;return i.setAttribute("parentNode",this),t.splice(e,0,i),i}closest(i){let{parentNode:e}=this,t,r=new Set(i.split(",").map(n=>n.trim()));for(t=n=>r.has(n.type);e;){if(t(e))return e;({parentNode:e}=e)}}append(...i){for(let e of i)this.insertAt(e)}replaceChildren(...i){this.childNodes.length=0,this.append(...i)}setText(i,e=0){let t=this.childNodes[e],{data:r}=t;return t.replaceData(i),r}toString(i,e=""){return this.childNodes.map(t=>t.toString()).join(e)}lint(i=this.getAbsoluteIndex()){let{SyntaxToken:e}=(Ge(),P(Vr));if(this instanceof e||this.constructor.hidden||this.type==="ext-inner"&&Pi.has(this.name))return[];let t=[];for(let r=0,n=i+this.getAttribute("padding");r<this.length;r++){let s=this.childNodes[r];t.push(...s.lint(n)),n+=String(s).length+this.getGaps(r)}return t}print(i={}){var e;return String(this)?`<span class="wpb-${(e=i.class)!=null?e:this.type}">${oe(this.childNodes,i)}</span>`:""}}});var Ri,Gi,qi,xt,Qr,it,Kr=b(()=>{"use strict";y();dr();Ri=/https?[:/]\/+|\{+|\}+|\[{2,}|\[(?![^[]*\])|((?:^|\])[^[]*?)\]+|<\s*\/?([a-z]\w*)/giu,Gi=/\{+|\}+|\[{2,}|\[(?![^[]*\])|((?:^|\])[^[]*?)\]+|<\s*\/?([a-z]\w*)/giu,qi=["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"],it=class extends Re{constructor(e){super();k(this,xt);f(this,"type","text");f(this,"data","");this.data=e}toString(){return this.data}text(){return this.data}lint(e=this.getAbsoluteIndex()){let{data:t,parentNode:r,nextSibling:n,previousSibling:s}=this,{type:o,name:a}=r,p=n==null?void 0:n.type,g=s==null?void 0:s.type,d=o==="free-ext-link"||o==="ext-link-url"||o==="image-parameter"&&a==="link"||o==="attr-value"?Gi:Ri,c=[],{ext:m,html:T}=this.getRootNode().getAttribute("config");if(t.search(d)!==-1){d.lastIndex=0;let A=this.getRootNode(),{top:E,left:O}=A.posFromIndex(e),w=new Set([m,T,qi].flat(2));for(let S=d.exec(t);S;S=d.exec(t)){let[,I,q]=S,{0:F,index:j}=S;if(I&&I!=="]"){let{length:zr}=I;j+=zr,F=F.slice(zr)}let Q=e+j,ve=t.slice(0,j).split(`
4
- `),gt=ve.length+E-1,ne=ve[ve.length-1],Z=ve.length===1?O+ne.length:ne.length,{0:z,length:ie}=F,et=Q+ie,me=String(A),_=me[et],Se=me[Q-1],ir=ie>1&&(z!=="<"||/[\s/>]/u.test(_!=null?_:""))||z==="{"&&(_===z||Se==="-")||z==="}"&&(Se===z||_==="-")||z==="["&&(_===z||o==="ext-link-text"||!t.slice(j+1).trim()&&p==="free-ext-link")||z==="]"&&(Se===z||!t.slice(0,j).trim()&&g==="free-ext-link")?"error":"warning";(z!=="<"||w.has(q.toLowerCase()))&&c.push({message:h.msg('lonely "$1"',z==="h"?F:z),severity:ir,startIndex:Q,endIndex:et,startLine:gt,endLine:gt,startCol:Z,endCol:Z+ie})}return c}return[]}replaceData(e){N(this,xt,Qr).call(this,e)}print(){let e={"&":"amp","<":"lt",">":"gt"};return this.data.replace(/[&<>]/gu,t=>`&${e[t]};`)}};xt=new WeakSet,Qr=function(e){this.setAttribute("data",e)}});var Tt,Zr=b(()=>{"use strict";C();Tt=class extends x{constructor(){super(...arguments);f(this,"type","onlyinclude")}toString(e){return`<onlyinclude>${super.toString()}</onlyinclude>`}getAttribute(e){return e==="padding"?13:e==="plain"||super.getAttribute(e)}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}}});var ae,qe=b(()=>{"use strict";ae=l=>{class i extends l{text(){return""}}return f(i,"hidden",!0),i}});var V,Te=b(()=>{"use strict";y();C();V=class extends x{get innerText(){return this.firstChild.data}constructor(i="",e=h.getConfig(),t=[]){super(i,e,t)}}});var U,$e=b(()=>{"use strict";qe();Te();U=class extends ae(V){constructor(){super(...arguments);f(this,"type","noinclude")}}});var we,st,be,Be,pr=b(()=>{"use strict";y();C();Be=class extends x{constructor(e,t,r,n,s=h.getConfig(),o=[]){super(void 0,s);k(this,we,void 0);k(this,st,void 0);k(this,be,void 0);this.setAttribute("name",e.toLowerCase()),$(this,be,[e,n||e]),$(this,we,n===void 0),$(this,st,n!==""),this.append(t,r);let a=typeof t=="string"?-1:o.indexOf(t);o.splice(a===-1?1/0:a,0,this)}get closed(){return u(this,st)}toString(e){let{firstChild:t,lastChild:r}=this,[n,s]=u(this,be);return u(this,we)?`<${n}${t.toString(e)}/>`:`<${n}${t.toString(e)}>${r.toString(e)}${this.closed?`</${s}>`:""}`}text(){let[e,t]=u(this,be);return u(this,we)?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?u(this,be)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=u(this,be);return super.print(u(this,we)?{pre:`&lt;${e}`,post:"/&gt;"}:{pre:`&lt;${e}`,sep:"&gt;",post:this.closed?`&lt;/${t}&gt;`:""})}};we=new WeakMap,st=new WeakMap,be=new WeakMap});var bt,Jr=b(()=>{"use strict";qe();y();pr();bt=class extends ae(Be){constructor(e,t="",r,n,s=h.getConfig(),o=[]){super(e,t,r!=null?r:"",r===void 0||n!=null?n:"",s,o);f(this,"type","include")}}});var v,L,B=b(()=>{"use strict";y();v=(l,i,e,t="error")=>{let r=l.getRelativeIndex(),{offsetHeight:n,offsetWidth:s,parentNode:o}=l,{top:a,left:p}=o.posFromIndex(r),{start:g}=i,{top:d,left:c}="top"in i?i:l.getRootNode().posFromIndex(g),m=g+r,T=d+a,A=a?p:c+p;return{message:h.msg(e),severity:t,startIndex:m,endIndex:m+String(l).length,startLine:T,endLine:T+n-1,startCol:A,endCol:n===1?A+s:s}},L=(l,i,e,t="error")=>{let{start:r}=i,{offsetHeight:n,offsetWidth:s}=l,{top:o,left:a}="top"in i?i:l.getRootNode().posFromIndex(r);return{message:h.msg(e),severity:t,startIndex:r,endIndex:r+String(l).length,startLine:o,endLine:o+n-1,startCol:a,endCol:n===1?a+s:s}}});var R,pe=b(()=>{"use strict";y();C();R=class extends x{constructor(i,e,t=h.getConfig(),r=[],n){super(i,t,r,n),this.type=e}}});var Bi,ge,Yr,en,tn,rn,gr,nn,kt,sn,Oi,D,le,Oe,on=b(()=>{"use strict";B();H();ce();y();C();pe();Bi=new Set(["id","class","style","lang","dir","title","tabindex","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),ge=new Set(["align"]),Yr=new Set(["cite"]),en=new Set(["cite","datetime"]),tn=new Set(["width"]),rn=new Set(["align","valign","abbr","axis","headers","scope","rowspan","colspan","width","height","bgcolor"]),gr=new Set(["type"]),nn={div:ge,h1:ge,h2:ge,h3:ge,h4:ge,h5:ge,h6:ge,blockquote:Yr,q:Yr,p:ge,br:new Set(["clear"]),pre:tn,ins:en,del:en,ul:gr,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set(["summary","width","border","frame","rules","cellspacing","cellpadding","align","bgcolor"]),caption:ge,tr:new Set(["bgcolor","align","valign"]),td:rn,th:rn,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:tn,rt:new Set(["rbspan"]),data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails","type"]),poem:new Set(["compact","align"]),categorytree:new Set(["align","hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline","align"])},kt=new Set,sn={nowiki:kt,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:kt,inputbox:kt,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:kt,poll:new Set(["id","show-results-before-voting"]),sm2:gr,flashmp3:gr,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"])},Oi=new RegExp("expression|(?:filter|accelerator|-o-link(?:-source)?|-o-replace)\\s*:|(?:url|image(?:-set)?)\\s*\\(|attr\\s*\\([^)]+[\\s,]url","u"),Oe=class extends x{constructor(e,t,r,n="",s,o=[],a=h.getConfig(),p=[]){let g=new R(r,"attr-key",a,p,{}),d;if(r==="title"||t==="img"&&r==="alt")d=new x(s,a,p,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&r==="caption"){let c={...a,excludes:[...a.excludes,"quote","extLink","magicLink","list"]};d=new x(s,c,p,{}),d.type="attr-value",d.setAttribute("stage",5)}else if(t==="choose"&&(r==="before"||r==="after")){let c={...a,excludes:[...a.excludes,"heading","html","table","hr","list"]};d=new x(s,c,p,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new R(s,"attr-value",a,p,{});super(void 0,a,p);k(this,D,void 0);k(this,le,void 0);this.type=e,this.append(g,d),$(this,D,n),$(this,le,[...o]),this.tag=t,this.setAttribute("name",J(r).trim().toLowerCase())}get balanced(){return!u(this,D)||u(this,le)[0]===u(this,le)[1]}afterBuild(){u(this,D).includes("\0")&&$(this,D,this.buildFromStr(u(this,D),"string")),this.parentNode&&this.setAttribute("tag",this.parentNode.name),this.setAttribute("name",this.firstChild.text().trim().toLowerCase())}toString(e){let[t="",r=""]=u(this,le);return u(this,D)?`${super.toString(e,`${u(this,D)}${t}`)}${r}`:this.firstChild.toString(e)}text(){return u(this,D)?`${super.text(`${u(this,D).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return u(this,D)?u(this,D).length+((t=(e=u(this,le)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex()){var c;let t=super.lint(e),{balanced:r,firstChild:n,lastChild:s,type:o,name:a,tag:p}=this,g=this.getValue(),d;if(!r){let m=this.getRootNode();d={start:e,...m.posFromIndex(e)};let T=v(s,d,"unclosed quotes","warning");t.push({...T,startIndex:T.startIndex-1,startCol:T.startCol-1})}return sn[p]&&!sn[p].has(a)||(o==="ext-attr"?p in nn:!/\{\{[^{]+\}\}/u.test(a))&&!((c=nn[p])!=null&&c.has(a))&&!/^(?:xmlns:[\w:.-]+|data-[^:]*)$/u.test(a)&&(p==="meta"||p==="link"||!Bi.has(a))?(d!=null||(d={start:e,...this.getRootNode().posFromIndex(e)}),t.push(v(n,d,"illegal attribute name"))):a==="style"&&typeof g=="string"&&Oi.test(g)?(d!=null||(d={start:e,...this.getRootNode().posFromIndex(e)}),t.push(v(s,d,"insecure style"))):a==="tabindex"&&typeof g=="string"&&g.trim()!=="0"&&(d!=null||(d={start:e,...this.getRootNode().posFromIndex(e)}),t.push(v(s,d,"nonzero tabindex"))),t}getValue(){if(u(this,D)){let e=this.lastChild.text();return u(this,le)[1]?e:e.trim()}return this.type==="ext-attr"||""}print(){let[e="",t=""]=u(this,le);return u(this,D)?super.print({sep:`${u(this,D)}${e}`,post:t}):super.print()}};D=new WeakMap,le=new WeakMap});var an,ji,ke,yt=b(()=>{"use strict";B();H();y();C();pe();on();an=l=>l.slice(0,-1),ji=l=>`${an(l)}-dirty`,ke=class extends x{constructor(i,e,t,r=h.getConfig(),n=[]){if(super(void 0,r,n,{}),this.type=e,this.setAttribute("name",t),i){let s=new RegExp(`([^\\s/](?:(?!\0\\d+~\x7F)[^\\s/=])*)(?:((?:\\s|\0\\d+c\x7F)*(?:=|\0\\d+~\x7F)(?:\\s|\0\\d+c\x7F)*)(?:(["'])(.*?)(\\3|$)|(\\S*)))?`,"gsu"),o="",a=s.exec(i),p=0,g=()=>{o&&(super.insertAt(new R(o,ji(e),r,n,{})),o="")};for(;a;){let{index:d,0:c,1:m,2:T,3:A,4:E,5:O,6:w}=a;if(o+=i.slice(p,d),/^(?:[\w:]|\0\d+[t!~{}+-]\x7F)(?:[\w:.-]|\0\d+[t!~{}+-]\x7F)*$/u.test(J(m).trim())){let S=E!=null?E:w,I=[A,O],q=new Oe(an(e),t,m,T,S,I,r,n);g(),super.insertAt(q)}else o+=c;({lastIndex:p}=s),a=s.exec(i)}o+=i.slice(p),g()}}afterBuild(){if(this.type==="table-attrs"){let{parentNode:i}=this;this.setAttribute("name",(i==null?void 0:i.type)==="td"&&i.subtype==="caption"?"caption":i==null?void 0:i.type)}}getAttrTokens(i){return this.childNodes.filter(e=>e instanceof Oe&&(!i||e.name===i.toLowerCase().trim()))}getAttrToken(i){let e=this.getAttrTokens(i);return e[e.length-1]}getAttr(i){var e;return(e=this.getAttrToken(i))==null?void 0:e.getValue()}lint(i=this.getAbsoluteIndex()){let e=super.lint(i),{parentNode:t,length:r,childNodes:n}=this,s=new Map,o=new Set,a;(t==null?void 0:t.type)==="html"&&t.closing&&this.text().trim()&&(a={start:i,...this.getRootNode().posFromIndex(i)},e.push(L(this,a,"attributes of a closing tag")));for(let p=0;p<r;p++){let g=n[p];if(g instanceof R&&g.text().trim())a!=null||(a={start:i,...this.getRootNode().posFromIndex(i)}),e.push(v(g,a,"containing invalid attribute"));else if(g instanceof Oe){let{name:d}=g;s.has(d)?(o.add(d),s.get(d).push(g)):d!=="class"&&s.set(d,[g])}}if(o.size>0){a!=null||(a={start:i,...this.getRootNode().posFromIndex(i)});for(let p of o)e.push(...s.get(p).map(g=>v(g,a,h.msg("duplicated $1 attribute",p))))}return e}print(){return String(this)?`<span class="wpb-${this.type}">${this.childNodes.map(i=>i.print(i instanceof R&&i.text().trim()?{class:"attr-dirty"}:void 0)).join("")}</span>`:""}}});var ln={};M(ln,{PreToken:()=>ur});var ur,dn=b(()=>{"use strict";ce();y();C();$e();ur=class extends x{constructor(e,t=h.getConfig(),r=[]){if(e){let n="<nowiki>",s="</nowiki>",{length:o}=n,a=e.indexOf(n),p=e.indexOf(s,a+o),g="";for(;a!==-1&&p!==-1;)new U(n,t,r),new U(s,t,r),g+=`${e.slice(0,a)}\0${r.length-1}c\x7F${e.slice(a+o,p)}\0${r.length}c\x7F`,e=e.slice(p+o+1),a=e.indexOf(n),p=e.indexOf(s,a+o);e=`${g}${e}`}super(e,t,r,{});f(this,"type","ext-inner");this.setAttribute("stage",10)}getAttribute(e){return e==="plain"||super.getAttribute(e)}}});var pn={};M(pn,{ParamTagToken:()=>ot});var ot,hr=b(()=>{"use strict";B();y();C();pe();ot=class extends x{constructor(e,t=h.getConfig(),r=[],n={}){super(void 0,t,r,{});f(this,"type","ext-inner");if(e){let s=R;this.append(...e.split(`
1
+ "use strict";(()=>{var ht=Object.defineProperty;var wi=Object.getOwnPropertyDescriptor;var Ci=Object.getOwnPropertyNames;var Ni=Object.prototype.hasOwnProperty;var Fi=(l,i,e)=>i in l?ht(l,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[i]=e;var b=(l,i)=>()=>(l&&(i=l(l=0)),i);var Ei=(l,i)=>()=>(i||l((i={exports:{}}).exports,i),i.exports),z=(l,i)=>{for(var e in i)ht(l,e,{get:i[e],enumerable:!0})},Li=(l,i,e,t)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of Ci(i))!Ni.call(l,r)&&r!==e&&ht(l,r,{get:()=>i[r],enumerable:!(t=wi(i,r))||t.enumerable});return l};var P=l=>Li(ht({},"__esModule",{value:!0}),l);var f=(l,i,e)=>(Fi(l,typeof i!="symbol"?i+"":i,e),e),sr=(l,i,e)=>{if(!i.has(l))throw TypeError("Cannot "+e)};var u=(l,i,e)=>(sr(l,i,"read from private field"),e?e.call(l):i.get(l)),k=(l,i,e)=>{if(i.has(l))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(l):i.set(l,e)},S=(l,i,e,t)=>(sr(l,i,"write to private field"),t?t.call(l,e):i.set(l,e),e);var mt=(l,i,e,t)=>({set _(r){S(l,i,r,e)},get _(){return u(l,i,t)}}),N=(l,i,e)=>(sr(l,i,"access private method"),e);var rt,or=b(()=>{"use strict";rt={run(l){return l()}}});var Ur=Ei((ss,Ii)=>{Ii.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","img"]],namespaces:{},nsid:{file:6,category:14},parserFunction:[{"#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#regex":"regex","#related":"related","#cscore":"cscore"},["!","="],["msg","\u539F\u59CB","raw"],["\u66FF\u4EE3","subst","\u5B89\u5168\u66FF\u4EE3","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:",interwiki:[],img:{},variants:[]}});var Dr,fe=b(()=>{"use strict";Dr=Ur()});var Te,xe,J,Hr,se,ct,ft,oe,D=b(()=>{"use strict";Te='(?:\\[[\\da-f:.]+\\]|[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD])',xe='(?:[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD]|\\0\\d+[c!~]\\x7F)*',J=l=>l.replace(/\0\d+c\x7F/gu,""),Hr=l=>l.replace(/[\\{}()|.?*+^$[\]]/gu,"\\$&"),se=(l,i="")=>l.map(e=>typeof e=="string"?e:e.text()).join(i),ct=l=>l.replace(/&#(\d+|x[\da-f]+);/giu,(i,e)=>String.fromCodePoint(+`${e.toLowerCase().startsWith("x")?"0":""}${e}`)),ft=l=>l.replace(/\n/gu,"\\n"),oe=(l,i={})=>{let{pre:e="",post:t="",sep:r=""}=i;return`${e}${l.map(n=>n.print()).join(r)}${t}`}});var Vr={};z(Vr,{Title:()=>ar});var ar,Xr=b(()=>{"use strict";D();y();ar=class{constructor(i,e=0,t=h.getConfig(),r=!1,n=!1){f(this,"valid");f(this,"ns");f(this,"fragment");f(this,"encoded",!1);let{nsid:s}=t;if(i=ct(i),r&&i.includes("%"))try{let g=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(i);i=decodeURIComponent(i),this.encoded=g}catch(g){}i=i.replace(/_/gu," ").trim();let o=e;i.startsWith(":")&&(o=0,i=i.slice(1).trim());let a=i.split(":");if(a.length>1){let g=s[a[0].trim().toLowerCase()];g!==void 0&&(o=g,i=a.slice(1).join(":").trim())}this.ns=o;let d=i.indexOf("#");if(d!==-1){let g=i.slice(d+1).trim();this.fragment=g,i=i.slice(0,d).trim()}this.valid=!!(i||n&&this.fragment!==void 0)&&!/\0\d+[eh!+-]\x7F|[<>[\]{}|]|%[\da-f]{2}/iu.test(i)}}});var nt,it,lr,qe,dr=b(()=>{"use strict";qe=class{constructor(){k(this,it);f(this,"childNodes",[]);k(this,nt,void 0)}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return u(this,nt)}get nextSibling(){var e;let i=(e=this.parentNode)==null?void 0:e.childNodes;return i&&i[i.indexOf(this)+1]}get previousSibling(){var e;let i=(e=this.parentNode)==null?void 0:e.childNodes;return i&&i[i.indexOf(this)-1]}get offsetHeight(){return N(this,it,lr).call(this).height}get offsetWidth(){return N(this,it,lr).call(this).width}getAttribute(i){return i==="padding"?0:i in this?String(this[i]):void 0}setAttribute(i,e){i==="parentNode"?S(this,nt,e):this[i]=e}getRootNode(){let{parentNode:i}=this;for(;i!=null&&i.parentNode;)({parentNode:i}=i);return i!=null?i:this}posFromIndex(i){let e=String(this);if(i>=-e.length&&i<=e.length){let t=e.slice(0,i).split(`
2
+ `);return{top:t.length-1,left:t[t.length-1].length}}}getGaps(i){return 0}getRelativeIndex(i){let e,t=(r,n)=>e.slice(0,r).reduce((s,o,a)=>s+String(o).length+n.getGaps(a),0)+n.getAttribute("padding");if(i===void 0){let{parentNode:r}=this;return r?({childNodes:e}=r,t(e.indexOf(this),r)):0}return{childNodes:e}=this,t(i,this)}getAbsoluteIndex(){let{parentNode:i}=this;return i?i.getAbsoluteIndex()+this.getRelativeIndex():0}};nt=new WeakMap,it=new WeakSet,lr=function(){let i=String(this).split(`
3
+ `);return{height:i.length,width:i[i.length-1].length}}});var Tt,Qr=b(()=>{"use strict";D();dr();Tt=class extends qe{get length(){return this.childNodes.length}text(i){return se(this.childNodes,i)}normalize(){let{childNodes:i}=this;for(let e=i.length-1;e>=0;e--){let{type:t,data:r}=i[e],n=i[e-1];t!=="text"||this.getGaps(e-1)||(r===""?i.splice(e,1):(n==null?void 0:n.type)==="text"&&(n.setAttribute("data",n.data+r),i.splice(e,1)))}}removeAt(i){let{childNodes:e}=this,[t]=e.splice(i,1);return t}insertAt(i,e=this.length){let{childNodes:t}=this;return i.setAttribute("parentNode",this),t.splice(e,0,i),i}closest(i){let{parentNode:e}=this,t,r=new Set(i.split(",").map(n=>n.trim()));for(t=n=>r.has(n.type);e;){if(t(e))return e;({parentNode:e}=e)}}append(...i){for(let e of i)this.insertAt(e)}replaceChildren(...i){this.childNodes.length=0,this.append(...i)}setText(i,e=0){let t=this.childNodes[e],{data:r}=t;return t.replaceData(i),r}toString(i,e=""){return this.childNodes.map(t=>t.toString()).join(e)}lint(i=this.getAbsoluteIndex()){let e=[];for(let t=0,r=i+this.getAttribute("padding");t<this.length;t++){let n=this.childNodes[t];e.push(...n.lint(r)),r+=String(n).length+this.getGaps(t)}return e}print(i={}){var e;return String(this)?`<span class="wpb-${(e=i.class)!=null?e:this.type}">${oe(this.childNodes,i)}</span>`:""}}});var v,E,R=b(()=>{"use strict";y();v=(l,i,e,t="error")=>{let r=l.getRelativeIndex(),{offsetHeight:n,offsetWidth:s,parentNode:o}=l,{top:a,left:d}=o.posFromIndex(r),{start:g}=i,{top:p,left:c}="top"in i?i:l.getRootNode().posFromIndex(g),m=g+r,x=p+a,A=a?d:c+d;return{message:h.msg(e),severity:t,startIndex:m,endIndex:m+String(l).length,startLine:x,endLine:x+n-1,startCol:A,endCol:n===1?A+s:s}},E=(l,i,e,t="error")=>{let{start:r}=i,{offsetHeight:n,offsetWidth:s}=l,{top:o,left:a}="top"in i?i:l.getRootNode().posFromIndex(r);return{message:h.msg(e),severity:t,startIndex:r,endIndex:r+String(l).length,startLine:o,endLine:o+n-1,startCol:a,endCol:n===1?a+s:s}}});var H,be=b(()=>{"use strict";y();C();H=class extends T{get innerText(){return this.firstChild.data}constructor(i="",e=h.getConfig(),t=[]){super(i,e,t)}}});var gr={};z(gr,{NowikiToken:()=>pr});var pr,ur=b(()=>{"use strict";R();y();be();pr=class extends H{constructor(){super(...arguments);f(this,"type","ext-inner")}lint(e=this.getAbsoluteIndex()){let{name:t,firstChild:{data:r}}=this;return(t==="templatestyles"||t==="section")&&r?[E(this,{start:e},h.msg("nothing should be in <$1>",t))]:super.lint(e)}}});var Pi,Ri,Gi,xt,Kr,st,Zr=b(()=>{"use strict";y();dr();Pi=/<\s*\/?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*\])|((?:^|\])[^[]*?)\]+|https?[:/]\/+/giu,Ri=/<\s*\/?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*\])|((?:^|\])[^[]*?)\]+/giu,Gi=["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"],st=class extends qe{constructor(e){super();k(this,xt);f(this,"type","text");f(this,"data","");this.data=e}toString(){return this.data}text(){return this.data}lint(e=this.getAbsoluteIndex()){let{data:t,parentNode:r,nextSibling:n,previousSibling:s}=this,{NowikiToken:o}=(ur(),P(gr)),{type:a,name:d}=r,g=n==null?void 0:n.type,p=s==null?void 0:s.type,c;a==="ext-inner"&&(d==="pre"||r instanceof o)?c=new RegExp(`<\\s*\\/?(${d})\\b`,"giu"):a==="free-ext-link"||a==="ext-link-url"||a==="image-parameter"&&d==="link"||a==="attr-value"?c=Ri:c=Pi;let m=[],{ext:x,html:A}=this.getRootNode().getAttribute("config");if(t.search(c)!==-1){c.lastIndex=0;let F=this.getRootNode(),{top:O,left:w}=F.posFromIndex(e),$=new Set(["onlyinclude","noinclude","includeonly",x,A,Gi].flat(2));for(let I=c.exec(t);I;I=c.exec(t)){let[,B,L]=I,{0:j,index:V}=I;if(L&&L!=="]"){let{length:_r}=L;V+=_r,j=j.slice(_r)}let Pe=e+V,Re=t.slice(0,V).split(`
4
+ `),ne=Re.length+O-1,Z=Re[Re.length-1],ee=Re.length===1?w+Z.length:Z.length,{0:M,length:Ge}=j,ce=Pe+Ge,X=String(F),ie=X[ce],tt=X[Pe-1],$i=Ge>1&&(M!=="<"||/[\s/>]/u.test(ie!=null?ie:""))||M==="{"&&(ie===M||tt==="-")||M==="}"&&(tt===M||ie==="-")||M==="["&&(ie===M||a==="ext-link-text"||!t.slice(V+1).trim()&&g==="free-ext-link")||M==="]"&&(tt===M||!t.slice(0,V).trim()&&p==="free-ext-link")?"error":"warning";(M!=="<"||$.has(B.toLowerCase()))&&m.push({message:h.msg('lonely "$1"',M==="h"?j:M),severity:$i,startIndex:Pe,endIndex:ce,startLine:ne,endLine:ne,startCol:ee,endCol:ee+Ge})}return m}return[]}replaceData(e){N(this,xt,Kr).call(this,e)}print(){let e={"&":"amp","<":"lt",">":"gt"};return this.data.replace(/[&<>]/gu,t=>`&${e[t]};`)}};xt=new WeakSet,Kr=function(e){this.setAttribute("data",e)}});var bt,Jr=b(()=>{"use strict";C();bt=class extends T{constructor(){super(...arguments);f(this,"type","onlyinclude")}toString(e){return`<onlyinclude>${super.toString()}</onlyinclude>`}getAttribute(e){return e==="padding"?13:e==="plain"||super.getAttribute(e)}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}}});var ae,Be=b(()=>{"use strict";ae=l=>{class i extends l{text(){return""}lint(){return[]}}return f(i,"hidden",!0),i}});var _,Se=b(()=>{"use strict";Be();be();_=class extends ae(H){constructor(){super(...arguments);f(this,"type","noinclude")}}});var $e,ot,ke,Oe,hr=b(()=>{"use strict";y();C();Oe=class extends T{constructor(e,t,r,n,s=h.getConfig(),o=[]){super(void 0,s);k(this,$e,void 0);k(this,ot,void 0);k(this,ke,void 0);this.setAttribute("name",e.toLowerCase()),S(this,ke,[e,n||e]),S(this,$e,n===void 0),S(this,ot,n!==""),this.append(t,r);let a=typeof t=="string"?-1:o.indexOf(t);o.splice(a===-1?1/0:a,0,this)}get closed(){return u(this,ot)}toString(e){let{firstChild:t,lastChild:r}=this,[n,s]=u(this,ke);return u(this,$e)?`<${n}${t.toString(e)}/>`:`<${n}${t.toString(e)}>${r.toString(e)}${this.closed?`</${s}>`:""}`}text(){let[e,t]=u(this,ke);return u(this,$e)?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?u(this,ke)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=u(this,ke);return super.print(u(this,$e)?{pre:`&lt;${e}`,post:"/&gt;"}:{pre:`&lt;${e}`,sep:"&gt;",post:this.closed?`&lt;/${t}&gt;`:""})}};$e=new WeakMap,ot=new WeakMap,ke=new WeakMap});var kt,Yr=b(()=>{"use strict";R();Be();y();hr();kt=class extends ae(Oe){constructor(e,t="",r,n,s=h.getConfig(),o=[]){super(e,t,r!=null?r:"",r===void 0||n!=null?n:"",s,o);f(this,"type","include")}lint(e=this.getAbsoluteIndex()){return this.closed?[]:[E(this,{start:e},h.msg("unclosed $1",`<${this.name}>`))]}}});var G,ge=b(()=>{"use strict";y();C();G=class extends T{constructor(i,e,t=h.getConfig(),r=[],n){super(i,t,r,n),this.type=e}}});var qi,ue,en,tn,rn,nn,mr,sn,yt,on,Bi,U,le,je,an=b(()=>{"use strict";R();D();fe();y();C();ge();qi=new Set(["id","class","style","lang","dir","title","tabindex","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),ue=new Set(["align"]),en=new Set(["cite"]),tn=new Set(["cite","datetime"]),rn=new Set(["width"]),nn=new Set(["align","valign","abbr","axis","headers","scope","rowspan","colspan","width","height","bgcolor"]),mr=new Set(["type"]),sn={div:ue,h1:ue,h2:ue,h3:ue,h4:ue,h5:ue,h6:ue,blockquote:en,q:en,p:ue,br:new Set(["clear"]),pre:rn,ins:tn,del:tn,ul:mr,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set(["summary","width","border","frame","rules","cellspacing","cellpadding","align","bgcolor"]),caption:ue,tr:new Set(["bgcolor","align","valign"]),td:nn,th:nn,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:rn,rt:new Set(["rbspan"]),data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails","type"]),poem:new Set(["compact","align"]),categorytree:new Set(["align","hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline","align"])},yt=new Set,on={nowiki:yt,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:yt,inputbox:yt,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:yt,poll:new Set(["id","show-results-before-voting"]),sm2:mr,flashmp3:mr,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"])},Bi=new RegExp("expression|(?:filter|accelerator|-o-link(?:-source)?|-o-replace)\\s*:|(?:url|image(?:-set)?)\\s*\\(|attr\\s*\\([^)]+[\\s,]url","u"),je=class extends T{constructor(e,t,r,n="",s,o=[],a=h.getConfig(),d=[]){let g=new G(r,"attr-key",a,d,{}),p;if(r==="title"||t==="img"&&r==="alt")p=new T(s,a,d,{}),p.type="attr-value",p.setAttribute("stage",10);else if(t==="gallery"&&r==="caption"){let c={...a,excludes:[...a.excludes,"quote","extLink","magicLink","list"]};p=new T(s,c,d,{}),p.type="attr-value",p.setAttribute("stage",5)}else if(t==="choose"&&(r==="before"||r==="after")){let c={...a,excludes:[...a.excludes,"heading","html","table","hr","list"]};p=new T(s,c,d,{}),p.type="attr-value",p.setAttribute("stage",1)}else p=new G(s,"attr-value",a,d,{});super(void 0,a,d);k(this,U,void 0);k(this,le,void 0);this.type=e,this.append(g,p),S(this,U,n),S(this,le,[...o]),this.tag=t,this.setAttribute("name",J(r).trim().toLowerCase())}get balanced(){return!u(this,U)||u(this,le)[0]===u(this,le)[1]}afterBuild(){u(this,U).includes("\0")&&S(this,U,this.buildFromStr(u(this,U),"string")),this.parentNode&&this.setAttribute("tag",this.parentNode.name),this.setAttribute("name",this.firstChild.text().trim().toLowerCase())}toString(e){let[t="",r=""]=u(this,le);return u(this,U)?`${super.toString(e,`${u(this,U)}${t}`)}${r}`:this.firstChild.toString(e)}text(){return u(this,U)?`${super.text(`${u(this,U).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return u(this,U)?u(this,U).length+((t=(e=u(this,le)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex()){var c;let t=super.lint(e),{balanced:r,firstChild:n,lastChild:s,type:o,name:a,tag:d}=this,g=this.getValue(),p;if(!r){let m=this.getRootNode();p={start:e,...m.posFromIndex(e)};let x=v(s,p,h.msg("unclosed $1","quotes"),"warning");t.push({...x,startIndex:x.startIndex-1,startCol:x.startCol-1})}return on[d]&&!on[d].has(a)||(o==="ext-attr"?d in sn:!/\{\{[^{]+\}\}/u.test(a))&&!((c=sn[d])!=null&&c.has(a))&&!/^(?:xmlns:[\w:.-]+|data-[^:]*)$/u.test(a)&&(d==="meta"||d==="link"||!qi.has(a))?(p!=null||(p={start:e,...this.getRootNode().posFromIndex(e)}),t.push(v(n,p,"illegal attribute name"))):a==="style"&&typeof g=="string"&&Bi.test(g)?(p!=null||(p={start:e,...this.getRootNode().posFromIndex(e)}),t.push(v(s,p,"insecure style"))):a==="tabindex"&&typeof g=="string"&&g.trim()!=="0"&&(p!=null||(p={start:e,...this.getRootNode().posFromIndex(e)}),t.push(v(s,p,"nonzero tabindex"))),t}getValue(){if(u(this,U)){let e=this.lastChild.text();return u(this,le)[1]?e:e.trim()}return this.type==="ext-attr"||""}print(){let[e="",t=""]=u(this,le);return u(this,U)?super.print({sep:`${u(this,U)}${e}`,post:t}):super.print()}};U=new WeakMap,le=new WeakMap});var ln,Oi,ye,At=b(()=>{"use strict";R();D();y();C();ge();an();ln=l=>l.slice(0,-1),Oi=l=>`${ln(l)}-dirty`,ye=class extends T{constructor(i,e,t,r=h.getConfig(),n=[]){if(super(void 0,r,n,{}),this.type=e,this.setAttribute("name",t),i){let s=new RegExp(`([^\\s/](?:(?!\0\\d+~\x7F)[^\\s/=])*)(?:((?:\\s|\0\\d+c\x7F)*(?:=|\0\\d+~\x7F)(?:\\s|\0\\d+c\x7F)*)(?:(["'])(.*?)(\\3|$)|(\\S*)))?`,"gsu"),o="",a=s.exec(i),d=0,g=()=>{o&&(super.insertAt(new G(o,Oi(e),r,n,{})),o="")};for(;a;){let{index:p,0:c,1:m,2:x,3:A,4:F,5:O,6:w}=a;if(o+=i.slice(d,p),/^(?:[\w:]|\0\d+[t!~{}+-]\x7F)(?:[\w:.-]|\0\d+[t!~{}+-]\x7F)*$/u.test(J(m).trim())){let $=F!=null?F:w,I=[A,O],B=new je(ln(e),t,m,x,$,I,r,n);g(),super.insertAt(B)}else o+=c;({lastIndex:d}=s),a=s.exec(i)}o+=i.slice(d),g()}}afterBuild(){if(this.type==="table-attrs"){let{parentNode:i}=this;this.setAttribute("name",(i==null?void 0:i.type)==="td"&&i.subtype==="caption"?"caption":i==null?void 0:i.type)}}getAttrTokens(i){return this.childNodes.filter(e=>e instanceof je&&(!i||e.name===i.toLowerCase().trim()))}getAttrToken(i){let e=this.getAttrTokens(i);return e[e.length-1]}getAttr(i){var e;return(e=this.getAttrToken(i))==null?void 0:e.getValue()}lint(i=this.getAbsoluteIndex()){let e=super.lint(i),{parentNode:t,length:r,childNodes:n}=this,s=new Map,o=new Set,a;(t==null?void 0:t.type)==="html"&&t.closing&&this.text().trim()&&(a={start:i,...this.getRootNode().posFromIndex(i)},e.push(E(this,a,"attributes of a closing tag")));for(let d=0;d<r;d++){let g=n[d];if(g instanceof G&&g.text().trim())a!=null||(a={start:i,...this.getRootNode().posFromIndex(i)}),e.push(v(g,a,"containing invalid attribute"));else if(g instanceof je){let{name:p}=g;s.has(p)?(o.add(p),s.get(p).push(g)):p!=="class"&&s.set(p,[g])}}if(o.size>0){a!=null||(a={start:i,...this.getRootNode().posFromIndex(i)});for(let d of o)e.push(...s.get(d).map(g=>v(g,a,h.msg("duplicated $1 attribute",d))))}return e}print(){return String(this)?`<span class="wpb-${this.type}">${this.childNodes.map(i=>i.print(i instanceof G&&i.text().trim()?{class:"attr-dirty"}:void 0)).join("")}</span>`:""}}});var dn={};z(dn,{PreToken:()=>cr});var cr,pn=b(()=>{"use strict";fe();y();C();Se();cr=class extends T{constructor(e,t=h.getConfig(),r=[]){if(e){let n="<nowiki>",s="</nowiki>",{length:o}=n,a=e.indexOf(n),d=e.indexOf(s,a+o),g="";for(;a!==-1&&d!==-1;)new _(n,t,r),new _(s,t,r),g+=`${e.slice(0,a)}\0${r.length-1}c\x7F${e.slice(a+o,d)}\0${r.length}c\x7F`,e=e.slice(d+o+1),a=e.indexOf(n),d=e.indexOf(s,a+o);e=`${g}${e}`}super(e,t,r,{});f(this,"type","ext-inner");this.setAttribute("stage",10)}getAttribute(e){return e==="plain"||super.getAttribute(e)}}});var gn={};z(gn,{ParamTagToken:()=>at});var at,fr=b(()=>{"use strict";R();y();C();ge();at=class extends T{constructor(e,t=h.getConfig(),r=[],n={}){super(void 0,t,r,{});f(this,"type","ext-inner");if(e){let s=G;this.append(...e.split(`
5
5
  `).map(o=>new s(o,"param-line",t,r,{})))}}toString(e){return super.toString(e,`
6
6
  `)}text(){return super.text(`
7
7
  `)}getGaps(){return 1}lint(e=this.getAbsoluteIndex()){let t;return this.childNodes.filter(r=>{let{childNodes:n}=r,s=n.findIndex(({type:a})=>a!=="text"),o=(s>=0?n.slice(0,s).map(String).join(""):String(r)).trim();return o&&!(s>=0?/^[a-z]+(?:\[\])?\s*(?:=|$)/iu:/^[a-z]+(?:\[\])?\s*=/iu).test(o)}).map(r=>(t!=null||(t={start:e,...this.getRootNode().posFromIndex(e)}),v(r,t,h.msg("invalid parameter of $1",this.name))))}print(){return super.print({sep:`
8
- `})}}});var at,je,At,We,mr=b(()=>{"use strict";B();y();C();Ge();We=class extends x{constructor(e,t,r=h.getConfig(),n=[]){super(void 0,r,n);k(this,je);f(this,"type","heading");k(this,at,void 0);$(this,at,e);let s=new x(t[0],r,n);s.type="heading-title",s.setAttribute("stage",2);let o=new ee(t[1],/^[^\S\n]*$/u,"heading-trail",r,n,{});this.append(s,o)}get level(){return u(this,at)}toString(e){let t=u(this,je,At);return`${t}${this.firstChild.toString()}${t}${this.lastChild.toString()}`}text(){let e=u(this,je,At);return`${e}${this.firstChild.text()}${e}`}getAttribute(e){return e==="padding"?super.getAttribute("padding")+this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex()){let t=super.lint(e),{firstChild:r}=this,n=String(r),s;return this.level===1&&(s=v(r,{start:e},"<h1>"),t.push(s)),(n.startsWith("=")||n.endsWith("="))&&(s!=null||(s=v(r,{start:e},"")),t.push({...s,message:h.msg('unbalanced "=" in a section header')})),this.closest("html-attrs, table-attrs")&&t.push({...L(this,{start:e},""),message:h.msg("section header in a HTML tag")}),t}print(){let e=u(this,je,At);return super.print({pre:e,sep:e})}};at=new WeakMap,je=new WeakSet,At=function(){return"=".repeat(this.level)}});var Wi,vt,gn=b(()=>{"use strict";H();B();y();C();Wi=l=>l.toString(new Set(["comment","noinclude","include"])).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),vt=class extends x{constructor(e,t,r=h.getConfig(),n=[]){super(void 0,r,n);f(this,"type","parameter");let s=new x(typeof e=="number"?void 0:e,r,n,{}),o=new x(t,r,n);s.type="parameter-key",o.type="parameter-value",o.setAttribute("stage",2),this.append(s,o)}get anon(){return this.firstChild.length===0}afterBuild(){if(!this.anon){let{parentNode:e,firstChild:t}=this,r=Wi(t);this.setAttribute("name",r),e&&e.getArgs(r,!1,!1).add(this)}}toString(e){return this.anon?this.lastChild.toString(e):super.toString(e,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(e=this.getAbsoluteIndex()){var s;let t=super.lint(e),{firstChild:r}=this,n=(s=new RegExp(`https?://${fe}${xe}$`,"iu").exec(r.toString(new Set(["comment","noinclude","include"]))))==null?void 0:s[0];if(n&&new URL(n).search){let o=v(r,{start:e},"unescaped query string in an anonymous parameter");t.push({...o,startIndex:o.endIndex,endIndex:o.endIndex+1,startLine:o.endLine,startCol:o.endCol,endCol:o.endCol+1})}return t}print(){return super.print({sep:this.anon?"":"="})}}});var Ce,Ne,$t,un,wt,hn,St,mn=b(()=>{"use strict";H();B();y();C();gn();pe();Ge();St=class extends x{constructor(e,t,r=h.getConfig(),n=[]){var d,c;super(void 0,r,n,{});k(this,$t);k(this,wt);f(this,"type","template");f(this,"modifier","");k(this,Ce,!1);k(this,Ne,new Map);let{parserFunction:[s,o]}=r,a=(d=/^(?:\s|\0\d+c\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:d[0];if(a)this.setAttribute("modifier",a),e=e.slice(a.length);else if(e.includes(":")){let[m,...T]=e.split(":"),[A]=/^(?:\s|\0\d+c\x7F)*/u.exec((c=T[0])!=null?c:"");this.setModifier(`${m}:${A}`)&&(e=T.join(":").slice(A.length))}if(e.includes(":")||t.length===0&&!u(this,Ce)){let[m,...T]=e.split(":"),A=J(m),E=A.trim(),O=o.includes(E),w=s[E.toLowerCase()];if(!(T.length>0&&/\s$/u.test(A))&&(O||w)){this.setAttribute("name",w!=null?w:E.toLowerCase()),this.type="magic-word";let S=new RegExp(`^\\s*${E}\\s*$`,O?"u":"iu"),I=new ee(m,S,"magic-word-name",r,n,{});if(super.insertAt(I),T.length>0&&t.unshift([T.join(":")]),this.name==="invoke")for(let q=0;q<2;q++){let F=t.shift();if(!F)break;let j=new R(F.join("="),`invoke-${q?"function":"module"}`,r,n);super.insertAt(j)}}}if(this.type==="template"){let m=J(mt(e)).split("#")[0].trim();if(!m||/\0\d+[eh!+-]\x7F|[<>[\]{}\n]|%[\da-f]{2}/u.test(m))throw n.pop(),new SyntaxError(`\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A${ct(m)}`);let T=new R(e,"template-name",r,n,{});super.insertAt(T)}let p=this.isTemplate(),g=1;for(let m=0;m<t.length;m++){let T=t[m];!p&&!(this.name==="switch"&&m>0)&&(T[0]=T.join("="),T.length=1),T.length===1&&(T.unshift(g),g++),this.insertAt(new vt(...T,r,n))}}setModifier(e){let{parserFunction:[,,t,r]}=this.getAttribute("config"),n=J(e).trim();if(e&&!n.endsWith(":"))return!1;let s=n.slice(0,-1).toLowerCase(),o=t.includes(s),a=r.includes(s);return u(this,Ce)&&o||!u(this,Ce)&&(a||e==="")||this.length>1&&(o||a||e==="")?(this.setAttribute("modifier",e),$(this,Ce,o),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,"string"))}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:n,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${n}${s==="magic-word"?`${r.text()}${t===1?"":":"}${se(e.slice(1),"|")}`:super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;default:return super.getAttribute(e)}}getGaps(){return 1}lint(e=this.getAbsoluteIndex()){let t=super.lint(e),{type:r,childNodes:n,length:s}=this,o;if(!this.isTemplate())return t;let a=N(this,$t,un).call(this);if(a)a.fragment!==void 0&&(o={start:e,...this.getRootNode().posFromIndex(e)},t.push(v(n[r==="template"?0:1],o,"useless fragment")));else return o={start:e,...this.getRootNode().posFromIndex(e)},t.push(L(this,o,"missing module name")),t;if(a.valid||(o!=null||(o={start:e,...this.getRootNode().posFromIndex(e)}),t.push(v(n[1],o,"illegal module name"))),r==="magic-word"&&s===2)return o!=null||(o={start:e,...this.getRootNode().posFromIndex(e)}),t.push(L(this,o,"missing module function")),t;let p=this.getDuplicatedArgs();return p.length>0&&(o!=null||(o={start:e,...this.getRootNode().posFromIndex(e)}),t.push(...p.flatMap(([,g])=>g).map(g=>v(g,o,"duplicated parameter")))),t}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?N(this,wt,hn).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(e=>e.type==="parameter")}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t=!1,r=!0){let n=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return u(this,Ne).has(n)?s=u(this,Ne).get(n):(s=new Set(this.getAllArgs().filter(({name:o})=>n===o)),u(this,Ne).set(n,s)),s}getDuplicatedArgs(){return this.isTemplate()?[...u(this,Ne)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]]):[]}getPossibleValues(){let{type:e,name:t,childNodes:r,constructor:{name:n}}=this;if(e==="template")throw new Error(`${n}.getPossibleValues \u65B9\u6CD5\u4EC5\u4F9B\u7279\u5B9A\u9B54\u672F\u5B57\u4F7F\u7528\uFF01`);let s;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":s=2;break;case"ifeq":s=3;break;default:throw new Error(`${n}.getPossibleValues \u65B9\u6CD5\u4EC5\u4F9B\u7279\u5B9A\u9B54\u672F\u5B57\u4F7F\u7528\uFF01`)}let o=r.slice(s,s+2).map(({childNodes:[,a]})=>a);for(let a=0;a<o.length;){let{length:p,0:g}=o[a].childNodes.filter(d=>d.text().trim());if(p===0)o.splice(a,1);else if(p>1||g.type!=="magic-word")a++;else try{let d=g.getPossibleValues();o.splice(a,1,...d),a+=d.length}catch(d){a++}}return o}print(){let{childNodes:e,length:t,firstChild:r,modifier:n,type:s}=this;return`<span class="wpb-${s}">{{${n}${s==="magic-word"?`${r.print()}${t===1?"":":"}${oe(e.slice(1),{sep:"|"})}`:oe(e,{sep:"|"})}}}</span>`}};Ce=new WeakMap,Ne=new WeakMap,$t=new WeakSet,un=function(){let e=this.type==="template",t=this.childNodes[e?0:1];return t&&this.normalizeTitle(t.text(),e?10:828)},wt=new WeakSet,hn=function(e){let t=this.getAnonArgs(),r=typeof e!="number";for(let n=r?t.indexOf(e):e-1;n<t.length;n++){let s=t[n],{name:o}=s,a=String(n+1);o!==a&&(s.setAttribute("name",a),this.getArgs(a,!1,!1).add(s))}}});var Ct,cn=b(()=>{"use strict";qe();C();Ct=class extends ae(x){constructor(){super(...arguments);f(this,"type","hidden")}}});var Nt,fn=b(()=>{"use strict";H();B();y();C();pe();cn();Nt=class extends x{constructor(e,t=h.getConfig(),r=[]){super(void 0,t,r,{});f(this,"type","arg");for(let n=0;n<e.length;n++)if(n===0){let s=new R(e[n],"arg-name",t,r,{});super.insertAt(s)}else if(n>1){let s=new Ct(e[n],t,r,{});super.insertAt(s)}else{let s=new x(e[n],t,r);s.type="arg-default",s.setAttribute("stage",2),super.insertAt(s)}}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`{{{${se(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}lint(e=this.getAbsoluteIndex()){if(!this.getAttribute("include"))return[L(this,{start:e},"unexpected template argument")];let{childNodes:[t,r,...n]}=this,s=t.lint(e+3);if(r&&s.push(...r.lint(e+4+String(t).length)),n.length>0){let o={start:e,...this.getRootNode().posFromIndex(e)};s.push(...n.map(a=>{let p=v(a,o,"invisible content inside triple braces");return{...p,startIndex:p.startIndex-1,startCol:p.startCol-1}}))}return s}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}}});var xn={};M(xn,{parseBraces:()=>cr});var cr,fr=b(()=>{"use strict";H();y();mr();mn();fn();cr=(l,i=h.getConfig(),e=[])=>{var c,m,T,A,E,O;let t=`${(c=i.excludes)!=null&&c.includes("heading")?"":"^(\0\\d+c\x7F)*={1,6}|"}\\[\\[|\\{{2,}|-\\{(?!\\{)`,{parserFunction:[,,,r]}=i,n=[],s={"=":`
9
- `,"{":"\\}{2,}|\\|","-":"\\}-","[":"\\]\\]"},o=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"]]),a=new RegExp(t,"gmu"),p=a.exec(l),g=l.includes("}}"),d;for(;p||d!==void 0&&d<=l.length&&((T=(m=n[n.length-1])==null?void 0:m[0])!=null&&T.startsWith("="));){if(p!=null&&p[1]){let[,{length:Z}]=p;p[0]=p[0].slice(Z),p.index+=Z}let{0:w,index:S}=p!=null?p:{0:`
10
- `,index:l.length},I=(A=n.pop())!=null?A:{},{0:q,index:F,parts:j,findEqual:Q,pos:ve}=I,gt=w==="="&&Q;if(w==="]]"||w==="}-")d=S+2;else if(w===`
11
- `){d=S+1;let{pos:Z,findEqual:z}=(E=n[n.length-1])!=null?E:{};if(Z===void 0||z||J(l.slice(Z,F))!==""){let ie=/^(={1,6})(.+)\1((?:\s|\0\d+c\x7F)*)$/u.exec(l.slice(F,S));ie&&(l=`${l.slice(0,F)}\0${e.length}h\x7F${l.slice(S)}`,d=F+4+String(e.length).length,new We(ie[1].length,ie.slice(2),i,e))}}else if(w==="|"||gt)d=S+1,j[j.length-1].push(l.slice(ve,S)),w==="|"&&j.push([]),I.pos=d,I.findEqual=w==="|",n.push(I);else if(w.startsWith("}}")){let Z=w.slice(0,Math.min(q.length,3)),z=q.length-Z.length,{length:ie}=e;d=S+Z.length,j[j.length-1].push(l.slice(ve,S));let et=!1,me="t";if(Z.length===3){let _=j.map(ir=>ir.join("=")),Se=_.length>1&&J(_[1]).trim();new Nt(_,i,e),Se&&Se.endsWith(":")&&r.includes(Se.slice(0,-1).toLowerCase())&&(me="s")}else try{new St(j[0][0],j.slice(1),i,e);let _=J(j[0][0]).trim();o.has(_)?me=o.get(_):/^(?:filepath|(?:full|canonical)urle?):.|^server$/iu.test(_)?me="m":/^#vardefine:./iu.test(_)&&(me="c")}catch(_){if(_ instanceof SyntaxError&&_.message.startsWith("\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A"))et=!0;else throw _}et||(l=`${l.slice(0,F+z)}\0${ie}${me}\x7F${l.slice(d)}`,d=F+z+3+String(ie).length,z>1?n.push({0:q.slice(0,z),index:F,pos:F+z,parts:[[]]}):z===1&&l[F-1]==="-"&&n.push({0:"-{",index:F-1,pos:F+1,parts:[[]]}))}else d=S+w.length,w.startsWith("{")&&(p.pos=d,p.parts=[[]]),n.push(..."0"in I?[I]:[],p);g&&(g=l.slice(d).includes("}}"));let ne=n[n.length-1];!g&&((O=ne==null?void 0:ne[0])!=null&&O.startsWith("{"))&&(n.pop(),ne=n[n.length-1]),a=new RegExp(t+(ne?`|${s[ne[0][0]]}${ne.findEqual?"|=":""}`:""),"gmu"),a.lastIndex=d,p=a.exec(l)}return l}});var Tn={};M(Tn,{InputboxToken:()=>xr});var xr,bn=b(()=>{"use strict";fr();y();hr();xr=class extends ot{constructor(i,e=h.getConfig(),t=[]){let r=Symbol("InputboxToken");t.push(r),i&&(i=cr(i,e,t)),t.splice(t.indexOf(r),1),super(i,e,t,{})}}});var ze,Tr=b(()=>{"use strict";B();qe();y();Te();ze=class extends ae(V){constructor(e,t=!0,r=h.getConfig(),n=[]){super(e,r,n);f(this,"type","comment");f(this,"closed");this.closed=t}getAttribute(e){return e==="padding"?4:super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){return this.closed?[]:[L(this,{start:e},"unclosed HTML comment")]}toString(e){return`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}}});var Ft={};M(Ft,{NestedToken:()=>br});var br,Et=b(()=>{"use strict";B();y();C();kr();$e();Tr();br=class extends x{constructor(e,t,r,n=h.getConfig(),s=[]){var o;e=(o=e==null?void 0:e.replace(t,(a,p,g,d,c)=>{let m=`\0${s.length+1}${p?"e":"c"}\x7F`;if(p)new Me(p,g,d,c,n,s);else{let T=a.endsWith("-->");new ze(a.slice(4,T?-3:void 0),T,n,s)}return m}))==null?void 0:o.replace(/(^|\0\d+[ce]\x7F)([^\0]+)(?=$|\0\d+[ce]\x7F)/gu,(a,p,g)=>(new U(g,n,s),`${p}\0${s.length}c\x7F`));super(e,n,s,{});f(this,"type","ext-inner")}lint(e=this.getAbsoluteIndex()){let t;return[...super.lint(e),...this.childNodes.filter(r=>{if(r.type==="ext"||r.type==="comment")return!1;let n=String(r).trim();return n&&!/^<!--.*-->$/su.test(n)}).map(r=>(t!=null||(t={start:e,...this.getRootNode().posFromIndex(e)}),v(r,t,h.msg("invalid content in <$1>",this.name))))]}}});var Fe,te,Ee,ye,Lt=b(()=>{"use strict";B();ce();y();C();pe();ye=class extends x{constructor(e,t,r=h.getConfig(),n=[],s="|"){super(void 0,r,n,{});k(this,Fe,!0);k(this,te,void 0);k(this,Ee,void 0);if(this.insertAt(new R(e,"link-target",r,n,{})),t!==void 0){let o=new x(t,r,n,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}$(this,te,s)}afterBuild(){$(this,Ee,this.getTitle()),u(this,te).includes("\0")&&$(this,te,this.buildFromStr(u(this,te),"string"))}setAttribute(e,t){e==="bracket"?$(this,Fe,!!t):e==="title"?$(this,Ee,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,u(this,te));return u(this,Fe)?`[[${t}]]`:t}text(){let e=super.text("|");return u(this,Fe)?`[[${e}]]`:e}getAttribute(e){return e==="title"?u(this,Ee):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?u(this,te).length:1}lint(e=this.getAbsoluteIndex()){let t=super.lint(e),{childNodes:[r,n],type:s}=this,{encoded:o,fragment:a}=u(this,Ee),p;return s==="link"&&r.childNodes.some(({type:g})=>g==="template")&&(p={start:e,...this.getRootNode().posFromIndex(e)},t.push(v(r,p,"template in an internal link target","warning"))),o&&(p!=null||(p={start:e,...this.getRootNode().posFromIndex(e)}),t.push(v(r,p,"unnecessary URL encoding in an internal link"))),s==="link"&&(n!=null&&n.childNodes.some(({type:g,data:d})=>g==="text"&&d.includes("|")))?(p!=null||(p={start:e,...this.getRootNode().posFromIndex(e)}),t.push(v(n,p,'additional "|" in the link text',"warning"))):s!=="link"&&a!==void 0&&(p!=null||(p={start:e,...this.getRootNode().posFromIndex(e)}),t.push(v(r,p,"useless fragment"))),t}getTitle(){return this.normalizeTitle(this.firstChild.text(),0,!1,!0,!0)}print(){return super.print(u(this,Fe)?{pre:"[[",post:"]]",sep:u(this,te)}:{sep:u(this,te)})}};Fe=new WeakMap,te=new WeakMap,Ee=new WeakMap});function kn(l,i,e=h.getConfig(),t=!1){i=i.trim();let r=i.replace(/\0\d+t\x7F/gu,"").trim();switch(l){case"width":return!r||/^(?:\d+x?|\d*x\d+)$/u.test(r);case"link":{if(!r||new RegExp(`^(?:(?:${e.protocol}|//)${fe}|\0\\d+m\x7F)${xe}$`,"iu").test(r))return i;r.startsWith("[[")&&r.endsWith("]]")&&(r=r.slice(2,-2));let s=h.normalizeTitle(r,0,!1,e,t,!0,!0);return s.valid&&s}case"lang":return!r||e.variants.includes(r);case"alt":case"class":case"manualthumb":return!0;default:return!Number.isNaN(Number(r))}}var zi,K,It,yn=b(()=>{"use strict";H();B();y();C();zi=new Set(["alt","link","lang","page","caption"]);It=class extends x{constructor(e,t=h.getConfig(),r=[]){var i=(...args)=>{super(...args);f(this,"type","image-parameter");k(this,K,"")};var a;let n,s=Object.entries(t.img).map(([p,g])=>[p,g,new RegExp(`^(\\s*)${p.replace("$1","(.*)")}(\\s*)$`,"u")]),o=s.find(([,p,g])=>(n=g.exec(e),n&&(n.length!==4||kn(p,n[2],t,!0)!==!1)));if(o&&n){n.length===3?(i(void 0,t,r),$(this,K,e)):(i(n[2],t,r,{}),$(this,K,`${n[1]}${o[0]}${n[3]}`)),this.setAttribute("name",o[1]);return}i(e,{...t,excludes:[...(a=t.excludes)!=null?a:[],"list"]},r),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get link(){return this.name==="link"?kn("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!zi.has(this.name)&&this.setAttribute("name","invalid")}toString(e){return u(this,K)?u(this,K).replace("$1",super.toString(e)):super.toString(e)}text(){return u(this,K)?u(this,K).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,u(this,K).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){let t=super.lint(e),{link:r,name:n}=this;return n==="invalid"?t.push(L(this,{start:e},"invalid gallery image parameter")):typeof r=="object"&&r.encoded&&t.push(L(this,{start:e},"unnecessary URL encoding in an internal link")),t}print(){return u(this,K)?this.name==="invalid"?`<span class="wpb-image-invalid">${u(this,K).replace("$1",oe(this.childNodes))}</span>`:`<span class="wpb-image-parameter">${u(this,K).replace("$1",`<span class="wpb-image-caption">${oe(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};K=new WeakMap});var yr,Ar,vr,Mi,_e,Pt,Ue,Sr=b(()=>{"use strict";H();B();y();Lt();yn();yr=new Set(["manualthumb","frameless","framed","thumbnail"]),Ar=new Set(["left","right","center","none"]),vr=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),Mi=(l,i,e,t)=>{if(t===void 0)return[];let r=new RegExp(`${[l,i,e].map(Ur).join("|")}`,"gu"),n=[],s=r.exec(t),o=0,a=0;for(;s;){let{0:p,index:g}=s;p!==e?o+=p===l?1:-1:o===0&&(n.push(t.slice(a,g)),{lastIndex:a}=r),s=r.exec(t)}return n.push(t.slice(a)),n},Ue=class extends ye{constructor(e,t,r=h.getConfig(),n=[],s="|"){super(e,void 0,r,n,s);k(this,_e);f(this,"type","file");this.append(...Mi("-{","}-","|",t).map(o=>new It(o,r,n)))}lint(e=this.getAbsoluteIndex()){let t=super.lint(e),r=this.getAllArgs().filter(({childNodes:d})=>{let c=d.filter(m=>m.text().trim());return c.length!==1||c[0].type!=="arg"}),n=[...new Set(r.map(({name:d})=>d))].filter(d=>d!=="invalid"),s=n.filter(d=>yr.has(d)),o=n.filter(d=>Ar.has(d)),a=n.filter(d=>vr.has(d));if(r.length===n.length&&s.length<2&&o.length<2&&a.length<2)return t;let p={start:e,...this.getRootNode().posFromIndex(e)},g=(d,c)=>m=>v(m,p,h.msg(`${d} image $1 parameter`,c));for(let d of n){let c=r.filter(({name:m})=>m===d);d==="caption"&&(c=[...c.slice(0,-1).filter(m=>m.text()),...c.slice(-1)]),c.length>1&&t.push(...c.map(g("duplicated",d)))}return s.length>1&&t.push(...r.filter(({name:d})=>yr.has(d)).map(g("conflicting","frame"))),o.length>1&&t.push(...r.filter(({name:d})=>Ar.has(d)).map(g("conflicting","horizontal-alignment"))),a.length>1&&t.push(...r.filter(({name:d})=>vr.has(d)).map(g("conflicting","vertical-alignment"))),t}getAllArgs(){return this.childNodes.slice(1)}getArgs(e){return this.getAllArgs().filter(({name:t})=>e===t)}getFrameArgs(){return N(this,_e,Pt).call(this,yr,"\u6846\u67B6")}getHorizAlignArgs(){return N(this,_e,Pt).call(this,Ar,"\u6C34\u5E73\u5BF9\u9F50")}getVertAlignArgs(){return N(this,_e,Pt).call(this,vr,"\u5782\u76F4\u5BF9\u9F50")}};_e=new WeakSet,Pt=function(e,t){return this.getAllArgs().filter(({name:n})=>e.has(n))}});var Rt,An,De,$r=b(()=>{"use strict";B();ce();y();C();Sr();De=class extends Ue{constructor(e,t,r,n=h.getConfig(),s=[]){let o;if(r!==void 0){o=new x(r,n,s),o.type="plain";for(let a=1;a<11;a++)o.parseOnce();s.splice(s.indexOf(o),1)}super(t,o==null?void 0:o.toString(),n,s);k(this,Rt);this.setAttribute("bracket",!1),this.type=`${e}-image`}getTitle(){let e=this.type==="imagemap-image";return this.normalizeTitle(String(this.firstChild),e?0:6,!0,!e)}getAttribute(e){return e==="padding"?0:super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){let t=super.lint(e),{ns:r}=this.getAttribute("title");return r!==6&&t.push(L(this,{start:e},"invalid gallery image")),t}afterBuild(){N(this,Rt,An).call(this,this.getTitle())}};Rt=new WeakSet,An=function(e){this.setAttribute("title",e)}});var Sn={};M(Sn,{GalleryToken:()=>wr});var Gt,vn,wr,$n=b(()=>{"use strict";y();C();$r();$e();wr=class extends x{constructor(e,t=h.getConfig(),r=[]){var n;super(void 0,t,r,{});k(this,Gt);f(this,"type","ext-inner");for(let s of(n=e==null?void 0:e.split(`
12
- `))!=null?n:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new U(s,t):s);continue}let[,a,p]=o;N(this,Gt,vn).call(this,a)?super.insertAt(new De("gallery",a,p,t,r)):super.insertAt(new U(s,t))}}toString(e){return super.toString(e,`
8
+ `})}}});var de,lt=b(()=>{"use strict";y();C();de=class extends T{constructor(i,e,t="plain",r=h.getConfig(),n=[],s){super(i,r,n,s),this.type=t}lint(){return[]}}});var dt,We,vt,ze,Tr=b(()=>{"use strict";R();y();C();lt();ze=class extends T{constructor(e,t,r=h.getConfig(),n=[]){super(void 0,r,n);k(this,We);f(this,"type","heading");k(this,dt,void 0);S(this,dt,e);let s=new T(t[0],r,n);s.type="heading-title",s.setAttribute("stage",2);let o=new de(t[1],/^[^\S\n]*$/u,"heading-trail",r,n,{});this.append(s,o)}get level(){return u(this,dt)}toString(e){let t=u(this,We,vt);return`${t}${this.firstChild.toString()}${t}${this.lastChild.toString()}`}text(){let e=u(this,We,vt);return`${e}${this.firstChild.text()}${e}`}getAttribute(e){return e==="padding"?super.getAttribute("padding")+this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex()){let t=super.lint(e),{firstChild:r}=this,n=String(r),s;return this.level===1&&(s=v(r,{start:e},"<h1>"),t.push(s)),(n.startsWith("=")||n.endsWith("="))&&(s!=null||(s=v(r,{start:e},"")),t.push({...s,message:h.msg('unbalanced "=" in a section header')})),this.closest("html-attrs, table-attrs")&&t.push({...E(this,{start:e},""),message:h.msg("section header in a HTML tag")}),t}print(){let e=u(this,We,vt);return super.print({pre:e,sep:e})}};dt=new WeakMap,We=new WeakSet,vt=function(){return"=".repeat(this.level)}});var ji,St,un=b(()=>{"use strict";D();R();y();C();ji=l=>l.toString(new Set(["comment","noinclude","include"])).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),St=class extends T{constructor(e,t,r=h.getConfig(),n=[]){super(void 0,r,n);f(this,"type","parameter");let s=new T(typeof e=="number"?void 0:e,r,n,{}),o=new T(t,r,n);s.type="parameter-key",o.type="parameter-value",o.setAttribute("stage",2),this.append(s,o)}get anon(){return this.firstChild.length===0}afterBuild(){if(!this.anon){let{parentNode:e,firstChild:t}=this,r=ji(t);this.setAttribute("name",r),e&&e.getArgs(r,!1,!1).add(this)}}toString(e){return this.anon?this.lastChild.toString(e):super.toString(e,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(e=this.getAbsoluteIndex()){var s;let t=super.lint(e),{firstChild:r}=this,n=(s=new RegExp(`https?://${Te}${xe}$`,"iu").exec(r.toString(new Set(["comment","noinclude","include"]))))==null?void 0:s[0];if(n&&new URL(n).search){let o=v(r,{start:e},"unescaped query string in an anonymous parameter");t.push({...o,startIndex:o.endIndex,endIndex:o.endIndex+1,startLine:o.endLine,startCol:o.endCol,endCol:o.endCol+1})}return t}print(){return super.print({sep:this.anon?"":"="})}}});var we,Ce,wt,hn,Ct,mn,$t,cn=b(()=>{"use strict";D();R();y();C();un();ge();lt();$t=class extends T{constructor(e,t,r=h.getConfig(),n=[]){var p,c;super(void 0,r,n,{});k(this,wt);k(this,Ct);f(this,"type","template");f(this,"modifier","");k(this,we,!1);k(this,Ce,new Map);let{parserFunction:[s,o]}=r,a=(p=/^(?:\s|\0\d+c\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:p[0];if(a)this.setAttribute("modifier",a),e=e.slice(a.length);else if(e.includes(":")){let[m,...x]=e.split(":"),[A]=/^(?:\s|\0\d+c\x7F)*/u.exec((c=x[0])!=null?c:"");this.setModifier(`${m}:${A}`)&&(e=x.join(":").slice(A.length))}if(e.includes(":")||t.length===0&&!u(this,we)){let[m,...x]=e.split(":"),A=J(m),F=A.trim(),O=o.includes(F),w=s[F.toLowerCase()];if(!(x.length>0&&/\s$/u.test(A))&&(O||w)){this.setAttribute("name",w!=null?w:F.toLowerCase()),this.type="magic-word";let $=new RegExp(`^\\s*${F}\\s*$`,O?"u":"iu"),I=new de(m,$,"magic-word-name",r,n,{});if(super.insertAt(I),x.length>0&&t.unshift([x.join(":")]),this.name==="invoke")for(let B=0;B<2;B++){let L=t.shift();if(!L)break;let j=new G(L.join("="),`invoke-${B?"function":"module"}`,r,n);super.insertAt(j)}}}if(this.type==="template"){let m=J(ct(e)).split("#")[0].trim();if(!m||/\0\d+[eh!+-]\x7F|[<>[\]{}\n]|%[\da-f]{2}/u.test(m))throw n.pop(),new SyntaxError(`\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A${ft(m)}`);let x=new G(e,"template-name",r,n,{});super.insertAt(x)}let d=this.isTemplate(),g=1;for(let m=0;m<t.length;m++){let x=t[m];!d&&!(this.name==="switch"&&m>0)&&(x[0]=x.join("="),x.length=1),x.length===1&&(x.unshift(g),g++),this.insertAt(new St(...x,r,n))}}setModifier(e){let{parserFunction:[,,t,r]}=this.getAttribute("config"),n=J(e).trim();if(e&&!n.endsWith(":"))return!1;let s=n.slice(0,-1).toLowerCase(),o=t.includes(s),a=r.includes(s);return u(this,we)&&o||!u(this,we)&&(a||e==="")||this.length>1&&(o||a||e==="")?(this.setAttribute("modifier",e),S(this,we,o),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,"string"))}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:n,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${n}${s==="magic-word"?`${r.text()}${t===1?"":":"}${se(e.slice(1),"|")}`:super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;default:return super.getAttribute(e)}}getGaps(){return 1}lint(e=this.getAbsoluteIndex()){let t=super.lint(e),{type:r,childNodes:n,length:s}=this,o;if(!this.isTemplate())return t;let a=N(this,wt,hn).call(this);if(a)a.fragment!==void 0&&(o={start:e,...this.getRootNode().posFromIndex(e)},t.push(v(n[r==="template"?0:1],o,"useless fragment")));else return o={start:e,...this.getRootNode().posFromIndex(e)},t.push(E(this,o,"missing module name")),t;if(a.valid||(o!=null||(o={start:e,...this.getRootNode().posFromIndex(e)}),t.push(v(n[1],o,"illegal module name"))),r==="magic-word"&&s===2)return o!=null||(o={start:e,...this.getRootNode().posFromIndex(e)}),t.push(E(this,o,"missing module function")),t;let d=this.getDuplicatedArgs();return d.length>0&&(o!=null||(o={start:e,...this.getRootNode().posFromIndex(e)}),t.push(...d.flatMap(([,g])=>g).map(g=>v(g,o,"duplicated parameter")))),t}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?N(this,Ct,mn).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(e=>e.type==="parameter")}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t=!1,r=!0){let n=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return u(this,Ce).has(n)?s=u(this,Ce).get(n):(s=new Set(this.getAllArgs().filter(({name:o})=>n===o)),u(this,Ce).set(n,s)),s}getDuplicatedArgs(){return this.isTemplate()?[...u(this,Ce)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]]):[]}getPossibleValues(){let{type:e,name:t,childNodes:r,constructor:{name:n}}=this;if(e==="template")throw new Error(`${n}.getPossibleValues \u65B9\u6CD5\u4EC5\u4F9B\u7279\u5B9A\u9B54\u672F\u5B57\u4F7F\u7528\uFF01`);let s;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":s=2;break;case"ifeq":s=3;break;default:throw new Error(`${n}.getPossibleValues \u65B9\u6CD5\u4EC5\u4F9B\u7279\u5B9A\u9B54\u672F\u5B57\u4F7F\u7528\uFF01`)}let o=r.slice(s,s+2).map(({childNodes:[,a]})=>a);for(let a=0;a<o.length;){let{length:d,0:g}=o[a].childNodes.filter(p=>p.text().trim());if(d===0)o.splice(a,1);else if(d>1||g.type!=="magic-word")a++;else try{let p=g.getPossibleValues();o.splice(a,1,...p),a+=p.length}catch(p){a++}}return o}print(){let{childNodes:e,length:t,firstChild:r,modifier:n,type:s}=this;return`<span class="wpb-${s}">{{${n}${s==="magic-word"?`${r.print()}${t===1?"":":"}${oe(e.slice(1),{sep:"|"})}`:oe(e,{sep:"|"})}}}</span>`}};we=new WeakMap,Ce=new WeakMap,wt=new WeakSet,hn=function(){let e=this.type==="template",t=this.childNodes[e?0:1];return t&&this.normalizeTitle(t.text(),e?10:828)},Ct=new WeakSet,mn=function(e){let t=this.getAnonArgs(),r=typeof e!="number";for(let n=r?t.indexOf(e):e-1;n<t.length;n++){let s=t[n],{name:o}=s,a=String(n+1);o!==a&&(s.setAttribute("name",a),this.getArgs(a,!1,!1).add(s))}}});var Nt,fn=b(()=>{"use strict";Be();C();Nt=class extends ae(T){constructor(){super(...arguments);f(this,"type","hidden")}}});var Ft,Tn=b(()=>{"use strict";D();R();y();C();ge();fn();Ft=class extends T{constructor(e,t=h.getConfig(),r=[]){super(void 0,t,r,{});f(this,"type","arg");for(let n=0;n<e.length;n++)if(n===0){let s=new G(e[n],"arg-name",t,r,{});super.insertAt(s)}else if(n>1){let s=new Nt(e[n],t,r,{});super.insertAt(s)}else{let s=new T(e[n],t,r);s.type="arg-default",s.setAttribute("stage",2),super.insertAt(s)}}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`{{{${se(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}lint(e=this.getAbsoluteIndex()){if(!this.getAttribute("include"))return[E(this,{start:e},"unexpected template argument")];let{childNodes:[t,r,...n]}=this,s=t.lint(e+3);if(r&&s.push(...r.lint(e+4+String(t).length)),n.length>0){let o={start:e,...this.getRootNode().posFromIndex(e)};s.push(...n.map(a=>{let d=v(a,o,"invisible content inside triple braces");return{...d,startIndex:d.startIndex-1,startCol:d.startCol-1}}))}return s}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}}});var xn={};z(xn,{parseBraces:()=>xr});var xr,br=b(()=>{"use strict";D();y();Tr();cn();Tn();xr=(l,i=h.getConfig(),e=[])=>{var c,m,x,A,F,O;let t=`${(c=i.excludes)!=null&&c.includes("heading")?"":"^(\0\\d+c\x7F)*={1,6}|"}\\[\\[|\\{{2,}|-\\{(?!\\{)`,{parserFunction:[,,,r]}=i,n=[],s={"=":`
9
+ `,"{":"\\}{2,}|\\|","-":"\\}-","[":"\\]\\]"},o=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"]]),a=new RegExp(t,"gmu"),d=a.exec(l),g=l.includes("}}"),p;for(;d||p!==void 0&&p<=l.length&&((x=(m=n[n.length-1])==null?void 0:m[0])!=null&&x.startsWith("="));){if(d!=null&&d[1]){let[,{length:Z}]=d;d[0]=d[0].slice(Z),d.index+=Z}let{0:w,index:$}=d!=null?d:{0:`
10
+ `,index:l.length},I=(A=n.pop())!=null?A:{},{0:B,index:L,parts:j,findEqual:V,pos:Pe}=I,Re=w==="="&&V;if(w==="]]"||w==="}-")p=$+2;else if(w===`
11
+ `){p=$+1;let{pos:Z,findEqual:ee}=(F=n[n.length-1])!=null?F:{};if(Z===void 0||ee||J(l.slice(Z,L))!==""){let M=/^(={1,6})(.+)\1((?:\s|\0\d+c\x7F)*)$/u.exec(l.slice(L,$));M&&(l=`${l.slice(0,L)}\0${e.length}h\x7F${l.slice($)}`,p=L+4+String(e.length).length,new ze(M[1].length,M.slice(2),i,e))}}else if(w==="|"||Re)p=$+1,j[j.length-1].push(l.slice(Pe,$)),w==="|"&&j.push([]),I.pos=p,I.findEqual=w==="|",n.push(I);else if(w.startsWith("}}")){let Z=w.slice(0,Math.min(B.length,3)),ee=B.length-Z.length,{length:M}=e;p=$+Z.length,j[j.length-1].push(l.slice(Pe,$));let Ge=!1,ce="t";if(Z.length===3){let X=j.map(tt=>tt.join("=")),ie=X.length>1&&J(X[1]).trim();new Ft(X,i,e),ie&&ie.endsWith(":")&&r.includes(ie.slice(0,-1).toLowerCase())&&(ce="s")}else try{new $t(j[0][0],j.slice(1),i,e);let X=J(j[0][0]).trim();o.has(X)?ce=o.get(X):/^(?:filepath|(?:full|canonical)urle?):.|^server$/iu.test(X)?ce="m":/^#vardefine:./iu.test(X)&&(ce="c")}catch(X){if(X instanceof SyntaxError&&X.message.startsWith("\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A"))Ge=!0;else throw X}Ge||(l=`${l.slice(0,L+ee)}\0${M}${ce}\x7F${l.slice(p)}`,p=L+ee+3+String(M).length,ee>1?n.push({0:B.slice(0,ee),index:L,pos:L+ee,parts:[[]]}):ee===1&&l[L-1]==="-"&&n.push({0:"-{",index:L-1,pos:L+1,parts:[[]]}))}else p=$+w.length,w.startsWith("{")&&(d.pos=p,d.parts=[[]]),n.push(..."0"in I?[I]:[],d);g&&(g=l.slice(p).includes("}}"));let ne=n[n.length-1];!g&&((O=ne==null?void 0:ne[0])!=null&&O.startsWith("{"))&&(n.pop(),ne=n[n.length-1]),a=new RegExp(t+(ne?`|${s[ne[0][0]]}${ne.findEqual?"|=":""}`:""),"gmu"),a.lastIndex=p,d=a.exec(l)}return l}});var bn={};z(bn,{InputboxToken:()=>kr});var kr,kn=b(()=>{"use strict";br();y();fr();kr=class extends at{constructor(i,e=h.getConfig(),t=[]){let r=Symbol("InputboxToken");t.push(r),i&&(i=xr(i,e,t)),t.splice(t.indexOf(r),1),super(i,e,t,{})}}});var Me,yr=b(()=>{"use strict";R();Be();y();be();Me=class extends ae(H){constructor(e,t=!0,r=h.getConfig(),n=[]){super(e,r,n);f(this,"type","comment");f(this,"closed");this.closed=t}getAttribute(e){return e==="padding"?4:super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){return this.closed?[]:[E(this,{start:e},h.msg("unclosed $1","HTML comment"))]}toString(e){return`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}}});var Et={};z(Et,{NestedToken:()=>Ar});var Ar,Lt=b(()=>{"use strict";R();y();C();vr();Se();yr();Ar=class extends T{constructor(e,t,r,n=h.getConfig(),s=[]){var o;e=(o=e==null?void 0:e.replace(t,(a,d,g,p,c)=>{let m=`\0${s.length+1}${d?"e":"c"}\x7F`;if(d)new _e(d,g,p,c,n,s);else{let x=a.endsWith("-->");new Me(a.slice(4,x?-3:void 0),x,n,s)}return m}))==null?void 0:o.replace(/(^|\0\d+[ce]\x7F)([^\0]+)(?=$|\0\d+[ce]\x7F)/gu,(a,d,g)=>(new _(g,n,s),`${d}\0${s.length}c\x7F`));super(e,n,s,{});f(this,"type","ext-inner")}lint(e=this.getAbsoluteIndex()){let t;return[...super.lint(e),...this.childNodes.filter(r=>{if(r.type==="ext"||r.type==="comment")return!1;let n=String(r).trim();return n&&!/^<!--.*-->$/su.test(n)}).map(r=>(t!=null||(t={start:e,...this.getRootNode().posFromIndex(e)}),v(r,t,h.msg("invalid content in <$1>",this.name))))]}}});var Ne,te,Fe,Ae,It=b(()=>{"use strict";R();fe();y();C();ge();Ae=class extends T{constructor(e,t,r=h.getConfig(),n=[],s="|"){super(void 0,r,n,{});k(this,Ne,!0);k(this,te,void 0);k(this,Fe,void 0);if(this.insertAt(new G(e,"link-target",r,n,{})),t!==void 0){let o=new T(t,r,n,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}S(this,te,s)}afterBuild(){S(this,Fe,this.getTitle()),u(this,te).includes("\0")&&S(this,te,this.buildFromStr(u(this,te),"string"))}setAttribute(e,t){e==="bracket"?S(this,Ne,!!t):e==="title"?S(this,Fe,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,u(this,te));return u(this,Ne)?`[[${t}]]`:t}text(){let e=super.text("|");return u(this,Ne)?`[[${e}]]`:e}getAttribute(e){return e==="title"?u(this,Fe):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?u(this,te).length:1}lint(e=this.getAbsoluteIndex()){let t=super.lint(e),{childNodes:[r,n],type:s}=this,{encoded:o,fragment:a}=u(this,Fe),d;return s==="link"&&r.childNodes.some(({type:g})=>g==="template")&&(d={start:e,...this.getRootNode().posFromIndex(e)},t.push(v(r,d,"template in an internal link target","warning"))),o&&(d!=null||(d={start:e,...this.getRootNode().posFromIndex(e)}),t.push(v(r,d,"unnecessary URL encoding in an internal link"))),s==="link"&&(n!=null&&n.childNodes.some(({type:g,data:p})=>g==="text"&&p.includes("|")))?(d!=null||(d={start:e,...this.getRootNode().posFromIndex(e)}),t.push(v(n,d,'additional "|" in the link text',"warning"))):s!=="link"&&a!==void 0&&(d!=null||(d={start:e,...this.getRootNode().posFromIndex(e)}),t.push(v(r,d,"useless fragment"))),t}getTitle(){return this.normalizeTitle(this.firstChild.text(),0,!1,!0,!0)}print(){return super.print(u(this,Ne)?{pre:"[[",post:"]]",sep:u(this,te)}:{sep:u(this,te)})}};Ne=new WeakMap,te=new WeakMap,Fe=new WeakMap});function yn(l,i,e=h.getConfig(),t=!1){i=i.trim();let r=i.replace(/\0\d+t\x7F/gu,"").trim();switch(l){case"width":return!r||/^(?:\d+x?|\d*x\d+)$/u.test(r);case"link":{if(!r||new RegExp(`^(?:(?:${e.protocol}|//)${Te}|\0\\d+m\x7F)${xe}$`,"iu").test(r))return i;r.startsWith("[[")&&r.endsWith("]]")&&(r=r.slice(2,-2));let s=h.normalizeTitle(r,0,!1,e,t,!0,!0);return s.valid&&s}case"lang":return!r||e.variants.includes(r);case"alt":case"class":case"manualthumb":return!0;default:return!Number.isNaN(Number(r))}}var Wi,K,Pt,An=b(()=>{"use strict";D();R();y();C();Wi=new Set(["alt","link","lang","page","caption"]);Pt=class extends T{constructor(e,t=h.getConfig(),r=[]){var i=(...args)=>{super(...args);f(this,"type","image-parameter");k(this,K,"")};var a;let n,s=Object.entries(t.img).map(([d,g])=>[d,g,new RegExp(`^(\\s*)${d.replace("$1","(.*)")}(\\s*)$`,"u")]),o=s.find(([,d,g])=>(n=g.exec(e),n&&(n.length!==4||yn(d,n[2],t,!0)!==!1)));if(o&&n){n.length===3?(i(void 0,t,r),S(this,K,e)):(i(n[2],t,r,{}),S(this,K,`${n[1]}${o[0]}${n[3]}`)),this.setAttribute("name",o[1]);return}i(e,{...t,excludes:[...(a=t.excludes)!=null?a:[],"list"]},r),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get link(){return this.name==="link"?yn("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!Wi.has(this.name)&&this.setAttribute("name","invalid")}toString(e){return u(this,K)?u(this,K).replace("$1",super.toString(e)):super.toString(e)}text(){return u(this,K)?u(this,K).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,u(this,K).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){let t=super.lint(e),{link:r,name:n}=this;return n==="invalid"?t.push(E(this,{start:e},"invalid gallery image parameter")):typeof r=="object"&&r.encoded&&t.push(E(this,{start:e},"unnecessary URL encoding in an internal link")),t}print(){return u(this,K)?this.name==="invalid"?`<span class="wpb-image-invalid">${u(this,K).replace("$1",oe(this.childNodes))}</span>`:`<span class="wpb-image-parameter">${u(this,K).replace("$1",`<span class="wpb-image-caption">${oe(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};K=new WeakMap});var Sr,$r,wr,zi,Ue,Rt,De,Cr=b(()=>{"use strict";D();R();y();It();An();Sr=new Set(["manualthumb","frameless","framed","thumbnail"]),$r=new Set(["left","right","center","none"]),wr=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),zi=(l,i,e,t)=>{if(t===void 0)return[];let r=new RegExp(`${[l,i,e].map(Hr).join("|")}`,"gu"),n=[],s=r.exec(t),o=0,a=0;for(;s;){let{0:d,index:g}=s;d!==e?o+=d===l?1:-1:o===0&&(n.push(t.slice(a,g)),{lastIndex:a}=r),s=r.exec(t)}return n.push(t.slice(a)),n},De=class extends Ae{constructor(e,t,r=h.getConfig(),n=[],s="|"){super(e,void 0,r,n,s);k(this,Ue);f(this,"type","file");this.append(...zi("-{","}-","|",t).map(o=>new Pt(o,r,n)))}lint(e=this.getAbsoluteIndex()){let t=super.lint(e),r=this.getAllArgs().filter(({childNodes:p})=>{let c=p.filter(m=>m.text().trim());return c.length!==1||c[0].type!=="arg"}),n=[...new Set(r.map(({name:p})=>p))].filter(p=>p!=="invalid"),s=n.filter(p=>Sr.has(p)),o=n.filter(p=>$r.has(p)),a=n.filter(p=>wr.has(p));if(r.length===n.length&&s.length<2&&o.length<2&&a.length<2)return t;let d={start:e,...this.getRootNode().posFromIndex(e)},g=(p,c)=>m=>v(m,d,h.msg(`${p} image $1 parameter`,c));for(let p of n){let c=r.filter(({name:m})=>m===p);p==="caption"&&(c=[...c.slice(0,-1).filter(m=>m.text()),...c.slice(-1)]),c.length>1&&t.push(...c.map(g("duplicated",p)))}return s.length>1&&t.push(...r.filter(({name:p})=>Sr.has(p)).map(g("conflicting","frame"))),o.length>1&&t.push(...r.filter(({name:p})=>$r.has(p)).map(g("conflicting","horizontal-alignment"))),a.length>1&&t.push(...r.filter(({name:p})=>wr.has(p)).map(g("conflicting","vertical-alignment"))),t}getAllArgs(){return this.childNodes.slice(1)}getArgs(e){return this.getAllArgs().filter(({name:t})=>e===t)}getFrameArgs(){return N(this,Ue,Rt).call(this,Sr,"\u6846\u67B6")}getHorizAlignArgs(){return N(this,Ue,Rt).call(this,$r,"\u6C34\u5E73\u5BF9\u9F50")}getVertAlignArgs(){return N(this,Ue,Rt).call(this,wr,"\u5782\u76F4\u5BF9\u9F50")}};Ue=new WeakSet,Rt=function(e,t){return this.getAllArgs().filter(({name:n})=>e.has(n))}});var Gt,vn,He,Nr=b(()=>{"use strict";R();fe();y();C();Cr();He=class extends De{constructor(e,t,r,n=h.getConfig(),s=[]){let o;if(r!==void 0){o=new T(r,n,s),o.type="plain";for(let a=1;a<11;a++)o.parseOnce();s.splice(s.indexOf(o),1)}super(t,o==null?void 0:o.toString(),n,s);k(this,Gt);this.setAttribute("bracket",!1),this.type=`${e}-image`}getTitle(){let e=this.type==="imagemap-image";return this.normalizeTitle(String(this.firstChild),e?0:6,!0,!e)}getAttribute(e){return e==="padding"?0:super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){let t=super.lint(e),{ns:r}=this.getAttribute("title");return r!==6&&t.push(E(this,{start:e},"invalid gallery image")),t}afterBuild(){N(this,Gt,vn).call(this,this.getTitle())}};Gt=new WeakSet,vn=function(e){this.setAttribute("title",e)}});var $n={};z($n,{GalleryToken:()=>Fr});var qt,Sn,Fr,wn=b(()=>{"use strict";y();C();Nr();Se();Fr=class extends T{constructor(e,t=h.getConfig(),r=[]){var n;super(void 0,t,r,{});k(this,qt);f(this,"type","ext-inner");for(let s of(n=e==null?void 0:e.split(`
12
+ `))!=null?n:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new _(s,t):s);continue}let[,a,d]=o;N(this,qt,Sn).call(this,a)?super.insertAt(new He("gallery",a,d,t,r)):super.insertAt(new _(s,t))}}toString(e){return super.toString(e,`
13
13
  `)}text(){return super.text(`
14
14
  `).replace(/\n\s*\n/gu,`
15
- `)}getGaps(){return 1}lint(e=this.getAbsoluteIndex()){let{top:t,left:r}=this.getRootNode().posFromIndex(e),n=[];for(let s=0;s<this.length;s++){let o=this.childNodes[s],a=String(o),{length:p}=a,g=a.trim(),d=t+s,c=s?0:r;o.type==="noinclude"&&g&&!/^<!--.*-->$/u.test(g)?n.push({message:h.msg("invalid content in <$1>","gallery"),severity:"error",startIndex:e,endIndex:e+p,startLine:d,endLine:d,startCol:c,endCol:c+p}):o.type!=="noinclude"&&o.type!=="text"&&n.push(...o.lint(e)),e+=p+1}return n}print(){return super.print({sep:`
16
- `})}};Gt=new WeakSet,vn=function(e){return this.normalizeTitle(e,6,!0,!0).valid}});var He,Cr=b(()=>{"use strict";Lt();He=class extends ye{constructor(){super(...arguments);f(this,"type","link")}}});var wn,Cn=b(()=>{"use strict";wn=l=>{class i extends l{}return i}});var Ve,Nr=b(()=>{"use strict";B();y();C();Ve=class extends x{constructor(i,e=!1,t=h.getConfig(),r=[]){super(i,t,r,{}),this.type=e?"ext-link-url":"free-ext-link"}lint(i=this.getAbsoluteIndex()){let e=super.lint(i),t=`[\uFF0C\uFF1B\u3002\uFF1A\uFF01\uFF1F\uFF08\uFF09]+${this.type==="ext-link-url"?"|\\|+":""}`,r=new RegExp(t,"u"),n=new RegExp(t,"gu"),s;for(let o of this.childNodes){let{type:a,data:p}=o;if(a!=="text"||!r.test(p))continue;s!=null||(s={start:i,...this.getRootNode().posFromIndex(i)});let g=v(o,s,"","warning");n.lastIndex=0;for(let d=n.exec(p);d;d=n.exec(p)){let{index:c,0:m}=d,T=p.slice(0,c).split(`
17
- `),{length:A}=T,{length:E}=T[T.length-1],O=i+c,w=g.startLine+A-1,S=A===1?g.startCol+E:E;e.push({...g,message:h.msg("$1 in URL",m.startsWith("|")?'"|"':h.msg("full-width punctuation")),startIndex:O,endIndex:O+m.length,startLine:w,endLine:w,startCol:S,endCol:S+m.length})}}return e}}});var ue,Xe,Fr=b(()=>{"use strict";ce();Cn();y();C();Nr();Xe=class extends wn(x){constructor(e,t="",r="",n=h.getConfig(),s=[]){super(void 0,n,s,{});f(this,"type","ext-link");k(this,ue,void 0);if(this.insertAt(new Ve(e,!0,n,s)),$(this,ue,t),r){let o=new x(r,n,s,{});o.type="ext-link-text",o.setAttribute("stage",10),this.insertAt(o)}}toString(e){return this.length===1?`[${super.toString(e)}${u(this,ue)}]`:`[${super.toString(e,u(this,ue))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return u(this,ue).length}print(){return super.print(this.length===1?{pre:"[",post:`${u(this,ue)}]`}:{pre:"[",sep:u(this,ue),post:"]"})}};ue=new WeakMap});var lt,Nn=b(()=>{"use strict";y();C();$e();Cr();Fr();lt=class extends x{constructor(e,t,r,n=h.getConfig(),s=[]){super(void 0,n,s);f(this,"type","imagemap-link");this.append(e,t.length===2?new He(...t,n,s):new Xe(...t,n,s),new U(r,n,s))}}});var Fn={};M(Fn,{ImagemapToken:()=>Er});var Er,En=b(()=>{"use strict";B();y();C();$e();$r();Nn();Er=class extends x{constructor(e,t=h.getConfig(),r=[]){super(void 0,t,r,{});f(this,"type","ext-inner");if(!e)return;let n=e.split(`
18
- `),s=new Set(t.protocol.split("|")),o=U,a=!0,p=!1;for(let g of n){let d=g.trim();if(!(p||!d||d.startsWith("#"))){if(a){let[c,...m]=g.split("|"),T=this.normalizeTitle(c,0,!0);if(T.valid&&T.ns===6){let A=new De("imagemap",c,m.length>0?m.join("|"):void 0,t,r);super.insertAt(A),a=!1;continue}else p=!0}else if(g.trim().split(/[\t ]/u)[0]==="desc"){super.insertAt(g);continue}else if(g.includes("[")){let c=g.indexOf("["),m=g.slice(c),T=/^\[{2}([^|]+)(?:\|([^\]]+))?\]{2}[\w\s]*$/u.exec(m);if(T){if(this.normalizeTitle(T[1],0,!0,!1,!0).valid){super.insertAt(new lt(g.slice(0,c),T.slice(1),m.slice(m.indexOf("]]")+2),t,r));continue}}else if(s.has(m.slice(1,m.indexOf(":")+1))||s.has(m.slice(1,m.indexOf("//")+2))){let A=/^\[([^\]\s]+)(?:(\s+)(\S[^\]]*)?)?\][\w\s]*$/u.exec(m);if(A){super.insertAt(new lt(g.slice(0,c),A.slice(1),m.slice(m.indexOf("]")+1),t,r));continue}}}}super.insertAt(new o(g,t,r))}}get image(){return this.childNodes.find(e=>e.type==="imagemap-image")}toString(e){return super.toString(e,`
15
+ `)}getGaps(){return 1}lint(e=this.getAbsoluteIndex()){let{top:t,left:r}=this.getRootNode().posFromIndex(e),n=[];for(let s=0;s<this.length;s++){let o=this.childNodes[s],a=String(o),{length:d}=a,g=a.trim(),p=t+s,c=s?0:r;o.type==="noinclude"&&g&&!/^<!--.*-->$/u.test(g)?n.push({message:h.msg("invalid content in <$1>","gallery"),severity:"error",startIndex:e,endIndex:e+d,startLine:p,endLine:p,startCol:c,endCol:c+d}):o.type!=="noinclude"&&o.type!=="text"&&n.push(...o.lint(e)),e+=d+1}return n}print(){return super.print({sep:`
16
+ `})}};qt=new WeakSet,Sn=function(e){return this.normalizeTitle(e,6,!0,!0).valid}});var Ve,Er=b(()=>{"use strict";It();Ve=class extends Ae{constructor(){super(...arguments);f(this,"type","link")}}});var Cn,Nn=b(()=>{"use strict";Cn=l=>{class i extends l{}return i}});var Xe,Lr=b(()=>{"use strict";R();y();C();Xe=class extends T{constructor(i,e=!1,t=h.getConfig(),r=[]){super(i,t,r,{}),this.type=e?"ext-link-url":"free-ext-link"}lint(i=this.getAbsoluteIndex()){let e=super.lint(i),t=`[\uFF0C\uFF1B\u3002\uFF1A\uFF01\uFF1F\uFF08\uFF09]+${this.type==="ext-link-url"?"|\\|+":""}`,r=new RegExp(t,"u"),n=new RegExp(t,"gu"),s;for(let o of this.childNodes){let{type:a,data:d}=o;if(a!=="text"||!r.test(d))continue;s!=null||(s={start:i,...this.getRootNode().posFromIndex(i)});let g=v(o,s,"","warning");n.lastIndex=0;for(let p=n.exec(d);p;p=n.exec(d)){let{index:c,0:m}=p,x=d.slice(0,c).split(`
17
+ `),{length:A}=x,{length:F}=x[x.length-1],O=i+c,w=g.startLine+A-1,$=A===1?g.startCol+F:F;e.push({...g,message:h.msg("$1 in URL",m.startsWith("|")?'"|"':h.msg("full-width punctuation")),startIndex:O,endIndex:O+m.length,startLine:w,endLine:w,startCol:$,endCol:$+m.length})}}return e}}});var he,Qe,Ir=b(()=>{"use strict";fe();Nn();y();C();Lr();Qe=class extends Cn(T){constructor(e,t="",r="",n=h.getConfig(),s=[]){super(void 0,n,s,{});f(this,"type","ext-link");k(this,he,void 0);if(this.insertAt(new Xe(e,!0,n,s)),S(this,he,t),r){let o=new T(r,n,s,{});o.type="ext-link-text",o.setAttribute("stage",10),this.insertAt(o)}}toString(e){return this.length===1?`[${super.toString(e)}${u(this,he)}]`:`[${super.toString(e,u(this,he))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return u(this,he).length}print(){return super.print(this.length===1?{pre:"[",post:`${u(this,he)}]`}:{pre:"[",sep:u(this,he),post:"]"})}};he=new WeakMap});var pt,Fn=b(()=>{"use strict";y();C();Se();Er();Ir();pt=class extends T{constructor(e,t,r,n=h.getConfig(),s=[]){super(void 0,n,s);f(this,"type","imagemap-link");this.append(e,t.length===2?new Ve(...t,n,s):new Qe(...t,n,s),new _(r,n,s))}}});var En={};z(En,{ImagemapToken:()=>Pr});var Pr,Ln=b(()=>{"use strict";R();y();C();Se();Nr();Fn();Pr=class extends T{constructor(e,t=h.getConfig(),r=[]){super(void 0,t,r,{});f(this,"type","ext-inner");if(!e)return;let n=e.split(`
18
+ `),s=new Set(t.protocol.split("|")),o=_,a=!0,d=!1;for(let g of n){let p=g.trim();if(!(d||!p||p.startsWith("#"))){if(a){let[c,...m]=g.split("|"),x=this.normalizeTitle(c,0,!0);if(x.valid&&x.ns===6){let A=new He("imagemap",c,m.length>0?m.join("|"):void 0,t,r);super.insertAt(A),a=!1;continue}else d=!0}else if(g.trim().split(/[\t ]/u)[0]==="desc"){super.insertAt(g);continue}else if(g.includes("[")){let c=g.indexOf("["),m=g.slice(c),x=/^\[{2}([^|]+)(?:\|([^\]]+))?\]{2}[\w\s]*$/u.exec(m);if(x){if(this.normalizeTitle(x[1],0,!0,!1,!0).valid){super.insertAt(new pt(g.slice(0,c),x.slice(1),m.slice(m.indexOf("]]")+2),t,r));continue}}else if(s.has(m.slice(1,m.indexOf(":")+1))||s.has(m.slice(1,m.indexOf("//")+2))){let A=/^\[([^\]\s]+)(?:(\s+)(\S[^\]]*)?)?\][\w\s]*$/u.exec(m);if(A){super.insertAt(new pt(g.slice(0,c),A.slice(1),m.slice(m.indexOf("]")+1),t,r));continue}}}}super.insertAt(new o(g,t,r))}}get image(){return this.childNodes.find(e=>e.type==="imagemap-image")}toString(e){return super.toString(e,`
19
19
  `)}text(){return super.text(`
20
20
  `).replace(/\n{2,}/gu,`
21
- `)}getGaps(){return 1}lint(e=this.getAbsoluteIndex()){let t=super.lint(e),r={start:e,...this.getRootNode().posFromIndex(e)};return this.image?t.push(...this.childNodes.filter(n=>{let s=String(n).trim();return n.type==="noinclude"&&s&&!s.startsWith("#")}).map(n=>v(n,r,"invalid link in <imagemap>"))):t.push(L(this,r,"<imagemap> without an image")),t}print(){return super.print({sep:`
22
- `})}}});var Ln={};M(Ln,{NowikiToken:()=>Lr});var Lr,In=b(()=>{"use strict";B();y();Te();Lr=class extends V{constructor(){super(...arguments);f(this,"type","ext-inner")}lint(e=this.getAbsoluteIndex()){let{name:t,firstChild:{data:r}}=this;return(t==="templatestyles"||t==="section")&&r?[L(this,{start:e},h.msg("nothing should be in <$1>",t))]:super.lint(e)}}});var Pn,Me,kr=b(()=>{"use strict";B();y();C();pr();yt();Pn=(l,i)=>{let e=new Set(l);return e.delete(i),[...e]},Me=class extends Be{constructor(e,t,r,n,s=h.getConfig(),o=[]){var c;let a=e.toLowerCase(),p=new ke(!t||/^\s/u.test(t)?t:` ${t}`,"ext-attrs",a,s,o),g={...s,ext:Pn(s.ext,a),excludes:[...(c=s.excludes)!=null?c:[]]},d;switch(g.inExt=!0,a){case"tab":g.ext=Pn(g.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":a==="poem"&&g.excludes.push("heading"),d=new x(r,g,o);break;case"pre":{let{PreToken:m}=(dn(),P(ln));d=new m(r,g,o);break}case"dynamicpagelist":{let{ParamTagToken:m}=(hr(),P(pn));d=new m(r,g,o);break}case"inputbox":{g.excludes.push("heading");let{InputboxToken:m}=(bn(),P(Tn));d=new m(r,g,o);break}case"references":{let{NestedToken:m}=(Et(),P(Ft));d=new m(r,/<!--.*?(?:-->|$)|<(ref)(\s[^>]*)?>(.*?)<\/(ref\s*)>/gisu,["ref"],g,o);break}case"choose":{let{NestedToken:m}=(Et(),P(Ft));d=new m(r,/<(option|choicetemplate)(\s[^>]*)?>(.*?)<\/(\1)>/gsu,["option","choicetemplate"],g,o);break}case"combobox":{let{NestedToken:m}=(Et(),P(Ft));d=new m(r,/<(combooption)(\s[^>]*)?>(.*?)<\/(combooption\s*)>/gisu,["combooption"],g,o);break}case"gallery":{let{GalleryToken:m}=($n(),P(Sn));d=new m(r,g,o);break}case"imagemap":{let{ImagemapToken:m}=(En(),P(Fn));d=new m(r,g,o);break}default:{let{NowikiToken:m}=(In(),P(Ln));d=new m(r,g)}}d.setAttribute("name",a),d.type="ext-inner";super(e,p,d,n,s,o);f(this,"type","ext")}lint(e=this.getAbsoluteIndex()){let t=super.lint(e);if(this.name!=="nowiki"&&this.closest("html-attrs, table-attrs")){let r={start:e,...this.getRootNode().posFromIndex(e)};t.push(L(this,r,"extension tag in HTML tag attributes"))}return t}}});var Rn={};M(Rn,{parseCommentAndExt:()=>_i});var _i,Gn=b(()=>{"use strict";y();Zr();$e();Jr();kr();Tr();_i=(l,i=h.getConfig(),e=[],t=!1)=>{let r="<onlyinclude>",n="</onlyinclude>",{length:s}=r;if(t){let d=l.indexOf(r),c=l.indexOf(n,d+s);if(d!==-1&&c!==-1){let m="";for(;d!==-1&&c!==-1;){let T=`\0${e.length}e\x7F`;new Tt(l.slice(d+s,c),i,e),d>0?(new U(l.slice(0,d),i,e),m+=`\0${e.length-1}c\x7F${T}`):m+=T,l=l.slice(c+s+1),d=l.indexOf(r),c=l.indexOf(n,d+s)}return l&&(new U(l,i,e),m+=`\0${e.length-1}c\x7F`),m}}let o=i.ext.join("|"),a=t?"includeonly":"(?:no|only)include",p=t?"noinclude":"includeonly",g=new RegExp(`<!--.*?(?:-->|$)|<${a}(?:\\s[^>]*?)?>|</${a}\\s*>|<(${o})(\\s[^>]*?)?(?:/>|>(.*?)</(\\1\\s*)>)|<(${p})(\\s[^>]*?)?(?:/>|>(.*?)(?:</(${p}\\s*)>|$))`,"gisu");return l.replace(g,(d,c,m,T,A,E,O,w,S)=>{let I=`\0${e.length}${c?"e":"c"}\x7F`;if(c)new Me(c,m,T,A,i,e);else if(d.startsWith("<!--")){let q=d.endsWith("-->");new ze(d.slice(4,q?-3:void 0),q,i,e)}else E?new bt(E,O,w,S,i,e):new U(d,i,e);return I})}});var Ui,Qe,de,Ae,qt,qn=b(()=>{"use strict";B();H();y();C();Ui=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),qt=class extends x{constructor(e,t,r,n,s=h.getConfig(),o=[]){super(void 0,s,o);f(this,"type","html");k(this,Qe,void 0);k(this,de,void 0);k(this,Ae,void 0);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),$(this,Qe,r),$(this,de,n),$(this,Ae,e)}get closing(){return u(this,Qe)}toString(e){return`<${this.closing?"/":""}${u(this,Ae)}${super.toString()}${u(this,de)?"/":""}>`}text(){let{closing:e}=this;return`<${e?"/":""}${u(this,Ae)}${e?"":super.text()}${u(this,de)?"/":""}>`}getAttribute(e){return e==="padding"?u(this,Ae).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){let t=super.lint(e),r;this.name==="h1"&&!this.closing&&(r=L(this,{start:e},"<h1>"),t.push(r)),this.closest("table-attrs")&&(r!=null||(r=L(this,{start:e},"")),t.push({...r,message:h.msg("HTML tag in table attributes")}));try{this.findMatchingTag()}catch(n){if(n instanceof SyntaxError){let{message:s}=n;r!=null||(r=L(this,{start:e},""));let[o]=s.split(":"),a={...r,message:h.msg(o)};if(o==="unclosed tag")a.severity="warning";else if(o==="unmatched closing tag"){let p=this.closest("magic-word");p&&Ui.has(p.name)&&(a.severity="warning")}t.push(a)}}return t}findMatchingTag(){let{html:e}=this.getAttribute("config"),{name:t,parentNode:r,closing:n}=this,s=ct(String(this));if(n&&(u(this,de)||e[2].includes(t)))throw new SyntaxError(`tag that is both closing and self-closing: ${s}`);if(e[2].includes(t)||u(this,de)&&e[1].includes(t))return this;if(u(this,de)&&e[0].includes(t))throw new SyntaxError(`invalid self-closing tag: ${s}`);if(!r)return;let{childNodes:o}=r,a=o.indexOf(this),p=(n?o.slice(0,a).reverse():o.slice(a+1)).filter(d=>d.type==="html"&&d.name===t),g=n?-1:1;for(let d of p)if(u(d,Qe)?g--:g++,g===0)return d;throw new SyntaxError(`${n?"unmatched closing":"unclosed"} tag: ${s}`)}print(){return super.print({pre:`&lt;${this.closing?"/":""}${u(this,Ae)}`,post:`${u(this,de)?"/":""}&gt;`})}};Qe=new WeakMap,de=new WeakMap,Ae=new WeakMap});var Bn={};M(Bn,{parseHtml:()=>Di});var Di,On=b(()=>{"use strict";y();yt();qn();Di=(l,i=h.getConfig(),e=[])=>{let t=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,r=new Set(i.html.flat()),n=l.split("<"),s=n.shift();for(let o of n){let a=t.exec(o),p=a==null?void 0:a[2],g=p==null?void 0:p.toLowerCase();if(!a||!r.has(g)){s+=`<${o}`;continue}let[,d,,c="",m,T]=a,A=new ke(c,"html-attrs",g,i,e),E=A.getAttr("itemprop");if(g==="meta"&&(E===void 0||A.getAttr("content")===void 0)||g==="link"&&(E===void 0||A.getAttr("href")===void 0)){s+=`<${o}`,e.pop();continue}s+=`\0${e.length}x\x7F${T}`,new qt(p,A,d==="/",m==="/>",i,e)}return s}});var Ke,Ir=b(()=>{"use strict";y();C();Ge();yt();Ke=class extends x{constructor(i,e,t,r=h.getConfig(),n=[],s={}){super(void 0,r,n,s),this.append(new ee(e,i,"table-syntax",r,n,{}),new ke(t,"table-attrs",this.type,r,n))}}});var Ze,Pr=b(()=>{"use strict";B();Ir();Ze=class extends Ke{lint(i=this.getAbsoluteIndex()){let e=super.lint(i),t=this.childNodes.find(({type:p})=>p==="table-inter");if(!t)return e;let r=t.childNodes.find(p=>p.text().trim()),n=/^\s*(?:!|\{\{\s*![!-]?\s*\}\})/u,s=p=>p.type==="arg",o=p=>p.type==="magic-word";if(!r||n.test(String(r))||s(r)&&n.test(r.default||""))return e;if(o(r))try{if(r.getPossibleValues().every(p=>n.test(p.text())))return e}catch(p){}let a=v(t,{start:i},"content to be moved out from the table");return e.push({...a,startIndex:a.startIndex+1,startLine:a.startLine+1,startCol:0}),e}}});var Hi,Bt,jn=b(()=>{"use strict";B();or();y();Pr();Ge();Hi=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u,Bt=class extends Ze{constructor(e,t,r=h.getConfig(),n=[]){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,e,t,r,n,{});f(this,"type","table")}get closed(){return this.lastChild.type==="table-syntax"}lint(e=this.getAbsoluteIndex()){let t=super.lint(e);return this.closed||t.push(v(this.firstChild,{start:e},"unclosed table")),t}close(e=`
23
- |}`,t=!1){let r=this.getAttribute("config"),n=this.getAttribute("accum"),s=[e],o=tt.run(()=>super.insertAt(new ee(void 0,Hi,"table-syntax",r,n,{})));this.lastChild.replaceChildren(...s)}}});var Ot,Wn=b(()=>{"use strict";y();Pr();Ot=class extends Ze{constructor(e,t,r=h.getConfig(),n=[]){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,e,t,r,n,{});f(this,"type","tr")}}});var Y,jt,zn,dt,Mn=b(()=>{"use strict";B();y();C();Ir();dt=class extends Ke{constructor(e,t,r=h.getConfig(),n=[]){var p;let s=/\||\0\d+!\x7F/u.exec(t!=null?t:""),o=s?t.slice(0,s.index):"";/\[\[|-\{/u.test(o)&&(s=null,o="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,o,r,n);k(this,jt);f(this,"type","td");k(this,Y,"");s&&([ht(this,Y)._]=s);let a=new x(t==null?void 0:t.slice(((p=s==null?void 0:s.index)!=null?p:NaN)+u(this,Y).length),r,n);a.type="td-inner",a.setAttribute("stage",4),this.insertAt(a)}get subtype(){return N(this,jt,zn).call(this).subtype}afterBuild(){u(this,Y).includes("\0")&&$(this,Y,this.buildFromStr(u(this,Y),"string"))}toString(e){let{childNodes:[t,r,n]}=this;return`${t.toString()}${r.toString()}${u(this,Y)}${n.toString()}`}text(){let{childNodes:[e,t,r]}=this;return`${e.text()}${t.text()}${u(this,Y)}${r.text()}`}getGaps(e){return e===1?u(this,Y).length:0}lint(e=this.getAbsoluteIndex()){let t=super.lint(e);e+=this.getRelativeIndex(this.length-1);for(let r of this.lastChild.childNodes)r.type==="text"&&r.data.includes("|")&&t.push(v(r,{start:e},'additional "|" in a table cell',"warning"));return t}print(){let{childNodes:[e,t,r]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${u(this,Y)}${r.print()}</span>`}};Y=new WeakMap,jt=new WeakSet,zn=function(){let e=this.firstChild.text(),t=e[e.length-1],r="td";return t==="!"?r="th":t==="+"&&(r="caption"),{subtype:r}}});var Je,Rr=b(()=>{"use strict";Te();Je=class extends V{}});var Le,Gr=b(()=>{"use strict";Rr();Le=class extends Je{constructor(){super(...arguments);f(this,"type","dd")}}});var _n={};M(_n,{parseTable:()=>Xi});var Vi,Xi,Un=b(()=>{"use strict";y();C();jn();Wn();Mn();Gr();Vi=l=>l.lastChild.constructor!==x,Xi=({firstChild:{data:l},type:i,name:e},t=h.getConfig(),r=[])=>{let n=[],s=l.split(`
21
+ `)}getGaps(){return 1}lint(e=this.getAbsoluteIndex()){let t=super.lint(e),r={start:e,...this.getRootNode().posFromIndex(e)};return this.image?t.push(...this.childNodes.filter(n=>{let s=String(n).trim();return n.type==="noinclude"&&s&&!s.startsWith("#")}).map(n=>v(n,r,"invalid link in <imagemap>"))):t.push(E(this,r,"<imagemap> without an image")),t}print(){return super.print({sep:`
22
+ `})}}});var In,_e,vr=b(()=>{"use strict";R();y();C();hr();At();In=(l,i)=>{let e=new Set(l);return e.delete(i),[...e]},_e=class extends Oe{constructor(e,t,r,n,s=h.getConfig(),o=[]){var c;let a=e.toLowerCase(),d=new ye(!t||/^\s/u.test(t)?t:` ${t}`,"ext-attrs",a,s,o),g={...s,ext:In(s.ext,a),excludes:[...(c=s.excludes)!=null?c:[]]},p;switch(g.inExt=!0,a){case"tab":g.ext=In(g.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":a==="poem"&&g.excludes.push("heading"),p=new T(r,g,o);break;case"pre":{let{PreToken:m}=(pn(),P(dn));p=new m(r,g,o);break}case"dynamicpagelist":{let{ParamTagToken:m}=(fr(),P(gn));p=new m(r,g,o);break}case"inputbox":{g.excludes.push("heading");let{InputboxToken:m}=(kn(),P(bn));p=new m(r,g,o);break}case"references":{let{NestedToken:m}=(Lt(),P(Et));p=new m(r,/<!--.*?(?:-->|$)|<(ref)(\s[^>]*)?>(.*?)<\/(ref\s*)>/gisu,["ref"],g,o);break}case"choose":{let{NestedToken:m}=(Lt(),P(Et));p=new m(r,/<(option|choicetemplate)(\s[^>]*)?>(.*?)<\/(\1)>/gsu,["option","choicetemplate"],g,o);break}case"combobox":{let{NestedToken:m}=(Lt(),P(Et));p=new m(r,/<(combooption)(\s[^>]*)?>(.*?)<\/(combooption\s*)>/gisu,["combooption"],g,o);break}case"gallery":{let{GalleryToken:m}=(wn(),P($n));p=new m(r,g,o);break}case"imagemap":{let{ImagemapToken:m}=(Ln(),P(En));p=new m(r,g,o);break}default:{let{NowikiToken:m}=(ur(),P(gr));p=new m(r,g)}}p.setAttribute("name",a),p.type="ext-inner";super(e,d,p,n,s,o);f(this,"type","ext")}lint(e=this.getAbsoluteIndex()){let t=super.lint(e);if(this.name!=="nowiki"&&this.closest("html-attrs, table-attrs")){let r={start:e,...this.getRootNode().posFromIndex(e)};t.push(E(this,r,"extension tag in HTML tag attributes"))}return t}}});var Pn={};z(Pn,{parseCommentAndExt:()=>Mi});var Mi,Rn=b(()=>{"use strict";y();Jr();Se();Yr();vr();yr();Mi=(l,i=h.getConfig(),e=[],t=!1)=>{let r="<onlyinclude>",n="</onlyinclude>",{length:s}=r;if(t){let p=l.indexOf(r),c=l.indexOf(n,p+s);if(p!==-1&&c!==-1){let m="";for(;p!==-1&&c!==-1;){let x=`\0${e.length}e\x7F`;new bt(l.slice(p+s,c),i,e),p>0?(new _(l.slice(0,p),i,e),m+=`\0${e.length-1}c\x7F${x}`):m+=x,l=l.slice(c+s+1),p=l.indexOf(r),c=l.indexOf(n,p+s)}return l&&(new _(l,i,e),m+=`\0${e.length-1}c\x7F`),m}}let o=i.ext.join("|"),a=t?"includeonly":"(?:no|only)include",d=t?"noinclude":"includeonly",g=new RegExp(`<!--.*?(?:-->|$)|<${a}(?:\\s[^>]*?)?>|</${a}\\s*>|<(${o})(\\s[^>]*?)?(?:/>|>(.*?)</(\\1\\s*)>)|<(${d})(\\s[^>]*?)?(?:/>|>(.*?)(?:</(${d}\\s*)>|$))`,"gisu");return l.replace(g,(p,c,m,x,A,F,O,w,$)=>{let I=`\0${e.length}${c?"e":"c"}\x7F`;if(c)new _e(c,m,x,A,i,e);else if(p.startsWith("<!--")){let B=p.endsWith("-->");new Me(p.slice(4,B?-3:void 0),B,i,e)}else F?new kt(F,O,w,$,i,e):new _(p,i,e);return I})}});var _i,Ke,pe,ve,Bt,Gn=b(()=>{"use strict";R();D();y();C();_i=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),Bt=class extends T{constructor(e,t,r,n,s=h.getConfig(),o=[]){super(void 0,s,o);f(this,"type","html");k(this,Ke,void 0);k(this,pe,void 0);k(this,ve,void 0);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),S(this,Ke,r),S(this,pe,n),S(this,ve,e)}get closing(){return u(this,Ke)}toString(e){return`<${this.closing?"/":""}${u(this,ve)}${super.toString()}${u(this,pe)?"/":""}>`}text(){let{closing:e}=this;return`<${e?"/":""}${u(this,ve)}${e?"":super.text()}${u(this,pe)?"/":""}>`}getAttribute(e){return e==="padding"?u(this,ve).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){let t=super.lint(e),r;this.name==="h1"&&!this.closing&&(r=E(this,{start:e},"<h1>"),t.push(r)),this.closest("table-attrs")&&(r!=null||(r=E(this,{start:e},"")),t.push({...r,message:h.msg("HTML tag in table attributes")}));try{this.findMatchingTag()}catch(n){if(n instanceof SyntaxError){let{message:s}=n;r!=null||(r=E(this,{start:e},""));let[o]=s.split(":"),a={...r,message:h.msg(o)};if(o==="unclosed tag")a.severity="warning";else if(o==="unmatched closing tag"){let d=this.closest("magic-word");d&&_i.has(d.name)&&(a.severity="warning")}t.push(a)}}return t}findMatchingTag(){let{html:e}=this.getAttribute("config"),{name:t,parentNode:r,closing:n}=this,s=ft(String(this));if(n&&(u(this,pe)||e[2].includes(t)))throw new SyntaxError(`tag that is both closing and self-closing: ${s}`);if(e[2].includes(t)||u(this,pe)&&e[1].includes(t))return this;if(u(this,pe)&&e[0].includes(t))throw new SyntaxError(`invalid self-closing tag: ${s}`);if(!r)return;let{childNodes:o}=r,a=o.indexOf(this),d=(n?o.slice(0,a).reverse():o.slice(a+1)).filter(p=>p.type==="html"&&p.name===t),g=n?-1:1;for(let p of d)if(u(p,Ke)?g--:g++,g===0)return p;throw new SyntaxError(`${n?"unmatched closing":"unclosed"} tag: ${s}`)}print(){return super.print({pre:`&lt;${this.closing?"/":""}${u(this,ve)}`,post:`${u(this,pe)?"/":""}&gt;`})}};Ke=new WeakMap,pe=new WeakMap,ve=new WeakMap});var qn={};z(qn,{parseHtml:()=>Ui});var Ui,Bn=b(()=>{"use strict";y();At();Gn();Ui=(l,i=h.getConfig(),e=[])=>{let t=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,r=new Set(i.html.flat()),n=l.split("<"),s=n.shift();for(let o of n){let a=t.exec(o),d=a==null?void 0:a[2],g=d==null?void 0:d.toLowerCase();if(!a||!r.has(g)){s+=`<${o}`;continue}let[,p,,c="",m,x]=a,A=new ye(c,"html-attrs",g,i,e),F=A.getAttr("itemprop");if(g==="meta"&&(F===void 0||A.getAttr("content")===void 0)||g==="link"&&(F===void 0||A.getAttr("href")===void 0)){s+=`<${o}`,e.pop();continue}s+=`\0${e.length}x\x7F${x}`,new Bt(d,A,p==="/",m==="/>",i,e)}return s}});var Ze,Rr=b(()=>{"use strict";y();C();lt();At();Ze=class extends T{constructor(i,e,t,r=h.getConfig(),n=[],s={}){super(void 0,r,n,s),this.append(new de(e,i,"table-syntax",r,n,{}),new ye(t,"table-attrs",this.type,r,n))}}});var Je,Gr=b(()=>{"use strict";R();Rr();Je=class extends Ze{lint(i=this.getAbsoluteIndex()){let e=super.lint(i),t=this.childNodes.find(({type:d})=>d==="table-inter");if(!t)return e;let r=t.childNodes.find(d=>d.text().trim()),n=/^\s*(?:!|\{\{\s*![!-]?\s*\}\})/u,s=d=>d.type==="arg",o=d=>d.type==="magic-word";if(!r||n.test(String(r))||s(r)&&n.test(r.default||""))return e;if(o(r))try{if(r.getPossibleValues().every(d=>n.test(d.text())))return e}catch(d){}let a=v(t,{start:i},"content to be moved out from the table");return e.push({...a,startIndex:a.startIndex+1,startLine:a.startLine+1,startCol:0}),e}}});var Di,Ot,On=b(()=>{"use strict";R();or();y();Gr();lt();Di=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u,Ot=class extends Je{constructor(e,t,r=h.getConfig(),n=[]){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,e,t,r,n,{});f(this,"type","table")}get closed(){return this.lastChild.type==="table-syntax"}lint(e=this.getAbsoluteIndex()){let t=super.lint(e);return this.closed||t.push(v(this.firstChild,{start:e},h.msg("unclosed $1","table"))),t}close(e=`
23
+ |}`,t=!1){let r=this.getAttribute("config"),n=this.getAttribute("accum"),s=[e],o=rt.run(()=>super.insertAt(new de(void 0,Di,"table-syntax",r,n,{})));this.lastChild.replaceChildren(...s)}}});var jt,jn=b(()=>{"use strict";y();Gr();jt=class extends Je{constructor(e,t,r=h.getConfig(),n=[]){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,e,t,r,n,{});f(this,"type","tr")}}});var Y,Wt,Wn,gt,zn=b(()=>{"use strict";R();y();C();Rr();gt=class extends Ze{constructor(e,t,r=h.getConfig(),n=[]){var d;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,o,r,n);k(this,Wt);f(this,"type","td");k(this,Y,"");s&&([mt(this,Y)._]=s);let a=new T(t==null?void 0:t.slice(((d=s==null?void 0:s.index)!=null?d:NaN)+u(this,Y).length),r,n);a.type="td-inner",a.setAttribute("stage",4),this.insertAt(a)}get subtype(){return N(this,Wt,Wn).call(this).subtype}afterBuild(){u(this,Y).includes("\0")&&S(this,Y,this.buildFromStr(u(this,Y),"string"))}toString(e){let{childNodes:[t,r,n]}=this;return`${t.toString()}${r.toString()}${u(this,Y)}${n.toString()}`}text(){let{childNodes:[e,t,r]}=this;return`${e.text()}${t.text()}${u(this,Y)}${r.text()}`}getGaps(e){return e===1?u(this,Y).length:0}lint(e=this.getAbsoluteIndex()){let t=super.lint(e);e+=this.getRelativeIndex(this.length-1);for(let r of this.lastChild.childNodes)r.type==="text"&&r.data.includes("|")&&t.push(v(r,{start:e},'additional "|" in a table cell',"warning"));return t}print(){let{childNodes:[e,t,r]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${u(this,Y)}${r.print()}</span>`}};Y=new WeakMap,Wt=new WeakSet,Wn=function(){let e=this.firstChild.text(),t=e[e.length-1],r="td";return t==="!"?r="th":t==="+"&&(r="caption"),{subtype:r}}});var Ye,qr=b(()=>{"use strict";be();Ye=class extends H{}});var Ee,Br=b(()=>{"use strict";qr();Ee=class extends Ye{constructor(){super(...arguments);f(this,"type","dd")}}});var Mn={};z(Mn,{parseTable:()=>Vi});var Hi,Vi,_n=b(()=>{"use strict";y();C();On();jn();zn();Br();Hi=l=>l.lastChild.constructor!==T,Vi=({firstChild:{data:l},type:i,name:e},t=h.getConfig(),r=[])=>{let n=[],s=l.split(`
24
24
  `),o=i==="root"||i==="parameter-value"||i==="ext-inner"&&e==="poem"?"":`
25
- ${s.shift()}`,a=(p,g)=>{if(!g){o+=p;return}let{lastChild:d}=g;if(Vi(g)){let c=new x(p,t,r);c.type="table-inter",c.setAttribute("stage",3),g.insertAt(c)}else d.setText(String(d)+p)};for(let p of s){let g=n.pop(),[d]=/^(?:\s|\0\d+c\x7F)*/u.exec(p),c=p.slice(d.length),m=/^(:*)((?:\s|\0\d+c\x7F)*)(\{\||\{(?:\0\d+c\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(c);if(m){for(;g&&g.type!=="td";)g=n.pop();let[,S,I,q,F]=m;S&&new Le(S,t,r),a(`
26
- ${d}${S&&`\0${r.length-1}d\x7F`}${I}\0${r.length}b\x7F`,g),n.push(...g?[g]:[],new Bt(q,F,t,r));continue}else if(!g){o+=`
27
- ${p}`;continue}let T=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(c);if(!T){a(`
28
- ${p}`,g),n.push(g);continue}let[,A,E,O,w]=T;if(A){for(;g.type!=="table";)g=n.pop();g.close(`
29
- ${d}${A}`,!0),a(w,n[n.length-1])}else if(E){g.type==="td"&&(g=n.pop()),g.type==="tr"&&(g=n.pop());let S=new Ot(`
30
- ${d}${E}`,w,t,r);n.push(g,S),g.insertAt(S)}else{g.type==="td"&&(g=n.pop());let S=O==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,I=S.exec(w),q=0,F=`
31
- ${d}${O}`;for(;I;)g.insertAt(new dt(F,w.slice(q,I.index),t,r)),{lastIndex:q}=S,[F]=I,I=S.exec(w);let j=new dt(F,w.slice(q),t,r);n.push(g,j),g.insertAt(j)}}return o.slice(1)}});var Wt,Dn=b(()=>{"use strict";Te();Wt=class extends V{constructor(){super(...arguments);f(this,"type","hr")}}});var zt,Hn=b(()=>{"use strict";qe();y();Te();zt=class extends ae(V){constructor(e,t,r=h.getConfig(),n=[]){super(e,r,n);f(this,"type","double-underscore")}getAttribute(e){return e==="padding"?2:super.getAttribute(e)}toString(e){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}}});var Vn={};M(Vn,{parseHrAndDoubleUnderscore:()=>Qi});var Qi,Xn=b(()=>{"use strict";y();Dn();Hn();mr();Qi=({firstChild:{data:l},type:i,name:e},t=h.getConfig(),r=[])=>{let{doubleUnderscore:n}=t,s=new Set(n[0]),o=new Set(n[1]);return i!=="root"&&(i!=="ext-inner"||e!=="poem")&&(l=`\0${l}`),l=l.replace(/^((?:\0\d+c\x7F)*)(-{4,})/gmu,(a,p,g)=>(new Wt(g,t,r),`${p}\0${r.length-1}r\x7F`)).replace(new RegExp(`__(${n.flat().join("|")})__`,"giu"),(a,p)=>{let g=o.has(p);return g||s.has(p.toLowerCase())?(new zt(p,g,t,r),`\0${r.length-1}u\x7F`):a}).replace(/^((?:\0\d+c\x7F)*)(={1,6})(.+)\2((?:[^\S\n]|\0\d+c\x7F)*)$/gmu,(a,p,g,d,c)=>{let m=`${p}\0${r.length}h\x7F`;return new We(g.length,[d,c],t,r),m}),i==="root"||i==="ext-inner"&&e==="poem"?l:l.slice(1)}});var Mt,Qn=b(()=>{"use strict";Lt();Mt=class extends ye{constructor(){super(...arguments);f(this,"type","category")}}});var _t,Kn=b(()=>{"use strict";B();y();Te();_t=class extends V{constructor(){super(...arguments);f(this,"type","quote")}lint(e=this.getAbsoluteIndex()){let{previousSibling:t,nextSibling:r}=this,n=h.msg('lonely "$1"',"'"),s=[],o;if((t==null?void 0:t.type)==="text"&&t.data.endsWith("'")){o=L(this,{start:e},n);let{startIndex:a,startLine:p,startCol:g}=o,[,{length:d}]=/(?:^|[^'])('+)$/u.exec(t.data),c=e-d;s.push({...o,startIndex:c,endIndex:a,startCol:g-d,endLine:p,endCol:g})}if((r==null?void 0:r.type)==="text"&&r.data.startsWith("'")){o!=null||(o=L(this,{start:e},n));let{endIndex:a,endLine:p,endCol:g}=o,[{length:d}]=/^'+/u.exec(r.data),c=a+d;s.push({...o,startIndex:a,endIndex:c,startLine:p,startCol:g,endCol:g+d})}return s}}});var qr={};M(qr,{parseQuotes:()=>Ki});var Ki,Br=b(()=>{"use strict";y();Kn();Ki=(l,i=h.getConfig(),e=[])=>{var g;let t=l.split(/('{2,})/u),{length:r}=t;if(r===1)return l;let n=0,s=0,o,a,p;for(let d=1;d<r;d+=2){let{length:c}=t[d];switch(c){case 2:s++;break;case 4:t[d-1]+="'",t[d]="'''";case 3:if(n++,o!==void 0)break;t[d-1].endsWith(" ")?a===void 0&&p===void 0&&(p=d):t[d-1].slice(-2,-1)===" "?o=d:a!=null||(a=d);break;default:t[d-1]+="'".repeat(c-5),t[d]="'''''",s++,n++}}if(s%2===1&&n%2===1){let d=(g=o!=null?o:a)!=null?g:p;d!==void 0&&(t[d]="''",t[d-1]+="'")}for(let d=1;d<r;d+=2)new _t(t[d],i,e),t[d]=`\0${e.length-1}q\x7F`;return t.join("")}});var Jn={};M(Jn,{parseLinks:()=>Zn});var Zn,Yn=b(()=>{"use strict";y();Cr();Sr();Qn();Zn=(l,i=h.getConfig(),e=[])=>{let{parseQuotes:t}=(Br(),P(qr)),r=i.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]]))?\]\](.*)$/su:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]])?)?\]\](.*)$/su,n=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)(.*)$/su,s=new RegExp(`^\\s*(?:${i.protocol})`,"iu"),o=l.split("[["),a=o.shift();for(let p=0;p<o.length;p++){let g=!1,d,c,m,T,A=o[p],E=r.exec(A);if(E)[,d,c,m,T]=E,T.startsWith("]")&&(m!=null&&m.includes("["))&&(m+="]",T=T.slice(1));else{let F=n.exec(A);F&&(g=!0,[,d,c,m]=F)}if(d===void 0||s.test(d)||/\0\d+[exhbru]\x7F/u.test(d)){a+=`[[${A}`;continue}let O=d.trim().startsWith(":");if(O&&g){a+=`[[${A}`;continue}let w=h.normalizeTitle(d,0,!1,i,!0,!0,!0),{ns:S,valid:I}=w;if(I){if(g){if(S!==6){a+=`[[${A}`;continue}let F=!1;for(p++;p<o.length;p++){let j=o[p],Q=j.split("]]");if(Q.length>2){F=!0,m+=`[[${Q[0]}]]${Q[1]}`,T=Q.slice(2).join("]]");break}else if(Q.length===2)m+=`[[${Q[0]}]]${Q[1]}`;else{m+=`[[${j}`;break}}if(m=Zn(m,i,e),!F){a+=`[[${d}${c}${m}`;continue}}}else{a+=`[[${A}`;continue}m&&(m=t(m,i,e)),a+=`\0${e.length}l\x7F${T}`;let q=He;O||(S===6?q=Ue:S===14&&(q=Mt)),m===void 0&&c&&(m=""),new q(d,m,i,e,c)}return a}});var ei={};M(ei,{parseExternalLinks:()=>Zi});var Zi,ti=b(()=>{"use strict";H();y();Fr();Zi=(l,i=h.getConfig(),e=[])=>{let t=new RegExp(`\\[((?:(?:${i.protocol}|//)${fe}|\0\\d+m\x7F)${xe})(\\p{Zs}*)([^\\]-\b
32
- -\uFFFD]*)\\]`,"giu");return l.replace(t,(r,n,s,o)=>{let{length:a}=e,p=/&[lg]t;/u.exec(n);return p&&(n=n.slice(0,p.index),s="",o=`${n.slice(p.index)}${s}${o}`),new Xe(n,s,o,i,e),`\0${a}w\x7F`})}});var ri={};M(ri,{parseMagicLinks:()=>Ji});var Ji,ni=b(()=>{"use strict";H();y();Nr();Ji=(l,i=h.getConfig(),e=[])=>{let t=new RegExp(`(^|[^\\p{L}\\d_])(?:${i.protocol})(${fe}${xe})`,"giu");return l.replace(t,(r,n,s)=>{let o="",a=n?r.slice(1):r,p=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(a);p&&(o=a.slice(p.index),a=a.slice(0,p.index));let g=new RegExp(`[,;.:!?${a.includes("(")?"":")"}]+$`,"u"),d=g.exec(a);if(d){let c=0;d[0].startsWith(";")&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(a.slice(0,d.index))&&(c=1),o=`${a.slice(d.index+c)}${o}`,a=a.slice(0,d.index+c)}return o.length>=s.length?r:(new Ve(a,!1,i,e),`${n}\0${e.length-1}w\x7F${o}`)})}});var Ut,ii=b(()=>{"use strict";Rr();Ut=class extends Je{constructor(){super(...arguments);f(this,"type","list")}}});var si={};M(si,{parseList:()=>Yi});var Yi,oi=b(()=>{"use strict";y();ii();Gr();Yi=(l,i=h.getConfig(),e=[])=>{let t=/^((?:\0\d+c\x7F)*)([;:*#]+)/u.exec(l);if(!t)return l;let[r,n,s]=t,o=`${n}\0${e.length}d\x7F${l.slice(r.length)}`,a=s.split(";").length-1;if(new Ut(s,i,e),!a)return o;let p=/:+|-\{/gu,g=p.exec(o),d=0;for(;g&&a;){let{0:c,index:m}=g;if(c.startsWith(":")){if(c.length>=a)return new Le(":".repeat(a),i,e),`${o.slice(0,m)}\0${e.length-1}d\x7F${o.slice(m+a)}`;o=`${o.slice(0,m)}\0${e.length}d\x7F${o.slice(p.lastIndex)}`,a-=c.length,p.lastIndex=m+4+String(e.length).length,new Le(c,i,e)}else if(c==="-{"){if(!d){let{lastIndex:T}=p;p=/-\{|\}-/gu,p.lastIndex=T}d++}else if(d--,!d){let{lastIndex:T}=p;p=/:+|-\{/gu,p.lastIndex=T}g=p.exec(o)}return o}});var ai,li=b(()=>{"use strict";ai=l=>{class i extends l{}return i}});var es,he,Dt,di=b(()=>{"use strict";B();y();C();pe();es=new Set(["A","T","R","D","-","H","N"]),Dt=class extends x{constructor(e,t=h.getConfig(),r=[]){super(void 0,t,r,{});f(this,"type","converter-flags");k(this,he,void 0);this.append(...e.map(n=>new R(n,"converter-flag",t,r)))}afterBuild(){$(this,he,this.childNodes.map(e=>e.text().trim()))}toString(e){return super.toString(e,";")}text(){return super.text(";")}getGaps(){return 1}getUnknownFlags(){return new Set(u(this,he).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(u(this,he).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex()){let t=this.getVariantFlags(),r=this.getUnknownFlags(),n=new Set(u(this,he).filter(c=>es.has(c))),{length:s}=u(this,he).filter(c=>!c),o=u(this,he).length-r.size-s,a=super.lint(e);if(t.size===o||n.size===o)return a;let p={start:e,...this.getRootNode().posFromIndex(e)},{childNodes:g,length:d}=this;for(let c=0;c<d;c++){let m=g[c],T=m.text().trim();T&&!t.has(T)&&!r.has(T)&&(t.size>0||!n.has(T))&&a.push(v(m,p,"invalid conversion flag"))}return a}print(){return super.print({sep:";"})}};he=new WeakMap});var Ye,pi=b(()=>{"use strict";y();C();pe();Ye=class extends x{constructor(e,t=!0,r=h.getConfig(),n=[]){super(void 0,r,n);f(this,"type","converter-rule");let s=e.indexOf(":"),o=e.slice(0,s).indexOf("=>"),a=o===-1?e.slice(0,s):e.slice(o+2,s);t&&r.variants.includes(a.trim())?(super.insertAt(new R(a,"converter-rule-variant",r,n)),super.insertAt(new R(e.slice(s+1),"converter-rule-to",r,n)),o!==-1&&super.insertAt(new R(e.slice(0,o),"converter-rule-from",r,n),0)):super.insertAt(new R(e,"converter-rule-to",r,n))}toString(e){let{childNodes:t}=this;if(t.length===3){let[r,n,s]=t;return`${r.toString(e)}=>${n.toString(e)}:${s.toString(e)}`}return super.toString(e,":")}text(){let{childNodes:e}=this;if(e.length===3){let[t,r,n]=e;return`${t.text()}=>${r.text()}:${n.text()}`}return super.text(":")}getGaps(e){return e===0&&this.length===3?2:1}print(){let{childNodes:e}=this;if(e.length===3){let[t,r,n]=e;return`<span class="wpb-converter-rule">${t.print()}=>${r.print()}:${n.print()}</span>`}return super.print({sep:":"})}}});var Ht,gi=b(()=>{"use strict";H();li();y();C();di();pi();Ht=class extends ai(x){constructor(e,t,r=h.getConfig(),n=[]){super(void 0,r,n);f(this,"type","converter");this.append(new Dt(e,r,n));let[s]=t,o=s.includes(":"),a=new Ye(s,o,r,n);o&&a.length===1?this.insertAt(new Ye(t.join(";"),!1,r,n)):this.append(a,...t.slice(1).map(p=>new Ye(p,!0,r,n)))}toString(e){let{childNodes:[t,...r]}=this;return`-{${t.toString()}${t.length>0?"|":""}${r.map(n=>n.toString()).join(";")}}-`}text(){let{childNodes:[e,...t]}=this;return`-{${e.text()}|${se(t,";")}}-`}getAttribute(e){return e==="padding"?2:super.getAttribute(e)}getGaps(e){return e||this.firstChild.length>0?1:0}print(){let{childNodes:[e,...t]}=this;return`<span class="wpb-converter">-{${e.print()}${e.length>0?"|":""}${oe(t,{sep:";"})}}-</span>`}}});var ui={};M(ui,{parseConverter:()=>ts});var ts,hi=b(()=>{"use strict";y();gi();ts=(l,i=h.getConfig(),e=[])=>{let t=/-\{/gu,r=/-\{|\}-/gu,n=[],s=t,o=s.exec(l);for(;o;){let{0:a,index:p}=o;if(a==="}-"){let g=n.pop(),{length:d}=e,c=l.slice(g.index+2,p),m=c.indexOf("|"),[T,A]=m===-1?[[],c]:[c.slice(0,m).split(";"),c.slice(m+1)],E=A.replace(/(&[#a-z\d]+);/giu,"$1"),O=`(?:${i.variants.join("|")})`,w=E.split(new RegExp(`;(?=\\s*(?:${O}|[^;]*?=>\\s*${O})\\s*:)`,"u")).map(S=>S.replace(/\x01/gu,";"));new Ht(T,w,i,e),l=`${l.slice(0,g.index)}\0${d}v\x7F${l.slice(p+2)}`,n.length===0&&(s=t),s.lastIndex=g.index+3+String(d).length}else n.push(o),s=r,s.lastIndex=p+2;o=s.exec(l)}return l}});var jr={};M(jr,{Token:()=>x});var re,G,W,Ie,pt,Or,Vt,mi,Xt,ci,Qt,fi,Kt,xi,Zt,Ti,Jt,bi,Yt,ki,er,yi,tr,Ai,rr,vi,nr,Si,Wr,x,C=b(()=>{"use strict";H();ce();y();Xr();Kr();Wr=class Wr extends ft{constructor(e,t=h.getConfig(),r=[],n){super();k(this,pt);k(this,Vt);k(this,Xt);k(this,Qt);k(this,Kt);k(this,Zt);k(this,Jt);k(this,Yt);k(this,er);k(this,tr);k(this,rr);k(this,nr);f(this,"type","root");k(this,re,0);k(this,G,void 0);k(this,W,void 0);k(this,Ie,void 0);typeof e=="string"&&this.insertAt(e),$(this,G,t),$(this,W,r),r.push(this)}parseOnce(e=u(this,re),t=!1){if(e<u(this,re)||!this.getAttribute("plain")||this.length===0)return this;switch(e){case 0:this.type==="root"&&u(this,W).shift(),$(this,Ie,t),N(this,Vt,mi).call(this,t);break;case 1:N(this,Xt,ci).call(this);break;case 2:N(this,Qt,fi).call(this);break;case 3:N(this,Kt,xi).call(this);break;case 4:N(this,Zt,Ti).call(this);break;case 5:N(this,Jt,bi).call(this);break;case 6:N(this,Yt,ki).call(this);break;case 7:N(this,er,yi).call(this);break;case 8:N(this,tr,Ai).call(this);break;case 9:N(this,rr,vi).call(this);break;case 10:N(this,nr,Si).call(this)}if(this.type==="root")for(let r of u(this,W))r.parseOnce(e,t);return ht(this,re)._++,this}buildFromStr(e,t){let r=e.split(/[\0\x7F]/u).map((n,s)=>{if(s%2===0)return new it(n);if(Number.isNaN(Number(n[n.length-1])))return u(this,W)[Number(n.slice(0,-1))];throw new Error(`\u89E3\u6790\u9519\u8BEF\uFF01\u672A\u6B63\u786E\u6807\u8BB0\u7684 Token\uFF1A${n}`)});return t==="string"?r.map(String).join(""):t==="text"?se(r):r}afterBuild(){if(this.type==="root")for(let e of u(this,W))e.afterBuild()}parse(e=11,t=!1){for(;u(this,re)<e;)this.parseOnce(u(this,re),t);return e&&(N(this,pt,Or).call(this),this.afterBuild()),this}getAttribute(e){switch(e){case"plain":return this.constructor===Wr;case"config":return JSON.parse(JSON.stringify(u(this,G)));case"accum":return u(this,W);case"include":{if(u(this,Ie)!==void 0)return u(this,Ie);let t=this.getRootNode();return t!==this?t.getAttribute("include"):!1}default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":u(this,re)===0&&this.type==="root"&&u(this,W).shift(),$(this,re,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let r=typeof e=="string"?new it(e):e;return super.insertAt(r,t),r.type==="root"&&(r.type="plain"),r}normalizeTitle(e,t=0,r=!1,n=!1,s=!1){return h.normalizeTitle(e,t,u(this,Ie),u(this,G),r,n,s)}};re=new WeakMap,G=new WeakMap,W=new WeakMap,Ie=new WeakMap,pt=new WeakSet,Or=function(){var n;$(this,re,11);let{length:e,firstChild:t}=this,r=String(t);if(e===1&&t.type==="text"&&r.includes("\0")&&(this.replaceChildren(...this.buildFromStr(r)),this.normalize(),this.type==="root"))for(let s of u(this,W))N(n=s,pt,Or).call(n)},Vt=new WeakSet,mi=function(e){let{parseCommentAndExt:t}=(Gn(),P(Rn));this.setText(t(String(this.firstChild),u(this,G),u(this,W),e))},Xt=new WeakSet,ci=function(){let{parseBraces:e}=(fr(),P(xn)),t=this.type==="root"?String(this.firstChild):`\0${String(this.firstChild)}`,r=e(t,u(this,G),u(this,W));this.setText(this.type==="root"?r:r.slice(1))},Qt=new WeakSet,fi=function(){var t;if((t=u(this,G).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(On(),P(Bn));this.setText(e(String(this.firstChild),u(this,G),u(this,W)))},Kt=new WeakSet,xi=function(){var t;if((t=u(this,G).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(Un(),P(_n));this.setText(e(this,u(this,G),u(this,W)))},Zt=new WeakSet,Ti=function(){var t;if((t=u(this,G).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Xn(),P(Vn));this.setText(e(this,u(this,G),u(this,W)))},Jt=new WeakSet,bi=function(){let{parseLinks:e}=(Yn(),P(Jn));this.setText(e(String(this.firstChild),u(this,G),u(this,W)))},Yt=new WeakSet,ki=function(){var r;if((r=u(this,G).excludes)!=null&&r.includes("quote"))return;let{parseQuotes:e}=(Br(),P(qr)),t=String(this.firstChild).split(`
33
- `);for(let n=0;n<t.length;n++)t[n]=e(t[n],u(this,G),u(this,W));this.setText(t.join(`
34
- `))},er=new WeakSet,yi=function(){var t;if((t=u(this,G).excludes)!=null&&t.includes("extLink"))return;let{parseExternalLinks:e}=(ti(),P(ei));this.setText(e(String(this.firstChild),u(this,G),u(this,W)))},tr=new WeakSet,Ai=function(){var t;if((t=u(this,G).excludes)!=null&&t.includes("magicLink"))return;let{parseMagicLinks:e}=(ni(),P(ri));this.setText(e(String(this.firstChild),u(this,G),u(this,W)))},rr=new WeakSet,vi=function(){var n;if((n=u(this,G).excludes)!=null&&n.includes("list"))return;let{parseList:e}=(oi(),P(si)),t=String(this.firstChild).split(`
35
- `),r=this.type==="root"||this.type==="ext-inner"&&this.name==="poem"?0:1;for(;r<t.length;r++)t[r]=e(t[r],u(this,G),u(this,W));this.setText(t.join(`
36
- `))},nr=new WeakSet,Si=function(){if(u(this,G).variants.length>0){let{parseConverter:e}=(hi(),P(ui));this.setText(e(String(this.firstChild),u(this,G),u(this,W)))}};x=Wr});var rs,Pe,$i,ns,h,y=b(()=>{or();ce();rs=l=>l.replace(/[\0\x7F]/gu,""),Pe={i18n:void 0,getConfig(){return{..._r,...this.config,excludes:[]}},msg(l,i=""){var e,t;return l&&((t=(e=this.i18n)==null?void 0:e[l])!=null?t:l).replace("$1",this.msg(i))},normalizeTitle(l,i=0,e=!1,t=Pe.getConfig(),r=!1,n=!1,s=!1){let{Title:o}=(Hr(),P(Dr));if(r)return new o(l,i,t,n,s);let{Token:a}=(C(),P(jr)),p=tt.run(()=>new a(l,t).parseOnce(0,e).parseOnce());return new o(String(p),i,t,n,s)},parse(l,i,e=11,t=Pe.getConfig()){let{Token:r}=(C(),P(jr));return tt.run(()=>new r(rs(l),t).parse(e,i))}},$i={},ns=new Set(["normalizeTitle","parse"]);for(let l in Pe)ns.has(l)||($i[l]={enumerable:!1});Object.defineProperties(Pe,$i);typeof self=="object"?Object.assign(self,{Parser:Pe}):typeof globalThis=="object"&&Object.assign(globalThis,{Parser:Pe});h=Pe});y();})();
25
+ ${s.shift()}`,a=(d,g)=>{if(!g){o+=d;return}let{lastChild:p}=g;if(Hi(g)){let c=new T(d,t,r);c.type="table-inter",c.setAttribute("stage",3),g.insertAt(c)}else p.setText(String(p)+d)};for(let d of s){let g=n.pop(),[p]=/^(?:\s|\0\d+c\x7F)*/u.exec(d),c=d.slice(p.length),m=/^(:*)((?:\s|\0\d+c\x7F)*)(\{\||\{(?:\0\d+c\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(c);if(m){for(;g&&g.type!=="td";)g=n.pop();let[,$,I,B,L]=m;$&&new Ee($,t,r),a(`
26
+ ${p}${$&&`\0${r.length-1}d\x7F`}${I}\0${r.length}b\x7F`,g),n.push(...g?[g]:[],new Ot(B,L,t,r));continue}else if(!g){o+=`
27
+ ${d}`;continue}let x=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(c);if(!x){a(`
28
+ ${d}`,g),n.push(g);continue}let[,A,F,O,w]=x;if(A){for(;g.type!=="table";)g=n.pop();g.close(`
29
+ ${p}${A}`,!0),a(w,n[n.length-1])}else if(F){g.type==="td"&&(g=n.pop()),g.type==="tr"&&(g=n.pop());let $=new jt(`
30
+ ${p}${F}`,w,t,r);n.push(g,$),g.insertAt($)}else{g.type==="td"&&(g=n.pop());let $=O==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,I=$.exec(w),B=0,L=`
31
+ ${p}${O}`;for(;I;)g.insertAt(new gt(L,w.slice(B,I.index),t,r)),{lastIndex:B}=$,[L]=I,I=$.exec(w);let j=new gt(L,w.slice(B),t,r);n.push(g,j),g.insertAt(j)}}return o.slice(1)}});var zt,Un=b(()=>{"use strict";be();zt=class extends H{constructor(){super(...arguments);f(this,"type","hr")}}});var Mt,Dn=b(()=>{"use strict";Be();y();be();Mt=class extends ae(H){constructor(e,t,r=h.getConfig(),n=[]){super(e,r,n);f(this,"type","double-underscore")}getAttribute(e){return e==="padding"?2:super.getAttribute(e)}toString(e){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}}});var Hn={};z(Hn,{parseHrAndDoubleUnderscore:()=>Xi});var Xi,Vn=b(()=>{"use strict";y();Un();Dn();Tr();Xi=({firstChild:{data:l},type:i,name:e},t=h.getConfig(),r=[])=>{let{doubleUnderscore:n}=t,s=new Set(n[0]),o=new Set(n[1]);return i!=="root"&&(i!=="ext-inner"||e!=="poem")&&(l=`\0${l}`),l=l.replace(/^((?:\0\d+c\x7F)*)(-{4,})/gmu,(a,d,g)=>(new zt(g,t,r),`${d}\0${r.length-1}r\x7F`)).replace(new RegExp(`__(${n.flat().join("|")})__`,"giu"),(a,d)=>{let g=o.has(d);return g||s.has(d.toLowerCase())?(new Mt(d,g,t,r),`\0${r.length-1}u\x7F`):a}).replace(/^((?:\0\d+c\x7F)*)(={1,6})(.+)\2((?:[^\S\n]|\0\d+c\x7F)*)$/gmu,(a,d,g,p,c)=>{let m=`${d}\0${r.length}h\x7F`;return new ze(g.length,[p,c],t,r),m}),i==="root"||i==="ext-inner"&&e==="poem"?l:l.slice(1)}});var _t,Xn=b(()=>{"use strict";It();_t=class extends Ae{constructor(){super(...arguments);f(this,"type","category")}}});var Ut,Qn=b(()=>{"use strict";R();y();be();Ut=class extends H{constructor(){super(...arguments);f(this,"type","quote")}lint(e=this.getAbsoluteIndex()){let{previousSibling:t,nextSibling:r}=this,n=h.msg('lonely "$1"',"'"),s=[],o;if((t==null?void 0:t.type)==="text"&&t.data.endsWith("'")){o=E(this,{start:e},n);let{startIndex:a,startLine:d,startCol:g}=o,[,{length:p}]=/(?:^|[^'])('+)$/u.exec(t.data),c=e-p;s.push({...o,startIndex:c,endIndex:a,startCol:g-p,endLine:d,endCol:g})}if((r==null?void 0:r.type)==="text"&&r.data.startsWith("'")){o!=null||(o=E(this,{start:e},n));let{endIndex:a,endLine:d,endCol:g}=o,[{length:p}]=/^'+/u.exec(r.data),c=a+p;s.push({...o,startIndex:a,endIndex:c,startLine:d,startCol:g,endCol:g+p})}return s}}});var Or={};z(Or,{parseQuotes:()=>Qi});var Qi,jr=b(()=>{"use strict";y();Qn();Qi=(l,i=h.getConfig(),e=[])=>{var g;let t=l.split(/('{2,})/u),{length:r}=t;if(r===1)return l;let n=0,s=0,o,a,d;for(let p=1;p<r;p+=2){let{length:c}=t[p];switch(c){case 2:s++;break;case 4:t[p-1]+="'",t[p]="'''";case 3:if(n++,o!==void 0)break;t[p-1].endsWith(" ")?a===void 0&&d===void 0&&(d=p):t[p-1].slice(-2,-1)===" "?o=p:a!=null||(a=p);break;default:t[p-1]+="'".repeat(c-5),t[p]="'''''",s++,n++}}if(s%2===1&&n%2===1){let p=(g=o!=null?o:a)!=null?g:d;p!==void 0&&(t[p]="''",t[p-1]+="'")}for(let p=1;p<r;p+=2)new Ut(t[p],i,e),t[p]=`\0${e.length-1}q\x7F`;return t.join("")}});var Zn={};z(Zn,{parseLinks:()=>Kn});var Kn,Jn=b(()=>{"use strict";y();Er();Cr();Xn();Kn=(l,i=h.getConfig(),e=[])=>{let{parseQuotes:t}=(jr(),P(Or)),r=i.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]]))?\]\](.*)$/su:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]])?)?\]\](.*)$/su,n=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)(.*)$/su,s=new RegExp(`^\\s*(?:${i.protocol})`,"iu"),o=l.split("[["),a=o.shift();for(let d=0;d<o.length;d++){let g=!1,p,c,m,x,A=o[d],F=r.exec(A);if(F)[,p,c,m,x]=F,x.startsWith("]")&&(m!=null&&m.includes("["))&&(m+="]",x=x.slice(1));else{let L=n.exec(A);L&&(g=!0,[,p,c,m]=L)}if(p===void 0||s.test(p)||/\0\d+[exhbru]\x7F/u.test(p)){a+=`[[${A}`;continue}let O=p.trim().startsWith(":");if(O&&g){a+=`[[${A}`;continue}let w=h.normalizeTitle(p,0,!1,i,!0,!0,!0),{ns:$,valid:I}=w;if(I){if(g){if($!==6){a+=`[[${A}`;continue}let L=!1;for(d++;d<o.length;d++){let j=o[d],V=j.split("]]");if(V.length>2){L=!0,m+=`[[${V[0]}]]${V[1]}`,x=V.slice(2).join("]]");break}else if(V.length===2)m+=`[[${V[0]}]]${V[1]}`;else{m+=`[[${j}`;break}}if(m=Kn(m,i,e),!L){a+=`[[${p}${c}${m}`;continue}}}else{a+=`[[${A}`;continue}m&&(m=t(m,i,e)),a+=`\0${e.length}l\x7F${x}`;let B=Ve;O||($===6?B=De:$===14&&(B=_t)),m===void 0&&c&&(m=""),new B(p,m,i,e,c)}return a}});var Yn={};z(Yn,{parseExternalLinks:()=>Ki});var Ki,ei=b(()=>{"use strict";D();y();Ir();Ki=(l,i=h.getConfig(),e=[])=>{let t=new RegExp(`\\[((?:(?:${i.protocol}|//)${Te}|\0\\d+m\x7F)${xe})(\\p{Zs}*)([^\\]-\b
32
+ -\uFFFD]*)\\]`,"giu");return l.replace(t,(r,n,s,o)=>{let{length:a}=e,d=/&[lg]t;/u.exec(n);return d&&(n=n.slice(0,d.index),s="",o=`${n.slice(d.index)}${s}${o}`),new Qe(n,s,o,i,e),`\0${a}w\x7F`})}});var ti={};z(ti,{parseMagicLinks:()=>Zi});var Zi,ri=b(()=>{"use strict";D();y();Lr();Zi=(l,i=h.getConfig(),e=[])=>{let t=new RegExp(`(^|[^\\p{L}\\d_])(?:${i.protocol})(${Te}${xe})`,"giu");return l.replace(t,(r,n,s)=>{let o="",a=n?r.slice(1):r,d=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(a);d&&(o=a.slice(d.index),a=a.slice(0,d.index));let g=new RegExp(`[,;.:!?${a.includes("(")?"":")"}]+$`,"u"),p=g.exec(a);if(p){let c=0;p[0].startsWith(";")&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(a.slice(0,p.index))&&(c=1),o=`${a.slice(p.index+c)}${o}`,a=a.slice(0,p.index+c)}return o.length>=s.length?r:(new Xe(a,!1,i,e),`${n}\0${e.length-1}w\x7F${o}`)})}});var Dt,ni=b(()=>{"use strict";qr();Dt=class extends Ye{constructor(){super(...arguments);f(this,"type","list")}}});var ii={};z(ii,{parseList:()=>Ji});var Ji,si=b(()=>{"use strict";y();ni();Br();Ji=(l,i=h.getConfig(),e=[])=>{let t=/^((?:\0\d+c\x7F)*)([;:*#]+)/u.exec(l);if(!t)return l;let[r,n,s]=t,o=`${n}\0${e.length}d\x7F${l.slice(r.length)}`,a=s.split(";").length-1;if(new Dt(s,i,e),!a)return o;let d=/:+|-\{/gu,g=d.exec(o),p=0;for(;g&&a;){let{0:c,index:m}=g;if(c.startsWith(":")){if(c.length>=a)return new Ee(":".repeat(a),i,e),`${o.slice(0,m)}\0${e.length-1}d\x7F${o.slice(m+a)}`;o=`${o.slice(0,m)}\0${e.length}d\x7F${o.slice(d.lastIndex)}`,a-=c.length,d.lastIndex=m+4+String(e.length).length,new Ee(c,i,e)}else if(c==="-{"){if(!p){let{lastIndex:x}=d;d=/-\{|\}-/gu,d.lastIndex=x}p++}else if(p--,!p){let{lastIndex:x}=d;d=/:+|-\{/gu,d.lastIndex=x}g=d.exec(o)}return o}});var oi,ai=b(()=>{"use strict";oi=l=>{class i extends l{}return i}});var Yi,me,Ht,li=b(()=>{"use strict";R();y();C();ge();Yi=new Set(["A","T","R","D","-","H","N"]),Ht=class extends T{constructor(e,t=h.getConfig(),r=[]){super(void 0,t,r,{});f(this,"type","converter-flags");k(this,me,void 0);this.append(...e.map(n=>new G(n,"converter-flag",t,r)))}afterBuild(){S(this,me,this.childNodes.map(e=>e.text().trim()))}toString(e){return super.toString(e,";")}text(){return super.text(";")}getGaps(){return 1}getUnknownFlags(){return new Set(u(this,me).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(u(this,me).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex()){let t=this.getVariantFlags(),r=this.getUnknownFlags(),n=new Set(u(this,me).filter(c=>Yi.has(c))),{length:s}=u(this,me).filter(c=>!c),o=u(this,me).length-r.size-s,a=super.lint(e);if(t.size===o||n.size===o)return a;let d={start:e,...this.getRootNode().posFromIndex(e)},{childNodes:g,length:p}=this;for(let c=0;c<p;c++){let m=g[c],x=m.text().trim();x&&!t.has(x)&&!r.has(x)&&(t.size>0||!n.has(x))&&a.push(v(m,d,"invalid conversion flag"))}return a}print(){return super.print({sep:";"})}};me=new WeakMap});var et,di=b(()=>{"use strict";y();C();ge();et=class extends T{constructor(e,t=!0,r=h.getConfig(),n=[]){super(void 0,r,n);f(this,"type","converter-rule");let s=e.indexOf(":"),o=e.slice(0,s).indexOf("=>"),a=o===-1?e.slice(0,s):e.slice(o+2,s);t&&r.variants.includes(a.trim())?(super.insertAt(new G(a,"converter-rule-variant",r,n)),super.insertAt(new G(e.slice(s+1),"converter-rule-to",r,n)),o!==-1&&super.insertAt(new G(e.slice(0,o),"converter-rule-from",r,n),0)):super.insertAt(new G(e,"converter-rule-to",r,n))}toString(e){let{childNodes:t}=this;if(t.length===3){let[r,n,s]=t;return`${r.toString(e)}=>${n.toString(e)}:${s.toString(e)}`}return super.toString(e,":")}text(){let{childNodes:e}=this;if(e.length===3){let[t,r,n]=e;return`${t.text()}=>${r.text()}:${n.text()}`}return super.text(":")}getGaps(e){return e===0&&this.length===3?2:1}print(){let{childNodes:e}=this;if(e.length===3){let[t,r,n]=e;return`<span class="wpb-converter-rule">${t.print()}=>${r.print()}:${n.print()}</span>`}return super.print({sep:":"})}}});var Vt,pi=b(()=>{"use strict";D();ai();y();C();li();di();Vt=class extends oi(T){constructor(e,t,r=h.getConfig(),n=[]){super(void 0,r,n);f(this,"type","converter");this.append(new Ht(e,r,n));let[s]=t,o=s.includes(":"),a=new et(s,o,r,n);o&&a.length===1?this.insertAt(new et(t.join(";"),!1,r,n)):this.append(a,...t.slice(1).map(d=>new et(d,!0,r,n)))}toString(e){let{childNodes:[t,...r]}=this;return`-{${t.toString()}${t.length>0?"|":""}${r.map(n=>n.toString()).join(";")}}-`}text(){let{childNodes:[e,...t]}=this;return`-{${e.text()}|${se(t,";")}}-`}getAttribute(e){return e==="padding"?2:super.getAttribute(e)}getGaps(e){return e||this.firstChild.length>0?1:0}print(){let{childNodes:[e,...t]}=this;return`<span class="wpb-converter">-{${e.print()}${e.length>0?"|":""}${oe(t,{sep:";"})}}-</span>`}}});var gi={};z(gi,{parseConverter:()=>es});var es,ui=b(()=>{"use strict";y();pi();es=(l,i=h.getConfig(),e=[])=>{let t=/-\{/gu,r=/-\{|\}-/gu,n=[],s=t,o=s.exec(l);for(;o;){let{0:a,index:d}=o;if(a==="}-"){let g=n.pop(),{length:p}=e,c=l.slice(g.index+2,d),m=c.indexOf("|"),[x,A]=m===-1?[[],c]:[c.slice(0,m).split(";"),c.slice(m+1)],F=A.replace(/(&[#a-z\d]+);/giu,"$1"),O=`(?:${i.variants.join("|")})`,w=F.split(new RegExp(`;(?=\\s*(?:${O}|[^;]*?=>\\s*${O})\\s*:)`,"u")).map($=>$.replace(/\x01/gu,";"));new Vt(x,w,i,e),l=`${l.slice(0,g.index)}\0${p}v\x7F${l.slice(d+2)}`,n.length===0&&(s=t),s.lastIndex=g.index+3+String(p).length}else n.push(o),s=r,s.lastIndex=d+2;o=s.exec(l)}return l}});var zr={};z(zr,{Token:()=>T});var re,q,W,Le,ut,Wr,Xt,hi,Qt,mi,Kt,ci,Zt,fi,Jt,Ti,Yt,xi,er,bi,tr,ki,rr,yi,nr,Ai,ir,vi,Mr,T,C=b(()=>{"use strict";D();fe();y();Qr();Zr();Mr=class Mr extends Tt{constructor(e,t=h.getConfig(),r=[],n){super();k(this,ut);k(this,Xt);k(this,Qt);k(this,Kt);k(this,Zt);k(this,Jt);k(this,Yt);k(this,er);k(this,tr);k(this,rr);k(this,nr);k(this,ir);f(this,"type","root");k(this,re,0);k(this,q,void 0);k(this,W,void 0);k(this,Le,void 0);typeof e=="string"&&this.insertAt(e),S(this,q,t),S(this,W,r),r.push(this)}parseOnce(e=u(this,re),t=!1){if(e<u(this,re)||!this.getAttribute("plain")||this.length===0)return this;switch(e){case 0:this.type==="root"&&u(this,W).shift(),S(this,Le,t),N(this,Xt,hi).call(this,t);break;case 1:N(this,Qt,mi).call(this);break;case 2:N(this,Kt,ci).call(this);break;case 3:N(this,Zt,fi).call(this);break;case 4:N(this,Jt,Ti).call(this);break;case 5:N(this,Yt,xi).call(this);break;case 6:N(this,er,bi).call(this);break;case 7:N(this,tr,ki).call(this);break;case 8:N(this,rr,yi).call(this);break;case 9:N(this,nr,Ai).call(this);break;case 10:N(this,ir,vi).call(this)}if(this.type==="root")for(let r of u(this,W))r.parseOnce(e,t);return mt(this,re)._++,this}buildFromStr(e,t){let r=e.split(/[\0\x7F]/u).map((n,s)=>{if(s%2===0)return new st(n);if(Number.isNaN(Number(n[n.length-1])))return u(this,W)[Number(n.slice(0,-1))];throw new Error(`\u89E3\u6790\u9519\u8BEF\uFF01\u672A\u6B63\u786E\u6807\u8BB0\u7684 Token\uFF1A${n}`)});return t==="string"?r.map(String).join(""):t==="text"?se(r):r}afterBuild(){if(this.type==="root")for(let e of u(this,W))e.afterBuild()}parse(e=11,t=!1){for(;u(this,re)<e;)this.parseOnce(u(this,re),t);return e&&(N(this,ut,Wr).call(this),this.afterBuild()),this}getAttribute(e){switch(e){case"plain":return this.constructor===Mr;case"config":return JSON.parse(JSON.stringify(u(this,q)));case"accum":return u(this,W);case"include":{if(u(this,Le)!==void 0)return u(this,Le);let t=this.getRootNode();return t!==this?t.getAttribute("include"):!1}default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":u(this,re)===0&&this.type==="root"&&u(this,W).shift(),S(this,re,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let r=typeof e=="string"?new st(e):e;return super.insertAt(r,t),r.type==="root"&&(r.type="plain"),r}normalizeTitle(e,t=0,r=!1,n=!1,s=!1){return h.normalizeTitle(e,t,u(this,Le),u(this,q),r,n,s)}};re=new WeakMap,q=new WeakMap,W=new WeakMap,Le=new WeakMap,ut=new WeakSet,Wr=function(){var n;S(this,re,11);let{length:e,firstChild:t}=this,r=String(t);if(e===1&&t.type==="text"&&r.includes("\0")&&(this.replaceChildren(...this.buildFromStr(r)),this.normalize(),this.type==="root"))for(let s of u(this,W))N(n=s,ut,Wr).call(n)},Xt=new WeakSet,hi=function(e){let{parseCommentAndExt:t}=(Rn(),P(Pn));this.setText(t(String(this.firstChild),u(this,q),u(this,W),e))},Qt=new WeakSet,mi=function(){let{parseBraces:e}=(br(),P(xn)),t=this.type==="root"?String(this.firstChild):`\0${String(this.firstChild)}`,r=e(t,u(this,q),u(this,W));this.setText(this.type==="root"?r:r.slice(1))},Kt=new WeakSet,ci=function(){var t;if((t=u(this,q).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(Bn(),P(qn));this.setText(e(String(this.firstChild),u(this,q),u(this,W)))},Zt=new WeakSet,fi=function(){var t;if((t=u(this,q).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(_n(),P(Mn));this.setText(e(this,u(this,q),u(this,W)))},Jt=new WeakSet,Ti=function(){var t;if((t=u(this,q).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Vn(),P(Hn));this.setText(e(this,u(this,q),u(this,W)))},Yt=new WeakSet,xi=function(){let{parseLinks:e}=(Jn(),P(Zn));this.setText(e(String(this.firstChild),u(this,q),u(this,W)))},er=new WeakSet,bi=function(){var r;if((r=u(this,q).excludes)!=null&&r.includes("quote"))return;let{parseQuotes:e}=(jr(),P(Or)),t=String(this.firstChild).split(`
33
+ `);for(let n=0;n<t.length;n++)t[n]=e(t[n],u(this,q),u(this,W));this.setText(t.join(`
34
+ `))},tr=new WeakSet,ki=function(){var t;if((t=u(this,q).excludes)!=null&&t.includes("extLink"))return;let{parseExternalLinks:e}=(ei(),P(Yn));this.setText(e(String(this.firstChild),u(this,q),u(this,W)))},rr=new WeakSet,yi=function(){var t;if((t=u(this,q).excludes)!=null&&t.includes("magicLink"))return;let{parseMagicLinks:e}=(ri(),P(ti));this.setText(e(String(this.firstChild),u(this,q),u(this,W)))},nr=new WeakSet,Ai=function(){var n;if((n=u(this,q).excludes)!=null&&n.includes("list"))return;let{parseList:e}=(si(),P(ii)),t=String(this.firstChild).split(`
35
+ `),r=this.type==="root"||this.type==="ext-inner"&&this.name==="poem"?0:1;for(;r<t.length;r++)t[r]=e(t[r],u(this,q),u(this,W));this.setText(t.join(`
36
+ `))},ir=new WeakSet,vi=function(){if(u(this,q).variants.length>0){let{parseConverter:e}=(ui(),P(gi));this.setText(e(String(this.firstChild),u(this,q),u(this,W)))}};T=Mr});var ts,Ie,Si,rs,h,y=b(()=>{or();fe();ts=l=>l.replace(/[\0\x7F]/gu,""),Ie={i18n:void 0,getConfig(){return{...Dr,...this.config,excludes:[]}},msg(l,i=""){var e,t;return l&&((t=(e=this.i18n)==null?void 0:e[l])!=null?t:l).replace("$1",this.msg(i))},normalizeTitle(l,i=0,e=!1,t=Ie.getConfig(),r=!1,n=!1,s=!1){let{Title:o}=(Xr(),P(Vr));if(r)return new o(l,i,t,n,s);let{Token:a}=(C(),P(zr)),d=rt.run(()=>new a(l,t).parseOnce(0,e).parseOnce());return new o(String(d),i,t,n,s)},parse(l,i,e=11,t=Ie.getConfig()){let{Token:r}=(C(),P(zr));return rt.run(()=>new r(ts(l),t).parse(e,i))}},Si={},rs=new Set(["normalizeTitle","parse"]);for(let l in Ie)rs.has(l)||(Si[l]={enumerable:!1});Object.defineProperties(Ie,Si);typeof self=="object"?Object.assign(self,{Parser:Ie}):typeof globalThis=="object"&&Object.assign(globalThis,{Parser:Ie});h=Ie});y();})();
@@ -1,6 +1,6 @@
1
1
  (() => {
2
2
  const workerJS = () => {
3
- importScripts('https://testingcf.jsdelivr.net/npm/wikiparser-node@1.3.1-b/bundle/bundle.min.js');
3
+ importScripts('https://testingcf.jsdelivr.net/npm/wikiparser-node@1.3.2-b/bundle/bundle.min.js');
4
4
  const entities = { '&': 'amp', '<': 'lt', '>': 'gt' };
5
5
  self.onmessage = ({ data }) => {
6
6
  var _a;
package/i18n/zh-hans.json CHANGED
@@ -14,6 +14,7 @@
14
14
  "frame": "框架",
15
15
  "full-width punctuation": "全角标点",
16
16
  "horizontal-alignment": "水平对齐",
17
+ "HTML comment": "HTML注释",
17
18
  "HTML tag in table attributes": "表格属性中的HTML标签",
18
19
  "illegal attribute name": "非法的属性名",
19
20
  "illegal module name": "非法的模块名称",
@@ -31,13 +32,13 @@
31
32
  "missing module name": "缺少模块名称",
32
33
  "nonzero tabindex": "不为0的tabindex",
33
34
  "nothing should be in <$1>": "<$1>标签内不应有任何内容",
35
+ "quotes": "引号",
34
36
  "section header in a HTML tag": "HTML标签属性中的段落标题",
37
+ "table": "表格",
35
38
  "tag that is both closing and self-closing": "同时闭合和自封闭的标签",
36
39
  "template in an internal link target": "内链目标包含模板",
37
40
  "unbalanced \"=\" in a section header": "段落标题中不平衡的\"=\"",
38
- "unclosed HTML comment": "未闭合的HTML注释",
39
- "unclosed quotes": "未闭合的引号",
40
- "unclosed table": "未闭合的表格",
41
+ "unclosed $1": "未闭合的$1",
41
42
  "unclosed tag": "未闭合的标签",
42
43
  "unescaped query string in an anonymous parameter": "匿名参数中未转义的查询参数",
43
44
  "unexpected template argument": "未预期的模板参数",
package/i18n/zh-hant.json CHANGED
@@ -14,6 +14,7 @@
14
14
  "frame": "框架",
15
15
  "full-width punctuation": "全形標點",
16
16
  "horizontal-alignment": "水瓶對齊",
17
+ "HTML comment": "HTML註釋",
17
18
  "HTML tag in table attributes": "表格屬性中的HTML標籤",
18
19
  "illegal attribute name": "非法的屬性名",
19
20
  "illegal module name": "非法的模組名稱",
@@ -31,13 +32,13 @@
31
32
  "missing module name": "缺少模組名稱",
32
33
  "nonzero tabindex": "不為0的tabindex",
33
34
  "nothing should be in <$1>": "<$1>標籤內不應有任何內容",
35
+ "quotes": "引號",
34
36
  "section header in a HTML tag": "HTML標籤屬性中的段落標題",
37
+ "table": "表格",
35
38
  "tag that is both closing and self-closing": "同時閉合和自封閉的標籤",
36
39
  "template in an internal link target": "內部連結目標包含模板",
37
40
  "unbalanced \"=\" in a section header": "段落標題中不平衡的\"=\"",
38
- "unclosed HTML comment": "未閉合的HTML註釋",
39
- "unclosed quotes": "未閉合的引號",
40
- "unclosed table": "未閉合的表格",
41
+ "unclosed $1": "未閉合的$1",
41
42
  "unclosed tag": "未閉合的標籤",
42
43
  "unescaped query string in an anonymous parameter": "匿名參數中未轉義的查詢參數",
43
44
  "unexpected template argument": "未預期的模板參數",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wikiparser-node",
3
- "version": "1.3.1-b",
3
+ "version": "1.3.2-b",
4
4
  "description": "A Node.js parser for MediaWiki markup with AST",
5
5
  "keywords": [
6
6
  "mediawiki",