wikiparser-node 1.18.4 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/bundle/bundle-es7.min.js +25 -32
- package/bundle/bundle-lsp.min.js +26 -99
- package/bundle/bundle.min.js +25 -32
- package/config/default.json +49 -3
- package/config/minimum.json +5 -1
- package/data/ext/math.json +660 -0
- package/dist/addon/table.js +24 -5
- package/dist/addon/transclude.js +5 -5
- package/dist/base.d.mts +4 -3
- package/dist/base.d.ts +4 -3
- package/dist/bin/config.js +26 -8
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -1
- package/dist/internal.d.ts +2 -0
- package/dist/lib/document.d.ts +5 -0
- package/dist/lib/document.js +31 -2
- package/dist/lib/element.js +15 -21
- package/dist/lib/lsp.js +104 -42
- package/dist/lib/node.js +21 -24
- package/dist/lib/text.js +3 -4
- package/dist/lib/title.js +2 -1
- package/dist/mixin/attributesParent.js +1 -1
- package/dist/mixin/fixed.d.ts +1 -2
- package/dist/mixin/fixed.js +2 -3
- package/dist/mixin/gapped.d.ts +4 -0
- package/dist/mixin/gapped.js +24 -0
- package/dist/mixin/hidden.js +1 -1
- package/dist/mixin/multiLine.d.ts +4 -0
- package/dist/mixin/multiLine.js +33 -0
- package/dist/mixin/noEscape.js +1 -1
- package/dist/mixin/padded.d.ts +5 -0
- package/dist/mixin/padded.js +24 -0
- package/dist/mixin/singleLine.js +1 -1
- package/dist/mixin/sol.js +1 -1
- package/dist/mixin/syntax.js +3 -3
- package/dist/parser/braces.js +9 -13
- package/dist/parser/commentAndExt.js +18 -2
- package/dist/parser/magicLinks.js +2 -2
- package/dist/parser/selector.js +5 -2
- package/dist/src/arg.js +10 -13
- package/dist/src/atom.js +2 -7
- package/dist/src/attribute.js +6 -6
- package/dist/src/attributes.js +8 -12
- package/dist/src/commented.d.ts +26 -0
- package/dist/src/commented.js +52 -0
- package/dist/src/converter.js +3 -6
- package/dist/src/converterFlags.js +266 -223
- package/dist/src/converterRule.d.ts +2 -2
- package/dist/src/converterRule.js +2 -2
- package/dist/src/extLink.d.ts +2 -3
- package/dist/src/extLink.js +222 -175
- package/dist/src/gallery.d.ts +4 -5
- package/dist/src/gallery.js +177 -144
- package/dist/src/heading.js +11 -11
- package/dist/src/hidden.js +2 -7
- package/dist/src/imageParameter.d.ts +2 -2
- package/dist/src/imageParameter.js +13 -10
- package/dist/src/imagemap.d.ts +2 -2
- package/dist/src/imagemap.js +155 -123
- package/dist/src/imagemapLink.d.ts +2 -2
- package/dist/src/index.js +51 -27
- package/dist/src/link/base.d.ts +2 -3
- package/dist/src/link/base.js +13 -15
- package/dist/src/link/file.d.ts +2 -3
- package/dist/src/link/file.js +3 -3
- package/dist/src/link/galleryImage.d.ts +2 -3
- package/dist/src/link/galleryImage.js +7 -13
- package/dist/src/magicLink.js +7 -9
- package/dist/src/nested.d.ts +2 -2
- package/dist/src/nested.js +4 -7
- package/dist/src/nowiki/comment.js +2 -5
- package/dist/src/nowiki/doubleUnderscore.js +2 -5
- package/dist/src/nowiki/index.d.ts +2 -2
- package/dist/src/nowiki/index.js +2 -1
- package/dist/src/onlyinclude.js +6 -13
- package/dist/src/paramTag/index.d.ts +2 -2
- package/dist/src/paramTag/index.js +102 -66
- package/dist/src/paramTag/inputbox.js +9 -4
- package/dist/src/parameter.d.ts +4 -5
- package/dist/src/parameter.js +13 -13
- package/dist/src/pre.d.ts +4 -5
- package/dist/src/pre.js +8 -17
- package/dist/src/syntax.d.ts +1 -1
- package/dist/src/syntax.js +2 -7
- package/dist/src/table/base.d.ts +2 -2
- package/dist/src/table/base.js +8 -8
- package/dist/src/table/index.js +1 -1
- package/dist/src/table/td.d.ts +3 -3
- package/dist/src/table/td.js +9 -9
- package/dist/src/table/tr.d.ts +2 -2
- package/dist/src/tagPair/ext.js +39 -32
- package/dist/src/tagPair/index.d.ts +1 -1
- package/dist/src/tagPair/index.js +2 -5
- package/dist/src/tagPair/translate.d.ts +38 -0
- package/dist/src/tagPair/translate.js +129 -0
- package/dist/src/transclude.js +6 -7
- package/dist/util/html.js +16 -4
- package/dist/util/lint.js +17 -30
- package/dist/util/sharable.js +29 -1
- package/dist/util/sharable.mjs +31 -3
- package/dist/util/string.js +14 -1
- package/extensions/dist/base.js +1 -1
- package/extensions/dist/lsp.js +13 -2
- package/extensions/typings.d.ts +2 -2
- package/package.json +9 -7
- package/extensions/es7/base.js +0 -320
- package/extensions/es7/lint.js +0 -97
package/bundle/bundle.min.js
CHANGED
|
@@ -1,36 +1,29 @@
|
|
|
1
|
-
"use strict";(()=>{var Fo=Object.create;var xt=Object.defineProperty;var pi=Object.getOwnPropertyDescriptor;var Ro=Object.getOwnPropertyNames;var Po=Object.prototype.hasOwnProperty;var ui=(a,r)=>(r=Symbol[a])?r:Symbol.for("Symbol."+a),bt=a=>{throw TypeError(a)};var ci=(a,r,e)=>r in a?xt(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e;var gi=(a,r)=>xt(a,"name",{value:r,configurable:!0});var y=(a,r)=>()=>(a&&(r=a(a=0)),r);var jo=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),le=(a,r)=>{for(var e in r)xt(a,e,{get:r[e],enumerable:!0})},Bo=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Ro(r))!Po.call(a,n)&&n!==e&&xt(a,n,{get:()=>r[n],enumerable:!(t=pi(r,n))||t.enumerable});return a};var K=a=>Bo(xt({},"__esModule",{value:!0}),a);var re=a=>{var r;return[,,,Fo((r=a==null?void 0:a[ui("metadata")])!=null?r:null)]},hi=["class","method","getter","setter","accessor","field","value","get","set"],tr=a=>a!==void 0&&typeof a!="function"?bt("Function expected"):a,Oo=(a,r,e,t,n)=>({kind:hi[a],name:r,metadata:t,addInitializer:i=>e._?bt("Already initialized"):n.push(tr(i||null))}),qo=(a,r)=>ci(r,ui("metadata"),a[3]),ne=(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},ie=(a,r,e,t,n,i)=>{var s,o,l,d,p,g=r&7,u=!!(r&8),h=!!(r&16),f=g>3?a.length+1:g?u?1:2:0,m=hi[g+5],x=g>3&&(a[f-1]=[]),v=a[f]||(a[f]=[]),C=g&&(!h&&!u&&(n=n.prototype),g<5&&(g>3||!h)&&pi(g<4?n:{get[e](){return c(this,i)},set[e]($){return b(this,i,$)}},e));g?h&&g<4&&gi(i,(g>2?"set ":g>1?"get ":"")+e):gi(n,e);for(var E=t.length-1;E>=0;E--)d=Oo(g,e,l={},a[3],v),g&&(d.static=u,d.private=h,p=d.access={has:h?$=>_o(n,$):$=>e in $},g^3&&(p.get=h?$=>(g^1?c:N)($,n,g^4?i:C.get):$=>$[e]),g>2&&(p.set=h?($,S)=>b($,n,S,g^4?i:C.set):($,S)=>$[e]=S)),o=(0,t[E])(g?g<4?h?i:C[m]:g>4?void 0:{get:C.get,set:C.set}:n,d),l._=1,g^4||o===void 0?tr(o)&&(g>4?x.unshift(o):g?h?i=o:C[m]=o:n=o):typeof o!="object"||o===null?bt("Object expected"):(tr(s=o.get)&&(C.get=s),tr(s=o.set)&&(C.set=s),tr(s=o.init)&&x.unshift(s));return g||qo(a,n),C&&xt(n,e,C),h?g^4?i:C:n},se=(a,r,e)=>ci(a,typeof r!="symbol"?r+"":r,e),un=(a,r,e)=>r.has(a)||bt("Cannot "+e),_o=(a,r)=>Object(r)!==r?bt('Cannot use the "in" operator on this value'):a.has(r),c=(a,r,e)=>(un(a,r,"read from private field"),e?e.call(a):r.get(a)),T=(a,r,e)=>r.has(a)?bt("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),b=(a,r,e,t)=>(un(a,r,"write to private field"),t?t.call(a,e):r.set(a,e),e),N=(a,r,e)=>(un(a,r,"access private method"),e);var Nr=(a,r,e,t)=>({set _(n){b(a,r,n,e)},get _(){return c(a,r,t)}});var mi,fi,xi=y(()=>{"use strict";mi=(()=>{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,"list-range":11};return Object.setPrototypeOf(a,null),a})(),fi=(()=>{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})()});function we(a){return r=>{let e=new(typeof r=="string"?Map:WeakMap);if(e.has(r)){let n=e.get(r);return n.lastIndex=0,n}let t=a(r);return e.set(r,t),t}}var De,Tt=y(()=>{"use strict";De=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var ke,bi,Ee,Le,Je,Ti,oe,Xa,fe,Mo,Do,Ye,yi,Qa,zo,Wo,yt,Fe,J=y(()=>{"use strict";Tt();ke=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,bi=String.raw`[^[\]<>"\0-\x1F\x7F${ke}\uFFFD]`,Ee=String.raw`(?:\[[\da-f:.]+\]|${bi})`,Le=String.raw`(?:${bi}|\0\d+[cn!~]\x7F)*`,Je=(a,r)=>e=>e.replace(a,r),Ti=Je(/[\0\x7F]|\r$/gmu,""),oe=Je(/\0\d+[cn]\x7F/gu,""),Xa=Je(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),fe=(a,r="")=>a.map(e=>typeof e=="string"?e:e.text()).join(r),Mo={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Do=Je(/&(?:#(\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)):Mo[e.toLowerCase()]),Ye=a=>Do(a),yi=Je(/&#(\d+|x[\da-f]+);/giu,(a,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),Qa=Je(/\n/gu,String.raw`\n`),zo={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Wo=a=>Je(a,r=>`&${zo[r]};`),yt=Wo(/[&<>]/gu),Fe=(a,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+a.map(i=>i.print()).join(n)+t}});var ki=jo((Ya,Go)=>{Go.exports={ext:[],html:[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link"]],namespaces:{"0":"","6":"File","10":"Template","14":"Category","828":"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},functionHook:["msgnw"],variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{msgnw:"msgnw",pageid:"pageid",articlepath:"articlepath",server:"server",servername:"servername",scriptpath:"scriptpath",stylepath:"stylepath","#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#related":"related","#cscore":"cscore","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#rmatch":"rmatch","#rreplace":"rreplace","#replace":"replace","#rsplit":"rsplit","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"lst","#section-x":"lstx","#section-h":"lsth","#statements":"statements"},{"!":"!","=":"=","#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 cn,vi=y(()=>{"use strict";cn=ki()});var rr,kt,nr,ir,hn,P,X=y(()=>{"use strict";P=class{constructor(r,e){T(this,ir);T(this,rr);T(this,kt);T(this,nr);b(this,rr,r),b(this,kt,e)}get start(){return c(this,kt)}get top(){return N(this,ir,hn).call(this).top}get left(){return N(this,ir,hn).call(this).left}};rr=new WeakMap,kt=new WeakMap,nr=new WeakMap,ir=new WeakSet,hn=function(){var r;return(r=c(this,nr))!=null||b(this,nr,c(this,rr).getRootNode().posFromIndex(c(this,kt))),c(this,nr)}});var mn,Ai,w,F,ve,Si,q=y(()=>{"use strict";ce();X();_();mn=(a,r,e,t)=>({line:a+e-1,character:(e===1?r:0)+t}),Ai=a=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof P?e:new P(r,s),{offsetHeight:d,offsetWidth:p}=r,{startIndex:g,startLine:u,startCol:h}=a(r,s,o,l),{line:f,character:m}=mn(u,h,d,p);return{rule:t,message:A.msg(n),severity:i,startIndex:g,endIndex:g+r.toString().length,startLine:u,endLine:f,startCol:h,endCol:m}},w=Ai((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}}),F=Ai((a,r,e,t)=>({startIndex:r,startLine:e,startCol:t})),ve=(a,r,e)=>{if(a)return a[1];let t=r();return e([de.rev,t]),t},Si=(()=>{let a=(r,e)=>r==="ol"&&e==="type"?["1","a","A","i","I"]:r==="th"&&e==="scope"?["row","col","rowgroup","colgroup"]:e==="dir"?["ltr","rtl","auto"]:e==="aria-hidden"?["true","false"]:[];return{provideValues(r,e){return a(r,e).map(t=>({name:t}))}}})()});var Uo,Er,wi=y(()=>{"use strict";Uo=(a,r,e)=>{let[t,...n]=a.split("#");return(!t||t===r)&&n.every(i=>i===e)},Er=(a,r,e)=>({type:t,name:n})=>a.split(",").some(i=>Uo(i.trim(),t,n))});var sr,vt,At,or,ar,St,wt,lr,fn,Ct,xn=y(()=>{"use strict";q();ce();Ct=class{constructor(){T(this,lr);se(this,"childNodes",[]);T(this,sr);T(this,vt);T(this,At);T(this,or);T(this,ar);T(this,St);T(this,wt,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,sr)}get nextSibling(){return c(this,vt)}get previousSibling(){return c(this,At)}get offsetHeight(){return N(this,lr,fn).call(this).height}get offsetWidth(){return N(this,lr,fn).call(this).width}getChildNodes(){let{childNodes:r}=this;return Object.isFrozen(r)?[...r]:r}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){switch(r){case"parentNode":b(this,sr,e),e||(b(this,vt,void 0),b(this,At,void 0));break;case"nextSibling":b(this,vt,e);break;case"previousSibling":b(this,At,e);break;case"aIndex":b(this,St,[de.rev,e]);break;default:this[r]=e}}getRootNode(){return ve(c(this,ar),()=>{var r,e;return(e=(r=this.parentNode)==null?void 0:r.getRootNode())!=null?e:this},r=>{let[,e]=r;e.type==="root"&&b(this,ar,r)})}indexFromPos(r,e){}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 ve(c(this,wt)[r],()=>{let{childNodes:e}=this,t=r+(r<0?e.length:0),n=this.getAttribute("padding");for(let i=0;i<t;i++)c(this,wt)[i]=[de.rev,n],n+=e[i].toString().length+this.getGaps(i);return n},e=>{c(this,wt)[r]=e})}getAbsoluteIndex(){return ve(c(this,St),()=>{let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0},r=>{b(this,St,r)})}getBoundingClientRect(){}seal(r,e){Object.defineProperty(this,r,{enumerable:!e&&!!this[r],configurable:!0})}is(r){return this.type===r}getLines(){return ve(c(this,or),()=>{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=>{b(this,or,r)})}};sr=new WeakMap,vt=new WeakMap,At=new WeakMap,or=new WeakMap,ar=new WeakMap,St=new WeakMap,wt=new WeakMap,lr=new WeakSet,fn=function(){let r=this.getLines(),e=r[r.length-1];return{height:r.length,width:e[2]-e[1]}}});var ze,bn,Tn,Lr,Ci=y(()=>{"use strict";J();ce();wi();xn();Lr=class extends Ct{constructor(){super(...arguments);T(this,ze)}get length(){return this.childNodes.length}text(e){return fe(this.childNodes,e)}normalize(){let e=this.getChildNodes(),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 dr(this,e,1)[0]}insertAt(e,t=this.length){return dr(this,t,0,[e]),e}closest(e){let t=Er(e,this),{parentNode:n}=this;for(;n;){if(t(n))return n;({parentNode:n}=n)}}querySelector(e){let t=Er(e,this);return N(this,ze,bn).call(this,t)}querySelectorAll(e){let t=Er(e,this);return N(this,ze,Tn).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];o.setAttribute("aIndex",s),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}">`)+Fe(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();o.setAttribute("aIndex",s),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}};ze=new WeakSet,bn=function(e){var t;for(let n of this.childNodes){if(n.type==="text")continue;if(e(n))return n;let i=N(t=n,ze,bn).call(t,e);if(i)return i}},Tn=function(e){var n;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...N(n=i,ze,Tn).call(n,e)));return t}});var yn,$i,Ho,Vo,Xo,Qo,Ko,Jo,kn,Fr,Ii,gr,Ni=y(()=>{"use strict";J();q();_();xn();yn=String.raw`[${ke}\t]*`,$i=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${yn}\d)|isbn(?=[-::]?${yn}(?:\d(?:${yn}|-)){6})`,Ho=new RegExp(String.raw`${$i}|https?[:/]/+`,"giu"),Vo=new RegExp($i,"giu"),Xo=new Set(["attr-value","ext-link-text","link-text"]),Qo={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Ko={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},Jo=["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{kn=new RegExp(String.raw`[\p{L}\d_]`,"u")}catch(a){kn=/\w/u}gr=class extends Ct{constructor(e){super();T(this,Fr);se(this,"data","");Object.defineProperties(this,{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 M,R,B;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:d,parentNode:p}=i,g=!1;if(l==="attr-value"){let{type:O,name:Q,tag:me}=p;if(O!=="ext-attr")g=!0;else if(me==="choose"&&(Q==="before"||Q==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&d==="link"||g?Vo:Ho),n.search(t)===-1)return[];t.lastIndex=0;let u=[],h=s==null?void 0:s.type,f=s==null?void 0:s.name,m=o==null?void 0:o.type,x=this.getRootNode(),v=x.toString(),{ext:C,html:E}=x.getAttribute("config"),{top:$,left:S}=x.posFromIndex(e),L=new Set(["onlyinclude","noinclude","includeonly",...C,...E[0],...E[1],...E[2],...Jo]);for(let O=t.exec(n);O;O=t.exec(n)){let[,Q,me]=O,{index:pe,0:V}=O;if(me&&me!=="]"){let{length:ue}=me;pe+=ue,V=V.slice(ue)}V=V.toLowerCase();let{0:I,length:ee}=V,Y=I==="r"||I==="p"||I==="i";if(I==="<"&&!L.has(Q.toLowerCase())||I==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(n.slice(pe+1))||s!=null&&s.is("ext")&&f==="nowiki"&&((M=s.innerText)!=null&&M.includes("]")))||Y&&(!i.getAttribute("plain")||Xo.has(l)))continue;I==="]"&&(pe||ee>1)&&t.lastIndex--;let ye=e+pe,Ne=ye+ee,te=v[Ne],Me=v[ye-1],er=ee>1&&!(I==="<"&&!/[\s/>]/u.test(te!=null?te:"")||g&&(I==="["||I==="]")||Y&&l==="parameter-value")||I==="{"&&(te===I||Me==="-")||I==="}"&&(Me===I||te==="-")||I==="["&&(te===I||l==="ext-link-text"||h==="free-ext-link"&&!n.slice(pe+1).trim())||I==="]"&&(Me===I||m==="free-ext-link"&&!n.slice(0,pe).includes("]"))?"error":"warning",gn=I==="{"||I==="[";if(er==="warning"&&(gn||(I==="]"||I==="}"))){let ue=Qo[I],pn=gn?n.slice(pe+1):n.slice(0,pe);if(I==="{"&&((R=ue.exec(pn))==null?void 0:R[0])==="}"||I==="}"&&((B=ue.exec(pn))==null?void 0:B[0])==="{")continue;if(!pn.includes(I)){let di=gn?"nextSibling":"previousSibling",Ke=this[di];for(;Ke&&(Ke.type!=="text"||!ue.test(Ke.data));)Ke=Ke[di];if(Ke&&ue.exec(Ke.data)[0]!==I)continue}}Y&&(V=V.toUpperCase());let oi=this.posFromIndex(pe),{line:ai,character:li}=mn($,S,oi.top+1,oi.left),ft={rule:Ko[I],message:A.msg('lonely "$1"',Y||I==="h"?V:I),severity:er,startIndex:ye,endIndex:Ne,startLine:ai,endLine:ai,startCol:li,endCol:li+ee};if(I==="<")ft.suggestions=[{desc:"escape",range:[ye,ye+1],text:"<"}];else if(I==="h"&&l!=="link-text"&&kn.test(Me||""))ft.suggestions=[{desc:"whitespace",range:[ye,ye],text:" "}];else if(I==="["&&l==="ext-link-text"){let ue=i.getAbsoluteIndex()+i.toString().length;ft.suggestions=[{desc:"escape",range:[ue,ue+1],text:"]"}]}else if(I==="]"&&m==="free-ext-link"&&er==="error"){let ue=e-o.toString().length;ft.fix={range:[ue,ue],text:"[",desc:"left bracket"}}else Y&&(ft.suggestions=[...O[0]===V?[]:[{desc:"uppercase",range:[ye,Ne],text:V}],...te===":"||te==="\uFF1A"?[{desc:"whitespace",range:[Ne,Ne+1],text:" "}]:[]]);u.push(ft)}return u}replaceData(e){N(this,Fr,Ii).call(this,e)}print(){return yt(this.data)}};Fr=new WeakSet,Ii=function(e){this.setAttribute("data",e)}});var xe,Ze=y(()=>{"use strict";ce();xe=(a=!0,r=!0)=>(e,t)=>{class n extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return Rr(n,e),n}});var pr,be,$t=y(()=>{"use strict";j();be=class extends k{constructor(e,t,n,i,s){super(e,n,i,s);T(this,pr);b(this,pr,t)}get type(){return c(this,pr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};pr=new WeakMap});var It,W,Re=y(()=>{"use strict";j();W=class extends k{constructor(e,t,n,i,s){super(e,n,i,s);T(this,It);b(this,It,t)}get type(){return c(this,It)}set type(e){b(this,It,e)}};It=new WeakMap});var Yo,et,Ae,Pe,Ce,ur=y(()=>{"use strict";q();J();X();_();j();Re();Yo=a=>a==="redirect-target"||a==="link",Ce=class extends k{constructor(e,t,n=A.getConfig(),i=[],s="|"){super(void 0,n,i,{});T(this,et,!0);T(this,Ae);T(this,Pe);if(this.insertAt(new W(e,"link-target",n,i,{})),t!==void 0){let o=new k(t,n,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}b(this,Ae,s)}get link(){}get fragment(){return c(this,Pe).fragment}afterBuild(){b(this,Pe,this.getTitle()),c(this,Ae).includes("\0")&&b(this,Ae,this.buildFromStr(c(this,Ae),0)),this.setAttribute("name",c(this,Pe).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?b(this,et,t):e==="title"?b(this,Pe,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,Ae));return c(this,et)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,et)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,Pe):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?c(this,Ae).length:1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:d}=c(this,Pe),p=new P(this,e);if(i.childNodes.some(({type:g})=>g==="template")&&n.push(w(i,p,"unknown-page","template in an internal link target","warning")),l){let g=w(i,p,"url-encoding","unnecessary URL encoding in an internal link");g.suggestions=[{desc:"decode",range:[g.startIndex,g.endIndex],text:De(i.text())}],n.push(g)}if(o==="link"||o==="category"){let g=s==null?void 0:s.childNodes.findIndex(h=>h.type==="text"&&h.data.includes("|")),u=s==null?void 0:s.childNodes[g];if(u){let h=w(s,p,"pipe-like",'additional "|" in the link text',"warning"),f=h.startIndex+s.getRelativeIndex(g);h.suggestions=[{desc:"escape",range:[f,f+u.data.length],text:u.data.replace(/\|/gu,"|")}],n.push(h)}}if(d!==void 0&&!Yo(o)){let g=w(i,p,"no-ignored","useless fragment"),u=i.childNodes.findIndex(f=>f.type==="text"&&f.data.includes("#")),h=i.childNodes[u];h&&(g.fix={range:[g.startIndex+i.getRelativeIndex(u)+h.data.indexOf("#"),g.endIndex],text:"",desc:"remove"}),n.push(g)}return n}getTitle(e,t){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:t,temporary:e,decode:!0,selfLink:!0})}print(){return super.print(c(this,et)?{pre:"[[",post:"]]",sep:c(this,Ae)}:{sep:c(this,Ae)})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t),{type:i,fragment:s}=this;return s!==void 0&&(i==="link"||i==="redirect-target")&&(n.fragment=s),n}};et=new WeakMap,Ae=new WeakMap,Pe=new WeakMap});var ae,We=y(()=>{"use strict";j();ae=class extends k{get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}}});var Ei,vn,Zo,U,Ge=y(()=>{"use strict";Ze();We();Ei=[xe()];U=class extends(Zo=ae){get type(){return"noinclude"}toString(r){return r?"":super.toString()}};vn=re(Zo),U=ie(vn,0,"NoincludeToken",Ei,U),ne(vn,1,U)});var Pr,Li=y(()=>{"use strict";q();ur();Ge();Pr=class extends Ce{get type(){return"redirect-target"}constructor(r,e,t,n){super(r,void 0,t,n),e!==void 0&&this.insertAt(new U(e,t,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0})}lint(r=this.getAbsoluteIndex()){let e=super.lint(r,!1);if(this.length===2){let t=w(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 Fi,Ue,Nt,An,ea,tt,Ri=y(()=>{"use strict";Ze();j();$t();Li();Fi=[xe(!1,!1)];tt=class extends(ea=k){constructor(e,t,n,i,s,o,l=[]){super(void 0,o,l);T(this,Ue);T(this,Nt);b(this,Ue,e),b(this,Nt,s),this.append(new be(t,"redirect-syntax",o,l),new Pr(n,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,Ue).length:super.getAttribute(e)}toString(e){return c(this,Ue)+super.toString(e)+c(this,Nt)}lint(e=this.getAbsoluteIndex()){let t=e+c(this,Ue).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",t),this.lastChild.lint(t)}print(){return super.print({pre:c(this,Ue),post:c(this,Nt)})}};An=re(ea),Ue=new WeakMap,Nt=new WeakMap,tt=ie(An,0,"RedirectToken",Fi,tt),ne(An,1,tt)});var Pi={};le(Pi,{parseRedirect:()=>ta});var ta,ji=y(()=>{"use strict";_();Ri();ta=(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&&A.normalizeTitle(t[3],0,!1,r,{halfParsed:!0,temporary:!0,decode:!0}).valid?(a=`\0${e.length}o\x7F${a.slice(t[0].length)}`,new tt(...t.slice(1),r,e),a):!1}});var jr,Bi=y(()=>{"use strict";j();jr=class extends k{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 He,Et,Sn=y(()=>{"use strict";j();Et=class extends k{constructor(e,t,n,i,s,o=[]){super(void 0,s);T(this,He);se(this,"closed");se(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),b(this,He,[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]=c(this,He);return t?`<${s}${n.toString(e)}/>`:`<${s}${n.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,He);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,He)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=c(this,He);return super.print(this.selfClosing?{pre:`<${e}`,post:"/>"}:{pre:`<${e}`,sep:">",post:this.closed?`</${t}>`:""})}};He=new WeakMap});var Oi,wn,ra,rt,qi=y(()=>{"use strict";q();X();Ze();_();Sn();Oi=[xe(!1)];rt=class extends(ra=Et){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 P(this,r);if(t.data.trim()){let o=w(t,s,"no-ignored","useless attribute","warning");o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],e.push(o)}if(!n){let o=F(this,s,"unclosed-comment",A.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};wn=re(ra),rt=ie(wn,0,"IncludeToken",Oi,rt),ne(wn,1,rt)});var Lt,Br=y(()=>{"use strict";ce();Lt=(a=0)=>(r,e)=>{var n,_i;class t extends r{constructor(){super(...arguments);T(this,n)}getAttr(l){return N(this,n,_i).call(this).getAttr(l)}}return n=new WeakSet,_i=function(){return this.childNodes[a]},Rr(t,r),t}});var H,Mi,Di,qr,Cn,zi,Ft,Wi,Gi,Ui,Or,Hi,Vi,Xi,Qi,Ki=y(()=>{"use strict";H=new Set(["align"]),Mi=new Set(["cite"]),Di=new Set(["cite","datetime"]),qr=new Set(["width"]),Cn=new Set(["axis","align","bgcolor","height","width","valign"]),zi=new Set([...Cn,"abbr","headers","scope","rowspan","colspan"]),Ft=new Set(["type"]),Wi=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Gi=new Set(["clear"]),Ui=new Set(["bgcolor","align","valign"]),Or=new Set,Hi=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"]),Vi={div:H,h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,blockquote:Mi,q:Mi,p:H,br:Gi,pre:qr,ins:Di,del:Di,ul:Ft,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Wi,"border"]),caption:H,tr:Ui,td:zi,th:zi,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:qr,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Ft,poem:H,categorytree:H,combooption:H},Xi={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:Or,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:Or,inputbox:Or,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Or,poll:new Set(["id","show-results-before-voting"]),sm2:Ft,flashmp3:Ft,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"])},Qi={table:Wi,td:new Set([...Cn,"scope"]),th:Cn,br:Gi,caption:H,div:H,hr:qr,h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,li:Ft,p:H,pre:qr,tr:Ui,ul:Ft}});var na,ia,cr,Rt,Z,$e,Pt,Ji=y(()=>{"use strict";q();J();Ki();X();_();j();Re();na=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,ia=new Set(["ext","arg","magic-word","template"]),Pt=class extends k{constructor(e,t,n,i="",s,o=[],l=A.getConfig(),d=[]){let p=new W(n,"attr-key",l,d),g;if(n==="title"||t==="img"&&n==="alt")g=new k(s,l,d,{}),g.type="attr-value",g.setAttribute("stage",10);else if(t==="gallery"&&n==="caption"||t==="choose"&&(n==="before"||n==="after")){let u={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};g=new k(s,u,d,{}),g.type="attr-value",g.setAttribute("stage",1)}else g=new W(s,"attr-value",l,d,{});super(void 0,l,d);T(this,cr);T(this,Rt);T(this,Z);T(this,$e);b(this,cr,e),this.append(p,g),b(this,Z,i),b(this,$e,[...o]),b(this,Rt,t),this.setAttribute("name",oe(n).trim().toLowerCase())}get type(){return c(this,cr)}get tag(){return c(this,Rt)}get balanced(){return!c(this,Z)||c(this,$e)[0]===c(this,$e)[1]}afterBuild(){c(this,Z).includes("\0")&&b(this,Z,this.buildFromStr(c(this,Z),0)),this.parentNode&&b(this,Rt,this.parentNode.name),this.setAttribute("name",this.firstChild.text().trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",n=""]=c(this,$e);return c(this,Z)?super.toString(e,c(this,Z)+t)+n:this.firstChild.toString(e)}text(){return c(this,Z)?`${super.text(`${c(this,Z).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,Z)?c(this,Z).length+((t=(e=c(this,$e)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var x;let n=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:d,tag:p}=this,g=this.getValue(),u=new P(this,e);if(!i){let v=w(o,u,"unclosed-quote",A.msg("unclosed $1","quotes"),"warning");v.startIndex--,v.startCol--,v.suggestions=[{range:[v.endIndex,v.endIndex],text:c(this,$e)[0],desc:"close"}],n.push(v)}let h=Xi[p],f=Vi[p],{length:m}=this.toString();if(!(h!=null&&h.has(d))&&!(f!=null&&f.has(d))&&(l==="ext-attr"?h||f:!/\{\{[^{]+\}\}/u.test(d))&&(l==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(d)&&(p==="meta"||p==="link"||!Hi.has(d)))){let v=w(s,u,"illegal-attr","illegal attribute name");v.suggestions=[{desc:"remove",range:[e,e+m],text:""}],n.push(v)}else if(d==="style"&&typeof g=="string"&&na.test(g))n.push(w(o,u,"insecure-style","insecure style"));else if(d==="tabindex"&&typeof g=="string"&&g!=="0"){let v=w(o,u,"illegal-attr","nonzero tabindex");v.suggestions=[{desc:"remove",range:[e,e+m],text:""},{desc:"0 tabindex",range:[v.startIndex,v.endIndex],text:"0"}],n.push(v)}else if(l!=="ext-attr"&&!o.childNodes.some(({type:v})=>ia.has(v))){let v=Si.provideValues(p,d),C=String(g).toLowerCase();v.length>0&&v.every(({name:E})=>E!==C)&&n.push(w(o,u,"illegal-attr","illegal attribute value","warning"))}return(x=Qi[p])!=null&&x.has(d)&&n.push(w(s,u,"obsolete-attr","obsolete attribute","warning")),n}getValue(){return c(this,Z)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,$e);return c(this,Z)?super.print({sep:yt(c(this,Z))+e,post:t}):super.print()}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.tag=this.tag,n}};cr=new WeakMap,Rt=new WeakMap,Z=new WeakMap,$e=new WeakMap});var Yi,sa,$n,hr,Ve,_r=y(()=>{"use strict";q();J();X();_();j();Re();Ji();Yi=a=>a.slice(0,-1),sa=a=>`${Yi(a)}-dirty`;try{$n=new RegExp(String.raw`[\p{L}\d]`,"u")}catch(a){$n=/[^\W_]/u}Ve=class extends k{constructor(e,t,n,i,s=[]){super(void 0,i,s,{});T(this,hr);if(b(this,hr,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="",d=o.exec(e),p=0,g=()=>{l&&(super.insertAt(new W(l,sa(t),i,s,{})),l="")};for(;d;){let{index:u,0:h,1:f,2:m,3:x,4:v,5:C,6:E}=d;if(l+=e.slice(p,u),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(oe(f).trim())){let $=v!=null?v:E,S=[x,C],L=new Pt(Yi(t),n,f,m,$,S,i,s);g(),super.insertAt(L)}else l+=h;({lastIndex:p}=o),d=o.exec(e)}l+=e.slice(p),g()}}get type(){return c(this,hr)}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 Pt&&(!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,d=new P(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let p=F(this,d,"no-ignored","attributes of a closing tag"),g=i.getAbsoluteIndex();p.suggestions=[{desc:"remove",range:[e,p.endIndex],text:""},{desc:"open",range:[g+1,g+2],text:""}],n.push(p)}for(let p of s)if(p instanceof Pt){let{name:g}=p;o.has(g)?(l.add(g),o.get(g).push(p)):o.set(g,[p])}else{let g=p.text().trim();if(g){let u=w(p,d,"no-ignored","containing invalid attribute",$n.test(g)?"error":"warning");u.suggestions=[{desc:"remove",range:[u.startIndex,u.endIndex],text:" "}],n.push(u)}}if(l.size>0)for(let p of l){let g=o.get(p).map(u=>{let h=u.getValue();return[u,h===!0?"":h]});n.push(...g.map(([u,h],f)=>{let m=w(u,d,"no-duplicate",A.msg("duplicated $1 attribute",p)),x={desc:"remove",range:[m.startIndex,m.endIndex],text:""};return!h||g.slice(0,f).some(([,v])=>v===h)?m.fix=x:m.suggestions=[x],m}))}return n}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof W?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};hr=new WeakMap});var Mr,Zi=y(()=>{"use strict";_();j();Ge();Mr=class extends k{get type(){return"ext-inner"}constructor(r,e=A.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),d=0,p="";for(;o&&l;)new U(o[0],e,t),new U(l[0],e,t),p+=`${r.slice(d,o.index)}\0${t.length-1}n\x7F${r.slice(o.index+s,l.index)}\0${t.length}n\x7F`,d=l.index+s+1,n.lastIndex=d,o=n.exec(r),o&&(i.lastIndex=o.index+s),l=i.exec(r);r=p+r.slice(d)}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 jt,In=y(()=>{"use strict";q();X();mr();_();j();Re();jt=class extends k{get type(){return"ext-inner"}constructor(r,e,t=A.getConfig(),n=[],i){if(super(void 0,t,n,{}),e){let s=W;this.append(...e.split(`
|
|
3
|
-
`).map(o=>i?o:nt(o,t,n,r)).map(o=>new s(o,"param-line",t,n,{})))}n.splice(n.indexOf(this),1),n.push(this)}toString(r){return super.toString(r,`
|
|
4
|
-
`)}text(){return super.text(`
|
|
5
|
-
`)}getGaps(){return 1}lint(r=this.getAbsoluteIndex()){let e=new P(this,r),t=A.msg("invalid parameter of <$1>",this.name),n=[];for(let i of this.childNodes){i.setAttribute("aIndex",r);let s=i.childNodes.filter(({type:o})=>o!=="comment"&&o!=="include"&&o!=="noinclude");if(s.some(({type:o})=>o==="ext"))n.push(w(i,e,"no-ignored",t));else{let o=s.findIndex(({type:d})=>d!=="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 d=w(i,e,"no-ignored",t);d.suggestions=[{desc:"remove",range:[d.startIndex,d.endIndex],text:""}],n.push(d)}else n.push(...i.lint(r,!1))}r+=i.toString().length+1}return n}print(){return super.print({sep:`
|
|
6
|
-
`})}}});var fr,Bt,Dr,Ot,Nn=y(()=>{"use strict";q();ce();X();_();j();$t();Ot=class extends k{constructor(e,t,n,i=[]){super(void 0,n,i);T(this,Bt);T(this,fr);b(this,fr,e);let s=new k(t[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let o=new be(t[1],"heading-trail",n,i);this.append(s,o)}get type(){return"heading"}get level(){return c(this,fr)}toString(e){let t=N(this,Bt,Dr).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=N(this,Bt,Dr).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 n=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=o.startsWith("="),d=l||o.endsWith("="),p=i.childNodes.filter(qt("quote")),g=p.filter(({bold:m})=>m),u=p.filter(({italic:m})=>m),h=new P(this,e);if(this.level===1){let m=w(i,h,"h1","<h1>");d||(m.suggestions=[{desc:"h2",range:[m.startIndex,m.endIndex],text:`=${o}=`}]),n.push(m)}if(d){let m=w(i,h,"unbalanced-header",A.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[x]=/^=+/u.exec(o);m.suggestions=[{desc:`h${s}`,range:[m.startIndex,m.startIndex+x.length],text:""},{desc:`h${s+x.length}`,range:[m.endIndex,m.endIndex],text:x}]}else{let x=/[^=](=+)$/u.exec(o)[1];m.suggestions=[{desc:`h${s}`,range:[m.endIndex-x.length,m.endIndex],text:""},{desc:`h${s+x.length}`,range:[m.startIndex,m.startIndex],text:x}]}n.push(m)}this.closest("html-attrs,table-attrs")&&n.push(F(this,h,"parsing-order","section header in an HTML tag"));let f=this.getRootNode().toString();if(g.length%2){let m=w(g[g.length-1],{...h,start:e+s,left:h.left+s},"format-leakage",A.msg("unbalanced $1 in a section header","bold apostrophes")),x=e+s+o.length;f.slice(m.endIndex,x).trim()?m.suggestions=[{desc:"close",range:[x,x],text:"'''"}]:m.fix={desc:"remove",range:[m.startIndex,m.endIndex],text:""},n.push(m)}if(u.length%2){let m=w(u[u.length-1],{start:e+s},"format-leakage",A.msg("unbalanced $1 in a section header","italic apostrophes")),x=e+s+o.length;m.fix=f.slice(m.endIndex,x).trim()?{desc:"close",range:[x,x],text:"''"}:{desc:"remove",range:[m.startIndex,m.endIndex],text:""},n.push(m)}return n}print(){let e=N(this,Bt,Dr).call(this);return super.print({pre:e,sep:e})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.level=this.level,n}};fr=new WeakMap,Bt=new WeakSet,Dr=function(){return"=".repeat(this.level)}});var oa,zr,es=y(()=>{"use strict";J();q();_();j();oa=new RegExp(`https?://${Ee}${Le}$`,"iu"),zr=class extends k{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){var r;try{return!!((r=this.parentNode)!=null&&r.getDuplicatedArgs().some(([e])=>e===this.name))}catch(e){return!1}}constructor(r,e,t=A.getConfig(),n=[]){super(void 0,t,n);let i=new k(typeof r=="number"?void 0:r,t,n,{}),s=new k(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=oa.exec(n.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=w(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(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{anon:this.anon},this.duplicated&&{duplicated:!0}),t}}});var br,Xe,it,st,_t,ot,En,ts,xr,rs=y(()=>{"use strict";J();q();ce();X();j();es();Re();$t();xr=class extends k{constructor(e,t,n,i=[]){var C,E;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,{});T(this,ot);se(this,"modifier","");T(this,br,"template");T(this,Xe,":");T(this,it,!1);T(this,st,new Map);T(this,_t);let{parserFunction:[l,d],variable:p,functionHook:g}=n,u=(C=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:C[0];if(u)this.setAttribute("modifier",u),e=e.slice(u.length);else if(e.includes(":")){let[$,...S]=e.split(":"),[L]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((E=S[0])!=null?E:"");this.setModifier(`${$}:${L}`)&&(e=S.join(":").slice(L.length))}let h=e.search(/[::]/u),f=e[h]==="\uFF1A",m=h!==-1;if(m||t.length===0&&!c(this,it)){let $=m?e.slice(0,h):e,S=m&&e.slice(h+1),L=oe($),M=m?L.slice(L.search(/\S/u))+(f?"\uFF1A":""):L.trim(),R=M.toLowerCase(),B=Array.isArray(d),O=B?d.includes(M):Object.prototype.hasOwnProperty.call(d,M),Q=!B&&O?d[M]:Object.prototype.hasOwnProperty.call(l,R)&&l[R],me=B&&O||!("functionHook"in n)||g.includes(Q),pe=B&&O||p.includes(Q);if(m?Q&&me:pe){this.setAttribute("name",Q||R.replace(/^#|:$/u,"")),b(this,br,"magic-word"),f&&b(this,Xe,"\uFF1A");let V=new be($,"magic-word-name",n,i);if(super.insertAt(V),S!==!1&&t.unshift([S]),this.name==="invoke")for(let I=0;I<2;I++){let ee=t.shift();if(!ee)break;let Y=new W(ee.join("="),`invoke-${I?"function":"module"}`,n,i);super.insertAt(Y)}}}if(this.type==="template"){let $=oe(e).trim();if(!this.normalizeTitle($,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let S=new W(e,"template-name",n,i,{});super.insertAt(S)}typeof s=="number"&&(i[s]=void 0);let x=this.isTemplate(),v=1;for(let $=0;$<t.length;$++){let S=t[$];x||this.name==="switch"&&$>0||this.name==="tag"&&$>1||(S[0]=S.join("="),S.length=1),S.length===1&&(S.unshift(v),v++),this.insertAt(new zr(...S,n,i))}this.seal("modifier")}get type(){return c(this,br)}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 c(this,it)&&o||!c(this,it)&&(l||e==="")||(de.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),b(this,it,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"&&(b(this,_t,N(this,ot,En).call(this)),this.setAttribute("name",c(this,_t).title))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":c(this,Xe))+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?"":c(this,Xe))+fe(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,_t);case"colon":return c(this,Xe);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 P(this,e),d=i==="magic-word";if(d&&!N(this,ot,En).call(this).valid)n.push(w(s[1],l,"invalid-invoke","illegal module name"));else{let g=s[d?1:0],u=g.childNodes.findIndex(f=>f.type==="text"&&Ye(f.data).includes("#")),h=g.childNodes[u];if(h){let f=w(g,l,"no-ignored","useless fragment");f.fix={range:[f.startIndex+g.getRelativeIndex(u)+h.data.indexOf("#"),f.endIndex],text:"",desc:"remove"},n.push(f)}}if(d&&o===2)return n.push(F(this,l,"invalid-invoke","missing module function")),n;let p=this.getDuplicatedArgs().filter(([,g])=>!g[0].querySelector("ext"));if(p.length>0)for(let[,g]of p)n.push(...g.map(u=>{let h=w(u,l,"no-duplicate","duplicated parameter");return h.suggestions=[{desc:"remove",range:[h.startIndex-1,h.endIndex],text:""}],h}));return n}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?N(this,ot,ts).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(qt("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 c(this,st).has(i)?s=c(this,st).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),c(this,st).set(i,s)),s}getDuplicatedArgs(){return[...c(this,st)].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,s;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;case"switch":{let o=n.slice(2),l=o[o.length-1];s=[...o.filter(({anon:d})=>!d),...l!=null&&l.anon?[l]:[]].map(({lastChild:d})=>d);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}s!=null||(s=n.slice(i,i+2).map(({lastChild:o})=>o));for(let o=0;o<s.length;){let{length:l,0:d}=s[o].childNodes.filter(p=>p.text().trim());if(l===0)s.splice(o,1);else if(l>1||d.type!=="magic-word")o++;else try{let p=d.getPossibleValues();s.splice(o,1,...p),o+=p.length}catch(p){o++}}return s}print(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${yt(i)}${s==="magic-word"?n.print()+(t===1?"":c(this,Xe))+Fe(e.slice(1),{sep:"|"}):Fe(e,{sep:"|"})}}}</span>`}};br=new WeakMap,Xe=new WeakMap,it=new WeakMap,st=new WeakMap,_t=new WeakMap,ot=new WeakSet,En=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].text(),e?10:828,{temporary:!0})},ts=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===e)&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}}});var ns,Ln,aa,at,is=y(()=>{"use strict";Ze();j();ns=[xe()];at=class extends(aa=k){get type(){return"hidden"}};Ln=re(aa),at=ie(Ln,0,"HiddenToken",ns,at),ne(Ln,1,at)});var Fn,la,Wr,ss=y(()=>{"use strict";J();q();X();j();Re();is();Wr=class extends k{constructor(e,t,n=[]){super(void 0,t,n,{});T(this,Fn);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let o=new W(s,"arg-name",t,n,{});super.insertAt(o)}else if(i>1){let o=new at(s,t,n);super.insertAt(o)}else{let o=new k(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`{{{${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:[n,i,...s]}=this;if(!this.getAttribute("include")){let l=F(this,{start:e},"no-arg","unexpected template argument");return i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),[l]}n.setAttribute("aIndex",e+3);let o=n.lint(e+3,t);if(i){let l=e+4+n.toString().length;i.setAttribute("aIndex",l),o.push(...i.lint(l,t))}if(s.length>0){let l=new P(this,e);o.push(...s.map(d=>{let p=w(d,l,"no-ignored","invisible content inside triple braces");return p.startIndex--,p.startCol--,p.suggestions=[{desc:"remove",range:[p.startIndex,p.endIndex],text:""},{desc:"escape",range:[p.startIndex,p.startIndex+1],text:"{{!}}"}],p}))}return o}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.default=this.default,n}};Fn=new WeakSet,la=function(){}});var us={};le(us,{parseBraces:()=>Tr});var da,os,Rn,as,ls,ds,ps,gs,Tr,Gr=y(()=>{"use strict";Tt();J();Nn();rs();ss();da={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},os=String.raw`\[(?!\[)`,Rn=String.raw`\n(?![=\0])`,as=String.raw`|\{{2,}`,ls=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),ds=we(a=>new RegExp(a,"gmu"));ps=new RegExp(String.raw`\{\{((?:[^\n{}[]|${os}|${Rn})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${Rn})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${os}|${Rn})*\}-`,"gu");gs=a=>{let r=oe(a).trim().toLowerCase();return ls.has(r)?ls.get(r):/^(?:filepath|(?:full|canonical)urle?):./u.test(r)?"m":/^#vardefine:./u.test(r)?"n":"t"},Tr=(a,r,e)=>{var m,x,v,C,E,$;let t=String.raw`${(m=r.excludes)!=null&&m.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,n]}=r,i=[],s=[],o=S=>S.replace(/\0(\d+)\x7F/gu,(L,M)=>s[M]),l=(S,L,M,R)=>{L[L.length-1].push(o(S.slice(M,R)))},d;do d!==void 0&&(a=d),d=a.replace(ps,(S,L,M)=>{if(L!==void 0||typeof M=="string")try{let{length:R}=e,B=(L!=null?L:M).split("|");return new xr(o(B[0]),B.slice(1).map(O=>{let Q=O.indexOf("=");return(Q===-1?[O]:[O.slice(0,Q),O.slice(Q+1)]).map(o)}),r,e),`\0${R}${gs(B[0])}\x7F`}catch(R){if(!(R instanceof SyntaxError)||R.message!=="Invalid template name")throw R}return s.push(o(S)),`\0${s.length-1}\x7F`});while(d!==a);a=d;let p=a.lastIndexOf("}}")-a.length,g=p+a.length!==-1,u=ds(t+(g?as:"")),h=u.exec(a),f;for(;h||f!==void 0&&f<=a.length&&((v=(x=i[i.length-1])==null?void 0:x[0])!=null&&v.startsWith("="));){if(h!=null&&h[1]){let[,{length:I}]=h;h[0]=h[0].slice(I),h.index+=I}let{0:S,index:L}=h!=null?h:{0:`
|
|
7
|
-
`,index:a.length},M=(C=i.pop())!=null?C:{},{0:R,index:B,parts:O,findEqual:Q,pos:me}=M,pe=S==="="&&Q;if(S==="]]"||S==="}-")f=L+2;else if(S===`
|
|
8
|
-
`){f=L+1;let{pos:I,findEqual:ee}=(E=i[i.length-1])!=null?E:{};if(I===void 0||ee||oe(a.slice(I,B))!==""){let Y=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(B,L));Y&&(Y[2]=o(Y[2]),Y[2].includes(`
|
|
9
|
-
`)||(a=`${a.slice(0,B)}\0${e.length}h\x7F${a.slice(L)}`,f=B+4+String(e.length).length,new Ot(Y[1].length,Y.slice(2),r,e)))}}else if(S==="|"||pe)f=L+1,l(a,O,me,L),S==="|"&&O.push([]),M.pos=f,M.findEqual=S==="|",i.push(M);else if(S.startsWith("}}")){let I=S.slice(0,Math.min(R.length,3)),ee=R.length-I.length,{length:Y}=e;f=L+I.length,l(a,O,me,L);let ye=!1,Ne="t";if(I.length===3){let te=O.map(er=>er.join("=")),Me=te.length>1&&oe(te[1]).trim();new Wr(te,r,e),Me&&Me.endsWith(":")&&n.includes(Me.slice(0,-1).toLowerCase())&&(Ne="s")}else try{new xr(O[0][0],O.slice(1),r,e),Ne=gs(O[0][0])}catch(te){if(te instanceof SyntaxError&&te.message==="Invalid template name")ye=!0;else throw te}ye||(a=`${a.slice(0,B+ee)}\0${Y}${Ne}\x7F${a.slice(f)}`,f=B+ee+3+String(Y).length,ee>1?i.push({0:R.slice(0,ee),index:B,pos:B+ee,parts:[[]]}):ee===1&&a[B-1]==="-"&&i.push({0:"-{",index:B-1,pos:B+1,parts:[[]]}))}else f=L+S.length,S.startsWith("{")&&(h.pos=f,h.parts=[[]]),i.push(..."0"in M?[M]:[],h);let V=i[i.length-1];if(g&&p+a.length<f)for(g=!1;($=V==null?void 0:V[0])!=null&&$.startsWith("{");)i.pop(),V=i[i.length-1];u=ds(t+(g?as:"")+(V?`|${da[V[0][0]]}${V.findEqual?"|=":""}`:"")),u.lastIndex=f,h=u.exec(a)}return o(a)}});var Ur,cs=y(()=>{"use strict";mr();Gr();_();In();Ur=class extends jt{constructor(r,e,t=A.getConfig(),n=[]){let i=Symbol("InputboxToken"),{length:s}=n;n.push(i),e&&(e=nt(e,t,n,r)),e&&(e=Tr(e,t,n)),n.splice(s,1),super(r,e,t,n,{})}}});function hs(a,r,e,t,n){r=r.trim();let i=r.replace(a==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(a){case"width":return!i&&!!r||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{if(i){if(ga(e.protocol).test(i))return pa(e.protocol).test(i)&&r;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2))}else return r;let s=A.normalizeTitle(i,0,!1,e,{halfParsed:t,decode:!0,selfLink:!0});return s.valid&&s}case"lang":return(n==="svg"||n==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(n==="djvu"||n==="djv"||n==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var ga,pa,ua,ca,ge,Vr,ms,Hr,fs=y(()=>{"use strict";Tt();J();q();_();j();ga=we(a=>new RegExp(String.raw`^(?:${a}|//|\0\d+m\x7F)`,"iu")),pa=we(a=>new RegExp(String.raw`^(?:(?:${a}|//)${Ee}|\0\d+m\x7F)${Le}$`,"iu")),ua=we(a=>new RegExp(String.raw`^(\s*(?!\s))${a.replace("$1","(.*)")}${a.endsWith("$1")?`(?=$|
|
|
10
|
-
)`:""}(\s*)$`,"u")),ca=new Set(["alt","link","lang","page","caption"]);Hr=class extends k{constructor(e,t,n,i){var r=(...Ug)=>(super(...Ug),T(this,Vr),T(this,ge,""),this);var d;let s,o=Object.entries(n.img).map(([p,g])=>[p,g,ua(p)]),l=o.find(([,p,g])=>(s=g.exec(e),s&&(s.length!==4||hs(p,s[2],n,!0,t)!==!1)));if(l&&s){s.length===3?(r(void 0,n,i),b(this,ge,e)):(r(s[2],n,i,{}),b(this,ge,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}r(e,{...n,excludes:[...(d=n.excludes)!=null?d:[],"list"]},i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?hs("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!ca.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return c(this,ge)?c(this,ge).replace("$1",super.toString(e)):super.toString(e)}text(){return c(this,ge)?c(this,ge).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,c(this,ge).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{link:i,name:s}=this;if(s==="invalid"){let o=F(this,{start:e},"invalid-gallery","invalid image parameter");o.fix={range:[e-1,o.endIndex],text:"",desc:"remove"},n.push(o)}else if(typeof i=="object"&&i.encoded){let o=F(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link");o.suggestions=[{desc:"decode",range:[e,o.endIndex],text:De(this.text())}],n.push(o)}return n}getValue(){return this.name==="invalid"?this.text():N(this,Vr,ms).call(this)||super.text()}print(){return c(this,ge)?`<span class="wpb-image-parameter">${c(this,ge).replace("$1",`<span class="wpb-image-caption">${Fe(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};ge=new WeakMap,Vr=new WeakSet,ms=function(){return c(this,ge)&&!c(this,ge).includes("$1")}});var xs,bs,Ts,ha,ma,Mt,Pn=y(()=>{"use strict";q();X();_();ur();fs();xs=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),bs=new Set(["left","right","center","none"]),Ts=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),ha=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),ma=a=>{if(a===void 0)return[];let r=/-\{|\}-|\|/gu,e=[],t=r.exec(a),n=0,i=0;for(;t;){let{0:s,index:o}=t;s!=="|"?n+=s==="-{"?1:-1:n===0&&(e.push(a.slice(i,o)),{lastIndex:i}=r),t=r.exec(a)}return e.push(a.slice(i)),e},Mt=class extends Ce{get type(){return"file"}get extension(){return this.getAttribute("title").extension}constructor(r,e,t=A.getConfig(),n=[],i="|"){super(r,void 0,t,n,i);let{extension:s}=this.getTitle(!0,!0);this.append(...ma(e).map(o=>new Hr(o,s,t,n)))}lint(r=this.getAbsoluteIndex(),e){var f;let t=super.lint(r,e),n=this.getAllArgs().filter(({childNodes:m})=>{let x=m.filter(v=>v.text().trim());return x.length!==1||x[0].type!=="arg"}),i=[...new Set(n.map(({name:m})=>m))],s=i.filter(m=>xs.has(m)),o=i.filter(m=>bs.has(m)),l=i.filter(m=>Ts.has(m)),[d]=s,p=d==="framed"||d==="manualthumb",g=new P(this,r);if(this.closest("ext-link-text")&&((f=this.getValue("link"))==null?void 0:f.trim())!==""&&t.push(F(this,g,"nested-link","internal link in an external link")),p)for(let m of n.filter(({name:x})=>x==="width")){let x=w(m,g,"invalid-gallery","invalid image parameter");x.fix={range:[x.startIndex-1,x.endIndex],text:"",desc:"remove"},t.push(x)}if(n.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let u=(m,x,v)=>C=>{let E=w(C,g,"no-duplicate",A.msg(`${m} image $1 parameter`,x),v);return E.suggestions=[{desc:"remove",range:[E.startIndex-1,E.endIndex],text:""}],E},{extension:h}=this;for(let m of i){if(m==="invalid"||m==="width"&&p)continue;let x=n.filter(({name:v})=>v===m);m==="caption"&&(x=[...x.slice(0,-1).filter(v=>v.text()),...x.slice(-1)]),x.length>1&&t.push(...x.map(u("duplicated",m,m==="caption"&&h&&!ha.has(h)?"warning":"error")))}return s.length>1&&t.push(...n.filter(({name:m})=>xs.has(m)).map(u("conflicting","frame"))),o.length>1&&t.push(...n.filter(({name:m})=>bs.has(m)).map(u("conflicting","horizontal-alignment"))),l.length>1&&t.push(...n.filter(({name:m})=>Ts.has(m)).map(u("conflicting","vertical-alignment"))),t}getAllArgs(){return this.childNodes.slice(1)}getArgs(r){return this.getAllArgs().filter(({name:e})=>r===e)}getArg(r){let e=this.getArgs(r);return e[r==="manualthumb"?0:e.length-1]}getValue(r){var e;return(e=this.getArg(r))==null?void 0:e.getValue()}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{extension:n}=this;return n&&(t.extension=n),t}}});var Dt,jn=y(()=>{"use strict";q();_();j();Pn();Dt=class extends Mt{constructor(e,t,n,i=A.getConfig(),s=[]){let o;if(n!==void 0){let{length:l}=s;o=new k(n,i,s);for(let d=1;d<11;d++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);se(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,{halfParsed:!0,temporary:e,decode:!t})}getAttribute(e){return e==="padding"?0:super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{ns:i}=this.getAttribute("title");if(i!==6){let s=F(this,{start:e},"invalid-gallery","invalid gallery image");s.suggestions=[{desc:"prefix",range:[e,e],text:"File:"}],n.push(s)}return n}}});var lt,ys,Bn,Xr,ks=y(()=>{"use strict";_();j();jn();Ge();Xr=class extends k{constructor(e,t=A.getConfig(),n=[]){var i;super(void 0,t,n,{});T(this,lt);for(let s of(i=e==null?void 0:e.split(`
|
|
11
|
-
`))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new U(s,t,n):s);continue}let[,l,d]=o;N(this,lt,ys).call(this,l)?super.insertAt(new Dt("gallery",l,d,t,n)):super.insertAt(new U(s,t,n))}}get type(){return"ext-inner"}get widths(){return N(this,lt,Bn).call(this,"widths")}get heights(){return N(this,lt,Bn).call(this,"heights")}toString(e){return super.toString(e,`
|
|
1
|
+
"use strict";(()=>{var Sa=Object.create;var Rt=Object.defineProperty;var Bi=Object.getOwnPropertyDescriptor;var wa=Object.getOwnPropertyNames;var Ca=Object.prototype.hasOwnProperty;var qi=(a,r)=>(r=Symbol[a])?r:Symbol.for("Symbol."+a),Pt=a=>{throw TypeError(a)};var Oi=(a,r,e)=>r in a?Rt(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e;var ji=(a,r)=>Rt(a,"name",{value:r,configurable:!0});var k=(a,r)=>()=>(a&&(r=a(a=0)),r);var $a=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),K=(a,r)=>{for(var e in r)Rt(a,e,{get:r[e],enumerable:!0})},Na=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of wa(r))!Ca.call(a,n)&&n!==e&&Rt(a,n,{get:()=>r[n],enumerable:!(t=Bi(r,n))||t.enumerable});return a};var z=a=>Na(Rt({},"__esModule",{value:!0}),a);var P=a=>{var r;return[,,,Sa((r=a==null?void 0:a[qi("metadata")])!=null?r:null)]},_i=["class","method","getter","setter","accessor","field","value","get","set"],hr=a=>a!==void 0&&typeof a!="function"?Pt("Function expected"):a,Ia=(a,r,e,t,n)=>({kind:_i[a],name:r,metadata:t,addInitializer:i=>e._?Pt("Already initialized"):n.push(hr(i||null))}),Ea=(a,r)=>Oi(r,qi("metadata"),a[3]),j=(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},B=(a,r,e,t,n,i)=>{var s,o,l,g,u,p=r&7,d=!!(r&8),m=!!(r&16),f=p>3?a.length+1:p?d?1:2:0,h=_i[p+5],x=p>3&&(a[f-1]=[]),y=a[f]||(a[f]=[]),w=p&&(!m&&!d&&(n=n.prototype),p<5&&(p>3||!m)&&Bi(p<4?n:{get[e](){return c(this,i)},set[e](A){return T(this,i,A)}},e));p?m&&p<4&&ji(i,(p>2?"set ":p>1?"get ":"")+e):ji(n,e);for(var S=t.length-1;S>=0;S--)g=Ia(p,e,l={},a[3],y),p&&(g.static=d,g.private=m,u=g.access={has:m?A=>La(n,A):A=>e in A},p^3&&(u.get=m?A=>(p^1?c:N)(A,n,p^4?i:w.get):A=>A[e]),p>2&&(u.set=m?(A,I)=>T(A,n,I,p^4?i:w.set):(A,I)=>A[e]=I)),o=(0,t[S])(p?p<4?m?i:w[h]:p>4?void 0:{get:w.get,set:w.set}:n,g),l._=1,p^4||o===void 0?hr(o)&&(p>4?x.unshift(o):p?m?i=o:w[h]=o:n=o):typeof o!="object"||o===null?Pt("Object expected"):(hr(s=o.get)&&(w.get=s),hr(s=o.set)&&(w.set=s),hr(s=o.init)&&x.unshift(s));return p||Ea(a,n),w&&Rt(n,e,w),m?p^4?i:w:n},oe=(a,r,e)=>Oi(a,typeof r!="symbol"?r+"":r,e),yn=(a,r,e)=>r.has(a)||Pt("Cannot "+e),La=(a,r)=>Object(r)!==r?Pt('Cannot use the "in" operator on this value'):a.has(r),c=(a,r,e)=>(yn(a,r,"read from private field"),e?e.call(a):r.get(a)),b=(a,r,e)=>r.has(a)?Pt("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),T=(a,r,e,t)=>(yn(a,r,"write to private field"),t?t.call(a,e):r.set(a,e),e),N=(a,r,e)=>(yn(a,r,"access private method"),e);var Ur=(a,r,e,t)=>({set _(n){T(a,r,n,e)},get _(){return c(a,r,t)}});var Mi,Di,zi=k(()=>{"use strict";Mi=(()=>{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,"list-range":11};return Object.setPrototypeOf(a,null),a})(),Di=(()=>{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})()});function Ne(a){return r=>{let e=new(typeof r=="string"?Map:WeakMap);if(e.has(r)){let n=e.get(r);return n.lastIndex=0,n}let t=a(r);return e.set(r,t),t}}var Je,jt=k(()=>{"use strict";Je=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25"))});var ke,Ui,je,Be,qe,Ie,dt,Wi,re,Zl,xe,Fa,Ra,gt,Hi,ed,Pa,ja,Bt,Oe,ee=k(()=>{"use strict";jt();ke=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,Ui=String.raw`[^[\]<>"\0-\x1F\x7F${ke}\uFFFD]`,je=String.raw`(?:\[[\da-f:.]+\]|${Ui})`,Be=String.raw`(?:${Ui}|\0\d+[cn!~]\x7F)*`,qe=a=>a.trim().toLowerCase(),Ie=(a,r)=>a.replace(/\0(\d+)\x7F/gu,(e,t)=>r[t]),dt=(a,r)=>e=>e.replace(a,r),Wi=dt(/[\0\x7F]|\r$/gmu,""),re=dt(/\0\d+[cn]\x7F/gu,""),Zl=dt(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),xe=(a,r="")=>a.map(e=>typeof e=="string"?e:e.text()).join(r),Fa={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Ra=dt(/&(?:#(\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)):Fa[e.toLowerCase()]),gt=a=>Ra(a),Hi=dt(/&#(\d+|x[\da-f]+);/giu,(a,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),ed=dt(/\n/gu,String.raw`\n`),Pa={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},ja=a=>dt(a,r=>`&${Pa[r]};`),Bt=ja(/[&<>]/gu),Oe=(a,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+a.map(i=>i.print()).join(n)+t}});var Gi=$a((nd,Ba)=>{Ba.exports={ext:[],html:[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link"]],namespaces:{"0":"","6":"File","10":"Template","14":"Category","828":"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},functionHook:["msgnw"],variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{msgnw:"msgnw",pageid:"pageid",articlepath:"articlepath",server:"server",servername:"servername",scriptpath:"scriptpath",stylepath:"stylepath","#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#related":"related","#cscore":"cscore","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#rmatch":"rmatch","#rreplace":"rreplace","#replace":"replace","#rsplit":"rsplit","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#translation":"translation","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"lst","#section-x":"lstx","#section-h":"lsth","#statements":"statements","#useliquidthreads":"useliquidthreads","#lqtpagelimit":"lqtpagelimit","#chart":"chart"},{"!":"!","=":"=","#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 kn,Vi=k(()=>{"use strict";kn=Gi()});var mr,qt,fr,xr,vn,R,te=k(()=>{"use strict";R=class{constructor(r,e){b(this,xr);b(this,mr);b(this,qt);b(this,fr);T(this,mr,r),T(this,qt,e)}get start(){return c(this,qt)}get top(){return N(this,xr,vn).call(this).top}get left(){return N(this,xr,vn).call(this).left}};mr=new WeakMap,qt=new WeakMap,fr=new WeakMap,xr=new WeakSet,vn=function(){var r;return(r=c(this,fr))!=null||T(this,fr,c(this,mr).getRootNode().posFromIndex(c(this,qt))),c(this,fr)}});var An,Xi,C,L,ve,Qi,_=k(()=>{"use strict";ae();te();V();An=(a,r,e,t)=>({line:a+e-1,character:(e===1?r:0)+t}),Xi=a=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof R?e:new R(r,s),{offsetHeight:g,offsetWidth:u}=r,{startIndex:p,startLine:d,startCol:m}=a(r,s,o,l),{line:f,character:h}=An(d,m,g,u);return{rule:t,message:$.msg(n),severity:i,startIndex:p,endIndex:p+r.toString().length,startLine:d,endLine:f,startCol:m,endCol:h}},C=Xi((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}}),L=Xi((a,r,e,t)=>({startIndex:r,startLine:e,startCol:t})),ve=(a,r,e)=>{if(a)return a[1];let t=r();return e([pe.rev,t]),t},Qi=(a,r)=>a==="ol"&&r==="type"?["1","a","A","i","I"]:a==="th"&&r==="scope"?["row","col","rowgroup","colgroup"]:r==="dir"?["ltr","rtl","auto"]:r==="aria-hidden"?["true","false"]:[]});var qa,Wr,Ki=k(()=>{"use strict";qa=(a,r,e)=>{if(a.includes("#")){let[t,...n]=a.split("#");return(!t||t===r)&&n.every(i=>i===e)}return!a||a===r},Wr=(a,r,e)=>({type:t,name:n})=>a.split(",").some(i=>qa(i.trim(),t,n))});var br,Ot,_t,Tr,yr,Mt,Dt,kr,Sn,zt,wn=k(()=>{"use strict";_();ae();zt=class{constructor(){b(this,kr);oe(this,"childNodes",[]);b(this,br);b(this,Ot);b(this,_t);b(this,Tr);b(this,yr);b(this,Mt);b(this,Dt,{})}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return c(this,br)}get nextSibling(){return c(this,Ot)}get previousSibling(){return c(this,_t)}get offsetHeight(){return N(this,kr,Sn).call(this).height}get offsetWidth(){return N(this,kr,Sn).call(this).width}getChildNodes(){let{childNodes:r}=this;return Object.isFrozen(r)?[...r]:r}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){switch(r){case"parentNode":T(this,br,e),e||(T(this,Ot,void 0),T(this,_t,void 0));break;case"nextSibling":T(this,Ot,e);break;case"previousSibling":T(this,_t,e);break;case"aIndex":T(this,Mt,[pe.rev,e]);break;default:this[r]=e}}getRootNode(){return ve(c(this,yr),()=>{var r,e;return(e=(r=this.parentNode)==null?void 0:r.getRootNode())!=null?e:this},r=>{let[,e]=r;e.type==="root"&&T(this,yr,r)})}indexFromPos(r,e){}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 ve(c(this,Dt)[r],()=>{let{childNodes:e}=this,t=r+(r<0?e.length:0),n=this.getAttribute("padding");for(let i=0;i<t;i++)c(this,Dt)[i]=[pe.rev,n],n+=e[i].toString().length+this.getGaps(i);return n},e=>{c(this,Dt)[r]=e})}getAbsoluteIndex(){return ve(c(this,Mt),()=>{let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0},r=>{T(this,Mt,r)})}getBoundingClientRect(){}is(r){return this.type===r}getLines(){return ve(c(this,Tr),()=>{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,Tr,r)})}seal(r,e){Object.defineProperty(this,r,{enumerable:!e&&!!this[r],configurable:!0})}};br=new WeakMap,Ot=new WeakMap,_t=new WeakMap,Tr=new WeakMap,yr=new WeakMap,Mt=new WeakMap,Dt=new WeakMap,kr=new WeakSet,Sn=function(){let r=this.getLines(),e=r[r.length-1];return{height:r.length,width:e[2]-e[1]}}});var Ye,Cn,$n,Hr,Ji=k(()=>{"use strict";ee();ae();Ki();wn();Hr=class extends zt{constructor(){super(...arguments);b(this,Ye)}get length(){return this.childNodes.length}text(e){return xe(this.childNodes,e)}normalize(){let e=this.getChildNodes(),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 vr(this,e,1)[0]}insertAt(e,t=this.length){return vr(this,t,0,[e]),e}closest(e){let t=Wr(e,this),{parentNode:n}=this;for(;n;){if(t(n))return n;({parentNode:n}=n)}}querySelector(e){let t=Wr(e,this);return N(this,Ye,Cn).call(this,t)}querySelectorAll(e){let t=Wr(e,this);return N(this,Ye,$n).call(this,t)}append(...e){this.safeAppend(e)}safeAppend(e){for(let t of e)this.insertAt(t)}replaceChildren(...e){this.safeReplaceChildren(e)}safeReplaceChildren(e){for(let t=this.length-1;t>=0;t--)this.removeAt(t);this.safeAppend(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];o.setAttribute("aIndex",s);let l=o.lint(s,t);l.length>0&&n.push(...l),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}">`)+Oe(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();o.setAttribute("aIndex",s),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}};Ye=new WeakSet,Cn=function(e){var t;for(let n of this.childNodes){if(n.type==="text")continue;if(e(n))return n;let i=N(t=n,Ye,Cn).call(t,e);if(i)return i}},$n=function(e){var n;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t=[...t,...N(n=i,Ye,$n).call(n,e)]);return t}});var Nn,Yi,Oa,_a,Ma,Da,za,Ua,In,Gr,Zi,Ar,es=k(()=>{"use strict";ee();_();V();wn();Nn=String.raw`[${ke}\t]*`,Yi=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${Nn}\d)|isbn(?=[-::]?${Nn}(?:\d(?:${Nn}|-)){6})`,Oa=new RegExp(String.raw`${Yi}|https?[:/]/+`,"giu"),_a=new RegExp(Yi,"giu"),Ma=new Set(["attr-value","ext-link-text","link-text"]),Da={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},za={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},Ua=["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{In=new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch{In=/\w/u}Ar=class extends zt{constructor(e){super();b(this,Gr);oe(this,"data","");this.data=e}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?re(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var M,F,H;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:g,parentNode:u}=i,p=!1;if(l==="attr-value"){let{type:G,name:ge,tag:ne}=u;if(G!=="ext-attr")p=!0;else if(ne==="choose"&&(ge==="before"||ge==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&g==="link"||p?_a:Oa),n.search(t)===-1)return[];t.lastIndex=0;let d=[],m=s==null?void 0:s.type,f=s==null?void 0:s.name,h=o==null?void 0:o.type,x=this.getRootNode(),y=x.toString(),{ext:w,html:S}=x.getAttribute("config"),{top:A,left:I}=x.posFromIndex(e),q=new Set(["onlyinclude","noinclude","includeonly",...w,...S[0],...S[1],...S[2],...Ua]);for(let G=t.exec(n);G;G=t.exec(n)){let[,ge,ne]=G,{index:J,0:Y}=G;if(ne&&ne!=="]"){let{length:he}=ne;J+=he,Y=Y.slice(he)}Y=Y.toLowerCase();let{0:E,length:Ce}=Y,ye=E==="r"||E==="p"||E==="i";if(E==="<"&&!q.has(ge.toLowerCase())||E==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(n.slice(J+1))||s!=null&&s.is("ext")&&f==="nowiki"&&((M=s.innerText)!=null&&M.includes("]")))||ye&&(!i.isPlain()||Ma.has(l)))continue;E==="]"&&(J||Ce>1)&&t.lastIndex--;let se=e+J,Pe=se+Ce,$e=y[Pe],zr=y[se-1],xn=Ce>1&&!(E==="<"&&!/[\s/>]/u.test($e!=null?$e:"")||p&&(E==="["||E==="]")||ye&&l==="parameter-value")||E==="{"&&($e===E||zr==="-")||E==="}"&&(zr===E||$e==="-")||E==="["&&($e===E||l==="ext-link-text"||m==="free-ext-link"&&!n.slice(J+1).trim())||E==="]"&&(zr===E||h==="free-ext-link"&&!n.slice(0,J).includes("]"))?"error":"warning",bn=E==="{"||E==="[";if(xn==="warning"&&(bn||(E==="]"||E==="}"))){let he=Da[E],Tn=bn?n.slice(J+1):n.slice(0,J);if(E==="{"&&((F=he.exec(Tn))==null?void 0:F[0])==="}"||E==="}"&&((H=he.exec(Tn))==null?void 0:H[0])==="{")continue;if(!Tn.includes(E)){let Pi=bn?"nextSibling":"previousSibling",lt=this[Pi];for(;lt&&(lt.type!=="text"||!he.test(lt.data));)lt=lt[Pi];if(lt&&he.exec(lt.data)[0]!==E)continue}}ye&&(Y=Y.toUpperCase());let Li=this.posFromIndex(J),{line:Fi,character:Ri}=An(A,I,Li.top+1,Li.left),Ft={rule:za[E],message:$.msg('lonely "$1"',ye||E==="h"?Y:E),severity:xn,startIndex:se,endIndex:Pe,startLine:Fi,endLine:Fi,startCol:Ri,endCol:Ri+Ce};if(E==="<")Ft.suggestions=[{desc:"escape",range:[se,se+1],text:"<"}];else if(E==="h"&&l!=="link-text"&&In.test(zr||""))Ft.suggestions=[{desc:"whitespace",range:[se,se],text:" "}];else if(E==="["&&l==="ext-link-text"){let he=i.getAbsoluteIndex()+i.toString().length;Ft.suggestions=[{desc:"escape",range:[he,he+1],text:"]"}]}else if(E==="]"&&h==="free-ext-link"&&xn==="error"){let he=e-o.toString().length;Ft.fix={range:[he,he],text:"[",desc:"left bracket"}}else ye&&(Ft.suggestions=[...G[0]===Y?[]:[{desc:"uppercase",range:[se,Pe],text:Y}],...$e===":"||$e===":"?[{desc:"whitespace",range:[Pe,Pe+1],text:" "}]:[]]);d.push(Ft)}return d}replaceData(e){N(this,Gr,Zi).call(this,e)}print(){return Bt(this.data)}};Gr=new WeakSet,Zi=function(e){this.setAttribute("data",e)}});var be,pt=k(()=>{"use strict";ae();be=(a=!0,r=!0)=>e=>{class t extends e{text(){return""}lint(i){return a?[]:super.lint(i)}}return Ee(t,e),t}});var Sr,ue,ut=k(()=>{"use strict";O();ue=class extends v{constructor(e,t,n,i,s){super(e,n,i,s);b(this,Sr);T(this,Sr,t)}get type(){return c(this,Sr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};Sr=new WeakMap});var le,_e=k(()=>{"use strict";ae();le=({length:a})=>r=>{class e extends r{getAttribute(n){return n==="padding"?a:super.getAttribute(n)}}return Ee(e,r),e}});var Ut,X,Me=k(()=>{"use strict";O();X=class extends v{constructor(e,t,n,i,s){super(e,n,i,s);b(this,Ut);T(this,Ut,t)}get type(){return c(this,Ut)}set type(e){T(this,Ut,e)}};Ut=new WeakMap});var Wa,ts,ct,Ae,De,En,Ha,me,wr=k(()=>{"use strict";_();ee();te();_e();O();Me();Wa=a=>a==="redirect-target"||a==="link";ts=[le("[[")];me=class extends(Ha=v){constructor(e,t,n,i=[],s="|"){super(void 0,n,i,{});b(this,ct,!0);b(this,Ae);b(this,De);if(this.insertAt(new X(e,"link-target",n,i,{})),t!==void 0){let o=new v(t,n,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}T(this,Ae,s)}get link(){}get fragment(){return c(this,De).fragment}afterBuild(){T(this,De,this.getTitle()),c(this,Ae).includes("\0")&&T(this,Ae,this.buildFromStr(c(this,Ae),0)),this.setAttribute("name",c(this,De).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?T(this,ct,t):e==="title"?T(this,De,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,c(this,Ae));return c(this,ct)?`[[${t}]]`:t}text(){let e=super.text("|");return c(this,ct)?`[[${e}]]`:e}getAttribute(e){return e==="title"?c(this,De):super.getAttribute(e)}getGaps(e){return e===0?c(this,Ae).length:1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:g}=c(this,De),u=new R(this,e);if(i.childNodes.some(({type:p})=>p==="template")&&n.push(C(i,u,"unknown-page","template in an internal link target","warning")),l){let p=C(i,u,"url-encoding","unnecessary URL encoding in an internal link");p.suggestions=[{desc:"decode",range:[p.startIndex,p.endIndex],text:Je(i.text())}],n.push(p)}if(o==="link"||o==="category"){let p=s==null?void 0:s.childNodes.findIndex(m=>m.type==="text"&&m.data.includes("|")),d=s==null?void 0:s.childNodes[p];if(d){let m=C(s,u,"pipe-like",'additional "|" in the link text',"warning"),f=m.startIndex+s.getRelativeIndex(p);m.suggestions=[{desc:"escape",range:[f,f+d.data.length],text:d.data.replace(/\|/gu,"|")}],n.push(m)}}if(g!==void 0&&!Wa(o)){let p=C(i,u,"no-ignored","useless fragment"),d=i.childNodes.findIndex(f=>f.type==="text"&&f.data.includes("#")),m=i.childNodes[d];m&&(p.fix={range:[p.startIndex+i.getRelativeIndex(d)+m.data.indexOf("#"),p.endIndex],text:"",desc:"remove"}),n.push(p)}return n}getTitle(e,t){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:t,temporary:e,decode:!0,selfLink:!0})}print(){return super.print(c(this,ct)?{pre:"[[",post:"]]",sep:c(this,Ae)}:{sep:c(this,Ae)})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t),{type:i,fragment:s}=this;return s!==void 0&&(i==="link"||i==="redirect-target")&&(n.fragment=s),n}};En=P(Ha),ct=new WeakMap,Ae=new WeakMap,De=new WeakMap,me=B(En,0,"LinkBaseToken",ts,me),j(En,1,me)});var de,Ze=k(()=>{"use strict";O();de=class extends v{get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}}});var rs,Ln,Ga,D,ze=k(()=>{"use strict";pt();Ze();rs=[be()];D=class extends(Ga=de){get type(){return"noinclude"}toString(r){return r?"":super.toString()}};Ln=P(Ga),D=B(Ln,0,"NoincludeToken",rs,D),j(Ln,1,D)});var Vr,ns=k(()=>{"use strict";_();wr();ze();Vr=class extends me{get type(){return"redirect-target"}constructor(r,e,t,n){super(r,void 0,t,n),e!==void 0&&this.insertAt(new D(e,t,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!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 is,et,Wt,Fn,Va,ht,ss=k(()=>{"use strict";pt();O();ut();ns();is=[be(!1,!1)];ht=class extends(Va=v){constructor(e,t,n,i,s,o,l=[]){super(void 0,o,l);b(this,et);b(this,Wt);T(this,et,e),T(this,Wt,s),this.append(new ue(t,"redirect-syntax",o,l),new Vr(n,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?c(this,et).length:super.getAttribute(e)}toString(e){return c(this,et)+super.toString(e)+c(this,Wt)}lint(e=this.getAbsoluteIndex()){let t=e+c(this,et).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",t),this.lastChild.lint(t)}print(){return super.print({pre:c(this,et),post:c(this,Wt)})}};Fn=P(Va),et=new WeakMap,Wt=new WeakMap,ht=B(Fn,0,"RedirectToken",is,ht),j(Fn,1,ht)});var os={};K(os,{parseRedirect:()=>Xa});var Xa,as=k(()=>{"use strict";V();ss();Xa=(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&&$.normalizeTitle(t[3],0,!1,r,{halfParsed:!0,temporary:!0,decode:!0}).valid?(a=`\0${e.length}o${a.slice(t[0].length)}`,new ht(...t.slice(1),r,e),a):!1}});var ls,Rn,Qa,mt,ds=k(()=>{"use strict";_e();O();ls=[le("<onlyinclude>")];mt=class extends(Qa=v){get type(){return"onlyinclude"}toString(r){return`<onlyinclude>${super.toString(r)}</onlyinclude>`}isPlain(){return!0}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}};Rn=P(Qa),mt=B(Rn,0,"OnlyincludeToken",ls,mt),j(Rn,1,mt)});var tt,Cr=k(()=>{"use strict";ae();tt=(a=1)=>r=>{class e extends r{getGaps(){return a}}return Ee(e,r),e}});var gs,rt,Pn,Ka,we,Xr=k(()=>{"use strict";Cr();O();gs=[tt()];we=class extends(Ka=v){constructor(e,t,n,i,s,o=[]){super(void 0,s);b(this,rt);oe(this,"closed");oe(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),T(this,rt,[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]=c(this,rt);return t?`<${s}${n.toString(e)}/>`:`<${s}${n.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=c(this,rt);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?c(this,rt)[0].length+1:super.getAttribute(e)}print(){let[e,t]=c(this,rt);return super.print(this.selfClosing?{pre:`<${e}`,post:"/>"}:{pre:`<${e}`,sep:">",post:this.closed?`</${t}>`:""})}};Pn=P(Ka),rt=new WeakMap,we=B(Pn,0,"TagPairToken",gs,we),j(Pn,1,we)});var Kr,ps,Qr,us=k(()=>{"use strict";O();Xr();ut();ze();Qr=class extends we{constructor(e,t,n,i=[]){let s=new ue(e,"translate-attr",n,i);t=t==null?void 0:t.replace(/(<tvar\|[^>]+>)([\s\S]*?)(<\/>)/gu,(l,g,u,p)=>(new D(g,n,i),new D(p,n,i),`\0${i.length-1}n${u}\0${i.length}n`)).replace(/(<tvar\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\2|[^"'\s>]+))?\s*>)([\s\S]*?)(<\/tvar\s*>)/giu,(l,g,u,p,d)=>(new D(g,n,i),new D(d,n,i),`\0${i.length-1}n${p}\0${i.length}n`));let o=new v(t,n,i);o.type="translate-inner";super("translate",s,o,"translate",n,i);b(this,Kr);this.seal("closed",!0),this.seal("selfClosing",!0)}get type(){return"translate"}toString(e){return e?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){return`<span class="wpb-ext"><translate${N(this,Kr,ps).call(this)?'<span class="wpb-ext-attrs"> <span class="wpb-ext-attr"><span class="wpb-attr-key">nowrap</span></span></span>':""}>${this.lastChild.print({class:"ext-inner"})}</translate></span>`}};Kr=new WeakSet,ps=function(){return this.firstChild.toString()===" nowrap"}});var cs,jn,Ja,ft,hs=k(()=>{"use strict";_();te();pt();V();Xr();cs=[be(!1)];ft=class extends(Ja=we){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 R(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=L(this,s,"unclosed-comment",$.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};jn=P(Ja),ft=B(jn,0,"IncludeToken",cs,ft),j(jn,1,ft)});var Ht,Jr=k(()=>{"use strict";ae();Ht=(a=0)=>r=>{var t,ms;class e extends r{constructor(){super(...arguments);b(this,t)}getAttr(o){return N(this,t,ms).call(this).getAttr(o)}}return t=new WeakSet,ms=function(){return this.childNodes[a]},Ee(e,r),e}});var Z,fs,xs,Yr,qn,bs,Gt,ys,ks,vs,Bn,Ts,Le,As,Ss,ws,Cs,$s=k(()=>{"use strict";Z=new Set(["align"]),fs=new Set(["cite"]),xs=new Set(["cite","datetime"]),Yr=new Set(["width"]),qn=new Set(["axis","align","bgcolor","height","width","valign"]),bs=new Set([...qn,"abbr","headers","scope","rowspan","colspan"]),Gt=new Set(["type"]),ys=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),ks=new Set(["clear"]),vs=new Set(["bgcolor","align","valign"]),Bn=new Set(["qid","forcemathmode","type","display"]),Ts=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),Le=new Set,As=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"]),Ss={div:Z,h1:Z,h2:Z,h3:Z,h4:Z,h5:Z,h6:Z,blockquote:fs,q:fs,p:Z,br:ks,pre:Yr,ins:xs,del:xs,ul:Gt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...ys,"border"]),caption:Z,tr:vs,td:bs,th:bs,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:Yr,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Gt,poem:Z,categorytree:Z,combooption:Z,math:Le,chem:Le,ce:Le},ws={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:Le,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:Le,inputbox:Le,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Le,poll:new Set(["id","show-results-before-voting"]),sm2:Gt,flashmp3:Gt,score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),tab:new Set(["nested","name","index","class","block","inline","openname","closename","collapsed","dropdown","style","bgcolor","container","id","title"]),tabs:new Set(["plain","class","container","id","title","style"]),combobox:new Set(["placeholder","value","id","class","text","dropdown","style"]),math:new Set([...Bn,"chem"]),chem:Bn,ce:Bn,hiero:Le,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:Ts,syntaxhighlight:Ts,templatedata:Le,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:Le},Cs={table:ys,td:new Set([...qn,"scope"]),th:qn,br:ks,caption:Z,div:Z,hr:Yr,h1:Z,h2:Z,h3:Z,h4:Z,h5:Z,h6:Z,li:Gt,p:Z,pre:Yr,tr:vs,ul:Gt}});var Ya,Za,$r,Vt,ie,Fe,Xt,Ns=k(()=>{"use strict";_();ee();$s();te();V();O();Me();Ya=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Za=new Set(["ext","arg","magic-word","template"]),Xt=class extends v{constructor(e,t,n,i="",s,o=[],l=$.getConfig(),g=[]){let u=new X(n,"attr-key",l,g),p;if(n==="title"||t==="img"&&n==="alt")p=new v(s,l,g,{}),p.type="attr-value",p.setAttribute("stage",10);else if(t==="gallery"&&n==="caption"||t==="choose"&&(n==="before"||n==="after")){let d={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};p=new v(s,d,g,{}),p.type="attr-value",p.setAttribute("stage",1)}else p=new X(s,"attr-value",l,g,{});super(void 0,l,g);b(this,$r);b(this,Vt);b(this,ie);b(this,Fe);T(this,$r,e),this.append(u,p),T(this,ie,i),T(this,Fe,[...o]),T(this,Vt,t),this.setAttribute("name",qe(re(n)))}get type(){return c(this,$r)}get tag(){return c(this,Vt)}get balanced(){return!c(this,ie)||c(this,Fe)[0]===c(this,Fe)[1]}afterBuild(){c(this,ie).includes("\0")&&T(this,ie,this.buildFromStr(c(this,ie),0)),this.parentNode&&T(this,Vt,this.parentNode.name),this.setAttribute("name",qe(this.firstChild.text())),super.afterBuild()}toString(e){let[t="",n=""]=c(this,Fe);return c(this,ie)?super.toString(e,c(this,ie)+t)+n:this.firstChild.toString(e)}text(){return c(this,ie)?`${super.text(`${c(this,ie).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return c(this,ie)?c(this,ie).length+((t=(e=c(this,Fe)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var x;let n=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:g,tag:u}=this,p=this.getValue(),d=new R(this,e);if(!i){let y=C(o,d,"unclosed-quote",$.msg("unclosed $1","quotes"),"warning");y.startIndex--,y.startCol--,y.suggestions=[{range:[y.endIndex,y.endIndex],text:c(this,Fe)[0],desc:"close"}],n.push(y)}let m=ws[u],f=Ss[u],{length:h}=this.toString();if(!(m!=null&&m.has(g))&&!(f!=null&&f.has(g))&&(l==="ext-attr"?m||f:!/\{\{[^{]+\}\}/u.test(g))&&(l==="ext-attr"&&!f||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(g)&&(u==="meta"||u==="link"||!As.has(g)))){let y=C(s,d,"illegal-attr","illegal attribute name");y.suggestions=[{desc:"remove",range:[e,e+h],text:""}],n.push(y)}else if(g==="style"&&typeof p=="string"&&Ya.test(p))n.push(C(o,d,"insecure-style","insecure style"));else if(g==="tabindex"&&typeof p=="string"&&p!=="0"){let y=C(o,d,"illegal-attr","nonzero tabindex");y.suggestions=[{desc:"remove",range:[e,e+h],text:""},{desc:"0 tabindex",range:[y.startIndex,y.endIndex],text:"0"}],n.push(y)}else if(l!=="ext-attr"&&!o.childNodes.some(({type:y})=>Za.has(y))){let y=Qi(u,g),w=String(p).toLowerCase();y.length>0&&y.every(S=>S!==w)&&n.push(C(o,d,"illegal-attr","illegal attribute value","warning"))}return(x=Cs[u])!=null&&x.has(g)&&n.push(C(s,d,"obsolete-attr","obsolete attribute","warning")),n}getValue(){return c(this,ie)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=c(this,Fe);return c(this,ie)?super.print({sep:Bt(c(this,ie))+e,post:t}):super.print()}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.tag=this.tag,n}};$r=new WeakMap,Vt=new WeakMap,ie=new WeakMap,Fe=new WeakMap});var Is,el,On,Nr,nt,Zr=k(()=>{"use strict";_();ee();te();V();O();Me();Ns();Is=a=>a.slice(0,-1),el=a=>`${Is(a)}-dirty`;try{On=new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch{On=/[^\W_]/u}nt=class extends v{constructor(e,t,n,i,s=[]){super(void 0,i,s,{});b(this,Nr);if(T(this,Nr,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="",g=o.exec(e),u=0,p=()=>{l&&(super.insertAt(new X(l,el(t),i,s,{})),l="")};for(;g;){let{index:d,0:m,1:f,2:h,3:x,4:y,5:w,6:S}=g;if(l+=e.slice(u,d),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(re(f).trim())){let A=y!=null?y:S,I=[x,w],q=new Xt(Is(t),n,f,h,A,I,i,s);p(),super.insertAt(q)}else l+=m;({lastIndex:u}=o),g=o.exec(e)}l+=e.slice(u),p()}}get type(){return c(this,Nr)}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 Xt&&(!e||t.name===qe(e)))}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,g=new R(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let u=L(this,g,"no-ignored","attributes of a closing tag"),p=i.getAbsoluteIndex();u.suggestions=[{desc:"remove",range:[e,u.endIndex],text:""},{desc:"open",range:[p+1,p+2],text:""}],n.push(u)}for(let u of s)if(u instanceof Xt){let{name:p}=u;o.has(p)?(l.add(p),o.get(p).push(u)):o.set(p,[u])}else{let p=u.text().trim();if(p){let d=C(u,g,"no-ignored","containing invalid attribute",On.test(p)?"error":"warning");d.suggestions=[{desc:"remove",range:[d.startIndex,d.endIndex],text:" "}],n.push(d)}}if(l.size>0)for(let u of l){let p=o.get(u).map(d=>{let m=d.getValue();return[d,m===!0?"":m]});n.push(...p.map(([d,m],f)=>{let h=C(d,g,"no-duplicate",$.msg("duplicated $1 attribute",u)),x={desc:"remove",range:[h.startIndex,h.endIndex],text:""};return!m||p.slice(0,f).some(([,y])=>y===m)?h.fix=x:h.suggestions=[x],h}))}return n}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof X?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};Nr=new WeakMap});var Es={};K(Es,{PreToken:()=>_n});var _n,Ls=k(()=>{"use strict";O();ze();_n=class extends v{get type(){return"ext-inner"}constructor(r,e,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),g=0,u="";for(;o&&l;)new D(o[0],e,t),new D(l[0],e,t),u+=`${r.slice(g,o.index)}\0${t.length-1}n${r.slice(o.index+s,l.index)}\0${t.length}n`,g=l.index+s+1,n.lastIndex=g,o=n.exec(r),o&&(i.lastIndex=o.index+s),l=i.exec(r);r=u+r.slice(g)}super(r,e,t,{}),this.setAttribute("stage",10)}isPlain(){return!0}lint(r=this.getAbsoluteIndex()){return super.lint(r,/<\s*\/\s*(pre)\b/giu)}}});var Qt,en=k(()=>{"use strict";ae();Qt=a=>{class r extends a{toString(t){return super.toString(t,`
|
|
12
3
|
`)}text(){return super.text(`
|
|
13
4
|
`).replace(/\n\s*\n/gu,`
|
|
14
|
-
`)}getGaps(){return 1}
|
|
15
|
-
`})}
|
|
16
|
-
`),i=new Set(e.protocol.split("|")),s=U,o=!0,l=!1;for(let d of n){let p=d.trim();if(!(l||!p||p.startsWith("#"))){if(o){let g=d.indexOf("|"),u=g===-1?d:d.slice(0,g),{valid:h,ns:f}=this.normalizeTitle(u,0,{halfParsed:!0,temporary:!0});if(h&&f===6){let m=new Dt("imagemap",u,g===-1?void 0:d.slice(g+1),e,t);super.insertAt(m),o=!1;continue}else l=!0}else if(d.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(d);continue}else if(d.includes("[")){let g=d.indexOf("["),u=d.slice(g),h=/^\[\[([^|]+)(?:\|([^\]]+))?\]\][\w\s]*$/u.exec(u);if(h){if(this.normalizeTitle(h[1],0,{halfParsed:!0,temporary:!0,selfLink:!0}).valid){super.insertAt(new kr(d.slice(0,g),h.slice(1),u.slice(u.indexOf("]]")+2),e,t));continue}}else if(i.has(u.slice(1,u.indexOf(":")+1))||i.has(u.slice(1,u.indexOf("//")+2))){let f=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(u);if(f){super.insertAt(new kr(d.slice(0,g),f.slice(1),u.slice(u.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(d,e,t))}}toString(r){return super.toString(r,`
|
|
17
|
-
|
|
18
|
-
`).
|
|
19
|
-
`)}
|
|
20
|
-
`})}}});var ba,Jr,Ss=y(()=>{"use strict";Tt();q();_();We();ba=we(a=>new RegExp(String.raw`<\s*(?:/\s*)${a==="nowiki"?"":"?"}(${a})\b`,"giu")),Jr=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 n=F(this,{start:r},"void-ext",A.msg("nothing should be in <$1>",e));return n.fix={range:[r,n.endIndex],text:"",desc:"empty"},[n]}return super.lint(r,ba(e))}}});var Yr={};le(Yr,{NestedToken:()=>_n});var Ta,ya,vr,Gt,_n,Zr=y(()=>{"use strict";q();X();mr();Gr();_();j();Mn();Ge();Ta=new Set(["comment","include","arg","template","magic-word"]),ya=[!1,!0].map(a=>{let r=a?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${r}(?:\s[^>]*)?/?>|</${r}\s*>)$`,"iu")}),_n=class extends k{constructor(e,t,n,i,s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=nt(e,i,s,t)),e&&(e=Tr(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,d,p,g)=>{let u=`\0${s.length+1}e\x7F`;return new Oe(l,d,p,g,i,!1,s),u}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,d)=>(new U(d,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);T(this,vr);T(this,Gt);b(this,vr,[...n]),b(this,Gt,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let n=new P(this,e),i=typeof c(this,Gt)=="boolean"?ya[c(this,Gt)?1:0]:/^<!--[\s\S]*-->$/u;return[...super.lint(e,t),...this.childNodes.filter(s=>{let{type:o,name:l}=s;if(o==="ext")return!c(this,vr).includes(l);if(Ta.has(o))return!1;let d=s.toString().trim();return d&&!i.test(d)}).map(s=>{let o=w(s,n,"no-ignored",A.msg("invalid content in <$1>",this.name));return o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""},{desc:"comment",range:[o.startIndex,o.endIndex],text:`<!--${s.toString()}-->`}],o})]}};vr=new WeakMap,Gt=new WeakMap});var ws,Cs,Dn,ka,Oe,Mn=y(()=>{"use strict";q();X();_();Br();j();Sn();_r();Zi();In();cs();ks();As();Ss();ws=(a,r)=>{let e=new Set(a);return e.delete(r),[...e]};Cs=[Lt()];Oe=class extends(ka=Et){get type(){return"ext"}constructor(r,e,t,n,i=A.getConfig(),s=!1,o=[]){var u;let l=r.toLowerCase(),d=new Ve(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),p={...i,ext:ws(i.ext,l),excludes:[...(u=i.excludes)!=null?u:[]]},g;switch(p.inExt=!0,l){case"tab":p.ext=ws(p.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":l==="poem"&&p.excludes.push("heading"),g=new k(t,p,o);break;case"pre":g=new Mr(t,p,o);break;case"dynamicpagelist":g=new jt(s,t,p,o);break;case"inputbox":p.excludes.push("heading"),g=new Ur(s,t,p,o);break;case"references":{let{NestedToken:h}=(Zr(),K(Yr));p.excludes.push("heading"),g=new h(t,s,["ref"],p,o);break}case"choose":{let{NestedToken:h}=(Zr(),K(Yr));g=new h(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],p,o);break}case"combobox":{let{NestedToken:h}=(Zr(),K(Yr));g=new h(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],p,o);break}case"gallery":g=new Xr(t,p,o);break;case"imagemap":g=new Kr(t,p,o);break;default:g=new Jr(t,p,o)}g.setAttribute("name",l),g.type==="plain"&&(g.type="ext-inner"),super(r,d,g,n,i,o),this.seal("closed",!0)}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new P(this,r);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(F(this,n,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(F(this,n,"var-anchor","variable anchor in a section header")),t}};Dn=re(ka),Oe=ie(Dn,0,"ExtToken",Cs,Oe),ne(Dn,1,Oe)});var $s,zn,va,dt,Is=y(()=>{"use strict";q();Ze();_();We();$s=[xe(!1)];dt=class extends(va=ae){constructor(e,t,n,i){super(e,n,i);se(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=F(this,{start:e},"unclosed-comment",A.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?"-->":""})}};zn=re(va),dt=ie(zn,0,"CommentToken",$s,dt),ne(zn,1,dt)});var Ls={};le(Ls,{parseCommentAndExt:()=>nt});var Es,Aa,Wn,Sa,Ns,nt,mr=y(()=>{"use strict";Tt();Bi();Ge();qi();Mn();Is();Es="<onlyinclude>",Aa="</onlyinclude>",{length:Wn}=Es,Sa=[!1,!0].map(a=>{let r=a?"includeonly":"(?:no|only)include",e=a?"noinclude":"includeonly";return we(t=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${r}(?:\s[^>]*)?/?>|</${r}\s*>|<(${t.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${e})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${e}\s*)>|$))`,"giu"))}),Ns=a=>{let r=a.indexOf(Es);return{i:r,j:a.indexOf(Aa,r+Wn)}},nt=(a,r,e,t)=>{if(t){let{i:n,j:i}=Ns(a);if(n!==-1&&i!==-1){let s="",o=l=>{new U(l,r,e),s+=`\0${e.length-1}n\x7F`};for(;n!==-1&&i!==-1;){let l=`\0${e.length}e\x7F`;new jr(a.slice(n+Wn,i),r,e),n>0&&o(a.slice(0,n)),s+=l,a=a.slice(i+Wn+1),{i:n,j:i}=Ns(a)}return a&&o(a),s}}return a.replace(Sa[t?1:0](r.ext),(n,i,s,o,l,d,p,g,u)=>{let h=e.length,f="n";if(i)f="e",new Oe(i,s,o,l,r,d,e);else if(n.startsWith("<!--")){f="c";let m=n.endsWith("-->");new dt(n.slice(4,m?-3:void 0),m,r,e)}else d?new rt(d,p,g,u,r,e):new U(n,r,e);return`\0${h}${f}\x7F`})}});var wa,Ca,$a,Fs,Ut,Ie,Qe,qe,Gn,Ia,gt,Rs=y(()=>{"use strict";q();ce();X();Br();j();wa=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),Ca=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"]),$a=new Set(["strike","big","center","font","tt"]);Fs=[Lt()];gt=class extends(Ia=k){constructor(e,t,n,i,s,o){super(void 0,s,o);T(this,Ut);T(this,Ie);T(this,Qe);T(this,qe);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),b(this,Ut,n),b(this,Ie,i),b(this,Qe,e)}get type(){return"html"}get selfClosing(){return c(this,Ie)}get closing(){return c(this,Ut)}toString(e){return`<${this.closing?"/":""}${c(this,Qe)}${super.toString(e)}${c(this,Ie)?"/":""}>`}text(){let{closing:e}=this,t=c(this,Qe)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,Ie)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,Qe).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{name:i,parentNode:s,closing:o,selfClosing:l}=this,d=new P(this,e);if(i==="h1"&&!o){let m=F(this,d,"h1","<h1>");m.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],n.push(m)}if(this.closest("table-attrs")){let m=F(this,d,"parsing-order","HTML tag in table attributes");m.fix={desc:"remove",range:[e,m.endIndex],text:""},n.push(m)}$a.has(i)&&n.push(F(this,d,"obsolete-tag","obsolete HTML tag","warning")),(i==="b"||i==="strong")&&this.closest("heading-title")&&n.push(F(this,d,"bold-header","bold in section header","warning"));let{html:[,p,g]}=this.getAttribute("config"),u=g.includes(i),h=p.includes(i);if(o&&(l||u)||l&&(!u&&!h)){let m=F(this,d,"unmatched-tag",o?"tag that is both closing and self-closing":"invalid self-closing tag"),x={desc:"open",range:[e+1,e+2],text:""},v={desc:"no self-closing",range:[m.endIndex-2,m.endIndex-1],text:""};h?m.suggestions=[x,v]:o?m.fix=u?x:v:m.suggestions=[v,{desc:"close",range:[m.endIndex-2,m.endIndex],text:`></${i}>`}],n.push(m)}else if(!this.findMatchingTag()){let m=F(this,d,"unmatched-tag",o?"unmatched closing tag":"unclosed tag");if(o){let x=this.closest("magic-word");x&&wa.has(x.name)?m.severity="warning":m.suggestions=[{desc:"remove",range:[e,m.endIndex],text:""}]}else{let x=s==null?void 0:s.childNodes;Ca.has(i)&&(x!=null&&x.slice(0,x.indexOf(this)).some(({type:v,name:C})=>v==="html"&&C===i))?m.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(m.severity="warning")}n.push(m)}return n}findMatchingTag(){return ve(c(this,qe),()=>{let{name:e,parentNode:t,closing:n,selfClosing:i}=this,{html:[,s,o]}=this.getAttribute("config"),l=o.includes(e),d=s.includes(e);if(l||d&&i)return this;if(!t)return;let{childNodes:p}=t,g=p.indexOf(this),u=n?p.slice(0,g).reverse():p.slice(g+1),h=[this],{rev:f}=de;for(let m of u)if(!(!m.is("html")||m.name!==e||d&&c(m,Ie)))if(c(m,Ut)===n)h.push(m);else{let x=h.pop();if(x===this)return m;b(x,qe,[f,m]),b(m,qe,[f,x])}for(let m of h)b(m,qe,[f,void 0])},e=>{b(this,qe,e),e[1]&&e[1]!==this&&b(e[1],qe,[de.rev,this])})}print(){return super.print({pre:`<${this.closing?"/":""}${c(this,Qe)}`,post:`${c(this,Ie)?"/":""}>`})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return Object.assign(n,{closing:this.closing,selfClosing:c(this,Ie)}),n}};Gn=re(Ia),Ut=new WeakMap,Ie=new WeakMap,Qe=new WeakMap,qe=new WeakMap,gt=ie(Gn,0,"HtmlToken",Fs,gt),ne(Gn,1,gt)});var Ps={};le(Ps,{parseHtml:()=>Ea});var Na,Ea,js=y(()=>{"use strict";_r();Rs();Na=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,Ea=(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=Na.exec(o),d=l==null?void 0:l[2],p=d==null?void 0:d.toLowerCase();if(!l||!r.htmlElements.has(p)){i+=`<${o}`;continue}let[,g,,u="",h,f]=l,{length:m}=e,x=new Ve(u,"html-attrs",p,r,e),v=x.getAttr("itemprop");if(p==="meta"&&(v===void 0||x.getAttr("content")===void 0)||p==="link"&&(v===void 0||x.getAttr("href")===void 0)){i+=`<${o}`,e.length=m;continue}i+=`\0${e.length}x\x7F${f}`,new gt(d,x,g==="/",h==="/>",r,e)}return i}});var Ht,Un=y(()=>{"use strict";Br();_();j();$t();_r();Ht=class extends Lt(1)(k){constructor(r,e,t,n,i=A.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new be(e,"table-syntax",i,s),new Ve(n,"table-attrs",t,i,s))}}});var Te,Ar,Sr,Hn,Vt,Vn=y(()=>{"use strict";q();X();_();j();Un();Vt=class extends Ht{constructor(e,t,n=A.getConfig(),i=[]){var d;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);T(this,Sr);T(this,Te,"");T(this,Ar);s&&([Nr(this,Te)._]=s);let l=new k(t==null?void 0:t.slice(((d=s==null?void 0:s.index)!=null?d:NaN)+c(this,Te).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 N(this,Sr,Hn).call(this).subtype}afterBuild(){c(this,Te).includes("\0")&&b(this,Te,this.buildFromStr(c(this,Te),0)),super.afterBuild()}toString(e){let{childNodes:[t,n,i]}=this;return t.toString(e)+n.toString(e)+c(this,Te)+i.toString(e)}text(){let{childNodes:[e,t,n]}=this;return e.text()+t.text()+c(this,Te)+n.text()}getGaps(e){return e===1?c(this,Te).length:0}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new P(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("||"),d=w(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let p={caption:"|+",td:"|",th:"!"}[this.subtype];d.fix={range:[d.startIndex,d.endIndex],text:o.replace(/\|\|/gu,`
|
|
21
|
-
|
|
22
|
-
`)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,n]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${c(this,Te)}${n.print()}</span>`}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t),{rowspan:i,colspan:s}=this;return Object.assign(n,{subtype:this.subtype},i!==1&&{rowspan:i},s!==1&&{colspan:s}),n}};Te=new WeakMap,Ar=new WeakMap,Sr=new WeakSet,Hn=function(){return ve(c(this,Ar),()=>{var o;let e=this.firstChild.text(),t=e.slice(-1),n="td";if(t==="!"?n="th":t==="+"&&(n="caption"),this.isIndependent())return{subtype:n};let{previousSibling:i}=this;return{...N(o=i,Sr,Hn).call(o)}},e=>{b(this,Ar,e)})}});var La,Fa,Xn,Xt,Qn=y(()=>{"use strict";q();Un();Vn();La=new Set(["tr","td","th","caption"]),Fa=new Set(["Template:!!","Template:!-"]),Xn=a=>{let r=a.childNodes.find(e=>e.text().trim());if(!r||r.type==="text"&&r.data.trim().startsWith("!")||r.type==="magic-word"&&r.name==="!"||r.type==="template"&&Fa.has(r.name)||r.is("html")&&La.has(r.name))return!1;if(r.is("arg"))return r.length>1&&Xn(r.childNodes[1]);if(r.is("magic-word"))try{let e=r.getPossibleValues().map(Xn);return e.includes("error")?"error":e.includes("warning")&&"warning"}catch(e){}return r.type==="template"||r.type==="magic-word"&&r.name==="invoke"?"warning":"error"},Xt=class extends Ht{lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=this.childNodes.find(({type:o})=>o==="table-inter");if(!n)return t;let i=Xn(n);if(!i)return t;let s=w(n,{start:r},"fostered-content","content to be moved out from the table",i);return s.startIndex++,s.startLine++,s.startCol=0,t.push(s),t}getRowCount(){return Number(this.childNodes.some(r=>r instanceof Vt&&r.isIndependent()&&!r.firstChild.text().endsWith("+")))}}});var Ra,Pa,Kn,en,Bs=y(()=>{"use strict";q();ce();X();_();Qn();$t();Ra=(a,r)=>new Array(a).fill(void 0).map((e,t)=>r(t)),Pa=({type:a})=>a==="tr"||a==="table-syntax",Kn=class extends Array{},en=class extends Xt{get type(){return"table"}get closed(){return this.lastChild.type==="table-syntax"}constructor(r,e,t,n){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,r,"table",e,t,n,{})}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new P(this,r);this.closed||t.push(w(this.firstChild,n,"unclosed-table",A.msg("unclosed $1","table")));let i=this.getLayout(),{length:s}=i;if(s>1){let o=1,l=1/0,d=0;for(;d<s;d++){let p=i[d],g=p.length;if(g<o)break;g<l&&(l=g);let u=p.indexOf(p[g-1])+1;if(u>l)break;u>o&&(o=u)}if(d<s){let p=w(this.getNthRow(d),n,"table-layout","inconsistent table layout","warning");p.startIndex++,p.startLine++,p.startCol=0,t.push(p)}}return t}close(r=`
|
|
23
|
-
|
|
5
|
+
`)}getGaps(){return 1}print(){return super.print({sep:`
|
|
6
|
+
`})}}return Ee(r,a),r}});var Rs={};K(Rs,{ParamTagToken:()=>it});var Fs,Mn,tl,it,Dn=k(()=>{"use strict";_();te();Ir();en();V();O();Me();Fs=[Qt];it=class extends(tl=v){get type(){return"ext-inner"}constructor(r,e,t=$.getConfig(),n=[],i){if(super(void 0,t,n,{}),e){let s=X;this.append(...e.split(`
|
|
7
|
+
`).map(o=>i?o:xt(o,t,n,r)).map(o=>new s(o,"param-line",t,n,{})))}n.splice(n.indexOf(this),1),n.push(this)}lint(r=this.getAbsoluteIndex()){let e=new R(this,r),t=$.msg("invalid parameter of <$1>",this.name),n=[];for(let i of this.childNodes){i.setAttribute("aIndex",r);let s=i.childNodes.filter(({type:o})=>o!=="comment"&&o!=="include"&&o!=="noinclude");if(s.some(({type:o})=>o==="ext"))n.push(C(i,e,"no-ignored",t));else{let o=s.findIndex(({type:g})=>g!=="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 g=C(i,e,"no-ignored",t);g.suggestions=[{desc:"remove",range:[g.startIndex,g.endIndex],text:""}],n.push(g)}else{let g=i.lint(r,!1);g.length>0&&n.push(...g)}}r+=i.toString().length+1}return n}};Mn=P(tl),it=B(Mn,0,"ParamTagToken",Fs,it),j(Mn,1,it)});var Er,Kt,tn,Jt,zn=k(()=>{"use strict";_();ae();te();V();O();ut();Jt=class extends v{constructor(e,t,n,i=[]){super(void 0,n,i);b(this,Kt);b(this,Er);T(this,Er,e);let s=new v(t[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let o=new ue(t[1],"heading-trail",n,i);this.append(s,o)}get type(){return"heading"}get level(){return c(this,Er)}toString(e){let t=N(this,Kt,tn).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=N(this,Kt,tn).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 n=super.lint(e,t),{firstChild:i,level:s}=this,o=i.toString(),l=o.startsWith("="),g=l||o.endsWith("="),u=i.childNodes.filter(Yt("quote")),p=u.filter(({bold:h})=>h),d=u.filter(({italic:h})=>h),m=new R(this,e);if(this.level===1){let h=C(i,m,"h1","<h1>");g||(h.suggestions=[{desc:"h2",range:[h.startIndex,h.endIndex],text:`=${o}=`}]),n.push(h)}if(g){let h=C(i,m,"unbalanced-header",$.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[x]=/^=+/u.exec(o),y=s+x.length;h.suggestions=[{desc:`h${s}`,range:[h.startIndex,h.startIndex+x.length],text:""}],y<7&&h.suggestions.push({desc:`h${y}`,range:[h.endIndex,h.endIndex],text:x})}else{let x=/[^=](=+)$/u.exec(o)[1],y=s+x.length;h.suggestions=[{desc:`h${s}`,range:[h.endIndex-x.length,h.endIndex],text:""}],y<7&&h.suggestions.push({desc:`h${y}`,range:[h.startIndex,h.startIndex],text:x})}n.push(h)}this.closest("html-attrs,table-attrs")&&n.push(L(this,m,"parsing-order","section header in an HTML tag"));let f=this.getRootNode().toString();if(p.length%2){let h=C(p[p.length-1],{...m,start:e+s,left:m.left+s},"format-leakage",$.msg("unbalanced $1 in a section header","bold apostrophes")),x=e+s+o.length;f.slice(h.endIndex,x).trim()?h.suggestions=[{desc:"close",range:[x,x],text:"'''"}]:h.fix={desc:"remove",range:[h.startIndex,h.endIndex],text:""},n.push(h)}if(d.length%2){let h=C(d[d.length-1],{start:e+s},"format-leakage",$.msg("unbalanced $1 in a section header","italic apostrophes")),x=e+s+o.length;h.fix=f.slice(h.endIndex,x).trim()?{desc:"close",range:[x,x],text:"''"}:{desc:"remove",range:[h.startIndex,h.endIndex],text:""},n.push(h)}return n}print(){let e=N(this,Kt,tn).call(this);return super.print({pre:e,sep:e})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.level=this.level,n}};Er=new WeakMap,Kt=new WeakSet,tn=function(){return"=".repeat(this.level)}});var rl,rn,Ps=k(()=>{"use strict";ee();_();O();rl=new RegExp(`https?://${je}${Be}$`,"iu"),rn=class extends v{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){var r;try{return!!((r=this.parentNode)!=null&&r.getDuplicatedArgs().some(([e])=>e===this.name))}catch{return!1}}constructor(r,e,t,n=[]){super(void 0,t,n);let i=new v(typeof r=="number"?void 0:r,t,n,{}),s=new v(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=rl.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(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{anon:this.anon},this.duplicated&&{duplicated:!0}),t}}});var js,Lr,ot,bt,Tt,Zt,yt,Wn,Bs,Un,nl,st,qs=k(()=>{"use strict";ee();_();ae();te();Cr();O();Ps();Me();ut();js=[tt()];st=class extends(nl=v){constructor(e,t,n,i=[]){var w,S;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`,i[s].toString().replace(/^\n/u,"")));super(void 0,n,i,{});b(this,yt);oe(this,"modifier","");b(this,Lr,"template");b(this,ot,":");b(this,bt,!1);b(this,Tt,new Map);b(this,Zt);let{parserFunction:[l,g],variable:u,functionHook:p}=n,d=(w=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:w[0];if(d)this.setAttribute("modifier",d),e=e.slice(d.length);else if(e.includes(":")){let[A,...I]=e.split(":"),[q]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((S=I[0])!=null?S:"");this.setModifier(`${A}:${q}`)&&(e=I.join(":").slice(q.length))}let m=e.search(/[::]/u),f=e[m]===":",h=m!==-1;if(h||t.length===0&&!c(this,bt)){let A=h?e.slice(0,m):e,I=h&&e.slice(m+1),q=re(A),M=h?q.slice(q.search(/\S/u))+(f?":":""):q.trim(),F=M.toLowerCase(),H=Array.isArray(g),G=H?g.includes(M):Object.prototype.hasOwnProperty.call(g,M),ge=!H&&G?g[M]:Object.prototype.hasOwnProperty.call(l,F)&&l[F],ne=H&&G||!("functionHook"in n)||p.includes(ge),J=H&&G||u.includes(ge);if(h?ge&&ne:J){this.setAttribute("name",ge||F.replace(/^#|:$/u,"")),T(this,Lr,"magic-word"),f&&T(this,ot,":");let Y=new ue(A,"magic-word-name",n,i);if(super.insertAt(Y),I!==!1&&t.unshift([I]),this.name==="invoke")for(let E=0;E<2;E++){let Ce=t.shift();if(!Ce)break;let ye=new X(Ce.join("="),`invoke-${E?"function":"module"}`,n,i);super.insertAt(ye)}}}if(this.type==="template"){let A=re(e).trim();if(!this.normalizeTitle(A,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let I=new X(e,"template-name",n,i,{});super.insertAt(I)}typeof s=="number"&&(i[s]=void 0);let x=this.isTemplate(),y=1;for(let A=0;A<t.length;A++){let I=t[A];x||this.name==="switch"&&A>0||this.name==="tag"&&A>1||(I[0]=I.join("="),I.length=1),I.length===1&&(I.unshift(y),y++),this.insertAt(new rn(...I,n,i))}this.seal("modifier")}get type(){return c(this,Lr)}setModifier(e){let{parserFunction:[,,t,n]}=this.getAttribute("config"),i=re(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),o=t.includes(s),l=n.includes(s);return c(this,bt)&&o||!c(this,bt)&&(l||e==="")||(pe.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),T(this,bt,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,Zt,N(this,yt,Wn).call(this)),this.setAttribute("name",c(this,Zt).title))}toString(e){return`{{${this.modifier}${this.type==="magic-word"?this.firstChild.toString(e)+(this.length===1?"":c(this,ot))+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?"":c(this,ot))+xe(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return c(this,Zt);case"colon":return c(this,ot);default:return super.getAttribute(e)}}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 R(this,e),g=i==="magic-word";if(g&&!N(this,yt,Wn).call(this).valid)n.push(C(s[1],l,"invalid-invoke","illegal module name"));else{let p=s[g?1:0],d=p.childNodes.findIndex(f=>f.type==="text"&>(f.data).includes("#")),m=p.childNodes[d];if(m){let f=C(p,l,"no-ignored","useless fragment");f.fix={range:[f.startIndex+p.getRelativeIndex(d)+m.data.indexOf("#"),f.endIndex],text:"",desc:"remove"},n.push(f)}}if(g&&o===2)return n.push(L(this,l,"invalid-invoke","missing module function")),n;let u=this.getDuplicatedArgs().filter(([,p])=>!p[0].querySelector("ext"));if(u.length>0)for(let[,p]of u)n.push(...p.map(d=>{let m=C(d,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?N(this,yt,Bs).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(Yt("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 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:n}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i,s;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;case"switch":{let o=n.slice(2),l=o[o.length-1];s=[...o.filter(({anon:g})=>!g),...l!=null&&l.anon?[l]:[]].map(({lastChild:g})=>g);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}s!=null||(s=n.slice(i,i+2).map(({lastChild:o})=>o));for(let o=0;o<s.length;){let{length:l,0:g}=s[o].childNodes.filter(u=>u.text().trim());if(l===0)s.splice(o,1);else if(l>1||g.type!=="magic-word")o++;else try{let u=g.getPossibleValues();s.splice(o,1,...u),o+=u.length}catch{o++}}return s}print(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${Bt(i)}${s==="magic-word"?n.print()+(t===1?"":c(this,ot))+Oe(e.slice(1),{sep:"|"}):Oe(e,{sep:"|"})}}}</span>`}};Un=P(nl),Lr=new WeakMap,ot=new WeakMap,bt=new WeakMap,Tt=new WeakMap,Zt=new WeakMap,yt=new WeakSet,Wn=function(){let e=this.type==="template";return this.normalizeTitle(this.childNodes[e?0:1].text(),e?10:828,{temporary:!0})},Bs=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===e)&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}},st=B(Un,0,"TranscludeToken",js,st),j(Un,1,st)});var Os,Hn,il,kt,_s=k(()=>{"use strict";pt();O();Os=[be()];kt=class extends(il=v){get type(){return"hidden"}};Hn=P(il),kt=B(Hn,0,"HiddenToken",Os,kt),j(Hn,1,kt)});var Ms,Vn,sl,Gn,ol,vt,Ds=k(()=>{"use strict";ee();_();te();_e();Cr();O();Me();_s();Ms=[le("{{{"),tt()];vt=class extends(ol=v){constructor(e,t,n=[]){super(void 0,t,n,{});b(this,Vn);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let o=new X(s,"arg-name",t,n,{});super.insertAt(o)}else if(i>1){let o=new kt(s,t,n);super.insertAt(o)}else{let o=new v(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`{{{${xe(this.childNodes.slice(0,2),"|")}}}}`}afterBuild(){super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[n,i,...s]}=this;if(!this.getAttribute("include")){let l=L(this,{start:e},"no-arg","unexpected template argument");return i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),[l]}n.setAttribute("aIndex",e+3);let o=n.lint(e+3,t);if(i){let l=e+4+n.toString().length;i.setAttribute("aIndex",l);let g=i.lint(l,t);g.length>0&&o.push(...g)}if(s.length>0){let l=new R(this,e);o.push(...s.map(g=>{let u=C(g,l,"no-ignored","invisible content inside triple braces");return u.startIndex--,u.startCol--,u.suggestions=[{desc:"remove",range:[u.startIndex,u.endIndex],text:""},{desc:"escape",range:[u.startIndex,u.startIndex+1],text:"{{!}}"}],u}))}return o}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return n.default=this.default,n}};Gn=P(ol),Vn=new WeakSet,sl=function(){},vt=B(Gn,0,"ArgToken",Ms,vt),j(Gn,1,vt)});var Xs={};K(Xs,{parseBraces:()=>Fr});var al,zs,Xn,Us,Ws,Hs,Vs,Gs,Fr,nn=k(()=>{"use strict";jt();ee();zn();qs();Ds();al={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},zs=String.raw`\[(?!\[)`,Xn=String.raw`\n(?![=\0])`,Us=String.raw`|\{{2,}`,Ws=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),Hs=Ne(a=>new RegExp(a,"gmu"));Vs=new RegExp(String.raw`\{\{((?:[^\n{}[]|${zs}|${Xn})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${Xn})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${zs}|${Xn})*\}-`,"gu");Gs=a=>{let r=qe(re(a));return Ws.has(r)?Ws.get(r):/^(?:filepath|(?:full|canonical)urle?):./u.test(r)?"m":/^#vardefine:./u.test(r)?"n":"t"},Fr=(a,r,e)=>{var f,h,x,y,w;let t=String.raw`${r.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,n]}=r,i=[],s=[],o=(S,A,I,q)=>{A[A.length-1].push(Ie(S.slice(I,q),s))},l;do l!==void 0&&(a=l),l=a.replace(Vs,(S,A,I)=>{if(A!==void 0||typeof I=="string")try{let{length:q}=e,M=(A!=null?A:I).split("|");return new st(Ie(M[0],s),M.slice(1).map(F=>{let H=F.indexOf("=");return(H===-1?[F]:[F.slice(0,H),F.slice(H+1)]).map(G=>Ie(G,s))}),r,e),`\0${q}${Gs(M[0])}`}catch(q){if(!(q instanceof SyntaxError)||q.message!=="Invalid template name")throw q}return s.push(Ie(S,s)),`\0${s.length-1}`});while(l!==a);a=l;let g=a.lastIndexOf("}}")-a.length,u=g+a.length!==-1,p=Hs(t+(u?Us:"")),d=p.exec(a),m;for(;d||m!==void 0&&m<=a.length&&((h=(f=i[i.length-1])==null?void 0:f[0])!=null&&h.startsWith("="));){if(d!=null&&d[1]){let[,{length:J}]=d;d[0]=d[0].slice(J),d.index+=J}let{0:S,index:A}=d!=null?d:{0:`
|
|
8
|
+
`,index:a.length},I=(x=i.pop())!=null?x:{},{0:q,index:M,parts:F,findEqual:H,pos:G}=I,ge=S==="="&&H;if(S==="]]"||S==="}-")m=A+2;else if(S===`
|
|
9
|
+
`){m=A+1;let{pos:J,findEqual:Y}=(y=i[i.length-1])!=null?y:{};if(J===void 0||Y||re(a.slice(J,M))!==""){let E=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(M,A));E&&(E[2]=Ie(E[2],s),E[2].includes(`
|
|
10
|
+
`)||(a=`${a.slice(0,M)}\0${e.length}h${a.slice(A)}`,m=M+4+String(e.length).length,new Jt(E[1].length,E.slice(2),r,e)))}}else if(S==="|"||ge)m=A+1,o(a,F,G,A),S==="|"&&F.push([]),I.pos=m,I.findEqual=S==="|",i.push(I);else if(S.startsWith("}}")){let J=S.slice(0,Math.min(q.length,3)),Y=q.length-J.length,{length:E}=e;m=A+J.length,o(a,F,G,A);let Ce=!1,ye="t";if(J.length===3){let se=F.map($e=>$e.join("=")),Pe=se.length>1&&re(se[1]).trim();new vt(se,r,e),Pe&&Pe.endsWith(":")&&n.includes(Pe.slice(0,-1).toLowerCase())&&(ye="s")}else try{new st(F[0][0],F.slice(1),r,e),ye=Gs(F[0][0])}catch(se){if(se instanceof SyntaxError&&se.message==="Invalid template name")Ce=!0;else throw se}Ce||(a=`${a.slice(0,M+Y)}\0${E}${ye}${a.slice(m)}`,m=M+Y+3+String(E).length,Y>1?i.push({0:q.slice(0,Y),index:M,pos:M+Y,parts:[[]]}):Y===1&&a[M-1]==="-"&&i.push({0:"-{",index:M-1,pos:M+1,parts:[[]]}))}else m=A+S.length,S.startsWith("{")&&(d.pos=m,d.parts=[[]]),i.push(..."0"in I?[I]:[],d);let ne=i[i.length-1];if(u&&g+a.length<m)for(u=!1;(w=ne==null?void 0:ne[0])!=null&&w.startsWith("{");)i.pop(),ne=i[i.length-1];p=Hs(t+(u?Us:"")+(ne?`|${al[ne[0][0]]}${ne.findEqual?"|=":""}`:"")),p.lastIndex=m,d=p.exec(a)}return Ie(a,s)}});var Qs={};K(Qs,{InputboxToken:()=>Qn});var Qn,Ks=k(()=>{"use strict";Ir();nn();V();Dn();Qn=class extends it{constructor(r,e,t=$.getConfig(),n=[]){let i=Symbol("InputboxToken"),s=t.excludes.includes("heading")?t:{...t,excludes:[...t.excludes,"heading"]},{length:o}=n;n.push(i),e&&(e=xt(e,s,n,r)),e&&(e=Fr(e,s,n)),n.splice(o,1),super(r,e,s,n,{})}}});var sn={};K(sn,{NestedToken:()=>Kn});var ll,dl,Rr,er,Kn,on=k(()=>{"use strict";_();te();Ir();nn();V();O();Jn();ze();ll=new Set(["comment","include","arg","template","magic-word"]),dl=[!1,!0].map(a=>{let r=a?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${r}(?:\s[^>]*)?/?>|</${r}\s*>)$`,"iu")}),Kn=class extends v{constructor(e,t,n,i,s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=xt(e,i,s,t)),e&&(e=Fr(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,g,u,p)=>{let d=`\0${s.length+1}e`;return new Ue(l,g,u,p,i,!1,s),d}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,g)=>(new D(g,i,s),`${l}\0${s.length}n`)));super(e,i,s);b(this,Rr);b(this,er);T(this,Rr,[...n]),T(this,er,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let n=new R(this,e),i=typeof c(this,er)=="boolean"?dl[c(this,er)?1:0]:/^<!--[\s\S]*-->$/u;return[...super.lint(e,t),...this.childNodes.filter(s=>{let{type:o,name:l}=s;if(o==="ext")return!c(this,Rr).includes(l);if(ll.has(o))return!1;let g=s.toString().trim();return g&&!i.test(g)}).map(s=>{let o=C(s,n,"no-ignored",$.msg("invalid content in <$1>",this.name));return o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""},{desc:"comment",range:[o.startIndex,o.endIndex],text:`<!--${s.toString()}-->`}],o})]}};Rr=new WeakMap,er=new WeakMap});function Js(a,r,e,t,n){r=re(r).trim();let i=r.replace(a==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(a){case"width":return!i&&!!r||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{if(i){if(gl(e.protocol).test(i))return pl(e.protocol).test(i)&&r;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2))}else return r;let s=$.normalizeTitle(i,0,!1,e,{halfParsed:t,decode:!0,selfLink:!0});return s.valid&&s}case"lang":return(n==="svg"||n==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(n==="djvu"||n==="djv"||n==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var gl,pl,ul,cl,ce,ln,Ys,an,Zs=k(()=>{"use strict";jt();ee();_();V();O();gl=Ne(a=>new RegExp(String.raw`^(?:${a}|//|\0\d+m\x7F)`,"iu")),pl=Ne(a=>new RegExp(String.raw`^(?:(?:${a}|//)${je}|\0\d+m\x7F)${Be}$`,"iu")),ul=Ne(a=>new RegExp(String.raw`^(\s*(?!\s))${a.replace("$1","(.*)")}${a.endsWith("$1")?`(?=$|
|
|
11
|
+
)`:""}(\s*)$`,"u")),cl=new Set(["alt","link","lang","page","caption"]);an=class extends v{constructor(e,t,n,i){var r=(...yu)=>(super(...yu),b(this,ln),b(this,ce,""),this);let s,o=Object.entries(n.img).map(([g,u])=>[g,u,ul(g)]),l=o.find(([,g,u])=>(s=u.exec(e),s&&(s.length!==4||Js(g,s[2],n,!0,t)!==!1)));if(l&&s){s.length===3?(r(void 0,n,i),T(this,ce,e)):(r(s[2],n,i,{}),T(this,ce,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}r(e,n.excludes.includes("list")?n:{...n,excludes:[...n.excludes,"list"]},i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?Js("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!cl.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return c(this,ce)?c(this,ce).replace("$1",super.toString(e)):super.toString(e)}text(){return c(this,ce)?c(this,ce).replace("$1",super.text()).trim():super.text().trim()}isPlain(){return this.name==="caption"}getAttribute(e){return e==="padding"?Math.max(0,c(this,ce).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{link:i,name:s}=this;if(s==="invalid"){let o=L(this,{start:e},"invalid-gallery","invalid image parameter");o.fix={range:[e-1,o.endIndex],text:"",desc:"remove"},n.push(o)}else if(typeof i=="object"&&i.encoded){let o=L(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link");o.suggestions=[{desc:"decode",range:[e,o.endIndex],text:Je(this.text())}],n.push(o)}return n}getValue(){return this.name==="invalid"?this.text():N(this,ln,Ys).call(this)||super.text()}print(){return c(this,ce)?`<span class="wpb-image-parameter">${c(this,ce).replace("$1",`<span class="wpb-image-caption">${Oe(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};ce=new WeakMap,ln=new WeakSet,Ys=function(){return c(this,ce)&&!c(this,ce).includes("$1")}});var eo,to,ro,hl,ml,tr,Yn=k(()=>{"use strict";_();te();V();wr();Zs();eo=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),to=new Set(["left","right","center","none"]),ro=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),hl=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),ml=a=>{if(a===void 0)return[];let r=/-\{|\}-|\|/gu,e=[],t=r.exec(a),n=0,i=0;for(;t;){let{0:s,index:o}=t;s!=="|"?n+=s==="-{"?1:-1:n===0&&(e.push(a.slice(i,o)),{lastIndex:i}=r),t=r.exec(a)}return e.push(a.slice(i)),e},tr=class extends me{get type(){return"file"}get extension(){return this.getAttribute("title").extension}constructor(r,e,t,n=[],i="|"){super(r,void 0,t,n,i);let{extension:s}=this.getTitle(!0,!0);this.safeAppend(ml(e).map(o=>new an(o,s,t,n)))}lint(r=this.getAbsoluteIndex(),e){var f;let t=super.lint(r,e),n=this.getAllArgs().filter(({childNodes:h})=>{let x=h.filter(y=>y.text().trim());return x.length!==1||x[0].type!=="arg"}),i=[...new Set(n.map(({name:h})=>h))],s=i.filter(h=>eo.has(h)),o=i.filter(h=>to.has(h)),l=i.filter(h=>ro.has(h)),[g]=s,u=g==="framed"||g==="manualthumb",p=new R(this,r);if(this.closest("ext-link-text")&&((f=this.getValue("link"))==null?void 0:f.trim())!==""&&t.push(L(this,p,"nested-link","internal link in an external link")),u)for(let h of n.filter(({name:x})=>x==="width")){let x=C(h,p,"invalid-gallery","invalid image parameter");x.fix={range:[x.startIndex-1,x.endIndex],text:"",desc:"remove"},t.push(x)}if(n.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let d=(h,x,y)=>w=>{let S=C(w,p,"no-duplicate",$.msg(`${h} image $1 parameter`,x),y);return S.suggestions=[{desc:"remove",range:[S.startIndex-1,S.endIndex],text:""}],S},{extension:m}=this;for(let h of i){if(h==="invalid"||h==="width"&&u)continue;let x=n.filter(({name:y})=>y===h);h==="caption"&&(x=[...x.slice(0,-1).filter(y=>y.text()),...x.slice(-1)]),x.length>1&&t.push(...x.map(d("duplicated",h,h==="caption"&&m&&!hl.has(m)?"warning":"error")))}return s.length>1&&t.push(...n.filter(({name:h})=>eo.has(h)).map(d("conflicting","frame"))),o.length>1&&t.push(...n.filter(({name:h})=>to.has(h)).map(d("conflicting","horizontal-alignment"))),l.length>1&&t.push(...n.filter(({name:h})=>ro.has(h)).map(d("conflicting","vertical-alignment"))),t}getAllArgs(){return this.childNodes.slice(1)}getArgs(r){return this.getAllArgs().filter(({name:e})=>r===e)}getArg(r){let e=this.getArgs(r);return e[r==="manualthumb"?0:e.length-1]}getValue(r){var e;return(e=this.getArg(r))==null?void 0:e.getValue()}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{extension:n}=this;return n&&(t.extension=n),t}}});var no,Zn,fl,We,ei=k(()=>{"use strict";_();_e();O();Yn();no=[le("")];We=class extends(fl=tr){constructor(e,t,n,i,s=[]){let o;if(n!==void 0){let{length:l}=s;o=new v(n,i,s);for(let g=1;g<11;g++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);oe(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,{halfParsed:!0,temporary:e,decode:!t})}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{ns:i}=this.getAttribute("title");if(i!==6){let s=L(this,{start:e},"invalid-gallery","invalid gallery image");s.suggestions=[{desc:"prefix",range:[e,e],text:"File:"}],n.push(s)}return n}};Zn=P(fl),We=B(Zn,0,"GalleryImageToken",no,We),j(Zn,1,We)});var oo={};K(oo,{GalleryToken:()=>rr});var io,At,so,ri,ti,xl,rr,ao=k(()=>{"use strict";en();V();O();ei();ze();io=[Qt];rr=class extends(xl=v){constructor(e,t,n=[]){var i;super(void 0,t,n,{});b(this,At);for(let s of(i=e==null?void 0:e.split(`
|
|
12
|
+
`))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new D(s,t,n):s);continue}let[,l,g]=o;N(this,At,so).call(this,l)?super.insertAt(new We("gallery",l,g,t,n)):super.insertAt(new D(s,t,n))}}get type(){return"ext-inner"}get widths(){return N(this,At,ri).call(this,"widths")}get heights(){return N(this,At,ri).call(this,"heights")}lint(e=this.getAbsoluteIndex(),t){let{top:n,left:i}=this.getRootNode().posFromIndex(e),s=[];for(let o=0;o<this.length;o++){let l=this.childNodes[o],g=l.toString(),{length:u}=g,p=g.trim(),{type:d}=l,m=n+o,f=o?0:i;if(l.setAttribute("aIndex",e),d==="noinclude"&&p&&!/^<!--.*-->$/u.test(p)){let h=e+u;s.push({rule:"no-ignored",message:$.msg("invalid content in <$1>","gallery"),severity:p.startsWith("|")?"warning":"error",startIndex:e,endIndex:h,startLine:m,endLine:m,startCol:f,endCol:f+u,suggestions:[{desc:"remove",range:[e,h],text:""},{desc:"comment",range:[e,h],text:`<!--${g}-->`}]})}else if(d!=="noinclude"&&d!=="text"){let h=l.lint(e,t);h.length>0&&s.push(...h)}e+=u+1}return s}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return Object.assign(n,{widths:this.widths,heights:this.heights}),n}};ti=P(xl),At=new WeakSet,so=function(e){return this.normalizeTitle(e,6,{halfParsed:!0,temporary:!0,decode:!0}).valid},ri=function(e){var i,s;let t=(i=this.parentNode)==null?void 0:i.getAttr(e),n=typeof t=="string"&&((s=/^(\d+)\s*(?:px)?$/u.exec(t))==null?void 0:s[1]);return n&&Number(n)||120},rr=B(ti,0,"GalleryToken",io,rr),j(ti,1,rr)});var nr,ni=k(()=>{"use strict";_();wr();nr=class extends me{get type(){return"link"}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e);return this.closest("ext-link-text")&&t.push(L(this,{start:r},"nested-link","internal link in an external link")),t}}});var bl,Tl,Pr,He,dn=k(()=>{"use strict";_();ee();te();V();O();bl=String.raw`(?:[${ke}\t]| |�*160;|&#[xX]0*[aA]0;)`,Tl=new RegExp(`${bl}+`,"gu"),He=class extends v{constructor(e,t="free-ext-link",n=$.getConfig(),i){super(e,n,i,{});b(this,Pr);T(this,Pr,t)}get type(){return c(this,Pr)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=xe(this.childNodes.map(n=>{let{type:i}=n,s=String(n.name);return i==="magic-word"&&e.has(s)?e.get(s):n}));return this.type==="magic-link"&&(t=t.replace(Tl," ")),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:Hi(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new R(this,e),{type:s,childNodes:o}=this;if(s==="magic-link"){let{link:p}=this;if(p.startsWith("ISBN")){let d=[...p.slice(5)].map(m=>m==="X"?10:Number(m));(d.length===10&&d.reduce((m,f,h)=>m+f*(10-h),0)%11||d.length===13&&(d[12]===10||d.reduce((m,f,h)=>m+f*(h%2?3:1),0)%10))&&n.push(L(this,i,"invalid-isbn","invalid ISBN"))}return n}let l=s==="ext-link-url",g=l?/\|/u:/[,;。:!?()]+/u,u=o.find(p=>p.type==="text"&&g.test(p.data));if(u){let{data:p}=u,d=C(u,i,"unterminated-url",$.msg("$1 in URL",l?'"|"':"full-width punctuation"),"warning"),{index:m,0:f}=g.exec(p),h=d.startIndex+m;d.suggestions=l?[{desc:"whitespace",range:[h,h+1],text:" "}]:[{desc:"whitespace",range:[h,h],text:" "},{desc:"escape",range:[h,h+f.length],text:encodeURI(f)}],n.push(d)}return n}getUrl(e){}};Pr=new WeakMap});var lo,Ge,ii,yl,Ve,si=k(()=>{"use strict";_();_e();O();dn();lo=[le("[")];Ve=class extends(yl=v){constructor(e,t="",n="",i,s=[]){super(void 0,i,s,{});b(this,Ge);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new He(e,"ext-link-url",i,s);if(this.insertAt(o),T(this,Ge,t),n){let l=new v(n,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,Ge)}]`:`[${super.toString(e,c(this,Ge))}]`}text(){return`[${super.text(" ")}]`}getGaps(){return c(this,Ge).length}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&n.push(L(this,{start:e},"var-anchor","variable anchor in a section header")),n}print(){return super.print(this.length===1?{pre:"[",post:`${c(this,Ge)}]`}:{pre:"[",sep:c(this,Ge),post:"]"})}};ii=P(yl),Ge=new WeakMap,Ve=B(ii,0,"ExtLinkToken",lo,Ve),j(ii,1,Ve)});var jr,go=k(()=>{"use strict";O();ze();ni();si();jr=class extends v{get type(){return"imagemap-link"}constructor(r,e,t,n,i=[]){super(void 0,n,i),this.append(r,e.length===2?new nr(...e,n,i):new Ve(...e,n,i),new D(t,n,i))}}});var uo={};K(uo,{ImagemapToken:()=>ir});var po,oi,kl,ir,co=k(()=>{"use strict";_();ae();te();en();V();O();ze();ei();go();po=[Qt];ir=class extends(kl=v){get type(){return"ext-inner"}get image(){return this.childNodes.find(Yt("imagemap-image"))}constructor(r,e=$.getConfig(),t=[]){if(super(void 0,e,t,{}),!r)return;let n=r.split(`
|
|
13
|
+
`),i=new Set(e.protocol.split("|")),s=D,o=!0,l=!1;for(let g of n){let u=g.trim();if(!(l||!u||u.startsWith("#"))){if(o){let p=g.indexOf("|"),d=p===-1?g:g.slice(0,p),{valid:m,ns:f}=this.normalizeTitle(d,0,{halfParsed:!0,temporary:!0});if(m&&f===6){let h=new We("imagemap",d,p===-1?void 0:g.slice(p+1),e,t);super.insertAt(h),o=!1;continue}else l=!0}else if(g.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(g);continue}else if(g.includes("[")){let p=g.indexOf("["),d=g.slice(p),m=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(d);if(m){if(this.normalizeTitle(m[1],0,{halfParsed:!0,temporary:!0,selfLink:!0}).valid){super.insertAt(new jr(g.slice(0,p),m.slice(1),d.slice(d.indexOf("]]")+2),e,t));continue}}else if(d.startsWith("[//")||i.has(d.slice(1,d.indexOf(":")+1))||i.has(d.slice(1,d.indexOf("//")+2))){let f=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(d);if(f){super.insertAt(new jr(g.slice(0,p),f.slice(1),d.slice(d.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(g,e,t))}}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new R(this,r);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,n,"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(L(this,n,"invalid-imagemap","<imagemap> without an image")),t}};oi=P(kl),ir=B(oi,0,"ImagemapToken",po,ir),j(oi,1,ir)});var ho,ai,vl,Xe,li=k(()=>{"use strict";_();pt();_e();V();Ze();ho=[be(!1),le("<!--")];Xe=class extends(vl=de){constructor(e,t,n,i){super(e,n,i);oe(this,"closed");this.closed=t}get type(){return"comment"}lint(e=this.getAbsoluteIndex()){if(this.closed)return[];let t=L(this,{start:e},"unclosed-comment",$.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?"-->":""})}};ai=P(vl),Xe=B(ai,0,"CommentToken",ho,Xe),j(ai,1,Xe)});var mo={};K(mo,{CommentedToken:()=>di});var di,fo=k(()=>{"use strict";O();li();di=class extends v{get type(){return"ext-inner"}constructor(r,e,t=[]){if(super(void 0,e,t,{AstText:":",CommentToken:":"}),r){let n=r.indexOf("<!--"),i=n!==-1&&r.indexOf("-->",n+4),s=0;for(;i!==!1&&i!==-1;)n>s&&this.insertAt(r.slice(s,n)),this.insertAt(new Xe(r.slice(n+4,i),!0,e,t)),s=i+3,n=r.indexOf("<!--",s),i=n!==-1&&r.indexOf("-->",n+4);s<r.length&&this.insertAt(r.slice(s))}}lint(r=this.getAbsoluteIndex()){return super.lint(r,/<\s*(?:\/\s*)?(hiero)\b/giu)}}});var xo={};K(xo,{NowikiToken:()=>gi});var Al,Sl,gi,bo=k(()=>{"use strict";jt();_();V();Ze();Al=Ne(a=>new RegExp(String.raw`<\s*(?:/\s*)${a==="nowiki"?"":"?"}(${a})\b`,"giu")),Sl=new Set(["templatestyles","section","languages"]),gi=class extends de{get type(){return"ext-inner"}lint(r=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if(Sl.has(e)&&t){let n=L(this,{start:r},"void-ext",$.msg("nothing should be in <$1>",e));return n.fix={range:[r,n.endIndex],text:"",desc:"empty"},[n]}return super.lint(r,Al(e))}}});var To,pi,wl,Ue,Jn=k(()=>{"use strict";_();te();V();Jr();O();Xr();Zr();To=[Ht()];Ue=class extends(wl=we){get type(){return"ext"}constructor(r,e,t,n,i=$.getConfig(),s=!1,o=[]){let l=r.toLowerCase(),g=new nt(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,o),u={...i,ext:i.ext.filter(d=>d!==l),excludes:[...i.excludes]},p;switch(u.inExt=!0,l){case"tab":u.ext=u.ext.filter(d=>d!=="tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":case"langconvert":case"phonos":l==="poem"&&u.excludes.push("heading"),p=new v(t,u,o);break;case"pre":{let{PreToken:d}=(Ls(),z(Es));p=new d(t,u,o);break}case"dynamicpagelist":{let{ParamTagToken:d}=(Dn(),z(Rs));p=new d(s,t,u,o);break}case"inputbox":{let{InputboxToken:d}=(Ks(),z(Qs));p=new d(s,t,u,o);break}case"references":{let{NestedToken:d}=(on(),z(sn));u.excludes.push("heading"),p=new d(t,s,["ref"],u,o);break}case"choose":{let{NestedToken:d}=(on(),z(sn));p=new d(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],u,o);break}case"combobox":{let{NestedToken:d}=(on(),z(sn));p=new d(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],u,o);break}case"gallery":{let{GalleryToken:d}=(ao(),z(oo));p=new d(t,u,o);break}case"imagemap":{let{ImagemapToken:d}=(co(),z(uo));p=new d(t,u,o);break}case"hiero":{let{CommentedToken:d}=(fo(),z(mo));p=new d(t,u,o);break}default:{let{NowikiToken:d}=(bo(),z(xo));p=new d(t,u,o)}}p.setAttribute("name",l),p.type==="plain"&&(p.type="ext-inner"),super(r,g,p,n,i,o),this.seal("closed",!0)}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new R(this,r);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(L(this,n,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(L(this,n,"var-anchor","variable anchor in a section header")),t}};pi=P(wl),Ue=B(pi,0,"ExtToken",To,Ue),j(pi,1,Ue)});var vo={};K(vo,{parseCommentAndExt:()=>xt});var ko,Cl,ui,$l,yo,xt,Ir=k(()=>{"use strict";jt();ee();ds();ze();us();hs();Jn();li();ko="<onlyinclude>",Cl="</onlyinclude>",{length:ui}=ko,$l=[!1,!0].map(a=>{let r=a?"includeonly":"(?:no|only)include",e=a?"noinclude":"includeonly";return Ne(t=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${r}(?:\s[^>]*)?/?>|</${r}\s*>|<(${t.join("|")})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(\1\s*)>)|<(${e})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${e}\s*)>|$))`,"giu"))}),yo=a=>{let r=a.indexOf(ko);return{i:r,j:a.indexOf(Cl,r+ui)}},xt=(a,r,e,t)=>{if(t){let{i:o,j:l}=yo(a);if(o!==-1&&l!==-1){let g="",u=p=>{new D(p,r,e),g+=`\0${e.length-1}n`};for(;o!==-1&&l!==-1;){let p=`\0${e.length}e`;new mt(a.slice(o+ui,l),r,e),o>0&&u(a.slice(0,o)),g+=p,a=a.slice(l+ui+1),{i:o,j:l}=yo(a)}return a&&u(a),g}}let{ext:n}=r,i=n.filter(o=>o!=="translate"&&o!=="tvar"),s={...r,ext:i};if(n.includes("translate")){let o=[];a=a.replace(/<nowiki>[\s\S]*?<\/nowiki>/giu,l=>(o.push(l),`\0${o.length-1}`)).replace(/<translate( nowrap)?>([\s\S]+?)?<\/translate>/gu,(l,g,u)=>{let p=e.length;return new Qr(g,u&&Ie(u,o),s,e),`\0${p}g`}),a=Ie(a,o)}return a.replace($l[t?1:0](i),(o,l,g,u,p,d,m,f,h)=>{let x=e.length,y="n";if(l)y="e",new Ue(l,g,u,p,s,d,e);else if(o.startsWith("<!--")){y="c";let w=o.endsWith("-->");new Xe(o.slice(4,w?-3:void 0),w,r,e)}else d?new ft(d,m,f,h,r,e):new D(o,r,e);return`\0${x}${y}`})}});var Nl,Il,El,Ao,sr,Re,at,Qe,ci,Ll,St,So=k(()=>{"use strict";_();ae();te();Jr();O();Nl=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),Il=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"]),El=new Set(["strike","big","center","font","tt"]);Ao=[Ht()];St=class extends(Ll=v){constructor(e,t,n,i,s,o){super(void 0,s,o);b(this,sr);b(this,Re);b(this,at);b(this,Qe);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),T(this,sr,n),T(this,Re,i),T(this,at,e)}get type(){return"html"}get selfClosing(){return c(this,Re)}get closing(){return c(this,sr)}toString(e){return`<${this.closing?"/":""}${c(this,at)}${super.toString(e)}${c(this,Re)?"/":""}>`}text(){let{closing:e}=this,t=c(this,at)+(e?"":super.text());return`<${e?"/":""}${t}${c(this,Re)?"/":""}>`}getAttribute(e){return e==="padding"?c(this,at).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{name:i,parentNode:s,closing:o,selfClosing:l}=this,g=new R(this,e);if(i==="h1"&&!o){let h=L(this,g,"h1","<h1>");h.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}],n.push(h)}if(this.closest("table-attrs")){let h=L(this,g,"parsing-order","HTML tag in table attributes");h.fix={desc:"remove",range:[e,h.endIndex],text:""},n.push(h)}El.has(i)&&n.push(L(this,g,"obsolete-tag","obsolete HTML tag","warning")),(i==="b"||i==="strong")&&this.closest("heading-title")&&n.push(L(this,g,"bold-header","bold in section header","warning"));let{html:[,u,p]}=this.getAttribute("config"),d=p.includes(i),m=u.includes(i);if(o&&(l||d)||l&&(!d&&!m)){let h=L(this,g,"unmatched-tag",o?"tag that is both closing and self-closing":"invalid self-closing tag"),x={desc:"open",range:[e+1,e+2],text:""},y={desc:"no self-closing",range:[h.endIndex-2,h.endIndex-1],text:""};m?h.suggestions=[x,y]:o?h.fix=d?x:y:h.suggestions=[y,{desc:"close",range:[h.endIndex-2,h.endIndex],text:`></${i}>`}],n.push(h)}else if(!this.findMatchingTag()){let h=L(this,g,"unmatched-tag",o?"unmatched closing tag":"unclosed tag");if(o){let x=this.closest("magic-word");x&&Nl.has(x.name)?h.severity="warning":h.suggestions=[{desc:"remove",range:[e,h.endIndex],text:""}]}else{let x=s==null?void 0:s.childNodes;Il.has(i)&&(x!=null&&x.slice(0,x.indexOf(this)).some(({type:y,name:w})=>y==="html"&&w===i))?h.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(h.severity="warning")}n.push(h)}return n}findMatchingTag(){return ve(c(this,Qe),()=>{let{name:e,parentNode:t,closing:n,selfClosing:i}=this,{html:[,s,o]}=this.getAttribute("config"),l=o.includes(e),g=s.includes(e);if(l||g&&i)return this;if(!t)return;let{childNodes:u}=t,p=u.indexOf(this),d=n?u.slice(0,p).reverse():u.slice(p+1),m=[this],{rev:f}=pe;for(let h of d)if(!(!h.is("html")||h.name!==e||g&&c(h,Re)))if(c(h,sr)===n)m.push(h);else{let x=m.pop();if(x===this)return h;T(x,Qe,[f,h]),T(h,Qe,[f,x])}for(let h of m)T(h,Qe,[f,void 0])},e=>{T(this,Qe,e),e[1]&&e[1]!==this&&T(e[1],Qe,[pe.rev,this])})}print(){return super.print({pre:`<${this.closing?"/":""}${c(this,at)}`,post:`${c(this,Re)?"/":""}>`})}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t);return Object.assign(n,{closing:this.closing,selfClosing:c(this,Re)}),n}};ci=P(Ll),sr=new WeakMap,Re=new WeakMap,at=new WeakMap,Qe=new WeakMap,St=B(ci,0,"HtmlToken",Ao,St),j(ci,1,St)});var wo={};K(wo,{parseHtml:()=>Rl});var Fl,Rl,Co=k(()=>{"use strict";Zr();So();Fl=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,Rl=(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=Fl.exec(o),g=l==null?void 0:l[2],u=g==null?void 0:g.toLowerCase();if(!l||!r.htmlElements.has(u)){i+=`<${o}`;continue}let[,p,,d="",m,f]=l,{length:h}=e,x=new nt(d,"html-attrs",u,r,e),y=x.getAttr("itemprop");if(u==="meta"&&(y===void 0||x.getAttr("content")===void 0)||u==="link"&&(y===void 0||x.getAttr("href")===void 0)){i+=`<${o}`,e.length=h;continue}i+=`\0${e.length}x${f}`,new St(g,x,p==="/",m==="/>",r,e)}return i}});var or,hi=k(()=>{"use strict";Jr();O();ut();Zr();or=class extends Ht(1)(v){constructor(r,e,t,n,i,s=[],o){super(void 0,i,s,o),this.append(new ue(e,"table-syntax",i,s),new nt(n,"table-attrs",t,i,s))}}});var Te,Br,qr,mi,ar,fi=k(()=>{"use strict";_();te();O();hi();ar=class extends or{constructor(e,t,n,i=[]){var g;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);b(this,qr);b(this,Te,"");b(this,Br);s&&([Ur(this,Te)._]=s);let l=new v(t==null?void 0:t.slice(((g=s==null?void 0:s.index)!=null?g:NaN)+c(this,Te).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 N(this,qr,mi).call(this).subtype}afterBuild(){c(this,Te).includes("\0")&&T(this,Te,this.buildFromStr(c(this,Te),0)),super.afterBuild()}toString(e){let{childNodes:[t,n,i]}=this;return t.toString(e)+n.toString(e)+c(this,Te)+i.toString(e)}text(){let{childNodes:[e,t,n]}=this;return e.text()+t.text()+c(this,Te)+n.text()}getGaps(e){return e===1?c(this,Te).length:0}lint(e=this.getAbsoluteIndex(),t){let n=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("||"),g=C(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let u={caption:"|+",td:"|",th:"!"}[this.subtype];g.fix={range:[g.startIndex,g.endIndex],text:o.replace(/\|\|/gu,`
|
|
14
|
+
${u}`),desc:"newline"}}else g.suggestions=[{desc:"escape",range:[g.startIndex,g.endIndex],text:o.replace(/\|/gu,"|")}];n.push(g)}}return n}isIndependent(){return this.firstChild.text().startsWith(`
|
|
15
|
+
`)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,n]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${c(this,Te)}${n.print()}</span>`}json(e,t=this.getAbsoluteIndex()){let n=super.json(void 0,t),{rowspan:i,colspan:s}=this;return Object.assign(n,{subtype:this.subtype},i!==1&&{rowspan:i},s!==1&&{colspan:s}),n}};Te=new WeakMap,Br=new WeakMap,qr=new WeakSet,mi=function(){return ve(c(this,Br),()=>{var o;let e=this.firstChild.text(),t=e.slice(-1),n="td";if(t==="!"?n="th":t==="+"&&(n="caption"),this.isIndependent())return{subtype:n};let{previousSibling:i}=this;return{...N(o=i,qr,mi).call(o)}},e=>{T(this,Br,e)})}});var Pl,jl,xi,lr,bi=k(()=>{"use strict";_();hi();fi();Pl=new Set(["tr","td","th","caption"]),jl=new Set(["Template:!!","Template:!-"]),xi=a=>{let r=a.childNodes.find(e=>e.text().trim());if(!r||r.type==="text"&&r.data.trim().startsWith("!")||r.type==="magic-word"&&r.name==="!"||r.type==="template"&&jl.has(r.name)||r.is("html")&&Pl.has(r.name))return!1;if(r.is("arg"))return r.length>1&&xi(r.childNodes[1]);if(r.is("magic-word"))try{let e=r.getPossibleValues().map(xi);return e.includes("error")?"error":e.includes("warning")&&"warning"}catch{}return r.type==="template"||r.type==="magic-word"&&r.name==="invoke"?"warning":"error"},lr=class extends or{lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=this.childNodes.find(({type:o})=>o==="table-inter");if(!n)return t;let i=xi(n);if(!i)return t;let s=C(n,{start:r},"fostered-content","content to be moved out from the table",i);return s.startIndex++,s.startLine++,s.startCol=0,t.push(s),t}getRowCount(){return Number(this.childNodes.some(r=>r instanceof ar&&r.isIndependent()&&!r.firstChild.text().endsWith("+")))}}});var Bl,ql,Ti,gn,$o=k(()=>{"use strict";_();ae();te();V();bi();ut();Bl=(a,r)=>new Array(a).fill(void 0).map((e,t)=>r(t)),ql=({type:a})=>a==="tr"||a==="table-syntax",Ti=class extends Array{},gn=class extends lr{get type(){return"table"}get closed(){return this.lastChild.type==="table-syntax"}constructor(r,e,t,n){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,r,"table",e,t,n,{})}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new R(this,r);this.closed||t.push(C(this.firstChild,n,"unclosed-table",$.msg("unclosed $1","table")));let i=this.getLayout(),{length:s}=i;if(s>1){let o=1,l=1/0,g=0;for(;g<s;g++){let u=i[g],p=u.length;if(p<o)break;p<l&&(l=p);let d=u.indexOf(u[p-1])+1;if(d>l)break;d>o&&(o=d)}if(g<s){let u=C(this.getNthRow(g),n,"table-layout","inconsistent table layout","warning");u.startIndex++,u.startLine++,u.startCol=0,t.push(u)}}return t}close(r=`
|
|
16
|
+
|}`,e){let t=this.getAttribute("config"),n=this.getAttribute("accum"),i=[r];pe.run(()=>{let s=new ue(void 0,"table-syntax",t,n);super.insertAt(s)}),this.lastChild.safeReplaceChildren(i)}getLayout(r){let e=this.getAllRows(),{length:t}=e,n=Ti.from(Bl(t,()=>[]));for(let i=0;i<n.length;i++){let s=n[i],o=0,l=0,g;for(let u of e[i].childNodes.slice(2))if(u.type==="td"){if(u.isIndependent()&&(g=u.subtype!=="caption"),g){let p={row:i,column:o},{rowspan:d,colspan:m}=u;for(o++;s[l];)l++;for(let f=i;f<Math.min(i+d,t);f++)for(let h=l;h<l+m;h++)n[f][h]=p;l+=m}}else if(ql(u))break}return n}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(r=>r.type==="tr"&&r.getRowCount()>0)]}getNthRow(r,e,t){let n=super.getRowCount();if(r===0&&n)return this;n&&r--;for(let i of this.childNodes.slice(2)){let{type:s}=i;if(s==="tr"&&i.getRowCount()&&(r--,r<0))return i}}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.closed=this.closed,t}}});var pn,No=k(()=>{"use strict";bi();pn=class extends lr{get type(){return"tr"}constructor(r,e,t,n){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,r,"tr",e,t,n)}}});var dr,yi=k(()=>{"use strict";Ze();dr=class extends de{get indent(){return this.innerText.split(":").length-1}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{indent:n}=this;return n&&(t.indent=n),t}}});var gr,ki=k(()=>{"use strict";yi();gr=class extends dr{get type(){return"dd"}}});var Eo={};K(Eo,{parseTable:()=>_l});var Ol,Io,_l,Lo=k(()=>{"use strict";O();$o();No();fi();ki();Ol=a=>a.lastChild.constructor!==v,Io=(a,r)=>a.type==="td"?r.pop():a,_l=({firstChild:{data:a},type:r,name:e},t,n)=>{let i=[],s=a.split(`
|
|
24
17
|
`),o=r==="root"||r==="parameter-value"||r==="ext-inner"&&e==="poem"?"":`
|
|
25
|
-
${s.shift()}`,l,
|
|
26
|
-
${
|
|
27
|
-
${
|
|
28
|
-
${
|
|
29
|
-
${
|
|
30
|
-
${
|
|
31
|
-
${g}${v}`,M=R=>{let B=new Vt(L,C.slice(S,$==null?void 0:$.index),t,n);return R.insertAt(B),B};for(;$;)M(l),{lastIndex:S}=E,[L]=$,$=E.exec(C);i.push(l,M(l))}}return o.slice(1)}});var rn,Ds=y(()=>{"use strict";We();rn=class extends ae{get type(){return"hr"}}});var zs,Zn,Oa,pt,Ws=y(()=>{"use strict";Ze();We();zs=[xe()];pt=class extends(Oa=ae){get type(){return"double-underscore"}constructor(r,e,t,n){var l,d;super(r,t,n);let i=r.toLowerCase(),{doubleUnderscore:[,,s,o]}=t;this.setAttribute("name",(d=e?(l=o==null?void 0:o[r])==null?void 0:l.toLowerCase():s==null?void 0:s[i])!=null?d:i)}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Zn=re(Oa),pt=ie(Zn,0,"DoubleUnderscoreToken",zs,pt),ne(Zn,1,pt)});var Gs={};le(Gs,{parseHrAndDoubleUnderscore:()=>qa});var qa,Us=y(()=>{"use strict";Ds();Ws();Nn();qa=({firstChild:{data:a},type:r,name:e},t,n)=>{var l,d,p;let{doubleUnderscore:[i,s,o]}=t;return(l=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i)),(d=t.sensitiveDoubleUnderscore)!=null||(t.sensitiveDoubleUnderscore=new Set(s)),(p=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,(g,u,h)=>(new rn(h,t,n),`${u}\0${n.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(g,u)=>{var x;let h=t.sensitiveDoubleUnderscore.has(u),f=u.toLowerCase(),m=t.insensitiveDoubleUnderscore.has(f);return h||m?(new pt(u,h,t,n),`\0${n.length-1}${m&&((x=o==null?void 0:o[f])!=null?x:f)==="toc"?"u":"n"}\x7F`):g}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(g,u,h,f,m)=>{let x=`${u}\0${n.length}h\x7F`;return new Ot(h.length,[f,m],t,n),x}),r==="root"||r==="ext-inner"&&e==="poem"?a:a.slice(1)}});var nn,Hs=y(()=>{"use strict";q();X();_();We();nn=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=A.msg('lonely "$1"',"'"),s=[],o=new P(this,r),l=(d,p,g)=>[{desc:"escape",range:[d,p],text:"'".repeat(g)},{desc:"remove",range:[d,p],text:""}];if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){let d=F(this,o,"lonely-apos",i),{startIndex:p,startLine:g,startCol:u}=d,[,{length:h}]=/(?:^|[^'])('+)$/u.exec(e.data),f=r-h;s.push({...d,startIndex:f,endIndex:p,endLine:g,startCol:u-h,endCol:u,suggestions:l(f,p,h)})}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){let d=F(this,o,"lonely-apos",i),{endIndex:p,endLine:g,endCol:u}=d,[{length:h}]=/^'+/u.exec(t.data),f=p+h;s.push({...d,startIndex:p,endIndex:f,startLine:g,startCol:u,endCol:u+h,suggestions:l(p,f,h)})}if(n&&this.closest("heading-title")){let d=F(this,o,"bold-header","bold in section header","warning");d.suggestions=[{desc:"remove",range:[r,r+3],text:""}],s.push(d)}return s}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{bold:this.bold,italic:this.italic}),t}}});var Vs={};le(Vs,{parseQuotes:()=>ei});var ei,ti=y(()=>{"use strict";Hs();ei=(a,r,e,t)=>{var g;let n=a.split(/('{2,})/u),{length:i}=n;if(i===1)return a;let s=0,o=0,l,d,p;for(let u=1;u<i;u+=2){let h=n[u].length;switch(h){case 2:o++;break;case 4:n[u-1]+="'",n[u]="'''";case 3:if(s++,l!==void 0)break;n[u-1].endsWith(" ")?d===void 0&&p===void 0&&(p=u):n[u-1].slice(-2,-1)===" "?l=u:d!=null||(d=u);break;default:n[u-1]+="'".repeat(h-5),n[u]="'''''",o++,s++}}if(o%2===1&&s%2===1){let u=(g=l!=null?l:d)!=null?g:p;u!==void 0&&(n[u]="''",n[u-1]+="'")}for(let u=1;u<i;u+=2)new nn(n[u],r,e),n[u]=`\0${e.length-1}q\x7F`;return n.join("")}});var Xs={};le(Xs,{parseExternalLinks:()=>ri});var ri,ni=y(()=>{"use strict";J();qn();Qr();ri=(a,r,e,t)=>{var n;return(n=r.regexExternalLinks)!=null||(r.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${r.protocol}|//)${Ee}|\0\d+m\x7F)${Le}(?=[[\]<>"\t${ke}]|\0\d))([${ke}]*(?![${ke}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(r.regexExternalLinks,(i,s,o,l)=>{let{length:d}=e,p=/&[lg]t;/u.exec(s);return p&&(o="",l=s.slice(p.index)+o+l,s=s.slice(0,p.index)),t?(new je(s,"ext-link-url",r,e),`[\0${d}f\x7F${o}${l}]`):(new Wt(s,o,l,r,e),`\0${d}w\x7F`)})}});var sn,Qs=y(()=>{"use strict";J();ur();sn=class extends Ce{get type(){return"category"}get sortkey(){let{childNodes:[,r]}=this;return r&&Ye(r.text())}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:n}=this;return n&&(t.sortkey=n),t}}});var Js={};le(Js,{parseLinks:()=>Ks});var _a,Ks,Ys=y(()=>{"use strict";_();ti();ni();On();Pn();Qs();_a=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Ks=(a,r,e,t)=>{var o;(o=r.regexLinks)!=null||(r.regexLinks=new RegExp(String.raw`^\s*(?:${r.protocol}|//)`,"iu"));let n=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,i=a.split("[["),s=i.shift();for(let l=0;l<i.length;l++){let d=!1,p,g,u,h,f=i[l],m=n.exec(f);if(m)[,p,g,u,h]=m,h.startsWith("]")&&(u!=null&&u.includes("["))&&(u+="]",h=h.slice(1));else{let $=_a.exec(f);$&&(d=!0,[,p,g,u]=$)}if(p===void 0||r.regexLinks.test(p)||/\0\d+[exhbru]\x7F/u.test(p)){s+=`[[${f}`;continue}let x=p.trim().startsWith(":");if(x&&d){s+=`[[${f}`;continue}let{ns:v,valid:C}=A.normalizeTitle(p,0,!1,r,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0});if(C){if(d){if(v!==6){s+=`[[${f}`;continue}let $=!1;for(l++;l<i.length;l++){let S=i[l],L=S.split("]]");if(L.length>2){$=!0,u+=`[[${L[0]}]]${L[1]}`,h=L.slice(2).join("]]");break}else if(L.length===2)u+=`[[${L[0]}]]${L[1]}`;else{u+=`[[${S}`;break}}if(u=Ks(u,r,e,t),!$){s+=`[[${p}${g}${u}`;continue}}}else{s+=`[[${f}`;continue}u&&(u=ei(u,r,e,t));let E=zt;x||(v===6?(u&&(u=ri(u,r,e,!0)),E=Mt):v===14&&(E=sn)),u===void 0&&g&&(u=""),s+=`\0${e.length}l\x7F${h}`,new E(p,u,r,e,g)}return s}});var no={};le(no,{parseMagicLinks:()=>Ma});var ro,Zs,eo,to,Ma,io=y(()=>{"use strict";J();Qr();ro=String.raw`[${ke}\t]| |�*160;|�*a0;`,Zs=`(?:${ro})+`,eo=`(?:${ro}|-)`,to=String.raw`(?:RFC|PMID)${Zs}\d+\b|ISBN${Zs}(?:97[89]${eo}?)?(?:\d${eo}?){9}[\dx]\b`,Ma=(a,r,e)=>{if(!r.regexMagicLinks)try{r.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${r.protocol})(${Ee}${Le})|${to})`,"giu")}catch(t){r.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${r.protocol})(${Ee}${Le})|${to})`,"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 d=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,p=d.exec(s);if(p){let g=1;p[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,p.index))&&(g=2),o=s.slice(p.index+g)+o,s=s.slice(0,p.index+g)}return o.length>=i.length?t:(new je(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 je(s,"magic-link",r,e),`${n}\0${e.length-1}i\x7F`})}});var so,oo=y(()=>{"use strict";so=(a,r)=>a.startsWith(r)?r.length:[...r].findIndex((e,t)=>e!==a[t])});var on,ao=y(()=>{"use strict";Jn();on=class extends Qt{get type(){return"list"}}});var lo={};le(lo,{parseList:()=>Da});var Da,go=y(()=>{"use strict";oo();ao();Yn();Da=(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,":"),d=so(l,r.lastPrefix),p=(d>1?o.slice(d-1):o).split(/(?=;)/u),g=p[0].startsWith(";"),u=p.length-(g?0:1);if(d>1){let R=o.slice(0,d-1);g?p.unshift(R):p[0]=R+p[0]}r.lastPrefix=l;let h=s+p.map((R,B)=>`\0${t.length+B}d\x7F`).join("")+a.slice(i.length);for(let R of p)new on(R,e,t);if(!u)return h;let{html:[f]}=e,m=/:+|-\{|\0\d+[xq]\x7F/gu,x=m,v=x.exec(h),C=0,E=!1,$=!1,S=0,L=(R,B)=>(new Kt(R,e,t),`${h.slice(0,B)}\0${t.length-1}d\x7F${h.slice(B+R.length)}`),M=R=>{R?C&&C--:C++};for(;v&&u;){let{0:R,index:B}=v;if(R==="-{"){if(!S){let{lastIndex:O}=x;x=/-\{|\}-/gu,x.lastIndex=O}S++}else if(R==="}-"){if(S--,!S){let{lastIndex:O}=x;x=m,x.lastIndex=O}}else if(R.endsWith("x\x7F")){let{name:O,closing:Q,selfClosing:me}=t[Number(R.slice(1,-2))];(!me||f.includes(O))&&M(Q)}else if(R.endsWith("q\x7F")){let{bold:O,italic:Q}=t[Number(R.slice(1,-2))];O&&(M(E),E=!E),Q&&(M($),$=!$)}else if(C===0){if(R.length>=u)return L(R.slice(0,u),B);u-=R.length,x.lastIndex=B+4+String(t.length).length,h=L(R,B)}v=x.exec(h)}return h}});var po,_e,an,uo=y(()=>{"use strict";q();X();j();Re();po=new Set(["A","T","R","D","-","H","N"]),an=class extends k{constructor(e,t,n=[]){super(void 0,t,n,{});T(this,_e);this.append(...e.map(i=>new W(i,"converter-flag",t,n)))}get type(){return"converter-flags"}afterBuild(){b(this,_e,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,_e).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,_e).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,_e).filter(g=>po.has(g))),o=c(this,_e).filter(g=>!g).length,l=c(this,_e).length-i.size-o,d=super.lint(e,t);if(n.size===l||s.size===l)return d;let p=new P(this,e);for(let g=0;g<this.length;g++){let u=this.childNodes[g],h=u.text().trim();if(h&&!n.has(h)&&!i.has(h)&&(n.size>0||!s.has(h))){let f=w(u,p,"no-ignored","invalid conversion flag");n.size===0&&po.has(h.toUpperCase())?f.fix={range:[f.startIndex,f.endIndex],text:h.toUpperCase(),desc:"uppercase"}:f.suggestions=[{desc:"remove",range:[f.startIndex-(g&&1),f.endIndex],text:""}],d.push(f)}}return d}print(){return super.print({sep:";"})}};_e=new WeakMap});var Jt,co=y(()=>{"use strict";_();j();Re();Jt=class extends k{get type(){return"converter-rule"}get variant(){var r,e;return(e=(r=this.childNodes[this.length-2])==null?void 0:r.text().trim())!=null?e:""}constructor(r,e=!0,t=A.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 W(o,"converter-rule-variant",t,n)),super.insertAt(new W(r.slice(i+1),"converter-rule-to",t,n)),s!==-1&&super.insertAt(new W(r.slice(0,s),"converter-rule-from",t,n),0)):super.insertAt(new W(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:":"})}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.variant=this.variant,t}}});var ln,ho=y(()=>{"use strict";J();j();uo();co();ln=class extends k{get type(){return"converter"}constructor(r,e,t,n=[]){super(void 0,t,n),this.insertAt(new an(r,t,n));let[i]=e,s=i.includes(":"),o=new Jt(i,s,t,n);s&&o.length===1||!s&&e.length===2&&!oe(e[1]).trim()?this.insertAt(new Jt(e.join(";"),!1,t,n)):this.append(o,...e.slice(1).map(l=>new Jt(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()}|${fe(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?"|":""}${Fe(e,{sep:";"})}}-</span>`}}});var mo={};le(mo,{parseConverter:()=>za});var za,fo=y(()=>{"use strict";ho();za=(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:d,index:p}=o;if(d==="}-"){let g=i.pop(),{length:u}=e,h=a.slice(g.index+2,p),f=h.indexOf("|"),[m,x]=f===-1?[[],h]:[h.slice(0,f).split(";"),h.slice(f+1)],v=x.replace(/(&[#a-z\d]+);/giu,"$1"),C=v.split(r.regexConverter).map(E=>E.replace(/\x01/gu,";"));new ln(m,C,r,e),a=`${a.slice(0,g.index)}\0${u}v\x7F${a.slice(p+2)}`,i.length===0&&(s=t),s.lastIndex=g.index+3+String(u).length}else i.push(o),s=n,s.lastIndex=p+2;o=s.exec(a)}return a}});var dn={};le(dn,{Token:()=>k});var wr,he,D,G,ut,Yt,Cr,z,xo,bo,To,yo,ko,vo,Ao,So,wo,Co,$o,Io,ii,k,j=y(()=>{"use strict";J();q();ce();_();Ci();Ni();ii=class ii extends Lr{constructor(e,t=A.getConfig(),n=[],i){super();T(this,z);T(this,wr,"plain");T(this,he,0);T(this,D);T(this,G);T(this,ut);T(this,Yt,!1);T(this,Cr);typeof e=="string"&&this.insertAt(e),b(this,D,t),b(this,G,n),n.push(this)}get type(){return c(this,wr)}set type(e){b(this,wr,e)}parseOnce(e=c(this,he),t=!1,n){if(e<c(this,he)||this.length===0||!this.getAttribute("plain"))return this;if(c(this,he)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,G).pop();let i=N(this,z,xo).call(this);t&&(t=!i)}b(this,ut,t),N(this,z,bo).call(this,t);break;case 1:N(this,z,To).call(this);break;case 2:N(this,z,yo).call(this);break;case 3:N(this,z,ko).call(this);break;case 4:N(this,z,vo).call(this);break;case 5:N(this,z,Ao).call(this,n);break;case 6:N(this,z,So).call(this,n);break;case 7:N(this,z,wo).call(this);break;case 8:N(this,z,Co).call(this);break;case 9:N(this,z,$o).call(this);break;case 10:N(this,z,Io).call(this)}if(this.type==="root")for(let i of c(this,G))i==null||i.parseOnce(e,t,n);return Nr(this,he)._++,this}buildFromStr(e,t){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new gr(i);if(isNaN(i.slice(-1)))return c(this,G)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?n.map(String).join(""):t===1?fe(n):n}build(){b(this,he,11);let{length:e,firstChild:t}=this,n=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&n.includes("\0")&&(dr(this,0,1,this.buildFromStr(n)),this.normalize(),this.type==="root"))for(let i of c(this,G))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,G))e==null||e.afterBuild();b(this,Yt,!0)}parse(e=11,t,n){for(e=Math.min(e,11);c(this,he)<e;)this.parseOnce(c(this,he),t,n);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===ii;case"config":return c(this,D);case"include":return(t=c(this,ut))!=null?t:!!c(this.getRootNode(),ut);case"accum":return c(this,G);case"built":return c(this,Yt);case"stage":return c(this,he);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,he)===0&&this.type==="root"&&c(this,G).shift(),b(this,he,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let n=typeof e=="string"?new gr(e):e;super.insertAt(n,t);let{type:i}=n;return i==="root"&&(n.type="plain"),n}normalizeTitle(e,t=0,n){return A.normalizeTitle(e,t,c(this,ut),c(this,D),n)}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 u of this.querySelectorAll(o)){let h;if(u.type==="category")h=u.name;else{let f=u.getValue();f&&f!==!0&&(h=`#${f}`)}if(h){let f=s.get(h);f?f.add(u):s.set(h,new Set([u]))}}for(let[u,h]of s)if(h.size>1&&!u.startsWith("#mw-customcollapsible-")){let f=!u.startsWith("#"),m=`duplicated ${f?"category":"id"}`,x=f?"error":"warning";n.push(...[...h].map(v=>{let C=F(v,{start:v.getAbsoluteIndex()},"no-duplicate",m,x);return f&&(C.suggestions=[{desc:"remove",range:[C.startIndex,C.endIndex],text:""}]),C}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,d=this.toString(),p=[],g=l.exec(d);for(;g;){let{1:u,index:h}=g,f=(i=g[2])==null?void 0:i.trim();p.push({line:this.posFromIndex(h).top+(u==="disable-line"?0:1),from:u==="disable"?l.lastIndex:void 0,to:u==="enable"?l.lastIndex:void 0,rules:f?new Set(f.split(",").map(m=>m.trim())):void 0}),g=l.exec(d)}n=n.filter(({rule:u,startLine:h,startIndex:f})=>{let m={pos:0};for(let{line:x,from:v,to:C,rules:E}of p){if(x>h+1)break;if(E&&!E.has(u))continue;if(x===h&&v===void 0&&C===void 0)return!1;v<=f&&v>m.pos?(m.pos=v,m.type="from"):C<=f&&C>m.pos&&(m.pos=C,m.type="to")}return m.type!=="from"})}return n}toString(e,t){return e?super.toString(!0,t):ve(c(this,Cr),()=>super.toString(!1,t),n=>{let i=this.getRootNode();i.type==="root"&&c(i,Yt)&&b(this,Cr,n)})}};wr=new WeakMap,he=new WeakMap,D=new WeakMap,G=new WeakMap,ut=new WeakMap,Yt=new WeakMap,Cr=new WeakMap,z=new WeakSet,xo=function(){let{parseRedirect:e}=(ji(),K(Pi)),t=this.firstChild.toString(),n=e(t,c(this,D),c(this,G));return n&&this.setText(n),!!n},bo=function(e){let{parseCommentAndExt:t}=(mr(),K(Ls));this.setText(t(this.firstChild.toString(),c(this,D),c(this,G),e))},To=function(){let{parseBraces:e}=(Gr(),K(us)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(t,c(this,D),c(this,G));this.setText(this.type==="root"?n:n.slice(1))},yo=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(js(),K(Ps));this.setText(e(this.firstChild.toString(),c(this,D),c(this,G)))},ko=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(Ms(),K(_s));this.setText(e(this,c(this,D),c(this,G)))},vo=function(){var t;if((t=c(this,D).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Us(),K(Gs));this.setText(e(this,c(this,D),c(this,G)))},Ao=function(e){let{parseLinks:t}=(Ys(),K(Js));this.setText(t(this.firstChild.toString(),c(this,D),c(this,G),e))},So=function(e){var i;if((i=c(this,D).excludes)!=null&&i.includes("quote"))return;let{parseQuotes:t}=(ti(),K(Vs)),n=this.firstChild.toString().split(`
|
|
32
|
-
`);for(let
|
|
33
|
-
`))},
|
|
34
|
-
`),o={lastPrefix:""},l=n==="root"||n==="ext-inner"&&i==="poem"?0:1;for(;l<s.length;l++)s[l]=e(s[l],o,c(this,
|
|
35
|
-
`))},
|
|
18
|
+
${s.shift()}`,l,g=(u,p)=>{if(!p){o+=u;return}let{lastChild:d}=p;if(Ol(p)){let m=new v(u,t,n);m.type="table-inter",m.setAttribute("stage",3),p.insertAt(m)}else d.setText(d.toString()+u)};for(let u of s){l=i.pop();let[p]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(u),d=u.slice(p.length),m=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(d);if(m){for(;l&&l.type!=="td";)l=i.pop();let[,S,A,I,q]=m;S&&new gr(S,t,n),g(`
|
|
19
|
+
${p}${S&&`\0${n.length-1}d`}${A}\0${n.length}b`,l),i.push(...l?[l]:[],new gn(I,q,t,n));continue}else if(!l){o+=`
|
|
20
|
+
${u}`;continue}let f=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(d);if(!f){g(`
|
|
21
|
+
${u}`,l),i.push(l);continue}let[,h,x,y,w]=f;if(h){for(;l.type!=="table";)l=i.pop();l.close(`
|
|
22
|
+
${p}${h}`,!0),g(w,i[i.length-1])}else if(x){l=Io(l,i),l.type==="tr"&&(l=i.pop());let S=new pn(`
|
|
23
|
+
${p}${x}`,w,t,n);i.push(l,S),l.insertAt(S)}else{l=Io(l,i);let S=y==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,A=S.exec(w),I=0,q=`
|
|
24
|
+
${p}${y}`,M=F=>{let H=new ar(q,w.slice(I,A==null?void 0:A.index),t,n);return F.insertAt(H),H};for(;A;)M(l),{lastIndex:I}=S,[q]=A,A=S.exec(w);i.push(l,M(l))}}return o.slice(1)}});var un,Fo=k(()=>{"use strict";Ze();un=class extends de{get type(){return"hr"}}});var Ro,vi,Ml,wt,Po=k(()=>{"use strict";pt();_e();Ze();Ro=[be(),le("__")];wt=class extends(Ml=de){get type(){return"double-underscore"}constructor(r,e,t,n){var l,g;super(r,t,n);let i=r.toLowerCase(),{doubleUnderscore:[,,s,o]}=t;this.setAttribute("name",(g=e?(l=o==null?void 0:o[r])==null?void 0:l.toLowerCase():s==null?void 0:s[i])!=null?g:i)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};vi=P(Ml),wt=B(vi,0,"DoubleUnderscoreToken",Ro,wt),j(vi,1,wt)});var jo={};K(jo,{parseHrAndDoubleUnderscore:()=>Dl});var Dl,Bo=k(()=>{"use strict";Fo();Po();zn();Dl=({firstChild:{data:a},type:r,name:e},t,n)=>{var l,g,u;let{doubleUnderscore:[i,s,o]}=t;return(l=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i)),(g=t.sensitiveDoubleUnderscore)!=null||(t.sensitiveDoubleUnderscore=new Set(s)),(u=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,(p,d,m)=>(new un(m,t,n),`${d}\0${n.length-1}r`)).replace(t.regexHrAndDoubleUnderscore,(p,d)=>{var x;let m=t.sensitiveDoubleUnderscore.has(d),f=d.toLowerCase(),h=t.insensitiveDoubleUnderscore.has(f);return m||h?(new wt(d,m,t,n),`\0${n.length-1}${h&&((x=o==null?void 0:o[f])!=null?x:f)==="toc"?"u":"n"}`):p}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(p,d,m,f,h)=>{let x=`${d}\0${n.length}h`;return new Jt(m.length,[f,h],t,n),x}),r==="root"||r==="ext-inner"&&e==="poem"?a:a.slice(1)}});var cn,qo=k(()=>{"use strict";_();te();V();Ze();cn=class extends de{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=$.msg('lonely "$1"',"'"),s=[],o=new R(this,r),l=(g,u,p)=>[{desc:"escape",range:[g,u],text:"'".repeat(p)},{desc:"remove",range:[g,u],text:""}];if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){let g=L(this,o,"lonely-apos",i),{startIndex:u,startLine:p,startCol:d}=g,[,{length:m}]=/(?:^|[^'])('+)$/u.exec(e.data),f=r-m;s.push({...g,startIndex:f,endIndex:u,endLine:p,startCol:d-m,endCol:d,suggestions:l(f,u,m)})}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){let g=L(this,o,"lonely-apos",i),{endIndex:u,endLine:p,endCol:d}=g,[{length:m}]=/^'+/u.exec(t.data),f=u+m;s.push({...g,startIndex:u,endIndex:f,startLine:p,startCol:d,endCol:d+m,suggestions:l(u,f,m)})}if(n&&this.closest("heading-title")){let g=L(this,o,"bold-header","bold in section header","warning");g.suggestions=[{desc:"remove",range:[r,r+3],text:""}],s.push(g)}return s}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return Object.assign(t,{bold:this.bold,italic:this.italic}),t}}});var Oo={};K(Oo,{parseQuotes:()=>Ai});var Ai,Si=k(()=>{"use strict";qo();Ai=(a,r,e,t)=>{var p;let n=a.split(/('{2,})/u),{length:i}=n;if(i===1)return a;let s=0,o=0,l,g,u;for(let d=1;d<i;d+=2){let m=n[d].length;switch(m){case 2:o++;break;case 4:n[d-1]+="'",n[d]="'''";case 3:if(s++,l!==void 0)break;n[d-1].endsWith(" ")?g===void 0&&u===void 0&&(u=d):n[d-1].slice(-2,-1)===" "?l=d:g!=null||(g=d);break;default:n[d-1]+="'".repeat(m-5),n[d]="'''''",o++,s++}}if(o%2===1&&s%2===1){let d=(p=l!=null?l:g)!=null?p:u;d!==void 0&&(n[d]="''",n[d-1]+="'")}for(let d=1;d<i;d+=2)new cn(n[d],r,e),n[d]=`\0${e.length-1}q`;return n.join("")}});var _o={};K(_o,{parseExternalLinks:()=>wi});var wi,Ci=k(()=>{"use strict";ee();si();dn();wi=(a,r,e,t)=>{var n;return(n=r.regexExternalLinks)!=null||(r.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${r.protocol}|//)${je}|\0\d+m\x7F)${Be}(?=[[\]<>"\t${ke}]|\0\d))([${ke}]*(?![${ke}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(r.regexExternalLinks,(i,s,o,l)=>{let{length:g}=e,u=/&[lg]t;/u.exec(s);return u&&(o="",l=s.slice(u.index)+o+l,s=s.slice(0,u.index)),t?(new He(s,"ext-link-url",r,e),`[\0${g}f${o}${l}]`):(new Ve(s,o,l,r,e),`\0${g}w`)})}});var hn,Mo=k(()=>{"use strict";ee();wr();hn=class extends me{get type(){return"category"}get sortkey(){let{childNodes:[,r]}=this;return r&>(r.text())}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e),{sortkey:n}=this;return n&&(t.sortkey=n),t}}});var zo={};K(zo,{parseLinks:()=>Do});var zl,Do,Uo=k(()=>{"use strict";V();Si();Ci();ni();Yn();Mo();zl=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Do=(a,r,e,t)=>{var o;(o=r.regexLinks)!=null||(r.regexLinks=new RegExp(String.raw`^\s*(?:${r.protocol}|//)`,"iu"));let n=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,i=a.split("[["),s=i.shift();for(let l=0;l<i.length;l++){let g=!1,u,p,d,m,f=i[l],h=n.exec(f);if(h)[,u,p,d,m]=h,m.startsWith("]")&&(d!=null&&d.includes("["))&&(d+="]",m=m.slice(1));else{let A=zl.exec(f);A&&(g=!0,[,u,p,d]=A)}if(u===void 0||r.regexLinks.test(u)||/\0\d+[exhbru]\x7F/u.test(u)){s+=`[[${f}`;continue}let x=u.trim().startsWith(":");if(x&&g){s+=`[[${f}`;continue}let{ns:y,valid:w}=$.normalizeTitle(u,0,!1,r,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0});if(w){if(g){if(y!==6){s+=`[[${f}`;continue}let A=!1;for(l++;l<i.length;l++){let I=i[l],q=I.split("]]");if(q.length>2){A=!0,d+=`[[${q[0]}]]${q[1]}`,m=q.slice(2).join("]]");break}else if(q.length===2)d+=`[[${q[0]}]]${q[1]}`;else{d+=`[[${I}`;break}}if(d=Do(d,r,e,t),!A){s+=`[[${u}${p}${d}`;continue}}}else{s+=`[[${f}`;continue}d&&(d=Ai(d,r,e,t));let S=nr;x||(y===6?(d&&(d=wi(d,r,e,!0)),S=tr):y===14&&(S=hn)),d===void 0&&p&&(d=""),s+=`\0${e.length}l${m}`,new S(u,d,r,e,p)}return s}});var Xo={};K(Xo,{parseMagicLinks:()=>Ul});var Vo,Wo,Ho,Go,Ul,Qo=k(()=>{"use strict";ee();dn();Vo=String.raw`[${ke}\t]| |�*160;|�*a0;`,Wo=`(?:${Vo})+`,Ho=`(?:${Vo}|-)`,Go=String.raw`(?:RFC|PMID)${Wo}\d+\b|ISBN${Wo}(?:97[89]${Ho}?)?(?:\d${Ho}?){9}[\dx]\b`,Ul=(a,r,e)=>{if(!r.regexMagicLinks)try{r.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${r.protocol})(${je}${Be})|${Go})`,"giu")}catch{r.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${r.protocol})(${je}${Be})|${Go})`,"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 g=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,u=g.exec(s);if(u){let p=1;u[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,u.index))&&(p=2),o=s.slice(u.index+p)+o,s=s.slice(0,u.index+p)}return o.length>=i.length?t:(new He(s,void 0,r,e),`${n}\0${e.length-1}w${o}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new He(s,"magic-link",r,e),`${n}\0${e.length-1}i`})}});var Ko,Jo=k(()=>{"use strict";Ko=(a,r)=>a.startsWith(r)?r.length:[...r].findIndex((e,t)=>e!==a[t])});var mn,Yo=k(()=>{"use strict";yi();mn=class extends dr{get type(){return"list"}}});var Zo={};K(Zo,{parseList:()=>Wl});var Wl,ea=k(()=>{"use strict";Jo();Yo();ki();Wl=(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,":"),g=Ko(l,r.lastPrefix),u=(g>1?o.slice(g-1):o).split(/(?=;)/u),p=u[0].startsWith(";"),d=u.length-(p?0:1);if(g>1){let F=o.slice(0,g-1);p?u.unshift(F):u[0]=F+u[0]}r.lastPrefix=l;let m=s+u.map((F,H)=>`\0${t.length+H}d`).join("")+a.slice(i.length);for(let F of u)new mn(F,e,t);if(!d)return m;let{html:[f]}=e,h=/:+|-\{|\0\d+[xq]\x7F/gu,x=h,y=x.exec(m),w=0,S=!1,A=!1,I=0,q=(F,H)=>(new gr(F,e,t),`${m.slice(0,H)}\0${t.length-1}d${m.slice(H+F.length)}`),M=F=>{F?w&&w--:w++};for(;y&&d;){let{0:F,index:H}=y;if(F==="-{"){if(!I){let{lastIndex:G}=x;x=/-\{|\}-/gu,x.lastIndex=G}I++}else if(F==="}-"){if(I--,!I){let{lastIndex:G}=x;x=h,x.lastIndex=G}}else if(F.endsWith("x")){let{name:G,closing:ge,selfClosing:ne}=t[Number(F.slice(1,-2))];(!ne||f.includes(G))&&M(ge)}else if(F.endsWith("q")){let{bold:G,italic:ge}=t[Number(F.slice(1,-2))];G&&(M(S),S=!S),ge&&(M(A),A=!A)}else if(w===0){if(F.length>=d)return q(F.slice(0,d),H);d-=F.length,x.lastIndex=H+4+String(t.length).length,m=q(F,H)}y=x.exec(m)}return m}});var ta,ra,Ke,$i,Hl,Ct,na=k(()=>{"use strict";_();te();Cr();O();Me();ta=new Set(["A","T","R","D","-","H","N"]);ra=[tt()];Ct=class extends(Hl=v){constructor(e,t,n=[]){super(void 0,t,n,{});b(this,Ke);this.safeAppend(e.map(i=>new X(i,"converter-flag",t,n)))}get type(){return"converter-flags"}afterBuild(){T(this,Ke,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(c(this,Ke).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(c(this,Ke).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(c(this,Ke).filter(p=>ta.has(p))),o=c(this,Ke).filter(p=>!p).length,l=c(this,Ke).length-i.size-o,g=super.lint(e,t);if(n.size===l||s.size===l)return g;let u=new R(this,e);for(let p=0;p<this.length;p++){let d=this.childNodes[p],m=d.text().trim();if(m&&!n.has(m)&&!i.has(m)&&(n.size>0||!s.has(m))){let f=C(d,u,"no-ignored","invalid conversion flag");n.size===0&&ta.has(m.toUpperCase())?f.fix={range:[f.startIndex,f.endIndex],text:m.toUpperCase(),desc:"uppercase"}:f.suggestions=[{desc:"remove",range:[f.startIndex-(p&&1),f.endIndex],text:""}],g.push(f)}}return g}print(){return super.print({sep:";"})}};$i=P(Hl),Ke=new WeakMap,Ct=B($i,0,"ConverterFlagsToken",ra,Ct),j($i,1,Ct)});var pr,ia=k(()=>{"use strict";V();O();Me();pr=class extends v{get type(){return"converter-rule"}get variant(){var r,e;return(e=(r=this.childNodes[this.length-2])==null?void 0:r.text().trim())!=null?e:""}constructor(r,e=!0,t=$.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 X(o,"converter-rule-variant",t,n)),super.insertAt(new X(r.slice(i+1),"converter-rule-to",t,n)),s!==-1&&super.insertAt(new X(r.slice(0,s),"converter-rule-from",t,n),0)):super.insertAt(new X(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:":"})}json(r,e=this.getAbsoluteIndex()){let t=super.json(void 0,e);return t.variant=this.variant,t}}});var sa,Ni,Gl,$t,oa=k(()=>{"use strict";ee();_e();O();na();ia();sa=[le("-{")];$t=class extends(Gl=v){get type(){return"converter"}constructor(r,e,t,n=[]){super(void 0,t,n),this.insertAt(new Ct(r,t,n));let[i]=e,s=i.includes(":"),o=new pr(i,s,t,n);s&&o.length===1||!s&&e.length===2&&!re(e[1]).trim()?this.insertAt(new pr(e.join(";"),!1,t,n)):this.append(o,...e.slice(1).map(l=>new pr(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()}|${xe(e,";")}}-`}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?"|":""}${Oe(e,{sep:";"})}}-</span>`}};Ni=P(Gl),$t=B(Ni,0,"ConverterToken",sa,$t),j(Ni,1,$t)});var aa={};K(aa,{parseConverter:()=>Vl});var Vl,la=k(()=>{"use strict";oa();Vl=(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:g,index:u}=o;if(g==="}-"){let p=i.pop(),{length:d}=e,m=a.slice(p.index+2,u),f=m.indexOf("|"),[h,x]=f===-1?[[],m]:[m.slice(0,f).split(";"),m.slice(f+1)],y=x.replace(/(&[#a-z\d]+);/giu,"$1"),w=y.split(r.regexConverter).map(S=>S.replace(/\x01/gu,";"));new $t(h,w,r,e),a=`${a.slice(0,p.index)}\0${d}v${a.slice(u+2)}`,i.length===0&&(s=t),s.lastIndex=p.index+3+String(d).length}else i.push(o),s=n,s.lastIndex=u+2;o=s.exec(a)}return a}});var fn={};K(fn,{Token:()=>v});var Or,fe,U,Q,Nt,ur,_r,W,da,ga,pa,ua,ca,ha,ma,fa,xa,ba,Ta,ya,Ii,v,O=k(()=>{"use strict";ee();_();ae();V();Ji();es();Ii=class Ii extends Hr{constructor(e,t=$.getConfig(),n=[],i){super();b(this,W);b(this,Or,"plain");b(this,fe,0);b(this,U);b(this,Q);b(this,Nt);b(this,ur,!1);b(this,_r);typeof e=="string"&&this.insertAt(e),T(this,U,t),T(this,Q,n),n.push(this)}get type(){return c(this,Or)}set type(e){T(this,Or,e)}parseOnce(e=c(this,fe),t=!1,n){if(e<c(this,fe)||this.length===0||!this.isPlain())return this;if(c(this,fe)>=11)return this;switch(e){case 0:if(this.type==="root"){c(this,Q).pop();let i=N(this,W,da).call(this);t&&(t=!i)}T(this,Nt,t),N(this,W,ga).call(this,t);break;case 1:N(this,W,pa).call(this);break;case 2:N(this,W,ua).call(this);break;case 3:N(this,W,ca).call(this);break;case 4:N(this,W,ha).call(this);break;case 5:N(this,W,ma).call(this,n);break;case 6:N(this,W,fa).call(this,n);break;case 7:N(this,W,xa).call(this);break;case 8:N(this,W,ba).call(this);break;case 9:N(this,W,Ta).call(this);break;case 10:N(this,W,ya).call(this)}if(this.type==="root")for(let i of c(this,Q))i==null||i.parseOnce(e,t,n);return Ur(this,fe)._++,this}buildFromStr(e,t){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new Ar(i);if(isNaN(i.slice(-1)))return c(this,Q)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?n.map(String).join(""):t===1?xe(n):n}build(){T(this,fe,11);let{length:e,firstChild:t}=this,n=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&n.includes("\0")&&(vr(this,0,1,this.buildFromStr(n)),this.normalize(),this.type==="root"))for(let i of c(this,Q))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of c(this,Q))e==null||e.afterBuild();T(this,ur,!0)}parse(e=11,t,n){for(e=Math.min(e,11);c(this,fe)<e;)this.parseOnce(c(this,fe),t,n);return e&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===Ii}getAttribute(e){var t;switch(e){case"config":return c(this,U);case"include":return(t=c(this,Nt))!=null?t:!!c(this.getRootNode(),Nt);case"accum":return c(this,Q);case"built":return c(this,ur);case"stage":return c(this,fe);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":c(this,fe)===0&&this.type==="root"&&c(this,Q).shift(),T(this,fe,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let n=typeof e=="string"?new Ar(e):e;super.insertAt(n,t);let{type:i}=n;return i==="root"&&(n.type="plain"),n}normalizeTitle(e,t=0,n){return $.normalizeTitle(e,t,c(this,Nt),c(this,U),n)}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 d of this.querySelectorAll(o)){let m;if(d.type==="category")m=d.name;else{let f=d.getValue();f&&f!==!0&&(m=`#${f}`)}if(m){let f=s.get(m);f?f.add(d):s.set(m,new Set([d]))}}for(let[d,m]of s)if(m.size>1&&!d.startsWith("#mw-customcollapsible-")){let f=!d.startsWith("#"),h=`duplicated ${f?"category":"id"}`,x=f?"error":"warning";n.push(...[...m].map(y=>{let w=L(y,{start:y.getAbsoluteIndex()},"no-duplicate",h,x);return f&&(w.suggestions=[{desc:"remove",range:[w.startIndex,w.endIndex],text:""}]),w}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,g=this.toString(),u=[],p=l.exec(g);for(;p;){let{1:d,index:m}=p,f=(i=p[2])==null?void 0:i.trim();u.push({line:this.posFromIndex(m).top+(d==="disable-line"?0:1),from:d==="disable"?l.lastIndex:void 0,to:d==="enable"?l.lastIndex:void 0,rules:f?new Set(f.split(",").map(h=>h.trim())):void 0}),p=l.exec(g)}n=n.filter(({rule:d,startLine:m,startIndex:f})=>{let h={pos:0};for(let{line:x,from:y,to:w,rules:S}of u){if(x>m+1)break;if(S&&!S.has(d))continue;if(x===m&&y===void 0&&w===void 0)return!1;y<=f&&y>h.pos?(h.pos=y,h.type="from"):w<=f&&w>h.pos&&(h.pos=w,h.type="to")}return h.type!=="from"})}return n}toString(e,t){return e?super.toString(!0,t):ve(c(this,_r),()=>super.toString(!1,t),n=>{let i=this.getRootNode();i.type==="root"&&c(i,ur)&&T(this,_r,n)})}};Or=new WeakMap,fe=new WeakMap,U=new WeakMap,Q=new WeakMap,Nt=new WeakMap,ur=new WeakMap,_r=new WeakMap,W=new WeakSet,da=function(){let{parseRedirect:e}=(as(),z(os)),t=this.firstChild.toString(),n=e(t,c(this,U),c(this,Q));return n&&this.setText(n),!!n},ga=function(e){let{parseCommentAndExt:t}=(Ir(),z(vo));this.setText(t(this.firstChild.toString(),c(this,U),c(this,Q),e))},pa=function(){let{parseBraces:e}=(nn(),z(Xs)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(t,c(this,U),c(this,Q));this.setText(this.type==="root"?n:n.slice(1))},ua=function(){if(c(this,U).excludes.includes("html"))return;let{parseHtml:e}=(Co(),z(wo));this.setText(e(this.firstChild.toString(),c(this,U),c(this,Q)))},ca=function(){if(c(this,U).excludes.includes("table"))return;let{parseTable:e}=(Lo(),z(Eo));this.setText(e(this,c(this,U),c(this,Q)))},ha=function(){if(c(this,U).excludes.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Bo(),z(jo));this.setText(e(this,c(this,U),c(this,Q)))},ma=function(e){let{parseLinks:t}=(Uo(),z(zo));this.setText(t(this.firstChild.toString(),c(this,U),c(this,Q),e))},fa=function(e){if(c(this,U).excludes.includes("quote"))return;let{parseQuotes:t}=(Si(),z(Oo)),n=this.firstChild.toString().split(`
|
|
25
|
+
`);for(let i=0;i<n.length;i++)n[i]=t(n[i],c(this,U),c(this,Q),e);this.setText(n.join(`
|
|
26
|
+
`))},xa=function(){if(c(this,U).excludes.includes("extLink"))return;let{parseExternalLinks:e}=(Ci(),z(_o));this.setText(e(this.firstChild.toString(),c(this,U),c(this,Q)))},ba=function(){if(c(this,U).excludes.includes("magicLink"))return;let{parseMagicLinks:e}=(Qo(),z(Xo));this.setText(e(this.firstChild.toString(),c(this,U),c(this,Q)))},Ta=function(){if(c(this,U).excludes.includes("list"))return;let{parseList:e}=(ea(),z(Zo)),{firstChild:t,type:n,name:i}=this,s=t.toString().split(`
|
|
27
|
+
`),o={lastPrefix:""},l=n==="root"||n==="ext-inner"&&i==="poem"?0:1;for(;l<s.length;l++)s[l]=e(s[l],o,c(this,U),c(this,Q));this.setText(s.join(`
|
|
28
|
+
`))},ya=function(){if(c(this,U).variants.length>0){let{parseConverter:e}=(la(),z(aa));this.setText(e(this.firstChild.toString(),c(this,U),c(this,Q)))}};v=Ii});var pe,Yt,vr,Ee,ae=k(()=>{"use strict";pe={running:!1,run(a){let{running:r}=this;this.running=!0;try{let{Token:e}=(O(),z(fn)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=r,t}catch(e){throw this.running=r,e}},rev:0},Yt=a=>r=>r.type===a,vr=(a,r,e,t=[])=>{var s,o;let n=a.getChildNodes(),i;n.length===e?(i=n,n=t):i=n.splice(r,e,...t);for(let l=0;l<t.length;l++){let g=t[l];g.setAttribute("parentNode",a),g.setAttribute("nextSibling",n[r+l+1]),g.setAttribute("previousSibling",n[r+l-1])}return(s=n[r-1])==null||s.setAttribute("nextSibling",n[r]),(o=n[r+t.length])==null||o.setAttribute("previousSibling",n[r+t.length-1]),n===t&&a.setAttribute("childNodes",n),i},Ee=(a,r)=>{Object.defineProperty(a,"name",{value:r.name})}});var ka={};K(ka,{Title:()=>Ei});var Mr,Dr,It,cr,Et,Ei,va=k(()=>{"use strict";ee();Ei=class{constructor(r,e,t,{temporary:n,decode:i,selfLink:s}={}){b(this,Mr);b(this,Dr);b(this,It);b(this,cr);b(this,Et);oe(this,"valid");oe(this,"encoded",!1);let o=r.trim().startsWith("../");if(i&&r.includes("%"))try{let g=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(r);r=Je(r),this.encoded=g}catch{}if(r=gt(r).replace(/[_ ]+/gu," ").trim(),o)T(this,cr,0);else{let g=e;r.startsWith(":")&&(g=0,r=r.slice(1).trim());let u=r.split(":");if(u.length>1){let p=qe(u[0]),d=Object.prototype.hasOwnProperty.call(t.nsid,p)&&t.nsid[p];d&&(g=d,r=u.slice(1).join(":").trim())}T(this,cr,g)}let l=r.indexOf("#");if(l!==-1){let g=r.slice(l).trim().slice(1);if(g.includes("%"))try{g=Je(g)}catch{}T(this,Et,g.replace(/ /gu,"_")),r=r.slice(0,l).trim()}this.valid=!!(r||s&&this.ns===0&&c(this,Et)!==void 0)&>(r)===r&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(o?/^(?:\.\.\/)+(.*)/u.exec(r)[1]:r),this.main=r,T(this,Dr,t.namespaces),T(this,It,t.articlePath||"/wiki/$1"),c(this,It).includes("$1")||T(this,It,c(this,It)+`${c(this,It).endsWith("/")?"":"/"}$1`),n||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return c(this,cr)}get fragment(){return c(this,Et)}get main(){return c(this,Mr)}set main(r){r=r.replace(/_/gu," ").trim(),T(this,Mr,r&&r[0].toUpperCase()+r.slice(1))}get prefix(){let r=c(this,Dr)[this.ns];return r+(r&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:r}=this,e=r.lastIndexOf(".");return e===-1?void 0:r.slice(e+1).toLowerCase()}getRedirection(){return[!1,(this.prefix+this.main).replace(/ /gu,"_")]}setFragment(r){T(this,Et,r)}getUrl(r){}};Mr=new WeakMap,Dr=new WeakMap,It=new WeakMap,cr=new WeakMap,Et=new WeakMap});var Lt,Aa,Xl,$,V=k(()=>{zi();ae();Vi();ee();Lt={config:kn,i18n:void 0,rules:Di,getConfig(a){let r=a!=null?a:this.config,{doubleUnderscore:e,ext:t,parserFunction:n,variable:i}=r;for(let s=0;s<2;s++)e.length>s+2&&e[s].length===0&&(e[s]=Object.keys(e[s+2]));return t.includes("translate")&&!i.includes("translationlanguage")&&(i.push("translationlanguage"),Array.isArray(n[1])?n[1].push("TRANSLATIONLANGUAGE"):n[1].TRANSLATIONLANGUAGE="translationlanguage"),{...kn,...r,excludes:[]}},msg(a,r=""){var e,t;return a&&((t=(e=this.i18n)==null?void 0:e[a])!=null?t:a).replace("$1",this.msg(r))},normalizeTitle(a,r=0,e,t=Lt.getConfig(),n){let{Title:i}=(va(),z(ka)),s;if(n!=null&&n.halfParsed)s=new i(a,r,t,n);else{let{Token:o}=(O(),z(fn));s=pe.run(()=>{let l=new o(a,t);l.type="root",l.parseOnce(0,e).parseOnce();let g=new i(l.toString(),r,t,n);for(let u of["main","fragment"]){let p=g[u];if(p!=null&&p.includes("\0")){let d=l.buildFromStr(p,1);u==="main"?g.main=d:g.setFragment(d)}}return g})}return s},parse(a,r,e=11,t=Lt.getConfig()){a=Wi(a);let n;typeof e!="number"&&(n=Array.isArray(e)?e:[e],e=Math.max(...n.map(o=>Mi[o]||11)));let{Token:i}=(O(),z(fn));return pe.run(()=>{let o=new i(a,t);return o.type="root",o.parse(e,r)})},async partialParse(a,r,e,t=Lt.getConfig()){},createLanguageService(a){}},Aa={},Xl=new Set(["normalizeTitle","parse","createLanguageService"]);for(let a in Lt)Xl.has(a)||(Aa[a]={enumerable:!1});Object.defineProperties(Lt,Aa);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:Lt});$=Lt});V();})();
|
|
36
29
|
//# sourceMappingURL=bundle.min.js.map
|