"use strict"; (function(I, L, A, la) { const C = function() { function v(D) { throw Error("Failed to require " + D); } const t = {}; return { register: function(D, y) { t[D] = y; }, require: function(D, y) { return t[D] || v(y); }, include: function(D, y, q) { return t[D] || (q ? v(y) : null); } }; }(); C.register("$1", function(v, t, D) { function y(q) { const u = typeof q; if ("string" === u) if (/[^ <>!=()%^&|?:n0-9]/.test(q)) console.error("Invalid plural: " + q); else return new Function("n", "return " + q); "function" !== u && (q = function(d) { return 1 != d; }); return q; } v.init = function(q) { function u(h, n, r) { return (h = g[h]) && h[r] ? h[r] : n || ""; } function d(h) { return u(h, h, 0); } function b(h, n) { return u(n + "" + h, h, 0); } function k(h, n, r) { r = Number(q(r)); isNaN(r) && (r = 0); return u(h, r ? n : h, r); } q = y(q); let g = {}; return { __: d, _x: b, _n: k, _: d, x: b, n: k, load: function(h) { g = h || {}; return this; }, pluraleq: function(h) { q = y(h); return this; } }; }; return v; }({}, I, L)); C.register("$2", function(v, t, D) { v.ie = function() { return !1; }; v.init = function() { return v; }; return v; }({}, I, L)); C.register("$3", function(v, t, D) { Number.prototype.format = function(y, q, u) { var d = Math.pow(10, y || 0); y = []; d = String(Math.round(d * this) / d); var b = d.split("."); d = b[0]; b = b[1]; let k = d.length; do { y.unshift(d.substring(k - 3, k)); } while (0 < (k -= 3)); d = y.join(u || ","); if (b) { { u = b; y = u.length; let g; for (;"0" === u.charAt(--y); ) g = y; g && (u = u.substring(0, g)); b = u; } b && (d += (q || ".") + b); } return d; }; Number.prototype.percent = function(y) { let q = 0, u = this && y ? this / y * 100 : 0; if (0 === u) return "0"; if (100 === u) return "100"; if (99 < u) u = Math.min(u, 99.9), y = u.format(++q); else if (.5 > u) { u = Math.max(u, 1e-4); do { y = u.format(++q); } while ("0" === y && 4 > q); y = y.substring(1); } else y = u.format(0); return y; }; return v; }({}, I, L)); C.register("$4", function(v, t, D) { Array.prototype.indexOf || (Array.prototype.indexOf = function(y) { if (null == this) throw new TypeError(); var q = Object(this), u = q.length >>> 0; if (0 === u) return -1; var d = 0; 1 < arguments.length && (d = Number(arguments[1]), d != d ? d = 0 : 0 != d && Infinity != d && -Infinity != d && (d = (0 < d || -1) * Math.floor(Math.abs(d)))); if (d >= u) return -1; for (d = 0 <= d ? d : Math.max(u - Math.abs(d), 0); d < u; d++) if (d in q && q[d] === y) return d; return -1; }); return v; }({}, I, L)); C.register("$5", function(v, t, D) { D = t.JSON; D || (D = { parse: A.parseJSON, stringify: null }, t.JSON = D); v.parse = D.parse; v.stringify = D.stringify; return v; }({}, I, L)); C.register("$6", function(v, t, D) { v.trim = function(y, q) { for (q || (q = " \n"); y && -1 !== q.indexOf(y.charAt(0)); ) y = y.substring(1); for (;y && -1 !== q.indexOf(y.slice(-1)); ) y = y.substring(0, y.length - 1); return y; }; v.sprintf = function(y) { return v.vsprintf(y, [].slice.call(arguments, 1)); }; v.vsprintf = function(y, q) { let u = 0; return y.replace(/%(?:([1-9][0-9]*)\$)?([sud%])/g, function(d, b, k) { if ("%" === k) return "%"; d = b ? q[Number(b) - 1] : q[u++]; return null != d ? String(d) : "s" === k ? "" : "0"; }); }; return v; }({}, I, L)); C.register("$26", function(v, t, D) { function y(q) { return function(u, d) { let b = u[q] || 0; for (;(u = u.offsetParent) && u !== (d || D.body); ) b += u[q] || 0; return b; }; } v.top = y("offsetTop"); v.left = y("offsetLeft"); v.el = function(q, u) { q = D.createElement(q || "div"); u && (q.className = u); return q; }; v.txt = function(q) { return D.createTextNode(q || ""); }; v.rect = function(q) { return q.getBoundingClientRect(); }; return v; }({}, I, L)); C.register("$7", function(v, t, D) { function y(f, e, l) { function p() { x(); B = setTimeout(e, l); } function x() { B && clearTimeout(B); B = 0; } let B = 0; p(); A(f).on("mouseenter", x).on("mouseleave", p); return { die: function() { x(); A(f).off("mouseenter mouseleave"); } }; } function q(f, e) { f.fadeTo(e, 0, function() { f.slideUp(e, function() { f.remove(); A(t).triggerHandler("resize"); }); }); return f; } function u(f, e) { function l(H) { r[z] = null; q(A(f), 250); B && B.die(); var G; if (G = H) H.stopPropagation(), H.preventDefault(), G = !1; return G; } function p(H) { B && B.die(); return B = y(f, l, H); } const x = A(f); let B, z, E, F = x.find("button"); 0 === F.length && (x.addClass("is-dismissible"), F = A(''); C.require("$12", "tooltip.js").init(g); return g; } function u(g) { return q("cloud").attr("title", g.labels[8] + " (Ctrl-U)").on("click", function(h) { h.preventDefault(); g.focus().fuzzy(!g.fuzzy()); }); } function d(g) { return q("robot").attr("title", g.labels[9] + " (Ctrl-J)").on("click", function(h) { h.preventDefault(); g.fire("poHint"); }); } function b(g, h) { return C.require("$6", "string.js").vsprintf(g, h); } v.init = function(g) { const h = new y(); g = h.setRootCell(g); var n = g.splity("po-list", "po-edit"); let r = n[0], w = n[1]; n = w.splitx("po-trans", "po-comment"); var m = n[0]; let a = n[1].header("Loading.."); n = m.splity("po-source", "po-target"); m = n[0].header("Loading.."); n = n[1].header("Loading.."); g.distribute([ .34 ]); w.distribute([ .8 ]); h.setListCell(r); h.setSourceCell(m); h.setTargetCell(n); h.commentCell = a; h.editable.source = !1; return h; }; t = y.prototype = C.require("$29", "base.js").extend(y); t.getListHeadings = function() { const g = this.t(), h = [ g._x("Source text", "Editor") ]; this.targetLocale && (h[1] = g._x("Translation", "Editor")); return h; }; t.getListColumns = function() { const g = { source: 0 }; this.targetLocale && (g.target = 1); return g; }; t.getListEntry = function(g) { const h = this.cellText, n = [ function() { let r, w = h(g.source() || ""), m = g.context(); return m ? (r = D.createElement("p"), r.appendChild(D.createElement("mark")).innerText = m, r.appendChild(D.createTextNode(" " + w)), r) : w; } ]; this.targetLocale && (n[1] = function() { return h(g.translation() || ""); }); return n; }; t.stats = function() { let g = this.po, h = g.length, n = 0, r = 0, w = 0; g.each(function(m, a) { a.fuzzy() ? w++ : a.translated() ? n++ : r++; }); return { t: h, p: n.percent(h) + "%", f: w, u: r }; }; t.unlock = function() { const g = this.targetLocale; this._unlocked || (this.editable = { source: !0, context: !0, target: !1 }, this.po && this.po.unlock(), this.contextCell = this.targetCell, delete this.targetCell, g && (this._unlocked = g, delete this.targetLocale, this.reload(), this.fire("poLock", [ !1 ])), this.active && this.loadMessage(this.active)); }; t.lock = function() { const g = this._unlocked; g && (this.targetLocale = g, delete this._unlocked, this.po && this.po.lock(g), this.editable = { source: !1, context: !1, target: !0 }, this.targetCell = this.contextCell, delete this.contextCell, this.reload(), this.fire("poLock", [ !0, g ]), this.active && this.loadMessage(this.active)); }; t.locked = function() { return !this._unlocked; }; t.setStatus = function(g) { let h = this.$tnav; if (null == g) h && (h.remove(), this.$tnav = null); else { h || (this.$tnav = h = A("").append(u(this)).append(d(this)).appendTo(this.targetCell.header())); var n = []; g.translated() ? g.fuzzy() && n.push("po-fuzzy") : n.push("po-empty"); h.attr("class", n.join(" ")); } }; t.getSorter = function() { function g(r, w) { const m = r.weight(), a = w.weight(); return m === a ? h(r, w) : m > a ? -1 : 1; } function h(r, w) { return r.hash().localeCompare(w.hash()); } const n = this; return function(r) { const w = n.po, m = n.locked() ? g : h; r.sort(function(a, c) { return m(w.row(a), w.row(c)); }); }; }; t.validate = function(g) { g.err = null; if (g.untranslated(0)) return 0; const h = []; let n = this.validateMessagePrintf(g, h); n && (g.err = h); return n; }; t.validateMessagePrintf = function(g, h) { const n = g.format(); if ("no-" === n.substring(0, 3)) return 0; const r = g.msgid(), w = g.msgidPlural(); null == k && (k = C.require("$30", "printf.js").init()); var m = k; if (!("" !== n || m.sniff(r) || "" !== w && m.sniff(w))) return 0; let a = 0, c = m.parse(r); w && c.valid && (c = m.parse(w, c)); if (!c.valid) return 0; let f = c.count; if (0 !== f || "" !== n) { var e = this; g.eachMsg(function(l, p) { h[l] = []; if ("" !== p) { p = m.parse(p); var x = p.count; l = h[l]; if (p.valid) if (x > f) l.push(b(e.t()._("Too many placeholders; source text formatting suggests a maximum of %s"), [ f ])), a++; else if (x < f && "" === w) l.push(b(e.t()._("Missing placeholders; source text formatting suggests at least %s"), [ f ])), a++; else { x = c.types; for (const B in p.types) for (const z in p.types[B]) if (null == x[B] || null == x[B][z]) { l.push(e.t()._("Mismatching placeholder type; check against source text formatting")); a++; return; } } else l.push(e.t()._("Possible syntax error in string formatting")), a++; } }); return a; } }; t.handle = {}; let k; return v; }({}, I, L)); C.register("$14", function(v, t, D) { const y = { copy: 66, clear: 75, save: 83, fuzzy: 85, next: 40, prev: 38, enter: 13, invis: 73, hint: 74 }, q = { 38: !0, 40: !0, 73: !0 }, u = { 66: function(d, b) { if (d = b.current()) d.normalize(), b.focus().pasteMessage(d); }, 75: function(d, b) { if (d = b.current()) d.untranslate(), b.focus().pasteMessage(d); }, 85: function(d, b) { b.focus().fuzzy(!b.fuzzy()); }, 13: function(d, b) { b.getFirstEditable() && b.next(1, !0, !0); }, 40: function(d, b) { d = d.shiftKey; b.next(1, d, d); }, 38: function(d, b) { d = d.shiftKey; b.next(-1, d, d); }, 73: function(d, b) { if (!d.shiftKey) return !1; b.setInvs(!b.getInvs()); } }; v.init = function(d, b) { function k(h) { if (h.isDefaultPrevented() || !h.metaKey && !h.ctrlKey) return !0; const n = h.which; if (!g[n]) return !0; const r = u[n]; if (!r || h.altKey || h.shiftKey && !q[n] || !1 === r(h, d)) return !0; h.stopPropagation(); h.preventDefault(); return !1; } const g = {}; A(b || t).on("keydown", k); return { add: function(h, n) { u[y[h]] = n; return this; }, enable: function() { for (const h in arguments) g[y[arguments[h]]] = !0; return this; }, disable: function() { A(b || t).off("keydown", k); d = b = null; for (const h in u) g[h] = !1; } }; }; return v; }({}, I, L)); C.register("$31", function(v, t, D) { function y() { this.reIndex([]); } v.init = function() { return new y(); }; t = y.prototype; t.reIndex = function(q) { const u = {}, d = q.length; let b = -1; for (;++b < d; ) u[q[b]] = b; this.keys = q; this.length = b; this.ords = u; }; t.key = function(q, u) { if (null == u) return this.keys[q]; const d = this.keys[q], b = this.ords[u]; if (u !== d) { if (null != b) throw Error("Clash with item at [" + b + "]"); this.keys[q] = u; delete this.ords[d]; this.ords[u] = q; } return q; }; t.indexOf = function(q) { q = this.ords[q]; return null == q ? -1 : q; }; t.add = function(q, u) { let d = this.ords[q]; null == d && (this.keys[this.length] = q, d = this.ords[q] = this.length++); this[d] = u; return d; }; t.get = function(q) { return this[this.ords[q]]; }; t.has = function(q) { return null != this.ords[q]; }; t.del = function(q) { this.cut(this.ords[q], 1); }; t.cut = function(q, u) { u = u || 1; const d = [].splice.call(this, q, u); this.keys.splice(q, u); this.reIndex(this.keys); return d; }; t.each = function(q) { const u = this.keys, d = this.length; let b = -1; for (;++b < d; ) q(u[b], this[b], b); return this; }; t.sort = function(q) { const u = this.length, d = this.keys, b = this.ords, k = []; let g = -1; for (;++g < u; ) k[g] = [ this[g], d[g] ]; k.sort(function(n, r) { return q(n[0], r[0]); }); for (g = 0; g < u; g++) { var h = k[g]; this[g] = h[0]; h = h[1]; d[g] = h; b[h] = g; } return this; }; t.join = function(q) { return [].join.call(this, q); }; return v; }({}, I, L)); C.register("$32", function(v, t, D) { function y(q, u) { var d = new RegExp("^.{0," + (q - 1) + "}[" + u + "]"), b = new RegExp("^[^" + u + "]+"); return function(k, g) { for (var h = k.length, n; h > q; ) { n = d.exec(k) || b.exec(k); if (null == n) break; n = n[0]; g.push(n); n = n.length; h -= n; k = k.substring(n); } 0 !== h && g.push(k); return g; }; } v.create = function(q) { function u(r) { return g[r] || "\\" + r; } var d = /(?:\r\n|[\r\n\v\f\u2028\u2029])/g, b = /[ \r\n]+/g, k = /[\t\v\f\x07\x08\\"]/g, g = { "\t": "\\t", "\v": "\\v", "\f": "\\f", "": "\\a", "\b": "\\b" }; if (null == q || isNaN(q = Number(q))) q = 79; if (0 < q) { var h = y(q - 3, " "); var n = y(q - 2, "-– \\.,:;\\?!\\)\\]\\}\\>"); } return { pair: function(r, w) { if (!w) return r + ' ""'; w = w.replace(k, u); var m = 0; w = w.replace(d, function() { m++; return "\\n\n"; }); if (!(m || q && q < w.length + r.length + 3)) return r + ' "' + w + '"'; r = [ r + ' "' ]; w = w.split("\n"); if (n) for (var a = -1, c = w.length; ++a < c; ) n(w[a], r); else r = r.concat(w); return r.join('"\n"') + '"'; }, prefix: function(r, w) { r = r.split(d); return w + r.join("\n" + w); }, refs: function(r) { r = r.replace(b, " ", r); h && (r = h(r, []).join("\n#: ")); return "#: " + r; } }; }; return v; }({}, I, L)); C.register("$44", function(v, t, D) { function y() { this.length = 0; } v.init = function() { return new y(); }; t = y.prototype; t.push = function(q) { this[this.length++] = q; return this; }; t.sort = function(q) { [].sort.call(this, q); return this; }; t.each = function(q) { for (var u = -1, d = this.length; ++u < d; ) q(u, this[u]); return this; }; return v; }({}, I, L)); C.register("$33", function(v, t, D) { function y() {} v.extend = function(q) { return q.prototype = new y(); }; t = y.prototype = C.require("$42", "abstract.js").init([ "load" ]); t.row = function(q) { return this.rows[q]; }; t.lock = function(q) { return this.locale(q || { lang: "zxx", label: "", nplurals: 2, pluraleq: "n!=1" }); }; t.unlock = function() { const q = this.loc; this.loc = null; return q; }; t.locale = function(q) { null == q ? q = this.loc : this.loc = q = C.require("$41", "locale.js").cast(q); return q; }; t.source = function(q) { null == q ? q = this.src || C.require("$41", "locale.js").cast({ lang: "en", label: "English", nplurals: 2, pluraleq: "n!=1" }) : this.src = q = C.require("$41", "locale.js").cast(q); return q; }; t.each = function(q) { this.rows.each(q); return this; }; t.indexOf = function(q) { "object" !== typeof q && (q = this.get(q)); if (!q) return -1; null == q.idx && (q.idx = this.rows.indexOf(q.hash())); return q.idx; }; t.get = function(q) { return this.rows && this.rows.get(q); }; t.has = function(q) { return this.rows && this.rows.has(q); }; t.del = function(q) { q = this.indexOf(q); if (-1 !== q) { const u = this.rows.cut(q, 1); if (u && u.length) return this.length = this.rows.length, this.rows.each(function(d, b, k) { b.idx = k; }), q; } }; t.reIndex = function(q, u) { const d = q.hash(), b = this.indexOf(q), k = this.rows.indexOf(d); return k === b ? b : -1 !== k ? (u = (u || 0) + 1, q.source("Error, duplicate " + String(u) + ": " + q.source()), this.reIndex(q, u)) : this.rows.key(b, d); }; t.sort = function(q) { this.rows.sort(q); return this; }; t.export = function() { const q = this.rows, u = q.length, d = C.require("$44", "list.js").init(); let b = -1; for (;++b < u; ) d.push(q[b]); return d; }; return v; }({}, I, L)); C.register("$34", function(v, t, D) { function y(d, b, k) { if (null == k) return d[b] || ""; d[b] = k || ""; return d; } function q() { this._id = this.id = ""; } function u(d, b) { const k = d.length; let g = -1; for (;++g < k; ) b(g, d[g]); } v.extend = function(d) { return d.prototype = new q(); }; t = q.prototype; t.flag = function(d, b) { const k = this.flg || (this.flg = []); if (null != b) k[b] = d; else for (b = Math.max(k.length, this.src.length, this.msg.length); 0 !== b--; ) k[b] = d; return this; }; t.flagged = function(d) { return (this.flg || [])[d || 0] || 0; }; t.hasFlag = function() { const d = this.flg || []; let b = d.length; for (;0 !== b--; ) if (this.isFlag(d[b])) return !0; return !1; }; t.isFlag = function(d) { return 0 < d; }; t.flags = function() { const d = {}, b = [], k = this.flg || []; let g = k.length; for (;0 !== g--; ) { const h = k[g]; d[h] || (d[h] = !0, b.push(h)); } return b; }; t.flaggedAs = function(d, b) { const k = this.flg || []; if (null != b) return d === k[b] || 0; for (b = k.length; 0 !== b--; ) if (k[b] === d) return !0; return !1; }; t.fuzzy = function(d, b) { const k = this.flaggedAs(4, d); null != b && this.flag(b ? 4 : 0, d); return k; }; t.source = function(d, b) { if (null == d) return this.src[b || 0] || ""; this.src[b || 0] = d; return this; }; t.plural = function(d, b) { if (null == d) return this.src[b || 1] || ""; this.src[b || 1] = d || ""; return this; }; t.sourceForms = function() { return this.srcF; }; t.targetForms = function() { return this.msgF; }; t.each = function(d) { const b = this.src, k = this.msg, g = Math.max(b.length, k.length); let h = -1; for (;++h < g; ) d(h, b[h], k[h]); return this; }; t.eachSrc = function(d) { u(this.src, d); return this; }; t.eachMsg = function(d) { u(this.msg, d); return this; }; t.count = function() { return Math.max(this.src.length, this.msg.length); }; t.pluralized = function() { return 1 < this.src.length || 1 < this.msg.length; }; t.translate = function(d, b) { this.msg[b || 0] = d || ""; return this; }; t.untranslate = function(d) { if (null != d) this.msg[d] = ""; else { const b = this.msg, k = b.length; for (d = 0; d < k; d++) b[d] = ""; } return this; }; t.translation = function(d) { return this.msg[d || 0] || ""; }; t.errors = function(d) { return this.err && this.err[d || 0] || []; }; t.valid = function() { return null == this.err; }; t.translated = function(d) { if (null != d) return !!this.msg[d]; const b = this.msg, k = b.length; for (d = 0; d < k; d++) if (!b[d]) return !1; return !0; }; t.untranslated = function(d) { if (null != d) return !this.msg[d]; const b = this.msg, k = b.length; for (d = 0; d < k; d++) if (b[d]) return !1; return !0; }; t.comment = function(d) { return y(this, "cmt", d); }; t.notes = function(d) { return y(this, "xcmt", d); }; t.refs = function(d) { return y(this, "rf", d); }; t.format = function(d) { return y(this, "fmt", d); }; t.context = function(d) { return y(this, "ctx", d); }; t.tags = function() { return this.tg; }; t.getMax = function(d) { return (this.mx || [ 0 ])[d] || 0; }; t.toString = t.toText = function() { return this.src.concat(this.msg, [ this.id, this.ctx ]).join(" "); }; t.weight = function() { let d = 0; this.translation() || (d += 2); this.fuzzy() && (d += 1); return d; }; t.equals = function(d) { return this === d || this.hash() === d.hash(); }; t.hash = function() { return this.id; }; t.normalize = function() { let d = -1, b = this.msg.length; for (;++d < b; ) this.msg[d] = this.src[Math.min(d, 1)] || ""; }; t.disabled = function(d) { return !!(this.lck || [])[d || 0]; }; t.disable = function(d) { (this.lck || (this.lck = []))[d || 0] = !0; return this; }; t.saved = function(d) { const b = this.drt; if (null == b) return !0; if (null != d) return !b[d]; for (d = b.length; 0 !== d--; ) if (b[d]) return !1; return !0; }; t.unsave = function(d) { (this.drt || (this.drt = []))[d || 0] = !0; return this; }; t.save = function(d) { null == d ? this.drt = null : (this.drt || (this.drt = []))[d] = !1; return this; }; t.is = function(d) { return d && (d === this || d.idx === this.idx); }; t.isHTML = function(d) { if (null == d) return this.htm || !1; this.htm = d; }; t = null; return v; }({}, I, L)); C.register("$15", function(v, t, D) { function y(g) { return { "Project-Id-Version": "PACKAGE VERSION", "Report-Msgid-Bugs-To": "", "POT-Creation-Date": g || "", "PO-Revision-Date": g || "", "Last-Translator": "", "Language-Team": "", Language: "", "Plural-Forms": "", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit" }; } function q(g, h) { g = g || ""; h && (g += "\0" + h); return g; } function u(g) { const h = t.console; h && h.error && h.error(g.message || String(g)); } function d(g) { return C.require("$32", "format.js").create(g); } function b(g) { this.locale(g); this.clear(); this.head = y(this.now()); } function k(g, h) { this.src = [ g || "" ]; this.msg = [ h || "" ]; } v.create = function(g) { return new b(g); }; D = C.require("$33", "messages.js").extend(b); D.clear = function() { this.rows = C.require("$31", "collection.js").init(); this.length = 0; return this; }; D.now = function() { function g(a, c) { for (a = String(a); a.length < c; ) a = "0" + a; return a; } var h = new Date(); const n = h.getUTCFullYear(), r = h.getUTCMonth() + 1, w = h.getUTCDate(), m = h.getUTCHours(); h = h.getUTCMinutes(); return g(n, 4) + "-" + g(r, 2) + "-" + g(w, 2) + " " + g(m, 2) + ":" + g(h, 2) + "+0000"; }; D.header = function(g, h) { const n = this.head || (this.head = {}); if (null == h) return this.headers()[g] || ""; n[g] = h || ""; return this; }; D.headers = function(g) { const h = this.now(), n = this.head || (this.head = y(h)); if (null != g) { for (w in g) n[w] = g[w]; return this; } const r = this.locale(); g = {}; for (w in n) g[w] = String(n[w]); if (r) { g.Language = String(r) || "zxx"; g["Language-Team"] = r.label || g.Language; g["Plural-Forms"] = "nplurals=" + (r.nplurals || "2") + "; plural=" + (r.pluraleq || "n!=1") + ";"; var w = "PO-Revision-Date"; } else g.Language = "", g["Plural-Forms"] = "nplurals=INTEGER; plural=EXPRESSION;", g["PO-Revision-Date"] = "YEAR-MO-DA HO:MI+ZONE", w = "POT-Creation-Date"; g[w] || (g[w] = h); g["X-Generator"] = "Loco https://localise.biz/"; return g; }; D.get = function(g, h) { g = q(g, h); return this.rows.get(g); }; D.add = function(g, h) { g instanceof k || (g = new k(g)); h && g.context(h); h = g.hash(); this.rows.get(h) ? u("Duplicate message at index " + this.indexOf(g)) : (g.idx = this.rows.add(h, g), this.length = this.rows.length); return g; }; D.load = function(g) { let h = -1, n, r; var w; let m, a, c, f = (w = this.locale()) && w.nplurals || 2, e = []; for (;++h < g.length; ) n = g[h], null == n.parent ? (r = n.source || n.id, w = n.target || "", m = n.context, r || m ? (a = new k(r, w), a._id = n._id, m && a.context(m), n.flag && a.flag(n.flag, 0), n.comment && a.comment(n.comment), n.notes && a.notes(n.notes), n.refs && a.refs(n.refs), a.format(n.format), n.message = a, this.add(a), n.prev && n.prev[0] && (a.prev(n.prev[0].source, n.prev[0].context), n.prev[1] && a._src.push(n.prev[1].source || ""))) : 0 === h && "object" === typeof w && (this.head = w, this.headcmt = n.comment)) : e.push(n); for (h = -1; ++h < e.length; ) try { n = e[h]; r = n.source || n.id; a = g[n.parent] && g[n.parent].message; if (!a) throw Error("parent missing for plural " + r); c = n.plural; 1 === c && a.plural(r); c >= f || (n.flag && a.flag(n.flag, c), a.translate(n.target || "", c), n.format && !a.format() && a.format(n.format)); } catch (l) { u(l); } return this; }; D.wrap = function(g) { this.fmtr = d(g); return this; }; D.toString = function() { var g, h = this.locale(), n = [], r = [], w = this.headers(), m = !h, a = h && h.nplurals || 2, c = this.fmtr || d(); w[h ? "PO-Revision-Date" : "POT-Creation-Date"] = this.now(); for (g in w) r.push(g + ": " + w[g]); r = new k("", r.join("\n")); r.comment(this.headcmt || ""); m && r.fuzzy(0, !0); n.push(r.toString()); n.push(""); this.rows.each(function(f, e) { f && (n.push(e.cat(c, m, a)), n.push("")); }); return n.join("\n"); }; D = C.require("$34", "message.js").extend(k); D.msgid = function() { return this.src[0]; }; D.msgidPlural = function() { return this.src[1] || ""; }; D.prev = function(g, h) { this._src = [ g || "" ]; this._ctx = h; }; D.hash = function() { return q(this.source(), this.context()); }; D.toString = function() { return this.cat(d()); }; D.cat = function(g, h, n) { var r = [], w; (w = this.cmt) && r.push(g.prefix(w, "# ")); (w = this.xcmt) && r.push(g.prefix(w, "#. ")); var m = this.rf; if (w = this._id) m += (m ? " " : "") + "loco:" + w; m && /\S/.test(m) && r.push(g.refs(m)); !h && this.fuzzy() && r.push("#, fuzzy"); (w = this.fmt) && r.push("#, " + w + "-format"); (w = this._ctx) && r.push(g.prefix(g.pair("msgctxt", w), "#| ")); if (w = this._src) w[0] && r.push(g.prefix(g.pair("msgid", w[0]), "#| ")), w[1] && r.push(g.prefix(g.pair("msgid_plural", w[1]), "#| ")); (w = this.ctx) && r.push(g.pair("msgctxt", w)); r.push(g.pair("msgid", this.src[0])); if (null == this.src[1]) r.push(g.pair("msgstr", h ? "" : this.msg[0])); else for (m = -1, r.push(g.pair("msgid_plural", this.src[1])), w = this.msg || [ "", "" ], n = n || w.length; ++m < n; ) r.push(g.pair("msgstr[" + m + "]", h ? "" : w[m] || "")); return r.join("\n"); }; D.compare = function(g, h) { let n = this.weight(), r = g.weight(); if (n > r) return 1; if (n < r) return -1; if (h) { n = this.hash().toLowerCase(); r = g.hash().toLowerCase(); if (n < r) return 1; if (n > r) return -1; } return 0; }; D.copy = function() { let g = new k(), h, n; for (h in this) this.hasOwnProperty(h) && ((n = this[h]) && n.concat && (n = n.concat()), g[h] = n); return g; }; return v; }({}, I, L)); C.register("$17", function(v, t, D) { v.init = function(y, q) { function u() { return g || (g = A('
').dialog({ dialogClass: "loco-modal loco-modal-wide", modal: !0, autoOpen: !1, closeOnEscape: !0, resizable: !1, height: 500 })); } function d(h, n, r) { h = A("

").text(r); u().dialog("close").html("").dialog("option", "title", "Error").append(h).dialog("open"); } function b(h) { const n = h && h.code; if (n) { for (var r = n.length, w = A("
    ").attr("class", h.type), m = -1; ++m < r; ) A("
  1. ").html(n[m]).appendTo(w); 0 !== h.line && w.find("li").eq(h.line - 1).attr("class", "highlighted"); u().dialog("close").html("").dialog("option", "title", h.path + ":" + h.line).append(w).dialog("open"); } } function k(h) { h = h.target; const n = A(h).find("li.highlighted")[0]; h.scrollTop = Math.max(0, (n && n.offsetTop || 0) - Math.floor(h.clientHeight / 2)); } let g; return { load: function(h) { u().html('
    ').dialog("option", "title", "Loading..").off("dialogopen").dialog("open").on("dialogopen", k); h = A.extend({ ref: h, path: q.popath }, q.project || {}); y.ajax.post("fsReference", h, b, d); } }; }; return v; }({}, I, L)); C.register("$18", function(v, t, D) { function y() { this.inf = {}; } function q() { const b = D.createElement("p"), k = /&(#\d+|#x[0-9a-f]|[a-z]+);/i, g = /<[a-z]+\s/i; let h, n; return { sniff: function(r) { if (r === h) return n; h = r; if (k.test(r) || g.test(r)) if (b.innerHTML = r, b.textContent !== r) return n = !0; return n = !1; } }; } v.create = function(b, k) { k && "function" === typeof k.create || console.error("module.create is not callable"); k = k.create(y); k.init(b); return k; }; const u = y.prototype; u.init = function(b) { this.inf = b || {}; return this; }; u.param = function(b) { return this.inf[b] || ""; }; u.key = function() { return this.param("key") || ""; }; u.getId = function() { return this.param("id") || "none"; }; u.getUrl = function() { return this.param("url") || ""; }; u.toString = function() { return this.param("name") || this.getId(); }; u.getSrc = function() { return this.param("src") || "en"; }; u.setSrc = function(b) { this.inf.src = this.mapLang(b, this.getLangMap()); }; u.stderr = function(b) { const k = (t.loco || {}).notices; k && k.error && k.error(String(this) + ": " + String(b)); }; u.xhrError = function(b, k, g) { try { const h = b.responseText, n = h && t.JSON.parse(h); g = n && this.parseError(n) || g; } catch (h) {} return g || this.httpError(b); }; u.httpError = function(b) { return (b = b && b.status) && 200 !== b ? "Responded status " + b : "Unknown error"; }; u.parseError = function(b) { return b && b.error || ""; }; u.mapLang = function(b, k) { const g = String(b).replace("_", "-").toLowerCase(); var h = b.lang; k = k[g] || k[h] || []; b = k.length; if (0 === b) return h; if (1 < b) for (h = -1; ++h < b; ) { const n = k[h]; if (n === g) return n; } return k[0]; }; u.getLangMap = function() { return {}; }; u.maxChr = function() { return 0; }; u.fixURL = function(b) { b = b.split("://", 2); 1 === b.length && b.unshift("https"); return b[0] + "://" + b[1].replace(/\/{2,}/g, "/"); }; u.translate = function(b, k, g) { return this.batch([ b ], k, this.isHtml(b.source), g); }; u.unwind = function(b, k) { const g = [], h = b.length; for (let n = 0; n < h; n++) g.push(b[n][k]); return g; }; u.contextualize = function(b) { return [ b.context || "", b.notes || "" ].join("\n").trim(); }; u.verify = function(b) { return this.translate({ source: "OK" }, { lang: "fr", toString: function() { return "fr"; } }, function(k, g) { b(!!g); }); }; u.hash = function() { return this.key(); }; u._call = function(b) { const k = this; k.state = null; b.cache = !0; b.dataType = "json"; b.error = function(g, h, n) { k.stderr(k.xhrError(g, h, n)); }; return k.abortable(A.ajax(b)); }; u.abortable = function(b) { const k = this; b.always(function() { k.$r === b && (k.$r = null); }); return k.$r = b; }; u.abort = function() { const b = this.$r; b && b.abort(); }; u.isHtml = function(b) { return (d || (d = q())).sniff(b); }; let d; return v; }({}, I, L)); C.register("$19", function(v, t, D) { function y(q) { this.api = q; this.chars = 0; } v.create = function(q) { return new y(q); }; t = y.prototype; t.init = function(q, u) { function d(f) { let e = { id: k.length, length: 0, html: f.html, items: [] }; k.push(e); return h[f.html ? 1 : 0] = e; } function b(f, e, l) { var p = f.source(null, l); if (p && (f.untranslated(l) || u)) { { l = f.notes(); const B = f.context(); f = p.length; var x = g.isHtml(p); p = { source: p, context: B, notes: l }; l = h[x ? 1 : 0]; x = l.items; if (a && f > a) w++, f = void 0; else { if (l.length + f > m || 50 === x.length) l = d(l), x = l.items; x.push(p); l.length += f; n += f; r += 1; f = p; } } f && (f.id = e); } } const k = [], g = this.api; let h = [], n = 0, r = 0, w = 0, m = 1e4, a = g.maxChr(); a && (m = Math.min(m, a)); d({ html: !1 }); d({ html: !0 }); const c = q.locale(); q.each(1 < c.nplurals ? function(f, e, l) { b(e, l, 0); b(e, l, 1); } : function(f, e, l) { b(e, l, 0); }); h = []; this.chars = n; this.length = r; this.batches = k; this.locale = c; w && g.stderr("Strings over " + m + " characters long will be skipped"); }; t.abort = function() { this.state = "abort"; return this; }; t.dispatch = function(q) { function u(z, E) { if (!b()) return !1; if (!E) return !0; f++; const F = q.row(z.id), H = z.source; let G = 0; F.each(function(M, O, R) { E !== R && (H === O || 1 < M && F.source(null, 1) === H) && (F.translate(E, M), G++, l++); }); G && r("each", [ F ]); } function d(z) { return function(E, F) { u(z[E], F); return !0; }; } function b() { return "abort" === w.state ? (m && (m.abort(), n()), !1) : !0; } function k() { const z = a.shift(); if (z) { const E = z.items; E && E.length ? m.batch(E, c, z.html, d(E)).fail(g).always(h) : h(); } else n(); } function g() { w.abort(); n(); } function h() { e++; r("prog", [ e, x ]); b() && k(); } function n() { m = a = null; r("done"); } function r(z, E) { z = B[z] || []; let F = z.length; for (;0 <= --F; ) z[F].apply(null, E); } let w = this, m = w.api, a = w.batches || [], c = w.locale, f = 0, e = 0, l = 0, p = w.length, x = a.length, B = { done: [], each: [], prog: [] }; w.state = ""; k(); return { done: function(z) { B.done.push(z); return this; }, each: function(z) { B.each.push(z); return this; }, prog: function(z) { B.prog.push(z); return this; }, stat: function() { return { todo: function() { return Math.max(p - f, 0); }, did: function() { return f; } }; } }; }; return v; }({}, I, L)); C.register("$20", function(v, t, D) { function y() {} v.create = function(q) { (y.prototype = new q()).batch = function(u, d, b, k) { function g(w) { let m = -1; for (;++m < n && !1 !== k(m, w[m], d); ); } const h = t.loco, n = u.length; u = { hook: this.getId(), type: b ? "html" : "text", locale: String(d), source: this.getSrc(), sources: u }; const r = A.Deferred(); this.abortable(h.ajax.post("apis", u, function(w) { g(w && w.targets || []); r.resolve(); }, function() { g([]); r.reject(); })); return r.promise(); }; return new y(); }; return v; }({}, I, L)); C.register("$36", { zh: [ "zh", "zh-cn", "zh-tw" ], he: [ "iw" ], jv: [ "jw" ] }); C.register("$21", function(v, t, D) { function y() {} v.create = function(q) { q = y.prototype = new q(); q.toString = function() { return "Google Translate"; }; q.parseError = function(u) { if (u.error) { const d = [], b = u.error.errors || [], k = b.length; let g = -1; for (;++g < k; ) d.push(b[g].message || ""); return "Error " + u.error.code + ": " + d.join(";"); } return ""; }; q.getLangMap = function() { return C.require("$36", "google.json"); }; q.batch = function(u, d, b, k) { function g(m) { const a = w.length; let c = -1; for (;++c < a && !1 !== k(c, (m[c] || {}).translatedText || "", d); ); } const h = this, n = h.getSrc(); b = b ? "html" : "text"; const r = h.mapLang(d, h.getLangMap()), w = this.unwind(u, "source"); return h._call({ url: "https://translation.googleapis.com/language/translate/v2?source=" + n + "&target=" + r + "&format=" + b, method: "POST", traditional: !0, data: { key: h.key(), q: w } }).done(function(m, a, c) { m.data ? g(m.data.translations || []) : (h.stderr(h.parseError(m) || h.httpError(c)), g([])); }).fail(function() { g([]); }); }; return new y(); }; return v; }({}, I, L)); C.register("$37", { zh: [ "zh", "zh-cn", "zh-tw" ], pt: [ "pt", "pt-pt", "pt-br" ] }); C.register("$22", function(v, t, D) { function y() {} v.create = function(q) { q = y.prototype = new q(); q.parseError = function(u) { var d = u.details || {}; let b = d.message; d = d.texts; return b ? (d && d !== b && (b += "; " + d), b = b.replace(/https?:\/\/(?:[a-z]+\.)?lecto.ai[-\w\/?&=%.+~]*/, function(k) { k += -1 === k.indexOf("?") ? "?" : "&"; return k + "ref=loco"; }), "Error " + (u.status || "0") + ": " + b) : ""; }; q.maxChr = function() { return 1e3; }; q.getLangMap = function() { return C.require("$37", "lecto.json"); }; q.batch = function(u, d, b, k) { function g(m) { const a = w.length; let c = -1, f = (m[0] || { translated: [] }).translated || []; for (;++c < a && (m = f[c] || "", !1 !== k(c, m, d)); ); } const h = this; b = this.getSrc(); const n = h.param("api") || "https://api.lecto.ai", r = h.mapLang(d, h.getLangMap()), w = this.unwind(u, "source"); return h._call({ url: h.fixURL(n + "/v1/translate/text"), method: "POST", data: JSON.stringify({ to: [ r ], from: b, texts: w }), headers: { "Content-Type": "application/json; charset=UTF-8", "X-API-Key": h.key(), Accept: "application/json" } }).done(function(m, a, c) { m ? g(m.translations || []) : (h.stderr(h.parseError(m) || h.httpError(c)), g([])); }).fail(function() { g([]); }); }; return new y(); }; return v; }({}, I, L)); C.register("$38", { nn: [ "no" ], pt: [ "pt", "pt-pt" ], sr: [ "sr", "sr-cyrl", "sr-latn" ], "sr-rs": [ "sr-cyrl" ], tlh: [ "tlh-latn", "tlh-piqd" ], zh: [ "zh-hans", "zh-hant" ], "zh-cn": [ "zh-hans" ], "zh-hk": [ "zh-hans" ], "zh-sg": [ "zh-hans" ], "zh-tw": [ "zh-hant" ] }); C.register("$23", function(v, t, D) { function y() {} v.create = function(q) { q = y.prototype = new q(); q.toString = function() { return "Microsoft Translator text API"; }; q.parseError = function(u) { return u && u.error ? u.error.message : ""; }; q.maxChr = function() { return 1e4; }; q.getLangMap = function() { return C.require("$38", "ms.json"); }; q.region = function() { return this.param("region") || "global"; }; q.hash = function() { return this.key() + this.region(); }; q.batch = function(u, d, b, k) { function g(c) { let f = -1; for (var e; ++f < w && (e = c[f] || {}, e = e.translations || [], e = e[0] || {}, !1 !== k(f, e.text || "", d)); ); } let h = this, n = [], r = h.getSrc(); u = this.unwind(u, "source"); let w = u.length, m = -1; b = b ? "html" : "plain"; let a = h.mapLang(d, h.getLangMap()); for (;++m < w; ) n.push({ Text: u[m] }); return h._call({ url: "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&from=" + r + "&to=" + a + "&textType=" + b, method: "POST", data: JSON.stringify(n), headers: { "Content-Type": "application/json; charset=UTF-8", "Ocp-Apim-Subscription-Key": this.key(), "Ocp-Apim-Subscription-Region": h.region() } }).done(function(c, f, e) { c && c.length ? g(c) : (h.stderr(h.parseError(c) || h.httpError(e)), g([])); }).fail(function() { g([]); }); }; return new y(); }; return v; }({}, I, L)); C.register("$24", function(v, t, D) { v.init = function(y) { function q() { O || (E.on("click", n), O = A('
    ').dialog({ dialogClass: "request-filesystem-credentials-dialog loco-modal", minWidth: 580, modal: !0, autoOpen: !1, closeOnEscape: !0 }).on("change", 'input[name="connection_type"]', function() { this.checked && A("#ssh-keys").toggleClass("hidden", "ssh" !== A(this).val()); })); return O; } function u() { H && (d(A(c)), H = !1); if (l && M) { var J = M, Q = A(F); Q.find("span.loco-msg").text(J); G || (Q.removeClass("jshide").hide().fadeIn(500), G = !0); } else G && (d(A(F)), G = !1); } function d(J) { J.slideUp(250).fadeOut(250, function() { A(this).addClass("jshide"); }); } function b() { if (l) return O && O.dialog("close"), u(), A(y).find('button[type="submit"]').attr("disabled", !1), A(t).triggerHandler("resize"), a && a(!0), !0; x && O ? (H || (A(c).removeClass("jshide").hide().fadeIn(500), H = !0), G && (d(A(F)), G = !1)) : u(); A(y).find('input[type="submit"]').attr("disabled", !0); a && a(!1); return !1; } function k(J) { var Q, V = R || {}; for (Q in V) if (V.hasOwnProperty(Q)) { var ia = V[Q]; J[Q] ? J[Q].value = ia : A('').attr("name", Q).appendTo(J).val(ia); } } function g(J) { J.preventDefault(); J = A(J.target).serializeArray(); m(J); e = !0; return !1; } function h(J) { J.preventDefault(); O.dialog("close"); return !1; } function n(J) { J.preventDefault(); O.dialog("open").find('input[name="connection_type"]').change(); return !1; } function r(J) { l = J.authed; f = J.method; A(c).find("span.loco-msg").text(J.message || "Something went wrong."); M = J.warning || ""; J.notice && p.notices.info(J.notice); if (l) "direct" !== f && (R = J.creds, k(y), e && J.success && p.notices.success(J.success)), b(); else if (J.reason) p.notices.info(J.reason); else if (J = J.prompt) { var Q = q(); Q.html(J).find("form").on("submit", g); Q.dialog("option", "title", Q.find("h2").remove().text()); Q.find("button.cancel-button").show().on("click", h); Q.find('input[type="submit"]').addClass("button-primary"); b(); A(t).triggerHandler("resize"); } else p.notices.error("Server didn't return credentials, nor a prompt for credentials"); } function w() { b(); } function m(J) { e = !1; p.ajax.setNonce("fsConnect", z).post("fsConnect", J, r, w); return J; } var a, c = y, f = null, e = !1, l = !1, p = t.loco, x = y.path.value, B = y.auth.value, z = y["loco-nonce"].value, E = A(c).find("button.button-primary"), F = D.getElementById(c.id + "-warn"), H = !1, G = !1, M = "", O; p.notices.convert(F).stick(); if (y.connection_type) { var R = {}; R.connection_type = y.connection_type.value; l = !0; } else x && B && m({ path: x, auth: B }); b(); return { applyCreds: function(J) { if (J.nodeType) k(J); else { var Q, V = R || {}; for (Q in V) V.hasOwnProperty(Q) && (J[Q] = V[Q]); } return this; }, setForm: function(J) { y = J; b(); k(J); return this; }, connect: function() { x = y.path.value; B = y.auth.value; m(A(y).serializeArray()); return this; }, listen: function(J) { a = J; l && J(!0); return this; }, authed: function() { return l; } }; }; return v; }({}, I, L)); C.register("$39", function(v, t, D) { function y(b, k) { return function(g) { b.apply(g, k); return g; }; } function q(b) { return function(k, g) { k = k && k[b] || 0; g = g && g[b] || 0; return k === g ? 0 : k > g ? 1 : -1; }; } function u(b) { return function(k, g) { return (k && k[b] || "").localeCompare(g && g[b] || ""); }; } function d(b) { return function(k, g) { return -1 * b(k, g); }; } v.sort = function(b, k, g, h) { k = "n" === g ? q(k) : u(k); h && (k = d(k)); return y([].sort, [ k ])(b); }; return v; }({}, I, L)); C.register("$25", function(v, t, D) { v.init = function(y) { function q(c) { let f = -1; const e = c.length; for (A("tr", r).remove(); ++f < e; ) r.appendChild(c[f].$); } function u(c) { g = c ? m.find(c, d) : d.slice(0); n && (c = b[n], g = a(g, n, c.type, c.desc)); q(g); } let d = [], b = [], k = 0, g, h, n, r = y.getElementsByTagName("tbody")[0]; var w = y.getElementsByTagName("thead")[0]; let m = C.require("$10", "fulltext.js").init(), a = C.require("$39", "sort.js").sort; w && r && (A("th", w).each(function(c, f) { const e = f.getAttribute("data-sort-type"); e && (c = k, A(f).addClass("loco-sort").on("click", function(l) { l.preventDefault(); { l = c; let p = b[l], x = p.type, B = !(p.desc = !p.desc); g = a(g || d.slice(0), l, x, B); q(g); h && h.removeClass("loco-desc loco-asc"); h = A(p.$).addClass(B ? "loco-desc" : "loco-asc").removeClass(B ? "loco-asc" : "loco-desc"); n = l; } return !1; }), b[k] = { $: f, type: e }); f.hasAttribute("colspan") ? k += Number(f.getAttribute("colspan")) : k++; }), A("tr", r).each(function(c, f) { let e, l = [], p = { _: c, $: f }, x = f.getElementsByTagName("td"); for (e in b) { const B = x[e]; (f = B.textContent.replace(/(^\s+|\s+$)/g, "")) && l.push(f); B.hasAttribute("data-sort-value") && (f = B.getAttribute("data-sort-value")); switch (b[e].type) { case "n": f = Number(f); } p[e] = f; } d[c] = p; m.index(c, l); }), y = A('form.loco-filter input[type="text"]', y.parentNode), y.length && (y = y[0], w = A(y.form), 1 < d.length ? C.require("$11", "LocoTextListener.js").listen(y, u) : w.hide(), w.on("submit", function(c) { c.preventDefault(); return !1; }))); }; return v; }({}, I, L)); const T = I.loco || {}, ja = T.conf || { $v: [] }; I = C.require("$1", "t.js").init(); L = ja.wplang; T.version = function(v) { return ja.$v[v || 0] || "0"; }; C.require("$2", "html.js"); C.require("$3", "number.js"); C.require("$4", "array.js"); C.require("$5", "json.js"); T.l10n = I; I.load(ja.wpl10n); L && I.pluraleq(L.pluraleq); T.string = C.require("$6", "string.js"); T.notices = C.require("$7", "notices.js").init(I); T.ajax = C.require("$8", "ajax.js").init(ja).localise(I); T.locale = C.require("$9", "wplocale.js"); T.fulltext = C.require("$10", "fulltext.js"); T.watchtext = C.require("$11", "LocoTextListener.js").listen; T.tooltip = C.require("$12", "tooltip.js"); T.po = { ed: C.require("$13", "poedit.js"), kbd: C.require("$14", "hotkeys.js"), init: C.require("$15", "po.js").create, ace: C.require("$16", "ace.js").strf("php"), ref: C.require("$17", "refs.js") }; T.apis = C.require("$18", "client.js"); T.apis.createJob = C.require("$19", "job.js").create; T.apis.providers = function() { return { _: C.require("$20", "wordpress.js"), google: C.require("$21", "google.js"), lecto: C.require("$22", "lecto.js"), microsoft: C.require("$23", "microsoft.js") }; }; T.fs = C.require("$24", "fsconn.js"); A("#loco-admin.wrap table.wp-list-table").each(function(v, t) { C.require("$25", "tables.js").init(t); }); T.validate = function(v) { v = (v = /^\d+\.\d+\.\d+/.exec(v && v[0] || "")) && v[0]; if ("2.8.0" === v) return !0; T.notices.warn("admin.js is the wrong version (" + v + "). Please empty all relevant caches and reload this page."); return !1; }; })(window, document, window.jQuery);