wikiparser-node 0.11.0 → 1.0.0-b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/README.md +10 -9
  2. package/bundle/bundle.min.js +37 -0
  3. package/config/llwiki.json +1 -35
  4. package/config/minimum.json +136 -0
  5. package/config/moegirl.json +1 -44
  6. package/config/zhwiki.json +1 -466
  7. package/extensions/dist/base.js +105 -0
  8. package/extensions/dist/editor.js +172 -0
  9. package/extensions/dist/highlight.js +46 -0
  10. package/extensions/dist/lint.js +43 -0
  11. package/extensions/editor.css +63 -0
  12. package/extensions/ui.css +119 -0
  13. package/i18n/zh-hans.json +1 -0
  14. package/i18n/zh-hant.json +1 -0
  15. package/package.json +38 -31
  16. package/config/.schema.json +0 -134
  17. package/dist/index.d.ts +0 -114
  18. package/dist/lib/element.d.ts +0 -162
  19. package/dist/lib/node.d.ts +0 -291
  20. package/dist/lib/ranges.d.ts +0 -37
  21. package/dist/lib/text.d.ts +0 -64
  22. package/dist/lib/title.d.ts +0 -21
  23. package/dist/mixin/attributeParent.d.ts +0 -9
  24. package/dist/mixin/fixedToken.d.ts +0 -8
  25. package/dist/mixin/hidden.d.ts +0 -8
  26. package/dist/mixin/singleLine.d.ts +0 -8
  27. package/dist/mixin/sol.d.ts +0 -8
  28. package/dist/parser/brackets.d.ts +0 -12
  29. package/dist/parser/commentAndExt.d.ts +0 -8
  30. package/dist/parser/converter.d.ts +0 -7
  31. package/dist/parser/externalLinks.d.ts +0 -7
  32. package/dist/parser/hrAndDoubleUnderscore.d.ts +0 -11
  33. package/dist/parser/html.d.ts +0 -7
  34. package/dist/parser/links.d.ts +0 -7
  35. package/dist/parser/list.d.ts +0 -7
  36. package/dist/parser/magicLinks.d.ts +0 -7
  37. package/dist/parser/quotes.d.ts +0 -7
  38. package/dist/parser/selector.d.ts +0 -12
  39. package/dist/parser/table.d.ts +0 -11
  40. package/dist/src/arg.d.ts +0 -54
  41. package/dist/src/atom/hidden.d.ts +0 -5
  42. package/dist/src/atom/index.d.ts +0 -15
  43. package/dist/src/attribute.d.ts +0 -65
  44. package/dist/src/attributes.d.ts +0 -112
  45. package/dist/src/charinsert.d.ts +0 -32
  46. package/dist/src/converter.d.ts +0 -103
  47. package/dist/src/converterFlags.d.ts +0 -83
  48. package/dist/src/converterRule.d.ts +0 -75
  49. package/dist/src/extLink.d.ts +0 -62
  50. package/dist/src/gallery.d.ts +0 -33
  51. package/dist/src/hasNowiki/index.d.ts +0 -14
  52. package/dist/src/hasNowiki/pre.d.ts +0 -13
  53. package/dist/src/heading.d.ts +0 -44
  54. package/dist/src/html.d.ts +0 -56
  55. package/dist/src/imageParameter.d.ts +0 -65
  56. package/dist/src/imagemap.d.ts +0 -37
  57. package/dist/src/imagemapLink.d.ts +0 -21
  58. package/dist/src/index.d.ts +0 -186
  59. package/dist/src/link/category.d.ts +0 -16
  60. package/dist/src/link/file.d.ts +0 -85
  61. package/dist/src/link/galleryImage.d.ts +0 -15
  62. package/dist/src/link/index.d.ts +0 -88
  63. package/dist/src/magicLink.d.ts +0 -36
  64. package/dist/src/nested/choose.d.ts +0 -13
  65. package/dist/src/nested/combobox.d.ts +0 -13
  66. package/dist/src/nested/index.d.ts +0 -18
  67. package/dist/src/nested/references.d.ts +0 -13
  68. package/dist/src/nowiki/comment.d.ts +0 -31
  69. package/dist/src/nowiki/dd.d.ts +0 -17
  70. package/dist/src/nowiki/doubleUnderscore.d.ts +0 -22
  71. package/dist/src/nowiki/hr.d.ts +0 -13
  72. package/dist/src/nowiki/index.d.ts +0 -27
  73. package/dist/src/nowiki/list.d.ts +0 -8
  74. package/dist/src/nowiki/noinclude.d.ts +0 -8
  75. package/dist/src/nowiki/quote.d.ts +0 -13
  76. package/dist/src/onlyinclude.d.ts +0 -24
  77. package/dist/src/paramTag/index.d.ts +0 -29
  78. package/dist/src/paramTag/inputbox.d.ts +0 -8
  79. package/dist/src/parameter.d.ts +0 -75
  80. package/dist/src/syntax.d.ts +0 -20
  81. package/dist/src/table/index.d.ts +0 -273
  82. package/dist/src/table/td.d.ts +0 -100
  83. package/dist/src/table/tr.d.ts +0 -91
  84. package/dist/src/tagPair/ext.d.ts +0 -18
  85. package/dist/src/tagPair/include.d.ts +0 -25
  86. package/dist/src/tagPair/index.d.ts +0 -41
  87. package/dist/src/transclude.d.ts +0 -199
  88. package/dist/tool/index.d.ts +0 -420
  89. package/dist/util/base.d.ts +0 -10
  90. package/dist/util/debug.d.ts +0 -20
  91. package/dist/util/diff.d.ts +0 -8
  92. package/dist/util/lint.d.ts +0 -28
  93. package/dist/util/string.d.ts +0 -55
  94. package/index.js +0 -333
  95. package/lib/element.js +0 -618
  96. package/lib/node.js +0 -730
  97. package/lib/ranges.js +0 -130
  98. package/lib/text.js +0 -265
  99. package/lib/title.js +0 -83
  100. package/mixin/attributeParent.js +0 -117
  101. package/mixin/fixedToken.js +0 -40
  102. package/mixin/hidden.js +0 -21
  103. package/mixin/singleLine.js +0 -31
  104. package/mixin/sol.js +0 -54
  105. package/parser/brackets.js +0 -128
  106. package/parser/commentAndExt.js +0 -62
  107. package/parser/converter.js +0 -46
  108. package/parser/externalLinks.js +0 -33
  109. package/parser/hrAndDoubleUnderscore.js +0 -49
  110. package/parser/html.js +0 -42
  111. package/parser/links.js +0 -94
  112. package/parser/list.js +0 -59
  113. package/parser/magicLinks.js +0 -41
  114. package/parser/quotes.js +0 -64
  115. package/parser/selector.js +0 -180
  116. package/parser/table.js +0 -114
  117. package/src/arg.js +0 -207
  118. package/src/atom/hidden.js +0 -13
  119. package/src/atom/index.js +0 -43
  120. package/src/attribute.js +0 -472
  121. package/src/attributes.js +0 -453
  122. package/src/charinsert.js +0 -97
  123. package/src/converter.js +0 -176
  124. package/src/converterFlags.js +0 -284
  125. package/src/converterRule.js +0 -256
  126. package/src/extLink.js +0 -180
  127. package/src/gallery.js +0 -149
  128. package/src/hasNowiki/index.js +0 -44
  129. package/src/hasNowiki/pre.js +0 -40
  130. package/src/heading.js +0 -134
  131. package/src/html.js +0 -254
  132. package/src/imageParameter.js +0 -303
  133. package/src/imagemap.js +0 -199
  134. package/src/imagemapLink.js +0 -41
  135. package/src/index.js +0 -938
  136. package/src/link/category.js +0 -44
  137. package/src/link/file.js +0 -287
  138. package/src/link/galleryImage.js +0 -120
  139. package/src/link/index.js +0 -388
  140. package/src/magicLink.js +0 -151
  141. package/src/nested/choose.js +0 -24
  142. package/src/nested/combobox.js +0 -23
  143. package/src/nested/index.js +0 -96
  144. package/src/nested/references.js +0 -23
  145. package/src/nowiki/comment.js +0 -71
  146. package/src/nowiki/dd.js +0 -59
  147. package/src/nowiki/doubleUnderscore.js +0 -56
  148. package/src/nowiki/hr.js +0 -41
  149. package/src/nowiki/index.js +0 -56
  150. package/src/nowiki/list.js +0 -16
  151. package/src/nowiki/noinclude.js +0 -28
  152. package/src/nowiki/quote.js +0 -69
  153. package/src/onlyinclude.js +0 -64
  154. package/src/paramTag/index.js +0 -89
  155. package/src/paramTag/inputbox.js +0 -35
  156. package/src/parameter.js +0 -239
  157. package/src/syntax.js +0 -91
  158. package/src/table/index.js +0 -985
  159. package/src/table/td.js +0 -343
  160. package/src/table/tr.js +0 -319
  161. package/src/tagPair/ext.js +0 -146
  162. package/src/tagPair/include.js +0 -50
  163. package/src/tagPair/index.js +0 -131
  164. package/src/transclude.js +0 -843
  165. package/tool/index.js +0 -1209
  166. package/typings/api.d.ts +0 -9
  167. package/typings/array.d.ts +0 -29
  168. package/typings/event.d.ts +0 -22
  169. package/typings/index.d.ts +0 -118
  170. package/typings/node.d.ts +0 -35
  171. package/typings/parser.d.ts +0 -12
  172. package/typings/table.d.ts +0 -10
  173. package/typings/token.d.ts +0 -31
  174. package/typings/tool.d.ts +0 -6
  175. package/util/base.js +0 -17
  176. package/util/debug.js +0 -73
  177. package/util/diff.js +0 -76
  178. package/util/lint.js +0 -57
  179. package/util/string.js +0 -126
package/README.md CHANGED
@@ -1,15 +1,16 @@
1
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/github-code-scanning/codeql/badge.svg)](https://github.com/bhsd-harry/wikiparser-node/actions/workflows/github-code-scanning/codeql)
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)
3
4
 
4
5
  # 简介
5
6
 
