[^"]*?)"\b/gm;
-
- var plugin = this;
- this.editor.turndown.addRule('macros', {
- filter: ['span'],
- replacement: function (content, node, options) {
- const parser = plugin.macros[node.getAttribute('data-macro-name')].toMarkdown;
- if (parser) {
- return parser(node);
- }
-
- var md = '{{' + node.getAttribute('data-macro-name');
- for (var param in node.getAttributeNames()) {
- var val = node.getAttribute(param);
- if (val) {
- md += val + (param == 'data-macro-name' ? " " : `="${node.getAttribute(param)}" `);
- }
- }
- md += '}}';
- return md;
- },
- });
- }
-
- toHTML(md) {
- const utf8encoder = new TextEncoder();
- var output = md;
- output.matchAll(this.pattern).forEach(matched => {
- var macroName = matched.groups.name;
- var html = ` {
- settings.params[param.groups.name] = param.groups.value;
- html += ` data-param-${param.groups.name}="${param.groups.value}"`;
- });
- html += ` data-block="${b64encode(matched.groups.block)}"`;
- html += '>';
- html += this.macros[macroName].toHTML(settings);
- html += ' ';
- output = output.replaceAll(matched[1], html);
- });
- return output;
- }
-}
-
-function camelCase(words) {
- var output = [];
- words.trim().split(/\s+/g).forEach(word => {
- var lcWord = word.toLowerCase();
- output.push(lcWord.charAt(0).toUpperCase() + lcWord.slice(1));
- });
- return output;
-}
-
-function b64encode(input) {
- const utf8encoder = new TextEncoder();
- return utf8encoder.encode(input).toBase64();
-}
-
-function b64decode(input) {
- const utf8encoder = new TextEncoder();
- return utf8encoder.decode(input.fromBase64());
-}
-
-
-editor = new Editor({
- plugins: [TablePlugin, MacroPlugin]
-});
-editor.view();
diff --git a/src/ttfrog/themes/default/static/editor/grung-editor.js b/src/ttfrog/themes/default/static/editor/grung-editor.js
new file mode 100644
index 0000000..4b4d89e
--- /dev/null
+++ b/src/ttfrog/themes/default/static/editor/grung-editor.js
@@ -0,0 +1,103 @@
+class GrungEditor extends Grung {
+
+ constructor(settings) {
+ /*
+ * Create a new Editor instance.
+ */
+ super(settings);
+ this.states = {
+ VIEW: 'view',
+ EDIT: 'edit',
+ WYSIWYG: 'wysiwyg'
+ }
+
+ this.turndown = new TurndownService({
+ headingStyle: 'atx',
+ codeBlockStyle: 'fenced',
+ });
+ this.turndown.use([turndownPluginGfm.gfm, turndownPluginGfm.tables]);
+ this.turndown.keep(['pre']);
+ this.#bindEvents();
+
+ this.plugins().forEach(plugin => { plugin.setEditable() });
+ }
+
+ #bindEvents() {
+ this.element.addEventListener('keydown', (evt) => {
+ if (this.state === this.states.VIEW) {
+ return;
+ }
+
+ /*
+ if (event.key === 'Enter') {
+ console.log(this.#state, this.#states.EDIT);
+ if (this.#state === this.#states.EDIT) {
+ evt.preventDefault();
+ this.insertAtCursor(document.createTextNode("\n"));
+ }
+ }
+ */
+
+ if (this.cachedMarkdown != this.element.textContent) {
+ this.changed = true;
+ this.cachedMarkdown = this.element.textContent;
+ }
+ });
+ };
+
+ HtmlToMarkdown(html) {
+ return this.turndown.turndown(html);
+ }
+
+ getMarkdown() {
+ /*
+ * Return the current markdown.
+ */
+ if (this.getState() === this.states.EDIT) {
+ this.cachedMarkdown = this.element.innerHTML.replaceAll(/<\/?div>/g, "\n").replaceAll(' ', "");
+ } else if (this.getState() === this.states.WYSIWYG) {
+ this.cachedMarkdown = this.HtmlToMarkdown(this.element.innerHTML);
+ } else if (!this.cachedMarkdown) {
+ this.cachedMarkdown = this.source;
+ }
+ return this.cachedMarkdown;
+ }
+
+ wysiwyg() {
+ /*
+ * Put the editor in WYSIWYG editing mode.
+ */
+ if (this.getState() === this.states.WYSIWYG) {
+ return;
+ }
+ this.changed = false;
+ this.element.contentEditable = true;
+ this.element.innerHTML = this.getHTML();
+ this.setState(this.states.WYSIWYG);
+ }
+
+ edit() {
+ /*
+ * Put the editor into source editing mode.
+ */
+ if (this.state === this.states.EDIT) {
+ return;
+ }
+ this.changed = false;
+ this.element.contentEditable = true;
+ this.element.innerHTML = encodeHtmlEntities(this.getMarkdown());
+ this.setState(this.states.EDIT);
+ }
+
+ insertAtCursor(node) {
+ var sel, range, html;
+ sel = window.getSelection();
+ range = sel.getRangeAt(0);
+ range.deleteContents();
+ range.insertNode(node);
+ range.setStartAfter(node);
+ this.element.focus();
+ sel.removeAllRanges();
+ sel.addRange(range);
+ }
+}
diff --git a/src/ttfrog/themes/default/static/editor/grung.js b/src/ttfrog/themes/default/static/editor/grung.js
new file mode 100644
index 0000000..504ac29
--- /dev/null
+++ b/src/ttfrog/themes/default/static/editor/grung.js
@@ -0,0 +1,422 @@
+class Grung {
+ constructor(settings) {
+ /*
+ * Create a new Editor instance.
+ */
+ this.element = document.getElementById(settings.editorId || 'content');
+ this.source = this.element.textContent;
+
+ this.marked = marked;
+ this.marked.use({
+ breaks: false,
+ gfm: true,
+ });
+ this.states = {
+ VIEW: 'view',
+ }
+ this.cachedHTML = null;
+ this.cachedMarkdown = null;
+ this.state = null;
+ this.changed = false;
+ this.enabledPlugins = {};
+
+ settings.plugins.forEach(plugin => {
+ this.enabledPlugins[plugin.name] = new plugin({name: plugin.name, editor: this});
+ });
+ this.getHTML();
+ this.element.classList.add("loaded");
+ }
+
+ plugins() {
+ return Object.values(this.enabledPlugins).sort((a, b) => { a.precedence < b.precedence });
+ }
+
+ getState() {
+ return this.state;
+ }
+
+ setState(newState) {
+ this.state = newState;
+ Object.values(this.states).forEach(state => {
+ if (state == newState) {
+ this.element.classList.add(state);
+ } else {
+ this.element.classList.remove(state);
+ }
+ });
+ }
+
+ markdownToHTML(md) {
+ var html = this.marked.parse(md);
+ return html;
+ }
+
+ getHTML(string) {
+ /*
+ * Convert the markdown source to HTML.
+ */
+ if (this.changed || !this.cachedHTML) {
+ this.cachedHTML = this.markdownToHTML(this.getMarkdown());
+ }
+ return this.cachedHTML;
+ }
+
+ getMarkdown() {
+ if (!this.cachedMarkdown) {
+ this.cachedMarkdown = this.source;
+ }
+ return this.cachedMarkdown;
+ }
+
+ reset() {
+ /*
+ * Discard any unsaved edits and reset the editor to its initial state.
+ */
+ this.cachedHTML = null;
+ this.cachedMarkdown = null;
+ this.view();
+ }
+
+ view() {
+ /*
+ * Convert the editor read-only mode and display the current HTML.
+ */
+ if (this.getState() === this.states.VIEW) {
+ return;
+ }
+ this.element.innerHTML = this.getHTML();
+ this.setState(this.states.VIEW);
+ this.contentEditable = false;
+ }
+
+}
+
+class GrungPlugin {
+
+ constructor(settings) {
+ this.name = settings.name;
+ this.editor = settings.editor;
+ this.precedence = 50;
+ };
+
+ setEditable() {
+ };
+
+ toMarkdown(html) {
+ return html;
+ };
+
+ toHTML(md) {
+ return md;
+ };
+};
+
+
+class MacroPlugin extends GrungPlugin {
+
+ macros = {
+ // image: {}
+ // toc {}
+ // widget {}
+ //
+ style: {
+ inline: false,
+ toHTML: (token, node) => {
+ return node.replace(/class="macro"/, `class="macro ${token.keywords}"`);
+ }
+ },
+
+ multiline: {
+ inline: false,
+ fromHTML: (node, markdown) => {
+ var content = node.innerHTML.replaceAll(" ", "\0");
+ content = content.replaceAll("{{{", "{{{");
+ content = content.replaceAll("}}}", "}}}");
+ content = encodeHtmlEntities(content);
+ return `{{{${content}}}}`;
+ },
+ },
+
+ user: {
+ inline: true,
+ toHTML: (token, node) => {
+ return node + document.querySelector("nav > ul > li.user > a:first-child").outerHTML;
+ },
+ },
+ toc: {
+ inline: true,
+ element: 'div',
+ toHTML: (token, node) => {
+ return node + "";
+ },
+ postprocess: (html) => {
+ const subList = (depth) => {
+ var li = document.createElement("li");
+ var ul = document.createElement("ul");
+ li.appendChild(ul);
+ return li;
+ };
+
+ const buf = document.createElement('div');
+ buf.innerHTML = html;
+ const tocElement =
+ buf.querySelectorAll('[data-macro-name="toc"]').forEach(tocElement => {
+
+ var params = {
+ depth: tocElement.dataset.paramDepth || 3,
+ keywords: tocElement.dataset.paramKeywords || "",
+ };
+
+ const headings = buf.querySelectorAll("h2, h3, h4, h5, h6");
+
+ const toc = document.createElement("ul");
+ toc.setAttribute('role', 'list');
+
+ var lastDepth = null;
+ var ul = toc;
+ headings.forEach(heading => {
+ var depth = parseInt(heading.nodeName[1]) - 1;
+ if (depth > params.depth) {
+ return;
+ }
+ if (lastDepth === null) {
+ lastDepth = depth;
+ }
+
+ var index = document.createElement("li");
+ index.innerHTML = '' + heading.innerHTML + " ";
+
+ var list = null;
+ if (depth > lastDepth) {
+ list = subList(depth);
+ ul.appendChild(list);
+ ul = list.firstChild;
+ } else if (depth < lastDepth) {
+ var list = subList(depth);
+ toc.appendChild(list);
+ ul = list.firstChild;
+ }
+ ul.appendChild(index);
+ lastDepth = depth;
+ });
+
+ if (params.keywords) {
+ params.keywords.split(" ").forEach(className => {
+ if (className) {
+ toc.classList.add(className);
+ }
+ });
+ }
+ tocElement.appendChild(toc);
+ });
+ return buf.innerHTML;
+ },
+ },
+ npc: {
+ toHTML: (settings) => {
+ var name = camelCase(settings.keywords).join(" ");
+ var target = name.replaceAll(" ", "");
+ return `👤 ${name} `;
+ },
+ fromHTML: (node) => {
+ return `{{npc ${node.firstChild.dataset.npcName}}}`;
+ },
+ },
+ spell: {
+ toHTML: (settings) => {
+ var name = camelCase(settings.keywords).join(" ");
+ var target = name.replaceAll(" ", "");
+ return `✨ ${name} `;
+ },
+ fromHTML: (node) => {
+ return `{{spell ${node.firstChild.dataset.spellName}}}`;
+ },
+ },
+ }
+
+ getTokens = (pattern, source) => {
+ const matched = source.matchAll(pattern);
+ const tokens = [];
+ if (!matched) {
+ return tokens;
+ }
+ matched.forEach(match => {
+ if (!this.macros[match.groups.name]) {
+ return;
+ }
+ const token = {
+ type: 'macro',
+ source: match[0],
+ matched: match,
+ macro: this.macros[match.groups.name],
+ keywords: (match.groups.keywords || '').trim(),
+ inline: this.macros[match.groups.name].inline,
+ params: {},
+ rendered: '',
+ };
+ if (match.groups.parameters) {
+ var params = decodeHtmlEntities(match.groups.parameters.trim());
+ params.matchAll(this.paramPattern).forEach(param => {
+ if (param.groups) {
+ var name = param.groups.name;
+ token.params[name] = decodeHtmlEntities(param.groups.value.trim());
+ }
+ });
+ }
+ token.rendered = this.renderToken(token);
+ tokens.push(token);
+ });
+ return tokens;
+ }
+
+ renderToken = (token) => {
+ const tag = token.macro.element || (token.inline ? 'span' : 'div');
+ var node = `<${tag} class="macro" data-plugin-name="macro" data-macro-name="${token.matched.groups.name}"`;
+
+ for (var name in token.params) {
+ node += ` data-param-${name}="${(token.params[name] || "").trim()}"`;
+ }
+
+ if (token.keywords) {
+ node += ` data-keywords="${token.keywords}"`;
+ }
+
+ node += ` data-inline="${token.inline}"`;
+
+ node += ">";
+
+ if (token.macro.toHTML) {
+ node = token.macro.toHTML(token, node);
+ }
+
+ if (token.inline) {
+ node += `${tag}>`;
+ }
+
+ // preserve the wrapping element, unless it is a paragraph.
+ if (token.matched.groups.wrap) {
+ if (token.matched.groups.wrap != '') {
+ node = token.matched.groups.wrap + node + token.matched.groups.endwrap;
+ }
+ }
+
+ return node;
+ }
+
+
+ constructor(settings) {
+ super(settings);
+ this.pattern = /(?<[^>]+?>){{(?\w+)(?(?:\s*[\w-]+)*?)?(?(?:\s+[\w-]+=\S+?)*)?\s*(?}})?(?<\/[^>]+?>)/mg;
+ this.endPattern = /}}\s*<\/p>/mg;
+ this.paramPattern = /\s*(?[^=]+)="(?[^"]*)"/g;
+ this.multilinePattern = /(?(.(?!\}{3})*)+?)[\s\n]*\}{3}/smg;
+
+ const plugin = this;
+
+ this.editor.marked.use({
+ hooks: {
+ preprocess: (source) => {
+ const matched = source.matchAll(plugin.multilinePattern);
+ var md = source;
+ matched.forEach(match => {
+ var wrapper = '';
+ var content = decodeHtmlEntities(match.groups.content)
+ .replaceAll("\n", "::BR::")
+ .replaceAll('`', '::QU::')
+ .replaceAll('{', '::OC::')
+ .replaceAll('}', '::CC::');
+ md = md.replaceAll(match[0], wrapper + '\0' + content + '\0 ');
+ });
+ return md;
+ },
+ postprocess: (html) => {
+ plugin.getTokens(plugin.pattern, html).forEach(token => {
+ html = html.replaceAll(token.source, token.rendered);
+ });
+ html = html.replaceAll(plugin.endPattern, '');
+ Object.values(plugin.macros).forEach(macro => {
+ if (macro.postprocess) {
+ html = macro.postprocess(html);
+ }
+ });
+
+ html = html.replaceAll("::BR::", " ")
+ .replaceAll('::QU::', '`')
+ .replaceAll('::OC::', '{')
+ .replaceAll('::CC::', '}');
+
+ // remove unsafe html tags
+ return DOMPurify.sanitize(html, {});
+ }
+ },
+ });
+ }
+
+ setEditable() {
+ this.editor.turndown.addRule('macros', {
+ filter: function (node, options) {
+ return ((node.nodeName === 'DIV' || node.nodeName === 'SPAN') && node.dataset.pluginName == 'macro')
+ },
+ replacement: function (content, node, options) {
+ var macro = plugin.macros[node.getAttribute('data-macro-name')];
+
+ if (macro.fromHTML) {
+ return macro.fromHTML(node, content);
+ }
+
+ var md = '{{' + node.dataset.macroName;
+ if (node.dataset.keywords) {
+ md += " " + node.dataset.keywords;
+ }
+
+ for (var paramName in node.dataset) {
+ if (paramName.indexOf("param") != 0) {
+ continue;
+ }
+ md += ` ${paramName.replace('param', '').toLowerCase()}="${node.dataset[paramName]}"`
+ };
+
+ if (node.dataset.inline == "false") {
+ md = `\n\n${md}\n\n`;
+ md += plugin.editor.HtmlToMarkdown(node.innerHTML);
+ md += "\n\n}}\n\n";
+ } else {
+ md += "}}";
+ }
+
+ // replace nulls with line breaks, for the multiline macro
+ md = md.replaceAll('\0', "\n");
+
+ return md;
+ },
+ });
+ }
+
+}
+
+function camelCase(words) {
+ var output = [];
+ words.trim().split(/\s+/g).forEach(word => {
+ var lcWord = word.toLowerCase();
+ output.push(lcWord.charAt(0).toUpperCase() + lcWord.slice(1));
+ });
+ return output;
+}
+
+function b64encode(input) {
+ return new TextEncoder().encode(input).toBase64();
+}
+
+function b64decode(input) {
+ return new TextDecoder().decode(Uint8Array.fromBase64(input));
+}
+
+function decodeHtmlEntities(html) {
+ var txt = document.createElement("textarea");
+ txt.innerHTML = html;
+ return txt.value;
+}
+
+function encodeHtmlEntities(str) {
+ return str.replace(/[\u00A0-\u9999<>\&]/g, i => ''+i.charCodeAt(0)+';')
+}
diff --git a/src/ttfrog/themes/default/static/editor/turndown-plugin-gfm.js b/src/ttfrog/themes/default/static/editor/joplin-turndown-plugin-gfm.js
similarity index 52%
rename from src/ttfrog/themes/default/static/editor/turndown-plugin-gfm.js
rename to src/ttfrog/themes/default/static/editor/joplin-turndown-plugin-gfm.js
index 859f4ad..3b2da4a 100644
--- a/src/ttfrog/themes/default/static/editor/turndown-plugin-gfm.js
+++ b/src/ttfrog/themes/default/static/editor/joplin-turndown-plugin-gfm.js
@@ -43,6 +43,7 @@ var rules = {};
rules.tableCell = {
filter: ['th', 'td'],
replacement: function (content, node) {
+ if (tableShouldBeSkipped(nodeParentTable(node))) return content;
return cell(content, node)
}
};
@@ -50,19 +51,26 @@ rules.tableCell = {
rules.tableRow = {
filter: 'tr',
replacement: function (content, node) {
+ const parentTable = nodeParentTable(node);
+ if (tableShouldBeSkipped(parentTable)) return content;
+
var borderCells = '';
var alignMap = { left: ':--', right: '--:', center: ':-:' };
if (isHeadingRow(node)) {
- for (var i = 0; i < node.childNodes.length; i++) {
+ const colCount = tableColCount(parentTable);
+ for (var i = 0; i < colCount; i++) {
+ const childNode = colCount >= node.childNodes.length ? null : node.childNodes[i];
var border = '---';
- var align = (
- node.childNodes[i].getAttribute('align') || ''
- ).toLowerCase();
+ var align = childNode ? (childNode.getAttribute('align') || '').toLowerCase() : '';
if (align) border = alignMap[align] || border;
- borderCells += cell(border, node.childNodes[i]);
+ if (childNode) {
+ borderCells += cell(border, node.childNodes[i]);
+ } else {
+ borderCells += cell(border, null, i);
+ }
}
}
return '\n' + content + (borderCells ? '\n' + borderCells : '')
@@ -73,13 +81,27 @@ rules.table = {
// Only convert tables with a heading row.
// Tables with no heading row are kept using `keep` (see below).
filter: function (node) {
- return node.nodeName === 'TABLE' && isHeadingRow(node.rows[0])
+ return node.nodeName === 'TABLE'
},
- replacement: function (content) {
+ replacement: function (content, node) {
+ if (tableShouldBeSkipped(node)) return content;
+
// Ensure there are no blank lines
- content = content.replace('\n\n', '\n');
- return '\n\n' + content + '\n\n'
+ content = content.replace(/\n+/g, '\n');
+
+ // If table has no heading, add an empty one so as to get a valid Markdown table
+ var secondLine = content.trim().split('\n');
+ if (secondLine.length >= 2) secondLine = secondLine[1];
+ var secondLineIsDivider = secondLine.indexOf('| ---') === 0;
+
+ var columnCount = tableColCount(node);
+ var emptyHeader = '';
+ if (columnCount && !secondLineIsDivider) {
+ emptyHeader = '|' + ' |'.repeat(columnCount) + '\n' + '|' + ' --- |'.repeat(columnCount);
+ }
+
+ return '\n\n' + emptyHeader + content + '\n\n'
}
};
@@ -120,16 +142,71 @@ function isFirstTbody (element) {
)
}
-function cell (content, node) {
- var index = indexOf.call(node.parentNode.childNodes, node);
+function cell (content, node = null, index = null) {
+ if (index === null) index = indexOf.call(node.parentNode.childNodes, node);
var prefix = ' ';
if (index === 0) prefix = '| ';
- return prefix + content + ' |'
+ let filteredContent = content.trim().replace(/\n\r/g, ' ').replace(/\n/g, " ");
+ filteredContent = filteredContent.replace(/\|+/g, '\\|');
+ while (filteredContent.length < 3) filteredContent += ' ';
+ if (node) filteredContent = handleColSpan(filteredContent, node, ' ');
+ return prefix + filteredContent + ' |'
+}
+
+function nodeContainsTable(node) {
+ if (!node.childNodes) return false;
+
+ for (let i = 0; i < node.childNodes.length; i++) {
+ const child = node.childNodes[i];
+ if (child.nodeName === 'TABLE') return true;
+ if (nodeContainsTable(child)) return true;
+ }
+ return false;
+}
+
+// Various conditions under which a table should be skipped - i.e. each cell
+// will be rendered one after the other as if they were paragraphs.
+function tableShouldBeSkipped(tableNode) {
+ if (!tableNode) return true;
+ if (!tableNode.rows) return true;
+ if (tableNode.rows.length === 1 && tableNode.rows[0].childNodes.length <= 1) return true; // Table with only one cell
+
+ // Not sure why we're excluding this. possibly because it'll freak out the parser? --evilchili
+ //if (nodeContainsTable(tableNode)) return true;
+
+ return false;
+}
+
+function nodeParentTable(node) {
+ let parent = node.parentNode;
+ while (parent.nodeName !== 'TABLE') {
+ parent = parent.parentNode;
+ if (!parent) return null;
+ }
+ return parent;
+}
+
+function handleColSpan(content, node, emptyChar) {
+ const colspan = node.getAttribute('colspan') || 1;
+ for (let i = 1; i < colspan; i++) {
+ content += ' | ' + emptyChar.repeat(3);
+ }
+ return content
+}
+
+function tableColCount(node) {
+ let maxColCount = 0;
+ for (let i = 0; i < node.rows.length; i++) {
+ const row = node.rows[i];
+ const colCount = row.childNodes.length;
+ if (colCount > maxColCount) maxColCount = colCount;
+ }
+ return maxColCount
}
function tables (turndownService) {
turndownService.keep(function (node) {
- return node.nodeName === 'TABLE' && !isHeadingRow(node.rows[0])
+ return node.nodeName === 'TABLE'
});
for (var key in rules) turndownService.addRule(key, rules[key]);
}
diff --git a/src/ttfrog/themes/default/static/editor/marked.umd.min.js b/src/ttfrog/themes/default/static/editor/marked.umd.min.js
new file mode 100644
index 0000000..c4377f7
--- /dev/null
+++ b/src/ttfrog/themes/default/static/editor/marked.umd.min.js
@@ -0,0 +1,60 @@
+!function(e,t){"object"==typeof exports&&typeof module<"u"?module.exports=t():"function"==typeof define&&define.amd?define("marked",t):e.marked=t()}(typeof globalThis<"u"?globalThis:typeof self<"u"?self:this,function(){var e,t={},E=t,r={exports:t},i=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,D=Object.prototype.hasOwnProperty,n={},M=n,j={Hooks:()=>L,Lexer:()=>A,Marked:()=>K,Parser:()=>I,Renderer:()=>_,TextRenderer:()=>P,Tokenizer:()=>v,defaults:()=>l,getDefaults:()=>s,lexer:()=>ie,marked:()=>C,options:()=>V,parse:()=>ne,parseInline:()=>re,parser:()=>se,setOptions:()=>Y,use:()=>ee,walkTokens:()=>te};for(e in j)i(M,e,{get:j[e],enumerable:!0});function s(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}r.exports=(e=>{var t=i({},"__esModule",{value:!0}),r=e,n=void 0,s=void 0;if(r&&"object"==typeof r||"function"==typeof r)for(let e of O(r))D.call(t,e)||e===n||i(t,e,{get:()=>r[e],enumerable:!(s=Z(r,e))||s.enumerable});return t})(n);var l=s();function N(e){l=e}n={exec:()=>null};function a(e,t=""){let n="string"==typeof e?e:e.source,s={replace:(e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(o.caret,"$1"),n=n.replace(e,r),s},getRegex:()=>new RegExp(n,t)};return s}var o={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},h=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,c=/(?:[*+-]|\d{1,9}[.)])/,p=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,u=a(p).replace(/bull/g,c).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),p=a(p).replace(/bull/g,c).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),g=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,k=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,d=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",k).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),c=a(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,c).getRegex(),f="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",x=/|$))/,b=a("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",x).replace("tag",f).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),m=a(g).replace("hr",h).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",f).getRegex(),d={blockquote:a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",m).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:d,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:h,html:b,lheading:u,list:c,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:m,table:n,text:/^[^\n]+/},b=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",h).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",f).getRegex(),c={...d,lheading:p,table:b,paragraph:a(g).replace("hr",h).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",b).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",f).getRegex()},m={...d,html:a(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)| \\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",x).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:n,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(g).replace("hr",h).replace("heading",` *#{1,6} *[^
+]`).replace("lheading",u).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},p=/^( {2,}|\\)\n(?!\s*$)/,b=/[\p{P}\p{S}]/u,f=/[\s\p{P}\p{S}]/u,g=/[^\s\p{P}\p{S}]/u,h=a(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,f).getRegex(),u=/(?!~)[\p{P}\p{S}]/u,w=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,y=a(w,"u").replace(/punct/g,b).getRegex(),w=a(w,"u").replace(/punct/g,u).getRegex(),$="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Q=a($,"gu").replace(/notPunctSpace/g,g).replace(/punctSpace/g,f).replace(/punct/g,b).getRegex(),$=a($,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,u).getRegex(),u=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,g).replace(/punctSpace/g,f).replace(/punct/g,b).getRegex(),g=a(/\\(punct)/,"gu").replace(/punct/g,b).getRegex(),f=a(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),b=a(x).replace("(?:--\x3e|$)","--\x3e").getRegex(),x=a("^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",b).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),b=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,H=a(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",b).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),G=a(/^!?\[(label)\]\[(ref)\]/).replace("label",b).replace("ref",k).getRegex(),k=a(/^!?\[(ref)\](?:\[\])?/).replace("ref",k).getRegex(),g={_backpedal:n,anyPunctuation:g,autolink:f,blockSkip:/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,br:p,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:n,emStrongLDelim:y,emStrongRDelimAst:Q,emStrongRDelimUnd:u,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:H,nolink:k,punctuation:h,reflink:G,reflinkSearch:a("reflink|nolink(?!\\()","g").replace("reflink",G).replace("nolink",k).getRegex(),tag:x,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},X=e=>W[e];function T(e,t){if(t){if(o.escapeTest.test(e))return e.replace(o.escapeReplace,X)}else if(o.escapeTestNoEncode.test(e))return e.replace(o.escapeReplaceNoEncode,X);return e}function F(e){try{e=encodeURI(e).replace(o.percentDecode,"%")}catch{return null}return e}function U(e,t){let r=e.replace(o.findPipe,(e,t,r)=>{let n=!1,s=t;for(;0<=--s&&"\\"===r[s];)n=!n;return n?"|":" |"}),n=r.split(o.splitPipe),s=0;if(n[0].trim()||n.shift(),0t)n.splice(t);else for(;n.length{var t=e.match(r.other.beginningSpace);if(null===t)return e;var[t]=t;return t.length>=n.length?e.slice(n.length):e}).join(`
+`)}(e=t[0],t[3]||"",this.rules),{type:"code",raw:e,lang:t[2]&&t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"),text:r}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let t=r[2].trim();if(this.rules.other.endingHash.test(t)){let e=z(t,"#");!this.options.pedantic&&e&&!this.rules.other.endingSpaceChar.test(e)||(t=e.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(e){e=this.rules.block.hr.exec(e);if(e)return{type:"hr",raw:z(e[0],`
+`)}}blockquote(e){e=this.rules.block.blockquote.exec(e);if(e){let i=z(e[0],`
+`).split(`
+`),l="",a="",o=[];for(;0" ".repeat(3*e.length)),c=g.split(`
+`,1)[0],p=!h.trim(),u=0;if(this.options.pedantic?(u=2,o=h.trimStart()):p?u=l[1].length+1:(u=4<(u=l[2].search(this.rules.other.nonSpaceChar))?1:u,o=h.slice(u),u+=l[1].length),p&&this.rules.other.blankLine.test(c)&&(a+=c+`
+`,g=g.substring(c.length+1),e=!0),!e){let r=this.rules.other.nextBulletRegex(u),n=this.rules.other.hrRegex(u),s=this.rules.other.fencesBeginRegex(u),i=this.rules.other.headingBeginRegex(u),l=this.rules.other.htmlBeginRegex(u);for(;g;){let e=g.split(`
+`,1)[0],t;if(c=e,t=this.options.pedantic?c=c.replace(this.rules.other.listReplaceNesting," "):c.replace(this.rules.other.tabCharGlobal," "),s.test(c)||i.test(c)||l.test(c)||r.test(c)||n.test(c))break;if(t.search(this.rules.other.nonSpaceChar)>=u||!c.trim())o+=`
+`+t.slice(u);else{if(p||4<=h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)||s.test(h)||i.test(h)||n.test(h))break;o+=`
+`+c}p||c.trim()||(p=!0),a+=e+`
+`,g=g.substring(e.length+1),h=t.slice(u)}}n.loose||(i?n.loose=!0:this.rules.other.doubleBlankLine.test(a)&&(i=!0));let t=null,r;this.options.gfm&&((t=this.rules.other.listIsTask.exec(o))&&(r="[ ] "!==t[0],o=o.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:a,task:!!t,checked:r,loose:!1,text:o,tokens:[]}),n.raw+=a}let r=n.items.at(-1);if(r){r.raw=r.raw.trimEnd(),r.text=r.text.trimEnd(),n.raw=n.raw.trimEnd();for(let r=0;r"space"===e.type),t=0this.rules.other.anyLine.test(e.raw));n.loose=t}if(n.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:n.align[t]})));return n}}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t)return e=t[1].charAt(t[1].length-1)===`
+`?t[1].slice(0,-1):t[1],{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}text(e){e=this.rules.block.text.exec(e);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(e){e=this.rules.inline.escape.exec(e);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(e){e=this.rules.inline.tag.exec(e);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(n){let s=this.rules.inline.link.exec(n);if(s){let e=s[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;n=z(e.slice(0,-1),"\\");if((e.length-n.length)%2==0)return}else{var i,n=function(t,r){if(-1===t.indexOf(r[1]))return-1;let n=0;for(let e=0;e!!(t=e.call({lexer:this},i,r))&&(i=i.substring(t.raw.length),r.push(t),!0)))if(t=this.tokenizer.space(i)){i=i.substring(t.raw.length);let e=r.at(-1);1===t.raw.length&&void 0!==e?e.raw+=`
+`:r.push(t)}else if(t=this.tokenizer.code(i)){i=i.substring(t.raw.length);let e=r.at(-1);"paragraph"===e?.type||"text"===e?.type?(e.raw+=(e.raw.endsWith(`
+`)?"":`
+`)+t.raw,e.text+=`
+`+t.text,this.inlineQueue.at(-1).src=e.text):r.push(t)}else if(t=this.tokenizer.fences(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.heading(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.hr(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.blockquote(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.list(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.html(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.def(i)){i=i.substring(t.raw.length);let e=r.at(-1);"paragraph"===e?.type||"text"===e?.type?(e.raw+=(e.raw.endsWith(`
+`)?"":`
+`)+t.raw,e.text+=`
+`+t.raw,this.inlineQueue.at(-1).src=e.text):this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title},r.push(t))}else if(t=this.tokenizer.table(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.lheading(i))i=i.substring(t.raw.length),r.push(t);else{let s=i;if(this.options.extensions?.startBlock){let t=1/0,r=i.slice(1),n;this.options.extensions.startBlock.forEach(e=>{"number"==typeof(n=e.call({lexer:this},r))&&0<=n&&(t=Math.min(t,n))}),t<1/0&&0<=t&&(s=i.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(s))){let e=r.at(-1);n&&"paragraph"===e?.type?(e.raw+=(e.raw.endsWith(`
+`)?"":`
+`)+t.raw,e.text+=`
+`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=e.text):r.push(t),n=s.length!==i.length,i=i.substring(t.raw.length)}else if(t=this.tokenizer.text(i)){i=i.substring(t.raw.length);let e=r.at(-1);"text"===e?.type?(e.raw+=(e.raw.endsWith(`
+`)?"":`
+`)+t.raw,e.text+=`
+`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=e.text):r.push(t)}else if(i){var e="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}}return this.state.top=!0,r}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(s,r=[]){let n=s,t=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(0!!(t=e.call({lexer:this},s,r))&&(s=s.substring(t.raw.length),r.push(t),!0)))if(t=this.tokenizer.escape(s))s=s.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.tag(s))s=s.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.link(s))s=s.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.reflink(s,this.tokens.links)){s=s.substring(t.raw.length);let e=r.at(-1);"text"===t.type&&"text"===e?.type?(e.raw+=t.raw,e.text+=t.text):r.push(t)}else if(t=this.tokenizer.emStrong(s,n,l))s=s.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.codespan(s))s=s.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.br(s))s=s.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.del(s))s=s.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.autolink(s))s=s.substring(t.raw.length),r.push(t);else if(!this.state.inLink&&(t=this.tokenizer.url(s)))s=s.substring(t.raw.length),r.push(t);else{let e=s;if(this.options.extensions?.startInline){let t=1/0,r=s.slice(1),n;this.options.extensions.startInline.forEach(e=>{"number"==typeof(n=e.call({lexer:this},r))&&0<=n&&(t=Math.min(t,n))}),t<1/0&&0<=t&&(e=s.substring(0,t+1))}if(t=this.tokenizer.inlineText(e)){s=s.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(l=t.raw.slice(-1)),i=!0;let e=r.at(-1);"text"===e?.type?(e.raw+=t.raw,e.text+=t.text):r.push(t)}else if(s){var a="Infinite loop on byte: "+s.charCodeAt(0);if(this.options.silent){console.error(a);break}throw new Error(a)}}}return r}},_=class{options;parser;constructor(e){this.options=e||l}space(e){return""}code({text:e,lang:t,escaped:r}){t=(t||"").match(o.notSpaceStart)?.[0],e=e.replace(o.endingNewline,"")+`
+`;return t?''+(r?e:T(e,!0))+`
+`:""+(r?e:T(e,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)}
+`}hr(e){return`
+`}list(t){let e=t.ordered,r=t.start,n="";for(let e=0;e
+`+n+""+i+`>
+`}listitem(e){let t="";var r;return e.task&&(r=this.checkbox({checked:!!e.checked}),e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&0${t+=this.parser.parse(e.tokens,!!e.loose)}
+`}checkbox({checked:e}){return" '}paragraph({tokens:e}){return`${this.parser.parseInline(e)}
+`}table(t){let e="",r="";for(let e=0;e
+
+`+e+`
+`+(n=n&&`${n} `)+`
+`}tablerow({text:e}){return`
+${e}
+`}tablecell(e){var t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`${r}>
+`}strong({tokens:e}){return`${this.parser.parseInline(e)} `}em({tokens:e}){return`${this.parser.parseInline(e)} `}codespan({text:e}){return`${T(e,!0)}`}br(e){return" "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:r}){var r=this.parser.parseInline(r),n=F(e);if(null===n)return r;let s='"+r+" "}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));n=F(e);if(null===n)return T(r);let s=` "}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:T(e.text)}},P=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},I=class le{options;renderer;textRenderer;constructor(e){this.options=e||l,this.options.renderer=this.options.renderer||new _,this.renderer=this.options.renderer,this.renderer.options=this.options,(this.renderer.parser=this).textRenderer=new P}static parse(e,t){return new le(t).parse(e)}static parseInline(e,t){return new le(t).parseInline(e)}parse(n,s=!0){let i="";for(let r=0;r{e=t[e].flat(1/0);n=n.concat(this.walkTokens(e,r))}):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,r)))}}return n}use(...e){let s=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(i=>{let e={...i};if(e.async=this.defaults.async||e.async||!1,i.extensions&&(i.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let r=s.renderers[n.name];r?s.renderers[n.name]=function(...e){let t=n.renderer.apply(this,e);return t=!1===t?r.apply(this,e):t}:s.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||"block"!==n.level&&"inline"!==n.level)throw new Error("extension level must be 'block' or 'inline'");let e=s[n.level];e?e.unshift(n.tokenizer):s[n.level]=[n.tokenizer],n.start&&("block"===n.level?s.startBlock?s.startBlock.push(n.start):s.startBlock=[n.start]:"inline"===n.level&&(s.startInline?s.startInline.push(n.start):s.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(s.childTokens[n.name]=n.childTokens)}),e.extensions=s),i.renderer){let s=this.defaults.renderer||new _(this.defaults);for(var t in i.renderer){if(!(t in s))throw new Error(`renderer '${t}' does not exist`);if(!["options","parser"].includes(t)){let e=t,r=i.renderer[e],n=s[e];s[e]=(...e)=>{let t=r.apply(s,e);return(t=!1===t?n.apply(s,e):t)||""}}}e.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new v(this.defaults);for(var l in i.tokenizer){if(!(l in s))throw new Error(`tokenizer '${l}' does not exist`);if(!["options","rules","lexer"].includes(l)){let e=l,r=i.tokenizer[e],n=s[e];s[e]=(...e)=>{let t=r.apply(s,e);return t=!1===t?n.apply(s,e):t}}}e.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new L;for(let t in i.hooks){if(!(t in s))throw new Error(`hook '${t}' does not exist`);if(!["options","block"].includes(t)){let e=t,r=i.hooks[e],n=s[e];L.passThroughHooks.has(t)?s[e]=e=>{if(this.defaults.async&&L.passThroughHooksRespectAsync.has(t))return Promise.resolve(r.call(s,e)).then(e=>n.call(s,e));e=r.call(s,e);return n.call(s,e)}:s[e]=(...e)=>{let t=r.apply(s,e);return t=!1===t?n.apply(s,e):t}}}e.hooks=s}if(i.walkTokens){let r=this.defaults.walkTokens,n=i.walkTokens;e.walkTokens=function(e){let t=[];return t.push(n.call(this,e)),t=r?t.concat(r.call(this,e)):t}}this.defaults={...this.defaults,...e}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return A.lex(e,t??this.defaults)}parser(e,t){return I.parse(e,t??this.defaults)}parseMarkdown(a){return(r,e)=>{let t={...e},n={...this.defaults,...t},s=this.onError(!!n.silent,!!n.async);if(!0===this.defaults.async&&!1===t.async)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("u"i(e,n)).then(e=>n.hooks?n.hooks.processAllTokens(e):e).then(e=>n.walkTokens?Promise.all(this.walkTokens(e,n.walkTokens)).then(()=>e):e).then(e=>l(e,n)).then(e=>n.hooks?n.hooks.postprocess(e):e).catch(s);try{n.hooks&&(r=n.hooks.preprocess(r));let e=i(r,n),t=(n.hooks&&(e=n.hooks.processAllTokens(e)),n.walkTokens&&this.walkTokens(e,n.walkTokens),l(e,n));return t=n.hooks?n.hooks.postprocess(t):t}catch(e){return s(e)}}}onError(r,n){return e=>{var t;if(e.message+=`
+Please report this to https://github.com/markedjs/marked.`,r)return t="An error occurred:
"+T(e.message+"",!0)+" ",n?Promise.resolve(t):t;if(n)return Promise.reject(e);throw e}}},B=new K;function C(e,t){return B.parse(e,t)}C.options=C.setOptions=function(e){return B.setOptions(e),N(C.defaults=B.defaults),C},C.getDefaults=s,C.defaults=l,C.use=function(...e){return B.use(...e),N(C.defaults=B.defaults),C},C.walkTokens=function(e,t){return B.walkTokens(e,t)},C.parseInline=B.parseInline,C.Parser=I,C.parser=I.parse,C.Renderer=_,C.TextRenderer=P,C.Lexer=A,C.lexer=A.lex,C.Tokenizer=v,C.Hooks=L;var V=(C.parse=C).options,Y=C.setOptions,ee=C.use,te=C.walkTokens,re=C.parseInline,ne=C,se=I.parse,ie=A.lex;return E!=t&&(r.exports=t),r.exports});
\ No newline at end of file
diff --git a/src/ttfrog/themes/default/static/editor/purify.min.js b/src/ttfrog/themes/default/static/editor/purify.min.js
new file mode 100644
index 0000000..62b30a9
--- /dev/null
+++ b/src/ttfrog/themes/default/static/editor/purify.min.js
@@ -0,0 +1,3 @@
+/*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r1?t-1:0),o=1;o1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function O(e){for(let t=0;t/gm),G=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:G});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.2.7",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:w,Element:O,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=n,q=O.prototype,$=D(q,"cloneNode"),V=D(q,"remove"),re=D(q,"nextSibling"),ie=D(q,"childNodes"),ae=D(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:Se}=Z;let{IS_ALLOWED_URI:be}=Z,Ne=null;const we=R({},[...x,...L,...C,...I,...U]);let Re=null;const Oe=R({},[...z,...P,...H,...F]);let ve=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),De=null,xe=null,Le=!0,Ce=!0,ke=!1,Ie=!0,Me=!1,Ue=!0,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!1,We=!1,Ge=!0,Ye=!1,je=!0,Xe=!1,qe={},$e=null;const Ke=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=R({},["audio","video","img","source","image","track"]);let Je=null;const Qe=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ot=nt,rt=!1,it=null;const at=R({},[et,tt,nt],g);let lt=R({},["mi","mo","mn","ms","mtext"]),ct=R({},["annotation-xml"]);const st=R({},["title","style","font","a","script"]);let ut=null;const mt=["application/xhtml+xml","text/html"];let pt=null,ft=null;const dt=r.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ft||ft!==e){if(e&&"object"==typeof e||(e={}),e=v(e),ut=-1===mt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===ut?g:h,Ne=_(e,"ALLOWED_TAGS")?R({},e.ALLOWED_TAGS,pt):we,Re=_(e,"ALLOWED_ATTR")?R({},e.ALLOWED_ATTR,pt):Oe,it=_(e,"ALLOWED_NAMESPACES")?R({},e.ALLOWED_NAMESPACES,g):at,Je=_(e,"ADD_URI_SAFE_ATTR")?R(v(Qe),e.ADD_URI_SAFE_ATTR,pt):Qe,Ve=_(e,"ADD_DATA_URI_TAGS")?R(v(Ze),e.ADD_DATA_URI_TAGS,pt):Ze,$e=_(e,"FORBID_CONTENTS")?R({},e.FORBID_CONTENTS,pt):Ke,De=_(e,"FORBID_TAGS")?R({},e.FORBID_TAGS,pt):v({}),xe=_(e,"FORBID_ATTR")?R({},e.FORBID_ATTR,pt):v({}),qe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,Ce=!1!==e.ALLOW_DATA_ATTR,ke=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Me=e.SAFE_FOR_TEMPLATES||!1,Ue=!1!==e.SAFE_FOR_XML,ze=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Be=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ge=!1!==e.SANITIZE_DOM,Ye=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Xe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||X,ot=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,ve=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ve.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ve.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ve.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(Ce=!1),Be&&(Fe=!0),qe&&(Ne=R({},U),Re=[],!0===qe.html&&(R(Ne,x),R(Re,z)),!0===qe.svg&&(R(Ne,L),R(Re,P),R(Re,F)),!0===qe.svgFilters&&(R(Ne,C),R(Re,P),R(Re,F)),!0===qe.mathMl&&(R(Ne,I),R(Re,H),R(Re,F))),e.ADD_TAGS&&(Ne===we&&(Ne=v(Ne)),R(Ne,e.ADD_TAGS,pt)),e.ADD_ATTR&&(Re===Oe&&(Re=v(Re)),R(Re,e.ADD_ATTR,pt)),e.ADD_URI_SAFE_ATTR&&R(Je,e.ADD_URI_SAFE_ATTR,pt),e.FORBID_CONTENTS&&($e===Ke&&($e=v($e)),R($e,e.FORBID_CONTENTS,pt)),je&&(Ne["#text"]=!0),ze&&R(Ne,["html","head","body"]),Ne.table&&(R(Ne,["tbody"]),delete De.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),ft=e}},Tt=R({},[...L,...C,...k]),yt=R({},[...I,...M]),Et=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},At=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||Be)try{Et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},_t=function(e){let t=null,n=null;if(He)e=" "+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&ot===nt&&(e=''+e+"");const o=le?le.createHTML(e):e;if(ot===nt)try{t=(new Y).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(ot,"template",null);try{t.documentElement.innerHTML=rt?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ot===nt?pe.call(t,ze?"html":"body")[0]:ze?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},bt=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof w&&e instanceof w};function wt(e,t,n){u(e,(e=>{e.call(o,t,n,ft)}))}const Rt=function(e){let t=null;if(wt(de.beforeSanitizeElements,e,null),bt(e))return Et(e),!0;const n=pt(e.nodeName);if(wt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),Ue&&e.hasChildNodes()&&!Nt(e.firstElementChild)&&S(/<[/\w!]/g,e.innerHTML)&&S(/<[/\w!]/g,e.textContent))return Et(e),!0;if(e.nodeType===ee)return Et(e),!0;if(Ue&&e.nodeType===te&&S(/<[/\w]/g,e.data))return Et(e),!0;if(!Ne[n]||De[n]){if(!De[n]&&vt(n)){if(ve.tagNameCheck instanceof RegExp&&S(ve.tagNameCheck,n))return!1;if(ve.tagNameCheck instanceof Function&&ve.tagNameCheck(n))return!1}if(je&&!$e[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return Et(e),!0}return e instanceof O&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===o||lt[o]):Boolean(Tt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[o]:Boolean(yt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[o])&&!(t.namespaceURI===et&&!lt[o])&&!yt[n]&&(st[n]||!Tt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Et(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),wt(de.afterSanitizeElements,e,null),!1):(Et(e),!0)},Ot=function(e,t,n){if(Ge&&("id"===t||"name"===t)&&(n in r||n in dt))return!1;if(Ce&&!xe[t]&&S(ye,t));else if(Le&&S(Ee,t));else if(!Re[t]||xe[t]){if(!(vt(e)&&(ve.tagNameCheck instanceof RegExp&&S(ve.tagNameCheck,e)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(e))&&(ve.attributeNameCheck instanceof RegExp&&S(ve.attributeNameCheck,t)||ve.attributeNameCheck instanceof Function&&ve.attributeNameCheck(t,e))||"is"===t&&ve.allowCustomizedBuiltInElements&&(ve.tagNameCheck instanceof RegExp&&S(ve.tagNameCheck,n)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(n))))return!1}else if(Je[t]);else if(S(be,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ve[e]){if(ke&&!S(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},vt=function(e){return"annotation-xml"!==e&&T(e,Se)},Dt=function(e){wt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Re,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=pt(a),m=c;let f="value"===a?m:A(m);if(n.attrName=s,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,wt(de.uponSanitizeAttribute,e,n),f=n.attrValue,!Ye||"id"!==s&&"name"!==s||(At(a,e),f="user-content-"+f),Ue&&S(/((--!?|])>)|<\/(style|title|textarea)/i,f)){At(a,e);continue}if("attributename"===s&&T(f,"href")){At(a,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){At(a,e);continue}if(!Ie&&S(/\/>/i,f)){At(a,e);continue}Me&&u([he,ge,Te],(e=>{f=y(f,e," ")}));const d=pt(e.nodeName);if(Ot(d,s,f)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(d,s)){case"TrustedHTML":f=le.createHTML(f);break;case"TrustedScriptURL":f=le.createScriptURL(f)}if(f!==m)try{l?e.setAttributeNS(l,a,f):e.setAttribute(a,f),bt(e)?Et(e):p(o.removed)}catch(t){At(a,e)}}else At(a,e)}wt(de.afterSanitizeAttributes,e,null)},xt=function e(t){let n=null;const o=St(t);for(wt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)wt(de.uponSanitizeShadowNode,n,null),Rt(n),Dt(n),n.content instanceof s&&e(n.content);wt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(rt=!e,rt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Pe||gt(t),o.removed=[],"string"==typeof e&&(Xe=!1),Xe){if(e.nodeName){const t=pt(e.nodeName);if(!Ne[t]||De[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof w)n=_t("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Fe&&!Me&&!ze&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=_t(e),!n)return Fe?null:We?ce:""}n&&He&&Et(n.firstChild);const c=St(Xe?e:n);for(;i=c.nextNode();)Rt(i),Dt(i),i.content instanceof s&&xt(i.content);if(Xe)return e;if(Fe){if(Be)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Re.shadowroot||Re.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=ze?n.outerHTML:n.innerHTML;return ze&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(K,n.ownerDocument.doctype.name)&&(m="\n"+m),Me&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Pe=!0},o.clearConfig=function(){ft=null,Pe=!1},o.isValidAttribute=function(e,t,n){ft||gt({});const o=pt(e),r=pt(t);return Ot(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
+//# sourceMappingURL=purify.min.js.map
diff --git a/src/ttfrog/themes/default/static/site.css b/src/ttfrog/themes/default/static/site.css
index 21be61e..ebb0cca 100644
--- a/src/ttfrog/themes/default/static/site.css
+++ b/src/ttfrog/themes/default/static/site.css
@@ -113,6 +113,7 @@ table {
th {
border-bottom: 1px solid #000;
+ padding: 3px;
}
th, td {
padding: 2px;
@@ -206,3 +207,148 @@ footer {
menu {
display: none;
}
+
+.left {
+ display: block;
+ float: left;
+ margin:5px;
+ max-width: 30%;
+}
+
+.right {
+ display: block;
+ float: right;
+ margin: 5px;
+ max-width: 30%;
+}
+
+.center {
+ width: fit-content;
+ margin: 0 auto;
+}
+
+.box {
+ border-radius: 5px;
+ border: 1px solid black;
+ background: #DEDEDE;
+ padding: 10px;
+}
+
+.striped > table {
+ background: #FAFAFA;
+}
+.striped > table tr:nth-child(even) {
+ background-color: #FFFFFF;
+}
+
+.equal-widths > table {
+ table-layout: fixed;
+ width: 100%;
+}
+
+.layout > table {
+ border: none;
+ background: transparent;
+}
+.layout > table > thead {
+ display: none;
+}
+
+table td table {
+ max-width:95%;
+}
+
+pre {
+ border: 1px dashed black;
+ border-radius: 5px;
+ padding: 10px;
+ margin: 5px;
+ background: #EEE;
+}
+
+code {
+ display: inline-block;
+ border: 1px dashed black;
+ border-radius: 5px;
+ padding: 5px;
+ background: #EEE;
+ margin: 3px;
+}
+
+div.macro {
+ display: inline;
+}
+
+div[data-macro-name="toc"] {
+ display: inline;
+ float: left;
+ border-radius: 5px;
+ font-size: 14px;
+ margin-right: 2em;
+ margin-bottom: 2em;
+ border: 1px solid #000;
+ padding: 0ch 2ch;
+}
+
+div[data-macro-name="toc"] ul {
+ box-sizing: border-box;
+ list-style: none;
+ padding-left: 2ch;
+ font-weight: normal;
+ margin-left: 0px;
+
+}
+
+div[data-macro-name="toc"] > ul:first-child {
+ padding-left: 0ch;
+ margin-left: 0px;
+}
+div[data-macro-name="toc"] > ul:first-child > li {
+ padding-left: 0ch;
+ margin-left: 0px;
+}
+div[data-macro-name="toc"] > ul:first-child > li {
+ font-weight: bold;
+}
+
+div[data-macro-name="toc"] > ul > li {
+ font-weight: bold;
+}
+
+div[data-macro-name="toc"] > ul > li {
+ padding-left: 2ch;
+}
+
+div[data-macro-name="toc"] a {
+ display: block;
+ width: 100%;
+}
+div[data-macro-name="toc"] a:hover {
+ background: #CCC;
+}
+
+
+#content {
+ display: none;
+}
+
+#content.loaded {
+ display: block;
+}
+#content.wysiwyg {
+ display: none,
+}
+#content.view {
+}
+
+#content.edit {
+ font-family: monospace;
+ white-space: pre;
+}
+
+#content.wysiwyg {
+}
+
+#content.wysiwyg .md {
+ opacity: 0.5;
+}
diff --git a/src/ttfrog/themes/default/static/site.js b/src/ttfrog/themes/default/static/site.js
new file mode 100644
index 0000000..5184b9f
--- /dev/null
+++ b/src/ttfrog/themes/default/static/site.js
@@ -0,0 +1,112 @@
+APIv1 = {
+ get: function(doc_id, callback) {
+ (async () => {
+ const raw = await fetch('/_/v1/get/' + doc_id, {
+ method: 'GET',
+ headers: {
+ 'Accept': 'application/json',
+ 'Content-Type': 'application/json'
+ }
+ });
+ const res = await raw.json();
+ if (res['code'] != 200) {
+ console.error("APIv1 error: ", res)
+ }
+ callback(res);
+ })();
+ },
+
+ put: function(data, callback) {
+ (async () => {
+ const raw = await fetch('/_/v1/put/' + window.location.pathname, {
+ method: 'POST',
+ headers: {
+ 'Accept': 'application/json',
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify({
+ 'body': data
+ }),
+ });
+ const res = await raw.json();
+ if (res['code'] != 200) {
+ console.error("APIv1 error: ", res)
+ }
+ callback(res);
+ })();
+ },
+
+ search: function(space, query, callback) {
+ (async () => {
+ const raw = await fetch('/_/v1/search/' + space, {
+ method: 'POST',
+ headers: {
+ 'Accept': 'application/json',
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify({
+ 'body': query
+ }),
+ });
+ const res = await raw.json();
+ if (res['code'] != 200) {
+ console.error("APIv1 error: ", res)
+ }
+ callback(res);
+ })();
+ },
+};
+
+const WIDGETS = {};
+
+function parseWidgetSource(html) {
+
+ function block(prefix) {
+ return RegExp('##\\s*' + prefix + '.*?```\\w*(.+?)```', 'gims');
+ };
+
+ const template = block("Template").exec(html)[1];
+ const css = block("CSS").exec(html)[1];
+ const processor = block("Processor").exec(html)[1];
+
+ var func;
+ eval("func = " + processor);
+
+ return {
+ template: template,
+ css: css,
+ processor: func
+ };
+}
+
+async function processWidgets(html, callback) {
+
+ var widgetPattern = /({{(.+)}})/gm;
+
+ if (!html.match(widgetPattern)) {
+ callback();
+ return;
+ }
+
+ html.matchAll(widgetPattern).forEach(match => {
+ var widgetTag = match[1];
+ var widgetName = match[2];
+ if (Object.values(WIDGETS).indexOf(widgetName) == -1) {
+ APIv1.search("Widget", widgetName, (res) => {
+ if (res.code == 200) {
+ var parts = parseWidgetSource(res.response[0].body);
+ WIDGETS[widgetName] = parts.processor;
+ contents = WIDGETS[widgetName](widgetTag, parts.template, parts.css);
+ } else {
+ contents = `Invalid widget: ${widgetName}`;
+ }
+ var rep = `${contents} `;
+ html = html.replaceAll(widgetTag, rep);
+ if (parts) {
+ html = `${html}`;
+ }
+ callback(html);
+ });
+ }
+ });
+};
diff --git a/src/ttfrog/themes/default/static/viewer/toastui-editor-viewer.min.css b/src/ttfrog/themes/default/static/viewer/toastui-editor-viewer.min.css
deleted file mode 100644
index a420f80..0000000
--- a/src/ttfrog/themes/default/static/viewer/toastui-editor-viewer.min.css
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * @toast-ui/editor
- * @version 3.2.2 | Fri Feb 17 2023
- * @author NHN Cloud FE Development Lab
- * @license MIT
- */.ProseMirror{overflow-X:hidden;color:#222;font-family:Open Sans,Helvetica Neue,Helvetica,Arial,나눔바른고딕,Nanum Barun Gothic,맑은고딕,Malgun Gothic,sans-serif;font-size:13px;height:calc(100% - 36px);overflow-y:auto}.ProseMirror .placeholder{color:#999}.ProseMirror-selectednode,.ProseMirror:focus{outline:none}.html-block.ProseMirror-selectednode,table.ProseMirror-selectednode{border-radius:2px;outline:2px solid #00a9ff}.toastui-editor-contents{font-family:Open Sans,Helvetica Neue,Helvetica,Arial,나눔바른고딕,Nanum Barun Gothic,맑은고딕,Malgun Gothic,sans-serif;font-size:13px;margin:0;padding:0;z-index:20}.toastui-editor-contents :not(table){box-sizing:content-box;line-height:160%}.toastui-editor-contents address,.toastui-editor-contents cite,.toastui-editor-contents dfn,.toastui-editor-contents em,.toastui-editor-contents i,.toastui-editor-contents var{font-style:italic}.toastui-editor-contents strong{font-weight:700}.toastui-editor-contents p{color:#222;margin:10px 0}.toastui-editor-contents>div>div:first-of-type h1,.toastui-editor-contents>h1:first-of-type{margin-top:14px}.toastui-editor-contents h1,.toastui-editor-contents h2,.toastui-editor-contents h3,.toastui-editor-contents h4,.toastui-editor-contents h5,.toastui-editor-contents h6{color:#222;font-weight:700}.toastui-editor-contents h1{border-bottom:3px double #999;font-size:24px;line-height:28px;margin:52px 0 15px;padding-bottom:7px}.toastui-editor-contents h2{border-bottom:1px solid #dbdbdb;font-size:22px;line-height:23px;margin:20px 0 13px;padding-bottom:7px}.toastui-editor-contents h3{font-size:20px;margin:18px 0 2px}.toastui-editor-contents h4{font-size:18px;margin:10px 0 2px}.toastui-editor-contents h3,.toastui-editor-contents h4{line-height:18px}.toastui-editor-contents h5{font-size:16px}.toastui-editor-contents h6{font-size:14px}.toastui-editor-contents h5,.toastui-editor-contents h6{line-height:17px;margin:9px 0 -4px}.toastui-editor-contents del{color:#999}.toastui-editor-contents blockquote{border-left:4px solid #e5e5e5;color:#999;margin:14px 0;padding:0 16px}.toastui-editor-contents blockquote ol,.toastui-editor-contents blockquote p,.toastui-editor-contents blockquote ul{color:#999}.toastui-editor-contents blockquote>:first-child{margin-top:0}.toastui-editor-contents blockquote>:last-child{margin-bottom:0}.toastui-editor-contents code,.toastui-editor-contents pre{border:0;border-radius:0;font-family:Consolas,Courier,Apple SD 산돌고딕 Neo,-apple-system,Lucida Grande,Apple SD Gothic Neo,맑은 고딕,Malgun Gothic,Segoe UI,돋움,dotum,sans-serif}.toastui-editor-contents pre{background-color:#f4f7f8;margin:2px 0 8px;padding:18px}.toastui-editor-contents code{background-color:#f9f2f4;border-radius:2px;color:#c1798b;letter-spacing:-.3px;padding:2px 3px}.toastui-editor-contents pre code{background-color:transparent;color:inherit;padding:0;white-space:pre-wrap}.toastui-editor-contents img{box-sizing:border-box;margin:4px 0 10px;max-width:100%;vertical-align:top}.toastui-editor-contents table{border:1px solid rgba(0,0,0,.1);border-collapse:collapse;box-sizing:border-box;color:#222;margin:12px 0 14px;width:auto}.toastui-editor-contents table td,.toastui-editor-contents table th{border:1px solid rgba(0,0,0,.1);height:32px;padding:5px 14px 5px 12px}.toastui-editor-contents table th{background-color:#555;color:#fff;font-weight:300;padding-top:6px}.toastui-editor-contents th p{color:#fff;margin:0}.toastui-editor-contents td p{margin:0;padding:0 2px}.toastui-editor-contents td.toastui-editor-cell-selected{background-color:#d8dfec}.toastui-editor-contents th.toastui-editor-cell-selected{background-color:#908f8f}.toastui-editor-contents dir,.toastui-editor-contents menu,.toastui-editor-contents ol,.toastui-editor-contents ul{color:#222;display:block;list-style-type:none;margin:6px 0 10px;padding-left:24px}.toastui-editor-contents ol{counter-reset:li;list-style-type:none}.toastui-editor-contents ol>li{counter-increment:li}.toastui-editor-contents ol>li:before,.toastui-editor-contents ul>li:before{display:inline-block;position:absolute}.toastui-editor-contents ul>li:before{background-color:#ccc;border-radius:50%;content:"";height:5px;margin-left:-17px;margin-top:6px;width:5px}.toastui-editor-contents ol>li:before{color:#aaa;content:"." counter(li);direction:rtl;margin-left:-28px;text-align:right;width:24px}.toastui-editor-contents ol ol,.toastui-editor-contents ol ul,.toastui-editor-contents ul ol,.toastui-editor-contents ul ul{margin-bottom:0!important;margin-top:0!important}.toastui-editor-contents ol li,.toastui-editor-contents ul li{position:relative}.toastui-editor-contents ol p,.toastui-editor-contents ul p{margin:0}.toastui-editor-contents hr{border-top:1px solid #eee;margin:16px 0}.toastui-editor-contents a{color:#4b96e6;text-decoration:underline}.toastui-editor-contents a:hover{color:#1f70de}.toastui-editor-contents .image-link{position:relative}.toastui-editor-contents .image-link:hover:before{background:#fff url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PGcgc3Ryb2tlPSIjNTU1IiBzdHJva2Utd2lkdGg9IjEuNSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiPjxwYXRoIGQ9Im01LjY4NyAxMC4yOTQtMS4yODUgMS4yODhjLTEuMDUgMS4wNS0xLjAzNSAyLjc3Mi4wMzcgMy44NDRsLjEzNS4xMzVjMS4wNzIgMS4wNzIgMi43OTQgMS4wODggMy44NDQuMDM3bDIuNzItMi43MmMxLjA1MS0xLjA1IDEuMDM0LTIuNzcyLS4wMzctMy44NDNsLS4xMzYtLjEzNiIvPjxwYXRoIGQ9Im0xNC4zMDUgOS43MTMgMS4yODctMS4yOWMxLjA1Mi0xLjA1MSAxLjAzNi0yLjc3My0uMDM2LTMuODQ0bC0uMTM1LS4xMzZjLTEuMDcyLTEuMDcyLTIuNzk0LTEuMDg4LTMuODQ1LS4wMzZMOC44NTcgNy4xMjZjLTEuMDUxIDEuMDUxLTEuMDM0IDIuNzcyLjAzNyAzLjg0M2wuMTM2LjEzNiIvPjwvZz48L3N2Zz4=) no-repeat;background-position:50%;border:1px solid #c9ccd5;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0,0,0,.08);content:"";cursor:pointer;height:30px;position:absolute;right:0;width:30px}.toastui-editor-contents .task-list-item{border:0;list-style:none;margin-left:-24px;padding-left:24px}.toastui-editor-contents .task-list-item:before{background-position:50%;background-repeat:no-repeat;background-size:18px 18px;background:transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCI+PHJlY3Qgd2lkdGg9IjE3IiBoZWlnaHQ9IjE3IiB4PSIuNSIgeT0iLjUiIHJ4PSIyIiBmaWxsPSIjRkZGIiBzdHJva2U9IiNDQ0MiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==);border-radius:2px;content:"";cursor:pointer;height:18px;left:0;margin-left:0;margin-top:0;position:absolute;top:1px;width:18px}.toastui-editor-contents .task-list-item.checked:before{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCI+PHBhdGggZD0iTTE2IDBhMiAyIDAgMCAxIDIgMnYxNGEyIDIgMCAwIDEtMiAySDJhMiAyIDAgMCAxLTItMlYyYTIgMiAwIDAgMSAyLTJoMTR6bS0xLjc5MyA1LjI5M2ExIDEgMCAwIDAtMS40MTQgMEw3LjUgMTAuNTg1IDUuMjA3IDguMjkzbC0uMDk0LS4wODNhMSAxIDAgMCAwLTEuMzIgMS40OTdsMyAzIC4wOTQuMDgzYTEgMSAwIDAgMCAxLjMyLS4wODNsNi02IC4wODMtLjA5NGExIDEgMCAwIDAtLjA4My0xLjMyeiIgZmlsbD0iIzRCOTZFNiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.toastui-editor-custom-block .toastui-editor-custom-block-editor{background:#f9f7fd;border:1px solid #dbd4ea;color:#452d6b}.toastui-editor-custom-block .toastui-editor-custom-block-view{padding:9px 13px 8px 12px;position:relative}.toastui-editor-custom-block.ProseMirror-selectednode .toastui-editor-custom-block-view{border:1px solid #dbd4ea;border-radius:2px}.toastui-editor-custom-block .toastui-editor-custom-block-view .tool{display:none;position:absolute;right:10px;top:7px}.toastui-editor-custom-block.ProseMirror-selectednode .toastui-editor-custom-block-view .tool{display:block}.toastui-editor-custom-block-view button{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMCAzMCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGQ9Im0xNS41IDEyLjUgMiAyTDEyIDIwaC0ydi0ybDUuNS01LjV6TTE4IDEwbDIgMi0xLjUgMS41LTItMkwxOCAxMHoiIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsOiM1NTUiLz48L3N2Zz4=) no-repeat;background-position:50%;background-size:30px 30px;border:1px solid #ccc;height:15px;margin-left:8px;padding:3px;vertical-align:middle;width:15px}.toastui-editor-custom-block-view .info{color:#5200d0;font-size:13px;font-weight:700;vertical-align:middle}.toastui-editor-contents .toastui-editor-ww-code-block{position:relative}.toastui-editor-contents .toastui-editor-ww-code-block:after{background:#e5e9ea url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMCAzMCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGQ9Im0xNS41IDEyLjUgMiAyTDEyIDIwaC0ydi0ybDUuNS01LjV6TTE4IDEwbDIgMi0xLjUgMS41LTItMkwxOCAxMHoiIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsOiM1NTUiLz48L3N2Zz4=) no-repeat;background-position:100%;background-size:30px 30px;border-radius:2px;color:#333;content:attr(data-language);cursor:pointer;display:inline-block;font-size:13px;font-weight:700;height:24px;padding:3px 35px 0 10px;position:absolute;right:10px;top:10px}.toastui-editor-ww-code-block-language{background-color:#fff;border:1px solid #ccc;border-radius:2px;display:inline-block;height:27px;position:fixed;right:35px;width:100px;z-index:30}.toastui-editor-ww-code-block-language input{background-color:transparent;border:none;box-sizing:border-box;height:100%;margin:0;outline:none;padding:0 10px;width:100%}.toastui-editor-contents-placeholder:before{color:grey;content:attr(data-placeholder);line-height:160%;position:absolute}.toastui-editor-md-preview .toastui-editor-contents h1{min-height:28px}.toastui-editor-md-preview .toastui-editor-contents h2{min-height:23px}.toastui-editor-md-preview .toastui-editor-contents blockquote{min-height:20px}.toastui-editor-md-preview .toastui-editor-contents li{min-height:22px}.toastui-editor-pseudo-clipboard{height:0;left:-1000px;opacity:0;position:fixed;top:-1000px;width:0;z-index:-1}
\ No newline at end of file
diff --git a/src/ttfrog/themes/default/static/viewer/toastui-editor-viewer.min.js b/src/ttfrog/themes/default/static/viewer/toastui-editor-viewer.min.js
deleted file mode 100644
index dcd894a..0000000
--- a/src/ttfrog/themes/default/static/viewer/toastui-editor-viewer.min.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*!
- * @toast-ui/editor
- * @version 3.2.2 | Fri Feb 17 2023
- * @author NHN Cloud FE Development Lab
- * @license MIT
- */
-!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prosemirror-inputrules"),require("prosemirror-keymap"),require("prosemirror-model"),require("prosemirror-state"),require("prosemirror-view")):"function"==typeof define&&define.amd?define(["prosemirror-inputrules","prosemirror-keymap","prosemirror-model","prosemirror-state","prosemirror-view"],t):"object"==typeof exports?exports.toastui=t(require("prosemirror-inputrules"),require("prosemirror-keymap"),require("prosemirror-model"),require("prosemirror-state"),require("prosemirror-view")):(e.toastui=e.toastui||{},e.toastui.Editor=t(e[void 0],e[void 0],e[void 0],e[void 0],e[void 0]))}(self,(function(e,t,r,n,i){return function(){var o={368:function(e){
-/*! @license DOMPurify 2.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.3/LICENSE */
-e.exports=function(){"use strict";function e(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t1?r-1:0),i=1;i/gm),z=s(/^data-[\-\w.\u00B7-\uFFFF]/),j=s(/^aria-[\-\w]+$/),U=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_=s(/^(?:\w+script|data):/i),V=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function $(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:Z(),t=function(e){return X(e)};if(t.version="2.3.3",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var r=e.document,n=e.document,i=e.DocumentFragment,o=e.HTMLTemplateElement,s=e.Node,l=e.Element,u=e.NodeFilter,c=e.NamedNodeMap,p=void 0===c?e.NamedNodeMap||e.MozNamedAttrMap:c,k=e.Text,C=e.Comment,K=e.DOMParser,Y=e.trustedTypes,Q=l.prototype,J=N(Q,"cloneNode"),ee=N(Q,"nextSibling"),te=N(Q,"childNodes"),re=N(Q,"parentNode");if("function"==typeof o){var ne=n.createElement("template");ne.content&&ne.content.ownerDocument&&(n=ne.content.ownerDocument)}var ie=W(Y,r),oe=ie&&Ie?ie.createHTML(""):"",ae=n,se=ae.implementation,le=ae.createNodeIterator,ue=ae.createDocumentFragment,ce=ae.getElementsByTagName,pe=r.importNode,fe={};try{fe=T(n).documentMode?n.documentMode:{}}catch(e){}var de={};t.isSupported="function"==typeof re&&se&&void 0!==se.createHTMLDocument&&9!==fe;var he=H,ge=P,me=z,ve=j,ye=_,be=V,we=U,xe=null,ke=L({},[].concat($(D),$(A),$(E),$(M),$(O))),Ce=null,Le=L({},[].concat($(q),$(F),$(B),$(I))),Te=null,Ne=null,De=!0,Ae=!0,Ee=!1,Se=!1,Me=!1,Re=!1,Oe=!1,qe=!1,Fe=!1,Be=!0,Ie=!1,He=!0,Pe=!0,ze=!1,je={},Ue=null,_e=L({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ve=null,Ge=L({},["audio","video","img","source","image","track"]),$e=null,Ze=L({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),We="http://www.w3.org/1998/Math/MathML",Xe="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml",Ye=Ke,Qe=!1,Je=void 0,et=["application/xhtml+xml","text/html"],tt="text/html",rt=void 0,nt=null,it=n.createElement("form"),ot=function(e){nt&&nt===e||(e&&"object"===(void 0===e?"undefined":G(e))||(e={}),e=T(e),xe="ALLOWED_TAGS"in e?L({},e.ALLOWED_TAGS):ke,Ce="ALLOWED_ATTR"in e?L({},e.ALLOWED_ATTR):Le,$e="ADD_URI_SAFE_ATTR"in e?L(T(Ze),e.ADD_URI_SAFE_ATTR):Ze,Ve="ADD_DATA_URI_TAGS"in e?L(T(Ge),e.ADD_DATA_URI_TAGS):Ge,Ue="FORBID_CONTENTS"in e?L({},e.FORBID_CONTENTS):_e,Te="FORBID_TAGS"in e?L({},e.FORBID_TAGS):{},Ne="FORBID_ATTR"in e?L({},e.FORBID_ATTR):{},je="USE_PROFILES"in e&&e.USE_PROFILES,De=!1!==e.ALLOW_ARIA_ATTR,Ae=!1!==e.ALLOW_DATA_ATTR,Ee=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=e.SAFE_FOR_TEMPLATES||!1,Me=e.WHOLE_DOCUMENT||!1,qe=e.RETURN_DOM||!1,Fe=e.RETURN_DOM_FRAGMENT||!1,Be=!1!==e.RETURN_DOM_IMPORT,Ie=e.RETURN_TRUSTED_TYPE||!1,Oe=e.FORCE_BODY||!1,He=!1!==e.SANITIZE_DOM,Pe=!1!==e.KEEP_CONTENT,ze=e.IN_PLACE||!1,we=e.ALLOWED_URI_REGEXP||we,Ye=e.NAMESPACE||Ke,Je=Je=-1===et.indexOf(e.PARSER_MEDIA_TYPE)?tt:e.PARSER_MEDIA_TYPE,rt="application/xhtml+xml"===Je?function(e){return e}:g,Se&&(Ae=!1),Fe&&(qe=!0),je&&(xe=L({},[].concat($(O))),Ce=[],!0===je.html&&(L(xe,D),L(Ce,q)),!0===je.svg&&(L(xe,A),L(Ce,F),L(Ce,I)),!0===je.svgFilters&&(L(xe,E),L(Ce,F),L(Ce,I)),!0===je.mathMl&&(L(xe,M),L(Ce,B),L(Ce,I))),e.ADD_TAGS&&(xe===ke&&(xe=T(xe)),L(xe,e.ADD_TAGS)),e.ADD_ATTR&&(Ce===Le&&(Ce=T(Ce)),L(Ce,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&L($e,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(Ue===_e&&(Ue=T(Ue)),L(Ue,e.FORBID_CONTENTS)),Pe&&(xe["#text"]=!0),Me&&L(xe,["html","head","body"]),xe.table&&(L(xe,["tbody"]),delete Te.tbody),a&&a(e),nt=e)},at=L({},["mi","mo","mn","ms","mtext"]),st=L({},["foreignobject","desc","title","annotation-xml"]),lt=L({},A);L(lt,E),L(lt,S);var ut=L({},M);L(ut,R);var ct=function(e){var t=re(e);t&&t.tagName||(t={namespaceURI:Ke,tagName:"template"});var r=g(e.tagName),n=g(t.tagName);if(e.namespaceURI===Xe)return t.namespaceURI===Ke?"svg"===r:t.namespaceURI===We?"svg"===r&&("annotation-xml"===n||at[n]):Boolean(lt[r]);if(e.namespaceURI===We)return t.namespaceURI===Ke?"math"===r:t.namespaceURI===Xe?"math"===r&&st[n]:Boolean(ut[r]);if(e.namespaceURI===Ke){if(t.namespaceURI===Xe&&!st[n])return!1;if(t.namespaceURI===We&&!at[n])return!1;var i=L({},["title","style","font","a","script"]);return!ut[r]&&(i[r]||!lt[r])}return!1},pt=function(e){h(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},ft=function(e,r){try{h(t.removed,{attribute:r.getAttributeNode(e),from:r})}catch(e){h(t.removed,{attribute:null,from:r})}if(r.removeAttribute(e),"is"===e&&!Ce[e])if(qe||Fe)try{pt(r)}catch(e){}else try{r.setAttribute(e,"")}catch(e){}},dt=function(e){var t=void 0,r=void 0;if(Oe)e=" "+e;else{var i=m(e,/^[\r\n\t ]+/);r=i&&i[0]}"application/xhtml+xml"===Je&&(e=''+e+"");var o=ie?ie.createHTML(e):e;if(Ye===Ke)try{t=(new K).parseFromString(o,Je)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(Ye,"template",null);try{t.documentElement.innerHTML=Qe?"":o}catch(e){}}var a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ye===Ke?ce.call(t,Me?"html":"body")[0]:Me?t.documentElement:a},ht=function(e){return le.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},gt=function(e){return!(e instanceof k||e instanceof C||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof p&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},mt=function(e){return"object"===(void 0===s?"undefined":G(s))?e instanceof s:e&&"object"===(void 0===e?"undefined":G(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},vt=function(e,r,n){de[e]&&f(de[e],(function(e){e.call(t,r,n,nt)}))},yt=function(e){var r=void 0;if(vt("beforeSanitizeElements",e,null),gt(e))return pt(e),!0;if(m(e.nodeName,/[\u0080-\uFFFF]/))return pt(e),!0;var n=rt(e.nodeName);if(vt("uponSanitizeElement",e,{tagName:n,allowedTags:xe}),!mt(e.firstElementChild)&&(!mt(e.content)||!mt(e.content.firstElementChild))&&w(/<[/\w]/g,e.innerHTML)&&w(/<[/\w]/g,e.textContent))return pt(e),!0;if("select"===n&&w(/=0;--a)i.insertBefore(J(o[a],!0),ee(e))}return pt(e),!0}return e instanceof l&&!ct(e)?(pt(e),!0):"noscript"!==n&&"noembed"!==n||!w(/<\/no(script|embed)/i,e.innerHTML)?(Se&&3===e.nodeType&&(r=e.textContent,r=v(r,he," "),r=v(r,ge," "),e.textContent!==r&&(h(t.removed,{element:e.cloneNode()}),e.textContent=r)),vt("afterSanitizeElements",e,null),!1):(pt(e),!0)},bt=function(e,t,r){if(He&&("id"===t||"name"===t)&&(r in n||r in it))return!1;if(Ae&&!Ne[t]&&w(me,t));else if(De&&w(ve,t));else{if(!Ce[t]||Ne[t])return!1;if($e[t]);else if(w(we,v(r,be,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(r,"data:")||!Ve[e])if(Ee&&!w(ye,v(r,be,"")));else if(r)return!1}return!0},wt=function(e){var r=void 0,n=void 0,i=void 0,o=void 0;vt("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ce};for(o=a.length;o--;){var l=r=a[o],u=l.name,c=l.namespaceURI;if(n=b(r.value),i=rt(u),s.attrName=i,s.attrValue=n,s.keepAttr=!0,s.forceKeepAttr=void 0,vt("uponSanitizeAttribute",e,s),n=s.attrValue,!s.forceKeepAttr&&(ft(u,e),s.keepAttr))if(w(/\/>/i,n))ft(u,e);else{Se&&(n=v(n,he," "),n=v(n,ge," "));var p=rt(e.nodeName);if(bt(p,i,n))try{c?e.setAttributeNS(c,u,n):e.setAttribute(u,n),d(t.removed)}catch(e){}}}vt("afterSanitizeAttributes",e,null)}},xt=function e(t){var r=void 0,n=ht(t);for(vt("beforeSanitizeShadowDOM",t,null);r=n.nextNode();)vt("uponSanitizeShadowNode",r,null),yt(r)||(r.content instanceof i&&e(r.content),wt(r));vt("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(n,o){var a=void 0,l=void 0,u=void 0,c=void 0,p=void 0;if((Qe=!n)&&(n="\x3c!--\x3e"),"string"!=typeof n&&!mt(n)){if("function"!=typeof n.toString)throw x("toString is not a function");if("string"!=typeof(n=n.toString()))throw x("dirty is not a string, aborting")}if(!t.isSupported){if("object"===G(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof n)return e.toStaticHTML(n);if(mt(n))return e.toStaticHTML(n.outerHTML)}return n}if(Re||ot(o),t.removed=[],"string"==typeof n&&(ze=!1),ze);else if(n instanceof s)1===(l=(a=dt("\x3c!----\x3e")).ownerDocument.importNode(n,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?a=l:a.appendChild(l);else{if(!qe&&!Se&&!Me&&-1===n.indexOf("<"))return ie&&Ie?ie.createHTML(n):n;if(!(a=dt(n)))return qe?null:oe}a&&Oe&&pt(a.firstChild);for(var f=ht(ze?n:a);u=f.nextNode();)3===u.nodeType&&u===c||yt(u)||(u.content instanceof i&&xt(u.content),wt(u),c=u);if(c=null,ze)return n;if(qe){if(Fe)for(p=ue.call(a.ownerDocument);a.firstChild;)p.appendChild(a.firstChild);else p=a;return Be&&(p=pe.call(r,p,!0)),p}var d=Me?a.outerHTML:a.innerHTML;return Se&&(d=v(d,he," "),d=v(d,ge," ")),ie&&Ie?ie.createHTML(d):d},t.setConfig=function(e){ot(e),Re=!0},t.clearConfig=function(){nt=null,Re=!1},t.isValidAttribute=function(e,t,r){nt||ot({});var n=rt(e),i=rt(t);return bt(n,i,r)},t.addHook=function(e,t){"function"==typeof t&&(de[e]=de[e]||[],h(de[e],t))},t.removeHook=function(e){de[e]&&d(de[e])},t.removeHooks=function(e){de[e]&&(de[e]=[])},t.removeAllHooks=function(){de={}},t}return X()}()},928:function(e,t,r){"use strict";var n=r(322);e.exports=function(e,t,r){var i,o;if(r=r||0,!n(t))return-1;if(Array.prototype.indexOf)return Array.prototype.indexOf.call(t,e,r);for(o=t.length,i=r;r>=0&&i-1)}},471:function(e,t,r){"use strict";var n=r(928),i=r(990),o=Element.prototype,a=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.msMatchesSelector||function(e){var t=this.document||this.ownerDocument;return n(this,i(t.querySelectorAll(e)))>-1};e.exports=function(e,t){return a.call(e,t)}},462:function(e,t,r){"use strict";var n=r(893),i=r(928),o=r(902),a=r(24);e.exports=function(e){var t,r,s=Array.prototype.slice.call(arguments,1),l=e.classList;l?n(s,(function(e){l.remove(e)})):(t=o(e).split(/\s+/),r=[],n(t,(function(e){i(e,s)<0&&r.push(e)})),a(e,r))}},969:function(e){"use strict";e.exports=function(e,t){var r,n,i,o,a=Object.prototype.hasOwnProperty;for(i=1,o=arguments.length;i6048e5}(a)||(window.localStorage.setItem(o,(new Date).getTime()),setTimeout((function(){"interactive"!==document.readyState&&"complete"!==document.readyState||i("https://www.google-analytics.com/collect",{v:1,t:"event",tid:t,cid:r,dp:r,dh:e,el:e,ec:"use"})}),1e3)))}},322:function(e){"use strict";e.exports=function(e){return e instanceof Array}},65:function(e,t,r){"use strict";var n=r(929),i=r(934);e.exports=function(e){return!n(e)&&!i(e)}},404:function(e,t,r){"use strict";var n=r(790);e.exports=function(e){return!n(e)}},294:function(e){"use strict";e.exports=function(e){return e instanceof Function}},934:function(e){"use strict";e.exports=function(e){return null===e}},758:function(e){"use strict";e.exports=function(e){return"string"==typeof e||e instanceof String}},790:function(e,t,r){"use strict";var n=r(65);e.exports=function(e){return n(e)&&!1!==e}},929:function(e){"use strict";e.exports=function(e){return void 0===e}},479:function(t){"use strict";t.exports=e},481:function(e){"use strict";e.exports=t},43:function(e){"use strict";e.exports=r},814:function(e){"use strict";e.exports=n},311:function(e){"use strict";e.exports=i}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return o[e].call(r.exports,r,r.exports,s),r.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var l={};return function(){"use strict";s.d(l,{default:function(){return Vn}});var e=function(){return e=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=55296&&o<=57343){if(o>=55296&&o<=56319&&n+1=56320&&a<=57343){l+=encodeURIComponent(e[n]+e[n+1]),n++;continue}l+="%EF%BF%BD"}else l+=encodeURIComponent(e[n]);return l}c.defaultChars=";/?:@&=+$,-_.!~*'()#",c.componentChars="-_.!~*'()";var p=c,f={},d={},h={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",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",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",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:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",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:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",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:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",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:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",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:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",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:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",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:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",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:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",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:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",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:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",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:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",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:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",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:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",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:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",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:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",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:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",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:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",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:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",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:""},g={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"},m={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},v={},y=a&&a.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(v,"__esModule",{value:!0});var b=y({0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}),w=String.fromCodePoint||function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)};v.default=function(e){return e>=55296&&e<=57343||e>1114111?"�":(e in b.default&&(e=b.default[e]),w(e))};var x=a&&a.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(d,"__esModule",{value:!0}),d.decodeHTML=d.decodeHTMLStrict=d.decodeXML=void 0;var k=x(h),C=x(g),L=x(m),T=x(v),N=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;function D(e){var t=E(e);return function(e){return String(e).replace(N,t)}}d.decodeXML=D(L.default),d.decodeHTMLStrict=D(k.default);var A=function(e,t){return e1?j(e):e.charCodeAt(0)).toString(16).toUpperCase()+";"}var _=new RegExp(O.source+"|"+z.source,"g");function V(e){return function(t){return t.replace(_,(function(t){return e[t]||U(t)}))}}S.escape=function(e){return e.replace(_,U)},S.escapeUTF8=function(e){return e.replace(O,U)},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.encodeHTML5=e.encodeHTML4=e.escapeUTF8=e.escape=e.encodeNonAsciiHTML=e.encodeHTML=e.encodeXML=e.encode=e.decodeStrict=e.decode=void 0;var t=d,r=S;e.decode=function(e,r){return(!r||r<=0?t.decodeXML:t.decodeHTML)(e)},e.decodeStrict=function(e,r){return(!r||r<=0?t.decodeXML:t.decodeHTMLStrict)(e)},e.encode=function(e,t){return(!t||t<=0?r.encodeXML:r.encodeHTML)(e)};var n=S;Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return n.encodeXML}}),Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return n.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return n.encodeNonAsciiHTML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return n.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return n.escapeUTF8}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return n.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return n.encodeHTML}});var i=d;Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return i.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return i.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return i.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return i.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return i.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return i.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return i.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return i.decodeXML}})}(f);var G="&(?:#x[a-f0-9]{1,6}|#[0-9]{1,7}|[a-z][a-z0-9]{1,31});",$=/[\\&]/,Z="[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]",W=new RegExp("\\\\"+Z+"|"+G,"gi"),X=new RegExp('[&<>"]',"g"),K=function(e){return 92===e.charCodeAt(0)?e.charAt(1):f.decodeHTML(e)};function Y(e){return $.test(e)?e.replace(W,K):e}function Q(e){try{return p(e)}catch(t){return e}}function J(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return e}}function ee(e){return X.test(e)?e.replace(X,J):e}function te(e,t){for(var r=[],n=0;n`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*/?>",Se=""+Ae+"\\s*[>]",Me=new RegExp("^(?:<[A-Za-z][A-Za-z0-9-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*/?>|[A-Za-z][A-Za-z0-9-]*\\s*[>]|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|[<][?].*?[?][>]|]*>|)","i");if(String.fromCodePoint)De=function(e){try{return String.fromCodePoint(e)}catch(e){if(e instanceof RangeError)return String.fromCharCode(65533);throw e}};else{var Re=String.fromCharCode,Oe=Math.floor;De=function(){for(var e=[],t=0;t1114111||Oe(u)!==u)return String.fromCharCode(65533);u<=65535?o.push(u):(r=55296+((u-=65536)>>10),n=u%1024+56320,o.push(r,n)),(a+1===s||o.length>i)&&(l+=Re.apply(void 0,o),o.length=0)}return l}}var qe=De;function Fe(e){var t=/\)+$/.exec(e);if(t){for(var r=0,n=0,i=e;n?@\[\]\\^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/),We=new RegExp('^(?:"('+$e+'|[^"\\x00])*"|\'('+$e+"|[^'\\x00])*'|\\(("+$e+"|[^()\\x00])*\\))"),Xe=/^(?:<(?:[^<>\n\\\x00]|\\.)*>)/,Ke=new RegExp("^"+Z),Ye=new RegExp("^"+G,"i"),Qe=/`+/,Je=/^`+/,et=/\.\.\./g,tt=/--+/g,rt=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,nt=/^<[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\x00-\x20]*>/i,it=/^ *(?:\n *)?/,ot=/^[ \t\n\x0b\x0c\x0d]/,at=/^\s/,st=/ *$/,lt=/^ */,ut=/^ *(?:\n|$)/,ct=/^\[(?:[^\\\[\]]|\\.){0,1000}\]/,pt=/^[^\n`\[\]\\!<&*_'"~$]+/m,ft=function(){function e(e){this.subject="",this.delimiters=null,this.brackets=null,this.pos=0,this.lineStartNum=0,this.lineIdx=0,this.lineOffsets=[0],this.linePosOffset=0,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.options=e}return e.prototype.sourcepos=function(e,t){var r=this.linePosOffset+this.lineOffsets[this.lineIdx],n=this.lineStartNum+this.lineIdx,i=[n,e+r];return"number"==typeof t?[i,[n,t+r]]:i},e.prototype.nextLine=function(){this.lineIdx+=1,this.linePosOffset=-this.pos},e.prototype.match=function(e){var t=e.exec(this.subject.slice(this.pos));return null===t?null:(this.pos+=t.index+t[0].length,t[0])},e.prototype.peek=function(){return this.pos1){var l=He(s);this.lineIdx+=s.length-1,this.linePosOffset=-(this.pos-l.length-r.length),a[1]=this.sourcepos(this.pos),o=s.join(" ")}var u=xe("code",a);return o.length>0&&null!==o.match(/[^ ]/)&&" "==o[0]&&" "==o[o.length-1]?u.literal=o.slice(1,o.length-1):u.literal=o,u.tickCount=r.length,e.appendChild(u),!0}return this.pos=i,e.appendChild(Ne(r,this.sourcepos(t,this.pos-1))),!0},e.prototype.parseBackslash=function(e){var t,r=this.subject;this.pos+=1;var n=this.pos;return 10===this.peek()?(this.pos+=1,t=xe("linebreak",this.sourcepos(this.pos-1,this.pos)),e.appendChild(t),this.nextLine()):Ke.test(r.charAt(this.pos))?(e.appendChild(Ne(r.charAt(this.pos),this.sourcepos(n,this.pos))),this.pos+=1):e.appendChild(Ne("\\",this.sourcepos(n,n))),!0},e.prototype.parseAutolink=function(e){var t,r,n,i=this.pos+1;return(t=this.match(rt))?(r=t.slice(1,t.length-1),(n=xe("link",this.sourcepos(i,this.pos))).destination=Q("mailto:"+r),n.title="",n.appendChild(Ne(r,this.sourcepos(i+1,this.pos-1))),e.appendChild(n),!0):!!(t=this.match(nt))&&(r=t.slice(1,t.length-1),(n=xe("link",this.sourcepos(i,this.pos))).destination=Q(r),n.title="",n.appendChild(Ne(r,this.sourcepos(i+1,this.pos-1))),e.appendChild(n),!0)},e.prototype.parseHtmlTag=function(e){var t=this.pos+1,r=this.match(Me);if(null===r)return!1;var n=xe("htmlInline",this.sourcepos(t,this.pos));return n.literal=r,e.appendChild(n),!0},e.prototype.scanDelims=function(e){var t=0,r=this.pos;if(e===_e||e===Ve)t++,this.pos++;else for(;this.peek()===e;)t++,this.pos++;if(0===t||t<2&&(e===Ue||e===Ge))return this.pos=r,null;var n,i=0===r?"\n":this.subject.charAt(r-1),o=this.peek();n=-1===o?"\n":qe(o);var a,s,l=at.test(n),u=Ze.test(n),c=at.test(i),p=Ze.test(i),f=!l&&(!u||c||p),d=!c&&(!p||l||u);return 95===e?(a=f&&(!d||p),s=d&&(!f||u)):e===_e||e===Ve?(a=f&&!d,s=d):e===Ge?(a=!l,s=!c):(a=f,s=d),this.pos=r,{numdelims:t,canOpen:a,canClose:s}},e.prototype.handleDelim=function(e,t){var r=this.scanDelims(e);if(!r)return!1;var n=r.numdelims,i=this.pos+1;this.pos+=n;var o=Ne(e===_e?"’":e===Ve?"“":this.subject.slice(i-1,this.pos),this.sourcepos(i,this.pos));return t.appendChild(o),(r.canOpen||r.canClose)&&(this.options.smart||e!==_e&&e!==Ve)&&(this.delimiters={cc:e,numdelims:n,origdelims:n,node:o,previous:this.delimiters,next:null,canOpen:r.canOpen,canClose:r.canClose},this.delimiters.previous&&(this.delimiters.previous.next=this.delimiters)),!0},e.prototype.removeDelimiter=function(e){null!==e.previous&&(e.previous.next=e.next),null===e.next?this.delimiters=e.previous:e.next.previous=e.previous},e.prototype.removeDelimitersBetween=function(e,t){e.next!==t&&(e.next=t,t.previous=e)},e.prototype.processEmphasis=function(e){var t,r,n,i,o,a,s,l=!1,u=((t={})[95]=[e,e,e],t[42]=[e,e,e],t[39]=[e],t[34]=[e],t[126]=[e],t[36]=[e],t);for(n=this.delimiters;null!==n&&n.previous!==e;)n=n.previous;for(;null!==n;){var c=n.cc,p=95===c||42===c;if(n.canClose){for(r=n.previous,s=!1;null!==r&&r!==e&&r!==u[c][p?n.origdelims%3:0];){if(l=p&&(n.canOpen||r.canClose)&&n.origdelims%3!=0&&(r.origdelims+n.origdelims)%3==0,r.cc===n.cc&&r.canOpen&&!l){s=!0;break}r=r.previous}if(i=n,p||c===Ue||c===Ge)if(s){if(r){var f=n.numdelims>=2&&r.numdelims>=2?2:1,d=p?0:1;o=r.node,a=n.node;var h=p?1===f?"emph":"strong":"strike";c===Ge&&(h="customInline");var g=xe(h),m=o.sourcepos[1],v=a.sourcepos[0];g.sourcepos=[[m[0],m[1]-f+1],[v[0],v[1]+f-1]],o.sourcepos[1][1]-=f,a.sourcepos[0][1]+=f,o.literal=o.literal.slice(f),a.literal=a.literal.slice(f),r.numdelims-=f,n.numdelims-=f;for(var y=o.next,b=void 0;y&&y!==a;)b=y.next,y.unlink(),g.appendChild(y),y=b;if(c===Ge){var w=g.firstChild,x=w.literal||"",k=x.split(/\s/)[0];g.info=k,x.length<=k.length?w.unlink():(w.sourcepos[0][1]+=k.length,w.literal=x.replace(k+" ",""))}if(o.insertAfter(g),this.removeDelimitersBetween(r,n),r.numdelims<=d&&(0===r.numdelims&&o.unlink(),this.removeDelimiter(r)),n.numdelims<=d){0===n.numdelims&&a.unlink();var C=n.next;this.removeDelimiter(n),n=C}}}else n=n.next;else c===_e?(n.node.literal="’",s&&(r.node.literal="‘"),n=n.next):c===Ve&&(n.node.literal="”",s&&(r.node.literal="“"),n=n.next);s||(u[c][p?i.origdelims%3:0]=i.previous,i.canOpen||this.removeDelimiter(i))}else n=n.next}for(;null!==this.delimiters&&this.delimiters!==e;)this.removeDelimiter(this.delimiters)},e.prototype.parseLinkTitle=function(){var e=this.match(We);return null===e?null:Y(e.substr(1,e.length-2))},e.prototype.parseLinkDestination=function(){var e=this.match(Xe);if(null===e){if(60===this.peek())return null;for(var t=this.pos,r=0,n=void 0;-1!==(n=this.peek());)if(92===n&&Ke.test(this.subject.charAt(this.pos+1)))this.pos+=1,-1!==this.peek()&&(this.pos+=1);else if(40===n)this.pos+=1,r+=1;else if(41===n){if(r<1)break;this.pos+=1,r-=1}else{if(null!==ot.exec(qe(n)))break;this.pos+=1}return this.pos===t&&41!==n||0!==r?null:Q(Y(e=this.subject.substr(t,this.pos-t)))}return Q(Y(e.substr(1,e.length-2)))},e.prototype.parseLinkLabel=function(){var e=this.match(ct);return null===e||e.length>1001?0:e.length},e.prototype.parseOpenBracket=function(e){var t=this.pos;this.pos+=1;var r=Ne("[",this.sourcepos(this.pos,this.pos));return e.appendChild(r),this.addBracket(r,t,!1),!0},e.prototype.parseBang=function(e){var t=this.pos;if(this.pos+=1,91===this.peek()){this.pos+=1;var r=Ne("![",this.sourcepos(this.pos-1,this.pos));e.appendChild(r),this.addBracket(r,t+1,!0)}else{r=Ne("!",this.sourcepos(this.pos,this.pos));e.appendChild(r)}return!0},e.prototype.parseCloseBracket=function(e){var t=null,r=null,n=!1;this.pos+=1;var i=this.pos,o=this.brackets;if(null===o)return e.appendChild(Ne("]",this.sourcepos(i,i))),!0;if(!o.active)return e.appendChild(Ne("]",this.sourcepos(i,i))),this.removeBracket(),!0;var a=o.image,s=this.pos;40===this.peek()&&(this.pos++,this.spnl()&&null!==(t=this.parseLinkDestination())&&this.spnl()&&(ot.test(this.subject.charAt(this.pos-1))&&(r=this.parseLinkTitle()),1)&&this.spnl()&&41===this.peek()?(this.pos+=1,n=!0):this.pos=s);var l="";if(!n){var u=this.pos,c=this.parseLinkLabel();if(c>2?l=this.subject.slice(u,u+c):o.bracketAfter||(l=this.subject.slice(o.index,i)),0===c&&(this.pos=s),l){l=Pe(l);var p=this.refMap[l];p&&(t=p.destination,r=p.title,n=!0)}}if(n){var f=xe(a?"image":"link");f.destination=t,f.title=r||"",f.sourcepos=[o.startpos,this.sourcepos(this.pos)];for(var d=o.node.next,h=void 0;d;)h=d.next,d.unlink(),f.appendChild(d),d=h;if(e.appendChild(f),this.processEmphasis(o.previousDelimiter),this.removeBracket(),o.node.unlink(),!a)for(o=this.brackets;null!==o;)o.image||(o.active=!1),o=o.previous;return this.options.referenceDefinition&&(this.refLinkCandidateMap[e.id]={node:e,refLabel:l}),!0}return this.removeBracket(),this.pos=i,e.appendChild(Ne("]",this.sourcepos(i,i))),this.options.referenceDefinition&&(this.refLinkCandidateMap[e.id]={node:e,refLabel:l}),!0},e.prototype.addBracket=function(e,t,r){null!==this.brackets&&(this.brackets.bracketAfter=!0),this.brackets={node:e,startpos:this.sourcepos(t+(r?0:1)),previous:this.brackets,previousDelimiter:this.delimiters,index:t,image:r,active:!0}},e.prototype.removeBracket=function(){this.brackets&&(this.brackets=this.brackets.previous)},e.prototype.parseEntity=function(e){var t,r=this.pos+1;return!!(t=this.match(Ye))&&(e.appendChild(Ne(f.decodeHTML(t),this.sourcepos(r,this.pos))),!0)},e.prototype.parseString=function(e){var t,r=this.pos+1;if(t=this.match(pt)){if(this.options.smart){var n=t.replace(et,"…").replace(tt,(function(e){var t=0,r=0;return e.length%3==0?r=e.length/3:e.length%2==0?t=e.length/2:e.length%3==2?(t=1,r=(e.length-2)/3):(t=2,r=(e.length-4)/3),te("—",r)+te("–",t)}));e.appendChild(Ne(n,this.sourcepos(r,this.pos)))}else{var i=Ne(t,this.sourcepos(r,this.pos));e.appendChild(i)}return!0}return!1},e.prototype.parseNewline=function(e){this.pos+=1;var t=e.lastChild;if(t&&"text"===t.type&&" "===t.literal[t.literal.length-1]){var r=" "===t.literal[t.literal.length-2],n=t.literal.length;t.literal=t.literal.replace(st,"");var i=n-t.literal.length;t.sourcepos[1][1]-=i,e.appendChild(xe(r?"linebreak":"softbreak",this.sourcepos(this.pos-i,this.pos)))}else e.appendChild(xe("softbreak",this.sourcepos(this.pos,this.pos)));return this.nextLine(),this.match(lt),!0},e.prototype.parseReference=function(e,t){if(!this.options.referenceDefinition)return 0;this.subject=e.stringContent,this.pos=0;var r=null,n=this.pos,i=this.parseLinkLabel();if(0===i)return 0;var o=this.subject.substr(0,i);if(58!==this.peek())return this.pos=n,0;this.pos++,this.spnl();var a=this.parseLinkDestination();if(null===a)return this.pos=n,0;var s=this.pos;this.spnl(),this.pos!==s&&(r=this.parseLinkTitle()),null===r&&(r="",this.pos=s);var l=!0;if(null===this.match(ut)&&(""===r?l=!1:(r="",this.pos=s,l=null!==this.match(ut))),!l)return this.pos=n,0;var u=Pe(o);if(""===u)return this.pos=n,0;var c=this.getReferenceDefSourcepos(e);e.sourcepos[0][0]=c[1][0]+1;var p=xe("refDef",c);return p.title=r,p.dest=a,p.label=u,e.insertBefore(p),t[u]?this.refDefCandidateMap[p.id]=p:t[u]=or(p),this.pos-n},e.prototype.mergeTextNodes=function(e){for(var t,r=[];t=e.next();){var n=t.entering,i=t.node;if(n&&"text"===i.type)r.push(i);else if(1===r.length)r=[];else if(r.length>1){var o=r[0],a=r[r.length-1];o.sourcepos&&a.sourcepos&&(o.sourcepos[1]=a.sourcepos[1]),o.next=a.next,o.next&&(o.next.prev=o);for(var s=1;sa&&p.push(Ne(i.substring(a,g[0]),c(a,g[0]-1)));var y=xe("link",c.apply(void 0,g));y.appendChild(Ne(v,c.apply(void 0,g))),y.destination=m,y.extendedAutolink=!0,p.push(y),a=g[1]+1}a0&&bt(vt(r,e.offset));)e.advanceOffset(1,!0),i--;return 0},finalize:function(e,t){if(null!==t.stringContent){var r=t.stringContent,n=r.indexOf("\n"),i=r.slice(0,n),o=r.slice(n+1),a=i.match(/^(\s*)(.*)/);t.info=Y(a[2].trim()),t.literal=o,t.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},kt={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!0},Ct={continue:function(){return 0},finalize:function(e,t){for(var r=t.firstChild;r;){if(mt(r)&&r.next){t.listData.tight=!1;break}for(var n=r.firstChild;n;){if(mt(n)&&(r.next||n.next)){t.listData.tight=!1;break}n=n.next}r=r.next}},canContain:function(e){return"item"===e},acceptsLines:!1},Lt={continue:function(e,t){if(e.blank){if(null===t.firstChild)return 1;e.advanceNextNonspace()}else{if(!(e.indent>=t.listData.markerOffset+t.listData.padding))return 1;e.advanceOffset(t.listData.markerOffset+t.listData.padding,!0)}return 0},finalize:function(e,t){if(t.firstChild&&"paragraph"===t.firstChild.type){var r=t.firstChild,n=r.stringContent.match(dt);if(n){var i=n[0].length;r.stringContent=r.stringContent.substring(i-1),r.sourcepos[0][1]+=i,r.lineOffsets[0]+=i,t.listData.task=!0,t.listData.checked=/[xX]/.test(n[1])}}},canContain:function(e){return"item"!==e},acceptsLines:!1},Tt={continue:function(e,t){var r=e.currentLine,n=e.indent;if(t.isFenced){var i=n<=3&&r.charAt(e.nextNonspace)===t.fenceChar&&r.slice(e.nextNonspace).match(gt);if(i&&i[0].length>=t.fenceLength)return e.lastLineLength=e.offset+n+i[0].length,e.finalize(t,e.lineNumber),2;for(var o=t.fenceOffset;o>0&&bt(vt(r,e.offset));)e.advanceOffset(1,!0),o--}else if(n>=4)e.advanceOffset(4,!0);else{if(!e.blank)return 1;e.advanceNextNonspace()}return 0},finalize:function(e,t){var r;if(null!==t.stringContent){if(t.isFenced){var n=t.stringContent,i=n.indexOf("\n"),o=n.slice(0,i),a=n.slice(i+1),s=o.match(/^(\s*)(.*)/);t.infoPadding=s[1].length,t.info=Y(s[2].trim()),t.literal=a}else t.literal=null===(r=t.stringContent)||void 0===r?void 0:r.replace(/(\n *)+$/,"\n");t.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},Nt={continue:function(e){return e.blank?1:0},finalize:function(e,t){if(null!==t.stringContent){for(var r,n=!1;91===vt(t.stringContent,0)&&(r=e.inlineParser.parseReference(t,e.refMap));)t.stringContent=t.stringContent.slice(r),n=!0;n&&yt(t.stringContent)&&t.unlink()}},canContain:function(){return!1},acceptsLines:!0},Dt={document:{continue:function(){return 0},finalize:function(){},canContain:function(e){return"item"!==e},acceptsLines:!1},list:Ct,blockQuote:{continue:function(e){var t=e.currentLine;return e.indented||62!==vt(t,e.nextNonspace)?1:(e.advanceNextNonspace(),e.advanceOffset(1,!1),bt(vt(t,e.offset))&&e.advanceOffset(1,!0),0)},finalize:function(){},canContain:function(e){return"item"!==e},acceptsLines:!1},item:Lt,heading:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},thematicBreak:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},codeBlock:Tt,htmlBlock:{continue:function(e,t){return!e.blank||6!==t.htmlBlockType&&7!==t.htmlBlockType?0:1},finalize:function(e,t){var r;t.literal=(null===(r=t.stringContent)||void 0===r?void 0:r.replace(/(\n *)+$/,""))||null,t.stringContent=null},canContain:function(){return!1},acceptsLines:!0},paragraph:Nt,table:{continue:function(){return 0},finalize:function(){},canContain:function(e){return"tableHead"===e||"tableBody"===e},acceptsLines:!1},tableBody:{continue:function(){return 0},finalize:function(){},canContain:function(e){return"tableRow"===e},acceptsLines:!1},tableHead:{continue:function(){return 1},finalize:function(){},canContain:function(e){return"tableRow"===e||"tableDelimRow"===e},acceptsLines:!1},tableRow:{continue:function(){return 1},finalize:function(){},canContain:function(e){return"tableCell"===e},acceptsLines:!1},tableCell:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},tableDelimRow:{continue:function(){return 1},finalize:function(){},canContain:function(e){return"tableDelimCell"===e},acceptsLines:!1},tableDelimCell:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},refDef:kt,customBlock:xt,frontMatter:kt};function At(e){for(var t=0,r=0,n=[],i=0;i|$)/i,/^/,/\?>/,/>/,/\]\]>/],$t=/^[#`~*+_=<>0-9-;$]/,Zt=/\r\n|\n|\r/;function Wt(){return xe("document",[[1,1],[0,0]])}var Xt={smart:!1,tagFilter:!1,extendedAutolinks:!1,disallowedHtmlBlockTags:[],referenceDefinition:!1,disallowDeepHeading:!1,customParser:null,frontMatter:!1},Kt=function(){function e(e){this.options=i(i({},Xt),e),this.doc=Wt(),this.tip=this.doc,this.oldtip=this.doc,this.lineNumber=0,this.offset=0,this.column=0,this.nextNonspace=0,this.nextNonspaceColumn=0,this.indent=0,this.currentLine="",this.indented=!1,this.blank=!1,this.partiallyConsumedTab=!1,this.allClosed=!0,this.lastMatchedContainer=this.doc,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.lastLineLength=0,this.lines=[],this.options.frontMatter&&(Dt.frontMatter=Vt,jt.unshift(_t)),this.inlineParser=new ft(this.options)}return e.prototype.advanceOffset=function(e,t){void 0===t&&(t=!1);for(var r,n,i,o=this.currentLine;e>0&&(i=o[this.offset]);)"\t"===i?(r=4-this.column%4,t?(this.partiallyConsumedTab=r>e,n=r>e?e:r,this.column+=n,this.offset+=this.partiallyConsumedTab?0:1,e-=n):(this.partiallyConsumedTab=!1,this.column+=r,this.offset+=1,e-=1)):(this.partiallyConsumedTab=!1,this.offset+=1,this.column+=1,e-=1)},e.prototype.advanceNextNonspace=function(){this.offset=this.nextNonspace,this.column=this.nextNonspaceColumn,this.partiallyConsumedTab=!1},e.prototype.findNextNonspace=function(){for(var e,t=this.currentLine,r=this.offset,n=this.column;""!==(e=t.charAt(r));)if(" "===e)r++,n++;else{if("\t"!==e)break;r++,n+=4-n%4}this.blank="\n"===e||"\r"===e||""===e,this.nextNonspace=r,this.nextNonspaceColumn=n,this.indent=this.nextNonspaceColumn-this.column,this.indented=this.indent>=4},e.prototype.addLine=function(){if(this.partiallyConsumedTab){this.offset+=1;var e=4-this.column%4;this.tip.stringContent+=te(" ",e)}this.tip.lineOffsets?this.tip.lineOffsets.push(this.offset):this.tip.lineOffsets=[this.offset],this.tip.stringContent+=this.currentLine.slice(this.offset)+"\n"},e.prototype.addChild=function(e,t){for(;!Dt[this.tip.type].canContain(e);)this.finalize(this.tip,this.lineNumber-1);var r=t+1,n=xe(e,[[this.lineNumber,r],[0,0]]);return n.stringContent="",this.tip.appendChild(n),this.tip=n,n},e.prototype.closeUnmatchedBlocks=function(){if(!this.allClosed){for(;this.oldtip!==this.lastMatchedContainer;){var e=this.oldtip.parent;this.finalize(this.oldtip,this.lineNumber-1),this.oldtip=e}this.allClosed=!0}},e.prototype.finalize=function(e,t){var r=e.parent;e.open=!1,e.sourcepos[1]=[t,this.lastLineLength],Dt[e.type].finalize(this,e),this.tip=r},e.prototype.processInlines=function(e){var t,r=this.options.customParser,n=e.walker();for(this.inlineParser.refMap=this.refMap,this.inlineParser.refLinkCandidateMap=this.refLinkCandidateMap,this.inlineParser.refDefCandidateMap=this.refDefCandidateMap,this.inlineParser.options=this.options;t=n.next();){var i=t.node,o=t.entering,a=i.type;r&&r[a]&&r[a](i,{entering:o,options:this.options}),o||"paragraph"!==a&&"heading"!==a&&("tableCell"!==a||i.ignored)||this.inlineParser.parse(i)}},e.prototype.incorporateLine=function(e){var t=this.doc;this.oldtip=this.tip,this.offset=0,this.column=0,this.blank=!1,this.partiallyConsumedTab=!1,this.lineNumber+=1,-1!==e.indexOf("\0")&&(e=e.replace(/\0/g,"�")),this.currentLine=e;for(var r,n=!0;(r=t.lastChild)&&r.open;){switch(t=r,this.findNextNonspace(),Dt[t.type].continue(this,t)){case 0:break;case 1:n=!1;break;case 2:return void(this.lastLineLength=e.length);default:throw new Error("continue returned illegal value, must be 0, 1, or 2")}if(!n){t=t.parent;break}}this.allClosed=t===this.oldtip,this.lastMatchedContainer=t;for(var i="paragraph"!==t.type&&Dt[t.type].acceptsLines,o=jt.length;!i;){if(this.findNextNonspace(),"table"!==t.type&&"tableBody"!==t.type&&"paragraph"!==t.type&&!this.indented&&!$t.test(e.slice(this.nextNonspace))){this.advanceNextNonspace();break}for(var a=0;a=1&&t.htmlBlockType<=5&&Gt[t.htmlBlockType].test(this.currentLine.slice(this.offset))&&(this.lastLineLength=e.length,this.finalize(t,this.lineNumber))):this.offsett[0]?-1:e[1]t[1]?-1:0}function Qt(e,t){var r=e[0];return 1===Yt(e[1],t)?1:-1===Yt(r,t)?-1:0}function Jt(e,t){for(var r=0,n=t;rt?-1:0}function tr(e,t){for(var r=e.firstChild;r;){var n=er(r.sourcepos,t);if(0===n)return r;if(-1===n)return r.prev||r;r=r.next}return e.lastChild}function rr(e){return function(e){return ae[e]}(e)||null}function nr(e,t,r){if(void 0===r&&(r=null),t)for(var n=t.walker();t&&t!==r;){e(t);var i=n.next();if(!i)break;t=i.node}}var ir=/\r\n|\n|\r/;function or(e){return{id:e.id,title:e.title,sourcepos:e.sourcepos,unlinked:!1,destination:e.dest}}var ar=function(){function e(e,t){this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.referenceDefinition=!!(null==t?void 0:t.referenceDefinition),this.parser=new Kt(t),this.parser.setRefMaps(this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap),this.eventHandlerMap={change:[]},e=e||"",this.lineTexts=e.split(ir),this.root=this.parser.parse(e,this.lineTexts)}return e.prototype.updateLineTexts=function(e,t,r){var n,i=e[0],a=e[1],s=t[0],l=t[1],u=r.split(ir),c=u.length,p=this.lineTexts[i-1],f=this.lineTexts[s-1];u[0]=p.slice(0,a-1)+u[0],u[c-1]=u[c-1]+f.slice(l-1);var d=s-i+1;return(n=this.lineTexts).splice.apply(n,o([i-1,d],u)),c-d},e.prototype.updateRootNodeState=function(){if(1===this.lineTexts.length&&""===this.lineTexts[0])return this.root.lastLineBlank=!0,void(this.root.sourcepos=[[1,1],[1,0]]);this.root.lastChild&&(this.root.lastLineBlank=this.root.lastChild.lastLineBlank);for(var e=this.lineTexts,t=e.length-1;""===e[t];)t-=1;e.length-2>t&&(t+=1),this.root.sourcepos[1]=[t+1,e[t].length]},e.prototype.replaceRangeNodes=function(e,t,r){e?(Jt(e,r),function(e,t){if(e.parent===t.parent&&e!==t){for(var r=e.next;r&&r!==t;){for(var n=r.next,i=0,o=["parent","prev","next"];i=0;r-=1)e.prependChild(t[r])}(this.root,r)},e.prototype.getNodeRange=function(e,t){var r=tr(this.root,e[0]),n=tr(this.root,t[0]);return n&&n.next&&t[0]+1===n.next.sourcepos[0][0]&&(n=n.next),[r,n]},e.prototype.trigger=function(e,t){this.eventHandlerMap[e].forEach((function(e){e(t)}))},e.prototype.extendEndLine=function(e){for(;""===this.lineTexts[e];)e+=1;return e},e.prototype.parseRange=function(e,t,r,n){var i;e&&e.prev&&(Ce(e.prev)&&function(e){var t=e.match(/^[ \t]+/);if(t&&(t[0].length>=2||/\t/.test(t[0])))return!0;var r=t?e.slice(t.length):e;return Ht.test(r)||Pt.test(r)}(this.lineTexts[r-1])||"table"===e.prev.type&&(!yt(i=this.lineTexts[r-1])&&-1!==i.indexOf("|")))&&(r=(e=e.prev).sourcepos[0][0]);for(var o=this.lineTexts.slice(r-1,n),a=this.parser.partialParseStart(r,o),s=t?t.next:this.root.firstChild,l=a.lastChild,u=l&&ke(l)&&l.open,c=l&&Te(l)&&l.open,p=l&&Ce(l);(u||c)&&s||p&&s&&("list"===s.type||s.sourcepos[0][1]>=2);){var f=this.extendEndLine(s.sourcepos[1][0]);this.parser.partialParseExtends(this.lineTexts.slice(n,f)),e||(e=t),t=s,n=f,s=s.next}return this.parser.partialParseFinish(),{newNodes:function(e){for(var t=[],r=e.firstChild;r;)t.push(r),r=r.next;return t}(a),extStartNode:e,extEndNode:t}},e.prototype.getRemovedNodeRange=function(e,t){return!e||e&&Le(e)||t&&Le(t)?null:{id:[e.id,t.id],line:[e.sourcepos[0][0]-1,t.sourcepos[1][0]-1]}},e.prototype.markDeletedRefMap=function(e,t){var r=this;if(!je(this.refMap)){var n=function(e){if(Le(e)){var t=r.refMap[e.label];t&&e.id===t.id&&(t.unlinked=!0)}};e&&nr(n,e.parent,t),t&&nr(n,t)}},e.prototype.replaceWithNewRefDefState=function(e){var t=this;if(!je(this.refMap)){var r=function(e){if(Le(e)){var r=e.label,n=t.refMap[r];n&&!n.unlinked||(t.refMap[r]=or(e))}};e.forEach((function(e){nr(r,e)}))}},e.prototype.replaceWithRefDefCandidate=function(){var e=this;je(this.refDefCandidateMap)||ze(this.refDefCandidateMap,(function(t,r){var n=r.label,i=r.sourcepos,o=e.refMap[n];(!o||o.unlinked||o.sourcepos[0][0]>i[0][0])&&(e.refMap[n]=or(r))}))},e.prototype.getRangeWithRefDef=function(e,t,r,n,i){if(this.referenceDefinition&&!je(this.refMap)){var o=tr(this.root,e-1),a=tr(this.root,t+1);o&&Le(o)&&o!==r&&o!==n&&(e=(r=o).sourcepos[0][0]),a&&Le(a)&&a!==r&&a!==n&&(n=a,t=this.extendEndLine(n.sourcepos[1][0]+i))}return[r,n,e,t]},e.prototype.parse=function(e,t,r){void 0===r&&(r=0);var n=this.getNodeRange(e,t),i=n[0],o=n[1],a=i?Math.min(i.sourcepos[0][0],e[0]):e[0],s=this.extendEndLine((o?Math.max(o.sourcepos[1][0],t[0]):t[0])+r),l=this.parseRange.apply(this,this.getRangeWithRefDef(a,s,i,o,r)),u=l.newNodes,c=l.extStartNode,p=l.extEndNode,f=this.getRemovedNodeRange(c,p),d=p?p.next:this.root.firstChild;return this.referenceDefinition?(this.markDeletedRefMap(c,p),this.replaceRangeNodes(c,p,u),this.replaceWithNewRefDefState(u)):this.replaceRangeNodes(c,p,u),{nodes:u,removedNodeRange:f,nextNode:d}},e.prototype.parseRefLink=function(){var e=this,t=[];return je(this.refMap)||ze(this.refMap,(function(r,n){n.unlinked&&delete e.refMap[r],ze(e.refLinkCandidateMap,(function(n,i){var o=i.node;i.refLabel===r&&t.push(e.parse(o.sourcepos[0],o.sourcepos[1]))}))})),t},e.prototype.removeUnlinkedCandidate=function(){je(this.refDefCandidateMap)||[this.refLinkCandidateMap,this.refDefCandidateMap].forEach((function(e){ze(e,(function(t){(function(e){var t=rr(e);if(!t)return!0;for(;t&&"document"!==t.type;){if(!t.parent&&!t.prev&&!t.next)return!0;t=t.parent}return!1})(t)&&delete e[t]}))}))},e.prototype.editMarkdown=function(e,t,r){var n=this.updateLineTexts(e,t,r),o=this.parse(e,t,n),a=function(e){for(var t=[],r=1;r]*>)","ig");function lr(e){return sr.test(e)?e.replace(sr,(function(e,t){return"<"+t})):e}var ur={heading:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"h"+e.level,outerNewLine:!0}},text:function(e){return{type:"text",content:e.literal}},softbreak:function(e,t){return{type:"html",content:t.options.softbreak}},linebreak:function(){return{type:"html",content:" \n"}},emph:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"em"}},strong:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"strong"}},paragraph:function(e,t){var r,n=t.entering,i=null===(r=e.parent)||void 0===r?void 0:r.parent;return i&&"list"===i.type&&i.listData.tight?null:{type:n?"openTag":"closeTag",tagName:"p",outerNewLine:!0}},thematicBreak:function(){return{type:"openTag",tagName:"hr",outerNewLine:!0,selfClose:!0}},blockQuote:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"blockquote",outerNewLine:!0,innerNewLine:!0}},list:function(e,t){var r=t.entering,n=e.listData,i=n.type,o=n.start,a="bullet"===i?"ul":"ol",s={};return"ol"===a&&null!==o&&1!==o&&(s.start=o.toString()),{type:r?"openTag":"closeTag",tagName:a,attributes:s,outerNewLine:!0}},item:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"li",outerNewLine:!0}},htmlInline:function(e,t){return{type:"html",content:t.options.tagFilter?lr(e.literal):e.literal}},htmlBlock:function(e,t){var r=t.options,n=r.tagFilter?lr(e.literal):e.literal;return r.nodeId?[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"html",content:n},{type:"closeTag",tagName:"div",outerNewLine:!0}]:{type:"html",content:n,outerNewLine:!0}},code:function(e){return[{type:"openTag",tagName:"code"},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(e){var t=e.info,r=t?t.split(/\s+/):[],n=[];return r.length>0&&r[0].length>0&&n.push("language-"+ee(r[0])),[{type:"openTag",tagName:"pre",outerNewLine:!0},{type:"openTag",tagName:"code",classNames:n},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre",outerNewLine:!0}]},link:function(e,t){if(t.entering){var r=e,n=r.title,o=r.destination;return{type:"openTag",tagName:"a",attributes:i({href:ee(o)},n&&{title:ee(n)})}}return{type:"closeTag",tagName:"a"}},image:function(e,t){var r=t.getChildrenText,n=t.skipChildren,o=e,a=o.title,s=o.destination;return n(),{type:"openTag",tagName:"img",selfClose:!0,attributes:i({src:ee(s),alt:r(e)},a&&{title:ee(a)})}},customBlock:function(e,t,r){var n=e.info.trim().toLowerCase(),i=r[n];if(i)try{return i(e,t)}catch(e){console.warn("[@toast-ui/editor] - The error occurred when "+n+" block node was parsed in markdown renderer: "+e)}return[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"text",content:e.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},frontMatter:function(e){return[{type:"openTag",tagName:"div",outerNewLine:!0,attributes:{style:"white-space: pre; display: none;"}},{type:"text",content:e.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},customInline:function(e,t,r){var n=e,i=n.info,o=n.firstChild,a=i.trim().toLowerCase(),s=r[a],l=t.entering;if(s)try{return s(e,t)}catch(e){console.warn("[@toast-ui/editor] - The error occurred when "+a+" inline node was parsed in markdown renderer: "+e)}return l?[{type:"openTag",tagName:"span"},{type:"text",content:"$$"+i+(o?" ":"")}]:[{type:"text",content:"$$"},{type:"closeTag",tagName:"span"}]}},cr={strike:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"del"}},item:function(e,t){var r=t.entering,n=e.listData,o=n.checked,a=n.task;if(r){var s={type:"openTag",tagName:"li",outerNewLine:!0};return a?[s,{type:"openTag",tagName:"input",selfClose:!0,attributes:i(i({},o&&{checked:""}),{disabled:"",type:"checkbox"})},{type:"text",content:" "}]:s}return{type:"closeTag",tagName:"li",outerNewLine:!0}},table:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"table",outerNewLine:!0}},tableHead:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"thead",outerNewLine:!0}},tableBody:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"tbody",outerNewLine:!0}},tableRow:function(e,t){if(t.entering)return{type:"openTag",tagName:"tr",outerNewLine:!0};var r=[];if(e.lastChild)for(var n=e.parent.parent.columns.length,i=e.lastChild.endIdx+1;i0&&this.buffer.push(' class="'+n.join(" ")+'"'),i&&Object.keys(i).forEach((function(e){var r=i[e];t.buffer.push(" "+e+'="'+r+'"')})),e.selfClose&&this.buffer.push(" /"),this.buffer.push(">")},e.prototype.generateCloseTagString=function(e){var t=e.tagName;this.buffer.push(""+t+">")},e.prototype.addNewLine=function(){this.buffer.length&&"\n"!==He(He(this.buffer))&&this.buffer.push("\n")},e.prototype.addOuterNewLine=function(e){e.outerNewLine&&this.addNewLine()},e.prototype.addInnerNewLine=function(e){e.innerNewLine&&this.addNewLine()},e.prototype.renderTextNode=function(e){this.buffer.push(ee(e.content))},e.prototype.renderRawHtmlNode=function(e){this.addOuterNewLine(e),this.buffer.push(e.content),this.addOuterNewLine(e)},e.prototype.renderElementNode=function(e){"openTag"===e.type?(this.addOuterNewLine(e),this.generateOpenTagString(e),e.selfClose?this.addOuterNewLine(e):this.addInnerNewLine(e)):(this.addInnerNewLine(e),this.generateCloseTagString(e),this.addOuterNewLine(e))},e}(),hr=s(956),gr=s.n(hr),mr=s(969),vr=s.n(mr),yr=s(348),br=s.n(yr),wr=s(349),xr=s.n(wr),kr=s(204),Cr=s.n(kr),Lr=s(462),Tr=s.n(Lr),Nr=s(522),Dr=s.n(Nr),Ar=s(990),Er=s.n(Ar),Sr=s(322),Mr=s.n(Sr),Rr=s(758),Or=s.n(Rr),qr=s(929),Fr=s.n(qr),Br=s(714),Ir=s.n(Br),Hr=(s(471),"(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)"),Pr=new RegExp("^(?:<([A-Za-z][A-Za-z0-9-]*)((?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?))*\\s*/?>|([A-Za-z][A-Za-z0-9-]*)\\s*[>])","i");s(934),s(391),/Mac/.test(navigator.platform),new RegExp('[&<>"]',"g");function zr(e,t){return-1!==e.indexOf(t)}var jr=["rel","target","hreflang","type"];function Ur(e){return"object"==typeof e&&null!==e}function _r(t,r){var n=e({},t);return t&&r&&Object.keys(r).forEach((function(e){Ur(n[e])?Array.isArray(r[e])?n[e]=Vr(r[e]):n.hasOwnProperty(e)?n[e]=_r(n[e],r[e]):n[e]=Gr(r[e]):n[e]=r[e]})),n}function Vr(e){return e.map((function(e){return Ur(e)?Array.isArray(e)?Vr(e):Gr(e):e}))}function Gr(e){var t=Object.keys(e);return t.length?t.reduce((function(t,r){return Ur(e[r])?t[r]=Array.isArray(e[r])?Vr(e[r]):Gr(e[r]):t[r]=e[r],t}),{}):e}function $r(e,t){return void 0===t&&(t={}),Object.keys(t).forEach((function(r){e.hasOwnProperty(r)&&"object"==typeof e[r]?Array.isArray(t[r])?e[r]=t[r]:$r(e[r],t[r]):e[r]=t[r]})),e}function Zr(e,t){return e>t?[t,e]:[e,t]}var Wr="toastui-editor-";function Xr(){for(var e=[],t=0;t/.test(e.prev.literal)?"\n":" \n"}},item:function(e,t){if(t.entering){var r={},n=[];return e.listData.task&&(r["data-task"]="",n.push("task-list-item"),e.listData.checked&&(n.push("checked"),r["data-task-checked"]="")),{type:"openTag",tagName:"li",classNames:n,attributes:r,outerNewLine:!0}}return{type:"closeTag",tagName:"li",outerNewLine:!0}},code:function(e){return[{type:"openTag",tagName:"code",attributes:{"data-backticks":String(e.tickCount)}},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(e){var t=e,r=t.fenceLength,n=t.info,i=n?n.split(/\s+/):[],o=[],a={};if(r>3&&(a["data-backticks"]=r),i.length>0&&i[0].length>0){var s=i[0];o.push("lang-"+s),a["data-language"]=s}return[{type:"openTag",tagName:"pre",classNames:o},{type:"openTag",tagName:"code",attributes:a},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre"}]},customInline:function(e,t){var r=t.origin,n=t.entering,i=t.skipChildren,o=e.info;if(-1!==o.indexOf("widget")&&n){i();var a=function(e){for(var t,r="",n=e.walker();t=n.next();){var i=t.node;t.entering&&(i!==e&&"text"!==i.type?(r+=en(i),n.resumeAt(e,!1),n.next()):"text"===i.type&&(r+=i.literal))}return r}(e),s=function(e,t){var r=tn[e],n=r.rule,i=r.toDOM,o=nn(t).match(n);return o&&(t=o[0]),i(t)}(o,a).outerHTML;return[{type:"openTag",tagName:"span",classNames:["tui-widget"]},{type:"html",content:s},{type:"closeTag",tagName:"span"}]}return r()}};function fn(t,r){var n=e({},pn);return t&&(n.link=function(r,n){var i=n.entering,o=(0,n.origin)();return i&&(o.attributes=e(e({},o.attributes),t)),o}),r&&Object.keys(r).forEach((function(t){var i=n[t],o=r[t];i&&Jr()(o)?n[t]=function(t,r){var n=e({},r);return n.origin=function(){return i(t,r)},o(t,n)}:zr(["htmlBlock","htmlInline"],t)&&!Jr()(o)?n[t]=function(t,r){var n,i=t.literal.match(Pr);if(i){var a=i[0],s=i[1],l=i[3],u=(s||l).toLowerCase(),c=o[u],p=function(e,t){return e.literal.replace(new RegExp("(<\\s*"+t+"[^>]*>)|("+t+"\\s*[>])","ig"),"").trim()}(t,u);if(c){var f=e({},t);return f.attrs=(n=a.match(Pr)[0].match(new RegExp(Hr,"g")))?n.reduce((function(e,t){var r=t.trim().split("="),n=r[0],i=r.slice(1);return i.length&&(e[n]=i.join("=").replace(/'|"/g,"").trim()),e}),{}):{},f.childrenHTML=p,f.type=u,r.entering=!cn.test(t.literal),c(f,r)}}return r.origin()}:n[t]=o})),n}var dn=["UL","OL","BLOCKQUOTE"];function hn(e,t){for(var r=0;e&&e!==t&&(zr(dn,e.tagName)||(r+=e.offsetTop),e.offsetParent!==t.offsetParent);)e=e.parentElement;return r}function gn(e,t,r){return e&&t>r+e.offsetTop?gn(e.nextElementSibling,t,r)||e:null}var mn={};function vn(e){e&&(delete mn[Number(e.getAttribute("data-nodeid"))],Er()(e.children).forEach((function(e){vn(e)})))}var yn=Xr("md-preview-highlight");var bn=function(){function e(e,t){var r=document.createElement("div");this.el=r,this.eventEmitter=e,this.isViewer=!!t.isViewer,this.el.className=Xr("md-preview");var n=t.linkAttributes,i=t.customHTMLRenderer,o=t.sanitizer,a=t.highlight,s=void 0!==a&&a;this.renderer=new dr({gfm:!0,nodeId:!0,convertors:fn(n,i)}),this.cursorNodeId=null,this.sanitizer=o,this.initEvent(s),this.initContentSection(),this.isViewer&&(this.previewContent.style.overflowWrap="break-word")}return e.prototype.initContentSection=function(){this.previewContent=function(e,t){var r=document.createElement("div");Or()(e)?r.innerHTML=e:r.appendChild(e);var n=r.firstChild;return t&&t.appendChild(n),n}('
'),this.isViewer||this.el.appendChild(this.previewContent)},e.prototype.toggleActive=function(e){Yr(this.el,"active",e)},e.prototype.initEvent=function(e){var t=this;this.eventEmitter.listen("updatePreview",this.update.bind(this)),this.isViewer||(e&&(this.eventEmitter.listen("changeToolbarState",(function(e){var r=e.mdNode,n=e.cursorPos;t.updateCursorNode(r,n)})),this.eventEmitter.listen("blur",(function(){t.removeHighlight()}))),br()(this.el,"scroll",(function(e){t.eventEmitter.emit("scroll","preview",function(e,t){for(var r=t,n=null;r;){var i=r.firstElementChild;if(!i)break;n=r,r=gn(i,e,hn(r,t))}var o=r||n;return o===t?null:o}(e.target.scrollTop,t.previewContent))})),this.eventEmitter.listen("changePreviewTabPreview",(function(){return t.toggleActive(!0)})),this.eventEmitter.listen("changePreviewTabWrite",(function(){return t.toggleActive(!1)})))},e.prototype.removeHighlight=function(){if(this.cursorNodeId){var e=this.getElementByNodeId(this.cursorNodeId);e&&Tr()(e,yn)}},e.prototype.updateCursorNode=function(e,t){e&&("tableRow"===(e=function(e,t,r){for(void 0===r&&(r=!0),e=r?e:e.parent;e&&"document"!==e.type;){if(t(e))return e;e=e.parent}return null}(e,(function(e){return!function(e){switch(e.type){case"code":case"text":case"emph":case"strong":case"strike":case"link":case"image":case"htmlInline":case"linebreak":case"softbreak":case"customInline":return!0;default:return!1}}(e)}))).type?e=function(e,t){for(var r=e.firstChild;r&&r.next&&!(r.next.sourcepos[0][1]>t+1);)r=r.next;return r}(e,t[1]):"tableBody"===e.type&&(e=null));var r=e?e.id:null;if(this.cursorNodeId!==r){var n=this.getElementByNodeId(this.cursorNodeId),i=this.getElementByNodeId(r);n&&Tr()(n,yn),i&&Cr()(i,yn),this.cursorNodeId=r}},e.prototype.getElementByNodeId=function(e){return e?this.previewContent.querySelector('[data-nodeid="'+e+'"]'):null},e.prototype.update=function(e){var t=this;e.forEach((function(e){return t.replaceRangeNodes(e)})),this.eventEmitter.emit("afterPreviewRender",this)},e.prototype.replaceRangeNodes=function(e){var t=this,r=e.nodes,n=e.removedNodeRange,i=this.previewContent,o=this.eventEmitter.emitReduce("beforePreviewRender",this.sanitizer(r.map((function(e){return t.renderer.render(e)})).join("")));if(n){var a=n.id,s=a[0],l=a[1],u=this.getElementByNodeId(s),c=this.getElementByNodeId(l);if(u){u.insertAdjacentHTML("beforebegin",o);for(var p=u;p&&p!==c;){var f=p.nextElementSibling;Kr(p),vn(p),p=f}(null==p?void 0:p.parentNode)&&(Kr(p),vn(p))}}else i.insertAdjacentHTML("afterbegin",o)},e.prototype.getRenderer=function(){return this.renderer},e.prototype.destroy=function(){xr()(this.el,"scroll"),this.el=null},e.prototype.getElement=function(){return this.el},e.prototype.getHTML=function(){return this.previewContent.innerHTML.replace(/ /g,"").replace(/ class="ProseMirror-trailingBreak"/g,"")},e.prototype.setHTML=function(e){this.previewContent.innerHTML=e},e.prototype.setHeight=function(e){Dr()(this.el,{height:e+"px"})},e.prototype.setMinHeight=function(e){Dr()(this.el,{minHeight:e+"px"})},e}(),wn=bn,xn=s(814),kn=s(479),Cn=s(311),Ln=s(481),Tn=s(43),Nn=s(928),Dn=s.n(Nn),An=function(){function e(){this.keys=[],this.values=[]}return e.prototype.getKeyIndex=function(e){return Dn()(e,this.keys)},e.prototype.get=function(e){return this.values[this.getKeyIndex(e)]},e.prototype.set=function(e,t){var r=this.getKeyIndex(e);return r>-1?this.values[r]=t:(this.keys.push(e),this.values.push(t)),this},e.prototype.has=function(e){return this.getKeyIndex(e)>-1},e.prototype.delete=function(e){var t=this.getKeyIndex(e);return t>-1&&(this.keys.splice(t,1),this.values.splice(t,1),!0)},e.prototype.forEach=function(e,t){var r=this;void 0===t&&(t=this),this.values.forEach((function(n,i){n&&r.keys[i]&&e.call(t,n,r.keys[i],r)}))},e.prototype.clear=function(){this.keys=[],this.values=[]},e}(),En="en-US",Sn=new(function(){function e(){this.code=En,this.langs=new An}return e.prototype.setCode=function(e){this.code=e||En},e.prototype.setLanguage=function(e,t){var r=this;(e=[].concat(e)).forEach((function(e){if(r.langs.has(e)){var n=r.langs.get(e);r.langs.set(e,vr()(n,t))}else r.langs.set(e,t)}))},e.prototype.get=function(e,t){t||(t=this.code);var r=this.langs.get(t);r||(r=this.langs.get(En));var n=r[e];if(!n)throw new Error('There is no text key "'+e+'" in '+t);return n},e}());function Mn(e,t){for(var r=e.depth;r;){var n=e.node(r);if(t(n,r))return{node:n,depth:r,offset:r>0?e.before(r):0};r-=1}return null}var Rn=new Map,On=function(){function e(e,t,r,n){this.table=e,this.tableRows=t,this.tableStartPos=r,this.rowInfo=n}return e.create=function(t){var r=Mn(t,(function(e){return"table"===e.type.name}));if(r){var n=r.node,i=r.depth,o=r.offset,a=Rn.get(n);if((null==a?void 0:a.tableStartPos)===o+1)return a;var s=[],l=t.start(i),u=n.child(0),c=n.child(1),p=qn(u,l),f=qn(c,l+u.nodeSize);u.forEach((function(e){return s.push(e)})),c.forEach((function(e){return s.push(e)}));var d=new e(n,s,l,p.concat(f));return Rn.set(n,d),d}return null},Object.defineProperty(e.prototype,"totalRowCount",{get:function(){return this.rowInfo.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalColumnCount",{get:function(){return this.rowInfo[0].length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tableStartOffset",{get:function(){return this.tableStartPos},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tableEndOffset",{get:function(){return this.tableStartPos+this.table.nodeSize-1},enumerable:!1,configurable:!0}),e.prototype.getCellInfo=function(e,t){return this.rowInfo[e][t]},e.prototype.posAt=function(e,t){for(var r=0,n=this.tableStartPos;;r+=1){var i=n+this.tableRows[r].nodeSize;if(r===e){for(var o=t;oe.pos)return[t,n];return[0,0]},e.prototype.getRectOffsets=function(e,t){var r,n,i;void 0===t&&(t=e),e.pos>t.pos&&(e=(r=[t,e])[0],t=r[1]);var o=this.getCellIndex(e),a=o[0],s=o[1],l=this.getCellIndex(t),u=l[0],c=l[1];return a=(n=Zr(a,u))[0],u=n[1],s=(i=Zr(s,c))[0],c=i[1],this.getSpannedOffsets({startRowIdx:a,startColIdx:s,endRowIdx:u,endColIdx:c})},e.prototype.getSpannedOffsets=function(e){return e},e}(),qn=function(e,t){var r=[];return e.forEach((function(e,n){var i={rowspanMap:{},colspanMap:{},length:0};e.forEach((function(e,r){for(var o=e.nodeSize,a=0;i[a];)a+=1;i[a]={offset:t+n+r+2,nodeSize:o},i.length+=1})),r.push(i)})),r};function Fn(e,t){return $r(On.prototype,e),qn=t,On}function Bn(t){var r=t.plugins,n=t.eventEmitter,i=t.usageStatistics,o=t.instance;return n.listen("mixinTableOffsetMapPrototype",Fn),(null!=r?r:[]).reduce((function(t,r){var a=function(e){var t=e.plugin,r={eventEmitter:e.eventEmitter,usageStatistics:e.usageStatistics,instance:e.instance,pmState:{Plugin:xn.Plugin,PluginKey:xn.PluginKey,Selection:xn.Selection,TextSelection:xn.TextSelection},pmView:{Decoration:Cn.Decoration,DecorationSet:Cn.DecorationSet},pmModel:{Fragment:Tn.Fragment},pmRules:{InputRule:kn.InputRule,inputRules:kn.inputRules,undoInputRule:kn.undoInputRule},pmKeymap:{keymap:Ln.keymap},i18n:Sn};if(Mr()(t)){var n=t[0],i=t[1];return n(r,void 0===i?{}:i)}return t(r)}({plugin:r,eventEmitter:n,usageStatistics:i,instance:o});if(!a)throw new Error("The return value of the executed plugin is empty.");var s=a.markdownParsers,l=a.toHTMLRenderers,u=a.toMarkdownRenderers,c=a.markdownPlugins,p=a.wysiwygPlugins,f=a.wysiwygNodeViews,d=a.markdownCommands,h=a.wysiwygCommands,g=a.toolbarItems;return l&&(t.toHTMLRenderers=_r(t.toHTMLRenderers,l)),u&&(t.toMarkdownRenderers=_r(t.toMarkdownRenderers,u)),c&&(t.mdPlugins=t.mdPlugins.concat(c)),p&&(t.wwPlugins=t.wwPlugins.concat(p)),f&&(t.wwNodeViews=e(e({},t.wwNodeViews),f)),d&&(t.mdCommands=e(e({},t.mdCommands),d)),h&&(t.wwCommands=e(e({},t.wwCommands),h)),g&&(t.toolbarItems=t.toolbarItems.concat(g)),s&&(t.markdownParsers=e(e({},t.markdownParsers),s)),t}),{toHTMLRenderers:{},toMarkdownRenderers:{},mdPlugins:[],wwPlugins:[],wwNodeViews:{},mdCommands:{},wwCommands:{},toolbarItems:[],markdownParsers:{}})}var In=s(404),Hn=s.n(In),Pn=["afterPreviewRender","updatePreview","changeMode","needChangeMode","command","changePreviewStyle","changePreviewTabPreview","changePreviewTabWrite","scroll","contextmenu","show","hide","changeLanguage","changeToolbarState","toggleScrollSync","mixinTableOffsetMapPrototype","setFocusedNode","removePopupWidget","query","openPopup","closePopup","addImageBlobHook","beforePreviewRender","beforeConvertWysiwygToMarkdown","load","loadUI","change","caretChange","destroy","focus","blur","keydown","keyup"],zn=function(){function r(){var t=this;this.events=new An,this.eventTypes=Pn.reduce((function(t,r){return e(e({},t),{type:r})}),{}),this.hold=!1,Pn.forEach((function(e){t.addEventType(e)}))}return r.prototype.listen=function(e,t){var r=this.getTypeInfo(e),n=this.events.get(r.type)||[];if(!this.hasEventType(r.type))throw new Error("There is no event type "+r.type);r.namespace&&(t.namespace=r.namespace),n.push(t),this.events.set(r.type,n)},r.prototype.emit=function(e){for(var t=[],r=1;r=0&&r.splice(n,1)}},r.prototype.removeEventHandlerWithTypeInfo=function(e,t){var r=[],n=this.events.get(e);n&&(n.map((function(e){return e.namespace!==t&&r.push(e),null})),this.events.set(e,r))},r.prototype.getEvents=function(){return this.events},r.prototype.holdEventInvoke=function(e){this.hold=!0,e(),this.hold=!1},r}(),jn=zn;function Un(e){["htmlBlock","htmlInline"].forEach((function(t){e[t]&&Object.keys(e[t]).forEach((function(e){var t;zr(sn,t=e)&&ln.push(t.toLowerCase())}))}))}var _n=function(){function t(t){var r=this;this.options=vr()({linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,usageStatistics:!0,theme:"light"},t),this.eventEmitter=new jn;var n=function(e){if(!e)return null;var t={};return jr.forEach((function(r){Fr()(e[r])||(t[r]=e[r])})),t}(this.options.linkAttributes),i=Bn({plugins:this.options.plugins,eventEmitter:this.eventEmitter,usageStatistics:this.options.usageStatistics,instance:this})||{},o=i.toHTMLRenderers,a=i.markdownParsers,s=this.options,l=s.customHTMLRenderer,u=s.extendedAutolinks,c=s.referenceDefinition,p=s.frontMatter,f=s.customHTMLSanitizer,d={linkAttributes:n,customHTMLRenderer:e(e({},o),l),extendedAutolinks:u,referenceDefinition:c,frontMatter:p,sanitizer:f||un};Un(d.customHTMLRenderer),this.options.events&&gr()(this.options.events,(function(e,t){r.on(t,e)}));var h=this.options,g=h.el,m=h.initialValue,v=h.theme,y=g.innerHTML;"light"!==v&&g.classList.add(Xr(v)),g.innerHTML="",this.toastMark=new ar("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:u,referenceDefinition:c,disallowDeepHeading:!0,frontMatter:p,customParser:a}),this.preview=new wn(this.eventEmitter,e(e({},d),{isViewer:!0})),br()(this.preview.previewContent,"mousedown",this.toggleTask.bind(this)),m?this.setMarkdown(m):y&&this.preview.setHTML(y),g.appendChild(this.preview.previewContent),this.eventEmitter.emit("load",this)}return t.prototype.toggleTask=function(e){var t=e.target,r=getComputedStyle(t,":before");!t.hasAttribute("data-task-disabled")&&t.hasAttribute("data-task")&&function(e,t,r){var n=parseInt(e.left,10),i=parseInt(e.top,10),o=parseInt(e.width,10)+parseInt(e.paddingLeft,10)+parseInt(e.paddingRight,10),a=parseInt(e.height,10)+parseInt(e.paddingTop,10)+parseInt(e.paddingBottom,10);return t>=n&&t<=n+o&&r>=i&&r<=i+a}(r,e.offsetX,e.offsetY)&&(Yr(t,"checked"),this.eventEmitter.emit("change",{source:"viewer",date:e}))},t.prototype.setMarkdown=function(e){var t,r=this.toastMark.getLineTexts(),n=[r.length,(t=r)[t.length-1].length+1],i=this.toastMark.editMarkdown([1,1],n,e||"");this.eventEmitter.emit("updatePreview",i)},t.prototype.on=function(e,t){this.eventEmitter.listen(e,t)},t.prototype.off=function(e){this.eventEmitter.removeEventHandler(e)},t.prototype.addHook=function(e,t){this.eventEmitter.removeEventHandler(e),this.eventEmitter.listen(e,t)},t.prototype.destroy=function(){xr()(this.preview.el,"mousedown",this.toggleTask.bind(this)),this.preview.destroy(),this.eventEmitter.emit("destroy")},t.prototype.isViewer=function(){return!0},t.prototype.isMarkdownMode=function(){return!1},t.prototype.isWysiwygMode=function(){return!1},t}(),Vn=_n}(),l=l.default}()}));
\ No newline at end of file
diff --git a/src/ttfrog/themes/default/static/viewer/viewer.css b/src/ttfrog/themes/default/static/viewer/viewer.css
deleted file mode 100644
index 764567c..0000000
--- a/src/ttfrog/themes/default/static/viewer/viewer.css
+++ /dev/null
@@ -1,9 +0,0 @@
-@import 'toastui-editor-viewer.min.css';
-
-#viewer {
- display: inline;
-}
-
-.toastui-editor-contents {
- font-size: var(--default-font-size);
-}
diff --git a/src/ttfrog/themes/default/static/viewer/viewer.js b/src/ttfrog/themes/default/static/viewer/viewer.js
deleted file mode 100644
index 8fc65e4..0000000
--- a/src/ttfrog/themes/default/static/viewer/viewer.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var viewer = new toastui.Editor({
- viewer: true,
- el: document.querySelector("#viewer"),
- usageStatistics: false,
-});
-viewer.setMarkdown(document.getElementById("data_form__body").value);
diff --git a/src/ttfrog/web.py b/src/ttfrog/web.py
index 2e07c11..1f07f70 100644
--- a/src/ttfrog/web.py
+++ b/src/ttfrog/web.py
@@ -123,10 +123,13 @@ def view(table, path):
clean_table = re.sub(r"[^a-zA-Z0-9]", "", unquote(table))
clean_path = re.sub(r"[^a-zA-Z0-9]", "", unquote(path))
if clean_table != table or clean_path != clean_path:
+ app.log.warning(f"Invalid table/path: {table=}, {path=}. Redirecting to {clean_table}/{clean_path}")
return redirect(url_for("view", table=clean_table, path=clean_path), 302)
+ app.log.debug(f"Looking for {table=}, {path=}")
page, error = get_page(request.path, table=table, create_okay=True)
if error:
+ app.log.error(error)
g.messages.append(str(error))
return rendered(page)
@@ -150,6 +153,7 @@ def put(table, path):
if parent:
parent.update(members=list(set(parent.members + [updated])))
app.db.save(parent)
+ app.log.debug(f"Saved page at uri {updated.uri}")
return api_response(response=dict(updated))
diff --git a/test/test_db.py b/test/test_db.py
index 4bcb400..ac0aca9 100644
--- a/test/test_db.py
+++ b/test/test_db.py
@@ -1,3 +1,4 @@
+from pathlib import Path
from tempfile import TemporaryDirectory
import pytest
@@ -12,7 +13,7 @@ from ttfrog import schema
@pytest.fixture
def app():
with TemporaryDirectory() as path:
- fixture_db = GrungDB.with_schema(schema, path=path, storage=MemoryStorage)
+ fixture_db = GrungDB.with_schema(schema, path=Path(path), storage=MemoryStorage)
ttfrog.app.load_config(defaults=None, IN_MEMORY_DB=1)
ttfrog.app.initialize(db=fixture_db, force=True)
yield ttfrog.app
@@ -21,8 +22,6 @@ def app():
def test_create(app):
user = schema.User(name="john", email="john@foo", password="powerfulCat")
- assert user.uid
- assert user._metadata.fields["uid"].unique
# insert
john_something = app.db.save(user)
@@ -32,7 +31,6 @@ def test_create(app):
assert app.db.User.get(doc_id=last_insert_id) == john_something
assert john_something.name == user.name
assert john_something.email == user.email
- assert john_something.uid == user.uid
# update
john_something.name = "james?"
@@ -42,6 +40,7 @@ def test_create(app):
assert before_update != after_update
+@pytest.mark.xfail
def test_permissions(app):
john = app.db.save(schema.User(name="john", email="john@foo", password="powerfulCat"))
players = app.db.save(schema.Group(name="players", members=[john]))
diff --git a/test/test_editor.py b/test/test_editor.py
new file mode 100644
index 0000000..099c7c5
--- /dev/null
+++ b/test/test_editor.py
@@ -0,0 +1,39 @@
+from pathlib import Path
+from tempfile import TemporaryDirectory
+
+import pytest
+from grung.db import GrungDB
+from tinydb.storages import MemoryStorage
+
+import ttfrog.app
+from ttfrog import schema
+from ttfrog.bootstrap import bootstrap
+
+
+@pytest.fixture
+def app():
+ with TemporaryDirectory() as path:
+ fixture_db = GrungDB.with_schema(schema, path=Path(path), storage=MemoryStorage)
+ ttfrog.app.load_config(defaults=None, IN_MEMORY_DB=1)
+ ttfrog.app.initialize(db=fixture_db, force=True)
+ ttfrog.app.web.config.update({"TESTING": True})
+ bootstrap()
+ yield ttfrog.app
+ ttfrog.app.db.truncate()
+
+
+@pytest.fixture
+def routes(app):
+ import ttfrog.web
+
+ return ttfrog.web
+
+
+@pytest.fixture()
+def client(routes):
+ return ttfrog.app.web.test_client()
+
+
+def test_get(client, routes):
+ response = client.get(ttfrog.app.config.VIEW_URI)
+ assert response.status_code == 200