From 30c175053753e2ebccd50e5e2eb9bf7e2cabfb83 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Tue, 29 Nov 2022 09:23:04 -0500 Subject: [PATCH 1/5] keep legend wiki text #497 --- scratch.js | 19 +++++++++++++------ .../custom/text-and-data/functions.js | 3 ++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/scratch.js b/scratch.js index 0e32737e..f38742e3 100644 --- a/scratch.js +++ b/scratch.js @@ -9,10 +9,17 @@ wtf.plugin(plg) // let doc = wtf(str) // console.log(doc.sentences()[0].text()) -let str = ` -{{Картка:Лідер -| оригінал імені = foo -| жінка = bar -}}` +let str = `[[File:Jewish people around the world.svg|thumb|Map of the Jewish diaspora.
+more img|240x240px]] +foobar +` + +// const file_reg = new RegExp('file:(.+?)[|\\]]', 'iu') +// console.log(str.match(file_reg)) let doc = wtf(str) -console.log(doc.infoboxes().map(t => t.json())) +console.log(doc.sentence(0).text()) +// console.log(doc.infoboxes().map(t => t.json())) + +// wtf.fetch('Jewish diaspora').then((doc) => { +// console.log(doc.sentence(0).text()) +// }) \ No newline at end of file diff --git a/src/template/custom/text-and-data/functions.js b/src/template/custom/text-and-data/functions.js index f83cb50e..8bc1d9f0 100644 --- a/src/template/custom/text-and-data/functions.js +++ b/src/template/custom/text-and-data/functions.js @@ -14,7 +14,8 @@ let templates = { let order = ['color', 'label'] let obj = parse(tmpl, order) list.push(obj) - return obj.label || ' ' + // return obj.label || ' ' + return tmpl // keep the wiki? }, isbn: (tmpl, list) => { From 3e4ffa29c1d2fbeaded595f9ca0cb5623997799c Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Wed, 7 Dec 2022 20:14:26 -0500 Subject: [PATCH 2/5] fix for #502 --- scratch.js | 26 ++++++++------------------ src/link/Link.js | 1 + src/link/interwiki.js | 3 ++- tests/integration/interwiki.test.js | 9 +++++++++ 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/scratch.js b/scratch.js index f38742e3..b18a1186 100644 --- a/scratch.js +++ b/scratch.js @@ -1,25 +1,15 @@ import wtf from './src/index.js' import plg from './plugins/i18n/src/index.js' wtf.plugin(plg) -// let doc = await wtf.fetch('Toronto Raptors') -// let coach = doc.infobox().get('coach') -// coach.text() //'Nick Nurse' -// let str = `The '''Byzantine Empire''' {{IPAc-en|z|{|n}} also referred to as the Eastern Roman Empire` -// let doc = wtf(str) -// console.log(doc.sentences()[0].text()) - -let str = `[[File:Jewish people around the world.svg|thumb|Map of the Jewish diaspora.
-more img|240x240px]] -foobar -` - -// const file_reg = new RegExp('file:(.+?)[|\\]]', 'iu') -// console.log(str.match(file_reg)) +let str +str = `[[s:Administrative Order 9|cool]]` +// str = `[[d:Administrative]] is [[cool]]` +// str = `[[s:de:Hauptseite]]` +// str = `[[fr:cool]]` let doc = wtf(str) -console.log(doc.sentence(0).text()) -// console.log(doc.infoboxes().map(t => t.json())) +let json = doc.links().map(l => l.json()) +console.log(json) -// wtf.fetch('Jewish diaspora').then((doc) => { -// console.log(doc.sentence(0).text()) +// wtf.fetch('December_1').then((doc) => { // }) \ No newline at end of file diff --git a/src/link/Link.js b/src/link/Link.js index 70a3c8d9..09736c29 100644 --- a/src/link/Link.js +++ b/src/link/Link.js @@ -30,6 +30,7 @@ const methods = { obj.page = this.page() } else if (obj.type === 'interwiki') { obj.wiki = this.wiki() + obj.page = this.page() } else { obj.site = this.site() } diff --git a/src/link/interwiki.js b/src/link/interwiki.js index 68186709..9ec45a7a 100644 --- a/src/link/interwiki.js +++ b/src/link/interwiki.js @@ -2,7 +2,6 @@ import languages from '../_data/languages.js' //some colon symbols are valid links, like `America: That place` //so we have to whitelist allowable interwiki links import interwikis from '../_data/interwiki.js' - //add language prefixes too.. Object.keys(languages).forEach((k) => { interwikis[k] = k + '.wikipedia.org/wiki/$1' @@ -19,6 +18,7 @@ const parseInterwiki = function (obj) { } let site = m[1] || '' site = site.toLowerCase() + // double colon - [[m:Help:Help]] if (site.indexOf(':') !== -1) { let [, wiki, lang] = site.match(/^:?(.*):(.*)/) //only allow interwikis to these specific places @@ -27,6 +27,7 @@ const parseInterwiki = function (obj) { } obj.wiki = { wiki: wiki, lang: lang } } else { + // [[fr:cool]] if (interwikis.hasOwnProperty(site) === false) { return obj } diff --git a/tests/integration/interwiki.test.js b/tests/integration/interwiki.test.js index 1cbe9f6d..74852ce8 100644 --- a/tests/integration/interwiki.test.js +++ b/tests/integration/interwiki.test.js @@ -29,6 +29,15 @@ test('expand external interwiki link', (t) => { t.equal(obj.text, 'bonjour', 'text') t.deepEqual(obj.wiki, { wiki: 'wiktionary', lang: 'fr' }, 'wiki') + str = `[[s:Administrative Order 9|legal text]]` + doc = wtf(str) + obj = doc.link().json() + t.equal(obj.type, 'interwiki', 'interwiki') + t.equal(obj.text, 'legal text', 'legal text') + t.equal(obj.page, 'Administrative Order 9', 'page') + t.deepEqual(obj.wiki, 's', 'wiki') + + str = `[[ThisIsNotAWiki:text]]` doc = wtf(str) obj = doc.link().json() From 7315ddc1889a7c25dc873ea464b66b26867ae0d4 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Wed, 7 Dec 2022 20:20:50 -0500 Subject: [PATCH 3/5] guard for null titles #502 --- src/_fetch/makeUrl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_fetch/makeUrl.js b/src/_fetch/makeUrl.js index f504c279..1bf998b0 100644 --- a/src/_fetch/makeUrl.js +++ b/src/_fetch/makeUrl.js @@ -84,10 +84,10 @@ const makeUrl = function (options, parameters = defaults) { params.titles = cleanTitle(title) } else if (title !== undefined && isArray(title) && typeof title[0] === 'number') { //pageid array - params.pageids = title.join('|') + params.pageids = title.filter(t => t).join('|') } else if (title !== undefined && isArray(title) === true && typeof title[0] === 'string') { //title array - params.titles = title.map(cleanTitle).join('|') + params.titles = title.filter(t => t).map(cleanTitle).join('|') } else { return '' } From cdbb183ed4b3734b3f85c42a3c11de9d00f8dbe8 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Wed, 7 Dec 2022 20:47:15 -0500 Subject: [PATCH 4/5] fix for #435 --- scratch.js | 23 +++++++++++++++-------- src/template/parse/toJSON/02-keyMaker.js | 2 +- src/template/parse/toJSON/index.js | 1 - tests/integration/infobox.test.js | 16 ++++++++++++++++ 4 files changed, 32 insertions(+), 10 deletions(-) diff --git a/scratch.js b/scratch.js index b18a1186..cb5b103a 100644 --- a/scratch.js +++ b/scratch.js @@ -1,15 +1,22 @@ import wtf from './src/index.js' -import plg from './plugins/i18n/src/index.js' +import plg from './plugins/html/src/index.js' wtf.plugin(plg) -let str -str = `[[s:Administrative Order 9|cool]]` -// str = `[[d:Administrative]] is [[cool]]` -// str = `[[s:de:Hauptseite]]` -// str = `[[fr:cool]]` +let str = `= some heading = +after +` + +str = ` +{{Infobox officeholder +|successor1 = [[Wistin Abela]] +|term_end2 = March 1997 +|alma_mater = [[St Peter's College, Oxford]] +}} + +` let doc = wtf(str) -let json = doc.links().map(l => l.json()) -console.log(json) +console.log(doc.infobox().json()) +// console.log('after') // wtf.fetch('December_1').then((doc) => { // }) \ No newline at end of file diff --git a/src/template/parse/toJSON/02-keyMaker.js b/src/template/parse/toJSON/02-keyMaker.js index 68d091b6..08b6186c 100644 --- a/src/template/parse/toJSON/02-keyMaker.js +++ b/src/template/parse/toJSON/02-keyMaker.js @@ -1,6 +1,6 @@ //every value in {{tmpl|a|b|c}} needs a name //here we come up with names for them -const hasKey = /^[\p{Letter}0-9._\- '()]+=/iu +const hasKey = /^[\p{Letter}0-9._\- '()\t]+=/iu //templates with these properties are asking for trouble const reserved = { diff --git a/src/template/parse/toJSON/index.js b/src/template/parse/toJSON/index.js index c1d25baf..6b10750a 100644 --- a/src/template/parse/toJSON/index.js +++ b/src/template/parse/toJSON/index.js @@ -39,7 +39,6 @@ const parser = function (tmpl, order = [], fmt) { //remove {{}}'s and split based on pipes tmpl = strip(tmpl || '') let arr = pipeSplitter(tmpl) - //get template name let name = arr.shift() diff --git a/tests/integration/infobox.test.js b/tests/integration/infobox.test.js index 2ac5b11a..8d6a29e7 100644 --- a/tests/integration/infobox.test.js +++ b/tests/integration/infobox.test.js @@ -75,6 +75,7 @@ test('nested-london-infobox', function (t) { t.end() }) + test('ukrainian-infobox', function (t) { let str = `{{Картка |foo = bar @@ -100,3 +101,18 @@ test('ukrainian-infobox', function (t) { t.equal(json.жінка.text, 'bar', 'ukr officeholder infobox') t.end() }) + + +test('tabs-in-infobox', function (t) { + let str = `{{Infobox officeholder +|successor1 = [[Wistin Abela]] +|term_end2 = March 1997 +|alma_mater = [[St Peter's College, Oxford]] +}} +` + let obj = wtf(str).infobox().keyValue() + t.equal(obj[`successor1`], 'Wistin Abela', 'found successor1 val') + t.equal(obj[`term_end2`], 'March 1997', 'found term_end2 val') + t.equal(obj[`alma_mater`], `St Peter's College, Oxford`, 'found alma_mater val') + t.end() +}) From 04ce6a323db5256e600e4ab3c9cd998ae87b0af0 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Wed, 7 Dec 2022 20:53:15 -0500 Subject: [PATCH 5/5] 10.0.4rc --- README.md | 3 +- builds/wtf_wikipedia-client.min.js | 4 +- builds/wtf_wikipedia-client.mjs | 4 +- builds/wtf_wikipedia.cjs | 17 +- builds/wtf_wikipedia.mjs | 17 +- changelog.md | 6 + package-lock.json | 328 +++++++---------------------- package.json | 6 +- scratch.js | 16 +- src/_version.js | 2 +- 10 files changed, 128 insertions(+), 275 deletions(-) diff --git a/README.md b/README.md index d3a1a266..a7f4b400 100644 --- a/README.md +++ b/README.md @@ -463,7 +463,8 @@ The wikipedia api is [pretty welcoming](https://www.mediawiki.org/wiki/API:Etiqu ```js wtf - .fetch(['Royal Cinema', 'Aldous Huxley'], 'en', { + .fetch(['Royal Cinema', 'Aldous Huxley'], { + lang: 'en', 'Api-User-Agent': 'spencermountain@gmail.com', }) .then((docList) => { diff --git a/builds/wtf_wikipedia-client.min.js b/builds/wtf_wikipedia-client.min.js index bb1e900b..1727f4bc 100644 --- a/builds/wtf_wikipedia-client.min.js +++ b/builds/wtf_wikipedia-client.min.js @@ -1,2 +1,2 @@ -/*! wtf_wikipedia 10.0.3 MIT */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).wtf=t()}(this,(function(){"use strict";function e(e){var t=e.default;if("function"==typeof t){var i=function(){return t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})})),i}var t=e(Object.freeze({__proto__:null,default:function(e,t){return t=t||{},new Promise((function(i,a){var n=new XMLHttpRequest,r=[],o=[],s={},l=function(){return{ok:2==(n.status/100|0),statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:l,headers:{keys:function(){return r},entries:function(){return o},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var c in n.open(t.method||"get",e,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,i){r.push(t=t.toLowerCase()),o.push([t,i]),s[t]=s[t]?s[t]+","+i:i})),i(l())},n.onerror=a,n.withCredentials="include"==t.credentials,t.headers)n.setRequestHeader(c,t.headers[c]);n.send(t.body||null)}))}})),i=self.fetch||(self.fetch=t.default||t);const a=function(e){let t=new URL(e),i=t.pathname.replace(/^\/(wiki\/)?/,"");return i=decodeURIComponent(i),{domain:t.host,title:i}};function n(e){return e&&"string"==typeof e?e=(e=(e=(e=e.replace(/^\s+/,"")).replace(/\s+$/,"")).replace(/ {2}/," ")).replace(/\s, /,", "):""}function r(e){return"[object Array]"===Object.prototype.toString.call(e)}const o=/(wikibooks|wikidata|wikimedia|wikinews|wikipedia|wikiquote|wikisource|wikispecies|wikiversity|wikivoyage|wiktionary|foundation|meta)\.org/,s={action:"query",prop:"revisions|pageprops",rvprop:"content",maxlag:5,rvslots:"main",origin:"*",format:"json",redirects:"true"},l=e=>e.replace(/ /g,"_").trim(),c=function(e,t=s){let i=Object.assign({},t),a="";if(e.domain){let t=o.test(e.domain)?"w/api.php":e.path;a=`https://${e.domain}/${t}?`}else{if(!e.lang||!e.wiki)return"";a=`https://${e.lang}.${e.wiki}.org/w/api.php?`}e.follow_redirects||delete i.redirects,e.origin&&(i.origin=e.origin);let n=e.title;if("number"==typeof n)i.pageids=n;else if("string"==typeof n)i.titles=l(n);else if(void 0!==n&&r(n)&&"number"==typeof n[0])i.pageids=n.join("|");else{if(void 0===n||!0!==r(n)||"string"!=typeof n[0])return"";i.titles=n.map(l).join("|")}return`${a}${c=i,Object.entries(c).map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`)).join("&")}`;var c},u=function(e,t,i){let a=[];return e.sections().forEach((e=>{let n=[];n="string"==typeof i?e[t](i):e[t](),n.forEach((e=>{a.push(e)}))})),"number"==typeof i?void 0===a[i]?[]:[a[i]]:a},p=function(e,t){return Object.assign({},t,e)},m={title:!0,sections:!0,pageID:!0,categories:!0};var d=["category","abdeeling","bólkur","catagóir","categori","categoria","categoria","categoría","categorîa","categorìa","catégorie","categorie","catègorie","category","categuria","catigurìa","class","ẹ̀ka","flocc","flocc","flokkur","grup","jamii","kaarangay","kateggoría","kategooria","kategori","kategorî","kategoria","kategória","kategorie","kategoriija","kategorija","kategorio","kategoriya","kategoriýa","kategoriye","kategory","kategorya","kateqoriya","katiguriya","klad","luokka","ñemohenda","roinn","ronney","rummad","setensele","sokajy","sumut","thể","turkum","категорија","категория","категорія","катэгорыя","төркем","קטגוריה","تصنيف","تۈر","رده","श्रेणी","श्रेणी","বিষয়শ্রেণী","หมวดหมู่","분류","분류","分类"],h=["file","image","चित्र","archivo","attēls","berkas","bestand","datei","dosiero","dosya","fájl","fasciculus","fichier","fil","fitxategi","fitxer","gambar","imagem","imej","immagine","larawan","lêer","plik","restr","slika","wêne","wobraz","выява","податотека","слика","файл","სურათი","պատկեր","קובץ","پرونده","دوتنه","ملف","وێنە","चित्र","ไฟล์","파일","ファイル"],g=["infobox","anfo","anuāmapa","bilgi kutusu","bilgi","bilgiquti","boaty","boestkelaouiñ","bosca","capsa","diehtokássa","faktamall","ficha","generalni","gwybodlen3","info","infobokis","infoboks","infochascha","infokašćik","infokast","infokutija","infolentelė","infopolje","informkesto","infoskreine","infotaula","inligtingskas","inligtingskas3","inligtingskas4","kishtey","kotak","tertcita","tietolaatikko","yerleşim bilgi kutusu","ynfoboks","πλαίσιο","акарточка","аҥа","инфобокс","инфокутија","инфокутия","інфобокс","канадский","картка","карточка","карточка2","карточкарус","картуш","қуттӣ","ინფოდაფა","տեղեկաքարտ","אינפאקעסטל","תבנית","بطاقة","ڄاڻخانو","خانہ","لغة","ज्ञानसन्दूक","তথ্যছক","ਜਾਣਕਾਰੀਡੱਬਾ","సమాచారపెట్టె","තොරතුරුකොටුව","กล่องข้อมูล","ប្រអប់ព័ត៌មាន","정보상자","明細"];let f=" disambiguation";const k=["dab","dab","disamb","disambig","geodis","hndis","setindex","ship index","split dab","sport index","wp disambig","disambiguation cleanup","airport"+f,"biology"+f,"call sign"+f,"caselaw"+f,"chinese title"+f,"genus"+f,"hospital"+f,"lake index","letter"+f,"letter-number combination"+f,"mathematical"+f,"military unit"+f,"mountainindex","number"+f,"phonetics"+f,"place name"+f,"portal"+f,"road"+f,"school"+f,"species latin name abbreviation"+f,"species latin name"+f,"station"+f,"synagogue"+f,"taxonomic authority"+f,"taxonomy"+f].reduce(((e,t)=>(e[t]=!0,e)),{}),b=/. may (also )?refer to\b/i,w={about:!0,for:!0,"for multi":!0,"other people":!0,"other uses of":!0,distinguish:!0},y=new RegExp(". \\(("+["disambiguation","homonymie","توضيح","desambiguação","Begriffsklärung","disambigua","曖昧さ回避","消歧義","搞清楚","значения","ابهام‌زدایی","د ابہام","동음이의","dubbelsinnig","այլ կիրառումներ","ujednoznacznienie"].join("|")+")\\)$","i"),$=["dab","disamb","disambig","disambiguation","letter-numbercombdisambig","letter-number combination disambiguation","dmbox","airport disambiguation","biology disambiguation","call sign disambiguation","caselaw disambiguation","chinese title disambiguation","disambiguation cleanup","genus disambiguation","hospital disambiguation","human name disambiguation","human name disambiguation cleanup","letter-number combination disambiguation","mathematical disambiguation","military unit disambiguation","music disambiguation","number disambiguation","opus number disambiguation","phonetics disambiguation","place name disambiguation","portal disambiguation","road disambiguation","school disambiguation","species latin name abbreviation disambiguation","species latin name disambiguation","station disambiguation","synagogue disambiguation","taxonomic authority disambiguation","taxonomy disambiguation","template disambiguation","disamb2","disamb3","disamb4","disambiguation lead","disambiguation lead name","disambiguation name","disamb-term","disamb-terms","aðgreining","aimai","ałtsʼáʼáztiin","anlam ayrımı","anlam ayrımı","apartigilo","argipen","begriepskloorenge","begriffsklärung","begriffsklärung","begriffsklärung","begriffsklearung","bisongidila","bkl","bokokani","caddayn","clerheans","cudakirin","čvor","db","desambig","desambigación","desambiguação","desambiguació","desambiguación","desambiguáncia","desambiguasion","desambiguassiù","desambigui","dezambiguizare","dəqiqləşdirmə","disambigua","disambigua","disambigua","disambìgua","disambigua","disambiguasi","disambiguasi","discretiva","disheñvelout","disingkek","dixanbigua","dixebra","diżambigwazzjoni","doorverwijspagina","dp","dp","dubbelsinnig","dudalipen","dv","egyért","fleiri týdningar","fleirtyding","flertydig","förgrening","gì-ngiê","giklaro","gwahaniaethu","homonimo","homónimos","homonymie","huaʻōlelo puana like","idirdhealú","khu-pia̍t","kthjellim","kujekesa","maana","maneo bin","mehrdüdig begreep","menm non","muardüüdag artiikel","neibetsjuttings","nozīmju atdalīšana","nuorodinis","nyahkekaburan","omonimeye","omonimia","page dé frouque","paglilinaw","panangilawlawag","pansayod","pejy mitovy anarana","peker","razdvojba","razločitev","razvrstavanje","reddaghey","rozcestník","rozlišovacia stránka","sclerir noziun","selvendyssivu","soilleireachadh","suzmunski","täpsustuslehekülg","täsmennyssivu","telplänov","tlahtolmelahuacatlaliztli","trang định hướng","ujednoznacznienie","verdudeliking","wěcejwóznamowosć","wjacezmyslnosć","zambiguaçon","zeimeibu škiršona","αποσαφήνιση","айрық","аҵакырацәа","вишезначна одредница","ибҳомзудоӣ","кёб магъаналы","күп мәгънәләр","күп мәғәнәлелек","мъногосъмꙑслиѥ","неадназначнасць","неадназначнасьць","неоднозначность","олон удхатай","појаснување","пояснение","са шумуд манавал","салаа утгатай","суолталар","текмаанисиздик","цо магіна гуреб","чеперушка","чолхалла","шуко ончыктымаш-влак","მრავალმნიშვნელოვანი","բազմիմաստութիւն","բազմիմաստություն","באדייטן","פירושונים","ابهام‌زدایی","توضيح","توضيح","دقیقلشدیرمه","ڕوونکردنەوە","سلجهائپ","ضد ابہام","گجگجی بیری","نامبهمېدنه","መንታ","अस्पष्टता","बहुअर्थी","बहुविकल्पी शब्द","দ্ব্যর্থতা নিরসন","ਗੁੰਝਲ-ਖੋਲ੍ਹ","સંદિગ્ધ શીર્ષક","பக்கவழி நெறிப்படுத்தல்","అయోమయ నివృత్తి","ದ್ವಂದ್ವ ನಿವಾರಣೆ","വിവക്ഷകൾ","වක්‍රෝත්ති","แก้ความกำกวม","သံတူကြောင်းကွဲ","ណែនាំ","동음이의","扤清楚","搞清楚","曖昧さ回避","消歧义","釋義","gestion dj'omònim","sut'ichana qillqa"].reduce(((e,t)=>(e[t]=!0,e)),{}),x=function(e){if(!e)return!1;let t=e.text();return!(null===t||!t[0]||!0!==b.test(t))},v={caption:!0,alt:!0,links:!0,thumb:!0,url:!0},j=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},_={file(){let e=this.data.file||"";if(e){/^(image|file):/i.test(e)||(e=`File:${e}`),e=e.trim(),e=e.charAt(0).toUpperCase()+e.substring(1),e=e.replace(/ /g,"_")}return e},alt(){let e=this.data.alt||this.data.file||"";return e=e.replace(/^(file|image):/i,""),e=e.replace(/\.(jpg|jpeg|png|gif|svg)/i,""),e.replace(/_/g," ")},caption(){return this.data.caption?this.data.caption.text():""},links(){return this.data.caption?this.data.caption.links():[]},url(){let e=function(e){let t=function(e){let t=e.replace(/^(image|file?):/i,"");return t=t.charAt(0).toUpperCase()+t.substring(1),t=t.trim().replace(/ /g,"_"),t}(e);return t=encodeURIComponent(t),t}(this.file());return`https://${this.data.domain||"wikipedia.org"}/wiki/Special:Redirect/file/${e}`},thumbnail(e){return e=e||300,this.url()+"?width="+e},format(){let e=this.file().split(".");return e[e.length-1]?e[e.length-1].toLowerCase():null},json:function(e){return function(e,t){t=p(t,v);let i={file:e.file()};return!1!==t.thumb&&(i.thumb=e.thumbnail()),!1!==t.url&&(i.url=e.url()),!1!==t.caption&&e.data.caption&&(i.caption=e.caption(),!1!==t.links&&e.data.caption.links()&&(i.links=e.links())),!1!==t.alt&&e.data.alt&&(i.alt=e.alt()),i}(this,e=e||{})},text:function(){return""},wikitext:function(){return this.data.wiki||""}};Object.keys(_).forEach((e=>{j.prototype[e]=_[e]})),j.prototype.src=j.prototype.url,j.prototype.thumb=j.prototype.thumbnail;var z={aa:"Afar",ab:"Аҧсуа",af:"Afrikaans",ak:"Akana",als:"Alemannisch",am:"አማርኛ",an:"Aragonés",ang:"Englisc",ar:"العربية",arc:"ܣܘܪܬ",as:"অসমীয়া",ast:"Asturianu",av:"Авар",ay:"Aymar",az:"Azərbaycanca",ba:"Башҡорт",bar:"Boarisch","bat-smg":"Žemaitėška",bcl:"Bikol",be:"Беларуская","be-x-old":"ltr",bg:"Български",bh:"भोजपुरी",bi:"Bislama",bm:"Bamanankan",bn:"বাংলা",bo:"བོད་ཡིག",bpy:"ltr",br:"Brezhoneg",bs:"Bosanski",bug:"ᨅᨔ",bxr:"ltr",ca:"Català",cdo:"Chinese",ce:"Нохчийн",ceb:"Sinugboanong",ch:"Chamoru",cho:"Choctaw",chr:"ᏣᎳᎩ",chy:"Tsetsêhestâhese",co:"Corsu",cr:"Nehiyaw",cs:"Česky",csb:"Kaszëbsczi",cu:"Slavonic",cv:"Чăваш",cy:"Cymraeg",da:"Dansk",de:"Deutsch",diq:"Zazaki",dsb:"ltr",dv:"ދިވެހިބަސް",dz:"ཇོང་ཁ",ee:"Ɛʋɛ",far:"فارسی",el:"Ελληνικά",en:"English",eo:"Esperanto",es:"Español",et:"Eesti",eu:"Euskara",ext:"Estremeñu",ff:"Fulfulde",fi:"Suomi","fiu-vro":"Võro",fj:"Na",fo:"Føroyskt",fr:"Français",frp:"Arpitan",fur:"Furlan",fy:"ltr",ga:"Gaeilge",gan:"ltr",gd:"ltr",gil:"Taetae",gl:"Galego",gn:"Avañe'ẽ",got:"gutisk",gu:"ગુજરાતી",gv:"Gaelg",ha:"هَوُسَ",hak:"ltr",haw:"Hawai`i",he:"עברית",hi:"हिन्दी",ho:"ltr",hr:"Hrvatski",ht:"Krèyol",hu:"Magyar",hy:"Հայերեն",hz:"Otsiherero",ia:"Interlingua",id:"Bahasa",ie:"Interlingue",ig:"Igbo",ii:"ltr",ik:"Iñupiak",ilo:"Ilokano",io:"Ido",is:"Íslenska",it:"Italiano",iu:"ᐃᓄᒃᑎᑐᑦ",ja:"日本語",jbo:"Lojban",jv:"Basa",ka:"ქართული",kg:"KiKongo",ki:"Gĩkũyũ",kj:"Kuanyama",kk:"Қазақша",kl:"Kalaallisut",km:"ភាសាខ្មែរ",kn:"ಕನ್ನಡ",khw:"کھوار",ko:"한국어",kr:"Kanuri",ks:"कश्मीरी",ksh:"Ripoarisch",ku:"Kurdî",kv:"Коми",kw:"Kernewek",ky:"Kırgızca",la:"Latina",lad:"Dzhudezmo",lan:"Leb",lb:"Lëtzebuergesch",lg:"Luganda",li:"Limburgs",lij:"Líguru",lmo:"Lumbaart",ln:"Lingála",lo:"ລາວ",lt:"Lietuvių",lv:"Latviešu","map-bms":"Basa",mg:"Malagasy",man:"官話",mh:"Kajin",mi:"Māori",min:"Minangkabau",mk:"Македонски",ml:"മലയാളം",mn:"Монгол",mo:"Moldovenească",mr:"मराठी",ms:"Bahasa",mt:"bil-Malti",mus:"Muskogee",my:"Myanmasa",na:"Dorerin",nah:"Nahuatl",nap:"Nnapulitano",nd:"ltr",nds:"Plattdüütsch","nds-nl":"Saxon",ne:"नेपाली",new:"नेपालभाषा",ng:"Oshiwambo",nl:"Nederlands",nn:"ltr",no:"Norsk",nr:"ltr",nso:"ltr",nrm:"Nouormand",nv:"Diné",ny:"Chi-Chewa",oc:"Occitan",oj:"ᐊᓂᔑᓈᐯᒧᐎᓐ",om:"Oromoo",or:"ଓଡ଼ିଆ",os:"Иронау",pa:"ਪੰਜਾਬੀ",pag:"Pangasinan",pam:"Kapampangan",pap:"Papiamentu",pdc:"ltr",pi:"Pāli",pih:"Norfuk",pl:"Polski",pms:"Piemontèis",ps:"پښتو",pt:"Português",qu:"Runa",rm:"ltr",rmy:"Romani",rn:"Kirundi",ro:"Română","roa-rup":"Armâneashti",ru:"Русский",rw:"Kinyarwandi",sa:"संस्कृतम्",sc:"Sardu",scn:"Sicilianu",sco:"Scots",sd:"सिनधि",se:"ltr",sg:"Sängö",sh:"Srpskohrvatski",si:"සිංහල",simple:"ltr",sk:"Slovenčina",sl:"Slovenščina",sm:"Gagana",sn:"chiShona",so:"Soomaaliga",sq:"Shqip",sr:"Српски",ss:"SiSwati",st:"ltr",su:"Basa",sv:"Svenska",sw:"Kiswahili",ta:"தமிழ்",te:"తెలుగు",tet:"Tetun",tg:"Тоҷикӣ",th:"ไทย",ti:"ትግርኛ",tk:"Туркмен",tl:"Tagalog",tlh:"tlhIngan-Hol",tn:"Setswana",to:"Lea",tpi:"ltr",tr:"Türkçe",ts:"Xitsonga",tt:"Tatarça",tum:"chiTumbuka",tw:"Twi",ty:"Reo",udm:"Удмурт",ug:"Uyƣurqə",uk:"Українська",ur:"اردو",uz:"Ўзбек",ve:"Tshivenḓa",vi:"Việtnam",vec:"Vèneto",vls:"ltr",vo:"Volapük",wa:"Walon",war:"Winaray",wo:"Wollof",xal:"Хальмг",xh:"isiXhosa",yi:"ייִדיש",yo:"Yorùbá",za:"Cuengh",zh:"中文","zh-classical":"ltr","zh-min-nan":"Bân-lâm-gú","zh-yue":"粵語",zu:"isiZulu"};const O=".wikipedia.org/wiki/$1",E=".wikimedia.org/wiki/$1",S="www.";var C={acronym:S+"acronymfinder.com/$1.html",advisory:"advisory"+E,advogato:S+"advogato.org/$1",aew:"wiki.arabeyes.org/$1",appropedia:S+"appropedia.org/$1",aquariumwiki:S+"theaquariumwiki.com/$1",arborwiki:"localwiki.org/ann-arbor/$1",arxiv:"arxiv.org/abs/$1",atmwiki:S+"otterstedt.de/wiki/index.php/$1",baden:S+"stadtwiki-baden-baden.de/wiki/$1/",battlestarwiki:"en.battlestarwiki.org/wiki/$1",bcnbio:"historiapolitica.bcn.cl/resenas_parlamentarias/wiki/$1",beacha:S+"beachapedia.org/$1",betawiki:"translatewiki.net/wiki/$1",bibcode:"adsabs.harvard.edu/abs/$1",bibliowiki:"wikilivres.org/wiki/$1",bluwiki:"bluwiki.com/go/$1",blw:"britainloves"+O,botwiki:"botwiki.sno.cc/wiki/$1",boxrec:S+"boxrec.com/media/index.php?$1",brickwiki:S+"brickwiki.info/wiki/$1",bugzilla:"bugzilla.wikimedia.org/show_bug.cgi?id=$1",bulba:"bulbapedia.bulbagarden.net/wiki/$1",c:"commons"+E,c2:"c2.com/cgi/wiki?$1",c2find:"c2.com/cgi/wiki?FindPage&value=$1",cache:S+"google.com/search?q=cache:$1","ĉej":"esperanto.blahus.cz/cxej/vikio/index.php/$1",cellwiki:"cell.wikia.com/wiki/$1",centralwikia:"community.wikia.com/wiki/$1",chej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",choralwiki:S+"cpdl.org/wiki/index.php/$1",citizendium:"en.citizendium.org/wiki/$1",ckwiss:S+"ck-wissen.de/ckwiki/index.php?title=$1",comixpedia:S+"comixpedia.org/index.php?title=$1",commons:"commons"+E,communityscheme:"community.schemewiki.org/?c=s&key=$1",communitywiki:"communitywiki.org/$1",comune:"rete.comuni-italiani.it/wiki/$1",creativecommons:"creativecommons.org/licenses/$1",creativecommonswiki:"wiki.creativecommons.org/$1",cxej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",dcc:S+"dccwiki.com/$1",dcdatabase:"dc.wikia.com/$1",dcma:"christian-morgenstern.de/dcma/index.php?title=$1",debian:"wiki.debian.org/$1",delicious:S+"delicious.com/tag/$1",devmo:"developer.mozilla.org/en/docs/$1",dictionary:S+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",dict:S+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",disinfopedia:"sourcewatch.org/index.php/$1",distributedproofreaders:S+"pgdp.net/wiki/$1",distributedproofreadersca:S+"pgdpcanada.net/wiki/index.php/$1",dmoz:"curlie.org/$1",dmozs:"curlie.org/search?q=$1",doi:"doi.org/$1",donate:"donate"+E,doom_wiki:"doom.wikia.com/wiki/$1",download:"releases.wikimedia.org/$1",dbdump:"dumps.wikimedia.org/$1/latest/",dpd:"lema.rae.es/dpd/?key=$1",drae:"dle.rae.es/?w=$1",dreamhost:"wiki.dreamhost.com/index.php/$1",drumcorpswiki:S+"drumcorpswiki.com/index.php/$1",dwjwiki:S+"suberic.net/cgi-bin/dwj/wiki.cgi?$1","eĉei":S+"ikso.net/cgi-bin/wiki.pl?$1",ecoreality:S+"EcoReality.org/wiki/$1",ecxei:S+"ikso.net/cgi-bin/wiki.pl?$1",elibre:"enciclopedia.us.es/index.php/$1",emacswiki:S+"emacswiki.org/emacs?$1",encyc:"encyc.org/wiki/$1",energiewiki:S+"netzwerk-energieberater.de/wiki/index.php/$1",englyphwiki:"en.glyphwiki.org/wiki/$1",enkol:"enkol.pl/$1",eokulturcentro:"esperanto.toulouse.free.fr/nova/wikini/wakka.php?wiki=$1",esolang:"esolangs.org/wiki/$1",etherpad:"etherpad.wikimedia.org/$1",ethnologue:S+"ethnologue.com/language/$1",ethnologuefamily:S+"ethnologue.com/show_family.asp?subid=$1",evowiki:"wiki.cotch.net/index.php/$1",exotica:S+"exotica.org.uk/wiki/$1",fanimutationwiki:"wiki.animutationportal.com/index.php/$1",fedora:"fedoraproject.org/wiki/$1",finalfantasy:"finalfantasy.wikia.com/wiki/$1",finnix:S+"finnix.org/$1",flickruser:S+"flickr.com/people/$1",flickrphoto:S+"flickr.com/photo.gne?id=$1",floralwiki:S+"floralwiki.co.uk/wiki/$1",foldoc:"foldoc.org/$1",foundation:"foundation"+E,foundationsite:"wikimediafoundation.org/$1",foxwiki:"fox.wikis.com/wc.dll?Wiki~$1",freebio:"freebiology.org/wiki/$1",freebsdman:S+"FreeBSD.org/cgi/man.cgi?apropos=1&query=$1",freeculturewiki:"wiki.freeculture.org/index.php/$1",freedomdefined:"freedomdefined.org/$1",freefeel:"freefeel.org/wiki/$1",freekiwiki:"wiki.freegeek.org/index.php/$1",freesoft:"directory.fsf.org/wiki/$1",ganfyd:"ganfyd.org/index.php?title=$1",gardenology:S+"gardenology.org/wiki/$1",gausswiki:"gauss.ffii.org/$1",gentoo:"wiki.gentoo.org/wiki/$1",genwiki:"wiki.genealogy.net/index.php/$1",gerrit:"gerrit.wikimedia.org/r/$1",git:"gerrit.wikimedia.org/g/$1",google:S+"google.com/search?q=$1",googledefine:S+"google.com/search?q=define:$1",googlegroups:"groups.google.com/groups?q=$1",guildwarswiki:"wiki.guildwars.com/wiki/$1",guildwiki:"guildwars.wikia.com/wiki/$1",guc:"tools.wmflabs.org/guc/?user=$1",gucprefix:"tools.wmflabs.org/guc/?isPrefixPattern=1&src=rc&user=$1",gutenberg:S+"gutenberg.org/etext/$1",gutenbergwiki:S+"gutenberg.org/wiki/$1",hackerspaces:"hackerspaces.org/wiki/$1",h2wiki:"halowiki.net/p/$1",hammondwiki:S+"dairiki.org/HammondWiki/index.php3?$1",hdl:"hdl.handle.net/$1",heraldik:"heraldik-wiki.de/wiki/$1",heroeswiki:"heroeswiki.com/$1",horizonlabs:"horizon.wikimedia.org/$1",hrwiki:S+"hrwiki.org/index.php/$1",hrfwiki:"fanstuff.hrwiki.org/index.php/$1",hupwiki:"wiki.hup.hu/index.php/$1",iarchive:"archive.org/details/$1",imdbname:S+"imdb.com/name/nm$1/",imdbtitle:S+"imdb.com/title/tt$1/",imdbcompany:S+"imdb.com/company/co$1/",imdbcharacter:S+"imdb.com/character/ch$1/",incubator:"incubator"+E,infosecpedia:"infosecpedia.org/wiki/$1",infosphere:"theinfosphere.org/$1","iso639-3":"iso639-3.sil.org/code/$1",issn:S+"worldcat.org/issn/$1",iuridictum:"iuridictum.pecina.cz/w/$1",jaglyphwiki:"glyphwiki.org/wiki/$1",jefo:"esperanto-jeunes.org/wiki/$1",jerseydatabase:"jerseydatabase.com/wiki.php?id=$1",jira:"jira.toolserver.org/browse/$1",jspwiki:S+"ecyrd.com/JSPWiki/Wiki.jsp?page=$1",jstor:S+"jstor.org/journals/$1",kamelo:"kamelopedia.mormo.org/index.php/$1",karlsruhe:"ka.stadtwiki.net/$1",kinowiki:"kino.skripov.com/index.php/$1",komicawiki:"wiki.komica.org/?$1",kontuwiki:"kontu.wiki/$1",wikitech:"wikitech"+E,libreplanet:"libreplanet.org/wiki/$1",linguistlist:"linguistlist.org/forms/langs/LLDescription.cfm?code=$1",linuxwiki:S+"linuxwiki.de/$1",linuxwikide:S+"linuxwiki.de/$1",liswiki:"liswiki.org/wiki/$1",literateprograms:"en.literateprograms.org/$1",livepedia:S+"livepedia.gr/index.php?title=$1",localwiki:"localwiki.org/$1",lojban:"mw.lojban.org/papri/$1",lostpedia:"lostpedia.wikia.com/wiki/$1",lqwiki:"wiki.linuxquestions.org/wiki/$1",luxo:"tools.wmflabs.org/guc/?user=$1",mail:"lists.wikimedia.org/mailman/listinfo/$1",mailarchive:"lists.wikimedia.org/pipermail/$1",mariowiki:S+"mariowiki.com/$1",marveldatabase:S+"marveldatabase.com/wiki/index.php/$1",meatball:"meatballwiki.org/wiki/$1",mw:S+"mediawiki.org/wiki/$1",mediazilla:"bugzilla.wikimedia.org/$1",memoryalpha:"memory-alpha.fandom.com/wiki/$1",metawiki:"meta"+E,metawikimedia:"meta"+E,metawikipedia:"meta"+E,mineralienatlas:S+"mineralienatlas.de/lexikon/index.php/$1",moinmoin:"moinmo.in/$1",monstropedia:S+"monstropedia.org/?title=$1",mosapedia:"mosapedia.de/wiki/index.php/$1",mozcom:"mozilla.wikia.com/wiki/$1",mozillawiki:"wiki.mozilla.org/$1",mozillazinekb:"kb.mozillazine.org/$1",musicbrainz:"musicbrainz.org/doc/$1",mediawikiwiki:S+"mediawiki.org/wiki/$1",mwod:S+"merriam-webster.com/dictionary/$1",mwot:S+"merriam-webster.com/thesaurus/$1",nkcells:S+"nkcells.info/index.php?title=$1",nara:"catalog.archives.gov/id/$1",nosmoke:"no-smok.net/nsmk/$1",nost:"nostalgia."+O,nostalgia:"nostalgia."+O,oeis:"oeis.org/$1",oldwikisource:"wikisource.org/wiki/$1",olpc:"wiki.laptop.org/go/$1",omegawiki:S+"omegawiki.org/Expression:$1",onelook:S+"onelook.com/?ls=b&w=$1",openlibrary:"openlibrary.org/$1",openstreetmap:"wiki.openstreetmap.org/wiki/$1",openwetware:"openwetware.org/wiki/$1",opera7wiki:"operawiki.info/$1",organicdesign:S+"organicdesign.co.nz/$1",orthodoxwiki:"orthodoxwiki.org/$1",osmwiki:"wiki.openstreetmap.org/wiki/$1",otrs:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=$1",otrswiki:"otrs-wiki"+E,ourmedia:S+"socialtext.net/ourmedia/index.cgi?$1",outreach:"outreach"+E,outreachwiki:"outreach"+E,owasp:S+"owasp.org/index.php/$1",panawiki:"wiki.alairelibre.net/index.php?title=$1",patwiki:"gauss.ffii.org/$1",personaltelco:"personaltelco.net/wiki/$1",petscan:"petscan.wmflabs.org/?psid=$1",phab:"phabricator.wikimedia.org/$1",phabricator:"phabricator.wikimedia.org/$1",phwiki:S+"pocketheaven.com/ph/wiki/index.php?title=$1",phpwiki:"phpwiki.sourceforge.net/phpwiki/index.php?$1",planetmath:"planetmath.org/node/$1",pmeg:S+"bertilow.com/pmeg/$1",pmid:S+"ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract",pokewiki:"pokewiki.de/$1","pokéwiki":"pokewiki.de/$1",policy:"policy.wikimedia.org/$1",proofwiki:S+"proofwiki.org/wiki/$1",pyrev:S+"mediawiki.org/wiki/Special:Code/pywikipedia/$1",pythoninfo:"wiki.python.org/moin/$1",pythonwiki:S+"pythonwiki.de/$1",pywiki:"c2.com/cgi/wiki?$1",psycle:"psycle.sourceforge.net/wiki/$1",quality:"quality"+E,quarry:"quarry.wmflabs.org/$1",regiowiki:"regiowiki.at/wiki/$1",rev:S+"mediawiki.org/wiki/Special:Code/MediaWiki/$1",revo:"purl.org/NET/voko/revo/art/$1.html",rfc:"tools.ietf.org/html/rfc$1",rheinneckar:"rhein-neckar-wiki.de/$1",robowiki:"robowiki.net/?$1",rodovid:"en.rodovid.org/wk/$1",reuterswiki:"glossary.reuters.com/index.php/$1",rowiki:"wiki.rennkuckuck.de/index.php/$1",rt:"rt.wikimedia.org/Ticket/Display.html?id=$1",s23wiki:"s23.org/wiki/$1",scholar:"scholar.google.com/scholar?q=$1",schoolswp:"schools-"+O,scores:"imslp.org/wiki/$1",scoutwiki:"en.scoutwiki.org/$1",scramble:S+"scramble.nl/wiki/index.php?title=$1",seapig:S+"seapig.org/$1",seattlewiki:"seattle.wikia.com/wiki/$1",slwiki:"wiki.secondlife.com/wiki/$1","semantic-mw":S+"semantic-mediawiki.org/wiki/$1",senseislibrary:"senseis.xmp.net/?$1",sharemap:"sharemap.org/$1",silcode:S+"sil.org/iso639-3/documentation.asp?id=$1",slashdot:"slashdot.org/article.pl?sid=$1",sourceforge:"sourceforge.net/$1",spcom:"spcom"+E,species:"species"+E,squeak:"wiki.squeak.org/squeak/$1",stats:"stats.wikimedia.org/$1",stewardry:"tools.wmflabs.org/meta/stewardry/?wiki=$1",strategy:"strategy"+E,strategywiki:"strategywiki.org/wiki/$1",sulutil:"meta.wikimedia.org/wiki/Special:CentralAuth/$1",swtrain:"train.spottingworld.com/$1",svn:"svn.wikimedia.org/viewvc/mediawiki/$1?view=log",swinbrain:"swinbrain.ict.swin.edu.au/wiki/$1",tabwiki:S+"tabwiki.com/index.php/$1",tclerswiki:"wiki.tcl.tk/$1",technorati:S+"technorati.com/search/$1",tenwiki:"ten."+O,testwiki:"test."+O,testwikidata:"test.wikidata.org/wiki/$1",test2wiki:"test2."+O,tfwiki:"tfwiki.net/wiki/$1",thelemapedia:S+"thelemapedia.org/index.php/$1",theopedia:S+"theopedia.com/$1",thinkwiki:S+"thinkwiki.org/wiki/$1",ticket:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=$1",tmbw:"tmbw.net/wiki/$1",tmnet:S+"technomanifestos.net/?$1",tmwiki:S+"EasyTopicMaps.com/?page=$1",toolforge:"tools.wmflabs.org/$1",toollabs:"tools.wmflabs.org/$1",tools:"toolserver.org/$1",tswiki:S+"mediawiki.org/wiki/Toolserver:$1",translatewiki:"translatewiki.net/wiki/$1",tviv:"tviv.org/wiki/$1",tvtropes:S+"tvtropes.org/pmwiki/pmwiki.php/Main/$1",twiki:"twiki.org/cgi-bin/view/$1",tyvawiki:S+"tyvawiki.org/wiki/$1",umap:"umap.openstreetmap.fr/$1",uncyclopedia:"en.uncyclopedia.co/wiki/$1",unihan:S+"unicode.org/cgi-bin/GetUnihanData.pl?codepoint=$1",unreal:"wiki.beyondunreal.com/wiki/$1",urbandict:S+"urbandictionary.com/define.php?term=$1",usej:S+"tejo.org/usej/$1",usemod:S+"usemod.com/cgi-bin/wiki.pl?$1",usability:"usability"+E,utrs:"utrs.wmflabs.org/appeal.php?id=$1",vikidia:"fr.vikidia.org/wiki/$1",vlos:"tusach.thuvienkhoahoc.com/wiki/$1",vkol:"kol.coldfront.net/thekolwiki/index.php/$1",voipinfo:S+"voip-info.org/wiki/view/$1",votewiki:"vote"+E,werelate:S+"werelate.org/wiki/$1",wg:"wg-en."+O,wikia:S+"wikia.com/wiki/w:c:$1",wikiasite:S+"wikia.com/wiki/w:c:$1",wikiapiary:"wikiapiary.com/wiki/$1",wikibooks:"en.wikibooks.org/wiki/$1",wikichristian:S+"wikichristian.org/index.php?title=$1",wikicities:S+"wikia.com/wiki/w:$1",wikicity:S+"wikia.com/wiki/w:c:$1",wikiconference:"wikiconference.org/wiki/$1",wikidata:S+"wikidata.org/wiki/$1",wikif1:S+"wikif1.org/$1",wikifur:"en.wikifur.com/wiki/$1",wikihow:S+"wikihow.com/$1",wikiindex:"wikiindex.org/$1",wikilemon:"wiki.illemonati.com/$1",wikilivres:"wikilivres.org/wiki/$1",wikilivresru:"wikilivres.ru/$1","wikimac-de":"apfelwiki.de/wiki/Main/$1",wikimedia:"foundation"+E,wikinews:"en.wikinews.org/wiki/$1",wikinfo:"wikinfo.org/w/index.php/$1",wikinvest:"meta.wikimedia.org/wiki/Interwiki_map/discontinued#Wikinvest",wikiotics:"wikiotics.org/$1",wikipapers:"wikipapers.referata.com/wiki/$1",wikipedia:"en."+O,wikipediawikipedia:"en.wikipedia.org/wiki/Wikipedia:$1",wikiquote:"en.wikiquote.org/wiki/$1",wikisophia:"wikisophia.org/index.php?title=$1",wikisource:"en.wikisource.org/wiki/$1",wikispecies:"species"+E,wikispot:"wikispot.org/?action=gotowikipage&v=$1",wikiskripta:S+"wikiskripta.eu/index.php/$1",labsconsole:"wikitech"+E,wikiti:"wikiti.denglend.net/index.php?title=$1",wikiversity:"en.wikiversity.org/wiki/$1",wikivoyage:"en.wikivoyage.org/wiki/$1",betawikiversity:"beta.wikiversity.org/wiki/$1",wikiwikiweb:"c2.com/cgi/wiki?$1",wiktionary:"en.wiktionary.org/wiki/$1",wipipedia:"wipipedia.org/index.php/$1",wlug:S+"wlug.org.nz/$1",wmam:"am"+E,wmar:S+"wikimedia.org.ar/wiki/$1",wmat:"mitglieder.wikimedia.at/$1",wmau:"wikimedia.org.au/wiki/$1",wmbd:"bd"+E,wmbe:"be"+E,wmbr:"br"+E,wmca:"ca"+E,wmch:S+"wikimedia.ch/$1",wmcl:S+"wikimediachile.cl/index.php?title=$1",wmcn:"cn"+E,wmco:"co"+E,wmcz:S+"wikimedia.cz/web/$1",wmdc:"wikimediadc.org/wiki/$1",securewikidc:"secure.wikidc.org/$1",wmde:"wikimedia.de/wiki/$1",wmdk:"dk"+E,wmee:"ee"+E,wmec:"ec"+E,wmes:S+"wikimedia.es/wiki/$1",wmet:"ee"+E,wmfdashboard:"outreachdashboard.wmflabs.org/$1",wmfi:"fi"+E,wmfr:"wikimedia.fr/$1",wmge:"ge"+E,wmhi:"hi"+E,wmhk:"meta.wikimedia.org/wiki/Wikimedia_Hong_Kong",wmhu:"wikimedia.hu/wiki/$1",wmid:"id"+E,wmil:S+"wikimedia.org.il/$1",wmin:"wiki.wikimedia.in/$1",wmit:"wiki.wikimedia.it/wiki/$1",wmke:"meta.wikimedia.org/wiki/Wikimedia_Kenya",wmmk:"mk"+E,wmmx:"mx"+E,wmnl:"nl"+E,wmnyc:"nyc"+E,wmno:"no"+E,"wmpa-us":"pa-us"+E,wmph:"meta.wikimedia.org/wiki/Wikimedia_Philippines",wmpl:"pl"+E,wmpt:"pt"+E,wmpunjabi:"punjabi"+E,wmromd:"romd"+E,wmrs:"rs"+E,wmru:"ru"+E,wmse:"se"+E,wmsk:"wikimedia.sk/$1",wmtr:"tr"+E,wmtw:"wikimedia.tw/wiki/index.php5/$1",wmua:"ua"+E,wmuk:"wikimedia.org.uk/wiki/$1",wmve:"wikimedia.org.ve/wiki/$1",wmza:"wikimedia.org.za/wiki/$1",wm2005:"wikimania2005"+E,wm2006:"wikimania2006"+E,wm2007:"wikimania2007"+E,wm2008:"wikimania2008"+E,wm2009:"wikimania2009"+E,wm2010:"wikimania2010"+E,wm2011:"wikimania2011"+E,wm2012:"wikimania2012"+E,wm2013:"wikimania2013"+E,wm2014:"wikimania2014"+E,wm2015:"wikimania2015"+E,wm2016:"wikimania2016"+E,wm2017:"wikimania2017"+E,wm2018:"wikimania2018"+E,wmania:"wikimania"+E,wikimania:"wikimania"+E,wmteam:"wikimaniateam"+E,wmf:"foundation"+E,wmfblog:"blog.wikimedia.org/$1",wmdeblog:"blog.wikimedia.de/$1",wookieepedia:"starwars.wikia.com/wiki/$1",wowwiki:S+"wowwiki.com/$1",wqy:"wqy.sourceforge.net/cgi-bin/index.cgi?$1",wurmpedia:"wurmpedia.com/index.php/$1",viaf:"viaf.org/viaf/$1",zrhwiki:S+"zrhwiki.ch/wiki/$1",zum:"wiki.zum.de/$1",zwiki:S+"zwiki.org/$1",m:"meta"+E,meta:"meta"+E,sep11:"sep11."+O,d:S+"wikidata.org/wiki/$1",minnan:"zh-min-nan."+O,nb:"no."+O,"zh-cfr":"zh-min-nan."+O,"zh-cn":"zh."+O,"zh-tw":"zh."+O,nan:"zh-min-nan."+O,vro:"fiu-vro."+O,cmn:"zh."+O,lzh:"zh-classical."+O,rup:"roa-rup."+O,gsw:"als."+O,"be-tarask":"be-x-old."+O,sgs:"bat-smg."+O,egl:"eml."+O,w:"en."+O,wikt:"en.wiktionary.org/wiki/$1",q:"en.wikiquote.org/wiki/$1",b:"en.wikibooks.org/wiki/$1",n:"en.wikinews.org/wiki/$1",s:"en.wikisource.org/wiki/$1",chapter:"en"+E,v:"en.wikiversity.org/wiki/$1",voy:"en.wikivoyage.org/wiki/$1"};Object.keys(z).forEach((e=>{C[e]=e+".wikipedia.org/wiki/$1"}));const q=/^:?(category|catégorie|kategorie|categoría|categoria|categorie|kategoria|تصنيف|image|file|fichier|datei|media):/i,N=/\[(https?|news|ftp|mailto|gopher|irc)(:\/\/[^\]| ]{4,1500})([| ].*?)?\]/g,L=/\[\[(.{0,160}?)\]\]([a-z]+)?/gi,P=function(e,t){return t.replace(L,(function(t,i,a){let n=null,r=i;if(i.match(/\|/)&&(r=(i=i.replace(/\[\[(.{2,100}?)\]\](\w{0,10})/g,"$1$2")).replace(/(.{2,100})\|.{0,200}/,"$1"),n=i.replace(/.{2,100}?\|/,""),null===n&&r.match(/\|$/)&&(r=r.replace(/\|$/,""),n=r)),r.match(q))return i;let o={page:r,raw:t};return o.page=o.page.replace(/#(.*)/,((e,t)=>(o.anchor=t,""))),o=function(e){let t=e.page||"";if(-1!==t.indexOf(":")){let i=t.match(/^(.*):(.*)/);if(null===i)return e;let a=i[1]||"";if(a=a.toLowerCase(),-1!==a.indexOf(":")){let[,t,i]=a.match(/^:?(.*):(.*)/);if(!1===C.hasOwnProperty(t)||!1===z.hasOwnProperty(i))return e;e.wiki={wiki:t,lang:i}}else{if(!1===C.hasOwnProperty(a))return e;e.wiki=a}e.page=i[2]}return e}(o),o.wiki&&(o.type="interwiki"),null!==n&&n!==o.page&&(o.text=n),a&&(o.text=o.text||o.page,o.text+=a.trim()),o.page&&!1===/^[A-Z]/.test(o.page)&&(o.text||(o.text=o.page),o.page=o.page),e.push(o),i})),e},A=function(e){let t=[];if(t=function(e,t){return t.replace(N,(function(t,i,a,n){return n=n||"",e.push({type:"external",site:i+a,text:n.trim(),raw:t}),n})),e}(t,e),t=P(t,e),0!==t.length)return t},T=new RegExp("^[ \n\t]*?#("+["adkas","aýdaw","doorverwijzing","ohjaus","patrz","přesměruj","redirección","redireccion","redirección","redirecionamento","redirect","redirection","redirection","rinvia","tilvísun","uudelleenohjaus","weiterleitung","weiterleitung","yönlendi̇r","yönlendirme","yönlendi̇rme","ανακατευθυνση","айдау","перанакіраваньне","перенаправлення","пренасочување","преусмери","преусмјери","تغییر_مسیر","تغییرمسیر","تغییرمسیر","เปลี่ยนทาง","ប្តូរទីតាំងទៅ","転送","重定向"].join("|")+") *?(\\[\\[.{2,180}?\\]\\])","i"),D=["table","code","score","data","categorytree","charinsert","hiero","imagemap","inputbox","nowiki","references","source","syntaxhighlight","timeline"],I=`< ?(${D.join("|")}) ?[^>]{0,200}?>`,M=`< ?/ ?(${D.join("|")}) ?>`,R=new RegExp(`${I}[\\s\\S]+?${M}`,"gi");function U(e){return e=(e=(e=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(R," ")).replace(/ ?< ?(span|div|table|data) [a-zA-Z0-9=%.\-#:;'" ]{2,100}\/? ?> ?/g," ")).replace(/ ?< ?(ref) [a-zA-Z0-9=" ]{2,100}\/ ?> ?/g," ")).replace(/(.*?)<\/i>/g,"''$1''")).replace(/(.*?)<\/b>/g,"'''$1'''")).replace(/(.*?)<\/sub>/g,"{{sub|$1}}")).replace(/(.*?)<\/sup>/g,"{{sup|$1}}")).replace(/
(.*?)<\/blockquote>/g,"{{blockquote|text=$1}}")).replace(/ ?<[ /]?(p|sub|sup|span|nowiki|div|table|br|tr|td|th|pre|pre2|hr|u)[ /]?> ?/g," ")).replace(/ ?<[ /]?(abbr|bdi|bdo|cite|del|dfn|em|ins|kbd|mark|q|s|small)[ /]?> ?/g," ")).replace(/ ?<[ /]?h[0-9][ /]?> ?/g," ")).replace(/ ?< ?br ?\/> ?/g,"\n")).trim()}(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(//g,"")).replace(/__(NOTOC|NOEDITSECTION|FORCETOC|TOC)__/gi,"")).replace(/~{2,3}/g,"")).replace(/\r/g,"")).replace(/\u3002/g,". ")).replace(/----/g,"")).replace(/\{\{\}\}/g," – ")).replace(/\{\{\\\}\}/g," / ")).replace(/ /g," "))).replace(/\([,;: ]+\)/g,"")).replace(/\{\{(baseball|basketball) (primary|secondary) (style|color).*?\}\}/i,"")}const B=/[\\.$]/,F=function(e){return"string"!=typeof e&&(e=""),e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/^\$/,"\\u0024")).replace(/\./g,"\\u002e")},K=function(e={}){let t=Object.keys(e);for(let i=0;i{H.prototype[e]=Y[e]}));const G=/^[0-9,.]+$/,V={text:!0,links:!0,formatting:!0,numbers:!0},J=function(e={}){Object.defineProperty(this,"data",{enumerable:!1,value:e})},X={links:function(e){let t=this.data.links||[];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page===e));return void 0===i?[]:[i]}return t},interwiki:function(){return this.links().filter((e=>void 0!==e.wiki))},bolds:function(){return this.data&&this.data.fmt&&this.data.fmt.bold&&this.data.fmt.bold||[]},italics:function(){return this.data&&this.data.fmt&&this.data.fmt.italic&&this.data.fmt.italic||[]},text:function(e){return void 0!==e&&"string"==typeof e&&(this.data.text=e),this.data.text||""},json:function(e){return function(e,t){t=p(t,V);let i={},a=e.text();if(!0===t.text&&(i.text=a),!0===t.numbers&&G.test(a)){let e=Number(a.replace(/,/g,""));!1===isNaN(e)&&(i.number=e)}return t.links&&e.links().length>0&&(i.links=e.links().map((e=>e.json()))),t.formatting&&e.data.fmt&&(i.formatting=e.data.fmt),i}(this,e)},wikitext:function(){return this.data.wiki||""},isEmpty:function(){return""===this.data.text}};Object.keys(X).forEach((e=>{J.prototype[e]=X[e]}));const Q={links:"link",bolds:"bold",italics:"italic"};Object.keys(Q).forEach((e=>{J.prototype[Q[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}})),J.prototype.plaintext=J.prototype.text;const ee=["ad","adj","adm","adv","al","alta","approx","apr","apt","arc","ariz","assn","asst","atty","aug","ave","ba","bc","bl","bldg","blvd","brig","bros","ca","cal","calif","capt","cca","cg","cl","cm","cmdr","co","col","colo","comdr","conn","corp","cpl","cres","ct","cyn","dak","dec","def","dept","det","dg","dist","dl","dm","dr","ea","eg","eng","esp","esq","est","etc","ex","exp","feb","fem","fig","fl oz","fl","fla","fm","fr","ft","fy","ga","gal","gb","gen","gov","hg","hon","hr","hrs","hwy","hz","ia","ida","ie","inc","inf","jan","jd","jr","jul","jun","kan","kans","kb","kg","km","kmph","lat","lb","lit","llb","lm","lng","lt","ltd","lx","ma","maj","mar","masc","mb","md","messrs","mg","mi","min","minn","misc","mister","ml","mlle","mm","mme","mph","mps","mr","mrs","ms","mstr","mt","neb","nebr","nee","no","nov","oct","okla","ont","op","ord","oz","pa","pd","penn","penna","phd","pl","pp","pref","prob","prof","pron","ps","psa","pseud","pt","pvt","qt","que","rb","rd","rep","reps","res","rev","sask","sec","sen","sens","sep","sept","sfc","sgt","sir","situ","sq ft","sq","sr","ss","st","supt","surg","tb","tbl","tbsp","tce","td","tel","temp","tenn","tex","tsp","univ","usafa","ut","va","vb","ver","vet","vitro","vivo","vol","vs","vt","wis","wisc","wr","wy","wyo","yb","µg"].concat("[^]][^]]"),te=new RegExp("(^| |')("+ee.join("|")+")[.!?] ?$","i"),ie=/[ .'][A-Z].? *$/i,ae=/\.{3,} +$/,ne=/ c\.\s$/,re=/\p{Letter}/iu;function oe(e){let t={wiki:e,text:e};return function(e){let t=e.text,i=A(t)||[];e.links=i.map((e=>(t=t.replace(e.raw,e.text||e.page||""),new H(e)))),t=t.replace(/\[\[File:(.{2,80}?)\|([^\]]+)\]\](\w{0,5})/g,"$1"),e.text=t}(t),t.text=n(t.text.replace(/\([,;: ]*\)/g,"").replace(/\( *(; ?)+/g,"(")).replace(/ +\.$/,"."),t=function(e){let t=[],i=[],a=e.text||"";return a=a.replace(/'''''(.{0,2500}?)'''''/g,((e,a)=>(t.push(a),i.push(a),a))),a=a.replace(/''''(.{0,2500}?)''''/g,((e,i)=>(t.push(`'${i}'`),`'${i}'`))),a=a.replace(/'''(.{0,2500}?)'''/g,((e,i)=>(t.push(i),i))),a=a.replace(/''(.{0,2500}?)''/g,((e,t)=>(i.push(t),t))),e.text=a,t.length>0&&(e.fmt=e.fmt||{},e.fmt.bold=t),i.length>0&&(e.fmt=e.fmt||{},e.fmt.italic=i),e}(t),new J(t)}const se=function(e){let t=function(e){let t=[],i=[];if(!e||"string"!=typeof e||0===e.trim().length)return t;let a=function(e){let t=e.split(/(\n+)/);return t=t.filter((e=>e.match(/\S/))),t=t.map((function(e){return e.split(/(\S.+?[.!?]"?)(?=\s|$)/g)})),function(e){let t=[];return e.forEach((function(e){t=t.concat(e)})),t}(t)}(e);for(let e=0;ei.length)return!1;const a=e.match(/"/g);if(a&&a.length%2!=0&&e.length<900)return!1;const n=e.match(/[()]/g);return!(n&&n.length%2!=0&&e.length<900)}(n))?i[e+1]=i[e]+(i[e+1]||""):i[e]&&i[e].length>0&&(t.push(i[e]),i[e]="");var n;return 0===t.length?[e]:t}(e.wiki);t=t.map(oe),t[0]&&t[0].text()&&":"===t[0].text()[0]&&(t=t.slice(1)),e.sentences=t},le=/.*rowspan *= *["']?([0-9]+)["']?[ |]*/,ce=/.*colspan *= *["']?([0-9]+)["']?[ |]*/,ue=function(e){return e=function(e){return e.forEach(((t,i)=>{t.forEach(((a,n)=>{let r=a.match(le);if(null!==r){let o=parseInt(r[1],10);a=a.replace(le,""),t[n]=a;for(let t=i+1;t{e.forEach(((t,i)=>{let a=t.match(ce);if(null!==a){let n=parseInt(a[1],10);e[i]=t.replace(ce,"");for(let t=1;te.length>0))}(e))},pe=/^!/,me={name:!0,age:!0,born:!0,date:!0,year:!0,city:!0,country:!0,population:!0,count:!0,number:!0},de=function(e){return(e=oe(e).text()).match(/\|/)&&(e=e.replace(/.*?\| ?/,"")),e=(e=(e=e.replace(/style=['"].*?["']/,"")).replace(/^!/,"")).trim()},he=function(e){if(e.length<=3)return[];let t=e[0].slice(0);t=t.map((e=>(e=oe(e=e.replace(/^! */,"")).text(),e=(e=de(e)).toLowerCase())));for(let i=0;ie&&!0!==/^\|\+/.test(e))),!0===/^\{\|/.test(e[0])&&e.shift(),!0===/^\|\}/.test(e[e.length-1])&&e.pop(),!0===/^\|-/.test(e[0])&&e.shift(),e}(e);for(let a=0;a0&&(t.push(i),i=[]);else{let e=n.charAt(0);"|"!==e&&"!"!==e||(n=n.substring(1)),n=n.split(/(?:\|\||!!)/),"!"===e&&(n[0]=e+n[0]),n.forEach((e=>{e=e.trim(),i.push(e)}))}}return i.length>0&&t.push(i),t}(e.replace(/\r/g,"").replace(/\n(\s*[^|!{\s])/g," $1").split(/\n/).map((e=>e.trim())));if(t=t.filter((e=>e)),0===t.length)return[];t=function(e){return e.filter((e=>1!==e.length||!e[0]||!pe.test(e[0])||!1!==/rowspan/i.test(e[0])))}(t),t=ue(t);let i=function(e=[]){let t=[];var i;(i=(i=e[0])||[]).length-i.filter((e=>e)).length>3&&e.shift();let a=e[0];return a&&a[0]&&a[1]&&(/^!/.test(a[0])||/^!/.test(a[1]))&&(t=a.map((e=>(e=e.replace(/^! */,""),de(e)))),e.shift()),a=e[0],a&&a[0]&&a[1]&&/^!/.test(a[0])&&/^!/.test(a[1])&&(a.forEach(((e,i)=>{e=e.replace(/^! */,""),e=de(e),!0===Boolean(e)&&(t[i]=e)})),e.shift()),t}(t);if(!i||i.length<=1){i=he(t);let e=t[t.length-1]||[];i.length<=1&&e.length>2&&(i=he(t.slice(1)),i.length>0&&(t=t.slice(2)))}let a=t.map((e=>function(e,t){let i={};return e.forEach(((e,a)=>{let n=t[a]||"col"+(a+1),r=oe(e);r.text(de(r.text())),i[n]=r})),i}(e,i)));return a},fe={},ke=function(e=""){return e=(e=(e=(e=e.toLowerCase()).replace(/[_-]/g," ")).replace(/\(.*?\)/,"")).trim()},be=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_wiki",{enumerable:!1,value:t})},we={links(e){let t=[];if(this.data.forEach((e=>{Object.keys(e).forEach((i=>{t=t.concat(e[i].links())}))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},get(e){let t=this.data[0]||{},i=Object.keys(t).reduce(((e,t)=>(e[ke(t)]=t,e)),{});if("string"==typeof e){let t=ke(e);return t=i[t]||t,this.data.map((e=>e[t]?e[t].text():null))}return e=e.map(ke).map((e=>i[e]||e)),this.data.map((t=>e.reduce(((e,i)=>(t[i]?e[i]=t[i].text():e[i]="",e)),{})))},keyValue(e){let t=this.json(e);return t.forEach((e=>{Object.keys(e).forEach((t=>{e[t]=e[t].text}))})),t},json(e){return e=p(e,fe),function(e,t){return e.map((e=>{let i={};return Object.keys(e).forEach((t=>{i[t]=e[t].json()})),!0===t.encode&&(i=K(i)),i}))}(this.data,e)},text:()=>"",wikitext(){return this._wiki||""}};we.keyvalue=we.keyValue,we.keyval=we.keyValue,Object.keys(we).forEach((e=>{be.prototype[e]=we[e]}));const ye=/^\s*\{\|/,$e=/^\s*\|\}/,xe={sentences:!0},ve={sentences:!0,lists:!0,images:!0},je=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},_e={sentences:function(){return this.data.sentences||[]},references:function(){return this.data.references},lists:function(){return this.data.lists},images(){return this.data.images||[]},links:function(e){let t=[];if(this.sentences().forEach((i=>{t=t.concat(i.links(e))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},interwiki(){let e=[];return this.sentences().forEach((t=>{e=e.concat(t.interwiki())})),e||[]},text:function(e){e=p(e,ve);let t=this.sentences().map((t=>t.text(e))).join(" ");return this.lists().forEach((e=>{t+="\n"+e.text()})),t},json:function(e){return function(e,t){let i={};return!0===(t=p(t,xe)).sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,ve))},wikitext:function(){return this.data.wiki}};_e.citations=_e.references,Object.keys(_e).forEach((e=>{je.prototype[e]=_e[e]}));const ze={sentences:"sentence",references:"reference",citations:"citation",lists:"list",images:"image",links:"link"};Object.keys(ze).forEach((e=>{je.prototype[ze[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}}));const Oe=function(e){return e=(e=e.replace(/^\{\{/,"")).replace(/\}\}$/,"")},Ee=function(e){return e=(e=(e=(e||"").trim()).toLowerCase()).replace(/_/g," ")},Se=/^[\p{Letter}0-9._\- '()]+=/iu,Ce={template:!0,list:!0,prototype:!0},qe=function(e,t){let i=0;return e.reduce(((e,a="")=>{if(a=a.trim(),!0===Se.test(a)){let t=function(e){let t=e.split("="),i=t[0]||"";i=i.toLowerCase().trim();let a=t.slice(1).join("=");return Ce.hasOwnProperty(i)&&(i="_"+i),{key:i,val:a.trim()}}(a);if(t.key)return e[t.key]=t.val,e}if(t&&t[i]){e[t[i]]=a}else e.list=e.list||[],e.list.push(a);return i+=1,e}),{})},Ne={classname:!0,style:!0,align:!0,margin:!0,left:!0,break:!0,boxsize:!0,framestyle:!0,item_style:!0,collapsible:!0,list_style_type:!0,"list-style-type":!0,colwidth:!0},Le=function(e,t){let i=oe(e);return"json"===t?i.json():"raw"===t?i:i.text()},Pe=function(e,t=[],i){let a=function(e){let t=e.split(/\n?\|/);t.forEach(((e,i)=>{null!==e&&(/\[\[[^\]]+$/.test(e)||/\{\{[^}]+$/.test(e)||e.split("{{").length!==e.split("}}").length||e.split("[[").length!==e.split("]]").length)&&(t[i+1]=t[i]+"|"+t[i+1],t[i]=null)})),t=t.filter((e=>null!==e)),t=t.map((e=>(e||"").trim()));for(let e=t.length-1;e>=0;e-=1){""===t[e]&&t.pop();break}return t}(e=Oe(e||"")),n=a.shift(),r=qe(a,t);return r=function(e){return Object.keys(e).forEach((t=>{!0===Ne[t.toLowerCase()]&&delete e[t],null!==e[t]&&""!==e[t]||delete e[t]})),e}(r),r[1]&&t[0]&&!1===r.hasOwnProperty(t[0])&&(r[t[0]]=r[1],delete r[1]),Object.keys(r).forEach((e=>{r[e]="list"!==e?Le(r[e],i):r[e].map((e=>Le(e,i)))})),n&&(r.template=Ee(n)),r};const Ae=new RegExp("("+h.join("|")+"):","i");let Te=`(${h.join("|")})`;const De=new RegExp(Te+":(.+?)[\\||\\]]","iu"),Ie={thumb:!0,thumbnail:!0,border:!0,right:!0,left:!0,center:!0,top:!0,bottom:!0,none:!0,upright:!0,baseline:!0,middle:!0,sub:!0,super:!0},Me=function(e,t){let i=e.wiki,a=function(e){let t=[],i=[];const a=e.split("");let n=0;for(let r=0;r0){let e=0,a=0;for(let t=0;ta&&i.push("]"),t.push(i.join("")),i=[]}}return t}(i);a.forEach((function(a){if(!0===Ae.test(a)){e.images=e.images||[];let n=function(e,t){let i=e.match(De);if(null===i||!i[2])return null;let a=`${i[1]}:${i[2]||""}`;if(a){let i={file:a,lang:t._lang,domain:t._domain,wiki:e,pluginData:{}};e=(e=e.replace(/^\[\[/,"")).replace(/\]\]$/,"");let n=Pe(e),r=n.list||[];return n.alt&&(i.alt=n.alt),r=r.filter((e=>!1===Ie.hasOwnProperty(e))),r[r.length-1]&&(i.caption=oe(r[r.length-1])),new j(i)}return null}(a,t);n&&e.images.push(n),i=i.replace(a,"")}})),e.wiki=i},Re={},Ue=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},Be={lines(){return this.data},links(e){let t=[];if(this.lines().forEach((e=>{t=t.concat(e.links())})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},json(e){return e=p(e,Re),this.lines().map((t=>t.json(e)))},text(){return((e,t)=>e.map((e=>" * "+e.text(t))).join("\n"))(this.data)},wikitext(){return this.wiki||""}};Object.keys(Be).forEach((e=>{Ue.prototype[e]=Be[e]}));const Fe=/^[#*:;|]+/,Ke=/^\*+[^:,|]{4}/,We=/^ ?#[^:,|]{4}/,Ze=/[\p{Letter}_0-9\]}]/iu,He=function(e){return Fe.test(e)||Ke.test(e)||We.test(e)},Ye=function(e,t){let i=[];for(let a=t;ae&&Ze.test(e))),i=function(e){let t=1;e=e.filter((e=>e));for(let i=0;ie&&e.trim().length>0)),a=a.map((e=>{let i={wiki:e,lists:[],sentences:[],images:[]};return function(e){let t=e.wiki,i=t.split(/\n/g),a=[],n=[];for(let e=0;e0&&(a.push(t),e+=t.length-1)}else n.push(i[e]);e.lists=a.map((e=>new Ue(e,t))),e.wiki=n.join("\n")}(i),Me(i,t),se(i),new je(i)})),e._wiki=i,e._paragraphs=a},Je="{",Xe=function(e){let t=0,i=[],a=[];for(let n=e.indexOf(Je);-1!==n&&n0?n++:n=e.indexOf(Je,n+1)){let r=e[n];if(r===Je&&(t+=1),t>0){if("}"===r&&(t-=1,0===t)){a.push(r);let e=a.join("");a=[],/\{\{/.test(e)&&/\}\}/.test(e)&&i.push(e);continue}if(1===t&&r!==Je&&"}"!==r){t=0,a=[];continue}a.push(r)}}return i},Qe=function(e){let t=null;return t=/^\{\{[^\n]+\|/.test(e)?(e.match(/^\{\{(.+?)\|/)||[])[1]:-1!==e.indexOf("\n")?(e.match(/^\{\{(.+)\n/)||[])[1]:(e.match(/^\{\{(.+?)\}\}$/)||[])[1],t&&(t=t.replace(/:.*/,""),t=Ee(t)),t||null},et=/\{\{/,tt=function(e){return{body:e=e.replace(/#invoke:/,""),name:Qe(e),children:[]}},it=function(e){let t=e.body.substr(2);return t=t.replace(/\}\}$/,""),e.children=Xe(t),e.children=e.children.map(tt),0===e.children.length||e.children.forEach((e=>{let t=e.body.substr(2);return et.test(t)?it(e):null})),e},at=function(e){let t=Xe(e);return t=t.map(tt),t=t.map(it),t},nt=["anchor","defaultsort","use list-defined references","void","pp","pp-move-indef","pp-semi-indef","pp-vandalism","r","#tag","div col","pope list end","shipwreck list end","starbox end","end box","end","s-end"].reduce(((e,t)=>(e[t]=!0,e)),{});var rt={"gnf protein box":!0,"automatic taxobox":!0,"chembox ":!0,editnotice:!0,geobox:!0,hybridbox:!0,ichnobox:!0,infraspeciesbox:!0,mycomorphbox:!0,oobox:!0,"paraphyletic group":!0,speciesbox:!0,subspeciesbox:!0,"starbox short":!0,taxobox:!0,nhlteamseason:!0,"asian games bid":!0,"canadian federal election results":!0,"dc thomson comic strip":!0,"daytona 24 races":!0,edencharacter:!0,"moldova national football team results":!0,samurai:!0,protein:!0,"sheet authority":!0,"order-of-approx":!0,"bacterial labs":!0,"medical resources":!0,ordination:!0,"hockey team coach":!0,"hockey team gm":!0,"pro hockey team":!0,"hockey team player":!0,"hockey team start":!0,mlbbioret:!0};const ot=new RegExp("^(subst.)?("+g.join("|")+")(?=:| |\n|$)","i");g.forEach((e=>{rt[e]=!0}));const st=/^infobox /i,lt=/ infobox$/i,ct=/^year in [A-Z]/i,ut=function(e={}){let t=e.template.match(ot),i=e.template;t&&t[0]&&(i=i.replace(t[0],"")),i=i.trim();let a={template:"infobox",type:i,data:e};return delete a.data.template,delete a.data.list,a};let pt={imdb:"imdb name","imdb episodess":"imdb episode",localday:"currentday",localdayname:"currentdayname",localyear:"currentyear","birth date based on age at death":"birth based on age as of date","bare anchored list":"anchored list",cvt:"convert",cricon:"flagicon",sfrac:"frac",sqrt:"radic","unreferenced section":"unreferenced",redir:"redirect",sisterlinks:"sister project links","main article":"main"},mt={date:["byline","dateline"],citation:["cite","source","source-pr","source-science"],flagcountry:["cr","cr-rt"],trunc:["str left","str crop"],percentage:["pct","percentage"],rnd:["rndfrac","rndnear"],abbr:["tooltip","abbrv","define"],sfn:["sfnref","harvid","harvnb"],"birth date and age":["death date and age","bda"],currentmonth:["localmonth","currentmonthname","currentmonthabbrev"],currency:["monnaie","unité","nombre","nb","iso4217"],coord:["coor","coor title dms","coor title dec","coor dms","coor dm","coor dec"],"columns-list":["cmn","col-list","columnslist","collist"],nihongo:["nihongo2","nihongo3","nihongo-s","nihongo foot"],plainlist:["flatlist","plain list"],"winning percentage":["winpct","winperc"],"collapsible list":["nblist","nonbulleted list","ubl","ublist","ubt","unbullet","unbulleted list","unbulleted","unbulletedlist","vunblist"],"election box begin":["election box begin no change","election box begin no party","election box begin no party no change","election box inline begin","election box inline begin no change"],"election box candidate":["election box candidate for alliance","election box candidate minor party","election box candidate no party link no change","election box candidate with party link","election box candidate with party link coalition 1918","election box candidate with party link no change","election box inline candidate","election box inline candidate no change","election box inline candidate with party link","election box inline candidate with party link no change","election box inline incumbent"],"4teambracket":["2teambracket","4team2elimbracket","8teambracket","16teambracket","32teambracket","4roundbracket-byes","cwsbracket","nhlbracket","nhlbracket-reseed","4teambracket-nhl","4teambracket-ncaa","4teambracket-mma","4teambracket-mlb","16teambracket-two-reseeds","8teambracket-nhl","8teambracket-mlb","8teambracket-ncaa","8teambracket-afc","8teambracket-afl","8teambracket-tennis3","8teambracket-tennis5","16teambracket-nhl","16teambracket-nhl divisional","16teambracket-nhl-reseed","16teambracket-nba","16teambracket-swtc","16teambracket-afc","16teambracket-tennis3","16teambracket-tennis5"],start:["end","birth","death","start date","end date","birth date","death date","start date and age","end date and age","dob"],"start-date":["end-date","birth-date","death-date","birth-date and age","birth-date and given age","death-date and age","death-date and given age"],tl:["lts","t","tfd links","tiw","tltt","tetl","tsetl","ti","tic","tiw","tlt","ttl","twlh","tl2","tlu","demo","xpd","para","elc","xtag","mli","mlix","#invoke","url"]};Object.keys(z).forEach((e=>{pt["ipa-"+e]="ipa",pt["ipac-"+e]="ipac"})),Object.keys(mt).forEach((e=>{mt[e].forEach((t=>{pt[t]=e}))}));let dt={p1:0,p2:1,p3:2,resize:1,lang:1,"rtl-lang":1,l:2,h:1,sort:1};["defn","lino","finedetail","nobold","noitalic","nocaps","vanchor","rnd","date","taste","monthname","baseball secondary style","lang-de","nowrap","nobr","big","cquote","pull quote","smaller","midsize","larger","big","kbd","bigger","large","mono","strongbad","stronggood","huge","xt","xt2","!xt","xtn","xtd","dc","dcr","mxt","!mxt","mxtn","mxtd","bxt","!bxt","bxtn","bxtd","delink","pre","var","mvar","pre2","code","char","angle bracket","angbr","symb","key press"].forEach((e=>{dt[e]=0})),Object.keys(z).forEach((e=>{dt["lang-"+e]=0}));const ht=function(e){if(!e.numerator&&!e.denominator)return null;let t=Number(e.numerator)/Number(e.denominator);t*=100;let i=Number(e.decimals);return isNaN(i)&&(i=1),Number(t.toFixed(i))},gt=function(e=""){if("number"==typeof e)return e;e=(e=e.replace(/,/g,"")).replace(/−/g,"-");let t=Number(e);return isNaN(t)?e:t},ft=function(e){let t=e.match(/ipac?-(.+)/);return null!==t?!0===z.hasOwnProperty(t[1])?z[t[1]].english_title:t[1]:null},kt=e=>e.charAt(0).toUpperCase()+e.substring(1),bt={wikt:"wiktionary",commons:"commons",c:"commons",commonscat:"commonscat",n:"wikinews",q:"wikiquote",s:"wikisource",a:"wikiauthor",b:"wikibooks",voy:"wikivoyage",v:"wikiversity",d:"wikidata",species:"wikispecies",m:"meta",mw:"mediawiki"};var wt={ra:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},deg2hms:e=>(Pe(e,["degrees"]).degrees||"")+"°",hms2deg:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},decdeg:e=>{let t=Pe(e,["deg","min","sec","hem","rnd"]);return(t.deg||t.degrees)+"°"},sortname:e=>{let t=Pe(e,["first","last","target","sort"]),i=`${t.first||""} ${t.last||""}`;return i=i.trim(),t.nolink?t.target||i:(t.dab&&(i+=` (${t.dab})`,t.target&&(t.target+=` (${t.dab})`)),t.target?`[[${t.target}|${i}]]`:`[[${i}]]`)},"first word":e=>{let t=Pe(e,["text"]),i=t.text;return t.sep?i.split(t.sep)[0]:i.split(" ")[0]},trunc:e=>{let t=Pe(e,["str","len"]);return t.str.substr(0,t.len)},"str mid":e=>{let t=Pe(e,["str","start","end"]),i=parseInt(t.start,10)-1,a=parseInt(t.end,10);return t.str.substr(i,a)},reign:e=>{let t=Pe(e,["start","end"]);return`(r. ${t.start} – ${t.end})`},circa:e=>`c. ${Pe(e,["year"]).year}`,"decade link":e=>{let t=Pe(e,["year"]);return`${t.year}|${t.year}s`},decade:e=>{let t=Pe(e,["year"]),i=Number(t.year);return i=10*Math.floor(i/10),`${i}s`},century:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/100)+1,`${i}`},radic:e=>{let t=Pe(e,["after","before"]);return`${t.before||""}√${t.after||""}`},"medical cases chart/row":e=>e,oldstyledate:e=>{let t=Pe(e,["date","year"]);return t.year?t.date+" "+t.year:t.date},braces:e=>{let t=Pe(e,["text"]),i="";return t.list&&(i="|"+t.list.join("|")),"{{"+(t.text||"")+i+"}}"},hlist:e=>{let t=Pe(e);return t.list=t.list||[],t.list.join(" · ")},pagelist:e=>(Pe(e).list||[]).join(", "),catlist:e=>(Pe(e).list||[]).join(", "),"br separated entries":e=>(Pe(e).list||[]).join("\n\n"),"comma separated entries":e=>(Pe(e).list||[]).join(", "),"anchored list":e=>{let t=Pe(e).list||[];return t=t.map(((e,t)=>`${t+1}. ${e}`)),t.join("\n\n")},"bulleted list":e=>{let t=Pe(e).list||[];return t=t.filter((e=>e)),t=t.map((e=>"• "+e)),t.join("\n\n")},plainlist:e=>{let t=(e=Oe(e)).split("|").slice(1);return t=t.join("|").split(/\n ?\* ?/),t=t.filter((e=>e)),t.join("\n\n")},term:e=>`${Pe(e,["term"]).term}:`,linum:e=>{let t=Pe(e,["num","text"]);return`${t.num}. ${t.text}`},"block indent":e=>{let t=Pe(e);return t[1]?"\n"+t[1]+"\n":""},lbs:e=>{let t=Pe(e,["text"]);return`[[${t.text} Lifeboat Station|${t.text}]]`},lbc:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}-class]]`},lbb:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}]]`},"#dateformat":e=>(e=e.replace(/:/,"|"),Pe(e,["date","format"]).date),lc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toLowerCase()),uc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toUpperCase()),lcfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toLowerCase()+t.substr(1):""},ucfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toUpperCase()+t.substr(1):""},padleft:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padStart(t.num,t.str||"0")},padright:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padEnd(t.num,t.str||"0")},abbrlink:e=>{let t=Pe(e,["abbr","page"]);return t.page?`[[${t.page}|${t.abbr}]]`:`[[${t.abbr}]]`},own:e=>{let t=Pe(e,["author"]),i="Own work";return t.author&&(i+=" by "+t.author),i},formatnum:e=>{e=e.replace(/:/,"|");let t=Pe(e,["number"]).number||"";return t=t.replace(/,/g,""),Number(t).toLocaleString()||""},frac:e=>{let t=Pe(e,["a","b","c"]);return t.c?`${t.a} ${t.b}/${t.c}`:t.b?`${t.a}/${t.b}`:`1/${t.b}`},convert:e=>{let t=Pe(e,["num","two","three","four"]);return"-"===t.two||"to"===t.two||"and"===t.two?t.four?`${t.num} ${t.two} ${t.three} ${t.four}`:`${t.num} ${t.two} ${t.three}`:`${t.num} ${t.two}`},tl:e=>{let t=Pe(e,["first","second"]);return t.second||t.first},won:e=>{let t=Pe(e,["text"]);return t.place||t.text||kt(t.template)},tag:e=>{let t=Pe(e,["tag","open"]);const i={span:!0,div:!0,p:!0};return t.open&&"pair"!==t.open?"":i[t.tag]?t.content||"":`<${t.tag} ${t.attribs||""}>${t.content||""}`},plural:e=>{e=e.replace(/plural:/,"plural|");let t=Pe(e,["num","word"]),i=Number(t.num),a=t.word;return 1!==i&&(/.y$/.test(a)?a=a.replace(/y$/,"ies"):a+="s"),i+" "+a},dec:e=>{let t=Pe(e,["degrees","minutes","seconds"]),i=(t.degrees||0)+"°";return t.minutes&&(i+=t.minutes+"′"),t.seconds&&(i+=t.seconds+"″"),i},val:e=>{let t=Pe(e,["number","uncertainty"]),i=t.number;i&&Number(i)&&(i=Number(i).toLocaleString());let a=i||"";return t.p&&(a=t.p+a),t.s&&(a=t.s+a),(t.u||t.ul||t.upl)&&(a=a+" "+(t.u||t.ul||t.upl)),a},percentage:e=>{let t=Pe(e,["numerator","denominator","decimals"]),i=ht(t);return null===i?"":i+"%"},small:e=>{let t=Pe(e);return t.list&&t.list[0]?t.list[0]:""},"percent-done":e=>{let t=Pe(e,["done","total","digits"]),i=ht({numerator:t.done,denominator:t.total,decimals:t.digits});return null===i?"":`${t.done} (${i}%) done`}},yt=[["🇦🇩","and","andorra"],["🇦🇪","are","united arab emirates"],["🇦🇫","afg","afghanistan"],["🇦🇬","atg","antigua and barbuda"],["🇦🇮","aia","anguilla"],["🇦🇱","alb","albania"],["🇦🇲","arm","armenia"],["🇦🇴","ago","angola"],["🇦🇶","ata","antarctica"],["🇦🇷","arg","argentina"],["🇦🇸","asm","american samoa"],["🇦🇹","aut","austria"],["🇦🇺","aus","australia"],["🇦🇼","abw","aruba"],["🇦🇽","ala","åland islands"],["🇦🇿","aze","azerbaijan"],["🇧🇦","bih","bosnia and herzegovina"],["🇧🇧","brb","barbados"],["🇧🇩","bgd","bangladesh"],["🇧🇪","bel","belgium"],["🇧🇫","bfa","burkina faso"],["🇧🇬","bgr","bulgaria"],["🇧🇬","bul","bulgaria"],["🇧🇭","bhr","bahrain"],["🇧🇮","bdi","burundi"],["🇧🇯","ben","benin"],["🇧🇱","blm","saint barthélemy"],["🇧🇲","bmu","bermuda"],["🇧🇳","brn","brunei darussalam"],["🇧🇴","bol","bolivia"],["🇧🇶","bes","bonaire, sint eustatius and saba"],["🇧🇷","bra","brazil"],["🇧🇸","bhs","bahamas"],["🇧🇹","btn","bhutan"],["🇧🇻","bvt","bouvet island"],["🇧🇼","bwa","botswana"],["🇧🇾","blr","belarus"],["🇧🇿","blz","belize"],["🇨🇦","can","canada"],["🇨🇨","cck","cocos (keeling) islands"],["🇨🇩","cod","congo"],["🇨🇫","caf","central african republic"],["🇨🇬","cog","congo"],["🇨🇭","che","switzerland"],["🇨🇮","civ","côte d'ivoire"],["🇨🇰","cok","cook islands"],["🇨🇱","chl","chile"],["🇨🇲","cmr","cameroon"],["🇨🇳","chn","china"],["🇨🇴","col","colombia"],["🇨🇷","cri","costa rica"],["🇨🇺","cub","cuba"],["🇨🇻","cpv","cape verde"],["🇨🇼","cuw","curaçao"],["🇨🇽","cxr","christmas island"],["🇨🇾","cyp","cyprus"],["🇨🇿","cze","czech republic"],["🇩🇪","deu","germany"],["🇩🇪","ger","germany"],["🇩🇯","dji","djibouti"],["🇩🇰","dnk","denmark"],["🇩🇲","dma","dominica"],["🇩🇴","dom","dominican republic"],["🇩🇿","dza","algeria"],["🇪🇨","ecu","ecuador"],["🇪🇪","est","estonia"],["🇪🇬","egy","egypt"],["🇪🇭","esh","western sahara"],["🇪🇷","eri","eritrea"],["🇪🇸","esp","spain"],["🇪🇹","eth","ethiopia"],["🇫🇮","fin","finland"],["🇫🇯","fji","fiji"],["🇫🇰","flk","falkland islands (malvinas)"],["🇫🇲","fsm","micronesia"],["🇫🇴","fro","faroe islands"],["🇫🇷","fra","france"],["🇬🇦","gab","gabon"],["🇬🇧","gbr","united kingdom"],["🇬🇩","grd","grenada"],["🇬🇫","guf","french guiana"],["🇬🇬","ggy","guernsey"],["🇬🇭","gha","ghana"],["🇬🇮","gib","gibraltar"],["🇬🇱","grl","greenland"],["🇬🇲","gmb","gambia"],["🇬🇳","gin","guinea"],["🇬🇵","glp","guadeloupe"],["🇬🇶","gnq","equatorial guinea"],["🇬🇷","grc","greece"],["🇬🇸","sgs","south georgia"],["🇬🇹","gtm","guatemala"],["🇬🇺","gum","guam"],["🇬🇼","gnb","guinea-bissau"],["🇬🇾","guy","guyana"],["🇭🇰","hkg","hong kong"],["🇭🇲","hmd","heard island and mcdonald islands"],["🇭🇳","hnd","honduras"],["🇭🇷","hrv","croatia"],["🇭🇹","hti","haiti"],["🇭🇺","hun","hungary"],["🇮🇩","idn","indonesia"],["🇮🇪","irl","ireland"],["🇮🇱","isr","israel"],["🇮🇲","imn","isle of man"],["🇮🇳","ind","india"],["🇮🇴","iot","british indian ocean territory"],["🇮🇶","irq","iraq"],["🇮🇷","irn","iran"],["🇮🇸","isl","iceland"],["🇮🇹","ita","italy"],["🇯🇪","jey","jersey"],["🇯🇲","jam","jamaica"],["🇯🇴","jor","jordan"],["🇯🇵","jpn","japan"],["🇰🇪","ken","kenya"],["🇰🇬","kgz","kyrgyzstan"],["🇰🇭","khm","cambodia"],["🇰🇮","kir","kiribati"],["🇰🇲","com","comoros"],["🇰🇳","kna","saint kitts and nevis"],["🇰🇵","prk","north korea"],["🇰🇷","kor","south korea"],["🇰🇼","kwt","kuwait"],["🇰🇾","cym","cayman islands"],["🇰🇿","kaz","kazakhstan"],["🇱🇦","lao","lao people's democratic republic"],["🇱🇧","lbn","lebanon"],["🇱🇨","lca","saint lucia"],["🇱🇮","lie","liechtenstein"],["🇱🇰","lka","sri lanka"],["🇱🇷","lbr","liberia"],["🇱🇸","lso","lesotho"],["🇱🇹","ltu","lithuania"],["🇱🇺","lux","luxembourg"],["🇱🇻","lva","latvia"],["🇱🇾","lby","libya"],["🇲🇦","mar","morocco"],["🇲🇨","mco","monaco"],["🇲🇩","mda","moldova"],["🇲🇪","mne","montenegro"],["🇲🇫","maf","saint martin (french part)"],["🇲🇬","mdg","madagascar"],["🇲🇭","mhl","marshall islands"],["🇲🇰","mkd","macedonia"],["🇲🇱","mli","mali"],["🇲🇲","mmr","myanmar"],["🇲🇳","mng","mongolia"],["🇲🇴","mac","macao"],["🇲🇵","mnp","northern mariana islands"],["🇲🇶","mtq","martinique"],["🇲🇷","mrt","mauritania"],["🇲🇸","msr","montserrat"],["🇲🇹","mlt","malta"],["🇲🇺","mus","mauritius"],["🇲🇻","mdv","maldives"],["🇲🇼","mwi","malawi"],["🇲🇽","mex","mexico"],["🇲🇾","mys","malaysia"],["🇲🇿","moz","mozambique"],["🇳🇦","nam","namibia"],["🇳🇨","ncl","new caledonia"],["🇳🇪","ner","niger"],["🇳🇫","nfk","norfolk island"],["🇳🇬","nga","nigeria"],["🇳🇮","nic","nicaragua"],["🇳🇱","nld","netherlands"],["🇳🇴","nor","norway"],["🇳🇵","npl","nepal"],["🇳🇷","nru","nauru"],["🇳🇺","niu","niue"],["🇳🇿","nzl","new zealand"],["🇴🇲","omn","oman"],["🇵🇦","pan","panama"],["🇵🇪","per","peru"],["🇵🇫","pyf","french polynesia"],["🇵🇬","png","papua new guinea"],["🇵🇭","phl","philippines"],["🇵🇰","pak","pakistan"],["🇵🇱","pol","poland"],["🇵🇲","spm","saint pierre and miquelon"],["🇵🇳","pcn","pitcairn"],["🇵🇷","pri","puerto rico"],["🇵🇸","pse","palestinian territory"],["🇵🇹","prt","portugal"],["🇵🇼","plw","palau"],["🇵🇾","pry","paraguay"],["🇶🇦","qat","qatar"],["🇷🇪","reu","réunion"],["🇷🇴","rou","romania"],["🇷🇸","srb","serbia"],["🇷🇺","rus","russia"],["🇷🇼","rwa","rwanda"],["🇸🇦","sau","saudi arabia"],["🇸🇧","slb","solomon islands"],["🇸🇨","syc","seychelles"],["🇸🇩","sdn","sudan"],["🇸🇪","swe","sweden"],["🇸🇬","sgp","singapore"],["🇸🇭","shn","saint helena, ascension and tristan da cunha"],["🇸🇮","svn","slovenia"],["🇸🇯","sjm","svalbard and jan mayen"],["🇸🇰","svk","slovakia"],["🇸🇱","sle","sierra leone"],["🇸🇲","smr","san marino"],["🇸🇳","sen","senegal"],["🇸🇴","som","somalia"],["🇸🇷","sur","suriname"],["🇸🇸","ssd","south sudan"],["🇸🇹","stp","sao tome and principe"],["🇸🇻","slv","el salvador"],["🇸🇽","sxm","sint maarten (dutch part)"],["🇸🇾","syr","syrian arab republic"],["🇸🇿","swz","swaziland"],["🇹🇨","tca","turks and caicos islands"],["🇹🇩","tcd","chad"],["🇹🇫","atf","french southern territories"],["🇹🇬","tgo","togo"],["🇹🇭","tha","thailand"],["🇹🇯","tjk","tajikistan"],["🇹🇰","tkl","tokelau"],["🇹🇱","tls","timor-leste"],["🇹🇲","tkm","turkmenistan"],["🇹🇳","tun","tunisia"],["🇹🇴","ton","tonga"],["🇹🇷","tur","turkey"],["🇹🇹","tto","trinidad and tobago"],["🇹🇻","tuv","tuvalu"],["🇹🇼","twn","taiwan"],["🇹🇿","tza","tanzania"],["🇺🇦","ukr","ukraine"],["🇺🇬","uga","uganda"],["🇺🇲","umi","united states minor outlying islands"],["🇺🇸","us","united states"],["🇺🇸","usa","united states"],["🇺🇾","ury","uruguay"],["🇺🇿","uzb","uzbekistan"],["🇻🇦","vat","vatican city"],["🇻🇨","vct","saint vincent and the grenadines"],["🇻🇪","ven","venezuela"],["🇻🇬","vgb","virgin islands, british"],["🇻🇮","vir","virgin islands, u.s."],["🇻🇳","vnm","viet nam"],["🇻🇺","vut","vanuatu"],["🇼🇫","wlf","wallis and futuna"],["🇼🇸","wsm","samoa"],["🇾🇪","yem","yemen"],["🇾🇹","myt","mayotte"],["🇿🇦","zaf","south africa"],["🇿🇲","zmb","zambia"],["🇿🇼 ","zwe","zimbabwe"],["🇺🇳","un","united nations"],["🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿","eng","england"],["🏴󠁧󠁢󠁳󠁣󠁴󠁿","sct","scotland"],["🏴󠁧󠁢󠁷󠁬󠁳󠁿","wal","wales"],["🇪🇺","eu","european union"]];let $t={flag:e=>{let t=Pe(e,["flag","variant"]),i=t.flag||"";t.flag=(t.flag||"").toLowerCase();let a=yt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${a[0]||""} [[${a[2]}|${i}]]`},flagcountry:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=yt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} [[${i[2]}]]`},flagcu:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=yt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} ${i[2]}`},flagicon:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=yt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`[[${i[2]}|${i[0]}]]`:""},flagdeco:e=>{let t=Pe(e,["flag","variant"]);return t.flag=(t.flag||"").toLowerCase(),(yt.find((e=>t.flag===e[1]||t.flag===e[2]))||[])[0]||""},fb:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=yt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${i[2]} national football team|${i[2]}]]`:""},fbicon:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=yt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?` [[${i[2]} national football team|${i[0]}]]`:""},flagathlete:e=>{let t=Pe(e,["name","flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=yt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${t.name||""}]] (${i[1].toUpperCase()})`:`[[${t.name||""}]]`}};yt.forEach((e=>{$t[e[1]]=()=>e[0]}));let xt={};["rh","rh2","yes","no","maybe","eliminated","lost","safe","active","site active","coming soon","good","won","nom","sho","longlisted","tba","success","operational","failure","partial","regional","maybecheck","partial success","partial failure","okay","yes-no","some","nonpartisan","pending","unofficial","unofficial2","usually","rarely","sometimes","any","varies","black","non-album single","unreleased","unknown","perhaps","depends","included","dropped","terminated","beta","table-experimental","free","proprietary","nonfree","needs","nightly","release-candidate","planned","scheduled","incorrect","no result","cmain","calso starring","crecurring","cguest","not yet","optional"].forEach((e=>{xt[e]=e=>{let t=Pe(e,["text"]);return t.text||kt(t.template)}}));[["active fire","Active"],["site active","Active"],["site inactive","Inactive"],["yes2",""],["no2",""],["ya","✅"],["na","❌"],["nom","Nominated"],["sho","Shortlisted"],["tba","TBA"],["maybecheck","✔️"],["okay","Neutral"],["n/a","N/A"],["sdash","—"],["dunno","?"],["draw",""],["cnone",""],["nocontest",""]].forEach((e=>{xt[e[0]]=t=>Pe(t,["text"]).text||e[1]}));var vt=Object.assign({},{"·":"·",dot:"·",middot:"·","•":" • ",",":",","1/2":"1⁄2","1/3":"1⁄3","2/3":"2⁄3","1/4":"1⁄4","3/4":"3⁄4","–":"–",ndash:"–","en dash":"–","spaced ndash":" – ","—":"—",mdash:"—","em dash":"—","number sign":"#",ibeam:"I","&":"&",";":";",ampersand:"&",snds:" – ",snd:" – ","^":" ","!":"|","\\":" /","`":"`","=":"=",bracket:"[","[":"[","*":"*",asterisk:"*","long dash":"———",clear:"\n\n","h.":"ḥ",profit:"▲",loss:"▼",gain:"▲"},dt,wt,$t,xt);let jt={};["goodreads author","twitter","facebook","instagram","tumblr","pinterest","espn nfl","espn nhl","espn fc","hockeydb","fifa player","worldcat","worldcat id","nfl player","ted speaker","playmate"].forEach((e=>{jt[e]=["id","name"]}));let _t={};["imdb title","imdb name","imdb episode","imdb event","afi film","allmovie title","allgame","tcmdb title","discogs artist","discogs label","discogs release","discogs master","librivox author","musicbrainz artist","musicbrainz label","musicbrainz recording","musicbrainz release","musicbrainz work","youtube","goodreads book","dmoz"].forEach((e=>{_t[e]=["id","title","description","section"]}));var zt={ipa:(e,t)=>{let i=Pe(e,["transcription","lang","audio"]);return i.lang=ft(i.template),i.template="ipa",t.push(i),""},ipac:(e,t)=>{let i=Pe(e);return i.transcription=(i.list||[]).join(","),delete i.list,i.lang=ft(i.template),i.template="ipac",t.push(i),""},quote:(e,t)=>{let i=Pe(e,["text","author"]);if(t.push(i),i.text){let e=`"${i.text}"`;return i.author&&(e+="\n\n",e+=` - ${i.author}`),e+"\n"}return""},"cite gnis":(e,t)=>{let i=Pe(e,["id","name","type"]);return i.type="gnis",i.template="citation",t.push(i),""},"spoken wikipedia":(e,t)=>{let i=Pe(e,["file","date"]);return i.template="audio",t.push(i),""},yel:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`yellow: ${i.min||""}'`:""},subon:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub on: ${i.min||""}'`:""},suboff:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub off: ${i.min||""}'`:""},sfn:(e,t,i,a)=>{let n=Pe(e,["author","year","location"]);return a&&(n.name=n.template,n.teplate=a),t.push(n),""},redirect:(e,t)=>{let i=Pe(e,["redirect"]),a=i.list||[],n=[];for(let e=0;e{let i=Pe(e),a={};Object.keys(bt).forEach((e=>{!0===i.hasOwnProperty(e)&&(a[bt[e]]=i[e])}));let n={template:"sister project links",links:a};return t.push(n),""},"subject bar":(e,t)=>{let i=Pe(e);Object.keys(i).forEach((e=>{bt.hasOwnProperty(e)&&(i[bt[e]]=i[e],delete i[e])}));let a={template:"subject bar",links:i};return t.push(a),""},gallery:(e,t)=>{let i=Pe(e),a=(i.list||[]).filter((e=>/^ *File ?:/.test(e)));return a=a.map((e=>new j({file:e}).json())),i={template:"gallery",images:a},t.push(i),""},sky:(e,t)=>{let i=Pe(e,["asc_hours","asc_minutes","asc_seconds","dec_sign","dec_degrees","dec_minutes","dec_seconds","distance"]),a={template:"sky",ascension:{hours:i.asc_hours,minutes:i.asc_minutes,seconds:i.asc_seconds},declination:{sign:i.dec_sign,degrees:i.dec_degrees,minutes:i.dec_minutes,seconds:i.dec_seconds},distance:i.distance};return t.push(a),""},"medical cases chart":(e,t)=>{let i=["date","deathsExpr","recoveriesExpr","casesExpr","4thExpr","5thExpr","col1","col1Change","col2","col2Change"],a=Pe(e);a.data=a.data||"";let n=a.data.split("\n").map((e=>{let t=e.split(";"),a={options:new Map},n=0;for(let e=0;e{let i=Pe(e);i.x&&(i.x=i.x.split(",").map((e=>e.trim()))),i.y&&(i.y=i.y.split(",").map((e=>e.trim())));let a=1;for(;i["y"+a];)i["y"+a]=i["y"+a].split(",").map((e=>e.trim())),a+=1;return t.push(i),""},"historical populations":(e,t)=>{let i=Pe(e);i.list=i.list||[];let a=[];for(let e=0;e{const i=/^jan /i,a=/^year /i;let n=Pe(e);const r=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];let o={},s=Object.keys(n).filter((e=>i.test(e)));s=s.map((e=>e.replace(i,""))),s.forEach((e=>{o[e]=[],r.forEach((t=>{let i=`${t} ${e}`;if(n.hasOwnProperty(i)){let t=gt(n[i]);delete n[i],o[e].push(t)}}))})),n.byMonth=o;let l={};return Object.keys(n).forEach((e=>{if(a.test(e)){let t=e.replace(a,"");l[t]=n[e],delete n[e]}})),n.byYear=l,t.push(n),""},"weather box/concise c":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>gt(e))),i.byMonth={"high c":i.list.slice(0,12),"low c":i.list.slice(12,24),"rain mm":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"weather box/concise f":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>gt(e))),i.byMonth={"high f":i.list.slice(0,12),"low f":i.list.slice(12,24),"rain inch":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"climate chart":(e,t)=>{let i=Pe(e).list||[],a=i[0],n=i[38];i=i.slice(1),i=i.map((e=>(e&&"−"===e[0]&&(e=e.replace(/−/,"-")),e)));let r=[];for(let e=0;e<36;e+=3)r.push({low:gt(i[e]),high:gt(i[e+1]),precip:gt(i[e+2])});let o={template:"climate chart",data:{title:a,source:n,months:r}};return t.push(o),""}};let Ot={"find a grave":["id","name","work","last","first","date","accessdate"],congbio:["id","name","date"],"hollywood walk of fame":["name"],"wide image":["file","width","caption"],audio:["file","text","type"],rp:["page"],"short description":["description"],"coord missing":["region"],unreferenced:["date"],"taxon info":["taxon","item"],"portuguese name":["first","second","suffix"],geo:["lat","lon","zoom"],hatnote:["text"]};Ot=Object.assign(Ot,jt,_t,zt);var Et=Ot;var St={mlbplayer:{props:["number","name","il"],out:"name"},syntaxhighlight:{props:[],out:"code"},samp:{props:["1"],out:"1"},sub:{props:["text"],out:"text"},sup:{props:["text"],out:"text"},chem2:{props:["equation"],out:"equation"},ill:{props:["text","lan1","text1","lan2","text2"],out:"text"},abbr:{props:["abbr","meaning","ipa"],out:"abbr"}};let Ct={math:(e,t)=>{let i=Pe(e,["formula"]);return t.push(i),"\n\n"+(i.formula||"")+"\n\n"},legend:(e,t)=>{let i=Pe(e,["color","label"]);return t.push(i),i.label||" "},isbn:(e,t)=>{let i=Pe(e,["id","id2","id3"]);return t.push(i),"ISBN: "+(i.id||"")},"based on":(e,t)=>{let i=Pe(e,["title","author"]);return t.push(i),`${i.title} by ${i.author||""}`},"bbl to t":(e,t)=>{let i=Pe(e,["barrels"]);return t.push(i),"0"===i.barrels?i.barrels+" barrel":i.barrels+" barrels"},mpc:(e,t)=>{let i=Pe(e,["number","text"]);return t.push(i),`[https://minorplanetcenter.net/db_search/show_object?object_id=P/2011+NO1 ${i.text||i.number}]`},pengoal:(e,t)=>(t.push({template:"pengoal"}),"✅"),penmiss:(e,t)=>(t.push({template:"penmiss"}),"❌"),"ordered list":(e,t)=>{let i=Pe(e);return t.push(i),i.list=i.list||[],i.list.map(((e,t)=>`${t+1}. ${e}`)).join("\n\n")},"title year":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b[0-9]{4}\b/);if(e)return e[0]}return r.nomatch||""},"title century":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)(st|nd|rd|th)\b/);if(e)return e[1]||""}return r.nomatch||""},"title decade":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)s\b/);if(e)return e[1]||""}return r.nomatch||""},nihongo:(e,t)=>{let i=Pe(e,["english","kanji","romaji","extra"]);t.push(i);let a=i.english||i.romaji||"";return i.kanji&&(a+=` (${i.kanji})`),a},marriage:(e,t)=>{let i=Pe(e,["spouse","from","to","end"]);t.push(i);let a=i.spouse||"";return i.from&&(i.to?a+=` (m. ${i.from}-${i.to})`:a+=` (m. ${i.from})`),a},"sent off":(e,t)=>{let i=Pe(e,["cards"]),a={template:"sent off",cards:i.cards,minutes:i.list||[]};return t.push(a),"sent off: "+a.minutes.map((e=>e+"'")).join(", ")},transl:(e,t)=>{let i=Pe(e,["lang","text","text2"]);return i.text2&&(i.iso=i.text,i.text=i.text2,delete i.text2),t.push(i),i.text||""},"collapsible list":(e,t)=>{let i=Pe(e);t.push(i);let a="";if(i.title&&(a+=`'''${i.title}'''\n\n`),!i.list){i.list=[];for(let e=1;e<10;e+=1)i[e]&&(i.list.push(i[e]),delete i[e])}return i.list=i.list.filter((e=>e)),a+=i.list.join("\n\n"),a},"columns-list":(e,t)=>{let i=((Pe(e).list||[])[0]||"").split(/\n/).filter((e=>e));return i=i.map((e=>e.replace(/\*/,""))),t.push({template:"columns-list",list:i}),i=i.map((e=>"• "+e)),i.join("\n\n")},height:(e,t)=>{let i=Pe(e);t.push(i);let a=[];return["m","cm","ft","in"].forEach((e=>{!0===i.hasOwnProperty(e)&&a.push(i[e]+e)})),a.join(" ")},sic:(e,t)=>{let i=Pe(e,["one","two","three"]),a=(i.one||"")+(i.two||"");return"?"===i.one&&(a=(i.two||"")+(i.three||"")),t.push({template:"sic",word:a}),"y"===i.nolink?a:`${a} [sic]`},inrconvert:(e,t)=>{let i=Pe(e,["rupee_value","currency_formatting"]);t.push(i);const a={k:1e3,m:1e6,b:1e9,t:1e12,l:1e5,c:1e7,lc:1e12};if(i.currency_formatting){let e=a[i.currency_formatting]||1;i.rupee_value=i.rupee_value*e}return`inr ${i.rupee_value||""}`},frac:(e,t)=>{let i=Pe(e,["a","b","c"]),a={template:"sfrac"};return i.c?(a.integer=i.a,a.numerator=i.b,a.denominator=i.c):i.b?(a.numerator=i.a,a.denominator=i.b):(a.numerator=1,a.denominator=i.a),t.push(a),a.integer?`${a.integer} ${a.numerator}⁄${a.denominator}`:`${a.numerator}⁄${a.denominator}`},"winning percentage":(e,t)=>{let i=Pe(e,["wins","losses","ties"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=Number(i.ties)||0,o=a+n+r;"y"===i.ignore_ties&&(r=0),r&&(a+=r/2);let s=ht({numerator:a,denominator:o,decimals:1});return null===s?"":"."+10*s},winlosspct:(e,t)=>{let i=Pe(e,["wins","losses"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=ht({numerator:a,denominator:a+n,decimals:1});return null===r?"":`${a||0} || ${n||0} || ${"."+10*r||"-"}`},"video game release":(e,t)=>{let i=["region","date","region2","date2","region3","date3","region4","date4"],a=Pe(e,i),n={template:"video game release",releases:[]};for(let e=0;e`${e.region}: ${e.date||""}`)).join("\n\n")+"\n"},uss:(e,t)=>{let i=Pe(e,["name","id"]);return t.push(i),i.id?`[[USS ${i.name} (${i.id})|USS ''${i.name}'' (${i.id})]]`:`[[USS ${i.name}|USS ''${i.name}'']]`},blockquote:(e,t)=>{let i=Pe(e,["text","author","title","source","character"]);t.push(i);let a=i.text;a||(i.list=i.list||[],a=i.list[0]||"");let n=a.replace(/"/g,"'");return n='"'+n+'"',n}};const qt={"£":"GB£","¥":"¥","৳":"৳","₩":"₩","€":"€","₱":"₱","₹":"₹","₽":"₽","cn¥":"CN¥","gb£":"GB£","india rs":"₹","indian rupee symbol":"₹","indian rupee":"₹","indian rupees":"₹","philippine peso":"₱","russian ruble":"₽","SK won":"₩","turkish lira":"TRY",a$:"A$",au$:"A$",aud:"A$",bdt:"BDT",brl:"BRL",ca$:"CA$",cad:"CA$",chf:"CHF",cny:"CN¥",czk:"czk",dkk:"dkk",dkk2:"dkk",euro:"€",gbp:"GB£",hk$:"HK$",hkd:"HK$",ils:"ILS",inr:"₹",jpy:"¥",myr:"MYR",nis:"ILS",nok:"NOK",nok2:"NOK",nz$:"NZ$",nzd:"NZ$",peso:"peso",pkr:"₨",r$:"BRL",rmb:"CN¥",rub:"₽",ruble:"₽",rupee:"₹",s$:"sgd",sek:"SEK",sek2:"SEK",sfr:"CHF",sgd:"sgd",shekel:"ILS",sheqel:"ILS",ttd:"TTD",us$:"US$",usd:"US$",yen:"¥",zar:"R"},Nt=(e,t)=>{let i=Pe(e,["amount","code"]);t.push(i);let a=i.template||"";"currency"===a?(a=i.code,a||(i.code=a="usd")):""!==a&&"monnaie"!==a&&"unité"!==a&&"nombre"!==a&&"nb"!==a||(a=i.code),a=(a||"").toLowerCase(),"us"===a?i.code=a="usd":"uk"===a&&(i.code=a="gbp");let n=`${qt[a]||""}${i.amount||""}`;return i.code&&!qt[i.code.toLowerCase()]&&(n+=" "+i.code),n};let Lt={currency:Nt};Object.keys(qt).forEach((e=>{Lt[e]=Nt}));const Pt=function(e){let t=e%10,i=e%100;return 1===t&&11!==i?e+"st":2===t&&12!==i?e+"nd":3===t&&13!==i?e+"rd":e+"th"},At=864e5,Tt=30*At,Dt=365*At,It=function(e){return new Date(`${e.year}-${e.month||0}-${e.date||1}`).getTime()},Mt=function(e,t){e=It(e);let i=(t=It(t))-e,a={},n=Math.floor(i/Dt);n>0&&(a.years=n,i-=a.years*Dt);let r=Math.floor(i/Tt);r>0&&(a.months=r,i-=a.months*Tt);let o=Math.floor(i/At);return o>0&&(a.days=o),a},Rt=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ut=[void 0,"January","February","March","April","May","June","July","August","September","October","November","December"],Bt=Ut.reduce(((e,t,i)=>(0===i||(e[t.toLowerCase()]=i),e)),{}),Ft=function(e){let t={},i=["year","month","date","hour","minute","second"];for(let a=0;a{let i=Pe(e,["year","month","date","hour","minute","second","timezone"]),a=Ft([i.year,i.month,i.date||i.day]);return i.text=Wt(a),i.timezone&&("Z"===i.timezone&&(i.timezone="UTC"),i.text+=` (${i.timezone})`),i.hour&&i.minute&&(i.second?i.text=`${i.hour}:${i.minute}:${i.second}, `+i.text:i.text=`${i.hour}:${i.minute}, `+i.text),i.text&&t.push(Zt(i)),i.text},natural_date:(e,t)=>{let i=Pe(e,["text"]).text||"",a={};if(/^[0-9]{4}$/.test(i))a.year=parseInt(i,10);else{let e=i.replace(/[a-z]+\/[a-z]+/i,"");e=e.replace(/[0-9]+:[0-9]+(am|pm)?/i,"");let t=new Date(e);!1===isNaN(t.getTime())&&(a.year=t.getFullYear(),a.month=t.getMonth()+1,a.date=t.getDate())}return t.push(Zt(a)),i.trim()},one_year:(e,t)=>{let i=Pe(e,["year"]),a=Number(i.year);return t.push(Zt({year:a})),String(a)},two_dates:(e,t)=>{let i=Pe(e,["b","birth_year","birth_month","birth_date","death_year","death_month","death_date"]);if(i.b&&"b"===i.b.toLowerCase()){let e=Ft([i.birth_year,i.birth_month,i.birth_date]);return t.push(Zt(e)),Wt(e)}let a=Ft([i.death_year,i.death_month,i.death_date]);return t.push(Zt(a)),Wt(a)},age:e=>{let t=Ht(e);return Mt(t.from,t.to).years||0},"diff-y":e=>{let t=Ht(e),i=Mt(t.from,t.to);return 1===i.years?i.years+" year":(i.years||0)+" years"},"diff-ym":e=>{let t=Ht(e),i=Mt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),a.join(", ")},"diff-ymd":e=>{let t=Ht(e),i=Mt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-yd":e=>{let t=Ht(e),i=Mt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-d":e=>{let t=Ht(e),i=Mt(t.from,t.to),a=[];return i.days+=365*(i.years||0),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")}},Gt=["January","February","March","April","May","June","July","August","September","October","November","December"];var Vt={currentday:()=>{let e=new Date;return String(e.getDate())},currentdayname:()=>{let e=new Date;return Rt[e.getDay()]},currentmonth:()=>{let e=new Date;return Gt[e.getMonth()]},currentyear:()=>{let e=new Date;return String(e.getFullYear())},monthyear:()=>{let e=new Date;return Gt[e.getMonth()]+" "+e.getFullYear()},"monthyear-1":()=>{let e=new Date;return e.setMonth(e.getMonth()-1),Gt[e.getMonth()]+" "+e.getFullYear()},"monthyear+1":()=>{let e=new Date;return e.setMonth(e.getMonth()+1),Gt[e.getMonth()]+" "+e.getFullYear()},"time ago":e=>function(e){let t=new Date(e);if(isNaN(t.getTime()))return"";let i=(new Date).getTime()-t.getTime(),a="ago";i<0&&(a="from now",i=Math.abs(i));let n=i/1e3/60/60/24;return n<365?Number(n)+" days "+a:Number(n/365)+" years "+a}(Pe(e,["date","fmt"]).date),"birth date and age":(e,t)=>{let i=Pe(e,["year","month","day"]);return i.year&&/[a-z]/i.test(i.year)?Yt.natural_date(e,t):(t.push(i),i=Ft([i.year,i.month,i.day]),Wt(i))},"birth year and age":(e,t)=>{let i=Pe(e,["birth_year","birth_month"]);if(i.death_year&&/[a-z]/i.test(i.death_year))return Yt.natural_date(e,t);t.push(i);let a=(new Date).getFullYear()-parseInt(i.birth_year,10);i=Ft([i.birth_year,i.birth_month]);let n=Wt(i);return a&&(n+=` (age ${a})`),n},"death year and age":(e,t)=>{let i=Pe(e,["death_year","birth_year","death_month"]);return i.death_year&&/[a-z]/i.test(i.death_year)?Yt.natural_date(e,t):(t.push(i),i=Ft([i.death_year,i.death_month]),Wt(i))},"birth date and age2":(e,t)=>{let i=Pe(e,["at_year","at_month","at_day","birth_year","birth_month","birth_day"]);return t.push(i),i=Ft([i.birth_year,i.birth_month,i.birth_day]),Wt(i)},"birth based on age as of date":(e,t)=>{let i=Pe(e,["age","year","month","day"]);t.push(i);let a=parseInt(i.age,10),n=parseInt(i.year,10)-a;return n&&a?`${n} (age ${i.age})`:`(age ${i.age})`},"death date and given age":(e,t)=>{let i=Pe(e,["year","month","day","age"]);t.push(i),i=Ft([i.year,i.month,i.day]);let a=Wt(i);return i.age&&(a+=` (age ${i.age})`),a},dts:e=>{e=(e=e.replace(/\|format=[ymd]+/i,"")).replace(/\|abbr=(on|off)/i,"");let t=Pe(e,["year","month","date","bc"]);return t.date&&t.month&&t.year?!0===/[a-z]/.test(t.month)?[t.month,t.date,t.year].join(" "):[t.year,t.month,t.date].join("-"):t.month&&t.year?[t.year,t.month].join("-"):t.year?(t.year<0&&(t.year=Math.abs(t.year)+" BC"),t.year):""},time:()=>{let e=new Date,t=Ft([e.getFullYear(),e.getMonth(),e.getDate()]);return Wt(t)},millennium:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/1e3)+1,t.abbr&&"y"===t.abbr?i<0?`${Pt(Math.abs(i))} BC`:`${Pt(i)}`:`${Pt(i)} millennium`},start:Yt.date,"start-date":Yt.natural_date,birthdeathage:Yt.two_dates,age:Yt.age,"age nts":Yt.age,"age in years":Yt["diff-y"],"age in years and months":Yt["diff-ym"],"age in years, months and days":Yt["diff-ymd"],"age in years and days":Yt["diff-yd"],"age in days":Yt["diff-d"]};function Jt(e){let t=e.pop(),i=Number(e[0]||0),a=Number(e[1]||0),n=Number(e[2]||0);if("string"!=typeof t||isNaN(i))return null;let r=1;return/[SW]/i.test(t)&&(r=-1),r*(i+a/60+n/3600)}const Xt=function(e){if("number"!=typeof e)return e;let t=1e5;return Math.round(e*t)/t},Qt={s:!0,w:!0},ei=function(e){let t=Pe(e);t=function(e){return e.list=e.list||[],e.list=e.list.map((t=>{let i=Number(t);if(!isNaN(i))return i;let a=t.split(/:/);return a.length>1?(e.props=e.props||{},e.props[a[0]]=a.slice(1).join(":"),null):t})),e.list=e.list.filter((e=>null!==e)),e}(t);let i=function(e){const t=e.map((e=>typeof e)).join("|");return 2===e.length&&"number|number"===t?{lat:e[0],lon:e[1]}:4===e.length&&"number|string|number|string"===t?(Qt[e[1].toLowerCase()]&&(e[0]*=-1),"w"===e[3].toLowerCase()&&(e[2]*=-1),{lat:e[0],lon:e[2]}):6===e.length?{lat:Jt(e.slice(0,3)),lon:Jt(e.slice(3))}:8===e.length?{lat:Jt(e.slice(0,4)),lon:Jt(e.slice(4))}:{}}(t.list);return t.lat=Xt(i.lat),t.lon=Xt(i.lon),t.template="coord",delete t.list,t},ti={coord:(e,t)=>{let i=ei(e);return t.push(i),i.display&&-1===i.display.indexOf("inline")?"":`${i.lat||""}°N, ${i.lon||""}°W`}},ii=function(e,t,i,a){let n=Pe(e);return a&&(n.name=n.template,n.template=a),t.push(n),""},ai={persondata:ii,taxobox:ii,citation:ii,portal:ii,reflist:ii,"cite book":ii,"cite journal":ii,"cite web":ii,"commons cat":ii,"election box candidate":ii,"election box begin":ii,main:ii},ni={adx:"adx",aim:"aim",amex:"amex",asx:"asx",athex:"athex",b3:"b3","B3 (stock exchange)":"B3 (stock exchange)",barbadosse:"barbadosse",bbv:"bbv",bcba:"bcba",bcs:"bcs",bhse:"bhse",bist:"bist",bit:"bit","bm&f bovespa":"b3","bm&f":"b3",bmad:"bmad",bmv:"bmv","bombay stock exchange":"bombay stock exchange","botswana stock exchange":"botswana stock exchange",bpse:"bpse",bse:"bse",bsx:"bsx",bvb:"bvb",bvc:"bvc",bvl:"bvl",bvpasa:"bvpasa",bwse:"bwse","canadian securities exchange":"canadian securities exchange",cse:"cse",darse:"darse",dfm:"dfm",dse:"dse",euronext:"euronext",euronextparis:"euronextparis",fse:"fse",fwb:"fwb",gse:"gse",gtsm:"gtsm",idx:"idx",ise:"ise",iseq:"iseq",isin:"isin",jasdaq:"jasdaq",jse:"jse",kase:"kase",kn:"kn",krx:"krx",lse:"lse",luxse:"luxse","malta stock exchange":"malta stock exchange",mai:"mai",mcx:"mcx",mutf:"mutf",myx:"myx",nag:"nag","nasdaq dubai":"nasdaq dubai",nasdaq:"nasdaq",neeq:"neeq",nepse:"nepse",nex:"nex",nse:"nse",newconnect:"newconnect","nyse arca":"nyse arca",nyse:"nyse",nzx:"nzx","omx baltic":"omx baltic",omx:"omx",ose:"ose","otc expert":"otc expert","otc grey":"otc grey","otc pink":"otc pink",otcqb:"otcqb",otcqx:"otcqx","pfts ukraine stock exchange":"pfts ukraine stock exchange","philippine stock exchange":"philippine stock exchange",prse:"prse",psx:"psx",karse:"karse",qe:"qe","saudi stock exchange":"saudi stock exchange",sehk:"sehk","Stock Exchange of Thailand":"Stock Exchange of Thailand",set:"set",sgx:"sgx",sse:"sse",swx:"swx",szse:"szse",tase:"tase","tsx-v":"tsx-v",tsx:"tsx",tsxv:"tsxv",ttse:"ttse",twse:"twse",tyo:"tyo",wbag:"wbag",wse:"wse","zagreb stock exchange":"zagreb stock exchange","zimbabwe stock exchange":"zimbabwe stock exchange",zse:"zse"},ri=(e,t)=>{let i=Pe(e,["ticketnumber","code"]);t.push(i);let a=i.template||"";""===a&&(a=i.code),a=(a||"").toLowerCase();let n=ni[a]||"";return i.ticketnumber&&(n=`${n}: ${i.ticketnumber}`),i.code&&!ni[i.code.toLowerCase()]&&(n+=" "+i.code),n},oi={};Object.keys(ni).forEach((e=>{oi[e]=ri}));const si=function(e){return 1===(e=String(e)).length&&(e="0"+e),e},li=function(e,t,i){e[`rd${t}-team${si(i)}`]&&(i=si(i));let a=e[`rd${t}-score${i}`],n=Number(a);return!1===isNaN(n)&&(a=n),{team:e[`rd${t}-team${i}`],score:a,seed:e[`rd${t}-seed${i}`]}},ci=function(e){let t=[],i=Pe(e);for(let e=1;e<7;e+=1){let a=[];for(let t=1;t<16;t+=2){let n=`rd${e}-team`;if(!i[n+t]&&!i[n+si(t)])break;{let n=li(i,e,t),r=li(i,e,t+1);a.push([n,r])}}a.length>0&&t.push(a)}return{template:"playoffbracket",rounds:t}};let ui={"4teambracket":function(e,t){let i=ci(e);return t.push(i),""},player:(e,t)=>{let i=Pe(e,["number","country","name","dl"]);t.push(i);let a=`[[${i.name}]]`;if(i.country){let e=(i.country||"").toLowerCase(),t=yt.find((t=>e===t[1]||e===t[2]))||[];t&&t[0]&&(a=t[0]+" "+a)}return i.number&&(a=i.number+" "+a),a},goal:(e,t)=>{let i={template:"goal",data:[]},a=Pe(e).list||[];for(let e=0;e{let t=e.note;return t&&(t=` (${t})`),e.min+"'"+t})).join(", "),n},"sports table":(e,t)=>{let i=Pe(e),a={};Object.keys(i).filter((e=>/^team[0-9]/.test(e))).map((e=>i[e].toLowerCase())).forEach((e=>{a[e]={name:i[`name_${e}`],win:Number(i[`win_${e}`])||0,loss:Number(i[`loss_${e}`])||0,tie:Number(i[`tie_${e}`])||0,otloss:Number(i[`otloss_${e}`])||0,goals_for:Number(i[`gf_${e}`])||0,goals_against:Number(i[`ga_${e}`])||0}}));let n={date:i.update,header:i.table_header,teams:a};t.push(n)}};var pi=Object.assign({},St,Ct,Lt,Vt,ti,ai,oi,ci,ui);let mi=Object.assign({},vt,Et,pi);Object.keys(pt).forEach((e=>{mi[e]=mi[pt[e]]}));const di=["0","1","2","3","4","5","6","7","8","9"],hi=function(e,t){let i=e.name;if(!0===nt.hasOwnProperty(i))return[""];if(!0===function(e){return!0===rt.hasOwnProperty(e)||!!ot.test(e)||!(!st.test(e)&&!lt.test(e))||!!ct.test(e)}(i)){let t=Pe(e.body,[],"raw");return["",ut(t)]}if(!0===/^cite [a-z]/.test(i)){let t=Pe(e.body);return t.type=t.template,t.template="citation",["",t]}if(!0===mi.hasOwnProperty(i)){if("number"==typeof mi[i]){return[Pe(e.body,di)[String(mi[i])]||""]}if("string"==typeof mi[i])return[mi[i]];if(!0===r(mi[i])){return["",Pe(e.body,mi[i])]}if(!0===((a=mi[i])&&"[object Object]"===Object.prototype.toString.call(a))){let t=Pe(e.body,mi[i].props);return[t[mi[i].out],t]}if("function"==typeof mi[i]){let a=[];return[mi[i](e.body,a,Pe,null,t),a[0]]}}var a;let n=Pe(e.body);return 0===Object.keys(n).length&&(n=null),["",n]},gi=(e="")=>(e=(e=e.toLowerCase()).replace(/[-_]/g," ")).trim(),fi=function(e,t){this._type=e.type,this.domain=e.domain,Object.defineProperty(this,"data",{enumerable:!1,value:e.data}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},ki={type:function(){return this._type},links:function(e){let t=[];if(Object.keys(this.data).forEach((e=>{this.data[e].links().forEach((e=>t.push(e)))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},image:function(){let e=this.data.image||this.data.image2||this.data.logo||this.data.image_skyline||this.data.image_flag;if(!e)return null;let t=e.json(),i=t.text;return t.file=i,t.text="",t.caption=this.data.caption,t.domain=this.domain,new j(t)},get:function(e){let t=Object.keys(this.data);if("string"==typeof e){let i=gi(e);for(let e=0;e{for(let i=0;i(e.data[i]&&(t[i]=e.data[i].json()),t)),{});return!0===t.encode&&(i=K(i)),i}(this,e=e||{})},wikitext:function(){return this.wiki||""},keyValue:function(){return Object.keys(this.data).reduce(((e,t)=>(this.data[t]&&(e[t]=this.data[t].text()),e)),{})}};Object.keys(ki).forEach((e=>{fi.prototype[e]=ki[e]})),fi.prototype.data=fi.prototype.keyValue,fi.prototype.template=fi.prototype.type,fi.prototype.images=fi.prototype.image;const bi=function(e,t){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},wi={title:function(){let e=this.data;return e.title||e.encyclopedia||e.author||""},links:function(e){let t=[];if("number"==typeof e)return t[e];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},text:function(){return""},wikitext:function(){return this.wiki||""},json:function(e={}){let t=this.data||{};return!0===e.encode&&(t=Object.assign({},t),t=K(t)),t}};Object.keys(wi).forEach((e=>{bi.prototype[e]=wi[e]}));const yi={text:function(){return oe(this._text||"").text()},json:function(){return this.data||{}},wikitext:function(){return this.wiki||""}},$i=function(e,t="",i=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_text",{enumerable:!1,value:t}),Object.defineProperty(this,"wiki",{enumerable:!1,value:i})};Object.keys(yi).forEach((e=>{$i.prototype[e]=yi[e]}));const xi=/^(cite |citation)/i,vi={citation:!0,refn:!0,harvnb:!0,source:!0},ji=function(e,t){let{list:i,wiki:a}=function(e,t){let i=[],a=at(e);const n=function(a,r){a.parent=r,a.children&&a.children.length>0&&a.children.forEach((e=>n(e,a)));let[o,s]=hi(a,t);a.wiki=o,s&&i.push({name:a.name,wiki:a.body,nested:Boolean(a.parent),text:o,json:s});const l=function(e,t,i){e.parent&&(e.parent.body=e.parent.body.replace(t,i),l(e.parent,t,i))};l(a,a.body,a.wiki),e=e.replace(a.body,a.wiki)};return a.forEach((e=>n(e,null))),a.forEach((t=>{e=e.replace(t.body,t.wiki)})),{list:i,wiki:e}}(e._wiki,t),n=t?t._domain:null,{infoboxes:r,references:o,templates:s}=function(e,t){let i={infoboxes:[],templates:[],references:[]};return e.forEach((e=>{let a=e.json,n=a.template||a.type||a.name;if(!0!==vi[n]&&!0!==xi.test(n))return"infobox"!==a.template||"yes"===a.subbox||e.nested?void i.templates.push(new $i(a,e.text,e.wiki)):(a.domain=t,a.data=a.data||{},void i.infoboxes.push(new fi(a,e.wiki)));i.references.push(new bi(a,e.wiki))})),i}(i,n);e._infoboxes=e._infoboxes||[],e._references=e._references||[],e._templates=e._templates||[],e._infoboxes=e._infoboxes.concat(r),e._references=e._references.concat(o),e._templates=e._templates.concat(s),e._wiki=a},_i=function(e){return/^ *\{\{ *(cite|citation)/i.test(e)&&/\}\} *$/.test(e)&&!1===/citation needed/i.test(e)},zi=function(e){let t=Pe(e);return t.type=t.template.replace(/cite /,""),t.template="citation",t},Oi=function(e){return{template:"citation",type:"inline",data:{},inline:oe(e)||{}}},Ei=function(e){let t=[],i=e._wiki;i=i.replace(/ ?([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(_i(a)){let n=zi(a);n&&t.push({json:n,wiki:e}),i=i.replace(a,"")}else t.push({json:Oi(a),wiki:e});return" "})),i=i.replace(/ ?]{0,200}?\/> ?/gi," "),i=i.replace(/ ?]{0,200}>([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(_i(a)){let e=zi(a);e&&t.push({json:e,wiki:a}),i=i.replace(a,"")}else t.push({json:Oi(a),wiki:e});return" "})),i=i.replace(/ ?<[ /]?[a-z0-9]{1,8}[a-z0-9=" ]{2,20}[ /]?> ?/g," "),e._references=t.map((e=>new bi(e.json,e.wiki))),e._wiki=i},Si={coach:["team","year","g","w","l","w-l%","finish","pg","pw","pl","pw-l%"],player:["year","team","gp","gs","mpg","fg%","3p%","ft%","rpg","apg","spg","bpg","ppg"],roster:["player","gp","gs","mpg","fg%","3fg%","ft%","rpg","apg","spg","bpg","ppg"]};let Ci=["res","record","opponent","method","event","date","round","time","location","notes"];const qi=function(e,t){const i={templates:[],text:e._wiki};var a;return(a=i).text=a.text.replace(/\{\{election box begin([\s\S]+?)\{\{election box end\}\}/gi,(e=>{let t={_wiki:e,_templates:[]};ji(t);let i=t._templates.map((e=>e.json())),n=i.find((e=>"election box"===e.template))||{},r=i.filter((e=>"election box candidate"===e.template)),o=i.find((e=>"election box gain"===e.template||"election box hold"===e.template))||{};return(r.length>0||o)&&a.templates.push({template:"election box",title:n.title,candidates:r,summary:o.data}),""})),function(e,t,i){e.text=e.text.replace(/]*)>([\s\S]+)<\/gallery>/g,((a,n,r)=>{let o=r.split(/\n/g);return o=o.filter((e=>e&&""!==e.trim())),o=o.map((e=>{let i=e.split(/\|/),a={file:i[0].trim(),lang:t.lang(),domain:t.domain()},n=new j(a).json(),r=i.slice(1).join("|");return""!==r&&(n.caption=oe(r)),n})),o.length>0&&e.templates.push({template:"gallery",images:o,pos:i.title}),""}))}(i,t,e),function(e){e.text=e.text.replace(/]*)>([\s\S]+)<\/math>/g,((t,i,a)=>{let n=oe(a).text();return e.templates.push({template:"math",formula:n,raw:a}),n&&n.length<12?n:""})),e.text=e.text.replace(/]*)>([\s\S]+?)<\/chem>/g,((t,i,a)=>(e.templates.push({template:"chem",data:a}),"")))}(i),function(e){e.text=e.text.replace(/\{\{mlb game log /gi,"{{game log "),e.text=e.text.replace(/\{\{game log (section|month)[\s\S]+?\{\{game log (section|month) end\}\}/gi,(t=>{let i=function(e){let t=["#","date","opponent","score","win","loss","save","attendance","record"];return!0===/\|stadium=y/i.test(e)&&t.splice(7,0,"stadium"),!0===/\|time=y/i.test(e)&&t.splice(7,0,"time"),!0===/\|box=y/i.test(e)&&t.push("box"),t}(t);t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{game log (section|month) end\}\}/i,"");let a="! "+i.join(" !! "),n=ge("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mlb game log section",data:n}),""}))}(i),function(e){e.text=e.text.replace(/\{\{mma record start[\s\S]+?\{\{end\}\}/gi,(t=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{end\}\}/i,"");let i="! "+Ci.join(" !! "),a=ge("{|\n"+i+"\n"+t+"\n|}");return a=a.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mma record start",data:a}),""}))}(i),function(e){e.text=e.text.replace(/\{\{nba (coach|player|roster) statistics start([\s\S]+?)\{\{s-end\}\}/gi,((t,i)=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{s-end\}\}/,""),i=i.toLowerCase().trim();let a="! "+Si[i].join(" !! "),n=ge("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"NBA "+i+" statistics",data:n}),""}))}(i),i.templates=i.templates.map((e=>new $i(e))),i},Ni={tables:!0,references:!0,paragraphs:!0,templates:!0,infoboxes:!0};class Li{constructor(e,t){let i={doc:t,title:e.title||"",depth:e.depth,wiki:e.wiki||"",templates:[],tables:[],infoboxes:[],references:[],paragraphs:[]};Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})}));const a=qi(this,t);this._wiki=a.text,this._templates=this._templates.concat(a.templates),Ei(this),ji(this,t),function(e){let t=[],i=e._wiki,a=i.split("\n"),n=[];for(let e=0;e0&&(n[n.length-1]+="\n"+a[e]);else{n[n.length-1]+="\n"+a[e];let i=n.pop();t.push(i)}else n.push(a[e]);let r=[];t.forEach((e=>{if(e){i=i.replace(e+"\n",""),i=i.replace(e,"");let t=ge(e);t&&t.length>0&&r.push(new be(t,e))}})),r.length>0&&(e._tables=r),e._wiki=i}(this),Ve(this,t)}title(){return this._title||""}index(){if(!this._doc)return null;let e=this._doc.sections().indexOf(this);return-1===e?null:e}depth(){return this._depth}indentation(){return this.depth()}sentences(){return this.paragraphs().reduce(((e,t)=>e.concat(t.sentences())),[])}paragraphs(){return this._paragraphs||[]}links(e){let t=[];if(this.infoboxes().forEach((e=>{t.push(e.links())})),this.sentences().forEach((e=>{t.push(e.links())})),this.tables().forEach((e=>{t.push(e.links())})),this.lists().forEach((e=>{t.push(e.links())})),t=t.reduce(((e,t)=>e.concat(t)),[]).filter((e=>void 0!==e)),"string"==typeof e){let i=t.find((t=>t.page().toLowerCase()===e.toLowerCase()));return void 0===i?[]:[i]}return t}tables(){return this._tables||[]}templates(e){let t=this._templates||[];return"string"==typeof e?(e=e.toLowerCase(),t.filter((t=>t.data.template===e||t.data.name===e))):t}infoboxes(e){let t=this._infoboxes||[];return"string"==typeof e?(e=(e=e.replace(/^infobox /i,"")).trim().toLowerCase(),t.filter((t=>t._type===e))):t}coordinates(){return[...this.templates("coord"),...this.templates("coor")].map((e=>e.json()))}lists(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.lists())})),e}interwiki(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.interwiki())})),e}images(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.images())})),e}references(){return this._references||[]}remove(){if(!this._doc)return null;let e={};e[this.title()]=!0,this.children().forEach((t=>e[t.title()]=!0));let t=this._doc.sections();return t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),this._doc._sections=t,this._doc}nextSibling(){if(!this._doc)return null;let e=this._doc.sections();for(let t=(this.index()||0)+1;tthis.depth())for(let e=i+1;ethis.depth();e+=1)a.push(t[e]);return"string"==typeof e?a.find((t=>t.title().toLowerCase()===e.toLowerCase())):a}sections(e){return this.children(e)}parent(){if(!this._doc)return null;let e=this._doc.sections();for(let t=this.index()||0;t>=0;t-=1)if(e[t]&&e[t].depth()t.text(e))).join("\n\n")}wikitext(){return this._wiki}json(e){return function(e,t){let i={};if(!0===(t=p(t,W)).headers&&(i.title=e.title()),!0===t.depth&&(i.depth=e.depth()),!0===t.paragraphs){let a=e.paragraphs().map((e=>e.json(t)));a.length>0&&(i.paragraphs=a)}if(!0===t.images){let a=e.images().map((e=>e.json(t)));a.length>0&&(i.images=a)}if(!0===t.tables){let a=e.tables().map((e=>e.json(t)));a.length>0&&(i.tables=a)}if(!0===t.templates){let a=e.templates().map((e=>e.json()));a.length>0&&(i.templates=a,!0===t.encode&&i.templates.forEach((e=>K(e))))}if(!0===t.infoboxes){let a=e.infoboxes().map((e=>e.json(t)));a.length>0&&(i.infoboxes=a)}if(!0===t.lists){let a=e.lists().map((e=>e.json(t)));a.length>0&&(i.lists=a)}if(!0===t.references||!0===t.citations){let a=e.references().map((e=>e.json(t)));a.length>0&&(i.references=a)}return!0===t.sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,Ni))}}Li.prototype.citations=Li.prototype.references;const Pi={sentences:"sentence",paragraphs:"paragraph",links:"link",tables:"table",templates:"template",infoboxes:"infobox",coordinates:"coordinate",lists:"list",images:"image",references:"reference",citations:"citation"};Object.keys(Pi).forEach((e=>{let t=Pi[e];Li.prototype[t]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]||null}}));const Ai=/^(={1,6})(.{1,200}?)={1,6}$/,Ti=/\{\{.+?\}\}/,Di=function(e,t){let i=t.match(Ai);if(!i)return e.title="",e.depth=0,e;let a=i[2]||"";var r;a=oe(a).text(),Ti.test(a)&&(at(r=a).forEach((e=>{let[t]=hi(e);r=r.replace(e.body,t)})),a=r);let o={_wiki:a};Ei(o),a=o._wiki,a=n(a);let s=0;return i[1]&&(s=i[1].length-2),e.title=a,e.depth=s,e},Ii=new RegExp("^("+["references","reference","einzelnachweise","referencias","références","notes et références","脚注","referenser","bronnen","примечания"].join("|")+"):?","i"),Mi=/(?:\n|^)(={2,6}.{1,200}?={2,6})/g,Ri=function(e){let t=[],i=e._wiki.split(Mi);for(let a=0;a!0!==Ii.test(t.title())||t.paragraphs().length>0||t.templates().length>0||(e[i+1]&&e[i+1].depth()>t.depth()&&(e[i+1]._depth-=1),!1)))}(t)},Ui=new RegExp("\\[\\[:?("+d.join("|")+"):(.{2,178}?)]](w{0,10})","gi"),Bi=new RegExp("^\\[\\[:?("+d.join("|")+"):","gi"),Fi=function(e){const t=[];let i=e.match(Ui);i&&i.forEach((function(e){(e=(e=(e=e.replace(Bi,"")).replace(/\|?[ *]?\]\]$/,"")).replace(/\|.*/,""))&&!e.match(/[[\]]/)&&t.push(e.trim())}));const a=e.replace(Ui,"");return[t,a]},Ki={tables:!0,lists:!0,paragraphs:!0};class Wi{constructor(e,t){let i={pageID:(t=t||{}).pageID||t.id||null,namespace:t.namespace||t.ns||null,lang:t.lang||t.language||null,domain:t.domain||null,title:t.title||null,type:"page",redirectTo:null,wikidata:t.wikidata||null,wiki:e||"",categories:[],sections:[],coordinates:[],userAgent:t.userAgent||t["User-Agent"]||t["Api-User-Agent"]||"User of the wtf_wikipedia library"};if(Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})})),!0===function(e){return!(!e||e.length>500)&&T.test(e)}(this._wiki)){this._type="redirect",this._redirectTo=function(e){let t=e.match(T);if(t&&t[2])return(A(t[2])||[])[0];return{}}(this._wiki);const[e,t]=Fi(this._wiki);return this._categories=e,void(this._wiki=t)}this._wiki=U(this._wiki);const[a,n]=Fi(this._wiki);this._categories=a,this._wiki=n,this._sections=Ri(this)}title(e){if(void 0!==e)return this._title=e,e;if(this._title)return this._title;let t=null,i=this.sentences()[0];return i&&(t=i.bold()),t}pageID(e){return void 0!==e&&(this._pageID=e),this._pageID||null}wikidata(e){return void 0!==e&&(this._wikidata=e),this._wikidata||null}domain(e){return void 0!==e&&(this._domain=e),this._domain||null}language(e){return void 0!==e&&(this._lang=e),this._lang||null}url(){let e=this.title();if(!e)return null;let t=this.language()||"en",i=this.domain()||"wikipedia.org";return e=e.replace(/ /g,"_"),e=encodeURIComponent(e),`https://${t}.${i}/wiki/${e}`}namespace(e){return void 0!==e&&(this._namespace=e),this._namespace||null}isRedirect(){return"redirect"===this._type}redirectTo(){return this._redirectTo}isDisambiguation(){return function(e){let t=e.templates().map((e=>e.json()));if(t.find((e=>k.hasOwnProperty(e.template)||$.hasOwnProperty(e.template))))return!0;let i=e.title();return!(!i||!0!==y.test(i))||!t.find((e=>w.hasOwnProperty(e.template)))&&(!0===x(e.sentence(0))||!0===x(e.sentence(1)))}(this)}categories(e){let t=this._categories||[];return"number"==typeof e?[t[e]]:t}sections(e){let t=this._sections||[];if(t.forEach((e=>{e._doc=this})),"string"==typeof e){let i=e.toLowerCase().trim();return t.filter((e=>e.title().toLowerCase()===i))}return"number"==typeof e?[t[e]]:t}paragraphs(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.paragraphs())})),"number"==typeof e?[t[e]]:t}sentences(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.sentences())})),"number"==typeof e?[t[e]]:t}images(e){let t=u(this,"images",null);return this.infoboxes().forEach((e=>{let i=e.image();i&&t.unshift(i)})),this.templates().forEach((e=>{"gallery"===e.data.template&&(e.data.images=e.data.images||[],e.data.images.forEach((e=>{e instanceof j||(e.language=this.language(),e.domain=this.domain(),e=new j(e)),t.push(e)})))})),"number"==typeof e?[t[e]]:t}links(e){return u(this,"links",e)}interwiki(e){return u(this,"interwiki",e)}lists(e){return u(this,"lists",e)}tables(e){return u(this,"tables",e)}templates(e){return u(this,"templates",e)}references(e){return u(this,"references",e)}citations(e){return this.references(e)}coordinates(e){return u(this,"coordinates",e)}infoboxes(e){let t=u(this,"infoboxes",e);return t=t.sort(((e,t)=>Object.keys(e.data).length>Object.keys(t.data).length?-1:1)),t}text(e){if(e=p(e,Ki),!0===this.isRedirect())return"";return this.sections().map((t=>t.text(e))).join("\n\n")}json(e){return function(e,t){let i={};return(t=p(t,m)).title&&(i.title=e.title()),t.pageID&&(i.pageID=e.pageID()),t.categories&&(i.categories=e.categories()),t.sections&&(i.sections=e.sections().map((e=>e.json(t)))),!0===e.isRedirect()&&(i.isRedirect=!0,i.redirectTo=e.redirectTo(),i.sections=[]),t.coordinates&&(i.coordinates=e.coordinates()),t.infoboxes&&(i.infoboxes=e.infoboxes().map((e=>e.json(t)))),t.images&&(i.images=e.images().map((e=>e.json(t)))),t.plaintext&&(i.plaintext=e.text(t)),(t.citations||t.references)&&(i.references=e.references()),i}(this,e=p(e,Ki))}wikitext(){return this._wiki||""}debug(){return console.log("\n"),this.sections().forEach((e=>{let t=" - ";for(let i=0;i{let t=Zi[e];Wi.prototype[t]=function(t){return this[e](t)[0]||null}})),Wi.prototype.lang=Wi.prototype.language,Wi.prototype.ns=Wi.prototype.namespace,Wi.prototype.plaintext=Wi.prototype.text,Wi.prototype.isDisambig=Wi.prototype.isDisambiguation,Wi.prototype.citations=Wi.prototype.references,Wi.prototype.redirectsTo=Wi.prototype.redirectTo,Wi.prototype.redirect=Wi.prototype.redirectTo,Wi.prototype.redirects=Wi.prototype.redirectTo;const Hi=/^https?:\/\//,Yi={lang:"en",wiki:"wikipedia",domain:void 0,follow_redirects:!0,path:"api.php"},Gi=function(e,t,n){"string"==typeof t&&(t={lang:t}),(t={...Yi,...t}).title=e,"string"==typeof e&&Hi.test(e)&&(t={...t,...a(e)});const o=c(t),s=function(e){let t,i=e.userAgent||e["User-Agent"]||e["Api-User-Agent"]||"User of the wtf_wikipedia library";return t=e.noOrigin?"":e.origin||e.Origin||"*",{method:"GET",headers:{"Content-Type":"application/json","Api-User-Agent":i,"User-Agent":i,Origin:t,"Accept-Encoding":"gzip"},redirect:"follow"}}(t);return i(o,s).then((e=>e.json())).then((i=>{let a=function(e,t={}){return Object.keys(e.query.pages).map((i=>{let a=e.query.pages[i]||{};if(a.hasOwnProperty("missing")||a.hasOwnProperty("invalid"))return null;let n=a.revisions[0]["*"];!n&&a.revisions[0].slots&&(n=a.revisions[0].slots.main["*"]),a.pageprops=a.pageprops||{};let r=t.domain;return!r&&t.wiki&&(r=`${t.wiki}.org`),{wiki:n,meta:Object.assign({},t,{title:a.title,pageID:a.pageid,namespace:a.ns,domain:r,wikidata:a.pageprops.wikibase_item,description:a.pageprops["wikibase-shortdesc"]})}}))}(i,t);return a=function(e,t){let i=(e=e.filter((e=>e))).map((e=>new Wi(e.wiki,e.meta)));return 0===i.length?null:r(t)||1!==i.length?i:i[0]}(a,e),n&&n(null,a),a})).catch((e=>(console.error(e),n&&n(e,null),null)))};const Vi=function(e,t){return new Wi(e,t)},Ji={Doc:Wi,Section:Li,Paragraph:je,Sentence:J,Image:j,Infobox:fi,Link:H,List:Ue,Reference:bi,Table:be,Template:$i,http:function(e,t){return i(e,t).then((function(e){return e.json()})).catch((t=>(console.error("\n\n=-=- http response error =-=-=-"),console.error(e),console.error(t),{})))},wtf:Vi};return Vi.fetch=function(e,t,i){return Gi(e,t,i)},Vi.plugin=Vi.extend=function(e){return e(Ji,mi,rt),this},Vi.version="10.0.3",Vi})); +/*! wtf_wikipedia 10.0.4 MIT */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).wtf=t()}(this,(function(){"use strict";function e(e){var t=e.default;if("function"==typeof t){var i=function(){return t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})})),i}var t=e(Object.freeze({__proto__:null,default:function(e,t){return t=t||{},new Promise((function(i,a){var n=new XMLHttpRequest,r=[],o=[],s={},l=function(){return{ok:2==(n.status/100|0),statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:l,headers:{keys:function(){return r},entries:function(){return o},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var c in n.open(t.method||"get",e,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,i){r.push(t=t.toLowerCase()),o.push([t,i]),s[t]=s[t]?s[t]+","+i:i})),i(l())},n.onerror=a,n.withCredentials="include"==t.credentials,t.headers)n.setRequestHeader(c,t.headers[c]);n.send(t.body||null)}))}})),i=self.fetch||(self.fetch=t.default||t);const a=function(e){let t=new URL(e),i=t.pathname.replace(/^\/(wiki\/)?/,"");return i=decodeURIComponent(i),{domain:t.host,title:i}};function n(e){return e&&"string"==typeof e?e=(e=(e=(e=e.replace(/^\s+/,"")).replace(/\s+$/,"")).replace(/ {2}/," ")).replace(/\s, /,", "):""}function r(e){return"[object Array]"===Object.prototype.toString.call(e)}const o=/(wikibooks|wikidata|wikimedia|wikinews|wikipedia|wikiquote|wikisource|wikispecies|wikiversity|wikivoyage|wiktionary|foundation|meta)\.org/,s={action:"query",prop:"revisions|pageprops",rvprop:"content",maxlag:5,rvslots:"main",origin:"*",format:"json",redirects:"true"},l=e=>e.replace(/ /g,"_").trim(),c=function(e,t=s){let i=Object.assign({},t),a="";if(e.domain){let t=o.test(e.domain)?"w/api.php":e.path;a=`https://${e.domain}/${t}?`}else{if(!e.lang||!e.wiki)return"";a=`https://${e.lang}.${e.wiki}.org/w/api.php?`}e.follow_redirects||delete i.redirects,e.origin&&(i.origin=e.origin);let n=e.title;if("number"==typeof n)i.pageids=n;else if("string"==typeof n)i.titles=l(n);else if(void 0!==n&&r(n)&&"number"==typeof n[0])i.pageids=n.filter((e=>e)).join("|");else{if(void 0===n||!0!==r(n)||"string"!=typeof n[0])return"";i.titles=n.filter((e=>e)).map(l).join("|")}return`${a}${c=i,Object.entries(c).map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`)).join("&")}`;var c},u=function(e,t,i){let a=[];return e.sections().forEach((e=>{let n=[];n="string"==typeof i?e[t](i):e[t](),n.forEach((e=>{a.push(e)}))})),"number"==typeof i?void 0===a[i]?[]:[a[i]]:a},p=function(e,t){return Object.assign({},t,e)},m={title:!0,sections:!0,pageID:!0,categories:!0};var d=["category","abdeeling","bólkur","catagóir","categori","categoria","categoria","categoría","categorîa","categorìa","catégorie","categorie","catègorie","category","categuria","catigurìa","class","ẹ̀ka","flocc","flocc","flokkur","grup","jamii","kaarangay","kateggoría","kategooria","kategori","kategorî","kategoria","kategória","kategorie","kategoriija","kategorija","kategorio","kategoriya","kategoriýa","kategoriye","kategory","kategorya","kateqoriya","katiguriya","klad","luokka","ñemohenda","roinn","ronney","rummad","setensele","sokajy","sumut","thể","turkum","категорија","категория","категорія","катэгорыя","төркем","קטגוריה","تصنيف","تۈر","رده","श्रेणी","श्रेणी","বিষয়শ্রেণী","หมวดหมู่","분류","분류","分类"],h=["file","image","चित्र","archivo","attēls","berkas","bestand","datei","dosiero","dosya","fájl","fasciculus","fichier","fil","fitxategi","fitxer","gambar","imagem","imej","immagine","larawan","lêer","plik","restr","slika","wêne","wobraz","выява","податотека","слика","файл","სურათი","պատկեր","קובץ","پرونده","دوتنه","ملف","وێنە","चित्र","ไฟล์","파일","ファイル"],g=["infobox","anfo","anuāmapa","bilgi kutusu","bilgi","bilgiquti","boaty","boestkelaouiñ","bosca","capsa","diehtokássa","faktamall","ficha","generalni","gwybodlen3","info","infobokis","infoboks","infochascha","infokašćik","infokast","infokutija","infolentelė","infopolje","informkesto","infoskreine","infotaula","inligtingskas","inligtingskas3","inligtingskas4","kishtey","kotak","tertcita","tietolaatikko","yerleşim bilgi kutusu","ynfoboks","πλαίσιο","акарточка","аҥа","инфобокс","инфокутија","инфокутия","інфобокс","канадский","картка","карточка","карточка2","карточкарус","картуш","қуттӣ","ინფოდაფა","տեղեկաքարտ","אינפאקעסטל","תבנית","بطاقة","ڄاڻخانو","خانہ","لغة","ज्ञानसन्दूक","তথ্যছক","ਜਾਣਕਾਰੀਡੱਬਾ","సమాచారపెట్టె","තොරතුරුකොටුව","กล่องข้อมูล","ប្រអប់ព័ត៌មាន","정보상자","明細"];let f=" disambiguation";const k=["dab","dab","disamb","disambig","geodis","hndis","setindex","ship index","split dab","sport index","wp disambig","disambiguation cleanup","airport"+f,"biology"+f,"call sign"+f,"caselaw"+f,"chinese title"+f,"genus"+f,"hospital"+f,"lake index","letter"+f,"letter-number combination"+f,"mathematical"+f,"military unit"+f,"mountainindex","number"+f,"phonetics"+f,"place name"+f,"portal"+f,"road"+f,"school"+f,"species latin name abbreviation"+f,"species latin name"+f,"station"+f,"synagogue"+f,"taxonomic authority"+f,"taxonomy"+f].reduce(((e,t)=>(e[t]=!0,e)),{}),b=/. may (also )?refer to\b/i,w={about:!0,for:!0,"for multi":!0,"other people":!0,"other uses of":!0,distinguish:!0},y=new RegExp(". \\(("+["disambiguation","homonymie","توضيح","desambiguação","Begriffsklärung","disambigua","曖昧さ回避","消歧義","搞清楚","значения","ابهام‌زدایی","د ابہام","동음이의","dubbelsinnig","այլ կիրառումներ","ujednoznacznienie"].join("|")+")\\)$","i"),$=["dab","disamb","disambig","disambiguation","letter-numbercombdisambig","letter-number combination disambiguation","dmbox","airport disambiguation","biology disambiguation","call sign disambiguation","caselaw disambiguation","chinese title disambiguation","disambiguation cleanup","genus disambiguation","hospital disambiguation","human name disambiguation","human name disambiguation cleanup","letter-number combination disambiguation","mathematical disambiguation","military unit disambiguation","music disambiguation","number disambiguation","opus number disambiguation","phonetics disambiguation","place name disambiguation","portal disambiguation","road disambiguation","school disambiguation","species latin name abbreviation disambiguation","species latin name disambiguation","station disambiguation","synagogue disambiguation","taxonomic authority disambiguation","taxonomy disambiguation","template disambiguation","disamb2","disamb3","disamb4","disambiguation lead","disambiguation lead name","disambiguation name","disamb-term","disamb-terms","aðgreining","aimai","ałtsʼáʼáztiin","anlam ayrımı","anlam ayrımı","apartigilo","argipen","begriepskloorenge","begriffsklärung","begriffsklärung","begriffsklärung","begriffsklearung","bisongidila","bkl","bokokani","caddayn","clerheans","cudakirin","čvor","db","desambig","desambigación","desambiguação","desambiguació","desambiguación","desambiguáncia","desambiguasion","desambiguassiù","desambigui","dezambiguizare","dəqiqləşdirmə","disambigua","disambigua","disambigua","disambìgua","disambigua","disambiguasi","disambiguasi","discretiva","disheñvelout","disingkek","dixanbigua","dixebra","diżambigwazzjoni","doorverwijspagina","dp","dp","dubbelsinnig","dudalipen","dv","egyért","fleiri týdningar","fleirtyding","flertydig","förgrening","gì-ngiê","giklaro","gwahaniaethu","homonimo","homónimos","homonymie","huaʻōlelo puana like","idirdhealú","khu-pia̍t","kthjellim","kujekesa","maana","maneo bin","mehrdüdig begreep","menm non","muardüüdag artiikel","neibetsjuttings","nozīmju atdalīšana","nuorodinis","nyahkekaburan","omonimeye","omonimia","page dé frouque","paglilinaw","panangilawlawag","pansayod","pejy mitovy anarana","peker","razdvojba","razločitev","razvrstavanje","reddaghey","rozcestník","rozlišovacia stránka","sclerir noziun","selvendyssivu","soilleireachadh","suzmunski","täpsustuslehekülg","täsmennyssivu","telplänov","tlahtolmelahuacatlaliztli","trang định hướng","ujednoznacznienie","verdudeliking","wěcejwóznamowosć","wjacezmyslnosć","zambiguaçon","zeimeibu škiršona","αποσαφήνιση","айрық","аҵакырацәа","вишезначна одредница","ибҳомзудоӣ","кёб магъаналы","күп мәгънәләр","күп мәғәнәлелек","мъногосъмꙑслиѥ","неадназначнасць","неадназначнасьць","неоднозначность","олон удхатай","појаснување","пояснение","са шумуд манавал","салаа утгатай","суолталар","текмаанисиздик","цо магіна гуреб","чеперушка","чолхалла","шуко ончыктымаш-влак","მრავალმნიშვნელოვანი","բազմիմաստութիւն","բազմիմաստություն","באדייטן","פירושונים","ابهام‌زدایی","توضيح","توضيح","دقیقلشدیرمه","ڕوونکردنەوە","سلجهائپ","ضد ابہام","گجگجی بیری","نامبهمېدنه","መንታ","अस्पष्टता","बहुअर्थी","बहुविकल्पी शब्द","দ্ব্যর্থতা নিরসন","ਗੁੰਝਲ-ਖੋਲ੍ਹ","સંદિગ્ધ શીર્ષક","பக்கவழி நெறிப்படுத்தல்","అయోమయ నివృత్తి","ದ್ವಂದ್ವ ನಿವಾರಣೆ","വിവക്ഷകൾ","වක්‍රෝත්ති","แก้ความกำกวม","သံတူကြောင်းကွဲ","ណែនាំ","동음이의","扤清楚","搞清楚","曖昧さ回避","消歧义","釋義","gestion dj'omònim","sut'ichana qillqa"].reduce(((e,t)=>(e[t]=!0,e)),{}),x=function(e){if(!e)return!1;let t=e.text();return!(null===t||!t[0]||!0!==b.test(t))},v={caption:!0,alt:!0,links:!0,thumb:!0,url:!0},j=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},_={file(){let e=this.data.file||"";if(e){/^(image|file):/i.test(e)||(e=`File:${e}`),e=e.trim(),e=e.charAt(0).toUpperCase()+e.substring(1),e=e.replace(/ /g,"_")}return e},alt(){let e=this.data.alt||this.data.file||"";return e=e.replace(/^(file|image):/i,""),e=e.replace(/\.(jpg|jpeg|png|gif|svg)/i,""),e.replace(/_/g," ")},caption(){return this.data.caption?this.data.caption.text():""},links(){return this.data.caption?this.data.caption.links():[]},url(){let e=function(e){let t=function(e){let t=e.replace(/^(image|file?):/i,"");return t=t.charAt(0).toUpperCase()+t.substring(1),t=t.trim().replace(/ /g,"_"),t}(e);return t=encodeURIComponent(t),t}(this.file());return`https://${this.data.domain||"wikipedia.org"}/wiki/Special:Redirect/file/${e}`},thumbnail(e){return e=e||300,this.url()+"?width="+e},format(){let e=this.file().split(".");return e[e.length-1]?e[e.length-1].toLowerCase():null},json:function(e){return function(e,t){t=p(t,v);let i={file:e.file()};return!1!==t.thumb&&(i.thumb=e.thumbnail()),!1!==t.url&&(i.url=e.url()),!1!==t.caption&&e.data.caption&&(i.caption=e.caption(),!1!==t.links&&e.data.caption.links()&&(i.links=e.links())),!1!==t.alt&&e.data.alt&&(i.alt=e.alt()),i}(this,e=e||{})},text:function(){return""},wikitext:function(){return this.data.wiki||""}};Object.keys(_).forEach((e=>{j.prototype[e]=_[e]})),j.prototype.src=j.prototype.url,j.prototype.thumb=j.prototype.thumbnail;var z={aa:"Afar",ab:"Аҧсуа",af:"Afrikaans",ak:"Akana",als:"Alemannisch",am:"አማርኛ",an:"Aragonés",ang:"Englisc",ar:"العربية",arc:"ܣܘܪܬ",as:"অসমীয়া",ast:"Asturianu",av:"Авар",ay:"Aymar",az:"Azərbaycanca",ba:"Башҡорт",bar:"Boarisch","bat-smg":"Žemaitėška",bcl:"Bikol",be:"Беларуская","be-x-old":"ltr",bg:"Български",bh:"भोजपुरी",bi:"Bislama",bm:"Bamanankan",bn:"বাংলা",bo:"བོད་ཡིག",bpy:"ltr",br:"Brezhoneg",bs:"Bosanski",bug:"ᨅᨔ",bxr:"ltr",ca:"Català",cdo:"Chinese",ce:"Нохчийн",ceb:"Sinugboanong",ch:"Chamoru",cho:"Choctaw",chr:"ᏣᎳᎩ",chy:"Tsetsêhestâhese",co:"Corsu",cr:"Nehiyaw",cs:"Česky",csb:"Kaszëbsczi",cu:"Slavonic",cv:"Чăваш",cy:"Cymraeg",da:"Dansk",de:"Deutsch",diq:"Zazaki",dsb:"ltr",dv:"ދިވެހިބަސް",dz:"ཇོང་ཁ",ee:"Ɛʋɛ",far:"فارسی",el:"Ελληνικά",en:"English",eo:"Esperanto",es:"Español",et:"Eesti",eu:"Euskara",ext:"Estremeñu",ff:"Fulfulde",fi:"Suomi","fiu-vro":"Võro",fj:"Na",fo:"Føroyskt",fr:"Français",frp:"Arpitan",fur:"Furlan",fy:"ltr",ga:"Gaeilge",gan:"ltr",gd:"ltr",gil:"Taetae",gl:"Galego",gn:"Avañe'ẽ",got:"gutisk",gu:"ગુજરાતી",gv:"Gaelg",ha:"هَوُسَ",hak:"ltr",haw:"Hawai`i",he:"עברית",hi:"हिन्दी",ho:"ltr",hr:"Hrvatski",ht:"Krèyol",hu:"Magyar",hy:"Հայերեն",hz:"Otsiherero",ia:"Interlingua",id:"Bahasa",ie:"Interlingue",ig:"Igbo",ii:"ltr",ik:"Iñupiak",ilo:"Ilokano",io:"Ido",is:"Íslenska",it:"Italiano",iu:"ᐃᓄᒃᑎᑐᑦ",ja:"日本語",jbo:"Lojban",jv:"Basa",ka:"ქართული",kg:"KiKongo",ki:"Gĩkũyũ",kj:"Kuanyama",kk:"Қазақша",kl:"Kalaallisut",km:"ភាសាខ្មែរ",kn:"ಕನ್ನಡ",khw:"کھوار",ko:"한국어",kr:"Kanuri",ks:"कश्मीरी",ksh:"Ripoarisch",ku:"Kurdî",kv:"Коми",kw:"Kernewek",ky:"Kırgızca",la:"Latina",lad:"Dzhudezmo",lan:"Leb",lb:"Lëtzebuergesch",lg:"Luganda",li:"Limburgs",lij:"Líguru",lmo:"Lumbaart",ln:"Lingála",lo:"ລາວ",lt:"Lietuvių",lv:"Latviešu","map-bms":"Basa",mg:"Malagasy",man:"官話",mh:"Kajin",mi:"Māori",min:"Minangkabau",mk:"Македонски",ml:"മലയാളം",mn:"Монгол",mo:"Moldovenească",mr:"मराठी",ms:"Bahasa",mt:"bil-Malti",mus:"Muskogee",my:"Myanmasa",na:"Dorerin",nah:"Nahuatl",nap:"Nnapulitano",nd:"ltr",nds:"Plattdüütsch","nds-nl":"Saxon",ne:"नेपाली",new:"नेपालभाषा",ng:"Oshiwambo",nl:"Nederlands",nn:"ltr",no:"Norsk",nr:"ltr",nso:"ltr",nrm:"Nouormand",nv:"Diné",ny:"Chi-Chewa",oc:"Occitan",oj:"ᐊᓂᔑᓈᐯᒧᐎᓐ",om:"Oromoo",or:"ଓଡ଼ିଆ",os:"Иронау",pa:"ਪੰਜਾਬੀ",pag:"Pangasinan",pam:"Kapampangan",pap:"Papiamentu",pdc:"ltr",pi:"Pāli",pih:"Norfuk",pl:"Polski",pms:"Piemontèis",ps:"پښتو",pt:"Português",qu:"Runa",rm:"ltr",rmy:"Romani",rn:"Kirundi",ro:"Română","roa-rup":"Armâneashti",ru:"Русский",rw:"Kinyarwandi",sa:"संस्कृतम्",sc:"Sardu",scn:"Sicilianu",sco:"Scots",sd:"सिनधि",se:"ltr",sg:"Sängö",sh:"Srpskohrvatski",si:"සිංහල",simple:"ltr",sk:"Slovenčina",sl:"Slovenščina",sm:"Gagana",sn:"chiShona",so:"Soomaaliga",sq:"Shqip",sr:"Српски",ss:"SiSwati",st:"ltr",su:"Basa",sv:"Svenska",sw:"Kiswahili",ta:"தமிழ்",te:"తెలుగు",tet:"Tetun",tg:"Тоҷикӣ",th:"ไทย",ti:"ትግርኛ",tk:"Туркмен",tl:"Tagalog",tlh:"tlhIngan-Hol",tn:"Setswana",to:"Lea",tpi:"ltr",tr:"Türkçe",ts:"Xitsonga",tt:"Tatarça",tum:"chiTumbuka",tw:"Twi",ty:"Reo",udm:"Удмурт",ug:"Uyƣurqə",uk:"Українська",ur:"اردو",uz:"Ўзбек",ve:"Tshivenḓa",vi:"Việtnam",vec:"Vèneto",vls:"ltr",vo:"Volapük",wa:"Walon",war:"Winaray",wo:"Wollof",xal:"Хальмг",xh:"isiXhosa",yi:"ייִדיש",yo:"Yorùbá",za:"Cuengh",zh:"中文","zh-classical":"ltr","zh-min-nan":"Bân-lâm-gú","zh-yue":"粵語",zu:"isiZulu"};const O=".wikipedia.org/wiki/$1",E=".wikimedia.org/wiki/$1",S="www.";var C={acronym:S+"acronymfinder.com/$1.html",advisory:"advisory"+E,advogato:S+"advogato.org/$1",aew:"wiki.arabeyes.org/$1",appropedia:S+"appropedia.org/$1",aquariumwiki:S+"theaquariumwiki.com/$1",arborwiki:"localwiki.org/ann-arbor/$1",arxiv:"arxiv.org/abs/$1",atmwiki:S+"otterstedt.de/wiki/index.php/$1",baden:S+"stadtwiki-baden-baden.de/wiki/$1/",battlestarwiki:"en.battlestarwiki.org/wiki/$1",bcnbio:"historiapolitica.bcn.cl/resenas_parlamentarias/wiki/$1",beacha:S+"beachapedia.org/$1",betawiki:"translatewiki.net/wiki/$1",bibcode:"adsabs.harvard.edu/abs/$1",bibliowiki:"wikilivres.org/wiki/$1",bluwiki:"bluwiki.com/go/$1",blw:"britainloves"+O,botwiki:"botwiki.sno.cc/wiki/$1",boxrec:S+"boxrec.com/media/index.php?$1",brickwiki:S+"brickwiki.info/wiki/$1",bugzilla:"bugzilla.wikimedia.org/show_bug.cgi?id=$1",bulba:"bulbapedia.bulbagarden.net/wiki/$1",c:"commons"+E,c2:"c2.com/cgi/wiki?$1",c2find:"c2.com/cgi/wiki?FindPage&value=$1",cache:S+"google.com/search?q=cache:$1","ĉej":"esperanto.blahus.cz/cxej/vikio/index.php/$1",cellwiki:"cell.wikia.com/wiki/$1",centralwikia:"community.wikia.com/wiki/$1",chej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",choralwiki:S+"cpdl.org/wiki/index.php/$1",citizendium:"en.citizendium.org/wiki/$1",ckwiss:S+"ck-wissen.de/ckwiki/index.php?title=$1",comixpedia:S+"comixpedia.org/index.php?title=$1",commons:"commons"+E,communityscheme:"community.schemewiki.org/?c=s&key=$1",communitywiki:"communitywiki.org/$1",comune:"rete.comuni-italiani.it/wiki/$1",creativecommons:"creativecommons.org/licenses/$1",creativecommonswiki:"wiki.creativecommons.org/$1",cxej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",dcc:S+"dccwiki.com/$1",dcdatabase:"dc.wikia.com/$1",dcma:"christian-morgenstern.de/dcma/index.php?title=$1",debian:"wiki.debian.org/$1",delicious:S+"delicious.com/tag/$1",devmo:"developer.mozilla.org/en/docs/$1",dictionary:S+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",dict:S+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",disinfopedia:"sourcewatch.org/index.php/$1",distributedproofreaders:S+"pgdp.net/wiki/$1",distributedproofreadersca:S+"pgdpcanada.net/wiki/index.php/$1",dmoz:"curlie.org/$1",dmozs:"curlie.org/search?q=$1",doi:"doi.org/$1",donate:"donate"+E,doom_wiki:"doom.wikia.com/wiki/$1",download:"releases.wikimedia.org/$1",dbdump:"dumps.wikimedia.org/$1/latest/",dpd:"lema.rae.es/dpd/?key=$1",drae:"dle.rae.es/?w=$1",dreamhost:"wiki.dreamhost.com/index.php/$1",drumcorpswiki:S+"drumcorpswiki.com/index.php/$1",dwjwiki:S+"suberic.net/cgi-bin/dwj/wiki.cgi?$1","eĉei":S+"ikso.net/cgi-bin/wiki.pl?$1",ecoreality:S+"EcoReality.org/wiki/$1",ecxei:S+"ikso.net/cgi-bin/wiki.pl?$1",elibre:"enciclopedia.us.es/index.php/$1",emacswiki:S+"emacswiki.org/emacs?$1",encyc:"encyc.org/wiki/$1",energiewiki:S+"netzwerk-energieberater.de/wiki/index.php/$1",englyphwiki:"en.glyphwiki.org/wiki/$1",enkol:"enkol.pl/$1",eokulturcentro:"esperanto.toulouse.free.fr/nova/wikini/wakka.php?wiki=$1",esolang:"esolangs.org/wiki/$1",etherpad:"etherpad.wikimedia.org/$1",ethnologue:S+"ethnologue.com/language/$1",ethnologuefamily:S+"ethnologue.com/show_family.asp?subid=$1",evowiki:"wiki.cotch.net/index.php/$1",exotica:S+"exotica.org.uk/wiki/$1",fanimutationwiki:"wiki.animutationportal.com/index.php/$1",fedora:"fedoraproject.org/wiki/$1",finalfantasy:"finalfantasy.wikia.com/wiki/$1",finnix:S+"finnix.org/$1",flickruser:S+"flickr.com/people/$1",flickrphoto:S+"flickr.com/photo.gne?id=$1",floralwiki:S+"floralwiki.co.uk/wiki/$1",foldoc:"foldoc.org/$1",foundation:"foundation"+E,foundationsite:"wikimediafoundation.org/$1",foxwiki:"fox.wikis.com/wc.dll?Wiki~$1",freebio:"freebiology.org/wiki/$1",freebsdman:S+"FreeBSD.org/cgi/man.cgi?apropos=1&query=$1",freeculturewiki:"wiki.freeculture.org/index.php/$1",freedomdefined:"freedomdefined.org/$1",freefeel:"freefeel.org/wiki/$1",freekiwiki:"wiki.freegeek.org/index.php/$1",freesoft:"directory.fsf.org/wiki/$1",ganfyd:"ganfyd.org/index.php?title=$1",gardenology:S+"gardenology.org/wiki/$1",gausswiki:"gauss.ffii.org/$1",gentoo:"wiki.gentoo.org/wiki/$1",genwiki:"wiki.genealogy.net/index.php/$1",gerrit:"gerrit.wikimedia.org/r/$1",git:"gerrit.wikimedia.org/g/$1",google:S+"google.com/search?q=$1",googledefine:S+"google.com/search?q=define:$1",googlegroups:"groups.google.com/groups?q=$1",guildwarswiki:"wiki.guildwars.com/wiki/$1",guildwiki:"guildwars.wikia.com/wiki/$1",guc:"tools.wmflabs.org/guc/?user=$1",gucprefix:"tools.wmflabs.org/guc/?isPrefixPattern=1&src=rc&user=$1",gutenberg:S+"gutenberg.org/etext/$1",gutenbergwiki:S+"gutenberg.org/wiki/$1",hackerspaces:"hackerspaces.org/wiki/$1",h2wiki:"halowiki.net/p/$1",hammondwiki:S+"dairiki.org/HammondWiki/index.php3?$1",hdl:"hdl.handle.net/$1",heraldik:"heraldik-wiki.de/wiki/$1",heroeswiki:"heroeswiki.com/$1",horizonlabs:"horizon.wikimedia.org/$1",hrwiki:S+"hrwiki.org/index.php/$1",hrfwiki:"fanstuff.hrwiki.org/index.php/$1",hupwiki:"wiki.hup.hu/index.php/$1",iarchive:"archive.org/details/$1",imdbname:S+"imdb.com/name/nm$1/",imdbtitle:S+"imdb.com/title/tt$1/",imdbcompany:S+"imdb.com/company/co$1/",imdbcharacter:S+"imdb.com/character/ch$1/",incubator:"incubator"+E,infosecpedia:"infosecpedia.org/wiki/$1",infosphere:"theinfosphere.org/$1","iso639-3":"iso639-3.sil.org/code/$1",issn:S+"worldcat.org/issn/$1",iuridictum:"iuridictum.pecina.cz/w/$1",jaglyphwiki:"glyphwiki.org/wiki/$1",jefo:"esperanto-jeunes.org/wiki/$1",jerseydatabase:"jerseydatabase.com/wiki.php?id=$1",jira:"jira.toolserver.org/browse/$1",jspwiki:S+"ecyrd.com/JSPWiki/Wiki.jsp?page=$1",jstor:S+"jstor.org/journals/$1",kamelo:"kamelopedia.mormo.org/index.php/$1",karlsruhe:"ka.stadtwiki.net/$1",kinowiki:"kino.skripov.com/index.php/$1",komicawiki:"wiki.komica.org/?$1",kontuwiki:"kontu.wiki/$1",wikitech:"wikitech"+E,libreplanet:"libreplanet.org/wiki/$1",linguistlist:"linguistlist.org/forms/langs/LLDescription.cfm?code=$1",linuxwiki:S+"linuxwiki.de/$1",linuxwikide:S+"linuxwiki.de/$1",liswiki:"liswiki.org/wiki/$1",literateprograms:"en.literateprograms.org/$1",livepedia:S+"livepedia.gr/index.php?title=$1",localwiki:"localwiki.org/$1",lojban:"mw.lojban.org/papri/$1",lostpedia:"lostpedia.wikia.com/wiki/$1",lqwiki:"wiki.linuxquestions.org/wiki/$1",luxo:"tools.wmflabs.org/guc/?user=$1",mail:"lists.wikimedia.org/mailman/listinfo/$1",mailarchive:"lists.wikimedia.org/pipermail/$1",mariowiki:S+"mariowiki.com/$1",marveldatabase:S+"marveldatabase.com/wiki/index.php/$1",meatball:"meatballwiki.org/wiki/$1",mw:S+"mediawiki.org/wiki/$1",mediazilla:"bugzilla.wikimedia.org/$1",memoryalpha:"memory-alpha.fandom.com/wiki/$1",metawiki:"meta"+E,metawikimedia:"meta"+E,metawikipedia:"meta"+E,mineralienatlas:S+"mineralienatlas.de/lexikon/index.php/$1",moinmoin:"moinmo.in/$1",monstropedia:S+"monstropedia.org/?title=$1",mosapedia:"mosapedia.de/wiki/index.php/$1",mozcom:"mozilla.wikia.com/wiki/$1",mozillawiki:"wiki.mozilla.org/$1",mozillazinekb:"kb.mozillazine.org/$1",musicbrainz:"musicbrainz.org/doc/$1",mediawikiwiki:S+"mediawiki.org/wiki/$1",mwod:S+"merriam-webster.com/dictionary/$1",mwot:S+"merriam-webster.com/thesaurus/$1",nkcells:S+"nkcells.info/index.php?title=$1",nara:"catalog.archives.gov/id/$1",nosmoke:"no-smok.net/nsmk/$1",nost:"nostalgia."+O,nostalgia:"nostalgia."+O,oeis:"oeis.org/$1",oldwikisource:"wikisource.org/wiki/$1",olpc:"wiki.laptop.org/go/$1",omegawiki:S+"omegawiki.org/Expression:$1",onelook:S+"onelook.com/?ls=b&w=$1",openlibrary:"openlibrary.org/$1",openstreetmap:"wiki.openstreetmap.org/wiki/$1",openwetware:"openwetware.org/wiki/$1",opera7wiki:"operawiki.info/$1",organicdesign:S+"organicdesign.co.nz/$1",orthodoxwiki:"orthodoxwiki.org/$1",osmwiki:"wiki.openstreetmap.org/wiki/$1",otrs:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=$1",otrswiki:"otrs-wiki"+E,ourmedia:S+"socialtext.net/ourmedia/index.cgi?$1",outreach:"outreach"+E,outreachwiki:"outreach"+E,owasp:S+"owasp.org/index.php/$1",panawiki:"wiki.alairelibre.net/index.php?title=$1",patwiki:"gauss.ffii.org/$1",personaltelco:"personaltelco.net/wiki/$1",petscan:"petscan.wmflabs.org/?psid=$1",phab:"phabricator.wikimedia.org/$1",phabricator:"phabricator.wikimedia.org/$1",phwiki:S+"pocketheaven.com/ph/wiki/index.php?title=$1",phpwiki:"phpwiki.sourceforge.net/phpwiki/index.php?$1",planetmath:"planetmath.org/node/$1",pmeg:S+"bertilow.com/pmeg/$1",pmid:S+"ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract",pokewiki:"pokewiki.de/$1","pokéwiki":"pokewiki.de/$1",policy:"policy.wikimedia.org/$1",proofwiki:S+"proofwiki.org/wiki/$1",pyrev:S+"mediawiki.org/wiki/Special:Code/pywikipedia/$1",pythoninfo:"wiki.python.org/moin/$1",pythonwiki:S+"pythonwiki.de/$1",pywiki:"c2.com/cgi/wiki?$1",psycle:"psycle.sourceforge.net/wiki/$1",quality:"quality"+E,quarry:"quarry.wmflabs.org/$1",regiowiki:"regiowiki.at/wiki/$1",rev:S+"mediawiki.org/wiki/Special:Code/MediaWiki/$1",revo:"purl.org/NET/voko/revo/art/$1.html",rfc:"tools.ietf.org/html/rfc$1",rheinneckar:"rhein-neckar-wiki.de/$1",robowiki:"robowiki.net/?$1",rodovid:"en.rodovid.org/wk/$1",reuterswiki:"glossary.reuters.com/index.php/$1",rowiki:"wiki.rennkuckuck.de/index.php/$1",rt:"rt.wikimedia.org/Ticket/Display.html?id=$1",s23wiki:"s23.org/wiki/$1",scholar:"scholar.google.com/scholar?q=$1",schoolswp:"schools-"+O,scores:"imslp.org/wiki/$1",scoutwiki:"en.scoutwiki.org/$1",scramble:S+"scramble.nl/wiki/index.php?title=$1",seapig:S+"seapig.org/$1",seattlewiki:"seattle.wikia.com/wiki/$1",slwiki:"wiki.secondlife.com/wiki/$1","semantic-mw":S+"semantic-mediawiki.org/wiki/$1",senseislibrary:"senseis.xmp.net/?$1",sharemap:"sharemap.org/$1",silcode:S+"sil.org/iso639-3/documentation.asp?id=$1",slashdot:"slashdot.org/article.pl?sid=$1",sourceforge:"sourceforge.net/$1",spcom:"spcom"+E,species:"species"+E,squeak:"wiki.squeak.org/squeak/$1",stats:"stats.wikimedia.org/$1",stewardry:"tools.wmflabs.org/meta/stewardry/?wiki=$1",strategy:"strategy"+E,strategywiki:"strategywiki.org/wiki/$1",sulutil:"meta.wikimedia.org/wiki/Special:CentralAuth/$1",swtrain:"train.spottingworld.com/$1",svn:"svn.wikimedia.org/viewvc/mediawiki/$1?view=log",swinbrain:"swinbrain.ict.swin.edu.au/wiki/$1",tabwiki:S+"tabwiki.com/index.php/$1",tclerswiki:"wiki.tcl.tk/$1",technorati:S+"technorati.com/search/$1",tenwiki:"ten."+O,testwiki:"test."+O,testwikidata:"test.wikidata.org/wiki/$1",test2wiki:"test2."+O,tfwiki:"tfwiki.net/wiki/$1",thelemapedia:S+"thelemapedia.org/index.php/$1",theopedia:S+"theopedia.com/$1",thinkwiki:S+"thinkwiki.org/wiki/$1",ticket:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=$1",tmbw:"tmbw.net/wiki/$1",tmnet:S+"technomanifestos.net/?$1",tmwiki:S+"EasyTopicMaps.com/?page=$1",toolforge:"tools.wmflabs.org/$1",toollabs:"tools.wmflabs.org/$1",tools:"toolserver.org/$1",tswiki:S+"mediawiki.org/wiki/Toolserver:$1",translatewiki:"translatewiki.net/wiki/$1",tviv:"tviv.org/wiki/$1",tvtropes:S+"tvtropes.org/pmwiki/pmwiki.php/Main/$1",twiki:"twiki.org/cgi-bin/view/$1",tyvawiki:S+"tyvawiki.org/wiki/$1",umap:"umap.openstreetmap.fr/$1",uncyclopedia:"en.uncyclopedia.co/wiki/$1",unihan:S+"unicode.org/cgi-bin/GetUnihanData.pl?codepoint=$1",unreal:"wiki.beyondunreal.com/wiki/$1",urbandict:S+"urbandictionary.com/define.php?term=$1",usej:S+"tejo.org/usej/$1",usemod:S+"usemod.com/cgi-bin/wiki.pl?$1",usability:"usability"+E,utrs:"utrs.wmflabs.org/appeal.php?id=$1",vikidia:"fr.vikidia.org/wiki/$1",vlos:"tusach.thuvienkhoahoc.com/wiki/$1",vkol:"kol.coldfront.net/thekolwiki/index.php/$1",voipinfo:S+"voip-info.org/wiki/view/$1",votewiki:"vote"+E,werelate:S+"werelate.org/wiki/$1",wg:"wg-en."+O,wikia:S+"wikia.com/wiki/w:c:$1",wikiasite:S+"wikia.com/wiki/w:c:$1",wikiapiary:"wikiapiary.com/wiki/$1",wikibooks:"en.wikibooks.org/wiki/$1",wikichristian:S+"wikichristian.org/index.php?title=$1",wikicities:S+"wikia.com/wiki/w:$1",wikicity:S+"wikia.com/wiki/w:c:$1",wikiconference:"wikiconference.org/wiki/$1",wikidata:S+"wikidata.org/wiki/$1",wikif1:S+"wikif1.org/$1",wikifur:"en.wikifur.com/wiki/$1",wikihow:S+"wikihow.com/$1",wikiindex:"wikiindex.org/$1",wikilemon:"wiki.illemonati.com/$1",wikilivres:"wikilivres.org/wiki/$1",wikilivresru:"wikilivres.ru/$1","wikimac-de":"apfelwiki.de/wiki/Main/$1",wikimedia:"foundation"+E,wikinews:"en.wikinews.org/wiki/$1",wikinfo:"wikinfo.org/w/index.php/$1",wikinvest:"meta.wikimedia.org/wiki/Interwiki_map/discontinued#Wikinvest",wikiotics:"wikiotics.org/$1",wikipapers:"wikipapers.referata.com/wiki/$1",wikipedia:"en."+O,wikipediawikipedia:"en.wikipedia.org/wiki/Wikipedia:$1",wikiquote:"en.wikiquote.org/wiki/$1",wikisophia:"wikisophia.org/index.php?title=$1",wikisource:"en.wikisource.org/wiki/$1",wikispecies:"species"+E,wikispot:"wikispot.org/?action=gotowikipage&v=$1",wikiskripta:S+"wikiskripta.eu/index.php/$1",labsconsole:"wikitech"+E,wikiti:"wikiti.denglend.net/index.php?title=$1",wikiversity:"en.wikiversity.org/wiki/$1",wikivoyage:"en.wikivoyage.org/wiki/$1",betawikiversity:"beta.wikiversity.org/wiki/$1",wikiwikiweb:"c2.com/cgi/wiki?$1",wiktionary:"en.wiktionary.org/wiki/$1",wipipedia:"wipipedia.org/index.php/$1",wlug:S+"wlug.org.nz/$1",wmam:"am"+E,wmar:S+"wikimedia.org.ar/wiki/$1",wmat:"mitglieder.wikimedia.at/$1",wmau:"wikimedia.org.au/wiki/$1",wmbd:"bd"+E,wmbe:"be"+E,wmbr:"br"+E,wmca:"ca"+E,wmch:S+"wikimedia.ch/$1",wmcl:S+"wikimediachile.cl/index.php?title=$1",wmcn:"cn"+E,wmco:"co"+E,wmcz:S+"wikimedia.cz/web/$1",wmdc:"wikimediadc.org/wiki/$1",securewikidc:"secure.wikidc.org/$1",wmde:"wikimedia.de/wiki/$1",wmdk:"dk"+E,wmee:"ee"+E,wmec:"ec"+E,wmes:S+"wikimedia.es/wiki/$1",wmet:"ee"+E,wmfdashboard:"outreachdashboard.wmflabs.org/$1",wmfi:"fi"+E,wmfr:"wikimedia.fr/$1",wmge:"ge"+E,wmhi:"hi"+E,wmhk:"meta.wikimedia.org/wiki/Wikimedia_Hong_Kong",wmhu:"wikimedia.hu/wiki/$1",wmid:"id"+E,wmil:S+"wikimedia.org.il/$1",wmin:"wiki.wikimedia.in/$1",wmit:"wiki.wikimedia.it/wiki/$1",wmke:"meta.wikimedia.org/wiki/Wikimedia_Kenya",wmmk:"mk"+E,wmmx:"mx"+E,wmnl:"nl"+E,wmnyc:"nyc"+E,wmno:"no"+E,"wmpa-us":"pa-us"+E,wmph:"meta.wikimedia.org/wiki/Wikimedia_Philippines",wmpl:"pl"+E,wmpt:"pt"+E,wmpunjabi:"punjabi"+E,wmromd:"romd"+E,wmrs:"rs"+E,wmru:"ru"+E,wmse:"se"+E,wmsk:"wikimedia.sk/$1",wmtr:"tr"+E,wmtw:"wikimedia.tw/wiki/index.php5/$1",wmua:"ua"+E,wmuk:"wikimedia.org.uk/wiki/$1",wmve:"wikimedia.org.ve/wiki/$1",wmza:"wikimedia.org.za/wiki/$1",wm2005:"wikimania2005"+E,wm2006:"wikimania2006"+E,wm2007:"wikimania2007"+E,wm2008:"wikimania2008"+E,wm2009:"wikimania2009"+E,wm2010:"wikimania2010"+E,wm2011:"wikimania2011"+E,wm2012:"wikimania2012"+E,wm2013:"wikimania2013"+E,wm2014:"wikimania2014"+E,wm2015:"wikimania2015"+E,wm2016:"wikimania2016"+E,wm2017:"wikimania2017"+E,wm2018:"wikimania2018"+E,wmania:"wikimania"+E,wikimania:"wikimania"+E,wmteam:"wikimaniateam"+E,wmf:"foundation"+E,wmfblog:"blog.wikimedia.org/$1",wmdeblog:"blog.wikimedia.de/$1",wookieepedia:"starwars.wikia.com/wiki/$1",wowwiki:S+"wowwiki.com/$1",wqy:"wqy.sourceforge.net/cgi-bin/index.cgi?$1",wurmpedia:"wurmpedia.com/index.php/$1",viaf:"viaf.org/viaf/$1",zrhwiki:S+"zrhwiki.ch/wiki/$1",zum:"wiki.zum.de/$1",zwiki:S+"zwiki.org/$1",m:"meta"+E,meta:"meta"+E,sep11:"sep11."+O,d:S+"wikidata.org/wiki/$1",minnan:"zh-min-nan."+O,nb:"no."+O,"zh-cfr":"zh-min-nan."+O,"zh-cn":"zh."+O,"zh-tw":"zh."+O,nan:"zh-min-nan."+O,vro:"fiu-vro."+O,cmn:"zh."+O,lzh:"zh-classical."+O,rup:"roa-rup."+O,gsw:"als."+O,"be-tarask":"be-x-old."+O,sgs:"bat-smg."+O,egl:"eml."+O,w:"en."+O,wikt:"en.wiktionary.org/wiki/$1",q:"en.wikiquote.org/wiki/$1",b:"en.wikibooks.org/wiki/$1",n:"en.wikinews.org/wiki/$1",s:"en.wikisource.org/wiki/$1",chapter:"en"+E,v:"en.wikiversity.org/wiki/$1",voy:"en.wikivoyage.org/wiki/$1"};Object.keys(z).forEach((e=>{C[e]=e+".wikipedia.org/wiki/$1"}));const q=/^:?(category|catégorie|kategorie|categoría|categoria|categorie|kategoria|تصنيف|image|file|fichier|datei|media):/i,N=/\[(https?|news|ftp|mailto|gopher|irc)(:\/\/[^\]| ]{4,1500})([| ].*?)?\]/g,L=/\[\[(.{0,160}?)\]\]([a-z]+)?/gi,P=function(e,t){return t.replace(L,(function(t,i,a){let n=null,r=i;if(i.match(/\|/)&&(r=(i=i.replace(/\[\[(.{2,100}?)\]\](\w{0,10})/g,"$1$2")).replace(/(.{2,100})\|.{0,200}/,"$1"),n=i.replace(/.{2,100}?\|/,""),null===n&&r.match(/\|$/)&&(r=r.replace(/\|$/,""),n=r)),r.match(q))return i;let o={page:r,raw:t};return o.page=o.page.replace(/#(.*)/,((e,t)=>(o.anchor=t,""))),o=function(e){let t=e.page||"";if(-1!==t.indexOf(":")){let i=t.match(/^(.*):(.*)/);if(null===i)return e;let a=i[1]||"";if(a=a.toLowerCase(),-1!==a.indexOf(":")){let[,t,i]=a.match(/^:?(.*):(.*)/);if(!1===C.hasOwnProperty(t)||!1===z.hasOwnProperty(i))return e;e.wiki={wiki:t,lang:i}}else{if(!1===C.hasOwnProperty(a))return e;e.wiki=a}e.page=i[2]}return e}(o),o.wiki&&(o.type="interwiki"),null!==n&&n!==o.page&&(o.text=n),a&&(o.text=o.text||o.page,o.text+=a.trim()),o.page&&!1===/^[A-Z]/.test(o.page)&&(o.text||(o.text=o.page),o.page=o.page),e.push(o),i})),e},A=function(e){let t=[];if(t=function(e,t){return t.replace(N,(function(t,i,a,n){return n=n||"",e.push({type:"external",site:i+a,text:n.trim(),raw:t}),n})),e}(t,e),t=P(t,e),0!==t.length)return t},T=new RegExp("^[ \n\t]*?#("+["adkas","aýdaw","doorverwijzing","ohjaus","patrz","přesměruj","redirección","redireccion","redirección","redirecionamento","redirect","redirection","redirection","rinvia","tilvísun","uudelleenohjaus","weiterleitung","weiterleitung","yönlendi̇r","yönlendirme","yönlendi̇rme","ανακατευθυνση","айдау","перанакіраваньне","перенаправлення","пренасочување","преусмери","преусмјери","تغییر_مسیر","تغییرمسیر","تغییرمسیر","เปลี่ยนทาง","ប្តូរទីតាំងទៅ","転送","重定向"].join("|")+") *?(\\[\\[.{2,180}?\\]\\])","i"),D=["table","code","score","data","categorytree","charinsert","hiero","imagemap","inputbox","nowiki","references","source","syntaxhighlight","timeline"],I=`< ?(${D.join("|")}) ?[^>]{0,200}?>`,M=`< ?/ ?(${D.join("|")}) ?>`,R=new RegExp(`${I}[\\s\\S]+?${M}`,"gi");function U(e){return e=(e=(e=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(R," ")).replace(/ ?< ?(span|div|table|data) [a-zA-Z0-9=%.\-#:;'" ]{2,100}\/? ?> ?/g," ")).replace(/ ?< ?(ref) [a-zA-Z0-9=" ]{2,100}\/ ?> ?/g," ")).replace(/(.*?)<\/i>/g,"''$1''")).replace(/(.*?)<\/b>/g,"'''$1'''")).replace(/(.*?)<\/sub>/g,"{{sub|$1}}")).replace(/(.*?)<\/sup>/g,"{{sup|$1}}")).replace(/
(.*?)<\/blockquote>/g,"{{blockquote|text=$1}}")).replace(/ ?<[ /]?(p|sub|sup|span|nowiki|div|table|br|tr|td|th|pre|pre2|hr|u)[ /]?> ?/g," ")).replace(/ ?<[ /]?(abbr|bdi|bdo|cite|del|dfn|em|ins|kbd|mark|q|s|small)[ /]?> ?/g," ")).replace(/ ?<[ /]?h[0-9][ /]?> ?/g," ")).replace(/ ?< ?br ?\/> ?/g,"\n")).trim()}(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(//g,"")).replace(/__(NOTOC|NOEDITSECTION|FORCETOC|TOC)__/gi,"")).replace(/~{2,3}/g,"")).replace(/\r/g,"")).replace(/\u3002/g,". ")).replace(/----/g,"")).replace(/\{\{\}\}/g," – ")).replace(/\{\{\\\}\}/g," / ")).replace(/ /g," "))).replace(/\([,;: ]+\)/g,"")).replace(/\{\{(baseball|basketball) (primary|secondary) (style|color).*?\}\}/i,"")}const B=/[\\.$]/,F=function(e){return"string"!=typeof e&&(e=""),e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/^\$/,"\\u0024")).replace(/\./g,"\\u002e")},K=function(e={}){let t=Object.keys(e);for(let i=0;i{H.prototype[e]=Y[e]}));const G=/^[0-9,.]+$/,V={text:!0,links:!0,formatting:!0,numbers:!0},J=function(e={}){Object.defineProperty(this,"data",{enumerable:!1,value:e})},X={links:function(e){let t=this.data.links||[];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page===e));return void 0===i?[]:[i]}return t},interwiki:function(){return this.links().filter((e=>void 0!==e.wiki))},bolds:function(){return this.data&&this.data.fmt&&this.data.fmt.bold&&this.data.fmt.bold||[]},italics:function(){return this.data&&this.data.fmt&&this.data.fmt.italic&&this.data.fmt.italic||[]},text:function(e){return void 0!==e&&"string"==typeof e&&(this.data.text=e),this.data.text||""},json:function(e){return function(e,t){t=p(t,V);let i={},a=e.text();if(!0===t.text&&(i.text=a),!0===t.numbers&&G.test(a)){let e=Number(a.replace(/,/g,""));!1===isNaN(e)&&(i.number=e)}return t.links&&e.links().length>0&&(i.links=e.links().map((e=>e.json()))),t.formatting&&e.data.fmt&&(i.formatting=e.data.fmt),i}(this,e)},wikitext:function(){return this.data.wiki||""},isEmpty:function(){return""===this.data.text}};Object.keys(X).forEach((e=>{J.prototype[e]=X[e]}));const Q={links:"link",bolds:"bold",italics:"italic"};Object.keys(Q).forEach((e=>{J.prototype[Q[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}})),J.prototype.plaintext=J.prototype.text;const ee=["ad","adj","adm","adv","al","alta","approx","apr","apt","arc","ariz","assn","asst","atty","aug","ave","ba","bc","bl","bldg","blvd","brig","bros","ca","cal","calif","capt","cca","cg","cl","cm","cmdr","co","col","colo","comdr","conn","corp","cpl","cres","ct","cyn","dak","dec","def","dept","det","dg","dist","dl","dm","dr","ea","eg","eng","esp","esq","est","etc","ex","exp","feb","fem","fig","fl oz","fl","fla","fm","fr","ft","fy","ga","gal","gb","gen","gov","hg","hon","hr","hrs","hwy","hz","ia","ida","ie","inc","inf","jan","jd","jr","jul","jun","kan","kans","kb","kg","km","kmph","lat","lb","lit","llb","lm","lng","lt","ltd","lx","ma","maj","mar","masc","mb","md","messrs","mg","mi","min","minn","misc","mister","ml","mlle","mm","mme","mph","mps","mr","mrs","ms","mstr","mt","neb","nebr","nee","no","nov","oct","okla","ont","op","ord","oz","pa","pd","penn","penna","phd","pl","pp","pref","prob","prof","pron","ps","psa","pseud","pt","pvt","qt","que","rb","rd","rep","reps","res","rev","sask","sec","sen","sens","sep","sept","sfc","sgt","sir","situ","sq ft","sq","sr","ss","st","supt","surg","tb","tbl","tbsp","tce","td","tel","temp","tenn","tex","tsp","univ","usafa","ut","va","vb","ver","vet","vitro","vivo","vol","vs","vt","wis","wisc","wr","wy","wyo","yb","µg"].concat("[^]][^]]"),te=new RegExp("(^| |')("+ee.join("|")+")[.!?] ?$","i"),ie=/[ .'][A-Z].? *$/i,ae=/\.{3,} +$/,ne=/ c\.\s$/,re=/\p{Letter}/iu;function oe(e){let t={wiki:e,text:e};return function(e){let t=e.text,i=A(t)||[];e.links=i.map((e=>(t=t.replace(e.raw,e.text||e.page||""),new H(e)))),t=t.replace(/\[\[File:(.{2,80}?)\|([^\]]+)\]\](\w{0,5})/g,"$1"),e.text=t}(t),t.text=n(t.text.replace(/\([,;: ]*\)/g,"").replace(/\( *(; ?)+/g,"(")).replace(/ +\.$/,"."),t=function(e){let t=[],i=[],a=e.text||"";return a=a.replace(/'''''(.{0,2500}?)'''''/g,((e,a)=>(t.push(a),i.push(a),a))),a=a.replace(/''''(.{0,2500}?)''''/g,((e,i)=>(t.push(`'${i}'`),`'${i}'`))),a=a.replace(/'''(.{0,2500}?)'''/g,((e,i)=>(t.push(i),i))),a=a.replace(/''(.{0,2500}?)''/g,((e,t)=>(i.push(t),t))),e.text=a,t.length>0&&(e.fmt=e.fmt||{},e.fmt.bold=t),i.length>0&&(e.fmt=e.fmt||{},e.fmt.italic=i),e}(t),new J(t)}const se=function(e){let t=function(e){let t=[],i=[];if(!e||"string"!=typeof e||0===e.trim().length)return t;let a=function(e){let t=e.split(/(\n+)/);return t=t.filter((e=>e.match(/\S/))),t=t.map((function(e){return e.split(/(\S.+?[.!?]"?)(?=\s|$)/g)})),function(e){let t=[];return e.forEach((function(e){t=t.concat(e)})),t}(t)}(e);for(let e=0;ei.length)return!1;const a=e.match(/"/g);if(a&&a.length%2!=0&&e.length<900)return!1;const n=e.match(/[()]/g);return!(n&&n.length%2!=0&&e.length<900)}(n))?i[e+1]=i[e]+(i[e+1]||""):i[e]&&i[e].length>0&&(t.push(i[e]),i[e]="");var n;return 0===t.length?[e]:t}(e.wiki);t=t.map(oe),t[0]&&t[0].text()&&":"===t[0].text()[0]&&(t=t.slice(1)),e.sentences=t},le=/.*rowspan *= *["']?([0-9]+)["']?[ |]*/,ce=/.*colspan *= *["']?([0-9]+)["']?[ |]*/,ue=function(e){return e=function(e){return e.forEach(((t,i)=>{t.forEach(((a,n)=>{let r=a.match(le);if(null!==r){let o=parseInt(r[1],10);a=a.replace(le,""),t[n]=a;for(let t=i+1;t{e.forEach(((t,i)=>{let a=t.match(ce);if(null!==a){let n=parseInt(a[1],10);e[i]=t.replace(ce,"");for(let t=1;te.length>0))}(e))},pe=/^!/,me={name:!0,age:!0,born:!0,date:!0,year:!0,city:!0,country:!0,population:!0,count:!0,number:!0},de=function(e){return(e=oe(e).text()).match(/\|/)&&(e=e.replace(/.*?\| ?/,"")),e=(e=(e=e.replace(/style=['"].*?["']/,"")).replace(/^!/,"")).trim()},he=function(e){if(e.length<=3)return[];let t=e[0].slice(0);t=t.map((e=>(e=oe(e=e.replace(/^! */,"")).text(),e=(e=de(e)).toLowerCase())));for(let i=0;ie&&!0!==/^\|\+/.test(e))),!0===/^\{\|/.test(e[0])&&e.shift(),!0===/^\|\}/.test(e[e.length-1])&&e.pop(),!0===/^\|-/.test(e[0])&&e.shift(),e}(e);for(let a=0;a0&&(t.push(i),i=[]);else{let e=n.charAt(0);"|"!==e&&"!"!==e||(n=n.substring(1)),n=n.split(/(?:\|\||!!)/),"!"===e&&(n[0]=e+n[0]),n.forEach((e=>{e=e.trim(),i.push(e)}))}}return i.length>0&&t.push(i),t}(e.replace(/\r/g,"").replace(/\n(\s*[^|!{\s])/g," $1").split(/\n/).map((e=>e.trim())));if(t=t.filter((e=>e)),0===t.length)return[];t=function(e){return e.filter((e=>1!==e.length||!e[0]||!pe.test(e[0])||!1!==/rowspan/i.test(e[0])))}(t),t=ue(t);let i=function(e=[]){let t=[];var i;(i=(i=e[0])||[]).length-i.filter((e=>e)).length>3&&e.shift();let a=e[0];return a&&a[0]&&a[1]&&(/^!/.test(a[0])||/^!/.test(a[1]))&&(t=a.map((e=>(e=e.replace(/^! */,""),de(e)))),e.shift()),a=e[0],a&&a[0]&&a[1]&&/^!/.test(a[0])&&/^!/.test(a[1])&&(a.forEach(((e,i)=>{e=e.replace(/^! */,""),e=de(e),!0===Boolean(e)&&(t[i]=e)})),e.shift()),t}(t);if(!i||i.length<=1){i=he(t);let e=t[t.length-1]||[];i.length<=1&&e.length>2&&(i=he(t.slice(1)),i.length>0&&(t=t.slice(2)))}let a=t.map((e=>function(e,t){let i={};return e.forEach(((e,a)=>{let n=t[a]||"col"+(a+1),r=oe(e);r.text(de(r.text())),i[n]=r})),i}(e,i)));return a},fe={},ke=function(e=""){return e=(e=(e=(e=e.toLowerCase()).replace(/[_-]/g," ")).replace(/\(.*?\)/,"")).trim()},be=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_wiki",{enumerable:!1,value:t})},we={links(e){let t=[];if(this.data.forEach((e=>{Object.keys(e).forEach((i=>{t=t.concat(e[i].links())}))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},get(e){let t=this.data[0]||{},i=Object.keys(t).reduce(((e,t)=>(e[ke(t)]=t,e)),{});if("string"==typeof e){let t=ke(e);return t=i[t]||t,this.data.map((e=>e[t]?e[t].text():null))}return e=e.map(ke).map((e=>i[e]||e)),this.data.map((t=>e.reduce(((e,i)=>(t[i]?e[i]=t[i].text():e[i]="",e)),{})))},keyValue(e){let t=this.json(e);return t.forEach((e=>{Object.keys(e).forEach((t=>{e[t]=e[t].text}))})),t},json(e){return e=p(e,fe),function(e,t){return e.map((e=>{let i={};return Object.keys(e).forEach((t=>{i[t]=e[t].json()})),!0===t.encode&&(i=K(i)),i}))}(this.data,e)},text:()=>"",wikitext(){return this._wiki||""}};we.keyvalue=we.keyValue,we.keyval=we.keyValue,Object.keys(we).forEach((e=>{be.prototype[e]=we[e]}));const ye=/^\s*\{\|/,$e=/^\s*\|\}/,xe={sentences:!0},ve={sentences:!0,lists:!0,images:!0},je=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},_e={sentences:function(){return this.data.sentences||[]},references:function(){return this.data.references},lists:function(){return this.data.lists},images(){return this.data.images||[]},links:function(e){let t=[];if(this.sentences().forEach((i=>{t=t.concat(i.links(e))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},interwiki(){let e=[];return this.sentences().forEach((t=>{e=e.concat(t.interwiki())})),e||[]},text:function(e){e=p(e,ve);let t=this.sentences().map((t=>t.text(e))).join(" ");return this.lists().forEach((e=>{t+="\n"+e.text()})),t},json:function(e){return function(e,t){let i={};return!0===(t=p(t,xe)).sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,ve))},wikitext:function(){return this.data.wiki}};_e.citations=_e.references,Object.keys(_e).forEach((e=>{je.prototype[e]=_e[e]}));const ze={sentences:"sentence",references:"reference",citations:"citation",lists:"list",images:"image",links:"link"};Object.keys(ze).forEach((e=>{je.prototype[ze[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}}));const Oe=function(e){return e=(e=e.replace(/^\{\{/,"")).replace(/\}\}$/,"")},Ee=function(e){return e=(e=(e=(e||"").trim()).toLowerCase()).replace(/_/g," ")},Se=/^[\p{Letter}0-9._\- '()\t]+=/iu,Ce={template:!0,list:!0,prototype:!0},qe=function(e,t){let i=0;return e.reduce(((e,a="")=>{if(a=a.trim(),!0===Se.test(a)){let t=function(e){let t=e.split("="),i=t[0]||"";i=i.toLowerCase().trim();let a=t.slice(1).join("=");return Ce.hasOwnProperty(i)&&(i="_"+i),{key:i,val:a.trim()}}(a);if(t.key)return e[t.key]=t.val,e}if(t&&t[i]){e[t[i]]=a}else e.list=e.list||[],e.list.push(a);return i+=1,e}),{})},Ne={classname:!0,style:!0,align:!0,margin:!0,left:!0,break:!0,boxsize:!0,framestyle:!0,item_style:!0,collapsible:!0,list_style_type:!0,"list-style-type":!0,colwidth:!0},Le=function(e,t){let i=oe(e);return"json"===t?i.json():"raw"===t?i:i.text()},Pe=function(e,t=[],i){let a=function(e){let t=e.split(/\n?\|/);t.forEach(((e,i)=>{null!==e&&(/\[\[[^\]]+$/.test(e)||/\{\{[^}]+$/.test(e)||e.split("{{").length!==e.split("}}").length||e.split("[[").length!==e.split("]]").length)&&(t[i+1]=t[i]+"|"+t[i+1],t[i]=null)})),t=t.filter((e=>null!==e)),t=t.map((e=>(e||"").trim()));for(let e=t.length-1;e>=0;e-=1){""===t[e]&&t.pop();break}return t}(e=Oe(e||"")),n=a.shift(),r=qe(a,t);return r=function(e){return Object.keys(e).forEach((t=>{!0===Ne[t.toLowerCase()]&&delete e[t],null!==e[t]&&""!==e[t]||delete e[t]})),e}(r),r[1]&&t[0]&&!1===r.hasOwnProperty(t[0])&&(r[t[0]]=r[1],delete r[1]),Object.keys(r).forEach((e=>{r[e]="list"!==e?Le(r[e],i):r[e].map((e=>Le(e,i)))})),n&&(r.template=Ee(n)),r};const Ae=new RegExp("("+h.join("|")+"):","i");let Te=`(${h.join("|")})`;const De=new RegExp(Te+":(.+?)[\\||\\]]","iu"),Ie={thumb:!0,thumbnail:!0,border:!0,right:!0,left:!0,center:!0,top:!0,bottom:!0,none:!0,upright:!0,baseline:!0,middle:!0,sub:!0,super:!0},Me=function(e,t){let i=e.wiki,a=function(e){let t=[],i=[];const a=e.split("");let n=0;for(let r=0;r0){let e=0,a=0;for(let t=0;ta&&i.push("]"),t.push(i.join("")),i=[]}}return t}(i);a.forEach((function(a){if(!0===Ae.test(a)){e.images=e.images||[];let n=function(e,t){let i=e.match(De);if(null===i||!i[2])return null;let a=`${i[1]}:${i[2]||""}`;if(a){let i={file:a,lang:t._lang,domain:t._domain,wiki:e,pluginData:{}};e=(e=e.replace(/^\[\[/,"")).replace(/\]\]$/,"");let n=Pe(e),r=n.list||[];return n.alt&&(i.alt=n.alt),r=r.filter((e=>!1===Ie.hasOwnProperty(e))),r[r.length-1]&&(i.caption=oe(r[r.length-1])),new j(i)}return null}(a,t);n&&e.images.push(n),i=i.replace(a,"")}})),e.wiki=i},Re={},Ue=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},Be={lines(){return this.data},links(e){let t=[];if(this.lines().forEach((e=>{t=t.concat(e.links())})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},json(e){return e=p(e,Re),this.lines().map((t=>t.json(e)))},text(){return((e,t)=>e.map((e=>" * "+e.text(t))).join("\n"))(this.data)},wikitext(){return this.wiki||""}};Object.keys(Be).forEach((e=>{Ue.prototype[e]=Be[e]}));const Fe=/^[#*:;|]+/,Ke=/^\*+[^:,|]{4}/,We=/^ ?#[^:,|]{4}/,Ze=/[\p{Letter}_0-9\]}]/iu,He=function(e){return Fe.test(e)||Ke.test(e)||We.test(e)},Ye=function(e,t){let i=[];for(let a=t;ae&&Ze.test(e))),i=function(e){let t=1;e=e.filter((e=>e));for(let i=0;ie&&e.trim().length>0)),a=a.map((e=>{let i={wiki:e,lists:[],sentences:[],images:[]};return function(e){let t=e.wiki,i=t.split(/\n/g),a=[],n=[];for(let e=0;e0&&(a.push(t),e+=t.length-1)}else n.push(i[e]);e.lists=a.map((e=>new Ue(e,t))),e.wiki=n.join("\n")}(i),Me(i,t),se(i),new je(i)})),e._wiki=i,e._paragraphs=a},Je="{",Xe=function(e){let t=0,i=[],a=[];for(let n=e.indexOf(Je);-1!==n&&n0?n++:n=e.indexOf(Je,n+1)){let r=e[n];if(r===Je&&(t+=1),t>0){if("}"===r&&(t-=1,0===t)){a.push(r);let e=a.join("");a=[],/\{\{/.test(e)&&/\}\}/.test(e)&&i.push(e);continue}if(1===t&&r!==Je&&"}"!==r){t=0,a=[];continue}a.push(r)}}return i},Qe=function(e){let t=null;return t=/^\{\{[^\n]+\|/.test(e)?(e.match(/^\{\{(.+?)\|/)||[])[1]:-1!==e.indexOf("\n")?(e.match(/^\{\{(.+)\n/)||[])[1]:(e.match(/^\{\{(.+?)\}\}$/)||[])[1],t&&(t=t.replace(/:.*/,""),t=Ee(t)),t||null},et=/\{\{/,tt=function(e){return{body:e=e.replace(/#invoke:/,""),name:Qe(e),children:[]}},it=function(e){let t=e.body.substr(2);return t=t.replace(/\}\}$/,""),e.children=Xe(t),e.children=e.children.map(tt),0===e.children.length||e.children.forEach((e=>{let t=e.body.substr(2);return et.test(t)?it(e):null})),e},at=function(e){let t=Xe(e);return t=t.map(tt),t=t.map(it),t},nt=["anchor","defaultsort","use list-defined references","void","pp","pp-move-indef","pp-semi-indef","pp-vandalism","r","#tag","div col","pope list end","shipwreck list end","starbox end","end box","end","s-end"].reduce(((e,t)=>(e[t]=!0,e)),{});var rt={"gnf protein box":!0,"automatic taxobox":!0,"chembox ":!0,editnotice:!0,geobox:!0,hybridbox:!0,ichnobox:!0,infraspeciesbox:!0,mycomorphbox:!0,oobox:!0,"paraphyletic group":!0,speciesbox:!0,subspeciesbox:!0,"starbox short":!0,taxobox:!0,nhlteamseason:!0,"asian games bid":!0,"canadian federal election results":!0,"dc thomson comic strip":!0,"daytona 24 races":!0,edencharacter:!0,"moldova national football team results":!0,samurai:!0,protein:!0,"sheet authority":!0,"order-of-approx":!0,"bacterial labs":!0,"medical resources":!0,ordination:!0,"hockey team coach":!0,"hockey team gm":!0,"pro hockey team":!0,"hockey team player":!0,"hockey team start":!0,mlbbioret:!0};const ot=new RegExp("^(subst.)?("+g.join("|")+")(?=:| |\n|$)","i");g.forEach((e=>{rt[e]=!0}));const st=/^infobox /i,lt=/ infobox$/i,ct=/^year in [A-Z]/i,ut=function(e={}){let t=e.template.match(ot),i=e.template;t&&t[0]&&(i=i.replace(t[0],"")),i=i.trim();let a={template:"infobox",type:i,data:e};return delete a.data.template,delete a.data.list,a};let pt={imdb:"imdb name","imdb episodess":"imdb episode",localday:"currentday",localdayname:"currentdayname",localyear:"currentyear","birth date based on age at death":"birth based on age as of date","bare anchored list":"anchored list",cvt:"convert",cricon:"flagicon",sfrac:"frac",sqrt:"radic","unreferenced section":"unreferenced",redir:"redirect",sisterlinks:"sister project links","main article":"main"},mt={date:["byline","dateline"],citation:["cite","source","source-pr","source-science"],flagcountry:["cr","cr-rt"],trunc:["str left","str crop"],percentage:["pct","percentage"],rnd:["rndfrac","rndnear"],abbr:["tooltip","abbrv","define"],sfn:["sfnref","harvid","harvnb"],"birth date and age":["death date and age","bda"],currentmonth:["localmonth","currentmonthname","currentmonthabbrev"],currency:["monnaie","unité","nombre","nb","iso4217"],coord:["coor","coor title dms","coor title dec","coor dms","coor dm","coor dec"],"columns-list":["cmn","col-list","columnslist","collist"],nihongo:["nihongo2","nihongo3","nihongo-s","nihongo foot"],plainlist:["flatlist","plain list"],"winning percentage":["winpct","winperc"],"collapsible list":["nblist","nonbulleted list","ubl","ublist","ubt","unbullet","unbulleted list","unbulleted","unbulletedlist","vunblist"],"election box begin":["election box begin no change","election box begin no party","election box begin no party no change","election box inline begin","election box inline begin no change"],"election box candidate":["election box candidate for alliance","election box candidate minor party","election box candidate no party link no change","election box candidate with party link","election box candidate with party link coalition 1918","election box candidate with party link no change","election box inline candidate","election box inline candidate no change","election box inline candidate with party link","election box inline candidate with party link no change","election box inline incumbent"],"4teambracket":["2teambracket","4team2elimbracket","8teambracket","16teambracket","32teambracket","4roundbracket-byes","cwsbracket","nhlbracket","nhlbracket-reseed","4teambracket-nhl","4teambracket-ncaa","4teambracket-mma","4teambracket-mlb","16teambracket-two-reseeds","8teambracket-nhl","8teambracket-mlb","8teambracket-ncaa","8teambracket-afc","8teambracket-afl","8teambracket-tennis3","8teambracket-tennis5","16teambracket-nhl","16teambracket-nhl divisional","16teambracket-nhl-reseed","16teambracket-nba","16teambracket-swtc","16teambracket-afc","16teambracket-tennis3","16teambracket-tennis5"],start:["end","birth","death","start date","end date","birth date","death date","start date and age","end date and age","dob"],"start-date":["end-date","birth-date","death-date","birth-date and age","birth-date and given age","death-date and age","death-date and given age"],tl:["lts","t","tfd links","tiw","tltt","tetl","tsetl","ti","tic","tiw","tlt","ttl","twlh","tl2","tlu","demo","xpd","para","elc","xtag","mli","mlix","#invoke","url"]};Object.keys(z).forEach((e=>{pt["ipa-"+e]="ipa",pt["ipac-"+e]="ipac"})),Object.keys(mt).forEach((e=>{mt[e].forEach((t=>{pt[t]=e}))}));let dt={p1:0,p2:1,p3:2,resize:1,lang:1,"rtl-lang":1,l:2,h:1,sort:1};["defn","lino","finedetail","nobold","noitalic","nocaps","vanchor","rnd","date","taste","monthname","baseball secondary style","lang-de","nowrap","nobr","big","cquote","pull quote","smaller","midsize","larger","big","kbd","bigger","large","mono","strongbad","stronggood","huge","xt","xt2","!xt","xtn","xtd","dc","dcr","mxt","!mxt","mxtn","mxtd","bxt","!bxt","bxtn","bxtd","delink","pre","var","mvar","pre2","code","char","angle bracket","angbr","symb","key press"].forEach((e=>{dt[e]=0})),Object.keys(z).forEach((e=>{dt["lang-"+e]=0}));const ht=function(e){if(!e.numerator&&!e.denominator)return null;let t=Number(e.numerator)/Number(e.denominator);t*=100;let i=Number(e.decimals);return isNaN(i)&&(i=1),Number(t.toFixed(i))},gt=function(e=""){if("number"==typeof e)return e;e=(e=e.replace(/,/g,"")).replace(/−/g,"-");let t=Number(e);return isNaN(t)?e:t},ft=function(e){let t=e.match(/ipac?-(.+)/);return null!==t?!0===z.hasOwnProperty(t[1])?z[t[1]].english_title:t[1]:null},kt=e=>e.charAt(0).toUpperCase()+e.substring(1),bt={wikt:"wiktionary",commons:"commons",c:"commons",commonscat:"commonscat",n:"wikinews",q:"wikiquote",s:"wikisource",a:"wikiauthor",b:"wikibooks",voy:"wikivoyage",v:"wikiversity",d:"wikidata",species:"wikispecies",m:"meta",mw:"mediawiki"};var wt={ra:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},deg2hms:e=>(Pe(e,["degrees"]).degrees||"")+"°",hms2deg:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},decdeg:e=>{let t=Pe(e,["deg","min","sec","hem","rnd"]);return(t.deg||t.degrees)+"°"},sortname:e=>{let t=Pe(e,["first","last","target","sort"]),i=`${t.first||""} ${t.last||""}`;return i=i.trim(),t.nolink?t.target||i:(t.dab&&(i+=` (${t.dab})`,t.target&&(t.target+=` (${t.dab})`)),t.target?`[[${t.target}|${i}]]`:`[[${i}]]`)},"first word":e=>{let t=Pe(e,["text"]),i=t.text;return t.sep?i.split(t.sep)[0]:i.split(" ")[0]},trunc:e=>{let t=Pe(e,["str","len"]);return t.str.substr(0,t.len)},"str mid":e=>{let t=Pe(e,["str","start","end"]),i=parseInt(t.start,10)-1,a=parseInt(t.end,10);return t.str.substr(i,a)},reign:e=>{let t=Pe(e,["start","end"]);return`(r. ${t.start} – ${t.end})`},circa:e=>`c. ${Pe(e,["year"]).year}`,"decade link":e=>{let t=Pe(e,["year"]);return`${t.year}|${t.year}s`},decade:e=>{let t=Pe(e,["year"]),i=Number(t.year);return i=10*Math.floor(i/10),`${i}s`},century:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/100)+1,`${i}`},radic:e=>{let t=Pe(e,["after","before"]);return`${t.before||""}√${t.after||""}`},"medical cases chart/row":e=>e,oldstyledate:e=>{let t=Pe(e,["date","year"]);return t.year?t.date+" "+t.year:t.date},braces:e=>{let t=Pe(e,["text"]),i="";return t.list&&(i="|"+t.list.join("|")),"{{"+(t.text||"")+i+"}}"},hlist:e=>{let t=Pe(e);return t.list=t.list||[],t.list.join(" · ")},pagelist:e=>(Pe(e).list||[]).join(", "),catlist:e=>(Pe(e).list||[]).join(", "),"br separated entries":e=>(Pe(e).list||[]).join("\n\n"),"comma separated entries":e=>(Pe(e).list||[]).join(", "),"anchored list":e=>{let t=Pe(e).list||[];return t=t.map(((e,t)=>`${t+1}. ${e}`)),t.join("\n\n")},"bulleted list":e=>{let t=Pe(e).list||[];return t=t.filter((e=>e)),t=t.map((e=>"• "+e)),t.join("\n\n")},plainlist:e=>{let t=(e=Oe(e)).split("|").slice(1);return t=t.join("|").split(/\n ?\* ?/),t=t.filter((e=>e)),t.join("\n\n")},term:e=>`${Pe(e,["term"]).term}:`,linum:e=>{let t=Pe(e,["num","text"]);return`${t.num}. ${t.text}`},"block indent":e=>{let t=Pe(e);return t[1]?"\n"+t[1]+"\n":""},lbs:e=>{let t=Pe(e,["text"]);return`[[${t.text} Lifeboat Station|${t.text}]]`},lbc:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}-class]]`},lbb:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}]]`},"#dateformat":e=>(e=e.replace(/:/,"|"),Pe(e,["date","format"]).date),lc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toLowerCase()),uc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toUpperCase()),lcfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toLowerCase()+t.substr(1):""},ucfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toUpperCase()+t.substr(1):""},padleft:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padStart(t.num,t.str||"0")},padright:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padEnd(t.num,t.str||"0")},abbrlink:e=>{let t=Pe(e,["abbr","page"]);return t.page?`[[${t.page}|${t.abbr}]]`:`[[${t.abbr}]]`},own:e=>{let t=Pe(e,["author"]),i="Own work";return t.author&&(i+=" by "+t.author),i},formatnum:e=>{e=e.replace(/:/,"|");let t=Pe(e,["number"]).number||"";return t=t.replace(/,/g,""),Number(t).toLocaleString()||""},frac:e=>{let t=Pe(e,["a","b","c"]);return t.c?`${t.a} ${t.b}/${t.c}`:t.b?`${t.a}/${t.b}`:`1/${t.b}`},convert:e=>{let t=Pe(e,["num","two","three","four"]);return"-"===t.two||"to"===t.two||"and"===t.two?t.four?`${t.num} ${t.two} ${t.three} ${t.four}`:`${t.num} ${t.two} ${t.three}`:`${t.num} ${t.two}`},tl:e=>{let t=Pe(e,["first","second"]);return t.second||t.first},won:e=>{let t=Pe(e,["text"]);return t.place||t.text||kt(t.template)},tag:e=>{let t=Pe(e,["tag","open"]);const i={span:!0,div:!0,p:!0};return t.open&&"pair"!==t.open?"":i[t.tag]?t.content||"":`<${t.tag} ${t.attribs||""}>${t.content||""}`},plural:e=>{e=e.replace(/plural:/,"plural|");let t=Pe(e,["num","word"]),i=Number(t.num),a=t.word;return 1!==i&&(/.y$/.test(a)?a=a.replace(/y$/,"ies"):a+="s"),i+" "+a},dec:e=>{let t=Pe(e,["degrees","minutes","seconds"]),i=(t.degrees||0)+"°";return t.minutes&&(i+=t.minutes+"′"),t.seconds&&(i+=t.seconds+"″"),i},val:e=>{let t=Pe(e,["number","uncertainty"]),i=t.number;i&&Number(i)&&(i=Number(i).toLocaleString());let a=i||"";return t.p&&(a=t.p+a),t.s&&(a=t.s+a),(t.u||t.ul||t.upl)&&(a=a+" "+(t.u||t.ul||t.upl)),a},percentage:e=>{let t=Pe(e,["numerator","denominator","decimals"]),i=ht(t);return null===i?"":i+"%"},small:e=>{let t=Pe(e);return t.list&&t.list[0]?t.list[0]:""},"percent-done":e=>{let t=Pe(e,["done","total","digits"]),i=ht({numerator:t.done,denominator:t.total,decimals:t.digits});return null===i?"":`${t.done} (${i}%) done`}},yt=[["🇦🇩","and","andorra"],["🇦🇪","are","united arab emirates"],["🇦🇫","afg","afghanistan"],["🇦🇬","atg","antigua and barbuda"],["🇦🇮","aia","anguilla"],["🇦🇱","alb","albania"],["🇦🇲","arm","armenia"],["🇦🇴","ago","angola"],["🇦🇶","ata","antarctica"],["🇦🇷","arg","argentina"],["🇦🇸","asm","american samoa"],["🇦🇹","aut","austria"],["🇦🇺","aus","australia"],["🇦🇼","abw","aruba"],["🇦🇽","ala","åland islands"],["🇦🇿","aze","azerbaijan"],["🇧🇦","bih","bosnia and herzegovina"],["🇧🇧","brb","barbados"],["🇧🇩","bgd","bangladesh"],["🇧🇪","bel","belgium"],["🇧🇫","bfa","burkina faso"],["🇧🇬","bgr","bulgaria"],["🇧🇬","bul","bulgaria"],["🇧🇭","bhr","bahrain"],["🇧🇮","bdi","burundi"],["🇧🇯","ben","benin"],["🇧🇱","blm","saint barthélemy"],["🇧🇲","bmu","bermuda"],["🇧🇳","brn","brunei darussalam"],["🇧🇴","bol","bolivia"],["🇧🇶","bes","bonaire, sint eustatius and saba"],["🇧🇷","bra","brazil"],["🇧🇸","bhs","bahamas"],["🇧🇹","btn","bhutan"],["🇧🇻","bvt","bouvet island"],["🇧🇼","bwa","botswana"],["🇧🇾","blr","belarus"],["🇧🇿","blz","belize"],["🇨🇦","can","canada"],["🇨🇨","cck","cocos (keeling) islands"],["🇨🇩","cod","congo"],["🇨🇫","caf","central african republic"],["🇨🇬","cog","congo"],["🇨🇭","che","switzerland"],["🇨🇮","civ","côte d'ivoire"],["🇨🇰","cok","cook islands"],["🇨🇱","chl","chile"],["🇨🇲","cmr","cameroon"],["🇨🇳","chn","china"],["🇨🇴","col","colombia"],["🇨🇷","cri","costa rica"],["🇨🇺","cub","cuba"],["🇨🇻","cpv","cape verde"],["🇨🇼","cuw","curaçao"],["🇨🇽","cxr","christmas island"],["🇨🇾","cyp","cyprus"],["🇨🇿","cze","czech republic"],["🇩🇪","deu","germany"],["🇩🇪","ger","germany"],["🇩🇯","dji","djibouti"],["🇩🇰","dnk","denmark"],["🇩🇲","dma","dominica"],["🇩🇴","dom","dominican republic"],["🇩🇿","dza","algeria"],["🇪🇨","ecu","ecuador"],["🇪🇪","est","estonia"],["🇪🇬","egy","egypt"],["🇪🇭","esh","western sahara"],["🇪🇷","eri","eritrea"],["🇪🇸","esp","spain"],["🇪🇹","eth","ethiopia"],["🇫🇮","fin","finland"],["🇫🇯","fji","fiji"],["🇫🇰","flk","falkland islands (malvinas)"],["🇫🇲","fsm","micronesia"],["🇫🇴","fro","faroe islands"],["🇫🇷","fra","france"],["🇬🇦","gab","gabon"],["🇬🇧","gbr","united kingdom"],["🇬🇩","grd","grenada"],["🇬🇫","guf","french guiana"],["🇬🇬","ggy","guernsey"],["🇬🇭","gha","ghana"],["🇬🇮","gib","gibraltar"],["🇬🇱","grl","greenland"],["🇬🇲","gmb","gambia"],["🇬🇳","gin","guinea"],["🇬🇵","glp","guadeloupe"],["🇬🇶","gnq","equatorial guinea"],["🇬🇷","grc","greece"],["🇬🇸","sgs","south georgia"],["🇬🇹","gtm","guatemala"],["🇬🇺","gum","guam"],["🇬🇼","gnb","guinea-bissau"],["🇬🇾","guy","guyana"],["🇭🇰","hkg","hong kong"],["🇭🇲","hmd","heard island and mcdonald islands"],["🇭🇳","hnd","honduras"],["🇭🇷","hrv","croatia"],["🇭🇹","hti","haiti"],["🇭🇺","hun","hungary"],["🇮🇩","idn","indonesia"],["🇮🇪","irl","ireland"],["🇮🇱","isr","israel"],["🇮🇲","imn","isle of man"],["🇮🇳","ind","india"],["🇮🇴","iot","british indian ocean territory"],["🇮🇶","irq","iraq"],["🇮🇷","irn","iran"],["🇮🇸","isl","iceland"],["🇮🇹","ita","italy"],["🇯🇪","jey","jersey"],["🇯🇲","jam","jamaica"],["🇯🇴","jor","jordan"],["🇯🇵","jpn","japan"],["🇰🇪","ken","kenya"],["🇰🇬","kgz","kyrgyzstan"],["🇰🇭","khm","cambodia"],["🇰🇮","kir","kiribati"],["🇰🇲","com","comoros"],["🇰🇳","kna","saint kitts and nevis"],["🇰🇵","prk","north korea"],["🇰🇷","kor","south korea"],["🇰🇼","kwt","kuwait"],["🇰🇾","cym","cayman islands"],["🇰🇿","kaz","kazakhstan"],["🇱🇦","lao","lao people's democratic republic"],["🇱🇧","lbn","lebanon"],["🇱🇨","lca","saint lucia"],["🇱🇮","lie","liechtenstein"],["🇱🇰","lka","sri lanka"],["🇱🇷","lbr","liberia"],["🇱🇸","lso","lesotho"],["🇱🇹","ltu","lithuania"],["🇱🇺","lux","luxembourg"],["🇱🇻","lva","latvia"],["🇱🇾","lby","libya"],["🇲🇦","mar","morocco"],["🇲🇨","mco","monaco"],["🇲🇩","mda","moldova"],["🇲🇪","mne","montenegro"],["🇲🇫","maf","saint martin (french part)"],["🇲🇬","mdg","madagascar"],["🇲🇭","mhl","marshall islands"],["🇲🇰","mkd","macedonia"],["🇲🇱","mli","mali"],["🇲🇲","mmr","myanmar"],["🇲🇳","mng","mongolia"],["🇲🇴","mac","macao"],["🇲🇵","mnp","northern mariana islands"],["🇲🇶","mtq","martinique"],["🇲🇷","mrt","mauritania"],["🇲🇸","msr","montserrat"],["🇲🇹","mlt","malta"],["🇲🇺","mus","mauritius"],["🇲🇻","mdv","maldives"],["🇲🇼","mwi","malawi"],["🇲🇽","mex","mexico"],["🇲🇾","mys","malaysia"],["🇲🇿","moz","mozambique"],["🇳🇦","nam","namibia"],["🇳🇨","ncl","new caledonia"],["🇳🇪","ner","niger"],["🇳🇫","nfk","norfolk island"],["🇳🇬","nga","nigeria"],["🇳🇮","nic","nicaragua"],["🇳🇱","nld","netherlands"],["🇳🇴","nor","norway"],["🇳🇵","npl","nepal"],["🇳🇷","nru","nauru"],["🇳🇺","niu","niue"],["🇳🇿","nzl","new zealand"],["🇴🇲","omn","oman"],["🇵🇦","pan","panama"],["🇵🇪","per","peru"],["🇵🇫","pyf","french polynesia"],["🇵🇬","png","papua new guinea"],["🇵🇭","phl","philippines"],["🇵🇰","pak","pakistan"],["🇵🇱","pol","poland"],["🇵🇲","spm","saint pierre and miquelon"],["🇵🇳","pcn","pitcairn"],["🇵🇷","pri","puerto rico"],["🇵🇸","pse","palestinian territory"],["🇵🇹","prt","portugal"],["🇵🇼","plw","palau"],["🇵🇾","pry","paraguay"],["🇶🇦","qat","qatar"],["🇷🇪","reu","réunion"],["🇷🇴","rou","romania"],["🇷🇸","srb","serbia"],["🇷🇺","rus","russia"],["🇷🇼","rwa","rwanda"],["🇸🇦","sau","saudi arabia"],["🇸🇧","slb","solomon islands"],["🇸🇨","syc","seychelles"],["🇸🇩","sdn","sudan"],["🇸🇪","swe","sweden"],["🇸🇬","sgp","singapore"],["🇸🇭","shn","saint helena, ascension and tristan da cunha"],["🇸🇮","svn","slovenia"],["🇸🇯","sjm","svalbard and jan mayen"],["🇸🇰","svk","slovakia"],["🇸🇱","sle","sierra leone"],["🇸🇲","smr","san marino"],["🇸🇳","sen","senegal"],["🇸🇴","som","somalia"],["🇸🇷","sur","suriname"],["🇸🇸","ssd","south sudan"],["🇸🇹","stp","sao tome and principe"],["🇸🇻","slv","el salvador"],["🇸🇽","sxm","sint maarten (dutch part)"],["🇸🇾","syr","syrian arab republic"],["🇸🇿","swz","swaziland"],["🇹🇨","tca","turks and caicos islands"],["🇹🇩","tcd","chad"],["🇹🇫","atf","french southern territories"],["🇹🇬","tgo","togo"],["🇹🇭","tha","thailand"],["🇹🇯","tjk","tajikistan"],["🇹🇰","tkl","tokelau"],["🇹🇱","tls","timor-leste"],["🇹🇲","tkm","turkmenistan"],["🇹🇳","tun","tunisia"],["🇹🇴","ton","tonga"],["🇹🇷","tur","turkey"],["🇹🇹","tto","trinidad and tobago"],["🇹🇻","tuv","tuvalu"],["🇹🇼","twn","taiwan"],["🇹🇿","tza","tanzania"],["🇺🇦","ukr","ukraine"],["🇺🇬","uga","uganda"],["🇺🇲","umi","united states minor outlying islands"],["🇺🇸","us","united states"],["🇺🇸","usa","united states"],["🇺🇾","ury","uruguay"],["🇺🇿","uzb","uzbekistan"],["🇻🇦","vat","vatican city"],["🇻🇨","vct","saint vincent and the grenadines"],["🇻🇪","ven","venezuela"],["🇻🇬","vgb","virgin islands, british"],["🇻🇮","vir","virgin islands, u.s."],["🇻🇳","vnm","viet nam"],["🇻🇺","vut","vanuatu"],["🇼🇫","wlf","wallis and futuna"],["🇼🇸","wsm","samoa"],["🇾🇪","yem","yemen"],["🇾🇹","myt","mayotte"],["🇿🇦","zaf","south africa"],["🇿🇲","zmb","zambia"],["🇿🇼 ","zwe","zimbabwe"],["🇺🇳","un","united nations"],["🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿","eng","england"],["🏴󠁧󠁢󠁳󠁣󠁴󠁿","sct","scotland"],["🏴󠁧󠁢󠁷󠁬󠁳󠁿","wal","wales"],["🇪🇺","eu","european union"]];let $t={flag:e=>{let t=Pe(e,["flag","variant"]),i=t.flag||"";t.flag=(t.flag||"").toLowerCase();let a=yt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${a[0]||""} [[${a[2]}|${i}]]`},flagcountry:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=yt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} [[${i[2]}]]`},flagcu:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=yt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} ${i[2]}`},flagicon:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=yt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`[[${i[2]}|${i[0]}]]`:""},flagdeco:e=>{let t=Pe(e,["flag","variant"]);return t.flag=(t.flag||"").toLowerCase(),(yt.find((e=>t.flag===e[1]||t.flag===e[2]))||[])[0]||""},fb:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=yt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${i[2]} national football team|${i[2]}]]`:""},fbicon:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=yt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?` [[${i[2]} national football team|${i[0]}]]`:""},flagathlete:e=>{let t=Pe(e,["name","flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=yt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${t.name||""}]] (${i[1].toUpperCase()})`:`[[${t.name||""}]]`}};yt.forEach((e=>{$t[e[1]]=()=>e[0]}));let xt={};["rh","rh2","yes","no","maybe","eliminated","lost","safe","active","site active","coming soon","good","won","nom","sho","longlisted","tba","success","operational","failure","partial","regional","maybecheck","partial success","partial failure","okay","yes-no","some","nonpartisan","pending","unofficial","unofficial2","usually","rarely","sometimes","any","varies","black","non-album single","unreleased","unknown","perhaps","depends","included","dropped","terminated","beta","table-experimental","free","proprietary","nonfree","needs","nightly","release-candidate","planned","scheduled","incorrect","no result","cmain","calso starring","crecurring","cguest","not yet","optional"].forEach((e=>{xt[e]=e=>{let t=Pe(e,["text"]);return t.text||kt(t.template)}}));[["active fire","Active"],["site active","Active"],["site inactive","Inactive"],["yes2",""],["no2",""],["ya","✅"],["na","❌"],["nom","Nominated"],["sho","Shortlisted"],["tba","TBA"],["maybecheck","✔️"],["okay","Neutral"],["n/a","N/A"],["sdash","—"],["dunno","?"],["draw",""],["cnone",""],["nocontest",""]].forEach((e=>{xt[e[0]]=t=>Pe(t,["text"]).text||e[1]}));var vt=Object.assign({},{"·":"·",dot:"·",middot:"·","•":" • ",",":",","1/2":"1⁄2","1/3":"1⁄3","2/3":"2⁄3","1/4":"1⁄4","3/4":"3⁄4","–":"–",ndash:"–","en dash":"–","spaced ndash":" – ","—":"—",mdash:"—","em dash":"—","number sign":"#",ibeam:"I","&":"&",";":";",ampersand:"&",snds:" – ",snd:" – ","^":" ","!":"|","\\":" /","`":"`","=":"=",bracket:"[","[":"[","*":"*",asterisk:"*","long dash":"———",clear:"\n\n","h.":"ḥ",profit:"▲",loss:"▼",gain:"▲"},dt,wt,$t,xt);let jt={};["goodreads author","twitter","facebook","instagram","tumblr","pinterest","espn nfl","espn nhl","espn fc","hockeydb","fifa player","worldcat","worldcat id","nfl player","ted speaker","playmate"].forEach((e=>{jt[e]=["id","name"]}));let _t={};["imdb title","imdb name","imdb episode","imdb event","afi film","allmovie title","allgame","tcmdb title","discogs artist","discogs label","discogs release","discogs master","librivox author","musicbrainz artist","musicbrainz label","musicbrainz recording","musicbrainz release","musicbrainz work","youtube","goodreads book","dmoz"].forEach((e=>{_t[e]=["id","title","description","section"]}));var zt={ipa:(e,t)=>{let i=Pe(e,["transcription","lang","audio"]);return i.lang=ft(i.template),i.template="ipa",t.push(i),""},ipac:(e,t)=>{let i=Pe(e);return i.transcription=(i.list||[]).join(","),delete i.list,i.lang=ft(i.template),i.template="ipac",t.push(i),""},quote:(e,t)=>{let i=Pe(e,["text","author"]);if(t.push(i),i.text){let e=`"${i.text}"`;return i.author&&(e+="\n\n",e+=` - ${i.author}`),e+"\n"}return""},"cite gnis":(e,t)=>{let i=Pe(e,["id","name","type"]);return i.type="gnis",i.template="citation",t.push(i),""},"spoken wikipedia":(e,t)=>{let i=Pe(e,["file","date"]);return i.template="audio",t.push(i),""},yel:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`yellow: ${i.min||""}'`:""},subon:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub on: ${i.min||""}'`:""},suboff:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub off: ${i.min||""}'`:""},sfn:(e,t,i,a)=>{let n=Pe(e,["author","year","location"]);return a&&(n.name=n.template,n.teplate=a),t.push(n),""},redirect:(e,t)=>{let i=Pe(e,["redirect"]),a=i.list||[],n=[];for(let e=0;e{let i=Pe(e),a={};Object.keys(bt).forEach((e=>{!0===i.hasOwnProperty(e)&&(a[bt[e]]=i[e])}));let n={template:"sister project links",links:a};return t.push(n),""},"subject bar":(e,t)=>{let i=Pe(e);Object.keys(i).forEach((e=>{bt.hasOwnProperty(e)&&(i[bt[e]]=i[e],delete i[e])}));let a={template:"subject bar",links:i};return t.push(a),""},gallery:(e,t)=>{let i=Pe(e),a=(i.list||[]).filter((e=>/^ *File ?:/.test(e)));return a=a.map((e=>new j({file:e}).json())),i={template:"gallery",images:a},t.push(i),""},sky:(e,t)=>{let i=Pe(e,["asc_hours","asc_minutes","asc_seconds","dec_sign","dec_degrees","dec_minutes","dec_seconds","distance"]),a={template:"sky",ascension:{hours:i.asc_hours,minutes:i.asc_minutes,seconds:i.asc_seconds},declination:{sign:i.dec_sign,degrees:i.dec_degrees,minutes:i.dec_minutes,seconds:i.dec_seconds},distance:i.distance};return t.push(a),""},"medical cases chart":(e,t)=>{let i=["date","deathsExpr","recoveriesExpr","casesExpr","4thExpr","5thExpr","col1","col1Change","col2","col2Change"],a=Pe(e);a.data=a.data||"";let n=a.data.split("\n").map((e=>{let t=e.split(";"),a={options:new Map},n=0;for(let e=0;e{let i=Pe(e);i.x&&(i.x=i.x.split(",").map((e=>e.trim()))),i.y&&(i.y=i.y.split(",").map((e=>e.trim())));let a=1;for(;i["y"+a];)i["y"+a]=i["y"+a].split(",").map((e=>e.trim())),a+=1;return t.push(i),""},"historical populations":(e,t)=>{let i=Pe(e);i.list=i.list||[];let a=[];for(let e=0;e{const i=/^jan /i,a=/^year /i;let n=Pe(e);const r=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];let o={},s=Object.keys(n).filter((e=>i.test(e)));s=s.map((e=>e.replace(i,""))),s.forEach((e=>{o[e]=[],r.forEach((t=>{let i=`${t} ${e}`;if(n.hasOwnProperty(i)){let t=gt(n[i]);delete n[i],o[e].push(t)}}))})),n.byMonth=o;let l={};return Object.keys(n).forEach((e=>{if(a.test(e)){let t=e.replace(a,"");l[t]=n[e],delete n[e]}})),n.byYear=l,t.push(n),""},"weather box/concise c":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>gt(e))),i.byMonth={"high c":i.list.slice(0,12),"low c":i.list.slice(12,24),"rain mm":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"weather box/concise f":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>gt(e))),i.byMonth={"high f":i.list.slice(0,12),"low f":i.list.slice(12,24),"rain inch":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"climate chart":(e,t)=>{let i=Pe(e).list||[],a=i[0],n=i[38];i=i.slice(1),i=i.map((e=>(e&&"−"===e[0]&&(e=e.replace(/−/,"-")),e)));let r=[];for(let e=0;e<36;e+=3)r.push({low:gt(i[e]),high:gt(i[e+1]),precip:gt(i[e+2])});let o={template:"climate chart",data:{title:a,source:n,months:r}};return t.push(o),""}};let Ot={"find a grave":["id","name","work","last","first","date","accessdate"],congbio:["id","name","date"],"hollywood walk of fame":["name"],"wide image":["file","width","caption"],audio:["file","text","type"],rp:["page"],"short description":["description"],"coord missing":["region"],unreferenced:["date"],"taxon info":["taxon","item"],"portuguese name":["first","second","suffix"],geo:["lat","lon","zoom"],hatnote:["text"]};Ot=Object.assign(Ot,jt,_t,zt);var Et=Ot;var St={mlbplayer:{props:["number","name","il"],out:"name"},syntaxhighlight:{props:[],out:"code"},samp:{props:["1"],out:"1"},sub:{props:["text"],out:"text"},sup:{props:["text"],out:"text"},chem2:{props:["equation"],out:"equation"},ill:{props:["text","lan1","text1","lan2","text2"],out:"text"},abbr:{props:["abbr","meaning","ipa"],out:"abbr"}};let Ct={math:(e,t)=>{let i=Pe(e,["formula"]);return t.push(i),"\n\n"+(i.formula||"")+"\n\n"},legend:(e,t)=>{let i=Pe(e,["color","label"]);return t.push(i),e},isbn:(e,t)=>{let i=Pe(e,["id","id2","id3"]);return t.push(i),"ISBN: "+(i.id||"")},"based on":(e,t)=>{let i=Pe(e,["title","author"]);return t.push(i),`${i.title} by ${i.author||""}`},"bbl to t":(e,t)=>{let i=Pe(e,["barrels"]);return t.push(i),"0"===i.barrels?i.barrels+" barrel":i.barrels+" barrels"},mpc:(e,t)=>{let i=Pe(e,["number","text"]);return t.push(i),`[https://minorplanetcenter.net/db_search/show_object?object_id=P/2011+NO1 ${i.text||i.number}]`},pengoal:(e,t)=>(t.push({template:"pengoal"}),"✅"),penmiss:(e,t)=>(t.push({template:"penmiss"}),"❌"),"ordered list":(e,t)=>{let i=Pe(e);return t.push(i),i.list=i.list||[],i.list.map(((e,t)=>`${t+1}. ${e}`)).join("\n\n")},"title year":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b[0-9]{4}\b/);if(e)return e[0]}return r.nomatch||""},"title century":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)(st|nd|rd|th)\b/);if(e)return e[1]||""}return r.nomatch||""},"title decade":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)s\b/);if(e)return e[1]||""}return r.nomatch||""},nihongo:(e,t)=>{let i=Pe(e,["english","kanji","romaji","extra"]);t.push(i);let a=i.english||i.romaji||"";return i.kanji&&(a+=` (${i.kanji})`),a},marriage:(e,t)=>{let i=Pe(e,["spouse","from","to","end"]);t.push(i);let a=i.spouse||"";return i.from&&(i.to?a+=` (m. ${i.from}-${i.to})`:a+=` (m. ${i.from})`),a},"sent off":(e,t)=>{let i=Pe(e,["cards"]),a={template:"sent off",cards:i.cards,minutes:i.list||[]};return t.push(a),"sent off: "+a.minutes.map((e=>e+"'")).join(", ")},transl:(e,t)=>{let i=Pe(e,["lang","text","text2"]);return i.text2&&(i.iso=i.text,i.text=i.text2,delete i.text2),t.push(i),i.text||""},"collapsible list":(e,t)=>{let i=Pe(e);t.push(i);let a="";if(i.title&&(a+=`'''${i.title}'''\n\n`),!i.list){i.list=[];for(let e=1;e<10;e+=1)i[e]&&(i.list.push(i[e]),delete i[e])}return i.list=i.list.filter((e=>e)),a+=i.list.join("\n\n"),a},"columns-list":(e,t)=>{let i=((Pe(e).list||[])[0]||"").split(/\n/).filter((e=>e));return i=i.map((e=>e.replace(/\*/,""))),t.push({template:"columns-list",list:i}),i=i.map((e=>"• "+e)),i.join("\n\n")},height:(e,t)=>{let i=Pe(e);t.push(i);let a=[];return["m","cm","ft","in"].forEach((e=>{!0===i.hasOwnProperty(e)&&a.push(i[e]+e)})),a.join(" ")},sic:(e,t)=>{let i=Pe(e,["one","two","three"]),a=(i.one||"")+(i.two||"");return"?"===i.one&&(a=(i.two||"")+(i.three||"")),t.push({template:"sic",word:a}),"y"===i.nolink?a:`${a} [sic]`},inrconvert:(e,t)=>{let i=Pe(e,["rupee_value","currency_formatting"]);t.push(i);const a={k:1e3,m:1e6,b:1e9,t:1e12,l:1e5,c:1e7,lc:1e12};if(i.currency_formatting){let e=a[i.currency_formatting]||1;i.rupee_value=i.rupee_value*e}return`inr ${i.rupee_value||""}`},frac:(e,t)=>{let i=Pe(e,["a","b","c"]),a={template:"sfrac"};return i.c?(a.integer=i.a,a.numerator=i.b,a.denominator=i.c):i.b?(a.numerator=i.a,a.denominator=i.b):(a.numerator=1,a.denominator=i.a),t.push(a),a.integer?`${a.integer} ${a.numerator}⁄${a.denominator}`:`${a.numerator}⁄${a.denominator}`},"winning percentage":(e,t)=>{let i=Pe(e,["wins","losses","ties"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=Number(i.ties)||0,o=a+n+r;"y"===i.ignore_ties&&(r=0),r&&(a+=r/2);let s=ht({numerator:a,denominator:o,decimals:1});return null===s?"":"."+10*s},winlosspct:(e,t)=>{let i=Pe(e,["wins","losses"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=ht({numerator:a,denominator:a+n,decimals:1});return null===r?"":`${a||0} || ${n||0} || ${"."+10*r||"-"}`},"video game release":(e,t)=>{let i=["region","date","region2","date2","region3","date3","region4","date4"],a=Pe(e,i),n={template:"video game release",releases:[]};for(let e=0;e`${e.region}: ${e.date||""}`)).join("\n\n")+"\n"},uss:(e,t)=>{let i=Pe(e,["name","id"]);return t.push(i),i.id?`[[USS ${i.name} (${i.id})|USS ''${i.name}'' (${i.id})]]`:`[[USS ${i.name}|USS ''${i.name}'']]`},blockquote:(e,t)=>{let i=Pe(e,["text","author","title","source","character"]);t.push(i);let a=i.text;a||(i.list=i.list||[],a=i.list[0]||"");let n=a.replace(/"/g,"'");return n='"'+n+'"',n}};const qt={"£":"GB£","¥":"¥","৳":"৳","₩":"₩","€":"€","₱":"₱","₹":"₹","₽":"₽","cn¥":"CN¥","gb£":"GB£","india rs":"₹","indian rupee symbol":"₹","indian rupee":"₹","indian rupees":"₹","philippine peso":"₱","russian ruble":"₽","SK won":"₩","turkish lira":"TRY",a$:"A$",au$:"A$",aud:"A$",bdt:"BDT",brl:"BRL",ca$:"CA$",cad:"CA$",chf:"CHF",cny:"CN¥",czk:"czk",dkk:"dkk",dkk2:"dkk",euro:"€",gbp:"GB£",hk$:"HK$",hkd:"HK$",ils:"ILS",inr:"₹",jpy:"¥",myr:"MYR",nis:"ILS",nok:"NOK",nok2:"NOK",nz$:"NZ$",nzd:"NZ$",peso:"peso",pkr:"₨",r$:"BRL",rmb:"CN¥",rub:"₽",ruble:"₽",rupee:"₹",s$:"sgd",sek:"SEK",sek2:"SEK",sfr:"CHF",sgd:"sgd",shekel:"ILS",sheqel:"ILS",ttd:"TTD",us$:"US$",usd:"US$",yen:"¥",zar:"R"},Nt=(e,t)=>{let i=Pe(e,["amount","code"]);t.push(i);let a=i.template||"";"currency"===a?(a=i.code,a||(i.code=a="usd")):""!==a&&"monnaie"!==a&&"unité"!==a&&"nombre"!==a&&"nb"!==a||(a=i.code),a=(a||"").toLowerCase(),"us"===a?i.code=a="usd":"uk"===a&&(i.code=a="gbp");let n=`${qt[a]||""}${i.amount||""}`;return i.code&&!qt[i.code.toLowerCase()]&&(n+=" "+i.code),n};let Lt={currency:Nt};Object.keys(qt).forEach((e=>{Lt[e]=Nt}));const Pt=function(e){let t=e%10,i=e%100;return 1===t&&11!==i?e+"st":2===t&&12!==i?e+"nd":3===t&&13!==i?e+"rd":e+"th"},At=864e5,Tt=30*At,Dt=365*At,It=function(e){return new Date(`${e.year}-${e.month||0}-${e.date||1}`).getTime()},Mt=function(e,t){e=It(e);let i=(t=It(t))-e,a={},n=Math.floor(i/Dt);n>0&&(a.years=n,i-=a.years*Dt);let r=Math.floor(i/Tt);r>0&&(a.months=r,i-=a.months*Tt);let o=Math.floor(i/At);return o>0&&(a.days=o),a},Rt=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ut=[void 0,"January","February","March","April","May","June","July","August","September","October","November","December"],Bt=Ut.reduce(((e,t,i)=>(0===i||(e[t.toLowerCase()]=i),e)),{}),Ft=function(e){let t={},i=["year","month","date","hour","minute","second"];for(let a=0;a{let i=Pe(e,["year","month","date","hour","minute","second","timezone"]),a=Ft([i.year,i.month,i.date||i.day]);return i.text=Wt(a),i.timezone&&("Z"===i.timezone&&(i.timezone="UTC"),i.text+=` (${i.timezone})`),i.hour&&i.minute&&(i.second?i.text=`${i.hour}:${i.minute}:${i.second}, `+i.text:i.text=`${i.hour}:${i.minute}, `+i.text),i.text&&t.push(Zt(i)),i.text},natural_date:(e,t)=>{let i=Pe(e,["text"]).text||"",a={};if(/^[0-9]{4}$/.test(i))a.year=parseInt(i,10);else{let e=i.replace(/[a-z]+\/[a-z]+/i,"");e=e.replace(/[0-9]+:[0-9]+(am|pm)?/i,"");let t=new Date(e);!1===isNaN(t.getTime())&&(a.year=t.getFullYear(),a.month=t.getMonth()+1,a.date=t.getDate())}return t.push(Zt(a)),i.trim()},one_year:(e,t)=>{let i=Pe(e,["year"]),a=Number(i.year);return t.push(Zt({year:a})),String(a)},two_dates:(e,t)=>{let i=Pe(e,["b","birth_year","birth_month","birth_date","death_year","death_month","death_date"]);if(i.b&&"b"===i.b.toLowerCase()){let e=Ft([i.birth_year,i.birth_month,i.birth_date]);return t.push(Zt(e)),Wt(e)}let a=Ft([i.death_year,i.death_month,i.death_date]);return t.push(Zt(a)),Wt(a)},age:e=>{let t=Ht(e);return Mt(t.from,t.to).years||0},"diff-y":e=>{let t=Ht(e),i=Mt(t.from,t.to);return 1===i.years?i.years+" year":(i.years||0)+" years"},"diff-ym":e=>{let t=Ht(e),i=Mt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),a.join(", ")},"diff-ymd":e=>{let t=Ht(e),i=Mt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-yd":e=>{let t=Ht(e),i=Mt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-d":e=>{let t=Ht(e),i=Mt(t.from,t.to),a=[];return i.days+=365*(i.years||0),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")}},Gt=["January","February","March","April","May","June","July","August","September","October","November","December"];var Vt={currentday:()=>{let e=new Date;return String(e.getDate())},currentdayname:()=>{let e=new Date;return Rt[e.getDay()]},currentmonth:()=>{let e=new Date;return Gt[e.getMonth()]},currentyear:()=>{let e=new Date;return String(e.getFullYear())},monthyear:()=>{let e=new Date;return Gt[e.getMonth()]+" "+e.getFullYear()},"monthyear-1":()=>{let e=new Date;return e.setMonth(e.getMonth()-1),Gt[e.getMonth()]+" "+e.getFullYear()},"monthyear+1":()=>{let e=new Date;return e.setMonth(e.getMonth()+1),Gt[e.getMonth()]+" "+e.getFullYear()},"time ago":e=>function(e){let t=new Date(e);if(isNaN(t.getTime()))return"";let i=(new Date).getTime()-t.getTime(),a="ago";i<0&&(a="from now",i=Math.abs(i));let n=i/1e3/60/60/24;return n<365?Number(n)+" days "+a:Number(n/365)+" years "+a}(Pe(e,["date","fmt"]).date),"birth date and age":(e,t)=>{let i=Pe(e,["year","month","day"]);return i.year&&/[a-z]/i.test(i.year)?Yt.natural_date(e,t):(t.push(i),i=Ft([i.year,i.month,i.day]),Wt(i))},"birth year and age":(e,t)=>{let i=Pe(e,["birth_year","birth_month"]);if(i.death_year&&/[a-z]/i.test(i.death_year))return Yt.natural_date(e,t);t.push(i);let a=(new Date).getFullYear()-parseInt(i.birth_year,10);i=Ft([i.birth_year,i.birth_month]);let n=Wt(i);return a&&(n+=` (age ${a})`),n},"death year and age":(e,t)=>{let i=Pe(e,["death_year","birth_year","death_month"]);return i.death_year&&/[a-z]/i.test(i.death_year)?Yt.natural_date(e,t):(t.push(i),i=Ft([i.death_year,i.death_month]),Wt(i))},"birth date and age2":(e,t)=>{let i=Pe(e,["at_year","at_month","at_day","birth_year","birth_month","birth_day"]);return t.push(i),i=Ft([i.birth_year,i.birth_month,i.birth_day]),Wt(i)},"birth based on age as of date":(e,t)=>{let i=Pe(e,["age","year","month","day"]);t.push(i);let a=parseInt(i.age,10),n=parseInt(i.year,10)-a;return n&&a?`${n} (age ${i.age})`:`(age ${i.age})`},"death date and given age":(e,t)=>{let i=Pe(e,["year","month","day","age"]);t.push(i),i=Ft([i.year,i.month,i.day]);let a=Wt(i);return i.age&&(a+=` (age ${i.age})`),a},dts:e=>{e=(e=e.replace(/\|format=[ymd]+/i,"")).replace(/\|abbr=(on|off)/i,"");let t=Pe(e,["year","month","date","bc"]);return t.date&&t.month&&t.year?!0===/[a-z]/.test(t.month)?[t.month,t.date,t.year].join(" "):[t.year,t.month,t.date].join("-"):t.month&&t.year?[t.year,t.month].join("-"):t.year?(t.year<0&&(t.year=Math.abs(t.year)+" BC"),t.year):""},time:()=>{let e=new Date,t=Ft([e.getFullYear(),e.getMonth(),e.getDate()]);return Wt(t)},millennium:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/1e3)+1,t.abbr&&"y"===t.abbr?i<0?`${Pt(Math.abs(i))} BC`:`${Pt(i)}`:`${Pt(i)} millennium`},start:Yt.date,"start-date":Yt.natural_date,birthdeathage:Yt.two_dates,age:Yt.age,"age nts":Yt.age,"age in years":Yt["diff-y"],"age in years and months":Yt["diff-ym"],"age in years, months and days":Yt["diff-ymd"],"age in years and days":Yt["diff-yd"],"age in days":Yt["diff-d"]};function Jt(e){let t=e.pop(),i=Number(e[0]||0),a=Number(e[1]||0),n=Number(e[2]||0);if("string"!=typeof t||isNaN(i))return null;let r=1;return/[SW]/i.test(t)&&(r=-1),r*(i+a/60+n/3600)}const Xt=function(e){if("number"!=typeof e)return e;let t=1e5;return Math.round(e*t)/t},Qt={s:!0,w:!0},ei=function(e){let t=Pe(e);t=function(e){return e.list=e.list||[],e.list=e.list.map((t=>{let i=Number(t);if(!isNaN(i))return i;let a=t.split(/:/);return a.length>1?(e.props=e.props||{},e.props[a[0]]=a.slice(1).join(":"),null):t})),e.list=e.list.filter((e=>null!==e)),e}(t);let i=function(e){const t=e.map((e=>typeof e)).join("|");return 2===e.length&&"number|number"===t?{lat:e[0],lon:e[1]}:4===e.length&&"number|string|number|string"===t?(Qt[e[1].toLowerCase()]&&(e[0]*=-1),"w"===e[3].toLowerCase()&&(e[2]*=-1),{lat:e[0],lon:e[2]}):6===e.length?{lat:Jt(e.slice(0,3)),lon:Jt(e.slice(3))}:8===e.length?{lat:Jt(e.slice(0,4)),lon:Jt(e.slice(4))}:{}}(t.list);return t.lat=Xt(i.lat),t.lon=Xt(i.lon),t.template="coord",delete t.list,t},ti={coord:(e,t)=>{let i=ei(e);return t.push(i),i.display&&-1===i.display.indexOf("inline")?"":`${i.lat||""}°N, ${i.lon||""}°W`}},ii=function(e,t,i,a){let n=Pe(e);return a&&(n.name=n.template,n.template=a),t.push(n),""},ai={persondata:ii,taxobox:ii,citation:ii,portal:ii,reflist:ii,"cite book":ii,"cite journal":ii,"cite web":ii,"commons cat":ii,"election box candidate":ii,"election box begin":ii,main:ii},ni={adx:"adx",aim:"aim",amex:"amex",asx:"asx",athex:"athex",b3:"b3","B3 (stock exchange)":"B3 (stock exchange)",barbadosse:"barbadosse",bbv:"bbv",bcba:"bcba",bcs:"bcs",bhse:"bhse",bist:"bist",bit:"bit","bm&f bovespa":"b3","bm&f":"b3",bmad:"bmad",bmv:"bmv","bombay stock exchange":"bombay stock exchange","botswana stock exchange":"botswana stock exchange",bpse:"bpse",bse:"bse",bsx:"bsx",bvb:"bvb",bvc:"bvc",bvl:"bvl",bvpasa:"bvpasa",bwse:"bwse","canadian securities exchange":"canadian securities exchange",cse:"cse",darse:"darse",dfm:"dfm",dse:"dse",euronext:"euronext",euronextparis:"euronextparis",fse:"fse",fwb:"fwb",gse:"gse",gtsm:"gtsm",idx:"idx",ise:"ise",iseq:"iseq",isin:"isin",jasdaq:"jasdaq",jse:"jse",kase:"kase",kn:"kn",krx:"krx",lse:"lse",luxse:"luxse","malta stock exchange":"malta stock exchange",mai:"mai",mcx:"mcx",mutf:"mutf",myx:"myx",nag:"nag","nasdaq dubai":"nasdaq dubai",nasdaq:"nasdaq",neeq:"neeq",nepse:"nepse",nex:"nex",nse:"nse",newconnect:"newconnect","nyse arca":"nyse arca",nyse:"nyse",nzx:"nzx","omx baltic":"omx baltic",omx:"omx",ose:"ose","otc expert":"otc expert","otc grey":"otc grey","otc pink":"otc pink",otcqb:"otcqb",otcqx:"otcqx","pfts ukraine stock exchange":"pfts ukraine stock exchange","philippine stock exchange":"philippine stock exchange",prse:"prse",psx:"psx",karse:"karse",qe:"qe","saudi stock exchange":"saudi stock exchange",sehk:"sehk","Stock Exchange of Thailand":"Stock Exchange of Thailand",set:"set",sgx:"sgx",sse:"sse",swx:"swx",szse:"szse",tase:"tase","tsx-v":"tsx-v",tsx:"tsx",tsxv:"tsxv",ttse:"ttse",twse:"twse",tyo:"tyo",wbag:"wbag",wse:"wse","zagreb stock exchange":"zagreb stock exchange","zimbabwe stock exchange":"zimbabwe stock exchange",zse:"zse"},ri=(e,t)=>{let i=Pe(e,["ticketnumber","code"]);t.push(i);let a=i.template||"";""===a&&(a=i.code),a=(a||"").toLowerCase();let n=ni[a]||"";return i.ticketnumber&&(n=`${n}: ${i.ticketnumber}`),i.code&&!ni[i.code.toLowerCase()]&&(n+=" "+i.code),n},oi={};Object.keys(ni).forEach((e=>{oi[e]=ri}));const si=function(e){return 1===(e=String(e)).length&&(e="0"+e),e},li=function(e,t,i){e[`rd${t}-team${si(i)}`]&&(i=si(i));let a=e[`rd${t}-score${i}`],n=Number(a);return!1===isNaN(n)&&(a=n),{team:e[`rd${t}-team${i}`],score:a,seed:e[`rd${t}-seed${i}`]}},ci=function(e){let t=[],i=Pe(e);for(let e=1;e<7;e+=1){let a=[];for(let t=1;t<16;t+=2){let n=`rd${e}-team`;if(!i[n+t]&&!i[n+si(t)])break;{let n=li(i,e,t),r=li(i,e,t+1);a.push([n,r])}}a.length>0&&t.push(a)}return{template:"playoffbracket",rounds:t}};let ui={"4teambracket":function(e,t){let i=ci(e);return t.push(i),""},player:(e,t)=>{let i=Pe(e,["number","country","name","dl"]);t.push(i);let a=`[[${i.name}]]`;if(i.country){let e=(i.country||"").toLowerCase(),t=yt.find((t=>e===t[1]||e===t[2]))||[];t&&t[0]&&(a=t[0]+" "+a)}return i.number&&(a=i.number+" "+a),a},goal:(e,t)=>{let i={template:"goal",data:[]},a=Pe(e).list||[];for(let e=0;e{let t=e.note;return t&&(t=` (${t})`),e.min+"'"+t})).join(", "),n},"sports table":(e,t)=>{let i=Pe(e),a={};Object.keys(i).filter((e=>/^team[0-9]/.test(e))).map((e=>i[e].toLowerCase())).forEach((e=>{a[e]={name:i[`name_${e}`],win:Number(i[`win_${e}`])||0,loss:Number(i[`loss_${e}`])||0,tie:Number(i[`tie_${e}`])||0,otloss:Number(i[`otloss_${e}`])||0,goals_for:Number(i[`gf_${e}`])||0,goals_against:Number(i[`ga_${e}`])||0}}));let n={date:i.update,header:i.table_header,teams:a};t.push(n)}};var pi=Object.assign({},St,Ct,Lt,Vt,ti,ai,oi,ci,ui);let mi=Object.assign({},vt,Et,pi);Object.keys(pt).forEach((e=>{mi[e]=mi[pt[e]]}));const di=["0","1","2","3","4","5","6","7","8","9"],hi=function(e,t){let i=e.name;if(!0===nt.hasOwnProperty(i))return[""];if(!0===function(e){return!0===rt.hasOwnProperty(e)||!!ot.test(e)||!(!st.test(e)&&!lt.test(e))||!!ct.test(e)}(i)){let t=Pe(e.body,[],"raw");return["",ut(t)]}if(!0===/^cite [a-z]/.test(i)){let t=Pe(e.body);return t.type=t.template,t.template="citation",["",t]}if(!0===mi.hasOwnProperty(i)){if("number"==typeof mi[i]){return[Pe(e.body,di)[String(mi[i])]||""]}if("string"==typeof mi[i])return[mi[i]];if(!0===r(mi[i])){return["",Pe(e.body,mi[i])]}if(!0===((a=mi[i])&&"[object Object]"===Object.prototype.toString.call(a))){let t=Pe(e.body,mi[i].props);return[t[mi[i].out],t]}if("function"==typeof mi[i]){let a=[];return[mi[i](e.body,a,Pe,null,t),a[0]]}}var a;let n=Pe(e.body);return 0===Object.keys(n).length&&(n=null),["",n]},gi=(e="")=>(e=(e=e.toLowerCase()).replace(/[-_]/g," ")).trim(),fi=function(e,t){this._type=e.type,this.domain=e.domain,Object.defineProperty(this,"data",{enumerable:!1,value:e.data}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},ki={type:function(){return this._type},links:function(e){let t=[];if(Object.keys(this.data).forEach((e=>{this.data[e].links().forEach((e=>t.push(e)))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},image:function(){let e=this.data.image||this.data.image2||this.data.logo||this.data.image_skyline||this.data.image_flag;if(!e)return null;let t=e.json(),i=t.text;return t.file=i,t.text="",t.caption=this.data.caption,t.domain=this.domain,new j(t)},get:function(e){let t=Object.keys(this.data);if("string"==typeof e){let i=gi(e);for(let e=0;e{for(let i=0;i(e.data[i]&&(t[i]=e.data[i].json()),t)),{});return!0===t.encode&&(i=K(i)),i}(this,e=e||{})},wikitext:function(){return this.wiki||""},keyValue:function(){return Object.keys(this.data).reduce(((e,t)=>(this.data[t]&&(e[t]=this.data[t].text()),e)),{})}};Object.keys(ki).forEach((e=>{fi.prototype[e]=ki[e]})),fi.prototype.data=fi.prototype.keyValue,fi.prototype.template=fi.prototype.type,fi.prototype.images=fi.prototype.image;const bi=function(e,t){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},wi={title:function(){let e=this.data;return e.title||e.encyclopedia||e.author||""},links:function(e){let t=[];if("number"==typeof e)return t[e];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},text:function(){return""},wikitext:function(){return this.wiki||""},json:function(e={}){let t=this.data||{};return!0===e.encode&&(t=Object.assign({},t),t=K(t)),t}};Object.keys(wi).forEach((e=>{bi.prototype[e]=wi[e]}));const yi={text:function(){return oe(this._text||"").text()},json:function(){return this.data||{}},wikitext:function(){return this.wiki||""}},$i=function(e,t="",i=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_text",{enumerable:!1,value:t}),Object.defineProperty(this,"wiki",{enumerable:!1,value:i})};Object.keys(yi).forEach((e=>{$i.prototype[e]=yi[e]}));const xi=/^(cite |citation)/i,vi={citation:!0,refn:!0,harvnb:!0,source:!0},ji=function(e,t){let{list:i,wiki:a}=function(e,t){let i=[],a=at(e);const n=function(a,r){a.parent=r,a.children&&a.children.length>0&&a.children.forEach((e=>n(e,a)));let[o,s]=hi(a,t);a.wiki=o,s&&i.push({name:a.name,wiki:a.body,nested:Boolean(a.parent),text:o,json:s});const l=function(e,t,i){e.parent&&(e.parent.body=e.parent.body.replace(t,i),l(e.parent,t,i))};l(a,a.body,a.wiki),e=e.replace(a.body,a.wiki)};return a.forEach((e=>n(e,null))),a.forEach((t=>{e=e.replace(t.body,t.wiki)})),{list:i,wiki:e}}(e._wiki,t),n=t?t._domain:null,{infoboxes:r,references:o,templates:s}=function(e,t){let i={infoboxes:[],templates:[],references:[]};return e.forEach((e=>{let a=e.json,n=a.template||a.type||a.name;if(!0!==vi[n]&&!0!==xi.test(n))return"infobox"!==a.template||"yes"===a.subbox||e.nested?void i.templates.push(new $i(a,e.text,e.wiki)):(a.domain=t,a.data=a.data||{},void i.infoboxes.push(new fi(a,e.wiki)));i.references.push(new bi(a,e.wiki))})),i}(i,n);e._infoboxes=e._infoboxes||[],e._references=e._references||[],e._templates=e._templates||[],e._infoboxes=e._infoboxes.concat(r),e._references=e._references.concat(o),e._templates=e._templates.concat(s),e._wiki=a},_i=function(e){return/^ *\{\{ *(cite|citation)/i.test(e)&&/\}\} *$/.test(e)&&!1===/citation needed/i.test(e)},zi=function(e){let t=Pe(e);return t.type=t.template.replace(/cite /,""),t.template="citation",t},Oi=function(e){return{template:"citation",type:"inline",data:{},inline:oe(e)||{}}},Ei=function(e){let t=[],i=e._wiki;i=i.replace(/ ?([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(_i(a)){let n=zi(a);n&&t.push({json:n,wiki:e}),i=i.replace(a,"")}else t.push({json:Oi(a),wiki:e});return" "})),i=i.replace(/ ?]{0,200}?\/> ?/gi," "),i=i.replace(/ ?]{0,200}>([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(_i(a)){let e=zi(a);e&&t.push({json:e,wiki:a}),i=i.replace(a,"")}else t.push({json:Oi(a),wiki:e});return" "})),i=i.replace(/ ?<[ /]?[a-z0-9]{1,8}[a-z0-9=" ]{2,20}[ /]?> ?/g," "),e._references=t.map((e=>new bi(e.json,e.wiki))),e._wiki=i},Si={coach:["team","year","g","w","l","w-l%","finish","pg","pw","pl","pw-l%"],player:["year","team","gp","gs","mpg","fg%","3p%","ft%","rpg","apg","spg","bpg","ppg"],roster:["player","gp","gs","mpg","fg%","3fg%","ft%","rpg","apg","spg","bpg","ppg"]};let Ci=["res","record","opponent","method","event","date","round","time","location","notes"];const qi=function(e,t){const i={templates:[],text:e._wiki};var a;return(a=i).text=a.text.replace(/\{\{election box begin([\s\S]+?)\{\{election box end\}\}/gi,(e=>{let t={_wiki:e,_templates:[]};ji(t);let i=t._templates.map((e=>e.json())),n=i.find((e=>"election box"===e.template))||{},r=i.filter((e=>"election box candidate"===e.template)),o=i.find((e=>"election box gain"===e.template||"election box hold"===e.template))||{};return(r.length>0||o)&&a.templates.push({template:"election box",title:n.title,candidates:r,summary:o.data}),""})),function(e,t,i){e.text=e.text.replace(/]*)>([\s\S]+)<\/gallery>/g,((a,n,r)=>{let o=r.split(/\n/g);return o=o.filter((e=>e&&""!==e.trim())),o=o.map((e=>{let i=e.split(/\|/),a={file:i[0].trim(),lang:t.lang(),domain:t.domain()},n=new j(a).json(),r=i.slice(1).join("|");return""!==r&&(n.caption=oe(r)),n})),o.length>0&&e.templates.push({template:"gallery",images:o,pos:i.title}),""}))}(i,t,e),function(e){e.text=e.text.replace(/]*)>([\s\S]+)<\/math>/g,((t,i,a)=>{let n=oe(a).text();return e.templates.push({template:"math",formula:n,raw:a}),n&&n.length<12?n:""})),e.text=e.text.replace(/]*)>([\s\S]+?)<\/chem>/g,((t,i,a)=>(e.templates.push({template:"chem",data:a}),"")))}(i),function(e){e.text=e.text.replace(/\{\{mlb game log /gi,"{{game log "),e.text=e.text.replace(/\{\{game log (section|month)[\s\S]+?\{\{game log (section|month) end\}\}/gi,(t=>{let i=function(e){let t=["#","date","opponent","score","win","loss","save","attendance","record"];return!0===/\|stadium=y/i.test(e)&&t.splice(7,0,"stadium"),!0===/\|time=y/i.test(e)&&t.splice(7,0,"time"),!0===/\|box=y/i.test(e)&&t.push("box"),t}(t);t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{game log (section|month) end\}\}/i,"");let a="! "+i.join(" !! "),n=ge("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mlb game log section",data:n}),""}))}(i),function(e){e.text=e.text.replace(/\{\{mma record start[\s\S]+?\{\{end\}\}/gi,(t=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{end\}\}/i,"");let i="! "+Ci.join(" !! "),a=ge("{|\n"+i+"\n"+t+"\n|}");return a=a.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mma record start",data:a}),""}))}(i),function(e){e.text=e.text.replace(/\{\{nba (coach|player|roster) statistics start([\s\S]+?)\{\{s-end\}\}/gi,((t,i)=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{s-end\}\}/,""),i=i.toLowerCase().trim();let a="! "+Si[i].join(" !! "),n=ge("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"NBA "+i+" statistics",data:n}),""}))}(i),i.templates=i.templates.map((e=>new $i(e))),i},Ni={tables:!0,references:!0,paragraphs:!0,templates:!0,infoboxes:!0};class Li{constructor(e,t){let i={doc:t,title:e.title||"",depth:e.depth,wiki:e.wiki||"",templates:[],tables:[],infoboxes:[],references:[],paragraphs:[]};Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})}));const a=qi(this,t);this._wiki=a.text,this._templates=this._templates.concat(a.templates),Ei(this),ji(this,t),function(e){let t=[],i=e._wiki,a=i.split("\n"),n=[];for(let e=0;e0&&(n[n.length-1]+="\n"+a[e]);else{n[n.length-1]+="\n"+a[e];let i=n.pop();t.push(i)}else n.push(a[e]);let r=[];t.forEach((e=>{if(e){i=i.replace(e+"\n",""),i=i.replace(e,"");let t=ge(e);t&&t.length>0&&r.push(new be(t,e))}})),r.length>0&&(e._tables=r),e._wiki=i}(this),Ve(this,t)}title(){return this._title||""}index(){if(!this._doc)return null;let e=this._doc.sections().indexOf(this);return-1===e?null:e}depth(){return this._depth}indentation(){return this.depth()}sentences(){return this.paragraphs().reduce(((e,t)=>e.concat(t.sentences())),[])}paragraphs(){return this._paragraphs||[]}links(e){let t=[];if(this.infoboxes().forEach((e=>{t.push(e.links())})),this.sentences().forEach((e=>{t.push(e.links())})),this.tables().forEach((e=>{t.push(e.links())})),this.lists().forEach((e=>{t.push(e.links())})),t=t.reduce(((e,t)=>e.concat(t)),[]).filter((e=>void 0!==e)),"string"==typeof e){let i=t.find((t=>t.page().toLowerCase()===e.toLowerCase()));return void 0===i?[]:[i]}return t}tables(){return this._tables||[]}templates(e){let t=this._templates||[];return"string"==typeof e?(e=e.toLowerCase(),t.filter((t=>t.data.template===e||t.data.name===e))):t}infoboxes(e){let t=this._infoboxes||[];return"string"==typeof e?(e=(e=e.replace(/^infobox /i,"")).trim().toLowerCase(),t.filter((t=>t._type===e))):t}coordinates(){return[...this.templates("coord"),...this.templates("coor")].map((e=>e.json()))}lists(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.lists())})),e}interwiki(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.interwiki())})),e}images(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.images())})),e}references(){return this._references||[]}remove(){if(!this._doc)return null;let e={};e[this.title()]=!0,this.children().forEach((t=>e[t.title()]=!0));let t=this._doc.sections();return t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),this._doc._sections=t,this._doc}nextSibling(){if(!this._doc)return null;let e=this._doc.sections();for(let t=(this.index()||0)+1;tthis.depth())for(let e=i+1;ethis.depth();e+=1)a.push(t[e]);return"string"==typeof e?a.find((t=>t.title().toLowerCase()===e.toLowerCase())):a}sections(e){return this.children(e)}parent(){if(!this._doc)return null;let e=this._doc.sections();for(let t=this.index()||0;t>=0;t-=1)if(e[t]&&e[t].depth()t.text(e))).join("\n\n")}wikitext(){return this._wiki}json(e){return function(e,t){let i={};if(!0===(t=p(t,W)).headers&&(i.title=e.title()),!0===t.depth&&(i.depth=e.depth()),!0===t.paragraphs){let a=e.paragraphs().map((e=>e.json(t)));a.length>0&&(i.paragraphs=a)}if(!0===t.images){let a=e.images().map((e=>e.json(t)));a.length>0&&(i.images=a)}if(!0===t.tables){let a=e.tables().map((e=>e.json(t)));a.length>0&&(i.tables=a)}if(!0===t.templates){let a=e.templates().map((e=>e.json()));a.length>0&&(i.templates=a,!0===t.encode&&i.templates.forEach((e=>K(e))))}if(!0===t.infoboxes){let a=e.infoboxes().map((e=>e.json(t)));a.length>0&&(i.infoboxes=a)}if(!0===t.lists){let a=e.lists().map((e=>e.json(t)));a.length>0&&(i.lists=a)}if(!0===t.references||!0===t.citations){let a=e.references().map((e=>e.json(t)));a.length>0&&(i.references=a)}return!0===t.sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,Ni))}}Li.prototype.citations=Li.prototype.references;const Pi={sentences:"sentence",paragraphs:"paragraph",links:"link",tables:"table",templates:"template",infoboxes:"infobox",coordinates:"coordinate",lists:"list",images:"image",references:"reference",citations:"citation"};Object.keys(Pi).forEach((e=>{let t=Pi[e];Li.prototype[t]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]||null}}));const Ai=/^(={1,6})(.{1,200}?)={1,6}$/,Ti=/\{\{.+?\}\}/,Di=function(e,t){let i=t.match(Ai);if(!i)return e.title="",e.depth=0,e;let a=i[2]||"";var r;a=oe(a).text(),Ti.test(a)&&(at(r=a).forEach((e=>{let[t]=hi(e);r=r.replace(e.body,t)})),a=r);let o={_wiki:a};Ei(o),a=o._wiki,a=n(a);let s=0;return i[1]&&(s=i[1].length-2),e.title=a,e.depth=s,e},Ii=new RegExp("^("+["references","reference","einzelnachweise","referencias","références","notes et références","脚注","referenser","bronnen","примечания"].join("|")+"):?","i"),Mi=/(?:\n|^)(={2,6}.{1,200}?={2,6})/g,Ri=function(e){let t=[],i=e._wiki.split(Mi);for(let a=0;a!0!==Ii.test(t.title())||t.paragraphs().length>0||t.templates().length>0||(e[i+1]&&e[i+1].depth()>t.depth()&&(e[i+1]._depth-=1),!1)))}(t)},Ui=new RegExp("\\[\\[:?("+d.join("|")+"):(.{2,178}?)]](w{0,10})","gi"),Bi=new RegExp("^\\[\\[:?("+d.join("|")+"):","gi"),Fi=function(e){const t=[];let i=e.match(Ui);i&&i.forEach((function(e){(e=(e=(e=e.replace(Bi,"")).replace(/\|?[ *]?\]\]$/,"")).replace(/\|.*/,""))&&!e.match(/[[\]]/)&&t.push(e.trim())}));const a=e.replace(Ui,"");return[t,a]},Ki={tables:!0,lists:!0,paragraphs:!0};class Wi{constructor(e,t){let i={pageID:(t=t||{}).pageID||t.id||null,namespace:t.namespace||t.ns||null,lang:t.lang||t.language||null,domain:t.domain||null,title:t.title||null,type:"page",redirectTo:null,wikidata:t.wikidata||null,wiki:e||"",categories:[],sections:[],coordinates:[],userAgent:t.userAgent||t["User-Agent"]||t["Api-User-Agent"]||"User of the wtf_wikipedia library"};if(Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})})),!0===function(e){return!(!e||e.length>500)&&T.test(e)}(this._wiki)){this._type="redirect",this._redirectTo=function(e){let t=e.match(T);if(t&&t[2])return(A(t[2])||[])[0];return{}}(this._wiki);const[e,t]=Fi(this._wiki);return this._categories=e,void(this._wiki=t)}this._wiki=U(this._wiki);const[a,n]=Fi(this._wiki);this._categories=a,this._wiki=n,this._sections=Ri(this)}title(e){if(void 0!==e)return this._title=e,e;if(this._title)return this._title;let t=null,i=this.sentences()[0];return i&&(t=i.bold()),t}pageID(e){return void 0!==e&&(this._pageID=e),this._pageID||null}wikidata(e){return void 0!==e&&(this._wikidata=e),this._wikidata||null}domain(e){return void 0!==e&&(this._domain=e),this._domain||null}language(e){return void 0!==e&&(this._lang=e),this._lang||null}url(){let e=this.title();if(!e)return null;let t=this.language()||"en",i=this.domain()||"wikipedia.org";return e=e.replace(/ /g,"_"),e=encodeURIComponent(e),`https://${t}.${i}/wiki/${e}`}namespace(e){return void 0!==e&&(this._namespace=e),this._namespace||null}isRedirect(){return"redirect"===this._type}redirectTo(){return this._redirectTo}isDisambiguation(){return function(e){let t=e.templates().map((e=>e.json()));if(t.find((e=>k.hasOwnProperty(e.template)||$.hasOwnProperty(e.template))))return!0;let i=e.title();return!(!i||!0!==y.test(i))||!t.find((e=>w.hasOwnProperty(e.template)))&&(!0===x(e.sentence(0))||!0===x(e.sentence(1)))}(this)}categories(e){let t=this._categories||[];return"number"==typeof e?[t[e]]:t}sections(e){let t=this._sections||[];if(t.forEach((e=>{e._doc=this})),"string"==typeof e){let i=e.toLowerCase().trim();return t.filter((e=>e.title().toLowerCase()===i))}return"number"==typeof e?[t[e]]:t}paragraphs(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.paragraphs())})),"number"==typeof e?[t[e]]:t}sentences(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.sentences())})),"number"==typeof e?[t[e]]:t}images(e){let t=u(this,"images",null);return this.infoboxes().forEach((e=>{let i=e.image();i&&t.unshift(i)})),this.templates().forEach((e=>{"gallery"===e.data.template&&(e.data.images=e.data.images||[],e.data.images.forEach((e=>{e instanceof j||(e.language=this.language(),e.domain=this.domain(),e=new j(e)),t.push(e)})))})),"number"==typeof e?[t[e]]:t}links(e){return u(this,"links",e)}interwiki(e){return u(this,"interwiki",e)}lists(e){return u(this,"lists",e)}tables(e){return u(this,"tables",e)}templates(e){return u(this,"templates",e)}references(e){return u(this,"references",e)}citations(e){return this.references(e)}coordinates(e){return u(this,"coordinates",e)}infoboxes(e){let t=u(this,"infoboxes",e);return t=t.sort(((e,t)=>Object.keys(e.data).length>Object.keys(t.data).length?-1:1)),t}text(e){if(e=p(e,Ki),!0===this.isRedirect())return"";return this.sections().map((t=>t.text(e))).join("\n\n")}json(e){return function(e,t){let i={};return(t=p(t,m)).title&&(i.title=e.title()),t.pageID&&(i.pageID=e.pageID()),t.categories&&(i.categories=e.categories()),t.sections&&(i.sections=e.sections().map((e=>e.json(t)))),!0===e.isRedirect()&&(i.isRedirect=!0,i.redirectTo=e.redirectTo(),i.sections=[]),t.coordinates&&(i.coordinates=e.coordinates()),t.infoboxes&&(i.infoboxes=e.infoboxes().map((e=>e.json(t)))),t.images&&(i.images=e.images().map((e=>e.json(t)))),t.plaintext&&(i.plaintext=e.text(t)),(t.citations||t.references)&&(i.references=e.references()),i}(this,e=p(e,Ki))}wikitext(){return this._wiki||""}debug(){return console.log("\n"),this.sections().forEach((e=>{let t=" - ";for(let i=0;i{let t=Zi[e];Wi.prototype[t]=function(t){return this[e](t)[0]||null}})),Wi.prototype.lang=Wi.prototype.language,Wi.prototype.ns=Wi.prototype.namespace,Wi.prototype.plaintext=Wi.prototype.text,Wi.prototype.isDisambig=Wi.prototype.isDisambiguation,Wi.prototype.citations=Wi.prototype.references,Wi.prototype.redirectsTo=Wi.prototype.redirectTo,Wi.prototype.redirect=Wi.prototype.redirectTo,Wi.prototype.redirects=Wi.prototype.redirectTo;const Hi=/^https?:\/\//,Yi={lang:"en",wiki:"wikipedia",domain:void 0,follow_redirects:!0,path:"api.php"},Gi=function(e,t,n){"string"==typeof t&&(t={lang:t}),(t={...Yi,...t}).title=e,"string"==typeof e&&Hi.test(e)&&(t={...t,...a(e)});const o=c(t),s=function(e){let t,i=e.userAgent||e["User-Agent"]||e["Api-User-Agent"]||"User of the wtf_wikipedia library";return t=e.noOrigin?"":e.origin||e.Origin||"*",{method:"GET",headers:{"Content-Type":"application/json","Api-User-Agent":i,"User-Agent":i,Origin:t,"Accept-Encoding":"gzip"},redirect:"follow"}}(t);return i(o,s).then((e=>e.json())).then((i=>{let a=function(e,t={}){return Object.keys(e.query.pages).map((i=>{let a=e.query.pages[i]||{};if(a.hasOwnProperty("missing")||a.hasOwnProperty("invalid"))return null;let n=a.revisions[0]["*"];!n&&a.revisions[0].slots&&(n=a.revisions[0].slots.main["*"]),a.pageprops=a.pageprops||{};let r=t.domain;return!r&&t.wiki&&(r=`${t.wiki}.org`),{wiki:n,meta:Object.assign({},t,{title:a.title,pageID:a.pageid,namespace:a.ns,domain:r,wikidata:a.pageprops.wikibase_item,description:a.pageprops["wikibase-shortdesc"]})}}))}(i,t);return a=function(e,t){let i=(e=e.filter((e=>e))).map((e=>new Wi(e.wiki,e.meta)));return 0===i.length?null:r(t)||1!==i.length?i:i[0]}(a,e),n&&n(null,a),a})).catch((e=>(console.error(e),n&&n(e,null),null)))};const Vi=function(e,t){return new Wi(e,t)},Ji={Doc:Wi,Section:Li,Paragraph:je,Sentence:J,Image:j,Infobox:fi,Link:H,List:Ue,Reference:bi,Table:be,Template:$i,http:function(e,t){return i(e,t).then((function(e){return e.json()})).catch((t=>(console.error("\n\n=-=- http response error =-=-=-"),console.error(e),console.error(t),{})))},wtf:Vi};return Vi.fetch=function(e,t,i){return Gi(e,t,i)},Vi.plugin=Vi.extend=function(e){return e(Ji,mi,rt),this},Vi.version="10.0.4",Vi})); diff --git a/builds/wtf_wikipedia-client.mjs b/builds/wtf_wikipedia-client.mjs index 63654fd3..a41521eb 100644 --- a/builds/wtf_wikipedia-client.mjs +++ b/builds/wtf_wikipedia-client.mjs @@ -1,2 +1,2 @@ -/*! wtf_wikipedia 10.0.3 MIT */ -function e(e){var t=e.default;if("function"==typeof t){var i=function(){return t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})})),i}var t=e(Object.freeze({__proto__:null,default:function(e,t){return t=t||{},new Promise((function(i,a){var n=new XMLHttpRequest,r=[],o=[],s={},l=function(){return{ok:2==(n.status/100|0),statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:l,headers:{keys:function(){return r},entries:function(){return o},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var c in n.open(t.method||"get",e,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,i){r.push(t=t.toLowerCase()),o.push([t,i]),s[t]=s[t]?s[t]+","+i:i})),i(l())},n.onerror=a,n.withCredentials="include"==t.credentials,t.headers)n.setRequestHeader(c,t.headers[c]);n.send(t.body||null)}))}})),i=self.fetch||(self.fetch=t.default||t);const a=function(e){let t=new URL(e),i=t.pathname.replace(/^\/(wiki\/)?/,"");return i=decodeURIComponent(i),{domain:t.host,title:i}};function n(e){return e&&"string"==typeof e?e=(e=(e=(e=e.replace(/^\s+/,"")).replace(/\s+$/,"")).replace(/ {2}/," ")).replace(/\s, /,", "):""}function r(e){return"[object Array]"===Object.prototype.toString.call(e)}const o=/(wikibooks|wikidata|wikimedia|wikinews|wikipedia|wikiquote|wikisource|wikispecies|wikiversity|wikivoyage|wiktionary|foundation|meta)\.org/,s={action:"query",prop:"revisions|pageprops",rvprop:"content",maxlag:5,rvslots:"main",origin:"*",format:"json",redirects:"true"},l=e=>e.replace(/ /g,"_").trim(),c=function(e,t=s){let i=Object.assign({},t),a="";if(e.domain){let t=o.test(e.domain)?"w/api.php":e.path;a=`https://${e.domain}/${t}?`}else{if(!e.lang||!e.wiki)return"";a=`https://${e.lang}.${e.wiki}.org/w/api.php?`}e.follow_redirects||delete i.redirects,e.origin&&(i.origin=e.origin);let n=e.title;if("number"==typeof n)i.pageids=n;else if("string"==typeof n)i.titles=l(n);else if(void 0!==n&&r(n)&&"number"==typeof n[0])i.pageids=n.join("|");else{if(void 0===n||!0!==r(n)||"string"!=typeof n[0])return"";i.titles=n.map(l).join("|")}return`${a}${c=i,Object.entries(c).map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`)).join("&")}`;var c},u=function(e,t,i){let a=[];return e.sections().forEach((e=>{let n=[];n="string"==typeof i?e[t](i):e[t](),n.forEach((e=>{a.push(e)}))})),"number"==typeof i?void 0===a[i]?[]:[a[i]]:a},p=function(e,t){return Object.assign({},t,e)},m={title:!0,sections:!0,pageID:!0,categories:!0};var d=["category","abdeeling","bólkur","catagóir","categori","categoria","categoria","categoría","categorîa","categorìa","catégorie","categorie","catègorie","category","categuria","catigurìa","class","ẹ̀ka","flocc","flocc","flokkur","grup","jamii","kaarangay","kateggoría","kategooria","kategori","kategorî","kategoria","kategória","kategorie","kategoriija","kategorija","kategorio","kategoriya","kategoriýa","kategoriye","kategory","kategorya","kateqoriya","katiguriya","klad","luokka","ñemohenda","roinn","ronney","rummad","setensele","sokajy","sumut","thể","turkum","категорија","категория","категорія","катэгорыя","төркем","קטגוריה","تصنيف","تۈر","رده","श्रेणी","श्रेणी","বিষয়শ্রেণী","หมวดหมู่","분류","분류","分类"],h=["file","image","चित्र","archivo","attēls","berkas","bestand","datei","dosiero","dosya","fájl","fasciculus","fichier","fil","fitxategi","fitxer","gambar","imagem","imej","immagine","larawan","lêer","plik","restr","slika","wêne","wobraz","выява","податотека","слика","файл","სურათი","պատկեր","קובץ","پرونده","دوتنه","ملف","وێنە","चित्र","ไฟล์","파일","ファイル"],g=["infobox","anfo","anuāmapa","bilgi kutusu","bilgi","bilgiquti","boaty","boestkelaouiñ","bosca","capsa","diehtokássa","faktamall","ficha","generalni","gwybodlen3","info","infobokis","infoboks","infochascha","infokašćik","infokast","infokutija","infolentelė","infopolje","informkesto","infoskreine","infotaula","inligtingskas","inligtingskas3","inligtingskas4","kishtey","kotak","tertcita","tietolaatikko","yerleşim bilgi kutusu","ynfoboks","πλαίσιο","акарточка","аҥа","инфобокс","инфокутија","инфокутия","інфобокс","канадский","картка","карточка","карточка2","карточкарус","картуш","қуттӣ","ინფოდაფა","տեղեկաքարտ","אינפאקעסטל","תבנית","بطاقة","ڄاڻخانو","خانہ","لغة","ज्ञानसन्दूक","তথ্যছক","ਜਾਣਕਾਰੀਡੱਬਾ","సమాచారపెట్టె","තොරතුරුකොටුව","กล่องข้อมูล","ប្រអប់ព័ត៌មាន","정보상자","明細"];let f=" disambiguation";const k=["dab","dab","disamb","disambig","geodis","hndis","setindex","ship index","split dab","sport index","wp disambig","disambiguation cleanup","airport"+f,"biology"+f,"call sign"+f,"caselaw"+f,"chinese title"+f,"genus"+f,"hospital"+f,"lake index","letter"+f,"letter-number combination"+f,"mathematical"+f,"military unit"+f,"mountainindex","number"+f,"phonetics"+f,"place name"+f,"portal"+f,"road"+f,"school"+f,"species latin name abbreviation"+f,"species latin name"+f,"station"+f,"synagogue"+f,"taxonomic authority"+f,"taxonomy"+f].reduce(((e,t)=>(e[t]=!0,e)),{}),b=/. may (also )?refer to\b/i,w={about:!0,for:!0,"for multi":!0,"other people":!0,"other uses of":!0,distinguish:!0},y=new RegExp(". \\(("+["disambiguation","homonymie","توضيح","desambiguação","Begriffsklärung","disambigua","曖昧さ回避","消歧義","搞清楚","значения","ابهام‌زدایی","د ابہام","동음이의","dubbelsinnig","այլ կիրառումներ","ujednoznacznienie"].join("|")+")\\)$","i"),$=["dab","disamb","disambig","disambiguation","letter-numbercombdisambig","letter-number combination disambiguation","dmbox","airport disambiguation","biology disambiguation","call sign disambiguation","caselaw disambiguation","chinese title disambiguation","disambiguation cleanup","genus disambiguation","hospital disambiguation","human name disambiguation","human name disambiguation cleanup","letter-number combination disambiguation","mathematical disambiguation","military unit disambiguation","music disambiguation","number disambiguation","opus number disambiguation","phonetics disambiguation","place name disambiguation","portal disambiguation","road disambiguation","school disambiguation","species latin name abbreviation disambiguation","species latin name disambiguation","station disambiguation","synagogue disambiguation","taxonomic authority disambiguation","taxonomy disambiguation","template disambiguation","disamb2","disamb3","disamb4","disambiguation lead","disambiguation lead name","disambiguation name","disamb-term","disamb-terms","aðgreining","aimai","ałtsʼáʼáztiin","anlam ayrımı","anlam ayrımı","apartigilo","argipen","begriepskloorenge","begriffsklärung","begriffsklärung","begriffsklärung","begriffsklearung","bisongidila","bkl","bokokani","caddayn","clerheans","cudakirin","čvor","db","desambig","desambigación","desambiguação","desambiguació","desambiguación","desambiguáncia","desambiguasion","desambiguassiù","desambigui","dezambiguizare","dəqiqləşdirmə","disambigua","disambigua","disambigua","disambìgua","disambigua","disambiguasi","disambiguasi","discretiva","disheñvelout","disingkek","dixanbigua","dixebra","diżambigwazzjoni","doorverwijspagina","dp","dp","dubbelsinnig","dudalipen","dv","egyért","fleiri týdningar","fleirtyding","flertydig","förgrening","gì-ngiê","giklaro","gwahaniaethu","homonimo","homónimos","homonymie","huaʻōlelo puana like","idirdhealú","khu-pia̍t","kthjellim","kujekesa","maana","maneo bin","mehrdüdig begreep","menm non","muardüüdag artiikel","neibetsjuttings","nozīmju atdalīšana","nuorodinis","nyahkekaburan","omonimeye","omonimia","page dé frouque","paglilinaw","panangilawlawag","pansayod","pejy mitovy anarana","peker","razdvojba","razločitev","razvrstavanje","reddaghey","rozcestník","rozlišovacia stránka","sclerir noziun","selvendyssivu","soilleireachadh","suzmunski","täpsustuslehekülg","täsmennyssivu","telplänov","tlahtolmelahuacatlaliztli","trang định hướng","ujednoznacznienie","verdudeliking","wěcejwóznamowosć","wjacezmyslnosć","zambiguaçon","zeimeibu škiršona","αποσαφήνιση","айрық","аҵакырацәа","вишезначна одредница","ибҳомзудоӣ","кёб магъаналы","күп мәгънәләр","күп мәғәнәлелек","мъногосъмꙑслиѥ","неадназначнасць","неадназначнасьць","неоднозначность","олон удхатай","појаснување","пояснение","са шумуд манавал","салаа утгатай","суолталар","текмаанисиздик","цо магіна гуреб","чеперушка","чолхалла","шуко ончыктымаш-влак","მრავალმნიშვნელოვანი","բազմիմաստութիւն","բազմիմաստություն","באדייטן","פירושונים","ابهام‌زدایی","توضيح","توضيح","دقیقلشدیرمه","ڕوونکردنەوە","سلجهائپ","ضد ابہام","گجگجی بیری","نامبهمېدنه","መንታ","अस्पष्टता","बहुअर्थी","बहुविकल्पी शब्द","দ্ব্যর্থতা নিরসন","ਗੁੰਝਲ-ਖੋਲ੍ਹ","સંદિગ્ધ શીર્ષક","பக்கவழி நெறிப்படுத்தல்","అయోమయ నివృత్తి","ದ್ವಂದ್ವ ನಿವಾರಣೆ","വിവക്ഷകൾ","වක්‍රෝත්ති","แก้ความกำกวม","သံတူကြောင်းကွဲ","ណែនាំ","동음이의","扤清楚","搞清楚","曖昧さ回避","消歧义","釋義","gestion dj'omònim","sut'ichana qillqa"].reduce(((e,t)=>(e[t]=!0,e)),{}),x=function(e){if(!e)return!1;let t=e.text();return!(null===t||!t[0]||!0!==b.test(t))},v={caption:!0,alt:!0,links:!0,thumb:!0,url:!0},j=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},_={file(){let e=this.data.file||"";if(e){/^(image|file):/i.test(e)||(e=`File:${e}`),e=e.trim(),e=e.charAt(0).toUpperCase()+e.substring(1),e=e.replace(/ /g,"_")}return e},alt(){let e=this.data.alt||this.data.file||"";return e=e.replace(/^(file|image):/i,""),e=e.replace(/\.(jpg|jpeg|png|gif|svg)/i,""),e.replace(/_/g," ")},caption(){return this.data.caption?this.data.caption.text():""},links(){return this.data.caption?this.data.caption.links():[]},url(){let e=function(e){let t=function(e){let t=e.replace(/^(image|file?):/i,"");return t=t.charAt(0).toUpperCase()+t.substring(1),t=t.trim().replace(/ /g,"_"),t}(e);return t=encodeURIComponent(t),t}(this.file());return`https://${this.data.domain||"wikipedia.org"}/wiki/Special:Redirect/file/${e}`},thumbnail(e){return e=e||300,this.url()+"?width="+e},format(){let e=this.file().split(".");return e[e.length-1]?e[e.length-1].toLowerCase():null},json:function(e){return function(e,t){t=p(t,v);let i={file:e.file()};return!1!==t.thumb&&(i.thumb=e.thumbnail()),!1!==t.url&&(i.url=e.url()),!1!==t.caption&&e.data.caption&&(i.caption=e.caption(),!1!==t.links&&e.data.caption.links()&&(i.links=e.links())),!1!==t.alt&&e.data.alt&&(i.alt=e.alt()),i}(this,e=e||{})},text:function(){return""},wikitext:function(){return this.data.wiki||""}};Object.keys(_).forEach((e=>{j.prototype[e]=_[e]})),j.prototype.src=j.prototype.url,j.prototype.thumb=j.prototype.thumbnail;var z={aa:"Afar",ab:"Аҧсуа",af:"Afrikaans",ak:"Akana",als:"Alemannisch",am:"አማርኛ",an:"Aragonés",ang:"Englisc",ar:"العربية",arc:"ܣܘܪܬ",as:"অসমীয়া",ast:"Asturianu",av:"Авар",ay:"Aymar",az:"Azərbaycanca",ba:"Башҡорт",bar:"Boarisch","bat-smg":"Žemaitėška",bcl:"Bikol",be:"Беларуская","be-x-old":"ltr",bg:"Български",bh:"भोजपुरी",bi:"Bislama",bm:"Bamanankan",bn:"বাংলা",bo:"བོད་ཡིག",bpy:"ltr",br:"Brezhoneg",bs:"Bosanski",bug:"ᨅᨔ",bxr:"ltr",ca:"Català",cdo:"Chinese",ce:"Нохчийн",ceb:"Sinugboanong",ch:"Chamoru",cho:"Choctaw",chr:"ᏣᎳᎩ",chy:"Tsetsêhestâhese",co:"Corsu",cr:"Nehiyaw",cs:"Česky",csb:"Kaszëbsczi",cu:"Slavonic",cv:"Чăваш",cy:"Cymraeg",da:"Dansk",de:"Deutsch",diq:"Zazaki",dsb:"ltr",dv:"ދިވެހިބަސް",dz:"ཇོང་ཁ",ee:"Ɛʋɛ",far:"فارسی",el:"Ελληνικά",en:"English",eo:"Esperanto",es:"Español",et:"Eesti",eu:"Euskara",ext:"Estremeñu",ff:"Fulfulde",fi:"Suomi","fiu-vro":"Võro",fj:"Na",fo:"Føroyskt",fr:"Français",frp:"Arpitan",fur:"Furlan",fy:"ltr",ga:"Gaeilge",gan:"ltr",gd:"ltr",gil:"Taetae",gl:"Galego",gn:"Avañe'ẽ",got:"gutisk",gu:"ગુજરાતી",gv:"Gaelg",ha:"هَوُسَ",hak:"ltr",haw:"Hawai`i",he:"עברית",hi:"हिन्दी",ho:"ltr",hr:"Hrvatski",ht:"Krèyol",hu:"Magyar",hy:"Հայերեն",hz:"Otsiherero",ia:"Interlingua",id:"Bahasa",ie:"Interlingue",ig:"Igbo",ii:"ltr",ik:"Iñupiak",ilo:"Ilokano",io:"Ido",is:"Íslenska",it:"Italiano",iu:"ᐃᓄᒃᑎᑐᑦ",ja:"日本語",jbo:"Lojban",jv:"Basa",ka:"ქართული",kg:"KiKongo",ki:"Gĩkũyũ",kj:"Kuanyama",kk:"Қазақша",kl:"Kalaallisut",km:"ភាសាខ្មែរ",kn:"ಕನ್ನಡ",khw:"کھوار",ko:"한국어",kr:"Kanuri",ks:"कश्मीरी",ksh:"Ripoarisch",ku:"Kurdî",kv:"Коми",kw:"Kernewek",ky:"Kırgızca",la:"Latina",lad:"Dzhudezmo",lan:"Leb",lb:"Lëtzebuergesch",lg:"Luganda",li:"Limburgs",lij:"Líguru",lmo:"Lumbaart",ln:"Lingála",lo:"ລາວ",lt:"Lietuvių",lv:"Latviešu","map-bms":"Basa",mg:"Malagasy",man:"官話",mh:"Kajin",mi:"Māori",min:"Minangkabau",mk:"Македонски",ml:"മലയാളം",mn:"Монгол",mo:"Moldovenească",mr:"मराठी",ms:"Bahasa",mt:"bil-Malti",mus:"Muskogee",my:"Myanmasa",na:"Dorerin",nah:"Nahuatl",nap:"Nnapulitano",nd:"ltr",nds:"Plattdüütsch","nds-nl":"Saxon",ne:"नेपाली",new:"नेपालभाषा",ng:"Oshiwambo",nl:"Nederlands",nn:"ltr",no:"Norsk",nr:"ltr",nso:"ltr",nrm:"Nouormand",nv:"Diné",ny:"Chi-Chewa",oc:"Occitan",oj:"ᐊᓂᔑᓈᐯᒧᐎᓐ",om:"Oromoo",or:"ଓଡ଼ିଆ",os:"Иронау",pa:"ਪੰਜਾਬੀ",pag:"Pangasinan",pam:"Kapampangan",pap:"Papiamentu",pdc:"ltr",pi:"Pāli",pih:"Norfuk",pl:"Polski",pms:"Piemontèis",ps:"پښتو",pt:"Português",qu:"Runa",rm:"ltr",rmy:"Romani",rn:"Kirundi",ro:"Română","roa-rup":"Armâneashti",ru:"Русский",rw:"Kinyarwandi",sa:"संस्कृतम्",sc:"Sardu",scn:"Sicilianu",sco:"Scots",sd:"सिनधि",se:"ltr",sg:"Sängö",sh:"Srpskohrvatski",si:"සිංහල",simple:"ltr",sk:"Slovenčina",sl:"Slovenščina",sm:"Gagana",sn:"chiShona",so:"Soomaaliga",sq:"Shqip",sr:"Српски",ss:"SiSwati",st:"ltr",su:"Basa",sv:"Svenska",sw:"Kiswahili",ta:"தமிழ்",te:"తెలుగు",tet:"Tetun",tg:"Тоҷикӣ",th:"ไทย",ti:"ትግርኛ",tk:"Туркмен",tl:"Tagalog",tlh:"tlhIngan-Hol",tn:"Setswana",to:"Lea",tpi:"ltr",tr:"Türkçe",ts:"Xitsonga",tt:"Tatarça",tum:"chiTumbuka",tw:"Twi",ty:"Reo",udm:"Удмурт",ug:"Uyƣurqə",uk:"Українська",ur:"اردو",uz:"Ўзбек",ve:"Tshivenḓa",vi:"Việtnam",vec:"Vèneto",vls:"ltr",vo:"Volapük",wa:"Walon",war:"Winaray",wo:"Wollof",xal:"Хальмг",xh:"isiXhosa",yi:"ייִדיש",yo:"Yorùbá",za:"Cuengh",zh:"中文","zh-classical":"ltr","zh-min-nan":"Bân-lâm-gú","zh-yue":"粵語",zu:"isiZulu"};const O=".wikipedia.org/wiki/$1",E=".wikimedia.org/wiki/$1",S="www.";var C={acronym:S+"acronymfinder.com/$1.html",advisory:"advisory"+E,advogato:S+"advogato.org/$1",aew:"wiki.arabeyes.org/$1",appropedia:S+"appropedia.org/$1",aquariumwiki:S+"theaquariumwiki.com/$1",arborwiki:"localwiki.org/ann-arbor/$1",arxiv:"arxiv.org/abs/$1",atmwiki:S+"otterstedt.de/wiki/index.php/$1",baden:S+"stadtwiki-baden-baden.de/wiki/$1/",battlestarwiki:"en.battlestarwiki.org/wiki/$1",bcnbio:"historiapolitica.bcn.cl/resenas_parlamentarias/wiki/$1",beacha:S+"beachapedia.org/$1",betawiki:"translatewiki.net/wiki/$1",bibcode:"adsabs.harvard.edu/abs/$1",bibliowiki:"wikilivres.org/wiki/$1",bluwiki:"bluwiki.com/go/$1",blw:"britainloves"+O,botwiki:"botwiki.sno.cc/wiki/$1",boxrec:S+"boxrec.com/media/index.php?$1",brickwiki:S+"brickwiki.info/wiki/$1",bugzilla:"bugzilla.wikimedia.org/show_bug.cgi?id=$1",bulba:"bulbapedia.bulbagarden.net/wiki/$1",c:"commons"+E,c2:"c2.com/cgi/wiki?$1",c2find:"c2.com/cgi/wiki?FindPage&value=$1",cache:S+"google.com/search?q=cache:$1","ĉej":"esperanto.blahus.cz/cxej/vikio/index.php/$1",cellwiki:"cell.wikia.com/wiki/$1",centralwikia:"community.wikia.com/wiki/$1",chej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",choralwiki:S+"cpdl.org/wiki/index.php/$1",citizendium:"en.citizendium.org/wiki/$1",ckwiss:S+"ck-wissen.de/ckwiki/index.php?title=$1",comixpedia:S+"comixpedia.org/index.php?title=$1",commons:"commons"+E,communityscheme:"community.schemewiki.org/?c=s&key=$1",communitywiki:"communitywiki.org/$1",comune:"rete.comuni-italiani.it/wiki/$1",creativecommons:"creativecommons.org/licenses/$1",creativecommonswiki:"wiki.creativecommons.org/$1",cxej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",dcc:S+"dccwiki.com/$1",dcdatabase:"dc.wikia.com/$1",dcma:"christian-morgenstern.de/dcma/index.php?title=$1",debian:"wiki.debian.org/$1",delicious:S+"delicious.com/tag/$1",devmo:"developer.mozilla.org/en/docs/$1",dictionary:S+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",dict:S+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",disinfopedia:"sourcewatch.org/index.php/$1",distributedproofreaders:S+"pgdp.net/wiki/$1",distributedproofreadersca:S+"pgdpcanada.net/wiki/index.php/$1",dmoz:"curlie.org/$1",dmozs:"curlie.org/search?q=$1",doi:"doi.org/$1",donate:"donate"+E,doom_wiki:"doom.wikia.com/wiki/$1",download:"releases.wikimedia.org/$1",dbdump:"dumps.wikimedia.org/$1/latest/",dpd:"lema.rae.es/dpd/?key=$1",drae:"dle.rae.es/?w=$1",dreamhost:"wiki.dreamhost.com/index.php/$1",drumcorpswiki:S+"drumcorpswiki.com/index.php/$1",dwjwiki:S+"suberic.net/cgi-bin/dwj/wiki.cgi?$1","eĉei":S+"ikso.net/cgi-bin/wiki.pl?$1",ecoreality:S+"EcoReality.org/wiki/$1",ecxei:S+"ikso.net/cgi-bin/wiki.pl?$1",elibre:"enciclopedia.us.es/index.php/$1",emacswiki:S+"emacswiki.org/emacs?$1",encyc:"encyc.org/wiki/$1",energiewiki:S+"netzwerk-energieberater.de/wiki/index.php/$1",englyphwiki:"en.glyphwiki.org/wiki/$1",enkol:"enkol.pl/$1",eokulturcentro:"esperanto.toulouse.free.fr/nova/wikini/wakka.php?wiki=$1",esolang:"esolangs.org/wiki/$1",etherpad:"etherpad.wikimedia.org/$1",ethnologue:S+"ethnologue.com/language/$1",ethnologuefamily:S+"ethnologue.com/show_family.asp?subid=$1",evowiki:"wiki.cotch.net/index.php/$1",exotica:S+"exotica.org.uk/wiki/$1",fanimutationwiki:"wiki.animutationportal.com/index.php/$1",fedora:"fedoraproject.org/wiki/$1",finalfantasy:"finalfantasy.wikia.com/wiki/$1",finnix:S+"finnix.org/$1",flickruser:S+"flickr.com/people/$1",flickrphoto:S+"flickr.com/photo.gne?id=$1",floralwiki:S+"floralwiki.co.uk/wiki/$1",foldoc:"foldoc.org/$1",foundation:"foundation"+E,foundationsite:"wikimediafoundation.org/$1",foxwiki:"fox.wikis.com/wc.dll?Wiki~$1",freebio:"freebiology.org/wiki/$1",freebsdman:S+"FreeBSD.org/cgi/man.cgi?apropos=1&query=$1",freeculturewiki:"wiki.freeculture.org/index.php/$1",freedomdefined:"freedomdefined.org/$1",freefeel:"freefeel.org/wiki/$1",freekiwiki:"wiki.freegeek.org/index.php/$1",freesoft:"directory.fsf.org/wiki/$1",ganfyd:"ganfyd.org/index.php?title=$1",gardenology:S+"gardenology.org/wiki/$1",gausswiki:"gauss.ffii.org/$1",gentoo:"wiki.gentoo.org/wiki/$1",genwiki:"wiki.genealogy.net/index.php/$1",gerrit:"gerrit.wikimedia.org/r/$1",git:"gerrit.wikimedia.org/g/$1",google:S+"google.com/search?q=$1",googledefine:S+"google.com/search?q=define:$1",googlegroups:"groups.google.com/groups?q=$1",guildwarswiki:"wiki.guildwars.com/wiki/$1",guildwiki:"guildwars.wikia.com/wiki/$1",guc:"tools.wmflabs.org/guc/?user=$1",gucprefix:"tools.wmflabs.org/guc/?isPrefixPattern=1&src=rc&user=$1",gutenberg:S+"gutenberg.org/etext/$1",gutenbergwiki:S+"gutenberg.org/wiki/$1",hackerspaces:"hackerspaces.org/wiki/$1",h2wiki:"halowiki.net/p/$1",hammondwiki:S+"dairiki.org/HammondWiki/index.php3?$1",hdl:"hdl.handle.net/$1",heraldik:"heraldik-wiki.de/wiki/$1",heroeswiki:"heroeswiki.com/$1",horizonlabs:"horizon.wikimedia.org/$1",hrwiki:S+"hrwiki.org/index.php/$1",hrfwiki:"fanstuff.hrwiki.org/index.php/$1",hupwiki:"wiki.hup.hu/index.php/$1",iarchive:"archive.org/details/$1",imdbname:S+"imdb.com/name/nm$1/",imdbtitle:S+"imdb.com/title/tt$1/",imdbcompany:S+"imdb.com/company/co$1/",imdbcharacter:S+"imdb.com/character/ch$1/",incubator:"incubator"+E,infosecpedia:"infosecpedia.org/wiki/$1",infosphere:"theinfosphere.org/$1","iso639-3":"iso639-3.sil.org/code/$1",issn:S+"worldcat.org/issn/$1",iuridictum:"iuridictum.pecina.cz/w/$1",jaglyphwiki:"glyphwiki.org/wiki/$1",jefo:"esperanto-jeunes.org/wiki/$1",jerseydatabase:"jerseydatabase.com/wiki.php?id=$1",jira:"jira.toolserver.org/browse/$1",jspwiki:S+"ecyrd.com/JSPWiki/Wiki.jsp?page=$1",jstor:S+"jstor.org/journals/$1",kamelo:"kamelopedia.mormo.org/index.php/$1",karlsruhe:"ka.stadtwiki.net/$1",kinowiki:"kino.skripov.com/index.php/$1",komicawiki:"wiki.komica.org/?$1",kontuwiki:"kontu.wiki/$1",wikitech:"wikitech"+E,libreplanet:"libreplanet.org/wiki/$1",linguistlist:"linguistlist.org/forms/langs/LLDescription.cfm?code=$1",linuxwiki:S+"linuxwiki.de/$1",linuxwikide:S+"linuxwiki.de/$1",liswiki:"liswiki.org/wiki/$1",literateprograms:"en.literateprograms.org/$1",livepedia:S+"livepedia.gr/index.php?title=$1",localwiki:"localwiki.org/$1",lojban:"mw.lojban.org/papri/$1",lostpedia:"lostpedia.wikia.com/wiki/$1",lqwiki:"wiki.linuxquestions.org/wiki/$1",luxo:"tools.wmflabs.org/guc/?user=$1",mail:"lists.wikimedia.org/mailman/listinfo/$1",mailarchive:"lists.wikimedia.org/pipermail/$1",mariowiki:S+"mariowiki.com/$1",marveldatabase:S+"marveldatabase.com/wiki/index.php/$1",meatball:"meatballwiki.org/wiki/$1",mw:S+"mediawiki.org/wiki/$1",mediazilla:"bugzilla.wikimedia.org/$1",memoryalpha:"memory-alpha.fandom.com/wiki/$1",metawiki:"meta"+E,metawikimedia:"meta"+E,metawikipedia:"meta"+E,mineralienatlas:S+"mineralienatlas.de/lexikon/index.php/$1",moinmoin:"moinmo.in/$1",monstropedia:S+"monstropedia.org/?title=$1",mosapedia:"mosapedia.de/wiki/index.php/$1",mozcom:"mozilla.wikia.com/wiki/$1",mozillawiki:"wiki.mozilla.org/$1",mozillazinekb:"kb.mozillazine.org/$1",musicbrainz:"musicbrainz.org/doc/$1",mediawikiwiki:S+"mediawiki.org/wiki/$1",mwod:S+"merriam-webster.com/dictionary/$1",mwot:S+"merriam-webster.com/thesaurus/$1",nkcells:S+"nkcells.info/index.php?title=$1",nara:"catalog.archives.gov/id/$1",nosmoke:"no-smok.net/nsmk/$1",nost:"nostalgia."+O,nostalgia:"nostalgia."+O,oeis:"oeis.org/$1",oldwikisource:"wikisource.org/wiki/$1",olpc:"wiki.laptop.org/go/$1",omegawiki:S+"omegawiki.org/Expression:$1",onelook:S+"onelook.com/?ls=b&w=$1",openlibrary:"openlibrary.org/$1",openstreetmap:"wiki.openstreetmap.org/wiki/$1",openwetware:"openwetware.org/wiki/$1",opera7wiki:"operawiki.info/$1",organicdesign:S+"organicdesign.co.nz/$1",orthodoxwiki:"orthodoxwiki.org/$1",osmwiki:"wiki.openstreetmap.org/wiki/$1",otrs:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=$1",otrswiki:"otrs-wiki"+E,ourmedia:S+"socialtext.net/ourmedia/index.cgi?$1",outreach:"outreach"+E,outreachwiki:"outreach"+E,owasp:S+"owasp.org/index.php/$1",panawiki:"wiki.alairelibre.net/index.php?title=$1",patwiki:"gauss.ffii.org/$1",personaltelco:"personaltelco.net/wiki/$1",petscan:"petscan.wmflabs.org/?psid=$1",phab:"phabricator.wikimedia.org/$1",phabricator:"phabricator.wikimedia.org/$1",phwiki:S+"pocketheaven.com/ph/wiki/index.php?title=$1",phpwiki:"phpwiki.sourceforge.net/phpwiki/index.php?$1",planetmath:"planetmath.org/node/$1",pmeg:S+"bertilow.com/pmeg/$1",pmid:S+"ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract",pokewiki:"pokewiki.de/$1","pokéwiki":"pokewiki.de/$1",policy:"policy.wikimedia.org/$1",proofwiki:S+"proofwiki.org/wiki/$1",pyrev:S+"mediawiki.org/wiki/Special:Code/pywikipedia/$1",pythoninfo:"wiki.python.org/moin/$1",pythonwiki:S+"pythonwiki.de/$1",pywiki:"c2.com/cgi/wiki?$1",psycle:"psycle.sourceforge.net/wiki/$1",quality:"quality"+E,quarry:"quarry.wmflabs.org/$1",regiowiki:"regiowiki.at/wiki/$1",rev:S+"mediawiki.org/wiki/Special:Code/MediaWiki/$1",revo:"purl.org/NET/voko/revo/art/$1.html",rfc:"tools.ietf.org/html/rfc$1",rheinneckar:"rhein-neckar-wiki.de/$1",robowiki:"robowiki.net/?$1",rodovid:"en.rodovid.org/wk/$1",reuterswiki:"glossary.reuters.com/index.php/$1",rowiki:"wiki.rennkuckuck.de/index.php/$1",rt:"rt.wikimedia.org/Ticket/Display.html?id=$1",s23wiki:"s23.org/wiki/$1",scholar:"scholar.google.com/scholar?q=$1",schoolswp:"schools-"+O,scores:"imslp.org/wiki/$1",scoutwiki:"en.scoutwiki.org/$1",scramble:S+"scramble.nl/wiki/index.php?title=$1",seapig:S+"seapig.org/$1",seattlewiki:"seattle.wikia.com/wiki/$1",slwiki:"wiki.secondlife.com/wiki/$1","semantic-mw":S+"semantic-mediawiki.org/wiki/$1",senseislibrary:"senseis.xmp.net/?$1",sharemap:"sharemap.org/$1",silcode:S+"sil.org/iso639-3/documentation.asp?id=$1",slashdot:"slashdot.org/article.pl?sid=$1",sourceforge:"sourceforge.net/$1",spcom:"spcom"+E,species:"species"+E,squeak:"wiki.squeak.org/squeak/$1",stats:"stats.wikimedia.org/$1",stewardry:"tools.wmflabs.org/meta/stewardry/?wiki=$1",strategy:"strategy"+E,strategywiki:"strategywiki.org/wiki/$1",sulutil:"meta.wikimedia.org/wiki/Special:CentralAuth/$1",swtrain:"train.spottingworld.com/$1",svn:"svn.wikimedia.org/viewvc/mediawiki/$1?view=log",swinbrain:"swinbrain.ict.swin.edu.au/wiki/$1",tabwiki:S+"tabwiki.com/index.php/$1",tclerswiki:"wiki.tcl.tk/$1",technorati:S+"technorati.com/search/$1",tenwiki:"ten."+O,testwiki:"test."+O,testwikidata:"test.wikidata.org/wiki/$1",test2wiki:"test2."+O,tfwiki:"tfwiki.net/wiki/$1",thelemapedia:S+"thelemapedia.org/index.php/$1",theopedia:S+"theopedia.com/$1",thinkwiki:S+"thinkwiki.org/wiki/$1",ticket:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=$1",tmbw:"tmbw.net/wiki/$1",tmnet:S+"technomanifestos.net/?$1",tmwiki:S+"EasyTopicMaps.com/?page=$1",toolforge:"tools.wmflabs.org/$1",toollabs:"tools.wmflabs.org/$1",tools:"toolserver.org/$1",tswiki:S+"mediawiki.org/wiki/Toolserver:$1",translatewiki:"translatewiki.net/wiki/$1",tviv:"tviv.org/wiki/$1",tvtropes:S+"tvtropes.org/pmwiki/pmwiki.php/Main/$1",twiki:"twiki.org/cgi-bin/view/$1",tyvawiki:S+"tyvawiki.org/wiki/$1",umap:"umap.openstreetmap.fr/$1",uncyclopedia:"en.uncyclopedia.co/wiki/$1",unihan:S+"unicode.org/cgi-bin/GetUnihanData.pl?codepoint=$1",unreal:"wiki.beyondunreal.com/wiki/$1",urbandict:S+"urbandictionary.com/define.php?term=$1",usej:S+"tejo.org/usej/$1",usemod:S+"usemod.com/cgi-bin/wiki.pl?$1",usability:"usability"+E,utrs:"utrs.wmflabs.org/appeal.php?id=$1",vikidia:"fr.vikidia.org/wiki/$1",vlos:"tusach.thuvienkhoahoc.com/wiki/$1",vkol:"kol.coldfront.net/thekolwiki/index.php/$1",voipinfo:S+"voip-info.org/wiki/view/$1",votewiki:"vote"+E,werelate:S+"werelate.org/wiki/$1",wg:"wg-en."+O,wikia:S+"wikia.com/wiki/w:c:$1",wikiasite:S+"wikia.com/wiki/w:c:$1",wikiapiary:"wikiapiary.com/wiki/$1",wikibooks:"en.wikibooks.org/wiki/$1",wikichristian:S+"wikichristian.org/index.php?title=$1",wikicities:S+"wikia.com/wiki/w:$1",wikicity:S+"wikia.com/wiki/w:c:$1",wikiconference:"wikiconference.org/wiki/$1",wikidata:S+"wikidata.org/wiki/$1",wikif1:S+"wikif1.org/$1",wikifur:"en.wikifur.com/wiki/$1",wikihow:S+"wikihow.com/$1",wikiindex:"wikiindex.org/$1",wikilemon:"wiki.illemonati.com/$1",wikilivres:"wikilivres.org/wiki/$1",wikilivresru:"wikilivres.ru/$1","wikimac-de":"apfelwiki.de/wiki/Main/$1",wikimedia:"foundation"+E,wikinews:"en.wikinews.org/wiki/$1",wikinfo:"wikinfo.org/w/index.php/$1",wikinvest:"meta.wikimedia.org/wiki/Interwiki_map/discontinued#Wikinvest",wikiotics:"wikiotics.org/$1",wikipapers:"wikipapers.referata.com/wiki/$1",wikipedia:"en."+O,wikipediawikipedia:"en.wikipedia.org/wiki/Wikipedia:$1",wikiquote:"en.wikiquote.org/wiki/$1",wikisophia:"wikisophia.org/index.php?title=$1",wikisource:"en.wikisource.org/wiki/$1",wikispecies:"species"+E,wikispot:"wikispot.org/?action=gotowikipage&v=$1",wikiskripta:S+"wikiskripta.eu/index.php/$1",labsconsole:"wikitech"+E,wikiti:"wikiti.denglend.net/index.php?title=$1",wikiversity:"en.wikiversity.org/wiki/$1",wikivoyage:"en.wikivoyage.org/wiki/$1",betawikiversity:"beta.wikiversity.org/wiki/$1",wikiwikiweb:"c2.com/cgi/wiki?$1",wiktionary:"en.wiktionary.org/wiki/$1",wipipedia:"wipipedia.org/index.php/$1",wlug:S+"wlug.org.nz/$1",wmam:"am"+E,wmar:S+"wikimedia.org.ar/wiki/$1",wmat:"mitglieder.wikimedia.at/$1",wmau:"wikimedia.org.au/wiki/$1",wmbd:"bd"+E,wmbe:"be"+E,wmbr:"br"+E,wmca:"ca"+E,wmch:S+"wikimedia.ch/$1",wmcl:S+"wikimediachile.cl/index.php?title=$1",wmcn:"cn"+E,wmco:"co"+E,wmcz:S+"wikimedia.cz/web/$1",wmdc:"wikimediadc.org/wiki/$1",securewikidc:"secure.wikidc.org/$1",wmde:"wikimedia.de/wiki/$1",wmdk:"dk"+E,wmee:"ee"+E,wmec:"ec"+E,wmes:S+"wikimedia.es/wiki/$1",wmet:"ee"+E,wmfdashboard:"outreachdashboard.wmflabs.org/$1",wmfi:"fi"+E,wmfr:"wikimedia.fr/$1",wmge:"ge"+E,wmhi:"hi"+E,wmhk:"meta.wikimedia.org/wiki/Wikimedia_Hong_Kong",wmhu:"wikimedia.hu/wiki/$1",wmid:"id"+E,wmil:S+"wikimedia.org.il/$1",wmin:"wiki.wikimedia.in/$1",wmit:"wiki.wikimedia.it/wiki/$1",wmke:"meta.wikimedia.org/wiki/Wikimedia_Kenya",wmmk:"mk"+E,wmmx:"mx"+E,wmnl:"nl"+E,wmnyc:"nyc"+E,wmno:"no"+E,"wmpa-us":"pa-us"+E,wmph:"meta.wikimedia.org/wiki/Wikimedia_Philippines",wmpl:"pl"+E,wmpt:"pt"+E,wmpunjabi:"punjabi"+E,wmromd:"romd"+E,wmrs:"rs"+E,wmru:"ru"+E,wmse:"se"+E,wmsk:"wikimedia.sk/$1",wmtr:"tr"+E,wmtw:"wikimedia.tw/wiki/index.php5/$1",wmua:"ua"+E,wmuk:"wikimedia.org.uk/wiki/$1",wmve:"wikimedia.org.ve/wiki/$1",wmza:"wikimedia.org.za/wiki/$1",wm2005:"wikimania2005"+E,wm2006:"wikimania2006"+E,wm2007:"wikimania2007"+E,wm2008:"wikimania2008"+E,wm2009:"wikimania2009"+E,wm2010:"wikimania2010"+E,wm2011:"wikimania2011"+E,wm2012:"wikimania2012"+E,wm2013:"wikimania2013"+E,wm2014:"wikimania2014"+E,wm2015:"wikimania2015"+E,wm2016:"wikimania2016"+E,wm2017:"wikimania2017"+E,wm2018:"wikimania2018"+E,wmania:"wikimania"+E,wikimania:"wikimania"+E,wmteam:"wikimaniateam"+E,wmf:"foundation"+E,wmfblog:"blog.wikimedia.org/$1",wmdeblog:"blog.wikimedia.de/$1",wookieepedia:"starwars.wikia.com/wiki/$1",wowwiki:S+"wowwiki.com/$1",wqy:"wqy.sourceforge.net/cgi-bin/index.cgi?$1",wurmpedia:"wurmpedia.com/index.php/$1",viaf:"viaf.org/viaf/$1",zrhwiki:S+"zrhwiki.ch/wiki/$1",zum:"wiki.zum.de/$1",zwiki:S+"zwiki.org/$1",m:"meta"+E,meta:"meta"+E,sep11:"sep11."+O,d:S+"wikidata.org/wiki/$1",minnan:"zh-min-nan."+O,nb:"no."+O,"zh-cfr":"zh-min-nan."+O,"zh-cn":"zh."+O,"zh-tw":"zh."+O,nan:"zh-min-nan."+O,vro:"fiu-vro."+O,cmn:"zh."+O,lzh:"zh-classical."+O,rup:"roa-rup."+O,gsw:"als."+O,"be-tarask":"be-x-old."+O,sgs:"bat-smg."+O,egl:"eml."+O,w:"en."+O,wikt:"en.wiktionary.org/wiki/$1",q:"en.wikiquote.org/wiki/$1",b:"en.wikibooks.org/wiki/$1",n:"en.wikinews.org/wiki/$1",s:"en.wikisource.org/wiki/$1",chapter:"en"+E,v:"en.wikiversity.org/wiki/$1",voy:"en.wikivoyage.org/wiki/$1"};Object.keys(z).forEach((e=>{C[e]=e+".wikipedia.org/wiki/$1"}));const q=/^:?(category|catégorie|kategorie|categoría|categoria|categorie|kategoria|تصنيف|image|file|fichier|datei|media):/i,N=/\[(https?|news|ftp|mailto|gopher|irc)(:\/\/[^\]| ]{4,1500})([| ].*?)?\]/g,L=/\[\[(.{0,160}?)\]\]([a-z]+)?/gi,P=function(e,t){return t.replace(L,(function(t,i,a){let n=null,r=i;if(i.match(/\|/)&&(r=(i=i.replace(/\[\[(.{2,100}?)\]\](\w{0,10})/g,"$1$2")).replace(/(.{2,100})\|.{0,200}/,"$1"),n=i.replace(/.{2,100}?\|/,""),null===n&&r.match(/\|$/)&&(r=r.replace(/\|$/,""),n=r)),r.match(q))return i;let o={page:r,raw:t};return o.page=o.page.replace(/#(.*)/,((e,t)=>(o.anchor=t,""))),o=function(e){let t=e.page||"";if(-1!==t.indexOf(":")){let i=t.match(/^(.*):(.*)/);if(null===i)return e;let a=i[1]||"";if(a=a.toLowerCase(),-1!==a.indexOf(":")){let[,t,i]=a.match(/^:?(.*):(.*)/);if(!1===C.hasOwnProperty(t)||!1===z.hasOwnProperty(i))return e;e.wiki={wiki:t,lang:i}}else{if(!1===C.hasOwnProperty(a))return e;e.wiki=a}e.page=i[2]}return e}(o),o.wiki&&(o.type="interwiki"),null!==n&&n!==o.page&&(o.text=n),a&&(o.text=o.text||o.page,o.text+=a.trim()),o.page&&!1===/^[A-Z]/.test(o.page)&&(o.text||(o.text=o.page),o.page=o.page),e.push(o),i})),e},A=function(e){let t=[];if(t=function(e,t){return t.replace(N,(function(t,i,a,n){return n=n||"",e.push({type:"external",site:i+a,text:n.trim(),raw:t}),n})),e}(t,e),t=P(t,e),0!==t.length)return t},D=new RegExp("^[ \n\t]*?#("+["adkas","aýdaw","doorverwijzing","ohjaus","patrz","přesměruj","redirección","redireccion","redirección","redirecionamento","redirect","redirection","redirection","rinvia","tilvísun","uudelleenohjaus","weiterleitung","weiterleitung","yönlendi̇r","yönlendirme","yönlendi̇rme","ανακατευθυνση","айдау","перанакіраваньне","перенаправлення","пренасочување","преусмери","преусмјери","تغییر_مسیر","تغییرمسیر","تغییرمسیر","เปลี่ยนทาง","ប្តូរទីតាំងទៅ","転送","重定向"].join("|")+") *?(\\[\\[.{2,180}?\\]\\])","i"),T=["table","code","score","data","categorytree","charinsert","hiero","imagemap","inputbox","nowiki","references","source","syntaxhighlight","timeline"],I=`< ?(${T.join("|")}) ?[^>]{0,200}?>`,M=`< ?/ ?(${T.join("|")}) ?>`,R=new RegExp(`${I}[\\s\\S]+?${M}`,"gi");function U(e){return e=(e=(e=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(R," ")).replace(/ ?< ?(span|div|table|data) [a-zA-Z0-9=%.\-#:;'" ]{2,100}\/? ?> ?/g," ")).replace(/ ?< ?(ref) [a-zA-Z0-9=" ]{2,100}\/ ?> ?/g," ")).replace(/(.*?)<\/i>/g,"''$1''")).replace(/(.*?)<\/b>/g,"'''$1'''")).replace(/(.*?)<\/sub>/g,"{{sub|$1}}")).replace(/(.*?)<\/sup>/g,"{{sup|$1}}")).replace(/
(.*?)<\/blockquote>/g,"{{blockquote|text=$1}}")).replace(/ ?<[ /]?(p|sub|sup|span|nowiki|div|table|br|tr|td|th|pre|pre2|hr|u)[ /]?> ?/g," ")).replace(/ ?<[ /]?(abbr|bdi|bdo|cite|del|dfn|em|ins|kbd|mark|q|s|small)[ /]?> ?/g," ")).replace(/ ?<[ /]?h[0-9][ /]?> ?/g," ")).replace(/ ?< ?br ?\/> ?/g,"\n")).trim()}(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(//g,"")).replace(/__(NOTOC|NOEDITSECTION|FORCETOC|TOC)__/gi,"")).replace(/~{2,3}/g,"")).replace(/\r/g,"")).replace(/\u3002/g,". ")).replace(/----/g,"")).replace(/\{\{\}\}/g," – ")).replace(/\{\{\\\}\}/g," / ")).replace(/ /g," "))).replace(/\([,;: ]+\)/g,"")).replace(/\{\{(baseball|basketball) (primary|secondary) (style|color).*?\}\}/i,"")}const B=/[\\.$]/,F=function(e){return"string"!=typeof e&&(e=""),e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/^\$/,"\\u0024")).replace(/\./g,"\\u002e")},K=function(e={}){let t=Object.keys(e);for(let i=0;i{H.prototype[e]=Y[e]}));const G=/^[0-9,.]+$/,V={text:!0,links:!0,formatting:!0,numbers:!0},J=function(e={}){Object.defineProperty(this,"data",{enumerable:!1,value:e})},X={links:function(e){let t=this.data.links||[];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page===e));return void 0===i?[]:[i]}return t},interwiki:function(){return this.links().filter((e=>void 0!==e.wiki))},bolds:function(){return this.data&&this.data.fmt&&this.data.fmt.bold&&this.data.fmt.bold||[]},italics:function(){return this.data&&this.data.fmt&&this.data.fmt.italic&&this.data.fmt.italic||[]},text:function(e){return void 0!==e&&"string"==typeof e&&(this.data.text=e),this.data.text||""},json:function(e){return function(e,t){t=p(t,V);let i={},a=e.text();if(!0===t.text&&(i.text=a),!0===t.numbers&&G.test(a)){let e=Number(a.replace(/,/g,""));!1===isNaN(e)&&(i.number=e)}return t.links&&e.links().length>0&&(i.links=e.links().map((e=>e.json()))),t.formatting&&e.data.fmt&&(i.formatting=e.data.fmt),i}(this,e)},wikitext:function(){return this.data.wiki||""},isEmpty:function(){return""===this.data.text}};Object.keys(X).forEach((e=>{J.prototype[e]=X[e]}));const Q={links:"link",bolds:"bold",italics:"italic"};Object.keys(Q).forEach((e=>{J.prototype[Q[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}})),J.prototype.plaintext=J.prototype.text;const ee=["ad","adj","adm","adv","al","alta","approx","apr","apt","arc","ariz","assn","asst","atty","aug","ave","ba","bc","bl","bldg","blvd","brig","bros","ca","cal","calif","capt","cca","cg","cl","cm","cmdr","co","col","colo","comdr","conn","corp","cpl","cres","ct","cyn","dak","dec","def","dept","det","dg","dist","dl","dm","dr","ea","eg","eng","esp","esq","est","etc","ex","exp","feb","fem","fig","fl oz","fl","fla","fm","fr","ft","fy","ga","gal","gb","gen","gov","hg","hon","hr","hrs","hwy","hz","ia","ida","ie","inc","inf","jan","jd","jr","jul","jun","kan","kans","kb","kg","km","kmph","lat","lb","lit","llb","lm","lng","lt","ltd","lx","ma","maj","mar","masc","mb","md","messrs","mg","mi","min","minn","misc","mister","ml","mlle","mm","mme","mph","mps","mr","mrs","ms","mstr","mt","neb","nebr","nee","no","nov","oct","okla","ont","op","ord","oz","pa","pd","penn","penna","phd","pl","pp","pref","prob","prof","pron","ps","psa","pseud","pt","pvt","qt","que","rb","rd","rep","reps","res","rev","sask","sec","sen","sens","sep","sept","sfc","sgt","sir","situ","sq ft","sq","sr","ss","st","supt","surg","tb","tbl","tbsp","tce","td","tel","temp","tenn","tex","tsp","univ","usafa","ut","va","vb","ver","vet","vitro","vivo","vol","vs","vt","wis","wisc","wr","wy","wyo","yb","µg"].concat("[^]][^]]"),te=new RegExp("(^| |')("+ee.join("|")+")[.!?] ?$","i"),ie=/[ .'][A-Z].? *$/i,ae=/\.{3,} +$/,ne=/ c\.\s$/,re=/\p{Letter}/iu;function oe(e){let t={wiki:e,text:e};return function(e){let t=e.text,i=A(t)||[];e.links=i.map((e=>(t=t.replace(e.raw,e.text||e.page||""),new H(e)))),t=t.replace(/\[\[File:(.{2,80}?)\|([^\]]+)\]\](\w{0,5})/g,"$1"),e.text=t}(t),t.text=n(t.text.replace(/\([,;: ]*\)/g,"").replace(/\( *(; ?)+/g,"(")).replace(/ +\.$/,"."),t=function(e){let t=[],i=[],a=e.text||"";return a=a.replace(/'''''(.{0,2500}?)'''''/g,((e,a)=>(t.push(a),i.push(a),a))),a=a.replace(/''''(.{0,2500}?)''''/g,((e,i)=>(t.push(`'${i}'`),`'${i}'`))),a=a.replace(/'''(.{0,2500}?)'''/g,((e,i)=>(t.push(i),i))),a=a.replace(/''(.{0,2500}?)''/g,((e,t)=>(i.push(t),t))),e.text=a,t.length>0&&(e.fmt=e.fmt||{},e.fmt.bold=t),i.length>0&&(e.fmt=e.fmt||{},e.fmt.italic=i),e}(t),new J(t)}const se=function(e){let t=function(e){let t=[],i=[];if(!e||"string"!=typeof e||0===e.trim().length)return t;let a=function(e){let t=e.split(/(\n+)/);return t=t.filter((e=>e.match(/\S/))),t=t.map((function(e){return e.split(/(\S.+?[.!?]"?)(?=\s|$)/g)})),function(e){let t=[];return e.forEach((function(e){t=t.concat(e)})),t}(t)}(e);for(let e=0;ei.length)return!1;const a=e.match(/"/g);if(a&&a.length%2!=0&&e.length<900)return!1;const n=e.match(/[()]/g);return!(n&&n.length%2!=0&&e.length<900)}(n))?i[e+1]=i[e]+(i[e+1]||""):i[e]&&i[e].length>0&&(t.push(i[e]),i[e]="");var n;return 0===t.length?[e]:t}(e.wiki);t=t.map(oe),t[0]&&t[0].text()&&":"===t[0].text()[0]&&(t=t.slice(1)),e.sentences=t},le=/.*rowspan *= *["']?([0-9]+)["']?[ |]*/,ce=/.*colspan *= *["']?([0-9]+)["']?[ |]*/,ue=function(e){return e=function(e){return e.forEach(((t,i)=>{t.forEach(((a,n)=>{let r=a.match(le);if(null!==r){let o=parseInt(r[1],10);a=a.replace(le,""),t[n]=a;for(let t=i+1;t{e.forEach(((t,i)=>{let a=t.match(ce);if(null!==a){let n=parseInt(a[1],10);e[i]=t.replace(ce,"");for(let t=1;te.length>0))}(e))},pe=/^!/,me={name:!0,age:!0,born:!0,date:!0,year:!0,city:!0,country:!0,population:!0,count:!0,number:!0},de=function(e){return(e=oe(e).text()).match(/\|/)&&(e=e.replace(/.*?\| ?/,"")),e=(e=(e=e.replace(/style=['"].*?["']/,"")).replace(/^!/,"")).trim()},he=function(e){if(e.length<=3)return[];let t=e[0].slice(0);t=t.map((e=>(e=oe(e=e.replace(/^! */,"")).text(),e=(e=de(e)).toLowerCase())));for(let i=0;ie&&!0!==/^\|\+/.test(e))),!0===/^\{\|/.test(e[0])&&e.shift(),!0===/^\|\}/.test(e[e.length-1])&&e.pop(),!0===/^\|-/.test(e[0])&&e.shift(),e}(e);for(let a=0;a0&&(t.push(i),i=[]);else{let e=n.charAt(0);"|"!==e&&"!"!==e||(n=n.substring(1)),n=n.split(/(?:\|\||!!)/),"!"===e&&(n[0]=e+n[0]),n.forEach((e=>{e=e.trim(),i.push(e)}))}}return i.length>0&&t.push(i),t}(e.replace(/\r/g,"").replace(/\n(\s*[^|!{\s])/g," $1").split(/\n/).map((e=>e.trim())));if(t=t.filter((e=>e)),0===t.length)return[];t=function(e){return e.filter((e=>1!==e.length||!e[0]||!pe.test(e[0])||!1!==/rowspan/i.test(e[0])))}(t),t=ue(t);let i=function(e=[]){let t=[];var i;(i=(i=e[0])||[]).length-i.filter((e=>e)).length>3&&e.shift();let a=e[0];return a&&a[0]&&a[1]&&(/^!/.test(a[0])||/^!/.test(a[1]))&&(t=a.map((e=>(e=e.replace(/^! */,""),de(e)))),e.shift()),a=e[0],a&&a[0]&&a[1]&&/^!/.test(a[0])&&/^!/.test(a[1])&&(a.forEach(((e,i)=>{e=e.replace(/^! */,""),e=de(e),!0===Boolean(e)&&(t[i]=e)})),e.shift()),t}(t);if(!i||i.length<=1){i=he(t);let e=t[t.length-1]||[];i.length<=1&&e.length>2&&(i=he(t.slice(1)),i.length>0&&(t=t.slice(2)))}let a=t.map((e=>function(e,t){let i={};return e.forEach(((e,a)=>{let n=t[a]||"col"+(a+1),r=oe(e);r.text(de(r.text())),i[n]=r})),i}(e,i)));return a},fe={},ke=function(e=""){return e=(e=(e=(e=e.toLowerCase()).replace(/[_-]/g," ")).replace(/\(.*?\)/,"")).trim()},be=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_wiki",{enumerable:!1,value:t})},we={links(e){let t=[];if(this.data.forEach((e=>{Object.keys(e).forEach((i=>{t=t.concat(e[i].links())}))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},get(e){let t=this.data[0]||{},i=Object.keys(t).reduce(((e,t)=>(e[ke(t)]=t,e)),{});if("string"==typeof e){let t=ke(e);return t=i[t]||t,this.data.map((e=>e[t]?e[t].text():null))}return e=e.map(ke).map((e=>i[e]||e)),this.data.map((t=>e.reduce(((e,i)=>(t[i]?e[i]=t[i].text():e[i]="",e)),{})))},keyValue(e){let t=this.json(e);return t.forEach((e=>{Object.keys(e).forEach((t=>{e[t]=e[t].text}))})),t},json(e){return e=p(e,fe),function(e,t){return e.map((e=>{let i={};return Object.keys(e).forEach((t=>{i[t]=e[t].json()})),!0===t.encode&&(i=K(i)),i}))}(this.data,e)},text:()=>"",wikitext(){return this._wiki||""}};we.keyvalue=we.keyValue,we.keyval=we.keyValue,Object.keys(we).forEach((e=>{be.prototype[e]=we[e]}));const ye=/^\s*\{\|/,$e=/^\s*\|\}/,xe={sentences:!0},ve={sentences:!0,lists:!0,images:!0},je=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},_e={sentences:function(){return this.data.sentences||[]},references:function(){return this.data.references},lists:function(){return this.data.lists},images(){return this.data.images||[]},links:function(e){let t=[];if(this.sentences().forEach((i=>{t=t.concat(i.links(e))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},interwiki(){let e=[];return this.sentences().forEach((t=>{e=e.concat(t.interwiki())})),e||[]},text:function(e){e=p(e,ve);let t=this.sentences().map((t=>t.text(e))).join(" ");return this.lists().forEach((e=>{t+="\n"+e.text()})),t},json:function(e){return function(e,t){let i={};return!0===(t=p(t,xe)).sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,ve))},wikitext:function(){return this.data.wiki}};_e.citations=_e.references,Object.keys(_e).forEach((e=>{je.prototype[e]=_e[e]}));const ze={sentences:"sentence",references:"reference",citations:"citation",lists:"list",images:"image",links:"link"};Object.keys(ze).forEach((e=>{je.prototype[ze[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}}));const Oe=function(e){return e=(e=e.replace(/^\{\{/,"")).replace(/\}\}$/,"")},Ee=function(e){return e=(e=(e=(e||"").trim()).toLowerCase()).replace(/_/g," ")},Se=/^[\p{Letter}0-9._\- '()]+=/iu,Ce={template:!0,list:!0,prototype:!0},qe=function(e,t){let i=0;return e.reduce(((e,a="")=>{if(a=a.trim(),!0===Se.test(a)){let t=function(e){let t=e.split("="),i=t[0]||"";i=i.toLowerCase().trim();let a=t.slice(1).join("=");return Ce.hasOwnProperty(i)&&(i="_"+i),{key:i,val:a.trim()}}(a);if(t.key)return e[t.key]=t.val,e}if(t&&t[i]){e[t[i]]=a}else e.list=e.list||[],e.list.push(a);return i+=1,e}),{})},Ne={classname:!0,style:!0,align:!0,margin:!0,left:!0,break:!0,boxsize:!0,framestyle:!0,item_style:!0,collapsible:!0,list_style_type:!0,"list-style-type":!0,colwidth:!0},Le=function(e,t){let i=oe(e);return"json"===t?i.json():"raw"===t?i:i.text()},Pe=function(e,t=[],i){let a=function(e){let t=e.split(/\n?\|/);t.forEach(((e,i)=>{null!==e&&(/\[\[[^\]]+$/.test(e)||/\{\{[^}]+$/.test(e)||e.split("{{").length!==e.split("}}").length||e.split("[[").length!==e.split("]]").length)&&(t[i+1]=t[i]+"|"+t[i+1],t[i]=null)})),t=t.filter((e=>null!==e)),t=t.map((e=>(e||"").trim()));for(let e=t.length-1;e>=0;e-=1){""===t[e]&&t.pop();break}return t}(e=Oe(e||"")),n=a.shift(),r=qe(a,t);return r=function(e){return Object.keys(e).forEach((t=>{!0===Ne[t.toLowerCase()]&&delete e[t],null!==e[t]&&""!==e[t]||delete e[t]})),e}(r),r[1]&&t[0]&&!1===r.hasOwnProperty(t[0])&&(r[t[0]]=r[1],delete r[1]),Object.keys(r).forEach((e=>{r[e]="list"!==e?Le(r[e],i):r[e].map((e=>Le(e,i)))})),n&&(r.template=Ee(n)),r};const Ae=new RegExp("("+h.join("|")+"):","i");let De=`(${h.join("|")})`;const Te=new RegExp(De+":(.+?)[\\||\\]]","iu"),Ie={thumb:!0,thumbnail:!0,border:!0,right:!0,left:!0,center:!0,top:!0,bottom:!0,none:!0,upright:!0,baseline:!0,middle:!0,sub:!0,super:!0},Me=function(e,t){let i=e.wiki,a=function(e){let t=[],i=[];const a=e.split("");let n=0;for(let r=0;r0){let e=0,a=0;for(let t=0;ta&&i.push("]"),t.push(i.join("")),i=[]}}return t}(i);a.forEach((function(a){if(!0===Ae.test(a)){e.images=e.images||[];let n=function(e,t){let i=e.match(Te);if(null===i||!i[2])return null;let a=`${i[1]}:${i[2]||""}`;if(a){let i={file:a,lang:t._lang,domain:t._domain,wiki:e,pluginData:{}};e=(e=e.replace(/^\[\[/,"")).replace(/\]\]$/,"");let n=Pe(e),r=n.list||[];return n.alt&&(i.alt=n.alt),r=r.filter((e=>!1===Ie.hasOwnProperty(e))),r[r.length-1]&&(i.caption=oe(r[r.length-1])),new j(i)}return null}(a,t);n&&e.images.push(n),i=i.replace(a,"")}})),e.wiki=i},Re={},Ue=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},Be={lines(){return this.data},links(e){let t=[];if(this.lines().forEach((e=>{t=t.concat(e.links())})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},json(e){return e=p(e,Re),this.lines().map((t=>t.json(e)))},text(){return((e,t)=>e.map((e=>" * "+e.text(t))).join("\n"))(this.data)},wikitext(){return this.wiki||""}};Object.keys(Be).forEach((e=>{Ue.prototype[e]=Be[e]}));const Fe=/^[#*:;|]+/,Ke=/^\*+[^:,|]{4}/,We=/^ ?#[^:,|]{4}/,Ze=/[\p{Letter}_0-9\]}]/iu,He=function(e){return Fe.test(e)||Ke.test(e)||We.test(e)},Ye=function(e,t){let i=[];for(let a=t;ae&&Ze.test(e))),i=function(e){let t=1;e=e.filter((e=>e));for(let i=0;ie&&e.trim().length>0)),a=a.map((e=>{let i={wiki:e,lists:[],sentences:[],images:[]};return function(e){let t=e.wiki,i=t.split(/\n/g),a=[],n=[];for(let e=0;e0&&(a.push(t),e+=t.length-1)}else n.push(i[e]);e.lists=a.map((e=>new Ue(e,t))),e.wiki=n.join("\n")}(i),Me(i,t),se(i),new je(i)})),e._wiki=i,e._paragraphs=a},Je=function(e){let t=0,i=[],a=[];for(let n=e.indexOf("{");-1!==n&&n0?n++:n=e.indexOf("{",n+1)){let r=e[n];if("{"===r&&(t+=1),t>0){if("}"===r&&(t-=1,0===t)){a.push(r);let e=a.join("");a=[],/\{\{/.test(e)&&/\}\}/.test(e)&&i.push(e);continue}if(1===t&&"{"!==r&&"}"!==r){t=0,a=[];continue}a.push(r)}}return i},Xe=function(e){let t=null;return t=/^\{\{[^\n]+\|/.test(e)?(e.match(/^\{\{(.+?)\|/)||[])[1]:-1!==e.indexOf("\n")?(e.match(/^\{\{(.+)\n/)||[])[1]:(e.match(/^\{\{(.+?)\}\}$/)||[])[1],t&&(t=t.replace(/:.*/,""),t=Ee(t)),t||null},Qe=/\{\{/,et=function(e){return{body:e=e.replace(/#invoke:/,""),name:Xe(e),children:[]}},tt=function(e){let t=e.body.substr(2);return t=t.replace(/\}\}$/,""),e.children=Je(t),e.children=e.children.map(et),0===e.children.length||e.children.forEach((e=>{let t=e.body.substr(2);return Qe.test(t)?tt(e):null})),e},it=function(e){let t=Je(e);return t=t.map(et),t=t.map(tt),t},at=["anchor","defaultsort","use list-defined references","void","pp","pp-move-indef","pp-semi-indef","pp-vandalism","r","#tag","div col","pope list end","shipwreck list end","starbox end","end box","end","s-end"].reduce(((e,t)=>(e[t]=!0,e)),{});var nt={"gnf protein box":!0,"automatic taxobox":!0,"chembox ":!0,editnotice:!0,geobox:!0,hybridbox:!0,ichnobox:!0,infraspeciesbox:!0,mycomorphbox:!0,oobox:!0,"paraphyletic group":!0,speciesbox:!0,subspeciesbox:!0,"starbox short":!0,taxobox:!0,nhlteamseason:!0,"asian games bid":!0,"canadian federal election results":!0,"dc thomson comic strip":!0,"daytona 24 races":!0,edencharacter:!0,"moldova national football team results":!0,samurai:!0,protein:!0,"sheet authority":!0,"order-of-approx":!0,"bacterial labs":!0,"medical resources":!0,ordination:!0,"hockey team coach":!0,"hockey team gm":!0,"pro hockey team":!0,"hockey team player":!0,"hockey team start":!0,mlbbioret:!0};const rt=new RegExp("^(subst.)?("+g.join("|")+")(?=:| |\n|$)","i");g.forEach((e=>{nt[e]=!0}));const ot=/^infobox /i,st=/ infobox$/i,lt=/^year in [A-Z]/i,ct=function(e={}){let t=e.template.match(rt),i=e.template;t&&t[0]&&(i=i.replace(t[0],"")),i=i.trim();let a={template:"infobox",type:i,data:e};return delete a.data.template,delete a.data.list,a};let ut={imdb:"imdb name","imdb episodess":"imdb episode",localday:"currentday",localdayname:"currentdayname",localyear:"currentyear","birth date based on age at death":"birth based on age as of date","bare anchored list":"anchored list",cvt:"convert",cricon:"flagicon",sfrac:"frac",sqrt:"radic","unreferenced section":"unreferenced",redir:"redirect",sisterlinks:"sister project links","main article":"main"},pt={date:["byline","dateline"],citation:["cite","source","source-pr","source-science"],flagcountry:["cr","cr-rt"],trunc:["str left","str crop"],percentage:["pct","percentage"],rnd:["rndfrac","rndnear"],abbr:["tooltip","abbrv","define"],sfn:["sfnref","harvid","harvnb"],"birth date and age":["death date and age","bda"],currentmonth:["localmonth","currentmonthname","currentmonthabbrev"],currency:["monnaie","unité","nombre","nb","iso4217"],coord:["coor","coor title dms","coor title dec","coor dms","coor dm","coor dec"],"columns-list":["cmn","col-list","columnslist","collist"],nihongo:["nihongo2","nihongo3","nihongo-s","nihongo foot"],plainlist:["flatlist","plain list"],"winning percentage":["winpct","winperc"],"collapsible list":["nblist","nonbulleted list","ubl","ublist","ubt","unbullet","unbulleted list","unbulleted","unbulletedlist","vunblist"],"election box begin":["election box begin no change","election box begin no party","election box begin no party no change","election box inline begin","election box inline begin no change"],"election box candidate":["election box candidate for alliance","election box candidate minor party","election box candidate no party link no change","election box candidate with party link","election box candidate with party link coalition 1918","election box candidate with party link no change","election box inline candidate","election box inline candidate no change","election box inline candidate with party link","election box inline candidate with party link no change","election box inline incumbent"],"4teambracket":["2teambracket","4team2elimbracket","8teambracket","16teambracket","32teambracket","4roundbracket-byes","cwsbracket","nhlbracket","nhlbracket-reseed","4teambracket-nhl","4teambracket-ncaa","4teambracket-mma","4teambracket-mlb","16teambracket-two-reseeds","8teambracket-nhl","8teambracket-mlb","8teambracket-ncaa","8teambracket-afc","8teambracket-afl","8teambracket-tennis3","8teambracket-tennis5","16teambracket-nhl","16teambracket-nhl divisional","16teambracket-nhl-reseed","16teambracket-nba","16teambracket-swtc","16teambracket-afc","16teambracket-tennis3","16teambracket-tennis5"],start:["end","birth","death","start date","end date","birth date","death date","start date and age","end date and age","dob"],"start-date":["end-date","birth-date","death-date","birth-date and age","birth-date and given age","death-date and age","death-date and given age"],tl:["lts","t","tfd links","tiw","tltt","tetl","tsetl","ti","tic","tiw","tlt","ttl","twlh","tl2","tlu","demo","xpd","para","elc","xtag","mli","mlix","#invoke","url"]};Object.keys(z).forEach((e=>{ut["ipa-"+e]="ipa",ut["ipac-"+e]="ipac"})),Object.keys(pt).forEach((e=>{pt[e].forEach((t=>{ut[t]=e}))}));let mt={p1:0,p2:1,p3:2,resize:1,lang:1,"rtl-lang":1,l:2,h:1,sort:1};["defn","lino","finedetail","nobold","noitalic","nocaps","vanchor","rnd","date","taste","monthname","baseball secondary style","lang-de","nowrap","nobr","big","cquote","pull quote","smaller","midsize","larger","big","kbd","bigger","large","mono","strongbad","stronggood","huge","xt","xt2","!xt","xtn","xtd","dc","dcr","mxt","!mxt","mxtn","mxtd","bxt","!bxt","bxtn","bxtd","delink","pre","var","mvar","pre2","code","char","angle bracket","angbr","symb","key press"].forEach((e=>{mt[e]=0})),Object.keys(z).forEach((e=>{mt["lang-"+e]=0}));const dt=function(e){if(!e.numerator&&!e.denominator)return null;let t=Number(e.numerator)/Number(e.denominator);t*=100;let i=Number(e.decimals);return isNaN(i)&&(i=1),Number(t.toFixed(i))},ht=function(e=""){if("number"==typeof e)return e;e=(e=e.replace(/,/g,"")).replace(/−/g,"-");let t=Number(e);return isNaN(t)?e:t},gt=function(e){let t=e.match(/ipac?-(.+)/);return null!==t?!0===z.hasOwnProperty(t[1])?z[t[1]].english_title:t[1]:null},ft=e=>e.charAt(0).toUpperCase()+e.substring(1),kt={wikt:"wiktionary",commons:"commons",c:"commons",commonscat:"commonscat",n:"wikinews",q:"wikiquote",s:"wikisource",a:"wikiauthor",b:"wikibooks",voy:"wikivoyage",v:"wikiversity",d:"wikidata",species:"wikispecies",m:"meta",mw:"mediawiki"};var bt={ra:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},deg2hms:e=>(Pe(e,["degrees"]).degrees||"")+"°",hms2deg:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},decdeg:e=>{let t=Pe(e,["deg","min","sec","hem","rnd"]);return(t.deg||t.degrees)+"°"},sortname:e=>{let t=Pe(e,["first","last","target","sort"]),i=`${t.first||""} ${t.last||""}`;return i=i.trim(),t.nolink?t.target||i:(t.dab&&(i+=` (${t.dab})`,t.target&&(t.target+=` (${t.dab})`)),t.target?`[[${t.target}|${i}]]`:`[[${i}]]`)},"first word":e=>{let t=Pe(e,["text"]),i=t.text;return t.sep?i.split(t.sep)[0]:i.split(" ")[0]},trunc:e=>{let t=Pe(e,["str","len"]);return t.str.substr(0,t.len)},"str mid":e=>{let t=Pe(e,["str","start","end"]),i=parseInt(t.start,10)-1,a=parseInt(t.end,10);return t.str.substr(i,a)},reign:e=>{let t=Pe(e,["start","end"]);return`(r. ${t.start} – ${t.end})`},circa:e=>`c. ${Pe(e,["year"]).year}`,"decade link":e=>{let t=Pe(e,["year"]);return`${t.year}|${t.year}s`},decade:e=>{let t=Pe(e,["year"]),i=Number(t.year);return i=10*Math.floor(i/10),`${i}s`},century:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/100)+1,`${i}`},radic:e=>{let t=Pe(e,["after","before"]);return`${t.before||""}√${t.after||""}`},"medical cases chart/row":e=>e,oldstyledate:e=>{let t=Pe(e,["date","year"]);return t.year?t.date+" "+t.year:t.date},braces:e=>{let t=Pe(e,["text"]),i="";return t.list&&(i="|"+t.list.join("|")),"{{"+(t.text||"")+i+"}}"},hlist:e=>{let t=Pe(e);return t.list=t.list||[],t.list.join(" · ")},pagelist:e=>(Pe(e).list||[]).join(", "),catlist:e=>(Pe(e).list||[]).join(", "),"br separated entries":e=>(Pe(e).list||[]).join("\n\n"),"comma separated entries":e=>(Pe(e).list||[]).join(", "),"anchored list":e=>{let t=Pe(e).list||[];return t=t.map(((e,t)=>`${t+1}. ${e}`)),t.join("\n\n")},"bulleted list":e=>{let t=Pe(e).list||[];return t=t.filter((e=>e)),t=t.map((e=>"• "+e)),t.join("\n\n")},plainlist:e=>{let t=(e=Oe(e)).split("|").slice(1);return t=t.join("|").split(/\n ?\* ?/),t=t.filter((e=>e)),t.join("\n\n")},term:e=>`${Pe(e,["term"]).term}:`,linum:e=>{let t=Pe(e,["num","text"]);return`${t.num}. ${t.text}`},"block indent":e=>{let t=Pe(e);return t[1]?"\n"+t[1]+"\n":""},lbs:e=>{let t=Pe(e,["text"]);return`[[${t.text} Lifeboat Station|${t.text}]]`},lbc:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}-class]]`},lbb:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}]]`},"#dateformat":e=>(e=e.replace(/:/,"|"),Pe(e,["date","format"]).date),lc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toLowerCase()),uc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toUpperCase()),lcfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toLowerCase()+t.substr(1):""},ucfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toUpperCase()+t.substr(1):""},padleft:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padStart(t.num,t.str||"0")},padright:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padEnd(t.num,t.str||"0")},abbrlink:e=>{let t=Pe(e,["abbr","page"]);return t.page?`[[${t.page}|${t.abbr}]]`:`[[${t.abbr}]]`},own:e=>{let t=Pe(e,["author"]),i="Own work";return t.author&&(i+=" by "+t.author),i},formatnum:e=>{e=e.replace(/:/,"|");let t=Pe(e,["number"]).number||"";return t=t.replace(/,/g,""),Number(t).toLocaleString()||""},frac:e=>{let t=Pe(e,["a","b","c"]);return t.c?`${t.a} ${t.b}/${t.c}`:t.b?`${t.a}/${t.b}`:`1/${t.b}`},convert:e=>{let t=Pe(e,["num","two","three","four"]);return"-"===t.two||"to"===t.two||"and"===t.two?t.four?`${t.num} ${t.two} ${t.three} ${t.four}`:`${t.num} ${t.two} ${t.three}`:`${t.num} ${t.two}`},tl:e=>{let t=Pe(e,["first","second"]);return t.second||t.first},won:e=>{let t=Pe(e,["text"]);return t.place||t.text||ft(t.template)},tag:e=>{let t=Pe(e,["tag","open"]);const i={span:!0,div:!0,p:!0};return t.open&&"pair"!==t.open?"":i[t.tag]?t.content||"":`<${t.tag} ${t.attribs||""}>${t.content||""}`},plural:e=>{e=e.replace(/plural:/,"plural|");let t=Pe(e,["num","word"]),i=Number(t.num),a=t.word;return 1!==i&&(/.y$/.test(a)?a=a.replace(/y$/,"ies"):a+="s"),i+" "+a},dec:e=>{let t=Pe(e,["degrees","minutes","seconds"]),i=(t.degrees||0)+"°";return t.minutes&&(i+=t.minutes+"′"),t.seconds&&(i+=t.seconds+"″"),i},val:e=>{let t=Pe(e,["number","uncertainty"]),i=t.number;i&&Number(i)&&(i=Number(i).toLocaleString());let a=i||"";return t.p&&(a=t.p+a),t.s&&(a=t.s+a),(t.u||t.ul||t.upl)&&(a=a+" "+(t.u||t.ul||t.upl)),a},percentage:e=>{let t=Pe(e,["numerator","denominator","decimals"]),i=dt(t);return null===i?"":i+"%"},small:e=>{let t=Pe(e);return t.list&&t.list[0]?t.list[0]:""},"percent-done":e=>{let t=Pe(e,["done","total","digits"]),i=dt({numerator:t.done,denominator:t.total,decimals:t.digits});return null===i?"":`${t.done} (${i}%) done`}},wt=[["🇦🇩","and","andorra"],["🇦🇪","are","united arab emirates"],["🇦🇫","afg","afghanistan"],["🇦🇬","atg","antigua and barbuda"],["🇦🇮","aia","anguilla"],["🇦🇱","alb","albania"],["🇦🇲","arm","armenia"],["🇦🇴","ago","angola"],["🇦🇶","ata","antarctica"],["🇦🇷","arg","argentina"],["🇦🇸","asm","american samoa"],["🇦🇹","aut","austria"],["🇦🇺","aus","australia"],["🇦🇼","abw","aruba"],["🇦🇽","ala","åland islands"],["🇦🇿","aze","azerbaijan"],["🇧🇦","bih","bosnia and herzegovina"],["🇧🇧","brb","barbados"],["🇧🇩","bgd","bangladesh"],["🇧🇪","bel","belgium"],["🇧🇫","bfa","burkina faso"],["🇧🇬","bgr","bulgaria"],["🇧🇬","bul","bulgaria"],["🇧🇭","bhr","bahrain"],["🇧🇮","bdi","burundi"],["🇧🇯","ben","benin"],["🇧🇱","blm","saint barthélemy"],["🇧🇲","bmu","bermuda"],["🇧🇳","brn","brunei darussalam"],["🇧🇴","bol","bolivia"],["🇧🇶","bes","bonaire, sint eustatius and saba"],["🇧🇷","bra","brazil"],["🇧🇸","bhs","bahamas"],["🇧🇹","btn","bhutan"],["🇧🇻","bvt","bouvet island"],["🇧🇼","bwa","botswana"],["🇧🇾","blr","belarus"],["🇧🇿","blz","belize"],["🇨🇦","can","canada"],["🇨🇨","cck","cocos (keeling) islands"],["🇨🇩","cod","congo"],["🇨🇫","caf","central african republic"],["🇨🇬","cog","congo"],["🇨🇭","che","switzerland"],["🇨🇮","civ","côte d'ivoire"],["🇨🇰","cok","cook islands"],["🇨🇱","chl","chile"],["🇨🇲","cmr","cameroon"],["🇨🇳","chn","china"],["🇨🇴","col","colombia"],["🇨🇷","cri","costa rica"],["🇨🇺","cub","cuba"],["🇨🇻","cpv","cape verde"],["🇨🇼","cuw","curaçao"],["🇨🇽","cxr","christmas island"],["🇨🇾","cyp","cyprus"],["🇨🇿","cze","czech republic"],["🇩🇪","deu","germany"],["🇩🇪","ger","germany"],["🇩🇯","dji","djibouti"],["🇩🇰","dnk","denmark"],["🇩🇲","dma","dominica"],["🇩🇴","dom","dominican republic"],["🇩🇿","dza","algeria"],["🇪🇨","ecu","ecuador"],["🇪🇪","est","estonia"],["🇪🇬","egy","egypt"],["🇪🇭","esh","western sahara"],["🇪🇷","eri","eritrea"],["🇪🇸","esp","spain"],["🇪🇹","eth","ethiopia"],["🇫🇮","fin","finland"],["🇫🇯","fji","fiji"],["🇫🇰","flk","falkland islands (malvinas)"],["🇫🇲","fsm","micronesia"],["🇫🇴","fro","faroe islands"],["🇫🇷","fra","france"],["🇬🇦","gab","gabon"],["🇬🇧","gbr","united kingdom"],["🇬🇩","grd","grenada"],["🇬🇫","guf","french guiana"],["🇬🇬","ggy","guernsey"],["🇬🇭","gha","ghana"],["🇬🇮","gib","gibraltar"],["🇬🇱","grl","greenland"],["🇬🇲","gmb","gambia"],["🇬🇳","gin","guinea"],["🇬🇵","glp","guadeloupe"],["🇬🇶","gnq","equatorial guinea"],["🇬🇷","grc","greece"],["🇬🇸","sgs","south georgia"],["🇬🇹","gtm","guatemala"],["🇬🇺","gum","guam"],["🇬🇼","gnb","guinea-bissau"],["🇬🇾","guy","guyana"],["🇭🇰","hkg","hong kong"],["🇭🇲","hmd","heard island and mcdonald islands"],["🇭🇳","hnd","honduras"],["🇭🇷","hrv","croatia"],["🇭🇹","hti","haiti"],["🇭🇺","hun","hungary"],["🇮🇩","idn","indonesia"],["🇮🇪","irl","ireland"],["🇮🇱","isr","israel"],["🇮🇲","imn","isle of man"],["🇮🇳","ind","india"],["🇮🇴","iot","british indian ocean territory"],["🇮🇶","irq","iraq"],["🇮🇷","irn","iran"],["🇮🇸","isl","iceland"],["🇮🇹","ita","italy"],["🇯🇪","jey","jersey"],["🇯🇲","jam","jamaica"],["🇯🇴","jor","jordan"],["🇯🇵","jpn","japan"],["🇰🇪","ken","kenya"],["🇰🇬","kgz","kyrgyzstan"],["🇰🇭","khm","cambodia"],["🇰🇮","kir","kiribati"],["🇰🇲","com","comoros"],["🇰🇳","kna","saint kitts and nevis"],["🇰🇵","prk","north korea"],["🇰🇷","kor","south korea"],["🇰🇼","kwt","kuwait"],["🇰🇾","cym","cayman islands"],["🇰🇿","kaz","kazakhstan"],["🇱🇦","lao","lao people's democratic republic"],["🇱🇧","lbn","lebanon"],["🇱🇨","lca","saint lucia"],["🇱🇮","lie","liechtenstein"],["🇱🇰","lka","sri lanka"],["🇱🇷","lbr","liberia"],["🇱🇸","lso","lesotho"],["🇱🇹","ltu","lithuania"],["🇱🇺","lux","luxembourg"],["🇱🇻","lva","latvia"],["🇱🇾","lby","libya"],["🇲🇦","mar","morocco"],["🇲🇨","mco","monaco"],["🇲🇩","mda","moldova"],["🇲🇪","mne","montenegro"],["🇲🇫","maf","saint martin (french part)"],["🇲🇬","mdg","madagascar"],["🇲🇭","mhl","marshall islands"],["🇲🇰","mkd","macedonia"],["🇲🇱","mli","mali"],["🇲🇲","mmr","myanmar"],["🇲🇳","mng","mongolia"],["🇲🇴","mac","macao"],["🇲🇵","mnp","northern mariana islands"],["🇲🇶","mtq","martinique"],["🇲🇷","mrt","mauritania"],["🇲🇸","msr","montserrat"],["🇲🇹","mlt","malta"],["🇲🇺","mus","mauritius"],["🇲🇻","mdv","maldives"],["🇲🇼","mwi","malawi"],["🇲🇽","mex","mexico"],["🇲🇾","mys","malaysia"],["🇲🇿","moz","mozambique"],["🇳🇦","nam","namibia"],["🇳🇨","ncl","new caledonia"],["🇳🇪","ner","niger"],["🇳🇫","nfk","norfolk island"],["🇳🇬","nga","nigeria"],["🇳🇮","nic","nicaragua"],["🇳🇱","nld","netherlands"],["🇳🇴","nor","norway"],["🇳🇵","npl","nepal"],["🇳🇷","nru","nauru"],["🇳🇺","niu","niue"],["🇳🇿","nzl","new zealand"],["🇴🇲","omn","oman"],["🇵🇦","pan","panama"],["🇵🇪","per","peru"],["🇵🇫","pyf","french polynesia"],["🇵🇬","png","papua new guinea"],["🇵🇭","phl","philippines"],["🇵🇰","pak","pakistan"],["🇵🇱","pol","poland"],["🇵🇲","spm","saint pierre and miquelon"],["🇵🇳","pcn","pitcairn"],["🇵🇷","pri","puerto rico"],["🇵🇸","pse","palestinian territory"],["🇵🇹","prt","portugal"],["🇵🇼","plw","palau"],["🇵🇾","pry","paraguay"],["🇶🇦","qat","qatar"],["🇷🇪","reu","réunion"],["🇷🇴","rou","romania"],["🇷🇸","srb","serbia"],["🇷🇺","rus","russia"],["🇷🇼","rwa","rwanda"],["🇸🇦","sau","saudi arabia"],["🇸🇧","slb","solomon islands"],["🇸🇨","syc","seychelles"],["🇸🇩","sdn","sudan"],["🇸🇪","swe","sweden"],["🇸🇬","sgp","singapore"],["🇸🇭","shn","saint helena, ascension and tristan da cunha"],["🇸🇮","svn","slovenia"],["🇸🇯","sjm","svalbard and jan mayen"],["🇸🇰","svk","slovakia"],["🇸🇱","sle","sierra leone"],["🇸🇲","smr","san marino"],["🇸🇳","sen","senegal"],["🇸🇴","som","somalia"],["🇸🇷","sur","suriname"],["🇸🇸","ssd","south sudan"],["🇸🇹","stp","sao tome and principe"],["🇸🇻","slv","el salvador"],["🇸🇽","sxm","sint maarten (dutch part)"],["🇸🇾","syr","syrian arab republic"],["🇸🇿","swz","swaziland"],["🇹🇨","tca","turks and caicos islands"],["🇹🇩","tcd","chad"],["🇹🇫","atf","french southern territories"],["🇹🇬","tgo","togo"],["🇹🇭","tha","thailand"],["🇹🇯","tjk","tajikistan"],["🇹🇰","tkl","tokelau"],["🇹🇱","tls","timor-leste"],["🇹🇲","tkm","turkmenistan"],["🇹🇳","tun","tunisia"],["🇹🇴","ton","tonga"],["🇹🇷","tur","turkey"],["🇹🇹","tto","trinidad and tobago"],["🇹🇻","tuv","tuvalu"],["🇹🇼","twn","taiwan"],["🇹🇿","tza","tanzania"],["🇺🇦","ukr","ukraine"],["🇺🇬","uga","uganda"],["🇺🇲","umi","united states minor outlying islands"],["🇺🇸","us","united states"],["🇺🇸","usa","united states"],["🇺🇾","ury","uruguay"],["🇺🇿","uzb","uzbekistan"],["🇻🇦","vat","vatican city"],["🇻🇨","vct","saint vincent and the grenadines"],["🇻🇪","ven","venezuela"],["🇻🇬","vgb","virgin islands, british"],["🇻🇮","vir","virgin islands, u.s."],["🇻🇳","vnm","viet nam"],["🇻🇺","vut","vanuatu"],["🇼🇫","wlf","wallis and futuna"],["🇼🇸","wsm","samoa"],["🇾🇪","yem","yemen"],["🇾🇹","myt","mayotte"],["🇿🇦","zaf","south africa"],["🇿🇲","zmb","zambia"],["🇿🇼 ","zwe","zimbabwe"],["🇺🇳","un","united nations"],["🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿","eng","england"],["🏴󠁧󠁢󠁳󠁣󠁴󠁿","sct","scotland"],["🏴󠁧󠁢󠁷󠁬󠁳󠁿","wal","wales"],["🇪🇺","eu","european union"]];let yt={flag:e=>{let t=Pe(e,["flag","variant"]),i=t.flag||"";t.flag=(t.flag||"").toLowerCase();let a=wt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${a[0]||""} [[${a[2]}|${i}]]`},flagcountry:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=wt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} [[${i[2]}]]`},flagcu:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=wt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} ${i[2]}`},flagicon:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=wt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`[[${i[2]}|${i[0]}]]`:""},flagdeco:e=>{let t=Pe(e,["flag","variant"]);return t.flag=(t.flag||"").toLowerCase(),(wt.find((e=>t.flag===e[1]||t.flag===e[2]))||[])[0]||""},fb:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=wt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${i[2]} national football team|${i[2]}]]`:""},fbicon:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=wt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?` [[${i[2]} national football team|${i[0]}]]`:""},flagathlete:e=>{let t=Pe(e,["name","flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=wt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${t.name||""}]] (${i[1].toUpperCase()})`:`[[${t.name||""}]]`}};wt.forEach((e=>{yt[e[1]]=()=>e[0]}));let $t={};["rh","rh2","yes","no","maybe","eliminated","lost","safe","active","site active","coming soon","good","won","nom","sho","longlisted","tba","success","operational","failure","partial","regional","maybecheck","partial success","partial failure","okay","yes-no","some","nonpartisan","pending","unofficial","unofficial2","usually","rarely","sometimes","any","varies","black","non-album single","unreleased","unknown","perhaps","depends","included","dropped","terminated","beta","table-experimental","free","proprietary","nonfree","needs","nightly","release-candidate","planned","scheduled","incorrect","no result","cmain","calso starring","crecurring","cguest","not yet","optional"].forEach((e=>{$t[e]=e=>{let t=Pe(e,["text"]);return t.text||ft(t.template)}}));[["active fire","Active"],["site active","Active"],["site inactive","Inactive"],["yes2",""],["no2",""],["ya","✅"],["na","❌"],["nom","Nominated"],["sho","Shortlisted"],["tba","TBA"],["maybecheck","✔️"],["okay","Neutral"],["n/a","N/A"],["sdash","—"],["dunno","?"],["draw",""],["cnone",""],["nocontest",""]].forEach((e=>{$t[e[0]]=t=>Pe(t,["text"]).text||e[1]}));var xt=Object.assign({},{"·":"·",dot:"·",middot:"·","•":" • ",",":",","1/2":"1⁄2","1/3":"1⁄3","2/3":"2⁄3","1/4":"1⁄4","3/4":"3⁄4","–":"–",ndash:"–","en dash":"–","spaced ndash":" – ","—":"—",mdash:"—","em dash":"—","number sign":"#",ibeam:"I","&":"&",";":";",ampersand:"&",snds:" – ",snd:" – ","^":" ","!":"|","\\":" /","`":"`","=":"=",bracket:"[","[":"[","*":"*",asterisk:"*","long dash":"———",clear:"\n\n","h.":"ḥ",profit:"▲",loss:"▼",gain:"▲"},mt,bt,yt,$t);let vt={};["goodreads author","twitter","facebook","instagram","tumblr","pinterest","espn nfl","espn nhl","espn fc","hockeydb","fifa player","worldcat","worldcat id","nfl player","ted speaker","playmate"].forEach((e=>{vt[e]=["id","name"]}));let jt={};["imdb title","imdb name","imdb episode","imdb event","afi film","allmovie title","allgame","tcmdb title","discogs artist","discogs label","discogs release","discogs master","librivox author","musicbrainz artist","musicbrainz label","musicbrainz recording","musicbrainz release","musicbrainz work","youtube","goodreads book","dmoz"].forEach((e=>{jt[e]=["id","title","description","section"]}));var _t={ipa:(e,t)=>{let i=Pe(e,["transcription","lang","audio"]);return i.lang=gt(i.template),i.template="ipa",t.push(i),""},ipac:(e,t)=>{let i=Pe(e);return i.transcription=(i.list||[]).join(","),delete i.list,i.lang=gt(i.template),i.template="ipac",t.push(i),""},quote:(e,t)=>{let i=Pe(e,["text","author"]);if(t.push(i),i.text){let e=`"${i.text}"`;return i.author&&(e+="\n\n",e+=` - ${i.author}`),e+"\n"}return""},"cite gnis":(e,t)=>{let i=Pe(e,["id","name","type"]);return i.type="gnis",i.template="citation",t.push(i),""},"spoken wikipedia":(e,t)=>{let i=Pe(e,["file","date"]);return i.template="audio",t.push(i),""},yel:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`yellow: ${i.min||""}'`:""},subon:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub on: ${i.min||""}'`:""},suboff:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub off: ${i.min||""}'`:""},sfn:(e,t,i,a)=>{let n=Pe(e,["author","year","location"]);return a&&(n.name=n.template,n.teplate=a),t.push(n),""},redirect:(e,t)=>{let i=Pe(e,["redirect"]),a=i.list||[],n=[];for(let e=0;e{let i=Pe(e),a={};Object.keys(kt).forEach((e=>{!0===i.hasOwnProperty(e)&&(a[kt[e]]=i[e])}));let n={template:"sister project links",links:a};return t.push(n),""},"subject bar":(e,t)=>{let i=Pe(e);Object.keys(i).forEach((e=>{kt.hasOwnProperty(e)&&(i[kt[e]]=i[e],delete i[e])}));let a={template:"subject bar",links:i};return t.push(a),""},gallery:(e,t)=>{let i=Pe(e),a=(i.list||[]).filter((e=>/^ *File ?:/.test(e)));return a=a.map((e=>new j({file:e}).json())),i={template:"gallery",images:a},t.push(i),""},sky:(e,t)=>{let i=Pe(e,["asc_hours","asc_minutes","asc_seconds","dec_sign","dec_degrees","dec_minutes","dec_seconds","distance"]),a={template:"sky",ascension:{hours:i.asc_hours,minutes:i.asc_minutes,seconds:i.asc_seconds},declination:{sign:i.dec_sign,degrees:i.dec_degrees,minutes:i.dec_minutes,seconds:i.dec_seconds},distance:i.distance};return t.push(a),""},"medical cases chart":(e,t)=>{let i=["date","deathsExpr","recoveriesExpr","casesExpr","4thExpr","5thExpr","col1","col1Change","col2","col2Change"],a=Pe(e);a.data=a.data||"";let n=a.data.split("\n").map((e=>{let t=e.split(";"),a={options:new Map},n=0;for(let e=0;e{let i=Pe(e);i.x&&(i.x=i.x.split(",").map((e=>e.trim()))),i.y&&(i.y=i.y.split(",").map((e=>e.trim())));let a=1;for(;i["y"+a];)i["y"+a]=i["y"+a].split(",").map((e=>e.trim())),a+=1;return t.push(i),""},"historical populations":(e,t)=>{let i=Pe(e);i.list=i.list||[];let a=[];for(let e=0;e{const i=/^jan /i,a=/^year /i;let n=Pe(e);const r=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];let o={},s=Object.keys(n).filter((e=>i.test(e)));s=s.map((e=>e.replace(i,""))),s.forEach((e=>{o[e]=[],r.forEach((t=>{let i=`${t} ${e}`;if(n.hasOwnProperty(i)){let t=ht(n[i]);delete n[i],o[e].push(t)}}))})),n.byMonth=o;let l={};return Object.keys(n).forEach((e=>{if(a.test(e)){let t=e.replace(a,"");l[t]=n[e],delete n[e]}})),n.byYear=l,t.push(n),""},"weather box/concise c":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>ht(e))),i.byMonth={"high c":i.list.slice(0,12),"low c":i.list.slice(12,24),"rain mm":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"weather box/concise f":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>ht(e))),i.byMonth={"high f":i.list.slice(0,12),"low f":i.list.slice(12,24),"rain inch":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"climate chart":(e,t)=>{let i=Pe(e).list||[],a=i[0],n=i[38];i=i.slice(1),i=i.map((e=>(e&&"−"===e[0]&&(e=e.replace(/−/,"-")),e)));let r=[];for(let e=0;e<36;e+=3)r.push({low:ht(i[e]),high:ht(i[e+1]),precip:ht(i[e+2])});let o={template:"climate chart",data:{title:a,source:n,months:r}};return t.push(o),""}};let zt={"find a grave":["id","name","work","last","first","date","accessdate"],congbio:["id","name","date"],"hollywood walk of fame":["name"],"wide image":["file","width","caption"],audio:["file","text","type"],rp:["page"],"short description":["description"],"coord missing":["region"],unreferenced:["date"],"taxon info":["taxon","item"],"portuguese name":["first","second","suffix"],geo:["lat","lon","zoom"],hatnote:["text"]};zt=Object.assign(zt,vt,jt,_t);var Ot=zt;var Et={mlbplayer:{props:["number","name","il"],out:"name"},syntaxhighlight:{props:[],out:"code"},samp:{props:["1"],out:"1"},sub:{props:["text"],out:"text"},sup:{props:["text"],out:"text"},chem2:{props:["equation"],out:"equation"},ill:{props:["text","lan1","text1","lan2","text2"],out:"text"},abbr:{props:["abbr","meaning","ipa"],out:"abbr"}};let St={math:(e,t)=>{let i=Pe(e,["formula"]);return t.push(i),"\n\n"+(i.formula||"")+"\n\n"},legend:(e,t)=>{let i=Pe(e,["color","label"]);return t.push(i),i.label||" "},isbn:(e,t)=>{let i=Pe(e,["id","id2","id3"]);return t.push(i),"ISBN: "+(i.id||"")},"based on":(e,t)=>{let i=Pe(e,["title","author"]);return t.push(i),`${i.title} by ${i.author||""}`},"bbl to t":(e,t)=>{let i=Pe(e,["barrels"]);return t.push(i),"0"===i.barrels?i.barrels+" barrel":i.barrels+" barrels"},mpc:(e,t)=>{let i=Pe(e,["number","text"]);return t.push(i),`[https://minorplanetcenter.net/db_search/show_object?object_id=P/2011+NO1 ${i.text||i.number}]`},pengoal:(e,t)=>(t.push({template:"pengoal"}),"✅"),penmiss:(e,t)=>(t.push({template:"penmiss"}),"❌"),"ordered list":(e,t)=>{let i=Pe(e);return t.push(i),i.list=i.list||[],i.list.map(((e,t)=>`${t+1}. ${e}`)).join("\n\n")},"title year":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b[0-9]{4}\b/);if(e)return e[0]}return r.nomatch||""},"title century":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)(st|nd|rd|th)\b/);if(e)return e[1]||""}return r.nomatch||""},"title decade":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)s\b/);if(e)return e[1]||""}return r.nomatch||""},nihongo:(e,t)=>{let i=Pe(e,["english","kanji","romaji","extra"]);t.push(i);let a=i.english||i.romaji||"";return i.kanji&&(a+=` (${i.kanji})`),a},marriage:(e,t)=>{let i=Pe(e,["spouse","from","to","end"]);t.push(i);let a=i.spouse||"";return i.from&&(i.to?a+=` (m. ${i.from}-${i.to})`:a+=` (m. ${i.from})`),a},"sent off":(e,t)=>{let i=Pe(e,["cards"]),a={template:"sent off",cards:i.cards,minutes:i.list||[]};return t.push(a),"sent off: "+a.minutes.map((e=>e+"'")).join(", ")},transl:(e,t)=>{let i=Pe(e,["lang","text","text2"]);return i.text2&&(i.iso=i.text,i.text=i.text2,delete i.text2),t.push(i),i.text||""},"collapsible list":(e,t)=>{let i=Pe(e);t.push(i);let a="";if(i.title&&(a+=`'''${i.title}'''\n\n`),!i.list){i.list=[];for(let e=1;e<10;e+=1)i[e]&&(i.list.push(i[e]),delete i[e])}return i.list=i.list.filter((e=>e)),a+=i.list.join("\n\n"),a},"columns-list":(e,t)=>{let i=((Pe(e).list||[])[0]||"").split(/\n/).filter((e=>e));return i=i.map((e=>e.replace(/\*/,""))),t.push({template:"columns-list",list:i}),i=i.map((e=>"• "+e)),i.join("\n\n")},height:(e,t)=>{let i=Pe(e);t.push(i);let a=[];return["m","cm","ft","in"].forEach((e=>{!0===i.hasOwnProperty(e)&&a.push(i[e]+e)})),a.join(" ")},sic:(e,t)=>{let i=Pe(e,["one","two","three"]),a=(i.one||"")+(i.two||"");return"?"===i.one&&(a=(i.two||"")+(i.three||"")),t.push({template:"sic",word:a}),"y"===i.nolink?a:`${a} [sic]`},inrconvert:(e,t)=>{let i=Pe(e,["rupee_value","currency_formatting"]);t.push(i);const a={k:1e3,m:1e6,b:1e9,t:1e12,l:1e5,c:1e7,lc:1e12};if(i.currency_formatting){let e=a[i.currency_formatting]||1;i.rupee_value=i.rupee_value*e}return`inr ${i.rupee_value||""}`},frac:(e,t)=>{let i=Pe(e,["a","b","c"]),a={template:"sfrac"};return i.c?(a.integer=i.a,a.numerator=i.b,a.denominator=i.c):i.b?(a.numerator=i.a,a.denominator=i.b):(a.numerator=1,a.denominator=i.a),t.push(a),a.integer?`${a.integer} ${a.numerator}⁄${a.denominator}`:`${a.numerator}⁄${a.denominator}`},"winning percentage":(e,t)=>{let i=Pe(e,["wins","losses","ties"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=Number(i.ties)||0,o=a+n+r;"y"===i.ignore_ties&&(r=0),r&&(a+=r/2);let s=dt({numerator:a,denominator:o,decimals:1});return null===s?"":"."+10*s},winlosspct:(e,t)=>{let i=Pe(e,["wins","losses"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=dt({numerator:a,denominator:a+n,decimals:1});return null===r?"":`${a||0} || ${n||0} || ${"."+10*r||"-"}`},"video game release":(e,t)=>{let i=["region","date","region2","date2","region3","date3","region4","date4"],a=Pe(e,i),n={template:"video game release",releases:[]};for(let e=0;e`${e.region}: ${e.date||""}`)).join("\n\n")+"\n"},uss:(e,t)=>{let i=Pe(e,["name","id"]);return t.push(i),i.id?`[[USS ${i.name} (${i.id})|USS ''${i.name}'' (${i.id})]]`:`[[USS ${i.name}|USS ''${i.name}'']]`},blockquote:(e,t)=>{let i=Pe(e,["text","author","title","source","character"]);t.push(i);let a=i.text;a||(i.list=i.list||[],a=i.list[0]||"");let n=a.replace(/"/g,"'");return n='"'+n+'"',n}};const Ct={"£":"GB£","¥":"¥","৳":"৳","₩":"₩","€":"€","₱":"₱","₹":"₹","₽":"₽","cn¥":"CN¥","gb£":"GB£","india rs":"₹","indian rupee symbol":"₹","indian rupee":"₹","indian rupees":"₹","philippine peso":"₱","russian ruble":"₽","SK won":"₩","turkish lira":"TRY",a$:"A$",au$:"A$",aud:"A$",bdt:"BDT",brl:"BRL",ca$:"CA$",cad:"CA$",chf:"CHF",cny:"CN¥",czk:"czk",dkk:"dkk",dkk2:"dkk",euro:"€",gbp:"GB£",hk$:"HK$",hkd:"HK$",ils:"ILS",inr:"₹",jpy:"¥",myr:"MYR",nis:"ILS",nok:"NOK",nok2:"NOK",nz$:"NZ$",nzd:"NZ$",peso:"peso",pkr:"₨",r$:"BRL",rmb:"CN¥",rub:"₽",ruble:"₽",rupee:"₹",s$:"sgd",sek:"SEK",sek2:"SEK",sfr:"CHF",sgd:"sgd",shekel:"ILS",sheqel:"ILS",ttd:"TTD",us$:"US$",usd:"US$",yen:"¥",zar:"R"},qt=(e,t)=>{let i=Pe(e,["amount","code"]);t.push(i);let a=i.template||"";"currency"===a?(a=i.code,a||(i.code=a="usd")):""!==a&&"monnaie"!==a&&"unité"!==a&&"nombre"!==a&&"nb"!==a||(a=i.code),a=(a||"").toLowerCase(),"us"===a?i.code=a="usd":"uk"===a&&(i.code=a="gbp");let n=`${Ct[a]||""}${i.amount||""}`;return i.code&&!Ct[i.code.toLowerCase()]&&(n+=" "+i.code),n};let Nt={currency:qt};Object.keys(Ct).forEach((e=>{Nt[e]=qt}));const Lt=function(e){let t=e%10,i=e%100;return 1===t&&11!==i?e+"st":2===t&&12!==i?e+"nd":3===t&&13!==i?e+"rd":e+"th"},Pt=864e5,At=function(e){return new Date(`${e.year}-${e.month||0}-${e.date||1}`).getTime()},Dt=function(e,t){e=At(e);let i=(t=At(t))-e,a={},n=Math.floor(i/31536e6);n>0&&(a.years=n,i-=31536e6*a.years);let r=Math.floor(i/2592e6);r>0&&(a.months=r,i-=2592e6*a.months);let o=Math.floor(i/Pt);return o>0&&(a.days=o),a},Tt=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],It=[void 0,"January","February","March","April","May","June","July","August","September","October","November","December"],Mt=It.reduce(((e,t,i)=>(0===i||(e[t.toLowerCase()]=i),e)),{}),Rt=function(e){let t={},i=["year","month","date","hour","minute","second"];for(let a=0;a{let i=Pe(e,["year","month","date","hour","minute","second","timezone"]),a=Rt([i.year,i.month,i.date||i.day]);return i.text=Bt(a),i.timezone&&("Z"===i.timezone&&(i.timezone="UTC"),i.text+=` (${i.timezone})`),i.hour&&i.minute&&(i.second?i.text=`${i.hour}:${i.minute}:${i.second}, `+i.text:i.text=`${i.hour}:${i.minute}, `+i.text),i.text&&t.push(Ft(i)),i.text},natural_date:(e,t)=>{let i=Pe(e,["text"]).text||"",a={};if(/^[0-9]{4}$/.test(i))a.year=parseInt(i,10);else{let e=i.replace(/[a-z]+\/[a-z]+/i,"");e=e.replace(/[0-9]+:[0-9]+(am|pm)?/i,"");let t=new Date(e);!1===isNaN(t.getTime())&&(a.year=t.getFullYear(),a.month=t.getMonth()+1,a.date=t.getDate())}return t.push(Ft(a)),i.trim()},one_year:(e,t)=>{let i=Pe(e,["year"]),a=Number(i.year);return t.push(Ft({year:a})),String(a)},two_dates:(e,t)=>{let i=Pe(e,["b","birth_year","birth_month","birth_date","death_year","death_month","death_date"]);if(i.b&&"b"===i.b.toLowerCase()){let e=Rt([i.birth_year,i.birth_month,i.birth_date]);return t.push(Ft(e)),Bt(e)}let a=Rt([i.death_year,i.death_month,i.death_date]);return t.push(Ft(a)),Bt(a)},age:e=>{let t=Kt(e);return Dt(t.from,t.to).years||0},"diff-y":e=>{let t=Kt(e),i=Dt(t.from,t.to);return 1===i.years?i.years+" year":(i.years||0)+" years"},"diff-ym":e=>{let t=Kt(e),i=Dt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),a.join(", ")},"diff-ymd":e=>{let t=Kt(e),i=Dt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-yd":e=>{let t=Kt(e),i=Dt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-d":e=>{let t=Kt(e),i=Dt(t.from,t.to),a=[];return i.days+=365*(i.years||0),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")}},Zt=["January","February","March","April","May","June","July","August","September","October","November","December"];var Ht={currentday:()=>{let e=new Date;return String(e.getDate())},currentdayname:()=>{let e=new Date;return Tt[e.getDay()]},currentmonth:()=>{let e=new Date;return Zt[e.getMonth()]},currentyear:()=>{let e=new Date;return String(e.getFullYear())},monthyear:()=>{let e=new Date;return Zt[e.getMonth()]+" "+e.getFullYear()},"monthyear-1":()=>{let e=new Date;return e.setMonth(e.getMonth()-1),Zt[e.getMonth()]+" "+e.getFullYear()},"monthyear+1":()=>{let e=new Date;return e.setMonth(e.getMonth()+1),Zt[e.getMonth()]+" "+e.getFullYear()},"time ago":e=>function(e){let t=new Date(e);if(isNaN(t.getTime()))return"";let i=(new Date).getTime()-t.getTime(),a="ago";i<0&&(a="from now",i=Math.abs(i));let n=i/1e3/60/60/24;return n<365?Number(n)+" days "+a:Number(n/365)+" years "+a}(Pe(e,["date","fmt"]).date),"birth date and age":(e,t)=>{let i=Pe(e,["year","month","day"]);return i.year&&/[a-z]/i.test(i.year)?Wt.natural_date(e,t):(t.push(i),i=Rt([i.year,i.month,i.day]),Bt(i))},"birth year and age":(e,t)=>{let i=Pe(e,["birth_year","birth_month"]);if(i.death_year&&/[a-z]/i.test(i.death_year))return Wt.natural_date(e,t);t.push(i);let a=(new Date).getFullYear()-parseInt(i.birth_year,10);i=Rt([i.birth_year,i.birth_month]);let n=Bt(i);return a&&(n+=` (age ${a})`),n},"death year and age":(e,t)=>{let i=Pe(e,["death_year","birth_year","death_month"]);return i.death_year&&/[a-z]/i.test(i.death_year)?Wt.natural_date(e,t):(t.push(i),i=Rt([i.death_year,i.death_month]),Bt(i))},"birth date and age2":(e,t)=>{let i=Pe(e,["at_year","at_month","at_day","birth_year","birth_month","birth_day"]);return t.push(i),i=Rt([i.birth_year,i.birth_month,i.birth_day]),Bt(i)},"birth based on age as of date":(e,t)=>{let i=Pe(e,["age","year","month","day"]);t.push(i);let a=parseInt(i.age,10),n=parseInt(i.year,10)-a;return n&&a?`${n} (age ${i.age})`:`(age ${i.age})`},"death date and given age":(e,t)=>{let i=Pe(e,["year","month","day","age"]);t.push(i),i=Rt([i.year,i.month,i.day]);let a=Bt(i);return i.age&&(a+=` (age ${i.age})`),a},dts:e=>{e=(e=e.replace(/\|format=[ymd]+/i,"")).replace(/\|abbr=(on|off)/i,"");let t=Pe(e,["year","month","date","bc"]);return t.date&&t.month&&t.year?!0===/[a-z]/.test(t.month)?[t.month,t.date,t.year].join(" "):[t.year,t.month,t.date].join("-"):t.month&&t.year?[t.year,t.month].join("-"):t.year?(t.year<0&&(t.year=Math.abs(t.year)+" BC"),t.year):""},time:()=>{let e=new Date,t=Rt([e.getFullYear(),e.getMonth(),e.getDate()]);return Bt(t)},millennium:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/1e3)+1,t.abbr&&"y"===t.abbr?i<0?`${Lt(Math.abs(i))} BC`:`${Lt(i)}`:`${Lt(i)} millennium`},start:Wt.date,"start-date":Wt.natural_date,birthdeathage:Wt.two_dates,age:Wt.age,"age nts":Wt.age,"age in years":Wt["diff-y"],"age in years and months":Wt["diff-ym"],"age in years, months and days":Wt["diff-ymd"],"age in years and days":Wt["diff-yd"],"age in days":Wt["diff-d"]};function Yt(e){let t=e.pop(),i=Number(e[0]||0),a=Number(e[1]||0),n=Number(e[2]||0);if("string"!=typeof t||isNaN(i))return null;let r=1;return/[SW]/i.test(t)&&(r=-1),r*(i+a/60+n/3600)}const Gt=function(e){if("number"!=typeof e)return e;let t=1e5;return Math.round(e*t)/t},Vt={s:!0,w:!0},Jt=function(e){let t=Pe(e);t=function(e){return e.list=e.list||[],e.list=e.list.map((t=>{let i=Number(t);if(!isNaN(i))return i;let a=t.split(/:/);return a.length>1?(e.props=e.props||{},e.props[a[0]]=a.slice(1).join(":"),null):t})),e.list=e.list.filter((e=>null!==e)),e}(t);let i=function(e){const t=e.map((e=>typeof e)).join("|");return 2===e.length&&"number|number"===t?{lat:e[0],lon:e[1]}:4===e.length&&"number|string|number|string"===t?(Vt[e[1].toLowerCase()]&&(e[0]*=-1),"w"===e[3].toLowerCase()&&(e[2]*=-1),{lat:e[0],lon:e[2]}):6===e.length?{lat:Yt(e.slice(0,3)),lon:Yt(e.slice(3))}:8===e.length?{lat:Yt(e.slice(0,4)),lon:Yt(e.slice(4))}:{}}(t.list);return t.lat=Gt(i.lat),t.lon=Gt(i.lon),t.template="coord",delete t.list,t},Xt={coord:(e,t)=>{let i=Jt(e);return t.push(i),i.display&&-1===i.display.indexOf("inline")?"":`${i.lat||""}°N, ${i.lon||""}°W`}},Qt=function(e,t,i,a){let n=Pe(e);return a&&(n.name=n.template,n.template=a),t.push(n),""},ei={persondata:Qt,taxobox:Qt,citation:Qt,portal:Qt,reflist:Qt,"cite book":Qt,"cite journal":Qt,"cite web":Qt,"commons cat":Qt,"election box candidate":Qt,"election box begin":Qt,main:Qt},ti={adx:"adx",aim:"aim",amex:"amex",asx:"asx",athex:"athex",b3:"b3","B3 (stock exchange)":"B3 (stock exchange)",barbadosse:"barbadosse",bbv:"bbv",bcba:"bcba",bcs:"bcs",bhse:"bhse",bist:"bist",bit:"bit","bm&f bovespa":"b3","bm&f":"b3",bmad:"bmad",bmv:"bmv","bombay stock exchange":"bombay stock exchange","botswana stock exchange":"botswana stock exchange",bpse:"bpse",bse:"bse",bsx:"bsx",bvb:"bvb",bvc:"bvc",bvl:"bvl",bvpasa:"bvpasa",bwse:"bwse","canadian securities exchange":"canadian securities exchange",cse:"cse",darse:"darse",dfm:"dfm",dse:"dse",euronext:"euronext",euronextparis:"euronextparis",fse:"fse",fwb:"fwb",gse:"gse",gtsm:"gtsm",idx:"idx",ise:"ise",iseq:"iseq",isin:"isin",jasdaq:"jasdaq",jse:"jse",kase:"kase",kn:"kn",krx:"krx",lse:"lse",luxse:"luxse","malta stock exchange":"malta stock exchange",mai:"mai",mcx:"mcx",mutf:"mutf",myx:"myx",nag:"nag","nasdaq dubai":"nasdaq dubai",nasdaq:"nasdaq",neeq:"neeq",nepse:"nepse",nex:"nex",nse:"nse",newconnect:"newconnect","nyse arca":"nyse arca",nyse:"nyse",nzx:"nzx","omx baltic":"omx baltic",omx:"omx",ose:"ose","otc expert":"otc expert","otc grey":"otc grey","otc pink":"otc pink",otcqb:"otcqb",otcqx:"otcqx","pfts ukraine stock exchange":"pfts ukraine stock exchange","philippine stock exchange":"philippine stock exchange",prse:"prse",psx:"psx",karse:"karse",qe:"qe","saudi stock exchange":"saudi stock exchange",sehk:"sehk","Stock Exchange of Thailand":"Stock Exchange of Thailand",set:"set",sgx:"sgx",sse:"sse",swx:"swx",szse:"szse",tase:"tase","tsx-v":"tsx-v",tsx:"tsx",tsxv:"tsxv",ttse:"ttse",twse:"twse",tyo:"tyo",wbag:"wbag",wse:"wse","zagreb stock exchange":"zagreb stock exchange","zimbabwe stock exchange":"zimbabwe stock exchange",zse:"zse"},ii=(e,t)=>{let i=Pe(e,["ticketnumber","code"]);t.push(i);let a=i.template||"";""===a&&(a=i.code),a=(a||"").toLowerCase();let n=ti[a]||"";return i.ticketnumber&&(n=`${n}: ${i.ticketnumber}`),i.code&&!ti[i.code.toLowerCase()]&&(n+=" "+i.code),n},ai={};Object.keys(ti).forEach((e=>{ai[e]=ii}));const ni=function(e){return 1===(e=String(e)).length&&(e="0"+e),e},ri=function(e,t,i){e[`rd${t}-team${ni(i)}`]&&(i=ni(i));let a=e[`rd${t}-score${i}`],n=Number(a);return!1===isNaN(n)&&(a=n),{team:e[`rd${t}-team${i}`],score:a,seed:e[`rd${t}-seed${i}`]}},oi=function(e){let t=[],i=Pe(e);for(let e=1;e<7;e+=1){let a=[];for(let t=1;t<16;t+=2){let n=`rd${e}-team`;if(!i[n+t]&&!i[n+ni(t)])break;{let n=ri(i,e,t),r=ri(i,e,t+1);a.push([n,r])}}a.length>0&&t.push(a)}return{template:"playoffbracket",rounds:t}};let si={"4teambracket":function(e,t){let i=oi(e);return t.push(i),""},player:(e,t)=>{let i=Pe(e,["number","country","name","dl"]);t.push(i);let a=`[[${i.name}]]`;if(i.country){let e=(i.country||"").toLowerCase(),t=wt.find((t=>e===t[1]||e===t[2]))||[];t&&t[0]&&(a=t[0]+" "+a)}return i.number&&(a=i.number+" "+a),a},goal:(e,t)=>{let i={template:"goal",data:[]},a=Pe(e).list||[];for(let e=0;e{let t=e.note;return t&&(t=` (${t})`),e.min+"'"+t})).join(", "),n},"sports table":(e,t)=>{let i=Pe(e),a={};Object.keys(i).filter((e=>/^team[0-9]/.test(e))).map((e=>i[e].toLowerCase())).forEach((e=>{a[e]={name:i[`name_${e}`],win:Number(i[`win_${e}`])||0,loss:Number(i[`loss_${e}`])||0,tie:Number(i[`tie_${e}`])||0,otloss:Number(i[`otloss_${e}`])||0,goals_for:Number(i[`gf_${e}`])||0,goals_against:Number(i[`ga_${e}`])||0}}));let n={date:i.update,header:i.table_header,teams:a};t.push(n)}};var li=Object.assign({},Et,St,Nt,Ht,Xt,ei,ai,oi,si);let ci=Object.assign({},xt,Ot,li);Object.keys(ut).forEach((e=>{ci[e]=ci[ut[e]]}));const ui=["0","1","2","3","4","5","6","7","8","9"],pi=function(e,t){let i=e.name;if(!0===at.hasOwnProperty(i))return[""];if(!0===function(e){return!0===nt.hasOwnProperty(e)||!!rt.test(e)||!(!ot.test(e)&&!st.test(e))||!!lt.test(e)}(i)){let t=Pe(e.body,[],"raw");return["",ct(t)]}if(!0===/^cite [a-z]/.test(i)){let t=Pe(e.body);return t.type=t.template,t.template="citation",["",t]}if(!0===ci.hasOwnProperty(i)){if("number"==typeof ci[i]){return[Pe(e.body,ui)[String(ci[i])]||""]}if("string"==typeof ci[i])return[ci[i]];if(!0===r(ci[i])){return["",Pe(e.body,ci[i])]}if(!0===((a=ci[i])&&"[object Object]"===Object.prototype.toString.call(a))){let t=Pe(e.body,ci[i].props);return[t[ci[i].out],t]}if("function"==typeof ci[i]){let a=[];return[ci[i](e.body,a,Pe,null,t),a[0]]}}var a;let n=Pe(e.body);return 0===Object.keys(n).length&&(n=null),["",n]},mi=(e="")=>(e=(e=e.toLowerCase()).replace(/[-_]/g," ")).trim(),di=function(e,t){this._type=e.type,this.domain=e.domain,Object.defineProperty(this,"data",{enumerable:!1,value:e.data}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},hi={type:function(){return this._type},links:function(e){let t=[];if(Object.keys(this.data).forEach((e=>{this.data[e].links().forEach((e=>t.push(e)))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},image:function(){let e=this.data.image||this.data.image2||this.data.logo||this.data.image_skyline||this.data.image_flag;if(!e)return null;let t=e.json(),i=t.text;return t.file=i,t.text="",t.caption=this.data.caption,t.domain=this.domain,new j(t)},get:function(e){let t=Object.keys(this.data);if("string"==typeof e){let i=mi(e);for(let e=0;e{for(let i=0;i(e.data[i]&&(t[i]=e.data[i].json()),t)),{});return!0===t.encode&&(i=K(i)),i}(this,e=e||{})},wikitext:function(){return this.wiki||""},keyValue:function(){return Object.keys(this.data).reduce(((e,t)=>(this.data[t]&&(e[t]=this.data[t].text()),e)),{})}};Object.keys(hi).forEach((e=>{di.prototype[e]=hi[e]})),di.prototype.data=di.prototype.keyValue,di.prototype.template=di.prototype.type,di.prototype.images=di.prototype.image;const gi=function(e,t){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},fi={title:function(){let e=this.data;return e.title||e.encyclopedia||e.author||""},links:function(e){let t=[];if("number"==typeof e)return t[e];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},text:function(){return""},wikitext:function(){return this.wiki||""},json:function(e={}){let t=this.data||{};return!0===e.encode&&(t=Object.assign({},t),t=K(t)),t}};Object.keys(fi).forEach((e=>{gi.prototype[e]=fi[e]}));const ki={text:function(){return oe(this._text||"").text()},json:function(){return this.data||{}},wikitext:function(){return this.wiki||""}},bi=function(e,t="",i=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_text",{enumerable:!1,value:t}),Object.defineProperty(this,"wiki",{enumerable:!1,value:i})};Object.keys(ki).forEach((e=>{bi.prototype[e]=ki[e]}));const wi=/^(cite |citation)/i,yi={citation:!0,refn:!0,harvnb:!0,source:!0},$i=function(e,t){let{list:i,wiki:a}=function(e,t){let i=[],a=it(e);const n=function(a,r){a.parent=r,a.children&&a.children.length>0&&a.children.forEach((e=>n(e,a)));let[o,s]=pi(a,t);a.wiki=o,s&&i.push({name:a.name,wiki:a.body,nested:Boolean(a.parent),text:o,json:s});const l=function(e,t,i){e.parent&&(e.parent.body=e.parent.body.replace(t,i),l(e.parent,t,i))};l(a,a.body,a.wiki),e=e.replace(a.body,a.wiki)};return a.forEach((e=>n(e,null))),a.forEach((t=>{e=e.replace(t.body,t.wiki)})),{list:i,wiki:e}}(e._wiki,t),n=t?t._domain:null,{infoboxes:r,references:o,templates:s}=function(e,t){let i={infoboxes:[],templates:[],references:[]};return e.forEach((e=>{let a=e.json,n=a.template||a.type||a.name;if(!0!==yi[n]&&!0!==wi.test(n))return"infobox"!==a.template||"yes"===a.subbox||e.nested?void i.templates.push(new bi(a,e.text,e.wiki)):(a.domain=t,a.data=a.data||{},void i.infoboxes.push(new di(a,e.wiki)));i.references.push(new gi(a,e.wiki))})),i}(i,n);e._infoboxes=e._infoboxes||[],e._references=e._references||[],e._templates=e._templates||[],e._infoboxes=e._infoboxes.concat(r),e._references=e._references.concat(o),e._templates=e._templates.concat(s),e._wiki=a},xi=function(e){return/^ *\{\{ *(cite|citation)/i.test(e)&&/\}\} *$/.test(e)&&!1===/citation needed/i.test(e)},vi=function(e){let t=Pe(e);return t.type=t.template.replace(/cite /,""),t.template="citation",t},ji=function(e){return{template:"citation",type:"inline",data:{},inline:oe(e)||{}}},_i=function(e){let t=[],i=e._wiki;i=i.replace(/ ?([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(xi(a)){let n=vi(a);n&&t.push({json:n,wiki:e}),i=i.replace(a,"")}else t.push({json:ji(a),wiki:e});return" "})),i=i.replace(/ ?]{0,200}?\/> ?/gi," "),i=i.replace(/ ?]{0,200}>([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(xi(a)){let e=vi(a);e&&t.push({json:e,wiki:a}),i=i.replace(a,"")}else t.push({json:ji(a),wiki:e});return" "})),i=i.replace(/ ?<[ /]?[a-z0-9]{1,8}[a-z0-9=" ]{2,20}[ /]?> ?/g," "),e._references=t.map((e=>new gi(e.json,e.wiki))),e._wiki=i},zi={coach:["team","year","g","w","l","w-l%","finish","pg","pw","pl","pw-l%"],player:["year","team","gp","gs","mpg","fg%","3p%","ft%","rpg","apg","spg","bpg","ppg"],roster:["player","gp","gs","mpg","fg%","3fg%","ft%","rpg","apg","spg","bpg","ppg"]};let Oi=["res","record","opponent","method","event","date","round","time","location","notes"];const Ei=function(e,t){const i={templates:[],text:e._wiki};var a;return(a=i).text=a.text.replace(/\{\{election box begin([\s\S]+?)\{\{election box end\}\}/gi,(e=>{let t={_wiki:e,_templates:[]};$i(t);let i=t._templates.map((e=>e.json())),n=i.find((e=>"election box"===e.template))||{},r=i.filter((e=>"election box candidate"===e.template)),o=i.find((e=>"election box gain"===e.template||"election box hold"===e.template))||{};return(r.length>0||o)&&a.templates.push({template:"election box",title:n.title,candidates:r,summary:o.data}),""})),function(e,t,i){e.text=e.text.replace(/]*)>([\s\S]+)<\/gallery>/g,((a,n,r)=>{let o=r.split(/\n/g);return o=o.filter((e=>e&&""!==e.trim())),o=o.map((e=>{let i=e.split(/\|/),a={file:i[0].trim(),lang:t.lang(),domain:t.domain()},n=new j(a).json(),r=i.slice(1).join("|");return""!==r&&(n.caption=oe(r)),n})),o.length>0&&e.templates.push({template:"gallery",images:o,pos:i.title}),""}))}(i,t,e),function(e){e.text=e.text.replace(/]*)>([\s\S]+)<\/math>/g,((t,i,a)=>{let n=oe(a).text();return e.templates.push({template:"math",formula:n,raw:a}),n&&n.length<12?n:""})),e.text=e.text.replace(/]*)>([\s\S]+?)<\/chem>/g,((t,i,a)=>(e.templates.push({template:"chem",data:a}),"")))}(i),function(e){e.text=e.text.replace(/\{\{mlb game log /gi,"{{game log "),e.text=e.text.replace(/\{\{game log (section|month)[\s\S]+?\{\{game log (section|month) end\}\}/gi,(t=>{let i=function(e){let t=["#","date","opponent","score","win","loss","save","attendance","record"];return!0===/\|stadium=y/i.test(e)&&t.splice(7,0,"stadium"),!0===/\|time=y/i.test(e)&&t.splice(7,0,"time"),!0===/\|box=y/i.test(e)&&t.push("box"),t}(t);t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{game log (section|month) end\}\}/i,"");let a="! "+i.join(" !! "),n=ge("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mlb game log section",data:n}),""}))}(i),function(e){e.text=e.text.replace(/\{\{mma record start[\s\S]+?\{\{end\}\}/gi,(t=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{end\}\}/i,"");let i="! "+Oi.join(" !! "),a=ge("{|\n"+i+"\n"+t+"\n|}");return a=a.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mma record start",data:a}),""}))}(i),function(e){e.text=e.text.replace(/\{\{nba (coach|player|roster) statistics start([\s\S]+?)\{\{s-end\}\}/gi,((t,i)=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{s-end\}\}/,""),i=i.toLowerCase().trim();let a="! "+zi[i].join(" !! "),n=ge("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"NBA "+i+" statistics",data:n}),""}))}(i),i.templates=i.templates.map((e=>new bi(e))),i},Si={tables:!0,references:!0,paragraphs:!0,templates:!0,infoboxes:!0};class Ci{constructor(e,t){let i={doc:t,title:e.title||"",depth:e.depth,wiki:e.wiki||"",templates:[],tables:[],infoboxes:[],references:[],paragraphs:[]};Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})}));const a=Ei(this,t);this._wiki=a.text,this._templates=this._templates.concat(a.templates),_i(this),$i(this,t),function(e){let t=[],i=e._wiki,a=i.split("\n"),n=[];for(let e=0;e0&&(n[n.length-1]+="\n"+a[e]);else{n[n.length-1]+="\n"+a[e];let i=n.pop();t.push(i)}else n.push(a[e]);let r=[];t.forEach((e=>{if(e){i=i.replace(e+"\n",""),i=i.replace(e,"");let t=ge(e);t&&t.length>0&&r.push(new be(t,e))}})),r.length>0&&(e._tables=r),e._wiki=i}(this),Ve(this,t)}title(){return this._title||""}index(){if(!this._doc)return null;let e=this._doc.sections().indexOf(this);return-1===e?null:e}depth(){return this._depth}indentation(){return this.depth()}sentences(){return this.paragraphs().reduce(((e,t)=>e.concat(t.sentences())),[])}paragraphs(){return this._paragraphs||[]}links(e){let t=[];if(this.infoboxes().forEach((e=>{t.push(e.links())})),this.sentences().forEach((e=>{t.push(e.links())})),this.tables().forEach((e=>{t.push(e.links())})),this.lists().forEach((e=>{t.push(e.links())})),t=t.reduce(((e,t)=>e.concat(t)),[]).filter((e=>void 0!==e)),"string"==typeof e){let i=t.find((t=>t.page().toLowerCase()===e.toLowerCase()));return void 0===i?[]:[i]}return t}tables(){return this._tables||[]}templates(e){let t=this._templates||[];return"string"==typeof e?(e=e.toLowerCase(),t.filter((t=>t.data.template===e||t.data.name===e))):t}infoboxes(e){let t=this._infoboxes||[];return"string"==typeof e?(e=(e=e.replace(/^infobox /i,"")).trim().toLowerCase(),t.filter((t=>t._type===e))):t}coordinates(){return[...this.templates("coord"),...this.templates("coor")].map((e=>e.json()))}lists(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.lists())})),e}interwiki(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.interwiki())})),e}images(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.images())})),e}references(){return this._references||[]}remove(){if(!this._doc)return null;let e={};e[this.title()]=!0,this.children().forEach((t=>e[t.title()]=!0));let t=this._doc.sections();return t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),this._doc._sections=t,this._doc}nextSibling(){if(!this._doc)return null;let e=this._doc.sections();for(let t=(this.index()||0)+1;tthis.depth())for(let e=i+1;ethis.depth();e+=1)a.push(t[e]);return"string"==typeof e?a.find((t=>t.title().toLowerCase()===e.toLowerCase())):a}sections(e){return this.children(e)}parent(){if(!this._doc)return null;let e=this._doc.sections();for(let t=this.index()||0;t>=0;t-=1)if(e[t]&&e[t].depth()t.text(e))).join("\n\n")}wikitext(){return this._wiki}json(e){return function(e,t){let i={};if(!0===(t=p(t,W)).headers&&(i.title=e.title()),!0===t.depth&&(i.depth=e.depth()),!0===t.paragraphs){let a=e.paragraphs().map((e=>e.json(t)));a.length>0&&(i.paragraphs=a)}if(!0===t.images){let a=e.images().map((e=>e.json(t)));a.length>0&&(i.images=a)}if(!0===t.tables){let a=e.tables().map((e=>e.json(t)));a.length>0&&(i.tables=a)}if(!0===t.templates){let a=e.templates().map((e=>e.json()));a.length>0&&(i.templates=a,!0===t.encode&&i.templates.forEach((e=>K(e))))}if(!0===t.infoboxes){let a=e.infoboxes().map((e=>e.json(t)));a.length>0&&(i.infoboxes=a)}if(!0===t.lists){let a=e.lists().map((e=>e.json(t)));a.length>0&&(i.lists=a)}if(!0===t.references||!0===t.citations){let a=e.references().map((e=>e.json(t)));a.length>0&&(i.references=a)}return!0===t.sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,Si))}}Ci.prototype.citations=Ci.prototype.references;const qi={sentences:"sentence",paragraphs:"paragraph",links:"link",tables:"table",templates:"template",infoboxes:"infobox",coordinates:"coordinate",lists:"list",images:"image",references:"reference",citations:"citation"};Object.keys(qi).forEach((e=>{let t=qi[e];Ci.prototype[t]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]||null}}));const Ni=/^(={1,6})(.{1,200}?)={1,6}$/,Li=/\{\{.+?\}\}/,Pi=function(e,t){let i=t.match(Ni);if(!i)return e.title="",e.depth=0,e;let a=i[2]||"";var r;a=oe(a).text(),Li.test(a)&&(it(r=a).forEach((e=>{let[t]=pi(e);r=r.replace(e.body,t)})),a=r);let o={_wiki:a};_i(o),a=o._wiki,a=n(a);let s=0;return i[1]&&(s=i[1].length-2),e.title=a,e.depth=s,e},Ai=new RegExp("^("+["references","reference","einzelnachweise","referencias","références","notes et références","脚注","referenser","bronnen","примечания"].join("|")+"):?","i"),Di=/(?:\n|^)(={2,6}.{1,200}?={2,6})/g,Ti=function(e){let t=[],i=e._wiki.split(Di);for(let a=0;a!0!==Ai.test(t.title())||t.paragraphs().length>0||t.templates().length>0||(e[i+1]&&e[i+1].depth()>t.depth()&&(e[i+1]._depth-=1),!1)))}(t)},Ii=new RegExp("\\[\\[:?("+d.join("|")+"):(.{2,178}?)]](w{0,10})","gi"),Mi=new RegExp("^\\[\\[:?("+d.join("|")+"):","gi"),Ri=function(e){const t=[];let i=e.match(Ii);i&&i.forEach((function(e){(e=(e=(e=e.replace(Mi,"")).replace(/\|?[ *]?\]\]$/,"")).replace(/\|.*/,""))&&!e.match(/[[\]]/)&&t.push(e.trim())}));const a=e.replace(Ii,"");return[t,a]},Ui={tables:!0,lists:!0,paragraphs:!0};class Bi{constructor(e,t){let i={pageID:(t=t||{}).pageID||t.id||null,namespace:t.namespace||t.ns||null,lang:t.lang||t.language||null,domain:t.domain||null,title:t.title||null,type:"page",redirectTo:null,wikidata:t.wikidata||null,wiki:e||"",categories:[],sections:[],coordinates:[],userAgent:t.userAgent||t["User-Agent"]||t["Api-User-Agent"]||"User of the wtf_wikipedia library"};if(Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})})),!0===function(e){return!(!e||e.length>500)&&D.test(e)}(this._wiki)){this._type="redirect",this._redirectTo=function(e){let t=e.match(D);if(t&&t[2])return(A(t[2])||[])[0];return{}}(this._wiki);const[e,t]=Ri(this._wiki);return this._categories=e,void(this._wiki=t)}this._wiki=U(this._wiki);const[a,n]=Ri(this._wiki);this._categories=a,this._wiki=n,this._sections=Ti(this)}title(e){if(void 0!==e)return this._title=e,e;if(this._title)return this._title;let t=null,i=this.sentences()[0];return i&&(t=i.bold()),t}pageID(e){return void 0!==e&&(this._pageID=e),this._pageID||null}wikidata(e){return void 0!==e&&(this._wikidata=e),this._wikidata||null}domain(e){return void 0!==e&&(this._domain=e),this._domain||null}language(e){return void 0!==e&&(this._lang=e),this._lang||null}url(){let e=this.title();if(!e)return null;let t=this.language()||"en",i=this.domain()||"wikipedia.org";return e=e.replace(/ /g,"_"),e=encodeURIComponent(e),`https://${t}.${i}/wiki/${e}`}namespace(e){return void 0!==e&&(this._namespace=e),this._namespace||null}isRedirect(){return"redirect"===this._type}redirectTo(){return this._redirectTo}isDisambiguation(){return function(e){let t=e.templates().map((e=>e.json()));if(t.find((e=>k.hasOwnProperty(e.template)||$.hasOwnProperty(e.template))))return!0;let i=e.title();return!(!i||!0!==y.test(i))||!t.find((e=>w.hasOwnProperty(e.template)))&&(!0===x(e.sentence(0))||!0===x(e.sentence(1)))}(this)}categories(e){let t=this._categories||[];return"number"==typeof e?[t[e]]:t}sections(e){let t=this._sections||[];if(t.forEach((e=>{e._doc=this})),"string"==typeof e){let i=e.toLowerCase().trim();return t.filter((e=>e.title().toLowerCase()===i))}return"number"==typeof e?[t[e]]:t}paragraphs(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.paragraphs())})),"number"==typeof e?[t[e]]:t}sentences(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.sentences())})),"number"==typeof e?[t[e]]:t}images(e){let t=u(this,"images",null);return this.infoboxes().forEach((e=>{let i=e.image();i&&t.unshift(i)})),this.templates().forEach((e=>{"gallery"===e.data.template&&(e.data.images=e.data.images||[],e.data.images.forEach((e=>{e instanceof j||(e.language=this.language(),e.domain=this.domain(),e=new j(e)),t.push(e)})))})),"number"==typeof e?[t[e]]:t}links(e){return u(this,"links",e)}interwiki(e){return u(this,"interwiki",e)}lists(e){return u(this,"lists",e)}tables(e){return u(this,"tables",e)}templates(e){return u(this,"templates",e)}references(e){return u(this,"references",e)}citations(e){return this.references(e)}coordinates(e){return u(this,"coordinates",e)}infoboxes(e){let t=u(this,"infoboxes",e);return t=t.sort(((e,t)=>Object.keys(e.data).length>Object.keys(t.data).length?-1:1)),t}text(e){if(e=p(e,Ui),!0===this.isRedirect())return"";return this.sections().map((t=>t.text(e))).join("\n\n")}json(e){return function(e,t){let i={};return(t=p(t,m)).title&&(i.title=e.title()),t.pageID&&(i.pageID=e.pageID()),t.categories&&(i.categories=e.categories()),t.sections&&(i.sections=e.sections().map((e=>e.json(t)))),!0===e.isRedirect()&&(i.isRedirect=!0,i.redirectTo=e.redirectTo(),i.sections=[]),t.coordinates&&(i.coordinates=e.coordinates()),t.infoboxes&&(i.infoboxes=e.infoboxes().map((e=>e.json(t)))),t.images&&(i.images=e.images().map((e=>e.json(t)))),t.plaintext&&(i.plaintext=e.text(t)),(t.citations||t.references)&&(i.references=e.references()),i}(this,e=p(e,Ui))}wikitext(){return this._wiki||""}debug(){return console.log("\n"),this.sections().forEach((e=>{let t=" - ";for(let i=0;i{let t=Fi[e];Bi.prototype[t]=function(t){return this[e](t)[0]||null}})),Bi.prototype.lang=Bi.prototype.language,Bi.prototype.ns=Bi.prototype.namespace,Bi.prototype.plaintext=Bi.prototype.text,Bi.prototype.isDisambig=Bi.prototype.isDisambiguation,Bi.prototype.citations=Bi.prototype.references,Bi.prototype.redirectsTo=Bi.prototype.redirectTo,Bi.prototype.redirect=Bi.prototype.redirectTo,Bi.prototype.redirects=Bi.prototype.redirectTo;const Ki=/^https?:\/\//,Wi={lang:"en",wiki:"wikipedia",domain:void 0,follow_redirects:!0,path:"api.php"},Zi=function(e,t,n){"string"==typeof t&&(t={lang:t}),(t={...Wi,...t}).title=e,"string"==typeof e&&Ki.test(e)&&(t={...t,...a(e)});const o=c(t),s=function(e){let t,i=e.userAgent||e["User-Agent"]||e["Api-User-Agent"]||"User of the wtf_wikipedia library";return t=e.noOrigin?"":e.origin||e.Origin||"*",{method:"GET",headers:{"Content-Type":"application/json","Api-User-Agent":i,"User-Agent":i,Origin:t,"Accept-Encoding":"gzip"},redirect:"follow"}}(t);return i(o,s).then((e=>e.json())).then((i=>{let a=function(e,t={}){return Object.keys(e.query.pages).map((i=>{let a=e.query.pages[i]||{};if(a.hasOwnProperty("missing")||a.hasOwnProperty("invalid"))return null;let n=a.revisions[0]["*"];!n&&a.revisions[0].slots&&(n=a.revisions[0].slots.main["*"]),a.pageprops=a.pageprops||{};let r=t.domain;return!r&&t.wiki&&(r=`${t.wiki}.org`),{wiki:n,meta:Object.assign({},t,{title:a.title,pageID:a.pageid,namespace:a.ns,domain:r,wikidata:a.pageprops.wikibase_item,description:a.pageprops["wikibase-shortdesc"]})}}))}(i,t);return a=function(e,t){let i=(e=e.filter((e=>e))).map((e=>new Bi(e.wiki,e.meta)));return 0===i.length?null:r(t)||1!==i.length?i:i[0]}(a,e),n&&n(null,a),a})).catch((e=>(console.error(e),n&&n(e,null),null)))};const Hi=function(e,t){return new Bi(e,t)},Yi={Doc:Bi,Section:Ci,Paragraph:je,Sentence:J,Image:j,Infobox:di,Link:H,List:Ue,Reference:gi,Table:be,Template:bi,http:function(e,t){return i(e,t).then((function(e){return e.json()})).catch((t=>(console.error("\n\n=-=- http response error =-=-=-"),console.error(e),console.error(t),{})))},wtf:Hi};Hi.fetch=function(e,t,i){return Zi(e,t,i)},Hi.plugin=Hi.extend=function(e){return e(Yi,ci,nt),this},Hi.version="10.0.3";export{Hi as default}; +/*! wtf_wikipedia 10.0.4 MIT */ +function e(e){var t=e.default;if("function"==typeof t){var i=function(){return t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})})),i}var t=e(Object.freeze({__proto__:null,default:function(e,t){return t=t||{},new Promise((function(i,a){var n=new XMLHttpRequest,r=[],o=[],s={},l=function(){return{ok:2==(n.status/100|0),statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:l,headers:{keys:function(){return r},entries:function(){return o},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var c in n.open(t.method||"get",e,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,i){r.push(t=t.toLowerCase()),o.push([t,i]),s[t]=s[t]?s[t]+","+i:i})),i(l())},n.onerror=a,n.withCredentials="include"==t.credentials,t.headers)n.setRequestHeader(c,t.headers[c]);n.send(t.body||null)}))}})),i=self.fetch||(self.fetch=t.default||t);const a=function(e){let t=new URL(e),i=t.pathname.replace(/^\/(wiki\/)?/,"");return i=decodeURIComponent(i),{domain:t.host,title:i}};function n(e){return e&&"string"==typeof e?e=(e=(e=(e=e.replace(/^\s+/,"")).replace(/\s+$/,"")).replace(/ {2}/," ")).replace(/\s, /,", "):""}function r(e){return"[object Array]"===Object.prototype.toString.call(e)}const o=/(wikibooks|wikidata|wikimedia|wikinews|wikipedia|wikiquote|wikisource|wikispecies|wikiversity|wikivoyage|wiktionary|foundation|meta)\.org/,s={action:"query",prop:"revisions|pageprops",rvprop:"content",maxlag:5,rvslots:"main",origin:"*",format:"json",redirects:"true"},l=e=>e.replace(/ /g,"_").trim(),c=function(e,t=s){let i=Object.assign({},t),a="";if(e.domain){let t=o.test(e.domain)?"w/api.php":e.path;a=`https://${e.domain}/${t}?`}else{if(!e.lang||!e.wiki)return"";a=`https://${e.lang}.${e.wiki}.org/w/api.php?`}e.follow_redirects||delete i.redirects,e.origin&&(i.origin=e.origin);let n=e.title;if("number"==typeof n)i.pageids=n;else if("string"==typeof n)i.titles=l(n);else if(void 0!==n&&r(n)&&"number"==typeof n[0])i.pageids=n.filter((e=>e)).join("|");else{if(void 0===n||!0!==r(n)||"string"!=typeof n[0])return"";i.titles=n.filter((e=>e)).map(l).join("|")}return`${a}${c=i,Object.entries(c).map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`)).join("&")}`;var c},u=function(e,t,i){let a=[];return e.sections().forEach((e=>{let n=[];n="string"==typeof i?e[t](i):e[t](),n.forEach((e=>{a.push(e)}))})),"number"==typeof i?void 0===a[i]?[]:[a[i]]:a},p=function(e,t){return Object.assign({},t,e)},m={title:!0,sections:!0,pageID:!0,categories:!0};var d=["category","abdeeling","bólkur","catagóir","categori","categoria","categoria","categoría","categorîa","categorìa","catégorie","categorie","catègorie","category","categuria","catigurìa","class","ẹ̀ka","flocc","flocc","flokkur","grup","jamii","kaarangay","kateggoría","kategooria","kategori","kategorî","kategoria","kategória","kategorie","kategoriija","kategorija","kategorio","kategoriya","kategoriýa","kategoriye","kategory","kategorya","kateqoriya","katiguriya","klad","luokka","ñemohenda","roinn","ronney","rummad","setensele","sokajy","sumut","thể","turkum","категорија","категория","категорія","катэгорыя","төркем","קטגוריה","تصنيف","تۈر","رده","श्रेणी","श्रेणी","বিষয়শ্রেণী","หมวดหมู่","분류","분류","分类"],h=["file","image","चित्र","archivo","attēls","berkas","bestand","datei","dosiero","dosya","fájl","fasciculus","fichier","fil","fitxategi","fitxer","gambar","imagem","imej","immagine","larawan","lêer","plik","restr","slika","wêne","wobraz","выява","податотека","слика","файл","სურათი","պատկեր","קובץ","پرونده","دوتنه","ملف","وێنە","चित्र","ไฟล์","파일","ファイル"],g=["infobox","anfo","anuāmapa","bilgi kutusu","bilgi","bilgiquti","boaty","boestkelaouiñ","bosca","capsa","diehtokássa","faktamall","ficha","generalni","gwybodlen3","info","infobokis","infoboks","infochascha","infokašćik","infokast","infokutija","infolentelė","infopolje","informkesto","infoskreine","infotaula","inligtingskas","inligtingskas3","inligtingskas4","kishtey","kotak","tertcita","tietolaatikko","yerleşim bilgi kutusu","ynfoboks","πλαίσιο","акарточка","аҥа","инфобокс","инфокутија","инфокутия","інфобокс","канадский","картка","карточка","карточка2","карточкарус","картуш","қуттӣ","ინფოდაფა","տեղեկաքարտ","אינפאקעסטל","תבנית","بطاقة","ڄاڻخانو","خانہ","لغة","ज्ञानसन्दूक","তথ্যছক","ਜਾਣਕਾਰੀਡੱਬਾ","సమాచారపెట్టె","තොරතුරුකොටුව","กล่องข้อมูล","ប្រអប់ព័ត៌មាន","정보상자","明細"];let f=" disambiguation";const k=["dab","dab","disamb","disambig","geodis","hndis","setindex","ship index","split dab","sport index","wp disambig","disambiguation cleanup","airport"+f,"biology"+f,"call sign"+f,"caselaw"+f,"chinese title"+f,"genus"+f,"hospital"+f,"lake index","letter"+f,"letter-number combination"+f,"mathematical"+f,"military unit"+f,"mountainindex","number"+f,"phonetics"+f,"place name"+f,"portal"+f,"road"+f,"school"+f,"species latin name abbreviation"+f,"species latin name"+f,"station"+f,"synagogue"+f,"taxonomic authority"+f,"taxonomy"+f].reduce(((e,t)=>(e[t]=!0,e)),{}),b=/. may (also )?refer to\b/i,w={about:!0,for:!0,"for multi":!0,"other people":!0,"other uses of":!0,distinguish:!0},y=new RegExp(". \\(("+["disambiguation","homonymie","توضيح","desambiguação","Begriffsklärung","disambigua","曖昧さ回避","消歧義","搞清楚","значения","ابهام‌زدایی","د ابہام","동음이의","dubbelsinnig","այլ կիրառումներ","ujednoznacznienie"].join("|")+")\\)$","i"),$=["dab","disamb","disambig","disambiguation","letter-numbercombdisambig","letter-number combination disambiguation","dmbox","airport disambiguation","biology disambiguation","call sign disambiguation","caselaw disambiguation","chinese title disambiguation","disambiguation cleanup","genus disambiguation","hospital disambiguation","human name disambiguation","human name disambiguation cleanup","letter-number combination disambiguation","mathematical disambiguation","military unit disambiguation","music disambiguation","number disambiguation","opus number disambiguation","phonetics disambiguation","place name disambiguation","portal disambiguation","road disambiguation","school disambiguation","species latin name abbreviation disambiguation","species latin name disambiguation","station disambiguation","synagogue disambiguation","taxonomic authority disambiguation","taxonomy disambiguation","template disambiguation","disamb2","disamb3","disamb4","disambiguation lead","disambiguation lead name","disambiguation name","disamb-term","disamb-terms","aðgreining","aimai","ałtsʼáʼáztiin","anlam ayrımı","anlam ayrımı","apartigilo","argipen","begriepskloorenge","begriffsklärung","begriffsklärung","begriffsklärung","begriffsklearung","bisongidila","bkl","bokokani","caddayn","clerheans","cudakirin","čvor","db","desambig","desambigación","desambiguação","desambiguació","desambiguación","desambiguáncia","desambiguasion","desambiguassiù","desambigui","dezambiguizare","dəqiqləşdirmə","disambigua","disambigua","disambigua","disambìgua","disambigua","disambiguasi","disambiguasi","discretiva","disheñvelout","disingkek","dixanbigua","dixebra","diżambigwazzjoni","doorverwijspagina","dp","dp","dubbelsinnig","dudalipen","dv","egyért","fleiri týdningar","fleirtyding","flertydig","förgrening","gì-ngiê","giklaro","gwahaniaethu","homonimo","homónimos","homonymie","huaʻōlelo puana like","idirdhealú","khu-pia̍t","kthjellim","kujekesa","maana","maneo bin","mehrdüdig begreep","menm non","muardüüdag artiikel","neibetsjuttings","nozīmju atdalīšana","nuorodinis","nyahkekaburan","omonimeye","omonimia","page dé frouque","paglilinaw","panangilawlawag","pansayod","pejy mitovy anarana","peker","razdvojba","razločitev","razvrstavanje","reddaghey","rozcestník","rozlišovacia stránka","sclerir noziun","selvendyssivu","soilleireachadh","suzmunski","täpsustuslehekülg","täsmennyssivu","telplänov","tlahtolmelahuacatlaliztli","trang định hướng","ujednoznacznienie","verdudeliking","wěcejwóznamowosć","wjacezmyslnosć","zambiguaçon","zeimeibu škiršona","αποσαφήνιση","айрық","аҵакырацәа","вишезначна одредница","ибҳомзудоӣ","кёб магъаналы","күп мәгънәләр","күп мәғәнәлелек","мъногосъмꙑслиѥ","неадназначнасць","неадназначнасьць","неоднозначность","олон удхатай","појаснување","пояснение","са шумуд манавал","салаа утгатай","суолталар","текмаанисиздик","цо магіна гуреб","чеперушка","чолхалла","шуко ончыктымаш-влак","მრავალმნიშვნელოვანი","բազմիմաստութիւն","բազմիմաստություն","באדייטן","פירושונים","ابهام‌زدایی","توضيح","توضيح","دقیقلشدیرمه","ڕوونکردنەوە","سلجهائپ","ضد ابہام","گجگجی بیری","نامبهمېدنه","መንታ","अस्पष्टता","बहुअर्थी","बहुविकल्पी शब्द","দ্ব্যর্থতা নিরসন","ਗੁੰਝਲ-ਖੋਲ੍ਹ","સંદિગ્ધ શીર્ષક","பக்கவழி நெறிப்படுத்தல்","అయోమయ నివృత్తి","ದ್ವಂದ್ವ ನಿವಾರಣೆ","വിവക്ഷകൾ","වක්‍රෝත්ති","แก้ความกำกวม","သံတူကြောင်းကွဲ","ណែនាំ","동음이의","扤清楚","搞清楚","曖昧さ回避","消歧义","釋義","gestion dj'omònim","sut'ichana qillqa"].reduce(((e,t)=>(e[t]=!0,e)),{}),x=function(e){if(!e)return!1;let t=e.text();return!(null===t||!t[0]||!0!==b.test(t))},v={caption:!0,alt:!0,links:!0,thumb:!0,url:!0},j=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},_={file(){let e=this.data.file||"";if(e){/^(image|file):/i.test(e)||(e=`File:${e}`),e=e.trim(),e=e.charAt(0).toUpperCase()+e.substring(1),e=e.replace(/ /g,"_")}return e},alt(){let e=this.data.alt||this.data.file||"";return e=e.replace(/^(file|image):/i,""),e=e.replace(/\.(jpg|jpeg|png|gif|svg)/i,""),e.replace(/_/g," ")},caption(){return this.data.caption?this.data.caption.text():""},links(){return this.data.caption?this.data.caption.links():[]},url(){let e=function(e){let t=function(e){let t=e.replace(/^(image|file?):/i,"");return t=t.charAt(0).toUpperCase()+t.substring(1),t=t.trim().replace(/ /g,"_"),t}(e);return t=encodeURIComponent(t),t}(this.file());return`https://${this.data.domain||"wikipedia.org"}/wiki/Special:Redirect/file/${e}`},thumbnail(e){return e=e||300,this.url()+"?width="+e},format(){let e=this.file().split(".");return e[e.length-1]?e[e.length-1].toLowerCase():null},json:function(e){return function(e,t){t=p(t,v);let i={file:e.file()};return!1!==t.thumb&&(i.thumb=e.thumbnail()),!1!==t.url&&(i.url=e.url()),!1!==t.caption&&e.data.caption&&(i.caption=e.caption(),!1!==t.links&&e.data.caption.links()&&(i.links=e.links())),!1!==t.alt&&e.data.alt&&(i.alt=e.alt()),i}(this,e=e||{})},text:function(){return""},wikitext:function(){return this.data.wiki||""}};Object.keys(_).forEach((e=>{j.prototype[e]=_[e]})),j.prototype.src=j.prototype.url,j.prototype.thumb=j.prototype.thumbnail;var z={aa:"Afar",ab:"Аҧсуа",af:"Afrikaans",ak:"Akana",als:"Alemannisch",am:"አማርኛ",an:"Aragonés",ang:"Englisc",ar:"العربية",arc:"ܣܘܪܬ",as:"অসমীয়া",ast:"Asturianu",av:"Авар",ay:"Aymar",az:"Azərbaycanca",ba:"Башҡорт",bar:"Boarisch","bat-smg":"Žemaitėška",bcl:"Bikol",be:"Беларуская","be-x-old":"ltr",bg:"Български",bh:"भोजपुरी",bi:"Bislama",bm:"Bamanankan",bn:"বাংলা",bo:"བོད་ཡིག",bpy:"ltr",br:"Brezhoneg",bs:"Bosanski",bug:"ᨅᨔ",bxr:"ltr",ca:"Català",cdo:"Chinese",ce:"Нохчийн",ceb:"Sinugboanong",ch:"Chamoru",cho:"Choctaw",chr:"ᏣᎳᎩ",chy:"Tsetsêhestâhese",co:"Corsu",cr:"Nehiyaw",cs:"Česky",csb:"Kaszëbsczi",cu:"Slavonic",cv:"Чăваш",cy:"Cymraeg",da:"Dansk",de:"Deutsch",diq:"Zazaki",dsb:"ltr",dv:"ދިވެހިބަސް",dz:"ཇོང་ཁ",ee:"Ɛʋɛ",far:"فارسی",el:"Ελληνικά",en:"English",eo:"Esperanto",es:"Español",et:"Eesti",eu:"Euskara",ext:"Estremeñu",ff:"Fulfulde",fi:"Suomi","fiu-vro":"Võro",fj:"Na",fo:"Føroyskt",fr:"Français",frp:"Arpitan",fur:"Furlan",fy:"ltr",ga:"Gaeilge",gan:"ltr",gd:"ltr",gil:"Taetae",gl:"Galego",gn:"Avañe'ẽ",got:"gutisk",gu:"ગુજરાતી",gv:"Gaelg",ha:"هَوُسَ",hak:"ltr",haw:"Hawai`i",he:"עברית",hi:"हिन्दी",ho:"ltr",hr:"Hrvatski",ht:"Krèyol",hu:"Magyar",hy:"Հայերեն",hz:"Otsiherero",ia:"Interlingua",id:"Bahasa",ie:"Interlingue",ig:"Igbo",ii:"ltr",ik:"Iñupiak",ilo:"Ilokano",io:"Ido",is:"Íslenska",it:"Italiano",iu:"ᐃᓄᒃᑎᑐᑦ",ja:"日本語",jbo:"Lojban",jv:"Basa",ka:"ქართული",kg:"KiKongo",ki:"Gĩkũyũ",kj:"Kuanyama",kk:"Қазақша",kl:"Kalaallisut",km:"ភាសាខ្មែរ",kn:"ಕನ್ನಡ",khw:"کھوار",ko:"한국어",kr:"Kanuri",ks:"कश्मीरी",ksh:"Ripoarisch",ku:"Kurdî",kv:"Коми",kw:"Kernewek",ky:"Kırgızca",la:"Latina",lad:"Dzhudezmo",lan:"Leb",lb:"Lëtzebuergesch",lg:"Luganda",li:"Limburgs",lij:"Líguru",lmo:"Lumbaart",ln:"Lingála",lo:"ລາວ",lt:"Lietuvių",lv:"Latviešu","map-bms":"Basa",mg:"Malagasy",man:"官話",mh:"Kajin",mi:"Māori",min:"Minangkabau",mk:"Македонски",ml:"മലയാളം",mn:"Монгол",mo:"Moldovenească",mr:"मराठी",ms:"Bahasa",mt:"bil-Malti",mus:"Muskogee",my:"Myanmasa",na:"Dorerin",nah:"Nahuatl",nap:"Nnapulitano",nd:"ltr",nds:"Plattdüütsch","nds-nl":"Saxon",ne:"नेपाली",new:"नेपालभाषा",ng:"Oshiwambo",nl:"Nederlands",nn:"ltr",no:"Norsk",nr:"ltr",nso:"ltr",nrm:"Nouormand",nv:"Diné",ny:"Chi-Chewa",oc:"Occitan",oj:"ᐊᓂᔑᓈᐯᒧᐎᓐ",om:"Oromoo",or:"ଓଡ଼ିଆ",os:"Иронау",pa:"ਪੰਜਾਬੀ",pag:"Pangasinan",pam:"Kapampangan",pap:"Papiamentu",pdc:"ltr",pi:"Pāli",pih:"Norfuk",pl:"Polski",pms:"Piemontèis",ps:"پښتو",pt:"Português",qu:"Runa",rm:"ltr",rmy:"Romani",rn:"Kirundi",ro:"Română","roa-rup":"Armâneashti",ru:"Русский",rw:"Kinyarwandi",sa:"संस्कृतम्",sc:"Sardu",scn:"Sicilianu",sco:"Scots",sd:"सिनधि",se:"ltr",sg:"Sängö",sh:"Srpskohrvatski",si:"සිංහල",simple:"ltr",sk:"Slovenčina",sl:"Slovenščina",sm:"Gagana",sn:"chiShona",so:"Soomaaliga",sq:"Shqip",sr:"Српски",ss:"SiSwati",st:"ltr",su:"Basa",sv:"Svenska",sw:"Kiswahili",ta:"தமிழ்",te:"తెలుగు",tet:"Tetun",tg:"Тоҷикӣ",th:"ไทย",ti:"ትግርኛ",tk:"Туркмен",tl:"Tagalog",tlh:"tlhIngan-Hol",tn:"Setswana",to:"Lea",tpi:"ltr",tr:"Türkçe",ts:"Xitsonga",tt:"Tatarça",tum:"chiTumbuka",tw:"Twi",ty:"Reo",udm:"Удмурт",ug:"Uyƣurqə",uk:"Українська",ur:"اردو",uz:"Ўзбек",ve:"Tshivenḓa",vi:"Việtnam",vec:"Vèneto",vls:"ltr",vo:"Volapük",wa:"Walon",war:"Winaray",wo:"Wollof",xal:"Хальмг",xh:"isiXhosa",yi:"ייִדיש",yo:"Yorùbá",za:"Cuengh",zh:"中文","zh-classical":"ltr","zh-min-nan":"Bân-lâm-gú","zh-yue":"粵語",zu:"isiZulu"};const O=".wikipedia.org/wiki/$1",E=".wikimedia.org/wiki/$1",S="www.";var C={acronym:S+"acronymfinder.com/$1.html",advisory:"advisory"+E,advogato:S+"advogato.org/$1",aew:"wiki.arabeyes.org/$1",appropedia:S+"appropedia.org/$1",aquariumwiki:S+"theaquariumwiki.com/$1",arborwiki:"localwiki.org/ann-arbor/$1",arxiv:"arxiv.org/abs/$1",atmwiki:S+"otterstedt.de/wiki/index.php/$1",baden:S+"stadtwiki-baden-baden.de/wiki/$1/",battlestarwiki:"en.battlestarwiki.org/wiki/$1",bcnbio:"historiapolitica.bcn.cl/resenas_parlamentarias/wiki/$1",beacha:S+"beachapedia.org/$1",betawiki:"translatewiki.net/wiki/$1",bibcode:"adsabs.harvard.edu/abs/$1",bibliowiki:"wikilivres.org/wiki/$1",bluwiki:"bluwiki.com/go/$1",blw:"britainloves"+O,botwiki:"botwiki.sno.cc/wiki/$1",boxrec:S+"boxrec.com/media/index.php?$1",brickwiki:S+"brickwiki.info/wiki/$1",bugzilla:"bugzilla.wikimedia.org/show_bug.cgi?id=$1",bulba:"bulbapedia.bulbagarden.net/wiki/$1",c:"commons"+E,c2:"c2.com/cgi/wiki?$1",c2find:"c2.com/cgi/wiki?FindPage&value=$1",cache:S+"google.com/search?q=cache:$1","ĉej":"esperanto.blahus.cz/cxej/vikio/index.php/$1",cellwiki:"cell.wikia.com/wiki/$1",centralwikia:"community.wikia.com/wiki/$1",chej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",choralwiki:S+"cpdl.org/wiki/index.php/$1",citizendium:"en.citizendium.org/wiki/$1",ckwiss:S+"ck-wissen.de/ckwiki/index.php?title=$1",comixpedia:S+"comixpedia.org/index.php?title=$1",commons:"commons"+E,communityscheme:"community.schemewiki.org/?c=s&key=$1",communitywiki:"communitywiki.org/$1",comune:"rete.comuni-italiani.it/wiki/$1",creativecommons:"creativecommons.org/licenses/$1",creativecommonswiki:"wiki.creativecommons.org/$1",cxej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",dcc:S+"dccwiki.com/$1",dcdatabase:"dc.wikia.com/$1",dcma:"christian-morgenstern.de/dcma/index.php?title=$1",debian:"wiki.debian.org/$1",delicious:S+"delicious.com/tag/$1",devmo:"developer.mozilla.org/en/docs/$1",dictionary:S+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",dict:S+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",disinfopedia:"sourcewatch.org/index.php/$1",distributedproofreaders:S+"pgdp.net/wiki/$1",distributedproofreadersca:S+"pgdpcanada.net/wiki/index.php/$1",dmoz:"curlie.org/$1",dmozs:"curlie.org/search?q=$1",doi:"doi.org/$1",donate:"donate"+E,doom_wiki:"doom.wikia.com/wiki/$1",download:"releases.wikimedia.org/$1",dbdump:"dumps.wikimedia.org/$1/latest/",dpd:"lema.rae.es/dpd/?key=$1",drae:"dle.rae.es/?w=$1",dreamhost:"wiki.dreamhost.com/index.php/$1",drumcorpswiki:S+"drumcorpswiki.com/index.php/$1",dwjwiki:S+"suberic.net/cgi-bin/dwj/wiki.cgi?$1","eĉei":S+"ikso.net/cgi-bin/wiki.pl?$1",ecoreality:S+"EcoReality.org/wiki/$1",ecxei:S+"ikso.net/cgi-bin/wiki.pl?$1",elibre:"enciclopedia.us.es/index.php/$1",emacswiki:S+"emacswiki.org/emacs?$1",encyc:"encyc.org/wiki/$1",energiewiki:S+"netzwerk-energieberater.de/wiki/index.php/$1",englyphwiki:"en.glyphwiki.org/wiki/$1",enkol:"enkol.pl/$1",eokulturcentro:"esperanto.toulouse.free.fr/nova/wikini/wakka.php?wiki=$1",esolang:"esolangs.org/wiki/$1",etherpad:"etherpad.wikimedia.org/$1",ethnologue:S+"ethnologue.com/language/$1",ethnologuefamily:S+"ethnologue.com/show_family.asp?subid=$1",evowiki:"wiki.cotch.net/index.php/$1",exotica:S+"exotica.org.uk/wiki/$1",fanimutationwiki:"wiki.animutationportal.com/index.php/$1",fedora:"fedoraproject.org/wiki/$1",finalfantasy:"finalfantasy.wikia.com/wiki/$1",finnix:S+"finnix.org/$1",flickruser:S+"flickr.com/people/$1",flickrphoto:S+"flickr.com/photo.gne?id=$1",floralwiki:S+"floralwiki.co.uk/wiki/$1",foldoc:"foldoc.org/$1",foundation:"foundation"+E,foundationsite:"wikimediafoundation.org/$1",foxwiki:"fox.wikis.com/wc.dll?Wiki~$1",freebio:"freebiology.org/wiki/$1",freebsdman:S+"FreeBSD.org/cgi/man.cgi?apropos=1&query=$1",freeculturewiki:"wiki.freeculture.org/index.php/$1",freedomdefined:"freedomdefined.org/$1",freefeel:"freefeel.org/wiki/$1",freekiwiki:"wiki.freegeek.org/index.php/$1",freesoft:"directory.fsf.org/wiki/$1",ganfyd:"ganfyd.org/index.php?title=$1",gardenology:S+"gardenology.org/wiki/$1",gausswiki:"gauss.ffii.org/$1",gentoo:"wiki.gentoo.org/wiki/$1",genwiki:"wiki.genealogy.net/index.php/$1",gerrit:"gerrit.wikimedia.org/r/$1",git:"gerrit.wikimedia.org/g/$1",google:S+"google.com/search?q=$1",googledefine:S+"google.com/search?q=define:$1",googlegroups:"groups.google.com/groups?q=$1",guildwarswiki:"wiki.guildwars.com/wiki/$1",guildwiki:"guildwars.wikia.com/wiki/$1",guc:"tools.wmflabs.org/guc/?user=$1",gucprefix:"tools.wmflabs.org/guc/?isPrefixPattern=1&src=rc&user=$1",gutenberg:S+"gutenberg.org/etext/$1",gutenbergwiki:S+"gutenberg.org/wiki/$1",hackerspaces:"hackerspaces.org/wiki/$1",h2wiki:"halowiki.net/p/$1",hammondwiki:S+"dairiki.org/HammondWiki/index.php3?$1",hdl:"hdl.handle.net/$1",heraldik:"heraldik-wiki.de/wiki/$1",heroeswiki:"heroeswiki.com/$1",horizonlabs:"horizon.wikimedia.org/$1",hrwiki:S+"hrwiki.org/index.php/$1",hrfwiki:"fanstuff.hrwiki.org/index.php/$1",hupwiki:"wiki.hup.hu/index.php/$1",iarchive:"archive.org/details/$1",imdbname:S+"imdb.com/name/nm$1/",imdbtitle:S+"imdb.com/title/tt$1/",imdbcompany:S+"imdb.com/company/co$1/",imdbcharacter:S+"imdb.com/character/ch$1/",incubator:"incubator"+E,infosecpedia:"infosecpedia.org/wiki/$1",infosphere:"theinfosphere.org/$1","iso639-3":"iso639-3.sil.org/code/$1",issn:S+"worldcat.org/issn/$1",iuridictum:"iuridictum.pecina.cz/w/$1",jaglyphwiki:"glyphwiki.org/wiki/$1",jefo:"esperanto-jeunes.org/wiki/$1",jerseydatabase:"jerseydatabase.com/wiki.php?id=$1",jira:"jira.toolserver.org/browse/$1",jspwiki:S+"ecyrd.com/JSPWiki/Wiki.jsp?page=$1",jstor:S+"jstor.org/journals/$1",kamelo:"kamelopedia.mormo.org/index.php/$1",karlsruhe:"ka.stadtwiki.net/$1",kinowiki:"kino.skripov.com/index.php/$1",komicawiki:"wiki.komica.org/?$1",kontuwiki:"kontu.wiki/$1",wikitech:"wikitech"+E,libreplanet:"libreplanet.org/wiki/$1",linguistlist:"linguistlist.org/forms/langs/LLDescription.cfm?code=$1",linuxwiki:S+"linuxwiki.de/$1",linuxwikide:S+"linuxwiki.de/$1",liswiki:"liswiki.org/wiki/$1",literateprograms:"en.literateprograms.org/$1",livepedia:S+"livepedia.gr/index.php?title=$1",localwiki:"localwiki.org/$1",lojban:"mw.lojban.org/papri/$1",lostpedia:"lostpedia.wikia.com/wiki/$1",lqwiki:"wiki.linuxquestions.org/wiki/$1",luxo:"tools.wmflabs.org/guc/?user=$1",mail:"lists.wikimedia.org/mailman/listinfo/$1",mailarchive:"lists.wikimedia.org/pipermail/$1",mariowiki:S+"mariowiki.com/$1",marveldatabase:S+"marveldatabase.com/wiki/index.php/$1",meatball:"meatballwiki.org/wiki/$1",mw:S+"mediawiki.org/wiki/$1",mediazilla:"bugzilla.wikimedia.org/$1",memoryalpha:"memory-alpha.fandom.com/wiki/$1",metawiki:"meta"+E,metawikimedia:"meta"+E,metawikipedia:"meta"+E,mineralienatlas:S+"mineralienatlas.de/lexikon/index.php/$1",moinmoin:"moinmo.in/$1",monstropedia:S+"monstropedia.org/?title=$1",mosapedia:"mosapedia.de/wiki/index.php/$1",mozcom:"mozilla.wikia.com/wiki/$1",mozillawiki:"wiki.mozilla.org/$1",mozillazinekb:"kb.mozillazine.org/$1",musicbrainz:"musicbrainz.org/doc/$1",mediawikiwiki:S+"mediawiki.org/wiki/$1",mwod:S+"merriam-webster.com/dictionary/$1",mwot:S+"merriam-webster.com/thesaurus/$1",nkcells:S+"nkcells.info/index.php?title=$1",nara:"catalog.archives.gov/id/$1",nosmoke:"no-smok.net/nsmk/$1",nost:"nostalgia."+O,nostalgia:"nostalgia."+O,oeis:"oeis.org/$1",oldwikisource:"wikisource.org/wiki/$1",olpc:"wiki.laptop.org/go/$1",omegawiki:S+"omegawiki.org/Expression:$1",onelook:S+"onelook.com/?ls=b&w=$1",openlibrary:"openlibrary.org/$1",openstreetmap:"wiki.openstreetmap.org/wiki/$1",openwetware:"openwetware.org/wiki/$1",opera7wiki:"operawiki.info/$1",organicdesign:S+"organicdesign.co.nz/$1",orthodoxwiki:"orthodoxwiki.org/$1",osmwiki:"wiki.openstreetmap.org/wiki/$1",otrs:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=$1",otrswiki:"otrs-wiki"+E,ourmedia:S+"socialtext.net/ourmedia/index.cgi?$1",outreach:"outreach"+E,outreachwiki:"outreach"+E,owasp:S+"owasp.org/index.php/$1",panawiki:"wiki.alairelibre.net/index.php?title=$1",patwiki:"gauss.ffii.org/$1",personaltelco:"personaltelco.net/wiki/$1",petscan:"petscan.wmflabs.org/?psid=$1",phab:"phabricator.wikimedia.org/$1",phabricator:"phabricator.wikimedia.org/$1",phwiki:S+"pocketheaven.com/ph/wiki/index.php?title=$1",phpwiki:"phpwiki.sourceforge.net/phpwiki/index.php?$1",planetmath:"planetmath.org/node/$1",pmeg:S+"bertilow.com/pmeg/$1",pmid:S+"ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract",pokewiki:"pokewiki.de/$1","pokéwiki":"pokewiki.de/$1",policy:"policy.wikimedia.org/$1",proofwiki:S+"proofwiki.org/wiki/$1",pyrev:S+"mediawiki.org/wiki/Special:Code/pywikipedia/$1",pythoninfo:"wiki.python.org/moin/$1",pythonwiki:S+"pythonwiki.de/$1",pywiki:"c2.com/cgi/wiki?$1",psycle:"psycle.sourceforge.net/wiki/$1",quality:"quality"+E,quarry:"quarry.wmflabs.org/$1",regiowiki:"regiowiki.at/wiki/$1",rev:S+"mediawiki.org/wiki/Special:Code/MediaWiki/$1",revo:"purl.org/NET/voko/revo/art/$1.html",rfc:"tools.ietf.org/html/rfc$1",rheinneckar:"rhein-neckar-wiki.de/$1",robowiki:"robowiki.net/?$1",rodovid:"en.rodovid.org/wk/$1",reuterswiki:"glossary.reuters.com/index.php/$1",rowiki:"wiki.rennkuckuck.de/index.php/$1",rt:"rt.wikimedia.org/Ticket/Display.html?id=$1",s23wiki:"s23.org/wiki/$1",scholar:"scholar.google.com/scholar?q=$1",schoolswp:"schools-"+O,scores:"imslp.org/wiki/$1",scoutwiki:"en.scoutwiki.org/$1",scramble:S+"scramble.nl/wiki/index.php?title=$1",seapig:S+"seapig.org/$1",seattlewiki:"seattle.wikia.com/wiki/$1",slwiki:"wiki.secondlife.com/wiki/$1","semantic-mw":S+"semantic-mediawiki.org/wiki/$1",senseislibrary:"senseis.xmp.net/?$1",sharemap:"sharemap.org/$1",silcode:S+"sil.org/iso639-3/documentation.asp?id=$1",slashdot:"slashdot.org/article.pl?sid=$1",sourceforge:"sourceforge.net/$1",spcom:"spcom"+E,species:"species"+E,squeak:"wiki.squeak.org/squeak/$1",stats:"stats.wikimedia.org/$1",stewardry:"tools.wmflabs.org/meta/stewardry/?wiki=$1",strategy:"strategy"+E,strategywiki:"strategywiki.org/wiki/$1",sulutil:"meta.wikimedia.org/wiki/Special:CentralAuth/$1",swtrain:"train.spottingworld.com/$1",svn:"svn.wikimedia.org/viewvc/mediawiki/$1?view=log",swinbrain:"swinbrain.ict.swin.edu.au/wiki/$1",tabwiki:S+"tabwiki.com/index.php/$1",tclerswiki:"wiki.tcl.tk/$1",technorati:S+"technorati.com/search/$1",tenwiki:"ten."+O,testwiki:"test."+O,testwikidata:"test.wikidata.org/wiki/$1",test2wiki:"test2."+O,tfwiki:"tfwiki.net/wiki/$1",thelemapedia:S+"thelemapedia.org/index.php/$1",theopedia:S+"theopedia.com/$1",thinkwiki:S+"thinkwiki.org/wiki/$1",ticket:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=$1",tmbw:"tmbw.net/wiki/$1",tmnet:S+"technomanifestos.net/?$1",tmwiki:S+"EasyTopicMaps.com/?page=$1",toolforge:"tools.wmflabs.org/$1",toollabs:"tools.wmflabs.org/$1",tools:"toolserver.org/$1",tswiki:S+"mediawiki.org/wiki/Toolserver:$1",translatewiki:"translatewiki.net/wiki/$1",tviv:"tviv.org/wiki/$1",tvtropes:S+"tvtropes.org/pmwiki/pmwiki.php/Main/$1",twiki:"twiki.org/cgi-bin/view/$1",tyvawiki:S+"tyvawiki.org/wiki/$1",umap:"umap.openstreetmap.fr/$1",uncyclopedia:"en.uncyclopedia.co/wiki/$1",unihan:S+"unicode.org/cgi-bin/GetUnihanData.pl?codepoint=$1",unreal:"wiki.beyondunreal.com/wiki/$1",urbandict:S+"urbandictionary.com/define.php?term=$1",usej:S+"tejo.org/usej/$1",usemod:S+"usemod.com/cgi-bin/wiki.pl?$1",usability:"usability"+E,utrs:"utrs.wmflabs.org/appeal.php?id=$1",vikidia:"fr.vikidia.org/wiki/$1",vlos:"tusach.thuvienkhoahoc.com/wiki/$1",vkol:"kol.coldfront.net/thekolwiki/index.php/$1",voipinfo:S+"voip-info.org/wiki/view/$1",votewiki:"vote"+E,werelate:S+"werelate.org/wiki/$1",wg:"wg-en."+O,wikia:S+"wikia.com/wiki/w:c:$1",wikiasite:S+"wikia.com/wiki/w:c:$1",wikiapiary:"wikiapiary.com/wiki/$1",wikibooks:"en.wikibooks.org/wiki/$1",wikichristian:S+"wikichristian.org/index.php?title=$1",wikicities:S+"wikia.com/wiki/w:$1",wikicity:S+"wikia.com/wiki/w:c:$1",wikiconference:"wikiconference.org/wiki/$1",wikidata:S+"wikidata.org/wiki/$1",wikif1:S+"wikif1.org/$1",wikifur:"en.wikifur.com/wiki/$1",wikihow:S+"wikihow.com/$1",wikiindex:"wikiindex.org/$1",wikilemon:"wiki.illemonati.com/$1",wikilivres:"wikilivres.org/wiki/$1",wikilivresru:"wikilivres.ru/$1","wikimac-de":"apfelwiki.de/wiki/Main/$1",wikimedia:"foundation"+E,wikinews:"en.wikinews.org/wiki/$1",wikinfo:"wikinfo.org/w/index.php/$1",wikinvest:"meta.wikimedia.org/wiki/Interwiki_map/discontinued#Wikinvest",wikiotics:"wikiotics.org/$1",wikipapers:"wikipapers.referata.com/wiki/$1",wikipedia:"en."+O,wikipediawikipedia:"en.wikipedia.org/wiki/Wikipedia:$1",wikiquote:"en.wikiquote.org/wiki/$1",wikisophia:"wikisophia.org/index.php?title=$1",wikisource:"en.wikisource.org/wiki/$1",wikispecies:"species"+E,wikispot:"wikispot.org/?action=gotowikipage&v=$1",wikiskripta:S+"wikiskripta.eu/index.php/$1",labsconsole:"wikitech"+E,wikiti:"wikiti.denglend.net/index.php?title=$1",wikiversity:"en.wikiversity.org/wiki/$1",wikivoyage:"en.wikivoyage.org/wiki/$1",betawikiversity:"beta.wikiversity.org/wiki/$1",wikiwikiweb:"c2.com/cgi/wiki?$1",wiktionary:"en.wiktionary.org/wiki/$1",wipipedia:"wipipedia.org/index.php/$1",wlug:S+"wlug.org.nz/$1",wmam:"am"+E,wmar:S+"wikimedia.org.ar/wiki/$1",wmat:"mitglieder.wikimedia.at/$1",wmau:"wikimedia.org.au/wiki/$1",wmbd:"bd"+E,wmbe:"be"+E,wmbr:"br"+E,wmca:"ca"+E,wmch:S+"wikimedia.ch/$1",wmcl:S+"wikimediachile.cl/index.php?title=$1",wmcn:"cn"+E,wmco:"co"+E,wmcz:S+"wikimedia.cz/web/$1",wmdc:"wikimediadc.org/wiki/$1",securewikidc:"secure.wikidc.org/$1",wmde:"wikimedia.de/wiki/$1",wmdk:"dk"+E,wmee:"ee"+E,wmec:"ec"+E,wmes:S+"wikimedia.es/wiki/$1",wmet:"ee"+E,wmfdashboard:"outreachdashboard.wmflabs.org/$1",wmfi:"fi"+E,wmfr:"wikimedia.fr/$1",wmge:"ge"+E,wmhi:"hi"+E,wmhk:"meta.wikimedia.org/wiki/Wikimedia_Hong_Kong",wmhu:"wikimedia.hu/wiki/$1",wmid:"id"+E,wmil:S+"wikimedia.org.il/$1",wmin:"wiki.wikimedia.in/$1",wmit:"wiki.wikimedia.it/wiki/$1",wmke:"meta.wikimedia.org/wiki/Wikimedia_Kenya",wmmk:"mk"+E,wmmx:"mx"+E,wmnl:"nl"+E,wmnyc:"nyc"+E,wmno:"no"+E,"wmpa-us":"pa-us"+E,wmph:"meta.wikimedia.org/wiki/Wikimedia_Philippines",wmpl:"pl"+E,wmpt:"pt"+E,wmpunjabi:"punjabi"+E,wmromd:"romd"+E,wmrs:"rs"+E,wmru:"ru"+E,wmse:"se"+E,wmsk:"wikimedia.sk/$1",wmtr:"tr"+E,wmtw:"wikimedia.tw/wiki/index.php5/$1",wmua:"ua"+E,wmuk:"wikimedia.org.uk/wiki/$1",wmve:"wikimedia.org.ve/wiki/$1",wmza:"wikimedia.org.za/wiki/$1",wm2005:"wikimania2005"+E,wm2006:"wikimania2006"+E,wm2007:"wikimania2007"+E,wm2008:"wikimania2008"+E,wm2009:"wikimania2009"+E,wm2010:"wikimania2010"+E,wm2011:"wikimania2011"+E,wm2012:"wikimania2012"+E,wm2013:"wikimania2013"+E,wm2014:"wikimania2014"+E,wm2015:"wikimania2015"+E,wm2016:"wikimania2016"+E,wm2017:"wikimania2017"+E,wm2018:"wikimania2018"+E,wmania:"wikimania"+E,wikimania:"wikimania"+E,wmteam:"wikimaniateam"+E,wmf:"foundation"+E,wmfblog:"blog.wikimedia.org/$1",wmdeblog:"blog.wikimedia.de/$1",wookieepedia:"starwars.wikia.com/wiki/$1",wowwiki:S+"wowwiki.com/$1",wqy:"wqy.sourceforge.net/cgi-bin/index.cgi?$1",wurmpedia:"wurmpedia.com/index.php/$1",viaf:"viaf.org/viaf/$1",zrhwiki:S+"zrhwiki.ch/wiki/$1",zum:"wiki.zum.de/$1",zwiki:S+"zwiki.org/$1",m:"meta"+E,meta:"meta"+E,sep11:"sep11."+O,d:S+"wikidata.org/wiki/$1",minnan:"zh-min-nan."+O,nb:"no."+O,"zh-cfr":"zh-min-nan."+O,"zh-cn":"zh."+O,"zh-tw":"zh."+O,nan:"zh-min-nan."+O,vro:"fiu-vro."+O,cmn:"zh."+O,lzh:"zh-classical."+O,rup:"roa-rup."+O,gsw:"als."+O,"be-tarask":"be-x-old."+O,sgs:"bat-smg."+O,egl:"eml."+O,w:"en."+O,wikt:"en.wiktionary.org/wiki/$1",q:"en.wikiquote.org/wiki/$1",b:"en.wikibooks.org/wiki/$1",n:"en.wikinews.org/wiki/$1",s:"en.wikisource.org/wiki/$1",chapter:"en"+E,v:"en.wikiversity.org/wiki/$1",voy:"en.wikivoyage.org/wiki/$1"};Object.keys(z).forEach((e=>{C[e]=e+".wikipedia.org/wiki/$1"}));const q=/^:?(category|catégorie|kategorie|categoría|categoria|categorie|kategoria|تصنيف|image|file|fichier|datei|media):/i,N=/\[(https?|news|ftp|mailto|gopher|irc)(:\/\/[^\]| ]{4,1500})([| ].*?)?\]/g,L=/\[\[(.{0,160}?)\]\]([a-z]+)?/gi,P=function(e,t){return t.replace(L,(function(t,i,a){let n=null,r=i;if(i.match(/\|/)&&(r=(i=i.replace(/\[\[(.{2,100}?)\]\](\w{0,10})/g,"$1$2")).replace(/(.{2,100})\|.{0,200}/,"$1"),n=i.replace(/.{2,100}?\|/,""),null===n&&r.match(/\|$/)&&(r=r.replace(/\|$/,""),n=r)),r.match(q))return i;let o={page:r,raw:t};return o.page=o.page.replace(/#(.*)/,((e,t)=>(o.anchor=t,""))),o=function(e){let t=e.page||"";if(-1!==t.indexOf(":")){let i=t.match(/^(.*):(.*)/);if(null===i)return e;let a=i[1]||"";if(a=a.toLowerCase(),-1!==a.indexOf(":")){let[,t,i]=a.match(/^:?(.*):(.*)/);if(!1===C.hasOwnProperty(t)||!1===z.hasOwnProperty(i))return e;e.wiki={wiki:t,lang:i}}else{if(!1===C.hasOwnProperty(a))return e;e.wiki=a}e.page=i[2]}return e}(o),o.wiki&&(o.type="interwiki"),null!==n&&n!==o.page&&(o.text=n),a&&(o.text=o.text||o.page,o.text+=a.trim()),o.page&&!1===/^[A-Z]/.test(o.page)&&(o.text||(o.text=o.page),o.page=o.page),e.push(o),i})),e},A=function(e){let t=[];if(t=function(e,t){return t.replace(N,(function(t,i,a,n){return n=n||"",e.push({type:"external",site:i+a,text:n.trim(),raw:t}),n})),e}(t,e),t=P(t,e),0!==t.length)return t},D=new RegExp("^[ \n\t]*?#("+["adkas","aýdaw","doorverwijzing","ohjaus","patrz","přesměruj","redirección","redireccion","redirección","redirecionamento","redirect","redirection","redirection","rinvia","tilvísun","uudelleenohjaus","weiterleitung","weiterleitung","yönlendi̇r","yönlendirme","yönlendi̇rme","ανακατευθυνση","айдау","перанакіраваньне","перенаправлення","пренасочување","преусмери","преусмјери","تغییر_مسیر","تغییرمسیر","تغییرمسیر","เปลี่ยนทาง","ប្តូរទីតាំងទៅ","転送","重定向"].join("|")+") *?(\\[\\[.{2,180}?\\]\\])","i"),T=["table","code","score","data","categorytree","charinsert","hiero","imagemap","inputbox","nowiki","references","source","syntaxhighlight","timeline"],I=`< ?(${T.join("|")}) ?[^>]{0,200}?>`,M=`< ?/ ?(${T.join("|")}) ?>`,R=new RegExp(`${I}[\\s\\S]+?${M}`,"gi");function U(e){return e=(e=(e=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(R," ")).replace(/ ?< ?(span|div|table|data) [a-zA-Z0-9=%.\-#:;'" ]{2,100}\/? ?> ?/g," ")).replace(/ ?< ?(ref) [a-zA-Z0-9=" ]{2,100}\/ ?> ?/g," ")).replace(/(.*?)<\/i>/g,"''$1''")).replace(/(.*?)<\/b>/g,"'''$1'''")).replace(/(.*?)<\/sub>/g,"{{sub|$1}}")).replace(/(.*?)<\/sup>/g,"{{sup|$1}}")).replace(/
(.*?)<\/blockquote>/g,"{{blockquote|text=$1}}")).replace(/ ?<[ /]?(p|sub|sup|span|nowiki|div|table|br|tr|td|th|pre|pre2|hr|u)[ /]?> ?/g," ")).replace(/ ?<[ /]?(abbr|bdi|bdo|cite|del|dfn|em|ins|kbd|mark|q|s|small)[ /]?> ?/g," ")).replace(/ ?<[ /]?h[0-9][ /]?> ?/g," ")).replace(/ ?< ?br ?\/> ?/g,"\n")).trim()}(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(//g,"")).replace(/__(NOTOC|NOEDITSECTION|FORCETOC|TOC)__/gi,"")).replace(/~{2,3}/g,"")).replace(/\r/g,"")).replace(/\u3002/g,". ")).replace(/----/g,"")).replace(/\{\{\}\}/g," – ")).replace(/\{\{\\\}\}/g," / ")).replace(/ /g," "))).replace(/\([,;: ]+\)/g,"")).replace(/\{\{(baseball|basketball) (primary|secondary) (style|color).*?\}\}/i,"")}const B=/[\\.$]/,F=function(e){return"string"!=typeof e&&(e=""),e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/^\$/,"\\u0024")).replace(/\./g,"\\u002e")},K=function(e={}){let t=Object.keys(e);for(let i=0;i{H.prototype[e]=Y[e]}));const G=/^[0-9,.]+$/,V={text:!0,links:!0,formatting:!0,numbers:!0},J=function(e={}){Object.defineProperty(this,"data",{enumerable:!1,value:e})},X={links:function(e){let t=this.data.links||[];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page===e));return void 0===i?[]:[i]}return t},interwiki:function(){return this.links().filter((e=>void 0!==e.wiki))},bolds:function(){return this.data&&this.data.fmt&&this.data.fmt.bold&&this.data.fmt.bold||[]},italics:function(){return this.data&&this.data.fmt&&this.data.fmt.italic&&this.data.fmt.italic||[]},text:function(e){return void 0!==e&&"string"==typeof e&&(this.data.text=e),this.data.text||""},json:function(e){return function(e,t){t=p(t,V);let i={},a=e.text();if(!0===t.text&&(i.text=a),!0===t.numbers&&G.test(a)){let e=Number(a.replace(/,/g,""));!1===isNaN(e)&&(i.number=e)}return t.links&&e.links().length>0&&(i.links=e.links().map((e=>e.json()))),t.formatting&&e.data.fmt&&(i.formatting=e.data.fmt),i}(this,e)},wikitext:function(){return this.data.wiki||""},isEmpty:function(){return""===this.data.text}};Object.keys(X).forEach((e=>{J.prototype[e]=X[e]}));const Q={links:"link",bolds:"bold",italics:"italic"};Object.keys(Q).forEach((e=>{J.prototype[Q[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}})),J.prototype.plaintext=J.prototype.text;const ee=["ad","adj","adm","adv","al","alta","approx","apr","apt","arc","ariz","assn","asst","atty","aug","ave","ba","bc","bl","bldg","blvd","brig","bros","ca","cal","calif","capt","cca","cg","cl","cm","cmdr","co","col","colo","comdr","conn","corp","cpl","cres","ct","cyn","dak","dec","def","dept","det","dg","dist","dl","dm","dr","ea","eg","eng","esp","esq","est","etc","ex","exp","feb","fem","fig","fl oz","fl","fla","fm","fr","ft","fy","ga","gal","gb","gen","gov","hg","hon","hr","hrs","hwy","hz","ia","ida","ie","inc","inf","jan","jd","jr","jul","jun","kan","kans","kb","kg","km","kmph","lat","lb","lit","llb","lm","lng","lt","ltd","lx","ma","maj","mar","masc","mb","md","messrs","mg","mi","min","minn","misc","mister","ml","mlle","mm","mme","mph","mps","mr","mrs","ms","mstr","mt","neb","nebr","nee","no","nov","oct","okla","ont","op","ord","oz","pa","pd","penn","penna","phd","pl","pp","pref","prob","prof","pron","ps","psa","pseud","pt","pvt","qt","que","rb","rd","rep","reps","res","rev","sask","sec","sen","sens","sep","sept","sfc","sgt","sir","situ","sq ft","sq","sr","ss","st","supt","surg","tb","tbl","tbsp","tce","td","tel","temp","tenn","tex","tsp","univ","usafa","ut","va","vb","ver","vet","vitro","vivo","vol","vs","vt","wis","wisc","wr","wy","wyo","yb","µg"].concat("[^]][^]]"),te=new RegExp("(^| |')("+ee.join("|")+")[.!?] ?$","i"),ie=/[ .'][A-Z].? *$/i,ae=/\.{3,} +$/,ne=/ c\.\s$/,re=/\p{Letter}/iu;function oe(e){let t={wiki:e,text:e};return function(e){let t=e.text,i=A(t)||[];e.links=i.map((e=>(t=t.replace(e.raw,e.text||e.page||""),new H(e)))),t=t.replace(/\[\[File:(.{2,80}?)\|([^\]]+)\]\](\w{0,5})/g,"$1"),e.text=t}(t),t.text=n(t.text.replace(/\([,;: ]*\)/g,"").replace(/\( *(; ?)+/g,"(")).replace(/ +\.$/,"."),t=function(e){let t=[],i=[],a=e.text||"";return a=a.replace(/'''''(.{0,2500}?)'''''/g,((e,a)=>(t.push(a),i.push(a),a))),a=a.replace(/''''(.{0,2500}?)''''/g,((e,i)=>(t.push(`'${i}'`),`'${i}'`))),a=a.replace(/'''(.{0,2500}?)'''/g,((e,i)=>(t.push(i),i))),a=a.replace(/''(.{0,2500}?)''/g,((e,t)=>(i.push(t),t))),e.text=a,t.length>0&&(e.fmt=e.fmt||{},e.fmt.bold=t),i.length>0&&(e.fmt=e.fmt||{},e.fmt.italic=i),e}(t),new J(t)}const se=function(e){let t=function(e){let t=[],i=[];if(!e||"string"!=typeof e||0===e.trim().length)return t;let a=function(e){let t=e.split(/(\n+)/);return t=t.filter((e=>e.match(/\S/))),t=t.map((function(e){return e.split(/(\S.+?[.!?]"?)(?=\s|$)/g)})),function(e){let t=[];return e.forEach((function(e){t=t.concat(e)})),t}(t)}(e);for(let e=0;ei.length)return!1;const a=e.match(/"/g);if(a&&a.length%2!=0&&e.length<900)return!1;const n=e.match(/[()]/g);return!(n&&n.length%2!=0&&e.length<900)}(n))?i[e+1]=i[e]+(i[e+1]||""):i[e]&&i[e].length>0&&(t.push(i[e]),i[e]="");var n;return 0===t.length?[e]:t}(e.wiki);t=t.map(oe),t[0]&&t[0].text()&&":"===t[0].text()[0]&&(t=t.slice(1)),e.sentences=t},le=/.*rowspan *= *["']?([0-9]+)["']?[ |]*/,ce=/.*colspan *= *["']?([0-9]+)["']?[ |]*/,ue=function(e){return e=function(e){return e.forEach(((t,i)=>{t.forEach(((a,n)=>{let r=a.match(le);if(null!==r){let o=parseInt(r[1],10);a=a.replace(le,""),t[n]=a;for(let t=i+1;t{e.forEach(((t,i)=>{let a=t.match(ce);if(null!==a){let n=parseInt(a[1],10);e[i]=t.replace(ce,"");for(let t=1;te.length>0))}(e))},pe=/^!/,me={name:!0,age:!0,born:!0,date:!0,year:!0,city:!0,country:!0,population:!0,count:!0,number:!0},de=function(e){return(e=oe(e).text()).match(/\|/)&&(e=e.replace(/.*?\| ?/,"")),e=(e=(e=e.replace(/style=['"].*?["']/,"")).replace(/^!/,"")).trim()},he=function(e){if(e.length<=3)return[];let t=e[0].slice(0);t=t.map((e=>(e=oe(e=e.replace(/^! */,"")).text(),e=(e=de(e)).toLowerCase())));for(let i=0;ie&&!0!==/^\|\+/.test(e))),!0===/^\{\|/.test(e[0])&&e.shift(),!0===/^\|\}/.test(e[e.length-1])&&e.pop(),!0===/^\|-/.test(e[0])&&e.shift(),e}(e);for(let a=0;a0&&(t.push(i),i=[]);else{let e=n.charAt(0);"|"!==e&&"!"!==e||(n=n.substring(1)),n=n.split(/(?:\|\||!!)/),"!"===e&&(n[0]=e+n[0]),n.forEach((e=>{e=e.trim(),i.push(e)}))}}return i.length>0&&t.push(i),t}(e.replace(/\r/g,"").replace(/\n(\s*[^|!{\s])/g," $1").split(/\n/).map((e=>e.trim())));if(t=t.filter((e=>e)),0===t.length)return[];t=function(e){return e.filter((e=>1!==e.length||!e[0]||!pe.test(e[0])||!1!==/rowspan/i.test(e[0])))}(t),t=ue(t);let i=function(e=[]){let t=[];var i;(i=(i=e[0])||[]).length-i.filter((e=>e)).length>3&&e.shift();let a=e[0];return a&&a[0]&&a[1]&&(/^!/.test(a[0])||/^!/.test(a[1]))&&(t=a.map((e=>(e=e.replace(/^! */,""),de(e)))),e.shift()),a=e[0],a&&a[0]&&a[1]&&/^!/.test(a[0])&&/^!/.test(a[1])&&(a.forEach(((e,i)=>{e=e.replace(/^! */,""),e=de(e),!0===Boolean(e)&&(t[i]=e)})),e.shift()),t}(t);if(!i||i.length<=1){i=he(t);let e=t[t.length-1]||[];i.length<=1&&e.length>2&&(i=he(t.slice(1)),i.length>0&&(t=t.slice(2)))}let a=t.map((e=>function(e,t){let i={};return e.forEach(((e,a)=>{let n=t[a]||"col"+(a+1),r=oe(e);r.text(de(r.text())),i[n]=r})),i}(e,i)));return a},fe={},ke=function(e=""){return e=(e=(e=(e=e.toLowerCase()).replace(/[_-]/g," ")).replace(/\(.*?\)/,"")).trim()},be=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_wiki",{enumerable:!1,value:t})},we={links(e){let t=[];if(this.data.forEach((e=>{Object.keys(e).forEach((i=>{t=t.concat(e[i].links())}))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},get(e){let t=this.data[0]||{},i=Object.keys(t).reduce(((e,t)=>(e[ke(t)]=t,e)),{});if("string"==typeof e){let t=ke(e);return t=i[t]||t,this.data.map((e=>e[t]?e[t].text():null))}return e=e.map(ke).map((e=>i[e]||e)),this.data.map((t=>e.reduce(((e,i)=>(t[i]?e[i]=t[i].text():e[i]="",e)),{})))},keyValue(e){let t=this.json(e);return t.forEach((e=>{Object.keys(e).forEach((t=>{e[t]=e[t].text}))})),t},json(e){return e=p(e,fe),function(e,t){return e.map((e=>{let i={};return Object.keys(e).forEach((t=>{i[t]=e[t].json()})),!0===t.encode&&(i=K(i)),i}))}(this.data,e)},text:()=>"",wikitext(){return this._wiki||""}};we.keyvalue=we.keyValue,we.keyval=we.keyValue,Object.keys(we).forEach((e=>{be.prototype[e]=we[e]}));const ye=/^\s*\{\|/,$e=/^\s*\|\}/,xe={sentences:!0},ve={sentences:!0,lists:!0,images:!0},je=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},_e={sentences:function(){return this.data.sentences||[]},references:function(){return this.data.references},lists:function(){return this.data.lists},images(){return this.data.images||[]},links:function(e){let t=[];if(this.sentences().forEach((i=>{t=t.concat(i.links(e))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},interwiki(){let e=[];return this.sentences().forEach((t=>{e=e.concat(t.interwiki())})),e||[]},text:function(e){e=p(e,ve);let t=this.sentences().map((t=>t.text(e))).join(" ");return this.lists().forEach((e=>{t+="\n"+e.text()})),t},json:function(e){return function(e,t){let i={};return!0===(t=p(t,xe)).sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,ve))},wikitext:function(){return this.data.wiki}};_e.citations=_e.references,Object.keys(_e).forEach((e=>{je.prototype[e]=_e[e]}));const ze={sentences:"sentence",references:"reference",citations:"citation",lists:"list",images:"image",links:"link"};Object.keys(ze).forEach((e=>{je.prototype[ze[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}}));const Oe=function(e){return e=(e=e.replace(/^\{\{/,"")).replace(/\}\}$/,"")},Ee=function(e){return e=(e=(e=(e||"").trim()).toLowerCase()).replace(/_/g," ")},Se=/^[\p{Letter}0-9._\- '()\t]+=/iu,Ce={template:!0,list:!0,prototype:!0},qe=function(e,t){let i=0;return e.reduce(((e,a="")=>{if(a=a.trim(),!0===Se.test(a)){let t=function(e){let t=e.split("="),i=t[0]||"";i=i.toLowerCase().trim();let a=t.slice(1).join("=");return Ce.hasOwnProperty(i)&&(i="_"+i),{key:i,val:a.trim()}}(a);if(t.key)return e[t.key]=t.val,e}if(t&&t[i]){e[t[i]]=a}else e.list=e.list||[],e.list.push(a);return i+=1,e}),{})},Ne={classname:!0,style:!0,align:!0,margin:!0,left:!0,break:!0,boxsize:!0,framestyle:!0,item_style:!0,collapsible:!0,list_style_type:!0,"list-style-type":!0,colwidth:!0},Le=function(e,t){let i=oe(e);return"json"===t?i.json():"raw"===t?i:i.text()},Pe=function(e,t=[],i){let a=function(e){let t=e.split(/\n?\|/);t.forEach(((e,i)=>{null!==e&&(/\[\[[^\]]+$/.test(e)||/\{\{[^}]+$/.test(e)||e.split("{{").length!==e.split("}}").length||e.split("[[").length!==e.split("]]").length)&&(t[i+1]=t[i]+"|"+t[i+1],t[i]=null)})),t=t.filter((e=>null!==e)),t=t.map((e=>(e||"").trim()));for(let e=t.length-1;e>=0;e-=1){""===t[e]&&t.pop();break}return t}(e=Oe(e||"")),n=a.shift(),r=qe(a,t);return r=function(e){return Object.keys(e).forEach((t=>{!0===Ne[t.toLowerCase()]&&delete e[t],null!==e[t]&&""!==e[t]||delete e[t]})),e}(r),r[1]&&t[0]&&!1===r.hasOwnProperty(t[0])&&(r[t[0]]=r[1],delete r[1]),Object.keys(r).forEach((e=>{r[e]="list"!==e?Le(r[e],i):r[e].map((e=>Le(e,i)))})),n&&(r.template=Ee(n)),r};const Ae=new RegExp("("+h.join("|")+"):","i");let De=`(${h.join("|")})`;const Te=new RegExp(De+":(.+?)[\\||\\]]","iu"),Ie={thumb:!0,thumbnail:!0,border:!0,right:!0,left:!0,center:!0,top:!0,bottom:!0,none:!0,upright:!0,baseline:!0,middle:!0,sub:!0,super:!0},Me=function(e,t){let i=e.wiki,a=function(e){let t=[],i=[];const a=e.split("");let n=0;for(let r=0;r0){let e=0,a=0;for(let t=0;ta&&i.push("]"),t.push(i.join("")),i=[]}}return t}(i);a.forEach((function(a){if(!0===Ae.test(a)){e.images=e.images||[];let n=function(e,t){let i=e.match(Te);if(null===i||!i[2])return null;let a=`${i[1]}:${i[2]||""}`;if(a){let i={file:a,lang:t._lang,domain:t._domain,wiki:e,pluginData:{}};e=(e=e.replace(/^\[\[/,"")).replace(/\]\]$/,"");let n=Pe(e),r=n.list||[];return n.alt&&(i.alt=n.alt),r=r.filter((e=>!1===Ie.hasOwnProperty(e))),r[r.length-1]&&(i.caption=oe(r[r.length-1])),new j(i)}return null}(a,t);n&&e.images.push(n),i=i.replace(a,"")}})),e.wiki=i},Re={},Ue=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},Be={lines(){return this.data},links(e){let t=[];if(this.lines().forEach((e=>{t=t.concat(e.links())})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},json(e){return e=p(e,Re),this.lines().map((t=>t.json(e)))},text(){return((e,t)=>e.map((e=>" * "+e.text(t))).join("\n"))(this.data)},wikitext(){return this.wiki||""}};Object.keys(Be).forEach((e=>{Ue.prototype[e]=Be[e]}));const Fe=/^[#*:;|]+/,Ke=/^\*+[^:,|]{4}/,We=/^ ?#[^:,|]{4}/,Ze=/[\p{Letter}_0-9\]}]/iu,He=function(e){return Fe.test(e)||Ke.test(e)||We.test(e)},Ye=function(e,t){let i=[];for(let a=t;ae&&Ze.test(e))),i=function(e){let t=1;e=e.filter((e=>e));for(let i=0;ie&&e.trim().length>0)),a=a.map((e=>{let i={wiki:e,lists:[],sentences:[],images:[]};return function(e){let t=e.wiki,i=t.split(/\n/g),a=[],n=[];for(let e=0;e0&&(a.push(t),e+=t.length-1)}else n.push(i[e]);e.lists=a.map((e=>new Ue(e,t))),e.wiki=n.join("\n")}(i),Me(i,t),se(i),new je(i)})),e._wiki=i,e._paragraphs=a},Je=function(e){let t=0,i=[],a=[];for(let n=e.indexOf("{");-1!==n&&n0?n++:n=e.indexOf("{",n+1)){let r=e[n];if("{"===r&&(t+=1),t>0){if("}"===r&&(t-=1,0===t)){a.push(r);let e=a.join("");a=[],/\{\{/.test(e)&&/\}\}/.test(e)&&i.push(e);continue}if(1===t&&"{"!==r&&"}"!==r){t=0,a=[];continue}a.push(r)}}return i},Xe=function(e){let t=null;return t=/^\{\{[^\n]+\|/.test(e)?(e.match(/^\{\{(.+?)\|/)||[])[1]:-1!==e.indexOf("\n")?(e.match(/^\{\{(.+)\n/)||[])[1]:(e.match(/^\{\{(.+?)\}\}$/)||[])[1],t&&(t=t.replace(/:.*/,""),t=Ee(t)),t||null},Qe=/\{\{/,et=function(e){return{body:e=e.replace(/#invoke:/,""),name:Xe(e),children:[]}},tt=function(e){let t=e.body.substr(2);return t=t.replace(/\}\}$/,""),e.children=Je(t),e.children=e.children.map(et),0===e.children.length||e.children.forEach((e=>{let t=e.body.substr(2);return Qe.test(t)?tt(e):null})),e},it=function(e){let t=Je(e);return t=t.map(et),t=t.map(tt),t},at=["anchor","defaultsort","use list-defined references","void","pp","pp-move-indef","pp-semi-indef","pp-vandalism","r","#tag","div col","pope list end","shipwreck list end","starbox end","end box","end","s-end"].reduce(((e,t)=>(e[t]=!0,e)),{});var nt={"gnf protein box":!0,"automatic taxobox":!0,"chembox ":!0,editnotice:!0,geobox:!0,hybridbox:!0,ichnobox:!0,infraspeciesbox:!0,mycomorphbox:!0,oobox:!0,"paraphyletic group":!0,speciesbox:!0,subspeciesbox:!0,"starbox short":!0,taxobox:!0,nhlteamseason:!0,"asian games bid":!0,"canadian federal election results":!0,"dc thomson comic strip":!0,"daytona 24 races":!0,edencharacter:!0,"moldova national football team results":!0,samurai:!0,protein:!0,"sheet authority":!0,"order-of-approx":!0,"bacterial labs":!0,"medical resources":!0,ordination:!0,"hockey team coach":!0,"hockey team gm":!0,"pro hockey team":!0,"hockey team player":!0,"hockey team start":!0,mlbbioret:!0};const rt=new RegExp("^(subst.)?("+g.join("|")+")(?=:| |\n|$)","i");g.forEach((e=>{nt[e]=!0}));const ot=/^infobox /i,st=/ infobox$/i,lt=/^year in [A-Z]/i,ct=function(e={}){let t=e.template.match(rt),i=e.template;t&&t[0]&&(i=i.replace(t[0],"")),i=i.trim();let a={template:"infobox",type:i,data:e};return delete a.data.template,delete a.data.list,a};let ut={imdb:"imdb name","imdb episodess":"imdb episode",localday:"currentday",localdayname:"currentdayname",localyear:"currentyear","birth date based on age at death":"birth based on age as of date","bare anchored list":"anchored list",cvt:"convert",cricon:"flagicon",sfrac:"frac",sqrt:"radic","unreferenced section":"unreferenced",redir:"redirect",sisterlinks:"sister project links","main article":"main"},pt={date:["byline","dateline"],citation:["cite","source","source-pr","source-science"],flagcountry:["cr","cr-rt"],trunc:["str left","str crop"],percentage:["pct","percentage"],rnd:["rndfrac","rndnear"],abbr:["tooltip","abbrv","define"],sfn:["sfnref","harvid","harvnb"],"birth date and age":["death date and age","bda"],currentmonth:["localmonth","currentmonthname","currentmonthabbrev"],currency:["monnaie","unité","nombre","nb","iso4217"],coord:["coor","coor title dms","coor title dec","coor dms","coor dm","coor dec"],"columns-list":["cmn","col-list","columnslist","collist"],nihongo:["nihongo2","nihongo3","nihongo-s","nihongo foot"],plainlist:["flatlist","plain list"],"winning percentage":["winpct","winperc"],"collapsible list":["nblist","nonbulleted list","ubl","ublist","ubt","unbullet","unbulleted list","unbulleted","unbulletedlist","vunblist"],"election box begin":["election box begin no change","election box begin no party","election box begin no party no change","election box inline begin","election box inline begin no change"],"election box candidate":["election box candidate for alliance","election box candidate minor party","election box candidate no party link no change","election box candidate with party link","election box candidate with party link coalition 1918","election box candidate with party link no change","election box inline candidate","election box inline candidate no change","election box inline candidate with party link","election box inline candidate with party link no change","election box inline incumbent"],"4teambracket":["2teambracket","4team2elimbracket","8teambracket","16teambracket","32teambracket","4roundbracket-byes","cwsbracket","nhlbracket","nhlbracket-reseed","4teambracket-nhl","4teambracket-ncaa","4teambracket-mma","4teambracket-mlb","16teambracket-two-reseeds","8teambracket-nhl","8teambracket-mlb","8teambracket-ncaa","8teambracket-afc","8teambracket-afl","8teambracket-tennis3","8teambracket-tennis5","16teambracket-nhl","16teambracket-nhl divisional","16teambracket-nhl-reseed","16teambracket-nba","16teambracket-swtc","16teambracket-afc","16teambracket-tennis3","16teambracket-tennis5"],start:["end","birth","death","start date","end date","birth date","death date","start date and age","end date and age","dob"],"start-date":["end-date","birth-date","death-date","birth-date and age","birth-date and given age","death-date and age","death-date and given age"],tl:["lts","t","tfd links","tiw","tltt","tetl","tsetl","ti","tic","tiw","tlt","ttl","twlh","tl2","tlu","demo","xpd","para","elc","xtag","mli","mlix","#invoke","url"]};Object.keys(z).forEach((e=>{ut["ipa-"+e]="ipa",ut["ipac-"+e]="ipac"})),Object.keys(pt).forEach((e=>{pt[e].forEach((t=>{ut[t]=e}))}));let mt={p1:0,p2:1,p3:2,resize:1,lang:1,"rtl-lang":1,l:2,h:1,sort:1};["defn","lino","finedetail","nobold","noitalic","nocaps","vanchor","rnd","date","taste","monthname","baseball secondary style","lang-de","nowrap","nobr","big","cquote","pull quote","smaller","midsize","larger","big","kbd","bigger","large","mono","strongbad","stronggood","huge","xt","xt2","!xt","xtn","xtd","dc","dcr","mxt","!mxt","mxtn","mxtd","bxt","!bxt","bxtn","bxtd","delink","pre","var","mvar","pre2","code","char","angle bracket","angbr","symb","key press"].forEach((e=>{mt[e]=0})),Object.keys(z).forEach((e=>{mt["lang-"+e]=0}));const dt=function(e){if(!e.numerator&&!e.denominator)return null;let t=Number(e.numerator)/Number(e.denominator);t*=100;let i=Number(e.decimals);return isNaN(i)&&(i=1),Number(t.toFixed(i))},ht=function(e=""){if("number"==typeof e)return e;e=(e=e.replace(/,/g,"")).replace(/−/g,"-");let t=Number(e);return isNaN(t)?e:t},gt=function(e){let t=e.match(/ipac?-(.+)/);return null!==t?!0===z.hasOwnProperty(t[1])?z[t[1]].english_title:t[1]:null},ft=e=>e.charAt(0).toUpperCase()+e.substring(1),kt={wikt:"wiktionary",commons:"commons",c:"commons",commonscat:"commonscat",n:"wikinews",q:"wikiquote",s:"wikisource",a:"wikiauthor",b:"wikibooks",voy:"wikivoyage",v:"wikiversity",d:"wikidata",species:"wikispecies",m:"meta",mw:"mediawiki"};var bt={ra:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},deg2hms:e=>(Pe(e,["degrees"]).degrees||"")+"°",hms2deg:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},decdeg:e=>{let t=Pe(e,["deg","min","sec","hem","rnd"]);return(t.deg||t.degrees)+"°"},sortname:e=>{let t=Pe(e,["first","last","target","sort"]),i=`${t.first||""} ${t.last||""}`;return i=i.trim(),t.nolink?t.target||i:(t.dab&&(i+=` (${t.dab})`,t.target&&(t.target+=` (${t.dab})`)),t.target?`[[${t.target}|${i}]]`:`[[${i}]]`)},"first word":e=>{let t=Pe(e,["text"]),i=t.text;return t.sep?i.split(t.sep)[0]:i.split(" ")[0]},trunc:e=>{let t=Pe(e,["str","len"]);return t.str.substr(0,t.len)},"str mid":e=>{let t=Pe(e,["str","start","end"]),i=parseInt(t.start,10)-1,a=parseInt(t.end,10);return t.str.substr(i,a)},reign:e=>{let t=Pe(e,["start","end"]);return`(r. ${t.start} – ${t.end})`},circa:e=>`c. ${Pe(e,["year"]).year}`,"decade link":e=>{let t=Pe(e,["year"]);return`${t.year}|${t.year}s`},decade:e=>{let t=Pe(e,["year"]),i=Number(t.year);return i=10*Math.floor(i/10),`${i}s`},century:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/100)+1,`${i}`},radic:e=>{let t=Pe(e,["after","before"]);return`${t.before||""}√${t.after||""}`},"medical cases chart/row":e=>e,oldstyledate:e=>{let t=Pe(e,["date","year"]);return t.year?t.date+" "+t.year:t.date},braces:e=>{let t=Pe(e,["text"]),i="";return t.list&&(i="|"+t.list.join("|")),"{{"+(t.text||"")+i+"}}"},hlist:e=>{let t=Pe(e);return t.list=t.list||[],t.list.join(" · ")},pagelist:e=>(Pe(e).list||[]).join(", "),catlist:e=>(Pe(e).list||[]).join(", "),"br separated entries":e=>(Pe(e).list||[]).join("\n\n"),"comma separated entries":e=>(Pe(e).list||[]).join(", "),"anchored list":e=>{let t=Pe(e).list||[];return t=t.map(((e,t)=>`${t+1}. ${e}`)),t.join("\n\n")},"bulleted list":e=>{let t=Pe(e).list||[];return t=t.filter((e=>e)),t=t.map((e=>"• "+e)),t.join("\n\n")},plainlist:e=>{let t=(e=Oe(e)).split("|").slice(1);return t=t.join("|").split(/\n ?\* ?/),t=t.filter((e=>e)),t.join("\n\n")},term:e=>`${Pe(e,["term"]).term}:`,linum:e=>{let t=Pe(e,["num","text"]);return`${t.num}. ${t.text}`},"block indent":e=>{let t=Pe(e);return t[1]?"\n"+t[1]+"\n":""},lbs:e=>{let t=Pe(e,["text"]);return`[[${t.text} Lifeboat Station|${t.text}]]`},lbc:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}-class]]`},lbb:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}]]`},"#dateformat":e=>(e=e.replace(/:/,"|"),Pe(e,["date","format"]).date),lc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toLowerCase()),uc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toUpperCase()),lcfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toLowerCase()+t.substr(1):""},ucfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toUpperCase()+t.substr(1):""},padleft:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padStart(t.num,t.str||"0")},padright:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padEnd(t.num,t.str||"0")},abbrlink:e=>{let t=Pe(e,["abbr","page"]);return t.page?`[[${t.page}|${t.abbr}]]`:`[[${t.abbr}]]`},own:e=>{let t=Pe(e,["author"]),i="Own work";return t.author&&(i+=" by "+t.author),i},formatnum:e=>{e=e.replace(/:/,"|");let t=Pe(e,["number"]).number||"";return t=t.replace(/,/g,""),Number(t).toLocaleString()||""},frac:e=>{let t=Pe(e,["a","b","c"]);return t.c?`${t.a} ${t.b}/${t.c}`:t.b?`${t.a}/${t.b}`:`1/${t.b}`},convert:e=>{let t=Pe(e,["num","two","three","four"]);return"-"===t.two||"to"===t.two||"and"===t.two?t.four?`${t.num} ${t.two} ${t.three} ${t.four}`:`${t.num} ${t.two} ${t.three}`:`${t.num} ${t.two}`},tl:e=>{let t=Pe(e,["first","second"]);return t.second||t.first},won:e=>{let t=Pe(e,["text"]);return t.place||t.text||ft(t.template)},tag:e=>{let t=Pe(e,["tag","open"]);const i={span:!0,div:!0,p:!0};return t.open&&"pair"!==t.open?"":i[t.tag]?t.content||"":`<${t.tag} ${t.attribs||""}>${t.content||""}`},plural:e=>{e=e.replace(/plural:/,"plural|");let t=Pe(e,["num","word"]),i=Number(t.num),a=t.word;return 1!==i&&(/.y$/.test(a)?a=a.replace(/y$/,"ies"):a+="s"),i+" "+a},dec:e=>{let t=Pe(e,["degrees","minutes","seconds"]),i=(t.degrees||0)+"°";return t.minutes&&(i+=t.minutes+"′"),t.seconds&&(i+=t.seconds+"″"),i},val:e=>{let t=Pe(e,["number","uncertainty"]),i=t.number;i&&Number(i)&&(i=Number(i).toLocaleString());let a=i||"";return t.p&&(a=t.p+a),t.s&&(a=t.s+a),(t.u||t.ul||t.upl)&&(a=a+" "+(t.u||t.ul||t.upl)),a},percentage:e=>{let t=Pe(e,["numerator","denominator","decimals"]),i=dt(t);return null===i?"":i+"%"},small:e=>{let t=Pe(e);return t.list&&t.list[0]?t.list[0]:""},"percent-done":e=>{let t=Pe(e,["done","total","digits"]),i=dt({numerator:t.done,denominator:t.total,decimals:t.digits});return null===i?"":`${t.done} (${i}%) done`}},wt=[["🇦🇩","and","andorra"],["🇦🇪","are","united arab emirates"],["🇦🇫","afg","afghanistan"],["🇦🇬","atg","antigua and barbuda"],["🇦🇮","aia","anguilla"],["🇦🇱","alb","albania"],["🇦🇲","arm","armenia"],["🇦🇴","ago","angola"],["🇦🇶","ata","antarctica"],["🇦🇷","arg","argentina"],["🇦🇸","asm","american samoa"],["🇦🇹","aut","austria"],["🇦🇺","aus","australia"],["🇦🇼","abw","aruba"],["🇦🇽","ala","åland islands"],["🇦🇿","aze","azerbaijan"],["🇧🇦","bih","bosnia and herzegovina"],["🇧🇧","brb","barbados"],["🇧🇩","bgd","bangladesh"],["🇧🇪","bel","belgium"],["🇧🇫","bfa","burkina faso"],["🇧🇬","bgr","bulgaria"],["🇧🇬","bul","bulgaria"],["🇧🇭","bhr","bahrain"],["🇧🇮","bdi","burundi"],["🇧🇯","ben","benin"],["🇧🇱","blm","saint barthélemy"],["🇧🇲","bmu","bermuda"],["🇧🇳","brn","brunei darussalam"],["🇧🇴","bol","bolivia"],["🇧🇶","bes","bonaire, sint eustatius and saba"],["🇧🇷","bra","brazil"],["🇧🇸","bhs","bahamas"],["🇧🇹","btn","bhutan"],["🇧🇻","bvt","bouvet island"],["🇧🇼","bwa","botswana"],["🇧🇾","blr","belarus"],["🇧🇿","blz","belize"],["🇨🇦","can","canada"],["🇨🇨","cck","cocos (keeling) islands"],["🇨🇩","cod","congo"],["🇨🇫","caf","central african republic"],["🇨🇬","cog","congo"],["🇨🇭","che","switzerland"],["🇨🇮","civ","côte d'ivoire"],["🇨🇰","cok","cook islands"],["🇨🇱","chl","chile"],["🇨🇲","cmr","cameroon"],["🇨🇳","chn","china"],["🇨🇴","col","colombia"],["🇨🇷","cri","costa rica"],["🇨🇺","cub","cuba"],["🇨🇻","cpv","cape verde"],["🇨🇼","cuw","curaçao"],["🇨🇽","cxr","christmas island"],["🇨🇾","cyp","cyprus"],["🇨🇿","cze","czech republic"],["🇩🇪","deu","germany"],["🇩🇪","ger","germany"],["🇩🇯","dji","djibouti"],["🇩🇰","dnk","denmark"],["🇩🇲","dma","dominica"],["🇩🇴","dom","dominican republic"],["🇩🇿","dza","algeria"],["🇪🇨","ecu","ecuador"],["🇪🇪","est","estonia"],["🇪🇬","egy","egypt"],["🇪🇭","esh","western sahara"],["🇪🇷","eri","eritrea"],["🇪🇸","esp","spain"],["🇪🇹","eth","ethiopia"],["🇫🇮","fin","finland"],["🇫🇯","fji","fiji"],["🇫🇰","flk","falkland islands (malvinas)"],["🇫🇲","fsm","micronesia"],["🇫🇴","fro","faroe islands"],["🇫🇷","fra","france"],["🇬🇦","gab","gabon"],["🇬🇧","gbr","united kingdom"],["🇬🇩","grd","grenada"],["🇬🇫","guf","french guiana"],["🇬🇬","ggy","guernsey"],["🇬🇭","gha","ghana"],["🇬🇮","gib","gibraltar"],["🇬🇱","grl","greenland"],["🇬🇲","gmb","gambia"],["🇬🇳","gin","guinea"],["🇬🇵","glp","guadeloupe"],["🇬🇶","gnq","equatorial guinea"],["🇬🇷","grc","greece"],["🇬🇸","sgs","south georgia"],["🇬🇹","gtm","guatemala"],["🇬🇺","gum","guam"],["🇬🇼","gnb","guinea-bissau"],["🇬🇾","guy","guyana"],["🇭🇰","hkg","hong kong"],["🇭🇲","hmd","heard island and mcdonald islands"],["🇭🇳","hnd","honduras"],["🇭🇷","hrv","croatia"],["🇭🇹","hti","haiti"],["🇭🇺","hun","hungary"],["🇮🇩","idn","indonesia"],["🇮🇪","irl","ireland"],["🇮🇱","isr","israel"],["🇮🇲","imn","isle of man"],["🇮🇳","ind","india"],["🇮🇴","iot","british indian ocean territory"],["🇮🇶","irq","iraq"],["🇮🇷","irn","iran"],["🇮🇸","isl","iceland"],["🇮🇹","ita","italy"],["🇯🇪","jey","jersey"],["🇯🇲","jam","jamaica"],["🇯🇴","jor","jordan"],["🇯🇵","jpn","japan"],["🇰🇪","ken","kenya"],["🇰🇬","kgz","kyrgyzstan"],["🇰🇭","khm","cambodia"],["🇰🇮","kir","kiribati"],["🇰🇲","com","comoros"],["🇰🇳","kna","saint kitts and nevis"],["🇰🇵","prk","north korea"],["🇰🇷","kor","south korea"],["🇰🇼","kwt","kuwait"],["🇰🇾","cym","cayman islands"],["🇰🇿","kaz","kazakhstan"],["🇱🇦","lao","lao people's democratic republic"],["🇱🇧","lbn","lebanon"],["🇱🇨","lca","saint lucia"],["🇱🇮","lie","liechtenstein"],["🇱🇰","lka","sri lanka"],["🇱🇷","lbr","liberia"],["🇱🇸","lso","lesotho"],["🇱🇹","ltu","lithuania"],["🇱🇺","lux","luxembourg"],["🇱🇻","lva","latvia"],["🇱🇾","lby","libya"],["🇲🇦","mar","morocco"],["🇲🇨","mco","monaco"],["🇲🇩","mda","moldova"],["🇲🇪","mne","montenegro"],["🇲🇫","maf","saint martin (french part)"],["🇲🇬","mdg","madagascar"],["🇲🇭","mhl","marshall islands"],["🇲🇰","mkd","macedonia"],["🇲🇱","mli","mali"],["🇲🇲","mmr","myanmar"],["🇲🇳","mng","mongolia"],["🇲🇴","mac","macao"],["🇲🇵","mnp","northern mariana islands"],["🇲🇶","mtq","martinique"],["🇲🇷","mrt","mauritania"],["🇲🇸","msr","montserrat"],["🇲🇹","mlt","malta"],["🇲🇺","mus","mauritius"],["🇲🇻","mdv","maldives"],["🇲🇼","mwi","malawi"],["🇲🇽","mex","mexico"],["🇲🇾","mys","malaysia"],["🇲🇿","moz","mozambique"],["🇳🇦","nam","namibia"],["🇳🇨","ncl","new caledonia"],["🇳🇪","ner","niger"],["🇳🇫","nfk","norfolk island"],["🇳🇬","nga","nigeria"],["🇳🇮","nic","nicaragua"],["🇳🇱","nld","netherlands"],["🇳🇴","nor","norway"],["🇳🇵","npl","nepal"],["🇳🇷","nru","nauru"],["🇳🇺","niu","niue"],["🇳🇿","nzl","new zealand"],["🇴🇲","omn","oman"],["🇵🇦","pan","panama"],["🇵🇪","per","peru"],["🇵🇫","pyf","french polynesia"],["🇵🇬","png","papua new guinea"],["🇵🇭","phl","philippines"],["🇵🇰","pak","pakistan"],["🇵🇱","pol","poland"],["🇵🇲","spm","saint pierre and miquelon"],["🇵🇳","pcn","pitcairn"],["🇵🇷","pri","puerto rico"],["🇵🇸","pse","palestinian territory"],["🇵🇹","prt","portugal"],["🇵🇼","plw","palau"],["🇵🇾","pry","paraguay"],["🇶🇦","qat","qatar"],["🇷🇪","reu","réunion"],["🇷🇴","rou","romania"],["🇷🇸","srb","serbia"],["🇷🇺","rus","russia"],["🇷🇼","rwa","rwanda"],["🇸🇦","sau","saudi arabia"],["🇸🇧","slb","solomon islands"],["🇸🇨","syc","seychelles"],["🇸🇩","sdn","sudan"],["🇸🇪","swe","sweden"],["🇸🇬","sgp","singapore"],["🇸🇭","shn","saint helena, ascension and tristan da cunha"],["🇸🇮","svn","slovenia"],["🇸🇯","sjm","svalbard and jan mayen"],["🇸🇰","svk","slovakia"],["🇸🇱","sle","sierra leone"],["🇸🇲","smr","san marino"],["🇸🇳","sen","senegal"],["🇸🇴","som","somalia"],["🇸🇷","sur","suriname"],["🇸🇸","ssd","south sudan"],["🇸🇹","stp","sao tome and principe"],["🇸🇻","slv","el salvador"],["🇸🇽","sxm","sint maarten (dutch part)"],["🇸🇾","syr","syrian arab republic"],["🇸🇿","swz","swaziland"],["🇹🇨","tca","turks and caicos islands"],["🇹🇩","tcd","chad"],["🇹🇫","atf","french southern territories"],["🇹🇬","tgo","togo"],["🇹🇭","tha","thailand"],["🇹🇯","tjk","tajikistan"],["🇹🇰","tkl","tokelau"],["🇹🇱","tls","timor-leste"],["🇹🇲","tkm","turkmenistan"],["🇹🇳","tun","tunisia"],["🇹🇴","ton","tonga"],["🇹🇷","tur","turkey"],["🇹🇹","tto","trinidad and tobago"],["🇹🇻","tuv","tuvalu"],["🇹🇼","twn","taiwan"],["🇹🇿","tza","tanzania"],["🇺🇦","ukr","ukraine"],["🇺🇬","uga","uganda"],["🇺🇲","umi","united states minor outlying islands"],["🇺🇸","us","united states"],["🇺🇸","usa","united states"],["🇺🇾","ury","uruguay"],["🇺🇿","uzb","uzbekistan"],["🇻🇦","vat","vatican city"],["🇻🇨","vct","saint vincent and the grenadines"],["🇻🇪","ven","venezuela"],["🇻🇬","vgb","virgin islands, british"],["🇻🇮","vir","virgin islands, u.s."],["🇻🇳","vnm","viet nam"],["🇻🇺","vut","vanuatu"],["🇼🇫","wlf","wallis and futuna"],["🇼🇸","wsm","samoa"],["🇾🇪","yem","yemen"],["🇾🇹","myt","mayotte"],["🇿🇦","zaf","south africa"],["🇿🇲","zmb","zambia"],["🇿🇼 ","zwe","zimbabwe"],["🇺🇳","un","united nations"],["🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿","eng","england"],["🏴󠁧󠁢󠁳󠁣󠁴󠁿","sct","scotland"],["🏴󠁧󠁢󠁷󠁬󠁳󠁿","wal","wales"],["🇪🇺","eu","european union"]];let yt={flag:e=>{let t=Pe(e,["flag","variant"]),i=t.flag||"";t.flag=(t.flag||"").toLowerCase();let a=wt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${a[0]||""} [[${a[2]}|${i}]]`},flagcountry:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=wt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} [[${i[2]}]]`},flagcu:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=wt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} ${i[2]}`},flagicon:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=wt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`[[${i[2]}|${i[0]}]]`:""},flagdeco:e=>{let t=Pe(e,["flag","variant"]);return t.flag=(t.flag||"").toLowerCase(),(wt.find((e=>t.flag===e[1]||t.flag===e[2]))||[])[0]||""},fb:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=wt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${i[2]} national football team|${i[2]}]]`:""},fbicon:e=>{let t=Pe(e,["flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=wt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?` [[${i[2]} national football team|${i[0]}]]`:""},flagathlete:e=>{let t=Pe(e,["name","flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=wt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${t.name||""}]] (${i[1].toUpperCase()})`:`[[${t.name||""}]]`}};wt.forEach((e=>{yt[e[1]]=()=>e[0]}));let $t={};["rh","rh2","yes","no","maybe","eliminated","lost","safe","active","site active","coming soon","good","won","nom","sho","longlisted","tba","success","operational","failure","partial","regional","maybecheck","partial success","partial failure","okay","yes-no","some","nonpartisan","pending","unofficial","unofficial2","usually","rarely","sometimes","any","varies","black","non-album single","unreleased","unknown","perhaps","depends","included","dropped","terminated","beta","table-experimental","free","proprietary","nonfree","needs","nightly","release-candidate","planned","scheduled","incorrect","no result","cmain","calso starring","crecurring","cguest","not yet","optional"].forEach((e=>{$t[e]=e=>{let t=Pe(e,["text"]);return t.text||ft(t.template)}}));[["active fire","Active"],["site active","Active"],["site inactive","Inactive"],["yes2",""],["no2",""],["ya","✅"],["na","❌"],["nom","Nominated"],["sho","Shortlisted"],["tba","TBA"],["maybecheck","✔️"],["okay","Neutral"],["n/a","N/A"],["sdash","—"],["dunno","?"],["draw",""],["cnone",""],["nocontest",""]].forEach((e=>{$t[e[0]]=t=>Pe(t,["text"]).text||e[1]}));var xt=Object.assign({},{"·":"·",dot:"·",middot:"·","•":" • ",",":",","1/2":"1⁄2","1/3":"1⁄3","2/3":"2⁄3","1/4":"1⁄4","3/4":"3⁄4","–":"–",ndash:"–","en dash":"–","spaced ndash":" – ","—":"—",mdash:"—","em dash":"—","number sign":"#",ibeam:"I","&":"&",";":";",ampersand:"&",snds:" – ",snd:" – ","^":" ","!":"|","\\":" /","`":"`","=":"=",bracket:"[","[":"[","*":"*",asterisk:"*","long dash":"———",clear:"\n\n","h.":"ḥ",profit:"▲",loss:"▼",gain:"▲"},mt,bt,yt,$t);let vt={};["goodreads author","twitter","facebook","instagram","tumblr","pinterest","espn nfl","espn nhl","espn fc","hockeydb","fifa player","worldcat","worldcat id","nfl player","ted speaker","playmate"].forEach((e=>{vt[e]=["id","name"]}));let jt={};["imdb title","imdb name","imdb episode","imdb event","afi film","allmovie title","allgame","tcmdb title","discogs artist","discogs label","discogs release","discogs master","librivox author","musicbrainz artist","musicbrainz label","musicbrainz recording","musicbrainz release","musicbrainz work","youtube","goodreads book","dmoz"].forEach((e=>{jt[e]=["id","title","description","section"]}));var _t={ipa:(e,t)=>{let i=Pe(e,["transcription","lang","audio"]);return i.lang=gt(i.template),i.template="ipa",t.push(i),""},ipac:(e,t)=>{let i=Pe(e);return i.transcription=(i.list||[]).join(","),delete i.list,i.lang=gt(i.template),i.template="ipac",t.push(i),""},quote:(e,t)=>{let i=Pe(e,["text","author"]);if(t.push(i),i.text){let e=`"${i.text}"`;return i.author&&(e+="\n\n",e+=` - ${i.author}`),e+"\n"}return""},"cite gnis":(e,t)=>{let i=Pe(e,["id","name","type"]);return i.type="gnis",i.template="citation",t.push(i),""},"spoken wikipedia":(e,t)=>{let i=Pe(e,["file","date"]);return i.template="audio",t.push(i),""},yel:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`yellow: ${i.min||""}'`:""},subon:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub on: ${i.min||""}'`:""},suboff:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub off: ${i.min||""}'`:""},sfn:(e,t,i,a)=>{let n=Pe(e,["author","year","location"]);return a&&(n.name=n.template,n.teplate=a),t.push(n),""},redirect:(e,t)=>{let i=Pe(e,["redirect"]),a=i.list||[],n=[];for(let e=0;e{let i=Pe(e),a={};Object.keys(kt).forEach((e=>{!0===i.hasOwnProperty(e)&&(a[kt[e]]=i[e])}));let n={template:"sister project links",links:a};return t.push(n),""},"subject bar":(e,t)=>{let i=Pe(e);Object.keys(i).forEach((e=>{kt.hasOwnProperty(e)&&(i[kt[e]]=i[e],delete i[e])}));let a={template:"subject bar",links:i};return t.push(a),""},gallery:(e,t)=>{let i=Pe(e),a=(i.list||[]).filter((e=>/^ *File ?:/.test(e)));return a=a.map((e=>new j({file:e}).json())),i={template:"gallery",images:a},t.push(i),""},sky:(e,t)=>{let i=Pe(e,["asc_hours","asc_minutes","asc_seconds","dec_sign","dec_degrees","dec_minutes","dec_seconds","distance"]),a={template:"sky",ascension:{hours:i.asc_hours,minutes:i.asc_minutes,seconds:i.asc_seconds},declination:{sign:i.dec_sign,degrees:i.dec_degrees,minutes:i.dec_minutes,seconds:i.dec_seconds},distance:i.distance};return t.push(a),""},"medical cases chart":(e,t)=>{let i=["date","deathsExpr","recoveriesExpr","casesExpr","4thExpr","5thExpr","col1","col1Change","col2","col2Change"],a=Pe(e);a.data=a.data||"";let n=a.data.split("\n").map((e=>{let t=e.split(";"),a={options:new Map},n=0;for(let e=0;e{let i=Pe(e);i.x&&(i.x=i.x.split(",").map((e=>e.trim()))),i.y&&(i.y=i.y.split(",").map((e=>e.trim())));let a=1;for(;i["y"+a];)i["y"+a]=i["y"+a].split(",").map((e=>e.trim())),a+=1;return t.push(i),""},"historical populations":(e,t)=>{let i=Pe(e);i.list=i.list||[];let a=[];for(let e=0;e{const i=/^jan /i,a=/^year /i;let n=Pe(e);const r=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];let o={},s=Object.keys(n).filter((e=>i.test(e)));s=s.map((e=>e.replace(i,""))),s.forEach((e=>{o[e]=[],r.forEach((t=>{let i=`${t} ${e}`;if(n.hasOwnProperty(i)){let t=ht(n[i]);delete n[i],o[e].push(t)}}))})),n.byMonth=o;let l={};return Object.keys(n).forEach((e=>{if(a.test(e)){let t=e.replace(a,"");l[t]=n[e],delete n[e]}})),n.byYear=l,t.push(n),""},"weather box/concise c":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>ht(e))),i.byMonth={"high c":i.list.slice(0,12),"low c":i.list.slice(12,24),"rain mm":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"weather box/concise f":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>ht(e))),i.byMonth={"high f":i.list.slice(0,12),"low f":i.list.slice(12,24),"rain inch":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"climate chart":(e,t)=>{let i=Pe(e).list||[],a=i[0],n=i[38];i=i.slice(1),i=i.map((e=>(e&&"−"===e[0]&&(e=e.replace(/−/,"-")),e)));let r=[];for(let e=0;e<36;e+=3)r.push({low:ht(i[e]),high:ht(i[e+1]),precip:ht(i[e+2])});let o={template:"climate chart",data:{title:a,source:n,months:r}};return t.push(o),""}};let zt={"find a grave":["id","name","work","last","first","date","accessdate"],congbio:["id","name","date"],"hollywood walk of fame":["name"],"wide image":["file","width","caption"],audio:["file","text","type"],rp:["page"],"short description":["description"],"coord missing":["region"],unreferenced:["date"],"taxon info":["taxon","item"],"portuguese name":["first","second","suffix"],geo:["lat","lon","zoom"],hatnote:["text"]};zt=Object.assign(zt,vt,jt,_t);var Ot=zt;var Et={mlbplayer:{props:["number","name","il"],out:"name"},syntaxhighlight:{props:[],out:"code"},samp:{props:["1"],out:"1"},sub:{props:["text"],out:"text"},sup:{props:["text"],out:"text"},chem2:{props:["equation"],out:"equation"},ill:{props:["text","lan1","text1","lan2","text2"],out:"text"},abbr:{props:["abbr","meaning","ipa"],out:"abbr"}};let St={math:(e,t)=>{let i=Pe(e,["formula"]);return t.push(i),"\n\n"+(i.formula||"")+"\n\n"},legend:(e,t)=>{let i=Pe(e,["color","label"]);return t.push(i),e},isbn:(e,t)=>{let i=Pe(e,["id","id2","id3"]);return t.push(i),"ISBN: "+(i.id||"")},"based on":(e,t)=>{let i=Pe(e,["title","author"]);return t.push(i),`${i.title} by ${i.author||""}`},"bbl to t":(e,t)=>{let i=Pe(e,["barrels"]);return t.push(i),"0"===i.barrels?i.barrels+" barrel":i.barrels+" barrels"},mpc:(e,t)=>{let i=Pe(e,["number","text"]);return t.push(i),`[https://minorplanetcenter.net/db_search/show_object?object_id=P/2011+NO1 ${i.text||i.number}]`},pengoal:(e,t)=>(t.push({template:"pengoal"}),"✅"),penmiss:(e,t)=>(t.push({template:"penmiss"}),"❌"),"ordered list":(e,t)=>{let i=Pe(e);return t.push(i),i.list=i.list||[],i.list.map(((e,t)=>`${t+1}. ${e}`)).join("\n\n")},"title year":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b[0-9]{4}\b/);if(e)return e[0]}return r.nomatch||""},"title century":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)(st|nd|rd|th)\b/);if(e)return e[1]||""}return r.nomatch||""},"title decade":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)s\b/);if(e)return e[1]||""}return r.nomatch||""},nihongo:(e,t)=>{let i=Pe(e,["english","kanji","romaji","extra"]);t.push(i);let a=i.english||i.romaji||"";return i.kanji&&(a+=` (${i.kanji})`),a},marriage:(e,t)=>{let i=Pe(e,["spouse","from","to","end"]);t.push(i);let a=i.spouse||"";return i.from&&(i.to?a+=` (m. ${i.from}-${i.to})`:a+=` (m. ${i.from})`),a},"sent off":(e,t)=>{let i=Pe(e,["cards"]),a={template:"sent off",cards:i.cards,minutes:i.list||[]};return t.push(a),"sent off: "+a.minutes.map((e=>e+"'")).join(", ")},transl:(e,t)=>{let i=Pe(e,["lang","text","text2"]);return i.text2&&(i.iso=i.text,i.text=i.text2,delete i.text2),t.push(i),i.text||""},"collapsible list":(e,t)=>{let i=Pe(e);t.push(i);let a="";if(i.title&&(a+=`'''${i.title}'''\n\n`),!i.list){i.list=[];for(let e=1;e<10;e+=1)i[e]&&(i.list.push(i[e]),delete i[e])}return i.list=i.list.filter((e=>e)),a+=i.list.join("\n\n"),a},"columns-list":(e,t)=>{let i=((Pe(e).list||[])[0]||"").split(/\n/).filter((e=>e));return i=i.map((e=>e.replace(/\*/,""))),t.push({template:"columns-list",list:i}),i=i.map((e=>"• "+e)),i.join("\n\n")},height:(e,t)=>{let i=Pe(e);t.push(i);let a=[];return["m","cm","ft","in"].forEach((e=>{!0===i.hasOwnProperty(e)&&a.push(i[e]+e)})),a.join(" ")},sic:(e,t)=>{let i=Pe(e,["one","two","three"]),a=(i.one||"")+(i.two||"");return"?"===i.one&&(a=(i.two||"")+(i.three||"")),t.push({template:"sic",word:a}),"y"===i.nolink?a:`${a} [sic]`},inrconvert:(e,t)=>{let i=Pe(e,["rupee_value","currency_formatting"]);t.push(i);const a={k:1e3,m:1e6,b:1e9,t:1e12,l:1e5,c:1e7,lc:1e12};if(i.currency_formatting){let e=a[i.currency_formatting]||1;i.rupee_value=i.rupee_value*e}return`inr ${i.rupee_value||""}`},frac:(e,t)=>{let i=Pe(e,["a","b","c"]),a={template:"sfrac"};return i.c?(a.integer=i.a,a.numerator=i.b,a.denominator=i.c):i.b?(a.numerator=i.a,a.denominator=i.b):(a.numerator=1,a.denominator=i.a),t.push(a),a.integer?`${a.integer} ${a.numerator}⁄${a.denominator}`:`${a.numerator}⁄${a.denominator}`},"winning percentage":(e,t)=>{let i=Pe(e,["wins","losses","ties"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=Number(i.ties)||0,o=a+n+r;"y"===i.ignore_ties&&(r=0),r&&(a+=r/2);let s=dt({numerator:a,denominator:o,decimals:1});return null===s?"":"."+10*s},winlosspct:(e,t)=>{let i=Pe(e,["wins","losses"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=dt({numerator:a,denominator:a+n,decimals:1});return null===r?"":`${a||0} || ${n||0} || ${"."+10*r||"-"}`},"video game release":(e,t)=>{let i=["region","date","region2","date2","region3","date3","region4","date4"],a=Pe(e,i),n={template:"video game release",releases:[]};for(let e=0;e`${e.region}: ${e.date||""}`)).join("\n\n")+"\n"},uss:(e,t)=>{let i=Pe(e,["name","id"]);return t.push(i),i.id?`[[USS ${i.name} (${i.id})|USS ''${i.name}'' (${i.id})]]`:`[[USS ${i.name}|USS ''${i.name}'']]`},blockquote:(e,t)=>{let i=Pe(e,["text","author","title","source","character"]);t.push(i);let a=i.text;a||(i.list=i.list||[],a=i.list[0]||"");let n=a.replace(/"/g,"'");return n='"'+n+'"',n}};const Ct={"£":"GB£","¥":"¥","৳":"৳","₩":"₩","€":"€","₱":"₱","₹":"₹","₽":"₽","cn¥":"CN¥","gb£":"GB£","india rs":"₹","indian rupee symbol":"₹","indian rupee":"₹","indian rupees":"₹","philippine peso":"₱","russian ruble":"₽","SK won":"₩","turkish lira":"TRY",a$:"A$",au$:"A$",aud:"A$",bdt:"BDT",brl:"BRL",ca$:"CA$",cad:"CA$",chf:"CHF",cny:"CN¥",czk:"czk",dkk:"dkk",dkk2:"dkk",euro:"€",gbp:"GB£",hk$:"HK$",hkd:"HK$",ils:"ILS",inr:"₹",jpy:"¥",myr:"MYR",nis:"ILS",nok:"NOK",nok2:"NOK",nz$:"NZ$",nzd:"NZ$",peso:"peso",pkr:"₨",r$:"BRL",rmb:"CN¥",rub:"₽",ruble:"₽",rupee:"₹",s$:"sgd",sek:"SEK",sek2:"SEK",sfr:"CHF",sgd:"sgd",shekel:"ILS",sheqel:"ILS",ttd:"TTD",us$:"US$",usd:"US$",yen:"¥",zar:"R"},qt=(e,t)=>{let i=Pe(e,["amount","code"]);t.push(i);let a=i.template||"";"currency"===a?(a=i.code,a||(i.code=a="usd")):""!==a&&"monnaie"!==a&&"unité"!==a&&"nombre"!==a&&"nb"!==a||(a=i.code),a=(a||"").toLowerCase(),"us"===a?i.code=a="usd":"uk"===a&&(i.code=a="gbp");let n=`${Ct[a]||""}${i.amount||""}`;return i.code&&!Ct[i.code.toLowerCase()]&&(n+=" "+i.code),n};let Nt={currency:qt};Object.keys(Ct).forEach((e=>{Nt[e]=qt}));const Lt=function(e){let t=e%10,i=e%100;return 1===t&&11!==i?e+"st":2===t&&12!==i?e+"nd":3===t&&13!==i?e+"rd":e+"th"},Pt=864e5,At=function(e){return new Date(`${e.year}-${e.month||0}-${e.date||1}`).getTime()},Dt=function(e,t){e=At(e);let i=(t=At(t))-e,a={},n=Math.floor(i/31536e6);n>0&&(a.years=n,i-=31536e6*a.years);let r=Math.floor(i/2592e6);r>0&&(a.months=r,i-=2592e6*a.months);let o=Math.floor(i/Pt);return o>0&&(a.days=o),a},Tt=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],It=[void 0,"January","February","March","April","May","June","July","August","September","October","November","December"],Mt=It.reduce(((e,t,i)=>(0===i||(e[t.toLowerCase()]=i),e)),{}),Rt=function(e){let t={},i=["year","month","date","hour","minute","second"];for(let a=0;a{let i=Pe(e,["year","month","date","hour","minute","second","timezone"]),a=Rt([i.year,i.month,i.date||i.day]);return i.text=Bt(a),i.timezone&&("Z"===i.timezone&&(i.timezone="UTC"),i.text+=` (${i.timezone})`),i.hour&&i.minute&&(i.second?i.text=`${i.hour}:${i.minute}:${i.second}, `+i.text:i.text=`${i.hour}:${i.minute}, `+i.text),i.text&&t.push(Ft(i)),i.text},natural_date:(e,t)=>{let i=Pe(e,["text"]).text||"",a={};if(/^[0-9]{4}$/.test(i))a.year=parseInt(i,10);else{let e=i.replace(/[a-z]+\/[a-z]+/i,"");e=e.replace(/[0-9]+:[0-9]+(am|pm)?/i,"");let t=new Date(e);!1===isNaN(t.getTime())&&(a.year=t.getFullYear(),a.month=t.getMonth()+1,a.date=t.getDate())}return t.push(Ft(a)),i.trim()},one_year:(e,t)=>{let i=Pe(e,["year"]),a=Number(i.year);return t.push(Ft({year:a})),String(a)},two_dates:(e,t)=>{let i=Pe(e,["b","birth_year","birth_month","birth_date","death_year","death_month","death_date"]);if(i.b&&"b"===i.b.toLowerCase()){let e=Rt([i.birth_year,i.birth_month,i.birth_date]);return t.push(Ft(e)),Bt(e)}let a=Rt([i.death_year,i.death_month,i.death_date]);return t.push(Ft(a)),Bt(a)},age:e=>{let t=Kt(e);return Dt(t.from,t.to).years||0},"diff-y":e=>{let t=Kt(e),i=Dt(t.from,t.to);return 1===i.years?i.years+" year":(i.years||0)+" years"},"diff-ym":e=>{let t=Kt(e),i=Dt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),a.join(", ")},"diff-ymd":e=>{let t=Kt(e),i=Dt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-yd":e=>{let t=Kt(e),i=Dt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-d":e=>{let t=Kt(e),i=Dt(t.from,t.to),a=[];return i.days+=365*(i.years||0),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")}},Zt=["January","February","March","April","May","June","July","August","September","October","November","December"];var Ht={currentday:()=>{let e=new Date;return String(e.getDate())},currentdayname:()=>{let e=new Date;return Tt[e.getDay()]},currentmonth:()=>{let e=new Date;return Zt[e.getMonth()]},currentyear:()=>{let e=new Date;return String(e.getFullYear())},monthyear:()=>{let e=new Date;return Zt[e.getMonth()]+" "+e.getFullYear()},"monthyear-1":()=>{let e=new Date;return e.setMonth(e.getMonth()-1),Zt[e.getMonth()]+" "+e.getFullYear()},"monthyear+1":()=>{let e=new Date;return e.setMonth(e.getMonth()+1),Zt[e.getMonth()]+" "+e.getFullYear()},"time ago":e=>function(e){let t=new Date(e);if(isNaN(t.getTime()))return"";let i=(new Date).getTime()-t.getTime(),a="ago";i<0&&(a="from now",i=Math.abs(i));let n=i/1e3/60/60/24;return n<365?Number(n)+" days "+a:Number(n/365)+" years "+a}(Pe(e,["date","fmt"]).date),"birth date and age":(e,t)=>{let i=Pe(e,["year","month","day"]);return i.year&&/[a-z]/i.test(i.year)?Wt.natural_date(e,t):(t.push(i),i=Rt([i.year,i.month,i.day]),Bt(i))},"birth year and age":(e,t)=>{let i=Pe(e,["birth_year","birth_month"]);if(i.death_year&&/[a-z]/i.test(i.death_year))return Wt.natural_date(e,t);t.push(i);let a=(new Date).getFullYear()-parseInt(i.birth_year,10);i=Rt([i.birth_year,i.birth_month]);let n=Bt(i);return a&&(n+=` (age ${a})`),n},"death year and age":(e,t)=>{let i=Pe(e,["death_year","birth_year","death_month"]);return i.death_year&&/[a-z]/i.test(i.death_year)?Wt.natural_date(e,t):(t.push(i),i=Rt([i.death_year,i.death_month]),Bt(i))},"birth date and age2":(e,t)=>{let i=Pe(e,["at_year","at_month","at_day","birth_year","birth_month","birth_day"]);return t.push(i),i=Rt([i.birth_year,i.birth_month,i.birth_day]),Bt(i)},"birth based on age as of date":(e,t)=>{let i=Pe(e,["age","year","month","day"]);t.push(i);let a=parseInt(i.age,10),n=parseInt(i.year,10)-a;return n&&a?`${n} (age ${i.age})`:`(age ${i.age})`},"death date and given age":(e,t)=>{let i=Pe(e,["year","month","day","age"]);t.push(i),i=Rt([i.year,i.month,i.day]);let a=Bt(i);return i.age&&(a+=` (age ${i.age})`),a},dts:e=>{e=(e=e.replace(/\|format=[ymd]+/i,"")).replace(/\|abbr=(on|off)/i,"");let t=Pe(e,["year","month","date","bc"]);return t.date&&t.month&&t.year?!0===/[a-z]/.test(t.month)?[t.month,t.date,t.year].join(" "):[t.year,t.month,t.date].join("-"):t.month&&t.year?[t.year,t.month].join("-"):t.year?(t.year<0&&(t.year=Math.abs(t.year)+" BC"),t.year):""},time:()=>{let e=new Date,t=Rt([e.getFullYear(),e.getMonth(),e.getDate()]);return Bt(t)},millennium:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/1e3)+1,t.abbr&&"y"===t.abbr?i<0?`${Lt(Math.abs(i))} BC`:`${Lt(i)}`:`${Lt(i)} millennium`},start:Wt.date,"start-date":Wt.natural_date,birthdeathage:Wt.two_dates,age:Wt.age,"age nts":Wt.age,"age in years":Wt["diff-y"],"age in years and months":Wt["diff-ym"],"age in years, months and days":Wt["diff-ymd"],"age in years and days":Wt["diff-yd"],"age in days":Wt["diff-d"]};function Yt(e){let t=e.pop(),i=Number(e[0]||0),a=Number(e[1]||0),n=Number(e[2]||0);if("string"!=typeof t||isNaN(i))return null;let r=1;return/[SW]/i.test(t)&&(r=-1),r*(i+a/60+n/3600)}const Gt=function(e){if("number"!=typeof e)return e;let t=1e5;return Math.round(e*t)/t},Vt={s:!0,w:!0},Jt=function(e){let t=Pe(e);t=function(e){return e.list=e.list||[],e.list=e.list.map((t=>{let i=Number(t);if(!isNaN(i))return i;let a=t.split(/:/);return a.length>1?(e.props=e.props||{},e.props[a[0]]=a.slice(1).join(":"),null):t})),e.list=e.list.filter((e=>null!==e)),e}(t);let i=function(e){const t=e.map((e=>typeof e)).join("|");return 2===e.length&&"number|number"===t?{lat:e[0],lon:e[1]}:4===e.length&&"number|string|number|string"===t?(Vt[e[1].toLowerCase()]&&(e[0]*=-1),"w"===e[3].toLowerCase()&&(e[2]*=-1),{lat:e[0],lon:e[2]}):6===e.length?{lat:Yt(e.slice(0,3)),lon:Yt(e.slice(3))}:8===e.length?{lat:Yt(e.slice(0,4)),lon:Yt(e.slice(4))}:{}}(t.list);return t.lat=Gt(i.lat),t.lon=Gt(i.lon),t.template="coord",delete t.list,t},Xt={coord:(e,t)=>{let i=Jt(e);return t.push(i),i.display&&-1===i.display.indexOf("inline")?"":`${i.lat||""}°N, ${i.lon||""}°W`}},Qt=function(e,t,i,a){let n=Pe(e);return a&&(n.name=n.template,n.template=a),t.push(n),""},ei={persondata:Qt,taxobox:Qt,citation:Qt,portal:Qt,reflist:Qt,"cite book":Qt,"cite journal":Qt,"cite web":Qt,"commons cat":Qt,"election box candidate":Qt,"election box begin":Qt,main:Qt},ti={adx:"adx",aim:"aim",amex:"amex",asx:"asx",athex:"athex",b3:"b3","B3 (stock exchange)":"B3 (stock exchange)",barbadosse:"barbadosse",bbv:"bbv",bcba:"bcba",bcs:"bcs",bhse:"bhse",bist:"bist",bit:"bit","bm&f bovespa":"b3","bm&f":"b3",bmad:"bmad",bmv:"bmv","bombay stock exchange":"bombay stock exchange","botswana stock exchange":"botswana stock exchange",bpse:"bpse",bse:"bse",bsx:"bsx",bvb:"bvb",bvc:"bvc",bvl:"bvl",bvpasa:"bvpasa",bwse:"bwse","canadian securities exchange":"canadian securities exchange",cse:"cse",darse:"darse",dfm:"dfm",dse:"dse",euronext:"euronext",euronextparis:"euronextparis",fse:"fse",fwb:"fwb",gse:"gse",gtsm:"gtsm",idx:"idx",ise:"ise",iseq:"iseq",isin:"isin",jasdaq:"jasdaq",jse:"jse",kase:"kase",kn:"kn",krx:"krx",lse:"lse",luxse:"luxse","malta stock exchange":"malta stock exchange",mai:"mai",mcx:"mcx",mutf:"mutf",myx:"myx",nag:"nag","nasdaq dubai":"nasdaq dubai",nasdaq:"nasdaq",neeq:"neeq",nepse:"nepse",nex:"nex",nse:"nse",newconnect:"newconnect","nyse arca":"nyse arca",nyse:"nyse",nzx:"nzx","omx baltic":"omx baltic",omx:"omx",ose:"ose","otc expert":"otc expert","otc grey":"otc grey","otc pink":"otc pink",otcqb:"otcqb",otcqx:"otcqx","pfts ukraine stock exchange":"pfts ukraine stock exchange","philippine stock exchange":"philippine stock exchange",prse:"prse",psx:"psx",karse:"karse",qe:"qe","saudi stock exchange":"saudi stock exchange",sehk:"sehk","Stock Exchange of Thailand":"Stock Exchange of Thailand",set:"set",sgx:"sgx",sse:"sse",swx:"swx",szse:"szse",tase:"tase","tsx-v":"tsx-v",tsx:"tsx",tsxv:"tsxv",ttse:"ttse",twse:"twse",tyo:"tyo",wbag:"wbag",wse:"wse","zagreb stock exchange":"zagreb stock exchange","zimbabwe stock exchange":"zimbabwe stock exchange",zse:"zse"},ii=(e,t)=>{let i=Pe(e,["ticketnumber","code"]);t.push(i);let a=i.template||"";""===a&&(a=i.code),a=(a||"").toLowerCase();let n=ti[a]||"";return i.ticketnumber&&(n=`${n}: ${i.ticketnumber}`),i.code&&!ti[i.code.toLowerCase()]&&(n+=" "+i.code),n},ai={};Object.keys(ti).forEach((e=>{ai[e]=ii}));const ni=function(e){return 1===(e=String(e)).length&&(e="0"+e),e},ri=function(e,t,i){e[`rd${t}-team${ni(i)}`]&&(i=ni(i));let a=e[`rd${t}-score${i}`],n=Number(a);return!1===isNaN(n)&&(a=n),{team:e[`rd${t}-team${i}`],score:a,seed:e[`rd${t}-seed${i}`]}},oi=function(e){let t=[],i=Pe(e);for(let e=1;e<7;e+=1){let a=[];for(let t=1;t<16;t+=2){let n=`rd${e}-team`;if(!i[n+t]&&!i[n+ni(t)])break;{let n=ri(i,e,t),r=ri(i,e,t+1);a.push([n,r])}}a.length>0&&t.push(a)}return{template:"playoffbracket",rounds:t}};let si={"4teambracket":function(e,t){let i=oi(e);return t.push(i),""},player:(e,t)=>{let i=Pe(e,["number","country","name","dl"]);t.push(i);let a=`[[${i.name}]]`;if(i.country){let e=(i.country||"").toLowerCase(),t=wt.find((t=>e===t[1]||e===t[2]))||[];t&&t[0]&&(a=t[0]+" "+a)}return i.number&&(a=i.number+" "+a),a},goal:(e,t)=>{let i={template:"goal",data:[]},a=Pe(e).list||[];for(let e=0;e{let t=e.note;return t&&(t=` (${t})`),e.min+"'"+t})).join(", "),n},"sports table":(e,t)=>{let i=Pe(e),a={};Object.keys(i).filter((e=>/^team[0-9]/.test(e))).map((e=>i[e].toLowerCase())).forEach((e=>{a[e]={name:i[`name_${e}`],win:Number(i[`win_${e}`])||0,loss:Number(i[`loss_${e}`])||0,tie:Number(i[`tie_${e}`])||0,otloss:Number(i[`otloss_${e}`])||0,goals_for:Number(i[`gf_${e}`])||0,goals_against:Number(i[`ga_${e}`])||0}}));let n={date:i.update,header:i.table_header,teams:a};t.push(n)}};var li=Object.assign({},Et,St,Nt,Ht,Xt,ei,ai,oi,si);let ci=Object.assign({},xt,Ot,li);Object.keys(ut).forEach((e=>{ci[e]=ci[ut[e]]}));const ui=["0","1","2","3","4","5","6","7","8","9"],pi=function(e,t){let i=e.name;if(!0===at.hasOwnProperty(i))return[""];if(!0===function(e){return!0===nt.hasOwnProperty(e)||!!rt.test(e)||!(!ot.test(e)&&!st.test(e))||!!lt.test(e)}(i)){let t=Pe(e.body,[],"raw");return["",ct(t)]}if(!0===/^cite [a-z]/.test(i)){let t=Pe(e.body);return t.type=t.template,t.template="citation",["",t]}if(!0===ci.hasOwnProperty(i)){if("number"==typeof ci[i]){return[Pe(e.body,ui)[String(ci[i])]||""]}if("string"==typeof ci[i])return[ci[i]];if(!0===r(ci[i])){return["",Pe(e.body,ci[i])]}if(!0===((a=ci[i])&&"[object Object]"===Object.prototype.toString.call(a))){let t=Pe(e.body,ci[i].props);return[t[ci[i].out],t]}if("function"==typeof ci[i]){let a=[];return[ci[i](e.body,a,Pe,null,t),a[0]]}}var a;let n=Pe(e.body);return 0===Object.keys(n).length&&(n=null),["",n]},mi=(e="")=>(e=(e=e.toLowerCase()).replace(/[-_]/g," ")).trim(),di=function(e,t){this._type=e.type,this.domain=e.domain,Object.defineProperty(this,"data",{enumerable:!1,value:e.data}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},hi={type:function(){return this._type},links:function(e){let t=[];if(Object.keys(this.data).forEach((e=>{this.data[e].links().forEach((e=>t.push(e)))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},image:function(){let e=this.data.image||this.data.image2||this.data.logo||this.data.image_skyline||this.data.image_flag;if(!e)return null;let t=e.json(),i=t.text;return t.file=i,t.text="",t.caption=this.data.caption,t.domain=this.domain,new j(t)},get:function(e){let t=Object.keys(this.data);if("string"==typeof e){let i=mi(e);for(let e=0;e{for(let i=0;i(e.data[i]&&(t[i]=e.data[i].json()),t)),{});return!0===t.encode&&(i=K(i)),i}(this,e=e||{})},wikitext:function(){return this.wiki||""},keyValue:function(){return Object.keys(this.data).reduce(((e,t)=>(this.data[t]&&(e[t]=this.data[t].text()),e)),{})}};Object.keys(hi).forEach((e=>{di.prototype[e]=hi[e]})),di.prototype.data=di.prototype.keyValue,di.prototype.template=di.prototype.type,di.prototype.images=di.prototype.image;const gi=function(e,t){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},fi={title:function(){let e=this.data;return e.title||e.encyclopedia||e.author||""},links:function(e){let t=[];if("number"==typeof e)return t[e];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},text:function(){return""},wikitext:function(){return this.wiki||""},json:function(e={}){let t=this.data||{};return!0===e.encode&&(t=Object.assign({},t),t=K(t)),t}};Object.keys(fi).forEach((e=>{gi.prototype[e]=fi[e]}));const ki={text:function(){return oe(this._text||"").text()},json:function(){return this.data||{}},wikitext:function(){return this.wiki||""}},bi=function(e,t="",i=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_text",{enumerable:!1,value:t}),Object.defineProperty(this,"wiki",{enumerable:!1,value:i})};Object.keys(ki).forEach((e=>{bi.prototype[e]=ki[e]}));const wi=/^(cite |citation)/i,yi={citation:!0,refn:!0,harvnb:!0,source:!0},$i=function(e,t){let{list:i,wiki:a}=function(e,t){let i=[],a=it(e);const n=function(a,r){a.parent=r,a.children&&a.children.length>0&&a.children.forEach((e=>n(e,a)));let[o,s]=pi(a,t);a.wiki=o,s&&i.push({name:a.name,wiki:a.body,nested:Boolean(a.parent),text:o,json:s});const l=function(e,t,i){e.parent&&(e.parent.body=e.parent.body.replace(t,i),l(e.parent,t,i))};l(a,a.body,a.wiki),e=e.replace(a.body,a.wiki)};return a.forEach((e=>n(e,null))),a.forEach((t=>{e=e.replace(t.body,t.wiki)})),{list:i,wiki:e}}(e._wiki,t),n=t?t._domain:null,{infoboxes:r,references:o,templates:s}=function(e,t){let i={infoboxes:[],templates:[],references:[]};return e.forEach((e=>{let a=e.json,n=a.template||a.type||a.name;if(!0!==yi[n]&&!0!==wi.test(n))return"infobox"!==a.template||"yes"===a.subbox||e.nested?void i.templates.push(new bi(a,e.text,e.wiki)):(a.domain=t,a.data=a.data||{},void i.infoboxes.push(new di(a,e.wiki)));i.references.push(new gi(a,e.wiki))})),i}(i,n);e._infoboxes=e._infoboxes||[],e._references=e._references||[],e._templates=e._templates||[],e._infoboxes=e._infoboxes.concat(r),e._references=e._references.concat(o),e._templates=e._templates.concat(s),e._wiki=a},xi=function(e){return/^ *\{\{ *(cite|citation)/i.test(e)&&/\}\} *$/.test(e)&&!1===/citation needed/i.test(e)},vi=function(e){let t=Pe(e);return t.type=t.template.replace(/cite /,""),t.template="citation",t},ji=function(e){return{template:"citation",type:"inline",data:{},inline:oe(e)||{}}},_i=function(e){let t=[],i=e._wiki;i=i.replace(/ ?([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(xi(a)){let n=vi(a);n&&t.push({json:n,wiki:e}),i=i.replace(a,"")}else t.push({json:ji(a),wiki:e});return" "})),i=i.replace(/ ?]{0,200}?\/> ?/gi," "),i=i.replace(/ ?]{0,200}>([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(xi(a)){let e=vi(a);e&&t.push({json:e,wiki:a}),i=i.replace(a,"")}else t.push({json:ji(a),wiki:e});return" "})),i=i.replace(/ ?<[ /]?[a-z0-9]{1,8}[a-z0-9=" ]{2,20}[ /]?> ?/g," "),e._references=t.map((e=>new gi(e.json,e.wiki))),e._wiki=i},zi={coach:["team","year","g","w","l","w-l%","finish","pg","pw","pl","pw-l%"],player:["year","team","gp","gs","mpg","fg%","3p%","ft%","rpg","apg","spg","bpg","ppg"],roster:["player","gp","gs","mpg","fg%","3fg%","ft%","rpg","apg","spg","bpg","ppg"]};let Oi=["res","record","opponent","method","event","date","round","time","location","notes"];const Ei=function(e,t){const i={templates:[],text:e._wiki};var a;return(a=i).text=a.text.replace(/\{\{election box begin([\s\S]+?)\{\{election box end\}\}/gi,(e=>{let t={_wiki:e,_templates:[]};$i(t);let i=t._templates.map((e=>e.json())),n=i.find((e=>"election box"===e.template))||{},r=i.filter((e=>"election box candidate"===e.template)),o=i.find((e=>"election box gain"===e.template||"election box hold"===e.template))||{};return(r.length>0||o)&&a.templates.push({template:"election box",title:n.title,candidates:r,summary:o.data}),""})),function(e,t,i){e.text=e.text.replace(/]*)>([\s\S]+)<\/gallery>/g,((a,n,r)=>{let o=r.split(/\n/g);return o=o.filter((e=>e&&""!==e.trim())),o=o.map((e=>{let i=e.split(/\|/),a={file:i[0].trim(),lang:t.lang(),domain:t.domain()},n=new j(a).json(),r=i.slice(1).join("|");return""!==r&&(n.caption=oe(r)),n})),o.length>0&&e.templates.push({template:"gallery",images:o,pos:i.title}),""}))}(i,t,e),function(e){e.text=e.text.replace(/]*)>([\s\S]+)<\/math>/g,((t,i,a)=>{let n=oe(a).text();return e.templates.push({template:"math",formula:n,raw:a}),n&&n.length<12?n:""})),e.text=e.text.replace(/]*)>([\s\S]+?)<\/chem>/g,((t,i,a)=>(e.templates.push({template:"chem",data:a}),"")))}(i),function(e){e.text=e.text.replace(/\{\{mlb game log /gi,"{{game log "),e.text=e.text.replace(/\{\{game log (section|month)[\s\S]+?\{\{game log (section|month) end\}\}/gi,(t=>{let i=function(e){let t=["#","date","opponent","score","win","loss","save","attendance","record"];return!0===/\|stadium=y/i.test(e)&&t.splice(7,0,"stadium"),!0===/\|time=y/i.test(e)&&t.splice(7,0,"time"),!0===/\|box=y/i.test(e)&&t.push("box"),t}(t);t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{game log (section|month) end\}\}/i,"");let a="! "+i.join(" !! "),n=ge("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mlb game log section",data:n}),""}))}(i),function(e){e.text=e.text.replace(/\{\{mma record start[\s\S]+?\{\{end\}\}/gi,(t=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{end\}\}/i,"");let i="! "+Oi.join(" !! "),a=ge("{|\n"+i+"\n"+t+"\n|}");return a=a.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mma record start",data:a}),""}))}(i),function(e){e.text=e.text.replace(/\{\{nba (coach|player|roster) statistics start([\s\S]+?)\{\{s-end\}\}/gi,((t,i)=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{s-end\}\}/,""),i=i.toLowerCase().trim();let a="! "+zi[i].join(" !! "),n=ge("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"NBA "+i+" statistics",data:n}),""}))}(i),i.templates=i.templates.map((e=>new bi(e))),i},Si={tables:!0,references:!0,paragraphs:!0,templates:!0,infoboxes:!0};class Ci{constructor(e,t){let i={doc:t,title:e.title||"",depth:e.depth,wiki:e.wiki||"",templates:[],tables:[],infoboxes:[],references:[],paragraphs:[]};Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})}));const a=Ei(this,t);this._wiki=a.text,this._templates=this._templates.concat(a.templates),_i(this),$i(this,t),function(e){let t=[],i=e._wiki,a=i.split("\n"),n=[];for(let e=0;e0&&(n[n.length-1]+="\n"+a[e]);else{n[n.length-1]+="\n"+a[e];let i=n.pop();t.push(i)}else n.push(a[e]);let r=[];t.forEach((e=>{if(e){i=i.replace(e+"\n",""),i=i.replace(e,"");let t=ge(e);t&&t.length>0&&r.push(new be(t,e))}})),r.length>0&&(e._tables=r),e._wiki=i}(this),Ve(this,t)}title(){return this._title||""}index(){if(!this._doc)return null;let e=this._doc.sections().indexOf(this);return-1===e?null:e}depth(){return this._depth}indentation(){return this.depth()}sentences(){return this.paragraphs().reduce(((e,t)=>e.concat(t.sentences())),[])}paragraphs(){return this._paragraphs||[]}links(e){let t=[];if(this.infoboxes().forEach((e=>{t.push(e.links())})),this.sentences().forEach((e=>{t.push(e.links())})),this.tables().forEach((e=>{t.push(e.links())})),this.lists().forEach((e=>{t.push(e.links())})),t=t.reduce(((e,t)=>e.concat(t)),[]).filter((e=>void 0!==e)),"string"==typeof e){let i=t.find((t=>t.page().toLowerCase()===e.toLowerCase()));return void 0===i?[]:[i]}return t}tables(){return this._tables||[]}templates(e){let t=this._templates||[];return"string"==typeof e?(e=e.toLowerCase(),t.filter((t=>t.data.template===e||t.data.name===e))):t}infoboxes(e){let t=this._infoboxes||[];return"string"==typeof e?(e=(e=e.replace(/^infobox /i,"")).trim().toLowerCase(),t.filter((t=>t._type===e))):t}coordinates(){return[...this.templates("coord"),...this.templates("coor")].map((e=>e.json()))}lists(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.lists())})),e}interwiki(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.interwiki())})),e}images(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.images())})),e}references(){return this._references||[]}remove(){if(!this._doc)return null;let e={};e[this.title()]=!0,this.children().forEach((t=>e[t.title()]=!0));let t=this._doc.sections();return t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),this._doc._sections=t,this._doc}nextSibling(){if(!this._doc)return null;let e=this._doc.sections();for(let t=(this.index()||0)+1;tthis.depth())for(let e=i+1;ethis.depth();e+=1)a.push(t[e]);return"string"==typeof e?a.find((t=>t.title().toLowerCase()===e.toLowerCase())):a}sections(e){return this.children(e)}parent(){if(!this._doc)return null;let e=this._doc.sections();for(let t=this.index()||0;t>=0;t-=1)if(e[t]&&e[t].depth()t.text(e))).join("\n\n")}wikitext(){return this._wiki}json(e){return function(e,t){let i={};if(!0===(t=p(t,W)).headers&&(i.title=e.title()),!0===t.depth&&(i.depth=e.depth()),!0===t.paragraphs){let a=e.paragraphs().map((e=>e.json(t)));a.length>0&&(i.paragraphs=a)}if(!0===t.images){let a=e.images().map((e=>e.json(t)));a.length>0&&(i.images=a)}if(!0===t.tables){let a=e.tables().map((e=>e.json(t)));a.length>0&&(i.tables=a)}if(!0===t.templates){let a=e.templates().map((e=>e.json()));a.length>0&&(i.templates=a,!0===t.encode&&i.templates.forEach((e=>K(e))))}if(!0===t.infoboxes){let a=e.infoboxes().map((e=>e.json(t)));a.length>0&&(i.infoboxes=a)}if(!0===t.lists){let a=e.lists().map((e=>e.json(t)));a.length>0&&(i.lists=a)}if(!0===t.references||!0===t.citations){let a=e.references().map((e=>e.json(t)));a.length>0&&(i.references=a)}return!0===t.sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,Si))}}Ci.prototype.citations=Ci.prototype.references;const qi={sentences:"sentence",paragraphs:"paragraph",links:"link",tables:"table",templates:"template",infoboxes:"infobox",coordinates:"coordinate",lists:"list",images:"image",references:"reference",citations:"citation"};Object.keys(qi).forEach((e=>{let t=qi[e];Ci.prototype[t]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]||null}}));const Ni=/^(={1,6})(.{1,200}?)={1,6}$/,Li=/\{\{.+?\}\}/,Pi=function(e,t){let i=t.match(Ni);if(!i)return e.title="",e.depth=0,e;let a=i[2]||"";var r;a=oe(a).text(),Li.test(a)&&(it(r=a).forEach((e=>{let[t]=pi(e);r=r.replace(e.body,t)})),a=r);let o={_wiki:a};_i(o),a=o._wiki,a=n(a);let s=0;return i[1]&&(s=i[1].length-2),e.title=a,e.depth=s,e},Ai=new RegExp("^("+["references","reference","einzelnachweise","referencias","références","notes et références","脚注","referenser","bronnen","примечания"].join("|")+"):?","i"),Di=/(?:\n|^)(={2,6}.{1,200}?={2,6})/g,Ti=function(e){let t=[],i=e._wiki.split(Di);for(let a=0;a!0!==Ai.test(t.title())||t.paragraphs().length>0||t.templates().length>0||(e[i+1]&&e[i+1].depth()>t.depth()&&(e[i+1]._depth-=1),!1)))}(t)},Ii=new RegExp("\\[\\[:?("+d.join("|")+"):(.{2,178}?)]](w{0,10})","gi"),Mi=new RegExp("^\\[\\[:?("+d.join("|")+"):","gi"),Ri=function(e){const t=[];let i=e.match(Ii);i&&i.forEach((function(e){(e=(e=(e=e.replace(Mi,"")).replace(/\|?[ *]?\]\]$/,"")).replace(/\|.*/,""))&&!e.match(/[[\]]/)&&t.push(e.trim())}));const a=e.replace(Ii,"");return[t,a]},Ui={tables:!0,lists:!0,paragraphs:!0};class Bi{constructor(e,t){let i={pageID:(t=t||{}).pageID||t.id||null,namespace:t.namespace||t.ns||null,lang:t.lang||t.language||null,domain:t.domain||null,title:t.title||null,type:"page",redirectTo:null,wikidata:t.wikidata||null,wiki:e||"",categories:[],sections:[],coordinates:[],userAgent:t.userAgent||t["User-Agent"]||t["Api-User-Agent"]||"User of the wtf_wikipedia library"};if(Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})})),!0===function(e){return!(!e||e.length>500)&&D.test(e)}(this._wiki)){this._type="redirect",this._redirectTo=function(e){let t=e.match(D);if(t&&t[2])return(A(t[2])||[])[0];return{}}(this._wiki);const[e,t]=Ri(this._wiki);return this._categories=e,void(this._wiki=t)}this._wiki=U(this._wiki);const[a,n]=Ri(this._wiki);this._categories=a,this._wiki=n,this._sections=Ti(this)}title(e){if(void 0!==e)return this._title=e,e;if(this._title)return this._title;let t=null,i=this.sentences()[0];return i&&(t=i.bold()),t}pageID(e){return void 0!==e&&(this._pageID=e),this._pageID||null}wikidata(e){return void 0!==e&&(this._wikidata=e),this._wikidata||null}domain(e){return void 0!==e&&(this._domain=e),this._domain||null}language(e){return void 0!==e&&(this._lang=e),this._lang||null}url(){let e=this.title();if(!e)return null;let t=this.language()||"en",i=this.domain()||"wikipedia.org";return e=e.replace(/ /g,"_"),e=encodeURIComponent(e),`https://${t}.${i}/wiki/${e}`}namespace(e){return void 0!==e&&(this._namespace=e),this._namespace||null}isRedirect(){return"redirect"===this._type}redirectTo(){return this._redirectTo}isDisambiguation(){return function(e){let t=e.templates().map((e=>e.json()));if(t.find((e=>k.hasOwnProperty(e.template)||$.hasOwnProperty(e.template))))return!0;let i=e.title();return!(!i||!0!==y.test(i))||!t.find((e=>w.hasOwnProperty(e.template)))&&(!0===x(e.sentence(0))||!0===x(e.sentence(1)))}(this)}categories(e){let t=this._categories||[];return"number"==typeof e?[t[e]]:t}sections(e){let t=this._sections||[];if(t.forEach((e=>{e._doc=this})),"string"==typeof e){let i=e.toLowerCase().trim();return t.filter((e=>e.title().toLowerCase()===i))}return"number"==typeof e?[t[e]]:t}paragraphs(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.paragraphs())})),"number"==typeof e?[t[e]]:t}sentences(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.sentences())})),"number"==typeof e?[t[e]]:t}images(e){let t=u(this,"images",null);return this.infoboxes().forEach((e=>{let i=e.image();i&&t.unshift(i)})),this.templates().forEach((e=>{"gallery"===e.data.template&&(e.data.images=e.data.images||[],e.data.images.forEach((e=>{e instanceof j||(e.language=this.language(),e.domain=this.domain(),e=new j(e)),t.push(e)})))})),"number"==typeof e?[t[e]]:t}links(e){return u(this,"links",e)}interwiki(e){return u(this,"interwiki",e)}lists(e){return u(this,"lists",e)}tables(e){return u(this,"tables",e)}templates(e){return u(this,"templates",e)}references(e){return u(this,"references",e)}citations(e){return this.references(e)}coordinates(e){return u(this,"coordinates",e)}infoboxes(e){let t=u(this,"infoboxes",e);return t=t.sort(((e,t)=>Object.keys(e.data).length>Object.keys(t.data).length?-1:1)),t}text(e){if(e=p(e,Ui),!0===this.isRedirect())return"";return this.sections().map((t=>t.text(e))).join("\n\n")}json(e){return function(e,t){let i={};return(t=p(t,m)).title&&(i.title=e.title()),t.pageID&&(i.pageID=e.pageID()),t.categories&&(i.categories=e.categories()),t.sections&&(i.sections=e.sections().map((e=>e.json(t)))),!0===e.isRedirect()&&(i.isRedirect=!0,i.redirectTo=e.redirectTo(),i.sections=[]),t.coordinates&&(i.coordinates=e.coordinates()),t.infoboxes&&(i.infoboxes=e.infoboxes().map((e=>e.json(t)))),t.images&&(i.images=e.images().map((e=>e.json(t)))),t.plaintext&&(i.plaintext=e.text(t)),(t.citations||t.references)&&(i.references=e.references()),i}(this,e=p(e,Ui))}wikitext(){return this._wiki||""}debug(){return console.log("\n"),this.sections().forEach((e=>{let t=" - ";for(let i=0;i{let t=Fi[e];Bi.prototype[t]=function(t){return this[e](t)[0]||null}})),Bi.prototype.lang=Bi.prototype.language,Bi.prototype.ns=Bi.prototype.namespace,Bi.prototype.plaintext=Bi.prototype.text,Bi.prototype.isDisambig=Bi.prototype.isDisambiguation,Bi.prototype.citations=Bi.prototype.references,Bi.prototype.redirectsTo=Bi.prototype.redirectTo,Bi.prototype.redirect=Bi.prototype.redirectTo,Bi.prototype.redirects=Bi.prototype.redirectTo;const Ki=/^https?:\/\//,Wi={lang:"en",wiki:"wikipedia",domain:void 0,follow_redirects:!0,path:"api.php"},Zi=function(e,t,n){"string"==typeof t&&(t={lang:t}),(t={...Wi,...t}).title=e,"string"==typeof e&&Ki.test(e)&&(t={...t,...a(e)});const o=c(t),s=function(e){let t,i=e.userAgent||e["User-Agent"]||e["Api-User-Agent"]||"User of the wtf_wikipedia library";return t=e.noOrigin?"":e.origin||e.Origin||"*",{method:"GET",headers:{"Content-Type":"application/json","Api-User-Agent":i,"User-Agent":i,Origin:t,"Accept-Encoding":"gzip"},redirect:"follow"}}(t);return i(o,s).then((e=>e.json())).then((i=>{let a=function(e,t={}){return Object.keys(e.query.pages).map((i=>{let a=e.query.pages[i]||{};if(a.hasOwnProperty("missing")||a.hasOwnProperty("invalid"))return null;let n=a.revisions[0]["*"];!n&&a.revisions[0].slots&&(n=a.revisions[0].slots.main["*"]),a.pageprops=a.pageprops||{};let r=t.domain;return!r&&t.wiki&&(r=`${t.wiki}.org`),{wiki:n,meta:Object.assign({},t,{title:a.title,pageID:a.pageid,namespace:a.ns,domain:r,wikidata:a.pageprops.wikibase_item,description:a.pageprops["wikibase-shortdesc"]})}}))}(i,t);return a=function(e,t){let i=(e=e.filter((e=>e))).map((e=>new Bi(e.wiki,e.meta)));return 0===i.length?null:r(t)||1!==i.length?i:i[0]}(a,e),n&&n(null,a),a})).catch((e=>(console.error(e),n&&n(e,null),null)))};const Hi=function(e,t){return new Bi(e,t)},Yi={Doc:Bi,Section:Ci,Paragraph:je,Sentence:J,Image:j,Infobox:di,Link:H,List:Ue,Reference:gi,Table:be,Template:bi,http:function(e,t){return i(e,t).then((function(e){return e.json()})).catch((t=>(console.error("\n\n=-=- http response error =-=-=-"),console.error(e),console.error(t),{})))},wtf:Hi};Hi.fetch=function(e,t,i){return Zi(e,t,i)},Hi.plugin=Hi.extend=function(e){return e(Yi,ci,nt),this},Hi.version="10.0.4";export{Hi as default}; diff --git a/builds/wtf_wikipedia.cjs b/builds/wtf_wikipedia.cjs index 076e3061..225eab12 100644 --- a/builds/wtf_wikipedia.cjs +++ b/builds/wtf_wikipedia.cjs @@ -1,4 +1,4 @@ -/*! wtf_wikipedia 10.0.3 MIT */ +/*! wtf_wikipedia 10.0.4 MIT */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('isomorphic-unfetch')) : typeof define === 'function' && define.amd ? define(['isomorphic-unfetch'], factory) : @@ -160,10 +160,10 @@ params.titles = cleanTitle(title); } else if (title !== undefined && isArray(title) && typeof title[0] === 'number') { //pageid array - params.pageids = title.join('|'); + params.pageids = title.filter(t => t).join('|'); } else if (title !== undefined && isArray(title) === true && typeof title[0] === 'string') { //title array - params.titles = title.map(cleanTitle).join('|'); + params.titles = title.filter(t => t).map(cleanTitle).join('|'); } else { return '' } @@ -1819,6 +1819,7 @@ } let site = m[1] || ''; site = site.toLowerCase(); + // double colon - [[m:Help:Help]] if (site.indexOf(':') !== -1) { let [, wiki, lang] = site.match(/^:?(.*):(.*)/); //only allow interwikis to these specific places @@ -1827,6 +1828,7 @@ } obj.wiki = { wiki: wiki, lang: lang }; } else { + // [[fr:cool]] if (wikis.hasOwnProperty(site) === false) { return obj } @@ -2200,6 +2202,7 @@ obj.page = this.page(); } else if (obj.type === 'interwiki') { obj.wiki = this.wiki(); + obj.page = this.page(); } else { obj.site = this.site(); } @@ -3423,7 +3426,7 @@ //every value in {{tmpl|a|b|c}} needs a name //here we come up with names for them - const hasKey = /^[\p{Letter}0-9._\- '()]+=/iu; + const hasKey = /^[\p{Letter}0-9._\- '()\t]+=/iu; //templates with these properties are asking for trouble const reserved = { @@ -3560,7 +3563,6 @@ //remove {{}}'s and split based on pipes tmpl = strip(tmpl || ''); let arr = pipeSplitter(tmpl); - //get template name let name = arr.shift(); @@ -5932,7 +5934,8 @@ let order = ['color', 'label']; let obj = parser(tmpl, order); list.push(obj); - return obj.label || ' ' + // return obj.label || ' ' + return tmpl // keep the wiki? }, isbn: (tmpl, list) => { @@ -9423,7 +9426,7 @@ }) }; - var version = '10.0.3'; + var version = '10.0.4'; /** * use the native client-side fetch function diff --git a/builds/wtf_wikipedia.mjs b/builds/wtf_wikipedia.mjs index a3e7698f..50bfaacf 100644 --- a/builds/wtf_wikipedia.mjs +++ b/builds/wtf_wikipedia.mjs @@ -1,4 +1,4 @@ -/*! wtf_wikipedia 10.0.3 MIT */ +/*! wtf_wikipedia 10.0.4 MIT */ import unfetch from 'isomorphic-unfetch'; /** @@ -152,10 +152,10 @@ const makeUrl = function (options, parameters = defaults$c) { params.titles = cleanTitle(title); } else if (title !== undefined && isArray(title) && typeof title[0] === 'number') { //pageid array - params.pageids = title.join('|'); + params.pageids = title.filter(t => t).join('|'); } else if (title !== undefined && isArray(title) === true && typeof title[0] === 'string') { //title array - params.titles = title.map(cleanTitle).join('|'); + params.titles = title.filter(t => t).map(cleanTitle).join('|'); } else { return '' } @@ -1811,6 +1811,7 @@ const parseInterwiki = function (obj) { } let site = m[1] || ''; site = site.toLowerCase(); + // double colon - [[m:Help:Help]] if (site.indexOf(':') !== -1) { let [, wiki, lang] = site.match(/^:?(.*):(.*)/); //only allow interwikis to these specific places @@ -1819,6 +1820,7 @@ const parseInterwiki = function (obj) { } obj.wiki = { wiki: wiki, lang: lang }; } else { + // [[fr:cool]] if (wikis.hasOwnProperty(site) === false) { return obj } @@ -2192,6 +2194,7 @@ const methods$7 = { obj.page = this.page(); } else if (obj.type === 'interwiki') { obj.wiki = this.wiki(); + obj.page = this.page(); } else { obj.site = this.site(); } @@ -3415,7 +3418,7 @@ const pipeSplitter = function (tmpl) { //every value in {{tmpl|a|b|c}} needs a name //here we come up with names for them -const hasKey = /^[\p{Letter}0-9._\- '()]+=/iu; +const hasKey = /^[\p{Letter}0-9._\- '()\t]+=/iu; //templates with these properties are asking for trouble const reserved = { @@ -3552,7 +3555,6 @@ const parser = function (tmpl, order = [], fmt) { //remove {{}}'s and split based on pipes tmpl = strip(tmpl || ''); let arr = pipeSplitter(tmpl); - //get template name let name = arr.shift(); @@ -5924,7 +5926,8 @@ let templates$3 = { let order = ['color', 'label']; let obj = parser(tmpl, order); list.push(obj); - return obj.label || ' ' + // return obj.label || ' ' + return tmpl // keep the wiki? }, isbn: (tmpl, list) => { @@ -9415,7 +9418,7 @@ const fetch = function (title, options, callback) { }) }; -var version = '10.0.3'; +var version = '10.0.4'; /** * use the native client-side fetch function diff --git a/changelog.md b/changelog.md index c69b9033..dd31b2dc 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,12 @@ #### [unreleased ] --> +#### 10.0.4 [Dec 2022] +- **[fix]** - mangled interwiki link #502 +- **[fix]** - tabs in infoboxes #435 +- **[update]** - dependencies + + #### 10.0.3 [Oct 2022] - **[fix]** - improved i18n infobox classification - **[update]** - dependencies diff --git a/package-lock.json b/package-lock.json index e93861d8..eb256647 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "wtf_wikipedia", - "version": "10.0.2", + "version": "10.0.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "wtf_wikipedia", - "version": "10.0.2", + "version": "10.0.3", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -21,9 +21,9 @@ "@rollup/plugin-node-resolve": "14.1.0", "amble": "1.3.0", "codecov": "3.8.3", - "eslint": "8.24.0", + "eslint": "8.29.0", "eslint-plugin-compat": "4.0.2", - "eslint-plugin-regexp": "1.9.0", + "eslint-plugin-regexp": "1.11.0", "nyc": "^15.1.0", "recursive-install": "1.4.0", "rollup": "2.79.1", @@ -340,9 +340,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz", - "integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", + "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -369,9 +369,9 @@ "dev": true }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.18.0.tgz", + "integrity": "sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -408,29 +408,19 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.10.7", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.7.tgz", - "integrity": "sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==", + "version": "0.11.7", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", + "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" } }, - "node_modules/@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", - "dev": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -883,15 +873,6 @@ "node": ">=0.6.10" } }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/array.prototype.every": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/array.prototype.every/-/array.prototype.every-1.1.3.tgz", @@ -1407,27 +1388,6 @@ "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", "dev": true }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/dir-glob/node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -1576,15 +1536,15 @@ } }, "node_modules/eslint": { - "version": "8.24.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.24.0.tgz", - "integrity": "sha512-dWFaPhGhTAiPcCgm3f6LI2MBWbogMnTJzFBbhXVRQDJPkr9pGZvVjlVfXd+vyDcWPA2Ic9L2AXPIQM0+vk/cSQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", + "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.3.2", - "@humanwhocodes/config-array": "^0.10.5", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@eslint/eslintrc": "^1.3.3", + "@humanwhocodes/config-array": "^0.11.6", "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -1600,14 +1560,14 @@ "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "glob-parent": "^6.0.1", + "glob-parent": "^6.0.2", "globals": "^13.15.0", - "globby": "^11.1.0", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", @@ -1675,9 +1635,9 @@ } }, "node_modules/eslint-plugin-regexp": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-1.9.0.tgz", - "integrity": "sha512-Che49IZ07w9KcKvrMiqfwBYv44VBunA4NqUo+UTLluYbCos9Du3+pnhkPTLTAx6ZoZ1Rmz7u7o2iC6g6qCuvxw==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-1.11.0.tgz", + "integrity": "sha512-xSFARZrg0LMIp6g7XXUByS52w0fBp3lucoDi347BbeN9XqkGNFdsN+nDzNZIJbJJ1tWB08h3Pd8RfA5p7Kezhg==", "dev": true, "dependencies": { "comment-parser": "^1.1.2", @@ -1885,9 +1845,9 @@ } }, "node_modules/espree": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", - "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", + "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", "dev": true, "dependencies": { "acorn": "^8.8.0", @@ -1977,22 +1937,6 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, - "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -2021,9 +1965,9 @@ "dev": true }, "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.14.0.tgz", + "integrity": "sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -2302,26 +2246,6 @@ "node": ">=4" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/graceful-fs": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", @@ -2483,9 +2407,9 @@ } }, "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz", + "integrity": "sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==", "dev": true, "engines": { "node": ">= 4" @@ -2774,6 +2698,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", @@ -3416,28 +3349,6 @@ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", @@ -4796,15 +4707,6 @@ "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", "dev": true }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -5852,9 +5754,9 @@ } }, "@eslint/eslintrc": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz", - "integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", + "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -5875,9 +5777,9 @@ "dev": true }, "globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.18.0.tgz", + "integrity": "sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -5901,22 +5803,16 @@ } }, "@humanwhocodes/config-array": { - "version": "0.10.7", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.7.tgz", - "integrity": "sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==", + "version": "0.11.7", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", + "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" } }, - "@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", - "dev": true - }, "@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -6267,12 +6163,6 @@ "integrity": "sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=", "dev": true }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, "array.prototype.every": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/array.prototype.every/-/array.prototype.every-1.1.3.tgz", @@ -6659,23 +6549,6 @@ "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", "dev": true }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - }, - "dependencies": { - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - } - } - }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -6799,15 +6672,15 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "8.24.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.24.0.tgz", - "integrity": "sha512-dWFaPhGhTAiPcCgm3f6LI2MBWbogMnTJzFBbhXVRQDJPkr9pGZvVjlVfXd+vyDcWPA2Ic9L2AXPIQM0+vk/cSQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", + "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.2", - "@humanwhocodes/config-array": "^0.10.5", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@eslint/eslintrc": "^1.3.3", + "@humanwhocodes/config-array": "^0.11.6", "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -6823,14 +6696,14 @@ "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "glob-parent": "^6.0.1", + "glob-parent": "^6.0.2", "globals": "^13.15.0", - "globby": "^11.1.0", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", @@ -6981,9 +6854,9 @@ } }, "eslint-plugin-regexp": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-1.9.0.tgz", - "integrity": "sha512-Che49IZ07w9KcKvrMiqfwBYv44VBunA4NqUo+UTLluYbCos9Du3+pnhkPTLTAx6ZoZ1Rmz7u7o2iC6g6qCuvxw==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-1.11.0.tgz", + "integrity": "sha512-xSFARZrg0LMIp6g7XXUByS52w0fBp3lucoDi347BbeN9XqkGNFdsN+nDzNZIJbJJ1tWB08h3Pd8RfA5p7Kezhg==", "dev": true, "requires": { "comment-parser": "^1.1.2", @@ -7022,9 +6895,9 @@ "dev": true }, "espree": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", - "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", + "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", "dev": true, "requires": { "acorn": "^8.8.0", @@ -7088,19 +6961,6 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, - "fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - } - }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -7131,9 +6991,9 @@ } }, "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.14.0.tgz", + "integrity": "sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -7328,20 +7188,6 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - }, "graceful-fs": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", @@ -7458,9 +7304,9 @@ } }, "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz", + "integrity": "sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==", "dev": true }, "ignore-walk": { @@ -7662,6 +7508,12 @@ "has-tostringtag": "^1.0.0" } }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, "is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", @@ -8146,22 +7998,6 @@ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, "min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", @@ -9173,12 +9009,6 @@ "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", "dev": true }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", diff --git a/package.json b/package.json index ac2a409b..c9a99638 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "wtf_wikipedia", "description": "parse wikiscript into json", - "version": "10.0.3", + "version": "10.0.4", "main": "src/index.js", "module": "builds/wtf_wikipedia.mjs", "unpkg": "builds/wtf_wikipedia-client.min.js", @@ -69,9 +69,9 @@ "@rollup/plugin-node-resolve": "14.1.0", "amble": "1.3.0", "codecov": "3.8.3", - "eslint": "8.24.0", + "eslint": "8.29.0", "eslint-plugin-compat": "4.0.2", - "eslint-plugin-regexp": "1.9.0", + "eslint-plugin-regexp": "1.11.0", "nyc": "^15.1.0", "recursive-install": "1.4.0", "rollup": "2.79.1", diff --git a/scratch.js b/scratch.js index cb5b103a..dd7db0e9 100644 --- a/scratch.js +++ b/scratch.js @@ -14,9 +14,19 @@ str = ` }} ` -let doc = wtf(str) -console.log(doc.infobox().json()) +// let doc = wtf(str) +// console.log(doc.infobox().json()) // console.log('after') // wtf.fetch('December_1').then((doc) => { -// }) \ No newline at end of file +// }) + +wtf + .fetch(['Royal Cinema', 'Aldous Huxley'], { + lang: 'en', + 'Api-User-Agent': 'spencermountain@gmail.com', + }) + .then((docList) => { + let links = docList.map((doc) => doc.links()) + console.log(links) + }) \ No newline at end of file diff --git a/src/_version.js b/src/_version.js index e986a5db..74bdc72e 100644 --- a/src/_version.js +++ b/src/_version.js @@ -1 +1 @@ -export default '10.0.3' \ No newline at end of file +export default '10.0.4' \ No newline at end of file