wikiparser-node 0.6.2-b → 0.7.0-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,34 +1,40 @@
1
- (()=>{var Tt=Object.defineProperty;var $t=(R,L,j)=>L in R?Tt(R,L,{enumerable:!0,configurable:!0,writable:!0,value:j}):R[L]=j;var S=(R,L,j)=>($t(R,typeof L!="symbol"?L+"":L,j),j),tt=(R,L,j)=>{if(!L.has(R))throw TypeError("Cannot "+j)};var T=(R,L,j)=>(tt(R,L,"read from private field"),j?j.call(R):L.get(R)),w=(R,L,j)=>{if(L.has(R))throw TypeError("Cannot add the same private member more than once");L instanceof WeakSet?L.add(R):L.set(R,j)},H=(R,L,j,K)=>(tt(R,L,"write to private field"),K?K.call(R,j):L.set(R,j),j),et=(R,L,j,K)=>({set _(m){H(R,L,m,j)},get _(){return T(R,L,K)}}),D=(R,L,j)=>(tt(R,L,"access private method"),j);(()=>{var R={6010:(m,C,e)=>{"use strict";const g={config:void 0,minConfig:e(8166),MAX_STAGE:11,getConfig(){return{...this.minConfig,...this.config}},normalizeTitle(a,u=0,d=!1,p=g.getConfig(),h=!1){let t;if(!h){const i=e(8138);t=this.run(()=>{const o=new i(String(a),p),r=o.getAttribute("parseOnce");return r(0,d),r()}),a=t.firstChild}const s=e(6986);return new s(String(a),u,p)},parse(a,u,d=g.MAX_STAGE,p=g.getConfig()){const h=e(8138);let t;return this.run(()=>{typeof a=="string"?t=new h(a,p):a instanceof h&&(t=a,a=String(t)),t.parse(d,u)}),t},run(a){return a()},print(a,u=!1,d=g.getConfig()){return`<div class="wikiparser">${this.parse(a,u,this.MAX_STAGE,d).print()} </div>`}},f={};for(const a in g)["MAX_STAGE","minConfig"].includes(a)?f[a]={enumerable:!1,writable:!1}:["config","normalizeTitle","parse","print"].includes(a)||(f[a]={enumerable:!1});Object.defineProperties(g,f),typeof window!="undefined"&&(window.Parser=g),m.exports=g},9205:(m,C,e)=>{"use strict";const{print:g}=e(231),f=e(3853),a=e(7507),d=class extends f{constructor(){super(...arguments);S(this,"name")}get length(){return this.childNodes.length}get children(){return this.childNodes.filter(({type:s})=>s!=="text")}get firstElementChild(){return this.childNodes.find(({type:t})=>t!=="text")}get lastElementChild(){return this.children.at(-1)}append(...t){for(const s of t)this.insertAt(s)}replaceChildren(...t){for(let s=this.childNodes.length-1;s>=0;s--)this.removeAt(s);this.append(...t)}setText(t,s=0){const n=this.childNodes.at(s),{type:i,data:o}=n;if(i==="text")return n.replaceData(t),o}toString(t,s=""){return this.childNodes.map(n=>n.toString()).join(s)}lint(t=0){const s=e(8058);if(this instanceof s||this.constructor.hidden||this.type==="ext-inner"&&d.lintIgnoredExt.has(this.name))return[];const n=[];for(let i=0,o=t+this.getPadding();i<this.childNodes.length;i++){const r=this.childNodes[i];n.push(...r.lint(o)),o+=String(r).length+this.getGaps(i)}return n}print(t={}){var s;return String(this)?`<span class="wpb-${(s=t.class)!=null?s:this.type}">${g(this.childNodes,t)}</span>`:""}};let u=d;S(u,"lintIgnoredExt",new Set(["nowiki","pre","charinsert","score","syntaxhighlight","source","math","chem","ce","graph","mapframe","maplink","quiz","templatedata","timeline"])),m.exports=u},3853:(m,C,e)=>{var f,a,Y,d,st;"use strict";class g{constructor(){w(this,a);w(this,d);S(this,"type");S(this,"childNodes",[]);w(this,f,void 0)}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes.at(-1)}get parentNode(){return T(this,f)}get nextSibling(){var s;const t=(s=T(this,f))==null?void 0:s.childNodes;return t&&t[t.indexOf(this)+1]}get previousSibling(){var s;const t=(s=T(this,f))==null?void 0:s.childNodes;return t&&t[t.indexOf(this)-1]}hasAttribute(t){return t in this}getAttribute(t){return this.hasAttribute(t)?String(this[t]):void 0}setAttribute(t,s){return t==="parentNode"?H(this,f,s):this[t]=s,this}removeAt(t){const s=[...this.childNodes],[n]=s.splice(t,1);return n.setAttribute("parentNode"),this.setAttribute("childNodes",s),n}insertAt(t,s=this.childNodes.length){const n=[...this.childNodes];return-1===-1&&t.setAttribute("parentNode",this),n.splice(s,0,t),this.setAttribute("childNodes",n),t}normalize(){var n;const t=e(7507),s=[...this.childNodes];for(let i=s.length-1;i>=0;i--){const{type:o,data:r}=s[i];this.getGaps(i-1)||(r===""?s.splice(i,1):o==="text"&&((n=s[i-1])==null?void 0:n.type)==="text"&&(s[i-1].setAttribute("data",s[i-1].data+r),s.splice(i,1)))}this.setAttribute("childNodes",s)}getRootNode(){let{parentNode:t}=this;for(;t!=null&&t.parentNode;)({parentNode:t}=t);return t!=null?t:this}posFromIndex(t){const s=String(this);if(t>=-s.length&&t<=s.length){const n=s.slice(0,t).split(`
2
- `);return{top:n.length-1,left:n.at(-1).length}}}getPadding(){return 0}getGaps(){return 0}getRelativeIndex(t){let s;const n=(i,o)=>s.slice(0,i).reduce((r,l,c)=>r+String(l).length+o.getGaps(c),0)+o.getPadding();if(t===void 0){const{parentNode:i}=this;return i?({childNodes:s}=i,n(s.indexOf(this),i)):0}return{childNodes:s}=this,n(t,this)}getAbsoluteIndex(){const{parentNode:t}=this;return t?t.getAbsoluteIndex()+this.getRelativeIndex():0}getBoundingClientRect(){return{...D(this,a,Y).call(this),...this.getRootNode().posFromIndex(this.getAbsoluteIndex())}}get offsetHeight(){return D(this,a,Y).call(this).height}get offsetWidth(){return D(this,a,Y).call(this).width}get style(){return{...D(this,d,st).call(this),...D(this,a,Y).call(this),padding:this.getPadding()}}}f=new WeakMap,a=new WeakSet,Y=function(){const t=String(this).split(`
3
- `);return{height:t.length,width:t.at(-1).length}},d=new WeakSet,st=function(t){var s,n;return t===void 0?(n=(s=this.parentNode)==null?void 0:s.posFromIndex(this.getRelativeIndex()))!=null?n:{top:0,left:0}:this.posFromIndex(this.getRelativeIndex(t))},m.exports=g},7507:(m,C,e)=>{var a,nt;"use strict";const g=e(3853),d=class extends g{constructor(t=""){super();w(this,a);S(this,"type","text");S(this,"data");this.data=t}toString(){return this.data}replaceData(t=""){D(this,a,nt).call(this,t)}lint(t=0){const{data:s}=this,n=[...s.matchAll(d.errorSyntax)];if(n.length>0){const{top:i,left:o}=this.getRootNode().posFromIndex(t);return n.map(({0:r,1:l,index:c})=>{l&&(c+=l.length,r=r.slice(l.length));const x=s.slice(0,c).split(`
4
- `),A=x.length+i-1,{length:$}=x.at(-1),k=x.length>1?$:o+$;return{message:`\u5B64\u7ACB\u7684"${r[0]}"`,severity:r[0]==="{"||r[0]==="}"?"error":"warning",startLine:A,endLine:A,startCol:k,endCol:k+r.length}})}return[]}};let f=d;a=new WeakSet,nt=function(t){return t=String(t),this.setAttribute("data",t),this},S(f,"errorSyntax",/[{}]+|\[{2,}|\[(?!(?:(?!https?\b)[^[])*\])|((?:^|\])[^[]*?)\]+|<(?=\s*\/?\w+[\s/>])/giu),m.exports=f},6986:(m,C,e)=>{"use strict";const g=e(6010);class f{constructor(u,d=0,p=g.getConfig()){S(this,"valid",!0);S(this,"ns",0);const{namespaces:h,nsid:t}=p;let s=h[d];u=u.replaceAll("_"," ").trim(),u[0]===":"&&(s="",u=u.slice(1).trim());const n=u.split(":");if(n.length>1){const r=h[t[n[0].trim().toLowerCase()]];r!==void 0&&(s=r,u=n.slice(1).join(":").trim())}this.ns=t[s.toLowerCase()];const i=u.indexOf("#");let o="";i!==-1&&(o=u.slice(i+1).trimEnd(),u=u.slice(0,i).trim()),this.valid=Boolean(u||o)&&!/\0\d+[eh!+-]\x7F|[<>[\]{}|]/u.test(u)}}m.exports=f},2308:m=>{"use strict";const C=e=>{var g;return g=class extends e{},S(g,"hidden",!0),g};m.exports=C},8275:(m,C,e)=>{"use strict";const{removeComment:g}=e(231),f=e(6010),a=(u,d=f.getConfig(),p=[])=>{var c,x,A,$,k;const h="^(\0\\d+c\x7F)*={1,6}|\\[\\[|\\{{2,}|-\\{(?!\\{)",t=[],s={"=":`
5
- `,"{":"\\}{2,}|\\|","-":"\\}-","[":"\\]\\]"},n={"!":"!","!!":"+","(!":"{","!)":"}","!-":"-","=":"~"};let i=new RegExp(h,"gmu"),o=i.exec(u),r=u.includes("}}"),l;for(;o||l<=u.length&&((x=(c=t.at(-1))==null?void 0:c[0])==null?void 0:x[0])==="=";){if(o!=null&&o[1]){const[,{length:G}]=o;o[0]=o[0].slice(G),o.index+=G}const{0:N,index:v}=o!=null?o:{0:`
6
- `,index:u.length},b=(A=t.pop())!=null?A:{},{0:I,index:F,parts:z,findEqual:O,pos:U}=b,M=N==="="&&O;if(N==="]]"||N==="}-")l=v+2;else if(N===`
7
- `){l=v+1;const{pos:G,findEqual:W}=($=t.at(-1))!=null?$:{};if(!G||W||g(u.slice(G,F))!==""){const B=/^(={1,6})(.+)\1((?:\s|\0\d+c\x7F)*)$/u.exec(u.slice(F,v));if(B){u=`${u.slice(0,F)}\0${p.length}h\x7F${u.slice(v)}`,l=F+4+String(p.length).length;const q=e(9450);new q(B[1].length,B.slice(2),d,p)}}}else if(N==="|"||M)l=v+1,z.at(-1).push(u.slice(U,v)),N==="|"&&z.push([]),b.pos=l,b.findEqual=N==="|",t.push(b);else if(N.startsWith("}}")){const G=N.slice(0,Math.min(I.length,3)),W=I.length-G.length,{length:B}=p;l=v+G.length,z.at(-1).push(u.slice(U,v));let q=!1,Q="t";if(G.length===3){const J=e(9544);new J(z.map(V=>V.join("=")),d,p)}else{const J=g(z[0][0]);J in n?Q=n[J]:/^(?:fullurl|canonicalurl|filepath):./iu.test(J)&&(Q="m");try{const V=e(1782);new V(z[0][0],z.slice(1),d,p)}catch(V){if(V instanceof Error&&V.message.startsWith("\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A"))l=F+I.length,q=!0;else throw V}}q||(u=`${u.slice(0,F+W)}\0${B}${Q}\x7F${u.slice(l)}`,l=F+W+3+String(B).length,W>1?t.push({0:I.slice(0,W),index:F,pos:F+W,parts:[[]]}):W===1&&u[F-1]==="-"&&t.push({0:"-{",index:F-1,pos:F+1,parts:[[]]}))}else l=v+N.length,N[0]==="{"&&(o.pos=l,o.parts=[[]]),t.push(..."0"in b?[b]:[],o);r&&(r=u.slice(l).includes("}}"));let X=t.at(-1);!r&&((k=X==null?void 0:X[0])==null?void 0:k[0])==="{"&&(t.pop(),X=t.at(-1)),i=new RegExp(h+(X?`|${s[X[0][0]]}${X.findEqual?"|=":""}`:""),"gmu"),i.lastIndex=l,o=i.exec(u)}return u};m.exports=a},4907:(m,C,e)=>{"use strict";const g=e(6010),f=(a,u=g.getConfig(),d=[],p=!1)=>{const h=/<onlyinclude>(.*?)<\/onlyinclude>/gsu;if(p&&a.search(h)!==-1)return a.replaceAll(h,(o,r)=>{const l=`\0${d.length}e\x7F`,c=e(851);return new c(r,u,d),l}).replaceAll(/(^|\0\d+e\x7F)(.*?)(?=$|\0\d+e\x7F)/gsu,(o,r,l)=>{if(l==="")return r;const c=e(3423);return new c(l,u,d),`${r}\0${d.length-1}c\x7F`});const t=u.ext.join("|"),s=p?"includeonly":"(?:no|only)include",n=p?"noinclude":"includeonly",i=new RegExp(`<!--.*?(?:-->|$)|<${s}(?:\\s[^>]*?)?>|</${s}\\s*>|<(${t})(\\s[^>]*?)?(?:/>|>(.*?)</(\\1\\s*)>)|<(${n})(\\s[^>]*?)?(?:/>|>(.*?)(?:</(\\5\\s*)>|$))`,"gisu");return a.replaceAll(i,(o,r,l,c,x,A,$,k,N)=>{const v=`\0${d.length}${r?"e":"c"}\x7F`;if(r){const b=e(7267);new b(r,l,c,x,u,d)}else if(o.startsWith("<!--")){const b=e(5749),I=o.endsWith("-->");new b(o.slice(4,I?-3:void 0),I,u,d)}else if(A){const b=e(8655);new b(A,$,k,N,u,d)}else{const b=e(3423);new b(o,u,d)}return v})};m.exports=f},3765:(m,C,e)=>{"use strict";const g=e(6010),f=(a,u=g.getConfig(),d=[])=>{const p=e(9910),h=/-\{/gu,t=/-\{|\}-/gu,s=[];let n=h,i=n.exec(a);for(;i;){const{0:o,index:r}=i;if(o==="}-"){const l=s.pop(),{length:c}=d,x=a.slice(l.index+2,r),A=x.indexOf("|"),[$,k]=A===-1?[[],x]:[x.slice(0,A).split(";"),x.slice(A+1)],N=k.replaceAll(/(&[#a-z\d]+);/giu,"$1"),v=`(?:${u.variants.join("|")})`,b=N.split(new RegExp(`;(?=\\s*(?:${v}|[^;]*?=>\\s*${v})\\s*:)`,"u")).map(I=>I.replaceAll("",";"));new p($,b,u,d),a=`${a.slice(0,l.index)}\0${c}v\x7F${a.slice(r+2)}`,s.length===0&&(n=h),n.lastIndex=l.index+3+String(c).length}else s.push(i),n=t;i=n.exec(a)}return a};m.exports=f},7513:(m,C,e)=>{"use strict";const{extUrlChar:g}=e(231),f=e(6010),a=(u,d=f.getConfig(),p=[])=>{const h=e(741),t=new RegExp(`\\[((?:${d.protocol}|//)${g}|\0\\d+m\x7F)(\\p{Zs}*)([^\\]-\b
8
- -\uFFFD]*)\\]`,"giu");return u.replaceAll(t,(s,n,i,o)=>{const{length:r}=p,l=/&[lg]t;/u.exec(n);return l&&(n=n.slice(0,l.index),i="",o=`${n.slice(l.index)}${i}${o}`),new h(n,i,o,d,p),`\0${r}w\x7F`})};m.exports=a},2937:(m,C,e)=>{"use strict";const g=e(6010),f=({firstChild:{data:a},type:u,name:d},p=g.getConfig(),h=[])=>{const t=e(7507),s=e(8138),n=e(2582),i=e(7815),{doubleUnderscore:o}=p;return u!=="root"&&(u!=="ext-inner"||d!=="poem")&&(a=`\0${a}`),a=a.replaceAll(/^((?:\0\d+c\x7F)*)(-{4,})/gmu,(r,l,c)=>(new n(c.length,p,h),`${l}\0${h.length-1}r\x7F`)).replaceAll(new RegExp(`__(${o.flat().join("|")})__`,"giu"),(r,l)=>o[0].includes(l.toLowerCase())||o[1].includes(l)?(new i(l,p,h),`\0${h.length-1}u\x7F`):r),u==="root"||u==="ext-inner"&&d==="poem"?a:a.slice(1)};m.exports=f},5130:(m,C,e)=>{"use strict";const g=e(6010),f=(a,u=g.getConfig(),d=[])=>{const p=/^(\/?)([a-z][^\s/>]*)(\s[^>]*?)?(\/?>)([^<]*)$/iu,h=u.html.flat(),t=a.split("<");let s=t.shift();for(const n of t){const i=p.exec(n),o=i==null?void 0:i[2],r=o==null?void 0:o.toLowerCase();if(!i||!h.includes(r)){s+=`<${n}`;continue}const l=e(5037),[,c,,x="",A,$]=i,k=new l(x,"html-attr",r,u,d),N=k.getAttr("itemprop");if(r==="meta"&&(N===void 0||k.getAttr("content")===void 0)||r==="link"&&(N===void 0||k.getAttr("href")===void 0)){s+=`<${n}`,d.pop();continue}s+=`\0${d.length}x\x7F${$}`;const v=e(2350);new v(o,k,c==="/",A==="/>",u,d)}return s};m.exports=f},1452:(m,C,e)=>{"use strict";const g=e(6010),f=(a,u=g.getConfig(),d=[])=>{const p=e(3360),h=/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]]))?\]\](.*)$/su,t=/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(\||\0\d+!\x7F)(.*)$/su,s=new RegExp(`^\\s*(?:${u.protocol})`,"iu"),n=a.split("[[");let i=n.shift();for(let o=0;o<n.length;o++){let r,l,c,x,A;const $=n[o],k=h.exec($);if(k)[,l,c,x,A]=k,A[0]==="]"&&(x==null?void 0:x.includes("["))&&(x+="]",A=A.slice(1));else{const O=t.exec($);O&&(r=!0,[,l,c,x]=O)}if(l===void 0||s.test(l)||/\0\d+[exhbru]\x7F/u.test(l)){i+=`[[${$}`;continue}let N=l;if(l.includes("%"))try{N=decodeURIComponent(l)}catch(O){}const v=l.trim()[0]===":";if(v&&r){i+=`[[${$}`;continue}const b=g.normalizeTitle(N,0,!1,u,!0),{ns:I,valid:F}=b;if(F){if(r){if(I!==6){i+=`[[${$}`;continue}let O;for(o++;o<n.length;o++){const U=n[o],M=U.split("]]");if(M.length>2){O=!0,x+=`[[${M[0]}]]${M[1]}`,A=M.slice(2).join("]]");break}else if(M.length===2)x+=`[[${M[0]}]]${M[1]}`;else{x+=`[[${U}`;break}}if(x=f(x,u,d),!O){i+=`[[${l}${c}${x}`;continue}}}else{i+=`[[${$}`;continue}x&&(x=p(x,u,d)),i+=`\0${d.length}l\x7F${A}`;let z=e(3905);v||(I===6?z=e(7625):I===14&&(z=e(337))),new z(l,x,b,u,d,c)}return i};m.exports=f},6622:(m,C,e)=>{"use strict";const g=e(6010),f=(a,u=g.getConfig(),d=[])=>{const p=/^((?:\0\d+c\x7F)*)([;:*#]+)/u.exec(a);if(!p)return a;const h=e(962),[t,s,n]=p;a=`${s}\0${d.length}d\x7F${a.slice(t.length)}`,new h(n,u,d);let i=n.split(";").length-1;if(!i)return a;const o=e(3434);let r=/:+|-\{/gu,l=r.exec(a),c=0;for(;l&&i;){const{0:x,index:A}=l;if(x[0]===":"){if(x.length>=i)return new o(":".repeat(i),u,d),`${a.slice(0,A)}\0${d.length-1}d\x7F${a.slice(A+i)}`;a=`${a.slice(0,A)}\0${d.length}d\x7F${a.slice(r.lastIndex)}`,i-=x.length,r.lastIndex=A+4+String(d.length).length,new o(x,u,d)}else if(x==="-{"){if(!c){const{lastIndex:$}=r;r=/-\{|\}-/gu,r.lastIndex=$}c++}else if(c--,!c){const{lastIndex:$}=r;r=/:+|-\{/gu,r.lastIndex=$}l=r.exec(a)}return a};m.exports=f},4737:(m,C,e)=>{"use strict";const{extUrlChar:g}=e(231),f=e(6010),a=(u,d=f.getConfig(),p=[])=>{const h=e(8962),t=new RegExp(`\\b(?:${d.protocol})(${g})`,"giu");return u.replaceAll(t,(s,n)=>{let i="",o=s;const r=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(o);r&&(i=o.slice(r.index),o=o.slice(0,r.index));const l=new RegExp(`[,;.:!?${o.includes("(")?"":")"}]+$`,"u"),c=l.exec(o);if(c){let x=0;c[0][0]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(o.slice(0,c.index))&&(x=1),i=`${o.slice(c.index+x)}${i}`,o=o.slice(0,c.index+x)}return i.length>=n.length?s:(new h(o,!1,d,p),`\0${p.length-1}w\x7F${i}`)})};m.exports=a},3360:(m,C,e)=>{"use strict";const g=e(6010),f=(a,u=g.getConfig(),d=[])=>{var l;const p=a.split(/('{2,})/u),{length:h}=p;if(h===1)return a;let t=0,s=0,n,i,o;for(let c=1;c<h;c+=2){const{length:x}=p[c];switch(x){case 2:s++;break;case 4:p[c-1]+="'",p[c]="'''";case 3:if(t++,n)break;p[c-1].at(-1)===" "?!i&&!o&&(o=c):p[c-1].at(-2)===" "?n=c:i||(i=c);break;default:p[c-1]+="'".repeat(x-5),p[c]="'''''",s++,t++}}if(s%2===1&&t%2===1){const c=(l=n!=null?n:i)!=null?l:o;p[c]="''",p[c-1]+="'"}const r=e(6714);for(let c=1;c<h;c+=2)new r(p[c].length,u,d),p[c]=`\0${d.length-1}q\x7F`;return p.join("")};m.exports=f},4624:(m,C,e)=>{"use strict";const g=e(6010),f=e(7507),a=e(8138),u=e(2840),d=e(3125),p=e(5567),h=({firstChild:{data:t},type:s,name:n},i=g.getConfig(),o=[])=>{const r=[],l=t.split(`
9
- `);let c=s==="root"||s==="parameter-value"||s==="ext-inner"&&n==="poem"?"":`
10
- ${l.shift()}`;const x=(A,$)=>{if(!$){c+=A;return}const{lastChild:k}=$;if(k.constructor===a)k.setText(String(k)+A);else{const N=new a(A,i,!0,o);N.type="table-inter",$.insertAt(N.setAttribute("stage",3))}};for(const A of l){let $=r.pop();const[k]=/^(?:\s|\0\d+c\x7F)*/u.exec(A),N=A.slice(k.length),v=/^(:*)((?:\s|\0\d+c\x7F)*)(\{\||\{\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(N);if(v){for(;$&&$.type!=="td";)$=r.pop();const[,U,M,X,G]=v;if(U){const B=e(3434);new B(U,i,o)}x(`
11
- ${k}${U&&`\0${o.length-1}d\x7F`}${M}\0${o.length}b\x7F`,$);const W=new u(X,G,i,o);r.push(...$?[$]:[],W);continue}else if(!$){c+=`
12
- ${A}`;continue}const b=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(N);if(!b){x(`
13
- ${A}`,$),r.push(...$?[$]:[]);continue}const[,I,F,z,O]=b;if(I){for(;!($ instanceof u);)$=r.pop();$.close(`
14
- ${k}${I}`,!0),x(O,r.at(-1))}else if(F){$.type==="td"&&($=r.pop()),$.type==="tr"&&($=r.pop());const U=new d(`
15
- ${k}${F}`,O,i,o);r.push($,U),$.insertAt(U)}else{$.type==="td"&&($=r.pop());const U=z==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu;let M=U.exec(O),X=0,G=`
16
- ${k}${z}`;for(;M;){const B=new p(G,O.slice(X,M.index),i,o);$.insertAt(B),{lastIndex:X}=U,[G]=M,M=U.exec(O)}const W=new p(G,O.slice(X),i,o);r.push($,W),$.insertAt(W)}}return c.slice(1)};m.exports=h},9544:(m,C,e)=>{"use strict";const{generateForChild:g}=e(8277),f=e(6010),a=e(8138);class u extends a{constructor(h,t=f.getConfig(),s=[]){super(void 0,t,!0,s,{AtomToken:0,Token:1,HiddenToken:"2:"});S(this,"type","arg");for(let n=0;n<h.length;n++)if(n===0||n>1){const i=e(n===0?9237:9263),o=new i(h[n],n===0?"arg-name":void 0,t,s,{"Stage-2":":","!HeadingToken":""});super.insertAt(o)}else{const i=new a(h[n],t,!0,s);i.type="arg-default",super.insertAt(i.setAttribute("stage",2))}}toString(h){return`{{{${super.toString(h,"|")}}}}`}getPadding(){return 3}getGaps(){return 1}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}lint(h=0){const{childNodes:[t,s,...n]}=this,i=t.lint(h+3);if(s&&i.push(...s.lint(h+4+String(t).length)),n.length>0){const o=this.getRootNode().posFromIndex(h);i.push(...n.map(r=>g(r,o,"\u4E09\u91CD\u62EC\u53F7\u5185\u7684\u4E0D\u53EF\u89C1\u90E8\u5206")))}return i}}m.exports=u},9263:(m,C,e)=>{"use strict";const g=e(2308),f=e(9237);class a extends g(f){constructor(){super(...arguments);S(this,"type","hidden")}}m.exports=a},9237:(m,C,e)=>{"use strict";const g=e(6010),f=e(8138);class a extends f{constructor(p,h,t=g.getConfig(),s=[],n=null){super(p,t,!0,s,n);S(this,"type","plain");h&&(this.type=h)}}m.exports=a},5037:(m,C,e)=>{var p,h,t,s,rt;"use strict";const{generateForSelf:g}=e(8277),{removeComment:f}=e(231),a=e(6010),u=e(8138);class d extends u{constructor(r,l,c,x=a.getConfig(),A=[]){super(r,x,!0,A);w(this,s);w(this,p,new Map);w(this,h,!0);w(this,t,!0);this.type=l,D(this,s,rt).call(this)}getAttr(r){return T(this,p).get(r.toLowerCase().trim())}setAttr(r,l,c){r=r.toLowerCase().trim();const x=r;if(/^(?:[\w:]|\0\d+[t!~{}+-]\x7F)(?:[\w:.-]|\0\d+[t!~{}+-]\x7F)*$/u.test(x))l===!1?T(this,p).delete(r):T(this,p).set(r,l===!0?!0:l.replaceAll(/\s/gu," ").trim());else return c,!1;return!0}lint(r=0){const l=e(2350),c=super.lint(r);let x;return this.type==="html-attr"&&this.parentNode.closing&&String(this).trim()&&(x=this.getRootNode().posFromIndex(r),c.push(g(this,x,"\u4F4D\u4E8E\u95ED\u5408\u6807\u7B7E\u7684\u5C5E\u6027"))),T(this,h)?T(this,t)||(x||(x=this.getRootNode().posFromIndex(r)),c.push(g(this,x,"\u672A\u95ED\u5408\u7684\u5F15\u53F7","warning"))):(x||(x=this.getRootNode().posFromIndex(r)),c.push(g(this,x,"\u5305\u542B\u65E0\u6548\u5C5E\u6027"))),c}}p=new WeakMap,h=new WeakMap,t=new WeakMap,s=new WeakSet,rt=function(){var l;let r=this.toString();r=f(r).replaceAll(/\0\d+~\x7F/gu,"=");for(const[,c,x,A,$,k]of r.matchAll(/([^\s/][^\s/=]*)(?:\s*=\s*(?:(["'])(.*?)(\2|$)|(\S*)))?/gsu))this.setAttr(c,(l=A!=null?A:k)!=null?l:!0,!0)?x!==$&&H(this,t,!1):H(this,h,!1)},m.exports=d},8103:(m,C,e)=>{"use strict";const g=e(6010),f=e(8138),a=e(2158);class u extends f{constructor(h,t=g.getConfig(),s=[]){super(void 0,t,!0,s,{HasNowikiToken:":"});S(this,"type","ext-inner");S(this,"name","charinsert");this.append(...h.split(`
17
- `).map(n=>new a(n,"charinsert-line",t,s)))}toString(h){return super.toString(h,`
1
+ (()=>{var Tt=Object.defineProperty;var yt=(U,H,B)=>H in U?Tt(U,H,{enumerable:!0,configurable:!0,writable:!0,value:B}):U[H]=B;var P=(U,H,B)=>(yt(U,typeof H!="symbol"?H+"":H,B),B),st=(U,H,B)=>{if(!H.has(U))throw TypeError("Cannot "+B)};var x=(U,H,B)=>(st(U,H,"read from private field"),B?B.call(U):H.get(U)),L=(U,H,B)=>{if(H.has(U))throw TypeError("Cannot add the same private member more than once");H instanceof WeakSet?H.add(U):H.set(U,B)},G=(U,H,B,tt)=>(st(U,H,"write to private field"),tt?tt.call(U,B):H.set(U,B),B),nt=(U,H,B,tt)=>({set _(T){G(U,H,T,B)},get _(){return x(U,H,tt)}}),X=(U,H,B)=>(st(U,H,"access private method"),B);(()=>{var U={6010:(T,N,e)=>{"use strict";const f={config:void 0,minConfig:e(8166),MAX_STAGE:11,getConfig(){return{...this.minConfig,...this.config}},normalizeTitle(p,g=0,r=!1,i=f.getConfig(),s=!1,t=!1,n=!1){let l;if(!s){const a=e(8138);l=this.run(()=>{const S=new a(String(p),i),m=S.getAttribute("parseOnce");return m(0,r),m()}),p=l.firstChild}const o=e(6986);return new o(String(p),g,i,t,n)},parse(p,g,r=f.MAX_STAGE,i=f.getConfig()){if(typeof p!="string")throw new TypeError("\u5F85\u89E3\u6790\u7684\u5185\u5BB9\u5E94\u4E3A String\uFF01");const s=e(8138);let t;return this.run(()=>{t=new s(p,i);try{t.parse(r,g)}catch(n){}}),t},run(p){return p()}},$={},y=new Set(["MAX_STAGE","minConfig"]),u=new Set(["config","normalizeTitle","parse"]);for(const p in f)y.has(p)?$[p]={enumerable:!1,writable:!1}:u.has(p)||($[p]={enumerable:!1});Object.defineProperties(f,$),typeof self=="object"&&(self.Parser=f),T.exports=f},9205:(T,N,e)=>{"use strict";const{print:f}=e(231),$=e(3853),y=e(7507),p=class extends ${constructor(){super(...arguments);P(this,"name")}get length(){return this.childNodes.length}closest(i){const s=new Set(i.split(",").map(n=>n.trim()));let{parentNode:t}=this;for(;t;){if(s.has(t.type))return t;({parentNode:t}=t)}}append(...i){for(const s of i)this.insertAt(s)}replaceChildren(...i){this.childNodes.length=0,this.append(...i)}setText(i,s=0){const t=this.childNodes[s],{type:n,data:l}=t;if(n==="text")return t.replaceData(i),l}toString(i,s=""){return this.childNodes.map(t=>t.toString()).join(s)}lint(i=0){const s=e(8058);if(this instanceof s||this.constructor.hidden||this.type==="ext-inner"&&p.lintIgnoredExt.has(this.name))return[];const t=[];for(let n=0,l=i+this.getPadding();n<this.length;n++){const o=this.childNodes[n];t.push(...o.lint(l)),l+=String(o).length+this.getGaps(n)}return t}print(i={}){return String(this)?`<span class="wpb-${i.class||this.type}">${f(this.childNodes,i)}</span>`:""}json(i){const{childNodes:s,...t}=this;return{...t,childNodes:s.map(l=>l.type==="text"?String(l):l.json())}}};let u=p;P(u,"lintIgnoredExt",new Set(["nowiki","pre","charinsert","score","syntaxhighlight","source","math","chem","ce","graph","mapframe","maplink","quiz","templatedata","timeline"])),T.exports=u},3853:(T,N,e)=>{var y,u,rt;"use strict";const{text:f}=e(231);class ${constructor(){L(this,u);P(this,"type");P(this,"childNodes",[]);L(this,y,void 0)}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return x(this,y)}get nextSibling(){var i;const r=(i=x(this,y))==null?void 0:i.childNodes;return r&&r[r.indexOf(this)+1]}get previousSibling(){var i;const r=(i=x(this,y))==null?void 0:i.childNodes;return r&&r[r.indexOf(this)-1]}hasAttribute(r){const i=typeof r;return i==="string"||i==="number"||i==="symbol"?r in this:!1}getAttribute(r){return this.hasAttribute(r)?String(this[r]):void 0}setAttribute(r,i){return r==="parentNode"?G(this,y,i):this[r]=i,this}text(r=""){return f(this.childNodes,r)}removeAt(r){const{childNodes:i}=this,[s]=i.splice(r,1);return s}insertAt(r,i=this.childNodes.length){const{childNodes:s}=this;return-1===-1&&r.setAttribute("parentNode",this),s.splice(i,0,r),r}normalize(){var s;const r=e(7507),{childNodes:i}=this;for(let t=i.length-1;t>=0;t--){const{type:n,data:l}=i[t];this.getGaps(t-1)||(l===""?i.splice(t,1):n==="text"&&((s=i[t-1])==null?void 0:s.type)==="text"&&(i[t-1].setAttribute("data",i[t-1].data+l),i.splice(t,1)))}}getRootNode(){let{parentNode:r}=this;for(;r!=null&&r.parentNode;)({parentNode:r}=r);return r!=null?r:this}posFromIndex(r){const i=String(this);if(r>=-i.length&&r<=i.length){const s=i.slice(0,r).split(`
2
+ `);return{top:s.length-1,left:s[s.length-1].length}}}getPadding(){return 0}getGaps(){return 0}getRelativeIndex(r){let i;const s=(t,n)=>i.slice(0,t).reduce((l,o,h)=>l+String(o).length+n.getGaps(h),0)+n.getPadding();if(r===void 0){const{parentNode:t}=this;return t?({childNodes:i}=t,s(i.indexOf(this),t)):0}return{childNodes:i}=this,s(r,this)}get offsetHeight(){return X(this,u,rt).call(this).height}get offsetWidth(){return X(this,u,rt).call(this).width}}y=new WeakMap,u=new WeakSet,rt=function(){const r=String(this).split(`
3
+ `);return{height:r.length,width:r[r.length-1].length}},T.exports=$},7507:(T,N,e)=>{var r,i,it;"use strict";const f=e(6010),$=e(3853),y=e(9205),u=/https?:|\{+|\}+|\[{2,}|\[(?![^[]*\])|((?:^|\])[^[]*?)\]+|<(?=\s*\/?([a-z]\w*)[\s/>])/giu,p=/\{+|\}+|\[{2,}|\[(?![^[]*\])|((?:^|\])[^[]*?)\]+|<(?=\s*\/?([a-z]\w*)[\s/>])/giu;class g extends ${constructor(l="",o=f.getConfig()){super();L(this,i);L(this,r,void 0);P(this,"type","text");P(this,"data");G(this,r,o),this.data=l}toString(){return this.data}text(){return this.data}lint(l=0){var c;const{data:o,parentNode:h}=this,a=h==null?void 0:h.type,S=h==null?void 0:h.name,m=a==="free-ext-link"||a==="ext-link-url"||a==="image-parameter"&&S==="link"?p:u,d=[];if(o.search(m)!==-1){m.lastIndex=0;const A=this.getRootNode(),{top:k,left:C}=A.posFromIndex(l),w=new Set([x(this,r).ext,x(this,r).html].flat(2));for(let F=m.exec(o);F;F=m.exec(o)){const[,E,z]=F;let{0:v,index:b}=F;E&&(b+=E.length,v=v.slice(E.length));const D=l+b,j=o.slice(0,b).split(`
4
+ `),W=j.length+k-1,M=j[j.length-1],J=j.length>1?M.length:C+M.length,{0:V,length:Q}=v,Y=D+Q;let q=V==="{"||V==="}"||Q>1?"error":"warning";if(V==="h")switch(h==null?void 0:h.type){case"ext-link-text":q="warning";break;case"attr-value":{const{parentNode:K}=h;if(((K==null?void 0:K.name)==="src"||(K==null?void 0:K.name)==="srcset")&&((c=K==null?void 0:K.parentNode)==null?void 0:c.name)==="img")continue;break}case"ext-inner":if(S==="sm2"||S==="flashmp3")continue}else if(V==="<"&&!w.has(z.toLowerCase()))continue;d.push({message:`\u5B64\u7ACB\u7684"${V==="h"?v:V}"`,severity:q,startIndex:D,endIndex:Y,startLine:W,endLine:W,startCol:J,endCol:J+Q})}}return d}replaceData(l=""){X(this,i,it).call(this,l)}}r=new WeakMap,i=new WeakSet,it=function(l){l=String(l),this.setAttribute("data",l)},T.exports=g},6986:(T,N,e)=>{"use strict";const f=e(6010);class ${constructor(u,p=0,g=f.getConfig(),r=!1,i=!1){P(this,"valid",!0);P(this,"ns",0);P(this,"fragment","");P(this,"encoded",!1);const{namespaces:s,nsid:t}=g;let n=s[p];if(r&&u.includes("%"))try{const a=/%(?!5[bd]|7[b-d])[\da-f]{2}/iu.test(u);u=decodeURIComponent(u),this.encoded=a}catch(a){}u=u.replace(/_/gu," ").trim(),u[0]===":"&&(n="",u=u.slice(1).trim());const l=u.split(":");if(l.length>1){const a=s[t[l[0].trim().toLowerCase()]];a!==void 0&&(n=a,u=l.slice(1).join(":").trim())}this.ns=t[n.toLowerCase()];const o=u.indexOf("#");let h="";o!==-1&&(h=u.slice(o+1).trim(),u=u.slice(0,o).trim()),this.valid=Boolean(u||i&&h)&&!/\0\d+[eh!+-]\x7F|[<>[\]{}|]|%[\da-f]{2}/iu.test(u),this.fragment=h}}T.exports=$},2308:T=>{"use strict";const N=e=>{var f;return f=class extends e{text(){return""}},P(f,"hidden",!0),f};T.exports=N},8275:(T,N,e)=>{"use strict";const{removeComment:f}=e(231),$=e(6010),y=e(9450),u=e(1782),p=e(9544),g=(r,i=$.getConfig(),s=[])=>{var d,c,A,k,C;const t="^(\0\\d+c\x7F)*={1,6}|\\[\\[|\\{{2,}|-\\{(?!\\{)",n=[],l={"=":`
5
+ `,"{":"\\}{2,}|\\|","-":"\\}-","[":"\\]\\]"},o={"!":"!","!!":"+","(!":"{","!)":"}","!-":"-","=":"~"};let h=new RegExp(t,"gmu"),a=h.exec(r),S=r.includes("}}"),m;for(;a||m<=r.length&&((c=(d=n[n.length-1])==null?void 0:d[0])==null?void 0:c[0])==="=";){if(a!=null&&a[1]){const[,{length:J}]=a;a[0]=a[0].slice(J),a.index+=J}const{0:w,index:F}=a!=null?a:{0:`
6
+ `,index:r.length},E=(A=n.pop())!=null?A:{},{0:z,index:v,parts:b,findEqual:D,pos:j}=E,W=w==="="&&D;if(w==="]]"||w==="}-")m=F+2;else if(w===`
7
+ `){m=F+1;const{pos:J,findEqual:V}=(k=n[n.length-1])!=null?k:{};if(!J||V||f(r.slice(J,v))!==""){const Q=/^(={1,6})(.+)\1((?:\s|\0\d+c\x7F)*)$/u.exec(r.slice(v,F));Q&&(r=`${r.slice(0,v)}\0${s.length}h\x7F${r.slice(F)}`,m=v+4+String(s.length).length,new y(Q[1].length,Q.slice(2),i,s))}}else if(w==="|"||W)m=F+1,b[b.length-1].push(r.slice(j,F)),w==="|"&&b.push([]),E.pos=m,E.findEqual=w==="|",n.push(E);else if(w.startsWith("}}")){const J=w.slice(0,Math.min(z.length,3)),V=z.length-J.length,{length:Q}=s;m=F+J.length,b[b.length-1].push(r.slice(j,F));let Y=!1,q="t";if(J.length===3)new p(b.map(K=>K.join("=")),i,s);else{const K=f(b[0][0]).trim();K in o?q=o[K]:/^(?:fullurl|canonicalurl|filepath):.|^server$/iu.test(K)?q="m":/^#vardefine:./iu.test(K)&&(q="c");try{new u(b[0][0],b.slice(1),i,s)}catch(I){if(I instanceof Error&&I.message.startsWith("\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A"))m=v+z.length,Y=!0;else throw I}}Y||(r=`${r.slice(0,v+V)}\0${Q}${q}\x7F${r.slice(m)}`,m=v+V+3+String(Q).length,V>1?n.push({0:z.slice(0,V),index:v,pos:v+V,parts:[[]]}):V===1&&r[v-1]==="-"&&n.push({0:"-{",index:v-1,pos:v+1,parts:[[]]}))}else m=F+w.length,w[0]==="{"&&(a.pos=m,a.parts=[[]]),n.push(..."0"in E?[E]:[],a);S&&(S=r.slice(m).includes("}}"));let M=n[n.length-1];!S&&((C=M==null?void 0:M[0])==null?void 0:C[0])==="{"&&(n.pop(),M=n[n.length-1]),h=new RegExp(t+(M?`|${l[M[0][0]]}${M.findEqual?"|=":""}`:""),"gmu"),h.lastIndex=m,a=h.exec(r)}return r};T.exports=g},4907:(T,N,e)=>{"use strict";const f=e(6010),$=e(851),y=e(3423),u=e(8655),p=e(7267),g=e(5749),r=(i,s=f.getConfig(),t=[],n=!1)=>{const l=/<onlyinclude>(.*?)<\/onlyinclude>/gsu;if(n&&i.search(l)!==-1)return i.replace(l,(m,d)=>{const c=`\0${t.length}e\x7F`;return new $(d,s,t),c}).replace(/(^|\0\d+e\x7F)(.*?)(?=$|\0\d+e\x7F)/gsu,(m,d,c)=>c===""?d:(new y(c,s,t),`${d}\0${t.length-1}c\x7F`));const o=s.ext.join("|"),h=n?"includeonly":"(?:no|only)include",a=n?"noinclude":"includeonly",S=new RegExp(`<!--.*?(?:-->|$)|<${h}(?:\\s[^>]*?)?>|</${h}\\s*>|<(${o})(\\s[^>]*?)?(?:/>|>(.*?)</(\\1\\s*)>)|<(${a})(\\s[^>]*?)?(?:/>|>(.*?)(?:</(\\5\\s*)>|$))`,"gisu");return i.replace(S,(m,d,c,A,k,C,w,F,E)=>{const z=`\0${t.length}${d?"e":"c"}\x7F`;if(d)new p(d,c,A,k,s,t);else if(m.startsWith("<!--")){const v=m.endsWith("-->");new g(m.slice(4,v?-3:void 0),v,s,t)}else C?new u(C,w,F,E,s,t):new y(m,s,t);return z})};T.exports=r},3765:(T,N,e)=>{"use strict";const f=e(6010),$=e(9910),y=(u,p=f.getConfig(),g=[])=>{const r=/-\{/gu,i=/-\{|\}-/gu,s=[];let t=r,n=t.exec(u);for(;n;){const{0:l,index:o}=n;if(l==="}-"){const h=s.pop(),{length:a}=g,S=u.slice(h.index+2,o),m=S.indexOf("|"),[d,c]=m===-1?[[],S]:[S.slice(0,m).split(";"),S.slice(m+1)],A=c.replace(/(&[#a-z\d]+);/giu,"$1"),k=`(?:${p.variants.join("|")})`,C=A.split(new RegExp(`;(?=\\s*(?:${k}|[^;]*?=>\\s*${k})\\s*:)`,"u")).map(w=>w.replace(/\x01/gu,";"));new $(d,C,p,g),u=`${u.slice(0,h.index)}\0${a}v\x7F${u.slice(o+2)}`,s.length===0&&(t=r),t.lastIndex=h.index+3+String(a).length}else s.push(n),t=i,t.lastIndex=o+2;n=t.exec(u)}return u};T.exports=y},7513:(T,N,e)=>{"use strict";const{extUrlChar:f,extUrlCharFirst:$}=e(231),y=e(6010),u=e(741),p=(g,r=y.getConfig(),i=[])=>{const s=new RegExp(`\\[((?:(?:${r.protocol}|//)${$}|\0\\d+m\x7F)${f})(\\p{Zs}*)([^\\]-\b
8
+ -\uFFFD]*)\\]`,"giu");return g.replace(s,(t,n,l,o)=>{const{length:h}=i,a=/&[lg]t;/u.exec(n);return a&&(n=n.slice(0,a.index),l="",o=`${n.slice(a.index)}${l}${o}`),new u(n,l,o,r,i),`\0${h}w\x7F`})};T.exports=p},2937:(T,N,e)=>{"use strict";const f=e(6010),$=e(7507),y=e(8138),u=e(2582),p=e(7815),g=({firstChild:{data:r},type:i,name:s},t=f.getConfig(),n=[])=>{const{doubleUnderscore:l}=t,o=new Set(l[0]),h=new Set(l[1]);return i!=="root"&&(i!=="ext-inner"||s!=="poem")&&(r=`\0${r}`),r=r.replace(/^((?:\0\d+c\x7F)*)(-{4,})/gmu,(a,S,m)=>(new u(m.length,t,n),`${S}\0${n.length-1}r\x7F`)).replace(new RegExp(`__(${l.flat().join("|")})__`,"giu"),(a,S)=>o.has(S.toLowerCase())||h.has(S)?(new p(S,t,n),`\0${n.length-1}u\x7F`):a),i==="root"||i==="ext-inner"&&s==="poem"?r:r.slice(1)};T.exports=g},5130:(T,N,e)=>{"use strict";const f=e(6010),$=e(5649),y=e(2350),u=(p,g=f.getConfig(),r=[])=>{const i=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,s=new Set(g.html.flat()),t=p.split("<");let n=t.shift();for(const l of t){const o=i.exec(l),h=o==null?void 0:o[2],a=h==null?void 0:h.toLowerCase();if(!o||!s.has(a)){n+=`<${l}`;continue}const[,S,,m="",d,c]=o,A=new $(m,"html-attrs",a,g,r),k=A.getAttr("itemprop");if(a==="meta"&&(k===void 0||A.getAttr("content")===void 0)||a==="link"&&(k===void 0||A.getAttr("href")===void 0)){n+=`<${l}`,r.pop();continue}n+=`\0${r.length}x\x7F${c}`,new y(h,A,S==="/",d==="/>",g,r)}return n};T.exports=u},1452:(T,N,e)=>{"use strict";const f=e(6010),$=e(3905),y=e(7625),u=e(337),p=(g,r=f.getConfig(),i=[])=>{const s=e(3360),t=r.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,l=new RegExp(`^\\s*(?:${r.protocol})`,"iu"),o=g.split("[[");let h=o.shift();for(let a=0;a<o.length;a++){let S,m,d,c,A;const k=o[a],C=t.exec(k);if(C)[,m,d,c,A]=C,A[0]==="]"&&(c==null?void 0:c.includes("["))&&(c+="]",A=A.slice(1));else{const b=n.exec(k);b&&(S=!0,[,m,d,c]=b)}if(m===void 0||l.test(m)||/\0\d+[exhbru]\x7F/u.test(m)){h+=`[[${k}`;continue}const w=m.trim()[0]===":";if(w&&S){h+=`[[${k}`;continue}const F=f.normalizeTitle(m,0,!1,r,!0,!0,!0),{ns:E,valid:z}=F;if(z){if(S){if(E!==6){h+=`[[${k}`;continue}let b;for(a++;a<o.length;a++){const D=o[a],j=D.split("]]");if(j.length>2){b=!0,c+=`[[${j[0]}]]${j[1]}`,A=j.slice(2).join("]]");break}else if(j.length===2)c+=`[[${j[0]}]]${j[1]}`;else{c+=`[[${D}`;break}}if(c=p(c,r,i),!b){h+=`[[${m}${d}${c}`;continue}}}else{h+=`[[${k}`;continue}c&&(c=s(c,r,i)),h+=`\0${i.length}l\x7F${A}`;let v=$;w||(E===6?v=y:E===14&&(v=u)),c===void 0&&d&&(c=""),new v(m,c,F,r,i,d)}return h};T.exports=p},6622:(T,N,e)=>{"use strict";const f=e(6010),$=e(962),y=e(3434),u=(p,g=f.getConfig(),r=[])=>{const i=/^((?:\0\d+c\x7F)*)([;:*#]+)/u.exec(p);if(!i)return p;const[s,t,n]=i;p=`${t}\0${r.length}d\x7F${p.slice(s.length)}`,new $(n,g,r);let l=n.split(";").length-1;if(!l)return p;let o=/:+|-\{/gu,h=o.exec(p),a=0;for(;h&&l;){const{0:S,index:m}=h;if(S[0]===":"){if(S.length>=l)return new y(":".repeat(l),g,r),`${p.slice(0,m)}\0${r.length-1}d\x7F${p.slice(m+l)}`;p=`${p.slice(0,m)}\0${r.length}d\x7F${p.slice(o.lastIndex)}`,l-=S.length,o.lastIndex=m+4+String(r.length).length,new y(S,g,r)}else if(S==="-{"){if(!a){const{lastIndex:d}=o;o=/-\{|\}-/gu,o.lastIndex=d}a++}else if(a--,!a){const{lastIndex:d}=o;o=/:+|-\{/gu,o.lastIndex=d}h=o.exec(p)}return p};T.exports=u},4737:(T,N,e)=>{"use strict";const{extUrlChar:f,extUrlCharFirst:$}=e(231),y=e(6010),u=e(8962),p=(g,r=y.getConfig(),i=[])=>{const s=new RegExp(`(^|[^\\p{L}\\d_])(?:${r.protocol})(${$}${f})`,"giu");return g.replace(s,(t,n,l)=>{let o="",h=n?t.slice(1):t;const a=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(h);a&&(o=h.slice(a.index),h=h.slice(0,a.index));const S=new RegExp(`[,;.:!?${h.includes("(")?"":")"}]+$`,"u"),m=S.exec(h);if(m){let d=0;m[0][0]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(h.slice(0,m.index))&&(d=1),o=`${h.slice(m.index+d)}${o}`,h=h.slice(0,m.index+d)}return o.length>=l.length?t:(new u(h,!1,r,i),`${n}\0${i.length-1}w\x7F${o}`)})};T.exports=p},3360:(T,N,e)=>{"use strict";const f=e(6010),$=e(6714),y=(u,p=f.getConfig(),g=[])=>{var h;const r=u.split(/('{2,})/u),{length:i}=r;if(i===1)return u;let s=0,t=0,n,l,o;for(let a=1;a<i;a+=2){const{length:S}=r[a];switch(S){case 2:t++;break;case 4:r[a-1]+="'",r[a]="'''";case 3:if(s++,n)break;r[a-1].endsWith(" ")?!l&&!o&&(o=a):r[a-1].slice(-2,-1)===" "?n=a:l||(l=a);break;default:r[a-1]+="'".repeat(S-5),r[a]="'''''",t++,s++}}if(t%2===1&&s%2===1){const a=(h=n!=null?n:l)!=null?h:o;r[a]="''",r[a-1]+="'"}for(let a=1;a<i;a+=2)new $(r[a].length,p,g),r[a]=`\0${g.length-1}q\x7F`;return r.join("")};T.exports=y},4624:(T,N,e)=>{"use strict";const f=e(6010),$=e(7507),y=e(8138),u=e(2840),p=e(3125),g=e(5567),r=e(3434),i=({firstChild:{data:s},type:t,name:n},l=f.getConfig(),o=[])=>{const h=[],a=s.split(`
9
+ `);let S=t==="root"||t==="parameter-value"||t==="ext-inner"&&n==="poem"?"":`
10
+ ${a.shift()}`;const m=(d,c)=>{if(!c){S+=d;return}const{lastChild:A}=c;if(A.constructor===y)A.setText(String(A)+d);else{const k=new y(d,l,!0,o);k.type="table-inter",c.insertAt(k.setAttribute("stage",3))}};for(const d of a){let c=h.pop();const[A]=/^(?:\s|\0\d+c\x7F)*/u.exec(d),k=d.slice(A.length),C=/^(:*)((?:\s|\0\d+c\x7F)*)(\{\||\{(?:\0\d+c\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(k);if(C){for(;c&&c.type!=="td";)c=h.pop();const[,b,D,j,W]=C;b&&new r(b,l,o),m(`
11
+ ${A}${b&&`\0${o.length-1}d\x7F`}${D}\0${o.length}b\x7F`,c);const M=new u(j,W,l,o);h.push(...c?[c]:[],M);continue}else if(!c){S+=`
12
+ ${d}`;continue}const w=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(k);if(!w){m(`
13
+ ${d}`,c),h.push(...c?[c]:[]);continue}const[,F,E,z,v]=w;if(F){for(;!(c instanceof u);)c=h.pop();c.close(`
14
+ ${A}${F}`,!0),m(v,h[h.length-1])}else if(E){c.type==="td"&&(c=h.pop()),c.type==="tr"&&(c=h.pop());const b=new p(`
15
+ ${A}${E}`,v,l,o);h.push(c,b),c.insertAt(b)}else{c.type==="td"&&(c=h.pop());const b=z==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu;let D=b.exec(v),j=0,W=`
16
+ ${A}${z}`;for(;D;){const J=new g(W,v.slice(j,D.index),l,o);c.insertAt(J),{lastIndex:j}=b,[W]=D,D=b.exec(v)}const M=new g(W,v.slice(j),l,o);h.push(c,M),c.insertAt(M)}}return S.slice(1)};T.exports=i},9544:(T,N,e)=>{"use strict";const{text:f}=e(231),{generateForSelf:$,generateForChild:y}=e(8277),u=e(6010),p=e(8138);class g extends p{constructor(s,t=u.getConfig(),n=[]){super(void 0,t,!0,n,{});P(this,"type","arg");for(let l=0;l<s.length;l++)if(l===0||l>1){const o=e(l===0?9237:9263),h=new o(s[l],l===0?"arg-name":void 0,t,n,{});super.insertAt(h)}else{const o=new p(s[l],t,!0,n);o.type="arg-default",super.insertAt(o.setAttribute("stage",2))}}get default(){var s,t;return(t=(s=this.childNodes[1])==null?void 0:s.text())!=null?t:!1}toString(s){return`{{{${super.toString(s,"|")}}}}`}text(){return`{{{${f(this.childNodes.slice(0,2),"|")}}}}`}getPadding(){return 3}getGaps(){return 1}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}lint(s=0){if(!this.getAttribute("include"))return[$(this,{start:s},"\u672A\u9884\u671F\u7684\u6A21\u677F\u53C2\u6570")];const{childNodes:[t,n,...l]}=this,o=t.lint(s+3);if(n&&o.push(...n.lint(s+4+String(t).length)),l.length>0){const h={start:s,...this.getRootNode().posFromIndex(s)};o.push(...l.map(a=>y(a,h,"\u4E09\u91CD\u62EC\u53F7\u5185\u7684\u4E0D\u53EF\u89C1\u90E8\u5206")))}return o}}T.exports=g},9263:(T,N,e)=>{"use strict";const f=e(2308),$=e(9237);class y extends f($){constructor(){super(...arguments);P(this,"type","hidden")}}T.exports=y},9237:(T,N,e)=>{"use strict";const f=e(6010),$=e(8138);class y extends ${constructor(g,r,i=f.getConfig(),s=[],t=void 0){super(g,i,!0,s,t);P(this,"type","plain");r&&(this.type=r)}}T.exports=y},5037:(T,N,e)=>{var d,c;"use strict";const{generateForChild:f}=e(8277),{removeComment:$}=e(231),y=e(6010),u=e(8138),p=e(9237),g=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"]),r=new Set(["align"]),i=new Set(["cite"]),s=new Set(["cite","datetime"]),t=new Set(["width"]),n=new Set(["align","valign","abbr","axis","headers","scope","rowspan","colspan","width","height","bgcolor"]),l=new Set(["type"]),o={div:r,h1:r,h2:r,h3:r,h4:r,h5:r,h6:r,blockquote:i,q:i,p:r,br:new Set(["clear"]),pre:t,ins:s,del:s,ul:l,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set(["summary","width","border","frame","rules","cellspacing","cellpadding","align","bgcolor"]),caption:r,tr:new Set(["bgcolor","align","valign"]),td:n,th:n,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:t,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"]),combooption:new Set(["name","for","inline","align"])},h=new Set,a={nowiki:h,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:h,inputbox:h,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:h,poll:new Set(["id","show-results-before-voting"]),sm2:l,flashmp3:l,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"])},S=new RegExp("expression|(?:filter|accelerator|-o-link(?:-source)?|-o-replace)\\s*:|(?:url|image(?:-set)?)\\s*\\(|attr\\s*\\([^)]+[\\s,]url","u");class m extends u{constructor(C,w,F="",E="",z=[],v=y.getConfig(),b=[]){const D=new p(w,"attr-key",v,b,{}),j=w==="title"?new u(E,v,!0,b,{}).setAttribute("type","attr-value").setAttribute("stage",y.MAX_STAGE-1):new p(E,"attr-value",v,b,{});super(void 0,v,!0,b);L(this,d,void 0);L(this,c,void 0);this.type=C,this.append(D,j),G(this,d,F),G(this,c,z),this.setAttribute("name",$(w).trim().toLowerCase())}get balanced(){return!x(this,d)||x(this,c)[0]===x(this,c)[1]}get value(){return this.getValue()}afterBuild(){x(this,d).includes("\0")&&G(this,d,this.getAttribute("buildFromStr")(x(this,d),"string")),this.setAttribute("name",this.firstChild.text().trim().toLowerCase())}toString(C){const[w="",F=""]=x(this,c);return x(this,d)?`${super.toString(C,`${x(this,d)}${w}`)}${F}`:this.firstChild.toString(C)}text(){return x(this,d)?`${super.text(`${x(this,d).trim()}"`)}"`:this.firstChild.text()}getGaps(){var C,w;return x(this,d)?x(this,d).length+((w=(C=x(this,c)[0])==null?void 0:C.length)!=null?w:0):0}print(){const[C="",w=""]=x(this,c);return x(this,d)?super.print({sep:`${x(this,d)}${C}`,post:w}):super.print()}lint(C=0){var J;const w=super.lint(C),{balanced:F,firstChild:E,lastChild:z,type:v,name:b,parentNode:D,value:j}=this,W=D==null?void 0:D.name;let M;if(!F){const V=this.getRootNode();M={start:C,...V.posFromIndex(C)};const Q=f(z,M,"\u672A\u95ED\u5408\u7684\u5F15\u53F7","warning"),Y=Q.startIndex-1,q=Q.startCol-1;w.push({...Q,startIndex:Y,startCol:q})}return!/\{\{[^{]+\}\}/u.test(b)&&(v==="ext-attr"&&!(W in o)&&a[W]&&!a[W].has(b)||(v==="html-attr"||v==="table-attr"||W in o)&&!((J=o[W])!=null&&J.has(b))&&!/^(?:xmlns:[\w:.-]+|data-[^:]*)$/u.test(b)&&(W==="meta"||W==="link"||!g.has(b)))?(M||(M={start:C,...this.getRootNode().posFromIndex(C)}),w.push(f(E,M,"\u975E\u6CD5\u7684\u5C5E\u6027\u540D"))):b==="style"&&typeof j=="string"&&S.test(j)&&(M||(M={start:C,...this.getRootNode().posFromIndex(C)}),w.push(f(z,M,"\u4E0D\u5B89\u5168\u7684\u6837\u5F0F"))),w}getValue(){return x(this,d)?this.lastChild.text():!0}}d=new WeakMap,c=new WeakMap,T.exports=m},5649:(T,N,e)=>{"use strict";const{generateForSelf:f,generateForChild:$}=e(8277),{removeComment:y}=e(231),u=e(6010),p=e(8138),g=e(9237),r=e(5037);class i extends p{constructor(t,n,l,o=u.getConfig(),h=[]){if(super(void 0,o,!0,h,{}),this.type=n,this.setAttribute("name",l),t){const a=new RegExp(`([^\\s/](?:(?!\0\\d+~\x7F)[^\\s/=])*)(?:((?:\\s|\0\\d+c\x7F)*(?:=|\0\\d+~\x7F)(?:\\s|\0\\d+c\x7F)*)(?:(["'])(.*?)(\\3|$)|(\\S*)))?`,"gsu");let S="",m=a.exec(t),d=0;const c=()=>{S&&(super.insertAt(new g(S,`${n.slice(0,-1)}-dirty`,o,h,{})),S="")};for(;m;){const{index:A,0:k,1:C,2:w,3:F,4:E,5:z,6:v}=m;if(S+=t.slice(d,A),/^(?:[\w:]|\0\d+[t!~{}+-]\x7F)(?:[\w:.-]|\0\d+[t!~{}+-]\x7F)*$/u.test(y(C).trim())){const b=E!=null?E:v,D=[F,z],j=new r(n.slice(0,-1),C,w,b,D,o,h);c(),super.insertAt(j)}else S+=k;({lastIndex:d}=a),m=a.exec(t)}S+=t.slice(d),c()}}afterBuild(){var n,l;const t=e(5567);this.type==="table-attrs"&&this.setAttribute("name",((n=this.parentNode)==null?void 0:n.subtype)==="caption"?"caption":(l=this.parentNode)==null?void 0:l.type)}getAttrTokens(t){return this.childNodes.filter(n=>n instanceof r&&n.name===t.toLowerCase().trim())}getAttrToken(t){const n=this.getAttrTokens(t);return n[n.length-1]}getAttr(t){var n;return(n=this.getAttrToken(t))==null?void 0:n.getValue()}lint(t=0){const n=e(2350),l=super.lint(t),{parentNode:{closing:o},length:h,childNodes:a}=this,S={},m=new Set;let d;o&&this.text().trim()&&(d={start:t,...this.getRootNode().posFromIndex(t)},l.push(f(this,d,"\u4F4D\u4E8E\u95ED\u5408\u6807\u7B7E\u7684\u5C5E\u6027")));for(let c=0;c<h;c++){const A=a[c];if(A instanceof g&&A.text().trim())d||(d={start:t,...this.getRootNode().posFromIndex(t)}),l.push($(A,d,"\u5305\u542B\u65E0\u6548\u5C5E\u6027"));else if(A instanceof r){const{name:k}=A;k in S?(m.add(k),S[k].push(A)):k!=="class"&&(S[k]=[A])}}if(m.size>0){d||(d={start:t,...this.getRootNode().posFromIndex(t)});for(const c of m)l.push(...S[c].map(A=>$(A,d,`\u91CD\u590D\u7684${c}\u5C5E\u6027`)))}return l}print(){const t=e(2350);return String(this)?`<span class="wpb-${this.type}">${this.childNodes.map(n=>n.print({class:n instanceof g&&n.text().trim()&&"hidden"})).join("")}</span>`:""}}T.exports=i},8103:(T,N,e)=>{"use strict";const f=e(6010),$=e(8138),y=e(2158);class u extends ${constructor(r,i=f.getConfig(),s=[]){super(void 0,i,!0,s,{});P(this,"type","ext-inner");P(this,"name","charinsert");const t=y;this.append(...r.split(`
17
+ `).map(n=>new t(n,"charinsert-line",i,s)))}toString(r){return super.toString(r,`
18
18
  `)}getGaps(){return 1}print(){return super.print({sep:`
19
- `})}}m.exports=u},9910:(m,C,e)=>{"use strict";const{print:g}=e(231),f=e(6010),a=e(8138),u=e(6719),d=e(8683);class p extends a{constructor(s,n,i=f.getConfig(),o=[]){super(void 0,i,!0,o);S(this,"type","converter");this.append(new u(s,i,o));const[r]=n,l=r.includes(":"),c=new d(r,l,i,o);l&&c.childNodes.length===1?this.insertAt(new d(n.join(";"),!1,i,o)):this.append(c,...n.slice(1).map(x=>new d(x,!0,i,o)))}toString(s){const{childNodes:[n,...i]}=this;return`-{${n.toString()}${n.childNodes.length>0?"|":""}${i.map(String).join(";")}}-`}getPadding(){return 2}getGaps(s=0){return s=s<0?s+this.childNodes.length:s,s||this.firstChild.childNodes.length>0?1:0}print(){const{children:[s,...n]}=this;return`<span class="wpb-converter">-{${s.print()}${s.childNodes.length>0?"|":""}${g(n,{sep:";"})}}-</span>`}}m.exports=p},6719:(m,C,e)=>{var p;"use strict";const{generateForChild:g}=e(8277),f=e(6010),a=e(8138),u=e(9237);class d extends a{constructor(s,n=f.getConfig(),i=[]){super(void 0,n,!0,i,{AtomToken:":"});S(this,"type","converter-flags");w(this,p,void 0);this.append(...s.map(o=>new u(o,"converter-flag",n,i)))}afterBuild(){return H(this,p,this.childNodes.map(s=>String(s).trim())),this}toString(s){return super.toString(s,";")}getGaps(){return 1}print(){return super.print({sep:";"})}lint(s=0){const n=this.getVariantFlags(),i=this.getUnknownFlags(),o=T(this,p).filter(A=>!A),r=T(this,p).filter(A=>["A","T","R","D","-","H","N"].includes(A)),l=T(this,p).length-i.length-o,c=super.lint(s);if(n.length===l||r.length===l)return c;const x=this.getRootNode().posFromIndex(s);for(const A of this.childNodes){const $=String(A).trim();$&&!n.includes($)&&!i.includes($)&&(n.length>0||!r.includes($))&&c.push(g(A,x,"\u65E0\u6548\u7684\u8F6C\u6362\u6807\u8BB0"))}return c}getUnknownFlags(){return T(this,p).filter(s=>/\{\{[^{}]+\}\}/u.test(s))}getVariantFlags(){const{variants:s}=this.getAttribute("config");return T(this,p).filter(n=>s.includes(n))}}p=new WeakMap,m.exports=d},8683:(m,C,e)=>{"use strict";const g=e(6010),f=e(8138),a=e(9237);class u extends f{constructor(h,t=!0,s=g.getConfig(),n=[]){super(void 0,s,!0,n);S(this,"type","converter-rule");if(t){const i=h.indexOf(":"),o=h.slice(0,i).indexOf("=>"),r=o===-1?h.slice(0,i):h.slice(o+2,i),{variants:l}=s;l.includes(r.trim())?(super.insertAt(new a(r,"converter-rule-variant",s,n)),super.insertAt(new a(h.slice(i+1),"converter-rule-to",s,n)),o!==-1&&super.insertAt(new a(h.slice(0,o),"converter-rule-from",s,n),0)):super.insertAt(new a(h,"converter-rule-noconvert",s,n))}else super.insertAt(new a(h,"converter-rule-noconvert",s,n))}toString(h){if(this.childNodes.length===3){const{childNodes:[t,s,n]}=this;return`${t.toString(h)}=>${s.toString(h)}:${n.toString(h)}`}return super.toString(h,":")}getGaps(h=0){const{length:t}=this;return h=h<0?h+t:h,h===0&&t===3?2:1}print(){if(this.childNodes.length===3){const{childNodes:[h,t,s]}=this;return`<span class="wpb-converter-rule">${h.print()}=>${t.print()}:${s.print()}</span>`}return super.print({sep:":"})}}m.exports=u},741:(m,C,e)=>{var d;"use strict";const g=e(6010),f=e(8138),a=e(8962);class u extends f{constructor(t,s,n,i=g.getConfig(),o=[]){super(void 0,i,!0,o,{MagicLinkToken:0,Token:1});S(this,"type","ext-link");w(this,d,void 0);if(this.insertAt(new a(t,!0,i,o)),H(this,d,s),n){const r=new f(n,i,!0,o,{"Stage-7":":",ConverterToken:":"});r.type="ext-link-text",this.insertAt(r.setAttribute("stage",g.MAX_STAGE-1))}}toString(t){return this.childNodes.length===1?`[${super.toString(t)}${T(this,d)}]`:`[${super.toString(t,T(this,d))}]`}getPadding(){return 1}getGaps(){return T(this,d).length}print(){const{length:t}=this;return super.print(t>1?{pre:"[",sep:T(this,d),post:"]"}:{pre:"[",post:`${T(this,d)}]`})}}d=new WeakMap,m.exports=u},1891:(m,C,e)=>{"use strict";const g=e(6010),f=e(8138),a=e(1031),u=e(9263);class d extends f{constructor(t,s=g.getConfig(),n=[]){var o;super(void 0,s,!0,n,{AstText:":",GalleryImageToken:":",HiddenToken:":"});S(this,"type","ext-inner");S(this,"name","gallery");const i=structuredClone(s);for(const[r,l]of Object.entries(s.img))l==="width"&&delete i.img[r];for(const r of(o=t==null?void 0:t.split(`
20
- `))!=null?o:[]){const l=/^([^|]+)(?:\|(.*))?/u.exec(r);if(!l){super.insertAt(r.trim()?new u(r,void 0,s,[],{AstText:":"}):r);continue}const[,c,x]=l;let A;try{A=this.normalizeTitle(decodeURIComponent(c),6,!0)}catch($){A=this.normalizeTitle(c,6,!0)}A.valid?super.insertAt(new a(c,x,A,i,n)):super.insertAt(new u(r,void 0,s,[],{AstText:":"}))}}toString(t){return super.toString(t,`
19
+ `})}}T.exports=u},9910:(T,N,e)=>{"use strict";const{text:f,print:$}=e(231),y=e(6010),u=e(8138),p=e(6719),g=e(8683);class r extends u{constructor(t,n,l=y.getConfig(),o=[]){super(void 0,l,!0,o);P(this,"type","converter");this.append(new p(t,l,o));const[h]=n,a=h.includes(":"),S=new g(h,a,l,o);a&&S.length===1?this.insertAt(new g(n.join(";"),!1,l,o)):this.append(S,...n.slice(1).map(m=>new g(m,!0,l,o)))}toString(t){const{childNodes:[n,...l]}=this;return`-{${n.toString()}${n.length>0?"|":""}${l.map(String).join(";")}}-`}text(){const{childNodes:[t,...n]}=this;return`-{${t.text()}|${f(n,";")}}-`}getPadding(){return 2}getGaps(t=0){return t=t<0?t+this.length:t,t||this.firstChild.length>0?1:0}print(){const{childNodes:[t,...n]}=this;return`<span class="wpb-converter">-{${t.print()}${t.length>0?"|":""}${$(n,{sep:";"})}}-</span>`}}T.exports=r},6719:(T,N,e)=>{var r;"use strict";const{generateForChild:f}=e(8277),$=e(6010),y=e(8138),u=e(9237),p=new Set(["A","T","R","D","-","H","N"]);class g extends y{constructor(t,n=$.getConfig(),l=[]){super(void 0,n,!0,l,{});P(this,"type","converter-flags");L(this,r,void 0);this.append(...t.map(o=>new u(o,"converter-flag",n,l)))}afterBuild(){G(this,r,this.childNodes.map(t=>t.text().trim()))}toString(t){return super.toString(t,";")}text(){return super.text(";")}getGaps(){return 1}print(){return super.print({sep:";"})}lint(t=0){const n=this.getVariantFlags(),l=this.getUnknownFlags(),o=new Set(x(this,r).filter(A=>p.has(A))),{length:h}=x(this,r).filter(A=>!A),a=x(this,r).length-l.size-h,S=super.lint(t);if(n.size===a||o.size===a)return S;const m={start:t,...this.getRootNode().posFromIndex(t)},{childNodes:d,length:c}=this;for(let A=0;A<c;A++){const k=d[A],C=k.text().trim();if(C&&!n.has(C)&&!l.has(C)&&(n.size>0||!o.has(C))){const w=f(k,m,"\u65E0\u6548\u7684\u8F6C\u6362\u6807\u8BB0");S.push(w)}}return S}getUnknownFlags(){return new Set(x(this,r).filter(t=>/\{\{[^{}]+\}\}/u.test(t)))}getVariantFlags(){const t=new Set(this.getAttribute("config").variants);return new Set(x(this,r).filter(n=>t.has(n)))}}r=new WeakMap,T.exports=g},8683:(T,N,e)=>{"use strict";const f=e(6010),$=e(8138),y=e(9237);class u extends ${constructor(r,i=!0,s=f.getConfig(),t=[]){super(void 0,s,!0,t);P(this,"type","converter-rule");if(i){const n=r.indexOf(":"),l=r.slice(0,n).indexOf("=>"),o=l===-1?r.slice(0,n):r.slice(l+2,n),{variants:h}=s;h.includes(o.trim())?(super.insertAt(new y(o,"converter-rule-variant",s,t)),super.insertAt(new y(r.slice(n+1),"converter-rule-to",s,t)),l!==-1&&super.insertAt(new y(r.slice(0,l),"converter-rule-from",s,t),0)):super.insertAt(new y(r,"converter-rule-noconvert",s,t))}else super.insertAt(new y(r,"converter-rule-noconvert",s,t))}toString(r){if(this.length===3){const{childNodes:[i,s,t]}=this;return`${i.toString(r)}=>${s.toString(r)}:${t.toString(r)}`}return super.toString(r,":")}text(){if(this.length===3){const{childNodes:[r,i,s]}=this;return`${r.text()}=>${i.text()}:${s.text()}`}return super.text(":")}getGaps(r=0){const{length:i}=this;return r=r<0?r+i:r,r===0&&i===3?2:1}print(){if(this.length===3){const{childNodes:[r,i,s]}=this;return`<span class="wpb-converter-rule">${r.print()}=>${i.print()}:${s.print()}</span>`}return super.print({sep:":"})}}T.exports=u},741:(T,N,e)=>{var p;"use strict";const f=e(6010),$=e(8138),y=e(8962);class u extends ${constructor(i,s,t,n=f.getConfig(),l=[]){super(void 0,n,!0,l,{});P(this,"type","ext-link");L(this,p,void 0);if(this.insertAt(new y(i,!0,n,l)),G(this,p,s),t){const o=new $(t,n,!0,l,{});o.type="ext-link-text",this.insertAt(o.setAttribute("stage",f.MAX_STAGE-1))}}toString(i){return this.length===1?`[${super.toString(i)}${x(this,p)}]`:`[${super.toString(i,x(this,p))}]`}text(){return`[${super.text(" ")}]`}getPadding(){return 1}getGaps(){return x(this,p).length}print(){const{length:i}=this;return super.print(i>1?{pre:"[",sep:x(this,p),post:"]"}:{pre:"[",post:`${x(this,p)}]`})}}p=new WeakMap,T.exports=u},1891:(T,N,e)=>{"use strict";const f=e(6010),$=e(8138),y=e(1031),u=e(9263);class p extends ${constructor(i,s=f.getConfig(),t=[]){var l;super(void 0,s,!0,t,{});P(this,"type","ext-inner");P(this,"name","gallery");const n=JSON.parse(JSON.stringify(s));for(const[o,h]of Object.entries(s.img))h==="width"&&delete n.img[o];for(const o of(l=i==null?void 0:i.split(`
20
+ `))!=null?l:[]){const h=/^([^|]+)(?:\|(.*))?/u.exec(o);if(!h){super.insertAt(o.trim()?new u(o,void 0,s,[],{}):o);continue}const[,a,S]=h,m=this.normalizeTitle(a,6,!0,!0);m.valid?super.insertAt(new y(a,S,m,n,t)):super.insertAt(new u(o,void 0,s,[],{}))}}toString(i){return super.toString(i,`
21
+ `)}text(){return super.text(`
22
+ `).replace(/\n\s*\n/gu,`
21
23
  `)}getGaps(){return 1}print(){return super.print({sep:`
22
- `})}lint(t=0){const{top:s,left:n}=this.getRootNode().posFromIndex(t),i=[];for(let o=0,r=t;o<this.childNodes.length;o++){const l=this.childNodes[o],c=String(l),x=c.trim();l.type==="hidden"&&x&&!/^<!--.*-->$/u.test(x)?i.push({message:"\u56FE\u5E93\u4E2D\u7684\u65E0\u6548\u5185\u5BB9",startLine:s+o,endLine:s+o,startCol:o?0:n,endCol:o?c.length:n+c.length}):l.type!=="hidden"&&l.type!=="text"&&i.push(...l.lint(r)),r+=c.length+1}return i}}m.exports=d},2158:(m,C,e)=>{"use strict";const g=e(6010),f=e(8138);class a extends f{constructor(d,p,h=g.getConfig(),t=[]){const s=e(3423);d=d.replaceAll(/(<nowiki>)(.*?)(<\/nowiki>)/giu,(n,i,o,r)=>(new s(i,h,t),new s(r,h,t),`\0${t.length-1}c\x7F${o}\0${t.length}c\x7F`)),super(d,h,!0,t,{AstText:":",NoincludeToken:":"}),this.type=p}}m.exports=a},428:(m,C,e)=>{"use strict";const g=e(6010),f=e(2158);class a extends f{constructor(p,h=g.getConfig(),t=[]){super(p,"ext-inner",h,t);S(this,"name","pre");this.setAttribute("stage",g.MAX_STAGE-1)}isPlain(){return!0}}m.exports=a},9450:(m,C,e)=>{"use strict";const{generateForSelf:g}=e(8277),f=e(6010),a=e(8138);class u extends a{constructor(h,t,s=f.getConfig(),n=[]){super(void 0,s,!0,n);S(this,"type","heading");this.setAttribute("name",String(h));const i=new a(t[0],s,!0,n);i.type="heading-title",i.setAttribute("stage",2);const o=e(8058),r=new o(t[1],/^[^\S\n]*$/u,"heading-trail",s,n,{"Stage-1":":","!ExtToken":""});this.append(i,r)}toString(h){const t="=".repeat(Number(this.name));return`${t}${this.firstChild.toString()}${t}${this.lastChild.toString()}`}getPadding(){return super.getPadding()+Number(this.name)}getGaps(){return Number(this.name)}print(){const h="=".repeat(Number(this.name));return super.print({pre:h,sep:h})}lint(h=0){const t=super.lint(h);return this.name==="1"&&t.push(g(this,this.getRootNode().posFromIndex(h),"<h1>")),t}}m.exports=u},2350:(m,C,e)=>{var d,p,h;"use strict";const{generateForSelf:g}=e(8277),f=e(6010),a=e(8138);class u extends a{constructor(n,i,o,r,l=f.getConfig(),c=[]){super(void 0,l,!0,c);S(this,"type","html");w(this,d,void 0);w(this,p,void 0);w(this,h,void 0);this.insertAt(i),this.setAttribute("name",n.toLowerCase()),H(this,d,o),H(this,p,r),H(this,h,n)}get closing(){return T(this,d)}toString(n){return`<${T(this,d)?"/":""}${T(this,h)}${super.toString()}${T(this,p)?"/":""}>`}getPadding(){return T(this,h).length+(T(this,d)?2:1)}print(){return super.print({pre:`&lt;${T(this,d)?"/":""}${T(this,h)}`,post:`${T(this,p)?"/":""}&gt;`})}lint(n=0){const i=super.lint(n);let o;this.name==="h1"&&!T(this,d)&&(o=g(this,this.getRootNode().posFromIndex(n),"<h1>"),i.push(o));try{this.findMatchingTag()}catch({message:r}){const[l]=r.split("\uFF1A");o||(o=g(this,this.getRootNode().posFromIndex(n),"")),i.push({...o,message:l,severity:l==="\u672A\u95ED\u5408\u7684\u6807\u7B7E"?"warning":"error"})}return i}findMatchingTag(){const{html:n}=this.getAttribute("config"),{name:i,parentNode:o}=this,r=String(this);if(T(this,d)&&T(this,p))throw new SyntaxError(`\u540C\u65F6\u95ED\u5408\u548C\u81EA\u5C01\u95ED\u7684\u6807\u7B7E\uFF1A${r}`);if(n[2].includes(i)||T(this,p)&&n[1].includes(i))return this;if(T(this,p)&&n[0].includes(i))throw new SyntaxError(`\u65E0\u6548\u81EA\u5C01\u95ED\u6807\u7B7E\uFF1A${r}`);if(!o)return;const{childNodes:l}=o,c=l.indexOf(this),x=T(this,d)?l.slice(0,c).reverse().filter(({type:$,name:k})=>$==="html"&&k===i):l.slice(c+1).filter(({type:$,name:k})=>$==="html"&&k===i);let A=T(this,d)?-1:1;for(const $ of x)if($.closing?A--:A++,A===0)return $;throw new SyntaxError(`\u672A${T(this,d)?"\u5339\u914D\u7684\u95ED\u5408":"\u95ED\u5408\u7684"}\u6807\u7B7E\uFF1A${r}`)}}d=new WeakMap,p=new WeakMap,h=new WeakMap,m.exports=u},1874:(m,C,e)=>{var p,it,t;"use strict";const{print:g,extUrlChar:f}=e(231),a=e(6010),u=e(8138),n=class extends u{constructor(r,l=a.getConfig(),c=[]){var o=(...s)=>{super(...s);S(this,"type","image-parameter");w(this,t,"")};var $;const x=Object.entries(l.img).map(([k,N])=>[k,N,new RegExp(`^(\\s*)${k.replace("$1","(.*)")}(\\s*)$`,"u")]),A=x.find(([,,k])=>k.test(r));if(A){const k=A[2].exec(r);if(k.length!==4||D($=n,p,it).call($,A[1],k[2],l,!0)){k.length===3?(o(void 0,l,!0,c),H(this,t,r)):(o(k[2],l,!0,c,{"Stage-2":":","!HeadingToken":":"}),H(this,t,`${k[1]}${A[0]}${k[3]}`)),this.setAttribute("name",A[1]).setAttribute("stage",a.MAX_STAGE);return}}o(r,l,!0,c),this.setAttribute("name","caption").setAttribute("stage",7)}isPlain(){return!0}toString(r){return T(this,t)?T(this,t).replace("$1",super.toString(r)):super.toString(r)}getPadding(){return Math.max(0,T(this,t).indexOf("$1"))}print(){return T(this,t)?`<span class="wpb-image-parameter">${T(this,t).replace("$1",g(this.childNodes))}</span>`:super.print({class:"image-caption"})}};let d=n;p=new WeakSet,it=function(r,l,c=a.getConfig(),x=!1){switch(l=l.replaceAll(/\0\d+t\x7F/gu,"").trim(),r){case"width":return/^\d*(?:x\d*)?$/u.test(l);case"link":{if(!l||new RegExp(`(?:${c.protocol}|//)${f}(?=\0\\d+t\x7F|$)`,"iu").test(l))return!0;if(l.startsWith("[[")&&l.endsWith("]]")&&(l=l.slice(2,-2)),l.includes("%"))try{l=decodeURIComponent(l)}catch(k){}return a.normalizeTitle(l,0,!1,c,x).valid}case"lang":return c.variants.includes(l);case"alt":case"class":case"manualthumb":return!0;default:return!isNaN(l)}},t=new WeakMap,w(d,p),m.exports=d},2641:(m,C,e)=>{"use strict";const{generateForSelf:g,generateForChild:f}=e(8277),a=e(6010),u=e(7507),d=e(8138),p=e(3423),h=e(1031),t=e(2571);class s extends d{constructor(o,r=a.getConfig(),l=[]){super(void 0,r,!0,l,{GalleryImageToken:":",ImagemapLinkToken:":",NoincludeToken:":",AstText:":"});S(this,"type","ext-inner");S(this,"name","imagemap");if(!o)return;const c=o.split(`
23
- `),x=k=>{super.insertAt(new p(k,r,l))};let A=!0,$=!1;for(const k of c){const N=k.trim();if(!($||!N||N[0]==="#")){if(A){const[v,...b]=k.split("|");let I;try{I=this.normalizeTitle(decodeURIComponent(v),0,!0)}catch(F){I=this.normalizeTitle(v,0,!0)}if(I.valid&&!I.interwiki&&I.ns===6){const F=new h(v,b.length>0?b.join("|"):void 0,I,r,l);F.type="imagemap-image",super.insertAt(F),A=!1;continue}else $=!0}else if(k.trim().split(/[\t ]/u)[0]==="desc"){super.insertAt(new u(k));continue}else if(k.includes("[")){const v=k.indexOf("["),b=k.slice(v),I=/^\[{2}([^|]+)(?:\|([^\]]+))?\]{2}[\w\s]*$/u.exec(b);if(I){const F=this.normalizeTitle(I[1],0,!0);if(F.valid){super.insertAt(new t(k.slice(0,v),[...I.slice(1),F],b.slice(b.indexOf("]]")+2),r,l));continue}}else{const F=r.protocol.split("|");if(F.includes(b.slice(1,b.indexOf(":")+1))||F.includes(b.slice(1,b.indexOf("//")+2))){const z=/^\[([^\]\s]+)(?:(\s+)(\S[^\]]*)?)?\][\w\s]*$/u.exec(b);if(z){super.insertAt(new t(k.slice(0,v),z.slice(1),b.slice(b.indexOf("]")+1),r,l));continue}}}}}x(k)}}toString(o){return super.toString(o,`
24
+ `})}lint(i=0){const{top:s,left:t}=this.getRootNode().posFromIndex(i),n=[];for(let l=0,o=i;l<this.length;l++){const h=this.childNodes[l],a=String(h),{length:S}=a,m=a.trim(),d=s+l,c=l?0:t;h.type==="hidden"&&m&&!/^<!--.*-->$/u.test(m)?n.push({message:"\u56FE\u5E93\u4E2D\u7684\u65E0\u6548\u5185\u5BB9",severity:"error",startIndex:o,endIndex:o+S,startLine:d,endLine:d,startCol:c,endCol:c+S}):h.type!=="hidden"&&h.type!=="text"&&n.push(...h.lint(o)),o+=S+1}return n}}T.exports=p},2158:(T,N,e)=>{"use strict";const f=e(6010),$=e(8138),y=e(3423);class u extends ${constructor(g,r,i=f.getConfig(),s=[]){g=g.replace(/(<nowiki>)(.*?)(<\/nowiki>)/giu,(t,n,l,o)=>(new y(n,i,s),new y(o,i,s),`\0${s.length-1}c\x7F${l}\0${s.length}c\x7F`)),super(g,i,!0,s,{}),this.type=r}}T.exports=u},428:(T,N,e)=>{"use strict";const f=e(6010),$=e(2158);class y extends ${constructor(g,r=f.getConfig(),i=[]){super(g,"ext-inner",r,i);P(this,"name","pre");this.setAttribute("stage",f.MAX_STAGE-1)}isPlain(){return!0}}T.exports=y},9450:(T,N,e)=>{"use strict";const{generateForSelf:f}=e(8277),$=e(6010),y=e(8138),u=e(8058);class p extends y{constructor(i,s,t=$.getConfig(),n=[]){super(void 0,t,!0,n);P(this,"type","heading");this.setAttribute("name",String(i));const l=new y(s[0],t,!0,n);l.type="heading-title",l.setAttribute("stage",2);const o=new u(s[1],/^[^\S\n]*$/u,"heading-trail",t,n,{});this.append(l,o)}toString(i){const s="=".repeat(Number(this.name));return`${s}${this.firstChild.toString()}${s}${this.lastChild.toString()}`}text(){const i="=".repeat(Number(this.name));return`${i}${this.firstChild.text()}${i}`}getPadding(){return super.getPadding()+Number(this.name)}getGaps(){return Number(this.name)}print(){const i="=".repeat(Number(this.name));return super.print({pre:i,sep:i})}lint(i=0){const s=super.lint(i),t=String(this.firstChild);let n;return this.name==="1"&&(n=f(this,{start:i},"<h1>"),s.push(n)),(t[0]==="="||t.endsWith("="))&&(n||(n=f(this,{start:i},"")),s.push({...n,message:'\u6BB5\u843D\u6807\u9898\u4E2D\u4E0D\u5E73\u8861\u7684"="'})),this.closest("html-attrs, table-attrs")&&(n||(n=f(this,{start:i},"")),s.push({...n,message:"HTML\u6807\u7B7E\u5C5E\u6027\u4E2D\u7684\u6BB5\u843D\u6807\u9898"})),s}}T.exports=p},2350:(T,N,e)=>{var p,g,r;"use strict";const{generateForSelf:f}=e(8277),$=e(6010),y=e(8138);class u extends y{constructor(t,n,l,o,h=$.getConfig(),a=[]){super(void 0,h,!0,a);P(this,"type","html");L(this,p,void 0);L(this,g,void 0);L(this,r,void 0);this.insertAt(n),this.setAttribute("name",t.toLowerCase()),G(this,p,l),G(this,g,o),G(this,r,t)}get closing(){return x(this,p)}toString(t){return`<${x(this,p)?"/":""}${x(this,r)}${super.toString()}${x(this,g)?"/":""}>`}text(){return`<${x(this,p)?"/":""}${x(this,r)}${x(this,p)?"":super.text()}${x(this,g)?"/":""}>`}getPadding(){return x(this,r).length+(x(this,p)?2:1)}print(){return super.print({pre:`&lt;${x(this,p)?"/":""}${x(this,r)}`,post:`${x(this,g)?"/":""}&gt;`})}lint(t=0){const n=super.lint(t);let l;this.name==="h1"&&!x(this,p)&&(l=f(this,{start:t},"<h1>"),n.push(l)),this.closest("table-attrs")&&(l||(l=f(this,{start:t},"")),n.push({...l,message:"\u8868\u683C\u5C5E\u6027\u4E2D\u7684HTML\u6807\u7B7E"}));try{this.findMatchingTag()}catch({message:o}){l||(l=f(this,{start:t},""));const[h]=o.split("\uFF1A"),a={...l,message:h,severity:h==="\u672A\u95ED\u5408\u7684\u6807\u7B7E"?"warning":"error"};n.push(a)}return n}findMatchingTag(){const{html:t}=this.getAttribute("config"),{name:n,parentNode:l}=this,o=String(this);if(x(this,p)&&(x(this,g)||t[2].includes(n)))throw new SyntaxError(`\u540C\u65F6\u95ED\u5408\u548C\u81EA\u5C01\u95ED\u7684\u6807\u7B7E\uFF1A${o}`);if(t[2].includes(n)||x(this,g)&&t[1].includes(n))return this;if(x(this,g)&&t[0].includes(n))throw new SyntaxError(`\u65E0\u6548\u81EA\u5C01\u95ED\u6807\u7B7E\uFF1A${o}`);if(!l)return;const{childNodes:h}=l,a=h.indexOf(this),S=x(this,p)?h.slice(0,a).reverse().filter(({type:d,name:c})=>d==="html"&&c===n):h.slice(a+1).filter(({type:d,name:c})=>d==="html"&&c===n);let m=x(this,p)?-1:1;for(const d of S)if(d.closing?m--:m++,m===0)return d;throw new SyntaxError(`\u672A${x(this,p)?"\u5339\u914D\u7684\u95ED\u5408":"\u95ED\u5408\u7684"}\u6807\u7B7E\uFF1A${o}`)}}p=new WeakMap,g=new WeakMap,r=new WeakMap,T.exports=u},1874:(T,N,e)=>{var r,ot,s;"use strict";const{print:f,extUrlChar:$,extUrlCharFirst:y}=e(231),u=e(6010),p=e(8138),n=class extends p{constructor(h,a=u.getConfig(),S=[]){var o=(...t)=>{super(...t);P(this,"type","image-parameter");L(this,s,"")};var c;const m=Object.entries(a.img).map(([A,k])=>[A,k,new RegExp(`^(\\s*)${A.replace("$1","(.*)")}(\\s*)$`,"u")]),d=m.find(([,,A])=>A.test(h));if(d){const A=d[2].exec(h);if(A.length!==4||X(c=n,r,ot).call(c,d[1],A[2],a,!0)){A.length===3?(o(void 0,a,!0,S),G(this,s,h)):(o(A[2],a,!0,S,{}),G(this,s,`${A[1]}${d[0]}${A[3]}`)),this.setAttribute("name",d[1]);return}}o(h,a,!0,S),this.setAttribute("name","caption").setAttribute("stage",7)}isPlain(){return this.name==="caption"}toString(h){return x(this,s)?x(this,s).replace("$1",super.toString(h)):super.toString(h)}text(){return x(this,s)?x(this,s).replace("$1",super.text()).trim():super.text().trim()}getPadding(){return Math.max(0,x(this,s).indexOf("$1"))}print(){return x(this,s)?`<span class="wpb-image-parameter">${x(this,s).replace("$1",`<span class="wpb-image-caption">${f(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};let g=n;r=new WeakSet,ot=function(h,a,S=u.getConfig(),m=!1){switch(a=a.replace(/\0\d+t\x7F/gu,"").trim(),h){case"width":return/^\d*(?:x\d*)?$/u.test(a);case"link":return!a||new RegExp(`(?:(?:${S.protocol}|//)${y}|\0\\d+m\x7F)${$}(?=\0\\d+t\x7F|$)`,"iu").test(a)?!0:(a.startsWith("[[")&&a.endsWith("]]")&&(a=a.slice(2,-2)),u.normalizeTitle(a,0,!1,S,m,!0,!0).valid);case"lang":return S.variants.includes(a);case"alt":case"class":case"manualthumb":return!0;default:return!isNaN(a)}},s=new WeakMap,L(g,r),T.exports=g},2641:(T,N,e)=>{"use strict";const{generateForSelf:f,generateForChild:$}=e(8277),y=e(6010),u=e(8138),p=e(3423),g=e(1031),r=e(2571);class i extends u{constructor(n,l=y.getConfig(),o=[]){super(void 0,l,!0,o,{});P(this,"type","ext-inner");P(this,"name","imagemap");if(!n)return;const h=n.split(`
25
+ `),a=new Set(l.protocol.split("|")),S=p,m=A=>{super.insertAt(new S(A,l,o))};let d=!0,c=!1;for(const A of h){const k=A.trim();if(!(c||!k||k[0]==="#")){if(d){const[C,...w]=A.split("|"),F=this.normalizeTitle(C,0,!0);if(F.valid&&!F.interwiki&&F.ns===6){const E=new g(C,w.length>0?w.join("|"):void 0,F,l,o);E.type="imagemap-image",super.insertAt(E),d=!1;continue}else c=!0}else if(A.trim().split(/[\t ]/u)[0]==="desc"){super.insertAt(A);continue}else if(A.includes("[")){const C=A.indexOf("["),w=A.slice(C),F=/^\[{2}([^|]+)(?:\|([^\]]+))?\]{2}[\w\s]*$/u.exec(w);if(F){const E=this.normalizeTitle(F[1],0,!0);if(E.valid){super.insertAt(new r(A.slice(0,C),[...F.slice(1),E],w.slice(w.indexOf("]]")+2),l,o));continue}}else if(a.has(w.slice(1,w.indexOf(":")+1))||a.has(w.slice(1,w.indexOf("//")+2))){const E=/^\[([^\]\s]+)(?:(\s+)(\S[^\]]*)?)?\][\w\s]*$/u.exec(w);if(E){super.insertAt(new r(A.slice(0,C),E.slice(1),w.slice(w.indexOf("]")+1),l,o));continue}}}}m(A)}}get image(){return this.childNodes.find(({type:n})=>n==="imagemap-image")}toString(n){return super.toString(n,`
26
+ `)}text(){return super.text(`
27
+ `).replace(/\n{2,}/gu,`
24
28
  `)}getGaps(){return 1}print(){return super.print({sep:`
25
- `})}lint(o=0){const r=super.lint(o),l=this.getRootNode().posFromIndex(o);return this.image?r.push(...this.childNodes.filter(c=>{const x=String(c).trim();return c.type==="noinclude"&&x&&x[0]!=="#"}).map(c=>f(c,l,"\u65E0\u6548\u7684<imagemap>\u94FE\u63A5"))):r.push(g(this,l,"\u7F3A\u5C11\u56FE\u7247\u7684<imagemap>")),r}}m.exports=s},2571:(m,C,e)=>{"use strict";const g=e(8138),f=e(3905),a=e(741);class u extends g{constructor(h,t,s,n,i){const o=e(6986),r=e(7507),l=e(3423),c=t[2]instanceof o?f:a;super(void 0,n,!0,i);S(this,"type","imagemap-link");this.append(new r(h),new c(...t,n,i),new l(s,n,i))}}m.exports=u},8138:(m,C,e)=>{var p,h,t,s,n,i,o,ot,l,lt,x,dt,$,ht,N,at,b,ut,F,pt,O,ct,M,gt,G,ft,B,xt;"use strict";const g=e(6010),f=e(9205),a=e(7507),{MAX_STAGE:u}=g,Q=class extends f{constructor(y,P=g.getConfig(),E=!1,Z=[],_=null){super();w(this,o);w(this,l);w(this,x);w(this,$);w(this,N);w(this,b);w(this,F);w(this,O);w(this,M);w(this,G);w(this,B);S(this,"type","root");w(this,p,0);w(this,h,void 0);w(this,t,void 0);w(this,s,(y=T(this,p),P=!1)=>{if(y<T(this,p)||!this.isPlain()||this.childNodes.length===0)return this;switch(y){case 0:this.type==="root"&&T(this,t).shift(),D(this,o,ot).call(this,P);break;case 1:D(this,l,lt).call(this);break;case 2:D(this,x,dt).call(this);break;case 3:D(this,$,ht).call(this);break;case 4:D(this,N,at).call(this);break;case 5:D(this,b,ut).call(this);break;case 6:D(this,F,pt).call(this);break;case 7:D(this,O,ct).call(this);break;case 8:D(this,M,gt).call(this);break;case 9:D(this,G,ft).call(this);break;case 10:D(this,B,xt).call(this)}if(this.type==="root")for(const E of T(this,t))E.getAttribute("parseOnce")(y,P);return et(this,p)._++,this});w(this,n,y=>y.split(/[\0\x7F]/u).map((P,E)=>{if(E%2===0)return new a(P);if(isNaN(P.at(-1)))return T(this,t)[Number(P.slice(0,-1))];throw new Error(`\u89E3\u6790\u9519\u8BEF\uFF01\u672A\u6B63\u786E\u6807\u8BB0\u7684 Token\uFF1A${P}`)}));w(this,i,()=>{H(this,p,u);const{length:y,firstChild:P}=this,E=String(P);if(y===1&&P.type==="text"&&E.includes("\0")&&(this.replaceChildren(...T(this,n).call(this,E)),this.normalize(),this.type==="root"))for(const Z of T(this,t))Z.getAttribute("build")()});typeof y=="string"&&this.insertAt(E?y:y.replaceAll(/[\0\x7F]/gu,"")),H(this,h,P),H(this,t,Z),Z.push(this)}getAttribute(y){switch(y){case"config":return structuredClone(T(this,h));case"accum":return T(this,t);case"parseOnce":return T(this,s);case"buildFromStr":return T(this,n);case"build":return T(this,i);default:return super.getAttribute(y)}}setAttribute(y,P){switch(y){case"stage":return T(this,p)===0&&this.type==="root"&&T(this,t).shift(),H(this,p,P),this;default:return super.setAttribute(y,P)}}isPlain(){return this.constructor===Q}insertAt(y,P=this.childNodes.length){return typeof y=="string"&&(y=new a(y)),super.insertAt(y,P),y.type==="root"&&(y.type="plain"),y}normalizeTitle(y,P=0,E=!1){return g.normalizeTitle(y,P,!1,T(this,h),E)}afterBuild(){if(this.type==="root")for(const y of T(this,t))y.afterBuild();return this}parse(y=u,P=!1){for(;T(this,p)<y;)T(this,s).call(this,T(this,p),P);return y&&(T(this,i).call(this),this.afterBuild()),this}};let d=Q;p=new WeakMap,h=new WeakMap,t=new WeakMap,s=new WeakMap,n=new WeakMap,i=new WeakMap,o=new WeakSet,ot=function(y){const P=e(4907);this.setText(P(String(this),T(this,h),T(this,t),y))},l=new WeakSet,lt=function(){const y=e(8275),P=this.type==="root"?String(this):`\0${String(this)}`,E=y(P,T(this,h),T(this,t));this.setText(this.type==="root"?E:E.slice(1))},x=new WeakSet,dt=function(){const y=e(5130);this.setText(y(String(this),T(this,h),T(this,t)))},$=new WeakSet,ht=function(){const y=e(4624),P=e(2840);this.setText(y(this,T(this,h),T(this,t)));for(const E of T(this,t))if(E instanceof P&&E.type!=="td"){E.normalize();const{childNodes:[,Z]}=E;if(typeof Z=="string"&&Z.includes("\0")){E.removeAt(1);const _=new Q(Z,T(this,h),!0,T(this,t));E.insertAt(_,1),_.setAttribute("stage",4)}}},N=new WeakSet,at=function(){const y=e(2937);this.setText(y(this,T(this,h),T(this,t)))},b=new WeakSet,ut=function(){const y=e(1452);this.setText(y(String(this),T(this,h),T(this,t)))},F=new WeakSet,pt=function(){const y=e(3360),P=String(this).split(`
26
- `);for(let E=0;E<P.length;E++)P[E]=y(P[E],T(this,h),T(this,t));this.setText(P.join(`
27
- `))},O=new WeakSet,ct=function(){const y=e(7513);this.setText(y(String(this),T(this,h),T(this,t)))},M=new WeakSet,gt=function(){const y=e(4737);this.setText(y(String(this),T(this,h),T(this,t)))},G=new WeakSet,ft=function(){if(this.type==="image-parameter")return;const y=e(6622),P=String(this).split(`
28
- `);let E=this.type==="root"||this.type==="ext-inner"&&this.type==="poem"?0:1;for(;E<P.length;E++)P[E]=y(P[E],T(this,h),T(this,t));this.setText(P.join(`
29
- `))},B=new WeakSet,xt=function(){const y=e(3765);this.setText(y(String(this),T(this,h),T(this,t)))},m.exports=d},337:(m,C,e)=>{"use strict";const g=e(3905);class f extends g{constructor(){super(...arguments);S(this,"type","category")}}m.exports=f},7625:(m,C,e)=>{"use strict";const{explode:g}=e(231),{generateForChild:f}=e(8277),a=e(6010),u=e(3905),d=e(1874);class p extends u{constructor(s,n,i,o=a.getConfig(),r=[],l="|"){super(s,void 0,i,o,r,l);S(this,"type","file");this.append(...g("-{","}-","|",n).map(c=>new d(c,o,r)))}lint(s=0){const n=super.lint(s),i=this.getFrameArgs(),o=this.getHorizAlignArgs(),r=this.getVertAlignArgs(),l=this.getArgs("caption");if(i.length>1||o.length>1||r.length>1||l.size>1){const c=this.getRootNode().posFromIndex(s);i.length>1&&n.push(...i.map(x=>f(x,c,"\u91CD\u590D\u6216\u51B2\u7A81\u7684\u56FE\u7247\u6846\u67B6\u53C2\u6570"))),o.length>1&&n.push(...o.map(x=>f(x,c,"\u91CD\u590D\u6216\u51B2\u7A81\u7684\u56FE\u7247\u6C34\u5E73\u5BF9\u9F50\u53C2\u6570"))),r.length>1&&n.push(...r.map(x=>f(x,c,"\u91CD\u590D\u6216\u51B2\u7A81\u7684\u56FE\u7247\u5782\u76F4\u5BF9\u9F50\u53C2\u6570"))),l.size>1&&n.push(...[...l].map(x=>f(x,c,"\u91CD\u590D\u7684\u56FE\u7247\u8BF4\u660E")))}return n}getAllArgs(){return this.childNodes.slice(1)}getArgs(s,n=!0){const i=this.getAllArgs().filter(({name:o})=>s===o);return n?new Set(i):i}getFrameArgs(){return this.getAllArgs().filter(({name:n})=>["manualthumb","frameless","framed","thumbnail"].includes(n))}getHorizAlignArgs(){return this.getAllArgs().filter(({name:n})=>["left","right","center","none"].includes(n))}getVertAlignArgs(){return this.getAllArgs().filter(({name:n})=>["baseline","sub","super","top","text-top","middle","bottom","text-bottom"].includes(n))}}m.exports=p},1031:(m,C,e)=>{var d;"use strict";const{generateForSelf:g}=e(8277),f=e(6010),a=e(7625);class u extends a{constructor(t,s,n,i=f.getConfig(),o=[]){let r;if(s!==void 0){const l=e(8138);r=new l(s,i,!0,o),r.type="temp";for(let c=1;c<f.MAX_STAGE;c++)r.getAttribute("parseOnce")();o.splice(o.indexOf(r),1)}super(t,r==null?void 0:r.toString(),n,i,o);S(this,"type","gallery-image");w(this,d,!1);this.setAttribute("bracket",!1)}afterBuild(){const{interwiki:t,ns:s}=this.normalizeTitle(String(this.firstChild),this.type==="imagemap-image"?0:6,!0);return H(this,d,t||s!==6),this}getPadding(){return 0}lint(t=0){const s=super.lint(t);return T(this,d)&&s.push(g(this,this.getRootNode().posFromIndex(t),"\u65E0\u6548\u7684\u56FE\u5E93\u56FE\u7247")),s}}d=new WeakMap,m.exports=u},3905:(m,C,e)=>{var u,d;"use strict";const g=e(6010),f=e(8138);class a extends f{constructor(t,s,n,i=g.getConfig(),o=[],r="|"){super(void 0,i,!0,o,{AtomToken:0,Token:1});S(this,"type","link");w(this,u,!0);w(this,d,void 0);const l=e(9237);if(this.insertAt(new l(t,"link-target",i,o,{"Stage-2":":","!ExtToken":"","!HeadingToken":""})),s!==void 0){const c=new f(s,i,!0,o,{"Stage-5":":",ConverterToken:":"});c.type="link-text",this.insertAt(c.setAttribute("stage",g.MAX_STAGE-1))}H(this,d,r)}afterBuild(){var t;return(t=T(this,d))!=null&&t.includes("\0")&&H(this,d,this.getAttribute("buildFromStr")(T(this,d)).map(String).join("")),this}setAttribute(t,s){return t==="bracket"?(H(this,u,Boolean(s)),this):super.setAttribute(t,s)}toString(t){const s=super.toString(t,T(this,d));return T(this,u)?`[[${s}]]`:s}getPadding(){return 2}getGaps(){return T(this,d).length}print(){return super.print(T(this,u)?{pre:"[[",post:"]]",sep:T(this,d)}:{sep:T(this,d)})}}u=new WeakMap,d=new WeakMap,m.exports=a},8962:(m,C,e)=>{"use strict";const{generateForChild:g}=e(8277),f=e(6010),a=e(8138);class u extends a{constructor(h,t,s=f.getConfig(),n=[]){super(h,s,!0,n,{"Stage-1":":","!ExtToken":""});S(this,"type","free-ext-link");t&&(this.type="ext-link-url")}lint(h=0){const t=super.lint(h);let s;for(const n of this.childNodes){const i=String(n);if(n.type!=="text"||!/[,;。:!?()【】]/u.test(i))continue;s||(s=this.getRootNode().posFromIndex(h));const o=g(n,s,"URL\u4E2D\u7684\u5168\u89D2\u6807\u70B9","warning");t.push(...[...i.matchAll(/[,;。:!?()【】]/gu)].map(({index:r})=>{const l=i.slice(0,r).split(`
30
- `),{length:c}=l,{length:x}=l.at(-1),A=o.startLine+c-1,$=c>1?x:o.startCol+x;return{...o,startLine:A,endLine:A,startCol:$,endCol:$+1}}))}return t}}m.exports=u},9389:(m,C,e)=>{"use strict";const g=e(6010),f=e(8889);class a extends f{constructor(p,h=g.getConfig(),t=[]){super(p,/<(option|choicetemplate)(\s[^>]*)?>(.*?)<\/(\1)>/gsu,["option","choicetemplate"],h,t);S(this,"name","choose")}}m.exports=a},9269:(m,C,e)=>{"use strict";const g=e(6010),f=e(8889);class a extends f{constructor(p,h=g.getConfig(),t=[]){super(p,/<(combooption)(\s[^>]*)?>(.*?)<\/(combooption\s*)>/gisu,["combooption"],h,t);S(this,"name","combobox")}}m.exports=a},8889:(m,C,e)=>{"use strict";const{generateForChild:g}=e(8277),f=e(6010),a=e(8138);class u extends a{constructor(h,t,s,n=f.getConfig(),i=[]){var c;const o=e(7267),r=e(3423),l=(c=h==null?void 0:h.replaceAll(t,(x,A,$,k,N)=>{const v=`\0${i.length+1}e\x7F`;return new o(A,$,k,N,n,i),v}))==null?void 0:c.replaceAll(/(^|\0\d+e\x7F)(.*?)(?=$|\0\d+e\x7F)/gsu,(x,A,$)=>$===""?A:(new r($,n,i),`${A}\0${i.length}c\x7F`));super(l,n,!0,i,{NoincludeToken:":",ExtToken:":"});S(this,"type","ext-inner")}lint(h=0){let t;return[...super.lint(h),...this.childNodes.filter(s=>{if(s.type==="ext")return!1;const n=String(s).trim();return n&&!/^<!--.*-->$/u.test(n)}).map(s=>(t||(t=this.getRootNode().posFromIndex(h)),g(s,t,`<${this.name}>\u5185\u7684\u65E0\u6548\u5185\u5BB9`)))]}}m.exports=u},5937:(m,C,e)=>{"use strict";const g=e(6010),f=e(8889);class a extends f{constructor(p,h=g.getConfig(),t=[]){super(p,/<(ref)(\s[^>]*)?>(.*?)<\/(ref\s*)>/gisu,["ref"],h,t);S(this,"name","references")}}m.exports=a},7033:(m,C,e)=>{var g={"./":8889,"./choose":9389,"./choose.js":9389,"./combobox":9269,"./combobox.js":9269,"./index":8889,"./index.js":8889,"./references":5937,"./references.js":5937};function f(u){var d=a(u);return e(d)}function a(u){if(!e.o(g,u)){var d=new Error("Cannot find module '"+u+"'");throw d.code="MODULE_NOT_FOUND",d}return g[u]}f.keys=function(){return Object.keys(g)},f.resolve=a,m.exports=f,f.id=7033},5749:(m,C,e)=>{"use strict";const{generateForSelf:g}=e(8277),f=e(2308),a=e(6010),u=e(6935);class d extends f(u){constructor(t,s=!0,n=a.getConfig(),i=[]){super(t,n,i);S(this,"type","comment");S(this,"closed");this.closed=s}getPadding(){return 4}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}lint(t=0){return this.closed?[]:[g(this,this.getRootNode().posFromIndex(t),"\u672A\u95ED\u5408\u7684HTML\u6CE8\u91CA")]}toString(t){return`<!--${String(this.firstChild)}${this.closed?"-->":""}`}}m.exports=d},3434:(m,C,e)=>{"use strict";const g=e(6935);class f extends g{constructor(){super(...arguments);S(this,"type","dd")}}m.exports=f},7815:(m,C,e)=>{"use strict";const g=e(2308),f=e(6935);class a extends g(f){constructor(){super(...arguments);S(this,"type","double-underscore")}getPadding(){return 2}print(){return super.print({pre:"__",post:"__"})}toString(p){return`__${String(this.firstChild)}__`}}m.exports=a},2582:(m,C,e)=>{"use strict";const g=e(6010),f=e(6935);class a extends f{constructor(p,h=g.getConfig(),t=[]){super("-".repeat(p),h,t);S(this,"type","hr")}}m.exports=a},6935:(m,C,e)=>{"use strict";const{generateForSelf:g}=e(8277),f=e(6010),a=e(8138);class u extends a{constructor(h,t=f.getConfig(),s=[]){super(h,t,!0,s);S(this,"type","ext-inner")}lint(h=0){const{type:t,name:s}=this;return t==="ext-inner"&&(s==="templatestyles"||s==="section")&&String(this)?[g(this,this.getRootNode().posFromIndex(h),`<${s}>\u6807\u7B7E\u5185\u4E0D\u5E94\u6709\u4EFB\u4F55\u5185\u5BB9`)]:super.lint(h)}}m.exports=u},962:(m,C,e)=>{"use strict";const g=e(3434);class f extends g{constructor(){super(...arguments);S(this,"type","list")}}m.exports=f},3423:(m,C,e)=>{"use strict";const g=e(2308),f=e(6935);class a extends g(f){constructor(){super(...arguments);S(this,"type","noinclude")}}m.exports=a},6714:(m,C,e)=>{"use strict";const{generateForSelf:g}=e(8277),f=e(6010),a=e(7507),u=e(6935);class d extends u{constructor(t,s=f.getConfig(),n=[]){super("'".repeat(t),s,n);S(this,"type","quote")}lint(t=0){const{previousSibling:s,nextSibling:n}=this,i=`\u5B64\u7ACB\u7684"'"`,o=[];let r;if((s==null?void 0:s.type)==="text"&&s.data.at(-1)==="'"){r=g(this,this.getRootNode().posFromIndex(t),"");const{startLine:l,startCol:c}=r,[,{length:x}]=s.data.match(/(?:^|[^'])('+)$/u);o.push({message:i,startLine:l,startCol:c-x,endLine:l,endCol:c})}if((n==null?void 0:n.type)==="text"&&n.data[0]==="'"){r||(r=g(this,this.getRootNode().posFromIndex(t),""));const{endLine:l,endCol:c}=r,[{length:x}]=n.data.match(/^'+/u);o.push({message:i,startLine:l,startCol:c,endLine:l,endCol:c+x})}return o}}m.exports=d},851:(m,C,e)=>{"use strict";const g=e(6010),f=e(8138);class a extends f{constructor(p,h=g.getConfig(),t=[]){super(p,h,!0,t);S(this,"type","onlyinclude")}toString(p){return`<onlyinclude>${super.toString()}</onlyinclude>`}getPadding(){return 13}print(){return super.print({pre:"&lt;onlyinclude&gt;",post:"&lt;/onlyinclude&gt;"})}isPlain(){return!0}}m.exports=a},9380:(m,C,e)=>{"use strict";const{generateForChild:g}=e(8277),f=e(6010),a=e(8138),u=e(9237);class d extends a{constructor(t,s=f.getConfig(),n=[]){super(void 0,s,!0,n,{AtomToken:":"});S(this,"type","ext-inner");t&&this.append(...t.split(`
31
- `).map(i=>new u(i,"param-line",s,n,{AstText:":"})))}toString(t){return super.toString(t,`
29
+ `})}lint(n=0){const l=super.lint(n),o={start:n,...this.getRootNode().posFromIndex(n)};return this.image?l.push(...this.childNodes.filter(h=>{const a=String(h).trim();return h.type==="noinclude"&&a&&a[0]!=="#"}).map(h=>$(h,o,"\u65E0\u6548\u7684<imagemap>\u94FE\u63A5"))):l.push(f(this,o,"\u7F3A\u5C11\u56FE\u7247\u7684<imagemap>")),l}}T.exports=i},2571:(T,N,e)=>{"use strict";const f=e(6986),$=e(8138),y=e(3423),u=e(3905),p=e(741);class g extends ${constructor(s,t,n,l,o){const h=t[2]instanceof f?u:p;super(void 0,l,!0,o);P(this,"type","imagemap-link");this.append(s,new h(...t,l,o),new y(n,l,o))}}T.exports=g},8138:(T,N,e)=>{var r,i,s,t,n,l,o,h,lt,S,ht,d,at,A,dt,C,pt,F,ut,z,ct,b,gt,j,ft,M,xt,V,mt;"use strict";const{text:f}=e(231),$=e(6010),y=e(9205),u=e(7507),{MAX_STAGE:p}=$,Y=class extends y{constructor(I,R=$.getConfig(),O=!1,Z=[],_=void 0){super();L(this,h);L(this,S);L(this,d);L(this,A);L(this,C);L(this,F);L(this,z);L(this,b);L(this,j);L(this,M);L(this,V);P(this,"type","root");L(this,r,0);L(this,i,void 0);L(this,s,void 0);L(this,t,void 0);L(this,n,(I=x(this,r),R=!1)=>{if(I<x(this,r)||!this.isPlain()||this.length===0)return this;switch(I){case 0:this.type==="root"&&x(this,s).shift(),G(this,t,Boolean(R)),X(this,h,lt).call(this,R);break;case 1:X(this,S,ht).call(this);break;case 2:X(this,d,at).call(this);break;case 3:X(this,A,dt).call(this);break;case 4:X(this,C,pt).call(this);break;case 5:X(this,F,ut).call(this);break;case 6:X(this,z,ct).call(this);break;case 7:X(this,b,gt).call(this);break;case 8:X(this,j,ft).call(this);break;case 9:X(this,M,xt).call(this);break;case 10:X(this,V,mt).call(this)}if(this.type==="root")for(const O of x(this,s))O.getAttribute("parseOnce")(I,R);return nt(this,r)._++,this});L(this,l,(I,R)=>{const O=I.split(/[\0\x7F]/u).map((Z,_)=>{if(_%2===0)return new u(Z,x(this,i));if(isNaN(Z[Z.length-1]))return x(this,s)[Number(Z.slice(0,-1))];throw new Error(`\u89E3\u6790\u9519\u8BEF\uFF01\u672A\u6B63\u786E\u6807\u8BB0\u7684 Token\uFF1A${Z}`)});return R==="string"?O.map(String).join(""):R==="text"?f(O):O});L(this,o,()=>{G(this,r,p);const{length:I,firstChild:R}=this,O=String(R);if(I===1&&R.type==="text"&&O.includes("\0")&&(this.replaceChildren(...x(this,l).call(this,O)),this.normalize(),this.type==="root"))for(const Z of x(this,s))Z.getAttribute("build")()});typeof I=="string"&&this.insertAt(O?I:I.replace(/[\0\x7F]/gu,"")),G(this,i,R),G(this,s,Z),Z.push(this)}getAttribute(I){switch(I){case"config":return JSON.parse(JSON.stringify(x(this,i)));case"accum":return x(this,s);case"parseOnce":return x(this,n);case"buildFromStr":return x(this,l);case"build":return x(this,o);case"include":{if(x(this,t)!==void 0)return x(this,t);const R=this.getRootNode();return R.type==="root"&&R!==this?R.getAttribute("include"):!1}default:return super.getAttribute(I)}}setAttribute(I,R){switch(I){case"stage":return x(this,r)===0&&this.type==="root"&&x(this,s).shift(),G(this,r,R),this;default:return super.setAttribute(I,R)}}isPlain(){return this.constructor===Y}insertAt(I,R=this.length){return typeof I=="string"&&(I=new u(I,x(this,i))),super.insertAt(I,R),I.type==="root"&&(I.type="plain"),I}normalizeTitle(I,R=0,O=!1,Z=!1,_=!1){return $.normalizeTitle(I,R,x(this,t),x(this,i),O,Z,_)}afterBuild(){if(this.type==="root")for(const I of x(this,s))I.afterBuild()}parse(I=p,R=!1){for(;x(this,r)<I;)x(this,n).call(this,x(this,r),R);return I&&(x(this,o).call(this),this.afterBuild()),this}};let g=Y;r=new WeakMap,i=new WeakMap,s=new WeakMap,t=new WeakMap,n=new WeakMap,l=new WeakMap,o=new WeakMap,h=new WeakSet,lt=function(I){const R=e(4907);this.setText(R(String(this.firstChild),x(this,i),x(this,s),I))},S=new WeakSet,ht=function(){const I=e(8275),R=this.type==="root"?String(this.firstChild):`\0${String(this.firstChild)}`,O=I(R,x(this,i),x(this,s));this.setText(this.type==="root"?O:O.slice(1))},d=new WeakSet,at=function(){const I=e(5130);this.setText(I(String(this.firstChild),x(this,i),x(this,s)))},A=new WeakSet,dt=function(){const I=e(4624),R=e(2840);this.setText(I(this,x(this,i),x(this,s)));for(const O of x(this,s))if(O instanceof R&&O.type!=="td"){O.normalize();const{childNodes:[,Z]}=O;if(typeof Z=="string"&&Z.includes("\0")){O.removeAt(1);const _=new Y(Z,x(this,i),!0,x(this,s));O.insertAt(_,1),_.setAttribute("stage",4)}}},C=new WeakSet,pt=function(){const I=e(2937);this.setText(I(this,x(this,i),x(this,s)))},F=new WeakSet,ut=function(){const I=e(1452);this.setText(I(String(this.firstChild),x(this,i),x(this,s)))},z=new WeakSet,ct=function(){const I=e(3360),R=String(this.firstChild).split(`
30
+ `);for(let O=0;O<R.length;O++)R[O]=I(R[O],x(this,i),x(this,s));this.setText(R.join(`
31
+ `))},b=new WeakSet,gt=function(){const I=e(7513);this.setText(I(String(this.firstChild),x(this,i),x(this,s)))},j=new WeakSet,ft=function(){const I=e(4737);this.setText(I(String(this.firstChild),x(this,i),x(this,s)))},M=new WeakSet,xt=function(){if(this.type==="image-parameter")return;const I=e(6622),R=String(this.firstChild).split(`
32
+ `);let O=this.type==="root"||this.type==="ext-inner"&&this.type==="poem"?0:1;for(;O<R.length;O++)R[O]=I(R[O],x(this,i),x(this,s));this.setText(R.join(`
33
+ `))},V=new WeakSet,mt=function(){const I=e(3765);this.setText(I(String(this.firstChild),x(this,i),x(this,s)))},T.exports=g},337:(T,N,e)=>{"use strict";const f=e(3905);class $ extends f{constructor(){super(...arguments);P(this,"type","category")}}T.exports=$},7625:(T,N,e)=>{var t,et;"use strict";const{explode:f}=e(231),{generateForChild:$}=e(8277),y=e(6010),u=e(3905),p=e(1874),g=new Set(["manualthumb","frameless","framed","thumbnail"]),r=new Set(["left","right","center","none"]),i=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]);class s extends u{constructor(h,a,S,m=y.getConfig(),d=[],c="|"){super(h,void 0,S,m,d,c);L(this,t);P(this,"type","file");this.append(...f("-{","}-","|",a).map(A=>new p(A,m,d)))}lint(h=0){const a=super.lint(h),S=this.getAllArgs(),m=[...new Set(S.map(({name:C})=>C))],d=m.filter(C=>g.has(C)),c=m.filter(C=>r.has(C)),A=m.filter(C=>i.has(C));if(S.length===m.length&&d.length<2&&c.length<2&&A.length<2)return a;const k={start:h,...this.getRootNode().posFromIndex(h)};for(const C of m){let w=S.filter(({name:F})=>F===C);C==="caption"&&(w=[...w.slice(0,-1).filter(F=>F.text()),w[w.length-1]]),w.length>1&&a.push(...w.map(F=>$(F,k,`\u91CD\u590D\u7684\u56FE\u7247${C}\u53C2\u6570`)))}return d.size>1&&a.push(...S.filter(({name:C})=>g.has(C)).map(C=>$(C,k,"\u51B2\u7A81\u7684\u56FE\u7247\u6846\u67B6\u53C2\u6570"))),c.size>1&&a.push(...S.filter(({name:C})=>r.has(C)).map(C=>$(C,k,"\u51B2\u7A81\u7684\u56FE\u7247\u6C34\u5E73\u5BF9\u9F50\u53C2\u6570"))),A.size>1&&a.push(...S.filter(({name:C})=>i.has(C)).map(C=>$(C,k,"\u51B2\u7A81\u7684\u56FE\u7247\u5782\u76F4\u5BF9\u9F50\u53C2\u6570"))),a}getAllArgs(){return this.childNodes.slice(1)}getArgs(h){return this.getAllArgs().filter(({name:a})=>h===a)}getFrameArgs(){return X(this,t,et).call(this,g,"\u6846\u67B6")}getHorizAlignArgs(){return X(this,t,et).call(this,r,"\u6C34\u5E73\u5BF9\u9F50")}getVertAlignArgs(){return X(this,t,et).call(this,i,"\u5782\u76F4\u5BF9\u9F50")}}t=new WeakSet,et=function(h,a){return this.getAllArgs().filter(({name:m})=>h.has(m))},T.exports=s},1031:(T,N,e)=>{var g;"use strict";const{generateForSelf:f}=e(8277),$=e(6010),y=e(8138),u=e(7625);class p extends u{constructor(s,t,n,l=$.getConfig(),o=[]){let h;if(t!==void 0){h=new y(t,l,!0,o),h.type="temp";for(let a=1;a<$.MAX_STAGE;a++)h.getAttribute("parseOnce")();o.splice(o.indexOf(h),1)}super(s,h==null?void 0:h.toString(),n,l,o);P(this,"type","gallery-image");L(this,g,!1);this.setAttribute("bracket",!1)}afterBuild(){const s=this.type==="imagemap-image",t=this.normalizeTitle(String(this.firstChild),s?0:6,!0,!s);G(this,g,t.interwiki||t.ns!==6)}getPadding(){return 0}lint(s=0){const t=super.lint(s);return x(this,g)&&t.push(f(this,{start:s},"\u65E0\u6548\u7684\u56FE\u5E93\u56FE\u7247")),t}}g=new WeakMap,T.exports=p},3905:(T,N,e)=>{var r,i,s,t;"use strict";const{generateForChild:f}=e(8277),$=e(6010),y=e(7507),u=e(8138),p=e(9237);class g extends u{constructor(o,h,a,S=$.getConfig(),m=[],d="|"){super(void 0,S,!0,m,{});P(this,"type","link");L(this,r,!0);L(this,i,void 0);L(this,s,"");L(this,t,!1);if(this.insertAt(new p(o,"link-target",S,m,{})),h!==void 0){const c=new u(h,S,!0,m,{});c.type="link-text",this.insertAt(c.setAttribute("stage",$.MAX_STAGE-1))}G(this,i,d)}afterBuild(){var h;const o=this.normalizeTitle(this.firstChild.text(),0,!1,!0,!0);G(this,s,o.fragment),G(this,t,o.encoded),(h=x(this,i))!=null&&h.includes("\0")&&G(this,i,this.getAttribute("buildFromStr")(x(this,i),"string"))}setAttribute(o,h){return o==="bracket"?(G(this,r,Boolean(h)),this):super.setAttribute(o,h)}toString(o){const h=super.toString(o,x(this,i));return x(this,r)?`[[${h}]]`:h}text(){const o=super.text("|");return x(this,r)?`[[${o}]]`:o}getPadding(){return 2}getGaps(){return x(this,i).length}print(){return super.print(x(this,r)?{pre:"[[",post:"]]",sep:x(this,i)}:{sep:x(this,i)})}lint(o=0){var c;const h=super.lint(o),{childNodes:[a,S],type:m}=this;let d;return x(this,t)&&(d={start:o,...this.getRootNode().posFromIndex(o)},h.push(f(a,d,"\u5185\u94FE\u4E2D\u4E0D\u5FC5\u8981\u7684URL\u7F16\u7801"))),m==="link"&&((c=S==null?void 0:S.childNodes)==null?void 0:c.some(({type:A,data:k})=>A==="text"&&k.includes("|")))?(d||(d={start:o,...this.getRootNode().posFromIndex(o)}),h.push(f(S,d,'\u94FE\u63A5\u6587\u672C\u4E2D\u591A\u4F59\u7684"|"',"warning"))):m!=="link"&&x(this,s)&&(d||(d={start:o,...this.getRootNode().posFromIndex(o)}),h.push(f(a,d,"\u591A\u4F59\u7684fragment"))),h}}r=new WeakMap,i=new WeakMap,s=new WeakMap,t=new WeakMap,T.exports=g},8962:(T,N,e)=>{"use strict";const{generateForChild:f}=e(8277),$=e(6010),y=e(8138);class u extends y{constructor(r,i,s=$.getConfig(),t=[]){super(r,s,!0,t,{});P(this,"type","free-ext-link");i&&(this.type="ext-link-url")}lint(r=0){const i=super.lint(r),s=`[\uFF0C\uFF1B\u3002\uFF1A\uFF01\uFF1F\uFF08\uFF09]+${this.type==="ext-link-url"?"|\\|+":""}`;let t;for(const n of this.childNodes){const l=String(n);if(n.type!=="text"||!new RegExp(s,"u").test(l))continue;t||(t={start:r,...this.getRootNode().posFromIndex(r)});const o=f(n,t,"","warning"),h=new RegExp(s,"gu");for(let a=h.exec(l);a;a=h.exec(l)){const{index:S,0:{0:m,length:d}}=a,c=l.slice(0,S).split(`
34
+ `),{length:A}=c,{length:k}=c[A-1],C=r+S,w=o.startLine+A-1,F=(A>1?0:o.startCol)+k;i.push({...o,message:`URL\u4E2D\u7684${m==="|"?'"|"':"\u5168\u89D2\u6807\u70B9"}`,startIndex:C,endIndex:C+d,startLine:w,endLine:w,startCol:F,endCol:F+d})}}return i}}T.exports=u},9389:(T,N,e)=>{"use strict";const f=e(6010),$=e(8889);class y extends ${constructor(g,r=f.getConfig(),i=[]){super(g,/<(option|choicetemplate)(\s[^>]*)?>(.*?)<\/(\1)>/gsu,["option","choicetemplate"],r,i);P(this,"name","choose")}}T.exports=y},9269:(T,N,e)=>{"use strict";const f=e(6010),$=e(8889);class y extends ${constructor(g,r=f.getConfig(),i=[]){super(g,/<(combooption)(\s[^>]*)?>(.*?)<\/(combooption\s*)>/gisu,["combooption"],r,i);P(this,"name","combobox")}}T.exports=y},8889:(T,N,e)=>{"use strict";const{generateForChild:f}=e(8277),$=e(6010),y=e(8138),u=e(7267),p=e(3423),g=e(5749);class r extends y{constructor(t,n,l,o=$.getConfig(),h=[]){var S;const a=(S=t==null?void 0:t.replace(n,(m,d,c,A,k)=>{const C=`\0${h.length+1}${d?"e":"c"}\x7F`;if(d)new u(d,c,A,k,o,h);else{const w=m.endsWith("-->");new g(m.slice(4,w?-3:void 0),w,o,h)}return C}))==null?void 0:S.replace(/(^|\0\d+[ce]\x7F)(.*?)(?=$|\0\d+[ce]\x7F)/gsu,(m,d,c)=>c===""?d:(new p(c,o,h),`${d}\0${h.length}c\x7F`));super(a,o,!0,h,{});P(this,"type","ext-inner")}lint(t=0){let n;return[...super.lint(t),...this.childNodes.filter(l=>{if(l.type==="ext"||l.type==="comment")return!1;const o=String(l).trim();return o&&!/^<!--.*-->$/u.test(o)}).map(l=>(n||(n={start:t,...this.getRootNode().posFromIndex(t)}),f(l,n,`<${this.name}>\u5185\u7684\u65E0\u6548\u5185\u5BB9`)))]}}T.exports=r},5937:(T,N,e)=>{"use strict";const f=e(6010),$=e(8889);class y extends ${constructor(g,r=f.getConfig(),i=[]){super(g,/<!--.*?(?:-->|$)|<(ref)(\s[^>]*)?>(.*?)<\/(ref\s*)>/gisu,["ref"],r,i);P(this,"name","references")}}T.exports=y},7033:(T,N,e)=>{var f={"./":8889,"./choose":9389,"./choose.js":9389,"./combobox":9269,"./combobox.js":9269,"./index":8889,"./index.js":8889,"./references":5937,"./references.js":5937};function $(u){var p=y(u);return e(p)}function y(u){if(!e.o(f,u)){var p=new Error("Cannot find module '"+u+"'");throw p.code="MODULE_NOT_FOUND",p}return f[u]}$.keys=function(){return Object.keys(f)},$.resolve=y,T.exports=$,$.id=7033},5749:(T,N,e)=>{"use strict";const f=e(2308),{generateForSelf:$}=e(8277),y=e(6010),u=e(6935);class p extends f(u){constructor(i,s=!0,t=y.getConfig(),n=[]){super(i,t,n);P(this,"type","comment");P(this,"closed");this.closed=s}getPadding(){return 4}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}lint(i=0){return this.closed?[]:[$(this,{start:i},"\u672A\u95ED\u5408\u7684HTML\u6CE8\u91CA")]}toString(i){return`<!--${String(this.firstChild)}${this.closed?"-->":""}`}}T.exports=p},3434:(T,N,e)=>{"use strict";const f=e(6935);class $ extends f{constructor(){super(...arguments);P(this,"type","dd")}}T.exports=$},7815:(T,N,e)=>{"use strict";const f=e(2308),$=e(6935);class y extends f($){constructor(){super(...arguments);P(this,"type","double-underscore")}getPadding(){return 2}print(){return super.print({pre:"__",post:"__"})}toString(g){return`__${String(this.firstChild)}__`}}T.exports=y},2582:(T,N,e)=>{"use strict";const f=e(6010),$=e(6935);class y extends ${constructor(g,r=f.getConfig(),i=[]){super("-".repeat(g),r,i);P(this,"type","hr")}}T.exports=y},6935:(T,N,e)=>{"use strict";const{generateForSelf:f}=e(8277),$=e(6010),y=e(8138);class u extends y{constructor(r,i=$.getConfig(),s=[]){super(r,i,!0,s);P(this,"type","ext-inner")}lint(r=0){const{type:i,name:s}=this;return i==="ext-inner"&&(s==="templatestyles"||s==="section")&&String(this)?[f(this,{start:r},`<${s}>\u6807\u7B7E\u5185\u4E0D\u5E94\u6709\u4EFB\u4F55\u5185\u5BB9`)]:super.lint(r)}}T.exports=u},962:(T,N,e)=>{"use strict";const f=e(3434);class $ extends f{constructor(){super(...arguments);P(this,"type","list")}}T.exports=$},3423:(T,N,e)=>{"use strict";const f=e(2308),$=e(6935);class y extends f($){constructor(){super(...arguments);P(this,"type","noinclude")}}T.exports=y},6714:(T,N,e)=>{"use strict";const{generateForSelf:f}=e(8277),$=e(6010),y=e(7507),u=e(6935);class p extends u{constructor(i,s=$.getConfig(),t=[]){super("'".repeat(i),s,t);P(this,"type","quote")}lint(i=0){const{previousSibling:s,nextSibling:t}=this,n=`\u5B64\u7ACB\u7684"'"`,l=[];let o;if((s==null?void 0:s.type)==="text"&&s.data.endsWith("'")){o=f(this,{start:i},n);const{startIndex:h,startLine:a,startCol:S}=o,[,{length:m}]=s.data.match(/(?:^|[^'])('+)$/u),d=i-m;l.push({...o,startIndex:d,endIndex:h,startCol:S-m,endLine:a,endCol:S})}if((t==null?void 0:t.type)==="text"&&t.data[0]==="'"){o||(o=f(this,{start:i},n));const{endIndex:h,endLine:a,endCol:S}=o,[{length:m}]=t.data.match(/^'+/u),d=h+m;l.push({...o,startIndex:h,endIndex:d,startLine:a,startCol:S,endCol:S+m})}return l}}T.exports=p},851:(T,N,e)=>{"use strict";const f=e(6010),$=e(8138);class y extends ${constructor(g,r=f.getConfig(),i=[]){super(g,r,!0,i);P(this,"type","onlyinclude")}toString(g){return`<onlyinclude>${super.toString()}</onlyinclude>`}getPadding(){return 13}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}isPlain(){return!0}}T.exports=y},9380:(T,N,e)=>{"use strict";const{generateForChild:f}=e(8277),$=e(6010),y=e(8138),u=e(9237);class p extends y{constructor(i,s=$.getConfig(),t=[]){super(void 0,s,!0,t,{});P(this,"type","ext-inner");if(i){const n=u;this.append(...i.split(`
35
+ `).map(l=>new n(l,"param-line",s,t,{})))}}toString(i){return super.toString(i,`
36
+ `)}text(){return super.text(`
32
37
  `)}getGaps(){return 1}print(){return super.print({sep:`
33
- `})}lint(t=0){let s;return this.childNodes.filter(n=>{const{childNodes:i}=n,o=i.findIndex(({type:l})=>l!=="text"),r=(o>=0?i.slice(0,o).map(String).join(""):String(n)).trim();return r&&!(o>=0?/^[a-z]+\s*(?:=|$)/iu:/^[a-z]+\s*=/iu).test(r)}).map(n=>(s||(s=this.getRootNode().posFromIndex(t)),g(n,s,`${this.name}\u7684\u65E0\u6548\u53C2\u6570`)))}}m.exports=d},9799:(m,C,e)=>{"use strict";const g=e(6010),f=e(8138);class a extends f{constructor(p,h,t=g.getConfig(),s=[]){super(void 0,t,!0,s);S(this,"type","parameter");const n=e(9237),i=new n(typeof p=="number"?void 0:p,"parameter-key",t,s,{"Stage-2":":","!HeadingToken":""}),o=new f(h,t,!0,s);o.type="parameter-value",this.append(i,o.setAttribute("stage",2))}get anon(){return this.firstChild.childNodes.length===0}afterBuild(){if(!this.anon){const p=e(1782),h=String(this.firstChild).trim(),{parentNode:t}=this;this.setAttribute("name",h),t&&t instanceof p&&t.getArgs(h,!1,!1).add(this)}return this}toString(p){return this.anon?this.lastChild.toString(p):super.toString(p,"=")}getGaps(){return this.anon?0:1}print(){return super.print({sep:this.anon?"":"="})}}m.exports=a},8058:(m,C,e)=>{"use strict";const g=e(6010),f=e(8138);class a extends f{constructor(d,p,h="plain",t=g.getConfig(),s=[],n=null){super(d,t,!0,s,n),this.type=h}}m.exports=a},2840:(m,C,e)=>{"use strict";const{generateForChild:g}=e(8277),f=e(3125),a=e(8058);class u extends f{constructor(){super(...arguments);S(this,"type","table")}get closed(){return this.lastChild.type==="table-syntax"}lint(h=0){const t=super.lint(h);return this.closed||t.push(g(this.firstChild,this.getRootNode().posFromIndex(h),"\u672A\u95ED\u5408\u7684\u8868\u683C")),t}close(h=`
34
- |}`,t=!1){const s=this.getAttribute("config"),n=this.getAttribute("accum");super.insertAt(new a(h,null,"table-syntax",s,n))}}m.exports=u},5567:(m,C,e)=>{var d;"use strict";const g=e(6010),f=e(8138),a=e(3125);class u extends a{constructor(t,s,n=g.getConfig(),i=[]){let o=s==null?void 0:s.match(/\||\0\d+!\x7F/u),r=o?s.slice(0,o.index):"";/\[\[|-\{/u.test(r)&&(o=null,r="");super(t,r,n,i);S(this,"type","td");w(this,d,"");o&&([et(this,d)._]=o);const l=new f(s==null?void 0:s.slice((o==null?void 0:o.index)+T(this,d).length),n,!0,i);l.type="td-inner",this.insertAt(l.setAttribute("stage",4))}afterBuild(){return T(this,d).includes("\0")&&H(this,d,this.getAttribute("buildFromStr")(T(this,d)).map(String).join("")),this}toString(t){const{childNodes:[s,n,i]}=this;return`${s.toString()}${n.toString()}${T(this,d)}${i.toString()}`}getGaps(t=0){return t=t<0?t+this.childNodes.length:t,t===1?T(this,d).length:0}print(){const{childNodes:[t,s,n]}=this;return`<span class="wpb-td">${t.print()}${s.print()}${T(this,d)}${n.print()}</span>`}}d=new WeakMap,m.exports=u},3125:(m,C,e)=>{"use strict";const{generateForChild:g}=e(8277),f=e(6010),a=e(8138),u=e(8058);class d extends a{constructor(t,s="",n=f.getConfig(),i=[],o=null){super(void 0,n,!0,i,{Token:2,SyntaxToken:0,AttributeToken:1,TdToken:"2:"});S(this,"type","tr");const r=e(5037);this.append(new u(t,o,"table-syntax",n,i,{"Stage-1":":","!ExtToken":"",TranscludeToken:":"}),new r(s,"table-attr","tr",n,i))}lint(t=0){const s=super.lint(t),n=this.childNodes.find(({type:o})=>o==="table-inter"),i=String(n).trim();if(n&&i&&!/^<!--.*-->$/su.test(i)){const o=g(n,this.getRootNode().posFromIndex(t),"\u5C06\u88AB\u79FB\u51FA\u8868\u683C\u7684\u5185\u5BB9");o.startLine++,o.startCol=0,s.push(o)}return s}}m.exports=d},7267:(m,C,e)=>{"use strict";const g=e(6010),f=e(1074);class a extends f{constructor(p,h="",t="",s=void 0,n=g.getConfig(),i=[]){h=!h||h.trimStart()!==h?h:` ${h}`;const o=e(8138),r=e(5037),l=p.toLowerCase(),c=new r(h,"ext-attr",l,n,i),x=structuredClone(n),A=new Set(x.ext);let $;switch(A.delete(l),x.ext=[...A],l){case"tab":A.delete("tabs"),x.ext=[...A];case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":case"inputbox":$=new o(t,x,!0,i);break;case"gallery":{const k=e(1891);$=new k(t,x,i);break}case"pre":{const k=e(428);$=new k(t,x,i);break}case"charinsert":{const k=e(8103);$=new k(t,x,i);break}case"references":case"choose":case"combobox":{const k=e(8889),N=e(7033)(`./${l}`);$=new N(t,x,i);break}case"imagemap":{const k=e(2641);$=new k(t,n,i);break}case"dynamicpagelist":{const k=e(9380);$=new k(t,x,i);break}default:{const k=e(6935);$=new k(t,n)}}$.setAttribute("name",l).type="ext-inner";super(p,c,$,s,n,i);S(this,"type","ext");S(this,"closed",!0)}}m.exports=a},8655:(m,C,e)=>{"use strict";const{generateForSelf:g}=e(8277),f=e(2308),a=e(6010),u=e(1074);class d extends f(u){constructor(t,s="",n=void 0,i=void 0,o=a.getConfig(),r=[]){super(t,s,n!=null?n:"",n===void 0||i!=null?i:"",o,r);S(this,"type","include")}lint(t=0){return this.closed?[]:[g(this,this.getRootNode().posFromIndex(t),"\u672A\u95ED\u5408\u7684\u6807\u7B7E")]}}m.exports=d},1074:(m,C,e)=>{var u,d,p;"use strict";const g=e(6010),f=e(8138);class a extends f{constructor(s,n,i,o,r=g.getConfig(),l=[]){super(void 0,r,!0);w(this,u,void 0);w(this,d,void 0);w(this,p,void 0);H(this,p,[s,o||s]),H(this,u,o===void 0),H(this,d,o!==""),this.append(n,i);let c=l.indexOf(n);c===-1&&(c=l.indexOf(i)),c===-1&&(c=1/0),l.splice(c,0,this)}get closed(){return T(this,d)}toString(s){const{firstChild:n,lastChild:i}=this,[o,r]=T(this,p);return T(this,u)?`<${o}${String(n)}/>`:`<${o}${String(n)}>${String(i)}${T(this,d)?`</${r}>`:""}`}getPadding(){return T(this,p)[0].length+1}getGaps(){return 1}print(){const[s,n]=T(this,p);return super.print(T(this,u)?{pre:`&lt;${s}`,post:"/&gt;"}:{pre:`&lt;${s}`,sep:"&gt;",post:T(this,d)?`&lt;/${n}&gt;`:""})}}u=new WeakMap,d=new WeakMap,p=new WeakMap,m.exports=a},1782:(m,C,e)=>{var t,s,mt;"use strict";const{removeComment:g,print:f}=e(231),{generateForChild:a}=e(8277),u=e(6010),d=e(8138),p=e(9799);class h extends d{constructor(r,l,c=u.getConfig(),x=[]){super(void 0,c,!0,x,{AtomToken:0,SyntaxToken:0,ParameterToken:"1:"});w(this,s);S(this,"type","template");S(this,"modifier","");w(this,t,{});const A=e(9237),$=e(8058),{parserFunction:[k,N,v]}=c;if(r.includes(":")){const[F,...z]=r.split(":");this.setModifier(F)&&(r=z.join(":"))}if(r.includes(":")||l.length===0&&!v.includes(this.modifier.toLowerCase())){const[F,...z]=r.split(":"),O=g(F),U=N.includes(O);if(U||k.includes(O.toLowerCase())){this.setAttribute("name",O.toLowerCase().replace(/^#/u,"")).type="magic-word";const M=new RegExp(`^\\s*${O}\\s*$`,U?"u":"iu"),X=new $(F,M,"magic-word-name",c,x,{"Stage-1":":","!ExtToken":""});if(this.insertAt(X),z.length>0&&l.unshift([z.join(":")]),this.name==="invoke")for(let G=0;G<2;G++){const W=l.shift();if(!W)break;const B=new A(W.join("="),`invoke-${G?"function":"module"}`,c,x,{"Stage-1":":","!ExtToken":""});this.insertAt(B)}}}if(this.type==="template"){const[F]=g(r).split("#");if(/\0\d+[eh!+-]\x7F|[<>[\]{}]/u.test(F))throw x.pop(),new SyntaxError(`\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A${F}`);const z=new A(r,"template-name",c,x,{"Stage-2":":","!HeadingToken":""});this.insertAt(z)}const b=this.isTemplate();let I=1;for(const F of l)b||(F[0]=F.join("="),F.length=1),F.length===1&&(F.unshift(I),I++),this.insertAt(new p(...F,c,x))}setModifier(r=""){const{parserFunction:[,,l,c]}=this.getAttribute("config"),x=r.trim().toLowerCase(),A=l.includes(x),$=c.includes(x);return A||$||r===""?(this.setAttribute("modifier",r),Boolean(r)):!1}toString(r){const{childNodes:l,firstChild:c,modifier:x}=this;return`{{${x}${x&&":"}${this.type==="magic-word"?`${String(c)}${l.length>1?":":""}${l.slice(1).map(String).join("|")}`:super.toString(r,"|")}}}`}getPadding(){return this.modifier?this.modifier.length+3:2}getGaps(){return 1}print(){const{childNodes:r,firstChild:l,modifier:c}=this;return`<span class="wpb-${this.type}">{{${c}${c&&":"}${this.type==="magic-word"?`${l.print()}${r.length>1?":":""}${f(r.slice(1),{sep:"|"})}`:f(r,{sep:"|"})}}}</span>`}lint(r=0){const l=super.lint(r);if(!this.isTemplate())return l;const c=this.getDuplicatedArgs();if(c.length>0){const x=this.getRootNode().posFromIndex(r);l.push(...c.flatMap(([,A])=>[...A]).map(A=>a(A,x,"\u91CD\u590D\u53C2\u6570")))}return l}isTemplate(){return this.type==="template"||this.type==="magic-word"&&this.name==="invoke"}insertAt(r,l=this.childNodes.length){return super.insertAt(r,l),r.anon?D(this,s,mt).call(this,r):r.name&&this.getArgs(r.name,!1,!1).add(r),r}getAllArgs(){return this.childNodes.filter(r=>r instanceof p)}getAnonArgs(){return this.getAllArgs().filter(({anon:r})=>r)}getArgs(r,l,c=!0){const x=String(r).trim();let A;return Object.prototype.hasOwnProperty.call(T(this,t),x)?A=T(this,t)[x]:(A=new Set(this.getAllArgs().filter(({name:$})=>x===$)),T(this,t)[x]=A),A}getDuplicatedArgs(){return this.isTemplate()?Object.entries(T(this,t)).filter(([,{size:r}])=>r>1).map(([r,l])=>[r,new Set(l)]):[]}}t=new WeakMap,s=new WeakSet,mt=function(r){const l=this.getAnonArgs(),c=l.indexOf(r);for(let x=c;x<l.length;x++){const A=l[x],{name:$}=A,k=String(x+1);$!==k&&this.getArgs(k,!1,!1).add(A.setAttribute("name",k))}},m.exports=h},8277:(m,C,e)=>{"use strict";const g=e(8138),f=(u,d,p,h="error")=>{const{style:{top:t,left:s,height:n,width:i}}=u,{top:o,left:r}=d,l=o+t,c=l+n-1,x=t?s:r+s,A=n>1?i:x+i;return{message:p,severity:h,startLine:l,endLine:c,startCol:x,endCol:A}},a=(u,d,p,h="error")=>({message:p,severity:h,startLine:d.top,endLine:d.top+u.offsetHeight-1,startCol:d.left,endCol:u.offsetHeight>1?u.offsetWidth:d.left+u.offsetWidth});m.exports={generateForChild:f,generateForSelf:a}},231:(m,C,e)=>{"use strict";const g='(?:\\[[\\da-f:.]+\\]|[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD])(?:[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD]|\\0\\d+c\\x7F)*',f=p=>p.replaceAll(/\0\d+c\x7F/gu,""),a=(p,h={})=>{const t=e(7507),s=e(9205),{pre:n="",post:i="",sep:o=""}=h,r={"&":"amp","<":"lt",">":"gt"};return`${n}${p.map(l=>l instanceof s?l.print():String(l).replaceAll(/[&<>]/gu,c=>`&${r[c]};`)).join(o)}${i}`},u=p=>p.replaceAll(/[\\{}()|.?*+^$[\]]/gu,"\\$&"),d=(p,h,t,s)=>{if(s===void 0)return[];const n=new RegExp(`${[p,h,t].map(u).join("|")}`,"gu"),i=[];let o=n.exec(s),r=0,l=0;for(;o;){const{0:c,index:x}=o;c!==t?r+=c===p?1:-1:r===0&&(i.push(s.slice(l,x)),{lastIndex:l}=n),o=n.exec(s)}return i.push(s.slice(l)),i};m.exports={extUrlChar:g,removeComment:f,print:a,escapeRegExp:u,explode:d}},8166:m=>{"use strict";m.exports=JSON.parse('{"ext":["nowiki","pre","gallery","indicator"],"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":{"0":"","6":"File","14":"Category"},"nsid":{"":0,"file":6,"image":6,"\u56FE\u50CF":6,"\u5716\u50CF":6,"\u6587\u4EF6":6,"\u6863\u6848":6,"\u6A94\u6848":6,"category":14,"\u5206\u7C7B":14,"\u5206\u985E":14},"parserFunction":[["\u540D\u79F0\u7A7A\u95F4","ns","\u540D\u79F0\u7A7A\u95F4e","nse","url\u7F16\u7801","urlencode","\u5C0F\u5199\u9996\u5B57","lcfirst","\u5927\u5199\u9996\u5B57","ucfirst","\u5C0F\u5199","lc","\u5927\u5199","uc","\u672C\u5730url","localurl","\u672C\u5730urle","localurle","\u5B8C\u6574url","fullurl","\u5B8C\u6574url\u7B49\u540C","fullurle","\u89C4\u8303url","canonicalurl","\u89C4\u8303url\u7B49\u540C","canonicalurle","\u683C\u5F0F\u5316\u6570\u5B57","formatnum","\u8BED\u6CD5","grammar","\u6027\u522B","gender","\u590D\u6570","plural","bidi","#\u8BED\u8A00","#language","\u5DE6\u586B\u5145","padleft","\u53F3\u586B\u5145","padright","\u951A\u7F16\u7801","anchorencode","\u6587\u4EF6\u8DEF\u5F84","filepath","\u9875\u9762id","pageid","\u754C\u9762","int","#\u7279\u6B8A","#special","#\u7279\u6B8A\u7B49\u540C","#speciale","#\u6807\u8BB0","#tag","#\u683C\u5F0F\u5316\u65E5\u671F","#\u65E5\u671F\u683C\u5F0F\u5316","#formatdate","#dateformat","#invoke","#while","#dowhile","#loop","#forargs","#fornumargs","#\u975E\u7A7A\u5F0F","#\u82E5","#\u5982\u679C","#if","#\u76F8\u540C\u5F0F","#\u5339\u914D\u5F0F","#\u82E5\u76F8\u7B49","#\u5982\u679C\u76F8\u7B49","#ifeq","#\u591A\u9009\u5F0F","#\u591A\u6761\u4EF6\u5F0F","#\u53CC\u5C04\u5F0F","#\u5F00\u5173","#\u8F6C\u6362","#switch","#\u5B58\u5728\u5F0F","#\u82E5\u6709","#\u5982\u6709","#ifexist","#\u82E5\u8868\u8FBE\u5F0F","#ifexpr","#\u9519\u8BEF\u5F0F","#\u5982\u679C\u9519\u8BEF","#iferror","#\u65F6\u95F4","#time","#\u65F6\u95F4l","#timel","#\u8BA1\u7B97\u5F0F","#\u8868\u8FBE\u5F0F","#expr","#rel2abs","#\u6807\u9898\u7EC4\u6210\u90E8\u5206","#titleparts","#categorytree","#url\u89E3\u7801","#urldecode","#choose","#\u8C03\u7528","#var","#varexists","#var_final","#vardefine","#vardefineecho","#\u5C0F\u5DE5\u5177","#widget","\u6761\u76EE\u8DEF\u5F84","articlepath","\u670D\u52A1\u5668","server","\u670D\u52A1\u5668\u540D","servername","\u811A\u672C\u8DEF\u5F84","scriptpath","\u6837\u5F0F\u8DEF\u5F84","stylepath","msgnw","#related","#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":{"thumbnail":"thumbnail","thumb":"thumbnail","\u7F29\u7565\u56FE":"thumbnail","thumbnail=$1":"manualthumb","thumb=$1":"manualthumb","\u7F29\u7565\u56FE=$1":"manualthumb","left":"left","\u5DE6":"left","right":"right","\u53F3":"right","none":"none","\u65E0":"none","$1px":"width","$1\u50CF\u7D20":"width","center":"center","centre":"center","\u5C45\u4E2D":"center","framed":"framed","enframed":"framed","frame":"framed","\u6709\u6846":"framed","frameless":"frameless","\u65E0\u6846":"frameless","upright":"upright","\u53F3\u4E0A":"upright","upright=$1":"manual-upright","upright $1":"manual-upright","\u53F3\u4E0A=$1":"manual-upright","\u53F3\u4E0A$1":"manual-upright","border":"border","\u8FB9\u6846":"border","alt=$1":"alt","\u66FF\u4EE3=$1":"alt","\u66FF\u4EE3\u6587\u672C=$1":"alt","class=$1":"class","\u7C7B=$1":"class","link=$1":"link","\u94FE\u63A5=$1":"link","baseline":"baseline","\u57FA\u7EBF":"baseline","sub":"sub","\u5B50":"sub","super":"super","sup":"super","\u8D85":"super","top":"top","\u9876\u90E8":"top","text-top":"text-top","\u6587\u5B57\u9876\u90E8":"text-top","middle":"middle","\u4E2D\u95F4":"middle","bottom":"bottom","\u5E95\u90E8":"bottom","text-bottom":"text-bottom","\u6587\u5B57\u5E95\u90E8":"text-bottom","lang=$1":"lang","\u8BED\u8A00=$1":"lang","page=$1":"page","page $1":"page","\u9875\u6570=$1":"page","$1\u9875":"page"},"variants":["zh","zh-hans","zh-hant","zh-cn","zh-tw","zh-hk","zh-sg","zh-my","zh-mo"]}')}},L={};function j(m){var C=L[m];if(C!==void 0)return C.exports;var e=L[m]={exports:{}};return R[m](e,e.exports,j),e.exports}j.o=(m,C)=>Object.prototype.hasOwnProperty.call(m,C);var K=j(6010)})();})();
38
+ `})}lint(i=0){let s;return this.childNodes.filter(t=>{const{childNodes:n}=t,l=n.findIndex(({type:h})=>h!=="text"),o=(l>=0?n.slice(0,l).map(String).join(""):String(t)).trim();return o&&!(l>=0?/^[a-z]+\s*(?:=|$)/iu:/^[a-z]+\s*=/iu).test(o)}).map(t=>(s||(s={start:i,...this.getRootNode().posFromIndex(i)}),f(t,s,`${this.name}\u7684\u65E0\u6548\u53C2\u6570`)))}}T.exports=p},9799:(T,N,e)=>{"use strict";const{extUrlChar:f,extUrlCharFirst:$}=e(231),{generateForChild:y}=e(8277),u=e(6010),p=e(8138);class g extends p{constructor(s,t,n=u.getConfig(),l=[]){super(void 0,n,!0,l);P(this,"type","parameter");const o=new p(typeof s=="number"?void 0:s,n,!0,l,{}),h=new p(t,n,!0,l);o.type="parameter-key",h.type="parameter-value",this.append(o,h.setAttribute("stage",2))}get anon(){return this.firstChild.length===0}afterBuild(){if(!this.anon){const s=e(1782),t=String(this.firstChild).replace(/<!--.*?-->/gu,"").replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),{parentNode:n}=this;this.setAttribute("name",t),n instanceof s&&n.getArgs(t,!1,!1).add(this)}}toString(s){return this.anon?this.lastChild.toString(s):super.toString(s,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}print(){return super.print({sep:this.anon?"":"="})}lint(s=0){var o;const t=super.lint(s),{firstChild:n}=this,l=(o=new RegExp(`https?://${$}${f}$`,"iu").exec(String(n).replace(/<!--.*?-->/gu,"")))==null?void 0:o[0];if(l&&new URL(l).search){const h=y(n,{start:s},"\u533F\u540D\u53C2\u6570\u4E2D\u672A\u8F6C\u4E49\u7684\u67E5\u8BE2\u53C2\u6570");t.push({...h,startIndex:h.endIndex,endIndex:h.endIndex+1,startLine:h.endLine,startCol:h.endCol,endCol:h.endCol+1})}return t}}T.exports=g},8058:(T,N,e)=>{"use strict";const f=e(6010),$=e(8138);class y extends ${constructor(p,g,r="plain",i=f.getConfig(),s=[],t=void 0){super(p,i,!0,s,t),this.type=r}}T.exports=y},2840:(T,N,e)=>{"use strict";const{generateForChild:f}=e(8277),$=e(3125),y=e(8058);class u extends ${constructor(){super(...arguments);P(this,"type","table")}get closed(){return this.lastChild.type==="table-syntax"}lint(r=0){const i=super.lint(r);if(!this.closed){const{firstChild:s}=this,t=f(s,{start:r},"\u672A\u95ED\u5408\u7684\u8868\u683C");i.push(t)}return i}close(r=`
39
+ |}`,i=!1){const s=this.getAttribute("config"),t=this.getAttribute("accum");super.insertAt(new y(r,void 0,"table-syntax",s,t))}}T.exports=u},5567:(T,N,e)=>{var g;"use strict";const{generateForChild:f}=e(8277),$=e(6010),y=e(8138),u=e(3125);class p extends u{constructor(s,t,n=$.getConfig(),l=[]){let o=t==null?void 0:t.match(/\||\0\d+!\x7F/u),h=o?t.slice(0,o.index):"";/\[\[|-\{/u.test(h)&&(o=void 0,h="");super(s,h,n,l);P(this,"type","td");L(this,g,"");o&&([nt(this,g)._]=o);const a=new y(t==null?void 0:t.slice((o==null?void 0:o.index)+x(this,g).length),n,!0,l);a.type="td-inner",this.insertAt(a.setAttribute("stage",4))}get subtype(){return this.getSyntax().subtype}getSyntax(){const s=this.firstChild.text(),t=s[s.length-1];let n="td";return t==="!"?n="th":t==="+"&&(n="caption"),{subtype:n}}afterBuild(){x(this,g).includes("\0")&&G(this,g,this.getAttribute("buildFromStr")(x(this,g),"string"))}toString(s){const{childNodes:[t,n,l]}=this;return`${t.toString()}${n.toString()}${x(this,g)}${l.toString()}`}text(){const{childNodes:[s,t,n]}=this;return`${s.text()}${t.text()}${x(this,g)}${n.text()}`}getGaps(s=0){return s=s<0?s+this.length:s,s===1?x(this,g).length:0}lint(s=0){const t=super.lint(s),{lastChild:n}=this;s+=this.getRelativeIndex(-1);for(const l of n.childNodes)l.type==="text"&&l.data.includes("|")&&t.push(f(l,{start:s},'\u8868\u683C\u5355\u5143\u683C\u4E2D\u591A\u4F59\u7684"|"',"warning"));return t}print(){const{childNodes:[s,t,n]}=this;return`<span class="wpb-td">${s.print()}${t.print()}${x(this,g)}${n.print()}</span>`}}g=new WeakMap,T.exports=p},3125:(T,N,e)=>{"use strict";const{generateForChild:f}=e(8277),$=e(6010),y=e(8138),u=e(8058),p=e(5649);class g extends y{constructor(s,t="",n=$.getConfig(),l=[],o=void 0){super(void 0,n,!0,l,{});P(this,"type","tr");this.append(new u(s,o,"table-syntax",n,l,{}),new p(t,"table-attrs",this.type,n,l))}lint(s=0){const t=e(1782),n=e(9544),l=super.lint(s),o=this.childNodes.find(({type:m})=>m==="table-inter");if(!o)return l;const h=o.childNodes.find(m=>m.text().trim()),a=/^\s*(?:!|\{\{\s*![!-]?\s*\}\})/u;if(!h||h.type==="arg"&&a.test(h.default||""))return l;if(h.type==="magic-word")try{if(h.getPossibleValues().every(d=>a.test(d.text())))return l}catch(m){}const S=f(o,{start:s},"\u5C06\u88AB\u79FB\u51FA\u8868\u683C\u7684\u5185\u5BB9");return l.push({...S,startIndex:S.startIndex+1,startLine:S.startLine+1,startCol:0}),l}text(){const s=super.text();return this.type==="tr"&&!s.trim().includes(`
40
+ `)?"":s}}T.exports=g},7267:(T,N,e)=>{"use strict";const{generateForSelf:f}=e(8277),$=e(6010),y=e(8138),u=e(1074),p=e(5649);class g extends u{constructor(s,t="",n="",l=void 0,o=$.getConfig(),h=[]){t=!t||/^\s/u.test(t)?t:` ${t}`;const a=s.toLowerCase(),S=new p(t,"ext-attrs",a,o,h),m=JSON.parse(JSON.stringify(o)),d=new Set(m.ext);let c;switch(d.delete(a),m.ext=[...d],m.inExt=!0,a){case"tab":d.delete("tabs"),m.ext=[...d];case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":case"inputbox":c=new y(n,m,!0,h);break;case"gallery":{const A=e(1891);c=new A(n,m,h);break}case"pre":{const A=e(428);c=new A(n,m,h);break}case"charinsert":{const A=e(8103);c=new A(n,m,h);break}case"references":case"choose":case"combobox":{const A=e(8889),k=e(7033)(`./${a}`);c=new k(n,m,h);break}case"imagemap":{const A=e(2641);c=new A(n,o,h);break}case"dynamicpagelist":{const A=e(9380);c=new A(n,m,h);break}default:{const A=e(6935);c=new A(n,o)}}c.setAttribute("name",a).type="ext-inner";super(s,S,c,l,o,h);P(this,"type","ext");P(this,"closed",!0)}lint(s=0){const t=super.lint(s);if(this.name!=="nowiki"&&this.closest("html-attrs, table-attrs")){const n=this.getRootNode(),l={start:s,...n.posFromIndex(s)};t.push(f(this,l,"HTML\u6807\u7B7E\u5C5E\u6027\u4E2D\u7684\u6269\u5C55\u6807\u7B7E"))}return t}}T.exports=g},8655:(T,N,e)=>{"use strict";const f=e(2308),{generateForSelf:$}=e(8277),y=e(6010),u=e(1074);class p extends f(u){constructor(i,s="",t=void 0,n=void 0,l=y.getConfig(),o=[]){super(i,s,t!=null?t:"",t===void 0||n!=null?n:"",l,o);P(this,"type","include")}lint(i=0){return this.closed?[]:[$(this,{start:i},"\u672A\u95ED\u5408\u7684\u6807\u7B7E")]}}T.exports=p},1074:(T,N,e)=>{var u,p,g;"use strict";const f=e(6010),$=e(8138);class y extends ${constructor(s,t,n,l,o=f.getConfig(),h=[]){super(void 0,o,!0);L(this,u,void 0);L(this,p,void 0);L(this,g,void 0);G(this,g,[s,l||s]),G(this,u,l===void 0),G(this,p,l!==""),this.append(t,n);let a=h.indexOf(t);a===-1&&(a=h.indexOf(n)),a===-1&&(a=1/0),h.splice(a,0,this)}get closed(){return x(this,p)}toString(s){const{firstChild:t,lastChild:n}=this,[l,o]=x(this,g);return x(this,u)?`<${l}${String(t)}/>`:`<${l}${String(t)}>${String(n)}${x(this,p)?`</${o}>`:""}`}text(){const[s,t]=x(this,g);return x(this,u)?`<${s}${this.firstChild.text()}/>`:`<${s}${super.text(">")}${x(this,p)?`</${t}>`:""}`}getPadding(){return x(this,g)[0].length+1}getGaps(){return 1}print(){const[s,t]=x(this,g);return super.print(x(this,u)?{pre:`&lt;${s}`,post:"/&gt;"}:{pre:`&lt;${s}`,sep:"&gt;",post:x(this,p)?`&lt;/${t}&gt;`:""})}}u=new WeakMap,p=new WeakMap,g=new WeakMap,T.exports=y},1782:(T,N,e)=>{var n,l,o,h,$t;"use strict";const{removeComment:f,print:$,text:y}=e(231),{generateForChild:u}=e(8277),p=e(6010),g=e(8138),r=e(9799),i=e(9237),s=e(8058);class t extends g{constructor(d,c,A=p.getConfig(),k=[]){super(void 0,A,!0,k,{});L(this,h);P(this,"type","template");P(this,"modifier","");L(this,n,{});L(this,l,"");L(this,o,!0);const{parserFunction:[C,w,F]}=A;if(d.includes(":")){const[v,...b]=d.split(":");this.setModifier(v)&&(d=b.join(":"))}if(d.includes(":")||c.length===0&&!F.includes(this.modifier.toLowerCase())){const[v,...b]=d.split(":"),D=f(v),j=D.trim(),W=w.includes(j),M=C[j.toLowerCase()];if(!(b.length>0&&/\s$/u.test(D))&&(W||M)){this.setAttribute("name",M||j.toLowerCase()).type="magic-word";const J=new RegExp(`^\\s*${j}\\s*$`,W?"u":"iu"),V=new s(v,J,"magic-word-name",A,k,{});if(this.insertAt(V),b.length>0&&c.unshift([b.join(":")]),this.name==="invoke")for(let Q=0;Q<2;Q++){const Y=c.shift();if(!Y)break;const q=new i(Y.join("="),`invoke-${Q?"function":"module"}`,A,k,{});this.insertAt(q)}}}if(this.type==="template"){const v=f(d).split("#")[0].trim();if(!v||/\0\d+[eh!+-]\x7F|[<>[\]{}\n]|%[\da-f]{2}/u.test(v))throw k.pop(),new SyntaxError(`\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A${v}`);const b=new i(d,"template-name",A,k,{});this.insertAt(b)}const E=this.isTemplate();let z=1;for(let v=0;v<c.length;v++){const b=c[v];!E&&!(this.name==="switch"&&v>0)&&(b[0]=b.join("="),b.length=1),b.length===1&&(b.unshift(z),z++),this.insertAt(new r(...b,A,k))}}setModifier(d=""){if(/\s$/u.test(d))return!1;const{parserFunction:[,,c,A]}=this.getAttribute("config"),k=d.trim().toLowerCase(),C=c.includes(k),w=A.includes(k);return C||w||d===""?(this.setAttribute("modifier",d),Boolean(d)):!1}afterBuild(){if(this.isTemplate()){const d=this.type==="template",c=this.normalizeTitle(this.childNodes[d?0:1].text(),d?10:828);G(this,l,c.fragment),G(this,o,c.valid)}}toString(d){const{childNodes:c,firstChild:A,modifier:k}=this;return`{{${k}${k&&":"}${this.type==="magic-word"?`${String(A)}${c.length>1?":":""}${c.slice(1).map(String).join("|")}`:super.toString(d,"|")}}}`}text(){const{childNodes:d,firstChild:c,modifier:A}=this;return`{{${A}${A&&":"}${this.type==="magic-word"?`${c.text()}${d.length>1?":":""}${y(d.slice(1),"|")}`:super.text("|")}}}`}getPadding(){return this.modifier?this.modifier.length+3:2}getGaps(){return 1}print(){const{childNodes:d,firstChild:c,modifier:A}=this;return`<span class="wpb-${this.type}">{{${A}${A&&":"}${this.type==="magic-word"?`${c.print()}${d.length>1?":":""}${$(d.slice(1),{sep:"|"})}`:$(d,{sep:"|"})}}}</span>`}lint(d=0){const c=super.lint(d),{type:A,childNodes:k}=this;let C;if(this.isTemplate())x(this,l)&&(C={start:d,...this.getRootNode().posFromIndex(d)},c.push(u(k[A==="template"?0:1],C,"\u591A\u4F59\u7684fragment")));else return c;x(this,o)||(C={start:d,...this.getRootNode().posFromIndex(d)},c.push(u(k[1],C,"\u975E\u6CD5\u7684\u6A21\u5757\u540D\u79F0")));const w=this.getDuplicatedArgs();return w.length>0&&(C||(C={start:d,...this.getRootNode().posFromIndex(d)}),c.push(...w.flatMap(([,F])=>F).map(F=>u(F,C,"\u91CD\u590D\u53C2\u6570")))),c}isTemplate(){return this.type==="template"||this.type==="magic-word"&&this.name==="invoke"}insertAt(d,c=this.length){return super.insertAt(d,c),d.anon?X(this,h,$t).call(this,d):d.name&&this.getArgs(d.name,!1,!1).add(d),d}getAllArgs(){return this.childNodes.filter(d=>d instanceof r)}getAnonArgs(){return this.getAllArgs().filter(({anon:d})=>d)}getArgs(d,c,A=!0){const k=String(d).trim();let C;return Object.prototype.hasOwnProperty.call(x(this,n),k)?C=x(this,n)[k]:(C=new Set(this.getAllArgs().filter(({name:w})=>k===w)),x(this,n)[k]=C),C}getDuplicatedArgs(){return this.isTemplate()?Object.entries(x(this,n)).filter(([,{size:d}])=>d>1).map(([d,c])=>[d,[...c]]):[]}getPossibleValues(){const{type:d,name:c,childNodes:A,constructor:{name:k}}=this;if(d==="template")throw new Error(`${k}.getPossibleValues \u65B9\u6CD5\u4EC5\u4F9B\u7279\u5B9A\u9B54\u672F\u5B57\u4F7F\u7528\uFF01`);let C;switch(c){case"if":case"ifexist":case"ifexpr":case"iferror":C=2;break;case"ifeq":C=3;break;default:throw new Error(`${k}.getPossibleValues \u65B9\u6CD5\u4EC5\u4F9B\u7279\u5B9A\u9B54\u672F\u5B57\u4F7F\u7528\uFF01`)}const w=A.slice(C,C+2).map(({childNodes:[,F]})=>F);for(let F=0;F<w.length;){const{length:E,0:z}=w[F].childNodes.filter(v=>v.text().trim());if(E===0)w.splice(F,1);else if(E>1||z.type!=="magic-word")F++;else try{const v=z.getPossibleValues();w.splice(F,1,...v),F+=v.length}catch(v){F++}}return w}}n=new WeakMap,l=new WeakMap,o=new WeakMap,h=new WeakSet,$t=function(d){const c=this.getAnonArgs(),A=c.indexOf(d);for(let k=A;k<c.length;k++){const C=c[k],{name:w}=C,F=String(k+1);w!==F&&this.getArgs(F,!1,!1).add(C.setAttribute("name",F))}},T.exports=t},8277:(T,N,e)=>{"use strict";const f=e(8138),$=(u,p,g,r="error")=>{const i=u.getRelativeIndex(),{offsetHeight:s,offsetWidth:t,parentNode:n,length:l}=u,{top:o,left:h}=n.posFromIndex(i),{start:a}=p,{top:S,left:m}="top"in p?p:u.getRootNode().posFromIndex(a),d=a+i,c=d+l,A=S+o,k=A+s-1,C=o?h:m+h,w=s>1?t:C+t;return{message:g,severity:r,startIndex:d,endIndex:c,startLine:A,endLine:k,startCol:C,endCol:w}},y=(u,p,g,r="error")=>{const{start:i}=p,{offsetHeight:s,offsetWidth:t,length:n}=u,{top:l,left:o}="top"in p?p:u.getRootNode().posFromIndex(i);return{message:g,severity:r,startIndex:i,endIndex:i+n,startLine:l,endLine:l+s-1,startCol:o,endCol:s>1?t:o+t}};T.exports={generateForChild:$,generateForSelf:y}},231:(T,N,e)=>{"use strict";const f='(?:\\[[\\da-f:.]+\\]|[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD])',$='(?:[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD]|\\0\\d+c\\x7F)*',y=i=>i.replace(/\0\d+c\x7F/gu,""),u=(i,s={})=>{const t=e(7507),n=e(9205),{pre:l="",post:o="",sep:h=""}=s,a={"&":"amp","<":"lt",">":"gt"};return`${l}${i.map(S=>S instanceof n?S.print():String(S).replace(/[&<>]/gu,m=>`&${a[m]};`)).join(h)}${o}`},p=i=>i.replace(/[\\{}()|.?*+^$[\]]/gu,"\\$&"),g=(i,s,t,n)=>{if(n===void 0)return[];const l=new RegExp(`${[i,s,t].map(p).join("|")}`,"gu"),o=[];let h=l.exec(n),a=0,S=0;for(;h;){const{0:m,index:d}=h;m!==t?a+=m===i?1:-1:a===0&&(o.push(n.slice(S,d)),{lastIndex:S}=l),h=l.exec(n)}return o.push(n.slice(S)),o},r=(i,s="")=>{const t=e(3853);return i.map(n=>typeof n=="string"?n:n.text()).join(s)};T.exports={extUrlCharFirst:f,extUrlChar:$,removeComment:y,print:u,escapeRegExp:p,explode:g,text:r}},8166:T=>{"use strict";T.exports=JSON.parse('{"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":{},"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","#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":["zh","zh-hans","zh-hant","zh-cn","zh-tw","zh-hk","zh-sg","zh-my","zh-mo"]}')}},H={};function B(T){var N=H[T];if(N!==void 0)return N.exports;var e=H[T]={exports:{}};return U[T](e,e.exports,B),e.exports}B.o=(T,N)=>Object.prototype.hasOwnProperty.call(T,N);var tt=B(6010)})();})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wikiparser-node",
3
- "version": "0.6.2-b",
3
+ "version": "0.7.0-b",
4
4
  "description": "A Node.js parser for MediaWiki markup with AST",
5
5
  "keywords": [
6
6
  "mediawiki",
@@ -22,11 +22,12 @@
22
22
  "url": "git+https://github.com/bhsd-harry/wikiparser-node.git"
23
23
  },
24
24
  "scripts": {
25
- "test": "webpack && eslint ."
25
+ "test": "rm bundle/*.js; webpack && eslint .",
26
+ "real": "node test/real.js",
27
+ "single": "node test/single.js"
26
28
  },
27
29
  "devDependencies": {
28
30
  "@types/node": "^17.0.23",
29
- "types-mediawiki": "^1.2.0",
30
31
  "webpack-cli": "^4.10.0",
31
32
  "webpack": "^5.73.0",
32
33
  "esbuild-loader": "^2.20.0",
@@ -35,7 +36,8 @@
35
36
  "eslint-plugin-es-x": "^5.4.0",
36
37
  "eslint-plugin-regexp": "^1.11.0",
37
38
  "eslint-plugin-unicorn": "^45.0.2",
38
- "eslint-plugin-jsdoc": "^1.0.0"
39
+ "eslint-plugin-jsdoc": "^1.0.0",
40
+ "request": "^2.88.2"
39
41
  },
40
42
  "engines": {
41
43
  "node": "^18.4.0"