wikiparser-node 1.29.2 → 1.30.0

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 (90) hide show
  1. package/bundle/bundle-es8.min.js +29 -26
  2. package/bundle/bundle-lsp.min.js +31 -28
  3. package/bundle/bundle.min.js +20 -20
  4. package/dist/addon/token.js +3 -2
  5. package/dist/base.d.mts +1 -1
  6. package/dist/base.d.ts +1 -1
  7. package/dist/base.js +1 -0
  8. package/dist/base.mjs +1 -0
  9. package/dist/bin/config.js +1 -1
  10. package/dist/index.js +13 -13
  11. package/dist/lib/attributes.js +0 -1
  12. package/dist/lib/document.js +2 -2
  13. package/dist/lib/element.js +5 -7
  14. package/dist/lib/lintConfig.js +7 -0
  15. package/dist/lib/lsp.d.ts +0 -1
  16. package/dist/lib/lsp.js +2 -5
  17. package/dist/lib/node.js +6 -8
  18. package/dist/lib/text.js +53 -10
  19. package/dist/lib/title.js +1 -1
  20. package/dist/mixin/attributesParent.d.ts +0 -1
  21. package/dist/mixin/attributesParent.js +2 -4
  22. package/dist/mixin/elementLike.js +2 -4
  23. package/dist/mixin/fixed.js +0 -2
  24. package/dist/mixin/gapped.js +0 -2
  25. package/dist/mixin/hidden.js +1 -3
  26. package/dist/mixin/noEscape.js +1 -3
  27. package/dist/mixin/nodeLike.js +2 -4
  28. package/dist/mixin/padded.js +5 -9
  29. package/dist/mixin/singleLine.js +0 -2
  30. package/dist/mixin/sol.js +0 -2
  31. package/dist/mixin/syntax.js +0 -2
  32. package/dist/parser/quotes.js +20 -8
  33. package/dist/parser/table.js +1 -2
  34. package/dist/src/arg.js +3 -5
  35. package/dist/src/attribute.js +10 -10
  36. package/dist/src/attributes.js +4 -4
  37. package/dist/src/commented.js +0 -1
  38. package/dist/src/converterFlags.js +1 -1
  39. package/dist/src/converterRule.js +1 -2
  40. package/dist/src/extLink.js +1 -1
  41. package/dist/src/heading.d.ts +8 -0
  42. package/dist/src/heading.js +25 -2
  43. package/dist/src/imageParameter.js +4 -6
  44. package/dist/src/index.d.ts +0 -2
  45. package/dist/src/index.js +1 -3
  46. package/dist/src/link/base.js +3 -4
  47. package/dist/src/link/category.js +2 -2
  48. package/dist/src/link/file.js +7 -7
  49. package/dist/src/link/galleryImage.d.ts +0 -2
  50. package/dist/src/link/galleryImage.js +1 -3
  51. package/dist/src/link/index.js +2 -2
  52. package/dist/src/link/redirectTarget.js +1 -1
  53. package/dist/src/magicLink.js +3 -3
  54. package/dist/src/multiLine/gallery.js +5 -5
  55. package/dist/src/multiLine/imagemap.js +1 -1
  56. package/dist/src/multiLine/paramTag.js +1 -1
  57. package/dist/src/nested.js +1 -1
  58. package/dist/src/nowiki/comment.js +1 -1
  59. package/dist/src/nowiki/dd.d.ts +3 -0
  60. package/dist/src/nowiki/doubleUnderscore.d.ts +3 -0
  61. package/dist/src/nowiki/hr.d.ts +3 -0
  62. package/dist/src/nowiki/index.js +2 -2
  63. package/dist/src/nowiki/list.d.ts +5 -0
  64. package/dist/src/nowiki/list.js +30 -0
  65. package/dist/src/nowiki/listBase.js +2 -2
  66. package/dist/src/nowiki/noinclude.d.ts +2 -1
  67. package/dist/src/nowiki/noinclude.js +26 -1
  68. package/dist/src/nowiki/quote.d.ts +21 -0
  69. package/dist/src/nowiki/quote.js +59 -2
  70. package/dist/src/parameter.js +3 -3
  71. package/dist/src/pre.js +1 -1
  72. package/dist/src/redirect.js +1 -1
  73. package/dist/src/syntax.js +1 -1
  74. package/dist/src/table/base.js +1 -1
  75. package/dist/src/table/index.d.ts +0 -4
  76. package/dist/src/table/index.js +7 -9
  77. package/dist/src/table/td.js +6 -6
  78. package/dist/src/table/trBase.js +2 -4
  79. package/dist/src/tag/html.js +2 -2
  80. package/dist/src/tag/index.js +2 -3
  81. package/dist/src/tagPair/ext.js +1 -1
  82. package/dist/src/tagPair/include.js +1 -1
  83. package/dist/src/transclude.d.ts +0 -6
  84. package/dist/src/transclude.js +3 -10
  85. package/dist/util/html.js +1 -3
  86. package/extensions/dist/base.js +2 -2
  87. package/i18n/en.json +2 -0
  88. package/i18n/zh-hans.json +2 -0
  89. package/i18n/zh-hant.json +2 -0
  90. package/package.json +26 -25
@@ -1,29 +1,32 @@
1
- "use strict";(()=>{var ja=Object.defineProperty,Ba=Object.defineProperties;var qa=Object.getOwnPropertyDescriptors;var Xt=Object.getOwnPropertySymbols;var Bn=Object.prototype.hasOwnProperty,qn=Object.prototype.propertyIsEnumerable;var Wn=e=>{throw TypeError(e)};var Os=(e,t,s)=>t in e?ja(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,ce=(e,t)=>{for(var s in t||(t={}))Bn.call(t,s)&&Os(e,s,t[s]);if(Xt)for(var s of Xt(t))qn.call(t,s)&&Os(e,s,t[s]);return e},Fe=(e,t)=>Ba(e,qa(t));var Mn=(e,t)=>{var s={};for(var i in e)Bn.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(e!=null&&Xt)for(var i of Xt(e))t.indexOf(i)<0&&qn.call(e,i)&&(s[i]=e[i]);return s};var Wa=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ie=(e,t,s)=>Os(e,typeof t!="symbol"?t+"":t,s),js=(e,t,s)=>t.has(e)||Wn("Cannot "+s);var f=(e,t,s)=>(js(e,t,"read from private field"),s?s.call(e):t.get(e)),N=(e,t,s)=>t.has(e)?Wn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),L=(e,t,s,i)=>(js(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),P=(e,t,s)=>(js(e,t,"access private method"),s);var zn=(e,t,s,i)=>({set _(r){L(e,t,r,s)},get _(){return f(e,t,i)}});var Qu=Wa((Xu,Oa)=>{var Ol=Object.create,Ke=Object.defineProperty,jl=Object.getOwnPropertyDescriptor,ln=Object.getOwnPropertyNames,Ma=Object.getPrototypeOf,za=Object.prototype.hasOwnProperty,Bl=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),yt=e=>{throw TypeError(e)},ql=(e,t,s)=>t in e?Ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Un=(e,t)=>Ke(e,"name",{value:t,configurable:!0}),C=(e,t)=>function(){return e&&(t=(0,e[ln(e)[0]])(e=0)),t},on=(e,t)=>function(){return t||(0,e[ln(e)[0]])((t={exports:{}}).exports,t),t.exports},ie=(e,t)=>{for(var s in t)Ke(e,s,{get:t[s],enumerable:!0})},Wl=(e,t,s,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ln(t))!za.call(e,r)&&r!==s&&Ke(e,r,{get:()=>t[r],enumerable:!(i=jl(t,r))||i.enumerable});return e},Ua=(e,t,s)=>(s=e!=null?Ol(Ma(e)):{},Wl(t||!e||!e.__esModule?Ke(s,"default",{value:e,enumerable:!0}):s,e)),X=e=>Wl(Ke({},"__esModule",{value:!0}),e),te=e=>{var t;return[,,,Ol((t=e==null?void 0:e[Bl("metadata")])!=null?t:null)]},Ml=["class","method","getter","setter","accessor","field","value","get","set"],Lt=e=>e!==void 0&&typeof e!="function"?yt("Function expected"):e,Ha=(e,t,s,i,r)=>({kind:Ml[e],name:t,metadata:i,addInitializer:n=>s._?yt("Already initialized"):r.push(Lt(n||null))}),an=(e,t)=>ql(t,Bl("metadata"),e[3]),Y=(e,t,s,i)=>{for(var r=0,n=e[t>>1],l=n&&n.length;r<l;r++)t&1?n[r].call(s):i=n[r].call(s,i);return i},Z=(e,t,s,i,r,n)=>{var l,a,o,u,d,h=t&7,g=!!(t&8),c=!!(t&16),p=h>3?e.length+1:h?g?1:2:0,x=Ml[h+5],m=h>3&&(e[p-1]=[]),v=e[p]||(e[p]=[]),S=h&&(!c&&!g&&(r=r.prototype),h<5&&(h>3||!c)&&jl(h<4?r:{get[s](){return ue(this,n)},set[s](y){return be(this,n,y)}},s));h?c&&h<4&&Un(n,(h>2?"set ":h>1?"get ":"")+s):Un(r,s);for(var w=i.length-1;w>=0;w--)u=Ha(h,s,o={},e[3],v),h&&(u.static=g,u.private=c,d=u.access={has:c?y=>Ga(r,y):y=>s in y},h^3&&(d.get=c?y=>(h^1?ue:Gi)(y,r,h^4?n:S.get):y=>y[s]),h>2&&(d.set=c?(y,A)=>be(y,r,A,h^4?n:S.set):(y,A)=>y[s]=A)),a=(0,i[w])(h?h<4?c?n:S[x]:h>4?void 0:{get:S.get,set:S.set}:r,u),o._=1,h^4||a===void 0?Lt(a)&&(h>4?m.unshift(a):h?c?n=a:S[x]=a:r=a):typeof a!="object"||a===null?yt("Object expected"):(Lt(l=a.get)&&(S.get=l),Lt(l=a.set)&&(S.set=l),Lt(l=a.init)&&m.unshift(l));return h||an(e,r),S&&Ke(r,s,S),c?h^4?n:S:r},Da=(e,t,s)=>ql(e,typeof t!="symbol"?t+"":t,s),un=(e,t,s)=>t.has(e)||yt("Cannot "+s),Ga=(e,t)=>Object(t)!==t?yt('Cannot use the "in" operator on this value'):e.has(t),ue=(e,t,s)=>(un(e,t,"read from private field"),s?s.call(e):t.get(e)),je=(e,t,s)=>t.has(e)?yt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),be=(e,t,s,i)=>(un(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),Gi=(e,t,s)=>(un(e,t,"access private method"),s),Va=(e,t,s,i)=>({set _(r){be(e,t,r,s)},get _(){return ue(e,t,i)}}),zl,xs,Ul=C({"base.ts"(){"use strict";zl=(()=>{const e={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11,"list-range":11};return Object.setPrototypeOf(e,null),e})(),xs=(()=>{const e=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","invalid-url","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(e),e})()}});function ye(e,t,s){return s===1?e.replace(/\0(\d+)g\x7F/gu,(i,r)=>ye(String(t[r]),t,2)):s===2?e.replace(/\0(\d+)n\x7F/gu,(i,r)=>String(t[r])):e.replace(/\0(\d+)\x7F/gu,(i,r)=>t[r])}var We,Bs,ft,mt,xt,rt,Hl,fe,Ye,Hn,Dn,vs,Dl,Gn,Vn,Ht,vt,de=C({"util/string.ts"(){"use strict";We=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Bs=String.raw`[^[\]<>"\0-\x1F\x7F${We}\uFFFD]`,ft=String.raw`(?:\[[\da-f:.]+\]|${Bs})`,mt=String.raw`(?:${Bs}|\0\d+[cn!~]\x7F)*`,xt=e=>e.trim().toLowerCase(),rt=(e,t)=>s=>s.replace(e,t),Hl=rt(/[\0\x7F]|\r$/gmu,""),fe=rt(/\0\d+[cn]\x7F/gu,""),Ye=(e,t="")=>e.map(s=>typeof s=="string"?s:s.text()).join(t),Hn={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Dn=rt(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(e,t,s)=>t?String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t)):Hn[s.toLowerCase()]),vs=e=>Dn(e),Dl=rt(/&#(\d+|x[\da-f]+);/giu,(e,t)=>String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t))),Gn={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Vn=e=>rt(e,t=>`&${Gn[t]};`),Ht=Vn(/[&<>]/gu),vt=(e,t={})=>{const{pre:s="",post:i="",sep:r=""}=t;return s+e.map(n=>n.print()).join(r)+i}}}),Qa=on({"i18n/en.json"(e,t){t.exports={"attributes-of-closing-tag":"attributes of a closing tag","bold-apostrophes":"bold apostrophes","bold-in-header":"bold text in a section header",close:null,"closing-and-self-closing":"tag that is both closing and self-closing",comment:null,"conflicting-image-parameter":"conflicting image $1 parameter","content-outside-table":"content to be moved outside the table",decode:null,delink:null,"duplicate-attribute":"duplicate $1 attribute","duplicate-category":"duplicate category","duplicate-id":"duplicate HTML id","duplicate-image-parameter":"duplicate image $1 parameter","duplicate-parameter":"duplicate template parameter",encode:null,escape:null,expand:null,"ext-in-html":"extension tag in HTML tag attributes",frame:null,"full-width-punctuation":"full-width punctuation","header-in-html":"section header in HTML tag attributes","horizontal-alignment":null,"html-in-table":"HTML tag in table attributes","illegal-attribute-name":"invalid attribute name","illegal-attribute-value":"invalid attribute value","illegal-module":"invalid Scribunto module name","imagemap-without-image":"<imagemap> without an image","in-url":"$1 in URL","inconsistent-table":"inconsistent table layout","insecure-style":"insecure style","invalid-attribute":"element containing an invalid attribute name","invalid-content":"invalid content in <$1>","invalid-conversion-flag":"invalid conversion flag","invalid-gallery":"invalid gallery image","invalid-image-parameter":"invalid image parameter","invalid-imagemap-link":"invalid link in <imagemap>","invalid-isbn":"invalid ISBN","invalid-parameter":"invalid parameter of <$1>","invalid-self-closing":"invalid self-closing tag","invalid-thumb":"invalid thumbnail filename","invalid-url":"invalid URL","invisible-triple-braces":"invisible content inside triple braces","italic-apostrophes":"italic apostrophes","left-bracket":"opening bracket","link-in-extlink":"internal link in an external link",lonely:'lonely "$1"',"missing-extension":"missing file extension","missing-function":"missing Scribunto module function name",newline:null,"no-self-closing":"no self-closing","nonzero-tabindex":"nonzero tabindex","nothing-in":"nothing should be in <$1>","obsolete-attribute":"obsolete attribute","obsolete-tag":"obsolete HTML tag",open:null,prefix:null,"pipe-in-link":'additional "|" in the link text',"pipe-in-table":'additional "|" in a table cell',"ref-in-link":"<ref> in an internal or external link",remove:null,"template-in-link":"template in an internal link target","unbalanced-in-section-header":"unbalanced $1 in a section header",unclosed:"unclosed $1","unclosed-comment":"unclosed HTML comment","unclosed-quotes":"unclosed quotes","unclosed-table":"unclosed table","unclosed-tag":"unclosed tag","unescaped-query":"unescaped query string in an anonymous parameter","unexpected-argument":"unexpected template argument","unmatched-closing":"unmatched closing tag","unnecessary-encoding":"unnecessary percent-encoding in an internal link",uppercase:null,"useless-attribute":"useless attribute","useless-fragment":"useless fragment","useless-link-text":"useless link text","variable-anchor":"variable anchor in a section header","vertical-alignment":null,whitespace:null}}}),Ja=on({"config/minimum.json"(e,t){t.exports={ext:[],html:[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link"]],namespaces:{0:"",6:"File",10:"Template",14:"Category",828:"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},functionHook:["msgnw"],variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{msgnw:"msgnw",pageid:"pageid",articlepath:"articlepath",server:"server",servername:"servername",scriptpath:"scriptpath",stylepath:"stylepath","#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#related":"related","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#rmatch":"rmatch","#rreplace":"rreplace","#replace":"replace","#rsplit":"rsplit","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#translation":"translation","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"lst","#section-x":"lstx","#section-h":"lsth","#statements":"statements","#useliquidthreads":"useliquidthreads","#lqtpagelimit":"lqtpagelimit","#avatar":"avatar","#img":"img","#chart":"chart"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#contentmodel":"contentmodel","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}}}),pe,Gl,Vi,Ee=C({"util/constants.ts"(){"use strict";pe=11,Gl=Qa(),Vi=Ja()}});function pt(e){const t=new Map,s=new WeakMap;return i=>{const r=typeof i=="string"?t:s;if(r.has(i)){const l=r.get(i);return l.lastIndex=0,l}const n=e(i);return r.set(i,n),n}}var Dt,Ze=C({"../common/dist/index.mjs"(){"use strict";Dt=e=>decodeURIComponent(e.replace(/%(?![\da-f]{2})/giu,"%25"))}}),re,ae=C({"lib/rect.ts"(){"use strict";var e,t,s,i,Qi,n;re=(n=class{constructor(l,a){N(this,i);N(this,e);N(this,t);N(this,s);L(this,e,l),L(this,t,a)}get start(){return f(this,t)}get top(){return P(this,i,Qi).call(this).top}get left(){return P(this,i,Qi).call(this).left}},e=new WeakMap,t=new WeakMap,s=new WeakMap,i=new WeakSet,Qi=function(){var l;return(l=f(this,s))!=null||L(this,s,f(this,e).getRootNode().posFromIndex(f(this,t))),f(this,s)},n)}}),Qn,Jn,Ut,Ji,qs,B,z,_e,As,H,dn,Me,hn,cn,gn,Gt,bt,pn,Xe,Vl,M=C({"util/lint.ts"(){"use strict";Ze(),Ce(),ae(),j(),Qn=new Set(["tr","td","th","caption"]),Jn=new Set(["Template:!!","Template:!-"]),Ut=e=>{const t=e.childNodes.find(s=>s.text().trim());if(!t||t.type==="text"&&t.data.trim().startsWith("!")||t.is("magic-word")&&t.name==="!"||t.is("template")&&Jn.has(t.name)||t.is("html")&&Qn.has(t.name))return!1;if(t.is("arg"))return t.length>1&&Ut(t.childNodes[1]);if(t.is("magic-word"))try{const s=t.getPossibleValues().map(Ut);return s.includes(2)?2:s.includes(1)&&1}catch(s){}return t.is("template")||t.is("magic-word")&&t.name==="invoke"?1:2},Ji=(e,t,s,i)=>({line:e+s-1,character:(s===1?t:0)+i}),qs=e=>(t,s,i,r,n="error")=>{const{start:l}=s,{top:a,left:o}=s instanceof re?s:new re(t,l),{offsetHeight:u,offsetWidth:d}=t,{startIndex:h,startLine:g,startCol:c}=e(t,l,a,o),{line:p,character:x}=Ji(g,c,u,d);return{rule:i,message:I.msg(r),severity:n,startIndex:h,endIndex:h+t.toString().length,startLine:g,endLine:p,startCol:c,endCol:x}},B=qs((e,t,s,i)=>{const r=e.getRelativeIndex(),{top:n,left:l}=e.parentNode.posFromIndex(r);return{startIndex:t+r,startLine:s+n,startCol:n?l:i+l}}),z=qs((e,t,s,i)=>({startIndex:t,startLine:s,startCol:i})),_e=(e,t,s,i=0)=>({desc:I.msg(t),range:[e.startIndex+i,e.endIndex],text:s}),As=(e,t,s)=>({desc:I.msg(t),range:[e,e],text:s}),H=(e,t=0,s="")=>typeof e=="number"?{desc:I.msg("remove"),range:[e,e+t],text:s}:_e(e,"remove",s,t),dn=(e,t)=>_e(e,"decode",Dt(t.text().replace(/%(?=21|3[ce]|5[bd]|7[b-d])/giu,"%25"))),Me=(e,t,s=0)=>({desc:I.msg("close"),range:[e+s,e],text:t}),hn=e=>({desc:I.msg("open"),range:[e+1,e+2],text:""}),cn=(e,t)=>_e(e,"comment",`<!--${t}-->`),gn=(e,t)=>_e(e,"uppercase",t.toUpperCase()),Gt=(e,t=0)=>({desc:I.msg("whitespace"),range:[e,e+t],text:" "}),bt=(e,t,s=1)=>({desc:I.msg("escape"),range:[e,e+s],text:t.repeat(s)}),pn=(e,t)=>({desc:I.msg("escape"),range:[e,e+t.length],text:t.replace(/\|/gu,"&#124;")}),Xe=(e,t,s,i)=>{if(e&&(i||I.viewOnly&&e[0]===me.rev))return e[1];const r=t();return(i||I.viewOnly)&&s([me.rev,r]),r},Vl=(e,t)=>e==="ol"&&t==="type"?["1","a","A","i","I"]:e==="th"&&t==="scope"?["row","col","rowgroup","colgroup"]:t==="dir"?["ltr","rtl","auto"]:t==="aria-hidden"?["true","false"]:[]}}),Xn,fn,Ql=C({"parser/selector.ts"(){"use strict";Xn=e=>{if(e.includes("#")){const t=e.indexOf("#"),s=e.slice(0,t),i=e.slice(t+1);return(r,n)=>(t===0||r===s)&&n===i}return e?t=>t===e:()=>!0},fn=(e,t,s)=>{const i=e.split(",").map(r=>Xn(r.trim()));return(({type:r,name:n})=>i.some(l=>l(r,n)))}}}),Xa=on({"../node_modules/binary-search/index.js"(e,t){t.exports=function(s,i,r,n,l){var a,o;if(n===void 0)n=0;else if(n=n|0,n<0||n>=s.length)throw new RangeError("invalid lower bound");if(l===void 0)l=s.length-1;else if(l=l|0,l<n||l>=s.length)throw new RangeError("invalid upper bound");for(;n<=l;)if(a=n+(l-n>>>1),o=+r(s[a],i,a,s),o<0)n=a+1;else if(o>0)l=a-1;else return a;return~n}}}),Kn,Jl,Ka=C({"util/search.ts"(){"use strict";Kn=Ua(Xa()),Jl=(e,t,s)=>{const i=(0,Kn.default)(e,t,s);return i<0?~i:i}}}),ks,mn=C({"mixin/cached.ts"(){"use strict";M(),ks=(e=!0)=>t=>{const s=new WeakMap;return function(...i){return Xe(s.get(this),()=>t.apply(this,i),r=>{s.set(this,r)},e)}}}}),Xl,Ya=C({"mixin/nodeLike.ts"(){"use strict";Xl=e=>{class t extends e{get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get offsetHeight(){return this.getDimension().height}get offsetWidth(){return this.getDimension().width}}return t}}}),Yn,Zn,Kt,St,At,Yt,kt,_t,$t,Qe,Kl=C({"lib/node.ts"(){"use strict";Ka(),M(),Ce(),mn(),Ya(),j(),Zn=[Xl],Yn=[ks(!1)],Qe=class{constructor(){Y($t,5,this),Da(this,"childNodes",[]),je(this,Kt),je(this,St),je(this,At),je(this,Yt),je(this,kt),je(this,_t,{})}get parentNode(){return ue(this,Kt)}get nextSibling(){return ue(this,St)}get previousSibling(){return ue(this,At)}getChildNodes(){const{childNodes:e}=this;return Object.isFrozen(e)?[...e]:e}getAttribute(e){return e==="padding"?0:this[e]}setAttribute(e,t){switch(e){case"parentNode":be(this,Kt,t),t||(be(this,St,void 0),be(this,At,void 0));break;case"nextSibling":be(this,St,t);break;case"previousSibling":be(this,At,t);break;case"aIndex":I.viewOnly&&be(this,kt,[me.rev,t]);break;default:this[e]=t}}getRootNode(){return Xe(ue(this,Yt),()=>{var e,t;return(t=(e=this.parentNode)==null?void 0:e.getRootNode())!=null?t:this},e=>{const[,t]=e;t.type==="root"&&be(this,Yt,e)})}indexFromPos(e,t){this.lspError("AstNode.indexFromPos")}posFromIndex(e){{const{length:t}=String(this);if(e+=e<0?t:0,e>=0&&e<=t){const s=this.getLines(),i=Jl(s,e,([,,r],n)=>r-n);return{top:i,left:e-s[i][1]}}return}}getDimension(){{const e=this.getLines(),t=e[e.length-1];return{height:e.length,width:t[2]-t[1]}}}getGaps(e){return 0}getRelativeIndex(e){if(e===void 0){const{parentNode:t}=this;return t?t.getRelativeIndex(t.childNodes.indexOf(this)):0}return Xe(ue(this,_t)[e],()=>{const{childNodes:t}=this,s=e+(e<0?t.length:0);let i=this.getAttribute("padding");for(let r=0;r<s;r++)I.viewOnly&&(ue(this,_t)[r]=[me.rev,i]),i+=t[r].toString().length+this.getGaps(r);return i},t=>{ue(this,_t)[e]=t})}getAbsoluteIndex(){return Xe(ue(this,kt),()=>{const{parentNode:e}=this;return e?e.getAbsoluteIndex()+this.getRelativeIndex():0},e=>{be(this,kt,e)})}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(e){return this.type===e}getLines(){{const e=[];let t=0;for(const s of String(this).split(`
2
- `)){const i=t+s.length;e.push([s,t,i]),t=i+1}return e}}seal(e,t){const s=!t&&!!this[e];Object.defineProperty(this,e,{enumerable:s,configurable:!0})}lspError(e){throw new Error(`${e} method is only available in the LSP version!`)}},$t=te(null),Kt=new WeakMap,St=new WeakMap,At=new WeakMap,Yt=new WeakMap,kt=new WeakMap,_t=new WeakMap,Z($t,1,"getLines",Yn,Qe),Qe=Z($t,0,"AstNode",Zn,Qe),Y($t,1,Qe)}}),Yl,Za=C({"mixin/elementLike.ts"(){"use strict";Ql(),Yl=e=>{var t,Xi;{class i extends e{constructor(){super(...arguments);N(this,t)}getElementBy(l){const a=[...this.childNodes].reverse();for(;a.length>0;){const o=a.pop(),{type:u,childNodes:d}=o;if(u!=="text"){if(l(o))return o;for(let h=d.length-1;h>=0;h--)a.push(d[h])}}}querySelector(l){return this.getElementBy(P(this,t,Xi).call(this,l))}getElementsBy(l){const a=[...this.childNodes].reverse(),o=[];for(;a.length>0;){const u=a.pop(),{type:d,childNodes:h}=u;if(d!=="text"){l(u)&&o.push(u);for(let g=h.length-1;g>=0;g--)a.push(h[g])}}return o}querySelectorAll(l){return this.getElementsBy(P(this,t,Xi).call(this,l))}escape(){}}return t=new WeakSet,Xi=function(l){return fn(l,this)},i}}}}),er,Ws,tr,Ft,eu=C({"lib/element.ts"(){"use strict";de(),Ce(),Ql(),Kl(),Za(),er=[Yl],Ft=class extends(tr=Qe){get length(){return this.childNodes.length}text(e){return Ye(this.childNodes,e)}normalize(){const e=this.getChildNodes(),t=s=>{var i,r;e.splice(s,1),(i=e[s-1])==null||i.setAttribute("nextSibling",e[s]),(r=e[s])==null||r.setAttribute("previousSibling",e[s-1])};for(let s=e.length-1;s>=0;s--){const{type:i,data:r}=e[s];i!=="text"||e.length===1||this.getGaps(s-(s&&1))||r===""&&t(s)}this.setAttribute("childNodes",e)}removeAt(e){this.lspError("AstElement.removeAt")}insertAt(e,t=this.length){return Fn(this,t,0,[e]),e}closest(e){const t=fn(e,this);let{parentNode:s}=this;for(;s;){if(t(s))return s;({parentNode:s}=s)}}append(...e){this.safeAppend(e)}safeAppend(e){for(const t of e)this.insertAt(t)}safeReplaceChildren(e){}setText(e,t=0){t+=t<0?this.length:0;const s=this.childNodes[t],{data:i}=s;return s.replaceData(e),i}toString(e,t=""){return this.childNodes.map(s=>s.toString(e)).join(t)}caretPositionFromIndex(e){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(e){this.lspError("AstElement.elementFromIndex")}elementFromPoint(e,t){this.lspError("AstElement.elementFromPoint")}lint(e=this.getAbsoluteIndex(),t){{const s=[];for(let i=0,r=e+this.getAttribute("padding");i<this.length;i++){const n=this.childNodes[i];n.setAttribute("aIndex",r);const l=n.lint(r,t);l.length>0&&Array.prototype.push.apply(s,l),r+=n.toString().length+this.getGaps(i)}return s}}print(e={}){const t=e.class;return this.toString()?(t===""?"":`<span class="wpb-${t!=null?t:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+vt(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){}},Ws=te(tr),Ft=Z(Ws,0,"AstElement",er,Ft),Y(Ws,1,Ft)}}),Zt,Ms,zs,sr,ir,nr,rr,Us,lr,Ki,tu=C({"lib/text.ts"(){"use strict";var e,Zl,s;de(),M(),j(),Kl(),Zt=String.raw`[${We}\t]*`,Ms=String.raw`[^\S\n]*`,zs=String.raw`<${Ms}(?:/${Ms})?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+`,sr=new RegExp(String.raw`${zs}|https?[:/]/+|(?:rfc|pmid)(?=[-::]?${Zt}\d)|isbn(?=[-::]?${Zt}(?:\d(?:${Zt}|-)){6})`,"giu"),ir=new RegExp(zs,"giu"),nr=new Set(["attr-value","ext-link-text","link-text"]),rr={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Us=new Set(["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"]),lr=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch(i){return/\w/u}})(),Ki=(s=class extends Qe{constructor(r){super();N(this,e);Ie(this,"data","");this.data=r}get type(){return"text"}toString(r){var n;return r&&!((n=this.parentNode)!=null&&n.getAttribute("built"))?fe(this.data):this.data}text(){return this.data}lint(r=this.getAbsoluteIndex(),n){var l,a,o;{if(n===!1)return[];const{data:u,parentNode:d,nextSibling:h,previousSibling:g}=this;if(!d)throw new Error("An isolated text node cannot be linted!");const{type:c,parentNode:p}=d;if(c==="attr-value"){const{name:O,tag:J}=p;if(J==="ref"&&(O==="name"||O==="follow")||O==="group"&&(J==="ref"||J==="references")||J==="choose"&&(O==="before"||O==="after"))return[]}if(n!=null||(n=d.isPlain()&&!nr.has(c)?sr:ir),u.search(n)===-1)return[];n.lastIndex=0;const x=[],m=h==null?void 0:h.type,v=h==null?void 0:h.name,S=g==null?void 0:g.type,w=this.getRootNode(),y=w.toString(),{ext:A,html:k,variants:$}=w.getAttribute("config"),{top:b,left:_}=w.posFromIndex(r),{lintConfig:T}=I,F=T.rules["tag-like"],R=typeof F=="object"&&F[1]?new Set(Object.keys(F[1]).filter(O=>O!=="invalid"&&O!=="disallowed")):new Set,W=new Set(["onlyinclude","noinclude","includeonly",...A,...k[0],...k[1],...k[2],...R,...T.getSeverity("tag-like","disallowed")?Us:[]]);for(let O=n.exec(u);O;O=n.exec(u)){const[,J,le]=O;let{index:ee,0:D}=O;if(le&&le!=="]"){const{length:ge}=le;ee+=ge,D=D.slice(ge)}D=D.toLowerCase();const[G]=D,Se=G==="r"||G==="p"||G==="i",Le=G==="{",V=G==="}",K=G==="[",Q=G==="]";let{length:se}=D;if(G==="<"&&!W.has(J.toLowerCase())||K&&c==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(u.slice(ee+1))||h!=null&&h.is("ext")&&v==="nowiki"&&((l=h.innerText)!=null&&l.includes("]"))))continue;Q&&(ee||se>1)&&n.lastIndex--;let oe=r+ee,he=oe+se,U,xe;const ve=y[he],Oe=y[oe-1],nt=Le||K,Es=Le&&Oe==="-"&&$.length>0,Rs=V&&ve==="-"&&$.length>0,En=K&&m==="free-ext-link"&&!u.slice(ee+1).trim()||Q&&S==="free-ext-link"&&!u.slice(0,ee).includes("]");if(Se)U="lonely-http",D=D.toUpperCase(),xe=T.getSeverity(U,D);else if(G==="<"){U="tag-like";let ge;/^<\/?\s/u.test(D)||!/[\s/>]/u.test(ve!=null?ve:"")?ge="invalid":R.has(J)?ge=J:Us.has(J)&&!A.includes(J)&&(ge="disallowed"),xe=T.getSeverity(U,ge)}else if(Es||Rs)U="lonely-bracket",xe=T.getSeverity(U,"converter"),Es&&ee>0?(D="-{",ee--,oe--,se=2):Rs&&ee<u.length-1&&(D="}-",he++,se=2);else if(En)U="lonely-bracket",xe=T.getSeverity(U,"extLink");else if(nt||V||Q)if(U="lonely-bracket",se>1||Le&&ve===G||V&&Oe===G)xe=T.getSeverity(U,"double");else{if(!K||c!=="ext-link-text"){const ge=rr[G],Ps=nt?u.slice(ee+1):u.slice(0,ee);if(Le&&((a=ge.exec(Ps))==null?void 0:a[0])==="}"||V&&((o=ge.exec(Ps))==null?void 0:o[0])==="{")continue;if(!Ps.includes(G)){const jn=nt?"nextSibling":"previousSibling";let Ge=this[jn];for(;Ge&&(Ge.type!=="text"||!ge.test(Ge.data));)Ge=Ge[jn];if(Ge&&ge.exec(Ge.data)[0]!==G)continue}}xe=T.getSeverity(U,"single")}else U="lonely-http",xe=T.getSeverity(U);if(!xe)continue;const Rn=this.posFromIndex(ee),{line:Pn,character:On}=Ji(b,_,Rn.top+1,Rn.left),De={rule:U,message:I.msg("lonely",Se||G==="h"||Es||Rs?D:G),severity:xe,startIndex:oe,endIndex:he,startLine:Pn,endLine:Pn,startCol:On,endCol:On+se};if(T.computeEditInfo)if(G==="<")De.suggestions=[bt(oe,"&lt;")];else if(G==="h"&&c!=="link-text"&&lr.test(Oe||""))De.suggestions=[Gt(oe)];else if(K&&c==="ext-link-text"){const ge=d.getAbsoluteIndex()+d.toString().length;De.suggestions=[bt(ge,"&#93;")]}else if(Q&&En){const ge=r-g.toString().length;De.suggestions=[As(ge,"left-bracket","[")]}else Se&&(De.suggestions=[...O[0]===D?[]:[gn(De,D)],...ve===":"||ve===":"?[Gt(he,1)]:[]]);x.push(De)}return x}}replaceData(r){P(this,e,Zl).call(this,r)}splitText(r){this.lspError("AstText.splitText")}escape(){}print(){return Ht(this.data)}},e=new WeakSet,Zl=function(r){this.setAttribute("data",r)},s)}}),ze,et=C({"mixin/hidden.ts"(){"use strict";ze=(e=!0,t=!0)=>s=>{class i extends s{text(){return""}lint(n){return e?[]:super.lint(n)}}return i}}}),Ne,Re=C({"mixin/noEscape.ts"(){"use strict";Ne=e=>{}}}),Ue,tt=C({"src/syntax.ts"(){"use strict";var e,t;q(),Ue=(t=class extends E{constructor(i,r,n,l,a){super(i,n,l,a);N(this,e);L(this,e,r)}get type(){return f(this,e)}lint(i=this.getAbsoluteIndex()){return super.lint(i,!1)}},e=new WeakMap,t)}}),Pe,He=C({"mixin/padded.ts"(){"use strict";Pe=({length:e})=>t=>{class s extends t{getAttribute(r){return r==="padding"?e:super.getAttribute(r)}}return s}}}),Te,st=C({"src/atom.ts"(){"use strict";var e,t;q(),Te=(t=class extends E{constructor(i,r,n,l,a){super(i,n,l,a);N(this,e);L(this,e,r)}get type(){return f(this,e)}set type(i){L(this,e,i)}getAttribute(i){var r;return i==="invalid"?this.type==="converter-flag"&&!!((r=this.parentNode)!=null&&r.isInvalidFlag(this)):super.getAttribute(i)}},e=new WeakMap,t)}}),or,ar,Hs,ur,Be,_s=C({"src/link/base.ts"(){"use strict";var e,t,s,i;M(),Ee(),ae(),He(),Re(),j(),q(),st(),or=r=>r==="redirect-target"||r==="link",ar=[Ne,Pe("[[")],Be=(i=class extends(ur=E){constructor(n,l,a,o=[],u="|"){super(void 0,a,o,{});N(this,e,!0);N(this,t);N(this,s);if(this.insertAt(new Te(n,"link-target",a,o,{})),l!==void 0){const d=new E(l,a,o,{});d.type="link-text",d.setAttribute("stage",pe-1),this.insertAt(d)}L(this,t,u)}get link(){}get fragment(){}afterBuild(){L(this,s,this.getTitle()),f(this,t).includes("\0")&&L(this,t,this.buildFromStr(f(this,t),0)),this.setAttribute("name",f(this,s).title),super.afterBuild()}setAttribute(n,l){n==="bracket"?L(this,e,l):n==="title"?L(this,s,l):super.setAttribute(n,l)}toString(n){const l=super.toString(n,f(this,t));return f(this,e)?`[[${l}]]`:l}text(){const n=super.text("|");return f(this,e)?`[[${n}]]`:n}getAttribute(n){return n==="title"?f(this,s):super.getAttribute(n)}getGaps(n){return n===0?f(this,t).length:1}lint(n=this.getAbsoluteIndex(),l){{const a=super.lint(n,l),{childNodes:[o,u],type:d}=this,{encoded:h,fragment:g}=f(this,s),{lintConfig:c}=I,{computeEditInfo:p,fix:x}=c,m=new re(this,n);let v="unknown-page",S=c.getSeverity(v);if(S&&o.childNodes.some(({type:w})=>w==="template")&&a.push(B(o,m,v,"template-in-link",S)),v="url-encoding",S=c.getSeverity(v),S&&h){const w=B(o,m,v,"unnecessary-encoding",S);(p||x)&&(w.fix=dn(w,o)),a.push(w)}if(v="pipe-like",S=c.getSeverity(v,"link"),S&&(d==="link"||d==="category")){const w=u==null?void 0:u.childNodes.findIndex(A=>A.type==="text"&&A.data.includes("|")),y=u==null?void 0:u.childNodes[w];if(y){const A=B(u,m,v,"pipe-in-link",S);if(p){const k=A.startIndex+u.getRelativeIndex(w);A.suggestions=[pn(k,y.data)]}a.push(A)}}if(v="no-ignored",S=c.getSeverity(v,"fragment"),S&&g!==void 0&&!or(d)){const w=B(o,m,v,"useless-fragment",S);if(p||x){const y=o.childNodes.findIndex(k=>k.type==="text"&&k.data.includes("#")),A=o.childNodes[y];A&&(w.fix=H(w,o.getRelativeIndex(y)+A.data.indexOf("#")))}a.push(w)}return a}}getTitle(n,l){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:l,temporary:n,decode:!0,selfLink:!0})}print(){return super.print(f(this,e)?{pre:"[[",post:"]]",sep:f(this,t)}:{sep:f(this,t)})}json(n,l=this.getAbsoluteIndex()){}},e=new WeakMap,t=new WeakMap,s=new WeakMap,i),Hs=te(ur),Be=Z(Hs,0,"LinkBaseToken",ar,Be),Y(Hs,1,Be)}}),dr,Ds,hr,$e,it=C({"src/nowiki/base.ts"(){"use strict";Re(),q(),dr=[Ne],$e=class extends(hr=E){get innerText(){return this.firstChild.data}constructor(e="",t,s){super(e,t,s)}},Ds=te(hr),$e=Z(Ds,0,"NowikiBaseToken",dr,$e),Y(Ds,1,$e)}}),cr,Gs,gr,we,wt=C({"src/nowiki/noinclude.ts"(){"use strict";et(),it(),cr=[ze()],we=class extends(gr=$e){get type(){return"noinclude"}toString(e){return e?"":super.toString()}},Gs=te(gr),we=Z(Gs,0,"NoincludeToken",cr,we),Y(Gs,1,we)}}),eo,su=C({"src/link/redirectTarget.ts"(){"use strict";M(),j(),_s(),wt(),eo=class extends Be{get type(){return"redirect-target"}constructor(e,t,s,i){super(e,void 0,s,i),t!==void 0&&this.insertAt(new we(t,s,i))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0,page:""})}lint(e=this.getAbsoluteIndex()){{const t=super.lint(e,!1),s="no-ignored",{lintConfig:i}=I,r=i.getSeverity(s,"redirect");if(r&&this.length===2){const n=B(this.lastChild,{start:e},s,"useless-link-text",r);n.startIndex--,n.startCol--,(i.computeEditInfo||i.fix)&&(n.fix=H(n)),t.push(n)}return t}}}}}),pr,Vs,fr,Et,iu=C({"src/redirect.ts"(){"use strict";var e,t,s;et(),Re(),q(),tt(),su(),pr=[ze(!1,!1),Ne],Et=(s=class extends(fr=E){constructor(r,n,l,a,o,u,d=[]){super(void 0,u,d);N(this,e);N(this,t);L(this,e,r),L(this,t,o),this.append(new Ue(n,"redirect-syntax",u,d),new eo(l,a==null?void 0:a.slice(1),u,d))}get type(){return"redirect"}getAttribute(r){return r==="padding"?f(this,e).length:super.getAttribute(r)}toString(r){return f(this,e)+super.toString(r)+f(this,t)}lint(r=this.getAbsoluteIndex()){{const n=r+f(this,e).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",n),this.lastChild.lint(n)}}print(){return super.print({pre:f(this,e),post:f(this,t)})}},e=new WeakMap,t=new WeakMap,s),Vs=te(fr),Et=Z(Vs,0,"RedirectToken",pr,Et),Y(Vs,1,Et)}}),to={};ie(to,{parseRedirect:()=>so});var so,nu=C({"parser/redirect.ts"(){"use strict";j(),iu(),so=(e,t,s)=>{var r;(r=t.regexRedirect)!=null||(t.regexRedirect=new RegExp(String.raw`^(\s*)((?:${t.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));const i=t.regexRedirect.exec(e);return i&&I.normalizeTitle(i[3],0,!1,t,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid?(e=`\0${s.length}o${e.slice(i[0].length)}`,new Et(...i.slice(1),t,s),e):!1}}}),mr,Qs,xr,Rt,ru=C({"src/onlyinclude.ts"(){"use strict";He(),Re(),q(),mr=[Ne,Pe("<onlyinclude>")],Rt=class extends(xr=E){get type(){return"onlyinclude"}toString(e){return`<onlyinclude>${super.toString(e)}</onlyinclude>`}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>'})}},Qs=te(xr),Rt=Z(Qs,0,"OnlyincludeToken",mr,Rt),Y(Qs,1,Rt)}}),Qt,$s=C({"mixin/gapped.ts"(){"use strict";Qt=(e=1)=>t=>{class s extends t{getGaps(){return e}}return s}}}),vr,Js,br,Je,xn=C({"src/tagPair/index.ts"(){"use strict";var e,t;$s(),Re(),q(),vr=[Qt(),Ne],Je=(t=class extends(br=E){constructor(i,r,n,l,a,o=[]){super(void 0,a);N(this,e);Ie(this,"closed");Ie(this,"selfClosing");this.setAttribute("name",i.toLowerCase()),L(this,e,[i,l||i]),this.closed=l!=="",this.selfClosing=l===void 0,this.append(r,n);const u=typeof r=="string"?-1:o.indexOf(r);o.splice(u===-1?1/0:u,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(i){const{selfClosing:r,firstChild:n,lastChild:l}=this,[a,o]=f(this,e);return r?`<${a}${n.toString(i)}/>`:`<${a}${n.toString(i)}>${l.toString(i)}${this.closed?`</${o}>`:""}`}text(){const[i,r]=f(this,e);return this.selfClosing?`<${i}${this.firstChild.text()}/>`:`<${i}${super.text(">")}${this.closed?`</${r}>`:""}`}getAttribute(i){return i==="padding"?f(this,e)[0].length+1:super.getAttribute(i)}print(){const[i,r]=f(this,e);return super.print(this.selfClosing?{pre:`&lt;${i}`,post:"/&gt;"}:{pre:`&lt;${i}`,sep:"&gt;",post:this.closed?`&lt;/${r}&gt;`:""})}},e=new WeakMap,t),Js=te(br),Je=Z(Js,0,"TagPairToken",vr,Je),Y(Js,1,Je)}}),vn,io=C({"src/tag/index.ts"(){"use strict";var e,t,s,i;M(),Ce(),j(),q(),vn=(i=class extends E{constructor(n,l,a,o,u){super(void 0,o,u);N(this,e);N(this,t);N(this,s);this.insertAt(l),L(this,e,a),L(this,t,n)}get closing(){return f(this,e)}toString(n){return`<${f(this,e)?"/":""}${f(this,t)}${super.toString(n)}${this.selfClosing?"/":""}>`}text(n=""){const{closing:l}=this;return`<${l&&!n?"/":""}${f(this,t)}${l?"":super.text()}${n}>`}getAttribute(n){return n==="padding"?f(this,t).length+(f(this,e)?2:1):super.getAttribute(n)}findMatchingTag(){return Xe(f(this,s),()=>{const{type:n,name:l,parentNode:a,closing:o,selfClosing:u}=this;let d=!1,h=!1;if(n==="html"){const{html:[,v,S]}=this.getAttribute("config");d=S.includes(l),h=v.includes(l)}if(d||h&&u)return this;if(!a)return;const{childNodes:g}=a,c=g.indexOf(this),p=o?g.slice(0,c).reverse():g.slice(c+1),x=[this],{rev:m}=me;for(const v of p)if(!(!v.is(n)||n==="html"&&(v.name!==l||h&&v.selfClosing)))if(f(v,e)===o){if(n==="tvar")return;x.push(v)}else{const S=x.pop();if(S===this)return v;I.viewOnly&&(L(S,s,[m,v]),L(v,s,[m,S]))}if(I.viewOnly)for(const v of x)L(v,s,[m,void 0])},n=>{L(this,s,n),n[1]&&n[1]!==this&&L(n[1],s,[me.rev,this])})}print(){return super.print({pre:`&lt;${f(this,e)?"/":""}${f(this,t)}`,post:`${this.selfClosing?"/":""}&gt;`})}json(n,l=this.getAbsoluteIndex()){}},e=new WeakMap,t=new WeakMap,s=new WeakMap,i)}}),yr,Xs,wr,qe,lu=C({"src/tag/tvar.ts"(){"use strict";et(),io(),tt(),yr=[ze()],qe=class extends(wr=vn){get type(){return"tvar"}constructor(e,t,s,i,r){const n=new Ue(t,"tvar-name",i,r);super(e,n,s,i,r)}},Xs=te(wr),qe=Z(Xs,0,"TvarToken",yr,qe),Y(Xs,1,qe)}}),no,ou=C({"src/tagPair/translate.ts"(){"use strict";var e,ro,s;q(),xn(),tt(),lu(),no=(s=class extends Je{constructor(r,n,l,a=[]){const o=new Ue(r,"translate-attr",l,a);n=n==null?void 0:n.replace(/<tvar(\|[^>]+)>([\s\S]*?)<\/>/gu,(d,h,g)=>(new qe("tvar",h,!1,l,a),new qe("","",!0,l,a),`\0${a.length-2}n${g}\0${a.length}n`)).replace(/<(tvar)(\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\3|[^"'\s>]+))?\s*)>([\s\S]*?)<\/(tvar)(\s*)>/giu,(d,h,g,c,p,x,m)=>(new qe(h,g,!1,l,a),new qe(x,m,!0,l,a),`\0${a.length-2}n${p}\0${a.length}n`));const u=new E(n,l,a);u.type="translate-inner";super("translate",o,u,"translate",l,a);N(this,e);this.seal("closed",!0),this.seal("selfClosing",!0)}get type(){return"translate"}toString(r){return r?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext">&lt;translate${P(this,e,ro).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}&gt;${this.lastChild.print({class:"ext-inner"})}&lt;/translate&gt;</span>`}},e=new WeakSet,ro=function(){return this.firstChild.toString()===" nowrap"},s)}}),Sr,Ks,Ar,Pt,au=C({"src/tagPair/include.ts"(){"use strict";M(),ae(),et(),j(),xn(),Sr=[ze(!1)],Pt=class extends(Ar=Je){get type(){return"include"}constructor(e,t="",s,i,r,n){super(e,t,s!=null?s:"",s===void 0||i!=null?i:"",r,n)}toString(e){return e?"":super.toString()}lint(e=this.getAbsoluteIndex()){{const t=[],{firstChild:s,closed:i,name:r}=this,n=new re(this,e),l=["no-ignored","unclosed-comment"],{lintConfig:a}=I,{computeEditInfo:o}=a,u=l.map(d=>a.getSeverity(d,"include"));if(u[0]&&s.data.trim()){const d=B(s,n,l[0],"useless-attribute",u[0]);o&&(d.suggestions=[H(d)]),t.push(d)}if(u[1]&&!i){const d=z(this,n,l[1],I.msg("unclosed",`<${r}>`),u[1]);o&&(d.suggestions=[Me(d.endIndex,`</${r}>`)]),t.push(d)}return t}}},Ks=te(Ar),Pt=Z(Ks,0,"IncludeToken",Sr,Pt),Y(Ks,1,Pt)}}),Ts,bn=C({"mixin/attributesParent.ts"(){"use strict";Ts=(e=0)=>t=>{var s,lo;{class r extends t{constructor(){super(...arguments);N(this,s)}hasAttr(a){this.lspError("AttributesParent.hasAttr")}getAttr(a){return P(this,s,lo).call(this).getAttr(a)}}return s=new WeakSet,lo=function(){return this.childNodes[e]},r}}}}),ne,Ys,Zs,Tt,es,ei,Ct,ti,si,ii,ts,ni,ri,li,Ae,oo,ao,uo,ho,uu=C({"util/sharable.ts"(){"use strict";ne=new Set(["align"]),Ys=new Set(["cite"]),Zs=new Set(["cite","datetime"]),Tt=new Set(["width"]),es=new Set(["axis","align","bgcolor","height","width","valign"]),ei=new Set([...es,"abbr","headers","scope","rowspan","colspan"]),Ct=new Set(["type"]),ti=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),si=new Set(["clear"]),ii=new Set(["bgcolor","align","valign"]),ts=new Set(["qid","forcemathmode","type","display"]),ni=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),ri=new Set(["weight"]),li=new Set(["width","height","zoom","latitude","longitude","align","mapstyle","lang","alt","text"]),Ae=new Set,oo=new Set(["id","class","style","lang","dir","title","tabindex","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-level","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),ao={div:ne,h1:ne,h2:ne,h3:ne,h4:ne,h5:ne,h6:ne,blockquote:Ys,q:Ys,p:ne,br:si,pre:Tt,ins:Zs,del:Zs,ul:Ct,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...ti,"border"]),caption:ne,tr:ii,td:ei,th:ei,font:new Set(["size","color","face"]),hr:Tt,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Ct,poem:ne,categorytree:ne,combooption:ne,math:Ae,chem:Ae,ce:Ae,img:new Set(["alt","src","width","height","loading","srcset"])},uo={gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails"]),poem:new Set(["compact"]),categorytree:new Set(["hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline"]),nowiki:Ae,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","follow","dir","details"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:ri,choicetemplate:ri,imagemap:Ae,inputbox:Ae,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Ae,poll:new Set(["id","show-results-before-voting"]),score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),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"]),math:new Set([...ts,"chem"]),chem:ts,ce:ts,hiero:Ae,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:ni,syntaxhighlight:ni,templatedata:Ae,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:Ae,mapframe:new Set([...li,"frameless"]),maplink:new Set([...li,"class"]),rss:new Set(["template","templatename","max","highlight","filter","filterout","reverse","date","item-max-length"]),"page-collection":new Set(["lang","name","description","end-date"])},ho={table:ti,td:new Set([...es,"scope"]),th:es,br:si,caption:ne,div:ne,hr:Tt,h1:ne,h2:ne,h3:ne,h4:ne,h5:ne,h6:ne,li:Ct,p:ne,pre:Tt,tr:ii,ul:Ct}}}),kr,_r,$r,Tr,ds,du=C({"src/attribute.ts"(){"use strict";var e,t,s,i,r,co,Yi,a;M(),de(),Ee(),uu(),ae(),j(),q(),st(),kr=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,_r=/(?:^|\s|\*\/)(?:javascript|vbscript)(?:\W|$)/iu,$r=new Set(["ext","arg","magic-word","template"]),Tr=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),ds=(a=class extends E{constructor(u,d,h,g="",c,p=[],x=I.getConfig(),m=[]){const v=new Te(h,"attr-key",x,m);let S;if(h==="title"||d==="img"&&h==="alt")S=new E(c,x,m,{}),S.type="attr-value",S.setAttribute("stage",pe-1);else if(d==="gallery"&&h==="caption"||d==="ref"&&h==="details"||(d==="mapframe"||d==="maplink")&&h==="text"||d==="choose"&&(h==="before"||h==="after")){const w=Fe(ce({},x),{excludes:[...x.excludes,"heading","html","table","hr","list"]});S=new E(c,w,m,{}),S.type="attr-value",S.setAttribute("stage",1)}else S=new Te(c,"attr-value",x,m,{});super(void 0,x,m);N(this,r);N(this,e);N(this,t);N(this,s);N(this,i);L(this,e,u),this.append(v,S),L(this,s,g),L(this,i,[...p]),L(this,t,d),this.setAttribute("name",xt(fe(h)))}get type(){return f(this,e)}get tag(){return f(this,t)}get balanced(){return!f(this,s)||f(this,i)[0]===f(this,i)[1]}afterBuild(){f(this,s).includes("\0")&&L(this,s,this.buildFromStr(f(this,s),0)),this.parentNode&&L(this,t,this.parentNode.name),P(this,r,co).call(this),super.afterBuild()}toString(u){const[d="",h=""]=f(this,i);return f(this,s)?super.toString(u,f(this,s)+d)+h:this.firstChild.toString(u)}text(){return f(this,s)?`${super.text(`${f(this,s).trim()}"`)}"`:this.firstChild.text()}getGaps(){var u,d;return f(this,s)?f(this,s).length+((d=(u=f(this,i)[0])==null?void 0:u.length)!=null?d:0):0}lint(u=this.getAbsoluteIndex(),d){var h;{const g=super.lint(u,d),{balanced:c,firstChild:p,lastChild:x,name:m,tag:v}=this,S=new re(this,u),w=["unclosed-quote","obsolete-attr"],{lintConfig:y}=I,A=w.map($=>y.getSeverity($,m));if(A[0]&&!c){const $=B(x,S,w[0],"unclosed-quotes",A[0]);$.startIndex--,$.startCol--,y.computeEditInfo&&($.suggestions=[Me($.endIndex,f(this,i)[0])]),g.push($)}const k=P(this,r,Yi).call(this,u,S);return k&&g.push(k),A[1]&&((h=ho[v])!=null&&h.has(m))&&g.push(B(p,S,w[1],"obsolete-attribute",A[1])),g}}getValue(){return f(this,s)?this.lastChild.text().trim():this.type==="ext-attr"||""}escape(){}getAttribute(u){return u==="invalid"?P(this,r,Yi).call(this):super.getAttribute(u)}print(){const[u="",d=""]=f(this,i);return f(this,s)?super.print({sep:Ht(f(this,s))+u,post:d}):super.print()}json(u,d=this.getAbsoluteIndex()){}},e=new WeakMap,t=new WeakMap,s=new WeakMap,i=new WeakMap,r=new WeakSet,co=function(){this.setAttribute("name",xt(this.firstChild.text()))},Yi=function(u,d){const{firstChild:h,lastChild:g,type:c,name:p,tag:x,parentNode:m}=this,v=!g.childNodes.some(({type:_})=>$r.has(_)),S=this.getValue(),w=uo[x],y=ao[x],{length:A}=this.toString();let k="illegal-attr",$,b;if({lintConfig:$}=I,{computeEditInfo:b}=$,!(w!=null&&w.has(p))&&!(y!=null&&y.has(p))&&(c==="ext-attr"?w||y:!/\{\{[^{]+\}\}/u.test(p))&&(c==="ext-attr"&&!y||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(p)&&(x==="meta"||x==="link"||!oo.has(p)))||(p==="itemtype"||p==="itemid"||p==="itemref")&&!(m!=null&&m.hasAttr("itemscope"))){if(u===void 0)return!0;{const _=$.getSeverity(k,"unknown");if(_){const T=B(h,d,k,"illegal-attribute-name",_);return b&&(T.suggestions=[H(u,A)]),T}}}else if(p==="style"&&typeof S=="string"&&kr.test(S)){if(u===void 0)return!0;{k="insecure-style";const _=$.getSeverity(k);return _&&B(g,d,k,"insecure-style",_)}}else if(p==="tabindex"&&typeof S=="string"&&S!=="0"){if(u===void 0)return!0;{const _=$.getSeverity(k,"tabindex");if(_){const T=B(g,d,k,"nonzero-tabindex",_);return b&&(T.suggestions=[H(u,A),_e(T,"0 tabindex","0")]),T}}}else if(typeof S=="string"&&((/^xmlns:[\w:.-]+$/u.test(p)||Tr.has(p))&&_r.test(S)||v&&(p==="href"||x==="img"&&p==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(S))){if(u===void 0)return!0;{const _=$.getSeverity(k,"value");return _&&B(g,d,k,"illegal-attribute-value",_)}}else if(v&&c!=="ext-attr"){const _=Vl(x,p),T=String(S).toLowerCase();if(_.length>0&&_.every(F=>F!==T)){if(u===void 0)return!0;{const F=$.getSeverity(k,"value");return F&&B(g,d,k,"illegal-attribute-value",F)}}}return!1},a)}}),oi,Cr,Ir,Cs,yn=C({"src/attributes.ts"(){"use strict";var e,t,hs,i;M(),de(),ae(),j(),q(),st(),du(),oi=r=>r.slice(0,-1),Cr=r=>`${oi(r)}-dirty`,Ir=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch(r){return/[^\W_]/u}})(),Cs=(i=class extends E{constructor(n,l,a,o,u=[]){super(void 0,o,u,{});N(this,t);N(this,e);if(L(this,e,l),this.setAttribute("name",a),n){const d=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu;let h="",g=d.exec(n),c=0;const p=(()=>{h&&(super.insertAt(new Te(h,Cr(l),o,u,{})),h="")});for(;g;){const{index:x,0:m,1:v,2:S,3:w,4:y,5:A,6:k}=g;if(h+=n.slice(c,x),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(fe(v).trim())){const $=y!=null?y:k,b=[w,A],_=new ds(oi(l),a,v,S,$,b,o,u);p(),super.insertAt(_)}else h+=m;({lastIndex:c}=d),g=d.exec(n)}h+=n.slice(c),p()}}get type(){return f(this,e)}afterBuild(){const{parentNode:n}=this;n!=null&&n.is("td")&&this.setAttribute("name",n.subtype),super.afterBuild()}getAttrTokens(n){return this.childNodes.filter(l=>l instanceof ds&&(!n||l.name===xt(n)))}hasAttr(n){return this.getAttrTokens(n).length>0}getAttrToken(n){{const l=this.getAttrTokens(n);return l[l.length-1]}}getAttr(n){var l;return(l=this.getAttrToken(n))==null?void 0:l.getValue()}lint(n=this.getAbsoluteIndex(),l){{const a=super.lint(n,l),{parentNode:o,childNodes:u}=this,d=new Map,h=new Set,g=new re(this,n),c=["no-ignored","no-duplicate"],{lintConfig:p}=I,{computeEditInfo:x,fix:m}=p,v=["closingTag","invalidAttributes","nonWordAttributes"].map(w=>p.getSeverity(c[0],w));if(v[0]&&P(this,t,hs).call(this)){const w=z(this,g,c[0],"attributes-of-closing-tag",v[0]);if(x){const y=o.getAbsoluteIndex();w.suggestions=[H(w),hn(y)]}a.push(w)}for(const w of u)if(w instanceof ds){const{name:y}=w;d.has(y)?(h.add(y),d.get(y).push(w)):d.set(y,[w])}else{const y=w.text().trim(),A=v[Ir.test(y)?1:2];if(y&&A){const k=B(w,g,c[0],"invalid-attribute",A);x&&(k.suggestions=[H(k,0," ")]),a.push(k)}}const S=p.getSeverity(c[1],"attribute");if(S&&h.size>0)for(const w of h){const y=d.get(w).map(A=>{const k=A.getValue();return[A,k===!0?"":k]});Array.prototype.push.apply(a,y.map(([A,k],$)=>{const b=B(A,g,c[1],I.msg("duplicate-attribute",w),S);if(x||m){const _=H(b);!k||y.slice(0,$).some(([,T])=>T===k)?b.fix=_:x&&(b.suggestions=[_])}return b}))}return a}}getAttribute(n){return n==="invalid"?P(this,t,hs).call(this):super.getAttribute(n)}print(){return this.toString()?`<span class="wpb-${this.type}${P(this,t,hs).call(this)?" wpb-invalid":""}">${this.childNodes.map(n=>n.print(n instanceof Te?{class:n.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}},e=new WeakMap,t=new WeakSet,hs=function(){const{parentNode:n}=this;return(n==null?void 0:n.type)==="html"&&n.closing&&this.text().trim()!==""},i)}}),go={};ie(go,{PreToken:()=>po});var po,hu=C({"src/pre.ts"(){"use strict";Ee(),q(),wt(),po=class extends E{get type(){return"ext-inner"}constructor(e,t,s=[]){if(e){const i=/<nowiki>/giu,r=/<\/nowiki>/giu,{length:n}=i.source;let l=i.exec(e);l&&(r.lastIndex=l.index+n);let a=r.exec(e),o=0,u="";for(;l&&a;)new we(l[0],t,s,!0),new we(a[0],t,s,!0),u+=`${e.slice(o,l.index)}\0${s.length-1}n${e.slice(l.index+n,a.index)}\0${s.length}n`,o=a.index+n+1,i.lastIndex=o,l=i.exec(e),l&&(r.lastIndex=l.index+n),a=r.exec(e);e=u+e.slice(o)}super(e,t,s,{}),this.setAttribute("stage",pe-1)}isPlain(){return!0}lint(e=this.getAbsoluteIndex()){return super.lint(e,/<\s*\/\s*(pre)\b/giu)}}}}),Is,wn=C({"src/multiLine/index.ts"(){"use strict";q(),Is=class extends E{get type(){return"ext-inner"}toString(e){return super.toString(e,`
1
+ "use strict";(()=>{var qa=Object.defineProperty,Wa=Object.defineProperties;var za=Object.getOwnPropertyDescriptors;var Yt=Object.getOwnPropertySymbols;var jr=Object.prototype.hasOwnProperty,Br=Object.prototype.propertyIsEnumerable;var qr=e=>{throw TypeError(e)};var qs=(e,t,s)=>t in e?qa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,ge=(e,t)=>{for(var s in t||(t={}))jr.call(t,s)&&qs(e,s,t[s]);if(Yt)for(var s of Yt(t))Br.call(t,s)&&qs(e,s,t[s]);return e},je=(e,t)=>Wa(e,za(t));var Wr=(e,t)=>{var s={};for(var i in e)jr.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(e!=null&&Yt)for(var i of Yt(e))t.indexOf(i)<0&&Br.call(e,i)&&(s[i]=e[i]);return s};var Ma=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Le=(e,t,s)=>qs(e,typeof t!="symbol"?t+"":t,s),Ws=(e,t,s)=>t.has(e)||qr("Cannot "+s);var f=(e,t,s)=>(Ws(e,t,"read from private field"),s?s.call(e):t.get(e)),N=(e,t,s)=>t.has(e)?qr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),L=(e,t,s,i)=>(Ws(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),P=(e,t,s)=>(Ws(e,t,"access private method"),s);var zr=(e,t,s,i)=>({set _(n){L(e,t,n,s)},get _(){return f(e,t,i)}});var Ju=Ma((Ku,Ba)=>{var jl=Object.create,et=Object.defineProperty,Bl=Object.getOwnPropertyDescriptor,or=Object.getOwnPropertyNames,Ua=Object.getPrototypeOf,Da=Object.prototype.hasOwnProperty,ql=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),St=e=>{throw TypeError(e)},Wl=(e,t,s)=>t in e?et(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Mr=(e,t)=>et(e,"name",{value:t,configurable:!0}),C=(e,t)=>function(){return e&&(t=(0,e[or(e)[0]])(e=0)),t},zl=(e,t)=>function(){return t||(0,e[or(e)[0]])((t={exports:{}}).exports,t),t.exports},ie=(e,t)=>{for(var s in t)et(e,s,{get:t[s],enumerable:!0})},Ml=(e,t,s,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of or(t))!Da.call(e,n)&&n!==s&&et(e,n,{get:()=>t[n],enumerable:!(i=Bl(t,n))||i.enumerable});return e},Ha=(e,t,s)=>(s=e!=null?jl(Ua(e)):{},Ml(t||!e||!e.__esModule?et(s,"default",{value:e,enumerable:!0}):s,e)),K=e=>Ml(et({},"__esModule",{value:!0}),e),se=e=>{var t;return[,,,jl((t=e==null?void 0:e[ql("metadata")])!=null?t:null)]},Ul=["class","method","getter","setter","accessor","field","value","get","set"],Ft=e=>e!==void 0&&typeof e!="function"?St("Function expected"):e,Ga=(e,t,s,i,n)=>({kind:Ul[e],name:t,metadata:i,addInitializer:r=>s._?St("Already initialized"):n.push(Ft(r||null))}),ar=(e,t)=>Wl(t,ql("metadata"),e[3]),Z=(e,t,s,i)=>{for(var n=0,r=e[t>>1],l=r&&r.length;n<l;n++)t&1?r[n].call(s):i=r[n].call(s,i);return i},ee=(e,t,s,i,n,r)=>{var l,o,a,u,h,d=t&7,g=!!(t&8),c=!!(t&16),p=d>3?e.length+1:d?g?1:2:0,x=Ul[d+5],m=d>3&&(e[p-1]=[]),v=e[p]||(e[p]=[]),w=d&&(!c&&!g&&(n=n.prototype),d<5&&(d>3||!c)&&Bl(d<4?n:{get[s](){return de(this,r)},set[s](y){return be(this,r,y)}},s));d?c&&d<4&&Mr(r,(d>2?"set ":d>1?"get ":"")+s):Mr(n,s);for(var S=i.length-1;S>=0;S--)u=Ga(d,s,a={},e[3],v),d&&(u.static=g,u.private=c,h=u.access={has:c?y=>Qa(n,y):y=>s in y},d^3&&(h.get=c?y=>(d^1?de:Qi)(y,n,d^4?r:w.get):y=>y[s]),d>2&&(h.set=c?(y,A)=>be(y,n,A,d^4?r:w.set):(y,A)=>y[s]=A)),o=(0,i[S])(d?d<4?c?r:w[x]:d>4?void 0:{get:w.get,set:w.set}:n,u),a._=1,d^4||o===void 0?Ft(o)&&(d>4?m.unshift(o):d?c?r=o:w[x]=o:n=o):typeof o!="object"||o===null?St("Object expected"):(Ft(l=o.get)&&(w.get=l),Ft(l=o.set)&&(w.set=l),Ft(l=o.init)&&m.unshift(l));return d||ar(e,n),w&&et(n,s,w),c?d^4?r:w:n},Va=(e,t,s)=>Wl(e,typeof t!="symbol"?t+"":t,s),ur=(e,t,s)=>t.has(e)||St("Cannot "+s),Qa=(e,t)=>Object(t)!==t?St('Cannot use the "in" operator on this value'):e.has(t),de=(e,t,s)=>(ur(e,t,"read from private field"),s?s.call(e):t.get(e)),ze=(e,t,s)=>t.has(e)?St("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),be=(e,t,s,i)=>(ur(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),Qi=(e,t,s)=>(ur(e,t,"access private method"),s),Ja=(e,t,s,i)=>({set _(n){be(e,t,n,s)},get _(){return de(e,t,i)}}),Dl,bs,Hl=C({"base.ts"(){"use strict";Dl=(()=>{const e={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11,"list-range":11};return Object.setPrototypeOf(e,null),e})(),bs=(()=>{const e=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","invalid-url","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","syntax-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(e),e})()}});function ye(e,t,s){return s===1?e.replace(/\0(\d+)g\x7F/gu,(i,n)=>ye(String(t[n]),t,2)):s===2?e.replace(/\0(\d+)n\x7F/gu,(i,n)=>String(t[n])):e.replace(/\0(\d+)\x7F/gu,(i,n)=>t[n])}var De,zs,xt,vt,bt,ot,Gl,fe,tt,Ur,Dr,ys,Vl,Hr,Gr,Gt,yt,ce=C({"util/string.ts"(){"use strict";De=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,zs=String.raw`[^[\]<>"\0-\x1F\x7F${De}\uFFFD]`,xt=String.raw`(?:\[[\da-f:.]+\]|${zs})`,vt=String.raw`(?:${zs}|\0\d+[cn!~]\x7F)*`,bt=e=>e.trim().toLowerCase(),ot=(e,t)=>s=>s.replace(e,t),Gl=ot(/[\0\x7F]|\r$/gmu,""),fe=ot(/\0\d+[cn]\x7F/gu,""),tt=(e,t="")=>e.map(s=>typeof s=="string"?s:s.text()).join(t),Ur={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Dr=ot(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(e,t,s)=>t?String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t)):Ur[s.toLowerCase()]),ys=e=>Dr(e),Vl=ot(/&#(\d+|x[\da-f]+);/giu,(e,t)=>String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t))),Hr={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Gr=e=>ot(e,t=>`&${Hr[t]};`),Gt=Gr(/[&<>]/gu),yt=(e,t={})=>{const{pre:s="",post:i="",sep:n=""}=t;return s+e.map(r=>r.print()).join(n)+i}}}),Xa=zl({"config/minimum.json"(e,t){t.exports={ext:[],html:[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link"]],namespaces:{0:"",6:"File",10:"Template",14:"Category",828:"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},functionHook:["msgnw"],variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{msgnw:"msgnw",pageid:"pageid",articlepath:"articlepath",server:"server",servername:"servername",scriptpath:"scriptpath",stylepath:"stylepath","#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#related":"related","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#rmatch":"rmatch","#rreplace":"rreplace","#replace":"replace","#rsplit":"rsplit","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#translation":"translation","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"lst","#section-x":"lstx","#section-h":"lsth","#statements":"statements","#useliquidthreads":"useliquidthreads","#lqtpagelimit":"lqtpagelimit","#avatar":"avatar","#img":"img","#chart":"chart"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#contentmodel":"contentmodel","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}}}),pe,Ql,Ji,Be=C({"util/constants.ts"(){"use strict";pe=11,Ql=void 0,Ji=Xa()}});function mt(e){const t=new Map,s=new WeakMap;return i=>{const n=typeof i=="string"?t:s;if(n.has(i)){const l=n.get(i);return l.lastIndex=0,l}const r=e(i);return n.set(i,r),r}}var Vt,st=C({"../common/dist/index.mjs"(){"use strict";Vt=e=>decodeURIComponent(e.replace(/%(?![\da-f]{2})/giu,"%25"))}}),ne,he=C({"lib/rect.ts"(){"use strict";var e,t,s,i,Xi,r;ne=(r=class{constructor(l,o){N(this,i);N(this,e);N(this,t);N(this,s);L(this,e,l),L(this,t,o)}get start(){return f(this,t)}get top(){return P(this,i,Xi).call(this).top}get left(){return P(this,i,Xi).call(this).left}},e=new WeakMap,t=new WeakMap,s=new WeakMap,i=new WeakSet,Xi=function(){var l;return(l=f(this,s))!=null||L(this,s,f(this,e).getRootNode().posFromIndex(f(this,t))),f(this,s)},r)}}),Vr,Qr,Ht,Ki,Ms,B,M,$e,_s,G,hr,He,dr,cr,gr,Qt,wt,pr,Ze,Jl,W=C({"util/lint.ts"(){"use strict";st(),Ie(),he(),O(),Vr=new Set(["tr","td","th","caption"]),Qr=new Set(["Template:!!","Template:!-"]),Ht=e=>{const t=e.childNodes.find(s=>s.text().trim());if(!t||t.type==="text"&&t.data.trim().startsWith("!")||t.is("magic-word")&&t.name==="!"||t.is("template")&&Qr.has(t.name)||t.is("html")&&Vr.has(t.name))return!1;if(t.is("arg"))return t.length>1&&Ht(t.childNodes[1]);if(t.is("magic-word"))try{const s=t.getPossibleValues().map(Ht);return s.includes(2)?2:s.includes(1)&&1}catch(s){}return t.is("template")||t.is("magic-word")&&t.name==="invoke"?1:2},Ki=(e,t,s,i)=>({line:e+s-1,character:(s===1?t:0)+i}),Ms=e=>(t,s,i,n,r="error")=>{const{start:l}=s,{top:o,left:a}=s instanceof ne?s:new ne(t,l),{offsetHeight:u,offsetWidth:h}=t,{startIndex:d,startLine:g,startCol:c}=e(t,l,o,a),{line:p,character:x}=Ki(g,c,u,h);return{rule:i,message:I.msg(n),severity:r,startIndex:d,endIndex:d+t.toString().length,startLine:g,endLine:p,startCol:c,endCol:x}},B=Ms((e,t,s,i)=>{const n=e.getRelativeIndex(),{top:r,left:l}=e.parentNode.posFromIndex(n);return{startIndex:t+n,startLine:s+r,startCol:r?l:i+l}}),M=Ms((e,t,s,i)=>({startIndex:t,startLine:s,startCol:i})),$e=(e,t,s,i=0)=>({desc:I.msg(t),range:[e.startIndex+i,e.endIndex],text:s}),_s=(e,t,s)=>({desc:I.msg(t),range:[e,e],text:s}),G=(e,t=0,s="")=>typeof e=="number"?{desc:I.msg("remove"),range:[e,e+t],text:s}:$e(e,"remove",s,t),hr=(e,t)=>$e(e,"decode",Vt(t.text().replace(/%(?=21|3[ce]|5[bd]|7[b-d])/giu,"%25"))),He=(e,t,s=0)=>({desc:I.msg("close"),range:[e+s,e],text:t}),dr=e=>({desc:I.msg("open"),range:[e+1,e+2],text:""}),cr=(e,t)=>$e(e,"comment",`<!--${t}-->`),gr=(e,t)=>$e(e,"uppercase",t.toUpperCase()),Qt=(e,t=0)=>({desc:I.msg("whitespace"),range:[e,e+t],text:" "}),wt=(e,t,s=1)=>({desc:I.msg("escape"),range:[e,e+s],text:t.repeat(s)}),pr=(e,t)=>({desc:I.msg("escape"),range:[e,e+t.length],text:t.replace(/\|/gu,"&#124;")}),Ze=(e,t,s,i)=>{if(e&&(i||I.viewOnly&&e[0]===xe.rev))return e[1];const n=t();return(i||I.viewOnly)&&s([xe.rev,n]),n},Jl=(e,t)=>e==="ol"&&t==="type"?["1","a","A","i","I"]:e==="th"&&t==="scope"?["row","col","rowgroup","colgroup"]:t==="dir"?["ltr","rtl","auto"]:t==="aria-hidden"?["true","false"]:[]}}),Jr,fr,Xl=C({"parser/selector.ts"(){"use strict";Jr=e=>{if(e.includes("#")){const t=e.indexOf("#"),s=e.slice(0,t),i=e.slice(t+1);return(n,r)=>(t===0||n===s)&&r===i}return e?t=>t===e:()=>!0},fr=(e,t,s)=>{const i=e.split(",").map(n=>Jr(n.trim()));return(({type:n,name:r})=>i.some(l=>l(n,r)))}}}),Ka=zl({"../node_modules/binary-search/index.js"(e,t){t.exports=function(s,i,n,r,l){var o,a;if(r===void 0)r=0;else if(r=r|0,r<0||r>=s.length)throw new RangeError("invalid lower bound");if(l===void 0)l=s.length-1;else if(l=l|0,l<r||l>=s.length)throw new RangeError("invalid upper bound");for(;r<=l;)if(o=r+(l-r>>>1),a=+n(s[o],i,o,s),a<0)r=o+1;else if(a>0)l=o-1;else return o;return~r}}}),Xr,Kl,Ya=C({"util/search.ts"(){"use strict";Xr=Ha(Ka()),Kl=(e,t,s)=>{const i=(0,Xr.default)(e,t,s);return i<0?~i:i}}}),$s,mr=C({"mixin/cached.ts"(){"use strict";W(),$s=(e=!0)=>t=>{const s=new WeakMap;return function(...i){return Ze(s.get(this),()=>t.apply(this,i),n=>{s.set(this,n)},e)}}}}),Yl,Za=C({"mixin/nodeLike.ts"(){"use strict";Yl=e=>{class t extends e{get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get offsetHeight(){return this.getDimension().height}get offsetWidth(){return this.getDimension().width}}return t}}}),Kr,Yr,Zt,kt,_t,es,$t,Tt,Ct,Ke,Zl=C({"lib/node.ts"(){"use strict";Ya(),W(),Ie(),mr(),Za(),O(),Yr=[Yl],Kr=[$s(!1)],Ke=class{constructor(){Z(Ct,5,this),Va(this,"childNodes",[]),ze(this,Zt),ze(this,kt),ze(this,_t),ze(this,es),ze(this,$t),ze(this,Tt,{})}get parentNode(){return de(this,Zt)}get nextSibling(){return de(this,kt)}get previousSibling(){return de(this,_t)}getChildNodes(){const{childNodes:e}=this;return Object.isFrozen(e)?[...e]:e}getAttribute(e){return e==="padding"?0:this[e]}setAttribute(e,t){switch(e){case"parentNode":be(this,Zt,t),t||(be(this,kt,void 0),be(this,_t,void 0));break;case"nextSibling":be(this,kt,t);break;case"previousSibling":be(this,_t,t);break;case"aIndex":I.viewOnly&&be(this,$t,[xe.rev,t]);break;default:this[e]=t}}getRootNode(){return Ze(de(this,es),()=>{var e,t;return(t=(e=this.parentNode)==null?void 0:e.getRootNode())!=null?t:this},e=>{const[,t]=e;t.type==="root"&&be(this,es,e)})}indexFromPos(e,t){this.lspError("AstNode.indexFromPos")}posFromIndex(e){{const{length:t}=String(this);if(e+=e<0?t:0,e>=0&&e<=t){const s=this.getLines(),i=Kl(s,e,([,,n],r)=>n-r);return{top:i,left:e-s[i][1]}}return}}getDimension(){{const e=this.getLines(),t=e[e.length-1];return{height:e.length,width:t[2]-t[1]}}}getGaps(e){return 0}getRelativeIndex(e){if(e===void 0){const{parentNode:t}=this;return t?t.getRelativeIndex(t.childNodes.indexOf(this)):0}return Ze(de(this,Tt)[e],()=>{const{childNodes:t}=this,s=e+(e<0?t.length:0);let i=this.getAttribute("padding");for(let n=0;n<s;n++)I.viewOnly&&(de(this,Tt)[n]=[xe.rev,i]),i+=t[n].toString().length+this.getGaps(n);return i},t=>{de(this,Tt)[e]=t})}getAbsoluteIndex(){return Ze(de(this,$t),()=>{const{parentNode:e}=this;return e?e.getAbsoluteIndex()+this.getRelativeIndex():0},e=>{be(this,$t,e)})}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(e){return this.type===e}getLines(){{const e=[];let t=0;for(const s of String(this).split(`
2
+ `)){const i=t+s.length;e.push([s,t,i]),t=i+1}return e}}seal(e,t){const s=!t&&!!this[e];Object.defineProperty(this,e,{enumerable:s,configurable:!0})}lspError(e){throw new Error(`${e} method is only available in the LSP version!`)}},Ct=se(null),Zt=new WeakMap,kt=new WeakMap,_t=new WeakMap,es=new WeakMap,$t=new WeakMap,Tt=new WeakMap,ee(Ct,1,"getLines",Kr,Ke),Ke=ee(Ct,0,"AstNode",Yr,Ke),Z(Ct,1,Ke)}}),eo,eu=C({"mixin/elementLike.ts"(){"use strict";Xl(),eo=e=>{var t,Yi;{class i extends e{constructor(){super(...arguments);N(this,t)}getElementBy(l){const o=[...this.childNodes].reverse();for(;o.length>0;){const a=o.pop(),{type:u,childNodes:h}=a;if(u!=="text"){if(l(a))return a;for(let d=h.length-1;d>=0;d--)o.push(h[d])}}}querySelector(l){return this.getElementBy(P(this,t,Yi).call(this,l))}getElementsBy(l){const o=[...this.childNodes].reverse(),a=[];for(;o.length>0;){const u=o.pop(),{type:h,childNodes:d}=u;if(h!=="text"){l(u)&&a.push(u);for(let g=d.length-1;g>=0;g--)o.push(d[g])}}return a}querySelectorAll(l){return this.getElementsBy(P(this,t,Yi).call(this,l))}escape(){}}return t=new WeakSet,Yi=function(l){return fr(l,this)},i}}}}),Zr,Us,en,Rt,tu=C({"lib/element.ts"(){"use strict";ce(),Ie(),Xl(),Zl(),eu(),Zr=[eo],Rt=class extends(en=Ke){get length(){return this.childNodes.length}text(e){return tt(this.childNodes,e)}normalize(){const e=this.getChildNodes(),t=s=>{var i,n;e.splice(s,1),(i=e[s-1])==null||i.setAttribute("nextSibling",e[s]),(n=e[s])==null||n.setAttribute("previousSibling",e[s-1])};for(let s=e.length-1;s>=0;s--){const{type:i,data:n}=e[s];i!=="text"||e.length===1||this.getGaps(s-(s&&1))||n===""&&t(s)}this.setAttribute("childNodes",e)}removeAt(e){this.lspError("AstElement.removeAt")}insertAt(e,t=this.length){return Er(this,t,0,[e]),e}closest(e){const t=fr(e,this);let{parentNode:s}=this;for(;s;){if(t(s))return s;({parentNode:s}=s)}}append(...e){this.safeAppend(e)}safeAppend(e){for(const t of e)this.insertAt(t)}safeReplaceChildren(e){}setText(e,t=0){t+=t<0?this.length:0;const s=this.childNodes[t],{data:i}=s;return s.replaceData(e),i}toString(e,t=""){return this.childNodes.map(s=>s.toString(e)).join(t)}caretPositionFromIndex(e){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(e){this.lspError("AstElement.elementFromIndex")}elementFromPoint(e,t){this.lspError("AstElement.elementFromPoint")}lint(e=this.getAbsoluteIndex(),t){{const s=[];for(let i=0,n=e+this.getAttribute("padding");i<this.length;i++){const r=this.childNodes[i];r.setAttribute("aIndex",n);const l=r.lint(n,t);l.length>0&&Array.prototype.push.apply(s,l),n+=r.toString().length+this.getGaps(i)}return s}}print(e={}){const t=e.class;return this.toString()?(t===""?"":`<span class="wpb-${t!=null?t:this.type}${this.getAttribute("invalid")?" wpb-invalid":""}">`)+yt(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){}},Us=se(en),Rt=ee(Us,0,"AstElement",Zr,Rt),Z(Us,1,Rt)}}),ts,Ds,tn,sn,rn,nn,Hs,ln,Zi,su=C({"lib/text.ts"(){"use strict";var e,to,s;ce(),W(),O(),Zl(),ts=String.raw`[${De}\t]*`,Ds=String.raw`<(?:/[^\S\n]*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|\n={2,}`,tn=new RegExp(String.raw`${Ds}|https?[:/]/+|(?:rfc|pmid)(?=[-::]?${ts}\d)|isbn(?=[-::]?${ts}(?:\d(?:${ts}|-)){6})`,"giu"),sn=new RegExp(Ds,"giu"),rn=new Set(["attr-value","ext-link-text","link-text"]),nn={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Hs=new Set(["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"]),ln=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch(i){return/\w/u}})(),Zi=(s=class extends Ke{constructor(n){super();N(this,e);Le(this,"data","");this.data=n}get type(){return"text"}toString(n){var r;return n&&!((r=this.parentNode)!=null&&r.getAttribute("built"))?fe(this.data):this.data}text(){return this.data}lint(n=this.getAbsoluteIndex(),r){var l,o,a;{if(r===!1)return[];const{data:u,parentNode:h,nextSibling:d,previousSibling:g}=this;if(!h)throw new Error("An isolated text node cannot be linted!");const{type:c,parentNode:p}=h;if(c==="attr-value"){const{name:j,tag:X}=p;if(X==="ref"&&(j==="name"||j==="follow")||j==="group"&&(X==="ref"||X==="references")||X==="choose"&&(j==="before"||j==="after"))return[]}if(r!=null||(r=h.isPlain()&&!rn.has(c)?tn:sn),u.search(r)===-1)return[];r.lastIndex=0;const x=[],m=d==null?void 0:d.type,v=d==null?void 0:d.name,w=g==null?void 0:g.type,S=this.getRootNode(),y=S.toString(),{ext:A,html:k,variants:$}=S.getAttribute("config"),{top:b,left:_}=S.posFromIndex(n),{lintConfig:T}=I,E=T.rules["tag-like"],R=typeof E=="object"&&E[1]?new Set(Object.keys(E[1]).filter(j=>j!=="invalid"&&j!=="disallowed")):new Set,z=new Set(["onlyinclude","noinclude","includeonly",...A,...k[0],...k[1],...k[2],...R,...T.getSeverity("tag-like","disallowed")?Hs:[]]);for(let j=r.exec(u);j;j=r.exec(u)){const[,X,ae]=j;let{index:Q,0:U}=j;if(ae&&ae!=="]"){const{length:oe}=ae;Q+=oe,U=U.slice(oe)}else U.startsWith(`
3
+ ==`)&&(Q++,U=U.slice(1));U=U.toLowerCase();const[D]=U,Se=D==="r"||D==="p"||D==="i",Fe=D==="{",V=D==="}",Y=D==="[",J=D==="]";let{length:te}=U;if(D==="<"&&!z.has(X.toLowerCase())||Y&&c==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(u.slice(Q+1))||d!=null&&d.is("ext")&&v==="nowiki"&&((l=d.innerText)!=null&&l.includes("]"))))continue;J&&(Q||te>1)&&r.lastIndex--;let ue=n+Q,le=ue+te,H,me,Re,Pe;const Ne=y[le],Ps=y[ue-1],Os=Fe||Y,js=Fe&&Ps==="-"&&$.length>0,Bs=V&&Ne==="-"&&$.length>0,Fr=Y&&m==="free-ext-link"&&!u.slice(Q+1).trim()||J&&w==="free-ext-link"&&!u.slice(0,Q).includes("]");if(Se)H="lonely-http",U=U.toUpperCase(),me=T.getSeverity(H,U);else if(D==="<"){H="tag-like";let oe;/^<\/?\s/u.test(U)||!/[\s/>]/u.test(Ne!=null?Ne:"")?oe="invalid":R.has(X)?oe=X:Hs.has(X)&&!A.includes(X)&&(oe="disallowed"),me=T.getSeverity(H,oe)}else if(D==="=")H="syntax-like",me=T.getSeverity(H,"heading");else if(js||Bs)H="lonely-bracket",me=T.getSeverity(H,"converter"),js&&Q>0?(U="-{",Q--,ue--,te=2):Bs&&Q<u.length-1&&(U="}-",le++,te=2);else if(Fr)H="lonely-bracket",me=T.getSeverity(H,"extLink");else if(Os||V||J)if(H="lonely-bracket",te>1||Fe&&Ne===D||V&&Ps===D)me=T.getSeverity(H,"double");else{if(!Y||c!=="ext-link-text"){const oe=nn[D],ve=Os?u.slice(Q+1):u.slice(0,Q);if(Fe&&((o=oe.exec(ve))==null?void 0:o[0])==="}"||V&&((a=oe.exec(ve))==null?void 0:a[0])==="{")continue;if(!ve.includes(D)){const Oe=Os?"nextSibling":"previousSibling";let Ae=this[Oe];for(;Ae&&(Ae.type!=="text"||!oe.test(Ae.data));)Ae=Ae[Oe];if(Ae&&oe.exec(Ae.data)[0]!==D)continue}}me=T.getSeverity(H,"single")}else H="lonely-http",me=T.getSeverity(H);if(!me)continue;const Rr=this.posFromIndex(Q),{line:Pr,character:Or}=Ki(b,_,Rr.top+1,Rr.left);if(D==="="){const oe=u.indexOf(`
4
+ `,Q);let ve=d,Oe;if(oe===-1){let Ae=0;for(;ve&&!(ve.type==="text"&&(Ae=ve.data.indexOf(`
5
+ `),Ae!==-1));)ve=ve.nextSibling;if(!ve)continue;Oe=ve.data.slice(0,Ae)}else Oe=u.slice(Q+te,oe);if(!/(?:^|[^=])=+\s*(?:\S\s*)?$/u.test(Oe))continue;oe===-1?(le=ve.getAbsoluteIndex()+Oe.length,{top:Re,left:Pe}=S.posFromIndex(le)):(le+=Oe.length,te+=Oe.length)}const Je={rule:H,message:I.msg(D==="="?"header-like":"lonely",Se||D==="h"||js||Bs?U:D),severity:me,startIndex:ue,endIndex:le,startLine:Pr,endLine:Re!=null?Re:Pr,startCol:Or,endCol:Pe!=null?Pe:Or+te};if(T.computeEditInfo)if(D==="<")Je.suggestions=[wt(ue,"&lt;")];else if(D==="h"&&c!=="link-text"&&ln.test(Ps||""))Je.suggestions=[Qt(ue)];else if(Y&&c==="ext-link-text"){const oe=h.getAbsoluteIndex()+h.toString().length;Je.suggestions=[wt(oe,"&#93;")]}else if(J&&Fr){const oe=n-g.toString().length;Je.suggestions=[_s(oe,"left-bracket","[")]}else Se&&(Je.suggestions=[...j[0]===U?[]:[gr(Je,U)],...Ne===":"||Ne===":"?[Qt(le,1)]:[]]);x.push(Je)}return x}}replaceData(n){P(this,e,to).call(this,n)}splitText(n){this.lspError("AstText.splitText")}escape(){}print(){return Gt(this.data)}},e=new WeakSet,to=function(n){this.setAttribute("data",n)},s)}}),Ge,it=C({"mixin/hidden.ts"(){"use strict";Ge=(e=!0,t=!0)=>s=>{class i extends s{text(){return""}lint(r){return e?[]:super.lint(r)}}return i}}}),Ee,qe=C({"mixin/noEscape.ts"(){"use strict";Ee=e=>{}}}),Ve,rt=C({"src/syntax.ts"(){"use strict";var e,t;q(),Ve=(t=class extends F{constructor(i,n,r,l,o){super(i,r,l,o);N(this,e);L(this,e,n)}get type(){return f(this,e)}lint(i=this.getAbsoluteIndex()){return super.lint(i,!1)}},e=new WeakMap,t)}}),We,Qe=C({"mixin/padded.ts"(){"use strict";We=({length:e})=>t=>{class s extends t{getAttribute(n){return n==="padding"?e:super.getAttribute(n)}}return s}}}),Ce,nt=C({"src/atom.ts"(){"use strict";var e,t;q(),Ce=(t=class extends F{constructor(i,n,r,l,o){super(i,r,l,o);N(this,e);L(this,e,n)}get type(){return f(this,e)}set type(i){L(this,e,i)}getAttribute(i){var n;return i==="invalid"?this.type==="converter-flag"&&!!((n=this.parentNode)!=null&&n.isInvalidFlag(this)):super.getAttribute(i)}},e=new WeakMap,t)}}),on,an,Gs,un,Me,Ts=C({"src/link/base.ts"(){"use strict";var e,t,s,i;W(),Be(),he(),Qe(),qe(),O(),q(),nt(),on=n=>n==="redirect-target"||n==="link",an=[Ee,We("[[")],Me=(i=class extends(un=F){constructor(r,l,o,a=[],u="|"){super(void 0,o,a,{});N(this,e,!0);N(this,t);N(this,s);if(this.insertAt(new Ce(r,"link-target",o,a,{})),l!==void 0){const h=new F(l,o,a,{});h.type="link-text",h.setAttribute("stage",pe-1),this.insertAt(h)}L(this,t,u)}get link(){}get fragment(){}afterBuild(){L(this,s,this.getTitle()),f(this,t).includes("\0")&&L(this,t,this.buildFromStr(f(this,t),0)),this.setAttribute("name",f(this,s).title),super.afterBuild()}setAttribute(r,l){r==="bracket"?L(this,e,l):r==="title"?L(this,s,l):super.setAttribute(r,l)}toString(r){const l=super.toString(r,f(this,t));return f(this,e)?`[[${l}]]`:l}text(){const r=super.text("|");return f(this,e)?`[[${r}]]`:r}getAttribute(r){return r==="title"?f(this,s):super.getAttribute(r)}getGaps(r){return r===0?f(this,t).length:1}lint(r=this.getAbsoluteIndex(),l){{const o=super.lint(r,l),{childNodes:[a,u],type:h}=this,{encoded:d,fragment:g}=f(this,s),{lintConfig:c}=I,{computeEditInfo:p,fix:x}=c,m=new ne(this,r);let v="unknown-page",w=c.getSeverity(v);if(w&&a.childNodes.some(({type:S})=>S==="template")&&o.push(B(a,m,v,"template-in-link",w)),v="url-encoding",w=c.getSeverity(v),w&&d){const S=B(a,m,v,"unnecessary-encoding",w);(p||x)&&(S.fix=hr(S,a)),o.push(S)}if(v="pipe-like",w=c.getSeverity(v,"link"),w&&(h==="link"||h==="category")){const S=u==null?void 0:u.childNodes.findIndex(A=>A.type==="text"&&A.data.includes("|")),y=u==null?void 0:u.childNodes[S];if(y){const A=B(u,m,v,"pipe-in-link",w);if(p){const k=A.startIndex+u.getRelativeIndex(S);A.suggestions=[pr(k,y.data)]}o.push(A)}}if(v="no-ignored",w=c.getSeverity(v,"fragment"),w&&g!==void 0&&!on(h)){const S=B(a,m,v,"useless-fragment",w);if(p||x){const y=a.childNodes.findIndex(k=>k.type==="text"&&k.data.includes("#")),A=a.childNodes[y];A&&(S.fix=G(S,a.getRelativeIndex(y)+A.data.indexOf("#")))}o.push(S)}return o}}getTitle(r,l){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:l,temporary:r,decode:!0,selfLink:!0})}print(){return super.print(f(this,e)?{pre:"[[",post:"]]",sep:f(this,t)}:{sep:f(this,t)})}json(r,l=this.getAbsoluteIndex()){}},e=new WeakMap,t=new WeakMap,s=new WeakMap,i),Gs=se(un),Me=ee(Gs,0,"LinkBaseToken",an,Me),Z(Gs,1,Me)}}),hn,Vs,dn,Te,lt=C({"src/nowiki/base.ts"(){"use strict";qe(),q(),hn=[Ee],Te=class extends(dn=F){get innerText(){return this.firstChild.data}constructor(e="",t,s){super(e,t,s)}},Vs=se(dn),Te=ee(Vs,0,"NowikiBaseToken",hn,Te),Z(Vs,1,Te)}}),cn,Qs,gn,we,At=C({"src/nowiki/noinclude.ts"(){"use strict";W(),it(),O(),lt(),cn=[Ge(!1)],we=class extends(gn=Te){get type(){return"noinclude"}toString(e){return e?"":super.toString()}lint(e=this.getAbsoluteIndex()){{const{lintConfig:t}=I,s="no-ignored",i=t.getSeverity(s,"include");if(i){const{innerText:n}=this,r=/^<(noinclude|includeonly|onlyinclude)\s+(?:[^\s>/]|\/(?!>))[^>]*>$/iu.exec(n);if(r){const l=M(this,{start:e},s,"useless-attribute",i),{computeEditInfo:o}=t,a=r[1].length+1,u=n.endsWith("/>")?2:1;return l.startIndex+=a,l.startCol+=a,l.endIndex-=u,l.endCol-=u,o&&(l.suggestions=[G(l)]),[l]}}return[]}}},Qs=se(gn),we=ee(Qs,0,"NoincludeToken",cn,we),Z(Qs,1,we)}}),so,iu=C({"src/link/redirectTarget.ts"(){"use strict";W(),O(),Ts(),At(),so=class extends Me{get type(){return"redirect-target"}constructor(e,t,s,i){super(e,void 0,s,i),t!==void 0&&this.insertAt(new we(t,s,i))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0,page:""})}lint(e=this.getAbsoluteIndex()){{const t=super.lint(e,!1),s="no-ignored",{lintConfig:i}=I,n=i.getSeverity(s,"redirect");if(n&&this.length===2){const r=B(this.lastChild,{start:e},s,"useless-link-text",n);r.startIndex--,r.startCol--,(i.computeEditInfo||i.fix)&&(r.fix=G(r)),t.push(r)}return t}}}}}),pn,Js,fn,Pt,ru=C({"src/redirect.ts"(){"use strict";var e,t,s;it(),qe(),q(),rt(),iu(),pn=[Ge(!1,!1),Ee],Pt=(s=class extends(fn=F){constructor(n,r,l,o,a,u,h=[]){super(void 0,u,h);N(this,e);N(this,t);L(this,e,n),L(this,t,a),this.append(new Ve(r,"redirect-syntax",u,h),new so(l,o==null?void 0:o.slice(1),u,h))}get type(){return"redirect"}getAttribute(n){return n==="padding"?f(this,e).length:super.getAttribute(n)}toString(n){return f(this,e)+super.toString(n)+f(this,t)}lint(n=this.getAbsoluteIndex()){{const r=n+f(this,e).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",r),this.lastChild.lint(r)}}print(){return super.print({pre:f(this,e),post:f(this,t)})}},e=new WeakMap,t=new WeakMap,s),Js=se(fn),Pt=ee(Js,0,"RedirectToken",pn,Pt),Z(Js,1,Pt)}}),io={};ie(io,{parseRedirect:()=>ro});var ro,nu=C({"parser/redirect.ts"(){"use strict";O(),ru(),ro=(e,t,s)=>{var n;(n=t.regexRedirect)!=null||(t.regexRedirect=new RegExp(String.raw`^(\s*)((?:${t.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));const i=t.regexRedirect.exec(e);return i&&I.normalizeTitle(i[3],0,!1,t,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid?(e=`\0${s.length}o${e.slice(i[0].length)}`,new Pt(...i.slice(1),t,s),e):!1}}}),mn,Xs,xn,Ot,lu=C({"src/onlyinclude.ts"(){"use strict";Qe(),qe(),q(),mn=[Ee,We("<onlyinclude>")],Ot=class extends(xn=F){get type(){return"onlyinclude"}toString(e){return`<onlyinclude>${super.toString(e)}</onlyinclude>`}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>'})}},Xs=se(xn),Ot=ee(Xs,0,"OnlyincludeToken",mn,Ot),Z(Xs,1,Ot)}}),Xt,Cs=C({"mixin/gapped.ts"(){"use strict";Xt=(e=1)=>t=>{class s extends t{getGaps(){return e}}return s}}}),vn,Ks,bn,Ye,xr=C({"src/tagPair/index.ts"(){"use strict";var e,t;Cs(),qe(),q(),vn=[Xt(),Ee],Ye=(t=class extends(bn=F){constructor(i,n,r,l,o,a=[]){super(void 0,o);N(this,e);Le(this,"closed");Le(this,"selfClosing");this.setAttribute("name",i.toLowerCase()),L(this,e,[i,l||i]),this.closed=l!=="",this.selfClosing=l===void 0,this.append(n,r);const u=typeof n=="string"?-1:a.indexOf(n);a.splice(u===-1?1/0:u,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(i){const{selfClosing:n,firstChild:r,lastChild:l}=this,[o,a]=f(this,e);return n?`<${o}${r.toString(i)}/>`:`<${o}${r.toString(i)}>${l.toString(i)}${this.closed?`</${a}>`:""}`}text(){const[i,n]=f(this,e);return this.selfClosing?`<${i}${this.firstChild.text()}/>`:`<${i}${super.text(">")}${this.closed?`</${n}>`:""}`}getAttribute(i){return i==="padding"?f(this,e)[0].length+1:super.getAttribute(i)}print(){const[i,n]=f(this,e);return super.print(this.selfClosing?{pre:`&lt;${i}`,post:"/&gt;"}:{pre:`&lt;${i}`,sep:"&gt;",post:this.closed?`&lt;/${n}&gt;`:""})}},e=new WeakMap,t),Ks=se(bn),Ye=ee(Ks,0,"TagPairToken",vn,Ye),Z(Ks,1,Ye)}}),vr,no=C({"src/tag/index.ts"(){"use strict";var e,t,s,i;W(),Ie(),O(),q(),vr=(i=class extends F{constructor(r,l,o,a,u){super(void 0,a,u);N(this,e);N(this,t);N(this,s);this.insertAt(l),L(this,e,o),L(this,t,r)}get closing(){return f(this,e)}toString(r){return`<${f(this,e)?"/":""}${f(this,t)}${super.toString(r)}${this.selfClosing?"/":""}>`}text(r=""){const{closing:l}=this;return`<${l&&!r?"/":""}${f(this,t)}${l?"":super.text()}${r}>`}getAttribute(r){return r==="padding"?f(this,t).length+(f(this,e)?2:1):super.getAttribute(r)}findMatchingTag(){return Ze(f(this,s),()=>{const{type:r,name:l,parentNode:o,closing:a,selfClosing:u}=this;let h=!1,d=!1;if(r==="html"){const{html:[,v,w]}=this.getAttribute("config");h=w.includes(l),d=v.includes(l)}if(h||d&&u)return this;if(!o)return;const{childNodes:g}=o,c=g.indexOf(this),p=a?g.slice(0,c).reverse():g.slice(c+1),x=[this],{rev:m}=xe;for(const v of p)if(!(!v.is(r)||r==="html"&&(v.name!==l||d&&v.selfClosing)))if(f(v,e)===a){if(r==="tvar")return;x.push(v)}else{const w=x.pop();if(w===this)return v;I.viewOnly&&(L(w,s,[m,v]),L(v,s,[m,w]))}if(I.viewOnly)for(const v of x)L(v,s,[m,void 0])},r=>{L(this,s,r),r[1]&&r[1]!==this&&L(r[1],s,[xe.rev,this])})}print(){return super.print({pre:`&lt;${f(this,e)?"/":""}${f(this,t)}`,post:`${this.selfClosing?"/":""}&gt;`})}json(r,l=this.getAbsoluteIndex()){}},e=new WeakMap,t=new WeakMap,s=new WeakMap,i)}}),yn,Ys,wn,Ue,ou=C({"src/tag/tvar.ts"(){"use strict";it(),no(),rt(),yn=[Ge()],Ue=class extends(wn=vr){get type(){return"tvar"}constructor(e,t,s,i,n){const r=new Ve(t,"tvar-name",i,n);super(e,r,s,i,n)}},Ys=se(wn),Ue=ee(Ys,0,"TvarToken",yn,Ue),Z(Ys,1,Ue)}}),lo,au=C({"src/tagPair/translate.ts"(){"use strict";var e,oo,s;q(),xr(),rt(),ou(),lo=(s=class extends Ye{constructor(n,r,l,o=[]){const a=new Ve(n,"translate-attr",l,o);r=r==null?void 0:r.replace(/<tvar(\|[^>]+)>([\s\S]*?)<\/>/gu,(h,d,g)=>(new Ue("tvar",d,!1,l,o),new Ue("","",!0,l,o),`\0${o.length-2}n${g}\0${o.length}n`)).replace(/<(tvar)(\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\3|[^"'\s>]+))?\s*)>([\s\S]*?)<\/(tvar)(\s*)>/giu,(h,d,g,c,p,x,m)=>(new Ue(d,g,!1,l,o),new Ue(x,m,!0,l,o),`\0${o.length-2}n${p}\0${o.length}n`));const u=new F(r,l,o);u.type="translate-inner";super("translate",a,u,"translate",l,o);N(this,e);this.seal("closed",!0),this.seal("selfClosing",!0)}get type(){return"translate"}toString(n){return n?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext">&lt;translate${P(this,e,oo).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}&gt;${this.lastChild.print({class:"ext-inner"})}&lt;/translate&gt;</span>`}},e=new WeakSet,oo=function(){return this.firstChild.toString()===" nowrap"},s)}}),Sn,Zs,An,jt,uu=C({"src/tagPair/include.ts"(){"use strict";W(),he(),it(),O(),xr(),Sn=[Ge(!1)],jt=class extends(An=Ye){get type(){return"include"}constructor(e,t="",s,i,n,r){super(e,t,s!=null?s:"",s===void 0||i!=null?i:"",n,r)}toString(e){return e?"":super.toString()}lint(e=this.getAbsoluteIndex()){{const t=[],{firstChild:s,closed:i,name:n}=this,r=new ne(this,e),l=["no-ignored","unclosed-comment"],{lintConfig:o}=I,{computeEditInfo:a}=o,u=l.map(h=>o.getSeverity(h,"include"));if(u[0]&&s.data.trim()){const h=B(s,r,l[0],"useless-attribute",u[0]);a&&(h.suggestions=[G(h)]),t.push(h)}if(u[1]&&!i){const h=M(this,r,l[1],I.msg("unclosed",`<${n}>`),u[1]);a&&(h.suggestions=[He(h.endIndex,`</${n}>`)]),t.push(h)}return t}}},Zs=se(An),jt=ee(Zs,0,"IncludeToken",Sn,jt),Z(Zs,1,jt)}}),Is,br=C({"mixin/attributesParent.ts"(){"use strict";Is=(e=0)=>t=>{var s,ao;{class n extends t{constructor(){super(...arguments);N(this,s)}hasAttr(o){this.lspError("AttributesParent.hasAttr")}getAttr(o){return P(this,s,ao).call(this).getAttr(o)}}return s=new WeakSet,ao=function(){return this.childNodes[e]},n}}}}),re,ei,ti,It,ss,si,Nt,ii,ri,ni,is,li,oi,ai,ke,uo,ho,co,go,hu=C({"util/sharable.ts"(){"use strict";re=new Set(["align"]),ei=new Set(["cite"]),ti=new Set(["cite","datetime"]),It=new Set(["width"]),ss=new Set(["axis","align","bgcolor","height","width","valign"]),si=new Set([...ss,"abbr","headers","scope","rowspan","colspan"]),Nt=new Set(["type"]),ii=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),ri=new Set(["clear"]),ni=new Set(["bgcolor","align","valign"]),is=new Set(["qid","forcemathmode","type","display"]),li=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),oi=new Set(["weight"]),ai=new Set(["width","height","zoom","latitude","longitude","align","mapstyle","lang","alt","text"]),ke=new Set,uo=new Set(["id","class","style","lang","dir","title","tabindex","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-level","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),ho={div:re,h1:re,h2:re,h3:re,h4:re,h5:re,h6:re,blockquote:ei,q:ei,p:re,br:ri,pre:It,ins:ti,del:ti,ul:Nt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...ii,"border"]),caption:re,tr:ni,td:si,th:si,font:new Set(["size","color","face"]),hr:It,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Nt,poem:re,categorytree:re,combooption:re,math:ke,chem:ke,ce:ke,img:new Set(["alt","src","width","height","loading","srcset"])},co={gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails"]),poem:new Set(["compact"]),categorytree:new Set(["hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline"]),nowiki:ke,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","follow","dir","details"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:oi,choicetemplate:oi,imagemap:ke,inputbox:ke,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:ke,poll:new Set(["id","show-results-before-voting"]),score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),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"]),math:new Set([...is,"chem"]),chem:is,ce:is,hiero:ke,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:li,syntaxhighlight:li,templatedata:ke,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:ke,mapframe:new Set([...ai,"frameless"]),maplink:new Set([...ai,"class"]),rss:new Set(["template","templatename","max","highlight","filter","filterout","reverse","date","item-max-length"]),"page-collection":new Set(["lang","name","description","end-date"])},go={table:ii,td:new Set([...ss,"scope"]),th:ss,br:ri,caption:re,div:re,hr:It,h1:re,h2:re,h3:re,h4:re,h5:re,h6:re,li:Nt,p:re,pre:It,tr:ni,ul:Nt}}}),kn,_n,$n,Tn,cs,du=C({"src/attribute.ts"(){"use strict";var e,t,s,i,n,po,er,o;W(),ce(),Be(),hu(),he(),O(),q(),nt(),kn=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,_n=/(?:^|\s|\*\/)(?:javascript|vbscript)(?:\W|$)/iu,$n=new Set(["ext","arg","magic-word","template"]),Tn=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),cs=(o=class extends F{constructor(u,h,d,g="",c,p=[],x=I.getConfig(),m=[]){const v=new Ce(d,"attr-key",x,m);let w;if(d==="title"||h==="img"&&d==="alt")w=new F(c,x,m,{}),w.type="attr-value",w.setAttribute("stage",pe-1);else if(h==="gallery"&&d==="caption"||h==="ref"&&d==="details"||(h==="mapframe"||h==="maplink")&&d==="text"||h==="choose"&&(d==="before"||d==="after")){const S=je(ge({},x),{excludes:[...x.excludes,"heading","html","table","hr","list"]});w=new F(c,S,m,{}),w.type="attr-value",w.setAttribute("stage",1)}else w=new Ce(c,"attr-value",x,m,{});super(void 0,x,m);N(this,n);N(this,e);N(this,t);N(this,s);N(this,i);L(this,e,u),this.append(v,w),L(this,s,g),L(this,i,[...p]),L(this,t,h),this.setAttribute("name",bt(fe(d)))}get type(){return f(this,e)}get tag(){return f(this,t)}get balanced(){return!f(this,s)||f(this,i)[0]===f(this,i)[1]}afterBuild(){f(this,s).includes("\0")&&L(this,s,this.buildFromStr(f(this,s),0)),this.parentNode&&L(this,t,this.parentNode.name),P(this,n,po).call(this),super.afterBuild()}toString(u){const[h="",d=""]=f(this,i);return f(this,s)?super.toString(u,f(this,s)+h)+d:this.firstChild.toString(u)}text(){return f(this,s)?`${super.text(`${f(this,s).trim()}"`)}"`:this.firstChild.text()}getGaps(){var u,h;return f(this,s)?f(this,s).length+((h=(u=f(this,i)[0])==null?void 0:u.length)!=null?h:0):0}lint(u=this.getAbsoluteIndex(),h){var d;{const g=super.lint(u,h),{balanced:c,firstChild:p,lastChild:x,name:m,tag:v}=this,w=new ne(this,u),S=["unclosed-quote","obsolete-attr"],{lintConfig:y}=I,A=S.map($=>y.getSeverity($,m));if(A[0]&&!c){const $=B(x,w,S[0],"unclosed-quotes",A[0]);$.startIndex--,$.startCol--,y.computeEditInfo&&($.suggestions=[He($.endIndex,f(this,i)[0])]),g.push($)}const k=P(this,n,er).call(this,u,w);return k&&g.push(k),A[1]&&((d=go[v])!=null&&d.has(m))&&g.push(B(p,w,S[1],"obsolete-attribute",A[1])),g}}getValue(){return f(this,s)?this.lastChild.text().trim():this.type==="ext-attr"||""}escape(){}getAttribute(u){return u==="invalid"?P(this,n,er).call(this):super.getAttribute(u)}print(){const[u="",h=""]=f(this,i);return f(this,s)?super.print({sep:Gt(f(this,s))+u,post:h}):super.print()}json(u,h=this.getAbsoluteIndex()){}},e=new WeakMap,t=new WeakMap,s=new WeakMap,i=new WeakMap,n=new WeakSet,po=function(){this.setAttribute("name",bt(this.firstChild.text()))},er=function(u,h){const{firstChild:d,lastChild:g,type:c,name:p,tag:x,parentNode:m}=this,v=!g.childNodes.some(({type:_})=>$n.has(_)),w=this.getValue(),S=co[x],y=ho[x],{length:A}=this.toString();let k="illegal-attr",$,b;if({lintConfig:$}=I,{computeEditInfo:b}=$,!(S!=null&&S.has(p))&&!(y!=null&&y.has(p))&&(c==="ext-attr"?S||y:!/\{\{[^{]+\}\}/u.test(p))&&(c==="ext-attr"&&!y||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(p)&&(x==="meta"||x==="link"||!uo.has(p)))||(p==="itemtype"||p==="itemid"||p==="itemref")&&!(m!=null&&m.hasAttr("itemscope"))){if(u===void 0)return!0;{const _=$.getSeverity(k,"unknown");if(_){const T=B(d,h,k,"illegal-attribute-name",_);return b&&(T.suggestions=[G(u,A)]),T}}}else if(p==="style"&&typeof w=="string"&&kn.test(w)){if(u===void 0)return!0;{k="insecure-style";const _=$.getSeverity(k);return _&&B(g,h,k,"insecure-style",_)}}else if(p==="tabindex"&&typeof w=="string"&&w!=="0"){if(u===void 0)return!0;{const _=$.getSeverity(k,"tabindex");if(_){const T=B(g,h,k,"nonzero-tabindex",_);return b&&(T.suggestions=[G(u,A),$e(T,"0 tabindex","0")]),T}}}else if(typeof w=="string"&&((/^xmlns:[\w:.-]+$/u.test(p)||Tn.has(p))&&_n.test(w)||v&&(p==="href"||x==="img"&&p==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(w))){if(u===void 0)return!0;{const _=$.getSeverity(k,"value");return _&&B(g,h,k,"illegal-attribute-value",_)}}else if(v&&c!=="ext-attr"){const _=Jl(x,p),T=String(w).toLowerCase();if(_.length>0&&_.every(E=>E!==T)){if(u===void 0)return!0;{const E=$.getSeverity(k,"value");return E&&B(g,h,k,"illegal-attribute-value",E)}}}return!1},o)}}),ui,Cn,In,Ns,yr=C({"src/attributes.ts"(){"use strict";var e,t,gs,i;W(),ce(),he(),O(),q(),nt(),du(),ui=n=>n.slice(0,-1),Cn=n=>`${ui(n)}-dirty`,In=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch(n){return/[^\W_]/u}})(),Ns=(i=class extends F{constructor(r,l,o,a,u=[]){super(void 0,a,u,{});N(this,t);N(this,e);if(L(this,e,l),this.setAttribute("name",o),r){const h=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu;let d="",g=h.exec(r),c=0;const p=(()=>{d&&(super.insertAt(new Ce(d,Cn(l),a,u,{})),d="")});for(;g;){const{index:x,0:m,1:v,2:w,3:S,4:y,5:A,6:k}=g;if(d+=r.slice(c,x),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(fe(v).trim())){const $=y!=null?y:k,b=[S,A],_=new cs(ui(l),o,v,w,$,b,a,u);p(),super.insertAt(_)}else d+=m;({lastIndex:c}=h),g=h.exec(r)}d+=r.slice(c),p()}}get type(){return f(this,e)}afterBuild(){const{parentNode:r}=this;r!=null&&r.is("td")&&this.setAttribute("name",r.subtype),super.afterBuild()}getAttrTokens(r){return this.childNodes.filter(l=>l instanceof cs&&(!r||l.name===bt(r)))}hasAttr(r){return this.getAttrTokens(r).length>0}getAttrToken(r){{const l=this.getAttrTokens(r);return l[l.length-1]}}getAttr(r){var l;return(l=this.getAttrToken(r))==null?void 0:l.getValue()}lint(r=this.getAbsoluteIndex(),l){{const o=super.lint(r,l),{parentNode:a,childNodes:u}=this,h=new Map,d=new Set,g=new ne(this,r),c=["no-ignored","no-duplicate"],{lintConfig:p}=I,{computeEditInfo:x,fix:m}=p,v=["closingTag","invalidAttributes","nonWordAttributes"].map(S=>p.getSeverity(c[0],S));if(v[0]&&P(this,t,gs).call(this)){const S=M(this,g,c[0],"attributes-of-closing-tag",v[0]);if(x){const y=a.getAbsoluteIndex();S.suggestions=[G(S),dr(y)]}o.push(S)}for(const S of u)if(S instanceof cs){const{name:y}=S;h.has(y)?(d.add(y),h.get(y).push(S)):h.set(y,[S])}else{const y=S.text().trim(),A=v[In.test(y)?1:2];if(y&&A){const k=B(S,g,c[0],"invalid-attribute",A);x&&(k.suggestions=[G(k,0," ")]),o.push(k)}}const w=p.getSeverity(c[1],"attribute");if(w&&d.size>0)for(const S of d){const y=h.get(S).map(A=>{const k=A.getValue();return[A,k===!0?"":k]});Array.prototype.push.apply(o,y.map(([A,k],$)=>{const b=B(A,g,c[1],I.msg("duplicate-attribute",S),w);if(x||m){const _=G(b);!k||y.slice(0,$).some(([,T])=>T===k)?b.fix=_:x&&(b.suggestions=[_])}return b}))}return o}}escape(){}getAttribute(r){return r==="invalid"?P(this,t,gs).call(this):super.getAttribute(r)}print(){return this.toString()?`<span class="wpb-${this.type}${P(this,t,gs).call(this)?" wpb-invalid":""}">${this.childNodes.map(r=>r.print(r instanceof Ce?{class:r.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}},e=new WeakMap,t=new WeakSet,gs=function(){const{parentNode:r}=this;return(r==null?void 0:r.type)==="html"&&r.closing&&this.text().trim()!==""},i)}}),fo={};ie(fo,{PreToken:()=>mo});var mo,cu=C({"src/pre.ts"(){"use strict";Be(),q(),At(),mo=class extends F{get type(){return"ext-inner"}constructor(e,t,s=[]){if(e){const i=/<nowiki>/giu,n=/<\/nowiki>/giu,{length:r}=i.source;let l=i.exec(e);l&&(n.lastIndex=l.index+r);let o=n.exec(e),a=0,u="";for(;l&&o;)new we(l[0],t,s,!0),new we(o[0],t,s,!0),u+=`${e.slice(a,l.index)}\0${s.length-1}n${e.slice(l.index+r,o.index)}\0${s.length}n`,a=o.index+r+1,i.lastIndex=a,l=i.exec(e),l&&(n.lastIndex=l.index+r),o=n.exec(e);e=u+e.slice(a)}super(e,t,s,{}),this.setAttribute("stage",pe-1)}isPlain(){return!0}lint(e=this.getAbsoluteIndex()){return super.lint(e,/<\s*\/\s*(pre)\b/giu)}}}}),Ls,wr=C({"src/multiLine/index.ts"(){"use strict";q(),Ls=class extends F{get type(){return"ext-inner"}toString(e){return super.toString(e,`
3
6
  `)}text(){return super.text(`
4
7
  `).replace(/\n\s*\n/gu,`
5
8
  `)}getGaps(){return 1}print(){return super.print({sep:`
6
- `})}}}}),fo,cu=C({"src/paramLine.ts"(){"use strict";q(),fo=class extends E{get type(){return"param-line"}}}}),mo={};ie(mo,{ParamTagToken:()=>Sn});var Sn,xo=C({"src/multiLine/paramTag.ts"(){"use strict";M(),ae(),Ls(),j(),wn(),cu(),Sn=class extends Is{constructor(e,t,s=I.getConfig(),i=[],r){super(void 0,s,i,{}),t&&this.safeAppend(t.split(`
7
- `).map(n=>r?n:Jt(n,s,i,e)).map(n=>new fo(n,s,i,{}))),i.splice(i.indexOf(this),1),i.push(this)}lint(e=this.getAbsoluteIndex()){{const t="no-ignored",{lintConfig:s}=I,i=s.getSeverity(t,this.name);if(!i)return[];const r=new re(this,e),n=I.msg("invalid-parameter",this.name),l=[];for(const a of this.childNodes){a.setAttribute("aIndex",e);const o=a.childNodes.filter(({type:u})=>u!=="comment"&&u!=="include"&&u!=="noinclude");if(o.some(({type:u})=>u==="ext"))l.push(B(a,r,t,n,i));else{const u=o.findIndex(({type:h})=>h!=="text"),d=o.slice(0,u===-1?void 0:u).map(String).join("");if(d&&!(u===-1?/^[a-z]+(?:\[\])?\s*=/iu:/^[a-z]+(?:\[\])?\s*(?:=|$)/iu).test(d)){const h=B(a,r,t,n,i);s.computeEditInfo&&(h.suggestions=[H(h)]),l.push(h)}else{const h=a.lint(e,!1);h.length>0&&Array.prototype.push.apply(l,h)}}e+=a.toString().length+1}return l}}}}}),Nr,ai,Lr,ot,vo=C({"src/heading.ts"(){"use strict";var e,t,cs,i;M(),Ce(),ae(),Re(),j(),q(),tt(),Nr=[Ne],ot=(i=class extends(Lr=E){constructor(n,l,a,o=[]){super(void 0,a,o);N(this,t);N(this,e);L(this,e,n);const u=new E(l[0],a,o);u.type="heading-title",u.setAttribute("stage",2);const d=new Ue(l[1],"heading-trail",a,o);this.append(u,d)}get type(){return"heading"}get level(){return f(this,e)}toString(n){const l=P(this,t,cs).call(this);return l+this.firstChild.toString(n)+l+this.lastChild.toString(n)}text(){const n=P(this,t,cs).call(this);return n+this.firstChild.text()+n}getAttribute(n){return n==="invalid"?this.inHtmlAttrs()===2:n==="padding"?this.level:super.getAttribute(n)}getGaps(){return this.level}lint(n=this.getAbsoluteIndex(),l){{const a=super.lint(n,l),{firstChild:o,level:u}=this,d=o.toString(),h=d.startsWith("="),g=h||d.endsWith("="),c=new re(this,n),p=this.inHtmlAttrs(),x=["h1","unbalanced-header","format-leakage"],{lintConfig:m}=I,{computeEditInfo:v,fix:S}=m,w=x.map(y=>m.getSeverity(y,"apostrophe"));if(w[0]&&this.level===1){const y=B(o,c,x[0],"<h1>",w[0]);v&&!g&&(y.suggestions=[_e(y,"h2",`=${d}=`)]),a.push(y)}if(w[1]&&g){const y=I.msg("unbalanced-in-section-header",'"="'),A=B(o,c,x[1],y,w[1]);if(!(!v||d==="="))if(h){const[k]=/^=+/u.exec(d),$=u+k.length;A.suggestions=[{desc:`h${u}`,range:[A.startIndex,A.startIndex+k.length],text:""}],$<7&&A.suggestions.push({desc:`h${$}`,range:[A.endIndex,A.endIndex],text:k})}else{const k=/[^=](=+)$/u.exec(d)[1],$=u+k.length;A.suggestions=[{desc:`h${u}`,range:[A.endIndex-k.length,A.endIndex],text:""}],$<7&&A.suggestions.push({desc:`h${$}`,range:[A.startIndex,A.startIndex],text:k})}a.push(A)}if(p){const y="parsing-order",A=m.getSeverity(y,p===2?"heading":"templateInTable");A&&a.push(z(this,c,y,"header-in-html",A))}if(w[2]){const y=this.getRootNode().toString(),A=o.childNodes.filter(Fs("quote")),k=A.filter(({bold:b})=>b),$=A.filter(({italic:b})=>b);if(k.length%2){const b=B(k[k.length-1],Fe(ce({},c),{start:n+u,left:c.left+u}),x[2],I.msg("unbalanced-in-section-header","bold-apostrophes"),w[2]);if(v||S){const _=n+u+d.length,T=H(b);y.slice(b.endIndex,_).trim()?v&&(b.suggestions=[T,Me(_,"'''")]):k.length===1&&$.length===0?b.fix=T:v&&(b.suggestions=[T])}a.push(b)}if($.length%2){const b=B($[$.length-1],{start:n+u},x[2],I.msg("unbalanced-in-section-header","italic-apostrophes"),w[2]);if(v||S){const _=n+u+d.length;y.slice(b.endIndex,_).trim()?v&&(b.suggestions=[Me(_,"''")]):$.length===1&&k.length===0?b.fix=H(b):v&&(b.suggestions=[H(b)])}a.push(b)}}return a}}print(){const n=P(this,t,cs).call(this);return super.print({pre:n,sep:n})}json(n,l=this.getAbsoluteIndex()){}},e=new WeakMap,t=new WeakSet,cs=function(){return"=".repeat(this.level)},i),ai=te(Lr),ot=Z(ai,0,"HeadingToken",Nr,ot),Y(ai,1,ot)}}),Fr,bo,gu=C({"src/parameter.ts"(){"use strict";de(),M(),j(),q(),Fr=new RegExp(`https?://${ft}${mt}$`,"iu"),bo=class extends E{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){}constructor(e,t,s,i=[]){super(void 0,s,i);const r=new E(typeof e=="number"?void 0:e,s,i,{}),n=new E(t,s,i);r.type="parameter-key",r.setAttribute("stage",2),n.type="parameter-value",n.setAttribute("stage",2),this.append(r,n)}trimName(e,t=!0){const s=(typeof e=="string"?e:e.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",s),s}afterBuild(){if(!this.anon){const{parentNode:e,firstChild:t}=this,s=this.trimName(t);e&&e.getArgs(s,!1,!1).add(this)}super.afterBuild()}toString(e){return this.anon?this.lastChild.toString(e):super.toString(e,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(e=this.getAbsoluteIndex(),t){var s;{const i=super.lint(e,t),r="unescaped",{lintConfig:n}=I,l=n.getSeverity(r);if(l){const{firstChild:a}=this,o=(s=Fr.exec(a.text()))==null?void 0:s[0];try{if(o&&new URL(o).search){const u=B(a,{start:e},r,"unescaped-query",l);u.startIndex=u.endIndex,u.startLine=u.endLine,u.startCol=u.endCol,u.endIndex++,u.endCol++,(n.computeEditInfo||n.fix)&&(u.fix=bt(u.startIndex,"{{=}}")),i.push(u)}}catch(u){}}return i}}print(){return super.print({sep:this.anon?"":"="})}json(e,t=this.getAbsoluteIndex()){}}}}),Er,ui,Rr,at,pu=C({"src/transclude.ts"(){"use strict";var e,t,s,i,r,n,gs,yo,o;de(),M(),Ce(),ae(),$s(),Re(),j(),q(),gu(),st(),tt(),Er=[Ne,Qt()],at=(o=class extends(Rr=E){constructor(d,h,g,c=[]){var T,F;let p;const x=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(d);x&&(p=Number(x[1]),d=d.replace(`\0${p}h`,c[p].toString().replace(/^\n/u,"")));super(void 0,g,c,{});N(this,n);Ie(this,"modifier","");N(this,e,"template");N(this,t,":");N(this,s,!1);N(this,i,new Map);N(this,r);const{parserFunction:[m,v],variable:S,functionHook:w}=g,y=(T=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(d))==null?void 0:T[0];if(y)this.setAttribute("modifier",y),d=d.slice(y.length);else if(d.includes(":")){const[R,...W]=d.split(":"),[O]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((F=W[0])!=null?F:"");this.setModifier(`${R}:${O}`)&&(d=W.join(":").slice(O.length))}const A=d.search(/[::]/u),k=d[A]===":",$=A!==-1;if($||h.length===0&&!f(this,s)){const R=$?d.slice(0,A):d,W=$&&d.slice(A+1),O=fe(R),J=$?O.slice(O.search(/\S/u))+(k?":":""):O.trim(),le=J.toLowerCase(),ee=Array.isArray(v),D=ee?v.includes(J):Object.prototype.hasOwnProperty.call(v,J),G=!ee&&D?v[J]:Object.prototype.hasOwnProperty.call(m,le)&&m[le],Se=ee&&D||!("functionHook"in g)||w.includes(G),Le=ee&&D||S.includes(G);if($?G&&Se:Le){this.setAttribute("name",G||le.replace(/^#|:$/u,"")),L(this,e,"magic-word"),k&&L(this,t,":");const V=new Ue(R,"magic-word-name",g,c);if(super.insertAt(V),W!==!1&&h.unshift([W]),this.name==="invoke")for(let K=0;K<2;K++){const Q=h.shift();if(!Q)break;const se=new Te(Q.join("="),`invoke-${K?"function":"module"}`,g,c);super.insertAt(se)}}}if(this.type==="template"){const R=fe(d).trim();if(!this.normalizeTitle(R,10,{halfParsed:!0,temporary:!0}).valid)throw c.pop(),new SyntaxError("Invalid template name");const W=new Te(d,"template-name",g,c,{});super.insertAt(W)}typeof p=="number"&&(c[p]=void 0);const b=this.isTemplate();let _=1;for(let R=0;R<h.length;R++){const W=h[R];b||this.name==="switch"&&R>0||this.name==="tag"&&R>1||(W[0]=W.join("="),W.length=1),W.length===1&&(W.unshift(_),_++),this.insertAt(new bo(...W,g,c))}this.seal("modifier")}get type(){return f(this,e)}get module(){}get function(){}setModifier(d){const{parserFunction:[,,h,g]}=this.getAttribute("config"),c=fe(d).trim();if(d&&!c.endsWith(":"))return!1;const p=c.slice(0,-1).toLowerCase(),x=h.includes(p),m=g.includes(p);return(f(this,s)?x:m||!d)||(me.running||this.length>1)&&(x||m||!d)?(this.setAttribute("modifier",d),L(this,s,x),!!d):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(L(this,r,P(this,n,gs).call(this)),this.setAttribute("name",f(this,r).title))}toString(d){const{childNodes:h,length:g,firstChild:c,modifier:p,type:x}=this;return`{{${p}${x==="magic-word"?c.toString(d)+(g===1?"":f(this,t))+h.slice(1).map(m=>m.toString(d)).join("|"):super.toString(d,"|")}}}`}text(){const{childNodes:d,length:h,firstChild:g,modifier:c,type:p,name:x}=this;return p==="magic-word"&&x==="vardefine"?"":`{{${c}${p==="magic-word"?g.text()+(h===1?"":f(this,t))+Ye(d.slice(1),"|"):super.text("|")}}}`}getAttribute(d){switch(d){case"padding":return this.modifier.length+2;case"title":return f(this,r);case"colon":return f(this,t);case"invalid":return this.type==="magic-word"&&this.name==="invoke"&&(this.length===2||!P(this,n,gs).call(this).valid);default:return super.getAttribute(d)}}lint(d=this.getAbsoluteIndex(),h){{const g=super.lint(d,h);if(!this.isTemplate())return g;const{type:c,childNodes:p,length:x}=this,m=new re(this,d),{lintConfig:v}=I,{computeEditInfo:S}=v,w=c==="magic-word";let y="no-ignored",A=v.getSeverity(y,"fragment");if(w&&!P(this,n,gs).call(this).valid)y="invalid-invoke",A=v.getSeverity(y,"name"),A&&g.push(B(p[1],m,y,"illegal-module",A));else if(A){const k=p[w?1:0],$=k.childNodes.findIndex(_=>_.type==="text"&&vs(_.data).includes("#")),b=k.childNodes[$];if(b){const _=B(k,m,y,"useless-fragment",A);S&&(_.suggestions=[H(_,k.getRelativeIndex($)+b.data.indexOf("#"))]),g.push(_)}}if(y="invalid-invoke",A=v.getSeverity(y,"function"),A&&w&&x===2)return g.push(z(this,m,y,"missing-function",A)),g;if(y="no-duplicate",A=v.getSeverity(y,"parameter"),A){const k=this.getDuplicatedArgs().filter(([,b])=>!b[0].querySelector("ext")),$="duplicate-parameter";for(const[,b]of k)Array.prototype.push.apply(g,b.map(_=>{const T=B(_,m,y,$,A);return S&&(T.suggestions=[H(T,-1)]),T}))}return g}}insertAt(d,h=this.length){return super.insertAt(d,h),d.anon?P(this,n,yo).call(this,d):d.name&&this.getArgs(d.name,!1,!1).add(d),d}getAllArgs(){return this.childNodes.filter(Fs("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:d})=>d)}getArgs(d,h,g=!0){const c=String(d).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");let p;return f(this,i).has(c)?p=f(this,i).get(c):(p=new Set(this.getAllArgs().filter(({name:x})=>c===x)),f(this,i).set(c,p)),p}getDuplicatedArgs(){return[...f(this,i)].filter(([,{size:d}])=>d>1).map(([d,h])=>[d,[...h]])}getPossibleValues(){const{type:d,name:h,childNodes:g}=this;if(d==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let c,p;switch(h){case"if":case"ifexist":case"ifexpr":case"iferror":c=2;break;case"ifeq":c=3;break;case"switch":{const x=g.slice(2),m=x[x.length-1];p=[...x.filter(({anon:v})=>!v),...m!=null&&m.anon?[m]:[]].map(({lastChild:v})=>v);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}p!=null||(p=g.slice(c,c+2).map(({lastChild:x})=>x));for(let x=0;x<p.length;){const{length:m,0:v}=p[x].childNodes.filter(S=>S.text().trim());if(m===0)p.splice(x,1);else if(m>1||v.type!=="magic-word")x++;else try{const S=v.getPossibleValues();Array.prototype.splice.apply(p,[x,1,...S]),x+=S.length}catch(S){x++}}return p}print(){const{childNodes:d,length:h,firstChild:g,modifier:c,type:p}=this;return`<span class="wpb-${p}${this.getAttribute("invalid")?" wpb-invalid":""}">{{${p==="magic-word"?Ht(c)+g.print()+(h===1?"":f(this,t))+vt(d.slice(1),{sep:"|"}):(c?`<span class="wpb-magic-word">${Ht(c)}</span>`:"")+vt(d,{sep:"|"})}}}</span>`}},e=new WeakMap,t=new WeakMap,s=new WeakMap,i=new WeakMap,r=new WeakMap,n=new WeakSet,gs=function(){const d=this.type==="template";return this.normalizeTitle((d?"":"Module:")+this.childNodes[d?0:1].text(),10,ce({temporary:!0},!d&&{page:""}))},yo=function(d){const h=this.getAnonArgs(),g=typeof d!="number";for(let c=g?h.indexOf(d):d-1;c<h.length;c++){const p=h[c],{name:x}=p,m=String(c+1);(x!==m||p===d)&&(p.setAttribute("name",m),this.getArgs(m,!1,!1).add(p))}},o),ui=te(Rr),at=Z(ui,0,"TranscludeToken",Er,at),Y(ui,1,at)}}),Pr,di,Or,Ot,fu=C({"src/hidden.ts"(){"use strict";et(),q(),Pr=[ze()],Ot=class extends(Or=E){get type(){return"hidden"}getAttribute(e){return e==="invalid"||super.getAttribute(e)}},di=te(Or),Ot=Z(di,0,"HiddenToken",Pr,Ot),Y(di,1,Ot)}}),jr,hi,Br,jt,mu=C({"src/arg.ts"(){"use strict";var e,xu,s;de(),M(),ae(),He(),$s(),Re(),j(),q(),st(),fu(),jr=[Ne,Pe("{{{"),Qt()],jt=(s=class extends(Br=E){constructor(r,n,l=[]){super(void 0,n,l,{});N(this,e);for(let a=0;a<r.length;a++){const o=r[a];if(a===0){const u=new Te(o,"arg-name",n,l,{});super.insertAt(u)}else if(a>1){const u=new Ot(o,n,l);super.insertAt(u)}else{const u=new E(o,n,l);u.type="arg-default",u.setAttribute("stage",2),super.insertAt(u)}}}get type(){return"arg"}get default(){}toString(r){return`{{{${super.toString(r,"|")}}}}`}text(){return`{{{${Ye(this.childNodes.slice(0,2),"|")}}}}`}afterBuild(){super.afterBuild()}lint(r=this.getAbsoluteIndex(),n){{const{childNodes:[l,a,...o]}=this;l.setAttribute("aIndex",r+3);const u=l.lint(r+3,n);if(a){const x=r+4+l.toString().length;a.setAttribute("aIndex",x);const m=a.lint(x,n);m.length>0&&Array.prototype.push.apply(u,m)}const d=["no-ignored","no-arg"],{lintConfig:h}=I,{computeEditInfo:g}=h,c=new re(this,r),p=d.map(x=>h.getSeverity(x,"arg"));if(p[0]&&o.length>0&&Array.prototype.push.apply(u,o.map(x=>{const m=B(x,c,d[0],"invisible-triple-braces",p[0]);return m.startIndex--,m.startCol--,g&&(m.suggestions=[H(m),bt(m.startIndex,"{{!}}")]),m})),p[1]&&!this.getAttribute("include")){const x=z(this,c,d[1],"unexpected-argument",p[1]);g&&a&&(x.suggestions=[_e(x,"expand",a.text())]),u.push(x)}return u}}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(r,n=this.getAbsoluteIndex()){}},e=new WeakSet,xu=function(){},s),hi=te(Br),jt=Z(hi,0,"ArgToken",jr,jt),Y(hi,1,jt)}}),wo={};ie(wo,{parseBraces:()=>Ns});var qr,ci,ss,gi,pi,fi,Wr,mi,Ns,An=C({"parser/braces.ts"(){"use strict";Ze(),de(),vo(),pu(),mu(),qr={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},ci=String.raw`\[(?!\[)`,ss=String.raw`\n(?![=\0])`,gi=String.raw`|\{{2,}`,pi=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),fi=pt(e=>new RegExp(e,"gmu")),Wr=new RegExp(String.raw`\{\{((?:[^\n{}[]|${ci}|${ss})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${ss})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${ci}|${ss})*\}-`,"gu"),mi=e=>{const t=xt(fe(e));return pi.has(t)?pi.get(t):/^(?:filepath|(?:full|canonical)urle?):./u.test(t)?"m":/^#vardefine:./u.test(t)?"n":"t"},Ns=(e,t,s)=>{var p,x,m,v,S;const i=String.raw`${t.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,r]}=t,n=[],l=[],a=(w,y,A,k)=>{y[y.length-1].push(ye(w.slice(A,k),l))};let o;do o!==void 0&&(e=o),o=e.replace(Wr,(w,y,A)=>{if(y!==void 0||typeof A=="string")try{const{length:k}=s,$=(y!=null?y:A).split("|");return new at(ye($[0],l),$.slice(1).map(b=>{const _=b.indexOf("=");return(_===-1?[b]:[b.slice(0,_),b.slice(_+1)]).map(T=>ye(T,l))}),t,s),`\0${k}${mi($[0])}`}catch(k){if(!(k instanceof SyntaxError)||k.message!=="Invalid template name")throw k}return l.push(ye(w,l)),`\0${l.length-1}`});while(o!==e);e=o;const u=e.lastIndexOf("}}")-e.length;let d=u+e.length!==-1,h=fi(i+(d?gi:"")),g=h.exec(e),c;for(;g||c!==void 0&&c<=e.length&&((x=(p=n[n.length-1])==null?void 0:p[0])!=null&&x.startsWith("="));){if(g!=null&&g[1]){const[,{length:W}]=g;g[0]=g[0].slice(W),g.index+=W}const{0:w,index:y}=g!=null?g:{0:`
8
- `,index:e.length},A=(m=n.pop())!=null?m:{},{0:k,index:$,parts:b,findEqual:_,pos:T}=A,F=w==="="&&_;if(w==="]]"||w==="}-")c=y+2;else if(w===`
9
- `){c=y+1;const{pos:W,findEqual:O}=(v=n[n.length-1])!=null?v:{};if(W===void 0||O||fe(e.slice(W,$))!==""){const J=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(e.slice($,y));J&&(J[2]=ye(J[2],l),J[2].includes(`
10
- `)||(e=`${e.slice(0,$)}\0${s.length}h${e.slice(y)}`,c=$+4+String(s.length).length,new ot(J[1].length,J.slice(2),t,s)))}}else if(w==="|"||F)c=y+1,a(e,b,T,y),w==="|"&&b.push([]),A.pos=c,A.findEqual=w==="|",n.push(A);else if(w.startsWith("}}")){const W=w.slice(0,Math.min(k.length,3)),O=k.length-W.length,{length:J}=s;c=y+W.length,a(e,b,T,y);let le=!1,ee="t";if(W.length===3){const D=b.map(Se=>Se.join("=")),G=D.length>1&&fe(D[1]).trim();new jt(D,t,s),G&&G.endsWith(":")&&r.includes(G.slice(0,-1).toLowerCase())&&(ee="s")}else try{new at(b[0][0],b.slice(1),t,s),ee=mi(b[0][0])}catch(D){if(D instanceof SyntaxError&&D.message==="Invalid template name")le=!0;else throw D}le||(e=`${e.slice(0,$+O)}\0${J}${ee}${e.slice(c)}`,c=$+O+3+String(J).length,O>1?n.push({0:k.slice(0,O),index:$,pos:$+O,parts:[[]]}):O===1&&e[$-1]==="-"&&n.push({0:"-{",index:$-1,pos:$+1,parts:[[]]}))}else c=y+w.length,w.startsWith("{")&&(g.pos=c,g.parts=[[]]),n.push(..."0"in A?[A]:[],g);let R=n[n.length-1];if(d&&u+e.length<c)for(d=!1;(S=R==null?void 0:R[0])!=null&&S.startsWith("{");)n.pop(),R=n[n.length-1];h=fi(i+(d?gi:"")+(R?`|${qr[R[0][0]]}${R.findEqual?"|=":""}`:"")),h.lastIndex=c,g=h.exec(e)}return ye(e,l)}}}),So={};ie(So,{InputboxToken:()=>Ao});var Ao,vu=C({"src/multiLine/inputbox.ts"(){"use strict";Ls(),An(),j(),xo(),Ao=class extends Sn{constructor(e,t,s=I.getConfig(),i=[]){const r=Symbol("InputboxToken"),n=s.excludes.includes("heading")?s:Fe(ce({},s),{excludes:[...s.excludes,"heading"]}),{length:l}=i;i.push(r),t&&(t=Jt(t,n,i,e)),t&&(t=Ns(t,n,i)),i.splice(l,1),super(e,t,n,i,{})}}}}),ps={};ie(ps,{NestedToken:()=>ko});var Mr,zr,ko,xi=C({"src/nested.ts"(){"use strict";var e,t,s;M(),ae(),Ls(),An(),j(),q(),Ho(),wt(),Mr=new Set(["comment","include","arg","template","magic-word"]),zr=[!1,!0].map(i=>{const r=i?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${r}(?:\s[^>]*)?/?>|</${r}\s*>)$`,"iu")}),ko=(s=class extends E{constructor(r,n,l,a,o=[]){if(typeof n=="boolean"){const u=Symbol("NestedToken"),{length:d}=o;o.push(u),r&&(r=Jt(r,a,o,n)),r&&(r=Ns(r,a,o)),o.splice(d,1)}else r&&(r=r.replace(n,(u,d,h,g,c)=>{const p=`\0${o.length+1}e`;return new ct(d,h,g,c,a,!1,o),p}));r&&(r=r.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(u,d,h)=>(new we(h,a,o),`${d}\0${o.length}n`)));super(r,a,o);N(this,e);N(this,t);L(this,e,[...l]),L(this,t,n)}get type(){return"ext-inner"}lint(r=this.getAbsoluteIndex(),n){{const l=super.lint(r,n),a="no-ignored",{lintConfig:o}=I,u=o.getSeverity(a,this.name);if(!u)return l;const d=new re(this,r),h=typeof f(this,t)=="boolean"?zr[f(this,t)?1:0]:/^<!--[\s\S]*-->$/u;return[...l,...this.childNodes.filter(g=>{const{type:c,name:p}=g;if(c==="ext")return!f(this,e).includes(p);if(Mr.has(c))return!1;const x=g.toString().trim();return x&&!h.test(x)}).map(g=>{const c=B(g,d,a,I.msg("invalid-content",this.name),u);return o.computeEditInfo&&(c.suggestions=[H(c),cn(c,g.toString())]),c})]}}},e=new WeakMap,t=new WeakMap,s)}});function Ur(e,t,s,i,r){t=fe(t).trim();let n=t.replace(e==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(e){case"width":return!n&&!!t||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(n);case"link":{if(n){if(_o(s.protocol).test(n))return $o(s.protocol).test(n)&&t;n.startsWith("[[")&&n.endsWith("]]")&&(n=n.slice(2,-2))}else return t;const l=I.normalizeTitle(n,0,!1,s,{halfParsed:i,decode:!0,selfLink:!0,page:""});return l.valid&&l}case"lang":return(r==="svg"||r==="svgz")&&!/[^a-z\d-]/u.test(n);case"alt":case"class":case"manualthumb":return!0;case"page":return(r==="djvu"||r==="djv"||r==="pdf")&&Number(n)>0;default:return!!n&&!isNaN(n)}}var _o,$o,Hr,Dr,bs,Gr,To,bu=C({"src/imageParameter.ts"(){"use strict";var e,t,Co,r;Ze(),de(),M(),Ee(),Ce(),j(),q(),_o=pt(n=>new RegExp(String.raw`^(?:${n}|//|\0\d+m\x7F)`,"iu")),$o=pt(n=>new RegExp(String.raw`^(?:(?:${n}|//)${ft}|\0\d+m\x7F)${mt}$`,"iu")),Hr=pt(n=>new RegExp(String.raw`^(\s*(?!\s))${n.replace("$1","(.*)")}${n.endsWith("$1")?`(?=$|
11
- )`:""}(\s*)$`,"u")),Dr=new Set(["alt","link","lang","page","caption"]),bs=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),Gr=n=>{if(n)n.startsWith("//")&&(n=`https:${n}`);else return n;return new URL(n).href},To=(r=class extends E{constructor(l,a,o,u){var n=(...i)=>(super(...i),N(this,t),N(this,e,""),this);let d;const h=Object.entries(o.img).map(([c,p])=>[c,p,Hr(c)]),g=h.find(([,c,p])=>(d=p.exec(l),d&&(d.length!==4||Ur(c,d[2],o,!0,a)!==!1)));if(g&&d){d.length===3?(n(void 0,o,u),L(this,e,l)):(n(d[2],o,u,{}),L(this,e,d[1]+g[0]+d[3])),this.setAttribute("name",g[1]),g[1]==="alt"&&this.setAttribute("stage",pe-1);return}n(l,o.excludes.includes("list")?o:Fe(ce({},o),{excludes:[...o.excludes,"list"]}),u),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get thumb(){return this.name==="manualthumb"?this.normalizeTitle(`File:${super.text().trim()}`,6,{page:""}):void 0}get link(){{if(this.name!=="link")return;const l=super.text().trim();return me.run(()=>{const a=new E(l,this.getAttribute("config"));return a.parseOnce(0,this.getAttribute("include")).parseOnce(),/^\0\d+m\x7F/u.test(a.toString())?l:Ur("link",l,this.getAttribute("config"))})}}afterBuild(){var l;(l=this.parentNode)!=null&&l.is("gallery-image")&&!Dr.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(l){return f(this,e)?f(this,e).replace("$1",super.toString(l)):super.toString(l)}text(){return f(this,e)?f(this,e).replace("$1",super.text()).trim():super.text().trim()}isPlain(){return this.name==="caption"||this.name==="alt"}getAttribute(l){return l==="invalid"?this.name==="invalid":l==="padding"?Math.max(0,f(this,e).indexOf("$1")):super.getAttribute(l)}lint(l=this.getAbsoluteIndex(),a){{const o=super.lint(l,a),{lintConfig:u}=I,{computeEditInfo:d,fix:h}=u,{link:g,name:c}=this,p=c==="width"&&this.getValue();if(c==="invalid"||p&&p.endsWith("px")){const x="invalid-gallery",m=u.getSeverity(x,"parameter");if(m){const v=z(this,{start:l},x,"invalid-image-parameter",m);(d||h)&&(v.fix=p?H(v,0,p):H(v,-1)),o.push(v)}}else if(c==="link"){if(typeof g=="string"){const x="invalid-url",m=u.getSeverity(x);if(m&&!this.querySelector("magic-word"))try{Gr(g)}catch(v){o.push(z(this,{start:l},x,"invalid-url",m))}}else if(g.encoded){const x="url-encoding",m=u.getSeverity(x,"file");if(m){const v=z(this,{start:l},x,"unnecessary-encoding",m);(d||h)&&(v.fix=dn(v,this)),o.push(v)}}}else if(c==="manualthumb"){const x="invalid-gallery",m=u.getSeverity(x,"thumb");if(m&&!this.querySelector("arg,magic-word,template")){const{valid:v,ns:S,extension:w}=this.thumb;(!v||S!==6||!bs.has(w))&&o.push(z(this,{start:l},x,"invalid-thumb",m))}}return o}}getValue(){return this.name==="invalid"?this.text():P(this,t,Co).call(this)||super.text()}print(){return f(this,e)?`<span class="wpb-image-parameter${this.name==="invalid"?" wpb-invalid":""}">${f(this,e).replace("$1",`<span class="wpb-image-caption">${vt(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}},e=new WeakMap,t=new WeakSet,Co=function(){return f(this,e)&&!f(this,e).includes("$1")},r)}}),vi,Vr,Qr,bi,yi,Jr,wi,kn,Io=C({"src/link/file.ts"(){"use strict";M(),ae(),j(),_s(),bu(),vi=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),Vr=new Set(["arg"]),Qr=new Set(["template","magic-word"]),bi=new Set(["left","right","center","none"]),yi=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),Jr=e=>{if(e===void 0)return[];const t=/-\{|\}-|\|/gu,s=[];let i=t.exec(e),r=0,n=0;for(;i;){const{0:l,index:a}=i;l!=="|"?r+=l==="-{"?1:-1:r===0&&(s.push(e.slice(n,a)),{lastIndex:n}=t),i=t.exec(e)}return s.push(e.slice(n)),s},wi=(e,t)=>e.filter(({childNodes:s})=>!s.some(i=>i.text().trim()&&t.has(i.type))),kn=class extends Be{get type(){return"file"}get extension(){}constructor(e,t,s,i=[],r="|"){super(e,void 0,s,i,r);const{extension:n}=this.getTitle(!0,!0);this.safeAppend(Jr(t).map(l=>new To(l,n,s,i)))}lint(e=this.getAbsoluteIndex(),t){var s;{const i=super.lint(e,t),r=wi(this.getAllArgs(),Vr),n=[...new Set(r.map(({name:k})=>k))],l=n.filter(k=>vi.has(k)),a=n.filter(k=>bi.has(k)),o=n.filter(k=>yi.has(k)),[u]=l,d=u==="framed"||u==="manualthumb",h=new re(this,e),{lintConfig:g}=I,{computeEditInfo:c,fix:p}=g,{ns:x,extension:m}=this.getAttribute("title"),{firstChild:v}=this;let S="nested-link",w=g.getSeverity(S,"file");if(w&&bs.has(m)&&this.closest("ext-link-text")&&((s=this.getValue("link"))==null?void 0:s.trim())!==""){const k=z(this,h,S,"link-in-extlink",w);if(c||p){const $=this.getArg("link");if($){const b=e+$.getRelativeIndex();k.fix={desc:I.msg("delink"),range:[b,b+$.toString().length],text:"link="}}else k.fix=As(k.endIndex-2,"delink","|link=")}i.push(k)}if(S="invalid-gallery",w=g.getSeverity(S,"extension"),w&&x===6&&!m&&!v.querySelector("arg,magic-word,template")&&i.push(z(this,h,S,"missing-extension",w)),w=g.getSeverity(S,"parameter"),w&&d)for(const k of r.filter(({name:$})=>$==="width")){const $=B(k,h,S,"invalid-image-parameter",w);(c||p)&&($.fix=H($,-1)),i.push($)}if(r.length===n.length&&l.length<2&&a.length<2&&o.length<2)return i;S="no-duplicate";const y=["unknownImageParameter","imageParameter"].map(k=>g.getSeverity(S,k)),A=(k,$,b,_=!0)=>k.map(T=>{if(w=y[Number(typeof _=="function"?_(T):_)],!w)return!1;const F=B(T,h,S,I.msg(`${$}-image-parameter`,b),w);return c&&(F.suggestions=[H(F,-1)]),F}).filter(T=>T!==!1);for(const k of n){if(k==="invalid"||k==="width"&&d)continue;const $=k==="caption";let b=r.filter(({name:_})=>_===k);if($&&(b=[...b.slice(0,-1).filter(_=>_.text()),...b.slice(-1)]),b.length>1){let _=!$||!m||bs.has(m);if($&&_){const T=wi(b,Qr);_=T.length>1&&(F=>T.includes(F))}Array.prototype.push.apply(i,A(b,"duplicate",k,_))}}return l.length>1&&Array.prototype.push.apply(i,A(r.filter(({name:k})=>vi.has(k)),"conflicting","frame")),a.length>1&&Array.prototype.push.apply(i,A(r.filter(({name:k})=>bi.has(k)),"conflicting","horizontal-alignment")),o.length>1&&Array.prototype.push.apply(i,A(r.filter(({name:k})=>yi.has(k)),"conflicting","vertical-alignment")),i}}getAllArgs(){return this.childNodes.slice(1)}getArgs(e){return this.getAllArgs().filter(({name:t})=>e===t)}getArg(e){{const t=this.getArgs(e);return t[e==="manualthumb"?0:t.length-1]}}getValue(e){var t;return(t=this.getArg(e))==null?void 0:t.getValue()}json(e,t=this.getAbsoluteIndex()){}}}}),Xr,Si,Kr,ut,No=C({"src/link/galleryImage.ts"(){"use strict";var e,Zi,s;M(),Ee(),He(),j(),q(),Io(),Xr=[Pe("")],ut=(s=class extends(Kr=kn){constructor(r,n,l,a,o=[]){let u;if(l!==void 0){const{length:d}=o;u=new E(l,a,o);for(let h=0;h<pe-1;h++)u.parseOnce();o.splice(d,1)}super(n,u==null?void 0:u.toString(),a,o);N(this,e);Ie(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=`${r}-image`,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(r){const n=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),n?0:6,{halfParsed:!0,temporary:r,decode:!n,page:""})}lint(r=this.getAbsoluteIndex(),n){{const l=super.lint(r,n),a="invalid-gallery",{lintConfig:o}=I,u=o.getSeverity(a,"image");if(u&&P(this,e,Zi).call(this)){const d=z(this,{start:r},a,"invalid-gallery",u);o.computeEditInfo&&(d.suggestions=[As(r,"prefix","File:")]),l.push(d)}return l}}getAttribute(r){return r==="invalid"?P(this,e,Zi).call(this):super.getAttribute(r)}},e=new WeakSet,Zi=function(){const{ns:r}=this.getAttribute("title");return r!==6},s),Si=te(Kr),ut=Z(Si,0,"GalleryImageToken",Xr,ut),Y(Si,1,ut)}}),ys,Lo=C({"src/nowiki/commentLine.ts"(){"use strict";wt(),ys=class extends we{}}}),Fo={};ie(Fo,{GalleryToken:()=>Eo});var Eo,yu=C({"src/multiLine/gallery.ts"(){"use strict";var e,Ro,wu,i;M(),j(),wn(),No(),Lo(),Eo=(i=class extends Is{constructor(n,l,a=[]){var o;super(void 0,l,a,{});N(this,e);for(const u of(o=n==null?void 0:n.split(`
12
- `))!=null?o:[]){const d=/^([^|]+)(?:\|(.*))?/u.exec(u);if(!d){super.insertAt(u.trim()?new ys(u,l,a):u);continue}const[,h,g]=d;P(this,e,Ro).call(this,h)?super.insertAt(new ut("gallery",h,g,l,a)):super.insertAt(new ys(u,l,a))}}get widths(){}get heights(){}lint(n=this.getAbsoluteIndex(),l){{const{top:a,left:o}=this.getRootNode().posFromIndex(n),u=[],d="no-ignored",{lintConfig:h}=I,g=["Image","NoImage","Comment"].map(c=>h.getSeverity(d,`gallery${c}`));for(let c=0;c<this.length;c++){const p=this.childNodes[c],x=p.toString(),{length:m}=x,v=x.trim(),{type:S}=p,w=a+c,y=c?0:o;if(p.setAttribute("aIndex",n),S==="noinclude"&&v&&!/^<!--.*-->$/u.test(v)){let[A]=g;if(v.startsWith("|")?[,A]=g:(v.startsWith("<!--")||v.endsWith("-->"))&&([,,A]=g),A){const k=n+m,$={rule:d,message:I.msg("invalid-content","gallery"),severity:A,startIndex:n,endIndex:k,startLine:w,endLine:w,startCol:y,endCol:y+m};h.computeEditInfo&&($.suggestions=[H($),cn($,x)]),u.push($)}}else if(S!=="noinclude"&&S!=="text"){const A=p.lint(n,l);A.length>0&&Array.prototype.push.apply(u,A)}n+=m+1}return u}}json(n,l=this.getAbsoluteIndex()){}},e=new WeakSet,Ro=function(n){return this.normalizeTitle(n,6,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid},wu=function(n){},i)}}),_n,Po=C({"src/link/index.ts"(){"use strict";Ze(),M(),j(),_s(),_n=class extends Be{get type(){return"link"}get innerText(){return this.length>1?this.lastChild.text():Dt(this.firstChild.text().replace(/^\s*:?/u,""))}lint(e=this.getAbsoluteIndex(),t){{const s=super.lint(e,t),i="nested-link",{lintConfig:r}=I,n=r.getSeverity(i);if(n&&this.closest("ext-link-text")){const l=z(this,{start:e},i,"link-in-extlink",n);(r.computeEditInfo||r.fix)&&(l.fix=_e(l,"delink",this.innerText)),s.push(l)}return s}}}}}),Yr,Zr,Vt,$n=C({"src/magicLink.ts"(){"use strict";var e,t,en,i;M(),de(),ae(),j(),q(),Yr=String.raw`(?:[${We}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,Zr=new RegExp(`${Yr}+`,"gu"),Vt=(i=class extends E{constructor(n,l="free-ext-link",a=I.getConfig(),o){super(n,a,o,{});N(this,t);N(this,e);L(this,e,l)}get type(){return f(this,e)}get innerText(){const n=new Map([["!","|"],["=","="]]);let l=Ye(this.childNodes.map(a=>{const{type:o}=a,u=String(a.name);return o==="magic-word"&&n.has(u)?n.get(u):a}));return this.type==="magic-link"&&(l=l.replace(Zr," ")),l}get link(){const{innerText:n}=this;return this.type==="magic-link"?n.startsWith("ISBN")?`ISBN ${n.slice(5).replace(/[- ]/gu,"").replace(/x$/u,"X")}`:n:Dl(n).replace(/\n/gu,"%0A")}lint(n=this.getAbsoluteIndex(),l){{const a=super.lint(n,l),o=new re(this,n),{lintConfig:u}=I,{type:d,childNodes:h}=this;if(d==="magic-link"){const x="invalid-isbn",m=u.getSeverity(x);return m&&P(this,t,en).call(this)&&a.push(z(this,o,x,"invalid-isbn",m)),a}let g="invalid-url",c=u.getSeverity(g);if(c&&!this.querySelector("magic-word"))try{this.getUrl()}catch(x){a.push(z(this,o,g,"invalid-url",c))}const p=d==="ext-link-url";if(g="unterminated-url",c=u.getSeverity(g,p?"pipe":"punctuation"),c){const x=p?/\|/u:/[,;。:!?()]+/u,m=h.find(v=>v.type==="text"&&x.test(v.data));if(m){const{data:v}=m,S=B(m,o,g,I.msg("in-url",p?'"|"':"full-width-punctuation"),c);if(u.computeEditInfo){const{index:w,0:y}=x.exec(v),A=S.startIndex+w;S.suggestions=p?[Gt(A,1)]:[Gt(A),{desc:I.msg("encode"),range:[A,A+y.length],text:encodeURI(y)}]}a.push(S)}}return a}}getUrl(n){this.lspError("MagicLinkToken.getUrl")}getAttribute(n){return n==="invalid"?P(this,t,en).call(this):super.getAttribute(n)}},e=new WeakMap,t=new WeakSet,en=function(){if(this.type==="magic-link"){const{link:n}=this;if(n.startsWith("ISBN")){const l=[...n.slice(5)].map(a=>a==="X"?10:Number(a));return l.length===10?l.reduce((a,o,u)=>a+o*(10-u),0)%11!==0:l.length===13&&(l[12]===10||l.reduce((a,o,u)=>a+o*(u%2?3:1),0)%10!==0)}}return!1},i)}}),el,Ai,tl,dt,Oo=C({"src/extLink.ts"(){"use strict";var e,t;Ee(),M(),He(),j(),q(),$n(),el=[Pe("[")],dt=(t=class extends(tl=E){constructor(i,r="",n="",l,a=[]){super(void 0,l,a,{});N(this,e);const o=i&&/^\0\d+f\x7F$/u.test(i)?a[Number(i.slice(1,-2))]:new Vt(i,"ext-link-url",l,a);if(this.insertAt(o),L(this,e,r),n){const u=new E(n,l,a,{});u.type="ext-link-text",u.setAttribute("stage",pe-1),this.insertAt(u)}}get type(){return"ext-link"}toString(i){return this.length===1?`[${super.toString(i)}${f(this,e)}]`:`[${super.toString(i,f(this,e))}]`}text(){return`[${super.text(" ")}]`}getGaps(){return f(this,e).length}lint(i=this.getAbsoluteIndex(),r){{const n=super.lint(i,r),l="var-anchor",a=I.lintConfig.getSeverity(l,"extLink");return a&&this.length===1&&this.closest("heading-title")&&n.push(z(this,{start:i},l,"variable-anchor",a)),n}}print(){return super.print(this.length===1?{pre:"[",post:`${f(this,e)}]`}:{pre:"[",sep:f(this,e),post:"]"})}},e=new WeakMap,t),Ai=te(tl),dt=Z(Ai,0,"ExtLinkToken",el,dt),Y(Ai,1,dt)}}),tn,Su=C({"src/imagemapLink.ts"(){"use strict";q(),wt(),Po(),Oo(),tn=class extends E{get type(){return"imagemap-link"}constructor(e,t,s,i,r=[]){super(void 0,i,r),this.append(e,t.length===2?new _n(...t,i,r):new dt(...t,i,r),new we(s,i,r))}}}}),jo={};ie(jo,{ImagemapToken:()=>Bo});var Bo,Au=C({"src/multiLine/imagemap.ts"(){"use strict";M(),Ce(),ae(),j(),wn(),Lo(),No(),Su(),Bo=class extends Is{get image(){return this.childNodes.find(Fs("imagemap-image"))}constructor(e,t=I.getConfig(),s=[]){if(super(void 0,t,s,{}),!e)return;const i=e.split(`
13
- `),r=new Set(t.protocol.split("|"));let n=!0,l=!1;for(const a of i){const o=a.trim();if(!(l||!o||o.startsWith("#"))){if(n){const u=a.indexOf("|"),d=u===-1?a:a.slice(0,u),{valid:h,ns:g}=this.normalizeTitle(d,0,{halfParsed:!0,temporary:!0,page:""});if(h&&g===6){const c=new ut("imagemap",d,u===-1?void 0:a.slice(u+1),t,s);super.insertAt(c),n=!1;continue}else l=!0}else if(a.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(a);continue}else if(a.includes("[")){const u=a.indexOf("["),d=a.slice(u),h=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(d);if(h){if(this.normalizeTitle(h[1],0,{halfParsed:!0,temporary:!0,selfLink:!0,page:""}).valid){super.insertAt(new tn(a.slice(0,u),h.slice(1),d.slice(d.indexOf("]]")+2),t,s));continue}}else if(d.startsWith("[//")||r.has(d.slice(1,d.indexOf(":")+1))||r.has(d.slice(1,d.indexOf("//")+2))){const g=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(d);if(g){super.insertAt(new tn(a.slice(0,u),g.slice(1),d.slice(d.indexOf("]")+1),t,s));continue}}}}super.insertAt(new ys(a,t,s))}}lint(e=this.getAbsoluteIndex(),t){{const s=super.lint(e,t),i=new re(this,e),{childNodes:r,image:n}=this,l="invalid-imagemap",{lintConfig:a}=I,o=a.getSeverity(l,n?"link":"image");return o&&(n?Array.prototype.push.apply(s,r.filter(u=>{const d=u.toString().trim();return u.is("noinclude")&&d&&!d.startsWith("#")}).map(u=>{const d=B(u,i,l,"invalid-imagemap-link",o);return a.computeEditInfo&&(d.suggestions=[H(d,-1),_e(d,"comment","# ")]),d})):s.push(z(this,i,l,"imagemap-without-image",o))),s}}getAttribute(e){return e==="invalid"?!this.image:super.getAttribute(e)}}}}),sl,ki,il,ht,qo=C({"src/nowiki/comment.ts"(){"use strict";M(),et(),He(),j(),it(),sl=[ze(!1),Pe("<!--")],ht=class extends(il=$e){constructor(t,s,i,r){super(t,i,r);Ie(this,"closed");this.closed=s}get type(){return"comment"}lint(t=this.getAbsoluteIndex()){{if(this.closed)return[];const s="unclosed-comment",{lintConfig:i}=I,r=i.getSeverity(s);if(!r)return[];const n=z(this,{start:t},s,"unclosed-comment",r);return i.computeEditInfo&&(n.suggestions=[Me(n.endIndex,"-->")]),[n]}}toString(t){return t?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}},ki=te(il),ht=Z(ki,0,"CommentToken",sl,ht),Y(ki,1,ht)}}),Wo={};ie(Wo,{CommentedToken:()=>Mo});var Mo,ku=C({"src/commented.ts"(){"use strict";q(),qo(),Mo=class extends E{get type(){return"ext-inner"}constructor(e,t,s=[]){if(super(void 0,t,s,{AstText:":",CommentToken:":"}),e){let i=e.indexOf("<!--"),r=i!==-1&&e.indexOf("-->",i+4),n=0;for(;r!==!1&&r!==-1;)i>n&&this.insertAt(e.slice(n,i)),this.insertAt(new ht(e.slice(i+4,r),!0,t,s)),n=r+3,i=e.indexOf("<!--",n),r=i!==-1&&e.indexOf("-->",i+4);n<e.length&&this.insertAt(e.slice(n))}}lint(e=this.getAbsoluteIndex()){return super.lint(e,new RegExp(String.raw`<\s*(?:\/\s*)?(${this.name})\b`,"giu"))}}}}),zo={};ie(zo,{NowikiToken:()=>Uo});var nl,rl,Uo,_u=C({"src/nowiki/index.ts"(){"use strict";var e,sn,s;Ze(),M(),j(),it(),nl=pt(i=>new RegExp(String.raw`<\s*(?:/\s*)${i==="nowiki"?"":"?"}(${i})\b`,"giu")),rl=new Set(["languages","section","templatestyles"]),Uo=(s=class extends $e{constructor(){super(...arguments);N(this,e)}get type(){return"ext-inner"}lint(r=this.getAbsoluteIndex()){{const{name:n}=this,{lintConfig:l}=I;let a="void-ext",o=l.getSeverity(a,n);if(o&&P(this,e,sn).call(this)){const d=z(this,{start:r},a,I.msg("nothing-in",n),o);return l.computeEditInfo&&(d.suggestions=[H(d)]),[d]}return super.lint(r,nl(n))}}getAttribute(r){return r==="invalid"?P(this,e,sn).call(this):super.getAttribute(r)}},e=new WeakSet,sn=function(){const{name:r,firstChild:{data:n}}=this;return rl.has(r)&&!!n},s)}}),ll,_i,ol,ct,Ho=C({"src/tagPair/ext.ts"(){"use strict";M(),ae(),j(),bn(),q(),xn(),yn(),ll=[Ts()],ct=class extends(ol=Je){get type(){return"ext"}constructor(e,t,s,i,r=I.getConfig(),n=!1,l=[]){const a=e.toLowerCase(),o=new Cs(!t||/^\s/u.test(t)?t:` ${t}`,"ext-attrs",a,r,l),u=Fe(ce({},r),{ext:r.ext.filter(h=>h!==a),excludes:[...r.excludes],inExt:!0});let d;switch(a){case"tab":u.ext=u.ext.filter(h=>h!=="tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":case"langconvert":case"phonos":a==="poem"&&u.excludes.push("heading"),d=new E(s,u,l);break;case"pre":{const{PreToken:h}=(hu(),X(go));d=new h(s,u,l);break}case"dynamicpagelist":{const{ParamTagToken:h}=(xo(),X(mo));d=new h(n,s,u,l);break}case"inputbox":{const{InputboxToken:h}=(vu(),X(So));d=new h(n,s,u,l);break}case"references":{const{NestedToken:h}=(xi(),X(ps));u.excludes.push("heading"),d=new h(s,n,["ref"],u,l);break}case"choose":{const{NestedToken:h}=(xi(),X(ps));d=new h(s,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],u,l);break}case"combobox":{const{NestedToken:h}=(xi(),X(ps));d=new h(s,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],u,l);break}case"gallery":{const{GalleryToken:h}=(yu(),X(Fo));d=new h(s,u,l);break}case"imagemap":{const{ImagemapToken:h}=(Au(),X(jo));d=new h(s,u,l);break}case"hiero":{const{CommentedToken:h}=(ku(),X(Wo));d=new h(s,u,l);break}default:{const{NowikiToken:h}=(_u(),X(zo));d=new h(s,u,l)}}d.setAttribute("name",a),d.type==="plain"&&(d.type="ext-inner"),super(e,o,d,i,r,l),this.seal("closed",!0)}lint(e=this.getAbsoluteIndex(),t){{const s=super.lint(e,t),{lintConfig:i}=I,r=new re(this,e);if(this.name!=="nowiki"){const n=this.inHtmlAttrs(),l="parsing-order",a=n&&i.getSeverity(l,n===2?"ext":"templateInTable");a&&s.push(z(this,r,l,"ext-in-html",a))}if(this.name==="ref"){let n="var-anchor",l=i.getSeverity(n,"ref");l&&this.closest("heading-title")&&s.push(z(this,r,n,"variable-anchor",l)),n="nested-link",l=i.getSeverity(n,"ref"),l&&this.closest("link,ext-link-text")&&s.push(z(this,r,n,"ref-in-link",l))}return s}}},_i=te(ol),ct=Z(_i,0,"ExtToken",ll,ct),Y(_i,1,ct)}}),Do={};ie(Do,{parseCommentAndExt:()=>Jt});var $i,al,is,ul,Ti,Jt,Ls=C({"parser/commentAndExt.ts"(){"use strict";Ze(),de(),ru(),wt(),ou(),au(),Ho(),qo(),$i="<onlyinclude>",al="</onlyinclude>",{length:is}=$i,ul=[!1,!0].map(e=>{const t=e?"includeonly":"(?:no|only)include",s=e?"noinclude":"includeonly";return pt(i=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${t}(?:\s[^>]*)?/?>|</${t}\s*>|<(${i})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(${"\\1"}\s*)>)|<(${s})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${s}\s*)>|$))`,"giu"))}),Ti=e=>{const t=e.indexOf($i);return{i:t,j:e.indexOf(al,t+is)}},Jt=(e,t,s,i)=>{if(i){let{i:o,j:u}=Ti(e);if(o!==-1&&u!==-1){let d="";const h=g=>{new we(g,t,s),d+=`\0${s.length-1}n`};for(;o!==-1&&u!==-1;){const g=`\0${s.length}e`;new Rt(e.slice(o+is,u),t,s),o>0&&h(e.slice(0,o)),d+=g,e=e.slice(u+is+1),{i:o,j:u}=Ti(e)}return e&&h(e),d}}const{ext:r}=t;let n=r,l=t;if(r.includes("translate")){n=r.filter(u=>u!=="translate"&&u!=="tvar"),l=Fe(ce({},t),{ext:n});const o=[];e=e.replace(/<nowiki>[\s\S]*?<\/nowiki>/giu,u=>(o.push(u),`\0${o.length-1}`)).replace(/<translate( nowrap)?>([\s\S]*?)<\/translate>/gu,(u,d,h)=>{const g=s.length;return new no(d,h&&ye(h,o),l,s),`\0${g}g`}),e=ye(e,o)}const a=ul[i?1:0](n.join("|"));return a.lastIndex=0,a.test(e)?e.replace(a,(o,u,d,h,g,c,p,x,m)=>{const v=s.length;let S="n";if(u)S="e",new ct(u,d,h,g,l,c,s);else if(o.startsWith("<!--")){S="c";const w=o.endsWith("-->");new ht(ye(o,s,1).slice(4,w?-3:void 0),w,t,s)}else c?new Pt(c,p&&ye(p,s,1),x&&ye(x,s,1),m,t,s):new we(o,t,s,!0);return`\0${v}${S}`}):e}}}),dl,hl,cl,gl,Ci,pl,Bt,$u=C({"src/tag/html.ts"(){"use strict";var e,t;M(),ae(),bn(),j(),io(),dl=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),hl=new Set(["b","big","center","cite","code","del","dfn","em","font","i","ins","kbd","mark","pre","q","s","samp","small","strike","strong","sub","sup","tt","u","var"]),cl=new Set(["strike","big","center","font","tt"]),gl=[Ts()],Bt=(t=class extends(pl=vn){constructor(i,r,n,l,a,o){super(i,r,n,a,o);N(this,e);this.setAttribute("name",i.toLowerCase()),L(this,e,l)}get type(){return"html"}get selfClosing(){return f(this,e)}text(){const{closing:i,selfClosing:r,name:n}=this,{html:[,,l]}=this.getAttribute("config");return l.includes(n)?i&&n!=="br"?"":super.text("/"):super.text(r&&!i?"/":"")}lint(i=this.getAbsoluteIndex(),r){var n;{const l=super.lint(i,r),{name:a,parentNode:o,closing:u,selfClosing:d}=this,h=new re(this,i),{lintConfig:g}=I,{computeEditInfo:c,fix:p}=g,x=this.inTableAttrs();let m="h1",v=g.getSeverity(m,"html");if(v&&a==="h1"&&!u){const $=z(this,h,m,"<h1>",v);c&&($.suggestions=[{desc:"h2",range:[i+2,i+3],text:"2"}]),l.push($)}if(m="parsing-order",v=x&&g.getSeverity(m,x===2?"html":"templateInTable"),v){const $=z(this,h,m,"html-in-table",v);c&&x===2&&($.suggestions=[H($)]),l.push($)}if(m="obsolete-tag",v=g.getSeverity(m,a),v&&cl.has(a)&&l.push(z(this,h,m,"obsolete-tag",v)),m="bold-header",v=g.getSeverity(m,a),v&&(a==="b"||a==="strong")&&((n=this.closest("heading-title,ext"))==null?void 0:n.type)==="heading-title"){const $=z(this,h,m,"bold-in-header",v);c&&($.suggestions=[H($)]),l.push($)}const{html:[,S,w]}=this.getAttribute("config"),y=w.includes(a),A=S.includes(a),k=!y&&!A;if(m="unmatched-tag",u&&(d||y)||d&&k){if(v=g.getSeverity(m,u?"both":"selfClosing"),v){const $=z(this,h,m,u?"closing-and-self-closing":"invalid-self-closing",v);if(c||p){const b=hn(i),_={desc:I.msg("no-self-closing"),range:[$.endIndex-2,$.endIndex-1],text:""};A?c&&($.suggestions=[b,_]):u?$.fix=y?b:_:c&&($.suggestions=[_,Me($.endIndex,`></${a}>`,-2)])}l.push($)}}else if(!this.findMatchingTag()){const $=z(this,h,m,u?"unmatched-closing":"unclosed-tag"),b=this.closest("magic-word");if(b&&dl.has(b.name))v=g.getSeverity(m,"conditional");else if(u)v=g.getSeverity(m,"closing"),$.suggestions=[H($)];else{v=g.getSeverity(m,"opening");const _=o==null?void 0:o.childNodes;hl.has(a)&&(_!=null&&_.slice(0,_.indexOf(this)).some(T=>T.is("html")&&T.name===a&&!T.findMatchingTag())&&($.suggestions=[Me(i+1,"/")]),this.closest("heading-title")&&($.rule="format-leakage",v=g.getSeverity("format-leakage",a)))}v&&($.severity=v,l.push($))}return l}}getAttribute(i){return i==="invalid"?this.inTableAttrs()===2:super.getAttribute(i)}json(i,r=this.getAbsoluteIndex()){}},e=new WeakMap,t),Ci=te(pl),Bt=Z(Ci,0,"HtmlToken",gl,Bt),Y(Ci,1,Bt)}}),Go={};ie(Go,{parseHtml:()=>Vo});var fl,Vo,Tu=C({"parser/html.ts"(){"use strict";yn(),$u(),fl=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,Vo=(e,t,s)=>{var l;const{html:i}=t;(l=t.htmlElements)!=null||(t.htmlElements=new Set([...i[0],...i[1],...i[2]]));const r=e.split("<");let n=r.shift();for(const a of r){const o=fl.exec(a),u=o==null?void 0:o[2],d=u==null?void 0:u.toLowerCase();if(!o||!t.htmlElements.has(d)){n+=`<${a}`;continue}const[,h,,g="",c,p]=o,{length:x}=s,m=new Cs(g,"html-attrs",d,t,s),v=m.hasAttr("itemprop");if(d==="meta"&&!(v&&m.hasAttr("content"))||d==="link"&&!(v&&m.hasAttr("href"))){n+=`<${a}`,s.length=x;continue}n+=`\0${s.length}x${p}`,new Bt(u,m,h==="/",c==="/>",t,s)}return n}}}),ml,Ii,xl,gt,Qo=C({"src/table/base.ts"(){"use strict";bn(),q(),tt(),yn(),ml=[Ts(1)],gt=class extends(xl=E){constructor(e,t,s,i,r,n=[],l){super(void 0,r,n,l),this.append(new Ue(t,"table-syntax",r,n),new Cs(i,"table-attrs",s,r,n))}escape(){}},Ii=te(xl),gt=Z(Ii,0,"TableBaseToken",ml,gt),Y(Ii,1,gt)}}),vl,Ni,ke,ns,It,Nt,ws,Jo=C({"src/table/td.ts"(){"use strict";M(),ae(),mn(),j(),q(),Qo(),ws=class extends(Ni=gt,vl=[ks(!1)],Ni){constructor(e,t,s,i=[]){var a;let r=/\||\0\d+!\x7F/u.exec(t!=null?t:""),n=r?t.slice(0,r.index):"";/\[\[|-\{/u.test(n)&&(r=null,n=""),super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",n,s,i),Y(ns,5,this),je(this,It),je(this,ke,""),r&&([Va(this,ke)._]=r);const l=new E(t==null?void 0:t.slice(((a=r==null?void 0:r.index)!=null?a:NaN)+ue(this,ke).length),s,i);l.type="td-inner",l.setAttribute("stage",4),this.insertAt(l)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return Gi(this,It,Nt).call(this).subtype}afterBuild(){ue(this,ke).includes("\0")&&be(this,ke,this.buildFromStr(ue(this,ke),0)),super.afterBuild()}toString(e){const{childNodes:[t,s,i]}=this;return t.toString(e)+s.toString(e)+ue(this,ke)+i.toString(e)}text(){const{childNodes:[e,t,s]}=this;return e.text()+t.text()+ue(this,ke)+s.text()}getGaps(e){return e===1?ue(this,ke).length:0}lint(e=this.getAbsoluteIndex(),t){{const s=super.lint(e,t),i=new re(this,e+this.getRelativeIndex(this.length-1)),r="pipe-like",{lintConfig:n}=I,{computeEditInfo:l,fix:a}=n,o=["td","double"].map(u=>n.getSeverity(r,u));for(const u of this.lastChild.childNodes)if(u.type==="text"){const{data:d}=u;if(d.includes("|")){const h=d.includes("||"),g=o[h?1:0];if(g){const c=B(u,i,r,"pipe-in-table",g);if(l||a)if(h){const p={caption:"|+",td:"|",th:"!"}[this.subtype];c.fix=_e(c,"newline",d.replace(/\|\|/gu,`
14
- ${p}`))}else l&&(c.suggestions=[pn(c.startIndex,d)]);s.push(c)}}}return s}}isIndependent(){return this.firstChild.text().startsWith(`
15
- `)}getAttr(e){{const t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}}escape(){}print(){const{childNodes:[e,t,s]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${ue(this,ke)}${s.print()}</span>`}json(e,t=this.getAbsoluteIndex()){}},ns=te(Ni),ke=new WeakMap,It=new WeakSet,Nt=function(){var e;const t=this.firstChild.text(),s=t.slice(-1);let i="td";if(s==="!"?i="th":s==="+"&&(i="caption"),this.isIndependent())return{subtype:i};const{previousSibling:r}=this;return ce({},Gi(e=r,It,Nt).call(e))},Nt=Z(ns,17,"#getSyntax",vl,It,Nt),an(ns,ws)}}),Tn,Xo=C({"src/table/trBase.ts"(){"use strict";M(),j(),Qo(),Jo(),Tn=class extends gt{lint(e=this.getAbsoluteIndex(),t){{const s=super.lint(e,t),i=this.childNodes.find(({type:a})=>a==="table-inter");if(!i)return s;const r=Ut(i),n="fostered-content",l=r&&I.lintConfig.getSeverity(n,r===2?void 0:"transclusion");if(l){const a=B(i,{start:e},n,"content-outside-table",l);a.startIndex++,a.startLine++,a.startCol=0,s.push(a)}return s}}getRowCount(){return Number(this.childNodes.some(e=>e instanceof ws&&e.isIndependent()&&!e.firstChild.text().endsWith("+")))}}}}),bl,yl,wl,Sl,Li,rs,fs,Cu=C({"src/table/index.ts"(){"use strict";M(),Ce(),ae(),mn(),j(),Xo(),tt(),bl=(e,t)=>new Array(e).fill(void 0).map((s,i)=>t(i)),yl=({type:e})=>e==="tr"||e==="table-syntax",wl=class extends Array{},fs=class extends(Li=Tn,Sl=[ks(!1)],Li){constructor(e,t,s,i){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,e,"table",t,s,i,{}),Y(rs,5,this)}get type(){return"table"}get closed(){return this.lastChild.is("table-syntax")}lint(e=this.getAbsoluteIndex(),t){{const s=super.lint(e,t),i=new re(this,e),r=["unclosed-table","table-layout"],n=r.map(l=>I.lintConfig.getSeverity(l));if(n[0]&&!this.closed&&s.push(B(this.firstChild,i,r[0],"unclosed-table",n[0])),n[1]){const l=this.getLayout(),{length:a}=l;if(a>1){let o=1,u=1/0,d=0;for(;d<a;d++){const h=l[d],g=h.length;if(g<o)break;g<u&&(u=g);const c=h.indexOf(h[g-1])+1;if(c>u)break;c>o&&(o=c)}if(d<a){const h=this.getNthRow(d),g=B(h,i,r[1],"inconsistent-table",n[1]);g.startIndex++,g.startLine++,g.startCol=0,s.push(g)}}}return s}}close(e=`
16
- |}`,t){me.run(()=>{const s=new Ue(t?e:void 0,"table-syntax",this.getAttribute("config"),this.getAttribute("accum"));super.insertAt(s)})}getLayout(e){{const t=this.getAllRows(),{length:s}=t,i=wl.from(bl(s,()=>[]));for(let r=0;r<i.length;r++){const n=i[r];let l=0,a=0,o;for(const u of t[r].childNodes.slice(2))if(u.is("td")){if(u.isIndependent()&&(o=u.subtype!=="caption"),o){const d={row:r,column:l},{rowspan:h,colspan:g}=u;for(l++;n[a];)a++;for(let c=r;c<Math.min(r+h,s);c++)for(let p=a;p<a+g;p++)i[c][p]=d;a+=g}}else if(yl(u))break}return i}}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(e=>e.is("tr")&&e.getRowCount()>0)]}getNthRow(e,t,s){{const i=super.getRowCount();if(e===0&&i)return this;i&&e--;for(const r of this.childNodes.slice(2)){const{type:n}=r;if(n==="tr"&&r.getRowCount()&&(e--,e<0))return r}return}}json(e,t=this.getAbsoluteIndex()){}},rs=te(Li),Z(rs,1,"getLayout",Sl,fs),an(rs,fs)}}),Ko,Iu=C({"src/table/tr.ts"(){"use strict";Xo(),Ko=class extends Tn{get type(){return"tr"}constructor(e,t,s,i){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,e,"tr",t,s,i)}}}}),Cn,Yo=C({"src/nowiki/listBase.ts"(){"use strict";it(),Cn=class extends $e{get indent(){}json(e,t=this.getAbsoluteIndex()){}}}}),In,Zo=C({"src/nowiki/dd.ts"(){"use strict";Yo(),In=class extends Cn{get type(){return"dd"}}}}),ea={};ie(ea,{parseTable:()=>ta});var Al,Fi,ta,Nu=C({"parser/table.ts"(){"use strict";q(),Cu(),Iu(),Jo(),Zo(),Al=e=>e.lastChild.constructor!==E,Fi=(e,t)=>e.is("td")?t.pop():e,ta=({firstChild:{data:e},type:t,name:s},i,r)=>{const n=[],l=e.split(`
17
- `);let a=t==="root"||t==="parameter-value"||t==="ext-inner"&&s==="poem"?"":`
18
- ${l.shift()}`,o;const u=(d,h)=>{if(!h){a+=d;return}const{lastChild:g}=h;if(Al(h)){const c=new E(d,i,r);c.type="table-inter",c.setAttribute("stage",3),h.insertAt(c)}else g.setText(g.toString()+d)};for(const d of l){o=n.pop();const[h]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(d),g=d.slice(h.length),c=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(g);if(c){for(;o&&!o.is("td");)o=n.pop();const[,w,y,A,k]=c;w&&new In(w,i,r),u(`
19
- ${h}${w&&`\0${r.length-1}d`}${y}\0${r.length}b`,o),n.push(...o?[o]:[],new fs(A,k,i,r));continue}else if(!o){a+=`
20
- ${d}`;continue}const p=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(g);if(!p){u(`
21
- ${d}`,o),n.push(o);continue}const[,x,m,v,S]=p;if(x){for(;!o.is("table");)o=n.pop();o.close(`
22
- ${h}${x}`,!0),u(S,n[n.length-1])}else if(m){o=Fi(o,n),o.is("tr")&&(o=n.pop());const w=new Ko(`
23
- ${h}${m}`,S,i,r);n.push(o,w),o.insertAt(w)}else{o=Fi(o,n);const w=v==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu;let y=w.exec(S),A=0,k=`
24
- ${h}${v}`;const $=b=>{const _=new ws(k,S.slice(A,y==null?void 0:y.index),i,r);return b.insertAt(_),_};for(;y;)$(o),{lastIndex:A}=w,[k]=y,y=w.exec(S);n.push(o,$(o))}}return a.slice(1)}}}),qt,Lu=C({"../cm-util/dist/index.mjs"(){"use strict";qt=e=>!/^_{2}.+_{2}$/u.test(e)}}),sa,Fu=C({"src/nowiki/hr.ts"(){"use strict";it(),sa=class extends $e{get type(){return"hr"}}}}),kl,Ei,_l,Wt,Eu=C({"src/nowiki/doubleUnderscore.ts"(){"use strict";var e,t;et(),He(),it(),kl=[ze(),Pe("__")],Wt=(t=class extends(_l=$e){constructor(i,r,n,l,a){var h,g;super(i,l,a);N(this,e);const o=i.toLowerCase(),{doubleUnderscore:[,,u,d]}=l;this.setAttribute("name",(g=r?(h=d==null?void 0:d[i])==null?void 0:h.toLowerCase():u==null?void 0:u[o])!=null?g:o),L(this,e,n)}get type(){return"double-underscore"}toString(){const i=f(this,e)?"__":"__";return i+this.innerText+i}print(){const i=f(this,e)?"__":"__";return super.print({pre:i,post:i})}},e=new WeakMap,t),Ei=te(_l),Wt=Z(Ei,0,"DoubleUnderscoreToken",kl,Wt),Y(Ei,1,Wt)}}),ia={};ie(ia,{parseHrAndDoubleUnderscore:()=>na});var na,Ru=C({"parser/hrAndDoubleUnderscore.ts"(){"use strict";Lu(),Fu(),Eu(),vo(),na=({firstChild:{data:e},type:t,name:s},i,r)=>{var u,d,h;const{doubleUnderscore:[n,l,a]}=i,o=[...n,...l];return(u=i.insensitiveDoubleUnderscore)!=null||(i.insensitiveDoubleUnderscore=new Set(n.filter(qt))),(d=i.sensitiveDoubleUnderscore)!=null||(i.sensitiveDoubleUnderscore=new Set(l.filter(qt))),(h=i.regexHrAndDoubleUnderscore)!=null||(i.regexHrAndDoubleUnderscore=new RegExp(`__(${o.filter(qt).join("|")})__|_{2}(${o.filter(g=>!qt(g)).map(g=>g.slice(2,-2)).join("|")})_{2}`,"giu")),t!=="root"&&(t!=="ext-inner"||s!=="poem")&&(e=`\0${e}`),e=e.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(g,c,p)=>(new sa(p,i,r),`${c}\0${r.length-1}r`)).replace(i.regexHrAndDoubleUnderscore,(g,c,p)=>{var w;const x=c!=null?c:p,m=i.sensitiveDoubleUnderscore.has(x),v=x.toLowerCase(),S=i.insensitiveDoubleUnderscore.has(v);return m||S?(new Wt(x,m,!!p,i,r),`\0${r.length-1}${S&&((w=a==null?void 0:a[v])!=null?w:v)==="toc"?"u":"n"}`):g}),i.excludes.includes("heading")||(e=e.replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(g,c,p,x,m)=>{const v=`${c}\0${r.length}h`;return new ot(p.length,[x,m],i,r),v})),t==="root"||t==="ext-inner"&&s==="poem"?e:e.slice(1)}}}),ra,Pu=C({"src/nowiki/quote.ts"(){"use strict";var e,t;M(),ae(),j(),it(),ra=(t=class extends $e{constructor(i,r,n,l){super(i,n,l);N(this,e);L(this,e,r)}get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}get closing(){return ce(ce({},this.bold?{bold:f(this,e).bold}:void 0),this.italic?{italic:f(this,e).italic}:void 0)}text(){const{parentNode:i,innerText:r}=this;return i!=null&&i.is("image-parameter")&&i.name!=="caption"?"":r}lint(i=this.getAbsoluteIndex()){var r;{const{previousSibling:n,bold:l,closing:a}=this,o=(n==null?void 0:n.type)==="text"?n.data:void 0,u=[],d=new re(this,i),h=["lonely-apos","bold-header"],{lintConfig:g}=I,{computeEditInfo:c}=g,p=[void 0,"word"].map(m=>g.getSeverity(h[0],m)),x=g.getSeverity(h[1]);if(o!=null&&o.endsWith("'")){const m=p[(a.bold||a.italic)&&/[a-z\d]'$/iu.test(o)?1:0];if(m){const v=z(this,d,h[0],I.msg("lonely","'"),m),{startLine:S,startCol:w}=v,[,{length:y}]=/(?:^|[^'])('+)$/u.exec(o),A=i-y,k=Fe(ce({},v),{startIndex:A,endIndex:i,endLine:S,startCol:w-y,endCol:w});c&&(k.suggestions=[bt(A,"&apos;",y),H(k)]),u.push(k)}}if(x&&l&&((r=this.closest("heading-title,ext"))==null?void 0:r.type)==="heading-title"){const m=z(this,d,h[1],"bold-in-header",x);c&&(m.suggestions=[H(m)]),u.push(m)}return u}}json(i,r=this.getAbsoluteIndex()){}},e=new WeakMap,t)}}),la={};ie(la,{parseQuotes:()=>Nn});var Nn,oa=C({"parser/quotes.ts"(){"use strict";Pu(),Nn=(e,t,s,i)=>{var c;const r=e.split(/('{2,})/u),{length:n}=r;if(n===1)return e;let l=0,a=0,o,u,d;for(let p=1;p<n;p+=2){const x=r[p].length;switch(x){case 2:a++;break;case 4:r[p-1]+="'",r[p]="'''";case 3:if(l++,o!==void 0)break;r[p-1].endsWith(" ")?u===void 0&&d===void 0&&(d=p):r[p-1].slice(-2,-1)===" "?o=p:u!=null||(u=p);break;default:r[p-1]+="'".repeat(x-5),r[p]="'''''",a++,l++}}if(a%2===1&&l%2===1){const p=(c=o!=null?o:u)!=null?c:d;p!==void 0&&(r[p]="''",r[p-1]+="'")}let h=!0,g=!0;for(let p=1;p<n;p+=2){const x=r[p].length,m=x!==2,v=x!==3;m&&(h=!h),v&&(g=!g),new ra(r[p],{bold:m&&h,italic:v&&g},t,s),r[p]=`\0${s.length-1}q`}return r.join("")}}}),aa={};ie(aa,{parseExternalLinks:()=>Ln});var Ln,ua=C({"parser/externalLinks.ts"(){"use strict";de(),Oo(),$n(),Ln=(e,t,s,i)=>{var r;return(r=t.regexExternalLinks)!=null||(t.regexExternalLinks=new RegExp(String.raw`\[((?:\0\d+[cn]\x7F)*(?:\0\d+f\x7F|(?:(?:${t.protocol}|//)${ft}|\0\d+m\x7F)${mt}(?=[[\]<>"\t${We}]|\0\d)))([${We}]*(?![${We}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),e.replace(t.regexExternalLinks,(n,l,a,o)=>{const{length:u}=s,d=/&[lg]t;/u.exec(l);return d&&(a="",o=l.slice(d.index)+a+o,l=l.slice(0,d.index)),i?(new Vt(l,"ext-link-url",t,s),`[\0${u}f${a}${o}]`):(new dt(l,a,o,t,s),`\0${u}w`)})}}}),da,Ou=C({"src/link/category.ts"(){"use strict";_s(),da=class extends Be{get type(){return"category"}get sortkey(){}json(e,t=this.getAbsoluteIndex()){}}}}),ha={};ie(ha,{parseLinks:()=>nn});var $l,nn,ju=C({"parser/links.ts"(){"use strict";de(),j(),oa(),ua(),Po(),Io(),Ou(),$l=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,nn=(e,t,s,i,r)=>{var o;(o=t.regexLinks)!=null||(t.regexLinks=new RegExp(String.raw`^\s*(?:${t.protocol}|//)`,"iu"));const n=t.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]]))?\]\]([\s\S]*)$/u:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])*)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]])?)?\]\]([\s\S]*)$/u,l=e.split("[[");let a=l.shift();for(let u=0;u<l.length;u++){let d=!1,h,g,c,p;const x=l[u],m=n.exec(x);if(m)[,h,g,c,p]=m,p.startsWith("]")&&(c!=null&&c.includes("["))&&(c+="]",p=p.slice(1));else{const k=$l.exec(x);k&&(d=!0,[,h,g,c]=k)}if(h===void 0||t.regexLinks.test(h)||/\0\d+[exhbru]\x7F/u.test(h)){a+=`[[${x}`;continue}let v=fe(h).trim();const S=v.startsWith(":");if(S&&d){a+=`[[${x}`;continue}else!v&&c&&!c.includes(`
25
- `)&&(v=fe(c).trim());const{ns:w,valid:y}=I.normalizeTitle(v,0,!1,t,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0,page:i});if(y){if(d){if(w!==6){a+=`[[${x}`;continue}let k=!1;for(u++;u<l.length;u++){const $=l[u],b=$.split("]]");if(b.length>2){k=!0,c+=`[[${b[0]}]]${b[1]}`,p=b.slice(2).join("]]");break}else if(b.length===2)c+=`[[${b[0]}]]${b[1]}`;else{c+=`[[${$}`;break}}if(c=nn(c,t,s,i,r),!k){a+=`[[${h}${g}${c}`;continue}}}else{a+=`[[${x}`;continue}c&&(c=Nn(c,t,s,r));let A=_n;S||(w===6?(c&&(c=Ln(c,t,s,!0)),A=kn):w===14&&(A=da)),c===void 0&&g&&(c=""),a+=`\0${s.length}l${p}`,new A(h,c,t,s,g)}return a}}}),ca={};ie(ca,{parseMagicLinks:()=>ga});var Ri,Pi,Oi,ji,ga,Bu=C({"parser/magicLinks.ts"(){"use strict";de(),$n(),Ri=String.raw`[${We}\t]|&nbsp;|&#0*160;|&#x0*a0;`,Pi=`(?:${Ri})+`,Oi=`(?:${Ri}|-)`,ji=String.raw`(?:RFC|PMID)${Pi}\d+\b|ISBN${Pi}(?:97[89]${Oi}?)?(?:\d${Oi}?){9}[\dx]\b`,ga=(e,t,s)=>{if(!t.regexMagicLinks)try{t.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${t.protocol})(${ft}${mt})|${ji})`,"giu")}catch(i){t.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${t.protocol})(${ft}${mt})|${ji})`,"giu")}return e.replace(t.regexMagicLinks,(i,r,n)=>{let l=r?i.slice(r.length):i;if(n){let a="";const o=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(l);o&&(a=l.slice(o.index),l=l.slice(0,o.index));const u=l.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,d=u.exec(l);if(d){let h=1;d[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(l.slice(0,d.index))&&(h=2),a=l.slice(d.index+h)+a,l=l.slice(0,d.index+h)}return a.length>=n.length?i:(new Vt(l,void 0,t,s),`${r}\0${s.length-1}w${a}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(l))return i;return new Vt(l,"magic-link",t,s),`${r}\0${s.length-1}i`})}}}),pa,qu=C({"util/html.ts"(){"use strict";pa=(e,t)=>e.startsWith(t)?t.length:[...t].findIndex((s,i)=>s!==e[i])}}),fa,Wu=C({"src/nowiki/list.ts"(){"use strict";Yo(),fa=class extends Cn{get type(){return"list"}}}}),ma={};ie(ma,{parseList:()=>xa});var xa,Mu=C({"parser/list.ts"(){"use strict";qu(),Wu(),Zo(),xa=(e,t,s,i)=>{const r=/^((?:\0\d+[cno]\x7F)*)([;:*#]+)(\s*)/u.exec(e);if(!r)return t.lastPrefix="",e;const[n,l,a,o]=r,u=a.replace(/;/gu,":"),d=pa(u,t.lastPrefix),h=((d>1?a.slice(d-1):a)+o).split(/(?=;)/u),g=h[0].startsWith(";");let c=h.length-(g?0:1);if(d>1){const T=a.slice(0,d-1);if(g){const F=T.split(/(?=;)/u);h.unshift(...F),c+=T.includes(";")?F.length:0}else h[0]=T+h[0]}t.lastPrefix=u;let p=l+h.map((T,F)=>`\0${i.length+F}d`).join("")+e.slice(n.length);for(const T of h)new fa(T,s,i);if(!c)return p;const{html:[x,,m]}=s,v=/:+|-\{|\0\d+[xq]\x7F/gu;let S=v,w=S.exec(p),y=0,A=!1,k=!1,$=0;const b=(T,F)=>(new In(T,s,i),`${p.slice(0,F)}\0${i.length-1}d${p.slice(F+T.length)}`),_=T=>{T?y&&y--:y++};for(;w&&c;){const{0:T,index:F}=w;if(T==="-{"){if(!$){const{lastIndex:R}=S;S=/-\{|\}-/gu,S.lastIndex=R}$++}else if(T==="}-"){if($--,!$){const{lastIndex:R}=S;S=v,S.lastIndex=R}}else if(T.endsWith("x")){const{name:R,closing:W,selfClosing:O}=i[Number(T.slice(1,-2))];(x.includes(R)||!O&&!m.includes(R))&&_(W)}else if(T.endsWith("q")){const{bold:R,italic:W}=i[Number(T.slice(1,-2))];R&&(_(A),A=!A),W&&(_(k),k=!k)}else if(y===0){if(T.length>=c)return b(T.slice(0,c),F);c-=T.length,S.lastIndex=F+4+String(i.length).length,p=b(T,F)}w=S.exec(p)}return p}}}),ls,Tl,Bi,Cl,Mt,zu=C({"src/converterFlags.ts"(){"use strict";var e,t;M(),ae(),$s(),j(),q(),st(),ls=new Set(["A","T","R","D","-","H","N"]),Tl=[Qt()],Mt=(t=class extends(Cl=E){constructor(i,r,n=[]){super(void 0,r,n,{});N(this,e);this.safeAppend(i.map(l=>new Te(l,"converter-flag",r,n)))}get type(){return"converter-flags"}afterBuild(){L(this,e,this.childNodes.map(i=>i.text().trim())),super.afterBuild()}toString(i){return super.toString(i,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(f(this,e).filter(i=>/\{{3}[^{}]+\}{3}/u.test(i)))}getVariantFlags(){const i=new Set(this.getAttribute("config").variants);return new Set(f(this,e).filter(r=>i.has(r)))}isInvalidFlag(i,r,n,l){return typeof i=="object"&&(i=i.text().trim(),r=this.getVariantFlags(),n=this.getUnknownFlags(),l=new Set(f(this,e).filter(a=>ls.has(a)))),!!i&&!r.has(i)&&!n.has(i)&&(r.size>0||!l.has(i))}lint(i=this.getAbsoluteIndex(),r){{const n=this.getVariantFlags(),l=this.getUnknownFlags(),a=new Set(f(this,e).filter(m=>ls.has(m))),o=f(this,e).filter(m=>!m).length,u=f(this,e).length-l.size-o,{lintConfig:d}=I,{computeEditInfo:h,fix:g}=d,c=super.lint(i,r);if(n.size===u||a.size===u)return c;const p="no-ignored",x=d.getSeverity(p,"conversionFlag");if(x){const m=new re(this,i);for(let v=0;v<this.length;v++){const S=this.childNodes[v],w=S.text().trim();if(this.isInvalidFlag(w,n,l,a)){const y=B(S,m,p,"invalid-conversion-flag",x);(h||g)&&(n.size===0&&ls.has(w.toUpperCase())?y.fix=gn(y,w):h&&(y.suggestions=[H(y,v&&-1)])),c.push(y)}}}return c}}print(){return super.print({sep:";"})}},e=new WeakMap,t),Bi=te(Cl),Mt=Z(Bi,0,"ConverterFlagsToken",Tl,Mt),Y(Bi,1,Mt)}}),os,ms,Uu=C({"src/converterRule.ts"(){"use strict";Ee(),j(),q(),st(),os=(e,t,s,i)=>{const r=new E(e,s,i);return r.type=`converter-rule-${t}`,r.setAttribute("stage",pe),r},ms=class extends E{get type(){return"converter-rule"}get variant(){}constructor(e,t=!0,s=I.getConfig(),i=[]){super(void 0,s,i,{});const r=e.indexOf(":"),n=e.slice(0,r).indexOf("=>"),l=n===-1?e.slice(0,r):e.slice(n+2,r);t&&s.variants.includes(l.trim().toLowerCase())?(super.insertAt(new Te(l,"converter-rule-variant",s,i)),super.insertAt(os(e.slice(r+1),"to",s,i)),n!==-1&&super.insertAt(os(e.slice(0,n),"from",s,i),0)):super.insertAt(os(e,"to",s,i))}toString(e){const{childNodes:t,firstChild:s,lastChild:i}=this;return t.length===3?`${s.toString(e)}=>${t[1].toString(e)}:${i.toString(e)}`:super.toString(e,":")}text(){const{childNodes:e,firstChild:t,lastChild:s}=this;return e.length===3?`${t.text()}=>${e[1].text()}:${s.text()}`:super.text(":")}getGaps(e){return e===0&&this.length===3?2:1}print(){const{childNodes:e}=this;if(e.length===3){const[t,s,i]=e;return`<span class="wpb-converter-rule">${t.print()}=>${s.print()}:${i.print()}</span>`}return super.print({sep:":"})}json(e,t=this.getAbsoluteIndex()){}}}}),Il,qi,Nl,zt,Hu=C({"src/converter.ts"(){"use strict";de(),He(),Re(),q(),zu(),Uu(),Il=[Ne,Pe("-{")],zt=class extends(Nl=E){get type(){return"converter"}constructor(e,t,s,i=[]){super(void 0,s,i),this.insertAt(new Mt(e,s,i));const[r]=t,n=r.includes(":"),l=new ms(r,n,s,i);(n?l.length===1:t.length===2&&!fe(t[1]).trim())?this.insertAt(new ms(t.join(";"),!1,s,i)):this.safeAppend([l,...t.slice(1).map(a=>new ms(a,!0,s,i))])}toString(e){const{childNodes:[t,...s]}=this;return`-{${t.toString(e)}${t.length>0?"|":""}${s.map(i=>i.toString(e)).join(";")}}-`}text(){const{childNodes:[e,...t]}=this;return`-{${e.text()}|${Ye(t,";")}}-`}getGaps(e){return e||this.firstChild.length>0?1:0}print(){const{childNodes:[e,...t]}=this;return`<span class="wpb-converter">-{${e.print()}${e.length>0?"|":""}${vt(t,{sep:";"})}}-</span>`}},qi=te(Nl),zt=Z(qi,0,"ConverterToken",Il,zt),Y(qi,1,zt)}}),va={};ie(va,{parseConverter:()=>ba});var ba,Du=C({"parser/converter.ts"(){"use strict";Hu(),ba=(e,t,s)=>{var o;(o=t.regexConverter)!=null||(t.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${t.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"iu"));const i=/-\{/gu,r=/-\{|\}-/gu,n=[];let l=i,a=l.exec(e);for(;a;){const{0:u,index:d}=a;if(u==="}-"){const h=n.pop(),{length:g}=s,c=e.slice(h.index+2,d),p=c.indexOf("|"),[x,m]=p===-1?[[],c]:[c.slice(0,p).split(";"),c.slice(p+1)],v=m.replace(/(&[#a-z\d]+);/giu,"$1"),S=v.split(t.regexConverter).map(w=>w.replace(/\x01/gu,";"));new zt(x,S,t,s),e=`${e.slice(0,h.index)}\0${g}v${e.slice(d+2)}`,n.length===0&&(l=i),l.lastIndex=h.index+3+String(g).length}else n.push(a),l=r,l.lastIndex=d+2;a=l.exec(e)}return e}}}),Ss={};ie(Ss,{Token:()=>E});var Ll,E,q=C({"src/index.ts"(){"use strict";var e,t,s,i,r,n,l,a,o,ya,wa,Sa,Aa,ka,_a,$a,Ta,Ca,Ia,Na,La,A;de(),Ee(),M(),Ce(),j(),eu(),tu(),Ll=["category","html-attr#id,ext-attr#id,table-attr#id"],E=(A=class extends Ft{constructor(b,_=I.getConfig(),T=[],F){super();N(this,o);N(this,e,"plain");N(this,t,0);N(this,s);N(this,i);N(this,r);N(this,n,!1);N(this,l);N(this,a);typeof b=="string"&&this.insertAt(b),L(this,s,_),L(this,i,T),T.push(this)}get type(){return f(this,e)}set type(b){L(this,e,b)}get pageName(){return f(this.getRootNode(),a)}set pageName(b){if(b){const _=this.normalizeTitle(b,0,{temporary:!0,page:""});L(this,a,_.valid?_.title:void 0)}else L(this,a,b===""?"":void 0)}parseOnce(b=f(this,t),_=!1,T){if(b<f(this,t)||this.length===0||!this.isPlain())return this;if(f(this,t)>=pe)return this;switch(b){case 0:if(this.type==="root"){f(this,i).pop();const F=P(this,o,ya).call(this);_&&(_=!F)}L(this,r,_),P(this,o,wa).call(this,_);break;case 1:P(this,o,Sa).call(this);break;case 2:P(this,o,Aa).call(this);break;case 3:P(this,o,ka).call(this);break;case 4:P(this,o,_a).call(this);break;case 5:P(this,o,$a).call(this,T);break;case 6:P(this,o,Ta).call(this,T);break;case 7:P(this,o,Ca).call(this);break;case 8:P(this,o,Ia).call(this);break;case 9:P(this,o,Na).call(this);break;case 10:P(this,o,La).call(this)}if(this.type==="root")for(const F of f(this,i))F==null||F.parseOnce(b,_,T);return zn(this,t)._++,this}buildFromStr(b,_){const T=b.split(/[\0\x7F]/u).map((F,R)=>{if(R%2===0)return new Ki(F);if(isNaN(F.slice(-1)))return f(this,i)[Number(F.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${F}`)});return _===0?T.map(String).join(""):_===1?Ye(T):T}build(){L(this,t,pe);const{length:b,firstChild:_}=this,T=_==null?void 0:_.toString();if(b===1&&_.type==="text"&&T.includes("\0")&&(Fn(this,0,1,this.buildFromStr(T)),this.normalize(),this.type==="root"))for(const F of f(this,i))F==null||F.build()}afterBuild(){if(this.type==="root")for(const b of f(this,i))b==null||b.afterBuild();L(this,n,!0)}parse(b=pe,_,T){for(b=Math.min(b,pe);f(this,t)<b;)this.parseOnce(f(this,t),_,T);return b&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===A}getAttribute(b){var _;switch(b){case"config":return f(this,s);case"include":return(_=f(this,r))!=null?_:!!f(this.getRootNode(),r);case"accum":return f(this,i);case"built":return f(this,n);case"stage":return f(this,t);case"invalid":return this.type==="table-inter"&&Ut(this)===2;default:return super.getAttribute(b)}}setAttribute(b,_){switch(b){case"stage":f(this,t)===0&&this.type==="root"&&f(this,i).shift(),L(this,t,_);break;default:super.setAttribute(b,_)}}insertAt(b,_=this.length){const T=typeof b=="string"?new Ki(b):b;super.insertAt(T,_);const{type:F}=T;return F==="root"&&(T.type="plain"),T}normalizeTitle(b,_=0,T){return I.normalizeTitle(b,_,this.getAttribute("include"),f(this,s),ce({page:this.pageName},T))}inTableAttrs(){var b,_;return((b=this.closest("table-attrs,ext"))==null?void 0:b.type)==="table-attrs"&&((_=this.closest("table-attrs,arg,magic-word,template"))!=null&&_.is("table-attrs")?2:1)}inHtmlAttrs(){var b;return(b=this.closest("html-attrs,ext"))!=null&&b.is("html-attrs")?2:this.inTableAttrs()}lint(b=this.getAbsoluteIndex(),_){var T;{const{lintConfig:F}=I,{computeEditInfo:R,fix:W,ignoreDisables:O,configurationComment:J}=F;let le=super.lint(b,_);if(this.type==="root"){const ee=new Map,D="no-duplicate",G=["category","id"].map(V=>F.getSeverity(D,V)),Se=this.toString(),Le=Ll.filter((V,K)=>G[K]).join();if(Le){for(const V of this.querySelectorAll(Le)){let K;if(V.is("category"))K=V.name;else{const Q=V.getValue();Q&&Q!==!0&&(K=`#${Q}`)}if(K){const Q=ee.get(K);Q?Q.add(V):ee.set(K,new Set([V]))}}for(const[V,K]of ee)if(K.size>1&&!V.startsWith("#mw-customcollapsible-")){const Q=!V.startsWith("#"),se=`duplicate-${Q?"category":"id"}`,oe=G[Q?0:1];le.push(...[...K].map(he=>{const U=z(he,{start:he.getAbsoluteIndex()},D,se,oe);return R&&Q&&(U.suggestions=[H(U)]),U}))}}if(!O){const V=new RegExp(String.raw`<!--\s*${J}-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->`,"gu"),K=[];let Q=V.exec(Se);for(;Q;){const{1:se,index:oe}=Q,he=(T=Q[2])==null?void 0:T.trim();K.push({line:this.posFromIndex(oe).top+(se==="disable-line"?0:1),from:se==="disable"?V.lastIndex:void 0,to:se==="enable"?V.lastIndex:void 0,rules:he?new Set(he.split(",").map(U=>U.trim())):void 0}),Q=V.exec(Se)}le=le.filter(({rule:se,startLine:oe,startIndex:he})=>{const U={pos:0};for(const{line:xe,from:ve,to:Oe,rules:nt}of K){if(xe>oe+1)break;if(nt&&!nt.has(se))continue;if(xe===oe&&ve===void 0&&Oe===void 0)return!1;ve<=he&&ve>U.pos?(U.pos=ve,U.type="from"):Oe<=he&&Oe>U.pos&&(U.pos=Oe,U.type="to")}return U.type!=="from"})}if(W&&le.some(({fix:V})=>V)){const V=le.map(({fix:se})=>se).filter(Boolean).sort(({range:[se,oe]},{range:[he,U]})=>oe===U?he-se:U-oe);let K=1/0,Q=Se;for(const{range:[se,oe],text:he}of V)oe<=K&&(Q=Q.slice(0,se)+he+Q.slice(oe),K=se);Object.assign(le,{output:Q})}if(!R)for(const V of le)delete V.fix,delete V.suggestions}return le}}toString(b,_){return b?super.toString(!0,_):Xe(f(this,l),()=>super.toString(!1,_),T=>{const F=this.getRootNode();F.type==="root"&&f(F,n)&&L(this,l,T)})}},e=new WeakMap,t=new WeakMap,s=new WeakMap,i=new WeakMap,r=new WeakMap,n=new WeakMap,l=new WeakMap,a=new WeakMap,o=new WeakSet,ya=function(){const{parseRedirect:b}=(nu(),X(to)),_=this.firstChild.toString(),T=b(_,f(this,s),f(this,i));return T&&this.setText(T),!!T},wa=function(b){const{parseCommentAndExt:_}=(Ls(),X(Do));this.setText(_(this.firstChild.toString(),f(this,s),f(this,i),b))},Sa=function(){const{parseBraces:b}=(An(),X(wo)),_=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,T=b(_,f(this,s),f(this,i));this.setText(this.type==="root"?T:T.slice(1))},Aa=function(){if(f(this,s).excludes.includes("html"))return;const{parseHtml:b}=(Tu(),X(Go));this.setText(b(this.firstChild.toString(),f(this,s),f(this,i)))},ka=function(){if(f(this,s).excludes.includes("table"))return;const{parseTable:b}=(Nu(),X(ea));this.setText(b(this,f(this,s),f(this,i)))},_a=function(){if(f(this,s).excludes.includes("hr"))return;const{parseHrAndDoubleUnderscore:b}=(Ru(),X(ia));this.setText(b(this,f(this,s),f(this,i)))},$a=function(b){const{parseLinks:_}=(ju(),X(ha));this.setText(_(this.firstChild.toString(),f(this,s),f(this,i),this.pageName,b))},Ta=function(b){if(f(this,s).excludes.includes("quote"))return;const{parseQuotes:_}=(oa(),X(la)),T=this.firstChild.toString().split(`
26
- `);for(let F=0;F<T.length;F++)T[F]=_(T[F],f(this,s),f(this,i),b);this.setText(T.join(`
27
- `))},Ca=function(){if(f(this,s).excludes.includes("extLink"))return;const{parseExternalLinks:b}=(ua(),X(aa));this.setText(b(this.firstChild.toString(),f(this,s),f(this,i)))},Ia=function(){if(f(this,s).excludes.includes("magicLink"))return;const{parseMagicLinks:b}=(Bu(),X(ca));this.setText(b(this.firstChild.toString(),f(this,s),f(this,i)))},Na=function(){if(f(this,s).excludes.includes("list"))return;const{parseList:b}=(Mu(),X(ma)),{firstChild:_,type:T,name:F}=this,R=_.toString().split(`
28
- `),W={lastPrefix:""};let O=T==="root"||T==="ext-inner"&&F==="poem"?0:1;for(;O<R.length;O++)R[O]=b(R[O],W,f(this,s),f(this,i));this.setText(R.join(`
29
- `))},La=function(){if(f(this,s).variants.length>0){const{parseConverter:b}=(Du(),X(va));this.setText(b(this.firstChild.toString(),f(this,s),f(this,i)))}},A)}}),me,Fs,Fn,Ce=C({"util/debug.ts"(){"use strict";me={running:!1,run(e){const{running:t}=this;this.running=!0;try{const{Token:s}=(q(),X(Ss)),i=e();return i instanceof s&&!i.getAttribute("built")&&i.afterBuild(),this.running=t,i}catch(s){throw this.running=t,s}},rev:0},Fs=e=>t=>t.type===e,Fn=(e,t,s,i=[])=>{var l,a;let r=e.getChildNodes(),n;r.length===s?(n=r,r=i):n=Array.prototype.splice.apply(r,[t,s,...i]);for(let o=0;o<i.length;o++){const u=i[o];u.setAttribute("parentNode",e),u.setAttribute("nextSibling",r[t+o+1]),u.setAttribute("previousSibling",r[t+o-1])}return(l=r[t-1])==null||l.setAttribute("nextSibling",r[t]),(a=r[t+i.length])==null||a.setAttribute("previousSibling",r[t+i.length-1]),r===i&&e.setAttribute("childNodes",r),n}}}),lt,Wi,as,Mi,Fl,zi,El,rn,Gu=C({"lib/lintConfig.ts"(){"use strict";var e,t;Ul(),lt=new Map([[0,!1],[1,"warning"],[2,"error"],[!1,!1],["off",!1],["warning","warning"],["error","error"]]),Wi={"bold-header":[1,{}],"format-leakage":[1,{}],"fostered-content":[1,{}],h1:[1,{}],"illegal-attr":[2,{}],"insecure-style":2,"invalid-gallery":[2,{parameter:1}],"invalid-imagemap":[2,{}],"invalid-invoke":[2,{}],"invalid-isbn":2,"invalid-url":1,"lonely-apos":[1,{}],"lonely-bracket":[1,{extLink:2}],"lonely-http":[1,{}],"nested-link":[2,{}],"no-arg":1,"no-duplicate":[2,{category:1,id:1,unknownImageParameter:1}],"no-ignored":[2,{fragment:1,galleryComment:1,galleryNoImage:1,include:1,nonWordAttributes:1,redirect:1}],"obsolete-attr":1,"obsolete-tag":1,"parsing-order":[2,{templateInTable:1}],"pipe-like":[1,{double:2}],"table-layout":1,"tag-like":[2,{disallowed:1,invalid:1}],"unbalanced-header":2,"unclosed-comment":[1,{}],"unclosed-quote":1,"unclosed-table":2,unescaped:2,"unknown-page":1,"unmatched-tag":[1,{both:2,selfClosing:2}],"unterminated-url":[1,{}],"url-encoding":[1,{}],"var-anchor":[1,{}],"void-ext":[2,{}]},Object.freeze(Wi),as={configurationComment:"lint",ignoreDisables:!1,fix:!0,computeEditInfo:!0},Object.freeze(as),Mi=s=>lt.has(s),Fl=s=>Mi(s)||Array.isArray(s)&&Mi(s[0])&&(s.length===1||typeof s[1]=="object"),zi=(s,i,r)=>{if(xs.includes(i)){if(r===void 0)return!1;if(Fl(r))return s[i]=r,!0}else throw new RangeError(`Unknown lint rule: ${i}`);throw new RangeError(`Invalid lint config for ${i}: ${JSON.stringify(r)}`)},El=class{constructor(s){if(Object.assign(this,JSON.parse(JSON.stringify(Wi))),!!s)for(const[i,r]of Object.entries(s))zi(this,i,r)}getSeverity(s,i){var n,l;const r=this[s];return typeof r!="object"?lt.get(r):i&&(l=lt.get((n=r[1])==null?void 0:n[i]))!=null?l:lt.get(r[0])}},rn=(t=class{constructor(s){N(this,e);if(Object.assign(this,as),s&&!("rules"in s)&&Object.keys(s).some(r=>xs.includes(r)))this.rules=s;else{const i=s!=null?s:{},{rules:r}=i,n=Mn(i,["rules"]);this.rules=r;for(const[l,a]of Object.entries(n))a!==void 0&&Object.prototype.hasOwnProperty.call(as,l)&&(this[l]=a)}}get rules(){return f(this,e)}set rules(s){L(this,e,new Proxy(new El(s),{set:zi,deleteProperty(){return!1}}))}getSeverity(s,i){return f(this,e).getSeverity(s,i)}},e=new WeakMap,t)}}),Fa={};ie(Fa,{Title:()=>Ea});var Ui,Ea,Vu=C({"lib/title.ts"(){"use strict";var e,t,s,i,r,n,Ra,a;Ze(),de(),Ui=o=>{const[,{length:u},d]=/^((?:\.\.\/)*)([\s\S]*)/u.exec(o);return[u/3,d]},Ea=(a=class{constructor(o,u,d,{temporary:h,decode:g,selfLink:c,page:p}={}){N(this,n);N(this,e);N(this,t);N(this,s);N(this,i);N(this,r);Ie(this,"page");Ie(this,"valid");Ie(this,"encoded",!1);this.page=p;const x=o.trim(),m=x.startsWith("../");if(g&&o.includes("%"))try{const y=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(o);o=Dt(o),this.encoded=y}catch(y){}if(o=vs(o).replace(/[_ ]+/gu," ").trim(),m||p&&x.startsWith("/"))L(this,i,0);else{let y=u;o.startsWith(":")&&(y=0,o=o.slice(1).trim());const A=o.split(":");if(A.length>1){const k=xt(A[0]),$=Object.prototype.hasOwnProperty.call(d.nsid,k)&&d.nsid[k];$&&(y=$,o=A.slice(1).join(":").trim())}L(this,i,y)}const v=o.indexOf("#");if(v!==-1){let y=o.slice(v).trim().slice(1);if(y.includes("%"))try{y=Dt(y)}catch(A){}L(this,r,y.replace(/ /gu,"_")),o=o.slice(0,v).trim()}const[S,w]=m?Ui(o):[0,o];this.valid=!!(o||c&&this.ns===0&&f(this,r)!==void 0)&&vs(o)===o&&(S===0||p===void 0||p.split("/",S+1).length>S)&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(w),this.main=o,L(this,t,d.namespaces),L(this,s,d.articlePath||"/wiki/$1"),f(this,s).includes("$1")||L(this,s,f(this,s)+`${f(this,s).endsWith("/")?"":"/"}$1`),h||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return f(this,i)}get fragment(){return f(this,r)}get main(){return f(this,e)}set main(o){o=o.replace(/_/gu," ").trim(),L(this,e,o&&o[0].toUpperCase()+o.slice(1))}get prefix(){const o=f(this,t)[this.ns];return o+(o&&":")}get title(){return this.getRedirection()[1]}get extension(){const{main:o}=this,u=o.lastIndexOf(".");return u===-1?void 0:o.slice(u+1).toLowerCase()}getRedirection(){const{prefix:o}=this,u=o;return P(this,n,Ra).call(this,u)}setFragment(o){L(this,r,o)}getUrl(o){throw new Error("Title.getUrl method is only available in the LSP version!")}},e=new WeakMap,t=new WeakMap,s=new WeakMap,i=new WeakMap,r=new WeakMap,n=new WeakSet,Ra=function(o){var d,h;let u=(o+this.main).replace(/ /gu,"_");if(u.startsWith("/"))u=((d=this.page)!=null?d:"")+u.replace(/(.)\/$/u,"$1");else if(u.startsWith("../")&&((h=this.page)!=null&&h.includes("/"))){const[g,c]=Ui(u),p=this.page.split("/");p.length>g&&(u=p.slice(0,-g).join("/")+(c&&"/")+c)}return[!1,u]},a)}}),Pa={};ie(Pa,{default:()=>I});Oa.exports=X(Pa);var us,Hi,Rl,Ve,Di,Pl,I,j=C({"index.ts"(){Ul(),Ce(),Ee(),de(),Gu(),us=!0,Hi=new rn,Ve={config:Vi,get rules(){return xs},get i18n(){return ce(ce({},Gl),Rl)},set i18n(e){Rl=e},get lintConfig(){return Hi},set lintConfig(e){Hi=new rn(e)},get viewOnly(){return us},set viewOnly(e){us&&!e&&me.rev++,us=e},getConfig(e){const t=e!=null?e:this.config,{doubleUnderscore:s,ext:i,parserFunction:r,variable:n}=t;for(let l=0;l<2;l++)s.length>l+2&&s[l].length===0&&(s[l]=Object.keys(s[l+2]));return i.includes("translate")&&!n.includes("translationlanguage")&&(n.push("translationlanguage"),Array.isArray(r[1])?r[1].push("TRANSLATIONLANGUAGE"):r[1].TRANSLATIONLANGUAGE="translationlanguage"),Fe(ce(ce({},Vi),t),{excludes:[]})},msg(e,t=""){var s;return e&&((s=this.i18n[e])!=null?s:e).replace("$1",this.msg(t))},normalizeTitle(e,t=0,s,i=Ve.getConfig(),r){const{Title:n}=(Vu(),X(Fa));let l;if(r!=null&&r.halfParsed)l=new n(e,t,i,r);else{const{Token:a}=(q(),X(Ss));l=me.run(()=>{const o=new a(e,i);o.type="root",o.pageName=r==null?void 0:r.page,o.parseOnce(0,s).parseOnce();const u=new n(o.toString(),t,i,r);o.build();for(const d of["main","fragment"]){const h=u[d];if(h!=null&&h.includes("\0")){const g=o.buildFromStr(h,1);d==="main"?u.main=g:u.setFragment(g)}}return u})}return l},parse(e,t,s,i,r){e=Hl(e);let n,l,a,o;typeof t=="string"?(n=!!s,l=i,a=r,o=t):(n=!!t,l=s,a=i,o=r),l!=null||(l=pe),a!=null||(a=this.getConfig());let u;typeof l!="number"&&(u=Array.isArray(l)?l:[l],l=Math.max(...u.map(g=>zl[g]||pe)));const{Token:d}=(q(),X(Ss));return me.run(()=>{const g=new d(e,a);return g.type="root",g.pageName=o,g.parse(l,n)})},parseWithRef(e,t,s,i=t.getAttribute("include")){return this.parse(e,i,s,t.getAttribute("config"),t.pageName)},async partialParse(e,t,s,i=Ve.getConfig()){},createLanguageService(e={}){throw new Error("Parser.createLanguageService method is only available in the LSP version!")}},Di={},Pl=new Set(["lintConfig","normalizeTitle","parse","createLanguageService"]);for(const e in Ve)Pl.has(e)||(Di[e]={enumerable:!1});Object.defineProperties(Ve,Di),Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:Ve}),I=Ve}});j()});Qu();})();
9
+ `})}}}}),xo,gu=C({"src/paramLine.ts"(){"use strict";q(),xo=class extends F{get type(){return"param-line"}}}}),vo={};ie(vo,{ParamTagToken:()=>Sr});var Sr,bo=C({"src/multiLine/paramTag.ts"(){"use strict";W(),he(),Fs(),O(),wr(),gu(),Sr=class extends Ls{constructor(e,t,s=I.getConfig(),i=[],n){super(void 0,s,i,{}),t&&this.safeAppend(t.split(`
10
+ `).map(r=>n?r:Kt(r,s,i,e)).map(r=>new xo(r,s,i,{}))),i.splice(i.indexOf(this),1),i.push(this)}lint(e=this.getAbsoluteIndex()){{const t="no-ignored",{lintConfig:s}=I,i=s.getSeverity(t,this.name);if(!i)return[];const n=new ne(this,e),r=I.msg("invalid-parameter",this.name),l=[];for(const o of this.childNodes){o.setAttribute("aIndex",e);const a=o.childNodes.filter(({type:u})=>u!=="comment"&&u!=="include"&&u!=="noinclude");if(a.some(({type:u})=>u==="ext"))l.push(B(o,n,t,r,i));else{const u=a.findIndex(({type:d})=>d!=="text"),h=a.slice(0,u===-1?void 0:u).map(String).join("");if(h&&!(u===-1?/^[a-z]+(?:\[\])?\s*=/iu:/^[a-z]+(?:\[\])?\s*(?:=|$)/iu).test(h)){const d=B(o,n,t,r,i);s.computeEditInfo&&(d.suggestions=[G(d)]),l.push(d)}else{const d=o.lint(e,!1);d.length>0&&Array.prototype.push.apply(l,d)}}e+=o.toString().length+1}return l}}}}}),Nn,hi,Ln,ut,yo=C({"src/heading.ts"(){"use strict";var e,t,ps,i;W(),Ie(),he(),qe(),O(),q(),rt(),Nn=[Ee],ut=(i=class extends(Ln=F){constructor(r,l,o,a=[]){super(void 0,o,a);N(this,t);N(this,e);L(this,e,r);const u=new F(l[0],o,a);u.type="heading-title",u.setAttribute("stage",2);const h=new Ve(l[1],"heading-trail",o,a);this.append(u,h)}get type(){return"heading"}get level(){return f(this,e)}toString(r){const l=P(this,t,ps).call(this);return l+this.firstChild.toString(r)+l+this.lastChild.toString(r)}text(){const r=P(this,t,ps).call(this);return r+this.firstChild.text()+r}getAttribute(r){return r==="invalid"?this.inHtmlAttrs()===2:r==="padding"?this.level:super.getAttribute(r)}getGaps(){return this.level}lint(r=this.getAbsoluteIndex(),l){{const o=super.lint(r,l),{firstChild:a,level:u}=this,h=a.toString(),d=h.startsWith("="),g=d||h.endsWith("="),c=new ne(this,r),p=this.inHtmlAttrs(),x=["h1","unbalanced-header","format-leakage"],{lintConfig:m}=I,{computeEditInfo:v,fix:w}=m,S=x.map(y=>m.getSeverity(y,"apostrophe"));if(S[0]&&this.level===1){const y=B(a,c,x[0],"<h1>",S[0]);v&&!g&&(y.suggestions=[$e(y,"h2",`=${h}=`)]),o.push(y)}if(S[1]&&g){const y=I.msg("unbalanced-in-section-header",'"="'),A=B(a,c,x[1],y,S[1]);if(!(!v||h==="="))if(d){const[k]=/^=+/u.exec(h),$=u+k.length;A.suggestions=[{desc:`h${u}`,range:[A.startIndex,A.startIndex+k.length],text:""}],$<7&&A.suggestions.push({desc:`h${$}`,range:[A.endIndex,A.endIndex],text:k})}else{const k=/[^=](=+)$/u.exec(h)[1],$=u+k.length;A.suggestions=[{desc:`h${u}`,range:[A.endIndex-k.length,A.endIndex],text:""}],$<7&&A.suggestions.push({desc:`h${$}`,range:[A.startIndex,A.startIndex],text:k})}o.push(A)}if(p){const y="parsing-order",A=m.getSeverity(y,p===2?"heading":"templateInTable");A&&o.push(M(this,c,y,"header-in-html",A))}if(S[2]){const y=this.getRootNode().toString(),A=a.childNodes.filter(Rs("quote")),k=A.filter(({bold:b})=>b),$=A.filter(({italic:b})=>b);if(k.length%2){const b=B(k[k.length-1],je(ge({},c),{start:r+u,left:c.left+u}),x[2],I.msg("unbalanced-in-section-header","bold-apostrophes"),S[2]);if(v||w){const _=r+u+h.length,T=G(b);y.slice(b.endIndex,_).trim()?v&&(b.suggestions=[T,He(_,"'''")]):k.length===1&&$.length===0?b.fix=T:v&&(b.suggestions=[T])}o.push(b)}if($.length%2){const b=B($[$.length-1],{start:r+u},x[2],I.msg("unbalanced-in-section-header","italic-apostrophes"),S[2]);if(v||w){const _=r+u+h.length;y.slice(b.endIndex,_).trim()?v&&(b.suggestions=[He(_,"''")]):$.length===1&&k.length===0?b.fix=G(b):v&&(b.suggestions=[G(b)])}o.push(b)}}return o}}print(){const r=P(this,t,ps).call(this);return super.print({pre:r,sep:r})}json(r,l=this.getAbsoluteIndex()){}},e=new WeakMap,t=new WeakSet,ps=function(){return"=".repeat(this.level)},i),hi=se(Ln),ut=ee(hi,0,"HeadingToken",Nn,ut),Z(hi,1,ut)}}),En,wo,pu=C({"src/parameter.ts"(){"use strict";ce(),W(),O(),q(),En=new RegExp(`https?://${xt}${vt}$`,"iu"),wo=class extends F{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){}constructor(e,t,s,i=[]){super(void 0,s,i);const n=new F(typeof e=="number"?void 0:e,s,i,{}),r=new F(t,s,i);n.type="parameter-key",n.setAttribute("stage",2),r.type="parameter-value",r.setAttribute("stage",2),this.append(n,r)}trimName(e,t=!0){const s=(typeof e=="string"?e:e.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",s),s}afterBuild(){if(!this.anon){const{parentNode:e,firstChild:t}=this,s=this.trimName(t);e&&e.getArgs(s,!1,!1).add(this)}super.afterBuild()}toString(e){return this.anon?this.lastChild.toString(e):super.toString(e,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(e=this.getAbsoluteIndex(),t){var s;{const i=super.lint(e,t),n="unescaped",{lintConfig:r}=I,l=r.getSeverity(n);if(l){const{firstChild:o}=this,a=(s=En.exec(o.text()))==null?void 0:s[0];try{if(a&&new URL(a).search){const u=B(o,{start:e},n,"unescaped-query",l);u.startIndex=u.endIndex,u.startLine=u.endLine,u.startCol=u.endCol,u.endIndex++,u.endCol++,(r.computeEditInfo||r.fix)&&(u.fix=wt(u.startIndex,"{{=}}")),i.push(u)}}catch(u){}}return i}}print(){return super.print({sep:this.anon?"":"="})}json(e,t=this.getAbsoluteIndex()){}}}}),Fn,di,Rn,ht,fu=C({"src/transclude.ts"(){"use strict";var e,t,s,i,n,r,fs,So,a;ce(),W(),Ie(),he(),Cs(),qe(),O(),q(),pu(),nt(),rt(),Fn=[Ee,Xt()],ht=(a=class extends(Rn=F){constructor(h,d,g,c=[]){var T,E;let p;const x=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(h);x&&(p=Number(x[1]),h=h.replace(`\0${p}h`,c[p].toString().replace(/^\n/u,"")));super(void 0,g,c,{});N(this,r);Le(this,"modifier","");N(this,e,"template");N(this,t,":");N(this,s,!1);N(this,i,new Map);N(this,n);const{parserFunction:[m,v],variable:w,functionHook:S}=g,y=(T=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(h))==null?void 0:T[0];if(y)this.setAttribute("modifier",y),h=h.slice(y.length);else if(h.includes(":")){const[R,...z]=h.split(":"),[j]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((E=z[0])!=null?E:"");this.setModifier(`${R}:${j}`)&&(h=z.join(":").slice(j.length))}const A=h.search(/[::]/u),k=h[A]===":",$=A!==-1;if($||d.length===0&&!f(this,s)){const R=$?h.slice(0,A):h,z=$&&h.slice(A+1),j=fe(R),X=$?j.slice(j.search(/\S/u))+(k?":":""):j.trim(),ae=X.toLowerCase(),Q=Array.isArray(v),U=Q?v.includes(X):Object.prototype.hasOwnProperty.call(v,X),D=!Q&&U?v[X]:Object.prototype.hasOwnProperty.call(m,ae)&&m[ae],Se=Q&&U||!("functionHook"in g)||S.includes(D),Fe=Q&&U||w.includes(D);if($?D&&Se:Fe){this.setAttribute("name",D||ae.replace(/^#|:$/u,"")),L(this,e,"magic-word"),k&&L(this,t,":");const V=new Ve(R,"magic-word-name",g,c);if(super.insertAt(V),z!==!1&&d.unshift([z]),this.name==="invoke")for(let Y=0;Y<2;Y++){const J=d.shift();if(!J)break;const te=new Ce(J.join("="),`invoke-${Y?"function":"module"}`,g,c);super.insertAt(te)}}}if(this.type==="template"){const R=fe(h).trim();if(!this.normalizeTitle(R,10,{halfParsed:!0,temporary:!0}).valid)throw c.pop(),new SyntaxError("Invalid template name");const z=new Ce(h,"template-name",g,c,{});super.insertAt(z)}typeof p=="number"&&(c[p]=void 0);const b=this.isTemplate();let _=1;for(let R=0;R<d.length;R++){const z=d[R];b||this.name==="switch"&&R>0||this.name==="tag"&&R>1||(z[0]=z.join("="),z.length=1),z.length===1&&(z.unshift(_),_++),this.insertAt(new wo(...z,g,c))}this.seal("modifier")}get type(){return f(this,e)}get module(){}get function(){}setModifier(h){const{parserFunction:[,,d,g]}=this.getAttribute("config"),c=fe(h).trim();if(h&&!c.endsWith(":"))return!1;const p=c.slice(0,-1).toLowerCase(),x=d.includes(p),m=g.includes(p);return(f(this,s)?x:m||!h)||(xe.running||this.length>1)&&(x||m||!h)?(this.setAttribute("modifier",h),L(this,s,x),!!h):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(L(this,n,P(this,r,fs).call(this)),this.setAttribute("name",f(this,n).title))}toString(h){const{childNodes:d,length:g,firstChild:c,modifier:p,type:x}=this;return`{{${p}${x==="magic-word"?c.toString(h)+(g===1?"":f(this,t))+d.slice(1).map(m=>m.toString(h)).join("|"):super.toString(h,"|")}}}`}text(){const{childNodes:h,length:d,firstChild:g,modifier:c,type:p,name:x}=this;return p==="magic-word"&&x==="vardefine"?"":`{{${c}${p==="magic-word"?g.text()+(d===1?"":f(this,t))+tt(h.slice(1),"|"):super.text("|")}}}`}getAttribute(h){switch(h){case"padding":return this.modifier.length+2;case"title":return f(this,n);case"colon":return f(this,t);case"invalid":return this.type==="magic-word"&&this.name==="invoke"&&(this.length===2||!P(this,r,fs).call(this).valid);default:return super.getAttribute(h)}}lint(h=this.getAbsoluteIndex(),d){{const g=super.lint(h,d);if(!this.isTemplate())return g;const{type:c,childNodes:p,length:x}=this,m=new ne(this,h),{lintConfig:v}=I,{computeEditInfo:w}=v,S=c==="magic-word";let y="no-ignored",A=v.getSeverity(y,"fragment");if(S&&!P(this,r,fs).call(this).valid)y="invalid-invoke",A=v.getSeverity(y,"name"),A&&g.push(B(p[1],m,y,"illegal-module",A));else if(A){const k=p[S?1:0],$=k.childNodes.findIndex(_=>_.type==="text"&&ys(_.data).includes("#")),b=k.childNodes[$];if(b){const _=B(k,m,y,"useless-fragment",A);w&&(_.suggestions=[G(_,k.getRelativeIndex($)+b.data.indexOf("#"))]),g.push(_)}}if(y="invalid-invoke",A=v.getSeverity(y,"function"),A&&S&&x===2)return g.push(M(this,m,y,"missing-function",A)),g;if(y="no-duplicate",A=v.getSeverity(y,"parameter"),A){const k=this.getDuplicatedArgs().filter(([,b])=>!b[0].querySelector("ext")),$="duplicate-parameter";for(const[,b]of k)Array.prototype.push.apply(g,b.map(_=>{const T=B(_,m,y,$,A);return w&&(T.suggestions=[G(T,-1)]),T}))}return g}}insertAt(h,d=this.length){return super.insertAt(h,d),h.anon?P(this,r,So).call(this,h):h.name&&this.getArgs(h.name,!1,!1).add(h),h}getAllArgs(){return this.childNodes.filter(Rs("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:h})=>h)}getArgs(h,d,g=!0){const c=String(h).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");let p;return f(this,i).has(c)?p=f(this,i).get(c):(p=new Set(this.getAllArgs().filter(({name:x})=>c===x)),f(this,i).set(c,p)),p}getDuplicatedArgs(){return[...f(this,i)].filter(([,{size:h}])=>h>1).map(([h,d])=>[h,[...d]])}getPossibleValues(){const{type:h,name:d,childNodes:g}=this;if(h==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let c,p;switch(d){case"if":case"ifexist":case"ifexpr":case"iferror":c=2;break;case"ifeq":c=3;break;case"switch":{const x=g.slice(2),m=x[x.length-1];p=[...x.filter(({anon:v})=>!v),...m!=null&&m.anon?[m]:[]].map(({lastChild:v})=>v);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}p!=null||(p=g.slice(c,c+2).map(({lastChild:x})=>x));for(let x=0;x<p.length;){const{length:m,0:v}=p[x].childNodes.filter(w=>w.text().trim());if(m===0)p.splice(x,1);else if(m>1||v.type!=="magic-word")x++;else try{const w=v.getPossibleValues();Array.prototype.splice.apply(p,[x,1,...w]),x+=w.length}catch(w){x++}}return p}print(){const{childNodes:h,length:d,firstChild:g,modifier:c,type:p}=this;return`<span class="wpb-${p}${this.getAttribute("invalid")?" wpb-invalid":""}">{{${p==="magic-word"?Gt(c)+g.print()+(d===1?"":f(this,t))+yt(h.slice(1),{sep:"|"}):(c?`<span class="wpb-magic-word">${Gt(c)}</span>`:"")+yt(h,{sep:"|"})}}}</span>`}},e=new WeakMap,t=new WeakMap,s=new WeakMap,i=new WeakMap,n=new WeakMap,r=new WeakSet,fs=function(){const h=this.type==="template";return this.normalizeTitle((h?"":"Module:")+this.childNodes[h?0:1].text(),10,ge({temporary:!0},!h&&{page:""}))},So=function(h){const d=this.getAnonArgs(),g=typeof h!="number";for(let c=g?d.indexOf(h):h-1;c<d.length;c++){const p=d[c],{name:x}=p,m=String(c+1);(x!==m||p===h)&&(p.setAttribute("name",m),this.getArgs(m,!1,!1).add(p))}},a),di=se(Rn),ht=ee(di,0,"TranscludeToken",Fn,ht),Z(di,1,ht)}}),Pn,ci,On,Bt,mu=C({"src/hidden.ts"(){"use strict";it(),q(),Pn=[Ge()],Bt=class extends(On=F){get type(){return"hidden"}getAttribute(e){return e==="invalid"||super.getAttribute(e)}},ci=se(On),Bt=ee(ci,0,"HiddenToken",Pn,Bt),Z(ci,1,Bt)}}),jn,gi,Bn,qt,xu=C({"src/arg.ts"(){"use strict";var e,vu,s;ce(),W(),he(),Qe(),Cs(),qe(),O(),q(),nt(),mu(),jn=[Ee,We("{{{"),Xt()],qt=(s=class extends(Bn=F){constructor(n,r,l=[]){super(void 0,r,l,{});N(this,e);for(let o=0;o<n.length;o++){const a=n[o];if(o===0){const u=new Ce(a,"arg-name",r,l,{});super.insertAt(u)}else if(o>1){const u=new Bt(a,r,l);super.insertAt(u)}else{const u=new F(a,r,l);u.type="arg-default",u.setAttribute("stage",2),super.insertAt(u)}}}get type(){return"arg"}get default(){}toString(n){return`{{{${super.toString(n,"|")}}}}`}text(){return`{{{${tt(this.childNodes.slice(0,2),"|")}}}}`}afterBuild(){super.afterBuild()}lint(n=this.getAbsoluteIndex(),r){{const{childNodes:[l,o,...a]}=this;l.setAttribute("aIndex",n+3);const u=l.lint(n+3,r);if(o){const x=n+4+l.toString().length;o.setAttribute("aIndex",x);const m=o.lint(x,r);m.length>0&&Array.prototype.push.apply(u,m)}const h=["no-ignored","no-arg"],{lintConfig:d}=I,{computeEditInfo:g}=d,c=new ne(this,n),p=h.map(x=>d.getSeverity(x,"arg"));if(p[0]&&a.length>0&&Array.prototype.push.apply(u,a.map(x=>{const m=B(x,c,h[0],"invisible-triple-braces",p[0]);return m.startIndex--,m.startCol--,g&&(m.suggestions=[G(m),wt(m.startIndex,"{{!}}")]),m})),p[1]&&!this.getAttribute("include")){const x=M(this,c,h[1],"unexpected-argument",p[1]);g&&o&&(x.suggestions=[$e(x,"expand",o.text())]),u.push(x)}return u}}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(n,r=this.getAbsoluteIndex()){}},e=new WeakSet,vu=function(){},s),gi=se(Bn),qt=ee(gi,0,"ArgToken",jn,qt),Z(gi,1,qt)}}),Ao={};ie(Ao,{parseBraces:()=>Es});var qn,pi,rs,fi,mi,xi,Wn,vi,Es,Ar=C({"parser/braces.ts"(){"use strict";st(),ce(),yo(),fu(),xu(),qn={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},pi=String.raw`\[(?!\[)`,rs=String.raw`\n(?![=\0])`,fi=String.raw`|\{{2,}`,mi=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),xi=mt(e=>new RegExp(e,"gmu")),Wn=new RegExp(String.raw`\{\{((?:[^\n{}[]|${pi}|${rs})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${rs})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${pi}|${rs})*\}-`,"gu"),vi=e=>{const t=bt(fe(e));return mi.has(t)?mi.get(t):/^(?:filepath|(?:full|canonical)urle?):./u.test(t)?"m":/^#vardefine:./u.test(t)?"n":"t"},Es=(e,t,s)=>{var p,x,m,v,w;const i=String.raw`${t.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,n]}=t,r=[],l=[],o=(S,y,A,k)=>{y[y.length-1].push(ye(S.slice(A,k),l))};let a;do a!==void 0&&(e=a),a=e.replace(Wn,(S,y,A)=>{if(y!==void 0||typeof A=="string")try{const{length:k}=s,$=(y!=null?y:A).split("|");return new ht(ye($[0],l),$.slice(1).map(b=>{const _=b.indexOf("=");return(_===-1?[b]:[b.slice(0,_),b.slice(_+1)]).map(T=>ye(T,l))}),t,s),`\0${k}${vi($[0])}`}catch(k){if(!(k instanceof SyntaxError)||k.message!=="Invalid template name")throw k}return l.push(ye(S,l)),`\0${l.length-1}`});while(a!==e);e=a;const u=e.lastIndexOf("}}")-e.length;let h=u+e.length!==-1,d=xi(i+(h?fi:"")),g=d.exec(e),c;for(;g||c!==void 0&&c<=e.length&&((x=(p=r[r.length-1])==null?void 0:p[0])!=null&&x.startsWith("="));){if(g!=null&&g[1]){const[,{length:z}]=g;g[0]=g[0].slice(z),g.index+=z}const{0:S,index:y}=g!=null?g:{0:`
11
+ `,index:e.length},A=(m=r.pop())!=null?m:{},{0:k,index:$,parts:b,findEqual:_,pos:T}=A,E=S==="="&&_;if(S==="]]"||S==="}-")c=y+2;else if(S===`
12
+ `){c=y+1;const{pos:z,findEqual:j}=(v=r[r.length-1])!=null?v:{};if(z===void 0||j||fe(e.slice(z,$))!==""){const X=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(e.slice($,y));X&&(X[2]=ye(X[2],l),X[2].includes(`
13
+ `)||(e=`${e.slice(0,$)}\0${s.length}h${e.slice(y)}`,c=$+4+String(s.length).length,new ut(X[1].length,X.slice(2),t,s)))}}else if(S==="|"||E)c=y+1,o(e,b,T,y),S==="|"&&b.push([]),A.pos=c,A.findEqual=S==="|",r.push(A);else if(S.startsWith("}}")){const z=S.slice(0,Math.min(k.length,3)),j=k.length-z.length,{length:X}=s;c=y+z.length,o(e,b,T,y);let ae=!1,Q="t";if(z.length===3){const U=b.map(Se=>Se.join("=")),D=U.length>1&&fe(U[1]).trim();new qt(U,t,s),D&&D.endsWith(":")&&n.includes(D.slice(0,-1).toLowerCase())&&(Q="s")}else try{new ht(b[0][0],b.slice(1),t,s),Q=vi(b[0][0])}catch(U){if(U instanceof SyntaxError&&U.message==="Invalid template name")ae=!0;else throw U}ae||(e=`${e.slice(0,$+j)}\0${X}${Q}${e.slice(c)}`,c=$+j+3+String(X).length,j>1?r.push({0:k.slice(0,j),index:$,pos:$+j,parts:[[]]}):j===1&&e[$-1]==="-"&&r.push({0:"-{",index:$-1,pos:$+1,parts:[[]]}))}else c=y+S.length,S.startsWith("{")&&(g.pos=c,g.parts=[[]]),r.push(..."0"in A?[A]:[],g);let R=r[r.length-1];if(h&&u+e.length<c)for(h=!1;(w=R==null?void 0:R[0])!=null&&w.startsWith("{");)r.pop(),R=r[r.length-1];d=xi(i+(h?fi:"")+(R?`|${qn[R[0][0]]}${R.findEqual?"|=":""}`:"")),d.lastIndex=c,g=d.exec(e)}return ye(e,l)}}}),ko={};ie(ko,{InputboxToken:()=>_o});var _o,bu=C({"src/multiLine/inputbox.ts"(){"use strict";Fs(),Ar(),O(),bo(),_o=class extends Sr{constructor(e,t,s=I.getConfig(),i=[]){const n=Symbol("InputboxToken"),r=s.excludes.includes("heading")?s:je(ge({},s),{excludes:[...s.excludes,"heading"]}),{length:l}=i;i.push(n),t&&(t=Kt(t,r,i,e)),t&&(t=Es(t,r,i)),i.splice(l,1),super(e,t,r,i,{})}}}}),ms={};ie(ms,{NestedToken:()=>$o});var zn,Mn,$o,bi=C({"src/nested.ts"(){"use strict";var e,t,s;W(),he(),Fs(),Ar(),O(),q(),Go(),At(),zn=new Set(["comment","include","arg","template","magic-word"]),Mn=[!1,!0].map(i=>{const n=i?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${n}(?:\s[^>]*)?/?>|</${n}\s*>)$`,"iu")}),$o=(s=class extends F{constructor(n,r,l,o,a=[]){if(typeof r=="boolean"){const u=Symbol("NestedToken"),{length:h}=a;a.push(u),n&&(n=Kt(n,o,a,r)),n&&(n=Es(n,o,a)),a.splice(h,1)}else n&&(n=n.replace(r,(u,h,d,g,c)=>{const p=`\0${a.length+1}e`;return new pt(h,d,g,c,o,!1,a),p}));n&&(n=n.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(u,h,d)=>(new we(d,o,a),`${h}\0${a.length}n`)));super(n,o,a);N(this,e);N(this,t);L(this,e,[...l]),L(this,t,r)}get type(){return"ext-inner"}lint(n=this.getAbsoluteIndex(),r){{const l=super.lint(n,r),o="no-ignored",{lintConfig:a}=I,u=a.getSeverity(o,this.name);if(!u)return l;const h=new ne(this,n),d=typeof f(this,t)=="boolean"?Mn[f(this,t)?1:0]:/^<!--[\s\S]*-->$/u;return[...l,...this.childNodes.filter(g=>{const{type:c,name:p}=g;if(c==="ext")return!f(this,e).includes(p);if(zn.has(c))return!1;const x=g.toString().trim();return x&&!d.test(x)}).map(g=>{const c=B(g,h,o,I.msg("invalid-content",this.name),u);return a.computeEditInfo&&(c.suggestions=[G(c),cr(c,g.toString())]),c})]}}},e=new WeakMap,t=new WeakMap,s)}});function Un(e,t,s,i,n){t=fe(t).trim();let r=t.replace(e==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(e){case"width":return!r&&!!t||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(r);case"link":{if(r){if(To(s.protocol).test(r))return Co(s.protocol).test(r)&&t;r.startsWith("[[")&&r.endsWith("]]")&&(r=r.slice(2,-2))}else return t;const l=I.normalizeTitle(r,0,!1,s,{halfParsed:i,decode:!0,selfLink:!0,page:""});return l.valid&&l}case"lang":return(n==="svg"||n==="svgz")&&!/[^a-z\d-]/u.test(r);case"alt":case"class":case"manualthumb":return!0;case"page":return(n==="djvu"||n==="djv"||n==="pdf")&&Number(r)>0;default:return!!r&&!isNaN(r)}}var To,Co,Dn,Hn,ws,Gn,Io,yu=C({"src/imageParameter.ts"(){"use strict";var e,t,No,n;st(),ce(),W(),Be(),Ie(),O(),q(),To=mt(r=>new RegExp(String.raw`^(?:${r}|//|\0\d+m\x7F)`,"iu")),Co=mt(r=>new RegExp(String.raw`^(?:(?:${r}|//)${xt}|\0\d+m\x7F)${vt}$`,"iu")),Dn=mt(r=>new RegExp(String.raw`^(\s*(?!\s))${r.replace("$1","(.*)")}${r.endsWith("$1")?`(?=$|
14
+ )`:""}(\s*)$`,"u")),Hn=new Set(["alt","link","lang","page","caption"]),ws=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),Gn=r=>{if(r)r.startsWith("//")&&(r=`https:${r}`);else return r;return new URL(r).href},Io=(n=class extends F{constructor(l,o,a,u){var r=(...i)=>(super(...i),N(this,t),N(this,e,""),this);let h;const d=Object.entries(a.img).map(([c,p])=>[c,p,Dn(c)]),g=d.find(([,c,p])=>(h=p.exec(l),h&&(h.length!==4||Un(c,h[2],a,!0,o)!==!1)));if(g&&h){h.length===3?(r(void 0,a,u),L(this,e,l)):(r(h[2],a,u,{}),L(this,e,h[1]+g[0]+h[3])),this.setAttribute("name",g[1]),g[1]==="alt"&&this.setAttribute("stage",pe-1);return}r(l,a.excludes.includes("list")?a:je(ge({},a),{excludes:[...a.excludes,"list"]}),u),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get thumb(){return this.name==="manualthumb"?this.normalizeTitle(`File:${super.text().trim()}`,6,{page:""}):void 0}get link(){{if(this.name!=="link")return;const l=super.text().trim();return xe.run(()=>{const o=new F(l,this.getAttribute("config"));return o.parseOnce(0,this.getAttribute("include")).parseOnce(),/^\0\d+m\x7F/u.test(o.toString())?l:Un("link",l,this.getAttribute("config"))})}}afterBuild(){var l;(l=this.parentNode)!=null&&l.is("gallery-image")&&!Hn.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(l){return f(this,e)?f(this,e).replace("$1",super.toString(l)):super.toString(l)}text(){return f(this,e)?f(this,e).replace("$1",super.text()).trim():super.text().trim()}isPlain(){return this.name==="caption"||this.name==="alt"}getAttribute(l){return l==="invalid"?this.name==="invalid":l==="padding"?Math.max(0,f(this,e).indexOf("$1")):super.getAttribute(l)}lint(l=this.getAbsoluteIndex(),o){{const a=super.lint(l,o),{lintConfig:u}=I,{computeEditInfo:h,fix:d}=u,{link:g,name:c}=this,p=c==="width"&&this.getValue();if(c==="invalid"||p&&p.endsWith("px")){const x="invalid-gallery",m=u.getSeverity(x,"parameter");if(m){const v=M(this,{start:l},x,"invalid-image-parameter",m);(h||d)&&(v.fix=p?G(v,0,p):G(v,-1)),a.push(v)}}else if(c==="link"){if(typeof g=="string"){const x="invalid-url",m=u.getSeverity(x);if(m&&!this.querySelector("magic-word"))try{Gn(g)}catch(v){a.push(M(this,{start:l},x,"invalid-url",m))}}else if(g.encoded){const x="url-encoding",m=u.getSeverity(x,"file");if(m){const v=M(this,{start:l},x,"unnecessary-encoding",m);(h||d)&&(v.fix=hr(v,this)),a.push(v)}}}else if(c==="manualthumb"){const x="invalid-gallery",m=u.getSeverity(x,"thumb");if(m&&!this.querySelector("arg,magic-word,template")){const{valid:v,ns:w,extension:S}=this.thumb;(!v||w!==6||!ws.has(S))&&a.push(M(this,{start:l},x,"invalid-thumb",m))}}return a}}getValue(){return this.name==="invalid"?this.text():P(this,t,No).call(this)||super.text()}print(){return f(this,e)?`<span class="wpb-image-parameter${this.name==="invalid"?" wpb-invalid":""}">${f(this,e).replace("$1",`<span class="wpb-image-caption">${yt(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}},e=new WeakMap,t=new WeakSet,No=function(){return f(this,e)&&!f(this,e).includes("$1")},n)}}),yi,Vn,Qn,wi,Si,Jn,Ai,kr,Lo=C({"src/link/file.ts"(){"use strict";W(),he(),O(),Ts(),yu(),yi=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),Vn=new Set(["arg"]),Qn=new Set(["template","magic-word"]),wi=new Set(["left","right","center","none"]),Si=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),Jn=e=>{if(e===void 0)return[];const t=/-\{|\}-|\|/gu,s=[];let i=t.exec(e),n=0,r=0;for(;i;){const{0:l,index:o}=i;l!=="|"?n+=l==="-{"?1:-1:n===0&&(s.push(e.slice(r,o)),{lastIndex:r}=t),i=t.exec(e)}return s.push(e.slice(r)),s},Ai=(e,t)=>e.filter(({childNodes:s})=>!s.some(i=>i.text().trim()&&t.has(i.type))),kr=class extends Me{get type(){return"file"}get extension(){}constructor(e,t,s,i=[],n="|"){super(e,void 0,s,i,n);const{extension:r}=this.getTitle(!0,!0);this.safeAppend(Jn(t).map(l=>new Io(l,r,s,i)))}lint(e=this.getAbsoluteIndex(),t){var s;{const i=super.lint(e,t),n=Ai(this.getAllArgs(),Vn),r=[...new Set(n.map(({name:k})=>k))],l=r.filter(k=>yi.has(k)),o=r.filter(k=>wi.has(k)),a=r.filter(k=>Si.has(k)),[u]=l,h=u==="framed"||u==="manualthumb",d=new ne(this,e),{lintConfig:g}=I,{computeEditInfo:c,fix:p}=g,{ns:x,extension:m}=this.getAttribute("title"),{firstChild:v}=this;let w="nested-link",S=g.getSeverity(w,"file");if(S&&ws.has(m)&&this.closest("ext-link-text")&&((s=this.getValue("link"))==null?void 0:s.trim())!==""){const k=M(this,d,w,"link-in-extlink",S);if(c||p){const $=this.getArg("link");if($){const b=e+$.getRelativeIndex();k.fix={desc:I.msg("delink"),range:[b,b+$.toString().length],text:"link="}}else k.fix=_s(k.endIndex-2,"delink","|link=")}i.push(k)}if(w="invalid-gallery",S=g.getSeverity(w,"extension"),S&&x===6&&!m&&!v.querySelector("arg,magic-word,template")&&i.push(M(this,d,w,"missing-extension",S)),S=g.getSeverity(w,"parameter"),S&&h)for(const k of n.filter(({name:$})=>$==="width")){const $=B(k,d,w,"invalid-image-parameter",S);(c||p)&&($.fix=G($,-1)),i.push($)}if(n.length===r.length&&l.length<2&&o.length<2&&a.length<2)return i;w="no-duplicate";const y=["unknownImageParameter","imageParameter"].map(k=>g.getSeverity(w,k)),A=(k,$,b,_=!0)=>k.map(T=>{if(S=y[Number(typeof _=="function"?_(T):_)],!S)return!1;const E=B(T,d,w,I.msg(`${$}-image-parameter`,b),S);return c&&(E.suggestions=[G(E,-1)]),E}).filter(T=>T!==!1);for(const k of r){if(k==="invalid"||k==="width"&&h)continue;const $=k==="caption";let b=n.filter(({name:_})=>_===k);if($&&(b=[...b.slice(0,-1).filter(_=>_.text()),...b.slice(-1)]),b.length>1){let _=!$||!m||ws.has(m);if($&&_){const T=Ai(b,Qn);_=T.length>1&&(E=>T.includes(E))}Array.prototype.push.apply(i,A(b,"duplicate",k,_))}}return l.length>1&&Array.prototype.push.apply(i,A(n.filter(({name:k})=>yi.has(k)),"conflicting","frame")),o.length>1&&Array.prototype.push.apply(i,A(n.filter(({name:k})=>wi.has(k)),"conflicting","horizontal-alignment")),a.length>1&&Array.prototype.push.apply(i,A(n.filter(({name:k})=>Si.has(k)),"conflicting","vertical-alignment")),i}}getAllArgs(){return this.childNodes.slice(1)}getArgs(e){return this.getAllArgs().filter(({name:t})=>e===t)}getArg(e){{const t=this.getArgs(e);return t[e==="manualthumb"?0:t.length-1]}}getValue(e){var t;return(t=this.getArg(e))==null?void 0:t.getValue()}json(e,t=this.getAbsoluteIndex()){}}}}),Xn,ki,Kn,dt,Eo=C({"src/link/galleryImage.ts"(){"use strict";var e,tr,s;W(),Be(),Qe(),O(),q(),Lo(),Xn=[We("")],dt=(s=class extends(Kn=kr){constructor(n,r,l,o,a=[]){let u;if(l!==void 0){const{length:h}=a;u=new F(l,o,a);for(let d=0;d<pe-1;d++)u.parseOnce();a.splice(h,1)}super(r,u==null?void 0:u.toString(),o,a);N(this,e);Le(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=`${n}-image`,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(n){const r=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),r?0:6,{halfParsed:!0,temporary:n,decode:!r,page:""})}lint(n=this.getAbsoluteIndex(),r){{const l=super.lint(n,r),o="invalid-gallery",{lintConfig:a}=I,u=a.getSeverity(o,"image");if(u&&P(this,e,tr).call(this)){const h=M(this,{start:n},o,"invalid-gallery",u);a.computeEditInfo&&(h.suggestions=[_s(n,"prefix","File:")]),l.push(h)}return l}}getAttribute(n){return n==="invalid"?P(this,e,tr).call(this):super.getAttribute(n)}},e=new WeakSet,tr=function(){const{ns:n}=this.getAttribute("title");return n!==6},s),ki=se(Kn),dt=ee(ki,0,"GalleryImageToken",Xn,dt),Z(ki,1,dt)}}),Ss,Fo=C({"src/nowiki/commentLine.ts"(){"use strict";At(),Ss=class extends we{}}}),Ro={};ie(Ro,{GalleryToken:()=>Po});var Po,wu=C({"src/multiLine/gallery.ts"(){"use strict";var e,Oo,Su,i;W(),O(),wr(),Eo(),Fo(),Po=(i=class extends Ls{constructor(r,l,o=[]){var a;super(void 0,l,o,{});N(this,e);for(const u of(a=r==null?void 0:r.split(`
15
+ `))!=null?a:[]){const h=/^([^|]+)(?:\|(.*))?/u.exec(u);if(!h){super.insertAt(u.trim()?new Ss(u,l,o):u);continue}const[,d,g]=h;P(this,e,Oo).call(this,d)?super.insertAt(new dt("gallery",d,g,l,o)):super.insertAt(new Ss(u,l,o))}}get widths(){}get heights(){}lint(r=this.getAbsoluteIndex(),l){{const{top:o,left:a}=this.getRootNode().posFromIndex(r),u=[],h="no-ignored",{lintConfig:d}=I,g=["Image","NoImage","Comment"].map(c=>d.getSeverity(h,`gallery${c}`));for(let c=0;c<this.length;c++){const p=this.childNodes[c],x=p.toString(),{length:m}=x,v=x.trim(),{type:w}=p,S=o+c,y=c?0:a;if(p.setAttribute("aIndex",r),w==="noinclude"&&v&&!/^<!--.*-->$/u.test(v)){let[A]=g;if(v.startsWith("|")?[,A]=g:(v.startsWith("<!--")||v.endsWith("-->"))&&([,,A]=g),A){const k=r+m,$={rule:h,message:I.msg("invalid-content","gallery"),severity:A,startIndex:r,endIndex:k,startLine:S,endLine:S,startCol:y,endCol:y+m};d.computeEditInfo&&($.suggestions=[G($),cr($,x)]),u.push($)}}else if(w!=="noinclude"&&w!=="text"){const A=p.lint(r,l);A.length>0&&Array.prototype.push.apply(u,A)}r+=m+1}return u}}json(r,l=this.getAbsoluteIndex()){}},e=new WeakSet,Oo=function(r){return this.normalizeTitle(r,6,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid},Su=function(r){},i)}}),_r,jo=C({"src/link/index.ts"(){"use strict";st(),W(),O(),Ts(),_r=class extends Me{get type(){return"link"}get innerText(){return this.length>1?this.lastChild.text():Vt(this.firstChild.text().replace(/^\s*:?/u,""))}lint(e=this.getAbsoluteIndex(),t){{const s=super.lint(e,t),i="nested-link",{lintConfig:n}=I,r=n.getSeverity(i);if(r&&this.closest("ext-link-text")){const l=M(this,{start:e},i,"link-in-extlink",r);(n.computeEditInfo||n.fix)&&(l.fix=$e(l,"delink",this.innerText)),s.push(l)}return s}}}}}),Yn,Zn,Jt,$r=C({"src/magicLink.ts"(){"use strict";var e,t,sr,i;W(),ce(),he(),O(),q(),Yn=String.raw`(?:[${De}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,Zn=new RegExp(`${Yn}+`,"gu"),Jt=(i=class extends F{constructor(r,l="free-ext-link",o=I.getConfig(),a){super(r,o,a,{});N(this,t);N(this,e);L(this,e,l)}get type(){return f(this,e)}get innerText(){const r=new Map([["!","|"],["=","="]]);let l=tt(this.childNodes.map(o=>{const{type:a}=o,u=String(o.name);return a==="magic-word"&&r.has(u)?r.get(u):o}));return this.type==="magic-link"&&(l=l.replace(Zn," ")),l}get link(){const{innerText:r}=this;return this.type==="magic-link"?r.startsWith("ISBN")?`ISBN ${r.slice(5).replace(/[- ]/gu,"").replace(/x$/u,"X")}`:r:Vl(r).replace(/\n/gu,"%0A")}lint(r=this.getAbsoluteIndex(),l){{const o=super.lint(r,l),a=new ne(this,r),{lintConfig:u}=I,{type:h,childNodes:d}=this;if(h==="magic-link"){const x="invalid-isbn",m=u.getSeverity(x);return m&&P(this,t,sr).call(this)&&o.push(M(this,a,x,"invalid-isbn",m)),o}let g="invalid-url",c=u.getSeverity(g);if(c&&!this.querySelector("magic-word"))try{this.getUrl()}catch(x){o.push(M(this,a,g,"invalid-url",c))}const p=h==="ext-link-url";if(g="unterminated-url",c=u.getSeverity(g,p?"pipe":"punctuation"),c){const x=p?/\|/u:/[,;。:!?()]+/u,m=d.find(v=>v.type==="text"&&x.test(v.data));if(m){const{data:v}=m,w=B(m,a,g,I.msg("in-url",p?'"|"':"full-width-punctuation"),c);if(u.computeEditInfo){const{index:S,0:y}=x.exec(v),A=w.startIndex+S;w.suggestions=p?[Qt(A,1)]:[Qt(A),{desc:I.msg("encode"),range:[A,A+y.length],text:encodeURI(y)}]}o.push(w)}}return o}}getUrl(r){this.lspError("MagicLinkToken.getUrl")}getAttribute(r){return r==="invalid"?P(this,t,sr).call(this):super.getAttribute(r)}},e=new WeakMap,t=new WeakSet,sr=function(){if(this.type==="magic-link"){const{link:r}=this;if(r.startsWith("ISBN")){const l=[...r.slice(5)].map(o=>o==="X"?10:Number(o));return l.length===10?l.reduce((o,a,u)=>o+a*(10-u),0)%11!==0:l.length===13&&(l[12]===10||l.reduce((o,a,u)=>o+a*(u%2?3:1),0)%10!==0)}}return!1},i)}}),el,_i,tl,ct,Bo=C({"src/extLink.ts"(){"use strict";var e,t;Be(),W(),Qe(),O(),q(),$r(),el=[We("[")],ct=(t=class extends(tl=F){constructor(i,n="",r="",l,o=[]){super(void 0,l,o,{});N(this,e);const a=i&&/^\0\d+f\x7F$/u.test(i)?o[Number(i.slice(1,-2))]:new Jt(i,"ext-link-url",l,o);if(this.insertAt(a),L(this,e,n),r){const u=new F(r,l,o,{});u.type="ext-link-text",u.setAttribute("stage",pe-1),this.insertAt(u)}}get type(){return"ext-link"}toString(i){return this.length===1?`[${super.toString(i)}${f(this,e)}]`:`[${super.toString(i,f(this,e))}]`}text(){return`[${super.text(" ")}]`}getGaps(){return f(this,e).length}lint(i=this.getAbsoluteIndex(),n){{const r=super.lint(i,n),l="var-anchor",o=I.lintConfig.getSeverity(l,"extLink");return o&&this.length===1&&this.closest("heading-title")&&r.push(M(this,{start:i},l,"variable-anchor",o)),r}}print(){return super.print(this.length===1?{pre:"[",post:`${f(this,e)}]`}:{pre:"[",sep:f(this,e),post:"]"})}},e=new WeakMap,t),_i=se(tl),ct=ee(_i,0,"ExtLinkToken",el,ct),Z(_i,1,ct)}}),ir,Au=C({"src/imagemapLink.ts"(){"use strict";q(),At(),jo(),Bo(),ir=class extends F{get type(){return"imagemap-link"}constructor(e,t,s,i,n=[]){super(void 0,i,n),this.append(e,t.length===2?new _r(...t,i,n):new ct(...t,i,n),new we(s,i,n))}}}}),qo={};ie(qo,{ImagemapToken:()=>Wo});var Wo,ku=C({"src/multiLine/imagemap.ts"(){"use strict";W(),Ie(),he(),O(),wr(),Fo(),Eo(),Au(),Wo=class extends Ls{get image(){return this.childNodes.find(Rs("imagemap-image"))}constructor(e,t=I.getConfig(),s=[]){if(super(void 0,t,s,{}),!e)return;const i=e.split(`
16
+ `),n=new Set(t.protocol.split("|"));let r=!0,l=!1;for(const o of i){const a=o.trim();if(!(l||!a||a.startsWith("#"))){if(r){const u=o.indexOf("|"),h=u===-1?o:o.slice(0,u),{valid:d,ns:g}=this.normalizeTitle(h,0,{halfParsed:!0,temporary:!0,page:""});if(d&&g===6){const c=new dt("imagemap",h,u===-1?void 0:o.slice(u+1),t,s);super.insertAt(c),r=!1;continue}else l=!0}else if(o.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(o);continue}else if(o.includes("[")){const u=o.indexOf("["),h=o.slice(u),d=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(h);if(d){if(this.normalizeTitle(d[1],0,{halfParsed:!0,temporary:!0,selfLink:!0,page:""}).valid){super.insertAt(new ir(o.slice(0,u),d.slice(1),h.slice(h.indexOf("]]")+2),t,s));continue}}else if(h.startsWith("[//")||n.has(h.slice(1,h.indexOf(":")+1))||n.has(h.slice(1,h.indexOf("//")+2))){const g=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(h);if(g){super.insertAt(new ir(o.slice(0,u),g.slice(1),h.slice(h.indexOf("]")+1),t,s));continue}}}}super.insertAt(new Ss(o,t,s))}}lint(e=this.getAbsoluteIndex(),t){{const s=super.lint(e,t),i=new ne(this,e),{childNodes:n,image:r}=this,l="invalid-imagemap",{lintConfig:o}=I,a=o.getSeverity(l,r?"link":"image");return a&&(r?Array.prototype.push.apply(s,n.filter(u=>{const h=u.toString().trim();return u.is("noinclude")&&h&&!h.startsWith("#")}).map(u=>{const h=B(u,i,l,"invalid-imagemap-link",a);return o.computeEditInfo&&(h.suggestions=[G(h,-1),$e(h,"comment","# ")]),h})):s.push(M(this,i,l,"imagemap-without-image",a))),s}}getAttribute(e){return e==="invalid"?!this.image:super.getAttribute(e)}}}}),sl,$i,il,gt,zo=C({"src/nowiki/comment.ts"(){"use strict";W(),it(),Qe(),O(),lt(),sl=[Ge(!1),We("<!--")],gt=class extends(il=Te){constructor(t,s,i,n){super(t,i,n);Le(this,"closed");this.closed=s}get type(){return"comment"}lint(t=this.getAbsoluteIndex()){{if(this.closed)return[];const s="unclosed-comment",{lintConfig:i}=I,n=i.getSeverity(s);if(!n)return[];const r=M(this,{start:t},s,"unclosed-comment",n);return i.computeEditInfo&&(r.suggestions=[He(r.endIndex,"-->")]),[r]}}toString(t){return t?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"&lt;!--",post:this.closed?"--&gt;":""})}},$i=se(il),gt=ee($i,0,"CommentToken",sl,gt),Z($i,1,gt)}}),Mo={};ie(Mo,{CommentedToken:()=>Uo});var Uo,_u=C({"src/commented.ts"(){"use strict";q(),zo(),Uo=class extends F{get type(){return"ext-inner"}constructor(e,t,s=[]){if(super(void 0,t,s,{AstText:":",CommentToken:":"}),e){let i=e.indexOf("<!--"),n=i!==-1&&e.indexOf("-->",i+4),r=0;for(;n!==!1&&n!==-1;)i>r&&this.insertAt(e.slice(r,i)),this.insertAt(new gt(e.slice(i+4,n),!0,t,s)),r=n+3,i=e.indexOf("<!--",r),n=i!==-1&&e.indexOf("-->",i+4);r<e.length&&this.insertAt(e.slice(r))}}lint(e=this.getAbsoluteIndex()){return super.lint(e,new RegExp(String.raw`<\s*(?:\/\s*)?(${this.name})\b`,"giu"))}}}}),Do={};ie(Do,{NowikiToken:()=>Ho});var rl,nl,Ho,$u=C({"src/nowiki/index.ts"(){"use strict";var e,rr,s;st(),W(),O(),lt(),rl=mt(i=>new RegExp(String.raw`<\s*(?:/\s*)${i==="nowiki"?"":"?"}(${i})\b`,"giu")),nl=new Set(["languages","section","templatestyles"]),Ho=(s=class extends Te{constructor(){super(...arguments);N(this,e)}get type(){return"ext-inner"}lint(n=this.getAbsoluteIndex()){{const{name:r}=this,{lintConfig:l}=I;let o="void-ext",a=l.getSeverity(o,r);if(a&&P(this,e,rr).call(this)){const h=M(this,{start:n},o,I.msg("nothing-in",r),a);return l.computeEditInfo&&(h.suggestions=[G(h)]),[h]}return super.lint(n,rl(r))}}getAttribute(n){return n==="invalid"?P(this,e,rr).call(this):super.getAttribute(n)}},e=new WeakSet,rr=function(){const{name:n,firstChild:{data:r}}=this;return nl.has(n)&&!!r},s)}}),ll,Ti,ol,pt,Go=C({"src/tagPair/ext.ts"(){"use strict";W(),he(),O(),br(),q(),xr(),yr(),ll=[Is()],pt=class extends(ol=Ye){get type(){return"ext"}constructor(e,t,s,i,n=I.getConfig(),r=!1,l=[]){const o=e.toLowerCase(),a=new Ns(!t||/^\s/u.test(t)?t:` ${t}`,"ext-attrs",o,n,l),u=je(ge({},n),{ext:n.ext.filter(d=>d!==o),excludes:[...n.excludes],inExt:!0});let h;switch(o){case"tab":u.ext=u.ext.filter(d=>d!=="tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":case"langconvert":case"phonos":o==="poem"&&u.excludes.push("heading"),h=new F(s,u,l);break;case"pre":{const{PreToken:d}=(cu(),K(fo));h=new d(s,u,l);break}case"dynamicpagelist":{const{ParamTagToken:d}=(bo(),K(vo));h=new d(r,s,u,l);break}case"inputbox":{const{InputboxToken:d}=(bu(),K(ko));h=new d(r,s,u,l);break}case"references":{const{NestedToken:d}=(bi(),K(ms));u.excludes.push("heading"),h=new d(s,r,["ref"],u,l);break}case"choose":{const{NestedToken:d}=(bi(),K(ms));h=new d(s,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],u,l);break}case"combobox":{const{NestedToken:d}=(bi(),K(ms));h=new d(s,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],u,l);break}case"gallery":{const{GalleryToken:d}=(wu(),K(Ro));h=new d(s,u,l);break}case"imagemap":{const{ImagemapToken:d}=(ku(),K(qo));h=new d(s,u,l);break}case"hiero":{const{CommentedToken:d}=(_u(),K(Mo));h=new d(s,u,l);break}default:{const{NowikiToken:d}=($u(),K(Do));h=new d(s,u,l)}}h.setAttribute("name",o),h.type==="plain"&&(h.type="ext-inner"),super(e,a,h,i,n,l),this.seal("closed",!0)}lint(e=this.getAbsoluteIndex(),t){{const s=super.lint(e,t),{lintConfig:i}=I,n=new ne(this,e);if(this.name!=="nowiki"){const r=this.inHtmlAttrs(),l="parsing-order",o=r&&i.getSeverity(l,r===2?"ext":"templateInTable");o&&s.push(M(this,n,l,"ext-in-html",o))}if(this.name==="ref"){let r="var-anchor",l=i.getSeverity(r,"ref");l&&this.closest("heading-title")&&s.push(M(this,n,r,"variable-anchor",l)),r="nested-link",l=i.getSeverity(r,"ref"),l&&this.closest("link,ext-link-text")&&s.push(M(this,n,r,"ref-in-link",l))}return s}}},Ti=se(ol),pt=ee(Ti,0,"ExtToken",ll,pt),Z(Ti,1,pt)}}),Vo={};ie(Vo,{parseCommentAndExt:()=>Kt});var Ci,al,ns,ul,Ii,Kt,Fs=C({"parser/commentAndExt.ts"(){"use strict";st(),ce(),lu(),At(),au(),uu(),Go(),zo(),Ci="<onlyinclude>",al="</onlyinclude>",{length:ns}=Ci,ul=[!1,!0].map(e=>{const t=e?"includeonly":"(?:no|only)include",s=e?"noinclude":"includeonly";return mt(i=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${t}(?:\s[^>]*)?/?>|</${t}\s*>|<(${i})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(${"\\1"}\s*)>)|<(${s})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${s}\s*)>|$))`,"giu"))}),Ii=e=>{const t=e.indexOf(Ci);return{i:t,j:e.indexOf(al,t+ns)}},Kt=(e,t,s,i)=>{if(i){let{i:a,j:u}=Ii(e);if(a!==-1&&u!==-1){let h="";const d=g=>{new we(g,t,s),h+=`\0${s.length-1}n`};for(;a!==-1&&u!==-1;){const g=`\0${s.length}e`;new Ot(e.slice(a+ns,u),t,s),a>0&&d(e.slice(0,a)),h+=g,e=e.slice(u+ns+1),{i:a,j:u}=Ii(e)}return e&&d(e),h}}const{ext:n}=t;let r=n,l=t;if(n.includes("translate")){r=n.filter(u=>u!=="translate"&&u!=="tvar"),l=je(ge({},t),{ext:r});const a=[];e=e.replace(/<nowiki>[\s\S]*?<\/nowiki>/giu,u=>(a.push(u),`\0${a.length-1}`)).replace(/<translate( nowrap)?>([\s\S]*?)<\/translate>/gu,(u,h,d)=>{const g=s.length;return new lo(h,d&&ye(d,a),l,s),`\0${g}g`}),e=ye(e,a)}const o=ul[i?1:0](r.join("|"));return o.lastIndex=0,o.test(e)?e.replace(o,(a,u,h,d,g,c,p,x,m)=>{const v=s.length;let w="n";if(u)w="e",new pt(u,h,d,g,l,c,s);else if(a.startsWith("<!--")){w="c";const S=a.endsWith("-->");new gt(ye(a,s,1).slice(4,S?-3:void 0),S,t,s)}else c?new jt(c,p&&ye(p,s,1),x&&ye(x,s,1),m,t,s):new we(a,t,s,!0);return`\0${v}${w}`}):e}}}),hl,dl,cl,gl,Ni,pl,Wt,Tu=C({"src/tag/html.ts"(){"use strict";var e,t;W(),he(),br(),O(),no(),hl=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),dl=new Set(["b","big","center","cite","code","del","dfn","em","font","i","ins","kbd","mark","pre","q","s","samp","small","strike","strong","sub","sup","tt","u","var"]),cl=new Set(["strike","big","center","font","tt"]),gl=[Is()],Wt=(t=class extends(pl=vr){constructor(i,n,r,l,o,a){super(i,n,r,o,a);N(this,e);this.setAttribute("name",i.toLowerCase()),L(this,e,l)}get type(){return"html"}get selfClosing(){return f(this,e)}text(){const{closing:i,selfClosing:n,name:r}=this,{html:[,,l]}=this.getAttribute("config");return l.includes(r)?i&&r!=="br"?"":super.text("/"):super.text(n&&!i?"/":"")}lint(i=this.getAbsoluteIndex(),n){var r;{const l=super.lint(i,n),{name:o,parentNode:a,closing:u,selfClosing:h}=this,d=new ne(this,i),{lintConfig:g}=I,{computeEditInfo:c,fix:p}=g,x=this.inTableAttrs();let m="h1",v=g.getSeverity(m,"html");if(v&&o==="h1"&&!u){const $=M(this,d,m,"<h1>",v);c&&($.suggestions=[{desc:"h2",range:[i+2,i+3],text:"2"}]),l.push($)}if(m="parsing-order",v=x&&g.getSeverity(m,x===2?"html":"templateInTable"),v){const $=M(this,d,m,"html-in-table",v);c&&x===2&&($.suggestions=[G($)]),l.push($)}if(m="obsolete-tag",v=g.getSeverity(m,o),v&&cl.has(o)&&l.push(M(this,d,m,"obsolete-tag",v)),m="bold-header",v=g.getSeverity(m,o),v&&(o==="b"||o==="strong")&&((r=this.closest("heading-title,ext"))==null?void 0:r.type)==="heading-title"){const $=M(this,d,m,"bold-in-header",v);c&&($.suggestions=[G($)]),l.push($)}const{html:[,w,S]}=this.getAttribute("config"),y=S.includes(o),A=w.includes(o),k=!y&&!A;if(m="unmatched-tag",u&&(h||y)||h&&k){if(v=g.getSeverity(m,u?"both":"selfClosing"),v){const $=M(this,d,m,u?"closing-and-self-closing":"invalid-self-closing",v);if(c||p){const b=dr(i),_={desc:I.msg("no-self-closing"),range:[$.endIndex-2,$.endIndex-1],text:""};A?c&&($.suggestions=[b,_]):u?$.fix=y?b:_:c&&($.suggestions=[_,He($.endIndex,`></${o}>`,-2)])}l.push($)}}else if(!this.findMatchingTag()){const $=M(this,d,m,u?"unmatched-closing":"unclosed-tag"),b=this.closest("magic-word");if(b&&hl.has(b.name))v=g.getSeverity(m,"conditional");else if(u)v=g.getSeverity(m,"closing"),$.suggestions=[G($)];else{v=g.getSeverity(m,"opening");const _=a==null?void 0:a.childNodes;dl.has(o)&&(_!=null&&_.slice(0,_.indexOf(this)).some(T=>T.is("html")&&T.name===o&&!T.findMatchingTag())&&($.suggestions=[He(i+1,"/")]),this.closest("heading-title")&&($.rule="format-leakage",v=g.getSeverity("format-leakage",o)))}v&&($.severity=v,l.push($))}return l}}getAttribute(i){return i==="invalid"?this.inTableAttrs()===2:super.getAttribute(i)}json(i,n=this.getAbsoluteIndex()){}},e=new WeakMap,t),Ni=se(pl),Wt=ee(Ni,0,"HtmlToken",gl,Wt),Z(Ni,1,Wt)}}),Qo={};ie(Qo,{parseHtml:()=>Jo});var fl,Jo,Cu=C({"parser/html.ts"(){"use strict";yr(),Tu(),fl=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,Jo=(e,t,s)=>{var l;const{html:i}=t;(l=t.htmlElements)!=null||(t.htmlElements=new Set([...i[0],...i[1],...i[2]]));const n=e.split("<");let r=n.shift();for(const o of n){const a=fl.exec(o),u=a==null?void 0:a[2],h=u==null?void 0:u.toLowerCase();if(!a||!t.htmlElements.has(h)){r+=`<${o}`;continue}const[,d,,g="",c,p]=a,{length:x}=s,m=new Ns(g,"html-attrs",h,t,s),v=m.hasAttr("itemprop");if(h==="meta"&&!(v&&m.hasAttr("content"))||h==="link"&&!(v&&m.hasAttr("href"))){r+=`<${o}`,s.length=x;continue}r+=`\0${s.length}x${p}`,new Wt(u,m,d==="/",c==="/>",t,s)}return r}}}),ml,Li,xl,ft,Xo=C({"src/table/base.ts"(){"use strict";br(),q(),rt(),yr(),ml=[Is(1)],ft=class extends(xl=F){constructor(e,t,s,i,n,r=[],l){super(void 0,n,r,l),this.append(new Ve(t,"table-syntax",n,r),new Ns(i,"table-attrs",s,n,r))}escape(){}},Li=se(xl),ft=ee(Li,0,"TableBaseToken",ml,ft),Z(Li,1,ft)}}),vl,Ei,_e,ls,Lt,Et,As,Ko=C({"src/table/td.ts"(){"use strict";W(),he(),mr(),O(),q(),Xo(),As=class extends(Ei=ft,vl=[$s(!1)],Ei){constructor(e,t,s,i=[]){var o;let n=/\||\0\d+!\x7F/u.exec(t!=null?t:""),r=n?t.slice(0,n.index):"";/\[\[|-\{/u.test(r)&&(n=null,r=""),super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",r,s,i),Z(ls,5,this),ze(this,Lt),ze(this,_e,""),n&&([Ja(this,_e)._]=n);const l=new F(t==null?void 0:t.slice(((o=n==null?void 0:n.index)!=null?o:NaN)+de(this,_e).length),s,i);l.type="td-inner",l.setAttribute("stage",4),this.insertAt(l)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return Qi(this,Lt,Et).call(this).subtype}afterBuild(){de(this,_e).includes("\0")&&be(this,_e,this.buildFromStr(de(this,_e),0)),super.afterBuild()}toString(e){const{childNodes:[t,s,i]}=this;return t.toString(e)+s.toString(e)+de(this,_e)+i.toString(e)}text(){const{childNodes:[e,t,s]}=this;return e.text()+t.text()+de(this,_e)+s.text()}getGaps(e){return e===1?de(this,_e).length:0}lint(e=this.getAbsoluteIndex(),t){{const s=super.lint(e,t),i=new ne(this,e+this.getRelativeIndex(this.length-1)),n="pipe-like",{lintConfig:r}=I,{computeEditInfo:l,fix:o}=r,a=["td","double"].map(u=>r.getSeverity(n,u));for(const u of this.lastChild.childNodes)if(u.type==="text"){const{data:h}=u;if(h.includes("|")){const d=h.includes("||"),g=a[d?1:0];if(g){const c=B(u,i,n,"pipe-in-table",g);if(l||o)if(d){const p={caption:"|+",td:"|",th:"!"}[this.subtype];c.fix=$e(c,"newline",h.replace(/\|\|/gu,`
17
+ ${p}`))}else l&&(c.suggestions=[pr(c.startIndex,h)]);s.push(c)}}}return s}}isIndependent(){return this.firstChild.text().startsWith(`
18
+ `)}getAttr(e){{const t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}}escape(){}print(){const{childNodes:[e,t,s]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${de(this,_e)}${s.print()}</span>`}json(e,t=this.getAbsoluteIndex()){}},ls=se(Ei),_e=new WeakMap,Lt=new WeakSet,Et=function(){var e;const t=this.firstChild.text(),s=t.slice(-1);let i="td";if(s==="!"?i="th":s==="+"&&(i="caption"),this.isIndependent())return{subtype:i};const{previousSibling:n}=this;return ge({},Qi(e=n,Lt,Et).call(e))},Et=ee(ls,17,"#getSyntax",vl,Lt,Et),ar(ls,As)}}),Tr,Yo=C({"src/table/trBase.ts"(){"use strict";W(),O(),Xo(),Ko(),Tr=class extends ft{lint(e=this.getAbsoluteIndex(),t){{const s=super.lint(e,t),i=this.childNodes.find(({type:o})=>o==="table-inter");if(!i)return s;const n=Ht(i),r="fostered-content",l=n&&I.lintConfig.getSeverity(r,n===2?void 0:"transclusion");if(l){const o=B(i,{start:e},r,"content-outside-table",l);o.startIndex++,o.startLine++,o.startCol=0,s.push(o)}return s}}getRowCount(){return Number(this.childNodes.some(e=>e instanceof As&&e.isIndependent()&&!e.firstChild.text().endsWith("+")))}}}}),bl,yl,wl,Sl,Fi,os,xs,Iu=C({"src/table/index.ts"(){"use strict";W(),Ie(),he(),mr(),O(),Yo(),rt(),bl=(e,t)=>new Array(e).fill(void 0).map((s,i)=>t(i)),yl=({type:e})=>e==="tr"||e==="table-syntax",wl=class extends Array{},xs=class extends(Fi=Tr,Sl=[$s(!1)],Fi){constructor(e,t,s,i){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,e,"table",t,s,i,{}),Z(os,5,this)}get type(){return"table"}get closed(){return this.lastChild.is("table-syntax")}lint(e=this.getAbsoluteIndex(),t){{const s=super.lint(e,t),i=new ne(this,e),n=["unclosed-table","table-layout"],r=n.map(l=>I.lintConfig.getSeverity(l));if(r[0]&&!this.closed&&s.push(B(this.firstChild,i,n[0],"unclosed-table",r[0])),r[1]){const l=this.getLayout(),{length:o}=l;if(o>1){let a=1,u=1/0,h=0;for(;h<o;h++){const d=l[h],g=d.length;if(g<a)break;g<u&&(u=g);const c=d.indexOf(d[g-1])+1;if(c>u)break;c>a&&(a=c)}if(h<o){const d=this.getNthRow(h),g=B(d,i,n[1],"inconsistent-table",r[1]);g.startIndex++,g.startLine++,g.startCol=0,s.push(g)}}}return s}}close(e=`
19
+ |}`,t){xe.run(()=>{const s=new Ve(t?e:void 0,"table-syntax",this.getAttribute("config"),this.getAttribute("accum"));super.insertAt(s)})}getLayout(e){{const t=this.getAllRows(),{length:s}=t,i=wl.from(bl(s,()=>[]));for(let n=0;n<i.length;n++){const r=i[n];let l=0,o=0,a;for(const u of t[n].childNodes.slice(2))if(u.is("td")){if(u.isIndependent()&&(a=u.subtype!=="caption"),a){const h={row:n,column:l},{rowspan:d,colspan:g}=u;for(l++;r[o];)o++;for(let c=n;c<Math.min(n+d,s);c++)for(let p=o;p<o+g;p++)i[c][p]=h;o+=g}}else if(yl(u))break}return i}}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(e=>e.is("tr")&&e.getRowCount()>0)]}getNthRow(e,t,s){{const i=super.getRowCount();if(e===0&&i)return this;i&&e--;for(const n of this.childNodes.slice(2)){const{type:r}=n;if(r==="tr"&&n.getRowCount()&&(e--,e<0))return n}return}}json(e,t=this.getAbsoluteIndex()){}},os=se(Fi),ee(os,1,"getLayout",Sl,xs),ar(os,xs)}}),Zo,Nu=C({"src/table/tr.ts"(){"use strict";Yo(),Zo=class extends Tr{get type(){return"tr"}constructor(e,t,s,i){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,e,"tr",t,s,i)}}}}),Cr,ea=C({"src/nowiki/listBase.ts"(){"use strict";lt(),Cr=class extends Te{get indent(){}json(e,t=this.getAbsoluteIndex()){}}}}),Ir,ta=C({"src/nowiki/dd.ts"(){"use strict";ea(),Ir=class extends Cr{get type(){return"dd"}}}}),sa={};ie(sa,{parseTable:()=>ia});var Al,Ri,ia,Lu=C({"parser/table.ts"(){"use strict";q(),Iu(),Nu(),Ko(),ta(),Al=e=>e.lastChild.constructor!==F,Ri=(e,t)=>e.is("td")?t.pop():e,ia=({firstChild:{data:e},type:t,name:s},i,n)=>{const r=[],l=e.split(`
20
+ `);let o=t==="root"||t==="parameter-value"||t==="ext-inner"&&s==="poem"?"":`
21
+ ${l.shift()}`,a;const u=(h,d)=>{if(!d){o+=h;return}const{lastChild:g}=d;if(Al(d)){const c=new F(h,i,n);c.type="table-inter",c.setAttribute("stage",3),d.insertAt(c)}else g.setText(g.toString()+h)};for(const h of l){a=r.pop();const[d]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(h),g=h.slice(d.length),c=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(g);if(c){for(;a&&!a.is("td");)a=r.pop();const[,S,y,A,k]=c;S&&new Ir(S,i,n),u(`
22
+ ${d}${S&&`\0${n.length-1}d`}${y}\0${n.length}b`,a),r.push(...a?[a]:[],new xs(A,k,i,n));continue}else if(!a){o+=`
23
+ ${h}`;continue}const p=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(g);if(!p){u(`
24
+ ${h}`,a),r.push(a);continue}const[,x,m,v,w]=p;if(x){for(;!a.is("table");)a=r.pop();a.close(`
25
+ ${d}${x}`,!0),u(w,r[r.length-1])}else if(m){a=Ri(a,r),a.is("tr")&&(a=r.pop());const S=new Zo(`
26
+ ${d}${m}`,w,i,n);r.push(a,S),a.insertAt(S)}else{a=Ri(a,r);const S=v==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu;let y=S.exec(w),A=0,k=`
27
+ ${d}${v}`;const $=b=>{const _=new As(k,w.slice(A,y==null?void 0:y.index),i,n);return b.insertAt(_),_};for(;y;)$(a),{lastIndex:A}=S,[k]=y,y=S.exec(w);r.push(a,$(a))}}return o.slice(1)}}}),zt,Eu=C({"../cm-util/dist/index.mjs"(){"use strict";zt=e=>!/^_{2}.+_{2}$/u.test(e)}}),ra,Fu=C({"src/nowiki/hr.ts"(){"use strict";lt(),ra=class extends Te{get type(){return"hr"}}}}),kl,Pi,_l,Mt,Ru=C({"src/nowiki/doubleUnderscore.ts"(){"use strict";var e,t;it(),Qe(),lt(),kl=[Ge(),We("__")],Mt=(t=class extends(_l=Te){constructor(i,n,r,l,o){var d,g;super(i,l,o);N(this,e);const a=i.toLowerCase(),{doubleUnderscore:[,,u,h]}=l;this.setAttribute("name",(g=n?(d=h==null?void 0:h[i])==null?void 0:d.toLowerCase():u==null?void 0:u[a])!=null?g:a),L(this,e,r)}get type(){return"double-underscore"}toString(){const i=f(this,e)?"__":"__";return i+this.innerText+i}print(){const i=f(this,e)?"__":"__";return super.print({pre:i,post:i})}},e=new WeakMap,t),Pi=se(_l),Mt=ee(Pi,0,"DoubleUnderscoreToken",kl,Mt),Z(Pi,1,Mt)}}),na={};ie(na,{parseHrAndDoubleUnderscore:()=>la});var la,Pu=C({"parser/hrAndDoubleUnderscore.ts"(){"use strict";Eu(),Fu(),Ru(),yo(),la=({firstChild:{data:e},type:t,name:s},i,n)=>{var u,h,d;const{doubleUnderscore:[r,l,o]}=i,a=[...r,...l];return(u=i.insensitiveDoubleUnderscore)!=null||(i.insensitiveDoubleUnderscore=new Set(r.filter(zt))),(h=i.sensitiveDoubleUnderscore)!=null||(i.sensitiveDoubleUnderscore=new Set(l.filter(zt))),(d=i.regexHrAndDoubleUnderscore)!=null||(i.regexHrAndDoubleUnderscore=new RegExp(`__(${a.filter(zt).join("|")})__|_{2}(${a.filter(g=>!zt(g)).map(g=>g.slice(2,-2)).join("|")})_{2}`,"giu")),t!=="root"&&(t!=="ext-inner"||s!=="poem")&&(e=`\0${e}`),e=e.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(g,c,p)=>(new ra(p,i,n),`${c}\0${n.length-1}r`)).replace(i.regexHrAndDoubleUnderscore,(g,c,p)=>{var S;const x=c!=null?c:p,m=i.sensitiveDoubleUnderscore.has(x),v=x.toLowerCase(),w=i.insensitiveDoubleUnderscore.has(v);return m||w?(new Mt(x,m,!!p,i,n),`\0${n.length-1}${w&&((S=o==null?void 0:o[v])!=null?S:v)==="toc"?"u":"n"}`):g}),i.excludes.includes("heading")||(e=e.replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(g,c,p,x,m)=>{const v=`${c}\0${n.length}h`;return new ut(p.length,[x,m],i,n),v})),t==="root"||t==="ext-inner"&&s==="poem"?e:e.slice(1)}}}),oa,Ou=C({"src/nowiki/quote.ts"(){"use strict";var e,t;W(),he(),O(),lt(),oa=(t=class extends Te{constructor(i,n,r,l){super(i,r,l);N(this,e);L(this,e,n)}get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}get closing(){return ge(ge({},this.bold?{bold:f(this,e).bold}:void 0),this.italic?{italic:f(this,e).italic}:void 0)}text(){const{parentNode:i,innerText:n}=this;return i!=null&&i.is("image-parameter")&&i.name!=="caption"?"":n}lint(i=this.getAbsoluteIndex()){var n;{const{previousSibling:r,bold:l,closing:o}=this,a=(r==null?void 0:r.type)==="text"?r.data:void 0,u=[],h=new ne(this,i),d=["lonely-apos","bold-header"],{lintConfig:g}=I,{computeEditInfo:c}=g,p=[void 0,"word"].map(m=>g.getSeverity(d[0],m)),x=g.getSeverity(d[1]);if(a!=null&&a.endsWith("'")){const m=p[(o.bold||o.italic)&&/[a-z\d]'$/iu.test(a)?1:0];if(m){const v=M(this,h,d[0],I.msg("lonely","'"),m),{startLine:w,startCol:S}=v,[,{length:y}]=/(?:^|[^'])('+)$/u.exec(a),A=i-y,k=je(ge({},v),{startIndex:A,endIndex:i,endLine:w,startCol:S-y,endCol:S});c&&(k.suggestions=[wt(A,"&apos;",y),G(k)]),u.push(k)}}if(x&&l&&((n=this.closest("heading-title,ext"))==null?void 0:n.type)==="heading-title"){const m=M(this,h,d[1],"bold-in-header",x);c&&(m.suggestions=[G(m)]),u.push(m)}return u}}json(i,n=this.getAbsoluteIndex()){}},e=new WeakMap,t)}}),aa={};ie(aa,{parseQuotes:()=>Nr});var Nr,ua=C({"parser/quotes.ts"(){"use strict";Ou(),Nr=(e,t,s,i)=>{var c;const n=e.split(/('{2,})/u),{length:r}=n;if(r===1)return e;let l=0,o=0,a,u,h;for(let p=1;p<r;p+=2){const x=n[p].length;switch(x){case 2:o++;break;case 4:n[p-1]+="'",n[p]="'''";case 3:if(l++,a!==void 0)break;n[p-1].endsWith(" ")?u===void 0&&h===void 0&&(h=p):n[p-1].slice(-2,-1)===" "?a=p:u!=null||(u=p);break;default:n[p-1]+="'".repeat(x-5),n[p]="'''''",o++,l++}}if(o%2===1&&l%2===1){const p=(c=a!=null?a:u)!=null?c:h;p!==void 0&&(n[p]="''",n[p-1]+="'")}let d=!1,g=!1;for(let p=1;p<r;p+=2){const x=n[p].length,m=x!==2,v=x!==3,w=new oa(n[p],{bold:m&&!!d,italic:v&&!!g},t,s);m&&(d=!d&&w),v&&(g=!g&&w),n[p]=`\0${s.length-1}q`}return n.join("")}}}),ha={};ie(ha,{parseExternalLinks:()=>Lr});var Lr,da=C({"parser/externalLinks.ts"(){"use strict";ce(),Bo(),$r(),Lr=(e,t,s,i)=>{var n;return(n=t.regexExternalLinks)!=null||(t.regexExternalLinks=new RegExp(String.raw`\[((?:\0\d+[cn]\x7F)*(?:\0\d+f\x7F|(?:(?:${t.protocol}|//)${xt}|\0\d+m\x7F)${vt}(?=[[\]<>"\t${De}]|\0\d)))([${De}]*(?![${De}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),e.replace(t.regexExternalLinks,(r,l,o,a)=>{const{length:u}=s,h=/&[lg]t;/u.exec(l);return h&&(o="",a=l.slice(h.index)+o+a,l=l.slice(0,h.index)),i?(new Jt(l,"ext-link-url",t,s),`[\0${u}f${o}${a}]`):(new ct(l,o,a,t,s),`\0${u}w`)})}}}),ca,ju=C({"src/link/category.ts"(){"use strict";Ts(),ca=class extends Me{get type(){return"category"}get sortkey(){}json(e,t=this.getAbsoluteIndex()){}}}}),ga={};ie(ga,{parseLinks:()=>nr});var $l,nr,Bu=C({"parser/links.ts"(){"use strict";ce(),O(),ua(),da(),jo(),Lo(),ju(),$l=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,nr=(e,t,s,i,n)=>{var a;(a=t.regexLinks)!=null||(t.regexLinks=new RegExp(String.raw`^\s*(?:${t.protocol}|//)`,"iu"));const r=t.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]]))?\]\]([\s\S]*)$/u:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])*)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]])?)?\]\]([\s\S]*)$/u,l=e.split("[[");let o=l.shift();for(let u=0;u<l.length;u++){let h=!1,d,g,c,p;const x=l[u],m=r.exec(x);if(m)[,d,g,c,p]=m,p.startsWith("]")&&(c!=null&&c.includes("["))&&(c+="]",p=p.slice(1));else{const k=$l.exec(x);k&&(h=!0,[,d,g,c]=k)}if(d===void 0||t.regexLinks.test(d)||/\0\d+[exhbru]\x7F/u.test(d)){o+=`[[${x}`;continue}let v=fe(d).trim();const w=v.startsWith(":");if(w&&h){o+=`[[${x}`;continue}else!v&&c&&!c.includes(`
28
+ `)&&(v=fe(c).trim());const{ns:S,valid:y}=I.normalizeTitle(v,0,!1,t,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0,page:i});if(y){if(h){if(S!==6){o+=`[[${x}`;continue}let k=!1;for(u++;u<l.length;u++){const $=l[u],b=$.split("]]");if(b.length>2){k=!0,c+=`[[${b[0]}]]${b[1]}`,p=b.slice(2).join("]]");break}else if(b.length===2)c+=`[[${b[0]}]]${b[1]}`;else{c+=`[[${$}`;break}}if(c=nr(c,t,s,i,n),!k){o+=`[[${d}${g}${c}`;continue}}}else{o+=`[[${x}`;continue}c&&(c=Nr(c,t,s,n));let A=_r;w||(S===6?(c&&(c=Lr(c,t,s,!0)),A=kr):S===14&&(A=ca)),c===void 0&&g&&(c=""),o+=`\0${s.length}l${p}`,new A(d,c,t,s,g)}return o}}}),pa={};ie(pa,{parseMagicLinks:()=>fa});var Oi,ji,Bi,qi,fa,qu=C({"parser/magicLinks.ts"(){"use strict";ce(),$r(),Oi=String.raw`[${De}\t]|&nbsp;|&#0*160;|&#x0*a0;`,ji=`(?:${Oi})+`,Bi=`(?:${Oi}|-)`,qi=String.raw`(?:RFC|PMID)${ji}\d+\b|ISBN${ji}(?:97[89]${Bi}?)?(?:\d${Bi}?){9}[\dx]\b`,fa=(e,t,s)=>{if(!t.regexMagicLinks)try{t.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${t.protocol})(${xt}${vt})|${qi})`,"giu")}catch(i){t.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${t.protocol})(${xt}${vt})|${qi})`,"giu")}return e.replace(t.regexMagicLinks,(i,n,r)=>{let l=n?i.slice(n.length):i;if(r){let o="";const a=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(l);a&&(o=l.slice(a.index),l=l.slice(0,a.index));const u=l.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,h=u.exec(l);if(h){let d=1;h[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(l.slice(0,h.index))&&(d=2),o=l.slice(h.index+d)+o,l=l.slice(0,h.index+d)}return o.length>=r.length?i:(new Jt(l,void 0,t,s),`${n}\0${s.length-1}w${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(l))return i;return new Jt(l,"magic-link",t,s),`${n}\0${s.length-1}i`})}}}),ma,Wu=C({"util/html.ts"(){"use strict";ma=(e,t)=>e.startsWith(t)?t.length:[...t].findIndex((s,i)=>s!==e[i])}}),Tl,xa,zu=C({"src/nowiki/list.ts"(){"use strict";W(),O(),ea(),Tl=new Set(["link","category","file"]),xa=class extends Cr{get type(){return"list"}lint(e=this.getAbsoluteIndex()){var t;{const s="syntax-like",i=I.lintConfig.getSeverity(s,"redirect"),{innerText:n}=this;if(i&&n==="#"){let{nextSibling:r}=this;if((r==null?void 0:r.type)==="list-range"&&(r=r.firstChild),(r==null?void 0:r.type)==="text"&&Tl.has((t=r.nextSibling)==null?void 0:t.type)&&new RegExp(String.raw`^(?:${this.getAttribute("config").redirection.join("|")})\s*(?::\s*)?$`,"iu").test(`#${r.data}`)){const o=M(r,{start:e+1},s,"redirect-like",i);return o.startIndex--,o.startCol--,o.endIndex+=2,o.endCol+=2,[o]}}return[]}}}}}),va={};ie(va,{parseList:()=>ba});var ba,Mu=C({"parser/list.ts"(){"use strict";Wu(),zu(),ta(),ba=(e,t,s,i)=>{const n=/^((?:\0\d+[cno]\x7F)*)([;:*#]+)(\s*)/u.exec(e);if(!n)return t.lastPrefix="",e;const[r,l,o,a]=n,u=o.replace(/;/gu,":"),h=ma(u,t.lastPrefix),d=((h>1?o.slice(h-1):o)+a).split(/(?=;)/u),g=d[0].startsWith(";");let c=d.length-(g?0:1);if(h>1){const T=o.slice(0,h-1);if(g){const E=T.split(/(?=;)/u);d.unshift(...E),c+=T.includes(";")?E.length:0}else d[0]=T+d[0]}t.lastPrefix=u;let p=l+d.map((T,E)=>`\0${i.length+E}d`).join("")+e.slice(r.length);for(const T of d)new xa(T,s,i);if(!c)return p;const{html:[x,,m]}=s,v=/:+|-\{|\0\d+[xq]\x7F/gu;let w=v,S=w.exec(p),y=0,A=!1,k=!1,$=0;const b=(T,E)=>(new Ir(T,s,i),`${p.slice(0,E)}\0${i.length-1}d${p.slice(E+T.length)}`),_=T=>{T?y&&y--:y++};for(;S&&c;){const{0:T,index:E}=S;if(T==="-{"){if(!$){const{lastIndex:R}=w;w=/-\{|\}-/gu,w.lastIndex=R}$++}else if(T==="}-"){if($--,!$){const{lastIndex:R}=w;w=v,w.lastIndex=R}}else if(T.endsWith("x")){const{name:R,closing:z,selfClosing:j}=i[Number(T.slice(1,-2))];(x.includes(R)||!j&&!m.includes(R))&&_(z)}else if(T.endsWith("q")){const{bold:R,italic:z}=i[Number(T.slice(1,-2))];R&&(_(A),A=!A),z&&(_(k),k=!k)}else if(y===0){if(T.length>=c)return b(T.slice(0,c),E);c-=T.length,w.lastIndex=E+4+String(i.length).length,p=b(T,E)}S=w.exec(p)}return p}}}),as,Cl,Wi,Il,Ut,Uu=C({"src/converterFlags.ts"(){"use strict";var e,t;W(),he(),Cs(),O(),q(),nt(),as=new Set(["A","T","R","D","-","H","N"]),Cl=[Xt()],Ut=(t=class extends(Il=F){constructor(i,n,r=[]){super(void 0,n,r,{});N(this,e);this.safeAppend(i.map(l=>new Ce(l,"converter-flag",n,r)))}get type(){return"converter-flags"}afterBuild(){L(this,e,this.childNodes.map(i=>i.text().trim())),super.afterBuild()}toString(i){return super.toString(i,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(f(this,e).filter(i=>/\{{3}[^{}]+\}{3}/u.test(i)))}getVariantFlags(){const i=new Set(this.getAttribute("config").variants);return new Set(f(this,e).filter(n=>i.has(n)))}isInvalidFlag(i,n,r,l){return typeof i=="object"&&(i=i.text().trim(),n=this.getVariantFlags(),r=this.getUnknownFlags(),l=new Set(f(this,e).filter(o=>as.has(o)))),!!i&&!n.has(i)&&!r.has(i)&&(n.size>0||!l.has(i))}lint(i=this.getAbsoluteIndex(),n){{const r=this.getVariantFlags(),l=this.getUnknownFlags(),o=new Set(f(this,e).filter(m=>as.has(m))),a=f(this,e).filter(m=>!m).length,u=f(this,e).length-l.size-a,{lintConfig:h}=I,{computeEditInfo:d,fix:g}=h,c=super.lint(i,n);if(r.size===u||o.size===u)return c;const p="no-ignored",x=h.getSeverity(p,"conversionFlag");if(x){const m=new ne(this,i);for(let v=0;v<this.length;v++){const w=this.childNodes[v],S=w.text().trim();if(this.isInvalidFlag(S,r,l,o)){const y=B(w,m,p,"invalid-conversion-flag",x);(d||g)&&(r.size===0&&as.has(S.toUpperCase())?y.fix=gr(y,S):d&&(y.suggestions=[G(y,v&&-1)])),c.push(y)}}}return c}}print(){return super.print({sep:";"})}},e=new WeakMap,t),Wi=se(Il),Ut=ee(Wi,0,"ConverterFlagsToken",Cl,Ut),Z(Wi,1,Ut)}}),us,vs,Du=C({"src/converterRule.ts"(){"use strict";Be(),O(),q(),nt(),us=(e,t,s,i)=>{const n=new F(e,s,i);return n.type=`converter-rule-${t}`,n.setAttribute("stage",pe),n},vs=class extends F{get type(){return"converter-rule"}get variant(){}constructor(e,t=!0,s=I.getConfig(),i=[]){super(void 0,s,i,{});const n=e.indexOf(":"),r=e.slice(0,n).indexOf("=>"),l=r===-1?e.slice(0,n):e.slice(r+2,n);t&&s.variants.includes(l.trim().toLowerCase())?(super.insertAt(new Ce(l,"converter-rule-variant",s,i)),super.insertAt(us(e.slice(n+1),"to",s,i)),r!==-1&&super.insertAt(us(e.slice(0,r),"from",s,i),0)):super.insertAt(us(e,"to",s,i))}toString(e){const{childNodes:t,firstChild:s,lastChild:i}=this;return t.length===3?`${s.toString(e)}=>${t[1].toString(e)}:${i.toString(e)}`:super.toString(e,":")}text(){const{childNodes:e,firstChild:t,lastChild:s}=this;return e.length===3?`${t.text()}=>${e[1].text()}:${s.text()}`:super.text(":")}getGaps(e){return e===0&&this.length===3?2:1}print(){const{childNodes:e}=this;if(e.length===3){const[t,s,i]=e;return`<span class="wpb-converter-rule">${t.print()}=>${s.print()}:${i.print()}</span>`}return super.print({sep:":"})}json(e,t=this.getAbsoluteIndex()){}}}}),Nl,zi,Ll,Dt,Hu=C({"src/converter.ts"(){"use strict";ce(),Qe(),qe(),q(),Uu(),Du(),Nl=[Ee,We("-{")],Dt=class extends(Ll=F){get type(){return"converter"}constructor(e,t,s,i=[]){super(void 0,s,i),this.insertAt(new Ut(e,s,i));const[n]=t,r=n.includes(":"),l=new vs(n,r,s,i);(r?l.length===1:t.length===2&&!fe(t[1]).trim())?this.insertAt(new vs(t.join(";"),!1,s,i)):this.safeAppend([l,...t.slice(1).map(o=>new vs(o,!0,s,i))])}toString(e){const{childNodes:[t,...s]}=this;return`-{${t.toString(e)}${t.length>0?"|":""}${s.map(i=>i.toString(e)).join(";")}}-`}text(){const{childNodes:[e,...t]}=this;return`-{${e.text()}|${tt(t,";")}}-`}getGaps(e){return e||this.firstChild.length>0?1:0}print(){const{childNodes:[e,...t]}=this;return`<span class="wpb-converter">-{${e.print()}${e.length>0?"|":""}${yt(t,{sep:";"})}}-</span>`}},zi=se(Ll),Dt=ee(zi,0,"ConverterToken",Nl,Dt),Z(zi,1,Dt)}}),ya={};ie(ya,{parseConverter:()=>wa});var wa,Gu=C({"parser/converter.ts"(){"use strict";Hu(),wa=(e,t,s)=>{var a;(a=t.regexConverter)!=null||(t.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${t.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"iu"));const i=/-\{/gu,n=/-\{|\}-/gu,r=[];let l=i,o=l.exec(e);for(;o;){const{0:u,index:h}=o;if(u==="}-"){const d=r.pop(),{length:g}=s,c=e.slice(d.index+2,h),p=c.indexOf("|"),[x,m]=p===-1?[[],c]:[c.slice(0,p).split(";"),c.slice(p+1)],v=m.replace(/(&[#a-z\d]+);/giu,"$1"),w=v.split(t.regexConverter).map(S=>S.replace(/\x01/gu,";"));new Dt(x,w,t,s),e=`${e.slice(0,d.index)}\0${g}v${e.slice(h+2)}`,r.length===0&&(l=i),l.lastIndex=d.index+3+String(g).length}else r.push(o),l=n,l.lastIndex=h+2;o=l.exec(e)}return e}}}),ks={};ie(ks,{Token:()=>F});var El,F,q=C({"src/index.ts"(){"use strict";var e,t,s,i,n,r,l,o,a,Sa,Aa,ka,_a,$a,Ta,Ca,Ia,Na,La,Ea,Fa,A;ce(),Be(),W(),Ie(),O(),tu(),su(),El=["category","html-attr#id,ext-attr#id,table-attr#id"],F=(A=class extends Rt{constructor(b,_=I.getConfig(),T=[],E){super();N(this,a);N(this,e,"plain");N(this,t,0);N(this,s);N(this,i);N(this,n);N(this,r,!1);N(this,l);N(this,o);typeof b=="string"&&this.insertAt(b),L(this,s,_),L(this,i,T),T.push(this)}get type(){return f(this,e)}set type(b){L(this,e,b)}get pageName(){return f(this.getRootNode(),o)}set pageName(b){if(b){const _=this.normalizeTitle(b,0,{temporary:!0,page:""});L(this,o,_.valid?_.title:void 0)}else L(this,o,b===""?"":void 0)}parseOnce(b=f(this,t),_=!1,T){if(b<f(this,t)||this.length===0||!this.isPlain())return this;if(f(this,t)>=pe)return this;switch(b){case 0:if(this.type==="root"){f(this,i).pop();const E=P(this,a,Sa).call(this);_&&(_=!E)}L(this,n,_),P(this,a,Aa).call(this,_);break;case 1:P(this,a,ka).call(this);break;case 2:P(this,a,_a).call(this);break;case 3:P(this,a,$a).call(this);break;case 4:P(this,a,Ta).call(this);break;case 5:P(this,a,Ca).call(this,T);break;case 6:P(this,a,Ia).call(this,T);break;case 7:P(this,a,Na).call(this);break;case 8:P(this,a,La).call(this);break;case 9:P(this,a,Ea).call(this);break;case 10:P(this,a,Fa).call(this)}if(this.type==="root")for(const E of f(this,i))E==null||E.parseOnce(b,_,T);return zr(this,t)._++,this}buildFromStr(b,_){const T=b.split(/[\0\x7F]/u).map((E,R)=>{if(R%2===0)return new Zi(E);if(isNaN(E.slice(-1)))return f(this,i)[Number(E.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${E}`)});return _===0?T.map(String).join(""):_===1?tt(T):T}build(){L(this,t,pe);const{length:b,firstChild:_}=this,T=_==null?void 0:_.toString();if(b===1&&_.type==="text"&&T.includes("\0")&&(Er(this,0,1,this.buildFromStr(T)),this.normalize(),this.type==="root"))for(const E of f(this,i))E==null||E.build()}afterBuild(){if(this.type==="root")for(const b of f(this,i))b==null||b.afterBuild();L(this,r,!0)}parse(b=pe,_,T){for(b=Math.min(b,pe);f(this,t)<b;)this.parseOnce(f(this,t),_,T);return b&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===A}getAttribute(b){var _;switch(b){case"config":return f(this,s);case"include":return(_=f(this,n))!=null?_:!!f(this.getRootNode(),n);case"accum":return f(this,i);case"built":return f(this,r);case"stage":return f(this,t);case"invalid":return this.type==="table-inter"&&Ht(this)===2;default:return super.getAttribute(b)}}setAttribute(b,_){switch(b){case"stage":f(this,t)===0&&this.type==="root"&&f(this,i).shift(),L(this,t,_);break;default:super.setAttribute(b,_)}}insertAt(b,_=this.length){const T=typeof b=="string"?new Zi(b):b;super.insertAt(T,_);const{type:E}=T;return E==="root"&&(T.type="plain"),T}normalizeTitle(b,_=0,T){return I.normalizeTitle(b,_,this.getAttribute("include"),f(this,s),ge({page:this.pageName},T))}inTableAttrs(){var b,_;return((b=this.closest("table-attrs,ext"))==null?void 0:b.type)==="table-attrs"&&((_=this.closest("table-attrs,arg,magic-word,template"))!=null&&_.is("table-attrs")?2:1)}inHtmlAttrs(){var b;return(b=this.closest("html-attrs,ext"))!=null&&b.is("html-attrs")?2:this.inTableAttrs()}lint(b=this.getAbsoluteIndex(),_){var T;{const{lintConfig:E}=I,{computeEditInfo:R,fix:z,ignoreDisables:j,configurationComment:X}=E;let ae=super.lint(b,_);if(this.type==="root"){const Q=new Map,U="no-duplicate",D=["category","id"].map(V=>E.getSeverity(U,V)),Se=this.toString(),Fe=El.filter((V,Y)=>D[Y]).join();if(Fe){for(const V of this.querySelectorAll(Fe)){let Y;if(V.is("category"))Y=V.name;else{const J=V.getValue();J&&J!==!0&&(Y=`#${J}`)}if(Y){const J=Q.get(Y);J?J.add(V):Q.set(Y,new Set([V]))}}for(const[V,Y]of Q)if(Y.size>1&&!V.startsWith("#mw-customcollapsible-")){const J=!V.startsWith("#"),te=`duplicate-${J?"category":"id"}`,ue=D[J?0:1];ae.push(...[...Y].map(le=>{const H=M(le,{start:le.getAbsoluteIndex()},U,te,ue);return R&&J&&(H.suggestions=[G(H)]),H}))}}if(!j){const V=new RegExp(String.raw`<!--\s*${X}-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->`,"gu"),Y=[];let J=V.exec(Se);for(;J;){const{1:te,index:ue}=J,le=(T=J[2])==null?void 0:T.trim();Y.push({line:this.posFromIndex(ue).top+(te==="disable-line"?0:1),from:te==="disable"?V.lastIndex:void 0,to:te==="enable"?V.lastIndex:void 0,rules:le?new Set(le.split(",").map(H=>H.trim())):void 0}),J=V.exec(Se)}ae=ae.filter(({rule:te,startLine:ue,startIndex:le})=>{const H={pos:0};for(const{line:me,from:Re,to:Pe,rules:Ne}of Y){if(me>ue+1)break;if(Ne&&!Ne.has(te))continue;if(me===ue&&Re===void 0&&Pe===void 0)return!1;Re<=le&&Re>H.pos?(H.pos=Re,H.type="from"):Pe<=le&&Pe>H.pos&&(H.pos=Pe,H.type="to")}return H.type!=="from"})}if(z&&ae.some(({fix:V})=>V)){const V=ae.map(({fix:te})=>te).filter(Boolean).sort(({range:[te,ue]},{range:[le,H]})=>ue===H?le-te:H-ue);let Y=1/0,J=Se;for(const{range:[te,ue],text:le}of V)ue<=Y&&(J=J.slice(0,te)+le+J.slice(ue),Y=te);Object.assign(ae,{output:J})}if(!R)for(const V of ae)delete V.fix,delete V.suggestions}return ae}}toString(b,_){return b?super.toString(!0,_):Ze(f(this,l),()=>super.toString(!1,_),T=>{const E=this.getRootNode();E.type==="root"&&f(E,r)&&L(this,l,T)})}},e=new WeakMap,t=new WeakMap,s=new WeakMap,i=new WeakMap,n=new WeakMap,r=new WeakMap,l=new WeakMap,o=new WeakMap,a=new WeakSet,Sa=function(){const{parseRedirect:b}=(nu(),K(io)),_=this.firstChild.toString(),T=b(_,f(this,s),f(this,i));return T&&this.setText(T),!!T},Aa=function(b){const{parseCommentAndExt:_}=(Fs(),K(Vo));this.setText(_(this.firstChild.toString(),f(this,s),f(this,i),b))},ka=function(){const{parseBraces:b}=(Ar(),K(Ao)),_=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,T=b(_,f(this,s),f(this,i));this.setText(this.type==="root"?T:T.slice(1))},_a=function(){if(f(this,s).excludes.includes("html"))return;const{parseHtml:b}=(Cu(),K(Qo));this.setText(b(this.firstChild.toString(),f(this,s),f(this,i)))},$a=function(){if(f(this,s).excludes.includes("table"))return;const{parseTable:b}=(Lu(),K(sa));this.setText(b(this,f(this,s),f(this,i)))},Ta=function(){if(f(this,s).excludes.includes("hr"))return;const{parseHrAndDoubleUnderscore:b}=(Pu(),K(na));this.setText(b(this,f(this,s),f(this,i)))},Ca=function(b){const{parseLinks:_}=(Bu(),K(ga));this.setText(_(this.firstChild.toString(),f(this,s),f(this,i),this.pageName,b))},Ia=function(b){if(f(this,s).excludes.includes("quote"))return;const{parseQuotes:_}=(ua(),K(aa)),T=this.firstChild.toString().split(`
29
+ `);for(let E=0;E<T.length;E++)T[E]=_(T[E],f(this,s),f(this,i),b);this.setText(T.join(`
30
+ `))},Na=function(){if(f(this,s).excludes.includes("extLink"))return;const{parseExternalLinks:b}=(da(),K(ha));this.setText(b(this.firstChild.toString(),f(this,s),f(this,i)))},La=function(){if(f(this,s).excludes.includes("magicLink"))return;const{parseMagicLinks:b}=(qu(),K(pa));this.setText(b(this.firstChild.toString(),f(this,s),f(this,i)))},Ea=function(){if(f(this,s).excludes.includes("list"))return;const{parseList:b}=(Mu(),K(va)),{firstChild:_,type:T,name:E}=this,R=_.toString().split(`
31
+ `),z={lastPrefix:""};let j=T==="root"||T==="ext-inner"&&E==="poem"?0:1;for(;j<R.length;j++)R[j]=b(R[j],z,f(this,s),f(this,i));this.setText(R.join(`
32
+ `))},Fa=function(){if(f(this,s).variants.length>0){const{parseConverter:b}=(Gu(),K(ya));this.setText(b(this.firstChild.toString(),f(this,s),f(this,i)))}},A)}}),xe,Rs,Er,Ie=C({"util/debug.ts"(){"use strict";xe={running:!1,run(e){const{running:t}=this;this.running=!0;try{const{Token:s}=(q(),K(ks)),i=e();return i instanceof s&&!i.getAttribute("built")&&i.afterBuild(),this.running=t,i}catch(s){throw this.running=t,s}},rev:0},Rs=e=>t=>t.type===e,Er=(e,t,s,i=[])=>{var l,o;let n=e.getChildNodes(),r;n.length===s?(r=n,n=i):r=Array.prototype.splice.apply(n,[t,s,...i]);for(let a=0;a<i.length;a++){const u=i[a];u.setAttribute("parentNode",e),u.setAttribute("nextSibling",n[t+a+1]),u.setAttribute("previousSibling",n[t+a-1])}return(l=n[t-1])==null||l.setAttribute("nextSibling",n[t]),(o=n[t+i.length])==null||o.setAttribute("previousSibling",n[t+i.length-1]),n===i&&e.setAttribute("childNodes",n),r}}}),at,Mi,hs,Ui,Fl,Di,Rl,lr,Vu=C({"lib/lintConfig.ts"(){"use strict";var e,t;Hl(),at=new Map([[0,!1],[1,"warning"],[2,"error"],[!1,!1],["off",!1],["warning","warning"],["error","error"]]),Mi={"bold-header":[1,{}],"format-leakage":[1,{}],"fostered-content":[1,{}],h1:[1,{}],"illegal-attr":[2,{}],"insecure-style":2,"invalid-gallery":[2,{parameter:1}],"invalid-imagemap":[2,{}],"invalid-invoke":[2,{}],"invalid-isbn":2,"invalid-url":1,"lonely-apos":[1,{}],"lonely-bracket":[1,{extLink:2}],"lonely-http":[1,{}],"nested-link":[2,{}],"no-arg":1,"no-duplicate":[2,{category:1,id:1,unknownImageParameter:1}],"no-ignored":[2,{fragment:1,galleryComment:1,galleryNoImage:1,include:1,nonWordAttributes:1,redirect:1}],"obsolete-attr":1,"obsolete-tag":1,"parsing-order":[2,{templateInTable:1}],"pipe-like":[1,{double:2}],"syntax-like":[2,{}],"table-layout":1,"tag-like":[2,{disallowed:1,invalid:1}],"unbalanced-header":2,"unclosed-comment":[1,{}],"unclosed-quote":1,"unclosed-table":2,unescaped:2,"unknown-page":1,"unmatched-tag":[1,{both:2,selfClosing:2}],"unterminated-url":[1,{}],"url-encoding":[1,{}],"var-anchor":[1,{}],"void-ext":[2,{}]},Object.freeze(Mi),hs={configurationComment:"lint",ignoreDisables:!1,fix:!0,computeEditInfo:!0},Object.freeze(hs),Ui=s=>at.has(s),Fl=s=>Ui(s)||Array.isArray(s)&&Ui(s[0])&&(s.length===1||typeof s[1]=="object"),Di=(s,i,n)=>{if(bs.includes(i)){if(n===void 0)return!1;if(Fl(n))return s[i]=n,!0}else throw new RangeError(`Unknown lint rule: ${i}`);throw new RangeError(`Invalid lint config for ${i}: ${JSON.stringify(n)}`)},Rl=class{constructor(s){if(Object.assign(this,JSON.parse(JSON.stringify(Mi))),!!s)for(const[i,n]of Object.entries(s))Di(this,i,n)}getSeverity(s,i){var r,l;const n=this[s];return typeof n!="object"?at.get(n):i&&(l=at.get((r=n[1])==null?void 0:r[i]))!=null?l:at.get(n[0])}},lr=(t=class{constructor(s){N(this,e);if(Object.assign(this,hs),s&&!("rules"in s)&&Object.keys(s).some(n=>bs.includes(n)))this.rules=s;else{const i=s!=null?s:{},{rules:n}=i,r=Wr(i,["rules"]);this.rules=n;for(const[l,o]of Object.entries(r))o!==void 0&&Object.prototype.hasOwnProperty.call(hs,l)&&(this[l]=o)}}get rules(){return f(this,e)}set rules(s){L(this,e,new Proxy(new Rl(s),{set:Di,deleteProperty(){return!1}}))}getSeverity(s,i){return f(this,e).getSeverity(s,i)}},e=new WeakMap,t)}}),Ra={};ie(Ra,{Title:()=>Pa});var Hi,Pa,Qu=C({"lib/title.ts"(){"use strict";var e,t,s,i,n,r,Oa,o;st(),ce(),Hi=a=>{const[,{length:u},h]=/^((?:\.\.\/)*)([\s\S]*)/u.exec(a);return[u/3,h]},Pa=(o=class{constructor(a,u,h,{temporary:d,decode:g,selfLink:c,page:p}={}){N(this,r);N(this,e);N(this,t);N(this,s);N(this,i);N(this,n);Le(this,"page");Le(this,"valid");Le(this,"encoded",!1);this.page=p;const x=a.trim(),m=x.startsWith("../");if(g&&a.includes("%"))try{const y=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(a);a=Vt(a),this.encoded=y}catch(y){}if(a=ys(a).replace(/[_ ]+/gu," ").trim(),m||p&&x.startsWith("/"))L(this,i,0);else{let y=u;a.startsWith(":")&&(y=0,a=a.slice(1).trim());const A=a.split(":");if(A.length>1){const k=bt(A[0]),$=Object.prototype.hasOwnProperty.call(h.nsid,k)&&h.nsid[k];$&&(y=$,a=A.slice(1).join(":").trim())}L(this,i,y)}const v=a.indexOf("#");if(v!==-1){let y=a.slice(v).trim().slice(1);if(y.includes("%"))try{y=Vt(y)}catch(A){}L(this,n,y.replace(/ /gu,"_")),a=a.slice(0,v).trim()}const[w,S]=m?Hi(a):[0,a];this.valid=!!(a||c&&this.ns===0&&f(this,n)!==void 0)&&ys(a)===a&&(w===0||p===void 0||p.split("/",w+1).length>w)&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(S),this.main=a,L(this,t,h.namespaces),L(this,s,h.articlePath||"/wiki/$1"),f(this,s).includes("$1")||L(this,s,f(this,s)+`${f(this,s).endsWith("/")?"":"/"}$1`),d||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return f(this,i)}get fragment(){return f(this,n)}get main(){return f(this,e)}set main(a){a=a.replace(/_/gu," ").trim(),L(this,e,a&&a[0].toUpperCase()+a.slice(1))}get prefix(){const a=f(this,t)[this.ns];return a+(a&&":")}get title(){return this.getRedirection()[1]}get extension(){const{main:a}=this,u=a.lastIndexOf(".");return u===-1?void 0:a.slice(u+1).toLowerCase()}getRedirection(){const{prefix:a}=this,u=a;return P(this,r,Oa).call(this,u)}setFragment(a){L(this,n,a)}getUrl(a){throw new Error("Title.getUrl method is only available in the LSP version!")}},e=new WeakMap,t=new WeakMap,s=new WeakMap,i=new WeakMap,n=new WeakMap,r=new WeakSet,Oa=function(a){var h,d;let u=(a+this.main).replace(/ /gu,"_");if(u.startsWith("/"))u=((h=this.page)!=null?h:"")+u.replace(/(.)\/$/u,"$1");else if(u.startsWith("../")&&((d=this.page)!=null&&d.includes("/"))){const[g,c]=Hi(u),p=this.page.split("/");p.length>g&&(u=p.slice(0,-g).join("/")+(c&&"/")+c)}return[!1,u]},o)}}),ja={};ie(ja,{default:()=>I});Ba.exports=K(ja);var ds,Gi,Pl,Xe,Vi,Ol,I,O=C({"index.ts"(){Hl(),Ie(),Be(),ce(),Vu(),ds=!0,Gi=new lr,Xe={config:Ji,get rules(){return bs},get i18n(){return ge(ge({},Ql),Pl)},set i18n(e){Pl=e},get lintConfig(){return Gi},set lintConfig(e){Gi=new lr(e)},get viewOnly(){return ds},set viewOnly(e){ds&&!e&&xe.rev++,ds=e},getConfig(e){const t=e!=null?e:this.config,{doubleUnderscore:s,ext:i,parserFunction:n,variable:r}=t;for(let l=0;l<2;l++)s.length>l+2&&s[l].length===0&&(s[l]=Object.keys(s[l+2]));return i.includes("translate")&&!r.includes("translationlanguage")&&(r.push("translationlanguage"),Array.isArray(n[1])?n[1].push("TRANSLATIONLANGUAGE"):n[1].TRANSLATIONLANGUAGE="translationlanguage"),je(ge(ge({},Ji),t),{excludes:[]})},msg(e,t=""){var s;return e&&((s=this.i18n[e])!=null?s:e).replace("$1",this.msg(t))},normalizeTitle(e,t=0,s,i=Xe.getConfig(),n){const{Title:r}=(Qu(),K(Ra));let l;if(n!=null&&n.halfParsed)l=new r(e,t,i,n);else{const{Token:o}=(q(),K(ks));l=xe.run(()=>{const a=new o(e,i);a.type="root",a.pageName=n==null?void 0:n.page,a.parseOnce(0,s).parseOnce();const u=new r(a.toString(),t,i,n);a.build();for(const h of["main","fragment"]){const d=u[h];if(d!=null&&d.includes("\0")){const g=a.buildFromStr(d,1);h==="main"?u.main=g:u.setFragment(g)}}return u})}return l},parse(e,t,s,i,n){e=Gl(e);let r,l,o,a;typeof t=="string"?(r=!!s,l=i,o=n,a=t):(r=!!t,l=s,o=i,a=n),l!=null||(l=pe),o!=null||(o=this.getConfig());let u;typeof l!="number"&&(u=Array.isArray(l)?l:[l],l=Math.max(...u.map(g=>Dl[g]||pe)));const{Token:h}=(q(),K(ks));return xe.run(()=>{const g=new h(e,o);return g.type="root",g.pageName=a,g.parse(l,r)})},parseWithRef(e,t,s,i=t.getAttribute("include")){return this.parse(e,i,s,t.getAttribute("config"),t.pageName)},async partialParse(e,t,s,i=Xe.getConfig()){},createLanguageService(e={}){throw new Error("Parser.createLanguageService method is only available in the LSP version!")}},Vi={},Ol=new Set(["lintConfig","normalizeTitle","parse","createLanguageService"]);for(const e of Object.keys(Xe))Ol.has(e)||(Vi[e]={enumerable:!1});Object.defineProperties(Xe,Vi),Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:Xe}),I=Xe}});O()});Ju();})();