wikiparser-node 1.0.2-b → 1.0.3-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.
package/README.en.md ADDED
@@ -0,0 +1,57 @@
1
+ [![npm version](https://badge.fury.io/js/wikiparser-node.svg)](https://www.npmjs.com/package/wikiparser-node)
2
+ [![CodeQL](https://github.com/bhsd-harry/wikiparser-node/actions/workflows/codeql.yml/badge.svg)](https://github.com/bhsd-harry/wikiparser-node/actions/workflows/codeql.yml)
3
+ [![CI](https://github.com/bhsd-harry/wikiparser-node/actions/workflows/node.js.yml/badge.svg)](https://github.com/bhsd-harry/wikiparser-node/actions/workflows/node.js.yml)
4
+
5
+ # Other Languages
6
+
7
+ - [简体中文](./README.md)
8
+
9
+ # Introduction
10
+
11
+ wikiparser-node is an offline [Wikitext](https://www.mediawiki.org/wiki/Wikitext) parser developed by Bhsd for the [Node.js](https://nodejs.org/) environment. It can parse almost all wiki syntax and generate an [Abstract Syntax Tree (AST)](https://en.wikipedia.org/wiki/Abstract_syntax_tree). It also allows for easy querying and modification of the AST, and returns the modified wikitext.
12
+
13
+ # Other Versions
14
+
15
+ ## Mini (also known as [wikilint](https://www.npmjs.com/package/wikilint))
16
+
17
+ This version provides a [CLI](https://en.wikipedia.org/wiki/Command-line_interface), but only retains the parsing functionality and linting functionality. The parsed AST cannot be modified. It is used in the [eslint-plugin-wikitext](https://www.npmjs.com/package/eslint-plugin-wikitext) plugin.
18
+
19
+ ## Browser
20
+
21
+ A browser-compatible version, which can be used for code highlighting or as a linting plugin in conjunction with the [CodeMirror5](https://codemirror.net/5/) editor. ([Usage example](https://bhsd-harry.github.io/wikiparser-node))
22
+
23
+ # Installation
24
+
25
+ ## Node.js
26
+
27
+ Please install the corresponding version as needed (`wikiparser-node` or `wikilint`), for example:
28
+
29
+ ```sh
30
+ npm i wikiparser-node
31
+ ```
32
+
33
+ or
34
+
35
+ ```sh
36
+ npm i wikilint
37
+ ```
38
+
39
+ ## Browser
40
+
41
+ You can download the code via CDN, for example:
42
+
43
+ ```html
44
+ <script src="//cdn.jsdelivr.net/npm/wikiparser-node@browser/bundle/bundle.min.js"></script>
45
+ ```
46
+
47
+ or
48
+
49
+ ```html
50
+ <script src="//unpkg.com/wikiparser-node@browser/bundle/bundle.min.js"></script>
51
+ ```
52
+
53
+ For more browser extensions, please refer to the corresponding [documentation](https://github.com/bhsd-harry/wikiparser-node/wiki/Browser.en).
54
+
55
+ # Usage
56
+
57
+ Please refer to the [Wiki](https://github.com/bhsd-harry/wikiparser-node/wiki/Home.en).
package/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
  [![CodeQL](https://github.com/bhsd-harry/wikiparser-node/actions/workflows/codeql.yml/badge.svg)](https://github.com/bhsd-harry/wikiparser-node/actions/workflows/codeql.yml)
3
3
  [![CI](https://github.com/bhsd-harry/wikiparser-node/actions/workflows/node.js.yml/badge.svg)](https://github.com/bhsd-harry/wikiparser-node/actions/workflows/node.js.yml)
4
4
 
5
+ # Other Languages
6
+
7
+ - [English](./README.en.md)
8
+
5
9
  # 简介
6
10
 
7
11
  wikiparser-node 是一款由 Bhsd 开发的基于 [Node.js](https://nodejs.org/) 环境的离线[维基文本](https://www.mediawiki.org/wiki/Wikitext)语法解析器,可以解析几乎全部的维基语法并生成[语法树](https://en.wikipedia.org/wiki/Abstract_syntax_tree),还可以很方便地对语法树进行查询和修改,最后返回修改后的维基文本。
@@ -46,7 +50,7 @@ npm i wikilint
46
50
  <script src="//unpkg.com/wikiparser-node@browser/bundle/bundle.min.js"></script>
47
51
  ```
48
52
 
49
- 更多浏览器端可用的插件请查阅对应文档。
53
+ 更多浏览器端可用的插件请查阅对应[文档](https://github.com/bhsd-harry/wikiparser-node/wiki/Browser)。
50
54
 
51
55
  # 使用方法
52
56
 
@@ -1,37 +1,36 @@
1
- (()=>{(()=>{"use strict";var Vt={891:(Y,M,t)=>{t.d(M,{default:()=>b});const $={minConfig:t(166),MAX_STAGE:11,getConfig(){return{...this.minConfig,...this.config,excludes:[]}},msg(S,P=""){var x,o;return((o=(x=this.i18n)==null?void 0:x[S])!=null?o:S).replace("$1",P)},normalizeTitle(S,P=0,x=!1,o=$.getConfig(),n=!1,r=!1,d=!1){const{Title:i}=t(599);if(n)return new i(S,P,o,r,d);const{Token:l}=t(541),s=this.run(()=>new l(S,o).parseOnce(0,x).parseOnce());return new i(String(s),P,o,r,d)},parse(S,P,x=$.MAX_STAGE,o=$.getConfig()){const{Token:n}=t(541);let r;return this.run(()=>{r=new n(S.replace(/[\0\x7F]/gu,""),o);try{r.parse(x,P)}catch(d){}}),r},run(S){return S()}},I={},R=new Set(["MAX_STAGE","minConfig"]),W=new Set(["config","normalizeTitle","parse"]);for(const S in $)R.has(S)?I[S]={enumerable:!1,writable:!1}:W.has(S)||(I[S]={enumerable:!1});Object.defineProperties($,I),typeof self=="object"?Object.assign(self,{Parser:$}):typeof globalThis=="object"&&Object.assign(globalThis,{Parser:$});const b=$},599:(Y,M,t)=>{t.r(M),t.d(M,{Title:()=>S});var $=t(467),I=t(891),R=Object.defineProperty,W=(P,x,o)=>x in P?R(P,x,{enumerable:!0,configurable:!0,writable:!0,value:o}):P[x]=o,b=(P,x,o)=>(W(P,typeof x!="symbol"?x+"":x,o),o);class S{constructor(x,o=0,n=I.default.getConfig(),r=!1,d=!1){b(this,"valid"),b(this,"ns"),b(this,"fragment"),b(this,"encoded",!1);var i;const{namespaces:l,nsid:s}=n;let a=(i=l[o])!=null?i:"";if(x=(0,$.m9)(x),r&&x.includes("%"))try{const m=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(x);x=decodeURIComponent(x),this.encoded=m}catch(m){}x=x.replace(/_/gu," ").trim(),x.startsWith(":")&&(a="",x=x.slice(1).trim());const c=x.split(":");if(c.length>1){const m=s[c[0].trim().toLowerCase()],F=m===void 0?void 0:l[m];F!==void 0&&(a=F,x=c.slice(1).join(":").trim())}this.ns=s[a.toLowerCase()];const v=x.indexOf("#");let _;v!==-1&&(_=x.slice(v+1).trim(),x=x.slice(0,v).trim()),this.valid=!!(x||d&&_!==void 0)&&!/\0\d+[eh!+-]\x7F|[<>[\]{}|]|%[\da-f]{2}/iu.test(x),this.fragment=_}}},959:(Y,M,t)=>{t.d(M,{a:()=>W});var $=Object.defineProperty,I=(b,S,P)=>S in b?$(b,S,{enumerable:!0,configurable:!0,writable:!0,value:P}):b[S]=P,R=(b,S,P)=>(I(b,typeof S!="symbol"?S+"":S,P),P);const W=b=>{class S extends b{text(){return""}}return R(S,"hidden",!0),S}},313:(Y,M,t)=>{t.r(M),t.d(M,{parseBraces:()=>C});var $=t(467),I=t(891),R=t(485),W=t(169),b=t(541),S=Object.defineProperty,P=(f,e,T)=>e in f?S(f,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):f[e]=T,x=(f,e,T)=>(P(f,typeof e!="symbol"?e+"":e,T),T);class o extends b.Token{constructor(e,T,p=I.default.getConfig(),D=[]){super(void 0,p,D),x(this,"type","parameter");const B=new b.Token(typeof e=="number"?void 0:e,p,D,{}),U=new b.Token(T,p,D);B.type="parameter-key",U.type="parameter-value",U.setAttribute("stage",2),this.append(B,U)}get anon(){return this.firstChild.length===0}afterBuild(){const e=new Set(["comment","noinclude","include"]);if(!this.anon){const T=this.firstChild.toString(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),{parentNode:p}=this;this.setAttribute("name",T),p&&p.getArgs(T,!1,!1).add(this)}}toString(e){return this.anon?this.lastChild.toString(e):super.toString(e,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(e){return this.anon||e===1?0:1}lint(e=this.getAbsoluteIndex()){var T;const p=super.lint(e),{firstChild:D}=this,B=(T=new RegExp(`https?://${$._X}${$.Qk}$`,"iu").exec(D.toString(new Set(["comment","noinclude","include"]))))==null?void 0:T[0];if(B&&new URL(B).search){const U=(0,W.D)(D,{start:e},"unescaped query string in an anonymous parameter");p.push({...U,startIndex:U.endIndex,endIndex:U.endIndex+1,startLine:U.endLine,startCol:U.endCol,endCol:U.endCol+1})}return p}print(){return super.print({sep:this.anon?"":"="})}}var n=t(34),r=t(669),d=Object.defineProperty,i=(f,e,T)=>e in f?d(f,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):f[e]=T,l=(f,e,T)=>(i(f,typeof e!="symbol"?e+"":e,T),T),s=(f,e,T)=>{if(!e.has(f))throw TypeError("Cannot "+T)},a=(f,e,T)=>(s(f,e,"read from private field"),T?T.call(f):e.get(f)),c=(f,e,T)=>{if(e.has(f))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(f):e.set(f,T)},v=(f,e,T,p)=>(s(f,e,"write to private field"),p?p.call(f,T):e.set(f,T),T),_=(f,e,T)=>(s(f,e,"access private method"),T),m,F,K,G,Q,L;class w extends b.Token{constructor(e,T,p=I.default.getConfig(),D=[]){var B,U;super(void 0,p,D,{}),c(this,Q),l(this,"type","template"),l(this,"modifier",""),c(this,m,void 0),c(this,F,!0),c(this,K,!1),c(this,G,new Map);const{parserFunction:[z,V]}=p,X=(B=/^(?:\s|\0\d+c\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:B[0];if(X)this.setAttribute("modifier",X),e=e.slice(X.length);else if(e.includes(":")){const[et,...tt]=e.split(":"),[nt]=/^(?:\s|\0\d+c\x7F)*/u.exec((U=tt[0])!=null?U:"");this.setModifier(`${et}:${nt}`)&&(e=tt.join(":").slice(nt.length))}if(e.includes(":")||T.length===0&&!a(this,K)){const[et,...tt]=e.split(":"),nt=(0,$.PN)(et),k=nt.trim(),it=V.includes(k),q=z[k.toLowerCase()];if(!(tt.length>0&&/\s$/u.test(nt))&&(it||q)){this.setAttribute("name",q!=null?q:k.toLowerCase()),this.type="magic-word";const st=new RegExp(`^\\s*${k}\\s*$`,it?"u":"iu"),lt=new r.SyntaxToken(et,st,"magic-word-name",p,D,{});if(super.insertAt(lt),tt.length>0&&T.unshift([tt.join(":")]),this.name==="invoke")for(let dt=0;dt<2;dt++){const ft=T.shift();if(!ft)break;const rt=new n.D(ft.join("="),`invoke-${dt?"function":"module"}`,p,D);super.insertAt(rt)}}}if(this.type==="template"){const et=(0,$.PN)((0,$.m9)(e)).split("#")[0].trim();if(!et||/\0\d+[eh!+-]\x7F|[<>[\]{}\n]|%[\da-f]{2}/u.test(et))throw D.pop(),new SyntaxError(`\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A${(0,$.jq)(et)}`);const tt=new n.D(e,"template-name",p,D,{});super.insertAt(tt)}const J=this.isTemplate();let j=1;for(let et=0;et<T.length;et++){const tt=T[et];!J&&!(this.name==="switch"&&et>0)&&(tt[0]=tt.join("="),tt.length=1),tt.length===1&&(tt.unshift(j),j++),this.insertAt(new o(...tt,p,D))}}setModifier(e){const{parserFunction:[,,T,p]}=this.getAttribute("config"),D=(0,$.PN)(e).trim();if(e&&!D.endsWith(":"))return!1;const B=D.slice(0,-1).toLowerCase(),U=T.includes(B),z=p.includes(B);return a(this,K)&&U||!a(this,K)&&(z||e==="")||this.length>1&&(U||z||e==="")?(this.setAttribute("modifier",e),v(this,K,U),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}afterBuild(){if(this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,"string")),this.isTemplate()){const e=this.type==="template",T=this.normalizeTitle(this.childNodes[e?0:1].text(),e?10:828);v(this,m,T.fragment),v(this,F,T.valid)}}toString(e){return`{{${this.modifier}${this.type==="magic-word"?`${this.firstChild.toString(e)}${this.length===1?"":":"}${this.childNodes.slice(1).map(T=>T.toString(e)).join("|")}`:super.toString(e,"|")}}}`}text(){const{childNodes:e,length:T,firstChild:p,modifier:D,type:B,name:U}=this;return B==="magic-word"&&U==="vardefine"?"":`{{${D}${B==="magic-word"?`${p.text()}${T===1?"":":"}${(0,$.fL)(e.slice(1),"|")}`:super.text("|")}}}`}getPadding(){return this.modifier.length+2}getGaps(e){return e<this.length-1?1:0}lint(e=this.getAbsoluteIndex()){const T=super.lint(e),{type:p,childNodes:D}=this;let B;if(this.isTemplate())a(this,m)!==void 0&&(B={start:e,...this.getRootNode().posFromIndex(e)},T.push((0,W.D)(D[p==="template"?0:1],B,"useless fragment")));else return T;a(this,F)||(B={start:e,...this.getRootNode().posFromIndex(e)},T.push((0,W.D)(D[1],B,"illegal module name")));const U=this.getDuplicatedArgs();return U.length>0&&(B!=null||(B={start:e,...this.getRootNode().posFromIndex(e)}),T.push(...U.flatMap(([,z])=>z).map(z=>(0,W.D)(z,B,"duplicated parameter")))),T}insertAt(e,T=this.length){return super.insertAt(e,T),e.anon?_(this,Q,L).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(e=>e.type==="parameter")}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,T=!1,p=!0){const D=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");let B;return a(this,G).has(D)?B=a(this,G).get(D):(B=new Set(this.getAllArgs().filter(({name:U})=>D===U)),a(this,G).set(D,B)),B}getDuplicatedArgs(){return this.isTemplate()?[...a(this,G)].filter(([,{size:e}])=>e>1).map(([e,T])=>[e,[...T]]):[]}getPossibleValues(){const{type:e,name:T,childNodes:p,constructor:{name:D}}=this;if(e==="template")throw new Error(`${D}.getPossibleValues \u65B9\u6CD5\u4EC5\u4F9B\u7279\u5B9A\u9B54\u672F\u5B57\u4F7F\u7528\uFF01`);let B;switch(T){case"if":case"ifexist":case"ifexpr":case"iferror":B=2;break;case"ifeq":B=3;break;default:throw new Error(`${D}.getPossibleValues \u65B9\u6CD5\u4EC5\u4F9B\u7279\u5B9A\u9B54\u672F\u5B57\u4F7F\u7528\uFF01`)}const U=p.slice(B,B+2).map(({childNodes:[,z]})=>z);for(let z=0;z<U.length;){const{length:V,0:X}=U[z].childNodes.filter(J=>J.text().trim());if(V===0)U.splice(z,1);else if(V>1||X.type!=="magic-word")z++;else try{const J=X.getPossibleValues();U.splice(z,1,...J),z+=J.length}catch(J){z++}}return U}print(){const{childNodes:e,length:T,firstChild:p,modifier:D,type:B}=this;return`<span class="wpb-${B}">{{${D}${B==="magic-word"?`${p.print()}${T===1?"":":"}${(0,$.S0)(e.slice(1),{sep:"|"})}`:(0,$.S0)(e,{sep:"|"})}}}</span>`}}m=new WeakMap,F=new WeakMap,K=new WeakMap,G=new WeakMap,Q=new WeakSet,L=function(f){const e=this.getAnonArgs(),T=typeof f!="number";for(let p=T?e.indexOf(f):f-1;p<e.length;p++){const D=e[p],{name:B}=D,U=String(p+1);B!==U&&(D.setAttribute("name",U),this.getArgs(U,!1,!1).add(D))}};var E=t(465),O=Object.defineProperty,y=(f,e,T)=>e in f?O(f,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):f[e]=T,g=(f,e,T)=>(y(f,typeof e!="symbol"?e+"":e,T),T);class u extends b.Token{constructor(e,T=I.default.getConfig(),p=[]){super(void 0,T,p,{}),g(this,"type","arg");for(let D=0;D<e.length;D++)if(D===0){const B=new n.D(e[D],"arg-name",T,p,{});super.insertAt(B)}else if(D>1){const B=new E.R(e[D],T,p,{});super.insertAt(B)}else{const B=new b.Token(e[D],T,p);B.type="arg-default",B.setAttribute("stage",2),super.insertAt(B)}}get default(){var e,T;return(T=(e=this.childNodes[1])==null?void 0:e.text())!=null?T:!1}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${(0,$.fL)(this.childNodes.slice(0,2),"|")}}}}`}getPadding(){return 3}getGaps(e){return e<this.length-1?1:0}lint(e=this.getAbsoluteIndex()){if(!this.getAttribute("include"))return[(0,W.Y)(this,{start:e},"unexpected template argument")];const{childNodes:[T,p,...D]}=this,B=T.lint(e+3);if(p&&B.push(...p.lint(e+4+String(T).length)),D.length>0){const U={start:e,...this.getRootNode().posFromIndex(e)};B.push(...D.map(z=>{const V=(0,W.D)(z,U,"invisible content inside triple braces"),{startIndex:X,startCol:J}=V;return{...V,startIndex:X-1,startCol:J-1}}))}return B}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}}const C=(f,e=I.default.getConfig(),T=[])=>{var p,D,B,U,z,V;const X=`${(p=e.excludes)!=null&&p.includes("heading")?"":"^(\0\\d+c\x7F)*={1,6}|"}\\[\\[|\\{{2,}|-\\{(?!\\{)`,{parserFunction:[,,,J]}=e,j=[],et={"=":`
2
- `,"{":"\\}{2,}|\\|","-":"\\}-","[":"\\]\\]"},tt=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"]]);let nt=new RegExp(X,"gmu"),k=nt.exec(f),it=f.includes("}}"),q;for(;k||q!==void 0&&q<=f.length&&((B=(D=j[j.length-1])==null?void 0:D[0])!=null&&B.startsWith("="));){if(k!=null&&k[1]){const[,{length:ht}]=k;k[0]=k[0].slice(ht),k.index+=ht}const{0:st,index:lt}=k!=null?k:{0:`
3
- `,index:f.length},dt=(U=j.pop())!=null?U:{},{0:ft,index:rt,parts:pt,findEqual:At,pos:Ct}=dt,$t=st==="="&&At;if(st==="]]"||st==="}-")q=lt+2;else if(st===`
4
- `){q=lt+1;const{pos:ht,findEqual:ct}=(z=j[j.length-1])!=null?z:{};if(ht===void 0||ct||(0,$.PN)(f.slice(ht,rt))!==""){const gt=/^(={1,6})(.+)\1((?:\s|\0\d+c\x7F)*)$/u.exec(f.slice(rt,lt));gt&&(f=`${f.slice(0,rt)}\0${T.length}h\x7F${f.slice(lt)}`,q=rt+4+String(T.length).length,new R.D(gt[1].length,gt.slice(2),e,T))}}else if(st==="|"||$t)q=lt+1,pt[pt.length-1].push(f.slice(Ct,lt)),st==="|"&&pt.push([]),dt.pos=q,dt.findEqual=st==="|",j.push(dt);else if(st.startsWith("}}")){const ht=st.slice(0,Math.min(ft.length,3)),ct=ft.length-ht.length,{length:gt}=T;q=lt+ht.length,pt[pt.length-1].push(f.slice(Ct,lt));let St=!1,vt="t";if(ht.length===3){const at=pt.map(_t=>_t.join("=")),Et=at.length>1&&(0,$.PN)(at[1]).trim();new u(at,e,T),Et&&Et.endsWith(":")&&J.includes(Et.slice(0,-1).toLowerCase())&&(vt="s")}else try{new w(pt[0][0],pt.slice(1),e,T);const at=(0,$.PN)(pt[0][0]).trim();tt.has(at)?vt=tt.get(at):/^(?:filepath|(?:full|canonical)urle?):.|^server$/iu.test(at)?vt="m":/^#vardefine:./iu.test(at)&&(vt="c")}catch(at){if(at instanceof SyntaxError&&at.message.startsWith("\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A"))q=rt+ft.length,St=!0;else throw at}St||(f=`${f.slice(0,rt+ct)}\0${gt}${vt}\x7F${f.slice(q)}`,q=rt+ct+3+String(gt).length,ct>1?j.push({0:ft.slice(0,ct),index:rt,pos:rt+ct,parts:[[]]}):ct===1&&f[rt-1]==="-"&&j.push({0:"-{",index:rt-1,pos:rt+1,parts:[[]]}))}else q=lt+st.length,st.startsWith("{")&&(k.pos=q,k.parts=[[]]),j.push(..."0"in dt?[dt]:[],k);it&&(it=f.slice(q).includes("}}"));let xt=j[j.length-1];!it&&((V=xt==null?void 0:xt[0])!=null&&V.startsWith("{"))&&(j.pop(),xt=j[j.length-1]),nt=new RegExp(X+(xt?`|${et[xt[0][0]]}${xt.findEqual?"|=":""}`:""),"gmu"),nt.lastIndex=q,k=nt.exec(f)}return f}},551:(Y,M,t)=>{t.r(M),t.d(M,{parseCommentAndExt:()=>a});var $=t(891),I=t(541),R=Object.defineProperty,W=(c,v,_)=>v in c?R(c,v,{enumerable:!0,configurable:!0,writable:!0,value:_}):c[v]=_,b=(c,v,_)=>(W(c,typeof v!="symbol"?v+"":v,_),_);class S extends I.Token{constructor(){super(...arguments),b(this,"type","onlyinclude")}toString(v){return`<onlyinclude>${super.toString()}</onlyinclude>`}getPadding(){return 13}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}}var P=t(826),x=t(959),o=t(415),n=Object.defineProperty,r=(c,v,_)=>v in c?n(c,v,{enumerable:!0,configurable:!0,writable:!0,value:_}):c[v]=_,d=(c,v,_)=>(r(c,typeof v!="symbol"?v+"":v,_),_);class i extends(0,x.a)(o.m){constructor(v,_="",m,F,K=$.default.getConfig(),G=[]){super(v,_,m!=null?m:"",m===void 0||F!=null?F:"",K,G),d(this,"type","include")}}var l=t(895),s=t(976);const a=(c,v=$.default.getConfig(),_=[],m=!1)=>{const F="<onlyinclude>",K="</onlyinclude>",{length:G}=F;if(m){let O=c.indexOf(F),y=c.indexOf(K,O+G);if(O!==-1&&y!==-1){let g="";for(;O!==-1&&y!==-1;){const u=`\0${_.length}e\x7F`;new S(c.slice(O+G,y),v,_),O>0?(new P.O(c.slice(0,O),v,_),g+=`\0${_.length-1}c\x7F${u}`):g+=u,c=c.slice(y+G+1),O=c.indexOf(F),y=c.indexOf(K,O+G)}return`${g}${c}`}}const Q=v.ext.join("|"),L=m?"includeonly":"(?:no|only)include",w=m?"noinclude":"includeonly",E=new RegExp(`<!--.*?(?:-->|$)|<${L}(?:\\s[^>]*?)?>|</${L}\\s*>|<(${Q})(\\s[^>]*?)?(?:/>|>(.*?)</(\\1\\s*)>)|<(${w})(\\s[^>]*?)?(?:/>|>(.*?)(?:</(\\5\\s*)>|$))`,"gisu");return c.replace(E,(O,y,g,u,C,f,e,T,p)=>{const D=`\0${_.length}${y?"e":"c"}\x7F`;if(y)new l.$(y,g,u,C,v,_);else if(O.startsWith("<!--")){const B=O.endsWith("-->");new s.T(O.slice(4,B?-3:void 0),B,v,_)}else f?new i(f,e,T,p,v,_):new P.O(O,v,_);return D})}},295:(Y,M,t)=>{t.r(M),t.d(M,{parseConverter:()=>Q});var $=t(891),I=t(467),R=t(541),W=t(169),b=t(34),S=Object.defineProperty,P=(L,w,E)=>w in L?S(L,w,{enumerable:!0,configurable:!0,writable:!0,value:E}):L[w]=E,x=(L,w,E)=>(P(L,typeof w!="symbol"?w+"":w,E),E),o=(L,w,E)=>{if(!w.has(L))throw TypeError("Cannot "+E)},n=(L,w,E)=>(o(L,w,"read from private field"),E?E.call(L):w.get(L)),r=(L,w,E)=>{if(w.has(L))throw TypeError("Cannot add the same private member more than once");w instanceof WeakSet?w.add(L):w.set(L,E)},d=(L,w,E,O)=>(o(L,w,"write to private field"),O?O.call(L,E):w.set(L,E),E),i;const l=new Set(["A","T","R","D","-","H","N"]);class s extends R.Token{constructor(w,E=$.default.getConfig(),O=[]){super(void 0,E,O,{}),x(this,"type","converter-flags"),r(this,i,void 0),this.append(...w.map(y=>new b.D(y,"converter-flag",E,O)))}afterBuild(){d(this,i,this.childNodes.map(w=>w.text().trim()))}toString(w){return super.toString(w,";")}text(){return super.text(";")}getGaps(w){return w<this.length-1?1:0}getUnknownFlags(){return new Set(n(this,i).filter(w=>/\{{3}[^{}]+\}{3}/u.test(w)))}getVariantFlags(){const w=new Set(this.getAttribute("config").variants);return new Set(n(this,i).filter(E=>w.has(E)))}lint(w=this.getAbsoluteIndex()){const E=this.getVariantFlags(),O=this.getUnknownFlags(),y=new Set(n(this,i).filter(p=>l.has(p))),{length:g}=n(this,i).filter(p=>!p),u=n(this,i).length-O.size-g,C=super.lint(w);if(E.size===u||y.size===u)return C;const f={start:w,...this.getRootNode().posFromIndex(w)},{childNodes:e,length:T}=this;for(let p=0;p<T;p++){const D=e[p],B=D.text().trim();if(B&&!E.has(B)&&!O.has(B)&&(E.size>0||!y.has(B))){const U=(0,W.D)(D,f,"invalid conversion flag");C.push(U)}}return C}print(){return super.print({sep:";"})}}i=new WeakMap;var a=Object.defineProperty,c=(L,w,E)=>w in L?a(L,w,{enumerable:!0,configurable:!0,writable:!0,value:E}):L[w]=E,v=(L,w,E)=>(c(L,typeof w!="symbol"?w+"":w,E),E);class _ extends R.Token{constructor(w,E=!0,O=$.default.getConfig(),y=[]){if(super(void 0,O,y),v(this,"type","converter-rule"),E){const g=w.indexOf(":"),u=w.slice(0,g).indexOf("=>"),C=u===-1?w.slice(0,g):w.slice(u+2,g);O.variants.includes(C.trim())?(super.insertAt(new b.D(C,"converter-rule-variant",O,y)),super.insertAt(new b.D(w.slice(g+1),"converter-rule-to",O,y)),u!==-1&&super.insertAt(new b.D(w.slice(0,u),"converter-rule-from",O,y),0)):super.insertAt(new b.D(w,"converter-rule-noconvert",O,y))}else super.insertAt(new b.D(w,"converter-rule-noconvert",O,y))}toString(w){const{childNodes:E}=this;if(E.length===3){const[O,y,g]=E;return`${O.toString(w)}=>${y.toString(w)}:${g.toString(w)}`}return super.toString(w,":")}text(){const{childNodes:w}=this;if(w.length===3){const[E,O,y]=w;return`${E.text()}=>${O.text()}:${y.text()}`}return super.text(":")}getGaps(w){return w===0&&this.length===3?2:1}print(){const{childNodes:w}=this;if(w.length===3){const[E,O,y]=w;return`<span class="wpb-converter-rule">${E.print()}=>${O.print()}:${y.print()}</span>`}return super.print({sep:":"})}}var m=Object.defineProperty,F=(L,w,E)=>w in L?m(L,w,{enumerable:!0,configurable:!0,writable:!0,value:E}):L[w]=E,K=(L,w,E)=>(F(L,typeof w!="symbol"?w+"":w,E),E);class G extends R.Token{constructor(w,E,O=$.default.getConfig(),y=[]){super(void 0,O,y),K(this,"type","converter"),this.append(new s(w,O,y));const[g]=E,u=g.includes(":"),C=new _(g,u,O,y);u&&C.length===1?this.insertAt(new _(E.join(";"),!1,O,y)):this.append(C,...E.slice(1).map(f=>new _(f,!0,O,y)))}toString(w){const{childNodes:[E,...O]}=this;return`-{${E.toString()}${E.length>0?"|":""}${O.map(y=>y.toString()).join(";")}}-`}text(){const{childNodes:[w,...E]}=this;return`-{${w.text()}|${(0,I.fL)(E,";")}}-`}getPadding(){return 2}getGaps(w){return w||this.firstChild.length>0?1:0}print(){const{childNodes:[w,...E]}=this;return`<span class="wpb-converter">-{${w.print()}${w.length>0?"|":""}${(0,I.S0)(E,{sep:";"})}}-</span>`}}const Q=(L,w=$.default.getConfig(),E=[])=>{const O=/-\{/gu,y=/-\{|\}-/gu,g=[];let u=O,C=u.exec(L);for(;C;){const{0:f,index:e}=C;if(f==="}-"){const T=g.pop(),{length:p}=E,D=L.slice(T.index+2,e),B=D.indexOf("|"),[U,z]=B===-1?[[],D]:[D.slice(0,B).split(";"),D.slice(B+1)],V=z.replace(/(&[#a-z\d]+);/giu,"$1"),X=`(?:${w.variants.join("|")})`,J=V.split(new RegExp(`;(?=\\s*(?:${X}|[^;]*?=>\\s*${X})\\s*:)`,"u")).map(j=>j.replace(/\x01/gu,";"));new G(U,J,w,E),L=`${L.slice(0,T.index)}\0${p}v\x7F${L.slice(e+2)}`,g.length===0&&(u=O),u.lastIndex=T.index+3+String(p).length}else g.push(C),u=y,u.lastIndex=e+2;C=u.exec(L)}return L}},418:(Y,M,t)=>{t.r(M),t.d(M,{parseExternalLinks:()=>W});var $=t(467),I=t(891),R=t(944);const W=(b,S=I.default.getConfig(),P=[])=>{const x=new RegExp(`\\[((?:(?:${S.protocol}|//)${$._X}|\0\\d+m\x7F)${$.Qk})(\\p{Zs}*)([^\\]-\b
5
- -\uFFFD]*)\\]`,"giu");return b.replace(x,(o,n,r,d)=>{const{length:i}=P,l=/&[lg]t;/u.exec(n);return l&&(n=n.slice(0,l.index),r="",d=`${n.slice(l.index)}${r}${d}`),new R.a(n,r,d,S,P),`\0${i}w\x7F`})}},362:(Y,M,t)=>{t.r(M),t.d(M,{parseHrAndDoubleUnderscore:()=>i});var $=t(891),I=t(439),R=Object.defineProperty,W=(l,s,a)=>s in l?R(l,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[s]=a,b=(l,s,a)=>(W(l,typeof s!="symbol"?s+"":s,a),a);class S extends I.h{constructor(){super(...arguments),b(this,"type","hr")}}var P=t(959),x=Object.defineProperty,o=(l,s,a)=>s in l?x(l,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[s]=a,n=(l,s,a)=>(o(l,typeof s!="symbol"?s+"":s,a),a);class r extends(0,P.a)(I.h){constructor(s,a,c=$.default.getConfig(),v=[]){super(s,c,v),n(this,"type","double-underscore")}getPadding(){return 2}toString(s){return`__${this.firstChild.data}__`}print(){return super.print({pre:"__",post:"__"})}}var d=t(485);const i=({firstChild:{data:l},type:s,name:a},c=$.default.getConfig(),v=[])=>{const{doubleUnderscore:_}=c,m=new Set(_[0]),F=new Set(_[1]);return s!=="root"&&(s!=="ext-inner"||a!=="poem")&&(l=`\0${l}`),l=l.replace(/^((?:\0\d+c\x7F)*)(-{4,})/gmu,(K,G,Q)=>(new S(Q,c,v),`${G}\0${v.length-1}r\x7F`)).replace(new RegExp(`__(${_.flat().join("|")})__`,"giu"),(K,G)=>{const Q=F.has(G);return Q||m.has(G.toLowerCase())?(new r(G,Q,c,v),`\0${v.length-1}u\x7F`):K}).replace(/^((?:\0\d+c\x7F)*)(={1,6})(.+)\2((?:[^\S\n]|\0\d+c\x7F)*)$/gmu,(K,G,Q,L,w)=>{const E=`${G}\0${v.length}h\x7F`;return new d.D(Q.length,[L,w],c,v),E}),s==="root"||s==="ext-inner"&&a==="poem"?l:l.slice(1)}},980:(Y,M,t)=>{t.r(M),t.d(M,{parseHtml:()=>v});var $=t(891),I=t(83),R=t(169),W=t(467),b=t(541),S=Object.defineProperty,P=(_,m,F)=>m in _?S(_,m,{enumerable:!0,configurable:!0,writable:!0,value:F}):_[m]=F,x=(_,m,F)=>(P(_,typeof m!="symbol"?m+"":m,F),F),o=(_,m,F)=>{if(!m.has(_))throw TypeError("Cannot "+F)},n=(_,m,F)=>(o(_,m,"read from private field"),F?F.call(_):m.get(_)),r=(_,m,F)=>{if(m.has(_))throw TypeError("Cannot add the same private member more than once");m instanceof WeakSet?m.add(_):m.set(_,F)},d=(_,m,F,K)=>(o(_,m,"write to private field"),K?K.call(_,F):m.set(_,F),F),i,l,s;const a=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]);class c extends b.Token{constructor(m,F,K,G,Q=$.default.getConfig(),L=[]){super(void 0,Q,L),x(this,"type","html"),r(this,i,void 0),r(this,l,void 0),r(this,s,void 0),this.insertAt(F),this.setAttribute("name",m.toLowerCase()),d(this,i,K),d(this,l,G),d(this,s,m)}get closing(){return n(this,i)}toString(m){return`<${n(this,i)?"/":""}${n(this,s)}${super.toString()}${n(this,l)?"/":""}>`}text(){return`<${n(this,i)?"/":""}${n(this,s)}${n(this,i)?"":super.text()}${n(this,l)?"/":""}>`}getPadding(){return n(this,s).length+(n(this,i)?2:1)}lint(m=this.getAbsoluteIndex()){const F=super.lint(m);let K;this.name==="h1"&&!n(this,i)&&(K=(0,R.Y)(this,{start:m},"<h1>"),F.push(K)),this.closest("table-attrs")&&(K!=null||(K=(0,R.Y)(this,{start:m},"")),F.push({...K,message:$.default.msg("HTML tag in table attributes")}));try{this.findMatchingTag()}catch(G){if(G instanceof SyntaxError){const{message:Q}=G;K!=null||(K=(0,R.Y)(this,{start:m},""));const[L]=Q.split(":"),w={...K,message:$.default.msg(L)};if(L==="unclosed tag")w.severity="warning";else if(L==="unmatched closing tag"){const E=this.closest("magic-word");E&&a.has(E.name)&&(w.severity="warning")}F.push(w)}}return F}findMatchingTag(){const{html:m}=this.getAttribute("config"),{name:F,parentNode:K}=this,G=(0,W.jq)(String(this));if(n(this,i)&&(n(this,l)||m[2].includes(F)))throw new SyntaxError(`tag that is both closing and self-closing: ${G}`);if(m[2].includes(F)||n(this,l)&&m[1].includes(F))return this;if(n(this,l)&&m[0].includes(F))throw new SyntaxError(`invalid self-closing tag: ${G}`);if(!K)return;const{childNodes:Q}=K,L=Q.indexOf(this),w=n(this,i)?Q.slice(0,L).reverse().filter(({type:O,name:y})=>O==="html"&&y===F):Q.slice(L+1).filter(({type:O,name:y})=>O==="html"&&y===F);let E=n(this,i)?-1:1;for(const O of w)if(O.closing?E--:E++,E===0)return O;throw new SyntaxError(`${n(this,i)?"unmatched closing":"unclosed"} tag: ${G}`)}print(){return super.print({pre:`&lt;${n(this,i)?"/":""}${n(this,s)}`,post:`${n(this,l)?"/":""}&gt;`})}}i=new WeakMap,l=new WeakMap,s=new WeakMap;const v=(_,m=$.default.getConfig(),F=[])=>{const K=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,G=new Set(m.html.flat()),Q=_.split("<");let L=Q.shift();for(const w of Q){const E=K.exec(w),O=E==null?void 0:E[2],y=O==null?void 0:O.toLowerCase();if(!E||!G.has(y)){L+=`<${w}`;continue}const[,g,,u="",C,f]=E,e=new I.x(u,"html-attrs",y,m,F),T=e.getAttr("itemprop");if(y==="meta"&&(T===void 0||e.getAttr("content")===void 0)||y==="link"&&(T===void 0||e.getAttr("href")===void 0)){L+=`<${w}`,F.pop();continue}L+=`\0${F.length}x\x7F${f}`,new c(O,e,g==="/",C==="/>",m,F)}return L}},106:(Y,M,t)=>{t.r(M),t.d(M,{parseLinks:()=>x});var $=t(891),I=t(524),R=t(533),W=Object.defineProperty,b=(o,n,r)=>n in o?W(o,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[n]=r,S=(o,n,r)=>(b(o,typeof n!="symbol"?n+"":n,r),r);class P extends I.h{constructor(){super(...arguments),S(this,"type","category")}}const x=(o,n=$.default.getConfig(),r=[])=>{const{parseQuotes:d}=t(704),i=n.inExt?/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]]))?\]\](.*)$/su:/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]])?)?\]\](.*)$/su,l=/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(\||\0\d+!\x7F)(.*)$/su,s=new RegExp(`^\\s*(?:${n.protocol})`,"iu"),a=o.split("[[");let c=a.shift();for(let v=0;v<a.length;v++){let _=!1,m,F,K,G;const Q=a[v],L=i.exec(Q);if(L)[,m,F,K,G]=L,G.startsWith("]")&&(K!=null&&K.includes("["))&&(K+="]",G=G.slice(1));else{const u=l.exec(Q);u&&(_=!0,[,m,F,K]=u)}if(m===void 0||s.test(m)||/\0\d+[exhbru]\x7F/u.test(m)){c+=`[[${Q}`;continue}const w=m.trim().startsWith(":");if(w&&_){c+=`[[${Q}`;continue}const E=$.default.normalizeTitle(m,0,!1,n,!0,!0,!0),{ns:O,valid:y}=E;if(y){if(_){if(O!==6){c+=`[[${Q}`;continue}let u=!1;for(v++;v<a.length;v++){const C=a[v],f=C.split("]]");if(f.length>2){u=!0,K+=`[[${f[0]}]]${f[1]}`,G=f.slice(2).join("]]");break}else if(f.length===2)K+=`[[${f[0]}]]${f[1]}`;else{K+=`[[${C}`;break}}if(K=x(K,n,r),!u){c+=`[[${m}${F}${K}`;continue}}}else{c+=`[[${Q}`;continue}K&&(K=d(K,n,r)),c+=`\0${r.length}l\x7F${G}`;let g=I.h;w||(O===6?g=R.q:O===14&&(g=P)),K===void 0&&F&&(K=""),new g(m,K,n,r,F)}return c}},904:(Y,M,t)=>{t.r(M),t.d(M,{parseList:()=>x});var $=t(891),I=t(933),R=Object.defineProperty,W=(o,n,r)=>n in o?R(o,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[n]=r,b=(o,n,r)=>(W(o,typeof n!="symbol"?n+"":n,r),r);class S extends I.T{constructor(){super(...arguments),b(this,"type","list")}}var P=t(461);const x=(o,n=$.default.getConfig(),r=[])=>{const d=/^((?:\0\d+c\x7F)*)([;:*#]+)/u.exec(o);if(!d)return o;const[i,l,s]=d;let a=`${l}\0${r.length}d\x7F${o.slice(i.length)}`,c=s.split(";").length-1;if(new S(s,n,r),!c)return a;let v=/:+|-\{/gu,_=v.exec(a),m=0;for(;_&&c;){const{0:F,index:K}=_;if(F.startsWith(":")){if(F.length>=c)return new P.k(":".repeat(c),n,r),`${a.slice(0,K)}\0${r.length-1}d\x7F${a.slice(K+c)}`;a=`${a.slice(0,K)}\0${r.length}d\x7F${a.slice(v.lastIndex)}`,c-=F.length,v.lastIndex=K+4+String(r.length).length,new P.k(F,n,r)}else if(F==="-{"){if(!m){const{lastIndex:G}=v;v=/-\{|\}-/gu,v.lastIndex=G}m++}else if(m--,!m){const{lastIndex:G}=v;v=/:+|-\{/gu,v.lastIndex=G}_=v.exec(a)}return a}},311:(Y,M,t)=>{t.r(M),t.d(M,{parseMagicLinks:()=>W});var $=t(467),I=t(891),R=t(686);const W=(b,S=I.default.getConfig(),P=[])=>{const x=new RegExp(`(^|[^\\p{L}\\d_])(?:${S.protocol})(${$._X}${$.Qk})`,"giu");return b.replace(x,(o,n,r)=>{let d="",i=n?o.slice(1):o;const l=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(i);l&&(d=i.slice(l.index),i=i.slice(0,l.index));const s=new RegExp(`[,;.:!?${i.includes("(")?"":")"}]+$`,"u"),a=s.exec(i);if(a){let c=0;a[0].startsWith(";")&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(i.slice(0,a.index))&&(c=1),d=`${i.slice(a.index+c)}${d}`,i=i.slice(0,a.index+c)}return d.length>=r.length?o:(new R.k(i,!1,S,P),`${n}\0${P.length-1}w\x7F${d}`)})}},704:(Y,M,t)=>{t.r(M),t.d(M,{parseQuotes:()=>x});var $=t(891),I=t(169),R=t(439),W=Object.defineProperty,b=(o,n,r)=>n in o?W(o,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[n]=r,S=(o,n,r)=>(b(o,typeof n!="symbol"?n+"":n,r),r);class P extends R.h{constructor(){super(...arguments),S(this,"type","quote")}lint(n=this.getAbsoluteIndex()){const{previousSibling:r,nextSibling:d}=this,i=$.default.msg('lonely "$1"',"'"),l=[];let s;if((r==null?void 0:r.type)==="text"&&r.data.endsWith("'")){s=(0,I.Y)(this,{start:n},i);const{startIndex:a,startLine:c,startCol:v}=s,[,{length:_}]=r.data.match(/(?:^|[^'])('+)$/u),m=n-_;l.push({...s,startIndex:m,endIndex:a,startCol:v-_,endLine:c,endCol:v})}if((d==null?void 0:d.type)==="text"&&d.data.startsWith("'")){s!=null||(s=(0,I.Y)(this,{start:n},i));const{endIndex:a,endLine:c,endCol:v}=s,[{length:_}]=d.data.match(/^'+/u),m=a+_;l.push({...s,startIndex:a,endIndex:m,startLine:c,startCol:v,endCol:v+_})}return l}}const x=(o,n=$.default.getConfig(),r=[])=>{var d;const i=o.split(/('{2,})/u),{length:l}=i;if(l===1)return o;let s=0,a=0,c,v,_;for(let m=1;m<l;m+=2){const{length:F}=i[m];switch(F){case 2:a++;break;case 4:i[m-1]+="'",i[m]="'''";case 3:if(s++,c!==void 0)break;i[m-1].endsWith(" ")?v===void 0&&_===void 0&&(_=m):i[m-1].slice(-2,-1)===" "?c=m:v!=null||(v=m);break;default:i[m-1]+="'".repeat(F-5),i[m]="'''''",a++,s++}}if(a%2===1&&s%2===1){const m=(d=c!=null?c:v)!=null?d:_;m!==void 0&&(i[m]="''",i[m-1]+="'")}for(let m=1;m<l;m+=2)new P(i[m],n,r),i[m]=`\0${r.length-1}q\x7F`;return i.join("")}},508:(Y,M,t)=>{t.r(M),t.d(M,{parseTable:()=>O});var $=t(891),I=t(541),R=t(169),W=t(669),b=t(83);class S extends I.Token{constructor(g,u,C,f=$.default.getConfig(),e=[],T={}){super(void 0,f,e,T),this.append(new W.SyntaxToken(u,g,"table-syntax",f,e,{}),new b.x(C,"table-attrs",this.type,f,e))}}class P extends S{lint(g=this.getAbsoluteIndex()){const u=super.lint(g),C=this.childNodes.find(({type:p})=>p==="table-inter");if(!C)return u;const f=C.childNodes.find(p=>p.text().trim()),e=/^\s*(?:!|\{\{\s*![!-]?\s*\}\})/u;if(!f||e.test(String(f))||f.type==="arg"&&e.test(f.default||""))return u;if(f.type==="magic-word")try{if(f.getPossibleValues().every(p=>e.test(p.text())))return u}catch(p){}const T=(0,R.D)(C,{start:g},"content to be moved out from the table");return u.push({...T,startIndex:T.startIndex+1,startLine:T.startLine+1,startCol:0}),u}text(){const g=super.text();return this.type==="tr"&&!g.trim().includes(`
6
- `)?"":g}}var x=Object.defineProperty,o=(y,g,u)=>g in y?x(y,g,{enumerable:!0,configurable:!0,writable:!0,value:u}):y[g]=u,n=(y,g,u)=>(o(y,typeof g!="symbol"?g+"":g,u),u);const r=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u;class d extends P{constructor(g,u,C=$.default.getConfig(),f=[]){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,g,u,C,f,{}),n(this,"type","table")}get closed(){return this.lastChild.type==="table-syntax"}lint(g=this.getAbsoluteIndex()){const u=super.lint(g);if(!this.closed){const{firstChild:C}=this,f=(0,R.D)(C,{start:g},"unclosed table");u.push(f)}return u}close(g=`
7
- |}`,u=!1){const C=this.getAttribute("config"),f=this.getAttribute("accum");super.insertAt($.default.run(()=>new W.SyntaxToken(g,r,"table-syntax",C,f,{})))}}var i=Object.defineProperty,l=(y,g,u)=>g in y?i(y,g,{enumerable:!0,configurable:!0,writable:!0,value:u}):y[g]=u,s=(y,g,u)=>(l(y,typeof g!="symbol"?g+"":g,u),u);class a extends P{constructor(g,u,C=$.default.getConfig(),f=[]){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,g,u,C,f,{}),s(this,"type","tr")}}var c=Object.defineProperty,v=(y,g,u)=>g in y?c(y,g,{enumerable:!0,configurable:!0,writable:!0,value:u}):y[g]=u,_=(y,g,u)=>(v(y,typeof g!="symbol"?g+"":g,u),u),m=(y,g,u)=>{if(!g.has(y))throw TypeError("Cannot "+u)},F=(y,g,u)=>(m(y,g,"read from private field"),u?u.call(y):g.get(y)),K=(y,g,u)=>{if(g.has(y))throw TypeError("Cannot add the same private member more than once");g instanceof WeakSet?g.add(y):g.set(y,u)},G=(y,g,u,C)=>(m(y,g,"write to private field"),C?C.call(y,u):g.set(y,u),u),Q=(y,g,u,C)=>({set _(f){G(y,g,f,u)},get _(){return F(y,g,C)}}),L;class w extends S{constructor(g,u,C=$.default.getConfig(),f=[]){var e;let T=u==null?void 0:u.match(/\||\0\d+!\x7F/u),p=T?u.slice(0,T.index):"";/\[\[|-\{/u.test(p)&&(T=void 0,p=""),super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,g,p,C,f),_(this,"type","td"),K(this,L,""),T&&([Q(this,L)._]=T);const D=new I.Token(u==null?void 0:u.slice(((e=T==null?void 0:T.index)!=null?e:NaN)+F(this,L).length),C,f);D.type="td-inner",D.setAttribute("stage",4),this.insertAt(D)}get subtype(){return this.getSyntax().subtype}getSyntax(){const g=this.firstChild.text(),u=g[g.length-1];let C="td";return u==="!"?C="th":u==="+"&&(C="caption"),{subtype:C}}afterBuild(){F(this,L).includes("\0")&&G(this,L,this.buildFromStr(F(this,L),"string"))}toString(g){const{childNodes:[u,C,f]}=this;return`${u.toString()}${C.toString()}${F(this,L)}${f.toString()}`}text(){const{childNodes:[g,u,C]}=this;return`${g.text()}${u.text()}${F(this,L)}${C.text()}`}getGaps(g){return g===1?F(this,L).length:0}lint(g=this.getAbsoluteIndex()){const u=super.lint(g);g+=this.getRelativeIndex(this.length-1);for(const C of this.lastChild.childNodes)C.type==="text"&&C.data.includes("|")&&u.push((0,R.D)(C,{start:g},'additional "|" in a table cell',"warning"));return u}print(){const{childNodes:[g,u,C]}=this;return`<span class="wpb-td">${g.print()}${u.print()}${F(this,L)}${C.print()}</span>`}}L=new WeakMap;var E=t(461);const O=({firstChild:{data:y},type:g,name:u},C=$.default.getConfig(),f=[])=>{const e=[],T=y.split(`
8
- `);let p=g==="root"||g==="parameter-value"||g==="ext-inner"&&u==="poem"?"":`
9
- ${T.shift()}`;const D=(B,U)=>{if(!U){p+=B;return}const{lastChild:z}=U;if(z.constructor===I.Token)z.setText(String(z)+B);else{const V=new I.Token(B,C,f);V.type="table-inter",V.setAttribute("stage",3),U.insertAt(V)}};for(const B of T){let U=e.pop();const[z]=/^(?:\s|\0\d+c\x7F)*/u.exec(B),V=B.slice(z.length),X=/^(:*)((?:\s|\0\d+c\x7F)*)(\{\||\{(?:\0\d+c\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(V);if(X){for(;U&&U.type!=="td";)U=e.pop();const[,k,it,q,st]=X;k&&new E.k(k,C,f),D(`
10
- ${z}${k&&`\0${f.length-1}d\x7F`}${it}\0${f.length}b\x7F`,U),e.push(...U?[U]:[],new d(q,st,C,f));continue}else if(!U){p+=`
11
- ${B}`;continue}const J=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(V);if(!J){D(`
12
- ${B}`,U),e.push(U);continue}const[,j,et,tt,nt]=J;if(j){for(;U.type!=="table";)U=e.pop();U.close(`
13
- ${z}${j}`,!0),D(nt,e[e.length-1])}else if(et){U.type==="td"&&(U=e.pop()),U.type==="tr"&&(U=e.pop());const k=new a(`
14
- ${z}${et}`,nt,C,f);e.push(U,k),U.insertAt(k)}else{U.type==="td"&&(U=e.pop());const k=tt==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu;let it=k.exec(nt),q=0,st=`
15
- ${z}${tt}`;for(;it;)U.insertAt(new w(st,nt.slice(q,it.index),C,f)),{lastIndex:q}=k,[st]=it,it=k.exec(nt);const lt=new w(st,nt.slice(q),C,f);e.push(U,lt),U.insertAt(lt)}}return p.slice(1)}},34:(Y,M,t)=>{t.d(M,{D:()=>R});var $=t(891),I=t(541);class R extends I.Token{constructor(b,S,P=$.default.getConfig(),x=[],o){super(b,P,x,o),this.type=S}}},83:(Y,M,t)=>{t.d(M,{x:()=>L});var $=t(169),I=t(467),R=t(891),W=t(541),b=t(34),S=(w,E,O)=>{if(!E.has(w))throw TypeError("Cannot "+O)},P=(w,E,O)=>(S(w,E,"read from private field"),O?O.call(w):E.get(w)),x=(w,E,O)=>{if(E.has(w))throw TypeError("Cannot add the same private member more than once");E instanceof WeakSet?E.add(w):E.set(w,O)},o=(w,E,O,y)=>(S(w,E,"write to private field"),y?y.call(w,O):E.set(w,O),O),n,r,d;const i=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"]),l=new Set(["align"]),s=new Set(["cite"]),a=new Set(["cite","datetime"]),c=new Set(["width"]),v=new Set(["align","valign","abbr","axis","headers","scope","rowspan","colspan","width","height","bgcolor"]),_=new Set(["type"]),m={div:l,h1:l,h2:l,h3:l,h4:l,h5:l,h6:l,blockquote:s,q:s,p:l,br:new Set(["clear"]),pre:c,ins:a,del:a,ul:_,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set(["summary","width","border","frame","rules","cellspacing","cellpadding","align","bgcolor"]),caption:l,tr:new Set(["bgcolor","align","valign"]),td:v,th:v,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:c,rt:new Set(["rbspan"]),data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails","type"]),poem:new Set(["compact","align"]),categorytree:new Set(["align","hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline","align"])},F=new Set,K={nowiki:F,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:F,inputbox:F,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:F,poll:new Set(["id","show-results-before-voting"]),sm2:_,flashmp3:_,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"])},G=new RegExp("expression|(?:filter|accelerator|-o-link(?:-source)?|-o-replace)\\s*:|(?:url|image(?:-set)?)\\s*\\(|attr\\s*\\([^)]+[\\s,]url","u");class Q extends W.Token{constructor(E,O,y,g="",u,C=[],f=R.default.getConfig(),e=[]){const T=new b.D(y,"attr-key",f,e,{});let p;if(y==="title"||O==="img"&&y==="alt")p=new W.Token(u,f,e,{}),p.type="attr-value",p.setAttribute("stage",R.default.MAX_STAGE-1);else if(O==="gallery"&&y==="caption"){const D={...f,excludes:[...f.excludes,"quote","extLink","magicLink","list"]};p=new W.Token(u,D,e,{}),p.type="attr-value",p.setAttribute("stage",5)}else if(O==="choose"&&(y==="before"||y==="after")){const D={...f,excludes:[...f.excludes,"heading","html","table","hr","list"]};p=new W.Token(u,D,e,{}),p.type="attr-value",p.setAttribute("stage",1)}else p=new b.D(u,"attr-value",f,e,{});super(void 0,f,e),x(this,n,void 0),x(this,r,void 0),x(this,d,void 0),this.type=E,this.append(T,p),o(this,n,g),o(this,r,C),o(this,d,O),this.setAttribute("name",(0,I.PN)(y).trim().toLowerCase())}get balanced(){return!P(this,n)||P(this,r)[0]===P(this,r)[1]}get tag(){return P(this,d)}get value(){return this.getValue()}afterBuild(){P(this,n).includes("\0")&&o(this,n,this.buildFromStr(P(this,n),"string")),this.parentNode&&o(this,d,this.parentNode.name),this.setAttribute("name",this.firstChild.text().trim().toLowerCase())}toString(E){const[O="",y=""]=P(this,r);return P(this,n)?`${super.toString(E,`${P(this,n)}${O}`)}${y}`:this.firstChild.toString(E)}text(){return P(this,n)?`${super.text(`${P(this,n).trim()}"`)}"`:this.firstChild.text()}getGaps(E){var O,y;return P(this,n)&&E===0?P(this,n).length+((y=(O=P(this,r)[0])==null?void 0:O.length)!=null?y:0):0}lint(E=this.getAbsoluteIndex()){var O;const y=super.lint(E),{balanced:g,firstChild:u,lastChild:C,type:f,name:e,value:T}=this,p=P(this,d);let D;if(!g){const B=this.getRootNode();D={start:E,...B.posFromIndex(E)};const U=(0,$.D)(C,D,"unclosed quotes","warning"),z=U.startIndex-1;y.push({...U,startIndex:z,startCol:U.startCol-1})}return K[p]&&!K[p].has(e)||(f!=="ext-attr"&&!/\{\{[^{]+\}\}/u.test(e)||p in m)&&!((O=m[p])!=null&&O.has(e))&&!/^(?:xmlns:[\w:.-]+|data-[^:]*)$/u.test(e)&&(p==="meta"||p==="link"||!i.has(e))?(D!=null||(D={start:E,...this.getRootNode().posFromIndex(E)}),y.push((0,$.D)(u,D,"illegal attribute name"))):e==="style"&&typeof T=="string"&&G.test(T)?(D!=null||(D={start:E,...this.getRootNode().posFromIndex(E)}),y.push((0,$.D)(C,D,"insecure style"))):e==="tabindex"&&typeof T=="string"&&T.trim()!=="0"&&(D!=null||(D={start:E,...this.getRootNode().posFromIndex(E)}),y.push((0,$.D)(C,D,"nonzero tabindex"))),y}getValue(){if(P(this,n)){const E=this.lastChild.text();return P(this,r)[1]?E:E.trim()}return this.type==="ext-attr"||""}print(){const[E="",O=""]=P(this,r);return P(this,n)?super.print({sep:`${P(this,n)}${E}`,post:O}):super.print()}}n=new WeakMap,r=new WeakMap,d=new WeakMap;class L extends W.Token{constructor(E,O,y,g=R.default.getConfig(),u=[]){if(super(void 0,g,u,{}),this.type=O,this.setAttribute("name",y),E){const C=new RegExp(`([^\\s/](?:(?!\0\\d+~\x7F)[^\\s/=])*)(?:((?:\\s|\0\\d+c\x7F)*(?:=|\0\\d+~\x7F)(?:\\s|\0\\d+c\x7F)*)(?:(["'])(.*?)(\\3|$)|(\\S*)))?`,"gsu");let f="",e=C.exec(E),T=0;const p=()=>{f&&(super.insertAt(new b.D(f,`${O.slice(0,-1)}-dirty`,g,u)),f="")};for(;e;){const{index:D,0:B,1:U,2:z,3:V,4:X,5:J,6:j}=e;if(f+=E.slice(T,D),/^(?:[\w:]|\0\d+[t!~{}+-]\x7F)(?:[\w:.-]|\0\d+[t!~{}+-]\x7F)*$/u.test((0,I.PN)(U).trim())){const et=X!=null?X:j,tt=[V,J],nt=new Q(O.slice(0,-1),y,U,z,et,tt,g,u);p(),super.insertAt(nt)}else f+=B;({lastIndex:T}=C),e=C.exec(E)}f+=E.slice(T),p()}}afterBuild(){if(this.type==="table-attrs"){const{parentNode:E}=this;this.setAttribute("name",(E==null?void 0:E.type)==="td"&&E.subtype==="caption"?"caption":E==null?void 0:E.type)}}getAttrTokens(E){return this.childNodes.filter(O=>O instanceof Q&&O.name===E.toLowerCase().trim())}getAttrToken(E){const O=this.getAttrTokens(E);return O[O.length-1]}getAttr(E){var O;return(O=this.getAttrToken(E))==null?void 0:O.getValue()}lint(E=this.getAbsoluteIndex()){const O=super.lint(E),{parentNode:y,length:g,childNodes:u}=this,C=new Map,f=new Set;let e;(y==null?void 0:y.type)==="html"&&y.closing&&this.text().trim()&&(e={start:E,...this.getRootNode().posFromIndex(E)},O.push((0,$.Y)(this,e,"attributes of a closing tag")));for(let T=0;T<g;T++){const p=u[T];if(p instanceof b.D&&p.text().trim())e!=null||(e={start:E,...this.getRootNode().posFromIndex(E)}),O.push((0,$.D)(p,e,"containing invalid attribute"));else if(p instanceof Q){const{name:D}=p;C.has(D)?(f.add(D),C.get(D).push(p)):D!=="class"&&C.set(D,[p])}}if(f.size>0){e!=null||(e={start:E,...this.getRootNode().posFromIndex(E)});for(const T of f)O.push(...C.get(T).map(p=>(0,$.D)(p,e,R.default.msg("duplicated $1 attribute",T))))}return O}print(){return String(this)?`<span class="wpb-${this.type}">${this.childNodes.map(E=>E.print(E instanceof b.D&&E.text().trim()?{class:"hidden"}:void 0)).join("")}</span>`:""}}},944:(Y,M,t)=>{t.d(M,{a:()=>d});var $=t(891),I=t(541),R=t(686),W=Object.defineProperty,b=(i,l,s)=>l in i?W(i,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[l]=s,S=(i,l,s)=>(b(i,typeof l!="symbol"?l+"":l,s),s),P=(i,l,s)=>{if(!l.has(i))throw TypeError("Cannot "+s)},x=(i,l,s)=>(P(i,l,"read from private field"),s?s.call(i):l.get(i)),o=(i,l,s)=>{if(l.has(i))throw TypeError("Cannot add the same private member more than once");l instanceof WeakSet?l.add(i):l.set(i,s)},n=(i,l,s,a)=>(P(i,l,"write to private field"),a?a.call(i,s):l.set(i,s),s),r;class d extends I.Token{constructor(l,s="",a="",c=$.default.getConfig(),v=[]){if(super(void 0,c,v,{}),S(this,"type","ext-link"),o(this,r,void 0),this.insertAt(new R.k(l,!0,c,v)),n(this,r,s),a){const _=new I.Token(a,c,v,{});_.type="ext-link-text",_.setAttribute("stage",$.default.MAX_STAGE-1),this.insertAt(_)}}toString(l){return this.length===1?`[${super.toString(l)}${x(this,r)}]`:`[${super.toString(l,x(this,r))}]`}text(){return`[${super.text(" ")}]`}getPadding(){return 1}getGaps(l){return l===0?x(this,r).length:0}print(){return super.print(this.length===1?{pre:"[",post:`${x(this,r)}]`}:{pre:"[",sep:x(this,r),post:"]"})}}r=new WeakMap},420:(Y,M,t)=>{t.r(M),t.d(M,{GalleryToken:()=>x});var $=t(891),I=t(541),R=t(39),W=t(465),b=Object.defineProperty,S=(o,n,r)=>n in o?b(o,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[n]=r,P=(o,n,r)=>(S(o,typeof n!="symbol"?n+"":n,r),r);class x extends I.Token{constructor(n,r=$.default.getConfig(),d=[]){var i;super(void 0,r,d,{}),P(this,"type","ext-inner");for(const l of(i=n==null?void 0:n.split(`
16
- `))!=null?i:[]){const s=/^([^|]+)(?:\|(.*))?/u.exec(l);if(!s){super.insertAt(l.trim()?new W.R(l,r,[],{}):l);continue}const[,a,c]=s;this.normalizeTitle(a,6,!0,!0).valid?super.insertAt(new R._("gallery",a,c,r,d)):super.insertAt(new W.R(l,r,[],{}))}}toString(n){return super.toString(n,`
1
+ (()=>{(()=>{"use strict";var Qt={891:(Q,y,t)=>{t.d(y,{Z:()=>O});var P=t(223),b=t(444);const L={i18n:void 0,getConfig(){return{...b.L,...this.config,excludes:[]}},msg(E,f=""){var v,o;return((o=(v=this.i18n)==null?void 0:v[E])!=null?o:E).replace("$1",f)},normalizeTitle(E,f=0,v=!1,o=L.getConfig(),l=!1,h=!1,u=!1){const{Title:c}=t(599);if(l)return new c(E,f,o,h,u);const{Token:r}=t(541),i=P.j.run(()=>new r(E,o).parseOnce(0,v).parseOnce());return new c(String(i),f,o,h,u)},parse(E,f,v=b.C,o=L.getConfig()){const{Token:l}=t(541);let h;return P.j.run(()=>{h=new l(E.replace(/[\0\x7F]/gu,""),o);try{h.parse(v,f)}catch(u){}}),h}},D={},I=new Set(["normalizeTitle","parse"]);for(const E in L)I.has(E)||(D[E]={enumerable:!1});Object.defineProperties(L,D),typeof self=="object"?Object.assign(self,{Parser:L}):typeof globalThis=="object"&&Object.assign(globalThis,{Parser:L});const O=L},599:(Q,y,t)=>{t.r(y),t.d(y,{Title:()=>O});var P=t(467),b=t(891),L=Object.defineProperty,D=(E,f,v)=>f in E?L(E,f,{enumerable:!0,configurable:!0,writable:!0,value:v}):E[f]=v,I=(E,f,v)=>(D(E,typeof f!="symbol"?f+"":f,v),v);class O{constructor(f,v=0,o=b.Z.getConfig(),l=!1,h=!1){I(this,"valid"),I(this,"ns"),I(this,"fragment"),I(this,"encoded",!1);var u;const{namespaces:c,nsid:r}=o;let i=(u=c[v])!=null?u:"";if(f=(0,P.m9)(f),l&&f.includes("%"))try{const x=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(f);f=decodeURIComponent(f),this.encoded=x}catch(x){}f=f.replace(/_/gu," ").trim(),f.startsWith(":")&&(i="",f=f.slice(1).trim());const s=f.split(":");if(s.length>1){const x=r[s[0].trim().toLowerCase()],C=x===void 0?void 0:c[x];C!==void 0&&(i=C,f=s.slice(1).join(":").trim())}this.ns=r[i.toLowerCase()];const d=f.indexOf("#");let A;d!==-1&&(A=f.slice(d+1).trim(),f=f.slice(0,d).trim()),this.valid=!!(f||h&&A!==void 0)&&!/\0\d+[eh!+-]\x7F|[<>[\]{}|]|%[\da-f]{2}/iu.test(f),this.fragment=A}}},959:(Q,y,t)=>{t.d(y,{a:()=>D});var P=Object.defineProperty,b=(I,O,E)=>O in I?P(I,O,{enumerable:!0,configurable:!0,writable:!0,value:E}):I[O]=E,L=(I,O,E)=>(b(I,typeof O!="symbol"?O+"":O,E),E);const D=I=>{class O extends I{text(){return""}}return L(O,"hidden",!0),O}},313:(Q,y,t)=>{t.r(y),t.d(y,{parseBraces:()=>w});var P=t(467),b=t(891),L=t(485),D=t(169),I=t(541),O=Object.defineProperty,E=(n,e,p)=>e in n?O(n,e,{enumerable:!0,configurable:!0,writable:!0,value:p}):n[e]=p,f=(n,e,p)=>(E(n,typeof e!="symbol"?e+"":e,p),p);const v=n=>n.toString(new Set(["comment","noinclude","include"])).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");class o extends I.Token{constructor(e,p,$=b.Z.getConfig(),F=[]){super(void 0,$,F),f(this,"type","parameter");const N=new I.Token(typeof e=="number"?void 0:e,$,F,{}),S=new I.Token(p,$,F);N.type="parameter-key",S.type="parameter-value",S.setAttribute("stage",2),this.append(N,S)}get anon(){return this.firstChild.length===0}afterBuild(){if(!this.anon){const{parentNode:e,firstChild:p}=this,$=v(p);this.setAttribute("name",$),e&&e.getArgs($,!1,!1).add(this)}}toString(e){return this.anon?this.lastChild.toString(e):super.toString(e,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(e=this.getAbsoluteIndex()){var p;const $=super.lint(e),{firstChild:F}=this,N=(p=new RegExp(`https?://${P._X}${P.Qk}$`,"iu").exec(F.toString(new Set(["comment","noinclude","include"]))))==null?void 0:p[0];if(N&&new URL(N).search){const S=(0,D.D)(F,{start:e},"unescaped query string in an anonymous parameter");$.push({...S,startIndex:S.endIndex,endIndex:S.endIndex+1,startLine:S.endLine,startCol:S.endCol,endCol:S.endCol+1})}return $}print(){return super.print({sep:this.anon?"":"="})}}var l=t(34),h=t(669),u=Object.defineProperty,c=(n,e,p)=>e in n?u(n,e,{enumerable:!0,configurable:!0,writable:!0,value:p}):n[e]=p,r=(n,e,p)=>(c(n,typeof e!="symbol"?e+"":e,p),p),i=(n,e,p)=>{if(!e.has(n))throw TypeError("Cannot "+p)},s=(n,e,p)=>(i(n,e,"read from private field"),p?p.call(n):e.get(n)),d=(n,e,p)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,p)},A=(n,e,p,$)=>(i(n,e,"write to private field"),$?$.call(n,p):e.set(n,p),p),x=(n,e,p)=>(i(n,e,"access private method"),p),C,B,K,G,Y,Z;class a extends I.Token{constructor(e,p,$=b.Z.getConfig(),F=[]){var N,S;super(void 0,$,F,{}),d(this,K),d(this,Y),r(this,"type","template"),r(this,"modifier",""),d(this,C,!1),d(this,B,new Map);const{parserFunction:[z,X]}=$,V=(N=/^(?:\s|\0\d+c\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:N[0];if(V)this.setAttribute("modifier",V),e=e.slice(V.length);else if(e.includes(":")){const[st,...tt]=e.split(":"),[dt]=/^(?:\s|\0\d+c\x7F)*/u.exec((S=tt[0])!=null?S:"");this.setModifier(`${st}:${dt}`)&&(e=tt.join(":").slice(dt.length))}if(e.includes(":")||p.length===0&&!s(this,C)){const[st,...tt]=e.split(":"),dt=(0,P.PN)(st),nt=dt.trim(),ct=X.includes(nt),j=z[nt.toLowerCase()];if(!(tt.length>0&&/\s$/u.test(dt))&&(ct||j)){this.setAttribute("name",j!=null?j:nt.toLowerCase()),this.type="magic-word";const et=new RegExp(`^\\s*${nt}\\s*$`,ct?"u":"iu"),rt=new h.SyntaxToken(st,et,"magic-word-name",$,F,{});if(super.insertAt(rt),tt.length>0&&p.unshift([tt.join(":")]),this.name==="invoke")for(let lt=0;lt<2;lt++){const at=p.shift();if(!at)break;const ot=new l.D(at.join("="),`invoke-${lt?"function":"module"}`,$,F);super.insertAt(ot)}}}if(this.type==="template"){const st=(0,P.PN)((0,P.m9)(e)).split("#")[0].trim();if(!st||/\0\d+[eh!+-]\x7F|[<>[\]{}\n]|%[\da-f]{2}/u.test(st))throw F.pop(),new SyntaxError(`\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A${(0,P.jq)(st)}`);const tt=new l.D(e,"template-name",$,F,{});super.insertAt(tt)}const q=this.isTemplate();let k=1;for(let st=0;st<p.length;st++){const tt=p[st];!q&&!(this.name==="switch"&&st>0)&&(tt[0]=tt.join("="),tt.length=1),tt.length===1&&(tt.unshift(k),k++),this.insertAt(new o(...tt,$,F))}}setModifier(e){const{parserFunction:[,,p,$]}=this.getAttribute("config"),F=(0,P.PN)(e).trim();if(e&&!F.endsWith(":"))return!1;const N=F.slice(0,-1).toLowerCase(),S=p.includes(N),z=$.includes(N);return s(this,C)&&S||!s(this,C)&&(z||e==="")||this.length>1&&(S||z||e==="")?(this.setAttribute("modifier",e),A(this,C,S),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,"string"))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?`${this.firstChild.toString(e)}${this.length===1?"":":"}${this.childNodes.slice(1).map(p=>p.toString(e)).join("|")}`:super.toString(e,"|")}}}`}text(){const{childNodes:e,length:p,firstChild:$,modifier:F,type:N,name:S}=this;return N==="magic-word"&&S==="vardefine"?"":`{{${F}${N==="magic-word"?`${$.text()}${p===1?"":":"}${(0,P.fL)(e.slice(1),"|")}`:super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;default:return super.getAttribute(e)}}getGaps(){return 1}lint(e=this.getAbsoluteIndex()){const p=super.lint(e),{type:$,childNodes:F,length:N}=this;let S;if(!this.isTemplate())return p;const z=x(this,K,G).call(this);if(z)z.fragment!==void 0&&(S={start:e,...this.getRootNode().posFromIndex(e)},p.push((0,D.D)(F[$==="template"?0:1],S,"useless fragment")));else return S={start:e,...this.getRootNode().posFromIndex(e)},p.push((0,D.Y)(this,S,"missing module name")),p;if(z.valid||(S!=null||(S={start:e,...this.getRootNode().posFromIndex(e)}),p.push((0,D.D)(F[1],S,"illegal module name"))),$==="magic-word"&&N===2)return S!=null||(S={start:e,...this.getRootNode().posFromIndex(e)}),p.push((0,D.Y)(this,S,"missing module function")),p;const X=this.getDuplicatedArgs();return X.length>0&&(S!=null||(S={start:e,...this.getRootNode().posFromIndex(e)}),p.push(...X.flatMap(([,V])=>V).map(V=>(0,D.D)(V,S,"duplicated parameter")))),p}insertAt(e,p=this.length){return super.insertAt(e,p),e.anon?x(this,Y,Z).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(e=>e.type==="parameter")}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,p=!1,$=!0){const F=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");let N;return s(this,B).has(F)?N=s(this,B).get(F):(N=new Set(this.getAllArgs().filter(({name:S})=>F===S)),s(this,B).set(F,N)),N}getDuplicatedArgs(){return this.isTemplate()?[...s(this,B)].filter(([,{size:e}])=>e>1).map(([e,p])=>[e,[...p]]):[]}getPossibleValues(){const{type:e,name:p,childNodes:$,constructor:{name:F}}=this;if(e==="template")throw new Error(`${F}.getPossibleValues \u65B9\u6CD5\u4EC5\u4F9B\u7279\u5B9A\u9B54\u672F\u5B57\u4F7F\u7528\uFF01`);let N;switch(p){case"if":case"ifexist":case"ifexpr":case"iferror":N=2;break;case"ifeq":N=3;break;default:throw new Error(`${F}.getPossibleValues \u65B9\u6CD5\u4EC5\u4F9B\u7279\u5B9A\u9B54\u672F\u5B57\u4F7F\u7528\uFF01`)}const S=$.slice(N,N+2).map(({childNodes:[,z]})=>z);for(let z=0;z<S.length;){const{length:X,0:V}=S[z].childNodes.filter(q=>q.text().trim());if(X===0)S.splice(z,1);else if(X>1||V.type!=="magic-word")z++;else try{const q=V.getPossibleValues();S.splice(z,1,...q),z+=q.length}catch(q){z++}}return S}print(){const{childNodes:e,length:p,firstChild:$,modifier:F,type:N}=this;return`<span class="wpb-${N}">{{${F}${N==="magic-word"?`${$.print()}${p===1?"":":"}${(0,P.S0)(e.slice(1),{sep:"|"})}`:(0,P.S0)(e,{sep:"|"})}}}</span>`}}C=new WeakMap,B=new WeakMap,K=new WeakSet,G=function(){const n=this.type==="template",e=this.childNodes[n?0:1];return e&&this.normalizeTitle(e.text(),n?10:828)},Y=new WeakSet,Z=function(n){const e=this.getAnonArgs(),p=typeof n!="number";for(let $=p?e.indexOf(n):n-1;$<e.length;$++){const F=e[$],{name:N}=F,S=String($+1);N!==S&&(F.setAttribute("name",S),this.getArgs(S,!1,!1).add(F))}};var m=t(465),U=Object.defineProperty,R=(n,e,p)=>e in n?U(n,e,{enumerable:!0,configurable:!0,writable:!0,value:p}):n[e]=p,_=(n,e,p)=>(R(n,typeof e!="symbol"?e+"":e,p),p);class M extends I.Token{constructor(e,p=b.Z.getConfig(),$=[]){super(void 0,p,$,{}),_(this,"type","arg");for(let F=0;F<e.length;F++)if(F===0){const N=new l.D(e[F],"arg-name",p,$,{});super.insertAt(N)}else if(F>1){const N=new m.R(e[F],p,$,{});super.insertAt(N)}else{const N=new I.Token(e[F],p,$);N.type="arg-default",N.setAttribute("stage",2),super.insertAt(N)}}get default(){var e,p;return(p=(e=this.childNodes[1])==null?void 0:e.text())!=null?p:!1}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${(0,P.fL)(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}lint(e=this.getAbsoluteIndex()){if(!this.getAttribute("include"))return[(0,D.Y)(this,{start:e},"unexpected template argument")];const{childNodes:[p,$,...F]}=this,N=p.lint(e+3);if($&&N.push(...$.lint(e+4+String(p).length)),F.length>0){const S={start:e,...this.getRootNode().posFromIndex(e)};N.push(...F.map(z=>{const X=(0,D.D)(z,S,"invisible content inside triple braces"),{startIndex:V,startCol:q}=X;return{...X,startIndex:V-1,startCol:q-1}}))}return N}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}}const w=(n,e=b.Z.getConfig(),p=[])=>{var $,F,N,S,z,X;const V=`${($=e.excludes)!=null&&$.includes("heading")?"":"^(\0\\d+c\x7F)*={1,6}|"}\\[\\[|\\{{2,}|-\\{(?!\\{)`,{parserFunction:[,,,q]}=e,k=[],st={"=":`
2
+ `,"{":"\\}{2,}|\\|","-":"\\}-","[":"\\]\\]"},tt=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"]]);let dt=new RegExp(V,"gmu"),nt=dt.exec(n),ct=n.includes("}}"),j;for(;nt||j!==void 0&&j<=n.length&&((N=(F=k[k.length-1])==null?void 0:F[0])!=null&&N.startsWith("="));){if(nt!=null&&nt[1]){const[,{length:gt}]=nt;nt[0]=nt[0].slice(gt),nt.index+=gt}const{0:et,index:rt}=nt!=null?nt:{0:`
3
+ `,index:n.length},lt=(S=k.pop())!=null?S:{},{0:at,index:ot,parts:ut,findEqual:wt,pos:Tt}=lt,Ot=et==="="&&wt;if(et==="]]"||et==="}-")j=rt+2;else if(et===`
4
+ `){j=rt+1;const{pos:gt,findEqual:ft}=(z=k[k.length-1])!=null?z:{};if(gt===void 0||ft||(0,P.PN)(n.slice(gt,ot))!==""){const xt=/^(={1,6})(.+)\1((?:\s|\0\d+c\x7F)*)$/u.exec(n.slice(ot,rt));xt&&(n=`${n.slice(0,ot)}\0${p.length}h\x7F${n.slice(rt)}`,j=ot+4+String(p.length).length,new L.D(xt[1].length,xt.slice(2),e,p))}}else if(et==="|"||Ot)j=rt+1,ut[ut.length-1].push(n.slice(Tt,rt)),et==="|"&&ut.push([]),lt.pos=j,lt.findEqual=et==="|",k.push(lt);else if(et.startsWith("}}")){const gt=et.slice(0,Math.min(at.length,3)),ft=at.length-gt.length,{length:xt}=p;j=rt+gt.length,ut[ut.length-1].push(n.slice(Tt,rt));let Ct=!1,At="t";if(gt.length===3){const ht=ut.map(W=>W.join("=")),$t=ht.length>1&&(0,P.PN)(ht[1]).trim();new M(ht,e,p),$t&&$t.endsWith(":")&&q.includes($t.slice(0,-1).toLowerCase())&&(At="s")}else try{new a(ut[0][0],ut.slice(1),e,p);const ht=(0,P.PN)(ut[0][0]).trim();tt.has(ht)?At=tt.get(ht):/^(?:filepath|(?:full|canonical)urle?):.|^server$/iu.test(ht)?At="m":/^#vardefine:./iu.test(ht)&&(At="c")}catch(ht){if(ht instanceof SyntaxError&&ht.message.startsWith("\u975E\u6CD5\u7684\u6A21\u677F\u540D\u79F0\uFF1A"))j=ot+at.length,Ct=!0;else throw ht}Ct||(n=`${n.slice(0,ot+ft)}\0${xt}${At}\x7F${n.slice(j)}`,j=ot+ft+3+String(xt).length,ft>1?k.push({0:at.slice(0,ft),index:ot,pos:ot+ft,parts:[[]]}):ft===1&&n[ot-1]==="-"&&k.push({0:"-{",index:ot-1,pos:ot+1,parts:[[]]}))}else j=rt+et.length,et.startsWith("{")&&(nt.pos=j,nt.parts=[[]]),k.push(..."0"in lt?[lt]:[],nt);ct&&(ct=n.slice(j).includes("}}"));let vt=k[k.length-1];!ct&&((X=vt==null?void 0:vt[0])!=null&&X.startsWith("{"))&&(k.pop(),vt=k[k.length-1]),dt=new RegExp(V+(vt?`|${st[vt[0][0]]}${vt.findEqual?"|=":""}`:""),"gmu"),dt.lastIndex=j,nt=dt.exec(n)}return n}},551:(Q,y,t)=>{t.r(y),t.d(y,{parseCommentAndExt:()=>i});var P=t(891),b=t(541),L=Object.defineProperty,D=(s,d,A)=>d in s?L(s,d,{enumerable:!0,configurable:!0,writable:!0,value:A}):s[d]=A,I=(s,d,A)=>(D(s,typeof d!="symbol"?d+"":d,A),A);class O extends b.Token{constructor(){super(...arguments),I(this,"type","onlyinclude")}toString(d){return`<onlyinclude>${super.toString()}</onlyinclude>`}getAttribute(d){return d==="padding"?13:d==="plain"||super.getAttribute(d)}print(){return super.print({pre:'<span class="wpb-ext">&lt;onlyinclude&gt;</span>',post:'<span class="wpb-ext">&lt;/onlyinclude&gt;</span>'})}}var E=t(826),f=t(959),v=t(415),o=Object.defineProperty,l=(s,d,A)=>d in s?o(s,d,{enumerable:!0,configurable:!0,writable:!0,value:A}):s[d]=A,h=(s,d,A)=>(l(s,typeof d!="symbol"?d+"":d,A),A);class u extends(0,f.a)(v.m){constructor(d,A="",x,C,B=P.Z.getConfig(),K=[]){super(d,A,x!=null?x:"",x===void 0||C!=null?C:"",B,K),h(this,"type","include")}}var c=t(895),r=t(976);const i=(s,d=P.Z.getConfig(),A=[],x=!1)=>{const C="<onlyinclude>",B="</onlyinclude>",{length:K}=C;if(x){let m=s.indexOf(C),U=s.indexOf(B,m+K);if(m!==-1&&U!==-1){let R="";for(;m!==-1&&U!==-1;){const _=`\0${A.length}e\x7F`;new O(s.slice(m+K,U),d,A),m>0?(new E.O(s.slice(0,m),d,A),R+=`\0${A.length-1}c\x7F${_}`):R+=_,s=s.slice(U+K+1),m=s.indexOf(C),U=s.indexOf(B,m+K)}return`${R}${s}`}}const G=d.ext.join("|"),Y=x?"includeonly":"(?:no|only)include",Z=x?"noinclude":"includeonly",a=new RegExp(`<!--.*?(?:-->|$)|<${Y}(?:\\s[^>]*?)?>|</${Y}\\s*>|<(${G})(\\s[^>]*?)?(?:/>|>(.*?)</(\\1\\s*)>)|<(${Z})(\\s[^>]*?)?(?:/>|>(.*?)(?:</(\\5\\s*)>|$))`,"gisu");return s.replace(a,(m,U,R,_,M,w,n,e,p)=>{const $=`\0${A.length}${U?"e":"c"}\x7F`;if(U)new c.$(U,R,_,M,d,A);else if(m.startsWith("<!--")){const F=m.endsWith("-->");new r.T(m.slice(4,F?-3:void 0),F,d,A)}else w?new u(w,n,e,p,d,A):new E.O(m,d,A);return $})}},370:(Q,y,t)=>{t.r(y),t.d(y,{parseConverter:()=>Y});var P=t(891),b=t(467);const L=Z=>{class a extends Z{}return a};var D=t(541),I=t(169),O=t(34),E=Object.defineProperty,f=(Z,a,m)=>a in Z?E(Z,a,{enumerable:!0,configurable:!0,writable:!0,value:m}):Z[a]=m,v=(Z,a,m)=>(f(Z,typeof a!="symbol"?a+"":a,m),m),o=(Z,a,m)=>{if(!a.has(Z))throw TypeError("Cannot "+m)},l=(Z,a,m)=>(o(Z,a,"read from private field"),m?m.call(Z):a.get(Z)),h=(Z,a,m)=>{if(a.has(Z))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(Z):a.set(Z,m)},u=(Z,a,m,U)=>(o(Z,a,"write to private field"),U?U.call(Z,m):a.set(Z,m),m),c;const r=new Set(["A","T","R","D","-","H","N"]);class i extends D.Token{constructor(a,m=P.Z.getConfig(),U=[]){super(void 0,m,U,{}),v(this,"type","converter-flags"),h(this,c,void 0),this.append(...a.map(R=>new O.D(R,"converter-flag",m,U)))}afterBuild(){u(this,c,this.childNodes.map(a=>a.text().trim()))}toString(a){return super.toString(a,";")}text(){return super.text(";")}getGaps(){return 1}getUnknownFlags(){return new Set(l(this,c).filter(a=>/\{{3}[^{}]+\}{3}/u.test(a)))}getVariantFlags(){const a=new Set(this.getAttribute("config").variants);return new Set(l(this,c).filter(m=>a.has(m)))}lint(a=this.getAbsoluteIndex()){const m=this.getVariantFlags(),U=this.getUnknownFlags(),R=new Set(l(this,c).filter($=>r.has($))),{length:_}=l(this,c).filter($=>!$),M=l(this,c).length-U.size-_,w=super.lint(a);if(m.size===M||R.size===M)return w;const n={start:a,...this.getRootNode().posFromIndex(a)},{childNodes:e,length:p}=this;for(let $=0;$<p;$++){const F=e[$],N=F.text().trim();if(N&&!m.has(N)&&!U.has(N)&&(m.size>0||!R.has(N))){const S=(0,I.D)(F,n,"invalid conversion flag");w.push(S)}}return w}print(){return super.print({sep:";"})}}c=new WeakMap;var s=Object.defineProperty,d=(Z,a,m)=>a in Z?s(Z,a,{enumerable:!0,configurable:!0,writable:!0,value:m}):Z[a]=m,A=(Z,a,m)=>(d(Z,typeof a!="symbol"?a+"":a,m),m);class x extends D.Token{constructor(a,m=!0,U=P.Z.getConfig(),R=[]){if(super(void 0,U,R),A(this,"type","converter-rule"),m){const _=a.indexOf(":"),M=a.slice(0,_).indexOf("=>"),w=M===-1?a.slice(0,_):a.slice(M+2,_);U.variants.includes(w.trim())?(super.insertAt(new O.D(w,"converter-rule-variant",U,R)),super.insertAt(new O.D(a.slice(_+1),"converter-rule-to",U,R)),M!==-1&&super.insertAt(new O.D(a.slice(0,M),"converter-rule-from",U,R),0)):super.insertAt(new O.D(a,"converter-rule-noconvert",U,R))}else super.insertAt(new O.D(a,"converter-rule-noconvert",U,R))}toString(a){const{childNodes:m}=this;if(m.length===3){const[U,R,_]=m;return`${U.toString(a)}=>${R.toString(a)}:${_.toString(a)}`}return super.toString(a,":")}text(){const{childNodes:a}=this;if(a.length===3){const[m,U,R]=a;return`${m.text()}=>${U.text()}:${R.text()}`}return super.text(":")}getGaps(a){return a===0&&this.length===3?2:1}print(){const{childNodes:a}=this;if(a.length===3){const[m,U,R]=a;return`<span class="wpb-converter-rule">${m.print()}=>${U.print()}:${R.print()}</span>`}return super.print({sep:":"})}}var C=Object.defineProperty,B=(Z,a,m)=>a in Z?C(Z,a,{enumerable:!0,configurable:!0,writable:!0,value:m}):Z[a]=m,K=(Z,a,m)=>(B(Z,typeof a!="symbol"?a+"":a,m),m);class G extends L(D.Token){constructor(a,m,U=P.Z.getConfig(),R=[]){super(void 0,U,R),K(this,"type","converter"),this.append(new i(a,U,R));const[_]=m,M=_.includes(":"),w=new x(_,M,U,R);M&&w.length===1?this.insertAt(new x(m.join(";"),!1,U,R)):this.append(w,...m.slice(1).map(n=>new x(n,!0,U,R)))}toString(a){const{childNodes:[m,...U]}=this;return`-{${m.toString()}${m.length>0?"|":""}${U.map(R=>R.toString()).join(";")}}-`}text(){const{childNodes:[a,...m]}=this;return`-{${a.text()}|${(0,b.fL)(m,";")}}-`}getAttribute(a){return a==="padding"?2:super.getAttribute(a)}getGaps(a){return a||this.firstChild.length>0?1:0}print(){const{childNodes:[a,...m]}=this;return`<span class="wpb-converter">-{${a.print()}${a.length>0?"|":""}${(0,b.S0)(m,{sep:";"})}}-</span>`}}const Y=(Z,a=P.Z.getConfig(),m=[])=>{const U=/-\{/gu,R=/-\{|\}-/gu,_=[];let M=U,w=M.exec(Z);for(;w;){const{0:n,index:e}=w;if(n==="}-"){const p=_.pop(),{length:$}=m,F=Z.slice(p.index+2,e),N=F.indexOf("|"),[S,z]=N===-1?[[],F]:[F.slice(0,N).split(";"),F.slice(N+1)],X=z.replace(/(&[#a-z\d]+);/giu,"$1"),V=`(?:${a.variants.join("|")})`,q=X.split(new RegExp(`;(?=\\s*(?:${V}|[^;]*?=>\\s*${V})\\s*:)`,"u")).map(k=>k.replace(/\x01/gu,";"));new G(S,q,a,m),Z=`${Z.slice(0,p.index)}\0${$}v\x7F${Z.slice(e+2)}`,_.length===0&&(M=U),M.lastIndex=p.index+3+String($).length}else _.push(w),M=R,M.lastIndex=e+2;w=M.exec(Z)}return Z}},418:(Q,y,t)=>{t.r(y),t.d(y,{parseExternalLinks:()=>D});var P=t(467),b=t(891),L=t(876);const D=(I,O=b.Z.getConfig(),E=[])=>{const f=new RegExp(`\\[((?:(?:${O.protocol}|//)${P._X}|\0\\d+m\x7F)${P.Qk})(\\p{Zs}*)([^\\]-\b
5
+ -\uFFFD]*)\\]`,"giu");return I.replace(f,(v,o,l,h)=>{const{length:u}=E,c=/&[lg]t;/u.exec(o);return c&&(o=o.slice(0,c.index),l="",h=`${o.slice(c.index)}${l}${h}`),new L.a(o,l,h,O,E),`\0${u}w\x7F`})}},362:(Q,y,t)=>{t.r(y),t.d(y,{parseHrAndDoubleUnderscore:()=>u});var P=t(891),b=t(439),L=Object.defineProperty,D=(c,r,i)=>r in c?L(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,I=(c,r,i)=>(D(c,typeof r!="symbol"?r+"":r,i),i);class O extends b.h{constructor(){super(...arguments),I(this,"type","hr")}}var E=t(959),f=Object.defineProperty,v=(c,r,i)=>r in c?f(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,o=(c,r,i)=>(v(c,typeof r!="symbol"?r+"":r,i),i);class l extends(0,E.a)(b.h){constructor(r,i,s=P.Z.getConfig(),d=[]){super(r,s,d),o(this,"type","double-underscore")}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}toString(r){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}}var h=t(485);const u=({firstChild:{data:c},type:r,name:i},s=P.Z.getConfig(),d=[])=>{const{doubleUnderscore:A}=s,x=new Set(A[0]),C=new Set(A[1]);return r!=="root"&&(r!=="ext-inner"||i!=="poem")&&(c=`\0${c}`),c=c.replace(/^((?:\0\d+c\x7F)*)(-{4,})/gmu,(B,K,G)=>(new O(G,s,d),`${K}\0${d.length-1}r\x7F`)).replace(new RegExp(`__(${A.flat().join("|")})__`,"giu"),(B,K)=>{const G=C.has(K);return G||x.has(K.toLowerCase())?(new l(K,G,s,d),`\0${d.length-1}u\x7F`):B}).replace(/^((?:\0\d+c\x7F)*)(={1,6})(.+)\2((?:[^\S\n]|\0\d+c\x7F)*)$/gmu,(B,K,G,Y,Z)=>{const a=`${K}\0${d.length}h\x7F`;return new h.D(G.length,[Y,Z],s,d),a}),r==="root"||r==="ext-inner"&&i==="poem"?c:c.slice(1)}},980:(Q,y,t)=>{t.r(y),t.d(y,{parseHtml:()=>d});var P=t(891),b=t(83),L=t(169),D=t(467),I=t(541),O=Object.defineProperty,E=(A,x,C)=>x in A?O(A,x,{enumerable:!0,configurable:!0,writable:!0,value:C}):A[x]=C,f=(A,x,C)=>(E(A,typeof x!="symbol"?x+"":x,C),C),v=(A,x,C)=>{if(!x.has(A))throw TypeError("Cannot "+C)},o=(A,x,C)=>(v(A,x,"read from private field"),C?C.call(A):x.get(A)),l=(A,x,C)=>{if(x.has(A))throw TypeError("Cannot add the same private member more than once");x instanceof WeakSet?x.add(A):x.set(A,C)},h=(A,x,C,B)=>(v(A,x,"write to private field"),B?B.call(A,C):x.set(A,C),C),u,c,r;const i=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]);class s extends I.Token{constructor(x,C,B,K,G=P.Z.getConfig(),Y=[]){super(void 0,G,Y),f(this,"type","html"),l(this,u,void 0),l(this,c,void 0),l(this,r,void 0),this.insertAt(C),this.setAttribute("name",x.toLowerCase()),h(this,u,B),h(this,c,K),h(this,r,x)}get closing(){return o(this,u)}toString(x){return`<${o(this,u)?"/":""}${o(this,r)}${super.toString()}${o(this,c)?"/":""}>`}text(){return`<${o(this,u)?"/":""}${o(this,r)}${o(this,u)?"":super.text()}${o(this,c)?"/":""}>`}getAttribute(x){return x==="padding"?o(this,r).length+(o(this,u)?2:1):super.getAttribute(x)}lint(x=this.getAbsoluteIndex()){const C=super.lint(x);let B;this.name==="h1"&&!o(this,u)&&(B=(0,L.Y)(this,{start:x},"<h1>"),C.push(B)),this.closest("table-attrs")&&(B!=null||(B=(0,L.Y)(this,{start:x},"")),C.push({...B,message:P.Z.msg("HTML tag in table attributes")}));try{this.findMatchingTag()}catch(K){if(K instanceof SyntaxError){const{message:G}=K;B!=null||(B=(0,L.Y)(this,{start:x},""));const[Y]=G.split(":"),Z={...B,message:P.Z.msg(Y)};if(Y==="unclosed tag")Z.severity="warning";else if(Y==="unmatched closing tag"){const a=this.closest("magic-word");a&&i.has(a.name)&&(Z.severity="warning")}C.push(Z)}}return C}findMatchingTag(){const{html:x}=this.getAttribute("config"),{name:C,parentNode:B}=this,K=(0,D.jq)(String(this));if(o(this,u)&&(o(this,c)||x[2].includes(C)))throw new SyntaxError(`tag that is both closing and self-closing: ${K}`);if(x[2].includes(C)||o(this,c)&&x[1].includes(C))return this;if(o(this,c)&&x[0].includes(C))throw new SyntaxError(`invalid self-closing tag: ${K}`);if(!B)return;const{childNodes:G}=B,Y=G.indexOf(this),Z=o(this,u)?G.slice(0,Y).reverse().filter(({type:m,name:U})=>m==="html"&&U===C):G.slice(Y+1).filter(({type:m,name:U})=>m==="html"&&U===C);let a=o(this,u)?-1:1;for(const m of Z)if(o(m,u)?a--:a++,a===0)return m;throw new SyntaxError(`${o(this,u)?"unmatched closing":"unclosed"} tag: ${K}`)}print(){return super.print({pre:`&lt;${o(this,u)?"/":""}${o(this,r)}`,post:`${o(this,c)?"/":""}&gt;`})}}u=new WeakMap,c=new WeakMap,r=new WeakMap;const d=(A,x=P.Z.getConfig(),C=[])=>{const B=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,K=new Set(x.html.flat()),G=A.split("<");let Y=G.shift();for(const Z of G){const a=B.exec(Z),m=a==null?void 0:a[2],U=m==null?void 0:m.toLowerCase();if(!a||!K.has(U)){Y+=`<${Z}`;continue}const[,R,,_="",M,w]=a,n=new b.x(_,"html-attrs",U,x,C),e=n.getAttr("itemprop");if(U==="meta"&&(e===void 0||n.getAttr("content")===void 0)||U==="link"&&(e===void 0||n.getAttr("href")===void 0)){Y+=`<${Z}`,C.pop();continue}Y+=`\0${C.length}x\x7F${w}`,new s(m,n,R==="/",M==="/>",x,C)}return Y}},106:(Q,y,t)=>{t.r(y),t.d(y,{parseLinks:()=>v});var P=t(891),b=t(524),L=t(533),D=t(299),I=Object.defineProperty,O=(o,l,h)=>l in o?I(o,l,{enumerable:!0,configurable:!0,writable:!0,value:h}):o[l]=h,E=(o,l,h)=>(O(o,typeof l!="symbol"?l+"":l,h),h);class f extends D.o{constructor(){super(...arguments),E(this,"type","category")}}const v=(o,l=P.Z.getConfig(),h=[])=>{const{parseQuotes:u}=t(704),c=l.inExt?/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]]))?\]\](.*)$/su:/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]])?)?\]\](.*)$/su,r=/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(\||\0\d+!\x7F)(.*)$/su,i=new RegExp(`^\\s*(?:${l.protocol})`,"iu"),s=o.split("[[");let d=s.shift();for(let A=0;A<s.length;A++){let x=!1,C,B,K,G;const Y=s[A],Z=c.exec(Y);if(Z)[,C,B,K,G]=Z,G.startsWith("]")&&(K!=null&&K.includes("["))&&(K+="]",G=G.slice(1));else{const M=r.exec(Y);M&&(x=!0,[,C,B,K]=M)}if(C===void 0||i.test(C)||/\0\d+[exhbru]\x7F/u.test(C)){d+=`[[${Y}`;continue}const a=C.trim().startsWith(":");if(a&&x){d+=`[[${Y}`;continue}const m=P.Z.normalizeTitle(C,0,!1,l,!0,!0,!0),{ns:U,valid:R}=m;if(R){if(x){if(U!==6){d+=`[[${Y}`;continue}let M=!1;for(A++;A<s.length;A++){const w=s[A],n=w.split("]]");if(n.length>2){M=!0,K+=`[[${n[0]}]]${n[1]}`,G=n.slice(2).join("]]");break}else if(n.length===2)K+=`[[${n[0]}]]${n[1]}`;else{K+=`[[${w}`;break}}if(K=v(K,l,h),!M){d+=`[[${C}${B}${K}`;continue}}}else{d+=`[[${Y}`;continue}K&&(K=u(K,l,h)),d+=`\0${h.length}l\x7F${G}`;let _=b.h;a||(U===6?_=L.q:U===14&&(_=f)),K===void 0&&B&&(K=""),new _(C,K,l,h,B)}return d}},904:(Q,y,t)=>{t.r(y),t.d(y,{parseList:()=>f});var P=t(891),b=t(933),L=Object.defineProperty,D=(v,o,l)=>o in v?L(v,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):v[o]=l,I=(v,o,l)=>(D(v,typeof o!="symbol"?o+"":o,l),l);class O extends b.T{constructor(){super(...arguments),I(this,"type","list")}}var E=t(461);const f=(v,o=P.Z.getConfig(),l=[])=>{const h=/^((?:\0\d+c\x7F)*)([;:*#]+)/u.exec(v);if(!h)return v;const[u,c,r]=h;let i=`${c}\0${l.length}d\x7F${v.slice(u.length)}`,s=r.split(";").length-1;if(new O(r,o,l),!s)return i;let d=/:+|-\{/gu,A=d.exec(i),x=0;for(;A&&s;){const{0:C,index:B}=A;if(C.startsWith(":")){if(C.length>=s)return new E.k(":".repeat(s),o,l),`${i.slice(0,B)}\0${l.length-1}d\x7F${i.slice(B+s)}`;i=`${i.slice(0,B)}\0${l.length}d\x7F${i.slice(d.lastIndex)}`,s-=C.length,d.lastIndex=B+4+String(l.length).length,new E.k(C,o,l)}else if(C==="-{"){if(!x){const{lastIndex:K}=d;d=/-\{|\}-/gu,d.lastIndex=K}x++}else if(x--,!x){const{lastIndex:K}=d;d=/:+|-\{/gu,d.lastIndex=K}A=d.exec(i)}return i}},311:(Q,y,t)=>{t.r(y),t.d(y,{parseMagicLinks:()=>D});var P=t(467),b=t(891),L=t(686);const D=(I,O=b.Z.getConfig(),E=[])=>{const f=new RegExp(`(^|[^\\p{L}\\d_])(?:${O.protocol})(${P._X}${P.Qk})`,"giu");return I.replace(f,(v,o,l)=>{let h="",u=o?v.slice(1):v;const c=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(u);c&&(h=u.slice(c.index),u=u.slice(0,c.index));const r=new RegExp(`[,;.:!?${u.includes("(")?"":")"}]+$`,"u"),i=r.exec(u);if(i){let s=0;i[0].startsWith(";")&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(u.slice(0,i.index))&&(s=1),h=`${u.slice(i.index+s)}${h}`,u=u.slice(0,i.index+s)}return h.length>=l.length?v:(new L.k(u,!1,O,E),`${o}\0${E.length-1}w\x7F${h}`)})}},704:(Q,y,t)=>{t.r(y),t.d(y,{parseQuotes:()=>f});var P=t(891),b=t(169),L=t(439),D=Object.defineProperty,I=(v,o,l)=>o in v?D(v,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):v[o]=l,O=(v,o,l)=>(I(v,typeof o!="symbol"?o+"":o,l),l);class E extends L.h{constructor(){super(...arguments),O(this,"type","quote")}lint(o=this.getAbsoluteIndex()){const{previousSibling:l,nextSibling:h}=this,u=P.Z.msg('lonely "$1"',"'"),c=[];let r;if((l==null?void 0:l.type)==="text"&&l.data.endsWith("'")){r=(0,b.Y)(this,{start:o},u);const{startIndex:i,startLine:s,startCol:d}=r,[,{length:A}]=l.data.match(/(?:^|[^'])('+)$/u),x=o-A;c.push({...r,startIndex:x,endIndex:i,startCol:d-A,endLine:s,endCol:d})}if((h==null?void 0:h.type)==="text"&&h.data.startsWith("'")){r!=null||(r=(0,b.Y)(this,{start:o},u));const{endIndex:i,endLine:s,endCol:d}=r,[{length:A}]=h.data.match(/^'+/u),x=i+A;c.push({...r,startIndex:i,endIndex:x,startLine:s,startCol:d,endCol:d+A})}return c}}const f=(v,o=P.Z.getConfig(),l=[])=>{var h;const u=v.split(/('{2,})/u),{length:c}=u;if(c===1)return v;let r=0,i=0,s,d,A;for(let x=1;x<c;x+=2){const{length:C}=u[x];switch(C){case 2:i++;break;case 4:u[x-1]+="'",u[x]="'''";case 3:if(r++,s!==void 0)break;u[x-1].endsWith(" ")?d===void 0&&A===void 0&&(A=x):u[x-1].slice(-2,-1)===" "?s=x:d!=null||(d=x);break;default:u[x-1]+="'".repeat(C-5),u[x]="'''''",i++,r++}}if(i%2===1&&r%2===1){const x=(h=s!=null?s:d)!=null?h:A;x!==void 0&&(u[x]="''",u[x-1]+="'")}for(let x=1;x<c;x+=2)new E(u[x],o,l),u[x]=`\0${l.length-1}q\x7F`;return u.join("")}},508:(Q,y,t)=>{t.r(y),t.d(y,{parseTable:()=>M});var P=t(891),b=t(541),L=t(169),D=t(223),I=t(669),O=t(83);class E extends b.Token{constructor(n,e,p,$=P.Z.getConfig(),F=[],N={}){super(void 0,$,F,N),this.append(new I.SyntaxToken(e,n,"table-syntax",$,F,{}),new O.x(p,"table-attrs",this.type,$,F))}}class f extends E{lint(n=this.getAbsoluteIndex()){const e=super.lint(n),p=this.childNodes.find(({type:S})=>S==="table-inter");if(!p)return e;const $=p.childNodes.find(S=>S.text().trim()),F=/^\s*(?:!|\{\{\s*![!-]?\s*\}\})/u;if(!$||F.test(String($))||$.type==="arg"&&F.test($.default||""))return e;if($.type==="magic-word")try{if($.getPossibleValues().every(S=>F.test(S.text())))return e}catch(S){}const N=(0,L.D)(p,{start:n},"content to be moved out from the table");return e.push({...N,startIndex:N.startIndex+1,startLine:N.startLine+1,startCol:0}),e}}var v=Object.defineProperty,o=(w,n,e)=>n in w?v(w,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):w[n]=e,l=(w,n,e)=>(o(w,typeof n!="symbol"?n+"":n,e),e);const h=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u;class u extends f{constructor(n,e,p=P.Z.getConfig(),$=[]){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,n,e,p,$,{}),l(this,"type","table")}get closed(){return this.lastChild.type==="table-syntax"}lint(n=this.getAbsoluteIndex()){const e=super.lint(n);if(!this.closed){const{firstChild:p}=this,$=(0,L.D)(p,{start:n},"unclosed table");e.push($)}return e}close(n=`
6
+ |}`,e=!1){const p=this.getAttribute("config"),$=this.getAttribute("accum"),F=[n],N=D.j.run(()=>super.insertAt(new I.SyntaxToken(void 0,h,"table-syntax",p,$,{})));this.lastChild.replaceChildren(...F)}}var c=Object.defineProperty,r=(w,n,e)=>n in w?c(w,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):w[n]=e,i=(w,n,e)=>(r(w,typeof n!="symbol"?n+"":n,e),e);class s extends f{constructor(n,e,p=P.Z.getConfig(),$=[]){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,n,e,p,$,{}),i(this,"type","tr")}}var d=Object.defineProperty,A=(w,n,e)=>n in w?d(w,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):w[n]=e,x=(w,n,e)=>(A(w,typeof n!="symbol"?n+"":n,e),e),C=(w,n,e)=>{if(!n.has(w))throw TypeError("Cannot "+e)},B=(w,n,e)=>(C(w,n,"read from private field"),e?e.call(w):n.get(w)),K=(w,n,e)=>{if(n.has(w))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(w):n.set(w,e)},G=(w,n,e,p)=>(C(w,n,"write to private field"),p?p.call(w,e):n.set(w,e),e),Y=(w,n,e,p)=>({set _($){G(w,n,$,e)},get _(){return B(w,n,p)}}),Z=(w,n,e)=>(C(w,n,"access private method"),e),a,m,U;class R extends E{constructor(n,e,p=P.Z.getConfig(),$=[]){var F;let N=e==null?void 0:e.match(/\||\0\d+!\x7F/u),S=N?e.slice(0,N.index):"";/\[\[|-\{/u.test(S)&&(N=void 0,S=""),super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,n,S,p,$),K(this,m),x(this,"type","td"),K(this,a,""),N&&([Y(this,a)._]=N);const z=new b.Token(e==null?void 0:e.slice(((F=N==null?void 0:N.index)!=null?F:NaN)+B(this,a).length),p,$);z.type="td-inner",z.setAttribute("stage",4),this.insertAt(z)}get subtype(){return Z(this,m,U).call(this).subtype}afterBuild(){B(this,a).includes("\0")&&G(this,a,this.buildFromStr(B(this,a),"string"))}toString(n){const{childNodes:[e,p,$]}=this;return`${e.toString()}${p.toString()}${B(this,a)}${$.toString()}`}text(){const{childNodes:[n,e,p]}=this;return`${n.text()}${e.text()}${B(this,a)}${p.text()}`}getGaps(n){return n===1?B(this,a).length:0}lint(n=this.getAbsoluteIndex()){const e=super.lint(n);n+=this.getRelativeIndex(this.length-1);for(const p of this.lastChild.childNodes)p.type==="text"&&p.data.includes("|")&&e.push((0,L.D)(p,{start:n},'additional "|" in a table cell',"warning"));return e}print(){const{childNodes:[n,e,p]}=this;return`<span class="wpb-td">${n.print()}${e.print()}${B(this,a)}${p.print()}</span>`}}a=new WeakMap,m=new WeakSet,U=function(){const w=this.firstChild.text(),n=w[w.length-1];let e="td";return n==="!"?e="th":n==="+"&&(e="caption"),{subtype:e}};var _=t(461);const M=({firstChild:{data:w},type:n,name:e},p=P.Z.getConfig(),$=[])=>{const F=[],N=w.split(`
7
+ `);let S=n==="root"||n==="parameter-value"||n==="ext-inner"&&e==="poem"?"":`
8
+ ${N.shift()}`;const z=(X,V)=>{if(!V){S+=X;return}const{lastChild:q}=V;if(q.constructor===b.Token)q.setText(String(q)+X);else{const k=new b.Token(X,p,$);k.type="table-inter",k.setAttribute("stage",3),V.insertAt(k)}};for(const X of N){let V=F.pop();const[q]=/^(?:\s|\0\d+c\x7F)*/u.exec(X),k=X.slice(q.length),st=/^(:*)((?:\s|\0\d+c\x7F)*)(\{\||\{(?:\0\d+c\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(k);if(st){for(;V&&V.type!=="td";)V=F.pop();const[,et,rt,lt,at]=st;et&&new _.k(et,p,$),z(`
9
+ ${q}${et&&`\0${$.length-1}d\x7F`}${rt}\0${$.length}b\x7F`,V),F.push(...V?[V]:[],new u(lt,at,p,$));continue}else if(!V){S+=`
10
+ ${X}`;continue}const tt=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(k);if(!tt){z(`
11
+ ${X}`,V),F.push(V);continue}const[,dt,nt,ct,j]=tt;if(dt){for(;V.type!=="table";)V=F.pop();V.close(`
12
+ ${q}${dt}`,!0),z(j,F[F.length-1])}else if(nt){V.type==="td"&&(V=F.pop()),V.type==="tr"&&(V=F.pop());const et=new s(`
13
+ ${q}${nt}`,j,p,$);F.push(V,et),V.insertAt(et)}else{V.type==="td"&&(V=F.pop());const et=ct==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu;let rt=et.exec(j),lt=0,at=`
14
+ ${q}${ct}`;for(;rt;)V.insertAt(new R(at,j.slice(lt,rt.index),p,$)),{lastIndex:lt}=et,[at]=rt,rt=et.exec(j);const ot=new R(at,j.slice(lt),p,$);F.push(V,ot),V.insertAt(ot)}}return S.slice(1)}},34:(Q,y,t)=>{t.d(y,{D:()=>L});var P=t(891),b=t(541);class L extends b.Token{constructor(I,O,E=P.Z.getConfig(),f=[],v){super(I,E,f,v),this.type=O}}},83:(Q,y,t)=>{t.d(y,{x:()=>Y});var P=t(169),b=t(467),L=t(891),D=t(541),I=t(34),O=t(444),E=(Z,a,m)=>{if(!a.has(Z))throw TypeError("Cannot "+m)},f=(Z,a,m)=>(E(Z,a,"read from private field"),m?m.call(Z):a.get(Z)),v=(Z,a,m)=>{if(a.has(Z))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(Z):a.set(Z,m)},o=(Z,a,m,U)=>(E(Z,a,"write to private field"),U?U.call(Z,m):a.set(Z,m),m),l,h;const u=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"]),c=new Set(["align"]),r=new Set(["cite"]),i=new Set(["cite","datetime"]),s=new Set(["width"]),d=new Set(["align","valign","abbr","axis","headers","scope","rowspan","colspan","width","height","bgcolor"]),A=new Set(["type"]),x={div:c,h1:c,h2:c,h3:c,h4:c,h5:c,h6:c,blockquote:r,q:r,p:c,br:new Set(["clear"]),pre:s,ins:i,del:i,ul:A,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set(["summary","width","border","frame","rules","cellspacing","cellpadding","align","bgcolor"]),caption:c,tr:new Set(["bgcolor","align","valign"]),td:d,th:d,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:s,rt:new Set(["rbspan"]),data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails","type"]),poem:new Set(["compact","align"]),categorytree:new Set(["align","hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline","align"])},C=new Set,B={nowiki:C,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:C,inputbox:C,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:C,poll:new Set(["id","show-results-before-voting"]),sm2:A,flashmp3:A,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"])},K=new RegExp("expression|(?:filter|accelerator|-o-link(?:-source)?|-o-replace)\\s*:|(?:url|image(?:-set)?)\\s*\\(|attr\\s*\\([^)]+[\\s,]url","u");class G extends D.Token{constructor(a,m,U,R="",_,M=[],w=L.Z.getConfig(),n=[]){const e=new I.D(U,"attr-key",w,n,{});let p;if(U==="title"||m==="img"&&U==="alt")p=new D.Token(_,w,n,{}),p.type="attr-value",p.setAttribute("stage",O.C-1);else if(m==="gallery"&&U==="caption"){const $={...w,excludes:[...w.excludes,"quote","extLink","magicLink","list"]};p=new D.Token(_,$,n,{}),p.type="attr-value",p.setAttribute("stage",5)}else if(m==="choose"&&(U==="before"||U==="after")){const $={...w,excludes:[...w.excludes,"heading","html","table","hr","list"]};p=new D.Token(_,$,n,{}),p.type="attr-value",p.setAttribute("stage",1)}else p=new I.D(_,"attr-value",w,n,{});super(void 0,w,n),v(this,l,void 0),v(this,h,void 0),this.type=a,this.append(e,p),o(this,l,R),o(this,h,M),this.tag=m,this.setAttribute("name",(0,b.PN)(U).trim().toLowerCase())}get balanced(){return!f(this,l)||f(this,h)[0]===f(this,h)[1]}afterBuild(){f(this,l).includes("\0")&&o(this,l,this.buildFromStr(f(this,l),"string")),this.parentNode&&this.setAttribute("tag",this.parentNode.name),this.setAttribute("name",this.firstChild.text().trim().toLowerCase())}toString(a){const[m="",U=""]=f(this,h);return f(this,l)?`${super.toString(a,`${f(this,l)}${m}`)}${U}`:this.firstChild.toString(a)}text(){return f(this,l)?`${super.text(`${f(this,l).trim()}"`)}"`:this.firstChild.text()}getGaps(){var a,m;return f(this,l)?f(this,l).length+((m=(a=f(this,h)[0])==null?void 0:a.length)!=null?m:0):0}lint(a=this.getAbsoluteIndex()){var m;const U=super.lint(a),{balanced:R,firstChild:_,lastChild:M,type:w,name:n,tag:e}=this,p=this.getValue();let $;if(!R){const F=this.getRootNode();$={start:a,...F.posFromIndex(a)};const N=(0,P.D)(M,$,"unclosed quotes","warning"),S=N.startIndex-1;U.push({...N,startIndex:S,startCol:N.startCol-1})}return B[e]&&!B[e].has(n)||(w==="ext-attr"?e in x:!/\{\{[^{]+\}\}/u.test(n))&&!((m=x[e])!=null&&m.has(n))&&!/^(?:xmlns:[\w:.-]+|data-[^:]*)$/u.test(n)&&(e==="meta"||e==="link"||!u.has(n))?($!=null||($={start:a,...this.getRootNode().posFromIndex(a)}),U.push((0,P.D)(_,$,"illegal attribute name"))):n==="style"&&typeof p=="string"&&K.test(p)?($!=null||($={start:a,...this.getRootNode().posFromIndex(a)}),U.push((0,P.D)(M,$,"insecure style"))):n==="tabindex"&&typeof p=="string"&&p.trim()!=="0"&&($!=null||($={start:a,...this.getRootNode().posFromIndex(a)}),U.push((0,P.D)(M,$,"nonzero tabindex"))),U}getValue(){if(f(this,l)){const a=this.lastChild.text();return f(this,h)[1]?a:a.trim()}return this.type==="ext-attr"||""}print(){const[a="",m=""]=f(this,h);return f(this,l)?super.print({sep:`${f(this,l)}${a}`,post:m}):super.print()}}l=new WeakMap,h=new WeakMap;class Y extends D.Token{constructor(a,m,U,R=L.Z.getConfig(),_=[]){if(super(void 0,R,_,{}),this.type=m,this.setAttribute("name",U),a){const M=new RegExp(`([^\\s/](?:(?!\0\\d+~\x7F)[^\\s/=])*)(?:((?:\\s|\0\\d+c\x7F)*(?:=|\0\\d+~\x7F)(?:\\s|\0\\d+c\x7F)*)(?:(["'])(.*?)(\\3|$)|(\\S*)))?`,"gsu");let w="",n=M.exec(a),e=0;const p=()=>{w&&(super.insertAt(new I.D(w,`${m.slice(0,-1)}-dirty`,R,_)),w="")};for(;n;){const{index:$,0:F,1:N,2:S,3:z,4:X,5:V,6:q}=n;if(w+=a.slice(e,$),/^(?:[\w:]|\0\d+[t!~{}+-]\x7F)(?:[\w:.-]|\0\d+[t!~{}+-]\x7F)*$/u.test((0,b.PN)(N).trim())){const k=X!=null?X:q,st=[z,V],tt=new G(m.slice(0,-1),U,N,S,k,st,R,_);p(),super.insertAt(tt)}else w+=F;({lastIndex:e}=M),n=M.exec(a)}w+=a.slice(e),p()}}afterBuild(){if(this.type==="table-attrs"){const{parentNode:a}=this;this.setAttribute("name",(a==null?void 0:a.type)==="td"&&a.subtype==="caption"?"caption":a==null?void 0:a.type)}}getAttrTokens(a){return this.childNodes.filter(m=>m instanceof G&&(!a||m.name===a.toLowerCase().trim()))}getAttrToken(a){const m=this.getAttrTokens(a);return m[m.length-1]}getAttr(a){var m;return(m=this.getAttrToken(a))==null?void 0:m.getValue()}lint(a=this.getAbsoluteIndex()){const m=super.lint(a),{parentNode:U,length:R,childNodes:_}=this,M=new Map,w=new Set;let n;(U==null?void 0:U.type)==="html"&&U.closing&&this.text().trim()&&(n={start:a,...this.getRootNode().posFromIndex(a)},m.push((0,P.Y)(this,n,"attributes of a closing tag")));for(let e=0;e<R;e++){const p=_[e];if(p instanceof I.D&&p.text().trim())n!=null||(n={start:a,...this.getRootNode().posFromIndex(a)}),m.push((0,P.D)(p,n,"containing invalid attribute"));else if(p instanceof G){const{name:$}=p;M.has($)?(w.add($),M.get($).push(p)):$!=="class"&&M.set($,[p])}}if(w.size>0){n!=null||(n={start:a,...this.getRootNode().posFromIndex(a)});for(const e of w)m.push(...M.get(e).map(p=>(0,P.D)(p,n,L.Z.msg("duplicated $1 attribute",e))))}return m}print(){return String(this)?`<span class="wpb-${this.type}">${this.childNodes.map(a=>a.print(a instanceof I.D&&a.text().trim()?{class:"hidden"}:void 0)).join("")}</span>`:""}}},876:(Q,y,t)=>{t.d(y,{a:()=>c});var P=t(444);const b=r=>{class i extends r{}return i};var L=t(891),D=t(541),I=t(686),O=Object.defineProperty,E=(r,i,s)=>i in r?O(r,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[i]=s,f=(r,i,s)=>(E(r,typeof i!="symbol"?i+"":i,s),s),v=(r,i,s)=>{if(!i.has(r))throw TypeError("Cannot "+s)},o=(r,i,s)=>(v(r,i,"read from private field"),s?s.call(r):i.get(r)),l=(r,i,s)=>{if(i.has(r))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(r):i.set(r,s)},h=(r,i,s,d)=>(v(r,i,"write to private field"),d?d.call(r,s):i.set(r,s),s),u;class c extends b(D.Token){constructor(i,s="",d="",A=L.Z.getConfig(),x=[]){if(super(void 0,A,x,{}),f(this,"type","ext-link"),l(this,u,void 0),this.insertAt(new I.k(i,!0,A,x)),h(this,u,s),d){const C=new D.Token(d,A,x,{});C.type="ext-link-text",C.setAttribute("stage",P.C-1),this.insertAt(C)}}toString(i){return this.length===1?`[${super.toString(i)}${o(this,u)}]`:`[${super.toString(i,o(this,u))}]`}text(){return`[${super.text(" ")}]`}getAttribute(i){return i==="padding"?1:super.getAttribute(i)}getGaps(){return o(this,u).length}print(){return super.print(this.length===1?{pre:"[",post:`${o(this,u)}]`}:{pre:"[",sep:o(this,u),post:"]"})}}u=new WeakMap},420:(Q,y,t)=>{t.r(y),t.d(y,{GalleryToken:()=>u});var P=t(891),b=t(541),L=t(39),D=t(465),I=Object.defineProperty,O=(c,r,i)=>r in c?I(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,E=(c,r,i)=>(O(c,typeof r!="symbol"?r+"":r,i),i),f=(c,r,i)=>{if(!r.has(c))throw TypeError("Cannot "+i)},v=(c,r,i)=>{if(r.has(c))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(c):r.set(c,i)},o=(c,r,i)=>(f(c,r,"access private method"),i),l,h;class u extends b.Token{constructor(r,i=P.Z.getConfig(),s=[]){var d;super(void 0,i,s,{}),v(this,l),E(this,"type","ext-inner");for(const A of(d=r==null?void 0:r.split(`
15
+ `))!=null?d:[]){const x=/^([^|]+)(?:\|(.*))?/u.exec(A);if(!x){super.insertAt(A.trim()?new D.R(A,i,[],{}):A);continue}const[,C,B]=x;o(this,l,h).call(this,C)?super.insertAt(new L._("gallery",C,B,i,s)):super.insertAt(new D.R(A,i,[],{}))}}toString(r){return super.toString(r,`
17
16
  `)}text(){return super.text(`
18
17
  `).replace(/\n\s*\n/gu,`
19
- `)}getGaps(n){return n<this.length-1?1:0}lint(n=this.getAbsoluteIndex()){const{top:r,left:d}=this.getRootNode().posFromIndex(n),i=[];for(let l=0;l<this.length;l++){const s=this.childNodes[l],a=String(s),{length:c}=a,v=a.trim(),_=r+l,m=l?0:d;s.type==="hidden"&&v&&!/^<!--.*-->$/u.test(v)?i.push({message:$.default.msg("invalid content in <$1>","gallery"),severity:"error",startIndex:n,endIndex:n+c,startLine:_,endLine:_,startCol:m,endCol:m+c}):s.type!=="hidden"&&s.type!=="text"&&i.push(...s.lint(n)),n+=c+1}return i}print(){return super.print({sep:`
20
- `})}}},485:(Y,M,t)=>{t.d(M,{D:()=>i});var $=t(169),I=t(891),R=t(541),W=t(669),b=Object.defineProperty,S=(l,s,a)=>s in l?b(l,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[s]=a,P=(l,s,a)=>(S(l,typeof s!="symbol"?s+"":s,a),a),x=(l,s,a)=>{if(!s.has(l))throw TypeError("Cannot "+a)},o=(l,s,a)=>(x(l,s,"read from private field"),a?a.call(l):s.get(l)),n=(l,s,a)=>{if(s.has(l))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(l):s.set(l,a)},r,d;class i extends R.Token{constructor(s,a,c=I.default.getConfig(),v=[]){super(void 0,c,v),n(this,r),P(this,"type","heading"),this.setAttribute("name",String(s));const _=new R.Token(a[0],c,v);_.type="heading-title",_.setAttribute("stage",2);const m=new W.SyntaxToken(a[1],/^[^\S\n]*$/u,"heading-trail",c,v,{});this.append(_,m)}get level(){return Number(this.name)}toString(s){const a=o(this,r,d);return`${a}${this.firstChild.toString()}${a}${this.lastChild.toString()}`}text(){const s=o(this,r,d);return`${s}${this.firstChild.text()}${s}`}getPadding(){return super.getPadding()+this.level}getGaps(s){return s===0?this.level:0}lint(s=this.getAbsoluteIndex()){const a=super.lint(s),c=String(this.firstChild);let v;return this.name==="1"&&(v=(0,$.Y)(this,{start:s},"<h1>"),a.push(v)),(c.startsWith("=")||c.endsWith("="))&&(v!=null||(v=(0,$.Y)(this,{start:s},"")),a.push({...v,message:I.default.msg('unbalanced "=" in a section header')})),this.closest("html-attrs, table-attrs")&&(v!=null||(v=(0,$.Y)(this,{start:s},"")),a.push({...v,message:I.default.msg("section header in a HTML tag")})),a}print(){const s=o(this,r,d);return super.print({pre:s,sep:s})}}r=new WeakSet,d=function(){return"=".repeat(this.level)}},465:(Y,M,t)=>{t.d(M,{R:()=>S});var $=t(959),I=t(541),R=Object.defineProperty,W=(P,x,o)=>x in P?R(P,x,{enumerable:!0,configurable:!0,writable:!0,value:o}):P[x]=o,b=(P,x,o)=>(W(P,typeof x!="symbol"?x+"":x,o),o);class S extends(0,$.a)(I.Token){constructor(){super(...arguments),b(this,"type","hidden")}}},842:(Y,M,t)=>{t.r(M),t.d(M,{ImagemapToken:()=>s});var $=t(169),I=t(891),R=t(541),W=t(826),b=t(39),S=t(524),P=t(944),x=Object.defineProperty,o=(a,c,v)=>c in a?x(a,c,{enumerable:!0,configurable:!0,writable:!0,value:v}):a[c]=v,n=(a,c,v)=>(o(a,typeof c!="symbol"?c+"":c,v),v);class r extends R.Token{constructor(c,v,_,m=I.default.getConfig(),F=[]){super(void 0,m,F),n(this,"type","imagemap-link"),this.append(c,v.length===2?new S.h(...v,m,F):new P.a(...v,m,F),new W.O(_,m,F))}}var d=Object.defineProperty,i=(a,c,v)=>c in a?d(a,c,{enumerable:!0,configurable:!0,writable:!0,value:v}):a[c]=v,l=(a,c,v)=>(i(a,typeof c!="symbol"?c+"":c,v),v);class s extends R.Token{constructor(c,v=I.default.getConfig(),_=[]){if(super(void 0,v,_,{}),l(this,"type","ext-inner"),!c)return;const m=c.split(`
21
- `),F=new Set(v.protocol.split("|")),K=W.O;let G=!0,Q=!1;for(const L of m){const w=L.trim();if(!(Q||!w||w.startsWith("#"))){if(G){const[E,...O]=L.split("|"),y=this.normalizeTitle(E,0,!0);if(y.valid&&y.ns===6){const g=new b._("imagemap",E,O.length>0?O.join("|"):void 0,v,_);super.insertAt(g),G=!1;continue}else Q=!0}else if(L.trim().split(/[\t ]/u)[0]==="desc"){super.insertAt(L);continue}else if(L.includes("[")){const E=L.indexOf("["),O=L.slice(E),y=/^\[{2}([^|]+)(?:\|([^\]]+))?\]{2}[\w\s]*$/u.exec(O);if(y){if(this.normalizeTitle(y[1],0,!0,!1,!0).valid){super.insertAt(new r(L.slice(0,E),y.slice(1),O.slice(O.indexOf("]]")+2),v,_));continue}}else if(F.has(O.slice(1,O.indexOf(":")+1))||F.has(O.slice(1,O.indexOf("//")+2))){const g=/^\[([^\]\s]+)(?:(\s+)(\S[^\]]*)?)?\][\w\s]*$/u.exec(O);if(g){super.insertAt(new r(L.slice(0,E),g.slice(1),O.slice(O.indexOf("]")+1),v,_));continue}}}}super.insertAt(new K(L,v,_))}}get image(){return this.childNodes.find(({type:c})=>c==="imagemap-image")}toString(c){return super.toString(c,`
18
+ `)}getGaps(){return 1}lint(r=this.getAbsoluteIndex()){const{top:i,left:s}=this.getRootNode().posFromIndex(r),d=[];for(let A=0;A<this.length;A++){const x=this.childNodes[A],C=String(x),{length:B}=C,K=C.trim(),G=i+A,Y=A?0:s;x.type==="hidden"&&K&&!/^<!--.*-->$/u.test(K)?d.push({message:P.Z.msg("invalid content in <$1>","gallery"),severity:"error",startIndex:r,endIndex:r+B,startLine:G,endLine:G,startCol:Y,endCol:Y+B}):x.type!=="hidden"&&x.type!=="text"&&d.push(...x.lint(r)),r+=B+1}return d}print(){return super.print({sep:`
19
+ `})}}l=new WeakSet,h=function(c){return this.normalizeTitle(c,6,!0,!0).valid}},485:(Q,y,t)=>{t.d(y,{D:()=>u});var P=t(169),b=t(891),L=t(541),D=t(669),I=Object.defineProperty,O=(c,r,i)=>r in c?I(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,E=(c,r,i)=>(O(c,typeof r!="symbol"?r+"":r,i),i),f=(c,r,i)=>{if(!r.has(c))throw TypeError("Cannot "+i)},v=(c,r,i)=>(f(c,r,"read from private field"),i?i.call(c):r.get(c)),o=(c,r,i)=>{if(r.has(c))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(c):r.set(c,i)},l,h;class u extends L.Token{constructor(r,i,s=b.Z.getConfig(),d=[]){super(void 0,s,d),o(this,l),E(this,"type","heading"),this.setAttribute("name",String(r));const A=new L.Token(i[0],s,d);A.type="heading-title",A.setAttribute("stage",2);const x=new D.SyntaxToken(i[1],/^[^\S\n]*$/u,"heading-trail",s,d,{});this.append(A,x)}get level(){return Number(this.name)}toString(r){const i=v(this,l,h);return`${i}${this.firstChild.toString()}${i}${this.lastChild.toString()}`}text(){const r=v(this,l,h);return`${r}${this.firstChild.text()}${r}`}getAttribute(r){return r==="padding"?super.getAttribute("padding")+this.level:super.getAttribute(r)}getGaps(){return this.level}lint(r=this.getAbsoluteIndex()){const i=super.lint(r),s=String(this.firstChild);let d;return this.name==="1"&&(d=(0,P.Y)(this,{start:r},"<h1>"),i.push(d)),(s.startsWith("=")||s.endsWith("="))&&(d!=null||(d=(0,P.Y)(this,{start:r},"")),i.push({...d,message:b.Z.msg('unbalanced "=" in a section header')})),this.closest("html-attrs, table-attrs")&&(d!=null||(d=(0,P.Y)(this,{start:r},"")),i.push({...d,message:b.Z.msg("section header in a HTML tag")})),i}print(){const r=v(this,l,h);return super.print({pre:r,sep:r})}}l=new WeakSet,h=function(){return"=".repeat(this.level)}},465:(Q,y,t)=>{t.d(y,{R:()=>O});var P=t(959),b=t(541),L=Object.defineProperty,D=(E,f,v)=>f in E?L(E,f,{enumerable:!0,configurable:!0,writable:!0,value:v}):E[f]=v,I=(E,f,v)=>(D(E,typeof f!="symbol"?f+"":f,v),v);class O extends(0,P.a)(b.Token){constructor(){super(...arguments),I(this,"type","hidden")}}},842:(Q,y,t)=>{t.r(y),t.d(y,{ImagemapToken:()=>r});var P=t(169),b=t(891),L=t(541),D=t(826),I=t(39),O=t(524),E=t(876),f=Object.defineProperty,v=(i,s,d)=>s in i?f(i,s,{enumerable:!0,configurable:!0,writable:!0,value:d}):i[s]=d,o=(i,s,d)=>(v(i,typeof s!="symbol"?s+"":s,d),d);class l extends L.Token{constructor(s,d,A,x=b.Z.getConfig(),C=[]){super(void 0,x,C),o(this,"type","imagemap-link"),this.append(s,d.length===2?new O.h(...d,x,C):new E.a(...d,x,C),new D.O(A,x,C))}}var h=Object.defineProperty,u=(i,s,d)=>s in i?h(i,s,{enumerable:!0,configurable:!0,writable:!0,value:d}):i[s]=d,c=(i,s,d)=>(u(i,typeof s!="symbol"?s+"":s,d),d);class r extends L.Token{constructor(s,d=b.Z.getConfig(),A=[]){if(super(void 0,d,A,{}),c(this,"type","ext-inner"),!s)return;const x=s.split(`
20
+ `),C=new Set(d.protocol.split("|")),B=D.O;let K=!0,G=!1;for(const Y of x){const Z=Y.trim();if(!(G||!Z||Z.startsWith("#"))){if(K){const[a,...m]=Y.split("|"),U=this.normalizeTitle(a,0,!0);if(U.valid&&U.ns===6){const R=new I._("imagemap",a,m.length>0?m.join("|"):void 0,d,A);super.insertAt(R),K=!1;continue}else G=!0}else if(Y.trim().split(/[\t ]/u)[0]==="desc"){super.insertAt(Y);continue}else if(Y.includes("[")){const a=Y.indexOf("["),m=Y.slice(a),U=/^\[{2}([^|]+)(?:\|([^\]]+))?\]{2}[\w\s]*$/u.exec(m);if(U){if(this.normalizeTitle(U[1],0,!0,!1,!0).valid){super.insertAt(new l(Y.slice(0,a),U.slice(1),m.slice(m.indexOf("]]")+2),d,A));continue}}else if(C.has(m.slice(1,m.indexOf(":")+1))||C.has(m.slice(1,m.indexOf("//")+2))){const R=/^\[([^\]\s]+)(?:(\s+)(\S[^\]]*)?)?\][\w\s]*$/u.exec(m);if(R){super.insertAt(new l(Y.slice(0,a),R.slice(1),m.slice(m.indexOf("]")+1),d,A));continue}}}}super.insertAt(new B(Y,d,A))}}get image(){return this.childNodes.find(({type:s})=>s==="imagemap-image")}toString(s){return super.toString(s,`
22
21
  `)}text(){return super.text(`
23
22
  `).replace(/\n{2,}/gu,`
24
- `)}getGaps(c){return c<this.length-1?1:0}lint(c=this.getAbsoluteIndex()){const v=super.lint(c),_={start:c,...this.getRootNode().posFromIndex(c)};return this.image?v.push(...this.childNodes.filter(m=>{const F=String(m).trim();return m.type==="noinclude"&&F&&!F.startsWith("#")}).map(m=>(0,$.D)(m,_,"invalid link in <imagemap>"))):v.push((0,$.Y)(this,_,"<imagemap> without an image")),v}print(){return super.print({sep:`
25
- `})}}},541:(Y,M,t)=>{t.r(M),t.d(M,{Token:()=>Zt});var $=t(467),I=t(891),R=Object.defineProperty,W=(N,h,A)=>h in N?R(N,h,{enumerable:!0,configurable:!0,writable:!0,value:A}):N[h]=A,b=(N,h,A)=>(W(N,typeof h!="symbol"?h+"":h,A),A),S=(N,h,A)=>{if(!h.has(N))throw TypeError("Cannot "+A)},P=(N,h,A)=>(S(N,h,"read from private field"),A?A.call(N):h.get(N)),x=(N,h,A)=>{if(h.has(N))throw TypeError("Cannot add the same private member more than once");h instanceof WeakSet?h.add(N):h.set(N,A)},o=(N,h,A,H)=>(S(N,h,"write to private field"),H?H.call(N,A):h.set(N,A),A),n=(N,h,A)=>(S(N,h,"access private method"),A),r,d,i;class l{constructor(){x(this,d),b(this,"type"),b(this,"childNodes",[]),x(this,r,void 0)}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return P(this,r)}get nextSibling(){var h;const A=(h=P(this,r))==null?void 0:h.childNodes;return A&&A[A.indexOf(this)+1]}get previousSibling(){var h;const A=(h=P(this,r))==null?void 0:h.childNodes;return A&&A[A.indexOf(this)-1]}get offsetHeight(){return n(this,d,i).call(this).height}get offsetWidth(){return n(this,d,i).call(this).width}hasAttribute(h){return h in this}getAttribute(h){return this.hasAttribute(h)?String(this[h]):void 0}setAttribute(h,A){h==="parentNode"?o(this,r,A):this[h]=A}getRootNode(){let{parentNode:h}=this;for(;h!=null&&h.parentNode;)({parentNode:h}=h);return h!=null?h:this}posFromIndex(h){const A=String(this);if(h>=-A.length&&h<=A.length){const H=A.slice(0,h).split(`
26
- `);return{top:H.length-1,left:H[H.length-1].length}}}getPadding(){return 0}getGaps(h){return 0}getRelativeIndex(h){let A;const H=(Z,ot)=>A.slice(0,Z).reduce((mt,bt,It)=>mt+String(bt).length+ot.getGaps(It),0)+ot.getPadding();if(h===void 0){const{parentNode:Z}=this;return Z?({childNodes:A}=Z,H(A.indexOf(this),Z)):0}return{childNodes:A}=this,H(h,this)}getAbsoluteIndex(){const{parentNode:h}=this;return h?h.getAbsoluteIndex()+this.getRelativeIndex():0}}r=new WeakMap,d=new WeakSet,i=function(){const N=String(this).split(`
27
- `);return{height:N.length,width:N[N.length-1].length}};var s=Object.defineProperty,a=(N,h,A)=>h in N?s(N,h,{enumerable:!0,configurable:!0,writable:!0,value:A}):N[h]=A,c=(N,h,A)=>(a(N,typeof h!="symbol"?h+"":h,A),A);const v=new Set(["nowiki","pre","charinsert","score","syntaxhighlight","source","math","chem","ce","graph","mapframe","maplink","quiz","templatedata","timeline"]);class _ extends l{constructor(){super(...arguments),c(this,"name")}get length(){return this.childNodes.length}text(h){return(0,$.fL)(this.childNodes,h)}normalize(){const{childNodes:h}=this;for(let A=h.length-1;A>=0;A--){const H=h[A],Z=h[A-1];H.type!=="text"||this.getGaps(A-1)||(H.data===""?h.splice(A,1):(Z==null?void 0:Z.type)==="text"&&(Z.setAttribute("data",Z.data+H.data),h.splice(A,1)))}}removeAt(h){const{childNodes:A}=this,[H]=A.splice(h,1);return H}insertAt(h,A=this.length){const{childNodes:H}=this;return h.setAttribute("parentNode",this),H.splice(A,0,h),h}closest(h){let{parentNode:A}=this,H;const Z=new Set(h.split(",").map(ot=>ot.trim()));for(H=({type:ot})=>Z.has(ot);A;){if(H(A))return A;({parentNode:A}=A)}}append(...h){for(const A of h)this.insertAt(A)}replaceChildren(...h){this.childNodes.length=0,this.append(...h)}setText(h,A=0){const H=this.childNodes[A],{data:Z}=H;return H.replaceData(h),Z}toString(h,A=""){return this.childNodes.map(H=>H.toString()).join(A)}lint(h=this.getAbsoluteIndex()){const{SyntaxToken:A}=t(669);if(this instanceof A||this.constructor.hidden||this.type==="ext-inner"&&v.has(this.name))return[];const H=[];for(let Z=0,ot=h+this.getPadding();Z<this.length;Z++){const mt=this.childNodes[Z];H.push(...mt.lint(ot)),ot+=String(mt).length+this.getGaps(Z)}return H}print(h={}){var A;return String(this)?`<span class="wpb-${(A=h.class)!=null?A:this.type}">${(0,$.S0)(this.childNodes,h)}</span>`:""}}var m=Object.defineProperty,F=(N,h,A)=>h in N?m(N,h,{enumerable:!0,configurable:!0,writable:!0,value:A}):N[h]=A,K=(N,h,A)=>(F(N,typeof h!="symbol"?h+"":h,A),A),G=(N,h,A)=>{if(!h.has(N))throw TypeError("Cannot "+A)},Q=(N,h,A)=>{if(h.has(N))throw TypeError("Cannot add the same private member more than once");h instanceof WeakSet?h.add(N):h.set(N,A)},L=(N,h,A)=>(G(N,h,"access private method"),A),w,E;const O=/https?:\/\/|\{+|\}+|\[{2,}|\[(?![^[]*\])|((?:^|\])[^[]*?)\]+|<\s*\/?([a-z]\w*)/giu,y=/\{+|\}+|\[{2,}|\[(?![^[]*\])|((?:^|\])[^[]*?)\]+|<\s*\/?([a-z]\w*)/giu,g=["html","head","style","title","body","a","audio","img","video","embed","iframe","object","canvas","script","col","colgroup","tbody","tfoot","thead","button","input","label","option","select","textarea"];class u extends l{constructor(h){super(),Q(this,w),K(this,"type","text"),K(this,"data"),this.data=h}toString(){return this.data}text(){return this.data}lint(h=this.getAbsoluteIndex()){const{data:A,parentNode:H,nextSibling:Z,previousSibling:ot}=this,mt=H==null?void 0:H.type,bt=H==null?void 0:H.name,It=Z==null?void 0:Z.type,kt=ot==null?void 0:ot.type,yt=mt==="free-ext-link"||mt==="ext-link-url"||mt==="image-parameter"&&bt==="link"?y:O,Ut=[],{ext:jt,html:qt}=this.getRootNode().getAttribute("config");if(A.search(yt)!==-1){yt.lastIndex=0;const Kt=this.getRootNode(),{top:te,left:ee}=Kt.posFromIndex(h),ne=new Set([jt,qt,g].flat(2));for(let Ot=yt.exec(A);Ot;Ot=yt.exec(A)){const[,Ft,se]=Ot;let{0:Dt,index:Tt}=Ot;Ft&&Ft!=="]"&&(Tt+=Ft.length,Dt=Dt.slice(Ft.length));const Nt=h+Tt,Mt=A.slice(0,Tt).split(`
28
- `),Gt=Mt.length+te-1,zt=Mt[Mt.length-1],Ht=Mt.length===1?ee+zt.length:zt.length,{0:ut,length:Wt}=Dt,Yt=Nt+Wt,Xt=String(Kt),wt=Xt[Yt],Lt=Xt[Nt-1],re=Wt>1&&(ut!=="<"||/[\s/>]/u.test(wt!=null?wt:""))||ut==="{"&&(wt===ut||Lt==="-")||ut==="}"&&(Lt===ut||wt==="-")||ut==="["&&(wt===ut||mt==="ext-link-text"||!A.slice(Tt+1).trim()&&It==="free-ext-link")||ut==="]"&&(Lt===ut||!A.slice(0,Tt).trim()&&kt==="free-ext-link")?"error":"warning";(ut!=="h"||Tt>0)&&(ut!=="<"||ne.has(se.toLowerCase()))&&Ut.push({message:I.default.msg('lonely "$1"',ut==="h"?Dt:ut),severity:re,startIndex:Nt,endIndex:Yt,startLine:Gt,endLine:Gt,startCol:Ht,endCol:Ht+Wt})}return Ut}return[]}replaceData(h){L(this,w,E).call(this,h)}}w=new WeakSet,E=function(N){this.setAttribute("data",N)};var C=Object.defineProperty,f=(N,h,A)=>h in N?C(N,h,{enumerable:!0,configurable:!0,writable:!0,value:A}):N[h]=A,e=(N,h,A)=>(f(N,typeof h!="symbol"?h+"":h,A),A),T=(N,h,A)=>{if(!h.has(N))throw TypeError("Cannot "+A)},p=(N,h,A)=>(T(N,h,"read from private field"),A?A.call(N):h.get(N)),D=(N,h,A)=>{if(h.has(N))throw TypeError("Cannot add the same private member more than once");h instanceof WeakSet?h.add(N):h.set(N,A)},B=(N,h,A,H)=>(T(N,h,"write to private field"),H?H.call(N,A):h.set(N,A),A),U=(N,h,A,H)=>({set _(Z){B(N,h,Z,A)},get _(){return p(N,h,H)}}),z=(N,h,A)=>(T(N,h,"access private method"),A),V,X,J,j,et,tt,nt,k,it,q,st,lt,dt,ft,rt,pt,At,Ct,$t,xt,ht,ct,gt,St,vt,at,Et,_t;const{MAX_STAGE:Bt}=I.default,Jt=class Qt extends _{constructor(h,A=I.default.getConfig(),H=[],Z){super(),D(this,et),D(this,nt),D(this,it),D(this,st),D(this,dt),D(this,rt),D(this,At),D(this,$t),D(this,ht),D(this,gt),D(this,vt),D(this,Et),e(this,"type","root"),D(this,V,0),D(this,X,void 0),D(this,J,void 0),D(this,j,void 0),typeof h=="string"&&this.insertAt(h),B(this,X,A),B(this,J,H),H.push(this)}parseOnce(h=p(this,V),A=!1){if(h<p(this,V)||!this.isPlain()||this.length===0)return this;switch(h){case 0:this.type==="root"&&p(this,J).shift(),B(this,j,A),z(this,nt,k).call(this,A);break;case 1:z(this,it,q).call(this);break;case 2:z(this,st,lt).call(this);break;case 3:z(this,dt,ft).call(this);break;case 4:z(this,rt,pt).call(this);break;case 5:z(this,At,Ct).call(this);break;case 6:z(this,$t,xt).call(this);break;case 7:z(this,ht,ct).call(this);break;case 8:z(this,gt,St).call(this);break;case 9:z(this,vt,at).call(this);break;case 10:z(this,Et,_t).call(this)}if(this.type==="root")for(const H of p(this,J))H.parseOnce(h,A);return U(this,V)._++,this}buildFromStr(h,A){const H=h.split(/[\0\x7F]/u).map((Z,ot)=>{if(ot%2===0)return new u(Z);if(isNaN(Z[Z.lengtht-1]))return p(this,J)[Number(Z.slice(0,-1))];throw new Error(`\u89E3\u6790\u9519\u8BEF\uFF01\u672A\u6B63\u786E\u6807\u8BB0\u7684 Token\uFF1A${Z}`)});return A==="string"?H.map(String).join(""):A==="text"?(0,$.fL)(H):H}afterBuild(){if(this.type==="root")for(const h of p(this,J))h.afterBuild()}parse(h=Bt,A=!1){for(;p(this,V)<h;)this.parseOnce(p(this,V),A);return h&&(z(this,et,tt).call(this),this.afterBuild()),this}getAttribute(h){switch(h){case"config":return JSON.parse(JSON.stringify(p(this,X)));case"accum":return p(this,J);case"include":{if(p(this,j)!==void 0)return p(this,j);const A=this.getRootNode();return A.type==="root"&&A!==this?A.getAttribute("include"):!1}default:return super.getAttribute(h)}}setAttribute(h,A){switch(h){case"stage":p(this,V)===0&&this.type==="root"&&p(this,J).shift(),B(this,V,A);break;default:super.setAttribute(h,A)}}isPlain(){return this.constructor===Qt}insertAt(h,A=this.length){const H=typeof h=="string"?new u(h):h;return super.insertAt(H,A),H.type==="root"&&(H.type="plain"),H}normalizeTitle(h,A=0,H=!1,Z=!1,ot=!1){return I.default.normalizeTitle(h,A,p(this,j),p(this,X),H,Z,ot)}};V=new WeakMap,X=new WeakMap,J=new WeakMap,j=new WeakMap,et=new WeakSet,tt=function(){var N;B(this,V,Bt);const{length:h,firstChild:A}=this,H=String(A);if(h===1&&A.type==="text"&&H.includes("\0")&&(this.replaceChildren(...this.buildFromStr(H)),this.normalize(),this.type==="root"))for(const Z of p(this,J))z(N=Z,et,tt).call(N)},nt=new WeakSet,k=function(N){const{parseCommentAndExt:h}=t(551);this.setText(h(String(this.firstChild),p(this,X),p(this,J),N))},it=new WeakSet,q=function(){const{parseBraces:N}=t(313),h=this.type==="root"?String(this.firstChild):`\0${String(this.firstChild)}`,A=N(h,p(this,X),p(this,J));this.setText(this.type==="root"?A:A.slice(1))},st=new WeakSet,lt=function(){var N;if((N=p(this,X).excludes)!=null&&N.includes("html"))return;const{parseHtml:h}=t(980);this.setText(h(String(this.firstChild),p(this,X),p(this,J)))},dt=new WeakSet,ft=function(){var N;if((N=p(this,X).excludes)!=null&&N.includes("table"))return;const{parseTable:h}=t(508);this.setText(h(this,p(this,X),p(this,J)))},rt=new WeakSet,pt=function(){var N;if((N=p(this,X).excludes)!=null&&N.includes("hr"))return;const{parseHrAndDoubleUnderscore:h}=t(362);this.setText(h(this,p(this,X),p(this,J)))},At=new WeakSet,Ct=function(){const{parseLinks:N}=t(106);this.setText(N(String(this.firstChild),p(this,X),p(this,J)))},$t=new WeakSet,xt=function(){var N;if((N=p(this,X).excludes)!=null&&N.includes("quote"))return;const{parseQuotes:h}=t(704),A=String(this.firstChild).split(`
29
- `);for(let H=0;H<A.length;H++)A[H]=h(A[H],p(this,X),p(this,J));this.setText(A.join(`
30
- `))},ht=new WeakSet,ct=function(){var N;if((N=p(this,X).excludes)!=null&&N.includes("extLink"))return;const{parseExternalLinks:h}=t(418);this.setText(h(String(this.firstChild),p(this,X),p(this,J)))},gt=new WeakSet,St=function(){var N;if((N=p(this,X).excludes)!=null&&N.includes("magicLink"))return;const{parseMagicLinks:h}=t(311);this.setText(h(String(this.firstChild),p(this,X),p(this,J)))},vt=new WeakSet,at=function(){var N;if((N=p(this,X).excludes)!=null&&N.includes("list"))return;const{parseList:h}=t(904),A=String(this.firstChild).split(`
31
- `);let H=this.type==="root"||this.type==="ext-inner"&&this.name==="poem"?0:1;for(;H<A.length;H++)A[H]=h(A[H],p(this,X),p(this,J));this.setText(A.join(`
32
- `))},Et=new WeakSet,_t=function(){if(p(this,X).variants.length>0){const{parseConverter:N}=t(295);this.setText(N(String(this.firstChild),p(this,X),p(this,J)))}};let Zt=Jt},299:(Y,M,t)=>{t.d(M,{o:()=>i});var $=t(169),I=t(891),R=t(541),W=t(34),b=(l,s,a)=>{if(!s.has(l))throw TypeError("Cannot "+a)},S=(l,s,a)=>(b(l,s,"read from private field"),a?a.call(l):s.get(l)),P=(l,s,a)=>{if(s.has(l))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(l):s.set(l,a)},x=(l,s,a,c)=>(b(l,s,"write to private field"),c?c.call(l,a):s.set(l,a),a),o,n,r,d;class i extends R.Token{constructor(s,a,c=I.default.getConfig(),v=[],_="|"){if(super(void 0,c,v,{}),P(this,o,!0),P(this,n,void 0),P(this,r,void 0),P(this,d,!1),this.insertAt(new W.D(s,"link-target",c,v,{})),a!==void 0){const m=new R.Token(a,c,v,{});m.type="link-text",m.setAttribute("stage",I.default.MAX_STAGE-1),this.insertAt(m)}x(this,n,_)}afterBuild(){const s=this.normalizeTitle(this.firstChild.text(),0,!1,!0,!0);x(this,r,s.fragment),x(this,d,s.encoded),S(this,n).includes("\0")&&x(this,n,this.buildFromStr(S(this,n),"string"))}setAttribute(s,a){s==="bracket"?x(this,o,!!a):super.setAttribute(s,a)}toString(s){const a=super.toString(s,S(this,n));return S(this,o)?`[[${a}]]`:a}text(){const s=super.text("|");return S(this,o)?`[[${s}]]`:s}getPadding(){return 2}getGaps(s){return s>=this.length-1?0:s===0?S(this,n).length:1}lint(s=this.getAbsoluteIndex()){const a=super.lint(s),{childNodes:[c,v],type:_}=this;let m;return _==="link"&&c.childNodes.some(({type:F})=>F==="template")&&(m={start:s,...this.getRootNode().posFromIndex(s)},a.push((0,$.D)(c,m,"template in an internal link target","warning"))),S(this,d)&&(m!=null||(m={start:s,...this.getRootNode().posFromIndex(s)}),a.push((0,$.D)(c,m,"unnecessary URL encoding in an internal link"))),_==="link"&&(v!=null&&v.childNodes.some(F=>F.type==="text"&&F.data.includes("|")))?(m!=null||(m={start:s,...this.getRootNode().posFromIndex(s)}),a.push((0,$.D)(v,m,'additional "|" in the link text',"warning"))):_!=="link"&&S(this,r)!==void 0&&(m!=null||(m={start:s,...this.getRootNode().posFromIndex(s)}),a.push((0,$.D)(c,m,"useless fragment"))),a}print(){return super.print(S(this,o)?{pre:"[[",post:"]]",sep:S(this,n)}:{sep:S(this,n)})}}o=new WeakMap,n=new WeakMap,r=new WeakMap,d=new WeakMap},533:(Y,M,t)=>{t.d(M,{q:()=>y});var $=t(467),I=t(169),R=t(891),W=t(299),b=t(541),S=Object.defineProperty,P=(g,u,C)=>u in g?S(g,u,{enumerable:!0,configurable:!0,writable:!0,value:C}):g[u]=C,x=(g,u,C)=>(P(g,typeof u!="symbol"?u+"":u,C),C),o=(g,u,C)=>{if(!u.has(g))throw TypeError("Cannot "+C)},n=(g,u,C)=>(o(g,u,"read from private field"),C?C.call(g):u.get(g)),r=(g,u,C)=>{if(u.has(g))throw TypeError("Cannot add the same private member more than once");u instanceof WeakSet?u.add(g):u.set(g,C)},d=(g,u,C,f)=>(o(g,u,"write to private field"),f?f.call(g,C):u.set(g,C),C),i;const l=new Set(["alt","link","lang","page","caption"]);function s(g,u,C=R.default.getConfig(),f=!1){u=u.trim();let e=u.replace(/\0\d+t\x7F/gu,"").trim();switch(g){case"width":return/^(?:\d+x?|\d*x\d+)$/u.test(e);case"link":{if(!e||new RegExp(`^(?:(?:${C.protocol}|//)${$._X}|\0\\d+m\x7F)${$.Qk}$`,"iu").test(e))return u;e.startsWith("[[")&&e.endsWith("]]")&&(e=e.slice(2,-2));const p=R.default.normalizeTitle(e,0,!1,C,f,!0,!0);return p.valid&&p}case"lang":return C.variants.includes(e);case"alt":case"class":case"manualthumb":return!0;default:return!isNaN(e)}}class a extends b.Token{constructor(u,C=R.default.getConfig(),f=[]){var e=(...U)=>{super(...U),x(this,"type","image-parameter"),r(this,i,"")},T;let p;const D=Object.entries(C.img).map(([U,z])=>[U,z,new RegExp(`^(\\s*)${U.replace("$1","(.*)")}(\\s*)$`,"u")]),B=D.find(([,U,z])=>(p=z.exec(u),p&&(p.length!==4||s(U,p[2],C,!0)!==!1)));if(B&&p){p.length===3?(e(void 0,C,f),d(this,i,u)):(e(p[2],C,f,{}),d(this,i,`${p[1]}${B[0]}${p[3]}`)),this.setAttribute("name",B[1]);return}e(u,{...C,excludes:[...(T=C.excludes)!=null?T:[],"list"]},f),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get link(){return this.name==="link"?s("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var u;((u=this.parentNode)==null?void 0:u.type)==="gallery-image"&&!l.has(this.name)&&this.setAttribute("name","invalid")}isPlain(){return this.name==="caption"}toString(u){return n(this,i)?n(this,i).replace("$1",super.toString(u)):super.toString(u)}text(){return n(this,i)?n(this,i).replace("$1",super.text()).trim():super.text().trim()}getPadding(){return Math.max(0,n(this,i).indexOf("$1"))}lint(u=this.getAbsoluteIndex()){const C=super.lint(u),{link:f,name:e}=this;return e==="invalid"?C.push((0,I.Y)(this,{start:u},"invalid gallery image parameter")):typeof f=="object"&&f.encoded&&C.push((0,I.Y)(this,{start:u},"unnecessary URL encoding in an internal link")),C}print(){return n(this,i)?`<span class="wpb-image-parameter">${n(this,i).replace("$1",`<span class="wpb-image-caption">${(0,$.S0)(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}}i=new WeakMap;var c=Object.defineProperty,v=(g,u,C)=>u in g?c(g,u,{enumerable:!0,configurable:!0,writable:!0,value:C}):g[u]=C,_=(g,u,C)=>(v(g,typeof u!="symbol"?u+"":u,C),C),m=(g,u,C)=>{if(!u.has(g))throw TypeError("Cannot "+C)},F=(g,u,C)=>{if(u.has(g))throw TypeError("Cannot add the same private member more than once");u instanceof WeakSet?u.add(g):u.set(g,C)},K=(g,u,C)=>(m(g,u,"access private method"),C),G,Q;const L=new Set(["manualthumb","frameless","framed","thumbnail"]),w=new Set(["left","right","center","none"]),E=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),O=(g,u,C,f)=>{if(f===void 0)return[];const e=new RegExp(`${[g,u,C].map($.hr).join("|")}`,"gu"),T=[];let p=e.exec(f),D=0,B=0;for(;p;){const{0:U,index:z}=p;U!==C?D+=U===g?1:-1:D===0&&(T.push(f.slice(B,z)),{lastIndex:B}=e),p=e.exec(f)}return T.push(f.slice(B)),T};class y extends W.o{constructor(u,C,f=R.default.getConfig(),e=[],T="|"){super(u,void 0,f,e,T),F(this,G),_(this,"type","file"),this.append(...O("-{","}-","|",C).map(p=>new a(p,f,e)))}lint(u=this.getAbsoluteIndex()){const C=super.lint(u),f=this.getAllArgs().filter(({childNodes:z})=>{const V=z.filter(X=>X.text().trim());return V.length!==1||V[0].type!=="arg"}),e=[...new Set(f.map(({name:z})=>z))].filter(z=>z!=="invalid"),T=e.filter(z=>L.has(z)),p=e.filter(z=>w.has(z)),D=e.filter(z=>E.has(z));if(f.length===e.length&&T.length<2&&p.length<2&&D.length<2)return C;const B={start:u,...this.getRootNode().posFromIndex(u)},U=(z,V)=>X=>(0,I.D)(X,B,R.default.msg(`${z} image $1 parameter`,V));for(const z of e){let V=f.filter(({name:X})=>X===z);z==="caption"&&(V=[...V.slice(0,-1).filter(X=>X.text()),...V.slice(-1)]),V.length>1&&C.push(...V.map(U("duplicated",z)))}return T.length>1&&C.push(...f.filter(({name:z})=>L.has(z)).map(U("conflicting","frame"))),p.length>1&&C.push(...f.filter(({name:z})=>w.has(z)).map(U("conflicting","horizontal-alignment"))),D.length>1&&C.push(...f.filter(({name:z})=>E.has(z)).map(U("conflicting","vertical-alignment"))),C}getAllArgs(){return this.childNodes.slice(1)}getArgs(u){return this.getAllArgs().filter(({name:C})=>u===C)}getFrameArgs(){return K(this,G,Q).call(this,L,"\u6846\u67B6")}getHorizAlignArgs(){return K(this,G,Q).call(this,w,"\u6C34\u5E73\u5BF9\u9F50")}getVertAlignArgs(){return K(this,G,Q).call(this,E,"\u5782\u76F4\u5BF9\u9F50")}}G=new WeakSet,Q=function(g,u){return this.getAllArgs().filter(({name:f})=>g.has(f))}},39:(Y,M,t)=>{t.d(M,{_:()=>n});var $=t(169),I=t(891),R=t(541),W=t(533),b=(r,d,i)=>{if(!d.has(r))throw TypeError("Cannot "+i)},S=(r,d,i)=>(b(r,d,"read from private field"),i?i.call(r):d.get(r)),P=(r,d,i)=>{if(d.has(r))throw TypeError("Cannot add the same private member more than once");d instanceof WeakSet?d.add(r):d.set(r,i)},x=(r,d,i,l)=>(b(r,d,"write to private field"),l?l.call(r,i):d.set(r,i),i),o;class n extends W.q{constructor(d,i,l,s=I.default.getConfig(),a=[]){let c;if(l!==void 0){c=new R.Token(l,s,a),c.type="plain";for(let v=1;v<I.default.MAX_STAGE;v++)c.parseOnce();a.splice(a.indexOf(c),1)}super(i,c==null?void 0:c.toString(),s,a),P(this,o,!1),this.setAttribute("bracket",!1),this.type=`${d}-image`}afterBuild(){const d=this.type==="imagemap-image",i=this.normalizeTitle(String(this.firstChild),d?0:6,!0,!d);x(this,o,i.ns!==6)}getPadding(){return 0}lint(d=this.getAbsoluteIndex()){const i=super.lint(d);return S(this,o)&&i.push((0,$.Y)(this,{start:d},"invalid gallery image")),i}}o=new WeakMap},524:(Y,M,t)=>{t.d(M,{h:()=>b});var $=t(299),I=Object.defineProperty,R=(S,P,x)=>P in S?I(S,P,{enumerable:!0,configurable:!0,writable:!0,value:x}):S[P]=x,W=(S,P,x)=>(R(S,typeof P!="symbol"?P+"":P,x),x);class b extends $.o{constructor(){super(...arguments),W(this,"type","link")}}},686:(Y,M,t)=>{t.d(M,{k:()=>W});var $=t(169),I=t(891),R=t(541);class W extends R.Token{constructor(S,P=!1,x=I.default.getConfig(),o=[]){super(S,x,o,{}),this.type=P?"ext-link-url":"free-ext-link"}lint(S=this.getAbsoluteIndex()){const P=super.lint(S),x=`[\uFF0C\uFF1B\u3002\uFF1A\uFF01\uFF1F\uFF08\uFF09]+${this.type==="ext-link-url"?"|\\|+":""}`,o=new RegExp(x,"u"),n=new RegExp(x,"gu");let r;for(const d of this.childNodes){if(d.type!=="text"||!o.test(d.data))continue;r!=null||(r={start:S,...this.getRootNode().posFromIndex(S)});const{data:i}=d,l=(0,$.D)(d,r,"","warning");n.lastIndex=0;for(let s=n.exec(i);s;s=n.exec(i)){const{index:a,0:c}=s,v=i.slice(0,a).split(`
33
- `),{length:_}=v,{length:m}=v[v.length-1],F=S+a,K=l.startLine+_-1,G=_===1?l.startCol+m:m;P.push({...l,message:I.default.msg("$1 in URL",c.startsWith("|")?'"|"':I.default.msg("full-width punctuation")),startIndex:F,endIndex:F+c.length,startLine:K,endLine:K,startCol:G,endCol:G+c.length})}}return P}}},57:(Y,M,t)=>{t.r(M),t.d(M,{NestedToken:()=>n});var $=t(169),I=t(891),R=t(541),W=t(895),b=t(826),S=t(976),P=Object.defineProperty,x=(r,d,i)=>d in r?P(r,d,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[d]=i,o=(r,d,i)=>(x(r,typeof d!="symbol"?d+"":d,i),i);class n extends R.Token{constructor(d,i,l,s=I.default.getConfig(),a=[]){var c;const v=(c=d==null?void 0:d.replace(i,(_,m,F,K,G)=>{const Q=`\0${a.length+1}${m?"e":"c"}\x7F`;if(m)new W.$(m,F,K,G,s,a);else{const L=_.endsWith("-->");new S.T(_.slice(4,L?-3:void 0),L,s,a)}return Q}))==null?void 0:c.replace(/(^|\0\d+[ce]\x7F)([^\0]+)(?=$|\0\d+[ce]\x7F)/gu,(_,m,F)=>(new b.O(F,s,a),`${m}\0${a.length}c\x7F`));super(v,s,a,{}),o(this,"type","ext-inner")}lint(d=this.getAbsoluteIndex()){let i;return[...super.lint(d),...this.childNodes.filter(l=>{if(l.type==="ext"||l.type==="comment")return!1;const s=String(l).trim();return s&&!/^<!--.*-->$/su.test(s)}).map(l=>(i!=null||(i={start:d,...this.getRootNode().posFromIndex(d)}),(0,$.D)(l,i,I.default.msg("invalid content in <$1>",this.name))))]}}},439:(Y,M,t)=>{t.d(M,{h:()=>R});var $=t(891),I=t(541);class R extends I.Token{constructor(b="",S=$.default.getConfig(),P=[]){super(b,S,P)}}},976:(Y,M,t)=>{t.d(M,{T:()=>x});var $=t(169),I=t(959),R=t(891),W=t(439),b=Object.defineProperty,S=(o,n,r)=>n in o?b(o,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[n]=r,P=(o,n,r)=>(S(o,typeof n!="symbol"?n+"":n,r),r);class x extends(0,I.a)(W.h){constructor(n,r=!0,d=R.default.getConfig(),i=[]){super(n,d,i),P(this,"type","comment"),P(this,"closed"),this.closed=r}getPadding(){return 4}lint(n=this.getAbsoluteIndex()){return this.closed?[]:[(0,$.Y)(this,{start:n},"unclosed HTML comment")]}toString(n){return`<!--${this.firstChild.data}${this.closed?"-->":""}`}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}}},461:(Y,M,t)=>{t.d(M,{k:()=>b});var $=t(933),I=Object.defineProperty,R=(S,P,x)=>P in S?I(S,P,{enumerable:!0,configurable:!0,writable:!0,value:x}):S[P]=x,W=(S,P,x)=>(R(S,typeof P!="symbol"?P+"":P,x),x);class b extends $.T{constructor(){super(...arguments),W(this,"type","dd")}}},491:(Y,M,t)=>{t.r(M),t.d(M,{NowikiToken:()=>P});var $=t(169),I=t(891),R=t(439),W=Object.defineProperty,b=(x,o,n)=>o in x?W(x,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):x[o]=n,S=(x,o,n)=>(b(x,typeof o!="symbol"?o+"":o,n),n);class P extends R.h{constructor(){super(...arguments),S(this,"type","ext-inner")}lint(o=this.getAbsoluteIndex()){const{name:n,firstChild:r}=this;return(n==="templatestyles"||n==="section")&&r.data?[(0,$.Y)(this,{start:o},I.default.msg("nothing should be in <$1>",n))]:super.lint(o)}}},933:(Y,M,t)=>{t.d(M,{T:()=>I});var $=t(439);class I extends $.h{}},826:(Y,M,t)=>{t.d(M,{O:()=>S});var $=t(959),I=t(439),R=Object.defineProperty,W=(P,x,o)=>x in P?R(P,x,{enumerable:!0,configurable:!0,writable:!0,value:o}):P[x]=o,b=(P,x,o)=>(W(P,typeof x!="symbol"?x+"":x,o),o);class S extends(0,$.a)(I.h){constructor(){super(...arguments),b(this,"type","noinclude")}}},160:(Y,M,t)=>{t.r(M),t.d(M,{ParamTagToken:()=>x});var $=t(169),I=t(891),R=t(541),W=t(34),b=Object.defineProperty,S=(o,n,r)=>n in o?b(o,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[n]=r,P=(o,n,r)=>(S(o,typeof n!="symbol"?n+"":n,r),r);class x extends R.Token{constructor(n,r=I.default.getConfig(),d=[],i={}){if(super(void 0,r,d,{}),P(this,"type","ext-inner"),n){const l=W.D;this.append(...n.split(`
34
- `).map(s=>new l(s,"param-line",r,d,{})))}}toString(n){return super.toString(n,`
23
+ `)}getGaps(){return 1}lint(s=this.getAbsoluteIndex()){const d=super.lint(s),A={start:s,...this.getRootNode().posFromIndex(s)};return this.image?d.push(...this.childNodes.filter(x=>{const C=String(x).trim();return x.type==="noinclude"&&C&&!C.startsWith("#")}).map(x=>(0,P.D)(x,A,"invalid link in <imagemap>"))):d.push((0,P.Y)(this,A,"<imagemap> without an image")),d}print(){return super.print({sep:`
24
+ `})}}},541:(Q,y,t)=>{t.r(y),t.d(y,{Token:()=>$t});var P=t(467),b=t(444),L=t(891),D=Object.defineProperty,I=(W,g,T)=>g in W?D(W,g,{enumerable:!0,configurable:!0,writable:!0,value:T}):W[g]=T,O=(W,g,T)=>(I(W,typeof g!="symbol"?g+"":g,T),T),E=(W,g,T)=>{if(!g.has(W))throw TypeError("Cannot "+T)},f=(W,g,T)=>(E(W,g,"read from private field"),T?T.call(W):g.get(W)),v=(W,g,T)=>{if(g.has(W))throw TypeError("Cannot add the same private member more than once");g instanceof WeakSet?g.add(W):g.set(W,T)},o=(W,g,T,H)=>(E(W,g,"write to private field"),H?H.call(W,T):g.set(W,T),T),l=(W,g,T)=>(E(W,g,"access private method"),T),h,u,c;class r{constructor(){v(this,u),O(this,"childNodes",[]),v(this,h,void 0)}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return f(this,h)}get nextSibling(){var g;const T=(g=f(this,h))==null?void 0:g.childNodes;return T&&T[T.indexOf(this)+1]}get previousSibling(){var g;const T=(g=f(this,h))==null?void 0:g.childNodes;return T&&T[T.indexOf(this)-1]}get offsetHeight(){return l(this,u,c).call(this).height}get offsetWidth(){return l(this,u,c).call(this).width}getAttribute(g){return g==="padding"?0:g in this?String(this[g]):void 0}setAttribute(g,T){g==="parentNode"?o(this,h,T):this[g]=T}getRootNode(){let{parentNode:g}=this;for(;g!=null&&g.parentNode;)({parentNode:g}=g);return g!=null?g:this}posFromIndex(g){const T=String(this);if(g>=-T.length&&g<=T.length){const H=T.slice(0,g).split(`
25
+ `);return{top:H.length-1,left:H[H.length-1].length}}}getGaps(g){return 0}getRelativeIndex(g){let T;const H=(J,it)=>T.slice(0,J).reduce((mt,Mt,It)=>mt+String(Mt).length+it.getGaps(It),0)+it.getAttribute("padding");if(g===void 0){const{parentNode:J}=this;return J?({childNodes:T}=J,H(T.indexOf(this),J)):0}return{childNodes:T}=this,H(g,this)}getAbsoluteIndex(){const{parentNode:g}=this;return g?g.getAbsoluteIndex()+this.getRelativeIndex():0}}h=new WeakMap,u=new WeakSet,c=function(){const W=String(this).split(`
26
+ `);return{height:W.length,width:W[W.length-1].length}};const i=new Set(["nowiki","pre","charinsert","score","syntaxhighlight","source","math","chem","ce","graph","mapframe","maplink","quiz","templatedata","timeline"]);class s extends r{get length(){return this.childNodes.length}text(g){return(0,P.fL)(this.childNodes,g)}normalize(){const{childNodes:g}=this;for(let T=g.length-1;T>=0;T--){const{type:H,data:J}=g[T],it=g[T-1];H!=="text"||this.getGaps(T-1)||(J===""?g.splice(T,1):(it==null?void 0:it.type)==="text"&&(it.setAttribute("data",it.data+J),g.splice(T,1)))}}removeAt(g){const{childNodes:T}=this,[H]=T.splice(g,1);return H}insertAt(g,T=this.length){const{childNodes:H}=this;return g.setAttribute("parentNode",this),H.splice(T,0,g),g}closest(g){let{parentNode:T}=this,H;const J=new Set(g.split(",").map(it=>it.trim()));for(H=({type:it})=>J.has(it);T;){if(H(T))return T;({parentNode:T}=T)}}append(...g){for(const T of g)this.insertAt(T)}replaceChildren(...g){this.childNodes.length=0,this.append(...g)}setText(g,T=0){const H=this.childNodes[T],{data:J}=H;return H.replaceData(g),J}toString(g,T=""){return this.childNodes.map(H=>H.toString()).join(T)}lint(g=this.getAbsoluteIndex()){const{SyntaxToken:T}=t(669);if(this instanceof T||this.constructor.hidden||this.type==="ext-inner"&&i.has(this.name))return[];const H=[];for(let J=0,it=g+this.getAttribute("padding");J<this.length;J++){const mt=this.childNodes[J];H.push(...mt.lint(it)),it+=String(mt).length+this.getGaps(J)}return H}print(g={}){var T;return String(this)?`<span class="wpb-${(T=g.class)!=null?T:this.type}">${(0,P.S0)(this.childNodes,g)}</span>`:""}}var d=Object.defineProperty,A=(W,g,T)=>g in W?d(W,g,{enumerable:!0,configurable:!0,writable:!0,value:T}):W[g]=T,x=(W,g,T)=>(A(W,typeof g!="symbol"?g+"":g,T),T),C=(W,g,T)=>{if(!g.has(W))throw TypeError("Cannot "+T)},B=(W,g,T)=>{if(g.has(W))throw TypeError("Cannot add the same private member more than once");g instanceof WeakSet?g.add(W):g.set(W,T)},K=(W,g,T)=>(C(W,g,"access private method"),T),G,Y;const Z=/https?:\/\/|\{+|\}+|\[{2,}|\[(?![^[]*\])|((?:^|\])[^[]*?)\]+|<\s*\/?([a-z]\w*)/giu,a=/\{+|\}+|\[{2,}|\[(?![^[]*\])|((?:^|\])[^[]*?)\]+|<\s*\/?([a-z]\w*)/giu,m=["html","head","style","title","body","a","audio","img","video","embed","iframe","object","canvas","script","col","colgroup","tbody","tfoot","thead","button","input","label","option","select","textarea"];class U extends r{constructor(g){super(),B(this,G),x(this,"type","text"),x(this,"data",""),this.data=g}toString(){return this.data}text(){return this.data}lint(g=this.getAbsoluteIndex()){const{data:T,parentNode:H,nextSibling:J,previousSibling:it}=this,mt=H==null?void 0:H.type,Mt=H==null?void 0:H.name,It=J==null?void 0:J.type,Vt=it==null?void 0:it.type,_t=mt==="free-ext-link"||mt==="ext-link-url"||mt==="image-parameter"&&Mt==="link"?a:Z,Bt=[],{ext:Xt,html:Jt}=this.getRootNode().getAttribute("config");if(T.search(_t)!==-1){_t.lastIndex=0;const Ut=this.getRootNode(),{top:kt,left:jt}=Ut.posFromIndex(g),qt=new Set([Xt,Jt,m].flat(2));for(let yt=_t.exec(T);yt;yt=_t.exec(T)){const[,Ft,te]=yt;let{0:Dt,index:Pt}=yt;Ft&&Ft!=="]"&&(Pt+=Ft.length,Dt=Dt.slice(Ft.length));const Nt=g+Pt,bt=T.slice(0,Pt).split(`
27
+ `),Kt=bt.length+kt-1,Zt=bt[bt.length-1],Gt=bt.length===1?jt+Zt.length:Zt.length,{0:pt,length:Lt}=Dt,zt=Nt+Lt,Ht=String(Ut),St=Ht[zt],Wt=Ht[Nt-1],ee=Lt>1&&(pt!=="<"||/[\s/>]/u.test(St!=null?St:""))||pt==="{"&&(St===pt||Wt==="-")||pt==="}"&&(Wt===pt||St==="-")||pt==="["&&(St===pt||mt==="ext-link-text"||!T.slice(Pt+1).trim()&&It==="free-ext-link")||pt==="]"&&(Wt===pt||!T.slice(0,Pt).trim()&&Vt==="free-ext-link")?"error":"warning";(pt!=="h"||Pt>0)&&(pt!=="<"||qt.has(te.toLowerCase()))&&Bt.push({message:L.Z.msg('lonely "$1"',pt==="h"?Dt:pt),severity:ee,startIndex:Nt,endIndex:zt,startLine:Kt,endLine:Kt,startCol:Gt,endCol:Gt+Lt})}return Bt}return[]}replaceData(g){K(this,G,Y).call(this,g)}}G=new WeakSet,Y=function(W){this.setAttribute("data",W)};var R=Object.defineProperty,_=(W,g,T)=>g in W?R(W,g,{enumerable:!0,configurable:!0,writable:!0,value:T}):W[g]=T,M=(W,g,T)=>(_(W,typeof g!="symbol"?g+"":g,T),T),w=(W,g,T)=>{if(!g.has(W))throw TypeError("Cannot "+T)},n=(W,g,T)=>(w(W,g,"read from private field"),T?T.call(W):g.get(W)),e=(W,g,T)=>{if(g.has(W))throw TypeError("Cannot add the same private member more than once");g instanceof WeakSet?g.add(W):g.set(W,T)},p=(W,g,T,H)=>(w(W,g,"write to private field"),H?H.call(W,T):g.set(W,T),T),$=(W,g,T,H)=>({set _(J){p(W,g,J,T)},get _(){return n(W,g,H)}}),F=(W,g,T)=>(w(W,g,"access private method"),T),N,S,z,X,V,q,k,st,tt,dt,nt,ct,j,et,rt,lt,at,ot,ut,wt,Tt,Ot,vt,gt,ft,xt,Ct,At;const ht=class Yt extends s{constructor(g,T=L.Z.getConfig(),H=[],J){super(),e(this,V),e(this,k),e(this,tt),e(this,nt),e(this,j),e(this,rt),e(this,at),e(this,ut),e(this,Tt),e(this,vt),e(this,ft),e(this,Ct),M(this,"type","root"),e(this,N,0),e(this,S,void 0),e(this,z,void 0),e(this,X,void 0),typeof g=="string"&&this.insertAt(g),p(this,S,T),p(this,z,H),H.push(this)}parseOnce(g=n(this,N),T=!1){if(g<n(this,N)||!this.getAttribute("plain")||this.length===0)return this;switch(g){case 0:this.type==="root"&&n(this,z).shift(),p(this,X,T),F(this,k,st).call(this,T);break;case 1:F(this,tt,dt).call(this);break;case 2:F(this,nt,ct).call(this);break;case 3:F(this,j,et).call(this);break;case 4:F(this,rt,lt).call(this);break;case 5:F(this,at,ot).call(this);break;case 6:F(this,ut,wt).call(this);break;case 7:F(this,Tt,Ot).call(this);break;case 8:F(this,vt,gt).call(this);break;case 9:F(this,ft,xt).call(this);break;case 10:F(this,Ct,At).call(this)}if(this.type==="root")for(const H of n(this,z))H.parseOnce(g,T);return $(this,N)._++,this}buildFromStr(g,T){const H=g.split(/[\0\x7F]/u).map((J,it)=>{if(it%2===0)return new U(J);if(isNaN(J[J.lengtht-1]))return n(this,z)[Number(J.slice(0,-1))];throw new Error(`\u89E3\u6790\u9519\u8BEF\uFF01\u672A\u6B63\u786E\u6807\u8BB0\u7684 Token\uFF1A${J}`)});return T==="string"?H.map(String).join(""):T==="text"?(0,P.fL)(H):H}afterBuild(){if(this.type==="root")for(const g of n(this,z))g.afterBuild()}parse(g=b.C,T=!1){for(;n(this,N)<g;)this.parseOnce(n(this,N),T);return g&&(F(this,V,q).call(this),this.afterBuild()),this}getAttribute(g){switch(g){case"plain":return this.constructor===Yt;case"config":return JSON.parse(JSON.stringify(n(this,S)));case"accum":return n(this,z);case"include":{if(n(this,X)!==void 0)return n(this,X);const T=this.getRootNode();return T!==this?T.getAttribute("include"):!1}default:return super.getAttribute(g)}}setAttribute(g,T){switch(g){case"stage":n(this,N)===0&&this.type==="root"&&n(this,z).shift(),p(this,N,T);break;default:super.setAttribute(g,T)}}insertAt(g,T=this.length){const H=typeof g=="string"?new U(g):g;return super.insertAt(H,T),H.type==="root"&&(H.type="plain"),H}normalizeTitle(g,T=0,H=!1,J=!1,it=!1){return L.Z.normalizeTitle(g,T,n(this,X),n(this,S),H,J,it)}};N=new WeakMap,S=new WeakMap,z=new WeakMap,X=new WeakMap,V=new WeakSet,q=function(){var W;p(this,N,b.C);const{length:g,firstChild:T}=this,H=String(T);if(g===1&&T.type==="text"&&H.includes("\0")&&(this.replaceChildren(...this.buildFromStr(H)),this.normalize(),this.type==="root"))for(const J of n(this,z))F(W=J,V,q).call(W)},k=new WeakSet,st=function(W){const{parseCommentAndExt:g}=t(551);this.setText(g(String(this.firstChild),n(this,S),n(this,z),W))},tt=new WeakSet,dt=function(){const{parseBraces:W}=t(313),g=this.type==="root"?String(this.firstChild):`\0${String(this.firstChild)}`,T=W(g,n(this,S),n(this,z));this.setText(this.type==="root"?T:T.slice(1))},nt=new WeakSet,ct=function(){var W;if((W=n(this,S).excludes)!=null&&W.includes("html"))return;const{parseHtml:g}=t(980);this.setText(g(String(this.firstChild),n(this,S),n(this,z)))},j=new WeakSet,et=function(){var W;if((W=n(this,S).excludes)!=null&&W.includes("table"))return;const{parseTable:g}=t(508);this.setText(g(this,n(this,S),n(this,z)))},rt=new WeakSet,lt=function(){var W;if((W=n(this,S).excludes)!=null&&W.includes("hr"))return;const{parseHrAndDoubleUnderscore:g}=t(362);this.setText(g(this,n(this,S),n(this,z)))},at=new WeakSet,ot=function(){const{parseLinks:W}=t(106);this.setText(W(String(this.firstChild),n(this,S),n(this,z)))},ut=new WeakSet,wt=function(){var W;if((W=n(this,S).excludes)!=null&&W.includes("quote"))return;const{parseQuotes:g}=t(704),T=String(this.firstChild).split(`
28
+ `);for(let H=0;H<T.length;H++)T[H]=g(T[H],n(this,S),n(this,z));this.setText(T.join(`
29
+ `))},Tt=new WeakSet,Ot=function(){var W;if((W=n(this,S).excludes)!=null&&W.includes("extLink"))return;const{parseExternalLinks:g}=t(418);this.setText(g(String(this.firstChild),n(this,S),n(this,z)))},vt=new WeakSet,gt=function(){var W;if((W=n(this,S).excludes)!=null&&W.includes("magicLink"))return;const{parseMagicLinks:g}=t(311);this.setText(g(String(this.firstChild),n(this,S),n(this,z)))},ft=new WeakSet,xt=function(){var W;if((W=n(this,S).excludes)!=null&&W.includes("list"))return;const{parseList:g}=t(904),T=String(this.firstChild).split(`
30
+ `);let H=this.type==="root"||this.type==="ext-inner"&&this.name==="poem"?0:1;for(;H<T.length;H++)T[H]=g(T[H],n(this,S),n(this,z));this.setText(T.join(`
31
+ `))},Ct=new WeakSet,At=function(){if(n(this,S).variants.length>0){const{parseConverter:W}=t(370);this.setText(W(String(this.firstChild),n(this,S),n(this,z)))}};let $t=ht},299:(Q,y,t)=>{t.d(y,{o:()=>r});var P=t(169),b=t(444),L=t(891),D=t(541),I=t(34),O=(i,s,d)=>{if(!s.has(i))throw TypeError("Cannot "+d)},E=(i,s,d)=>(O(i,s,"read from private field"),d?d.call(i):s.get(i)),f=(i,s,d)=>{if(s.has(i))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(i):s.set(i,d)},v=(i,s,d,A)=>(O(i,s,"write to private field"),A?A.call(i,d):s.set(i,d),d),o=(i,s,d)=>(O(i,s,"access private method"),d),l,h,u,c;class r extends D.Token{constructor(s,d,A=L.Z.getConfig(),x=[],C="|"){if(super(void 0,A,x,{}),f(this,u),f(this,l,!0),f(this,h,void 0),this.insertAt(new I.D(s,"link-target",A,x,{})),d!==void 0){const B=new D.Token(d,A,x,{});B.type="link-text",B.setAttribute("stage",b.C-1),this.insertAt(B)}v(this,h,C)}afterBuild(){E(this,h).includes("\0")&&v(this,h,this.buildFromStr(E(this,h),"string"))}setAttribute(s,d){s==="bracket"?v(this,l,!!d):super.setAttribute(s,d)}toString(s){const d=super.toString(s,E(this,h));return E(this,l)?`[[${d}]]`:d}text(){const s=super.text("|");return E(this,l)?`[[${s}]]`:s}getAttribute(s){return s==="padding"?2:super.getAttribute(s)}getGaps(s){return s===0?E(this,h).length:1}lint(s=this.getAbsoluteIndex()){const d=super.lint(s),{childNodes:[A,x],type:C}=this,{encoded:B,fragment:K}=o(this,u,c).call(this);let G;return C==="link"&&A.childNodes.some(({type:Y})=>Y==="template")&&(G={start:s,...this.getRootNode().posFromIndex(s)},d.push((0,P.D)(A,G,"template in an internal link target","warning"))),B&&(G!=null||(G={start:s,...this.getRootNode().posFromIndex(s)}),d.push((0,P.D)(A,G,"unnecessary URL encoding in an internal link"))),C==="link"&&(x!=null&&x.childNodes.some(({type:Y,data:Z})=>Y==="text"&&Z.includes("|")))?(G!=null||(G={start:s,...this.getRootNode().posFromIndex(s)}),d.push((0,P.D)(x,G,'additional "|" in the link text',"warning"))):C!=="link"&&K!==void 0&&(G!=null||(G={start:s,...this.getRootNode().posFromIndex(s)}),d.push((0,P.D)(A,G,"useless fragment"))),d}print(){return super.print(E(this,l)?{pre:"[[",post:"]]",sep:E(this,h)}:{sep:E(this,h)})}}l=new WeakMap,h=new WeakMap,u=new WeakSet,c=function(){return this.normalizeTitle(this.firstChild.text(),0,!1,!0,!0)}},533:(Q,y,t)=>{t.d(y,{q:()=>U});var P=t(467),b=t(169),L=t(891),D=t(299),I=t(541),O=Object.defineProperty,E=(R,_,M)=>_ in R?O(R,_,{enumerable:!0,configurable:!0,writable:!0,value:M}):R[_]=M,f=(R,_,M)=>(E(R,typeof _!="symbol"?_+"":_,M),M),v=(R,_,M)=>{if(!_.has(R))throw TypeError("Cannot "+M)},o=(R,_,M)=>(v(R,_,"read from private field"),M?M.call(R):_.get(R)),l=(R,_,M)=>{if(_.has(R))throw TypeError("Cannot add the same private member more than once");_ instanceof WeakSet?_.add(R):_.set(R,M)},h=(R,_,M,w)=>(v(R,_,"write to private field"),w?w.call(R,M):_.set(R,M),M),u;const c=new Set(["alt","link","lang","page","caption"]);function r(R,_,M=L.Z.getConfig(),w=!1){_=_.trim();let n=_.replace(/\0\d+t\x7F/gu,"").trim();switch(R){case"width":return!n||/^(?:\d+x?|\d*x\d+)$/u.test(n);case"link":{if(!n||new RegExp(`^(?:(?:${M.protocol}|//)${P._X}|\0\\d+m\x7F)${P.Qk}$`,"iu").test(n))return _;n.startsWith("[[")&&n.endsWith("]]")&&(n=n.slice(2,-2));const p=L.Z.normalizeTitle(n,0,!1,M,w,!0,!0);return p.valid&&p}case"lang":return!n||M.variants.includes(n);case"alt":case"class":case"manualthumb":return!0;default:return!isNaN(n)}}class i extends I.Token{constructor(_,M=L.Z.getConfig(),w=[]){var n=(...N)=>{super(...N),f(this,"type","image-parameter"),l(this,u,"")},e;let p;const $=Object.entries(M.img).map(([N,S])=>[N,S,new RegExp(`^(\\s*)${N.replace("$1","(.*)")}(\\s*)$`,"u")]),F=$.find(([,N,S])=>(p=S.exec(_),p&&(p.length!==4||r(N,p[2],M,!0)!==!1)));if(F&&p){p.length===3?(n(void 0,M,w),h(this,u,_)):(n(p[2],M,w,{}),h(this,u,`${p[1]}${F[0]}${p[3]}`)),this.setAttribute("name",F[1]);return}n(_,{...M,excludes:[...(e=M.excludes)!=null?e:[],"list"]},w),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get link(){return this.name==="link"?r("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var _;((_=this.parentNode)==null?void 0:_.type)==="gallery-image"&&!c.has(this.name)&&this.setAttribute("name","invalid")}toString(_){return o(this,u)?o(this,u).replace("$1",super.toString(_)):super.toString(_)}text(){return o(this,u)?o(this,u).replace("$1",super.text()).trim():super.text().trim()}getAttribute(_){return _==="plain"?this.name==="caption":_==="padding"?Math.max(0,o(this,u).indexOf("$1")):super.getAttribute(_)}lint(_=this.getAbsoluteIndex()){const M=super.lint(_),{link:w,name:n}=this;return n==="invalid"?M.push((0,b.Y)(this,{start:_},"invalid gallery image parameter")):typeof w=="object"&&w.encoded&&M.push((0,b.Y)(this,{start:_},"unnecessary URL encoding in an internal link")),M}print(){return o(this,u)?`<span class="wpb-image-parameter">${o(this,u).replace("$1",`<span class="wpb-image-caption">${(0,P.S0)(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}}u=new WeakMap;var s=Object.defineProperty,d=(R,_,M)=>_ in R?s(R,_,{enumerable:!0,configurable:!0,writable:!0,value:M}):R[_]=M,A=(R,_,M)=>(d(R,typeof _!="symbol"?_+"":_,M),M),x=(R,_,M)=>{if(!_.has(R))throw TypeError("Cannot "+M)},C=(R,_,M)=>{if(_.has(R))throw TypeError("Cannot add the same private member more than once");_ instanceof WeakSet?_.add(R):_.set(R,M)},B=(R,_,M)=>(x(R,_,"access private method"),M),K,G;const Y=new Set(["manualthumb","frameless","framed","thumbnail"]),Z=new Set(["left","right","center","none"]),a=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),m=(R,_,M,w)=>{if(w===void 0)return[];const n=new RegExp(`${[R,_,M].map(P.hr).join("|")}`,"gu"),e=[];let p=n.exec(w),$=0,F=0;for(;p;){const{0:N,index:S}=p;N!==M?$+=N===R?1:-1:$===0&&(e.push(w.slice(F,S)),{lastIndex:F}=n),p=n.exec(w)}return e.push(w.slice(F)),e};class U extends D.o{constructor(_,M,w=L.Z.getConfig(),n=[],e="|"){super(_,void 0,w,n,e),C(this,K),A(this,"type","file"),this.append(...m("-{","}-","|",M).map(p=>new i(p,w,n)))}lint(_=this.getAbsoluteIndex()){const M=super.lint(_),w=this.getAllArgs().filter(({childNodes:S})=>{const z=S.filter(X=>X.text().trim());return z.length!==1||z[0].type!=="arg"}),n=[...new Set(w.map(({name:S})=>S))].filter(S=>S!=="invalid"),e=n.filter(S=>Y.has(S)),p=n.filter(S=>Z.has(S)),$=n.filter(S=>a.has(S));if(w.length===n.length&&e.length<2&&p.length<2&&$.length<2)return M;const F={start:_,...this.getRootNode().posFromIndex(_)},N=(S,z)=>X=>(0,b.D)(X,F,L.Z.msg(`${S} image $1 parameter`,z));for(const S of n){let z=w.filter(({name:X})=>X===S);S==="caption"&&(z=[...z.slice(0,-1).filter(X=>X.text()),...z.slice(-1)]),z.length>1&&M.push(...z.map(N("duplicated",S)))}return e.length>1&&M.push(...w.filter(({name:S})=>Y.has(S)).map(N("conflicting","frame"))),p.length>1&&M.push(...w.filter(({name:S})=>Z.has(S)).map(N("conflicting","horizontal-alignment"))),$.length>1&&M.push(...w.filter(({name:S})=>a.has(S)).map(N("conflicting","vertical-alignment"))),M}getAllArgs(){return this.childNodes.slice(1)}getArgs(_){return this.getAllArgs().filter(({name:M})=>_===M)}getFrameArgs(){return B(this,K,G).call(this,Y,"\u6846\u67B6")}getHorizAlignArgs(){return B(this,K,G).call(this,Z,"\u6C34\u5E73\u5BF9\u9F50")}getVertAlignArgs(){return B(this,K,G).call(this,a,"\u5782\u76F4\u5BF9\u9F50")}}K=new WeakSet,G=function(R,_){return this.getAllArgs().filter(({name:w})=>R.has(w))}},39:(Q,y,t)=>{t.d(y,{_:()=>l});var P=t(169),b=t(444),L=t(891),D=t(541),I=t(533),O=(h,u,c)=>{if(!u.has(h))throw TypeError("Cannot "+c)},E=(h,u,c)=>{if(u.has(h))throw TypeError("Cannot add the same private member more than once");u instanceof WeakSet?u.add(h):u.set(h,c)},f=(h,u,c)=>(O(h,u,"access private method"),c),v,o;class l extends I.q{constructor(u,c,r,i=L.Z.getConfig(),s=[]){let d;if(r!==void 0){d=new D.Token(r,i,s),d.type="plain";for(let A=1;A<b.C;A++)d.parseOnce();s.splice(s.indexOf(d),1)}super(c,d==null?void 0:d.toString(),i,s),E(this,v),this.setAttribute("bracket",!1),this.type=`${u}-image`}getAttribute(u){return u==="padding"?0:super.getAttribute(u)}lint(u=this.getAbsoluteIndex()){const c=super.lint(u),{ns:r}=f(this,v,o).call(this);return r!==6&&c.push((0,P.Y)(this,{start:u},"invalid gallery image")),c}}v=new WeakSet,o=function(){const h=this.type==="imagemap-image";return this.normalizeTitle(String(this.firstChild),h?0:6,!0,!h)}},524:(Q,y,t)=>{t.d(y,{h:()=>I});var P=t(299),b=Object.defineProperty,L=(O,E,f)=>E in O?b(O,E,{enumerable:!0,configurable:!0,writable:!0,value:f}):O[E]=f,D=(O,E,f)=>(L(O,typeof E!="symbol"?E+"":E,f),f);class I extends P.o{constructor(){super(...arguments),D(this,"type","link")}}},686:(Q,y,t)=>{t.d(y,{k:()=>D});var P=t(169),b=t(891),L=t(541);class D extends L.Token{constructor(O,E=!1,f=b.Z.getConfig(),v=[]){super(O,f,v,{}),this.type=E?"ext-link-url":"free-ext-link"}lint(O=this.getAbsoluteIndex()){const E=super.lint(O),f=`[\uFF0C\uFF1B\u3002\uFF1A\uFF01\uFF1F\uFF08\uFF09]+${this.type==="ext-link-url"?"|\\|+":""}`,v=new RegExp(f,"u"),o=new RegExp(f,"gu");let l;for(const h of this.childNodes){const{type:u,data:c}=h;if(u!=="text"||!v.test(c))continue;l!=null||(l={start:O,...this.getRootNode().posFromIndex(O)});const r=(0,P.D)(h,l,"","warning");o.lastIndex=0;for(let i=o.exec(c);i;i=o.exec(c)){const{index:s,0:d}=i,A=c.slice(0,s).split(`
32
+ `),{length:x}=A,{length:C}=A[A.length-1],B=O+s,K=r.startLine+x-1,G=x===1?r.startCol+C:C;E.push({...r,message:b.Z.msg("$1 in URL",d.startsWith("|")?'"|"':b.Z.msg("full-width punctuation")),startIndex:B,endIndex:B+d.length,startLine:K,endLine:K,startCol:G,endCol:G+d.length})}}return E}}},57:(Q,y,t)=>{t.r(y),t.d(y,{NestedToken:()=>o});var P=t(169),b=t(891),L=t(541),D=t(895),I=t(826),O=t(976),E=Object.defineProperty,f=(l,h,u)=>h in l?E(l,h,{enumerable:!0,configurable:!0,writable:!0,value:u}):l[h]=u,v=(l,h,u)=>(f(l,typeof h!="symbol"?h+"":h,u),u);class o extends L.Token{constructor(h,u,c,r=b.Z.getConfig(),i=[]){var s;h=(s=h==null?void 0:h.replace(u,(d,A,x,C,B)=>{const K=`\0${i.length+1}${A?"e":"c"}\x7F`;if(A)new D.$(A,x,C,B,r,i);else{const G=d.endsWith("-->");new O.T(d.slice(4,G?-3:void 0),G,r,i)}return K}))==null?void 0:s.replace(/(^|\0\d+[ce]\x7F)([^\0]+)(?=$|\0\d+[ce]\x7F)/gu,(d,A,x)=>(new I.O(x,r,i),`${A}\0${i.length}c\x7F`)),super(h,r,i,{}),v(this,"type","ext-inner")}lint(h=this.getAbsoluteIndex()){let u;return[...super.lint(h),...this.childNodes.filter(c=>{if(c.type==="ext"||c.type==="comment")return!1;const r=String(c).trim();return r&&!/^<!--.*-->$/su.test(r)}).map(c=>(u!=null||(u={start:h,...this.getRootNode().posFromIndex(h)}),(0,P.D)(c,u,b.Z.msg("invalid content in <$1>",this.name))))]}}},439:(Q,y,t)=>{t.d(y,{h:()=>L});var P=t(891),b=t(541);class L extends b.Token{get innerText(){return this.firstChild.data}constructor(I="",O=P.Z.getConfig(),E=[]){super(I,O,E)}}},976:(Q,y,t)=>{t.d(y,{T:()=>f});var P=t(169),b=t(959),L=t(891),D=t(439),I=Object.defineProperty,O=(v,o,l)=>o in v?I(v,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):v[o]=l,E=(v,o,l)=>(O(v,typeof o!="symbol"?o+"":o,l),l);class f extends(0,b.a)(D.h){constructor(o,l=!0,h=L.Z.getConfig(),u=[]){super(o,h,u),E(this,"type","comment"),E(this,"closed"),this.closed=l}getAttribute(o){return o==="padding"?4:super.getAttribute(o)}lint(o=this.getAbsoluteIndex()){return this.closed?[]:[(0,P.Y)(this,{start:o},"unclosed HTML comment")]}toString(o){return`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}}},461:(Q,y,t)=>{t.d(y,{k:()=>I});var P=t(933),b=Object.defineProperty,L=(O,E,f)=>E in O?b(O,E,{enumerable:!0,configurable:!0,writable:!0,value:f}):O[E]=f,D=(O,E,f)=>(L(O,typeof E!="symbol"?E+"":E,f),f);class I extends P.T{constructor(){super(...arguments),D(this,"type","dd")}}},491:(Q,y,t)=>{t.r(y),t.d(y,{NowikiToken:()=>E});var P=t(169),b=t(891),L=t(439),D=Object.defineProperty,I=(f,v,o)=>v in f?D(f,v,{enumerable:!0,configurable:!0,writable:!0,value:o}):f[v]=o,O=(f,v,o)=>(I(f,typeof v!="symbol"?v+"":v,o),o);class E extends L.h{constructor(){super(...arguments),O(this,"type","ext-inner")}lint(v=this.getAbsoluteIndex()){const{name:o,firstChild:{data:l}}=this;return(o==="templatestyles"||o==="section")&&l?[(0,P.Y)(this,{start:v},b.Z.msg("nothing should be in <$1>",o))]:super.lint(v)}}},933:(Q,y,t)=>{t.d(y,{T:()=>b});var P=t(439);class b extends P.h{}},826:(Q,y,t)=>{t.d(y,{O:()=>O});var P=t(959),b=t(439),L=Object.defineProperty,D=(E,f,v)=>f in E?L(E,f,{enumerable:!0,configurable:!0,writable:!0,value:v}):E[f]=v,I=(E,f,v)=>(D(E,typeof f!="symbol"?f+"":f,v),v);class O extends(0,P.a)(b.h){constructor(){super(...arguments),I(this,"type","noinclude")}}},160:(Q,y,t)=>{t.r(y),t.d(y,{ParamTagToken:()=>f});var P=t(169),b=t(891),L=t(541),D=t(34),I=Object.defineProperty,O=(v,o,l)=>o in v?I(v,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):v[o]=l,E=(v,o,l)=>(O(v,typeof o!="symbol"?o+"":o,l),l);class f extends L.Token{constructor(o,l=b.Z.getConfig(),h=[],u={}){if(super(void 0,l,h,{}),E(this,"type","ext-inner"),o){const c=D.D;this.append(...o.split(`
33
+ `).map(r=>new c(r,"param-line",l,h,{})))}}toString(o){return super.toString(o,`
35
34
  `)}text(){return super.text(`
36
- `)}getGaps(n){return n<this.length-1?1:0}lint(n=this.getAbsoluteIndex()){let r;return this.childNodes.filter(d=>{const{childNodes:i}=d,l=i.findIndex(({type:a})=>a!=="text"),s=(l>=0?i.slice(0,l).map(String).join(""):String(d)).trim();return s&&!(l>=0?/^[a-z]+(?:\[\])?\s*(?:=|$)/iu:/^[a-z]+(?:\[\])?\s*=/iu).test(s)}).map(d=>(r!=null||(r={start:n,...this.getRootNode().posFromIndex(n)}),(0,$.D)(d,r,I.default.msg("invalid parameter of $1",this.name))))}print(){return super.print({sep:`
37
- `})}}},504:(Y,M,t)=>{t.r(M),t.d(M,{InputboxToken:()=>W});var $=t(313),I=t(891),R=t(160);class W extends R.ParamTagToken{constructor(S,P=I.default.getConfig(),x=[]){const o=Symbol("InputboxToken");x.push(o),S&&(S=(0,$.parseBraces)(S,P,x)),x.splice(x.indexOf(o),1),super(S,P,x,{})}}},435:(Y,M,t)=>{t.r(M),t.d(M,{PreToken:()=>P});var $=t(891),I=t(541),R=t(826),W=Object.defineProperty,b=(x,o,n)=>o in x?W(x,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):x[o]=n,S=(x,o,n)=>(b(x,typeof o!="symbol"?o+"":o,n),n);class P extends I.Token{constructor(o,n=$.default.getConfig(),r=[]){if(o){const d="<nowiki>",i="</nowiki>",{length:l}=d;let s=o.indexOf(d),a=o.indexOf(i,s+l),c="";for(;s!==-1&&a!==-1;)new R.O(d,n,r),new R.O(i,n,r),c+=`${o.slice(0,s)}\0${r.length-1}c\x7F${o.slice(s+l,a)}\0${r.length}c\x7F`,o=o.slice(a+l+1),s=o.indexOf(d),a=o.indexOf(i,s+l);o=`${c}${o}`}super(o,n,r,{}),S(this,"type","ext-inner"),this.setAttribute("stage",$.default.MAX_STAGE-1)}isPlain(){return!0}}},669:(Y,M,t)=>{t.r(M),t.d(M,{SyntaxToken:()=>R});var $=t(891),I=t(541);class R extends I.Token{constructor(b,S,P="plain",x=$.default.getConfig(),o=[],n){super(b,x,o,n),this.type=P}}},895:(Y,M,t)=>{t.d(M,{$:()=>n});var $=t(169),I=t(891),R=t(541),W=t(415),b=t(83),S=Object.defineProperty,P=(r,d,i)=>d in r?S(r,d,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[d]=i,x=(r,d,i)=>(P(r,typeof d!="symbol"?d+"":d,i),i);const o=(r,d)=>{const i=new Set(r);return i.delete(d),[...i]};class n extends W.m{constructor(d,i,l,s,a=I.default.getConfig(),c=[]){var v;const _=d.toLowerCase(),m=new b.x(!i||/^\s/u.test(i)?i:` ${i}`,"ext-attrs",_,a,c),F={...a,ext:o(a.ext,_),excludes:[...(v=a.excludes)!=null?v:[]]};let K;switch(F.inExt=!0,_){case"tab":F.ext=o(F.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":_==="poem"&&F.excludes.push("heading"),K=new R.Token(l,F,c);break;case"pre":{const{PreToken:G}=t(435);K=new G(l,F,c);break}case"dynamicpagelist":{const{ParamTagToken:G}=t(160);K=new G(l,F,c);break}case"inputbox":{F.excludes.push("heading");const{InputboxToken:G}=t(504);K=new G(l,F,c);break}case"references":{const{NestedToken:G}=t(57);K=new G(l,/<!--.*?(?:-->|$)|<(ref)(\s[^>]*)?>(.*?)<\/(ref\s*)>/gisu,["ref"],F,c);break}case"choose":{const{NestedToken:G}=t(57);K=new G(l,/<(option|choicetemplate)(\s[^>]*)?>(.*?)<\/(\1)>/gsu,["option","choicetemplate"],F,c);break}case"combobox":{const{NestedToken:G}=t(57);K=new G(l,/<(combooption)(\s[^>]*)?>(.*?)<\/(combooption\s*)>/gisu,["combooption"],F,c);break}case"gallery":{const{GalleryToken:G}=t(420);K=new G(l,F,c);break}case"imagemap":{const{ImagemapToken:G}=t(842);K=new G(l,F,c);break}default:{const{NowikiToken:G}=t(491);K=new G(l,F)}}K.setAttribute("name",_),K.type="ext-inner",super(d,m,K,s,a,c),x(this,"type","ext")}lint(d=this.getAbsoluteIndex()){const i=super.lint(d);if(this.name!=="nowiki"&&this.closest("html-attrs, table-attrs")){const l=this.getRootNode(),s={start:d,...l.posFromIndex(d)};i.push((0,$.Y)(this,s,"extension tag in HTML tag attributes"))}return i}}},415:(Y,M,t)=>{t.d(M,{m:()=>n});var $=t(891),I=t(541),R=(r,d,i)=>{if(!d.has(r))throw TypeError("Cannot "+i)},W=(r,d,i)=>(R(r,d,"read from private field"),i?i.call(r):d.get(r)),b=(r,d,i)=>{if(d.has(r))throw TypeError("Cannot add the same private member more than once");d instanceof WeakSet?d.add(r):d.set(r,i)},S=(r,d,i,l)=>(R(r,d,"write to private field"),l?l.call(r,i):d.set(r,i),i),P,x,o;class n extends I.Token{constructor(d,i,l,s,a=$.default.getConfig(),c=[]){super(void 0,a),b(this,P,void 0),b(this,x,void 0),b(this,o,void 0),this.setAttribute("name",d.toLowerCase()),S(this,o,[d,s||d]),S(this,P,s===void 0),S(this,x,s!==""),this.append(i,l);const v=typeof i=="string"?-1:c.indexOf(i);c.splice(v===-1?1/0:v,0,this)}get closed(){return W(this,x)}toString(d){const{firstChild:i,lastChild:l}=this,[s,a]=W(this,o);return W(this,P)?`<${s}${i.toString(d)}/>`:`<${s}${i.toString(d)}>${l.toString(d)}${this.closed?`</${a}>`:""}`}text(){const[d,i]=W(this,o);return W(this,P)?`<${d}${this.firstChild.text()}/>`:`<${d}${super.text(">")}${this.closed?`</${i}>`:""}`}getPadding(){return W(this,o)[0].length+1}getGaps(d){return 1}print(){const[d,i]=W(this,o);return super.print(W(this,P)?{pre:`&lt;${d}`,post:"/&gt;"}:{pre:`&lt;${d}`,sep:"&gt;",post:this.closed?`&lt;/${i}&gt;`:""})}}P=new WeakMap,x=new WeakMap,o=new WeakMap},169:(Y,M,t)=>{t.d(M,{D:()=>I,Y:()=>R});var $=t(891);const I=(W,b,S,P="error")=>{const x=W.getRelativeIndex(),{offsetHeight:o,offsetWidth:n,parentNode:r}=W,{top:d,left:i}=r.posFromIndex(x),{start:l}=b,{top:s,left:a}="top"in b?b:W.getRootNode().posFromIndex(l),c=String(W),v=l+x,_=s+d,m=d?i:a+i;return{message:$.default.msg(S),severity:P,startIndex:v,endIndex:v+c.length,startLine:_,endLine:_+o-1,startCol:m,endCol:o===1?m+n:n}},R=(W,b,S,P="error")=>{const{start:x}=b,{offsetHeight:o,offsetWidth:n}=W,r=String(W),{top:d,left:i}="top"in b?b:W.getRootNode().posFromIndex(x);return{message:$.default.msg(S),severity:P,startIndex:x,endIndex:x+r.length,startLine:d,endLine:d+o-1,startCol:i,endCol:o===1?i+n:n}}},467:(Y,M,t)=>{t.d(M,{PN:()=>R,Qk:()=>I,S0:()=>x,_X:()=>$,fL:()=>b,hr:()=>W,jq:()=>P,m9:()=>S});const $='(?:\\[[\\da-f:.]+\\]|[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD])',I='(?:[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD]|\\0\\d+c\\x7F)*',R=o=>o.replace(/\0\d+c\x7F/gu,""),W=o=>o.replace(/[\\{}()|.?*+^$[\]]/gu,"\\$&"),b=(o,n="")=>o.map(r=>typeof r=="string"?r:r.text()).join(n),S=o=>o.replace(/&#(\d+|x[\da-f]+);/giu,(n,r)=>String.fromCodePoint(+`${r[0].toLowerCase()==="x"?"0":""}${r}`)),P=o=>o.replace(/\n/gu,"\\n"),x=(o,n={})=>{const{pre:r="",post:d="",sep:i=""}=n,l={"&":"amp","<":"lt",">":"gt"};return`${r}${o.map(s=>s.type==="text"?s.data.replace(/[&<>]/gu,a=>`&${l[a]};`):s.print()).join(i)}${d}`}},166:Y=>{Y.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":{"6":"File","10":"Template"},"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","#regex":"regex","#related":"related","#cscore":"cscore"},[],["msg","\u539F\u59CB","raw"],["\u66FF\u4EE3","subst","\u5B89\u5168\u66FF\u4EE3","safesubst"]],"doubleUnderscore":[[],[]],"protocol":"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:","interwiki":[],"img":{},"variants":[]}')}},Rt={};function Pt(Y){var M=Rt[Y];if(M!==void 0)return M.exports;var t=Rt[Y]={exports:{}};return Vt[Y](t,t.exports,Pt),t.exports}Pt.d=(Y,M)=>{for(var t in M)Pt.o(M,t)&&!Pt.o(Y,t)&&Object.defineProperty(Y,t,{enumerable:!0,get:M[t]})},Pt.o=(Y,M)=>Object.prototype.hasOwnProperty.call(Y,M),Pt.r=Y=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Y,"__esModule",{value:!0})};var ie=Pt(891)})();})();
35
+ `)}getGaps(){return 1}lint(o=this.getAbsoluteIndex()){let l;return this.childNodes.filter(h=>{const{childNodes:u}=h,c=u.findIndex(({type:i})=>i!=="text"),r=(c>=0?u.slice(0,c).map(String).join(""):String(h)).trim();return r&&!(c>=0?/^[a-z]+(?:\[\])?\s*(?:=|$)/iu:/^[a-z]+(?:\[\])?\s*=/iu).test(r)}).map(h=>(l!=null||(l={start:o,...this.getRootNode().posFromIndex(o)}),(0,P.D)(h,l,b.Z.msg("invalid parameter of $1",this.name))))}print(){return super.print({sep:`
36
+ `})}}},504:(Q,y,t)=>{t.r(y),t.d(y,{InputboxToken:()=>D});var P=t(313),b=t(891),L=t(160);class D extends L.ParamTagToken{constructor(O,E=b.Z.getConfig(),f=[]){const v=Symbol("InputboxToken");f.push(v),O&&(O=(0,P.parseBraces)(O,E,f)),f.splice(f.indexOf(v),1),super(O,E,f,{})}}},435:(Q,y,t)=>{t.r(y),t.d(y,{PreToken:()=>f});var P=t(444),b=t(891),L=t(541),D=t(826),I=Object.defineProperty,O=(v,o,l)=>o in v?I(v,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):v[o]=l,E=(v,o,l)=>(O(v,typeof o!="symbol"?o+"":o,l),l);class f extends L.Token{constructor(o,l=b.Z.getConfig(),h=[]){if(o){const u="<nowiki>",c="</nowiki>",{length:r}=u;let i=o.indexOf(u),s=o.indexOf(c,i+r),d="";for(;i!==-1&&s!==-1;)new D.O(u,l,h),new D.O(c,l,h),d+=`${o.slice(0,i)}\0${h.length-1}c\x7F${o.slice(i+r,s)}\0${h.length}c\x7F`,o=o.slice(s+r+1),i=o.indexOf(u),s=o.indexOf(c,i+r);o=`${d}${o}`}super(o,l,h,{}),E(this,"type","ext-inner"),this.setAttribute("stage",P.C-1)}getAttribute(o){return o==="plain"||super.getAttribute(o)}}},669:(Q,y,t)=>{t.r(y),t.d(y,{SyntaxToken:()=>L});var P=t(891),b=t(541);class L extends b.Token{constructor(I,O,E="plain",f=P.Z.getConfig(),v=[],o){super(I,f,v,o),this.type=E}}},895:(Q,y,t)=>{t.d(y,{$:()=>o});var P=t(169),b=t(891),L=t(541),D=t(415),I=t(83),O=Object.defineProperty,E=(l,h,u)=>h in l?O(l,h,{enumerable:!0,configurable:!0,writable:!0,value:u}):l[h]=u,f=(l,h,u)=>(E(l,typeof h!="symbol"?h+"":h,u),u);const v=(l,h)=>{const u=new Set(l);return u.delete(h),[...u]};class o extends D.m{constructor(h,u,c,r,i=b.Z.getConfig(),s=[]){var d;const A=h.toLowerCase(),x=new I.x(!u||/^\s/u.test(u)?u:` ${u}`,"ext-attrs",A,i,s),C={...i,ext:v(i.ext,A),excludes:[...(d=i.excludes)!=null?d:[]]};let B;switch(C.inExt=!0,A){case"tab":C.ext=v(C.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":A==="poem"&&C.excludes.push("heading"),B=new L.Token(c,C,s);break;case"pre":{const{PreToken:K}=t(435);B=new K(c,C,s);break}case"dynamicpagelist":{const{ParamTagToken:K}=t(160);B=new K(c,C,s);break}case"inputbox":{C.excludes.push("heading");const{InputboxToken:K}=t(504);B=new K(c,C,s);break}case"references":{const{NestedToken:K}=t(57);B=new K(c,/<!--.*?(?:-->|$)|<(ref)(\s[^>]*)?>(.*?)<\/(ref\s*)>/gisu,["ref"],C,s);break}case"choose":{const{NestedToken:K}=t(57);B=new K(c,/<(option|choicetemplate)(\s[^>]*)?>(.*?)<\/(\1)>/gsu,["option","choicetemplate"],C,s);break}case"combobox":{const{NestedToken:K}=t(57);B=new K(c,/<(combooption)(\s[^>]*)?>(.*?)<\/(combooption\s*)>/gisu,["combooption"],C,s);break}case"gallery":{const{GalleryToken:K}=t(420);B=new K(c,C,s);break}case"imagemap":{const{ImagemapToken:K}=t(842);B=new K(c,C,s);break}default:{const{NowikiToken:K}=t(491);B=new K(c,C)}}B.setAttribute("name",A),B.type="ext-inner",super(h,x,B,r,i,s),f(this,"type","ext")}lint(h=this.getAbsoluteIndex()){const u=super.lint(h);if(this.name!=="nowiki"&&this.closest("html-attrs, table-attrs")){const c=this.getRootNode(),r={start:h,...c.posFromIndex(h)};u.push((0,P.Y)(this,r,"extension tag in HTML tag attributes"))}return u}}},415:(Q,y,t)=>{t.d(y,{m:()=>o});var P=t(891),b=t(541),L=(l,h,u)=>{if(!h.has(l))throw TypeError("Cannot "+u)},D=(l,h,u)=>(L(l,h,"read from private field"),u?u.call(l):h.get(l)),I=(l,h,u)=>{if(h.has(l))throw TypeError("Cannot add the same private member more than once");h instanceof WeakSet?h.add(l):h.set(l,u)},O=(l,h,u,c)=>(L(l,h,"write to private field"),c?c.call(l,u):h.set(l,u),u),E,f,v;class o extends b.Token{constructor(h,u,c,r,i=P.Z.getConfig(),s=[]){super(void 0,i),I(this,E,void 0),I(this,f,void 0),I(this,v,void 0),this.setAttribute("name",h.toLowerCase()),O(this,v,[h,r||h]),O(this,E,r===void 0),O(this,f,r!==""),this.append(u,c);const d=typeof u=="string"?-1:s.indexOf(u);s.splice(d===-1?1/0:d,0,this)}get closed(){return D(this,f)}toString(h){const{firstChild:u,lastChild:c}=this,[r,i]=D(this,v);return D(this,E)?`<${r}${u.toString(h)}/>`:`<${r}${u.toString(h)}>${c.toString(h)}${this.closed?`</${i}>`:""}`}text(){const[h,u]=D(this,v);return D(this,E)?`<${h}${this.firstChild.text()}/>`:`<${h}${super.text(">")}${this.closed?`</${u}>`:""}`}getAttribute(h){return h==="padding"?D(this,v)[0].length+1:super.getAttribute(h)}getGaps(){return 1}print(){const[h,u]=D(this,v);return super.print(D(this,E)?{pre:`&lt;${h}`,post:"/&gt;"}:{pre:`&lt;${h}`,sep:"&gt;",post:this.closed?`&lt;/${u}&gt;`:""})}}E=new WeakMap,f=new WeakMap,v=new WeakMap},444:(Q,y,t)=>{t.d(y,{C:()=>P,L:()=>b});const P=11,b=t(166)},223:(Q,y,t)=>{t.d(y,{j:()=>P});const P={run(b){return b()}}},169:(Q,y,t)=>{t.d(y,{D:()=>b,Y:()=>L});var P=t(891);const b=(D,I,O,E="error")=>{const f=D.getRelativeIndex(),{offsetHeight:v,offsetWidth:o,parentNode:l}=D,{top:h,left:u}=l.posFromIndex(f),{start:c}=I,{top:r,left:i}="top"in I?I:D.getRootNode().posFromIndex(c),s=String(D),d=c+f,A=r+h,x=h?u:i+u;return{message:P.Z.msg(O),severity:E,startIndex:d,endIndex:d+s.length,startLine:A,endLine:A+v-1,startCol:x,endCol:v===1?x+o:o}},L=(D,I,O,E="error")=>{const{start:f}=I,{offsetHeight:v,offsetWidth:o}=D,l=String(D),{top:h,left:u}="top"in I?I:D.getRootNode().posFromIndex(f);return{message:P.Z.msg(O),severity:E,startIndex:f,endIndex:f+l.length,startLine:h,endLine:h+v-1,startCol:u,endCol:v===1?u+o:o}}},467:(Q,y,t)=>{t.d(y,{PN:()=>L,Qk:()=>b,S0:()=>f,_X:()=>P,fL:()=>I,hr:()=>D,jq:()=>E,m9:()=>O});const P='(?:\\[[\\da-f:.]+\\]|[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD])',b='(?:[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD]|\\0\\d+c\\x7F)*',L=v=>v.replace(/\0\d+c\x7F/gu,""),D=v=>v.replace(/[\\{}()|.?*+^$[\]]/gu,"\\$&"),I=(v,o="")=>v.map(l=>typeof l=="string"?l:l.text()).join(o),O=v=>v.replace(/&#(\d+|x[\da-f]+);/giu,(o,l)=>String.fromCodePoint(+`${l[0].toLowerCase()==="x"?"0":""}${l}`)),E=v=>v.replace(/\n/gu,"\\n"),f=(v,o={})=>{const{pre:l="",post:h="",sep:u=""}=o,c={"&":"amp","<":"lt",">":"gt"};return`${l}${v.map(r=>r.type==="text"?r.data.replace(/[&<>]/gu,i=>`&${c[i]};`):r.print()).join(u)}${h}`}},166:Q=>{Q.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":{"6":"File","10":"Template"},"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","#regex":"regex","#related":"related","#cscore":"cscore"},[],["msg","\u539F\u59CB","raw"],["\u66FF\u4EE3","subst","\u5B89\u5168\u66FF\u4EE3","safesubst"]],"doubleUnderscore":[[],[]],"protocol":"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:","interwiki":[],"img":{},"variants":[]}')}},Rt={};function Et(Q){var y=Rt[Q];if(y!==void 0)return y.exports;var t=Rt[Q]={exports:{}};return Qt[Q](t,t.exports,Et),t.exports}Et.d=(Q,y)=>{for(var t in y)Et.o(y,t)&&!Et.o(Q,t)&&Object.defineProperty(Q,t,{enumerable:!0,get:y[t]})},Et.o=(Q,y)=>Object.prototype.hasOwnProperty.call(Q,y),Et.r=Q=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Q,"__esModule",{value:!0})};var ne=Et(891)})();})();
@@ -1,7 +1,7 @@
1
1
  (() => {
2
2
  const MAX_STAGE = 11;
3
3
  const workerJS = () => {
4
- self.importScripts('https://fastly.jsdelivr.net/gh/bhsd-harry/wikiparser-node@1.0.2-b/bundle/bundle.min.js');
4
+ self.importScripts('https://fastly.jsdelivr.net/gh/bhsd-harry/wikiparser-node@1.0.3-b/bundle/bundle.min.js');
5
5
  const { Parser } = self, entities = { '&': 'amp', '<': 'lt', '>': 'gt' };
6
6
  self.onmessage = ({ data }) => {
7
7
  var _a;
package/i18n/zh-hans.json CHANGED
@@ -27,6 +27,8 @@
27
27
  "invalid self-closing tag": "无效自封闭标签",
28
28
  "invisible content inside triple brackets": "三重括号内的不可见部分",
29
29
  "lonely \"$1\"": "孤立的\"$1\"",
30
+ "missing module function": "缺少模块函数",
31
+ "missing module name": "缺少模块名称",
30
32
  "nonzero tabindex": "不为0的tabindex",
31
33
  "nothing should be in <$1>": "<$1>标签内不应有任何内容",
32
34
  "section header in a HTML tag": "HTML标签属性中的段落标题",
package/i18n/zh-hant.json CHANGED
@@ -27,6 +27,8 @@
27
27
  "invalid self-closing tag": "無效自封閉標籤",
28
28
  "invisible content inside triple brackets": "三重括號內的不可見部分",
29
29
  "lonely \"$1\"": "孤立的\"$1\"",
30
+ "missing module function": "缺少模組函式",
31
+ "missing module name": "缺少模組名稱",
30
32
  "nonzero tabindex": "不為0的tabindex",
31
33
  "nothing should be in <$1>": "<$1>標籤內不應有任何內容",
32
34
  "section header in a HTML tag": "HTML標籤屬性中的段落標題",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wikiparser-node",
3
- "version": "1.0.2-b",
3
+ "version": "1.0.3-b",
4
4
  "description": "A Node.js parser for MediaWiki markup with AST",
5
5
  "keywords": [
6
6
  "mediawiki",
@@ -61,10 +61,10 @@
61
61
  "eslint-plugin-regexp": "^2.1.1",
62
62
  "eslint-plugin-unicorn": "^49.0.0",
63
63
  "stylelint": "^15.11.0",
64
- "stylelint-config-recommended": "^10.0.1",
65
- "typescript": "^5.0.3",
64
+ "stylelint-config-recommended": "^13.0.0",
66
65
  "webpack-cli": "^5.1.4",
67
- "webpack": "^5.89.0"
66
+ "webpack": "^5.89.0",
67
+ "typescript": "^5.1.6"
68
68
  },
69
69
  "engines": {
70
70
  "node": "^20.9.0"