wikiparser-node 1.16.4 → 1.16.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bundle/bundle.es7.js +27 -27
- package/bundle/bundle.lsp.js +30 -30
- package/bundle/bundle.min.js +29 -29
- package/dist/addon/table.js +7 -4
- package/dist/addon/token.js +13 -7
- package/dist/addon/transclude.js +7 -5
- package/dist/base.d.mts +99 -30
- package/dist/base.d.ts +99 -30
- package/dist/index.d.ts +10 -4
- package/dist/index.js +59 -14
- package/dist/lib/attributes.js +2 -2
- package/dist/lib/element.d.ts +96 -42
- package/dist/lib/element.js +98 -45
- package/dist/lib/lsp.d.ts +64 -35
- package/dist/lib/lsp.js +208 -159
- package/dist/lib/node.d.ts +122 -53
- package/dist/lib/node.js +172 -75
- package/dist/lib/range.d.ts +83 -31
- package/dist/lib/range.js +83 -31
- package/dist/lib/ranges.d.ts +1 -1
- package/dist/lib/ranges.js +3 -2
- package/dist/lib/text.d.ts +40 -14
- package/dist/lib/text.js +47 -19
- package/dist/lib/title.d.ts +50 -16
- package/dist/lib/title.js +77 -36
- package/dist/mixin/attributesParent.d.ts +37 -21
- package/dist/mixin/attributesParent.js +0 -2
- package/dist/mixin/flagsParent.d.ts +38 -12
- package/dist/mixin/hidden.d.ts +0 -2
- package/dist/mixin/hidden.js +0 -2
- package/dist/mixin/magicLinkParent.d.ts +11 -5
- package/dist/mixin/singleLine.d.ts +0 -2
- package/dist/mixin/singleLine.js +3 -3
- package/dist/mixin/sol.d.ts +0 -2
- package/dist/mixin/sol.js +2 -3
- package/dist/mixin/syntax.d.ts +0 -2
- package/dist/mixin/syntax.js +0 -2
- package/dist/parser/braces.js +52 -20
- package/dist/parser/commentAndExt.js +19 -6
- package/dist/parser/links.js +13 -7
- package/dist/parser/list.js +3 -1
- package/dist/parser/quotes.js +22 -2
- package/dist/parser/redirect.js +4 -1
- package/dist/src/arg.d.ts +19 -9
- package/dist/src/arg.js +34 -15
- package/dist/src/atom.d.ts +5 -1
- package/dist/src/atom.js +5 -1
- package/dist/src/attribute.d.ts +26 -8
- package/dist/src/attribute.js +30 -11
- package/dist/src/attributes.d.ts +50 -22
- package/dist/src/attributes.js +54 -26
- package/dist/src/converter.d.ts +4 -2
- package/dist/src/converter.js +12 -9
- package/dist/src/converterFlags.d.ts +45 -15
- package/dist/src/converterFlags.js +45 -15
- package/dist/src/converterRule.d.ts +30 -11
- package/dist/src/converterRule.js +46 -16
- package/dist/src/extLink.d.ts +6 -2
- package/dist/src/extLink.js +14 -11
- package/dist/src/gallery.d.ts +13 -9
- package/dist/src/gallery.js +35 -21
- package/dist/src/heading.d.ts +13 -7
- package/dist/src/heading.js +21 -11
- package/dist/src/hidden.d.ts +5 -1
- package/dist/src/hidden.js +7 -3
- package/dist/src/html.d.ts +11 -5
- package/dist/src/html.js +16 -7
- package/dist/src/imageParameter.d.ts +23 -11
- package/dist/src/imageParameter.js +22 -10
- package/dist/src/imagemap.d.ts +4 -4
- package/dist/src/imagemap.js +9 -5
- package/dist/src/imagemapLink.d.ts +3 -1
- package/dist/src/imagemapLink.js +3 -1
- package/dist/src/index.d.ts +65 -20
- package/dist/src/index.js +111 -39
- package/dist/src/link/base.d.ts +14 -6
- package/dist/src/link/base.js +40 -17
- package/dist/src/link/category.d.ts +7 -2
- package/dist/src/link/category.js +20 -4
- package/dist/src/link/file.d.ts +71 -23
- package/dist/src/link/file.js +100 -36
- package/dist/src/link/galleryImage.d.ts +8 -4
- package/dist/src/link/galleryImage.js +15 -8
- package/dist/src/link/index.d.ts +12 -4
- package/dist/src/link/index.js +15 -5
- package/dist/src/link/redirectTarget.d.ts +3 -2
- package/dist/src/link/redirectTarget.js +5 -3
- package/dist/src/magicLink.d.ts +24 -11
- package/dist/src/magicLink.js +36 -19
- package/dist/src/nested.d.ts +5 -3
- package/dist/src/nested.js +9 -6
- package/dist/src/nowiki/base.d.ts +4 -2
- package/dist/src/nowiki/base.js +6 -5
- package/dist/src/nowiki/comment.d.ts +6 -2
- package/dist/src/nowiki/comment.js +8 -3
- package/dist/src/nowiki/dd.d.ts +0 -3
- package/dist/src/nowiki/dd.js +0 -8
- package/dist/src/nowiki/doubleUnderscore.d.ts +5 -1
- package/dist/src/nowiki/doubleUnderscore.js +5 -1
- package/dist/src/nowiki/index.d.ts +5 -1
- package/dist/src/nowiki/index.js +5 -1
- package/dist/src/nowiki/list.d.ts +5 -1
- package/dist/src/nowiki/list.js +5 -1
- package/dist/src/nowiki/listBase.d.ts +15 -5
- package/dist/src/nowiki/listBase.js +40 -9
- package/dist/src/nowiki/noinclude.d.ts +5 -1
- package/dist/src/nowiki/noinclude.js +5 -1
- package/dist/src/nowiki/quote.d.ts +15 -8
- package/dist/src/nowiki/quote.js +32 -12
- package/dist/src/onlyinclude.d.ts +4 -2
- package/dist/src/onlyinclude.js +4 -2
- package/dist/src/paramTag/index.d.ts +1 -1
- package/dist/src/paramTag/index.js +1 -1
- package/dist/src/parameter.d.ts +24 -12
- package/dist/src/parameter.js +45 -27
- package/dist/src/pre.d.ts +1 -1
- package/dist/src/pre.js +1 -1
- package/dist/src/redirect.d.ts +2 -0
- package/dist/src/redirect.js +2 -0
- package/dist/src/syntax.d.ts +5 -1
- package/dist/src/syntax.js +5 -1
- package/dist/src/table/base.d.ts +5 -1
- package/dist/src/table/base.js +10 -3
- package/dist/src/table/index.d.ts +134 -66
- package/dist/src/table/index.js +150 -81
- package/dist/src/table/td.d.ts +18 -10
- package/dist/src/table/td.js +25 -15
- package/dist/src/table/tr.d.ts +13 -3
- package/dist/src/table/tr.js +14 -6
- package/dist/src/table/trBase.d.ts +28 -12
- package/dist/src/table/trBase.js +28 -18
- package/dist/src/tagPair/ext.d.ts +3 -1
- package/dist/src/tagPair/ext.js +10 -8
- package/dist/src/tagPair/include.d.ts +8 -2
- package/dist/src/tagPair/include.js +8 -2
- package/dist/src/tagPair/index.d.ts +6 -2
- package/dist/src/tagPair/index.js +6 -2
- package/dist/src/transclude.d.ts +102 -33
- package/dist/src/transclude.js +114 -42
- package/dist/util/debug.js +2 -7
- package/dist/util/html.js +1 -18
- package/dist/util/string.js +7 -1
- package/extensions/dist/base.js +27 -16
- package/extensions/dist/codejar.js +2 -1
- package/extensions/dist/lsp.js +5 -10
- package/extensions/es7/base.js +27 -16
- package/extensions/ui.css +1 -162
- package/i18n/zh-hans.json +1 -1
- package/i18n/zh-hant.json +1 -1
- package/package.json +3 -3
package/bundle/bundle.min.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
"use strict";(()=>{var So=Object.create;var pt=Object.defineProperty;var si=Object.getOwnPropertyDescriptor;var wo=Object.getOwnPropertyNames;var Co=Object.prototype.hasOwnProperty;var oi=(a,r)=>(r=Symbol[a])?r:Symbol.for("Symbol."+a),ut=a=>{throw TypeError(a)};var ai=(a,r,e)=>r in a?pt(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e;var ii=(a,r)=>pt(a,"name",{value:r,configurable:!0});var k=(a,r)=>()=>(a&&(r=a(a=0)),r);var $o=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),le=(a,r)=>{for(var e in r)pt(a,e,{get:r[e],enumerable:!0})},No=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of wo(r))!Co.call(a,n)&&n!==e&&pt(a,n,{get:()=>r[n],enumerable:!(t=si(r,n))||t.enumerable});return a};var J=a=>No(pt({},"__esModule",{value:!0}),a);var ne=a=>{var r;return[,,,So((r=a==null?void 0:a[oi("metadata")])!=null?r:null)]},li=["class","method","getter","setter","accessor","field","value","get","set"],Vt=a=>a!==void 0&&typeof a!="function"?ut("Function expected"):a,Io=(a,r,e,t,n)=>({kind:li[a],name:r,metadata:t,addInitializer:i=>e._?ut("Already initialized"):n.push(Vt(i||null))}),Eo=(a,r)=>ai(r,oi("metadata"),a[3]),ie=(a,r,e,t)=>{for(var n=0,i=a[r>>1],s=i&&i.length;n<s;n++)r&1?i[n].call(e):t=i[n].call(e,t);return t},se=(a,r,e,t,n,i)=>{var s,o,l,p,g,d=r&7,c=!!(r&8),m=!!(r&16),h=d>3?a.length+1:d?c?1:2:0,f=li[d+5],v=d>3&&(a[h-1]=[]),y=a[h]||(a[h]=[]),S=d&&(!m&&!c&&(n=n.prototype),d<5&&(d>3||!m)&&si(d<4?n:{get[e](){return u(this,i)},set[e](L){return T(this,i,L)}},e));d?m&&d<4&&ii(i,(d>2?"set ":d>1?"get ":"")+e):ii(n,e);for(var w=t.length-1;w>=0;w--)p=Io(d,e,l={},a[3],y),d&&(p.static=c,p.private=m,g=p.access={has:m?L=>Lo(n,L):L=>e in L},d^3&&(g.get=m?L=>(d^1?u:I)(L,n,d^4?i:S.get):L=>L[e]),d>2&&(g.set=m?(L,N)=>T(L,n,N,d^4?i:S.set):(L,N)=>L[e]=N)),o=(0,t[w])(d?d<4?m?i:S[f]:d>4?void 0:{get:S.get,set:S.set}:n,p),l._=1,d^4||o===void 0?Vt(o)&&(d>4?v.unshift(o):d?m?i=o:S[f]=o:n=o):typeof o!="object"||o===null?ut("Object expected"):(Vt(s=o.get)&&(S.get=s),Vt(s=o.set)&&(S.set=s),Vt(s=o.init)&&v.unshift(s));return d||Eo(a,n),S&&pt(n,e,S),m?d^4?i:S:n},te=(a,r,e)=>ai(a,typeof r!="symbol"?r+"":r,e),dn=(a,r,e)=>r.has(a)||ut("Cannot "+e),Lo=(a,r)=>Object(r)!==r?ut('Cannot use the "in" operator on this value'):a.has(r),u=(a,r,e)=>(dn(a,r,"read from private field"),e?e.call(a):r.get(a)),x=(a,r,e)=>r.has(a)?ut("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),T=(a,r,e,t)=>(dn(a,r,"write to private field"),t?t.call(a,e):r.set(a,e),e),I=(a,r,e)=>(dn(a,r,"access private method"),e);var vr=(a,r,e,t)=>({set _(n){T(a,r,n,e)},get _(){return u(a,r,t)}});var di,gi,pi=k(()=>{"use strict";di=(()=>{let a={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};return Object.setPrototypeOf(a,null),a})(),gi=(()=>{let a=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","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(a),a})()});var Oe,ui=k(()=>{"use strict";Oe=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var be,ci,Ce,$e,Xe,mi,oe,hi,ue,Fo,Ro,Xt,fi,xi,Po,Bo,ct,Ne,Q=k(()=>{"use strict";ui();be=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,ci=String.raw`[^[\]<>"\0-\x1F\x7F${be}\uFFFD]`,Ce=String.raw`(?:\[[\da-f:.]+\]|${ci})`,$e=String.raw`(?:${ci}|\0\d+[cn!~]\x7F)*`,Xe=(a,r)=>e=>e.replace(a,r),mi=Xe(/[\0\x7F]|\r$/gmu,""),oe=Xe(/\0\d+[cn]\x7F/gu,""),hi=Xe(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),ue=(a,r="")=>a.map(e=>typeof e=="string"?e:e.text()).join(r),Fo={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Ro=Xe(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,r,e)=>r?String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r)):Fo[e.toLowerCase()]),Xt=a=>Ro(a),fi=Xe(/&#(\d+|x[\da-f]+);/giu,(a,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),xi=Xe(/\n/gu,String.raw`\n`),Po={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Bo=a=>Xe(a,r=>`&${Po[r]};`),ct=Bo(/[&<>]/gu),Ne=(a,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+a.map(i=>i.print()).join(n)+t}});var bi=$o((Ra,jo)=>{jo.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},variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{"#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","#cscore":"cscore","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#replace":"replace","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"section","#section-x":"section-x","#section-h":"section-h","#statements":"statements"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#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:|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var gn,Ti=k(()=>{"use strict";gn=bi()});var Qt,mt,Kt,Jt,pn,E,K=k(()=>{"use strict";E=class{constructor(r,e){x(this,Jt);x(this,Qt);x(this,mt);x(this,Kt);T(this,Qt,r),T(this,mt,e)}get start(){return u(this,mt)}get top(){return I(this,Jt,pn).call(this).top}get left(){return I(this,Jt,pn).call(this).left}};Qt=new WeakMap,mt=new WeakMap,Kt=new WeakMap,Jt=new WeakSet,pn=function(){var r;return(r=u(this,Kt))!=null||T(this,Kt,u(this,Qt).getRootNode().posFromIndex(u(this,mt))),u(this,Kt)}});var un,yi,C,$,Ie,j=k(()=>{"use strict";ye();K();R();un=(a,r,e,t)=>({line:a+e-1,character:(e===1?r:0)+t}),yi=a=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof E?e:new E(r,s),{offsetHeight:p,offsetWidth:g}=r,{startIndex:d,startLine:c,startCol:m}=a(r,s,o,l),{line:h,character:f}=un(c,m,p,g);return{rule:t,message:b.msg(n),severity:i,startIndex:d,endIndex:d+r.toString().length,startLine:c,endLine:h,startCol:m,endCol:f}},C=yi((a,r,e,t)=>{let n=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(n);return{startIndex:r+n,startLine:e+i,startCol:i?s:t+s}}),$=yi((a,r,e,t)=>({startIndex:r,startLine:e,startCol:t})),Ie=(a,r,e)=>{if(a)return a[1];let t=r();return e([Te.rev,t]),t}});var qo,Ar,ki=k(()=>{"use strict";qo=(a,r,e)=>{let[t,...n]=a.split("#");return(!t||t===r)&&n.every(i=>i===e)},Ar=(a,r,e)=>({type:t,name:n})=>a.split(",").some(i=>qo(i.trim(),t,n))});var Yt,ht,ft,Zt,er,tr,xt,bt,Sr,Tt,cn=k(()=>{"use strict";j();ye();Tt=class{constructor(){x(this,bt);te(this,"childNodes",[]);x(this,Yt);x(this,ht);x(this,ft);x(this,Zt);x(this,er);x(this,tr);x(this,xt,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return u(this,Yt)}get nextSibling(){return u(this,ht)}get previousSibling(){return u(this,ft)}get offsetHeight(){return I(this,bt,Sr).call(this).height}get offsetWidth(){return I(this,bt,Sr).call(this).width}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){switch(r){case"parentNode":T(this,Yt,e),e||(T(this,ht,void 0),T(this,ft,void 0));break;case"nextSibling":T(this,ht,e);break;case"previousSibling":T(this,ft,e);break;default:this[r]=e}}getRootNode(){return Ie(u(this,er),()=>{var r,e;return(e=(r=this.parentNode)==null?void 0:r.getRootNode())!=null?e:this},r=>{let[,e]=r;e.type==="root"&&e.getAttribute("built")&&T(this,er,r)})}indexFromPos(r,e){if(r<0||e<0)return;let t=this.getLines();if(r>=t.length)return;let[,n,i]=t[r],s=n+e;return s>i?void 0:s}posFromIndex(r){let{length:e}=String(this);if(r+=r<0?e:0,r>=0&&r<=e){let t=this.getLines(),n=t.findIndex(([,,i])=>r<=i);return{top:n,left:r-t[n][1]}}}getGaps(r){return 0}getRelativeIndex(r){if(r===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return Ie(u(this,xt)[r],()=>{let{childNodes:e}=this,t=r+(r<0?e.length:0),n=this.getAttribute("padding");for(let i=0;i<t;i++)u(this,xt)[i]=[Te.rev,n],n+=e[i].toString().length+this.getGaps(i);return n},e=>{u(this,xt)[r]=e})}getAbsoluteIndex(){return Ie(u(this,tr),()=>{let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0},r=>{T(this,tr,r)})}getBoundingClientRect(){return{...I(this,bt,Sr).call(this),...this.getRootNode().posFromIndex(this.getAbsoluteIndex())}}seal(r,e){Object.defineProperty(this,r,{enumerable:!e&&!!this[r],configurable:!0})}is(r){return this.type===r}getLines(){return Ie(u(this,Zt),()=>{let r=[],e=0;for(let t of String(this).split(`
|
|
2
|
-
`)){let n=e+t.length;r.push([t,e,n]),e=n+1}return r},r=>{T(this,Zt,r)})}};Yt=new WeakMap,ht=new WeakMap,ft=new WeakMap,Zt=new WeakMap,er=new WeakMap,tr=new WeakMap,xt=new WeakMap,bt=new WeakSet,Sr=function(){let r=this.getLines(),e=r[r.length-1];return{height:r.length,width:e[2]-e[1]}}});var _e,mn,hn,wr,vi=k(()=>{"use strict";Q();ye();ki();cn();wr=class extends Tt{constructor(){super(...arguments);x(this,_e)}get length(){return this.childNodes.length}text(e){return ue(this.childNodes,e)}normalize(){let e=[...this.childNodes],t=n=>{var i,s;e.splice(n,1),(i=e[n-1])==null||i.setAttribute("nextSibling",e[n]),(s=e[n])==null||s.setAttribute("previousSibling",e[n-1])};for(let n=e.length-1;n>=0;n--){let{type:i,data:s}=e[n];i!=="text"||e.length===1||this.getGaps(n-(n&&1))||s===""&&t(n)}this.setAttribute("childNodes",e)}removeAt(e){return fn(this,e,1)[0]}insertAt(e,t=this.length){return fn(this,t,0,[e]),e}closest(e){let t=Ar(e,this),{parentNode:n}=this;for(;n;){if(t(n))return n;({parentNode:n}=n)}}querySelector(e){let t=Ar(e,this);return I(this,_e,mn).call(this,t)}querySelectorAll(e){let t=Ar(e,this);return I(this,_e,hn).call(this,t)}append(...e){for(let t of e)this.insertAt(t)}replaceChildren(...e){for(let t=this.length-1;t>=0;t--)this.removeAt(t);this.append(...e)}setText(e,t=0){t+=t<0?this.length:0;let n=this.childNodes[t],{data:i}=n;return n.replaceData(e),i}toString(e,t=""){return this.childNodes.map(n=>n.toString(e)).join(t)}caretPositionFromIndex(e){}elementFromIndex(e){}elementFromPoint(e,t){}lint(e=this.getAbsoluteIndex(),t){let n=[];for(let i=0,s=e+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i];n.push(...o.lint(s,t)),s+=o.toString().length+this.getGaps(i)}return n}print(e={}){let t=e.class;return this.toString()?(t===""?"":`<span class="wpb-${t!=null?t:this.type}">`)+Ne(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let n={...this,type:this.type,range:[t,t+this.toString().length],childNodes:[]};for(let i=0,s=t+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i],{length:l}=o.toString();n.childNodes.push(o.type==="text"?{data:o.data,range:[s,s+l]}:o.json(void 0,s)),s+=l+this.getGaps(i)}return n}};_e=new WeakSet,mn=function(e){var t;for(let n of this.childNodes){if(n.type==="text")continue;if(e(n))return n;let i=I(t=n,_e,mn).call(t,e);if(i)return i}},hn=function(e){var n;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...I(n=i,_e,hn).call(n,e)));return t}});var xn,Ai,Oo,_o,Mo,zo,Uo,Wo,bn,Cr,Si,rr,wi=k(()=>{"use strict";Q();j();R();cn();xn=String.raw`[${be}\t]*`,Ai=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${xn}\d)|isbn(?=[-::]?${xn}(?:\d(?:${xn}|-)){6})`,Oo=new RegExp(String.raw`${Ai}|https?[:/]/+`,"giu"),_o=new RegExp(Ai,"giu"),Mo=new Set(["attr-value","ext-link-text","link-text"]),zo={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Uo={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},Wo=["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"];try{bn=new RegExp(String.raw`[\p{L}\d_]`,"u")}catch(a){bn=/\w/u}rr=class extends Tt{constructor(e){super();x(this,Cr);te(this,"data","");Object.defineProperties(this,{childNodes:{enumerable:!1,configurable:!1},data:{value:e}})}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?oe(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var z,B,V;if(t===!1)return[];let{data:n,parentNode:i,nextSibling:s,previousSibling:o}=this;if(!i)throw new Error("An isolated text node cannot be linted!");let{type:l,name:p,parentNode:g}=i,d=!1;if(l==="attr-value"){let{type:X,name:Y,tag:D}=g;if(X!=="ext-attr")d=!0;else if(D==="choose"&&(Y==="before"||Y==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&p==="link"||d?_o:Oo),n.search(t)===-1)return[];t.lastIndex=0;let c=[],m=s==null?void 0:s.type,h=s==null?void 0:s.name,f=o==null?void 0:o.type,v=this.getRootNode(),y=v.toString(),{ext:S,html:w}=v.getAttribute("config"),{top:L,left:N}=v.posFromIndex(e),q=new Set(["onlyinclude","noinclude","includeonly",...S,...w[0],...w[1],...w[2],...Wo]);for(let X=t.exec(n);X;X=t.exec(n)){let[,Y,D]=X,{index:W}=X,Z=X[0].toLowerCase();if(D&&D!=="]"){let{length:ge}=D;W+=ge,Z=Z.slice(ge)}let{0:F,length:Ae}=Z,ee=F==="r"||F==="p"||F==="i";if(F==="<"&&!q.has(Y.toLowerCase())||F==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(n.slice(W+1))||s!=null&&s.is("ext")&&h==="nowiki"&&((z=s.innerText)!=null&&z.includes("]")))||ee&&(!i.getAttribute("plain")||Mo.has(l)))continue;F==="]"&&(W||Ae>1)&&t.lastIndex--;let pe=e+W,He=pe+Ae,qe=y[He],kr=y[pe-1],on=Ae>1&&!(F==="<"&&!/[\s/>]/u.test(qe!=null?qe:"")||d&&(F==="["||F==="]")||ee&&l==="parameter-value")||F==="{"&&(qe===F||kr==="-")||F==="}"&&(kr===F||qe==="-")||F==="["&&(qe===F||l==="ext-link-text"||m==="free-ext-link"&&!n.slice(W+1).trim())||F==="]"&&(kr===F||f==="free-ext-link"&&!n.slice(0,W).includes("]"))?"error":"warning",an=F==="{"||F==="[";if(on==="warning"&&(an||(F==="]"||F==="}"))){let ge=zo[F],ln=an?n.slice(W+1):n.slice(0,W);if(F==="{"&&((B=ge.exec(ln))==null?void 0:B[0])==="}"||F==="}"&&((V=ge.exec(ln))==null?void 0:V[0])==="{")continue;if(!ln.includes(F)){let ni=an?"nextSibling":"previousSibling",Ve=this[ni];for(;Ve&&(Ve.type!=="text"||!ge.test(Ve.data));)Ve=Ve[ni];if(Ve&&ge.exec(Ve.data)[0]!==F)continue}}ee&&(Z=Z.toUpperCase());let ei=this.posFromIndex(W),{line:ti,character:ri}=un(L,N,ei.top+1,ei.left),gt={rule:Uo[F],message:b.msg('lonely "$1"',ee||F==="h"?Z:F),severity:on,startIndex:pe,endIndex:He,startLine:ti,endLine:ti,startCol:ri,endCol:ri+Ae};if(F==="<")gt.suggestions=[{desc:"escape",range:[pe,pe+1],text:"<"}];else if(F==="h"&&l!=="link-text"&&bn.test(kr||""))gt.suggestions=[{desc:"whitespace",range:[pe,pe],text:" "}];else if(F==="["&&l==="ext-link-text"){let ge=i.getAbsoluteIndex()+i.toString().length;gt.suggestions=[{desc:"escape",range:[ge,ge+1],text:"]"}]}else if(F==="]"&&f==="free-ext-link"&&on==="error"){let ge=e-o.toString().length;gt.fix={range:[ge,ge],text:"[",desc:"left bracket"}}else ee&&(gt.suggestions=[...X[0]===Z?[]:[{desc:"uppercase",range:[pe,He],text:Z}],...qe===":"||qe==="\uFF1A"?[{desc:"whitespace",range:[He,He+1],text:" "}]:[]]);c.push(gt)}return c}replaceData(e){I(this,Cr,Si).call(this,e)}print(){return ct(this.data)}};Cr=new WeakSet,Si=function(e){this.setAttribute("data",e)}});var ce,Qe=k(()=>{"use strict";ye();ce=(a=!0,r=!0)=>(e,t)=>{class n extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return $r(n,e),n}});var nr,me,yt=k(()=>{"use strict";P();me=class extends A{constructor(e,t,n,i,s,o){super(e,i,s,o);x(this,nr);T(this,nr,n)}get type(){return u(this,nr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};nr=new WeakMap});var kt,M,Ee=k(()=>{"use strict";P();M=class extends A{constructor(e,t,n,i,s){super(e,n,i,s);x(this,kt);T(this,kt,t)}get type(){return u(this,kt)}set type(e){T(this,kt,e)}};kt=new WeakMap});var Go,Ke,ke,Le,Se,ir=k(()=>{"use strict";j();Q();K();R();P();Ee();Go=a=>a==="redirect-target"||a==="link",Se=class extends A{constructor(e,t,n=b.getConfig(),i=[],s="|"){super(void 0,n,i,{});x(this,Ke,!0);x(this,ke);x(this,Le);if(this.insertAt(new M(e,"link-target",n,i,{})),t!==void 0){let o=new A(t,n,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}T(this,ke,s)}get link(){return u(this,Le)}afterBuild(){T(this,Le,this.getTitle()),u(this,ke).includes("\0")&&T(this,ke,this.buildFromStr(u(this,ke),0)),this.setAttribute("name",u(this,Le).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?T(this,Ke,t):e==="title"?T(this,Le,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,u(this,ke));return u(this,Ke)?`[[${t}]]`:t}text(){let e=super.text("|");return u(this,Ke)?`[[${e}]]`:e}getAttribute(e){return e==="title"?u(this,Le):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?u(this,ke).length:1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:p}=u(this,Le),g=new E(this,e);if(i.childNodes.some(({type:d})=>d==="template")&&n.push(C(i,g,"unknown-page","template in an internal link target","warning")),l){let d=C(i,g,"url-encoding","unnecessary URL encoding in an internal link");d.suggestions=[{desc:"decode",range:[d.startIndex,d.endIndex],text:Oe(i.text())}],n.push(d)}if(o==="link"||o==="category"){let d=s==null?void 0:s.childNodes.findIndex(m=>m.type==="text"&&m.data.includes("|")),c=s==null?void 0:s.childNodes[d];if(c){let m=C(s,g,"pipe-like",'additional "|" in the link text',"warning"),h=m.startIndex+s.getRelativeIndex(d);m.suggestions=[{desc:"escape",range:[h,h+c.data.length],text:c.data.replace(/\|/gu,"|")}],n.push(m)}}if(p!==void 0&&!Go(o)){let d=C(i,g,"no-ignored","useless fragment"),c=i.childNodes.findIndex(h=>h.type==="text"&&h.data.includes("#")),m=i.childNodes[c];m&&(d.fix={range:[d.startIndex+i.getRelativeIndex(c)+m.data.indexOf("#"),d.endIndex],text:"",desc:"remove"}),n.push(d)}return n}getTitle(e){return this.normalizeTitle(this.firstChild.toString(!0),0,e,!0,!0)}print(){return super.print(u(this,Ke)?{pre:"[[",post:"]]",sep:u(this,ke)}:{sep:u(this,ke)})}};Ke=new WeakMap,ke=new WeakMap,Le=new WeakMap});var ae,Me=k(()=>{"use strict";P();ae=class extends A{get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}}});var Ci,Tn,Do,G,ze=k(()=>{"use strict";Qe();Me();Ci=[ce()];G=class extends(Do=ae){get type(){return"noinclude"}toString(r){return r?"":super.toString()}};Tn=ne(Do),G=se(Tn,0,"NoincludeToken",Ci,G),ie(Tn,1,G)});var Nr,$i=k(()=>{"use strict";j();ir();ze();Nr=class extends Se{get type(){return"redirect-target"}constructor(r,e,t,n){super(r,void 0,t,n),e!==void 0&&this.insertAt(new G(e,t,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,!0,!0)}lint(r=this.getAbsoluteIndex()){let e=super.lint(r,!1);if(this.length===2){let t=C(this.lastChild,{start:r},"no-ignored","useless link text");t.startIndex--,t.startCol--,t.fix={range:[t.startIndex,t.endIndex],text:"",desc:"remove"},e.push(t)}return e}}});var Ni,Ue,vt,yn,Ho,Je,Ii=k(()=>{"use strict";Qe();R();P();yt();$i();Ni=[ce(!1,!1)];Je=class extends(Ho=A){constructor(e,t,n,i,s,o=b.getConfig(),l=[]){super(void 0,o,l);x(this,Ue);x(this,vt);T(this,Ue,e),T(this,vt,s);let p=new RegExp(String.raw`^(?:${o.redirection.join("|")})\s*(?::\s*)?$`,"iu");this.append(new me(t,p,"redirect-syntax",o,l,{}),new Nr(n,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?u(this,Ue).length:super.getAttribute(e)}toString(e){return u(this,Ue)+super.toString(e)+u(this,vt)}lint(e=this.getAbsoluteIndex()){return this.lastChild.lint(e+u(this,Ue).length+this.firstChild.toString().length)}print(){return super.print({pre:u(this,Ue),post:u(this,vt)})}};yn=ne(Ho),Ue=new WeakMap,vt=new WeakMap,Je=se(yn,0,"RedirectToken",Ni,Je),ie(yn,1,Je)});var Ei={};le(Ei,{parseRedirect:()=>Vo});var Vo,Li=k(()=>{"use strict";R();Ii();Vo=(a,r,e)=>{var n;(n=r.regexRedirect)!=null||(r.regexRedirect=new RegExp(String.raw`^(\s*)((?:${r.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let t=r.regexRedirect.exec(a);return t&&b.normalizeTitle(t[3],0,!1,r,!0,!0).valid?(a=`\0${e.length}o\x7F${a.slice(t[0].length)}`,new Je(...t.slice(1),r,e),a):!1}});var Ir,Fi=k(()=>{"use strict";P();Ir=class extends A{get type(){return"onlyinclude"}toString(r){return`<onlyinclude>${super.toString(r)}</onlyinclude>`}getAttribute(r){return r==="padding"?13:r==="plain"||super.getAttribute(r)}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}}});var We,At,kn=k(()=>{"use strict";P();At=class extends A{constructor(e,t,n,i,s,o=[]){super(void 0,s);x(this,We);te(this,"closed");te(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),T(this,We,[e,i||e]),this.closed=i!=="",this.selfClosing=i===void 0,this.append(t,n);let l=typeof t=="string"?-1:o.indexOf(t);o.splice(l===-1?1/0:l,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(e){let{selfClosing:t,firstChild:n,lastChild:i}=this,[s,o]=u(this,We);return t?`<${s}${n.toString(e)}/>`:`<${s}${n.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=u(this,We);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?u(this,We)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=u(this,We);return super.print(this.selfClosing?{pre:`<${e}`,post:"/>"}:{pre:`<${e}`,sep:">",post:this.closed?`</${t}>`:""})}};We=new WeakMap});var Ri,vn,Xo,Ye,Pi=k(()=>{"use strict";j();K();Qe();R();kn();Ri=[ce(!1)];Ye=class extends(Xo=At){get type(){return"include"}constructor(r,e="",t,n,i,s){super(r,e,t!=null?t:"",t===void 0||n!=null?n:"",i,s)}toString(r){return r?"":super.toString()}lint(r=this.getAbsoluteIndex()){let e=[],{firstChild:t,closed:n,name:i}=this,s=new E(this,r);if(t.data.trim()){let o=C(t,s,"no-ignored","useless attribute","warning");o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],e.push(o)}if(!n){let o=$(this,s,"unclosed-comment",b.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};vn=ne(Xo),Ye=se(vn,0,"IncludeToken",Ri,Ye),ie(vn,1,Ye)});var St,Er=k(()=>{"use strict";ye();St=(a=0)=>(r,e)=>{var n,Bi;class t extends r{constructor(){super(...arguments);x(this,n)}getAttr(l){return u(this,n,Bi).getAttr(l)}}return n=new WeakSet,Bi=function(){return this.childNodes[a]},$r(t,r),t}});var H,ji,qi,Fr,An,Oi,wt,_i,Mi,zi,Lr,Ui,Wi,Gi,Di,Hi=k(()=>{"use strict";H=new Set(["align"]),ji=new Set(["cite"]),qi=new Set(["cite","datetime"]),Fr=new Set(["width"]),An=new Set(["axis","align","bgcolor","height","width","valign"]),Oi=new Set([...An,"abbr","headers","scope","rowspan","colspan"]),wt=new Set(["type"]),_i=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Mi=new Set(["clear"]),zi=new Set(["bgcolor","align","valign"]),Lr=new Set,Ui=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"]),Wi={div:H,h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,blockquote:ji,q:ji,p:H,br:Mi,pre:Fr,ins:qi,del:qi,ul:wt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([..._i,"border"]),caption:H,tr:zi,td:Oi,th:Oi,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:Fr,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:wt,poem:H,categorytree:H,combooption:H},Gi={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:Lr,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","extends","follow","dir"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:Lr,inputbox:Lr,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Lr,poll:new Set(["id","show-results-before-voting"]),sm2:wt,flashmp3:wt,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"])},Di={table:_i,td:new Set([...An,"scope"]),th:An,br:Mi,caption:H,div:H,hr:Fr,h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,li:wt,p:H,pre:Fr,tr:zi,ul:wt}});var Qo,sr,Ct,re,we,$t,Vi=k(()=>{"use strict";j();Q();Hi();K();R();P();Ee();Qo=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,$t=class extends A{constructor(e,t,n,i="",s,o=[],l=b.getConfig(),p=[]){let g=new M(n,"attr-key",l,p),d;if(n==="title"||t==="img"&&n==="alt")d=new A(s,l,p,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&n==="caption"||t==="choose"&&(n==="before"||n==="after")){let c={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};d=new A(s,c,p,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new M(s,"attr-value",l,p,{});super(void 0,l,p);x(this,sr);x(this,Ct);x(this,re);x(this,we);T(this,sr,e),this.append(g,d),T(this,re,i),T(this,we,[...o]),T(this,Ct,t),this.setAttribute("name",oe(n).trim().toLowerCase())}get type(){return u(this,sr)}get tag(){return u(this,Ct)}get balanced(){return!u(this,re)||u(this,we)[0]===u(this,we)[1]}afterBuild(){u(this,re).includes("\0")&&T(this,re,this.buildFromStr(u(this,re),0)),this.parentNode&&T(this,Ct,this.parentNode.name),this.setAttribute("name",this.firstChild.toString(!0).trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",n=""]=u(this,we);return u(this,re)?super.toString(e,u(this,re)+t)+n:this.firstChild.toString(e)}text(){return u(this,re)?`${super.text(`${u(this,re).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return u(this,re)?u(this,re).length+((t=(e=u(this,we)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var v;let n=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:p,tag:g}=this,d=this.getValue(),c=new E(this,e);if(!i){let y=C(o,c,"unclosed-quote",b.msg("unclosed $1","quotes"),"warning");y.startIndex--,y.startCol--,y.suggestions=[{range:[y.endIndex,y.endIndex],text:u(this,we)[0],desc:"close"}],n.push(y)}let m=Gi[g],h=Wi[g],{length:f}=this.toString();if(!(m!=null&&m.has(p))&&!(h!=null&&h.has(p))&&(l==="ext-attr"?m||h:!/\{\{[^{]+\}\}/u.test(p))&&(l==="ext-attr"&&!h||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(p)&&(g==="meta"||g==="link"||!Ui.has(p)))){let y=C(s,c,"illegal-attr","illegal attribute name");y.suggestions=[{desc:"remove",range:[e,e+f],text:""}],n.push(y)}else if((v=Di[g])!=null&&v.has(p))n.push(C(s,c,"obsolete-attr","obsolete attribute","warning"));else if(p==="style"&&typeof d=="string"&&Qo.test(d))n.push(C(o,c,"insecure-style","insecure style"));else if(p==="tabindex"&&typeof d=="string"&&d!=="0"){let y=C(o,c,"illegal-attr","nonzero tabindex");y.suggestions=[{desc:"remove",range:[e,e+f],text:""},{desc:"0 tabindex",range:[y.startIndex,y.endIndex],text:"0"}],n.push(y)}return n}getValue(){return u(this,re)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=u(this,we);return u(this,re)?super.print({sep:ct(u(this,re))+e,post:t}):super.print()}};sr=new WeakMap,Ct=new WeakMap,re=new WeakMap,we=new WeakMap});var Xi,Ko,Sn,or,Ge,Rr=k(()=>{"use strict";j();Q();K();R();P();Ee();Vi();Xi=a=>a.slice(0,-1),Ko=a=>`${Xi(a)}-dirty`;try{Sn=new RegExp(String.raw`[\p{L}\d]`,"u")}catch(a){Sn=/[^\W_]/u}Ge=class extends A{constructor(e,t,n,i=b.getConfig(),s=[]){super(void 0,i,s,{});x(this,or);if(T(this,or,t),this.setAttribute("name",n),e){let o=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu,l="",p=o.exec(e),g=0,d=()=>{l&&(super.insertAt(new M(l,Ko(t),i,s,{})),l="")};for(;p;){let{index:c,0:m,1:h,2:f,3:v,4:y,5:S,6:w}=p;if(l+=e.slice(g,c),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(oe(h).trim())){let L=y!=null?y:w,N=[v,S],q=new $t(Xi(t),n,h,f,L,N,i,s);d(),super.insertAt(q)}else l+=m;({lastIndex:g}=o),p=o.exec(e)}l+=e.slice(g),d()}}get type(){return u(this,or)}afterBuild(){let{parentNode:e}=this;(e==null?void 0:e.type)==="td"&&e.subtype==="caption"&&this.setAttribute("name","caption"),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(t=>t instanceof $t&&(!e||t.name===e.toLowerCase().trim()))}getAttrToken(e){let t=this.getAttrTokens(e);return t[t.length-1]}getAttr(e){var t;return(t=this.getAttrToken(e))==null?void 0:t.getValue()}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{parentNode:i,childNodes:s}=this,o=new Map,l=new Set,p=new E(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let g=$(this,p,"no-ignored","attributes of a closing tag"),d=i.getAbsoluteIndex();g.suggestions=[{desc:"remove",range:[e,g.endIndex],text:""},{desc:"open",range:[d+1,d+2],text:""}],n.push(g)}for(let g of s)if(g instanceof $t){let{name:d}=g;o.has(d)?(l.add(d),o.get(d).push(g)):o.set(d,[g])}else{let d=g.text().trim();if(d){let c=C(g,p,"no-ignored","containing invalid attribute",Sn.test(d)?"error":"warning");c.suggestions=[{desc:"remove",range:[c.startIndex,c.endIndex],text:" "}],n.push(c)}}if(l.size>0)for(let g of l){let d=o.get(g).map(c=>{let m=c.getValue();return[c,m===!0?"":m]});n.push(...d.map(([c,m],h)=>{let f=C(c,p,"no-duplicate",b.msg("duplicated $1 attribute",g)),v={desc:"remove",range:[f.startIndex,f.endIndex],text:""};return!m||d.slice(0,h).some(([,y])=>y===m)?f.fix=v:f.suggestions=[v],f}))}return n}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof M?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};or=new WeakMap});var Pr,Qi=k(()=>{"use strict";R();P();ze();Pr=class extends A{get type(){return"ext-inner"}constructor(r,e=b.getConfig(),t=[]){if(r){let n=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=n.source,o=n.exec(r);o&&(i.lastIndex=o.index+s);let l=i.exec(r),p=0,g="";for(;o&&l;)new G(o[0],e,t),new G(l[0],e,t),g+=`${r.slice(p,o.index)}\0${t.length-1}n\x7F${r.slice(o.index+s,l.index)}\0${t.length}n\x7F`,p=l.index+s+1,n.lastIndex=p,o=n.exec(r),o&&(i.lastIndex=o.index+s),l=i.exec(r);r=g+r.slice(p)}super(r,e,t,{}),this.setAttribute("stage",10)}getAttribute(r){return r==="plain"||super.getAttribute(r)}lint(r=this.getAbsoluteIndex()){return super.lint(r,/<\s*\/\s*(pre)\b/giu)}}});var Nt,wn=k(()=>{"use strict";j();K();ar();R();P();Ee();Nt=class extends A{get type(){return"ext-inner"}constructor(r,e,t=b.getConfig(),n=[],i){if(super(void 0,t,n,{}),e){let s=M;this.append(...e.split(`
|
|
3
|
-
`).map(o=>i?o:Ze(o,t,n
|
|
1
|
+
"use strict";(()=>{var wo=Object.create;var ht=Object.defineProperty;var oi=Object.getOwnPropertyDescriptor;var Co=Object.getOwnPropertyNames;var $o=Object.prototype.hasOwnProperty;var ai=(a,n)=>(n=Symbol[a])?n:Symbol.for("Symbol."+a),mt=a=>{throw TypeError(a)};var li=(a,n,e)=>n in a?ht(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e;var si=(a,n)=>ht(a,"name",{value:n,configurable:!0});var y=(a,n)=>()=>(a&&(n=a(a=0)),n);var No=(a,n)=>()=>(n||a((n={exports:{}}).exports,n),n.exports),se=(a,n)=>{for(var e in n)ht(a,e,{get:n[e],enumerable:!0})},Io=(a,n,e,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Co(n))!$o.call(a,r)&&r!==e&&ht(a,r,{get:()=>n[r],enumerable:!(t=oi(n,r))||t.enumerable});return a};var Q=a=>Io(ht({},"__esModule",{value:!0}),a);var Z=a=>{var n;return[,,,wo((n=a==null?void 0:a[ai("metadata")])!=null?n:null)]},di=["class","method","getter","setter","accessor","field","value","get","set"],Kt=a=>a!==void 0&&typeof a!="function"?mt("Function expected"):a,Eo=(a,n,e,t,r)=>({kind:di[a],name:n,metadata:t,addInitializer:i=>e._?mt("Already initialized"):r.push(Kt(i||null))}),Lo=(a,n)=>li(n,ai("metadata"),a[3]),ee=(a,n,e,t)=>{for(var r=0,i=a[n>>1],s=i&&i.length;r<s;r++)n&1?i[r].call(e):t=i[r].call(e,t);return t},te=(a,n,e,t,r,i)=>{var s,o,l,u,g,d=n&7,p=!!(n&8),h=!!(n&16),m=d>3?a.length+1:d?p?1:2:0,f=di[d+5],k=d>3&&(a[m-1]=[]),A=a[m]||(a[m]=[]),S=d&&(!h&&!p&&(r=r.prototype),d<5&&(d>3||!h)&&oi(d<4?r:{get[e](){return c(this,i)},set[e]($){return T(this,i,$)}},e));d?h&&d<4&&si(i,(d>2?"set ":d>1?"get ":"")+e):si(r,e);for(var w=t.length-1;w>=0;w--)u=Eo(d,e,l={},a[3],A),d&&(u.static=p,u.private=h,g=u.access={has:h?$=>Fo(r,$):$=>e in $},d^3&&(g.get=h?$=>(d^1?c:N)($,r,d^4?i:S.get):$=>$[e]),d>2&&(g.set=h?($,F)=>T($,r,F,d^4?i:S.set):($,F)=>$[e]=F)),o=(0,t[w])(d?d<4?h?i:S[f]:d>4?void 0:{get:S.get,set:S.set}:r,u),l._=1,d^4||o===void 0?Kt(o)&&(d>4?k.unshift(o):d?h?i=o:S[f]=o:r=o):typeof o!="object"||o===null?mt("Object expected"):(Kt(s=o.get)&&(S.get=s),Kt(s=o.set)&&(S.set=s),Kt(s=o.init)&&k.unshift(s));return d||Lo(a,r),S&&ht(r,e,S),h?d^4?i:S:r},re=(a,n,e)=>li(a,typeof n!="symbol"?n+"":n,e),an=(a,n,e)=>n.has(a)||mt("Cannot "+e),Fo=(a,n)=>Object(n)!==n?mt('Cannot use the "in" operator on this value'):a.has(n),c=(a,n,e)=>(an(a,n,"read from private field"),e?e.call(a):n.get(a)),x=(a,n,e)=>n.has(a)?mt("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),T=(a,n,e,t)=>(an(a,n,"write to private field"),t?t.call(a,e):n.set(a,e),e),N=(a,n,e)=>(an(a,n,"access private method"),e);var Sr=(a,n,e,t)=>({set _(r){T(a,n,r,e)},get _(){return c(a,n,t)}});var gi,pi,ui=y(()=>{"use strict";gi=(()=>{let a={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};return Object.setPrototypeOf(a,null),a})(),pi=(()=>{let a=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","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(a),a})()});var _e,ci=y(()=>{"use strict";_e=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var ve,hi,$e,Ne,Ve,ln,ne,mi,fe,Ro,Po,Xe,fi,xi,jo,Bo,ft,Ie,H=y(()=>{"use strict";ci();ve=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,hi=String.raw`[^[\]<>"\0-\x1F\x7F${ve}\uFFFD]`,$e=String.raw`(?:\[[\da-f:.]+\]|${hi})`,Ne=String.raw`(?:${hi}|\0\d+[cn!~]\x7F)*`,Ve=(a,n)=>e=>e.replace(a,n),ln=Ve(/[\0\x7F]|\r$/gmu,""),ne=Ve(/\0\d+[cn]\x7F/gu,""),mi=Ve(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),fe=(a,n="")=>a.map(e=>typeof e=="string"?e:e.text()).join(n),Ro={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Po=Ve(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,n,e)=>n?String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n)):Ro[e.toLowerCase()]),Xe=a=>Po(a),fi=Ve(/&#(\d+|x[\da-f]+);/giu,(a,n)=>String.fromCodePoint(+((/^x/iu.test(n)?"0":"")+n))),xi=Ve(/\n/gu,String.raw`\n`),jo={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Bo=a=>Ve(a,n=>`&${jo[n]};`),ft=Bo(/[&<>]/gu),Ie=(a,n={})=>{let{pre:e="",post:t="",sep:r=""}=n;return e+a.map(i=>i.print()).join(r)+t}});var bi=No((qa,qo)=>{qo.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},variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{"#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","#cscore":"cscore","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#replace":"replace","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"section","#section-x":"section-x","#section-h":"section-h","#statements":"statements"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#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:|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var dn,Ti=y(()=>{"use strict";dn=bi()});var Jt,xt,Yt,Zt,gn,R,K=y(()=>{"use strict";R=class{constructor(n,e){x(this,Zt);x(this,Jt);x(this,xt);x(this,Yt);T(this,Jt,n),T(this,xt,e)}get start(){return c(this,xt)}get top(){return N(this,Zt,gn).call(this).top}get left(){return N(this,Zt,gn).call(this).left}};Jt=new WeakMap,xt=new WeakMap,Yt=new WeakMap,Zt=new WeakSet,gn=function(){var n;return(n=c(this,Yt))!=null||T(this,Yt,c(this,Jt).getRootNode().posFromIndex(c(this,xt))),c(this,Yt)}});var pn,yi,C,E,Ee,q=y(()=>{"use strict";Ae();K();P();pn=(a,n,e,t)=>({line:a+e-1,character:(e===1?n:0)+t}),yi=a=>(n,e,t,r,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof R?e:new R(n,s),{offsetHeight:u,offsetWidth:g}=n,{startIndex:d,startLine:p,startCol:h}=a(n,s,o,l),{line:m,character:f}=pn(p,h,u,g);return{rule:t,message:b.msg(r),severity:i,startIndex:d,endIndex:d+n.toString().length,startLine:p,endLine:m,startCol:h,endCol:f}},C=yi((a,n,e,t)=>{let r=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(r);return{startIndex:n+r,startLine:e+i,startCol:i?s:t+s}}),E=yi((a,n,e,t)=>({startIndex:n,startLine:e,startCol:t})),Ee=(a,n,e)=>{if(a)return a[1];let t=n();return e([oe.rev,t]),t}});var _o,wr,ki=y(()=>{"use strict";_o=(a,n,e)=>{let[t,...r]=a.split("#");return(!t||t===n)&&r.every(i=>i===e)},wr=(a,n,e)=>({type:t,name:r})=>a.split(",").some(i=>_o(i.trim(),t,r))});var er,bt,Tt,tr,rr,yt,kt,nr,un,vt,cn=y(()=>{"use strict";q();Ae();vt=class{constructor(){x(this,nr);re(this,"childNodes",[]);x(this,er);x(this,bt);x(this,Tt);x(this,tr);x(this,rr);x(this,yt);x(this,kt,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,er)}get nextSibling(){return c(this,bt)}get previousSibling(){return c(this,Tt)}get offsetHeight(){return N(this,nr,un).call(this).height}get offsetWidth(){return N(this,nr,un).call(this).width}getChildNodes(){let{childNodes:n}=this;return Object.isFrozen(n)?[...n]:n}getAttribute(n){return n==="padding"?0:this[n]}setAttribute(n,e){switch(n){case"parentNode":T(this,er,e),e||(T(this,bt,void 0),T(this,Tt,void 0));break;case"nextSibling":T(this,bt,e);break;case"previousSibling":T(this,Tt,e);break;case"aIndex":T(this,yt,[oe.rev,e]);break;default:this[n]=e}}getRootNode(){return Ee(c(this,rr),()=>{var n,e;return(e=(n=this.parentNode)==null?void 0:n.getRootNode())!=null?e:this},n=>{let[,e]=n;e.type==="root"&&T(this,rr,n)})}indexFromPos(n,e){}posFromIndex(n){let{length:e}=String(this);if(n+=n<0?e:0,n>=0&&n<=e){let t=this.getLines(),r=t.findIndex(([,,i])=>n<=i);return{top:r,left:n-t[r][1]}}}getGaps(n){return 0}getRelativeIndex(n){if(n===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return Ee(c(this,kt)[n],()=>{let{childNodes:e}=this,t=n+(n<0?e.length:0),r=this.getAttribute("padding");for(let i=0;i<t;i++)c(this,kt)[i]=[oe.rev,r],r+=e[i].toString().length+this.getGaps(i);return r},e=>{c(this,kt)[n]=e})}getAbsoluteIndex(){return Ee(c(this,yt),()=>{let{parentNode:n}=this;return n?n.getAbsoluteIndex()+this.getRelativeIndex():0},n=>{T(this,yt,n)})}getBoundingClientRect(){}seal(n,e){Object.defineProperty(this,n,{enumerable:!e&&!!this[n],configurable:!0})}is(n){return this.type===n}getLines(){return Ee(c(this,tr),()=>{let n=[],e=0;for(let t of String(this).split(`
|
|
2
|
+
`)){let r=e+t.length;n.push([t,e,r]),e=r+1}return n},n=>{T(this,tr,n)})}};er=new WeakMap,bt=new WeakMap,Tt=new WeakMap,tr=new WeakMap,rr=new WeakMap,yt=new WeakMap,kt=new WeakMap,nr=new WeakSet,un=function(){let n=this.getLines(),e=n[n.length-1];return{height:n.length,width:e[2]-e[1]}}});var Oe,hn,mn,Cr,vi=y(()=>{"use strict";H();Ae();ki();cn();Cr=class extends vt{constructor(){super(...arguments);x(this,Oe)}get length(){return this.childNodes.length}text(e){return fe(this.childNodes,e)}normalize(){let e=this.getChildNodes(),t=r=>{var i,s;e.splice(r,1),(i=e[r-1])==null||i.setAttribute("nextSibling",e[r]),(s=e[r])==null||s.setAttribute("previousSibling",e[r-1])};for(let r=e.length-1;r>=0;r--){let{type:i,data:s}=e[r];i!=="text"||e.length===1||this.getGaps(r-(r&&1))||s===""&&t(r)}this.setAttribute("childNodes",e)}removeAt(e){return fn(this,e,1)[0]}insertAt(e,t=this.length){return fn(this,t,0,[e]),e}closest(e){let t=wr(e,this),{parentNode:r}=this;for(;r;){if(t(r))return r;({parentNode:r}=r)}}querySelector(e){let t=wr(e,this);return N(this,Oe,hn).call(this,t)}querySelectorAll(e){let t=wr(e,this);return N(this,Oe,mn).call(this,t)}append(...e){for(let t of e)this.insertAt(t)}replaceChildren(...e){for(let t=this.length-1;t>=0;t--)this.removeAt(t);this.append(...e)}setText(e,t=0){t+=t<0?this.length:0;let r=this.childNodes[t],{data:i}=r;return r.replaceData(e),i}toString(e,t=""){return this.childNodes.map(r=>r.toString(e)).join(t)}caretPositionFromIndex(e){}elementFromIndex(e){}elementFromPoint(e,t){}lint(e=this.getAbsoluteIndex(),t){let r=[];for(let i=0,s=e+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i];o.setAttribute("aIndex",s),r.push(...o.lint(s,t)),s+=o.toString().length+this.getGaps(i)}return r}print(e={}){let t=e.class;return this.toString()?(t===""?"":`<span class="wpb-${t!=null?t:this.type}">`)+Ie(this.childNodes,e)+(t===""?"":"</span>"):""}json(e,t=this.getAbsoluteIndex()){let r={...this,type:this.type,range:[t,t+this.toString().length],childNodes:[]};for(let i=0,s=t+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i],{length:l}=o.toString();o.setAttribute("aIndex",s),r.childNodes.push(o.type==="text"?{data:o.data,range:[s,s+l]}:o.json(void 0,s)),s+=l+this.getGaps(i)}return r}};Oe=new WeakSet,hn=function(e){var t;for(let r of this.childNodes){if(r.type==="text")continue;if(e(r))return r;let i=N(t=r,Oe,hn).call(t,e);if(i)return i}},mn=function(e){var r;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...N(r=i,Oe,mn).call(r,e)));return t}});var xn,Ai,Oo,Mo,zo,Wo,Uo,Go,bn,$r,Si,ir,wi=y(()=>{"use strict";H();q();P();cn();xn=String.raw`[${ve}\t]*`,Ai=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${xn}\d)|isbn(?=[-::]?${xn}(?:\d(?:${xn}|-)){6})`,Oo=new RegExp(String.raw`${Ai}|https?[:/]/+`,"giu"),Mo=new RegExp(Ai,"giu"),zo=new Set(["attr-value","ext-link-text","link-text"]),Wo={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Uo={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},Go=["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"];try{bn=new RegExp(String.raw`[\p{L}\d_]`,"u")}catch(a){bn=/\w/u}ir=class extends vt{constructor(e){super();x(this,$r);re(this,"data","");Object.defineProperties(this,{childNodes:{enumerable:!1,configurable:!1},data:{value:e}})}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?ne(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var _,L,X;if(t===!1)return[];let{data:r,parentNode:i,nextSibling:s,previousSibling:o}=this;if(!i)throw new Error("An isolated text node cannot be linted!");let{type:l,name:u,parentNode:g}=i,d=!1;if(l==="attr-value"){let{type:J,name:ue,tag:ce}=g;if(J!=="ext-attr")d=!0;else if(ce==="choose"&&(ue==="before"||ue==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&u==="link"||d?Mo:Oo),r.search(t)===-1)return[];t.lastIndex=0;let p=[],h=s==null?void 0:s.type,m=s==null?void 0:s.name,f=o==null?void 0:o.type,k=this.getRootNode(),A=k.toString(),{ext:S,html:w}=k.getAttribute("config"),{top:$,left:F}=k.posFromIndex(e),B=new Set(["onlyinclude","noinclude","includeonly",...S,...w[0],...w[1],...w[2],...Go]);for(let J=t.exec(r);J;J=t.exec(r)){let[,ue,ce]=J,{index:D}=J,W=J[0].toLowerCase();if(ce&&ce!=="]"){let{length:ge}=ce;D+=ge,W=W.slice(ge)}let{0:I,length:le}=W,qe=I==="r"||I==="p"||I==="i";if(I==="<"&&!B.has(ue.toLowerCase())||I==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(r.slice(D+1))||s!=null&&s.is("ext")&&m==="nowiki"&&((_=s.innerText)!=null&&_.includes("]")))||qe&&(!i.getAttribute("plain")||zo.has(l)))continue;I==="]"&&(D||le>1)&&t.lastIndex--;let he=e+D,de=he+le,me=A[de],ut=A[he-1],nn=le>1&&!(I==="<"&&!/[\s/>]/u.test(me!=null?me:"")||d&&(I==="["||I==="]")||qe&&l==="parameter-value")||I==="{"&&(me===I||ut==="-")||I==="}"&&(ut===I||me==="-")||I==="["&&(me===I||l==="ext-link-text"||h==="free-ext-link"&&!r.slice(D+1).trim())||I==="]"&&(ut===I||f==="free-ext-link"&&!r.slice(0,D).includes("]"))?"error":"warning",sn=I==="{"||I==="[";if(nn==="warning"&&(sn||(I==="]"||I==="}"))){let ge=Wo[I],on=sn?r.slice(D+1):r.slice(0,D);if(I==="{"&&((L=ge.exec(on))==null?void 0:L[0])==="}"||I==="}"&&((X=ge.exec(on))==null?void 0:X[0])==="{")continue;if(!on.includes(I)){let ii=sn?"nextSibling":"previousSibling",He=this[ii];for(;He&&(He.type!=="text"||!ge.test(He.data));)He=He[ii];if(He&&ge.exec(He.data)[0]!==I)continue}}qe&&(W=W.toUpperCase());let ti=this.posFromIndex(D),{line:ri,character:ni}=pn($,F,ti.top+1,ti.left),ct={rule:Uo[I],message:b.msg('lonely "$1"',qe||I==="h"?W:I),severity:nn,startIndex:he,endIndex:de,startLine:ri,endLine:ri,startCol:ni,endCol:ni+le};if(I==="<")ct.suggestions=[{desc:"escape",range:[he,he+1],text:"<"}];else if(I==="h"&&l!=="link-text"&&bn.test(ut||""))ct.suggestions=[{desc:"whitespace",range:[he,he],text:" "}];else if(I==="["&&l==="ext-link-text"){let ge=i.getAbsoluteIndex()+i.toString().length;ct.suggestions=[{desc:"escape",range:[ge,ge+1],text:"]"}]}else if(I==="]"&&f==="free-ext-link"&&nn==="error"){let ge=e-o.toString().length;ct.fix={range:[ge,ge],text:"[",desc:"left bracket"}}else qe&&(ct.suggestions=[...J[0]===W?[]:[{desc:"uppercase",range:[he,de],text:W}],...me===":"||me==="\uFF1A"?[{desc:"whitespace",range:[de,de+1],text:" "}]:[]]);p.push(ct)}return p}replaceData(e){N(this,$r,Si).call(this,e)}print(){return ft(this.data)}};$r=new WeakSet,Si=function(e){this.setAttribute("data",e)}});var xe,Qe=y(()=>{"use strict";Ae();xe=(a=!0,n=!0)=>(e,t)=>{class r extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return Nr(r,e),r}});var sr,be,At=y(()=>{"use strict";j();be=class extends v{constructor(e,t,r,i,s,o){super(e,i,s,o);x(this,sr);T(this,sr,r)}get type(){return c(this,sr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};sr=new WeakMap});var St,z,Le=y(()=>{"use strict";j();z=class extends v{constructor(e,t,r,i,s){super(e,r,i,s);x(this,St);T(this,St,t)}get type(){return c(this,St)}set type(e){T(this,St,e)}};St=new WeakMap});var Do,Ke,Se,Fe,we,or=y(()=>{"use strict";q();H();K();P();j();Le();Do=a=>a==="redirect-target"||a==="link",we=class extends v{constructor(e,t,r=b.getConfig(),i=[],s="|"){super(void 0,r,i,{});x(this,Ke,!0);x(this,Se);x(this,Fe);if(this.insertAt(new z(e,"link-target",r,i,{})),t!==void 0){let o=new v(t,r,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}T(this,Se,s)}get link(){}get fragment(){return c(this,Fe).fragment}afterBuild(){T(this,Fe,this.getTitle()),c(this,Se).includes("\0")&&T(this,Se,this.buildFromStr(c(this,Se),0)),this.setAttribute("name",c(this,Fe).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?T(this,Ke,t):e==="title"?T(this,Fe,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,Se));return c(this,Ke)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,Ke)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,Fe):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?c(this,Se).length:1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:u}=c(this,Fe),g=new R(this,e);if(i.childNodes.some(({type:d})=>d==="template")&&r.push(C(i,g,"unknown-page","template in an internal link target","warning")),l){let d=C(i,g,"url-encoding","unnecessary URL encoding in an internal link");d.suggestions=[{desc:"decode",range:[d.startIndex,d.endIndex],text:_e(i.text())}],r.push(d)}if(o==="link"||o==="category"){let d=s==null?void 0:s.childNodes.findIndex(h=>h.type==="text"&&h.data.includes("|")),p=s==null?void 0:s.childNodes[d];if(p){let h=C(s,g,"pipe-like",'additional "|" in the link text',"warning"),m=h.startIndex+s.getRelativeIndex(d);h.suggestions=[{desc:"escape",range:[m,m+p.data.length],text:p.data.replace(/\|/gu,"|")}],r.push(h)}}if(u!==void 0&&!Do(o)){let d=C(i,g,"no-ignored","useless fragment"),p=i.childNodes.findIndex(m=>m.type==="text"&&m.data.includes("#")),h=i.childNodes[p];h&&(d.fix={range:[d.startIndex+i.getRelativeIndex(p)+h.data.indexOf("#"),d.endIndex],text:"",desc:"remove"}),r.push(d)}return r}getTitle(e,t){return this.normalizeTitle(this.firstChild.toString(!0),0,e,t,!0,!0)}print(){return super.print(c(this,Ke)?{pre:"[[",post:"]]",sep:c(this,Se)}:{sep:c(this,Se)})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t),{type:i,fragment:s}=this;return s!==void 0&&(i==="link"||i==="redirect-target")&&(r.fragment=s),r}};Ke=new WeakMap,Se=new WeakMap,Fe=new WeakMap});var ie,Me=y(()=>{"use strict";j();ie=class extends v{get innerText(){return this.firstChild.data}constructor(n="",e,t){super(n,e,t)}}});var Ci,Tn,Ho,G,ze=y(()=>{"use strict";Qe();Me();Ci=[xe()];G=class extends(Ho=ie){get type(){return"noinclude"}toString(n){return n?"":super.toString()}};Tn=Z(Ho),G=te(Tn,0,"NoincludeToken",Ci,G),ee(Tn,1,G)});var Ir,$i=y(()=>{"use strict";q();or();ze();Ir=class extends we{get type(){return"redirect-target"}constructor(n,e,t,r){super(n,void 0,t,r),e!==void 0&&this.insertAt(new G(e,t,r))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,!1,!0,!0)}lint(n=this.getAbsoluteIndex()){let e=super.lint(n,!1);if(this.length===2){let t=C(this.lastChild,{start:n},"no-ignored","useless link text");t.startIndex--,t.startCol--,t.fix={range:[t.startIndex,t.endIndex],text:"",desc:"remove"},e.push(t)}return e}}});var Ni,We,wt,yn,Vo,Je,Ii=y(()=>{"use strict";Qe();P();j();At();$i();Ni=[xe(!1,!1)];Je=class extends(Vo=v){constructor(e,t,r,i,s,o=b.getConfig(),l=[]){super(void 0,o,l);x(this,We);x(this,wt);T(this,We,e),T(this,wt,s);let u=new RegExp(String.raw`^(?:${o.redirection.join("|")})\s*(?::\s*)?$`,"iu");this.append(new be(t,u,"redirect-syntax",o,l,{}),new Ir(r,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,We).length:super.getAttribute(e)}toString(e){return c(this,We)+super.toString(e)+c(this,wt)}lint(e=this.getAbsoluteIndex()){return this.lastChild.lint(e+c(this,We).length+this.firstChild.toString().length)}print(){return super.print({pre:c(this,We),post:c(this,wt)})}};yn=Z(Vo),We=new WeakMap,wt=new WeakMap,Je=te(yn,0,"RedirectToken",Ni,Je),ee(yn,1,Je)});var Ei={};se(Ei,{parseRedirect:()=>Xo});var Xo,Li=y(()=>{"use strict";P();Ii();Xo=(a,n,e)=>{var r;(r=n.regexRedirect)!=null||(n.regexRedirect=new RegExp(String.raw`^(\s*)((?:${n.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let t=n.regexRedirect.exec(a);return t&&b.normalizeTitle(t[3],0,!1,n,!0,!0,!0).valid?(a=`\0${e.length}o\x7F${a.slice(t[0].length)}`,new Je(...t.slice(1),n,e),a):!1}});var Er,Fi=y(()=>{"use strict";j();Er=class extends v{get type(){return"onlyinclude"}toString(n){return`<onlyinclude>${super.toString(n)}</onlyinclude>`}getAttribute(n){return n==="padding"?13:n==="plain"||super.getAttribute(n)}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}}});var Ue,Ct,kn=y(()=>{"use strict";j();Ct=class extends v{constructor(e,t,r,i,s,o=[]){super(void 0,s);x(this,Ue);re(this,"closed");re(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),T(this,Ue,[e,i||e]),this.closed=i!=="",this.selfClosing=i===void 0,this.append(t,r);let l=typeof t=="string"?-1:o.indexOf(t);o.splice(l===-1?1/0:l,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(e){let{selfClosing:t,firstChild:r,lastChild:i}=this,[s,o]=c(this,Ue);return t?`<${s}${r.toString(e)}/>`:`<${s}${r.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,Ue);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,Ue)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=c(this,Ue);return super.print(this.selfClosing?{pre:`<${e}`,post:"/>"}:{pre:`<${e}`,sep:">",post:this.closed?`</${t}>`:""})}};Ue=new WeakMap});var Ri,vn,Qo,Ye,Pi=y(()=>{"use strict";q();K();Qe();P();kn();Ri=[xe(!1)];Ye=class extends(Qo=Ct){get type(){return"include"}constructor(n,e="",t,r,i,s){super(n,e,t!=null?t:"",t===void 0||r!=null?r:"",i,s)}toString(n){return n?"":super.toString()}lint(n=this.getAbsoluteIndex()){let e=[],{firstChild:t,closed:r,name:i}=this,s=new R(this,n);if(t.data.trim()){let o=C(t,s,"no-ignored","useless attribute","warning");o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],e.push(o)}if(!r){let o=E(this,s,"unclosed-comment",b.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};vn=Z(Qo),Ye=te(vn,0,"IncludeToken",Ri,Ye),ee(vn,1,Ye)});var $t,Lr=y(()=>{"use strict";Ae();$t=(a=0)=>(n,e)=>{var r,ji;class t extends n{constructor(){super(...arguments);x(this,r)}getAttr(l){return N(this,r,ji).call(this).getAttr(l)}}return r=new WeakSet,ji=function(){return this.childNodes[a]},Nr(t,n),t}});var V,Bi,qi,Rr,An,_i,Nt,Oi,Mi,zi,Fr,Wi,Ui,Gi,Di,Hi=y(()=>{"use strict";V=new Set(["align"]),Bi=new Set(["cite"]),qi=new Set(["cite","datetime"]),Rr=new Set(["width"]),An=new Set(["axis","align","bgcolor","height","width","valign"]),_i=new Set([...An,"abbr","headers","scope","rowspan","colspan"]),Nt=new Set(["type"]),Oi=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Mi=new Set(["clear"]),zi=new Set(["bgcolor","align","valign"]),Fr=new Set,Wi=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"]),Ui={div:V,h1:V,h2:V,h3:V,h4:V,h5:V,h6:V,blockquote:Bi,q:Bi,p:V,br:Mi,pre:Rr,ins:qi,del:qi,ul:Nt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Oi,"border"]),caption:V,tr:zi,td:_i,th:_i,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:Rr,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Nt,poem:V,categorytree:V,combooption:V},Gi={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:Fr,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","extends","follow","dir"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:Fr,inputbox:Fr,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Fr,poll:new Set(["id","show-results-before-voting"]),sm2:Nt,flashmp3:Nt,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"])},Di={table:Oi,td:new Set([...An,"scope"]),th:An,br:Mi,caption:V,div:V,hr:Rr,h1:V,h2:V,h3:V,h4:V,h5:V,h6:V,li:Nt,p:V,pre:Rr,tr:zi,ul:Nt}});var Ko,ar,It,Y,Ce,Et,Vi=y(()=>{"use strict";q();H();Hi();K();P();j();Le();Ko=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Et=class extends v{constructor(e,t,r,i="",s,o=[],l=b.getConfig(),u=[]){let g=new z(r,"attr-key",l,u),d;if(r==="title"||t==="img"&&r==="alt")d=new v(s,l,u,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&r==="caption"||t==="choose"&&(r==="before"||r==="after")){let p={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};d=new v(s,p,u,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new z(s,"attr-value",l,u,{});super(void 0,l,u);x(this,ar);x(this,It);x(this,Y);x(this,Ce);T(this,ar,e),this.append(g,d),T(this,Y,i),T(this,Ce,[...o]),T(this,It,t),this.setAttribute("name",ne(r).trim().toLowerCase())}get type(){return c(this,ar)}get tag(){return c(this,It)}get balanced(){return!c(this,Y)||c(this,Ce)[0]===c(this,Ce)[1]}afterBuild(){c(this,Y).includes("\0")&&T(this,Y,this.buildFromStr(c(this,Y),0)),this.parentNode&&T(this,It,this.parentNode.name),this.setAttribute("name",this.firstChild.toString(!0).trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",r=""]=c(this,Ce);return c(this,Y)?super.toString(e,c(this,Y)+t)+r:this.firstChild.toString(e)}text(){return c(this,Y)?`${super.text(`${c(this,Y).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,Y)?c(this,Y).length+((t=(e=c(this,Ce)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var k;let r=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:u,tag:g}=this,d=this.getValue(),p=new R(this,e);if(!i){let A=C(o,p,"unclosed-quote",b.msg("unclosed $1","quotes"),"warning");A.startIndex--,A.startCol--,A.suggestions=[{range:[A.endIndex,A.endIndex],text:c(this,Ce)[0],desc:"close"}],r.push(A)}let h=Gi[g],m=Ui[g],{length:f}=this.toString();if(!(h!=null&&h.has(u))&&!(m!=null&&m.has(u))&&(l==="ext-attr"?h||m:!/\{\{[^{]+\}\}/u.test(u))&&(l==="ext-attr"&&!m||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(u)&&(g==="meta"||g==="link"||!Wi.has(u)))){let A=C(s,p,"illegal-attr","illegal attribute name");A.suggestions=[{desc:"remove",range:[e,e+f],text:""}],r.push(A)}else if((k=Di[g])!=null&&k.has(u))r.push(C(s,p,"obsolete-attr","obsolete attribute","warning"));else if(u==="style"&&typeof d=="string"&&Ko.test(d))r.push(C(o,p,"insecure-style","insecure style"));else if(u==="tabindex"&&typeof d=="string"&&d!=="0"){let A=C(o,p,"illegal-attr","nonzero tabindex");A.suggestions=[{desc:"remove",range:[e,e+f],text:""},{desc:"0 tabindex",range:[A.startIndex,A.endIndex],text:"0"}],r.push(A)}return r}getValue(){return c(this,Y)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,Ce);return c(this,Y)?super.print({sep:ft(c(this,Y))+e,post:t}):super.print()}};ar=new WeakMap,It=new WeakMap,Y=new WeakMap,Ce=new WeakMap});var Xi,Jo,Sn,lr,Ge,Pr=y(()=>{"use strict";q();H();K();P();j();Le();Vi();Xi=a=>a.slice(0,-1),Jo=a=>`${Xi(a)}-dirty`;try{Sn=new RegExp(String.raw`[\p{L}\d]`,"u")}catch(a){Sn=/[^\W_]/u}Ge=class extends v{constructor(e,t,r,i=b.getConfig(),s=[]){super(void 0,i,s,{});x(this,lr);if(T(this,lr,t),this.setAttribute("name",r),e){let o=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu,l="",u=o.exec(e),g=0,d=()=>{l&&(super.insertAt(new z(l,Jo(t),i,s,{})),l="")};for(;u;){let{index:p,0:h,1:m,2:f,3:k,4:A,5:S,6:w}=u;if(l+=e.slice(g,p),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(ne(m).trim())){let $=A!=null?A:w,F=[k,S],B=new Et(Xi(t),r,m,f,$,F,i,s);d(),super.insertAt(B)}else l+=h;({lastIndex:g}=o),u=o.exec(e)}l+=e.slice(g),d()}}get type(){return c(this,lr)}afterBuild(){let{parentNode:e}=this;(e==null?void 0:e.type)==="td"&&e.subtype==="caption"&&this.setAttribute("name","caption"),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(t=>t instanceof Et&&(!e||t.name===e.toLowerCase().trim()))}getAttrToken(e){let t=this.getAttrTokens(e);return t[t.length-1]}getAttr(e){var t;return(t=this.getAttrToken(e))==null?void 0:t.getValue()}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{parentNode:i,childNodes:s}=this,o=new Map,l=new Set,u=new R(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let g=E(this,u,"no-ignored","attributes of a closing tag"),d=i.getAbsoluteIndex();g.suggestions=[{desc:"remove",range:[e,g.endIndex],text:""},{desc:"open",range:[d+1,d+2],text:""}],r.push(g)}for(let g of s)if(g instanceof Et){let{name:d}=g;o.has(d)?(l.add(d),o.get(d).push(g)):o.set(d,[g])}else{let d=g.text().trim();if(d){let p=C(g,u,"no-ignored","containing invalid attribute",Sn.test(d)?"error":"warning");p.suggestions=[{desc:"remove",range:[p.startIndex,p.endIndex],text:" "}],r.push(p)}}if(l.size>0)for(let g of l){let d=o.get(g).map(p=>{let h=p.getValue();return[p,h===!0?"":h]});r.push(...d.map(([p,h],m)=>{let f=C(p,u,"no-duplicate",b.msg("duplicated $1 attribute",g)),k={desc:"remove",range:[f.startIndex,f.endIndex],text:""};return!h||d.slice(0,m).some(([,A])=>A===h)?f.fix=k:f.suggestions=[k],f}))}return r}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof z?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};lr=new WeakMap});var jr,Qi=y(()=>{"use strict";P();j();ze();jr=class extends v{get type(){return"ext-inner"}constructor(n,e=b.getConfig(),t=[]){if(n){let r=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=r.source,o=r.exec(n);o&&(i.lastIndex=o.index+s);let l=i.exec(n),u=0,g="";for(;o&&l;)new G(o[0],e,t),new G(l[0],e,t),g+=`${n.slice(u,o.index)}\0${t.length-1}n\x7F${n.slice(o.index+s,l.index)}\0${t.length}n\x7F`,u=l.index+s+1,r.lastIndex=u,o=r.exec(n),o&&(i.lastIndex=o.index+s),l=i.exec(n);n=g+n.slice(u)}super(n,e,t,{}),this.setAttribute("stage",10)}getAttribute(n){return n==="plain"||super.getAttribute(n)}lint(n=this.getAbsoluteIndex()){return super.lint(n,/<\s*\/\s*(pre)\b/giu)}}});var Lt,wn=y(()=>{"use strict";q();K();dr();P();j();Le();Lt=class extends v{get type(){return"ext-inner"}constructor(n,e,t=b.getConfig(),r=[],i){if(super(void 0,t,r,{}),e){let s=z;this.append(...e.split(`
|
|
3
|
+
`).map(o=>i?o:Ze(o,t,r,n)).map(o=>new s(o,"param-line",t,r,{})))}r.splice(r.indexOf(this),1),r.push(this)}toString(n){return super.toString(n,`
|
|
4
4
|
`)}text(){return super.text(`
|
|
5
|
-
`)}getGaps(){return 1}lint(
|
|
6
|
-
`})}}});var lr,It,Br,Et,Cn=k(()=>{"use strict";j();ye();K();R();P();yt();Et=class extends A{constructor(e,t,n=b.getConfig(),i=[]){super(void 0,n,i);x(this,It);x(this,lr);T(this,lr,e);let s=new A(t[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let o=new me(t[1],/^\s*$/u,"heading-trail",n,i,{});this.append(s,o)}get type(){return"heading"}get level(){return u(this,lr)}toString(e){let t=u(this,It,Br);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=u(this,It,Br);return e+this.firstChild.text()+e}getAttribute(e){return e==="padding"?this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=o.startsWith("="),p=l||o.endsWith("="),g=i.childNodes.filter(Lt("quote")),d=g.filter(({bold:f})=>f),c=g.filter(({italic:f})=>f),m=new E(this,e);if(this.level===1){let f=C(i,m,"h1","<h1>");p||(f.suggestions=[{desc:"h2",range:[f.startIndex,f.endIndex],text:`=${o}=`}]),n.push(f)}if(p){let f=C(i,m,"unbalanced-header",b.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[v]=/^=+/u.exec(o);f.suggestions=[{desc:`h${s}`,range:[f.startIndex,f.startIndex+v.length],text:""},{desc:`h${s+v.length}`,range:[f.endIndex,f.endIndex],text:v}]}else{let v=/[^=](=+)$/u.exec(o)[1];f.suggestions=[{desc:`h${s}`,range:[f.endIndex-v.length,f.endIndex],text:""},{desc:`h${s+v.length}`,range:[f.startIndex,f.startIndex],text:v}]}n.push(f)}this.closest("html-attrs,table-attrs")&&n.push($(this,m,"parsing-order","section header in a HTML tag"));let h=this.getRootNode().toString();if(d.length%2){let f=C(d[d.length-1],{...m,start:e+s,left:m.left+s},"format-leakage",b.msg("unbalanced $1 in a section header","bold apostrophes")),v=e+s+o.length;h.slice(f.endIndex,v).trim()?f.suggestions=[{desc:"close",range:[v,v],text:"'''"}]:f.fix={desc:"remove",range:[f.startIndex,f.endIndex],text:""},n.push(f)}if(c.length%2){let f=C(c[c.length-1],{start:e+s},"format-leakage",b.msg("unbalanced $1 in a section header","italic apostrophes")),v=e+s+o.length;f.fix=h.slice(f.endIndex,v).trim()?{desc:"close",range:[v,v],text:"''"}:{desc:"remove",range:[f.startIndex,f.endIndex],text:""},n.push(f)}return n}print(){let e=u(this,It,Br);return super.print({pre:e,sep:e})}json(){let e=super.json();return e.level=this.level,e}};lr=new WeakMap,It=new WeakSet,Br=function(){return"=".repeat(this.level)}});var Jo,jr,Ki=k(()=>{"use strict";Q();j();R();P();Jo=new RegExp(`https?://${Ce}${$e}$`,"iu"),jr=class extends A{get type(){return"parameter"}get anon(){return this.firstChild.length===0}constructor(r,e,t=b.getConfig(),n=[]){super(void 0,t,n);let i=new A(typeof r=="number"?void 0:r,t,n,{}),s=new A(e,t,n);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(r,e=!0){let t=(typeof r=="string"?r:r.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",t),t}afterBuild(){if(!this.anon){let{parentNode:r,firstChild:e}=this,t=this.trimName(e);r&&r.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(r){return this.anon?this.lastChild.toString(r):super.toString(r,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(r=this.getAbsoluteIndex(),e){var s;let t=super.lint(r,e),{firstChild:n}=this,i=(s=Jo.exec(n.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=C(n,{start:r},"unescaped","unescaped query string in an anonymous parameter");o.startIndex=o.endIndex,o.startLine=o.endLine,o.startCol=o.endCol,o.endIndex++,o.endCol++,o.fix={range:[o.startIndex,o.endIndex],text:"{{=}}",desc:"escape"},t.push(o)}return t}print(){return super.print({sep:this.anon?"":"="})}json(){let r=super.json();return r.anon=this.anon,r}}});var gr,et,tt,Ft,rt,$n,Ji,dr,Yi=k(()=>{"use strict";Q();j();ye();K();R();P();Ki();Ee();yt();dr=class extends A{constructor(e,t,n=b.getConfig(),i=[]){var f,v;let s,o=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);o&&(s=Number(o[1]),e=e.replace(`\0${s}h\x7F`,i[s].toString().replace(/^\n/u,"")));super(void 0,n,i,{});x(this,rt);te(this,"modifier","");x(this,gr,"template");x(this,et,!1);x(this,tt,new Map);x(this,Ft);let{parserFunction:[l,p],variable:g}=n,d=(f=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:f[0];if(d)this.setAttribute("modifier",d),e=e.slice(d.length);else if(e.includes(":")){let[y,...S]=e.split(":"),[w]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((v=S[0])!=null?v:"");this.setModifier(`${y}:${w}`)&&(e=S.join(":").slice(w.length))}let c=e.includes(":");if(c||t.length===0&&!u(this,et)){let y=e.indexOf(":"),S=y===-1?e:e.slice(0,y),w=y===-1?void 0:e.slice(y+1),L=oe(S),N=L[w===void 0?"trim":"trimStart"](),q=N.toLowerCase(),z=Array.isArray(p),B=z?p.includes(N):Object.prototype.hasOwnProperty.call(p,N),V=!z&&B?p[N]:Object.prototype.hasOwnProperty.call(l,q)&&l[q];if(z&&B||g.includes(V)||c&&V){this.setAttribute("name",V||q.replace(/^#/u,"")),T(this,gr,"magic-word");let Y=new RegExp(String.raw`^\s*${N}\s*$`,B?"u":"iu"),D=new me(S,Y,"magic-word-name",n,i,{});if(super.insertAt(D),w!==void 0&&t.unshift([w]),this.name==="invoke")for(let W=0;W<2;W++){let Z=t.shift();if(!Z)break;let F=new M(Z.join("="),`invoke-${W?"function":"module"}`,n,i);super.insertAt(F)}}}if(this.type==="template"){let y=oe(e).trim();if(!this.normalizeTitle(y,10,!0).valid)throw i.pop(),new SyntaxError("Invalid template name");let S=new M(e,"template-name",n,i,{});super.insertAt(S)}typeof s=="number"&&(i[s]=void 0);let m=this.isTemplate(),h=1;for(let[y,S]of t.entries())m||this.name==="switch"&&y>0||this.name==="tag"&&y>1||(S[0]=S.join("="),S.length=1),S.length===1&&(S.unshift(h),h++),this.insertAt(new jr(...S,n,i));this.seal("modifier")}get type(){return u(this,gr)}setModifier(e){let{parserFunction:[,,t,n]}=this.getAttribute("config"),i=oe(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),o=t.includes(s),l=n.includes(s);return u(this,et)&&o||!u(this,et)&&(l||e==="")||(Te.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),T(this,et,o),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}getModule(){}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(T(this,Ft,I(this,rt,$n).call(this)),this.setAttribute("name",u(this,Ft).title))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":":")+this.childNodes.slice(1).map(t=>t.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?n.text()+(t===1?"":":")+ue(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return u(this,Ft);default:return super.getAttribute(e)}}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t);if(!this.isTemplate())return n;let{type:i,childNodes:s,length:o}=this,l=new E(this,e),p=i==="magic-word";if(p&&!I(this,rt,$n).call(this).valid)n.push(C(s[1],l,"invalid-invoke","illegal module name"));else{let d=s[p?1:0],c=d.childNodes.findIndex(h=>h.type==="text"&&Xt(h.data).includes("#")),m=d.childNodes[c];if(m){let h=C(d,l,"no-ignored","useless fragment");h.fix={range:[h.startIndex+d.getRelativeIndex(c)+m.data.indexOf("#"),h.endIndex],text:"",desc:"remove"},n.push(h)}}if(p&&o===2)return n.push($(this,l,"invalid-invoke","missing module function")),n;let g=this.getDuplicatedArgs().filter(([,d])=>!d[0].querySelector("ext"));if(g.length>0)for(let[,d]of g)n.push(...d.map(c=>{let m=C(c,l,"no-duplicate","duplicated parameter");return m.suggestions=[{desc:"remove",range:[m.startIndex-1,m.endIndex],text:""}],m}));return n}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?I(this,rt,Ji).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(Lt("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,n=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return u(this,tt).has(i)?s=u(this,tt).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),u(this,tt).set(i,s)),s}getDuplicatedArgs(){return[...u(this,tt)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:n}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}let s=n.slice(i,i+2).map(({childNodes:[,o]})=>o);for(let o=0;o<s.length;){let{length:l,0:p}=s[o].childNodes.filter(g=>g.text().trim());if(l===0)s.splice(o,1);else if(l>1||p.type!=="magic-word")o++;else try{let g=p.getPossibleValues();s.splice(o,1,...g),o+=g.length}catch(g){o++}}return s}print(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${ct(i)}${s==="magic-word"?n.print()+(t===1?"":":")+Ne(e.slice(1),{sep:"|"}):Ne(e,{sep:"|"})}}}</span>`}};gr=new WeakMap,et=new WeakMap,tt=new WeakMap,Ft=new WeakMap,rt=new WeakSet,$n=function(){let e=this.type==="template",t=this.childNodes[e?0:1];return this.normalizeTitle(t.toString(!0),e?10:828)},Ji=function(e){let t=this.getAnonArgs(),n=typeof e!="number";for(let i=n?t.indexOf(e):e-1;i<t.length;i++){let s=t[i],{name:o}=s,l=String(i+1);o!==l&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}}});var Zi,Nn,Yo,nt,es=k(()=>{"use strict";Qe();P();Zi=[ce()];nt=class extends(Yo=A){get type(){return"hidden"}};Nn=ne(Yo),nt=se(Nn,0,"HiddenToken",Zi,nt),ie(Nn,1,nt)});var Or,ts,qr,rs=k(()=>{"use strict";Q();j();K();R();P();Ee();es();qr=class extends A{constructor(e,t=b.getConfig(),n=[]){super(void 0,t,n,{});x(this,Or);for(let[i,s]of e.entries())if(i===0){let o=new M(s,"arg-name",t,n,{});super.insertAt(o)}else if(i>1){let o=new nt(s,t,n);super.insertAt(o)}else{let o=new A(s,t,n);o.type="arg-default",o.setAttribute("stage",2),super.insertAt(o)}}get type(){return"arg"}get default(){var e,t;return(t=(e=this.childNodes[1])==null?void 0:e.text())!=null?t:!1}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${ue(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}afterBuild(){I(this,Or,ts).call(this),super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[n,i,...s]}=this;if(!this.getAttribute("include")){let l=$(this,{start:e},"no-arg","unexpected template argument");return i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),[l]}let o=n.lint(e+3,t);if(i&&o.push(...i.lint(e+4+n.toString().length,t)),s.length>0){let l=new E(this,e);o.push(...s.map(p=>{let g=C(p,l,"no-ignored","invisible content inside triple braces");return g.startIndex--,g.startCol--,g.suggestions=[{desc:"remove",range:[g.startIndex,g.endIndex],text:""},{desc:"escape",range:[g.startIndex,g.startIndex+1],text:"{{!}}"}],g}))}return o}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}};Or=new WeakSet,ts=function(){this.setAttribute("name",this.firstChild.toString(!0).trim())}});var is={};le(is,{parseBraces:()=>pr});var Zo,ns,In,ea,pr,_r=k(()=>{"use strict";Q();Cn();Yi();rs();Zo={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},ns=String.raw`|\{{2,}`,In=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),ea=/\{\{\s*([^\s\0<>[\]{}|_#&%:.]+)\s*\}\}(?!\})/gu,pr=(a,r,e)=>{var d,c,m,h,f,v;let t=String.raw`${(d=r.excludes)!=null&&d.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,n]}=r,i=[];a=a.replace(ea,(y,S)=>{var w;return new dr(y.slice(2,-2),[],r,e),`\0${e.length-2}${(w=In.get(S.toLowerCase()))!=null?w:"t"}\x7F`});let s=a.lastIndexOf("}}")-a.length,o=s+a.length!==-1,l=new RegExp(t+(o?ns:""),"gmu"),p=l.exec(a),g;for(;p||g!==void 0&&g<=a.length&&((m=(c=i[i.length-1])==null?void 0:c[0])!=null&&m.startsWith("="));){if(p!=null&&p[1]){let[,{length:D}]=p;p[0]=p[0].slice(D),p.index+=D}let{0:y,index:S}=p!=null?p:{0:`
|
|
7
|
-
`,index:a.length},
|
|
8
|
-
`){
|
|
9
|
-
)`:""}(\s*)$`,"u");return[g,d,
|
|
10
|
-
`))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new G(s,t,
|
|
5
|
+
`)}getGaps(){return 1}lint(n=this.getAbsoluteIndex()){let e=new R(this,n),t=b.msg("invalid parameter of <$1>",this.name),r=[];for(let i of this.childNodes){let s=i.childNodes.filter(({type:o})=>o!=="comment"&&o!=="include"&&o!=="noinclude");if(s.some(({type:o})=>o==="ext"))r.push(C(i,e,"no-ignored",t));else{let o=s.findIndex(({type:u})=>u!=="text"),l=s.slice(0,o===-1?void 0:o).map(String).join("");if(l&&!(o===-1?/^[a-z]+(?:\[\])?\s*=/iu:/^[a-z]+(?:\[\])?\s*(?:=|$)/iu).test(l)){let u=C(i,e,"no-ignored",t);u.suggestions=[{desc:"remove",range:[u.startIndex,u.endIndex],text:""}],r.push(u)}else r.push(...i.lint(n,!1))}n+=i.toString().length+1}return r}print(){return super.print({sep:`
|
|
6
|
+
`})}}});var gr,Ft,Br,Rt,Cn=y(()=>{"use strict";q();Ae();K();P();j();At();Rt=class extends v{constructor(e,t,r=b.getConfig(),i=[]){super(void 0,r,i);x(this,Ft);x(this,gr);T(this,gr,e);let s=new v(t[0],r,i);s.type="heading-title",s.setAttribute("stage",2);let o=new be(t[1],/^\s*$/u,"heading-trail",r,i,{});this.append(s,o)}get type(){return"heading"}get level(){return c(this,gr)}toString(e){let t=N(this,Ft,Br).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=N(this,Ft,Br).call(this);return e+this.firstChild.text()+e}getAttribute(e){return e==="padding"?this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=o.startsWith("="),u=l||o.endsWith("="),g=i.childNodes.filter(Pt("quote")),d=g.filter(({bold:f})=>f),p=g.filter(({italic:f})=>f),h=new R(this,e);if(this.level===1){let f=C(i,h,"h1","<h1>");u||(f.suggestions=[{desc:"h2",range:[f.startIndex,f.endIndex],text:`=${o}=`}]),r.push(f)}if(u){let f=C(i,h,"unbalanced-header",b.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[k]=/^=+/u.exec(o);f.suggestions=[{desc:`h${s}`,range:[f.startIndex,f.startIndex+k.length],text:""},{desc:`h${s+k.length}`,range:[f.endIndex,f.endIndex],text:k}]}else{let k=/[^=](=+)$/u.exec(o)[1];f.suggestions=[{desc:`h${s}`,range:[f.endIndex-k.length,f.endIndex],text:""},{desc:`h${s+k.length}`,range:[f.startIndex,f.startIndex],text:k}]}r.push(f)}this.closest("html-attrs,table-attrs")&&r.push(E(this,h,"parsing-order","section header in an HTML tag"));let m=this.getRootNode().toString();if(d.length%2){let f=C(d[d.length-1],{...h,start:e+s,left:h.left+s},"format-leakage",b.msg("unbalanced $1 in a section header","bold apostrophes")),k=e+s+o.length;m.slice(f.endIndex,k).trim()?f.suggestions=[{desc:"close",range:[k,k],text:"'''"}]:f.fix={desc:"remove",range:[f.startIndex,f.endIndex],text:""},r.push(f)}if(p.length%2){let f=C(p[p.length-1],{start:e+s},"format-leakage",b.msg("unbalanced $1 in a section header","italic apostrophes")),k=e+s+o.length;f.fix=m.slice(f.endIndex,k).trim()?{desc:"close",range:[k,k],text:"''"}:{desc:"remove",range:[f.startIndex,f.endIndex],text:""},r.push(f)}return r}print(){let e=N(this,Ft,Br).call(this);return super.print({pre:e,sep:e})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.level=this.level,r}};gr=new WeakMap,Ft=new WeakSet,Br=function(){return"=".repeat(this.level)}});var Yo,qr,Ki=y(()=>{"use strict";H();q();P();j();Yo=new RegExp(`https?://${$e}${Ne}$`,"iu"),qr=class extends v{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){var n;try{return!!((n=this.parentNode)!=null&&n.getDuplicatedArgs().some(([e])=>e===this.name))}catch(e){return!1}}constructor(n,e,t=b.getConfig(),r=[]){super(void 0,t,r);let i=new v(typeof n=="number"?void 0:n,t,r,{}),s=new v(e,t,r);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(n,e=!0){let t=(typeof n=="string"?n:n.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",t),t}afterBuild(){if(!this.anon){let{parentNode:n,firstChild:e}=this,t=this.trimName(e);n&&n.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(n){return this.anon?this.lastChild.toString(n):super.toString(n,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(n=this.getAbsoluteIndex(),e){var s;let t=super.lint(n,e),{firstChild:r}=this,i=(s=Yo.exec(r.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=C(r,{start:n},"unescaped","unescaped query string in an anonymous parameter");o.startIndex=o.endIndex,o.startLine=o.endLine,o.startCol=o.endCol,o.endIndex++,o.endCol++,o.fix={range:[o.startIndex,o.endIndex],text:"{{=}}",desc:"escape"},t.push(o)}return t}print(){return super.print({sep:this.anon?"":"="})}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{anon:this.anon,duplicated:this.duplicated}),t}}});var ur,et,tt,jt,rt,$n,Ji,pr,Yi=y(()=>{"use strict";H();q();Ae();K();P();j();Ki();Le();At();pr=class extends v{constructor(e,t,r=b.getConfig(),i=[]){var f,k;let s,o=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);o&&(s=Number(o[1]),e=e.replace(`\0${s}h\x7F`,i[s].toString().replace(/^\n/u,"")));super(void 0,r,i,{});x(this,rt);re(this,"modifier","");x(this,ur,"template");x(this,et,!1);x(this,tt,new Map);x(this,jt);let{parserFunction:[l,u],variable:g}=r,d=(f=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:f[0];if(d)this.setAttribute("modifier",d),e=e.slice(d.length);else if(e.includes(":")){let[A,...S]=e.split(":"),[w]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((k=S[0])!=null?k:"");this.setModifier(`${A}:${w}`)&&(e=S.join(":").slice(w.length))}let p=e.includes(":");if(p||t.length===0&&!c(this,et)){let A=e.indexOf(":"),S=A===-1?e:e.slice(0,A),w=A===-1?void 0:e.slice(A+1),$=ne(S),F=$[w===void 0?"trim":"trimStart"](),B=F.toLowerCase(),_=Array.isArray(u),L=_?u.includes(F):Object.prototype.hasOwnProperty.call(u,F),X=!_&&L?u[F]:Object.prototype.hasOwnProperty.call(l,B)&&l[B];if(_&&L||g.includes(X)||p&&X){this.setAttribute("name",X||B.replace(/^#/u,"")),T(this,ur,"magic-word");let ue=new RegExp(String.raw`^\s*${F}\s*$`,L?"u":"iu"),ce=new be(S,ue,"magic-word-name",r,i,{});if(super.insertAt(ce),w!==void 0&&t.unshift([w]),this.name==="invoke")for(let D=0;D<2;D++){let W=t.shift();if(!W)break;let I=new z(W.join("="),`invoke-${D?"function":"module"}`,r,i);super.insertAt(I)}}}if(this.type==="template"){let A=ne(e).trim();if(!this.normalizeTitle(A,10,!0,!0).valid)throw i.pop(),new SyntaxError("Invalid template name");let S=new z(e,"template-name",r,i,{});super.insertAt(S)}typeof s=="number"&&(i[s]=void 0);let h=this.isTemplate(),m=1;for(let[A,S]of t.entries())h||this.name==="switch"&&A>0||this.name==="tag"&&A>1||(S[0]=S.join("="),S.length=1),S.length===1&&(S.unshift(m),m++),this.insertAt(new qr(...S,r,i));this.seal("modifier")}get type(){return c(this,ur)}setModifier(e){let{parserFunction:[,,t,r]}=this.getAttribute("config"),i=ne(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),o=t.includes(s),l=r.includes(s);return c(this,et)&&o||!c(this,et)&&(l||e==="")||(oe.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),T(this,et,o),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}getModule(){}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(T(this,jt,N(this,rt,$n).call(this)),this.setAttribute("name",c(this,jt).title))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":":")+this.childNodes.slice(1).map(t=>t.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?r.text()+(t===1?"":":")+fe(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,jt);default:return super.getAttribute(e)}}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t);if(!this.isTemplate())return r;let{type:i,childNodes:s,length:o}=this,l=new R(this,e),u=i==="magic-word";if(u&&!N(this,rt,$n).call(this).valid)r.push(C(s[1],l,"invalid-invoke","illegal module name"));else{let d=s[u?1:0],p=d.childNodes.findIndex(m=>m.type==="text"&&Xe(m.data).includes("#")),h=d.childNodes[p];if(h){let m=C(d,l,"no-ignored","useless fragment");m.fix={range:[m.startIndex+d.getRelativeIndex(p)+h.data.indexOf("#"),m.endIndex],text:"",desc:"remove"},r.push(m)}}if(u&&o===2)return r.push(E(this,l,"invalid-invoke","missing module function")),r;let g=this.getDuplicatedArgs().filter(([,d])=>!d[0].querySelector("ext"));if(g.length>0)for(let[,d]of g)r.push(...d.map(p=>{let h=C(p,l,"no-duplicate","duplicated parameter");return h.suggestions=[{desc:"remove",range:[h.startIndex-1,h.endIndex],text:""}],h}));return r}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?N(this,rt,Ji).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(Pt("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,r=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return c(this,tt).has(i)?s=c(this,tt).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,tt).set(i,s)),s}getDuplicatedArgs(){return[...c(this,tt)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:r}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}let s=r.slice(i,i+2).map(({childNodes:[,o]})=>o);for(let o=0;o<s.length;){let{length:l,0:u}=s[o].childNodes.filter(g=>g.text().trim());if(l===0)s.splice(o,1);else if(l>1||u.type!=="magic-word")o++;else try{let g=u.getPossibleValues();s.splice(o,1,...g),o+=g.length}catch(g){o++}}return s}print(){let{childNodes:e,length:t,firstChild:r,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${ft(i)}${s==="magic-word"?r.print()+(t===1?"":":")+Ie(e.slice(1),{sep:"|"}):Ie(e,{sep:"|"})}}}</span>`}};ur=new WeakMap,et=new WeakMap,tt=new WeakMap,jt=new WeakMap,rt=new WeakSet,$n=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].toString(!0),e?10:828,!0)},Ji=function(e){let t=this.getAnonArgs(),r=typeof e!="number";for(let i=r?t.indexOf(e):e-1;i<t.length;i++){let s=t[i],{name:o}=s,l=String(i+1);o!==l&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}}});var Zi,Nn,Zo,nt,es=y(()=>{"use strict";Qe();j();Zi=[xe()];nt=class extends(Zo=v){get type(){return"hidden"}};Nn=Z(Zo),nt=te(Nn,0,"HiddenToken",Zi,nt),ee(Nn,1,nt)});var In,ea,_r,ts=y(()=>{"use strict";H();q();K();P();j();Le();es();_r=class extends v{constructor(e,t=b.getConfig(),r=[]){super(void 0,t,r,{});x(this,In);for(let[i,s]of e.entries())if(i===0){let o=new z(s,"arg-name",t,r,{});super.insertAt(o)}else if(i>1){let o=new nt(s,t,r);super.insertAt(o)}else{let o=new v(s,t,r);o.type="arg-default",o.setAttribute("stage",2),super.insertAt(o)}}get type(){return"arg"}get default(){var e,t;return(t=(e=this.childNodes[1])==null?void 0:e.text())!=null?t:!1}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${fe(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}afterBuild(){super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[r,i,...s]}=this;if(!this.getAttribute("include")){let l=E(this,{start:e},"no-arg","unexpected template argument");return i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),[l]}let o=r.lint(e+3,t);if(i&&o.push(...i.lint(e+4+r.toString().length,t)),s.length>0){let l=new R(this,e);o.push(...s.map(u=>{let g=C(u,l,"no-ignored","invisible content inside triple braces");return g.startIndex--,g.startCol--,g.suggestions=[{desc:"remove",range:[g.startIndex,g.endIndex],text:""},{desc:"escape",range:[g.startIndex,g.startIndex+1],text:"{{!}}"}],g}))}return o}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return r.default=this.default,r}};In=new WeakSet,ea=function(){}});var ss={};se(ss,{parseBraces:()=>cr});var ta,rs,ns,is,cr,Or=y(()=>{"use strict";H();Cn();Yi();ts();ta={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},rs=String.raw`|\{{2,}`,ns=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),is=a=>{let n=ne(a).trim().toLowerCase();return ns.has(n)?ns.get(n):/^(?:filepath|(?:full|canonical)urle?):./u.test(n)?"m":/^#vardefine:./u.test(n)?"n":"t"},cr=(a,n,e)=>{var h,m,f,k,A,S;let t=String.raw`${(h=n.excludes)!=null&&h.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,r]}=n,i=[],s=[],o=w=>w.replace(/\0(\d+)\x7F/gu,($,F)=>s[F]);a=a.replace(/\{\{([^\n{}[]*)\}\}(?!\})|\[\[[^\n[\]{]*\]\]/gu,(w,$)=>{if($!==void 0)try{let{length:F}=e,B=$.split("|");return new pr(B[0],B.slice(1).map(_=>{let L=_.indexOf("=");return L===-1?[_]:[_.slice(0,L),_.slice(L+1)]}),n,e),`\0${F}${is(B[0])}\x7F`}catch(F){if(!(F instanceof SyntaxError)||F.message!=="Invalid template name")throw F}return s.push(w),`\0${s.length-1}\x7F`});let l=a.lastIndexOf("}}")-a.length,u=l+a.length!==-1,g=new RegExp(t+(u?rs:""),"gmu"),d=g.exec(a),p;for(;d||p!==void 0&&p<=a.length&&((f=(m=i[i.length-1])==null?void 0:m[0])!=null&&f.startsWith("="));){if(d!=null&&d[1]){let[,{length:W}]=d;d[0]=d[0].slice(W),d.index+=W}let{0:w,index:$}=d!=null?d:{0:`
|
|
7
|
+
`,index:a.length},F=(k=i.pop())!=null?k:{},{0:B,index:_,parts:L,findEqual:X,pos:J}=F,ue=w==="="&&X,ce=W=>{L[L.length-1].push(o(W.slice(J,$)))};if(w==="]]"||w==="}-")p=$+2;else if(w===`
|
|
8
|
+
`){p=$+1;let{pos:W,findEqual:I}=(A=i[i.length-1])!=null?A:{};if(W===void 0||I||ne(a.slice(W,_))!==""){let le=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(_,$));le&&(a=`${a.slice(0,_)}\0${e.length}h\x7F${a.slice($)}`,p=_+4+String(e.length).length,le[2]=o(le[2]),new Rt(le[1].length,le.slice(2),n,e))}}else if(w==="|"||ue)p=$+1,ce(a),w==="|"&&L.push([]),F.pos=p,F.findEqual=w==="|",i.push(F);else if(w.startsWith("}}")){let W=w.slice(0,Math.min(B.length,3)),I=B.length-W.length,{length:le}=e;p=$+W.length,ce(a);let qe=!1,he="t";if(W.length===3){let de=L.map(ut=>ut.join("=")),me=de.length>1&&ne(de[1]).trim();new _r(de,n,e),me&&me.endsWith(":")&&r.includes(me.slice(0,-1).toLowerCase())&&(he="s")}else try{new pr(L[0][0],L.slice(1),n,e),he=is(L[0][0])}catch(de){if(de instanceof SyntaxError&&de.message==="Invalid template name")qe=!0;else throw de}qe||(a=`${a.slice(0,_+I)}\0${le}${he}\x7F${a.slice(p)}`,p=_+I+3+String(le).length,I>1?i.push({0:B.slice(0,I),index:_,pos:_+I,parts:[[]]}):I===1&&a[_-1]==="-"&&i.push({0:"-{",index:_-1,pos:_+1,parts:[[]]}))}else p=$+w.length,w.startsWith("{")&&(d.pos=p,d.parts=[[]]),i.push(..."0"in F?[F]:[],d);let D=i[i.length-1];if(u&&l+a.length<p)for(u=!1;(S=D==null?void 0:D[0])!=null&&S.startsWith("{");)i.pop(),D=i[i.length-1];g=new RegExp(t+(u?rs:"")+(D?`|${ta[D[0][0]]}${D.findEqual?"|=":""}`:""),"gmu"),g.lastIndex=p,d=g.exec(a)}return o(a)}});var Mr,os=y(()=>{"use strict";dr();Or();P();wn();Mr=class extends Lt{constructor(n,e,t=b.getConfig(),r=[]){let i=Symbol("InputboxToken"),{length:s}=r;r.push(i),e&&(e=Ze(e,t,r,n)),e&&(e=cr(e,t,r)),r.splice(s,1),super(n,e,t,r,{})}}});function as(a,n,e,t,r){n=n.trim();let i=n.replace(a==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(a){case"width":return!i&&!!n||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{if(!i)return n;let s=new RegExp(String.raw`^(?:${e.protocol}|//|\0\d+m\x7F)`,"iu"),o=new RegExp(String.raw`^(?:(?:${e.protocol}|//)${$e}|\0\d+m\x7F)${Ne}$`,"iu");if(s.test(i))return o.test(i)&&n;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2));let l=b.normalizeTitle(i,0,!1,e,!1,t,!0,!0);return l.valid&&l}case"lang":return(r==="svg"||r==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(r==="djvu"||r==="djv"||r==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var ra,ae,Wr,ls,zr,ds=y(()=>{"use strict";H();q();P();j();ra=new Set(["alt","link","lang","page","caption"]);zr=class extends v{constructor(e,t,r=b.getConfig(),i){var n=(...Lg)=>(super(...Lg),x(this,Wr),x(this,ae,""),this);var u;let s,o=Object.entries(r.img).map(([g,d])=>{let p=new RegExp(String.raw`^(\s*(?!\s))${g.replace("$1","(.*)")}${g.endsWith("$1")?`(?=$|
|
|
9
|
+
)`:""}(\s*)$`,"u");return[g,d,p]}),l=o.find(([,g,d])=>(s=d.exec(e),s&&(s.length!==4||as(g,s[2],r,!0,t)!==!1)));if(l&&s){s.length===3?(n(void 0,r,i),T(this,ae,e)):(n(s[2],r,i,{}),T(this,ae,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}n(e,{...r,excludes:[...(u=r.excludes)!=null?u:[],"list"]},i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?as("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!ra.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return c(this,ae)?c(this,ae).replace("$1",super.toString(e)):super.toString(e)}text(){return c(this,ae)?c(this,ae).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,c(this,ae).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{link:i,name:s}=this;if(s==="invalid"){let o=E(this,{start:e},"invalid-gallery","invalid image parameter");o.fix={range:[e-1,o.endIndex],text:"",desc:"remove"},r.push(o)}else if(typeof i=="object"&&i.encoded){let o=E(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link");o.suggestions=[{desc:"decode",range:[e,o.endIndex],text:_e(this.text())}],r.push(o)}return r}getValue(){return this.name==="invalid"?this.text():N(this,Wr,ls).call(this)||super.text()}print(){return c(this,ae)?`<span class="wpb-image-parameter">${c(this,ae).replace("$1",`<span class="wpb-image-caption">${Ie(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};ae=new WeakMap,Wr=new WeakSet,ls=function(){return c(this,ae)&&!c(this,ae).includes("$1")}});var gs,ps,us,na,Bt,En=y(()=>{"use strict";H();q();K();P();or();ds();gs=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),ps=new Set(["left","right","center","none"]),us=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),na=(a,n,e,t)=>{if(t===void 0)return[];let r=new RegExp(`${[a,n,e].map(mi).join("|")}`,"gu"),i=[],s=r.exec(t),o=0,l=0;for(;s;){let{0:u,index:g}=s;u!==e?o+=u===a?1:-1:o===0&&(i.push(t.slice(l,g)),{lastIndex:l}=r),s=r.exec(t)}return i.push(t.slice(l)),i},Bt=class extends we{get type(){return"file"}get extension(){return this.getAttribute("title").extension}constructor(n,e,t=b.getConfig(),r=[],i="|"){super(n,void 0,t,r,i);let{extension:s}=this.getTitle(!0,!0);this.append(...na("-{","}-","|",e).map(o=>new zr(o,s,t,r)))}lint(n=this.getAbsoluteIndex(),e){var h;let t=super.lint(n,e),r=this.getAllArgs().filter(({childNodes:m})=>{let f=m.filter(k=>k.text().trim());return f.length!==1||f[0].type!=="arg"}),i=[...new Set(r.map(({name:m})=>m))],s=i.filter(m=>gs.has(m)),o=i.filter(m=>ps.has(m)),l=i.filter(m=>us.has(m)),[u]=s,g=u==="framed"||u==="manualthumb",d=new R(this,n);if(this.closest("ext-link-text")&&((h=this.getValue("link"))==null?void 0:h.trim())!==""&&t.push(E(this,d,"nested-link","internal link in an external link")),g)for(let m of r.filter(({name:f})=>f==="width")){let f=C(m,d,"invalid-gallery","invalid image parameter");f.fix={range:[f.startIndex-1,f.endIndex],text:"",desc:"remove"},t.push(f)}if(r.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let p=(m,f)=>k=>{let A=C(k,d,"no-duplicate",b.msg(`${m} image $1 parameter`,f));return A.suggestions=[{desc:"remove",range:[A.startIndex-1,A.endIndex],text:""}],A};for(let m of i){if(m==="invalid"||m==="width"&&g)continue;let f=r.filter(({name:k})=>k===m);m==="caption"&&(f=[...f.slice(0,-1).filter(k=>k.text()),...f.slice(-1)]),f.length>1&&t.push(...f.map(p("duplicated",m)))}return s.length>1&&t.push(...r.filter(({name:m})=>gs.has(m)).map(p("conflicting","frame"))),o.length>1&&t.push(...r.filter(({name:m})=>ps.has(m)).map(p("conflicting","horizontal-alignment"))),l.length>1&&t.push(...r.filter(({name:m})=>us.has(m)).map(p("conflicting","vertical-alignment"))),t}getAllArgs(){return this.childNodes.slice(1)}getArgs(n){return this.getAllArgs().filter(({name:e})=>n===e)}getArg(n){let e=this.getArgs(n);return e[n==="manualthumb"?0:e.length-1]}getValue(n){var e;return(e=this.getArg(n))==null?void 0:e.getValue()}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{extension:r}=this;return r&&(t.extension=r),t}}});var qt,Ln=y(()=>{"use strict";q();P();j();En();qt=class extends Bt{constructor(e,t,r,i=b.getConfig(),s=[]){let o;if(r!==void 0){let{length:l}=s;o=new v(r,i,s);for(let u=1;u<11;u++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);re(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=`${e}-image`,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(e){let t=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),t?0:6,e,!0,!t)}getAttribute(e){return e==="padding"?0:super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),{ns:i}=this.getAttribute("title");if(i!==6){let s=E(this,{start:e},"invalid-gallery","invalid gallery image");s.suggestions=[{desc:"prefix",range:[e,e],text:"File:"}],r.push(s)}return r}}});var it,cs,Fn,Ur,hs=y(()=>{"use strict";P();j();Ln();ze();Ur=class extends v{constructor(e,t=b.getConfig(),r=[]){var i;super(void 0,t,r,{});x(this,it);for(let s of(i=e==null?void 0:e.split(`
|
|
10
|
+
`))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new G(s,t,r):s);continue}let[,l,u]=o;N(this,it,cs).call(this,l)?super.insertAt(new qt("gallery",l,u,t,r)):super.insertAt(new G(s,t,r))}}get type(){return"ext-inner"}get widths(){return N(this,it,Fn).call(this,"widths")}get heights(){return N(this,it,Fn).call(this,"heights")}toString(e){return super.toString(e,`
|
|
11
11
|
`)}text(){return super.text(`
|
|
12
12
|
`).replace(/\n\s*\n/gu,`
|
|
13
|
-
`)}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let{top:
|
|
14
|
-
`})}};
|
|
15
|
-
`),i=new Set(e.protocol.split("|")),s=G,o=!0,l=!1;for(let
|
|
13
|
+
`)}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let{top:r,left:i}=this.getRootNode().posFromIndex(e),s=[];for(let[o,l]of this.childNodes.entries()){let u=l.toString(),{length:g}=u,d=u.trim(),{type:p}=l,h=r+o,m=o?0:i;if(p==="noinclude"&&d&&!/^<!--.*-->$/u.test(d)){let f=e+g;s.push({rule:"no-ignored",message:b.msg("invalid content in <$1>","gallery"),severity:d.startsWith("|")?"warning":"error",startIndex:e,endIndex:f,startLine:h,endLine:h,startCol:m,endCol:m+g,suggestions:[{desc:"remove",range:[e,f],text:""},{desc:"comment",range:[e,f],text:`<!--${u}-->`}]})}else p!=="noinclude"&&p!=="text"&&s.push(...l.lint(e,t));e+=g+1}return s}print(){return super.print({sep:`
|
|
14
|
+
`})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{widths:this.widths,heights:this.heights}),r}};it=new WeakSet,cs=function(e){return this.normalizeTitle(e,6,!0,!0,!0).valid},Fn=function(e){var i,s;let t=(i=this.parentNode)==null?void 0:i.getAttr(e),r=typeof t=="string"&&((s=/^(\d+)\s*(?:px)?$/u.exec(t))==null?void 0:s[1]);return r&&Number(r)||120}});var _t,Rn=y(()=>{"use strict";q();or();_t=class extends we{get type(){return"link"}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e);return this.closest("ext-link-text")&&t.push(E(this,{start:n},"nested-link","internal link in an external link")),t}}});var ia,sa,hr,Re,Gr=y(()=>{"use strict";q();H();K();P();j();ia=String.raw`(?:[${ve}\t]| |�*160;|&#[xX]0*[aA]0;)`,sa=new RegExp(`${ia}+`,"gu"),Re=class extends v{constructor(e,t="free-ext-link",r=b.getConfig(),i){super(e,r,i,{});x(this,hr);T(this,hr,t)}get type(){return c(this,hr)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=fe(this.childNodes.map(r=>{let{type:i}=r,s=String(r.name);return i==="magic-word"&&e.has(s)?e.get(s):r}));return this.type==="magic-link"&&(t=t.replace(sa," ")),t}get link(){let{innerText:e}=this;return this.type==="magic-link"?e.startsWith("ISBN")?`ISBN ${e.slice(5).replace(/[- ]/gu,"").replace(/x$/u,"X")}`:e:fi(e)}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),i=new R(this,e),{type:s,childNodes:o}=this;if(s==="magic-link"){let{link:d}=this;if(d.startsWith("ISBN")){let p=[...d.slice(5)].map(h=>h==="X"?10:Number(h));(p.length===10&&p.reduce((h,m,f)=>h+m*(10-f),0)%11||p.length===13&&(p[12]===10||p.reduce((h,m,f)=>h+m*(f%2?3:1),0)%10))&&r.push(E(this,i,"invalid-isbn","invalid ISBN"))}return r}let l=s==="ext-link-url",u=l?/\|/u:/[,;。:!?()]+/u,g=o.find(d=>d.type==="text"&&u.test(d.data));if(g){let{data:d}=g,p=C(g,i,"unterminated-url",b.msg("$1 in URL",l?'"|"':"full-width punctuation"),"warning"),{index:h,0:m}=u.exec(d),f=p.startIndex+h;p.suggestions=l?[{desc:"whitespace",range:[f,f+1],text:" "}]:[{desc:"whitespace",range:[f,f],text:" "},{desc:"escape",range:[f,f+m.length],text:encodeURI(m)}],r.push(p)}return r}getUrl(e){}};hr=new WeakMap});var Pe,Ot,Pn=y(()=>{"use strict";q();P();j();Gr();Ot=class extends v{constructor(e,t="",r="",i=b.getConfig(),s=[]){super(void 0,i,s,{});x(this,Pe);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new Re(e,"ext-link-url",i,s);if(this.insertAt(o),T(this,Pe,t),r){let l=new v(r,i,s,{});l.type="ext-link-text",l.setAttribute("stage",10),this.insertAt(l)}}get type(){return"ext-link"}toString(e){return this.length===1?`[${super.toString(e)}${c(this,Pe)}]`:`[${super.toString(e,c(this,Pe))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return c(this,Pe).length}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&r.push(E(this,{start:e},"var-anchor","variable anchor in a section header")),r}print(){return super.print(this.length===1?{pre:"[",post:`${c(this,Pe)}]`}:{pre:"[",sep:c(this,Pe),post:"]"})}};Pe=new WeakMap});var mr,ms=y(()=>{"use strict";P();j();ze();Rn();Pn();mr=class extends v{get type(){return"imagemap-link"}constructor(n,e,t,r=b.getConfig(),i=[]){super(void 0,r,i),this.append(n,e.length===2?new _t(...e,r,i):new Ot(...e,r,i),new G(t,r,i))}}});var Dr,fs=y(()=>{"use strict";q();Ae();K();P();j();ze();Ln();ms();Dr=class extends v{get type(){return"ext-inner"}get image(){return this.childNodes.find(Pt("imagemap-image"))}constructor(n,e=b.getConfig(),t=[]){if(super(void 0,e,t,{}),!n)return;let r=n.split(`
|
|
15
|
+
`),i=new Set(e.protocol.split("|")),s=G,o=!0,l=!1;for(let u of r){let g=u.trim();if(!(l||!g||g.startsWith("#"))){if(o){let d=u.indexOf("|"),p=d===-1?u:u.slice(0,d),{valid:h,ns:m}=this.normalizeTitle(p,0,!0,!0);if(h&&m===6){let f=new qt("imagemap",p,d===-1?void 0:u.slice(d+1),e,t);super.insertAt(f),o=!1;continue}else l=!0}else if(u.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(u);continue}else if(u.includes("[")){let d=u.indexOf("["),p=u.slice(d),h=/^\[\[([^|]+)(?:\|([^\]]+))?\]\][\w\s]*$/u.exec(p);if(h){if(this.normalizeTitle(h[1],0,!0,!0,!1,!0).valid){super.insertAt(new mr(u.slice(0,d),h.slice(1),p.slice(p.indexOf("]]")+2),e,t));continue}}else if(i.has(p.slice(1,p.indexOf(":")+1))||i.has(p.slice(1,p.indexOf("//")+2))){let m=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(p);if(m){super.insertAt(new mr(u.slice(0,d),m.slice(1),p.slice(p.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(u,e,t))}}toString(n){return super.toString(n,`
|
|
16
16
|
`)}text(){return super.text(`
|
|
17
17
|
`).replace(/\n{2,}/gu,`
|
|
18
|
-
`)}getGaps(){return 1}lint(
|
|
19
|
-
`})}}});var Vr,fs=k(()=>{"use strict";j();R();Me();Vr=class extends ae{get type(){return"ext-inner"}lint(r=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if((e==="templatestyles"||e==="section")&&t){let i=$(this,{start:r},"void-ext",b.msg("nothing should be in <$1>",e));return i.fix={range:[r,i.endIndex],text:"",desc:"empty"},[i]}let n=new RegExp(String.raw`<\s*(?:/\s*)${e==="nowiki"?"":"?"}(${e})\b`,"giu");return super.lint(r,n)}}});var Xr={};le(Xr,{NestedToken:()=>Pn});var sa,mr,qt,Pn,Qr=k(()=>{"use strict";j();K();ar();_r();R();P();Bn();ze();sa=new Set(["comment","include","arg","template","magic-word"]),Pn=class extends A{constructor(e,t,n,i=b.getConfig(),s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=Ze(e,i,s,t)),e&&(e=pr(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,p,g,d)=>{let c=`\0${s.length+1}e\x7F`;return new Pe(l,p,g,d,i,!1,s),c}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,p)=>(new G(p,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);x(this,mr);x(this,qt);T(this,mr,[...n]),T(this,qt,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let n=new E(this,e),i=u(this,qt)?"includeonly":"noinclude",s=typeof u(this,qt)=="boolean"?new RegExp(String.raw`^(?:<${i}(?:\s[^>]*)?/?>|</${i}\s*>)$`,"iu"):/^<!--[\s\S]*-->$/u;return[...super.lint(e,t),...this.childNodes.filter(o=>{if(o.type==="ext")return!u(this,mr).includes(o.name);if(sa.has(o.type))return!1;let l=o.toString().trim();return l&&!s.test(l)}).map(o=>{let l=C(o,n,"no-ignored",b.msg("invalid content in <$1>",this.name));return l.suggestions=[{desc:"remove",range:[l.startIndex,l.endIndex],text:""},{desc:"comment",range:[l.startIndex,l.endIndex],text:`<!--${o.toString()}-->`}],l})]}};mr=new WeakMap,qt=new WeakMap});var xs,bs,jn,oa,Pe,Bn=k(()=>{"use strict";j();K();R();Er();P();kn();Rr();Qi();wn();ss();cs();hs();fs();xs=(a,r)=>{let e=new Set(a);return e.delete(r),[...e]};bs=[St()];Pe=class extends(oa=At){get type(){return"ext"}constructor(r,e,t,n,i=b.getConfig(),s=!1,o=[]){var c;let l=r.toLowerCase(),p=new Ge(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),g={...i,ext:xs(i.ext,l),excludes:[...(c=i.excludes)!=null?c:[]]},d;switch(g.inExt=!0,l){case"tab":g.ext=xs(g.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":l==="poem"&&g.excludes.push("heading"),d=new A(t,g,o);break;case"pre":d=new Pr(t,g,o);break;case"dynamicpagelist":d=new Nt(s,t,g,o);break;case"inputbox":g.excludes.push("heading"),d=new Mr(s,t,g,o);break;case"references":{let{NestedToken:m}=(Qr(),J(Xr));g.excludes.push("heading"),d=new m(t,s,["ref"],g,o);break}case"choose":{let{NestedToken:m}=(Qr(),J(Xr));d=new m(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],g,o);break}case"combobox":{let{NestedToken:m}=(Qr(),J(Xr));d=new m(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],g,o);break}case"gallery":d=new Wr(t,g,o);break;case"imagemap":d=new Hr(t,g,o);break;default:d=new Vr(t,g,o)}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(r,p,d,n,i,o),this.seal("closed",!0)}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new E(this,r);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push($(this,n,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push($(this,n,"var-anchor","variable anchor in a section header")),t}};jn=ne(oa),Pe=se(jn,0,"ExtToken",bs,Pe),ie(jn,1,Pe)});var Ts,qn,aa,it,ys=k(()=>{"use strict";j();Qe();R();Me();Ts=[ce(!1)];it=class extends(aa=ae){constructor(e,t,n,i){super(e,n,i);te(this,"closed");this.closed=t}get type(){return"comment"}getAttribute(e){return e==="padding"?4:super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){if(this.closed)return[];let t=$(this,{start:e},"unclosed-comment",b.msg("unclosed $1","HTML comment"));return t.suggestions=[{range:[t.endIndex,t.endIndex],text:"-->",desc:"close"}],[t]}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"<!--",post:this.closed?"-->":""})}};qn=ne(aa),it=se(qn,0,"CommentToken",Ts,it),ie(qn,1,it)});var As={};le(As,{parseCommentAndExt:()=>Ze});var vs,la,On,ks,Ze,ar=k(()=>{"use strict";Fi();ze();Pi();Bn();ys();vs="<onlyinclude>",la="</onlyinclude>",{length:On}=vs,ks=a=>{let r=a.indexOf(vs);return{i:r,j:a.indexOf(la,r+On)}},Ze=(a,r,e,t)=>{if(t){let{i:l,j:p}=ks(a);if(l!==-1&&p!==-1){let g="",d=c=>{new G(c,r,e),g+=`\0${e.length-1}n\x7F`};for(;l!==-1&&p!==-1;){let c=`\0${e.length}e\x7F`;new Ir(a.slice(l+On,p),r,e),l>0&&d(a.slice(0,l)),g+=c,a=a.slice(p+On+1),{i:l,j:p}=ks(a)}return a&&d(a),g}}let n=r.ext.join("|"),i=t?"includeonly":"(?:no|only)include",s=t?"noinclude":"includeonly",o=new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${i}(?:\s[^>]*)?/?>|</${i}\s*>|<(${n})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${s})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${s}\s*)>|$))`,"giu");return a.replace(o,(l,p,g,d,c,m,h,f,v)=>{let y=e.length,S="n";if(p)S="e",new Pe(p,g,d,c,r,m,e);else if(l.startsWith("<!--")){S="c";let w=l.endsWith("-->");new it(l.slice(4,w?-3:void 0),w,r,e)}else m?new Ye(m,h,f,v,r,e):new G(l,r,e);return`\0${y}${S}\x7F`})}});var da,ga,pa,Ss,Ot,he,De,_n,ua,st,ws=k(()=>{"use strict";j();Q();K();Er();P();da=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),ga=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"]),pa=new Set(["strike","big","center","font","tt"]);Ss=[St()];st=class extends(ua=A){constructor(e,t,n,i,s,o){super(void 0,s,o);x(this,Ot);x(this,he);x(this,De);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),T(this,Ot,n),T(this,he,i),T(this,De,e)}get type(){return"html"}get selfClosing(){return u(this,he)}get closing(){return u(this,Ot)}toString(e){return`<${this.closing?"/":""}${u(this,De)}${super.toString(e)}${u(this,he)?"/":""}>`}text(){let{closing:e}=this,t=u(this,De)+(e?"":super.text());return`<${e?"/":""}${t}${u(this,he)?"/":""}>`}getAttribute(e){return e==="padding"?u(this,De).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){var s;let n=super.lint(e,t),i=new E(this,e);if(this.name==="h1"&&!this.closing){let o=$(this,i,"h1","<h1>");o.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],n.push(o)}if(this.closest("table-attrs")){let o=$(this,i,"parsing-order","HTML tag in table attributes");o.fix={desc:"remove",range:[e,o.endIndex],text:""},n.push(o)}try{this.findMatchingTag()}catch(o){if(o instanceof SyntaxError){let{message:l}=o,p=l.split(":",1)[0].toLowerCase(),g=$(this,i,"unmatched-tag",p),d={desc:"no self-closing",range:[g.endIndex-2,g.endIndex-1],text:""};switch(p){case"unclosed tag":{let c=(s=this.parentNode)==null?void 0:s.childNodes;ga.has(this.name)&&(c!=null&&c.slice(0,c.indexOf(this)).some(({type:m,name:h})=>m==="html"&&h===this.name))?g.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(g.severity="warning");break}case"unmatched closing tag":{let c=this.closest("magic-word");c&&da.has(c.name)?g.severity="warning":g.suggestions=[{desc:"remove",range:[e,g.endIndex],text:""}];break}case"tag that is both closing and self-closing":{let{html:[c,,m]}=this.getAttribute("config"),h={desc:"open",range:[e+1,e+2],text:""};m.includes(this.name)?g.fix=h:c.includes(this.name)?g.fix=d:g.suggestions=[h,d];break}case"invalid self-closing tag":g.suggestions=[d,{desc:"close",range:[g.endIndex-2,g.endIndex],text:`></${this.name}>`}]}n.push(g)}}return pa.has(this.name)&&n.push($(this,i,"obsolete-tag","obsolete HTML tag","warning")),(this.name==="b"||this.name==="strong")&&this.closest("heading-title")&&n.push($(this,i,"bold-header","bold in section header","warning")),n}findMatchingTag(){let{html:[e,t,n]}=this.getAttribute("config"),{name:i,parentNode:s,closing:o}=this,l=xi(this.toString());if(o&&(u(this,he)||n.includes(i)))throw new SyntaxError(`Tag that is both closing and self-closing: ${l}`);if(n.includes(i)||u(this,he)&&t.includes(i))return this;if(u(this,he)&&e.includes(i))throw new SyntaxError(`Invalid self-closing tag: ${l}`);if(!s)return;let{childNodes:p}=s,g=p.indexOf(this),d=o?p.slice(0,g).reverse():p.slice(g+1),c=o?-1:1;for(let m of d)if(!(!m.is("html")||m.name!==i)&&(u(m,Ot)?c--:c++,c===0))return m;throw new SyntaxError(`${o?"Unmatched closing":"Unclosed"} tag: ${l}`)}print(){return super.print({pre:`<${this.closing?"/":""}${u(this,De)}`,post:`${u(this,he)?"/":""}>`})}json(){let e=super.json();return Object.assign(e,{closing:this.closing,selfClosing:u(this,he)}),e}};_n=ne(ua),Ot=new WeakMap,he=new WeakMap,De=new WeakMap,st=se(_n,0,"HtmlToken",Ss,st),ie(_n,1,st)});var Cs={};le(Cs,{parseHtml:()=>ma});var ca,ma,$s=k(()=>{"use strict";Rr();ws();ca=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,ma=(a,r,e)=>{var s;let{html:t}=r;(s=r.htmlElements)!=null||(r.htmlElements=new Set([...t[0],...t[1],...t[2]]));let n=a.split("<"),i=n.shift();for(let o of n){let l=ca.exec(o),p=l==null?void 0:l[2],g=p==null?void 0:p.toLowerCase();if(!l||!r.htmlElements.has(g)){i+=`<${o}`;continue}let[,d,,c="",m,h]=l,{length:f}=e,v=new Ge(c,"html-attrs",g,r,e),y=v.getAttr("itemprop");if(g==="meta"&&(y===void 0||v.getAttr("content")===void 0)||g==="link"&&(y===void 0||v.getAttr("href")===void 0)){i+=`<${o}`,e.length=f;continue}i+=`\0${e.length}x\x7F${h}`,new st(p,v,d==="/",m==="/>",r,e)}return i}});var _t,Mn=k(()=>{"use strict";Er();R();P();yt();Rr();_t=class extends St(1)(A){constructor(r,e,t,n,i=b.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new me(e,r,"table-syntax",i,s,{}),new Ge(n,"table-attrs",t,i,s))}}});var fe,hr,fr,zn,ot,Un=k(()=>{"use strict";j();K();R();P();Mn();ot=class extends _t{constructor(e,t,n=b.getConfig(),i=[]){var p;let s=/\||\0\d+!\x7F/u.exec(t!=null?t:""),o=s?t.slice(0,s.index):"";/\[\[|-\{/u.test(o)&&(s=null,o="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",o,n,i);x(this,fr);x(this,fe,"");x(this,hr);s&&([vr(this,fe)._]=s);let l=new A(t==null?void 0:t.slice(((p=s==null?void 0:s.index)!=null?p:NaN)+u(this,fe).length),n,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 I(this,fr,zn).call(this).subtype}afterBuild(){u(this,fe).includes("\0")&&T(this,fe,this.buildFromStr(u(this,fe),0)),super.afterBuild()}toString(e){let{childNodes:[t,n,i]}=this;return t.toString(e)+n.toString(e)+u(this,fe)+i.toString(e)}text(){let{childNodes:[e,t,n]}=this;return e.text()+t.text()+u(this,fe)+n.text()}getGaps(e){return e===1?u(this,fe).length:0}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new E(this,e+this.getRelativeIndex(this.length-1));for(let s of this.lastChild.childNodes)if(s.type==="text"){let{data:o}=s;if(o.includes("|")){let l=o.includes("||"),p=C(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let g={caption:"|+",td:"|",th:"!"}[this.subtype];p.fix={range:[p.startIndex,p.endIndex],text:o.replace(/\|\|/gu,`
|
|
20
|
-
${g}`),desc:"newline"}}else
|
|
21
|
-
`)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,
|
|
22
|
-
|}`,e){let t=this.getAttribute("config"),
|
|
23
|
-
`),o=
|
|
24
|
-
${s.shift()}`,l,
|
|
25
|
-
${d}${w&&`\0${
|
|
26
|
-
${g}`;continue}let
|
|
27
|
-
${g}`,l),i.push(l);continue}let[,f,
|
|
28
|
-
${d}${f}`,!0),
|
|
29
|
-
${d}${
|
|
30
|
-
${d}${y}`,z=B=>{let V=new ot(q,S.slice(N,L==null?void 0:L.index),t,n);return B.insertAt(V),V};for(;L;)z(l),{lastIndex:N}=w,[q]=L,L=w.exec(S);i.push(l,z(l))}}return o.slice(1)}});var Yr,Rs=k(()=>{"use strict";Me();Yr=class extends ae{get type(){return"hr"}}});var Ps,Vn,ya,at,Bs=k(()=>{"use strict";Qe();R();Me();Ps=[ce()];at=class extends(ya=ae){get type(){return"double-underscore"}constructor(r,e,t=b.getConfig(),n){super(r,t,n)}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Vn=ne(ya),at=se(Vn,0,"DoubleUnderscoreToken",Ps,at),ie(Vn,1,at)});var js={};le(js,{parseHrAndDoubleUnderscore:()=>ka});var ka,qs=k(()=>{"use strict";Rs();Bs();Cn();ka=({firstChild:{data:a},type:r,name:e},t,n)=>{var l,p,g;let{doubleUnderscore:[i,s,o]}=t;return(l=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i)),(p=t.sensitiveDoubleUnderscore)!=null||(t.sensitiveDoubleUnderscore=new Set(s)),(g=t.regexHrAndDoubleUnderscore)!=null||(t.regexHrAndDoubleUnderscore=new RegExp(`__(${[...i,...s].join("|")})__`,"giu")),r!=="root"&&(r!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(d,c,m)=>(new Yr(m,t,n),`${c}\0${n.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(d,c)=>{var v;let m=t.sensitiveDoubleUnderscore.has(c),h=c.toLowerCase(),f=t.insensitiveDoubleUnderscore.has(h);return m||f?(new at(c,m,t,n),`\0${n.length-1}${f&&((v=o==null?void 0:o[h])!=null?v:h)==="toc"?"u":"n"}\x7F`):d}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(d,c,m,h,f)=>{let v=`${c}\0${n.length}h\x7F`;return new Et(m.length,[h,f],t,n),v}),r==="root"||r==="ext-inner"&&e==="poem"?a:a.slice(1)}});var Zr,Os=k(()=>{"use strict";j();K();R();Me();Zr=class extends ae{get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}text(){let{parentNode:r,innerText:e}=this;return(r==null?void 0:r.type)==="image-parameter"&&r.name!=="caption"?"":e}lint(r=this.getAbsoluteIndex()){let{previousSibling:e,nextSibling:t,bold:n}=this,i=b.msg('lonely "$1"',"'"),s=[],o=new E(this,r),l=(p,g,d)=>[{desc:"escape",range:[p,g],text:"'".repeat(d)},{desc:"remove",range:[p,g],text:""}];if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){let p=$(this,o,"lonely-apos",i),{startIndex:g,startLine:d,startCol:c}=p,[,{length:m}]=/(?:^|[^'])('+)$/u.exec(e.data),h=r-m;s.push({...p,startIndex:h,endIndex:g,endLine:d,startCol:c-m,endCol:c,suggestions:l(h,g,m)})}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){let p=$(this,o,"lonely-apos",i),{endIndex:g,endLine:d,endCol:c}=p,[{length:m}]=/^'+/u.exec(t.data),h=g+m;s.push({...p,startIndex:g,endIndex:h,startLine:d,startCol:c,endCol:c+m,suggestions:l(g,h,m)})}if(n&&this.closest("heading-title")){let p=$(this,o,"bold-header","bold in section header","warning");p.suggestions=[{desc:"remove",range:[r,r+3],text:""}],s.push(p)}return s}json(){let r=super.json();return Object.assign(r,{bold:this.bold,italic:this.italic}),r}}});var _s={};le(_s,{parseQuotes:()=>Xn});var Xn,Qn=k(()=>{"use strict";Os();Xn=(a,r,e)=>{var g;let t=a.split(/('{2,})/u),{length:n}=t;if(n===1)return a;let i=0,s=0,o,l,p;for(let d=1;d<n;d+=2){let c=t[d].length;switch(c){case 2:s++;break;case 4:t[d-1]+="'",t[d]="'''";case 3:if(i++,o!==void 0)break;t[d-1].endsWith(" ")?l===void 0&&p===void 0&&(p=d):t[d-1].slice(-2,-1)===" "?o=d:l!=null||(l=d);break;default:t[d-1]+="'".repeat(c-5),t[d]="'''''",s++,i++}}if(s%2===1&&i%2===1){let d=(g=o!=null?o:l)!=null?g:p;d!==void 0&&(t[d]="''",t[d-1]+="'")}for(let d=1;d<n;d+=2)new Zr(t[d],r,e),t[d]=`\0${e.length-1}q\x7F`;return t.join("")}});var Ms={};le(Ms,{parseExternalLinks:()=>Kn});var Kn,Jn=k(()=>{"use strict";Q();Rn();Dr();Kn=(a,r,e,t)=>{var n;return(n=r.regexExternalLinks)!=null||(r.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${r.protocol}|//)${Ce}|\0\d+m\x7F)${$e}(?=[[\]<>"\t${be}]|\0\d))([${be}]*(?![${be}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(r.regexExternalLinks,(i,s,o,l)=>{let{length:p}=e,g=/&[lg]t;/u.exec(s);return g&&(o="",l=s.slice(g.index)+o+l,s=s.slice(0,g.index)),t?(new Fe(s,"ext-link-url",r,e),`[\0${p}f\x7F${o}${l}]`):(new jt(s,o,l,r,e),`\0${p}w\x7F`)})}});var en,zs=k(()=>{"use strict";ir();en=class extends Se{get type(){return"category"}}});var Ws={};le(Ws,{parseLinks:()=>Us});var va,Us,Gs=k(()=>{"use strict";R();Qn();Jn();Fn();En();zs();va=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Us=(a,r,e)=>{var s;(s=r.regexLinks)!=null||(r.regexLinks=new RegExp(String.raw`^\s*(?:${r.protocol}|//)`,"iu"));let t=r.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,n=a.split("[["),i=n.shift();for(let o=0;o<n.length;o++){let l=!1,p,g,d,c,m=n[o],h=t.exec(m);if(h)[,p,g,d,c]=h,c.startsWith("]")&&(d!=null&&d.includes("["))&&(d+="]",c=c.slice(1));else{let N=va.exec(m);N&&(l=!0,[,p,g,d]=N)}if(p===void 0||r.regexLinks.test(p)||/\0\d+[exhbru]\x7F/u.test(p)){i+=`[[${m}`;continue}let f=p.trim().startsWith(":");if(f&&l){i+=`[[${m}`;continue}let v=b.normalizeTitle(p,0,!1,r,!0,!0,!0),{ns:y,valid:S,interwiki:w}=v;if(S){if(l){if(w||y!==6){i+=`[[${m}`;continue}let N=!1;for(o++;o<n.length;o++){let q=n[o],z=q.split("]]");if(z.length>2){N=!0,d+=`[[${z[0]}]]${z[1]}`,c=z.slice(2).join("]]");break}else if(z.length===2)d+=`[[${z[0]}]]${z[1]}`;else{d+=`[[${q}`;break}}if(d=Us(d,r,e),!N){i+=`[[${p}${g}${d}`;continue}}}else{i+=`[[${m}`;continue}d&&(d=Xn(d,r,e));let L=Bt;f||(!w&&y===6?(d&&(d=Kn(d,r,e,!0)),L=Rt):!w&&y===14&&(L=en)),d===void 0&&g&&(d=""),i+=`\0${e.length}l\x7F${c}`,new L(p,d,r,e,g)}return i}});var Qs={};le(Qs,{parseMagicLinks:()=>Aa});var Xs,Ds,Hs,Vs,Aa,Ks=k(()=>{"use strict";Q();Dr();Xs=String.raw`[${be}\t]| |�*160;|�*a0;`,Ds=`(?:${Xs})+`,Hs=`(?:${Xs}|-)`,Vs=String.raw`(?:RFC|PMID)${Ds}\d+\b|ISBN${Ds}(?:97[89]${Hs}?)?(?:\d${Hs}?){9}[\dx]\b`,Aa=(a,r,e)=>{if(!r.regexMagicLinks)try{r.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${r.protocol})(${Ce}${$e})|${Vs})`,"giu")}catch(t){r.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${r.protocol})(${Ce}${$e})|${Vs})`,"giu")}return a.replace(r.regexMagicLinks,(t,n,i)=>{let s=n?t.slice(n.length):t;if(i){let o="",l=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(o=s.slice(l.index),s=s.slice(0,l.index));let p=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,g=p.exec(s);if(g){let d=1;g[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,g.index))&&(d=2),o=s.slice(g.index+d)+o,s=s.slice(0,g.index+d)}return o.length>=i.length?t:(new Fe(s,void 0,r,e),`${n}\0${e.length-1}w\x7F${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new Fe(s,"magic-link",r,e),`${n}\0${e.length-1}i\x7F`})}});var Js,Ys=k(()=>{"use strict";Js=(a,r)=>a.startsWith(r)?r.length:[...r].findIndex((e,t)=>e!==a[t])});var tn,Zs=k(()=>{"use strict";Dn();tn=class extends zt{get type(){return"list"}}});var eo={};le(eo,{parseList:()=>Sa});var Sa,to=k(()=>{"use strict";Ys();Zs();Hn();Sa=(a,r,e,t)=>{let n=/^((?:\0\d+[cno]\x7F)*)([;:*#]+\s*)/u.exec(a);if(!n)return r.lastPrefix="",a;let[i,s,o]=n,l=o.replace(/;/gu,":"),p=Js(l,r.lastPrefix),g=(p>1?o.slice(p-1):o).split(/(?=;)/u),d=g[0].startsWith(";"),c=g.length-(d?0:1);if(p>1){let B=o.slice(0,p-1);d?g.unshift(B):g[0]=B+g[0]}r.lastPrefix=l;let m=s+g.map((B,V)=>`\0${t.length+V}d\x7F`).join("")+a.slice(i.length);for(let B of g)new tn(B,e,t);if(!c)return m;let{html:[h]}=e,f=/:+|-\{|\0\d+[xq]\x7F/gu,v=f,y=v.exec(m),S=0,w=!1,L=!1,N=0,q=(B,V)=>(new Ut(B,e,t),`${m.slice(0,V)}\0${t.length-1}d\x7F${m.slice(V+B.length)}`),z=B=>{B?S&&S--:S++};for(;y&&c;){let{0:B,index:V}=y;if(B==="-{"){if(!N){let{lastIndex:X}=v;v=/-\{|\}-/gu,v.lastIndex=X}N++}else if(B==="}-"){if(N--,!N){let{lastIndex:X}=v;v=f,v.lastIndex=X}}else if(B.endsWith("x\x7F")){let{name:X,closing:Y,selfClosing:D}=t[Number(B.slice(1,-2))];(!D||h.includes(X))&&z(Y)}else if(B.endsWith("q\x7F")){let{bold:X,italic:Y}=t[Number(B.slice(1,-2))];X&&(z(w),w=!w),Y&&(z(L),L=!L)}else if(S===0){if(B.length>=c)return q(B.slice(0,c),V);c-=B.length,v.lastIndex=V+4+String(t.length).length,m=q(B,V)}y=v.exec(m)}return m}});var ro,Be,rn,no=k(()=>{"use strict";j();K();R();P();Ee();ro=new Set(["A","T","R","D","-","H","N"]),rn=class extends A{constructor(e,t=b.getConfig(),n=[]){super(void 0,t,n,{});x(this,Be);this.append(...e.map(i=>new M(i,"converter-flag",t,n)))}get type(){return"converter-flags"}afterBuild(){T(this,Be,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getGaps(){return 1}getUnknownFlags(){return new Set(u(this,Be).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(u(this,Be).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(u(this,Be).filter(d=>ro.has(d))),o=u(this,Be).filter(d=>!d).length,l=u(this,Be).length-i.size-o,p=super.lint(e,t);if(n.size===l||s.size===l)return p;let g=new E(this,e);for(let[d,c]of this.childNodes.entries()){let m=c.text().trim();if(m&&!n.has(m)&&!i.has(m)&&(n.size>0||!s.has(m))){let h=C(c,g,"no-ignored","invalid conversion flag");n.size===0&&ro.has(m.toUpperCase())?h.fix={range:[h.startIndex,h.endIndex],text:m.toUpperCase(),desc:"uppercase"}:h.suggestions=[{desc:"remove",range:[h.startIndex-(d&&1),h.endIndex],text:""}],p.push(h)}}return p}print(){return super.print({sep:";"})}};Be=new WeakMap});var Wt,io=k(()=>{"use strict";R();P();Ee();Wt=class extends A{get type(){return"converter-rule"}constructor(r,e=!0,t=b.getConfig(),n=[]){super(void 0,t,n);let i=r.indexOf(":"),s=r.slice(0,i).indexOf("=>"),o=s===-1?r.slice(0,i):r.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new M(o,"converter-rule-variant",t,n)),super.insertAt(new M(r.slice(i+1),"converter-rule-to",t,n)),s!==-1&&super.insertAt(new M(r.slice(0,s),"converter-rule-from",t,n),0)):super.insertAt(new M(r,"converter-rule-to",t,n))}toString(r){let{childNodes:e,firstChild:t,lastChild:n}=this;return e.length===3?`${t.toString(r)}=>${e[1].toString(r)}:${n.toString(r)}`:super.toString(r,":")}text(){let{childNodes:r,firstChild:e,lastChild:t}=this;return r.length===3?`${e.text()}=>${r[1].text()}:${t.text()}`:super.text(":")}getGaps(r){return r===0&&this.length===3?2:1}print(){let{childNodes:r}=this;if(r.length===3){let[e,t,n]=r;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${n.print()}</span>`}return super.print({sep:":"})}}});var nn,so=k(()=>{"use strict";Q();R();P();no();io();nn=class extends A{get type(){return"converter"}constructor(r,e,t=b.getConfig(),n=[]){super(void 0,t,n),this.append(new rn(r,t,n));let[i]=e,s=i.includes(":"),o=new Wt(i,s,t,n);s&&o.length===1||!s&&e.length===2&&!oe(e[1]).trim()?this.insertAt(new Wt(e.join(";"),!1,t,n)):this.append(o,...e.slice(1).map(l=>new Wt(l,!0,t,n)))}toString(r){let{childNodes:[e,...t]}=this;return`-{${e.toString(r)}${e.length>0?"|":""}${t.map(n=>n.toString(r)).join(";")}}-`}text(){let{childNodes:[r,...e]}=this;return`-{${r.text()}|${ue(e,";")}}-`}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}getGaps(r){return r||this.firstChild.length>0?1:0}print(){let{childNodes:[r,...e]}=this;return`<span class="wpb-converter">-{${r.print()}${r.length>0?"|":""}${Ne(e,{sep:";"})}}-</span>`}}});var oo={};le(oo,{parseConverter:()=>wa});var wa,ao=k(()=>{"use strict";so();wa=(a,r,e)=>{var l;(l=r.regexConverter)!=null||(r.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${r.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"u"));let t=/-\{/gu,n=/-\{|\}-/gu,i=[],s=t,o=s.exec(a);for(;o;){let{0:p,index:g}=o;if(p==="}-"){let d=i.pop(),{length:c}=e,m=a.slice(d.index+2,g),h=m.indexOf("|"),[f,v]=h===-1?[[],m]:[m.slice(0,h).split(";"),m.slice(h+1)],y=v.replace(/(&[#a-z\d]+);/giu,"$1"),S=y.split(r.regexConverter).map(w=>w.replace(/\x01/gu,";"));new nn(f,S,r,e),a=`${a.slice(0,d.index)}\0${c}v\x7F${a.slice(g+2)}`,i.length===0&&(s=t),s.lastIndex=d.index+3+String(c).length}else i.push(o),s=n,s.lastIndex=g+2;o=s.exec(a)}return a}});var sn={};le(sn,{Token:()=>A});var xr,xe,O,U,lt,Gt,br,_,lo,go,po,uo,co,mo,ho,fo,xo,bo,To,yo,Yn,A,P=k(()=>{"use strict";Q();j();R();vi();wi();Yn=class Yn extends wr{constructor(e,t=b.getConfig(),n=[],i){super();x(this,_);x(this,xr,"plain");x(this,xe,0);x(this,O);x(this,U);x(this,lt);x(this,Gt,!1);x(this,br);typeof e=="string"&&this.insertAt(e),T(this,O,t),T(this,U,n),n.push(this)}get type(){return u(this,xr)}set type(e){T(this,xr,e)}parseOnce(e=u(this,xe),t=!1){if(e<u(this,xe)||this.length===0||!this.getAttribute("plain"))return this;if(u(this,xe)>=11)return this;switch(e){case 0:if(this.type==="root"){u(this,U).pop();let n=I(this,_,lo).call(this);t&&(t=!n)}T(this,lt,t),I(this,_,go).call(this,t);break;case 1:I(this,_,po).call(this);break;case 2:I(this,_,uo).call(this);break;case 3:I(this,_,co).call(this);break;case 4:I(this,_,mo).call(this);break;case 5:I(this,_,ho).call(this);break;case 6:I(this,_,fo).call(this);break;case 7:I(this,_,xo).call(this);break;case 8:I(this,_,bo).call(this);break;case 9:I(this,_,To).call(this);break;case 10:I(this,_,yo).call(this)}if(this.type==="root")for(let n of u(this,U))n==null||n.parseOnce(e,t);return vr(this,xe)._++,this}buildFromStr(e,t){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new rr(i);if(isNaN(i.slice(-1)))return u(this,U)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?n.map(String).join(""):t===1?ue(n):n}build(){T(this,xe,11);let{length:e,firstChild:t}=this,n=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&n.includes("\0")&&(this.replaceChildren(...this.buildFromStr(n)),this.normalize(),this.type==="root"))for(let i of u(this,U))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of u(this,U))e==null||e.afterBuild();T(this,Gt,!0)}parse(e=11,t){for(e=Math.min(e,11);u(this,xe)<e;)this.parseOnce(u(this,xe),t);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===Yn;case"config":return u(this,O);case"include":return(t=u(this,lt))!=null?t:!!u(this.getRootNode(),lt);case"accum":return u(this,U);case"built":return u(this,Gt);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":u(this,xe)===0&&this.type==="root"&&u(this,U).shift(),T(this,xe,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let n=typeof e=="string"?new rr(e):e;return super.insertAt(n,t),n.type==="root"&&(n.type="plain"),n}normalizeTitle(e,t=0,n,i,s){return b.normalizeTitle(e,t,u(this,lt),u(this,O),n,i,s)}lint(e=this.getAbsoluteIndex(),t){var i;let n=super.lint(e,t);if(this.type==="root"){let s=new Map,o="category,html-attr#id,ext-attr#id,table-attr#id";for(let c of this.querySelectorAll(o)){let m;if(c.type==="category")m=c.name;else{let h=c.getValue();h&&h!==!0&&(m=`#${h}`)}if(m){let h=s.get(m);h?h.add(c):s.set(m,new Set([c]))}}for(let[c,m]of s)if(m.size>1&&!c.startsWith("#mw-customcollapsible-")){let h=!c.startsWith("#"),f=`duplicated ${h?"category":"id"}`,v=h?"error":"warning";n.push(...[...m].map(y=>{let S=$(y,{start:y.getAbsoluteIndex()},"no-duplicate",f,v);return h&&(S.suggestions=[{desc:"remove",range:[S.startIndex,S.endIndex],text:""}]),S}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,p=this.toString(),g=[],d=l.exec(p);for(;d;){let{1:c,index:m}=d,h=(i=d[2])==null?void 0:i.trim();g.push({line:this.posFromIndex(m).top+(c==="disable-line"?0:1),from:c==="disable"?l.lastIndex:void 0,to:c==="enable"?l.lastIndex:void 0,rules:h?new Set(h.split(",").map(f=>f.trim())):void 0}),d=l.exec(p)}n=n.filter(({rule:c,startLine:m,startIndex:h})=>{let f={pos:0};for(let{line:v,from:y,to:S,rules:w}of g){if(v>m+1)break;if(w&&!w.has(c))continue;if(v===m&&y===void 0&&S===void 0)return!1;y<=h&&y>f.pos?(f.pos=y,f.type="from"):S<=h&&S>f.pos&&(f.pos=S,f.type="to")}return f.type!=="from"})}return n}toString(e,t){return e?super.toString(!0,t):Ie(u(this,br),()=>super.toString(!1,t),n=>{let i=this.getRootNode();i.type==="root"&&u(i,Gt)&&T(this,br,n)})}};xr=new WeakMap,xe=new WeakMap,O=new WeakMap,U=new WeakMap,lt=new WeakMap,Gt=new WeakMap,br=new WeakMap,_=new WeakSet,lo=function(){let{parseRedirect:e}=(Li(),J(Ei)),t=this.firstChild.toString(),n=e(t,u(this,O),u(this,U));return n&&this.setText(n),!!n},go=function(e){let{parseCommentAndExt:t}=(ar(),J(As));this.setText(t(this.firstChild.toString(),u(this,O),u(this,U),e))},po=function(){let{parseBraces:e}=(_r(),J(is)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(t,u(this,O),u(this,U));this.setText(this.type==="root"?n:n.slice(1))},uo=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=($s(),J(Cs));this.setText(e(this.firstChild.toString(),u(this,O),u(this,U)))},co=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(Fs(),J(Ls));this.setText(e(this,u(this,O),u(this,U)))},mo=function(){var t;if((t=u(this,O).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(qs(),J(js));this.setText(e(this,u(this,O),u(this,U)))},ho=function(){let{parseLinks:e}=(Gs(),J(Ws));this.setText(e(this.firstChild.toString(),u(this,O),u(this,U)))},fo=function(){var n;if((n=u(this,O).excludes)!=null&&n.includes("quote"))return;let{parseQuotes:e}=(Qn(),J(_s)),t=this.firstChild.toString().split(`
|
|
31
|
-
`);for(let
|
|
32
|
-
`))},
|
|
33
|
-
`),
|
|
34
|
-
`))},
|
|
18
|
+
`)}getGaps(){return 1}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new R(this,n);return this.image?t.push(...this.childNodes.filter(i=>{let s=i.toString().trim();return i.type==="noinclude"&&s&&!s.startsWith("#")}).map(i=>{let s=C(i,r,"invalid-imagemap","invalid link in <imagemap>");return s.suggestions=[{desc:"remove",range:[s.startIndex-1,s.endIndex],text:""},{desc:"comment",range:[s.startIndex,s.startIndex],text:"# "}],s})):t.push(E(this,r,"invalid-imagemap","<imagemap> without an image")),t}print(){return super.print({sep:`
|
|
19
|
+
`})}}});var Hr,xs=y(()=>{"use strict";q();P();Me();Hr=class extends ie{get type(){return"ext-inner"}lint(n=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if((e==="templatestyles"||e==="section")&&t){let i=E(this,{start:n},"void-ext",b.msg("nothing should be in <$1>",e));return i.fix={range:[n,i.endIndex],text:"",desc:"empty"},[i]}let r=new RegExp(String.raw`<\s*(?:/\s*)${e==="nowiki"?"":"?"}(${e})\b`,"giu");return super.lint(n,r)}}});var Vr={};se(Vr,{NestedToken:()=>jn});var oa,fr,Mt,jn,Xr=y(()=>{"use strict";q();K();dr();Or();P();j();Bn();ze();oa=new Set(["comment","include","arg","template","magic-word"]),jn=class extends v{constructor(e,t,r,i=b.getConfig(),s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=Ze(e,i,s,t)),e&&(e=cr(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,u,g,d)=>{let p=`\0${s.length+1}e\x7F`;return new je(l,u,g,d,i,!1,s),p}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,u)=>(new G(u,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);x(this,fr);x(this,Mt);T(this,fr,[...r]),T(this,Mt,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let r=new R(this,e),i=c(this,Mt)?"includeonly":"noinclude",s=typeof c(this,Mt)=="boolean"?new RegExp(String.raw`^(?:<${i}(?:\s[^>]*)?/?>|</${i}\s*>)$`,"iu"):/^<!--[\s\S]*-->$/u;return[...super.lint(e,t),...this.childNodes.filter(o=>{let{type:l,name:u}=o;if(l==="ext")return!c(this,fr).includes(u);if(oa.has(l))return!1;let g=o.toString().trim();return g&&!s.test(g)}).map(o=>{let l=C(o,r,"no-ignored",b.msg("invalid content in <$1>",this.name));return l.suggestions=[{desc:"remove",range:[l.startIndex,l.endIndex],text:""},{desc:"comment",range:[l.startIndex,l.endIndex],text:`<!--${o.toString()}-->`}],l})]}};fr=new WeakMap,Mt=new WeakMap});var bs,Ts,qn,aa,je,Bn=y(()=>{"use strict";q();K();P();Lr();j();kn();Pr();Qi();wn();os();hs();fs();xs();bs=(a,n)=>{let e=new Set(a);return e.delete(n),[...e]};Ts=[$t()];je=class extends(aa=Ct){get type(){return"ext"}constructor(n,e,t,r,i=b.getConfig(),s=!1,o=[]){var p;let l=n.toLowerCase(),u=new Ge(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),g={...i,ext:bs(i.ext,l),excludes:[...(p=i.excludes)!=null?p:[]]},d;switch(g.inExt=!0,l){case"tab":g.ext=bs(g.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":l==="poem"&&g.excludes.push("heading"),d=new v(t,g,o);break;case"pre":d=new jr(t,g,o);break;case"dynamicpagelist":d=new Lt(s,t,g,o);break;case"inputbox":g.excludes.push("heading"),d=new Mr(s,t,g,o);break;case"references":{let{NestedToken:h}=(Xr(),Q(Vr));g.excludes.push("heading"),d=new h(t,s,["ref"],g,o);break}case"choose":{let{NestedToken:h}=(Xr(),Q(Vr));d=new h(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],g,o);break}case"combobox":{let{NestedToken:h}=(Xr(),Q(Vr));d=new h(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],g,o);break}case"gallery":d=new Ur(t,g,o);break;case"imagemap":d=new Dr(t,g,o);break;default:d=new Hr(t,g,o)}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(n,u,d,r,i,o),this.seal("closed",!0)}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new R(this,n);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(E(this,r,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(E(this,r,"var-anchor","variable anchor in a section header")),t}};qn=Z(aa),je=te(qn,0,"ExtToken",Ts,je),ee(qn,1,je)});var ys,_n,la,st,ks=y(()=>{"use strict";q();Qe();P();Me();ys=[xe(!1)];st=class extends(la=ie){constructor(e,t,r,i){super(e,r,i);re(this,"closed");this.closed=t}get type(){return"comment"}getAttribute(e){return e==="padding"?4:super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){if(this.closed)return[];let t=E(this,{start:e},"unclosed-comment",b.msg("unclosed $1","HTML comment"));return t.suggestions=[{range:[t.endIndex,t.endIndex],text:"-->",desc:"close"}],[t]}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"<!--",post:this.closed?"-->":""})}};_n=Z(la),st=te(_n,0,"CommentToken",ys,st),ee(_n,1,st)});var Ss={};se(Ss,{parseCommentAndExt:()=>Ze});var As,da,On,ga,pa,ua,vs,Ze,dr=y(()=>{"use strict";Fi();ze();Pi();Bn();ks();As="<onlyinclude>",da="</onlyinclude>",{length:On}=As,ga=new WeakMap,pa=new WeakMap,ua=(a,n)=>{let e=n?ga:pa;if(e.has(a))return e.get(a);let t=n?"includeonly":"(?:no|only)include",r=n?"noinclude":"includeonly",i=new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${t}(?:\s[^>]*)?/?>|</${t}\s*>|<(${a.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${r})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${r}\s*)>|$))`,"giu");return e.set(a,i),i},vs=a=>{let n=a.indexOf(As);return{i:n,j:a.indexOf(da,n+On)}},Ze=(a,n,e,t)=>{if(t){let{i:r,j:i}=vs(a);if(r!==-1&&i!==-1){let s="",o=l=>{new G(l,n,e),s+=`\0${e.length-1}n\x7F`};for(;r!==-1&&i!==-1;){let l=`\0${e.length}e\x7F`;new Er(a.slice(r+On,i),n,e),r>0&&o(a.slice(0,r)),s+=l,a=a.slice(i+On+1),{i:r,j:i}=vs(a)}return a&&o(a),s}}return a.replace(ua(n.ext,t),(r,i,s,o,l,u,g,d,p)=>{let h=e.length,m="n";if(i)m="e",new je(i,s,o,l,n,u,e);else if(r.startsWith("<!--")){m="c";let f=r.endsWith("-->");new st(r.slice(4,f?-3:void 0),f,n,e)}else u?new Ye(u,g,d,p,n,e):new G(r,n,e);return`\0${h}${m}\x7F`})}});var ca,ha,ma,ws,zt,Te,De,Mn,fa,ot,Cs=y(()=>{"use strict";q();H();K();Lr();j();ca=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),ha=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"]),ma=new Set(["strike","big","center","font","tt"]);ws=[$t()];ot=class extends(fa=v){constructor(e,t,r,i,s,o){super(void 0,s,o);x(this,zt);x(this,Te);x(this,De);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),T(this,zt,r),T(this,Te,i),T(this,De,e)}get type(){return"html"}get selfClosing(){return c(this,Te)}get closing(){return c(this,zt)}toString(e){return`<${this.closing?"/":""}${c(this,De)}${super.toString(e)}${c(this,Te)?"/":""}>`}text(){let{closing:e}=this,t=c(this,De)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,Te)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,De).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){var s;let r=super.lint(e,t),i=new R(this,e);if(this.name==="h1"&&!this.closing){let o=E(this,i,"h1","<h1>");o.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],r.push(o)}if(this.closest("table-attrs")){let o=E(this,i,"parsing-order","HTML tag in table attributes");o.fix={desc:"remove",range:[e,o.endIndex],text:""},r.push(o)}try{this.findMatchingTag()}catch(o){if(o instanceof SyntaxError){let{message:l}=o,u=l.split(":",1)[0].toLowerCase(),g=E(this,i,"unmatched-tag",u),d={desc:"no self-closing",range:[g.endIndex-2,g.endIndex-1],text:""};switch(u){case"unclosed tag":{let p=(s=this.parentNode)==null?void 0:s.childNodes;ha.has(this.name)&&(p!=null&&p.slice(0,p.indexOf(this)).some(({type:h,name:m})=>h==="html"&&m===this.name))?g.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(g.severity="warning");break}case"unmatched closing tag":{let p=this.closest("magic-word");p&&ca.has(p.name)?g.severity="warning":g.suggestions=[{desc:"remove",range:[e,g.endIndex],text:""}];break}case"tag that is both closing and self-closing":{let{html:[p,,h]}=this.getAttribute("config"),m={desc:"open",range:[e+1,e+2],text:""};h.includes(this.name)?g.fix=m:p.includes(this.name)?g.fix=d:g.suggestions=[m,d];break}case"invalid self-closing tag":g.suggestions=[d,{desc:"close",range:[g.endIndex-2,g.endIndex],text:`></${this.name}>`}]}r.push(g)}}return ma.has(this.name)&&r.push(E(this,i,"obsolete-tag","obsolete HTML tag","warning")),(this.name==="b"||this.name==="strong")&&this.closest("heading-title")&&r.push(E(this,i,"bold-header","bold in section header","warning")),r}findMatchingTag(){let{html:[e,t,r]}=this.getAttribute("config"),{name:i,parentNode:s,closing:o}=this,l=xi(this.toString());if(o&&(c(this,Te)||r.includes(i)))throw new SyntaxError(`Tag that is both closing and self-closing: ${l}`);if(r.includes(i)||c(this,Te)&&t.includes(i))return this;if(c(this,Te)&&e.includes(i))throw new SyntaxError(`Invalid self-closing tag: ${l}`);if(!s)return;let{childNodes:u}=s,g=u.indexOf(this),d=o?u.slice(0,g).reverse():u.slice(g+1),p=o?-1:1;for(let h of d)if(!(!h.is("html")||h.name!==i)&&(c(h,zt)?p--:p++,p===0))return h;throw new SyntaxError(`${o?"Unmatched closing":"Unclosed"} tag: ${l}`)}print(){return super.print({pre:`<${this.closing?"/":""}${c(this,De)}`,post:`${c(this,Te)?"/":""}>`})}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{closing:this.closing,selfClosing:c(this,Te)}),r}};Mn=Z(fa),zt=new WeakMap,Te=new WeakMap,De=new WeakMap,ot=te(Mn,0,"HtmlToken",ws,ot),ee(Mn,1,ot)});var $s={};se($s,{parseHtml:()=>ba});var xa,ba,Ns=y(()=>{"use strict";Pr();Cs();xa=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,ba=(a,n,e)=>{var s;let{html:t}=n;(s=n.htmlElements)!=null||(n.htmlElements=new Set([...t[0],...t[1],...t[2]]));let r=a.split("<"),i=r.shift();for(let o of r){let l=xa.exec(o),u=l==null?void 0:l[2],g=u==null?void 0:u.toLowerCase();if(!l||!n.htmlElements.has(g)){i+=`<${o}`;continue}let[,d,,p="",h,m]=l,{length:f}=e,k=new Ge(p,"html-attrs",g,n,e),A=k.getAttr("itemprop");if(g==="meta"&&(A===void 0||k.getAttr("content")===void 0)||g==="link"&&(A===void 0||k.getAttr("href")===void 0)){i+=`<${o}`,e.length=f;continue}i+=`\0${e.length}x\x7F${m}`,new ot(u,k,d==="/",h==="/>",n,e)}return i}});var Wt,zn=y(()=>{"use strict";Lr();P();j();At();Pr();Wt=class extends $t(1)(v){constructor(n,e,t,r,i=b.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new be(e,n,"table-syntax",i,s,{}),new Ge(r,"table-attrs",t,i,s))}}});var ye,xr,br,Wn,Ut,Un=y(()=>{"use strict";q();K();P();j();zn();Ut=class extends Wt{constructor(e,t,r=b.getConfig(),i=[]){var u;let s=/\||\0\d+!\x7F/u.exec(t!=null?t:""),o=s?t.slice(0,s.index):"";/\[\[|-\{/u.test(o)&&(s=null,o="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",o,r,i);x(this,br);x(this,ye,"");x(this,xr);s&&([Sr(this,ye)._]=s);let l=new v(t==null?void 0:t.slice(((u=s==null?void 0:s.index)!=null?u:NaN)+c(this,ye).length),r,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 N(this,br,Wn).call(this).subtype}afterBuild(){c(this,ye).includes("\0")&&T(this,ye,this.buildFromStr(c(this,ye),0)),super.afterBuild()}toString(e){let{childNodes:[t,r,i]}=this;return t.toString(e)+r.toString(e)+c(this,ye)+i.toString(e)}text(){let{childNodes:[e,t,r]}=this;return e.text()+t.text()+c(this,ye)+r.text()}getGaps(e){return e===1?c(this,ye).length:0}lint(e=this.getAbsoluteIndex(),t){let r=super.lint(e,t),i=new R(this,e+this.getRelativeIndex(this.length-1));for(let s of this.lastChild.childNodes)if(s.type==="text"){let{data:o}=s;if(o.includes("|")){let l=o.includes("||"),u=C(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let g={caption:"|+",td:"|",th:"!"}[this.subtype];u.fix={range:[u.startIndex,u.endIndex],text:o.replace(/\|\|/gu,`
|
|
20
|
+
${g}`),desc:"newline"}}else u.suggestions=[{desc:"escape",range:[u.startIndex,u.endIndex],text:o.replace(/\|/gu,"|")}];r.push(u)}}return r}isIndependent(){return this.firstChild.text().startsWith(`
|
|
21
|
+
`)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,r]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${c(this,ye)}${r.print()}</span>`}json(e,t=this.getAbsoluteIndex()){let r=super.json(void 0,t);return Object.assign(r,{subtype:this.subtype,rowspan:this.rowspan,colspan:this.colspan}),r}};ye=new WeakMap,xr=new WeakMap,br=new WeakSet,Wn=function(){return Ee(c(this,xr),()=>{var o;let e=this.firstChild.text(),t=e.slice(-1),r="td";if(t==="!"?r="th":t==="+"&&(r="caption"),this.isIndependent())return{subtype:r};let{previousSibling:i}=this;return{...N(o=i,br,Wn).call(o)}},e=>{T(this,xr,e)})}});var Gt,Gn=y(()=>{"use strict";q();zn();Un();Gt=class extends Wt{lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=this.childNodes.find(({type:l})=>l==="table-inter");if(!r)return t;let i=r.childNodes.find(l=>l.text().trim()),s=/^\s*(?:!|\{\{\s*![!-]?\s*\}\})/u;if(!i||s.test(i.toString())||i.is("arg")&&s.test(i.default||""))return t;if(i.is("magic-word"))try{if(i.getPossibleValues().every(l=>s.test(l.text())))return t}catch(l){}let o=C(r,{start:n},"fostered-content","content to be moved out from the table");return o.severity=i.type==="template"?"warning":"error",o.startIndex++,o.startLine++,o.startCol=0,t.push(o),t}getRowCount(){return Number(this.childNodes.some(n=>n instanceof Ut&&n.isIndependent()&&!n.firstChild.text().endsWith("+")))}}});var Ta,ya,ka,Dn,Qr,Is=y(()=>{"use strict";q();Ae();K();P();Gn();At();Ta=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u,ya=(a,n)=>new Array(a).fill(void 0).map((e,t)=>n(t)),ka=({type:a})=>a==="tr"||a==="table-syntax",Dn=class extends Array{},Qr=class extends Gt{get type(){return"table"}get closed(){return this.lastChild.type==="table-syntax"}constructor(n,e,t,r){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,n,"table",e,t,r,{})}lint(n=this.getAbsoluteIndex(),e){let t=super.lint(n,e),r=new R(this,n);this.closed||t.push(C(this.firstChild,r,"unclosed-table",b.msg("unclosed $1","table")));let i=this.getLayout(),{length:s}=i;if(s>1){let o=1,l=1/0,u=0;for(;u<s;u++){let g=i[u],d=g.length;if(d<o)break;d<l&&(l=d);let p=g.indexOf(g[d-1])+1;if(p>l)break;p>o&&(o=p)}if(u<s){let g=C(this.getNthRow(u),r,"table-layout","inconsistent table layout","warning");g.startIndex++,g.startLine++,g.startCol=0,t.push(g)}}return t}close(n=`
|
|
22
|
+
|}`,e){let t=this.getAttribute("config"),r=this.getAttribute("accum"),i=e?[n]:b.parse(n,this.getAttribute("include"),2,t).childNodes;oe.run(()=>{let s=new be(void 0,Ta,"table-syntax",t,r);super.insertAt(s)}),this.lastChild.replaceChildren(...i)}getLayout(n){let e=this.getAllRows(),{length:t}=e,r=new Dn(...ya(t,()=>[]));for(let[i,s]of r.entries()){let o=0,l=0,u;for(let g of e[i].childNodes.slice(2))if(g.type==="td"){if(g.isIndependent()&&(u=g.subtype!=="caption"),u){let d={row:i,column:o},{rowspan:p,colspan:h}=g;for(o++;s[l];)l++;for(let m=i;m<Math.min(i+p,t);m++)for(let f=l;f<l+h;f++)r[m][f]=d;l+=h}}else if(ka(g))break}return r}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(n=>n.type==="tr"&&n.getRowCount()>0)]}getNthRow(n,e,t){let r=super.getRowCount();if(n===0&&r)return this;r&&n--;for(let i of this.childNodes.slice(2)){let{type:s}=i;if(s==="tr"&&i.getRowCount()&&(n--,n<0))return i}}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.closed=this.closed,t}}});var Kr,Es=y(()=>{"use strict";Gn();Kr=class extends Gt{get type(){return"tr"}constructor(n,e,t,r){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,n,"tr",e,t,r)}}});var Dt,Hn=y(()=>{"use strict";Me();Dt=class extends ie{get indent(){return this.innerText.split(":").length-1}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{indent:r}=this;return r&&(t.indent=r),t}}});var Ht,Vn=y(()=>{"use strict";Hn();Ht=class extends Dt{get type(){return"dd"}}});var Fs={};se(Fs,{parseTable:()=>Aa});var va,Ls,Aa,Rs=y(()=>{"use strict";j();Is();Es();Un();Vn();va=a=>a.lastChild.constructor!==v,Ls=(a,n)=>a.type==="td"?n.pop():a,Aa=({firstChild:{data:a},type:n,name:e},t,r)=>{let i=[],s=a.split(`
|
|
23
|
+
`),o=n==="root"||n==="parameter-value"||n==="ext-inner"&&e==="poem"?"":`
|
|
24
|
+
${s.shift()}`,l,u=(g,d)=>{if(!d){o+=g;return}let{lastChild:p}=d;if(va(d)){let h=new v(g,t,r);h.type="table-inter",h.setAttribute("stage",3),d.insertAt(h)}else p.setText(p.toString()+g)};for(let g of s){l=i.pop();let[d]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(g),p=g.slice(d.length),h=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(p);if(h){for(;l&&l.type!=="td";)l=i.pop();let[,w,$,F,B]=h;w&&new Ht(w,t,r),u(`
|
|
25
|
+
${d}${w&&`\0${r.length-1}d\x7F`}${$}\0${r.length}b\x7F`,l),i.push(...l?[l]:[],new Qr(F,B,t,r));continue}else if(!l){o+=`
|
|
26
|
+
${g}`;continue}let m=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(p);if(!m){u(`
|
|
27
|
+
${g}`,l),i.push(l);continue}let[,f,k,A,S]=m;if(f){for(;l.type!=="table";)l=i.pop();l.close(`
|
|
28
|
+
${d}${f}`,!0),u(S,i[i.length-1])}else if(k){l=Ls(l,i),l.type==="tr"&&(l=i.pop());let w=new Kr(`
|
|
29
|
+
${d}${k}`,S,t,r);i.push(l,w),l.insertAt(w)}else{l=Ls(l,i);let w=A==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,$=w.exec(S),F=0,B=`
|
|
30
|
+
${d}${A}`,_=L=>{let X=new Ut(B,S.slice(F,$==null?void 0:$.index),t,r);return L.insertAt(X),X};for(;$;)_(l),{lastIndex:F}=w,[B]=$,$=w.exec(S);i.push(l,_(l))}}return o.slice(1)}});var Jr,Ps=y(()=>{"use strict";Me();Jr=class extends ie{get type(){return"hr"}}});var js,Xn,Sa,at,Bs=y(()=>{"use strict";Qe();P();Me();js=[xe()];at=class extends(Sa=ie){get type(){return"double-underscore"}constructor(n,e,t=b.getConfig(),r){super(n,t,r)}getAttribute(n){return n==="padding"?2:super.getAttribute(n)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Xn=Z(Sa),at=te(Xn,0,"DoubleUnderscoreToken",js,at),ee(Xn,1,at)});var qs={};se(qs,{parseHrAndDoubleUnderscore:()=>wa});var wa,_s=y(()=>{"use strict";Ps();Bs();Cn();wa=({firstChild:{data:a},type:n,name:e},t,r)=>{var l,u,g;let{doubleUnderscore:[i,s,o]}=t;return(l=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i)),(u=t.sensitiveDoubleUnderscore)!=null||(t.sensitiveDoubleUnderscore=new Set(s)),(g=t.regexHrAndDoubleUnderscore)!=null||(t.regexHrAndDoubleUnderscore=new RegExp(`__(${[...i,...s].join("|")})__`,"giu")),n!=="root"&&(n!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(d,p,h)=>(new Jr(h,t,r),`${p}\0${r.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(d,p)=>{var k;let h=t.sensitiveDoubleUnderscore.has(p),m=p.toLowerCase(),f=t.insensitiveDoubleUnderscore.has(m);return h||f?(new at(p,h,t,r),`\0${r.length-1}${f&&((k=o==null?void 0:o[m])!=null?k:m)==="toc"?"u":"n"}\x7F`):d}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(d,p,h,m,f)=>{let k=`${p}\0${r.length}h\x7F`;return new Rt(h.length,[m,f],t,r),k}),n==="root"||n==="ext-inner"&&e==="poem"?a:a.slice(1)}});var Yr,Os=y(()=>{"use strict";q();K();P();Me();Yr=class extends ie{get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}text(){let{parentNode:n,innerText:e}=this;return(n==null?void 0:n.type)==="image-parameter"&&n.name!=="caption"?"":e}lint(n=this.getAbsoluteIndex()){let{previousSibling:e,nextSibling:t,bold:r}=this,i=b.msg('lonely "$1"',"'"),s=[],o=new R(this,n),l=(u,g,d)=>[{desc:"escape",range:[u,g],text:"'".repeat(d)},{desc:"remove",range:[u,g],text:""}];if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){let u=E(this,o,"lonely-apos",i),{startIndex:g,startLine:d,startCol:p}=u,[,{length:h}]=/(?:^|[^'])('+)$/u.exec(e.data),m=n-h;s.push({...u,startIndex:m,endIndex:g,endLine:d,startCol:p-h,endCol:p,suggestions:l(m,g,h)})}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){let u=E(this,o,"lonely-apos",i),{endIndex:g,endLine:d,endCol:p}=u,[{length:h}]=/^'+/u.exec(t.data),m=g+h;s.push({...u,startIndex:g,endIndex:m,startLine:d,startCol:p,endCol:p+h,suggestions:l(g,m,h)})}if(r&&this.closest("heading-title")){let u=E(this,o,"bold-header","bold in section header","warning");u.suggestions=[{desc:"remove",range:[n,n+3],text:""}],s.push(u)}return s}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{bold:this.bold,italic:this.italic}),t}}});var Ms={};se(Ms,{parseQuotes:()=>Qn});var Qn,Kn=y(()=>{"use strict";Os();Qn=(a,n,e,t)=>{var d;let r=a.split(/('{2,})/u),{length:i}=r;if(i===1)return a;let s=0,o=0,l,u,g;for(let p=1;p<i;p+=2){let h=r[p].length;switch(h){case 2:o++;break;case 4:r[p-1]+="'",r[p]="'''";case 3:if(s++,l!==void 0)break;r[p-1].endsWith(" ")?u===void 0&&g===void 0&&(g=p):r[p-1].slice(-2,-1)===" "?l=p:u!=null||(u=p);break;default:r[p-1]+="'".repeat(h-5),r[p]="'''''",o++,s++}}if(o%2===1&&s%2===1){let p=(d=l!=null?l:u)!=null?d:g;p!==void 0&&(r[p]="''",r[p-1]+="'")}for(let p=1;p<i;p+=2)new Yr(r[p],n,e),r[p]=`\0${e.length-1}q\x7F`;return r.join("")}});var zs={};se(zs,{parseExternalLinks:()=>Jn});var Jn,Yn=y(()=>{"use strict";H();Pn();Gr();Jn=(a,n,e,t)=>{var r;return(r=n.regexExternalLinks)!=null||(n.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${n.protocol}|//)${$e}|\0\d+m\x7F)${Ne}(?=[[\]<>"\t${ve}]|\0\d))([${ve}]*(?![${ve}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(n.regexExternalLinks,(i,s,o,l)=>{let{length:u}=e,g=/&[lg]t;/u.exec(s);return g&&(o="",l=s.slice(g.index)+o+l,s=s.slice(0,g.index)),t?(new Re(s,"ext-link-url",n,e),`[\0${u}f\x7F${o}${l}]`):(new Ot(s,o,l,n,e),`\0${u}w\x7F`)})}});var Zr,Ws=y(()=>{"use strict";H();or();Zr=class extends we{get type(){return"category"}get sortkey(){let{childNodes:[,n]}=this;return n&&Xe(n.text())}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:r}=this;return r&&(t.sortkey=r),t}}});var Gs={};se(Gs,{parseLinks:()=>Us});var Ca,Us,Ds=y(()=>{"use strict";P();Kn();Yn();Rn();En();Ws();Ca=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Us=(a,n,e,t)=>{var o;(o=n.regexLinks)!=null||(n.regexLinks=new RegExp(String.raw`^\s*(?:${n.protocol}|//)`,"iu"));let r=n.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,i=a.split("[["),s=i.shift();for(let l=0;l<i.length;l++){let u=!1,g,d,p,h,m=i[l],f=r.exec(m);if(f)[,g,d,p,h]=f,h.startsWith("]")&&(p!=null&&p.includes("["))&&(p+="]",h=h.slice(1));else{let $=Ca.exec(m);$&&(u=!0,[,g,d,p]=$)}if(g===void 0||n.regexLinks.test(g)||/\0\d+[exhbru]\x7F/u.test(g)){s+=`[[${m}`;continue}let k=g.trim().startsWith(":");if(k&&u){s+=`[[${m}`;continue}let{ns:A,valid:S}=b.normalizeTitle(g,0,!1,n,!0,!0,!0,!0);if(S){if(u){if(A!==6){s+=`[[${m}`;continue}let $=!1;for(l++;l<i.length;l++){let F=i[l],B=F.split("]]");if(B.length>2){$=!0,p+=`[[${B[0]}]]${B[1]}`,h=B.slice(2).join("]]");break}else if(B.length===2)p+=`[[${B[0]}]]${B[1]}`;else{p+=`[[${F}`;break}}if(p=Us(p,n,e,t),!$){s+=`[[${g}${d}${p}`;continue}}}else{s+=`[[${m}`;continue}p&&(p=Qn(p,n,e,t));let w=_t;k||(A===6?(p&&(p=Jn(p,n,e,!0)),w=Bt):A===14&&(w=Zr)),p===void 0&&d&&(p=""),s+=`\0${e.length}l\x7F${h}`,new w(g,p,n,e,d)}return s}});var Ks={};se(Ks,{parseMagicLinks:()=>$a});var Qs,Hs,Vs,Xs,$a,Js=y(()=>{"use strict";H();Gr();Qs=String.raw`[${ve}\t]| |�*160;|�*a0;`,Hs=`(?:${Qs})+`,Vs=`(?:${Qs}|-)`,Xs=String.raw`(?:RFC|PMID)${Hs}\d+\b|ISBN${Hs}(?:97[89]${Vs}?)?(?:\d${Vs}?){9}[\dx]\b`,$a=(a,n,e)=>{if(!n.regexMagicLinks)try{n.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${n.protocol})(${$e}${Ne})|${Xs})`,"giu")}catch(t){n.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${n.protocol})(${$e}${Ne})|${Xs})`,"giu")}return a.replace(n.regexMagicLinks,(t,r,i)=>{let s=r?t.slice(r.length):t;if(i){let o="",l=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(o=s.slice(l.index),s=s.slice(0,l.index));let u=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,g=u.exec(s);if(g){let d=1;g[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,g.index))&&(d=2),o=s.slice(g.index+d)+o,s=s.slice(0,g.index+d)}return o.length>=i.length?t:(new Re(s,void 0,n,e),`${r}\0${e.length-1}w\x7F${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new Re(s,"magic-link",n,e),`${r}\0${e.length-1}i\x7F`})}});var Ys,Zs=y(()=>{"use strict";Ys=(a,n)=>a.startsWith(n)?n.length:[...n].findIndex((e,t)=>e!==a[t])});var en,eo=y(()=>{"use strict";Hn();en=class extends Dt{get type(){return"list"}}});var to={};se(to,{parseList:()=>Na});var Na,ro=y(()=>{"use strict";Zs();eo();Vn();Na=(a,n,e,t)=>{let r=/^((?:\0\d+[cno]\x7F)*)([;:*#]+\s*)/u.exec(a);if(!r)return n.lastPrefix="",a;let[i,s,o]=r,l=o.replace(/;/gu,":"),u=Ys(l,n.lastPrefix),g=(u>1?o.slice(u-1):o).split(/(?=;)/u),d=g[0].startsWith(";"),p=g.length-(d?0:1);if(u>1){let L=o.slice(0,u-1);d?g.unshift(L):g[0]=L+g[0]}n.lastPrefix=l;let h=s+g.map((L,X)=>`\0${t.length+X}d\x7F`).join("")+a.slice(i.length);for(let L of g)new en(L,e,t);if(!p)return h;let{html:[m]}=e,f=/:+|-\{|\0\d+[xq]\x7F/gu,k=f,A=k.exec(h),S=0,w=!1,$=!1,F=0,B=(L,X)=>(new Ht(L,e,t),`${h.slice(0,X)}\0${t.length-1}d\x7F${h.slice(X+L.length)}`),_=L=>{L?S&&S--:S++};for(;A&&p;){let{0:L,index:X}=A;if(L==="-{"){if(!F){let{lastIndex:J}=k;k=/-\{|\}-/gu,k.lastIndex=J}F++}else if(L==="}-"){if(F--,!F){let{lastIndex:J}=k;k=f,k.lastIndex=J}}else if(L.endsWith("x\x7F")){let{name:J,closing:ue,selfClosing:ce}=t[Number(L.slice(1,-2))];(!ce||m.includes(J))&&_(ue)}else if(L.endsWith("q\x7F")){let{bold:J,italic:ue}=t[Number(L.slice(1,-2))];J&&(_(w),w=!w),ue&&(_($),$=!$)}else if(S===0){if(L.length>=p)return B(L.slice(0,p),X);p-=L.length,k.lastIndex=X+4+String(t.length).length,h=B(L,X)}A=k.exec(h)}return h}});var no,Be,tn,io=y(()=>{"use strict";q();K();P();j();Le();no=new Set(["A","T","R","D","-","H","N"]),tn=class extends v{constructor(e,t=b.getConfig(),r=[]){super(void 0,t,r,{});x(this,Be);this.append(...e.map(i=>new z(i,"converter-flag",t,r)))}get type(){return"converter-flags"}afterBuild(){T(this,Be,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getGaps(){return 1}getUnknownFlags(){return new Set(c(this,Be).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,Be).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let r=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,Be).filter(d=>no.has(d))),o=c(this,Be).filter(d=>!d).length,l=c(this,Be).length-i.size-o,u=super.lint(e,t);if(r.size===l||s.size===l)return u;let g=new R(this,e);for(let[d,p]of this.childNodes.entries()){let h=p.text().trim();if(h&&!r.has(h)&&!i.has(h)&&(r.size>0||!s.has(h))){let m=C(p,g,"no-ignored","invalid conversion flag");r.size===0&&no.has(h.toUpperCase())?m.fix={range:[m.startIndex,m.endIndex],text:h.toUpperCase(),desc:"uppercase"}:m.suggestions=[{desc:"remove",range:[m.startIndex-(d&&1),m.endIndex],text:""}],u.push(m)}}return u}print(){return super.print({sep:";"})}};Be=new WeakMap});var Vt,so=y(()=>{"use strict";P();j();Le();Vt=class extends v{get type(){return"converter-rule"}get variant(){var n,e;return(e=(n=this.childNodes[this.length-2])==null?void 0:n.text().trim())!=null?e:""}constructor(n,e=!0,t=b.getConfig(),r=[]){super(void 0,t,r);let i=n.indexOf(":"),s=n.slice(0,i).indexOf("=>"),o=s===-1?n.slice(0,i):n.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new z(o,"converter-rule-variant",t,r)),super.insertAt(new z(n.slice(i+1),"converter-rule-to",t,r)),s!==-1&&super.insertAt(new z(n.slice(0,s),"converter-rule-from",t,r),0)):super.insertAt(new z(n,"converter-rule-to",t,r))}toString(n){let{childNodes:e,firstChild:t,lastChild:r}=this;return e.length===3?`${t.toString(n)}=>${e[1].toString(n)}:${r.toString(n)}`:super.toString(n,":")}text(){let{childNodes:n,firstChild:e,lastChild:t}=this;return n.length===3?`${e.text()}=>${n[1].text()}:${t.text()}`:super.text(":")}getGaps(n){return n===0&&this.length===3?2:1}print(){let{childNodes:n}=this;if(n.length===3){let[e,t,r]=n;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${r.print()}</span>`}return super.print({sep:":"})}json(n,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.variant=this.variant,t}}});var rn,oo=y(()=>{"use strict";H();P();j();io();so();rn=class extends v{get type(){return"converter"}constructor(n,e,t=b.getConfig(),r=[]){super(void 0,t,r),this.append(new tn(n,t,r));let[i]=e,s=i.includes(":"),o=new Vt(i,s,t,r);s&&o.length===1||!s&&e.length===2&&!ne(e[1]).trim()?this.insertAt(new Vt(e.join(";"),!1,t,r)):this.append(o,...e.slice(1).map(l=>new Vt(l,!0,t,r)))}toString(n){let{childNodes:[e,...t]}=this;return`-{${e.toString(n)}${e.length>0?"|":""}${t.map(r=>r.toString(n)).join(";")}}-`}text(){let{childNodes:[n,...e]}=this;return`-{${n.text()}|${fe(e,";")}}-`}getAttribute(n){return n==="padding"?2:super.getAttribute(n)}getGaps(n){return n||this.firstChild.length>0?1:0}print(){let{childNodes:[n,...e]}=this;return`<span class="wpb-converter">-{${n.print()}${n.length>0?"|":""}${Ie(e,{sep:";"})}}-</span>`}}});var ao={};se(ao,{parseConverter:()=>Ia});var Ia,lo=y(()=>{"use strict";oo();Ia=(a,n,e)=>{var l;(l=n.regexConverter)!=null||(n.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${n.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"u"));let t=/-\{/gu,r=/-\{|\}-/gu,i=[],s=t,o=s.exec(a);for(;o;){let{0:u,index:g}=o;if(u==="}-"){let d=i.pop(),{length:p}=e,h=a.slice(d.index+2,g),m=h.indexOf("|"),[f,k]=m===-1?[[],h]:[h.slice(0,m).split(";"),h.slice(m+1)],A=k.replace(/(&[#a-z\d]+);/giu,"$1"),S=A.split(n.regexConverter).map(w=>w.replace(/\x01/gu,";"));new rn(f,S,n,e),a=`${a.slice(0,d.index)}\0${p}v\x7F${a.slice(g+2)}`,i.length===0&&(s=t),s.lastIndex=d.index+3+String(p).length}else i.push(o),s=r,s.lastIndex=g+2;o=s.exec(a)}return a}});var kr={};se(kr,{Token:()=>v});var Tr,ke,O,U,lt,Xt,yr,M,go,po,uo,co,ho,mo,fo,xo,bo,To,yo,ko,Zn,v,j=y(()=>{"use strict";H();q();P();vi();wi();Zn=class Zn extends Cr{constructor(e,t=b.getConfig(),r=[],i){super();x(this,M);x(this,Tr,"plain");x(this,ke,0);x(this,O);x(this,U);x(this,lt);x(this,Xt,!1);x(this,yr);typeof e=="string"&&this.insertAt(e),T(this,O,t),T(this,U,r),r.push(this)}get type(){return c(this,Tr)}set type(e){T(this,Tr,e)}parseOnce(e=c(this,ke),t=!1,r){if(e<c(this,ke)||this.length===0||!this.getAttribute("plain"))return this;if(c(this,ke)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,U).pop();let i=N(this,M,go).call(this);t&&(t=!i)}T(this,lt,t),N(this,M,po).call(this,t);break;case 1:N(this,M,uo).call(this);break;case 2:N(this,M,co).call(this);break;case 3:N(this,M,ho).call(this);break;case 4:N(this,M,mo).call(this);break;case 5:N(this,M,fo).call(this,r);break;case 6:N(this,M,xo).call(this,r);break;case 7:N(this,M,bo).call(this);break;case 8:N(this,M,To).call(this);break;case 9:N(this,M,yo).call(this);break;case 10:N(this,M,ko).call(this)}if(this.type==="root")for(let i of c(this,U))i==null||i.parseOnce(e,t,r);return Sr(this,ke)._++,this}buildFromStr(e,t){let r=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new ir(i);if(isNaN(i.slice(-1)))return c(this,U)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?r.map(String).join(""):t===1?fe(r):r}build(){T(this,ke,11);let{length:e,firstChild:t}=this,r=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&r.includes("\0")&&(this.replaceChildren(...this.buildFromStr(r)),this.normalize(),this.type==="root"))for(let i of c(this,U))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,U))e==null||e.afterBuild();T(this,Xt,!0)}parse(e=11,t,r){for(e=Math.min(e,11);c(this,ke)<e;)this.parseOnce(c(this,ke),t,r);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===Zn;case"config":return c(this,O);case"include":return(t=c(this,lt))!=null?t:!!c(this.getRootNode(),lt);case"accum":return c(this,U);case"built":return c(this,Xt);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,ke)===0&&this.type==="root"&&c(this,U).shift(),T(this,ke,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let r=typeof e=="string"?new ir(e):e;super.insertAt(r,t);let{type:i}=r;return i==="root"&&(r.type="plain"),r}normalizeTitle(e,t=0,r,i,s,o){return b.normalizeTitle(e,t,c(this,lt),c(this,O),r,i,s,o)}lint(e=this.getAbsoluteIndex(),t){var i;let r=super.lint(e,t);if(this.type==="root"){let s=new Map,o="category,html-attr#id,ext-attr#id,table-attr#id";for(let p of this.querySelectorAll(o)){let h;if(p.type==="category")h=p.name;else{let m=p.getValue();m&&m!==!0&&(h=`#${m}`)}if(h){let m=s.get(h);m?m.add(p):s.set(h,new Set([p]))}}for(let[p,h]of s)if(h.size>1&&!p.startsWith("#mw-customcollapsible-")){let m=!p.startsWith("#"),f=`duplicated ${m?"category":"id"}`,k=m?"error":"warning";r.push(...[...h].map(A=>{let S=E(A,{start:A.getAbsoluteIndex()},"no-duplicate",f,k);return m&&(S.suggestions=[{desc:"remove",range:[S.startIndex,S.endIndex],text:""}]),S}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,u=this.toString(),g=[],d=l.exec(u);for(;d;){let{1:p,index:h}=d,m=(i=d[2])==null?void 0:i.trim();g.push({line:this.posFromIndex(h).top+(p==="disable-line"?0:1),from:p==="disable"?l.lastIndex:void 0,to:p==="enable"?l.lastIndex:void 0,rules:m?new Set(m.split(",").map(f=>f.trim())):void 0}),d=l.exec(u)}r=r.filter(({rule:p,startLine:h,startIndex:m})=>{let f={pos:0};for(let{line:k,from:A,to:S,rules:w}of g){if(k>h+1)break;if(w&&!w.has(p))continue;if(k===h&&A===void 0&&S===void 0)return!1;A<=m&&A>f.pos?(f.pos=A,f.type="from"):S<=m&&S>f.pos&&(f.pos=S,f.type="to")}return f.type!=="from"})}return r}toString(e,t){return e?super.toString(!0,t):Ee(c(this,yr),()=>super.toString(!1,t),r=>{let i=this.getRootNode();i.type==="root"&&c(i,Xt)&&T(this,yr,r)})}};Tr=new WeakMap,ke=new WeakMap,O=new WeakMap,U=new WeakMap,lt=new WeakMap,Xt=new WeakMap,yr=new WeakMap,M=new WeakSet,go=function(){let{parseRedirect:e}=(Li(),Q(Ei)),t=this.firstChild.toString(),r=e(t,c(this,O),c(this,U));return r&&this.setText(r),!!r},po=function(e){let{parseCommentAndExt:t}=(dr(),Q(Ss));this.setText(t(this.firstChild.toString(),c(this,O),c(this,U),e))},uo=function(){let{parseBraces:e}=(Or(),Q(ss)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,r=e(t,c(this,O),c(this,U));this.setText(this.type==="root"?r:r.slice(1))},co=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(Ns(),Q($s));this.setText(e(this.firstChild.toString(),c(this,O),c(this,U)))},ho=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(Rs(),Q(Fs));this.setText(e(this,c(this,O),c(this,U)))},mo=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(_s(),Q(qs));this.setText(e(this,c(this,O),c(this,U)))},fo=function(e){let{parseLinks:t}=(Ds(),Q(Gs));this.setText(t(this.firstChild.toString(),c(this,O),c(this,U),e))},xo=function(e){var i;if((i=c(this,O).excludes)!=null&&i.includes("quote"))return;let{parseQuotes:t}=(Kn(),Q(Ms)),r=this.firstChild.toString().split(`
|
|
31
|
+
`);for(let s=0;s<r.length;s++)r[s]=t(r[s],c(this,O),c(this,U),e);this.setText(r.join(`
|
|
32
|
+
`))},bo=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("extLink"))return;let{parseExternalLinks:e}=(Yn(),Q(zs));this.setText(e(this.firstChild.toString(),c(this,O),c(this,U)))},To=function(){var t;if((t=c(this,O).excludes)!=null&&t.includes("magicLink"))return;let{parseMagicLinks:e}=(Js(),Q(Ks));this.setText(e(this.firstChild.toString(),c(this,O),c(this,U)))},yo=function(){var u;if((u=c(this,O).excludes)!=null&&u.includes("list"))return;let{parseList:e}=(ro(),Q(to)),{firstChild:t,type:r,name:i}=this,s=t.toString().split(`
|
|
33
|
+
`),o={lastPrefix:""},l=r==="root"||r==="ext-inner"&&i==="poem"?0:1;for(;l<s.length;l++)s[l]=e(s[l],o,c(this,O),c(this,U));this.setText(s.join(`
|
|
34
|
+
`))},ko=function(){if(c(this,O).variants.length>0){let{parseConverter:e}=(lo(),Q(ao));this.setText(e(this.firstChild.toString(),c(this,O),c(this,U)))}};v=Zn});var oe,Pt,fn,Nr,Ae=y(()=>{"use strict";oe={running:!1,run(a){let{running:n}=this;this.running=!0;try{let{Token:e}=(j(),Q(kr)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=n,t}catch(e){throw this.running=n,e}},rev:0},Pt=a=>n=>n.type===a,fn=(a,n,e,t=[])=>{var s,o;let r=a.getChildNodes(),i=r.splice(n,e,...t);for(let l=0;l<t.length;l++){let u=t[l];u.setAttribute("parentNode",a),u.setAttribute("nextSibling",r[n+l+1]),u.setAttribute("previousSibling",r[n+l-1])}return(s=r[n-1])==null||s.setAttribute("nextSibling",r[n]),(o=r[n+t.length])==null||o.setAttribute("previousSibling",r[n+t.length-1]),i},Nr=(a,n)=>{Object.defineProperty(a,"name",{value:n.name})}});var vo={};se(vo,{Title:()=>ei});var vr,Ar,dt,Qt,gt,ei,Ao=y(()=>{"use strict";H();ei=class{constructor(n,e,t,r,i,s){x(this,vr);x(this,Ar);x(this,dt);x(this,Qt);x(this,gt);re(this,"valid");re(this,"encoded",!1);let o=n.trim().startsWith("../");if(i&&n.includes("%"))try{let u=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(n);n=_e(n),this.encoded=u}catch(u){}if(n=Xe(n).replace(/[_ ]+/gu," ").trim(),o)T(this,Qt,0);else{let u=e;n.startsWith(":")&&(u=0,n=n.slice(1).trim());let g=n.split(":");if(g.length>1){let d=g[0].trim().toLowerCase(),p=Object.prototype.hasOwnProperty.call(t.nsid,d)&&t.nsid[d];p&&(u=p,n=g.slice(1).join(":").trim())}T(this,Qt,u)}let l=n.indexOf("#");if(l!==-1){let u=n.slice(l).trim().slice(1);if(u.includes("%"))try{u=_e(u)}catch(g){}T(this,gt,u.replace(/ /gu,"_")),n=n.slice(0,l).trim()}this.valid=!!(n||s&&this.ns===0&&c(this,gt)!==void 0)&&Xe(n)===n&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(o?/^(?:\.\.\/)+(.*)/u.exec(n)[1]:n),this.main=n,T(this,Ar,t.namespaces),T(this,dt,t.articlePath||"/wiki/$1"),c(this,dt).includes("$1")||T(this,dt,c(this,dt)+`${c(this,dt).endsWith("/")?"":"/"}$1`),r||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return c(this,Qt)}get fragment(){return c(this,gt)}get main(){return c(this,vr)}set main(n){n=n.replace(/_/gu," ").trim(),T(this,vr,n&&n[0].toUpperCase()+n.slice(1))}get prefix(){let n=c(this,Ar)[this.ns];return n+(n&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:n}=this,e=n.lastIndexOf(".");return e===-1?void 0:n.slice(e+1).toLowerCase()}getRedirection(){return[!1,(this.prefix+this.main).replace(/ /gu,"_")]}setFragment(n){T(this,gt,n)}getUrl(n){}};vr=new WeakMap,Ar=new WeakMap,dt=new WeakMap,Qt=new WeakMap,gt=new WeakMap});var pt,So,Ea,b,P=y(()=>{ui();Ae();Ti();H();pt={config:dn,i18n:void 0,rules:pi,getConfig(){let{doubleUnderscore:a}=this.config;for(let n=0;n<2;n++)a.length>n+2&&a[n].length===0&&(a[n]=Object.keys(a[n+2]));return{...dn,...this.config,excludes:[]}},msg(a,n=""){var e,t;return a&&((t=(e=this.i18n)==null?void 0:e[a])!=null?t:a).replace("$1",this.msg(n))},normalizeTitle(a,n=0,e,t=pt.getConfig(),r=!1,i,s=!1,o=!1){let{Title:l}=(Ao(),Q(vo)),u;if(i)u=new l(a,n,t,r,s,o);else{let{Token:g}=(j(),Q(kr));u=oe.run(()=>{let d=new g(a,t);d.type="root",d.parseOnce(0,e).parseOnce();let p=new l(d.toString(),n,t,r,s,o);for(let h of["main","fragment"]){let m=p[h];if(m!=null&&m.includes("\0")){let f=d.buildFromStr(m,1);h==="main"?p.main=f:p.setFragment(f)}}return p})}return u},parse(a,n,e=11,t=pt.getConfig()){if(a=ln(a),typeof e!="number"){let s=Array.isArray(e)?e:[e];e=Math.max(...s.map(o=>gi[o]||11))}let{Token:r}=(j(),Q(kr));return oe.run(()=>{let s=new r(a,t);return s.type="root",s.parse(e,n)})},async partialParse(a,n,e,t=pt.getConfig()){let{Token:r}=(j(),Q(kr)),i=typeof setImmediate=="function"?setImmediate:setTimeout,{running:s}=oe;oe.running=!0;let o=new r(ln(a),t);o.type="root";let l=0;return await new Promise(u=>{let g=()=>{n()===a?(l++,i(d,0)):u()},d=()=>{l===12?(o.afterBuild(),u()):(o[l===11?"build":"parseOnce"](l,e),g())};i(d,0)}),oe.running=s,o},createLanguageService(a){}},So={},Ea=new Set(["normalizeTitle","parse","createLanguageService"]);for(let a in pt)Ea.has(a)||(So[a]={enumerable:!1});Object.defineProperties(pt,So);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:pt});b=pt});P();})();
|
|
35
35
|
//# sourceMappingURL=bundle.min.js.map
|