مدیاویکی:Gadget-infoboxExport.js
نکته: پس از انتشار ممکن است برای دیدن تغییرات نیاز باشد که حافظهٔ نهانی مرورگر خود را پاک کنید.
- فایرفاکس / سافاری: کلید Shift را نگه دارید و روی دکمهٔ Reload کلیک کنید، یا کلیدهای Ctrl-F5 یا Ctrl-R را با هم فشار دهید (در رایانههای اپل مکینتاش کلیدهای ⌘-R)
- گوگل کروم: کلیدهای Ctrl+Shift+R را با هم فشار دهید (در رایانههای اپل مکینتاش کلیدهای ⌘-Shift-R)
- اینترنت اکسپلورر/ Edge: کلید Ctrl را نگهدارید و روی دکمهٔ Refresh کلیک کنید، یا کلیدهای Ctrl-F5 را با هم فشار دهید
- اپرا: Ctrl-F5 را بفشارید.
/**
* Gadget for export information from infoboxes to Wikidata.
* The export window is shown by double clicking.
* See [[Help:Infobox export gadget]].
*
* License: MIT
* Repository: https://github.com/putnik/infobox-export
*/
! function() {
"use strict";
var e = {
559: function(e, t, n) {
var r = n(81),
a = n.n(r),
i = n(645),
o = n.n(i),
s = n(667),
l = n.n(s),
u = new URL(n(576), n.b),
c = o()(a()),
d = l()(u);
c.push([e.id, ".infobox-export:not(.vertical-navbox, .ve-ce-leafNode):not([data-from]) .no-wikidata {\n background-color: #fee7e6;\n border: 1px solid #f6bab9;\n border-radius: 2px;\n padding: 3px 6px;\n}\n\n.infobox-export:not(.vertical-navbox, .ve-ce-leafNode):not([data-from]) span.no-wikidata {\n display: block !important;\n}\n\n.infobox-export:not(.vertical-navbox, .ve-ce-leafNode):not([data-from]) .no-wikidata.partial-wikidata {\n background-color: #fef6e7;\n border-color: #ffd760;\n}\n\n.infobox-export:not(.vertical-navbox, .ve-ce-leafNode):not([data-from]) .no-wikidata .no-wikidata {\n margin: -3px -6px;\n border: 0;\n background: transparent;\n}\n\n.infobox-export-dialog .wb-monolingualtext-value {\n font-weight: bold;\n}\n\n.infobox-export-dialog .wb-monolingualtext-language-name {\n color: #54595d;\n font-weight: normal;\n}\n\n.infobox-export-calendar {\n margin-left: .25em;\n color: #54595d;\n}\n\n.infobox-export-calendar::before {\n display: inline-block;\n content: '(';\n}\n\n.infobox-export-calendar::after {\n display: inline-block;\n content: ')';\n}\n\n.infobox-export-statement .infobox-export-main-label {\n font-weight: bold;\n}\n\n.infobox-export-statement .infobox-export-main-label .commons-media-caption,\n.infobox-export-statement .infobox-export-main-label .wb-unit,\n.infobox-export-statement .infobox-export-main-label .infobox-export-sup {\n font-weight: normal;\n}\n\n.infobox-export-sup {\n margin-left: .1em;\n}\n\n.infobox-export-qualifiers {\n margin-left: 0;\n list-style: disc;\n}\n\n.infobox-export-dialog .commons-media-caption,\n.infobox-export-qualifiers .wb-monolingualtext-language-name,\n.infobox-export-qualifiers .infobox-export-calendar {\n display: none;\n}\n\n.infobox-export-dialog .wikibase-kartographer-caption {\n float: left;\n}\n\n@keyframes infobox-export-spin {\n from {\n transform: rotate(0deg);\n } to {\n transform: rotate(360deg);\n }\n}\n\n.infobox-export-novalue,\n.infobox-export-somevalue {\n font-style: italic;\n color: #54595d;\n}\n\n.infobox-export-external-link {\n display: inline-block;\n width: 1em;\n height: 1em;\n background: url( 'https://www.wikidata.org/w/skins/Vector/resources/common/images/external-link-ltr-icon.svg' );\n background-size: cover;\n vertical-align: text-top;\n margin-left: .1em;\n}\n\n.infobox-export-deprecated {}\n.infobox-export-deprecated::before {\n display: block;\n float: left;\n margin-right: .35em;\n content: \" \";\n width: 8px;\n height: 20px;\n background: url(" + d + ");\n}\n\n.infobox-export-loader {\n background-size: 200% 100%;\n background-image: repeating-linear-gradient(135deg, transparent, transparent 8px, #fafbfb 8px, #fafbfb 16px );\n animation: infobox-export-loader 1s linear infinite;\n}\n\n.partial-wikidata.infobox-export-loader {\n background-image: repeating-linear-gradient(135deg, transparent, transparent 8px, #fff 8px, #fff 16px );\n}\n", ""]), t.Z = c
},
527: function(e, t, n) {
var r = n(81),
a = n.n(r),
i = n(645),
o = n.n(i)()(a());
o.push([e.id, "@keyframes infobox-export-loader {\n from {\n background-position-x: -22px;\n }\n to {\n background-position-x: 0;\n }\n}\n\n.infobox-export-preloader {\n /*background-color: #f8f9fa;*/\n /*outline: 1px solid #c8ccd1;*/\n /*border-radius: 2px;*/\n background-size: 200% 100% !important;\n background-image: repeating-linear-gradient(135deg, transparent, transparent 8px, rgba(255, 255, 255, 0.25) 8px, rgba(255, 255, 255, 0.25) 16px ) !important;\n animation: infobox-export-loader 1s linear infinite !important;\n}\n\n.infobox-export-preloader.infobox-export-preloader-dark {\n background-image: repeating-linear-gradient(135deg, transparent, transparent 8px, rgba(200, 204, 209, 0.25) 8px, rgba(200, 204, 209, 0.25) 16px ) !important;\n}\n\n", ""]), t.Z = o
},
645: function(e) {
e.exports = function(e) {
var t = [];
return t.toString = function() {
return this.map((function(t) {
var n = "",
r = void 0 !== t[5];
return t[4] && (n += "@supports (".concat(t[4], ") {")), t[2] && (n += "@media ".concat(t[2], " {")), r && (n += "@layer".concat(t[5].length > 0 ? " ".concat(t[5]) : "", " {")), n += e(t), r && (n += "}"), t[2] && (n += "}"), t[4] && (n += "}"), n
})).join("")
}, t.i = function(e, n, r, a, i) {
"string" == typeof e && (e = [
[null, e, void 0]
]);
var o = {};
if (r)
for (var s = 0; s < this.length; s++) {
var l = this[s][0];
null != l && (o[l] = !0)
}
for (var u = 0; u < e.length; u++) {
var c = [].concat(e[u]);
r && o[c[0]] || (void 0 !== i && (void 0 === c[5] || (c[1] = "@layer".concat(c[5].length > 0 ? " ".concat(c[5]) : "", " {").concat(c[1], "}")), c[5] = i), n && (c[2] ? (c[1] = "@media ".concat(c[2], " {").concat(c[1], "}"), c[2] = n) : c[2] = n), a && (c[4] ? (c[1] = "@supports (".concat(c[4], ") {").concat(c[1], "}"), c[4] = a) : c[4] = "".concat(a)), t.push(c))
}
}, t
}
},
667: function(e) {
e.exports = function(e, t) {
return t || (t = {}), e ? (e = String(e.__esModule ? e.default : e), /^['"].*['"]$/.test(e) && (e = e.slice(1, -1)), t.hash && (e += t.hash), /["'() \t\n]|(%20)/.test(e) || t.needQuotes ? '"'.concat(e.replace(/"/g, '\\"').replace(/\n/g, "\\n"), '"') : e) : e
}
},
81: function(e) {
e.exports = function(e) {
return e[1]
}
},
71: function(e, t, n) {
var r = n(379),
a = n.n(r),
i = n(795),
o = n.n(i),
s = n(569),
l = n.n(s),
u = n(565),
c = n.n(u),
d = n(216),
p = n.n(d),
f = n(589),
v = n.n(f),
h = n(559),
b = {};
b.styleTagTransform = v(), b.setAttributes = c(), b.insert = l().bind(null, "head"), b.domAPI = o(), b.insertStyleElement = p();
a()(h.Z, b), h.Z && h.Z.locals && h.Z.locals
},
194: function(e, t, n) {
var r = n(379),
a = n.n(r),
i = n(795),
o = n.n(i),
s = n(569),
l = n.n(s),
u = n(565),
c = n.n(u),
d = n(216),
p = n.n(d),
f = n(589),
v = n.n(f),
h = n(527),
b = {};
b.styleTagTransform = v(), b.setAttributes = c(), b.insert = l().bind(null, "head"), b.domAPI = o(), b.insertStyleElement = p();
a()(h.Z, b), h.Z && h.Z.locals && h.Z.locals
},
379: function(e) {
var t = [];
function n(e) {
for (var n = -1, r = 0; r < t.length; r++)
if (t[r].identifier === e) {
n = r;
break
} return n
}
function r(e, r) {
for (var i = {}, o = [], s = 0; s < e.length; s++) {
var l = e[s],
u = r.base ? l[0] + r.base : l[0],
c = i[u] || 0,
d = "".concat(u, " ").concat(c);
i[u] = c + 1;
var p = n(d),
f = {
css: l[1],
media: l[2],
sourceMap: l[3],
supports: l[4],
layer: l[5]
};
if (-1 !== p) t[p].references++, t[p].updater(f);
else {
var v = a(f, r);
r.byIndex = s, t.splice(s, 0, {
identifier: d,
updater: v,
references: 1
})
}
o.push(d)
}
return o
}
function a(e, t) {
var n = t.domAPI(t);
n.update(e);
return function(t) {
if (t) {
if (t.css === e.css && t.media === e.media && t.sourceMap === e.sourceMap && t.supports === e.supports && t.layer === e.layer) return;
n.update(e = t)
} else n.remove()
}
}
e.exports = function(e, a) {
var i = r(e = e || [], a = a || {});
return function(e) {
e = e || [];
for (var o = 0; o < i.length; o++) {
var s = n(i[o]);
t[s].references--
}
for (var l = r(e, a), u = 0; u < i.length; u++) {
var c = n(i[u]);
0 === t[c].references && (t[c].updater(), t.splice(c, 1))
}
i = l
}
}
},
569: function(e) {
var t = {};
e.exports = function(e, n) {
var r = function(e) {
if (void 0 === t[e]) {
var n = document.querySelector(e);
if (window.HTMLIFrameElement && n instanceof window.HTMLIFrameElement) try {
n = n.contentDocument.head
} catch (e) {
n = null
}
t[e] = n
}
return t[e]
}(e);
if (!r) throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
r.appendChild(n)
}
},
216: function(e) {
e.exports = function(e) {
var t = document.createElement("style");
return e.setAttributes(t, e.attributes), e.insert(t, e.options), t
}
},
565: function(e, t, n) {
e.exports = function(e) {
var t = n.nc;
t && e.setAttribute("nonce", t)
}
},
795: function(e) {
e.exports = function(e) {
var t = e.insertStyleElement(e);
return {
update: function(n) {
! function(e, t, n) {
var r = "";
n.supports && (r += "@supports (".concat(n.supports, ") {")), n.media && (r += "@media ".concat(n.media, " {"));
var a = void 0 !== n.layer;
a && (r += "@layer".concat(n.layer.length > 0 ? " ".concat(n.layer) : "", " {")), r += n.css, a && (r += "}"), n.media && (r += "}"), n.supports && (r += "}");
var i = n.sourceMap;
i && "undefined" != typeof btoa && (r += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i)))), " */")), t.styleTagTransform(r, e, t.options)
}(t, e, n)
},
remove: function() {
! function(e) {
if (null === e.parentNode) return !1;
e.parentNode.removeChild(e)
}(t)
}
}
}
},
589: function(e) {
e.exports = function(e, t) {
if (t.styleSheet) t.styleSheet.cssText = e;
else {
for (; t.firstChild;) t.removeChild(t.firstChild);
t.appendChild(document.createTextNode(e))
}
}
},
576: function(e) {
e.exports = "data:image/svg+xml,%3Csvg fill=%27none%27 height=%2720%27 viewBox=%270 0 8 20%27 width=%278%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27m0 14v2.2l3.1 3.8h1.8l3.1-3.8v-2.2z%27 fill=%27%23d33%27/%3E%3Cpath d=%27m.5 10.75v-1.5l2-1.75h3l2 1.75v1.5l-2 1.75h-3zm0-6.75v1.5h7v-1.5l-2.875-3.5h-1.25z%27 stroke=%27%23d33%27/%3E%3C/svg%3E"
},
311: function(e) {
e.exports = jQuery
},
119: function(e) {
e.exports = mw
},
366: function(e) {
e.exports = OO.ui
},
170: function(e) {
e.exports = JSON.parse('{"re-circa":"~|≈|təq\\\\.|təqribən|təx\\\\.|təxminən","re-century":"^([IVXivx]{1,5})\\\\s*(əsr?|ə\\\\.)?$","re-dates":["(?<d>\\\\d{1,2})\\\\s+(?<mm>%months-gen%)[,\\\\s]+(?<y>(?:[12]\\\\d|[1-9])\\\\d{2})\\\\.?$"],"re-decade":"((?:[12]\\\\d|[1-9])\\\\d{2})-[lər]","re-since-year":"((?:[12]\\\\d|[1-9])\\\\d{2})","re-bce":"b\\\\.\\\\e\\\\.\\\\ə\\\\.?\\\\s*$","re-ce":"b\\\\.\\\\s\\\\e\\\\.?\\\\s*$","re-present":"^(?:hazırkı\\\\.|hazırkı|indiki)\\\\s+vaxt$","re-unknown":"^(?:\\\\?|bilinmir|naməlum)$","re-min-sec":"^(\\\\d+)\\\\s*(?:d|dəq|dəqiqə)\\\\.?\\\\s*(\\\\d+)\\\\s*(?:s|san|saniyə?)\\\\.?$","re-10_3":"min","re-10_6":"mln|\\\\dM(?:\\\\s|$)|milyon|million","re-10_9":"mlrd|milyard","re-10_12":"trln|trilyon","mark-checked":"Yoxlanılıb","mark-archived":"Arxivləşdirilib","mark-julian":"yuli təqvimi ilə","unit-sec":" san."}')
},
300: function(e) {
e.exports = JSON.parse('{"re-circa":"~|≈|к\\\\.|каля|прык\\\\.|прыкладна|прыб\\\\.|прыблізна","re-century":"^([IVXivx]{1,5})\\\\s*(стагоддз[ея]?|ст\\\\.?)?$","re-dates":["(?<d>\\\\d{1,2})\\\\s+(?<mm>%months-gen%)[,\\\\s]+(?<y>(?:[12]\\\\d|[1-9])\\\\d{2})\\\\.?$"],"re-decade":"((?:[12]\\\\d|[1-9])\\\\d{2})-[ех]","re-since-year":"((?:[12]\\\\d|[1-9])\\\\d{2})\\\\s*(?:год|г\\\\.?)","re-bce":"да\\\\s+н\\\\.*э\\\\.?\\\\s*$","re-ce":"н\\\\.*э\\\\.?\\\\s*$","re-present":"^(?:наш|цяперашні)\\\\s+час$","re-unknown":"^(?:\\\\?|невядома)$","re-10_3":"тыс","re-10_6":"млн|\\\\dM(?:\\\\s|$)|мільён|million","re-10_9":"млрд|мільярд|billion","re-10_12":"трлн|трыльён","mark-checked":"Праверана","mark-archived":"Архівавана","mark-julian":"па юліянскім","unit-sec":" сек."}')
},
622: function(e) {
e.exports = JSON.parse('{"re-circa":"~|≈|ca\\\\.|circa","re-century":"^([IVXivx]{1,5})\\\\s*(Jahrhundert|Jhd\\\\.)?$","re-dates":["(?<d>\\\\d{1,2})\\\\.\\\\s+(?<mm>%months-gen%)[,\\\\s]+(?<y>(?:[12]\\\\d|[1-9])\\\\d{2})\\\\.?"],"re-decade":"((?:[12]\\\\d|[1-9])\\\\d{2})er","re-bce":"v\\\\.\\\\Chr\\\\.\\\\s*$","re-ce":"n\\\\.\\\\Chr\\\\.\\\\s*$","re-present":"^heute$","re-unknown":"^unbekannt$","re-min-sec":"^(\\\\d+)\\\\s*(?:m|min|Minuten?)\\\\.?\\\\s*(\\\\d+)\\\\s*(?:s|sek|Sekunden?)\\\\.?$","re-10_3":"Tausend","re-10_6":"Millionen","re-10_9":"Milliarden","re-10_12":"Billionen","mark-checked":"Überprüft","mark-archived":"Archiviert","mark-julian":"Julianisch","unit-sec":" sek."}')
},
686: function(e) {
e.exports = JSON.parse('{"re-dates":[{"re":"(?<d>\\\\d{1,2})\\\\s(?<mm>%months%)\\\\s+(?<y>(?:[12]\\\\d|[1-9])\\\\d{2})\\\\.?","flags":"i"},{"re":"(?<mm>%months%)\\\\s+(?<d>\\\\d{1,2})[,\\\\s]+(?<y>(?:[12]\\\\d|[1-9])\\\\d{2})\\\\.?","flags":"i"}]}')
},
903: function(e) {
e.exports = JSON.parse('{"re-dates":[{"re":"(?<d>\\\\d{1,2})\\\\s+de\\\\s+(?<mm>%months%)\\\\s+de\\\\s+(?<y>(?:[12]\\\\d|[1-9])\\\\d{2})\\\\.?","flags":"i"}]}')
},
209: function(e) {
e.exports = JSON.parse('{"re-circa":"~|≈|մոտ\\\\.|մոտավորապես","re-century":"^([IVXivx]{1,5})\\\\s*(դարեր?|դդ\\\\.)?$","re-dates":["(?<d>\\\\d{1,2})\\\\s+(?<mm>%months-gen%)[,\\\\s]+(?<y>(?:[12]\\\\d|[1-9])\\\\d{2})\\\\.?$"],"re-decade":"((?:[12]\\\\d|[1-9])\\\\d{2})ներ","re-since-year":"((?:[12]\\\\d|[1-9])\\\\d{2})\\\\s*(?:տարի|տ\\\\.?)","re-bce":"մ\\\\.\\\\թ\\\\.\\\\ա\\\\.?\\\\s*$","re-ce":"մ\\\\.\\\\s*թ\\\\.?\\\\s*$","re-present":"^(?:ներկա\\\\.|ներկա|մեր)\\\\s+ժամանակ$","re-unknown":"^(?:\\\\?|անհայտ)$","re-min-sec":"^(\\\\d+)\\\\s*(?:ր|րոպ|րոպե[ներ]?)\\\\.?\\\\s*(\\\\d+)\\\\s*(?:վ|վրկ|վայրկյան[ներ]?)\\\\.?$","re-10_3":"հազար","re-10_6":"մլն|միլիոն","re-10_9":"մլրդ|միլիարդ","re-10_12":"տրիլիոն","mark-checked":"Ստուգված է","mark-archived":"Արխիվացված է","mark-julian":"Հուլյան","unit-sec":" վայրկյան"}')
},
860: function(e) {
e.exports = JSON.parse('{"re-dates":[{"re":"(?<d>\\\\d{1,2})º?\\\\s+(?<mm>%months%|%months-gen%)\\\\s+(?<y>(?:[12]\\\\d|[1-9])\\\\d{2})\\\\.?$","flags":"i"}],"unit-sec":" secondo"}')
},
517: function(e) {
e.exports = JSON.parse('{"re-dates":["(?<y>(?:[12]\\\\d|[1-9])\\\\d{2})年(?<m>\\\\d{1,2})月(?<d>\\\\d{1,2})日","(?<y>(?:[12]\\\\d|[1-9])\\\\d{2})年(?<m>\\\\d{1,2})月"]}')
},
449: function(e) {
e.exports = JSON.parse('{"re-dates":["(?<y>(?:[12]\\\\d|[1-9])\\\\d{2})년\\\\s+(?<m>\\\\d{1,2})월\\\\s+(?<d>\\\\d{1,2})일","(?<y>(?:[12]\\\\d|[1-9])\\\\d{2})년\\\\s+(?<m>\\\\d{1,2})월"]}')
},
443: function(e) {
e.exports = JSON.parse('{"re-circa":"~|≈|[Aa]pie","re-century":"^([IVXivx]{1,5})\\\\s*(?:amžius|a\\\\.)?$","re-month-dot-year":"^(\\\\d{1,2})\\\\.((?:[12]\\\\d|[1-9])\\\\d{2})(?:\\\\s*m\\\\.)?$","re-dates":[{"re":"(?<y>\\\\d{2,4})\\\\s*m\\\\.\\\\s+(?<mm>%months%)\\\\s+(?<d>\\\\d{1,2})\\\\s*d\\\\.","flags":"i"}],"re-dot-date":"^(\\\\d{1,2})\\\\.(\\\\d{1,2})\\\\.((?:[12]\\\\d|[1-9])\\\\d{2})(?:\\\\s*m\\\\.?)?$","re-decade":"((?:[12]\\\\d|[1-9])\\\\d{2})-as","re-year-postfix":"\\\\s+(m\\\\.?)$","re-since-year":"((?:[12]\\\\d|[1-9])\\\\d{2})\\\\s*(?:m\\\\.)?","re-bce":"pr\\\\.\\\\s+Kr\\\\.?\\\\s*e\\\\.?\\\\s*$","re-ce":"Kr\\\\.?\\\\s*e\\\\.?\\\\s*$","re-present":"^(?:iki )?(?:(?:esamasis|šiais)\\\\s+laikai?s|dabar|nau)$","re-unknown":"^(?:\\\\?|nežinomas)$","re-min-sec":"^(\\\\d+)\\\\s*(?:m|min|minutės)\\\\.?\\\\s*(\\\\d+)\\\\s*(?:s|sek|sekundes)\\\\.?$","re-10_3":"tūkstantis","re-10_6":"\\\\dM(?:\\\\s|$)|milijonas","re-10_9":"milijardo","re-10_12":"trilijonas","mark-checked":"Patikrinta","mark-archived":"Suarchyvuota","mark-julian":"Julijone","unit-sec":" sek."}')
},
653: function(e) {
e.exports = JSON.parse('{"re-circa":"~|≈|c\\\\.|circa","re-century":"^([IVXivx]{1,5})\\\\s*(century|c\\\\.)?$","re-iso-date":"^([012]\\\\d{3})-(\\\\d{1,2})-(\\\\d{1,2})","re-month-year":"^(%months%)\\\\s+((?:[12]\\\\d|[1-9])\\\\d{2})$","re-month-dot-year":"^(\\\\d{1,2})\\\\.((?:[12]\\\\d|[1-9])\\\\d{2})$","re-dates":[{"re":"(?<d>\\\\d{1,2})\\\\.?\\\\s+(?<mm>%months%|%months-gen%)\\\\s+(?<y>[12]\\\\d{3})\\\\.?$","flags":"i"}],"re-dot-date":"^(\\\\d{1,2})\\\\.(\\\\d{1,2})\\\\.((?:[12]\\\\d|[1-9])\\\\d{2})$","re-decade":"((?:[12]\\\\d|[1-9])\\\\d{2})s","re-year":"((?:[12]\\\\d|[1-9])\\\\d{2})\\\\.?(?:[^\\\\d]|$)","re-year-postfix":"\\\\s*$","re-since-year":"((?:[12]\\\\d|[1-9])\\\\d{2})","re-until-year":"\\\\s*[-—]*((?:[12]\\\\d|[1-9])\\\\d{2})","re-bce":"BCE\\\\s*$","re-ce":"CE\\\\s*$","re-present":"^present$","re-unknown":"^unknown$","re-min-sec":"^(\\\\d+)\\\\s*(?:m|min|minutes?)\\\\.?\\\\s*(\\\\d+)\\\\s*(?:s|sec|seconds?)\\\\.?$","re-10_3":"thousand","re-10_6":"million","re-10_9":"billion","re-10_12":"trillion","mark-checked":"Checked","mark-archived":"Archived","mark-julian":"Julian","unit-sec":" sec","units":{},"fixed-values":[]}')
},
816: function(e) {
e.exports = JSON.parse('{"re-circa":"~|≈|[Оо]к\\\\.|[Оо]коло|[Пп]рим\\\\.|[Пп]римерно","re-century":"^(?:[Нн]ач(?:\\\\.|ало)|[Сс]ер(?:\\\\.|едина)|[Кк]он(?:\\\\.|ец))?\\\\s*([IVXivx]{1,5})\\\\s*(?:века?|в\\\\.)?$","re-month-dot-year":"^(\\\\d{1,2})\\\\.((?:[12]\\\\d|[1-9])\\\\d{2})(?:\\\\s*г\\\\.?)?$","re-dates":["(?<d>\\\\d{1,2})\\\\s+(?<mm>%months-gen%)[,\\\\s]+(?<y>(?:[12]\\\\d|[1-9])\\\\d{2})(?:\\\\s?год|\\\\s?г\\\\.?$|\\\\.?$)"],"re-dot-date":"^(\\\\d{1,2})\\\\.(\\\\d{1,2})\\\\.(\\\\d{2,4})(?:\\\\s*г\\\\.?)?$","re-decade":"((?:[12]\\\\d|[1-9])\\\\d{2})-[ех]","re-year-postfix":"\\\\s+(года?|г\\\\.?)$","re-since-year":"((?:[12]\\\\d|[1-9])\\\\d{2})\\\\s*(?:год|г\\\\.?)","re-bce":"до\\\\s+н\\\\.\\\\s*э\\\\.?\\\\s*$","re-ce":"н\\\\.\\\\s*э\\\\.?\\\\s*$","re-present":"^(?:по )?(?:(?:наст\\\\.|настоящее|наше)\\\\s+время|н\\\\.\\\\s*в\\\\.?)$","re-unknown":"^(?:\\\\?|неизвестно)$","re-min-sec":"^(\\\\d+)\\\\s*(?:м|мин|минут[аы]?)\\\\.?\\\\s*(\\\\d+)\\\\s*(?:с|сек|секунд[аы]?)\\\\.?$","re-10_3":"тыс","re-10_6":"млн|\\\\dM(?:\\\\s|$)|миллион|million","re-10_9":"млрд|billion","re-10_12":"трлн","mark-checked":"Проверено","mark-archived":"Архивировано","mark-julian":"по юлианскому","unit-sec":" сек.","units":{"Q531":["св(?:\\\\.|етовых)\\\\s*(?:лет|года?)"],"Q4916":["^€","^EUR"],"Q4917":["^(?:-|US)?\\\\$","долларов(?:\\\\sСША)?","долл.","\\\\$"],"Q7727":["минут"],"Q8146":["иен"],"Q11573":["метр(?:а|ов)"],"Q25344":["^CHF"],"Q41044":["рублей"],"Q81292":["акр(?:а|ов)"],"Q21074767":["(?:в[её]рст²|кв\\\\.\\\\s*в[её]рст)"]},"fixed-values":[{"property":"P21","search":"жен","item":"Q6581072","label":"женский"},{"property":"P21","search":"муж","item":"Q6581097","label":"мужской"},{"property":"P423","search":"прав","item":"Q10927630","label":"праворукий удар"},{"property":"P423","search":"лев","item":"Q10927615","label":"леворукий удар"},{"property":"P552","search":"прав","item":"Q3039938","label":"правша"},{"property":"P552","search":"лев","item":"Q789447","label":"левша"},{"property":"P741","search":"прав","item":"Q3039938","label":"правша"},{"property":"P741","search":"лев","item":"Q789447","label":"левша"}]}')
},
385: function(e) {
e.exports = JSON.parse('{"re-circa":"(?:~|тақр(?:ибан)?|тахм(?:инан)?)\\\\.?","re-unknown":"^(?:\\\\?|номаълум)$","mark-checked":"Тафтишшуда","mark-archived":"Бойгонишуда","unit-sec":" сония"}')
},
594: function(e) {
e.exports = JSON.parse('{"re-circa":"~|≈|y\\\\.|yaklaşık","re-century":"^([IVXivx]{1,5})\\\\s*(yüzyıl|y\\\\.)?$","re-10_3":"bin","re-10_6":"milyon","re-10_9":"milyar","re-10_12":"trilyon","mark-checked":"Kontrol edildi","mark-archived":"Arşivlendi","unit-sec":" saniye"}')
},
45: function(e) {
e.exports = JSON.parse('{"window-header":"Vikiverilənlərə ixrac et","version-string":"Versiya $1","export-button-label":"İxrac et","cancel-button-label":"İmtina et","export-confirmation":"Şablondan bu parametrin göstəricisi Vikiverilənlərə ixrac olunsunmu?","license-cc0":"«Dəyişiklikləri yayımla» düyməsini basarkən siz <a $terms>istifadə şərtləri</a> ilə razılaşdığınızı və redaktələrinizin <a $license>Creative Commons CC0 License</a> lisenziyası əsasında dərcinə razı olduğunuzu bildirmiş olursunuz.","more-precise-value":"Göstəricisi nəzərə alınmayacaq, çünki göstəricisi daha dəqiqdir: $1","already-used-in":" artıq istifadə olunur ","bce-postfix":" b. e. ə.","age-postfix":" əsr","decade-postfix":"-cı illər","no-description":"Təsvirin yüklənməsi mümkün deyil","no-property-data":"$1 parametrinin göstəricisinin verilənləri yoxdur","circa-prefix":"təq.","circa-title":"mənbənin vəziyyəti = təqribən","all-values-saved":"göstəricilər Vikiverilənlərə uğurla əlavə olundu","value-saved":"göstəricisi Vikiverilənlərə uğurla əlavə olundu","value-failed":"Yadda saxlanılarkən xəta yarandı","values-left":" ($1 qalıb)","parsing-error":"Göstəricinin dəyərini təyin etmək mümkün olmadı","unknown-datatype":"Bilinməyən parametr göstəricisi tipi: $1","value-prefix":"Dəyər ","no-value":"mövcud deyil","unknown-value":"bilinmir","grigorian-calendar":"Qriqori","julian-calendar":"Yuli"}')
},
626: function(e) {
e.exports = JSON.parse('{"window-header":"Экспарт у Вікідадзеныя","version-string":"Версія $1","export-button-label":"Экспарт","cancel-button-label":"Адмена","export-confirmation":"Экспартаваць значэнне ўласцівасці з карткі ў Вікідадзеныя?","license-cc0":"Націснуўшы на кнопку «$button», вы згаджаецеся з <a $terms>умовамі выкарыстання</a> і згаджаецеся публікаваць свой унёсак без магчымасці адклікання на ўмовах <a $license>Creative Commons CC0 License</a>.","more-precise-value":"Значэнне выключана, бо ужо маецца больш дакладнае: $1","already-used-in":" ўжо выкарыстоўваецца ў ","bce-postfix":" да н.э.","age-postfix":" стагоддзе","decade-postfix":"-е","no-description":"Немагчыма падгрузіць апісанне","no-property-data":"Адсутнічаюць дадзеныя для ўласцівасці $1","circa-prefix":"каля","circa-title":"акалічнасці крыніцы = каля","all-values-saved":"Усе значэнні паспяхова дададзены ў Вікідадзеныя","value-saved":"Значэнне паспяхова дададзена ў Вікідадзеныя","value-failed":"Памылка пры захаванні","values-left":" (засталося $1)","parsing-error":"Не атрымалася вызначыць значэнне ўласцівасці","unknown-datatype":"Невядомы тып дадзеных ўласцівасці: $1","value-prefix":"Значэнне ","no-value":"адсутнічае","unknown-value":"невядома"}')
},
837: function(e) {
e.exports = JSON.parse('{"window-header":"Schneller Wikidata-Export","version-string":"Version $1","export-button-label":"Exportieren","cancel-button-label":"Abbrechen","export-confirmation":"Eigenschafts-Wert aus einer Infobox nach Wikidta exportieren?","license-cc0":"Durch Klicken auf \\"$button\\" stimmst du den <a $terms>Nutzungsbedingungen</a> zu und stimmst unwiderruflich der Veröffentlichung deines Beitrags unter der <a $license>Creative Commons CC0 Lizenz</a> zu.","more-precise-value":"Der Wert wird ausgelassen, da der genauere Wert bevorzugt wird: $1","already-used-in":" bereits genutzt in ","bce-postfix":" v. Chr.","age-postfix":" Jahrhundert","decade-postfix":"er","no-description":"Laden der Beschreibung nicht möglich","no-property-data":"Keine Daten für Eigenschaft $1 verfügbar","circa-prefix":"ca.","circa-title":"Nachweisumstände = circa","all-values-saved":"Alle Werte erfolgreich zu Wikidata hinzugefügt","value-saved":"Wert erfolgreich zu Wikidata hinzugefügt","value-failed":"Speichern fehlgeschlagen","values-left":" ($1 verbleiben)","parsing-error":"Eigenschaftswert konnte nicht bestimmt werden","unknown-datatype":"Unbekannter Datentyp: $1","value-prefix":"","no-value":"Kein Wert","unknown-value":"Unbekannter Wert","grigorian-calendar":"gregorianisch","julian-calendar":"julianisch"}')
},
52: function(e) {
e.exports = JSON.parse('{"window-header":"Quick Wikidata Export","version-string":"Version $1","export-button-label":"Export","cancel-button-label":"Cancel","export-confirmation":"Export property value from an infobox to Wikidata?","license-cc0":"By clicking \\"$button\\", you agree to the <a $terms>terms of use</a>, and you irrevocably agree to release your contribution under the <a $license>Creative Commons CC0 License</a>.","more-precise-value":"The value is excluded in favor of a more accurate value: $1","already-used-in":" already used in ","bce-postfix":" BCE","age-postfix":" century","decade-postfix":"s","no-description":"Unable to load description","no-property-data":"No data available for property $1","circa-prefix":"c.","circa-title":"sourcing circumstances = circa","all-values-saved":"All values have been successfully added to Wikidata","value-saved":"Value has been successfully added to Wikidata","value-failed":"Save failed","values-left":" ($1 left)","parsing-error":"Could not determine property value","unknown-datatype":"Unknown datatype: $1","value-prefix":"","no-value":"No value","unknown-value":"Unknown value","grigorian-calendar":"Gregorian","julian-calendar":"Julian","export-all":"Export all values to Wikidata","clear-cache":"Clear cache","open-help-page":"Open help page","report-issue":"Report issue"}')
},
678: function(e) {
e.exports = JSON.parse('{"window-header":"Տեղափոխում Վիքիտվյալներ","version-string":"Տարբերակ $1","export-button-label":"Տեղափոխում","cancel-button-label":"Չեղարկել","export-confirmation":"Տեղեկաքարտի հասկացության նշանակությունը տեղափոխե՞լ Վիքիտվյալներ","license-cc0":"Սեղմելով «$button» կոճակին՝ դուք համաձայնվում եք <a $terms> օգտագործման պայմանների հետ</a> և անդառնալիորեն համաձայնվում եք հրապարակել ձեր ներդրումը <a $license>Creative Commons CC0 License</a> արտոնագրի ներքո:","more-precise-value":"նշանակությունը հեռացվել է, արդեն կա ավելի հստակը՝: $1","already-used-in":" արդեն օգտագործվում է ","bce-postfix":" մ թ. ա.","age-postfix":" դար","decade-postfix":"-ականներ","no-description":"Անհնար է բեռնել նկարագրությունը","no-property-data":"$1 հատկության համար տվյալները բացակայում են","circa-prefix":"մոտ.","circa-title":"աղբյուրի հանգամանքները = մոտավորապես","all-values-saved":"Բոլոր արժեքները բարեհաջող ավելացված է Վիքիտվյալներում","value-saved":"արժեքը բարեհաջող ավելացված է Վիքիտվյալներում","value-failed":"Պահպանման սխալ","values-left":" (մնաց $1)","parsing-error":"Չհաջողվեց որոշել հասկացության նշանակությունը","unknown-datatype":"Հասկացության տվյալների անհայտ տեսակ. $1","value-prefix":"Նշանակություն ","no-value":"բացակայում է","unknown-value":"անհայտ","grigorian-calendar":"Գրիգորյան","julian-calendar":"Հուլյան"}')
},
39: function(e) {
e.exports = JSON.parse('{"window-header":"Eksportuoti prie Vikiduomenų","version-string":"Versija $1","export-button-label":"Eksportuoti","cancel-button-label":"Atšaukti","export-confirmation":"Eksportuoti nuosavybės vertę iš kortelės prie Vikiduomenų?","license-cc0":"Spustelėdami mygtuką „$button“, sutinkate su <a $terms>naudojimo sąlygomis</a> ir neatšaukiamai sutinkate skelbti savo indėlį pagal sąlygas <a $license>Creative Commons CC0 License</a>.","more-precise-value":"Vertė neįtraukta, nes jau yra tikslesnis: $1","already-used-in":" jau naudojamas ","bce-postfix":" pr. Kr. e.","age-postfix":" amžiaus","decade-postfix":"-as","no-description":"Nepavyko įkelti aprašo","no-property-data":"Trūksta duomenų apie nuosavybę $1","circa-prefix":"apie","circa-title":"šaltinio aplinkybės = apie","all-values-saved":"Vertės sėkmingai pridėtos prie Vikiduomenų","value-saved":"Vertė sėkmingai pridėta prie Vikiduomenų","value-failed":"Klaida išsaugont","values-left":" (paliko $1)","parsing-error":"Nepavyko nustatyti turto vertės","unknown-datatype":"Nežinomas nuosavybės duomenų tipas: $1","value-prefix":"Reikšmė ","no-value":"nėra","unknown-value":"nežinomas","grigorian-calendar":"Grigaliaus","julian-calendar":"Julianas","export-all":"Eksportuokite visas vertes prie Vikiduomenų"}')
},
482: function(e) {
e.exports = JSON.parse('{"window-header":"Экспорт в Викиданные","version-string":"Версия $1","export-button-label":"Экспорт","cancel-button-label":"Отмена","export-confirmation":"Экспортировать значение свойства из карточки в Викиданные?","license-cc0":"Нажав на кнопку «$button», вы соглашаетесь с <a $terms>условиями использования</a> и безотзывно соглашаетесь публиковать свой вклад на условиях <a $license>Creative Commons CC0 License</a>.","more-precise-value":"Значение исключено, так как уже имеется более точное: $1","already-used-in":" уже используется в ","bce-postfix":" до н. э.","age-postfix":" век","decade-postfix":"-е","no-description":"Невозможно подгрузить описание","no-property-data":"Отсутствуют данные для свойства $1","circa-prefix":"ок.","circa-title":"обстоятельства источника = около","all-values-saved":"Все значения успешно добавлены в Викиданные","value-saved":"Значение успешно добавлено в Викиданные","value-failed":"Ошибка при сохранении","values-left":" (осталось $1)","parsing-error":"Не удалось определить значение свойства","unknown-datatype":"Неизвестный тип данных свойства: $1","value-prefix":"Значение ","no-value":"отсутствует","unknown-value":"неизвестно","grigorian-calendar":"Григорианский","julian-calendar":"Юлианский","export-all":"Экспортировать все значения в Викиданные","clear-cache":"Очистить кэш","open-help-page":"Открыть справку","report-issue":"Сообщить о проблеме"}')
},
425: function(e) {
e.exports = JSON.parse('{"more-precise-value":"Мазмуни хориҷ карда шуд, алкай дақиқтар мавҷуд аст: $1","no-description":"Боргирии тавзеҳот имконпазир нест","circa-title":"ҳолати сарчашма = назди","all-values-saved":"Арзиши бомуваффақият ба Викидода илова шуд","value-saved":"Арзиши бомуваффақият ба Викидода илова шуд","value-failed":"Хато дар ҳангоми захира","value-prefix":"Арзиши ","unknown-value":"номаълум"}')
}
},
t = {};
function n(r) {
var a = t[r];
if (void 0 !== a) return a.exports;
var i = t[r] = {
id: r,
exports: {}
};
return e[r](i, i.exports, n), i.exports
}
n.m = e, n.n = function(e) {
var t = e && e.__esModule ? function() {
return e.default
} : function() {
return e
};
return n.d(t, {
a: t
}), t
}, n.d = function(e, t) {
for (var r in t) n.o(t, r) && !n.o(e, r) && Object.defineProperty(e, r, {
enumerable: !0,
get: t[r]
})
}, n.o = function(e, t) {
return Object.prototype.hasOwnProperty.call(e, t)
}, n.b = document.baseURI || self.location.href, n.nc = void 0,
function() {
var e = function(e, t, n, r) {
return new(n || (n = Promise))((function(a, i) {
function o(e) {
try {
l(r.next(e))
} catch (e) {
i(e)
}
}
function s(e) {
try {
l(r.throw(e))
} catch (e) {
i(e)
}
}
function l(e) {
var t;
e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
e(t)
}))).then(o, s)
}
l((r = r.apply(e, t || [])).next())
}))
},
t = function(e, t) {
var n, r, a, i, o = {
label: 0,
sent: function() {
if (1 & a[0]) throw a[1];
return a[1]
},
trys: [],
ops: []
};
return i = {
next: s(0),
throw: s(1),
return: s(2)
}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this
}), i;
function s(i) {
return function(s) {
return function(i) {
if (n) throw new TypeError("Generator is already executing.");
for (; o;) try {
if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a;
switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) {
case 0:
case 1:
a = i;
break;
case 4:
return o.label++, {
value: i[1],
done: !1
};
case 5:
o.label++, r = i[1], i = [0];
continue;
case 7:
i = o.ops.pop(), o.trys.pop();
continue;
default:
if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
o = 0;
continue
}
if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) {
o.label = i[1];
break
}
if (6 === i[0] && o.label < a[1]) {
o.label = a[1], a = i;
break
}
if (a && o.label < a[2]) {
o.label = a[2], o.ops.push(i);
break
}
a[2] && o.ops.pop(), o.trys.pop();
continue
}
i = t.call(e, o)
} catch (e) {
i = [6, e], r = 0
} finally {
n = a = 0
}
if (5 & i[0]) throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
}
}([i, s])
}
}
},
r = null,
a = null;
function i() {
if (null === r) {
var e = n(119);
r = new e.Api
}
return r
}
function o() {
if (null === a) {
var e = n(119);
a = new e.ForeignApi("//www.wikidata.org/w/api.php")
}
return a
}
function s(n) {
return e(this, void 0, void 0, (function() {
return t(this, (function(e) {
return n.titles && n.titles.length > 20 ? [2, i().post(n)] : [2, i().get(n)]
}))
}))
}
function l(n) {
return e(this, void 0, void 0, (function() {
return t(this, (function(e) {
return n.titles && n.titles.length > 20 ? [2, o().post(n)] : [2, o().get(n)]
}))
}))
}
function u(n, r) {
return e(this, void 0, void 0, (function() {
return t(this, (function(e) {
return [2, i().getMessages(n, {
amlang: r
})]
}))
}))
}
function c(r) {
return e(this, void 0, void 0, (function() {
var e;
return t(this, (function(t) {
return e = n(311), "https://query.wikidata.org/sparql?format=json", [2, e.post("https://query.wikidata.org/sparql?format=json", {
query: r
})]
}))
}))
}
var d = function(e, t, n, r) {
return new(n || (n = Promise))((function(a, i) {
function o(e) {
try {
l(r.next(e))
} catch (e) {
i(e)
}
}
function s(e) {
try {
l(r.throw(e))
} catch (e) {
i(e)
}
}
function l(e) {
var t;
e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
e(t)
}))).then(o, s)
}
l((r = r.apply(e, t || [])).next())
}))
},
p = function(e, t) {
var n, r, a, i, o = {
label: 0,
sent: function() {
if (1 & a[0]) throw a[1];
return a[1]
},
trys: [],
ops: []
};
return i = {
next: s(0),
throw: s(1),
return: s(2)
}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this
}), i;
function s(i) {
return function(s) {
return function(i) {
if (n) throw new TypeError("Generator is already executing.");
for (; o;) try {
if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a;
switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) {
case 0:
case 1:
a = i;
break;
case 4:
return o.label++, {
value: i[1],
done: !1
};
case 5:
o.label++, r = i[1], i = [0];
continue;
case 7:
i = o.ops.pop(), o.trys.pop();
continue;
default:
if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
o = 0;
continue
}
if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) {
o.label = i[1];
break
}
if (6 === i[0] && o.label < a[1]) {
o.label = a[1], a = i;
break
}
if (a && o.label < a[2]) {
o.label = a[2], o.ops.push(i);
break
}
a[2] && o.ops.pop(), o.trys.pop();
continue
}
i = t.call(e, o)
} catch (e) {
i = [6, e], r = 0
} finally {
n = a = 0
}
if (5 & i[0]) throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
}
}([i, s])
}
}
};
function f(e) {
var t = n(311);
return t.grep(e, (function(n, r) {
return r === t.inArray(n, e)
}))
}
function v(e, t) {
return (Math.floor(Math.random() * (t - e + 1)) + e).toString(16)
}
function h(e) {
return e.slice(0, 1).toLowerCase() + e.slice(1)
}
function b(e) {
return e.slice(0, 1).toUpperCase() + e.slice(1)
}
function m(e, t) {
return t.split(".").reduce((function(e, t) {
return null == e ? void 0 : e[t]
}), e)
}
function y(e, t, n) {
t.push("en");
for (var r = 0, a = t; r < a.length; r++) {
var i = a[r];
if (e[i]) return e[i].value
}
return Object.values(e).length ? Object.values(e).shift().value : n || ""
}
function g(e) {
return d(this, void 0, void 0, (function() {
return p(this, (function(t) {
return [2, new Promise((function(t) {
return setTimeout(t, e)
}))]
}))
}))
}
function w(e) {
return !e || /^\s+$/.test(e) ? "" : (e = e.trim(), /\d/.test(e[0]) && (e = " " + e), e.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&"))
}
function x(e, t) {
return d(this, void 0, void 0, (function() {
var n;
return p(this, (function(r) {
switch (r.label) {
case 0:
return [4, k(e, [t])];
case 1:
return (n = r.sent()).length ? [2, n.pop()] : [2, void 0]
}
}))
}))
}
function k(e, t) {
return d(this, void 0, void 0, (function() {
return p(this, (function(n) {
return Array.isArray(t) && t.length ? [2, new Promise((function(n, r) {
var a = indexedDB.open(e, 3);
a.onerror = function() {
return r(Error("IndexedDB error: " + a.error))
}, a.onupgradeneeded = function() {
var t = a.result;
t.objectStoreNames.contains(e) && t.deleteObjectStore(e);
t.createObjectStore(e, {
keyPath: "id"
})
}, a.onsuccess = function() {
var r = a.result.transaction([e], "readonly").objectStore(e);
Promise.all(t.map((function(e) {
return new Promise((function(t, n) {
var a = r.get(e);
a.onerror = function() {
return n(Error("IDBObjectStore error: " + a.error))
}, a.onsuccess = function() {
return t(a.result)
}
}))
}))).then((function(e) {
return n(e.filter((function(e) {
return e
})))
}))
}
}))] : [2, []]
}))
}))
}
function I(e, t) {
return d(this, void 0, void 0, (function() {
return p(this, (function(n) {
return t.length ? [2, new Promise((function(n, r) {
var a = indexedDB.open(e, 3);
a.onerror = function() {
r(Error("IndexedDB error: " + a.error))
}, a.onupgradeneeded = function() {
var t = a.result;
t.objectStoreNames.contains(e) && t.deleteObjectStore(e);
t.createObjectStore(e, {
keyPath: "id"
})
}, a.onsuccess = function() {
for (var i, o = a.result.transaction([e], "readwrite").objectStore(e), s = 0, l = t; s < l.length; s++) {
var u = l[s];
i = o.put(u)
}
i.onerror = function() {
return r(Error("IDBObjectStore error: " + i.error))
}, i.onsuccess = function() {
return n(i.result)
}
}
}))] : [2]
}))
}))
}
var P = n(119),
S = P.config.get("wgContentLanguage"),
C = P.user.options.get("language") || S,
E = f([C, S, "en"]),
T = {
ain: "Q20968488",
akk: "Q32332",
atv: "Q2640863",
bua: "Q33120",
chm: "Q973685",
dar: "Q32332",
enf: "Q29942",
evn: "Q30004",
izh: "Q33559",
jdt: "Q56495",
jmy: "Q53493410",
orv: "Q35228",
phn: "Q36734",
sga: "Q35308",
yrk: "Q36452"
};
function O(e) {
var t = e.mainsnak.datavalue.value;
return t.language in T && ("qualifiers" in e || (e.qualifiers = {}), e.qualifiers.P407 = [U("P407", T[t.language])], e.mainsnak.datavalue.value.language = "mis"), e
}
var _, j = function(e, t, n, r) {
return new(n || (n = Promise))((function(a, i) {
function o(e) {
try {
l(r.next(e))
} catch (e) {
i(e)
}
}
function s(e) {
try {
l(r.throw(e))
} catch (e) {
i(e)
}
}
function l(e) {
var t;
e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
e(t)
}))).then(o, s)
}
l((r = r.apply(e, t || [])).next())
}))
},
q = function(e, t) {
var n, r, a, i, o = {
label: 0,
sent: function() {
if (1 & a[0]) throw a[1];
return a[1]
},
trys: [],
ops: []
};
return i = {
next: s(0),
throw: s(1),
return: s(2)
}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this
}), i;
function s(i) {
return function(s) {
return function(i) {
if (n) throw new TypeError("Generator is already executing.");
for (; o;) try {
if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a;
switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) {
case 0:
case 1:
a = i;
break;
case 4:
return o.label++, {
value: i[1],
done: !1
};
case 5:
o.label++, r = i[1], i = [0];
continue;
case 7:
i = o.ops.pop(), o.trys.pop();
continue;
default:
if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
o = 0;
continue
}
if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) {
o.label = i[1];
break
}
if (6 === i[0] && o.label < a[1]) {
o.label = a[1], a = i;
break
}
if (a && o.label < a[2]) {
o.label = a[2], o.ops.push(i);
break
}
a[2] && o.ops.pop(), o.trys.pop();
continue
}
i = t.call(e, o)
} catch (e) {
i = [6, e], r = 0
} finally {
n = a = 0
}
if (5 & i[0]) throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
}
}([i, s])
}
}
},
N = n(311),
Q = n(119),
D = Q.config.get("wgWikibaseItemId"),
L = {};
function V() {
for (var e = "xx-x-x-x-xxx", t = "", n = 0; n < e.length; n++)
if ("-" !== e.charAt(n)) {
var r = void 0;
for (r = 3 === n ? v(16384, 20479) : 4 === n ? v(32768, 49151) : v(0, 65535); r.length < 4;) r = "0" + r;
t += r
} else t += "-";
return D + "$" + t
}
function A(e) {
var t, n = (t = e, JSON.parse(JSON.stringify(t)));
return n.meta = null, JSON.stringify(n)
}
function U(e, t) {
return {
snaktype: "value",
property: e,
datavalue: {
type: "wikibase-entityid",
value: {
"entity-type": "item",
"numeric-id": parseInt(t.replace("Q", ""), 10),
id: t
}
},
datatype: "wikibase-item"
}
}
function z(e, t) {
return {
mainsnak: e,
type: "statement",
id: V(),
rank: "normal",
references: t,
meta: {}
}
}
function W(e, t) {
L[e] = {
label: y(null == t ? void 0 : t.labels, [C, S], e),
description: y(null == t ? void 0 : t.descriptions, [C, S])
}
}
function J(e) {
return j(this, void 0, void 0, (function() {
var t, n, r, a;
return q(this, (function(i) {
switch (i.label) {
case 0:
return t = e.filter((function(e) {
return !L[e]
})), t.length ? [4, l({
action: "wbgetentities",
ids: t,
languages: E,
props: ["labels", "descriptions"]
})] : [2];
case 1:
for (n = i.sent(), r = 0; r < t.length; r++) W(a = e[r], n.entities[a]);
return [2]
}
}))
}))
}
function M(e) {
return j(this, void 0, void 0, (function() {
return q(this, (function(t) {
switch (t.label) {
case 0:
return L[e] ? [3, 2] : [4, J([e])];
case 1:
t.sent(), t.label = 2;
case 2:
return [2, L[e]]
}
}))
}))
}
function R(e, t, n) {
var r, a;
return j(this, void 0, void 0, (function() {
var i, o, s, u, c, d, p, v, h;
return q(this, (function(b) {
switch (b.label) {
case 0:
return t.length ? (i = t.map((function(e) {
return e.language
})), i = f(i = N.merge(i, E)), [4, l({
action: "wbgetentities",
sites: o = t.map((function(e) {
return e.project
})),
languages: i,
props: ["labels", "descriptions", "claims", "sitelinks"],
titles: t.map((function(e) {
return e.label
})),
sitefilter: o
})]) : [2, []];
case 1:
if (!(s = b.sent()).success) return [2, []];
for (d in u = [], c = function(r) {
if (!s.entities.hasOwnProperty(r) || !r.match(/^Q/)) return "continue";
var a = s.entities[r];
if (G(null == a ? void 0 : a.claims, "P31").includes("Q4167410")) return "continue";
W(r, a);
var i, o, l = !1,
c = ["P17", "P31", "P131", "P279", "P361"],
d = function(e) {
return s.entities.hasOwnProperty(e) && e.match(/^Q/) && r !== e ? (l = c.find((function(t) {
var n, a;
return ((null === (a = null === (n = s.entities[e]) || void 0 === n ? void 0 : n.claims) || void 0 === a ? void 0 : a[t]) || []).find((function(t) {
var n, a, l = ((null === (a = null === (n = t.mainsnak) || void 0 === n ? void 0 : n.datavalue) || void 0 === a ? void 0 : a.value) || {}).id === r;
return l && (o = e, i = s.entities[e]), l
}))
})), l ? "break" : void 0) : "continue"
};
for (var p in s.entities) {
if ("break" === d(p)) break
}
var f = z(U(e, r), n);
l && i && (f.meta.subclassItem = {
"entity-type": "item",
"numeric-id": parseInt(o.replace("Q", ""), 10),
id: o
});
var v = y(a.labels, [S, C]).toLowerCase(),
h = t.filter((function(e) {
if (e.label.toLowerCase() === v) return !0;
for (var t in a.sitelinks)
if (a.sitelinks.hasOwnProperty(t) && e.label.toLowerCase() === a.sitelinks[t].title.toLowerCase()) return !0;
return !1
}));
1 === h.length && (f.meta.title = h.shift(), f.qualifiers = f.meta.title.qualifiers), u.push(f)
}, s.entities) c(d);
for (p = [], v = function(e) {
var t = null === (a = null === (r = u[e]) || void 0 === r ? void 0 : r.meta) || void 0 === a ? void 0 : a.title;
if (!(null == t ? void 0 : t.redirect)) return "continue";
u.forEach((function(e) {
var n, r, a, i;
(null === (r = null === (n = null == e ? void 0 : e.meta) || void 0 === n ? void 0 : n.title) || void 0 === r ? void 0 : r.label) === (null == t ? void 0 : t.redirect) && (null === (i = null === (a = null == e ? void 0 : e.meta) || void 0 === a ? void 0 : a.title) || void 0 === i ? void 0 : i.project) === t.project && "value" === e.mainsnak.snaktype && p.push(e.mainsnak.datavalue.value.id)
}))
}, h = 0; h < u.length; h++) v(h);
return [2, u = u.filter((function(e) {
return !p.includes(e.mainsnak.datavalue.value.id)
}))]
}
}))
}))
}
function F(e) {
return j(this, void 0, void 0, (function() {
return q(this, (function(t) {
return [2, o().postWithToken("csrf", {
action: "wbsetclaim",
claim: A(e),
baserevid: _,
tags: "InfoboxExport gadget"
}).then((function(e, t) {
var n;
return (null === (n = null == t ? void 0 : t.pageinfo) || void 0 === n ? void 0 : n.lastrevid) && (_ = t.pageinfo.lastrevid), null
})).catch((function(e, t) {
var n;
return (null === (n = null == t ? void 0 : t.error) || void 0 === n ? void 0 : n.info) || "Network error"
}))]
}))
}))
}
function X(e) {
return j(this, void 0, void 0, (function() {
var t, n;
return q(this, (function(r) {
switch (r.label) {
case 0:
return [4, l({
action: "wbformatvalue",
generate: "text/html; disposition=verbose",
datavalue: JSON.stringify(e.datavalue),
datatype: e.datatype,
uselang: C
})];
case 1:
return (t = r.sent()).errors ? (n = t.errors[0]["*"], [2, N("<span>").addClass("error").text(n)]) : [2, N("<span>").addClass("infobox-export-main-label").html(t.result)]
}
}))
}))
}
function B(e) {
return {
snaktype: "novalue",
property: e
}
}
function G(e, t) {
return void 0 === (null == e ? void 0 : e[t]) ? [] : e[t].map((function(e) {
var t, n;
return null === (n = null === (t = e.mainsnak.datavalue) || void 0 === t ? void 0 : t.value) || void 0 === n ? void 0 : n.id
})).filter((function(e) {
return e
}))
}
var Z = function(e, t, n, r) {
return new(n || (n = Promise))((function(a, i) {
function o(e) {
try {
l(r.next(e))
} catch (e) {
i(e)
}
}
function s(e) {
try {
l(r.throw(e))
} catch (e) {
i(e)
}
}
function l(e) {
var t;
e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
e(t)
}))).then(o, s)
}
l((r = r.apply(e, t || [])).next())
}))
},
H = function(e, t) {
var n, r, a, i, o = {
label: 0,
sent: function() {
if (1 & a[0]) throw a[1];
return a[1]
},
trys: [],
ops: []
};
return i = {
next: s(0),
throw: s(1),
return: s(2)
}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this
}), i;
function s(i) {
return function(s) {
return function(i) {
if (n) throw new TypeError("Generator is already executing.");
for (; o;) try {
if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a;
switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) {
case 0:
case 1:
a = i;
break;
case 4:
return o.label++, {
value: i[1],
done: !1
};
case 5:
o.label++, r = i[1], i = [0];
continue;
case 7:
i = o.ops.pop(), o.trys.pop();
continue;
default:
if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
o = 0;
continue
}
if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) {
o.label = i[1];
break
}
if (6 === i[0] && o.label < a[1]) {
o.label = a[1], a = i;
break
}
if (a && o.label < a[2]) {
o.label = a[2], o.ops.push(i);
break
}
a[2] && o.ops.pop(), o.trys.pop();
continue
}
i = t.call(e, o)
} catch (e) {
i = [6, e], r = 0
} finally {
n = a = 0
}
if (5 & i[0]) throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
}
}([i, s])
}
}
},
K = ["january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"],
Y = K;
function ee() {
return K
}
function te() {
return Y
}
function ne() {
return Z(this, void 0, void 0, (function() {
var e, t, n, r, a, i, o, s, l, c, d;
return H(this, (function(p) {
switch (p.label) {
case 0:
if (e = he("months"), t = he("monthsGen"), void 0 !== e && void 0 !== t) return K = e, Y = t, [2];
for (n = [], r = 0, a = K; r < a.length; r++) d = a[r], n.push("may" === d ? "may long" : d), n.push(d + "-gen");
return [4, u(n, S)];
case 1:
for (i = p.sent(), o = [], s = [], l = 0, c = K; l < c.length; l++) d = c[l], o.push(i["may" === d ? "may long" : d]), s.push(i[d + "-gen"]);
return Y = s, be("months", K = o), be("monthsGen", Y), me(), [2]
}
}))
}))
}
var re = function() {
return re = Object.assign || function(e) {
for (var t, n = 1, r = arguments.length; n < r; n++)
for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
return e
}, re.apply(this, arguments)
},
ae = function(e, t, n, r) {
return new(n || (n = Promise))((function(a, i) {
function o(e) {
try {
l(r.next(e))
} catch (e) {
i(e)
}
}
function s(e) {
try {
l(r.throw(e))
} catch (e) {
i(e)
}
}
function l(e) {
var t;
e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
e(t)
}))).then(o, s)
}
l((r = r.apply(e, t || [])).next())
}))
},
ie = function(e, t) {
var n, r, a, i, o = {
label: 0,
sent: function() {
if (1 & a[0]) throw a[1];
return a[1]
},
trys: [],
ops: []
};
return i = {
next: s(0),
throw: s(1),
return: s(2)
}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this
}), i;
function s(i) {
return function(s) {
return function(i) {
if (n) throw new TypeError("Generator is already executing.");
for (; o;) try {
if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a;
switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) {
case 0:
case 1:
a = i;
break;
case 4:
return o.label++, {
value: i[1],
done: !1
};
case 5:
o.label++, r = i[1], i = [0];
continue;
case 7:
i = o.ops.pop(), o.trys.pop();
continue;
default:
if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
o = 0;
continue
}
if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) {
o.label = i[1];
break
}
if (6 === i[0] && o.label < a[1]) {
o.label = a[1], a = i;
break
}
if (a && o.label < a[2]) {
o.label = a[2], o.ops.push(i);
break
}
a[2] && o.ops.pop(), o.trys.pop();
continue
}
i = t.call(e, o)
} catch (e) {
i = [6, e], r = 0
} finally {
n = a = 0
}
if (5 & i[0]) throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
}
}([i, s])
}
}
},
oe = {
version: "4.0.2",
commit: "480dbbf0a899064c3fa2a35a8bba6f71a667b0c1",
project: n(119).config.get("wgDBname"),
references: {},
units: {},
fixedValues: [],
centuries: ["I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV", "XVI", "XVII", "XVIII", "XIX", "XX", "XXI", "XXII"],
properties: {}
},
se = {
az: n(170),
be: n(300),
de: n(622),
en: n(686),
es: n(903),
hy: n(209),
it: n(860),
ja: n(517),
ko: n(449),
lt: n(443),
mul: n(653),
ru: n(816),
tg: n(385),
tr: n(594)
},
le = ["Q47574", "Q29479187"],
ue = "infoboxExportProperties",
ce = "infoboxExportTypes",
de = "infoboxExportUnits",
pe = "infoboxExportConfig";
function fe(e) {
"" === e && (e = "^@{999}$");
var t = "";
return "string" != typeof e && (t = e.flags, e = e.re), e = (e = e.replace("%months%", ee().join("|"))).replace("%months-gen%", te().join("|")), new RegExp(e, t)
}
function ve(e) {
var t;
if (S in se && (t = m(se[S], e)), void 0 === t && (t = m(se.mul, e)), void 0 !== t) return e.match(/^re-/) && (t = Array.isArray(t) ? t.map((function(e) {
return fe(e)
})) : fe(t)), t
}
function he(e) {
var t = m(oe, e);
return void 0 !== t ? t : ve(e)
}
function be(e, t) {
! function(e, t, n) {
var r = t.split(".");
r.reduce((function(e, t, a) {
return a < r.length - 1 ? "object" == typeof e[t] && null !== e[t] || (e[t] = {}) : e[t] = n, e[t]
}), e)
}(oe, e, t)
}
function me() {
var e = oe;
for (var t in e) {
var n = oe[t];
n instanceof RegExp && (e[t] = n.source)
}
localStorage.setItem(pe, JSON.stringify(e))
}
function ye(e) {
return ae(this, void 0, void 0, (function() {
return ie(this, (function(t) {
switch (t.label) {
case 0:
return [4, x(ue, e)];
case 1:
return [2, t.sent()]
}
}))
}))
}
function ge(e) {
return ae(this, void 0, void 0, (function() {
return ie(this, (function(t) {
switch (t.label) {
case 0:
return [4, k(ue, e)];
case 1:
return [2, t.sent()]
}
}))
}))
}
function we(e) {
return ae(this, void 0, void 0, (function() {
var t, n;
return ie(this, (function(r) {
switch (r.label) {
case 0:
return t = Date.now() + 864e5, n = e.map((function(e) {
return re(re({}, e), {
expires: t
})
})), [4, I(ue, n)];
case 1:
return r.sent(), [2]
}
}))
}))
}
function xe(e) {
return ae(this, void 0, void 0, (function() {
return ie(this, (function(t) {
switch (t.label) {
case 0:
return [4, x(ce, e)];
case 1:
return [2, t.sent()]
}
}))
}))
}
function ke(e) {
return ae(this, void 0, void 0, (function() {
var t, n;
return ie(this, (function(r) {
switch (r.label) {
case 0:
return t = Date.now() + 864e5, n = e.map((function(e) {
return re(re({}, e), {
expires: t
})
})), [4, I(ce, n)];
case 1:
return r.sent(), [2]
}
}))
}))
}
function $e(e) {
return ae(this, void 0, void 0, (function() {
var t;
return ie(this, (function(n) {
switch (n.label) {
case 0:
return [4, x(de, e)];
case 1:
return [2, null == (t = n.sent()) ? void 0 : t.search]
}
}))
}))
}
function Ie(e) {
return ae(this, void 0, void 0, (function() {
var t, n;
return ie(this, (function(r) {
switch (r.label) {
case 0:
return t = Date.now() + 2592e5, n = Object.keys(e).map((function(n) {
return {
id: n,
search: e[n],
expires: t
}
})), [4, I(de, n)];
case 1:
return r.sent(), [2]
}
}))
}))
}
function Pe(e, t) {
var n, r = (null === (n = null == oe ? void 0 : oe.units) || void 0 === n ? void 0 : n[e]) || [];
if (r.length) return [];
if (ve("units.".concat(e)) && (r = ve("units.".concat(e))), t.labels && t.labels[S] && r.push(w(t.labels[S].value)), t.aliases && t.aliases[S])
for (var a in t.aliases[S]) r.push(w(t.aliases[S][a].value));
if (t.claims && t.claims.P5061)
for (var a in t.claims.P5061) {
var i = t.claims.P5061[a];
i.mainsnak && i.mainsnak.datavalue && i.mainsnak.datavalue.value && r.push(w(i.mainsnak.datavalue.value.text))
}
return r
}
function Se(e) {
return ae(this, void 0, void 0, (function() {
var t, n, r, a;
return ie(this, (function(i) {
switch (i.label) {
case 0:
t = 0, i.label = 1;
case 1:
return t < f(e).length ? [4, l({
action: "wbgetentities",
languages: S,
props: ["labels", "aliases", "claims"],
ids: f(e).slice(t, t + 50)
})] : [3, 5];
case 2:
if (!(n = i.sent()).success) return [2];
for (a in r = {}, n.entities) r[a] = Pe(a, n.entities[a]);
return [4, Ie(r)];
case 3:
i.sent(), i.label = 4;
case 4:
return t += 50, [3, 1];
case 5:
return [2]
}
}))
}))
}
function Ce(e, t) {
var n, r, a, i, o, s;
return ae(this, void 0, void 0, (function() {
var l, u, d, p, v;
return ie(this, (function(h) {
switch (h.label) {
case 0:
return [4, c("SELECT DISTINCT (SUBSTR(STR(?unit), 32) as ?unitId) ?unitLabel ?unitAltLabel ?code WITH {\n\tSELECT DISTINCT ?unit {\n\t\t".concat((null == t ? void 0 : t.length) ? "VALUES ?unit {wd:".concat(t.join(" wd:"), "}.") : "", "\n\t\tVALUES ?type {wd:").concat(e.join(" wd:"), '}.\n\t\t?unit wdt:P31?/wdt:P279* ?type.\n\t}} AS %Q {\n\t\tINCLUDE %Q\n\t\tOPTIONAL { ?unit wdt:P5061 ?code. FILTER(lang(?code) IN ("').concat(S, '","mul")) }.\n\t\tSERVICE wikibase:label { bd:serviceParam wikibase:language "').concat(S, '" }\n\t}'))];
case 1:
if (l = h.sent(), !(null === (r = null === (n = null == l ? void 0 : l.results) || void 0 === n ? void 0 : n.bindings) || void 0 === r ? void 0 : r.length)) return [2, []];
u = [], d = {}, p = function(e) {
var t, n, r;
return ie(this, (function(c) {
switch (c.label) {
case 0:
return t = l.results.bindings[e], [4, $e(n = t.unitId.value)];
case 1:
return void 0 !== (r = c.sent()) ? (r.length && u.push(n), [2, "continue"]) : (r = ve("units.".concat(n)) || [], (null === (a = t.unitLabel) || void 0 === a ? void 0 : a.value) !== n && r.push(w(null === (i = t.unitLabel) || void 0 === i ? void 0 : i.value)), r.push(w(null === (o = t.code) || void 0 === o ? void 0 : o.value)), (null === (s = t.unitAltLabel) || void 0 === s ? void 0 : s.value) && t.unitAltLabel.value.split(",").forEach((function(e) {
r.push(w(e))
})), r = f(r.filter((function(e) {
return e
}))), d[n] = r, r.length && u.push(n), [2])
}
}))
}, v = 0, h.label = 2;
case 2:
return v < l.results.bindings.length ? [5, p(v)] : [3, 5];
case 3:
h.sent(), h.label = 4;
case 4:
return v++, [3, 2];
case 5:
return [4, Ie(d)];
case 6:
return h.sent(), [2, u]
}
}))
}))
}
function Ee(e) {
var t;
for (var n in e) {
var r = e[n];
if ("deprecated" !== r.rank && "value" === r.mainsnak.snaktype)
if (t) {
if ("preferred" === r.rank) {
t = r;
break
}
} else t = r
}
return t
}
function Te(e) {
var t, n, r, a, i, o, s, u, c, d, p, v, h, m, g, w, x, k, $, I, P, T, O, _, j, q, N, Q, D, L, V, A, U, z, W, J, M, R, F, X, B, G, Z, H, K, Y, ee, te, ne, re, oe, se;
return ae(this, void 0, void 0, (function() {
var ae, le, ue, ce, de, pe, fe, ve, he, be, me, ye, ge, xe, ke, $e, Ie, Pe, Se, Te, Oe, _e, je, qe, Ne;
return ie(this, (function(ie) {
switch (ie.label) {
case 0:
return e && e.length ? [4, l({
action: "wbgetentities",
languages: E,
props: ["labels", "aliases", "datatype", "claims"],
ids: e
})] : [2];
case 1:
if (!(ae = ie.sent()).success) return [2];
for (ce in le = [], ue = [], ae.entities) ue.push(ce);
de = 0, ie.label = 2;
case 2:
if (!(de < ue.length)) return [3, 6];
if (pe = ue[de], !ae.entities.hasOwnProperty(pe)) return [3, 5];
if (fe = pe, void 0 === (ve = ae.entities[fe]).labels) return [3, 5];
if (he = y(ve.labels, [C, S], fe), be = function(e, t, n) {
var r = t[n] || [];
return e[n] && r.push(e[n]), r.map((function(e) {
return e.value.toLowerCase()
}))
}(ve.labels, ve.aliases, S), me = {
id: fe,
datatype: ve.datatype,
label: b(he),
aliases: be,
constraints: {
integer: !1,
noneOfTypes: {},
noneOfValues: {},
oneOfValues: [],
unique: !1,
unitOptional: !1,
valueType: [],
qualifier: []
},
formatter: "",
units: []
}, (null === (t = ve.claims) || void 0 === t ? void 0 : t.P1630) && (ye = Ee(ve.claims.P1630)) && (me.formatter = ye.mainsnak.datavalue.value), (null === (n = ve.claims) || void 0 === n ? void 0 : n.P1793) && (ye = Ee(ve.claims.P1793)) && (me.constraints.format = ye.mainsnak.datavalue.value), null === (r = ve.claims) || void 0 === r ? void 0 : r.P2302)
for (_e in ve.claims.P2302)
if (void 0 !== (ge = ve.claims.P2302[_e]) && "deprecated" !== ge.rank && "value" === ge.mainsnak.snaktype) switch (je = ge.mainsnak.datavalue.value.id, xe = void 0, je) {
case "Q19474404":
case "Q21502410":
me.constraints.unique = !0;
break;
case "Q21510851":
case "Q21510856":
for (xe = (null === (a = ge.qualifiers) || void 0 === a ? void 0 : a.P2306) || [], Se = 0; Se < xe.length; Se++)(Te = null === (s = null === (o = null === (i = xe[Se]) || void 0 === i ? void 0 : i.datavalue) || void 0 === o ? void 0 : o.value) || void 0 === s ? void 0 : s.id) && me.constraints.qualifier.push(Te);
break;
case "Q21514353":
for (xe = (null === (u = ge.qualifiers) || void 0 === u ? void 0 : u.P2305) || [], Se = 0; Se < xe.length; Se++)(ke = null === (p = null === (d = null === (c = xe[Se]) || void 0 === c ? void 0 : c.datavalue) || void 0 === d ? void 0 : d.value) || void 0 === p ? void 0 : p.id) ? me.units.push(ke) : "novalue" === (null === (v = xe[Se]) || void 0 === v ? void 0 : v.snaktype) && (me.constraints.unitOptional = !0);
break;
case "Q21502404":
(xe = (null === (h = ge.qualifiers) || void 0 === h ? void 0 : h.P1793) || []).length && (me.constraints.format = null === (m = xe[0].datavalue) || void 0 === m ? void 0 : m.value);
break;
case "Q21502838":
if ("P31" !== (null === ($ = null === (k = null === (x = null === (w = null === (g = ge.qualifiers) || void 0 === g ? void 0 : g.P2306) || void 0 === w ? void 0 : w[0]) || void 0 === x ? void 0 : x.datavalue) || void 0 === k ? void 0 : k.value) || void 0 === $ ? void 0 : $.id)) break;
for ($e = (null === (_ = null === (O = null === (T = null === (P = null === (I = ge.qualifiers) || void 0 === I ? void 0 : I.P6824) || void 0 === P ? void 0 : P[0]) || void 0 === T ? void 0 : T.datavalue) || void 0 === O ? void 0 : O.value) || void 0 === _ ? void 0 : _.id) || null, xe = (null === (j = ge.qualifiers) || void 0 === j ? void 0 : j.P2305) || [], Se = 0; Se < xe.length; Se++)(Te = null === (Q = null === (N = null === (q = xe[Se]) || void 0 === q ? void 0 : q.datavalue) || void 0 === N ? void 0 : N.value) || void 0 === Q ? void 0 : Q.id) && (me.constraints.noneOfTypes[Te] = $e);
break;
case "Q21510859":
for (xe = (null === (D = ge.qualifiers) || void 0 === D ? void 0 : D.P2305) || [], Se = 0; Se < xe.length; Se++)(Te = null === (A = null === (V = null === (L = xe[Se]) || void 0 === L ? void 0 : L.datavalue) || void 0 === V ? void 0 : V.value) || void 0 === A ? void 0 : A.id) && me.constraints.oneOfValues.push(Te);
break;
case "Q21510865":
for (xe = (null === (U = ge.qualifiers) || void 0 === U ? void 0 : U.P2308) || [], Se = 0; Se < xe.length; Se++)(Ie = null === (J = null === (W = null === (z = xe[Se]) || void 0 === z ? void 0 : z.datavalue) || void 0 === W ? void 0 : W.value) || void 0 === J ? void 0 : J.id) && me.constraints.valueType.push(Ie);
break;
case "Q52558054":
for (Pe = null === (B = null === (X = null === (F = null === (R = null === (M = ge.qualifiers) || void 0 === M ? void 0 : M.P9729) || void 0 === R ? void 0 : R[0]) || void 0 === F ? void 0 : F.datavalue) || void 0 === X ? void 0 : X.value) || void 0 === B ? void 0 : B.id, xe = (null === (G = ge.qualifiers) || void 0 === G ? void 0 : G.P2305) || [], Se = 0; Se < xe.length; Se++)(Te = null === (K = null === (H = null === (Z = xe[Se]) || void 0 === Z ? void 0 : Z.datavalue) || void 0 === H ? void 0 : H.value) || void 0 === K ? void 0 : K.id) && (me.constraints.noneOfValues[Te] = Pe);
break;
case "Q52848401":
me.constraints.integer = !0
}
if (!(null === (Y = ve.claims) || void 0 === Y ? void 0 : Y.P2876)) return [3, 4];
for (_e in Oe = [], ve.claims.P2876)(je = null === (re = null === (ne = null === (te = null === (ee = ve.claims.P2876[_e]) || void 0 === ee ? void 0 : ee.mainsnak) || void 0 === te ? void 0 : te.datavalue) || void 0 === ne ? void 0 : ne.value) || void 0 === re ? void 0 : re.id) ? Oe.push(je) : "novalue" === (null === (se = null === (oe = ve.claims.P2302[_e]) || void 0 === oe ? void 0 : oe.mainsnak) || void 0 === se ? void 0 : se.snaktype) && (me.constraints.unitOptional = !0);
return Oe.length ? [4, Ce(Oe)] : [3, 4];
case 3:
qe = ie.sent(), (Ne = me.units).push.apply(Ne, qe), ie.label = 4;
case 4:
me.units = f(me.units), le.push(me), ie.label = 5;
case 5:
return de++, [3, 2];
case 6:
return [4, we(le)];
case 7:
return ie.sent(), [2]
}
}))
}))
}
function Oe(e) {
return ae(this, void 0, void 0, (function() {
var t, n, r, a, i;
return ie(this, (function(o) {
switch (o.label) {
case 0:
return e.size ? [4, ge(t = Array.from(e))] : [2];
case 1:
if (n = o.sent().map((function(e) {
return e.id
})), !(r = t.filter((function(e) {
return !n.includes(e)
}))).length) return [3, 5];
a = 50, i = 0, o.label = 2;
case 2:
return i < r.length ? [4, Te(r.slice(i, i + a))] : [3, 5];
case 3:
o.sent(), o.label = 4;
case 4:
return i += a, [3, 2];
case 5:
return [2]
}
}))
}))
}
function _e(e) {
return ae(this, void 0, void 0, (function() {
var t;
return ie(this, (function(n) {
switch (n.label) {
case 0:
return [4, ye(e)];
case 1:
return void 0 !== (t = n.sent()) ? [3, 4] : [4, Te([e])];
case 2:
return n.sent(), [4, ye(e)];
case 3:
if (void 0 === (t = n.sent())) return [2, void 0];
n.label = 4;
case 4:
return [2, t]
}
}))
}))
}
function je(e) {
return ae(this, void 0, void 0, (function() {
var t;
return ie(this, (function(n) {
switch (n.label) {
case 0:
return [4, $e(e)];
case 1:
return void 0 !== (t = n.sent()) ? [3, 4] : [4, Se([e])];
case 2:
return n.sent(), [4, $e(e)];
case 3:
t = n.sent(), n.label = 4;
case 4:
return [2, t]
}
}))
}))
}
function qe(e) {
return ae(this, void 0, void 0, (function() {
var t, n, r, a, i, o;
return ie(this, (function(s) {
switch (s.label) {
case 0:
for (r in t = [], n = [], e) n.push(r);
a = 0, s.label = 1;
case 1:
return a < n.length ? (i = n[a], [4, $e(o = parseInt(i, 10) >= 0 ? e[i] : i)]) : [3, 4];
case 2:
s.sent() || t.push(o), s.label = 3;
case 3:
return a++, [3, 1];
case 4:
return t.length ? [4, Ce(le, t)] : [3, 6];
case 5:
s.sent(), s.label = 6;
case 6:
return [2]
}
}))
}))
}
function Ne(e) {
for (var t = [], n = e.find("sup.reference a"), r = 0; r < n.length; r++)
for (var a = $(decodeURIComponent(n[r].hash).replace(/[!"$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g, "\\$&") + ' a[rel="nofollow"]'), i = 0; i < a.length; i++) {
var o = $(a.get(i));
if (!o.attr("href").match(/(wikipedia.org|webcitation.org|archive.is)/)) {
var s = {
snaks: {
P854: [{
property: "P854",
datatype: "url",
snaktype: "value",
datavalue: {
type: "string",
value: o.attr("href").replace(/^\/\//, "https://")
}
}]
}
};
if ("" !== he("mark-checked")) {
var l = a.parent().find('small:contains("' + he("mark-checked") + '")');
if (l.length) {
var u = Ve(l.first().text());
u && (s.snaks.P813 = [{
property: "P813",
datatype: "time",
snaktype: "value",
datavalue: {
type: "time",
value: u
}
}])
}
}
if ("" !== he("mark-archived")) {
var c = a.filter('a:contains("' + he("mark-archived") + '")');
if (c.length) {
var d = c.first();
s.snaks.P1065 = [{
property: "P1065",
datatype: "url",
snaktype: "value",
datavalue: {
type: "string",
value: d.attr("href").replace(/^\/\//, "https://")
}
}];
var p = Ve(d.parent().text().replace(he("mark-archived"), "").trim());
p && (s.snaks.P2960 = [{
property: "P2960",
datatype: "time",
snaktype: "value",
datavalue: {
type: "time",
value: p
}
}])
}
}
t.push(s);
break
}
}
return t.push({
snaks: he("references")
}), t
}
var Qe = {
P571: "P576",
P580: "P582",
P2031: "P2032"
};
function De(e, t) {
if (t <= 8) {
var n = e.getFullYear();
n -= n % Math.pow(10, 9 - t), e.setFullYear(n)
}
e.setUTCHours(0), e.setUTCMinutes(0), e.setUTCSeconds(0);
var r = e.toISOString().replace(/\.000Z/, "Z");
return t <= 10 && (r = r.replace(/-\d\dT/, "-00T")), t <= 9 && (r = r.replace(/-\d\d-/, "-00-")), r
}
function Le(e, t, n, r) {
var a = {
time: (t ? "-" : "+") + De(e, n || 11),
precision: n || 11,
timezone: 0,
before: 0,
after: 0,
calendarmodel: "http://www.wikidata.org/entity/Q1985727"
};
return (r || t || e < new Date(Date.UTC(1582, 9, 15))) && (a.calendarmodel = "http://www.wikidata.org/entity/Q1985786"), a
}
function Ve(e, t) {
if (e) {
e.match(/\s\([^)]*\)\s/) && (t = !0);
var n = !1,
r = (e = e.replace(/\([^)]*\)/, "").trim()).match(he("re-bce"));
if (r) n = !0, e = e.replace(r[0], "").trim();
else {
var a = e.match(he("re-ce"));
a && (e = e.replace(a[0], "").trim())
}
var i = function(e) {
var t, n = e.match(he("re-century"));
if (n) return (t = new Date(0)).setFullYear(100 * he("centuries").indexOf(n[1].toUpperCase()) + 100), t.setUTCHours(0), t.setUTCMinutes(0), t.setUTCSeconds(0), {
type: "value",
isoDate: t,
precision: 7
};
if (n = e.match(he("re-month-year"))) return {
type: "value",
isoDate: t = new Date(Date.UTC(parseInt(n[2], 10), ee().indexOf(n[1]))),
precision: 10
};
if (n = e.match(he("re-month-dot-year"))) return {
type: "value",
isoDate: t = new Date(Date.UTC(parseInt(n[2], 10), parseInt(n[1], 10) - 1)),
precision: 10
};
if (n = e.match(he("re-dot-date"))) return {
type: "value",
isoDate: t = new Date(Date.UTC(parseInt(n[3], 10) < 100 ? 1900 + parseInt(n[3], 10) : parseInt(n[3], 10), parseInt(n[2], 10) - 1, parseInt(n[1], 10))),
precision: 11
};
if (n = e.match(he("re-iso-date"))) return {
type: "value",
isoDate: t = new Date(Date.UTC(parseInt(n[1], 10) < 100 ? 1900 + parseInt(n[1], 10) : parseInt(n[1], 10), parseInt(n[2], 10) - 1, parseInt(n[3], 10))),
precision: 11
};
for (var r = function(r) {
if (!(n = e.match(r))) return "continue";
var a = void 0;
if (void 0 !== n.groups.m) a = parseInt(n.groups.m, 10) - 1;
else if (void 0 !== n.groups.mm) {
var i = n.groups.mm.toLowerCase();
if (-1 === (a = te().findIndex((function(e) {
return e.toLowerCase() === i
}))) && (a = ee().findIndex((function(e) {
return e.toLowerCase() === i
}))), -1 === a) return "continue"
}
return {
value: {
type: "value",
isoDate: t = new Date(Date.UTC(parseInt(n.groups.y, 10), a, parseInt(n.groups.d, 10))),
precision: 11
}
}
}, a = 0, i = he("re-dates"); a < i.length; a++) {
var o = r(i[a]);
if ("object" == typeof o) return o.value
}
return (n = e.match(he("re-decade"))) ? {
type: "value",
isoDate: t = new Date(Date.UTC(parseInt(n[1], 10), 0)),
precision: 8
} : (n = e.match(he("re-year"))) ? {
type: "value",
isoDate: t = new Date(Date.UTC(parseInt(n[1], 10), 0)),
precision: 9
} : e.match(he("re-present")) ? {
type: "novalue"
} : (e.match(he("re-unknown")), {
type: "somevalue"
})
}(e);
if ("novalue" === i.type) return null;
if ("value" === i.type) return Le(i.isoDate, n, i.precision, t)
}
}
function Ae(e, t) {
return {
snaktype: "value",
property: t,
datavalue: {
value: e,
type: "time"
},
datatype: "time"
}
}
function Ue(e) {
var t = [],
n = e.text.toLowerCase().trim().replace(he("re-year-postfix"), ""),
r = e.text.includes(he("mark-julian"));
if (n.match(/.{4,}[-−–—].{4,}/) && Qe[e.propertyId]) {
var a = n.split(/[-−–—]/);
if (2 === a.length) {
var i = Ve(a[0], r),
o = Ve(a[1], r);
if (void 0 !== i && void 0 !== o) {
var s = Ne(e.$wrapper),
l = z(i ? Ae(i, e.propertyId) : B(e.propertyId), s);
t.push(l);
var u = z(o ? Ae(o, Qe[e.propertyId]) : B(Qe[e.propertyId]), s);
return t.push(u), t
}
}
}
var c = Ve(n, r);
if (c) {
var d = z(Ae(c, e.propertyId), s = Ne(e.$wrapper));
t.push(d)
}
return t
}
var ze = function(e, t, n, r) {
return new(n || (n = Promise))((function(a, i) {
function o(e) {
try {
l(r.next(e))
} catch (e) {
i(e)
}
}
function s(e) {
try {
l(r.throw(e))
} catch (e) {
i(e)
}
}
function l(e) {
var t;
e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
e(t)
}))).then(o, s)
}
l((r = r.apply(e, t || [])).next())
}))
},
We = function(e, t) {
var n, r, a, i, o = {
label: 0,
sent: function() {
if (1 & a[0]) throw a[1];
return a[1]
},
trys: [],
ops: []
};
return i = {
next: s(0),
throw: s(1),
return: s(2)
}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this
}), i;
function s(i) {
return function(s) {
return function(i) {
if (n) throw new TypeError("Generator is already executing.");
for (; o;) try {
if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a;
switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) {
case 0:
case 1:
a = i;
break;
case 4:
return o.label++, {
value: i[1],
done: !1
};
case 5:
o.label++, r = i[1], i = [0];
continue;
case 7:
i = o.ops.pop(), o.trys.pop();
continue;
default:
if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
o = 0;
continue
}
if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) {
o.label = i[1];
break
}
if (6 === i[0] && o.label < a[1]) {
o.label = a[1], a = i;
break
}
if (a && o.label < a[2]) {
o.label = a[2], o.ops.push(i);
break
}
a[2] && o.ops.pop(), o.trys.pop();
continue
}
i = t.call(e, o)
} catch (e) {
i = [6, e], r = 0
} finally {
n = a = 0
}
if (5 & i[0]) throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
}
}([i, s])
}
}
};
function Je(e, t, n, r) {
var a = parseFloat("1e-" + t.toString()),
i = parseFloat("1e" + n.toString()),
o = parseFloat("1e" + r.toString());
return r >= 0 ? r <= n ? (o * e).toFixed(n - r) : (i * e).toFixed(0).replace(/$/, new Array(r - n + 1).join("0")) : r >= -t ? (o * e).toFixed(n - r) : (a * e).toFixed(t + n).replace(/0\./, "0." + new Array(-r - t + 1).join("0"))
}
function Me(e) {
return e = e.replace(/[^\d.+-]/g, "").replace(/^\./, ""), parseFloat(e)
}
function Re(e, t, n) {
e = e.replace(/,/g, ".").replace(/[−–—]/g, "-").trim();
var r = function(e, t, n) {
var r = {
amount: "0",
unit: "1"
},
a = 0;
if ((t = t.replace(/,/g, ".").replace(/[−–—]/g, "-").trim()).match(e["re-10_3"])) a += 3;
else if (t.match(e["re-10_6"])) a += 6;
else if (t.match(e["re-10_9"])) a += 9;
else if (t.match(e["re-10_12"])) a += 12;
else {
var i = / *[*·⋅×] *10(-?\d+)/,
o = t.match(i);
o && (t = t.replace(i, ""), a += parseInt(o[1]))
}
var s = t.split("±");
0 === a && n && (s[0] = s[0].replace(/\./g, "").trim());
var l = s[0].split("-");
if (1 === s.length && 2 === l.length && 0 !== l[0].replace(/\D/g, "").length && 0 !== l[1].replace(/\D/g, "").length) {
var u = Me(l[0]),
c = Me(l[1]);
if (c < u) return null;
var d = l[0].replace(/[^\d.+-]/g, "").match(/(\d+)\.(\d+)/),
p = d ? d[2].length : 0,
f = (c + u) / 2,
v = d ? d[1].length : f.toString().length;
return r.lowerBound = Je(u, v, p, a), r.upperBound = Je(c, v, p, a), c % 2 != u % 2 && (p += 1), r.amount = Je(f, v, p, a), r
}
var h, b = Me(s[0]);
if (isNaN(b)) return null;
var m = b.toString().match(/(\d+)\.(\d+)/),
y = m ? m[1].length : b.toString().length,
g = m ? m[2].length : 0;
return r.amount = Je(b, y, g, a), s.length > 1 && (h = Me(s[1])), isNaN(h) || (s.length > 1 && s[1].indexOf("%") > 0 ? h = b * h / 100 : (y = (m = h.toString().match(/(\d+)\.(\d+)/)) ? m[1].length : b.toString().length, g = m ? m[2].length : 0), r.lowerBound = Je(b - h, y, g, a), r.upperBound = Je(b + h, y, g, a)), r
}({
"re-10_3": he("re-10_3"),
"re-10_6": he("re-10_6"),
"re-10_9": he("re-10_9"),
"re-10_12": he("re-10_12")
}, e, n);
if (null === r) return null;
var a = {
mainsnak: {
property: t,
snaktype: "value",
datatype: "quantity",
datavalue: {
type: "quantity",
value: r
}
},
type: "statement",
id: V(),
rank: "normal"
};
return e.match(he("re-circa")) && (a.qualifiers = {
P1480: [U("P1480", "Q5727902")]
}), a
}
function Fe(e, t, n) {
return ze(this, void 0, void 0, (function() {
var r, a, i, o, s, l, u, c, d, p;
return We(this, (function(f) {
switch (f.label) {
case 0:
return Array.isArray(t) && 0 === t.length ? [2, []] : [4, qe(t)];
case 1:
for (i in f.sent(), r = [], a = [], t) a.push(i);
o = 0, f.label = 2;
case 2:
return o < a.length ? (s = a[o], t.hasOwnProperty(s) ? [4, je(l = parseInt(s, 10) >= 0 ? t[s] : s)] : [3, 4]) : [3, 5];
case 3:
if (!(null == (u = f.sent()) ? void 0 : u.length)) return [3, 4];
for (c = 0; c < u.length; c++) {
if (d = u[c], "^" !== u[c].charAt(0) && (d = u[c].length < 5 ? "^".concat(d, "|[\\d\\s\\.]").concat(d, "\\.?$") : "[\\d\\s\\.]".concat(d)), e.match(new RegExp(d))) {
r.push("http://www.wikidata.org/entity/".concat(l));
break
}
if ("^" !== u[c].charAt(0) && void 0 !== n && (p = new RegExp("\\s".concat(u[c], ":?$")), n.match(p))) {
r.push("http://www.wikidata.org/entity/".concat(l));
break
}
}
f.label = 4;
case 4:
return o++, [3, 2];
case 5:
return [2, r]
}
}))
}))
}
function Xe(e, t) {
return ze(this, void 0, void 0, (function() {
return We(this, (function(n) {
switch (n.label) {
case 0:
return "1" === t ? [2, e] : [4, je(t.replace(/^.+\/(Q\d+)$/, "$1"))];
case 1:
return n.sent().forEach((function(t) {
e = e.replace(t, "")
})), [2, e]
}
}))
}))
}
function Be(e) {
var t, n, r;
return ze(this, void 0, void 0, (function() {
var a, i, o, s, l, u, c, d, p, f, v, h, b, m, y, g, w, x, k, $, I, P, S;
return We(this, (function(C) {
switch (C.label) {
case 0:
if (a = [], i = e.$wrapper.closest("tr").find("th, .infobox-export-label").first().text().trim(), o = e.text.replace(/[\u00a0\u25bc\u25b2]/g, " ").replace(/\s*\(([^)]*\))/g, "").trim(), s = o.replace(he("re-min-sec"), "$1:$2").match(/^(?:(\d+):)?(\d+):(\d+)$/)) {
for (l = 0, u = 1; u < s.length; u++) void 0 !== s[u] && (l = 60 * l + parseInt(s[u], 10));
o = l + he("unit-sec")
}
return [4, _e(e.propertyId)];
case 1:
return c = C.sent(), [4, Fe(o, (null == c ? void 0 : c.units) || [], i)];
case 2:
d = C.sent(), ((null === (t = null == c ? void 0 : c.constraints) || void 0 === t ? void 0 : t.unitOptional) || !1) && d.push("1"), p = (null === (n = null == c ? void 0 : c.constraints) || void 0 === n ? void 0 : n.integer) || !1, f = 0, C.label = 3;
case 3:
return f < d.length ? [4, Xe(o, d[f])] : [3, 11];
case 4:
return v = C.sent(), (h = Re(v, e.propertyId, p)) ? (h.mainsnak.datavalue.value.unit = d[f], (b = Ne(e.$wrapper)).length && (h.references = b), [4, ct(e.$field, h)]) : [3, 10];
case 5:
if (h = C.sent(), ((null === (r = null == c ? void 0 : c.constraints) || void 0 === r ? void 0 : r.qualifier) || []).includes("P585") && ((m = e.text.match(/\(([^)]*[12]\s?\d{3})[,)\s]/)) || (m = i.match(/\(([^)]*[12]\s?\d{3})[,)\s]/)), m && (y = Ve(m[1].replace(/(\d)\s(\d)/, "$1$2"))) && (h.qualifiers = {
P585: [{
snaktype: "value",
property: "P585",
datavalue: {
type: "time",
value: y
},
datatype: "time"
}]
})), !(g = e.text.match(/\(([^)]*)/))) return [3, 9];
if (!(w = Re(g[1], "P0"))) return [3, 9];
x = w.mainsnak, k = x.datavalue.value, $ = ["P2076", "P2077"], I = 0, C.label = 6;
case 6:
return I < $.length ? [4, _e($[I])] : [3, 9];
case 7:
P = C.sent(), 1 === (S = (null == P ? void 0 : P.units) || []).length && (k.unit = "http://www.wikidata.org/entity/".concat(S[0]), h.qualifiers || (h.qualifiers = {}), h.qualifiers[$[I]] = [{
snaktype: "value",
property: $[I],
datavalue: {
type: "quantity",
value: k
},
datatype: "quantity"
}]), C.label = 8;
case 8:
return I++, [3, 6];
case 9:
a.push(h), C.label = 10;
case 10:
return f++, [3, 3];
case 11:
return [2, a]
}
}))
}))
}
function Ge(e, t) {
for (var n, r = 0; r < Object.keys(e).length; r++) {
var a = Ve((t.text().match(/\(([^)]*\d{4})[,)\s]/) || [])[1]);
if (a && (null === (n = e[r].qualifiers) || void 0 === n ? void 0 : n.P585)) {
var i = e[r].qualifiers.P585[0].datavalue.value;
a.precision < i.precision ? e[r].qualifiers.P585[0].datavalue.value.precision = a.precision : a.precision > i.precision && (a.precision = i.precision)
}
return !1
}
return !0
}
var Ze = {
commonsMedia: "string",
"external-id": "string",
"geo-shape": "string",
"globe-coordinate": "globecoordinate",
math: "string",
monolingualtext: "monolingualtext",
"musical-notation": "string",
quantity: "quantity",
string: "string",
"tabular-data": "string",
time: "time",
url: "string",
"wikibase-form": "wikibase-entityid",
"wikibase-item": "wikibase-entityid",
"wikibase-lexeme": "wikibase-entityid",
"wikibase-property": "wikibase-entityid",
"wikibase-sense": "wikibase-entityid"
},
He = function(e, t, n, r) {
return new(n || (n = Promise))((function(a, i) {
function o(e) {
try {
l(r.next(e))
} catch (e) {
i(e)
}
}
function s(e) {
try {
l(r.throw(e))
} catch (e) {
i(e)
}
}
function l(e) {
var t;
e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
e(t)
}))).then(o, s)
}
l((r = r.apply(e, t || [])).next())
}))
},
Ke = function(e, t) {
var n, r, a, i, o = {
label: 0,
sent: function() {
if (1 & a[0]) throw a[1];
return a[1]
},
trys: [],
ops: []
};
return i = {
next: s(0),
throw: s(1),
return: s(2)
}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this
}), i;
function s(i) {
return function(s) {
return function(i) {
if (n) throw new TypeError("Generator is already executing.");
for (; o;) try {
if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a;
switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) {
case 0:
case 1:
a = i;
break;
case 4:
return o.label++, {
value: i[1],
done: !1
};
case 5:
o.label++, r = i[1], i = [0];
continue;
case 7:
i = o.ops.pop(), o.trys.pop();
continue;
default:
if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
o = 0;
continue
}
if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) {
o.label = i[1];
break
}
if (6 === i[0] && o.label < a[1]) {
o.label = a[1], a = i;
break
}
if (a && o.label < a[2]) {
o.label = a[2], o.ops.push(i);
break
}
a[2] && o.ops.pop(), o.trys.pop();
continue
}
i = t.call(e, o)
} catch (e) {
i = [6, e], r = 0
} finally {
n = a = 0
}
if (5 & i[0]) throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
}
}([i, s])
}
}
},
Ye = {},
et = "P580",
tt = "P582";
function nt(e, t) {
var n, r, a = {},
i = Ue({
propertyId: et,
text: e,
$field: $("<span>").text(e),
$wrapper: $("<span>").text(e)
});
for (var o in i) {
var s = i[o];
s.mainsnak.property === et ? n = s.mainsnak : s.mainsnak.property === tt && (r = s.mainsnak)
}
return n && r ? (a.P580 = [n], a.P582 = [r]) : n && (n.property = "P69" === t ? tt : "P585", a[n.property] = [n]), a
}
function rt(e, t) {
return He(this, void 0, void 0, (function() {
var n, r, a, i, o, s;
return Ke(this, (function(l) {
switch (l.label) {
case 0:
return [4, ye(e)];
case 1:
return void 0 === (n = l.sent()) ? [2, []] : (n.constraints.noneOfValues && (t = t.map((function(t) {
var r = t.mainsnak.datavalue.value.id;
return void 0 === n.constraints.noneOfValues[r] ? t : null === n.constraints.noneOfValues[r] ? null : (t.mainsnak = U(e, n.constraints.noneOfValues[r]), t)
})).filter((function(e) {
return null !== e
}))), n.constraints.oneOfValues && n.constraints.oneOfValues.length && (t = t.filter((function(e) {
return n.constraints.oneOfValues.includes(e.mainsnak.datavalue.value.id)
}))), n.constraints.valueType && n.constraints.valueType.length ? (r = t.map((function(e) {
return e.mainsnak.datavalue.value.id
})), [4, c("SELECT DISTINCT ?item { VALUES ?item {wd:".concat(r.join(" wd:"), "}.\n\t\t\tVALUES ?class {wd:").concat(n.constraints.valueType.join(" wd:"), "}.\n\t\t\t?item wdt:P31?/wdt:P279* ?class }"))]) : [3, 3]);
case 2:
for (a = l.sent(), i = [], o = 0; o < a.results.bindings.length; o++) s = a.results.bindings[o].item.value.replace(/^.+\/(Q\d+)$/, "$1"), i.push(s);
t = t.filter((function(e) {
return i.includes(e.mainsnak.datavalue.value.id)
})), l.label = 3;
case 3:
return [2, t]
}
}))
}))
}
function at(e) {
return He(this, void 0, void 0, (function() {
var t, r, a, i, o, l, u, c, d, p, v, m, y, g, w, x, k, $, I, P, C, E, T, O, _, j, q, N;
return Ke(this, (function(Q) {
switch (Q.label) {
case 0:
for (t = n(311), r = [], a = he("fixed-values"), i = Ne(e.$wrapper), o = 0; o < a.length; o++)
if (l = a[o], u = new RegExp(l.search), e.$field.attr("data-wikidata-property-id") === l.property && e.$field.text().match(u)) return c = U(e.propertyId, l.item), [2, [z(c, i)]];
if (d = e.$field.find("a[title][class!=image][class!=new]"), p = [], d.length)
for (C = 0; C < d.length; C++)(v = t(d[C])).parents("[data-wikidata-qualifier-id]").length || (m = decodeURIComponent(v.attr("href")).replace(/^.*\/wiki\//, "")) && (m = m.replace(/_/g, " ").trim(), y = "", d[C].nextSibling && (g = d[C].nextSibling.textContent.match(/^['"»]?\s*\((.+)\)\s*$/)) && (y = g[1]), w = {
label: b(m),
language: S,
project: he("project"),
qualifiers: nt(y, e.propertyId)
}, v.hasClass("extiw") && (x = d[C].getAttribute("href").match(/^https:\/\/([a-z-]+)\.(wik[^.]+)\./)) && "wikimedia" !== x[2] && "wikidata" !== x[2] && (w.language = x[1], w.project = x[1] + x[2].replace("wikipedia", "wiki")), v.hasClass("mw-redirect") && p.push(m), r.push(w), t(d[C]).find("img") && p.push(m));
else if (e.$field.text().trim()) {
for (P in k = e.$field.text().split(/[\n,;]+/), $ = function(t) {
var n = "",
a = k[t].replace(/\([^)]*\)/, (function(e) {
return n = e.replace(/\(\)/, ""), ""
})).trim();
if (a) {
var i = {
label: b(a),
language: S,
project: he("project"),
qualifiers: nt(n, e.propertyId)
};
r.push(i)
}
}, k) $(P);
r = f(r)
}
return p.length ? [4, s({
action: "query",
redirects: 1,
titles: p
})] : [3, 2];
case 1:
if ((I = Q.sent()).query && I.query.redirects)
for (P = 0; P < I.query.redirects.length; P++)
for (C = 0; C < r.length; C++) E = h(r[C].label), T = h(I.query.redirects[P].from), E === T && (r[C].redirect = I.query.redirects[P].to, r.splice(C + 1, 0, {
label: I.query.redirects[P].to,
language: S,
project: he("project")
}), C++);
Q.label = 2;
case 2:
return [4, R(e.propertyId, r, i)];
case 3:
return O = Q.sent(), [4, rt(e.propertyId, O)];
case 4:
return 1 !== (O = Q.sent()).length ? [3, 7] : (_ = O, j = 0, [4, ct(e.$field, O[0])]);
case 5:
return _[j] = Q.sent(), q = O, N = 0, [4, ut(e.$field, O[0])];
case 6:
q[N] = Q.sent(), Q.label = 7;
case 7:
return [2, O]
}
}))
}))
}
function it(e, t, n) {
var r, a;
return He(this, void 0, void 0, (function() {
var i, o, s, l, u, c;
return Ke(this, (function(d) {
switch (d.label) {
case 0:
return [4, at({
propertyId: e,
text: n.text().trim(),
$field: n.clone(),
$wrapper: n
})];
case 1:
for (i = d.sent(), Ye[e] = [], o = new Set, s = 0; s < i.length; s++)
for (l = i[s].mainsnak.datavalue.value, (null === (r = i[s].meta) || void 0 === r ? void 0 : r.subclassItem) && o.add(l.id), u = 0; u < t.length; u++) void 0 !== (null == (c = null === (a = t[u].mainsnak.datavalue) || void 0 === a ? void 0 : a.value) ? void 0 : c.id) && (Ye[e].push(c.id), l.id === c.id && o.add(l.id));
return o.size < i.length ? o.size > 0 && "P166" === e && i.length === t.length || Object.keys(t).length > 0 && ["P19", "P20"].includes(e) ? [2, !1] : [2, !0] : [2]
}
}))
}))
}
var ot = function(e, t, n, r) {
return new(n || (n = Promise))((function(a, i) {
function o(e) {
try {
l(r.next(e))
} catch (e) {
i(e)
}
}
function s(e) {
try {
l(r.throw(e))
} catch (e) {
i(e)
}
}
function l(e) {
var t;
e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
e(t)
}))).then(o, s)
}
l((r = r.apply(e, t || [])).next())
}))
},
st = function(e, t) {
var n, r, a, i, o = {
label: 0,
sent: function() {
if (1 & a[0]) throw a[1];
return a[1]
},
trys: [],
ops: []
};
return i = {
next: s(0),
throw: s(1),
return: s(2)
}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this
}), i;
function s(i) {
return function(s) {
return function(i) {
if (n) throw new TypeError("Generator is already executing.");
for (; o;) try {
if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a;
switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) {
case 0:
case 1:
a = i;
break;
case 4:
return o.label++, {
value: i[1],
done: !1
};
case 5:
o.label++, r = i[1], i = [0];
continue;
case 7:
i = o.ops.pop(), o.trys.pop();
continue;
default:
if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
o = 0;
continue
}
if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) {
o.label = i[1];
break
}
if (6 === i[0] && o.label < a[1]) {
o.label = a[1], a = i;
break
}
if (a && o.label < a[2]) {
o.label = a[2], o.ops.push(i);
break
}
a[2] && o.ops.pop(), o.trys.pop();
continue
}
i = t.call(e, o)
} catch (e) {
i = [6, e], r = 0
} finally {
n = a = 0
}
if (5 & i[0]) throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
}
}([i, s])
}
}
};
function lt(e, t, n, r) {
return r ? (void 0 === e.qualifiers && (e.qualifiers = {}), void 0 === e.qualifiers[t] && (e.qualifiers[t] = []), e.qualifiers[t].push({
snaktype: "value",
property: t,
datatype: n,
datavalue: {
type: Ze[n],
value: r
}
}), e) : e
}
function ut(e, t) {
var n;
return ot(this, void 0, void 0, (function() {
var r, a, i, o, s, l;
return st(this, (function(u) {
switch (t.mainsnak.property) {
case "P512":
case "P803":
r = "P580";
break;
case "P69":
r = "P582";
break;
default:
r = "P585"
}
if (null === (n = t.qualifiers) || void 0 === n ? void 0 : n[r]) return [2, t];
for (i = /\(([^()]+)\)/g; a = i.exec(e.text());)
if (o = {
propertyId: r,
text: a[1].trim(),
$field: $("<span>"),
$wrapper: $("<span>")
}, (s = Ue(o)).length) {
if (s.length > 1) return [2, t];
l = s[0].mainsnak.datavalue.value, t = lt(t, r, "time", l);
break
} return [2, t]
}))
}))
}
function ct(e, t) {
return ot(this, void 0, void 0, (function() {
var r, a, i, o, s, l, u, c, d, p, f, v;
return st(this, (function(h) {
switch (h.label) {
case 0:
r = n(311), a = e.find("[data-wikidata-qualifier-id]"), i = {}, o = 0, h.label = 1;
case 1:
return o < a.length ? (s = r(a[o]), l = s.data("wikidata-qualifier-id"), u = s.text().replace(/\n/g, " ").trim(), [4, _e(l)]) : [3, 9];
case 2:
switch (c = h.sent(), d = null == c ? void 0 : c.datatype, d) {
case "monolingualtext":
return [3, 3];
case "string":
return [3, 4];
case "time":
return [3, 5];
case "wikibase-item":
return [3, 6]
}
return [3, 8];
case 3:
return u = {
text: s.text().replace(/\n/g, " ").trim(),
language: s.attr("lang") || S
}, t = lt(t, l, d, u), [3, 8];
case 4:
return u = s.text().replace(/\n/g, " ").trim(), t = lt(t, l, d, u), [3, 8];
case 5:
return u = Ve(u), t = lt(t, l, d, u), [3, 8];
case 6:
return void 0 === i[l] && (i[l] = []), [4, at({
propertyId: l,
text: s.text().trim(),
$field: s.clone(),
$wrapper: s.clone()
})];
case 7:
for (f in p = h.sent()) v = p[f].mainsnak.datavalue.value, t = lt(t, l, d, v);
return [3, 8];
case 8:
return o++, [3, 1];
case 9:
return [2, t]
}
}))
}))
}
function dt(e) {
return ot(this, void 0, void 0, (function() {
var t, n, r, a, i, o, s, l, u, c, d, p, f, v, h;
return st(this, (function(b) {
switch (b.label) {
case 0:
for (o in t = [], n = e.$field.find("img"), r = [], n.each((function() {
r.push($(this))
})), a = Ne(e.$wrapper), i = [], r) i.push(o);
s = 0, b.label = 1;
case 1:
return s < i.length ? (l = i[s], u = r[l], (c = u.attr("src")).match(/upload\.wikimedia\.org\/wikipedia\/commons/) ? (d = c.split("/"), (p = d.pop()).match(/(?:^|-)\d+px-/) && (p = d.pop()), p = (p = decodeURIComponent(p)).replace(/_/g, " "), f = {
type: "string",
value: p
}, v = {
snaktype: "value",
property: e.propertyId,
datavalue: f,
datatype: "commonsMedia"
}, h = z(v, a), [4, ct(e.$field, h)]) : [2]) : [3, 4];
case 2:
h = b.sent(), t.push(h), b.label = 3;
case 3:
return s++, [3, 1];
case 4:
return [2, t]
}
}))
}))
}
function pt(e) {
var t;
return ot(this, void 0, void 0, (function() {
var n, r, a, i, o, s, l, u, d;
return st(this, (function(p) {
switch (p.label) {
case 0:
if (n = e.$field.data("wikidata-external-id") || e.text, r = [], "P345" === e.propertyId) {
if (!(n = e.$field.find("a").first().attr("href"))) return [2, []];
n = n.slice(n.lastIndexOf("/", n.length - 2)).replace(/\//g, "")
} else n = n.toString().replace(/^ID\s/, "").replace(/\s/g, "");
return [4, ye(e.propertyId)];
case 1:
return a = p.sent(), (null === (t = null == a ? void 0 : a.constraints) || void 0 === t ? void 0 : t.format) && !n.match(new RegExp("^(" + a.constraints.format + ")$")) ? [2, []] : [4, c("SELECT ?item WHERE { ?item wdt:".concat(e.propertyId, ' "').concat(n, '" } LIMIT 1'))];
case 2:
return (i = p.sent()).results.bindings.length ? (o = i.results.bindings[0].item.value, window.open("".concat(o, "#").concat(e.propertyId), "_blank"), [2, []]) : (s = {
value: n.toString(),
type: "string"
}, l = {
snaktype: "value",
property: e.propertyId,
datavalue: s,
datatype: "external-id"
}, u = Ne(e.$wrapper), d = z(l, u), r.push(d), [2, r])
}
}))
}))
}
function ft(e) {
var t = n(311),
r = n(119),
a = {},
i = [],
o = e.$field.find("span[lang], i[lang]");
if (o.each((function() {
var e = t(this),
n = e.attr("lang").trim();
a[n] = {
text: e.text().trim(),
language: n
}
})), !Object.values(a).length) {
var s = e.$field.text().trim();
s && (o = r.util.$content.find("span[lang]")).each((function() {
var e = t(this);
if (e.text().trim().startsWith(s)) {
var n = e.attr("lang").trim();
a[n] = {
text: s,
language: n
}
}
}))
}
a.und && delete a.und;
var l = Ne(e.$wrapper);
for (var u in a) {
var c = {
value: a[u],
type: "monolingualtext"
},
d = z({
snaktype: "value",
property: e.propertyId,
datavalue: c,
datatype: "monolingualtext"
}, l);
d = O(d), i.push(d)
}
return i
}
function vt(e, t, n) {
return ot(this, void 0, void 0, (function() {
var r;
return st(this, (function(a) {
if (!n || !n.length) return "" === t.html().trim() ? [2, !1] : [2, !(r = t.find('.image img[src*="/wikipedia/' + S + '/"]')).length || r.width() < 80];
switch (n[0].mainsnak.datatype) {
case "quantity":
return [2, Ge(n, t)];
case "wikibase-item":
return [2, it(e, n, t)]
}
return [2, !1]
}))
}))
}
var ht = {
az: n(45),
be: n(626),
de: n(837),
en: n(52),
hy: n(678),
lt: n(39),
ru: n(482),
tg: n(425)
};
function bt(e) {
var t = e;
return C in ht && e in ht[C] ? t = ht[C][e] : e in ht.en && (t = ht.en[e]), "license-cc0" === e && (t = t.replace("$button", bt("export-button-label")).replace("$terms", 'href="https://foundation.wikimedia.org/wiki/Terms_of_Use" class="extiw" title="wikimedia:Terms of Use"').replace("$license", 'rel="nofollow" class="external text" href="https://creativecommons.org/publicdomain/zero/1.0/"')), t
}
var mt = OO,
yt = function(e, t, n, r) {
return new(n || (n = Promise))((function(a, i) {
function o(e) {
try {
l(r.next(e))
} catch (e) {
i(e)
}
}
function s(e) {
try {
l(r.throw(e))
} catch (e) {
i(e)
}
}
function l(e) {
var t;
e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
e(t)
}))).then(o, s)
}
l((r = r.apply(e, t || [])).next())
}))
},
gt = function(e, t) {
var n, r, a, i, o = {
label: 0,
sent: function() {
if (1 & a[0]) throw a[1];
return a[1]
},
trys: [],
ops: []
};
return i = {
next: s(0),
throw: s(1),
return: s(2)
}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this
}), i;
function s(i) {
return function(s) {
return function(i) {
if (n) throw new TypeError("Generator is already executing.");
for (; o;) try {
if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a;
switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) {
case 0:
case 1:
a = i;
break;
case 4:
return o.label++, {
value: i[1],
done: !1
};
case 5:
o.label++, r = i[1], i = [0];
continue;
case 7:
i = o.ops.pop(), o.trys.pop();
continue;
default:
if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
o = 0;
continue
}
if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) {
o.label = i[1];
break
}
if (6 === i[0] && o.label < a[1]) {
o.label = a[1], a = i;
break
}
if (a && o.label < a[2]) {
o.label = a[2], o.ops.push(i);
break
}
a[2] && o.ops.pop(), o.trys.pop();
continue
}
i = t.call(e, o)
} catch (e) {
i = [6, e], r = 0
} finally {
n = a = 0
}
if (5 & i[0]) throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
}
}([i, s])
}
}
};
function wt(e, t) {
var n = $("<a>").attr("href", e).attr("rel", "noopener noreferrer").attr("target", "_blank").text("[".concat(t, "]"));
return $("<sup>").addClass("infobox-export-sup").append(n)
}
function xt(e) {
var t = e.snaks.P854;
if (t && t.length) {
var n = t[0].datavalue.value,
r = n.replace("http://", "").replace("https://", "").replace("www.", "");
return r.indexOf("/") > 0 && (r = r.slice(0, r.indexOf("/"))), wt(n, r)
}
}
function kt(e, t) {
return yt(this, void 0, void 0, (function() {
var n, r, a, i, o;
return gt(this, (function(s) {
switch (s.label) {
case 0:
return n = $("<span>").addClass("infobox-export-main-label").text(e), r = $("<span>").append(n), t ? [4, _e(t)] : [3, 2];
case 1:
a = s.sent(), (i = null == a ? void 0 : a.formatter) && (o = $("<a>").addClass("infobox-export-external-link").attr("href", i.replace("$1", e)).attr("rel", "noopener noreferrer").attr("target", "_blank"), r.append(o)), s.label = 2;
case 2:
return [2, r]
}
}))
}))
}
function $t(e) {
return yt(this, void 0, void 0, (function() {
var t, n, r, a;
return gt(this, (function(i) {
switch (i.label) {
case 0:
return [4, M(e.id)];
case 1:
return t = i.sent(), n = $("<span>").addClass("infobox-export-main-label").text((null == t ? void 0 : t.label) || ""), r = wt("https://wikidata.org/wiki/".concat(e.id), "d"), a = $("<span>").append(n, r), (null == t ? void 0 : t.description) && a.append($("<span>").text(" — " + t.description)), [2, a]
}
}))
}))
}
function It(e) {
var t, n = $("<span>"),
r = "-" === e.time.charAt(0) ? bt("bce-postfix") : "";
if (7 === e.precision) {
var a = Math.floor((parseInt(e.time.slice(1, 5), 10) - 1) / 100);
t = he("centuries.".concat(a)) + bt("age-postfix") + r
} else {
var i = {
timeZone: "UTC"
};
e.precision > 7 && (i.year = "numeric"), e.precision > 9 && (i.month = "long"), e.precision > 10 && (i.day = "numeric"), t = new Date(Date.parse(e.time.slice(1).replace(/-00/g, "-01"))).toLocaleString(C, i) + (8 === e.precision ? bt("decade-postfix") : "") + r
}
var o = e.calendarmodel.includes("1985727") ? bt("grigorian-calendar") : bt("julian-calendar");
return n.append($("<strong>").text(t)).append($("<span>").text(o).addClass("infobox-export-calendar")), n
}
function Pt(e) {
return yt(this, void 0, void 0, (function() {
return gt(this, (function(t) {
if ("novalue" === e.snaktype) return [2, $("<span>").addClass("infobox-export-novalue").text(bt("value-prefix") + bt("no-value"))];
if ("somevalue" === e.snaktype) return [2, $("<span>").addClass("infobox-export-somevalue").text(bt("value-prefix") + bt("unknown-value"))];
switch (e.datatype) {
case "external-id":
return [2, kt(e.datavalue.value, e.property)];
case "time":
return [2, It(e.datavalue.value)];
case "wikibase-item":
return [2, $t(e.datavalue.value)]
}
return [2, X(e)]
}))
}))
}
var St, Ct = function(e, t, n, r) {
return new(n || (n = Promise))((function(a, i) {
function o(e) {
try {
l(r.next(e))
} catch (e) {
i(e)
}
}
function s(e) {
try {
l(r.throw(e))
} catch (e) {
i(e)
}
}
function l(e) {
var t;
e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
e(t)
}))).then(o, s)
}
l((r = r.apply(e, t || [])).next())
}))
},
Et = function(e, t) {
var n, r, a, i, o = {
label: 0,
sent: function() {
if (1 & a[0]) throw a[1];
return a[1]
},
trys: [],
ops: []
};
return i = {
next: s(0),
throw: s(1),
return: s(2)
}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this
}), i;
function s(i) {
return function(s) {
return function(i) {
if (n) throw new TypeError("Generator is already executing.");
for (; o;) try {
if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a;
switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) {
case 0:
case 1:
a = i;
break;
case 4:
return o.label++, {
value: i[1],
done: !1
};
case 5:
o.label++, r = i[1], i = [0];
continue;
case 7:
i = o.ops.pop(), o.trys.pop();
continue;
default:
if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
o = 0;
continue
}
if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) {
o.label = i[1];
break
}
if (6 === i[0] && o.label < a[1]) {
o.label = a[1], a = i;
break
}
if (a && o.label < a[2]) {
o.label = a[2], o.ops.push(i);
break
}
a[2] && o.ops.pop(), o.trys.pop();
continue
}
i = t.call(e, o)
} catch (e) {
i = [6, e], r = 0
} finally {
n = a = 0
}
if (5 & i[0]) throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
}
}([i, s])
}
}
},
Tt = function(e, t, n) {
if (n || 2 === arguments.length)
for (var r, a = 0, i = t.length; a < i; a++) !r && a in t || (r || (r = Array.prototype.slice.call(t, 0, a)), r[a] = t[a]);
return e.concat(r || Array.prototype.slice.call(t))
},
Ot = n(311),
_t = n(119);
function jt(e) {
return Ct(this, void 0, void 0, (function() {
var t, n, r, a, i, o, s, l, u, c, d, p, f, v;
return Et(this, (function(h) {
switch (h.label) {
case 0:
for (r in t = Ot("<ul>").addClass("infobox-export-qualifiers"), n = [], e) n.push(r);
a = 0, h.label = 1;
case 1:
if (!(a < n.length)) return [3, 7];
if (i = n[a], !e.hasOwnProperty(i)) return [3, 6];
for (s in o = [], e[i]) o.push(s);
l = 0, h.label = 2;
case 2:
return l < o.length ? (u = o[l], c = e[i][u], [4, _e(i)]) : [3, 6];
case 3:
return d = h.sent(), p = (null == d ? void 0 : d.label) || i, f = Ot("<span>").text(p), [4, Pt(c)];
case 4:
v = h.sent(), t.append(Ot("<li>").append(f, ": ", v)), h.label = 5;
case 5:
return l++, [3, 2];
case 6:
return a++, [3, 1];
case 7:
return [2, t]
}
}))
}))
}
function qt(e, t) {
var r, a;
return Ct(this, void 0, void 0, (function() {
var i, o, s, l, u, c, d, p, f, v, h, b;
return Et(this, (function(m) {
switch (m.label) {
case 0:
return i = n(366), o = i.CheckboxInputWidget, s = i.FieldLayout, l = i.FieldsetLayout, u = i.PopupButtonWidget, [4, _e(e)];
case 1:
c = m.sent(), d = (null == c ? void 0 : c.label) || e, p = Ot("<a>").attr("href", "https://wikidata.org/wiki/Property:".concat(e)).attr("rel", "noopener noreferrer").attr("target", "_blank").text(d), f = new l({
label: p
}), v = !1, h = function(e) {
var n, i, l, c, d, p, h, b, m, y, g, w, x, k, I;
return Et(this, (function(P) {
switch (P.label) {
case 0:
return [4, Pt((n = t[e]).mainsnak)];
case 1:
return i = P.sent(), "deprecated" === n.rank && i.addClass("infobox-export-deprecated"), l = n.mainsnak.property, c = !1, "value" === n.mainsnak.snaktype && "wikibase-entityid" === n.mainsnak.datavalue.type && Ye[l] && Ye[l].includes(n.mainsnak.datavalue.value.id) && (c = !0), d = void 0 !== (null === (r = n.meta) || void 0 === r ? void 0 : r.subclassItem), (p = new o({
value: A(n),
selected: c,
disabled: c,
indeterminate: c
})).isDisabled() ? [3, 3] : [4, _e(l)];
case 2:
h = P.sent(), b = (null === (a = null == h ? void 0 : h.constraints) || void 0 === a ? void 0 : a.unique) || "quantity" === (null == h ? void 0 : h.datatype), v && b || d || (v = !0, p.setSelected(!0)), i[0].innerText.match(new RegExp(bt("already-used-in"))) && b && "external-id" === (null == h ? void 0 : h.datatype) && p.setSelected(!1), P.label = 3;
case 3:
return n.references && i.append(function(e) {
for (var t = $("<span>"), n = 0; n < e.length; n++) {
var r = xt(e[n]);
r && t.append(r)
}
return t
}(n.references)), c || !d ? [3, 5] : [4, $t(n.meta.subclassItem)];
case 4:
m = P.sent(), y = Ot("<div>"), bt("more-precise-value").split(/(\$\d+)/).forEach((function(e) {
"$1" === e ? y.append(m) : y.append(e)
})), g = new u({
flags: "warning",
framed: !1,
icon: "alert",
type: "warning",
popup: {
$content: y,
align: "force-left",
padded: !0
}
}), w = Ot("<div>").css({
float: "right",
"margin-top": "-.5em"
}).append(g.$element), i.prepend(w), P.label = 5;
case 5:
return x = {
label: i,
align: "inline",
classes: ["infobox-export-statement"],
helpInline: !0
}, n.qualifiers ? (k = x, [4, jt(n.qualifiers)]) : [3, 7];
case 6:
k.help = P.sent(), P.label = 7;
case 7:
return I = new s(p, x), f.addItems([I]), [2]
}
}))
}, b = 0, m.label = 2;
case 2:
return b < t.length ? [5, h(b)] : [3, 5];
case 3:
m.sent(), m.label = 4;
case 4:
return b++, [3, 2];
case 5:
return [2, f]
}
}))
}))
}
function Nt(e) {
return Ct(this, void 0, void 0, (function() {
var t, r, a, i, o, s, l, u, c, d, p, f, v, h;
return Et(this, (function(b) {
switch (b.label) {
case 0:
for (o in t = function(e) {
var t = {};
for (var n in e) {
var r = e[n],
a = r.mainsnak.property;
void 0 === t[a] && (t[a] = []), t[a].push(r)
}
return t
}(e), r = Object.keys(t), a = [], i = [], r) i.push(o);
s = 0, b.label = 1;
case 1:
return s < i.length ? (l = i[s], [4, qt(u = r[l], t[u])]) : [3, 4];
case 2:
c = b.sent(), a.push(c), b.label = 3;
case 3:
return s++, [3, 1];
case 4:
return d = n(366), p = d.ButtonMenuSelectWidget, f = d.MenuOptionWidget, v = d.PanelLayout, (h = new p({
framed: !1,
icon: "ellipsis",
label: "",
menu: {
horizontalPosition: "before",
verticalPosition: "top",
items: [new f({
label: bt("version-string").replace("$1", he("version")),
data: "version",
icon: "key"
}), new f({
label: bt("open-help-page"),
data: "help",
icon: "help"
}), new f({
label: bt("report-issue"),
data: "report",
icon: "feedback"
}), new f({
label: bt("clear-cache"),
data: "cache",
icon: "reload"
})]
}
})).getMenu().on("select", (function(e) {
e && ("cache" === e.data && (indexedDB.deleteDatabase(ue), indexedDB.deleteDatabase(ce), indexedDB.deleteDatabase(de), localStorage.removeItem(pe), window.location.reload()), "help" === e.data && window.open("//wikidata.org/wiki/Special:MyLanguage/Help:Infobox_export_gadget", "_blank"), "report" === e.data && window.open("//www.wikidata.org/?title=Help_talk:Infobox_export_gadget&action=edit§ion=new", "_blank"), "version" === e.data && window.open("//github.com/putnik/infobox-export/commit/" + he("commit"), "_blank"))
})), [2, new v({
padded: !0,
expanded: !1,
content: Tt(Tt([], a, !0), [Ot("<hr>").css("margin-top", "1.5em"), Ot("<p>").text(bt("export-confirmation")), Ot("<div>").css({
float: "right",
marginLeft: ".5em"
}).append(h.$element), Ot("<p>").css("font-size", "85%").html(bt("license-cc0"))], !1)
})]
}
}))
}))
}
function Qt(e) {
return Ct(this, void 0, void 0, (function() {
var t, r, a, i, o, s, l, u, c, d, p;
return Et(this, (function(v) {
switch (v.label) {
case 0:
t = "#c8ccd1", r = [], a = e.length, v.label = 1;
case 1:
return e.length ? (i = e.shift(), (o = i.meta.$checkbox).prop("disabled", !0), s = i.meta.$checkbox.parent().find("span"), p = i.mainsnak.property, r.push(p), [4, F(i)]) : [3, 3];
case 2:
if (l = v.sent()) throw u = n(366).MessageWidget, c = new u({
type: "error",
label: bt("value-failed") + ": " + l,
showClose: !0
}), o.prop("disabled", !1), s.closest(".oo-ui-labelElement").append(c.$element), l;
return s.css({
"background-color": t,
"border-color": t
}), [3, 1];
case 3:
for (d in r = f(r)) p = r[d], Ot(".no-wikidata[data-wikidata-property-id=".concat(p, "]")).removeClass("no-wikidata").off("dblclick");
return [4, g(450)];
case 4:
return v.sent(), _t.loader.using("mediawiki.action.view.postEdit", (function() {
_t.hook("postEdit").fire({
message: bt(a > 1 ? "all-values-saved" : "value-saved")
})
})), [2]
}
}))
}))
}
function Dt(e) {
return Ct(this, void 0, void 0, (function() {
var t, r, a, i, o, s, l;
return Et(this, (function(u) {
switch (u.label) {
case 0:
return e && e.length ? (t = n(366), r = t.Process, a = t.ProcessDialog, i = t.WindowManager, o = function(e) {
o.super.call(this, e)
}, (0, mt.inheritClass)(o, a), o.static.name = bt("window-header"), o.static.title = o.static.name, o.static.actions = [{
action: "export",
label: bt("export-button-label"),
flags: ["primary", "progressive"]
}, {
label: bt("cancel-button-label"),
flags: ["safe"]
}], [4, Nt(e)]) : (_t.notify(bt("parsing-error"), {
type: "error",
tag: "wikidataInfoboxExport-error"
}), [2]);
case 1:
return s = u.sent(), o.prototype.initialize = function() {
o.super.prototype.initialize.apply(this, arguments), this.content = s, this.$body.append(this.content.$element), this.$body.css("overflow-x", "hidden"), this.$body.css("overflow-y", "auto")
}, o.prototype.getActionProcess = function(e) {
var t = this;
return "export" === e ? new r((function() {
return Ct(this, void 0, void 0, (function() {
var n, r;
return Et(this, (function(a) {
switch (a.label) {
case 0:
(n = t.actions.get({
actions: "export"
})[0]).setDisabled(!0), r = function(e) {
var t = e.$element.find("input[type=checkbox]:checked:enabled"),
n = [];
return t.each((function(e, t) {
var r = Ot(t),
a = r.attr("value"),
i = JSON.parse(a);
i.meta = {
$checkbox: r
}, n.push(i)
})), n
}(s), a.label = 1;
case 1:
return a.trys.push([1, 3, , 4]), [4, Qt(r)];
case 2:
return a.sent(), [3, 4];
case 3:
return a.sent(), n.setDisabled(!1), [2];
case 4:
return t.close({
action: e
}), t.getManager().destroy(), [2]
}
}))
}))
}), this) : (t.close({
action: e
}), t.getManager().destroy(), o.super.prototype.getActionProcess.call(this, e))
}, St = new i, Ot("body").append(St.$element), l = new o({
classes: ["infobox-export-dialog"]
}), St.addWindows([l]), St.openWindow(l), [2]
}
}))
}))
}
var Lt = function(e, t, n, r) {
return new(n || (n = Promise))((function(a, i) {
function o(e) {
try {
l(r.next(e))
} catch (e) {
i(e)
}
}
function s(e) {
try {
l(r.throw(e))
} catch (e) {
i(e)
}
}
function l(e) {
var t;
e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
e(t)
}))).then(o, s)
}
l((r = r.apply(e, t || [])).next())
}))
},
Vt = function(e, t) {
var n, r, a, i, o = {
label: 0,
sent: function() {
if (1 & a[0]) throw a[1];
return a[1]
},
trys: [],
ops: []
};
return i = {
next: s(0),
throw: s(1),
return: s(2)
}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this
}), i;
function s(i) {
return function(s) {
return function(i) {
if (n) throw new TypeError("Generator is already executing.");
for (; o;) try {
if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a;
switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) {
case 0:
case 1:
a = i;
break;
case 4:
return o.label++, {
value: i[1],
done: !1
};
case 5:
o.label++, r = i[1], i = [0];
continue;
case 7:
i = o.ops.pop(), o.trys.pop();
continue;
default:
if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
o = 0;
continue
}
if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) {
o.label = i[1];
break
}
if (6 === i[0] && o.label < a[1]) {
o.label = a[1], a = i;
break
}
if (a && o.label < a[2]) {
o.label = a[2], o.ops.push(i);
break
}
a[2] && o.ops.pop(), o.trys.pop();
continue
}
i = t.call(e, o)
} catch (e) {
i = [6, e], r = 0
} finally {
n = a = 0
}
if (5 & i[0]) throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
}
}([i, s])
}
}
},
At = /^https?:\/\/web\.archive\.org\/web\/(\d{4})(\d{2})(\d{2})\d+\//;
function Ut(e, t) {
return Lt(this, void 0, void 0, (function() {
var n, r, a, i;
return Vt(this, (function(o) {
switch (o.label) {
case 0:
return n = {}, t.$field.find("span[lang]").each((function() {
n[$(this).attr("lang")] = !0
})), t.$field.find("span[data-lang]").each((function() {
n[$(this).data("lang")] = !0
})), Object.keys(n).length ? [4, c('SELECT ?item WHERE { ?item wdt:P218 ?value . FILTER ( ?value IN ("'.concat(Object.keys(n).join('","'), '") ) }'))] : [2];
case 1:
for (r = o.sent(), a = 0; a < r.results.bindings.length; a++) i = {
id: r.results.bindings[a].item.value.replace(/^.+\/(Q\d+)$/, "$1")
}, lt(e, "P407", "wikibase-item", i);
return [2]
}
}))
}))
}
function zt(e) {
return Lt(this, void 0, void 0, (function() {
var t, n, r;
return Vt(this, (function(a) {
switch (a.label) {
case 0:
return t = [], n = e.$field.find("a[href]"), r = Ne(e.$wrapper), n.each((function() {
var n, a = $(this).attr("href").replace(/^\/\//, "https://");
a.match(At) && (n = a, a = a.replace(At, ""));
var i = {
type: "string",
value: a
},
o = z({
snaktype: "value",
property: e.propertyId,
datavalue: i,
datatype: "url"
}, r);
n && (o.rank = "deprecated", function(e, t) {
Lt(this, void 0, void 0, (function() {
var n, r;
return Vt(this, (function(a) {
return lt(e, "P2241", "wikibase-item", {
id: "Q1193907"
}), lt(e, "P1065", "url", t), 4 === (n = t.match(At)).length && (r = new Date(parseInt(n[1], 10), parseInt(n[2], 10), parseInt(n[3], 10)), lt(e, "P2960", "time", Le(r))), [2]
}))
}))
}(o, n)), t.push(o)
})), 1 !== t.length ? [3, 2] : [4, Ut(t[0], e)];
case 1:
a.sent(), a.label = 2;
case 2:
return [2, t]
}
}))
}))
}
var Wt = function(e, t, n, r) {
return new(n || (n = Promise))((function(a, i) {
function o(e) {
try {
l(r.next(e))
} catch (e) {
i(e)
}
}
function s(e) {
try {
l(r.throw(e))
} catch (e) {
i(e)
}
}
function l(e) {
var t;
e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
e(t)
}))).then(o, s)
}
l((r = r.apply(e, t || [])).next())
}))
},
Jt = function(e, t) {
var n, r, a, i, o = {
label: 0,
sent: function() {
if (1 & a[0]) throw a[1];
return a[1]
},
trys: [],
ops: []
};
return i = {
next: s(0),
throw: s(1),
return: s(2)
}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this
}), i;
function s(i) {
return function(s) {
return function(i) {
if (n) throw new TypeError("Generator is already executing.");
for (; o;) try {
if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a;
switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) {
case 0:
case 1:
a = i;
break;
case 4:
return o.label++, {
value: i[1],
done: !1
};
case 5:
o.label++, r = i[1], i = [0];
continue;
case 7:
i = o.ops.pop(), o.trys.pop();
continue;
default:
if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
o = 0;
continue
}
if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) {
o.label = i[1];
break
}
if (6 === i[0] && o.label < a[1]) {
o.label = a[1], a = i;
break
}
if (a && o.label < a[2]) {
o.label = a[2], o.ops.push(i);
break
}
a[2] && o.ops.pop(), o.trys.pop();
continue
}
i = t.call(e, o)
} catch (e) {
i = [6, e], r = 0
} finally {
n = a = 0
}
if (5 & i[0]) throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
}
}([i, s])
}
}
};
function Mt(e) {
var t;
return Wt(this, void 0, void 0, (function() {
var n, r, a, i, o, s, l, u, c, d, p, f, v, h;
return Jt(this, (function(b) {
switch (b.label) {
case 0:
if (n = [], (r = e.$field.data("wikidata-external-id")) || (r = e.text), a = r.toString().trim().split(/[\n,;]+/), "P373" === e.propertyId) {
if (void 0 === (i = function(e) {
var t = e.find('a[class="extiw"]').first();
if (t.length) {
var n = t.attr("href"),
r = n.slice(n.indexOf("/wiki/") + 6).replace(/_/g, " ").replace(/^[Cc]ategory:/, "").replace(/\?.*$/, "");
return decodeURIComponent(r)
}
}(e.$field))) return [2, []];
a = [i]
}
for (l in o = Ne(e.$wrapper), s = [], a) s.push(l);
u = 0, b.label = 1;
case 1:
return u < s.length ? (c = s[u], d = a[c].replace(/\n/g, " ").trim(), "P473" === e.propertyId && (d = d.replace(/^\+\d+\s+(\d[\d- ]*)$/, "$1")), [4, ye(e.propertyId)]) : [3, 4];
case 2:
if (p = b.sent(), (null === (t = null == p ? void 0 : p.constraints) || void 0 === t ? void 0 : t.format) && !d.match(new RegExp("^(" + p.constraints.format + ")$"))) return [3, 3];
d && (f = {
value: d,
type: "string"
}, v = {
snaktype: "value",
property: e.propertyId,
datavalue: f,
datatype: "string"
}, h = z(v, o), n.push(h)), b.label = 3;
case 3:
return u++, [3, 1];
case 4:
return [2, n]
}
}))
}))
}
var Rt = function(e, t, n, r) {
return new(n || (n = Promise))((function(a, i) {
function o(e) {
try {
l(r.next(e))
} catch (e) {
i(e)
}
}
function s(e) {
try {
l(r.throw(e))
} catch (e) {
i(e)
}
}
function l(e) {
var t;
e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
e(t)
}))).then(o, s)
}
l((r = r.apply(e, t || [])).next())
}))
},
Ft = function(e, t) {
var n, r, a, i, o = {
label: 0,
sent: function() {
if (1 & a[0]) throw a[1];
return a[1]
},
trys: [],
ops: []
};
return i = {
next: s(0),
throw: s(1),
return: s(2)
}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this
}), i;
function s(i) {
return function(s) {
return function(i) {
if (n) throw new TypeError("Generator is already executing.");
for (; o;) try {
if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a;
switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) {
case 0:
case 1:
a = i;
break;
case 4:
return o.label++, {
value: i[1],
done: !1
};
case 5:
o.label++, r = i[1], i = [0];
continue;
case 7:
i = o.ops.pop(), o.trys.pop();
continue;
default:
if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
o = 0;
continue
}
if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) {
o.label = i[1];
break
}
if (6 === i[0] && o.label < a[1]) {
o.label = a[1], a = i;
break
}
if (a && o.label < a[2]) {
o.label = a[2], o.ops.push(i);
break
}
a[2] && o.ops.pop(), o.trys.pop();
continue
}
i = t.call(e, o)
} catch (e) {
i = [6, e], r = 0
} finally {
n = a = 0
}
if (5 & i[0]) throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
}
}([i, s])
}
}
};
function Xt(e, t, n, r, a, i, o, s, l) {
var u = parseFloat(e) + parseFloat(t) / 60 + parseFloat(n) / 3600;
"S" === r.toUpperCase() && (u *= -1);
var c = parseFloat(a) + parseFloat(i) / 60 + parseFloat(o) / 3600;
return "S" === s.toUpperCase() && (c *= -1), [u, c, l]
}
function Bt(e) {
return Rt(this, void 0, void 0, (function() {
var t;
return Ft(this, (function(n) {
return t = [], e.$field.find("a").each((function() {
var n, r, a, i = $(this),
o = null,
s = null,
l = 1 / 3600;
if (i.attr("data-lat") && i.attr("data-lon")) o = parseFloat(i.attr("data-lat")), s = parseFloat(i.attr("data-lon"));
else {
var u = i.attr("href");
u && (u.includes("geohack.toolforge.org") || u.includes("tools.wmflabs.org/geohack")) && (o = (n = (a = (r = u).match(/params=(\d{1,2})_(\d{1,2})_(\d{1,2})_([NS])_(\d{1,2})_(\d{1,2})_(\d{1,2})_([WE])/i)) ? Xt(a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], 1 / 3600) : (a = r.match(/params=(\d{1,2})_(\d{1,2})_([\d.]+)_([NS])_(\d{1,2})_(\d{1,2})_([\d.]+)_([WE])/i)) ? Xt(a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], 1 / 36e3) : (a = r.match(/params=(\d{1,2})_(\d{1,2})_([NS])_(\d{1,2})_(\d{1,2})_([WE])/i)) ? Xt(a[1], a[2], "0", a[3], a[4], a[5], "0", a[6], 1 / 60) : (a = r.match(/params=(\d{1,2})_([\d.]+)_([NS])_(\d{1,2})_([\d.]+)_([WE])/i)) ? Xt(a[1], a[2], "0", a[3], a[4], a[5], "0", a[6], 1 / 600) : (a = r.match(/params=([\d.]+)_([NS])_([\d.]+)_([WE])/i)) ? Xt(a[1], "0", "0", a[2], a[3], "0", "0", a[4], 1 / 3600) : (a = r.match(/params=(-?[\d.]+)_(-?[\d.]+)/i)) ? Xt(a[1], "0", "0", "N", a[2], "0", "0", "W", 1 / 3600) : [null, null])[0], s = n[1], l = n[2])
}
if (o && s) {
var c = function(e, t, n) {
return {
latitude: e,
longitude: t,
altitude: null,
precision: n,
globe: "http://www.wikidata.org/entity/Q2"
}
}(o, s, l),
d = function(e, t) {
return {
snaktype: "value",
property: t,
datavalue: {
value: e,
type: "globecoordinate"
},
datatype: "globe-coordinate"
}
}(c, e.propertyId),
p = z(d, Ne($("<span>")));
return t.push(p), !1
}
})), [2, t]
}))
}))
}
var Gt, Zt = function(e, t, n, r) {
return new(n || (n = Promise))((function(a, i) {
function o(e) {
try {
l(r.next(e))
} catch (e) {
i(e)
}
}
function s(e) {
try {
l(r.throw(e))
} catch (e) {
i(e)
}
}
function l(e) {
var t;
e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
e(t)
}))).then(o, s)
}
l((r = r.apply(e, t || [])).next())
}))
},
Ht = function(e, t) {
var n, r, a, i, o = {
label: 0,
sent: function() {
if (1 & a[0]) throw a[1];
return a[1]
},
trys: [],
ops: []
};
return i = {
next: s(0),
throw: s(1),
return: s(2)
}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this
}), i;
function s(i) {
return function(s) {
return function(i) {
if (n) throw new TypeError("Generator is already executing.");
for (; o;) try {
if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a;
switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) {
case 0:
case 1:
a = i;
break;
case 4:
return o.label++, {
value: i[1],
done: !1
};
case 5:
o.label++, r = i[1], i = [0];
continue;
case 7:
i = o.ops.pop(), o.trys.pop();
continue;
default:
if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
o = 0;
continue
}
if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) {
o.label = i[1];
break
}
if (6 === i[0] && o.label < a[1]) {
o.label = a[1], a = i;
break
}
if (a && o.label < a[2]) {
o.label = a[2], o.ops.push(i);
break
}
a[2] && o.ops.pop(), o.trys.pop();
continue
}
i = t.call(e, o)
} catch (e) {
i = [6, e], r = 0
} finally {
n = a = 0
}
if (5 & i[0]) throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
}
}([i, s])
}
}
},
Kt = {
P276: "P131",
P6375: "P669"
};
function Yt(e) {
var t, n;
return Zt(this, void 0, void 0, (function() {
var r, a, i, o, s, l, u, d, p, f, v, h, b, m, y, g, w, x;
return Ht(this, (function(k) {
switch (k.label) {
case 0:
Gt = new Set, r = [], a = {}, i = 0, o = e, k.label = 1;
case 1:
return i < o.length ? [4, xe(x = o[i])] : [3, 4];
case 2:
if (void 0 === (s = k.sent())) return r.push(x), a[x] = new Set, [3, 3];
for (l = 0, u = s.properties; l < u.length; l++) m = u[l], Gt.add(m);
k.label = 3;
case 3:
return i++, [3, 1];
case 4:
d = ["CommonsMedia", "ExternalId", "GlobeCoordinate", "Monolingualtext", "Quantity", "String", "Time", "WikibaseItem", "Url"], p = 0, f = r, k.label = 5;
case 5:
return p < f.length ? (x = f[p], [4, c("SELECT DISTINCT (SUBSTR(STR(?property), 32) as ?pid) {\n\t\t\t?property rdf:type wikibase:Property.\n\t\t\tVALUES ?supportedTypes {wikibase:".concat(d.join(" wikibase:"), "}.\n\t\t\t?property wikibase:propertyType ?supportedTypes.\n\t\t\t?property p:P2302 ?scopeConstraint.\n\t\t\t?scopeConstraint ps:P2302 wd:Q53869507;\n\t\t\t\tpq:P5314 wd:Q54828448.\n\t\t\tOPTIONAL {\n\t\t\t\t?property p:P2302 ?classConstraint .\n\t\t\t\t?classConstraint ps:P2302 wd:Q21503250;\n\t\t\t\t\tpq:P2308 ?class.\n\t\t\t\tFILTER ( ?class != wd:Q29934200 )\n\t\t\t}\n\t\t\tFILTER( IF ( BOUND(?class),\n\t\t\t\tEXISTS { wd:").concat(x, " wdt:P279* ?class. },\n\t\t\t\tNOT EXISTS { ?property wikibase:propertyType wikibase:ExternalId }\n\t\t\t) )\n\t\t}"))]) : [3, 8];
case 6:
if (v = k.sent(), !(null === (n = null === (t = null == v ? void 0 : v.results) || void 0 === t ? void 0 : t.bindings) || void 0 === n ? void 0 : n.length)) return [2];
for (h = 0; h < v.results.bindings.length; h++) b = v.results.bindings[h], m = b.pid.value, Gt.add(m), a[x].add(m);
k.label = 7;
case 7:
return p++, [3, 5];
case 8:
for (y = [], g = 0, w = Object.keys(a); g < w.length; g++) x = w[g], y.push({
id: x,
properties: Array.from(a[x].values())
});
return [4, ke(y)];
case 9:
return k.sent(), [4, Oe(Gt)];
case 10:
return k.sent(), [2]
}
}))
}))
}
function en(e, t, n) {
return Zt(this, void 0, void 0, (function() {
var t, r, a, i, o, s, l, u, c;
return Ht(this, (function(d) {
switch (d.label) {
case 0:
return t = G(n, "P31"), void 0 !== Gt ? [3, 2] : [4, Yt(t)];
case 1:
d.sent(), d.label = 2;
case 2:
return r = [], a = e.text().replace(/:$/, "").trim().toLowerCase(), i = a.replace(/\(.+?\)/, "").trim(), [4, ge(Array.from(Gt))];
case 3:
for (o = d.sent(), s = function(e) {
if (!e.aliases || !e.aliases.includes(a) && !e.aliases.includes(i)) return "continue";
if (t.length) {
var n = t.map((function(t) {
return e.constraints.noneOfTypes[t]
})).filter((function(e) {
return void 0 !== e
}));
if (n.length) {
var o = n.pop();
return o && r.push(o), "continue"
}
}
if (Kt[e.id]) return r.push(Kt[e.id]), "continue";
r.push(e.id)
}, l = 0, u = o; l < u.length; l++) c = u[l], s(c);
return [2, r]
}
}))
}))
}
var tn = function(e, t, n, r) {
return new(n || (n = Promise))((function(a, i) {
function o(e) {
try {
l(r.next(e))
} catch (e) {
i(e)
}
}
function s(e) {
try {
l(r.throw(e))
} catch (e) {
i(e)
}
}
function l(e) {
var t;
e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
e(t)
}))).then(o, s)
}
l((r = r.apply(e, t || [])).next())
}))
},
nn = function(e, t) {
var n, r, a, i, o = {
label: 0,
sent: function() {
if (1 & a[0]) throw a[1];
return a[1]
},
trys: [],
ops: []
};
return i = {
next: s(0),
throw: s(1),
return: s(2)
}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this
}), i;
function s(i) {
return function(s) {
return function(i) {
if (n) throw new TypeError("Generator is already executing.");
for (; o;) try {
if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a;
switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) {
case 0:
case 1:
a = i;
break;
case 4:
return o.label++, {
value: i[1],
done: !1
};
case 5:
o.label++, r = i[1], i = [0];
continue;
case 7:
i = o.ops.pop(), o.trys.pop();
continue;
default:
if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
o = 0;
continue
}
if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) {
o.label = i[1];
break
}
if (6 === i[0] && o.label < a[1]) {
o.label = a[1], a = i;
break
}
if (a && o.label < a[2]) {
o.label = a[2], o.ops.push(i);
break
}
a[2] && o.ops.pop(), o.trys.pop();
continue
}
i = t.call(e, o)
} catch (e) {
i = [6, e], r = 0
} finally {
n = a = 0
}
if (5 & i[0]) throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
}
}([i, s])
}
}
},
rn = n(311),
an = n(119),
on = new Set;
function sn(e) {
return tn(this, void 0, void 0, (function() {
var t, n, r, a;
return nn(this, (function(i) {
switch (i.label) {
case 0:
return [4, _e(t = e.data("wikidata-property-id"))];
case 1:
if (void 0 === (n = i.sent())) return an.notify(bt("no-property-data").replace("$1", t), {
type: "error",
tag: "wikidataInfoboxExport-error"
}), [2, []];
switch ((r = {
propertyId: t,
text: "",
$field: e.clone(),
$wrapper: e
}).$field.find("sup.reference").remove(), r.$field.find(".printonly").remove(), r.$field.find('[style*="display:none"]').remove(), r.text = r.$field.text().trim(), 1 === (a = e.closest("tr")).length && 1 === a.find("[data-wikidata-property-id]").length && (r.$wrapper = a.clone()), n.datatype) {
case "commonsMedia":
return [2, dt(r)];
case "external-id":
return [2, pt(r)];
case "globe-coordinate":
return [2, Bt(r)];
case "monolingualtext":
return [2, ft(r)];
case "quantity":
return [2, Be(r)];
case "string":
return [2, Mt(r)];
case "time":
return [2, Ue(r)];
case "wikibase-item":
return [2, at(r)];
case "url":
return [2, zt(r)]
}
return an.notify(bt("unknown-datatype").replace("$1", n.datatype), {
type: "error",
tag: "wikidataInfoboxExport-error"
}), [2, []]
}
}))
}))
}
function ln() {
return tn(this, void 0, void 0, (function() {
var e, t, n, r, a, i, o, s;
return nn(this, (function(l) {
switch (l.label) {
case 0:
return (e = rn(this)).hasClass("no-wikidata-loader") || e.parents(".no-wikidata[data-wikidata-property-id]").length ? [2] : (e.addClass("infobox-export-loader"), [4, sn(e)]);
case 1:
for (a in t = l.sent(), n = e.find(".no-wikidata[data-wikidata-property-id]").toArray(), r = [], n) r.push(a);
i = 0, l.label = 2;
case 2:
return i < r.length ? (o = r[i], [4, sn(rn(n[o]))]) : [3, 5];
case 3:
s = l.sent(), t.push.apply(t, s), l.label = 4;
case 4:
return i++, [3, 2];
case 5:
return [4, Dt(t)];
case 6:
return l.sent(), e.removeClass("infobox-export-loader"), [2]
}
}))
}))
}
function un() {
var e, t;
return tn(this, void 0, void 0, (function() {
var n;
return nn(this, (function(r) {
switch (r.label) {
case 0:
return void 0 !== he("references.P143") && void 0 !== he("references.P4656") ? [2] : [4, c('SELECT ?wiki WHERE { ?wiki wdt:P31/wdt:P279* wd:Q33120876 . ?wiki wdt:P856 ?site . FILTER REGEX(STR(?site), "https://'.concat(location.host, '/") }'))];
case 1:
return n = r.sent(), (null === (t = null === (e = null == n ? void 0 : n.results) || void 0 === e ? void 0 : e.bindings) || void 0 === t ? void 0 : t.length) ? (be("references.P143", [{
property: "P143",
snaktype: "value",
datavalue: {
type: "wikibase-entityid",
value: {
id: n.results.bindings[0].wiki.value.replace("http://www.wikidata.org/entity/", "")
}
}
}]), be("references.P4656", [{
property: "P4656",
datatype: "url",
snaktype: "value",
datavalue: {
type: "string",
value: "https://" + location.host + "/?oldid=" + an.config.get("wgRevisionId")
}
}]), me(), [2]) : [2]
}
}))
}))
}
on.add("P2076"), on.add("P2077");
var cn = n(311),
dn = n(119);
cn.when(cn.ready, dn.loader.using(["mediawiki.api", "mediawiki.ForeignApi", "mediawiki.util", "oojs-ui-core", "oojs-ui.styles.icons-interactions", "oojs-ui-widgets", "oojs-ui-windows"])).done((function() {
return tn(this, void 0, void 0, (function() {
var e, t, r, a, i, o, s, u, c;
return nn(this, (function(d) {
switch (d.label) {
case 0:
return null === an.config.get("wgWikibaseItemId") || "view" !== an.config.get("wgAction") || null !== an.util.getParamValue("veaction") || window.ve && window.ve.init || an.config.get("wgNamespaceNumber") ? [2] : (e = rn([".infobox", ".infocaseta", ".sinottico", "table.toccolours", "table.vcard", "table.vevent", ".mw-parser-output > table:first-child"].join(","))).length ? (e.addClass("infobox-export"), t = n(194).toString(), an.util.addCSS(t), 0 === (r = e.find("caption, th[colspan], .entete")).length && (r = e.find("td[colspan]")), (r = r.eq(0)).addClass("infobox-export-preloader"), a = r.parent("tr").css("background-color"), "rgba(0, 0, 0, 0)" !== r.css("background-color") || void 0 !== a && "rgba(0, 0, 0, 0)" !== a || r.addClass("infobox-export-preloader-dark"), [4, l({
action: "wbgetentities",
props: ["info", "claims"],
ids: an.config.get("wgWikibaseItemId")
})]) : [2];
case 1:
if (!(i = d.sent()).success) return r.removeClass("infobox-export-preloader"), [2];
for (s in i.entities) {
if (-1 == s) return r.removeClass("infobox-export-preloader"), [2];
o = i.entities[s].claims, p = i.entities[s].lastrevid, _ = p;
break
}
return o ? (function() {
var e;
try {
e = JSON.parse(localStorage.getItem(pe))
} catch (e) {}
for (var t in e) t.match(/^re-/) && "string" == typeof e[t] && (e[t] = new RegExp(e[t]));
e && e.commit === he("commit") && (oe = e), void 0 === he("properties") && (oe.properties = {})
}(), [4, un()]) : (r.removeClass("infobox-export-preloader"), [2]);
case 2:
return d.sent(), [4, ne()];
case 3:
return d.sent(), (u = rn(".infobox-export:not(.vertical-navbox):not([data-from]) .no-wikidata")).length ? [3, 5] : rn(".infobox-export [data-wikidata-property-id]").length ? (r.removeClass("infobox-export-preloader"), [2]) : (rn(".infobox-export").find("tr > th + td, tr > td + td").each((function() {
rn(this).prev().addClass("infobox-export-label")
})), u = rn(".infobox-export:not(.vertical-navbox):not([data-from]) .infobox-export-label + td"), [4, Yt(G(o, "P31"))]);
case 4:
d.sent(), d.label = 5;
case 5:
return [4, Promise.all(u.map((function() {
return tn(this, void 0, void 0, (function() {
var e, t, n, r, a, i, s, l, u, c, d, p = this;
return nn(this, (function(f) {
switch (f.label) {
case 0:
return e = rn(this), void 0 === (t = e.attr("data-wikidata-property-id")) ? [3, 2] : (e.removeClass("no-wikidata").off("dblclick"), on.add(t), [4, vt(t, e, o[t])]);
case 1:
return f.sent() && (e.addClass("no-wikidata"), o[t] && o[t].length && e.addClass("partial-wikidata"), e.on("dblclick", ln)), e.closest("tr").find("[data-wikidata-qualifier-id]").each((function() {
on.add(rn(this).data("wikidata-qualifier-id"))
})), [2];
case 2:
return /^[\s\u200B-\u200D\uFEFF]*$/.test(e.text()) ? [2] : [4, en(e.parent().children("th, .infobox-export-label").first(), 0, o)];
case 3:
return n = f.sent(), [4, Promise.all(n.map((function(e) {
return tn(p, void 0, void 0, (function() {
return nn(this, (function(t) {
switch (t.label) {
case 0:
return [4, _e(e)];
case 1:
return [2, t.sent()]
}
}))
}))
})))];
case 4:
for (r = f.sent().filter((function(e) {
return e
})), a = [], i = 0, s = r; i < s.length; i++) c = s[i], o[c.id] && o[c.id].length && a.push(c.datatype);
if (!(r = r.filter((function(e) {
return !a.includes(e.datatype)
}))).length) return [2];
l = 0, u = r, f.label = 5;
case 5:
return l < u.length ? (c = u[l], a.includes(c.datatype) ? [3, 7] : [4, vt(c.id, e, o[c.id])]) : [3, 8];
case 6:
f.sent() && (on.add(c.id), (d = e).attr("data-wikidata-property-id") && (d = rn("<span>")), d.on("dblclick", ln).attr("data-wikidata-property-id", c.id).addClass("no-wikidata"), o[c.id] && o[c.id].length && d.addClass("partial-wikidata"), "SPAN" === d.prop("tagName") && e.contents().wrapAll(d)), f.label = 7;
case 7:
return l++, [3, 5];
case 8:
return [2]
}
}))
}))
})))];
case 6:
return d.sent(), c = n(71).toString(), an.util.addCSS(c), [4, Oe(on)];
case 7:
return d.sent(), r.removeClass("infobox-export-preloader"), [2]
}
var p
}))
}))
}))
}()
}();