Adds extra features to the original Markdown syntax.
\n
\n\t
\n\t\t\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t\t\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t\t\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t\t\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t\t\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t\t\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t\t\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t\t\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t\t\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t\t\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n\t
\n\t\t\n\t\t
\n\t\t\t\n\t\t
\n\t
\n
\nMore info';
});
var IN_GLOBAL_SCOPE = !0;
@@ -8474,32 +8475,32 @@ window.PR_SHOULD_USE_CONTINUATION = !0;
var prettyPrintOne, prettyPrint;
!function() {
- function e(e) {
- function t(e) {
- var t = e.charCodeAt(0);
- if (92 !== t) return t;
- var n = e.charAt(1);
- return (t = u[n]) || (n >= "0" && "7" >= n ? parseInt(e.substring(1), 8) : "u" === n || "x" === n ? parseInt(e.substring(2), 16) : e.charCodeAt(1));
+ function t(t) {
+ function e(t) {
+ var e = t.charCodeAt(0);
+ if (92 !== e) return e;
+ var n = t.charAt(1);
+ return (e = u[n]) || ("0" <= n && n <= "7" ? parseInt(t.substring(1), 8) : "u" === n || "x" === n ? parseInt(t.substring(2), 16) : t.charCodeAt(1));
}
- function n(e) {
- if (32 > e) return (16 > e ? "\\x0" : "\\x") + e.toString(16);
- var t = String.fromCharCode(e);
- return "\\" === t || "-" === t || "]" === t || "^" === t ? "\\" + t : t;
+ function n(t) {
+ if (t < 32) return (t < 16 ? "\\x0" : "\\x") + t.toString(16);
+ var e = String.fromCharCode(t);
+ return "\\" === e || "-" === e || "]" === e || "^" === e ? "\\" + e : e;
}
- function i(e) {
- var i = e.substring(1, e.length - 1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]", "g")), r = [], o = "^" === i[0], a = [ "[" ];
+ function i(t) {
+ var i = t.substring(1, t.length - 1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]", "g")), r = [], o = "^" === i[0], a = [ "[" ];
o && a.push("^");
- for (var s = o ? 1 : 0, l = i.length; l > s; ++s) {
+ for (var s = o ? 1 : 0, l = i.length; s < l; ++s) {
var c = i[s];
if (/\\[bdsw]/i.test(c)) a.push(c); else {
- var u, d = t(c);
- l > s + 2 && "-" === i[s + 1] ? (u = t(i[s + 2]), s += 2) : u = d, r.push([ d, u ]),
- 65 > u || d > 122 || (65 > u || d > 90 || r.push([ 32 | Math.max(65, d), 32 | Math.min(u, 90) ]),
- 97 > u || d > 122 || r.push([ -33 & Math.max(97, d), -33 & Math.min(u, 122) ]));
+ var u, d = e(c);
+ s + 2 < l && "-" === i[s + 1] ? (u = e(i[s + 2]), s += 2) : u = d, r.push([ d, u ]),
+ u < 65 || d > 122 || (u < 65 || d > 90 || r.push([ 32 | Math.max(65, d), 32 | Math.min(u, 90) ]),
+ u < 97 || d > 122 || r.push([ -33 & Math.max(97, d), -33 & Math.min(u, 122) ]));
}
}
- r.sort(function(e, t) {
- return e[0] - t[0] || t[1] - e[1];
+ r.sort(function(t, e) {
+ return t[0] - e[0] || e[1] - t[1];
});
for (var p = [], h = [], s = 0; s < r.length; ++s) {
var f = r[s];
@@ -8511,8 +8512,8 @@ var prettyPrintOne, prettyPrint;
}
return a.push("]"), a.join("");
}
- for (var r = 0, o = !1, a = !1, s = 0, l = e.length; l > s; ++s) {
- var c = e[s];
+ for (var r = 0, o = !1, a = !1, s = 0, l = t.length; s < l; ++s) {
+ var c = t[s];
if (c.ignoreCase) a = !0; else if (/[a-z]/i.test(c.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ""))) {
o = !0, a = !1;
break;
@@ -8525,92 +8526,92 @@ var prettyPrintOne, prettyPrint;
v: 11,
f: 12,
r: 13
- }, d = [], s = 0, l = e.length; l > s; ++s) {
- var c = e[s];
+ }, d = [], s = 0, l = t.length; s < l; ++s) {
+ var c = t[s];
if (c.global || c.multiline) throw new Error("" + c);
- d.push("(?:" + function(e) {
- for (var t = e.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)", "g")), a = t.length, s = [], l = 0, c = 0; a > l; ++l) {
- var u = t[l];
+ d.push("(?:" + function(t) {
+ for (var e = t.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)", "g")), a = e.length, s = [], l = 0, c = 0; l < a; ++l) {
+ var u = e[l];
if ("(" === u) ++c; else if ("\\" === u.charAt(0)) {
var d = +u.substring(1);
- d && (c >= d ? s[d] = -1 : t[l] = n(d));
+ d && (d <= c ? s[d] = -1 : e[l] = n(d));
}
}
for (var l = 1; l < s.length; ++l) -1 === s[l] && (s[l] = ++r);
- for (var l = 0, c = 0; a > l; ++l) {
- var u = t[l];
- if ("(" === u) ++c, s[c] || (t[l] = "(?:"); else if ("\\" === u.charAt(0)) {
+ for (var l = 0, c = 0; l < a; ++l) {
+ var u = e[l];
+ if ("(" === u) ++c, s[c] || (e[l] = "(?:"); else if ("\\" === u.charAt(0)) {
var d = +u.substring(1);
- d && c >= d && (t[l] = "\\" + s[d]);
+ d && d <= c && (e[l] = "\\" + s[d]);
}
}
- for (var l = 0; a > l; ++l) "^" === t[l] && "^" !== t[l + 1] && (t[l] = "");
- if (e.ignoreCase && o) for (var l = 0; a > l; ++l) {
- var u = t[l], p = u.charAt(0);
- u.length >= 2 && "[" === p ? t[l] = i(u) : "\\" !== p && (t[l] = u.replace(/[a-zA-Z]/g, function(e) {
- var t = e.charCodeAt(0);
- return "[" + String.fromCharCode(-33 & t, 32 | t) + "]";
+ for (var l = 0; l < a; ++l) "^" === e[l] && "^" !== e[l + 1] && (e[l] = "");
+ if (t.ignoreCase && o) for (var l = 0; l < a; ++l) {
+ var u = e[l], p = u.charAt(0);
+ u.length >= 2 && "[" === p ? e[l] = i(u) : "\\" !== p && (e[l] = u.replace(/[a-zA-Z]/g, function(t) {
+ var e = t.charCodeAt(0);
+ return "[" + String.fromCharCode(-33 & e, 32 | e) + "]";
}));
}
- return t.join("");
+ return e.join("");
}(c) + ")");
}
return new RegExp(d.join("|"), a ? "gi" : "g");
}
- function t(e, t) {
- function n(e) {
- var l = e.nodeType;
+ function e(t, e) {
+ function n(t) {
+ var l = t.nodeType;
if (1 == l) {
- if (i.test(e.className)) return;
- for (var c = e.firstChild; c; c = c.nextSibling) n(c);
- var u = e.nodeName.toLowerCase();
- "br" !== u && "li" !== u || (r[s] = "\n", a[s << 1] = o++, a[s++ << 1 | 1] = e);
+ if (i.test(t.className)) return;
+ for (var c = t.firstChild; c; c = c.nextSibling) n(c);
+ var u = t.nodeName.toLowerCase();
+ "br" !== u && "li" !== u || (r[s] = "\n", a[s << 1] = o++, a[s++ << 1 | 1] = t);
} else if (3 == l || 4 == l) {
- var d = e.nodeValue;
- d.length && (d = t ? d.replace(/\r\n?/g, "\n") : d.replace(/[ \t\r\n]+/g, " "),
- r[s] = d, a[s << 1] = o, o += d.length, a[s++ << 1 | 1] = e);
+ var d = t.nodeValue;
+ d.length && (d = e ? d.replace(/\r\n?/g, "\n") : d.replace(/[ \t\r\n]+/g, " "),
+ r[s] = d, a[s << 1] = o, o += d.length, a[s++ << 1 | 1] = t);
}
}
var i = /(?:^|\s)nocode(?:\s|$)/, r = [], o = 0, a = [], s = 0;
- return n(e), {
+ return n(t), {
sourceCode: r.join("").replace(/\n$/, ""),
spans: a
};
}
- function n(e, t, n, i) {
- if (t) {
+ function n(t, e, n, i) {
+ if (e) {
var r = {
- sourceCode: t,
- basePos: e
+ sourceCode: e,
+ basePos: t
};
n(r), i.push.apply(i, r.decorations);
}
}
- function i(e) {
- for (var t = void 0, n = e.firstChild; n; n = n.nextSibling) {
+ function i(t) {
+ for (var e = void 0, n = t.firstChild; n; n = n.nextSibling) {
var i = n.nodeType;
- t = 1 === i ? t ? e : n : 3 === i && F.test(n.nodeValue) ? e : t;
+ e = 1 === i ? e ? t : n : 3 === i && F.test(n.nodeValue) ? t : e;
}
- return t === e ? void 0 : t;
+ return e === t ? void 0 : e;
}
- function r(t, i) {
+ function r(e, i) {
var r, o = {};
!function() {
- for (var n = t.concat(i), a = [], s = {}, l = 0, c = n.length; c > l; ++l) {
+ for (var n = e.concat(i), a = [], s = {}, l = 0, c = n.length; l < c; ++l) {
var u = n[l], d = u[3];
if (d) for (var p = d.length; --p >= 0; ) o[d.charAt(p)] = u;
var h = u[1], f = "" + h;
s.hasOwnProperty(f) || (a.push(h), s[f] = null);
}
- a.push(/[\0-\uffff]/), r = e(a);
+ a.push(/[\0-\uffff]/), r = t(a);
}();
- var a = i.length, s = function(e) {
- for (var t = e.sourceCode, l = e.basePos, u = [ l, R ], d = 0, p = t.match(r) || [], h = {}, f = 0, m = p.length; m > f; ++f) {
+ var a = i.length, s = function(t) {
+ for (var e = t.sourceCode, l = t.basePos, u = [ l, R ], d = 0, p = e.match(r) || [], h = {}, f = 0, m = p.length; f < m; ++f) {
var g, v = p[f], b = h[v], y = void 0;
if ("string" == typeof b) g = !1; else {
var x = o[v.charAt(0)];
if (x) y = v.match(x[1]), b = x[0]; else {
- for (var w = 0; a > w; ++w) if (x = i[w], y = v.match(x[1])) {
+ for (var w = 0; w < a; ++w) if (x = i[w], y = v.match(x[1])) {
b = x[0];
break;
}
@@ -8627,98 +8628,98 @@ var prettyPrintOne, prettyPrint;
n(l + S, v.substring(0, _), s, u), n(l + S + _, C, c(E, C), u), n(l + S + k, v.substring(k), s, u);
} else u.push(l + S, b);
}
- e.decorations = u;
+ t.decorations = u;
};
return s;
}
- function o(e) {
- var t = [], n = [];
- t.push(e.tripleQuotedStrings ? [ I, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\"" ] : e.multiLineStrings ? [ I, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, "'\"`" ] : [ I, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'" ]),
- e.verbatimStrings && n.push([ I, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null ]);
- var i = e.hashComments;
- i && (e.cStyleComments ? (t.push(i > 1 ? [ N, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, "#" ] : [ N, /^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/, null, "#" ]),
- n.push([ I, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/, null ])) : t.push([ N, /^#[^\r\n]*/, null, "#" ])),
- e.cStyleComments && (n.push([ N, /^\/\/[^\r\n]*/, null ]), n.push([ N, /^\/\*[\s\S]*?(?:\*\/|$)/, null ]));
- var o = e.regexLiterals;
+ function o(t) {
+ var e = [], n = [];
+ t.tripleQuotedStrings ? e.push([ I, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\"" ]) : t.multiLineStrings ? e.push([ I, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, "'\"`" ]) : e.push([ I, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'" ]),
+ t.verbatimStrings && n.push([ I, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null ]);
+ var i = t.hashComments;
+ i && (t.cStyleComments ? (i > 1 ? e.push([ N, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, "#" ]) : e.push([ N, /^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/, null, "#" ]),
+ n.push([ I, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/, null ])) : e.push([ N, /^#[^\r\n]*/, null, "#" ])),
+ t.cStyleComments && (n.push([ N, /^\/\/[^\r\n]*/, null ]), n.push([ N, /^\/\*[\s\S]*?(?:\*\/|$)/, null ]));
+ var o = t.regexLiterals;
if (o) {
var a = o > 1 ? "" : "\n\r", s = a ? "." : "[\\S\\s]", l = "/(?=[^/*" + a + "])(?:[^/\\x5B\\x5C" + a + "]|\\x5C" + s + "|\\x5B(?:[^\\x5C\\x5D" + a + "]|\\x5C" + s + ")*(?:\\x5D|$))+/";
n.push([ "lang-regex", RegExp("^" + O + "(" + l + ")") ]);
}
- var c = e.types;
+ var c = t.types;
c && n.push([ M, c ]);
- var u = ("" + e.keywords).replace(/^ | $/g, "");
+ var u = ("" + t.keywords).replace(/^ | $/g, "");
u.length && n.push([ D, new RegExp("^(?:" + u.replace(/[\s,]+/g, "|") + ")\\b"), null ]),
- t.push([ R, /^\s+/, null, " \r\n \xa0" ]);
+ e.push([ R, /^\s+/, null, " \r\n\t\xa0" ]);
var d = "^.[^\\s\\w.$@'\"`/\\\\]*";
- return e.regexLiterals && (d += "(?!s*/)"), n.push([ L, /^@[a-z_$][a-z_$@0-9]*/i, null ], [ M, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null ], [ R, /^[a-z_$][a-z_$@0-9]*/i, null ], [ L, new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*", "i"), null, "0123456789" ], [ R, /^\\[\s\S]?/, null ], [ A, new RegExp(d), null ]),
- r(t, n);
+ return t.regexLiterals && (d += "(?!s*/)"), n.push([ L, /^@[a-z_$][a-z_$@0-9]*/i, null ], [ M, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null ], [ R, /^[a-z_$][a-z_$@0-9]*/i, null ], [ L, new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*", "i"), null, "0123456789" ], [ R, /^\\[\s\S]?/, null ], [ A, new RegExp(d), null ]),
+ r(e, n);
}
- function a(e, t, n) {
- function i(e) {
- var t = e.nodeType;
- if (1 != t || o.test(e.className)) {
- if ((3 == t || 4 == t) && n) {
- var l = e.nodeValue, c = l.match(a);
+ function a(t, e, n) {
+ function i(t) {
+ var e = t.nodeType;
+ if (1 != e || o.test(t.className)) {
+ if ((3 == e || 4 == e) && n) {
+ var l = t.nodeValue, c = l.match(a);
if (c) {
var u = l.substring(0, c.index);
- e.nodeValue = u;
+ t.nodeValue = u;
var d = l.substring(c.index + c[0].length);
if (d) {
- var p = e.parentNode;
- p.insertBefore(s.createTextNode(d), e.nextSibling);
+ var p = t.parentNode;
+ p.insertBefore(s.createTextNode(d), t.nextSibling);
}
- r(e), u || e.parentNode.removeChild(e);
+ r(t), u || t.parentNode.removeChild(t);
}
}
- } else if ("br" === e.nodeName) r(e), e.parentNode && e.parentNode.removeChild(e); else for (var h = e.firstChild; h; h = h.nextSibling) i(h);
+ } else if ("br" === t.nodeName) r(t), t.parentNode && t.parentNode.removeChild(t); else for (var h = t.firstChild; h; h = h.nextSibling) i(h);
}
- function r(e) {
- function t(e, n) {
- var i = n ? e.cloneNode(!1) : e, r = e.parentNode;
+ function r(t) {
+ function e(t, n) {
+ var i = n ? t.cloneNode(!1) : t, r = t.parentNode;
if (r) {
- var o = t(r, 1), a = e.nextSibling;
+ var o = e(r, 1), a = t.nextSibling;
o.appendChild(i);
for (var s = a; s; s = a) a = s.nextSibling, o.appendChild(s);
}
return i;
}
- for (;!e.nextSibling; ) if (!(e = e.parentNode)) return;
- for (var n, i = t(e.nextSibling, 0); (n = i.parentNode) && 1 === n.nodeType; ) i = n;
+ for (;!t.nextSibling; ) if (!(t = t.parentNode)) return;
+ for (var n, i = e(t.nextSibling, 0); (n = i.parentNode) && 1 === n.nodeType; ) i = n;
c.push(i);
}
- for (var o = /(?:^|\s)nocode(?:\s|$)/, a = /\r\n?|\n/, s = e.ownerDocument, l = s.createElement("li"); e.firstChild; ) l.appendChild(e.firstChild);
+ for (var o = /(?:^|\s)nocode(?:\s|$)/, a = /\r\n?|\n/, s = t.ownerDocument, l = s.createElement("li"); t.firstChild; ) l.appendChild(t.firstChild);
for (var c = [ l ], u = 0; u < c.length; ++u) i(c[u]);
- t === (0 | t) && c[0].setAttribute("value", t);
+ e === (0 | e) && c[0].setAttribute("value", e);
var d = s.createElement("ol");
d.className = "linenums";
- for (var p = Math.max(0, t - 1 | 0) || 0, u = 0, h = c.length; h > u; ++u) l = c[u],
+ for (var p = Math.max(0, e - 1 | 0) || 0, u = 0, h = c.length; u < h; ++u) l = c[u],
l.className = "L" + (u + p) % 10, l.firstChild || l.appendChild(s.createTextNode("\xa0")),
d.appendChild(l);
- e.appendChild(d);
+ t.appendChild(d);
}
- function s(e) {
- var t = /\bMSIE\s(\d+)/.exec(navigator.userAgent);
- t = t && +t[1] <= 8;
- var n = /\n/g, i = e.sourceCode, r = i.length, o = 0, a = e.spans, s = a.length, l = 0, c = e.decorations, u = c.length, d = 0;
+ function s(t) {
+ var e = /\bMSIE\s(\d+)/.exec(navigator.userAgent);
+ e = e && +e[1] <= 8;
+ var n = /\n/g, i = t.sourceCode, r = i.length, o = 0, a = t.spans, s = a.length, l = 0, c = t.decorations, u = c.length, d = 0;
c[u] = r;
var p, h;
- for (h = p = 0; u > h; ) c[h] !== c[h + 2] ? (c[p++] = c[h++], c[p++] = c[h++]) : h += 2;
- for (u = p, h = p = 0; u > h; ) {
- for (var f = c[h], m = c[h + 1], g = h + 2; u >= g + 2 && c[g + 1] === m; ) g += 2;
+ for (h = p = 0; h < u; ) c[h] !== c[h + 2] ? (c[p++] = c[h++], c[p++] = c[h++]) : h += 2;
+ for (u = p, h = p = 0; h < u; ) {
+ for (var f = c[h], m = c[h + 1], g = h + 2; g + 2 <= u && c[g + 1] === m; ) g += 2;
c[p++] = f, c[p++] = m, h = g;
}
u = c.length = p;
- var v, b = e.sourceNode;
+ var v, b = t.sourceNode;
b && (v = b.style.display, b.style.display = "none");
try {
- for (;s > l; ) {
+ for (;l < s; ) {
var y, x = (a[l], a[l + 2] || r), w = c[d + 2] || r, g = Math.min(x, w), S = a[l + 1];
if (1 !== S.nodeType && (y = i.substring(o, g))) {
- t && (y = y.replace(n, "\r")), S.nodeValue = y;
+ e && (y = y.replace(n, "\r")), S.nodeValue = y;
var C = S.ownerDocument, _ = C.createElement("span");
_.className = c[d + 1];
var k = S.parentNode;
- k.replaceChild(_, S), _.appendChild(S), x > o && (a[l + 1] = S = C.createTextNode(i.substring(g, x)),
+ k.replaceChild(_, S), _.appendChild(S), o < x && (a[l + 1] = S = C.createTextNode(i.substring(g, x)),
k.insertBefore(S, _.nextSibling));
}
o = g, o >= x && (l += 2), o >= w && (d += 2);
@@ -8727,47 +8728,47 @@ var prettyPrintOne, prettyPrint;
b && (b.style.display = v);
}
}
- function l(e, t) {
- for (var n = t.length; --n >= 0; ) {
- var i = t[n];
- j.hasOwnProperty(i) ? h.console && console.warn("cannot override language handler %s", i) : j[i] = e;
+ function l(t, e) {
+ for (var n = e.length; --n >= 0; ) {
+ var i = e[n];
+ j.hasOwnProperty(i) ? h.console && console.warn("cannot override language handler %s", i) : j[i] = t;
}
}
- function c(e, t) {
- return e && j.hasOwnProperty(e) || (e = /^\s*" + e + "", i = i.firstChild, n && a(i, n, !0),
+ return i.innerHTML = "
\n\n";
+ }), t = t.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm, function(t, e, n) {
+ var i = e.length;
return "" + a(n) + "\n\n";
});
}
- function f(e, t) {
- e += "~0";
+ function f(t, e) {
+ t += "~0";
var n = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;
- return B ? e = e.replace(n, function(e, n, i) {
- var r = n, o = i.search(/[*+-]/g) > -1 ? "ul" : "ol", a = m(r, o, t);
+ return B ? t = t.replace(n, function(t, n, i) {
+ var r = n, o = i.search(/[*+-]/g) > -1 ? "ul" : "ol", a = m(r, o, e);
return a = a.replace(/\s+$/, ""), a = "<" + o + ">" + a + "" + o + ">\n";
}) : (n = /(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g,
- e = e.replace(n, function(e, t, n, i) {
- var r = t, o = n, a = i.search(/[*+-]/g) > -1 ? "ul" : "ol", s = m(o, a);
+ t = t.replace(n, function(t, e, n, i) {
+ var r = e, o = n, a = i.search(/[*+-]/g) > -1 ? "ul" : "ol", s = m(o, a);
return s = r + "<" + a + ">\n" + s + "" + a + ">\n";
- })), e = e.replace(/~0/, "");
+ })), t = t.replace(/~0/, "");
}
- function m(e, t, n) {
- B++, e = e.replace(/\n{2,}$/, "\n"), e += "~0";
- var i = $[t], r = new RegExp("(^[ \\t]*)(" + i + ")[ \\t]+([^\\r]+?(\\n+))(?=(~0|\\1(" + i + ")[ \\t]+))", "gm"), s = !1;
- return e = e.replace(r, function(e, t, i, r) {
+ function m(t, e, n) {
+ B++, t = t.replace(/\n{2,}$/, "\n"), t += "~0";
+ var i = $[e], r = new RegExp("(^[ \\t]*)(" + i + ")[ \\t]+([^\\r]+?(\\n+))(?=(~0|\\1(" + i + ")[ \\t]+))", "gm"), s = !1;
+ return t = t.replace(r, function(t, e, i, r) {
var l = r, c = /\n\n$/.test(l);
return c || l.search(/\n{2,}/) > -1 || s ? l = o(I(l), !0) : (l = f(I(l), !0), l = l.replace(/\n$/, ""),
n || (l = a(l))), s = c, "
" + l + "
\n";
- }), e = e.replace(/~0/g, ""), B--, e;
+ }), t = t.replace(/~0/g, ""), B--, t;
}
- function g(e) {
- return e += "~0", e = e.replace(/(?:\n\n|^\n?)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g, function(e, t, n) {
- var i = t, r = n;
+ function g(t) {
+ return t += "~0", t = t.replace(/(?:\n\n|^\n?)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g, function(t, e, n) {
+ var i = e, r = n;
return i = y(I(i)), i = D(i), i = i.replace(/^\n+/g, ""), i = i.replace(/\n+$/g, ""),
"\n\n" + (i = "
" + i + "\n
") + "\n\n" + r;
- }), e = e.replace(/~0/, "");
+ }), t = t.replace(/~0/, "");
}
- function v(e) {
- return e = e.replace(/(^\n+|\n+$)/g, ""), "\n\n~K" + (F.push(e) - 1) + "K\n\n";
+ function v(t) {
+ return t = t.replace(/(^\n+|\n+$)/g, ""), "\n\n~K" + (F.push(t) - 1) + "K\n\n";
}
- function b(e) {
- return e = e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, function(e, t, n, i) {
- var r = i;
- return r = r.replace(/^([ \t]*)/g, ""), r = r.replace(/[ \t]*$/g, ""), r = y(r),
- r = r.replace(/:\/\//g, "~P"), t + "" + r + "";
+ function b(t) {
+ return t = t.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, function(t, e, n, i, r) {
+ var o = i;
+ return o = o.replace(/^([ \t]*)/g, ""), o = o.replace(/[ \t]*$/g, ""), o = y(o),
+ o = o.replace(/:\/\//g, "~P"), e + "" + o + "";
});
}
- function y(e) {
- return e = e.replace(/&/g, "&"), e = e.replace(//g, ">"),
- e = M(e, "*_{}[]\\", !1);
+ function y(t) {
+ return t = t.replace(/&/g, "&"), t = t.replace(//g, ">"),
+ t = M(t, "*_{}[]\\", !1);
}
- function x(e) {
- return e = e.replace(/([\W_]|^)(\*\*|__)(?=\S)([^\r]*?\S[\*_]*)\2([\W_]|$)/g, "$1$3$4"),
- e = e.replace(/([\W_]|^)(\*|_)(?=\S)([^\r\*_]*?\S)\2([\W_]|$)/g, "$1$3$4");
+ function x(t) {
+ return t = t.replace(/([\W_]|^)(\*\*|__)(?=\S)([^\r]*?\S[\*_]*)\2([\W_]|$)/g, "$1$3$4"),
+ t = t.replace(/([\W_]|^)(\*|_)(?=\S)([^\r\*_]*?\S)\2([\W_]|$)/g, "$1$3$4");
}
- function w(e) {
- return e = e.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm, function(e, t) {
- var n = t;
+ function w(t) {
+ return t = t.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm, function(t, e) {
+ var n = e;
return n = n.replace(/^[ \t]*>[ \t]?/gm, "~0"), n = n.replace(/~0/g, ""), n = n.replace(/^[ \t]+$/gm, ""),
- n = o(n), n = n.replace(/(^|\n)/g, "$1 "), n = n.replace(/(\s*
[^\r]+?<\/pre>)/gm, function(e, t) {
- var n = t;
+ n = o(n), n = n.replace(/(^|\n)/g, "$1 "), n = n.replace(/(\s*
[^\r]+?<\/pre>)/gm, function(t, e) {
+ var n = e;
return n = n.replace(/^ /gm, "~0"), n = n.replace(/~0/g, "");
}), v("
\n" + n + "\n
");
});
}
- function S(e, t) {
- e = e.replace(/^\n+/g, ""), e = e.replace(/\n+$/g, "");
- for (var n = e.split(/\n{2,}/g), i = [], r = /~K(\d+)K/, o = n.length, s = 0; o > s; s++) {
+ function S(t, e) {
+ t = t.replace(/^\n+/g, ""), t = t.replace(/\n+$/g, "");
+ for (var n = t.split(/\n{2,}/g), i = [], r = /~K(\d+)K/, o = n.length, s = 0; s < o; s++) {
var l = n[s];
r.test(l) ? i.push(l) : /\S/.test(l) && (l = a(l), l = l.replace(/^([ \t]*)/g, "
"),
l += "
", i.push(l));
}
- if (!t) {
+ if (!e) {
o = i.length;
- for (var s = 0; o > s; s++) for (var c = !0; c; ) c = !1, i[s] = i[s].replace(/~K(\d+)K/g, function(e, t) {
- return c = !0, F[t];
+ for (var s = 0; s < o; s++) for (var c = !0; c; ) c = !1, i[s] = i[s].replace(/~K(\d+)K/g, function(t, e) {
+ return c = !0, F[e];
});
}
return i.join("\n\n");
}
- function C(e) {
- return e = e.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, "&"), e = e.replace(/<(?![a-z\/?!]|~D)/gi, "<");
+ function C(t) {
+ return t = t.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, "&"), t = t.replace(/<(?![a-z\/?!]|~D)/gi, "<");
}
- function _(e) {
- return e = e.replace(/\\(\\)/g, L), e = e.replace(/\\([`*_{}\[\]()>#+-.!])/g, L);
+ function _(t) {
+ return t = t.replace(/\\(\\)/g, L), t = t.replace(/\\([`*_{}\[\]()>#+-.!])/g, L);
}
- function k(e, t, n, i) {
- if (t) return e;
+ function k(t, e, n, i) {
+ if (e) return t;
if (")" !== i.charAt(i.length - 1)) return "<" + n + i + ">";
- for (var r = i.match(/[()]/g), o = 0, a = 0; a < r.length; a++) "(" === r[a] ? 0 >= o ? o = 1 : o++ : o--;
+ for (var r = i.match(/[()]/g), o = 0, a = 0; a < r.length; a++) "(" === r[a] ? o <= 0 ? o = 1 : o++ : o--;
var s = "";
- if (0 > o) {
+ if (o < 0) {
var l = new RegExp("\\){1," + -o + "}$");
- i = i.replace(l, function(e) {
- return s = e, "";
+ i = i.replace(l, function(t) {
+ return s = t, "";
});
}
if (s) {
var c = i.charAt(i.length - 1);
- q.test(c) || (s = c + s, i = i.substr(0, i.length - 1));
+ G.test(c) || (s = c + s, i = i.substr(0, i.length - 1));
}
return "<" + n + i + ">" + s;
}
- function E(e) {
- e = e.replace(G, k);
- var t = function(e, t) {
- return '' + R.plainLinkText(t) + "";
+ function E(t) {
+ t = t.replace(q, k);
+ var e = function(t, e) {
+ return '' + R.plainLinkText(e) + "";
};
- return e = e.replace(/<((https?|ftp):[^'">\s]+)>/gi, t);
+ return t = t.replace(/<((https?|ftp):[^'">\s]+)>/gi, e);
}
- function T(e) {
- return e = e.replace(/~E(\d+)E/g, function(e, t) {
- var n = parseInt(t);
+ function T(t) {
+ return t = t.replace(/~E(\d+)E/g, function(t, e) {
+ var n = parseInt(e);
return String.fromCharCode(n);
});
}
- function I(e) {
- return e = e.replace(/^(\t|[ ]{1,4})/gm, "~0"), e = e.replace(/~0/g, "");
+ function I(t) {
+ return t = t.replace(/^(\t|[ ]{1,4})/gm, "~0"), t = t.replace(/~0/g, "");
}
- function D(e) {
- if (!/\t/.test(e)) return e;
- var t, n = [ " ", " ", " ", " " ], i = 0;
- return e.replace(/[\n\t]/g, function(e, r) {
- return "\n" === e ? (i = r + 1, e) : (t = (r - i) % 4, i = r + 1, n[t]);
+ function D(t) {
+ if (!/\t/.test(t)) return t;
+ var e, n = [ " ", " ", " ", " " ], i = 0;
+ return t.replace(/[\n\t]/g, function(t, r) {
+ return "\n" === t ? (i = r + 1, t) : (e = (r - i) % 4, i = r + 1, n[e]);
});
}
- function N(e) {
- return e ? (e.length, e.replace(H, function(e) {
- return "~D" == e ? "%24" : ":" == e ? ":" : "%" + e.charCodeAt(0).toString(16);
+ function N(t) {
+ return t ? (t.length, t.replace(H, function(t, e) {
+ return "~D" == t ? "%24" : ":" == t ? ":" : "%" + t.charCodeAt(0).toString(16);
})) : "";
}
- function M(e, t, n) {
- var i = "([" + t.replace(/([\[\]\\])/g, "\\$1") + "])";
+ function M(t, e, n) {
+ var i = "([" + e.replace(/([\[\]\\])/g, "\\$1") + "])";
n && (i = "\\\\" + i);
var r = new RegExp(i, "g");
- return e = e.replace(r, L);
+ return t = t.replace(r, L);
}
- function L(e, t) {
- return "~E" + t.charCodeAt(0) + "E";
+ function L(t, e) {
+ return "~E" + e.charCodeAt(0) + "E";
}
var A = {};
- this.setOptions = function(e) {
- A = e;
+ this.setOptions = function(t) {
+ A = t;
};
var R = this.hooks = new n();
R.addNoop("plainLinkText"), R.addNoop("preConversion"), R.addNoop("postNormalization"),
@@ -12972,383 +12973,383 @@ function() {
return P = new i(), O = new i(), F = [], B = 0, n = R.preConversion(n), n = n.replace(/~/g, "~T"),
n = n.replace(/\$/g, "~D"), n = n.replace(/\r\n/g, "\n"), n = n.replace(/\r/g, "\n"),
n = "\n\n" + n + "\n\n", n = D(n), n = n.replace(/^[ \t]+$/gm, ""), n = R.postNormalization(n),
- n = t(n), n = e(n), n = o(n), n = T(n), n = n.replace(/~D/g, "$$"), n = n.replace(/~T/g, "~"),
+ n = e(n), n = t(n), n = o(n), n = T(n), n = n.replace(/~D/g, "$$"), n = n.replace(/~T/g, "~"),
n = R.postConversion(n), F = O = P = null, n;
};
- var j = function(e) {
- return o(e);
+ var j = function(t) {
+ return o(t);
}, $ = {
ol: "\\d+[.]",
ul: "[*+-]"
- }, G = new RegExp('(="|<)?\\b(https?|ftp)(://[-A-Z0-9+&@#/%?=~_|[\\]()!:,.;]*[-A-Z0-9+&@#/%=~_|[\\])])(?=$|\\W)', "gi"), q = new RegExp("[-A-Z0-9+&@#/%=~_|[\\])]", "i"), H = /(?:["'*()[\]:]|~D)/g;
+ }, q = new RegExp('(="|<)?\\b(https?|ftp)(://[-A-Z0-9+&@#/%?=~_|[\\]()!:,.;]*[-A-Z0-9+&@#/%=~_|[\\])])(?=$|\\W)', "gi"), G = new RegExp("[-A-Z0-9+&@#/%=~_|[\\])]", "i"), H = /(?:["'*()[\]:]|~D)/g;
};
}(), define("libs/Markdown.Converter", function() {}), function() {
- function e(e) {
- return e.replace(/^\s+|\s+$/g, "");
+ function t(t) {
+ return t.replace(/^\s+|\s+$/g, "");
}
- function t(e) {
- return e.replace(/\s+$/g, "");
+ function e(t) {
+ return t.replace(/\s+$/g, "");
}
- function n(e) {
- return e.replace(new RegExp("^(\\t|[ ]{1,4})", "gm"), "");
+ function n(t) {
+ return t.replace(new RegExp("^(\\t|[ ]{1,4})", "gm"), "");
}
- function i(e, t) {
- return -1 != e.indexOf(t);
+ function i(t, e) {
+ return -1 != t.indexOf(e);
}
- function r(e, t) {
- return e.replace(/<[^>]*>?/gi, function(e) {
- return e.match(t) ? e : "";
+ function r(t, e) {
+ return t.replace(/<[^>]*>?/gi, function(t) {
+ return t.match(e) ? t : "";
});
}
- function o(e, t) {
- for (var n = {}, i = 0; i < e.length; i++) n[e[i]] = e[i];
- for (i = 0; i < t.length; i++) n[t[i]] = t[i];
+ function o(t, e) {
+ for (var n = {}, i = 0; i < t.length; i++) n[t[i]] = t[i];
+ for (i = 0; i < e.length; i++) n[e[i]] = e[i];
var r = [];
for (var o in n) n.hasOwnProperty(o) && r.push(n[o]);
return r;
}
- function a(e) {
- return "" != e.charAt(0) && (e = "" + e), "" != e.charAt(e.length - 1) && (e += ""),
- e;
+ function a(t) {
+ return "\x02" != t.charAt(0) && (t = "\x02" + t), "\x03" != t.charAt(t.length - 1) && (t += "\x03"),
+ t;
}
- function s(e) {
- return "" == e.charAt(0) && (e = e.substr(1)), "" == e.charAt(e.length - 1) && (e = e.substr(0, e.length - 1)),
- e;
+ function s(t) {
+ return "\x02" == t.charAt(0) && (t = t.substr(1)), "\x03" == t.charAt(t.length - 1) && (t = t.substr(0, t.length - 1)),
+ t;
}
- function l(e, t) {
- return r(c(e, t), m);
+ function l(t, e) {
+ return r(c(t, e), m);
}
- function c(e, t) {
- var n = t.blockGamutHookCallback(e);
- return n = p(n), n = n.replace(/~D/g, "$$").replace(/~T/g, "~"), n = t.previousPostConversion(n);
+ function c(t, e) {
+ var n = e.blockGamutHookCallback(t);
+ return n = p(n), n = n.replace(/~D/g, "$$").replace(/~T/g, "~"), n = e.previousPostConversion(n);
}
- function u(e) {
- return e.replace(/\\\|/g, "~I").replace(/\\:/g, "~i");
+ function u(t) {
+ return t.replace(/\\\|/g, "~I").replace(/\\:/g, "~i");
}
- function d(e) {
- return e.replace(/~I/g, "|").replace(/~i/g, ":");
+ function d(t) {
+ return t.replace(/~I/g, "|").replace(/~i/g, ":");
}
- function p(e) {
- return e = e.replace(/~E(\d+)E/g, function(e, t) {
- var n = parseInt(t);
+ function p(t) {
+ return t = t.replace(/~E(\d+)E/g, function(t, e) {
+ var n = parseInt(e);
return String.fromCharCode(n);
});
}
- function h(e) {
- return e.toLowerCase().replace(/\s+/g, "-").replace(/[^\w\-]+/g, "").replace(/\-\-+/g, "-").replace(/^-+/, "").replace(/-+$/, "");
+ function h(t) {
+ return t.toLowerCase().replace(/\s+/g, "-").replace(/[^\w\-]+/g, "").replace(/\-\-+/g, "-").replace(/^-+/, "").replace(/-+$/, "");
}
- function f(e, t) {
- var n = t;
+ function f(t, e) {
+ var n = e;
return n = n.replace(/&\#8220;/g, '"'), n = n.replace(/&\#8221;/g, '"'), n = n.replace(/&\#8216;/g, "'"),
n = n.replace(/&\#8217;/g, "'"), n = n.replace(/&\#8212;/g, "---"), n = n.replace(/&\#8211;/g, "--"),
n = n.replace(/&\#8230;/g, "...");
}
var m = new RegExp([ "^(<\\/?(a|abbr|acronym|applet|area|b|basefont|", "bdo|big|button|cite|code|del|dfn|em|figcaption|", "font|i|iframe|img|input|ins|kbd|label|map|", "mark|meter|object|param|progress|q|ruby|rp|rt|s|", "samp|script|select|small|span|strike|strong|", "sub|sup|textarea|time|tt|u|var|wbr)[^>]*>|", "<(br)\\s?\\/?>)$" ].join(""), "i");
- Array.indexOf || (Array.prototype.indexOf = function(e) {
- for (var t = 0; t < this.length; t++) if (this[t] == e) return t;
+ Array.indexOf || (Array.prototype.indexOf = function(t) {
+ for (var e = 0; e < this.length; e++) if (this[e] == t) return e;
return -1;
}), Markdown.Extra = function() {
this.converter = null, this.hashBlocks = [], this.footnotes = {}, this.usedFootnotes = [],
this.attributeBlocks = !1, this.googleCodePrettify = !1, this.highlightJs = !1,
this.tableClass = "", this.tabWidth = 4;
- }, Markdown.Extra.init = function(e, t) {
+ }, Markdown.Extra.init = function(t, e) {
var n = new Markdown.Extra(), r = [], o = [], a = [], s = [ "unHashExtraBlocks" ];
- return t = t || {}, t.extensions = t.extensions || [ "all" ], i(t.extensions, "all") && (t.extensions = [ "tables", "fenced_code_gfm", "def_list", "attr_list", "footnotes", "smartypants", "strikethrough", "newlines" ]),
- o.push("wrapHeaders"), i(t.extensions, "attr_list") && (r.push("hashFcbAttributeBlocks"),
+ return e = e || {}, e.extensions = e.extensions || [ "all" ], i(e.extensions, "all") && (e.extensions = [ "tables", "fenced_code_gfm", "def_list", "attr_list", "footnotes", "smartypants", "strikethrough", "newlines" ]),
+ o.push("wrapHeaders"), i(e.extensions, "attr_list") && (r.push("hashFcbAttributeBlocks"),
o.push("hashHeaderAttributeBlocks"), s.push("applyAttributeBlocks"), n.attributeBlocks = !0),
- i(t.extensions, "fenced_code_gfm") && (o.push("fencedCodeBlocks"), r.push("fencedCodeBlocks")),
- i(t.extensions, "tables") && o.push("tables"), i(t.extensions, "def_list") && o.push("definitionLists"),
- i(t.extensions, "footnotes") && (r.push("stripFootnoteDefinitions"), o.push("doFootnotes"),
- s.push("printFootnotes")), i(t.extensions, "smartypants") && s.push("runSmartyPants"),
- i(t.extensions, "strikethrough") && a.push("strikethrough"), i(t.extensions, "newlines") && a.push("newlines"),
- e.hooks.chain("postNormalization", function(e) {
- return n.doTransform(r, e) + "\n";
- }), e.hooks.chain("preBlockGamut", function(e, t) {
- return n.blockGamutHookCallback = t, e = u(e), e = n.doTransform(o, e) + "\n", e = d(e);
- }), e.hooks.chain("postSpanGamut", function(e) {
- return n.doTransform(a, e);
- }), n.previousPostConversion = e.hooks.postConversion, e.hooks.chain("postConversion", function(e) {
- return e = n.doTransform(s, e), n.hashBlocks = [], n.footnotes = {}, n.usedFootnotes = [],
- e;
- }), "highlighter" in t && (n.googleCodePrettify = "prettify" === t.highlighter,
- n.highlightJs = "highlight" === t.highlighter), "table_class" in t && (n.tableClass = t.table_class),
- n.converter = e, n;
- }, Markdown.Extra.prototype.doTransform = function(e, t) {
- for (var n = 0; n < e.length; n++) t = this[e[n]](t);
- return t;
- }, Markdown.Extra.prototype.hashExtraBlock = function(e) {
- return "\n
\n";
+ }, Markdown.Extra.prototype.hashExtraInline = function(t) {
+ return "~X" + (this.hashBlocks.push(t) - 1) + "X";
+ }, Markdown.Extra.prototype.unHashExtraBlocks = function(t) {
+ function e() {
var i = !1;
- e = e.replace(/(?:
)?~X(\d+)X(?:<\/p>)?/g, function(e, t) {
+ t = t.replace(/(?:
)?~X(\d+)X(?:<\/p>)?/g, function(t, e) {
i = !0;
- var r = parseInt(t, 10);
+ var r = parseInt(e, 10);
return n.hashBlocks[r];
- }), !0 === i && t();
+ }), !0 === i && e();
}
var n = this;
- return t(), e;
- }, Markdown.Extra.prototype.wrapHeaders = function(e) {
- function t(e) {
- return "\n" + e + "\n";
+ return e(), t;
+ }, Markdown.Extra.prototype.wrapHeaders = function(t) {
+ function e(t) {
+ return "\n" + t + "\n";
}
- return e = e.replace(/^.+[ \t]*\n=+[ \t]*\n+/gm, t), e = e.replace(/^.+[ \t]*\n-+[ \t]*\n+/gm, t),
- e = e.replace(/^\#{1,6}[ \t]*.+?[ \t]*\#*\n+/gm, t);
+ return t = t.replace(/^.+[ \t]*\n=+[ \t]*\n+/gm, e), t = t.replace(/^.+[ \t]*\n-+[ \t]*\n+/gm, e),
+ t = t.replace(/^\#{1,6}[ \t]*.+?[ \t]*\#*\n+/gm, e);
};
var g = "\\{[ \\t]*((?:[#.][-_:a-zA-Z0-9]+[ \\t]*)+)\\}", v = new RegExp("^(#{1,6}.*#{0,6})[ \\t]+" + g + "[ \\t]*(?:\\n|0x03)", "gm"), b = new RegExp("^(.*)[ \\t]+" + g + "[ \\t]*\\n(?=[\\-|=]+\\s*(?:\\n|0x03))", "gm"), y = new RegExp("^(```[^`\\n]*)[ \\t]+" + g + "[ \\t]*\\n(?=([\\s\\S]*?)\\n```[ \\t]*(\\n|0x03))", "gm");
- Markdown.Extra.prototype.hashHeaderAttributeBlocks = function(e) {
- function t(e, t, i) {
- return "
~XX" + (n.hashBlocks.push(i) - 1) + "XX
\n" + t + "\n";
+ Markdown.Extra.prototype.hashHeaderAttributeBlocks = function(t) {
+ function e(t, e, i) {
+ return "
~XX" + (n.hashBlocks.push(i) - 1) + "XX
\n" + e + "\n";
}
var n = this;
- return e = e.replace(v, t), e = e.replace(b, t);
- }, Markdown.Extra.prototype.hashFcbAttributeBlocks = function(e) {
- function t(e, t, i) {
- return "
~XX" + (n.hashBlocks.push(i) - 1) + "XX
\n" + t + "\n";
+ return t = t.replace(v, e), t = t.replace(b, e);
+ }, Markdown.Extra.prototype.hashFcbAttributeBlocks = function(t) {
+ function e(t, e, i) {
+ return "
~XX" + (n.hashBlocks.push(i) - 1) + "XX
\n" + e + "\n";
}
var n = this;
- return e.replace(y, t);
- }, Markdown.Extra.prototype.applyAttributeBlocks = function(e) {
- var t = this, n = new RegExp('
~XX(\\d+)XX
[\\s]*(?:<(h[1-6]|pre)(?: +class="(\\S+)")?(>[\\s\\S]*?\\2>))', "gm");
- return e = e.replace(n, function(e, n, i, r, a) {
+ return t.replace(y, e);
+ }, Markdown.Extra.prototype.applyAttributeBlocks = function(t) {
+ var e = this, n = new RegExp('
~XX(\\d+)XX
[\\s]*(?:<(h[1-6]|pre)(?: +class="(\\S+)")?(>[\\s\\S]*?\\2>))', "gm");
+ return t = t.replace(n, function(t, n, i, r, a) {
if (!i) return "";
- for (var s = parseInt(n, 10), l = t.hashBlocks[s], c = l.match(/#[^\s#.]+/g) || [], u = c[0] ? ' id="' + c[0].substr(1, c[0].length - 1) + '"' : "", d = l.match(/\.[^\s#.]+/g) || [], p = 0; p < d.length; p++) d[p] = d[p].substr(1, d[p].length - 1);
+ for (var s = parseInt(n, 10), l = e.hashBlocks[s], c = l.match(/#[^\s#.]+/g) || [], u = c[0] ? ' id="' + c[0].substr(1, c[0].length - 1) + '"' : "", d = l.match(/\.[^\s#.]+/g) || [], p = 0; p < d.length; p++) d[p] = d[p].substr(1, d[p].length - 1);
var h = "";
return r && (d = o(d, [ r ])), d.length > 0 && (h = ' class="' + d.join(" ") + '"'),
"<" + i + u + h + a;
});
- }, Markdown.Extra.prototype.tables = function(t) {
- function n(t, n, r, o) {
+ }, Markdown.Extra.prototype.tables = function(e) {
+ function n(e, n, r, o, a, s) {
n = n.replace(/^ *[|]/m, ""), r = r.replace(/^ *[|]/m, ""), o = o.replace(/^ *[|]/gm, ""),
n = n.replace(/[|] *$/m, ""), r = r.replace(/[|] *$/m, ""), o = o.replace(/[|] *$/gm, ""),
alignspecs = r.split(/ *[|] */), align = [];
- for (var a = 0; a < alignspecs.length; a++) {
- var s = alignspecs[a];
- align[a] = s.match(/^ *-+: *$/m) ? ' align="right"' : s.match(/^ *:-+: *$/m) ? ' align="center"' : s.match(/^ *:-+ *$/m) ? ' align="left"' : "";
+ for (var c = 0; c < alignspecs.length; c++) {
+ var u = alignspecs[c];
+ u.match(/^ *-+: *$/m) ? align[c] = ' align="right"' : u.match(/^ *:-+: *$/m) ? align[c] = ' align="center"' : u.match(/^ *:-+ *$/m) ? align[c] = ' align="left"' : align[c] = "";
}
- var c = n.split(/ *[|] */), u = c.length, d = i.tableClass ? ' class="' + i.tableClass + '"' : "", p = [ "
\n", "\n", "
\n" ].join("");
- for (a = 0; u > a; a++) {
- var h = l(e(c[a]), i);
- p += [ "
", h, "
\n" ].join("");
+ var d = n.split(/ *[|] */), p = d.length, h = i.tableClass ? ' class="' + i.tableClass + '"' : "", f = [ "
\n", "\n", "
\n" ].join("");
+ for (c = 0; c < p; c++) {
+ var m = l(t(d[c]), i);
+ f += [ "
", m, "
\n" ].join("");
}
- p += "
\n\n";
- var f = o.split("\n");
- for (a = 0; a < f.length; a++) if (!f[a].match(/^\s*$/)) {
- for (var m = f[a].split(/ *[|] */), g = u - m.length, v = 0; g > v; v++) m.push("");
- for (p += "
\n", v = 0; u > v; v++) {
- var b = l(e(m[v]), i);
- p += [ "
", b, "
\n" ].join("");
+ f += "
\n\n";
+ var g = o.split("\n");
+ for (c = 0; c < g.length; c++) if (!g[c].match(/^\s*$/)) {
+ for (var v = g[c].split(/ *[|] */), b = p - v.length, y = 0; y < b; y++) v.push("");
+ for (f += "
\n", y = 0; y < p; y++) {
+ var x = l(t(v[y]), i);
+ f += [ "
", x, "
\n" ].join("");
}
- p += "
\n";
+ f += "\n";
}
- return p += "
\n", i.hashExtraBlock(p);
+ return f += "
\n", i.hashExtraBlock(f);
}
var i = this, r = new RegExp([ "^", "[ ]{0,3}", "[|]", "(.+)\\n", "[ ]{0,3}", "[|]([ ]*[-:]+[-| :]*)\\n", "(", "(?:[ ]*[|].*\\n?)*", ")", "(?:\\n|$)" ].join(""), "gm"), o = new RegExp([ "^", "[ ]{0,3}", "(\\S.*[|].*)\\n", "[ ]{0,3}", "([-:]+[ ]*[|][-| :]*)\\n", "(", "(?:.*[|].*\\n?)*", ")", "(?:\\n|$)" ].join(""), "gm");
- return t = t.replace(r, n), t = t.replace(o, n);
- }, Markdown.Extra.prototype.stripFootnoteDefinitions = function(e) {
- var t = this;
- return e = e.replace(/\n[ ]{0,3}\[\^(.+?)\]\:[ \t]*\n?([\s\S]*?)\n{1,2}((?=\n[ ]{0,3}\S)|$)/g, function(e, n, i) {
- return n = h(n), i += "\n", i = i.replace(/^[ ]{0,3}/g, ""), t.footnotes[n] = i,
+ return e = e.replace(r, n), e = e.replace(o, n);
+ }, Markdown.Extra.prototype.stripFootnoteDefinitions = function(t) {
+ var e = this;
+ return t = t.replace(/\n[ ]{0,3}\[\^(.+?)\]\:[ \t]*\n?([\s\S]*?)\n{1,2}((?=\n[ ]{0,3}\S)|$)/g, function(t, n, i) {
+ return n = h(n), i += "\n", i = i.replace(/^[ ]{0,3}/g, ""), e.footnotes[n] = i,
"\n";
});
- }, Markdown.Extra.prototype.doFootnotes = function(e) {
- var t = this;
- if (!0 === t.isConvertingFootnote) return e;
+ }, Markdown.Extra.prototype.doFootnotes = function(t) {
+ var e = this;
+ if (!0 === e.isConvertingFootnote) return t;
var n = 0;
- return e = e.replace(/\[\^(.+?)\]/g, function(e, i) {
+ return t = t.replace(/\[\^(.+?)\]/g, function(t, i) {
var r = h(i);
- if (void 0 === t.footnotes[r]) return e;
- n++, t.usedFootnotes.push(r);
+ if (void 0 === e.footnotes[r]) return t;
+ n++, e.usedFootnotes.push(r);
var o = '' + n + "";
- return t.hashExtraInline(o);
+ return e.hashExtraInline(o);
});
- }, Markdown.Extra.prototype.printFootnotes = function(e) {
- var t = this;
- if (0 === t.usedFootnotes.length) return e;
- e += '\n\n
\n\n\n\n';
- for (var n = 0; n < t.usedFootnotes.length; n++) {
- var i = t.usedFootnotes[n], r = t.footnotes[i];
- t.isConvertingFootnote = !0;
- var o = l(r, t);
- delete t.isConvertingFootnote, e += '
\n\n';
+ }, Markdown.Extra.prototype.printFootnotes = function(t) {
+ var e = this;
+ if (0 === e.usedFootnotes.length) return t;
+ t += '\n\n
\n\n\n\n';
+ for (var n = 0; n < e.usedFootnotes.length; n++) {
+ var i = e.usedFootnotes[n], r = e.footnotes[i];
+ e.isConvertingFootnote = !0;
+ var o = l(r, e);
+ delete e.isConvertingFootnote, t += '
";
- }, Markdown.Extra.prototype.fencedCodeBlocks = function(t) {
- function n(e) {
- return e = e.replace(/&/g, "&"), e = e.replace(//g, ">"),
- e = e.replace(/~D/g, "$$"), e = e.replace(/~T/g, "~");
+ return t += "\n
";
+ }, Markdown.Extra.prototype.fencedCodeBlocks = function(e) {
+ function n(t) {
+ return t = t.replace(/&/g, "&"), t = t.replace(//g, ">"),
+ t = t.replace(/~D/g, "$$"), t = t.replace(/~T/g, "~");
}
var i = this;
- return t = t.replace(/(?:^|\n)```([^`\n]*)\n([\s\S]*?)\n```[ \t]*(?=\n)/g, function(t, r, o) {
- var a = e(r), s = o, l = i.googleCodePrettify ? ' class="prettyprint"' : "", c = "";
+ return e = e.replace(/(?:^|\n)```([^`\n]*)\n([\s\S]*?)\n```[ \t]*(?=\n)/g, function(e, r, o) {
+ var a = t(r), s = o, l = i.googleCodePrettify ? ' class="prettyprint"' : "", c = "";
a && (c = i.googleCodePrettify || i.highlightJs ? ' class="language-' + a + '"' : ' class="' + a + '"');
var u = [ "
", n(s), "
" ].join("");
return i.hashExtraBlock(u);
});
- }, Markdown.Extra.prototype.educatePants = function(e) {
- var t = this, n = "", i = 0;
- e.replace(/(?:)|(<)([a-zA-Z1-6]+)([^\n]*?>)([\s\S]*?)(<\/\2>)/g, function(r, o, a, s, l, c, u) {
- var d = e.substring(i, u);
- return n += t.applyPants(d), t.smartyPantsLastChar = n.substring(n.length - 1),
- i = u + r.length, o ? (/code|kbd|pre|script|noscript|iframe|math|ins|del|pre/i.test(a) ? t.smartyPantsLastChar = l.substring(l.length - 1) : l = t.educatePants(l),
+ }, Markdown.Extra.prototype.educatePants = function(t) {
+ var e = this, n = "", i = 0;
+ t.replace(/(?:)|(<)([a-zA-Z1-6]+)([^\n]*?>)([\s\S]*?)(<\/\2>)/g, function(r, o, a, s, l, c, u) {
+ var d = t.substring(i, u);
+ return n += e.applyPants(d), e.smartyPantsLastChar = n.substring(n.length - 1),
+ i = u + r.length, o ? (/code|kbd|pre|script|noscript|iframe|math|ins|del|pre/i.test(a) ? e.smartyPantsLastChar = l.substring(l.length - 1) : l = e.educatePants(l),
void (n += o + a + s + l + c)) : void (n += r);
});
- var r = e.substring(i);
- return n += t.applyPants(r), t.smartyPantsLastChar = n.substring(n.length - 1),
+ var r = t.substring(i);
+ return n += e.applyPants(r), e.smartyPantsLastChar = n.substring(n.length - 1),
n;
- }, Markdown.Extra.prototype.applyPants = function(e) {
- return e = e.replace(/---/g, "—").replace(/--/g, "–"), e = e.replace(/\.\.\./g, "…").replace(/\.\s\.\s\./g, "…"),
- e = e.replace(/``/g, "“").replace(/''/g, "”"), /^'$/.test(e) ? /\S/.test(this.smartyPantsLastChar) ? "’" : "‘" : /^"$/.test(e) ? /\S/.test(this.smartyPantsLastChar) ? "”" : "“" : (e = e.replace(/^'(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/, "’"),
- e = e.replace(/^"(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/, "”"), e = e.replace(/"'(?=\w)/g, "“‘"),
- e = e.replace(/'"(?=\w)/g, "‘“"), e = e.replace(/'(?=\d{2}s)/g, "’"),
- e = e.replace(/(\s| |--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)'(?=\w)/g, "$1‘"),
- e = e.replace(/([^\s\[\{\(\-])'/g, "$1’"), e = e.replace(/'(?=\s|s\b)/g, "’"),
- e = e.replace(/'/g, "‘"), e = e.replace(/(\s| |--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)"(?=\w)/g, "$1“"),
- e = e.replace(/([^\s\[\{\(\-])"/g, "$1”"), e = e.replace(/"(?=\s)/g, "”"),
- e = e.replace(/"/gi, "“"));
- }, Markdown.Extra.prototype.runSmartyPants = function(e) {
- return this.smartyPantsLastChar = "", e = this.educatePants(e), e = e.replace(/(<([a-zA-Z1-6]+)\b([^\n>]*?)(\/)?>)/g, f);
- }, Markdown.Extra.prototype.definitionLists = function(t) {
+ }, Markdown.Extra.prototype.applyPants = function(t) {
+ return t = t.replace(/---/g, "—").replace(/--/g, "–"), t = t.replace(/\.\.\./g, "…").replace(/\.\s\.\s\./g, "…"),
+ t = t.replace(/``/g, "“").replace(/''/g, "”"), /^'$/.test(t) ? /\S/.test(this.smartyPantsLastChar) ? "’" : "‘" : /^"$/.test(t) ? /\S/.test(this.smartyPantsLastChar) ? "”" : "“" : (t = t.replace(/^'(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/, "’"),
+ t = t.replace(/^"(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/, "”"), t = t.replace(/"'(?=\w)/g, "“‘"),
+ t = t.replace(/'"(?=\w)/g, "‘“"), t = t.replace(/'(?=\d{2}s)/g, "’"),
+ t = t.replace(/(\s| |--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)'(?=\w)/g, "$1‘"),
+ t = t.replace(/([^\s\[\{\(\-])'/g, "$1’"), t = t.replace(/'(?=\s|s\b)/g, "’"),
+ t = t.replace(/'/g, "‘"), t = t.replace(/(\s| |--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)"(?=\w)/g, "$1“"),
+ t = t.replace(/([^\s\[\{\(\-])"/g, "$1”"), t = t.replace(/"(?=\s)/g, "”"),
+ t = t.replace(/"/gi, "“"));
+ }, Markdown.Extra.prototype.runSmartyPants = function(t) {
+ return this.smartyPantsLastChar = "", t = this.educatePants(t), t = t.replace(/(<([a-zA-Z1-6]+)\b([^\n>]*?)(\/)?>)/g, f);
+ }, Markdown.Extra.prototype.definitionLists = function(e) {
var n = new RegExp([ "(\\x02\\n?|\\n\\n)", "(?:", "(", "(", "[ ]{0,3}", "((?:[ \\t]*\\S.*\\n)+)", "\\n?", "[ ]{0,3}:[ ]+", ")", "([\\s\\S]+?)", "(", "(?=\\0x03)", "|", "(?=", "\\n{2,}", "(?=\\S)", "(?!", "[ ]{0,3}", "(?:\\S.*\\n)+?", "\\n?", "[ ]{0,3}:[ ]+", ")", "(?!", "[ ]{0,3}:[ ]+", ")", ")", ")", ")", ")" ].join(""), "gm"), i = this;
- return t = a(t), t = t.replace(n, function(t, n, r) {
- var o = e(i.processDefListItems(r));
+ return e = a(e), e = e.replace(n, function(e, n, r) {
+ var o = t(i.processDefListItems(r));
return o = "
\n" + o + "\n
", n + i.hashExtraBlock(o) + "\n\n";
- }), s(t);
+ }), s(e);
}, Markdown.Extra.prototype.processDefListItems = function(i) {
var r = this, o = new RegExp([ "(\\x02\\n?|\\n\\n+)", "(", "[ ]{0,3}", "(?![:][ ]|[ ])", "(?:\\S.*\\n)+?", ")", "(?=\\n?[ ]{0,3}:[ ])" ].join(""), "gm"), u = new RegExp([ "\\n(\\n+)?", "(", "[ ]{0,3}", "[:][ ]+", ")", "([\\s\\S]+?)", "(?=\\n*", "(?:", "\\n[ ]{0,3}[:][ ]|", "
|\\x03", ")", ")" ].join(""), "gm");
- return i = a(i), i = i.replace(/\n{2,}(?=\\x03)/, "\n"), i = i.replace(o, function(t, n, i) {
- for (var o = e(i).split("\n"), a = "", s = 0; s < o.length; s++) {
+ return i = a(i), i = i.replace(/\n{2,}(?=\\x03)/, "\n"), i = i.replace(o, function(e, n, i) {
+ for (var o = t(i).split("\n"), a = "", s = 0; s < o.length; s++) {
var c = o[s];
- c = l(e(c), r), a += "\n
" + c + "
";
+ c = l(t(c), r), a += "\n
" + c + "
";
}
return a + "\n";
- }), i = i.replace(u, function(e, i, o, a) {
+ }), i = i.replace(u, function(t, i, o, a) {
return i || a.match(/\n{2,}/) ? (a = Array(o.length + 1).join(" ") + a, a = n(a) + "\n\n",
- a = "\n" + c(a, r) + "\n") : (a = t(a), a = l(n(a), r)), "\n
" + a + "
\n";
+ a = "\n" + c(a, r) + "\n") : (a = e(a), a = l(n(a), r)), "\n
Allows StackEdit to interpret LaTeX mathematical expressions.
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n
\n
\n
\nMore info';
}), define("text!libs/mathjax_config.js", [], function() {
- return 'MathJax.Hub.Config({\n skipStartupTypeset: true,\n "HTML-CSS": {\n preferredFont: "TeX",\n availableFonts: [\n "TeX"\n ],\n linebreaks: {\n automatic: true\n },\n EqnChunk: 10,\n imageFont: null\n },\n tex2jax: <%= tex2jax || \'{ inlineMath: [["$","$"],["\\\\\\\\\\\\\\\\(","\\\\\\\\\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\\\\\[","\\\\\\\\]"]], processEscapes: true }\' %>,\n TeX: $.extend({\n noUndefined: {\n attributes: {\n mathcolor: "red",\n mathbackground: "#FFEEEE",\n mathsize: "90%"\n }\n },\n Safe: {\n allow: {\n URLs: "safe",\n classes: "safe",\n cssIDs: "safe",\n styles: "safe",\n fontsize: "all"\n }\n }\n }, <%= tex %>),\n messageStyle: "none"\n});\n';
-}), define("libs/mathjax_init", [ "settings", "text!libs/mathjax_config.js" ], function(e, t) {
+ return 'MathJax.Hub.Config({\n\tskipStartupTypeset: true,\n "HTML-CSS": {\n preferredFont: "TeX",\n availableFonts: [\n "TeX"\n ],\n linebreaks: {\n automatic: true\n },\n EqnChunk: 10,\n imageFont: null\n },\n tex2jax: <%= tex2jax || \'{ inlineMath: [["$","$"],["\\\\\\\\\\\\\\\\(","\\\\\\\\\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\\\\\[","\\\\\\\\]"]], processEscapes: true }\' %>,\n TeX: $.extend({\n noUndefined: {\n attributes: {\n mathcolor: "red",\n mathbackground: "#FFEEEE",\n mathsize: "90%"\n }\n },\n Safe: {\n allow: {\n URLs: "safe",\n classes: "safe",\n cssIDs: "safe",\n styles: "safe",\n fontsize: "all"\n }\n }\n }, <%= tex %>),\n messageStyle: "none"\n});\n';
+}), define("libs/mathjax_init", [ "settings", "text!libs/mathjax_config.js" ], function(t, e) {
var n = document.createElement("script");
- n.type = "text/x-mathjax-config", n.innerHTML = _.template(t, {
- tex: e.extensionSettings.mathJax ? e.extensionSettings.mathJax.tex : "undefined",
- tex2jax: e.extensionSettings.mathJax ? e.extensionSettings.mathJax.tex2jax : void 0
+ n.type = "text/x-mathjax-config", n.innerHTML = _.template(e, {
+ tex: t.extensionSettings.mathJax ? t.extensionSettings.mathJax.tex : "undefined",
+ tex2jax: t.extensionSettings.mathJax ? t.extensionSettings.mathJax.tex2jax : void 0
}), document.getElementsByTagName("head")[0].appendChild(n);
-}), define("extensions/mathJax", [ "utils", "classes/Extension", "text!html/mathJaxSettingsBlock.html", "mathjax" ], function(e, t, n) {
- function i(e, t, n) {
- var i = u.slice(e, t + 1).join("").replace(/&/g, "&").replace(//g, ">");
- for (x.Browser.isMSIE && (i = i.replace(/(%[^\n]*)\n/g, "$1 \n")); t > e; ) u[t] = "",
- t--;
- u[e] = "@@" + m.length + "@@", n && (i = n(i)), m.push(i), d = p = h = null;
+}), define("extensions/mathJax", [ "utils", "classes/Extension", "text!html/mathJaxSettingsBlock.html", "mathjax" ], function(t, e, n) {
+ function i(t, e, n) {
+ var i = u.slice(t, e + 1).join("").replace(/&/g, "&").replace(//g, ">");
+ for (x.Browser.isMSIE && (i = i.replace(/(%[^\n]*)\n/g, "$1 \n")); e > t; ) u[e] = "",
+ e--;
+ u[t] = "@@" + m.length + "@@", n && (i = n(i)), m.push(i), d = p = h = null;
}
- function r(e) {
+ function r(t) {
d = p = h = null, m = [];
- var t;
- /`/.test(e) ? (e = e.replace(/~/g, "~T").replace(/(^|[^\\])(`+)([^\n]*?[^`\n])\2(?!`)/gm, function(e) {
- return e.replace(/\$/g, "~D");
- }), t = function(e) {
- return e.replace(/~([TD])/g, function(e, t) {
+ var e;
+ /`/.test(t) ? (t = t.replace(/~/g, "~T").replace(/(^|[^\\])(`+)([^\n]*?[^`\n])\2(?!`)/gm, function(t) {
+ return t.replace(/\$/g, "~D");
+ }), e = function(t) {
+ return t.replace(/~([TD])/g, function(t, e) {
return {
T: "~",
D: "$"
- }[t];
+ }[e];
});
- }) : t = function(e) {
- return e;
- }, u = w(e.replace(/\r\n?/g, "\n"), S);
- for (var n = 1, r = u.length; r > n; n += 2) {
+ }) : e = function(t) {
+ return t;
+ }, u = w(t.replace(/\r\n?/g, "\n"), S);
+ for (var n = 1, r = u.length; n < r; n += 2) {
var o = u[n];
"@" === o.charAt(0) ? (u[n] = "@@" + m.length + "@@", m.push(o)) : d ? p == y && "\n" == o.charAt(0) ? (h && (n = h,
- i(d, n, t)), d = p = h = null, f = 0) : o === p ? f ? h = n : i(d, n, t) : o.match(/\n.*\n/) ? (h && (n = h,
- i(d, n, t)), d = p = h = null, f = 0) : "{" === o ? f++ : "}" === o && f && f-- : o === y || "$$" === o ? (d = n,
+ i(d, n, e)), d = p = h = null, f = 0) : o === p ? f ? h = n : i(d, n, e) : o.match(/\n.*\n/) ? (h && (n = h,
+ i(d, n, e)), d = p = h = null, f = 0) : "{" === o ? f++ : "}" === o && f && f-- : o === y || "$$" === o ? (d = n,
p = o, f = 0) : "begin" === o.substr(1, 5) && (d = n, p = "\\end" + o.substr(6),
f = 0);
}
- return h && i(d, h, t), t(u.join(""));
+ return h && i(d, h, e), e(u.join(""));
}
- function o(e) {
- return e = e.replace(/@@(\d+)@@/g, function(e, t) {
- return m[t];
- }), m = null, e;
+ function o(t) {
+ return t = t.replace(/@@(\d+)@@/g, function(t, e) {
+ return m[e];
+ }), m = null, t;
}
function a() {
v = !1, x.cancelTypeset = !1, x.Queue([ "Typeset", x, b ]), x.Queue(c);
@@ -13356,22 +13357,22 @@ function() {
function s() {
v || (v = !0, x.Cancel(), x.Queue(a));
}
- var l = new t("mathJax", "MathJax", !0);
+ var l = new e("mathJax", "MathJax", (!0));
l.settingsBlock = n, l.defaultConfig = {
tex: "{}",
tex2jax: '{ inlineMath: [["$","$"],["\\\\\\\\(","\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\[","\\\\]"]], processEscapes: true }'
}, l.onLoadSettings = function() {
- e.setInputValue("#input-mathjax-config-tex", l.config.tex), e.setInputValue("#input-mathjax-config-tex2jax", l.config.tex2jax);
- }, l.onSaveSettings = function(t, n) {
- t.tex = e.getInputJsValue("#input-mathjax-config-tex", n), t.tex2jax = e.getInputJsValue("#input-mathjax-config-tex2jax", n);
- }, l.onPagedownConfigure = function(e) {
+ t.setInputValue("#input-mathjax-config-tex", l.config.tex), t.setInputValue("#input-mathjax-config-tex2jax", l.config.tex2jax);
+ }, l.onSaveSettings = function(e, n) {
+ e.tex = t.getInputJsValue("#input-mathjax-config-tex", n), e.tex2jax = t.getInputJsValue("#input-mathjax-config-tex2jax", n);
+ }, l.onPagedownConfigure = function(t) {
b = document.getElementById("preview-contents");
- var t = e.getConverter();
- t.hooks.chain("preConversion", r), t.hooks.chain("postConversion", o);
+ var e = t.getConverter();
+ e.hooks.chain("preConversion", r), e.hooks.chain("postConversion", o);
};
var c;
- l.onAsyncPreview = function(e) {
- c = e, s();
+ l.onAsyncPreview = function(t) {
+ c = t, s();
};
var u, d, p, h, f, m, g = !1, v = !1, b = null, y = "$", x = MathJax.Hub;
x.Queue(function() {
@@ -13387,239 +13388,239 @@ function() {
});
});
var w, S = /(\$\$?|\\(?:begin|end)\{[a-z]*\*?\}|\\[\\{}$]|[{}]|(?:\n\s*)+|@@\d+@@)/i;
- return w = 3 === "aba".split(/(b)/).length ? function(e, t) {
- return e.split(t);
- } : function(e, t) {
+ return w = 3 === "aba".split(/(b)/).length ? function(t, e) {
+ return t.split(e);
+ } : function(t, e) {
var n, i = [];
- if (!t.global) {
- n = t.toString();
+ if (!e.global) {
+ n = e.toString();
var r = "";
- n = n.replace(/^\/(.*)\/([im]*)$/, function(e, t, n) {
- return r = n, t;
- }), t = RegExp(n, r + "g");
+ n = n.replace(/^\/(.*)\/([im]*)$/, function(t, e, n) {
+ return r = n, e;
+ }), e = RegExp(n, r + "g");
}
- for (var o = t.lastIndex = 0; n = t.exec(e); ) i.push(e.substring(o, n.index)),
+ for (var o = e.lastIndex = 0; n = e.exec(t); ) i.push(t.substring(o, n.index)),
i.push.apply(i, n.slice(1)), o = n.index + n[0].length;
- return i.push(e.substring(o)), i;
+ return i.push(t.substring(o)), i;
}, function() {
- var e = MathJax.Hub;
- if (!e.Cancel) {
- e.cancelTypeset = !1, e.Register.StartupHook("HTML-CSS Jax Config", function() {
- var t = MathJax.OutputJax["HTML-CSS"], n = t.Translate;
- t.Augment({
+ var t = MathJax.Hub;
+ if (!t.Cancel) {
+ t.cancelTypeset = !1, t.Register.StartupHook("HTML-CSS Jax Config", function() {
+ var e = MathJax.OutputJax["HTML-CSS"], n = e.Translate;
+ e.Augment({
Translate: function(i, r) {
- if (e.cancelTypeset || r.cancelled) throw Error("MathJax Canceled");
- return n.call(t, i, r);
+ if (t.cancelTypeset || r.cancelled) throw Error("MathJax Canceled");
+ return n.call(e, i, r);
}
});
- }), e.Register.StartupHook("SVG Jax Config", function() {
- var t = MathJax.OutputJax.SVG, n = t.Translate;
- t.Augment({
+ }), t.Register.StartupHook("SVG Jax Config", function() {
+ var e = MathJax.OutputJax.SVG, n = e.Translate;
+ e.Augment({
Translate: function(i, r) {
- if (e.cancelTypeset || r.cancelled) throw Error("MathJax Canceled");
- return n.call(t, i, r);
+ if (t.cancelTypeset || r.cancelled) throw Error("MathJax Canceled");
+ return n.call(e, i, r);
}
});
- }), e.Register.StartupHook("TeX Jax Config", function() {
- var t = MathJax.InputJax.TeX, n = t.Translate;
- t.Augment({
+ }), t.Register.StartupHook("TeX Jax Config", function() {
+ var e = MathJax.InputJax.TeX, n = e.Translate;
+ e.Augment({
Translate: function(i, r) {
- if (e.cancelTypeset || r.cancelled) throw Error("MathJax Canceled");
- return n.call(t, i, r);
+ if (t.cancelTypeset || r.cancelled) throw Error("MathJax Canceled");
+ return n.call(e, i, r);
}
});
});
- var t = e.processError;
- e.processError = function(n, i, r) {
- return "MathJax Canceled" !== n.message ? t.call(e, n, i, r) : (MathJax.Message.Clear(0, 0),
+ var e = t.processError;
+ t.processError = function(n, i, r) {
+ return "MathJax Canceled" !== n.message ? e.call(t, n, i, r) : (MathJax.Message.Clear(0, 0),
i.jaxIDs = [], i.jax = {}, i.scripts = [], i.i = i.j = 0, i.cancelled = !0, null);
- }, e.Cancel = function() {
+ }, t.Cancel = function() {
this.cancelTypeset = !0;
};
}
}(), l;
}), define("text!html/partialRenderingSettingsBlock.html", [], function() {
- return "
Renders modified sections only.
\n
\n
Note: Document sections are based on title elements (h1, h2...). Therefore if\n your document does not contain any title, performance will not be increased.
\n
";
-}), define("extensions/partialRendering", [ "underscore", "crel", "extensions/markdownExtra", "classes/Extension", "text!html/partialRenderingSettingsBlock.html" ], function(e, t, n, i, r) {
+ return "
Renders modified sections only.
\n
\n\t
Note: Document sections are based on title elements (h1, h2...). Therefore if\n\tyour document does not contain any title, performance will not be increased.
\n
";
+}), define("extensions/partialRendering", [ "underscore", "crel", "extensions/markdownExtra", "classes/Extension", "text!html/partialRenderingSettingsBlock.html" ], function(t, e, n, i, r) {
function o() {
- var t = [], n = "\n";
- if (m = !1, e.each(g, function(e) {
- var i = '\n\n\n' + e.text + "\n\n";
- f && (i = i.replace(/^```.*\n[\s\S]*?\n```|\n[ ]{0,3}\[\^(.+?)\]\:[ \t]*\n?([\s\S]*?)\n{1,2}((?=\n[ ]{0,3}\S)|$)/gm, function(e, t) {
- return t ? (m = !0, n += e.replace(/^\s*\n/gm, "") + "\n", "") : e;
- })), i = i.replace(/^```.*\n[\s\S]*?\n```|^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm, function(e, t) {
- return t ? (n += e.replace(/^\s*\n/gm, "") + "\n", "") : e;
- }), t.push({
- id: e.id,
+ var e = [], n = "\n";
+ if (m = !1, t.each(g, function(t) {
+ var i = '\n\n\n' + t.text + "\n\n";
+ f && (i = i.replace(/^```.*\n[\s\S]*?\n```|\n[ ]{0,3}\[\^(.+?)\]\:[ \t]*\n?([\s\S]*?)\n{1,2}((?=\n[ ]{0,3}\S)|$)/gm, function(t, e) {
+ return e ? (m = !0, n += t.replace(/^\s*\n/gm, "") + "\n", "") : t;
+ })), i = i.replace(/^```.*\n[\s\S]*?\n```|^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm, function(t, e) {
+ return e ? (n += t.replace(/^\s*\n/gm, "") + "\n", "") : t;
+ }), e.push({
+ id: t.id,
text: i + "\n"
});
}), y = [], b = [], d = void 0, !0 === x || u != n) return x = !1, u = n, b = v,
- v = t, void (y = t);
+ v = e, void (y = e);
var i = v.length;
- e.some(v, function(e, n) {
- return n >= t.length || e.text != t[n].text ? (i = n, !0) : void 0;
+ t.some(v, function(t, n) {
+ if (n >= e.length || t.text != e[n].text) return i = n, !0;
});
var r = -v.length;
- e.some(v.slice().reverse(), function(e, n) {
- return n >= t.length || e.text != t[t.length - n - 1].text ? (r = -n, !0) : void 0;
+ t.some(v.slice().reverse(), function(t, n) {
+ if (n >= e.length || t.text != e[e.length - n - 1].text) return r = -n, !0;
}), i - r > v.length && (r = i - v.length);
var o = v.slice(0, i);
- y = t.slice(i, t.length + r);
+ y = e.slice(i, e.length + r);
var a = v.slice(v.length + r, v.length);
- d = e.first(a), b = v.slice(i, v.length + r), v = o.concat(y).concat(a);
+ d = t.first(a), b = v.slice(i, v.length + r), v = o.concat(y).concat(a);
}
- function a(e) {
- var t = e.id.substring(3), n = w[t];
- n && S.removeChild(n), w[t] = e, S.appendChild(e);
+ function a(t) {
+ var e = t.id.substring(3), n = w[e];
+ n && S.removeChild(n), w[e] = t, S.appendChild(t);
}
function s() {
function n(n) {
- for (var i = t("div", {
+ for (var i = e("div", {
id: "wmd-preview-section-" + n.id,
"class": "wmd-preview-section preview-content"
}), o = !1; r; ) {
var s = r.nextSibling, l = "se-preview-section-delimiter" == r.className;
if (!0 === o && "DIV" == r.tagName && l) break;
- o = !0, "DIV" == r.tagName && "footnotes" == r.className ? e.each(r.querySelectorAll("ol > li"), a) : l || i.appendChild(r),
+ o = !0, "DIV" == r.tagName && "footnotes" == r.className ? t.each(r.querySelectorAll("ol > li"), a) : l || i.appendChild(r),
r = s;
}
return i;
}
- e.each(b, function(e) {
- var t = document.getElementById("wmd-preview-section-" + e.id);
- h.removeChild(t);
+ t.each(b, function(t) {
+ var e = document.getElementById("wmd-preview-section-" + t.id);
+ h.removeChild(e);
});
var i = document.getElementById("wmd-preview"), r = i.firstChild, o = document.createDocumentFragment();
- e.each(y, function(e) {
- o.appendChild(n(e));
+ t.each(y, function(t) {
+ o.appendChild(n(t));
}), i.innerHTML = "";
var s = p;
void 0 !== d && (s = document.getElementById("wmd-preview-section-" + d.id)), h.insertBefore(o, s),
p.innerHTML = "", delete p.exportableHtml;
var l = [];
if (!0 === m) {
- var c = t("ol");
- e.each(h.querySelectorAll("a.footnote"), function(e, t) {
- e.textContent = t + 1;
- var n = e.id.substring(6);
+ var c = e("ol");
+ t.each(h.querySelectorAll("a.footnote"), function(t, e) {
+ t.textContent = e + 1;
+ var n = t.id.substring(6);
l.push(n);
var i = w[n];
i && c.appendChild(i.cloneNode(!0));
- }), l.length > 0 && p.appendChild(t("div", {
+ }), l.length > 0 && p.appendChild(e("div", {
"class": "footnotes"
- }, t("hr"), c)), Object.keys(w).forEach(function(e) {
- -1 === l.indexOf(e) && (S.removeChild(w[e]), delete w[e]);
+ }, e("hr"), c)), Object.keys(w).forEach(function(t) {
+ -1 === l.indexOf(t) && (S.removeChild(w[t]), delete w[t]);
});
}
}
- var l = new i("partialRendering", "Partial Rendering", !0);
+ var l = new i("partialRendering", "Partial Rendering", (!0));
l.settingsBlock = r;
var c, u, d, p, h, f = !1, m = !1, g = [], v = [], b = [], y = [], x = !1, w = {}, S = document.createDocumentFragment();
- return l.onSectionsCreated = function(e) {
- g = e;
- }, l.onPagedownConfigure = function(t) {
- c = t.getConverter(), c.hooks.chain("preConversion", function() {
+ return l.onSectionsCreated = function(t) {
+ g = t;
+ }, l.onPagedownConfigure = function(e) {
+ c = e.getConverter(), c.hooks.chain("preConversion", function() {
o();
- var t = e.map(y, function(e) {
- return e.text;
+ var e = t.map(y, function(t) {
+ return t.text;
});
- return t.push(u + "\n\n"), t.join("");
- }), t.hooks.chain("onPreviewRefresh", function() {
+ return e.push(u + "\n\n"), e.join("");
+ }), e.hooks.chain("onPreviewRefresh", function() {
s();
});
}, l.onInit = function() {
- n.enabled && e.some(n.config.extensions, function(e) {
- return "footnotes" == e;
+ n.enabled && t.some(n.config.extensions, function(t) {
+ return "footnotes" == t;
}) && (f = !0);
}, l.onReady = function() {
- p = t("div", {
+ p = e("div", {
id: "wmd-preview-section-footnotes",
"class": "preview-content"
}), h = document.getElementById("preview-contents"), h.appendChild(p);
}, l.onFileSelected = function() {
x = !0;
}, l;
-}), define("extensions/markdownSectionParser", [ "underscore", "extensions/markdownExtra", "extensions/mathJax", "extensions/partialRendering", "classes/Extension", "crel" ], function(e, t, n, i, r, o) {
- function a(e, t) {
- function n(e, t) {
- var n = o.substring(a, t);
+}), define("extensions/markdownSectionParser", [ "underscore", "extensions/markdownExtra", "extensions/mathJax", "extensions/partialRendering", "classes/Extension", "crel" ], function(t, e, n, i, r, o) {
+ function a(t, e) {
+ function n(t, e) {
+ var n = o.substring(a, e);
u.push({
id: ++h,
text: n,
textWithFrontMatter: i + n
}), i = "";
}
- if (e === p) {
- var i = (p.frontMatter || {})._frontMatter || "", r = t.substring(i.length), o = r + "\n\n";
+ if (t === p) {
+ var i = (p.frontMatter || {})._frontMatter || "", r = e.substring(i.length), o = r + "\n\n";
u = [];
var a = 0;
- o.replace(d, function(e, t) {
- n(a, t), a = t;
+ o.replace(d, function(t, e) {
+ n(a, e), a = e;
}), n(a, r.length), s.onSectionsCreated(u);
}
}
var s, l = new r("markdownSectionParser", "Markdown section parser");
- l.onEventMgrCreated = function(e) {
- s = e;
+ l.onEventMgrCreated = function(t) {
+ s = t;
};
var c, u = [], d = "^.+[ \\t]*\\n=+[ \\t]*\\n+|^.+[ \\t]*\\n-+[ \\t]*\\n+|^\\#{1,6}[ \\t]*.+?[ \\t]*\\#*\\n+";
l.onPagedownConfigure = function(r) {
- t.enabled && e.some(t.config.extensions, function(e) {
- return "fenced_code_gfm" == e;
+ e.enabled && t.some(e.config.extensions, function(t) {
+ return "fenced_code_gfm" == t;
}) && (d = "^```[^`\\n]*\\n[\\s\\S]*?\\n```|" + d), n.enabled && (d = "^[ \\t]*\\n\\$\\$[\\s\\S]*?\\$\\$|" + d,
d = "^[ \\t]*\\n\\\\\\\\[[\\s\\S]*?\\\\\\\\]|" + d, d = "^[ \\t]*\\n\\\\?\\\\begin\\{[a-z]*\\*?\\}[\\s\\S]*?\\\\end\\{[a-z]*\\*?\\}|" + d),
d = new RegExp(d, "gm");
var a = r.getConverter();
i.enabled || (a.hooks.chain("preConversion", function() {
- return e.reduce(u, function(e, t) {
- return e + '\n\n\n' + t.text + "\n\n";
+ return t.reduce(u, function(t, e) {
+ return t + '\n\n\n' + e.text + "\n\n";
}, "");
}), r.hooks.chain("onPreviewRefresh", function() {
- function e() {
- for (var e = o("div", {
+ function t() {
+ for (var t = o("div", {
"class": "wmd-preview-section preview-content"
- }), t = !1; n; ) {
+ }), e = !1; n; ) {
var i = n.nextSibling, r = "se-preview-section-delimiter" == n.className;
- if (!0 === t && "DIV" == n.tagName && r) break;
- t = !0, r || e.appendChild(n), n = i;
+ if (!0 === e && "DIV" == n.tagName && r) break;
+ e = !0, r || t.appendChild(n), n = i;
}
- return e;
+ return t;
}
- var t = document.getElementById("wmd-preview"), n = t.firstChild, i = document.createDocumentFragment();
- u.forEach(function() {
- i.appendChild(e());
- }), c.innerHTML = "", c.appendChild(t), c.appendChild(i);
+ var e = document.getElementById("wmd-preview"), n = e.firstChild, i = document.createDocumentFragment();
+ u.forEach(function(e) {
+ i.appendChild(t());
+ }), c.innerHTML = "", c.appendChild(e), c.appendChild(i);
}));
}, l.onReady = function() {
c = document.getElementById("preview-contents");
};
var p;
- l.onFileSelected = function(e) {
- p = e;
+ l.onFileSelected = function(t) {
+ p = t;
};
var h = 0;
return l.onFileOpen = a, l.onContentChanged = a, l;
}), define("text!html/buttonMarkdownSyntax.html", [], function() {
- return '\n
\n
Markdown syntax
\n \n
\n
Phrase Emphasis
\n\n
*italic* **bold**\n_italic_ __bold__\n
\n\n
Links
\n\n
Inline:
\n\n
An [example](http://url.com/ "Title")\n
\n\n
Reference-style labels (titles are optional):
\n\n
An [example][id]. Then, anywhere\nelse in the doc, define the link:\n\n [id]: http://example.com/ "Title"\n
> Email-style angle brackets\n> are used for blockquotes.\n\n> > And, they can be nested.\n\n> #### Headers in blockquotes\n>\n> * You can quote a list.\n> * Etc.\n
\n\n
Code Spans
\n\n
`<code>` spans are delimited\nby backticks.\n\nYou can include literal backticks\nlike `` `this` ``.\n
\n\n
Preformatted Code Blocks
\n\n
Indent every line of a code block by at least 4 spaces or 1 tab.
\n\n
This is a normal paragraph.\n\n This is a preformatted\n code block.\n
> Email-style angle brackets\n> are used for blockquotes.\n\n> > And, they can be nested.\n\n> #### Headers in blockquotes\n>\n> * You can quote a list.\n> * Etc.\n
\n\n
Code Spans
\n\n
`<code>` spans are delimited\nby backticks.\n\nYou can include literal backticks\nlike `` `this` ``.\n
\n\n
Preformatted Code Blocks
\n\n
Indent every line of a code block by at least 4 spaces or 1 tab.
\n\n
This is a normal paragraph.\n\n This is a preformatted\n code block.\n
\n';
+}), define("extensions/dialogManageSynchronization", [ "jquery", "underscore", "classes/Extension", "text!html/dialogManageSynchronizationLocation.html" ], function(t, e, n, i) {
+ var r, o = new n("dialogManageSynchronization", 'Dialog "Manage synchronization"', (!1), (!0));
+ o.onEventMgrCreated = function(t) {
+ r = t;
};
var a;
- o.onSynchronizerCreated = function(e) {
- a = e;
+ o.onSynchronizerCreated = function(t) {
+ a = t;
};
- var s, l, c, u = function(e) {
- if (void 0 === e || e === s) {
- c.toggleClass("hide", 0 === t.size(s.syncLocations));
- var n = t.reduce(s.syncLocations, function(e, n) {
- return e + t.template(i, {
+ var s, l, c, u = function(t) {
+ if (void 0 === t || t === s) {
+ c.toggleClass("hide", 0 === e.size(s.syncLocations));
+ var n = e.reduce(s.syncLocations, function(t, n) {
+ return t + e.template(i, {
syncAttributes: n,
syncDesc: n.id || n.path,
syncLocationLink: n.provider.getSyncLocationLink && n.provider.getSyncLocationLink(n)
@@ -13933,45 +13934,45 @@ function() {
l.innerHTML = n;
}
};
- return o.onFileSelected = function(e) {
- s = e, u(e);
+ return o.onFileSelected = function(t) {
+ s = t, u(t);
}, o.onSyncExportSuccess = u, o.onSyncRemoved = u, o.onReady = function() {
- var t = document.querySelector(".modal-manage-sync");
- l = t.querySelector(".sync-list"), c = e(document.querySelectorAll(".show-already-synchronized")),
- e(l).on("click", ".remove-button", function() {
- var t = e(this), n = s.syncLocations[t.data("syncIndex")];
+ var e = document.querySelector(".modal-manage-sync");
+ l = e.querySelector(".sync-list"), c = t(document.querySelectorAll(".show-already-synchronized")),
+ t(l).on("click", ".remove-button", function() {
+ var e = t(this), n = s.syncLocations[e.data("syncIndex")];
s.removeSyncLocation(n), r.onSyncRemoved(s, n);
});
}, o;
}), define("text!html/dialogManageSharingLocation.html", [], function() {
return '
\n
\n \n
\n
';
-}), define("extensions/dialogManageSharing", [ "jquery", "underscore", "constants", "classes/Extension", "text!html/dialogManageSharingLocation.html" ], function(e, t, n, i, r) {
- var o, a = new i("dialogManageSharing", 'Button "Share"', !1, !0);
- a.onEventMgrCreated = function(e) {
- o = e;
+}), define("extensions/dialogManageSharing", [ "jquery", "underscore", "constants", "classes/Extension", "text!html/dialogManageSharingLocation.html" ], function(t, e, n, i, r) {
+ var o, a = new i("dialogManageSharing", 'Button "Share"', (!1), (!0));
+ a.onEventMgrCreated = function(t) {
+ o = t;
};
var s;
- a.onSharingCreated = function(e) {
- s = e;
+ a.onSharingCreated = function(t) {
+ s = t;
};
var l, c, u, d, p, h = function(i) {
if (void 0 === i || i === l) {
- var o = t.reduce(l.syncLocations, function(i, o) {
+ var o = e.reduce(l.syncLocations, function(i, o) {
var a = s.getEditorParams(o);
if (a) {
- var l = n.MAIN_URL + "editor#!" + e.param(a);
- i += t.template(r, {
+ var l = n.MAIN_URL + "editor#!" + t.param(a);
+ i += e.template(r, {
link: l
});
}
return i;
}, "");
c.innerHTML = o, d.toggleClass("hide", 0 !== o.length);
- var a = t.reduce(l.publishLocations, function(i, o) {
+ var a = e.reduce(l.publishLocations, function(i, o) {
var a = s.getViewerParams(o);
if (a) {
- var l = n.MAIN_URL + "viewer#!" + e.param(a);
- i += t.template(r, {
+ var l = n.MAIN_URL + "viewer#!" + t.param(a);
+ i += e.template(r, {
link: l
});
}
@@ -13980,87 +13981,87 @@ function() {
u.innerHTML = a, p.toggleClass("hide", 0 !== a.length);
}
};
- return a.onFileSelected = function(e) {
- l = e, h(e);
+ return a.onFileSelected = function(t) {
+ l = t, h(t);
}, a.onSyncExportSuccess = h, a.onSyncRemoved = h, a.onNewPublishSuccess = h, a.onPublishRemoved = h,
a.onReady = function() {
- var t = document.querySelector(".modal-manage-sharing");
- c = t.querySelector(".share-editor-list"), u = t.querySelector(".share-viewer-list"),
- d = e(t.querySelectorAll(".msg-no-share-editor")), p = e(t.querySelectorAll(".msg-no-share-viewer")),
- e(t).on("show.bs.modal", function() {
- e(t.querySelector("input")).each(function() {
- this.value = e(this).data("value");
+ var e = document.querySelector(".modal-manage-sharing");
+ c = e.querySelector(".share-editor-list"), u = e.querySelector(".share-viewer-list"),
+ d = t(e.querySelectorAll(".msg-no-share-editor")), p = t(e.querySelectorAll(".msg-no-share-viewer")),
+ t(e).on("show.bs.modal", function() {
+ t(e.querySelector("input")).each(function() {
+ this.value = t(this).data("value");
});
});
}, a;
}), function() {
- var e = this, t = {}, n = !1;
- "undefined" != typeof module && module.exports ? (module.exports = t, e.toMarkdown = t,
- n = !0) : e.toMarkdown = t, t.converter = function(e) {
- e && e.elements && $.isArray(e.elements) && (c = c.concat(e.elements)), this.makeMd = function(e, t) {
+ var t = this, e = {}, n = !1;
+ "undefined" != typeof module && module.exports ? (module.exports = e, t.toMarkdown = e,
+ n = !0) : t.toMarkdown = e, e.converter = function(t) {
+ t && t.elements && $.isArray(t.elements) && (c = c.concat(t.elements)), this.makeMd = function(t, e) {
var r;
return n ? require("jsdom").env({
- html: e,
+ html: t,
scripts: [ "http://code.jquery.com/jquery-1.6.4.min.js" ],
done: function(n, r) {
- "function" == typeof t && t(i(e, r.$));
+ "function" == typeof e && e(i(t, r.$));
}
- }) : r = i(e, $), r;
+ }) : r = i(t, $), r;
};
};
- var i = function(e, t) {
- e = e.replace(/(\d+)\. /g, "$1\\. ");
- var n = t(""), i = n.html(e);
+ var i = function(t, e) {
+ t = t.replace(/(\d+)\. /g, "$1\\. ");
+ var n = e(""), i = n.html(t);
i.find("*:not(pre, code)").contents().filter(function() {
return 3 === this.nodeType && /^\s+$/.test(this.nodeValue);
}).remove();
- for (var r = [], o = 0, s = c.length; s > o; o++) r.push(c[o].selector);
- for (r = r.join(","); i.find(r).length; ) for (var o = 0, s = c.length; s > o; o++) $matches = i.find(c[o].selector + ':not(:has("' + r + '"))'),
- $matches.each(function(e, n) {
- var i = t(n);
+ for (var r = [], o = 0, s = c.length; o < s; o++) r.push(c[o].selector);
+ for (r = r.join(","); i.find(r).length; ) for (var o = 0, s = c.length; o < s; o++) $matches = i.find(c[o].selector + ':not(:has("' + r + '"))'),
+ $matches.each(function(t, n) {
+ var i = e(n);
i.before(c[o].replacement(i.html(), i)).remove();
});
return a(i.html());
- }, r = function(e) {
- return e.replace(/^[\n\r\f]+|[\n\r\f]+$/g, "");
- }, o = function(e) {
- return String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"');
- }, a = function(e) {
- return e = e.replace(/^[\t\r\n]+|[\t\r\n]+$/g, ""), e = e.replace(/\n\s+\n/g, "\n\n"),
- e = e.replace(/\n{3,}/g, "\n\n"), e = o(e);
- }, s = function(e) {
- return e = r(e), e ? "**" + e + "**" : "";
- }, l = function(e) {
- return e = r(e), e ? "_" + e + "_" : "";
+ }, r = function(t) {
+ return t.replace(/^[\n\r\f]+|[\n\r\f]+$/g, "");
+ }, o = function(t) {
+ return String(t).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"');
+ }, a = function(t) {
+ return t = t.replace(/^[\t\r\n]+|[\t\r\n]+$/g, ""), t = t.replace(/\n\s+\n/g, "\n\n"),
+ t = t.replace(/\n{3,}/g, "\n\n"), t = o(t);
+ }, s = function(t) {
+ return t = r(t), t ? "**" + t + "**" : "";
+ }, l = function(t) {
+ return t = r(t), t ? "_" + t + "_" : "";
}, c = [ {
selector: "p",
- replacement: function(e) {
- return e = $.trim(e), e ? "\n\n" + e + "\n\n" : "";
+ replacement: function(t, e) {
+ return t = $.trim(t), t ? "\n\n" + t + "\n\n" : "";
}
}, {
selector: "br",
- replacement: function() {
+ replacement: function(t, e) {
return "\n";
}
}, {
selector: "h1,h2,h3,h4,h5,h6",
- replacement: function(e, t) {
- e = $.trim(e);
- for (var n = t.prop("nodeName").charAt(1), i = "", r = 0; n > r; r++) i += "#";
- return e ? "\n\n" + i + " " + e + "\n\n" : "";
+ replacement: function(t, e) {
+ t = $.trim(t);
+ for (var n = e.prop("nodeName").charAt(1), i = "", r = 0; r < n; r++) i += "#";
+ return t ? "\n\n" + i + " " + t + "\n\n" : "";
}
}, {
selector: "hr",
- replacement: function() {
+ replacement: function(t, e) {
return "\n\n* * *\n\n";
}
}, {
selector: "a[href]",
- replacement: function(e, t) {
- if (e) {
- e = r(e);
- var n = t.attr("href"), i = t.attr("title") || "";
- return "[" + e + "](" + n + (i ? ' "' + i + '"' : "") + ")";
+ replacement: function(t, e) {
+ if (t) {
+ t = r(t);
+ var n = e.attr("href"), i = e.attr("title") || "";
+ return "[" + t + "](" + n + (i ? ' "' + i + '"' : "") + ")";
}
return !1;
}
@@ -14078,242 +14079,242 @@ function() {
replacement: l
}, {
selector: "code",
- replacement: function(e) {
- return e = r(e), e ? "`" + e + "`" : "";
+ replacement: function(t, e) {
+ return t = r(t), t ? "`" + t + "`" : "";
}
}, {
selector: "img",
- replacement: function(e, t) {
- var n = t.attr("alt") || "", i = t.attr("src") || "", r = t.attr("title") || "";
+ replacement: function(t, e) {
+ var n = e.attr("alt") || "", i = e.attr("src") || "", r = e.attr("title") || "";
return "![" + n + "](" + i + (r ? ' "' + r + '"' : "") + ")";
}
}, {
selector: "pre",
- replacement: function(e) {
- return /^\s*\`/.test(e) ? (e = e.replace(/\`/g, ""), " " + e.replace(/\n/g, "\n ")) : "";
+ replacement: function(t, e) {
+ return /^\s*\`/.test(t) ? (t = t.replace(/\`/g, ""), " " + t.replace(/\n/g, "\n ")) : "";
}
}, {
selector: "li",
- replacement: function(e, t) {
- e = e.replace(/^\s+|\s+$/, "").replace(/\n/gm, "\n ");
- var n = "* ", i = "", r = t.parent(), o = r.contents().filter(function() {
+ replacement: function(t, e) {
+ t = t.replace(/^\s+|\s+$/, "").replace(/\n/gm, "\n ");
+ var n = "* ", i = "", r = e.parent(), o = r.contents().filter(function() {
return 1 === this.nodeType && "LI" === this.nodeName || 3 === this.nodeType;
- }), a = o.index(t) + 1;
- return n = r.is("ol") ? a + ". " : "* ", a == o.length && (t.parents("li").length || (i = "\n"),
- e = e.replace(/\s+$/, ""), t.unwrap()), n + e + i + "\n";
+ }), a = o.index(e) + 1;
+ return n = r.is("ol") ? a + ". " : "* ", a == o.length && (e.parents("li").length || (i = "\n"),
+ t = t.replace(/\s+$/, ""), e.unwrap()), n + t + i + "\n";
}
}, {
selector: "blockquote",
- replacement: function(e) {
- return e = e = $.trim(e).replace(/\n{3,}/g, "\n\n"), "> " + (e = e.replace(/\n/g, "\n> "));
+ replacement: function(t, e) {
+ return t = t = $.trim(t).replace(/\n{3,}/g, "\n\n"), "> " + (t = t.replace(/\n/g, "\n> "));
}
} ];
-}(), define("toMarkdown", [ "jquery" ], function(e) {
+}(), define("toMarkdown", [ "jquery" ], function(t) {
return function() {
- return e.toMarkdown;
+ return t.toMarkdown;
};
-}(this)), define("extensions/dialogOpenHarddrive", [ "jquery", "underscore", "constants", "utils", "classes/Extension", "toMarkdown" ], function(e, t, n, i, r, o) {
+}(this)), define("extensions/dialogOpenHarddrive", [ "jquery", "underscore", "constants", "utils", "classes/Extension", "toMarkdown" ], function(t, e, n, i, r, o) {
function a(i) {
i.stopPropagation(), i.preventDefault();
var r = (i.dataTransfer || i.target).files;
- e(".modal-import-harddrive-markdown, .modal-import-harddrive-html").modal("hide"),
- t.each(r, function(t) {
- if (!e(i.target).is("#wmd-input *") || !t.name.match(/.(jpe?g|png|gif)$/i)) {
+ t(".modal-import-harddrive-markdown, .modal-import-harddrive-html").modal("hide"),
+ e.each(r, function(e) {
+ if (!t(i.target).is("#wmd-input *") || !e.name.match(/.(jpe?g|png|gif)$/i)) {
var r = new FileReader();
- r.onload = function(e) {
- return function(t) {
- var n = t.target.result;
- if (n.match(/\uFFFD/)) return void p.onError(e.name + " is a binary file.");
- if (void 0 === (n = h ? h(n) : n)) return void p.onError(e.name + " is not a valid HTML file.");
- var i = e.name, r = i.lastIndexOf(".");
+ r.onload = function(t) {
+ return function(e) {
+ var n = e.target.result;
+ if (n.match(/\uFFFD/)) return void p.onError(t.name + " is a binary file.");
+ if (void 0 === (n = h ? h(n) : n)) return void p.onError(t.name + " is not a valid HTML file.");
+ var i = t.name, r = i.lastIndexOf(".");
i = -1 !== r ? i.substring(0, r) : i;
var o = u.createFile(i, n);
u.selectFile(o);
};
- }(t);
- var o = t.slice(0, n.IMPORT_FILE_MAX_CONTENT_SIZE);
+ }(e);
+ var o = e.slice(0, n.IMPORT_FILE_MAX_CONTENT_SIZE);
r.readAsText(o);
}
});
}
- function s(e) {
- h = void 0, a(e);
+ function s(t) {
+ h = void 0, a(t);
}
- function l(e) {
- h = m, a(e);
+ function l(t) {
+ h = m, a(t);
}
- function c(e) {
- e.stopPropagation(), e.preventDefault(), e.dataTransfer.dropEffect = "copy";
+ function c(t) {
+ t.stopPropagation(), t.preventDefault(), t.dataTransfer.dropEffect = "copy";
}
var u, d = new r("dialogOpenHarddrive", 'Dialog "Open from"');
- d.onFileMgrCreated = function(e) {
- u = e;
+ d.onFileMgrCreated = function(t) {
+ u = t;
};
var p;
- d.onEventMgrCreated = function(e) {
- p = e;
+ d.onEventMgrCreated = function(t) {
+ p = t;
};
- var h, f, m = function(e) {
- return f.makeMd(e);
+ var h, f, m = function(t) {
+ return f.makeMd(t);
};
return d.onReady = function() {
- f = new o.converter(), e("#input-file-import-harddrive-markdown").change(s), e("#dropzone-import-harddrive-markdown, #wmd-input").each(function() {
+ f = new o.converter(), t("#input-file-import-harddrive-markdown").change(s), t("#dropzone-import-harddrive-markdown, #wmd-input").each(function() {
this.addEventListener("dragover", c, !1), this.addEventListener("drop", s, !1);
- }), e("#input-file-import-harddrive-html").change(l), e("#dropzone-import-harddrive-html").each(function() {
+ }), t("#input-file-import-harddrive-html").change(l), t("#dropzone-import-harddrive-html").each(function() {
this.addEventListener("dragover", c, !1), this.addEventListener("drop", l, !1);
- }), e(".action-convert-html").click(function(e) {
- var t = i.getInputTextValue("#input-convert-html", e);
- if (void 0 !== t) {
- if (void 0 === (t = f.makeMd(t))) return void p.onError("Invalid HTML code.");
- var n = u.createFile(void 0, t);
+ }), t(".action-convert-html").click(function(t) {
+ var e = i.getInputTextValue("#input-convert-html", t);
+ if (void 0 !== e) {
+ if (void 0 === (e = f.makeMd(e))) return void p.onError("Invalid HTML code.");
+ var n = u.createFile(void 0, e);
u.selectFile(n);
}
});
}, d;
-}), define("extensions/documentTitle", [ "jquery", "underscore", "classes/Extension" ], function(e, t, n) {
- var i, r, o = new n("documentTitle", "Document Title"), a = t.debounce(function(t) {
- if (t === i) {
+}), define("extensions/documentTitle", [ "jquery", "underscore", "classes/Extension" ], function(t, e, n) {
+ var i, r, o = new n("documentTitle", "Document Title"), a = e.debounce(function(e) {
+ if (e === i) {
var n = i.title;
- r.html(i.composeTitle(!0)), e(".file-title").text(n), e(".input-file-title").val(n);
+ r.html(i.composeTitle(!0)), t(".file-title").text(n), t(".input-file-title").val(n);
}
}, 50);
- return o.onFileSelected = function(e) {
- i = e, a(e);
+ return o.onFileSelected = function(t) {
+ i = t, a(t);
}, o.onTitleChanged = a, o.onSyncExportSuccess = a, o.onSyncRemoved = a, o.onNewPublishSuccess = a,
o.onPublishRemoved = a, o.onReady = a, o.onReady = function() {
- r = e(".file-title-navbar"), r.hover(function() {
- var e = r[0].scrollWidth - r.outerWidth();
+ r = t(".file-title-navbar"), r.hover(function() {
+ var t = r[0].scrollWidth - r.outerWidth();
r.stop(!0, !0).animate({
- scrollLeft: e
- }, 15 * e, "linear");
+ scrollLeft: t
+ }, 15 * t, "linear");
}, function() {
r.stop(!0, !0).scrollLeft(0);
}).click(function() {
r.stop(!0, !0).scrollLeft(0);
});
}, o;
-}), define("classes/FileDescriptor", [ "underscore", "utils", "storage" ], function(e, t, n) {
- function i(e, t, i, r) {
- this.fileIndex = e, this._title = t || n[e + ".title"], this._editorScrollTop = parseInt(n[e + ".editorScrollTop"]) || 0,
- this._editorStart = parseInt(n[e + ".editorEnd"]) || 0, this._editorEnd = parseInt(n[e + ".editorEnd"]) || 0,
- this._previewScrollTop = parseInt(n[e + ".previewScrollTop"]) || 0, this._selectTime = parseInt(n[e + ".selectTime"]) || 0,
- this._discussionList = JSON.parse(n[e + ".discussionList"] || "{}"), this.syncLocations = i || {},
+}), define("classes/FileDescriptor", [ "underscore", "utils", "storage" ], function(t, e, n) {
+ function i(t, e, i, r) {
+ this.fileIndex = t, this._title = e || n[t + ".title"], this._editorScrollTop = parseInt(n[t + ".editorScrollTop"]) || 0,
+ this._editorStart = parseInt(n[t + ".editorEnd"]) || 0, this._editorEnd = parseInt(n[t + ".editorEnd"]) || 0,
+ this._previewScrollTop = parseInt(n[t + ".previewScrollTop"]) || 0, this._selectTime = parseInt(n[t + ".selectTime"]) || 0,
+ this._discussionList = JSON.parse(n[t + ".discussionList"] || "{}"), this.syncLocations = i || {},
this.publishLocations = r || {}, Object.defineProperty(this, "title", {
get: function() {
return this._title;
},
- set: function(e) {
- this._title = e, n[this.fileIndex + ".title"] = e;
+ set: function(t) {
+ this._title = t, n[this.fileIndex + ".title"] = t;
}
}), Object.defineProperty(this, "content", {
get: function() {
return n[this.fileIndex + ".content"];
},
- set: function(e) {
- n[this.fileIndex + ".content"] = e;
+ set: function(t) {
+ n[this.fileIndex + ".content"] = t;
}
}), Object.defineProperty(this, "editorScrollTop", {
get: function() {
return this._editorScrollTop;
},
- set: function(e) {
- this._editorScrollTop = e, n[this.fileIndex + ".editorScrollTop"] = e;
+ set: function(t) {
+ this._editorScrollTop = t, n[this.fileIndex + ".editorScrollTop"] = t;
}
}), Object.defineProperty(this, "editorStart", {
get: function() {
return this._editorStart;
},
- set: function(e) {
- this._editorStart = e, n[this.fileIndex + ".editorStart"] = e;
+ set: function(t) {
+ this._editorStart = t, n[this.fileIndex + ".editorStart"] = t;
}
}), Object.defineProperty(this, "editorEnd", {
get: function() {
return this._editorEnd;
},
- set: function(e) {
- this._editorEnd = e, n[this.fileIndex + ".editorEnd"] = e;
+ set: function(t) {
+ this._editorEnd = t, n[this.fileIndex + ".editorEnd"] = t;
}
}), Object.defineProperty(this, "previewScrollTop", {
get: function() {
return this._previewScrollTop;
},
- set: function(e) {
- this._previewScrollTop = e, n[this.fileIndex + ".previewScrollTop"] = e;
+ set: function(t) {
+ this._previewScrollTop = t, n[this.fileIndex + ".previewScrollTop"] = t;
}
}), Object.defineProperty(this, "selectTime", {
get: function() {
return this._selectTime;
},
- set: function(e) {
- this._selectTime = e, n[this.fileIndex + ".selectTime"] = e;
+ set: function(t) {
+ this._selectTime = t, n[this.fileIndex + ".selectTime"] = t;
}
}), Object.defineProperty(this, "discussionList", {
get: function() {
return this._discussionList;
},
- set: function(e) {
- this._discussionList = e, n[this.fileIndex + ".discussionList"] = JSON.stringify(e);
+ set: function(t) {
+ this._discussionList = t, n[this.fileIndex + ".discussionList"] = JSON.stringify(t);
}
}), Object.defineProperty(this, "discussionListJSON", {
get: function() {
return n[this.fileIndex + ".discussionList"] || "{}";
},
- set: function(e) {
- this._discussionList = JSON.parse(e), n[this.fileIndex + ".discussionList"] = e;
+ set: function(t) {
+ this._discussionList = JSON.parse(t), n[this.fileIndex + ".discussionList"] = t;
}
});
}
- function r(e, t) {
- e.push('');
+ function r(t, e) {
+ t.push('');
}
- function o(e, t) {
- if (t.provider.getSyncLocationLink) {
- var n = t.provider.getSyncLocationLink(t);
- e.push([ '' ].join(""));
- } else r(e, t);
+ function o(t, e) {
+ if (e.provider.getSyncLocationLink) {
+ var n = e.provider.getSyncLocationLink(e);
+ t.push([ '' ].join(""));
+ } else r(t, e);
}
- function a(e, t) {
- if (t.provider.getPublishLocationLink) {
- var n = t.provider.getPublishLocationLink(t);
- e.push([ '' ].join(""));
- } else r(e, t);
+ function a(t, e) {
+ if (e.provider.getPublishLocationLink) {
+ var n = e.provider.getPublishLocationLink(e);
+ t.push([ '' ].join(""));
+ } else r(t, e);
}
- return i.prototype.addSyncLocation = function(e) {
- t.storeAttributes(e), t.appendIndexToArray(this.fileIndex + ".sync", e.syncIndex),
- this.syncLocations[e.syncIndex] = e;
- }, i.prototype.removeSyncLocation = function(e) {
- t.removeIndexFromArray(this.fileIndex + ".sync", e.syncIndex), delete this.syncLocations[e.syncIndex];
- }, i.prototype.addPublishLocation = function(e) {
- t.storeAttributes(e), t.appendIndexToArray(this.fileIndex + ".publish", e.publishIndex),
- this.publishLocations[e.publishIndex] = e;
- }, i.prototype.removePublishLocation = function(e) {
- t.removeIndexFromArray(this.fileIndex + ".publish", e.publishIndex), delete this.publishLocations[e.publishIndex];
- }, i.prototype.composeTitle = function(t) {
- var n = [], i = t ? o : r, s = t ? a : r;
- return e.chain(this.syncLocations).sortBy(function(e) {
- return e.provider.providerId;
- }).each(function(e) {
- i(n, e);
- }), 0 !== e.size(this.syncLocations) && n.push(''),
- e.chain(this.publishLocations).sortBy(function(e) {
- return e.provider.providerId;
- }).each(function(e) {
- s(n, e);
- }), 0 !== e.size(this.publishLocations) && n.push(''),
- n.push(e.escape(this.title)), n.join("");
+ return i.prototype.addSyncLocation = function(t) {
+ e.storeAttributes(t), e.appendIndexToArray(this.fileIndex + ".sync", t.syncIndex),
+ this.syncLocations[t.syncIndex] = t;
+ }, i.prototype.removeSyncLocation = function(t) {
+ e.removeIndexFromArray(this.fileIndex + ".sync", t.syncIndex), delete this.syncLocations[t.syncIndex];
+ }, i.prototype.addPublishLocation = function(t) {
+ e.storeAttributes(t), e.appendIndexToArray(this.fileIndex + ".publish", t.publishIndex),
+ this.publishLocations[t.publishIndex] = t;
+ }, i.prototype.removePublishLocation = function(t) {
+ e.removeIndexFromArray(this.fileIndex + ".publish", t.publishIndex), delete this.publishLocations[t.publishIndex];
+ }, i.prototype.composeTitle = function(e) {
+ var n = [], i = e ? o : r, s = e ? a : r;
+ return t.chain(this.syncLocations).sortBy(function(t) {
+ return t.provider.providerId;
+ }).each(function(t) {
+ i(n, t);
+ }), 0 !== t.size(this.syncLocations) && n.push(''),
+ t.chain(this.publishLocations).sortBy(function(t) {
+ return t.provider.providerId;
+ }).each(function(t) {
+ s(n, t);
+ }), 0 !== t.size(this.publishLocations) && n.push(''),
+ n.push(t.escape(this.title)), n.join("");
}, i;
-}), define("fileSystem", [ "underscore", "utils", "classes/FileDescriptor", "storage" ], function(e, t, n, i) {
+}), define("fileSystem", [ "underscore", "utils", "classes/FileDescriptor", "storage" ], function(t, e, n, i) {
var r = {};
- return t.retrieveIndexArray("file.list").forEach(function(e) {
- r[e] = new n(e);
- }), Object.keys(i).forEach(function(e) {
- var t = e.match(/(file\.\S+?)\.\S+/);
- t && !r.hasOwnProperty(t[1]) && i.removeItem(e);
+ return e.retrieveIndexArray("file.list").forEach(function(t) {
+ r[t] = new n(t);
+ }), Object.keys(i).forEach(function(t) {
+ var e = t.match(/(file\.\S+?)\.\S+/);
+ e && !r.hasOwnProperty(e[1]) && i.removeItem(t);
}), r;
}), define("text!html/documentSelectorSettingsBlock.html", [], function() {
- return '
Allows toggling document with keyboard shortcuts.
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n
\n
\n
';
-}), define("extensions/documentSelector", [ "jquery", "underscore", "crel", "utils", "classes/Extension", "mousetrap", "fileSystem", "text!html/documentSelectorSettingsBlock.html" ], function(e, t, n, i, r, o, a, s) {
- var l = new r("documentSelector", "Document Selector", !0);
+ return '
Allows toggling document with keyboard shortcuts.
\n
\n\t
\n\t\t\n\t\t
\n\t\t\t\n\t\t
\n\t
\n\t
\n\t\t\n\t\t
\n\t\t\t\n\t\t
\n\t
\n\t
\n\t\t\n\t\t
\n\t\t\t\n\t\t
\n\t
\n
';
+}), define("extensions/documentSelector", [ "jquery", "underscore", "crel", "utils", "classes/Extension", "mousetrap", "fileSystem", "text!html/documentSelectorSettingsBlock.html" ], function(t, e, n, i, r, o, a, s) {
+ var l = new r("documentSelector", "Document Selector", (!0));
l.settingsBlock = s, l.defaultConfig = {
orderBy: "mru",
shortcutPrevious: "Ctrl+[",
@@ -14321,43 +14322,43 @@ function() {
}, l.onLoadSettings = function() {
i.setInputValue("#select-document-selector-orderby", l.config.orderBy), i.setInputValue("#input-document-selector-shortcut-previous", l.config.shortcutPrevious),
i.setInputValue("#input-document-selector-shortcut-next", l.config.shortcutNext);
- }, l.onSaveSettings = function(e, t) {
- e.orderBy = i.getInputValue("#select-document-selector-orderby"), e.shortcutPrevious = i.getInputTextValue("#input-document-selector-shortcut-previous", t),
- e.shortcutNext = i.getInputTextValue("#input-document-selector-shortcut-next", t);
+ }, l.onSaveSettings = function(t, e) {
+ t.orderBy = i.getInputValue("#select-document-selector-orderby"), t.shortcutPrevious = i.getInputTextValue("#input-document-selector-shortcut-previous", e),
+ t.shortcutNext = i.getInputTextValue("#input-document-selector-shortcut-next", e);
};
var c;
- l.onFileMgrCreated = function(e) {
- c = e;
+ l.onFileMgrCreated = function(t) {
+ c = t;
};
- var u, d, p, h, f, m, g, v = [ '
" ].join(""), b = t.debounce(function() {
- var n = t.chain(a).sortBy(h).reduce(function(e, n) {
- return e + t.template(v, {
+ var u, d, p, h, f, m, g, v = [ '
Note: The mapping between Markdown and HTML is based on the\n position of the title elements (h1, h2...) in the page. Therefore if\n your document does not contain any title, the mapping will be linear and\n consequently less accurate.
\n
";
-}), define("extensions/scrollSync", [ "jquery", "underscore", "classes/Extension", "text!html/scrollSyncSettingsBlock.html" ], function(e, t, n, i) {
- function r(e, n, i) {
- var r, o = t.find(n, function(t, n) {
- return r = n, e < t.endOffset;
+ return "
Binds together editor and preview scrollbars.
\n
\n\t
Note: The mapping between Markdown and HTML is based on the\n\tposition of the title elements (h1, h2...) in the page. Therefore if\n\tyour document does not contain any title, the mapping will be linear and\n\tconsequently less accurate.
\n
";
+}), define("extensions/scrollSync", [ "jquery", "underscore", "classes/Extension", "text!html/scrollSyncSettingsBlock.html" ], function(t, e, n, i) {
+ function r(t, n, i) {
+ var r, o = e.find(n, function(e, n) {
+ return r = n, t < e.endOffset;
});
if (void 0 !== o) {
- var a = (e - o.startOffset) / (o.height || 1), s = i[r];
+ var a = (t - o.startOffset) / (o.height || 1), s = i[r];
return s.startOffset + s.height * a;
}
}
- function o(e, t, n, i, r) {
+ function o(t, e, n, i, r) {
function o() {
var l = Date.now(), c = (l - s) / 200;
- if (1 > c) {
- var u = t + a * Math.cos((1 - c) * Math.PI / 2);
- e.scrollTop = u, i(u), p = setTimeout(o, 1);
- } else h = void 0, e.scrollTop = n, setTimeout(r, 100);
+ if (c < 1) {
+ var u = e + a * Math.cos((1 - c) * Math.PI / 2);
+ t.scrollTop = u, i(u), p = setTimeout(o, 1);
+ } else h = void 0, t.scrollTop = n, setTimeout(r, 100);
}
h && (clearTimeout(p), h()), h = r;
- var a = n - t, s = Date.now();
+ var a = n - e, s = Date.now();
o();
}
- var a = new n("scrollSync", "Scroll Sync", !0, !0);
+ var a = new n("scrollSync", "Scroll Sync", (!0), (!0));
a.settingsBlock = i;
var s;
- a.onSectionsCreated = function(e) {
- s = e;
+ a.onSectionsCreated = function(t) {
+ s = t;
};
- var l, c, u, d, p, h, f = [], m = [], g = t.debounce(function() {
+ var l, c, u, d, p, h, f = [], m = [], g = e.debounce(function() {
f = [];
- var e, n;
- t.each(l.querySelectorAll(".wmd-input-section"), function(t) {
- if (void 0 === e) return void (e = 0);
- t = t.firstChild;
- var n = t.offsetTop;
+ var t, n;
+ e.each(l.querySelectorAll(".wmd-input-section"), function(e) {
+ if (void 0 === t) return void (t = 0);
+ e = e.firstChild;
+ var n = e.offsetTop;
f.push({
- startOffset: e,
+ startOffset: t,
endOffset: n,
- height: n - e
- }), e = n;
+ height: n - t
+ }), t = n;
}), n = l.scrollHeight, f.push({
- startOffset: e,
+ startOffset: t,
endOffset: n,
- height: n - e
+ height: n - t
}), m = [];
var i;
- t.each(c.querySelectorAll(".wmd-preview-section"), function(e) {
+ e.each(c.querySelectorAll(".wmd-preview-section"), function(t) {
if (void 0 === i) return void (i = 0);
- var t = e.offsetTop;
+ var e = t.offsetTop;
m.push({
startOffset: i,
- endOffset: t,
- height: t - i
- }), i = t;
+ endOffset: e,
+ height: e - i
+ }), i = e;
}), n = c.scrollHeight, m.push({
startOffset: i,
endOffset: n,
height: n - i
}), u = -10, d = -10, S();
- }, 500), v = !0, b = !1, y = !1, x = !1, w = !1, S = t.throttle(function() {
+ }, 500), v = !0, b = !1, y = !1, x = !1, w = !1, S = e.throttle(function() {
if (v && 0 !== f.length && f.length === m.length) {
- var e = l.scrollTop;
- 0 > e && (e = 0);
+ var t = l.scrollTop;
+ t < 0 && (t = 0);
var n, i = c.scrollTop;
if (!0 === b) {
- if (Math.abs(e - u) <= 9) return;
- if (b = !1, u = e, n = r(e, f, m), n = t.min([ n, c.scrollHeight - c.offsetHeight ]),
+ if (Math.abs(t - u) <= 9) return;
+ if (b = !1, u = t, n = r(t, f, m), n = e.min([ n, c.scrollHeight - c.offsetHeight ]),
Math.abs(n - i) <= 9) return void (d = i);
- o(c, i, n, function(e) {
- w = !0, d = e;
+ o(c, i, n, function(t) {
+ w = !0, d = t;
}, function() {
w = !1;
});
} else if (!0 === y) {
if (Math.abs(i - d) <= 9) return;
- if (y = !1, d = i, n = r(i, m, f), n = t.min([ n, l.scrollHeight - l.offsetHeight ]),
- Math.abs(n - e) <= 9) return void (u = e);
- o(l, e, n, function(e) {
- x = !0, u = e;
+ if (y = !1, d = i, n = r(i, m, f), n = e.min([ n, l.scrollHeight - l.offsetHeight ]),
+ Math.abs(n - t) <= 9) return void (u = t);
+ o(l, t, n, function(t) {
+ x = !0, u = t;
}, function() {
x = !1;
});
@@ -19745,17 +19746,17 @@ function() {
var C = !1;
a.onReady = function() {
c = document.querySelector(".preview-container"), l = document.querySelector("#wmd-input"),
- e(c).scroll(function() {
+ t(c).scroll(function() {
!1 === w && !1 === C && (y = !0, b = !1, S()), C = !1;
- }), e(l).scroll(function() {
+ }), t(l).scroll(function() {
!1 === x && (b = !0, y = !1, S());
- }), e(".preview-panel").on("hide.layout.toggle", function() {
+ }), t(".preview-panel").on("hide.layout.toggle", function() {
v = !1;
}).on("shown.layout.toggle", function() {
v = !0;
- }), e(".extension-preview-buttons .table-of-contents").on("click", "a", function(t) {
- t.preventDefault();
- var n = this.hash, i = e(n);
+ }), t(".extension-preview-buttons .table-of-contents").on("click", "a", function(e) {
+ e.preventDefault();
+ var n = this.hash, i = t(n);
if (i.length) {
var o = i[0].getBoundingClientRect().top - c.getBoundingClientRect().top + c.scrollTop;
c.scrollTop = o;
@@ -19765,30 +19766,30 @@ function() {
});
};
var _, k;
- return a.onPagedownConfigure = function(e) {
- _ = document.getElementById("preview-contents"), e.getConverter().hooks.chain("postConversion", function(e) {
- return k = _.offsetHeight, _.style.height = k + "px", e;
+ return a.onPagedownConfigure = function(t) {
+ _ = document.getElementById("preview-contents"), t.getConverter().hooks.chain("postConversion", function(t) {
+ return k = _.offsetHeight, _.style.height = k + "px", t;
});
}, a.onPreviewFinished = function() {
_.style.removeProperty("height");
- var e = _.offsetHeight;
- b = !0, k > e && (C = !0), g();
+ var t = _.offsetHeight;
+ b = !0, t < k && (C = !0), g();
}, a;
}), define("text!html/buttonSyncSettingsBlock.html", [], function() {
- return '
Adds a "Synchronize documents" button in the navigation bar.
\n
\n
\n \n
\n ms\n
\n
\n
\n \n
\n \n
\n
\n
';
-}), define("extensions/buttonSync", [ "jquery", "underscore", "crel", "utils", "classes/Extension", "mousetrap", "text!html/buttonSyncSettingsBlock.html" ], function(e, t, n, i, r, o, a) {
- var s = new r("buttonSync", 'Button "Synchronize"', !1, !0);
+ return '
Adds a "Synchronize documents" button in the navigation bar.
\n
\n\t
\n\t\t\n\t\t
\n\t\t\t ms\n\t\t
\n\t
\n\t
\n\t\t\n\t\t
\n\t\t\t\n\t\t
\n\t
\n
';
+}), define("extensions/buttonSync", [ "jquery", "underscore", "crel", "utils", "classes/Extension", "mousetrap", "text!html/buttonSyncSettingsBlock.html" ], function(t, e, n, i, r, o, a) {
+ var s = new r("buttonSync", 'Button "Synchronize"', (!1), (!0));
s.settingsBlock = a, s.defaultConfig = {
syncPeriod: 18e4,
syncShortcut: "mod+s"
}, s.onLoadSettings = function() {
i.setInputValue("#input-sync-period", s.config.syncPeriod), i.setInputValue("#input-sync-shortcut", s.config.syncShortcut);
- }, s.onSaveSettings = function(e, t) {
- e.syncPeriod = i.getInputIntValue("#input-sync-period", t, 0), e.syncShortcut = i.getInputTextValue("#input-sync-shortcut", t);
+ }, s.onSaveSettings = function(t, e) {
+ t.syncPeriod = i.getInputIntValue("#input-sync-period", e, 0), t.syncShortcut = i.getInputTextValue("#input-sync-shortcut", e);
};
var l;
- s.onSynchronizerCreated = function(e) {
- l = e;
+ s.onSynchronizerCreated = function(t) {
+ l = t;
};
var c, u = !1, d = !1, p = function() {
void 0 !== c && (!0 === u || !1 === l.hasSync() || d ? c.addClass("disabled") : c.removeClass("disabled"));
@@ -19796,63 +19797,63 @@ function() {
return s.onPeriodicRun = function() {
!s.config.syncPeriod || h + s.config.syncPeriod > i.currentTime || l.sync() && (h = i.currentTime);
}, s.onCreateButton = function() {
- var t = n("a", {
+ var e = n("a", {
"class": "btn btn-success button-synchronize",
title: "Force synchronization Ctrl/Cmd+S"
}, n("i", {
"class": "icon-refresh"
}));
- return c = e(t), c.click(function() {
+ return c = t(e), c.click(function() {
c.hasClass("disabled") || l.sync() && (h = i.currentTime);
- }), t;
+ }), e;
}, s.onReady = p, s.onFileCreated = p, s.onFileDeleted = p, s.onSyncImportSuccess = p,
- s.onSyncExportSuccess = p, s.onSyncRemoved = p, s.onSyncRunning = function(e) {
- u = e, p();
- }, s.onOfflineChanged = function(e) {
- d = e, p();
+ s.onSyncExportSuccess = p, s.onSyncRemoved = p, s.onSyncRunning = function(t) {
+ u = t, p();
+ }, s.onOfflineChanged = function(t) {
+ d = t, p();
}, s.onReady = function() {
- o.bind(s.config.syncShortcut, function(e) {
- l.sync() && (h = i.currentTime), e.preventDefault();
- }), e(".action-force-synchronization").click(function() {
+ o.bind(s.config.syncShortcut, function(t) {
+ l.sync() && (h = i.currentTime), t.preventDefault();
+ }), t(".action-force-synchronization").click(function() {
l.sync() && (h = i.currentTime);
});
}, s;
-}), define("extensions/buttonPublish", [ "jquery", "underscore", "crel", "classes/Extension" ], function(e, t, n, i) {
+}), define("extensions/buttonPublish", [ "jquery", "underscore", "crel", "classes/Extension" ], function(t, e, n, i) {
function r() {
void 0 !== o && (!0 === c || !1 === u || !0 === d ? o.addClass("disabled") : o.removeClass("disabled"));
}
var o, a, s, l = new i("buttonPublish", 'Button "Publish"'), c = !1, u = !1, d = !1;
- l.onPublisherCreated = function(e) {
- s = e;
+ l.onPublisherCreated = function(t) {
+ s = t;
}, l.onCreateButton = function() {
- var t = n("a", {
+ var e = n("a", {
"class": "btn btn-success button-publish",
title: "Update document publication"
}, n("i", {
"class": "icon-upload"
}));
- return o = e(t).click(function() {
+ return o = t(e).click(function() {
o.hasClass("disabled") || s.publish();
- }), t;
- }, l.onPublishRunning = function(e) {
- c = e, r();
- }, l.onOfflineChanged = function(e) {
- d = e, r();
+ }), e;
+ }, l.onPublishRunning = function(t) {
+ c = t, r();
+ }, l.onOfflineChanged = function(t) {
+ d = t, r();
};
var p = function() {
- u = 0 !== t.size(a.publishLocations), r();
+ u = 0 !== e.size(a.publishLocations), r();
};
- return l.onFileSelected = function(e) {
- a = e, p();
+ return l.onFileSelected = function(t) {
+ a = t, p();
}, l.onReady = function() {
- e(".action-update-publication").click(s.publish);
+ t(".action-update-publication").click(s.publish);
}, l.onPublishRemoved = p, l.onNewPublishSuccess = p, l;
}), define("text!html/buttonStat.html", [], function() {
- return '\n
Careful:\n You\'re using the public CouchDB instance.\n Anybody can open, edit and delete your files there! To setup your own CouchDB instance click\n here.\n
\n\n
\n
\n \n\n
\n \n Multiple IDs can be provided (space separated)\n
The following documents will be\n removed from CouchDB:
\n\n \n
\n \n
\n
\n
\n\n\n
\n
\n
\n\n
\n \n
Save on CouchDB
\n
\n
\n
Careful:\n You\'re using the public CouchDB instance.\n Anybody can open, edit and delete your files there! To setup your own CouchDB instance click\n here.\n
\n\n
\n This will save "" to CouchDB and keep it synchronized.\n
\n
\n
Tip: You can use a\n YAML front matter to specify tags for your document.
\n
Alternatively, you can place comma separated tags in square brackets at the beginning of the document title.
\n
\n
\n \n
\n
\n
\n\n\n
\n
\n
\n\n
\n \n
Synchronization
\n
\n
\n
\n "" is synchronized with the\n following location(s):\n
\n \n
\n
Note: Removing a synchronized location will not delete any\n file.
\n
\n
\n \n
\n
\n
\n\n\n
\n
\n
\n\n
\n \n
\n Publish on \n
\n
\n
\n
\n
\n \n
\n Host must be accessible publicly,\n unless you\'re hosting your own StackEdit instance.\n \n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n File path is composed of both\n folder and filename. \n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n Jetpack plugin is required for\n self-hosted sites.\n \n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n File path is composed of both\n folder and filename. \n
\n
\n
\n \n
\n If no file ID is supplied, a new file\n will be created in your Google Drive root folder. You can move\n the file afterwards within Google Drive.\n
\n
\n
\n \n
\n If no file name is supplied, the\n document title will be used.\n
Tip: You can use a\n YAML front matter to specify the title of your page.
\n
Interpreted variables:title.
\n
\n
\n
About URL: For newly created page , Blogger API will append a generated number to the url like about-me-1234.html, if you deeply care about your URL naming, you should first create the page on Blogger and then update them with StackEdit specifying the pageId when publishing.\n
\n
About page visibility: Blogger API does not respect published status for pages.When publishing the page to Blogger, the page will be live but not added to the page listing. You should arrange the page listing from Blogger dashboard.\n
\n
\n
\n \n
\n
\n
\n\n\n
\n
\n
\n\n
\n \n
Publication
\n
\n
\n
\n "" is published on the following\n location(s):\n
\n \n
\n
Note: Removing a publish location will not delete the actual publication.
\n
\n
\n \n
\n
\n
\n\n\n
\n
\n
\n\n
\n \n
Sharing
\n
\n
\n
Collaborate on "" using the following link(s):
\n
No sharing link yet!\n
\n \n
\n
Note: To collaborate on this document, just save it on CouchDB.\n To collaborate via Google Drive or Dropbox, you have to share the file manually from Google Drive/Dropbox websites.
\n
\n \n
Share a read-only version of "" using the following link(s):
\n
No sharing link yet!\n
\n \n
\n
Note: To share a read-only version of this document, just publish it as a Gist in\n Markdown format.
\n
\n
\n
Tip: You can open any markdown URL within StackEdit Viewer using viewer#!url=.
Careful:\n You\'re using the public CouchDB instance.\n Anybody can open, edit and delete your files there! To setup your own CouchDB instance click\n here.\n
\n\n
\n
\n \n\n
\n \n Multiple IDs can be provided (space separated)\n
The following documents will be\n removed from CouchDB:
\n\n \n
\n \n
\n
\n
\n\n\n
\n
\n
\n\n
\n \n
Save on CouchDB
\n
\n
\n
Careful:\n You\'re using the public CouchDB instance.\n Anybody can open, edit and delete your files there! To setup your own CouchDB instance click\n here.\n
\n\n
\n This will save "" to CouchDB and keep it synchronized.\n
\n
\n
Tip: You can use a\n YAML front matter to specify tags for your document.
\n
Alternatively, you can place comma separated tags in square brackets at the beginning of the document title.
\n
\n
\n \n
\n
\n
\n\n\n
\n\t
\n\t\t
\n\n\t\t\t
\n\t\t\t\t\n\t\t\t\t
Synchronization
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t"" is synchronized with the\n\t\t\t\t\tfollowing location(s):\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
Note: Removing a synchronized location will not delete any\n\t\t\t\t\tfile.
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\t
\n\t
\n
\n\n\n
\n\t
\n\t\t
\n\n\t\t\t
\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\tPublish on \n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t Host must be accessible publicly,\n\t\t\t\t\t\t\t\tunless you\'re hosting your own StackEdit instance.\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t File path is composed of both\n\t\t\t\t\t\t\t\tfolder and filename. \n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tJetpack plugin is required for\n\t\t\t\t\t\t\t\tself-hosted sites.\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t File path is composed of both\n\t\t\t\t\t\t\t\tfolder and filename. \n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t If no file ID is supplied, a new file\n\t\t\t\t\t\t\t\twill be created in your Google Drive root folder. You can move\n\t\t\t\t\t\t\t\tthe file afterwards within Google Drive.\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t If no file name is supplied, the\n\t\t\t\t\t\t\t\tdocument title will be used.\n\t\t\t\t\t\t
Tip: You can use a\n YAML front matter to specify the title of your page.
\n
Interpreted variables:title.
\n\t\t\t\t
\n\t\t\t\t
\n
About URL: For newly created page , Blogger API will append a generated number to the url like about-me-1234.html, if you deeply care about your URL naming, you should first create the page on Blogger and then update them with StackEdit specifying the pageId when publishing.\n
\n
About page visibility: Blogger API does not respect published status for pages.When publishing the page to Blogger, the page will be live but not added to the page listing. You should arrange the page listing from Blogger dashboard.\n
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\t
\n\t
\n
\n\n\n
\n\t
\n\t\t
\n\n\t\t\t
\n\t\t\t\t\n\t\t\t\t
Publication
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t"" is published on the following\n\t\t\t\t\tlocation(s):\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
Note: Removing a publish location will not delete the actual publication.
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\t
\n\t
\n
\n\n\n
\n\t
\n\t\t
\n\n\t\t\t
\n\t\t\t\t\n\t\t\t\t
Sharing
\n\t\t\t
\n\t\t\t
\n
Collaborate on "" using the following link(s):
\n \t
No sharing link yet!\n \t
\n \n \t
\n
Note: To collaborate on this document, just save it on CouchDB.\n To collaborate via Google Drive or Dropbox, you have to share the file manually from Google Drive/Dropbox websites.
\n \t
\n \n
Share a read-only version of "" using the following link(s):
\n \t
No sharing link yet!\n \t
\n \n \t
\n
Note: To share a read-only version of this document, just publish it as a Gist in\n Markdown format.
\n \t
\n \t
\n \t\t
Tip: You can open any markdown URL within StackEdit Viewer using viewer#!url=.
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tPlease sign in first with Google. Once linked with your Google accounts, changing account is not possible unless you reset the application.\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n \n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t Existing authorization has to be revoked in\n\t\t\t\t\t\t\t\t\t\tGoogle Dashboard\n\t\t\t\t\t\t\t\t\t\tfor this change to take effect.\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t If unchecked, access will be restricted to folder\n\t\t\t\t\t\t\t\t\t\t/Applications/StackEdit for existing files.\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t Existing authorization has to be revoked in\n\t\t\t\t\t\t\t\t\t\tGitHub settings\n\t\t\t\t\t\t\t\t\t\tfor this change to take effect.\n\t\t\t\t\t\t\t\t\t
');
+ n.find("a").click(_), e.insertBefore(n[0], e.firstChild), j = j.add(n);
});
});
}, 3e3);
return c.addListener("onOfflineChanged", $), c.addListener("onReady", function() {
- function n(e) {
- if (e = e || "default", r != e) {
- var t = "less!themes/" + e;
- -1 !== window.baseDir.indexOf("-min") && (t = "css!themes/" + e), requirejs.undef(t),
- require([ t ]), r = e;
+ function n(t) {
+ if (t = t || "default", r != t) {
+ var e = "less!themes/" + t;
+ -1 !== window.baseDir.indexOf("-min") && (e = "css!themes/" + t), requirejs.undef(e),
+ require([ e ]), r = t;
}
}
- e(document.body).on("shown.bs.modal", ".modal", function() {
- var t = e(this);
+ t(document.body).on("shown.bs.modal", ".modal", function() {
+ var e = t(this);
setTimeout(function() {
- t.find(".btn:first").focus(), t.find("button:first").focus(), t.find("input:enabled:visible:first").focus();
+ e.find(".btn:first").focus(), e.find("button:first").focus(), e.find("input:enabled:visible:first").focus();
}, 50);
}).on("hidden.bs.modal", ".modal", function() {
i.focus(), n(window.theme);
- }).on("keypress", ".modal", function(t) {
- 13 != t.which || e(t.target).is("textarea") || e(this).find(".modal-footer a:last").click();
- }), e(".action-insert-link").click(function(t) {
- var n = a.getInputTextValue(e("#input-insert-link"), t);
+ }).on("keypress", ".modal", function(e) {
+ 13 != e.which || t(e.target).is("textarea") || t(this).find(".modal-footer a:last").click();
+ }), t(".action-insert-link").click(function(e) {
+ var n = a.getInputTextValue(t("#input-insert-link"), e);
void 0 !== n && (T.insertLinkCallback(n), T.insertLinkCallback = void 0);
- }), e(".action-insert-image").click(function(t) {
- var n = a.getInputTextValue(e("#input-insert-image"), t);
+ }), t(".action-insert-image").click(function(e) {
+ var n = a.getInputTextValue(t("#input-insert-image"), e);
void 0 !== n && (T.insertLinkCallback(n), T.insertLinkCallback = void 0);
- }), e(".modal-insert-link, .modal-insert-image").on("hidden.bs.modal", function() {
+ }), t(".modal-insert-link, .modal-insert-image").on("hidden.bs.modal", function() {
void 0 !== T.insertLinkCallback && (T.insertLinkCallback(null), T.insertLinkCallback = void 0);
- }), e(".action-load-settings").click(function() {
+ }), t(".action-load-settings").click(function() {
x();
- }), e(".action-apply-settings").click(function(e) {
- w(e), e.isPropagationStopped() || window.location.reload();
- }), e(".action-add-google-drive-account").click(function() {
+ }), t(".action-apply-settings").click(function(t) {
+ w(t), t.isPropagationStopped() || window.location.reload();
+ }), t(".action-add-google-drive-account").click(function() {
3 !== l.gdriveMultiAccount && (l.gdriveMultiAccount++, s.settings = JSON.stringify(l),
window.location.reload());
});
var r = window.theme;
- R = e("#input-settings-theme"), R.on("change", function() {
+ R = t("#input-settings-theme"), R.on("change", function() {
n(this.value);
- }), e(".action-import-docs-settings").click(function() {
- e("#input-file-import-docs-settings").click();
+ }), t(".action-import-docs-settings").click(function() {
+ t("#input-file-import-docs-settings").click();
});
var u;
- if (e("#input-file-import-docs-settings").change(function(n) {
+ if (t("#input-file-import-docs-settings").change(function(n) {
var i = (n.dataTransfer || n.target).files;
- e(".modal-settings").modal("hide"), t.each(i, function(e) {
- var t = new FileReader();
- t.onload = function(e) {
- return function(t) {
+ t(".modal-settings").modal("hide"), e.each(i, function(t) {
+ var e = new FileReader();
+ e.onload = function(t) {
+ return function(e) {
try {
- u = JSON.parse(t.target.result), parseInt(u.version.match(/^v(\d+)$/)[1], 10) > parseInt(s.version.match(/^v(\d+)$/)[1], 10) ? c.onError("Incompatible version. Please upgrade StackEdit.") : n(".modal-import-docs-settings").modal("show");
+ u = JSON.parse(e.target.result), parseInt(u.version.match(/^v(\d+)$/)[1], 10) > parseInt(s.version.match(/^v(\d+)$/)[1], 10) ? c.onError("Incompatible version. Please upgrade StackEdit.") : n(".modal-import-docs-settings").modal("show");
} catch (n) {
- c.onError("Wrong format: " + e.name);
+ c.onError("Wrong format: " + t.name);
}
n("#input-file-import-docs-settings").val("");
};
- }(e), t.readAsText(e);
+ }(t), e.readAsText(t);
});
- }), e(".action-import-docs-settings-confirm").click(function() {
+ }), t(".action-import-docs-settings-confirm").click(function() {
s.clear();
- var e = /^file\.|^folder\.|^publish\.|^settings$|^sync\.|^google\.|^author\.|^themeV4$|^version$/;
- t.each(u, function(t, n) {
- e.test(n) && (s[n] = t);
+ var t = /^file\.|^folder\.|^publish\.|^settings$|^sync\.|^google\.|^author\.|^themeV4$|^version$/;
+ e.each(u, function(e, n) {
+ t.test(n) && (s[n] = e);
}), window.location.reload();
- }), e(".action-export-docs-settings").click(function() {
+ }), t(".action-export-docs-settings").click(function() {
a.saveAs(JSON.stringify(s), "StackEdit local storage.json");
- }), e(".action-default-settings").click(function() {
+ }), t(".action-default-settings").click(function() {
s.removeItem("settings"), s.removeItem("theme"), l.dropboxFullAccess || s.removeItem("dropbox.lastChangeId"),
window.location.reload();
- }), e(".action-app-reset").click(function() {
+ }), t(".action-app-reset").click(function() {
s.clear(), window.location.reload();
- }), e(".action-reset-input").click(function() {
+ }), t(".action-reset-input").click(function() {
a.resetModalInputs();
}), a.createTooltip(".tooltip-lazy-rendering", "Disable preview rendering while typing in order to offload CPU. Refresh preview after 500 ms of inactivity."),
a.createTooltip(".tooltip-default-content", [ "Thanks for supporting StackEdit by adding a backlink in your documents!
", 'NOTE: Backlinks in Stack Exchange Q/A are not welcome.' ].join("")),
a.createTooltip(".tooltip-template", h), a.createTooltip(".tooltip-pdf-options", f),
- e("div.dropdown-menu").click(function(e) {
- e.stopPropagation();
- }), e(".modal-non-unique").modal({
+ t("div.dropdown-menu").click(function(t) {
+ t.stopPropagation();
+ }), t(".modal-non-unique").modal({
backdrop: "static",
keyboard: !1,
show: !1
- }), t.each(document.querySelectorAll("img"), function(t) {
- var n = e(t), i = n.data("stackeditSrc");
+ }), e.each(document.querySelectorAll("img"), function(e) {
+ var n = t(e), i = n.data("stackeditSrc");
i && n.attr("src", window.baseDir + "/img/" + i);
}), !1 === window.viewerMode) {
- var d = t.reduce(o.THEME_LIST, function(e, t, n) {
- return e + '";
+ var d = e.reduce(o.THEME_LIST, function(t, e, n) {
+ return t + '";
}, "");
document.getElementById("input-settings-theme").innerHTML = d;
}
- e(".modal-header").append(' Try StackEdit 5!'),
+ t(".modal-header").append(' Switch to StackEdit 5 now!'),
$();
}), T;
}), define("text!WELCOME.md", [], function() {
- return 'Welcome to StackEdit!\n===================\n\n\nHey! I\'m your first Markdown document in **StackEdit**[^stackedit]. Don\'t delete me, I\'m very helpful! I can be recovered anyway in the **Utils** tab of the **Settings** dialog.\n\n----------\n\n\nDocuments\n-------------\n\nStackEdit stores your documents in your browser, which means all your documents are automatically saved locally and are accessible **offline!**\n\n> **Note:**\n\n> - StackEdit is accessible offline after the application has been loaded for the first time.\n> - Your local documents are not shared between different browsers or computers.\n> - Clearing your browser\'s data may **delete all your local documents!** Make sure your documents are synchronized with **Google Drive** or **Dropbox** (check out the [ Synchronization](#synchronization) section).\n\n#### Create a document\n\nThe document panel is accessible using the button in the navigation bar. You can create a new document by clicking **New document** in the document panel.\n\n#### Switch to another document\n\nAll your local documents are listed in the document panel. You can switch from one to another by clicking a document in the list or you can toggle documents using Ctrl+[ and Ctrl+].\n\n#### Rename a document\n\nYou can rename the current document by clicking the document title in the navigation bar.\n\n#### Delete a document\n\nYou can delete the current document by clicking **Delete document** in the document panel.\n\n#### Export a document\n\nYou can save the current document to a file by clicking **Export to disk** from the menu panel.\n\n> **Tip:** Check out the [ Publish a document](#publish-a-document) section for a description of the different output formats.\n\n\n----------\n\n\nSynchronization\n-------------------\n\nStackEdit can be combined with **Google Drive** and **Dropbox** to have your documents saved in the *Cloud*. The synchronization mechanism takes care of uploading your modifications or downloading the latest version of your documents.\n\n> **Note:**\n\n> - Full access to **Google Drive** or **Dropbox** is required to be able to import any document in StackEdit. Permission restrictions can be configured in the settings.\n> - Imported documents are downloaded in your browser and are not transmitted to a server.\n> - If you experience problems saving your documents on Google Drive, check and optionally disable browser extensions, such as Disconnect.\n\n#### Open a document\n\nYou can open a document from **Google Drive** or the **Dropbox** by opening the **Synchronize** sub-menu and by clicking **Open from...**. Once opened, any modification in your document will be automatically synchronized with the file in your **Google Drive** / **Dropbox** account.\n\n#### Save a document\n\nYou can save any document by opening the **Synchronize** sub-menu and by clicking **Save on...**. Even if your document is already synchronized with **Google Drive** or **Dropbox**, you can export it to a another location. StackEdit can synchronize one document with multiple locations and accounts.\n\n#### Synchronize a document\n\nOnce your document is linked to a **Google Drive** or a **Dropbox** file, StackEdit will periodically (every 3 minutes) synchronize it by downloading/uploading any modification. A merge will be performed if necessary and conflicts will be detected.\n\nIf you just have modified your document and you want to force the synchronization, click the button in the navigation bar.\n\n> **Note:** The button is disabled when you have no document to synchronize.\n\n#### Manage document synchronization\n\nSince one document can be synchronized with multiple locations, you can list and manage synchronized locations by clicking **Manage synchronization** in the **Synchronize** sub-menu. This will let you remove synchronization locations that are associated to your document.\n\n> **Note:** If you delete the file from **Google Drive** or from **Dropbox**, the document will no longer be synchronized with that location.\n\n----------\n\n\nPublication\n-------------\n\nOnce you are happy with your document, you can publish it on different websites directly from StackEdit. As for now, StackEdit can publish on **Blogger**, **Dropbox**, **Gist**, **GitHub**, **Google Drive**, **Tumblr**, **WordPress** and on any SSH server.\n\n#### Publish a document\n\nYou can publish your document by opening the **Publish** sub-menu and by choosing a website. In the dialog box, you can choose the publication format:\n\n- Markdown, to publish the Markdown text on a website that can interpret it (**GitHub** for instance),\n- HTML, to publish the document converted into HTML (on a blog for example),\n- Template, to have a full control of the output.\n\n> **Note:** The default template is a simple webpage wrapping your document in HTML format. You can customize it in the **Advanced** tab of the **Settings** dialog.\n\n#### Update a publication\n\nAfter publishing, StackEdit will keep your document linked to that publication which makes it easy for you to update it. Once you have modified your document and you want to update your publication, click on the button in the navigation bar.\n\n> **Note:** The button is disabled when your document has not been published yet.\n\n#### Manage document publication\n\nSince one document can be published on multiple locations, you can list and manage publish locations by clicking **Manage publication** in the menu panel. This will let you remove publication locations that are associated to your document.\n\n> **Note:** If the file has been removed from the website or the blog, the document will no longer be published on that location.\n\n----------\n\n\nMarkdown Extra\n--------------------\n\nStackEdit supports **Markdown Extra**, which extends **Markdown** syntax with some nice features.\n\n> **Tip:** You can disable any **Markdown Extra** feature in the **Extensions** tab of the **Settings** dialog.\n\n> **Note:** You can find more information about **Markdown** syntax [here][2] and **Markdown Extra** extension [here][3].\n\n\n### Tables\n\n**Markdown Extra** has a special syntax for tables:\n\nItem | Value\n-------- | ---\nComputer | $1600\nPhone | $12\nPipe | $1\n\nYou can specify column alignment with one or two colons:\n\n| Item | Value | Qty |\n| :------- | ----: | :---: |\n| Computer | $1600 | 5 |\n| Phone | $12 | 12 |\n| Pipe | $1 | 234 |\n\n\n### Definition Lists\n\n**Markdown Extra** has a special syntax for definition lists too:\n\nTerm 1\nTerm 2\n: Definition A\n: Definition B\n\nTerm 3\n\n: Definition C\n\n: Definition D\n\n > part of definition D\n\n\n### Fenced code blocks\n\nGitHub\'s fenced code blocks are also supported with **Highlight.js** syntax highlighting:\n\n```\n// Foo\nvar bar = 0;\n```\n\n> **Tip:** To use **Prettify** instead of **Highlight.js**, just configure the **Markdown Extra** extension in the **Settings** dialog.\n\n> **Note:** You can find more information:\n\n> - about **Prettify** syntax highlighting [here][5],\n> - about **Highlight.js** syntax highlighting [here][6].\n\n\n### Footnotes\n\nYou can create footnotes like this[^footnote].\n\n [^footnote]: Here is the *text* of the **footnote**.\n\n\n### SmartyPants\n\nSmartyPants converts ASCII punctuation characters into "smart" typographic punctuation HTML entities. For example:\n\n| | ASCII | HTML |\n ----------------- | ---------------------------- | ------------------\n| Single backticks | `\'Isn\'t this fun?\'` | \'Isn\'t this fun?\' |\n| Quotes | `"Isn\'t this fun?"` | "Isn\'t this fun?" |\n| Dashes | `-- is en-dash, --- is em-dash` | -- is en-dash, --- is em-dash |\n\n\n### Table of contents\n\nYou can insert a table of contents using the marker `[TOC]`:\n\n[TOC]\n\n\n### MathJax\n\nYou can render *LaTeX* mathematical expressions using **MathJax**, as on [math.stackexchange.com][1]:\n\nThe *Gamma function* satisfying $\\Gamma(n) = (n-1)!\\quad\\forall n\\in\\mathbb N$ is via the Euler integral\n\n$$\n\\Gamma(z) = \\int_0^\\infty t^{z-1}e^{-t}dt\\,.\n$$\n\n> **Tip:** To make sure mathematical expressions are rendered properly on your website, include **MathJax** into your template:\n\n```\n\n```\n\n> **Note:** You can find more information about **LaTeX** mathematical expressions [here][4].\n\n\n### UML diagrams\n\nYou can also render sequence diagrams like this:\n\n```sequence\nAlice->Bob: Hello Bob, how are you?\nNote right of Bob: Bob thinks\nBob-->Alice: I am good thanks!\n```\n\nAnd flow charts like this:\n\n```flow\nst=>start: Start\ne=>end\nop=>operation: My Operation\ncond=>condition: Yes or No?\n\nst->op->cond\ncond(yes)->e\ncond(no)->op\n```\n\n> **Note:** You can find more information:\n\n> - about **Sequence diagrams** syntax [here][7],\n> - about **Flow charts** syntax [here][8].\n\n### Support StackEdit\n\n[![](https://cdn.monetizejs.com/resources/button-32.png)](https://monetizejs.com/authorize?client_id=ESTHdCYOi18iLhhO&summary=true)\n\n [^stackedit]: [StackEdit](https://stackedit.io/) is a full-featured, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.\n\n\n [1]: http://math.stackexchange.com/\n [2]: http://daringfireball.net/projects/markdown/syntax "Markdown"\n [3]: https://github.com/jmcmanus/pagedown-extra "Pagedown Extra"\n [4]: http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference\n [5]: https://code.google.com/p/google-code-prettify/\n [6]: http://highlightjs.org/\n [7]: http://bramp.github.io/js-sequence-diagrams/\n [8]: http://adrai.github.io/flowchart.js/\n';
-}), define("fileMgr", [ "jquery", "underscore", "constants", "core", "utils", "storage", "settings", "eventMgr", "fileSystem", "classes/FileDescriptor", "text!WELCOME.md" ], function(e, t, n, i, r, o, a, s, l, c, u) {
+ return 'Welcome to StackEdit!\n===================\n\n\nHey! I\'m your first Markdown document in **StackEdit**[^stackedit]. Don\'t delete me, I\'m very helpful! I can be recovered anyway in the **Utils** tab of the **Settings** dialog.\n\n----------\n\n\nDocuments\n-------------\n\nStackEdit stores your documents in your browser, which means all your documents are automatically saved locally and are accessible **offline!**\n\n> **Note:**\n\n> - StackEdit is accessible offline after the application has been loaded for the first time.\n> - Your local documents are not shared between different browsers or computers.\n> - Clearing your browser\'s data may **delete all your local documents!** Make sure your documents are synchronized with **Google Drive** or **Dropbox** (check out the [ Synchronization](#synchronization) section).\n\n#### Create a document\n\nThe document panel is accessible using the button in the navigation bar. You can create a new document by clicking **New document** in the document panel.\n\n#### Switch to another document\n\nAll your local documents are listed in the document panel. You can switch from one to another by clicking a document in the list or you can toggle documents using Ctrl+[ and Ctrl+].\n\n#### Rename a document\n\nYou can rename the current document by clicking the document title in the navigation bar.\n\n#### Delete a document\n\nYou can delete the current document by clicking **Delete document** in the document panel.\n\n#### Export a document\n\nYou can save the current document to a file by clicking **Export to disk** from the menu panel.\n\n> **Tip:** Check out the [ Publish a document](#publish-a-document) section for a description of the different output formats.\n\n\n----------\n\n\nSynchronization\n-------------------\n\nStackEdit can be combined with **Google Drive** and **Dropbox** to have your documents saved in the *Cloud*. The synchronization mechanism takes care of uploading your modifications or downloading the latest version of your documents.\n\n> **Note:**\n\n> - Full access to **Google Drive** or **Dropbox** is required to be able to import any document in StackEdit. Permission restrictions can be configured in the settings.\n> - Imported documents are downloaded in your browser and are not transmitted to a server.\n> - If you experience problems saving your documents on Google Drive, check and optionally disable browser extensions, such as Disconnect.\n\n#### Open a document\n\nYou can open a document from **Google Drive** or the **Dropbox** by opening the **Synchronize** sub-menu and by clicking **Open from...**. Once opened, any modification in your document will be automatically synchronized with the file in your **Google Drive** / **Dropbox** account.\n\n#### Save a document\n\nYou can save any document by opening the **Synchronize** sub-menu and by clicking **Save on...**. Even if your document is already synchronized with **Google Drive** or **Dropbox**, you can export it to a another location. StackEdit can synchronize one document with multiple locations and accounts.\n\n#### Synchronize a document\n\nOnce your document is linked to a **Google Drive** or a **Dropbox** file, StackEdit will periodically (every 3 minutes) synchronize it by downloading/uploading any modification. A merge will be performed if necessary and conflicts will be detected.\n\nIf you just have modified your document and you want to force the synchronization, click the button in the navigation bar.\n\n> **Note:** The button is disabled when you have no document to synchronize.\n\n#### Manage document synchronization\n\nSince one document can be synchronized with multiple locations, you can list and manage synchronized locations by clicking **Manage synchronization** in the **Synchronize** sub-menu. This will let you remove synchronization locations that are associated to your document.\n\n> **Note:** If you delete the file from **Google Drive** or from **Dropbox**, the document will no longer be synchronized with that location.\n\n----------\n\n\nPublication\n-------------\n\nOnce you are happy with your document, you can publish it on different websites directly from StackEdit. As for now, StackEdit can publish on **Blogger**, **Dropbox**, **Gist**, **GitHub**, **Google Drive**, **Tumblr**, **WordPress** and on any SSH server.\n\n#### Publish a document\n\nYou can publish your document by opening the **Publish** sub-menu and by choosing a website. In the dialog box, you can choose the publication format:\n\n- Markdown, to publish the Markdown text on a website that can interpret it (**GitHub** for instance),\n- HTML, to publish the document converted into HTML (on a blog for example),\n- Template, to have a full control of the output.\n\n> **Note:** The default template is a simple webpage wrapping your document in HTML format. You can customize it in the **Advanced** tab of the **Settings** dialog.\n\n#### Update a publication\n\nAfter publishing, StackEdit will keep your document linked to that publication which makes it easy for you to update it. Once you have modified your document and you want to update your publication, click on the button in the navigation bar.\n\n> **Note:** The button is disabled when your document has not been published yet.\n\n#### Manage document publication\n\nSince one document can be published on multiple locations, you can list and manage publish locations by clicking **Manage publication** in the menu panel. This will let you remove publication locations that are associated to your document.\n\n> **Note:** If the file has been removed from the website or the blog, the document will no longer be published on that location.\n\n----------\n\n\nMarkdown Extra\n--------------------\n\nStackEdit supports **Markdown Extra**, which extends **Markdown** syntax with some nice features.\n\n> **Tip:** You can disable any **Markdown Extra** feature in the **Extensions** tab of the **Settings** dialog.\n\n> **Note:** You can find more information about **Markdown** syntax [here][2] and **Markdown Extra** extension [here][3].\n\n\n### Tables\n\n**Markdown Extra** has a special syntax for tables:\n\nItem | Value\n-------- | ---\nComputer | $1600\nPhone | $12\nPipe | $1\n\nYou can specify column alignment with one or two colons:\n\n| Item | Value | Qty |\n| :------- | ----: | :---: |\n| Computer | $1600 | 5 |\n| Phone | $12 | 12 |\n| Pipe | $1 | 234 |\n\n\n### Definition Lists\n\n**Markdown Extra** has a special syntax for definition lists too:\n\nTerm 1\nTerm 2\n: Definition A\n: Definition B\n\nTerm 3\n\n: Definition C\n\n: Definition D\n\n\t> part of definition D\n\n\n### Fenced code blocks\n\nGitHub\'s fenced code blocks are also supported with **Highlight.js** syntax highlighting:\n\n```\n// Foo\nvar bar = 0;\n```\n\n> **Tip:** To use **Prettify** instead of **Highlight.js**, just configure the **Markdown Extra** extension in the **Settings** dialog.\n\n> **Note:** You can find more information:\n\n> - about **Prettify** syntax highlighting [here][5],\n> - about **Highlight.js** syntax highlighting [here][6].\n\n\n### Footnotes\n\nYou can create footnotes like this[^footnote].\n\n [^footnote]: Here is the *text* of the **footnote**.\n\n\n### SmartyPants\n\nSmartyPants converts ASCII punctuation characters into "smart" typographic punctuation HTML entities. For example:\n\n| | ASCII | HTML |\n ----------------- | ---------------------------- | ------------------\n| Single backticks | `\'Isn\'t this fun?\'` | \'Isn\'t this fun?\' |\n| Quotes | `"Isn\'t this fun?"` | "Isn\'t this fun?" |\n| Dashes | `-- is en-dash, --- is em-dash` | -- is en-dash, --- is em-dash |\n\n\n### Table of contents\n\nYou can insert a table of contents using the marker `[TOC]`:\n\n[TOC]\n\n\n### MathJax\n\nYou can render *LaTeX* mathematical expressions using **MathJax**, as on [math.stackexchange.com][1]:\n\nThe *Gamma function* satisfying $\\Gamma(n) = (n-1)!\\quad\\forall n\\in\\mathbb N$ is via the Euler integral\n\n$$\n\\Gamma(z) = \\int_0^\\infty t^{z-1}e^{-t}dt\\,.\n$$\n\n> **Tip:** To make sure mathematical expressions are rendered properly on your website, include **MathJax** into your template:\n\n```\n\n```\n\n> **Note:** You can find more information about **LaTeX** mathematical expressions [here][4].\n\n\n### UML diagrams\n\nYou can also render sequence diagrams like this:\n\n```sequence\nAlice->Bob: Hello Bob, how are you?\nNote right of Bob: Bob thinks\nBob-->Alice: I am good thanks!\n```\n\nAnd flow charts like this:\n\n```flow\nst=>start: Start\ne=>end\nop=>operation: My Operation\ncond=>condition: Yes or No?\n\nst->op->cond\ncond(yes)->e\ncond(no)->op\n```\n\n> **Note:** You can find more information:\n\n> - about **Sequence diagrams** syntax [here][7],\n> - about **Flow charts** syntax [here][8].\n\n### Support StackEdit\n\n[![](https://cdn.monetizejs.com/resources/button-32.png)](https://monetizejs.com/authorize?client_id=ESTHdCYOi18iLhhO&summary=true)\n\n [^stackedit]: [StackEdit](https://stackedit.io/) is a full-featured, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.\n\n\n [1]: http://math.stackexchange.com/\n [2]: http://daringfireball.net/projects/markdown/syntax "Markdown"\n [3]: https://github.com/jmcmanus/pagedown-extra "Pagedown Extra"\n [4]: http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference\n [5]: https://code.google.com/p/google-code-prettify/\n [6]: http://highlightjs.org/\n [7]: http://bramp.github.io/js-sequence-diagrams/\n [8]: http://adrai.github.io/flowchart.js/\n';
+}), define("fileMgr", [ "jquery", "underscore", "constants", "core", "utils", "storage", "settings", "eventMgr", "fileSystem", "classes/FileDescriptor", "text!WELCOME.md" ], function(t, e, n, i, r, o, a, s, l, c, u) {
var d = {};
return d.currentFile = void 0, d.selectFile = function(r) {
- void 0 === (r = r || d.currentFile) && (r = 0 === t.size(l) ? d.createFile(n.WELCOME_DOCUMENT_TITLE, u) : t.max(l, function(e) {
- return e.selectTime || 0;
+ void 0 === (r = r || d.currentFile) && (r = 0 === e.size(l) ? d.createFile(n.WELCOME_DOCUMENT_TITLE, u) : e.max(l, function(t) {
+ return t.selectTime || 0;
})), d.currentFile !== r && (d.currentFile = r, r.selectTime = new Date().getTime(),
- s.onFileSelected(r), e(".action-edit-document").toggleClass("hide", r.fileIndex != n.TEMPORARY_FILE_INDEX)),
+ s.onFileSelected(r), t(".action-edit-document").toggleClass("hide", r.fileIndex != n.TEMPORARY_FILE_INDEX)),
i.initEditor(r);
- }, d.createFile = function(e, i, u, d, p) {
- if (i = void 0 !== i ? i : a.defaultContent, !e) {
- e = n.DEFAULT_FILE_TITLE;
- for (var h = 2, f = function(t) {
- return t.title == e;
- }; t.some(l, f); ) e = n.DEFAULT_FILE_TITLE + h++;
+ }, d.createFile = function(t, i, u, d, p) {
+ if (i = void 0 !== i ? i : a.defaultContent, !t) {
+ t = n.DEFAULT_FILE_TITLE;
+ for (var h = 2, f = function(e) {
+ return e.title == t;
+ }; e.some(l, f); ) t = n.DEFAULT_FILE_TITLE + h++;
}
var m = n.TEMPORARY_FILE_INDEX;
- if (!p) do m = "file." + r.id(); while (t.has(l, m));
+ if (!p) do m = "file." + r.id(); while (e.has(l, m));
d = d || {};
- var g = t.reduce(d, function(e, t) {
- return r.storeAttributes(t), e + t.syncIndex + ";";
+ var g = e.reduce(d, function(t, e) {
+ return r.storeAttributes(e), t + e.syncIndex + ";";
}, ";");
- o[m + ".title"] = e, o[m + ".content"] = i, o[m + ".sync"] = g, o[m + ".publish"] = ";";
- var v = new c(m, e, d);
+ o[m + ".title"] = t, o[m + ".content"] = i, o[m + ".sync"] = g, o[m + ".publish"] = ";";
+ var v = new c(m, t, d);
return u && (v.discussionListJSON = u), p || (r.appendIndexToArray("file.list", m),
l[m] = v, s.onFileCreated(v)), v;
- }, d.deleteFile = function(e) {
- e = e || d.currentFile, e.folder && (e.folder.removeFile(e), s.onFoldersChanged()),
- r.removeIndexFromArray("file.list", e.fileIndex), delete l[e.fileIndex], d.currentFile === e && (d.currentFile = void 0,
- d.selectFile()), s.onFileDeleted(e);
- }, d.getFileFromSyncIndex = function(e) {
- return t.find(l, function(n) {
- return t.has(n.syncLocations, e);
+ }, d.deleteFile = function(t) {
+ t = t || d.currentFile, t.folder && (t.folder.removeFile(t), s.onFoldersChanged()),
+ r.removeIndexFromArray("file.list", t.fileIndex), delete l[t.fileIndex], d.currentFile === t && (d.currentFile = void 0,
+ d.selectFile()), s.onFileDeleted(t);
+ }, d.getFileFromSyncIndex = function(t) {
+ return e.find(l, function(n) {
+ return e.has(n.syncLocations, t);
});
- }, d.getFileFromPublishIndex = function(e) {
- return t.find(l, function(n) {
- return t.has(n.publishLocations, e);
+ }, d.getFileFromPublishIndex = function(t) {
+ return e.find(l, function(n) {
+ return e.has(n.publishLocations, t);
});
}, s.addListener("onReady", function() {
- function t() {
+ function e() {
if (a) {
o.addClass("hide"), r.removeClass("hide");
- var t = e.trim(o.val()), n = d.currentFile;
- t && t != n.title && (n.title = t, s.onTitleChanged(n)), o.val(n.title), i.focus(),
+ var e = t.trim(o.val()), n = d.currentFile;
+ e && e != n.title && (n.title = e, s.onTitleChanged(n)), o.val(n.title), i.focus(),
a = !1;
}
}
- var i = e("#wmd-input");
+ var i = t("#wmd-input");
d.selectFile();
- var r = e(".file-title-navbar"), o = e(".input-file-title");
- e(".action-create-file").click(function() {
+ var r = t(".file-title-navbar"), o = t(".input-file-title");
+ t(".action-create-file").click(function() {
setTimeout(function() {
- var e = d.createFile();
- d.selectFile(e), r.click();
+ var t = d.createFile();
+ d.selectFile(t), r.click();
}, 400);
- }), e(".action-remove-file-confirm").click(function() {
- e(".modal-remove-file-confirm").modal("show");
- }), e(".action-remove-file").click(function() {
+ }), t(".action-remove-file-confirm").click(function() {
+ t(".modal-remove-file-confirm").modal("show");
+ }), t(".action-remove-file").click(function() {
d.deleteFile();
});
var a;
r.click(function() {
if (!0 !== window.viewerMode) {
r.addClass("hide");
- var e = o.removeClass("hide");
+ var t = o.removeClass("hide");
a = !0, setTimeout(function() {
- e.focus().get(0).select();
+ t.focus().get(0).select();
}, 10);
}
}), o.blur(function() {
setTimeout(function() {
- t();
+ e();
}, 0);
- }).keypress(function(e) {
- 13 == e.keyCode && (t(), e.preventDefault()), 27 == e.keyCode && (o.val(""), t());
- }), e(".action-open-stackedit").click(function() {
+ }).keypress(function(t) {
+ 13 == t.keyCode && (e(), t.preventDefault()), 27 == t.keyCode && (o.val(""), e());
+ }), t(".action-open-stackedit").click(function() {
window.location.href = "editor";
- }), e(".action-edit-document").click(function() {
- var e = i.val(), t = d.currentFile.title, n = d.createFile(t, e);
+ }), t(".action-edit-document").click(function() {
+ var t = i.val(), e = d.currentFile.title, n = d.createFile(e, t);
d.selectFile(n), window.location.href = "editor";
- }), e(".action-welcome-file").click(function() {
- var e = d.createFile(n.WELCOME_DOCUMENT_TITLE, u);
- d.selectFile(e);
+ }), t(".action-welcome-file").click(function() {
+ var t = d.createFile(n.WELCOME_DOCUMENT_TITLE, u);
+ d.selectFile(t);
});
}), s.onFileMgrCreated(d), d;
-}), define("classes/Provider", [ "underscore", "utils", "settings", "eventMgr", "fileMgr", "editor", "diff_match_patch_uncompressed", "jsondiffpatch" ], function(e, t, n, i, r, o, a, s) {
- function l(e, t) {
- this.providerId = e, this.providerName = t, this.isPublishEnabled = !0;
+}), define("classes/Provider", [ "underscore", "utils", "settings", "eventMgr", "fileMgr", "editor", "diff_match_patch_uncompressed", "jsondiffpatch" ], function(t, e, n, i, r, o, a, s) {
+ function l(t, e) {
+ this.providerId = t, this.providerName = e, this.isPublishEnabled = !0;
}
- l.prototype.parseDiscussionList = function(e) {
+ l.prototype.parseDiscussionList = function(t) {
try {
- var t = JSON.parse(e);
- return n.each(t, function(e, t) {
- if (e.discussionIndex != t || !n.isNumber(e.selectionStart) || !n.isNumber(e.selectionEnd)) throw "invalid";
- e.commentList && e.commentList.forEach(function(e) {
- if (e.author && !n.isString(e.author) || !n.isString(e.content)) throw "invalid";
+ var e = JSON.parse(t);
+ return n.each(e, function(t, e) {
+ if (t.discussionIndex != e || !n.isNumber(t.selectionStart) || !n.isNumber(t.selectionEnd)) throw "invalid";
+ t.commentList && t.commentList.forEach(function(t) {
+ if (t.author && !n.isString(t.author) || !n.isString(t.content)) throw "invalid";
});
- }), t;
+ }), e;
} catch (n) {}
- }, l.prototype.serializeContent = function(e, t) {
- return t.length > 2 ? e + "" : e;
- }, l.prototype.parseContent = function(e) {
- var t, n = "{}", i = /$/.exec(e);
- return i && (t = this.parseDiscussionList(i[1])) && (e = e.substring(0, i.index),
+ }, l.prototype.serializeContent = function(t, e) {
+ return e.length > 2 ? t + "" : t;
+ }, l.prototype.parseContent = function(t) {
+ var e, n = "{}", i = /$/.exec(t);
+ return i && (e = this.parseDiscussionList(i[1])) && (t = t.substring(0, i.index),
n = i[1]), {
- content: e,
- discussionList: t || {},
+ content: t,
+ discussionList: e || {},
discussionListJSON: n
};
};
var c = new a();
c.Match_Threshold = 0, c.Patch_DeleteThreshold = 0;
var u = s.create({
- objectHash: function(e) {
- return JSON.stringify(e);
+ objectHash: function(t) {
+ return JSON.stringify(t);
},
textDiff: {
minLength: 9999999
}
}), d = "merge" == n.conflictMode;
return l.prototype.syncMerge = function(n, a, s, l, p, h) {
- var f = n.content, m = n.title, g = n.discussionListJSON, v = n.discussionList, b = t.crc32(f), y = t.crc32(m), x = t.crc32(g), w = t.crc32(s), S = t.crc32(l), C = t.crc32(h), _ = a.contentCRC != b, k = a.contentCRC != w, E = f != s && k, T = E && _;
+ var f = n.content, m = n.title, g = n.discussionListJSON, v = n.discussionList, b = e.crc32(f), y = e.crc32(m), x = e.crc32(g), w = e.crc32(s), S = e.crc32(l), C = e.crc32(h), _ = a.contentCRC != b, k = a.contentCRC != w, E = f != s && k, T = E && _;
a.titleCRC = a.titleCRC || y;
- var I, D, N = a.titleCRC != y, M = a.titleCRC != S, L = m != l && M, A = L && N, R = a.discussionListCRC != x, P = a.discussionListCRC != C, O = g != h && P, F = O && R, B = [], j = s, $ = l, G = p, q = !1, H = !1, U = !1;
+ var I, D, N = a.titleCRC != y, M = a.titleCRC != S, L = m != l && M, A = L && N, R = a.discussionListCRC != x, P = a.discussionListCRC != C, O = g != h && P, F = O && R, B = [], j = s, $ = l, q = p, G = !1, H = !1, U = !1;
if (!d && (T || A || F) || T && void 0 === a.content || A && void 0 === a.title || F && void 0 === a.discussionList) r.createFile(m + " (backup)", f, g),
i.onMessage('Conflict detected on "' + m + '". A backup has been created locally.'); else {
if (T) {
var z = a.content;
I = c.diff_main(z, f), c.diff_cleanupSemantic(I), D = c.patch_make(z, I);
var V = c.patch_apply(D, s);
- if (j = V[0], !V[1].every(e.identity)) {
- I = c.diff_main(f, j), I = function(e) {
- function t() {
+ if (j = V[0], !V[1].every(t.identity)) {
+ I = c.diff_main(f, j), I = function(t) {
+ function e() {
(i[1] || r[1]) && (i[1] && r[1] ? (i[1] = "\u29f8\u29f8" + i[1] + "\u29f8\u29f8",
r[1] += "\u29f8\u29f8", n.push(i), n.push(r)) : n.push([ 0, i[1] + r[1] ]), i = [ -1, "" ],
r = [ 1, "" ]);
}
var n = [], i = [ -1, "" ], r = [ 1, "" ];
- return e.forEach(function(o, a) {
+ return t.forEach(function(o, a) {
function s() {
- return 0 === a || a === e.length - 1;
+ return 0 === a || a === t.length - 1;
}
var l = o[0], c = o[1];
if (0 === l) if (s() || c.length > 20) {
@@ -25569,23 +25535,23 @@ define("editor", [ "jquery", "underscore", "utils", "settings", "eventMgr", "pri
if (c) {
for (var h = c.length; h && /\S/.test(c[h - 1]); ) h--;
var f = c.substring(h);
- c = c.substring(0, h), s() || c.length > 20 ? (t(), n.push([ 0, c ])) : (i[1] += c,
+ c = c.substring(0, h), s() || c.length > 20 ? (e(), n.push([ 0, c ])) : (i[1] += c,
r[1] += c), i[1] += f, r[1] += f;
}
} else i[1] += c, r[1] += c; else -1 === l ? i[1] += c : 1 === l && (r[1] += c);
- }), i[1] == r[1] ? n.push([ 0, r[1] ]) : t(), n;
+ }), i[1] == r[1] ? n.push([ 0, r[1] ]) : e(), n;
}(I), j = "";
var W;
- I.forEach(function(e) {
- var t = e[0], n = e[1];
- 0 === t || W ? 0 === t && W && (W.selectionEnd = j.length, B.push(W), W = void 0) : W = {
+ I.forEach(function(t) {
+ var e = t[0], n = t[1];
+ 0 === e || W ? 0 === e && W && (W.selectionEnd = j.length, B.push(W), W = void 0) : W = {
selectionStart: j.length,
type: "conflict"
}, j += n;
}), W && (W.selectionEnd = j.length, B.push(W));
}
}
- E && (R && (q = !0), P ? H = !0 : (q = !0, G = v)), F && (U = !0), A && (D = c.patch_make(a.title, m),
+ E && (R && (G = !0), P ? H = !0 : (G = !0, q = v)), F && (U = !0), A && (D = c.patch_make(a.title, m),
$ = c.patch_apply(D, l)[0]);
}
var X;
@@ -25594,31 +25560,31 @@ define("editor", [ "jquery", "underscore", "utils", "settings", "eventMgr", "pri
r.currentFile === n && (X = {
selectionStart: o.selectionMgr.selectionStart,
selectionEnd: o.selectionMgr.selectionEnd
- }, Q.push(X), n.newDiscussion && Q.push(n.newDiscussion)), q && (Q = Q.concat(e.values(v))),
+ }, Q.push(X), n.newDiscussion && Q.push(n.newDiscussion)), G && (Q = Q.concat(t.values(v))),
O |= o.adjustCommentOffsets(f, j, Q);
}
if (H) {
- var Y = e.values(p);
+ var Y = t.values(p);
o.adjustCommentOffsets(s, j, Y);
}
if (U) {
var K = JSON.parse(a.discussionList);
- I = u.diff(K, v), u.patch(p, I), e.each(p, function(e, t) {
- e || delete p[t];
+ I = u.diff(K, v), u.patch(p, I), t.each(p, function(t, e) {
+ t || delete p[e];
});
}
return B.length && (O = !0, B.forEach(function(n) {
var i;
- do i = t.id(); while (e.has(G, i));
- n.discussionIndex = i, G[i] = n;
+ do i = e.id(); while (t.has(q, i));
+ n.discussionIndex = i, q[i] = n;
})), L && (n.title = $, i.onTitleChanged(n), i.onMessage('"' + m + '" has been renamed to "' + $ + '" on ' + this.providerName + ".")),
- (E || O) && o.watcher.noWatch(e.bind(function() {
+ (E || O) && o.watcher.noWatch(t.bind(function() {
if (E && (r.currentFile === n && (o.setValueNoWatch(j), X && o.selectionMgr.setSelectionStartEnd(X.selectionStart, X.selectionEnd)),
n.content = j, i.onContentChanged(n, j)), O) {
- n.discussionList = G;
- var t = u.diff(v, G), a = !1;
- e.each(t, function(t, r) {
- e.isArray(t) ? 1 === t.length ? i.onDiscussionCreated(n, G[r]) : i.onDiscussionRemoved(n, v[r]) : a = !0;
+ n.discussionList = q;
+ var e = u.diff(v, q), a = !1;
+ t.each(e, function(e, r) {
+ t.isArray(e) ? 1 === e.length ? i.onDiscussionCreated(n, q[r]) : i.onDiscussionRemoved(n, v[r]) : a = !0;
}), a && i.onCommentsChanged(n);
}
o.undoMgr.currentMode = "sync", o.undoMgr.saveState(), i.onMessage('"' + l + '" has been updated from ' + this.providerName + "."),
@@ -25629,10 +25595,10 @@ define("editor", [ "jquery", "underscore", "utils", "settings", "eventMgr", "pri
discussionListCRC: C
};
}, l;
-}), define("classes/AsyncTask", [ "underscore", "constants", "utils", "eventMgr" ], function(e, t, n, i) {
- function r(e) {
- this.finished = !1, this.timeout = t.ASYNC_TASK_DEFAULT_TIMEOUT, this.retryCounter = 0,
- this.runCallbacks = [], this.successCallbacks = [], this.errorCallbacks = [], this.force = e;
+}), define("classes/AsyncTask", [ "underscore", "constants", "utils", "eventMgr" ], function(t, e, n, i) {
+ function r(t) {
+ this.finished = !1, this.timeout = e.ASYNC_TASK_DEFAULT_TIMEOUT, this.retryCounter = 0,
+ this.runCallbacks = [], this.successCallbacks = [], this.errorCallbacks = [], this.force = t;
}
function o() {
if (!0 === c) return void (l + u.timeout < n.currentTime && u.error(new Error("A timeout occurred.")));
@@ -25642,38 +25608,38 @@ define("editor", [ "jquery", "underscore", "utils", "settings", "eventMgr", "pri
}
l <= n.currentTime && (c = !0, u.chain());
}
- function a(t, n, r) {
+ function a(e, n, r) {
try {
- e.each(n, function(e) {
- e(r);
+ t.each(n, function(t) {
+ t(r);
});
} finally {
- t.finished = !0, u === t && (u = void 0, c = !1), 0 === s.length ? (d = !1, i.onAsyncRunning(!1)) : o();
+ e.finished = !0, u === e && (u = void 0, c = !1), 0 === s.length ? (d = !1, i.onAsyncRunning(!1)) : o();
}
}
var s = [];
- r.prototype.onRun = function(e) {
- this.runCallbacks.push(e);
- }, r.prototype.onSuccess = function(e) {
- this.successCallbacks.push(e);
- }, r.prototype.onError = function(e) {
- this.errorCallbacks.push(e);
+ r.prototype.onRun = function(t) {
+ this.runCallbacks.push(t);
+ }, r.prototype.onSuccess = function(t) {
+ this.successCallbacks.push(t);
+ }, r.prototype.onError = function(t) {
+ this.errorCallbacks.push(t);
};
var l = 0;
- r.prototype.chain = function(e) {
+ r.prototype.chain = function(t) {
if (l = n.currentTime, n.logStackTrace(), !0 !== this.finished) {
- if (void 0 === this.queue && (this.queue = this.runCallbacks.slice()), void 0 !== e) return void e();
+ if (void 0 === this.queue && (this.queue = this.runCallbacks.slice()), void 0 !== t) return void t();
if (0 === this.queue.length) return void a(this, this.successCallbacks);
this.queue.shift()();
}
- }, r.prototype.error = function(e) {
- if (n.logStackTrace(), !0 !== this.finished) throw e = e || new Error("Unknown error"),
- e.message && i.onError(e), a(this, this.errorCallbacks, e), e;
+ }, r.prototype.error = function(t) {
+ if (n.logStackTrace(), !0 !== this.finished) throw t = t || new Error("Unknown error"),
+ t.message && i.onError(t), a(this, this.errorCallbacks, t), t;
};
var c = !1;
- r.prototype.retry = function(e, t) {
+ r.prototype.retry = function(t, e) {
if (!0 !== this.finished) {
- if (t = t || 5, this.queue = void 0, this.retryCounter >= t) return void this.error(e);
+ if (e = e || 5, this.queue = void 0, this.retryCounter >= e) return void this.error(t);
var i = 1e3 * Math.pow(2, this.retryCounter++);
l = n.currentTime + i, c = !1, o();
}
@@ -25684,10 +25650,10 @@ define("editor", [ "jquery", "underscore", "utils", "settings", "eventMgr", "pri
return i.addListener("onUserActive", function() {
p = !0;
}), i.addListener("onPeriodicRun", o), r;
-}), define("helpers/dropboxHelper", [ "jquery", "underscore", "constants", "core", "utils", "storage", "logger", "settings", "eventMgr", "classes/AsyncTask" ], function(e, t, n, i, r, o, a, s, l, c) {
- function u(t) {
- t.onRun(function() {
- return !0 === v ? (f = void 0, t.error(new Error("Operation not available in offline mode.|stopPublish"))) : void 0 !== f ? t.chain() : void e.ajax({
+}), define("helpers/dropboxHelper", [ "jquery", "underscore", "constants", "core", "utils", "storage", "logger", "settings", "eventMgr", "classes/AsyncTask" ], function(t, e, n, i, r, o, a, s, l, c) {
+ function u(e) {
+ e.onRun(function() {
+ return !0 === v ? (f = void 0, e.error(new Error("Operation not available in offline mode.|stopPublish"))) : void 0 !== f ? e.chain() : void t.ajax({
url: "libs/dropbox.min.js",
dataType: "script",
timeout: n.AJAX_TIMEOUT
@@ -25698,178 +25664,178 @@ define("editor", [ "jquery", "underscore", "utils", "settings", "eventMgr", "pri
}), f.authDriver(new Dropbox.AuthDriver.Popup({
receiverUrl: n.BASE_URL + "html/dropbox-oauth-receiver.html",
rememberUser: !0
- })), t.chain();
- }).fail(function(e) {
+ })), e.chain();
+ }).fail(function(t) {
p({
- status: e.status,
- responseText: e.statusText
- }, t);
+ status: t.status,
+ responseText: t.statusText
+ }, e);
});
});
}
- function d(e) {
- e.onRun(function() {
- function t() {
- r.redirectConfirm("You are being redirected to Dropbox authorization page.", function() {
- e.chain(i);
- }, function() {
- e.error(new Error("Operation canceled."));
- });
- }
- function i() {
- !1 === o ? e.timeout = n.ASYNC_TASK_LONG_TIMEOUT : f.reset(), f.authenticate({
- interactive: !o
- }, function(n, i) {
- return !0 === i.isAuthenticated() ? (m = !0, e.chain()) : !0 === o ? (o = !1, e.chain(t)) : void e.error(new Error("Access to Dropbox account is not authorized."));
- });
- }
- if (!0 === m) return e.chain();
- var o = !0;
- e.chain(i);
- });
- }
- function p(e, n) {
- var r = !0;
- if (e) if (a.error(e), "string" == typeof e) r = e; else {
- if (r = "Dropbox error (" + e.status + ": " + e.responseText + ").", 401 === e.status || 403 === e.status) return m = !1,
- r = "Access to Dropbox account is not authorized.", n.retry(new Error(r), 1);
- if (400 === e.status && -1 !== e.responseText.indexOf("oauth_nonce")) return t.each(t.keys(o), function(e) {
- 0 === e.indexOf("dropbox-auth") && o.removeItem(e);
- }), m = !1, n.retry(new Error(r), 1);
- e.status <= 0 && (f = void 0, m = !1, i.setOffline(), r = "|stopPublish");
- }
- n.error(new Error(r));
- }
- function h(t) {
+ function d(t) {
t.onRun(function() {
- function i() {
- r.redirectConfirm("You are being redirected to Dropbox Chooser page.", function() {
- t.chain();
+ function e() {
+ r.redirectConfirm("You are being redirected to Dropbox authorization page.", function() {
+ t.chain(i);
}, function() {
t.error(new Error("Operation canceled."));
});
}
- return !0 === b ? t.chain() : void e.ajax({
+ function i() {
+ !1 === o ? t.timeout = n.ASYNC_TASK_LONG_TIMEOUT : f.reset(), f.authenticate({
+ interactive: !o
+ }, function(n, i) {
+ return !0 === i.isAuthenticated() ? (m = !0, t.chain()) : !0 === o ? (o = !1, t.chain(e)) : void t.error(new Error("Access to Dropbox account is not authorized."));
+ });
+ }
+ if (!0 === m) return t.chain();
+ var o = !0;
+ t.chain(i);
+ });
+ }
+ function p(t, n) {
+ var r = !0;
+ if (t) if (a.error(t), "string" == typeof t) r = t; else {
+ if (r = "Dropbox error (" + t.status + ": " + t.responseText + ").", 401 === t.status || 403 === t.status) return m = !1,
+ r = "Access to Dropbox account is not authorized.", n.retry(new Error(r), 1);
+ if (400 === t.status && -1 !== t.responseText.indexOf("oauth_nonce")) return e.each(e.keys(o), function(t) {
+ 0 === t.indexOf("dropbox-auth") && o.removeItem(t);
+ }), m = !1, n.retry(new Error(r), 1);
+ t.status <= 0 && (f = void 0, m = !1, i.setOffline(), r = "|stopPublish");
+ }
+ n.error(new Error(r));
+ }
+ function h(e) {
+ e.onRun(function() {
+ function i() {
+ r.redirectConfirm("You are being redirected to Dropbox Chooser page.", function() {
+ e.chain();
+ }, function() {
+ e.error(new Error("Operation canceled."));
+ });
+ }
+ return !0 === b ? e.chain() : void t.ajax({
url: "https://www.dropbox.com/static/api/1/dropbox.js",
dataType: "script",
timeout: n.AJAX_TIMEOUT
}).done(function() {
- b = !0, t.chain(i);
- }).fail(function(e) {
+ b = !0, e.chain(i);
+ }).fail(function(t) {
p({
- status: e.status,
- responseText: e.statusText
- }, t);
+ status: t.status,
+ responseText: t.statusText
+ }, e);
});
});
}
var f, m = !1, g = {}, v = !1;
- l.addListener("onOfflineChanged", function(e) {
- v = e;
- }), g.upload = function(e, t, n) {
+ l.addListener("onOfflineChanged", function(t) {
+ v = t;
+ }), g.upload = function(t, e, n) {
var i, r = new c();
u(r), d(r), r.onRun(function() {
- f.writeFile(e, t, function(t, n) {
- return t ? (400 === t.status && (t = 'Could not upload document into path "' + e + '".'),
- void p(t, r)) : (i = n, r.chain());
+ f.writeFile(t, e, function(e, n) {
+ return e ? (400 === e.status && (e = 'Could not upload document into path "' + t + '".'),
+ void p(e, r)) : (i = n, r.chain());
});
}), r.onSuccess(function() {
n(void 0, i);
- }), r.onError(function(e) {
- n(e);
+ }), r.onError(function(t) {
+ n(t);
}), r.enqueue();
- }, g.checkChanges = function(e, t) {
- var n = [], i = e || 0, r = new c();
+ }, g.checkChanges = function(t, e) {
+ var n = [], i = t || 0, r = new c();
u(r), d(r), r.onRun(function() {
- function e() {
- f.pullChanges(i, function(t, o) {
- return t ? p(t, r) : (i = o.cursor(), void 0 !== o.changes && (n = n.concat(o.changes)),
- o.shouldPullAgain ? r.chain(e) : r.chain(), void 0);
+ function t() {
+ f.pullChanges(i, function(e, o) {
+ return e ? p(e, r) : (i = o.cursor(), void 0 !== o.changes && (n = n.concat(o.changes)),
+ o.shouldPullAgain ? r.chain(t) : r.chain(), void 0);
});
}
- r.chain(e);
+ r.chain(t);
}), r.onSuccess(function() {
- t(void 0, n, i);
- }), r.onError(function(e) {
- t(e);
+ e(void 0, n, i);
+ }), r.onError(function(t) {
+ e(t);
}), r.enqueue();
- }, g.downloadMetadata = function(e, t) {
+ }, g.downloadMetadata = function(t, e) {
var n = [], i = new c();
u(i), d(i), i.onRun(function() {
- function t() {
- if (0 === e.length) return i.chain();
- var r = e[0];
+ function e() {
+ if (0 === t.length) return i.chain();
+ var r = t[0];
f.stat(r, function(r, o) {
- return o ? (n.push(o), e.shift(), i.chain(t)) : void p(r, i);
+ return o ? (n.push(o), t.shift(), i.chain(e)) : void p(r, i);
});
}
- i.chain(t);
+ i.chain(e);
}), i.onSuccess(function() {
- t(void 0, n);
- }), i.onError(function(e) {
- t(e);
+ e(void 0, n);
+ }), i.onError(function(t) {
+ e(t);
}), i.enqueue();
- }, g.downloadContent = function(e, n) {
+ }, g.downloadContent = function(t, n) {
var i = [], r = new c();
u(r), d(r), r.onRun(function() {
function n() {
- if (0 === e.length) return r.chain();
- var o = e[0];
+ if (0 === t.length) return r.chain();
+ var o = t[0];
i.push(o);
var a;
return !0 === o.isFile ? a = o : void 0 !== o.wasRemoved && (a = o.stat), a ? void f.readFile(a.path, function(i, o) {
- return t.isString(o) ? (a.content = o, e.shift(), r.chain(n)) : void p(i, r);
- }) : (e.shift(), r.chain(n));
+ return e.isString(o) ? (a.content = o, t.shift(), r.chain(n)) : void p(i, r);
+ }) : (t.shift(), r.chain(n));
}
r.chain(n);
}), r.onSuccess(function() {
n(void 0, i);
- }), r.onError(function(e) {
- n(e);
+ }), r.onError(function(t) {
+ n(t);
}), r.enqueue();
};
var b = !1;
- return g.picker = function(e) {
- var t = [], i = new c();
+ return g.picker = function(t) {
+ var e = [], i = new c();
i.timeout = n.ASYNC_TASK_LONG_TIMEOUT, u(i), h(i), i.onRun(function() {
- var e = {};
- e.multiselect = !0, e.linkType = "direct", e.success = function(e) {
- for (var n = 0; n < e.length; n++) {
- var r = e[n].link;
- r = r.replace(/.*\/view\/[^\/]*/, ""), t.push(decodeURI(r));
+ var t = {};
+ t.multiselect = !0, t.linkType = "direct", t.success = function(t) {
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n].link;
+ r = r.replace(/.*\/view\/[^\/]*/, ""), e.push(decodeURI(r));
}
i.chain();
- }, e.cancel = function() {
+ }, t.cancel = function() {
i.chain();
- }, Dropbox.choose(e);
+ }, Dropbox.choose(t);
}), i.onSuccess(function() {
- e(void 0, t);
- }), i.onError(function(t) {
- e(t);
+ t(void 0, e);
+ }), i.onError(function(e) {
+ t(e);
}), i.enqueue();
}, g;
-}), define("providers/dropboxProvider", [ "underscore", "utils", "storage", "settings", "classes/Provider", "eventMgr", "fileMgr", "helpers/dropboxHelper" ], function(e, t, n, i, r, o, a, s) {
- function l(e) {
- return void 0 !== e ? e.match(/^[^\\<>:"\|?\*]+$/) ? 0 !== e.indexOf("/") ? "/" + e : e : void o.onError('"' + e + '" contains invalid characters.') : void 0;
+}), define("providers/dropboxProvider", [ "underscore", "utils", "storage", "settings", "classes/Provider", "eventMgr", "fileMgr", "helpers/dropboxHelper" ], function(t, e, n, i, r, o, a, s) {
+ function l(t) {
+ if (void 0 !== t) return t.match(/^[^\\<>:"\|?\*]+$/) ? 0 !== t.indexOf("/") ? "/" + t : t : void o.onError('"' + t + '" contains invalid characters.');
}
- function c(e) {
- return "sync." + p + "." + encodeURIComponent(e.toLowerCase());
+ function c(t) {
+ return "sync." + p + "." + encodeURIComponent(t.toLowerCase());
}
- function u(e, n, i, r) {
+ function u(t, n, i, r) {
r = r || "{}";
var o = {};
- return o.provider = h, o.path = e, o.version = n, o.contentCRC = t.crc32(i), o.discussionListCRC = t.crc32(r),
- o.syncIndex = c(e), !0 === f && (o.content = i, o.discussionList = r), o;
+ return o.provider = h, o.path = t, o.version = n, o.contentCRC = e.crc32(i), o.discussionListCRC = e.crc32(r),
+ o.syncIndex = c(t), !0 === f && (o.content = i, o.discussionList = r), o;
}
- function d(t) {
- s.downloadMetadata(t, function(t, n) {
- t || s.downloadContent(n, function(t, n) {
- if (!t) {
+ function d(e) {
+ s.downloadMetadata(e, function(e, n) {
+ e || s.downloadContent(n, function(e, n) {
+ if (!e) {
var i = [];
- e.each(n, function(e) {
- var t = h.parseContent(e.content), n = u(e.path, e.versionTag, t.content, t.discussionListJSON), r = {};
+ t.each(n, function(t) {
+ var e = h.parseContent(t.content), n = u(t.path, t.versionTag, e.content, e.discussionListJSON), r = {};
r[n.syncIndex] = n;
- var o = a.createFile(e.name, t.content, t.discussionListJSON, r);
+ var o = a.createFile(t.name, e.content, e.discussionListJSON, r);
a.selectFile(o), i.push(o);
}), 0 !== i.length && o.onSyncImportSuccess(i, h);
}
@@ -25877,23 +25843,23 @@ define("editor", [ "jquery", "underscore", "utils", "settings", "eventMgr", "pri
});
}
var p = "dropbox", h = new r(p, "Dropbox");
- h.defaultPublishFormat = "template", h.getSyncLocationLink = h.getPublishLocationLink = function(e) {
- var t = e.path.split("/").map(encodeURIComponent), n = t.pop();
- return [ "https://www.dropbox.com/home", t.join("/"), "?select=", n ].join("");
+ h.defaultPublishFormat = "template", h.getSyncLocationLink = h.getPublishLocationLink = function(t) {
+ var e = t.path.split("/").map(encodeURIComponent), n = e.pop();
+ return [ "https://www.dropbox.com/home", e.join("/"), "?select=", n ].join("");
};
var f = "merge" == i.conflictMode;
return h.importFiles = function() {
- s.picker(function(t, n) {
- if (!t && 0 !== n.length) {
+ s.picker(function(e, n) {
+ if (!e && 0 !== n.length) {
var i = [];
- e.each(n, function(e) {
- var t = c(e), n = a.getFileFromSyncIndex(t);
- return void 0 !== n ? o.onError('"' + n.title + '" is already in your local documents.') : void i.push(e);
+ t.each(n, function(t) {
+ var e = c(t), n = a.getFileFromSyncIndex(e);
+ return void 0 !== n ? o.onError('"' + n.title + '" is already in your local documents.') : void i.push(t);
}), d(i);
}
});
- }, h.exportFile = function(e, n, i, r, d, p) {
- var f = t.getInputTextValue("#input-sync-export-dropbox-path", e);
+ }, h.exportFile = function(t, n, i, r, d, p) {
+ var f = e.getInputTextValue("#input-sync-export-dropbox-path", t);
if (void 0 === (f = l(f))) return p(!0);
var m = c(f), g = a.getFileFromSyncIndex(m);
if (void 0 !== g) {
@@ -25901,54 +25867,54 @@ define("editor", [ "jquery", "underscore", "utils", "settings", "eventMgr", "pri
return o.onError('File path is already synchronized with "' + v + '".'), p(!0);
}
var b = h.serializeContent(i, r);
- s.upload(f, b, function(e, t) {
- if (e) return p(e);
- var n = u(t.path, t.versionTag, i, r);
+ s.upload(f, b, function(t, e) {
+ if (t) return p(t);
+ var n = u(e.path, e.versionTag, i, r);
p(void 0, n);
});
- }, h.syncUp = function(e, t, n, i, r, o, a, l, c) {
- if (l.contentCRC == t && l.discussionListCRC == o) return c(void 0, !1);
- var u = h.serializeContent(e, r);
+ }, h.syncUp = function(t, e, n, i, r, o, a, l, c) {
+ if (l.contentCRC == e && l.discussionListCRC == o) return c(void 0, !1);
+ var u = h.serializeContent(t, r);
s.upload(l.path, u, function(n, a) {
- return n ? c(n, !0) : (l.version = a.versionTag, !0 === f && (l.content = e, l.discussionList = r),
- l.contentCRC = t, l.titleCRC = i, l.discussionListCRC = o, c(void 0, !0), void 0);
+ return n ? c(n, !0) : (l.version = a.versionTag, !0 === f && (l.content = t, l.discussionList = r),
+ l.contentCRC = e, l.titleCRC = i, l.discussionListCRC = o, c(void 0, !0), void 0);
});
}, h.syncDown = function(i) {
var r = n[p + ".lastChangeId"];
s.checkChanges(r, function(r, l, u) {
if (r) return i(r);
var d = [];
- e.each(l, function(e) {
- var t = c(e.path), n = a.getFileFromSyncIndex(t), i = n && n.syncLocations[t];
+ t.each(l, function(t) {
+ var e = c(t.path), n = a.getFileFromSyncIndex(e), i = n && n.syncLocations[e];
if (i) {
- if (e.fileDesc = n, e.syncAttributes = i, !0 === e.wasRemoved) return void d.push(e);
- i.version != e.stat.versionTag && d.push(e);
+ if (t.fileDesc = n, t.syncAttributes = i, !0 === t.wasRemoved) return void d.push(t);
+ i.version != t.stat.versionTag && d.push(t);
}
- }), s.downloadContent(d, function(e, r) {
+ }), s.downloadContent(d, function(t, r) {
function a() {
if (0 === r.length) return n[p + ".lastChangeId"] = u, i();
- var e = r.pop(), s = e.fileDesc, l = e.syncAttributes;
- if (!0 === e.wasRemoved) return o.onError('"' + s.title + '" has been removed from Dropbox.'),
+ var t = r.pop(), s = t.fileDesc, l = t.syncAttributes;
+ if (!0 === t.wasRemoved) return o.onError('"' + s.title + '" has been removed from Dropbox.'),
s.removeSyncLocation(l), o.onSyncRemoved(s, l);
- var c = e.stat, d = h.parseContent(c.content), m = d.content, g = d.discussionListJSON, v = d.discussionList, b = h.syncMerge(s, l, m, s.title, v, g);
+ var c = t.stat, d = h.parseContent(c.content), m = d.content, g = d.discussionListJSON, v = d.discussionList, b = h.syncMerge(s, l, m, s.title, v, g);
l.version = c.versionTag, !0 === f && (l.content = m, l.discussionList = v), l.contentCRC = b.contentCRC,
- l.discussionListCRC = b.discussionListCRC, t.storeAttributes(l), setTimeout(a, 5);
+ l.discussionListCRC = b.discussionListCRC, e.storeAttributes(l), setTimeout(a, 5);
}
- return e ? void i(e) : void setTimeout(a, 5);
+ return t ? void i(t) : void setTimeout(a, 5);
});
});
- }, h.publish = function(e, t, n, i, r) {
- var o = l(e.path);
+ }, h.publish = function(t, e, n, i, r) {
+ var o = l(t.path);
return void 0 === o ? r(!0) : void s.upload(o, i, r);
- }, h.newPublishAttributes = function(e) {
+ }, h.newPublishAttributes = function(t) {
var n = {};
- return n.path = t.getInputTextValue("#input-publish-dropbox-path", e), e.isPropagationStopped() ? void 0 : n;
+ if (n.path = e.getInputTextValue("#input-publish-dropbox-path", t), !t.isPropagationStopped()) return n;
}, h;
-}), function(e) {
+}), function(t, e) {
"use strict";
- var t, n = e.document;
- t = function() {
- var t, i, r, o, a, s, l, c, u, d, p, h, f, m = {}, g = {}, v = !1, b = {
+ var n, i = t.document;
+ n = function() {
+ var e, n, r, o, a, s, l, c, u, d, p, h, f, m = {}, g = {}, v = !1, b = {
ENTER: 13,
ESC: 27,
SPACE: 32
@@ -25964,22 +25930,22 @@ define("editor", [ "jquery", "underscore", "utils", "settings", "eventMgr", "pri
message: '
{{message}}
',
log: '{{message}}'
}, f = function() {
- var e, t, i = !1, r = n.createElement("fakeelement"), o = {
+ var t, e, n = !1, r = i.createElement("fakeelement"), o = {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "otransitionend",
transition: "transitionend"
};
- for (e in o) if (void 0 !== r.style[e]) {
- t = o[e], i = !0;
+ for (t in o) if (void 0 !== r.style[t]) {
+ e = o[t], n = !0;
break;
}
return {
- type: t,
- supported: i
+ type: e,
+ supported: n
};
- }, t = function(e) {
- return n.getElementById(e);
+ }, e = function(t) {
+ return i.getElementById(t);
}, m = {
labels: {
ok: "OK",
@@ -25989,200 +25955,200 @@ define("editor", [ "jquery", "underscore", "utils", "settings", "eventMgr", "pri
buttonReverse: !1,
buttonFocus: "ok",
transition: void 0,
- addListeners: function(e) {
- var t, s, l, c, u, d = void 0 !== r, p = void 0 !== i, f = void 0 !== h, m = "", g = this;
- t = function(t) {
- return void 0 !== t.preventDefault && t.preventDefault(), l(t), void 0 !== h && (m = h.value),
- "function" == typeof e && (void 0 !== h ? e(!0, m) : e(!0)), !1;
- }, s = function(t) {
- return void 0 !== t.preventDefault && t.preventDefault(), l(t), "function" == typeof e && e(!1),
+ addListeners: function(t) {
+ var e, s, l, c, u, d = void 0 !== r, p = void 0 !== n, f = void 0 !== h, m = "", g = this;
+ e = function(e) {
+ return void 0 !== e.preventDefault && e.preventDefault(), l(e), void 0 !== h && (m = h.value),
+ "function" == typeof t && (void 0 !== h ? t(!0, m) : t(!0)), !1;
+ }, s = function(e) {
+ return void 0 !== e.preventDefault && e.preventDefault(), l(e), "function" == typeof t && t(!1),
!1;
- }, l = function() {
- g.hide(), g.unbind(n.body, "keyup", c), g.unbind(o, "focus", u), d && g.unbind(r, "click", t),
- p && g.unbind(i, "click", s);
- }, c = function(e) {
- var n = e.keyCode;
- (n === b.SPACE && !f || f && n === b.ENTER) && t(e), n === b.ESC && p && s(e);
- }, u = function() {
- f ? h.focus() : !p || g.buttonReverse ? r.focus() : i.focus();
- }, this.bind(o, "focus", u), this.bind(a, "focus", u), d && this.bind(r, "click", t),
- p && this.bind(i, "click", s), this.bind(n.body, "keyup", c), this.transition.supported || this.setFocus();
+ }, l = function(t) {
+ g.hide(), g.unbind(i.body, "keyup", c), g.unbind(o, "focus", u), d && g.unbind(r, "click", e),
+ p && g.unbind(n, "click", s);
+ }, c = function(t) {
+ var n = t.keyCode;
+ (n === b.SPACE && !f || f && n === b.ENTER) && e(t), n === b.ESC && p && s(t);
+ }, u = function(t) {
+ f ? h.focus() : !p || g.buttonReverse ? r.focus() : n.focus();
+ }, this.bind(o, "focus", u), this.bind(a, "focus", u), d && this.bind(r, "click", e),
+ p && this.bind(n, "click", s), this.bind(i.body, "keyup", c), this.transition.supported || this.setFocus();
},
- bind: function(e, t, n) {
- "function" == typeof e.addEventListener ? e.addEventListener(t, n, !1) : e.attachEvent && e.attachEvent("on" + t, n);
+ bind: function(t, e, n) {
+ "function" == typeof t.addEventListener ? t.addEventListener(e, n, !1) : t.attachEvent && t.attachEvent("on" + e, n);
},
handleErrors: function() {
- if (void 0 !== e.onerror) {
- var t = this;
- return e.onerror = function(e, n, i) {
- t.error("[" + e + " on line " + i + " of " + n + "]", 0);
+ if (void 0 !== t.onerror) {
+ var e = this;
+ return t.onerror = function(t, n, i) {
+ e.error("[" + t + " on line " + i + " of " + n + "]", 0);
}, !0;
}
return !1;
},
- appendButtons: function(e, t) {
- return this.buttonReverse ? t + e : e + t;
+ appendButtons: function(t, e) {
+ return this.buttonReverse ? e + t : t + e;
},
- build: function(e) {
- var t = "", n = e.type, i = e.message, r = e.cssClass || "";
- switch (t += '