diff --git a/demo/index.html b/demo/index.html index da9b97c..238c2e1 100644 --- a/demo/index.html +++ b/demo/index.html @@ -29,7 +29,7 @@ var md = new Remarkable({ // Highlighter function. Should return escaped html, // or '' if input not changed - highlight: function (/*str, lang*/) { + highlight: function (str, lang) { if (lang && hljs.getLanguage(lang)) { try { return hljs.highlight(lang, str).value; @@ -148,7 +148,7 @@ __This is bold text__ _This is italic text_ -~~Strike through this text.~~ +~~Strike through this text~~ ## Blockquotes diff --git a/dist/remarkable.js b/dist/remarkable.js index 090b561..7657e10 100644 --- a/dist/remarkable.js +++ b/dist/remarkable.js @@ -4,7 +4,7 @@ module.exports = require('./lib/'); -},{"./lib/":11}],1:[function(require,module,exports){ +},{"./lib/":10}],1:[function(require,module,exports){ // List of valid entities // // Generate with ./support/entities.js script @@ -2438,12 +2438,13 @@ module.exports = [ },{}],5:[function(require,module,exports){ // Utilities -'use strics'; +// +'use strict'; // Merge objects // -exports.assign = function (obj /*from1, from2, from3, ...*/) { +function assign(obj /*from1, from2, from3, ...*/) { var sources = Array.prototype.slice.call(arguments, 1); while (sources.length) { var source = sources.shift(); @@ -2461,9 +2462,76 @@ exports.assign = function (obj /*from1, from2, from3, ...*/) { } return obj; -}; +} + + +function escapeHtml(str) { + if (str.indexOf('&') >= 0) { str = str.replace(/&/g, '&'); } + if (str.indexOf('<') >= 0) { str = str.replace(/') >= 0) { str = str.replace(/>/g, '>'); } + if (str.indexOf('"') >= 0) { str = str.replace(/"/g, '"'); } + return str; +} + +var UNESCAPE_MD_RE = /\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g; + +function unescapeMd(str) { + if (str.indexOf('\\') < 0) { return str; } + return str.replace(UNESCAPE_MD_RE, '$1'); +} + +function isValidEntityCode(c) { + /*eslint no-bitwise:0*/ + // broken sequence + if (c >= 0xD800 && c <= 0xDFFF) { return false; } + if (c >= 0xF5 && c <= 0xFF) { return false; } + if (c === 0xC0 || c === 0xC1) { return false; } + // never used + if (c >= 0xFDD0 && c <= 0xFDEF) { return false; } + if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false; } + // control codes + if (c <= 0x1F) { return false; } + if (c >= 0x7F && c <= 0x9F) { return false; } + // out of range + if (c > 0x10FFFF) { return false; } + return true; +} + +function fromCodePoint(c) { + /*eslint no-bitwise:0*/ + if (c > 0xffff) { + c -= 0x10000; + var surrogate1 = 0xd800 + (c >> 10), + surrogate2 = 0xdc00 + (c & 0x3ff); + + return String.fromCharCode(surrogate1, surrogate2); + } + return String.fromCharCode(c); +} + +var NAMED_ENTITY_RE = /&([a-z][a-z0-9]{1,31});/gi; +var entities = require('./entities'); + +function replaceEntities(str) { + if (str.indexOf('&') < 0) { return str; } + + return str.replace(NAMED_ENTITY_RE, function(match, name) { + if (entities.hasOwnProperty(name)) { + return entities[name]; + } + return match; + }); +} + + +exports.assign = assign; +exports.escapeHtml = escapeHtml; +exports.unescapeMd = unescapeMd; +exports.isValidEntityCode = isValidEntityCode; +exports.fromCodePoint = fromCodePoint; +exports.replaceEntities = replaceEntities; -},{}],6:[function(require,module,exports){ +},{"./entities":1}],6:[function(require,module,exports){ // Commonmark default options 'use strict'; @@ -2553,163 +2621,6 @@ module.exports = { }; },{}],10:[function(require,module,exports){ -// Common functions for parsers - -'use strict'; - - -function isWhiteSpace(ch) { - return ch === 0x20; -} - -// Check if line has zero length or contains spaces only -function isEmpty(state, line) { - return state.bMarks[line] + state.tShift[line] >= state.eMarks[line]; -} - -// Scan lines from given one and return first not empty -function skipEmptyLines(state, from) { - for (var max = state.lineMax; from < max; from++) { - if (state.bMarks[from] + state.tShift[from] < state.eMarks[from]) { - break; - } - } - return from; -} - -// Skip spaces from given position. -function skipSpaces(state, pos) { - for (var max = state.src.length; pos < max; pos++) { - if (!isWhiteSpace(state.src.charCodeAt(pos))) { break; } - } - return pos; -} - -// Skip char codes from given position -function skipChars(state, pos, code) { - for (var max = state.src.length; pos < max; pos++) { - if (state.src.charCodeAt(pos) !== code) { break; } - } - return pos; -} - -// Skip char codes reverse from given position - 1 -function skipCharsBack(state, pos, code, min) { - if (pos <= min) { return pos; } - - while (pos > min) { - if (code !== state.src.charCodeAt(--pos)) { return pos + 1; } - } - return pos; -} - -// cut lines range from source. -function getLines(state, begin, end, indent, keepLastLF) { - var i, first, last, queue, - line = begin; - - if (begin >= end) { - return ''; - } - - // Opt: don't use push queue for single line; - if (line + 1 === end) { - first = state.bMarks[line] + Math.min(state.tShift[line], indent); - last = keepLastLF ? state.bMarks[end] : state.eMarks[end - 1]; - return state.src.slice(first, last); - } - - queue = new Array(end - begin); - - for (i = 0; line < end; line++, i++) { - first = state.bMarks[line] + Math.min(state.tShift[line], indent); - - if (line + 1 < end || keepLastLF) { - // TODO: boundary check? - last = state.eMarks[line] + 1; - } else { - last = state.eMarks[line]; - } - - queue[i] = state.src.slice(first, last); - } - - return queue.join(''); -} - - -function escapeHtml(str) { - if (str.indexOf('&') >= 0) { str = str.replace(/&/g, '&'); } - if (str.indexOf('<') >= 0) { str = str.replace(/') >= 0) { str = str.replace(/>/g, '>'); } - if (str.indexOf('"') >= 0) { str = str.replace(/"/g, '"'); } - return str; -} - -var UNESCAPE_MD_RE = /\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g; - -function unescapeMd(str) { - if (str.indexOf('\\') < 0) { return str; } - return str.replace(UNESCAPE_MD_RE, '$1'); -} - -function isValidEntityCode(c) { - /*eslint no-bitwise:0*/ - // broken sequence - if (c >= 0xD800 && c <= 0xDFFF) { return false; } - if (c >= 0xF5 && c <= 0xFF) { return false; } - if (c === 0xC0 || c === 0xC1) { return false; } - // never used - if (c >= 0xFDD0 && c <= 0xFDEF) { return false; } - if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false; } - // control codes - if (c <= 0x1F) { return false; } - if (c >= 0x7F && c <= 0x9F) { return false; } - // out of range - if (c > 0x10FFFF) { return false; } - return true; -} - -function fromCodePoint(c) { - /*eslint no-bitwise:0*/ - if (c > 0xffff) { - c -= 0x10000; - var surrogate1 = 0xd800 + (c >> 10), - surrogate2 = 0xdc00 + (c & 0x3ff); - - return String.fromCharCode(surrogate1, surrogate2); - } - return String.fromCharCode(c); -} - -var NAMED_ENTITY_RE = /&([a-z][a-z0-9]{1,31});/gi; -var entities = require('./common/entities'); - -function replaceEntities(str) { - if (str.indexOf('&') < 0) { return str; } - - return str.replace(NAMED_ENTITY_RE, function(match, name) { - if (entities.hasOwnProperty(name)) { - return entities[name]; - } - return match; - }); -} - -exports.isWhiteSpace = isWhiteSpace; -exports.isEmpty = isEmpty; -exports.skipEmptyLines = skipEmptyLines; -exports.skipSpaces = skipSpaces; -exports.skipChars = skipChars; -exports.getLines = getLines; -exports.skipCharsBack = skipCharsBack; -exports.escapeHtml = escapeHtml; -exports.unescapeMd = unescapeMd; -exports.isValidEntityCode = isValidEntityCode; -exports.fromCodePoint = fromCodePoint; -exports.replaceEntities = replaceEntities; - -},{"./common/entities":1}],11:[function(require,module,exports){ // Main perser class 'use strict'; @@ -2785,7 +2696,7 @@ Remarkable.prototype.render = function (src) { module.exports = Remarkable; -},{"./common/utils":5,"./defaults/commonmark":6,"./defaults/commonmark_rules":7,"./defaults/remarkable":8,"./parser_block":13,"./parser_inline":14,"./renderer":16,"./rules_typographer/linkify":41,"./typographer":43}],12:[function(require,module,exports){ +},{"./common/utils":5,"./defaults/commonmark":6,"./defaults/commonmark_rules":7,"./defaults/remarkable":8,"./parser_block":12,"./parser_inline":13,"./renderer":15,"./rules_typographer/linkify":40,"./typographer":42}],11:[function(require,module,exports){ 'use strict'; @@ -2912,6 +2823,8 @@ function parseLinkDestination(state, pos) { if (!href.length) { return false; } + if (!state.parser.validateLink(href)) { return false; } + state.pos = pos; state.link_content = href; return true; @@ -2963,7 +2876,7 @@ module.exports.parseLinkDestination = parseLinkDestination; module.exports.parseLinkTitle = parseLinkTitle; module.exports.normalizeReference = normalizeReference; -},{}],13:[function(require,module,exports){ +},{}],12:[function(require,module,exports){ // Block parser @@ -2973,9 +2886,6 @@ module.exports.normalizeReference = normalizeReference; var Ruler = require('./ruler'); var State = require('./rules_block/state_block'); -var skipEmptyLines = require('./helpers').skipEmptyLines; -var isEmpty = require('./helpers').isEmpty; - var rules = []; @@ -3026,7 +2936,7 @@ ParserBlock.prototype.tokenize = function (state, startLine, endLine) { hasEmptyLines = false; while (line < endLine) { - state.line = line = skipEmptyLines(state, line, endLine); + state.line = line = state.skipEmptyLines(line); if (line >= endLine) { break; } if (state.tShift[line] < state.blkIndent) { break; } @@ -3055,18 +2965,18 @@ ParserBlock.prototype.tokenize = function (state, startLine, endLine) { state.tight = !hasEmptyLines; // paragraph might "eat" one newline after it in nested lists - if (isEmpty(state, state.line - 1)) { + if (state.isEmpty(state.line - 1)) { hasEmptyLines = true; } line = state.line; - if (line < endLine && isEmpty(state, line)) { + if (line < endLine && state.isEmpty(line)) { hasEmptyLines = true; line++; // two empty lines should stop the parser in list mode - if (line < endLine && state.listMode && isEmpty(state, line)) { break; } + if (line < endLine && state.listMode && state.isEmpty(line)) { break; } state.line = line; } } @@ -3090,7 +3000,6 @@ ParserBlock.prototype.parse = function (src, options, env) { src = src.replace(/\u2424/g, '\n'); } - // TODO: benchmark it // Replace tabs with proper number of spaces (1..4) if (src.indexOf('\t') >= 0) { src = src.replace(/[\n\t]/g, function (match, offset) { @@ -3122,7 +3031,7 @@ ParserBlock.prototype.parse = function (src, options, env) { module.exports = ParserBlock; -},{"./helpers":10,"./ruler":17,"./rules_block/blockquote":18,"./rules_block/code":19,"./rules_block/fences":20,"./rules_block/heading":21,"./rules_block/hr":22,"./rules_block/htmlblock":23,"./rules_block/lheading":24,"./rules_block/list":25,"./rules_block/paragraph":26,"./rules_block/state_block":27,"./rules_block/table":28}],14:[function(require,module,exports){ +},{"./ruler":16,"./rules_block/blockquote":17,"./rules_block/code":18,"./rules_block/fences":19,"./rules_block/heading":20,"./rules_block/hr":21,"./rules_block/htmlblock":22,"./rules_block/lheading":23,"./rules_block/list":24,"./rules_block/paragraph":25,"./rules_block/state_block":26,"./rules_block/table":27}],13:[function(require,module,exports){ // Inline parser 'use strict'; @@ -3142,7 +3051,7 @@ rules.push(require('./rules_inline/text')); rules.push(require('./rules_inline/newline')); rules.push(require('./rules_inline/escape')); rules.push(require('./rules_inline/backticks')); -rules.push(require('./rules_inline/del')); +rules.push(require('./rules_inline/strikethrough')); rules.push(require('./rules_inline/emphasis')); rules.push(require('./rules_inline/links')); rules.push(require('./rules_inline/autolink')); @@ -3150,6 +3059,10 @@ rules.push(require('./rules_inline/htmltag')); rules.push(require('./rules_inline/entity')); rules.push(require('./rules_inline/escape_html_char')); +function validateLink(url) { + if (url.indexOf('javas' + 'cript:') === 0) { return false; } + return true; +} // Inline Parser class // @@ -3161,6 +3074,10 @@ function ParserInline() { // - '<>"' added for internal html escaping this.textMatch = /^[^\n\\`*_\[\]!&{}$%@<>"~]+/; + // By default CommonMark allows too much in links + // If you need to restrict it - override this with your validator. + this.validateLink = validateLink; + this.ruler = new Ruler(this.rulesUpdate.bind(this)); for (var i = 0; i < rules.length; i++) { @@ -3249,13 +3166,12 @@ ParserInline.prototype.parse = function (str, options, env) { module.exports = ParserInline; -},{"./ruler":17,"./rules_inline/autolink":29,"./rules_inline/backticks":30,"./rules_inline/del":31,"./rules_inline/emphasis":32,"./rules_inline/entity":33,"./rules_inline/escape":34,"./rules_inline/escape_html_char":35,"./rules_inline/htmltag":36,"./rules_inline/links":37,"./rules_inline/newline":38,"./rules_inline/state_inline":39,"./rules_inline/text":40}],15:[function(require,module,exports){ +},{"./ruler":16,"./rules_inline/autolink":28,"./rules_inline/backticks":29,"./rules_inline/emphasis":30,"./rules_inline/entity":31,"./rules_inline/escape":32,"./rules_inline/escape_html_char":33,"./rules_inline/htmltag":34,"./rules_inline/links":35,"./rules_inline/newline":36,"./rules_inline/state_inline":37,"./rules_inline/strikethrough":38,"./rules_inline/text":39}],14:[function(require,module,exports){ 'use strict'; var StateInline = require('./rules_inline/state_inline'); -var skipSpaces = require('./helpers').skipSpaces; var parseLinkLabel = require('./links').parseLinkLabel; var parseLinkDestination = require('./links').parseLinkDestination; var parseLinkTitle = require('./links').parseLinkTitle; @@ -3269,7 +3185,6 @@ module.exports = function parse_reference(str, parser, options, env) { if (str.charCodeAt(0) !== 0x5B/* [ */) { return -1; } - // TODO: benchmark this if (str.indexOf(']:') === -1) { return -1; } state = new StateInline(str, parser, options, env); @@ -3311,7 +3226,7 @@ module.exports = function parse_reference(str, parser, options, env) { } // ensure that the end of the line is empty - pos = skipSpaces(state, pos); + pos = state.skipSpaces(pos); if (pos < max && state.src.charCodeAt(pos) !== 0x0A) { return -1; } label = normalizeReference(str.slice(1, labelEnd)); @@ -3320,14 +3235,14 @@ module.exports = function parse_reference(str, parser, options, env) { return pos; }; -},{"./helpers":10,"./links":12,"./rules_inline/state_inline":39}],16:[function(require,module,exports){ +},{"./links":11,"./rules_inline/state_inline":37}],15:[function(require,module,exports){ 'use strict'; var assign = require('./common/utils').assign; -var escapeHtml = require('./helpers').escapeHtml; -var unescapeMd = require('./helpers').unescapeMd; -var replaceEntities = require('./helpers').replaceEntities; +var escapeHtml = require('./common/utils').escapeHtml; +var unescapeMd = require('./common/utils').unescapeMd; +var replaceEntities = require('./common/utils').replaceEntities; function escapeUrl(str) { @@ -3550,8 +3465,9 @@ function Renderer() { this.rules = assign({}, rules); } + Renderer.prototype.render = function (tokens, options) { - var i, len, rule, name, next, + var i, len, name, result = '', rules = this.rules, tightStack = []; @@ -3561,7 +3477,6 @@ Renderer.prototype.render = function (tokens, options) { for (i = 0, len = tokens.length; i < len; i++) { name = tokens[i].type; - rule = rules[name]; // Dirty stack machine to track lists style (loose/tight) if (name === 'ordered_list_open' || name === 'bullet_list_open') { @@ -3587,13 +3502,8 @@ Renderer.prototype.render = function (tokens, options) { } if (name === 'paragraph_close' && tight) { // Quick hack - texts should have LF if followed by blocks - if (i + 1 < tokens.length) { - next = tokens[i + 1].type; - if (next === 'bullet_list_open' || - next === 'ordered_list_open' || - next === 'blockquote_open') { - result += '\n'; - } + if (tokens[i + 1].type !== 'list_item_close') { + result += '\n'; } continue; @@ -3602,11 +3512,7 @@ Renderer.prototype.render = function (tokens, options) { if (tokens[i].type === 'inline') { result += this.render(tokens[i].children, options); } else { - // TODO: temporary check - if (!rule) { - throw new Error('Renderer error: unknown token ' + name); - } - result += rule(tokens, i, options); + result += rules[name](tokens, i, options); } } @@ -3615,7 +3521,7 @@ Renderer.prototype.render = function (tokens, options) { module.exports = Renderer; -},{"./common/utils":5,"./helpers":10}],17:[function(require,module,exports){ +},{"./common/utils":5}],16:[function(require,module,exports){ // Ruler is helper class to build responsibility chains from parse rules. // It allows: // @@ -3830,15 +3736,12 @@ Ruler.prototype.disable = function (list) { module.exports = Ruler; -},{}],18:[function(require,module,exports){ +},{}],17:[function(require,module,exports){ // Block quotes 'use strict'; -var skipSpaces = require('../helpers').skipSpaces; - - module.exports = function blockquote(state, startLine, endLine, silent) { var nextLine, lastLineEmpty, oldTShift, oldBMarks, oldIndent, oldListMode, terminatorRules = state.parser._rulesBlockquoteTerm, i, l, terminate, @@ -3868,7 +3771,7 @@ module.exports = function blockquote(state, startLine, endLine, silent) { state.bMarks[startLine] = pos; // check if we have an empty blockquote - pos = pos < max ? skipSpaces(state, pos) : pos; + pos = pos < max ? state.skipSpaces(pos) : pos; lastLineEmpty = pos >= max; oldTShift = [ state.tShift[startLine] ]; @@ -3911,7 +3814,7 @@ module.exports = function blockquote(state, startLine, endLine, silent) { oldBMarks.push(state.bMarks[nextLine]); state.bMarks[nextLine] = pos; - pos = pos < max ? skipSpaces(state, pos) : pos; + pos = pos < max ? state.skipSpaces(pos) : pos; lastLineEmpty = pos >= max; oldTShift.push(state.tShift[nextLine]); @@ -3955,16 +3858,12 @@ module.exports = function blockquote(state, startLine, endLine, silent) { return true; }; -},{"../helpers":10}],19:[function(require,module,exports){ +},{}],18:[function(require,module,exports){ // Code block (4 spaces padded) 'use strict'; -var isEmpty = require('../helpers').isEmpty; -var getLines = require('../helpers').getLines; - - module.exports = function code(state, startLine, endLine, silent) { var nextLine, last; @@ -3974,7 +3873,7 @@ module.exports = function code(state, startLine, endLine, silent) { while (nextLine < endLine) { if (state.bqMarks[nextLine] < state.bqLevel) { break; } - if (isEmpty(state, nextLine)) { + if (state.isEmpty(nextLine)) { nextLine++; continue; } @@ -3990,7 +3889,7 @@ module.exports = function code(state, startLine, endLine, silent) { state.tokens.push({ type: 'code', - content: getLines(state, startLine, last, 4 + state.blkIndent, true), + content: state.getLines(startLine, last, 4 + state.blkIndent, true), block: true, level: state.level }); @@ -3999,17 +3898,12 @@ module.exports = function code(state, startLine, endLine, silent) { return true; }; -},{"../helpers":10}],20:[function(require,module,exports){ +},{}],19:[function(require,module,exports){ // fences (``` lang, ~~~ lang) 'use strict'; -var skipSpaces = require('../helpers').skipSpaces; -var skipChars = require('../helpers').skipChars; -var getLines = require('../helpers').getLines; - - module.exports = function fences(state, startLine, endLine, silent) { var marker, len, params, nextLine, mem, haveEndMarker = false, @@ -4026,7 +3920,7 @@ module.exports = function fences(state, startLine, endLine, silent) { // scan marker length mem = pos; - pos = skipChars(state, pos, marker); + pos = state.skipChars(pos, marker); len = pos - mem; @@ -4047,10 +3941,6 @@ module.exports = function fences(state, startLine, endLine, silent) { if (nextLine >= endLine) { // unclosed block should be autoclosed by end of document. // also block seems to be autoclosed by end of parent - /*if (state.blkLevel === 0) { - break; - } - return false;*/ break; } @@ -4067,13 +3957,13 @@ module.exports = function fences(state, startLine, endLine, silent) { if (state.src.charCodeAt(pos) !== marker) { continue; } - pos = skipChars(state, pos, marker); + pos = state.skipChars(pos, marker); // closing code fence must be at least as long as the opening one if (pos - mem < len) { continue; } // make sure tail has spaces only - pos = skipSpaces(state, pos); + pos = state.skipSpaces(pos); if (pos < max) { continue; } @@ -4088,7 +3978,7 @@ module.exports = function fences(state, startLine, endLine, silent) { state.tokens.push({ type: 'fence', params: params, - content: getLines(state, startLine + 1, nextLine, len, true), + content: state.getLines(startLine + 1, nextLine, len, true), level: state.level }); @@ -4096,17 +3986,12 @@ module.exports = function fences(state, startLine, endLine, silent) { return true; }; -},{"../helpers":10}],21:[function(require,module,exports){ +},{}],20:[function(require,module,exports){ // heading (#, ##, ...) 'use strict'; -var isWhiteSpace = require('../helpers').isWhiteSpace; -var skipSpaces = require('../helpers').skipSpaces; -var skipCharsBack = require('../helpers').skipCharsBack; - - module.exports = function heading(state, startLine, endLine, silent) { var ch, level, pos = state.bMarks[startLine] + state.tShift[startLine], @@ -4126,16 +4011,16 @@ module.exports = function heading(state, startLine, endLine, silent) { ch = state.src.charCodeAt(++pos); } - if (level > 6 || (pos < max && !isWhiteSpace(ch))) { return false; } + if (level > 6 || (pos < max && ch !== 0x20/* space */)) { return false; } // skip spaces before heading text - pos = skipSpaces(state, pos); + pos = state.skipSpaces(pos); // Now pos contains offset of first heared char // Let's cut tails like ' ### ' from the end of string - max = skipCharsBack(state, max, 0x20/* space */, pos); - max = skipCharsBack(state, max, 0x23/* # */, pos); + max = state.skipCharsBack(max, 0x20/* space */, pos); + max = state.skipCharsBack(max, 0x23/* # */, pos); if (max < state.eMarks[startLine] && state.src.charCodeAt(max) === 0x23/* # */ && @@ -4145,7 +4030,7 @@ module.exports = function heading(state, startLine, endLine, silent) { // ## Foo #### // ^^^ - max = skipCharsBack(state, max, 0x20/* space */, pos); + max = state.skipCharsBack(max, 0x20/* space */, pos); if (silent) { return true; } @@ -4164,15 +4049,12 @@ module.exports = function heading(state, startLine, endLine, silent) { return true; }; -},{"../helpers":10}],22:[function(require,module,exports){ +},{}],21:[function(require,module,exports){ // Horizontal rule 'use strict'; -var isWhiteSpace = require('../helpers').isWhiteSpace; - - module.exports = function hr(state, startLine, endLine, silent) { var marker, cnt, ch, pos = state.bMarks[startLine], @@ -4196,7 +4078,7 @@ module.exports = function hr(state, startLine, endLine, silent) { cnt = 1; while (pos < max) { ch = state.src.charCodeAt(pos++); - if (ch !== marker && !isWhiteSpace(ch)) { return false; } + if (ch !== marker && ch !== 0x20/* space */) { return false; } if (ch === marker) { cnt++; } } @@ -4210,15 +4092,12 @@ module.exports = function hr(state, startLine, endLine, silent) { return true; }; -},{"../helpers":10}],23:[function(require,module,exports){ +},{}],22:[function(require,module,exports){ // HTML block 'use strict'; -var isEmpty = require('../helpers').isEmpty; -var getLines = require('../helpers').getLines; - var block_names = require('../common/html_blocks'); @@ -4241,7 +4120,7 @@ module.exports = function htmlblock(state, startLine, endLine, silent) { if (!state.options.html) { return false; } - if (shift > 3 || pos + 2 >= max || state.blkLevel > 0) { return false; } + if (shift > 3 || pos + 2 >= max) { return false; } if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; } @@ -4274,31 +4153,26 @@ module.exports = function htmlblock(state, startLine, endLine, silent) { // If we are here - we detected HTML block. // Let's roll down till empty line (block end). nextLine = startLine + 1; - while (nextLine < state.lineMax && !isEmpty(state, nextLine)) { + while (nextLine < state.lineMax && !state.isEmpty(nextLine)) { nextLine++; } state.tokens.push({ type: 'htmlblock', level: state.level, - content: getLines(state, startLine, nextLine, 0, true) + content: state.getLines(startLine, nextLine, 0, true) }); state.line = nextLine; return true; }; -},{"../common/html_blocks":2,"../helpers":10}],24:[function(require,module,exports){ +},{"../common/html_blocks":2}],23:[function(require,module,exports){ // lheading (---, ===) 'use strict'; -var skipSpaces = require('../helpers').skipSpaces; -var skipChars = require('../helpers').skipChars; -var skipCharsBack = require('../helpers').skipCharsBack; - - module.exports = function lheading(state, startLine, endLine, silent) { var marker, pos, max, next = startLine + 1; @@ -4317,16 +4191,15 @@ module.exports = function lheading(state, startLine, endLine, silent) { if (marker !== 0x2D/* - */ && marker !== 0x3D/* = */) { return false; } - pos = skipChars(state, pos, marker); + pos = state.skipChars(pos, marker); - pos = skipSpaces(state, pos); + pos = state.skipSpaces(pos); if (pos < max) { return false; } if (silent) { return true; } pos = state.bMarks[startLine] + state.tShift[startLine]; - max = skipCharsBack(state, state.eMarks[startLine], 0x20/* space */, pos); state.tokens.push({ type: 'heading_open', @@ -4335,7 +4208,7 @@ module.exports = function lheading(state, startLine, endLine, silent) { }); state.tokens.push({ type: 'inline', - content: state.src.slice(pos, max).trim(), + content: state.src.slice(pos, state.eMarks[startLine]).trim(), level: state.level + 1 }); state.tokens.push({ @@ -4348,16 +4221,12 @@ module.exports = function lheading(state, startLine, endLine, silent) { return true; }; -},{"../helpers":10}],25:[function(require,module,exports){ +},{}],24:[function(require,module,exports){ // Lists 'use strict'; -var isEmpty = require('../helpers').isEmpty; -var skipSpaces = require('../helpers').skipSpaces; - - // Search `[-+*][\n ]`, returns next pos arter marker on success // or -1 on fail. function skipBulletListMarker(state, startLine) { @@ -4490,7 +4359,7 @@ module.exports = function list(state, startLine, endLine, silent) { prevEmptyEnd = false; while (nextLine < endLine) { - contentStart = skipSpaces(state, posAfterMarker); + contentStart = state.skipSpaces(posAfterMarker); max = state.eMarks[nextLine]; if (contentStart >= max) { @@ -4534,7 +4403,7 @@ module.exports = function list(state, startLine, endLine, silent) { } // Item become loose if finish with empty line, // but we should filter last element, because it means list finish - prevEmptyEnd = (state.line - startLine) > 1 && isEmpty(state, state.line - 1); + prevEmptyEnd = (state.line - startLine) > 1 && state.isEmpty(state.line - 1); state.blkIndent = oldIndent; state.tShift[startLine] = oldTShift; @@ -4548,13 +4417,8 @@ module.exports = function list(state, startLine, endLine, silent) { if (nextLine >= endLine) { break; } - if (isEmpty(state, nextLine)) { - if (nextLine >= endLine || isEmpty(state, nextLine)) { - // two newlines end the list - break; - } else { - nextLine++; - } + if (state.isEmpty(nextLine)) { + break; } // @@ -4596,14 +4460,12 @@ module.exports = function list(state, startLine, endLine, silent) { return true; }; -},{"../helpers":10}],26:[function(require,module,exports){ +},{}],25:[function(require,module,exports){ // Paragraph 'use strict'; -var isEmpty = require('../helpers').isEmpty; -var getLines = require('../helpers').getLines; var parseRef = require('../parser_ref'); @@ -4615,7 +4477,7 @@ module.exports = function paragraph(state, startLine/*, endLine*/) { endLine = state.lineMax; // jump line-by-line until empty one or EOF - for (; nextLine < endLine && !isEmpty(state, nextLine); nextLine++) { + for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) { // this would be a code block normally, but after paragraph // it's considered a lazy continuation regardless of what's there if (state.tShift[nextLine] - state.blkIndent > 3) { continue; } @@ -4631,7 +4493,7 @@ module.exports = function paragraph(state, startLine/*, endLine*/) { if (terminate) { break; } } - content = getLines(state, startLine, nextLine, state.blkIndent, false).trim(); + content = state.getLines(startLine, nextLine, state.blkIndent, false).trim(); while (content.length) { pos = parseRef(content, state.parser.inline, state.options, state.env); @@ -4653,7 +4515,7 @@ module.exports = function paragraph(state, startLine/*, endLine*/) { return true; }; -},{"../helpers":10,"../parser_ref":15}],27:[function(require,module,exports){ +},{"../parser_ref":14}],26:[function(require,module,exports){ // Parser state class 'use strict'; @@ -4662,10 +4524,6 @@ module.exports = function paragraph(state, startLine/*, endLine*/) { function State(src, parser, tokens, options, env) { var ch, s, start, pos, len, indent, indent_found; - // TODO: check if we can move string replaces to parser, to avoid - // unnesessary call on shadow clone creation. Or check if we can do - // cloning more effectively. Profile first. - // Prepare string to parse: // // - replace tabs with spaces @@ -4676,7 +4534,6 @@ function State(src, parser, tokens, options, env) { // Shortcuts to simplify nested calls this.parser = parser; - // TODO: (?) set directly for faster access. this.options = options; this.env = env; @@ -4687,10 +4544,25 @@ function State(src, parser, tokens, options, env) { this.tokens = tokens; - this.bMarks = []; // line begin offsets for fast jumps - this.eMarks = []; // line end offsets for fast jumps - this.tShift = []; // indent for each line + this.bMarks = []; // line begin offsets for fast jumps + this.eMarks = []; // line end offsets for fast jumps + this.tShift = []; // indent for each line + this.bqMarks = []; // lines shifts in blockquotes (calculated on bq enter) + + // block parser variables + this.blkIndent = 0; + this.line = 0; // line index in src + this.lineMax = 0; // lines count + this.tight = false; // loose/tight mode for lists + this.listMode = false; // if true, block parser stops on two newlines + this.bqLevel = 0; // blockquote nesting level + + this.level = 0; + + // renderer + this.result = ''; + // Create caches // Generate markers. s = this.src; indent = 0; @@ -4699,32 +4571,33 @@ function State(src, parser, tokens, options, env) { for (start = pos = indent = 0, len = s.length; pos < len; pos++) { ch = s.charCodeAt(pos); - // TODO: check other spaces and tabs too or keep existing regexp replace ?? - if (!indent_found && ch === 0x20/* space */) { - indent++; - } - if (!indent_found && ch !== 0x20/* space */) { - this.tShift.push(indent); - indent_found = true; + if (!indent_found) { + if (ch === 0x20/* space */) { + indent++; + continue; + } else { + this.tShift.push(indent); + indent_found = true; + } } - - if (ch === 0x0D || ch === 0x0A) { + if (ch === 0x0A || ch === 0x0D) { this.bMarks.push(start); this.eMarks.push(pos); indent_found = false; indent = 0; start = pos + 1; - } - if (ch === 0x0D && pos < len && s.charCodeAt(pos) === 0x0A) { - pos++; - start++; + + if (ch === 0x0D && pos + 1 < len && s.charCodeAt(pos + 1) === 0x0A) { + pos++; + start++; + } } } if (ch !== 0x0D || ch !== 0x0A) { this.bMarks.push(start); this.eMarks.push(len); - this.tShift.push(indent); + if (!indent_found) { this.tShift.push(indent); } } // Push fake entry to simplify cache bounds checks @@ -4732,32 +4605,87 @@ function State(src, parser, tokens, options, env) { this.eMarks.push(s.length); this.tShift.push(0); - // inline parser variables - this.pos = 0; // char index in src - - // block parser variables - this.blkLevel = 0; - this.blkIndent = 0; - this.line = 0; // line index in src - this.lineMax = this.bMarks.length - 1; // don't count last fake line - this.tight = false; // loose/tight mode for lists - this.listMode = false; // if true, block parser stops on two newlines + this.lineMax = this.bMarks.length - 1; // don't count last fake line - // Stuff for blockquotes - this.bqLevel = 0; - this.bqMarks = []; - for (start = 0; start < this.bMarks.length; start++) { + for (start = this.bMarks.length; start > 0; start--) { this.bqMarks.push(0); } - - this.level = 0; - - // renderer - this.result = ''; } +State.prototype.isEmpty = function isEmpty(line) { + return this.bMarks[line] + this.tShift[line] >= this.eMarks[line]; +}; -// Create shadow clone of curent state with new input data +State.prototype.skipEmptyLines = function skipEmptyLines(from) { + for (var max = this.lineMax; from < max; from++) { + if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) { + break; + } + } + return from; +}; + +// Skip spaces from given position. +State.prototype.skipSpaces = function skipSpaces(pos) { + for (var max = this.src.length; pos < max; pos++) { + if (this.src.charCodeAt(pos) !== 0x20/* space */) { break; } + } + return pos; +}; + +// Skip char codes from given position +State.prototype.skipChars = function skipChars(pos, code) { + for (var max = this.src.length; pos < max; pos++) { + if (this.src.charCodeAt(pos) !== code) { break; } + } + return pos; +}; + +// Skip char codes reverse from given position - 1 +State.prototype.skipCharsBack = function skipCharsBack(pos, code, min) { + if (pos <= min) { return pos; } + + while (pos > min) { + if (code !== this.src.charCodeAt(--pos)) { return pos + 1; } + } + return pos; +}; + +// cut lines range from source. +State.prototype.getLines = function getLines(begin, end, indent, keepLastLF) { + var i, first, last, queue, + line = begin; + + if (begin >= end) { + return ''; + } + + // Opt: don't use push queue for single line; + if (line + 1 === end) { + first = this.bMarks[line] + Math.min(this.tShift[line], indent); + last = keepLastLF ? this.bMarks[end] : this.eMarks[end - 1]; + return this.src.slice(first, last); + } + + queue = new Array(end - begin); + + for (i = 0; line < end; line++, i++) { + first = this.bMarks[line] + Math.min(this.tShift[line], indent); + + if (line + 1 < end || keepLastLF) { + // No need for bounds check because we have fake entry on tail. + last = this.eMarks[line] + 1; + } else { + last = this.eMarks[line]; + } + + queue[i] = this.src.slice(first, last); + } + + return queue.join(''); +}; + +// Create shadow clone of curent state with new input data State.prototype.clone = function clone(src) { return new State( src, @@ -4769,7 +4697,7 @@ State.prototype.clone = function clone(src) { module.exports = State; -},{}],28:[function(require,module,exports){ +},{}],27:[function(require,module,exports){ // GFM table, non-standard 'use strict'; @@ -4859,11 +4787,11 @@ module.exports = function table(state, startLine, endLine, silent) { return true; }; -},{}],29:[function(require,module,exports){ +},{}],28:[function(require,module,exports){ // Process autolinks '' -var escapeHtml = require('../helpers').escapeHtml; +var escapeHtml = require('../common/utils').escapeHtml; var url_schemas = require('../common/url_schemas'); @@ -4873,7 +4801,7 @@ var AUTOLINK_RE = /^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/; module.exports = function autolink(state) { - var tail, linkMatch, emailMatch, pos = state.pos; + var tail, linkMatch, emailMatch, url, pos = state.pos; if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; } @@ -4886,14 +4814,18 @@ module.exports = function autolink(state) { if (linkMatch) { if (url_schemas.indexOf(linkMatch[1].toLowerCase()) < 0) { return false; } + url = linkMatch[0].slice(1, -1); + + if (!state.parser.validateLink(url)) { return false; } + state.push({ type: 'link_open', - href: linkMatch[0].slice(1, -1), + href: url, level: state.level }); state.push({ type: 'text', - content: escapeHtml(linkMatch[0].slice(1, -1)), + content: escapeHtml(url), level: state.level + 1 }); state.push({ type: 'link_close', level: state.level }); @@ -4905,14 +4837,19 @@ module.exports = function autolink(state) { emailMatch = tail.match(EMAIL_RE); if (emailMatch) { + + url = emailMatch[0].slice(1, -1); + + if (!state.parser.validateLink('mailto:' + url)) { return false; } + state.push({ type: 'link_open', - href: 'mailto:' + emailMatch[0].slice(1, -1), + href: 'mailto:' + url, level: state.level }); state.push({ type: 'text', - content: escapeHtml(emailMatch[0].slice(1, -1)), + content: escapeHtml(url), level: state.level + 1 }); state.push({ type: 'link_close', level: state.level }); @@ -4924,7 +4861,7 @@ module.exports = function autolink(state) { return false; }; -},{"../common/url_schemas":4,"../helpers":10}],30:[function(require,module,exports){ +},{"../common/url_schemas":4,"../common/utils":5}],29:[function(require,module,exports){ // Parse backticks var END_RE = /`+/g; @@ -4969,114 +4906,7 @@ module.exports = function backticks(state) { return true; }; -},{}],31:[function(require,module,exports){ -// Process ~~strikeout~~ - -'use strict'; - -module.exports = function del(state) { - var oldLength, - oldPending, - oldFlag, - found, - ok, - pos, - stack, - max = state.posMax, - start = state.pos, - lastChar, - nextChar; - - if (state.src.charCodeAt(start) !== 0x7E/* ~ */) { return false; } - if (start + 4 >= max) { return false; } - if (state.src.charCodeAt(start + 1) !== 0x7E/* ~ */) { return false; } - - // make del lower a priority tag with respect to links, same as ; - // this code also prevents recursion - if (state.validateInsideEm || state.validateInsideLink) { return false; } - - if (state.level >= state.options.level) { return false; } - - lastChar = state.pending.length !== 0 ? state.pending.charCodeAt(state.pending.length - 1) : -1; - nextChar = state.src.charCodeAt(start + 2); - - if (lastChar === 0x7E/* ~ */) { return false; } - if (nextChar === 0x7E/* */) { return false; } - if (nextChar === 0x20/* */) { return false; } - - pos = start + 2; - while (pos < max && state.src.charCodeAt(pos) === 0x7E/* ~ */) { pos++; } - if (pos !== start + 2) { - // sequence of 3+ markers taking as literal, same as in a emphasis - state.pos += pos - start; - state.pending += state.src.slice(start, pos); - return true; - } - - oldLength = state.tokens.length; - oldPending = state.pending; - oldFlag = state.validateInsideEm; - - state.pos = start + 2; - state.validateInsideEm = true; - stack = 1; - - while (state.pos + 1 < max) { - if (state.src.charCodeAt(state.pos) === 0x7E/* ~ */) { - if (state.src.charCodeAt(state.pos + 1) === 0x7E/* ~ */) { - lastChar = state.pending.length !== 0 ? state.pending.charCodeAt(state.pending.length - 1) : -1; - nextChar = state.pos + 2 < max ? state.src.charCodeAt(state.pos + 2) : -1; - if (nextChar !== 0x7E/* ~ */ && lastChar !== 0x7E/* ~ */) { - if (lastChar !== 0x20) { - // closing '~~' - stack--; - } else if (nextChar !== 0x20) { - // opening '~~' - stack++; - } // else { - // // standalone ' ~~ ' indented with spaces - //} - if (stack <= 0) { - found = true; - break; - } - } - } - } - - ok = state.parser.tokenizeSingle(state); - - if (!ok) { - state.pending += state.src[state.pos]; - state.pos++; - } - } - - // restore old state - state.tokens.length = oldLength; - state.pending = oldPending; - state.validateInsideEm = oldFlag; - - if (!found) { - // parser failed to find ending tag, so it's not valid emphasis - state.pos = start; - return false; - } - - // found! - state.posMax = state.pos; - state.pos = start + 2; - - state.push({ type: 'del_open', level: state.level++ }); - state.parser.tokenize(state); - state.push({ type: 'del_close', level: --state.level }); - - state.pos = state.posMax + 2; - state.posMax = max; - return true; -}; - -},{}],32:[function(require,module,exports){ +},{}],30:[function(require,module,exports){ // Process *this* and _that_ 'use strict'; @@ -5312,15 +5142,15 @@ module.exports = function emphasis(state/*, silent*/) { return true; }; -},{}],33:[function(require,module,exports){ +},{}],31:[function(require,module,exports){ // Proceess html entity - {, ¯, ", ... 'use strict'; var entities = require('../common/entities'); -var escapeHtml = require('../helpers').escapeHtml; -var isValidEntityCode = require('../helpers').isValidEntityCode; -var fromCodePoint = require('../helpers').fromCodePoint; +var escapeHtml = require('../common/utils').escapeHtml; +var isValidEntityCode = require('../common/utils').isValidEntityCode; +var fromCodePoint = require('../common/utils').fromCodePoint; var DIGITAL_RE = /^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i; @@ -5360,7 +5190,7 @@ module.exports = function entity(state) { return true; }; -},{"../common/entities":1,"../helpers":10}],34:[function(require,module,exports){ +},{"../common/entities":1,"../common/utils":5}],32:[function(require,module,exports){ // Proceess escaped chars and hardbreaks var ESCAPED = '\\!"#$%&\'()*+,./:;<=>?@[]^_`{|}~-' @@ -5414,7 +5244,7 @@ module.exports = function escape(state) { return true; }; -},{}],35:[function(require,module,exports){ +},{}],33:[function(require,module,exports){ // Process < > " (& was processed in markdown escape) module.exports = function escape_html_char(state) { @@ -5434,7 +5264,7 @@ module.exports = function escape_html_char(state) { return true; }; -},{}],36:[function(require,module,exports){ +},{}],34:[function(require,module,exports){ // Process html tags 'use strict'; @@ -5484,7 +5314,7 @@ module.exports = function htmltag(state) { return true; }; -},{"../common/html_re":3}],37:[function(require,module,exports){ +},{"../common/html_re":3}],35:[function(require,module,exports){ // Process [links]( "stuff") 'use strict'; @@ -5650,7 +5480,7 @@ function links(state) { module.exports = links; -},{"../links":12}],38:[function(require,module,exports){ +},{"../links":11}],36:[function(require,module,exports){ // Proceess '\n' module.exports = function newline(state) { @@ -5696,7 +5526,7 @@ module.exports = function newline(state) { return true; }; -},{}],39:[function(require,module,exports){ +},{}],37:[function(require,module,exports){ // Inline parser state 'use strict'; @@ -5741,9 +5571,123 @@ StateInline.prototype.push = function (token) { this.pendingLevel = this.level; }; +StateInline.prototype.skipSpaces = function skipSpaces(pos) { + for (var max = this.src.length; pos < max; pos++) { + if (this.src.charCodeAt(pos) !== 0x20/* space */) { break; } + } + return pos; +}; + module.exports = StateInline; -},{}],40:[function(require,module,exports){ +},{}],38:[function(require,module,exports){ +// Process ~~strike through~~ + +'use strict'; + +module.exports = function strikethrough(state) { + var oldLength, + oldPending, + oldFlag, + found, + ok, + pos, + stack, + max = state.posMax, + start = state.pos, + lastChar, + nextChar; + + if (state.src.charCodeAt(start) !== 0x7E/* ~ */) { return false; } + if (start + 4 >= max) { return false; } + if (state.src.charCodeAt(start + 1) !== 0x7E/* ~ */) { return false; } + + // make del lower a priority tag with respect to links, same as ; + // this code also prevents recursion + if (state.validateInsideEm || state.validateInsideLink) { return false; } + + if (state.level >= state.options.level) { return false; } + + lastChar = state.pending.length !== 0 ? state.pending.charCodeAt(state.pending.length - 1) : -1; + nextChar = state.src.charCodeAt(start + 2); + + if (lastChar === 0x7E/* ~ */) { return false; } + if (nextChar === 0x7E/* */) { return false; } + if (nextChar === 0x20/* */) { return false; } + + pos = start + 2; + while (pos < max && state.src.charCodeAt(pos) === 0x7E/* ~ */) { pos++; } + if (pos !== start + 2) { + // sequence of 3+ markers taking as literal, same as in a emphasis + state.pos += pos - start; + state.pending += state.src.slice(start, pos); + return true; + } + + oldLength = state.tokens.length; + oldPending = state.pending; + oldFlag = state.validateInsideEm; + + state.pos = start + 2; + state.validateInsideEm = true; + stack = 1; + + while (state.pos + 1 < max) { + if (state.src.charCodeAt(state.pos) === 0x7E/* ~ */) { + if (state.src.charCodeAt(state.pos + 1) === 0x7E/* ~ */) { + lastChar = state.pending.length !== 0 ? state.pending.charCodeAt(state.pending.length - 1) : -1; + nextChar = state.pos + 2 < max ? state.src.charCodeAt(state.pos + 2) : -1; + if (nextChar !== 0x7E/* ~ */ && lastChar !== 0x7E/* ~ */) { + if (lastChar !== 0x20) { + // closing '~~' + stack--; + } else if (nextChar !== 0x20) { + // opening '~~' + stack++; + } // else { + // // standalone ' ~~ ' indented with spaces + //} + if (stack <= 0) { + found = true; + break; + } + } + } + } + + ok = state.parser.tokenizeSingle(state); + + if (!ok) { + state.pending += state.src[state.pos]; + state.pos++; + } + } + + // restore old state + state.tokens.length = oldLength; + state.pending = oldPending; + state.validateInsideEm = oldFlag; + + if (!found) { + // parser failed to find ending tag, so it's not valid emphasis + state.pos = start; + return false; + } + + // found! + state.posMax = state.pos; + state.pos = start + 2; + + state.push({ type: 'del_open', level: state.level++ }); + state.parser.tokenize(state); + state.push({ type: 'del_close', level: --state.level }); + + state.pos = state.posMax + 2; + state.posMax = max; + return true; +}; + +},{}],39:[function(require,module,exports){ // Skip text characters for text token, place those to pendibg buffer // and increment current pos @@ -5758,7 +5702,7 @@ module.exports = function text(state) { return true; }; -},{}],41:[function(require,module,exports){ +},{}],40:[function(require,module,exports){ // Replace link-like texts with link nodes. // // Currently restricted to http/https/ftp @@ -5767,7 +5711,7 @@ module.exports = function text(state) { var Autolinker = require('autolinker'); -var escapeHtml = require('../helpers').escapeHtml; +var escapeHtml = require('../common/utils').escapeHtml; var links = []; @@ -5775,12 +5719,8 @@ var autolinker = new Autolinker({ stripPrefix: false, replaceFn: function (autolinker, match) { // Only collect matched strings but don't change anything. - var url; if (match.getType() === 'url') { - url = match.getUrl(); - if (/^(http|https|ftp|git)/.test(url)) { - links.push(url); - } + links.push(match.getUrl()); } return false; } @@ -5818,6 +5758,9 @@ module.exports = function linkify(t, state) { level = token.level; for (ln = 0; ln < links.length; ln++) { + + if (!state.parser.validateLink(links[ln])) { continue; } + pos = text.indexOf(links[ln]); if (pos) { level = level; @@ -5858,7 +5801,7 @@ module.exports = function linkify(t, state) { } }; -},{"../helpers":10,"autolinker":44}],42:[function(require,module,exports){ +},{"../common/utils":5,"autolinker":43}],41:[function(require,module,exports){ // Simple typographyc replacements // 'use strict'; @@ -5912,7 +5855,7 @@ module.exports = function replace(t, state) { } }; -},{}],43:[function(require,module,exports){ +},{}],42:[function(require,module,exports){ // Class of typographic replacements rules // 'use strict'; @@ -5969,7 +5912,7 @@ Typographer.prototype.process = function (state) { module.exports = Typographer; -},{"./common/utils":5,"./defaults/typographer":9,"./ruler":17,"./rules_typographer/replace":42}],44:[function(require,module,exports){ +},{"./common/utils":5,"./defaults/typographer":9,"./ruler":16,"./rules_typographer/replace":41}],43:[function(require,module,exports){ /*! * Autolinker.js * 0.12.2 diff --git a/dist/remarkable.min.js b/dist/remarkable.min.js index 7dfa387..9ee6f27 100644 --- a/dist/remarkable.min.js +++ b/dist/remarkable.min.js @@ -1,4 +1,4 @@ /* remarkable 1.0.0 https://github.com//jonschlinkert/remarkable */ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r;"undefined"!=typeof window?r=window:"undefined"!=typeof global?r=global:"undefined"!=typeof self&&(r=self),r.Remarkable=e()}}(function(){var e;return function r(e,t,n){function s(o,l){if(!t[o]){if(!e[o]){var a="function"==typeof require&&require;if(!l&&a)return a(o,!0);if(i)return i(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=t[o]={exports:{}};e[o][0].call(u.exports,function(r){var t=e[o][1][r];return s(t?t:r)},u,u.exports,r,e,t,n)}return t[o].exports}for(var i="function"==typeof require&&require,o=0;o",Gt:"≫",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒","in":"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬","int":"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",LT:"<",Lt:"≪",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},{}],2:[function(e,r){"use strict";r.exports=["article","aside","button","blockquote","body","canvas","caption","col","colgroup","dd","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","iframe","li","map","object","ol","output","p","pre","progress","script","section","style","table","tbody","td","textarea","tfoot","th","tr","thead","ul","video"]},{}],3:[function(e,r){"use strict";function t(e,r){return e=e.source,r=r||"",function t(n,s){return n?(s=s.source||s,e=e.replace(n,s),t):new RegExp(e,r)}}var n=/[a-zA-Z_:][a-zA-Z0-9:._-]*/,s=/[^"'=<>`\x00-\x20]+/,i=/'[^']*'/,o=/"[^"]*"/,l=t(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",s)("single_quoted",i)("double_quoted",o)(),a=t(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",n)("attr_value",l)(),c=t(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",a)(),u=/<\/[A-Za-z][A-Za-z0-9]*\s*>/,p=//,h=/<[?].*?[?]>/,f=/]*>/,d=/])*\]\]>/,g=t(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",c)("close_tag",u)("comment",p)("processing",h)("declaration",f)("cdata",d)();r.exports.HTML_TAG_RE=g},{}],4:[function(e,r){"use strict";r.exports=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"]},{}],5:[function(e,r,t){"use strics";t.assign=function(e){for(var r=Array.prototype.slice.call(arguments,1);r.length;){var t=r.shift();if(t){if("object"!=typeof t)throw new TypeError(t+"must be non-object");for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}}return e}},{}],6:[function(e,r){"use strict";r.exports={html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,highlight:function(){return""},maxNesting:20}},{}],7:[function(e,r){r.exports.block=["code","blockquote","fences","heading","hr","htmlblock","lheading","list","paragraph"],r.exports.inline=["autolink","backticks","emphasis","entity","escape","escape_html_char","htmltag","links","newline","text"]},{}],8:[function(e,r){"use strict";r.exports={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,highlight:function(){return""},maxNesting:20}},{}],9:[function(e,r){"use strict";r.exports={singleQuotes:"‘’",doubleQuotes:"“”",copyright:!0,trademark:!0,registered:!0,plusminus:!0,paragraph:!0,ellipsis:!0,dupes:!0,emDashes:!0}},{}],10:[function(e,r,t){"use strict";function n(e){return 32===e}function s(e,r){return e.bMarks[r]+e.tShift[r]>=e.eMarks[r]}function i(e,r){for(var t=e.lineMax;t>r&&!(e.bMarks[r]+e.tShift[r]r&&n(e.src.charCodeAt(r));r++);return r}function l(e,r,t){for(var n=e.src.length;n>r&&e.src.charCodeAt(r)===t;r++);return r}function a(e,r,t,n){if(n>=r)return r;for(;r>n;)if(t!==e.src.charCodeAt(--r))return r+1;return r}function c(e,r,t,n,s){var i,o,l,a,c=r;if(r>=t)return"";if(c+1===t)return o=e.bMarks[c]+Math.min(e.tShift[c],n),l=s?e.bMarks[t]:e.eMarks[t-1],e.src.slice(o,l);for(a=new Array(t-r),i=0;t>c;c++,i++)o=e.bMarks[c]+Math.min(e.tShift[c],n),l=t>c+1||s?e.eMarks[c]+1:e.eMarks[c],a[i]=e.src.slice(o,l);return a.join("")}function u(e){return e.indexOf("&")>=0&&(e=e.replace(/&/g,"&")),e.indexOf("<")>=0&&(e=e.replace(/")>=0&&(e=e.replace(/>/g,">")),e.indexOf('"')>=0&&(e=e.replace(/"/g,""")),e}function p(e){return e.indexOf("\\")<0?e:e.replace(g,"$1")}function h(e){return e>=55296&&57343>=e?!1:e>=245&&255>=e?!1:192===e||193===e?!1:e>=64976&&65007>=e?!1:65535===(65535&e)||65534===(65535&e)?!1:31>=e?!1:e>=127&&159>=e?!1:e>1114111?!1:!0}function f(e){if(e>65535){e-=65536;var r=55296+(e>>10),t=56320+(1023&e);return String.fromCharCode(r,t)}return String.fromCharCode(e)}function d(e){return e.indexOf("&")<0?e:e.replace(m,function(e,r){return b.hasOwnProperty(r)?b[r]:e})}var g=/\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g,m=/&([a-z][a-z0-9]{1,31});/gi,b=e("./common/entities");t.isWhiteSpace=n,t.isEmpty=s,t.skipEmptyLines=i,t.skipSpaces=o,t.skipChars=l,t.getLines=c,t.skipCharsBack=a,t.escapeHtml=u,t.unescapeMd=p,t.isValidEntityCode=h,t.fromCodePoint=f,t.replaceEntities=d},{"./common/entities":1}],11:[function(e,r){"use strict";function t(r){this.options=n({},a),this.state=null,this.inline=new o,this.block=new i,this.renderer=new s,this.typographer=new l,this.linkifier=new l,this.linkifier.ruler.enable([],!0),this.linkifier.ruler.after(e("./rules_typographer/linkify")),this.block.inline=this.inline,this.inline.typographer=this.typographer,this.inline.linkifier=this.linkifier,r&&this.set(r)}var n=e("./common/utils").assign,s=e("./renderer"),i=e("./parser_block"),o=e("./parser_inline"),l=e("./typographer"),a=e("./defaults/remarkable"),c=e("./defaults/commonmark"),u=e("./defaults/commonmark_rules");t.prototype.set=function(e){"commonmark"===String(e).toLowerCase()?(n(this.options,c),this.inline.ruler.enable(u.inline,!0),this.block.ruler.enable(u.block,!0)):n(this.options,e) -},t.prototype.render=function(e){var r,t,n,s,i={references:Object.create(null)};for(r=this.block.parse(e,this.options,i),n=0,s=r.length;s>n;n++)t=r[n],"inline"===t.type&&(t.children=this.inline.parse(t.content,this.options,i));return this.renderer.render(r,this.options,i)},r.exports=t},{"./common/utils":5,"./defaults/commonmark":6,"./defaults/commonmark_rules":7,"./defaults/remarkable":8,"./parser_block":13,"./parser_inline":14,"./renderer":16,"./rules_typographer/linkify":41,"./typographer":43}],12:[function(e,r){"use strict";function t(e,r){var t,n,s,i,o=-1,l=e.posMax,a=e.pos,c=e.tokens.length,u=e.pending,p=e.validateInsideLink;if(e.validateInsideLink)return-1;if(e.label_nest_level)return e.label_nest_level--,-1;for(e.pos=r+1,e.validateInsideLink=!0,t=1;e.posr;){if(t=e.src.charCodeAt(r),10===t)return!1;if(62===t)return e.pos=r+1,e.link_content=i,!0;92===t&&s>r+1?(r++,i+=e.src[r++]):i+=e.src[r++]}return!1}for(n=0;s>r&&(t=e.src.charCodeAt(r),32!==t)&&!(32>t||127===t);)if(92===t&&s>r+1)r++,i+=e.src[r++];else{if(40===t&&(n++,n>1))break;if(41===t&&(n--,0>n))break;i+=e.src[r++]}return i.length?(e.pos=r,e.link_content=i,!0):!1}function s(e,r){var t,n,s=e.posMax,i=e.src.charCodeAt(r);if(34!==i&&39!==i&&40!==i)return!1;for(r++,t="",40===i&&(i=41);s>r;){if(n=e.src.charCodeAt(r),n===i)return e.pos=r+1,e.link_content=t,!0;92===n&&s>r+1?(r++,t+=e.src[r++]):t+=e.src[r++]}return!1}function i(e){return e.trim().replace(/\s+/g," ").toLowerCase()}r.exports.parseLinkLabel=t,r.exports.parseLinkDestination=n,r.exports.parseLinkTitle=s,r.exports.normalizeReference=i},{}],13:[function(e,r){"use strict";function t(){this._rules=[],this._rulesParagraphTerm=[],this._rulesBlockquoteTerm=[],this._rulesListTerm=[],this.ruler=new n(this.rulesUpdate.bind(this));for(var e=0;ec)||(e.line=c=i(e,c,t),c>=t)||e.tShift[c]s&&!(n=l[s](e,c,t,!1));s++);if(!n)throw new Error("No matching rules found");if(c===e.line)throw new Error("None of rules updated state.line");if(e.tight=!u,o(e,e.line-1)&&(u=!0),c=e.line,t>c&&o(e,c)){if(u=!0,c++,t>c&&e.listMode&&o(e,c))break;e.line=c}}},t.prototype.parse=function(e,r,t){var n,i=0,o=0;return e?(e.indexOf("\r")>=0&&(e=e.replace(/\r/,"")),e.indexOf(" ")>=0&&(e=e.replace(/\u00a0/g," ")),e.indexOf("␤")>=0&&(e=e.replace(/\u2424/g,"\n")),e.indexOf(" ")>=0&&(e=e.replace(/[\n\t]/g,function(r,t){var n;return 10===e.charCodeAt(t)?(i=t+1,o=0,r):(n=" ".slice((t-i-o)%4),o=t-i+1,n)})),n=new s(e,this,[],r,t),this.tokenize(n,n.line,n.lineMax),n.tokens):""},r.exports=t},{"./helpers":10,"./ruler":17,"./rules_block/blockquote":18,"./rules_block/code":19,"./rules_block/fences":20,"./rules_block/heading":21,"./rules_block/hr":22,"./rules_block/htmlblock":23,"./rules_block/lheading":24,"./rules_block/list":25,"./rules_block/paragraph":26,"./rules_block/state_block":27,"./rules_block/table":28}],14:[function(e,r){"use strict";function t(){this._rules=[],this.textMatch=/^[^\n\\`*_\[\]!&{}$%@<>"~]+/,this.ruler=new n(this.rulesUpdate.bind(this));for(var e=0;et&&!(r=n[t](e));t++);return r},t.prototype.tokenize=function(e){for(var r,t,n=this._rules,s=this._rules.length,i=e.posMax;e.post&&!(r=n[t](e));t++);if(r){if(e.pos>=i)break}else e.pending+=e.src[e.pos++]}return e.pending&&e.pushPending(),e.tokens},t.prototype.parse=function(e,r,t){var n=new s(e,this,r,t);return this.tokenize(n),r.linkify&&this.linkifier.process(n),r.typographer&&this.typographer.process(n),n.tokens},r.exports=t},{"./ruler":17,"./rules_inline/autolink":29,"./rules_inline/backticks":30,"./rules_inline/del":31,"./rules_inline/emphasis":32,"./rules_inline/entity":33,"./rules_inline/escape":34,"./rules_inline/escape_html_char":35,"./rules_inline/htmltag":36,"./rules_inline/links":37,"./rules_inline/newline":38,"./rules_inline/state_inline":39,"./rules_inline/text":40}],15:[function(e,r){"use strict";var t=e("./rules_inline/state_inline"),n=e("./helpers").skipSpaces,s=e("./links").parseLinkLabel,i=e("./links").parseLinkDestination,o=e("./links").parseLinkTitle,l=e("./links").normalizeReference;r.exports=function(e,r,a,c){var u,p,h,f,d,g,m,b,v;if(91!==e.charCodeAt(0))return-1;if(-1===e.indexOf("]:"))return-1;if(u=new t(e,r,a,c),p=s(u,0),0>p||58!==e.charCodeAt(p+1))return-1;for(f=u.posMax,h=p+2;f>h&&(d=u.src.charCodeAt(h),32===d||10===d);h++);if(!i(u,h))return-1;for(m=u.link_content,h=u.pos,g=h,h+=1;f>h&&(d=u.src.charCodeAt(h),32===d||10===d);h++);return f>h&&g!==h&&o(u,h)?(b=u.link_content,h=u.pos):(b="",h=g),h=n(u,h),f>h&&10!==u.src.charCodeAt(h)?-1:(v=l(e.slice(1,p)),c.references[v]=c.references[v]||{title:b,href:m},h)}},{"./helpers":10,"./links":12,"./rules_inline/state_inline":39}],16:[function(e,r){"use strict";function t(e){try{return encodeURI(e)}catch(r){}return""}function n(e){try{return decodeURI(e)}catch(r){}return""}function s(e,r){return++r\n"},u.blockquote_close=function(e,r){return""+s(e,r)},u.code=function(e,r){return e[r].block?"
"+l(e[r].content)+"
"+s(e,r):""+l(e[r].content)+""},u.fence=function(e,r,t){var n,i,o=e[r],u="",p=t.langPrefix||"",h="";return o.params&&(n=o.params.split(/ +/g),h=l(c(a(n[0]))),u=' class="'+p+h+'"'),i=t.highlight(o.content,h)||l(o.content),"
"+i+"
"+s(e,r)},u.heading_open=function(e,r){return""},u.heading_close=function(e,r){return"\n"},u.hr=function(e,r,t){return(t.xhtmlOut?"
":"
")+s(e,r)},u.bullet_list_open=function(){return"
    \n"},u.bullet_list_close=function(e,r){return"
"+s(e,r)},u.list_item_open=function(){return"
  • "},u.list_item_close=function(){return"
  • \n"},u.ordered_list_open=function(e,r){var t=e[r];return"1?' start="'+t.order+'"':"")+">\n"},u.ordered_list_close=function(e,r){return""+s(e,r)},u.paragraph_open=function(){return"

    "},u.paragraph_close=function(e,r){return"

    "+s(e,r)},u.link_open=function(e,r){var s=e[r].title?' title="'+l(c(e[r].title))+'"':"";return'"},u.link_close=function(){return""},u.image=function(e,r,n){var s=' src="'+l(t(e[r].src))+'"',i=e[r].title?' title="'+l(c(e[r].title))+'"':"",o=' alt="'+(e[r].alt?l(c(e[r].alt)):"")+'"',a=n.xhtmlOut?" /":"";return""},u.table_open=function(){return"\n"},u.table_close=function(){return"
    \n"},u.thead_open=function(){return" \n"},u.thead_close=function(){return" \n"},u.tbody_open=function(){return" \n"},u.tbody_close=function(){return" \n"},u.tr_open=function(){return" "},u.tr_close=function(){return"\n"},u.th_open=function(e,r){var t=e[r];return""},u.th_close=function(){return""},u.td_open=function(e,r){var t=e[r];return""},u.td_close=function(){return""},u.strong_open=function(){return""},u.strong_close=function(){return""},u.em_open=function(){return""},u.em_close=function(){return""},u.del_open=function(){return""},u.del_close=function(){return""},u.hardbreak=function(e,r,t){return t.xhtmlOut?"
    \n":"
    \n"},u.softbreak=function(e,r,t){return t.breaks?t.xhtmlOut?"
    \n":"
    \n":"\n"},u.text=function(e,r){return e[r].content},u.htmlblock=function(e,r){return e[r].content},u.htmltag=function(e,r){return e[r].content},i.prototype.render=function(e,r){var t,n,s,i,o,l="",a=this.rules,c=[],u=!1;for(t=0,n=e.length;n>t;t++)if(i=e[t].type,s=a[i],("ordered_list_open"===i||"bullet_list_open"===i)&&(c.push(u),u=e[t].tight),("ordered_list_close"===i||"bullet_list_close"===i)&&(u=c.pop()),"blockquote_open"===i&&(c.push(u),u=!1),"blockquote_close"===i&&(u=c.pop()),"paragraph_open"!==i||!u)if("paragraph_close"===i&&u)t+1=0&&t.enabled&&r.push(t.fn)}),r):(this.rules.forEach(function(e){e.enabled&&r.push(e.fn)}),r)},i.prototype.enable=function(e,r){Array.isArray(e)||(e=[e]),r&&this.rules.forEach(function(e){e.enabled=!1}),e.forEach(function(e){var r=this.find(e);if(0>r)throw new Error("Rules namager: invalid rule name "+e);this.rules[r].enabled=!0},this),this.compile()},i.prototype.disable=function(e){Array.isArray(e)||(e=[e]),e.forEach(function(e){var r=this.find(e);if(0>r)throw new Error("Rules namager: invalid rule name "+e);this.rules[r].enabled=!1},this),this.compile()},r.exports=i},{}],18:[function(e,r){"use strict";var t=e("../helpers").skipSpaces;r.exports=function(e,r,n,s){var i,o,l,a,c,u,p,h,f,d=e.parser._rulesBlockquoteTerm,g=e.bMarks[r]+e.tShift[r],m=e.eMarks[r];if(g>m)return!1;if(62!==e.src.charCodeAt(g++))return!1;if(e.level>=e.options.maxNesting)return!1;if(s)return!0;for(32===e.src.charCodeAt(g)&&g++,e.bqMarks[r]++,e.bqLevel++,c=e.blkIndent,e.blkIndent=0,a=[e.bMarks[r]],e.bMarks[r]=g,g=m>g?t(e,g):g,o=g>=m,l=[e.tShift[r]],e.tShift[r]=g-e.bMarks[r],i=r+1;n>i&&(g=e.bMarks[i]+e.tShift[i],m=e.eMarks[i],!(g>=m));i++)if(62!==e.src.charCodeAt(g++)){if(o)break;for(f=!1,p=0,h=d.length;h>p;p++)if(d[p](e,i,n,!0)){f=!0;break}if(f)break;a.push(e.bMarks[i]),l.push(e.tShift[i])}else e.bqMarks[i]++,32===e.src.charCodeAt(g)&&g++,a.push(e.bMarks[i]),e.bMarks[i]=g,g=m>g?t(e,g):g,o=g>=m,l.push(e.tShift[i]),e.tShift[i]=g-e.bMarks[i];for(u=e.listMode,e.listMode=!1,e.tokens.push({type:"blockquote_open",level:e.level++}),e.parser.tokenize(e,r,i),e.tokens.push({type:"blockquote_close",level:--e.level}),e.listMode=u,p=0;po&&!(e.bqMarks[o]=4))break;o++,l=o}return i?!0:(e.tokens.push({type:"code",content:n(e,r,l,4+e.blkIndent,!0),block:!0,level:e.level}),e.line=o,!0)}},{"../helpers":10}],20:[function(e,r){"use strict";var t=e("../helpers").skipSpaces,n=e("../helpers").skipChars,s=e("../helpers").getLines;r.exports=function(e,r,i,o){var l,a,c,u,p,h=!1,f=e.bMarks[r]+e.tShift[r],d=e.eMarks[r];if(f+3>d)return!1;if(l=e.src.charCodeAt(f),126!==l&&96!==l)return!1;if(p=f,f=n(e,f,l),a=f-p,3>a)return!1;if(c=e.src.slice(f,d).trim(),c.indexOf("`")>=0)return!1;if(o)return!0;for(u=r;(u++,!(u>=i))&&(f=p=e.bMarks[u]+e.tShift[u],d=e.eMarks[u],!(d>f&&e.tShift[u]f&&e.bqMarks[u]f-p||(f=t(e,f),d>f)))){h=!0;break}return a=e.tShift[r],e.tokens.push({type:"fence",params:c,content:s(e,r+1,u,a,!0),level:e.level}),e.line=u+(h?1:0),!0}},{"../helpers":10}],21:[function(e,r){"use strict";var t=e("../helpers").isWhiteSpace,n=e("../helpers").skipSpaces,s=e("../helpers").skipCharsBack;r.exports=function(e,r,i,o){var l,a,c=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(c>=u)return!1;if(l=e.src.charCodeAt(c),35!==l||c>=u)return!1;for(a=1,l=e.src.charCodeAt(++c);35===l&&u>c&&6>=a;)a++,l=e.src.charCodeAt(++c);return a>6||u>c&&!t(l)?!1:(c=n(e,c),u=s(e,u,32,c),u=s(e,u,35,c),uc&&e.tokens.push({type:"inline",content:e.src.slice(c,u).trim(),level:e.level+1}),e.tokens.push({type:"heading_close",hLevel:a,level:e.level}),e.line=r+1,!0))}},{"../helpers":10}],22:[function(e,r){"use strict";var t=e("../helpers").isWhiteSpace;r.exports=function(e,r,n,s){var i,o,l,a=e.bMarks[r],c=e.eMarks[r];if(a+=e.tShift[r],a>c)return!1;if(i=e.src.charCodeAt(a++),42!==i&&45!==i&&95!==i)return!1;for(o=1;c>a;){if(l=e.src.charCodeAt(a++),l!==i&&!t(l))return!1;l===i&&o++}return 3>o?!1:s?!0:(e.tokens.push({type:"hr",level:e.level}),e.line=r+1,!0)}},{"../helpers":10}],23:[function(e,r){"use strict";function t(e){var r=32|e;return r>=97&&122>=r}var n=e("../helpers").isEmpty,s=e("../helpers").getLines,i=e("../common/html_blocks"),o=/^<([a-zA-Z]{1,15})[\s\/>]/,l=/^<\/([a-zA-Z]{1,15})[\s>]/;r.exports=function(e,r,a,c){var u,p,h,f=e.bMarks[r],d=e.eMarks[r],g=e.tShift[r];if(f+=g,!e.options.html)return!1;if(g>3||f+2>=d||e.blkLevel>0)return!1;if(60!==e.src.charCodeAt(f))return!1;if(u=e.src.charCodeAt(f+1),33===u||63===u){if(c)return!0}else{if(47!==u&&!t(u))return!1;if(47===u){if(p=e.src.slice(f,d).match(l),!p)return!1}else if(p=e.src.slice(f,d).match(o),!p)return!1;if(i.indexOf(p[1].toLowerCase())<0)return!1;if(c)return!0}for(h=r+1;h=i?!1:e.tShift[u]3?!1:(a=e.bMarks[u]+e.tShift[u],c=e.eMarks[u],l=e.src.charCodeAt(a),45!==l&&61!==l?!1:(a=n(e,a,l),a=t(e,a),c>a?!1:o?!0:(a=e.bMarks[r]+e.tShift[r],c=s(e,e.eMarks[r],32,a),e.tokens.push({type:"heading_open",hLevel:61===l?1:2,level:e.level}),e.tokens.push({type:"inline",content:e.src.slice(a,c).trim(),level:e.level+1}),e.tokens.push({type:"heading_close",hLevel:61===l?1:2,level:e.level}),e.line=u+1,!0)))}},{"../helpers":10}],25:[function(e,r){"use strict";function t(e,r){var t,n,s;return n=e.bMarks[r]+e.tShift[r],s=e.eMarks[r],n>=s?-1:(t=e.src.charCodeAt(n++),42!==t&&45!==t&&43!==t?-1:s>n&&32!==e.src.charCodeAt(n)?-1:n)}function n(e,r){var t,n=e.bMarks[r]+e.tShift[r],s=e.eMarks[r];if(n+1>=s)return-1;if(t=e.src.charCodeAt(n++),48>t||t>57)return-1;for(;;){if(n>=s)return-1;if(t=e.src.charCodeAt(n++),!(t>=48&&57>=t)){if(41===t||46===t)break;return-1}}return s>n&&32!==e.src.charCodeAt(n)?-1:n}var s=e("../helpers").isEmpty,i=e("../helpers").skipSpaces;r.exports=function(e,r,o,l){var a,c,u,p,h,f,d,g,m,b,v,k,y,x,w,q,_,A,C,L=e.parser._rulesListTerm;if((g=n(e,r))>=0)y=!0;else{if(!((g=t(e,r))>=0))return!1;y=!1}if(e.level>=e.options.maxNesting)return!1;if(k=e.src.charCodeAt(g-1),l)return!0;for(w=e.tokens.length,y?(d=e.bMarks[r]+e.tShift[r],v=Number(e.src.substr(d,g-d-1)),e.tokens.push({type:"ordered_list_open",order:v,tight:!0,level:e.level++})):e.tokens.push({type:"bullet_list_open",tight:!0,level:e.level++}),a=r,q=!1;o>a&&(x=i(e,g),m=e.eMarks[a],b=x>=m?1:x-g,b>4&&(b=1),1>b&&(b=1),c=g-e.bMarks[a]+b,e.tokens.push({type:"list_item_open",level:e.level++}),p=e.blkIndent,h=e.tight,u=e.tShift[r],f=e.listMode,e.tShift[r]=x-e.bMarks[r],e.blkIndent=c,e.tight=!0,e.listMode=!0,e.parser.tokenize(e,r,o,!0),(!e.tight||q)&&(e.tokens[w].tight=!1),q=e.line-r>1&&s(e,e.line-1),e.blkIndent=p,e.tShift[r]=u,e.tight=h,e.listMode=f,e.tokens.push({type:"list_item_close",level:--e.level}),a=r=e.line,x=e.bMarks[r],!(a>=o));){if(s(e,a)){if(a>=o||s(e,a))break;a++}if(e.tShift[a]_;_++)if(L[_](e,a,o,!0)){C=!0;break}if(C)break;if(y){if(g=n(e,a),0>g)break}else if(g=t(e,a),0>g)break;if(k!==e.src.charCodeAt(g-1))break}return e.tokens.push(y?{type:"ordered_list_close",level:--e.level}:{type:"bullet_list_close",level:--e.level}),e.line=a,!0}},{"../helpers":10}],26:[function(e,r){"use strict";var t=e("../helpers").isEmpty,n=e("../helpers").getLines,s=e("../parser_ref");r.exports=function(e,r){var i,o,l,a,c,u,p=r+1,h=e.parser._rulesParagraphTerm;for(i=e.lineMax;i>p&&!t(e,p);p++)if(!(e.tShift[p]-e.blkIndent>3)){for(a=!1,c=0,u=h.length;u>c;c++)if(h[c](e,p,i,!0)){a=!0;break}if(a)break}for(o=n(e,r,p,e.blkIndent,!1).trim();o.length&&(l=s(o,e.parser.inline,e.options,e.env),!(0>l));)o=o.slice(l).trim();return o.length&&(e.tokens.push({type:"paragraph_open",level:e.level}),e.tokens.push({type:"inline",content:o,level:e.level+1}),e.tokens.push({type:"paragraph_close",level:e.level})),e.line=p,!0}},{"../helpers":10,"../parser_ref":15}],27:[function(e,r){"use strict";function t(e,r,t,n,s){var i,o,l,a,c,u,p;for(this.src=e,this.parser=r,this.options=n,this.env=s,this.tokens=t,this.bMarks=[],this.eMarks=[],this.tShift=[],o=this.src,u=0,p=!1,l=a=u=0,c=o.length;c>a;a++)i=o.charCodeAt(a),p||32!==i||u++,p||32===i||(this.tShift.push(u),p=!0),(13===i||10===i)&&(this.bMarks.push(l),this.eMarks.push(a),p=!1,u=0,l=a+1),13===i&&c>a&&10===o.charCodeAt(a)&&(a++,l++);for((13!==i||10!==i)&&(this.bMarks.push(l),this.eMarks.push(c),this.tShift.push(u)),this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.pos=0,this.blkLevel=0,this.blkIndent=0,this.line=0,this.lineMax=this.bMarks.length-1,this.tight=!1,this.listMode=!1,this.bqLevel=0,this.bqMarks=[],l=0;ln)return!1;if(i=e.src.charCodeAt(e.bMarks[r+1]+e.tShift[r+1]),124!==i&&45!==i&&58!==i)return!1;if(l=t(e,r+1,/^ *\|?(( *[:-]-+[:-] *\|)+( *[:-]-+[:-] *))\|? *$/),!l)return!1;for(p=l[1].split("|"),h=[],a=0;ac&&(u=t(e,c,/^ *\|?(.*?\|.*?)\|? *$/),u);c++){for(p=u[1].split("|"),e.tokens.push({type:"tr_open",level:e.level++}),a=0;a/,i=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;r.exports=function(e){var r,o,l,a=e.pos;return 60!==e.src.charCodeAt(a)?!1:(r=e.src.slice(a),r.indexOf(">")<0?!1:(o=r.match(i))?n.indexOf(o[1].toLowerCase())<0?!1:(e.push({type:"link_open",href:o[0].slice(1,-1),level:e.level}),e.push({type:"text",content:t(o[0].slice(1,-1)),level:e.level+1}),e.push({type:"link_close",level:e.level}),e.pos+=o[0].length,!0):(l=r.match(s),l?(e.push({type:"link_open",href:"mailto:"+l[0].slice(1,-1),level:e.level}),e.push({type:"text",content:t(l[0].slice(1,-1)),level:e.level+1}),e.push({type:"link_close",level:e.level}),e.pos+=l[0].length,!0):!1))}},{"../common/url_schemas":4,"../helpers":10}],30:[function(e,r){var t=/`+/g;r.exports=function(e){var r,n,s,i,o,l=e.pos,a=e.src.charCodeAt(l);if(96!==a)return!1;for(r=l,l++,s=e.posMax;s>l&&96===e.src.charCodeAt(l);)l++;for(i=e.src.slice(r,l),t=/`+/g,t.lastIndex=l;null!==(o=t.exec(e.src));)if(o[0].length===i.length)return n=e.src.slice(l,t.lastIndex-i.length),e.push({type:"code",content:n.replace(/[ \n]+/g," ").trim(),block:!1,level:e.level}),e.pos+=2*i.length+n.length,!0;return e.pending+=i,e.pos+=i.length,!0}},{}],31:[function(e,r){"use strict";r.exports=function(e){var r,t,n,s,i,o,l,a,c,u=e.posMax,p=e.pos;if(126!==e.src.charCodeAt(p))return!1;if(p+4>=u)return!1;if(126!==e.src.charCodeAt(p+1))return!1;if(e.validateInsideEm||e.validateInsideLink)return!1;if(e.level>=e.options.level)return!1;if(a=0!==e.pending.length?e.pending.charCodeAt(e.pending.length-1):-1,c=e.src.charCodeAt(p+2),126===a)return!1;if(126===c)return!1;if(32===c)return!1;for(o=p+2;u>o&&126===e.src.charCodeAt(o);)o++;if(o!==p+2)return e.pos+=o-p,e.pending+=e.src.slice(p,o),!0;for(r=e.tokens.length,t=e.pending,n=e.validateInsideEm,e.pos=p+2,e.validateInsideEm=!0,l=1;e.pos+1=l))){s=!0;break}i=e.parser.tokenizeSingle(e),i||(e.pending+=e.src[e.pos],e.pos++)}return e.tokens.length=r,e.pending=t,e.validateInsideEm=n,s?(e.posMax=e.pos,e.pos=p+2,e.push({type:"del_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"del_close",level:--e.level}),e.pos=e.posMax+2,e.posMax=u,!0):(e.pos=p,!1)}},{}],32:[function(e,r){"use strict";function t(e){return e>=48&&57>=e||e>=65&&90>=e||e>=97&&122>=e}function n(e,r){var n,s,i=r,o=e.posMax,l=e.src.charCodeAt(r);if(n=0!==e.pending.length?e.pending.charCodeAt(e.pending.length-1):-1,n===l)return-1;for(;o>i&&e.src.charCodeAt(i)===l;)i++;return i>=o?-1:(s=i-r,s>=4?s:32===e.src.charCodeAt(i)?-1:95===l&&t(n)?-1:s)}function s(e,r){var n,s,i=r,o=e.posMax,l=e.src.charCodeAt(r);for(n=0!==e.pending.length?e.pending.charCodeAt(e.pending.length-1):-1;o>i&&e.src.charCodeAt(i)===l;)i++;return s=i-r,s>=4?s:32===n?-1:95===l&&o>i&&t(e.src.charCodeAt(i))?-1:s}r.exports=function(e){var r,t,i,o,l,a,c,u,p,h,f,d,g=e.posMax,m=e.pos,b=e.src.charCodeAt(m);if(95!==b&&42!==b)return!1;if(e.validateInsideEm||e.validateInsideLink)return!1;if(r=n(e,m),0>r)return!1;if(r>=4)return e.pos+=r,e.pending+=e.src.slice(m,r),!0;if(e.level>=e.options.maxNesting)return!1;for(i=e.tokens.length,o=e.pending,l=e.validateInsideEm,e.pos=m+r,h=[r],e.validateInsideEm=!0;e.pos=1&&4>t){for(u=h.pop(),p=t;u!==p;){if(3===u){h.push(3-p);break}if(u>p){f=!0;break}if(p-=u,0===h.length)break;e.pos+=u,u=h.pop()}if(f)break;if(0===h.length){r=u,a=!0;break}e.pos+=t;continue}if(t=n(e,e.pos),t>=1&&4>t){h.push(t),e.pos+=t;continue}}c=e.parser.tokenizeSingle(e),c?d=!1:(d=e.src.charCodeAt(e.pos)===b,e.pending+=e.src[e.pos],e.pos++)}return e.tokens.length=i,e.pending=o,e.validateInsideEm=l,a?(e.posMax=e.pos,e.pos=m+r,(2===r||3===r)&&e.push({type:"strong_open",level:e.level++}),(1===r||3===r)&&e.push({type:"em_open",level:e.level++}),e.parser.tokenize(e),(1===r||3===r)&&e.push({type:"em_close",level:--e.level}),(2===r||3===r)&&e.push({type:"strong_close",level:--e.level}),e.pos=e.posMax+r,e.posMax=g,!0):(e.pos=m,!1)}},{}],33:[function(e,r){"use strict";var t=e("../common/entities"),n=e("../helpers").escapeHtml,s=e("../helpers").isValidEntityCode,i=e("../helpers").fromCodePoint,o=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;r.exports=function(e){var r,a,c,u=e.pos,p=e.posMax;if(38!==e.src.charCodeAt(u))return!1;if(p>u+1)if(r=e.src.charCodeAt(u+1),35===r){if(c=e.src.slice(u).match(o))return a="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),e.pending+=s(a)?n(i(a)):i(65533),e.pos+=c[0].length,!0}else if(c=e.src.slice(u).match(l),c&&t.hasOwnProperty(c[1]))return e.pending+=n(t[c[1]]),e.pos+=c[0].length,!0;return e.pending+="&",e.pos++,!0}},{"../common/entities":1,"../helpers":10}],34:[function(e,r){var t="\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").map(function(e){return e.charCodeAt(0)});r.exports=function(e){var r,n=e.pos,s=e.posMax;if(92!==e.src.charCodeAt(n))return!1;if(n++,s>n){if(r=e.src.charCodeAt(n),t.indexOf(r)>=0)return e.pending+=38===r?"&":60===r?"<":62===r?">":34===r?""":e.src[n],e.pos+=2,!0;if(10===r){for(e.push({type:"hardbreak",level:e.level}),n++;s>n&&32===e.src.charCodeAt(n);)n++;return e.pos=n,!0}}return e.pending+="\\",e.pos++,!0}},{}],35:[function(e,r){r.exports=function(e){var r=e.src.charCodeAt(e.pos);if(60===r)e.pending+="<";else if(62===r)e.pending+=">";else{if(34!==r)return!1;e.pending+="""}return e.pos++,!0}},{}],36:[function(e,r){"use strict";function t(e){var r=32|e;return r>=97&&122>=r}var n=e("../common/html_re").HTML_TAG_RE;r.exports=function(e){var r,s,i,o=e.pos;return e.options.html?(i=e.posMax,60!==e.src.charCodeAt(o)||o+2>=i?!1:(r=e.src.charCodeAt(o+1),(33===r||63===r||47===r||t(r))&&(s=e.src.slice(o).match(n))?(e.push({type:"htmltag",content:e.src.slice(o,o+s[0].length),level:e.level}),e.pos+=s[0].length,!0):!1)):!1}},{"../common/html_re":3}],37:[function(e,r){"use strict";function t(e){var r,t,l,a,c,u,p,h,f=!1,d=e.posMax,g=e.pos,m=e.src.charCodeAt(g);if(33===m&&(f=!0,m=e.src.charCodeAt(++g)),91!==m)return!1;if(e.level>=e.options.maxNesting)return!1;if(r=g+1,t=n(e,g),0>t)return!1;if(u=t+1,d>u&&40===e.src.charCodeAt(u)){for(u++;d>u&&(h=e.src.charCodeAt(u),32===h||10===h);u++);if(u>=d)return!1;for(g=u,s(e,u)?(a=e.link_content,u=e.pos):a="",g=u;d>u&&(h=e.src.charCodeAt(u),32===h||10===h);u++);if(d>u&&g!==u&&i(e,u))for(c=e.link_content,u=e.pos;d>u&&(h=e.src.charCodeAt(u),32===h||10===h);u++);else c="";if(u>=d||41!==e.src.charCodeAt(u))return e.pos=r-1,!1;u++}else{if(e.linkLevel>0)return!1;for(;d>u&&(h=e.src.charCodeAt(u),32===h||10===h);u++);if(d>u&&91===e.src.charCodeAt(u)&&(g=u+1,u=n(e,u),u>=0?l=e.src.slice(g,u++):u=g-1),l||(l=e.src.slice(r,t)),p=e.env.references[o(l)],!p)return e.pos=r-1,!1;a=p.href,c=p.title}return e.pos=r,e.posMax=t,f?e.push({type:"image",src:a,title:c,alt:e.src.substr(r,t-r),level:e.level}):(e.push({type:"link_open",href:a,title:c,level:e.level++}),e.linkLevel++,e.parser.tokenize(e),e.linkLevel--,e.push({type:"link_close",level:--e.level})),e.pos=u,e.posMax=d,!0}var n=e("../links").parseLinkLabel,s=e("../links").parseLinkDestination,i=e("../links").parseLinkTitle,o=e("../links").normalizeReference;r.exports=t},{"../links":12}],38:[function(e,r){r.exports=function(e){var r,t,n=e.pos;if(10!==e.src.charCodeAt(n))return!1;for(r=e.pending.length-1,t=e.posMax,r>=0&&32===e.pending.charCodeAt(r)?r>=1&&32===e.pending.charCodeAt(r-1)?(e.pending=e.pending.replace(/ +$/,""),e.push({type:"hardbreak",level:e.level})):(e.pending=e.pending.slice(0,-1),e.push({type:"softbreak",level:e.level})):e.push({type:"softbreak",level:e.level}),n++;t>n&&32===e.src.charCodeAt(n);)n++;return e.pos=n,!0}},{}],39:[function(e,r){"use strict";function t(e,r,t,n){this.src=e,this.env=n,this.options=t,this.parser=r,this.tokens=[],this.pos=0,this.pending="",this.posMax=this.src.length,this.validateInsideEm=!1,this.validateInsideLink=!1,this.linkLevel=0,this.level=0,this.link_content="",this.pendingLevel=0,this.label_nest_level=0}t.prototype.pushPending=function(){var e=this.pending;this.tokens.push({type:"text",content:e,level:this.pendingLevel}),this.pending=""},t.prototype.push=function(e){this.pending&&this.pushPending(),this.tokens.push(e),this.pendingLevel=this.level},r.exports=t},{}],40:[function(e,r){r.exports=function(e){var r=e.src.slice(e.pos).match(e.parser.textMatch);return r?(e.pending+=r[0],e.pos+=r[0].length,!0):!1}},{}],41:[function(e,r){"use strict";var t=e("autolinker"),n=e("../helpers").escapeHtml,s=[],i=new t({stripPrefix:!1,replaceFn:function(e,r){var t;return"url"===r.getType()&&(t=r.getUrl(),/^(http|https|ftp|git)/.test(t)&&s.push(t)),!1}});r.exports=function(e,r){var t,o,l,a,c,u,p,h=r.tokens;for(t=h.length-1;t>=0;t--)if(o=h[t],"link_close"!==o.type){if("text"===o.type&&(o.content.indexOf("://")||o.content.indexOf("www"))){if(l=o.content,s=[],i.link(l),!s.length)continue;for(a=[],p=o.level,c=0;c=0;t--)n=i[t],"text"===n.type&&(s=n.content,s.indexOf("(")>=0&&(o.copyright&&(s=s.replace(/\(c\)/gi,"©")),o.trademark&&(s=s.replace(/\(tm\)/gi,"™")),o.registered&&(s=s.replace(/\(r\)/gi,"®")),o.paragraph&&(s=s.replace(/\(p\)/gi,"§"))),o.plusminus&&s.indexOf("+-")>=0&&(s=s.replace(/\+-/g,"±")),o.ellipsis&&s.indexOf("..")>=0&&(s=s.replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..")),o.dupes&&(s.indexOf("????")>=0||s.indexOf("!!!!")>=0||s.indexOf(",,")>=0)&&(s=s.replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",")),o.emDashes&&s.indexOf("--")>=0&&(s=s.replace(/(^|\s)--(\s|$)/gm,"$1—$2")),n.content=s)}},{}],43:[function(e,r){"use strict";function t(){this.options=s({},n),this.ruler=new i(this.rulesUpdate.bind(this));for(var e=0;er;r++)n[r](this,e)},r.exports=t},{"./common/utils":5,"./defaults/typographer":9,"./ruler":17,"./rules_typographer/replace":42}],44:[function(r,t,n){!function(r,s){"function"==typeof e&&e.amd?e(s):"undefined"!=typeof n?t.exports=s():r.Autolinker=s()}(this,function(){var e=function(r){e.Util.assign(this,r)};return e.prototype={constructor:e,urls:!0,email:!0,twitter:!0,newWindow:!0,stripPrefix:!0,className:"",htmlCharacterEntitiesRegex:/( | |<|<|>|>)/gi,matcherRegex:function(){var e=/(^|[^\w])@(\w{1,15})/,r=/(?:[\-;:&=\+\$,\w\.]+@)/,t=/(?:[A-Za-z]{3,9}:(?:\/\/)?)/,n=/(?:www\.)/,s=/[A-Za-z0-9\.\-]*[A-Za-z0-9\-]/,i=/\.(?:international|construction|contractors|enterprises|photography|productions|foundation|immobilien|industries|management|properties|technology|christmas|community|directory|education|equipment|institute|marketing|solutions|vacations|bargains|boutique|builders|catering|cleaning|clothing|computer|democrat|diamonds|graphics|holdings|lighting|partners|plumbing|supplies|training|ventures|academy|careers|company|cruises|domains|exposed|flights|florist|gallery|guitars|holiday|kitchen|neustar|okinawa|recipes|rentals|reviews|shiksha|singles|support|systems|agency|berlin|camera|center|coffee|condos|dating|estate|events|expert|futbol|kaufen|luxury|maison|monash|museum|nagoya|photos|repair|report|social|supply|tattoo|tienda|travel|viajes|villas|vision|voting|voyage|actor|build|cards|cheap|codes|dance|email|glass|house|mango|ninja|parts|photo|shoes|solar|today|tokyo|tools|watch|works|aero|arpa|asia|best|bike|blue|buzz|camp|club|cool|coop|farm|fish|gift|guru|info|jobs|kiwi|kred|land|limo|link|menu|mobi|moda|name|pics|pink|post|qpon|rich|ruhr|sexy|tips|vote|voto|wang|wien|wiki|zone|bar|bid|biz|cab|cat|ceo|com|edu|gov|int|kim|mil|net|onl|org|pro|pub|red|tel|uno|wed|xxx|xyz|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw)\b/,o=/(?:[\-A-Za-z0-9+&@#\/%?=~_()|!:,.;]*[\-A-Za-z0-9+&@#\/%=~_()|])?/;return new RegExp(["(",e.source,")","|","(",r.source,s.source,i.source,")","|","(","(?:","(?:",t.source,s.source,")","|","(?:","(.?//)?",n.source,s.source,")","|","(?:","(.?//)?",s.source,i.source,")",")",o.source,")"].join(""),"gi")}(),invalidProtocolRelMatchRegex:/^[\w]\/\//,charBeforeProtocolRelMatchRegex:/^(.)?\/\//,link:function(r){var t=this,n=this.getHtmlParser(),s=this.htmlCharacterEntitiesRegex,i=0,o=[];return n.parse(r,{processHtmlNode:function(e,r,t){"a"===r&&(t?i=Math.max(i-1,0):i++),o.push(e)},processTextNode:function(r){if(0===i)for(var n=e.Util.splitAndCapture(r,s),l=0,a=n.length;a>l;l++){var c=n[l],u=t.processTextNode(c);o.push(u)}else o.push(r)}}),o.join("")},getHtmlParser:function(){var r=this.htmlParser;return r||(r=this.htmlParser=new e.HtmlParser),r},getTagBuilder:function(){var r=this.tagBuilder;return r||(r=this.tagBuilder=new e.AnchorTagBuilder({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),r},processTextNode:function(r){var t=this,n=this.charBeforeProtocolRelMatchRegex;return r.replace(this.matcherRegex,function(r,s,i,o,l,a,c,u){var p,h=s,f=i,d=o,g=l,m=a,b=c||u,v="",k="";if(!t.isValidMatch(h,g,m,b))return r;if(t.matchHasUnbalancedClosingParen(r)&&(r=r.substr(0,r.length-1),k=")"),g)p=new e.match.Email({matchedText:r,email:g});else if(h)f&&(v=f,r=r.slice(1)),p=new e.match.Twitter({matchedText:r,twitterHandle:d});else{if(b){var y=b.match(n)[1]||"";y&&(v=y,r=r.slice(1))}p=new e.match.Url({matchedText:r,url:r,protocolRelativeMatch:b,stripPrefix:t.stripPrefix})}var x=t.createMatchReturnVal(p,r);return v+x+k})},isValidMatch:function(e,r,t,n){return e&&!this.twitter||r&&!this.email||t&&!this.urls||t&&-1===t.indexOf(".")||t&&/^[A-Za-z]{3,9}:/.test(t)&&!/:.*?[A-Za-z]/.test(t)||n&&this.invalidProtocolRelMatchRegex.test(n)?!1:!0},matchHasUnbalancedClosingParen:function(e){var r=e.charAt(e.length-1);if(")"===r){var t=e.match(/\(/g),n=e.match(/\)/g),s=t&&t.length||0,i=n&&n.length||0;if(i>s)return!0}return!1},createMatchReturnVal:function(r,t){var n;if(this.replaceFn&&(n=this.replaceFn.call(this,this,r)),"string"==typeof n)return n;if(n===!1)return t;if(n instanceof e.HtmlTag)return n.toString();var s=this.getTagBuilder(),i=s.build(r);return i.toString()}},e.link=function(r,t){var n=new e(t);return n.link(r)},e.match={},e.Util={abstractMethod:function(){throw"abstract"},assign:function(e,r){for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t]);return e},extend:function(r,t){var n=r.prototype,s=function(){};s.prototype=n;var i;i=t.hasOwnProperty("constructor")?t.constructor:function(){n.constructor.apply(this,arguments)};var o=i.prototype=new s;return o.constructor=i,o.superclass=n,delete t.constructor,e.Util.assign(o,t),i},ellipsis:function(e,r,t){return e.length>r&&(t=null==t?"..":t,e=e.substring(0,r-t.length)+t),e},indexOf:function(e,r){if(Array.prototype.indexOf)return e.indexOf(r);for(var t=0,n=e.length;n>t;t++)if(e[t]===r)return t;return-1},splitAndCapture:function(e,r){if(!r.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var t,n=[],s=0;t=r.exec(e);)n.push(e.substring(s,t.index)),n.push(t[0]),s=t.index+t[0].length;return n.push(e.substring(s)),n}},e.HtmlParser=e.Util.extend(Object,{htmlRegex:function(){var e=/[0-9a-zA-Z:]+/,r=/[^\s\0"'>\/=\x01-\x1F\x7F]+/,t=/(?:".*?"|'.*?'|[^'"=<>`\s]+)/,n=r.source+"(?:\\s*=\\s*"+t.source+")?";return new RegExp(["<(?:!|(/))?","("+e.source+")","(?:","\\s+","(?:",n,"|",t.source+")",")*","\\s*/?",">"].join(""),"g")}(),parse:function(e,r){r=r||{};for(var t,n=r.processHtmlNode||function(){},s=r.processTextNode||function(){},i=this.htmlRegex,o=0;null!==(t=i.exec(e));){var l=t[0],a=t[2],c=!!t[1],u=e.substring(o,t.index);u&&s(u),n(l,a,c),o=t.index+l.length}if(o",this.getInnerHtml(),""].join("")},buildAttrsStr:function(){if(!this.attrs)return"";var e=this.getAttrs(),r=[];for(var t in e)e.hasOwnProperty(t)&&r.push(t+'="'+e[t]+'"');return r.join(" ")}}),e.AnchorTagBuilder=e.Util.extend(Object,{constructor:function(r){e.Util.assign(this,r)},build:function(r){var t=new e.HtmlTag({tagName:"a",attrs:this.createAttrs(r.getType(),r.getAnchorHref()),innerHtml:this.processAnchorText(r.getAnchorText())});return t},createAttrs:function(e,r){var t={href:r},n=this.createCssClass(e);return n&&(t["class"]=n),this.newWindow&&(t.target="_blank"),t},createCssClass:function(e){var r=this.className;return r?r+" "+r+"-"+e:""},processAnchorText:function(e){return e=this.doTruncate(e)},doTruncate:function(r){return e.Util.ellipsis(r,this.truncate||Number.POSITIVE_INFINITY)}}),e.match.Match=e.Util.extend(Object,{constructor:function(r){e.Util.assign(this,r)},getType:e.Util.abstractMethod,getMatchedText:function(){return this.matchedText},getAnchorHref:e.Util.abstractMethod,getAnchorText:e.Util.abstractMethod}),e.match.Email=e.Util.extend(e.match.Match,{getType:function(){return"email"},getEmail:function(){return this.email},getAnchorHref:function(){return"mailto:"+this.email},getAnchorText:function(){return this.email}}),e.match.Twitter=e.Util.extend(e.match.Match,{getType:function(){return"twitter"},getTwitterHandle:function(){return this.twitterHandle},getAnchorHref:function(){return"https://twitter.com/"+this.twitterHandle},getAnchorText:function(){return"@"+this.twitterHandle}}),e.match.Url=e.Util.extend(e.match.Match,{urlPrefixRegex:/^(https?:\/\/)?(www\.)?/i,protocolRelativeRegex:/^\/\//,checkForProtocolRegex:/^[A-Za-z]{3,9}:/,getType:function(){return"url"},getUrl:function(){var e=this.url;return this.protocolRelativeMatch||this.checkForProtocolRegex.test(e)||(e=this.url="http://"+e),e},getAnchorHref:function(){var e=this.getUrl();return e.replace(/&/g,"&")},getAnchorText:function(){var e=this.getUrl();return this.protocolRelativeMatch&&(e=this.stripProtocolRelativePrefix(e)),this.stripPrefix&&(e=this.stripUrlPrefix(e)),e=this.removeTrailingSlash(e)},stripUrlPrefix:function(e){return e.replace(this.urlPrefixRegex,"")},stripProtocolRelativePrefix:function(e){return e.replace(this.protocolRelativeRegex,"")},removeTrailingSlash:function(e){return"/"===e.charAt(e.length-1)&&(e=e.slice(0,-1)),e}}),e})},{}]},{},[])("./")}); \ No newline at end of file +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r;"undefined"!=typeof window?r=window:"undefined"!=typeof global?r=global:"undefined"!=typeof self&&(r=self),r.Remarkable=e()}}(function(){var e;return function r(e,t,n){function s(o,a){if(!t[o]){if(!e[o]){var l="function"==typeof require&&require;if(!a&&l)return l(o,!0);if(i)return i(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=t[o]={exports:{}};e[o][0].call(u.exports,function(r){var t=e[o][1][r];return s(t?t:r)},u,u.exports,r,e,t,n)}return t[o].exports}for(var i="function"==typeof require&&require,o=0;o",Gt:"≫",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒","in":"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬","int":"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",LT:"<",Lt:"≪",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},{}],2:[function(e,r){"use strict";r.exports=["article","aside","button","blockquote","body","canvas","caption","col","colgroup","dd","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","iframe","li","map","object","ol","output","p","pre","progress","script","section","style","table","tbody","td","textarea","tfoot","th","tr","thead","ul","video"]},{}],3:[function(e,r){"use strict";function t(e,r){return e=e.source,r=r||"",function t(n,s){return n?(s=s.source||s,e=e.replace(n,s),t):new RegExp(e,r)}}var n=/[a-zA-Z_:][a-zA-Z0-9:._-]*/,s=/[^"'=<>`\x00-\x20]+/,i=/'[^']*'/,o=/"[^"]*"/,a=t(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",s)("single_quoted",i)("double_quoted",o)(),l=t(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",n)("attr_value",a)(),c=t(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",l)(),u=/<\/[A-Za-z][A-Za-z0-9]*\s*>/,p=//,h=/<[?].*?[?]>/,f=/]*>/,d=/])*\]\]>/,g=t(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",c)("close_tag",u)("comment",p)("processing",h)("declaration",f)("cdata",d)();r.exports.HTML_TAG_RE=g},{}],4:[function(e,r){"use strict";r.exports=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"]},{}],5:[function(e,r,t){"use strict";function n(e){for(var r=Array.prototype.slice.call(arguments,1);r.length;){var t=r.shift();if(t){if("object"!=typeof t)throw new TypeError(t+"must be non-object");for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}}return e}function s(e){return e.indexOf("&")>=0&&(e=e.replace(/&/g,"&")),e.indexOf("<")>=0&&(e=e.replace(/")>=0&&(e=e.replace(/>/g,">")),e.indexOf('"')>=0&&(e=e.replace(/"/g,""")),e}function i(e){return e.indexOf("\\")<0?e:e.replace(c,"$1")}function o(e){return e>=55296&&57343>=e?!1:e>=245&&255>=e?!1:192===e||193===e?!1:e>=64976&&65007>=e?!1:65535===(65535&e)||65534===(65535&e)?!1:31>=e?!1:e>=127&&159>=e?!1:e>1114111?!1:!0}function a(e){if(e>65535){e-=65536;var r=55296+(e>>10),t=56320+(1023&e);return String.fromCharCode(r,t)}return String.fromCharCode(e)}function l(e){return e.indexOf("&")<0?e:e.replace(u,function(e,r){return p.hasOwnProperty(r)?p[r]:e})}var c=/\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g,u=/&([a-z][a-z0-9]{1,31});/gi,p=e("./entities");t.assign=n,t.escapeHtml=s,t.unescapeMd=i,t.isValidEntityCode=o,t.fromCodePoint=a,t.replaceEntities=l},{"./entities":1}],6:[function(e,r){"use strict";r.exports={html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,highlight:function(){return""},maxNesting:20}},{}],7:[function(e,r){r.exports.block=["code","blockquote","fences","heading","hr","htmlblock","lheading","list","paragraph"],r.exports.inline=["autolink","backticks","emphasis","entity","escape","escape_html_char","htmltag","links","newline","text"]},{}],8:[function(e,r){"use strict";r.exports={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,highlight:function(){return""},maxNesting:20}},{}],9:[function(e,r){"use strict";r.exports={singleQuotes:"‘’",doubleQuotes:"“”",copyright:!0,trademark:!0,registered:!0,plusminus:!0,paragraph:!0,ellipsis:!0,dupes:!0,emDashes:!0}},{}],10:[function(e,r){"use strict";function t(r){this.options=n({},l),this.state=null,this.inline=new o,this.block=new i,this.renderer=new s,this.typographer=new a,this.linkifier=new a,this.linkifier.ruler.enable([],!0),this.linkifier.ruler.after(e("./rules_typographer/linkify")),this.block.inline=this.inline,this.inline.typographer=this.typographer,this.inline.linkifier=this.linkifier,r&&this.set(r)}var n=e("./common/utils").assign,s=e("./renderer"),i=e("./parser_block"),o=e("./parser_inline"),a=e("./typographer"),l=e("./defaults/remarkable"),c=e("./defaults/commonmark"),u=e("./defaults/commonmark_rules");t.prototype.set=function(e){"commonmark"===String(e).toLowerCase()?(n(this.options,c),this.inline.ruler.enable(u.inline,!0),this.block.ruler.enable(u.block,!0)):n(this.options,e)},t.prototype.render=function(e){var r,t,n,s,i={references:Object.create(null)};for(r=this.block.parse(e,this.options,i),n=0,s=r.length;s>n;n++)t=r[n],"inline"===t.type&&(t.children=this.inline.parse(t.content,this.options,i));return this.renderer.render(r,this.options,i)},r.exports=t},{"./common/utils":5,"./defaults/commonmark":6,"./defaults/commonmark_rules":7,"./defaults/remarkable":8,"./parser_block":12,"./parser_inline":13,"./renderer":15,"./rules_typographer/linkify":40,"./typographer":42}],11:[function(e,r){"use strict";function t(e,r){var t,n,s,i,o=-1,a=e.posMax,l=e.pos,c=e.tokens.length,u=e.pending,p=e.validateInsideLink;if(e.validateInsideLink)return-1;if(e.label_nest_level)return e.label_nest_level--,-1;for(e.pos=r+1,e.validateInsideLink=!0,t=1;e.posr;){if(t=e.src.charCodeAt(r),10===t)return!1;if(62===t)return e.pos=r+1,e.link_content=i,!0;92===t&&s>r+1?(r++,i+=e.src[r++]):i+=e.src[r++]}return!1}for(n=0;s>r&&(t=e.src.charCodeAt(r),32!==t)&&!(32>t||127===t);)if(92===t&&s>r+1)r++,i+=e.src[r++];else{if(40===t&&(n++,n>1))break;if(41===t&&(n--,0>n))break;i+=e.src[r++]}return i.length&&e.parser.validateLink(i)?(e.pos=r,e.link_content=i,!0):!1}function s(e,r){var t,n,s=e.posMax,i=e.src.charCodeAt(r);if(34!==i&&39!==i&&40!==i)return!1;for(r++,t="",40===i&&(i=41);s>r;){if(n=e.src.charCodeAt(r),n===i)return e.pos=r+1,e.link_content=t,!0;92===n&&s>r+1?(r++,t+=e.src[r++]):t+=e.src[r++]}return!1}function i(e){return e.trim().replace(/\s+/g," ").toLowerCase()}r.exports.parseLinkLabel=t,r.exports.parseLinkDestination=n,r.exports.parseLinkTitle=s,r.exports.normalizeReference=i},{}],12:[function(e,r){"use strict";function t(){this._rules=[],this._rulesParagraphTerm=[],this._rulesBlockquoteTerm=[],this._rulesListTerm=[],this.ruler=new n(this.rulesUpdate.bind(this));for(var e=0;ea)||(e.line=a=e.skipEmptyLines(a),a>=t)||e.tShift[a]s&&!(n=i[s](e,a,t,!1));s++);if(!n)throw new Error("No matching rules found");if(a===e.line)throw new Error("None of rules updated state.line");if(e.tight=!l,e.isEmpty(e.line-1)&&(l=!0),a=e.line,t>a&&e.isEmpty(a)){if(l=!0,a++,t>a&&e.listMode&&e.isEmpty(a))break;e.line=a}}},t.prototype.parse=function(e,r,t){var n,i=0,o=0;return e?(e.indexOf("\r")>=0&&(e=e.replace(/\r/,"")),e.indexOf(" ")>=0&&(e=e.replace(/\u00a0/g," ")),e.indexOf("␤")>=0&&(e=e.replace(/\u2424/g,"\n")),e.indexOf(" ")>=0&&(e=e.replace(/[\n\t]/g,function(r,t){var n;return 10===e.charCodeAt(t)?(i=t+1,o=0,r):(n=" ".slice((t-i-o)%4),o=t-i+1,n)})),n=new s(e,this,[],r,t),this.tokenize(n,n.line,n.lineMax),n.tokens):""},r.exports=t},{"./ruler":16,"./rules_block/blockquote":17,"./rules_block/code":18,"./rules_block/fences":19,"./rules_block/heading":20,"./rules_block/hr":21,"./rules_block/htmlblock":22,"./rules_block/lheading":23,"./rules_block/list":24,"./rules_block/paragraph":25,"./rules_block/state_block":26,"./rules_block/table":27}],13:[function(e,r){"use strict";function t(e){return 0===e.indexOf("javascript:")?!1:!0}function n(){this._rules=[],this.textMatch=/^[^\n\\`*_\[\]!&{}$%@<>"~]+/,this.validateLink=t,this.ruler=new s(this.rulesUpdate.bind(this));for(var e=0;et&&!(r=n[t](e));t++);return r},n.prototype.tokenize=function(e){for(var r,t,n=this._rules,s=this._rules.length,i=e.posMax;e.post&&!(r=n[t](e));t++);if(r){if(e.pos>=i)break}else e.pending+=e.src[e.pos++]}return e.pending&&e.pushPending(),e.tokens},n.prototype.parse=function(e,r,t){var n=new i(e,this,r,t);return this.tokenize(n),r.linkify&&this.linkifier.process(n),r.typographer&&this.typographer.process(n),n.tokens},r.exports=n},{"./ruler":16,"./rules_inline/autolink":28,"./rules_inline/backticks":29,"./rules_inline/emphasis":30,"./rules_inline/entity":31,"./rules_inline/escape":32,"./rules_inline/escape_html_char":33,"./rules_inline/htmltag":34,"./rules_inline/links":35,"./rules_inline/newline":36,"./rules_inline/state_inline":37,"./rules_inline/strikethrough":38,"./rules_inline/text":39}],14:[function(e,r){"use strict";var t=e("./rules_inline/state_inline"),n=e("./links").parseLinkLabel,s=e("./links").parseLinkDestination,i=e("./links").parseLinkTitle,o=e("./links").normalizeReference;r.exports=function(e,r,a,l){var c,u,p,h,f,d,g,m,b;if(91!==e.charCodeAt(0))return-1;if(-1===e.indexOf("]:"))return-1;if(c=new t(e,r,a,l),u=n(c,0),0>u||58!==e.charCodeAt(u+1))return-1;for(h=c.posMax,p=u+2;h>p&&(f=c.src.charCodeAt(p),32===f||10===f);p++);if(!s(c,p))return-1;for(g=c.link_content,p=c.pos,d=p,p+=1;h>p&&(f=c.src.charCodeAt(p),32===f||10===f);p++);return h>p&&d!==p&&i(c,p)?(m=c.link_content,p=c.pos):(m="",p=d),p=c.skipSpaces(p),h>p&&10!==c.src.charCodeAt(p)?-1:(b=o(e.slice(1,u)),l.references[b]=l.references[b]||{title:m,href:g},p)}},{"./links":11,"./rules_inline/state_inline":37}],15:[function(e,r){"use strict";function t(e){try{return encodeURI(e)}catch(r){}return""}function n(e){try{return decodeURI(e)}catch(r){}return""}function s(e,r){return++r\n"},u.blockquote_close=function(e,r){return""+s(e,r)},u.code=function(e,r){return e[r].block?"
    "+a(e[r].content)+"
    "+s(e,r):""+a(e[r].content)+""},u.fence=function(e,r,t){var n,i,o=e[r],u="",p=t.langPrefix||"",h="";return o.params&&(n=o.params.split(/ +/g),h=a(c(l(n[0]))),u=' class="'+p+h+'"'),i=t.highlight(o.content,h)||a(o.content),"
    "+i+"
    "+s(e,r)},u.heading_open=function(e,r){return""},u.heading_close=function(e,r){return"\n"},u.hr=function(e,r,t){return(t.xhtmlOut?"
    ":"
    ")+s(e,r)},u.bullet_list_open=function(){return"
      \n"},u.bullet_list_close=function(e,r){return"
    "+s(e,r)},u.list_item_open=function(){return"
  • "},u.list_item_close=function(){return"
  • \n"},u.ordered_list_open=function(e,r){var t=e[r];return"1?' start="'+t.order+'"':"")+">\n"},u.ordered_list_close=function(e,r){return""+s(e,r)},u.paragraph_open=function(){return"

    "},u.paragraph_close=function(e,r){return"

    "+s(e,r)},u.link_open=function(e,r){var s=e[r].title?' title="'+a(c(e[r].title))+'"':"";return'"},u.link_close=function(){return""},u.image=function(e,r,n){var s=' src="'+a(t(e[r].src))+'"',i=e[r].title?' title="'+a(c(e[r].title))+'"':"",o=' alt="'+(e[r].alt?a(c(e[r].alt)):"")+'"',l=n.xhtmlOut?" /":"";return""},u.table_open=function(){return"\n"},u.table_close=function(){return"
    \n"},u.thead_open=function(){return" \n"},u.thead_close=function(){return" \n"},u.tbody_open=function(){return" \n"},u.tbody_close=function(){return" \n"},u.tr_open=function(){return" "},u.tr_close=function(){return"\n"},u.th_open=function(e,r){var t=e[r];return""},u.th_close=function(){return""},u.td_open=function(e,r){var t=e[r];return""},u.td_close=function(){return""},u.strong_open=function(){return""},u.strong_close=function(){return""},u.em_open=function(){return""},u.em_close=function(){return""},u.del_open=function(){return""},u.del_close=function(){return""},u.hardbreak=function(e,r,t){return t.xhtmlOut?"
    \n":"
    \n"},u.softbreak=function(e,r,t){return t.breaks?t.xhtmlOut?"
    \n":"
    \n":"\n"},u.text=function(e,r){return e[r].content},u.htmlblock=function(e,r){return e[r].content},u.htmltag=function(e,r){return e[r].content},i.prototype.render=function(e,r){var t,n,s,i="",o=this.rules,a=[],l=!1;for(t=0,n=e.length;n>t;t++)s=e[t].type,("ordered_list_open"===s||"bullet_list_open"===s)&&(a.push(l),l=e[t].tight),("ordered_list_close"===s||"bullet_list_close"===s)&&(l=a.pop()),"blockquote_open"===s&&(a.push(l),l=!1),"blockquote_close"===s&&(l=a.pop()),"paragraph_open"===s&&l||("paragraph_close"===s&&l?"list_item_close"!==e[t+1].type&&(i+="\n"):i+="inline"===e[t].type?this.render(e[t].children,r):o[s](e,t,r));return i},r.exports=i},{"./common/utils":5}],16:[function(e,r){"use strict";function t(e){return Object.prototype.toString.call(e)}function n(e){return"[object Function]"===t(e)}function s(e){var r=e.toString();return r=r.substr("function ".length),r=r.substr(0,r.indexOf("("))}function i(e){this.compile=e,this.rules=[]}i.prototype.find=function(e){for(var r=0;r=0&&t.enabled&&r.push(t.fn)}),r):(this.rules.forEach(function(e){e.enabled&&r.push(e.fn)}),r)},i.prototype.enable=function(e,r){Array.isArray(e)||(e=[e]),r&&this.rules.forEach(function(e){e.enabled=!1}),e.forEach(function(e){var r=this.find(e);if(0>r)throw new Error("Rules namager: invalid rule name "+e);this.rules[r].enabled=!0},this),this.compile()},i.prototype.disable=function(e){Array.isArray(e)||(e=[e]),e.forEach(function(e){var r=this.find(e);if(0>r)throw new Error("Rules namager: invalid rule name "+e);this.rules[r].enabled=!1},this),this.compile()},r.exports=i},{}],17:[function(e,r){"use strict";r.exports=function(e,r,t,n){var s,i,o,a,l,c,u,p,h,f=e.parser._rulesBlockquoteTerm,d=e.bMarks[r]+e.tShift[r],g=e.eMarks[r];if(d>g)return!1;if(62!==e.src.charCodeAt(d++))return!1;if(e.level>=e.options.maxNesting)return!1;if(n)return!0;for(32===e.src.charCodeAt(d)&&d++,e.bqMarks[r]++,e.bqLevel++,l=e.blkIndent,e.blkIndent=0,a=[e.bMarks[r]],e.bMarks[r]=d,d=g>d?e.skipSpaces(d):d,i=d>=g,o=[e.tShift[r]],e.tShift[r]=d-e.bMarks[r],s=r+1;t>s&&(d=e.bMarks[s]+e.tShift[s],g=e.eMarks[s],!(d>=g));s++)if(62!==e.src.charCodeAt(d++)){if(i)break;for(h=!1,u=0,p=f.length;p>u;u++)if(f[u](e,s,t,!0)){h=!0;break}if(h)break;a.push(e.bMarks[s]),o.push(e.tShift[s])}else e.bqMarks[s]++,32===e.src.charCodeAt(d)&&d++,a.push(e.bMarks[s]),e.bMarks[s]=d,d=g>d?e.skipSpaces(d):d,i=d>=g,o.push(e.tShift[s]),e.tShift[s]=d-e.bMarks[s];for(c=e.listMode,e.listMode=!1,e.tokens.push({type:"blockquote_open",level:e.level++}),e.parser.tokenize(e,r,s),e.tokens.push({type:"blockquote_close",level:--e.level}),e.listMode=c,u=0;us&&!(e.bqMarks[s]=4))break;s++,i=s}return n?!0:(e.tokens.push({type:"code",content:e.getLines(r,i,4+e.blkIndent,!0),block:!0,level:e.level}),e.line=s,!0)}},{}],19:[function(e,r){"use strict";r.exports=function(e,r,t,n){var s,i,o,a,l,c=!1,u=e.bMarks[r]+e.tShift[r],p=e.eMarks[r];if(u+3>p)return!1;if(s=e.src.charCodeAt(u),126!==s&&96!==s)return!1;if(l=u,u=e.skipChars(u,s),i=u-l,3>i)return!1;if(o=e.src.slice(u,p).trim(),o.indexOf("`")>=0)return!1;if(n)return!0;for(a=r;(a++,!(a>=t))&&(u=l=e.bMarks[a]+e.tShift[a],p=e.eMarks[a],!(p>u&&e.tShift[a]u&&e.bqMarks[a]u-l||(u=e.skipSpaces(u),p>u)))){c=!0;break}return i=e.tShift[r],e.tokens.push({type:"fence",params:o,content:e.getLines(r+1,a,i,!0),level:e.level}),e.line=a+(c?1:0),!0}},{}],20:[function(e,r){"use strict";r.exports=function(e,r,t,n){var s,i,o=e.bMarks[r]+e.tShift[r],a=e.eMarks[r];if(o>=a)return!1;if(s=e.src.charCodeAt(o),35!==s||o>=a)return!1;for(i=1,s=e.src.charCodeAt(++o);35===s&&a>o&&6>=i;)i++,s=e.src.charCodeAt(++o);return i>6||a>o&&32!==s?!1:(o=e.skipSpaces(o),a=e.skipCharsBack(a,32,o),a=e.skipCharsBack(a,35,o),ao&&e.tokens.push({type:"inline",content:e.src.slice(o,a).trim(),level:e.level+1}),e.tokens.push({type:"heading_close",hLevel:i,level:e.level}),e.line=r+1,!0))}},{}],21:[function(e,r){"use strict";r.exports=function(e,r,t,n){var s,i,o,a=e.bMarks[r],l=e.eMarks[r];if(a+=e.tShift[r],a>l)return!1;if(s=e.src.charCodeAt(a++),42!==s&&45!==s&&95!==s)return!1;for(i=1;l>a;){if(o=e.src.charCodeAt(a++),o!==s&&32!==o)return!1;o===s&&i++}return 3>i?!1:n?!0:(e.tokens.push({type:"hr",level:e.level}),e.line=r+1,!0)}},{}],22:[function(e,r){"use strict";function t(e){var r=32|e;return r>=97&&122>=r}var n=e("../common/html_blocks"),s=/^<([a-zA-Z]{1,15})[\s\/>]/,i=/^<\/([a-zA-Z]{1,15})[\s>]/;r.exports=function(e,r,o,a){var l,c,u,p=e.bMarks[r],h=e.eMarks[r],f=e.tShift[r];if(p+=f,!e.options.html)return!1;if(f>3||p+2>=h)return!1;if(60!==e.src.charCodeAt(p))return!1;if(l=e.src.charCodeAt(p+1),33===l||63===l){if(a)return!0}else{if(47!==l&&!t(l))return!1;if(47===l){if(c=e.src.slice(p,h).match(i),!c)return!1}else if(c=e.src.slice(p,h).match(s),!c)return!1;if(n.indexOf(c[1].toLowerCase())<0)return!1;if(a)return!0}for(u=r+1;u=t?!1:e.tShift[a]3?!1:(i=e.bMarks[a]+e.tShift[a],o=e.eMarks[a],s=e.src.charCodeAt(i),45!==s&&61!==s?!1:(i=e.skipChars(i,s),i=e.skipSpaces(i),o>i?!1:n?!0:(i=e.bMarks[r]+e.tShift[r],e.tokens.push({type:"heading_open",hLevel:61===s?1:2,level:e.level}),e.tokens.push({type:"inline",content:e.src.slice(i,e.eMarks[r]).trim(),level:e.level+1}),e.tokens.push({type:"heading_close",hLevel:61===s?1:2,level:e.level}),e.line=a+1,!0)))}},{}],24:[function(e,r){"use strict";function t(e,r){var t,n,s;return n=e.bMarks[r]+e.tShift[r],s=e.eMarks[r],n>=s?-1:(t=e.src.charCodeAt(n++),42!==t&&45!==t&&43!==t?-1:s>n&&32!==e.src.charCodeAt(n)?-1:n)}function n(e,r){var t,n=e.bMarks[r]+e.tShift[r],s=e.eMarks[r];if(n+1>=s)return-1;if(t=e.src.charCodeAt(n++),48>t||t>57)return-1;for(;;){if(n>=s)return-1;if(t=e.src.charCodeAt(n++),!(t>=48&&57>=t)){if(41===t||46===t)break;return-1}}return s>n&&32!==e.src.charCodeAt(n)?-1:n}r.exports=function(e,r,s,i){var o,a,l,c,u,p,h,f,d,g,m,b,v,k,y,x,w,q,_,A=e.parser._rulesListTerm;if((f=n(e,r))>=0)v=!0;else{if(!((f=t(e,r))>=0))return!1;v=!1}if(e.level>=e.options.maxNesting)return!1;if(b=e.src.charCodeAt(f-1),i)return!0;for(y=e.tokens.length,v?(h=e.bMarks[r]+e.tShift[r],m=Number(e.src.substr(h,f-h-1)),e.tokens.push({type:"ordered_list_open",order:m,tight:!0,level:e.level++})):e.tokens.push({type:"bullet_list_open",tight:!0,level:e.level++}),o=r,x=!1;!(!(s>o)||(k=e.skipSpaces(f),d=e.eMarks[o],g=k>=d?1:k-f,g>4&&(g=1),1>g&&(g=1),a=f-e.bMarks[o]+g,e.tokens.push({type:"list_item_open",level:e.level++}),c=e.blkIndent,u=e.tight,l=e.tShift[r],p=e.listMode,e.tShift[r]=k-e.bMarks[r],e.blkIndent=a,e.tight=!0,e.listMode=!0,e.parser.tokenize(e,r,s,!0),(!e.tight||x)&&(e.tokens[y].tight=!1),x=e.line-r>1&&e.isEmpty(e.line-1),e.blkIndent=c,e.tShift[r]=l,e.tight=u,e.listMode=p,e.tokens.push({type:"list_item_close",level:--e.level}),o=r=e.line,k=e.bMarks[r],o>=s)||e.isEmpty(o)||e.tShift[o]w;w++)if(A[w](e,o,s,!0)){_=!0;break}if(_)break;if(v){if(f=n(e,o),0>f)break}else if(f=t(e,o),0>f)break;if(b!==e.src.charCodeAt(f-1))break}return e.tokens.push(v?{type:"ordered_list_close",level:--e.level}:{type:"bullet_list_close",level:--e.level}),e.line=o,!0}},{}],25:[function(e,r){"use strict";var t=e("../parser_ref");r.exports=function(e,r){var n,s,i,o,a,l,c=r+1,u=e.parser._rulesParagraphTerm;for(n=e.lineMax;n>c&&!e.isEmpty(c);c++)if(!(e.tShift[c]-e.blkIndent>3)){for(o=!1,a=0,l=u.length;l>a;a++)if(u[a](e,c,n,!0)){o=!0;break}if(o)break}for(s=e.getLines(r,c,e.blkIndent,!1).trim();s.length&&(i=t(s,e.parser.inline,e.options,e.env),!(0>i));)s=s.slice(i).trim();return s.length&&(e.tokens.push({type:"paragraph_open",level:e.level}),e.tokens.push({type:"inline",content:s,level:e.level+1}),e.tokens.push({type:"paragraph_close",level:e.level})),e.line=c,!0}},{"../parser_ref":14}],26:[function(e,r){"use strict";function t(e,r,t,n,s){var i,o,a,l,c,u,p;for(this.src=e,this.parser=r,this.options=n,this.env=s,this.tokens=t,this.bMarks=[],this.eMarks=[],this.tShift=[],this.bqMarks=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.listMode=!1,this.bqLevel=0,this.level=0,this.result="",o=this.src,u=0,p=!1,a=l=u=0,c=o.length;c>l;l++){if(i=o.charCodeAt(l),!p){if(32===i){u++;continue}this.tShift.push(u),p=!0}(10===i||13===i)&&(this.bMarks.push(a),this.eMarks.push(l),p=!1,u=0,a=l+1,13===i&&c>l+1&&10===o.charCodeAt(l+1)&&(l++,a++))}for((13!==i||10!==i)&&(this.bMarks.push(a),this.eMarks.push(c),p||this.tShift.push(u)),this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.lineMax=this.bMarks.length-1,a=this.bMarks.length;a>0;a--)this.bqMarks.push(0)}t.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},t.prototype.skipEmptyLines=function(e){for(var r=this.lineMax;r>e&&!(this.bMarks[e]+this.tShift[e]e&&32===this.src.charCodeAt(e);e++);return e},t.prototype.skipChars=function(e,r){for(var t=this.src.length;t>e&&this.src.charCodeAt(e)===r;e++);return e},t.prototype.skipCharsBack=function(e,r,t){if(t>=e)return e;for(;e>t;)if(r!==this.src.charCodeAt(--e))return e+1;return e},t.prototype.getLines=function(e,r,t,n){var s,i,o,a,l=e;if(e>=r)return"";if(l+1===r)return i=this.bMarks[l]+Math.min(this.tShift[l],t),o=n?this.bMarks[r]:this.eMarks[r-1],this.src.slice(i,o);for(a=new Array(r-e),s=0;r>l;l++,s++)i=this.bMarks[l]+Math.min(this.tShift[l],t),o=r>l+1||n?this.eMarks[l]+1:this.eMarks[l],a[s]=this.src.slice(i,o);return a.join("")},t.prototype.clone=function(e){return new t(e,this.parser,this.tokens,this.options)},r.exports=t},{}],27:[function(e,r){"use strict";function t(e,r,t){var n=e.bMarks[r],s=e.eMarks[r];return e.src.substr(n,s-n).match(t)}r.exports=function(e,r,n,s){var i,o,a,l,c,u,p,h,f;if(r+2>n)return!1;if(i=e.src.charCodeAt(e.bMarks[r+1]+e.tShift[r+1]),124!==i&&45!==i&&58!==i)return!1;if(a=t(e,r+1,/^ *\|?(( *[:-]-+[:-] *\|)+( *[:-]-+[:-] *))\|? *$/),!a)return!1;for(p=a[1].split("|"),h=[],l=0;lc&&(u=t(e,c,/^ *\|?(.*?\|.*?)\|? *$/),u);c++){for(p=u[1].split("|"),e.tokens.push({type:"tr_open",level:e.level++}),l=0;l/,i=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;r.exports=function(e){var r,o,a,l,c=e.pos;return 60!==e.src.charCodeAt(c)?!1:(r=e.src.slice(c),r.indexOf(">")<0?!1:(o=r.match(i))?n.indexOf(o[1].toLowerCase())<0?!1:(l=o[0].slice(1,-1),e.parser.validateLink(l)?(e.push({type:"link_open",href:l,level:e.level}),e.push({type:"text",content:t(l),level:e.level+1}),e.push({type:"link_close",level:e.level}),e.pos+=o[0].length,!0):!1):(a=r.match(s),a?(l=a[0].slice(1,-1),e.parser.validateLink("mailto:"+l)?(e.push({type:"link_open",href:"mailto:"+l,level:e.level}),e.push({type:"text",content:t(l),level:e.level+1}),e.push({type:"link_close",level:e.level}),e.pos+=a[0].length,!0):!1):!1))}},{"../common/url_schemas":4,"../common/utils":5}],29:[function(e,r){var t=/`+/g;r.exports=function(e){var r,n,s,i,o,a=e.pos,l=e.src.charCodeAt(a);if(96!==l)return!1;for(r=a,a++,s=e.posMax;s>a&&96===e.src.charCodeAt(a);)a++;for(i=e.src.slice(r,a),t=/`+/g,t.lastIndex=a;null!==(o=t.exec(e.src));)if(o[0].length===i.length)return n=e.src.slice(a,t.lastIndex-i.length),e.push({type:"code",content:n.replace(/[ \n]+/g," ").trim(),block:!1,level:e.level}),e.pos+=2*i.length+n.length,!0;return e.pending+=i,e.pos+=i.length,!0}},{}],30:[function(e,r){"use strict";function t(e){return e>=48&&57>=e||e>=65&&90>=e||e>=97&&122>=e}function n(e,r){var n,s,i=r,o=e.posMax,a=e.src.charCodeAt(r);if(n=0!==e.pending.length?e.pending.charCodeAt(e.pending.length-1):-1,n===a)return-1;for(;o>i&&e.src.charCodeAt(i)===a;)i++;return i>=o?-1:(s=i-r,s>=4?s:32===e.src.charCodeAt(i)?-1:95===a&&t(n)?-1:s)}function s(e,r){var n,s,i=r,o=e.posMax,a=e.src.charCodeAt(r);for(n=0!==e.pending.length?e.pending.charCodeAt(e.pending.length-1):-1;o>i&&e.src.charCodeAt(i)===a;)i++;return s=i-r,s>=4?s:32===n?-1:95===a&&o>i&&t(e.src.charCodeAt(i))?-1:s}r.exports=function(e){var r,t,i,o,a,l,c,u,p,h,f,d,g=e.posMax,m=e.pos,b=e.src.charCodeAt(m);if(95!==b&&42!==b)return!1;if(e.validateInsideEm||e.validateInsideLink)return!1;if(r=n(e,m),0>r)return!1;if(r>=4)return e.pos+=r,e.pending+=e.src.slice(m,r),!0;if(e.level>=e.options.maxNesting)return!1;for(i=e.tokens.length,o=e.pending,a=e.validateInsideEm,e.pos=m+r,h=[r],e.validateInsideEm=!0;e.pos=1&&4>t){for(u=h.pop(),p=t;u!==p;){if(3===u){h.push(3-p);break}if(u>p){f=!0;break}if(p-=u,0===h.length)break;e.pos+=u,u=h.pop()}if(f)break;if(0===h.length){r=u,l=!0;break}e.pos+=t;continue}if(t=n(e,e.pos),t>=1&&4>t){h.push(t),e.pos+=t;continue}}c=e.parser.tokenizeSingle(e),c?d=!1:(d=e.src.charCodeAt(e.pos)===b,e.pending+=e.src[e.pos],e.pos++)}return e.tokens.length=i,e.pending=o,e.validateInsideEm=a,l?(e.posMax=e.pos,e.pos=m+r,(2===r||3===r)&&e.push({type:"strong_open",level:e.level++}),(1===r||3===r)&&e.push({type:"em_open",level:e.level++}),e.parser.tokenize(e),(1===r||3===r)&&e.push({type:"em_close",level:--e.level}),(2===r||3===r)&&e.push({type:"strong_close",level:--e.level}),e.pos=e.posMax+r,e.posMax=g,!0):(e.pos=m,!1)}},{}],31:[function(e,r){"use strict";var t=e("../common/entities"),n=e("../common/utils").escapeHtml,s=e("../common/utils").isValidEntityCode,i=e("../common/utils").fromCodePoint,o=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,a=/^&([a-z][a-z0-9]{1,31});/i;r.exports=function(e){var r,l,c,u=e.pos,p=e.posMax;if(38!==e.src.charCodeAt(u))return!1;if(p>u+1)if(r=e.src.charCodeAt(u+1),35===r){if(c=e.src.slice(u).match(o))return l="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),e.pending+=s(l)?n(i(l)):i(65533),e.pos+=c[0].length,!0}else if(c=e.src.slice(u).match(a),c&&t.hasOwnProperty(c[1]))return e.pending+=n(t[c[1]]),e.pos+=c[0].length,!0;return e.pending+="&",e.pos++,!0}},{"../common/entities":1,"../common/utils":5}],32:[function(e,r){var t="\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").map(function(e){return e.charCodeAt(0)});r.exports=function(e){var r,n=e.pos,s=e.posMax;if(92!==e.src.charCodeAt(n))return!1;if(n++,s>n){if(r=e.src.charCodeAt(n),t.indexOf(r)>=0)return e.pending+=38===r?"&":60===r?"<":62===r?">":34===r?""":e.src[n],e.pos+=2,!0;if(10===r){for(e.push({type:"hardbreak",level:e.level}),n++;s>n&&32===e.src.charCodeAt(n);)n++;return e.pos=n,!0}}return e.pending+="\\",e.pos++,!0}},{}],33:[function(e,r){r.exports=function(e){var r=e.src.charCodeAt(e.pos);if(60===r)e.pending+="<";else if(62===r)e.pending+=">";else{if(34!==r)return!1;e.pending+="""}return e.pos++,!0}},{}],34:[function(e,r){"use strict";function t(e){var r=32|e;return r>=97&&122>=r}var n=e("../common/html_re").HTML_TAG_RE;r.exports=function(e){var r,s,i,o=e.pos;return e.options.html?(i=e.posMax,60!==e.src.charCodeAt(o)||o+2>=i?!1:(r=e.src.charCodeAt(o+1),(33===r||63===r||47===r||t(r))&&(s=e.src.slice(o).match(n))?(e.push({type:"htmltag",content:e.src.slice(o,o+s[0].length),level:e.level}),e.pos+=s[0].length,!0):!1)):!1}},{"../common/html_re":3}],35:[function(e,r){"use strict";function t(e){var r,t,a,l,c,u,p,h,f=!1,d=e.posMax,g=e.pos,m=e.src.charCodeAt(g);if(33===m&&(f=!0,m=e.src.charCodeAt(++g)),91!==m)return!1;if(e.level>=e.options.maxNesting)return!1;if(r=g+1,t=n(e,g),0>t)return!1;if(u=t+1,d>u&&40===e.src.charCodeAt(u)){for(u++;d>u&&(h=e.src.charCodeAt(u),32===h||10===h);u++);if(u>=d)return!1;for(g=u,s(e,u)?(l=e.link_content,u=e.pos):l="",g=u;d>u&&(h=e.src.charCodeAt(u),32===h||10===h);u++);if(d>u&&g!==u&&i(e,u))for(c=e.link_content,u=e.pos;d>u&&(h=e.src.charCodeAt(u),32===h||10===h);u++);else c="";if(u>=d||41!==e.src.charCodeAt(u))return e.pos=r-1,!1;u++}else{if(e.linkLevel>0)return!1;for(;d>u&&(h=e.src.charCodeAt(u),32===h||10===h);u++);if(d>u&&91===e.src.charCodeAt(u)&&(g=u+1,u=n(e,u),u>=0?a=e.src.slice(g,u++):u=g-1),a||(a=e.src.slice(r,t)),p=e.env.references[o(a)],!p)return e.pos=r-1,!1;l=p.href,c=p.title}return e.pos=r,e.posMax=t,f?e.push({type:"image",src:l,title:c,alt:e.src.substr(r,t-r),level:e.level}):(e.push({type:"link_open",href:l,title:c,level:e.level++}),e.linkLevel++,e.parser.tokenize(e),e.linkLevel--,e.push({type:"link_close",level:--e.level})),e.pos=u,e.posMax=d,!0}var n=e("../links").parseLinkLabel,s=e("../links").parseLinkDestination,i=e("../links").parseLinkTitle,o=e("../links").normalizeReference;r.exports=t},{"../links":11}],36:[function(e,r){r.exports=function(e){var r,t,n=e.pos;if(10!==e.src.charCodeAt(n))return!1;for(r=e.pending.length-1,t=e.posMax,r>=0&&32===e.pending.charCodeAt(r)?r>=1&&32===e.pending.charCodeAt(r-1)?(e.pending=e.pending.replace(/ +$/,""),e.push({type:"hardbreak",level:e.level})):(e.pending=e.pending.slice(0,-1),e.push({type:"softbreak",level:e.level})):e.push({type:"softbreak",level:e.level}),n++;t>n&&32===e.src.charCodeAt(n);)n++;return e.pos=n,!0}},{}],37:[function(e,r){"use strict";function t(e,r,t,n){this.src=e,this.env=n,this.options=t,this.parser=r,this.tokens=[],this.pos=0,this.pending="",this.posMax=this.src.length,this.validateInsideEm=!1,this.validateInsideLink=!1,this.linkLevel=0,this.level=0,this.link_content="",this.pendingLevel=0,this.label_nest_level=0}t.prototype.pushPending=function(){var e=this.pending;this.tokens.push({type:"text",content:e,level:this.pendingLevel}),this.pending=""},t.prototype.push=function(e){this.pending&&this.pushPending(),this.tokens.push(e),this.pendingLevel=this.level},t.prototype.skipSpaces=function(e){for(var r=this.src.length;r>e&&32===this.src.charCodeAt(e);e++);return e},r.exports=t},{}],38:[function(e,r){"use strict";r.exports=function(e){var r,t,n,s,i,o,a,l,c,u=e.posMax,p=e.pos;if(126!==e.src.charCodeAt(p))return!1;if(p+4>=u)return!1;if(126!==e.src.charCodeAt(p+1))return!1;if(e.validateInsideEm||e.validateInsideLink)return!1;if(e.level>=e.options.level)return!1;if(l=0!==e.pending.length?e.pending.charCodeAt(e.pending.length-1):-1,c=e.src.charCodeAt(p+2),126===l)return!1;if(126===c)return!1;if(32===c)return!1;for(o=p+2;u>o&&126===e.src.charCodeAt(o);)o++;if(o!==p+2)return e.pos+=o-p,e.pending+=e.src.slice(p,o),!0;for(r=e.tokens.length,t=e.pending,n=e.validateInsideEm,e.pos=p+2,e.validateInsideEm=!0,a=1;e.pos+1=a))){s=!0;break}i=e.parser.tokenizeSingle(e),i||(e.pending+=e.src[e.pos],e.pos++)}return e.tokens.length=r,e.pending=t,e.validateInsideEm=n,s?(e.posMax=e.pos,e.pos=p+2,e.push({type:"del_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"del_close",level:--e.level}),e.pos=e.posMax+2,e.posMax=u,!0):(e.pos=p,!1)}},{}],39:[function(e,r){r.exports=function(e){var r=e.src.slice(e.pos).match(e.parser.textMatch);return r?(e.pending+=r[0],e.pos+=r[0].length,!0):!1}},{}],40:[function(e,r){"use strict";var t=e("autolinker"),n=e("../common/utils").escapeHtml,s=[],i=new t({stripPrefix:!1,replaceFn:function(e,r){return"url"===r.getType()&&s.push(r.getUrl()),!1}});r.exports=function(e,r){var t,o,a,l,c,u,p,h=r.tokens;for(t=h.length-1;t>=0;t--)if(o=h[t],"link_close"!==o.type){if("text"===o.type&&(o.content.indexOf("://")||o.content.indexOf("www"))){if(a=o.content,s=[],i.link(a),!s.length)continue;for(l=[],p=o.level,c=0;c=0;t--)n=i[t],"text"===n.type&&(s=n.content,s.indexOf("(")>=0&&(o.copyright&&(s=s.replace(/\(c\)/gi,"©")),o.trademark&&(s=s.replace(/\(tm\)/gi,"™")),o.registered&&(s=s.replace(/\(r\)/gi,"®")),o.paragraph&&(s=s.replace(/\(p\)/gi,"§"))),o.plusminus&&s.indexOf("+-")>=0&&(s=s.replace(/\+-/g,"±")),o.ellipsis&&s.indexOf("..")>=0&&(s=s.replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..")),o.dupes&&(s.indexOf("????")>=0||s.indexOf("!!!!")>=0||s.indexOf(",,")>=0)&&(s=s.replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",")),o.emDashes&&s.indexOf("--")>=0&&(s=s.replace(/(^|\s)--(\s|$)/gm,"$1—$2")),n.content=s) +}},{}],42:[function(e,r){"use strict";function t(){this.options=s({},n),this.ruler=new i(this.rulesUpdate.bind(this));for(var e=0;er;r++)n[r](this,e)},r.exports=t},{"./common/utils":5,"./defaults/typographer":9,"./ruler":16,"./rules_typographer/replace":41}],43:[function(r,t,n){!function(r,s){"function"==typeof e&&e.amd?e(s):"undefined"!=typeof n?t.exports=s():r.Autolinker=s()}(this,function(){var e=function(r){e.Util.assign(this,r)};return e.prototype={constructor:e,urls:!0,email:!0,twitter:!0,newWindow:!0,stripPrefix:!0,className:"",htmlCharacterEntitiesRegex:/( | |<|<|>|>)/gi,matcherRegex:function(){var e=/(^|[^\w])@(\w{1,15})/,r=/(?:[\-;:&=\+\$,\w\.]+@)/,t=/(?:[A-Za-z]{3,9}:(?:\/\/)?)/,n=/(?:www\.)/,s=/[A-Za-z0-9\.\-]*[A-Za-z0-9\-]/,i=/\.(?:international|construction|contractors|enterprises|photography|productions|foundation|immobilien|industries|management|properties|technology|christmas|community|directory|education|equipment|institute|marketing|solutions|vacations|bargains|boutique|builders|catering|cleaning|clothing|computer|democrat|diamonds|graphics|holdings|lighting|partners|plumbing|supplies|training|ventures|academy|careers|company|cruises|domains|exposed|flights|florist|gallery|guitars|holiday|kitchen|neustar|okinawa|recipes|rentals|reviews|shiksha|singles|support|systems|agency|berlin|camera|center|coffee|condos|dating|estate|events|expert|futbol|kaufen|luxury|maison|monash|museum|nagoya|photos|repair|report|social|supply|tattoo|tienda|travel|viajes|villas|vision|voting|voyage|actor|build|cards|cheap|codes|dance|email|glass|house|mango|ninja|parts|photo|shoes|solar|today|tokyo|tools|watch|works|aero|arpa|asia|best|bike|blue|buzz|camp|club|cool|coop|farm|fish|gift|guru|info|jobs|kiwi|kred|land|limo|link|menu|mobi|moda|name|pics|pink|post|qpon|rich|ruhr|sexy|tips|vote|voto|wang|wien|wiki|zone|bar|bid|biz|cab|cat|ceo|com|edu|gov|int|kim|mil|net|onl|org|pro|pub|red|tel|uno|wed|xxx|xyz|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw)\b/,o=/(?:[\-A-Za-z0-9+&@#\/%?=~_()|!:,.;]*[\-A-Za-z0-9+&@#\/%=~_()|])?/;return new RegExp(["(",e.source,")","|","(",r.source,s.source,i.source,")","|","(","(?:","(?:",t.source,s.source,")","|","(?:","(.?//)?",n.source,s.source,")","|","(?:","(.?//)?",s.source,i.source,")",")",o.source,")"].join(""),"gi")}(),invalidProtocolRelMatchRegex:/^[\w]\/\//,charBeforeProtocolRelMatchRegex:/^(.)?\/\//,link:function(r){var t=this,n=this.getHtmlParser(),s=this.htmlCharacterEntitiesRegex,i=0,o=[];return n.parse(r,{processHtmlNode:function(e,r,t){"a"===r&&(t?i=Math.max(i-1,0):i++),o.push(e)},processTextNode:function(r){if(0===i)for(var n=e.Util.splitAndCapture(r,s),a=0,l=n.length;l>a;a++){var c=n[a],u=t.processTextNode(c);o.push(u)}else o.push(r)}}),o.join("")},getHtmlParser:function(){var r=this.htmlParser;return r||(r=this.htmlParser=new e.HtmlParser),r},getTagBuilder:function(){var r=this.tagBuilder;return r||(r=this.tagBuilder=new e.AnchorTagBuilder({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),r},processTextNode:function(r){var t=this,n=this.charBeforeProtocolRelMatchRegex;return r.replace(this.matcherRegex,function(r,s,i,o,a,l,c,u){var p,h=s,f=i,d=o,g=a,m=l,b=c||u,v="",k="";if(!t.isValidMatch(h,g,m,b))return r;if(t.matchHasUnbalancedClosingParen(r)&&(r=r.substr(0,r.length-1),k=")"),g)p=new e.match.Email({matchedText:r,email:g});else if(h)f&&(v=f,r=r.slice(1)),p=new e.match.Twitter({matchedText:r,twitterHandle:d});else{if(b){var y=b.match(n)[1]||"";y&&(v=y,r=r.slice(1))}p=new e.match.Url({matchedText:r,url:r,protocolRelativeMatch:b,stripPrefix:t.stripPrefix})}var x=t.createMatchReturnVal(p,r);return v+x+k})},isValidMatch:function(e,r,t,n){return e&&!this.twitter||r&&!this.email||t&&!this.urls||t&&-1===t.indexOf(".")||t&&/^[A-Za-z]{3,9}:/.test(t)&&!/:.*?[A-Za-z]/.test(t)||n&&this.invalidProtocolRelMatchRegex.test(n)?!1:!0},matchHasUnbalancedClosingParen:function(e){var r=e.charAt(e.length-1);if(")"===r){var t=e.match(/\(/g),n=e.match(/\)/g),s=t&&t.length||0,i=n&&n.length||0;if(i>s)return!0}return!1},createMatchReturnVal:function(r,t){var n;if(this.replaceFn&&(n=this.replaceFn.call(this,this,r)),"string"==typeof n)return n;if(n===!1)return t;if(n instanceof e.HtmlTag)return n.toString();var s=this.getTagBuilder(),i=s.build(r);return i.toString()}},e.link=function(r,t){var n=new e(t);return n.link(r)},e.match={},e.Util={abstractMethod:function(){throw"abstract"},assign:function(e,r){for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t]);return e},extend:function(r,t){var n=r.prototype,s=function(){};s.prototype=n;var i;i=t.hasOwnProperty("constructor")?t.constructor:function(){n.constructor.apply(this,arguments)};var o=i.prototype=new s;return o.constructor=i,o.superclass=n,delete t.constructor,e.Util.assign(o,t),i},ellipsis:function(e,r,t){return e.length>r&&(t=null==t?"..":t,e=e.substring(0,r-t.length)+t),e},indexOf:function(e,r){if(Array.prototype.indexOf)return e.indexOf(r);for(var t=0,n=e.length;n>t;t++)if(e[t]===r)return t;return-1},splitAndCapture:function(e,r){if(!r.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var t,n=[],s=0;t=r.exec(e);)n.push(e.substring(s,t.index)),n.push(t[0]),s=t.index+t[0].length;return n.push(e.substring(s)),n}},e.HtmlParser=e.Util.extend(Object,{htmlRegex:function(){var e=/[0-9a-zA-Z:]+/,r=/[^\s\0"'>\/=\x01-\x1F\x7F]+/,t=/(?:".*?"|'.*?'|[^'"=<>`\s]+)/,n=r.source+"(?:\\s*=\\s*"+t.source+")?";return new RegExp(["<(?:!|(/))?","("+e.source+")","(?:","\\s+","(?:",n,"|",t.source+")",")*","\\s*/?",">"].join(""),"g")}(),parse:function(e,r){r=r||{};for(var t,n=r.processHtmlNode||function(){},s=r.processTextNode||function(){},i=this.htmlRegex,o=0;null!==(t=i.exec(e));){var a=t[0],l=t[2],c=!!t[1],u=e.substring(o,t.index);u&&s(u),n(a,l,c),o=t.index+a.length}if(o",this.getInnerHtml(),""].join("")},buildAttrsStr:function(){if(!this.attrs)return"";var e=this.getAttrs(),r=[];for(var t in e)e.hasOwnProperty(t)&&r.push(t+'="'+e[t]+'"');return r.join(" ")}}),e.AnchorTagBuilder=e.Util.extend(Object,{constructor:function(r){e.Util.assign(this,r)},build:function(r){var t=new e.HtmlTag({tagName:"a",attrs:this.createAttrs(r.getType(),r.getAnchorHref()),innerHtml:this.processAnchorText(r.getAnchorText())});return t},createAttrs:function(e,r){var t={href:r},n=this.createCssClass(e);return n&&(t["class"]=n),this.newWindow&&(t.target="_blank"),t},createCssClass:function(e){var r=this.className;return r?r+" "+r+"-"+e:""},processAnchorText:function(e){return e=this.doTruncate(e)},doTruncate:function(r){return e.Util.ellipsis(r,this.truncate||Number.POSITIVE_INFINITY)}}),e.match.Match=e.Util.extend(Object,{constructor:function(r){e.Util.assign(this,r)},getType:e.Util.abstractMethod,getMatchedText:function(){return this.matchedText},getAnchorHref:e.Util.abstractMethod,getAnchorText:e.Util.abstractMethod}),e.match.Email=e.Util.extend(e.match.Match,{getType:function(){return"email"},getEmail:function(){return this.email},getAnchorHref:function(){return"mailto:"+this.email},getAnchorText:function(){return this.email}}),e.match.Twitter=e.Util.extend(e.match.Match,{getType:function(){return"twitter"},getTwitterHandle:function(){return this.twitterHandle},getAnchorHref:function(){return"https://twitter.com/"+this.twitterHandle},getAnchorText:function(){return"@"+this.twitterHandle}}),e.match.Url=e.Util.extend(e.match.Match,{urlPrefixRegex:/^(https?:\/\/)?(www\.)?/i,protocolRelativeRegex:/^\/\//,checkForProtocolRegex:/^[A-Za-z]{3,9}:/,getType:function(){return"url"},getUrl:function(){var e=this.url;return this.protocolRelativeMatch||this.checkForProtocolRegex.test(e)||(e=this.url="http://"+e),e},getAnchorHref:function(){var e=this.getUrl();return e.replace(/&/g,"&")},getAnchorText:function(){var e=this.getUrl();return this.protocolRelativeMatch&&(e=this.stripProtocolRelativePrefix(e)),this.stripPrefix&&(e=this.stripUrlPrefix(e)),e=this.removeTrailingSlash(e)},stripUrlPrefix:function(e){return e.replace(this.urlPrefixRegex,"")},stripProtocolRelativePrefix:function(e){return e.replace(this.protocolRelativeRegex,"")},removeTrailingSlash:function(e){return"/"===e.charAt(e.length-1)&&(e=e.slice(0,-1)),e}}),e})},{}]},{},[])("./")}); \ No newline at end of file