6
- wikiparser-node 是一款由 Bhsd 开发的基于 [Node.js](https://nodejs.org/en/) 环境的离线[维基文本](https://www.mediawiki.org/wiki/Wikitext)语法解析器,可以解析绝大部分的维基语法并生成[语法树](https://en.wikipedia.org/wiki/Abstract_syntax_tree),还可以很方便地对语法树进行查询和修改,最后返回修改后的维基文本。
7
+ wikiparser-node 是一款由 Bhsd 开发的基于 [Node.js](https://nodejs.org/) 环境的离线[维基文本](https://www.mediawiki.org/wiki/Wikitext)语法解析器,可以解析几乎全部的维基语法并生成[语法树](https://en.wikipedia.org/wiki/Abstract_syntax_tree),还可以很方便地对语法树进行查询和修改,最后返回修改后的维基文本。
7
8
 
8
9
  # 其他版本
9
10
 
10
- ## Mini
11
+ ## Mini (又名 [wikilint](https://www.npmjs.com/package/wikilint))
11
12
 
12
- 仅保留了解析功能和[语法错误分析](https://github.com/bhsd-harry/wikiparser-node/wiki/AstElement#lint)功能的轻量版本,解析生成的语法树不能修改。这个版本被应用于 [eslint-plugin-wikitext](/bhsd-harry/eslint-plugin-wikitext) 插件。
13
+ 提供了 [CLI](https://en.wikipedia.org/wiki/Command-line_interface),但仅保留了解析功能和语法错误分析功能,解析生成的语法树不能修改。这个版本被应用于 [eslint-plugin-wikitext](https://www.npmjs.com/package/eslint-plugin-wikitext) 插件。
13
14
 
14
15
  ## Browser
15
16
 
@@ -19,16 +20,16 @@ wikiparser-node 是一款由 Bhsd 开发的基于 [Node.js](https://nodejs.org/e
19
20
 
20
21
  ## Node.js
21
22
 
22
- 请根据需要需要安装对应的版本(`latest` 或 `mini`),如:
23
+ 请根据需要需要安装对应的版本(`wikiparser-node` 或 `wikilint`),如:
23
24
 
24
25
  ```sh
25
- npm i wikiparser-node # 默认为latest
26
+ npm i wikiparser-node
26
27
  ```
27
28
 
28
29
 
29
30
 
30
31
  ```sh
31
- npm i wikiparser-node@mini
32
+ npm i wikilint
32
33
  ```
33
34
 
34
35
  ## 浏览器
@@ -45,8 +46,8 @@ npm i wikiparser-node@mini
45
46
  <script src="//unpkg.com/wikiparser-node@browser/bundle/bundle.min.js"></script>
46
47
  ```
47
48
 
48
- 更多浏览器端可用的插件请查阅对应[文档](https://github.com/bhsd-harry/wikiparser-node/wiki/Browser)。
49
+ 更多浏览器端可用的插件请查阅对应文档。
49
50
 
50
51
  # 使用方法
51
52
 
52
- 请查阅 [Wiki](https://github.com/bhsd-harry/wikiparser-node/wiki/Parser)。
53
+ 请查阅 [Wiki](https://github.com/bhsd-harry/wikiparser-node/wiki)。
@@ -0,0 +1,37 @@
1
+ (()=>{(()=>{"use strict";var Vt={891:(Y,M,t)=>{t.d(M,{default:()=>I});const C={minConfig:t(166),MAX_STAGE:11,getConfig(){return{...this.minConfig,...this.config,excludes:[]}},msg(S,m=""){var f,l;return((l=(f=this.i18n)==null?void 0:f[S])!=null?l:S).replace("$1",m)},normalizeTitle(S,m=0,f=!1,l=C.getConfig(),n=!1,i=!1,d=!1){const{Title:r}=t(599);if(n)return new r(S,m,l,i,d);const{Token:o}=t(541),s=this.run(()=>new o(S,l).parseOnce(0,f).parseOnce());return new r(String(s),m,l,i,d)},parse(S,m,f=C.MAX_STAGE,l=C.getConfig()){const{Token:n}=t(541);let i;return this.run(()=>{i=new n(S.replace(/[\0\x7F]/gu,""),l);try{i.parse(f,m)}catch(d){}}),i},run(S){return S()}},b={},B=new Set(["MAX_STAGE","minConfig"]),L=new Set(["config","normalizeTitle","parse"]);for(const S in C)B.has(S)?b[S]={enumerable:!1,writable:!1}:L.has(S)||(b[S]={enumerable:!1});Object.defineProperties(C,b),typeof self=="object"?Object.assign(self,{Parser:C}):typeof globalThis=="object"&&Object.assign(globalThis,{Parser:C});const I=C},599:(Y,M,t)=>{t.r(M),t.d(M,{Title:()=>S});var C=t(467),b=t(891),B=Object.defineProperty,L=(m,f,l)=>f in m?B(m,f,{enumerable:!0,configurable:!0,writable:!0,value:l}):m[f]=l,I=(m,f,l)=>(L(m,typeof f!="symbol"?f+"":f,l),l);class S{constructor(f,l=0,n=b.default.getConfig(),i=!1,d=!1){I(this,"valid"),I(this,"ns"),I(this,"fragment"),I(this,"encoded",!1);var r;const{namespaces:o,nsid:s}=n;let h=(r=o[l])!=null?r:"";if(f=(0,C.m9)(f),i&&f.includes("%"))try{const E=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(f);f=decodeURIComponent(f),this.encoded=E}catch(E){}f=f.replace(/_/gu," ").trim(),f.startsWith(":")&&(h="",f=f.slice(1).trim());const p=f.split(":");if(p.length>1){const E=s[p[0].trim().toLowerCase()],w=E===void 0?void 0:o[E];w!==void 0&&(h=w,f=p.slice(1).join(":").trim())}this.ns=s[h.toLowerCase()];const P=f.indexOf("#");let y;P!==-1&&(y=f.slice(P+1).trim(),f=f.slice(0,P).trim()),this.valid=!!(f||d&&y!==void 0)&&!/\0\d+[eh!+-]\x7F|[<>[\]{}|]|%[\da-f]{2}/iu.test(f),this.fragment=y}}},959:(Y,M,t)=>{t.d(M,{a:()=>L});var C=Object.defineProperty,b=(I,S,m)=>S in I?C(I,S,{enumerable:!0,configurable:!0,writable:!0,value:m}):I[S]=m,B=(I,S,m)=>(b(I,typeof S!="symbol"?S+"":S,m),m);const L=I=>{class S extends I{text(){return""}}return B(S,"hidden",!0),S}},313:(Y,M,t)=>{t.r(M),t.d(M,{parseBraces:()=>$});var C=t(467),b=t(891),B=t(485),L=t(169),I=t(541),S=Object.defineProperty,m=(g,e,T)=>e in g?S(g,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):g[e]=T,f=(g,e,T)=>(m(g,typeof e!="symbol"?e+"":e,T),T);class l extends I.Token{constructor(e,T,c=b.default.getConfig(),D=[]){super(void 0,c,D),f(this,"type","parameter");const U=new I.Token(typeof e=="number"?void 0:e,c,D,{}),K=new I.Token(T,c,D);U.type="parameter-key",K.type="parameter-value",this.append(U,K.setAttribute("stage",2))}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:c}=this;this.setAttribute("name",T),c&&c.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 c=super.lint(e),{firstChild:D}=this,U=(T=new RegExp(`https?://${C._X}${C.Qk}$`,"iu").exec(D.toString(new Set(["comment","noinclude","include"]))))==null?void 0:T[0];if(U&&new URL(U).search){const K=(0,L.D)(D,{start:e},"unescaped query string in an anonymous parameter");c.push({...K,startIndex:K.endIndex,endIndex:K.endIndex+1,startLine:K.endLine,startCol:K.endCol,endCol:K.endCol+1})}return c}print(){return super.print({sep:this.anon?"":"="})}}var n=t(34),i=t(669),d=Object.defineProperty,r=(g,e,T)=>e in g?d(g,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):g[e]=T,o=(g,e,T)=>(r(g,typeof e!="symbol"?e+"":e,T),T),s=(g,e,T)=>{if(!e.has(g))throw TypeError("Cannot "+T)},h=(g,e,T)=>(s(g,e,"read from private field"),T?T.call(g):e.get(g)),p=(g,e,T)=>{if(e.has(g))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(g):e.set(g,T)},P=(g,e,T,c)=>(s(g,e,"write to private field"),c?c.call(g,T):e.set(g,T),T),y=(g,e,T)=>(s(g,e,"access private method"),T),E,w,R,z,Q,W;class _ extends I.Token{constructor(e,T,c=b.default.getConfig(),D=[]){var U,K;super(void 0,c,D,{}),p(this,Q),o(this,"type","template"),o(this,"modifier",""),p(this,E,void 0),p(this,w,!0),p(this,R,!1),p(this,z,new Map);const{parserFunction:[G,V]}=c,X=(U=/^(?:\s|\0\d+c\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:U[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((K=tt[0])!=null?K:"");this.setModifier(`${et}:${nt}`)&&(e=tt.join(":").slice(nt.length))}if(e.includes(":")||T.length===0&&!h(this,R)){const[et,...tt]=e.split(":"),nt=(0,C.PN)(et),k=nt.trim(),it=V.includes(k),q=G[k.toLowerCase()];if(!(tt.length>0&&/\s$/u.test(nt))&&(it||q)){this.setAttribute("name",q!=null?q:k.toLowerCase()).type="magic-word";const st=new RegExp(`^\\s*${k}\\s*$`,it?"u":"iu"),lt=new i.SyntaxToken(et,st,"magic-word-name",c,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"}`,c,D);super.insertAt(rt)}}}if(this.type==="template"){const et=(0,C.PN)((0,C.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,C.jq)(et)}`);const tt=new n.D(e,"template-name",c,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 l(...tt,c,D))}}setModifier(e){const{parserFunction:[,,T,c]}=this.getAttribute("config"),D=(0,C.PN)(e).trim();if(e&&!D.endsWith(":"))return!1;const U=D.slice(0,-1).toLowerCase(),K=T.includes(U),G=c.includes(U);return h(this,R)&&K||!h(this,R)&&(G||e==="")||this.length>1&&(K||G||e==="")?(this.setAttribute("modifier",e),P(this,R,K),!!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);P(this,E,T.fragment),P(this,w,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:c,modifier:D,type:U,name:K}=this;return U==="magic-word"&&K==="vardefine"?"":`{{${D}${U==="magic-word"?`${c.text()}${T===1?"":":"}${(0,C.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:c,childNodes:D}=this;let U;if(this.isTemplate())h(this,E)!==void 0&&(U={start:e,...this.getRootNode().posFromIndex(e)},T.push((0,L.D)(D[c==="template"?0:1],U,"useless fragment")));else return T;h(this,w)||(U={start:e,...this.getRootNode().posFromIndex(e)},T.push((0,L.D)(D[1],U,"illegal module name")));const K=this.getDuplicatedArgs();return K.length>0&&(U!=null||(U={start:e,...this.getRootNode().posFromIndex(e)}),T.push(...K.flatMap(([,G])=>G).map(G=>(0,L.D)(G,U,"duplicated parameter")))),T}insertAt(e,T=this.length){return super.insertAt(e,T),e.anon?y(this,Q,W).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,c=!0){const D=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");let U;return h(this,z).has(D)?U=h(this,z).get(D):(U=new Set(this.getAllArgs().filter(({name:K})=>D===K)),h(this,z).set(D,U)),U}getDuplicatedArgs(){return this.isTemplate()?[...h(this,z)].filter(([,{size:e}])=>e>1).map(([e,T])=>[e,[...T]]):[]}getPossibleValues(){const{type:e,name:T,childNodes:c,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 U;switch(T){case"if":case"ifexist":case"ifexpr":case"iferror":U=2;break;case"ifeq":U=3;break;default:throw new Error(`${D}.getPossibleValues \u65B9\u6CD5\u4EC5\u4F9B\u7279\u5B9A\u9B54\u672F\u5B57\u4F7F\u7528\uFF01`)}const K=c.slice(U,U+2).map(({childNodes:[,G]})=>G);for(let G=0;G<K.length;){const{length:V,0:X}=K[G].childNodes.filter(J=>J.text().trim());if(V===0)K.splice(G,1);else if(V>1||X.type!=="magic-word")G++;else try{const J=X.getPossibleValues();K.splice(G,1,...J),G+=J.length}catch(J){G++}}return K}print(){const{childNodes:e,length:T,firstChild:c,modifier:D,type:U}=this;return`<span class="wpb-${U}">{{${D}${U==="magic-word"?`${c.print()}${T===1?"":":"}${(0,C.S0)(e.slice(1),{sep:"|"})}`:(0,C.S0)(e,{sep:"|"})}}}</span>`}}E=new WeakMap,w=new WeakMap,R=new WeakMap,z=new WeakMap,Q=new WeakSet,W=function(g){const e=this.getAnonArgs(),T=typeof g!="number";for(let c=T?e.indexOf(g):g-1;c<e.length;c++){const D=e[c],{name:U}=D,K=String(c+1);U!==K&&this.getArgs(K,!1,!1).add(D.setAttribute("name",K))}};var v=t(465),F=Object.defineProperty,O=(g,e,T)=>e in g?F(g,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):g[e]=T,x=(g,e,T)=>(O(g,typeof e!="symbol"?e+"":e,T),T);class u extends I.Token{constructor(e,T=b.default.getConfig(),c=[]){super(void 0,T,c,{}),x(this,"type","arg");for(let D=0;D<e.length;D++)if(D===0){const U=new n.D(e[D],"arg-name",T,c,{});super.insertAt(U)}else if(D>1){const U=new v.R(e[D],T,c,{});super.insertAt(U)}else{const U=new I.Token(e[D],T,c);U.type="arg-default",super.insertAt(U.setAttribute("stage",2))}}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,C.fL)(this.childNodes.slice(0,2),"|")}}}}`}getPadding(){return 3}getGaps(e){return e<this.length-1?1:0}lint(e=this.getAbsoluteIndex()){const{childNodes:[T,c,...D]}=this,U=T.lint(e+3);if(c&&U.push(...c.lint(e+4+String(T).length)),D.length>0){const K={start:e,...this.getRootNode().posFromIndex(e)};U.push(...D.map(G=>{const V=(0,L.D)(G,K,"invisible content inside triple braces"),{startIndex:X,startCol:J}=V;return{...V,startIndex:X-1,startCol:J-1}}))}return U}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}}const $=(g,e=b.default.getConfig(),T=[])=>{var c,D,U,K,G,V;const X=`${(c=e.excludes)!=null&&c.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(g),it=g.includes("}}"),q;for(;k||q!==void 0&&q<=g.length&&((U=(D=j[j.length-1])==null?void 0:D[0])!=null&&U.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:g.length},dt=(K=j.pop())!=null?K:{},{0:ft,index:rt,parts:pt,findEqual:At,pos:$t}=dt,Ct=st==="="&&At;if(st==="]]"||st==="}-")q=lt+2;else if(st===`
4
+ `){q=lt+1;const{pos:ht,findEqual:ct}=(G=j[j.length-1])!=null?G:{};if(ht===void 0||ct||(0,C.PN)(g.slice(ht,rt))!==""){const gt=/^(={1,6})(.+)\1((?:\s|\0\d+c\x7F)*)$/u.exec(g.slice(rt,lt));gt&&(g=`${g.slice(0,rt)}\0${T.length}h\x7F${g.slice(lt)}`,q=rt+4+String(T.length).length,new B.D(gt[1].length,gt.slice(2),e,T))}}else if(st==="|"||Ct)q=lt+1,pt[pt.length-1].push(g.slice($t,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(g.slice($t,lt));let St=!1,vt="t";if(ht.length===3){const at=pt.map(_t=>_t.join("=")),Et=at.length>1&&(0,C.PN)(at[1]).trim();new u(at,e,T),Et&&Et.endsWith(":")&&J.includes(Et.slice(0,-1).toLowerCase())&&(vt="s")}else try{new _(pt[0][0],pt.slice(1),e,T);const at=(0,C.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||(g=`${g.slice(0,rt+ct)}\0${gt}${vt}\x7F${g.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&&g[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=g.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(g)}return g}},551:(Y,M,t)=>{t.r(M),t.d(M,{parseCommentAndExt:()=>h});var C=t(891),b=t(541),B=Object.defineProperty,L=(p,P,y)=>P in p?B(p,P,{enumerable:!0,configurable:!0,writable:!0,value:y}):p[P]=y,I=(p,P,y)=>(L(p,typeof P!="symbol"?P+"":P,y),y);class S extends b.Token{constructor(){super(...arguments),I(this,"type","onlyinclude")}toString(P){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 m=t(826),f=t(959),l=t(415),n=Object.defineProperty,i=(p,P,y)=>P in p?n(p,P,{enumerable:!0,configurable:!0,writable:!0,value:y}):p[P]=y,d=(p,P,y)=>(i(p,typeof P!="symbol"?P+"":P,y),y);class r extends(0,f.a)(l.m){constructor(P,y="",E,w,R=C.default.getConfig(),z=[]){super(P,y,E!=null?E:"",E===void 0||w!=null?w:"",R,z),d(this,"type","include")}}var o=t(895),s=t(976);const h=(p,P=C.default.getConfig(),y=[],E=!1)=>{const w="<onlyinclude>",R="</onlyinclude>",{length:z}=w;if(E){let F=p.indexOf(w),O=p.indexOf(R,F+z);if(F!==-1&&O!==-1){let x="";for(;F!==-1&&O!==-1;){const u=`\0${y.length}e\x7F`;new S(p.slice(F+z,O),P,y),F>0?(new m.O(p.slice(0,F),P,y),x+=`\0${y.length-1}c\x7F${u}`):x+=u,p=p.slice(O+z+1),F=p.indexOf(w),O=p.indexOf(R,F+z)}return`${x}${p}`}}const Q=P.ext.join("|"),W=E?"includeonly":"(?:no|only)include",_=E?"noinclude":"includeonly",v=new RegExp(`<!--.*?(?:-->|$)|<${W}(?:\\s[^>]*?)?>|</${W}\\s*>|<(${Q})(\\s[^>]*?)?(?:/>|>(.*?)</(\\1\\s*)>)|<(${_})(\\s[^>]*?)?(?:/>|>(.*?)(?:</(\\5\\s*)>|$))`,"gisu");return p.replace(v,(F,O,x,u,$,g,e,T,c)=>{const D=`\0${y.length}${O?"e":"c"}\x7F`;if(O)new o.$(O,x,u,$,P,y);else if(F.startsWith("<!--")){const U=F.endsWith("-->");new s.T(F.slice(4,U?-3:void 0),U,P,y)}else g?new r(g,e,T,c,P,y):new m.O(F,P,y);return D})}},295:(Y,M,t)=>{t.r(M),t.d(M,{parseConverter:()=>Q});var C=t(891),b=t(467),B=t(541),L=t(169),I=t(34),S=Object.defineProperty,m=(W,_,v)=>_ in W?S(W,_,{enumerable:!0,configurable:!0,writable:!0,value:v}):W[_]=v,f=(W,_,v)=>(m(W,typeof _!="symbol"?_+"":_,v),v),l=(W,_,v)=>{if(!_.has(W))throw TypeError("Cannot "+v)},n=(W,_,v)=>(l(W,_,"read from private field"),v?v.call(W):_.get(W)),i=(W,_,v)=>{if(_.has(W))throw TypeError("Cannot add the same private member more than once");_ instanceof WeakSet?_.add(W):_.set(W,v)},d=(W,_,v,F)=>(l(W,_,"write to private field"),F?F.call(W,v):_.set(W,v),v),r;const o=new Set(["A","T","R","D","-","H","N"]);class s extends B.Token{constructor(_,v=C.default.getConfig(),F=[]){super(void 0,v,F,{}),f(this,"type","converter-flags"),i(this,r,void 0),this.append(..._.map(O=>new I.D(O,"converter-flag",v,F)))}afterBuild(){d(this,r,this.childNodes.map(_=>_.text().trim()))}toString(_){return super.toString(_,";")}text(){return super.text(";")}getGaps(_){return _<this.length-1?1:0}getUnknownFlags(){return new Set(n(this,r).filter(_=>/\{{3}[^{}]+\}{3}/u.test(_)))}getVariantFlags(){const _=new Set(this.getAttribute("config").variants);return new Set(n(this,r).filter(v=>_.has(v)))}lint(_=this.getAbsoluteIndex()){const v=this.getVariantFlags(),F=this.getUnknownFlags(),O=new Set(n(this,r).filter(c=>o.has(c))),{length:x}=n(this,r).filter(c=>!c),u=n(this,r).length-F.size-x,$=super.lint(_);if(v.size===u||O.size===u)return $;const g={start:_,...this.getRootNode().posFromIndex(_)},{childNodes:e,length:T}=this;for(let c=0;c<T;c++){const D=e[c],U=D.text().trim();if(U&&!v.has(U)&&!F.has(U)&&(v.size>0||!O.has(U))){const K=(0,L.D)(D,g,"invalid conversion flag");$.push(K)}}return $}print(){return super.print({sep:";"})}}r=new WeakMap;var h=Object.defineProperty,p=(W,_,v)=>_ in W?h(W,_,{enumerable:!0,configurable:!0,writable:!0,value:v}):W[_]=v,P=(W,_,v)=>(p(W,typeof _!="symbol"?_+"":_,v),v);class y extends B.Token{constructor(_,v=!0,F=C.default.getConfig(),O=[]){if(super(void 0,F,O),P(this,"type","converter-rule"),v){const x=_.indexOf(":"),u=_.slice(0,x).indexOf("=>"),$=u===-1?_.slice(0,x):_.slice(u+2,x);F.variants.includes($.trim())?(super.insertAt(new I.D($,"converter-rule-variant",F,O)),super.insertAt(new I.D(_.slice(x+1),"converter-rule-to",F,O)),u!==-1&&super.insertAt(new I.D(_.slice(0,u),"converter-rule-from",F,O),0)):super.insertAt(new I.D(_,"converter-rule-noconvert",F,O))}else super.insertAt(new I.D(_,"converter-rule-noconvert",F,O))}toString(_){const{childNodes:v}=this;if(v.length===3){const[F,O,x]=v;return`${F.toString(_)}=>${O.toString(_)}:${x.toString(_)}`}return super.toString(_,":")}text(){const{childNodes:_}=this;if(_.length===3){const[v,F,O]=_;return`${v.text()}=>${F.text()}:${O.text()}`}return super.text(":")}getGaps(_){return _===0&&this.length===3?2:1}print(){const{childNodes:_}=this;if(_.length===3){const[v,F,O]=_;return`<span class="wpb-converter-rule">${v.print()}=>${F.print()}:${O.print()}</span>`}return super.print({sep:":"})}}var E=Object.defineProperty,w=(W,_,v)=>_ in W?E(W,_,{enumerable:!0,configurable:!0,writable:!0,value:v}):W[_]=v,R=(W,_,v)=>(w(W,typeof _!="symbol"?_+"":_,v),v);class z extends B.Token{constructor(_,v,F=C.default.getConfig(),O=[]){super(void 0,F,O),R(this,"type","converter"),this.append(new s(_,F,O));const[x]=v,u=x.includes(":"),$=new y(x,u,F,O);u&&$.length===1?this.insertAt(new y(v.join(";"),!1,F,O)):this.append($,...v.slice(1).map(g=>new y(g,!0,F,O)))}toString(_){const{childNodes:[v,...F]}=this;return`-{${v.toString()}${v.length>0?"|":""}${F.map(O=>O.toString()).join(";")}}-`}text(){const{childNodes:[_,...v]}=this;return`-{${_.text()}|${(0,b.fL)(v,";")}}-`}getPadding(){return 2}getGaps(_){return _||this.firstChild.length>0?1:0}print(){const{childNodes:[_,...v]}=this;return`<span class="wpb-converter">-{${_.print()}${_.length>0?"|":""}${(0,b.S0)(v,{sep:";"})}}-</span>`}}const Q=(W,_=C.default.getConfig(),v=[])=>{const F=/-\{/gu,O=/-\{|\}-/gu,x=[];let u=F,$=u.exec(W);for(;$;){const{0:g,index:e}=$;if(g==="}-"){const T=x.pop(),{length:c}=v,D=W.slice(T.index+2,e),U=D.indexOf("|"),[K,G]=U===-1?[[],D]:[D.slice(0,U).split(";"),D.slice(U+1)],V=G.replace(/(&[#a-z\d]+);/giu,"$1"),X=`(?:${_.variants.join("|")})`,J=V.split(new RegExp(`;(?=\\s*(?:${X}|[^;]*?=>\\s*${X})\\s*:)`,"u")).map(j=>j.replace(/\x01/gu,";"));new z(K,J,_,v),W=`${W.slice(0,T.index)}\0${c}v\x7F${W.slice(e+2)}`,x.length===0&&(u=F),u.lastIndex=T.index+3+String(c).length}else x.push($),u=O,u.lastIndex=e+2;$=u.exec(W)}return W}},418:(Y,M,t)=>{t.r(M),t.d(M,{parseExternalLinks:()=>L});var C=t(467),b=t(891),B=t(944);const L=(I,S=b.default.getConfig(),m=[])=>{const f=new RegExp(`\\[((?:(?:${S.protocol}|//)${C._X}|\0\\d+m\x7F)${C.Qk})(\\p{Zs}*)([^\\]-\b
5
+ -\uFFFD]*)\\]`,"giu");return I.replace(f,(l,n,i,d)=>{const{length:r}=m,o=/&[lg]t;/u.exec(n);return o&&(n=n.slice(0,o.index),i="",d=`${n.slice(o.index)}${i}${d}`),new B.a(n,i,d,S,m),`\0${r}w\x7F`})}},362:(Y,M,t)=>{t.r(M),t.d(M,{parseHrAndDoubleUnderscore:()=>r});var C=t(891),b=t(439),B=Object.defineProperty,L=(o,s,h)=>s in o?B(o,s,{enumerable:!0,configurable:!0,writable:!0,value:h}):o[s]=h,I=(o,s,h)=>(L(o,typeof s!="symbol"?s+"":s,h),h);class S extends b.h{constructor(){super(...arguments),I(this,"type","hr")}}var m=t(959),f=Object.defineProperty,l=(o,s,h)=>s in o?f(o,s,{enumerable:!0,configurable:!0,writable:!0,value:h}):o[s]=h,n=(o,s,h)=>(l(o,typeof s!="symbol"?s+"":s,h),h);class i extends(0,m.a)(b.h){constructor(){super(...arguments),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 r=({firstChild:o,type:s,name:h},p=C.default.getConfig(),P=[])=>{const{doubleUnderscore:y}=p,E=new Set(y[0]),w=new Set(y[1]);let{data:R}=o;return s!=="root"&&(s!=="ext-inner"||h!=="poem")&&(R=`\0${R}`),R=R.replace(/^((?:\0\d+c\x7F)*)(-{4,})/gmu,(z,Q,W)=>(new S(W,p,P),`${Q}\0${P.length-1}r\x7F`)).replace(new RegExp(`__(${y.flat().join("|")})__`,"giu"),(z,Q)=>E.has(Q.toLowerCase())||w.has(Q)?(new i(Q,p,P),`\0${P.length-1}u\x7F`):z).replace(/^((?:\0\d+c\x7F)*)(={1,6})(.+)\2((?:[^\S\n]|\0\d+c\x7F)*)$/gmu,(z,Q,W,_,v)=>{const F=`${Q}\0${P.length}h\x7F`;return new d.D(W.length,[_,v],p,P),F}),s==="root"||s==="ext-inner"&&h==="poem"?R:R.slice(1)}},980:(Y,M,t)=>{t.r(M),t.d(M,{parseHtml:()=>P});var C=t(891),b=t(83),B=t(169),L=t(467),I=t(541),S=Object.defineProperty,m=(y,E,w)=>E in y?S(y,E,{enumerable:!0,configurable:!0,writable:!0,value:w}):y[E]=w,f=(y,E,w)=>(m(y,typeof E!="symbol"?E+"":E,w),w),l=(y,E,w)=>{if(!E.has(y))throw TypeError("Cannot "+w)},n=(y,E,w)=>(l(y,E,"read from private field"),w?w.call(y):E.get(y)),i=(y,E,w)=>{if(E.has(y))throw TypeError("Cannot add the same private member more than once");E instanceof WeakSet?E.add(y):E.set(y,w)},d=(y,E,w,R)=>(l(y,E,"write to private field"),R?R.call(y,w):E.set(y,w),w),r,o,s;const h=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]);class p extends I.Token{constructor(E,w,R,z,Q=C.default.getConfig(),W=[]){super(void 0,Q,W),f(this,"type","html"),i(this,r,void 0),i(this,o,void 0),i(this,s,void 0),this.insertAt(w),this.setAttribute("name",E.toLowerCase()),d(this,r,R),d(this,o,z),d(this,s,E)}get closing(){return n(this,r)}toString(E){return`<${n(this,r)?"/":""}${n(this,s)}${super.toString()}${n(this,o)?"/":""}>`}text(){return`<${n(this,r)?"/":""}${n(this,s)}${n(this,r)?"":super.text()}${n(this,o)?"/":""}>`}getPadding(){return n(this,s).length+(n(this,r)?2:1)}lint(E=this.getAbsoluteIndex()){const w=super.lint(E);let R;this.name==="h1"&&!n(this,r)&&(R=(0,B.Y)(this,{start:E},"<h1>"),w.push(R)),this.closest("table-attrs")&&(R!=null||(R=(0,B.Y)(this,{start:E},"")),w.push({...R,message:C.default.msg("HTML tag in table attributes")}));try{this.findMatchingTag()}catch(z){if(z instanceof SyntaxError){const{message:Q}=z;R!=null||(R=(0,B.Y)(this,{start:E},""));const[W]=Q.split(":"),_={...R,message:C.default.msg(W)};if(W==="unclosed tag")_.severity="warning";else if(W==="unmatched closing tag"){const v=this.closest("magic-word");v&&h.has(v.name)&&(_.severity="warning")}w.push(_)}}return w}findMatchingTag(){const{html:E}=this.getAttribute("config"),{name:w,parentNode:R}=this,z=(0,L.jq)(String(this));if(n(this,r)&&(n(this,o)||E[2].includes(w)))throw new SyntaxError(`tag that is both closing and self-closing: ${z}`);if(E[2].includes(w)||n(this,o)&&E[1].includes(w))return this;if(n(this,o)&&E[0].includes(w))throw new SyntaxError(`invalid self-closing tag: ${z}`);if(!R)return;const{childNodes:Q}=R,W=Q.indexOf(this),_=n(this,r)?Q.slice(0,W).reverse().filter(({type:F,name:O})=>F==="html"&&O===w):Q.slice(W+1).filter(({type:F,name:O})=>F==="html"&&O===w);let v=n(this,r)?-1:1;for(const F of _)if(F.closing?v--:v++,v===0)return F;throw new SyntaxError(`${n(this,r)?"unmatched closing":"unclosed"} tag: ${z}`)}print(){return super.print({pre:`&lt;${n(this,r)?"/":""}${n(this,s)}`,post:`${n(this,o)?"/":""}&gt;`})}}r=new WeakMap,o=new WeakMap,s=new WeakMap;const P=(y,E=C.default.getConfig(),w=[])=>{const R=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,z=new Set(E.html.flat()),Q=y.split("<");let W=Q.shift();for(const _ of Q){const v=R.exec(_),F=v==null?void 0:v[2],O=F==null?void 0:F.toLowerCase();if(!v||!z.has(O)){W+=`<${_}`;continue}const[,x,,u="",$,g]=v,e=new b.x(u,"html-attrs",O,E,w),T=e.getAttr("itemprop");if(O==="meta"&&(T===void 0||e.getAttr("content")===void 0)||O==="link"&&(T===void 0||e.getAttr("href")===void 0)){W+=`<${_}`,w.pop();continue}W+=`\0${w.length}x\x7F${g}`,new p(F,e,x==="/",$==="/>",E,w)}return W}},106:(Y,M,t)=>{t.r(M),t.d(M,{parseLinks:()=>f});var C=t(891),b=t(524),B=t(533),L=Object.defineProperty,I=(l,n,i)=>n in l?L(l,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[n]=i,S=(l,n,i)=>(I(l,typeof n!="symbol"?n+"":n,i),i);class m extends b.h{constructor(){super(...arguments),S(this,"type","category")}}const f=(l,n=C.default.getConfig(),i=[])=>{const{parseQuotes:d}=t(704),r=n.inExt?/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]]))?\]\](.*)$/su:/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]])?)?\]\](.*)$/su,o=/^((?:(?!\0\d+!\x7F)[^\n<>[\]{}|])+)(\||\0\d+!\x7F)(.*)$/su,s=new RegExp(`^\\s*(?:${n.protocol})`,"iu"),h=l.split("[[");let p=h.shift();for(let P=0;P<h.length;P++){let y=!1,E,w,R,z;const Q=h[P],W=r.exec(Q);if(W)[,E,w,R,z]=W,z.startsWith("]")&&(R!=null&&R.includes("["))&&(R+="]",z=z.slice(1));else{const u=o.exec(Q);u&&(y=!0,[,E,w,R]=u)}if(E===void 0||s.test(E)||/\0\d+[exhbru]\x7F/u.test(E)){p+=`[[${Q}`;continue}const _=E.trim().startsWith(":");if(_&&y){p+=`[[${Q}`;continue}const v=C.default.normalizeTitle(E,0,!1,n,!0,!0,!0),{ns:F,valid:O}=v;if(O){if(y){if(F!==6){p+=`[[${Q}`;continue}let u=!1;for(P++;P<h.length;P++){const $=h[P],g=$.split("]]");if(g.length>2){u=!0,R+=`[[${g[0]}]]${g[1]}`,z=g.slice(2).join("]]");break}else if(g.length===2)R+=`[[${g[0]}]]${g[1]}`;else{R+=`[[${$}`;break}}if(R=f(R,n,i),!u){p+=`[[${E}${w}${R}`;continue}}}else{p+=`[[${Q}`;continue}R&&(R=d(R,n,i)),p+=`\0${i.length}l\x7F${z}`;let x=b.h;_||(F===6?x=B.q:F===14&&(x=m)),R===void 0&&w&&(R=""),new x(E,R,n,i,w)}return p}},904:(Y,M,t)=>{t.r(M),t.d(M,{parseList:()=>m});var C=t(891),b=t(461),B=Object.defineProperty,L=(f,l,n)=>l in f?B(f,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):f[l]=n,I=(f,l,n)=>(L(f,typeof l!="symbol"?l+"":l,n),n);class S extends b.k{constructor(){super(...arguments),I(this,"type","list")}}const m=(f,l=C.default.getConfig(),n=[])=>{const i=/^((?:\0\d+c\x7F)*)([;:*#]+)/u.exec(f);if(!i)return f;const[d,r,o]=i;let s=`${r}\0${n.length}d\x7F${f.slice(d.length)}`,h=o.split(";").length-1;if(new S(o,l,n),!h)return s;let p=/:+|-\{/gu,P=p.exec(s),y=0;for(;P&&h;){const{0:E,index:w}=P;if(E.startsWith(":")){if(E.length>=h)return new b.k(":".repeat(h),l,n),`${s.slice(0,w)}\0${n.length-1}d\x7F${s.slice(w+h)}`;s=`${s.slice(0,w)}\0${n.length}d\x7F${s.slice(p.lastIndex)}`,h-=E.length,p.lastIndex=w+4+String(n.length).length,new b.k(E,l,n)}else if(E==="-{"){if(!y){const{lastIndex:R}=p;p=/-\{|\}-/gu,p.lastIndex=R}y++}else if(y--,!y){const{lastIndex:R}=p;p=/:+|-\{/gu,p.lastIndex=R}P=p.exec(s)}return s}},311:(Y,M,t)=>{t.r(M),t.d(M,{parseMagicLinks:()=>L});var C=t(467),b=t(891),B=t(686);const L=(I,S=b.default.getConfig(),m=[])=>{const f=new RegExp(`(^|[^\\p{L}\\d_])(?:${S.protocol})(${C._X}${C.Qk})`,"giu");return I.replace(f,(l,n,i)=>{let d="",r=n?l.slice(1):l;const o=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(r);o&&(d=r.slice(o.index),r=r.slice(0,o.index));const s=new RegExp(`[,;.:!?${r.includes("(")?"":")"}]+$`,"u"),h=s.exec(r);if(h){let p=0;h[0].startsWith(";")&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(r.slice(0,h.index))&&(p=1),d=`${r.slice(h.index+p)}${d}`,r=r.slice(0,h.index+p)}return d.length>=i.length?l:(new B.k(r,!1,S,m),`${n}\0${m.length-1}w\x7F${d}`)})}},704:(Y,M,t)=>{t.r(M),t.d(M,{parseQuotes:()=>f});var C=t(891),b=t(169),B=t(439),L=Object.defineProperty,I=(l,n,i)=>n in l?L(l,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[n]=i,S=(l,n,i)=>(I(l,typeof n!="symbol"?n+"":n,i),i);class m extends B.h{constructor(){super(...arguments),S(this,"type","quote")}lint(n=this.getAbsoluteIndex()){const{previousSibling:i,nextSibling:d}=this,r=C.default.msg('lonely "$1"',"'"),o=[];let s;if((i==null?void 0:i.type)==="text"&&i.data.endsWith("'")){s=(0,b.Y)(this,{start:n},r);const{startIndex:h,startLine:p,startCol:P}=s,[,{length:y}]=i.data.match(/(?:^|[^'])('+)$/u),E=n-y;o.push({...s,startIndex:E,endIndex:h,startCol:P-y,endLine:p,endCol:P})}if((d==null?void 0:d.type)==="text"&&d.data.startsWith("'")){s!=null||(s=(0,b.Y)(this,{start:n},r));const{endIndex:h,endLine:p,endCol:P}=s,[{length:y}]=d.data.match(/^'+/u),E=h+y;o.push({...s,startIndex:h,endIndex:E,startLine:p,startCol:P,endCol:P+y})}return o}}const f=(l,n=C.default.getConfig(),i=[])=>{var d;const r=l.split(/('{2,})/u),{length:o}=r;if(o===1)return l;let s=0,h=0,p,P,y;for(let E=1;E<o;E+=2){const{length:w}=r[E];switch(w){case 2:h++;break;case 4:r[E-1]+="'",r[E]="'''";case 3:if(s++,p!==void 0)break;r[E-1].endsWith(" ")?P===void 0&&y===void 0&&(y=E):r[E-1].slice(-2,-1)===" "?p=E:P!=null||(P=E);break;default:r[E-1]+="'".repeat(w-5),r[E]="'''''",h++,s++}}if(h%2===1&&s%2===1){const E=(d=p!=null?p:P)!=null?d:y;E!==void 0&&(r[E]="''",r[E-1]+="'")}for(let E=1;E<o;E+=2)new m(r[E],n,i),r[E]=`\0${i.length-1}q\x7F`;return r.join("")}},508:(Y,M,t)=>{t.r(M),t.d(M,{parseTable:()=>F});var C=t(891),b=t(541),B=t(169),L=t(669),I=t(83);class S extends b.Token{constructor(x,u,$,g=C.default.getConfig(),e=[],T={}){super(void 0,g,e,T),this.append(new L.SyntaxToken(u,x,"table-syntax",g,e,{}),new I.x($,"table-attrs",this.type,g,e))}}class m extends S{lint(x=this.getAbsoluteIndex()){const u=super.lint(x),$=this.childNodes.find(({type:c})=>c==="table-inter");if(!$)return u;const g=$.childNodes.find(c=>c.text().trim()),e=/^\s*(?:!|\{\{\s*![!-]?\s*\}\})/u;if(!g||e.test(String(g))||g.type==="arg"&&e.test(g.default||""))return u;if(g.type==="magic-word")try{if(g.getPossibleValues().every(c=>e.test(c.text())))return u}catch(c){}const T=(0,B.D)($,{start:x},"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 x=super.text();return this.type==="tr"&&!x.trim().includes(`
6
+ `)?"":x}}var f=Object.defineProperty,l=(O,x,u)=>x in O?f(O,x,{enumerable:!0,configurable:!0,writable:!0,value:u}):O[x]=u,n=(O,x,u)=>(l(O,typeof x!="symbol"?x+"":x,u),u);const i=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u;class d extends m{constructor(x,u,$=C.default.getConfig(),g=[]){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,x,u,$,g,{}),n(this,"type","table")}get closed(){return this.lastChild.type==="table-syntax"}lint(x=this.getAbsoluteIndex()){const u=super.lint(x);if(!this.closed){const{firstChild:$}=this,g=(0,B.D)($,{start:x},"unclosed table");u.push(g)}return u}close(x=`
7
+ |}`,u=!1){const $=this.getAttribute("config"),g=this.getAttribute("accum");super.insertAt(C.default.run(()=>new L.SyntaxToken(x,i,"table-syntax",$,g,{})))}}var r=Object.defineProperty,o=(O,x,u)=>x in O?r(O,x,{enumerable:!0,configurable:!0,writable:!0,value:u}):O[x]=u,s=(O,x,u)=>(o(O,typeof x!="symbol"?x+"":x,u),u);class h extends m{constructor(x,u,$=C.default.getConfig(),g=[]){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,x,u,$,g,{}),s(this,"type","tr")}}var p=Object.defineProperty,P=(O,x,u)=>x in O?p(O,x,{enumerable:!0,configurable:!0,writable:!0,value:u}):O[x]=u,y=(O,x,u)=>(P(O,typeof x!="symbol"?x+"":x,u),u),E=(O,x,u)=>{if(!x.has(O))throw TypeError("Cannot "+u)},w=(O,x,u)=>(E(O,x,"read from private field"),u?u.call(O):x.get(O)),R=(O,x,u)=>{if(x.has(O))throw TypeError("Cannot add the same private member more than once");x instanceof WeakSet?x.add(O):x.set(O,u)},z=(O,x,u,$)=>(E(O,x,"write to private field"),$?$.call(O,u):x.set(O,u),u),Q=(O,x,u,$)=>({set _(g){z(O,x,g,u)},get _(){return w(O,x,$)}}),W;class _ extends S{constructor(x,u,$=C.default.getConfig(),g=[]){var e;let T=u==null?void 0:u.match(/\||\0\d+!\x7F/u),c=T?u.slice(0,T.index):"";/\[\[|-\{/u.test(c)&&(T=void 0,c=""),super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,x,c,$,g),y(this,"type","td"),R(this,W,""),T&&([Q(this,W)._]=T);const D=new b.Token(u==null?void 0:u.slice(((e=T==null?void 0:T.index)!=null?e:NaN)+w(this,W).length),$,g);D.type="td-inner",this.insertAt(D.setAttribute("stage",4))}get subtype(){return this.getSyntax().subtype}getSyntax(){const x=this.firstChild.text(),u=x[x.length-1];let $="td";return u==="!"?$="th":u==="+"&&($="caption"),{subtype:$}}afterBuild(){w(this,W).includes("\0")&&z(this,W,this.buildFromStr(w(this,W),"string"))}toString(x){const{childNodes:[u,$,g]}=this;return`${u.toString()}${$.toString()}${w(this,W)}${g.toString()}`}text(){const{childNodes:[x,u,$]}=this;return`${x.text()}${u.text()}${w(this,W)}${$.text()}`}getGaps(x){return x===1?w(this,W).length:0}lint(x=this.getAbsoluteIndex()){const u=super.lint(x);x+=this.getRelativeIndex(this.length-1);for(const $ of this.lastChild.childNodes)$.type==="text"&&$.data.includes("|")&&u.push((0,B.D)($,{start:x},'additional "|" in a table cell',"warning"));return u}print(){const{childNodes:[x,u,$]}=this;return`<span class="wpb-td">${x.print()}${u.print()}${w(this,W)}${$.print()}</span>`}}W=new WeakMap;var v=t(461);const F=({firstChild:{data:O},type:x,name:u},$=C.default.getConfig(),g=[])=>{const e=[],T=O.split(`
8
+ `);let c=x==="root"||x==="parameter-value"||x==="ext-inner"&&u==="poem"?"":`
9
+ ${T.shift()}`;const D=(U,K)=>{if(!K){c+=U;return}const{lastChild:G}=K;if(G.constructor===b.Token)G.setText(String(G)+U);else{const V=new b.Token(U,$,g);V.type="table-inter",K.insertAt(V.setAttribute("stage",3))}};for(const U of T){let K=e.pop();const[G]=/^(?:\s|\0\d+c\x7F)*/u.exec(U),V=U.slice(G.length),X=/^(:*)((?:\s|\0\d+c\x7F)*)(\{\||\{(?:\0\d+c\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(V);if(X){for(;K&&K.type!=="td";)K=e.pop();const[,k,it,q,st]=X;k&&new v.k(k,$,g),D(`
10
+ ${G}${k&&`\0${g.length-1}d\x7F`}${it}\0${g.length}b\x7F`,K),e.push(...K?[K]:[],new d(q,st,$,g));continue}else if(!K){c+=`
11
+ ${U}`;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
+ ${U}`,K),e.push(K);continue}const[,j,et,tt,nt]=J;if(j){for(;K.type!=="table";)K=e.pop();K.close(`
13
+ ${G}${j}`,!0),D(nt,e[e.length-1])}else if(et){K.type==="td"&&(K=e.pop()),K.type==="tr"&&(K=e.pop());const k=new h(`
14
+ ${G}${et}`,nt,$,g);e.push(K,k),K.insertAt(k)}else{K.type==="td"&&(K=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
+ ${G}${tt}`;for(;it;)K.insertAt(new _(st,nt.slice(q,it.index),$,g)),{lastIndex:q}=k,[st]=it,it=k.exec(nt);const lt=new _(st,nt.slice(q),$,g);e.push(K,lt),K.insertAt(lt)}}return c.slice(1)}},34:(Y,M,t)=>{t.d(M,{D:()=>B});var C=t(891),b=t(541);class B extends b.Token{constructor(I,S,m=C.default.getConfig(),f=[],l){super(I,m,f,l),this.type=S}}},83:(Y,M,t)=>{t.d(M,{x:()=>W});var C=t(169),b=t(467),B=t(891),L=t(541),I=t(34),S=(_,v,F)=>{if(!v.has(_))throw TypeError("Cannot "+F)},m=(_,v,F)=>(S(_,v,"read from private field"),F?F.call(_):v.get(_)),f=(_,v,F)=>{if(v.has(_))throw TypeError("Cannot add the same private member more than once");v instanceof WeakSet?v.add(_):v.set(_,F)},l=(_,v,F,O)=>(S(_,v,"write to private field"),O?O.call(_,F):v.set(_,F),F),n,i,d;const r=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"]),o=new Set(["align"]),s=new Set(["cite"]),h=new Set(["cite","datetime"]),p=new Set(["width"]),P=new Set(["align","valign","abbr","axis","headers","scope","rowspan","colspan","width","height","bgcolor"]),y=new Set(["type"]),E={div:o,h1:o,h2:o,h3:o,h4:o,h5:o,h6:o,blockquote:s,q:s,p:o,br:new Set(["clear"]),pre:p,ins:h,del:h,ul:y,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set(["summary","width","border","frame","rules","cellspacing","cellpadding","align","bgcolor"]),caption:o,tr:new Set(["bgcolor","align","valign"]),td:P,th:P,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:p,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"])},w=new Set,R={nowiki:w,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:w,inputbox:w,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:w,poll:new Set(["id","show-results-before-voting"]),sm2:y,flashmp3:y,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"])},z=new RegExp("expression|(?:filter|accelerator|-o-link(?:-source)?|-o-replace)\\s*:|(?:url|image(?:-set)?)\\s*\\(|attr\\s*\\([^)]+[\\s,]url","u");class Q extends L.Token{constructor(v,F,O,x="",u,$=[],g=B.default.getConfig(),e=[]){const T=new I.D(O,"attr-key",g,e,{});let c;if(O==="title"||F==="img"&&O==="alt")c=new L.Token(u,g,e,{}),c.type="attr-value",c.setAttribute("stage",B.default.MAX_STAGE-1);else if(F==="gallery"&&O==="caption"){const D={...g,excludes:[...g.excludes,"quote","extLink","magicLink","list"]};c=new L.Token(u,D,e,{}),c.type="attr-value",c.setAttribute("stage",5)}else if(F==="choose"&&(O==="before"||O==="after")){const D={...g,excludes:[...g.excludes,"heading","html","table","hr","list"]};c=new L.Token(u,D,e,{}),c.type="attr-value",c.setAttribute("stage",1)}else c=new I.D(u,"attr-value",g,e,{});super(void 0,g,e),f(this,n,void 0),f(this,i,void 0),f(this,d,void 0),this.type=v,this.append(T,c),l(this,n,x),l(this,i,$),l(this,d,F),this.setAttribute("name",(0,b.PN)(O).trim().toLowerCase())}get balanced(){return!m(this,n)||m(this,i)[0]===m(this,i)[1]}get tag(){return m(this,d)}get value(){return this.getValue()}afterBuild(){m(this,n).includes("\0")&&l(this,n,this.buildFromStr(m(this,n),"string")),this.parentNode&&l(this,d,this.parentNode.name),this.setAttribute("name",this.firstChild.text().trim().toLowerCase())}toString(v){const[F="",O=""]=m(this,i);return m(this,n)?`${super.toString(v,`${m(this,n)}${F}`)}${O}`:this.firstChild.toString(v)}text(){return m(this,n)?`${super.text(`${m(this,n).trim()}"`)}"`:this.firstChild.text()}getGaps(v){var F,O;return m(this,n)&&v===0?m(this,n).length+((O=(F=m(this,i)[0])==null?void 0:F.length)!=null?O:0):0}lint(v=this.getAbsoluteIndex()){var F;const O=super.lint(v),{balanced:x,firstChild:u,lastChild:$,type:g,name:e,value:T}=this,c=m(this,d);let D;if(!x){const U=this.getRootNode();D={start:v,...U.posFromIndex(v)};const K=(0,C.D)($,D,"unclosed quotes","warning"),G=K.startIndex-1;O.push({...K,startIndex:G,startCol:K.startCol-1})}return R[c]&&!R[c].has(e)||(g!=="ext-attr"&&!/\{\{[^{]+\}\}/u.test(e)||c in E)&&!((F=E[c])!=null&&F.has(e))&&!/^(?:xmlns:[\w:.-]+|data-[^:]*)$/u.test(e)&&(c==="meta"||c==="link"||!r.has(e))?(D!=null||(D={start:v,...this.getRootNode().posFromIndex(v)}),O.push((0,C.D)(u,D,"illegal attribute name"))):e==="style"&&typeof T=="string"&&z.test(T)?(D!=null||(D={start:v,...this.getRootNode().posFromIndex(v)}),O.push((0,C.D)($,D,"insecure style"))):e==="tabindex"&&typeof T=="string"&&T.trim()!=="0"&&(D!=null||(D={start:v,...this.getRootNode().posFromIndex(v)}),O.push((0,C.D)($,D,"nonzero tabindex"))),O}getValue(){if(m(this,n)){const v=this.lastChild.text();return m(this,i)[1]?v:v.trim()}return this.type==="ext-attr"||""}print(){const[v="",F=""]=m(this,i);return m(this,n)?super.print({sep:`${m(this,n)}${v}`,post:F}):super.print()}}n=new WeakMap,i=new WeakMap,d=new WeakMap;class W extends L.Token{constructor(v,F,O,x=B.default.getConfig(),u=[]){if(super(void 0,x,u,{}),this.type=F,this.setAttribute("name",O),v){const $=new RegExp(`([^\\s/](?:(?!\0\\d+~\x7F)[^\\s/=])*)(?:((?:\\s|\0\\d+c\x7F)*(?:=|\0\\d+~\x7F)(?:\\s|\0\\d+c\x7F)*)(?:(["'])(.*?)(\\3|$)|(\\S*)))?`,"gsu");let g="",e=$.exec(v),T=0;const c=()=>{g&&(super.insertAt(new I.D(g,`${F.slice(0,-1)}-dirty`,x,u)),g="")};for(;e;){const{index:D,0:U,1:K,2:G,3:V,4:X,5:J,6:j}=e;if(g+=v.slice(T,D),/^(?:[\w:]|\0\d+[t!~{}+-]\x7F)(?:[\w:.-]|\0\d+[t!~{}+-]\x7F)*$/u.test((0,b.PN)(K).trim())){const et=X!=null?X:j,tt=[V,J],nt=new Q(F.slice(0,-1),O,K,G,et,tt,x,u);c(),super.insertAt(nt)}else g+=U;({lastIndex:T}=$),e=$.exec(v)}g+=v.slice(T),c()}}afterBuild(){if(this.type==="table-attrs"){const{parentNode:v}=this;this.setAttribute("name",(v==null?void 0:v.type)==="td"&&v.subtype==="caption"?"caption":v==null?void 0:v.type)}}getAttrTokens(v){return this.childNodes.filter(F=>F instanceof Q&&F.name===v.toLowerCase().trim())}getAttrToken(v){const F=this.getAttrTokens(v);return F[F.length-1]}getAttr(v){var F;return(F=this.getAttrToken(v))==null?void 0:F.getValue()}lint(v=this.getAbsoluteIndex()){const F=super.lint(v),{parentNode:O,length:x,childNodes:u}=this,$=new Map,g=new Set;let e;(O==null?void 0:O.type)==="html"&&O.closing&&this.text().trim()&&(e={start:v,...this.getRootNode().posFromIndex(v)},F.push((0,C.Y)(this,e,"attributes of a closing tag")));for(let T=0;T<x;T++){const c=u[T];if(c instanceof I.D&&c.text().trim())e!=null||(e={start:v,...this.getRootNode().posFromIndex(v)}),F.push((0,C.D)(c,e,"containing invalid attribute"));else if(c instanceof Q){const{name:D}=c;$.has(D)?(g.add(D),$.get(D).push(c)):D!=="class"&&$.set(D,[c])}}if(g.size>0){e!=null||(e={start:v,...this.getRootNode().posFromIndex(v)});for(const T of g)F.push(...$.get(T).map(c=>(0,C.D)(c,e,B.default.msg("duplicated $1 attribute",T))))}return F}print(){return String(this)?`<span class="wpb-${this.type}">${this.childNodes.map(v=>v.print(v instanceof I.D&&v.text().trim()?{class:"hidden"}:void 0)).join("")}</span>`:""}}},944:(Y,M,t)=>{t.d(M,{a:()=>d});var C=t(891),b=t(541),B=t(686),L=Object.defineProperty,I=(r,o,s)=>o in r?L(r,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[o]=s,S=(r,o,s)=>(I(r,typeof o!="symbol"?o+"":o,s),s),m=(r,o,s)=>{if(!o.has(r))throw TypeError("Cannot "+s)},f=(r,o,s)=>(m(r,o,"read from private field"),s?s.call(r):o.get(r)),l=(r,o,s)=>{if(o.has(r))throw TypeError("Cannot add the same private member more than once");o instanceof WeakSet?o.add(r):o.set(r,s)},n=(r,o,s,h)=>(m(r,o,"write to private field"),h?h.call(r,s):o.set(r,s),s),i;class d extends b.Token{constructor(o,s="",h="",p=C.default.getConfig(),P=[]){if(super(void 0,p,P,{}),S(this,"type","ext-link"),l(this,i,void 0),this.insertAt(new B.k(o,!0,p,P)),n(this,i,s),h){const y=new b.Token(h,p,P,{});y.type="ext-link-text",this.insertAt(y.setAttribute("stage",C.default.MAX_STAGE-1))}}toString(o){return this.length===1?`[${super.toString(o)}${f(this,i)}]`:`[${super.toString(o,f(this,i))}]`}text(){return`[${super.text(" ")}]`}getPadding(){return 1}getGaps(o){return o===0?f(this,i).length:0}print(){return super.print(this.length===1?{pre:"[",post:`${f(this,i)}]`}:{pre:"[",sep:f(this,i),post:"]"})}}i=new WeakMap},420:(Y,M,t)=>{t.r(M),t.d(M,{GalleryToken:()=>f});var C=t(891),b=t(541),B=t(39),L=t(465),I=Object.defineProperty,S=(l,n,i)=>n in l?I(l,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[n]=i,m=(l,n,i)=>(S(l,typeof n!="symbol"?n+"":n,i),i);class f extends b.Token{constructor(n,i=C.default.getConfig(),d=[]){var r;super(void 0,i,d,{}),m(this,"type","ext-inner");for(const o of(r=n==null?void 0:n.split(`
16
+ `))!=null?r:[]){const s=/^([^|]+)(?:\|(.*))?/u.exec(o);if(!s){super.insertAt(o.trim()?new L.R(o,i,[],{}):o);continue}const[,h,p]=s;this.normalizeTitle(h,6,!0,!0).valid?super.insertAt(new B._("gallery",h,p,i,d)):super.insertAt(new L.R(o,i,[],{}))}}toString(n){return super.toString(n,`
17
+ `)}text(){return super.text(`
18
+ `).replace(/\n\s*\n/gu,`
19
+ `)}getGaps(n){return n<this.length-1?1:0}lint(n=this.getAbsoluteIndex()){const{top:i,left:d}=this.getRootNode().posFromIndex(n),r=[];for(let o=0;o<this.length;o++){const s=this.childNodes[o],h=String(s),{length:p}=h,P=h.trim(),y=i+o,E=o?0:d;s.type==="hidden"&&P&&!/^<!--.*-->$/u.test(P)?r.push({message:C.default.msg("invalid content in <$1>","gallery"),severity:"error",startIndex:n,endIndex:n+p,startLine:y,endLine:y,startCol:E,endCol:E+p}):s.type!=="hidden"&&s.type!=="text"&&r.push(...s.lint(n)),n+=p+1}return r}print(){return super.print({sep:`
20
+ `})}}},485:(Y,M,t)=>{t.d(M,{D:()=>r});var C=t(169),b=t(891),B=t(541),L=t(669),I=Object.defineProperty,S=(o,s,h)=>s in o?I(o,s,{enumerable:!0,configurable:!0,writable:!0,value:h}):o[s]=h,m=(o,s,h)=>(S(o,typeof s!="symbol"?s+"":s,h),h),f=(o,s,h)=>{if(!s.has(o))throw TypeError("Cannot "+h)},l=(o,s,h)=>(f(o,s,"read from private field"),h?h.call(o):s.get(o)),n=(o,s,h)=>{if(s.has(o))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(o):s.set(o,h)},i,d;class r extends B.Token{constructor(s,h,p=b.default.getConfig(),P=[]){super(void 0,p,P),n(this,i),m(this,"type","heading"),this.setAttribute("name",String(s));const y=new B.Token(h[0],p,P);y.type="heading-title",y.setAttribute("stage",2);const E=new L.SyntaxToken(h[1],/^[^\S\n]*$/u,"heading-trail",p,P,{});this.append(y,E)}get level(){return Number(this.name)}toString(s){const h=l(this,i,d);return`${h}${this.firstChild.toString()}${h}${this.lastChild.toString()}`}text(){const s=l(this,i,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 h=super.lint(s),p=String(this.firstChild);let P;return this.name==="1"&&(P=(0,C.Y)(this,{start:s},"<h1>"),h.push(P)),(p.startsWith("=")||p.endsWith("="))&&(P!=null||(P=(0,C.Y)(this,{start:s},"")),h.push({...P,message:b.default.msg('unbalanced "=" in a section header')})),this.closest("html-attrs, table-attrs")&&(P!=null||(P=(0,C.Y)(this,{start:s},"")),h.push({...P,message:b.default.msg("section header in a HTML tag")})),h}print(){const s=l(this,i,d);return super.print({pre:s,sep:s})}}i=new WeakSet,d=function(){return"=".repeat(this.level)}},465:(Y,M,t)=>{t.d(M,{R:()=>S});var C=t(959),b=t(541),B=Object.defineProperty,L=(m,f,l)=>f in m?B(m,f,{enumerable:!0,configurable:!0,writable:!0,value:l}):m[f]=l,I=(m,f,l)=>(L(m,typeof f!="symbol"?f+"":f,l),l);class S extends(0,C.a)(b.Token){constructor(){super(...arguments),I(this,"type","hidden")}}},842:(Y,M,t)=>{t.r(M),t.d(M,{ImagemapToken:()=>s});var C=t(169),b=t(891),B=t(541),L=t(826),I=t(39),S=t(524),m=t(944),f=Object.defineProperty,l=(h,p,P)=>p in h?f(h,p,{enumerable:!0,configurable:!0,writable:!0,value:P}):h[p]=P,n=(h,p,P)=>(l(h,typeof p!="symbol"?p+"":p,P),P);class i extends B.Token{constructor(p,P,y,E=b.default.getConfig(),w=[]){super(void 0,E,w),n(this,"type","imagemap-link"),this.append(p,P.length===2?new S.h(...P,E,w):new m.a(...P,E,w),new L.O(y,E,w))}}var d=Object.defineProperty,r=(h,p,P)=>p in h?d(h,p,{enumerable:!0,configurable:!0,writable:!0,value:P}):h[p]=P,o=(h,p,P)=>(r(h,typeof p!="symbol"?p+"":p,P),P);class s extends B.Token{constructor(p,P=b.default.getConfig(),y=[]){if(super(void 0,P,y,{}),o(this,"type","ext-inner"),!p)return;const E=p.split(`
21
+ `),w=new Set(P.protocol.split("|")),R=L.O;let z=!0,Q=!1;for(const W of E){const _=W.trim();if(!(Q||!_||_.startsWith("#"))){if(z){const[v,...F]=W.split("|"),O=this.normalizeTitle(v,0,!0);if(O.valid&&O.ns===6){const x=new I._("imagemap",v,F.length>0?F.join("|"):void 0,P,y);super.insertAt(x),z=!1;continue}else Q=!0}else if(W.trim().split(/[\t ]/u)[0]==="desc"){super.insertAt(W);continue}else if(W.includes("[")){const v=W.indexOf("["),F=W.slice(v),O=/^\[{2}([^|]+)(?:\|([^\]]+))?\]{2}[\w\s]*$/u.exec(F);if(O){if(this.normalizeTitle(O[1],0,!0,!1,!0).valid){super.insertAt(new i(W.slice(0,v),O.slice(1),F.slice(F.indexOf("]]")+2),P,y));continue}}else if(w.has(F.slice(1,F.indexOf(":")+1))||w.has(F.slice(1,F.indexOf("//")+2))){const x=/^\[([^\]\s]+)(?:(\s+)(\S[^\]]*)?)?\][\w\s]*$/u.exec(F);if(x){super.insertAt(new i(W.slice(0,v),x.slice(1),F.slice(F.indexOf("]")+1),P,y));continue}}}}super.insertAt(new R(W,P,y))}}get image(){return this.childNodes.find(({type:p})=>p==="imagemap-image")}toString(p){return super.toString(p,`
22
+ `)}text(){return super.text(`
23
+ `).replace(/\n{2,}/gu,`
24
+ `)}getGaps(p){return p<this.length-1?1:0}lint(p=this.getAbsoluteIndex()){const P=super.lint(p),y={start:p,...this.getRootNode().posFromIndex(p)};return this.image?P.push(...this.childNodes.filter(E=>{const w=String(E).trim();return E.type==="noinclude"&&w&&!w.startsWith("#")}).map(E=>(0,C.D)(E,y,"invalid link in <imagemap>"))):P.push((0,C.Y)(this,y,"<imagemap> without an image")),P}print(){return super.print({sep:`
25
+ `})}}},541:(Y,M,t)=>{t.r(M),t.d(M,{Token:()=>Zt});var C=t(467),b=t(891),B=Object.defineProperty,L=(N,a,A)=>a in N?B(N,a,{enumerable:!0,configurable:!0,writable:!0,value:A}):N[a]=A,I=(N,a,A)=>(L(N,typeof a!="symbol"?a+"":a,A),A),S=(N,a,A)=>{if(!a.has(N))throw TypeError("Cannot "+A)},m=(N,a,A)=>(S(N,a,"read from private field"),A?A.call(N):a.get(N)),f=(N,a,A)=>{if(a.has(N))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(N):a.set(N,A)},l=(N,a,A,H)=>(S(N,a,"write to private field"),H?H.call(N,A):a.set(N,A),A),n=(N,a,A)=>(S(N,a,"access private method"),A),i,d,r;class o{constructor(){f(this,d),I(this,"type"),I(this,"childNodes",[]),f(this,i,void 0)}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return m(this,i)}get nextSibling(){var a;const A=(a=m(this,i))==null?void 0:a.childNodes;return A&&A[A.indexOf(this)+1]}get previousSibling(){var a;const A=(a=m(this,i))==null?void 0:a.childNodes;return A&&A[A.indexOf(this)-1]}get offsetHeight(){return n(this,d,r).call(this).height}get offsetWidth(){return n(this,d,r).call(this).width}hasAttribute(a){return a in this}getAttribute(a){return this.hasAttribute(a)?String(this[a]):void 0}setAttribute(a,A){return a==="parentNode"?l(this,i,A):this[a]=A,this}getRootNode(){let{parentNode:a}=this;for(;a!=null&&a.parentNode;)({parentNode:a}=a);return a!=null?a:this}posFromIndex(a){const A=String(this);if(a>=-A.length&&a<=A.length){const H=A.slice(0,a).split(`
26
+ `);return{top:H.length-1,left:H[H.length-1].length}}}getPadding(){return 0}getGaps(a){return 0}getRelativeIndex(a){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(a===void 0){const{parentNode:Z}=this;return Z?({childNodes:A}=Z,H(A.indexOf(this),Z)):0}return{childNodes:A}=this,H(a,this)}getAbsoluteIndex(){const{parentNode:a}=this;return a?a.getAbsoluteIndex()+this.getRelativeIndex():0}}i=new WeakMap,d=new WeakSet,r=function(){const N=String(this).split(`
27
+ `);return{height:N.length,width:N[N.length-1].length}};var s=Object.defineProperty,h=(N,a,A)=>a in N?s(N,a,{enumerable:!0,configurable:!0,writable:!0,value:A}):N[a]=A,p=(N,a,A)=>(h(N,typeof a!="symbol"?a+"":a,A),A);const P=new Set(["nowiki","pre","charinsert","score","syntaxhighlight","source","math","chem","ce","graph","mapframe","maplink","quiz","templatedata","timeline"]);class y extends o{constructor(){super(...arguments),p(this,"name")}get length(){return this.childNodes.length}text(a){return(0,C.fL)(this.childNodes,a)}normalize(){const{childNodes:a}=this;for(let A=a.length-1;A>=0;A--){const H=a[A],Z=a[A-1];H.type!=="text"||this.getGaps(A-1)||(H.data===""?a.splice(A,1):(Z==null?void 0:Z.type)==="text"&&(Z.setAttribute("data",Z.data+H.data),a.splice(A,1)))}}removeAt(a){const{childNodes:A}=this,[H]=A.splice(a,1);return H}insertAt(a,A=this.length){const{childNodes:H}=this;return a.setAttribute("parentNode",this),H.splice(A,0,a),a}closest(a){let{parentNode:A}=this,H;const Z=new Set(a.split(",").map(ot=>ot.trim()));for(H=({type:ot})=>Z.has(ot);A;){if(H(A))return A;({parentNode:A}=A)}}append(...a){for(const A of a)this.insertAt(A)}replaceChildren(...a){this.childNodes.length=0,this.append(...a)}setText(a,A=0){const H=this.childNodes[A],{data:Z}=H;return H.replaceData(a),Z}toString(a,A=""){return this.childNodes.map(H=>H.toString()).join(A)}lint(a=this.getAbsoluteIndex()){const{SyntaxToken:A}=t(669);if(this instanceof A||this.constructor.hidden||this.type==="ext-inner"&&P.has(this.name))return[];const H=[];for(let Z=0,ot=a+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(a={}){var A;return String(this)?`<span class="wpb-${(A=a.class)!=null?A:this.type}">${(0,C.S0)(this.childNodes,a)}</span>`:""}}var E=Object.defineProperty,w=(N,a,A)=>a in N?E(N,a,{enumerable:!0,configurable:!0,writable:!0,value:A}):N[a]=A,R=(N,a,A)=>(w(N,typeof a!="symbol"?a+"":a,A),A),z=(N,a,A)=>{if(!a.has(N))throw TypeError("Cannot "+A)},Q=(N,a,A)=>{if(a.has(N))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(N):a.set(N,A)},W=(N,a,A)=>(z(N,a,"access private method"),A),_,v;const F=/https?:\/\/|\{+|\}+|\[{2,}|\[(?![^[]*\])|((?:^|\])[^[]*?)\]+|<\s*\/?([a-z]\w*)/giu,O=/\{+|\}+|\[{2,}|\[(?![^[]*\])|((?:^|\])[^[]*?)\]+|<\s*\/?([a-z]\w*)/giu,x=["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 o{constructor(a){super(),Q(this,_),R(this,"type","text"),R(this,"data"),this.data=a}toString(){return this.data}text(){return this.data}lint(a=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"?O:F,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(a),ne=new Set([jt,qt,x].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=a+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:b.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(a){W(this,_,v).call(this,a)}}_=new WeakSet,v=function(N){this.setAttribute("data",N)};var $=Object.defineProperty,g=(N,a,A)=>a in N?$(N,a,{enumerable:!0,configurable:!0,writable:!0,value:A}):N[a]=A,e=(N,a,A)=>(g(N,typeof a!="symbol"?a+"":a,A),A),T=(N,a,A)=>{if(!a.has(N))throw TypeError("Cannot "+A)},c=(N,a,A)=>(T(N,a,"read from private field"),A?A.call(N):a.get(N)),D=(N,a,A)=>{if(a.has(N))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(N):a.set(N,A)},U=(N,a,A,H)=>(T(N,a,"write to private field"),H?H.call(N,A):a.set(N,A),A),K=(N,a,A,H)=>({set _(Z){U(N,a,Z,A)},get _(){return c(N,a,H)}}),G=(N,a,A)=>(T(N,a,"access private method"),A),V,X,J,j,et,tt,nt,k,it,q,st,lt,dt,ft,rt,pt,At,$t,Ct,xt,ht,ct,gt,St,vt,at,Et,_t;const{MAX_STAGE:Bt}=b.default,Jt=class Qt extends y{constructor(a,A=b.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,Ct),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 a=="string"&&this.insertAt(a),U(this,X,A),U(this,J,H),H.push(this)}parseOnce(a=c(this,V),A=!1){if(a<c(this,V)||!this.isPlain()||this.length===0)return this;switch(a){case 0:this.type==="root"&&c(this,J).shift(),U(this,j,A),G(this,nt,k).call(this,A);break;case 1:G(this,it,q).call(this);break;case 2:G(this,st,lt).call(this);break;case 3:G(this,dt,ft).call(this);break;case 4:G(this,rt,pt).call(this);break;case 5:G(this,At,$t).call(this);break;case 6:G(this,Ct,xt).call(this);break;case 7:G(this,ht,ct).call(this);break;case 8:G(this,gt,St).call(this);break;case 9:G(this,vt,at).call(this);break;case 10:G(this,Et,_t).call(this)}if(this.type==="root")for(const H of c(this,J))H.parseOnce(a,A);return K(this,V)._++,this}buildFromStr(a,A){const H=a.split(/[\0\x7F]/u).map((Z,ot)=>{if(ot%2===0)return new u(Z);if(isNaN(Z[Z.lengtht-1]))return c(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,C.fL)(H):H}afterBuild(){if(this.type==="root")for(const a of c(this,J))a.afterBuild()}parse(a=Bt,A=!1){for(;c(this,V)<a;)this.parseOnce(c(this,V),A);return a&&(G(this,et,tt).call(this),this.afterBuild()),this}getAttribute(a){switch(a){case"config":return JSON.parse(JSON.stringify(c(this,X)));case"accum":return c(this,J);case"include":return c(this,j)!==void 0?c(this,j):this.getRootNode().getAttribute("include");default:return super.getAttribute(a)}}setAttribute(a,A){switch(a){case"stage":return c(this,V)===0&&this.type==="root"&&c(this,J).shift(),U(this,V,A),this;default:return super.setAttribute(a,A)}}isPlain(){return this.constructor===Qt}insertAt(a,A=this.length){const H=typeof a=="string"?new u(a):a;return super.insertAt(H,A),H.type==="root"&&(H.type="plain"),H}normalizeTitle(a,A=0,H=!1,Z=!1,ot=!1){return b.default.normalizeTitle(a,A,c(this,j),c(this,X),H,Z,ot)}};V=new WeakMap,X=new WeakMap,J=new WeakMap,j=new WeakMap,et=new WeakSet,tt=function(){var N;U(this,V,Bt);const{length:a,firstChild:A}=this,H=String(A);if(a===1&&A.type==="text"&&H.includes("\0")&&(this.replaceChildren(...this.buildFromStr(H)),this.normalize(),this.type==="root"))for(const Z of c(this,J))G(N=Z,et,tt).call(N)},nt=new WeakSet,k=function(N){const{parseCommentAndExt:a}=t(551);this.setText(a(String(this),c(this,X),c(this,J),N))},it=new WeakSet,q=function(){const{parseBraces:N}=t(313),a=this.type==="root"?String(this.firstChild):`\0${String(this.firstChild)}`,A=N(a,c(this,X),c(this,J));this.setText(this.type==="root"?A:A.slice(1))},st=new WeakSet,lt=function(){var N;if((N=c(this,X).excludes)!=null&&N.includes("html"))return;const{parseHtml:a}=t(980);this.setText(a(String(this),c(this,X),c(this,J)))},dt=new WeakSet,ft=function(){var N;if((N=c(this,X).excludes)!=null&&N.includes("table"))return;const{parseTable:a}=t(508);this.setText(a(this,c(this,X),c(this,J)))},rt=new WeakSet,pt=function(){var N;if((N=c(this,X).excludes)!=null&&N.includes("hr"))return;const{parseHrAndDoubleUnderscore:a}=t(362);this.setText(a(this,c(this,X),c(this,J)))},At=new WeakSet,$t=function(){const{parseLinks:N}=t(106);this.setText(N(String(this),c(this,X),c(this,J)))},Ct=new WeakSet,xt=function(){var N;if((N=c(this,X).excludes)!=null&&N.includes("quote"))return;const{parseQuotes:a}=t(704),A=String(this).split(`
29
+ `);for(let H=0;H<A.length;H++)A[H]=a(A[H],c(this,X),c(this,J));this.setText(A.join(`
30
+ `))},ht=new WeakSet,ct=function(){var N;if((N=c(this,X).excludes)!=null&&N.includes("extLink"))return;const{parseExternalLinks:a}=t(418);this.setText(a(String(this),c(this,X),c(this,J)))},gt=new WeakSet,St=function(){var N;if((N=c(this,X).excludes)!=null&&N.includes("magicLink"))return;const{parseMagicLinks:a}=t(311);this.setText(a(String(this),c(this,X),c(this,J)))},vt=new WeakSet,at=function(){var N;if((N=c(this,X).excludes)!=null&&N.includes("list"))return;const{parseList:a}=t(904),A=String(this).split(`
31
+ `);let H=this.type==="root"||this.type==="ext-inner"&&this.name==="poem"?0:1;for(;H<A.length;H++)A[H]=a(A[H],c(this,X),c(this,J));this.setText(A.join(`
32
+ `))},Et=new WeakSet,_t=function(){if(c(this,X).variants.length>0){const{parseConverter:N}=t(295);this.setText(N(String(this),c(this,X),c(this,J)))}};let Zt=Jt},299:(Y,M,t)=>{t.d(M,{o:()=>r});var C=t(169),b=t(891),B=t(541),L=t(34),I=(o,s,h)=>{if(!s.has(o))throw TypeError("Cannot "+h)},S=(o,s,h)=>(I(o,s,"read from private field"),h?h.call(o):s.get(o)),m=(o,s,h)=>{if(s.has(o))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(o):s.set(o,h)},f=(o,s,h,p)=>(I(o,s,"write to private field"),p?p.call(o,h):s.set(o,h),h),l,n,i,d;class r extends B.Token{constructor(s,h,p=b.default.getConfig(),P=[],y="|"){if(super(void 0,p,P,{}),m(this,l,!0),m(this,n,void 0),m(this,i,void 0),m(this,d,!1),this.insertAt(new L.D(s,"link-target",p,P,{})),h!==void 0){const E=new B.Token(h,p,P,{});E.type="link-text",this.insertAt(E.setAttribute("stage",b.default.MAX_STAGE-1))}f(this,n,y)}afterBuild(){const s=this.normalizeTitle(this.firstChild.text(),0,!1,!0,!0);f(this,i,s.fragment),f(this,d,s.encoded),S(this,n).includes("\0")&&f(this,n,this.buildFromStr(S(this,n),"string"))}setAttribute(s,h){return s==="bracket"?(f(this,l,!!h),this):super.setAttribute(s,h)}toString(s){const h=super.toString(s,S(this,n));return S(this,l)?`[[${h}]]`:h}text(){const s=super.text("|");return S(this,l)?`[[${s}]]`:s}getPadding(){return 2}getGaps(s){return s>=this.length-1?0:s===0?S(this,n).length:1}lint(s=this.getAbsoluteIndex()){var h;const p=super.lint(s),{childNodes:[P,y],type:E}=this;let w;return E==="link"&&P.childNodes.some(({type:R})=>R==="template")&&(w={start:s,...this.getRootNode().posFromIndex(s)},p.push((0,C.D)(P,w,"template in an internal link target","warning"))),S(this,d)&&(w!=null||(w={start:s,...this.getRootNode().posFromIndex(s)}),p.push((0,C.D)(P,w,"unnecessary URL encoding in an internal link"))),E==="link"&&((h=y==null?void 0:y.childNodes)!=null&&h.some(R=>R.type==="text"&&R.data.includes("|")))?(w!=null||(w={start:s,...this.getRootNode().posFromIndex(s)}),p.push((0,C.D)(y,w,'additional "|" in the link text',"warning"))):E!=="link"&&S(this,i)!==void 0&&(w!=null||(w={start:s,...this.getRootNode().posFromIndex(s)}),p.push((0,C.D)(P,w,"useless fragment"))),p}print(){return super.print(S(this,l)?{pre:"[[",post:"]]",sep:S(this,n)}:{sep:S(this,n)})}}l=new WeakMap,n=new WeakMap,i=new WeakMap,d=new WeakMap},533:(Y,M,t)=>{t.d(M,{q:()=>O});var C=t(467),b=t(169),B=t(891),L=t(299),I=t(541),S=Object.defineProperty,m=(x,u,$)=>u in x?S(x,u,{enumerable:!0,configurable:!0,writable:!0,value:$}):x[u]=$,f=(x,u,$)=>(m(x,typeof u!="symbol"?u+"":u,$),$),l=(x,u,$)=>{if(!u.has(x))throw TypeError("Cannot "+$)},n=(x,u,$)=>(l(x,u,"read from private field"),$?$.call(x):u.get(x)),i=(x,u,$)=>{if(u.has(x))throw TypeError("Cannot add the same private member more than once");u instanceof WeakSet?u.add(x):u.set(x,$)},d=(x,u,$,g)=>(l(x,u,"write to private field"),g?g.call(x,$):u.set(x,$),$),r;const o=new Set(["alt","link","lang","page","caption"]);function s(x,u,$=B.default.getConfig(),g=!1){u=u.trim();let e=u.replace(/\0\d+t\x7F/gu,"").trim();switch(x){case"width":return/^(?:\d+x?|\d*x\d+)$/u.test(e);case"link":{if(!e||new RegExp(`^(?:(?:${$.protocol}|//)${C._X}|\0\\d+m\x7F)${C.Qk}$`,"iu").test(e))return u;e.startsWith("[[")&&e.endsWith("]]")&&(e=e.slice(2,-2));const c=B.default.normalizeTitle(e,0,!1,$,g,!0,!0);return c.valid&&c}case"lang":return $.variants.includes(e);case"alt":case"class":case"manualthumb":return!0;default:return!isNaN(e)}}class h extends I.Token{constructor(u,$=B.default.getConfig(),g=[]){var e=(...K)=>{super(...K),f(this,"type","image-parameter"),i(this,r,"")},T;let c;const D=Object.entries($.img).map(([K,G])=>[K,G,new RegExp(`^(\\s*)${K.replace("$1","(.*)")}(\\s*)$`,"u")]),U=D.find(([,K,G])=>(c=G.exec(u),c&&(c.length!==4||s(K,c[2],$,!0)!==!1)));if(U&&c){c.length===3?(e(void 0,$,g),d(this,r,u)):(e(c[2],$,g,{}),d(this,r,`${c[1]}${U[0]}${c[3]}`)),this.setAttribute("name",U[1]);return}e(u,{...$,excludes:[...(T=$.excludes)!=null?T:[],"list"]},g),this.setAttribute("name","caption").setAttribute("stage",7)}get link(){return this.name==="link"?s("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){this.parentNode.type==="gallery-image"&&!o.has(this.name)&&this.setAttribute("name","invalid")}isPlain(){return this.name==="caption"}toString(u){return n(this,r)?n(this,r).replace("$1",super.toString(u)):super.toString(u)}text(){return n(this,r)?n(this,r).replace("$1",super.text()).trim():super.text().trim()}getPadding(){return Math.max(0,n(this,r).indexOf("$1"))}lint(u=this.getAbsoluteIndex()){const $=super.lint(u),{link:g,name:e}=this;return e==="invalid"?$.push((0,b.Y)(this,{start:u},"invalid gallery image parameter")):typeof g=="object"&&g.encoded&&$.push((0,b.Y)(this,{start:u},"unnecessary URL encoding in an internal link")),$}print(){return n(this,r)?`<span class="wpb-image-parameter">${n(this,r).replace("$1",`<span class="wpb-image-caption">${(0,C.S0)(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}}r=new WeakMap;var p=Object.defineProperty,P=(x,u,$)=>u in x?p(x,u,{enumerable:!0,configurable:!0,writable:!0,value:$}):x[u]=$,y=(x,u,$)=>(P(x,typeof u!="symbol"?u+"":u,$),$),E=(x,u,$)=>{if(!u.has(x))throw TypeError("Cannot "+$)},w=(x,u,$)=>{if(u.has(x))throw TypeError("Cannot add the same private member more than once");u instanceof WeakSet?u.add(x):u.set(x,$)},R=(x,u,$)=>(E(x,u,"access private method"),$),z,Q;const W=new Set(["manualthumb","frameless","framed","thumbnail"]),_=new Set(["left","right","center","none"]),v=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),F=(x,u,$,g)=>{if(g===void 0)return[];const e=new RegExp(`${[x,u,$].map(C.hr).join("|")}`,"gu"),T=[];let c=e.exec(g),D=0,U=0;for(;c;){const{0:K,index:G}=c;K!==$?D+=K===x?1:-1:D===0&&(T.push(g.slice(U,G)),{lastIndex:U}=e),c=e.exec(g)}return T.push(g.slice(U)),T};class O extends L.o{constructor(u,$,g=B.default.getConfig(),e=[],T="|"){super(u,void 0,g,e,T),w(this,z),y(this,"type","file"),this.append(...F("-{","}-","|",$).map(c=>new h(c,g,e)))}lint(u=this.getAbsoluteIndex()){const $=super.lint(u),g=this.getAllArgs().filter(({childNodes:G})=>{const V=G.filter(X=>X.text().trim());return V.length!==1||V[0].type!=="arg"}),e=[...new Set(g.map(({name:G})=>G))].filter(G=>G!=="invalid"),T=e.filter(G=>W.has(G)),c=e.filter(G=>_.has(G)),D=e.filter(G=>v.has(G));if(g.length===e.length&&T.length<2&&c.length<2&&D.length<2)return $;const U={start:u,...this.getRootNode().posFromIndex(u)},K=(G,V)=>X=>(0,b.D)(X,U,B.default.msg(`${G} image $1 parameter`,V));for(const G of e){let V=g.filter(({name:X})=>X===G);G==="caption"&&(V=[...V.slice(0,-1).filter(X=>X.text()),...V.slice(-1)]),V.length>1&&$.push(...V.map(K("duplicated",G)))}return T.length>1&&$.push(...g.filter(({name:G})=>W.has(G)).map(K("conflicting","frame"))),c.length>1&&$.push(...g.filter(({name:G})=>_.has(G)).map(K("conflicting","horizontal-alignment"))),D.length>1&&$.push(...g.filter(({name:G})=>v.has(G)).map(K("conflicting","vertical-alignment"))),$}getAllArgs(){return this.childNodes.slice(1)}getArgs(u){return this.getAllArgs().filter(({name:$})=>u===$)}getFrameArgs(){return R(this,z,Q).call(this,W,"\u6846\u67B6")}getHorizAlignArgs(){return R(this,z,Q).call(this,_,"\u6C34\u5E73\u5BF9\u9F50")}getVertAlignArgs(){return R(this,z,Q).call(this,v,"\u5782\u76F4\u5BF9\u9F50")}}z=new WeakSet,Q=function(x,u){return this.getAllArgs().filter(({name:g})=>x.has(g))}},39:(Y,M,t)=>{t.d(M,{_:()=>n});var C=t(169),b=t(891),B=t(541),L=t(533),I=(i,d,r)=>{if(!d.has(i))throw TypeError("Cannot "+r)},S=(i,d,r)=>(I(i,d,"read from private field"),r?r.call(i):d.get(i)),m=(i,d,r)=>{if(d.has(i))throw TypeError("Cannot add the same private member more than once");d instanceof WeakSet?d.add(i):d.set(i,r)},f=(i,d,r,o)=>(I(i,d,"write to private field"),o?o.call(i,r):d.set(i,r),r),l;class n extends L.q{constructor(d,r,o,s=b.default.getConfig(),h=[]){let p;if(o!==void 0){p=new B.Token(o,s,h),p.type="plain";for(let P=1;P<b.default.MAX_STAGE;P++)p.parseOnce();h.splice(h.indexOf(p),1)}super(r,p==null?void 0:p.toString(),s,h),m(this,l,!1),this.setAttribute("bracket",!1).type=`${d}-image`}afterBuild(){const d=this.type==="imagemap-image",r=this.normalizeTitle(String(this.firstChild),d?0:6,!0,!d);f(this,l,r.ns!==6)}getPadding(){return 0}lint(d=this.getAbsoluteIndex()){const r=super.lint(d);return S(this,l)&&r.push((0,C.Y)(this,{start:d},"invalid gallery image")),r}}l=new WeakMap},524:(Y,M,t)=>{t.d(M,{h:()=>I});var C=t(299),b=Object.defineProperty,B=(S,m,f)=>m in S?b(S,m,{enumerable:!0,configurable:!0,writable:!0,value:f}):S[m]=f,L=(S,m,f)=>(B(S,typeof m!="symbol"?m+"":m,f),f);class I extends C.o{constructor(){super(...arguments),L(this,"type","link")}}},686:(Y,M,t)=>{t.d(M,{k:()=>L});var C=t(169),b=t(891),B=t(541);class L extends B.Token{constructor(S,m=!1,f=b.default.getConfig(),l=[]){super(S,f,l,{}),this.type=m?"ext-link-url":"free-ext-link"}lint(S=this.getAbsoluteIndex()){const m=super.lint(S),f=`[\uFF0C\uFF1B\u3002\uFF1A\uFF01\uFF1F\uFF08\uFF09]+${this.type==="ext-link-url"?"|\\|+":""}`,l=new RegExp(f,"u"),n=new RegExp(f,"gu");let i;for(const d of this.childNodes){if(d.type!=="text"||!l.test(d.data))continue;i!=null||(i={start:S,...this.getRootNode().posFromIndex(S)});const{data:r}=d,o=(0,C.D)(d,i,"","warning");n.lastIndex=0;for(let s=n.exec(r);s;s=n.exec(r)){const{index:h,0:p}=s,P=r.slice(0,h).split(`
33
+ `),{length:y}=P,{length:E}=P[P.length-1],w=S+h,R=o.startLine+y-1,z=y===1?o.startCol+E:E;m.push({...o,message:b.default.msg("$1 in URL",p.startsWith("|")?'"|"':b.default.msg("full-width punctuation")),startIndex:w,endIndex:w+p.length,startLine:R,endLine:R,startCol:z,endCol:z+p.length})}}return m}}},57:(Y,M,t)=>{t.r(M),t.d(M,{NestedToken:()=>n});var C=t(169),b=t(891),B=t(541),L=t(895),I=t(826),S=t(976),m=Object.defineProperty,f=(i,d,r)=>d in i?m(i,d,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[d]=r,l=(i,d,r)=>(f(i,typeof d!="symbol"?d+"":d,r),r);class n extends B.Token{constructor(d,r,o,s=b.default.getConfig(),h=[]){var p;const P=(p=d==null?void 0:d.replace(r,(y,E,w,R,z)=>{const Q=`\0${h.length+1}${E?"e":"c"}\x7F`;if(E)new L.$(E,w,R,z,s,h);else{const W=y.endsWith("-->");new S.T(y.slice(4,W?-3:void 0),W,s,h)}return Q}))==null?void 0:p.replace(/(^|\0\d+[ce]\x7F)([^\0]+)(?=$|\0\d+[ce]\x7F)/gu,(y,E,w)=>(new I.O(w,s,h),`${E}\0${h.length}c\x7F`));super(P,s,h,{}),l(this,"type","ext-inner")}lint(d=this.getAbsoluteIndex()){let r;return[...super.lint(d),...this.childNodes.filter(o=>{if(o.type==="ext"||o.type==="comment")return!1;const s=String(o).trim();return s&&!/^<!--.*-->$/su.test(s)}).map(o=>(r!=null||(r={start:d,...this.getRootNode().posFromIndex(d)}),(0,C.D)(o,r,b.default.msg("invalid content in <$1>",this.name))))]}}},439:(Y,M,t)=>{t.d(M,{h:()=>b});var C=t(541);class b extends C.Token{}},976:(Y,M,t)=>{t.d(M,{T:()=>f});var C=t(169),b=t(959),B=t(891),L=t(439),I=Object.defineProperty,S=(l,n,i)=>n in l?I(l,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[n]=i,m=(l,n,i)=>(S(l,typeof n!="symbol"?n+"":n,i),i);class f extends(0,b.a)(L.h){constructor(n,i=!0,d=B.default.getConfig(),r=[]){super(n,d,r),m(this,"type","comment"),m(this,"closed"),this.closed=i}getPadding(){return 4}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}lint(n=this.getAbsoluteIndex()){return this.closed?[]:[(0,C.Y)(this,{start:n},"unclosed HTML comment")]}toString(n){return`<!--${this.firstChild.data}${this.closed?"-->":""}`}}},461:(Y,M,t)=>{t.d(M,{k:()=>I});var C=t(439),b=Object.defineProperty,B=(S,m,f)=>m in S?b(S,m,{enumerable:!0,configurable:!0,writable:!0,value:f}):S[m]=f,L=(S,m,f)=>(B(S,typeof m!="symbol"?m+"":m,f),f);class I extends C.h{constructor(){super(...arguments),L(this,"type","dd")}}},491:(Y,M,t)=>{t.r(M),t.d(M,{NowikiToken:()=>m});var C=t(169),b=t(891),B=t(439),L=Object.defineProperty,I=(f,l,n)=>l in f?L(f,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):f[l]=n,S=(f,l,n)=>(I(f,typeof l!="symbol"?l+"":l,n),n);class m extends B.h{constructor(){super(...arguments),S(this,"type","ext-inner")}lint(l=this.getAbsoluteIndex()){const{name:n,firstChild:i}=this;return(n==="templatestyles"||n==="section")&&i.data?[(0,C.Y)(this,{start:l},b.default.msg("nothing should be in <$1>",n))]:super.lint(l)}}},826:(Y,M,t)=>{t.d(M,{O:()=>S});var C=t(959),b=t(439),B=Object.defineProperty,L=(m,f,l)=>f in m?B(m,f,{enumerable:!0,configurable:!0,writable:!0,value:l}):m[f]=l,I=(m,f,l)=>(L(m,typeof f!="symbol"?f+"":f,l),l);class S extends(0,C.a)(b.h){constructor(){super(...arguments),I(this,"type","noinclude")}}},160:(Y,M,t)=>{t.r(M),t.d(M,{ParamTagToken:()=>f});var C=t(169),b=t(891),B=t(541),L=t(34),I=Object.defineProperty,S=(l,n,i)=>n in l?I(l,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[n]=i,m=(l,n,i)=>(S(l,typeof n!="symbol"?n+"":n,i),i);class f extends B.Token{constructor(n,i=b.default.getConfig(),d=[],r={}){if(super(void 0,i,d,{}),m(this,"type","ext-inner"),n){const o=L.D;this.append(...n.split(`
34
+ `).map(s=>new o(s,"param-line",i,d,{})))}}toString(n){return super.toString(n,`
35
+ `)}text(){return super.text(`
36
+ `)}getGaps(n){return n<this.length-1?1:0}print(){return super.print({sep:`
37
+ `})}lint(n=this.getAbsoluteIndex()){let i;return this.childNodes.filter(d=>{const{childNodes:r}=d,o=r.findIndex(({type:h})=>h!=="text"),s=(o>=0?r.slice(0,o).map(String).join(""):String(d)).trim();return s&&!(o>=0?/^[a-z]+(?:\[\])?\s*(?:=|$)/iu:/^[a-z]+(?:\[\])?\s*=/iu).test(s)}).map(d=>(i!=null||(i={start:n,...this.getRootNode().posFromIndex(n)}),(0,C.D)(d,i,b.default.msg("invalid parameter of $1",this.name))))}}},504:(Y,M,t)=>{t.r(M),t.d(M,{InputboxToken:()=>L});var C=t(313),b=t(891),B=t(160);class L extends B.ParamTagToken{constructor(S,m=b.default.getConfig(),f=[]){const l=Symbol("InputboxToken");f.push(l),S&&(S=(0,C.parseBraces)(S,m,f)),f.splice(f.indexOf(l),1),super(S,m,f,{})}}},435:(Y,M,t)=>{t.r(M),t.d(M,{PreToken:()=>m});var C=t(891),b=t(541),B=t(826),L=Object.defineProperty,I=(f,l,n)=>l in f?L(f,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):f[l]=n,S=(f,l,n)=>(I(f,typeof l!="symbol"?l+"":l,n),n);class m extends b.Token{constructor(l,n=C.default.getConfig(),i=[]){if(l){const d="<nowiki>",r="</nowiki>",{length:o}=d;let s=l.indexOf(d),h=l.indexOf(r,s+o),p="";for(;s!==-1&&h!==-1;)new B.O(d,n,i),new B.O(r,n,i),p+=`${l.slice(0,s)}\0${i.length-1}c\x7F${l.slice(s+o,h)}\0${i.length}c\x7F`,l=l.slice(h+o+1),s=l.indexOf(d),h=l.indexOf(r,s+o);l=`${p}${l}`}super(l,n,i,{}),S(this,"type","ext-inner"),this.setAttribute("stage",C.default.MAX_STAGE-1)}isPlain(){return!0}}},669:(Y,M,t)=>{t.r(M),t.d(M,{SyntaxToken:()=>B});var C=t(891),b=t(541);class B extends b.Token{constructor(I,S,m="plain",f=C.default.getConfig(),l=[],n){super(I,f,l,n),this.type=m}}},895:(Y,M,t)=>{t.d(M,{$:()=>n});var C=t(169),b=t(891),B=t(541),L=t(415),I=t(83),S=Object.defineProperty,m=(i,d,r)=>d in i?S(i,d,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[d]=r,f=(i,d,r)=>(m(i,typeof d!="symbol"?d+"":d,r),r);const l=(i,d)=>{const r=new Set(i);return r.delete(d),[...r]};class n extends L.m{constructor(d,r,o,s,h=b.default.getConfig(),p=[]){var P;const y=d.toLowerCase(),E=new I.x(!r||/^\s/u.test(r)?r:` ${r}`,"ext-attrs",y,h,p),w={...h,ext:l(h.ext,y),excludes:[...(P=h.excludes)!=null?P:[]]};let R;switch(w.inExt=!0,y){case"tab":w.ext=l(w.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":y==="poem"&&w.excludes.push("heading"),R=new B.Token(o,w,p);break;case"pre":{const{PreToken:z}=t(435);R=new z(o,w,p);break}case"dynamicpagelist":{const{ParamTagToken:z}=t(160);R=new z(o,w,p);break}case"inputbox":{w.excludes.push("heading");const{InputboxToken:z}=t(504);R=new z(o,w,p);break}case"references":{const{NestedToken:z}=t(57);R=new z(o,/<!--.*?(?:-->|$)|<(ref)(\s[^>]*)?>(.*?)<\/(ref\s*)>/gisu,["ref"],w,p);break}case"choose":{const{NestedToken:z}=t(57);R=new z(o,/<(option|choicetemplate)(\s[^>]*)?>(.*?)<\/(\1)>/gsu,["option","choicetemplate"],w,p);break}case"combobox":{const{NestedToken:z}=t(57);R=new z(o,/<(combooption)(\s[^>]*)?>(.*?)<\/(combooption\s*)>/gisu,["combooption"],w,p);break}case"gallery":{const{GalleryToken:z}=t(420);R=new z(o,w,p);break}case"imagemap":{const{ImagemapToken:z}=t(842);R=new z(o,w,p);break}default:{const{NowikiToken:z}=t(491);R=new z(o,w)}}R.setAttribute("name",y).type="ext-inner",super(d,E,R,s,h,p),f(this,"type","ext")}lint(d=this.getAbsoluteIndex()){const r=super.lint(d);if(this.name!=="nowiki"&&this.closest("html-attrs, table-attrs")){const o=this.getRootNode(),s={start:d,...o.posFromIndex(d)};r.push((0,C.Y)(this,s,"extension tag in HTML tag attributes"))}return r}}},415:(Y,M,t)=>{t.d(M,{m:()=>n});var C=t(891),b=t(541),B=(i,d,r)=>{if(!d.has(i))throw TypeError("Cannot "+r)},L=(i,d,r)=>(B(i,d,"read from private field"),r?r.call(i):d.get(i)),I=(i,d,r)=>{if(d.has(i))throw TypeError("Cannot add the same private member more than once");d instanceof WeakSet?d.add(i):d.set(i,r)},S=(i,d,r,o)=>(B(i,d,"write to private field"),o?o.call(i,r):d.set(i,r),r),m,f,l;class n extends b.Token{constructor(d,r,o,s,h=C.default.getConfig(),p=[]){super(void 0,h),I(this,m,void 0),I(this,f,void 0),I(this,l,void 0),this.setAttribute("name",d.toLowerCase()),S(this,l,[d,s||d]),S(this,m,s===void 0),S(this,f,s!==""),this.append(r,o);const P=typeof r=="string"?-1:p.indexOf(r);p.splice(P===-1?1/0:P,0,this)}get closed(){return L(this,f)}toString(d){const{firstChild:r,lastChild:o}=this,[s,h]=L(this,l);return L(this,m)?`<${s}${r.toString(d)}/>`:`<${s}${r.toString(d)}>${o.toString(d)}${this.closed?`</${h}>`:""}`}text(){const[d,r]=L(this,l);return L(this,m)?`<${d}${this.firstChild.text()}/>`:`<${d}${super.text(">")}${this.closed?`</${r}>`:""}`}getPadding(){return L(this,l)[0].length+1}getGaps(d){return 1}print(){const[d,r]=L(this,l);return super.print(L(this,m)?{pre:`&lt;${d}`,post:"/&gt;"}:{pre:`&lt;${d}`,sep:"&gt;",post:this.closed?`&lt;/${r}&gt;`:""})}}m=new WeakMap,f=new WeakMap,l=new WeakMap},169:(Y,M,t)=>{t.d(M,{D:()=>b,Y:()=>B});var C=t(891);const b=(L,I,S,m="error")=>{const f=L.getRelativeIndex(),{offsetHeight:l,offsetWidth:n,parentNode:i}=L,{top:d,left:r}=i.posFromIndex(f),{start:o}=I,{top:s,left:h}="top"in I?I:L.getRootNode().posFromIndex(o),p=String(L),P=o+f,y=s+d,E=d?r:h+r;return{message:C.default.msg(S),severity:m,startIndex:P,endIndex:P+p.length,startLine:y,endLine:y+l-1,startCol:E,endCol:l===1?E+n:n}},B=(L,I,S,m="error")=>{const{start:f}=I,{offsetHeight:l,offsetWidth:n}=L,i=String(L),{top:d,left:r}="top"in I?I:L.getRootNode().posFromIndex(f);return{message:C.default.msg(S),severity:m,startIndex:f,endIndex:f+i.length,startLine:d,endLine:d+l-1,startCol:r,endCol:l===1?r+n:n}}},467:(Y,M,t)=>{t.d(M,{PN:()=>B,Qk:()=>b,S0:()=>f,_X:()=>C,fL:()=>I,hr:()=>L,jq:()=>m,m9:()=>S});const C='(?:\\[[\\da-f:.]+\\]|[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD])',b='(?:[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD]|\\0\\d+c\\x7F)*',B=l=>l.replace(/\0\d+c\x7F/gu,""),L=l=>l.replace(/[\\{}()|.?*+^$[\]]/gu,"\\$&"),I=(l,n="")=>l.map(i=>typeof i=="string"?i:i.text()).join(n),S=l=>l.replace(/&#(\d+|x[\da-f]+);/giu,(n,i)=>String.fromCodePoint(+`${i[0].toLowerCase()==="x"?"0":""}${i}`)),m=l=>l.replace(/\n/gu,"\\n"),f=(l,n={})=>{const{pre:i="",post:d="",sep:r=""}=n,o={"&":"amp","<":"lt",">":"gt"};return`${i}${l.map(s=>s.type==="text"?s.data.replace(/[&<>]/gu,h=>`&${o[h]};`):s.print()).join(r)}${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)})();})();
@@ -518,41 +518,7 @@
518
518
  ]
519
519
  ],
520
520
  "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:",
521
- "interwiki": [
522
- "arxiv",
523
- "aswiki",
524
- "cache",
525
- "cmoegirl",
526
- "commons",
527
- "doi",
528
- "google",
529
- "googlegroups",
530
- "gsnews",
531
- "imdb",
532
- "jawiki",
533
- "komica",
534
- "mediawikiwiki",
535
- "metawikimedia",
536
- "moegirl",
537
- "mw",
538
- "sifaswiki",
539
- "sifwiki",
540
- "wikia",
541
- "wikibooks",
542
- "wikidata",
543
- "wikimedia",
544
- "wikinews",
545
- "wikiinfo",
546
- "wikipedia",
547
- "wikiquote",
548
- "wikisource",
549
- "wikispecies",
550
- "wikiversity",
551
- "wikivoyage",
552
- "wikt",
553
- "wiktionary",
554
- "zhwiki"
555
- ],
521
+ "interwiki": [],
556
522
  "img": {
557
523
  "thumbnail": "thumbnail",
558
524
  "thumb": "thumbnail",
@@ -0,0 +1,136 @@
1
+ {
2
+ "ext": [],
3
+ "html": [
4
+ [
5
+ "b",
6
+ "bdi",
7
+ "del",
8
+ "i",
9
+ "ins",
10
+ "u",
11
+ "font",
12
+ "big",
13
+ "small",
14
+ "sub",
15
+ "sup",
16
+ "h1",
17
+ "h2",
18
+ "h3",
19
+ "h4",
20
+ "h5",
21
+ "h6",
22
+ "cite",
23
+ "code",
24
+ "em",
25
+ "s",
26
+ "strike",
27
+ "strong",
28
+ "tt",
29
+ "var",
30
+ "div",
31
+ "center",
32
+ "blockquote",
33
+ "ol",
34
+ "ul",
35
+ "dl",
36
+ "table",
37
+ "caption",
38
+ "pre",
39
+ "ruby",
40
+ "rb",
41
+ "rp",
42
+ "rt",
43
+ "rtc",
44
+ "p",
45
+ "span",
46
+ "abbr",
47
+ "dfn",
48
+ "kbd",
49
+ "samp",
50
+ "data",
51
+ "time",
52
+ "mark",
53
+ "tr",
54
+ "td",
55
+ "th",
56
+ "q",
57
+ "bdo"
58
+ ],
59
+ [
60
+ "li",
61
+ "dt",
62
+ "dd"
63
+ ],
64
+ [
65
+ "br",
66
+ "wbr",
67
+ "hr",
68
+ "meta",
69
+ "link",
70
+ "img"
71
+ ]
72
+ ],
73
+ "namespaces": {
74
+ "6": "File",
75
+ "10": "Template"
76
+ },
77
+ "nsid": {},
78
+ "parserFunction": [
79
+ {
80
+ "#language": "language",
81
+ "#special": "special",
82
+ "#speciale": "speciale",
83
+ "#tag": "tag",
84
+ "#formatdate": "formatdate",
85
+ "#invoke": "invoke",
86
+ "#while": "while",
87
+ "#dowhile": "dowhile",
88
+ "#loop": "loop",
89
+ "#forargs": "forargs",
90
+ "#fornumargs": "fornumargs",
91
+ "#if": "if",
92
+ "#ifeq": "ifeq",
93
+ "#switch": "switch",
94
+ "#ifexist": "ifexist",
95
+ "#ifexpr": "ifexpr",
96
+ "#iferror": "iferror",
97
+ "#time": "time",
98
+ "#timel": "timel",
99
+ "#expr": "expr",
100
+ "#rel2abs": "rel2abs",
101
+ "#titleparts": "titleparts",
102
+ "#categorytree": "categorytree",
103
+ "#urldecode": "urldecode",
104
+ "#choose": "choose",
105
+ "#var": "var",
106
+ "#varexists": "varexists",
107
+ "#var_final": "var_final",
108
+ "#vardefine": "vardefine",
109
+ "#vardefineecho": "vardefineecho",
110
+ "#widget": "widget",
111
+ "#regex": "regex",
112
+ "#related": "related",
113
+ "#cscore": "cscore"
114
+ },
115
+ [],
116
+ [
117
+ "msg",
118
+ "原始",
119
+ "raw"
120
+ ],
121
+ [
122
+ "替代",
123
+ "subst",
124
+ "安全替代",
125
+ "safesubst"
126
+ ]
127
+ ],
128
+ "doubleUnderscore": [
129
+ [],
130
+ []
131
+ ],
132
+ "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:",
133
+ "interwiki": [],
134
+ "img": {},
135
+ "variants": []
136
+ }
@@ -611,50 +611,7 @@
611
611
  ]
612
612
  ],
613
613
  "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:",
614
- "interwiki": [
615
- "commons",
616
- "mediawikiwiki",
617
- "metawikimedia",
618
- "mw",
619
- "wikibooks",
620
- "wikidata",
621
- "wikimedia",
622
- "wikinews",
623
- "wikipedia",
624
- "wikiquote",
625
- "wikisource",
626
- "wikispecies",
627
- "wikiversity",
628
- "wikivoyage",
629
- "wikt",
630
- "wiktionary",
631
- "cc",
632
- "cm",
633
- "en",
634
- "enmoe",
635
- "enwp",
636
- "fandom",
637
- "ghia",
638
- "huiji",
639
- "ja",
640
- "jamoe",
641
- "jawp",
642
- "library",
643
- "meta",
644
- "phab",
645
- "pmid",
646
- "shoutwiki",
647
- "translatewiki",
648
- "zh",
649
- "zhmoe",
650
- "zhmoegirl",
651
- "zhtest",
652
- "zhwp",
653
- "文库",
654
- "萌娘共享",
655
- "萌娘文库",
656
- "萌百"
657
- ],
614
+ "interwiki": [],
658
615
  "img": {
659
616
  "thumbnail": "thumbnail",
660
617
  "thumb": "thumbnail",