wikiparser-node 0.6.5-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,40 +1,40 @@
1
- (()=>{var Tt=Object.defineProperty;var $t=(G,O,H)=>O in G?Tt(G,O,{enumerable:!0,configurable:!0,writable:!0,value:H}):G[O]=H;var S=(G,O,H)=>($t(G,typeof O!="symbol"?O+"":O,H),H),tt=(G,O,H)=>{if(!O.has(G))throw TypeError("Cannot "+H)};var A=(G,O,H)=>(tt(G,O,"read from private field"),H?H.call(G):O.get(G)),P=(G,O,H)=>{if(O.has(G))throw TypeError("Cannot add the same private member more than once");O instanceof WeakSet?O.add(G):O.set(G,H)},M=(G,O,H,J)=>(tt(G,O,"write to private field"),J?J.call(G,H):O.set(G,H),H),et=(G,O,H,J)=>({set _(m){M(G,O,m,H)},get _(){return A(G,O,J)}}),U=(G,O,H)=>(tt(G,O,"access private method"),H);(()=>{var G={6010:(m,C,e)=>{"use strict";const f={config:void 0,minConfig:e(8166),MAX_STAGE:11,getConfig(){return{...this.minConfig,...this.config}},normalizeTitle(c,u=0,a=!1,d=f.getConfig(),o=!1){let n;if(!o){const i=e(8138);n=this.run(()=>{const r=new i(String(c),d),l=r.getAttribute("parseOnce");return l(0,a),l()}),c=n.firstChild}const t=e(6986);return new t(String(c),u,d)},parse(c,u,a=f.MAX_STAGE,d=f.getConfig()){const o=e(8138);let n;return this.run(()=>{typeof c=="string"?n=new o(c,d):c instanceof o&&(n=c,c=String(n)),n.parse(a,u)}),n},run(c){return c()},print(c,u=!1,a=f.getConfig()){return`<div class="wikiparser">${this.parse(c,u,this.MAX_STAGE,a).print()} </div>`},lint(c,u=!1,a=f.getConfig()){return this.parse(c,u,this.MAX_STAGE,a).lint()}},x={};for(const c in f)["MAX_STAGE","minConfig"].includes(c)?x[c]={enumerable:!1,writable:!1}:["config","normalizeTitle","parse","print","lint"].includes(c)||(x[c]={enumerable:!1});Object.defineProperties(f,x),typeof window=="object"&&(window.Parser=f),m.exports=f},9205:(m,C,e)=>{"use strict";const{print:f}=e(231),x=e(3853),c=e(7507),a=class extends x{constructor(){super(...arguments);S(this,"name")}get length(){return this.childNodes.length}get children(){return this.childNodes.filter(({type:t})=>t!=="text")}get firstElementChild(){return this.childNodes.find(({type:n})=>n!=="text")}get lastElementChild(){return this.children.at(-1)}append(...n){for(const t of n)this.insertAt(t)}replaceChildren(...n){for(let t=this.childNodes.length-1;t>=0;t--)this.removeAt(t);this.append(...n)}setText(n,t=0){const s=this.childNodes.at(t),{type:i,data:r}=s;if(i==="text")return s.replaceData(n),r}toString(n,t=""){return this.childNodes.map(s=>s.toString()).join(t)}lint(n=0){const t=e(8058);if(this instanceof t||this.constructor.hidden||this.type==="ext-inner"&&a.lintIgnoredExt.has(this.name))return[];const s=[];for(let i=0,r=n+this.getPadding();i<this.childNodes.length;i++){const l=this.childNodes[i];s.push(...l.lint(r)),r+=String(l).length+this.getGaps(i)}return s}print(n={}){var t;return String(this)?`<span class="wpb-${(t=n.class)!=null?t:this.type}">${f(this.childNodes,n)}</span>`:""}};let u=a;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 c,u,Y,d,st;"use strict";const{text:f}=e(231);class x{constructor(){P(this,u);P(this,d);S(this,"type");S(this,"childNodes",[]);P(this,c,void 0)}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes.at(-1)}get parentNode(){return A(this,c)}get nextSibling(){var s;const t=(s=A(this,c))==null?void 0:s.childNodes;return t&&t[t.indexOf(this)+1]}get previousSibling(){var s;const t=(s=A(this,c))==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"?M(this,c,s):this[t]=s,this}text(t=""){return f(this.childNodes,t)}removeAt(t){const s=[...this.childNodes],[i]=s.splice(t,1);return i.setAttribute("parentNode"),this.setAttribute("childNodes",s),i}insertAt(t,s=this.childNodes.length){const i=[...this.childNodes];return-1===-1&&t.setAttribute("parentNode",this),i.splice(s,0,t),this.setAttribute("childNodes",i),t}normalize(){var i;const t=e(7507),s=[...this.childNodes];for(let r=s.length-1;r>=0;r--){const{type:l,data:h}=s[r];this.getGaps(r-1)||(h===""?s.splice(r,1):l==="text"&&((i=s[r-1])==null?void 0:i.type)==="text"&&(s[r-1].setAttribute("data",s[r-1].data+h),s.splice(r,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 i=s.slice(0,t).split(`
2
- `);return{top:i.length-1,left:i.at(-1).length}}}getPadding(){return 0}getGaps(){return 0}getRelativeIndex(t){let s;const i=(r,l)=>s.slice(0,r).reduce((h,p,g)=>h+String(p).length+l.getGaps(g),0)+l.getPadding();if(t===void 0){const{parentNode:r}=this;return r?({childNodes:s}=r,i(s.indexOf(this),r)):0}return{childNodes:s}=this,i(t,this)}getAbsoluteIndex(){const{parentNode:t}=this;return t?t.getAbsoluteIndex()+this.getRelativeIndex():0}getBoundingClientRect(){return{...U(this,u,Y).call(this),...this.getRootNode().posFromIndex(this.getAbsoluteIndex())}}get offsetHeight(){return U(this,u,Y).call(this).height}get offsetWidth(){return U(this,u,Y).call(this).width}get style(){return{...U(this,d,st).call(this),...U(this,u,Y).call(this),padding:this.getPadding()}}}c=new WeakMap,u=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,i;return t===void 0?(i=(s=this.parentNode)==null?void 0:s.posFromIndex(this.getRelativeIndex()))!=null?i:{top:0,left:0}:this.posFromIndex(this.getRelativeIndex(t))},m.exports=x},7507:(m,C,e)=>{var c,nt;"use strict";const f=e(3853),a=class extends f{constructor(n=""){super();P(this,c);S(this,"type","text");S(this,"data");this.data=n}toString(){return this.data}text(){return this.data}replaceData(n=""){U(this,c,nt).call(this,n)}lint(n=0){const{data:t}=this,s=[...t.matchAll(a.errorSyntax)];if(s.length>0){const{top:i,left:r}=this.getRootNode().posFromIndex(n);return s.map(({0:l,1:h,index:p})=>{h&&(p+=h.length,l=l.slice(h.length));const g=t.slice(0,p).split(`
4
- `),T=g.length+i-1,{length:k}=g.at(-1),$=g.length>1?k:r+k;return{message:`\u5B64\u7ACB\u7684"${l[0]}"`,severity:l[0]==="{"||l[0]==="}"?"error":"warning",startLine:T,endLine:T,startCol:$,endCol:$+l.length}})}return[]}};let x=a;c=new WeakSet,nt=function(n){return n=String(n),this.setAttribute("data",n),this},S(x,"errorSyntax",/[{}]+|\[{2,}|\[(?!(?:(?!https?\b)[^[])*\])|((?:^|\])[^[]*?)\]+|<(?=\s*\/?\w+[\s/>])/giu),m.exports=x},6986:(m,C,e)=>{"use strict";const f=e(6010);class x{constructor(u,a=0,d=f.getConfig()){S(this,"valid",!0);S(this,"ns",0);const{namespaces:o,nsid:n}=d;let t=o[a];u=u.replaceAll("_"," ").trim(),u[0]===":"&&(t="",u=u.slice(1).trim());const s=u.split(":");if(s.length>1){const l=o[n[s[0].trim().toLowerCase()]];l!==void 0&&(t=l,u=s.slice(1).join(":").trim())}this.ns=n[t.toLowerCase()];const i=u.indexOf("#");let r="";i!==-1&&(r=u.slice(i+1).trimEnd(),u=u.slice(0,i).trim()),this.valid=Boolean(u||r)&&!/\0\d+[eh!+-]\x7F|[<>[\]{}|]/u.test(u)}}m.exports=x},2308:m=>{"use strict";const C=e=>{var f;return f=class extends e{text(){return""}},S(f,"hidden",!0),f};m.exports=C},8275:(m,C,e)=>{"use strict";const{removeComment:f}=e(231),x=e(6010),c=e(9450),u=e(1782),a=e(9544),d=(o,n=x.getConfig(),t=[])=>{var k,$,y,F,b;const s="^(\0\\d+c\x7F)*={1,6}|\\[\\[|\\{{2,}|-\\{(?!\\{)",i=[],r={"=":`
5
- `,"{":"\\}{2,}|\\|","-":"\\}-","[":"\\]\\]"},l={"!":"!","!!":"+","(!":"{","!)":"}","!-":"-","=":"~"};let h=new RegExp(s,"gmu"),p=h.exec(o),g=o.includes("}}"),T;for(;p||T<=o.length&&(($=(k=i.at(-1))==null?void 0:k[0])==null?void 0:$[0])==="=";){if(p!=null&&p[1]){const[,{length:Q}]=p;p[0]=p[0].slice(Q),p.index+=Q}const{0:v,index:L}=p!=null?p:{0:`
6
- `,index:o.length},E=(y=i.pop())!=null?y:{},{0:z,index:j,parts:R,findEqual:B,pos:V}=E,X=v==="="&&B;if(v==="]]"||v==="}-")T=L+2;else if(v===`
7
- `){T=L+1;const{pos:Q,findEqual:W}=(F=i.at(-1))!=null?F:{};if(!Q||W||f(o.slice(Q,j))!==""){const K=/^(={1,6})(.+)\1((?:\s|\0\d+c\x7F)*)$/u.exec(o.slice(j,L));K&&(o=`${o.slice(0,j)}\0${t.length}h\x7F${o.slice(L)}`,T=j+4+String(t.length).length,new c(K[1].length,K.slice(2),n,t))}}else if(v==="|"||X)T=L+1,R.at(-1).push(o.slice(V,L)),v==="|"&&R.push([]),E.pos=T,E.findEqual=v==="|",i.push(E);else if(v.startsWith("}}")){const Q=v.slice(0,Math.min(z.length,3)),W=z.length-Q.length,{length:K}=t;T=L+Q.length,R.at(-1).push(o.slice(V,L));let q=!1,N="t";if(Q.length===3)new a(R.map(w=>w.join("=")),n,t);else{const w=f(R[0][0]);w in l?N=l[w]:/^(?:fullurl|canonicalurl|filepath):./iu.test(w)&&(N="m");try{new u(R[0][0],R.slice(1),n,t)}catch(I){if(I instanceof Error&&I.message.startsWith("\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A"))T=j+z.length,q=!0;else throw I}}q||(o=`${o.slice(0,j+W)}\0${K}${N}\x7F${o.slice(T)}`,T=j+W+3+String(K).length,W>1?i.push({0:z.slice(0,W),index:j,pos:j+W,parts:[[]]}):W===1&&o[j-1]==="-"&&i.push({0:"-{",index:j-1,pos:j+1,parts:[[]]}))}else T=L+v.length,v[0]==="{"&&(p.pos=T,p.parts=[[]]),i.push(..."0"in E?[E]:[],p);g&&(g=o.slice(T).includes("}}"));let D=i.at(-1);!g&&((b=D==null?void 0:D[0])==null?void 0:b[0])==="{"&&(i.pop(),D=i.at(-1)),h=new RegExp(s+(D?`|${r[D[0][0]]}${D.findEqual?"|=":""}`:""),"gmu"),h.lastIndex=T,p=h.exec(o)}return o};m.exports=d},4907:(m,C,e)=>{"use strict";const f=e(6010),x=e(851),c=e(3423),u=e(8655),a=e(7267),d=e(5749),o=(n,t=f.getConfig(),s=[],i=!1)=>{const r=/<onlyinclude>(.*?)<\/onlyinclude>/gsu;if(i&&n.search(r)!==-1)return n.replaceAll(r,(T,k)=>{const $=`\0${s.length}e\x7F`;return new x(k,t,s),$}).replaceAll(/(^|\0\d+e\x7F)(.*?)(?=$|\0\d+e\x7F)/gsu,(T,k,$)=>$===""?k:(new c($,t,s),`${k}\0${s.length-1}c\x7F`));const l=t.ext.join("|"),h=i?"includeonly":"(?:no|only)include",p=i?"noinclude":"includeonly",g=new RegExp(`<!--.*?(?:-->|$)|<${h}(?:\\s[^>]*?)?>|</${h}\\s*>|<(${l})(\\s[^>]*?)?(?:/>|>(.*?)</(\\1\\s*)>)|<(${p})(\\s[^>]*?)?(?:/>|>(.*?)(?:</(\\5\\s*)>|$))`,"gisu");return n.replaceAll(g,(T,k,$,y,F,b,v,L,E)=>{const z=`\0${s.length}${k?"e":"c"}\x7F`;if(k)new a(k,$,y,F,t,s);else if(T.startsWith("<!--")){const j=T.endsWith("-->");new d(T.slice(4,j?-3:void 0),j,t,s)}else b?new u(b,v,L,E,t,s):new c(T,t,s);return z})};m.exports=o},3765:(m,C,e)=>{"use strict";const f=e(6010),x=e(9910),c=(u,a=f.getConfig(),d=[])=>{const o=/-\{/gu,n=/-\{|\}-/gu,t=[];let s=o,i=s.exec(u);for(;i;){const{0:r,index:l}=i;if(r==="}-"){const h=t.pop(),{length:p}=d,g=u.slice(h.index+2,l),T=g.indexOf("|"),[k,$]=T===-1?[[],g]:[g.slice(0,T).split(";"),g.slice(T+1)],y=$.replaceAll(/(&[#a-z\d]+);/giu,"$1"),F=`(?:${a.variants.join("|")})`,b=y.split(new RegExp(`;(?=\\s*(?:${F}|[^;]*?=>\\s*${F})\\s*:)`,"u")).map(v=>v.replaceAll("",";"));new x(k,b,a,d),u=`${u.slice(0,h.index)}\0${p}v\x7F${u.slice(l+2)}`,t.length===0&&(s=o),s.lastIndex=h.index+3+String(p).length}else t.push(i),s=n;i=s.exec(u)}return u};m.exports=c},7513:(m,C,e)=>{"use strict";const{extUrlChar:f}=e(231),x=e(6010),c=e(741),u=(a,d=x.getConfig(),o=[])=>{const n=new RegExp(`\\[((?:${d.protocol}|//)${f}|\0\\d+m\x7F)(\\p{Zs}*)([^\\]-\b
8
- -\uFFFD]*)\\]`,"giu");return a.replaceAll(n,(t,s,i,r)=>{const{length:l}=o,h=/&[lg]t;/u.exec(s);return h&&(s=s.slice(0,h.index),i="",r=`${s.slice(h.index)}${i}${r}`),new c(s,i,r,d,o),`\0${l}w\x7F`})};m.exports=u},2937:(m,C,e)=>{"use strict";const f=e(6010),x=e(7507),c=e(8138),u=e(2582),a=e(7815),d=({firstChild:{data:o},type:n,name:t},s=f.getConfig(),i=[])=>{const{doubleUnderscore:r}=s;return n!=="root"&&(n!=="ext-inner"||t!=="poem")&&(o=`\0${o}`),o=o.replaceAll(/^((?:\0\d+c\x7F)*)(-{4,})/gmu,(l,h,p)=>(new u(p.length,s,i),`${h}\0${i.length-1}r\x7F`)).replaceAll(new RegExp(`__(${r.flat().join("|")})__`,"giu"),(l,h)=>r[0].includes(h.toLowerCase())||r[1].includes(h)?(new a(h,s,i),`\0${i.length-1}u\x7F`):l),n==="root"||n==="ext-inner"&&t==="poem"?o:o.slice(1)};m.exports=d},5130:(m,C,e)=>{"use strict";const f=e(6010),x=e(5037),c=e(2350),u=(a,d=f.getConfig(),o=[])=>{const n=/^(\/?)([a-z][^\s/>]*)(\s[^>]*?)?(\/?>)([^<]*)$/iu,t=d.html.flat(),s=a.split("<");let i=s.shift();for(const r of s){const l=n.exec(r),h=l==null?void 0:l[2],p=h==null?void 0:h.toLowerCase();if(!l||!t.includes(p)){i+=`<${r}`;continue}const[,g,,T="",k,$]=l,y=new x(T,"html-attr",p,d,o),F=y.getAttr("itemprop");if(p==="meta"&&(F===void 0||y.getAttr("content")===void 0)||p==="link"&&(F===void 0||y.getAttr("href")===void 0)){i+=`<${r}`,o.pop();continue}i+=`\0${o.length}x\x7F${$}`,new c(h,y,g==="/",k==="/>",d,o)}return i};m.exports=u},1452:(m,C,e)=>{"use strict";const f=e(6010),x=e(3905),c=e(7625),u=e(337),a=(d,o=f.getConfig(),n=[])=>{const t=e(3360),s=/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]]))?\]\](.*)$/su,i=/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(\||\0\d+!\x7F)(.*)$/su,r=new RegExp(`^\\s*(?:${o.protocol})`,"iu"),l=d.split("[[");let h=l.shift();for(let p=0;p<l.length;p++){let g,T,k,$,y;const F=l[p],b=s.exec(F);if(b)[,T,k,$,y]=b,y[0]==="]"&&($==null?void 0:$.includes("["))&&($+="]",y=y.slice(1));else{const B=i.exec(F);B&&(g=!0,[,T,k,$]=B)}if(T===void 0||r.test(T)||/\0\d+[exhbru]\x7F/u.test(T)){h+=`[[${F}`;continue}let v=T;if(T.includes("%"))try{v=decodeURIComponent(T)}catch(B){}const L=T.trim()[0]===":";if(L&&g){h+=`[[${F}`;continue}const E=f.normalizeTitle(v,0,!1,o,!0),{ns:z,valid:j}=E;if(j){if(g){if(z!==6){h+=`[[${F}`;continue}let B;for(p++;p<l.length;p++){const V=l[p],X=V.split("]]");if(X.length>2){B=!0,$+=`[[${X[0]}]]${X[1]}`,y=X.slice(2).join("]]");break}else if(X.length===2)$+=`[[${X[0]}]]${X[1]}`;else{$+=`[[${V}`;break}}if($=a($,o,n),!B){h+=`[[${T}${k}${$}`;continue}}}else{h+=`[[${F}`;continue}$&&($=t($,o,n)),h+=`\0${n.length}l\x7F${y}`;let R=x;L||(z===6?R=c:z===14&&(R=u)),new R(T,$,E,o,n,k)}return h};m.exports=a},6622:(m,C,e)=>{"use strict";const f=e(6010),x=e(962),c=e(3434),u=(a,d=f.getConfig(),o=[])=>{const n=/^((?:\0\d+c\x7F)*)([;:*#]+)/u.exec(a);if(!n)return a;const[t,s,i]=n;a=`${s}\0${o.length}d\x7F${a.slice(t.length)}`,new x(i,d,o);let r=i.split(";").length-1;if(!r)return a;let l=/:+|-\{/gu,h=l.exec(a),p=0;for(;h&&r;){const{0:g,index:T}=h;if(g[0]===":"){if(g.length>=r)return new c(":".repeat(r),d,o),`${a.slice(0,T)}\0${o.length-1}d\x7F${a.slice(T+r)}`;a=`${a.slice(0,T)}\0${o.length}d\x7F${a.slice(l.lastIndex)}`,r-=g.length,l.lastIndex=T+4+String(o.length).length,new c(g,d,o)}else if(g==="-{"){if(!p){const{lastIndex:k}=l;l=/-\{|\}-/gu,l.lastIndex=k}p++}else if(p--,!p){const{lastIndex:k}=l;l=/:+|-\{/gu,l.lastIndex=k}h=l.exec(a)}return a};m.exports=u},4737:(m,C,e)=>{"use strict";const{extUrlChar:f}=e(231),x=e(6010),c=e(8962),u=(a,d=x.getConfig(),o=[])=>{const n=new RegExp(`\\b(?:${d.protocol})(${f})`,"giu");return a.replaceAll(n,(t,s)=>{let i="",r=t;const l=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(r);l&&(i=r.slice(l.index),r=r.slice(0,l.index));const h=new RegExp(`[,;.:!?${r.includes("(")?"":")"}]+$`,"u"),p=h.exec(r);if(p){let g=0;p[0][0]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(r.slice(0,p.index))&&(g=1),i=`${r.slice(p.index+g)}${i}`,r=r.slice(0,p.index+g)}return i.length>=s.length?t:(new c(r,!1,d,o),`\0${o.length-1}w\x7F${i}`)})};m.exports=u},3360:(m,C,e)=>{"use strict";const f=e(6010),x=e(6714),c=(u,a=f.getConfig(),d=[])=>{var h;const o=u.split(/('{2,})/u),{length:n}=o;if(n===1)return u;let t=0,s=0,i,r,l;for(let p=1;p<n;p+=2){const{length:g}=o[p];switch(g){case 2:s++;break;case 4:o[p-1]+="'",o[p]="'''";case 3:if(t++,i)break;o[p-1].at(-1)===" "?!r&&!l&&(l=p):o[p-1].at(-2)===" "?i=p:r||(r=p);break;default:o[p-1]+="'".repeat(g-5),o[p]="'''''",s++,t++}}if(s%2===1&&t%2===1){const p=(h=i!=null?i:r)!=null?h:l;o[p]="''",o[p-1]+="'"}for(let p=1;p<n;p+=2)new x(o[p].length,a,d),o[p]=`\0${d.length-1}q\x7F`;return o.join("")};m.exports=c},4624:(m,C,e)=>{"use strict";const f=e(6010),x=e(7507),c=e(8138),u=e(2840),a=e(3125),d=e(5567),o=e(3434),n=({firstChild:{data:t},type:s,name:i},r=f.getConfig(),l=[])=>{const h=[],p=t.split(`
9
- `);let g=s==="root"||s==="parameter-value"||s==="ext-inner"&&i==="poem"?"":`
10
- ${p.shift()}`;const T=(k,$)=>{if(!$){g+=k;return}const{lastChild:y}=$;if(y.constructor===c)y.setText(String(y)+k);else{const F=new c(k,r,!0,l);F.type="table-inter",$.insertAt(F.setAttribute("stage",3))}};for(const k of p){let $=h.pop();const[y]=/^(?:\s|\0\d+c\x7F)*/u.exec(k),F=k.slice(y.length),b=/^(:*)((?:\s|\0\d+c\x7F)*)(\{\||\{\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(F);if(b){for(;$&&$.type!=="td";)$=h.pop();const[,R,B,V,X]=b;R&&new o(R,r,l),T(`
11
- ${y}${R&&`\0${l.length-1}d\x7F`}${B}\0${l.length}b\x7F`,$);const D=new u(V,X,r,l);h.push(...$?[$]:[],D);continue}else if(!$){g+=`
12
- ${k}`;continue}const v=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(F);if(!v){T(`
13
- ${k}`,$),h.push(...$?[$]:[]);continue}const[,L,E,z,j]=v;if(L){for(;!($ instanceof u);)$=h.pop();$.close(`
14
- ${y}${L}`,!0),T(j,h.at(-1))}else if(E){$.type==="td"&&($=h.pop()),$.type==="tr"&&($=h.pop());const R=new a(`
15
- ${y}${E}`,j,r,l);h.push($,R),$.insertAt(R)}else{$.type==="td"&&($=h.pop());const R=z==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu;let B=R.exec(j),V=0,X=`
16
- ${y}${z}`;for(;B;){const Q=new d(X,j.slice(V,B.index),r,l);$.insertAt(Q),{lastIndex:V}=R,[X]=B,B=R.exec(j)}const D=new d(X,j.slice(V),r,l);h.push($,D),$.insertAt(D)}}return g.slice(1)};m.exports=n},9544:(m,C,e)=>{"use strict";const{text:f}=e(231),{generateForChild:x}=e(8277),c=e(6010),u=e(8138);class a extends u{constructor(n,t=c.getConfig(),s=[]){super(void 0,t,!0,s,{AtomToken:0,Token:1,HiddenToken:"2:"});S(this,"type","arg");for(let i=0;i<n.length;i++)if(i===0||i>1){const r=e(i===0?9237:9263),l=new r(n[i],i===0?"arg-name":void 0,t,s,{"Stage-2":":","!HeadingToken":""});super.insertAt(l)}else{const r=new u(n[i],t,!0,s);r.type="arg-default",super.insertAt(r.setAttribute("stage",2))}}toString(n){return`{{{${super.toString(n,"|")}}}}`}text(){return`{{{${f(this.childNodes.slice(0,2),"|")}}}}`}getPadding(){return 3}getGaps(){return 1}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}lint(n=0){const{childNodes:[t,s,...i]}=this,r=t.lint(n+3);if(s&&r.push(...s.lint(n+4+String(t).length)),i.length>0){const l=this.getRootNode().posFromIndex(n);r.push(...i.map(h=>x(h,l,"\u4E09\u91CD\u62EC\u53F7\u5185\u7684\u4E0D\u53EF\u89C1\u90E8\u5206")))}return r}}m.exports=a},9263:(m,C,e)=>{"use strict";const f=e(2308),x=e(9237);class c extends f(x){constructor(){super(...arguments);S(this,"type","hidden")}}m.exports=c},9237:(m,C,e)=>{"use strict";const f=e(6010),x=e(8138);class c extends x{constructor(d,o,n=f.getConfig(),t=[],s=null){super(d,n,!0,t,s);S(this,"type","plain");o&&(this.type=o)}}m.exports=c},5037:(m,C,e)=>{var d,o,n,t,rt;"use strict";const{generateForSelf:f}=e(8277),{removeComment:x}=e(231),c=e(6010),u=e(8138);class a extends u{constructor(l,h,p,g=c.getConfig(),T=[]){super(l,g,!0,T);P(this,t);P(this,d,new Map);P(this,o,!0);P(this,n,!0);this.type=h,U(this,t,rt).call(this)}getAttr(l){return A(this,d).get(l.toLowerCase().trim())}setAttr(l,h,p){l=l.toLowerCase().trim();const g=l;if(/^(?:[\w:]|\0\d+[t!~{}+-]\x7F)(?:[\w:.-]|\0\d+[t!~{}+-]\x7F)*$/u.test(g))h===!1?A(this,d).delete(l):A(this,d).set(l,h===!0?!0:h.replaceAll(/\s/gu," ").trim());else return p,!1;return!0}lint(l=0){const h=e(2350),p=super.lint(l);let g;return this.type==="html-attr"&&this.parentNode.closing&&this.text().trim()&&(g=this.getRootNode().posFromIndex(l),p.push(f(this,g,"\u4F4D\u4E8E\u95ED\u5408\u6807\u7B7E\u7684\u5C5E\u6027"))),A(this,o)?A(this,n)||(g||(g=this.getRootNode().posFromIndex(l)),p.push(f(this,g,"\u672A\u95ED\u5408\u7684\u5F15\u53F7","warning"))):(g||(g=this.getRootNode().posFromIndex(l)),p.push(f(this,g,"\u5305\u542B\u65E0\u6548\u5C5E\u6027"))),p}}d=new WeakMap,o=new WeakMap,n=new WeakMap,t=new WeakSet,rt=function(){var h;let l=this.toString();l=x(l).replaceAll(/\0\d+~\x7F/gu,"=");for(const[,p,g,T,k,$]of l.matchAll(/([^\s/][^\s/=]*)(?:\s*=\s*(?:(["'])(.*?)(\2|$)|(\S*)))?/gsu))this.setAttr(p,(h=T!=null?T:$)!=null?h:!0,!0)?g!==k&&M(this,n,!1):M(this,o,!1)},m.exports=a},8103:(m,C,e)=>{"use strict";const f=e(6010),x=e(8138),c=e(2158);class u extends x{constructor(o,n=f.getConfig(),t=[]){super(void 0,n,!0,t,{HasNowikiToken:":"});S(this,"type","ext-inner");S(this,"name","charinsert");this.append(...o.split(`
17
- `).map(s=>new c(s,"charinsert-line",n,t)))}toString(o){return super.toString(o,`
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{text:f,print:x}=e(231),c=e(6010),u=e(8138),a=e(6719),d=e(8683);class o extends u{constructor(s,i,r=c.getConfig(),l=[]){super(void 0,r,!0,l);S(this,"type","converter");this.append(new a(s,r,l));const[h]=i,p=h.includes(":"),g=new d(h,p,r,l);p&&g.childNodes.length===1?this.insertAt(new d(i.join(";"),!1,r,l)):this.append(g,...i.slice(1).map(T=>new d(T,!0,r,l)))}toString(s){const{childNodes:[i,...r]}=this;return`-{${i.toString()}${i.childNodes.length>0?"|":""}${r.map(String).join(";")}}-`}text(){const{childNodes:[s,...i]}=this;return`-{${s.text()}|${f(i,";")}}-`}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,...i]}=this;return`<span class="wpb-converter">-{${s.print()}${s.childNodes.length>0?"|":""}${x(i,{sep:";"})}}-</span>`}}m.exports=o},6719:(m,C,e)=>{var d;"use strict";const{generateForChild:f}=e(8277),x=e(6010),c=e(8138),u=e(9237);class a extends c{constructor(t,s=x.getConfig(),i=[]){super(void 0,s,!0,i,{AtomToken:":"});S(this,"type","converter-flags");P(this,d,void 0);this.append(...t.map(r=>new u(r,"converter-flag",s,i)))}afterBuild(){return M(this,d,this.childNodes.map(t=>t.text().trim())),this}toString(t){return super.toString(t,";")}text(){return super.text(";")}getGaps(){return 1}print(){return super.print({sep:";"})}lint(t=0){const s=this.getVariantFlags(),i=this.getUnknownFlags(),r=A(this,d).filter(T=>!T),l=A(this,d).filter(T=>["A","T","R","D","-","H","N"].includes(T)),h=A(this,d).length-i.length-r,p=super.lint(t);if(s.length===h||l.length===h)return p;const g=this.getRootNode().posFromIndex(t);for(const T of this.childNodes){const k=T.text().trim();k&&!s.includes(k)&&!i.includes(k)&&(s.length>0||!l.includes(k))&&p.push(f(T,g,"\u65E0\u6548\u7684\u8F6C\u6362\u6807\u8BB0"))}return p}getUnknownFlags(){return A(this,d).filter(t=>/\{\{[^{}]+\}\}/u.test(t))}getVariantFlags(){const{variants:t}=this.getAttribute("config");return A(this,d).filter(s=>t.includes(s))}}d=new WeakMap,m.exports=a},8683:(m,C,e)=>{"use strict";const f=e(6010),x=e(8138),c=e(9237);class u extends x{constructor(o,n=!0,t=f.getConfig(),s=[]){super(void 0,t,!0,s);S(this,"type","converter-rule");if(n){const i=o.indexOf(":"),r=o.slice(0,i).indexOf("=>"),l=r===-1?o.slice(0,i):o.slice(r+2,i),{variants:h}=t;h.includes(l.trim())?(super.insertAt(new c(l,"converter-rule-variant",t,s)),super.insertAt(new c(o.slice(i+1),"converter-rule-to",t,s)),r!==-1&&super.insertAt(new c(o.slice(0,r),"converter-rule-from",t,s),0)):super.insertAt(new c(o,"converter-rule-noconvert",t,s))}else super.insertAt(new c(o,"converter-rule-noconvert",t,s))}toString(o){if(this.childNodes.length===3){const{childNodes:[n,t,s]}=this;return`${n.toString(o)}=>${t.toString(o)}:${s.toString(o)}`}return super.toString(o,":")}text(){if(this.childNodes.length===3){const{childNodes:[o,n,t]}=this;return`${o.text()}=>${n.text()}:${t.text()}`}return super.text(":")}getGaps(o=0){const{length:n}=this;return o=o<0?o+n:o,o===0&&n===3?2:1}print(){if(this.childNodes.length===3){const{childNodes:[o,n,t]}=this;return`<span class="wpb-converter-rule">${o.print()}=>${n.print()}:${t.print()}</span>`}return super.print({sep:":"})}}m.exports=u},741:(m,C,e)=>{var a;"use strict";const f=e(6010),x=e(8138),c=e(8962);class u extends x{constructor(n,t,s,i=f.getConfig(),r=[]){super(void 0,i,!0,r,{MagicLinkToken:0,Token:1});S(this,"type","ext-link");P(this,a,void 0);if(this.insertAt(new c(n,!0,i,r)),M(this,a,t),s){const l=new x(s,i,!0,r,{"Stage-7":":",ConverterToken:":"});l.type="ext-link-text",this.insertAt(l.setAttribute("stage",f.MAX_STAGE-1))}}toString(n){return this.childNodes.length===1?`[${super.toString(n)}${A(this,a)}]`:`[${super.toString(n,A(this,a))}]`}text(){return`[${super.text(" ")}]`}getPadding(){return 1}getGaps(){return A(this,a).length}print(){const{length:n}=this;return super.print(n>1?{pre:"[",sep:A(this,a),post:"]"}:{pre:"[",post:`${A(this,a)}]`})}}a=new WeakMap,m.exports=u},1891:(m,C,e)=>{"use strict";const f=e(6010),x=e(8138),c=e(1031),u=e(9263);class a extends x{constructor(n,t=f.getConfig(),s=[]){var r;super(void 0,t,!0,s,{AstText:":",GalleryImageToken:":",HiddenToken:":"});S(this,"type","ext-inner");S(this,"name","gallery");const i=structuredClone(t);for(const[l,h]of Object.entries(t.img))h==="width"&&delete i.img[l];for(const l of(r=n==null?void 0:n.split(`
20
- `))!=null?r:[]){const h=/^([^|]+)(?:\|(.*))?/u.exec(l);if(!h){super.insertAt(l.trim()?new u(l,void 0,t,[],{AstText:":"}):l);continue}const[,p,g]=h;let T;try{T=this.normalizeTitle(decodeURIComponent(p),6,!0)}catch(k){T=this.normalizeTitle(p,6,!0)}T.valid?super.insertAt(new c(p,g,T,i,s)):super.insertAt(new u(l,void 0,t,[],{AstText:":"}))}}toString(n){return super.toString(n,`
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
21
  `)}text(){return super.text(`
22
- `).replaceAll(/\n\s*\n/gu,`
22
+ `).replace(/\n\s*\n/gu,`
23
23
  `)}getGaps(){return 1}print(){return super.print({sep:`
24
- `})}lint(n=0){const{top:t,left:s}=this.getRootNode().posFromIndex(n),i=[];for(let r=0,l=n;r<this.childNodes.length;r++){const h=this.childNodes[r],p=String(h),g=p.trim();h.type==="hidden"&&g&&!/^<!--.*-->$/u.test(g)?i.push({message:"\u56FE\u5E93\u4E2D\u7684\u65E0\u6548\u5185\u5BB9",startLine:t+r,endLine:t+r,startCol:r?0:s,endCol:r?p.length:s+p.length}):h.type!=="hidden"&&h.type!=="text"&&i.push(...h.lint(l)),l+=p.length+1}return i}}m.exports=a},2158:(m,C,e)=>{"use strict";const f=e(6010),x=e(8138),c=e(3423);class u extends x{constructor(d,o,n=f.getConfig(),t=[]){d=d.replaceAll(/(<nowiki>)(.*?)(<\/nowiki>)/giu,(s,i,r,l)=>(new c(i,n,t),new c(l,n,t),`\0${t.length-1}c\x7F${r}\0${t.length}c\x7F`)),super(d,n,!0,t,{AstText:":",NoincludeToken:":"}),this.type=o}}m.exports=u},428:(m,C,e)=>{"use strict";const f=e(6010),x=e(2158);class c extends x{constructor(d,o=f.getConfig(),n=[]){super(d,"ext-inner",o,n);S(this,"name","pre");this.setAttribute("stage",f.MAX_STAGE-1)}isPlain(){return!0}}m.exports=c},9450:(m,C,e)=>{"use strict";const{generateForSelf:f}=e(8277),x=e(6010),c=e(8138),u=e(8058);class a extends c{constructor(n,t,s=x.getConfig(),i=[]){super(void 0,s,!0,i);S(this,"type","heading");this.setAttribute("name",String(n));const r=new c(t[0],s,!0,i);r.type="heading-title",r.setAttribute("stage",2);const l=new u(t[1],/^[^\S\n]*$/u,"heading-trail",s,i,{"Stage-1":":","!ExtToken":""});this.append(r,l)}toString(n){const t="=".repeat(Number(this.name));return`${t}${this.firstChild.toString()}${t}${this.lastChild.toString()}`}text(){const n="=".repeat(Number(this.name));return`${n}${this.firstChild.text()}${n}`}getPadding(){return super.getPadding()+Number(this.name)}getGaps(){return Number(this.name)}print(){const n="=".repeat(Number(this.name));return super.print({pre:n,sep:n})}lint(n=0){const t=super.lint(n);return this.name==="1"&&t.push(f(this,this.getRootNode().posFromIndex(n),"<h1>")),t}}m.exports=a},2350:(m,C,e)=>{var a,d,o;"use strict";const{generateForSelf:f}=e(8277),x=e(6010),c=e(8138);class u extends c{constructor(s,i,r,l,h=x.getConfig(),p=[]){super(void 0,h,!0,p);S(this,"type","html");P(this,a,void 0);P(this,d,void 0);P(this,o,void 0);this.insertAt(i),this.setAttribute("name",s.toLowerCase()),M(this,a,r),M(this,d,l),M(this,o,s)}get closing(){return A(this,a)}toString(s){return`<${A(this,a)?"/":""}${A(this,o)}${super.toString()}${A(this,d)?"/":""}>`}text(){return`<${A(this,a)?"/":""}${A(this,o)}${A(this,a)?"":super.text()}${A(this,d)?"/":""}>`}getPadding(){return A(this,o).length+(A(this,a)?2:1)}print(){return super.print({pre:`&lt;${A(this,a)?"/":""}${A(this,o)}`,post:`${A(this,d)?"/":""}&gt;`})}lint(s=0){const i=super.lint(s);let r;this.name==="h1"&&!A(this,a)&&(r=f(this,this.getRootNode().posFromIndex(s),"<h1>"),i.push(r));try{this.findMatchingTag()}catch({message:l}){const[h]=l.split("\uFF1A");r||(r=f(this,this.getRootNode().posFromIndex(s),"")),i.push({...r,message:h,severity:h==="\u672A\u95ED\u5408\u7684\u6807\u7B7E"?"warning":"error"})}return i}findMatchingTag(){const{html:s}=this.getAttribute("config"),{name:i,parentNode:r}=this,l=String(this);if(A(this,a)&&A(this,d))throw new SyntaxError(`\u540C\u65F6\u95ED\u5408\u548C\u81EA\u5C01\u95ED\u7684\u6807\u7B7E\uFF1A${l}`);if(s[2].includes(i)||A(this,d)&&s[1].includes(i))return this;if(A(this,d)&&s[0].includes(i))throw new SyntaxError(`\u65E0\u6548\u81EA\u5C01\u95ED\u6807\u7B7E\uFF1A${l}`);if(!r)return;const{childNodes:h}=r,p=h.indexOf(this),g=A(this,a)?h.slice(0,p).reverse().filter(({type:k,name:$})=>k==="html"&&$===i):h.slice(p+1).filter(({type:k,name:$})=>k==="html"&&$===i);let T=A(this,a)?-1:1;for(const k of g)if(k.closing?T--:T++,T===0)return k;throw new SyntaxError(`\u672A${A(this,a)?"\u5339\u914D\u7684\u95ED\u5408":"\u95ED\u5408\u7684"}\u6807\u7B7E\uFF1A${l}`)}}a=new WeakMap,d=new WeakMap,o=new WeakMap,m.exports=u},1874:(m,C,e)=>{var d,it,n;"use strict";const{print:f,extUrlChar:x}=e(231),c=e(6010),u=e(8138),s=class extends u{constructor(l,h=c.getConfig(),p=[]){var r=(...t)=>{super(...t);S(this,"type","image-parameter");P(this,n,"")};var k;const g=Object.entries(h.img).map(([$,y])=>[$,y,new RegExp(`^(\\s*)${$.replace("$1","(.*)")}(\\s*)$`,"u")]),T=g.find(([,,$])=>$.test(l));if(T){const $=T[2].exec(l);if($.length!==4||U(k=s,d,it).call(k,T[1],$[2],h,!0)){$.length===3?(r(void 0,h,!0,p),M(this,n,l)):(r($[2],h,!0,p,{"Stage-2":":","!HeadingToken":":"}),M(this,n,`${$[1]}${T[0]}${$[3]}`)),this.setAttribute("name",T[1]).setAttribute("stage",c.MAX_STAGE);return}}r(l,h,!0,p),this.setAttribute("name","caption").setAttribute("stage",7)}isPlain(){return!0}toString(l){return A(this,n)?A(this,n).replace("$1",super.toString(l)):super.toString(l)}text(){return A(this,n)?A(this,n).replace("$1",super.text()).trim():super.text().trim()}getPadding(){return Math.max(0,A(this,n).indexOf("$1"))}print(){return A(this,n)?`<span class="wpb-image-parameter">${A(this,n).replace("$1",f(this.childNodes))}</span>`:super.print({class:"image-caption"})}};let a=s;d=new WeakSet,it=function(l,h,p=c.getConfig(),g=!1){switch(h=h.replaceAll(/\0\d+t\x7F/gu,"").trim(),l){case"width":return/^\d*(?:x\d*)?$/u.test(h);case"link":{if(!h||new RegExp(`(?:${p.protocol}|//)${x}(?=\0\\d+t\x7F|$)`,"iu").test(h))return!0;if(h.startsWith("[[")&&h.endsWith("]]")&&(h=h.slice(2,-2)),h.includes("%"))try{h=decodeURIComponent(h)}catch($){}return c.normalizeTitle(h,0,!1,p,g).valid}case"lang":return p.variants.includes(h);case"alt":case"class":case"manualthumb":return!0;default:return!isNaN(h)}},n=new WeakMap,P(a,d),m.exports=a},2641:(m,C,e)=>{"use strict";const{generateForSelf:f,generateForChild:x}=e(8277),c=e(6010),u=e(8138),a=e(3423),d=e(1031),o=e(2571);class n extends u{constructor(i,r=c.getConfig(),l=[]){super(void 0,r,!0,l,{GalleryImageToken:":",ImagemapLinkToken:":",NoincludeToken:":",AstText:":"});S(this,"type","ext-inner");S(this,"name","imagemap");if(!i)return;const h=i.split(`
25
- `),p=k=>{super.insertAt(new a(k,r,l))};let g=!0,T=!1;for(const k of h){const $=k.trim();if(!(T||!$||$[0]==="#")){if(g){const[y,...F]=k.split("|");let b;try{b=this.normalizeTitle(decodeURIComponent(y),0,!0)}catch(v){b=this.normalizeTitle(y,0,!0)}if(b.valid&&!b.interwiki&&b.ns===6){const v=new d(y,F.length>0?F.join("|"):void 0,b,r,l);v.type="imagemap-image",super.insertAt(v),g=!1;continue}else T=!0}else if(k.trim().split(/[\t ]/u)[0]==="desc"){super.insertAt(k);continue}else if(k.includes("[")){const y=k.indexOf("["),F=k.slice(y),b=/^\[{2}([^|]+)(?:\|([^\]]+))?\]{2}[\w\s]*$/u.exec(F);if(b){const v=this.normalizeTitle(b[1],0,!0);if(v.valid){super.insertAt(new o(k.slice(0,y),[...b.slice(1),v],F.slice(F.indexOf("]]")+2),r,l));continue}}else{const v=r.protocol.split("|");if(v.includes(F.slice(1,F.indexOf(":")+1))||v.includes(F.slice(1,F.indexOf("//")+2))){const L=/^\[([^\]\s]+)(?:(\s+)(\S[^\]]*)?)?\][\w\s]*$/u.exec(F);if(L){super.insertAt(new o(k.slice(0,y),L.slice(1),F.slice(F.indexOf("]")+1),r,l));continue}}}}}p(k)}}toString(i){return super.toString(i,`
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
26
  `)}text(){return super.text(`
27
- `).replaceAll(/\n{2,}/gu,`
27
+ `).replace(/\n{2,}/gu,`
28
28
  `)}getGaps(){return 1}print(){return super.print({sep:`
29
- `})}lint(i=0){const r=super.lint(i),l=this.getRootNode().posFromIndex(i);return this.image?r.push(...this.childNodes.filter(h=>{const p=String(h).trim();return h.type==="noinclude"&&p&&p[0]!=="#"}).map(h=>x(h,l,"\u65E0\u6548\u7684<imagemap>\u94FE\u63A5"))):r.push(f(this,l,"\u7F3A\u5C11\u56FE\u7247\u7684<imagemap>")),r}}m.exports=n},2571:(m,C,e)=>{"use strict";const f=e(6986),x=e(8138),c=e(3423),u=e(3905),a=e(741);class d extends x{constructor(t,s,i,r,l){const h=s[2]instanceof f?u:a;super(void 0,r,!0,l);S(this,"type","imagemap-link");this.append(t,new h(...s,r,l),new c(i,r,l))}}m.exports=d},8138:(m,C,e)=>{var d,o,n,t,s,i,r,ot,h,lt,g,ht,k,at,y,dt,b,ut,L,pt,z,ct,R,gt,V,ft,D,xt;"use strict";const f=e(6010),x=e(9205),c=e(7507),{MAX_STAGE:u}=f,W=class extends x{constructor(N,w=f.getConfig(),I=!1,Z=[],_=null){super();P(this,r);P(this,h);P(this,g);P(this,k);P(this,y);P(this,b);P(this,L);P(this,z);P(this,R);P(this,V);P(this,D);S(this,"type","root");P(this,d,0);P(this,o,void 0);P(this,n,void 0);P(this,t,(N=A(this,d),w=!1)=>{if(N<A(this,d)||!this.isPlain()||this.childNodes.length===0)return this;switch(N){case 0:this.type==="root"&&A(this,n).shift(),U(this,r,ot).call(this,w);break;case 1:U(this,h,lt).call(this);break;case 2:U(this,g,ht).call(this);break;case 3:U(this,k,at).call(this);break;case 4:U(this,y,dt).call(this);break;case 5:U(this,b,ut).call(this);break;case 6:U(this,L,pt).call(this);break;case 7:U(this,z,ct).call(this);break;case 8:U(this,R,gt).call(this);break;case 9:U(this,V,ft).call(this);break;case 10:U(this,D,xt).call(this)}if(this.type==="root")for(const I of A(this,n))I.getAttribute("parseOnce")(N,w);return et(this,d)._++,this});P(this,s,N=>N.split(/[\0\x7F]/u).map((w,I)=>{if(I%2===0)return new c(w);if(isNaN(w.at(-1)))return A(this,n)[Number(w.slice(0,-1))];throw new Error(`\u89E3\u6790\u9519\u8BEF\uFF01\u672A\u6B63\u786E\u6807\u8BB0\u7684 Token\uFF1A${w}`)}));P(this,i,()=>{M(this,d,u);const{length:N,firstChild:w}=this,I=String(w);if(N===1&&w.type==="text"&&I.includes("\0")&&(this.replaceChildren(...A(this,s).call(this,I)),this.normalize(),this.type==="root"))for(const Z of A(this,n))Z.getAttribute("build")()});typeof N=="string"&&this.insertAt(I?N:N.replaceAll(/[\0\x7F]/gu,"")),M(this,o,w),M(this,n,Z),Z.push(this)}getAttribute(N){switch(N){case"config":return structuredClone(A(this,o));case"accum":return A(this,n);case"parseOnce":return A(this,t);case"buildFromStr":return A(this,s);case"build":return A(this,i);default:return super.getAttribute(N)}}setAttribute(N,w){switch(N){case"stage":return A(this,d)===0&&this.type==="root"&&A(this,n).shift(),M(this,d,w),this;default:return super.setAttribute(N,w)}}isPlain(){return this.constructor===W}insertAt(N,w=this.childNodes.length){return typeof N=="string"&&(N=new c(N)),super.insertAt(N,w),N.type==="root"&&(N.type="plain"),N}normalizeTitle(N,w=0,I=!1){return f.normalizeTitle(N,w,!1,A(this,o),I)}afterBuild(){if(this.type==="root")for(const N of A(this,n))N.afterBuild();return this}parse(N=u,w=!1){for(;A(this,d)<N;)A(this,t).call(this,A(this,d),w);return N&&(A(this,i).call(this),this.afterBuild()),this}};let a=W;d=new WeakMap,o=new WeakMap,n=new WeakMap,t=new WeakMap,s=new WeakMap,i=new WeakMap,r=new WeakSet,ot=function(N){const w=e(4907);this.setText(w(String(this),A(this,o),A(this,n),N))},h=new WeakSet,lt=function(){const N=e(8275),w=this.type==="root"?String(this):`\0${String(this)}`,I=N(w,A(this,o),A(this,n));this.setText(this.type==="root"?I:I.slice(1))},g=new WeakSet,ht=function(){const N=e(5130);this.setText(N(String(this),A(this,o),A(this,n)))},k=new WeakSet,at=function(){const N=e(4624),w=e(2840);this.setText(N(this,A(this,o),A(this,n)));for(const I of A(this,n))if(I instanceof w&&I.type!=="td"){I.normalize();const{childNodes:[,Z]}=I;if(typeof Z=="string"&&Z.includes("\0")){I.removeAt(1);const _=new W(Z,A(this,o),!0,A(this,n));I.insertAt(_,1),_.setAttribute("stage",4)}}},y=new WeakSet,dt=function(){const N=e(2937);this.setText(N(this,A(this,o),A(this,n)))},b=new WeakSet,ut=function(){const N=e(1452);this.setText(N(String(this),A(this,o),A(this,n)))},L=new WeakSet,pt=function(){const N=e(3360),w=String(this).split(`
30
- `);for(let I=0;I<w.length;I++)w[I]=N(w[I],A(this,o),A(this,n));this.setText(w.join(`
31
- `))},z=new WeakSet,ct=function(){const N=e(7513);this.setText(N(String(this),A(this,o),A(this,n)))},R=new WeakSet,gt=function(){const N=e(4737);this.setText(N(String(this),A(this,o),A(this,n)))},V=new WeakSet,ft=function(){if(this.type==="image-parameter")return;const N=e(6622),w=String(this).split(`
32
- `);let I=this.type==="root"||this.type==="ext-inner"&&this.type==="poem"?0:1;for(;I<w.length;I++)w[I]=N(w[I],A(this,o),A(this,n));this.setText(w.join(`
33
- `))},D=new WeakSet,xt=function(){const N=e(3765);this.setText(N(String(this),A(this,o),A(this,n)))},m.exports=a},337:(m,C,e)=>{"use strict";const f=e(3905);class x extends f{constructor(){super(...arguments);S(this,"type","category")}}m.exports=x},7625:(m,C,e)=>{"use strict";const{explode:f}=e(231),{generateForChild:x}=e(8277),c=e(6010),u=e(3905),a=e(1874);class d extends u{constructor(t,s,i,r=c.getConfig(),l=[],h="|"){super(t,void 0,i,r,l,h);S(this,"type","file");this.append(...f("-{","}-","|",s).map(p=>new a(p,r,l)))}lint(t=0){const s=super.lint(t),i=this.getFrameArgs(),r=this.getHorizAlignArgs(),l=this.getVertAlignArgs(),h=this.getArgs("caption"),p=[...h].filter((g,T)=>g.text()||T===h.size-1);if(i.length>1||r.length>1||l.length>1||h.size>1){const g=this.getRootNode().posFromIndex(t);i.length>1&&s.push(...i.map(T=>x(T,g,"\u91CD\u590D\u6216\u51B2\u7A81\u7684\u56FE\u7247\u6846\u67B6\u53C2\u6570"))),r.length>1&&s.push(...r.map(T=>x(T,g,"\u91CD\u590D\u6216\u51B2\u7A81\u7684\u56FE\u7247\u6C34\u5E73\u5BF9\u9F50\u53C2\u6570"))),l.length>1&&s.push(...l.map(T=>x(T,g,"\u91CD\u590D\u6216\u51B2\u7A81\u7684\u56FE\u7247\u5782\u76F4\u5BF9\u9F50\u53C2\u6570"))),p.length>1&&s.push(...p.map(T=>x(T,g,"\u91CD\u590D\u7684\u56FE\u7247\u8BF4\u660E")))}return s}getAllArgs(){return this.childNodes.slice(1)}getArgs(t,s=!0){const i=this.getAllArgs().filter(({name:r})=>t===r);return s?new Set(i):i}getFrameArgs(){return this.getAllArgs().filter(({name:s})=>["manualthumb","frameless","framed","thumbnail"].includes(s))}getHorizAlignArgs(){return this.getAllArgs().filter(({name:s})=>["left","right","center","none"].includes(s))}getVertAlignArgs(){return this.getAllArgs().filter(({name:s})=>["baseline","sub","super","top","text-top","middle","bottom","text-bottom"].includes(s))}}m.exports=d},1031:(m,C,e)=>{var d;"use strict";const{generateForSelf:f}=e(8277),x=e(6010),c=e(8138),u=e(7625);class a extends u{constructor(t,s,i,r=x.getConfig(),l=[]){let h;if(s!==void 0){h=new c(s,r,!0,l),h.type="temp";for(let p=1;p<x.MAX_STAGE;p++)h.getAttribute("parseOnce")();l.splice(l.indexOf(h),1)}super(t,h==null?void 0:h.toString(),i,r,l);S(this,"type","gallery-image");P(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 M(this,d,t||s!==6),this}getPadding(){return 0}lint(t=0){const s=super.lint(t);return A(this,d)&&s.push(f(this,this.getRootNode().posFromIndex(t),"\u65E0\u6548\u7684\u56FE\u5E93\u56FE\u7247")),s}}d=new WeakMap,m.exports=a},3905:(m,C,e)=>{var a,d;"use strict";const f=e(6010),x=e(8138),c=e(9237);class u extends x{constructor(t,s,i,r=f.getConfig(),l=[],h="|"){super(void 0,r,!0,l,{AtomToken:0,Token:1});S(this,"type","link");P(this,a,!0);P(this,d,void 0);if(this.insertAt(new c(t,"link-target",r,l,{"Stage-2":":","!ExtToken":"","!HeadingToken":""})),s!==void 0){const p=new x(s,r,!0,l,{"Stage-5":":",ConverterToken:":"});p.type="link-text",this.insertAt(p.setAttribute("stage",f.MAX_STAGE-1))}M(this,d,h)}afterBuild(){var t;return(t=A(this,d))!=null&&t.includes("\0")&&M(this,d,this.getAttribute("buildFromStr")(A(this,d)).map(String).join("")),this}setAttribute(t,s){return t==="bracket"?(M(this,a,Boolean(s)),this):super.setAttribute(t,s)}toString(t){const s=super.toString(t,A(this,d));return A(this,a)?`[[${s}]]`:s}text(){const t=super.text("|");return A(this,a)?`[[${t}]]`:t}getPadding(){return 2}getGaps(){return A(this,d).length}print(){return super.print(A(this,a)?{pre:"[[",post:"]]",sep:A(this,d)}:{sep:A(this,d)})}}a=new WeakMap,d=new WeakMap,m.exports=u},8962:(m,C,e)=>{"use strict";const{generateForChild:f}=e(8277),x=e(6010),c=e(8138);class u extends c{constructor(o,n,t=x.getConfig(),s=[]){super(o,t,!0,s,{"Stage-1":":","!ExtToken":""});S(this,"type","free-ext-link");n&&(this.type="ext-link-url")}lint(o=0){const n=super.lint(o);let t;for(const s of this.childNodes){const i=String(s);if(s.type!=="text"||!/[,;。:!?()【】]/u.test(i))continue;t||(t=this.getRootNode().posFromIndex(o));const r=f(s,t,"URL\u4E2D\u7684\u5168\u89D2\u6807\u70B9","warning");n.push(...[...i.matchAll(/[,;。:!?()【】]/gu)].map(({index:l})=>{const h=i.slice(0,l).split(`
34
- `),{length:p}=h,{length:g}=h.at(-1),T=r.startLine+p-1,k=p>1?g:r.startCol+g;return{...r,startLine:T,endLine:T,startCol:k,endCol:k+1}}))}return n}}m.exports=u},9389:(m,C,e)=>{"use strict";const f=e(6010),x=e(8889);class c extends x{constructor(d,o=f.getConfig(),n=[]){super(d,/<(option|choicetemplate)(\s[^>]*)?>(.*?)<\/(\1)>/gsu,["option","choicetemplate"],o,n);S(this,"name","choose")}}m.exports=c},9269:(m,C,e)=>{"use strict";const f=e(6010),x=e(8889);class c extends x{constructor(d,o=f.getConfig(),n=[]){super(d,/<(combooption)(\s[^>]*)?>(.*?)<\/(combooption\s*)>/gisu,["combooption"],o,n);S(this,"name","combobox")}}m.exports=c},8889:(m,C,e)=>{"use strict";const{generateForChild:f}=e(8277),x=e(6010),c=e(8138),u=e(7267),a=e(3423);class d extends c{constructor(t,s,i,r=x.getConfig(),l=[]){var p;const h=(p=t==null?void 0:t.replaceAll(s,(g,T,k,$,y)=>{const F=`\0${l.length+1}e\x7F`;return new u(T,k,$,y,r,l),F}))==null?void 0:p.replaceAll(/(^|\0\d+e\x7F)(.*?)(?=$|\0\d+e\x7F)/gsu,(g,T,k)=>k===""?T:(new a(k,r,l),`${T}\0${l.length}c\x7F`));super(h,r,!0,l,{NoincludeToken:":",ExtToken:":"});S(this,"type","ext-inner")}lint(t=0){let s;return[...super.lint(t),...this.childNodes.filter(i=>{if(i.type==="ext")return!1;const r=String(i).trim();return r&&!/^<!--.*-->$/u.test(r)}).map(i=>(s||(s=this.getRootNode().posFromIndex(t)),f(i,s,`<${this.name}>\u5185\u7684\u65E0\u6548\u5185\u5BB9`)))]}}m.exports=d},5937:(m,C,e)=>{"use strict";const f=e(6010),x=e(8889);class c extends x{constructor(d,o=f.getConfig(),n=[]){super(d,/<(ref)(\s[^>]*)?>(.*?)<\/(ref\s*)>/gisu,["ref"],o,n);S(this,"name","references")}}m.exports=c},7033:(m,C,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 x(u){var a=c(u);return e(a)}function c(u){if(!e.o(f,u)){var a=new Error("Cannot find module '"+u+"'");throw a.code="MODULE_NOT_FOUND",a}return f[u]}x.keys=function(){return Object.keys(f)},x.resolve=c,m.exports=x,x.id=7033},5749:(m,C,e)=>{"use strict";const f=e(2308),{generateForSelf:x}=e(8277),c=e(6010),u=e(6935);class a extends f(u){constructor(n,t=!0,s=c.getConfig(),i=[]){super(n,s,i);S(this,"type","comment");S(this,"closed");this.closed=t}getPadding(){return 4}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}lint(n=0){return this.closed?[]:[x(this,this.getRootNode().posFromIndex(n),"\u672A\u95ED\u5408\u7684HTML\u6CE8\u91CA")]}toString(n){return`<!--${String(this.firstChild)}${this.closed?"-->":""}`}}m.exports=a},3434:(m,C,e)=>{"use strict";const f=e(6935);class x extends f{constructor(){super(...arguments);S(this,"type","dd")}}m.exports=x},7815:(m,C,e)=>{"use strict";const f=e(2308),x=e(6935);class c extends f(x){constructor(){super(...arguments);S(this,"type","double-underscore")}getPadding(){return 2}print(){return super.print({pre:"__",post:"__"})}toString(d){return`__${String(this.firstChild)}__`}}m.exports=c},2582:(m,C,e)=>{"use strict";const f=e(6010),x=e(6935);class c extends x{constructor(d,o=f.getConfig(),n=[]){super("-".repeat(d),o,n);S(this,"type","hr")}}m.exports=c},6935:(m,C,e)=>{"use strict";const{generateForSelf:f}=e(8277),x=e(6010),c=e(8138);class u extends c{constructor(o,n=x.getConfig(),t=[]){super(o,n,!0,t);S(this,"type","ext-inner")}lint(o=0){const{type:n,name:t}=this;return n==="ext-inner"&&(t==="templatestyles"||t==="section")&&String(this)?[f(this,this.getRootNode().posFromIndex(o),`<${t}>\u6807\u7B7E\u5185\u4E0D\u5E94\u6709\u4EFB\u4F55\u5185\u5BB9`)]:super.lint(o)}}m.exports=u},962:(m,C,e)=>{"use strict";const f=e(3434);class x extends f{constructor(){super(...arguments);S(this,"type","list")}}m.exports=x},3423:(m,C,e)=>{"use strict";const f=e(2308),x=e(6935);class c extends f(x){constructor(){super(...arguments);S(this,"type","noinclude")}}m.exports=c},6714:(m,C,e)=>{"use strict";const{generateForSelf:f}=e(8277),x=e(6010),c=e(7507),u=e(6935);class a extends u{constructor(n,t=x.getConfig(),s=[]){super("'".repeat(n),t,s);S(this,"type","quote")}lint(n=0){const{previousSibling:t,nextSibling:s}=this,i=`\u5B64\u7ACB\u7684"'"`,r=[];let l;if((t==null?void 0:t.type)==="text"&&t.data.at(-1)==="'"){l=f(this,this.getRootNode().posFromIndex(n),"");const{startLine:h,startCol:p}=l,[,{length:g}]=t.data.match(/(?:^|[^'])('+)$/u);r.push({message:i,startLine:h,startCol:p-g,endLine:h,endCol:p})}if((s==null?void 0:s.type)==="text"&&s.data[0]==="'"){l||(l=f(this,this.getRootNode().posFromIndex(n),""));const{endLine:h,endCol:p}=l,[{length:g}]=s.data.match(/^'+/u);r.push({message:i,startLine:h,startCol:p,endLine:h,endCol:p+g})}return r}}m.exports=a},851:(m,C,e)=>{"use strict";const f=e(6010),x=e(8138);class c extends x{constructor(d,o=f.getConfig(),n=[]){super(d,o,!0,n);S(this,"type","onlyinclude")}toString(d){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=c},9380:(m,C,e)=>{"use strict";const{generateForChild:f}=e(8277),x=e(6010),c=e(8138),u=e(9237);class a extends c{constructor(n,t=x.getConfig(),s=[]){super(void 0,t,!0,s,{AtomToken:":"});S(this,"type","ext-inner");n&&this.append(...n.split(`
35
- `).map(i=>new u(i,"param-line",t,s,{AstText:":"})))}toString(n){return super.toString(n,`
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
36
  `)}text(){return super.text(`
37
37
  `)}getGaps(){return 1}print(){return super.print({sep:`
38
- `})}lint(n=0){let t;return this.childNodes.filter(s=>{const{childNodes:i}=s,r=i.findIndex(({type:h})=>h!=="text"),l=(r>=0?i.slice(0,r).map(String).join(""):String(s)).trim();return l&&!(r>=0?/^[a-z]+\s*(?:=|$)/iu:/^[a-z]+\s*=/iu).test(l)}).map(s=>(t||(t=this.getRootNode().posFromIndex(n)),f(s,t,`${this.name}\u7684\u65E0\u6548\u53C2\u6570`)))}}m.exports=a},9799:(m,C,e)=>{"use strict";const f=e(6010),x=e(8138),c=e(9237);class u extends x{constructor(o,n,t=f.getConfig(),s=[]){super(void 0,t,!0,s);S(this,"type","parameter");const i=new c(typeof o=="number"?void 0:o,"parameter-key",t,s,{"Stage-2":":","!HeadingToken":""}),r=new x(n,t,!0,s);r.type="parameter-value",this.append(i,r.setAttribute("stage",2))}get anon(){return this.firstChild.childNodes.length===0}afterBuild(){if(!this.anon){const o=e(1782),n=this.firstChild.text().trim(),{parentNode:t}=this;this.setAttribute("name",n),t&&t instanceof o&&t.getArgs(n,!1,!1).add(this)}return this}toString(o){return this.anon?this.lastChild.toString(o):super.toString(o,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}print(){return super.print({sep:this.anon?"":"="})}}m.exports=u},8058:(m,C,e)=>{"use strict";const f=e(6010),x=e(8138);class c extends x{constructor(a,d,o="plain",n=f.getConfig(),t=[],s=null){super(a,n,!0,t,s),this.type=o}}m.exports=c},2840:(m,C,e)=>{"use strict";const{generateForChild:f}=e(8277),x=e(3125),c=e(8058);class u extends x{constructor(){super(...arguments);S(this,"type","table")}get closed(){return this.lastChild.type==="table-syntax"}lint(o=0){const n=super.lint(o);return this.closed||n.push(f(this.firstChild,this.getRootNode().posFromIndex(o),"\u672A\u95ED\u5408\u7684\u8868\u683C")),n}close(o=`
39
- |}`,n=!1){const t=this.getAttribute("config"),s=this.getAttribute("accum");super.insertAt(new c(o,null,"table-syntax",t,s))}}m.exports=u},5567:(m,C,e)=>{var a;"use strict";const f=e(6010),x=e(8138),c=e(3125);class u extends c{constructor(n,t,s=f.getConfig(),i=[]){let r=t==null?void 0:t.match(/\||\0\d+!\x7F/u),l=r?t.slice(0,r.index):"";/\[\[|-\{/u.test(l)&&(r=null,l="");super(n,l,s,i);S(this,"type","td");P(this,a,"");r&&([et(this,a)._]=r);const h=new x(t==null?void 0:t.slice((r==null?void 0:r.index)+A(this,a).length),s,!0,i);h.type="td-inner",this.insertAt(h.setAttribute("stage",4))}afterBuild(){return A(this,a).includes("\0")&&M(this,a,this.getAttribute("buildFromStr")(A(this,a)).map(String).join("")),this}toString(n){const{childNodes:[t,s,i]}=this;return`${t.toString()}${s.toString()}${A(this,a)}${i.toString()}`}text(){const{childNodes:[n,t,s]}=this;return`${n.text()}${t.text()}${A(this,a)}${s.text()}`}getGaps(n=0){return n=n<0?n+this.childNodes.length:n,n===1?A(this,a).length:0}print(){const{childNodes:[n,t,s]}=this;return`<span class="wpb-td">${n.print()}${t.print()}${A(this,a)}${s.print()}</span>`}}a=new WeakMap,m.exports=u},3125:(m,C,e)=>{"use strict";const{generateForChild:f}=e(8277),x=e(6010),c=e(8138),u=e(8058),a=e(5037);class d extends c{constructor(t,s="",i=x.getConfig(),r=[],l=null){super(void 0,i,!0,r,{Token:2,SyntaxToken:0,AttributeToken:1,TdToken:"2:"});S(this,"type","tr");this.append(new u(t,l,"table-syntax",i,r,{"Stage-1":":","!ExtToken":"",TranscludeToken:":"}),new a(s,"table-attr","tr",i,r))}lint(t=0){const s=e(1782),i=super.lint(t),r=this.childNodes.find(({type:p})=>p==="table-inter");if(!r)return i;const l=r.childNodes.find(p=>p.text().trim());if(l){if((l==null?void 0:l.type)==="magic-word")try{if(l.getPossibleValues().every(g=>/^\s*(?:!|\{\{\s*![!-]?\s*\}\})/u.test(g.text())))return i}catch(p){}}else return i;const h=f(r,this.getRootNode().posFromIndex(t),"\u5C06\u88AB\u79FB\u51FA\u8868\u683C\u7684\u5185\u5BB9");return h.startLine++,h.startCol=0,i.push(h),i}text(){const t=super.text();return this.type==="tr"&&!t.trim().includes(`
40
- `)?"":t}}m.exports=d},7267:(m,C,e)=>{"use strict";const f=e(6010),x=e(1074),c=e(8138),u=e(5037);class a extends x{constructor(n,t="",s="",i=void 0,r=f.getConfig(),l=[]){t=!t||t.trimStart()!==t?t:` ${t}`;const h=n.toLowerCase(),p=new u(t,"ext-attr",h,r,l),g=structuredClone(r),T=new Set(g.ext);let k;switch(T.delete(h),g.ext=[...T],h){case"tab":T.delete("tabs"),g.ext=[...T];case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":case"inputbox":k=new c(s,g,!0,l);break;case"gallery":{const $=e(1891);k=new $(s,g,l);break}case"pre":{const $=e(428);k=new $(s,g,l);break}case"charinsert":{const $=e(8103);k=new $(s,g,l);break}case"references":case"choose":case"combobox":{const $=e(8889),y=e(7033)(`./${h}`);k=new y(s,g,l);break}case"imagemap":{const $=e(2641);k=new $(s,r,l);break}case"dynamicpagelist":{const $=e(9380);k=new $(s,g,l);break}default:{const $=e(6935);k=new $(s,r)}}k.setAttribute("name",h).type="ext-inner";super(n,p,k,i,r,l);S(this,"type","ext");S(this,"closed",!0)}}m.exports=a},8655:(m,C,e)=>{"use strict";const f=e(2308),{generateForSelf:x}=e(8277),c=e(6010),u=e(1074);class a extends f(u){constructor(n,t="",s=void 0,i=void 0,r=c.getConfig(),l=[]){super(n,t,s!=null?s:"",s===void 0||i!=null?i:"",r,l);S(this,"type","include")}lint(n=0){return this.closed?[]:[x(this,this.getRootNode().posFromIndex(n),"\u672A\u95ED\u5408\u7684\u6807\u7B7E")]}}m.exports=a},1074:(m,C,e)=>{var u,a,d;"use strict";const f=e(6010),x=e(8138);class c extends x{constructor(t,s,i,r,l=f.getConfig(),h=[]){super(void 0,l,!0);P(this,u,void 0);P(this,a,void 0);P(this,d,void 0);M(this,d,[t,r||t]),M(this,u,r===void 0),M(this,a,r!==""),this.append(s,i);let p=h.indexOf(s);p===-1&&(p=h.indexOf(i)),p===-1&&(p=1/0),h.splice(p,0,this)}get closed(){return A(this,a)}toString(t){const{firstChild:s,lastChild:i}=this,[r,l]=A(this,d);return A(this,u)?`<${r}${String(s)}/>`:`<${r}${String(s)}>${String(i)}${A(this,a)?`</${l}>`:""}`}text(){const[t,s]=A(this,d);return A(this,u)?`<${t}${this.firstChild.text()}/>`:`<${t}${super.text(">")}${A(this,a)?`</${s}>`:""}`}getPadding(){return A(this,d)[0].length+1}getGaps(){return 1}print(){const[t,s]=A(this,d);return super.print(A(this,u)?{pre:`&lt;${t}`,post:"/&gt;"}:{pre:`&lt;${t}`,sep:"&gt;",post:A(this,a)?`&lt;/${s}&gt;`:""})}}u=new WeakMap,a=new WeakMap,d=new WeakMap,m.exports=c},1782:(m,C,e)=>{var i,r,mt;"use strict";const{removeComment:f,print:x,text:c}=e(231),{generateForChild:u}=e(8277),a=e(6010),d=e(8138),o=e(9799),n=e(9237),t=e(8058);class s extends d{constructor(g,T,k=a.getConfig(),$=[]){super(void 0,k,!0,$,{AtomToken:0,SyntaxToken:0,ParameterToken:"1:"});P(this,r);S(this,"type","template");S(this,"modifier","");P(this,i,{});const{parserFunction:[y,F,b]}=k;if(g.includes(":")){const[E,...z]=g.split(":");this.setModifier(E)&&(g=z.join(":"))}if(g.includes(":")||T.length===0&&!b.includes(this.modifier.toLowerCase())){const[E,...z]=g.split(":"),j=f(E),R=F.includes(j),B=y[j.toLowerCase()];if(R||B){this.setAttribute("name",B||j.toLowerCase()).type="magic-word";const V=new RegExp(`^\\s*${j}\\s*$`,R?"u":"iu"),X=new t(E,V,"magic-word-name",k,$,{"Stage-1":":","!ExtToken":""});if(this.insertAt(X),z.length>0&&T.unshift([z.join(":")]),this.name==="invoke")for(let D=0;D<2;D++){const Q=T.shift();if(!Q)break;const W=new n(Q.join("="),`invoke-${D?"function":"module"}`,k,$,{"Stage-1":":","!ExtToken":""});this.insertAt(W)}}}if(this.type==="template"){const[E]=f(g).split("#");if(/\0\d+[eh!+-]\x7F|[<>[\]{}]/u.test(E))throw $.pop(),new SyntaxError(`\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A${E}`);const z=new n(g,"template-name",k,$,{"Stage-2":":","!HeadingToken":""});this.insertAt(z)}const v=this.isTemplate();let L=1;for(const E of T)v||(E[0]=E.join("="),E.length=1),E.length===1&&(E.unshift(L),L++),this.insertAt(new o(...E,k,$))}setModifier(g=""){const{parserFunction:[,,T,k]}=this.getAttribute("config"),$=g.trim().toLowerCase(),y=T.includes($),F=k.includes($);return y||F||g===""?(this.setAttribute("modifier",g),Boolean(g)):!1}toString(g){const{childNodes:T,firstChild:k,modifier:$}=this;return`{{${$}${$&&":"}${this.type==="magic-word"?`${String(k)}${T.length>1?":":""}${T.slice(1).map(String).join("|")}`:super.toString(g,"|")}}}`}text(){const{childNodes:g,firstChild:T,modifier:k}=this;return`{{${k}${k&&":"}${this.type==="magic-word"?`${T.text()}${g.length>1?":":""}${c(g.slice(1),"|")}`:super.text("|")}}}`}getPadding(){return this.modifier?this.modifier.length+3:2}getGaps(){return 1}print(){const{childNodes:g,firstChild:T,modifier:k}=this;return`<span class="wpb-${this.type}">{{${k}${k&&":"}${this.type==="magic-word"?`${T.print()}${g.length>1?":":""}${x(g.slice(1),{sep:"|"})}`:x(g,{sep:"|"})}}}</span>`}lint(g=0){const T=super.lint(g);if(!this.isTemplate())return T;const k=this.getDuplicatedArgs();if(k.length>0){const $=this.getRootNode().posFromIndex(g);T.push(...k.flatMap(([,y])=>[...y]).map(y=>u(y,$,"\u91CD\u590D\u53C2\u6570")))}return T}isTemplate(){return this.type==="template"||this.type==="magic-word"&&this.name==="invoke"}insertAt(g,T=this.childNodes.length){return super.insertAt(g,T),g.anon?U(this,r,mt).call(this,g):g.name&&this.getArgs(g.name,!1,!1).add(g),g}getAllArgs(){return this.childNodes.filter(g=>g instanceof o)}getAnonArgs(){return this.getAllArgs().filter(({anon:g})=>g)}getArgs(g,T,k=!0){const $=String(g).trim();let y;return Object.prototype.hasOwnProperty.call(A(this,i),$)?y=A(this,i)[$]:(y=new Set(this.getAllArgs().filter(({name:F})=>$===F)),A(this,i)[$]=y),y}getDuplicatedArgs(){return this.isTemplate()?Object.entries(A(this,i)).filter(([,{size:g}])=>g>1).map(([g,T])=>[g,new Set(T)]):[]}getPossibleValues(){const{type:g,name:T,childNodes:k,constructor:{name:$}}=this;if(g==="template")throw new Error(`${$}.getPossibleValues \u65B9\u6CD5\u4EC5\u4F9B\u7279\u5B9A\u9B54\u672F\u5B57\u4F7F\u7528\uFF01`);let y;switch(T){case"if":case"ifexist":case"ifexpr":case"iferror":y=2;break;case"ifeq":y=3;break;default:throw new Error(`${$}.getPossibleValues \u65B9\u6CD5\u4EC5\u4F9B\u7279\u5B9A\u9B54\u672F\u5B57\u4F7F\u7528\uFF01`)}const F=k.slice(y,y+2).map(({childNodes:[,b]})=>b);for(let b=0;b<F.length;){const{length:v,0:L}=F[b].childNodes.filter(E=>E.text().trim());if(v===0)F.splice(b,1);else if(v>1||L.type!=="magic-word")b++;else try{const E=L.getPossibleValues();F.splice(b,1,...E),b+=E.length}catch(E){b++}}return F}}i=new WeakMap,r=new WeakSet,mt=function(g){const T=this.getAnonArgs(),k=T.indexOf(g);for(let $=k;$<T.length;$++){const y=T[$],{name:F}=y,b=String($+1);F!==b&&this.getArgs(b,!1,!1).add(y.setAttribute("name",b))}},m.exports=s},8277:(m,C,e)=>{"use strict";const f=e(8138),x=(u,a,d,o="error")=>{const{style:{top:n,left:t,height:s,width:i}}=u,{top:r,left:l}=a,h=r+n,p=h+s-1,g=n?t:l+t,T=s>1?i:g+i;return{message:d,severity:o,startLine:h,endLine:p,startCol:g,endCol:T}},c=(u,a,d,o="error")=>({message:d,severity:o,startLine:a.top,endLine:a.top+u.offsetHeight-1,startCol:a.left,endCol:u.offsetHeight>1?u.offsetWidth:a.left+u.offsetWidth});m.exports={generateForChild:x,generateForSelf:c}},231:(m,C,e)=>{"use strict";const f='(?:\\[[\\da-f:.]+\\]|[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD])(?:[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD]|\\0\\d+c\\x7F)*',x=o=>o.replaceAll(/\0\d+c\x7F/gu,""),c=(o,n={})=>{const t=e(7507),s=e(9205),{pre:i="",post:r="",sep:l=""}=n,h={"&":"amp","<":"lt",">":"gt"};return`${i}${o.map(p=>p instanceof s?p.print():String(p).replaceAll(/[&<>]/gu,g=>`&${h[g]};`)).join(l)}${r}`},u=o=>o.replaceAll(/[\\{}()|.?*+^$[\]]/gu,"\\$&"),a=(o,n,t,s)=>{if(s===void 0)return[];const i=new RegExp(`${[o,n,t].map(u).join("|")}`,"gu"),r=[];let l=i.exec(s),h=0,p=0;for(;l;){const{0:g,index:T}=l;g!==t?h+=g===o?1:-1:h===0&&(r.push(s.slice(p,T)),{lastIndex:p}=i),l=i.exec(s)}return r.push(s.slice(p)),r},d=(o,n="")=>{const t=e(3853);return o.map(s=>typeof s=="string"?s:s.text()).join(n)};m.exports={extUrlChar:f,removeComment:x,print:c,escapeRegExp:u,explode:a,text: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":[{"#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":{"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"]}')}},O={};function H(m){var C=O[m];if(C!==void 0)return C.exports;var e=O[m]={exports:{}};return G[m](e,e.exports,H),e.exports}H.o=(m,C)=>Object.prototype.hasOwnProperty.call(m,C);var J=H(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.5-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,7 +22,7 @@
22
22
  "url": "git+https://github.com/bhsd-harry/wikiparser-node.git"
23
23
  },
24
24
  "scripts": {
25
- "test": "rm bundle/*.js && webpack && eslint .",
25
+ "test": "rm bundle/*.js; webpack && eslint .",
26
26
  "real": "node test/real.js",
27
27
  "single": "node test/single.js"
28
28
  },