tags\n//\n'use strict';\n\nvar PUNCT_CHARS = ' \\n()[]\\'\".,!?-'; // from Google closure library\n// http://closure-library.googlecode.com/git-history/docs/local_closure_goog_string_string.js.source.html#line1021\n\nfunction regEscape(s) {\n return s.replace(/([-()\\[\\]{}+?*.$\\^|,:#= 0; i--) {\n token = tokens[i];\n\n if (token.type !== 'text') {\n continue;\n }\n\n pos = 0;\n text = token.content;\n reg.lastIndex = 0;\n level = token.level;\n nodes = [];\n\n while (m = reg.exec(text)) {\n if (reg.lastIndex > pos) {\n nodes.push({\n type: 'text',\n content: text.slice(pos, m.index + m[1].length),\n level: level\n });\n }\n\n nodes.push({\n type: 'abbr_open',\n title: state.env.abbreviations[':' + m[2]],\n level: level++\n });\n nodes.push({\n type: 'text',\n content: m[2],\n level: level\n });\n nodes.push({\n type: 'abbr_close',\n level: --level\n });\n pos = reg.lastIndex - m[3].length;\n }\n\n if (!nodes.length) {\n continue;\n }\n\n if (pos < text.length) {\n nodes.push({\n type: 'text',\n content: text.slice(pos),\n level: level\n });\n } // replace current node\n\n\n blockTokens[j].children = tokens = [].concat(tokens.slice(0, i), nodes, tokens.slice(i + 1));\n }\n }\n};","'use strict';\n/**\n * Utility functions\n */\n\nfunction typeOf(obj) {\n return Object.prototype.toString.call(obj);\n}\n\nfunction isString(obj) {\n return typeOf(obj) === '[object String]';\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n\nfunction has(object, key) {\n return object ? hasOwn.call(object, key) : false;\n} // Extend objects\n//\n\n\nfunction assign(obj\n/*from1, from2, from3, ...*/\n) {\n var sources = [].slice.call(arguments, 1);\n sources.forEach(function (source) {\n if (!source) {\n return;\n }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be object');\n }\n\n Object.keys(source).forEach(function (key) {\n obj[key] = source[key];\n });\n });\n return obj;\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nvar UNESCAPE_MD_RE = /\\\\([\\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;\n\nfunction unescapeMd(str) {\n if (str.indexOf('\\\\') < 0) {\n return str;\n }\n\n return str.replace(UNESCAPE_MD_RE, '$1');\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nfunction isValidEntityCode(c) {\n /*eslint no-bitwise:0*/\n // broken sequence\n if (c >= 0xD800 && c <= 0xDFFF) {\n return false;\n } // never used\n\n\n if (c >= 0xFDD0 && c <= 0xFDEF) {\n return false;\n }\n\n if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) {\n return false;\n } // control codes\n\n\n if (c >= 0x00 && c <= 0x08) {\n return false;\n }\n\n if (c === 0x0B) {\n return false;\n }\n\n if (c >= 0x0E && c <= 0x1F) {\n return false;\n }\n\n if (c >= 0x7F && c <= 0x9F) {\n return false;\n } // out of range\n\n\n if (c > 0x10FFFF) {\n return false;\n }\n\n return true;\n}\n\nfunction fromCodePoint(c) {\n /*eslint no-bitwise:0*/\n if (c > 0xffff) {\n c -= 0x10000;\n var surrogate1 = 0xd800 + (c >> 10),\n surrogate2 = 0xdc00 + (c & 0x3ff);\n return String.fromCharCode(surrogate1, surrogate2);\n }\n\n return String.fromCharCode(c);\n}\n\nvar NAMED_ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;\nvar DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;\n\nvar entities = require('./entities');\n\nfunction replaceEntityPattern(match, name) {\n var code = 0;\n\n if (has(entities, name)) {\n return entities[name];\n } else if (name.charCodeAt(0) === 0x23\n /* # */\n && DIGITAL_ENTITY_TEST_RE.test(name)) {\n code = name[1].toLowerCase() === 'x' ? parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10);\n\n if (isValidEntityCode(code)) {\n return fromCodePoint(code);\n }\n }\n\n return match;\n}\n\nfunction replaceEntities(str) {\n if (str.indexOf('&') < 0) {\n return str;\n }\n\n return str.replace(NAMED_ENTITY_RE, replaceEntityPattern);\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nvar HTML_ESCAPE_TEST_RE = /[&<>\"]/;\nvar HTML_ESCAPE_REPLACE_RE = /[&<>\"]/g;\nvar HTML_REPLACEMENTS = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"'\n};\n\nfunction replaceUnsafeChar(ch) {\n return HTML_REPLACEMENTS[ch];\n}\n\nfunction escapeHtml(str) {\n if (HTML_ESCAPE_TEST_RE.test(str)) {\n return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);\n }\n\n return str;\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nexports.assign = assign;\nexports.isString = isString;\nexports.has = has;\nexports.unescapeMd = unescapeMd;\nexports.isValidEntityCode = isValidEntityCode;\nexports.fromCodePoint = fromCodePoint;\nexports.replaceEntities = replaceEntities;\nexports.escapeHtml = escapeHtml;","'use strict';\n/**\n * Local dependencies\n */\n\nvar Ruler = require('./ruler');\n/**\n * Core parser `rules`\n */\n\n\nvar _rules = [['block', require('./rules_core/block')], ['abbr', require('./rules_core/abbr')], ['references', require('./rules_core/references')], ['inline', require('./rules_core/inline')], ['footnote_tail', require('./rules_core/footnote_tail')], ['abbr2', require('./rules_core/abbr2')], ['replacements', require('./rules_core/replacements')], ['smartquotes', require('./rules_core/smartquotes')], ['linkify', require('./rules_core/linkify')]];\n/**\n * Class for top level (`core`) parser rules\n *\n * @api private\n */\n\nfunction Core() {\n this.options = {};\n this.ruler = new Ruler();\n\n for (var i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1]);\n }\n}\n/**\n * Process rules with the given `state`\n *\n * @param {Object} `state`\n * @api private\n */\n\n\nCore.prototype.process = function (state) {\n var i, l, rules;\n rules = this.ruler.getRules('');\n\n for (i = 0, l = rules.length; i < l; i++) {\n rules[i](state);\n }\n};\n/**\n * Expose `Core`\n */\n\n\nmodule.exports = Core;","// Lists\n'use strict'; // Search `[-+*][\\n ]`, returns next pos arter marker on success\n// or -1 on fail.\n\nfunction skipBulletListMarker(state, startLine) {\n var marker, pos, max;\n pos = state.bMarks[startLine] + state.tShift[startLine];\n max = state.eMarks[startLine];\n\n if (pos >= max) {\n return -1;\n }\n\n marker = state.src.charCodeAt(pos++); // Check bullet\n\n if (marker !== 0x2A\n /* * */\n && marker !== 0x2D\n /* - */\n && marker !== 0x2B\n /* + */\n ) {\n return -1;\n }\n\n if (pos < max && state.src.charCodeAt(pos) !== 0x20) {\n // \" 1.test \" - is not a list item\n return -1;\n }\n\n return pos;\n} // Search `\\d+[.)][\\n ]`, returns next pos arter marker on success\n// or -1 on fail.\n\n\nfunction skipOrderedListMarker(state, startLine) {\n var ch,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n if (pos + 1 >= max) {\n return -1;\n }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch < 0x30\n /* 0 */\n || ch > 0x39\n /* 9 */\n ) {\n return -1;\n }\n\n for (;;) {\n // EOL -> fail\n if (pos >= max) {\n return -1;\n }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch >= 0x30\n /* 0 */\n && ch <= 0x39\n /* 9 */\n ) {\n continue;\n } // found valid marker\n\n\n if (ch === 0x29\n /* ) */\n || ch === 0x2e\n /* . */\n ) {\n break;\n }\n\n return -1;\n }\n\n if (pos < max && state.src.charCodeAt(pos) !== 0x20\n /* space */\n ) {\n // \" 1.test \" - is not a list item\n return -1;\n }\n\n return pos;\n}\n\nfunction markTightParagraphs(state, idx) {\n var i,\n l,\n level = state.level + 2;\n\n for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) {\n if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {\n state.tokens[i + 2].tight = true;\n state.tokens[i].tight = true;\n i += 2;\n }\n }\n}\n\nmodule.exports = function list(state, startLine, endLine, silent) {\n var nextLine,\n indent,\n oldTShift,\n oldIndent,\n oldTight,\n oldParentType,\n start,\n posAfterMarker,\n max,\n indentAfterMarker,\n markerValue,\n markerCharCode,\n isOrdered,\n contentStart,\n listTokIdx,\n prevEmptyEnd,\n listLines,\n itemLines,\n tight = true,\n terminatorRules,\n i,\n l,\n terminate; // Detect list type and position after marker\n\n if ((posAfterMarker = skipOrderedListMarker(state, startLine)) >= 0) {\n isOrdered = true;\n } else if ((posAfterMarker = skipBulletListMarker(state, startLine)) >= 0) {\n isOrdered = false;\n } else {\n return false;\n }\n\n if (state.level >= state.options.maxNesting) {\n return false;\n } // We should terminate list on style change. Remember first one to compare.\n\n\n markerCharCode = state.src.charCodeAt(posAfterMarker - 1); // For validation mode we can terminate immediately\n\n if (silent) {\n return true;\n } // Start list\n\n\n listTokIdx = state.tokens.length;\n\n if (isOrdered) {\n start = state.bMarks[startLine] + state.tShift[startLine];\n markerValue = Number(state.src.substr(start, posAfterMarker - start - 1));\n state.tokens.push({\n type: 'ordered_list_open',\n order: markerValue,\n lines: listLines = [startLine, 0],\n level: state.level++\n });\n } else {\n state.tokens.push({\n type: 'bullet_list_open',\n lines: listLines = [startLine, 0],\n level: state.level++\n });\n } //\n // Iterate list items\n //\n\n\n nextLine = startLine;\n prevEmptyEnd = false;\n terminatorRules = state.parser.ruler.getRules('list');\n\n while (nextLine < endLine) {\n contentStart = state.skipSpaces(posAfterMarker);\n max = state.eMarks[nextLine];\n\n if (contentStart >= max) {\n // trimming space in \"- \\n 3\" case, indent is 1 here\n indentAfterMarker = 1;\n } else {\n indentAfterMarker = contentStart - posAfterMarker;\n } // If we have more than 4 spaces, the indent is 1\n // (the rest is just indented code block)\n\n\n if (indentAfterMarker > 4) {\n indentAfterMarker = 1;\n } // If indent is less than 1, assume that it's one, example:\n // \"-\\n test\"\n\n\n if (indentAfterMarker < 1) {\n indentAfterMarker = 1;\n } // \" - test\"\n // ^^^^^ - calculating total length of this thing\n\n\n indent = posAfterMarker - state.bMarks[nextLine] + indentAfterMarker; // Run subparser & write tokens\n\n state.tokens.push({\n type: 'list_item_open',\n lines: itemLines = [startLine, 0],\n level: state.level++\n });\n oldIndent = state.blkIndent;\n oldTight = state.tight;\n oldTShift = state.tShift[startLine];\n oldParentType = state.parentType;\n state.tShift[startLine] = contentStart - state.bMarks[startLine];\n state.blkIndent = indent;\n state.tight = true;\n state.parentType = 'list';\n state.parser.tokenize(state, startLine, endLine, true); // If any of list item is tight, mark list as tight\n\n if (!state.tight || prevEmptyEnd) {\n tight = false;\n } // Item become loose if finish with empty line,\n // but we should filter last element, because it means list finish\n\n\n prevEmptyEnd = state.line - startLine > 1 && state.isEmpty(state.line - 1);\n state.blkIndent = oldIndent;\n state.tShift[startLine] = oldTShift;\n state.tight = oldTight;\n state.parentType = oldParentType;\n state.tokens.push({\n type: 'list_item_close',\n level: --state.level\n });\n nextLine = startLine = state.line;\n itemLines[1] = nextLine;\n contentStart = state.bMarks[startLine];\n\n if (nextLine >= endLine) {\n break;\n }\n\n if (state.isEmpty(nextLine)) {\n break;\n } //\n // Try to check if list is terminated or continued.\n //\n\n\n if (state.tShift[nextLine] < state.blkIndent) {\n break;\n } // fail if terminating block found\n\n\n terminate = false;\n\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) {\n break;\n } // fail if list has another type\n\n\n if (isOrdered) {\n posAfterMarker = skipOrderedListMarker(state, nextLine);\n\n if (posAfterMarker < 0) {\n break;\n }\n } else {\n posAfterMarker = skipBulletListMarker(state, nextLine);\n\n if (posAfterMarker < 0) {\n break;\n }\n }\n\n if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) {\n break;\n }\n } // Finilize list\n\n\n state.tokens.push({\n type: isOrdered ? 'ordered_list_close' : 'bullet_list_close',\n level: --state.level\n });\n listLines[1] = nextLine;\n state.line = nextLine; // mark paragraphs tight if needed\n\n if (tight) {\n markTightParagraphs(state, listTokIdx);\n }\n\n return true;\n};","'use strict';\n/**\n * Local dependencies\n */\n\nvar has = require('./common/utils').has;\n\nvar unescapeMd = require('./common/utils').unescapeMd;\n\nvar replaceEntities = require('./common/utils').replaceEntities;\n\nvar escapeHtml = require('./common/utils').escapeHtml;\n/**\n * Renderer rules cache\n */\n\n\nvar rules = {};\n/**\n * Blockquotes\n */\n\nrules.blockquote_open = function ()\n/* tokens, idx, options, env */\n{\n return '\\n';\n};\n\nrules.blockquote_close = function (tokens, idx\n/*, options, env */\n) {\n return '
' + getBreak(tokens, idx);\n};\n/**\n * Code\n */\n\n\nrules.code = function (tokens, idx\n/*, options, env */\n) {\n if (tokens[idx].block) {\n return '' + escapeHtml(tokens[idx].content) + '
' + getBreak(tokens, idx);\n }\n\n return '' + escapeHtml(tokens[idx].content) + '
';\n};\n/**\n * Fenced code blocks\n */\n\n\nrules.fence = function (tokens, idx, options, env, instance) {\n var token = tokens[idx];\n var langClass = '';\n var langPrefix = options.langPrefix;\n var langName = '',\n fences,\n fenceName;\n var highlighted;\n\n if (token.params) {\n //\n // ```foo bar\n //\n // Try custom renderer \"foo\" first. That will simplify overwrite\n // for diagrams, latex, and any other fenced block with custom look\n //\n fences = token.params.split(/\\s+/g);\n fenceName = fences.join(' ');\n\n if (has(instance.rules.fence_custom, fences[0])) {\n return instance.rules.fence_custom[fences[0]](tokens, idx, options, env, instance);\n }\n\n langName = escapeHtml(replaceEntities(unescapeMd(fenceName)));\n langClass = ' class=\"' + langPrefix + langName + '\"';\n }\n\n if (options.highlight) {\n highlighted = options.highlight.apply(options.highlight, [token.content].concat(fences)) || escapeHtml(token.content);\n } else {\n highlighted = escapeHtml(token.content);\n }\n\n return '' + highlighted + '
' + getBreak(tokens, idx);\n};\n\nrules.fence_custom = {};\n/**\n * Headings\n */\n\nrules.heading_open = function (tokens, idx\n/*, options, env */\n) {\n return '';\n};\n\nrules.heading_close = function (tokens, idx\n/*, options, env */\n) {\n return '\\n';\n};\n/**\n * Horizontal rules\n */\n\n\nrules.hr = function (tokens, idx, options\n/*, env */\n) {\n return (options.xhtmlOut ? '
' : '
') + getBreak(tokens, idx);\n};\n/**\n * Bullets\n */\n\n\nrules.bullet_list_open = function ()\n/* tokens, idx, options, env */\n{\n return '\\n';\n};\n\nrules.bullet_list_close = function (tokens, idx\n/*, options, env */\n) {\n return '
' + getBreak(tokens, idx);\n};\n/**\n * List items\n */\n\n\nrules.list_item_open = function ()\n/* tokens, idx, options, env */\n{\n return '';\n};\n\nrules.list_item_close = function ()\n/* tokens, idx, options, env */\n{\n return '\\n';\n};\n/**\n * Ordered list items\n */\n\n\nrules.ordered_list_open = function (tokens, idx\n/*, options, env */\n) {\n var token = tokens[idx];\n var order = token.order > 1 ? ' start=\"' + token.order + '\"' : '';\n return '\\n';\n};\n\nrules.ordered_list_close = function (tokens, idx\n/*, options, env */\n) {\n return '
' + getBreak(tokens, idx);\n};\n/**\n * Paragraphs\n */\n\n\nrules.paragraph_open = function (tokens, idx\n/*, options, env */\n) {\n return tokens[idx].tight ? '' : '';\n};\n\nrules.paragraph_close = function (tokens, idx\n/*, options, env */\n) {\n var addBreak = !(tokens[idx].tight && idx && tokens[idx - 1].type === 'inline' && !tokens[idx - 1].content);\n return (tokens[idx].tight ? '' : '
') + (addBreak ? getBreak(tokens, idx) : '');\n};\n/**\n * Links\n */\n\n\nrules.link_open = function (tokens, idx, options\n/* env */\n) {\n var title = tokens[idx].title ? ' title=\"' + escapeHtml(replaceEntities(tokens[idx].title)) + '\"' : '';\n var target = options.linkTarget ? ' target=\"' + options.linkTarget + '\"' : '';\n return '';\n};\n\nrules.link_close = function ()\n/* tokens, idx, options, env */\n{\n return '';\n};\n/**\n * Images\n */\n\n\nrules.image = function (tokens, idx, options\n/*, env */\n) {\n var src = ' src=\"' + escapeHtml(tokens[idx].src) + '\"';\n var title = tokens[idx].title ? ' title=\"' + escapeHtml(replaceEntities(tokens[idx].title)) + '\"' : '';\n var alt = ' alt=\"' + (tokens[idx].alt ? escapeHtml(replaceEntities(unescapeMd(tokens[idx].alt))) : '') + '\"';\n var suffix = options.xhtmlOut ? ' /' : '';\n return '
';\n};\n/**\n * Tables\n */\n\n\nrules.table_open = function ()\n/* tokens, idx, options, env */\n{\n return '\\n';\n};\n\nrules.table_close = function ()\n/* tokens, idx, options, env */\n{\n return '
\\n';\n};\n\nrules.thead_open = function ()\n/* tokens, idx, options, env */\n{\n return '\\n';\n};\n\nrules.thead_close = function ()\n/* tokens, idx, options, env */\n{\n return '\\n';\n};\n\nrules.tbody_open = function ()\n/* tokens, idx, options, env */\n{\n return '\\n';\n};\n\nrules.tbody_close = function ()\n/* tokens, idx, options, env */\n{\n return '\\n';\n};\n\nrules.tr_open = function ()\n/* tokens, idx, options, env */\n{\n return '';\n};\n\nrules.tr_close = function ()\n/* tokens, idx, options, env */\n{\n return '
\\n';\n};\n\nrules.th_open = function (tokens, idx\n/*, options, env */\n) {\n var token = tokens[idx];\n return '';\n};\n\nrules.th_close = function ()\n/* tokens, idx, options, env */\n{\n return ' | ';\n};\n\nrules.td_open = function (tokens, idx\n/*, options, env */\n) {\n var token = tokens[idx];\n return '';\n};\n\nrules.td_close = function ()\n/* tokens, idx, options, env */\n{\n return ' | ';\n};\n/**\n * Bold\n */\n\n\nrules.strong_open = function ()\n/* tokens, idx, options, env */\n{\n return '';\n};\n\nrules.strong_close = function ()\n/* tokens, idx, options, env */\n{\n return '';\n};\n/**\n * Italicize\n */\n\n\nrules.em_open = function ()\n/* tokens, idx, options, env */\n{\n return '';\n};\n\nrules.em_close = function ()\n/* tokens, idx, options, env */\n{\n return '';\n};\n/**\n * Strikethrough\n */\n\n\nrules.del_open = function ()\n/* tokens, idx, options, env */\n{\n return '';\n};\n\nrules.del_close = function ()\n/* tokens, idx, options, env */\n{\n return '';\n};\n/**\n * Insert\n */\n\n\nrules.ins_open = function ()\n/* tokens, idx, options, env */\n{\n return '';\n};\n\nrules.ins_close = function ()\n/* tokens, idx, options, env */\n{\n return '';\n};\n/**\n * Highlight\n */\n\n\nrules.mark_open = function ()\n/* tokens, idx, options, env */\n{\n return '';\n};\n\nrules.mark_close = function ()\n/* tokens, idx, options, env */\n{\n return '';\n};\n/**\n * Super- and sub-script\n */\n\n\nrules.sub = function (tokens, idx\n/*, options, env */\n) {\n return '' + escapeHtml(tokens[idx].content) + '';\n};\n\nrules.sup = function (tokens, idx\n/*, options, env */\n) {\n return '' + escapeHtml(tokens[idx].content) + '';\n};\n/**\n * Breaks\n */\n\n\nrules.hardbreak = function (tokens, idx, options\n/*, env */\n) {\n return options.xhtmlOut ? '
\\n' : '
\\n';\n};\n\nrules.softbreak = function (tokens, idx, options\n/*, env */\n) {\n return options.breaks ? options.xhtmlOut ? '
\\n' : '
\\n' : '\\n';\n};\n/**\n * Text\n */\n\n\nrules.text = function (tokens, idx\n/*, options, env */\n) {\n return escapeHtml(tokens[idx].content);\n};\n/**\n * Content\n */\n\n\nrules.htmlblock = function (tokens, idx\n/*, options, env */\n) {\n return tokens[idx].content;\n};\n\nrules.htmltag = function (tokens, idx\n/*, options, env */\n) {\n return tokens[idx].content;\n};\n/**\n * Abbreviations, initialism\n */\n\n\nrules.abbr_open = function (tokens, idx\n/*, options, env */\n) {\n return '';\n};\n\nrules.abbr_close = function ()\n/* tokens, idx, options, env */\n{\n return '';\n};\n/**\n * Footnotes\n */\n\n\nrules.footnote_ref = function (tokens, idx) {\n var n = Number(tokens[idx].id + 1).toString();\n var id = 'fnref' + n;\n\n if (tokens[idx].subId > 0) {\n id += ':' + tokens[idx].subId;\n }\n\n return '';\n};\n\nrules.footnote_block_open = function (tokens, idx, options) {\n var hr = options.xhtmlOut ? '\\n' : '\\n';\n return hr + '\\n';\n};\n\nrules.footnote_open = function (tokens, idx) {\n var id = Number(tokens[idx].id + 1).toString();\n return '\\n';\n};\n\nrules.footnote_anchor = function (tokens, idx) {\n var n = Number(tokens[idx].id + 1).toString();\n var id = 'fnref' + n;\n\n if (tokens[idx].subId > 0) {\n id += ':' + tokens[idx].subId;\n }\n\n return ' ';\n};\n/**\n * Definition lists\n */\n\n\nrules.dl_open = function () {\n return '\\n';\n};\n\nrules.dt_open = function () {\n return '- ';\n};\n\nrules.dd_open = function () {\n return '
- ';\n};\n\nrules.dl_close = function () {\n return '
\\n';\n};\n\nrules.dt_close = function () {\n return '\\n';\n};\n\nrules.dd_close = function () {\n return '\\n';\n};\n/**\n * Helper functions\n */\n\n\nfunction nextToken(tokens, idx) {\n if (++idx >= tokens.length - 2) {\n return idx;\n }\n\n if (tokens[idx].type === 'paragraph_open' && tokens[idx].tight && tokens[idx + 1].type === 'inline' && tokens[idx + 1].content.length === 0 && tokens[idx + 2].type === 'paragraph_close' && tokens[idx + 2].tight) {\n return nextToken(tokens, idx + 2);\n }\n\n return idx;\n}\n/**\n * Check to see if `\\n` is needed before the next token.\n *\n * @param {Array} `tokens`\n * @param {Number} `idx`\n * @return {String} Empty string or newline\n * @api private\n */\n\n\nvar getBreak = rules.getBreak = function getBreak(tokens, idx) {\n idx = nextToken(tokens, idx);\n\n if (idx < tokens.length && tokens[idx].type === 'list_item_close') {\n return '';\n }\n\n return '\\n';\n};\n/**\n * Expose `rules`\n */\n\n\nmodule.exports = rules;","// lheading (---, ===)\n'use strict';\n\nmodule.exports = function lheading(state, startLine, endLine\n/*, silent*/\n) {\n var marker,\n pos,\n max,\n next = startLine + 1;\n\n if (next >= endLine) {\n return false;\n }\n\n if (state.tShift[next] < state.blkIndent) {\n return false;\n } // Scan next line\n\n\n if (state.tShift[next] - state.blkIndent > 3) {\n return false;\n }\n\n pos = state.bMarks[next] + state.tShift[next];\n max = state.eMarks[next];\n\n if (pos >= max) {\n return false;\n }\n\n marker = state.src.charCodeAt(pos);\n\n if (marker !== 0x2D\n /* - */\n && marker !== 0x3D\n /* = */\n ) {\n return false;\n }\n\n pos = state.skipChars(pos, marker);\n pos = state.skipSpaces(pos);\n\n if (pos < max) {\n return false;\n }\n\n pos = state.bMarks[startLine] + state.tShift[startLine];\n state.line = next + 1;\n state.tokens.push({\n type: 'heading_open',\n hLevel: marker === 0x3D\n /* = */\n ? 1 : 2,\n lines: [startLine, state.line],\n level: state.level\n });\n state.tokens.push({\n type: 'inline',\n content: state.src.slice(pos, state.eMarks[startLine]).trim(),\n level: state.level + 1,\n lines: [startLine, state.line - 1],\n children: []\n });\n state.tokens.push({\n type: 'heading_close',\n hLevel: marker === 0x3D\n /* = */\n ? 1 : 2,\n level: state.level\n });\n return true;\n};","// Proceess escaped chars and hardbreaks\n'use strict';\n\nvar ESCAPED = [];\n\nfor (var i = 0; i < 256; i++) {\n ESCAPED.push(0);\n}\n\n'\\\\!\"#$%&\\'()*+,./:;<=>?@[]^_`{|}~-'.split('').forEach(function (ch) {\n ESCAPED[ch.charCodeAt(0)] = 1;\n});\n\nmodule.exports = function escape(state, silent) {\n var ch,\n pos = state.pos,\n max = state.posMax;\n\n if (state.src.charCodeAt(pos) !== 0x5C\n /* \\ */\n ) {\n return false;\n }\n\n pos++;\n\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (ch < 256 && ESCAPED[ch] !== 0) {\n if (!silent) {\n state.pending += state.src[pos];\n }\n\n state.pos += 2;\n return true;\n }\n\n if (ch === 0x0A) {\n if (!silent) {\n state.push({\n type: 'hardbreak',\n level: state.level\n });\n }\n\n pos++; // skip leading whitespaces from next line\n\n while (pos < max && state.src.charCodeAt(pos) === 0x20) {\n pos++;\n }\n\n state.pos = pos;\n return true;\n }\n }\n\n if (!silent) {\n state.pending += '\\\\';\n }\n\n state.pos++;\n return true;\n};","// Process ==highlighted text==\n'use strict';\n\nmodule.exports = function del(state, silent) {\n var found,\n pos,\n stack,\n max = state.posMax,\n start = state.pos,\n lastChar,\n nextChar;\n\n if (state.src.charCodeAt(start) !== 0x3D\n /* = */\n ) {\n return false;\n }\n\n if (silent) {\n return false;\n } // don't run any pairs in validation mode\n\n\n if (start + 4 >= max) {\n return false;\n }\n\n if (state.src.charCodeAt(start + 1) !== 0x3D\n /* = */\n ) {\n return false;\n }\n\n if (state.level >= state.options.maxNesting) {\n return false;\n }\n\n lastChar = start > 0 ? state.src.charCodeAt(start - 1) : -1;\n nextChar = state.src.charCodeAt(start + 2);\n\n if (lastChar === 0x3D\n /* = */\n ) {\n return false;\n }\n\n if (nextChar === 0x3D\n /* = */\n ) {\n return false;\n }\n\n if (nextChar === 0x20 || nextChar === 0x0A) {\n return false;\n }\n\n pos = start + 2;\n\n while (pos < max && state.src.charCodeAt(pos) === 0x3D\n /* = */\n ) {\n pos++;\n }\n\n if (pos !== start + 2) {\n // sequence of 3+ markers taking as literal, same as in a emphasis\n state.pos += pos - start;\n\n if (!silent) {\n state.pending += state.src.slice(start, pos);\n }\n\n return true;\n }\n\n state.pos = start + 2;\n stack = 1;\n\n while (state.pos + 1 < max) {\n if (state.src.charCodeAt(state.pos) === 0x3D\n /* = */\n ) {\n if (state.src.charCodeAt(state.pos + 1) === 0x3D\n /* = */\n ) {\n lastChar = state.src.charCodeAt(state.pos - 1);\n nextChar = state.pos + 2 < max ? state.src.charCodeAt(state.pos + 2) : -1;\n\n if (nextChar !== 0x3D\n /* = */\n && lastChar !== 0x3D\n /* = */\n ) {\n if (lastChar !== 0x20 && lastChar !== 0x0A) {\n // closing '=='\n stack--;\n } else if (nextChar !== 0x20 && nextChar !== 0x0A) {\n // opening '=='\n stack++;\n } // else {\n // // standalone ' == ' indented with spaces\n // }\n\n\n if (stack <= 0) {\n found = true;\n break;\n }\n }\n }\n }\n\n state.parser.skipToken(state);\n }\n\n if (!found) {\n // parser failed to find ending tag, so it's not valid emphasis\n state.pos = start;\n return false;\n } // found!\n\n\n state.posMax = state.pos;\n state.pos = start + 2;\n\n if (!silent) {\n state.push({\n type: 'mark_open',\n level: state.level++\n });\n state.parser.tokenize(state);\n state.push({\n type: 'mark_close',\n level: --state.level\n });\n }\n\n state.pos = state.posMax + 2;\n state.posMax = max;\n return true;\n};","// Remarkable default options\n'use strict';\n\nmodule.exports = {\n options: {\n html: false,\n // Enable HTML tags in source\n xhtmlOut: false,\n // Use '/' to close single tags (
)\n breaks: false,\n // Convert '\\n' in paragraphs into
\n langPrefix: 'language-',\n // CSS language prefix for fenced blocks\n linkify: false,\n // autoconvert URL-like texts to links\n linkTarget: '',\n // set target to open link in\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Set doubles to '«»' for Russian, '„“' for German.\n quotes: '“”‘’',\n // Highlighter function. Should return escaped HTML,\n // or '' if input not changed\n //\n // function (/*str, lang*/) { return ''; }\n //\n highlight: null,\n maxNesting: 20 // Internal protection, recursion limit\n\n },\n components: {\n core: {\n rules: ['block', 'inline', 'references', 'replacements', 'linkify', 'smartquotes', 'references', 'abbr2', 'footnote_tail']\n },\n block: {\n rules: ['blockquote', 'code', 'fences', 'footnote', 'heading', 'hr', 'htmlblock', 'lheading', 'list', 'paragraph', 'table']\n },\n inline: {\n rules: ['autolink', 'backticks', 'del', 'emphasis', 'entity', 'escape', 'footnote_ref', 'htmltag', 'links', 'newline', 'text']\n }\n }\n};","'use strict';\n\nmodule.exports = function footnote_block(state) {\n var i,\n l,\n j,\n t,\n lastParagraph,\n list,\n tokens,\n current,\n currentLabel,\n level = 0,\n insideRef = false,\n refTokens = {};\n\n if (!state.env.footnotes) {\n return;\n }\n\n state.tokens = state.tokens.filter(function (tok) {\n if (tok.type === 'footnote_reference_open') {\n insideRef = true;\n current = [];\n currentLabel = tok.label;\n return false;\n }\n\n if (tok.type === 'footnote_reference_close') {\n insideRef = false; // prepend ':' to avoid conflict with Object.prototype members\n\n refTokens[':' + currentLabel] = current;\n return false;\n }\n\n if (insideRef) {\n current.push(tok);\n }\n\n return !insideRef;\n });\n\n if (!state.env.footnotes.list) {\n return;\n }\n\n list = state.env.footnotes.list;\n state.tokens.push({\n type: 'footnote_block_open',\n level: level++\n });\n\n for (i = 0, l = list.length; i < l; i++) {\n state.tokens.push({\n type: 'footnote_open',\n id: i,\n level: level++\n });\n\n if (list[i].tokens) {\n tokens = [];\n tokens.push({\n type: 'paragraph_open',\n tight: false,\n level: level++\n });\n tokens.push({\n type: 'inline',\n content: '',\n level: level,\n children: list[i].tokens\n });\n tokens.push({\n type: 'paragraph_close',\n tight: false,\n level: --level\n });\n } else if (list[i].label) {\n tokens = refTokens[':' + list[i].label];\n }\n\n state.tokens = state.tokens.concat(tokens);\n\n if (state.tokens[state.tokens.length - 1].type === 'paragraph_close') {\n lastParagraph = state.tokens.pop();\n } else {\n lastParagraph = null;\n }\n\n t = list[i].count > 0 ? list[i].count : 1;\n\n for (j = 0; j < t; j++) {\n state.tokens.push({\n type: 'footnote_anchor',\n id: i,\n subId: j,\n level: level\n });\n }\n\n if (lastParagraph) {\n state.tokens.push(lastParagraph);\n }\n\n state.tokens.push({\n type: 'footnote_close',\n level: --level\n });\n }\n\n state.tokens.push({\n type: 'footnote_block_close',\n level: --level\n });\n};","// Code block (4 spaces padded)\n'use strict';\n\nmodule.exports = function code(state, startLine, endLine\n/*, silent*/\n) {\n var nextLine, last;\n\n if (state.tShift[startLine] - state.blkIndent < 4) {\n return false;\n }\n\n last = nextLine = startLine + 1;\n\n while (nextLine < endLine) {\n if (state.isEmpty(nextLine)) {\n nextLine++;\n continue;\n }\n\n if (state.tShift[nextLine] - state.blkIndent >= 4) {\n nextLine++;\n last = nextLine;\n continue;\n }\n\n break;\n }\n\n state.line = nextLine;\n state.tokens.push({\n type: 'code',\n content: state.getLines(startLine, last, 4 + state.blkIndent, true),\n block: true,\n lines: [startLine, state.line],\n level: state.level\n });\n return true;\n};","'use strict';\n/**\n * Local dependencies\n */\n\nvar utils = require('./common/utils');\n\nvar rules = require('./rules');\n/**\n * Expose `Renderer`\n */\n\n\nmodule.exports = Renderer;\n/**\n * Renderer class. Renders HTML and exposes `rules` to allow\n * local modifications.\n */\n\nfunction Renderer() {\n this.rules = utils.assign({}, rules); // exported helper, for custom rules only\n\n this.getBreak = rules.getBreak;\n}\n/**\n * Render a string of inline HTML with the given `tokens` and\n * `options`.\n *\n * @param {Array} `tokens`\n * @param {Object} `options`\n * @param {Object} `env`\n * @return {String}\n * @api public\n */\n\n\nRenderer.prototype.renderInline = function (tokens, options, env) {\n var _rules = this.rules;\n var len = tokens.length,\n i = 0;\n var result = '';\n\n while (len--) {\n result += _rules[tokens[i].type](tokens, i++, options, env, this);\n }\n\n return result;\n};\n/**\n * Render a string of HTML with the given `tokens` and\n * `options`.\n *\n * @param {Array} `tokens`\n * @param {Object} `options`\n * @param {Object} `env`\n * @return {String}\n * @api public\n */\n\n\nRenderer.prototype.render = function (tokens, options, env) {\n var _rules = this.rules;\n var len = tokens.length,\n i = -1;\n var result = '';\n\n while (++i < len) {\n if (tokens[i].type === 'inline') {\n result += this.renderInline(tokens[i].children, options, env);\n } else {\n result += _rules[tokens[i].type](tokens, i, options, env, this);\n }\n }\n\n return result;\n};","// Parse abbreviation definitions, i.e. `*[abbr]: description`\n//\n'use strict';\n\nvar StateInline = require('../rules_inline/state_inline');\n\nvar parseLinkLabel = require('../helpers/parse_link_label');\n\nfunction parseAbbr(str, parserInline, options, env) {\n var state, labelEnd, pos, max, label, title;\n\n if (str.charCodeAt(0) !== 0x2A\n /* * */\n ) {\n return -1;\n }\n\n if (str.charCodeAt(1) !== 0x5B\n /* [ */\n ) {\n return -1;\n }\n\n if (str.indexOf(']:') === -1) {\n return -1;\n }\n\n state = new StateInline(str, parserInline, options, env, []);\n labelEnd = parseLinkLabel(state, 1);\n\n if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A\n /* : */\n ) {\n return -1;\n }\n\n max = state.posMax; // abbr title is always one line, so looking for ending \"\\n\" here\n\n for (pos = labelEnd + 2; pos < max; pos++) {\n if (state.src.charCodeAt(pos) === 0x0A) {\n break;\n }\n }\n\n label = str.slice(2, labelEnd);\n title = str.slice(labelEnd + 2, pos).trim();\n\n if (title.length === 0) {\n return -1;\n }\n\n if (!env.abbreviations) {\n env.abbreviations = {};\n } // prepend ':' to avoid conflict with Object.prototype members\n\n\n if (typeof env.abbreviations[':' + label] === 'undefined') {\n env.abbreviations[':' + label] = title;\n }\n\n return pos;\n}\n\nmodule.exports = function abbr(state) {\n var tokens = state.tokens,\n i,\n l,\n content,\n pos;\n\n if (state.inlineMode) {\n return;\n } // Parse inlines\n\n\n for (i = 1, l = tokens.length - 1; i < l; i++) {\n if (tokens[i - 1].type === 'paragraph_open' && tokens[i].type === 'inline' && tokens[i + 1].type === 'paragraph_close') {\n content = tokens[i].content;\n\n while (content.length) {\n pos = parseAbbr(content, state.inline, state.options, state.env);\n\n if (pos < 0) {\n break;\n }\n\n content = content.slice(pos).trim();\n }\n\n tokens[i].content = content;\n\n if (!content.length) {\n tokens[i - 1].tight = true;\n tokens[i + 1].tight = true;\n }\n }\n }\n};","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE ? nBytes - 1 : 0;\n var d = isLE ? -1 : 1;\n var s = buffer[offset + i];\n i += d;\n e = s & (1 << -nBits) - 1;\n s >>= -nBits;\n nBits += eLen;\n\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & (1 << -nBits) - 1;\n e >>= -nBits;\n nBits += mLen;\n\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : (s ? -1 : 1) * Infinity;\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\n};\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;\n var i = isLE ? 0 : nBytes - 1;\n var d = isLE ? 1 : -1;\n var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n value = Math.abs(value);\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = e << mLen | m;\n eLen += mLen;\n\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128;\n};","'use strict';\n\nmodule.exports = function block(state) {\n if (state.inlineMode) {\n state.tokens.push({\n type: 'inline',\n content: state.src.replace(/\\n/g, ' ').trim(),\n level: 0,\n lines: [0, 1],\n children: []\n });\n } else {\n state.block.parse(state.src, state.options, state.env, state.tokens);\n }\n};","module.exports = \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0xMS41IC0xMC4yMzE3NCAyMyAyMC40NjM0OCI+CiAgPHRpdGxlPlJlYWN0IExvZ288L3RpdGxlPgogIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIyLjA1IiBmaWxsPSIjZmZmIi8+CiAgPGcgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIi8+CiAgICA8ZWxsaXBzZSByeD0iMTEiIHJ5PSI0LjIiIHRyYW5zZm9ybT0icm90YXRlKDYwKSIvPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIiB0cmFuc2Zvcm09InJvdGF0ZSgxMjApIi8+CiAgPC9nPgo8L3N2Zz4K\"","'use strict';\nvar $ = require('../internals/export');\nvar $trimEnd = require('../internals/string-trim').end;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\nvar FORCED = forcedStringTrimMethod('trimEnd');\n\nvar trimEnd = FORCED ? function trimEnd() {\n return $trimEnd(this);\n} : ''.trimEnd;\n\n// `String.prototype.{ trimEnd, trimRight }` methods\n// https://github.com/tc39/ecmascript-string-left-right-trim\n$({ target: 'String', proto: true, forced: FORCED }, {\n trimEnd: trimEnd,\n trimRight: trimEnd\n});\n","'use strict';\n\nvar replaceEntities = require('../common/utils').replaceEntities;\n\nmodule.exports = function normalizeLink(url) {\n var normalized = replaceEntities(url); // We shouldn't care about the result of malformed URIs,\n // and should not throw an exception.\n\n try {\n normalized = decodeURI(normalized);\n } catch (err) {}\n\n return encodeURI(normalized);\n};","// Skip text characters for text token, place those to pending buffer\n// and increment current pos\n'use strict'; // Rule to skip pure text\n// '{}$%@~+=:' reserved for extentions\n\nfunction isTerminatorChar(ch) {\n switch (ch) {\n case 0x0A\n /* \\n */\n :\n case 0x5C\n /* \\ */\n :\n case 0x60\n /* ` */\n :\n case 0x2A\n /* * */\n :\n case 0x5F\n /* _ */\n :\n case 0x5E\n /* ^ */\n :\n case 0x5B\n /* [ */\n :\n case 0x5D\n /* ] */\n :\n case 0x21\n /* ! */\n :\n case 0x26\n /* & */\n :\n case 0x3C\n /* < */\n :\n case 0x3E\n /* > */\n :\n case 0x7B\n /* { */\n :\n case 0x7D\n /* } */\n :\n case 0x24\n /* $ */\n :\n case 0x25\n /* % */\n :\n case 0x40\n /* @ */\n :\n case 0x7E\n /* ~ */\n :\n case 0x2B\n /* + */\n :\n case 0x3D\n /* = */\n :\n case 0x3A\n /* : */\n :\n return true;\n\n default:\n return false;\n }\n}\n\nmodule.exports = function text(state, silent) {\n var pos = state.pos;\n\n while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {\n pos++;\n }\n\n if (pos === state.pos) {\n return false;\n }\n\n if (!silent) {\n state.pending += state.src.slice(state.pos, pos);\n }\n\n state.pos = pos;\n return true;\n};","// Process ++inserted text++\n'use strict';\n\nmodule.exports = function ins(state, silent) {\n var found,\n pos,\n stack,\n max = state.posMax,\n start = state.pos,\n lastChar,\n nextChar;\n\n if (state.src.charCodeAt(start) !== 0x2B\n /* + */\n ) {\n return false;\n }\n\n if (silent) {\n return false;\n } // don't run any pairs in validation mode\n\n\n if (start + 4 >= max) {\n return false;\n }\n\n if (state.src.charCodeAt(start + 1) !== 0x2B\n /* + */\n ) {\n return false;\n }\n\n if (state.level >= state.options.maxNesting) {\n return false;\n }\n\n lastChar = start > 0 ? state.src.charCodeAt(start - 1) : -1;\n nextChar = state.src.charCodeAt(start + 2);\n\n if (lastChar === 0x2B\n /* + */\n ) {\n return false;\n }\n\n if (nextChar === 0x2B\n /* + */\n ) {\n return false;\n }\n\n if (nextChar === 0x20 || nextChar === 0x0A) {\n return false;\n }\n\n pos = start + 2;\n\n while (pos < max && state.src.charCodeAt(pos) === 0x2B\n /* + */\n ) {\n pos++;\n }\n\n if (pos !== start + 2) {\n // sequence of 3+ markers taking as literal, same as in a emphasis\n state.pos += pos - start;\n\n if (!silent) {\n state.pending += state.src.slice(start, pos);\n }\n\n return true;\n }\n\n state.pos = start + 2;\n stack = 1;\n\n while (state.pos + 1 < max) {\n if (state.src.charCodeAt(state.pos) === 0x2B\n /* + */\n ) {\n if (state.src.charCodeAt(state.pos + 1) === 0x2B\n /* + */\n ) {\n lastChar = state.src.charCodeAt(state.pos - 1);\n nextChar = state.pos + 2 < max ? state.src.charCodeAt(state.pos + 2) : -1;\n\n if (nextChar !== 0x2B\n /* + */\n && lastChar !== 0x2B\n /* + */\n ) {\n if (lastChar !== 0x20 && lastChar !== 0x0A) {\n // closing '++'\n stack--;\n } else if (nextChar !== 0x20 && nextChar !== 0x0A) {\n // opening '++'\n stack++;\n } // else {\n // // standalone ' ++ ' indented with spaces\n // }\n\n\n if (stack <= 0) {\n found = true;\n break;\n }\n }\n }\n }\n\n state.parser.skipToken(state);\n }\n\n if (!found) {\n // parser failed to find ending tag, so it's not valid emphasis\n state.pos = start;\n return false;\n } // found!\n\n\n state.posMax = state.pos;\n state.pos = start + 2;\n\n if (!silent) {\n state.push({\n type: 'ins_open',\n level: state.level++\n });\n state.parser.tokenize(state);\n state.push({\n type: 'ins_close',\n level: --state.level\n });\n }\n\n state.pos = state.posMax + 2;\n state.posMax = max;\n return true;\n};","// Definition lists\n'use strict'; // Search `[:~][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\n\nfunction skipMarker(state, line) {\n var pos,\n marker,\n start = state.bMarks[line] + state.tShift[line],\n max = state.eMarks[line];\n\n if (start >= max) {\n return -1;\n } // Check bullet\n\n\n marker = state.src.charCodeAt(start++);\n\n if (marker !== 0x7E\n /* ~ */\n && marker !== 0x3A\n /* : */\n ) {\n return -1;\n }\n\n pos = state.skipSpaces(start); // require space after \":\"\n\n if (start === pos) {\n return -1;\n } // no empty definitions, e.g. \" : \"\n\n\n if (pos >= max) {\n return -1;\n }\n\n return pos;\n}\n\nfunction markTightParagraphs(state, idx) {\n var i,\n l,\n level = state.level + 2;\n\n for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) {\n if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {\n state.tokens[i + 2].tight = true;\n state.tokens[i].tight = true;\n i += 2;\n }\n }\n}\n\nmodule.exports = function deflist(state, startLine, endLine, silent) {\n var contentStart, ddLine, dtLine, itemLines, listLines, listTokIdx, nextLine, oldIndent, oldDDIndent, oldParentType, oldTShift, oldTight, prevEmptyEnd, tight;\n\n if (silent) {\n // quirk: validation mode validates a dd block only, not a whole deflist\n if (state.ddIndent < 0) {\n return false;\n }\n\n return skipMarker(state, startLine) >= 0;\n }\n\n nextLine = startLine + 1;\n\n if (state.isEmpty(nextLine)) {\n if (++nextLine > endLine) {\n return false;\n }\n }\n\n if (state.tShift[nextLine] < state.blkIndent) {\n return false;\n }\n\n contentStart = skipMarker(state, nextLine);\n\n if (contentStart < 0) {\n return false;\n }\n\n if (state.level >= state.options.maxNesting) {\n return false;\n } // Start list\n\n\n listTokIdx = state.tokens.length;\n state.tokens.push({\n type: 'dl_open',\n lines: listLines = [startLine, 0],\n level: state.level++\n }); //\n // Iterate list items\n //\n\n dtLine = startLine;\n ddLine = nextLine; // One definition list can contain multiple DTs,\n // and one DT can be followed by multiple DDs.\n //\n // Thus, there is two loops here, and label is\n // needed to break out of the second one\n //\n\n /*eslint no-labels:0,block-scoped-var:0*/\n\n OUTER: for (;;) {\n tight = true;\n prevEmptyEnd = false;\n state.tokens.push({\n type: 'dt_open',\n lines: [dtLine, dtLine],\n level: state.level++\n });\n state.tokens.push({\n type: 'inline',\n content: state.getLines(dtLine, dtLine + 1, state.blkIndent, false).trim(),\n level: state.level + 1,\n lines: [dtLine, dtLine],\n children: []\n });\n state.tokens.push({\n type: 'dt_close',\n level: --state.level\n });\n\n for (;;) {\n state.tokens.push({\n type: 'dd_open',\n lines: itemLines = [nextLine, 0],\n level: state.level++\n });\n oldTight = state.tight;\n oldDDIndent = state.ddIndent;\n oldIndent = state.blkIndent;\n oldTShift = state.tShift[ddLine];\n oldParentType = state.parentType;\n state.blkIndent = state.ddIndent = state.tShift[ddLine] + 2;\n state.tShift[ddLine] = contentStart - state.bMarks[ddLine];\n state.tight = true;\n state.parentType = 'deflist';\n state.parser.tokenize(state, ddLine, endLine, true); // If any of list item is tight, mark list as tight\n\n if (!state.tight || prevEmptyEnd) {\n tight = false;\n } // Item become loose if finish with empty line,\n // but we should filter last element, because it means list finish\n\n\n prevEmptyEnd = state.line - ddLine > 1 && state.isEmpty(state.line - 1);\n state.tShift[ddLine] = oldTShift;\n state.tight = oldTight;\n state.parentType = oldParentType;\n state.blkIndent = oldIndent;\n state.ddIndent = oldDDIndent;\n state.tokens.push({\n type: 'dd_close',\n level: --state.level\n });\n itemLines[1] = nextLine = state.line;\n\n if (nextLine >= endLine) {\n break OUTER;\n }\n\n if (state.tShift[nextLine] < state.blkIndent) {\n break OUTER;\n }\n\n contentStart = skipMarker(state, nextLine);\n\n if (contentStart < 0) {\n break;\n }\n\n ddLine = nextLine; // go to the next loop iteration:\n // insert DD tag and repeat checking\n }\n\n if (nextLine >= endLine) {\n break;\n }\n\n dtLine = nextLine;\n\n if (state.isEmpty(dtLine)) {\n break;\n }\n\n if (state.tShift[dtLine] < state.blkIndent) {\n break;\n }\n\n ddLine = dtLine + 1;\n\n if (ddLine >= endLine) {\n break;\n }\n\n if (state.isEmpty(ddLine)) {\n ddLine++;\n }\n\n if (ddLine >= endLine) {\n break;\n }\n\n if (state.tShift[ddLine] < state.blkIndent) {\n break;\n }\n\n contentStart = skipMarker(state, ddLine);\n\n if (contentStart < 0) {\n break;\n } // go to the next loop iteration:\n // insert DT and DD tags and repeat checking\n\n } // Finilize list\n\n\n state.tokens.push({\n type: 'dl_close',\n level: --state.level\n });\n listLines[1] = nextLine;\n state.line = nextLine; // mark paragraphs tight if needed\n\n if (tight) {\n markTightParagraphs(state, listTokIdx);\n }\n\n return true;\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @emails react-core\n */\n\nexport default url =>\n new Promise((resolve, reject) =>\n document.head.appendChild(\n Object.assign(document.createElement('script'), {\n async: true,\n src: url,\n onload: resolve,\n onerror: reject,\n }),\n ),\n );\n","// List of valid url schemas, accorting to commonmark spec\n// http://jgm.github.io/CommonMark/spec.html#autolinks\n'use strict';\n\nmodule.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'];","// Simple typographical replacements\n//\n'use strict'; // TODO:\n// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾\n// - miltiplication 2 x 4 -> 2 × 4\n\nvar RARE_RE = /\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/;\nvar SCOPED_ABBR_RE = /\\((c|tm|r|p)\\)/ig;\nvar SCOPED_ABBR = {\n 'c': '©',\n 'r': '®',\n 'p': '§',\n 'tm': '™'\n};\n\nfunction replaceScopedAbbr(str) {\n if (str.indexOf('(') < 0) {\n return str;\n }\n\n return str.replace(SCOPED_ABBR_RE, function (match, name) {\n return SCOPED_ABBR[name.toLowerCase()];\n });\n}\n\nmodule.exports = function replace(state) {\n var i, token, text, inlineTokens, blkIdx;\n\n if (!state.options.typographer) {\n return;\n }\n\n for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n if (state.tokens[blkIdx].type !== 'inline') {\n continue;\n }\n\n inlineTokens = state.tokens[blkIdx].children;\n\n for (i = inlineTokens.length - 1; i >= 0; i--) {\n token = inlineTokens[i];\n\n if (token.type === 'text') {\n text = token.content;\n text = replaceScopedAbbr(text);\n\n if (RARE_RE.test(text)) {\n text = text.replace(/\\+-/g, '±') // .., ..., ....... -> …\n // but ?..... & !..... -> ?.. & !..\n .replace(/\\.{2,}/g, '…').replace(/([?!])…/g, '$1..').replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',') // em-dash\n .replace(/(^|[^-])---([^-]|$)/mg, \"$1\\u2014$2\") // en-dash\n .replace(/(^|\\s)--(\\s|$)/mg, \"$1\\u2013$2\").replace(/(^|[^-\\s])--([^-\\s]|$)/mg, \"$1\\u2013$2\");\n }\n\n token.content = text;\n }\n }\n }\n};"],"sourceRoot":""}