diff --git a/.gitignore b/.gitignore index 7523c507ce5fa9d89abb92c2768b9d8cf4aba5aa..47f4fa583994fbb79ae36c7b612f433e33f01dce 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ node_modules /static .venv docs/_build +tmp diff --git a/CHANGES.md b/CHANGES.md index 17b8b6e1ab0bd51824dd1d483e1af5a008532b98..791090ba8a6ac317f354fb1b4c157c38f16721a9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,8 @@ ## Development (): +* **Update**: Updated to use the new TEI editor + ## 0.8.13 (10.12.2019): * **Update**: Updated the documentation diff --git a/editor/jinja2/editor/edit.jinja2 b/editor/jinja2/editor/edit.jinja2 index 181b708308ce93d8b6f551fda25f39fc2b1657eb..e217b431dfdcd9a22bd2b36549d399835e2f7fab 100644 --- a/editor/jinja2/editor/edit.jinja2 +++ b/editor/jinja2/editor/edit.jinja2 @@ -76,11 +76,2151 @@ } } } + window.TEIEditor = { + callbacks: { + autoLoad: function(callback) { + document.querySelector('#loading').classList.add('is-visible'); + window.fetch('{{ url('editor:raw_tei', kwargs={'rid': repository.id, 'fid': fid}) }}').then(function(response) { + response.text().then(function(data) { + callback(data); + document.querySelector('#loading').classList.remove('is-visible'); + }).catch(function() { + document.querySelector('#loading').classList.remove('is-visible'); + }); + }).catch(function() { + document.querySelector('#loading').classList.remove('is-visible'); + }); + }, + save: function(data) { + var commit_msg = prompt('Describe the change you made', last_commit_msg); + if (commit_msg) { + document.querySelector('#loading').classList.add('is-visible'); + window.fetch('{{ url('editor:raw_tei', kwargs={'rid': repository.id, 'fid': fid}) }}', { + method: 'PATCH', + body: data, + headers: { + 'X-CSRFToken': '{{ csrf_token }}', + 'X-Commit-Message': commit_msg + } + }).then(function() { + last_commit_msg = commit_msg; + document.querySelector('#loading').classList.remove('is-visible'); + }).catch(function() { + document.querySelector('#loading').classList.remove('is-visible'); + }); + } + } + } + } </script> - <script src="{{ static('editor/js/tei-editor.js') }}"></script> - <tei-editor></tei-editor> + <div id="app"></div> </main> <div id="loading">{{ icons.spinner() }}</div> + <script id="TEIEditorConfig" type="application/json"> + { + "sections": { + "body": { + "label": "Haupttext", + "type": "TextEditor", + "parser": { + "selector": "tei:text/tei:body" + }, + "serialiser": { + "tag": "tei:text/tei:body" + }, + "schema": [ + { + "name": "paragraph", + "type": "block", + "parser": { + "selector": "tei:p" + }, + "serialiser": { + "tag": "tei:p" + }, + "attrs": { + "noIndent": { + "default": false, + "parser": { + "selector": "contains(@style, \"no-indent\")" + }, + "serialiser": { + "attr": "style", + "values": { + "true": "no-indent" + } + } + }, + "textAlign": { + "default": "left", + "parsers": [ + { + "selector": "contains(@style, \"text-left\")", + "type": "static", + "value": "left" + }, + { + "selector": "contains(@style, \"text-center\")", + "type": "static", + "value": "center" + }, + { + "selector": "contains(@style, \"text-right\")", + "type": "static", + "value": "right" + }, + { + "selector": "contains(@style, \"text-justify\")", + "type": "static", + "value": "justify" + } + ], + "serialiser": { + "attr": "style", + "value": "text-{value}" + } + } + } + }, + { + "name": "heading", + "type": "block", + "content": "inline*", + "parser": { + "selector": "tei:head" + }, + "serialiser": { + "tag": "tei:head" + }, + "attrs": { + "headingId": { + "default": "", + "parser": { + "selector": "@data-heading-id" + }, + "serialiser": { + "attr": "data-heading-id" + } + }, + "level": { + "default": "1", + "parser": { + "selector": "substring(@type, 7)" + }, + "serialiser": { + "attr": "type", + "value": "level-{value}" + } + } + } + }, + { + "name": "line", + "type": "block", + "parser": { + "selector": "tei:l" + }, + "serialiser": { + "tag": "tei:l" + } + }, + { + "name": "lineGroup", + "type": "wrapping", + "content": "line", + "parser": { + "selector": "tei:lg" + }, + "serialiser": { + "tag": "tei:lg" + } + }, + { + "name": "pageLineRef", + "type": "inline", + "parser": { + "selector": "tei:citedRange[@type=\"page-line-ref\"]", + "text": "text()" + }, + "serialiser": { + "tag": "tei:citedRange", + "attrs": { + "type": "page-line-ref" + } + } + }, + { + "name": "wordRange", + "type": "inline", + "parser": { + "selector": "tei:citedRange[@type=\"word-range\"]", + "text": "text()" + }, + "serialiser": { + "tag": "tei:citedRange", + "attrs": { + "type": "word-range" + } + } + }, + { + "name": "quotation", + "type": "inline", + "parser": { + "selector": "tei:q", + "text": "text()" + }, + "serialiser": { + "tag": "tei:q" + } + }, + { + "name": "annotation", + "type": "nested", + "parser": { + "selector": "tei:interp[@type=\"esv\"]" + }, + "serialiser": { + "tag": "tei:interp", + "attrs": { + "type": "esv" + } + }, + "attrs": { + "id": { + "parser": { + "selector": "@xml:id" + }, + "serialiser": { + "attr": "xml:id" + } + } + } + }, + { + "name": "footnote", + "type": "nested", + "parser": { + "selector": "tei:note[@type=\"footnote\"]" + }, + "serialiser": { + "tag": "tei:note", + "attrs": { + "type": "footnote" + } + }, + "attrs": { + "id": { + "parser": { + "selector": "@xml:id" + }, + "serialiser": { + "attr": "xml:id" + } + } + } + }, + { + "name": "text", + "type": "inline", + "parsers": [ + { + "selector": "tei:seg", + "text": "text()" + }, + { + "selector": "tei:hi", + "text": "text()" + } + ], + "serialiser": { + "tag": "tei:seg" + } + }, + { + "name": "annotationGlobal", + "type": "inline", + "parser": { + "selector": "tei:ref[@target=\"#global\"]", + "text": "text()" + }, + "serialiser": { + "tag": "tei:ref" + }, + "attrs": { + "target": { + "default": "global", + "parser": { + "selector": "substring(@target, 2)" + }, + "serialiser": { + "attr": "target", + "value": "#{value}" + } + }, + "headingId": { + "default": "", + "parser": { + "selector": "@data-heading-id" + }, + "serialiser": { + "attr": "data-heading-id" + } + } + } + }, + { + "name": "annotationMarker", + "type": "inline", + "parser": { + "selector": "tei:ref[@type=\"esv\"]", + "text": "text()" + }, + "serialiser": { + "tag": "tei:ref", + "attrs": { + "type": "esv" + } + }, + "attrs": { + "target": { + "default": "", + "parser": { + "selector": "substring(@target, 2)" + }, + "serialiser": { + "attr": "target", + "value": "#{value}" + } + } + }, + "reference": { + "type": "annotation", + "attr": "target" + } + }, + { + "name": "footnoteMarker", + "type": "inline", + "parser": { + "selector": "tei:ref[@type=\"footnote\"]", + "text": "text()" + }, + "serialiser": { + "tag": "tei:ref", + "attrs": { + "type": "footnote" + } + }, + "attrs": { + "target": { + "default": "", + "parser": { + "selector": "substring(@target, 2)" + }, + "serialiser": { + "attr": "target", + "value": "#{value}" + } + } + }, + "reference": { + "type": "footnote", + "attr": "target" + } + }, + { + "name": "pageBegin", + "type": "inline", + "parser": { + "selector": "tei:pb", + "text": "@n" + }, + "serialiser": { + "tag": "tei:pb", + "text": { + "attr": "n" + } + } + }, + { + "name": "foreignLanguage", + "type": "inline", + "parser": { + "selector": "tei:foreign", + "text": "text()" + }, + "serialiser": { + "tag": "tei:foreign" + } + }, + { + "name": "lemma", + "type": "inline", + "parser": { + "selector": "tei:lem", + "text": "text()" + }, + "serialiser": { + "tag": "tei:lem" + } + }, + { + "name": "sic", + "type": "inline", + "parser": { + "selector": "tei:sic", + "text": "text()" + }, + "serialiser": { + "tag": "tei:sic" + } + }, + { + "name": "reading", + "type": "inline", + "parser": { + "selector": "tei:rdg", + "text": "text()" + }, + "serialiser": { + "tag": "tei:rdg" + }, + "attrs": { + "wit": { + "default": "", + "parser": { + "selector": "substring(@wit, 2)" + }, + "serialiser": { + "attr": "wit", + "value": "#{value}" + } + } + } + }, + { + "name": "missing", + "type": "inline", + "parser": { + "selector": "tei:metamark[@function=\"missing\"]", + "text": "text()" + }, + "serialiser": { + "tag": "tei:metamark", + "attrs": { + "function": "missing" + } + } + }, + { + "name": "letterSparse", + "type": "mark", + "parser": { + "selector": "contains(@style, \"letter-sparse\")" + }, + "serialiser": { + "tag": "tei:hi", + "attrs": { + "style": { + "value": "letter-sparse" + } + } + } + }, + { + "name": "sup", + "type": "mark", + "parser": { + "selector": "contains(@style, \"sup\")" + }, + "serialiser": { + "tag": "tei:hi", + "attrs": { + "style": { + "value": "sup" + } + } + } + }, + { + "name": "fontSize", + "type": "mark", + "parsers": [ + { + "selector": "contains(@style, \"font-size-small\")" + }, + { + "selector": "contains(@style, \"font-size-medium\")" + }, + { + "selector": "contains(@style, \"font-size-large\")" + } + ], + "serialiser": { + "tag": "tei:hi" + }, + "attrs": { + "size": { + "default": "", + "parsers": [ + { + "selector": "contains(@style, \"font-size-small\")", + "type": "static", + "value": "small" + }, + { + "selector": "contains(@style, \"font-size-medium\")", + "type": "static", + "value": "medium" + }, + { + "selector": "contains(@style, \"font-size-large\")", + "type": "static", + "value": "large" + } + ], + "serialiser": { + "attr": "style", + "values": { + "small": "font-size-small", + "medium": "font-size-medium", + "large": "font-size-large" + } + } + } + } + }, + { + "name": "fontWeightBold", + "type": "mark", + "parser": { + "selector": "contains(@style, \"font-weight-bold\")" + }, + "serialiser": { + "tag": "tei:hi", + "attrs": { + "style": { + "value": "font-weight-bold" + } + } + } + }, + { + "name": "fontStyleItalic", + "type": "mark", + "parser": { + "selector": "contains(@style, \"font-style-italic\")" + }, + "serialiser": { + "tag": "tei:hi", + "attrs": { + "style": { + "value": "font-style-italic" + } + } + } + } + ], + "ui": { + "doc": [ + { + "label": "Blocktypen", + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "setNodeType", + "label": "Ãœberschrift", + "nodeType": "heading" + }, + { + "type": "setNodeType", + "label": "Absatz", + "nodeType": "paragraph" + }, + { + "type": "setNodeType", + "label": "Vers", + "nodeType": "lineGroup" + } + ] + } + ] + }, + { + "label": "Auszeichnungen", + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "setNodeType", + "label": "Einzelstellenverweis", + "nodeType": "annotationMarker" + }, + { + "type": "setNodeType", + "label": "Globalkommentarverweis", + "nodeType": "annotationGlobal" + }, + { + "type": "setNodeType", + "label": "Seitenanfang", + "nodeType": "pageBegin" + }, + { + "type": "setNodeType", + "label": "Fußnote", + "nodeType": "footnoteMarker" + }, + { + "type": "setNodeType", + "label": "Fremdsprachiger Text", + "nodeType": "foreignLanguage" + } + ] + } + ] + }, + { + "label": "Darstellung", + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "selectMarkAttr", + "markType": "fontSize", + "attr": "size", + "values": [ + { + "value": "", + "label": "Normal" + }, + { + "value": "small", + "label": "Klein" + }, + { + "value": "medium", + "label": "Mittel" + }, + { + "value": "large", + "label": "Groß" + } + ] + }, + { + "type": "separator" + }, + { + "type": "toggleMark", + "markType": "fontWeightBold", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z\" /></svg>" + }, + { + "type": "toggleMark", + "markType": "fontStyleItalic", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z\" /></svg>" + }, + { + "type": "toggleMark", + "markType": "letterSparse", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z\" /></svg>" + }, + { + "type": "toggleMark", + "markType": "sup", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z\" /></svg>" + } + ] + } + ] + }, + { + "label": "Ãœberschrift", + "condition": { + "type": "isActive", + "activeType": "heading" + }, + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "selectNodeAttr", + "nodeType": "heading", + "attr": "level", + "values": [ + { + "label": "Ebene 1", + "value": "1" + }, + { + "label": "Ebene 2", + "value": "2" + }, + { + "label": "Ebene 3", + "value": "3" + }, + { + "label": "Ebene 4", + "value": "4" + } + ] + } + ] + }, + { + "type": "list", + "entities": [ + { + "type": "setNodeAttrString", + "nodeType": "heading", + "attr": "headingId", + "label": "Navigationsmarker" + } + ] + } + ] + }, + { + "label": "Absatz", + "condition": { + "type": "isActive", + "activeType": "paragraph" + }, + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "selectNodeAttr", + "nodeType": "paragraph", + "attr": "noIndent", + "values": [ + { + "label": "Einrücken", + "value": "false" + }, + { + "label": "Nicht einrücken", + "value": "true" + } + ] + }, + { + "type": "separator" + }, + { + "type": "setNodeAttrValue", + "nodeType": "paragraph", + "attr": "textAlign", + "value": "left", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z\" /></svg>" + }, + { + "type": "setNodeAttrValue", + "nodeType": "paragraph", + "attr": "textAlign", + "value": "center", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z\" /></svg>" + }, + { + "type": "setNodeAttrValue", + "nodeType": "paragraph", + "attr": "textAlign", + "value": "right", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z\" /></svg>" + }, + { + "type": "setNodeAttrValue", + "nodeType": "paragraph", + "attr": "textAlign", + "value": "justify", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M3,7H21V9H3V7M3,11H21V13H3V11M3,15H21V17H3V15M3,19H21V21H3V19Z\" /></svg>" + } + ] + } + ] + }, + { + "label": "Einzelstellenverweis", + "condition": { + "type": "isActive", + "activeType": "annotationMarker" + }, + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "linkNestedDoc", + "nodeType": "annotationMarker", + "attr": "target", + "targetNodeType": "annotation" + }, + { + "type": "editNestedDoc", + "nodeType": "annotationMarker", + "attr": "target", + "label": "Bearbeiten", + "targetNodeType": "annotation" + } + ] + } + ] + }, + { + "label": "Globalkommentarverweis", + "condition": { + "type": "isActive", + "activeType": "annotationGlobal" + }, + "entities": [ + { + "type": "list", + "entities": [ + { + "type": "setNodeAttrString", + "label": "Abschnitt (optional)", + "nodeType": "annotationGlobal", + "attr": "headingId" + } + ] + } + ] + }, + { + "label": "Fußnote", + "condition": { + "type": "isActive", + "activeType": "footnoteMarker" + }, + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "editNestedDoc", + "nodeType": "footnoteMarker", + "attr": "target", + "label": "Bearbeiten", + "targetNodeType": "footnote" + } + ] + } + ] + } + ], + "annotation": [ + { + "label": "Einzelstellenverweis", + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "closeNested", + "label": "Schließen" + } + ] + } + ] + }, + { + "label": "Auszeichnungen", + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "setNodeType", + "label": "Seite & Zeile", + "nodeType": "pageLineRef" + }, + { + "type": "setNodeType", + "label": "Wortspanne", + "nodeType": "wordRange" + }, + { + "type": "setNodeType", + "label": "Einzelstellenverweis", + "nodeType": "annotationMarker" + }, + { + "type": "setNodeType", + "label": "Globalkommentarverweis", + "nodeType": "annotationGlobal" + }, + { + "type": "setNodeType", + "label": "Fremdsprachiger Text", + "nodeType": "foreignLanguage" + }, + { + "type": "setNodeType", + "label": "Zitat", + "nodeType": "quotation" + }, + { + "type": "setNodeType", + "label": "Lemma", + "nodeType": "lemma" + }, + { + "type": "setNodeType", + "label": "Textvorlage", + "nodeType": "sic" + }, + { + "type": "setNodeType", + "label": "Variante", + "nodeType": "reading" + }, + { + "type": "setNodeType", + "label": "Nicht ermittelt", + "nodeType": "missing" + } + ] + } + ] + }, + { + "label": "Darstellung", + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "selectMarkAttr", + "markType": "fontSize", + "attr": "size", + "values": [ + { + "value": "", + "label": "Normal" + }, + { + "value": "small", + "label": "Klein" + }, + { + "value": "medium", + "label": "Mittel" + }, + { + "value": "large", + "label": "Groß" + } + ] + }, + { + "type": "separator" + }, + { + "type": "toggleMark", + "markType": "fontWeightBold", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z\" /></svg>" + }, + { + "type": "toggleMark", + "markType": "letterSparse", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z\" /></svg>" + }, + { + "type": "toggleMark", + "markType": "sup", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z\" /></svg>" + } + ] + } + ] + }, + { + "label": "Einzelstellenverweis", + "condition": { + "type": "isActive", + "activeType": "annotationMarker" + }, + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "linkNestedDoc", + "nodeType": "annotationMarker", + "attr": "target", + "targetNodeType": "annotation" + }, + { + "type": "editNestedDoc", + "nodeType": "annotationMarker", + "attr": "target", + "label": "Edit", + "targetNodeType": "annotation" + } + ] + } + ] + }, + { + "label": "Globalkommentarverweis", + "condition": { + "type": "isActive", + "activeType": "annotationGlobal" + }, + "entities": [ + { + "type": "list", + "entities": [ + { + "type": "setNodeAttrString", + "label": "Abschnitt (optional)", + "nodeType": "annotationGlobal", + "attr": "headingId" + } + ] + } + ] + }, + { + "label": "Variante", + "condition": { + "type": "isActive", + "activeType": "reading" + }, + "entities": [ + { + "type": "list", + "entities": [ + { + "type": "setNodeAttrString", + "label": "Quellenkürzel", + "nodeType": "reading", + "attr": "wit" + } + ] + } + ] + } + ], + "footnote": [ + { + "label": "Fußnote", + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "closeNested", + "label": "Schließen" + } + ] + } + ] + }, + { + "label": "Auszeichnungen", + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "setNodeType", + "label": "Einzelstellenverweis", + "nodeType": "annotationMarker" + }, + { + "type": "setNodeType", + "label": "Globalkommentarverweis", + "nodeType": "annotationGlobal" + }, + { + "type": "setNodeType", + "label": "Fremdsprachiger Text", + "nodeType": "foreignLanguage" + }, + { + "type": "setNodeType", + "label": "Zitat", + "nodeType": "quotation" + } + ] + } + ] + }, + { + "label": "Darstellung", + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "selectMarkAttr", + "markType": "fontSize", + "attr": "size", + "values": [ + { + "value": "", + "label": "Normal" + }, + { + "value": "small", + "label": "Klein" + }, + { + "value": "medium", + "label": "Mittel" + }, + { + "value": "large", + "label": "Groß" + } + ] + }, + { + "type": "separator" + }, + { + "type": "toggleMark", + "markType": "fontWeightBold", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z\" /></svg>" + }, + { + "type": "toggleMark", + "markType": "fontStyleItalic", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z\" /></svg>" + }, + { + "type": "toggleMark", + "markType": "letterSparse", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z\" /></svg>" + }, + { + "type": "toggleMark", + "markType": "sup", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z\" /></svg>" + } + ] + } + ] + } + ] + } + }, + "apparat": { + "label": "Apparat", + "type": "TextEditor", + "parser": { + "selector": "tei:text/tei:interpGrp[@type=\"global\"]" + }, + "serialiser": { + "tag": "tei:text/tei:interpGrp", + "attrs": { + "type": "global" + } + }, + "schema": [ + { + "name": "paragraph", + "type": "block", + "parser": { + "selector": "tei:p" + }, + "serialiser": { + "tag": "tei:p" + }, + "attrs": { + "noIndent": { + "default": false, + "parser": { + "selector": "contains(@style, \"no-indent\")" + }, + "serialiser": { + "attr": "style", + "values": { + "true": "no-indent" + } + } + }, + "textAlign": { + "default": "left", + "parsers": [ + { + "selector": "contains(@style, \"text-left\")", + "type": "static", + "value": "left" + }, + { + "selector": "contains(@style, \"text-center\")", + "type": "static", + "value": "center" + }, + { + "selector": "contains(@style, \"text-right\")", + "type": "static", + "value": "right" + }, + { + "selector": "contains(@style, \"text-justify\")", + "type": "static", + "value": "justify" + } + ], + "serialiser": { + "attr": "style", + "value": "text-{value}" + } + } + } + }, + { + "name": "heading", + "type": "block", + "content": "inline*", + "parser": { + "selector": "tei:head" + }, + "serialiser": { + "tag": "tei:head" + }, + "attrs": { + "headingId": { + "default": "", + "parser": { + "selector": "@data-heading-id" + }, + "serialiser": { + "attr": "data-heading-id" + } + }, + "level": { + "default": "1", + "parser": { + "selector": "substring(@type, 7)" + }, + "serialiser": { + "attr": "type", + "value": "level-{value}" + } + } + } + }, + { + "name": "source", + "type": "block", + "parser": { + "selector": "tei:item" + }, + "serialiser": { + "tag": "tei:item" + }, + "attrs": { + "sourceId": { + "default": "", + "parser": { + "selector": "@data-source-id" + }, + "serialiser": { + "attr": "data-source-id" + } + } + } + }, + { + "name": "sourceList", + "type": "wrapping", + "content": "source", + "parser": { + "selector": "tei:list[@type=\"sources\"]" + }, + "serialiser": { + "tag": "tei:list", + "attrs": { + "type": "sources" + } + } + }, + { + "name": "text", + "type": "inline", + "parsers": [ + { + "selector": "tei:seg", + "text": "text()" + }, + { + "selector": "tei:hi", + "text": "text()" + } + ], + "serialiser": { + "tag": "tei:seg" + } + }, + { + "name": "pageLineRef", + "type": "inline", + "parser": { + "selector": "tei:citedRange[@type=\"page-line-ref\"]", + "text": "text()" + }, + "serialiser": { + "tag": "tei:citedRange", + "attrs": { + "type": "page-line-ref" + } + } + }, + { + "name": "wordRange", + "type": "inline", + "parser": { + "selector": "tei:citedRange[@type=\"word-range\"]", + "text": "text()" + }, + "serialiser": { + "tag": "tei:citedRange", + "attrs": { + "type": "word-range" + } + } + }, + { + "name": "annotationGlobal", + "type": "inline", + "parser": { + "selector": "tei:ref[@target=\"#global\"]", + "text": "text()" + }, + "serialiser": { + "tag": "tei:ref" + }, + "attrs": { + "target": { + "default": "global", + "parser": { + "selector": "substring(@target, 2)" + }, + "serialiser": { + "attr": "target", + "value": "#{value}" + } + }, + "headingId": { + "default": "", + "parser": { + "selector": "@data-heading-id" + }, + "serialiser": { + "attr": "data-heading-id" + } + } + } + }, + { + "name": "annotationMarker", + "type": "inline", + "parser": { + "selector": "tei:ref", + "text": "text()" + }, + "serialiser": { + "tag": "tei:ref" + }, + "attrs": { + "target": { + "default": "unknown", + "parser": { + "selector": "substring(@target, 2)" + }, + "serialiser": { + "attr": "target", + "value": "#{value}" + } + } + } + }, + { + "name": "foreignLanguage", + "type": "inline", + "parser": { + "selector": "tei:foreign", + "text": "text()" + }, + "serialiser": { + "tag": "tei:foreign" + } + }, + { + "name": "quotation", + "type": "inline", + "parser": { + "selector": "tei:q", + "text": "text()" + }, + "serialiser": { + "tag": "tei:q" + } + }, + { + "name": "lemma", + "type": "inline", + "parser": { + "selector": "tei:lem", + "text": "text()" + }, + "serialiser": { + "tag": "tei:lem" + } + }, + { + "name": "sic", + "type": "inline", + "parser": { + "selector": "tei:sic", + "text": "text()" + }, + "serialiser": { + "tag": "tei:sic" + } + }, + { + "name": "reading", + "type": "inline", + "parser": { + "selector": "tei:rdg", + "text": "text()" + }, + "serialiser": { + "tag": "tei:rdg" + }, + "attrs": { + "wit": { + "default": "", + "parser": { + "selector": "substring(@wit, 2)" + }, + "serialiser": { + "attr": "wit", + "value": "#{value}" + } + } + } + }, + { + "name": "missing", + "type": "inline", + "parser": { + "selector": "tei:metamark[@function=\"missing\"]", + "text": "text()" + }, + "serialiser": { + "tag": "tei:metamark", + "attrs": { + "function": "missing" + } + } + }, + { + "name": "letterSparse", + "type": "mark", + "parser": { + "selector": "contains(@style, \"letter-sparse\")" + }, + "serialiser": { + "tag": "tei:hi", + "attrs": { + "style": { + "value": "letter-sparse" + } + } + } + }, + { + "name": "sup", + "type": "mark", + "parser": { + "selector": "contains(@style, \"sup\")" + }, + "serialiser": { + "tag": "tei:hi", + "attrs": { + "style": { + "value": "sup" + } + } + } + }, + { + "name": "fontSize", + "type": "mark", + "parsers": [ + { + "selector": "contains(@style, \"font-size-small\")" + }, + { + "selector": "contains(@style, \"font-size-medium\")" + }, + { + "selector": "contains(@style, \"font-size-large\")" + } + ], + "serialiser": { + "tag": "tei:hi" + }, + "attrs": { + "size": { + "default": "", + "parsers": [ + { + "selector": "contains(@style, \"font-size-small\")", + "type": "static", + "value": "small" + }, + { + "selector": "contains(@style, \"font-size-medium\")", + "type": "static", + "value": "medium" + }, + { + "selector": "contains(@style, \"font-size-large\")", + "type": "static", + "value": "large" + } + ], + "serialiser": { + "attr": "style", + "values": { + "small": "font-size-small", + "medium": "font-size-medium", + "large": "font-size-large" + } + } + } + } + }, + { + "name": "fontWeightBold", + "type": "mark", + "parser": { + "selector": "contains(@style, \"font-weight-bold\")" + }, + "serialiser": { + "tag": "tei:hi", + "attrs": { + "style": { + "value": "font-weight-bold" + } + } + } + } + ], + "ui": { + "doc": [ + { + "label": "Blocktypen", + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "setNodeType", + "label": "Ãœberschrift", + "nodeType": "heading" + }, + { + "type": "setNodeType", + "label": "Absatz", + "nodeType": "paragraph" + }, + { + "type": "setNodeType", + "label": "Quellenliste", + "nodeType": "sourceList" + } + ] + } + ] + }, + { + "label": "Auszeichnungen", + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "setNodeType", + "label": "Seite & Zeile", + "nodeType": "pageLineRef" + }, + { + "type": "setNodeType", + "label": "Wortspanne", + "nodeType": "wordRange" + }, + { + "type": "setNodeType", + "label": "Einzelstellenverweis", + "nodeType": "annotationMarker" + }, + { + "type": "setNodeType", + "label": "Globalkommentarverweis", + "nodeType": "annotationGlobal" + }, + { + "type": "setNodeType", + "label": "Fremdsprachiger Text", + "nodeType": "foreignLanguage" + }, + { + "type": "setNodeType", + "label": "Zitat", + "nodeType": "quotation" + }, + { + "type": "setNodeType", + "label": "Lemma", + "nodeType": "lemma" + }, + { + "type": "setNodeType", + "label": "Textvorlage", + "nodeType": "sic" + }, + { + "type": "setNodeType", + "label": "Variante", + "nodeType": "reading" + }, + { + "type": "setNodeType", + "label": "Nicht ermittelt", + "nodeType": "missing" + } + ] + } + ] + }, + { + "label": "Darstellung", + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "selectMarkAttr", + "markType": "fontSize", + "attr": "size", + "values": [ + { + "value": "", + "label": "Normal" + }, + { + "value": "small", + "label": "Klein" + }, + { + "value": "medium", + "label": "Mittel" + }, + { + "value": "large", + "label": "Groß" + } + ] + }, + { + "type": "separator" + }, + { + "type": "toggleMark", + "markType": "fontWeightBold", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z\" /></svg>" + }, + { + "type": "toggleMark", + "markType": "letterSparse", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z\" /></svg>" + }, + { + "type": "toggleMark", + "markType": "sup", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z\" /></svg>" + } + ] + } + ] + }, + { + "label": "Ãœberschrift", + "condition": { + "type": "isActive", + "activeType": "heading" + }, + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "selectNodeAttr", + "nodeType": "heading", + "attr": "level", + "values": [ + { + "label": "Ebene 1", + "value": "1" + }, + { + "label": "Ebene 2", + "value": "2" + }, + { + "label": "Ebene 3", + "value": "3" + }, + { + "label": "Ebene 4", + "value": "4" + } + ] + } + ] + }, + { + "type": "list", + "entities": [ + { + "type": "setNodeAttrString", + "nodeType": "heading", + "attr": "headingId", + "label": "Navigationsmarker" + } + ] + } + ] + }, + { + "label": "Absatz", + "condition": { + "type": "isActive", + "activeType": "paragraph" + }, + "entities": [ + { + "type": "menubar", + "entities": [ + { + "type": "selectNodeAttr", + "nodeType": "paragraph", + "attr": "noIndent", + "values": [ + { + "label": "Einrücken", + "value": "false" + }, + { + "label": "Nicht einrücken", + "value": "true" + } + ] + }, + { + "type": "separator" + }, + { + "type": "setNodeAttrValue", + "nodeType": "paragraph", + "attr": "textAlign", + "value": "left", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z\" /></svg>" + }, + { + "type": "setNodeAttrValue", + "nodeType": "paragraph", + "attr": "textAlign", + "value": "center", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z\" /></svg>" + }, + { + "type": "setNodeAttrValue", + "nodeType": "paragraph", + "attr": "textAlign", + "value": "right", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z\" /></svg>" + }, + { + "type": "setNodeAttrValue", + "nodeType": "paragraph", + "attr": "textAlign", + "value": "justify", + "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M3,7H21V9H3V7M3,11H21V13H3V11M3,15H21V17H3V15M3,19H21V21H3V19Z\" /></svg>" + } + ] + } + ] + }, + { + "label": "Quelle", + "condition": { + "type": "isActive", + "activeType": "source" + }, + "entities": [ + { + "type": "list", + "entities": [ + { + "type": "setNodeAttrString", + "label": "Quellenkürzel", + "nodeType": "source", + "attr": "sourceId" + } + ] + } + ] + }, + { + "label": "Einzelstellenverweis", + "condition": { + "type": "isActive", + "activeType": "annotationMarker" + }, + "entities": [ + { + "type": "list", + "entities": [ + { + "type": "setNodeAttrString", + "label": "Verweisidentifikator", + "nodeType": "annotationMarker", + "attr": "target" + } + ] + } + ] + }, + { + "label": "Globalkommentarverweis", + "condition": { + "type": "isActive", + "activeType": "annotationGlobal" + }, + "entities": [ + { + "type": "list", + "entities": [ + { + "type": "setNodeAttrString", + "label": "Abschnitt (optional)", + "nodeType": "annotationGlobal", + "attr": "headingId" + } + ] + } + ] + }, + { + "label": "Variante", + "condition": { + "type": "isActive", + "activeType": "reading" + }, + "entities": [ + { + "type": "list", + "entities": [ + { + "type": "setNodeAttrString", + "label": "Quellenkürzel", + "nodeType": "reading", + "attr": "wit" + } + ] + } + ] + } + ] + } + }, + "metadata": { + "label": "Metadata", + "type": "MetadataEditor", + "schema": [ + { + "tag": "tei:fileDesc", + "children": [ + { + "tag": "tei:titleStmt", + "children": [ + { + "tag": "tei:title", + "text": "fileDesc.titleStmt.title._text" + }, + { + "tag": "tei:author", + "text": "fileDesc.titleStmt.author._text" + }, + { + "tag": "tei:respStmt", + "multiple": true, + "attrs": { + "xml:id": "_attrs.xml:id" + }, + "children": [ + { + "tag": "tei:resp", + "text": "resp._text", + "multiple": true + }, + { + "tag": "tei:name", + "text": "name._text", + "multiple": true + } + ] + } + ] + }, + { + "tag": "tei:publicationStmt", + "children": [ + { + "tag": "tei:distributor", + "text": "fileDesc.publicationStmt.distributor._text" + } + ] + } + ] + }, + { + "tag": "tei:encodingDesc", + "children": [ + { + "tag": "tei:classDecl", + "children": [ + { + "tag": "tei:taxonomy", + "attrs": { + "xml:id": "encodingDesc.classDecl.taxonomy._attrs.xml:id" + }, + "children": [ + { + "tag": "tei:bibl", + "text": "encodingDesc.classDecl.taxonomy.bibl._text" + } + ] + } + ] + } + ] + }, + { + "tag": "tei:sourceDesc", + "children": [ + { + "tag": "tei:bibl", + "text": "sourceDesc.bibl._text" + } + ] + }, + { + "tag": "tei:profileDesc", + "children": [ + { + "tag": "tei:creation", + "children": [ + { + "tag": "tei:date", + "attrs": { + "when": "profileDesc.creation.date._attrs.when" + }, + "text": "profileDesc.creation.date._text" + } + ] + }, + { + "tag": "tei:textClass", + "children": [ + { + "tag": "tei:catRef", + "attrs": { + "target": "profileDesc.textClass.catRef._attrs.target" + } + } + ] + } + ] + }, + { + "tag": "tei:revisionDesc", + "children": [ + { + "tag": "tei:change", + "multiple": true, + "attrs": { + "when": "_attrs.when", + "who": "_attrs.who" + }, + "text": "_text" + } + ] + } + ], + "ui": [ + { + "label": "Bibliographie", + "entries": [ + { + "type": "single-text", + "label": "Titel", + "path": "fileDesc.titleStmt.title._text" + }, + { + "type": "single-text", + "label": "Autor", + "path": "fileDesc.titleStmt.author._text" + }, + { + "type": "single-text", + "label": "Quelle", + "path": "sourceDesc.bibl._text" + }, + { + "type": "multi-field", + "path": "", + "entries": [ + { + "type": "single-text", + "label": "Veröffentlichungsdatum (JJJJ-MM-TT, JJJJ-MM, JJJJ)", + "path": "profileDesc.creation.date._attrs.when" + }, + { + "type": "single-text", + "label": "Veröffentlichungsdatum (natürlichsprachlich)", + "path": "profileDesc.creation.date._text" + } + ] + } + ] + }, + { + "label": "Digitale Version", + "entries": [ + { + "type": "single-text", + "label": "Distributor", + "path": "fileDesc.publicationStmt.distributor._text" + }, + { + "type": "single-text", + "label": "Taxonomie: Schlüssel", + "path": "encodingDesc.classDecl.taxonomy._attrs.xml:id" + }, + { + "type": "single-text", + "label": "Taxonomie: Name", + "path": "encodingDesc.classDecl.taxonomy.bibl._text" + }, + { + "type": "single-text", + "label": "Kategorie", + "path": "profileDesc.textClass.catRef._attrs.target" + } + ] + }, + { + "label": "Verantwortliche", + "entries": [ + { + "type": "multi-row", + "path": "fileDesc.titleStmt.respStmt", + "entries": + [ + { + "type": "multi-field", + "path": "", + "entries": [ + { + "type": "single-text", + "label": "Identifier", + "path": "._attrs.xml:id" + }, + { + "type": "multi-row", + "path": ".resp", + "entries": [ + { + "type": "single-text", + "label": "Responsible for", + "path": "._text" + } + ] + }, + { + "type": "multi-row", + "path": ".name", + "entries": [ + { + "type": "single-text", + "label": "Name", + "path": "._text" + } + ] + } + ] + } + ] + } + ] + }, + { + "label": "Änderungsgeschichte", + "entries": [ + { + "type": "multi-row", + "path": "revisionDesc.change", + "entries": [ + { + "type": "multi-field", + "path": "", + "entries": [ + { + "type": "single-text", + "label": "Änderung", + "path": "._text" + }, + { + "type": "single-text", + "label": "Durch", + "path": "._attrs.who" + }, + { + "type": "single-text", + "label": "Datum (JJJJ-MM-TT, JJJJ-MM, JJJJ)", + "path": "._attrs.when" + } + ] + } + ] + } + ] + } + ] + } + } + } + </script> + <script src="{{ static('editor/js/tei-editor.js') }}"></script> <script src="{{ static('editor/js/app.js') }}"></script> </body> </html> diff --git a/editor/static/editor/css/app.css b/editor/static/editor/css/app.css index db4eea97a994cc64b134c94e16aaf3c8606b6ef4..ed60daa5d9b28e74460d77bde6d0c1a31040254e 100644 --- a/editor/static/editor/css/app.css +++ b/editor/static/editor/css/app.css @@ -2,7 +2,7 @@ /* Load Foundation */ /** * Foundation for Sites by ZURB - * Version 6.5.3 + * Version 6.6.1 * foundation.zurb.com * Licensed under MIT Open Source */ @@ -489,6 +489,9 @@ select { select[multiple] { height: auto; background-image: none; } + select:not([multiple]) { + padding-top: 0; + padding-bottom: 0; } .is-invalid-input:not(:focus) { border-color: #cc4b37; @@ -684,13 +687,6 @@ blockquote { line-height: 1.6; color: #8a8a8a; } -cite { - display: block; - font-size: 0.8125rem; - color: #8a8a8a; } - cite:before { - content: "— "; } - abbr, abbr[title] { border-bottom: 1px dotted #0a0a0a; cursor: help; @@ -699,14 +695,6 @@ abbr, abbr[title] { figure { margin: 0; } -code { - padding: 0.125rem 0.3125rem 0.0625rem; - border: 1px solid #cacaca; - background-color: #e6e6e6; - font-family: Consolas, "Liberation Mono", Courier, monospace; - font-weight: normal; - color: #0a0a0a; } - kbd { margin: 0; padding: 0.125rem 0.25rem 0; @@ -735,6 +723,36 @@ ul.no-bullet, ol.no-bullet { margin-left: 0; list-style: none; } +.cite-block, cite { + display: block; + color: #8a8a8a; + font-size: 0.8125rem; } + .cite-block:before, cite:before { + content: "— "; } + +.code-inline, code { + border: 1px solid #cacaca; + background-color: #e6e6e6; + font-family: Consolas, "Liberation Mono", Courier, monospace; + font-weight: normal; + color: #0a0a0a; + display: inline; + max-width: 100%; + word-wrap: break-word; + padding: 0.125rem 0.3125rem 0.0625rem; } + +.code-block { + border: 1px solid #cacaca; + background-color: #e6e6e6; + font-family: Consolas, "Liberation Mono", Courier, monospace; + font-weight: normal; + color: #0a0a0a; + display: block; + overflow: auto; + white-space: pre; + padding: 1rem; + margin-bottom: 1.5rem; } + .text-left { text-align: left; } @@ -773,9 +791,11 @@ ul.no-bullet, ol.no-bullet { @media print { * { background: transparent !important; + color: black !important; + -webkit-print-color-adjust: economy; + color-adjust: economy; -webkit-box-shadow: none !important; box-shadow: none !important; - color: black !important; text-shadow: none !important; } .show-for-print { display: block !important; } @@ -1769,8 +1789,8 @@ ul.no-bullet, ol.no-bullet { -ms-flex-flow: column nowrap; flex-flow: column nowrap; } .grid-y > .cell { - width: auto; - max-width: none; } + height: auto; + max-height: none; } .grid-y > .auto { height: auto; } .grid-y > .shrink { @@ -2356,14 +2376,9 @@ ul.no-bullet, ol.no-bullet { -webkit-appearance: none; line-height: 1; text-align: center; - cursor: pointer; - background-color: #1779ba; - color: #fefefe; } + cursor: pointer; } [data-whatinput='mouse'] .button { outline: 0; } - .button:hover, .button:focus { - background-color: #14679e; - color: #fefefe; } .button.tiny { font-size: 0.6rem; } .button.small { @@ -2375,200 +2390,110 @@ ul.no-bullet, ol.no-bullet { width: 100%; margin-right: 0; margin-left: 0; } - .button.primary { + .button, .button.disabled, .button[disabled], .button.disabled:hover, .button[disabled]:hover, .button.disabled:focus, .button[disabled]:focus { + background-color: #1779ba; + color: #fefefe; } + .button:hover, .button:focus { + background-color: #14679e; + color: #fefefe; } + .button.primary, .button.primary.disabled, .button.primary[disabled], .button.primary.disabled:hover, .button.primary[disabled]:hover, .button.primary.disabled:focus, .button.primary[disabled]:focus { background-color: #1779ba; color: #fefefe; } - .button.primary:hover, .button.primary:focus { - background-color: #126195; - color: #fefefe; } - .button.secondary { + .button.primary:hover, .button.primary:focus { + background-color: #126195; + color: #fefefe; } + .button.secondary, .button.secondary.disabled, .button.secondary[disabled], .button.secondary.disabled:hover, .button.secondary[disabled]:hover, .button.secondary.disabled:focus, .button.secondary[disabled]:focus { background-color: #767676; color: #fefefe; } - .button.secondary:hover, .button.secondary:focus { - background-color: #5e5e5e; - color: #fefefe; } - .button.success { + .button.secondary:hover, .button.secondary:focus { + background-color: #5e5e5e; + color: #fefefe; } + .button.success, .button.success.disabled, .button.success[disabled], .button.success.disabled:hover, .button.success[disabled]:hover, .button.success.disabled:focus, .button.success[disabled]:focus { background-color: #3adb76; color: #0a0a0a; } - .button.success:hover, .button.success:focus { - background-color: #22bb5b; - color: #0a0a0a; } - .button.warning { + .button.success:hover, .button.success:focus { + background-color: #22bb5b; + color: #0a0a0a; } + .button.warning, .button.warning.disabled, .button.warning[disabled], .button.warning.disabled:hover, .button.warning[disabled]:hover, .button.warning.disabled:focus, .button.warning[disabled]:focus { background-color: #ffae00; color: #0a0a0a; } - .button.warning:hover, .button.warning:focus { - background-color: #cc8b00; - color: #0a0a0a; } - .button.alert { + .button.warning:hover, .button.warning:focus { + background-color: #cc8b00; + color: #0a0a0a; } + .button.alert, .button.alert.disabled, .button.alert[disabled], .button.alert.disabled:hover, .button.alert[disabled]:hover, .button.alert.disabled:focus, .button.alert[disabled]:focus { background-color: #cc4b37; color: #fefefe; } - .button.alert:hover, .button.alert:focus { - background-color: #a53b2a; - color: #fefefe; } - .button.disabled, .button[disabled] { - opacity: 0.25; - cursor: not-allowed; } - .button.disabled, .button.disabled:hover, .button.disabled:focus, .button[disabled], .button[disabled]:hover, .button[disabled]:focus { - background-color: #1779ba; - color: #fefefe; } - .button.disabled.primary, .button[disabled].primary { - opacity: 0.25; - cursor: not-allowed; } - .button.disabled.primary, .button.disabled.primary:hover, .button.disabled.primary:focus, .button[disabled].primary, .button[disabled].primary:hover, .button[disabled].primary:focus { - background-color: #1779ba; - color: #fefefe; } - .button.disabled.secondary, .button[disabled].secondary { - opacity: 0.25; - cursor: not-allowed; } - .button.disabled.secondary, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary, .button[disabled].secondary:hover, .button[disabled].secondary:focus { - background-color: #767676; - color: #fefefe; } - .button.disabled.success, .button[disabled].success { - opacity: 0.25; - cursor: not-allowed; } - .button.disabled.success, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success, .button[disabled].success:hover, .button[disabled].success:focus { - background-color: #3adb76; - color: #0a0a0a; } - .button.disabled.warning, .button[disabled].warning { - opacity: 0.25; - cursor: not-allowed; } - .button.disabled.warning, .button.disabled.warning:hover, .button.disabled.warning:focus, .button[disabled].warning, .button[disabled].warning:hover, .button[disabled].warning:focus { - background-color: #ffae00; - color: #0a0a0a; } - .button.disabled.alert, .button[disabled].alert { - opacity: 0.25; - cursor: not-allowed; } - .button.disabled.alert, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert, .button[disabled].alert:hover, .button[disabled].alert:focus { - background-color: #cc4b37; - color: #fefefe; } - .button.hollow { + .button.alert:hover, .button.alert:focus { + background-color: #a53b2a; + color: #fefefe; } + .button.hollow, .button.hollow:hover, .button.hollow:focus, .button.hollow.disabled, .button.hollow.disabled:hover, .button.hollow.disabled:focus, .button.hollow[disabled], .button.hollow[disabled]:hover, .button.hollow[disabled]:focus { + background-color: transparent; } + .button.hollow, .button.hollow.disabled, .button.hollow[disabled], .button.hollow.disabled:hover, .button.hollow[disabled]:hover, .button.hollow.disabled:focus, .button.hollow[disabled]:focus { border: 1px solid #1779ba; color: #1779ba; } - .button.hollow, .button.hollow:hover, .button.hollow:focus { - background-color: transparent; } - .button.hollow.disabled, .button.hollow.disabled:hover, .button.hollow.disabled:focus, .button.hollow[disabled], .button.hollow[disabled]:hover, .button.hollow[disabled]:focus { - background-color: transparent; } - .button.hollow:hover, .button.hollow:focus { - border-color: #0c3d5d; - color: #0c3d5d; } - .button.hollow:hover.disabled, .button.hollow:hover[disabled], .button.hollow:focus.disabled, .button.hollow:focus[disabled] { - border: 1px solid #1779ba; - color: #1779ba; } - .button.hollow.primary { - border: 1px solid #1779ba; - color: #1779ba; } - .button.hollow.primary:hover, .button.hollow.primary:focus { - border-color: #0c3d5d; - color: #0c3d5d; } - .button.hollow.primary:hover.disabled, .button.hollow.primary:hover[disabled], .button.hollow.primary:focus.disabled, .button.hollow.primary:focus[disabled] { - border: 1px solid #1779ba; - color: #1779ba; } - .button.hollow.secondary { - border: 1px solid #767676; - color: #767676; } - .button.hollow.secondary:hover, .button.hollow.secondary:focus { - border-color: #3b3b3b; - color: #3b3b3b; } - .button.hollow.secondary:hover.disabled, .button.hollow.secondary:hover[disabled], .button.hollow.secondary:focus.disabled, .button.hollow.secondary:focus[disabled] { - border: 1px solid #767676; - color: #767676; } - .button.hollow.success { - border: 1px solid #3adb76; - color: #3adb76; } - .button.hollow.success:hover, .button.hollow.success:focus { - border-color: #157539; - color: #157539; } - .button.hollow.success:hover.disabled, .button.hollow.success:hover[disabled], .button.hollow.success:focus.disabled, .button.hollow.success:focus[disabled] { - border: 1px solid #3adb76; - color: #3adb76; } - .button.hollow.warning { - border: 1px solid #ffae00; - color: #ffae00; } - .button.hollow.warning:hover, .button.hollow.warning:focus { - border-color: #805700; - color: #805700; } - .button.hollow.warning:hover.disabled, .button.hollow.warning:hover[disabled], .button.hollow.warning:focus.disabled, .button.hollow.warning:focus[disabled] { - border: 1px solid #ffae00; - color: #ffae00; } - .button.hollow.alert { - border: 1px solid #cc4b37; - color: #cc4b37; } - .button.hollow.alert:hover, .button.hollow.alert:focus { - border-color: #67251a; - color: #67251a; } - .button.hollow.alert:hover.disabled, .button.hollow.alert:hover[disabled], .button.hollow.alert:focus.disabled, .button.hollow.alert:focus[disabled] { - border: 1px solid #cc4b37; - color: #cc4b37; } - .button.clear { + .button.hollow:hover, .button.hollow:focus { + border-color: #0c3d5d; + color: #0c3d5d; } + .button.hollow.primary, .button.hollow.primary.disabled, .button.hollow.primary[disabled], .button.hollow.primary.disabled:hover, .button.hollow.primary[disabled]:hover, .button.hollow.primary.disabled:focus, .button.hollow.primary[disabled]:focus { border: 1px solid #1779ba; color: #1779ba; } - .button.clear, .button.clear:hover, .button.clear:focus { - background-color: transparent; } - .button.clear.disabled, .button.clear.disabled:hover, .button.clear.disabled:focus, .button.clear[disabled], .button.clear[disabled]:hover, .button.clear[disabled]:focus { - background-color: transparent; } - .button.clear:hover, .button.clear:focus { - border-color: #0c3d5d; - color: #0c3d5d; } - .button.clear:hover.disabled, .button.clear:hover[disabled], .button.clear:focus.disabled, .button.clear:focus[disabled] { - border: 1px solid #1779ba; - color: #1779ba; } - .button.clear, .button.clear.disabled, .button.clear[disabled], .button.clear:hover, .button.clear:hover.disabled, .button.clear:hover[disabled], .button.clear:focus, .button.clear:focus.disabled, .button.clear:focus[disabled] { - border-color: transparent; } - .button.clear.primary { - border: 1px solid #1779ba; - color: #1779ba; } - .button.clear.primary:hover, .button.clear.primary:focus { - border-color: #0c3d5d; - color: #0c3d5d; } - .button.clear.primary:hover.disabled, .button.clear.primary:hover[disabled], .button.clear.primary:focus.disabled, .button.clear.primary:focus[disabled] { - border: 1px solid #1779ba; - color: #1779ba; } - .button.clear.primary, .button.clear.primary.disabled, .button.clear.primary[disabled], .button.clear.primary:hover, .button.clear.primary:hover.disabled, .button.clear.primary:hover[disabled], .button.clear.primary:focus, .button.clear.primary:focus.disabled, .button.clear.primary:focus[disabled] { - border-color: transparent; } - .button.clear.secondary { - border: 1px solid #767676; - color: #767676; } - .button.clear.secondary:hover, .button.clear.secondary:focus { - border-color: #3b3b3b; - color: #3b3b3b; } - .button.clear.secondary:hover.disabled, .button.clear.secondary:hover[disabled], .button.clear.secondary:focus.disabled, .button.clear.secondary:focus[disabled] { - border: 1px solid #767676; - color: #767676; } - .button.clear.secondary, .button.clear.secondary.disabled, .button.clear.secondary[disabled], .button.clear.secondary:hover, .button.clear.secondary:hover.disabled, .button.clear.secondary:hover[disabled], .button.clear.secondary:focus, .button.clear.secondary:focus.disabled, .button.clear.secondary:focus[disabled] { - border-color: transparent; } - .button.clear.success { - border: 1px solid #3adb76; - color: #3adb76; } - .button.clear.success:hover, .button.clear.success:focus { - border-color: #157539; - color: #157539; } - .button.clear.success:hover.disabled, .button.clear.success:hover[disabled], .button.clear.success:focus.disabled, .button.clear.success:focus[disabled] { - border: 1px solid #3adb76; - color: #3adb76; } - .button.clear.success, .button.clear.success.disabled, .button.clear.success[disabled], .button.clear.success:hover, .button.clear.success:hover.disabled, .button.clear.success:hover[disabled], .button.clear.success:focus, .button.clear.success:focus.disabled, .button.clear.success:focus[disabled] { - border-color: transparent; } - .button.clear.warning { - border: 1px solid #ffae00; - color: #ffae00; } - .button.clear.warning:hover, .button.clear.warning:focus { - border-color: #805700; - color: #805700; } - .button.clear.warning:hover.disabled, .button.clear.warning:hover[disabled], .button.clear.warning:focus.disabled, .button.clear.warning:focus[disabled] { - border: 1px solid #ffae00; - color: #ffae00; } - .button.clear.warning, .button.clear.warning.disabled, .button.clear.warning[disabled], .button.clear.warning:hover, .button.clear.warning:hover.disabled, .button.clear.warning:hover[disabled], .button.clear.warning:focus, .button.clear.warning:focus.disabled, .button.clear.warning:focus[disabled] { - border-color: transparent; } - .button.clear.alert { - border: 1px solid #cc4b37; - color: #cc4b37; } - .button.clear.alert:hover, .button.clear.alert:focus { - border-color: #67251a; - color: #67251a; } - .button.clear.alert:hover.disabled, .button.clear.alert:hover[disabled], .button.clear.alert:focus.disabled, .button.clear.alert:focus[disabled] { - border: 1px solid #cc4b37; - color: #cc4b37; } - .button.clear.alert, .button.clear.alert.disabled, .button.clear.alert[disabled], .button.clear.alert:hover, .button.clear.alert:hover.disabled, .button.clear.alert:hover[disabled], .button.clear.alert:focus, .button.clear.alert:focus.disabled, .button.clear.alert:focus[disabled] { - border-color: transparent; } + .button.hollow.primary:hover, .button.hollow.primary:focus { + border-color: #0c3d5d; + color: #0c3d5d; } + .button.hollow.secondary, .button.hollow.secondary.disabled, .button.hollow.secondary[disabled], .button.hollow.secondary.disabled:hover, .button.hollow.secondary[disabled]:hover, .button.hollow.secondary.disabled:focus, .button.hollow.secondary[disabled]:focus { + border: 1px solid #767676; + color: #767676; } + .button.hollow.secondary:hover, .button.hollow.secondary:focus { + border-color: #3b3b3b; + color: #3b3b3b; } + .button.hollow.success, .button.hollow.success.disabled, .button.hollow.success[disabled], .button.hollow.success.disabled:hover, .button.hollow.success[disabled]:hover, .button.hollow.success.disabled:focus, .button.hollow.success[disabled]:focus { + border: 1px solid #3adb76; + color: #3adb76; } + .button.hollow.success:hover, .button.hollow.success:focus { + border-color: #157539; + color: #157539; } + .button.hollow.warning, .button.hollow.warning.disabled, .button.hollow.warning[disabled], .button.hollow.warning.disabled:hover, .button.hollow.warning[disabled]:hover, .button.hollow.warning.disabled:focus, .button.hollow.warning[disabled]:focus { + border: 1px solid #ffae00; + color: #ffae00; } + .button.hollow.warning:hover, .button.hollow.warning:focus { + border-color: #805700; + color: #805700; } + .button.hollow.alert, .button.hollow.alert.disabled, .button.hollow.alert[disabled], .button.hollow.alert.disabled:hover, .button.hollow.alert[disabled]:hover, .button.hollow.alert.disabled:focus, .button.hollow.alert[disabled]:focus { + border: 1px solid #cc4b37; + color: #cc4b37; } + .button.hollow.alert:hover, .button.hollow.alert:focus { + border-color: #67251a; + color: #67251a; } + .button.clear, .button.clear:hover, .button.clear:focus, .button.clear.disabled, .button.clear.disabled:hover, .button.clear.disabled:focus, .button.clear[disabled], .button.clear[disabled]:hover, .button.clear[disabled]:focus { + border-color: transparent; + background-color: transparent; } + .button.clear, .button.clear.disabled, .button.clear[disabled], .button.clear.disabled:hover, .button.clear[disabled]:hover, .button.clear.disabled:focus, .button.clear[disabled]:focus { + color: #1779ba; } + .button.clear:hover, .button.clear:focus { + color: #0c3d5d; } + .button.clear.primary, .button.clear.primary.disabled, .button.clear.primary[disabled], .button.clear.primary.disabled:hover, .button.clear.primary[disabled]:hover, .button.clear.primary.disabled:focus, .button.clear.primary[disabled]:focus { + color: #1779ba; } + .button.clear.primary:hover, .button.clear.primary:focus { + color: #0c3d5d; } + .button.clear.secondary, .button.clear.secondary.disabled, .button.clear.secondary[disabled], .button.clear.secondary.disabled:hover, .button.clear.secondary[disabled]:hover, .button.clear.secondary.disabled:focus, .button.clear.secondary[disabled]:focus { + color: #767676; } + .button.clear.secondary:hover, .button.clear.secondary:focus { + color: #3b3b3b; } + .button.clear.success, .button.clear.success.disabled, .button.clear.success[disabled], .button.clear.success.disabled:hover, .button.clear.success[disabled]:hover, .button.clear.success.disabled:focus, .button.clear.success[disabled]:focus { + color: #3adb76; } + .button.clear.success:hover, .button.clear.success:focus { + color: #157539; } + .button.clear.warning, .button.clear.warning.disabled, .button.clear.warning[disabled], .button.clear.warning.disabled:hover, .button.clear.warning[disabled]:hover, .button.clear.warning.disabled:focus, .button.clear.warning[disabled]:focus { + color: #ffae00; } + .button.clear.warning:hover, .button.clear.warning:focus { + color: #805700; } + .button.clear.alert, .button.clear.alert.disabled, .button.clear.alert[disabled], .button.clear.alert.disabled:hover, .button.clear.alert[disabled]:hover, .button.clear.alert.disabled:focus, .button.clear.alert[disabled]:focus { + color: #cc4b37; } + .button.clear.alert:hover, .button.clear.alert:focus { + color: #67251a; } + .button.disabled, .button[disabled] { + opacity: 0.25; + cursor: not-allowed; } .button.dropdown::after { display: block; width: 0; @@ -2643,36 +2568,105 @@ a.button:hover, a.button:focus { -webkit-box-flex: 1; -ms-flex: 1 1 0px; flex: 1 1 0px; } - .button-group.primary .button { + .button-group.primary .button, .button-group.primary .button.disabled, .button-group.primary .button[disabled], .button-group.primary .button.disabled:hover, .button-group.primary .button[disabled]:hover, .button-group.primary .button.disabled:focus, .button-group.primary .button[disabled]:focus { background-color: #1779ba; color: #fefefe; } - .button-group.primary .button:hover, .button-group.primary .button:focus { - background-color: #126195; - color: #fefefe; } - .button-group.secondary .button { + .button-group.primary .button:hover, .button-group.primary .button:focus { + background-color: #126195; + color: #fefefe; } + .button-group.secondary .button, .button-group.secondary .button.disabled, .button-group.secondary .button[disabled], .button-group.secondary .button.disabled:hover, .button-group.secondary .button[disabled]:hover, .button-group.secondary .button.disabled:focus, .button-group.secondary .button[disabled]:focus { background-color: #767676; color: #fefefe; } - .button-group.secondary .button:hover, .button-group.secondary .button:focus { - background-color: #5e5e5e; - color: #fefefe; } - .button-group.success .button { + .button-group.secondary .button:hover, .button-group.secondary .button:focus { + background-color: #5e5e5e; + color: #fefefe; } + .button-group.success .button, .button-group.success .button.disabled, .button-group.success .button[disabled], .button-group.success .button.disabled:hover, .button-group.success .button[disabled]:hover, .button-group.success .button.disabled:focus, .button-group.success .button[disabled]:focus { background-color: #3adb76; color: #0a0a0a; } - .button-group.success .button:hover, .button-group.success .button:focus { - background-color: #22bb5b; - color: #0a0a0a; } - .button-group.warning .button { + .button-group.success .button:hover, .button-group.success .button:focus { + background-color: #22bb5b; + color: #0a0a0a; } + .button-group.warning .button, .button-group.warning .button.disabled, .button-group.warning .button[disabled], .button-group.warning .button.disabled:hover, .button-group.warning .button[disabled]:hover, .button-group.warning .button.disabled:focus, .button-group.warning .button[disabled]:focus { background-color: #ffae00; color: #0a0a0a; } - .button-group.warning .button:hover, .button-group.warning .button:focus { - background-color: #cc8b00; - color: #0a0a0a; } - .button-group.alert .button { + .button-group.warning .button:hover, .button-group.warning .button:focus { + background-color: #cc8b00; + color: #0a0a0a; } + .button-group.alert .button, .button-group.alert .button.disabled, .button-group.alert .button[disabled], .button-group.alert .button.disabled:hover, .button-group.alert .button[disabled]:hover, .button-group.alert .button.disabled:focus, .button-group.alert .button[disabled]:focus { background-color: #cc4b37; color: #fefefe; } - .button-group.alert .button:hover, .button-group.alert .button:focus { - background-color: #a53b2a; - color: #fefefe; } + .button-group.alert .button:hover, .button-group.alert .button:focus { + background-color: #a53b2a; + color: #fefefe; } + .button-group.hollow .button, .button-group.hollow .button:hover, .button-group.hollow .button:focus, .button-group.hollow .button.disabled, .button-group.hollow .button.disabled:hover, .button-group.hollow .button.disabled:focus, .button-group.hollow .button[disabled], .button-group.hollow .button[disabled]:hover, .button-group.hollow .button[disabled]:focus { + background-color: transparent; } + .button-group.hollow .button, .button-group.hollow .button.disabled, .button-group.hollow .button[disabled], .button-group.hollow .button.disabled:hover, .button-group.hollow .button[disabled]:hover, .button-group.hollow .button.disabled:focus, .button-group.hollow .button[disabled]:focus { + border: 1px solid #1779ba; + color: #1779ba; } + .button-group.hollow .button:hover, .button-group.hollow .button:focus { + border-color: #0c3d5d; + color: #0c3d5d; } + .button-group.hollow.primary .button, .button-group.hollow.primary .button.disabled, .button-group.hollow.primary .button[disabled], .button-group.hollow.primary .button.disabled:hover, .button-group.hollow.primary .button[disabled]:hover, .button-group.hollow.primary .button.disabled:focus, .button-group.hollow.primary .button[disabled]:focus, .button-group.hollow .button.primary, .button-group.hollow .button.primary.disabled, .button-group.hollow .button.primary[disabled], .button-group.hollow .button.primary.disabled:hover, .button-group.hollow .button.primary[disabled]:hover, .button-group.hollow .button.primary.disabled:focus, .button-group.hollow .button.primary[disabled]:focus { + border: 1px solid #1779ba; + color: #1779ba; } + .button-group.hollow.primary .button:hover, .button-group.hollow.primary .button:focus, .button-group.hollow .button.primary:hover, .button-group.hollow .button.primary:focus { + border-color: #0c3d5d; + color: #0c3d5d; } + .button-group.hollow.secondary .button, .button-group.hollow.secondary .button.disabled, .button-group.hollow.secondary .button[disabled], .button-group.hollow.secondary .button.disabled:hover, .button-group.hollow.secondary .button[disabled]:hover, .button-group.hollow.secondary .button.disabled:focus, .button-group.hollow.secondary .button[disabled]:focus, .button-group.hollow .button.secondary, .button-group.hollow .button.secondary.disabled, .button-group.hollow .button.secondary[disabled], .button-group.hollow .button.secondary.disabled:hover, .button-group.hollow .button.secondary[disabled]:hover, .button-group.hollow .button.secondary.disabled:focus, .button-group.hollow .button.secondary[disabled]:focus { + border: 1px solid #767676; + color: #767676; } + .button-group.hollow.secondary .button:hover, .button-group.hollow.secondary .button:focus, .button-group.hollow .button.secondary:hover, .button-group.hollow .button.secondary:focus { + border-color: #3b3b3b; + color: #3b3b3b; } + .button-group.hollow.success .button, .button-group.hollow.success .button.disabled, .button-group.hollow.success .button[disabled], .button-group.hollow.success .button.disabled:hover, .button-group.hollow.success .button[disabled]:hover, .button-group.hollow.success .button.disabled:focus, .button-group.hollow.success .button[disabled]:focus, .button-group.hollow .button.success, .button-group.hollow .button.success.disabled, .button-group.hollow .button.success[disabled], .button-group.hollow .button.success.disabled:hover, .button-group.hollow .button.success[disabled]:hover, .button-group.hollow .button.success.disabled:focus, .button-group.hollow .button.success[disabled]:focus { + border: 1px solid #3adb76; + color: #3adb76; } + .button-group.hollow.success .button:hover, .button-group.hollow.success .button:focus, .button-group.hollow .button.success:hover, .button-group.hollow .button.success:focus { + border-color: #157539; + color: #157539; } + .button-group.hollow.warning .button, .button-group.hollow.warning .button.disabled, .button-group.hollow.warning .button[disabled], .button-group.hollow.warning .button.disabled:hover, .button-group.hollow.warning .button[disabled]:hover, .button-group.hollow.warning .button.disabled:focus, .button-group.hollow.warning .button[disabled]:focus, .button-group.hollow .button.warning, .button-group.hollow .button.warning.disabled, .button-group.hollow .button.warning[disabled], .button-group.hollow .button.warning.disabled:hover, .button-group.hollow .button.warning[disabled]:hover, .button-group.hollow .button.warning.disabled:focus, .button-group.hollow .button.warning[disabled]:focus { + border: 1px solid #ffae00; + color: #ffae00; } + .button-group.hollow.warning .button:hover, .button-group.hollow.warning .button:focus, .button-group.hollow .button.warning:hover, .button-group.hollow .button.warning:focus { + border-color: #805700; + color: #805700; } + .button-group.hollow.alert .button, .button-group.hollow.alert .button.disabled, .button-group.hollow.alert .button[disabled], .button-group.hollow.alert .button.disabled:hover, .button-group.hollow.alert .button[disabled]:hover, .button-group.hollow.alert .button.disabled:focus, .button-group.hollow.alert .button[disabled]:focus, .button-group.hollow .button.alert, .button-group.hollow .button.alert.disabled, .button-group.hollow .button.alert[disabled], .button-group.hollow .button.alert.disabled:hover, .button-group.hollow .button.alert[disabled]:hover, .button-group.hollow .button.alert.disabled:focus, .button-group.hollow .button.alert[disabled]:focus { + border: 1px solid #cc4b37; + color: #cc4b37; } + .button-group.hollow.alert .button:hover, .button-group.hollow.alert .button:focus, .button-group.hollow .button.alert:hover, .button-group.hollow .button.alert:focus { + border-color: #67251a; + color: #67251a; } + .button-group.clear .button, .button-group.clear .button:hover, .button-group.clear .button:focus, .button-group.clear .button.disabled, .button-group.clear .button.disabled:hover, .button-group.clear .button.disabled:focus, .button-group.clear .button[disabled], .button-group.clear .button[disabled]:hover, .button-group.clear .button[disabled]:focus { + border-color: transparent; + background-color: transparent; } + .button-group.clear .button, .button-group.clear .button.disabled, .button-group.clear .button[disabled], .button-group.clear .button.disabled:hover, .button-group.clear .button[disabled]:hover, .button-group.clear .button.disabled:focus, .button-group.clear .button[disabled]:focus { + color: #1779ba; } + .button-group.clear .button:hover, .button-group.clear .button:focus { + color: #0c3d5d; } + .button-group.clear.primary .button, .button-group.clear.primary .button.disabled, .button-group.clear.primary .button[disabled], .button-group.clear.primary .button.disabled:hover, .button-group.clear.primary .button[disabled]:hover, .button-group.clear.primary .button.disabled:focus, .button-group.clear.primary .button[disabled]:focus, .button-group.clear .button.primary, .button-group.clear .button.primary.disabled, .button-group.clear .button.primary[disabled], .button-group.clear .button.primary.disabled:hover, .button-group.clear .button.primary[disabled]:hover, .button-group.clear .button.primary.disabled:focus, .button-group.clear .button.primary[disabled]:focus { + color: #1779ba; } + .button-group.clear.primary .button:hover, .button-group.clear.primary .button:focus, .button-group.clear .button.primary:hover, .button-group.clear .button.primary:focus { + color: #0c3d5d; } + .button-group.clear.secondary .button, .button-group.clear.secondary .button.disabled, .button-group.clear.secondary .button[disabled], .button-group.clear.secondary .button.disabled:hover, .button-group.clear.secondary .button[disabled]:hover, .button-group.clear.secondary .button.disabled:focus, .button-group.clear.secondary .button[disabled]:focus, .button-group.clear .button.secondary, .button-group.clear .button.secondary.disabled, .button-group.clear .button.secondary[disabled], .button-group.clear .button.secondary.disabled:hover, .button-group.clear .button.secondary[disabled]:hover, .button-group.clear .button.secondary.disabled:focus, .button-group.clear .button.secondary[disabled]:focus { + color: #767676; } + .button-group.clear.secondary .button:hover, .button-group.clear.secondary .button:focus, .button-group.clear .button.secondary:hover, .button-group.clear .button.secondary:focus { + color: #3b3b3b; } + .button-group.clear.success .button, .button-group.clear.success .button.disabled, .button-group.clear.success .button[disabled], .button-group.clear.success .button.disabled:hover, .button-group.clear.success .button[disabled]:hover, .button-group.clear.success .button.disabled:focus, .button-group.clear.success .button[disabled]:focus, .button-group.clear .button.success, .button-group.clear .button.success.disabled, .button-group.clear .button.success[disabled], .button-group.clear .button.success.disabled:hover, .button-group.clear .button.success[disabled]:hover, .button-group.clear .button.success.disabled:focus, .button-group.clear .button.success[disabled]:focus { + color: #3adb76; } + .button-group.clear.success .button:hover, .button-group.clear.success .button:focus, .button-group.clear .button.success:hover, .button-group.clear .button.success:focus { + color: #157539; } + .button-group.clear.warning .button, .button-group.clear.warning .button.disabled, .button-group.clear.warning .button[disabled], .button-group.clear.warning .button.disabled:hover, .button-group.clear.warning .button[disabled]:hover, .button-group.clear.warning .button.disabled:focus, .button-group.clear.warning .button[disabled]:focus, .button-group.clear .button.warning, .button-group.clear .button.warning.disabled, .button-group.clear .button.warning[disabled], .button-group.clear .button.warning.disabled:hover, .button-group.clear .button.warning[disabled]:hover, .button-group.clear .button.warning.disabled:focus, .button-group.clear .button.warning[disabled]:focus { + color: #ffae00; } + .button-group.clear.warning .button:hover, .button-group.clear.warning .button:focus, .button-group.clear .button.warning:hover, .button-group.clear .button.warning:focus { + color: #805700; } + .button-group.clear.alert .button, .button-group.clear.alert .button.disabled, .button-group.clear.alert .button[disabled], .button-group.clear.alert .button.disabled:hover, .button-group.clear.alert .button[disabled]:hover, .button-group.clear.alert .button.disabled:focus, .button-group.clear.alert .button[disabled]:focus, .button-group.clear .button.alert, .button-group.clear .button.alert.disabled, .button-group.clear .button.alert[disabled], .button-group.clear .button.alert.disabled:hover, .button-group.clear .button.alert[disabled]:hover, .button-group.clear .button.alert.disabled:focus, .button-group.clear .button.alert[disabled]:focus { + color: #cc4b37; } + .button-group.clear.alert .button:hover, .button-group.clear.alert .button:focus, .button-group.clear .button.alert:hover, .button-group.clear .button.alert:focus { + color: #67251a; } + .button-group.no-gaps .button { + margin-right: -0.0625rem; } + .button-group.no-gaps .button + .button { + border-left-color: transparent; } .button-group.stacked, .button-group.stacked-for-small, .button-group.stacked-for-medium { -ms-flex-wrap: wrap; flex-wrap: wrap; } @@ -2698,13 +2692,13 @@ a.button:hover, a.button:focus { -ms-flex: 0 0 auto; flex: 0 0 auto; margin-bottom: 0; } } - @media screen and (max-width: 39.99875em) { + @media print, screen and (max-width: 39.99875em) { .button-group.stacked-for-small.expanded { display: block; } .button-group.stacked-for-small.expanded .button { display: block; margin-right: 0; } } - @media screen and (max-width: 63.99875em) { + @media print, screen and (max-width: 63.99875em) { .button-group.stacked-for-medium.expanded { display: block; } .button-group.stacked-for-medium.expanded .button { @@ -2713,6 +2707,7 @@ a.button:hover, a.button:focus { .close-button { position: absolute; + z-index: 10; color: #8a8a8a; cursor: pointer; } [data-whatinput='mouse'] .close-button { @@ -2724,7 +2719,7 @@ a.button:hover, a.button:focus { top: 0.33em; font-size: 1.5em; line-height: 1; } - .close-button, .close-button.medium { + .close-button.medium, .close-button { right: 1rem; top: 0.5rem; font-size: 2em; @@ -2918,6 +2913,9 @@ a.button:hover, a.button:focus { background: #1779ba; } input:checked ~ .switch-paddle::after { left: 2.25rem; } + input:disabled ~ .switch-paddle { + cursor: not-allowed; + opacity: 0.5; } [data-whatinput='mouse'] input:focus ~ .switch-paddle { outline: 0; } @@ -3022,7 +3020,7 @@ table { border-bottom: 1px solid #f1f1f1; background-color: #fefefe; } -@media screen and (max-width: 63.99875em) { +@media print, screen and (max-width: 63.99875em) { table.stack thead { display: none; } table.stack tfoot { @@ -3273,13 +3271,13 @@ table.hover:not(.unstriped) tr:nth-of-type(even):hover { .pagination-previous.disabled::before { display: inline-block; margin-right: 0.5rem; - content: '\00ab'; } + content: "«"; } .pagination-next a::after, .pagination-next.disabled::after { display: inline-block; margin-left: 0.5rem; - content: '\00bb'; } + content: "»"; } .has-tip { position: relative; @@ -3405,9 +3403,9 @@ table.hover:not(.unstriped) tr:nth-of-type(even):hover { top: 50%; right: 1rem; margin-top: -0.5rem; - content: '+'; } + content: "+"; } .is-active > .accordion-title::before { - content: '\2013'; } + content: "–"; } .accordion-content { display: none; @@ -3428,7 +3426,7 @@ table.hover:not(.unstriped) tr:nth-of-type(even):hover { flex-wrap: nowrap; } .media-object img { max-width: none; } - @media screen and (max-width: 39.99875em) { + @media print, screen and (max-width: 39.99875em) { .media-object.stack-for-small { -ms-flex-wrap: wrap; flex-wrap: wrap; } } @@ -3443,7 +3441,7 @@ table.hover:not(.unstriped) tr:nth-of-type(even):hover { padding-left: 1rem; } .media-object-section > :last-child { margin-bottom: 0; } - @media screen and (max-width: 39.99875em) { + @media print, screen and (max-width: 39.99875em) { .stack-for-small .media-object-section { padding: 0; padding-bottom: 1rem; @@ -3985,13 +3983,13 @@ a.thumbnail { .submenu-toggle-text { position: absolute !important; - width: 1px; - height: 1px; - padding: 0; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border: 0; } + width: 1px !important; + height: 1px !important; + padding: 0 !important; + overflow: hidden !important; + clip: rect(0, 0, 0, 0) !important; + white-space: nowrap !important; + border: 0 !important; } .is-drilldown { position: relative; @@ -4516,12 +4514,13 @@ a.thumbnail { .off-canvas-content { -webkit-transform: none; transform: none; - -webkit-transition: -webkit-transform 0.5s ease; - transition: -webkit-transform 0.5s ease; - transition: transform 0.5s ease; - transition: transform 0.5s ease, -webkit-transform 0.5s ease; -webkit-backface-visibility: hidden; backface-visibility: hidden; } + .off-canvas-content.has-transition-overlap, .off-canvas-content.has-transition-push { + -webkit-transition: -webkit-transform 0.5s ease; + transition: -webkit-transform 0.5s ease; + transition: transform 0.5s ease; + transition: transform 0.5s ease, -webkit-transform 0.5s ease; } .off-canvas-content.has-transition-push { -webkit-transform: translate(0, 0); transform: translate(0, 0); } @@ -4770,7 +4769,7 @@ html.is-reveal-open { margin-left: 0; border: 0; border-radius: 0; } - @media screen and (max-width: 39.99875em) { + @media print, screen and (max-width: 39.99875em) { .reveal { top: 0; right: 0; @@ -4888,7 +4887,7 @@ html.is-reveal-open { -ms-flex: 0 1 auto; flex: 0 1 auto; margin-left: auto; } } - @media screen and (max-width: 63.99875em) { + @media print, screen and (max-width: 63.99875em) { .top-bar.stacked-for-medium { -ms-flex-wrap: wrap; flex-wrap: wrap; } @@ -4898,7 +4897,7 @@ html.is-reveal-open { -ms-flex: 0 0 100%; flex: 0 0 100%; max-width: 100%; } } - @media screen and (max-width: 74.99875em) { + @media print, screen and (max-width: 74.99875em) { .top-bar.stacked-for-large { -ms-flex-wrap: wrap; flex-wrap: wrap; } @@ -5237,7 +5236,7 @@ html.is-reveal-open { .invisible { visibility: hidden; } -@media screen and (max-width: 39.99875em) { +@media print, screen and (max-width: 39.99875em) { .hide-for-small-only { display: none !important; } } @@ -5253,7 +5252,7 @@ html.is-reveal-open { .show-for-medium { display: none !important; } } -@media screen and (min-width: 40em) and (max-width: 63.99875em) { +@media print, screen and (min-width: 40em) and (max-width: 63.99875em) { .hide-for-medium-only { display: none !important; } } @@ -5269,7 +5268,7 @@ html.is-reveal-open { .show-for-large { display: none !important; } } -@media screen and (min-width: 64em) and (max-width: 74.99875em) { +@media print, screen and (min-width: 64em) and (max-width: 74.99875em) { .hide-for-large-only { display: none !important; } } @@ -5280,21 +5279,21 @@ html.is-reveal-open { .show-for-sr, .show-on-focus { position: absolute !important; - width: 1px; - height: 1px; - padding: 0; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border: 0; } + width: 1px !important; + height: 1px !important; + padding: 0 !important; + overflow: hidden !important; + clip: rect(0, 0, 0, 0) !important; + white-space: nowrap !important; + border: 0 !important; } .show-on-focus:active, .show-on-focus:focus { position: static !important; - width: auto; - height: auto; - overflow: visible; - clip: auto; - white-space: normal; } + width: auto !important; + height: auto !important; + overflow: visible !important; + clip: auto !important; + white-space: normal !important; } .show-for-landscape, .hide-for-portrait { @@ -5326,7 +5325,7 @@ html.is-reveal-open { nav.expanded *[role="menu"] textarea { height: 8rem; } -*[role="menu"] { +*[role="menu"], *[role="menubar"] { padding: 0; margin: 0; list-style: none; @@ -5337,10 +5336,11 @@ nav.expanded *[role="menu"] textarea { -ms-flex-wrap: wrap; flex-wrap: wrap; background: #e6e6e6; } - [data-whatinput='mouse'] *[role="menu"] li { + [data-whatinput='mouse'] *[role="menu"] li, [data-whatinput='mouse'] *[role="menubar"] li { outline: 0; } *[role="menu"] a, - *[role="menu"] .button { + *[role="menu"] .button, *[role="menubar"] a, + *[role="menubar"] .button { line-height: 1; text-decoration: none; display: block; @@ -5348,52 +5348,73 @@ nav.expanded *[role="menu"] textarea { *[role="menu"] input, *[role="menu"] select, *[role="menu"] a, - *[role="menu"] button { + *[role="menu"] button, *[role="menubar"] input, + *[role="menubar"] select, + *[role="menubar"] a, + *[role="menubar"] button { margin-bottom: 0; } - *[role="menu"] input { + *[role="menu"] input, *[role="menubar"] input { display: inline-block; } - *[role="menu"][aria-orientation="vertical"] { + *[role="menu"][aria-orientation="vertical"], *[role="menubar"][aria-orientation="vertical"] { -ms-flex-wrap: nowrap; flex-wrap: nowrap; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; } - *[role="menu"][aria-orientation="vertical"] li.separator { + *[role="menu"][aria-orientation="vertical"] li.separator, *[role="menubar"][aria-orientation="vertical"] li.separator { padding-right: 0; padding-bottom: 1rem; } - *[role="menu"] li { + *[role="menu"] li, *[role="menubar"] li { position: relative; } - *[role="menu"] li.menu-text { + *[role="menu"] li.menu-text, *[role="menubar"] li.menu-text { padding: 0.7rem 1rem; font-weight: bold; line-height: 1; color: inherit; } - *[role="menu"] li.separator { + *[role="menu"] li.separator, *[role="menubar"] li.separator { padding-right: 1rem; } - *[role="menu"] li[role="separator"] { + *[role="menu"] li[role="separator"], *[role="menubar"] li[role="separator"] { width: 1rem; } - *[role="menu"] li *[role="menuitem"] { + *[role="menu"] li *[role="menuitem"], *[role="menubar"] li *[role="menuitem"] { cursor: pointer; height: 100%; } - *[role="menu"] li *[role="menuitem"][aria-disabled="true"] { - cursor: not-allowed; } - *[role="menu"] li *[role="menuitem"][aria-current="true"], *[role="menu"] li *[role="menuitem"]:hover { + *[role="menu"] li *[role="menuitem"][aria-disabled="true"], *[role="menubar"] li *[role="menuitem"][aria-disabled="true"] { + cursor: not-allowed; + background: #fefefe; + color: #e6e6e6; } + *[role="menu"] li *[role="menuitem"][aria-disabled="true"] svg path, *[role="menubar"] li *[role="menuitem"][aria-disabled="true"] svg path { + fill: #e6e6e6; } + *[role="menu"] li *[role="menuitem"][aria-disabled="true"][aria-current="true"], *[role="menu"] li *[role="menuitem"][aria-disabled="true"][aria-checked="true"], *[role="menu"] li *[role="menuitem"][aria-disabled="true"]:hover, *[role="menubar"] li *[role="menuitem"][aria-disabled="true"][aria-current="true"], *[role="menubar"] li *[role="menuitem"][aria-disabled="true"][aria-checked="true"], *[role="menubar"] li *[role="menuitem"][aria-disabled="true"]:hover { + background: #fefefe; + color: #e6e6e6; } + *[role="menu"] li *[role="menuitem"][aria-disabled="true"][aria-current="true"] svg path, *[role="menu"] li *[role="menuitem"][aria-disabled="true"][aria-checked="true"] svg path, *[role="menu"] li *[role="menuitem"][aria-disabled="true"]:hover svg path, *[role="menubar"] li *[role="menuitem"][aria-disabled="true"][aria-current="true"] svg path, *[role="menubar"] li *[role="menuitem"][aria-disabled="true"][aria-checked="true"] svg path, *[role="menubar"] li *[role="menuitem"][aria-disabled="true"]:hover svg path { + fill: #e6e6e6; } + *[role="menu"] li *[role="menuitem"][aria-current="true"], *[role="menu"] li *[role="menuitem"][aria-checked="true"], *[role="menu"] li *[role="menuitem"]:hover, *[role="menubar"] li *[role="menuitem"][aria-current="true"], *[role="menubar"] li *[role="menuitem"][aria-checked="true"], *[role="menubar"] li *[role="menuitem"]:hover { background: #1779ba; color: #fefefe; } - *[role="menu"] li *[role="menuitem"][aria-current="true"] svg path, *[role="menu"] li *[role="menuitem"]:hover svg path { + *[role="menu"] li *[role="menuitem"][aria-current="true"] svg path, *[role="menu"] li *[role="menuitem"][aria-checked="true"] svg path, *[role="menu"] li *[role="menuitem"]:hover svg path, *[role="menubar"] li *[role="menuitem"][aria-current="true"] svg path, *[role="menubar"] li *[role="menuitem"][aria-checked="true"] svg path, *[role="menubar"] li *[role="menuitem"]:hover svg path { fill: #fefefe; } - *[role="menu"] li > *[role="menu"] { + *[role="menu"] li > *[role="menu"], *[role="menubar"] li > *[role="menu"] { display: none; position: absolute; z-index: 1; } - *[role="menu"] li > *[role="menu"] *[role="menu"] { + *[role="menu"] li > *[role="menu"] *[role="menu"], *[role="menubar"] li > *[role="menu"] *[role="menu"] { position: absolute; top: 0; left: 100%; } - *[role="menu"] li:hover > *[role="menu"] { + *[role="menu"] li:hover > *[role="menu"], *[role="menubar"] li:hover > *[role="menu"] { display: block; } +.margin-top { + margin-top: 1rem; } + +.margin-bottom { + margin-bottom: 1rem; } + +.margin-right { + margin-right: 1rem; } + [role="menuitem"] svg, [role="menuitem"] svg.mdi-icon { width: 18px; height: 18px; } @@ -5402,23 +5423,14 @@ svg.mdi-icon { height: 24px; width: 24px; } -.help aside dd { - margin-bottom: 1rem; } - header.top-bar { padding-top: 0; padding-bottom: 0; border-bottom: 1px solid #cacaca; } -.margin-top { - margin-top: 1rem; } - -.margin-bottom { +.help aside dd { margin-bottom: 1rem; } -.margin-right { - margin-right: 1rem; } - .tei-editor-menubar > [role="menu"] { border-bottom: 1px solid #cacaca; } .tei-editor-menubar > [role="menu"] [role="menu"] { @@ -5459,113 +5471,141 @@ ul.tree { padding: 30px 50px; border-radius: 10px; } -.tei-editor-prosemirror-sidebar { - background: #e6e6e6; - padding: 1rem; } - .tei-editor-prosemirror-sidebar dd { - margin-bottom: 1rem; } +#app { + height: 100%; } -#annotations .tei-editor-prosemirror-editor { - font-family: 'Merriweather Sans', Arial, serif; } +#tei-editor .metadata-editor { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + -ms-flex-wrap: wrap; + flex-wrap: wrap; } + #tei-editor .metadata-editor > section { + padding: 0 1rem; + -webkit-box-sizing: border-box; + box-sizing: border-box; + width: 100%; } + @media print, screen and (min-width: 64em) { + #tei-editor .metadata-editor > section:nth-child(1), #tei-editor .metadata-editor > section:nth-child(2) { + width: 50%; } } + #tei-editor .metadata-editor > section > div { + margin-bottom: 1rem; } + #tei-editor .metadata-editor input { + margin-bottom: 0; } + #tei-editor .metadata-editor .multi-row > li:not(:first-child) > div > label .label-text { + display: none; } + #tei-editor .metadata-editor [role="menubar"] { + background: transparent; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; } + #tei-editor .metadata-editor [role="menu"] { + background: transparent; } -.tei-editor-prosemirror-editor { - padding: 1rem; - font-family: 'Merriweather', Georgia, serif; } - .tei-editor-prosemirror-editor .tei-editor-pageBegin { +#tei-editor .text-editor { + padding: 0 1rem; + -webkit-box-sizing: border-box; + box-sizing: border-box; + font-family: 'Merriweather', Georgia, serif; + font-size: 11pt; } + #tei-editor .text-editor .nested { + background: #fefefe; + top: 0; + left: 0; } + #tei-editor .text-editor > div { + overflow-y: auto; } + #tei-editor .text-editor > div:nth-child(2) { + background: #e6e6e6; + padding: 0 1rem; + width: 25%; } + #tei-editor .text-editor > div:nth-child(2) > div { + margin-bottom: 1rem; } + #tei-editor .text-editor > div:nth-child(2) h2 { + font-size: 14pt; + font-weight: bold; } + #tei-editor .text-editor > div:nth-child(2) label input { + display: block; } + #tei-editor .text-editor .node-paragraph { + text-indent: 2rem; } + #tei-editor .text-editor .node-paragraph[data-noindent="true"] { + text-indent: 0; } + #tei-editor .text-editor .node-paragraph[data-textalign="center"] { + text-align: center; } + #tei-editor .text-editor .node-paragraph[data-textalign="right"] { + text-align: right; } + #tei-editor .text-editor .node-paragraph[data-textalign="justify"] { + text-align: justify; } + #tei-editor .text-editor .node-heading { + font-weight: bold; + text-align: center; } + #tei-editor .text-editor .node-heading[data-level="1"] { + font-size: 15pt; } + #tei-editor .text-editor .node-heading[data-level="2"] { + font-size: 13pt; } + #tei-editor .text-editor .node-heading[data-level="3"] { + font-size: 12pt; } + #tei-editor .text-editor .node-heading[data-level="4"] { + font-size: 11pt; } + #tei-editor .text-editor .node-lineGroup { + margin: 1rem 0; } + #tei-editor .text-editor .node-pageBegin { font-size: 80%; font-style: italic; } - .tei-editor-prosemirror-editor .tei-editor-pageBegin::before { + #tei-editor .text-editor .node-pageBegin::before { content: '['; } - .tei-editor-prosemirror-editor .tei-editor-pageBegin::after { + #tei-editor .text-editor .node-pageBegin::after { content: ']'; } - .tei-editor-prosemirror-editor .tei-editor-letterSparse { - letter-spacing: 1.5pt; } - .tei-editor-prosemirror-editor .tei-editor-fontWeightBold { - font-weight: 700; } - .tei-editor-prosemirror-editor .tei-editor-fontStyleItalic { - font-style: italic; } - .tei-editor-prosemirror-editor .tei-editor-fontSize[data-size="small"] { - font-size: 10pt; } - .tei-editor-prosemirror-editor .tei-editor-fontSize[data-size="medium"] { - font-size: 13pt; } - .tei-editor-prosemirror-editor .tei-editor-fontSize[data-size="large"] { - font-size: 15pt; } - .tei-editor-prosemirror-editor .tei-editor-foreignLanguage { + #tei-editor .text-editor .node-foreignLanguage { font-weight: 300; } - .tei-editor-prosemirror-editor .tei-editor-sup { - font-size: 80%; - vertical-align: super; } - .tei-editor-prosemirror-editor .tei-editor-quotation { - font-style: italic; } - .tei-editor-prosemirror-editor .tei-editor-annotation, .tei-editor-prosemirror-editor .tei-editor-annotationGlobal { + #tei-editor .text-editor .node-annotationMarker { -webkit-text-decoration: underline dotted; text-decoration: underline dotted; } - .tei-editor-prosemirror-editor .tei-editor-heading[data-level="1"] { - font-size: 15pt; - font-weight: bold; - text-align: center; - margin: 0; } - .tei-editor-prosemirror-editor * + .tei-editor-heading[data-level="1"] { - padding-top: 3rem; } - .tei-editor-prosemirror-editor .tei-editor-heading[data-level="1"] + .tei-editor-heading[data-level="1"] { - padding-top: 0; } - .tei-editor-prosemirror-editor .tei-editor-heading[data-level="2"] { - font-size: 13pt; - font-weight: bold; - text-align: center; } - .tei-editor-prosemirror-editor * + .tei-editor-heading[data-level="2"] { - padding-top: 2rem; } - .tei-editor-prosemirror-editor .tei-editor-heading[data-level="2"] + .tei-editor-heading[data-level="2"] { - padding-top: 0; } - .tei-editor-prosemirror-editor .tei-editor-heading[data-level="3"] { - font-size: 12pt; - font-weight: bold; - text-align: center; } - .tei-editor-prosemirror-editor * + .tei-editor-heading[data-level="3"] { - padding-top: 1.5rem; } - .tei-editor-prosemirror-editor .tei-editor-heading[data-level="2"] + .tei-editor-heading[data-level="3"] { - padding-top: 0; } - .tei-editor-prosemirror-editor .tei-editor-paragraph, .tei-editor-prosemirror-editor .tei-editor-sourceList { - font-size: 11pt; - margin-bottom: 0; - text-indent: 1cm; } - .tei-editor-prosemirror-editor .tei-editor-paragraph[data-noindent="true"], .tei-editor-prosemirror-editor .tei-editor-sourceList[data-noindent="true"] { - text-indent: 0; } - .tei-editor-prosemirror-editor .tei-editor-paragraph[data-textalign="center"], .tei-editor-prosemirror-editor .tei-editor-sourceList[data-textalign="center"] { - text-align: center; } - .tei-editor-prosemirror-editor .tei-editor-paragraph[data-textalign="right"], .tei-editor-prosemirror-editor .tei-editor-sourceList[data-textalign="right"] { - text-align: right; } - .tei-editor-prosemirror-editor .tei-editor-paragraph[data-textalign="justify"], .tei-editor-prosemirror-editor .tei-editor-sourceList[data-textalign="justify"] { - text-align: justify; } - .tei-editor-prosemirror-editor .tei-editor-heading[data-level="1"] + .tei-editor-paragraph, .tei-editor-prosemirror-editor .tei-editor-heading[data-level="2"] + .tei-editor-paragraph { - margin-top: 3rem !important; } - .tei-editor-prosemirror-editor .tei-editor-lineGroup { + #tei-editor .text-editor .node-annotationGlobal { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; } + #tei-editor .text-editor .node-footnoteMarker { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; } + #tei-editor .text-editor .node-quotation { + font-style: italic; } + #tei-editor .text-editor .node-lineGroup { margin-top: 1rem; margin-left: 2rem; } - .tei-editor-prosemirror-editor .tei-editor-line { - font-size: 11pt; } - .tei-editor-prosemirror-editor .tei-editor-pageLineRef { + #tei-editor .text-editor .node-pageLineRef { font-weight: bold; } - .tei-editor-prosemirror-editor .tei-editor-wordRange { + #tei-editor .text-editor .node-wordRange { padding-left: 1rem; } - .tei-editor-prosemirror-editor .tei-editor-sic, .tei-editor-prosemirror-editor .tei-editor-reading { + #tei-editor .text-editor .node-sic { font-style: italic; } - .tei-editor-prosemirror-editor .tei-editor-lemma { + #tei-editor .text-editor .node-reading { font-style: italic; } - .tei-editor-prosemirror-editor .tei-editor-lemma::after { + #tei-editor .text-editor .node-lemma { + font-style: italic; } + #tei-editor .text-editor .node-lemma::after { content: ' ]'; font-style: normal; } - .tei-editor-prosemirror-editor .tei-editor-footnote { - font-size: 9pt; - font-weight: normal; - font-style: normal; - border: 1px solid #8a8a8a; - border-radius: 3px; - padding: 0.1rem 0.2rem; - background: #e6e6e6; } - .tei-editor-prosemirror-editor .tei-editor-missing::before { + #tei-editor .text-editor .node-missing::before { content: '\25fc'; vertical-align: sub; } - .tei-editor-prosemirror-editor .tei-editor-missing::after { + #tei-editor .text-editor .node-missing::after { content: '\25fc'; vertical-align: super; } + #tei-editor .text-editor .mark-letterSparse { + letter-spacing: 1.5pt; } + #tei-editor .text-editor .mark-fontWeightBold { + font-weight: 700; } + #tei-editor .text-editor .mark-fontStyleItalic { + font-style: italic; } + #tei-editor .text-editor .mark-fontSize[data-size="small"] { + font-size: 10pt; } + #tei-editor .text-editor .mark-fontSize[data-size="medium"] { + font-size: 13pt; } + #tei-editor .text-editor .mark-fontSize[data-size="large"] { + font-size: 15pt; } + #tei-editor .text-editor .mark-sup { + vertical-align: super; + font-size: 80%; } diff --git a/editor/static/editor/css/tei-editor.css b/editor/static/editor/css/tei-editor.css index 0eafd3afc55010bdc532e77743fbc7e1f48c9838..16e015da1bd484ef028daee124e2da9d9f19ae92 100644 --- a/editor/static/editor/css/tei-editor.css +++ b/editor/static/editor/css/tei-editor.css @@ -1,222 +1 @@ -/** - * Foundation for Sites by ZURB - * Version 6.5.3 - * foundation.zurb.com - * Licensed under MIT Open Source - */ -/** - * Grid structure - */ -.tei-editor { - display: flex; - flex-flow: column wrap; - height: 100%; -} -.tei-editor > div:nth-child(1) { - flex: 0 0 auto; -} -.tei-editor > div:nth-child(2) { - flex: 1 1 0px; - overflow: hidden; -} -.tei-editor .tei-editor-view-single-text { - display: flex; - flex-flow: row nowrap; - overflow-y: auto; - max-height: 100%; - min-height: 100%; - -webkit-overflow-scrolling: touch; - -ms-overflow-style: -ms-autohiding-scrollbar; - height: 100%; -} -.tei-editor .tei-editor-view-single-text > div:nth-child(1) { - flex: 0 0 auto; - min-height: 0px; - min-width: 0px; - width: 66.6666666667%; - overflow-y: auto; - max-height: 100%; - min-height: 100%; - -webkit-overflow-scrolling: touch; - -ms-overflow-style: -ms-autohiding-scrollbar; - height: 100%; -} -.tei-editor .tei-editor-view-single-text > div:nth-child(2) { - flex: 0 0 auto; - min-height: 0px; - min-width: 0px; - width: 33.3333333333%; - overflow-y: auto; - max-height: 100%; - min-height: 100%; - -webkit-overflow-scrolling: touch; - -ms-overflow-style: -ms-autohiding-scrollbar; - height: 100%; -} -.tei-editor .tei-editor-view-multi-text { - display: flex; - flex-flow: column nowrap; - overflow: hidden; - height: 100%; -} -.tei-editor .tei-editor-view-multi-text > nav { - flex: 0 0 auto; -} -.tei-editor .tei-editor-view-multi-text > div { - flex: 1 1 0px; - display: flex; - flex-flow: row nowrap; - overflow: hidden; -} -.tei-editor .tei-editor-view-multi-text > div > div:nth-child(1) { - flex: 0 0 auto; - min-height: 0px; - min-width: 0px; - width: 66.6666666667%; - overflow-y: auto; - max-height: 100%; - min-height: 100%; - -webkit-overflow-scrolling: touch; - -ms-overflow-style: -ms-autohiding-scrollbar; - height: 100%; -} -.tei-editor .tei-editor-view-multi-text > div > div:nth-child(2) { - flex: 0 0 auto; - min-height: 0px; - min-width: 0px; - width: 33.3333333333%; - overflow-y: auto; - max-height: 100%; - min-height: 100%; - -webkit-overflow-scrolling: touch; - -ms-overflow-style: -ms-autohiding-scrollbar; - height: 100%; -} -.tei-editor .tei-editor-view-header { - overflow-y: auto; - max-height: 100%; - min-height: 100%; - -webkit-overflow-scrolling: touch; - -ms-overflow-style: -ms-autohiding-scrollbar; -} -.tei-editor .tei-editor-view-header > dl { - padding: 1rem; -} -.tei-editor .tei-editor-view-header > dl ul li { - list-style-type: none; -} -.tei-editor .tei-editor-view-header > dl ul li.tei-editor-metadata-single { - max-width: 43rem; -} -.tei-editor .tei-editor-view-header > dl ul li.tei-editor-metadata-multiple > div { - display: flex; - flex-flow: row nowrap; -} -.tei-editor .tei-editor-view-header > dl ul li.tei-editor-metadata-multiple > div div { - flex: 0 0 auto; - min-height: 0px; - min-width: 0px; - flex: 1 1 0px; - width: auto; -} -.tei-editor .tei-editor-view-header > dl ul li.tei-editor-metadata-multiple > div nav { - align-self: flex-end; - padding-bottom: 0.5rem; -} - -/* - * ARIA Compliant Menu - */ -nav.expanded *[role=menu] li { - flex: 1 1 0px; -} -nav.expanded *[role=menu] input, nav.expanded *[role=menu] textarea { - width: 100%; -} - -*[role=menu] { - padding: 0; - margin: 0; - list-style: none; - position: relative; - display: flex; - flex-wrap: wrap; -} -[data-whatinput=mouse] *[role=menu] li { - outline: 0; -} -*[role=menu] a, -*[role=menu] .button { - line-height: 1; - text-decoration: none; - display: block; - padding: 0.7rem 1rem; -} -*[role=menu] input, -*[role=menu] select, -*[role=menu] a, -*[role=menu] button { - margin-bottom: 0; -} -*[role=menu] input { - display: inline-block; -} -*[role=menu][aria-orientation=vertical] { - flex-wrap: nowrap; - flex-direction: column; -} -*[role=menu][aria-orientation=vertical] li.separator { - padding-right: 0; - padding-bottom: 1rem; -} -*[role=menu] li { - position: relative; -} -*[role=menu] li.menu-text { - padding: 0.7rem 1rem; - font-weight: bold; - line-height: 1; - color: inherit; -} -*[role=menu] li.separator { - padding-right: 1rem; -} -*[role=menu] li *[role=menuitem] { - cursor: pointer; - height: 100%; -} -*[role=menu] li *[role=menuitem][aria-disabled=true] { - cursor: not-allowed; -} -*[role=menu] li > *[role=menu] { - display: none; - position: absolute; - z-index: 1; -} -*[role=menu] li > *[role=menu] *[role=menu] { - position: absolute; - top: 0; - left: 100%; -} -*[role=menu] li:hover > *[role=menu] { - display: block; -} - -/** - * Icons - */ -svg.mdi-icon { - width: 24px; - height: 24px; -} - -/** - * Generic - */ -*[aria-hidden=true] { - display: none !important; -} - -*[contenteditable]:focus { - outline: 0px solid transparent; -} \ No newline at end of file +ul[role=menubar]{margin:0;padding:0;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}ul[role=menubar] li{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;vertical-align:top}ul[role=menubar] li a{cursor:pointer}ul[role=menubar] [aria-hidden=true]{display:none}ul[role=menubar] ul[role=menu]{margin:0;padding:0}ul[role=menubar] ul[role=menu][aria-hidden=false]{position:absolute}#tei-editor,ul[role=menubar] ul[role=menu][aria-hidden=false]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}#tei-editor{height:100%;max-height:100%}#tei-editor>nav{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}#tei-editor>div{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;overflow:auto}#tei-editor svg{width:24px;height:24px}#tei-editor ol,#tei-editor ul{margin:0;padding:0}#tei-editor ol.multi-row>li,#tei-editor ul.multi-row>li{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}#tei-editor ol.multi-row>li>div,#tei-editor ul.multi-row>li>div{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}#tei-editor ol.multi-row>li>ul,#tei-editor ul.multi-row>li>ul{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}#tei-editor ol.multi-field,#tei-editor ul.multi-field{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}#tei-editor ol.multi-field>li,#tei-editor ul.multi-field>li{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}#tei-editor ol li,#tei-editor ul li{list-style-type:none}#tei-editor .text-editor{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;position:relative}#tei-editor .text-editor>div:first-child{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}#tei-editor .text-editor>div.sidebar{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}#tei-editor .text-editor>div.nested{position:absolute;width:100%;height:100%} \ No newline at end of file diff --git a/editor/static/editor/js/tei-editor.js b/editor/static/editor/js/tei-editor.js index f9fbeb5fa83fd9e07384008a7c22eb3e8e360a67..fdbe62e7cad466c616e1f2f83b2e9ffbd20e1db0 100644 --- a/editor/static/editor/js/tei-editor.js +++ b/editor/static/editor/js/tei-editor.js @@ -1,4964 +1,33 @@ -(function() { - window.teiEditorConfig = Object.assign(window.teiEditorConfig || {}, { - // Configure editor tabs - sections: { - - // ================ - // Metadaten Header - // ================ - header: { - title: 'Metadaten', - type: 'header', - tag: 'tei:teiHeader', - schema: [ - { - tag: 'tei:fileDesc', - children: [ - { - tag: 'tei:titleStmt', - children: [ - { - tag: 'tei:title', - text: 'fileDesc.titleStmt.title._text' - }, - { - tag: 'tei:author', - text: 'fileDesc.titleStmt.author._text' - }, - { - tag: 'tei:respStmt', - multiple: true, - deduplicate: { - key: 'attrs.xml:id', - merge: [ - { - tag: 'tei:resp', - }, - { - tag: 'tei:name' - }, - ], - }, - attrs: { - 'xml:id': '_attrs.xml:id' - }, - children: [ - { - tag: 'tei:resp', - text: 'resp._text' - }, - { - tag: 'tei:name', - text: 'name._text' - } - ] - } - ] - }, - { - tag: 'tei:publicationStmt', - children: [ - { - tag: 'tei:distributor', - text: 'fileDesc.publicationStmt.distributor._text' - } - ] - } - ] - }, - { - tag: 'tei:encodingDesc', - children: [ - { - tag: 'tei:classDecl', - children: [ - { - tag: 'tei:taxonomy', - attrs: { - 'xml:id': 'encodingDesc.classDecl.taxonomy._attrs.xml:id' - }, - children: [ - { - tag: 'tei:bibl', - text: 'encodingDesc.classDecl.taxonomy.bibl._text' - } - ] - } - ] - } - ] - }, - { - tag: 'tei:sourceDesc', - children: [ - { - tag: 'tei:bibl', - text: 'sourceDesc.bibl._text' - } - ] - }, - { - tag: 'tei:profileDesc', - children: [ - { - tag: 'tei:creation', - children: [ - { - tag: 'tei:date', - attrs: { - when: 'profileDesc.creation.date._attrs.when' - }, - text: 'profileDesc.creation.date._text' - } - ] - }, - { - tag: 'tei:textClass', - children: [ - { - tag: 'tei:catRef', - attrs: { - target: 'profileDesc.textClass.catRef._attrs.target' - }, - } - ] - } - ] - }, - { - tag: 'tei:revisionDesc', - children: [ - { - tag: 'tei:change', - multiple: true, - attrs: { - when: '_attrs.when', - who: '_attrs.who' - }, - text: '_text' - } - ] - } - ], - ui: [ - { - title: 'Bibliographie', - entries: [ - { - type: 'single-text', - label: 'Titel', - path: 'fileDesc.titleStmt.title._text' - }, - { - type: 'single-text', - label: 'Autor', - path: 'fileDesc.titleStmt.author._text' - }, - { - type: 'single-text', - label: 'Quelle', - path: 'sourceDesc.bibl._text' - }, - { - type: 'single-text', - label: 'Veröffentlichungsdatum (JJJJ-MM-TT, JJJJ-MM, JJJJ)', - path: 'profileDesc.creation.date._attrs.when' - }, - { - type: 'single-text', - label: 'Veröffentlichungsdatum (natürlichsprachlich)', - path: 'profileDesc.creation.date._text' - } - ] - }, - { - title: 'Digitale Version', - entries: [ - { - type: 'single-text', - label: 'Distributor', - path: 'fileDesc.publicationStmt.distributor._text' - }, - { - type: 'single-text', - label: 'Taxonomie: Schlüssel', - path: 'encodingDesc.classDecl.taxonomy._attrs.xml:id' - }, - { - type: 'single-text', - label: 'Taxonomie: Name', - path: 'encodingDesc.classDecl.taxonomy.bibl._text' - }, - { - type: 'single-text', - label: 'Kategorie', - path: 'profileDesc.textClass.catRef._attrs.target' - } - ] - }, - { - title: 'Verantwortliche', - entries: [ - { - type: 'multi-field', - path: 'fileDesc.titleStmt.respStmt', - entries: [ - { - type: 'single-text', - label: 'Schlüssel', - path: '_attrs.xml:id' - }, - { - type: 'single-text', - label: 'Verantwortlich für', - path: 'resp._text' - }, - { - type: 'single-text', - label: 'Name', - path: 'name._text' - } - ] - } - ] - }, - { - title: 'Änderungsgeschichte', - entries: [ - { - type: 'multi-field', - path: 'revisionDesc.change', - entries: [ - { - type: 'single-text', - label: 'Änderung', - path: '_text' - }, - { - type: 'single-text', - label: 'Durch', - path: '_attrs.who' - }, - { - type: 'single-text', - label: 'Datum (JJJJ-MM-TT, JJJJ-MM, JJJJ)', - path: '_attrs.when' - } - ] - } - ] - } - ] - }, - - // ========= - // Haupttext - // ========= - mainText: { - title: 'Haupttext', - type: 'single-text', - parser: { - selector: 'tei:text/tei:body', - }, - serializer: { - tag: 'tei:text' - }, - schema: { - nodes: { - doc: { - content: 'block+', - parser: { - selector: 'tei:body' - }, - serializer: { - tag: 'tei:body' - } - }, - paragraph: { - group: 'block', - content: 'inline*', - parser: { - selector: 'tei:p' - }, - serializer: { - tag: 'tei:p' - }, - attrs: { - noIndent: { - default: false, - parser: { - selector: 'contains(@style, "no-indent")', - type: 'boolean' - }, - serializer: { - attr: 'style', - values: { - true: 'no-indent' - } - } - }, - textAlign: { - default: 'left', - parsers: [ - { - selector: "contains(@style, 'text-left')", - type: 'static', - value: 'left' - }, - { - selector: "contains(@style, 'text-center')", - type: 'static', - value: 'center' - }, - { - selector: "contains(@style, 'text-right')", - type: 'static', - value: 'right' - }, - { - selector: "contains(@style, 'text-justify')", - type: 'static', - value: 'justify' - } - ], - serializer: { - attr: 'style', - values: { - center: 'text-center', - right: 'text-right', - justify: 'text-justify' - } - } - } - }, - }, - heading: { - group: 'block', - content: 'inline*', - parser: { - selector: 'tei:head' - }, - serializer: { - tag: 'tei:head' - }, - attrs: { - headingId: { - default: '', - parser: { - selector: '@data-heading-id' - }, - serializer: { - attr: 'data-heading-id' - } - }, - level: { - default: 1, - parser: { - selector: 'substring(@type, 7)' - }, - serializer: { - attr: 'type', - value: 'level-${value}' - } - } - }, - defining: true - }, - line: { - group: 'block', - content: 'inline*', - parser: { - selector: 'tei:l' - }, - serializer: { - tag: 'tei:l' - } - }, - lineGroup: { - group: 'block', - content: 'line+', - parser: { - selector: 'tei:lg' - }, - serializer: { - tag: 'tei:lg' - } - }, - text: { - group: 'inline', - inline: true, - parsers: [ - { - selector: 'tei:seg', - text: 'text()' - }, - { - selector: 'tei:hi', - text: 'text()' - }, - ], - serializer: { - tag: 'tei:seg' - } - }, - annotationGlobal: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:ref[@target="#global"]', - text: 'text()' - }, - serializer: { - tag: 'tei:ref' - }, - attrs: { - target: { - default: 'global', - parser: { - selector: 'substring(@target, 2)' - }, - serializer: { - attr: 'target', - value: '#${value}' - } - }, - headingId: { - default: '', - parser: { - selector: '@data-heading-id' - }, - serializer: { - attr: 'data-heading-id' - } - } - } - }, - annotation: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:ref', - text: 'text()' - }, - serializer: { - tag: 'tei:ref' - }, - attrs: { - target: { - default: 'unknown', - parser: { - selector: 'substring(@target, 2)' - }, - serializer: { - attr: 'target', - value: '#${value}' - } - } - } - }, - pageBegin: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:pb', - text: '@n' - }, - serializer: { - tag: 'tei:pb', - text: { - attr: 'n' - } - } - }, - footnote: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:note[@type="footnote"]', - text: 'text()' - }, - serializer: { - tag: 'tei:note', - }, - attrs: { - type: { - default: 'footnote', - parser: { - selector: '@type', - }, - serializer: { - attr: 'type', - value: 'footnote' - } - }, - marker: { - default: '', - parser: { - selector: '@data-marker' - }, - serializer: { - attr: 'data-marker' - } - } - } - }, - foreignLanguage: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:foreign', - text: 'text()' - }, - serializer: { - tag: 'tei:foreign' - } - }, - }, - marks: { - letterSparse: { - parser: { - selector: 'contains(@style, "letter-sparse")' - }, - serializer: { - tag: 'tei:hi', - attrs: { - style: { - value: 'letter-sparse' - } - } - } - }, - sup: { - parser: { - selector: 'contains(@style, "sup")' - }, - serializer: { - tag: 'tei:hi', - attrs: { - style: { - value: 'sup' - } - } - } - }, - fontSize: { - parsers: [ - { - selector: "contains(@style, 'font-size-small')" - }, - { - selector: "contains(@style, 'font-size-medium')" - }, - { - selector: "contains(@style, 'font-size-large')" - } - ], - serializer: { - tag: 'tei:hi' - }, - attrs: { - size: { - default: '', - parsers: [ - { - selector: "contains(@style, 'font-size-small')", - type: 'static', - value: 'small' - }, - { - selector: "contains(@style, 'font-size-medium')", - type: 'static', - value: 'medium' - }, - { - selector: "contains(@style, 'font-size-large')", - type: 'static', - value: 'large' - } - ], - serializer: { - attr: 'style', - values: { - small: 'font-size-small', - medium: 'font-size-medium', - large: 'font-size-large' - } - } - } - } - }, - fontWeightBold: { - parser: { - selector: 'contains(@style, "font-weight-bold")' - }, - serializer: { - tag: 'tei:hi', - attrs: { - style: { - value: 'font-weight-bold' - } - } - } - }, - fontStyleItalic: { - parser: { - selector: 'contains(@style, "font-style-italic")' - }, - serializer: { - tag: 'tei:hi', - attrs: { - style: { - value: 'font-style-italic' - } - } - } - } - } - }, - ui: [ - { - title: 'Blocktypen', - type: 'block-type', - blocks: [ - { - type: 'heading', - label: 'Ãœberschrift' - }, - { - type: 'paragraph', - label: 'Absatz' - }, - { - type: 'lineGroup', - label: 'Vers', - wrapping: true - }, - { - type: 'line', - label: 'Zeile' - }, - ] - }, - { - title: 'Auszeichnungen', - type: 'block-type', - blocks: [ - { - type: 'annotation', - label: 'Einzelstellenverweis' - }, - { - type: 'annotationGlobal', - label: 'Globalkommentarverweis' - }, - { - type: 'pageBegin', - label: 'Seitenanfang' - }, - { - type: 'footnote', - label: 'Fußnote' - }, - { - type: 'foreignLanguage', - label: 'Fremdsprachiger Text' - } - ] - }, - { - title: 'Ãœberschrift', - type: 'toolbar', - context: 'blocks.heading', - entries: [ - { - type: 'select-attr', - attr: 'level', - values: [ - { - key: '1', - value: 'Ebene 1' - }, - { - key: '2', - value: 'Ebene 2' - }, - { - key: '3', - value: 'Ebene 3' - }, - { - key: '4', - value: 'Ebene 4' - }, - ] - }, - { - type: 'text-attr', - attr: 'headingId', - dataType: 'text' - } - ] - }, - { - title: 'Absatz', - type: 'toolbar', - context: 'blocks.paragraph', - entries: [ - { - type: 'toggle-attr', - attr: 'noIndent', - label: "Nicht einrücken", - icon: { - on: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M11,17H21V15H11M3,8V16L7,12M3,21H21V19H3V21Z" /></svg>', - off: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M3,21H21V19H3M3,12L7,16V8M11,17H21V15H11V17Z" /></svg>' - } - }, - { - type: 'separator' - }, - { - type: 'set-attr', - attr: 'textAlign', - value: 'left', - label: 'Linksbündig', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z" /></svg>' - }, - { - type: 'set-attr', - attr: 'textAlign', - value: 'center', - label: 'Zentriert', - icon: '<svg style="viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z" /></svg>' - }, - { - type: 'set-attr', - attr: 'textAlign', - value: 'right', - label: 'Rechtsbündig', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z" /></svg>' - }, - { - type: 'set-attr', - attr: 'textAlign', - value: 'justify', - label: 'Block', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M3,7H21V9H3V7M3,11H21V13H3V11M3,15H21V17H3V15M3,19H21V21H3V19Z" /></svg>' - }, - ] - }, - { - title: 'Darstellung', - type: 'toolbar', - context: 'marks', - entries: [ - { - type: 'select-mark-attr', - mark: 'fontSize', - attr: 'size', - values: [ - { - key: '', - label: 'Normal' - }, - { - key: 'small', - label: 'Klein', - }, - { - key: 'medium', - label: 'Mittel', - }, - { - key: 'large', - label: 'Groß' - } - ] - }, - { - type: 'toggle-mark', - mark: 'fontWeightBold', - label: 'Fettdruck', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z" /></svg>' - }, - { - type: 'toggle-mark', - mark: 'fontStyleItalic', - label: 'Kursiv', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z" /></svg>' - }, - { - type: 'toggle-mark', - mark: 'letterSparse', - label: 'Sperrung', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z" /></svg>' - }, - { - type: 'toggle-mark', - mark: 'sup', - label: 'Hochgestellt', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z" /></svg>' - } - ] - }, - { - title: 'Einzelstellenverweis', - type: 'toolbar', - context: 'blocks.annotation', - entries: [ - { - type: 'select-attr', - attr: 'target', - valueSource: 'annotations' - } - ] - }, - { - title: 'Globalkommentarverweis Abschnitt (optional)', - type: 'toolbar', - context: 'blocks.annotationGlobal', - entries: [ - { - type: 'text-attr', - attr: 'headingId', - dataType: 'text' - } - ] - }, - { - title: 'Fußnotenmarkierung', - type: 'toolbar', - context: 'blocks.footnote', - entries: [ - { - type: 'text-attr', - attr: 'marker', - dataType: 'text' - } - ] - } - ] - }, - - // =============== - // Globalkommentar - // =============== - globalComment: { - title: 'Apparat', - type: 'single-text', - parser: { - selector: 'tei:text/tei:interpGrp[@type="global"]', - }, - serializer: { - tag: 'tei:text' - }, - schema: { - nodes: { - doc: { - content: 'block+', - parser: { - selector: 'tei:interpGrp[@type="global"]' - }, - serializer: { - tag: 'tei:interpGrp', - attrs: { - type: 'global', - 'xml:id': 'global' - } - } - }, - paragraph: { - group: 'block', - content: 'inline*', - parser: { - selector: 'tei:p' - }, - serializer: { - tag: 'tei:p' - }, - attrs: { - noIndent: { - default: false, - parser: { - selector: 'contains(@style, "no-indent")', - type: 'boolean' - }, - serializer: { - attr: 'style', - values: { - true: 'no-indent' - } - } - }, - textAlign: { - default: 'left', - parsers: [ - { - selector: "contains(@style, 'text-left')", - type: 'static', - value: 'left' - }, - { - selector: "contains(@style, 'text-center')", - type: 'static', - value: 'center' - }, - { - selector: "contains(@style, 'text-right')", - type: 'static', - value: 'right' - }, - { - selector: "contains(@style, 'text-justify')", - type: 'static', - value: 'justify' - } - ], - serializer: { - attr: 'style', - values: { - center: 'text-center', - right: 'text-right', - justify: 'text-justify' - } - } - } - }, - }, - heading: { - group: 'block', - content: 'inline*', - parser: { - selector: 'tei:head' - }, - serializer: { - tag: 'tei:head' - }, - attrs: { - headingId: { - default: '', - parser: { - selector: '@data-heading-id' - }, - serializer: { - attr: 'data-heading-id' - } - }, - level: { - default: 1, - parser: { - selector: 'substring(@type, 7)' - }, - serializer: { - attr: 'type', - value: 'level-${value}' - } - } - }, - defining: true - }, - source: { - group: 'block', - content: 'inline*', - parser: { - selector: 'tei:item' - }, - serializer: { - tag: 'tei:item' - }, - attrs: { - sourceId: { - default: '', - parser: { - selector: '@data-source-id' - }, - serializer: { - attr: 'data-source-id', - value: '${value}' - } - } - } - }, - sourceList: { - group: 'block', - content: 'source+', - parser: { - selector: 'tei:list[@type="sources"]' - }, - serializer: { - tag: 'tei:list', - attrs: { - type: 'sources' - } - } - }, - text: { - group: 'inline', - inline: true, - parsers: [ - { - selector: 'tei:seg', - text: 'text()' - }, - { - selector: 'tei:hi', - text: 'text()' - }, - ], - serializer: { - tag: 'tei:seg' - } - }, - pageLineRef: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:citedRange[@type="page-line-ref"]', - text: 'text()' - }, - serializer: { - tag: 'tei:citedRange', - attrs: { - type: 'page-line-ref' - } - } - }, - wordRange: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:citedRange[@type="word-range"]', - text: 'text()' - }, - serializer: { - tag: 'tei:citedRange', - attrs: { - type: 'word-range' - } - } - }, - annotationGlobal: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:ref[@target="#global"]', - text: 'text()' - }, - serializer: { - tag: 'tei:ref' - }, - attrs: { - target: { - default: 'global', - parser: { - selector: 'substring(@target, 2)' - }, - serializer: { - attr: 'target', - value: '#${value}' - } - }, - headingId: { - default: '', - parser: { - selector: '@data-heading-id' - }, - serializer: { - attr: 'data-heading-id' - } - } - } - }, - annotation: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:ref', - text: 'text()' - }, - serializer: { - tag: 'tei:ref' - }, - attrs: { - target: { - default: 'unknown', - parser: { - selector: 'substring(@target, 2)' - }, - serializer: { - attr: 'target', - value: '#${value}' - } - } - } - }, - foreignLanguage: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:foreign', - text: 'text()' - }, - serializer: { - tag: 'tei:foreign' - } - }, - quotation: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:q', - text: 'text()' - }, - serializer: { - tag: 'tei:q' - } - }, - lemma: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:lem', - text: 'text()' - }, - serializer: { - tag: 'tei:lem', - } - }, - sic: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:sic', - text: 'text()' - }, - serializer: { - tag: 'tei:sic', - } - }, - reading: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:rdg', - text: 'text()', - }, - serializer: { - tag: 'tei:rdg', - }, - attrs: { - wit: { - default: '', - parser: { - selector: 'substring(@wit, 2)', - }, - serializer: { - attr: 'wit', - value: '#${value}', - } - } - } - }, - missing: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:metamark[@function="missing"]', - text: 'text()' - }, - serializer: { - tag: 'tei:metamark' - }, - attrs: { - function: { - default: 'missing', - parser: { - selector: '@function', - }, - serializer: { - attr: 'function', - value: 'missing' - } - }, - }, - }, - }, - marks: { - letterSparse: { - parser: { - selector: 'contains(@style, "letter-sparse")' - }, - serializer: { - tag: 'tei:hi', - attrs: { - style: { - value: 'letter-sparse' - } - } - } - }, - sup: { - parser: { - selector: 'contains(@style, "sup")' - }, - serializer: { - tag: 'tei:hi', - attrs: { - style: { - value: 'sup' - } - } - } - }, - fontSize: { - parsers: [ - { - selector: "contains(@style, 'font-size-small')" - }, - { - selector: "contains(@style, 'font-size-medium')" - }, - { - selector: "contains(@style, 'font-size-large')" - } - ], - serializer: { - tag: 'tei:hi' - }, - attrs: { - size: { - default: '', - parsers: [ - { - selector: "contains(@style, 'font-size-small')", - type: 'static', - value: 'small' - }, - { - selector: "contains(@style, 'font-size-medium')", - type: 'static', - value: 'medium' - }, - { - selector: "contains(@style, 'font-size-large')", - type: 'static', - value: 'large' - } - ], - serializer: { - attr: 'style', - values: { - small: 'font-size-small', - medium: 'font-size-medium', - large: 'font-size-large' - } - } - } - } - }, - fontWeightBold: { - parser: { - selector: 'contains(@style, "font-weight-bold")' - }, - serializer: { - tag: 'tei:hi', - attrs: { - style: { - value: 'font-weight-bold' - } - } - } - }, - } - }, - ui: [ - { - title: 'Blocktypen', - type: 'block-type', - blocks: [ - { - type: 'heading', - label: 'Ãœberschrift' - }, - { - type: 'paragraph', - label: 'Absatz' - }, - { - type: 'sourceList', - label: 'Quellenliste', - wrapping: true - }, - { - type: 'source', - label: 'Quelle' - }, - ] - }, - { - title: 'Auszeichnungen', - type: 'block-type', - blocks: [ - { - type: 'pageLineRef', - label: 'Seite & Zeile' - }, - { - type: 'wordRange', - label: 'Wortspanne' - }, - { - type: 'annotation', - label: 'Einzelstellenverweis' - }, - { - type: 'annotationGlobal', - label: 'Globalkommentarverweis' - }, - { - type: 'foreignLanguage', - label: 'Fremdsprachiger Text' - }, - { - type: 'quotation', - label: 'Zitat' - }, - { - type: 'lemma', - label: 'Lemma' - }, - { - type: 'sic', - label: 'Textvorlage' - }, - { - type: 'reading', - label: 'Variante' - }, - { - type: 'missing', - label: 'Nicht ermittelt' - }, - ] - }, - { - title: 'Ãœberschrift', - type: 'toolbar', - context: 'blocks.heading', - entries: [ - { - type: 'select-attr', - attr: 'level', - values: [ - { - key: '1', - value: 'Ebene 1' - }, - { - key: '2', - value: 'Ebene 2' - }, - { - key: '3', - value: 'Ebene 3' - }, - { - key: '4', - value: 'Ebene 4' - } - ] - }, - { - type: 'text-attr', - attr: 'headingId', - dataType: 'text' - } - ] - }, - { - title: 'Absatz', - type: 'toolbar', - context: 'blocks.paragraph', - entries: [ - { - type: 'toggle-attr', - attr: 'noIndent', - label: "Nicht einrücken", - icon: { - on: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M11,17H21V15H11M3,8V16L7,12M3,21H21V19H3V21Z" /></svg>', - off: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M3,21H21V19H3M3,12L7,16V8M11,17H21V15H11V17Z" /></svg>' - } - }, - { - type: 'separator' - }, - { - type: 'set-attr', - attr: 'textAlign', - value: 'left', - label: 'Linksbündig', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z" /></svg>' - }, - { - type: 'set-attr', - attr: 'textAlign', - value: 'center', - label: 'Zentriert', - icon: '<svg style="viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z" /></svg>' - }, - { - type: 'set-attr', - attr: 'textAlign', - value: 'right', - label: 'Rechtsbündig', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z" /></svg>' - }, - { - type: 'set-attr', - attr: 'textAlign', - value: 'justify', - label: 'Block', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M3,7H21V9H3V7M3,11H21V13H3V11M3,15H21V17H3V15M3,19H21V21H3V19Z" /></svg>' - } - ] - }, - { - title: 'Quelle', - type: 'toolbar', - context: 'blocks.source', - entries: [ - { - type: 'text-attr', - attr: 'sourceId', - dataType: 'text' - } - ] - }, - { - title: 'Darstellung', - type: 'toolbar', - context: 'marks', - entries: [ - { - type: 'select-mark-attr', - mark: 'fontSize', - attr: 'size', - values: [ - { - key: '', - label: 'Normal' - }, - { - key: 'small', - label: 'Klein', - }, - { - key: 'medium', - label: 'Mittel', - }, - { - key: 'large', - label: 'Groß' - } - ] - }, - { - type: 'toggle-mark', - mark: 'fontWeightBold', - label: 'Fettdruck', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z" /></svg>' - }, - { - type: 'toggle-mark', - mark: 'letterSparse', - label: 'Sperrung', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z" /></svg>' - }, - { - type: 'toggle-mark', - mark: 'sup', - label: 'Hochgestellt', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z" /></svg>' - } - ] - }, - { - title: 'Einzelstellenverweis', - type: 'toolbar', - context: 'blocks.annotation', - entries: [ - { - type: 'select-attr', - attr: 'target', - valueSource: 'annotations' - } - ] - }, - { - title: 'Globalkommentarverweis Abschnitt (optional)', - type: 'toolbar', - context: 'blocks.annotationGlobal', - entries: [ - { - type: 'text-attr', - attr: 'headingId', - dataType: 'text' - } - ] - }, - { - title: 'Variante', - type: 'toolbar', - context: 'blocks.reading', - entries: [ - { - type: 'text-attr', - attr: 'wit', - dataType: 'text', - } - ] - }, - ] - }, - - // ======================== - // Einstelstellenkommentare - // ======================== - annotations: { - title: 'Einzelstellenerläuterungen', - type: 'multi-text', - parser: { - selector: 'tei:text/tei:interpGrp[@type="individual"]', - }, - serializer: { - tag: 'tei:text' - }, - parts: { - parser: { - selector: 'tei:interp' - }, - serializer: { - tag: 'tei:interpGrp', - attrs: { - type: 'individual' - } - } - }, - schema: { - nodes: { - doc: { - content: 'block+', - parser: { - selector: 'tei:interp' - }, - serializer: { - tag: 'tei:interp' - }, - attrs: { - id: { - default: 'unknown', - parser: { - selector: '@xml:id' - }, - serializer: { - attr: 'xml:id', - value: '${value}' - } - } - } - }, - paragraph: { - group: 'block', - content: 'inline*', - parser: { - selector: 'tei:p' - }, - serializer: { - tag: 'tei:p' - }, - attrs: { - textAlign: { - default: 'left', - parsers: [ - { - selector: "contains(@style, 'text-left')", - type: 'static', - value: 'left' - }, - { - selector: "contains(@style, 'text-center')", - type: 'static', - value: 'center' - }, - { - selector: "contains(@style, 'text-right')", - type: 'static', - value: 'right' - }, - { - selector: "contains(@style, 'text-justify')", - type: 'static', - value: 'justify' - } - ], - serializer: { - attr: 'style', - values: { - center: 'text-center', - right: 'text-right', - justify: 'text-justify' - } - } - } - }, - }, - text: { - group: 'inline', - inline: true, - parsers: [ - { - selector: 'tei:seg', - text: 'text()' - }, - { - selector: 'tei:hi', - text: 'text()' - }, - { - selector: 'tei:foreign', - text: 'text()' - }, - { - selector: 'tei:q', - text: 'text()' - } - ], - serializer: { - tag: 'tei:seg' - } - }, - pageLineRef: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:citedRange[@type="page-line-ref"]', - text: 'text()' - }, - serializer: { - tag: 'tei:citedRange', - attrs: { - type: 'page-line-ref' - } - } - }, - wordRange: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:citedRange[@type="word-range"]', - text: 'text()' - }, - serializer: { - tag: 'tei:citedRange', - attrs: { - type: 'word-range' - } - } - }, - annotationGlobal: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:ref[@target="#global"]', - text: 'text()' - }, - serializer: { - tag: 'tei:ref' - }, - attrs: { - target: { - default: 'global', - parser: { - selector: 'substring(@target, 2)' - }, - serializer: { - attr: 'target', - value: '#${value}' - } - }, - headingId: { - default: '', - parser: { - selector: '@data-heading-id' - }, - serializer: { - attr: 'data-heading-id' - } - } - } - }, - annotation: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:ref', - text: 'text()' - }, - serializer: { - tag: 'tei:ref' - }, - attrs: { - target: { - default: 'unknown', - parser: { - selector: 'substring(@target, 2)' - }, - serializer: { - attr: 'target', - value: '#${value}' - } - } - } - }, - foreignLanguage: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:foreign', - text: 'text()' - }, - serializer: { - tag: 'tei:foreign' - } - }, - quotation: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:q', - text: 'text()' - }, - serializer: { - tag: 'tei:q' - } - }, - missing: { - group: 'inline', - inline: true, - content: 'text*', - parser: { - selector: 'tei:metamark[@function="missing"]', - text: 'text()' - }, - serializer: { - tag: 'tei:metamark' - }, - attrs: { - function: { - default: 'missing', - serializer: { - attr: 'function', - value: 'missing' - } - }, - }, - }, - }, - marks: { - letterSparse: { - parser: { - selector: 'contains(@style, "letter-sparse")' - }, - serializer: { - tag: 'tei:hi', - attrs: { - style: { - value: 'letter-sparse' - } - } - } - }, - sup: { - parser: { - selector: 'contains(@style, "sup")' - }, - serializer: { - tag: 'tei:hi', - attrs: { - style: { - value: 'sup' - } - } - } - }, - fontSize: { - parsers: [ - { - selector: "contains(@style, 'font-size-small')" - }, - { - selector: "contains(@style, 'font-size-medium')" - }, - { - selector: "contains(@style, 'font-size-large')" - } - ], - serializer: { - tag: 'tei:hi' - }, - attrs: { - size: { - default: '', - parsers: [ - { - selector: "contains(@style, 'font-size-small')", - type: 'static', - value: 'small' - }, - { - selector: "contains(@style, 'font-size-medium')", - type: 'static', - value: 'medium' - }, - { - selector: "contains(@style, 'font-size-large')", - type: 'static', - value: 'large' - } - ], - serializer: { - attr: 'style', - values: { - small: 'font-size-small', - medium: 'font-size-medium', - large: 'font-size-large' - } - } - } - } - }, - } - }, - ui: [ - { - title: 'Schlüssel', - type: 'toolbar', - context: 'blocks.doc', - entries: [ - { - type: 'doc-text-attr', - attr: 'id' - } - ] - }, - { - title: 'Auszeichnungen', - type: 'block-type', - blocks: [ - { - type: 'pageLineRef', - label: 'Seite & Zeile' - }, - { - type: 'wordRange', - label: 'Wortspanne' - }, - { - type: 'annotation', - label: 'Einzelstellenverweis' - }, - { - type: 'annotationGlobal', - label: 'Globalkommentarverweis' - }, - { - type: 'foreignLanguage', - label: 'Fremdsprachiger Text' - }, - { - type: 'quotation', - label: 'Zitat' - }, - { - type: 'missing', - label: 'Nicht ermittelt' - }, - ] - }, - { - title: 'Absatz', - type: 'toolbar', - context: 'blocks.paragraph', - entries: [ - { - type: 'set-attr', - attr: 'textAlign', - value: 'left', - label: 'Linksbündig', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z" /></svg>' - }, - { - type: 'set-attr', - attr: 'textAlign', - value: 'center', - label: 'Zentriert', - icon: '<svg style="viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z" /></svg>' - }, - { - type: 'set-attr', - attr: 'textAlign', - value: 'right', - label: 'Rechtsbündig', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z" /></svg>' - }, - { - type: 'set-attr', - attr: 'textAlign', - value: 'justify', - label: 'Block', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M3,7H21V9H3V7M3,11H21V13H3V11M3,15H21V17H3V15M3,19H21V21H3V19Z" /></svg>' - } - ] - }, - { - title: 'Styling', - type: 'toolbar', - context: 'marks', - entries: [ - { - type: 'select-mark-attr', - mark: 'fontSize', - attr: 'size', - values: [ - { - key: '', - label: 'Normal' - }, - { - key: 'small', - label: 'Klein', - }, - { - key: 'medium', - label: 'Mittel', - }, - { - key: 'large', - label: 'Groß' - } - ] - }, - { - type: 'toggle-mark', - mark: 'fontWeightBold', - label: 'Fettdruck', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z" /></svg>' - }, - { - type: 'toggle-mark', - mark: 'letterSparse', - label: 'Sperrung', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z" /></svg>' - }, - { - type: 'toggle-mark', - mark: 'sup', - label: 'Hochgestellt', - icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z" /></svg>' - } - ] - }, - { - title: 'Einzelstellenverweis', - type: 'toolbar', - context: 'blocks.annotation', - entries: [ - { - type: 'select-attr', - attr: 'target', - valueSource: 'annotations' - } - ] - }, - { - title: 'Globalkommentarverweis Abschnitt (optional)', - type: 'toolbar', - context: 'blocks.annotationGlobal', - entries: [ - { - type: 'text-attr', - attr: 'headingId', - dataType: 'text' - } - ] - }, - ], - default: { - type: 'doc', - content: [ - { - type: 'paragraph', - content: [ - { - type: 'pageLineRef', - content: [ - { - type: 'text', - text: 'Seite & Zeile' - } - ], - }, - { - type: 'text', - text: ' ' - }, - { - type: 'wordRange', - content: [ - { - type: 'text', - text: 'Textspanne' - } - ], - } - ] - }, - { - type: 'paragraph', - content: [ - { - type: 'text', - text: 'Neuer Einzelstellenkommentar' - } - ] - } - ] - } - } - } - }); -})(); - -(function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e():"function"==typeof define&&define.amd?define(e):e()})(0,function(){"use strict" -function t(t="unreachable"){return new Error(t)}let e=0 -function n(){return Object.create(null)}const r=Object.freeze([]),i=1 -class s{validate(t){return this.value()===t}}s.id=0 -const o=[],a=[] -class l{constructor(t,e){this.type=t,this.inner=e}value(){return(0,o[this.type])(this.inner)}validate(t){return(0,a[this.type])(this.inner,t)}}function c(t){let e=o.length -o.push(t=>t.value()),a.push((t,e)=>t.validate(e)),t.id=e}o.push(()=>0),a.push((t,e)=>0===e) -const h=new l(0,null) -o.push(()=>NaN),a.push((t,e)=>NaN===e) -const p=new l(1,null) -o.push(()=>m),a.push((t,e)=>e===m) -const u=new l(2,null) -function d({tag:t}){return t===h}function f(t){return t===h}let m=i -class g extends s{static create(t=m){return new l(this.id,new g(t))}constructor(t=m){super(),this.revision=t}value(){return this.revision}dirty(){this.revision=++m}}function v(t){let e=[] -for(let n=0,r=t.length;n<r;n++){let r=t[n].tag -if(r===p)return p -r!==h&&e.push(r)}return k(e)}function y(t){let e=[],n=t.head() -for(;null!==n;){let r=n.tag -if(r===p)return p -r!==h&&e.push(r),n=t.nextNode(n)}return k(e)}function b(t){let e=[] -for(let n=0,r=t.length;n<r;n++){let r=t[n] -if(r===p)return p -r!==h&&e.push(r)}return k(e)}function k(t){switch(t.length){case 0:return h -case 1:return t[0] -case 2:return x.create(t[0],t[1]) -default:return S.create(t)}}c(g) -class w extends s{constructor(){super(...arguments),this.lastChecked=null,this.lastValue=null}value(){let t=this.lastChecked,e=this.lastValue -return t!==m&&(this.lastChecked=m,this.lastValue=e=this.compute()),this.lastValue}invalidate(){this.lastChecked=null}}class x extends w{static create(t,e){return new l(this.id,new x(t,e))}constructor(t,e){super(),this.first=t,this.second=e}compute(){return Math.max(this.first.value(),this.second.value())}}c(x) -class S extends w{static create(t){return new l(this.id,new S(t))}constructor(t){super(),this.tags=t}compute(){let t=this.tags,e=-1 -for(let n=0;n<t.length;n++){let r=t[n].value() -e=Math.max(r,e)}return e}}c(S) -class C extends w{static create(t){return new l(this.id,new C(t))}constructor(t){super(),this.tag=t,this.lastUpdated=i}compute(){return Math.max(this.lastUpdated,this.tag.value())}update(t){t!==this.tag&&(this.tag=t,this.lastUpdated=m,this.invalidate())}}c(C) -class M{constructor(){this.lastRevision=null,this.lastValue=null}value(){let t=this.tag,e=this.lastRevision,n=this.lastValue -return null!==e&&t.validate(e)||(n=this.lastValue=this.compute(),this.lastRevision=t.value()),n}invalidate(){this.lastRevision=null}}class O{constructor(t){this.lastValue=null,this.lastRevision=null,this.initialized=!1,this.tag=t.tag,this.reference=t}peek(){return this.initialized?this.lastValue:this.initialize()}revalidate(){if(!this.initialized)return this.initialize() -let t=this.reference,e=this.lastRevision,n=t.tag -if(n.validate(e))return E -this.lastRevision=n.value() -let r=this.lastValue,i=t.value() -return i===r?E:(this.lastValue=i,i)}initialize(){let t=this.reference,e=this.lastValue=t.value() -return this.lastRevision=t.tag.value(),this.initialized=!0,e}}const E="adb3b78e-3d22-4e4b-877a-6317c2c5c145" -function T(t){return t!==E}class A{constructor(t){this.inner=t,this.tag=h}value(){return this.inner}}class N{constructor(t){this.next=null,this.prev=null,this.value=t}}class D{constructor(){this.clear()}head(){return this._head}tail(){return this._tail}clear(){this._head=this._tail=null}toArray(){let t=[] -return this.forEachNode(e=>t.push(e)),t}nextNode(t){return t.next}forEachNode(t){let e=this._head -for(;null!==e;)t(e),e=e.next}insertBefore(t,e=null){return null===e?this.append(t):(e.prev?e.prev.next=t:this._head=t,t.prev=e.prev,t.next=e,e.prev=t,t)}append(t){let e=this._tail -return e?(e.next=t,t.prev=e,t.next=null):this._head=t,this._tail=t}remove(t){return t.prev?t.prev.next=t.next:this._head=t.next,t.next?t.next.prev=t.prev:this._tail=t.prev,t}}Object.freeze([]) -class _ extends N{constructor(t,e){super(t.valueReferenceFor(e)),this.retained=!1,this.seen=!1,this.key=e.key,this.iterable=t,this.memo=t.memoReferenceFor(e)}update(t){this.retained=!0,this.iterable.updateValueReference(this.value,t),this.iterable.updateMemoReference(this.memo,t)}shouldRemove(){return!this.retained}reset(){this.retained=!1,this.seen=!1}}class R{constructor(t){this.iterator=null,this.map=Object.create(null),this.list=new D,this.tag=t.tag,this.iterable=t}isEmpty(){return(this.iterator=this.iterable.iterate()).isEmpty()}iterate(){let t -return t=null===this.iterator?this.iterable.iterate():this.iterator,this.iterator=null,t}has(t){return!!this.map[t]}get(t){return this.map[t]}wasSeen(t){let e=this.map[t] -return void 0!==e&&e.seen}append(t){let e=this.map,n=this.list,r=this.iterable,i=e[t.key]=new _(r,t) -return n.append(i),i}insertBefore(t,e){let n=this.map,r=this.list,i=this.iterable,s=n[t.key]=new _(i,t) -return s.retained=!0,r.insertBefore(s,e),s}move(t,e){let n=this.list -t.retained=!0,n.remove(t),n.insertBefore(t,e)}remove(t){this.list.remove(t),delete this.map[t.key]}nextNode(t){return this.list.nextNode(t)}head(){return this.list.head()}}class I{constructor(t){this.iterator=null -let e=new R(t) -this.artifacts=e}next(){let t=this.artifacts,e=(this.iterator=this.iterator||t.iterate()).next() -return null===e?null:t.append(e)}}var B;(function(t){t[t.Append=0]="Append",t[t.Prune=1]="Prune",t[t.Done=2]="Done"})(B||(B={})) -class z{constructor({target:t,artifacts:e}){this.target=t,this.artifacts=e,this.iterator=e.iterate(),this.current=e.head()}sync(){let t=B.Append -for(;;)switch(t){case B.Append:t=this.nextAppend() -break -case B.Prune:t=this.nextPrune() -break -case B.Done:return void this.nextDone()}}advanceToKey(t){let e=this.current,n=this.artifacts,r=e -for(;null!==r&&r.key!==t;)r.seen=!0,r=n.nextNode(r) -null!==r&&(this.current=n.nextNode(r))}nextAppend(){let t=this.iterator,e=this.current,n=this.artifacts,r=t.next() -if(null===r)return this.startPrune() -let i=r.key -return null!==e&&e.key===i?this.nextRetain(r):n.has(i)?this.nextMove(r):this.nextInsert(r),B.Append}nextRetain(t){let e=this.artifacts,n=this.current;(n=n).update(t),this.current=e.nextNode(n),this.target.retain(t.key,n.value,n.memo)}nextMove(t){let e=this.current,n=this.artifacts,r=this.target,i=t.key,s=n.get(t.key) -s.update(t),n.wasSeen(t.key)?(n.move(s,e),r.move(s.key,s.value,s.memo,e?e.key:null)):this.advanceToKey(i)}nextInsert(t){let e=this.artifacts,n=this.target,r=this.current,i=e.insertBefore(t,r) -n.insert(i.key,i.value,i.memo,r?r.key:null)}startPrune(){return this.current=this.artifacts.head(),B.Prune}nextPrune(){let t=this.artifacts,e=this.target,n=this.current -if(null===n)return B.Done -let r=n -return this.current=t.nextNode(r),r.shouldRemove()?(t.remove(r),e.delete(r.key)):r.reset(),B.Prune}nextDone(){this.target.done()}}class P{constructor(){this.tags=new Set}add(t){this.tags.add(t)}combine(){let t=this.tags -return 0===t.size?h:b([...t])}}function F(...t){let e=t[0],n=t[1],r=t[2] -if(r)return function(t,e,n){let r=H(t) -r.trackedProperties[e]=!0,r.trackedComputedProperties[e]=!0 -let i=n.get,s=n.set -return{enumerable:!0,configurable:!1,get:function(){let t=V,n=V=new P,r=i.call(this) -V=t -let s=n.combine() -V&&V.add(s) -return H(this).updatableTagFor(e).inner.update(s),r},set:s?function(){q.inner.dirty(),H(this).updatableTagFor(e).inner.update(g.create()),s.apply(this,arguments)}:void 0}}(e,n,r);(function(t,e){let n=Symbol(e) -H(t).trackedProperties[e]=!0,Object.defineProperty(t,e,{configurable:!0,get(){return L(this,e),this[n]},set(t){q.inner.dirty(),H(this).updatableTagFor(e).inner.update(g.create()),this[n]=t,J()}})})(e,n)}let V=null -function L(t,e){V&&V.add(H(t).updatableTagFor(e))}class j{constructor(t){this.tags=n(),this.computedPropertyTags=n(),this.trackedProperties=t?Object.create(t.trackedProperties):n(),this.trackedComputedProperties=t?Object.create(t.trackedComputedProperties):n()}tagFor(t){let e=this.tags[t] -return e||(this.trackedComputedProperties[t]?this.tags[t]=this.updatableTagFor(t):this.tags[t]=g.create())}updatableTagFor(t){let e -return this.trackedComputedProperties[t]?(e=this.computedPropertyTags[t])||(this.computedPropertyTags[t]=C.create(h)):(e=this.tags[t])||(this.tags[t]=C.create(h))}}const $=new WeakMap -function H(t){let e=$.get(t) -if(e)return e -let n=function(t){let e=null,n=t -for(;!e;){if(!(n=U(n)))return e -e=$.get(n)}return e}(t) -return e=new j(n),$.set(t,e),e}const U=Object.getPrototypeOf -const q=g.create() -let J=function(){} -class W extends Error{constructor(t,e,n){super(n),this.target=t,this.key=e}static for(t,e){return new W(t,e,`The property '${e}' on ${t} was changed after being rendered. If you want to change a property used in a template after the component has rendered, mark the property as a tracked property with the @tracked decorator.`)}}function K(t,e,n=function(t,e){throw W.for(t,e)}){if("object"==typeof t&&t){return H(t).tagFor(e)}return h}class G{constructor(t){this.debugName=null,this.__args__=null,Object.assign(this,t)}get element(){let t=this.bounds -return function(t,e){if(!t)throw new Error(e||"assertion failure")}(t&&t.firstNode===t.lastNode,"The 'element' property can only be accessed on components that contain a single root element in their template. Try using 'bounds' instead to access the first and last nodes."),t.firstNode}get args(){return L(this,"args"),this.__args__}set args(t){this.__args__=t,H(this).updatableTagFor("args").inner.update(u)}static create(t){return new this(t)}didInsertElement(){}didUpdate(){}willDestroy(){}destroy(){this.willDestroy()}toString(){return`${this.debugName} component`}}const Y={attributeHook:!0,createArgs:!0,createCaller:!1,createInstance:!0,dynamicLayout:!1,dynamicScope:!1,dynamicTag:!0,elementHook:!0,prepareArgs:!1,updateHook:!0} -class X{constructor(t,e,n,r){this.name=t,this.manager=e,this.ComponentClass=n,this.handle=r,this.state={name:t,capabilities:Y,ComponentClass:n,handle:r}}toJSON(){return{GlimmerDebug:`<component-definition name="${this.name}">`}}}class Q{constructor(t){this._bounds=t}get firstNode(){return this._bounds.firstNode()}get lastNode(){return this._bounds.lastNode()}}const Z=new class{constructor(){this.evaluateOpcode=function(t){let e=new Array(t) -for(let n=0;n<t;n++)e[n]=null -return e}(98).slice()}add(t,e,n="syscall"){this.evaluateOpcode[t]={syscall:"syscall"===n,evaluate:e}}debugBefore(t,e,n){return{sp:void 0,state:void 0}}debugAfter(t,e,n,r){r.sp,r.state}evaluate(t,e,n){let r=this.evaluateOpcode[n] -r.syscall?r.evaluate(t,e):r.evaluate(t.inner,e)}} -class tt{constructor(){this._guid=++e}}class et extends tt{constructor(){super(...arguments),this.next=null,this.prev=null}}var nt;(function(t){t[t.pc=0]="pc",t[t.ra=1]="ra",t[t.fp=2]="fp",t[t.sp=3]="sp",t[t.s0=4]="s0",t[t.s1=5]="s1",t[t.t0=6]="t0",t[t.t1=7]="t1",t[t.v0=8]="v0"})(nt||(nt={})) -class rt extends A{constructor(t){super(t)}static create(t){return void 0===t?ot:null===t?at:!0===t?lt:!1===t?ct:"number"==typeof t?new st(t):new it(t)}get(t){return ot}}class it extends rt{constructor(){super(...arguments),this.lengthReference=null}get(t){if("length"===t){let t=this.lengthReference -return null===t&&(t=this.lengthReference=new st(this.inner.length)),t}return super.get(t)}}class st extends rt{constructor(t){super(t)}}const ot=new st(void 0),at=new st(null),lt=new st(!0),ct=new st(!1) -class ht{constructor(t){this.inner=t,this.tag=t.tag}value(){return this.toBool(this.inner.value())}toBool(t){return!!t}}class pt extends M{constructor(t){super(),this.parts=t,this.tag=v(t)}compute(){let t=new Array -for(let e=0;e<this.parts.length;e++){let n=this.parts[e].value() -null!=n&&(t[e]=ut(n))}return t.length>0?t.join(""):null}}function ut(t){return"function"!=typeof t.toString?"":String(t)}Z.add(1,(t,{op1:e})=>{let n=t.stack,r=t.constants.resolveHandle(e)(t,n.pop()) -t.loadValue(nt.v0,r)}),Z.add(6,(t,{op1:e})=>{let n=t.referenceForSymbol(e) -t.stack.push(n)}),Z.add(4,(t,{op1:e})=>{let n=t.stack.pop() -t.scope().bindSymbol(e,n)}),Z.add(5,(t,{op1:e})=>{let n=t.stack.pop(),r=t.stack.pop(),i=t.stack.pop(),s=i?[n,r,i]:null -t.scope().bindBlock(e,s)}),Z.add(96,(t,{op1:e})=>{let n=t.constants.getString(e),r=t.scope().getPartialMap()[n] -void 0===r&&(r=t.getSelf().get(n)),t.stack.push(r)}),Z.add(20,(t,{op1:e,op2:n})=>{t.pushRootScope(e,!!n)}),Z.add(7,(t,{op1:e})=>{let n=t.constants.getString(e),r=t.stack.pop() -t.stack.push(r.get(n))}),Z.add(8,(t,{op1:e})=>{let n=t.stack,r=t.scope().getBlock(e) -r?(n.push(r[2]),n.push(r[1]),n.push(r[0])):(n.push(null),n.push(null),n.push(null))}),Z.add(9,(t,{op1:e})=>{let n=!!t.scope().getBlock(e) -t.stack.push(n?lt:ct)}),Z.add(10,t=>{t.stack.pop(),t.stack.pop() -let e=t.stack.pop(),n=e&&e.parameters.length -t.stack.push(n?lt:ct)}),Z.add(11,(t,{op1:e})=>{let n=new Array(e) -for(let r=e;r>0;r--){n[r-1]=t.stack.pop()}t.stack.push(new pt(n))}) -const dt="CURRIED COMPONENT DEFINITION [id=6f00feb9-a0ef-4547-99ea-ac328f80acea]" -function ft(t){return!(!t||!t[dt])}class mt{constructor(t,e){this.inner=t,this.args=e,this[dt]=!0}unwrap(t){t.realloc(this.offset) -let e=this -for(;;){var n=e -let r=n.args,i=n.inner -if(r&&(t.positional.prepend(r.positional),t.named.merge(r.named)),!ft(i))return i -e=i}}get offset(){let t=this.inner,e=this.args,n=e?e.positional.length:0 -return ft(t)?n+t.offset:n}}function gt(t){return vt(t)?"":String(t)}function vt(t){return null==t||"function"!=typeof t.toString}function yt(t){return"object"==typeof t&&null!==t&&"number"==typeof t.nodeType}function bt(t){return"string"==typeof t}class kt extends et{constructor(t,e,n){super(),this.node=t,this.reference=e,this.lastValue=n,this.type="dynamic-text",this.tag=e.tag,this.lastRevision=this.tag.value()}evaluate(){let t=this.reference,e=this.tag -e.validate(this.lastRevision)||(this.lastRevision=e.value(),this.update(t.value()))}update(t){let e,n=this.lastValue -if(t!==n&&(e=vt(t)?"":bt(t)?t:String(t))!==n){this.node.nodeValue=this.lastValue=e}}}class wt extends ht{static create(t){return new wt(t)}toBool(t){return ft(t)}}class xt{constructor(t){this.inner=t,this.tag=t.tag}value(){let t=this.inner.value() -return function(t){return bt(t)||vt(t)||"boolean"==typeof t||"number"==typeof t}(t)?1:(e=t)&&e[dt]?0:function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.toHTML}(t)?3:function(t){return yt(t)&&11===t.nodeType}(t)?4:yt(t)?5:1 -var e}}Z.add(28,t=>{let e=t.stack.pop().value(),n=vt(e)?"":String(e) -t.elements().appendDynamicHTML(n)}),Z.add(29,t=>{let e=t.stack.pop().value().toHTML(),n=vt(e)?"":e -t.elements().appendDynamicHTML(n)}),Z.add(32,t=>{let e=t.stack.pop(),n=e.value(),r=vt(n)?"":String(n),i=t.elements().appendDynamicText(r) -d(e)||t.updateWith(new kt(i,e,r))}),Z.add(30,t=>{let e=t.stack.pop().value() -t.elements().appendDynamicFragment(e)}),Z.add(31,t=>{let e=t.stack.pop().value() -t.elements().appendDynamicNode(e)}),Z.add(22,t=>t.pushChildScope()),Z.add(23,t=>t.popScope()),Z.add(44,t=>t.pushDynamicScope()),Z.add(45,t=>t.popDynamicScope()),Z.add(12,(t,{op1:e})=>{t.stack.push(t.constants.getOther(e))}),Z.add(13,(t,{op1:e})=>{let n=t.stack,r=e>>3 -switch(7&e){case 0:n.push(r) -break -case 1:n.push(t.constants.getNumber(r)) -break -case 2:n.push(t.constants.getString(r)) -break -case 3:n.pushEncodedImmediate(e) -break -case 4:case 5:n.push(t.constants.getNumber(r))}}),Z.add(14,t=>{let e=t.stack -e.push(rt.create(e.pop()))}),Z.add(15,t=>{let e=t.stack -e.push(e.peek().value())}),Z.add(16,(t,{op1:e,op2:n})=>{let r=t.fetchValue(e)-n -t.stack.dup(r)}),Z.add(17,(t,{op1:e})=>{t.stack.pop(e)}),Z.add(18,(t,{op1:e})=>{t.load(e)}),Z.add(19,(t,{op1:e})=>{t.fetch(e)}),Z.add(43,(t,{op1:e})=>{let n=t.constants.getArray(e) -t.bindDynamicScope(n)}),Z.add(61,(t,{op1:e})=>{t.enter(e)}),Z.add(62,t=>{t.exit()}),Z.add(48,(t,{op1:e})=>{t.stack.push(t.constants.getSerializable(e))}),Z.add(47,t=>{t.stack.push(t.scope())}),Z.add(46,t=>{let e=t.stack,n=e.pop() -n?e.pushSmi(n.compile()):e.pushNull()}),Z.add(51,t=>{let e=t.stack,n=e.pop(),r=e.pop(),i=e.pop(),s=e.pop() -if(null===i)return t.pushFrame(),void t.pushScope(r) -let o=r -{let t=i.parameters,e=t.length -if(e>0){o=o.child() -for(let n=0;n<e;n++)o.bindSymbol(t[n],s.at(n))}}t.pushFrame(),t.pushScope(o),t.call(n)}),Z.add(53,(t,{op1:e})=>{let n=t.stack.pop() -if(d(n))n.value()&&t.goto(e) -else{let r=new O(n) -r.peek()&&t.goto(e),t.updateWith(new St(r))}}),Z.add(54,(t,{op1:e})=>{let n=t.stack.pop() -if(d(n))n.value()||t.goto(e) -else{let r=new O(n) -r.peek()||t.goto(e),t.updateWith(new St(r))}}),Z.add(55,(t,{op1:e,op2:n})=>{t.stack.peek()===n&&t.goto(e)}),Z.add(56,t=>{let e=t.stack.peek() -d(e)||t.updateWith(St.initialize(new O(e)))}),Z.add(63,t=>{let e=t.env,n=t.stack -n.push(e.toConditionalReference(n.pop()))}) -class St extends et{constructor(t){super(),this.type="assert",this.tag=t.tag,this.cache=t}static initialize(t){let e=new St(t) -return t.peek(),e}evaluate(t){T(this.cache.revalidate())&&t.throw()}}Z.add(26,(t,{op1:e})=>{t.elements().appendText(t.constants.getString(e))}),Z.add(27,(t,{op1:e})=>{t.elements().appendComment(t.constants.getString(e))}),Z.add(33,(t,{op1:e})=>{t.elements().openElement(t.constants.getString(e))}),Z.add(34,t=>{let e=t.stack.pop().value() -t.elements().openElement(e)}),Z.add(41,t=>{let e,n,r=t.stack.pop(),i=t.stack.pop(),s=t.stack.pop().value() -if(d(r))e=r.value() -else{let n=new O(r) -e=n.peek(),t.updateWith(new St(n))}if(d(i))n=i.value() -else{let e=new O(i) -n=e.peek(),t.updateWith(new St(e))}t.elements().pushRemoteElement(e,s,n)}),Z.add(42,t=>{t.elements().popRemoteElement()}),Z.add(38,t=>{let e=t.fetchValue(nt.t0) -e&&(e.flush(t),t.loadValue(nt.t0,null)),t.elements().flushElement()}),Z.add(39,t=>{t.elements().closeElement()}),Z.add(40,(t,{op1:e})=>{let n=t.constants.resolveHandle(e),r=t.stack.pop() -var i=t.elements() -let s=i.constructing,o=i.updateOperations,a=t.dynamicScope(),l=n.create(s,r,a,o) -t.env.scheduleInstallModifier(l,n) -let c=n.getDestructor(l) -c&&t.newDestroyable(c) -let h=n.getTag(l) -f(h)||t.updateWith(new Ct(h,n,l))}) -class Ct extends et{constructor(t,e,n){super(),this.tag=t,this.manager=e,this.modifier=n,this.type="update-modifier",this.lastUpdated=t.value()}evaluate(t){let e=this.manager,n=this.modifier,r=this.tag,i=this.lastUpdated -r.validate(i)||(t.env.scheduleUpdateModifier(n,e),this.lastUpdated=r.value())}}Z.add(35,(t,{op1:e,op2:n,op3:r})=>{let i=t.constants.getString(e),s=t.constants.getString(n),o=r?t.constants.getString(r):null -t.elements().setStaticAttribute(i,s,o)}),Z.add(36,(t,{op1:e,op2:n,op3:r})=>{let i=t.constants.getString(e),s=t.stack.pop(),o=s.value(),a=r?t.constants.getString(r):null,l=t.elements().setDynamicAttribute(i,o,!!n,a) -d(s)||t.updateWith(new Mt(s,l))}) -class Mt extends et{constructor(t,e){super(),this.reference=t,this.attribute=e,this.type="patch-element",this.tag=t.tag,this.lastRevision=this.tag.value()}evaluate(t){let e=this.attribute,n=this.reference,r=this.tag -r.validate(this.lastRevision)||(this.lastRevision=r.value(),e.update(n.value(),t.env))}}function Ot(t,e,n){return t.lookupComponentDefinition(e,n)}class Et{constructor(t,e,n,r){this.inner=t,this.resolver=e,this.meta=n,this.args=r,this.tag=t.tag,this.lastValue=null,this.lastDefinition=null}value(){let t=this.inner,e=this.lastValue,n=t.value() -if(n===e)return this.lastDefinition -let r=null -if(ft(n))r=n -else if("string"==typeof n&&n){r=Ot(this.resolver,n,this.meta)}return r=this.curry(r),this.lastValue=n,this.lastDefinition=r,r}get(){return ot}curry(t){let e=this.args -return!e&&ft(t)?t:t?new mt(t,e):null}}class Tt{constructor(t){this.list=t,this.tag=v(t),this.list=t}value(){let t=[],e=this.list -for(let n=0;n<e.length;n++){let r=gt(e[n].value()) -r&&t.push(r)}return 0===t.length?null:t.join(" ")}}function At(t){return 0|(t.dynamicLayout?1:0)|(t.dynamicTag?2:0)|(t.prepareArgs?4:0)|(t.createArgs?8:0)|(t.attributeHook?16:0)|(t.elementHook?32:0)|(t.dynamicScope?64:0)|(t.createCaller?128:0)|(t.updateHook?256:0)|(t.createInstance?512:0)}function Nt(t,e){return!!(t&e)}Z.add(69,t=>{let e=t.stack,n=e.pop() -e.push(wt.create(n))}),Z.add(70,t=>{let e=t.stack,n=e.peek() -e.push(new xt(n))}),Z.add(71,(t,{op1:e})=>{let n=t.stack,r=n.pop(),i=n.pop(),s=t.constants.getSerializable(e),o=t.constants.resolver -t.loadValue(nt.v0,new Et(r,o,s,i))}),Z.add(72,(t,{op1:e})=>{let n=t.constants.resolveHandle(e),r=n.manager,i=At(r.getCapabilities(n.state)),s={definition:n,manager:r,capabilities:i,state:null,handle:null,table:null,lookup:null} -t.stack.push(s)}),Z.add(75,(e,{op1:n})=>{let r,i=e.stack,s=i.pop().value(),o=e.constants.getSerializable(n) -if(e.loadValue(nt.t1,null),"string"==typeof s){r=Ot(e.constants.resolver,s,o)}else{if(!ft(s))throw t() -r=s}i.push(r)}),Z.add(73,t=>{let e,n,r=t.stack,i=r.pop() -ft(i)?n=e=null:e=At((n=i.manager).getCapabilities(i.state)),r.push({definition:i,capabilities:e,manager:n,state:null,handle:null,table:null})}),Z.add(74,(e,{op1:n})=>{let r,i=e.stack,s=i.pop().value() -if(!ft(s))throw t() -r=s,i.push(r)}),Z.add(76,(t,{op1:e,op2:n})=>{let r=t.stack,i=t.constants.getStringArray(e),s=n>>4,o=8&n,a=[] -4&n&&a.push("main"),2&n&&a.push("else"),1&n&&a.push("attrs"),t.args.setup(r,i,a,s,!!o),r.push(t.args)}),Z.add(77,t=>{let e=t.stack -e.push(t.args.empty(e))}),Z.add(80,t=>{let e=t.stack,n=e.pop().capture() -e.push(n)}),Z.add(79,(t,{op1:e})=>{let n=t.stack,r=t.fetchValue(e),i=n.pop(),s=r.definition -ft(s)&&(s=function(t,e,n){let r=t.definition=e.unwrap(n),i=r.manager,s=r.state -return t.manager=i,t.capabilities=At(i.getCapabilities(s)),r}(r,s,i)) -var o=s -let a=o.manager,l=o.state -if(!0!==Nt(r.capabilities,4))return void n.push(i) -let c=i.blocks.values,h=i.blocks.names,p=a.prepareArgs(l,i) -if(p){i.clear() -for(let i=0;i<c.length;i++)n.push(c[i]) -let t=p.positional,e=p.named,r=t.length -for(let i=0;i<r;i++)n.push(t[i]) -let s=Object.keys(e) -for(let i=0;i<s.length;i++)n.push(e[s[i]]) -i.setup(n,s,h,r,!0)}n.push(i)}),Z.add(81,(t,{op1:e,op2:n})=>{let r=t.fetchValue(n),i=r.definition,s=r.manager,o=r.capabilities=At(s.getCapabilities(i.state)),a=null -Nt(o,64)&&(a=t.dynamicScope()) -let l=1&e,c=null -Nt(o,8)&&(c=t.stack.peek()) -let h=null -Nt(o,128)&&(h=t.getSelf()) -let p=s.create(t.env,i.state,c,a,h,!!l) -r.state=p -let u=s.getTag(p) -Nt(o,256)&&!f(u)&&t.updateWith(new Rt(u,p,s,a))}),Z.add(82,(t,{op1:e})=>{var n=t.fetchValue(e) -let r=n.manager,i=n.state,s=r.getDestructor(i) -s&&t.newDestroyable(s)}),Z.add(91,t=>{t.beginCacheGroup(),t.elements().pushSimpleBlock()}),Z.add(83,t=>{t.loadValue(nt.t0,new Dt)}),Z.add(37,(t,{op1:e,op2:n,op3:r})=>{let i=t.constants.getString(e),s=t.stack.pop(),o=r?t.constants.getString(r):null -t.fetchValue(nt.t0).setAttribute(i,s,!!n,o)}) -class Dt{constructor(){this.attributes=n(),this.classes=[]}setAttribute(t,e,n,r){let i={value:e,namespace:r,trusting:n} -"class"===t&&this.classes.push(e),this.attributes[t]=i}flush(t){for(let e in this.attributes){let n=this.attributes[e],r=n.value,i=n.namespace,s=n.trusting -if("class"===e&&(r=new Tt(this.classes)),"type"===e)continue -let o=t.elements().setDynamicAttribute(e,r.value(),s,i) -d(r)||t.updateWith(new Mt(r,o))}if("type"in this.attributes){let e=this.attributes.type,n=e.value,r=e.namespace,i=e.trusting,s=t.elements().setDynamicAttribute("type",n.value(),i,r) -d(n)||t.updateWith(new Mt(n,s))}}}function _t(t,e,n,r,i){let s=n.table.symbols.indexOf(t),o=r.get(e);-1!==s&&i.scope().bindBlock(s+1,o),n.lookup&&(n.lookup[t]=o)}Z.add(93,(t,{op1:e})=>{var n=t.fetchValue(e) -let r=n.definition,i=n.state,s=r.manager,o=t.fetchValue(nt.t0) -s.didCreateElement(i,t.elements().expectConstructing("DidCreateElementOpcode#evaluate"),o)}),Z.add(84,(t,{op1:e})=>{var n=t.fetchValue(e) -let r=n.definition,i=n.state,s=r.manager -t.stack.push(s.getSelf(i))}),Z.add(85,(t,{op1:e})=>{var n=t.fetchValue(e) -let r=n.definition,i=n.state,s=r.manager -t.stack.push(s.getTagName(i))}),Z.add(86,(e,{op1:n})=>{let r,i=e.fetchValue(n),s=i.manager,o=i.definition,a=e.constants.resolver,l=e.stack,c=i.state,h=i.capabilities,p=o.state -if(function(t,e){return!1===Nt(t,1)}(h))r=s.getLayout(p,a) -else{if(!function(t,e){return!0===Nt(t,1)}(h))throw t() -r=s.getDynamicLayout(c,a)}l.push(r.symbolTable),l.push(r.handle)}),Z.add(68,(t,{op1:e})=>{let n=t.stack.pop(),r=t.stack.pop(),i=n.manager,s=At(i.getCapabilities(n.state)),o={definition:n,manager:i,capabilities:s,state:null,handle:r.handle,table:r.symbolTable,lookup:null} -t.loadValue(e,o)}),Z.add(89,(t,{op1:e})=>{let n=t.stack,r=n.pop(),i=n.pop(),s=t.fetchValue(e) -s.handle=r,s.table=i}),Z.add(21,(t,{op1:e})=>{let n=t.fetchValue(e).table.symbols -t.pushRootScope(n.length+1,!0)}),Z.add(87,(t,{op1:e})=>{let r=t.fetchValue(e) -if(r.table.hasEval){let e=r.lookup=n() -t.scope().bindEvalScope(e)}}),Z.add(2,(t,{op1:e})=>{let n=t.fetchValue(e),r=t.scope(),i=t.stack.peek(),s=i.named.atNames -for(let o=s.length-1;o>=0;o--){let t=s[o],e=n.table.symbols.indexOf(s[o]),a=i.named.get(t,!1);-1!==e&&r.bindSymbol(e+1,a),n.lookup&&(n.lookup[t]=a)}}),Z.add(3,(t,{op1:e})=>{let n=t.fetchValue(e) -let r=t.stack.peek().blocks -_t("&attrs","attrs",n,r,t),_t("&inverse","else",n,r,t),_t("&default","main",n,r,t)}),Z.add(90,(t,{op1:e})=>{let n=t.fetchValue(e) -t.call(n.handle)}),Z.add(94,(t,{op1:e})=>{var n=t.fetchValue(e) -let r=n.manager,i=n.state,s=t.elements().popBlock() -r.didRenderLayout(i,s),t.env.didCreate(i,r),t.updateWith(new It(r,i,s))}),Z.add(92,t=>{t.commitCacheGroup()}) -class Rt extends et{constructor(t,e,n,r){super(),this.tag=t,this.component=e,this.manager=n,this.dynamicScope=r,this.type="update-component"}evaluate(t){let e=this.component,n=this.manager,r=this.dynamicScope -n.update(e,r)}}class It extends et{constructor(t,e,n){super(),this.manager=t,this.component=e,this.bounds=n,this.type="did-update-layout",this.tag=h}evaluate(t){let e=this.manager,n=this.component,r=this.bounds -e.didUpdateLayout(n,r),t.env.didUpdate(n,e)}}let Bt=function(t,e){console.info("Use `context`, and `get(<path>)` to debug this template."),e("this")} -class zt{constructor(t,e,r){this.scope=t,this.locals=n() -for(let n=0;n<r.length;n++){let i=r[n],s=e[i-1],o=t.getSymbol(i) -this.locals[s]=o}}get(t){let e=this.scope,n=this.locals,r=t.split(".") -var i=t.split(".") -let s,o=i[0],a=i.slice(1),l=e.getEvalScope() -return"this"===o?s=e.getSelf():n[o]?s=n[o]:0===o.indexOf("@")&&l[o]?s=l[o]:(s=this.scope.getSelf(),a=r),a.reduce((t,e)=>t.get(e),s)}}Z.add(97,(t,{op1:e,op2:n})=>{let r=t.constants.getStringArray(e),i=t.constants.getArray(n),s=new zt(t.scope(),r,i) -Bt(t.getSelf().value(),t=>s.get(t).value())}),Z.add(95,(t,{op1:e,op2:n,op3:r})=>{let i=t.constants,s=t.constants.resolver,o=t.stack.pop().value(),a=i.getSerializable(e),l=i.getStringArray(n),c=i.getArray(r),h=s.lookupPartial(o,a) -var p=s.resolve(h).getPartial() -let u=p.symbolTable,d=p.handle -{let e=u.symbols,n=t.scope(),r=t.pushRootScope(e.length,!1),i=n.getEvalScope() -r.bindCallerScope(n.getCallerScope()),r.bindEvalScope(i),r.bindSelf(n.getSelf()) -let s=Object.create(n.getPartialMap()) -for(let t=0;t<c.length;t++){let e=c[t],r=l[e-1],i=n.getSymbol(e) -s[r]=i}if(i)for(let t=0;t<e.length;t++){let n=t+1,s=i[e[t]] -void 0!==s&&r.bind(n,s)}r.bindPartialMap(s),t.pushFrame(),t.call(d)}}) -class Pt{constructor(t){this.tag=t.tag,this.artifacts=t}value(){return!this.artifacts.isEmpty()}}Z.add(66,t=>{let e=t.stack,n=e.pop(),r=e.pop(),i=t.env.iterableFor(n,r.value()),s=new I(i) -e.push(s),e.push(new Pt(s.artifacts))}),Z.add(64,(t,{op1:e})=>{t.enterList(e)}),Z.add(65,t=>{t.exitList()}),Z.add(67,(t,{op1:e})=>{let n=t.stack.peek().next() -if(n){let e=t.iterate(n.memo,n.value) -t.enterItem(n.key,e)}else t.goto(e)}) -class Ft{constructor(t,e,n){this.parentNode=t,this.first=e,this.last=n}parentElement(){return this.parentNode}firstNode(){return this.first}lastNode(){return this.last}}const Vt="http://www.w3.org/2000/svg" -function Lt(t,e,n){if(!t)return e -if(!function(t,e){let n=t.createElementNS(e,"svg") -try{n.insertAdjacentHTML("beforeend","<circle></circle>")}catch(r){}finally{return 1!==n.childNodes.length||n.firstChild.namespaceURI!==Vt}}(t,n))return e -let r=t.createElement("div") -return class extends e{insertHTMLBefore(t,e,i){return null===i||""===i?super.insertHTMLBefore(t,e,i):t.namespaceURI!==n?super.insertHTMLBefore(t,e,i):function(t,e,n,r){let i="<svg>"+n+"</svg>" -e.innerHTML=i -var s=function(t,e,n){let r=t.firstChild,i=null,s=r -for(;s;)i=s,s=s.nextSibling,e.insertBefore(i,n) -return[r,i]}(e.firstChild,t,r) -let o=s[0],a=s[1] -return new Ft(t,o,a)}(t,r,i,e)}}}function jt(t,e){return t&&function(t){let e=t.createElement("div") -if(e.innerHTML="first",e.insertAdjacentHTML("beforeend","second"),2===e.childNodes.length)return!1 -return!0}(t)?class extends e{constructor(t){super(t),this.uselessComment=t.createComment("")}insertHTMLBefore(t,e,n){if(null===n)return super.insertHTMLBefore(t,e,n) -let r=!1,i=e?e.previousSibling:t.lastChild -i&&i instanceof Text&&(r=!0,t.insertBefore(this.uselessComment,e)) -let s=super.insertHTMLBefore(t,e,n) -return r&&t.removeChild(this.uselessComment),s}}:e}const $t="http://www.w3.org/2000/svg",Ht={foreignObject:1,desc:1,title:1},Ut=Object.create(null);["b","big","blockquote","body","br","center","code","dd","div","dl","dt","em","embed","h1","h2","h3","h4","h5","h6","head","hr","i","img","li","listing","main","meta","nobr","ol","p","pre","ruby","s","small","span","strong","strike","sub","sup","table","tt","u","ul","var"].forEach(t=>Ut[t]=1) -let qt="undefined"==typeof document?null:document -class Jt{constructor(t){this.document=t,this.setupUselessElement()}setupUselessElement(){this.uselessElement=this.document.createElement("div")}createElement(t,e){let n,r -if(e?(n=e.namespaceURI===$t||"svg"===t,r=Ht[e.tagName]):(n="svg"===t,r=!1),n&&!r){if(Ut[t])throw new Error(`Cannot create a ${t} inside an SVG context`) -return this.document.createElementNS($t,t)}return this.document.createElement(t)}insertBefore(t,e,n){t.insertBefore(e,n)}insertHTMLBefore(t,e,n){return function(t,e,n,r){let i,s=e,o=n,a=o?o.previousSibling:s.lastChild -if(null===r||""===r)return new Ft(s,null,null) -null===o?(s.insertAdjacentHTML("beforeend",r),i=s.lastChild):o instanceof HTMLElement?(o.insertAdjacentHTML("beforebegin",r),i=o.previousSibling):(s.insertBefore(t,o),t.insertAdjacentHTML("beforebegin",r),i=t.previousSibling,s.removeChild(t)) -let l=a?a.nextSibling:s.firstChild -return new Ft(s,l,i)}(this.uselessElement,t,e,n)}createTextNode(t){return this.document.createTextNode(t)}createComment(t){return this.document.createComment(t)}}var Wt;(function(t){class e extends Jt{createElementNS(t,e){return this.document.createElementNS(t,e)}setAttribute(t,e,n,r=null){r?t.setAttributeNS(r,e,n):t.setAttribute(e,n)}}t.TreeConstruction=e -let n=e -n=jt(qt,n),n=Lt(qt,n,$t),t.DOMTreeConstruction=n})(Wt||(Wt={})) -let Kt=class extends Jt{constructor(t){super(t),this.document=t,this.namespace=null}setAttribute(t,e,n){t.setAttribute(e,n)}removeAttribute(t,e){t.removeAttribute(e)}insertAfter(t,e,n){this.insertBefore(t,e,n.nextSibling)}} -Kt=jt(qt,Kt),Kt=Lt(qt,Kt,$t) -Wt.DOMTreeConstruction -class Gt{constructor(t,e,n=e.length){this.tag=t,this.references=e,this.length=n}static empty(){return new Gt(h,r,0)}at(t){return this.references[t]}value(){return this.references.map(this.valueOf)}get(t){let e=this.references,n=this.length -if("length"===t)return rt.create(n) -{let r=parseInt(t,10) -return r<0||r>=n?ot:e[r]}}valueOf(t){return t.value()}}new class{constructor(t,e,n){this.tag=t,this.names=e,this.references=n,this.length=e.length,this._map=null}get map(){let t=this._map -if(!t){let e=this.names,r=this.references -t=this._map=n() -for(let n=0;n<e.length;n++)t[e[n]]=r[n]}return t}has(t){return-1!==this.names.indexOf(t)}get(t){let e=this.names,n=this.references,r=e.indexOf(t) -return-1===r?ot:n[r]}value(){let t=this.names,e=this.references,r=n() -for(let n=0;n<t.length;n++)r[t[n]]=e[n].value() -return r}}(h,r,r),new Gt(h,r) -class Yt{get(t){return Zt.create(this,t)}}class Xt extends Yt{constructor(){super(...arguments),this._lastRevision=null,this._lastValue=null}value(){let t=this.tag,e=this._lastRevision,n=this._lastValue -return e&&t.validate(e)||(n=this._lastValue=this.compute(),this._lastRevision=t.value()),n}}class Qt extends A{constructor(){super(...arguments),this.children=n()}get(t){let e=this.children[t] -return e||(e=this.children[t]=new te(this.inner,t)),e}}class Zt extends Xt{static create(t,e){return d(t)?new te(t.value(),e):new ee(t,e)}get(t){return new ee(this,t)}}class te extends Zt{constructor(t,e){super(),this._parentValue=t,this._propertyKey=e,this.tag=K(t,e)}compute(){return this._parentValue[this._propertyKey]}}class ee extends Zt{constructor(t,e){super() -let n=t.tag,r=C.create(h) -this._parentReference=t,this._parentObjectTag=r,this._propertyKey=e,this.tag=b([n,r])}compute(){let t=this._parentReference,e=this._parentObjectTag,n=this._propertyKey,r=t.value() -return e.inner.update(K(r,n)),"string"==typeof r&&"length"===n?r.length:"object"==typeof r&&r?r[n]:void 0}}class ne extends Yt{constructor(t){super(),this.tag=g.create(),this._value=t}value(){return this._value}update(t){t!==this._value&&(this.tag.inner.dirty(),this._value=t)}}class re{constructor(t,e,n,r){let i=t.ComponentClass,s=t.name -this.args=e -let o={debugName:s,args:this.namedArgsSnapshot()} -r.setOwner(o,n),i&&(this.component=i.create(o))}get tag(){return this.args.tag}namedArgsSnapshot(){return Object.freeze(this.args.named.value())}}const ie=new Qt(null) -class se{static create(t){return new se(t)}constructor(t){this.env=t.env}prepareArgs(t,e){return null}getCapabilities(t){return t.capabilities}getLayout({name:t,handle:e,symbolTable:n},r){return e&&n?{handle:e,symbolTable:n}:r.compileTemplate(t,e)}create(t,e,n,r,i,s){if(e.ComponentClass){let t=this.env.getOwner() -return new re(e,n.capture(),t,this.env)}}getSelf(t){return t?new Qt(t.component):ie}didCreateElement(t,e){}didRenderLayout(t,e){t&&(t.component.bounds=new Q(e))}didCreate(t){t&&t.component.didInsertElement()}getTag(t){return t?t.tag:h}update(t,e){t&&(t.component.args=t.namedArgsSnapshot())}didUpdateLayout(){}didUpdate(t){t&&t.component.didUpdate()}getDestructor(t){return t?t.component:oe}}const oe={destroy(){}} -function ae(t,e,n){function r(){return Reflect.construct(HTMLElement,[],r)}r.prototype=Object.create(HTMLElement.prototype,{constructor:{value:r},connectedCallback:{value:function(){let e=document.createElement("span"),r=this.parentNode -r.insertBefore(e,this),r.removeChild(this),t.renderComponent(n,r,e),function t(e,n){e._rendering?requestAnimationFrame(()=>{t(e,n)}):n()}(t,()=>{let t=e.previousElementSibling -e.remove(),function(t,e){let n=t.attributes -for(let i=0;i<n.length;i++){var r=n.item(i) -let t=r.name,s=r.value -e.setAttribute(t,s)}}(this,t)})}}}),window.customElements.define(e,r)}class le{constructor(t,e=null){this._registry=t,this._resolver=e,this._lookups={},this._factoryDefinitionLookups={}}factoryFor(t){let e=this._factoryDefinitionLookups[t] -if(e||(this._resolver&&(e=this._resolver.retrieve(t)),e||(e=this._registry.registration(t)),e&&(this._factoryDefinitionLookups[t]=e)),e)return this.buildFactory(t,e)}lookup(t){let e=!1!==this._registry.registeredOption(t,"singleton") -if(e&&this._lookups[t])return this._lookups[t] -let n=this.factoryFor(t) -if(!n)return -if(!1===this._registry.registeredOption(t,"instantiate"))return n.class -let r=n.create() -return e&&r&&(this._lookups[t]=r),r}defaultInjections(t){return{}}buildInjections(t){let e,n=this.defaultInjections(t),r=this._registry.registeredInjections(t) -for(let i=0;i<r.length;i++)n[(e=r[i]).property]=this.lookup(e.source) -return n}buildFactory(t,e){let n=this.buildInjections(t) -return{class:e,create(t){let r=Object.assign({},n,t) -return e.create(r)}}}}class ce{constructor(t){this._registrations={},this._registeredOptions={},this._registeredInjections={},t&&t.fallback&&(this._fallback=t.fallback)}register(t,e,n){this._registrations[t]=e,n&&(this._registeredOptions[t]=n)}registration(t){let e=this._registrations[t] -return void 0===e&&this._fallback&&(e=this._fallback.registration(t)),e}unregister(t){delete this._registrations[t],delete this._registeredOptions[t],delete this._registeredInjections[t]}registerOption(t,e,n){let r=this._registeredOptions[t] -r||(r={},this._registeredOptions[t]=r),r[e]=n}registeredOption(t,e){let n,r=this.registeredOptions(t) -return r&&(n=r[e]),void 0===n&&void 0!==this._fallback&&(n=this._fallback.registeredOption(t,e)),n}registeredOptions(t){let e=this._registeredOptions[t] -if(void 0===e){let n=t.split(":")[0] -e=this._registeredOptions[n]}return e}unregisterOption(t,e){let n=this._registeredOptions[t] -n&&delete n[e]}registerInjection(t,e,n){let r=this._registeredInjections[t] -void 0===r&&(this._registeredInjections[t]=r=[]),r.push({property:e,source:n})}registeredInjections(t){let e=t.split(":")[0],n=this._fallback?this._fallback.registeredInjections(t):[] -return Array.prototype.push.apply(n,this._registeredInjections[e]),Array.prototype.push.apply(n,this._registeredInjections[t]),n}}const he="__owner__" -function pe(t){return t[he]}function ue(t,e){t[he]=e}function de(t="unreachable"){return new Error(t)}function fe(t,e){if(!t)throw new Error(e||"assertion failure")}const me=Object.keys -function ge(t){for(let e=1;e<arguments.length;e++){let n=arguments[e] -if(null===n||"object"!=typeof n)continue -let r=me(n) -for(let e=0;e<r.length;e++){let i=r[e] -t[i]=n[i]}}return t}let ve=0 -function ye(t){return t._guid=++ve}function be(){return Object.create(null)}class ke{constructor(){this.stack=[],this.current=null}get size(){return this.stack.length}push(t){this.current=t,this.stack.push(t)}pop(){let t=this.stack.pop(),e=this.stack.length -return this.current=0===e?null:this.stack[e-1],void 0===t?null:t}isEmpty(){return 0===this.stack.length}}class we{constructor(){this.clear()}head(){return this._head}tail(){return this._tail}clear(){this._head=this._tail=null}toArray(){let t=[] -return this.forEachNode(e=>t.push(e)),t}nextNode(t){return t.next}forEachNode(t){let e=this._head -for(;null!==e;)t(e),e=e.next}insertBefore(t,e=null){return null===e?this.append(t):(e.prev?e.prev.next=t:this._head=t,t.prev=e.prev,t.next=e,e.prev=t,t)}append(t){let e=this._tail -return e?(e.next=t,t.prev=e,t.next=null):this._head=t,this._tail=t}remove(t){return t.prev?t.prev.next=t.next:this._head=t.next,t.next?t.next.prev=t.prev:this._tail=t.prev,t}}class xe{constructor(t,e){this._head=t,this._tail=e}forEachNode(t){let e=this._head -for(;null!==e;)t(e),e=this.nextNode(e)}head(){return this._head}tail(){return this._tail}toArray(){let t=[] -return this.forEachNode(e=>t.push(e)),t}nextNode(t){return t===this._tail?null:t.next}}const Se=Object.freeze([]) -class Ce{constructor(t,e){this._registry=t,this._resolver=e}register(t,e,n){let r=this._toAbsoluteSpecifier(t) -this._registry.register(r,e,n)}registration(t){let e=this._toAbsoluteSpecifier(t) -return this._registry.registration(e)}unregister(t){let e=this._toAbsoluteSpecifier(t) -this._registry.unregister(e)}registerOption(t,e,n){let r=this._toAbsoluteOrTypeSpecifier(t) -this._registry.registerOption(r,e,n)}registeredOption(t,e){let n=this._toAbsoluteOrTypeSpecifier(t) -return this._registry.registeredOption(n,e)}registeredOptions(t){let e=this._toAbsoluteOrTypeSpecifier(t) -return this._registry.registeredOptions(e)}unregisterOption(t,e){let n=this._toAbsoluteOrTypeSpecifier(t) -this._registry.unregisterOption(n,e)}registerInjection(t,e,n){let r=this._toAbsoluteOrTypeSpecifier(t),i=this._toAbsoluteSpecifier(n) -this._registry.registerInjection(r,e,i)}registeredInjections(t){let e=this._toAbsoluteOrTypeSpecifier(t) -return this._registry.registeredInjections(e)}_toAbsoluteSpecifier(t,e){return this._resolver.identify(t,e)}_toAbsoluteOrTypeSpecifier(t){return function(t){return-1===t.indexOf(":")}(t)?t:this._toAbsoluteSpecifier(t)}}class Me{constructor(t=null){this.bucket=t?ge({},t):{}}get(t){return this.bucket[t]}set(t,e){return this.bucket[t]=e}child(){return new Me(this.bucket)}}const Oe=new class{constructor(){this.evaluateOpcode=function(t){let e=new Array(t) -for(let n=0;n<t;n++)e[n]=null -return e}(98).slice()}add(t,e,n="syscall"){this.evaluateOpcode[t]={syscall:"syscall"===n,evaluate:e}}debugBefore(t,e,n){return{sp:void 0,state:void 0}}debugAfter(t,e,n,r){r.sp,r.state}evaluate(t,e,n){let r=this.evaluateOpcode[n] -r.syscall?r.evaluate(t,e):r.evaluate(t.inner,e)}} -class Ee{constructor(){ye(this)}}class Te extends Ee{constructor(){super(...arguments),this.next=null,this.prev=null}}var Ae;(function(t){t[t.pc=0]="pc",t[t.ra=1]="ra",t[t.fp=2]="fp",t[t.sp=3]="sp",t[t.s0=4]="s0",t[t.s1=5]="s1",t[t.t0=6]="t0",t[t.t1=7]="t1",t[t.v0=8]="v0"})(Ae||(Ae={})) -class Ne extends A{constructor(t){super(t)}static create(t){return void 0===t?Re:null===t?Ie:!0===t?Be:!1===t?ze:"number"==typeof t?new _e(t):new De(t)}get(t){return Re}}class De extends Ne{constructor(){super(...arguments),this.lengthReference=null}get(t){if("length"===t){let t=this.lengthReference -return null===t&&(t=this.lengthReference=new _e(this.inner.length)),t}return super.get(t)}}class _e extends Ne{constructor(t){super(t)}}const Re=new _e(void 0),Ie=new _e(null),Be=new _e(!0),ze=new _e(!1) -class Pe{constructor(t){this.inner=t,this.tag=t.tag}value(){return this.toBool(this.inner.value())}toBool(t){return!!t}}class Fe extends M{constructor(t){super(),this.parts=t,this.tag=v(t)}compute(){let t=new Array -for(let e=0;e<this.parts.length;e++){let n=this.parts[e].value() -null!=n&&(t[e]=Ve(n))}return t.length>0?t.join(""):null}}function Ve(t){return"function"!=typeof t.toString?"":String(t)}Oe.add(1,(t,{op1:e})=>{let n=t.stack,r=t.constants.resolveHandle(e)(t,n.pop()) -t.loadValue(Ae.v0,r)}),Oe.add(6,(t,{op1:e})=>{let n=t.referenceForSymbol(e) -t.stack.push(n)}),Oe.add(4,(t,{op1:e})=>{let n=t.stack.pop() -t.scope().bindSymbol(e,n)}),Oe.add(5,(t,{op1:e})=>{let n=t.stack.pop(),r=t.stack.pop(),i=t.stack.pop(),s=i?[n,r,i]:null -t.scope().bindBlock(e,s)}),Oe.add(96,(t,{op1:e})=>{let n=t.constants.getString(e),r=t.scope().getPartialMap()[n] -void 0===r&&(r=t.getSelf().get(n)),t.stack.push(r)}),Oe.add(20,(t,{op1:e,op2:n})=>{t.pushRootScope(e,!!n)}),Oe.add(7,(t,{op1:e})=>{let n=t.constants.getString(e),r=t.stack.pop() -t.stack.push(r.get(n))}),Oe.add(8,(t,{op1:e})=>{let n=t.stack,r=t.scope().getBlock(e) -r?(n.push(r[2]),n.push(r[1]),n.push(r[0])):(n.push(null),n.push(null),n.push(null))}),Oe.add(9,(t,{op1:e})=>{let n=!!t.scope().getBlock(e) -t.stack.push(n?Be:ze)}),Oe.add(10,t=>{t.stack.pop(),t.stack.pop() -let e=t.stack.pop(),n=e&&e.parameters.length -t.stack.push(n?Be:ze)}),Oe.add(11,(t,{op1:e})=>{let n=new Array(e) -for(let r=e;r>0;r--){n[r-1]=t.stack.pop()}t.stack.push(new Fe(n))}) -const Le="CURRIED COMPONENT DEFINITION [id=6f00feb9-a0ef-4547-99ea-ac328f80acea]" -function je(t){return!(!t||!t[Le])}class $e{constructor(t,e){this.inner=t,this.args=e,this[Le]=!0}unwrap(t){t.realloc(this.offset) -let e=this -for(;;){var n=e -let r=n.args,i=n.inner -if(r&&(t.positional.prepend(r.positional),t.named.merge(r.named)),!je(i))return i -e=i}}get offset(){let t=this.inner,e=this.args,n=e?e.positional.length:0 -return je(t)?n+t.offset:n}}function He(t){return Ue(t)?"":String(t)}function Ue(t){return null==t||"function"!=typeof t.toString}function qe(t){return"object"==typeof t&&null!==t&&"function"==typeof t.toHTML}function Je(t){return"object"==typeof t&&null!==t&&"number"==typeof t.nodeType}function We(t){return"string"==typeof t}class Ke extends Te{constructor(t,e,n){super(),this.node=t,this.reference=e,this.lastValue=n,this.type="dynamic-text",this.tag=e.tag,this.lastRevision=this.tag.value()}evaluate(){let t=this.reference,e=this.tag -e.validate(this.lastRevision)||(this.lastRevision=e.value(),this.update(t.value()))}update(t){let e,n=this.lastValue -if(t!==n&&(e=Ue(t)?"":We(t)?t:String(t))!==n){this.node.nodeValue=this.lastValue=e}}}class Ge extends Pe{static create(t){return new Ge(t)}toBool(t){return je(t)}}class Ye{constructor(t){this.inner=t,this.tag=t.tag}value(){let t=this.inner.value() -return function(t){return We(t)||Ue(t)||"boolean"==typeof t||"number"==typeof t}(t)?1:(e=t)&&e[Le]?0:qe(t)?3:function(t){return Je(t)&&11===t.nodeType}(t)?4:Je(t)?5:1 -var e}}Oe.add(28,t=>{let e=t.stack.pop().value(),n=Ue(e)?"":String(e) -t.elements().appendDynamicHTML(n)}),Oe.add(29,t=>{let e=t.stack.pop().value().toHTML(),n=Ue(e)?"":e -t.elements().appendDynamicHTML(n)}),Oe.add(32,t=>{let e=t.stack.pop(),n=e.value(),r=Ue(n)?"":String(n),i=t.elements().appendDynamicText(r) -d(e)||t.updateWith(new Ke(i,e,r))}),Oe.add(30,t=>{let e=t.stack.pop().value() -t.elements().appendDynamicFragment(e)}),Oe.add(31,t=>{let e=t.stack.pop().value() -t.elements().appendDynamicNode(e)}),Oe.add(22,t=>t.pushChildScope()),Oe.add(23,t=>t.popScope()),Oe.add(44,t=>t.pushDynamicScope()),Oe.add(45,t=>t.popDynamicScope()),Oe.add(12,(t,{op1:e})=>{t.stack.push(t.constants.getOther(e))}),Oe.add(13,(t,{op1:e})=>{let n=t.stack,r=e>>3 -switch(7&e){case 0:n.push(r) -break -case 1:n.push(t.constants.getNumber(r)) -break -case 2:n.push(t.constants.getString(r)) -break -case 3:n.pushEncodedImmediate(e) -break -case 4:case 5:n.push(t.constants.getNumber(r))}}),Oe.add(14,t=>{let e=t.stack -e.push(Ne.create(e.pop()))}),Oe.add(15,t=>{let e=t.stack -e.push(e.peek().value())}),Oe.add(16,(t,{op1:e,op2:n})=>{let r=t.fetchValue(e)-n -t.stack.dup(r)}),Oe.add(17,(t,{op1:e})=>{t.stack.pop(e)}),Oe.add(18,(t,{op1:e})=>{t.load(e)}),Oe.add(19,(t,{op1:e})=>{t.fetch(e)}),Oe.add(43,(t,{op1:e})=>{let n=t.constants.getArray(e) -t.bindDynamicScope(n)}),Oe.add(61,(t,{op1:e})=>{t.enter(e)}),Oe.add(62,t=>{t.exit()}),Oe.add(48,(t,{op1:e})=>{t.stack.push(t.constants.getSerializable(e))}),Oe.add(47,t=>{t.stack.push(t.scope())}),Oe.add(46,t=>{let e=t.stack,n=e.pop() -n?e.pushSmi(n.compile()):e.pushNull()}),Oe.add(51,t=>{let e=t.stack,n=e.pop(),r=e.pop(),i=e.pop(),s=e.pop() -if(null===i)return t.pushFrame(),void t.pushScope(r) -let o=r -{let t=i.parameters,e=t.length -if(e>0){o=o.child() -for(let n=0;n<e;n++)o.bindSymbol(t[n],s.at(n))}}t.pushFrame(),t.pushScope(o),t.call(n)}),Oe.add(53,(t,{op1:e})=>{let n=t.stack.pop() -if(d(n))n.value()&&t.goto(e) -else{let r=new O(n) -r.peek()&&t.goto(e),t.updateWith(new Xe(r))}}),Oe.add(54,(t,{op1:e})=>{let n=t.stack.pop() -if(d(n))n.value()||t.goto(e) -else{let r=new O(n) -r.peek()||t.goto(e),t.updateWith(new Xe(r))}}),Oe.add(55,(t,{op1:e,op2:n})=>{t.stack.peek()===n&&t.goto(e)}),Oe.add(56,t=>{let e=t.stack.peek() -d(e)||t.updateWith(Xe.initialize(new O(e)))}),Oe.add(63,t=>{let e=t.env,n=t.stack -n.push(e.toConditionalReference(n.pop()))}) -class Xe extends Te{constructor(t){super(),this.type="assert",this.tag=t.tag,this.cache=t}static initialize(t){let e=new Xe(t) -return t.peek(),e}evaluate(t){T(this.cache.revalidate())&&t.throw()}}class Qe extends Te{constructor(t,e){super(),this.target=e,this.type="jump-if-not-modified",this.tag=t,this.lastRevision=t.value()}evaluate(t){let e=this.tag,n=this.target,r=this.lastRevision -!t.alwaysRevalidate&&e.validate(r)&&t.goto(n)}didModify(){this.lastRevision=this.tag.value()}}class Ze extends Te{constructor(t){super(),this.target=t,this.type="did-modify",this.tag=h}evaluate(){this.target.didModify()}}class tn{constructor(t){this.tag=h,this.type="label",this.label=null,this.prev=null,this.next=null,ye(this),this.label=t}evaluate(){}inspect(){return`${this.label} [${this._guid}]`}}Oe.add(26,(t,{op1:e})=>{t.elements().appendText(t.constants.getString(e))}),Oe.add(27,(t,{op1:e})=>{t.elements().appendComment(t.constants.getString(e))}),Oe.add(33,(t,{op1:e})=>{t.elements().openElement(t.constants.getString(e))}),Oe.add(34,t=>{let e=t.stack.pop().value() -t.elements().openElement(e)}),Oe.add(41,t=>{let e,n,r=t.stack.pop(),i=t.stack.pop(),s=t.stack.pop().value() -if(d(r))e=r.value() -else{let n=new O(r) -e=n.peek(),t.updateWith(new Xe(n))}if(d(i))n=i.value() -else{let e=new O(i) -n=e.peek(),t.updateWith(new Xe(e))}t.elements().pushRemoteElement(e,s,n)}),Oe.add(42,t=>{t.elements().popRemoteElement()}),Oe.add(38,t=>{let e=t.fetchValue(Ae.t0) -e&&(e.flush(t),t.loadValue(Ae.t0,null)),t.elements().flushElement()}),Oe.add(39,t=>{t.elements().closeElement()}),Oe.add(40,(t,{op1:e})=>{let n=t.constants.resolveHandle(e),r=t.stack.pop() -var i=t.elements() -let s=i.constructing,o=i.updateOperations,a=t.dynamicScope(),l=n.create(s,r,a,o) -t.env.scheduleInstallModifier(l,n) -let c=n.getDestructor(l) -c&&t.newDestroyable(c) -let h=n.getTag(l) -f(h)||t.updateWith(new en(h,n,l))}) -class en extends Te{constructor(t,e,n){super(),this.tag=t,this.manager=e,this.modifier=n,this.type="update-modifier",this.lastUpdated=t.value()}evaluate(t){let e=this.manager,n=this.modifier,r=this.tag,i=this.lastUpdated -r.validate(i)||(t.env.scheduleUpdateModifier(n,e),this.lastUpdated=r.value())}}Oe.add(35,(t,{op1:e,op2:n,op3:r})=>{let i=t.constants.getString(e),s=t.constants.getString(n),o=r?t.constants.getString(r):null -t.elements().setStaticAttribute(i,s,o)}),Oe.add(36,(t,{op1:e,op2:n,op3:r})=>{let i=t.constants.getString(e),s=t.stack.pop(),o=s.value(),a=r?t.constants.getString(r):null,l=t.elements().setDynamicAttribute(i,o,!!n,a) -d(s)||t.updateWith(new nn(s,l))}) -class nn extends Te{constructor(t,e){super(),this.reference=t,this.attribute=e,this.type="patch-element",this.tag=t.tag,this.lastRevision=this.tag.value()}evaluate(t){let e=this.attribute,n=this.reference,r=this.tag -r.validate(this.lastRevision)||(this.lastRevision=r.value(),e.update(n.value(),t.env))}}function rn(t,e,n){return t.lookupComponentDefinition(e,n)}class sn{constructor(t,e,n,r){this.inner=t,this.resolver=e,this.meta=n,this.args=r,this.tag=t.tag,this.lastValue=null,this.lastDefinition=null}value(){let t=this.inner,e=this.lastValue,n=t.value() -if(n===e)return this.lastDefinition -let r=null -if(je(n))r=n -else if("string"==typeof n&&n){r=rn(this.resolver,n,this.meta)}return r=this.curry(r),this.lastValue=n,this.lastDefinition=r,r}get(){return Re}curry(t){let e=this.args -return!e&&je(t)?t:t?new $e(t,e):null}}class on{constructor(t){this.list=t,this.tag=v(t),this.list=t}value(){let t=[],e=this.list -for(let n=0;n<e.length;n++){let r=He(e[n].value()) -r&&t.push(r)}return 0===t.length?null:t.join(" ")}}function an(t){return 0|(t.dynamicLayout?1:0)|(t.dynamicTag?2:0)|(t.prepareArgs?4:0)|(t.createArgs?8:0)|(t.attributeHook?16:0)|(t.elementHook?32:0)|(t.dynamicScope?64:0)|(t.createCaller?128:0)|(t.updateHook?256:0)|(t.createInstance?512:0)}function ln(t,e){return!!(t&e)}Oe.add(69,t=>{let e=t.stack,n=e.pop() -e.push(Ge.create(n))}),Oe.add(70,t=>{let e=t.stack,n=e.peek() -e.push(new Ye(n))}),Oe.add(71,(t,{op1:e})=>{let n=t.stack,r=n.pop(),i=n.pop(),s=t.constants.getSerializable(e),o=t.constants.resolver -t.loadValue(Ae.v0,new sn(r,o,s,i))}),Oe.add(72,(t,{op1:e})=>{let n=t.constants.resolveHandle(e),r=n.manager,i=an(r.getCapabilities(n.state)),s={definition:n,manager:r,capabilities:i,state:null,handle:null,table:null,lookup:null} -t.stack.push(s)}),Oe.add(75,(t,{op1:e})=>{let n,r=t.stack,i=r.pop().value(),s=t.constants.getSerializable(e) -if(t.loadValue(Ae.t1,null),"string"==typeof i){n=rn(t.constants.resolver,i,s)}else{if(!je(i))throw de() -n=i}r.push(n)}),Oe.add(73,t=>{let e,n,r=t.stack,i=r.pop() -je(i)?n=e=null:e=an((n=i.manager).getCapabilities(i.state)),r.push({definition:i,capabilities:e,manager:n,state:null,handle:null,table:null})}),Oe.add(74,(t,{op1:e})=>{let n,r=t.stack,i=r.pop().value() -if(!je(i))throw de() -n=i,r.push(n)}),Oe.add(76,(t,{op1:e,op2:n})=>{let r=t.stack,i=t.constants.getStringArray(e),s=n>>4,o=8&n,a=[] -4&n&&a.push("main"),2&n&&a.push("else"),1&n&&a.push("attrs"),t.args.setup(r,i,a,s,!!o),r.push(t.args)}),Oe.add(77,t=>{let e=t.stack -e.push(t.args.empty(e))}),Oe.add(80,t=>{let e=t.stack,n=e.pop().capture() -e.push(n)}),Oe.add(79,(t,{op1:e})=>{let n=t.stack,r=t.fetchValue(e),i=n.pop(),s=r.definition -je(s)&&(s=function(t,e,n){let r=t.definition=e.unwrap(n),i=r.manager,s=r.state -return t.manager=i,t.capabilities=an(i.getCapabilities(s)),r}(r,s,i)) -var o=s -let a=o.manager,l=o.state -if(!0!==ln(r.capabilities,4))return void n.push(i) -let c=i.blocks.values,h=i.blocks.names,p=a.prepareArgs(l,i) -if(p){i.clear() -for(let i=0;i<c.length;i++)n.push(c[i]) -let t=p.positional,e=p.named,r=t.length -for(let i=0;i<r;i++)n.push(t[i]) -let s=Object.keys(e) -for(let i=0;i<s.length;i++)n.push(e[s[i]]) -i.setup(n,s,h,r,!0)}n.push(i)}),Oe.add(81,(t,{op1:e,op2:n})=>{let r=t.fetchValue(n),i=r.definition,s=r.manager,o=r.capabilities=an(s.getCapabilities(i.state)),a=null -ln(o,64)&&(a=t.dynamicScope()) -let l=1&e,c=null -ln(o,8)&&(c=t.stack.peek()) -let h=null -ln(o,128)&&(h=t.getSelf()) -let p=s.create(t.env,i.state,c,a,h,!!l) -r.state=p -let u=s.getTag(p) -ln(o,256)&&!f(u)&&t.updateWith(new pn(u,p,s,a))}),Oe.add(82,(t,{op1:e})=>{var n=t.fetchValue(e) -let r=n.manager,i=n.state,s=r.getDestructor(i) -s&&t.newDestroyable(s)}),Oe.add(91,t=>{t.beginCacheGroup(),t.elements().pushSimpleBlock()}),Oe.add(83,t=>{t.loadValue(Ae.t0,new cn)}),Oe.add(37,(t,{op1:e,op2:n,op3:r})=>{let i=t.constants.getString(e),s=t.stack.pop(),o=r?t.constants.getString(r):null -t.fetchValue(Ae.t0).setAttribute(i,s,!!n,o)}) -class cn{constructor(){this.attributes=be(),this.classes=[]}setAttribute(t,e,n,r){let i={value:e,namespace:r,trusting:n} -"class"===t&&this.classes.push(e),this.attributes[t]=i}flush(t){for(let e in this.attributes){let n=this.attributes[e],r=n.value,i=n.namespace,s=n.trusting -if("class"===e&&(r=new on(this.classes)),"type"===e)continue -let o=t.elements().setDynamicAttribute(e,r.value(),s,i) -d(r)||t.updateWith(new nn(r,o))}if("type"in this.attributes){let e=this.attributes.type,n=e.value,r=e.namespace,i=e.trusting,s=t.elements().setDynamicAttribute("type",n.value(),i,r) -d(n)||t.updateWith(new nn(n,s))}}}function hn(t,e,n,r,i){let s=n.table.symbols.indexOf(t),o=r.get(e);-1!==s&&i.scope().bindBlock(s+1,o),n.lookup&&(n.lookup[t]=o)}Oe.add(93,(t,{op1:e})=>{var n=t.fetchValue(e) -let r=n.definition,i=n.state,s=r.manager,o=t.fetchValue(Ae.t0) -s.didCreateElement(i,t.elements().expectConstructing("DidCreateElementOpcode#evaluate"),o)}),Oe.add(84,(t,{op1:e})=>{var n=t.fetchValue(e) -let r=n.definition,i=n.state,s=r.manager -t.stack.push(s.getSelf(i))}),Oe.add(85,(t,{op1:e})=>{var n=t.fetchValue(e) -let r=n.definition,i=n.state,s=r.manager -t.stack.push(s.getTagName(i))}),Oe.add(86,(t,{op1:e})=>{let n,r=t.fetchValue(e),i=r.manager,s=r.definition,o=t.constants.resolver,a=t.stack,l=r.state,c=r.capabilities,h=s.state -if(function(t,e){return!1===ln(t,1)}(c))n=i.getLayout(h,o) -else{if(!function(t,e){return!0===ln(t,1)}(c))throw de() -n=i.getDynamicLayout(l,o)}a.push(n.symbolTable),a.push(n.handle)}),Oe.add(68,(t,{op1:e})=>{let n=t.stack.pop(),r=t.stack.pop(),i=n.manager,s=an(i.getCapabilities(n.state)),o={definition:n,manager:i,capabilities:s,state:null,handle:r.handle,table:r.symbolTable,lookup:null} -t.loadValue(e,o)}),Oe.add(89,(t,{op1:e})=>{let n=t.stack,r=n.pop(),i=n.pop(),s=t.fetchValue(e) -s.handle=r,s.table=i}),Oe.add(21,(t,{op1:e})=>{let n=t.fetchValue(e).table.symbols -t.pushRootScope(n.length+1,!0)}),Oe.add(87,(t,{op1:e})=>{let n=t.fetchValue(e) -if(n.table.hasEval){let e=n.lookup=be() -t.scope().bindEvalScope(e)}}),Oe.add(2,(t,{op1:e})=>{let n=t.fetchValue(e),r=t.scope(),i=t.stack.peek(),s=i.named.atNames -for(let o=s.length-1;o>=0;o--){let t=s[o],e=n.table.symbols.indexOf(s[o]),a=i.named.get(t,!1);-1!==e&&r.bindSymbol(e+1,a),n.lookup&&(n.lookup[t]=a)}}),Oe.add(3,(t,{op1:e})=>{let n=t.fetchValue(e) -let r=t.stack.peek().blocks -hn("&attrs","attrs",n,r,t),hn("&inverse","else",n,r,t),hn("&default","main",n,r,t)}),Oe.add(90,(t,{op1:e})=>{let n=t.fetchValue(e) -t.call(n.handle)}),Oe.add(94,(t,{op1:e})=>{var n=t.fetchValue(e) -let r=n.manager,i=n.state,s=t.elements().popBlock() -r.didRenderLayout(i,s),t.env.didCreate(i,r),t.updateWith(new un(r,i,s))}),Oe.add(92,t=>{t.commitCacheGroup()}) -class pn extends Te{constructor(t,e,n,r){super(),this.tag=t,this.component=e,this.manager=n,this.dynamicScope=r,this.type="update-component"}evaluate(t){let e=this.component,n=this.manager,r=this.dynamicScope -n.update(e,r)}}class un extends Te{constructor(t,e,n){super(),this.manager=t,this.component=e,this.bounds=n,this.type="did-update-layout",this.tag=h}evaluate(t){let e=this.manager,n=this.component,r=this.bounds -e.didUpdateLayout(n,r),t.env.didUpdate(n,e)}}let dn=function(t,e){console.info("Use `context`, and `get(<path>)` to debug this template."),e("this")} -class fn{constructor(t,e,n){this.scope=t,this.locals=be() -for(let r=0;r<n.length;r++){let i=n[r],s=e[i-1],o=t.getSymbol(i) -this.locals[s]=o}}get(t){let e=this.scope,n=this.locals,r=t.split(".") -var i=t.split(".") -let s,o=i[0],a=i.slice(1),l=e.getEvalScope() -return"this"===o?s=e.getSelf():n[o]?s=n[o]:0===o.indexOf("@")&&l[o]?s=l[o]:(s=this.scope.getSelf(),a=r),a.reduce((t,e)=>t.get(e),s)}}Oe.add(97,(t,{op1:e,op2:n})=>{let r=t.constants.getStringArray(e),i=t.constants.getArray(n),s=new fn(t.scope(),r,i) -dn(t.getSelf().value(),t=>s.get(t).value())}),Oe.add(95,(t,{op1:e,op2:n,op3:r})=>{let i=t.constants,s=t.constants.resolver,o=t.stack.pop().value(),a=i.getSerializable(e),l=i.getStringArray(n),c=i.getArray(r),h=s.lookupPartial(o,a) -var p=s.resolve(h).getPartial() -let u=p.symbolTable,d=p.handle -{let e=u.symbols,n=t.scope(),r=t.pushRootScope(e.length,!1),i=n.getEvalScope() -r.bindCallerScope(n.getCallerScope()),r.bindEvalScope(i),r.bindSelf(n.getSelf()) -let s=Object.create(n.getPartialMap()) -for(let t=0;t<c.length;t++){let e=c[t],r=l[e-1],i=n.getSymbol(e) -s[r]=i}if(i)for(let t=0;t<e.length;t++){let n=t+1,s=i[e[t]] -void 0!==s&&r.bind(n,s)}r.bindPartialMap(s),t.pushFrame(),t.call(d)}}) -class mn{constructor(t){this.tag=t.tag,this.artifacts=t}value(){return!this.artifacts.isEmpty()}}Oe.add(66,t=>{let e=t.stack,n=e.pop(),r=e.pop(),i=t.env.iterableFor(n,r.value()),s=new I(i) -e.push(s),e.push(new mn(s.artifacts))}),Oe.add(64,(t,{op1:e})=>{t.enterList(e)}),Oe.add(65,t=>{t.exitList()}),Oe.add(67,(t,{op1:e})=>{let n=t.stack.peek().next() -if(n){let e=t.iterate(n.memo,n.value) -t.enterItem(n.key,e)}else t.goto(e)}) -class gn{constructor(t,e){this.element=t,this.nextSibling=e}}class vn{constructor(t,e,n){this.parentNode=t,this.first=e,this.last=n}parentElement(){return this.parentNode}firstNode(){return this.first}lastNode(){return this.last}}class yn{constructor(t,e){this.parentNode=t,this.node=e}parentElement(){return this.parentNode}firstNode(){return this.node}lastNode(){return this.node}}function bn(t,e){return new yn(t,e)}function kn(t,e){let n=t.parentElement(),r=t.firstNode(),i=t.lastNode(),s=r -for(;s;){let t=s.nextSibling -if(n.insertBefore(s,e),s===i)return t -s=t}return null}function wn(t){let e=t.parentElement(),n=t.firstNode(),r=t.lastNode(),i=n -for(;i;){let t=i.nextSibling -if(e.removeChild(i),i===r)return t -i=t}return null}const xn="http://www.w3.org/2000/svg" -function Sn(t,e,n){if(!t)return e -if(!function(t,e){let n=t.createElementNS(e,"svg") -try{n.insertAdjacentHTML("beforeend","<circle></circle>")}catch(r){}finally{return 1!==n.childNodes.length||n.firstChild.namespaceURI!==xn}}(t,n))return e -let r=t.createElement("div") -return class extends e{insertHTMLBefore(t,e,i){return null===i||""===i?super.insertHTMLBefore(t,e,i):t.namespaceURI!==n?super.insertHTMLBefore(t,e,i):function(t,e,n,r){let i="<svg>"+n+"</svg>" -e.innerHTML=i -var s=function(t,e,n){let r=t.firstChild,i=null,s=r -for(;s;)i=s,s=s.nextSibling,e.insertBefore(i,n) -return[r,i]}(e.firstChild,t,r) -let o=s[0],a=s[1] -return new vn(t,o,a)}(t,r,i,e)}}}function Cn(t,e){return t&&function(t){let e=t.createElement("div") -if(e.innerHTML="first",e.insertAdjacentHTML("beforeend","second"),2===e.childNodes.length)return!1 -return!0}(t)?class extends e{constructor(t){super(t),this.uselessComment=t.createComment("")}insertHTMLBefore(t,e,n){if(null===n)return super.insertHTMLBefore(t,e,n) -let r=!1,i=e?e.previousSibling:t.lastChild -i&&i instanceof Text&&(r=!0,t.insertBefore(this.uselessComment,e)) -let s=super.insertHTMLBefore(t,e,n) -return r&&t.removeChild(this.uselessComment),s}}:e}const Mn="http://www.w3.org/2000/svg",On={foreignObject:1,desc:1,title:1},En=Object.create(null);["b","big","blockquote","body","br","center","code","dd","div","dl","dt","em","embed","h1","h2","h3","h4","h5","h6","head","hr","i","img","li","listing","main","meta","nobr","ol","p","pre","ruby","s","small","span","strong","strike","sub","sup","table","tt","u","ul","var"].forEach(t=>En[t]=1) -let Tn="undefined"==typeof document?null:document -class An{constructor(t){this.document=t,this.setupUselessElement()}setupUselessElement(){this.uselessElement=this.document.createElement("div")}createElement(t,e){let n,r -if(e?(n=e.namespaceURI===Mn||"svg"===t,r=On[e.tagName]):(n="svg"===t,r=!1),n&&!r){if(En[t])throw new Error(`Cannot create a ${t} inside an SVG context`) -return this.document.createElementNS(Mn,t)}return this.document.createElement(t)}insertBefore(t,e,n){t.insertBefore(e,n)}insertHTMLBefore(t,e,n){return function(t,e,n,r){let i,s=e,o=n,a=o?o.previousSibling:s.lastChild -if(null===r||""===r)return new vn(s,null,null) -null===o?(s.insertAdjacentHTML("beforeend",r),i=s.lastChild):o instanceof HTMLElement?(o.insertAdjacentHTML("beforebegin",r),i=o.previousSibling):(s.insertBefore(t,o),t.insertAdjacentHTML("beforebegin",r),i=t.previousSibling,s.removeChild(t)) -let l=a?a.nextSibling:s.firstChild -return new vn(s,l,i)}(this.uselessElement,t,e,n)}createTextNode(t){return this.document.createTextNode(t)}createComment(t){return this.document.createComment(t)}}var Nn;(function(t){class e extends An{createElementNS(t,e){return this.document.createElementNS(t,e)}setAttribute(t,e,n,r=null){r?t.setAttributeNS(r,e,n):t.setAttribute(e,n)}}t.TreeConstruction=e -let n=e -n=Cn(Tn,n),n=Sn(Tn,n,Mn),t.DOMTreeConstruction=n})(Nn||(Nn={})) -let Dn=class extends An{constructor(t){super(t),this.document=t,this.namespace=null}setAttribute(t,e,n){t.setAttribute(e,n)}removeAttribute(t,e){t.removeAttribute(e)}insertAfter(t,e,n){this.insertBefore(t,e,n.nextSibling)}} -Dn=Cn(Tn,Dn) -var _n=Dn=Sn(Tn,Dn,Mn) -const Rn=Nn.DOMTreeConstruction,In=["javascript:","vbscript:"],Bn=["A","BODY","LINK","IMG","IFRAME","BASE","FORM"],zn=["EMBED"],Pn=["href","src","background","action"],Fn=["src"] -function Vn(t,e){return-1!==t.indexOf(e)}function Ln(t,e){return(null===t||Vn(Bn,t))&&Vn(Pn,e)}function jn(t,e){return null!==t&&(Vn(zn,t)&&Vn(Fn,e))}function $n(t,e){return Ln(t,e)||jn(t,e)}function Hn(t,e,n,r){let i=null -if(null==r)return r -if(qe(r))return r.toHTML() -i=e?e.tagName.toUpperCase():null -let s=He(r) -if(Ln(i,n)){let e=t.protocolForURL(s) -if(Vn(In,e))return`unsafe:${s}`}return jn(i,n)?`unsafe:${s}`:s}function Un(t,e){let n,r -if(e in t)r=e,n="prop" -else{let i=e.toLowerCase() -i in t?(n="prop",r=i):(n="attr",r=e)}return"prop"!==n||"style"!==r.toLowerCase()&&!function(t,e){let n=qn[t.toUpperCase()] -return n&&n[e.toLowerCase()]||!1}(t.tagName,r)||(n="attr"),{normalized:r,type:n}}const qn={INPUT:{form:!0,autocorrect:!0,list:!0},SELECT:{form:!0},OPTION:{form:!0},TEXTAREA:{form:!0},LABEL:{form:!0},FIELDSET:{form:!0},LEGEND:{form:!0},OBJECT:{form:!0},BUTTON:{form:!0}} -function Jn(t,e,n){let r=t.tagName,i={element:t,name:e,namespace:n} -if(t.namespaceURI===Mn)return Wn(r,e,i) -var s=Un(t,e) -let o=s.type,a=s.normalized -return"attr"===o?Wn(r,a,i):function(t,e,n){if($n(t,e))return new Xn(e,n) -if(function(t,e){return("INPUT"===t||"TEXTAREA"===t)&&"value"===e}(t,e))return new Zn(e,n) -if(function(t,e){return"OPTION"===t&&"selected"===e}(t,e))return new tr(e,n) -return new Yn(e,n)}(r,a,i)}function Wn(t,e,n){return $n(t,e)?new Qn(n):new Gn(n)}class Kn{constructor(t){this.attribute=t}}class Gn extends Kn{set(t,e,n){let r=er(e) -if(null!==r){var i=this.attribute -let e=i.name,n=i.namespace -t.__setAttribute(e,r,n)}}update(t,e){let n=er(t) -var r=this.attribute -let i=r.element,s=r.name -null===n?i.removeAttribute(s):i.setAttribute(s,n)}}class Yn extends Kn{constructor(t,e){super(e),this.normalizedName=t}set(t,e,n){null!=e&&(this.value=e,t.__setProperty(this.normalizedName,e))}update(t,e){let n=this.attribute.element -this.value!==t&&(n[this.normalizedName]=this.value=t,null==t&&this.removeAttribute())}removeAttribute(){var t=this.attribute -let e=t.element,n=t.namespace -n?e.removeAttributeNS(n,this.normalizedName):e.removeAttribute(this.normalizedName)}}class Xn extends Yn{set(t,e,n){var r=this.attribute -let i=Hn(n,r.element,r.name,e) -super.set(t,i,n)}update(t,e){var n=this.attribute -let r=Hn(e,n.element,n.name,t) -super.update(r,e)}}class Qn extends Gn{set(t,e,n){var r=this.attribute -let i=Hn(n,r.element,r.name,e) -super.set(t,i,n)}update(t,e){var n=this.attribute -let r=Hn(e,n.element,n.name,t) -super.update(r,e)}}class Zn extends Yn{set(t,e){t.__setProperty("value",He(e))}update(t){let e=this.attribute.element,n=e.value,r=He(t) -n!==r&&(e.value=r)}}class tr extends Yn{set(t,e){null!=e&&!1!==e&&t.__setProperty("selected",!0)}update(t){let e=this.attribute.element -e.selected=!!t}}function er(t){return!1===t||null==t||void 0===t.toString?null:!0===t?"":"function"==typeof t?null:String(t)}class nr{constructor(t,e,n,r){this.slots=t,this.callerScope=e,this.evalScope=n,this.partialMap=r}static root(t,e=0){let n=new Array(e+1) -for(let r=0;r<=e;r++)n[r]=Re -return new nr(n,null,null,null).init({self:t})}static sized(t=0){let e=new Array(t+1) -for(let n=0;n<=t;n++)e[n]=Re -return new nr(e,null,null,null)}init({self:t}){return this.slots[0]=t,this}getSelf(){return this.get(0)}getSymbol(t){return this.get(t)}getBlock(t){let e=this.get(t) -return e===Re?null:e}getEvalScope(){return this.evalScope}getPartialMap(){return this.partialMap}bind(t,e){this.set(t,e)}bindSelf(t){this.set(0,t)}bindSymbol(t,e){this.set(t,e)}bindBlock(t,e){this.set(t,e)}bindEvalScope(t){this.evalScope=t}bindPartialMap(t){this.partialMap=t}bindCallerScope(t){this.callerScope=t}getCallerScope(){return this.callerScope}child(){return new nr(this.slots.slice(),this.callerScope,this.evalScope,this.partialMap)}get(t){if(t>=this.slots.length)throw new RangeError(`BUG: cannot get $${t} from scope; length=${this.slots.length}`) -return this.slots[t]}set(t,e){if(t>=this.slots.length)throw new RangeError(`BUG: cannot get $${t} from scope; length=${this.slots.length}`) -this.slots[t]=e}}class rr{constructor(){this.scheduledInstallManagers=[],this.scheduledInstallModifiers=[],this.scheduledUpdateModifierManagers=[],this.scheduledUpdateModifiers=[],this.createdComponents=[],this.createdManagers=[],this.updatedComponents=[],this.updatedManagers=[],this.destructors=[]}didCreate(t,e){this.createdComponents.push(t),this.createdManagers.push(e)}didUpdate(t,e){this.updatedComponents.push(t),this.updatedManagers.push(e)}scheduleInstallModifier(t,e){this.scheduledInstallManagers.push(e),this.scheduledInstallModifiers.push(t)}scheduleUpdateModifier(t,e){this.scheduledUpdateModifierManagers.push(e),this.scheduledUpdateModifiers.push(t)}didDestroy(t){this.destructors.push(t)}commit(){let t=this.createdComponents,e=this.createdManagers -for(let c=0;c<t.length;c++){let n=t[c] -e[c].didCreate(n)}let n=this.updatedComponents,r=this.updatedManagers -for(let c=0;c<n.length;c++){let t=n[c] -r[c].didUpdate(t)}let i=this.destructors -for(let c=0;c<i.length;c++)i[c].destroy() -let s=this.scheduledInstallManagers,o=this.scheduledInstallModifiers -for(let c=0;c<s.length;c++){let t=s[c],e=o[c] -t.install(e)}let a=this.scheduledUpdateModifierManagers,l=this.scheduledUpdateModifiers -for(let c=0;c<a.length;c++){let t=a[c],e=l[c] -t.update(e)}}}class ir{constructor({appendOperations:t,updateOperations:e}){this._transaction=null,this.appendOperations=t,this.updateOperations=e}toConditionalReference(t){return new Pe(t)}getAppendOperations(){return this.appendOperations}getDOM(){return this.updateOperations}begin(){this._transaction=new rr}get transaction(){return this._transaction}didCreate(t,e){this.transaction.didCreate(t,e)}didUpdate(t,e){this.transaction.didUpdate(t,e)}scheduleInstallModifier(t,e){this.transaction.scheduleInstallModifier(t,e)}scheduleUpdateModifier(t,e){this.transaction.scheduleUpdateModifier(t,e)}didDestroy(t){this.transaction.didDestroy(t)}commit(){let t=this.transaction -this._transaction=null,t.commit()}attributeFor(t,e,n,r=null){return Jn(t,e,r)}}class sr{constructor(t,e,n,r,i=-1,s=-1){this.stack=t,this.heap=e,this.program=n,this.externs=r,this.pc=i,this.ra=s,this.currentOpSize=0}pushFrame(){this.stack.pushSmi(this.ra),this.stack.pushSmi(this.stack.fp),this.stack.fp=this.stack.sp-1}popFrame(){this.stack.sp=this.stack.fp-1,this.ra=this.stack.getSmi(0),this.stack.fp=this.stack.getSmi(1)}pushSmallFrame(){this.stack.pushSmi(this.ra)}popSmallFrame(){this.ra=this.stack.popSmi()}goto(t){let e=this.pc+t-this.currentOpSize -this.pc=e}call(t){this.ra=this.pc,this.pc=this.heap.getaddr(t)}returnTo(t){let e=this.pc+t-this.currentOpSize -this.ra=e}return(){this.pc=this.ra}nextStatement(){let t=this.pc,e=this.program -if(-1===t)return null -let n=this.program.opcode(t).size,r=this.currentOpSize=n -return this.pc+=r,e.opcode(t)}evaluateOuter(t,e){this.evaluateInner(t,e)}evaluateInner(t,e){t.isMachine?this.evaluateMachine(t):this.evaluateSyscall(t,e)}evaluateMachine(t){switch(t.type){case 57:return this.pushFrame() -case 58:return this.popFrame() -case 59:return this.pushSmallFrame() -case 60:return this.popSmallFrame() -case 50:return this.call(t.op1) -case 49:return this.call(this.stack.popSmi()) -case 52:return this.goto(t.op1) -case 24:return this.return() -case 25:return this.returnTo(t.op1)}}evaluateSyscall(t,e){Oe.evaluate(e,t,t.type)}}class or{constructor(t){this.node=t}firstNode(){return this.node}}class ar{constructor(t){this.node=t}lastNode(){return this.node}}class lr{constructor(t,e,n){this.constructing=null,this.operations=null,this.cursorStack=new ke,this.blockStack=new ke,this.pushElement(e,n),this.env=t,this.dom=t.getAppendOperations(),this.updateOperations=t.getDOM()}static forInitialRender(t,e){let n=new this(t,e.element,e.nextSibling) -return n.pushSimpleBlock(),n}static resume(t,e,n){let r=new this(t,e.parentElement(),n) -return r.pushSimpleBlock(),r.pushBlockTracker(e),r}get element(){return this.cursorStack.current.element}get nextSibling(){return this.cursorStack.current.nextSibling}expectConstructing(t){return this.constructing}block(){return this.blockStack.current}popElement(){this.cursorStack.pop(),this.cursorStack.current}pushSimpleBlock(){return this.pushBlockTracker(new cr(this.element))}pushUpdatableBlock(){return this.pushBlockTracker(new pr(this.element))}pushBlockList(t){return this.pushBlockTracker(new ur(this.element,t))}pushBlockTracker(t,e=!1){let n=this.blockStack.current -return null!==n&&(n.newDestroyable(t),e||n.didAppendBounds(t)),this.__openBlock(),this.blockStack.push(t),t}popBlock(){return this.block().finalize(this),this.__closeBlock(),this.blockStack.pop()}__openBlock(){}__closeBlock(){}openElement(t){let e=this.__openElement(t) -return this.constructing=e,e}__openElement(t){return this.dom.createElement(t,this.element)}flushElement(){let t=this.element,e=this.constructing -this.__flushElement(t,e),this.constructing=null,this.operations=null,this.pushElement(e,null),this.didOpenElement(e)}__flushElement(t,e){this.dom.insertBefore(t,e,this.nextSibling)}closeElement(){this.willCloseElement(),this.popElement()}pushRemoteElement(t,e,n=null){this.__pushRemoteElement(t,e,n)}__pushRemoteElement(t,e,n){this.pushElement(t,n) -let r=new hr(t) -this.pushBlockTracker(r,!0)}popRemoteElement(){this.popBlock(),this.popElement()}pushElement(t,e){this.cursorStack.push(new gn(t,e))}didAddDestroyable(t){this.block().newDestroyable(t)}didAppendBounds(t){return this.block().didAppendBounds(t),t}didAppendNode(t){return this.block().didAppendNode(t),t}didOpenElement(t){return this.block().openElement(t),t}willCloseElement(){this.block().closeElement()}appendText(t){return this.didAppendNode(this.__appendText(t))}__appendText(t){let e=this.dom,n=this.element,r=this.nextSibling,i=e.createTextNode(t) -return e.insertBefore(n,i,r),i}__appendNode(t){return this.dom.insertBefore(this.element,t,this.nextSibling),t}__appendFragment(t){let e=t.firstChild -if(e){let n=function(t,e,n){return new vn(t,e,n)}(this.element,e,t.lastChild) -return this.dom.insertBefore(this.element,t,this.nextSibling),n}return bn(this.element,this.__appendComment(""))}__appendHTML(t){return this.dom.insertHTMLBefore(this.element,this.nextSibling,t)}appendDynamicHTML(t){let e=this.trustedContent(t) -this.didAppendBounds(e)}appendDynamicText(t){let e=this.untrustedContent(t) -return this.didAppendNode(e),e}appendDynamicFragment(t){let e=this.__appendFragment(t) -this.didAppendBounds(e)}appendDynamicNode(t){let e=this.__appendNode(t),n=bn(this.element,e) -this.didAppendBounds(n)}trustedContent(t){return this.__appendHTML(t)}untrustedContent(t){return this.__appendText(t)}appendComment(t){return this.didAppendNode(this.__appendComment(t))}__appendComment(t){let e=this.dom,n=this.element,r=this.nextSibling,i=e.createComment(t) -return e.insertBefore(n,i,r),i}__setAttribute(t,e,n){this.dom.setAttribute(this.constructing,t,e,n)}__setProperty(t,e){this.constructing[t]=e}setStaticAttribute(t,e,n){this.__setAttribute(t,e,n)}setDynamicAttribute(t,e,n,r){let i=this.constructing,s=this.env.attributeFor(i,t,n,r) -return s.set(this,e,this.env),s}}class cr{constructor(t){this.parent=t,this.first=null,this.last=null,this.destroyables=null,this.nesting=0}destroy(){let t=this.destroyables -if(t&&t.length)for(let e=0;e<t.length;e++)t[e].destroy()}parentElement(){return this.parent}firstNode(){return this.first&&this.first.firstNode()}lastNode(){return this.last&&this.last.lastNode()}openElement(t){this.didAppendNode(t),this.nesting++}closeElement(){this.nesting--}didAppendNode(t){0===this.nesting&&(this.first||(this.first=new or(t)),this.last=new ar(t))}didAppendBounds(t){0===this.nesting&&(this.first||(this.first=t),this.last=t)}newDestroyable(t){this.destroyables=this.destroyables||[],this.destroyables.push(t)}finalize(t){this.first||t.appendComment("")}}class hr extends cr{destroy(){super.destroy(),wn(this)}}class pr extends cr{reset(t){let e=this.destroyables -if(e&&e.length)for(let r=0;r<e.length;r++)t.didDestroy(e[r]) -let n=wn(this) -return this.first=null,this.last=null,this.destroyables=null,this.nesting=0,n}}class ur{constructor(t,e){this.parent=t,this.boundList=e,this.parent=t,this.boundList=e}destroy(){this.boundList.forEachNode(t=>t.destroy())}parentElement(){return this.parent}firstNode(){let t=this.boundList.head() -return t&&t.firstNode()}lastNode(){let t=this.boundList.tail() -return t&&t.lastNode()}openElement(t){}closeElement(){}didAppendNode(t){}didAppendBounds(t){}newDestroyable(t){}finalize(t){}}class dr{constructor(t=[]){this.vec=t}clone(){return new dr(this.vec.slice())}sliceFrom(t){return new dr(this.vec.slice(t))}slice(t,e){return new dr(this.vec.slice(t,e))}copy(t,e){this.vec[e]=this.vec[t]}writeRaw(t,e){this.vec[t]=e}writeSmi(t,e){var n -this.vec[t]=(n=e)<0?Math.abs(n)<<3|4:n<<3|0}getRaw(t){return this.vec[t]}getSmi(t){return function(t){switch(7&t){case 0:return t>>3 -case 4:return-(t>>3) -default:throw new Error("unreachable")}}(this.vec[t])}reset(){this.vec.length=0}len(){return this.vec.length}}const fr=2147483648,mr=2147483647 -class gr{constructor(t=new dr,e=[]){this.inner=t,this.js=e}slice(t,e){let n -return n="number"==typeof t&&"number"==typeof e?this.inner.slice(t,e):"number"==typeof t&&void 0===e?this.inner.sliceFrom(t):this.inner.clone(),new gr(n,this.js.slice(t,e))}sliceInner(t,e){let n=[] -for(let r=t;r<e;r++)n.push(this.get(r)) -return n}copy(t,e){this.inner.copy(t,e)}write(t,e){if(function(t){let e=typeof t -if(null==t)return!0 -switch(e){case"boolean":case"undefined":return!0 -case"number":if(t%1!=0)return!1 -let n=Math.abs(t) -return!(n>fr) -default:return!1}}(e))this.inner.writeRaw(t,yr(e)) -else{let n=this.js.length -this.js.push(e),this.inner.writeRaw(t,n|fr)}}writeSmi(t,e){this.inner.writeSmi(t,e)}writeImmediate(t,e){this.inner.writeRaw(t,e)}get(t){let e=this.inner.getRaw(t) -return e&fr?this.js[e&mr]:function(t){switch(t){case 3:return!1 -case 11:return!0 -case 19:return null -case 27:return -default:return function(t){switch(7&t){case 0:return t>>3 -case 4:return-(t>>3) -default:throw de()}}(t)}}(e)}getSmi(t){return this.inner.getSmi(t)}reset(){this.inner.reset(),this.js.length=0}get length(){return this.inner.len()}}class vr{constructor(t,e,n){this.stack=t,this.fp=e,this.sp=n}static empty(){return new this(new gr,0,-1)}static restore(t){let e=new gr -for(let n=0;n<t.length;n++)e.write(n,t[n]) -return new this(e,0,t.length-1)}push(t){this.stack.write(++this.sp,t)}pushSmi(t){this.stack.writeSmi(++this.sp,t)}pushImmediate(t){this.stack.writeImmediate(++this.sp,yr(t))}pushEncodedImmediate(t){this.stack.writeImmediate(++this.sp,t)}pushNull(){this.stack.writeImmediate(++this.sp,19)}dup(t=this.sp){this.stack.copy(t,++this.sp)}copy(t,e){this.stack.copy(t,e)}pop(t=1){let e=this.stack.get(this.sp) -return this.sp-=t,e}popSmi(){return this.stack.getSmi(this.sp--)}peek(t=0){return this.stack.get(this.sp-t)}peekSmi(t=0){return this.stack.getSmi(this.sp-t)}get(t,e=this.fp){return this.stack.get(e+t)}getSmi(t,e=this.fp){return this.stack.getSmi(e+t)}set(t,e,n=this.fp){this.stack.write(n+e,t)}slice(t,e){return this.stack.slice(t,e)}sliceArray(t,e){return this.stack.sliceInner(t,e)}capture(t){let e=this.sp+1,n=e-t -return this.stack.sliceInner(n,e)}reset(){this.stack.reset()}toArray(){return this.stack.sliceInner(this.fp,this.sp+1)}}function yr(t){switch(typeof t){case"number":return function(t){return t<0?Math.abs(t)<<3|4:t<<3|0}(t) -case"boolean":return t?11:3 -case"object":return 19 -case"undefined":return 27 -default:throw de()}}class br{constructor(t,e,{alwaysRevalidate:n=!1}){this.frameStack=new ke,this.env=t,this.constants=e.constants,this.dom=t.getDOM(),this.alwaysRevalidate=n}execute(t,e){let n=this.frameStack -for(this.try(t,e);!n.isEmpty();){let t=this.frame.nextStatement() -null!==t?t.evaluate(this):this.frameStack.pop()}}get frame(){return this.frameStack.current}goto(t){this.frame.goto(t)}try(t,e){this.frameStack.push(new Cr(t,e))}throw(){this.frame.handleException(),this.frameStack.pop()}}class kr extends Te{constructor(t,e,n,r,i){super(),this.start=t,this.state=e,this.runtime=n,this.type="block",this.next=null,this.prev=null,this.children=i,this.bounds=r}parentElement(){return this.bounds.parentElement()}firstNode(){return this.bounds.firstNode()}lastNode(){return this.bounds.lastNode()}evaluate(t){t.try(this.children,null)}destroy(){this.bounds.destroy()}didDestroy(){this.runtime.env.didDestroy(this.bounds)}}class wr extends kr{constructor(t,e,n,r,i){super(t,e,n,r,i),this.type="try",this.tag=this._tag=C.create(h)}didInitializeChildren(){this._tag.inner.update(y(this.children))}evaluate(t){t.try(this.children,this)}handleException(){let t=this.state,e=this.bounds,n=this.children,r=this.start,i=this.prev,s=this.next,o=this.runtime -n.clear() -let a=lr.resume(o.env,e,e.reset(o.env)),l=Br.resume(t,o,a),c=new we -l.execute(r,e=>{e.stack=vr.restore(t.stack),e.updatingOpcodeStack.push(c),e.updateWith(this),e.updatingOpcodeStack.push(n)}),this.prev=i,this.next=s}}class xr{constructor(t,e){this.opcode=t,this.marker=e,this.didInsert=!1,this.didDelete=!1,this.map=t.map,this.updating=t.children}insert(t,e,n,r){let i=this.map,s=this.opcode,o=this.updating,a=null,l=null -a=r?(l=i[r]).bounds.firstNode():this.marker -let c=s.vmForInsertion(a),h=null,p=s.start -c.execute(p,r=>{i[t]=h=r.iterate(n,e),r.updatingOpcodeStack.push(new we),r.updateWith(h),r.updatingOpcodeStack.push(h.children)}),o.insertBefore(h,l),this.didInsert=!0}retain(t,e,n){}move(t,e,n,r){let i=this.map,s=this.updating,o=i[t],a=i[r]||null -kn(o,r?a.firstNode():this.marker),s.remove(o),s.insertBefore(o,a)}delete(t){let e=this.map,n=e[t] -n.didDestroy(),wn(n),this.updating.remove(n),delete e[t],this.didDelete=!0}done(){this.opcode.didInitializeChildren(this.didInsert||this.didDelete)}}class Sr extends kr{constructor(t,e,n,r,s,o){super(t,e,n,r,s),this.type="list-block",this.map=be(),this.lastIterated=i,this.artifacts=o -let a=this._tag=C.create(h) -this.tag=b([o.tag,a])}didInitializeChildren(t=!0){this.lastIterated=this.artifacts.tag.value(),t&&this._tag.inner.update(y(this.children))}evaluate(t){let e=this.artifacts,n=this.lastIterated -if(!e.tag.validate(n)){let n=this.bounds,r=t.dom,i=r.createComment("") -r.insertAfter(n.parentElement(),i,n.lastNode()) -let s=new xr(this,i) -new z({target:s,artifacts:e}).sync(),this.parentElement().removeChild(i)}super.evaluate(t)}vmForInsertion(t){let e=this.bounds,n=this.state,r=this.runtime,i=lr.forInitialRender(r.env,{element:e.parentElement(),nextSibling:t}) -return Br.resume(n,r,i)}}class Cr{constructor(t,e){this.ops=t,this.exceptionHandler=e,this.current=t.head()}goto(t){this.current=t}nextStatement(){let t=this.current,e=this.ops -return t&&(this.current=e.nextNode(t)),t}handleException(){this.exceptionHandler&&this.exceptionHandler.handleException()}}class Mr{constructor(t,e,n,r){this.env=t,this.program=e,this.updating=n,this.bounds=r}rerender({alwaysRevalidate:t=!1}={alwaysRevalidate:!1}){let e=this.env,n=this.program,r=this.updating -new br(e,n,{alwaysRevalidate:t}).execute(r,this)}parentElement(){return this.bounds.parentElement()}firstNode(){return this.bounds.firstNode()}lastNode(){return this.bounds.lastNode()}handleException(){throw"this should never happen"}destroy(){this.bounds.destroy(),wn(this.bounds)}}class Or{constructor(){this.stack=null,this.positional=new Er,this.named=new Ar,this.blocks=new Dr}empty(t){let e=t.sp+1 -return this.named.empty(t,e),this.positional.empty(t,e),this.blocks.empty(t,e),this}setup(t,e,n,r,i){this.stack=t -let s=this.named,o=e.length,a=t.sp-o+1 -s.setup(t,a,o,e,i) -let l=a-r -this.positional.setup(t,l,r) -let c=this.blocks,h=n.length,p=l-3*h -c.setup(t,p,h,n)}get tag(){return v([this.positional,this.named])}get base(){return this.blocks.base}get length(){return this.positional.length+this.named.length+3*this.blocks.length}at(t){return this.positional.at(t)}realloc(t){let e=this.stack -if(t>0&&null!==e){let n=this.positional,r=this.named,i=n.base+t -for(let t=n.length+r.length-1;t>=0;t--)e.copy(t+n.base,t+i) -n.base+=t,r.base+=t,e.sp+=t}}capture(){let t=0===this.positional.length?Ir:this.positional.capture(),e=0===this.named.length?Rr:this.named.capture() -return{tag:this.tag,length:this.length,positional:t,named:e}}clear(){let t=this.stack,e=this.length -e>0&&null!==t&&t.pop(e)}}class Er{constructor(){this.base=0,this.length=0,this.stack=null,this._tag=null,this._references=null}empty(t,e){this.stack=t,this.base=e,this.length=0,this._tag=h,this._references=Se}setup(t,e,n){this.stack=t,this.base=e,this.length=n,0===n?(this._tag=h,this._references=Se):(this._tag=null,this._references=null)}get tag(){let t=this._tag -return t||(t=this._tag=v(this.references)),t}at(t){let e=this.base,n=this.length,r=this.stack -return t<0||t>=n?Re:r.get(t,e)}capture(){return new Tr(this.tag,this.references)}prepend(t){let e=t.length -if(e>0){let n=this.base,r=this.length,i=this.stack -this.base=n-=e,this.length=r+e -for(let s=0;s<e;s++)i.set(t.at(s),s,n) -this._tag=null,this._references=null}}get references(){let t=this._references -if(!t){let e=this.stack,n=this.base,r=this.length -t=this._references=e.sliceArray(n,n+r)}return t}}class Tr{constructor(t,e,n=e.length){this.tag=t,this.references=e,this.length=n}static empty(){return new Tr(h,Se,0)}at(t){return this.references[t]}value(){return this.references.map(this.valueOf)}get(t){let e=this.references,n=this.length -if("length"===t)return Ne.create(n) -{let r=parseInt(t,10) -return r<0||r>=n?Re:e[r]}}valueOf(t){return t.value()}}class Ar{constructor(){this.base=0,this.length=0,this._references=null,this._names=Se,this._atNames=Se}empty(t,e){this.stack=t,this.base=e,this.length=0,this._references=Se,this._names=Se,this._atNames=Se}setup(t,e,n,r,i){this.stack=t,this.base=e,this.length=n,0===n?(this._references=Se,this._names=Se,this._atNames=Se):(this._references=null,i?(this._names=r,this._atNames=null):(this._names=null,this._atNames=r))}get tag(){return v(this.references)}get names(){let t=this._names -return t||(t=this._names=this._atNames.map(this.toSyntheticName)),t}get atNames(){let t=this._atNames -return t||(t=this._atNames=this._names.map(this.toAtName)),t}has(t){return-1!==this.names.indexOf(t)}get(t,e=!0){let n=this.base,r=this.stack,i=(e?this.names:this.atNames).indexOf(t) -return-1===i?Re:r.get(i,n)}capture(){return new Nr(this.tag,this.names,this.references)}merge(t){let e=t.length -if(e>0){let n=this.names,r=this.length,i=this.stack,s=t.names -Object.isFrozen(n)&&0===n.length&&(n=[]) -for(let o=0;o<e;o++){let e=s[o];-1===n.indexOf(e)&&(r=n.push(e),i.push(t.references[o]))}this.length=r,this._references=null,this._names=n,this._atNames=null}}get references(){let t=this._references -if(!t){let e=this.base,n=this.length,r=this.stack -t=this._references=r.sliceArray(e,e+n)}return t}toSyntheticName(t){return t.slice(1)}toAtName(t){return`@${t}`}}class Nr{constructor(t,e,n){this.tag=t,this.names=e,this.references=n,this.length=e.length,this._map=null}get map(){let t=this._map -if(!t){let e=this.names,n=this.references -t=this._map=be() -for(let r=0;r<e.length;r++){t[e[r]]=n[r]}}return t}has(t){return-1!==this.names.indexOf(t)}get(t){let e=this.names,n=this.references,r=e.indexOf(t) -return-1===r?Re:n[r]}value(){let t=this.names,e=this.references,n=be() -for(let r=0;r<t.length;r++){n[t[r]]=e[r].value()}return n}}class Dr{constructor(){this.internalValues=null,this.internalTag=null,this.names=Se,this.length=0,this.base=0}empty(t,e){this.stack=t,this.names=Se,this.base=e,this.length=0,this.internalTag=h,this.internalValues=Se}setup(t,e,n,r){this.stack=t,this.names=r,this.base=e,this.length=n,0===n?(this.internalTag=h,this.internalValues=Se):(this.internalTag=null,this.internalValues=null)}get values(){let t=this.internalValues -if(!t){let e=this.base,n=this.length,r=this.stack -t=this.internalValues=r.sliceArray(e,e+3*n)}return t}has(t){return-1!==this.names.indexOf(t)}get(t){let e=this.base,n=this.stack,r=this.names,i=r.indexOf(t) -if(-1===r.indexOf(t))return null -let s=n.get(3*i,e),o=n.get(3*i+1,e),a=n.get(3*i+2,e) -return null===a?null:[a,o,s]}capture(){return new _r(this.names,this.values)}}class _r{constructor(t,e){this.names=t,this.values=e,this.length=t.length}has(t){return-1!==this.names.indexOf(t)}get(t){let e=this.names.indexOf(t) -return-1===e?null:[this.values[3*e+2],this.values[3*e+1],this.values[3*e]]}}const Rr=new Nr(h,Se,Se),Ir=new Tr(h,Se) -class Br{constructor(t,e,n,r){this.runtime=t,this.elementStack=r,this.dynamicScopeStack=new ke,this.scopeStack=new ke,this.updatingOpcodeStack=new ke,this.cacheGroups=new ke,this.listBlockStack=new ke,this.s0=null,this.s1=null,this.t0=null,this.t1=null,this.v0=null,this.heap=this.program.heap,this.constants=this.program.constants,this.elementStack=r,this.scopeStack.push(e),this.dynamicScopeStack.push(n),this.args=new Or,this.inner=new sr(vr.empty(),this.heap,t.program,{debugBefore:t=>Oe.debugBefore(this,t,t.type),debugAfter:(t,e)=>{Oe.debugAfter(this,t,t.type,e)}})}get stack(){return this.inner.stack}set stack(t){this.inner.stack=t}set currentOpSize(t){this.inner.currentOpSize=t}get currentOpSize(){return this.inner.currentOpSize}get pc(){return this.inner.pc}set pc(t){this.inner.pc=t}get ra(){return this.inner.ra}set ra(t){this.inner.ra=t}get fp(){return this.stack.fp}set fp(t){this.stack.fp=t}get sp(){return this.stack.sp}set sp(t){this.stack.sp=t}fetch(t){this.stack.push(this[Ae[t]])}load(t){this[Ae[t]]=this.stack.pop()}fetchValue(t){return this[Ae[t]]}loadValue(t,e){this[Ae[t]]=e}pushFrame(){this.inner.pushFrame()}popFrame(){this.inner.popFrame()}goto(t){this.inner.goto(t)}call(t){this.inner.call(t)}returnTo(t){this.inner.returnTo(t)}return(){this.inner.return()}static initial(t,e,n,r,i,s){let o=t.heap.scopesizeof(s),a=nr.root(n,o),l=new Br({program:t,env:e},a,r,i) -return l.pc=l.heap.getaddr(s),l.updatingOpcodeStack.push(new we),l}static empty(t,e,n){let r={get:()=>Re,set:()=>Re,child:()=>r},i=new Br({program:t,env:e},nr.root(Re,0),r,n) -return i.updatingOpcodeStack.push(new we),i}static resume({scope:t,dynamicScope:e},n,r){return new Br(n,t,e,r)}get program(){return this.runtime.program}get env(){return this.runtime.env}capture(t){return{dynamicScope:this.dynamicScope(),scope:this.scope(),stack:this.stack.capture(t)}}beginCacheGroup(){this.cacheGroups.push(this.updating().tail())}commitCacheGroup(){let t=new tn("END"),e=this.updating(),n=this.cacheGroups.pop(),r=n?e.nextNode(n):e.head(),i=e.tail(),s=y(new xe(r,i)),o=new Qe(s,t) -e.insertBefore(o,r),e.append(new Ze(o)),e.append(t)}enter(t){let e=new we,n=this.capture(t),r=this.elements().pushUpdatableBlock(),i=new wr(this.heap.gethandle(this.pc),n,this.runtime,r,e) -this.didEnter(i)}iterate(t,e){let n=this.stack -n.push(e),n.push(t) -let r=this.capture(2),i=this.elements().pushUpdatableBlock() -return new wr(this.heap.gethandle(this.pc),r,this.runtime,i,new we)}enterItem(t,e){this.listBlock().map[t]=e,this.didEnter(e)}enterList(t){let e=new we,n=this.capture(0),r=this.elements().pushBlockList(e),i=this.stack.peek().artifacts,s=this.pc+t-this.currentOpSize,o=this.heap.gethandle(s),a=new Sr(o,n,this.runtime,r,e,i) -this.listBlockStack.push(a),this.didEnter(a)}didEnter(t){this.updateWith(t),this.updatingOpcodeStack.push(t.children)}exit(){this.elements().popBlock(),this.updatingOpcodeStack.pop(),this.updating().tail().didInitializeChildren()}exitList(){this.exit(),this.listBlockStack.pop()}updateWith(t){this.updating().append(t)}listBlock(){return this.listBlockStack.current}updating(){return this.updatingOpcodeStack.current}elements(){return this.elementStack}scope(){return this.scopeStack.current}dynamicScope(){return this.dynamicScopeStack.current}pushChildScope(){this.scopeStack.push(this.scope().child())}pushDynamicScope(){let t=this.dynamicScope().child() -return this.dynamicScopeStack.push(t),t}pushRootScope(t,e){let n=nr.sized(t) -return e&&n.bindCallerScope(this.scope()),this.scopeStack.push(n),n}pushScope(t){this.scopeStack.push(t)}popScope(){this.scopeStack.pop()}popDynamicScope(){this.dynamicScopeStack.pop()}newDestroyable(t){this.elements().didAddDestroyable(t)}getSelf(){return this.scope().getSelf()}referenceForSymbol(t){return this.scope().getSymbol(t)}execute(t,e){let n -for(this.pc=this.heap.getaddr(t),e&&e(this);!(n=this.next()).done;);return n.value}next(){let t,e=this.env,n=this.program,r=this.updatingOpcodeStack,i=this.elementStack,s=this.inner.nextStatement() -return null!==s?(this.inner.evaluateOuter(s,this),t={done:!1,value:null}):(this.stack.reset(),t={done:!0,value:new Mr(e,n,r.pop(),i.popBlock())}),t}bindDynamicScope(t){let e=this.dynamicScope() -for(let n=t.length-1;n>=0;n--){let r=this.constants.getString(t[n]) -e.set(r,this.stack.pop())}}}class zr{constructor(t){this.vm=t}next(){return this.vm.next()}}class Pr{constructor(t,e){this.position=0,this.array=t,this.keyFor=e}isEmpty(){return 0===this.array.length}next(){let t=this.position,e=this.array,n=this.keyFor -if(t>=e.length)return null -let r=e[t],i=n(r,t),s=t -return this.position++,{key:i,value:r,memo:s}}}class Fr{constructor(t,e,n){this.position=0,this.keys=t,this.values=e,this.keyFor=n}isEmpty(){return 0===this.keys.length}next(){let t=this.position,e=this.keys,n=this.values,r=this.keyFor -if(t>=e.length)return null -let i=n[t],s=e[t],o=r(i,s) -return this.position++,{key:o,value:i,memo:s}}}const Vr=new class{isEmpty(){return!0}next(){throw new Error("Cannot call next() on an empty iterator")}} -class Lr{constructor(t,e){this.tag=t.tag,this.ref=t,this.keyFor=e}iterate(){let t=this.ref,e=this.keyFor,n=t.value() -if(Array.isArray(n))return n.length>0?new Pr(n,e):Vr -if(null==n)return Vr -if(void 0!==n.forEach){let t=[] -return n.forEach(function(e){t.push(e)}),t.length>0?new Pr(t,e):Vr}if("object"==typeof n){let t=Object.keys(n) -return t.length>0?new Fr(t,t.map(t=>n[t]),e):Vr}throw new Error(`Don't know how to {{#each ${n}}}`)}valueReferenceFor(t){return new ne(t.value)}updateValueReference(t,e){t.update(e.value)}memoReferenceFor(t){return new ne(t.memo)}updateMemoReference(t,e){t.update(e.memo)}}class jr extends ir{static create(t={}){return t.document=t.document||self.document,t.appendOperations=t.appendOperations||new Rn(t.document),new jr(t)}constructor(t){super({appendOperations:t.appendOperations,updateOperations:new _n(t.document||document)}),ue(this,pe(t)),this.uselessAnchor=t.document.createElement("a")}protocolForURL(t){return this.uselessAnchor.href=t,this.uselessAnchor.protocol}iterableFor(t,e){let n -if(!e)throw new Error("Must specify a key for #each") -switch(e){case"@index":n=((t,e)=>String(e)) -break -case"@primitive":n=(t=>String(t)) -break -default:n=(t=>t[e])}return new Lr(t,n)}getOwner(){return pe(this)}setOwner(t,e){ue(t,e)}}const $r="object"==typeof document?document:null -class Hr{constructor(t){this._roots=[],this._rootsIndex=0,this._initializers=[],this._initialized=!1,this._rendering=!1,this._rendered=!1,this._scheduled=!1,this._notifiers=[],this.rootName=t.rootName,this.resolver=t.resolver,fe(t.loader,"Must provide a Loader for preparing templates and other metadata required for a Glimmer Application."),fe(t.renderer,"Must provide a Renderer to render the templates produced by the Loader."),fe(t.builder,"Must provide a Builder that is responsible to building DOM."),this.document=t.document||$r,this.loader=t.loader,this.renderer=t.renderer,this.builder=t.builder}renderComponent(t,e,n=null){let r=this._roots,i=this._self -r.push({id:this._rootsIndex++,component:t,parent:e,nextSibling:n}),i&&(i.update({roots:r}),this.scheduleRerender())}async boot(){this.initialize(),this.env=this.lookup(`environment:/${this.rootName}/main/main`),await this._render()}scheduleRerender(){!this._scheduled&&this._rendered&&(this._rendering=!0,this._scheduled=!0,setTimeout(async()=>{this._scheduled=!1,await this._rerender(),this._rendering=!1},0))}initialize(){this.initRegistry(),this.initContainer()}registerInitializer(t){this._initializers.push(t)}initRegistry(){let t=this._registry=new ce,e=new Ce(this._registry,this.resolver) -t.register(`environment:/${this.rootName}/main/main`,jr),t.registerOption("helper","instantiate",!1),t.registerOption("template","instantiate",!1),t.register(`document:/${this.rootName}/main/main`,this.document),t.registerOption("document","instantiate",!1),t.registerInjection("environment","document",`document:/${this.rootName}/main/main`),t.registerInjection("component-manager","env",`environment:/${this.rootName}/main/main`) -let n=this._initializers -for(let r=0;r<n.length;r++)n[r].initialize(e) -this._initialized=!0}initContainer(){this._container=new le(this._registry,this.resolver),this._container.defaultInjections=(t=>{let e={} -return ue(e,this),e})}async _render(){let t=this.env,e=this._self=new ne({roots:this._roots}),n=new Me,r=this.builder.getBuilder(t),i=await this.loader.getTemplateIterator(this,t,r,n,e) -try{t.begin(),await this.renderer.render(i),t.commit(),this._didRender()}catch(s){this._didError(s)}}async _rerender(){let t=this.env -try{t.begin(),await this.renderer.rerender(),t.commit(),this._didRender()}catch(e){this._didError(e)}}_didRender(){this._rendered=!0 -let t=this._notifiers -this._notifiers=[],t.forEach(t=>t[0]())}_didError(t){let e=this._notifiers -this._notifiers=[],e.forEach(e=>e[1](t))}identify(t,e){return this.resolver.identify(t,e)}factoryFor(t,e){return this._container.factoryFor(this.identify(t,e))}lookup(t,e){return this._container.lookup(this.identify(t,e))}}class Ur{constructor(){this.byName=be(),this.byHandle=be()}hasName(t){return t in this.byName}getHandle(t){return this.byName[t]}hasHandle(t){return t in this.byHandle}getByHandle(t){return this.byHandle[t]}register(t,e,n){this.byHandle[t]=n,this.byName[e]=t}}class qr extends Xt{constructor(t,e){super(),this.helper=t,this.tag=e.tag,this.args=e.capture()}compute(){let t=this.helper,e=this.args -return t(e.positional.value(),e.named.value())}}var Jr -function Wr(t){return function(e){return Array.isArray(e)&&e[0]===t}}(function(t){t[t.Text=0]="Text",t[t.Append=1]="Append",t[t.Comment=2]="Comment",t[t.Modifier=3]="Modifier",t[t.Block=4]="Block",t[t.Component=5]="Component",t[t.OpenElement=6]="OpenElement",t[t.OpenSplattedElement=7]="OpenSplattedElement",t[t.FlushElement=8]="FlushElement",t[t.CloseElement=9]="CloseElement",t[t.StaticAttr=10]="StaticAttr",t[t.DynamicAttr=11]="DynamicAttr",t[t.AttrSplat=12]="AttrSplat",t[t.Yield=13]="Yield",t[t.Partial=14]="Partial",t[t.DynamicArg=15]="DynamicArg",t[t.StaticArg=16]="StaticArg",t[t.TrustingAttr=17]="TrustingAttr",t[t.Debugger=18]="Debugger",t[t.ClientSideStatement=19]="ClientSideStatement",t[t.Unknown=20]="Unknown",t[t.Get=21]="Get",t[t.MaybeLocal=22]="MaybeLocal",t[t.HasBlock=23]="HasBlock",t[t.HasBlockParams=24]="HasBlockParams",t[t.Undefined=25]="Undefined",t[t.Helper=26]="Helper",t[t.Concat=27]="Concat",t[t.ClientSideExpression=28]="ClientSideExpression"})(Jr||(Jr={})) -Wr(Jr.Modifier),Wr(Jr.FlushElement),Wr(Jr.Get),Wr(Jr.MaybeLocal) -var Kr;(function(t){t[t.OpenComponentElement=0]="OpenComponentElement",t[t.DidCreateElement=1]="DidCreateElement",t[t.SetComponentAttrs=2]="SetComponentAttrs",t[t.DidRenderLayout=3]="DidRenderLayout",t[t.Debugger=4]="Debugger"})(Kr||(Kr={})) -var Gr=Jr -const Yr="&attrs" -class Xr{constructor(t=0){this.offset=t,this.names=be(),this.funcs=[]}add(t,e){this.funcs.push(e),this.names[t]=this.funcs.length-1}compile(t,e){let n=t[this.offset],r=this.names[n];(0,this.funcs[r])(t,e)}}let Qr,Zr -function ti(t,e,n){let r=t[1],i=t[2],s=t[3] -n.expr(i),s?n.dynamicAttr(r,s,e):n.dynamicAttr(r,null,e)}class ei{constructor(){var t=function(t=new ni,e=new ri){return t.add("if",(t,e,n,r,i)=>{if(!t||1!==t.length)throw new Error("SYNTAX ERROR: #if requires a single argument") -i.replayableIf({args:()=>(i.expr(t[0]),i.toBoolean(),1),ifTrue(){i.invokeStaticBlock(n)},ifFalse(){r&&i.invokeStaticBlock(r)}})}),t.add("unless",(t,e,n,r,i)=>{if(!t||1!==t.length)throw new Error("SYNTAX ERROR: #unless requires a single argument") -i.replayableIf({args:()=>(i.expr(t[0]),i.toBoolean(),1),ifTrue(){r&&i.invokeStaticBlock(r)},ifFalse(){i.invokeStaticBlock(n)}})}),t.add("with",(t,e,n,r,i)=>{if(!t||1!==t.length)throw new Error("SYNTAX ERROR: #with requires a single argument") -i.replayableIf({args:()=>(i.expr(t[0]),i.dup(),i.toBoolean(),2),ifTrue(){i.invokeStaticBlock(n,1)},ifFalse(){r&&i.invokeStaticBlock(r)}})}),t.add("each",(t,e,n,r,i)=>{i.replayable({args:()=>(e&&"key"===e[0][0]?i.expr(e[1][0]):i.pushPrimitiveReference(null),i.expr(t[0]),2),body(){i.putIterator(),i.jumpUnless("ELSE"),i.pushFrame(),i.dup(Ae.fp,1),i.returnTo("ITER"),i.enterList("BODY"),i.label("ITER"),i.iterate("BREAK"),i.label("BODY"),i.invokeStaticBlock(n,2),i.pop(2),i.jump("FINALLY"),i.label("BREAK"),i.exitList(),i.popFrame(),i.jump("FINALLY"),i.label("ELSE"),r&&i.invokeStaticBlock(r)}})}),t.add("in-element",(t,e,n,r,i)=>{if(!t||1!==t.length)throw new Error("SYNTAX ERROR: #in-element requires a single argument") -i.replayableIf({args(){let n=e[0],r=e[1] -for(let t=0;t<n.length;t++){let e=n[t] -if("nextSibling"!==e&&"guid"!==e)throw new Error(`SYNTAX ERROR: #in-element does not take a \`${n[0]}\` option`) -i.expr(r[t])}return i.expr(t[0]),i.dup(),4},ifTrue(){i.pushRemoteElement(),i.invokeStaticBlock(n),i.popRemoteElement()}})}),t.add("-with-dynamic-vars",(t,e,n,r,i)=>{if(e){let t=e[0],r=e[1] -i.compileParams(r),i.pushDynamicScope(),i.bindDynamicScope(t),i.invokeStaticBlock(n),i.popDynamicScope()}else i.invokeStaticBlock(n)}),t.add("component",(t,e,n,r,i)=>{if("string"==typeof t[0]&&i.staticComponentHelper(t[0],e,n))return -let s=t[0],o=t.slice(1) -i.dynamicComponent(s,o,e,!0,n,r)}),e.add("component",(t,e,n,r)=>{let i=e&&e[0] -if("string"==typeof i&&r.staticComponentHelper(i,n,null))return!0 -let s=e[0],o=e.slice(1) -return r.dynamicComponent(s,o,n,!0,null,null),!0}),{blocks:t,inlines:e}}() -let e=t.blocks,n=t.inlines -this.blocks=e,this.inlines=n}}class ni{constructor(){this.names=be(),this.funcs=[]}add(t,e){this.funcs.push(e),this.names[t]=this.funcs.length-1}addMissing(t){this.missing=t}compile(t,e,n,r,i,s){let o=this.names[t] -if(void 0===o){(0,this.missing)(t,e,n,r,i,s)}else{(0,this.funcs[o])(e,n,r,i,s)}}}class ri{constructor(){this.names=be(),this.funcs=[]}add(t,e){this.funcs.push(e),this.names[t]=this.funcs.length-1}addMissing(t){this.missing=t}compile(t,e){let n,r,i,s=t[1] -if(!Array.isArray(s))return["expr",s] -if(s[0]===Gr.Helper)n=s[1],r=s[2],i=s[3] -else{if(s[0]!==Gr.Unknown)return["expr",s] -n=s[1],r=i=null}let o=this.names[n] -if(void 0===o&&this.missing){let t=(0,this.missing)(n,r,i,e) -return!1===t?["expr",s]:t}if(void 0!==o){let t=(0,this.funcs[o])(n,r,i,e) -return!1===t?["expr",s]:t}return["expr",s]}}const ii=-1 -class si{constructor(t,e){this.compiler=t,this.layout=e,this.compiled=null}get symbolTable(){return this.layout.block}compile(){if(null!==this.compiled)return this.compiled -this.compiled=ii -let t=this.layout.block.statements -return this.compiled=this.compiler.add(t,this.layout)}}class oi{constructor(t,e){this.compiler=t,this.parsed=e,this.compiled=null}get symbolTable(){return this.parsed.block}compile(){if(null!==this.compiled)return this.compiled -this.compiled=ii -var t=this.parsed -let e=t.block.statements,n=t.containingLayout -return this.compiled=this.compiler.add(e,n)}}function ai(t,e,n){let r=function(){if(Qr)return Qr -const t=Qr=new Xr -t.add(Gr.Text,(t,e)=>{e.text(t[1])}),t.add(Gr.Comment,(t,e)=>{e.comment(t[1])}),t.add(Gr.CloseElement,(t,e)=>{e.closeElement()}),t.add(Gr.FlushElement,(t,e)=>{e.flushElement()}),t.add(Gr.Modifier,(t,e)=>{let n=e.referrer,r=t[1],i=t[2],s=t[3],o=e.compiler.resolveModifier(r,n) -if(null===o)throw new Error(`Compile Error ${r} is not a modifier: Helpers may not be used in the element form.`) -e.modifier(o,i,s)}),t.add(Gr.StaticAttr,(t,e)=>{let n=t[1],r=t[2],i=t[3] -e.staticAttr(n,i,r)}),t.add(Gr.DynamicAttr,(t,e)=>{ti(t,!1,e)}),t.add(Gr.TrustingAttr,(t,e)=>{ti(t,!0,e)}),t.add(Gr.OpenElement,(t,e)=>{e.openPrimitiveElement(t[1])}),t.add(Gr.OpenSplattedElement,(t,e)=>{e.setComponentAttrs(!0),e.putComponentOperations(),e.openPrimitiveElement(t[1])}),t.add(Gr.Component,(t,e)=>{let n=t[1],r=t[2],i=t[3],s=t[4],o=e.referrer -var a=e.compiler.resolveLayoutForTag(n,o) -let l=a.handle,c=a.capabilities,h=a.compilable -if(null===l||null===c)throw new Error(`Compile Error: Cannot find component ${n}`) -{let t=[[Gr.ClientSideStatement,Kr.SetComponentAttrs,!0],...r,[Gr.ClientSideStatement,Kr.SetComponentAttrs,!1]],n=e.inlineBlock({statements:t,parameters:Se}),o=e.template(s) -h?(e.pushComponentDefinition(l),e.invokeStaticComponent(c,h,n,null,i,!1,o&&o)):(e.pushComponentDefinition(l),e.invokeComponent(c,n,null,i,!1,o&&o))}}),t.add(Gr.Partial,(t,e)=>{let n=t[1],r=t[2],i=e.referrer -e.replayableIf({args:()=>(e.expr(n),e.dup(),2),ifTrue(){e.invokePartial(i,e.evalSymbols(),r),e.popScope(),e.popFrame()}})}),t.add(Gr.Yield,(t,e)=>{let n=t[1],r=t[2] -e.yield(n,r)}),t.add(Gr.AttrSplat,(t,e)=>{let n=t[1] -e.yield(n,[]),e.setComponentAttrs(!1)}),t.add(Gr.Debugger,(t,e)=>{let n=t[1] -e.debugger(e.evalSymbols(),n)}),t.add(Gr.ClientSideStatement,(t,n)=>{e.compile(t,n)}),t.add(Gr.Append,(t,e)=>{let n=t[1],r=t[2] -!0!==(e.compileInline(t)||n)&&e.guardedAppend(n,r)}),t.add(Gr.Block,(t,e)=>{let n=t[1],r=t[2],i=t[3],s=t[4],o=t[5],a=e.template(s),l=e.template(o),c=a&&a,h=l&&l -e.compileBlock(n,r,i,c,h)}) -const e=new Xr(1) -return e.add(Kr.OpenComponentElement,(t,e)=>{e.putComponentOperations(),e.openPrimitiveElement(t[2])}),e.add(Kr.DidCreateElement,(t,e)=>{e.didCreateElement(Ae.s0)}),e.add(Kr.SetComponentAttrs,(t,e)=>{e.setComponentAttrs(t[2])}),e.add(Kr.Debugger,()=>{}),e.add(Kr.DidRenderLayout,(t,e)=>{e.didRenderLayout(Ae.s0)}),t}() -for(let i=0;i<t.length;i++)r.compile(t[i],e) -return e.commit()}class li{constructor(t,e,n){this.main=t,this.trustingGuardedAppend=e,this.cautiousGuardedAppend=n}static compile(t){let e=this.std(t,t=>t.main()),n=this.std(t,t=>t.stdAppend(!0)),r=this.std(t,t=>t.stdAppend(!1)) -return new li(e,n,r)}static std(t,e){return fi.build(t,e)}getAppend(t){return t?this.trustingGuardedAppend:this.cautiousGuardedAppend}}class ci{constructor(t,e,n){this.macros=t,this.program=e,this.resolver=n,this.initialize()}initialize(){this.stdLib=li.compile(this)}get constants(){return this.program.constants}compileInline(t,e){return this.macros.inlines.compile(t,e)}compileBlock(t,e,n,r,i,s){this.macros.blocks.compile(t,e,n,r,i,s)}add(t,e){return ai(t,this.builderFor(e))}commit(t,e){let n=this.program.heap,r=n.malloc() -for(let i=0;i<e.length;i++){let t=e[i] -"function"==typeof t?n.pushPlaceholder(t):n.push(t)}return n.finishMalloc(r,t),r}resolveLayoutForTag(t,e){let n=this.resolver.lookupComponentDefinition(t,e) -return null===n?{handle:null,capabilities:null,compilable:null}:this.resolveLayoutForHandle(n)}resolveLayoutForHandle(t){let e=this.resolver,n=e.getCapabilities(t),r=null -return n.dynamicLayout||(r=e.getLayout(t)),{handle:t,capabilities:n,compilable:r}}resolveModifier(t,e){return this.resolver.lookupModifier(t,e)}resolveHelper(t,e){return this.resolver.lookupHelper(t,e)}}class hi{constructor(t,e){this.compiler=t,this.layout=e,this.compiled=null -let n=e.block -this.symbolTable={hasEval:n.hasEval,symbols:n.symbols.concat([Yr])}}compile(){if(null!==this.compiled)return this.compiled -let t=this.compiler,e=this.layout,n=t.builderFor(e) -n.startLabels(),n.fetch(Ae.s1),n.getComponentTagName(Ae.s0),n.primitiveReference(),n.dup(),n.load(Ae.s1),n.jumpUnless("BODY"),n.fetch(Ae.s1),n.putComponentOperations(),n.openDynamicElement(),n.didCreateElement(Ae.s0),n.flushElement(),n.label("BODY"),n.invokeStaticBlock(function(t,e){return new oi(e,{block:{statements:t.block.statements,parameters:Se},containingLayout:t})}(e,t)),n.fetch(Ae.s1),n.jumpUnless("END"),n.closeElement(),n.label("END"),n.load(Ae.s1),n.stopLabels() -let r=n.commit() -return this.compiled=r}}class pi{constructor(t){this.builder=t}static(t,e){let n=e[0],r=e[1],i=e[2],s=e[3],o=this.builder -if(null!==t){var a=o.compiler.resolveLayoutForHandle(t) -let e=a.capabilities,l=a.compilable -l?(o.pushComponentDefinition(t),o.invokeStaticComponent(e,l,null,n,r,!1,i,s)):(o.pushComponentDefinition(t),o.invokeComponent(e,null,n,r,!1,i,s))}}}class ui{constructor(t){this.buffer=t,this.typePos=0,this.size=0}encode(t,e){if(t>255)throw new Error(`Opcode type over 8-bits. Got ${t}.`) -this.buffer.push(t|e|arguments.length-2<<8),this.typePos=this.buffer.length-1 -for(let n=2;n<arguments.length;n++){let t=arguments[n] -if("number"==typeof t&&t>65535)throw new Error(`Operand over 16-bits. Got ${t}.`) -this.buffer.push(t)}this.size=this.buffer.length}patch(t,e){if(-1!==this.buffer[t+1])throw new Error("Trying to patch operand in populated slot instead of a reserved slot.") -this.buffer[t+1]=e}patchWith(t,e,n){if(-1!==this.buffer[t+1])throw new Error("Trying to patch operand in populated slot instead of a reserved slot.") -this.buffer[t+1]=e,this.buffer[t+2]=n}}class di{constructor(){this.labels=be(),this.targets=[]}label(t,e){this.labels[t]=e}target(t,e){this.targets.push({at:t,target:e})}patch(t){let e=this.targets,n=this.labels -for(let i=0;i<e.length;i++){var r=e[i] -let s=r.at,o=n[r.target]-s -t.patch(s,o)}}}class fi{constructor(t,e=0){this.size=e,this.encoder=new ui([]),this.labelsStack=new ke,this.compiler=t}static build(t,e){let n=new fi(t) -return e(n),n.commit()}push(t){switch(arguments.length){case 1:return this.encoder.encode(t,0) -case 2:return this.encoder.encode(t,0,arguments[1]) -case 3:return this.encoder.encode(t,0,arguments[1],arguments[2]) -default:return this.encoder.encode(t,0,arguments[1],arguments[2],arguments[3])}}pushMachine(t){switch(arguments.length){case 1:return this.encoder.encode(t,1024) -case 2:return this.encoder.encode(t,1024,arguments[1]) -case 3:return this.encoder.encode(t,1024,arguments[1],arguments[2]) -default:return this.encoder.encode(t,1024,arguments[1],arguments[2],arguments[3])}}commit(){return this.pushMachine(24),this.compiler.commit(this.size,this.encoder.buffer)}reserve(t){this.encoder.encode(t,0,-1)}reserveWithOperand(t,e){this.encoder.encode(t,0,-1,e)}reserveMachine(t){this.encoder.encode(t,1024,-1)}main(){this.push(68,Ae.s0),this.invokePreparedComponent(!1,!1,!0)}appendHTML(){this.push(28)}appendSafeHTML(){this.push(29)}appendDocumentFragment(){this.push(30)}appendNode(){this.push(31)}appendText(){this.push(32)}beginComponentTransaction(){this.push(91)}commitComponentTransaction(){this.push(92)}pushDynamicScope(){this.push(44)}popDynamicScope(){this.push(45)}pushRemoteElement(){this.push(41)}popRemoteElement(){this.push(42)}pushRootScope(t,e){this.push(20,t,e?1:0)}pushVirtualRootScope(t){this.push(21,t)}pushChildScope(){this.push(22)}popScope(){this.push(23)}prepareArgs(t){this.push(79,t)}createComponent(t,e){let n=0|e -this.push(81,n,t)}registerComponentDestructor(t){this.push(82,t)}putComponentOperations(){this.push(83)}getComponentSelf(t){this.push(84,t)}getComponentTagName(t){this.push(85,t)}getComponentLayout(t){this.push(86,t)}setupForEval(t){this.push(87,t)}invokeComponentLayout(t){this.push(90,t)}didCreateElement(t){this.push(93,t)}didRenderLayout(t){this.push(94,t)}pushFrame(){this.pushMachine(57)}popFrame(){this.pushMachine(58)}pushSmallFrame(){this.pushMachine(59)}popSmallFrame(){this.pushMachine(60)}invokeVirtual(){this.pushMachine(49)}invokeYield(){this.push(51)}toBoolean(){this.push(63)}invokePreparedComponent(t,e,n,r=null){this.beginComponentTransaction(),this.pushDynamicScope(),this.createComponent(Ae.s0,t),r&&r(),this.registerComponentDestructor(Ae.s0),this.getComponentSelf(Ae.s0),this.pushVirtualRootScope(Ae.s0),this.setVariable(0),this.setupForEval(Ae.s0),n&&this.setNamedVariables(Ae.s0),e&&this.setBlocks(Ae.s0),this.pop(),this.invokeComponentLayout(Ae.s0),this.didRenderLayout(Ae.s0),this.popFrame(),this.popScope(),this.popDynamicScope(),this.commitComponentTransaction()}get pos(){return this.encoder.typePos}get nextPos(){return this.encoder.size}compileInline(t){return this.compiler.compileInline(t,this)}compileBlock(t,e,n,r,i){this.compiler.compileBlock(t,e,n,r,i,this)}label(t){this.labels.label(t,this.nextPos)}get labels(){return this.labelsStack.current}startLabels(){this.labelsStack.push(new di)}stopLabels(){this.labelsStack.pop().patch(this.encoder)}pushCurriedComponent(){this.push(74)}pushDynamicComponentInstance(){this.push(73)}openDynamicElement(){this.push(34)}flushElement(){this.push(38)}closeElement(){this.push(39)}putIterator(){this.push(66)}enterList(t){this.reserve(64),this.labels.target(this.pos,t)}exitList(){this.push(65)}iterate(t){this.reserve(67),this.labels.target(this.pos,t)}setNamedVariables(t){this.push(2,t)}setBlocks(t){this.push(3,t)}setVariable(t){this.push(4,t)}setBlock(t){this.push(5,t)}getVariable(t){this.push(6,t)}getBlock(t){this.push(8,t)}hasBlock(t){this.push(9,t)}concat(t){this.push(11,t)}load(t){this.push(18,t)}fetch(t){this.push(19,t)}dup(t=Ae.sp,e=0){return this.push(16,t,e)}pop(t=1){return this.push(17,t)}returnTo(t){this.reserveMachine(25),this.labels.target(this.pos,t)}primitiveReference(){this.push(14)}reifyU32(){this.push(15)}enter(t){this.push(61,t)}exit(){this.push(62)}return(){this.pushMachine(24)}jump(t){this.reserveMachine(52),this.labels.target(this.pos,t)}jumpIf(t){this.reserve(53),this.labels.target(this.pos,t)}jumpUnless(t){this.reserve(54),this.labels.target(this.pos,t)}jumpEq(t,e){this.reserveWithOperand(55,t),this.labels.target(this.pos,e)}assertSame(){this.push(56)}pushEmptyArgs(){this.push(77)}switch(t,e){let n=[],r=0 -e(function(t,e){n.push({match:t,callback:e,label:`CLAUSE${r++}`})}),this.enter(2),this.assertSame(),this.reifyU32(),this.startLabels(),n.slice(0,-1).forEach(t=>this.jumpEq(t.match,t.label)) -for(let i=n.length-1;i>=0;i--){let t=n[i] -this.label(t.label),this.pop(2),t.callback(),0!==i&&this.jump("END")}this.label("END"),this.stopLabels(),this.exit()}stdAppend(t){this.switch(this.contentType(),e=>{e(1,()=>{t?(this.assertSame(),this.appendHTML()):this.appendText()}),e(0,()=>{this.pushCurriedComponent(),this.pushDynamicComponentInstance(),this.invokeBareComponent()}),e(3,()=>{this.assertSame(),this.appendSafeHTML()}),e(4,()=>{this.assertSame(),this.appendDocumentFragment()}),e(5,()=>{this.assertSame(),this.appendNode()})})}populateLayout(t){this.push(89,t)}invokeBareComponent(){this.fetch(Ae.s0),this.dup(Ae.sp,1),this.load(Ae.s0),this.pushFrame(),this.pushEmptyArgs(),this.prepareArgs(Ae.s0),this.invokePreparedComponent(!1,!1,!0,()=>{this.getComponentLayout(Ae.s0),this.populateLayout(Ae.s0)}),this.load(Ae.s0)}isComponent(){this.push(69)}contentType(){this.push(70)}pushBlockScope(){this.push(47)}}class mi extends fi{constructor(t,e){super(t,e?e.block.symbols.length:0),this.containingLayout=e,this.component=new pi(this),this.expressionCompiler=function(){if(Zr)return Zr -const t=Zr=new Xr -return t.add(Gr.Unknown,(t,e)=>{let n=e.compiler,r=e.referrer,i=e.containingLayout.asPartial,s=t[1],o=n.resolveHelper(s,r) -null!==o?e.helper(o,null,null):i?e.resolveMaybeLocal(s):(e.getVariable(0),e.getProperty(s))}),t.add(Gr.Concat,(t,e)=>{let n=t[1] -for(let r=0;r<n.length;r++)e.expr(n[r]) -e.concat(n.length)}),t.add(Gr.Helper,(t,e)=>{let n=e.compiler,r=e.referrer,i=t[1],s=t[2],o=t[3] -if("component"===i){let t=s[0],n=s.slice(1) -return void e.curryComponent(t,n,o,!0)}let a=n.resolveHelper(i,r) -if(null===a)throw new Error(`Compile Error: ${i} is not a helper`) -e.helper(a,s,o)}),t.add(Gr.Get,(t,e)=>{let n=t[1],r=t[2] -e.getVariable(n) -for(let i=0;i<r.length;i++)e.getProperty(r[i])}),t.add(Gr.MaybeLocal,(t,e)=>{let n=t[1] -if(e.containingLayout.asPartial){let t=n[0] -n=n.slice(1),e.resolveMaybeLocal(t)}else e.getVariable(0) -for(let r=0;r<n.length;r++)e.getProperty(n[r])}),t.add(Gr.Undefined,(t,e)=>e.pushPrimitiveReference(void 0)),t.add(Gr.HasBlock,(t,e)=>{e.hasBlock(t[1])}),t.add(Gr.HasBlockParams,(t,e)=>{e.hasBlockParams(t[1])}),t}(),this.isComponentAttrs=!1,this.constants=t.constants,this.stdLib=t.stdLib}get referrer(){return this.containingLayout&&this.containingLayout.referrer}setComponentAttrs(t){this.isComponentAttrs=t}expr(t){Array.isArray(t)?this.expressionCompiler.compile(t,this):this.pushPrimitiveReference(t)}pushArgs(t,e){let n=this.constants.stringArray(t) -this.push(76,n,e)}pushYieldableBlock(t){this.pushSymbolTable(t&&t.symbolTable),this.pushBlockScope(),this.pushBlock(t)}curryComponent(t,e,n,r){let i=this.containingLayout.referrer -this.pushFrame(),this.compileArgs(e,n,null,r),this.push(80),this.expr(t),this.push(71,this.constants.serializable(i)),this.popFrame(),this.fetch(Ae.v0)}pushSymbolTable(t){if(t){let e=this.constants.serializable(t) -this.push(48,e)}else this.primitive(null)}invokeComponent(t,e,n,r,i,s,o=null,a){this.fetch(Ae.s0),this.dup(Ae.sp,1),this.load(Ae.s0),this.pushFrame() -let l=!!(s||o||e),c=!0===t||t.prepareArgs||!(!r||0===r[0].length),h={main:s,else:o,attrs:e} -this.compileArgs(n,r,h,i),this.prepareArgs(Ae.s0),this.invokePreparedComponent(null!==s,l,c,()=>{a?(this.pushSymbolTable(a.symbolTable),this.pushLayout(a),this.resolveLayout()):this.getComponentLayout(Ae.s0),this.populateLayout(Ae.s0)}),this.load(Ae.s0)}invokeStaticComponent(t,e,n,r,i,s,o,a=null){let l=e.symbolTable -if(l.hasEval||t.prepareArgs)return void this.invokeComponent(t,n,r,i,s,o,a,e) -this.fetch(Ae.s0),this.dup(Ae.sp,1),this.load(Ae.s0) -let c=l.symbols -t.createArgs&&(this.pushFrame(),this.compileArgs(null,i,null,s)),this.beginComponentTransaction(),t.dynamicScope&&this.pushDynamicScope(),t.createInstance&&this.createComponent(Ae.s0,null!==o),t.createArgs&&this.popFrame(),this.pushFrame(),this.registerComponentDestructor(Ae.s0) -let h=[] -this.getComponentSelf(Ae.s0),h.push({symbol:0,isBlock:!1}) -for(let u=0;u<c.length;u++){let t=c[u] -switch(t.charAt(0)){case"&":let e=null -if("&default"===t)e=o -else if("&inverse"===t)e=a -else{if(t!==Yr)throw de() -e=n}e?(this.pushYieldableBlock(e),h.push({symbol:u+1,isBlock:!0})):(this.pushYieldableBlock(null),h.push({symbol:u+1,isBlock:!0})) -break -case"@":if(!i)break -let r=i[0],l=i[1],c=t -s&&(c=t.slice(1)) -let p=r.indexOf(c);-1!==p&&(this.expr(l[p]),h.push({symbol:u+1,isBlock:!1}))}}this.pushRootScope(c.length+1,!!(o||a||n)) -for(let u=h.length-1;u>=0;u--){var p=h[u] -let t=p.symbol -p.isBlock?this.setBlock(t):this.setVariable(t)}this.invokeStatic(e),t.createInstance&&this.didRenderLayout(Ae.s0),this.popFrame(),this.popScope(),t.dynamicScope&&this.popDynamicScope(),this.commitComponentTransaction(),this.load(Ae.s0)}dynamicComponent(t,e,n,r,i,s=null){this.replayable({args:()=>(this.expr(t),this.dup(),2),body:()=>{this.jumpUnless("ELSE"),this.resolveDynamicComponent(this.containingLayout.referrer),this.pushDynamicComponentInstance(),this.invokeComponent(!0,null,e,n,r,i,s),this.label("ELSE")}})}yield(t,e){this.compileArgs(e,null,null,!1),this.getBlock(t),this.resolveBlock(),this.invokeYield(),this.popScope(),this.popFrame()}guardedAppend(t,e){this.pushFrame(),this.expr(t),this.pushMachine(50,this.stdLib.getAppend(e)),this.popFrame()}invokeStaticBlock(t,e=0){let n=t.symbolTable.parameters,r=n.length,i=Math.min(e,r) -if(this.pushFrame(),i){this.pushChildScope() -for(let t=0;t<i;t++)this.dup(Ae.fp,e-t),this.setVariable(n[t])}this.pushBlock(t),this.resolveBlock(),this.invokeVirtual(),i&&this.popScope(),this.popFrame()}string(t){return this.constants.string(t)}names(t){let e=[] -for(let n=0;n<t.length;n++){let r=t[n] -e[n]=this.constants.string(r)}return this.constants.array(e)}symbols(t){return this.constants.array(t)}primitive(t){let e,n=0 -switch(typeof t){case"number":t%1==0?t>-1?e=t:(e=this.constants.number(t),n=4):(e=this.constants.number(t),n=1) -break -case"string":e=this.string(t),n=2 -break -case"boolean":e=0|t,n=3 -break -case"object":e=2,n=3 -break -case"undefined":e=3,n=3 -break -default:throw new Error("Invalid primitive passed to pushPrimitive")}let r=this.sizeImmediate(e<<3|n,e) -this.push(13,r)}sizeImmediate(t,e){return t>=65535||t<0?this.constants.number(e)<<3|5:t}pushPrimitiveReference(t){this.primitive(t),this.primitiveReference()}pushComponentDefinition(t){this.push(72,this.constants.handle(t))}resolveDynamicComponent(t){this.push(75,this.constants.serializable(t))}staticComponentHelper(t,e,n){var r=this.compiler.resolveLayoutForTag(t,this.referrer) -let i=r.handle,s=r.capabilities,o=r.compilable -if(null!==i&&null!==s&&o){if(e)for(let t=0;t<e.length;t+=2)e[t][0]=`@${e[t][0]}` -return this.pushComponentDefinition(i),this.invokeStaticComponent(s,o,null,null,e,!1,n&&n),!0}return!1}invokePartial(t,e,n){let r=this.constants.serializable(t),i=this.constants.stringArray(e),s=this.constants.array(n) -this.push(95,r,i,s)}resolveMaybeLocal(t){this.push(96,this.string(t))}debugger(t,e){this.push(97,this.constants.stringArray(t),this.constants.array(e))}text(t){this.push(26,this.constants.string(t))}openPrimitiveElement(t){this.push(33,this.constants.string(t))}modifier(t,e,n){this.pushFrame(),this.compileArgs(e,n,null,!0),this.push(40,this.constants.handle(t)),this.popFrame()}comment(t){let e=this.constants.string(t) -this.push(27,e)}dynamicAttr(t,e,n){let r=this.constants.string(t),i=e?this.constants.string(e):0 -this.isComponentAttrs?this.push(37,r,!0===n?1:0,i):this.push(36,r,!0===n?1:0,i)}staticAttr(t,e,n){let r=this.constants.string(t),i=e?this.constants.string(e):0 -if(this.isComponentAttrs)this.pushPrimitiveReference(n),this.push(37,r,1,i) -else{let t=this.constants.string(n) -this.push(35,r,t,i)}}hasBlockParams(t){this.getBlock(t),this.resolveBlock(),this.push(10)}getProperty(t){this.push(7,this.string(t))}helper(t,e,n){this.pushFrame(),this.compileArgs(e,n,null,!0),this.push(1,this.constants.handle(t)),this.popFrame(),this.fetch(Ae.v0)}bindDynamicScope(t){this.push(43,this.names(t))}replayable({args:t,body:e}){this.startLabels(),this.pushFrame(),this.returnTo("ENDINITIAL") -let n=t() -this.enter(n),e(),this.label("FINALLY"),this.exit(),this.return(),this.label("ENDINITIAL"),this.popFrame(),this.stopLabels()}replayableIf({args:t,ifTrue:e,ifFalse:n}){this.replayable({args:t,body:()=>{this.jumpUnless("ELSE"),e(),this.jump("FINALLY"),this.label("ELSE"),n&&n()}})}inlineBlock(t){return new oi(this.compiler,{block:t,containingLayout:this.containingLayout})}evalSymbols(){let t=this.containingLayout.block -return t.hasEval?t.symbols:null}compileParams(t){if(!t)return 0 -for(let e=0;e<t.length;e++)this.expr(t[e]) -return t.length}compileArgs(t,e,n,r){n&&(this.pushYieldableBlock(n.main),this.pushYieldableBlock(n.else),this.pushYieldableBlock(n.attrs)) -let i=this.compileParams(t)<<4 -r&&(i|=8),n&&(i|=7) -let s=Se -if(e){s=e[0] -let t=e[1] -for(let e=0;e<t.length;e++)this.expr(t[e])}this.pushArgs(s,i)}template(t){return t?this.inlineBlock(t):null}}class gi extends mi{pushBlock(t){t?this.pushOther(t):this.primitive(null)}resolveBlock(){this.push(46)}pushLayout(t){t?this.pushOther(t):this.primitive(null)}resolveLayout(){this.push(46)}invokeStatic(t){this.pushOther(t),this.push(46),this.pushMachine(49)}pushOther(t){this.push(12,this.other(t))}other(t){return this.constants.other(t)}}const vi={},yi=0,bi=Object.freeze([]) -class ki{constructor(){this.strings=[],this.arrays=[bi],this.tables=[],this.handles=[],this.resolved=[],this.numbers=[]}string(t){let e=this.strings.indexOf(t) -return e>-1?e:this.strings.push(t)-1}stringArray(t){let e=new Array(t.length) -for(let n=0;n<t.length;n++)e[n]=this.string(t[n]) -return this.array(e)}array(t){if(0===t.length)return yi -let e=this.arrays.indexOf(t) -return e>-1?e:this.arrays.push(t)-1}handle(t){let e=this.handles.indexOf(t) -return e>-1?e:(this.resolved.push(vi),this.handles.push(t)-1)}serializable(t){let e=JSON.stringify(t),n=this.strings.indexOf(e) -return n>-1?n:this.strings.push(e)-1}number(t){let e=this.numbers.indexOf(t) -return e>-1?e:this.numbers.push(t)-1}toPool(){return{strings:this.strings,arrays:this.arrays,handles:this.handles,numbers:this.numbers}}}class wi extends ki{constructor(t,e){super(),this.resolver=t,e&&(this.strings=e.strings,this.arrays=e.arrays,this.handles=e.handles,this.resolved=this.handles.map(()=>vi),this.numbers=e.numbers)}getNumber(t){return this.numbers[t]}getString(t){return this.strings[t]}getStringArray(t){let e=this.getArray(t),n=new Array(e.length) -for(let r=0;r<e.length;r++){let t=e[r] -n[r]=this.getString(t)}return n}getArray(t){return this.arrays[t]}resolveHandle(t){let e=this.resolved[t] -if(e===vi){let n=this.handles[t] -e=this.resolved[t]=this.resolver.resolve(n)}return e}getSerializable(t){return JSON.parse(this.strings[t])}}class xi extends wi{constructor(){super(...arguments),this.others=[],this.serializables=[]}serializable(t){let e=this.serializables.indexOf(t) -return e>-1?e:this.serializables.push(t)-1}getSerializable(t){return this.serializables[t]}getOther(t){return this.others[t-1]}other(t){return this.others.push(t)}}class Si{constructor(t){this.heap=t,this.offset=0}get size(){return 1+((768&this.heap.getbyaddr(this.offset))>>8)}get isMachine(){return 1024&this.heap.getbyaddr(this.offset)}get type(){return 255&this.heap.getbyaddr(this.offset)}get op1(){return this.heap.getbyaddr(this.offset+1)}get op2(){return this.heap.getbyaddr(this.offset+2)}get op3(){return this.heap.getbyaddr(this.offset+3)}}function Ci(t,e,n){return t|e<<16|n<<30}function Mi(t,e){return t|e<<30}const Oi=1048576 -class Ei{constructor(t){if(this.placeholders=[],this.offset=0,this.handle=0,this.capacity=Oi,t){let e=t.buffer,n=t.table,r=t.handle -this.heap=new Uint16Array(e),this.table=n,this.offset=this.heap.length,this.handle=r,this.capacity=0}else this.heap=new Uint16Array(Oi),this.table=[]}push(t){this.sizeCheck(),this.heap[this.offset++]=t}sizeCheck(){if(0===this.capacity){let t=Ni(this.heap,0,this.offset) -this.heap=new Uint16Array(t.length+Oi),this.heap.set(t,0),this.capacity=Oi}this.capacity--}getbyaddr(t){return this.heap[t]}setbyaddr(t,e){this.heap[t]=e}malloc(){this.table.push(this.offset,0) -let t=this.handle -return this.handle+=2,t}finishMalloc(t,e){let n=this.table[t],r=Ci(this.offset-n,e,0) -this.table[t+1]=r}size(){return this.offset}getaddr(t){return this.table[t]}gethandle(t){this.table.push(t,Ci(0,0,3)) -let e=this.handle -return this.handle+=2,e}sizeof(t){return-1}scopesizeof(t){return(1073676288&this.table[t+1])>>16}free(t){let e=this.table[t+1] -this.table[t+1]=Mi(e,1)}compact(){let t=0,e=this.table,n=this.table.length,r=this.heap -for(let i=0;i<n;i+=2){let n=e[i],s=e[i+1],o=65535&s,a=-1&s -if(2!==a)if(1===a)e[i+1]=Mi(s,2),t+=o -else if(0===a){for(let e=n;e<=i+o;e++)r[e-t]=r[e] -e[i]=n-t}else 3===a&&(e[i]=n-t)}this.offset=this.offset-t}pushPlaceholder(t){this.sizeCheck() -let e=this.offset++ -this.heap[e]=65535,this.placeholders.push([e,t])}patchPlaceholders(){let t=this.placeholders -for(let n=0;n<t.length;n++){var e=t[n] -let r=e[0],i=e[1] -this.setbyaddr(r,i())}}capture(t=this.offset){this.patchPlaceholders() -let e=Ni(this.heap,0,t).buffer -return{handle:this.handle,table:this.table,buffer:e}}}class Ti{constructor(t=new ki,e=new Ei){this.constants=t,this.heap=e,this._opcode=new Si(this.heap)}opcode(t){return this._opcode.offset=t,this._opcode}}class Ai extends Ti{}function Ni(t,e,n){if(void 0!==t.slice)return t.slice(e,n) -let r=new Uint16Array(n) -for(;e<n;e++)r[e]=t[e] -return r}class Di extends ci{constructor(t,e,n){let r=new xi(e) -super(n,new Ai(r),t)}builderFor(t){return new gi(this,t)}}let _i=0 -class Ri{constructor(t,e){this.compiler=t,this.parsedLayout=e,this.layout=null,this.partial=null,this.wrappedLayout=null -let n=e.block -this.symbols=n.symbols,this.hasEval=n.hasEval,this.referrer=e.referrer,this.id=e.id||`client-${_i++}`}asLayout(){return this.layout?this.layout:this.layout=new si(this.compiler,Object.assign({},this.parsedLayout,{asPartial:!1}))}asPartial(){return this.partial?this.partial:this.layout=new si(this.compiler,Object.assign({},this.parsedLayout,{asPartial:!0}))}asWrappedLayout(){return this.wrappedLayout?this.wrappedLayout:this.wrappedLayout=new hi(this.compiler,Object.assign({},this.parsedLayout,{asPartial:!1}))}}class Ii{constructor(t){this.owner=t,this.handleLookup=[],this.cache={component:new Ur,template:new Ur,compiledTemplate:new Ur,helper:new Ur,manager:new Ur,modifier:new Ur}}lookup(t,e,n){return this.cache[t].hasName(e)?this.cache[t].getHandle(e):null}register(t,e,n){let r=this.cache[t],i=this.handleLookup.length -return this.handleLookup.push(r),this.cache[t].register(i,e,n),i}lookupModifier(t,e){let n=this.lookup("modifier",t) -if(null===n)throw new Error(`Modifier for ${t} not found.`) -return n}compileTemplate(t,e){if(!this.cache.compiledTemplate.hasName(t)){let n=this.resolve(e),r=JSON.parse(n.block),i=new si(this.compiler,{block:r,referrer:n.meta,asPartial:!1}),s={handle:i.compile(),symbolTable:i.symbolTable} -return this.register("compiledTemplate",t,s),s}let n=this.lookup("compiledTemplate",t) -return this.resolve(n)}registerHelper(t,e){return this.register("helper",t,(t,n)=>new qr(e,n))}registerInternalHelper(t,e){this.register("helper",t,e)}registerComponent(t,e,n,r){let i=this.registerTemplate(e,r),s=this.managerFor(i.meta.managerId),o=new X(t,s,n,i.handle) -return this.register("component",t,o)}lookupComponentHandle(t,e){return this.cache.component.hasName(t)||this.lookupComponentDefinition(t,e),this.lookup("component",t,e)}managerFor(t="main"){let e -if(this.cache.manager.hasName(t)){let e=this.cache.manager.getHandle(t) -return this.cache.manager.getByHandle(e)}{let n=this.owner.rootName -if(!(e=this.owner.lookup(`component-manager:/${n}/component-managers/${t}`)))throw new Error(`No component manager found for ID ${t}.`) -return this.register("manager",t,e),e}}registerTemplate(t,e){return{name:t,handle:this.register("template",t,e),meta:e.meta}}lookupComponentDefinition(t,e){let n -if(this.cache.component.hasName(t))n=this.lookup("component",t,e) -else{let r=function(t,e){if(null==t)throw new Error(e) -return t}(this.identifyComponent(t,e),`Could not find the component '${t}'`),i=this.owner.lookup("template",r),s=this.owner.identify("component",r),o=null -void 0!==s&&(o=this.owner.factoryFor(s)),n=this.registerComponent(t,r,o,i)}return this.resolve(n)}lookupHelper(t,e){if(!this.cache.helper.hasName(t)){let n=this.owner,r=`helper:${t}`,i=e.specifier,s=n.identify(r,i) -if(void 0===s)return null -let o=this.owner.lookup(s,e.specifier) -return this.registerHelper(t,o)}return this.lookup("helper",t,e)}lookupPartial(t,e){throw new Error("Partials are not available in Glimmer applications.")}resolve(t){return this.handleLookup[t].getByHandle(t)}identifyComponent(t,e){let n=this.owner,r=`template:${t}`,i=e.specifier,s=n.identify(r,i) -if(void 0===s&&n.identify(`component:${t}`,i))throw new Error(`The component '${t}' is missing a template. All components must have a template. Make sure there is a template.hbs in the component directory.`) -return s}}var Bi={id:"j7SGa6Pm",block:'{"symbols":["root"],"statements":[[4,"each",[[22,["roots"]]],[["key"],["id"]],{"statements":[[4,"in-element",[[21,1,["parent"]]],[["guid","nextSibling"],["%cursor:0%",[21,1,["nextSibling"]]]],{"statements":[[1,[26,"component",[[21,1,["component"]]],null],false]],"parameters":[]},null]],"parameters":[1]},null]],"hasEval":false}',meta:{specifier:"template:/-application/application/src/templates/main"}} -function zi(t,e){let n=t.getSelf(),r=e.capture(),i=r.positional.at(0).value() -return"function"!=typeof i&&function(t,e){let n=function(t){let e,n,r="" -if(null==t)return r -"parent"in t&&"property"in t?(e=t.parent.value(),n=t.property):"_parentValue"in t&&"_propertyKey"in t&&(e=t._parentValue,n=t._propertyKey) -void 0!==n&&(r+=`('${n}' on ${function(t){let e=typeof t -if(null==t)return e -if("number"===e||"boolean"===e)return t.toString() -if(t.debugName)return t.debugName -try{return JSON.stringify(t)}catch(n){}return t.toString()}(e)}) `) -return r}(e) -throw new Error(`You tried to create an action with the {{action}} helper, but the first argument ${n}was ${typeof t} instead of a function.`)}(i,r.positional.at(0)),new ne(function(...t){let e=r.positional.value() -e.shift(),e.push(...t),i.apply(n&&n.value(),e)})}function Pi(t){return t[0]?t[1]:t[2]}class Fi{constructor(t){this.resolver=t}getComponentDefinition(t){let e=this.resolver.resolve(t) -return fe(!!e,`Couldn't find a template for ${t}`),e}getCapabilities(t){let e=this.getComponentDefinition(t),n=e.manager,r=e.state -return n.getCapabilities(r)}getLayout(t){let e=this.getComponentDefinition(t),n=e.manager.getLayout(e,this.resolver) -return{compile:()=>n.handle,symbolTable:n.symbolTable}}lookupHelper(t,e){return this.resolver.lookupHelper(t,e)}lookupModifier(t,e){return this.resolver.lookupModifier(t,e)}lookupComponentDefinition(t,e){return this.resolver.lookupComponentHandle(t,e)}lookupPartial(t,e){return this.resolver.lookupPartial(t,e)}}class Vi{constructor(t){this.resolver=t}async getTemplateIterator(t,e,n,r,i){let s=new Ii(t),o=new Fi(s),a=new ei,l=new Di(o,s,a),c=l.program -s.compiler=l,s.registerTemplate("main",Bi),s.registerInternalHelper("action",zi),s.registerHelper("if",Pi) -let h=function({id:t,meta:e,block:n}){let r,i=t||`client-${_i++}` -return{id:i,meta:e,create:(t,s)=>{let o=s?ge({},s,e):e -return r||(r=JSON.parse(n)),new Ri(t,{id:i,block:r,referrer:o})}}}(Bi).create(l) -return Promise.resolve(function(t,e,n,r,i,s){let o=Br.initial(t,e,n,r,i,s) -return new zr(o)}(c,e,i,r,n,h.asLayout().compile()))}}class Li{constructor({element:t,nextSibling:e=null}){this.cursor={element:t,nextSibling:e}}getBuilder(t){return function(t,e){return lr.forInitialRender(t,e)}(t,this.cursor)}}class ji{render(t){let e -do{e=t.next()}while(!e.done) -this.result=e.value}rerender(){if(!this.result)throw new Error("Cannot re-render before initial render has completed") -this.result.rerender()}}function $i(t){return void 0!==t.rootName&&void 0!==t.collection&&void 0!==t.name&&void 0!==t.type}function Hi(t){let e=t.type,n=function(t){let e=[] -t.rootName&&e.push(t.rootName) -t.collection&&e.push(t.collection) -t.namespace&&e.push(t.namespace) -t.name&&e.push(t.name) -if(e.length>0){let n=e.join("/") -return $i(t)&&(n="/"+n),n}}(t) -return n?e+":"+n:e}function Ui(t){let e={} -if(t.indexOf(":")>-1){let n,r=t.split(":"),i=r[0],s=r[1] -e.type=i,0===s.indexOf("/")?(n=s.substr(1).split("/"),s.substr(1).startsWith("@")?e.rootName=n.shift()+"/"+n.shift():e.rootName=n.shift(),e.collection=n.shift()):n=s.split("/"),n.length>0&&(e.name=n.pop(),n.length>0&&(e.namespace=n.join("/")))}else e.type=t -return e}function qi(t,e){if(!e)throw new Error("Assertion Failed: "+t)}class Ji{constructor(t,e){this.config=t,this.registry=e}identify(t,e){if(function(t){let e=t.split(":"),n=e[0],r=e[1] -return!!(n&&r&&0===r.indexOf("/")&&r.split("/").length>3)}(t))return t -let n,r=Ui(t) -if(e){let t=Ui(e) -if($i(t)){qi("Specifier must not include a rootName, collection, or namespace when combined with an absolute referrer",void 0===r.rootName&&void 0===r.collection&&void 0===r.namespace),r.rootName=t.rootName,r.collection=t.collection -let e=this._definitiveCollection(r.type) -if(!r.name)return r.namespace=t.namespace,r.name=t.name,this._serializeAndVerify(r) -if(r.namespace=t.namespace?t.namespace+"/"+t.name:t.name,function(t){let e=t.namespace,n=t.collection,r=e.lastIndexOf("/-") -if(r>-1){r+=2 -let t=e.indexOf("/",r) -n=e.slice(r,t>-1?t:void 0)}return n}(r)===e&&(n=this._serializeAndVerify(r)))return n -if(e&&(r.namespace+="/-"+e,n=this._serializeAndVerify(r)))return n -r.rootName=r.collection=r.namespace=void 0}else qi('Referrer must either be "absolute" or include a `type` to determine the associated type',t.type),r.collection=this._definitiveCollection(t.type),r.namespace||(r.namespace=t.rootName),qi(`'${t.type}' does not have a definitive collection`,r.collection)}if(r.collection||(r.collection=this._definitiveCollection(r.type),qi(`'${r.type}' does not have a definitive collection`,r.collection)),!r.rootName){if(r.rootName=this.config.app.rootName||"app",n=this._serializeAndVerify(r))return n -r.namespace?(r.rootName=r.namespace,r.namespace=void 0):(r.rootName=r.name,r.name="main")}return(n=this._serializeAndVerify(r))?n:void 0}retrieve(t){return this.registry.get(t)}resolve(t,e){let n=this.identify(t,e) -if(n)return this.retrieve(n)}_definitiveCollection(t){let e=this.config.types[t] -return qi(`'${t}' is not a recognized type`,e),e.definitiveCollection}_serializeAndVerify(t){let e=Hi(t) -if(this.registry.has(e))return e}}class Wi{constructor(t={}){this._entries=t}has(t){return t in this._entries}get(t){return this._entries[t]}}class Ki extends G{constructor(){super(...arguments),this.expanded="false"}click(t){t.preventDefault(),"false"===this.expanded?this.expanded="true":this.expanded="false"}keyDown(t){if(13===t.keyCode)"false"===this.expanded?(this.expanded="true",setTimeout(function(){t.target.nextElementSibling.querySelector('*[role="menuitem"]').focus()},100)):this.expanded="false" -else if(27===t.keyCode)"true"!==t.target.getAttribute("aria-haspopup")&&t.target.parentElement.parentElement.previousElementSibling.focus(),this.expanded="false" -else if(39===t.keyCode){let e=t.target.parentElement.nextElementSibling -for(;e&&("separator"===e.getAttribute("role")||"true"===e.querySelector('*[role="menuitem"]').getAttribute("aria-disabled"));)e=e.nextElementSibling -e&&e.querySelector('*[role="menuitem"]').focus()}else if(37===t.keyCode){let e=t.target.parentElement.previousElementSibling -for(;e&&("separator"===e.getAttribute("role")||"true"===e.querySelector('*[role="menuitem"]').getAttribute("aria-disabled"));)e=e.previousElementSibling -e&&e.querySelector('*[role="menuitem"]').focus()}}mouseOver(){this.expanded="true"}mouseOut(){this.expanded="false"}}(function(t,e,n,r){var i,s=arguments.length,o=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r -if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r) -else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,n,o):i(e,n))||o) -s>3&&o&&Object.defineProperty(e,n,o)})([F],Ki.prototype,"expanded",void 0) -class Gi extends G{get tabindex(){return void 0!==this.args.tabindex?this.args.tabindex:-1}noAction(t){t.preventDefault()}}(function(t,e,n,r){var i,s=arguments.length,o=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r -if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r) -else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,n,o):i(e,n))||o) -s>3&&o&&Object.defineProperty(e,n,o)})([F],Gi.prototype,"tabindex",null) -function Yi(t){return function t(e){if(void 0!==e){if(null===e)return null -if(Array.isArray(e))return e.slice() -if("object"==typeof e){let n={} -return Object.keys(e).forEach(function(r){n[r]=t(e[r])}),n}return e}}(t[0])}function Xi(t){let e=t[0],n=t[1].split(".") -for(;e&&n.length>0;)e=e[n[0]],n=n.slice(1) -return e}function Qi(t){let e=t[0],n=t[1].split("."),r=e -for(;n.length>0;)n.length>1?(r[n[0]]||(r[n[0]]={}),r=r[n[0]]):r[n[0]]=t[2],n.splice(0,1) -return e}var Zi=function(t,e,n,r){var i,s=arguments.length,o=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r -if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r) -else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,n,o):i(e,n))||o) -return s>3&&o&&Object.defineProperty(e,n,o),o} -class ts extends G{constructor(){super(...arguments),this.texts=null,this.selectedIdx=null,this.text=null}didUpdate(){this.texts!==this.args.texts&&(this.texts=this.args.texts,this.texts&&this.texts.length>0?null!==this.selectedIdx?this.selectedIdx>=0&&this.selectedIdx<this.texts.length?this.text=this.texts[this.selectedIdx].text:this.texts&&this.texts.length>0?(this.selectedIdx=0,this.text=this.texts[this.selectedIdx].text):(this.selectedIdx=null,this.text=null):(this.selectedIdx=0,this.text=this.texts[this.selectedIdx].text):(this.selectedIdx=null,this.text=null))}selectText(t){t.preventDefault(),this.selectedIdx=Number.parseInt(t.target.value),this.text=this.texts[this.selectedIdx].text}updateText(t){this.texts[this.selectedIdx]={id:t.attrs.id,text:t},this.text=t,this.args.update(this.texts)}deleteText(){let t=Yi([this.texts]) -console.log(this.selectedIdx),t.splice(this.selectedIdx,1),this.args.update(t)}addText(){let t=Yi([this.texts]),e=0,n=!0 -for(;n;){n=!1,e+=1 -for(let r=0;r<t.length;r++)if(t[r].id==="new-text-"+e){n=!0 -break}}let r={id:"new-text-"+e,text:Yi([this.args.default])} -r.text.attrs||(r.text.attrs={}),r.text.attrs.id="new-text-"+e,t.push(r),this.selectedIdx=t.length-1,this.text=t[this.selectedIdx].text,this.args.update(t)}}Zi([F],ts.prototype,"texts",void 0),Zi([F],ts.prototype,"selectedIdx",void 0),Zi([F],ts.prototype,"text",void 0) -let es=0 -function ns(t){return t._guid||function(t){return t._guid=++es}(t)}Object.freeze([]) -function rs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function is(t,e){return t(e={exports:{}},e.exports),e.exports}function ss(t){this.content=t}ss.prototype={constructor:ss,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e -return-1},get:function(t){var e=this.find(t) -return-1==e?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),s=r.content.slice() -return-1==i?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new ss(s)},remove:function(t){var e=this.find(t) -if(-1==e)return this -var n=this.content.slice() -return n.splice(e,2),new ss(n)},addToStart:function(t,e){return new ss([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice() -return n.push(t,e),new ss(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t) -return i.splice(-1==s?i.length:s,0,e,n),new ss(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=ss.from(t)).size?new ss(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=ss.from(t)).size?new ss(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this -t=ss.from(t) -for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]) -return e},get size(){return this.content.length>>1}},ss.from=function(t){if(t instanceof ss)return t -var e=[] -if(t)for(var n in t)e.push(n,t[n]) -return new ss(e)} -var as=ss,ls=is(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}) -var n,r=(n=as)&&"object"==typeof n&&"default"in n?n.default:n -var i=function(t,e){if(this.content=t,this.size=e||0,null==e)for(var n=0;n<t.length;n++)this.size+=t[n].nodeSize},s={firstChild:{},lastChild:{},childCount:{}} -i.prototype.nodesBetween=function(t,e,n,r,i){void 0===r&&(r=0) -for(var s=0,o=0;o<e;s++){var a=this.content[s],l=o+a.nodeSize -if(l>t&&!1!==n(a,r+o,i,s)&&a.content.size){var c=o+1 -a.nodesBetween(Math.max(0,t-c),Math.min(a.content.size,e-c),n,r+c)}o=l}},i.prototype.descendants=function(t){this.nodesBetween(0,this.size,t)},i.prototype.textBetween=function(t,e,n,r){var i="",s=!0 -return this.nodesBetween(t,e,function(o,a){o.isText?(i+=o.text.slice(Math.max(t,a)-a,e-a),s=!n):o.isLeaf&&r?(i+=r,s=!n):!s&&o.isBlock&&(i+=n,s=!0)},0),i},i.prototype.append=function(t){if(!t.size)return this -if(!this.size)return t -var e=this.lastChild,n=t.firstChild,r=this.content.slice(),s=0 -for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),s=1);s<t.content.length;s++)r.push(t.content[s]) -return new i(r,this.size+t.size)},i.prototype.cut=function(t,e){if(null==e&&(e=this.size),0==t&&e==this.size)return this -var n=[],r=0 -if(e>t)for(var s=0,o=0;o<e;s++){var a=this.content[s],l=o+a.nodeSize -l>t&&((o<t||l>e)&&(a=a.isText?a.cut(Math.max(0,t-o),Math.min(a.text.length,e-o)):a.cut(Math.max(0,t-o-1),Math.min(a.content.size,e-o-1))),n.push(a),r+=a.nodeSize),o=l}return new i(n,r)},i.prototype.cutByIndex=function(t,e){return t==e?i.empty:0==t&&e==this.content.length?this:new i(this.content.slice(t,e))},i.prototype.replaceChild=function(t,e){var n=this.content[t] -if(n==e)return this -var r=this.content.slice(),s=this.size+e.nodeSize-n.nodeSize -return r[t]=e,new i(r,s)},i.prototype.addToStart=function(t){return new i([t].concat(this.content),this.size+t.nodeSize)},i.prototype.addToEnd=function(t){return new i(this.content.concat(t),this.size+t.nodeSize)},i.prototype.eq=function(t){if(this.content.length!=t.content.length)return!1 -for(var e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1 -return!0},s.firstChild.get=function(){return this.content.length?this.content[0]:null},s.lastChild.get=function(){return this.content.length?this.content[this.content.length-1]:null},s.childCount.get=function(){return this.content.length},i.prototype.child=function(t){var e=this.content[t] -if(!e)throw new RangeError("Index "+t+" out of range for "+this) -return e},i.prototype.maybeChild=function(t){return this.content[t]},i.prototype.forEach=function(t){for(var e=0,n=0;e<this.content.length;e++){var r=this.content[e] -t(r,n,e),n+=r.nodeSize}},i.prototype.findDiffStart=function(t,e){return void 0===e&&(e=0),function t(e,n,r){for(var i=0;;i++){if(i==e.childCount||i==n.childCount)return e.childCount==n.childCount?null:r -var s=e.child(i),o=n.child(i) -if(s!=o){if(!s.sameMarkup(o))return r -if(s.isText&&s.text!=o.text){for(var a=0;s.text[a]==o.text[a];a++)r++ -return r}if(s.content.size||o.content.size){var l=t(s.content,o.content,r+1) -if(null!=l)return l}r+=s.nodeSize}else r+=s.nodeSize}}(this,t,e)},i.prototype.findDiffEnd=function(t,e,n){return void 0===e&&(e=this.size),void 0===n&&(n=t.size),function t(e,n,r,i){for(var s=e.childCount,o=n.childCount;;){if(0==s||0==o)return s==o?null:{a:r,b:i} -var a=e.child(--s),l=n.child(--o),c=a.nodeSize -if(a!=l){if(!a.sameMarkup(l))return{a:r,b:i} -if(a.isText&&a.text!=l.text){for(var h=0,p=Math.min(a.text.length,l.text.length);h<p&&a.text[a.text.length-h-1]==l.text[l.text.length-h-1];)h++,r--,i-- -return{a:r,b:i}}if(a.content.size||l.content.size){var u=t(a.content,l.content,r-1,i-1) -if(u)return u}r-=c,i-=c}else r-=c,i-=c}}(this,t,e,n)},i.prototype.findIndex=function(t,e){if(void 0===e&&(e=-1),0==t)return a(0,t) -if(t==this.size)return a(this.content.length,t) -if(t>this.size||t<0)throw new RangeError("Position "+t+" outside of fragment ("+this+")") -for(var n=0,r=0;;n++){var i=r+this.child(n).nodeSize -if(i>=t)return i==t||e>0?a(n+1,i):a(n,r) -r=i}},i.prototype.toString=function(){return"<"+this.toStringInner()+">"},i.prototype.toStringInner=function(){return this.content.join(", ")},i.prototype.toJSON=function(){return this.content.length?this.content.map(function(t){return t.toJSON()}):null},i.fromJSON=function(t,e){if(!e)return i.empty -if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON") -return new i(e.map(t.nodeFromJSON))},i.fromArray=function(t){if(!t.length)return i.empty -for(var e,n=0,r=0;r<t.length;r++){var s=t[r] -n+=s.nodeSize,r&&s.isText&&t[r-1].sameMarkup(s)?(e||(e=t.slice(0,r)),e[e.length-1]=s.withText(e[e.length-1].text+s.text)):e&&e.push(s)}return new i(e||t,n)},i.from=function(t){return t?t instanceof i?t:Array.isArray(t)?this.fromArray(t):new i([t],t.nodeSize):i.empty},Object.defineProperties(i.prototype,s) -var o={index:0,offset:0} -function a(t,e){return o.index=t,o.offset=e,o}function l(t,e){if(t===e)return!0 -if(!t||"object"!=typeof t||!e||"object"!=typeof e)return!1 -var n=Array.isArray(t) -if(Array.isArray(e)!=n)return!1 -if(n){if(t.length!=e.length)return!1 -for(var r=0;r<t.length;r++)if(!l(t[r],e[r]))return!1}else{for(var i in t)if(!(i in e&&l(t[i],e[i])))return!1 -for(var s in e)if(!(s in t))return!1}return!0}i.empty=new i([],0) -var c=function(t,e){this.type=t,this.attrs=e} -function h(t){var e=Error.call(this,t) -return e.__proto__=h.prototype,e}c.prototype.addToSet=function(t){for(var e,n=!1,r=0;r<t.length;r++){var i=t[r] -if(this.eq(i))return t -if(this.type.excludes(i.type))e||(e=t.slice(0,r)) -else{if(i.type.excludes(this.type))return t -!n&&i.type.rank>this.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(i)}}return e||(e=t.slice()),n||e.push(this),e},c.prototype.removeFromSet=function(t){for(var e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1)) -return t},c.prototype.isInSet=function(t){for(var e=0;e<t.length;e++)if(this.eq(t[e]))return!0 -return!1},c.prototype.eq=function(t){return this==t||this.type==t.type&&l(this.attrs,t.attrs)},c.prototype.toJSON=function(){var t={type:this.type.name} -for(var e in this.attrs){t.attrs=this.attrs -break}return t},c.fromJSON=function(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON") -var n=t.marks[e.type] -if(!n)throw new RangeError("There is no mark type "+e.type+" in this schema") -return n.create(e.attrs)},c.sameSet=function(t,e){if(t==e)return!0 -if(t.length!=e.length)return!1 -for(var n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1 -return!0},c.setFrom=function(t){if(!t||0==t.length)return c.none -if(t instanceof c)return[t] -var e=t.slice() -return e.sort(function(t,e){return t.type.rank-e.type.rank}),e},c.none=[],h.prototype=Object.create(Error.prototype),h.prototype.constructor=h,h.prototype.name="ReplaceError" -var p=function(t,e,n){this.content=t,this.openStart=e,this.openEnd=n},u={size:{}} -function d(t,e,n){if(n.openStart>t.depth)throw new h("Inserted content deeper than insertion position") -if(t.depth-n.openStart!=e.depth-n.openEnd)throw new h("Inconsistent open depths") -return function t(e,n,r,s){var o=e.index(s),a=e.node(s) -if(o==n.index(s)&&s<e.depth-r.openStart){var l=t(e,n,r,s+1) -return a.copy(a.content.replaceChild(o,l))}if(r.content.size){if(r.openStart||r.openEnd||e.depth!=s||n.depth!=s){var c=function(t,e){for(var n=e.depth-t.openStart,r=e.node(n).copy(t.content),s=n-1;s>=0;s--)r=e.node(s).copy(i.from(r)) -return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(r,e),h=c.start,p=c.end -return y(a,function t(e,n,r,s,o){var a=e.depth>o&&m(e,n,o+1) -var l=s.depth>o&&m(r,s,o+1) -var c=[] -v(null,e,o,c) -a&&l&&n.index(o)==r.index(o)?(f(a,l),g(y(a,t(e,n,r,s,o+1)),c)):(a&&g(y(a,b(e,n,o+1)),c),v(n,r,o,c),l&&g(y(l,b(r,s,o+1)),c)) -v(s,null,o,c) -return new i(c)}(e,h,p,n,s))}var u=e.parent,d=u.content -return y(u,d.cut(0,e.parentOffset).append(r.content).append(d.cut(n.parentOffset)))}return y(a,b(e,n,s))}(t,e,n,0)}function f(t,e){if(!e.type.compatibleContent(t.type))throw new h("Cannot join "+e.type.name+" onto "+t.type.name)}function m(t,e,n){var r=t.node(n) -return f(r,e.node(n)),r}function g(t,e){var n=e.length-1 -n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function v(t,e,n,r){var i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount -t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&(g(t.nodeAfter,r),s++)) -for(var a=s;a<o;a++)g(i.child(a),r) -e&&e.depth==n&&e.textOffset&&g(e.nodeBefore,r)}function y(t,e){if(!t.type.validContent(e))throw new h("Invalid content for node "+t.type.name) -return t.copy(e)}function b(t,e,n){var r=[];(v(null,t,n,r),t.depth>n)&&g(y(m(t,e,n+1),b(t,e,n+1)),r) -return v(e,null,n,r),new i(r)}u.size.get=function(){return this.content.size-this.openStart-this.openEnd},p.prototype.insertAt=function(t,e){var n=function t(e,n,r,i){var s=e.findIndex(n) -var o=s.index -var a=s.offset -var l=e.maybeChild(o) -if(a==n||l.isText)return i&&!i.canReplace(o,o,r)?null:e.cut(0,n).append(r).append(e.cut(n)) -var c=t(l.content,n-a-1,r) -return c&&e.replaceChild(o,l.copy(c))}(this.content,t+this.openStart,e,null) -return n&&new p(n,this.openStart,this.openEnd)},p.prototype.removeBetween=function(t,e){return new p(function t(e,n,r){var i=e.findIndex(n) -var s=i.index -var o=i.offset -var a=e.maybeChild(s) -var l=e.findIndex(r) -var c=l.index -var h=l.offset -if(o==n||a.isText){if(h!=r&&!e.child(c).isText)throw new RangeError("Removing non-flat range") -return e.cut(0,n).append(e.cut(r))}if(s!=c)throw new RangeError("Removing non-flat range") -return e.replaceChild(s,a.copy(t(a.content,n-o-1,r-o-1)))}(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)},p.prototype.eq=function(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd},p.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},p.prototype.toJSON=function(){if(!this.content.size)return null -var t={content:this.content.toJSON()} -return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t},p.fromJSON=function(t,e){if(!e)return p.empty -var n=e.openStart||0,r=e.openEnd||0 -if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON") -return new p(i.fromJSON(t,e.content),e.openStart||0,e.openEnd||0)},p.maxOpen=function(t,e){void 0===e&&(e=!0) -for(var n=0,r=0,i=t.firstChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.firstChild)n++ -for(var s=t.lastChild;s&&!s.isLeaf&&(e||!s.type.spec.isolating);s=s.lastChild)r++ -return new p(t,n,r)},Object.defineProperties(p.prototype,u),p.empty=new p(i.empty,0,0) -var k=function(t,e,n){this.pos=t,this.path=e,this.depth=e.length/3-1,this.parentOffset=n},w={parent:{},doc:{},textOffset:{},nodeAfter:{},nodeBefore:{}} -k.prototype.resolveDepth=function(t){return null==t?this.depth:t<0?this.depth+t:t},w.parent.get=function(){return this.node(this.depth)},w.doc.get=function(){return this.node(0)},k.prototype.node=function(t){return this.path[3*this.resolveDepth(t)]},k.prototype.index=function(t){return this.path[3*this.resolveDepth(t)+1]},k.prototype.indexAfter=function(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)},k.prototype.start=function(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1},k.prototype.end=function(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size},k.prototype.before=function(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node") -return t==this.depth+1?this.pos:this.path[3*t-1]},k.prototype.after=function(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node") -return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize},w.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},w.nodeAfter.get=function(){var t=this.parent,e=this.index(this.depth) -if(e==t.childCount)return null -var n=this.pos-this.path[this.path.length-1],r=t.child(e) -return n?t.child(e).cut(n):r},w.nodeBefore.get=function(){var t=this.index(this.depth),e=this.pos-this.path[this.path.length-1] -return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)},k.prototype.marks=function(){var t=this.parent,e=this.index() -if(0==t.content.size)return c.none -if(this.textOffset)return t.child(e).marks -var n=t.maybeChild(e-1),r=t.maybeChild(e) -if(!n){var i=n -n=r,r=i}for(var s=n.marks,o=0;o<s.length;o++)!1!==s[o].type.spec.inclusive||r&&s[o].isInSet(r.marks)||(s=s[o--].removeFromSet(s)) -return s},k.prototype.marksAcross=function(t){var e=this.parent.maybeChild(this.index()) -if(!e||!e.isInline)return null -for(var n=e.marks,r=t.parent.maybeChild(t.index()),i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n)) -return n},k.prototype.sharedDepth=function(t){for(var e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e -return 0},k.prototype.blockRange=function(t,e){if(void 0===t&&(t=this),t.pos<this.pos)return t.blockRange(this) -for(var n=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new M(this,t,n)},k.prototype.sameParent=function(t){return this.pos-this.parentOffset==t.pos-t.parentOffset},k.prototype.max=function(t){return t.pos>this.pos?t:this},k.prototype.min=function(t){return t.pos<this.pos?t:this},k.prototype.toString=function(){for(var t="",e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1) -return t+":"+this.parentOffset},k.resolve=function(t,e){if(!(e>=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range") -for(var n=[],r=0,i=e,s=t;;){var o=s.content.findIndex(i),a=o.index,l=o.offset,c=i-l -if(n.push(s,a,r+l),!c)break -if((s=s.child(a)).isText)break -i=c-1,r+=l+1}return new k(e,n,i)},k.resolveCached=function(t,e){for(var n=0;n<x.length;n++){var r=x[n] -if(r.pos==e&&r.doc==t)return r}var i=x[S]=k.resolve(t,e) -return S=(S+1)%C,i},Object.defineProperties(k.prototype,w) -var x=[],S=0,C=12,M=function(t,e,n){this.$from=t,this.$to=e,this.depth=n},O={start:{},end:{},parent:{},startIndex:{},endIndex:{}} -O.start.get=function(){return this.$from.before(this.depth+1)},O.end.get=function(){return this.$to.after(this.depth+1)},O.parent.get=function(){return this.$from.node(this.depth)},O.startIndex.get=function(){return this.$from.index(this.depth)},O.endIndex.get=function(){return this.$to.indexAfter(this.depth)},Object.defineProperties(M.prototype,O) -var E=Object.create(null),T=function(t,e,n,r){this.type=t,this.attrs=e,this.content=n||i.empty,this.marks=r||c.none},A={nodeSize:{},childCount:{},textContent:{},firstChild:{},lastChild:{},isBlock:{},isTextblock:{},inlineContent:{},isInline:{},isText:{},isLeaf:{},isAtom:{}} -A.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},A.childCount.get=function(){return this.content.childCount},T.prototype.child=function(t){return this.content.child(t)},T.prototype.maybeChild=function(t){return this.content.maybeChild(t)},T.prototype.forEach=function(t){this.content.forEach(t)},T.prototype.nodesBetween=function(t,e,n,r){void 0===r&&(r=0),this.content.nodesBetween(t,e,n,r,this)},T.prototype.descendants=function(t){this.nodesBetween(0,this.content.size,t)},A.textContent.get=function(){return this.textBetween(0,this.content.size,"")},T.prototype.textBetween=function(t,e,n,r){return this.content.textBetween(t,e,n,r)},A.firstChild.get=function(){return this.content.firstChild},A.lastChild.get=function(){return this.content.lastChild},T.prototype.eq=function(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)},T.prototype.sameMarkup=function(t){return this.hasMarkup(t.type,t.attrs,t.marks)},T.prototype.hasMarkup=function(t,e,n){return this.type==t&&l(this.attrs,e||t.defaultAttrs||E)&&c.sameSet(this.marks,n||c.none)},T.prototype.copy=function(t){return void 0===t&&(t=null),t==this.content?this:new this.constructor(this.type,this.attrs,t,this.marks)},T.prototype.mark=function(t){return t==this.marks?this:new this.constructor(this.type,this.attrs,this.content,t)},T.prototype.cut=function(t,e){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))},T.prototype.slice=function(t,e,n){if(void 0===e&&(e=this.content.size),void 0===n&&(n=!1),t==e)return p.empty -var r=this.resolve(t),i=this.resolve(e),s=n?0:r.sharedDepth(e),o=r.start(s),a=r.node(s).content.cut(r.pos-o,i.pos-o) -return new p(a,r.depth-s,i.depth-s)},T.prototype.replace=function(t,e,n){return d(this.resolve(t),this.resolve(e),n)},T.prototype.nodeAt=function(t){for(var e=this;;){var n=e.content.findIndex(t),r=n.index,i=n.offset -if(!(e=e.maybeChild(r)))return null -if(i==t||e.isText)return e -t-=i+1}},T.prototype.childAfter=function(t){var e=this.content.findIndex(t),n=e.index,r=e.offset -return{node:this.content.maybeChild(n),index:n,offset:r}},T.prototype.childBefore=function(t){if(0==t)return{node:null,index:0,offset:0} -var e=this.content.findIndex(t),n=e.index,r=e.offset -if(r<t)return{node:this.content.child(n),index:n,offset:r} -var i=this.content.child(n-1) -return{node:i,index:n-1,offset:r-i.nodeSize}},T.prototype.resolve=function(t){return k.resolveCached(this,t)},T.prototype.resolveNoCache=function(t){return k.resolve(this,t)},T.prototype.rangeHasMark=function(t,e,n){var r=!1 -return e>t&&this.nodesBetween(t,e,function(t){return n.isInSet(t.marks)&&(r=!0),!r}),r},A.isBlock.get=function(){return this.type.isBlock},A.isTextblock.get=function(){return this.type.isTextblock},A.inlineContent.get=function(){return this.type.inlineContent},A.isInline.get=function(){return this.type.isInline},A.isText.get=function(){return this.type.isText} -A.isLeaf.get=function(){return this.type.isLeaf},A.isAtom.get=function(){return this.type.isAtom},T.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this) -var t=this.type.name -return this.content.size&&(t+="("+this.content.toStringInner()+")"),D(this.marks,t)},T.prototype.contentMatchAt=function(t){var e=this.type.contentMatch.matchFragment(this.content,0,t) -if(!e)throw new Error("Called contentMatchAt on a node with invalid content") -return e},T.prototype.canReplace=function(t,e,n,r,s){void 0===n&&(n=i.empty),void 0===r&&(r=0),void 0===s&&(s=n.childCount) -var o=this.contentMatchAt(t).matchFragment(n,r,s),a=o&&o.matchFragment(this.content,e) -if(!a||!a.validEnd)return!1 -for(var l=r;l<s;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1 -return!0},T.prototype.canReplaceWith=function(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1 -var i=this.contentMatchAt(t).matchType(n),s=i&&i.matchFragment(this.content,e) -return!!s&&s.validEnd},T.prototype.canAppend=function(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)},T.prototype.defaultContentType=function(t){return this.contentMatchAt(t).defaultType},T.prototype.check=function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node "+this.type.name+": "+this.content.toString().slice(0,50)) -this.content.forEach(function(t){return t.check()})},T.prototype.toJSON=function(){var t={type:this.type.name} -for(var e in this.attrs){t.attrs=this.attrs -break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(function(t){return t.toJSON()})),t},T.fromJSON=function(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON") -var n=null -if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON") -n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON") -return t.text(e.text,n)}var r=i.fromJSON(t,e.content) -return t.nodeType(e.type).create(e.attrs,r,n)},Object.defineProperties(T.prototype,A) -var N=function(t){function e(e,n,r,i){if(t.call(this,e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed") -this.text=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e -var n={textContent:{},nodeSize:{}} -return e.prototype.toString=function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):D(this.marks,JSON.stringify(this.text))},n.textContent.get=function(){return this.text},e.prototype.textBetween=function(t,e){return this.text.slice(t,e)},n.nodeSize.get=function(){return this.text.length},e.prototype.mark=function(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)},e.prototype.withText=function(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)},e.prototype.cut=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.text.length),0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))},e.prototype.eq=function(t){return this.sameMarkup(t)&&this.text==t.text},e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this) -return e.text=this.text,e},Object.defineProperties(e.prototype,n),e}(T) -function D(t,e){for(var n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")" -return e}var _=function(t){this.validEnd=t,this.next=[],this.wrapCache=[]},R={inlineContent:{},defaultType:{},edgeCount:{}} -_.parse=function(t,e){var n=new I(t,e) -if(null==n.next)return _.empty -var r=z(n) -n.next&&n.err("Unexpected trailing text") -var i=function(t){var e=Object.create(null) -return function n(r){var i=[] -r.forEach(function(e){t[e].forEach(function(e){var n=e.term,r=e.to -if(n){var s=i.indexOf(n),o=s>-1&&i[s+1] -$(t,r).forEach(function(t){o||i.push(n,o=[]),-1==o.indexOf(t)&&o.push(t)})}})}) -var s=e[r.join(",")]=new _(r.indexOf(t.length-1)>-1) -for(var o=0;o<i.length;o+=2){var a=i[o+1].sort(j) -s.next.push(i[o],e[a.join(",")]||n(a))}return s}($(t,0))}(function(t){var e=[[]] -return i(function t(e,s){if("choice"==e.type)return e.exprs.reduce(function(e,n){return e.concat(t(n,s))},[]) -if("seq"==e.type)for(var o=0;;o++){var a=t(e.exprs[o],s) -if(o==e.exprs.length-1)return a -i(a,s=n())}else{if("star"==e.type){var l=n() -return r(s,l),i(t(e.expr,l),l),[r(l)]}if("plus"==e.type){var c=n() -return i(t(e.expr,s),c),i(t(e.expr,c),c),[r(c)]}if("opt"==e.type)return[r(s)].concat(t(e.expr,s)) -if("range"==e.type){for(var h=s,p=0;p<e.min;p++){var u=n() -i(t(e.expr,h),u),h=u}if(-1==e.max)i(t(e.expr,h),h) -else for(var d=e.min;d<e.max;d++){var f=n() -r(h,f),i(t(e.expr,h),f),h=f}return[r(h)]}if("name"==e.type)return[r(s,null,e.value)]}}(t,0),n()),e -function n(){return e.push([])-1}function r(t,n,r){var i={term:r,to:n} -return e[t].push(i),i}function i(t,e){t.forEach(function(t){return t.to=e})}}(r)) -return function(t,e){for(var n=0,r=[t];n<r.length;n++){for(var i=r[n],s=!i.validEnd,o=[],a=0;a<i.next.length;a+=2){var l=i.next[a],c=i.next[a+1] -o.push(l.name),!s||l.isText||l.hasRequiredAttrs()||(s=!1),-1==r.indexOf(c)&&r.push(c)}s&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position")}}(i,n),i},_.prototype.matchType=function(t){for(var e=0;e<this.next.length;e+=2)if(this.next[e]==t)return this.next[e+1] -return null},_.prototype.matchFragment=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=t.childCount) -for(var r=this,i=e;r&&i<n;i++)r=r.matchType(t.child(i).type) -return r},R.inlineContent.get=function(){var t=this.next[0] -return!!t&&t.isInline},R.defaultType.get=function(){for(var t=0;t<this.next.length;t+=2){var e=this.next[t] -if(!e.isText&&!e.hasRequiredAttrs())return e}},_.prototype.compatible=function(t){for(var e=0;e<this.next.length;e+=2)for(var n=0;n<t.next.length;n+=2)if(this.next[e]==t.next[n])return!0 -return!1},_.prototype.fillBefore=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=0) -var r=[this] -return function s(o,a){var l=o.matchFragment(t,n) -if(l&&(!e||l.validEnd))return i.from(a.map(function(t){return t.createAndFill()})) -for(var c=0;c<o.next.length;c+=2){var h=o.next[c],p=o.next[c+1] -if(!h.isText&&!h.hasRequiredAttrs()&&-1==r.indexOf(p)){r.push(p) -var u=s(p,a.concat(h)) -if(u)return u}}}(this,[])},_.prototype.findWrapping=function(t){for(var e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==t)return this.wrapCache[e+1] -var n=this.computeWrapping(t) -return this.wrapCache.push(t,n),n},_.prototype.computeWrapping=function(t){for(var e=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),i=r.match -if(i.matchType(t)){for(var s=[],o=r;o.type;o=o.via)s.push(o.type) -return s.reverse()}for(var a=0;a<i.next.length;a+=2){var l=i.next[a] -l.isLeaf||l.hasRequiredAttrs()||l.name in e||r.type&&!i.next[a+1].validEnd||(n.push({match:l.contentMatch,type:l,via:r}),e[l.name]=!0)}}},R.edgeCount.get=function(){return this.next.length>>1},_.prototype.edge=function(t){var e=t<<1 -if(e>this.next.length)throw new RangeError("There's no "+t+"th edge in this content match") -return{type:this.next[e],next:this.next[e+1]}},_.prototype.toString=function(){var t=[] -return function e(n){t.push(n) -for(var r=1;r<n.next.length;r+=2)-1==t.indexOf(n.next[r])&&e(n.next[r])}(this),t.map(function(e,n){for(var r=n+(e.validEnd?"*":" ")+" ",i=0;i<e.next.length;i+=2)r+=(i?", ":"")+e.next[i].name+"->"+t.indexOf(e.next[i+1]) -return r}).join("\n")},Object.defineProperties(_.prototype,R),_.empty=new _(!0) -var I=function(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.unshift()},B={next:{}} -function z(t){var e=[] -do{e.push(P(t))}while(t.eat("|")) -return 1==e.length?e[0]:{type:"choice",exprs:e}}function P(t){var e=[] -do{e.push(F(t))}while(t.next&&")"!=t.next&&"|"!=t.next) -return 1==e.length?e[0]:{type:"seq",exprs:e}}function F(t){for(var e=function(t){if(t.eat("(")){var e=z(t) -return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){var n=function(t,e){var n=t.nodeTypes,r=n[e] -if(r)return[r] -var i=[] -for(var s in n){var o=n[s] -o.groups.indexOf(e)>-1&&i.push(o)}0==i.length&&t.err("No node type or group '"+e+"' found") -return i}(t,t.next).map(function(e){return null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}}) -return t.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}t.err("Unexpected token '"+t.next+"'")}(t);;)if(t.eat("+"))e={type:"plus",expr:e} -else if(t.eat("*"))e={type:"star",expr:e} -else if(t.eat("?"))e={type:"opt",expr:e} -else{if(!t.eat("{"))break -e=L(t,e)}return e}function V(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'") -var e=Number(t.next) -return t.pos++,e}function L(t,e){var n=V(t),r=n -return t.eat(",")&&(r="}"!=t.next?V(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function j(t,e){return t-e}function $(t,e){var n=[] -return function e(r){var i=t[r] -if(1==i.length&&!i[0].term)return e(i[0].to) -n.push(r) -for(var s=0;s<i.length;s++){var o=i[s],a=o.term,l=o.to -a||-1!=n.indexOf(l)||e(l)}}(e),n.sort(j)}function H(t){var e=Object.create(null) -for(var n in t){var r=t[n] -if(!r.hasDefault)return null -e[n]=r.default}return e}function U(t,e){var n=Object.create(null) -for(var r in t){var i=e&&e[r] -if(void 0===i){var s=t[r] -if(!s.hasDefault)throw new RangeError("No value supplied for attribute "+r) -i=s.default}n[r]=i}return n}function q(t){var e=Object.create(null) -if(t)for(var n in t)e[n]=new K(t[n]) -return e}B.next.get=function(){return this.tokens[this.pos]},I.prototype.eat=function(t){return this.next==t&&(this.pos++||!0)},I.prototype.err=function(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")},Object.defineProperties(I.prototype,B) -var J=function(t,e,n){this.name=t,this.schema=e,this.spec=n,this.groups=n.group?n.group.split(" "):[],this.attrs=q(n.attrs),this.defaultAttrs=H(this.attrs),this.contentMatch=null,this.markSet=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==t),this.isText="text"==t},W={isInline:{},isTextblock:{},isLeaf:{},isAtom:{}} -W.isInline.get=function(){return!this.isBlock},W.isTextblock.get=function(){return this.isBlock&&this.inlineContent},W.isLeaf.get=function(){return this.contentMatch==_.empty},W.isAtom.get=function(){return this.isLeaf||this.spec.atom},J.prototype.hasRequiredAttrs=function(t){for(var e in this.attrs)if(this.attrs[e].isRequired&&(!t||!(e in t)))return!0 -return!1},J.prototype.compatibleContent=function(t){return this==t||this.contentMatch.compatible(t.contentMatch)},J.prototype.computeAttrs=function(t){return!t&&this.defaultAttrs?this.defaultAttrs:U(this.attrs,t)},J.prototype.create=function(t,e,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes") -return new T(this,this.computeAttrs(t),i.from(e),c.setFrom(n))},J.prototype.createChecked=function(t,e,n){if(e=i.from(e),!this.validContent(e))throw new RangeError("Invalid content for node "+this.name) -return new T(this,this.computeAttrs(t),e,c.setFrom(n))},J.prototype.createAndFill=function(t,e,n){if(t=this.computeAttrs(t),(e=i.from(e)).size){var r=this.contentMatch.fillBefore(e) -if(!r)return null -e=r.append(e)}var s=this.contentMatch.matchFragment(e).fillBefore(i.empty,!0) -return s?new T(this,t,e.append(s),c.setFrom(n)):null},J.prototype.validContent=function(t){var e=this.contentMatch.matchFragment(t) -if(!e||!e.validEnd)return!1 -for(var n=0;n<t.childCount;n++)if(!this.allowsMarks(t.child(n).marks))return!1 -return!0},J.prototype.allowsMarkType=function(t){return null==this.markSet||this.markSet.indexOf(t)>-1},J.prototype.allowsMarks=function(t){if(null==this.markSet)return!0 -for(var e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1 -return!0},J.prototype.allowedMarks=function(t){var e -if(null==this.markSet)return t -for(var n=0;n<t.length;n++)this.allowsMarkType(t[n].type)?e&&e.push(t[n]):e||(e=t.slice(0,n)) -return e?e.length?e:c.empty:t},J.compile=function(t,e){var n=Object.create(null) -t.forEach(function(t,r){return n[t]=new J(t,e,r)}) -var r=e.spec.topNode||"doc" -if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')") -if(!n.text)throw new RangeError("Every schema needs a 'text' type") -for(var i in n.text.attrs)throw new RangeError("The text node type should not have attributes") -return n},Object.defineProperties(J.prototype,W) -var K=function(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default},G={isRequired:{}} -G.isRequired.get=function(){return!this.hasDefault},Object.defineProperties(K.prototype,G) -var Y=function(t,e,n,r){this.name=t,this.schema=n,this.spec=r,this.attrs=q(r.attrs),this.rank=e,this.excluded=null -var i=H(this.attrs) -this.instance=i&&new c(this,i)} -Y.prototype.create=function(t){return!t&&this.instance?this.instance:new c(this,U(this.attrs,t))},Y.compile=function(t,e){var n=Object.create(null),r=0 -return t.forEach(function(t,i){return n[t]=new Y(t,r++,e,i)}),n},Y.prototype.removeFromSet=function(t){for(var e=0;e<t.length;e++)if(t[e].type==this)return t.slice(0,e).concat(t.slice(e+1)) -return t},Y.prototype.isInSet=function(t){for(var e=0;e<t.length;e++)if(t[e].type==this)return t[e]},Y.prototype.excludes=function(t){return this.excluded.indexOf(t)>-1} -var X=function(t){for(var e in this.spec={},t)this.spec[e]=t[e] -this.spec.nodes=r.from(t.nodes),this.spec.marks=r.from(t.marks),this.nodes=J.compile(this.spec.nodes,this),this.marks=Y.compile(this.spec.marks,this) -var n=Object.create(null) -for(var i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark") -var s=this.nodes[i],o=s.spec.content||"",a=s.spec.marks -s.contentMatch=n[o]||(n[o]=_.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.markSet="_"==a?null:a?Q(this,a.split(" ")):""!=a&&s.inlineContent?null:[]}for(var l in this.marks){var c=this.marks[l],h=c.spec.excludes -c.excluded=null==h?[c]:""==h?[]:Q(this,h.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)} -function Q(t,e){for(var n=[],r=0;r<e.length;r++){var i=e[r],s=t.marks[i],o=s -if(s)n.push(s) -else for(var a in t.marks){var l=t.marks[a];("_"==i||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}X.prototype.node=function(t,e,n,r){if("string"==typeof t)t=this.nodeType(t) -else{if(!(t instanceof J))throw new RangeError("Invalid node type: "+t) -if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)},X.prototype.text=function(t,e){var n=this.nodes.text -return new N(n,n.defaultAttrs,t,c.setFrom(e))},X.prototype.mark=function(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)},X.prototype.nodeFromJSON=function(t){return T.fromJSON(this,t)},X.prototype.markFromJSON=function(t){return c.fromJSON(this,t)},X.prototype.nodeType=function(t){var e=this.nodes[t] -if(!e)throw new RangeError("Unknown node type: "+t) -return e} -var Z=function(t,e){var n=this -this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach(function(t){t.tag?n.tags.push(t):t.style&&n.styles.push(t)})} -Z.prototype.parse=function(t,e){void 0===e&&(e={}) -var n=new at(this,e,!1) -return n.addAll(t,null,e.from,e.to),n.finish()},Z.prototype.parseSlice=function(t,e){void 0===e&&(e={}) -var n=new at(this,e,!0) -return n.addAll(t,null,e.from,e.to),p.maxOpen(n.finish())},Z.prototype.matchTag=function(t,e){for(var n=0;n<this.tags.length;n++){var r=this.tags[n] -if(ct(t,r.tag)&&(void 0===r.namespace||t.namespaceURI==r.namespace)&&(!r.context||e.matchesContext(r.context))){if(r.getAttrs){var i=r.getAttrs(t) -if(!1===i)continue -r.attrs=i}return r}}},Z.prototype.matchStyle=function(t,e,n){for(var r=0;r<this.styles.length;r++){var i=this.styles[r] -if(!(0!=i.style.indexOf(t)||i.context&&!n.matchesContext(i.context)||i.style.length>t.length&&(61!=i.style.charCodeAt(t.length)||i.style.slice(t.length+1)!=e))){if(i.getAttrs){var s=i.getAttrs(e) -if(!1===s)continue -i.attrs=s}return i}}},Z.schemaRules=function(t){var e=[] -function n(t){for(var n=null==t.priority?50:t.priority,r=0;r<e.length;r++){var i=e[r] -if((null==i.priority?50:i.priority)<n)break}e.splice(r,0,t)}var r=function(e){var r=t.marks[e].spec.parseDOM -r&&r.forEach(function(t){n(t=ht(t)),t.mark=e})} -for(var i in t.marks)r(i) -var s -for(var o in t.nodes)s=void 0,(s=t.nodes[o].spec.parseDOM)&&s.forEach(function(t){n(t=ht(t)),t.node=o}) -return e},Z.fromSchema=function(t){return t.cached.domParser||(t.cached.domParser=new Z(t,Z.schemaRules(t)))} -var tt={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},et={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},nt={ol:!0,ul:!0},rt=1,it=2 -function st(t){return(t?rt:0)|("full"===t?it:0)}var ot=function(t,e,n,r,i,s){this.type=t,this.attrs=e,this.solid=r,this.match=i||(4&s?null:t.contentMatch),this.options=s,this.content=[],this.marks=n,this.activeMarks=c.none} -ot.prototype.findWrapping=function(t){if(!this.match){if(!this.type)return[] -var e=this.type.contentMatch.fillBefore(i.from(t)) -if(!e){var n,r=this.type.contentMatch -return(n=r.findWrapping(t.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)},ot.prototype.finish=function(t){if(!(this.options&rt)){var e,n=this.content[this.content.length-1] -n&&n.isText&&(e=/\s+$/.exec(n.text))&&(n.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length)))}var r=i.from(this.content) -return!t&&this.match&&(r=r.append(this.match.fillBefore(i.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r} -var at=function(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.pendingMarks=[] -var r,i=e.topNode,s=st(e.preserveWhitespace)|(n?4:0) -r=i?new ot(i.type,i.attrs,c.none,!0,e.topMatch||i.type.contentMatch,s):new ot(n?null:t.schema.topNodeType,null,c.none,!0,null,s),this.nodes=[r],this.open=0,this.find=e.findPositions,this.needsBlock=!1},lt={top:{},currentPos:{}} -function ct(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function ht(t){var e={} -for(var n in t)e[n]=t[n] -return e}lt.top.get=function(){return this.nodes[this.open]},at.prototype.addDOM=function(t){if(3==t.nodeType)this.addTextNode(t) -else if(1==t.nodeType){var e=t.getAttribute("style"),n=e?this.readStyles(function(t){var e,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[] -for(;e=n.exec(t);)r.push(e[1],e[2].trim()) -return r}(e)):null -if(null!=n)for(var r=0;r<n.length;r++)this.addPendingMark(n[r]) -if(this.addElement(t),null!=n)for(var i=0;i<n.length;i++)this.removePendingMark(n[i])}},at.prototype.addTextNode=function(t){var e=t.nodeValue,n=this.top -if((n.type?n.type.inlineContent:n.content.length&&n.content[0].isInline)||/\S/.test(e)){if(n.options&rt)n.options&it||(e=e.replace(/\r?\n|\r/g," ")) -else if(e=e.replace(/\s+/g," "),/^\s/.test(e)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],i=t.previousSibling;(!r||i&&"BR"==i.nodeName||r.isText&&/\s$/.test(r.text))&&(e=e.slice(1))}e&&this.insertNode(this.parser.schema.text(e)),this.findInText(t)}else this.findInside(t)},at.prototype.addElement=function(t){var e=t.nodeName.toLowerCase() -nt.hasOwnProperty(e)&&function(t){for(var e=t.firstChild,n=null;e;e=e.nextSibling){var r=1==e.nodeType?e.nodeName.toLowerCase():null -r&&nt.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):"li"==r?n=e:r&&(n=null)}}(t) -var n=this.options.ruleFromNode&&this.options.ruleFromNode(t)||this.parser.matchTag(t,this) -if(n?n.ignore:et.hasOwnProperty(e))this.findInside(t) -else if(!n||n.skip){n&&n.skip.nodeType&&(t=n.skip) -var r,i=this.top,s=this.needsBlock -tt.hasOwnProperty(e)&&(r=!0,i.type||(this.needsBlock=!0)),this.addAll(t),r&&this.sync(i),this.needsBlock=s}else this.addElementByRule(t,n)},at.prototype.readStyles=function(t){for(var e=c.none,n=0;n<t.length;n+=2){var r=this.parser.matchStyle(t[n],t[n+1],this) -if(r){if(r.ignore)return null -e=this.parser.schema.marks[r.mark].create(r.attrs).addToSet(e)}}return e},at.prototype.addElementByRule=function(t,e){var n,r,i,s=this -e.node?(r=this.parser.schema.nodes[e.node]).isLeaf?this.insertNode(r.create(e.attrs)):n=this.enter(r,e.attrs,e.preserveWhitespace):(i=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(i)) -var o=this.top -if(r&&r.isLeaf)this.findInside(t) -else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(function(t){return s.insertNode(t)}) -else{var a=e.contentElement -"string"==typeof a?a=t.querySelector(a):"function"==typeof a&&(a=a(t)),a||(a=t),this.findAround(t,a,!0),this.addAll(a,n)}return n&&(this.sync(o),this.open--),i&&this.removePendingMark(i),!0},at.prototype.addAll=function(t,e,n,r){for(var i=n||0,s=n?t.childNodes[n]:t.firstChild,o=null==r?null:t.childNodes[r];s!=o;s=s.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(s),e&&tt.hasOwnProperty(s.nodeName.toLowerCase())&&this.sync(e) -this.findAtPoint(t,i)},at.prototype.findPlace=function(t){for(var e,n,r=this.open;r>=0;r--){var i=this.nodes[r],s=i.findWrapping(t) -if(s&&(!e||e.length>s.length)&&(e=s,n=i,!s.length))break -if(i.solid)break}if(!e)return!1 -this.sync(n) -for(var o=0;o<e.length;o++)this.enterInner(e[o],null,!1) -return!0},at.prototype.insertNode=function(t){if(t.isInline&&this.needsBlock&&!this.top.type){var e=this.textblockFromContext() -e&&this.enterInner(e)}if(this.findPlace(t)){this.closeExtra() -var n=this.top -this.applyPendingMarks(n),n.match&&(n.match=n.match.matchType(t.type)) -for(var r=n.activeMarks,i=0;i<t.marks.length;i++)n.type&&!n.type.allowsMarkType(t.marks[i].type)||(r=t.marks[i].addToSet(r)) -n.content.push(t.mark(r))}},at.prototype.applyPendingMarks=function(t){for(var e=0;e<this.pendingMarks.length;e++){var n=this.pendingMarks[e] -t.type&&!t.type.allowsMarkType(n.type)||n.type.isInSet(t.activeMarks)||(t.activeMarks=n.addToSet(t.activeMarks),this.pendingMarks.splice(e--,1))}},at.prototype.enter=function(t,e,n){var r=this.findPlace(t.create(e)) -return r&&(this.applyPendingMarks(this.top),this.enterInner(t,e,!0,n)),r},at.prototype.enterInner=function(t,e,n,r){this.closeExtra() -var i=this.top -i.match=i.match&&i.match.matchType(t,e) -var s=null==r?-5&i.options:st(r) -4&i.options&&0==i.content.length&&(s|=4),this.nodes.push(new ot(t,e,i.activeMarks,n,null,s)),this.open++},at.prototype.closeExtra=function(t){var e=this.nodes.length-1 -if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t)) -this.nodes.length=this.open+1}},at.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},at.prototype.sync=function(t){for(var e=this.open;e>=0;e--)if(this.nodes[e]==t)return void(this.open=e)},at.prototype.addPendingMark=function(t){this.pendingMarks.push(t)},at.prototype.removePendingMark=function(t){var e=this.pendingMarks.lastIndexOf(t) -if(e>-1)this.pendingMarks.splice(e,1) -else{var n=this.top -n.activeMarks=t.removeFromSet(n.activeMarks)}},lt.currentPos.get=function(){this.closeExtra() -for(var t=0,e=this.open;e>=0;e--){for(var n=this.nodes[e].content,r=n.length-1;r>=0;r--)t+=n[r].nodeSize -e&&t++}return t},at.prototype.findAtPoint=function(t,e){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)},at.prototype.findInside=function(t){if(this.find)for(var e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)},at.prototype.findAround=function(t,e,n){if(t!=e&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==t.nodeType&&t.contains(this.find[r].node))e.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}},at.prototype.findInText=function(t){if(this.find)for(var e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))},at.prototype.matchesContext=function(t){var e=this -if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this) -var n=t.split("/"),r=this.options.context,i=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1) -return function t(o,a){for(;o>=0;o--){var l=n[o] -if(""==l){if(o==n.length-1||0==o)continue -for(;a>=s;a--)if(t(o-1,a))return!0 -return!1}var c=a>0||0==a&&i?e.nodes[a].type:r&&a>=s?r.node(a-s).type:null -if(!c||c.name!=l&&-1==c.groups.indexOf(l))return!1 -a--}return!0}(n.length-1,this.open)},at.prototype.textblockFromContext=function(){var t=this.options.context -if(t)for(var e=t.depth;e>=0;e--){var n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType -if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var i=this.parser.schema.nodes[r] -if(i.isTextblock&&i.defaultAttrs)return i}},Object.defineProperties(at.prototype,lt) -var pt=function(t,e){this.nodes=t||{},this.marks=e||{}} -function ut(t){var e={} -for(var n in t){var r=t[n].spec.toDOM -r&&(e[n]=r)}return e}function dt(t){return t.document||window.document}pt.prototype.serializeFragment=function(t,e,n){var r=this -void 0===e&&(e={}),n||(n=dt(e).createDocumentFragment()) -var i=n,s=null -return t.forEach(function(t){if(s||t.marks.length){s||(s=[]) -for(var n=0,o=0;n<s.length&&o<t.marks.length;){var a=t.marks[o] -if(r.marks[a.type.name]){if(!a.eq(s[n])||!1===a.type.spec.spanning)break -n+=2,o++}else o++}for(;n<s.length;)i=s.pop(),s.pop() -for(;o<t.marks.length;){var l=t.marks[o++],c=r.serializeMark(l,t.isInline,e) -c&&(s.push(l,i),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(r.serializeNode(t,e))}),n},pt.prototype.serializeNode=function(t,e){void 0===e&&(e={}) -var n=pt.renderSpec(dt(e),this.nodes[t.type.name](t)),r=n.dom,i=n.contentDOM -if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec") -e.onContent?e.onContent(t,i,e):this.serializeFragment(t.content,e,i)}return r},pt.prototype.serializeNodeAndMarks=function(t,e){void 0===e&&(e={}) -for(var n=this.serializeNode(t,e),r=t.marks.length-1;r>=0;r--){var i=this.serializeMark(t.marks[r],t.isInline,e) -i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n},pt.prototype.serializeMark=function(t,e,n){void 0===n&&(n={}) -var r=this.marks[t.type.name] -return r&&pt.renderSpec(dt(n),r(t,e))},pt.renderSpec=function(t,e){if("string"==typeof e)return{dom:t.createTextNode(e)} -if(null!=e.nodeType)return{dom:e} -var n=t.createElement(e[0]),r=null,i=e[1],s=1 -if(i&&"object"==typeof i&&null==i.nodeType&&!Array.isArray(i))for(var o in s=2,i)null!=i[o]&&n.setAttribute(o,i[o]) -for(var a=s;a<e.length;a++){var l=e[a] -if(0===l){if(a<e.length-1||a>s)throw new RangeError("Content hole must be the only child of its parent node") -return{dom:n,contentDOM:n}}var c=pt.renderSpec(t,l),h=c.dom,p=c.contentDOM -if(n.appendChild(h),p){if(r)throw new RangeError("Multiple content holes") -r=p}}return{dom:n,contentDOM:r}},pt.fromSchema=function(t){return t.cached.domSerializer||(t.cached.domSerializer=new pt(this.nodesFromSchema(t),this.marksFromSchema(t)))},pt.nodesFromSchema=function(t){var e=ut(t.nodes) -return e.text||(e.text=function(t){return t.text}),e},pt.marksFromSchema=function(t){return ut(t.marks)},e.Node=T,e.ResolvedPos=k,e.NodeRange=M,e.Fragment=i,e.Slice=p,e.ReplaceError=h,e.Mark=c,e.Schema=X,e.NodeType=J,e.MarkType=Y,e.ContentMatch=_,e.DOMParser=Z,e.DOMSerializer=pt}) -rs(ls) -ls.Node,ls.ResolvedPos,ls.NodeRange,ls.Fragment,ls.Slice,ls.ReplaceError,ls.Mark -var cs=ls.Schema,hs=(ls.NodeType,ls.MarkType,ls.ContentMatch,ls.DOMParser,ls.DOMSerializer,is(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}) -var n=65535,r=Math.pow(2,16) -function i(t){return t&n}var s=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=null),this.pos=t,this.deleted=e,this.recover=n},o=function(t,e){void 0===e&&(e=!1),this.ranges=t,this.inverted=e} -o.prototype.recover=function(t){var e=0,s=i(t) -if(!this.inverted)for(var o=0;o<s;o++)e+=this.ranges[3*o+2]-this.ranges[3*o+1] -return this.ranges[3*s]+e+function(t){return(t-(t&n))/r}(t)},o.prototype.mapResult=function(t,e){return void 0===e&&(e=1),this._map(t,e,!1)},o.prototype.map=function(t,e){return void 0===e&&(e=1),this._map(t,e,!0)},o.prototype._map=function(t,e,n){for(var i=0,o=this.inverted?2:1,a=this.inverted?1:2,l=0;l<this.ranges.length;l+=3){var c=this.ranges[l]-(this.inverted?i:0) -if(c>t)break -var h=this.ranges[l+o],p=this.ranges[l+a],u=c+h -if(t<=u){var d=c+i+((h?t==c?-1:t==u?1:e:e)<0?0:p) -if(n)return d -var f=l/3+(t-c)*r -return new s(d,e<0?t!=c:t!=u,f)}i+=p-h}return n?t+i:new s(t+i)},o.prototype.touches=function(t,e){for(var n=0,r=i(e),s=this.inverted?2:1,o=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var l=this.ranges[a]-(this.inverted?n:0) -if(l>t)break -var c=this.ranges[a+s] -if(t<=l+c&&a==3*r)return!0 -n+=this.ranges[a+o]-c}return!1},o.prototype.forEach=function(t){for(var e=this.inverted?2:1,n=this.inverted?1:2,r=0,i=0;r<this.ranges.length;r+=3){var s=this.ranges[r],o=s-(this.inverted?i:0),a=s+(this.inverted?0:i),l=this.ranges[r+e],c=this.ranges[r+n] -t(o,o+l,a,a+c),i+=c-l}},o.prototype.invert=function(){return new o(this.ranges,!this.inverted)},o.prototype.toString=function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)},o.offset=function(t){return 0==t?o.empty:new o(t<0?[0,-t,0]:[0,0,t])},o.empty=new o([]) -var a=function(t,e,n,r){this.maps=t||[],this.from=n||0,this.to=null==r?this.maps.length:r,this.mirror=e} -function l(t){var e=Error.call(this,t) -return e.__proto__=l.prototype,e}a.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.maps.length),new a(this.maps,this.mirror,t,e)},a.prototype.copy=function(){return new a(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)},a.prototype.appendMap=function(t,e){this.to=this.maps.push(t),null!=e&&this.setMirror(this.maps.length-1,e)},a.prototype.appendMapping=function(t){for(var e=0,n=this.maps.length;e<t.maps.length;e++){var r=t.getMirror(e) -this.appendMap(t.maps[e],null!=r&&r<e?n+r:null)}},a.prototype.getMirror=function(t){if(this.mirror)for(var e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]},a.prototype.setMirror=function(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)},a.prototype.appendMappingInverted=function(t){for(var e=t.maps.length-1,n=this.maps.length+t.maps.length;e>=0;e--){var r=t.getMirror(e) -this.appendMap(t.maps[e].invert(),null!=r&&r>e?n-r-1:null)}},a.prototype.invert=function(){var t=new a -return t.appendMappingInverted(this),t},a.prototype.map=function(t,e){if(void 0===e&&(e=1),this.mirror)return this._map(t,e,!0) -for(var n=this.from;n<this.to;n++)t=this.maps[n].map(t,e) -return t},a.prototype.mapResult=function(t,e){return void 0===e&&(e=1),this._map(t,e,!1)},a.prototype._map=function(t,e,n){for(var r=!1,i=null,o=this.from;o<this.to;o++){var a=this.maps[o],l=i&&i[o] -if(null!=l&&a.touches(t,l))t=a.recover(l) -else{var c=a.mapResult(t,e) -if(null!=c.recover){var h=this.getMirror(o) -if(null!=h&&h>o&&h<this.to){if(c.deleted){o=h,t=this.maps[h].recover(c.recover) -continue}(i||(i=Object.create(null)))[h]=c.recover}}c.deleted&&(r=!0),t=c.pos}}return n?t:new s(t,r)},l.prototype=Object.create(Error.prototype),l.prototype.constructor=l,l.prototype.name="TransformError" -var c=function(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new a},h={before:{},docChanged:{}} -function p(){throw new Error("Override me")}h.before.get=function(){return this.docs.length?this.docs[0]:this.doc},c.prototype.step=function(t){var e=this.maybeStep(t) -if(e.failed)throw new l(e.failed) -return this},c.prototype.maybeStep=function(t){var e=t.apply(this.doc) -return e.failed||this.addStep(t,e.doc),e},h.docChanged.get=function(){return this.steps.length>0},c.prototype.addStep=function(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e},Object.defineProperties(c.prototype,h) -var u=Object.create(null),d=function(){} -d.prototype.apply=function(t){return p()},d.prototype.getMap=function(){return o.empty},d.prototype.invert=function(t){return p()},d.prototype.map=function(t){return p()},d.prototype.merge=function(t){return null},d.prototype.toJSON=function(){return p()},d.fromJSON=function(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON") -var n=u[e.stepType] -if(!n)throw new RangeError("No step type "+e.stepType+" defined") -return n.fromJSON(t,e)},d.jsonID=function(t,e){if(t in u)throw new RangeError("Duplicate use of step JSON ID "+t) -return u[t]=e,e.prototype.jsonID=t,e} -var f=function(t,e){this.doc=t,this.failed=e} -f.ok=function(t){return new f(t,null)},f.fail=function(t){return new f(null,t)},f.fromReplace=function(t,e,n,r){try{return f.ok(t.replace(e,n,r))}catch(i){if(i instanceof ls.ReplaceError)return f.fail(i.message) -throw i}} -var m=function(t){function e(e,n,r,i){t.call(this),this.from=e,this.to=n,this.slice=r,this.structure=!!i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){return this.structure&&v(t,this.from,this.to)?f.fail("Structure replace would overwrite content"):f.fromReplace(t,this.from,this.to,this.slice)},e.prototype.getMap=function(){return new o([this.from,this.to-this.from,this.slice.size])},e.prototype.invert=function(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1) -return n.deleted&&r.deleted?null:new e(n.pos,Math.max(n.pos,r.pos),this.slice)},e.prototype.merge=function(t){if(!(t instanceof e)||t.structure!=this.structure)return null -if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null -var n=this.slice.size+t.slice.size==0?ls.Slice.empty:new ls.Slice(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd) -return new e(t.from,this.to,n,this.structure)}var r=this.slice.size+t.slice.size==0?ls.Slice.empty:new ls.Slice(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd) -return new e(this.from,this.to+(t.to-t.from),r,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replace",from:this.from,to:this.to} -return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON") -return new e(n.from,n.to,ls.Slice.fromJSON(t,n.slice),!!n.structure)},e}(d) -d.jsonID("replace",m) -var g=function(t){function e(e,n,r,i,s,o,a){t.call(this),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=s,this.insert=o,this.structure=!!a}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){if(this.structure&&(v(t,this.from,this.gapFrom)||v(t,this.gapTo,this.to)))return f.fail("Structure gap-replace would overwrite content") -var e=t.slice(this.gapFrom,this.gapTo) -if(e.openStart||e.openEnd)return f.fail("Gap is not a flat range") -var n=this.slice.insertAt(this.insert,e.content) -return n?f.fromReplace(t,this.from,this.to,n):f.fail("Content does not fit in gap")},e.prototype.getMap=function(){return new o([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},e.prototype.invert=function(t){var n=this.gapTo-this.gapFrom -return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=t.map(this.gapFrom,-1),s=t.map(this.gapTo,1) -return n.deleted&&r.deleted||i<n.pos||s>r.pos?null:new e(n.pos,r.pos,i,s,this.slice,this.insert,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert} -return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON") -return new e(n.from,n.to,n.gapFrom,n.gapTo,ls.Slice.fromJSON(t,n.slice),n.insert,!!n.structure)},e}(d) -function v(t,e,n){for(var r=t.resolve(e),i=n-e,s=r.depth;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i-- -if(i>0)for(var o=r.node(s).maybeChild(r.indexAfter(s));i>0;){if(!o||o.isLeaf)return!0 -o=o.firstChild,i--}return!1}function y(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function b(t){return{type:t,attrs:null}}function k(t,e){return t&&e&&!t.isLeaf&&t.canAppend(e)}function w(t,e,n){var r=t.resolve(e) -if(r.parent.canReplaceWith(r.index(),r.index(),n))return e -if(0==r.parentOffset)for(var i=r.depth-1;i>=0;i--){var s=r.index(i) -if(r.node(i).canReplaceWith(s,s,n))return r.before(i+1) -if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(var o=r.depth-1;o>=0;o--){var a=r.indexAfter(o) -if(r.node(o).canReplaceWith(a,a,n))return r.after(o+1) -if(a<r.node(o).childCount)return null}}function x(t,e,n){for(var r=[],i=0;i<t.childCount;i++){var s=t.child(i) -s.content.size&&(s=s.copy(x(s.content,e,s))),s.isInline&&(s=e(s,n,i)),r.push(s)}return ls.Fragment.fromArray(r)}d.jsonID("replaceAround",g),c.prototype.lift=function(t,e){for(var n=t.$from,r=t.$to,i=t.depth,s=n.before(i+1),o=r.after(i+1),a=s,l=o,c=ls.Fragment.empty,h=0,p=i,u=!1;p>e;p--)u||n.index(p)>0?(u=!0,c=ls.Fragment.from(n.node(p).copy(c)),h++):a-- -for(var d=ls.Fragment.empty,f=0,m=i,v=!1;m>e;m--)v||r.after(m+1)<r.end(m)?(v=!0,d=ls.Fragment.from(r.node(m).copy(d)),f++):l++ -return this.step(new g(a,l,s,o,new ls.Slice(c.append(d),h,f),c.size-h,!0))},c.prototype.wrap=function(t,e){for(var n=ls.Fragment.empty,r=e.length-1;r>=0;r--)n=ls.Fragment.from(e[r].type.create(e[r].attrs,n)) -var i=t.start,s=t.end -return this.step(new g(i,s,i,s,new ls.Slice(n,0,0),e.length,!0))},c.prototype.setBlockType=function(t,e,n,r){var i=this -if(void 0===e&&(e=t),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock") -var s=this.steps.length -return this.doc.nodesBetween(t,e,function(t,e){if(t.isTextblock&&!t.hasMarkup(n,r)&&function(t,e,n){var r=t.resolve(e),i=r.index() -return r.parent.canReplaceWith(i,i+1,n)}(i.doc,i.mapping.slice(s).map(e),n)){i.clearIncompatible(i.mapping.slice(s).map(e,1),n) -var o=i.mapping.slice(s),a=o.map(e,1),l=o.map(e+t.nodeSize,1) -return i.step(new g(a,l,a+1,l-1,new ls.Slice(ls.Fragment.from(n.create(r,null,t.marks)),0,0),1,!0)),!1}}),this},c.prototype.setNodeMarkup=function(t,e,n,r){var i=this.doc.nodeAt(t) -if(!i)throw new RangeError("No node at given position") -e||(e=i.type) -var s=e.create(n,null,r||i.marks) -if(i.isLeaf)return this.replaceWith(t,t+i.nodeSize,s) -if(!e.validContent(i.content))throw new RangeError("Invalid content for node type "+e.name) -return this.step(new g(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new ls.Slice(ls.Fragment.from(s),0,0),1,!0))},c.prototype.split=function(t,e,n){void 0===e&&(e=1) -for(var r=this.doc.resolve(t),i=ls.Fragment.empty,s=ls.Fragment.empty,o=r.depth,a=r.depth-e,l=e-1;o>a;o--,l--){i=ls.Fragment.from(r.node(o).copy(i)) -var c=n&&n[l] -s=ls.Fragment.from(c?c.type.create(c.attrs,s):r.node(o).copy(s))}return this.step(new m(t,t,new ls.Slice(i.append(s),e,e,!0)))},c.prototype.join=function(t,e){void 0===e&&(e=1) -var n=new m(t-e,t+e,ls.Slice.empty,!0) -return this.step(n)} -var S=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),s=new ls.Slice(x(n.content,function(t,n){return n.type.allowsMarkType(e.mark.type)?t.mark(e.mark.addToSet(t.marks)):t},i),n.openStart,n.openEnd) -return f.fromReplace(t,this.from,this.to,s)},e.prototype.invert=function(){return new C(this.from,this.to,this.mark)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1) -return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON") -return new e(n.from,n.to,t.markFromJSON(n.mark))},e}(d) -d.jsonID("addMark",S) -var C=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),r=new ls.Slice(x(n.content,function(t){return t.mark(e.mark.removeFromSet(t.marks))}),n.openStart,n.openEnd) -return f.fromReplace(t,this.from,this.to,r)},e.prototype.invert=function(){return new S(this.from,this.to,this.mark)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1) -return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON") -return new e(n.from,n.to,t.markFromJSON(n.mark))},e}(d) -function M(t,e,n,r){if(void 0===n&&(n=e),void 0===r&&(r=ls.Slice.empty),e==n&&!r.size)return null -var i=t.resolve(e),s=t.resolve(n) -if(T(i,s,r))return new m(e,n,r) -var o=function(t,e){var n=function t(e,n,r,i){var s=ls.Fragment.empty,o=0,a=r[n] -if(e.depth>n){var l=t(e,n+1,r,i||a) -o=l.openEnd+1,s=ls.Fragment.from(e.node(n+1).copy(l.content))}a&&(s=s.append(a.content),o=a.openEnd) -i&&(s=s.append(e.node(n).contentMatchAt(e.indexAfter(n)).fillBefore(ls.Fragment.empty,!0)),o=0) -return{content:s,openEnd:o}}(t,0,e,!1),r=n.content,i=n.openEnd -return new ls.Slice(r,t.depth,i||0)}(i,function(t,e){for(var n=new A(t),r=1;e.size&&r<=3;r++)e=n.placeSlice(e.content,e.openStart,e.openEnd,r) -for(;n.open.length;)n.closeNode() -return n.placed}(i,r)),a=E(i,s,o) -if(!a)return null -if(o.size!=a.size&&function(t,e,n){if(!e.parent.isTextblock)return!1 -var r,i=n.openEnd?function(t,e){for(var n=1;n<e;n++)t=t.lastChild.content -return t.lastChild}(n.content,n.openEnd):t.node(t.depth-(n.openStart-n.openEnd)) -if(!i.isTextblock)return!1 -for(var s=e.index();s<e.parent.childCount;s++)if(!i.type.allowsMarks(e.parent.child(s).marks))return!1 -n.openEnd?r=i.contentMatchAt(i.childCount):(r=i.contentMatchAt(i.childCount),n.size&&(r=r.matchFragment(n.content,n.openStart?1:0))) -return(r=r.matchFragment(e.parent.content,e.index()))&&r.validEnd}(i,s,o)){for(var l=s.depth,c=s.after(l);l>1&&c==s.end(--l);)++c -var h=E(i,t.resolve(c),o) -if(h)return new g(e,c,n,s.end(),h,o.size)}return a.size||e!=n?new m(e,n,a):null}function O(t,e,n,r,i,s,o){var a,l=t.childCount,c=l-(o>0?1:0),h=s<0?e:n.node(i) -a=s<0?h.contentMatchAt(c):1==l&&o>0?h.contentMatchAt(s?n.index(i):n.indexAfter(i)):h.contentMatchAt(n.indexAfter(i)).matchFragment(t,l>0&&s?1:0,c) -var p=r.node(i) -if(o>0&&i<r.depth){var u=p.content.cutByIndex(r.indexAfter(i)).addToStart(t.lastChild),d=a.fillBefore(u,!0) -if(d&&d.size&&s>0&&1==l&&(d=null),d){var f=O(t.lastChild.content,t.lastChild,n,r,i+1,1==l?s-1:-1,o-1) -if(f){var m=t.lastChild.copy(f) -return d.size?t.cutByIndex(0,l-1).append(d).addToEnd(m):t.replaceChild(l-1,m)}}}o>0&&(a=a.matchType((1==l&&s>0?n.node(i+1):t.lastChild).type)) -var g=r.index(i) -if(g==p.childCount&&!p.type.compatibleContent(e.type))return null -for(var v=a.fillBefore(p.content,!0,g),y=g;v&&y<p.content.childCount;y++)h.type.allowsMarks(p.content.child(y).marks)||(v=null) -if(!v)return null -if(o>0){var b=function t(e,n,r,i,s){var o,a=e.content,l=a.childCount -o=s>=0?r.node(i).contentMatchAt(r.indexAfter(i)).matchFragment(a,s>0?1:0,l):e.contentMatchAt(l) -if(n>0){var c=t(a.lastChild,n-1,r,i+1,1==l?s-1:-1) -a=a.replaceChild(l-1,c)}return e.copy(a.append(o.fillBefore(ls.Fragment.empty,!0)))}(t.lastChild,o-1,n,i+1,1==l?s-1:-1) -t=t.replaceChild(l-1,b)}return t=t.append(v),r.depth>i&&(t=t.addToEnd(function t(e,n){var r=e.node(n) -var i=r.contentMatchAt(0).fillBefore(r.content,!0,e.index(n)) -e.depth>n&&(i=i.addToEnd(t(e,n+1))) -return r.copy(i)}(r,i+1))),t}function E(t,e,n){var r=O(n.content,t.node(0),t,e,0,n.openStart,n.openEnd) -return r?function(t,e,n){for(;e>0&&n>0&&1==t.childCount;)t=t.firstChild.content,e--,n-- -return new ls.Slice(t,e,n)}(r,n.openStart,e.depth):null}function T(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}d.jsonID("removeMark",C),c.prototype.addMark=function(t,e,n){var r=this,i=[],s=[],o=null,a=null -return this.doc.nodesBetween(t,e,function(r,l,c){if(r.isInline){var h=r.marks -if(!n.isInSet(h)&&c.type.allowsMarkType(n.type)){for(var p=Math.max(l,t),u=Math.min(l+r.nodeSize,e),d=n.addToSet(h),f=0;f<h.length;f++)h[f].isInSet(d)||(o&&o.to==p&&o.mark.eq(h[f])?o.to=u:i.push(o=new C(p,u,h[f]))) -a&&a.to==p?a.to=u:s.push(a=new S(p,u,n))}}}),i.forEach(function(t){return r.step(t)}),s.forEach(function(t){return r.step(t)}),this},c.prototype.removeMark=function(t,e,n){var r=this -void 0===n&&(n=null) -var i=[],s=0 -return this.doc.nodesBetween(t,e,function(r,o){if(r.isInline){s++ -var a=null -if(n instanceof ls.MarkType){var l=n.isInSet(r.marks) -l&&(a=[l])}else n?n.isInSet(r.marks)&&(a=[n]):a=r.marks -if(a&&a.length)for(var c=Math.min(o+r.nodeSize,e),h=0;h<a.length;h++){for(var p=a[h],u=void 0,d=0;d<i.length;d++){var f=i[d] -f.step==s-1&&p.eq(i[d].style)&&(u=f)}u?(u.to=c,u.step=s):i.push({style:p,from:Math.max(o,t),to:c,step:s})}}}),i.forEach(function(t){return r.step(new C(t.from,t.to,t.style))}),this},c.prototype.clearIncompatible=function(t,e,n){void 0===n&&(n=e.contentMatch) -for(var r=this.doc.nodeAt(t),i=[],s=t+1,o=0;o<r.childCount;o++){var a=r.child(o),l=s+a.nodeSize,c=n.matchType(a.type,a.attrs) -if(c){n=c -for(var h=0;h<a.marks.length;h++)e.allowsMarkType(a.marks[h].type)||this.step(new C(s,l,a.marks[h]))}else i.push(new m(s,l,ls.Slice.empty)) -s=l}if(!n.validEnd){var p=n.fillBefore(ls.Fragment.empty,!0) -this.replace(s,s,new ls.Slice(p,0,0))}for(var u=i.length-1;u>=0;u--)this.step(i[u]) -return this},c.prototype.replace=function(t,e,n){void 0===e&&(e=t),void 0===n&&(n=ls.Slice.empty) -var r=M(this.doc,t,e,n) -return r&&this.step(r),this},c.prototype.replaceWith=function(t,e,n){return this.replace(t,e,new ls.Slice(ls.Fragment.from(n),0,0))},c.prototype.delete=function(t,e){return this.replace(t,e,ls.Slice.empty)},c.prototype.insert=function(t,e){return this.replaceWith(t,t,e)} -var A=function(t){this.open=[] -for(var e=0;e<=t.depth;e++){var n=t.node(e),r=n.contentMatchAt(t.indexAfter(e)) -this.open.push({parent:n,match:r,content:ls.Fragment.empty,wrapper:!1,openEnd:0,depth:e})}this.placed=[]} -function N(t,e,n){var r=t.content -if(e>1){var i=N(t.firstChild,e-1,1==t.childCount?n-1:0) -r=t.content.replaceChild(0,i)}var s=t.type.contentMatch.fillBefore(r,0==n) -return t.copy(s.append(r))}function D(t,e,n,r,i){if(e<n){var s=t.firstChild -t=t.replaceChild(0,s.copy(D(s.content,e+1,n,r,s)))}return e>r&&(t=i.contentMatchAt(0).fillBefore(t,!0).append(t)),t}function _(t,e){for(var n=[],r=Math.min(t.depth,e.depth);r>=0;r--){var i=t.start(r) -if(i<t.pos-(t.depth-r)||e.end(r)>e.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break -i==e.start(r)&&n.push(r)}return n}A.prototype.placeSlice=function(t,e,n,r,i){if(e>0){var s=t.firstChild,o=this.placeSlice(s.content,Math.max(0,e-1),n&&1==t.childCount?n-1:0,r,s) -o.content!=s.content&&(o.content.size?(t=t.replaceChild(0,s.copy(o.content)),e=o.openStart+1):(1==t.childCount&&(n=0),t=t.cutByIndex(1),e=0))}var a=this.placeContent(t,e,n,r,i) -if(r>2&&a.size&&0==e){for(var l=0;l<a.content.childCount;l++){var c=a.content.child(l) -this.placeContent(c.content,0,n&&l==a.content.childCount.length-1?n-1:0,r,c)}a=ls.Fragment.empty}return a},A.prototype.placeContent=function(t,e,n,r,i){for(var s=0;s<t.childCount;s++){for(var o=t.child(s),a=!1,l=s==t.childCount-1,c=this.open.length-1;c>=0;c--){var h=this.open[c],p=void 0 -if(r>1&&(p=h.match.findWrapping(o.type))&&(!i||!p.length||p[p.length-1]!=i.type)){for(;this.open.length-1>c;)this.closeNode() -for(var u=0;u<p.length;u++)h.match=h.match.matchType(p[u]),c++,h={parent:p[u].create(),match:p[u].contentMatch,content:ls.Fragment.empty,wrapper:!0,openEnd:0,depth:c+u},this.open.push(h)}var d=h.match.matchType(o.type) -if(!d){var f=h.match.fillBefore(ls.Fragment.from(o)) -if(!f){if(i&&h.match.matchType(i.type))break -continue}for(var m=0;m<f.childCount;m++){var g=f.child(m) -this.addNode(h,g,0),d=h.match.matchFragment(g)}}for(;this.open.length-1>c;)this.closeNode() -o=o.mark(h.parent.type.allowedMarks(o.marks)),e&&(o=N(o,e,l?n:0),e=0),this.addNode(h,o,l?n:0),h.match=d,l&&(n=0),a=!0 -break}if(!a)break}return this.open.length>1&&(s>0&&s==t.childCount||i&&this.open[this.open.length-1].parent.type==i.type)&&this.closeNode(),new ls.Slice(t.cutByIndex(s),e,n)},A.prototype.addNode=function(t,e,n){var r,i -t.content=(r=t.content,i=t.openEnd,i?r.replaceChild(r.childCount-1,function t(e,n){var r=e.content -if(n>1){var i=t(e.lastChild,n-1) -r=e.content.replaceChild(e.childCount-1,i)}var s=e.contentMatchAt(e.childCount).fillBefore(ls.Fragment.empty,!0) -return e.copy(r.append(s))}(r.lastChild,i)):r).addToEnd(e),t.openEnd=n},A.prototype.closeNode=function(){var t=this.open.pop() -0==t.content.size||(t.wrapper?this.addNode(this.open[this.open.length-1],t.parent.copy(t.content),t.openEnd+1):this.placed[t.depth]={depth:t.depth,content:t.content,openEnd:t.openEnd})},c.prototype.replaceRange=function(t,e,n){if(!n.size)return this.deleteRange(t,e) -var r=this.doc.resolve(t),i=this.doc.resolve(e) -if(T(r,i,n))return this.step(new m(t,e,n)) -var s=_(r,this.doc.resolve(e)) -0==s[s.length-1]&&s.pop() -var o=-(r.depth+1) -s.unshift(o) -for(var a=r.depth,l=r.pos-1;a>0;a--,l--){var c=r.node(a).type.spec -if(c.defining||c.isolating)break -s.indexOf(a)>-1?o=a:r.before(a)==l&&s.splice(1,0,-a)}for(var h=s.indexOf(o),p=[],u=n.openStart,d=n.content,f=0;;f++){var g=d.firstChild -if(p.push(g),f==n.openStart)break -d=g.content}u>0&&p[u-1].type.spec.defining&&r.node(h).type!=p[u-1].type?u-=1:u>=2&&p[u-1].isTextblock&&p[u-2].type.spec.defining&&r.node(h).type!=p[u-2].type&&(u-=2) -for(var v=n.openStart;v>=0;v--){var y=(v+u+1)%(n.openStart+1),b=p[y] -if(b)for(var k=0;k<s.length;k++){var w=s[(k+h)%s.length],x=!0 -w<0&&(x=!1,w=-w) -var S=r.node(w-1),C=r.index(w-1) -if(S.canReplaceWith(C,C,b.type,b.marks))return this.replace(r.before(w),x?i.after(w):e,new ls.Slice(D(n.content,0,n.openStart,y),y,n.openEnd))}}return this.replace(t,e,n)},c.prototype.replaceRangeWith=function(t,e,n){if(!n.isInline&&t==e&&this.doc.resolve(t).parent.content.size){var r=w(this.doc,t,n.type) -null!=r&&(t=e=r)}return this.replaceRange(t,e,new ls.Slice(ls.Fragment.from(n),0,0))},c.prototype.deleteRange=function(t,e){for(var n=this.doc.resolve(t),r=this.doc.resolve(e),i=_(n,r),s=0;s<i.length;s++){var o=i[s],a=s==i.length-1 -if(a&&0==o||n.node(o).type.contentMatch.validEnd)return this.delete(n.start(o),r.end(o)) -if(o>0&&(a||n.node(o-1).canReplace(n.index(o-1),r.indexAfter(o-1))))return this.delete(n.before(o),r.after(o))}for(var l=1;l<=n.depth;l++)if(t-n.start(l)==n.depth-l&&e>n.end(l))return this.delete(n.before(l),e) -return this.delete(t,e)},e.Transform=c,e.TransformError=l,e.Step=d,e.StepResult=f,e.joinPoint=function(t,e,n){void 0===n&&(n=-1) -for(var r=t.resolve(e),i=r.depth;;i--){var s=void 0,o=void 0 -if(i==r.depth?(s=r.nodeBefore,o=r.nodeAfter):n>0?(s=r.node(i+1),o=r.node(i).maybeChild(r.index(i)+1)):(s=r.node(i).maybeChild(r.index(i)-1),o=r.node(i+1)),s&&!s.isTextblock&&k(s,o))return e -if(0==i)break -e=n<0?r.before(i):r.after(i)}},e.canJoin=function(t,e){var n=t.resolve(e),r=n.index() -return k(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)},e.canSplit=function(t,e,n,r){void 0===n&&(n=1) -var i=t.resolve(e),s=i.depth-n,o=r&&r[r.length-1]||i.parent -if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1 -for(var a=i.depth-1,l=n-2;a>s;a--,l--){var c=i.node(a),h=i.index(a) -if(c.type.spec.isolating)return!1 -var p=c.content.cutByIndex(h,c.childCount),u=r&&r[l]||c -if(u!=c&&(p=p.replaceChild(0,u.type.create(u.attrs))),!c.canReplace(h+1,c.childCount)||!u.type.validContent(p))return!1}var d=i.indexAfter(s),f=r&&r[0] -return i.node(s).canReplaceWith(d,d,f?f.type:i.node(s+1).type)},e.insertPoint=w,e.dropPoint=function(t,e,n){var r=t.resolve(e) -if(!n.content.size)return e -for(var i=n.content,s=0;s<n.openStart;s++)i=i.firstChild.content -for(var o=1;o<=(0==n.openStart&&n.size?2:1);o++)for(var a=r.depth;a>=0;a--){var l=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,c=r.index(a)+(l>0?1:0) -if(1==o?r.node(a).canReplace(c,c,i):r.node(a).contentMatchAt(c).findWrapping(i.firstChild.type))return 0==l?r.pos:l<0?r.before(a+1):r.after(a+1)}return null},e.liftTarget=function(t){for(var e=t.parent.content.cutByIndex(t.startIndex,t.endIndex),n=t.depth;;--n){var r=t.$from.node(n),i=t.$from.index(n),s=t.$to.indexAfter(n) -if(n<t.depth&&r.canReplace(i,s,e))return n -if(0==n||r.type.spec.isolating||!y(r,i,s))break}},e.findWrapping=function(t,e,n,r){void 0===r&&(r=t) -var i=function(t,e){var n=t.parent,r=t.startIndex,i=t.endIndex,s=n.contentMatchAt(r).findWrapping(e) -if(!s)return null -var o=s.length?s[0]:e -return n.canReplaceWith(r,i,o)?s:null}(t,e),s=i&&function(t,e){var n=t.parent,r=t.startIndex,i=t.endIndex,s=n.child(r),o=e.contentMatch.findWrapping(s.type) -if(!o)return null -for(var a=(o.length?o[o.length-1]:e).contentMatch,l=r;a&&l<i;l++)a=a.matchType(n.child(l).type) -return a&&a.validEnd?o:null}(r,e) -return s?i.map(b).concat({type:e,attrs:n}).concat(s.map(b)):null},e.StepMap=o,e.MapResult=s,e.Mapping=a,e.AddMarkStep=S,e.RemoveMarkStep=C,e.ReplaceStep=m,e.ReplaceAroundStep=g,e.replaceStep=M})) -rs(hs) -hs.Transform,hs.TransformError -var ps=hs.Step,us=hs.StepResult,ds=(hs.joinPoint,hs.canJoin,hs.canSplit,hs.insertPoint,hs.dropPoint,hs.liftTarget),fs=hs.findWrapping,ms=(hs.StepMap,hs.MapResult,hs.Mapping,hs.AddMarkStep,hs.RemoveMarkStep,hs.ReplaceStep,hs.ReplaceAroundStep,hs.replaceStep,is(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}) -var n=Object.create(null),r=function(t,e,n){this.ranges=n||[new s(t.min(e),t.max(e))],this.$anchor=t,this.$head=e},i={anchor:{},head:{},from:{},to:{},$from:{},$to:{},empty:{}} -i.anchor.get=function(){return this.$anchor.pos},i.head.get=function(){return this.$head.pos},i.from.get=function(){return this.$from.pos},i.to.get=function(){return this.$to.pos},i.$from.get=function(){return this.ranges[0].$from},i.$to.get=function(){return this.ranges[0].$to},i.empty.get=function(){for(var t=this.ranges,e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1 -return!0},r.prototype.content=function(){return this.$from.node(0).slice(this.from,this.to,!0)},r.prototype.replace=function(t,e){void 0===e&&(e=ls.Slice.empty) -for(var n=e.content.lastChild,r=null,i=0;i<e.openEnd;i++)r=n,n=n.lastChild -for(var s=t.steps.length,o=this.ranges,a=0;a<o.length;a++){var l=o[a],c=l.$from,h=l.$to,p=t.mapping.slice(s) -t.replaceRange(p.map(c.pos),p.map(h.pos),a?ls.Slice.empty:e),0==a&&d(t,s,(n?n.isInline:r&&r.isTextblock)?-1:1)}},r.prototype.replaceWith=function(t,e){for(var n=t.steps.length,r=this.ranges,i=0;i<r.length;i++){var s=r[i],o=s.$from,a=s.$to,l=t.mapping.slice(n),c=l.map(o.pos),h=l.map(a.pos) -i?t.deleteRange(c,h):(t.replaceRangeWith(c,h,e),d(t,n,e.isInline?-1:1))}},r.findFrom=function(t,e,n){var r=t.parent.inlineContent?new o(t):u(t.node(0),t.parent,t.pos,t.index(),e,n) -if(r)return r -for(var i=t.depth-1;i>=0;i--){var s=e<0?u(t.node(0),t.node(i),t.before(i+1),t.index(i),e,n):u(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,e,n) -if(s)return s}},r.near=function(t,e){return void 0===e&&(e=1),this.findFrom(t,e)||this.findFrom(t,-e)||new h(t.node(0))},r.atStart=function(t){return u(t,t,0,0,1)||new h(t)},r.atEnd=function(t){return u(t,t,t.content.size,t.childCount,-1)||new h(t)},r.fromJSON=function(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON") -var r=n[e.type] -if(!r)throw new RangeError("No selection type "+e.type+" defined") -return r.fromJSON(t,e)},r.jsonID=function(t,e){if(t in n)throw new RangeError("Duplicate use of selection JSON ID "+t) -return n[t]=e,e.prototype.jsonID=t,e},r.prototype.getBookmark=function(){return o.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(r.prototype,i),r.prototype.visible=!0 -var s=function(t,e){this.$from=t,this.$to=e},o=function(t){function e(e,n){void 0===n&&(n=e),t.call(this,e,n)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e -var n={$cursor:{}} -return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},e.prototype.map=function(n,r){var i=n.resolve(r.map(this.head)) -if(!i.parent.inlineContent)return t.near(i) -var s=n.resolve(r.map(this.anchor)) -return new e(s.parent.inlineContent?s:i,i)},e.prototype.replace=function(e,n){if(void 0===n&&(n=ls.Slice.empty),t.prototype.replace.call(this,e,n),n==ls.Slice.empty){var r=this.$from.marksAcross(this.$to) -r&&e.ensureMarks(r)}},e.prototype.eq=function(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head},e.prototype.getBookmark=function(){return new a(this.anchor,this.head)},e.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},e.fromJSON=function(t,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON") -return new e(t.resolve(n.anchor),t.resolve(n.head))},e.create=function(t,e,n){void 0===n&&(n=e) -var r=t.resolve(e) -return new this(r,n==e?r:t.resolve(n))},e.between=function(n,r,i){var s=n.pos-r.pos -if(i&&!s||(i=s>=0?1:-1),!r.parent.inlineContent){var o=t.findFrom(r,i,!0)||t.findFrom(r,-i,!0) -if(!o)return t.near(r,i) -r=o.$head}return n.parent.inlineContent||(0==s?n=r:(n=(t.findFrom(n,-i,!0)||t.findFrom(n,i,!0)).$anchor).pos<r.pos!=s<0&&(n=r)),new e(n,r)},Object.defineProperties(e.prototype,n),e}(r) -r.jsonID("text",o) -var a=function(t,e){this.anchor=t,this.head=e} -a.prototype.map=function(t){return new a(t.map(this.anchor),t.map(this.head))},a.prototype.resolve=function(t){return o.between(t.resolve(this.anchor),t.resolve(this.head))} -var l=function(t){function e(e){var n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize) -t.call(this,e,r),this.node=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.map=function(n,r){var i=r.mapResult(this.anchor),s=i.deleted,o=i.pos,a=n.resolve(o) -return s?t.near(a):new e(a)},e.prototype.content=function(){return new ls.Slice(ls.Fragment.from(this.node),0,0)},e.prototype.eq=function(t){return t instanceof e&&t.anchor==this.anchor},e.prototype.toJSON=function(){return{type:"node",anchor:this.anchor}},e.prototype.getBookmark=function(){return new c(this.anchor)},e.fromJSON=function(t,n){if("number"!=typeof n.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON") -return new e(t.resolve(n.anchor))},e.create=function(t,e){return new this(t.resolve(e))},e.isSelectable=function(t){return!t.isText&&!1!==t.type.spec.selectable},e}(r) -l.prototype.visible=!1,r.jsonID("node",l) -var c=function(t){this.anchor=t} -c.prototype.map=function(t){var e=t.mapResult(this.anchor),n=e.deleted,r=e.pos -return n?new a(r,r):new c(r)},c.prototype.resolve=function(t){var e=t.resolve(this.anchor),n=e.nodeAfter -return n&&l.isSelectable(n)?new l(e):r.near(e)} -var h=function(t){function e(e){t.call(this,e.resolve(0),e.resolve(e.content.size))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toJSON=function(){return{type:"all"}},e.fromJSON=function(t){return new e(t)},e.prototype.map=function(t){return new e(t)},e.prototype.eq=function(t){return t instanceof e},e.prototype.getBookmark=function(){return p},e}(r) -r.jsonID("all",h) -var p={map:function(){return this},resolve:function(t){return new h(t)}} -function u(t,e,n,r,i,s){if(e.inlineContent)return o.create(t,n) -for(var a=r-(i>0?0:1);i>0?a<e.childCount:a>=0;a+=i){var c=e.child(a) -if(c.isAtom){if(!s&&l.isSelectable(c))return l.create(t,n-(i<0?c.nodeSize:0))}else{var h=u(t,c,n+i,i<0?c.childCount:0,i,s) -if(h)return h}n+=c.nodeSize*i}}function d(t,e,n){var i=t.steps.length-1 -if(!(i<e)){var s,o=t.steps[i] -if(o instanceof hs.ReplaceStep||o instanceof hs.ReplaceAroundStep)t.mapping.maps[i].forEach(function(t,e,n,r){null==s&&(s=r)}),t.setSelection(r.near(t.doc.resolve(s),n))}}var f=function(t){function e(e){t.call(this,e.doc),this.time=Date.now(),this.curSelection=e.selection,this.curSelectionFor=0,this.storedMarks=e.storedMarks,this.updated=0,this.meta=Object.create(null)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e -var n={selection:{},selectionSet:{},storedMarksSet:{},isGeneric:{},scrolledIntoView:{}} -return n.selection.get=function(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection},e.prototype.setSelection=function(t){return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this},n.selectionSet.get=function(){return(1&this.updated)>0},e.prototype.setStoredMarks=function(t){return this.storedMarks=t,this.updated|=2,this},e.prototype.ensureMarks=function(t){return ls.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this},e.prototype.addStoredMark=function(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))},e.prototype.removeStoredMark=function(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(2&this.updated)>0},e.prototype.addStep=function(e,n){t.prototype.addStep.call(this,e,n),this.updated=-3&this.updated,this.storedMarks=null},e.prototype.setTime=function(t){return this.time=t,this},e.prototype.replaceSelection=function(t){return this.selection.replace(this,t),this},e.prototype.replaceSelectionWith=function(t,e){var n=this.selection -return!1!==e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||ls.Mark.none))),n.replaceWith(this,t),this},e.prototype.deleteSelection=function(){return this.selection.replace(this),this},e.prototype.insertText=function(t,e,n){void 0===n&&(n=e) -var r=this.doc.type.schema -if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection() -if(!t)return this.deleteRange(e,n) -var i=this.storedMarks -if(!i){var s=this.doc.resolve(e) -i=n==e?s.marks():s.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,i))},e.prototype.setMeta=function(t,e){return this.meta["string"==typeof t?t:t.key]=e,this},e.prototype.getMeta=function(t){return this.meta["string"==typeof t?t:t.key]},n.isGeneric.get=function(){for(var t in this.meta)return!1 -return!0},e.prototype.scrollIntoView=function(){return this.updated|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(e.prototype,n),e}(hs.Transform) -function m(t,e){return e&&t?t.bind(e):t}var g=function(t,e,n){this.name=t,this.init=m(e.init,n),this.apply=m(e.apply,n)},v=[new g("doc",{init:function(t){return t.doc||t.schema.topNodeType.createAndFill()},apply:function(t){return t.doc}}),new g("selection",{init:function(t,e){return t.selection||r.atStart(e.doc)},apply:function(t){return t.selection}}),new g("storedMarks",{init:function(t){return t.storedMarks||null},apply:function(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new g("scrollToSelection",{init:function(){return 0},apply:function(t,e){return t.scrolledIntoView?e+1:e}})],y=function(t,e){var n=this -this.schema=t,this.fields=v.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),e&&e.forEach(function(t){if(n.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")") -n.plugins.push(t),n.pluginsByKey[t.key]=t,t.spec.state&&n.fields.push(new g(t.key,t.spec.state,t))})},b=function(t){this.config=t},k={schema:{},plugins:{},tr:{}} -k.schema.get=function(){return this.config.schema},k.plugins.get=function(){return this.config.plugins},b.prototype.apply=function(t){return this.applyTransaction(t).state},b.prototype.filterTransaction=function(t,e){void 0===e&&(e=-1) -for(var n=0;n<this.config.plugins.length;n++)if(n!=e){var r=this.config.plugins[n] -if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,t,this))return!1}return!0},b.prototype.applyTransaction=function(t){if(!this.filterTransaction(t))return{state:this,transactions:[]} -for(var e=[t],n=this.applyInner(t),r=null;;){for(var i=!1,s=0;s<this.config.plugins.length;s++){var o=this.config.plugins[s] -if(o.spec.appendTransaction){var a=r?r[s].n:0,l=r?r[s].state:this,c=a<e.length&&o.spec.appendTransaction.call(o,a?e.slice(a):e,l,n) -if(c&&n.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",t),!r){r=[] -for(var h=0;h<this.config.plugins.length;h++)r.push(h<s?{state:n,n:e.length}:{state:this,n:0})}e.push(c),n=n.applyInner(c),i=!0}r&&(r[s]={state:n,n:e.length})}}if(!i)return{state:n,transactions:e}}},b.prototype.applyInner=function(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction") -for(var e=new b(this.config),n=this.config.fields,r=0;r<n.length;r++){var i=n[r] -e[i.name]=i.apply(t,this[i.name],this,e)}for(var s=0;s<w.length;s++)w[s](this,t,e) -return e},k.tr.get=function(){return new f(this)},b.create=function(t){for(var e=new y(t.schema||t.doc.type.schema,t.plugins),n=new b(e),r=0;r<e.fields.length;r++)n[e.fields[r].name]=e.fields[r].init(t,n) -return n},b.prototype.reconfigure=function(t){for(var e=new y(t.schema||this.schema,t.plugins),n=e.fields,r=new b(e),i=0;i<n.length;i++){var s=n[i].name -r[s]=this.hasOwnProperty(s)?this[s]:n[i].init(t,r)}return r},b.prototype.toJSON=function(t){var e={doc:this.doc.toJSON(),selection:this.selection.toJSON()} -if(this.storedMarks&&(e.storedMarks=this.storedMarks.map(function(t){return t.toJSON()})),t&&"object"==typeof t)for(var n in t){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved") -var r=t[n],i=r.spec.state -i&&i.toJSON&&(e[n]=i.toJSON.call(r,this[r.key]))}return e},b.fromJSON=function(t,e,n){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON") -if(!t.schema)throw new RangeError("Required config field 'schema' missing") -var i=new y(t.schema,t.plugins),s=new b(i) -return i.fields.forEach(function(i){if("doc"==i.name)s.doc=ls.Node.fromJSON(t.schema,e.doc) -else if("selection"==i.name)s.selection=r.fromJSON(s.doc,e.selection) -else if("storedMarks"==i.name)e.storedMarks&&(s.storedMarks=e.storedMarks.map(t.schema.markFromJSON)) -else{if(n)for(var o in n){var a=n[o],l=a.spec.state -if(a.key==i.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(e,o))return void(s[i.name]=l.fromJSON.call(a,t,e[o],s))}s[i.name]=i.init(t,s)}}),s},b.addApplyListener=function(t){w.push(t)},b.removeApplyListener=function(t){var e=w.indexOf(t) -e>-1&&w.splice(e,1)},Object.defineProperties(b.prototype,k) -var w=[] -var x=function(t){this.props={},t.props&&function t(e,n,r){for(var i in e){var s=e[i] -s instanceof Function?s=s.bind(n):"handleDOMEvents"==i&&(s=t(s,n,{})),r[i]=s}return r}(t.props,this,this.props),this.spec=t,this.key=t.key?t.key.key:C("plugin")} -x.prototype.getState=function(t){return t[this.key]} -var S=Object.create(null) -function C(t){return t in S?t+"$"+ ++S[t]:(S[t]=0,t+"$")}var M=function(t){void 0===t&&(t="key"),this.key=C(t)} -M.prototype.get=function(t){return t.config.pluginsByKey[this.key]},M.prototype.getState=function(t){return t[this.key]},e.Selection=r,e.SelectionRange=s,e.TextSelection=o,e.NodeSelection=l,e.AllSelection=h,e.Transaction=f,e.EditorState=b,e.Plugin=x,e.PluginKey=M})) -rs(ms) -ms.Selection,ms.SelectionRange,ms.TextSelection,ms.NodeSelection,ms.AllSelection,ms.Transaction -var gs=ms.EditorState,vs=(ms.Plugin,ms.PluginKey,is(function(t,e){function n(t,e){return!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0)}function r(t,e,n){var r=t.selection.$cursor -if(!r||(n?!n.endOfTextblock("backward",t):r.parentOffset>0))return!1 -var s=o(r) -if(!s){var a=r.blockRange(),l=a&&hs.liftTarget(a) -return null!=l&&(e&&e(t.tr.lift(a,l).scrollIntoView()),!0)}var c=s.nodeBefore -if(!c.type.spec.isolating&&g(t,s,e))return!0 -if(0==r.parent.content.size&&(i(c,"end")||ms.NodeSelection.isSelectable(c))){if(e){var h=t.tr.deleteRange(r.before(),r.after()) -h.setSelection(i(c,"end")?ms.Selection.findFrom(h.doc.resolve(h.mapping.map(s.pos,-1)),-1):ms.NodeSelection.create(h.doc,s.pos-c.nodeSize)),e(h.scrollIntoView())}return!0}return!(!c.isAtom||s.depth!=r.depth-1)&&(e&&e(t.tr.delete(s.pos-c.nodeSize,s.pos).scrollIntoView()),!0)}function i(t,e){for(;t;t="start"==e?t.firstChild:t.lastChild)if(t.isTextblock)return!0 -return!1}function s(t,e,n){var r=t.selection.$cursor -if(!r||(n?!n.endOfTextblock("backward",t):r.parentOffset>0))return!1 -var i=o(r),s=i&&i.nodeBefore -return!(!s||!ms.NodeSelection.isSelectable(s))&&(e&&e(t.tr.setSelection(ms.NodeSelection.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)}function o(t){if(!t.parent.type.spec.isolating)for(var e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1)) -if(t.node(e).type.spec.isolating)break}return null}function a(t,e,n){var r=t.selection.$cursor -if(!r||(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size))return!1 -var s=c(r) -if(!s)return!1 -var o=s.nodeAfter -if(g(t,s,e))return!0 -if(0==r.parent.content.size&&(i(o,"start")||ms.NodeSelection.isSelectable(o))){if(e){var a=t.tr.deleteRange(r.before(),r.after()) -a.setSelection(i(o,"start")?ms.Selection.findFrom(a.doc.resolve(a.mapping.map(s.pos)),1):ms.NodeSelection.create(a.doc,a.mapping.map(s.pos))),e(a.scrollIntoView())}return!0}return!(!o.isAtom||s.depth!=r.depth-1)&&(e&&e(t.tr.delete(s.pos,s.pos+o.nodeSize).scrollIntoView()),!0)}function l(t,e,n){var r=t.selection.$cursor -if(!r||(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size))return!1 -var i=c(r),s=i&&i.nodeAfter -return!(!s||!ms.NodeSelection.isSelectable(s))&&(e&&e(t.tr.setSelection(ms.NodeSelection.create(t.doc,i.pos)).scrollIntoView()),!0)}function c(t){if(!t.parent.type.spec.isolating)for(var e=t.depth-1;e>=0;e--){var n=t.node(e) -if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1)) -if(n.type.spec.isolating)break}return null}function h(t,e){var n=t.selection,r=n.$head,i=n.$anchor -return!(!r.parent.type.spec.code||!r.sameParent(i))&&(e&&e(t.tr.insertText("\n").scrollIntoView()),!0)}function p(t,e){var n=t.selection,r=n.$head,i=n.$anchor -if(!r.parent.type.spec.code||!r.sameParent(i))return!1 -var s=r.node(-1),o=r.indexAfter(-1),a=s.contentMatchAt(o).defaultType -if(!s.canReplaceWith(o,o,a))return!1 -if(e){var l=r.after(),c=t.tr.replaceWith(l,l,a.createAndFill()) -c.setSelection(ms.Selection.near(c.doc.resolve(l),1)),e(c.scrollIntoView())}return!0}function u(t,e){var n=t.selection,r=n.$from,i=n.$to -if(r.parent.inlineContent||i.parent.inlineContent)return!1 -var s=r.parent.contentMatchAt(i.indexAfter()).defaultType -if(!s||!s.isTextblock)return!1 -if(e){var o=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=t.tr.insert(o,s.createAndFill()) -a.setSelection(ms.TextSelection.create(a.doc,o+1)),e(a.scrollIntoView())}return!0}function d(t,e){var n=t.selection.$cursor -if(!n||n.parent.content.size)return!1 -if(n.depth>1&&n.after()!=n.end(-1)){var r=n.before() -if(hs.canSplit(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}var i=n.blockRange(),s=i&&hs.liftTarget(i) -return null!=s&&(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)}function f(t,e){var n=t.selection,r=n.$from,i=n.$to -if(t.selection instanceof ms.NodeSelection&&t.selection.node.isBlock)return!(!r.parentOffset||!hs.canSplit(t.doc,r.pos))&&(e&&e(t.tr.split(r.pos).scrollIntoView()),!0) -if(!r.parent.isBlock)return!1 -if(e){var s=i.parentOffset==i.parent.content.size,o=t.tr -t.selection instanceof ms.TextSelection&&o.deleteSelection() -var a=0==r.depth?null:r.node(-1).contentMatchAt(r.indexAfter(-1)).defaultType,l=s&&a?[{type:a}]:null,c=hs.canSplit(o.doc,r.pos,1,l) -l||c||!hs.canSplit(o.doc,o.mapping.map(r.pos),1,a&&[{type:a}])||(l=[{type:a}],c=!0),c&&(o.split(o.mapping.map(r.pos),1,l),s||r.parentOffset||r.parent.type==a||!r.node(-1).canReplace(r.index(-1),r.indexAfter(-1),ls.Fragment.from(a.create(),r.parent))||o.setNodeMarkup(o.mapping.map(r.before()),a)),e(o.scrollIntoView())}return!0}function m(t,e){return e&&e(t.tr.setSelection(new ms.AllSelection(t.doc))),!0}function g(t,e,n){var r,i,s=e.nodeBefore,o=e.nodeAfter -if(s.type.spec.isolating||o.type.spec.isolating)return!1 -if(function(t,e,n){var r=e.nodeBefore,i=e.nodeAfter,s=e.index() -return!(!(r&&i&&r.type.compatibleContent(i.type))||(!r.content.size&&e.parent.canReplace(s-1,s)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),0):!e.parent.canReplace(s,s+1)||!i.isTextblock&&!hs.canJoin(t.doc,e.pos)||(n&&n(t.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),0)))}(t,e,n))return!0 -if(e.parent.canReplace(e.index(),e.index()+1)&&(r=(i=s.contentMatchAt(s.childCount)).findWrapping(o.type))&&i.matchType(r[0]||o.type).validEnd){if(n){for(var a=e.pos+o.nodeSize,l=ls.Fragment.empty,c=r.length-1;c>=0;c--)l=ls.Fragment.from(r[c].create(null,l)) -l=ls.Fragment.from(s.copy(l)) -var h=t.tr.step(new hs.ReplaceAroundStep(e.pos-1,a,e.pos,a,new ls.Slice(l,1,0),r.length,!0)),p=a+2*r.length -hs.canJoin(h.doc,p)&&h.join(p),n(h.scrollIntoView())}return!0}var u=ms.Selection.findFrom(e,1),d=u&&u.$from.blockRange(u.$to),f=d&&hs.liftTarget(d) -return null!=f&&f>=e.depth&&(n&&n(t.tr.lift(d,f).scrollIntoView()),!0)}function v(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e] -return function(e,n,r){for(var i=0;i<t.length;i++)if(t[i](e,n,r))return!0 -return!1}}Object.defineProperty(e,"__esModule",{value:!0}) -var y=v(n,r,s),b=v(n,a,l),k={Enter:v(h,u,d,f),"Mod-Enter":p,Backspace:y,"Mod-Backspace":y,Delete:b,"Mod-Delete":b,"Mod-a":m},w={"Ctrl-h":k.Backspace,"Alt-Backspace":k["Mod-Backspace"],"Ctrl-d":k.Delete,"Ctrl-Alt-Backspace":k["Mod-Delete"],"Alt-Delete":k["Mod-Delete"],"Alt-d":k["Mod-Delete"]} -for(var x in k)w[x]=k[x] -var S=("undefined"!=typeof navigator?/Mac/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?w:k -e.deleteSelection=n,e.joinBackward=r,e.selectNodeBackward=s,e.joinForward=a,e.selectNodeForward=l,e.joinUp=function(t,e){var n,r=t.selection,i=r instanceof ms.NodeSelection -if(i){if(r.node.isTextblock||!hs.canJoin(t.doc,r.from))return!1 -n=r.from}else if(null==(n=hs.joinPoint(t.doc,r.from,-1)))return!1 -if(e){var s=t.tr.join(n) -i&&s.setSelection(ms.NodeSelection.create(s.doc,n-t.doc.resolve(n).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},e.joinDown=function(t,e){var n,r=t.selection -if(r instanceof ms.NodeSelection){if(r.node.isTextblock||!hs.canJoin(t.doc,r.to))return!1 -n=r.to}else if(null==(n=hs.joinPoint(t.doc,r.to,1)))return!1 -return e&&e(t.tr.join(n).scrollIntoView()),!0},e.lift=function(t,e){var n=t.selection,r=n.$from,i=n.$to,s=r.blockRange(i),o=s&&hs.liftTarget(s) -return null!=o&&(e&&e(t.tr.lift(s,o).scrollIntoView()),!0)},e.newlineInCode=h,e.exitCode=p,e.createParagraphNear=u,e.liftEmptyBlock=d,e.splitBlock=f,e.splitBlockKeepMarks=function(t,e){return f(t,e&&function(n){var r=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks() -r&&n.ensureMarks(r),e(n)})},e.selectParentNode=function(t,e){var n,r=t.selection,i=r.$from,s=r.to,o=i.sharedDepth(s) -return 0!=o&&(n=i.before(o),e&&e(t.tr.setSelection(ms.NodeSelection.create(t.doc,n))),!0)},e.selectAll=m,e.wrapIn=function(t,e){return function(n,r){var i=n.selection,s=i.$from,o=i.$to,a=s.blockRange(o),l=a&&hs.findWrapping(a,t,e) -return!!l&&(r&&r(n.tr.wrap(a,l).scrollIntoView()),!0)}},e.setBlockType=function(t,e){return function(n,r){var i=n.selection,s=i.from,o=i.to,a=!1 -return n.doc.nodesBetween(s,o,function(r,i){if(a)return!1 -if(r.isTextblock&&!r.hasMarkup(t,e))if(r.type==t)a=!0 -else{var s=n.doc.resolve(i),o=s.index() -a=s.parent.canReplaceWith(o,o+1,t)}}),!!a&&(r&&r(n.tr.setBlockType(s,o,t,e).scrollIntoView()),!0)}},e.toggleMark=function(t,e){return function(n,r){var i=n.selection,s=i.empty,o=i.$cursor,a=i.ranges -if(s&&!o||!function(t,e,n){for(var r=function(r){var i=e[r],s=i.$from,o=i.$to,a=0==s.depth&&t.type.allowsMarkType(n) -if(t.nodesBetween(s.pos,o.pos,function(t){if(a)return!1 -a=t.inlineContent&&t.type.allowsMarkType(n)}),a)return{v:!0}},i=0;i<e.length;i++){var s=r(i) -if(s)return s.v}return!1}(n.doc,a,t))return!1 -if(r)if(o)t.isInSet(n.storedMarks||o.marks())?r(n.tr.removeStoredMark(t)):r(n.tr.addStoredMark(t.create(e))) -else{for(var l=!1,c=n.tr,h=0;!l&&h<a.length;h++){var p=a[h],u=p.$from,d=p.$to -l=n.doc.rangeHasMark(u.pos,d.pos,t)}for(var f=0;f<a.length;f++){var m=a[f],g=m.$from,v=m.$to -l?c.removeMark(g.pos,v.pos,t):c.addMark(g.pos,v.pos,t.create(e))}r(c.scrollIntoView())}return!0}},e.autoJoin=function(t,e){if(Array.isArray(e)){var n=e -e=function(t){return n.indexOf(t.type.name)>-1}}return function(n,r){return t(n,r&&function(t,e){return function(n){if(!n.isGeneric)return t(n) -for(var r=[],i=0;i<n.mapping.maps.length;i++){for(var s=n.mapping.maps[i],o=0;o<r.length;o++)r[o]=s.map(r[o]) -s.forEach(function(t,e,n,i){return r.push(n,i)})}for(var a=[],l=0;l<r.length;l+=2)for(var c=r[l],h=r[l+1],p=n.doc.resolve(c),u=p.sharedDepth(h),d=p.node(u),f=p.indexAfter(u),m=p.after(u+1);m<=h;++f){var g=d.maybeChild(f) -if(!g)break -if(f&&-1==a.indexOf(m)){var v=d.child(f-1) -v.type==g.type&&e(v,g)&&a.push(m)}m+=g.nodeSize}a.sort(function(t,e){return t-e}) -for(var y=a.length-1;y>=0;y--)hs.canJoin(n.doc,a[y])&&n.join(a[y]) -t(n)}}(r,e))}},e.chainCommands=v,e.pcBaseKeymap=k,e.macBaseKeymap=w,e.baseKeymap=S})) -rs(vs) -vs.deleteSelection,vs.joinBackward,vs.selectNodeBackward,vs.joinForward,vs.selectNodeForward,vs.joinUp,vs.joinDown,vs.lift,vs.newlineInCode,vs.exitCode,vs.createParagraphNear,vs.liftEmptyBlock,vs.splitBlock,vs.splitBlockKeepMarks,vs.selectParentNode,vs.selectAll,vs.wrapIn -var ys=vs.setBlockType,bs=vs.toggleMark,ks=(vs.autoJoin,vs.chainCommands,vs.pcBaseKeymap,vs.macBaseKeymap,vs.baseKeymap),ws=function(){} -ws.prototype.append=function(t){return t.length?(t=ws.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},ws.prototype.prepend=function(t){return t.length?ws.from(t).append(this):this},ws.prototype.appendInner=function(t){return new Ss(this,t)},ws.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?ws.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},ws.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},ws.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},ws.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length) -var r=[] -return this.forEach(function(e,n){return r.push(t(e,n))},e,n),r},ws.from=function(t){return t instanceof ws?t:t&&t.length?new xs(t):ws.empty} -var xs=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e -var n={length:{},depth:{}} -return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var i=e;i<n;i++)if(!1===t(this.values[i],r+i))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){for(var i=e-1;i>=n;i--)if(!1===t(this.values[i],r+i))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=200)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=200)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(ws) -ws.empty=new xs([]) -var Ss=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return t<this.left.length?this.left.get(t):this.right.get(t-this.left.length)},e.prototype.forEachInner=function(t,e,n,r){var i=this.left.length -return!(e<i&&!1===this.left.forEachInner(t,e,Math.min(n,i),r))&&(!(n>i&&!1===this.right.forEachInner(t,Math.max(e-i,0),Math.min(this.length,n)-i,r+i))&&void 0)},e.prototype.forEachInvertedInner=function(t,e,n,r){var i=this.left.length -return!(e>i&&!1===this.right.forEachInvertedInner(t,e-i,Math.max(n,i)-i,r+i))&&(!(n<i&&!1===this.left.forEachInvertedInner(t,Math.min(e,i),n,r))&&void 0)},e.prototype.sliceInner=function(t,e){if(0==t&&e==this.length)return this -var n=this.left.length -return e<=n?this.left.slice(t,e):t>=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t) -if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t) -if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(ws),Cs=ws,Ms=is(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}) -var n,r=(n=Cs)&&"object"==typeof n&&"default"in n?n.default:n,i=function(t,e){this.items=t,this.eventCount=e} -i.prototype.popEvent=function(t,e){var n=this -if(0==this.eventCount)return null -for(var r,o,a=this.items.length;;a--){if(n.items.get(a-1).selection){--a -break}}e&&(r=this.remapping(a,this.items.length),o=r.maps.length) -var l,c,h=t.tr,p=[],u=[] -return this.items.forEach(function(t,e){if(!t.step)return r||(r=n.remapping(a,e+1),o=r.maps.length),o--,void u.push(t) -if(r){u.push(new s(t.map)) -var d,f=t.step.map(r.slice(o)) -f&&h.maybeStep(f).doc&&(d=h.mapping.maps[h.mapping.maps.length-1],p.push(new s(d,null,null,p.length+u.length))),o--,d&&r.appendMap(d,o)}else h.maybeStep(t.step) -return t.selection?(l=r?t.selection.map(r.slice(o)):t.selection,c=new i(n.items.slice(0,a).append(u.reverse().concat(p)),n.eventCount-1),!1):void 0},this.items.length,0),{remaining:c,transform:h,selection:l}},i.prototype.addTransform=function(t,e,n,r){for(var o=[],l=this.eventCount,c=this.items,h=!r&&c.length?c.get(c.length-1):null,p=0;p<t.steps.length;p++){var u,d=t.steps[p].invert(t.docs[p]),f=new s(t.mapping.maps[p],d,e);(u=h&&h.merge(f))&&(f=u,p?o.pop():c=c.slice(0,c.length-1)),o.push(f),e&&(l++,e=null),r||(h=f)}var m,g,v,y=l-n.depth -return y>a&&(g=y,(m=c).forEach(function(t,e){if(t.selection&&0==g--)return v=e,!1}),c=m.slice(v),l-=y),new i(c.append(o),l)},i.prototype.remapping=function(t,e){var n=new hs.Mapping -return this.items.forEach(function(e,r){var i=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?i=n.maps.length-e.mirrorOffset:null -n.appendMap(e.map,i)},t,e),n},i.prototype.addMaps=function(t){return 0==this.eventCount?this:new i(this.items.append(t.map(function(t){return new s(t)})),this.eventCount)},i.prototype.rebased=function(t,e){if(!this.eventCount)return this -var n=[],r=Math.max(0,this.items.length-e),o=t.mapping,a=t.steps.length,l=this.eventCount -this.items.forEach(function(t){t.selection&&l--},r) -var c=e -this.items.forEach(function(e){var r=o.getMirror(--c) -if(null!=r){a=Math.min(a,r) -var i=o.maps[r] -if(e.step){var h=t.steps[r].invert(t.docs[r]),p=e.selection&&e.selection.map(o.slice(c+1,r)) -p&&l++,n.push(new s(i,h,p))}else n.push(new s(i))}},r) -for(var h=[],p=e;p<a;p++)h.push(new s(o.maps[p])) -var u=this.items.slice(0,r).append(h).append(n),d=new i(u,l) -return d.emptyItemCount()>500&&(d=d.compress(this.items.length-n.length)),d},i.prototype.emptyItemCount=function(){var t=0 -return this.items.forEach(function(e){e.step||t++}),t},i.prototype.compress=function(t){void 0===t&&(t=this.items.length) -var e=this.remapping(0,t),n=e.maps.length,o=[],a=0 -return this.items.forEach(function(r,i){if(i>=t)o.push(r),r.selection&&a++ -else if(r.step){var l=r.step.map(e.slice(n)),c=l&&l.getMap() -if(n--,c&&e.appendMap(c,n),l){var h=r.selection&&r.selection.map(e.slice(n)) -h&&a++ -var p,u=new s(c.invert(),l,h),d=o.length-1;(p=o.length&&o[d].merge(u))?o[d]=p:o.push(u)}}else r.map&&n--},this.items.length,0),new i(r.from(o.reverse()),a)},i.empty=new i(r.empty,0) -var s=function(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r} -s.prototype.merge=function(t){if(this.step&&t.step&&!t.selection){var e=t.step.merge(this.step) -if(e)return new s(e.getMap().invert(),e,this.selection)}} -var o=function(t,e,n,r){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r},a=20 -function l(t){var e=[] -return t.forEach(function(t,n,r,i){return e.push(r,i)}),e}function c(t,e){if(!t)return null -for(var n=[],r=0;r<t.length;r+=2){var i=e.map(t[r],1),s=e.map(t[r+1],-1) -i<=s&&n.push(i,s)}return n}function h(t,e,n,r){var i=d(e),s=f.get(e).spec.config,a=(r?t.undone:t.done).popEvent(e,i) -if(a){var l=a.selection.resolve(a.transform.doc),c=(r?t.done:t.undone).addTransform(a.transform,e.selection.getBookmark(),s,i),h=new o(r?c:a.remaining,r?a.remaining:c,null,0) -n(a.transform.setSelection(l).setMeta(f,{redo:r,historyState:h}).scrollIntoView())}}var p=!1,u=null -function d(t){var e=t.plugins -if(u!=e){p=!1,u=e -for(var n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){p=!0 -break}}return p}var f=new ms.PluginKey("history"),m=new ms.PluginKey("closeHistory") -e.HistoryState=o,e.closeHistory=function(t){return t.setMeta(m,!0)},e.history=function(t){return t={depth:t&&t.depth||100,newGroupDelay:t&&t.newGroupDelay||500},new ms.Plugin({key:f,state:{init:function(){return new o(i.empty,i.empty,null,0)},apply:function(e,n,r){return function(t,e,n,r){var s,a=n.getMeta(f) -if(a)return a.historyState -n.getMeta(m)&&(t=new o(t.done,t.undone,null,0)) -var h=n.getMeta("appendedTransaction") -if(0==n.steps.length)return t -if(h&&h.getMeta(f))return h.getMeta(f).redo?new o(t.done.addTransform(n,null,r,d(e)),t.undone,l(n.mapping.maps[n.steps.length-1]),t.prevTime):new o(t.done,t.undone.addTransform(n,null,r,d(e)),null,t.prevTime) -if(!1===n.getMeta("addToHistory")||h&&!1===h.getMeta("addToHistory"))return(s=n.getMeta("rebased"))?new o(t.done.rebased(n,s),t.undone.rebased(n,s),c(t.prevRanges,n.mapping),t.prevTime):new o(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),c(t.prevRanges,n.mapping),t.prevTime) -var p=t.prevTime<(n.time||0)-r.newGroupDelay||!h&&!function(t,e){if(!e)return!1 -if(!t.docChanged)return!0 -var n=!1 -return t.mapping.maps[0].forEach(function(t,r){for(var i=0;i<e.length;i+=2)t<=e[i+1]&&r>=e[i]&&(n=!0)}),n}(n,t.prevRanges),u=h?c(t.prevRanges,n.mapping):l(n.mapping.maps[n.steps.length-1]) -return new o(t.done.addTransform(n,p?e.selection.getBookmark():null,r,d(e)),i.empty,u,n.time)}(n,r,e,t)}},config:t})},e.undo=function(t,e){var n=f.getState(t) -return!(!n||0==n.done.eventCount||(e&&h(n,t,e,!1),0))},e.redo=function(t,e){var n=f.getState(t) -return!(!n||0==n.undone.eventCount||(e&&h(n,t,e,!0),0))},e.undoDepth=function(t){var e=f.getState(t) -return e?e.done.eventCount:0},e.redoDepth=function(t){var e=f.getState(t) -return e?e.undone.eventCount:0}}) -rs(Ms) -Ms.HistoryState,Ms.closeHistory -for(var Os=Ms.history,Es=Ms.undo,Ts=Ms.redo,As=(Ms.undoDepth,Ms.redoDepth,{8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"}),Ns={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:";",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},Ds="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),_s="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),Rs="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),Is="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Bs=Ds&&(Is||+Ds[1]<57)||Rs&&Is,zs=0;zs<10;zs++)As[48+zs]=As[96+zs]=String(zs) -for(zs=1;zs<=24;zs++)As[zs+111]="F"+zs -for(zs=65;zs<=90;zs++)As[zs]=String.fromCharCode(zs+32),Ns[zs]=String.fromCharCode(zs) -for(var Ps in As)Ns.hasOwnProperty(Ps)||(Ns[Ps]=As[Ps]) -function Fs(t){var e=!(Bs&&(t.ctrlKey||t.altKey||t.metaKey)||_s&&t.shiftKey&&t.key&&1==t.key.length)&&t.key||(t.shiftKey?Ns:As)[t.keyCode]||t.key||"Unidentified" -return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}var Vs=Fs -Fs.base=As,Fs.shift=Ns -var Ls=is(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}) -var n,r=(n=Vs)&&"object"==typeof n&&"default"in n?n.default:n,i="undefined"!=typeof navigator&&/Mac/.test(navigator.platform) -function s(t){var e,n,r,s,o=t.split(/-(?!$)/),a=o[o.length-1] -"Space"==a&&(a=" ") -for(var l=0;l<o.length-1;l++){var c=o[l] -if(/^(cmd|meta|m)$/i.test(c))s=!0 -else if(/^a(lt)?$/i.test(c))e=!0 -else if(/^(c|ctrl|control)$/i.test(c))n=!0 -else if(/^s(hift)?$/i.test(c))r=!0 -else{if(!/^mod$/i.test(c))throw new Error("Unrecognized modifier name: "+c) -i?s=!0:n=!0}}return e&&(a="Alt-"+a),n&&(a="Ctrl-"+a),s&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function o(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==n&&e.shiftKey&&(t="Shift-"+t),t}function a(t){var e=function(t){var e=Object.create(null) -for(var n in t)e[s(n)]=t[n] -return e}(t) -return function(t,n){var i,s=r(n),a=1==s.length&&" "!=s,l=e[o(s,n,!a)] -if(l&&l(t.state,t.dispatch,t))return!0 -if(a&&(n.shiftKey||n.altKey||n.metaKey)&&(i=r.base[n.keyCode])&&i!=s){var c=e[o(i,n,!0)] -if(c&&c(t.state,t.dispatch,t))return!0}return!1}}e.keymap=function(t){return new ms.Plugin({props:{handleKeyDown:a(t)}})},e.keydownHandler=a}) -rs(Ls) -var js=Ls.keymap,$s=(Ls.keydownHandler,is(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}) -var n={} -if("undefined"!=typeof navigator&&"undefined"!=typeof document){var r=/Edge\/(\d+)/.exec(navigator.userAgent),i=/MSIE \d/.test(navigator.userAgent),s=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent) -n.mac=/Mac/.test(navigator.platform) -var o=n.ie=!!(i||s||r) -n.ie_version=i?document.documentMode||6:s?+s[1]:r?+r[1]:null,n.gecko=!o&&/gecko\/(\d+)/i.test(navigator.userAgent),n.gecko_version=n.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1] -var a=!o&&/Chrome\/(\d+)/.exec(navigator.userAgent) -n.chrome=!!a,n.chrome_version=a&&+a[1],n.ios=!o&&/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),n.android=/Android \d/.test(navigator.userAgent),n.webkit=!o&&"WebkitAppearance"in document.documentElement.style,n.safari=/Apple Computer/.test(navigator.vendor),n.webkit_version=n.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var l=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},c=function(t){var e=t.parentNode -return e&&11==e.nodeType?e.host:e},h=function(t,e,n){var r=document.createRange() -return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},p=function(t,e,n,r){return n&&(d(t,e,n,r,-1)||d(t,e,n,r,1))},u=/^(img|br|input|textarea|hr)$/i -function d(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0 -if(e==(i<0?0:f(t))||3==t.nodeType&&"\ufeff"==t.nodeValue){var s=t.parentNode -if(1!=s.nodeType||(o=void 0,(o=t.pmViewDesc)&&o.node&&o.node.isBlock)||u.test(t.nodeName)||"false"==t.contentEditable)return!1 -e=l(t)+(i<0?0:1),t=s}else{if(1!=t.nodeType)return!1 -t=t.childNodes[e+(i<0?-1:0)],e=i<0?f(t):0}}var o}function f(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}var m=function(t){var e=t.isCollapsed -return e&&n.chrome&&t.rangeCount&&!t.getRangeAt(0).collapsed&&(e=!1),e} -function g(t,e){var n=document.createEvent("Event") -return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function v(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function y(t,e){return"number"==typeof t?t:t[e]}function b(t,e,n){for(var r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,s=t.dom.ownerDocument,o=s.defaultView,a=n||t.dom;a;a=c(a))if(1==a.nodeType){var l=a==s.body||1!=a.nodeType,h=l?v(o):a.getBoundingClientRect(),p=0,u=0 -if(e.top<h.top+y(r,"top")?u=-(h.top-e.top+y(i,"top")):e.bottom>h.bottom-y(r,"bottom")&&(u=e.bottom-h.bottom+y(i,"bottom")),e.left<h.left+y(r,"left")?p=-(h.left-e.left+y(i,"left")):e.right>h.right-y(r,"right")&&(p=e.right-h.right+y(i,"right")),(p||u)&&(l?o.scrollBy(p,u):(u&&(a.scrollTop+=u),p&&(a.scrollLeft+=p))),l)break}}function k(t,e){for(var n,r,i=2e8,s=0,o=e.top,a=e.top,l=t.firstChild,c=0;l;l=l.nextSibling,c++){var p=void 0 -if(1==l.nodeType)p=l.getClientRects() -else{if(3!=l.nodeType)continue -p=h(l).getClientRects()}for(var u=0;u<p.length;u++){var d=p[u] -if(d.top<=o&&d.bottom>=a){o=Math.max(d.bottom,o),a=Math.min(d.top,a) -var f=d.left>e.left?d.left-e.left:d.right<e.left?e.left-d.right:0 -if(f<i){n=l,i=f,r=f&&3==n.nodeType?{left:d.right<e.left?d.right:d.left,top:e.top}:e,1==l.nodeType&&f&&(s=c+(e.left>=(d.left+d.right)/2?1:0)) -continue}}!n&&(e.left>=d.right&&e.top>=d.top||e.left>=d.left&&e.top>=d.bottom)&&(s=c+1)}}return n&&3==n.nodeType?function(t,e){for(var n=t.nodeValue.length,r=document.createRange(),i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i) -var s=S(r,1) -if(s.top!=s.bottom&&w(e,s))return{node:t,offset:i+(e.left>=(s.left+s.right)/2?1:0)}}return{node:t,offset:0}}(n,r):!n||i&&1==n.nodeType?{node:t,offset:s}:k(n,r)}function w(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function x(t,e){var n,r,i=t.root -if(i.caretPositionFromPoint){var s,o=i.caretPositionFromPoint(e.left,e.top) -if(o)n=(s=o).offsetNode,r=s.offset}if(!n&&i.caretRangeFromPoint){var a,l=i.caretRangeFromPoint(e.left,e.top) -if(l)n=(a=l).startContainer,r=a.startOffset}var c,h=i.elementFromPoint(e.left,e.top+1) -if(!h||!t.dom.contains(1!=h.nodeType?h.parentNode:h)){var p=t.dom.getBoundingClientRect() -if(!w(e,p))return null -if(!(h=function t(e,n,r){var i=e.childNodes.length -if(i&&r.top<r.bottom)for(var s=Math.max(0,Math.floor(i*(n.top-r.top)/(r.bottom-r.top))-2),o=s;;){var a=e.childNodes[o] -if(1==a.nodeType)for(var l=a.getClientRects(),c=0;c<l.length;c++){var h=l[c] -if(w(n,h))return t(a,n,h)}if((o=(o+1)%i)==s)break}return e}(t.dom,e,p)))return null}h=function(t,e){var n=t.parentNode -return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}(h,e),n&&(n==t.dom&&r==n.childNodes.length-1&&1==n.lastChild.nodeType&&e.top>n.lastChild.getBoundingClientRect().bottom?c=t.state.doc.content.size:0!=r&&1==n.nodeType&&"BR"==n.childNodes[r-1].nodeName||(c=function(t,e,n,r){for(var i=-1,s=e;s!=t.dom;){var o=t.docView.nearestDesc(s,!0) -if(!o)return null -if(o.node.isBlock&&o.parent){var a=o.dom.getBoundingClientRect() -if(a.left>r.left||a.top>r.top)i=o.posBefore -else{if(!(a.right<r.left||a.bottom<r.top))break -i=o.posAfter}}s=o.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n)}(t,n,r,e))),null==c&&(c=function(t,e,n){var r=k(e,n),i=r.node,s=r.offset,o=-1 -if(1==i.nodeType&&!i.firstChild){var a=i.getBoundingClientRect() -o=a.left!=a.right&&n.left>(a.left+a.right)/2?1:-1}return t.docView.posFromDOM(i,s,o)}(t,h,e)) -var u=t.docView.nearestDesc(h,!0) -return{pos:c,inside:u?u.posAtStart-u.border:-1}}function S(t,e){var n=t.getClientRects() -return n.length?n[e<0?0:n.length-1]:t.getBoundingClientRect()}function C(t,e){var r=t.docView.domFromPos(e),i=r.node,s=r.offset -if(3==i.nodeType&&(n.chrome||n.gecko)){var o=S(h(i,s,s),0) -if(n.gecko&&s&&/\s/.test(i.nodeValue[s-1])&&s<i.nodeValue.length){var a=S(h(i,s-1,s-1),-1) -if(Math.abs(a.left-o.left)<1&&a.top==o.top){var l=S(h(i,s,s+1),-1) -return M(l,l.left<a.left)}}return o}if(1==i.nodeType&&!t.state.doc.resolve(e).parent.inlineContent){var c,p=!0 -if(s<i.childNodes.length){var u=i.childNodes[s] -1==u.nodeType&&(c=u.getBoundingClientRect())}if(!c&&s){var d=i.childNodes[s-1] -1==d.nodeType&&(c=d.getBoundingClientRect(),p=!1)}return function(t,e){if(0==t.height)return t -var n=e?t.top:t.bottom -return{top:n,bottom:n,left:t.left,right:t.right}}(c||parent.getBoundingClientRect(),p)}for(var m=-1;m<2;m+=2)if(m<0&&s){var g=void 0,v=3==i.nodeType?h(i,s-1,s):3==(g=i.childNodes[s-1]).nodeType?h(g):1==g.nodeType&&"BR"!=g.nodeName?g:null -if(v){var y=S(v,1) -if(y.top<y.bottom)return M(y,!1)}}else if(m>0&&s<f(i)){var b=void 0,k=3==i.nodeType?h(i,s,s+1):3==(b=i.childNodes[s]).nodeType?h(b):1==b.nodeType?b:null -if(k){var w=S(k,-1) -if(w.top<w.bottom)return M(w,!0)}}return M(S(3==i.nodeType?h(i):i,0),!1)}function M(t,e){if(0==t.width)return t -var n=e?t.left:t.right -return{top:t.top,bottom:t.bottom,left:n,right:n}}function O(t,e,n){var r=t.state,i=t.root.activeElement -r==e&&t.inDOMChange||t.updateState(e),i!=t.dom&&t.focus() -try{return n()}finally{r!=e&&t.updateState(r),i!=t.dom&&i.focus()}}var E=/[\u0590-\u08ac]/ -var T=null,A=null,N=!1 -function D(t,e,n){return T==e&&A==n?N:(T=e,A=n,N="up"==n||"down"==n?function(t,e,n){var r=e.selection,i="up"==n?r.$anchor.min(r.$head):r.$anchor.max(r.$head) -return O(t,e,function(){for(var e=t.docView.domFromPos(i.pos).node;;){var r=t.docView.nearestDesc(e,!0) -if(!r)break -if(r.node.isBlock){e=r.dom -break}e=r.dom.parentNode}for(var s=C(t,i.pos),o=e.firstChild;o;o=o.nextSibling){var a=void 0 -if(1==o.nodeType)a=o.getClientRects() -else{if(3!=o.nodeType)continue -a=h(o,0,o.nodeValue.length).getClientRects()}for(var l=0;l<a.length;l++){var c=a[l] -if(c.bottom>c.top&&("up"==n?c.bottom<s.top+1:c.top>s.bottom-1))return!1}}return!0})}(t,e,n):function(t,e,n){var r=e.selection.$head -if(!r.parent.isTextblock)return!1 -var i=r.parentOffset,s=!i,o=i==r.parent.content.size,a=getSelection() -return E.test(r.parent.textContent)&&a.modify?O(t,e,function(){var e=a.getRangeAt(0),i=a.focusNode,s=a.focusOffset -a.modify("move",n,"character") -var o=!(r.depth?t.docView.domAfterPos(r.before()):t.dom).contains(1==a.focusNode.nodeType?a.focusNode:a.focusNode.parentNode)||i==a.focusNode&&s==a.focusOffset -return a.removeAllRanges(),a.addRange(e),o}):"left"==n||"backward"==n?s:o}(t,e,n))}var _=function(t,e,n,r){this.parent=t,this.children=e,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},R={beforePosition:{},size:{},border:{},posBefore:{},posAtStart:{},posAfter:{},posAtEnd:{},contentLost:{}} -_.prototype.matchesWidget=function(){return!1},_.prototype.matchesMark=function(){return!1},_.prototype.matchesNode=function(){return!1},_.prototype.matchesHack=function(){return!1},R.beforePosition.get=function(){return!1},_.prototype.parseRule=function(){return null},_.prototype.stopEvent=function(){return!1},R.size.get=function(){for(var t=0,e=0;e<this.children.length;e++)t+=this.children[e].size -return t},R.border.get=function(){return 0},_.prototype.destroy=function(){this.parent=null,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=null) -for(var t=0;t<this.children.length;t++)this.children[t].destroy()},_.prototype.posBeforeChild=function(t){for(var e=0,n=this.posAtStart;e<this.children.length;e++){var r=this.children[e] -if(r==t)return n -n+=r.size}},R.posBefore.get=function(){return this.parent.posBeforeChild(this)},R.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},R.posAfter.get=function(){return this.posBefore+this.size},R.posAtEnd.get=function(){return this.posAtStart+this.size-2*this.border},_.prototype.localPosFromDOM=function(t,e,n){var r -if(this.contentDOM&&this.contentDOM.contains(1==t.nodeType?t:t.parentNode)){if(n<0){var i,s -if(t==this.contentDOM)i=t.childNodes[e-1] -else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode -i=t.previousSibling}for(;i&&(!(s=i.pmViewDesc)||s.parent!=this);)i=i.previousSibling -return i?this.posBeforeChild(s)+s.size:this.posAtStart}var o,a -if(t==this.contentDOM)o=t.childNodes[e] -else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode -o=t.nextSibling}for(;o&&(!(a=o.pmViewDesc)||a.parent!=this);)o=o.nextSibling -return o?this.posBeforeChild(a):this.posAtEnd}if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&t.compareDocumentPosition(this.contentDOM) -else if(this.dom.firstChild){if(0==e)for(var l=t;;l=l.parentNode){if(l==this.dom){r=!1 -break}if(l.parentNode.firstChild!=l)break}if(null==r&&e==t.childNodes.length)for(var c=t;;c=c.parentNode){if(c==this.dom){r=!0 -break}if(c.parentNode.lastChild!=c)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart},_.prototype.nearestDesc=function(t,e){for(var n=!0,r=t;r;r=r.parentNode){var i=this.getDesc(r) -if(i&&(!e||i.node)){if(!n||!i.nodeDOM||(1==i.nodeDOM.nodeType?i.nodeDOM.contains(t):i.nodeDOM==t))return i -n=!1}}},_.prototype.getDesc=function(t){for(var e=t.pmViewDesc,n=e;n;n=n.parent)if(n==this)return e},_.prototype.posFromDOM=function(t,e,n){for(var r=t;;r=r.parentNode){var i=this.getDesc(r) -if(i)return i.localPosFromDOM(t,e,n)}},_.prototype.descAt=function(t){for(var e=0,n=0;e<this.children.length;e++){var r=this.children[e],i=n+r.size -if(n==t&&i!=n){for(;!r.border&&r.children.length;)r=r.children[0] -return r}if(t<i)return r.descAt(t-n-r.border) -n=i}},_.prototype.domFromPos=function(t){if(!this.contentDOM)return{node:this.dom,offset:0} -for(var e=0,n=0;;n++){if(e==t){for(;n<this.children.length&&this.children[n].beforePosition;)n++ -return{node:this.contentDOM,offset:n}}if(n==this.children.length)throw new Error("Invalid position "+t) -var r=this.children[n],i=e+r.size -if(t<i)return r.domFromPos(t-e-r.border) -e=i}},_.prototype.parseRange=function(t,e,n){if(void 0===n&&(n=0),0==this.children.length)return{node:this.contentDOM,from:t,to:e,fromOffset:0,toOffset:this.contentDOM.childNodes.length} -for(var r=-1,i=-1,s=0,o=0;;o++){var a=this.children[o],c=s+a.size -if(-1==r&&t<=c){var h=s+a.border -if(t>=h&&e<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(t-h,e-h,n+h) -t=n+s -for(var p=o;p>0;p--){var u=this.children[p-1] -if(u.size&&u.dom.parentNode==this.contentDOM&&!u.emptyChildAt(1)){r=l(u.dom)+1 -break}t-=u.size}-1==r&&(r=0)}if(r>-1&&e<=c){e=n+c -for(var d=o+1;d<this.children.length;d++){var f=this.children[d] -if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){i=l(f.dom) -break}e+=f.size}-1==i&&(i=this.contentDOM.childNodes.length) -break}s=c}return{node:this.contentDOM,from:t,to:e,fromOffset:r,toOffset:i}},_.prototype.emptyChildAt=function(t){if(this.border||!this.contentDOM||!this.children.length)return!1 -var e=this.children[t<0?0:this.children.length-1] -return 0==e.size||e.emptyChildAt(t)},_.prototype.domAfterPos=function(t){var e=this.domFromPos(t),n=e.node,r=e.offset -if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+t) -return n.childNodes[r]},_.prototype.setSelection=function(t,e,n,r){for(var i=Math.min(t,e),s=Math.max(t,e),o=0,a=0;o<this.children.length;o++){var l=this.children[o],c=a+l.size -if(i>a&&s<c)return l.setSelection(t-a-l.border,e-a-l.border,n,r) -a=c}var h=this.domFromPos(t),u=this.domFromPos(e),d=n.getSelection(),f=document.createRange() -if(r||!p(h.node,h.offset,d.anchorNode,d.anchorOffset)||!p(u.node,u.offset,d.focusNode,d.focusOffset)){if(d.extend)f.setEnd(h.node,h.offset),f.collapse(!1) -else{if(t>e){var m=h -h=u,u=m}f.setEnd(u.node,u.offset),f.setStart(h.node,h.offset)}d.removeAllRanges(),d.addRange(f),d.extend&&d.extend(u.node,u.offset)}},_.prototype.ignoreMutation=function(t){return!this.contentDOM},R.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},_.prototype.markDirty=function(t,e){for(var n=0,r=0;r<this.children.length;r++){var i=this.children[r],s=n+i.size -if(n==s?t<=s&&e>=n:t<s&&e>n){var o=n+i.border,a=s-i.border -if(t>=o&&e<=a)return this.dirty=t==n||e==s?2:1,void(t==o&&e==a&&i.contentLost?i.dirty=3:i.markDirty(t-o,e-o)) -i.dirty=3}n=s}this.dirty=2},Object.defineProperties(_.prototype,R) -var I=[],B=function(t){function e(e,n,r,i){var s,o=n.type.toDOM -if("function"==typeof o&&(o=o(r,function(){return s?s.parent?s.parent.posBeforeChild(s):void 0:i})),!n.type.spec.raw){if(1!=o.nodeType){var a=document.createElement("span") -a.appendChild(o),o=a}o.contentEditable=!1,o.classList.add("ProseMirror-widget")}t.call(this,e,I,o,null),this.widget=n,s=this}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e -var n={beforePosition:{}} -return n.beforePosition.get=function(){return this.widget.type.side<0},e.prototype.matchesWidget=function(t){return 0==this.dirty&&t.type.eq(this.widget.type)},e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.stopEvent=function(t){var e=this.widget.spec.stopEvent -return!!e&&e(t)},Object.defineProperties(e.prototype,n),e}(_),z=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parseRule=function(){for(var e,n=this.dom.firstChild;n;n=n.nextSibling){var r=void 0 -if(3==n.nodeType){var i=n.nodeValue.replace(/\ufeff/g,"") -if(!i)continue -r=document.createTextNode(i)}else{if("\ufeff"==n.textContent)continue -r=n.cloneNode(!0)}e||(e=document.createDocumentFragment()),e.appendChild(r)}return e?{skip:e}:t.prototype.parseRule.call(this)},e.prototype.ignoreMutation=function(){return!1},e}(B),P=function(t){function e(e,n,r,i){t.call(this,e,[],r,i),this.mark=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.create=function(t,n,r,i){var s=i.nodeViews[n.type.name],o=s&&s(n,i,r) -return o&&o.dom||(o=ls.DOMSerializer.renderSpec(document,n.type.spec.toDOM(n,r))),new e(t,n,o.dom,o.contentDOM||o.dom)},e.prototype.parseRule=function(){return{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}},e.prototype.matchesMark=function(t){return 3!=this.dirty&&this.mark.eq(t)},e.prototype.markDirty=function(e,n){if(t.prototype.markDirty.call(this,e,n),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent -r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}},e}(_),F=function(t){function e(e,n,r,i,s,o,a,l,c){t.call(this,e,n.isLeaf?I:[],s,o),this.nodeDOM=a,this.node=n,this.outerDeco=r,this.innerDeco=i,o&&this.updateChildren(l,c)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e -var r={size:{},border:{}} -return e.create=function(t,n,r,i,s,o){var a,l=s.nodeViews[n.type.name],c=l&&l(n,s,function(){return a?a.parent?a.parent.posBeforeChild(a):void 0:o},r),h=c&&c.dom,p=c&&c.contentDOM -if(n.isText)if(h){if(3!=h.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else h=document.createTextNode(n.text) -else if(!h){var u -h=(u=ls.DOMSerializer.renderSpec(document,n.type.spec.toDOM(n))).dom,p=u.contentDOM}p||n.isText||"BR"==h.nodeName||(h.hasAttribute("contenteditable")||(h.contentEditable=!1),n.type.spec.draggable&&(h.draggable=!0)) -var d=h -return h=K(h,r,n),c?a=new $(t,n,r,i,h,p,d,c,s,o+1):n.isText?new L(t,n,r,i,h,d,s):new e(t,n,r,i,h,p,d,s,o+1)},e.prototype.parseRule=function(){var t=this -if(this.node.type.spec.reparseInView)return null -var e={node:this.node.type.name,attrs:this.node.attrs} -return this.node.type.spec.code&&(e.preserveWhitespace="full"),this.contentDOM&&!this.contentLost?e.contentElement=this.contentDOM:e.getContent=function(){return t.contentDOM?ls.Fragment.empty:t.node.content},e},e.prototype.matchesNode=function(t,e,n){return 0==this.dirty&&t.eq(this.node)&&G(e,this.outerDeco)&&n.eq(this.innerDeco)},r.size.get=function(){return this.node.nodeSize},r.border.get=function(){return this.node.isLeaf?0:1},e.prototype.updateChildren=function(t,e){var n=this,r=new X(this),i=this.node.inlineContent;(function(t,e,n,r){var i=e.locals(t),s=0 -if(0==i.length){for(var o=0;o<t.childCount;o++){var a=t.child(o) -r(a,i,e.forChild(s,a),o),s+=a.nodeSize}return}for(var l=0,c=[],h=null,p=0;;){if(l<i.length&&i[l].to==s){for(var u=i[l++],d=void 0;l<i.length&&i[l].to==s;)(d||(d=[u])).push(i[l++]) -if(d){d.sort(Q) -for(var f=0;f<d.length;f++)n(d[f],p)}else n(u,p)}var m=void 0,g=void 0 -if(h)g=-1,m=h,h=null -else{if(!(p<t.childCount))break -g=p,m=t.child(p++)}for(var v=0;v<c.length;v++)c[v].to<=s&&c.splice(v--,1) -for(;l<i.length&&i[l].from==s;)c.push(i[l++]) -var y=s+m.nodeSize -if(m.isText){var b=y -l<i.length&&i[l].from<b&&(b=i[l].from) -for(var k=0;k<c.length;k++)c[k].to<b&&(b=c[k].to) -b<y&&(h=m.cut(b-s),m=m.cut(0,b-s),y=b,g=-1)}r(m,c.length?c.slice():I,e.forChild(s,m),g),s=y}})(this.node,this.innerDeco,function(s,o){s.spec.marks?r.syncToMarks(s.spec.marks,i,t):s.type.side>=0&&r.syncToMarks(o==n.node.childCount?ls.Mark.none:n.node.child(o).marks,i,t),r.placeWidget(s,t,e)},function(n,s,o,a){r.syncToMarks(n.marks,i,t),r.findNodeMatch(n,s,o,a)||r.updateNextNode(n,s,o,t,a)||r.addNode(n,s,o,t,e),e+=n.nodeSize}),r.syncToMarks(I,i,t),this.node.isTextblock&&r.addTextblockHacks(),r.destroyRest(),(r.changed||2==this.dirty)&&this.renderChildren()},e.prototype.renderChildren=function(){(function t(e,n){var r=e.firstChild -for(var i=0;i<n.length;i++){var s=n[i],o=s.dom -if(o.parentNode==e){for(;o!=r;)r=Y(r) -r=r.nextSibling}else e.insertBefore(o,r) -if(s instanceof P){var a=r?r.previousSibling:e.lastChild -t(s.contentDOM,s.children),r=a?a.nextSibling:e.firstChild}}for(;r;)r=Y(r)})(this.contentDOM,this.children,e.is),n.ios&&function(t){if("UL"==t.nodeName||"OL"==t.nodeName){var e=t.style.cssText -t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}(this.dom)},e.prototype.update=function(t,e,n,r){return!(3==this.dirty||!t.sameMarkup(this.node))&&(this.updateInner(t,e,n,r),!0)},e.prototype.updateInner=function(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0},e.prototype.updateOuterDeco=function(t){if(!G(t,this.outerDeco)){var e=1!=this.nodeDOM.nodeType,n=this.dom -this.dom=J(this.dom,this.nodeDOM,q(this.outerDeco,this.node,e),q(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=t}},e.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},e.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!1)},Object.defineProperties(e.prototype,r),e}(_) -function V(t,e,n,r,i){return K(r,e,t),new F(null,t,e,n,r,r,r,i,0)}var L=function(t){function e(e,n,r,i,s,o,a){t.call(this,e,n,r,i,s,null,o,a)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parseRule=function(){var t=this.nodeDOM.parentNode -return t?{skip:t}:{ignore:!0}},e.prototype.update=function(t,e){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),0==this.dirty&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text),this.node=t,this.dirty=0,!0)},e.prototype.inParent=function(){for(var t=this.parent.contentDOM,e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0 -return!1},e.prototype.domFromPos=function(t){return{node:this.nodeDOM,offset:t}},e.prototype.localPosFromDOM=function(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):t.prototype.localPosFromDOM.call(this,e,n,r)},e.prototype.ignoreMutation=function(t){return"characterData"!=t.type},e}(F),j=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.matchesHack=function(){return 0==this.dirty},e}(_),$=function(t){function e(e,n,r,i,s,o,a,l,c,h){t.call(this,e,n,r,i,s,o,a,c,h),this.spec=l}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(e,n,r,i){if(3==this.dirty)return!1 -if(this.spec.update){var s=this.spec.update(e,n) -return s&&this.updateInner(e,n,r,i),s}return!(!this.contentDOM&&!e.isLeaf)&&t.prototype.update.call(this,e,n,r,i)},e.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():t.prototype.selectNode.call(this)},e.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():t.prototype.deselectNode.call(this)},e.prototype.setSelection=function(e,n,r,i){this.spec.setSelection?this.spec.setSelection(e,n,r):t.prototype.setSelection.call(this,e,n,r,i)},e.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),t.prototype.destroy.call(this)},e.prototype.stopEvent=function(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)},e.prototype.ignoreMutation=function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):t.prototype.ignoreMutation.call(this,e)},e}(F) -function H(t){t&&(this.nodeName=t)}H.prototype=Object.create(null) -var U=[new H] -function q(t,e,n){if(0==t.length)return U -for(var r=n?U[0]:new H,i=[r],s=0;s<t.length;s++){var o=t[s].type.attrs,a=r -if(o)for(var l in o.nodeName&&i.push(a=new H(o.nodeName)),o){var c=o[l] -null!=c&&(n&&1==i.length&&i.push(a=r=new H(e.isInline?"span":"div")),"class"==l?a.class=(a.class?a.class+" ":"")+c:"style"==l?a.style=(a.style?a.style+";":"")+c:"nodeName"!=l&&(a[l]=c))}}return i}function J(t,e,n,r){if(n==U&&r==U)return e -for(var i=e,s=0;s<r.length;s++){var o=r[s],a=n[s] -if(s){var l=void 0 -a&&a.nodeName==o.nodeName&&i!=t&&(l=e.parentNode)&&l.tagName.toLowerCase()==o.nodeName?i=l:((l=document.createElement(o.nodeName)).appendChild(i),i=l)}W(i,a||U[0],o)}return i}function W(t,e,n){for(var r in e)"class"==r||"style"==r||"nodeName"==r||r in n||t.removeAttribute(r) -for(var i in n)"class"!=i&&"style"!=i&&"nodeName"!=i&&n[i]!=e[i]&&t.setAttribute(i,n[i]) -if(e.class!=n.class){for(var s=e.class?e.class.split(" "):I,o=n.class?n.class.split(" "):I,a=0;a<s.length;a++)-1==o.indexOf(s[a])&&t.classList.remove(s[a]) -for(var l=0;l<o.length;l++)-1==s.indexOf(o[l])&&t.classList.add(o[l])}if(e.style!=n.style){if(e.style)for(var c,h=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;c=h.exec(e.style);)t.style[c[1].toLowerCase()]="" -n.style&&(t.style.cssText+=n.style)}}function K(t,e,n){return J(t,t,U,q(e,n,1!=t.nodeType))}function G(t,e){if(t.length!=e.length)return!1 -for(var n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1 -return!0}function Y(t){var e=t.nextSibling -return t.parentNode.removeChild(t),e}var X=function(t){this.top=t,this.index=0,this.stack=[],this.changed=!1 -var e=function(t,e){for(var n=[],r=t.childCount,i=e.length-1;r>0&&i>=0;i--){var s=e[i],o=s.node -if(o){if(o!=t.child(r-1))break -n.push(s),--r}}return{nodes:n.reverse(),offset:r}}(t.node.content,t.children) -this.preMatched=e.nodes,this.preMatchOffset=e.offset} -function Q(t,e){return t.type.side-e.type.side}function Z(t,e){var n=t.selection,r=n.$anchor,i=n.$head,s=e>0?r.max(i):r.min(i),o=s.parent.inlineContent?s.depth?t.doc.resolve(e>0?s.after():s.before()):null:s -return o&&ms.Selection.findFrom(o,e)}function tt(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function et(t,e,n){var r=t.state.selection -if(r instanceof ms.TextSelection){if(!r.empty||n.indexOf("s")>-1)return!1 -if(t.endOfTextblock(e>0?"right":"left")){var i=Z(t.state,e) -return!!(i&&i instanceof ms.NodeSelection)&&tt(t,i)}var s,o=r.$head,a=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter -if(a&&ms.NodeSelection.isSelectable(a)){var l=e<0?o.pos-a.nodeSize:o.pos -if(a.isAtom||(s=t.docView.descAt(l))&&!s.contentDOM)return tt(t,new ms.NodeSelection(e<0?t.state.doc.resolve(o.pos-a.nodeSize):o))}return!1}if(r instanceof ms.NodeSelection&&r.node.isInline)return tt(t,new ms.TextSelection(e>0?r.$to:r.$from)) -var c=Z(t.state,e) -return!!c&&tt(t,c)}function nt(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function rt(t){var e=t.pmViewDesc -return e&&0==e.size&&(t.nextSibling||"BR"!=t.nodeName)}function it(t){var e=t.root.getSelection(),r=e.focusNode,i=e.focusOffset -if(r){var s,o,a=!1 -for(n.gecko&&1==r.nodeType&&i<nt(r)&&rt(r.childNodes[i])&&(a=!0);;)if(i>0)if(1!=r.nodeType){if(3!=r.nodeType||"\ufeff"!=r.nodeValue.charAt(i-1))break -n.ie&&n.ie_version<=11&&(a=!0),s=r,o=--i}else{var c=r.childNodes[i-1] -if(rt(c))s=r,o=--i -else{if(3!=c.nodeType)break -i=(r=c).nodeValue.length}}else{if(ot(r))break -for(var h=r.previousSibling;h&&rt(h);)s=r.parentNode,o=l(h),h=h.previousSibling -if(h)i=nt(r=h) -else{if((r=r.parentNode)==t.dom)break -i=0}}a?at(t,e,r,i):s&&at(t,e,s,o)}}function st(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset -if(n){for(var i,s,o=nt(n);;)if(r<o){if(1!=n.nodeType)break -if(!rt(n.childNodes[r]))break -i=n,s=++r}else{if(ot(n))break -for(var a=n.nextSibling;a&&rt(a);)i=a.parentNode,s=l(a)+1,a=a.nextSibling -if(a)r=0,o=nt(n=a) -else{if((n=n.parentNode)==t.dom)break -r=o=0}}i&&at(t,e,i,s)}}function ot(t){var e=t.pmViewDesc -return e&&e.node&&e.node.isBlock}function at(t,e,n,r){if(m(e)){var i=document.createRange() -i.setEnd(n,r),i.setStart(n,r),e.removeAllRanges(),e.addRange(i)}else e.extend&&e.extend(n,r) -t.selectionReader.storeDOMState(t.selection)}function lt(t,e,n){var r=t.state.selection -if(r instanceof ms.TextSelection&&!r.empty||n.indexOf("s")>-1)return!1 -var i=r.$from,s=r.$to -if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){var o=Z(t.state,e) -if(o&&o instanceof ms.NodeSelection)return tt(t,o)}if(!i.parent.inlineContent){var a=ms.Selection.findFrom(e<0?i:s,e) -return!a||tt(t,a)}return!1}function ct(t,e){if(!(t.state.selection instanceof ms.TextSelection))return!0 -var n=t.state.selection,r=n.$head,i=n.$anchor,s=n.empty -if(!r.sameParent(i))return!0 -if(!s)return!1 -if(t.endOfTextblock(e>0?"forward":"backward"))return!0 -var o=!r.textOffset&&(e<0?r.nodeBefore:r.nodeAfter) -if(o&&!o.isText){var a=t.state.tr -return e<0?a.delete(r.pos-o.nodeSize,r.pos):a.delete(r.pos,r.pos+o.nodeSize),t.dispatch(a),!0}return!1}function ht(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function pt(t,e){var r=e.keyCode,i=function(t){var e="" -return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}(e) -return 8==r||n.mac&&72==r&&"c"==i?ct(t,-1)||it(t):46==r||n.mac&&68==r&&"c"==i?ct(t,1)||st(t):13==r||27==r||(37==r?et(t,-1,i)||it(t):39==r?et(t,1,i)||st(t):38==r?lt(t,-1,i)||it(t):40==r?function(t){if(n.chrome&&!(t.state.selection.$head.parentOffset>0)){var e=t.root.getSelection(),r=e.focusNode,i=e.focusOffset -if(r&&1==r.nodeType&&0==i&&r.firstChild&&"false"==r.firstChild.contentEditable){var s=r.firstChild -ht(t,s,!0),setTimeout(function(){return ht(t,s,!1)},20)}}}(t)||lt(t,1,i)||st(t):i==(n.mac?"m":"c")&&(66==r||73==r||89==r||90==r))}X.prototype.getPreMatch=function(t){return t>=this.preMatchOffset?this.preMatched[t-this.preMatchOffset]:null},X.prototype.destroyBetween=function(t,e){if(t!=e){for(var n=t;n<e;n++)this.top.children[n].destroy() -this.top.children.splice(t,e-t),this.changed=!0}},X.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},X.prototype.syncToMarks=function(t,e,n){for(var r=0,i=this.stack.length>>1,s=Math.min(i,t.length);r<s&&(r==i-1?this.top:this.stack[r+1<<1]).matchesMark(t[r])&&!1!==t[r].type.spec.spanning;)r++ -for(;r<i;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),i-- -for(;i<t.length;){this.stack.push(this.top,this.index+1) -for(var o=-1,a=this.index;a<Math.min(this.index+3,this.top.children.length);a++)if(this.top.children[a].matchesMark(t[i])){o=a -break}if(o>-1)o>this.index&&(this.changed=!0,this.top.children.splice(this.index,o-this.index)),this.top=this.top.children[this.index] -else{var l=P.create(this.top,t[i],e,n) -this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}},X.prototype.findNodeMatch=function(t,e,n,r){var i=-1,s=r<0?void 0:this.getPreMatch(r),o=this.top.children -if(s&&s.matchesNode(t,e,n))i=o.indexOf(s) -else for(var a=this.index,l=Math.min(o.length,a+5);a<l;a++){var c=o[a] -if(c.matchesNode(t,e,n)&&this.preMatched.indexOf(c)<0){i=a -break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)},X.prototype.updateNextNode=function(t,e,n,r,i){if(this.index==this.top.children.length)return!1 -var s=this.top.children[this.index] -if(s instanceof F){var o=this.preMatched.indexOf(s) -if(o>-1&&o+this.preMatchOffset!=i)return!1 -var a=s.dom -if(s.update(t,e,n,r))return s.dom!=a&&(this.changed=!0),this.index++,!0}return!1},X.prototype.addNode=function(t,e,n,r,i){this.top.children.splice(this.index++,0,F.create(this.top,t,e,n,r,i)),this.changed=!0},X.prototype.placeWidget=function(t,e,n){if(this.index<this.top.children.length&&this.top.children[this.index].matchesWidget(t))this.index++ -else{var r=new(t.spec.isCursorWrapper?z:B)(this.top,t,e,n) -this.top.children.splice(this.index++,0,r),this.changed=!0}},X.prototype.addTextblockHacks=function(){for(var t=this.top.children[this.index-1];t instanceof P;)t=t.children[t.children.length-1] -if(!t||!(t instanceof L)||/\n$/.test(t.node.text))if(this.index<this.top.children.length&&this.top.children[this.index].matchesHack())this.index++ -else{var e=document.createElement("br") -this.top.children.splice(this.index++,0,new j(this.top,I,e,null)),this.changed=!0}} -var ut=function(t,e,n){this.prev=t,this.mapping=e,this.state=n},dt=function(t){this.seen=[new ut(null,null,t)],ms.EditorState.addApplyListener(this.track=this.track.bind(this))} -dt.prototype.destroy=function(){ms.EditorState.removeApplyListener(this.track)},dt.prototype.find=function(t){for(var e=this.seen.length-1;e>=0;e--){var n=this.seen[e] -if(n.state==t)return n}},dt.prototype.track=function(t,e,n){var r=this.seen.length<200?this.find(t):null -r&&this.seen.push(new ut(r,e.docChanged?e.mapping:null,n))},dt.prototype.getMapping=function(t,e){var n=this.find(t) -if(!n)return null -for(var r=[],i=n;i;i=i.prev)i.mapping&&r.push(i.mapping) -for(var s=e||new hs.Mapping,o=r.length-1;o>=0;o--)s.appendMapping(r[o]) -return s} -var ft=function(t){var e=this -this.view=t,this.lastAnchorNode=this.lastHeadNode=this.lastAnchorOffset=this.lastHeadOffset=null,this.lastSelection=t.state.selection,this.ignoreUpdates=!1,this.suppressUpdates=!1,this.poller=new("onselectionchange"in document?mt:gt)(this),this.focusFunc=function(){return e.poller.start(St(e.view))}.bind(this),this.blurFunc=this.poller.stop,t.dom.addEventListener("focus",this.focusFunc),t.dom.addEventListener("blur",this.blurFunc),t.editable||this.poller.start(!1)} -ft.prototype.destroy=function(){this.view.dom.removeEventListener("focus",this.focusFunc),this.view.dom.removeEventListener("blur",this.blurFunc),this.poller.stop()},ft.prototype.poll=function(t){this.poller.poll(t)},ft.prototype.editableChanged=function(){this.view.editable?St(this.view)||this.poller.stop():this.poller.start()},ft.prototype.domChanged=function(){var t=this.view.root.getSelection() -return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastHeadNode||t.focusOffset!=this.lastHeadOffset},ft.prototype.storeDOMState=function(t){var e=this.view.root.getSelection() -this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastHeadNode=e.focusNode,this.lastHeadOffset=e.focusOffset,this.lastSelection=t},ft.prototype.clearDOMState=function(){this.lastAnchorNode=this.lastSelection=null},ft.prototype.readFromDOM=function(t){if(!this.ignoreUpdates&&this.domChanged()&&St(this.view)){if(this.suppressUpdates)return vt(this.view) -if(this.view.inDOMChange||this.view.domObserver.flush(),!this.view.inDOMChange){var e,n,r=this.view.root.getSelection(),i=this.view.state.doc,s=this.view.docView.nearestDesc(r.focusNode),o=s&&0==s.size,a=this.view.docView.posFromDOM(r.focusNode,r.focusOffset),l=i.resolve(a) -if(m(r)){for(e=l;s&&!s.node;)s=s.parent -if(s&&s.node.isAtom&&ms.NodeSelection.isSelectable(s.node)&&s.parent){var c=s.posBefore -n=new ms.NodeSelection(a==c?l:i.resolve(c))}}else e=i.resolve(this.view.docView.posFromDOM(r.anchorNode,r.anchorOffset)) -if(!n){var h="pointer"==t||this.view.state.selection.head<l.pos&&!o?1:-1 -n=xt(this.view,e,l,h)}if(this.view.state.selection.eq(n))vt(this.view) -else{var p=this.view.state.tr.setSelection(n) -"pointer"==t?p.setMeta("pointer",!0):"key"==t&&p.scrollIntoView(),this.view.dispatch(p)}}}} -var mt=function(t){var e=this -this.listening=!1,this.curOrigin=null,this.originTime=0,this.reader=t,this.readFunc=function(){return t.readFromDOM(e.originTime>Date.now()-50?e.curOrigin:null)}} -mt.prototype.poll=function(t){this.curOrigin=t,this.originTime=Date.now()},mt.prototype.start=function(t){this.listening||(this.reader.view.dom.ownerDocument.addEventListener("selectionchange",this.readFunc),this.listening=!0,t&&this.readFunc())},mt.prototype.stop=function(){this.listening&&(this.reader.view.dom.ownerDocument.removeEventListener("selectionchange",this.readFunc),this.listening=!1)} -var gt=function(t){this.polling=null,this.reader=t,this.pollFunc=this.doPoll.bind(this,null)} -function vt(t,e,r){var i=t.state.selection -if(kt(t,i),t.editable&&!t.hasFocus()){if(!e)return -n.gecko&&n.gecko_version<=55&&(t.selectionReader.ignoreUpdates=!0,t.dom.focus(),t.selectionReader.ignoreUpdates=!1)}else if(!t.editable&&!Ct(t)&&!e)return -var s=t.selectionReader -if(!s.lastSelection||!s.lastSelection.eq(i)||s.domChanged()){if(s.ignoreUpdates=!0,t.cursorWrapper)(function(t){var e=t.root.getSelection(),r=document.createRange(),i=t.cursorWrapper.dom -r.setEnd(i,i.childNodes.length),r.collapse(!1),e.removeAllRanges(),e.addRange(r),!t.state.selection.visible&&n.ie&&n.ie_version<=11&&(i.disabled=!0,i.disabled=!1)})(t) -else{var o,a,l=i.anchor,c=i.head -!yt||i instanceof ms.TextSelection||(i.$from.parent.inlineContent||(o=bt(t,i.from)),i.empty||i.$from.parent.inlineContent||(a=bt(t,i.to))),t.docView.setSelection(l,c,t.root,r),yt&&(o&&(o.contentEditable="false"),a&&(a.contentEditable="false")),i.visible?t.dom.classList.remove("ProseMirror-hideselection"):l!=c&&(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(t){var e=t.dom.ownerDocument -e.removeEventListener("selectionchange",t.hideSelectionGuard) -var n=t.root.getSelection(),r=n.anchorNode,i=n.anchorOffset -e.addEventListener("selectionchange",t.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==i||(e.removeEventListener("selectionchange",t.hideSelectionGuard),t.dom.classList.remove("ProseMirror-hideselection"))})}(t))}s.storeDOMState(i),s.ignoreUpdates=!1}}gt.prototype.doPoll=function(t){var e=this.reader.view -e.focused||!e.editable?(this.reader.readFromDOM(t),this.polling=setTimeout(this.pollFunc,100)):this.polling=null},gt.prototype.poll=function(t){clearTimeout(this.polling),this.polling=setTimeout(t?this.doPoll.bind(this,t):this.pollFunc,0)},gt.prototype.start=function(){null==this.polling&&this.poll()},gt.prototype.stop=function(){clearTimeout(this.polling),this.polling=null} -var yt=n.safari||n.chrome&&n.chrome_version<63 -function bt(t,e){var n=t.docView.domFromPos(e),r=n.node,i=n.offset,s=i<r.childNodes.length?r.childNodes[i]:null,o=i?r.childNodes[i-1]:null -if(!(s&&"false"!=s.contentEditable||o&&"false"!=o.contentEditable)){if(s)return s.contentEditable="true",s -if(o)return o.contentEditable="true",o}}function kt(t,e){if(e instanceof ms.NodeSelection){var n=t.docView.descAt(e.from) -n!=t.lastSelectedViewDesc&&(wt(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else wt(t)}function wt(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=null)}function xt(t,e,n,r){return t.someProp("createSelectionBetween",function(r){return r(t,e,n)})||ms.TextSelection.between(e,n,r)}function St(t){return(!t.editable||t.root.activeElement==t.dom)&&Ct(t)}function Ct(t){var e=t.root.getSelection() -if(!e.anchorNode)return!1 -try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch(n){return!1}}function Mt(t){return!1===t.type.spec.inclusive}function Ot(t){var e=t.selection,n=e.$head,r=e.$anchor,i=e.visible,s=n.pos!=r.pos||i&&!n.parent.inlineContent?null:n -return s&&(!i||t.storedMarks||0==s.parent.content.length||s.parentOffset&&!s.textOffset&&s.nodeBefore.marks.some(Mt))?s:null}var Et=function t(e,n){var r=this -this.view=e,this.state=e.state,this.composing=n,this.compositionEndedAt=null,this.from=this.to=null,this.typeOver=!1,this.timeout=n?null:setTimeout(function(){return r.finish()},t.commitTimeout),this.trackMappings=new dt(e.state),this.mapping=new hs.Mapping,this.mappingTo=e.state} -function Tt(t,e){return function(r){var i=r.pmViewDesc -if(i)return i.parseRule() -if("BR"==r.nodeName&&r.parentNode){if(n.safari&&/^(ul|ol)$/i.test(r.parentNode.nodeName))return t.matchTag(document.createElement("li"),e) -if(r.parentNode.lastChild==r||n.safari&&/^(tr|table)$/i.test(r.parentNode.nodeName))return{ignore:!0}}}}function At(t,e){for(var n=e||0;n<t.depth;n++)if(t.index(n)+1<t.node(n).childCount)return!1 -return t.parentOffset==t.parent.content.size}function Nt(t,e){for(var n=e||0;n<t.depth;n++)if(t.index(0)>0)return!1 -return 0==t.parentOffset}function Dt(t,e,n,r){return Math.max(r.anchor,r.head)>e.content.size?null:xt(t,e.resolve(n.map(r.anchor)),e.resolve(n.map(r.head)))}function _t(t,e,n){for(var r=t.depth,i=e?t.end():t.pos;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1 -if(n)for(var s=t.node(r).maybeChild(t.indexAfter(r));s&&!s.isLeaf;)s=s.firstChild,i++ -return i}function Rt(t,e){for(var n=[],r=e.content,i=e.openStart,s=e.openEnd;i>1&&s>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,s-- -var o=r.firstChild -n.push(o.type.name,o.type.hasRequiredAttrs()?o.attrs:null),r=o.content}var a=t.someProp("clipboardSerializer")||ls.DOMSerializer.fromSchema(t.state.schema),l=document.createElement("div") -l.appendChild(a.serializeFragment(r)) -for(var c,h=l.firstChild;h&&1==h.nodeType&&(c=zt[h.nodeName.toLowerCase()]);){for(var p=c.length-1;p>=0;p--){for(var u=document.createElement(c[p]);l.firstChild;)u.appendChild(l.firstChild) -l.appendChild(u)}h=l.firstChild}return h&&1==h.nodeType&&h.setAttribute("data-pm-slice",i+" "+s+" "+JSON.stringify(n)),{dom:l,text:t.someProp("clipboardTextSerializer",function(t){return t(e)})||e.content.textBetween(0,e.content.size,"\n\n")}}function It(t,e,n,r,i){var s,o,a=i.parent.type.spec.code -if(!n&&!e)return null -var l=e&&(r||a||!n) -if(l){if(t.someProp("transformPastedText",function(t){e=t(e)}),a)return new ls.Slice(ls.Fragment.from(t.state.schema.text(e)),0,0) -var c=t.someProp("clipboardTextParser",function(t){return t(e,i)}) -c?o=c:(s=document.createElement("div"),e.trim().split(/(?:\r\n?|\n)+/).forEach(function(t){s.appendChild(document.createElement("p")).textContent=t}))}else t.someProp("transformPastedHTML",function(t){n=t(n)}),s=function(t){var e=/(\s*<meta [^>]*>)*/.exec(t) -e&&(t=t.slice(e[0].length)) -var n,r=(Pt||(Pt=document.implementation.createHTMLDocument("title"))).createElement("div"),i=/(?:<meta [^>]*>)*<([a-z][^>\s]+)/i.exec(t),s=0;(n=i&&zt[i[1].toLowerCase()])&&(t=n.map(function(t){return"<"+t+">"}).join("")+t+n.map(function(t){return"</"+t+">"}).reverse().join(""),s=n.length) -r.innerHTML=t -for(var o=0;o<s;o++)r=r.firstChild -return r}(n) -var h=s&&s.querySelector("[data-pm-slice]"),p=h&&/^(\d+) (\d+) (.*)/.exec(h.getAttribute("data-pm-slice")) -if(!o){var u=t.someProp("clipboardParser")||t.someProp("domParser")||ls.DOMParser.fromSchema(t.state.schema) -o=u.parseSlice(s,{preserveWhitespace:!(!l&&!p),context:i})}return o=p?function(t,e){if(!t.size)return t -var n,r=t.content.firstChild.type.schema -try{n=JSON.parse(e)}catch(c){return t}for(var i=t.content,s=t.openStart,o=t.openEnd,a=n.length-2;a>=0;a-=2){var l=r.nodes[n[a]] -if(!l||l.hasRequiredAttrs())break -i=ls.Fragment.from(l.create(n[a+1],i)),s++,o++}return new ls.Slice(i,s,o)}(new ls.Slice(o.content,Math.min(o.openStart,+p[1]),Math.min(o.openEnd,+p[2])),p[3]):ls.Slice.maxOpen(function(t,e){if(t.childCount<2)return t -for(var n=function(n){var r=e.node(n),i=r.contentMatchAt(e.index(n)),s=void 0,o=[] -if(t.forEach(function(t){if(o){var e,n=i.findWrapping(t.type) -if(!n)return o=null -if(e=o.length&&s.length&&function t(e,n,r,i,s){if(s<e.length&&s<n.length&&e[s]==n[s]){var o=t(e,n,r,i.lastChild,s+1) -if(o)return i.copy(i.content.replaceChild(i.childCount-1,o)) -var a=i.contentMatchAt(i.childCount) -if(a.matchType(s==e.length-1?r.type:e[s+1]))return i.copy(i.content.append(ls.Fragment.from(Bt(r,e,s+1))))}}(n,s,t,o[o.length-1],0))o[o.length-1]=e -else{o.length&&(o[o.length-1]=function t(e,n){if(0==n)return e -var r=e.content.replaceChild(e.childCount-1,t(e.lastChild,n-1)) -var i=e.contentMatchAt(e.childCount).fillBefore(ls.Fragment.empty,!0) -return e.copy(r.append(i))}(o[o.length-1],s.length)) -var r=Bt(t,n) -o.push(r),i=i.matchType(r.type,r.attrs),s=n}}}),o)return{v:ls.Fragment.from(o)}},r=e.depth;r>=0;r--){var i=n(r) -if(i)return i.v}return t}(o.content,i),!1),t.someProp("transformPasted",function(t){o=t(o)}),o}function Bt(t,e,n){void 0===n&&(n=0) -for(var r=e.length-1;r>=n;r--)t=e[r].create(null,ls.Fragment.from(t)) -return t}Et.prototype.addRange=function(t,e){null==this.from?(this.from=t,this.to=e):(this.from=Math.min(t,this.from),this.to=Math.max(e,this.to))},Et.prototype.changedRange=function(){if(null==this.from)return function(t){var e=t.$anchor.min(t.$head),n=t.$anchor.max(t.$head) -if(e.sameParent(n)&&e.parent.inlineContent&&e.parentOffset&&n.parentOffset<n.parent.content.size){var r=Math.max(0,e.parentOffset),i=e.parent.content.size,s=Math.min(i,n.parentOffset) -if(r>0&&(r=e.parent.childBefore(r).offset),s<i){var o=e.parent.childAfter(s) -s=o.offset+o.node.nodeSize}var a=e.start() -return{from:a+r,to:a+s}}for(var l=0;;l++){var c=Nt(e,l+1),h=At(n,l+1) -if(c||h||e.index(l)!=n.index(l)||n.node(l).isTextblock){var p=e.before(l+1),u=n.after(l+1) -return c&&e.index(l)>0&&(p-=e.node(l).child(e.index(l)-1).nodeSize),h&&n.index(l)+1<n.node(l).childCount&&(u+=n.node(l).child(n.index(l)+1).nodeSize),{from:p,to:u}}}}(this.state.selection) -var t=this.state.doc.resolve(Math.min(this.from,this.state.selection.from)),e=this.state.doc.resolve(this.to),n=t.sharedDepth(this.to) -return{from:t.before(n+1),to:e.after(n+1)}},Et.prototype.markDirty=function(t){null==this.from?this.view.docView.markDirty((t=t||this.changedRange()).from,t.to):this.view.docView.markDirty(this.from,this.to)},Et.prototype.stateUpdated=function(t){return this.trackMappings.getMapping(t,this.mapping)?(this.trackMappings.destroy(),this.trackMappings=new dt(t),this.mappingTo=t,!0):(this.markDirty(),this.destroy(),!1)},Et.prototype.finish=function(t){if(clearTimeout(this.timeout),!this.composing||t){this.view.domObserver.flush() -var e=this.changedRange() -this.markDirty(e),this.destroy() -var r=this.state.selection,i=this.typeOver&&r instanceof ms.TextSelection&&!r.empty&&r.$head.sameParent(r.$anchor);(function(t,e,r,i,s){var o,a,l=function(t,e,r){var i=t.docView.parseRange(r.from,r.to),s=i.node,o=i.fromOffset,a=i.toOffset,l=i.from,c=i.to,h=t.root.getSelection(),p=null,u=h.anchorNode -u&&t.dom.contains(1==u.nodeType?u:u.parentNode)&&(p=[{node:u,offset:h.anchorOffset}],m(h)||p.push({node:h.focusNode,offset:h.focusOffset})) -if(n.chrome&&8===t.lastKeyCode)for(var d=a;d>o;d--){var f=s.childNodes[d-1],g=f.pmViewDesc -if("BR"==f.nodeType&&!g){a=d -break}if(!g||g.size)break}var v=e.doc,y=t.someProp("domParser")||ls.DOMParser.fromSchema(t.state.schema),b=v.resolve(l),k=null,w=y.parse(s,{topNode:b.parent,topMatch:b.parent.contentMatchAt(b.index()),topOpen:!0,from:o,to:a,preserveWhitespace:!b.parent.type.spec.code||"full",editableContent:!0,findPositions:p,ruleFromNode:Tt(y,b),context:b}) -if(p&&null!=p[0].pos){var x=p[0].pos,S=p[1]&&p[1].pos -null==S&&(S=x),k={anchor:x+l,head:S+l}}return{doc:w,sel:k,from:l,to:c}}(t,r,i),c=r.doc,h=c.slice(l.from,l.to) -8===t.lastKeyCode&&Date.now()-100<t.lastKeyCodeTime?(o=r.selection.to,a="end"):(o=r.selection.from,a="start") -t.lastKeyCode=null -var p=function(t,e,n,r,i){var s=t.findDiffStart(e,n) -if(null==s)return null -var o=t.findDiffEnd(e,n+t.size,n+e.size),a=o.a,l=o.b -if("end"==i){var c=Math.max(0,s-Math.min(a,l)) -r-=a+c-s}if(a<s&&t.size<e.size){var h=r<=s&&r>=a?s-r:0 -l=(s-=h)+(l-a),a=s}else if(l<s){var p=r<=s&&r>=l?s-r:0 -a=(s-=p)+(a-l),l=s}return{start:s,endA:a,endB:l}}(h.content,l.doc.content,l.from,o,a) -if(!p){if(s){var u=t.state,d=u.selection -t.dispatch(u.tr.replaceSelectionWith(u.schema.text(u.doc.textBetween(d.from,d.to)),!0).scrollIntoView())}else if(l.sel){var f=Dt(t,t.state.doc,e,l.sel) -f&&!f.eq(t.state.selection)&&t.dispatch(t.state.tr.setSelection(f))}return}t.domChangeCount++,r.selection.from<r.selection.to&&p.start==p.endB&&r.selection instanceof ms.TextSelection&&(p.start>r.selection.from&&p.start<=r.selection.from+2?p.start=r.selection.from:p.endA<r.selection.to&&p.endA>=r.selection.to-2&&(p.endB+=r.selection.to-p.endA,p.endA=r.selection.to)) -var v,y=l.doc.resolveNoCache(p.start-l.from),b=l.doc.resolveNoCache(p.endB-l.from) -if(!y.sameParent(b)&&y.pos<l.doc.content.size&&(v=ms.Selection.findFrom(l.doc.resolve(y.pos+1),1,!0))&&v.head==b.pos&&t.someProp("handleKeyDown",function(e){return e(t,g(13,"Enter"))}))return -if(r.selection.anchor>p.start&&function(t,e,n,r,i){if(!r.parent.isTextblock||n-e<=i.pos-r.pos||_t(r,!0,!1)<i.pos)return!1 -var s=t.resolve(e) -if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1 -var o=t.resolve(_t(s,!0,!0)) -if(!o.parent.isTextblock||o.pos>n||_t(o,!0,!1)<n)return!1 -return r.parent.content.cut(r.parentOffset).eq(o.parent.content)}(c,p.start,p.endA,y,b)&&t.someProp("handleKeyDown",function(e){return e(t,g(8,"Backspace"))}))return void(n.android&&n.chrome&&(t.selectionReader.suppressUpdates=!0,setTimeout(function(){return t.selectionReader.suppressUpdates=!1},50))) -var k,w,x,S,C=e.map(p.start),M=Math.max(C,e.map(p.endA,-1)) -if(y.sameParent(b)&&y.parent.inlineContent)if(y.pos==b.pos)k=t.state.tr.delete(C,M),w=c.resolve(p.start).marksAcross(c.resolve(p.endA)) -else if(p.endA==p.endB&&(S=c.resolve(p.start))&&(x=function(t,e){for(var n,r,i,s=t.firstChild.marks,o=e.firstChild.marks,a=s,l=o,c=0;c<o.length;c++)a=o[c].removeFromSet(a) -for(var h=0;h<s.length;h++)l=s[h].removeFromSet(l) -if(1==a.length&&0==l.length)r=a[0],n="add",i=function(t){return t.mark(r.addToSet(t.marks))} -else{if(0!=a.length||1!=l.length)return null -r=l[0],n="remove",i=function(t){return t.mark(r.removeFromSet(t.marks))}}for(var p=[],u=0;u<e.childCount;u++)p.push(i(e.child(u))) -if(ls.Fragment.from(p).eq(t))return{mark:r,type:n}}(y.parent.content.cut(y.parentOffset,b.parentOffset),S.parent.content.cut(S.parentOffset,p.endA-S.start()))))k=t.state.tr,"add"==x.type?k.addMark(C,M,x.mark):k.removeMark(C,M,x.mark) -else if(y.parent.child(y.index()).isText&&y.index()==b.index()-(b.textOffset?0:1)){var O=y.parent.textBetween(y.parentOffset,b.parentOffset) -if(t.someProp("handleTextInput",function(e){return e(t,C,M,O)}))return -k=t.state.tr.insertText(O,C,M)}k||(k=t.state.tr.replace(C,M,l.doc.slice(p.start-l.from,p.endB-l.from))) -if(l.sel){var E=Dt(t,k.doc,e,l.sel) -E&&k.setSelection(E)}w&&k.ensureMarks(w) -t.dispatch(k.scrollIntoView())})(this.view,this.mapping,this.state,e,i),this.view.docView.dirty&&this.view.updateState(this.view.state)}},Et.prototype.destroy=function(){clearTimeout(this.timeout),this.trackMappings.destroy(),this.view.inDOMChange=null},Et.prototype.compositionEnd=function(t){var e=this -this.composing&&(this.composing=!1,t&&(this.compositionEndedAt=t.timeStamp),this.timeout=setTimeout(function(){return e.finish()},50))},Et.prototype.ignoreKeyDownOnCompositionEnd=function(t){return!!(n.safari&&null!==this.compositionEndedAt&&Math.abs(t.timeStamp-this.compositionEndedAt)<500)&&(this.compositionEndedAt=null,!0)},Et.start=function(t,e){return t.inDOMChange?e&&(clearTimeout(t.inDOMChange.timeout),t.inDOMChange.composing=!0,t.inDOMChange.compositionEndedAt=null):t.inDOMChange=new Et(t,e),t.inDOMChange},Et.commitTimeout=20 -var zt={thead:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Pt=null -var Ft={childList:!0,characterData:!0,attributes:!0,subtree:!0,characterDataOldValue:!0},Vt=n.ie&&n.ie_version<=11,Lt=function(t){var e=this -this.view=t,this.observer=window.MutationObserver&&new window.MutationObserver(function(t){return e.registerMutations(t)}),Vt&&(this.onCharData=function(t){return e.registerMutation({target:t.target,type:"characterData",oldValue:t.prevValue})})} -Lt.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Ft),Vt&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData)},Lt.prototype.stop=function(){this.observer&&(this.flush(),this.observer.disconnect()),Vt&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData)},Lt.prototype.flush=function(){this.observer&&this.registerMutations(this.observer.takeRecords())},Lt.prototype.registerMutations=function(t){for(var e=0;e<t.length;e++)this.registerMutation(t[e])},Lt.prototype.registerMutation=function(t){if(this.view.editable){var e=this.view.docView.nearestDesc(t.target) -if(("attributes"!=t.type||e!=this.view.docView&&"contenteditable"!=t.attributeName)&&e&&!e.ignoreMutation(t)){var n,r -if("childList"==t.type){var i=t.previousSibling&&t.previousSibling.parentNode==t.target?l(t.previousSibling)+1:0 -if(-1==i)return -n=e.localPosFromDOM(t.target,i,-1) -var s=t.nextSibling&&t.nextSibling.parentNode==t.target?l(t.nextSibling):t.target.childNodes.length -if(-1==s)return -r=e.localPosFromDOM(t.target,s,1)}else"attributes"==t.type?(n=e.posAtStart-e.border,r=e.posAtEnd+e.border):(n=e.posAtStart,r=e.posAtEnd,t.target.nodeValue==t.oldValue&&(Et.start(this.view).typeOver=!0)) -Et.start(this.view).addRange(n,r)}}} -var jt={},$t={} -function Ht(t){t.someProp("handleDOMEvents",function(e){for(var n in e)t.eventHandlers[n]||t.dom.addEventListener(n,t.eventHandlers[n]=function(e){return Ut(t,e)})})}function Ut(t,e){return t.someProp("handleDOMEvents",function(n){var r=n[e.type] -return!!r&&(r(t,e)||e.defaultPrevented)})}function qt(t){return{left:t.clientX,top:t.clientY}}function Jt(t,e,n,r,i){if(-1==r)return!1 -for(var s=t.state.doc.resolve(r),o=function(r){if(t.someProp(e,function(e){return r>s.depth?e(t,n,s.nodeAfter,s.before(r),i,!0):e(t,n,s.node(r),s.before(r),i,!1)}))return{v:!0}},a=s.depth+1;a>0;a--){var l=o(a) -if(l)return l.v}return!1}function Wt(t,e,n){t.focused||t.focus() -var r=t.state.tr.setSelection(e) -"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function Kt(t,e,n,r,i){return Jt(t,"handleClickOn",e,n,r)||t.someProp("handleClick",function(n){return n(t,e,r)})||(i?function(t,e){if(-1==e)return!1 -var n,r,i=t.state.selection -i instanceof ms.NodeSelection&&(n=i.node) -for(var s=t.state.doc.resolve(e),o=s.depth+1;o>0;o--){var a=o>s.depth?s.nodeAfter:s.node(o) -if(ms.NodeSelection.isSelectable(a)){r=n&&i.$from.depth>0&&o>=i.$from.depth&&s.before(i.$from.depth+1)==i.$from.pos?s.before(i.$from.depth):s.before(o) -break}}return null!=r&&(Wt(t,ms.NodeSelection.create(t.state.doc,r),"pointer"),!0)}(t,n):function(t,e){if(-1==e)return!1 -var n=t.state.doc.resolve(e),r=n.nodeAfter -return!!(r&&r.isAtom&&ms.NodeSelection.isSelectable(r))&&(Wt(t,new ms.NodeSelection(n),"pointer"),!0)}(t,n))}function Gt(t,e,n,r){return Jt(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",function(n){return n(t,e,r)})||function(t,e){var n=t.state.doc -if(-1==e)return!!n.inlineContent&&(Wt(t,ms.TextSelection.create(n,0,n.content.size),"pointer"),!0) -for(var r=n.resolve(e),i=r.depth+1;i>0;i--){var s=i>r.depth?r.nodeAfter:r.node(i),o=r.before(i) -if(s.inlineContent)Wt(t,ms.TextSelection.create(n,o+1,o+1+s.content.size),"pointer") -else{if(!ms.NodeSelection.isSelectable(s))continue -Wt(t,ms.NodeSelection.create(n,o),"pointer")}return!0}}(t,n)}function Yt(t){return!!t.inDOMChange&&(t.inDOMChange.finish(!0),!0)}$t.keydown=function(t,e){if(t.shiftKey=16==e.keyCode||e.shiftKey,t.inDOMChange){if(t.inDOMChange.composing)return -if(t.inDOMChange.ignoreKeyDownOnCompositionEnd(e))return -t.inDOMChange.finish()}t.lastKeyCode=e.keyCode,t.lastKeyCodeTime=Date.now(),t.someProp("handleKeyDown",function(n){return n(t,e)})||pt(t,e)?e.preventDefault():t.selectionReader.poll("key")},$t.keyup=function(t,e){16==e.keyCode&&(t.shiftKey=!1)},$t.keypress=function(t,e){if(!(t.inDOMChange||!e.charCode||e.ctrlKey&&!e.altKey||n.mac&&e.metaKey))if(t.someProp("handleKeyPress",function(n){return n(t,e)}))e.preventDefault() -else{var r=t.state.selection -if(!(r instanceof ms.TextSelection&&r.$from.sameParent(r.$to))){var i=String.fromCharCode(e.charCode) -t.someProp("handleTextInput",function(e){return e(t,r.$from.pos,r.$to.pos,i)})||t.dispatch(t.state.tr.insertText(i).scrollIntoView()),e.preventDefault()}}} -var Xt=n.mac?"metaKey":"ctrlKey" -jt.mousedown=function(t,e){t.shiftKey=e.shiftKey -var n=Yt(t),r=Date.now(),i="singleClick" -r-t.lastClick.time<500&&function(t,e){var n=e.x-t.clientX,r=e.y-t.clientY -return n*n+r*r<100}(e,t.lastClick)&&!e[Xt]&&("singleClick"==t.lastClick.type?i="doubleClick":"doubleClick"==t.lastClick.type&&(i="tripleClick")),t.lastClick={time:r,x:e.clientX,y:e.clientY,type:i} -var s=t.posAtCoords(qt(e)) -s&&("singleClick"==i?t.mouseDown=new Qt(t,s,e,n):("doubleClick"==i?function(t,e,n,r){return Jt(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",function(n){return n(t,e,r)})}:Gt)(t,s.pos,s.inside,e)?e.preventDefault():t.selectionReader.poll("pointer"))} -var Qt=function(t,e,r,i){var s,o,a=this -if(this.view=t,this.pos=e,this.event=r,this.flushed=i,this.selectNode=r[Xt],this.allowDefault=r.shiftKey,e.inside>-1)s=t.state.doc.nodeAt(e.inside),o=e.inside -else{var l=t.state.doc.resolve(e.pos) -s=l.parent,o=l.depth?l.before():0}this.mightDrag=null -var c=i?null:r.target,h=c?t.docView.nearestDesc(c,!0):null -this.target=h?h.dom:null,(s.type.spec.draggable&&!1!==s.type.spec.selectable||t.state.selection instanceof ms.NodeSelection&&o==t.state.selection.from)&&(this.mightDrag={node:s,pos:o,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&n.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(function(){return a.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),t.selectionReader.poll("pointer")} -Qt.prototype.done=function(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!1),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.view.mouseDown=null},Qt.prototype.up=function(t){this.done(),this.view.dom.contains(3==t.target.nodeType?t.target.parentNode:t.target)&&(this.allowDefault?(n.ie&&Ot(this.view.state)&&this.view.updateState(this.view.state),this.view.selectionReader.poll("pointer")):Kt(this.view,this.pos.pos,this.pos.inside,t,this.selectNode)?t.preventDefault():!this.flushed&&(!n.chrome||this.view.state.selection instanceof ms.TextSelection||this.pos.pos!=this.view.state.selection.from&&this.pos.pos!=this.view.state.selection.to)?this.view.selectionReader.poll("pointer"):(Wt(this.view,ms.Selection.near(this.view.state.doc.resolve(this.pos.pos)),"pointer"),t.preventDefault()))},Qt.prototype.move=function(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0),this.view.selectionReader.poll("pointer")},jt.touchdown=function(t){Yt(t),t.selectionReader.poll("pointer")},jt.contextmenu=function(t){return Yt(t)},$t.compositionstart=$t.compositionupdate=function(t){Et.start(t,!0)},$t.compositionend=function(t,e){if(!t.inDOMChange){if(!e.data)return -Et.start(t,!0)}t.inDOMChange.compositionEnd(e)},$t.input=function(t){var e=Et.start(t) -e.composing||e.finish()} -var Zt=n.ie&&n.ie_version<15||n.ios&&n.webkit_version<604 -function te(t,e,n,r){var i=It(t,e,n,t.shiftKey,t.state.selection.$from) -if(t.someProp("handlePaste",function(e){return e(t,r,i||ls.Slice.empty)})||!i)return!0 -var s=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(i),o=s?t.state.tr.replaceSelectionWith(s,t.shiftKey):t.state.tr.replaceSelection(i) -return t.dispatch(o.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}jt.copy=$t.cut=function(t,e){var n=t.state.selection,r="cut"==e.type -if(!n.empty){var i=Zt?null:e.clipboardData,s=Rt(t,n.content()),o=s.dom,a=s.text -i?(e.preventDefault(),i.clearData(),i.setData("text/html",o.innerHTML),i.setData("text/plain",a)):function(t,e){var n=e.ownerDocument,r=n.body.appendChild(n.createElement("div")) -r.appendChild(e),r.style.cssText="position: fixed; left: -10000px; top: 10px" -var i=getSelection(),s=n.createRange() -s.selectNodeContents(e),t.dom.blur(),i.removeAllRanges(),i.addRange(s),setTimeout(function(){n.body.removeChild(r),t.focus()},50)}(t,o),r&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},$t.paste=function(t,e){var n=Zt?null:e.clipboardData -n&&(te(t,n.getData("text/plain"),n.getData("text/html"),e)||n.files.length>0)?e.preventDefault():function(t,e){var n=t.dom.ownerDocument,r=t.shiftKey||t.state.selection.$from.parent.type.spec.code,i=n.body.appendChild(n.createElement(r?"textarea":"div")) -r||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout(function(){t.focus(),n.body.removeChild(i),r?te(t,i.value,null,e):te(t,i.textContent,i.innerHTML,e)},50)}(t,e)} -var ee=function(t,e){this.slice=t,this.move=e},ne=n.mac?"altKey":"ctrlKey" -for(var re in jt.dragstart=function(t,e){var n=t.mouseDown -if(n&&n.done(),e.dataTransfer){var r=t.state.selection,i=r.empty?null:t.posAtCoords(qt(e)) -if(i&&i.pos>=r.from&&i.pos<=(r instanceof ms.NodeSelection?r.to-1:r.to));else if(n&&n.mightDrag)t.dispatch(t.state.tr.setSelection(ms.NodeSelection.create(t.state.doc,n.mightDrag.pos))) -else if(e.target&&1==e.target.nodeType){var s=t.docView.nearestDesc(e.target,!0) -if(!s||!s.node.type.spec.draggable||s==t.docView)return -t.dispatch(t.state.tr.setSelection(ms.NodeSelection.create(t.state.doc,s.posBefore)))}var o=t.state.selection.content(),a=Rt(t,o),l=a.dom,c=a.text -e.dataTransfer.clearData(),e.dataTransfer.setData(Zt?"Text":"text/html",l.innerHTML),Zt||e.dataTransfer.setData("text/plain",c),t.dragging=new ee(o,!e[ne])}},jt.dragend=function(t){window.setTimeout(function(){return t.dragging=null},50)},$t.dragover=$t.dragenter=function(t,e){return e.preventDefault()},$t.drop=function(t,e){var n=t.dragging -if(t.dragging=null,e.dataTransfer){var r=t.posAtCoords(qt(e)) -if(r){var i=t.state.doc.resolve(r.pos) -if(i){var s=n&&n.slice||It(t,e.dataTransfer.getData(Zt?"Text":"text/plain"),Zt?null:e.dataTransfer.getData("text/html"),!1,i) -if(s&&(e.preventDefault(),!t.someProp("handleDrop",function(r){return r(t,e,s,n&&n.move)}))){var o=s?hs.dropPoint(t.state.doc,i.pos,s):i.pos -null==o&&(o=i.pos) -var a=t.state.tr -n&&n.move&&a.deleteSelection() -var l=a.mapping.map(o),c=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,h=a.doc -if(c?a.replaceRangeWith(l,l,s.content.firstChild):a.replaceRange(l,l,s),!a.doc.eq(h)){var p=a.doc.resolve(l) -c&&ms.NodeSelection.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild)?a.setSelection(new ms.NodeSelection(p)):a.setSelection(xt(t,p,a.doc.resolve(a.mapping.map(o)))),t.focus(),t.dispatch(a.setMeta("uiEvent","drop"))}}}}}},jt.focus=function(t){t.focused||(t.dom.classList.add("ProseMirror-focused"),t.focused=!0)},jt.blur=function(t){t.focused&&(t.dom.classList.remove("ProseMirror-focused"),t.focused=!1)},jt.beforeinput=function(t,e){if(n.chrome&&n.android&&"deleteContentBackward"==e.inputType){var r=t.domChangeCount -setTimeout(function(){if(t.domChangeCount==r&&(t.dom.blur(),t.focus(),!t.someProp("handleKeyDown",function(e){return e(t,g(8,"Backspace"))}))){var e=t.state.selection.$cursor -e&&e.pos>0&&t.dispatch(t.state.tr.delete(e.pos-1,e.pos).scrollIntoView())}},50)}},$t)jt[re]=$t[re] -function ie(t,e){if(t==e)return!0 -for(var n in t)if(t[n]!==e[n])return!1 -for(var r in e)if(!(r in t))return!1 -return!0}var se=function(t,e){this.spec=e||pe,this.side=this.spec.side||0,this.toDOM=t} -se.prototype.map=function(t,e,n,r){var i=t.mapResult(e.from+r,this.side<0?-1:1),s=i.pos -return i.deleted?null:new le(s-n,s-n,this)},se.prototype.valid=function(){return!0},se.prototype.eq=function(t){return this==t||t instanceof se&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ie(this.spec,t.spec))} -var oe=function(t,e){this.spec=e||pe,this.attrs=t} -oe.prototype.map=function(t,e,n,r){var i=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,s=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n -return i>=s?null:new le(i,s,this)},oe.prototype.valid=function(t,e){return e.from<e.to},oe.prototype.eq=function(t){return this==t||t instanceof oe&&ie(this.attrs,t.attrs)&&ie(this.spec,t.spec)},oe.is=function(t){return t.type instanceof oe} -var ae=function(t,e){this.spec=e||pe,this.attrs=t} -ae.prototype.map=function(t,e,n,r){var i=t.mapResult(e.from+r,1) -if(i.deleted)return null -var s=t.mapResult(e.to+r,-1) -return s.deleted||s.pos<=i.pos?null:new le(i.pos-n,s.pos-n,this)},ae.prototype.valid=function(t,e){var n=t.content.findIndex(e.from),r=n.index,i=n.offset -return i==e.from&&i+t.child(r).nodeSize==e.to},ae.prototype.eq=function(t){return this==t||t instanceof ae&&ie(this.attrs,t.attrs)&&ie(this.spec,t.spec)} -var le=function(t,e,n){this.from=t,this.to=e,this.type=n},ce={spec:{}} -le.prototype.copy=function(t,e){return new le(t,e,this.type)},le.prototype.eq=function(t){return this.type.eq(t.type)&&this.from==t.from&&this.to==t.to},le.prototype.map=function(t,e,n){return this.type.map(t,this,e,n)},le.widget=function(t,e,n){return new le(t,t,new se(e,n))},le.inline=function(t,e,n,r){return new le(t,e,new oe(n,r))},le.node=function(t,e,n,r){return new le(t,e,new ae(n,r))},ce.spec.get=function(){return this.type.spec},Object.defineProperties(le.prototype,ce) -var he=[],pe={},ue=function(t,e){this.local=t&&t.length?t:he,this.children=e&&e.length?e:he} -ue.create=function(t,e){return e.length?ye(e,t,0,pe):de},ue.prototype.find=function(t,e,n){var r=[] -return this.findInner(null==t?0:t,null==e?1e9:e,r,0,n),r},ue.prototype.findInner=function(t,e,n,r,i){for(var s=0;s<this.local.length;s++){var o=this.local[s] -o.from<=e&&o.to>=t&&(!i||i(o.spec))&&n.push(o.copy(o.from+r,o.to+r))}for(var a=0;a<this.children.length;a+=3)if(this.children[a]<e&&this.children[a+1]>t){var l=this.children[a]+1 -this.children[a+2].findInner(t-l,e-l,n,r+l,i)}},ue.prototype.map=function(t,e,n){return this==de||0==t.maps.length?this:this.mapInner(t,e,0,0,n||pe)},ue.prototype.mapInner=function(t,e,n,r,i){for(var s,o=0;o<this.local.length;o++){var a=this.local[o].map(t,n,r) -a&&a.type.valid(e,a)?(s||(s=[])).push(a):i.onRemove&&i.onRemove(this.local[o].spec)}return this.children.length?function(t,e,n,r,i,s,o){for(var a=t.slice(),l=function(t,e,n,r){for(var o=0;o<a.length;o+=3){var l=a[o+1],c=void 0;-1==l||t>l+s||(e>=a[o]+s?a[o+1]=-1:(c=r-n-(e-t)+(s-i))&&(a[o]+=c,a[o+1]+=c))}},c=0;c<n.maps.length;c++)n.maps[c].forEach(l) -for(var h=!1,p=0;p<a.length;p+=3)if(-1==a[p+1]){var u=n.map(a[p]+s),d=u-i -if(d<0||d>=r.content.size){h=!0 -continue}var f=n.map(t[p+1]+s,-1),m=f-i,g=r.content.findIndex(d),v=g.index,y=g.offset,b=r.maybeChild(v) -if(b&&y==d&&y+b.nodeSize==m){var k=a[p+2].mapInner(n,b,u+1,a[p]+s+1,o) -k!=de?(a[p]=d,a[p+1]=m,a[p+2]=k):(a[p+1]=-2,h=!0)}else h=!0}if(h){var w=function(t,e,n,r,i,s,o){function a(t,e){for(var s=0;s<t.local.length;s++){var l=t.local[s].map(r,i,e) -l?n.push(l):o.onRemove&&o.onRemove(t.local[s].spec)}for(var c=0;c<t.children.length;c+=3)a(t.children[c+2],t.children[c]+e+1)}for(var l=0;l<t.length;l+=3)-1==t[l+1]&&a(t[l+2],e[l]+s+1) -return n}(a,t,e||[],n,i,s,o),x=ye(w,r,0,o) -e=x.local -for(var S=0;S<a.length;S+=3)a[S+1]<0&&(a.splice(S,3),S-=3) -for(var C=0,M=0;C<x.children.length;C+=3){for(var O=x.children[C];M<a.length&&a[M]<O;)M+=3 -a.splice(M,0,x.children[C],x.children[C+1],x.children[C+2])}}return new ue(e&&e.sort(be),a)}(this.children,s,t,e,n,r,i):s?new ue(s.sort(be)):de},ue.prototype.add=function(t,e){return e.length?this==de?ue.create(t,e):this.addInner(t,e,0):this},ue.prototype.addInner=function(t,e,n){var r,i=this,s=0 -t.forEach(function(t,o){var a,l=o+n -if(a=ge(e,t,l)){for(r||(r=i.children.slice());s<r.length&&r[s]<o;)s+=3 -r[s]==o?r[s+2]=r[s+2].addInner(t,a,l+1):r.splice(s,0,o,o+t.nodeSize,ye(a,t,l+1,pe)),s+=3}}) -var o=me(s?ve(e):e,-n) -return new ue(o.length?this.local.concat(o).sort(be):this.local,r||this.children)},ue.prototype.remove=function(t){return 0==t.length||this==de?this:this.removeInner(t,0)},ue.prototype.removeInner=function(t,e){for(var n=this.children,r=this.local,i=0;i<n.length;i+=3){for(var s=void 0,o=n[i]+e,a=n[i+1]+e,l=0,c=void 0;l<t.length;l++)(c=t[l])&&c.from>o&&c.to<a&&(t[l]=null,(s||(s=[])).push(c)) -if(s){n==this.children&&(n=this.children.slice()) -var h=n[i+2].removeInner(s,o+1) -h!=de?n[i+2]=h:(n.splice(i,3),i-=3)}}if(r.length)for(var p=0,u=void 0;p<t.length;p++)if(u=t[p])for(var d=0;d<r.length;d++)r[d].type.eq(u.type)&&(r==this.local&&(r=this.local.slice()),r.splice(d--,1)) -return n==this.children&&r==this.local?this:r.length||n.length?new ue(r,n):de},ue.prototype.forChild=function(t,e){var n,r -if(this==de)return this -if(e.isLeaf)return ue.empty -for(var i=0;i<this.children.length;i+=3)if(this.children[i]>=t){this.children[i]==t&&(n=this.children[i+2]) -break}for(var s=t+1,o=s+e.content.size,a=0;a<this.local.length;a++){var l=this.local[a] -if(l.from<o&&l.to>s&&l.type instanceof oe){var c=Math.max(s,l.from)-s,h=Math.min(o,l.to)-s -c<h&&(r||(r=[])).push(l.copy(c,h))}}if(r){var p=new ue(r.sort(be)) -return n?new fe([p,n]):p}return n||de},ue.prototype.eq=function(t){if(this==t)return!0 -if(!(t instanceof ue)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1 -for(var e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1 -for(var n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1 -return!1},ue.prototype.locals=function(t){return ke(this.localsInner(t))},ue.prototype.localsInner=function(t){if(this==de)return he -if(t.inlineContent||!this.local.some(oe.is))return this.local -for(var e=[],n=0;n<this.local.length;n++)this.local[n].type instanceof oe||e.push(this.local[n]) -return e} -var de=new ue -ue.empty=de,ue.removeOverlap=ke -var fe=function(t){this.members=t} -function me(t,e){if(!e||!t.length)return t -for(var n=[],r=0;r<t.length;r++){var i=t[r] -n.push(new le(i.from+e,i.to+e,i.type))}return n}function ge(t,e,n){if(e.isLeaf)return null -for(var r=n+e.nodeSize,i=null,s=0,o=void 0;s<t.length;s++)(o=t[s])&&o.from>n&&o.to<r&&((i||(i=[])).push(o),t[s]=null) -return i}function ve(t){for(var e=[],n=0;n<t.length;n++)null!=t[n]&&e.push(t[n]) -return e}function ye(t,e,n,r){var i=[],s=!1 -e.forEach(function(e,o){var a=ge(t,e,o+n) -if(a){s=!0 -var l=ye(a,e,n+o+1,r) -l!=de&&i.push(o,o+e.nodeSize,l)}}) -for(var o=me(s?ve(t):t,-n).sort(be),a=0;a<o.length;a++)o[a].type.valid(e,o[a])||(r.onRemove&&r.onRemove(o[a].spec),o.splice(a--,1)) -return o.length||i.length?new ue(o,i):de}function be(t,e){return t.from-e.from||t.to-e.to}function ke(t){for(var e=t,n=0;n<e.length-1;n++){var r=e[n] -if(r.from!=r.to)for(var i=n+1;i<e.length;i++){var s=e[i] -if(s.from!=r.from){s.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,s.from),we(e,i,r.copy(s.from,r.to))) -break}s.to!=r.to&&(e==t&&(e=t.slice()),e[i]=s.copy(s.from,r.to),we(e,i+1,s.copy(r.to,s.to)))}}return e}function we(t,e,n){for(;e<t.length&&be(n,t[e])>0;)e++ -t.splice(e,0,n)}function xe(t){var e=[] -return t.someProp("decorations",function(n){var r=n(t.state) -r&&r!=de&&e.push(r)}),t.cursorWrapper&&e.push(ue.create(t.state.doc,[t.cursorWrapper.deco])),fe.from(e)}fe.prototype.forChild=function(t,e){if(e.isLeaf)return ue.empty -for(var n=[],r=0;r<this.members.length;r++){var i=this.members[r].forChild(t,e) -i!=de&&(i instanceof fe?n=n.concat(i.members):n.push(i))}return fe.from(n)},fe.prototype.eq=function(t){if(!(t instanceof fe)||t.members.length!=this.members.length)return!1 -for(var e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1 -return!0},fe.prototype.locals=function(t){for(var e,n=!0,r=0;r<this.members.length;r++){var i=this.members[r].localsInner(t) -if(i.length)if(e){n&&(e=e.slice(),n=!1) -for(var s=0;s<i.length;s++)e.push(i[s])}else e=i}return e?ke(n?e:e.sort(be)):he},fe.from=function(t){switch(t.length){case 0:return de -case 1:return t[0] -default:return new fe(t)}} -var Se=function(t,e){this._props=e,this.state=e.state,this.dispatch=this.dispatch.bind(this),this._root=null,this.focused=!1,this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):t.apply?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=Ee(this),this.cursorWrapper=null,Oe(this),this.nodeViews=Ae(this),this.docView=V(this.state.doc,Me(this),xe(this),this.dom,this),this.lastSelectedViewDesc=null,this.dragging=null,function(t){t.shiftKey=!1,t.mouseDown=null,t.inDOMChange=null,t.lastKeyCode=null,t.lastKeyCodeTime=0,t.lastClick={time:0,x:0,y:0,type:""},t.domObserver=new Lt(t),t.domObserver.start(),t.domChangeCount=0,t.eventHandlers=Object.create(null) -var e=function(e){var n=jt[e] -t.dom.addEventListener(e,t.eventHandlers[e]=function(e){!function(t,e){if(!e.bubbles)return!0 -if(e.defaultPrevented)return!1 -for(var n=e.target;n!=t.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1 -return!0}(t,e)||Ut(t,e)||!t.editable&&e.type in $t||n(t,e)})} -for(var n in jt)e(n) -Ht(t)}(this),this.selectionReader=new ft(this),this.pluginViews=[],this.updatePluginViews()},Ce={props:{},root:{}} -function Me(t){var e=Object.create(null) -return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",function(n){if("function"==typeof n&&(n=n(t.state)),n)for(var r in n)"class"==r?e.class+=" "+n[r]:e[r]||"contenteditable"==r||"nodeName"==r||(e[r]=String(n[r]))}),[le.node(0,t.state.doc.content.size,e)]}function Oe(t){var e=Ot(t.state) -if(!e||n.ie&&t.mouseDown)t.cursorWrapper=null -else{var r,i=t.state.selection.visible,s=t.state.storedMarks||e.marks() -t.cursorWrapper&&ls.Mark.sameSet(t.cursorWrapper.deco.spec.marks,s)&&"\ufeff"==t.cursorWrapper.dom.textContent&&t.cursorWrapper.deco.spec.visible==i?t.cursorWrapper.deco.pos!=e.pos&&(r=t.cursorWrapper.dom):r=function(t){var e=document.createElement("span") -return e.textContent="\ufeff",t||(e.style.position="absolute",e.style.left="-100000px"),e}(i),r&&(t.cursorWrapper={dom:r,deco:le.widget(e.pos,r,{isCursorWrapper:!0,marks:s,raw:!0,visible:i})})}}function Ee(t){return!t.someProp("editable",function(e){return!1===e(t.state)})}function Te(t){var e=t.getSelection(),n=e.focusOffset,r=e.focusNode -return r&&3!=r.nodeType?[r,n,1==r.nodeType?r.childNodes[n-1]:null,1==r.nodeType?r.childNodes[n]:null]:null}function Ae(t){var e={} -return t.someProp("nodeViews",function(t){for(var n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n])}),e}Ce.props.get=function(){if(this._props.state!=this.state){var t=this._props -for(var e in this._props={},t)this._props[e]=t[e] -this._props.state=this.state}return this._props},Se.prototype.update=function(t){t.handleDOMEvents!=this._props.handleDOMEvents&&Ht(this),this._props=t,this.updateStateInner(t.state,!0)},Se.prototype.setProps=function(t){var e={} -for(var n in this._props)e[n]=this._props[n] -for(var r in e.state=this.state,t)e[r]=t[r] -this.update(e)},Se.prototype.updateState=function(t){this.updateStateInner(t,this.state.plugins!=t.plugins)},Se.prototype.updateStateInner=function(t,e){var r=this,i=this.state,s=!1 -if(this.state=t,e){var o=Ae(this);(function(t,e){var n=0,r=0 -for(var i in t){if(t[i]!=e[i])return!0 -n++}for(var s in e)r++ -return n!=r})(o,this.nodeViews)&&(this.nodeViews=o,s=!0),Ht(this)}if(this.domObserver.flush(),!this.inDOMChange||!this.inDOMChange.stateUpdated(t)){var a=this.editable -this.editable=Ee(this),Oe(this) -var l,h,u,d=xe(this),f=Me(this),m=e?"reset":t.scrollToSelection>i.scrollToSelection?"to selection":"preserve",g=s||!this.docView.matchesNode(t.doc,f,d),v=g||!t.selection.eq(i.selection)||this.selectionReader.domChanged(),y="preserve"==m&&v&&function(t){for(var e,n,r=t.dom.getBoundingClientRect(),i=Math.max(0,r.top),s=t.dom.ownerDocument,o=(r.left+r.right)/2,a=i+1;a<Math.min(innerHeight,r.bottom);a+=5){var l=t.root.elementFromPoint(o,a) -if(l!=t.dom&&t.dom.contains(l)){var h=l.getBoundingClientRect() -if(h.top>=i-20){e=l,n=h.top -break}}}for(var p=[],u=t.dom;u&&(p.push({dom:u,top:u.scrollTop,left:u.scrollLeft}),u!=s.body);u=c(u));return{refDOM:e,refTop:n,stack:p}}(this) -if(v){this.domObserver.stop() -var k=!1 -if(g){var w=n.chrome&&Te(this.root) -!s&&this.docView.update(t.doc,f,d,this)||(this.docView.destroy(),this.docView=V(t.doc,f,d,this.dom,this)),this.selectionReader.clearDOMState(),w&&(k=function(t,e){var n=Te(e) -if(!n||3==n[0].nodeType)return!1 -for(var r=0;r<t.length;r++)if(n[r]!=t[r])return!0 -return!1}(w,this.root))}k||!(this.mouseDown&&this.selectionReader.domChanged()&&(l=this,h=l.docView.domFromPos(l.state.selection.anchor),u=l.root.getSelection(),p(h.node,h.offset,u.anchorNode,u.anchorOffset)))?vt(this,!1,k):(kt(this,t.selection),this.selectionReader.storeDOMState(t.selection)),this.domObserver.start()}if(a!=this.editable&&this.selectionReader.editableChanged(),this.updatePluginViews(e?null:i),"reset"==m)this.dom.scrollTop=0 -else if("to selection"==m){var x=this.root.getSelection().focusNode -this.someProp("handleScrollToSelection",function(t){return t(r)})||(t.selection instanceof ms.NodeSelection?b(this,this.docView.domAfterPos(t.selection.from).getBoundingClientRect(),x):b(this,this.coordsAtPos(t.selection.head),x))}else y&&function(t){for(var e=t.refDOM,n=t.refTop,r=t.stack,i=e?e.getBoundingClientRect().top:0,s=0==i?0:i-n,o=0;o<r.length;o++){var a=r[o],l=a.dom,c=a.top,h=a.left -l.scrollTop!=c+s&&(l.scrollTop=c+s),l.scrollLeft!=h&&(l.scrollLeft=h)}}(y)}},Se.prototype.destroyPluginViews=function(){for(var t;t=this.pluginViews.pop();)t.destroy&&t.destroy()},Se.prototype.updatePluginViews=function(t){if(t)for(var e=0;e<this.pluginViews.length;e++){var n=this.pluginViews[e] -n.update&&n.update(this,t)}else{this.destroyPluginViews() -for(var r=0;r<this.state.plugins.length;r++){var i=this.state.plugins[r] -i.spec.view&&this.pluginViews.push(i.spec.view(this))}}},Se.prototype.someProp=function(t,e){var n,r=this._props&&this._props[t] -if(null!=r&&(n=e?e(r):r))return n -var i=this.state.plugins -if(i)for(var s=0;s<i.length;s++){var o=i[s].props[t] -if(null!=o&&(n=e?e(o):o))return n}},Se.prototype.hasFocus=function(){return this.root.activeElement==this.dom},Se.prototype.focus=function(){this.domObserver.stop(),vt(this,!0),this.domObserver.start(),this.editable&&this.dom.focus()},Ce.root.get=function(){var t=this._root -if(null==t)for(var e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return this._root=e -return t||document},Se.prototype.posAtCoords=function(t){var e=x(this,t) -return this.inDOMChange&&e&&(e.pos=this.inDOMChange.mapping.map(e.pos),-1!=e.inside&&(e.inside=this.inDOMChange.mapping.map(e.inside))),e},Se.prototype.coordsAtPos=function(t){return this.inDOMChange&&(t=this.inDOMChange.mapping.invert().map(t)),C(this,t)},Se.prototype.domAtPos=function(t){return this.inDOMChange&&(t=this.inDOMChange.mapping.invert().map(t)),this.docView.domFromPos(t)},Se.prototype.nodeDOM=function(t){this.inDOMChange&&(t=this.inDOMChange.mapping.invert().map(t)) -var e=this.docView.descAt(t) -return e?e.nodeDOM:null},Se.prototype.posAtDOM=function(t,e,n){void 0===n&&(n=-1) -var r=this.docView.posFromDOM(t,e,n) -if(null==r)throw new RangeError("DOM position not inside the editor") -return this.inDOMChange&&(r=this.inDOMChange.mapping.map(r)),r},Se.prototype.endOfTextblock=function(t,e){return D(this,e||this.state,t)},Se.prototype.destroy=function(){this.docView&&(function(t){for(var e in t.domObserver.stop(),t.inDOMChange&&t.inDOMChange.destroy(),t.eventHandlers)t.dom.removeEventListener(e,t.eventHandlers[e])}(this),this.destroyPluginViews(),this.selectionReader.destroy(),this.mounted?(this.docView.update(this.state.doc,[],xe(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},Se.prototype.dispatchEvent=function(t){return function(t,e){Ut(t,e)||!jt[e.type]||!t.editable&&e.type in $t||jt[e.type](t,e)}(this,t)},Se.prototype.dispatch=function(t){var e=this._props.dispatchTransaction -e?e.call(this,t):this.updateState(this.state.apply(t))},Object.defineProperties(Se.prototype,Ce),e.EditorView=Se,e.Decoration=le,e.DecorationSet=ue,e.__serializeForClipboard=Rt,e.__parseFromClipboard=It})) -rs($s) -var Hs=$s.EditorView -$s.Decoration,$s.DecorationSet,$s.__serializeForClipboard,$s.__parseFromClipboard -class Us extends ps{constructor(t,e,n="SetDocAttr"){super(),this.stepType=n,this.key=t,this.value=e}apply(t){return this.prevValue=t.attrs[this.key],t.attrs[this.key]=this.value,us.ok(t)}invert(){return new Us(this.key,this.prevValue,"revertSetDocAttr")}map(){return null}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}static fromJSON(t){return new Us(t.key,t.value,t.stepType)}}function qs(t,e){let n=!1 -t.forEach(t=>{t===e&&(n=!0)}),n||t.push(e)}function Js(t){let e=t.selection,n=[] -return e.from===e.to?(t.doc.nodeAt(e.from)&&t.doc.nodeAt(e.from).marks.forEach(t=>{qs(n,t)}),t.doc.nodeAt(e.from-1)&&t.doc.nodeAt(e.from-1).marks.forEach(t=>{(t.type.spec.inclusive||void 0===t.type.spec.inclusive)&&qs(n,t)}),t.storedMarks&&t.storedMarks.forEach(t=>{qs(n,t)})):t.doc.nodesBetween(e.from,e.to,t=>{t.marks.forEach(t=>{qs(n,t)})}),n}class Ws extends G{constructor(){super(...arguments),this._guid=null,this.sourceText=null,this.editorView=null,this.status=null,this.schema=null}didInsertElement(){this.makeSchema(),this.sourceText=this.args.text -let t=gs.create({schema:this.schema,doc:this.sourceText?this.schema.nodeFromJSON(this.sourceText):null,plugins:[Os(),js({"Mod-z":Es,"Mod-y":Ts}),js(ks)]}),e=this -e.editorView=new Hs(document.querySelector("#"+this.prosemirrorId),{state:t,dispatchTransaction(t){let n=e.editorView.state.apply(t) -e.stateChange(n),e.editorView.updateState(n)}})}didUpdate(){if(this.args.text&&this.args.text!==this.sourceText){this.sourceText=this.args.text -let t=gs.create({schema:this.schema,doc:this.schema.nodeFromJSON(this.sourceText),plugins:[Os(),js({"Mod-z":Es,"Mod-y":Ts}),js(ks)]}) -this.editorView.updateState(t)}}get prosemirrorId(){return"tei-editor-prosemirror-"+ns(this)}stateChange(t){let e={block:null,blocks:null,marks:{}};(function(t){let e=t.selection,n=[] -for(let r=0;r<e.$from.path.length;r++)"object"==typeof e.$from.path[r]&&n.push(e.$from.path[r]) -return n})(t).forEach(t=>{t.type.isText||(null===e.blocks&&(e.blocks={}),e.blocks[t.type.name]=t,e.block=t)}),Js(t).forEach(t=>{e.marks[t.type.name]=t}),this.status=e,this.args.update&&(this.sourceText=t.doc.toJSON(),this.args.update(this.sourceText))}menuAction(t,e,n,r){if(this.editorView.focus(),"ev.target.value"===n&&(n=r.target.value),"setDocAttribute"===t){let t=this.editorView.state.tr -t.step(new Us(e,n)),this.editorView.dispatch(t)}else if("setBlockType"===t)if(this.schema.nodes[n].isBlock)if(e.wrapping){let t=this.editorView.state.selection.$from.blockRange(this.editorView.state.selection.$to) -if(this.status.blocks[n])this.editorView.dispatch(this.editorView.state.tr.lift(t,ds(t))) -else{let e=fs(t,this.schema.nodes[n]) -e&&this.editorView.dispatch(this.editorView.state.tr.wrap(t,e))}}else ys(this.schema.nodes[n],{})(this.editorView.state,this.editorView.dispatch) -else{let t=this.schema.nodes[n] -var i=this.editorView.state.selection -let e=i.$from,r=i.$to -if(this.status.blocks[n]){let t=e.parent.slice(e.parentOffset,r.parentOffset) -this.editorView.dispatch(this.editorView.state.tr.replaceRange(e.pos-1,r.pos+1,t))}else if(e.parent.canReplaceWith(e.index(),r.index(),t)){let n=e.parent.slice(e.parentOffset,r.parentOffset) -this.editorView.dispatch(this.editorView.state.tr.replaceSelectionWith(t.create({},n.content)))}}else if("setBlockAttribute"===t){let t=this.editorView.state.selection.$from,r=this.editorView.state.tr -for(let i=t.depth;i>=0;i--){let s=t.node(i) -if(void 0!==s.type.attrs[e]){let o=Object.assign({},s.attrs) -o[e]=n,r.setNodeMarkup(t.start(i)-1,null,o)}}this.editorView.dispatch(r)}else if("toggleBlockAttribute"===t){let t=this.editorView.state.selection.$from,n=this.editorView.state.tr -for(let r=t.depth;r>=0;r--){let i=t.node(r) -if(void 0!==i.type.attrs[e]){let s=Object.assign({},i.attrs) -s[e]=!s[e],n.setNodeMarkup(t.start(r)-1,null,s)}}this.editorView.dispatch(n)}else if("setMarkAttribute"===t){e=e.split(".") -Js(this.editorView.state) -var s=this.editorView.state.selection -let t=s.$from,r=s.$to,i=this.editorView.state.tr -if(i.removeMark(t.pos,r.pos,this.schema.marks[e[0]]),n&&""!==n.trim()){let s={} -s[e[1]]=n,i.addMark(t.pos,r.pos,this.schema.marks[e[0]].create(s))}this.editorView.dispatch(i)}else"toggleMark"===t&&bs(this.schema.marks[e])(this.editorView.state,this.editorView.dispatch)}makeSchema(){function t(t,e){let n={class:"tei-editor-"+t} -return e.attrs&&Object.entries(e.attrs).forEach(t=>{n["data-"+t[0]]=t[1]}),n}function e(t){console.log(t)}let n=Yi([this.args.schema]) -Object.entries(n.nodes).forEach(n=>{let r=n[0],i=n[1] -"doc"!==r&&"text"!==r&&(i.inline?(i.toDOM=function(e){return["span",t(r,e),0]},i.parseDOM=[{tag:"span.tei-editor-"+r,getAttrs:e}]):(i.toDOM=function(e){return["div",t(r,e),0]},i.parseDOM=[{tag:"div.tei-editor-"+r,getAttrs:e}]))}),Object.entries(n.marks).forEach(n=>{let r=n[0],i=n[1] -i.toDOM=function(e){return["span",t(r,e),0]},i.parseDOM=[{tag:"span.tei-editor-"+r,getAttrs:e}]}),this.schema=new cs(n)}}(function(t,e,n,r){var i,s=arguments.length,o=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r -if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r) -else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,n,o):i(e,n))||o) -s>3&&o&&Object.defineProperty(e,n,o)})([F],Ws.prototype,"status",void 0) -function Ks(t){return"tei"===t?"http://www.tei-c.org/ns/1.0":"xml"===t?"http://www.w3.org/XML/1998/namespace":"http://www.tei-c.org/ns/1.0"}class Gs{constructor(t){this.dom=t}evaluate(t,e,n){return this.dom.evaluate(e,t,Ks,n,null)}firstNode(t,e){return this.evaluate(t,e,XPathResult.FIRST_ORDERED_NODE_TYPE).singleNodeValue}nodeIterator(t,e){return this.evaluate(t,e,XPathResult.ORDERED_NODE_ITERATOR_TYPE)}stringValue(t,e){return this.evaluate(t,e,XPathResult.STRING_TYPE).stringValue}booleanValue(t,e){return this.evaluate(t,e,XPathResult.BOOLEAN_TYPE).booleanValue}numberValue(t,e){return this.evaluate(t,e,XPathResult.NUMBER_TYPE).numberValue}}class Ys{constructor(t,e){let n=new DOMParser -this.dom=n.parseFromString(t,"application/xml"),this.xpath=new Gs(this.dom),this.sections=e,this.parsed={}}get(t){return void 0===this.parsed[t]&&("single-text"===this.sections[t].type?this.parsed[t]=this.parseSingleText(this.sections[t]):"header"===this.sections[t].type?this.parsed[t]=this.parseHeader(this.sections[t]):"multi-text"===this.sections[t].type&&(this.parsed[t]=this.parseMultiText(this.sections[t]))),this.parsed[t]}parseSingleText(t){let e=this.xpath.firstNode(this.dom.documentElement,t.parser.selector) -return e?this.parseContentNode(e,t):null}parseContentAttributes(t,e){let n={} -return Object.entries(e).forEach(e=>{let r=e[0],i=e[1],s=[] -i.parser?s.push(i.parser):i.parsers&&(s=i.parsers) -for(let a=0;a<s.length;a++){let e=s[a] -if("boolean"===e.type)n[r]=this.xpath.booleanValue(t,e.selector) -else if("number"===e.type)try{n[r]=this.xpath.numberValue(t,e.selector)}catch(o){console.log(o)}else if("static"===e.type)this.xpath.booleanValue(t,e.selector)&&(n[r]=e.value) -else try{let i=this.xpath.stringValue(t,e.selector) -i&&(n[r]=i)}catch(o){console.log(o)}}}),n}parseContentMarks(t,e){let n=[] -return Object.entries(e).forEach(e=>{let r=e[0],i=e[1],s=[] -i.parser?s.push(i.parser):i.parsers&&(s=i.parsers) -for(let o=0;o<s.length;o++)if(this.xpath.booleanValue(t,s[o].selector)){let e={type:r} -i.attrs&&(e.attrs=this.parseContentAttributes(t,i.attrs)),n.push(e)}}),n}parseContentNode(t,e){let n=Object.entries(e.schema.nodes) -for(let r=0;r<n.length;r++){let i=n[r][0],s=n[r][1],o=[] -s.parser?o.push(s.parser):s.parsers&&(o=o.concat(s.parsers)) -for(let n=0;n<o.length;n++){let r=o[n] -if(null!==this.xpath.firstNode(t,"self::"+r.selector)){let n={type:i} -if(s.attrs&&(n.attrs=this.parseContentAttributes(t,s.attrs)),s.inline)if("text"===i){if(n.text=this.xpath.stringValue(t,r.text),n.marks=this.parseContentMarks(t,e.schema.marks),1===t.children.length){let r=this.parseContentNode(t.children[0],e) -r.text&&""!==r.text&&(n.text=r.text),n.marks=n.marks.concat(r.marks)}}else if(0===t.children.length)this.xpath.stringValue(t,r.text)&&(n.content=[{type:"text",text:this.xpath.stringValue(t,r.text),marks:this.parseContentMarks(t,e.schema.marks)}]) -else{let r=[] -for(let n=0;n<t.children.length;n++){let i=this.parseContentNode(t.children[n],e) -i&&r.push(i)}n.content=r}else{let r=[] -for(let n=0;n<t.children.length;n++){let i=this.parseContentNode(t.children[n],e) -i&&r.push(i)}n.content=r}return n}}}}generatePermutations(t){if(t.length>1){let e=[] -return this.generatePermutations(t.slice(1)).forEach(n=>{t[0].forEach(t=>{e.push([t].concat(n.slice(0)))})}),e}return t[0].map(t=>[t])}duplicateNode(t,e){let n=[],r=(e[0],e.map(e=>Xi([t,e.tag.substring(e.tag.indexOf(":")+1)]))) -return this.generatePermutations(r).forEach(r=>{let i=Yi([t]) -for(let t=0;t<e.length;t++)i[e[t].tag.substring(e[t].tag.indexOf(":")+1)]=r[t] -n.push(i)}),n}parseHeaderNode(t,e){let n=this.xpath.nodeIterator(t,e.tag),r=[],i=n.iterateNext() -for(;i;){let t={_attrs:{},_text:0===i.children.length?this.xpath.stringValue(i,"text()"):null} -for(let e=0;e<i.attributes.length;e++)t._attrs[i.attributes[e].name]=i.attributes[e].value -if(e.children){e.deduplicate&&e.children.forEach(t=>{e.deduplicate.merge.forEach(e=>{t.tag===e.tag&&(t.multiple=!0)})}) -for(let n=0;n<e.children.length;n++){let r=this.parseHeaderNode(i,e.children[n]) -r&&(t[e.children[n].tag.substring(e.children[n].tag.indexOf(":")+1)]=r)}e.deduplicate&&e.children.forEach(t=>{e.deduplicate.merge.forEach(e=>{t.tag===e.tag&&(t.multiple=!1)})})}r.push(t),i=n.iterateNext()}if(0===r.length)return null -if(e.multiple){if(e.deduplicate){let t=[] -r.forEach(n=>{let r=!1 -e.deduplicate.merge.forEach(t=>{let e=Xi([n,t.tag.substring(t.tag.indexOf(":")+1)]) -e&&e.length>1&&(r=!0)}),r?t=t.concat(this.duplicateNode(n,e.deduplicate.merge)):(Object.keys(n).forEach(t=>{n[t]&&1===n[t].length&&(n[t]=n[t][0])}),t.push(n))}),r=t}return r}return r[0]}parseHeader(t){let e=this.xpath.firstNode(this.dom.documentElement,t.tag),n={} -for(let r=0;r<t.schema.length;r++){let i=this.parseHeaderNode(e,t.schema[r]) -i&&(n[t.schema[r].tag.substring(4)]=i)}return n}parseMultiText(t){let e=this.xpath.firstNode(this.dom.documentElement,t.parser.selector) -if(e){let n=[],r=this.xpath.nodeIterator(e,t.parts.parser.selector),i=r.iterateNext() -for(;i;){let e=this.parseContentNode(i,t) -e&&n.push({id:i.getAttribute("xml:id"),text:e}),i=r.iterateNext()}return n}return[]}}class Xs{serialize(t,e){let n={node:"tei:TEI",attrs:{"xmlns:tei":["http://www.tei-c.org/ns/1.0"]},children:[]},r=Object.keys(e) -for(let s=0;s<r.length;s++){let i=r[s] -"single-text"===e[i].type?this.mergeTrees(n,this.serializeSingleText(t[i],e[i])):"header"===e[i].type?this.mergeTrees(n,this.serializeHeader(t[i],e[i])):"multi-text"===e[i].type&&this.mergeTrees(n,this.serializeMultiText(t[i],e[i]))}let i=this.toString(n,"") -return i.splice(0,0,'<?xml version="1.0" encoding="UTF-8"?>'),i.push(""),i.join("\n")}mergeTrees(t,e){if(t&&e)for(let n=0;n<e.children.length;n++){let r=!1 -for(let i=0;i<t.children.length;i++)t.children[i].node===e.children[n].node&&this.objectsMatch(t.children[i].attrs,e.children[n].attrs)&&(this.mergeTrees(t.children[i],e.children[n]),r=!0) -r||t.children.push(e.children[n])}}objectsMatch(t,e){if(t&&e){if(typeof t!=typeof e)return!1 -if("string"==typeof t||"number"==typeof t||"boolean"==typeof t)return t===e -let n=Object.keys(t),r=Object.keys(e) -return n.forEach(n=>!(r.indexOf(n)<0)&&(!!this.objectsMatch(t[n],e[n])&&void r.splice(r.indexOf(n),1))),!(r.length>0)}return!t&&!e}serializeSingleText(t,e){return t?{node:"tei:TEI",children:[{node:e.serializer.tag,children:[this.serializeTextNode(t,e)]}]}:null}serializeTextNode(t,e){let n={node:e.schema.nodes[t.type].serializer.tag,attrs:{},children:[],text:null} -if(e.schema.nodes[t.type].serializer.attrs&&Object.entries(e.schema.nodes[t.type].serializer.attrs).forEach(t=>{n.attrs[t[0]]=[t[1]]}),t.attrs&&Object.entries(t.attrs).forEach(r=>{let i=e.schema.nodes[t.type].attrs[r[0]].serializer,s=void 0 -i.values?i.values[r[1]]&&(s=i.values[r[1]]):s=i.value?i.value.replace("${value}",r[1]):r[1],void 0!==s&&("text()"===i.attr?n.text=s:n.attrs[i.attr]?n.attrs[i.attr].push(s):n.attrs[i.attr]=[s])}),e.schema.nodes[t.type].inline){if(t.content)if(t.content.length>1||t.content[0].marks&&t.content[0].marks.length>0)t.content.forEach(t=>{n.children.push(this.serializeTextNode(t,e))}) -else{let r=this.serializeTextNode(t.content[0],e) -e.schema.nodes[t.type].serializer.text?n.attrs[e.schema.nodes[t.type].serializer.text.attr]?n.attrs[e.schema.nodes[t.type].serializer.text.attr].push(r.text):n.attrs[e.schema.nodes[t.type].serializer.text.attr]=[r.text]:n.text=r.text}else t.text&&(e.schema.nodes[t.type].serializer.text?n.attrs[e.schema.nodes[t.type].serializer.text.attr]?n.attrs[e.schema.nodes[t.type].serializer.text.attr].push(t.text):n.attrs[e.schema.nodes[t.type].serializer.text.attr]=[t.text]:n.text=t.text) -if(t.marks){let r=t.marks.map(t=>{let r={node:n.node,attrs:{}},i=e.schema.marks[t.type].serializer -return i.tag&&(r.node=i.tag),i.attrs&&Object.entries(i.attrs).forEach(t=>{t[1].value&&(r.attrs[t[0]]?r.attrs[t[0]].push(t[1].value):r.attrs[t[0]]=[t[1].value])}),t.attrs&&Object.entries(t.attrs).forEach(n=>{let i=void 0 -e.schema.marks[t.type].attrs[n[0]].serializer.value?i=e.schema.marks[t.type].attrs[n[0]].serializer.value.replace("${value}",n[1]):e.schema.marks[t.type].attrs[n[0]].serializer.values&&e.schema.marks[t.type].attrs[n[0]].serializer.values[n[1]]&&(i=e.schema.marks[t.type].attrs[n[0]].serializer.values[n[1]]),void 0!==i&&(r.attrs[e.schema.marks[t.type].attrs[n[0]].serializer.attr]?r.attrs[e.schema.marks[t.type].attrs[n[0]].serializer.attr].push(i):r.attrs[e.schema.marks[t.type].attrs[n[0]].serializer.attr]=[i])}),r}) -if(new Set(r.map(t=>t.node)).size>1){r.sort((t,e)=>t.node<e.node?-1:t.node>e.node?1:t.node===e.node?0:void 0) -let t=n -t.node=null,r.forEach(e=>{if(null===t.node||t.node===e.node)t.node=e.node,Object.entries(e.attrs).forEach(e=>{t.attrs[e[0]]?t.attrs[e[0]]=t.attrs[e[0]].concat(e[1]):t.attrs[e[0]]=e[1]}) -else{let n={node:e.node,attrs:e.attrs,children:[],text:t.text} -t.text=null,t.children.push(n),t=n}})}else r.forEach(t=>{t.node&&(n.node=t.node),t.attrs&&Object.entries(t.attrs).forEach(t=>{n.attrs[t[0]]?n.attrs[t[0]]=n.attrs[t[0]].concat(t[1]):n.attrs[t[0]]=t[1]})})}}else t.content&&t.content.forEach(t=>{n.children.push(this.serializeTextNode(t,e))}) -return n}serializeHeader(t,e){return{node:"tei:TEI",children:[{node:e.tag,children:e.schema.map(e=>this.serializeMetadataNode(t[e.tag.substring(4)],e))}]}}serializeMetadataNode(t,e){if(e.multiple){let n=t.map(t=>{let n={node:e.tag} -if(t._text&&(n.text=t._text),t._attrs&&(n.attrs={},Object.entries(t._attrs).forEach(t=>{n.attrs[t[0]]=[t[1]]})),e.children){n.children=[] -for(let r=0;r<e.children.length;r++)if(t[e.children[r].tag.substring(4)]){let i=this.serializeMetadataNode(t[e.children[r].tag.substring(4)],e.children[r]) -Array.isArray(i)?n.children=n.children.concat(i):n.children.push(i)}}return n}) -if(e.deduplicate){let t=[],r=[] -n.forEach(n=>{let i=Xi([n,e.deduplicate.key]) -i=i.length>0?i[0]:null -let s=r.indexOf(i) -if(s>=0){let r=t[s] -n.children&&n.children.length>0&&e.deduplicate.merge.forEach(t=>{n.children.forEach(e=>{if(e.node===t.tag){let t=r.children.length,n=0 -r.children.forEach((r,i)=>{0===n&&r.node===e.node?n=1:1===n&&r.node!==e.node&&(n=2,t=i),r.node===e.node&&this.objectsMatch(r,e)&&(n=3)}),3!=n&&r.children.splice(t,0,e)}})})}else r.push(i),t.push(n)}),n=t}return n}{let n={node:e.tag} -if(t&&(t._text&&(n.text=t._text),t._attrs&&(n.attrs={},Object.entries(t._attrs).forEach(t=>{n.attrs[t[0]]=[t[1]]})),e.children)){n.children=[] -for(let r=0;r<e.children.length;r++)if(t[e.children[r].tag.substring(4)]){let i=this.serializeMetadataNode(t[e.children[r].tag.substring(4)],e.children[r]) -Array.isArray(i)?n.children=n.children.concat(i):n.children.push(i)}}return n}}serializeMultiText(t,e){let n={node:e.parts.serializer.tag,children:t.map(t=>this.serializeTextNode(t.text,e))} -return e.parts.serializer.attrs&&(n.attrs={},Object.entries(e.parts.serializer.attrs).forEach(t=>{n.attrs[t[0]]=[t[1]]})),{node:"tei:TEI",children:[{node:e.serializer.tag,children:[n]}]}}toString(t,e){function n(t){return t.replace("&","&").replace("<","<").replace(">",">")}let r=[],i=[e,"<",t.node] -return t.attrs&&Object.entries(t.attrs).forEach(t=>{t[1].length>0&&(t[1].sort(),i.push(" "+t[0]+'="'+n(t[1].join(" "))+'"'))}),t.children&&t.children.length>0?(i.push(">"),r.push(i.join("")),t.children.forEach(t=>{r=r.concat(this.toString(t,e+" "))}),r.push(e+"</"+t.node+">")):(t.text?(i.push(">"),i.push(n(t.text)),i.push("</"+t.node+">")):i.push("/>"),r.push(i.join(""))),r}}var Qs=function(t,e,n,r){var i,s=arguments.length,o=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r -if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r) -else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,n,o):i(e,n))||o) -return s>3&&o&&Object.defineProperty(e,n,o),o} -class Zs extends G{constructor(t){super(t),this.loaded=!1,this.sections=null,this.data=null,this.currentView="",this.sections=Yi([window.teiEditorConfig.sections]),this.currentView=Object.keys(this.sections)[0]}didInsertElement(){if(window.teiEditorConfig.actions&&window.teiEditorConfig.actions.initLoad){let t=this -window.teiEditorConfig.actions.initLoad().then(function(e){let n=new Ys(e,window.teiEditorConfig.sections) -e={},Object.keys(window.teiEditorConfig.sections).forEach(t=>{e[t]=n.get(t)}),t.data=e,t.loaded=!0})}}get mainUIConfig(){return window.teiEditorConfig.ui.main}get multiTexts(){let t={} -return this.sections&&this.data&&Object.entries(this.sections).forEach(e=>{"multi-text"===e[1].type&&this.data&&this.data[e[0]]&&(t[e[0]]=this.data[e[0]])}),t}loadFile(t){t.preventDefault() -let e=this -if(window.teiEditorConfig.actions&&window.teiEditorConfig.actions.load)window.teiEditorConfig.actions.load().then(function(t){let n=new Ys(t,window.teiEditorConfig.parser) -e.mainText=n.body,e.displayedMainText=n.body,e.metadata=n.metadata,e.globalAnnotationText=n.globalAnnotationText,e.displayedGlobalAnnotationText=n.globalAnnotationText,e.individualAnnotations=n.individualAnnotations,e.loaded=!0}) -else{let t=document.createElement("input") -t.setAttribute("type","file"),t.setAttribute("class","hidden"),document.querySelector("body").appendChild(t),t.click(),t.addEventListener("change",function(n){let r=n.target.files -if(r.length>0){let t=new FileReader -t.onload=(t=>{let n=new Ys(t.target.result,window.teiEditorConfig.parser) -e.mainText=n.body,e.displayedMainText=n.body,e.metadata=n.metadata,e.globalAnnotationText=n.globalAnnotationText,e.displayedGlobalAnnotationText=n.globalAnnotationText,e.individualAnnotations=n.individualAnnotations,e.loaded=!0}),t.readAsText(r[0])}t.remove()})}}saveFile(t){t.preventDefault() -let e=(new Xs).serialize(this.data,this.sections) -if(window.teiEditorConfig.actions&&window.teiEditorConfig.actions.save)window.teiEditorConfig.actions.save(e) -else{let t=new Blob([e],{type:"text/xml;charset=utf-8"}),n=document.createElement("a") -n.setAttribute("href",URL.createObjectURL(t)),n.setAttribute("download","download.tei"),document.body.appendChild(n),n.click(),document.body.removeChild(n)}}setView(t,e){e.preventDefault(),this.currentView=t}updateData(t,e){let n=Yi([this.data]) -n[t]=e,this.data=n}}Qs([F],Zs.prototype,"loaded",void 0),Qs([F],Zs.prototype,"sections",void 0),Qs([F],Zs.prototype,"data",void 0),Qs([F],Zs.prototype,"currentView",void 0),Qs([F],Zs.prototype,"multiTexts",null) -var to={"component:/tei-editor/components/AriaDropdownMenu":Ki,"template:/tei-editor/components/AriaDropdownMenu":{id:"jlrELQXU",block:'{"symbols":["@title","&default"],"statements":[[6,"li"],[10,"role","presentation"],[10,"class","dropdown"],[11,"onmouseover",[26,"action",[[22,["mouseOver"]]],null],null],[11,"onmouseout",[26,"action",[[22,["mouseOut"]]],null],null],[8],[0,"\\n "],[6,"a"],[10,"role","menuitem"],[10,"aria-haspopup","true"],[10,"tabindex","-1"],[11,"aria-expanded",[20,"expanded"],null],[11,"onclick",[26,"action",[[22,["click"]]],null],null],[11,"onkeydown",[26,"action",[[22,["keyDown"]]],null],null],[8],[1,[21,1,[]],false],[9],[0,"\\n "],[6,"ul"],[10,"role","menu"],[10,"class","vertical"],[11,"onkeydown",[26,"action",[[22,["keyDown"]]],null],null],[8],[0,"\\n "],[13,2],[0,"\\n "],[9],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{specifier:"template:/tei-editor/components/AriaDropdownMenu"}},"component:/tei-editor/components/AriaMenu":class extends G{keyDown(t){if(39===t.keyCode){let e=t.target.parentElement.nextElementSibling -for(;e&&("separator"===e.getAttribute("role")||"true"===e.querySelector('*[role="menuitem"]').getAttribute("aria-disabled"));)e=e.nextElementSibling -e&&e.querySelector('*[role="menuitem"]').focus()}else if(37===t.keyCode){let e=t.target.parentElement.previousElementSibling -for(;e&&("separator"===e.getAttribute("role")||"true"===e.querySelector('*[role="menuitem"]').getAttribute("aria-disabled"));)e=e.previousElementSibling -e&&e.querySelector('*[role="menuitem"]').focus()}}},"template:/tei-editor/components/AriaMenu":{id:"IoCg9v0u",block:'{"symbols":["@class","@label","&default"],"statements":[[6,"nav"],[10,"role","menubar"],[11,"class",[21,1,[]],null],[11,"arial-label",[21,2,[]],null],[8],[0,"\\n "],[6,"ul"],[10,"role","menu"],[11,"onkeydown",[26,"action",[[22,["keyDown"]]],null],null],[8],[0,"\\n "],[13,3],[0,"\\n "],[9],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{specifier:"template:/tei-editor/components/AriaMenu"}},"component:/tei-editor/components/AriaMenuAction":Gi,"template:/tei-editor/components/AriaMenuAction":{id:"E5+xlPLz",block:'{"symbols":["@action","@label","@current","@hidden","&default","@disabled"],"statements":[[6,"li"],[10,"role","presentation"],[8],[4,"if",[[21,6,[]]],null,{"statements":[[6,"a"],[10,"role","menuitem"],[11,"onclick",[26,"action",[[22,["noAction"]]],null],null],[11,"tabindex",[20,"tabindex"],null],[11,"title",[21,2,[]],null],[11,"aria-label",[21,2,[]],null],[10,"aria-disabled","true"],[11,"aria-current",[21,3,[]],null],[11,"aria-hidden",[21,4,[]],null],[8],[13,5],[9]],"parameters":[]},{"statements":[[6,"a"],[10,"role","menuitem"],[11,"onclick",[21,1,[]],null],[11,"tabindex",[20,"tabindex"],null],[11,"title",[21,2,[]],null],[11,"aria-label",[21,2,[]],null],[10,"aria-disabled","false"],[11,"aria-current",[21,3,[]],null],[11,"aria-hidden",[21,4,[]],null],[8],[13,5],[9]],"parameters":[]}],[9],[0,"\\n"]],"hasEval":false}',meta:{specifier:"template:/tei-editor/components/AriaMenuAction"}},"component:/tei-editor/components/MetadataEditor":class extends G{setMetadataField(t,e){e.preventDefault() -let n=Yi([this.args.metadata]) -n=Qi([n,t,e.target.value]),this.args.update(n)}addMultiFieldRow(t,e,n){n.preventDefault() -let r=Yi([this.args.metadata]),i=Xi([r,t]) -void 0===i&&(Qi([r,t,[]]),i=Xi([r,t])) -let s=[] -e.forEach(t=>{let e={} -e=Qi([e,t.path,""]),s.push(e)}),i.push(s),this.args.update(r)}removeMultiFieldRow(t,e,n){n.preventDefault() -let r=Yi([this.args.metadata]) -Xi([r,t]).splice(e,1),this.args.update(r)}moveMultiFieldRowUp(t,e,n){n.preventDefault() -let r=Yi([this.args.metadata]),i=Xi([r,t]),s=i[e] -i.splice(e,1),i.splice(e-1,0,s),this.args.update(r)}moveMultiFieldRowDown(t,e,n){n.preventDefault() -let r=Yi([this.args.metadata]),i=Xi([r,t]),s=i[e] -i.splice(e,1),i.splice(e+1,0,s),this.args.update(r)}},"template:/tei-editor/components/MetadataEditor":{id:"0OMKJLJ6",block:'{"symbols":["section","entry","value","value_idx","part_entry","part_idx","@metadata","@config"],"statements":[[6,"dl"],[8],[0,"\\n"],[4,"each",[[21,8,[]]],[["key"],["@index"]],{"statements":[[0," "],[6,"dt"],[8],[1,[21,1,["title"]],false],[9],[0,"\\n "],[6,"dd"],[8],[0,"\\n "],[6,"ul"],[8],[0,"\\n"],[4,"each",[[21,1,["entries"]]],[["key"],["@index"]],{"statements":[[4,"if",[[26,"eq",[[21,2,["type"]],"single-text"],null]],null,{"statements":[[0," "],[6,"li"],[10,"class","tei-editor-metadata-single"],[8],[6,"label"],[8],[1,[21,2,["label"]],false],[6,"input"],[10,"type","text"],[11,"value",[26,"get",[[21,7,[]],[21,2,["path"]]],null],null],[11,"onchange",[26,"action",[[22,["setMetadataField"]],[21,2,["path"]]],null],null],[8],[9],[9],[9],[0,"\\n"]],"parameters":[]},null],[4,"if",[[26,"eq",[[21,2,["type"]],"multi-field"],null]],null,{"statements":[[0," "],[6,"li"],[10,"class","tei-editor-metadata-multiple"],[8],[0,"\\n"],[4,"each",[[26,"get",[[21,7,[]],[21,2,["path"]]],null]],[["key"],["@index"]],{"statements":[[0," "],[6,"div"],[8],[0,"\\n"],[4,"each",[[21,2,["entries"]]],[["key"],["@index"]],{"statements":[[0," "],[6,"div"],[8],[6,"label"],[8],[1,[21,5,["label"]],false],[6,"input"],[10,"type","text"],[11,"value",[26,"get",[[21,3,[]],[21,5,["path"]]],null],null],[11,"onchange",[26,"action",[[22,["setMetadataField"]],[26,"join",[".",[21,2,["path"]],[21,4,[]],[21,5,["path"]]],null]],null],null],[8],[9],[9],[9],[0,"\\n"]],"parameters":[5,6]},null],[0," "],[6,"nav"],[8],[0,"\\n "],[5,"AriaMenu",[],[[],[]],{"statements":[[0,"\\n "],[5,"AriaMenuAction",[],[["@tabindex","@label","@action"],["0","Delete this row",[26,"action",[[22,["removeMultiFieldRow"]],[21,2,["path"]],[21,4,[]]],null]]],{"statements":[[0,"Delete"]],"parameters":[]}],[0,"\\n "],[5,"AriaMenuAction",[],[["@tabindex","@label","@disabled","@action"],["-1","Move this row up one",[26,"array-first",[[26,"get",[[21,7,[]],[21,2,["path"]]],null],[21,4,[]]],null],[26,"action",[[22,["moveMultiFieldRowUp"]],[21,2,["path"]],[21,4,[]]],null]]],{"statements":[[0,"Up"]],"parameters":[]}],[0,"\\n "],[5,"AriaMenuAction",[],[["@tabindex","@label","@disabled","@action"],["-1","Move this row one down",[26,"array-last",[[26,"get",[[21,7,[]],[21,2,["path"]]],null],[21,4,[]]],null],[26,"action",[[22,["moveMultiFieldRowDown"]],[21,2,["path"]],[21,4,[]]],null]]],{"statements":[[0,"Down"]],"parameters":[]}],[0,"\\n "]],"parameters":[]}],[0,"\\n "],[9],[0,"\\n "],[9],[0,"\\n"]],"parameters":[3,4]},null],[0," "],[5,"AriaMenu",[],[[],[]],{"statements":[[0,"\\n "],[5,"AriaMenuAction",[],[["@tabindex","@label","@action"],["0","Add a new row",[26,"action",[[22,["addMultiFieldRow"]],[21,2,["path"]],[21,2,["entries"]]],null]]],{"statements":[[0,"Add"]],"parameters":[]}],[0,"\\n "]],"parameters":[]}],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null]],"parameters":[2]},null],[0," "],[9],[0,"\\n "],[9],[0,"\\n"]],"parameters":[1]},null],[9],[0,"\\n"]],"hasEval":false}',meta:{specifier:"template:/tei-editor/components/MetadataEditor"}},"component:/tei-editor/components/MultiText":ts,"template:/tei-editor/components/MultiText":{id:"8ruI8+Tc",block:'{"symbols":["text","idx","@schema","@ui","@multiTexts","@texts"],"statements":[[6,"nav"],[10,"class","tei-editor-menubar"],[8],[0,"\\n "],[5,"AriaMenu",[],[["@label"],["Individual Annotation"]],{"statements":[[0,"\\n "],[6,"li"],[10,"role","presentation"],[8],[0,"\\n "],[6,"select"],[10,"role","menuitem"],[10,"tabindex","0"],[10,"aria-label","Select the text to edit"],[11,"onchange",[26,"action",[[22,["selectText"]]],null],null],[8],[0,"\\n"],[4,"each",[[21,6,[]]],[["key"],["@index"]],{"statements":[[4,"if",[[26,"eq",[[21,2,[]],[22,["selectedIdx"]]],null]],null,{"statements":[[0," "],[6,"option"],[11,"value",[21,2,[]],null],[10,"selected","selected"],[8],[1,[21,1,["id"]],false],[9],[0,"\\n"]],"parameters":[]},{"statements":[[0," "],[6,"option"],[11,"value",[21,2,[]],null],[8],[1,[21,1,["id"]],false],[9],[0,"\\n"]],"parameters":[]}]],"parameters":[1,2]},null],[0," "],[9],[0,"\\n "],[9],[0,"\\n "],[5,"AriaMenuAction",[],[["@label","@tabindex","@disabled","@action"],["Delete this text","-1",[26,"eq",[[26,"get",[[22,["texts"]],"length"],null],0],null],[26,"action",[[22,["deleteText"]]],null]]],{"statements":[[0,"Delete"]],"parameters":[]}],[0,"\\n "],[5,"AriaMenuAction",[],[["@label","@tabindex","@action"],["Add a text","-1",[26,"action",[[22,["addText"]]],null]]],{"statements":[[0,"Add"]],"parameters":[]}],[0,"\\n "]],"parameters":[]}],[0,"\\n"],[9],[0,"\\n"],[6,"div"],[8],[0,"\\n"],[4,"if",[[22,["text"]]],null,{"statements":[[0," "],[5,"ProsemirrorEditor",[],[["@schema","@ui","@text","@multiTexts","@update"],[[21,3,[]],[21,4,[]],[20,"text"],[21,5,[]],[26,"action",[[22,["updateText"]]],null]]],{"statements":[],"parameters":[]}],[0,"\\n"]],"parameters":[]},null],[9],[0,"\\n"]],"hasEval":false}',meta:{specifier:"template:/tei-editor/components/MultiText"}},"component:/tei-editor/components/ProsemirrorEditor":Ws,"component:/tei-editor/components/ProsemirrorEditor/set-doc-attr":Us,"template:/tei-editor/components/ProsemirrorEditor":{id:"9l/Ix9os",block:'{"symbols":["section","entry","value","value","value","entry","@multiTexts","@ui"],"statements":[[0," "],[6,"div"],[10,"class","tei-editor-prosemirror-editor"],[8],[0,"\\n "],[6,"div"],[11,"id",[20,"prosemirrorId"],null],[8],[9],[0,"\\n "],[9],[0,"\\n "],[6,"div"],[10,"class","tei-editor-prosemirror-sidebar"],[8],[0,"\\n "],[6,"dl"],[8],[0,"\\n"],[4,"each",[[21,8,[]]],[["key"],["@index"]],{"statements":[[4,"if",[[26,"status-display-entry",[[22,["status"]],[21,1,["context"]]],null]],null,{"statements":[[0," "],[6,"dt"],[8],[1,[21,1,["title"]],false],[9],[0,"\\n "],[6,"dd"],[8],[0,"\\n"],[4,"if",[[26,"eq",[[21,1,["type"]],"block-type"],null]],null,{"statements":[[0," "],[5,"AriaMenu",[],[["@label"],[[21,1,["title"]]]],{"statements":[[0,"\\n"],[4,"each",[[21,1,["blocks"]]],[["key"],["@index"]],{"statements":[[0," "],[5,"AriaMenuAction",[],[["@tabindex","@label","@current","@action"],[[26,"aria-menu-item-tabindex",[[22,["index"]]],null],[21,6,["label"]],[26,"boolean-str",[[26,"get",[[22,["status","blocks"]],[21,6,["type"]]],null]],null],[26,"action",[[22,["menuAction"]],"setBlockType",[21,6,[]],[21,6,["type"]]],null]]],{"statements":[[1,[21,6,["label"]],false]],"parameters":[]}],[0,"\\n"]],"parameters":[6]},null],[0," "]],"parameters":[]}],[0,"\\n"]],"parameters":[]},null],[4,"if",[[26,"eq",[[21,1,["type"]],"toolbar"],null]],null,{"statements":[[0," "],[5,"AriaMenu",[],[["@label","@class"],[[21,1,["title"]],[21,1,["class"]]]],{"statements":[[0,"\\n"],[4,"each",[[21,1,["entries"]]],[["key"],["@index"]],{"statements":[[4,"if",[[26,"eq",[[21,2,["type"]],"separator"],null]],null,{"statements":[[0," "],[6,"li"],[10,"role","separator"],[8],[9],[0,"\\n"]],"parameters":[]},null],[4,"if",[[26,"eq",[[21,2,["type"]],"select-attr"],null]],null,{"statements":[[0," "],[6,"li"],[10,"class","input"],[10,"role","presentation"],[8],[0,"\\n "],[6,"select"],[10,"role","menuitem"],[11,"tabindex",[26,"aria-menu-item-tabindex",[[22,["index"]]],null],null],[11,"onchange",[26,"action",[[22,["menuAction"]],"setBlockAttribute",[21,2,["attr"]],"ev.target.value"],null],null],[8],[0,"\\n"],[4,"each",[[21,2,["values"]]],[["key"],["@index"]],{"statements":[[0," "],[6,"option"],[11,"value",[21,5,["key"]],null],[11,"selected",[26,"eq",[[26,"get",[[26,"get",[[26,"get",[[22,["status"]],[21,1,["context"]]],null],"attrs"],null],[21,2,["attr"]]],null],[21,5,["key"]]],null],null],[8],[1,[21,5,["value"]],false],[9],[0,"\\n"]],"parameters":[5]},null],[4,"each",[[26,"get",[[21,7,[]],[21,2,["valueSource"]]],null]],[["key"],["@index"]],{"statements":[[0," "],[6,"option"],[11,"value",[21,4,["id"]],null],[11,"selected",[26,"eq",[[26,"get",[[26,"get",[[26,"get",[[22,["status"]],[21,1,["context"]]],null],"attrs"],null],[21,2,["attr"]]],null],[21,4,["id"]]],null],null],[8],[1,[21,4,["id"]],false],[9],[0,"\\n"]],"parameters":[4]},null],[0," "],[9],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null],[4,"if",[[26,"eq",[[21,2,["type"]],"set-attr"],null]],null,{"statements":[[0," "],[5,"AriaMenuAction",[],[["@tabindex","@label","@current","@action"],[[26,"aria-menu-item-tabindex",[[22,["index"]]],null],[21,2,["label"]],[26,"boolean-str",[[26,"eq",[[26,"get",[[26,"get",[[26,"get",[[22,["status"]],[21,1,["context"]]],null],"attrs"],null],[21,2,["attr"]]],null],[21,2,["value"]]],null]],null],[26,"action",[[22,["menuAction"]],"setBlockAttribute",[21,2,["attr"]],[21,2,["value"]]],null]]],{"statements":[[0,"\\n"],[4,"if",[[21,2,["icon"]]],null,{"statements":[[4,"if",[[26,"and",[[21,2,["icon","on"]],[21,2,["icon","off"]]],null]],null,{"statements":[[4,"if",[[26,"eq",[[26,"get",[[26,"get",[[26,"get",[[22,["status"]],[21,1,["context"]]],null],"attrs"],null],[21,2,["attr"]]],null],[21,2,["value"]]],null]],null,{"statements":[[0," "],[1,[21,2,["icon","on"]],true],[0,"\\n"]],"parameters":[]},{"statements":[[0," "],[1,[21,2,["icon","off"]],true],[0,"\\n"]],"parameters":[]}]],"parameters":[]},{"statements":[[0," "],[1,[21,2,["icon"]],true],[0,"\\n"]],"parameters":[]}]],"parameters":[]},{"statements":[[0," "],[1,[21,2,["label"]],false],[0,"\\n"]],"parameters":[]}],[0," "]],"parameters":[]}],[0,"\\n"]],"parameters":[]},null],[4,"if",[[26,"eq",[[21,2,["type"]],"toggle-attr"],null]],null,{"statements":[[0," "],[5,"AriaMenuAction",[],[["@tabindex","@label","@current","@action"],[[26,"aria-menu-item-tabindex",[[22,["index"]]],null],[21,2,["label"]],[26,"boolean-str",[[26,"get",[[26,"get",[[26,"get",[[22,["status"]],[21,1,["context"]]],null],"attrs"],null],[21,2,["attr"]]],null]],null],[26,"action",[[22,["menuAction"]],"toggleBlockAttribute",[21,2,["attr"]]],null]]],{"statements":[[0,"\\n"],[4,"if",[[21,2,["icon"]]],null,{"statements":[[4,"if",[[26,"and",[[21,2,["icon","on"]],[21,2,["icon","off"]]],null]],null,{"statements":[[4,"if",[[26,"get",[[26,"get",[[26,"get",[[22,["status"]],[21,1,["context"]]],null],"attrs"],null],[21,2,["attr"]]],null]],null,{"statements":[[0," "],[1,[21,2,["icon","on"]],true],[0,"\\n"]],"parameters":[]},{"statements":[[0," "],[1,[21,2,["icon","off"]],true],[0,"\\n"]],"parameters":[]}]],"parameters":[]},{"statements":[[0," "],[1,[21,2,["icon"]],true],[0,"\\n"]],"parameters":[]}]],"parameters":[]},{"statements":[[0," "],[1,[21,2,["label"]],false],[0,"\\n"]],"parameters":[]}],[0," "]],"parameters":[]}],[0,"\\n"]],"parameters":[]},null],[4,"if",[[26,"eq",[[21,2,["type"]],"toggle-mark"],null]],null,{"statements":[[0," "],[5,"AriaMenuAction",[],[["@tabindex","@label","@current","@action"],[[26,"aria-menu-item-tabindex",[[22,["index"]]],null],[21,2,["label"]],[26,"boolean-str",[[26,"get",[[26,"get",[[22,["status"]],[21,1,["context"]]],null],[21,2,["mark"]]],null]],null],[26,"action",[[22,["menuAction"]],"toggleMark",[21,2,["mark"]]],null]]],{"statements":[[0,"\\n"],[4,"if",[[21,2,["icon"]]],null,{"statements":[[4,"if",[[26,"and",[[21,2,["icon","on"]],[21,2,["icon","off"]]],null]],null,{"statements":[[4,"if",[[26,"get",[[26,"get",[[26,"get",[[22,["status"]],[21,1,["context"]]],null],"attrs"],null],[21,2,["attr"]]],null]],null,{"statements":[[0," "],[1,[21,2,["icon","on"]],true],[0,"\\n"]],"parameters":[]},{"statements":[[0," "],[1,[21,2,["icon","off"]],true],[0,"\\n"]],"parameters":[]}]],"parameters":[]},{"statements":[[0," "],[1,[21,2,["icon"]],true],[0,"\\n"]],"parameters":[]}]],"parameters":[]},{"statements":[[0," "],[1,[21,2,["label"]],false],[0,"\\n"]],"parameters":[]}],[0," "]],"parameters":[]}],[0,"\\n"]],"parameters":[]},null],[4,"if",[[26,"eq",[[21,2,["type"]],"text-attr"],null]],null,{"statements":[[0," "],[6,"li"],[10,"class","input"],[10,"role","presentation"],[8],[0,"\\n "],[6,"input"],[11,"type",[21,2,["dataType"]],null],[11,"value",[26,"get",[[26,"get",[[26,"get",[[22,["status"]],[21,1,["context"]]],null],"attrs"],null],[21,2,["attr"]]],null],null],[11,"onchange",[26,"action",[[22,["menuAction"]],"setBlockAttribute",[21,2,["attr"]],"ev.target.value"],null],null],[8],[9],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null],[4,"if",[[26,"eq",[[21,2,["type"]],"text-block-attr"],null]],null,{"statements":[[0," "],[6,"li"],[10,"class","input"],[10,"role","presentation"],[8],[0,"\\n "],[6,"textarea"],[11,"onchange",[26,"action",[[22,["menuAction"]],"setBlockAttribute",[21,2,["attr"]],"ev.target.value"],null],null],[8],[1,[26,"get",[[26,"get",[[26,"get",[[22,["status"]],[21,1,["context"]]],null],"attrs"],null],[21,2,["attr"]]],null],false],[9],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null],[4,"if",[[26,"eq",[[21,2,["type"]],"doc-text-attr"],null]],null,{"statements":[[0," "],[6,"li"],[10,"class","input"],[10,"role","presentation"],[8],[0,"\\n "],[6,"input"],[11,"type",[21,2,["dataType"]],null],[11,"value",[26,"get",[[26,"get",[[26,"get",[[22,["status"]],[21,1,["context"]]],null],"attrs"],null],[21,2,["attr"]]],null],null],[11,"onchange",[26,"action",[[22,["menuAction"]],"setDocAttribute",[21,2,["attr"]],"ev.target.value"],null],null],[8],[9],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null],[4,"if",[[26,"eq",[[21,2,["type"]],"select-mark-attr"],null]],null,{"statements":[[0," "],[6,"li"],[10,"class","input"],[10,"role","presentation"],[8],[0,"\\n "],[6,"select"],[10,"role","menuitem"],[11,"tabindex",[26,"aria-menu-item-tabindex",[[22,["index"]]],null],null],[11,"onchange",[26,"action",[[22,["menuAction"]],"setMarkAttribute",[26,"join",[".",[21,2,["mark"]],[21,2,["attr"]]],null],"ev.target.value"],null],null],[8],[0,"\\n"],[4,"each",[[21,2,["values"]]],[["key"],["@index"]],{"statements":[[0," "],[6,"option"],[11,"value",[21,3,["key"]],null],[11,"selected",[26,"eq",[[26,"get",[[26,"get",[[26,"get",[[26,"get",[[22,["status"]],"marks"],null],[21,2,["mark"]]],null],"attrs"],null],[21,2,["attr"]]],null],[21,3,["key"]]],null],null],[8],[1,[21,3,["label"]],false],[9],[0,"\\n"]],"parameters":[3]},null],[0," "],[9],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null]],"parameters":[2]},null],[0," "]],"parameters":[]}],[0,"\\n"]],"parameters":[]},null],[0," "],[9],[0,"\\n"]],"parameters":[]},null]],"parameters":[1]},null],[0," "],[9],[0,"\\n "],[9],[0,"\\n"]],"hasEval":false}',meta:{specifier:"template:/tei-editor/components/ProsemirrorEditor"}},"component:/tei-editor/components/TeiEditor":Zs,"component:/tei-editor/components/TeiEditor/tei":null,"template:/tei-editor/components/TeiEditor":{id:"doP/P5p0",block:'{"symbols":["value","key","value","key"],"statements":[[6,"div"],[10,"class","tei-editor"],[8],[0,"\\n "],[6,"div"],[8],[0,"\\n "],[5,"AriaMenu",[],[["@class"],["tei-editor-menubar"]],{"statements":[[0,"\\n "],[5,"AriaDropdownMenu",[],[["@title"],["File"]],{"statements":[[0,"\\n "],[5,"AriaMenuAction",[],[["@action"],[[26,"action",[[22,["saveFile"]]],null]]],{"statements":[[0,"Save"]],"parameters":[]}],[0,"\\n "]],"parameters":[]}],[0,"\\n"],[4,"each",[[22,["sections"]]],[["key"],["@index"]],{"statements":[[0," "],[5,"AriaMenuAction",[],[["@current","@hidden","@action"],[[26,"boolean-str",[[26,"eq",[[22,["currentView"]],[21,4,[]]],null]],null],[26,"boolean-str",[[26,"not",[[22,["loaded"]]],null]],null],[26,"action",[[22,["setView"]],[21,4,[]]],null]]],{"statements":[[1,[21,3,["title"]],false]],"parameters":[]}],[0,"\\n"]],"parameters":[3,4]},null],[0," "]],"parameters":[]}],[0,"\\n "],[9],[0,"\\n "],[6,"div"],[11,"aria-hidden",[26,"boolean-str",[[26,"not",[[22,["loaded"]]],null]],null],null],[8],[0,"\\n"],[4,"each",[[22,["sections"]]],[["key"],["@index"]],{"statements":[[0," "],[6,"div"],[11,"id",[27,[[21,2,[]]]]],[11,"class",[27,["tei-editor-view-",[26,"get",[[26,"get",[[22,["sections"]],[21,2,[]]],null],"type"],null]]]],[11,"aria-hidden",[26,"boolean-str",[[26,"not",[[26,"eq",[[22,["currentView"]],[21,2,[]]],null]],null]],null],null],[8],[0,"\\n"],[4,"if",[[26,"eq",[[26,"get",[[26,"get",[[22,["sections"]],[21,2,[]]],null],"type"],null],"header"],null]],null,{"statements":[[0," "],[5,"MetadataEditor",[],[["@config","@metadata","@update"],[[26,"get",[[26,"get",[[22,["sections"]],[21,2,[]]],null],"ui"],null],[26,"get",[[22,["data"]],[21,2,[]]],null],[26,"action",[[22,["updateData"]],[21,2,[]]],null]]],{"statements":[],"parameters":[]}],[0,"\\n"]],"parameters":[]},null],[4,"if",[[26,"eq",[[26,"get",[[26,"get",[[22,["sections"]],[21,2,[]]],null],"type"],null],"single-text"],null]],null,{"statements":[[0," "],[5,"ProsemirrorEditor",[],[["@schema","@ui","@multiTexts","@text","@update"],[[26,"get",[[26,"get",[[22,["sections"]],[21,2,[]]],null],"schema"],null],[26,"get",[[26,"get",[[22,["sections"]],[21,2,[]]],null],"ui"],null],[20,"multiTexts"],[26,"get",[[22,["data"]],[21,2,[]]],null],[26,"action",[[22,["updateData"]],[21,2,[]]],null]]],{"statements":[],"parameters":[]}],[0,"\\n"]],"parameters":[]},null],[4,"if",[[26,"eq",[[26,"get",[[26,"get",[[22,["sections"]],[21,2,[]]],null],"type"],null],"multi-text"],null]],null,{"statements":[[0," "],[5,"MultiText",[],[["@schema","@ui","@default","@texts","@multiTexts","@update"],[[26,"get",[[26,"get",[[22,["sections"]],[21,2,[]]],null],"schema"],null],[26,"get",[[26,"get",[[22,["sections"]],[21,2,[]]],null],"ui"],null],[26,"get",[[26,"get",[[22,["sections"]],[21,2,[]]],null],"default"],null],[26,"get",[[22,["data"]],[21,2,[]]],null],[20,"multiTexts"],[26,"action",[[22,["updateData"]],[21,2,[]]],null]]],{"statements":[],"parameters":[]}],[0,"\\n"]],"parameters":[]},null],[0," "],[9],[0,"\\n"]],"parameters":[1,2]},null],[0," "],[9],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{specifier:"template:/tei-editor/components/TeiEditor"}},"helper:/tei-editor/components/and":function(t){for(let e=0;e<t.length;e++)if(!t[e])return!1 -return!0},"helper:/tei-editor/components/aria-menu-item-tabindex":function(t){return 0===t[0]?0:-1},"helper:/tei-editor/components/array-first":function(t){return t[0].length>0&&0===t[1]},"helper:/tei-editor/components/array-last":function(t){return t[1]===t[0].length-1},"helper:/tei-editor/components/boolean-str":function(t){return t[0]?"true":"false"},"helper:/tei-editor/components/deepclone":Yi,"helper:/tei-editor/components/eq":function(t){return t[0]===t[1]},"helper:/tei-editor/components/get":Xi,"helper:/tei-editor/components/join":function(t){return t.slice(1).join(t[0])},"helper:/tei-editor/components/not":function(t){return!t[0]},"helper:/tei-editor/components/or":function(t){for(let e=0;e<t.length;e++)if(t[e])return!0 -return!1},"helper:/tei-editor/components/set":Qi,"helper:/tei-editor/components/status-display-entry":function(t){let e=t[0],n=t[1] -if(e&&n){if("string"==typeof n)return Xi([e,n]) -if(n.key&&n.value)return Xi([e,n.key])===n.value}else if(e&&!n)return!0 -return!1}},eo={app:{name:"tei-editor",rootName:"tei-editor"},types:{application:{definitiveCollection:"main"},component:{definitiveCollection:"components"},"component-test":{unresolvable:!0},helper:{definitiveCollection:"components"},"helper-test":{unresolvable:!0},renderer:{definitiveCollection:"main"},template:{definitiveCollection:"components"}},collections:{main:{types:["application","renderer"]},components:{group:"ui",types:["component","component-test","template","helper","helper-test"],defaultType:"component",privateCollections:["utils"]},styles:{group:"ui",unresolvable:!0},utils:{unresolvable:!0}}} -const no=new class extends Hr{constructor(){let t=new Wi(to),e=new Ji(eo,t) -const n=document.body -super({builder:new Li({element:n,nextSibling:null}),loader:new Vi(e),renderer:new ji,resolver:e,rootName:eo.app.rootName})}},ro=document.getElementById("app") -J=(()=>{no.scheduleRerender()}),no.registerInitializer({initialize(t){t.register(`component-manager:/${no.rootName}/component-managers/main`,se)}}),no.renderComponent("TeiEditor",ro,null),no.boot(),function(t,e){for(let n in e)ae(t,n,e[n])}(no,{"tei-editor":"TeiEditor"})}) +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"0010":function(t,e,n){"use strict";n.d(e,"a",(function(){return R})),n.d(e,"b",(function(){return h})),n.d(e,"c",(function(){return C})),n.d(e,"d",(function(){return M})),n.d(e,"e",(function(){return k}));var r=n("0ac0"),o=n("304a"),i=n("5313");function s(t,e){return!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0)}function a(t,e,n){var o=t.selection,s=o.$cursor;if(!s||(n?!n.endOfTextblock("backward",t):s.parentOffset>0))return!1;var a=u(s);if(!a){var l=s.blockRange(),f=l&&Object(r["i"])(l);return null!=f&&(e&&e(t.tr.lift(l,f).scrollIntoView()),!0)}var p=a.nodeBefore;if(!p.type.spec.isolating&&x(t,a,e))return!0;if(0==s.parent.content.size&&(c(p,"end")||i["NodeSelection"].isSelectable(p))){if(e){var d=t.tr.deleteRange(s.before(),s.after());d.setSelection(c(p,"end")?i["Selection"].findFrom(d.doc.resolve(d.mapping.map(a.pos,-1)),-1):i["NodeSelection"].create(d.doc,a.pos-p.nodeSize)),e(d.scrollIntoView())}return!0}return!(!p.isAtom||a.depth!=s.depth-1)&&(e&&e(t.tr.delete(a.pos-p.nodeSize,a.pos).scrollIntoView()),!0)}function c(t,e){for(;t;t="start"==e?t.firstChild:t.lastChild)if(t.isTextblock)return!0;return!1}function l(t,e,n){var r=t.selection,o=r.$cursor;if(!o||(n?!n.endOfTextblock("backward",t):o.parentOffset>0))return!1;var s=u(o),a=s&&s.nodeBefore;return!(!a||!i["NodeSelection"].isSelectable(a))&&(e&&e(t.tr.setSelection(i["NodeSelection"].create(t.doc,s.pos-a.nodeSize)).scrollIntoView()),!0)}function u(t){if(!t.parent.type.spec.isolating)for(var e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function f(t,e,n){var r=t.selection,o=r.$cursor;if(!o||(n?!n.endOfTextblock("forward",t):o.parentOffset<o.parent.content.size))return!1;var s=d(o);if(!s)return!1;var a=s.nodeAfter;if(x(t,s,e))return!0;if(0==o.parent.content.size&&(c(a,"start")||i["NodeSelection"].isSelectable(a))){if(e){var l=t.tr.deleteRange(o.before(),o.after());l.setSelection(c(a,"start")?i["Selection"].findFrom(l.doc.resolve(l.mapping.map(s.pos)),1):i["NodeSelection"].create(l.doc,l.mapping.map(s.pos))),e(l.scrollIntoView())}return!0}return!(!a.isAtom||s.depth!=o.depth-1)&&(e&&e(t.tr.delete(s.pos,s.pos+a.nodeSize).scrollIntoView()),!0)}function p(t,e,n){var r=t.selection,o=r.$cursor;if(!o||(n?!n.endOfTextblock("forward",t):o.parentOffset<o.parent.content.size))return!1;var s=d(o),a=s&&s.nodeAfter;return!(!a||!i["NodeSelection"].isSelectable(a))&&(e&&e(t.tr.setSelection(i["NodeSelection"].create(t.doc,s.pos)).scrollIntoView()),!0)}function d(t){if(!t.parent.type.spec.isolating)for(var e=t.depth-1;e>=0;e--){var n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}function h(t,e){var n=t.selection,o=n.$from,i=n.$to,s=o.blockRange(i),a=s&&Object(r["i"])(s);return null!=a&&(e&&e(t.tr.lift(s,a).scrollIntoView()),!0)}function v(t,e){var n=t.selection,r=n.$head,o=n.$anchor;return!(!r.parent.type.spec.code||!r.sameParent(o))&&(e&&e(t.tr.insertText("\n").scrollIntoView()),!0)}function m(t,e){var n=t.selection,r=n.$head,o=n.$anchor;if(!r.parent.type.spec.code||!r.sameParent(o))return!1;var s=r.node(-1),a=r.indexAfter(-1),c=s.contentMatchAt(a).defaultType;if(!s.canReplaceWith(a,a,c))return!1;if(e){var l=r.after(),u=t.tr.replaceWith(l,l,c.createAndFill());u.setSelection(i["Selection"].near(u.doc.resolve(l),1)),e(u.scrollIntoView())}return!0}function g(t,e){var n=t.selection,r=n.$from,o=n.$to;if(r.parent.inlineContent||o.parent.inlineContent)return!1;var s=r.parent.contentMatchAt(o.indexAfter()).defaultType;if(!s||!s.isTextblock)return!1;if(e){var a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,c=t.tr.insert(a,s.createAndFill());c.setSelection(i["TextSelection"].create(c.doc,a+1)),e(c.scrollIntoView())}return!0}function y(t,e){var n=t.selection,o=n.$cursor;if(!o||o.parent.content.size)return!1;if(o.depth>1&&o.after()!=o.end(-1)){var i=o.before();if(Object(r["e"])(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}var s=o.blockRange(),a=s&&Object(r["i"])(s);return null!=a&&(e&&e(t.tr.lift(s,a).scrollIntoView()),!0)}function b(t,e){var n=t.selection,s=n.$from,a=n.$to;if(t.selection instanceof i["NodeSelection"]&&t.selection.node.isBlock)return!(!s.parentOffset||!Object(r["e"])(t.doc,s.pos))&&(e&&e(t.tr.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;if(e){var c=a.parentOffset==a.parent.content.size,l=t.tr;t.selection instanceof i["TextSelection"]&&l.deleteSelection();var u=0==s.depth?null:s.node(-1).contentMatchAt(s.indexAfter(-1)).defaultType,f=c&&u?[{type:u}]:null,p=Object(r["e"])(l.doc,l.mapping.map(s.pos),1,f);f||p||!Object(r["e"])(l.doc,l.mapping.map(s.pos),1,u&&[{type:u}])||(f=[{type:u}],p=!0),p&&(l.split(l.mapping.map(s.pos),1,f),c||s.parentOffset||s.parent.type==u||!s.node(-1).canReplace(s.index(-1),s.indexAfter(-1),o["Fragment"].from(u.create(),s.parent))||l.setNodeMarkup(l.mapping.map(s.before()),u)),e(l.scrollIntoView())}return!0}function w(t,e){return e&&e(t.tr.setSelection(new i["AllSelection"](t.doc))),!0}function S(t,e,n){var o=e.nodeBefore,i=e.nodeAfter,s=e.index();return!!(o&&i&&o.type.compatibleContent(i.type))&&(!o.content.size&&e.parent.canReplace(s-1,s)?(n&&n(t.tr.delete(e.pos-o.nodeSize,e.pos).scrollIntoView()),!0):!(!e.parent.canReplace(s,s+1)||!i.isTextblock&&!Object(r["d"])(t.doc,e.pos))&&(n&&n(t.tr.clearIncompatible(e.pos,o.type,o.contentMatchAt(o.childCount)).join(e.pos).scrollIntoView()),!0))}function x(t,e,n){var s,a,c=e.nodeBefore,l=e.nodeAfter;if(c.type.spec.isolating||l.type.spec.isolating)return!1;if(S(t,e,n))return!0;if(e.parent.canReplace(e.index(),e.index()+1)&&(s=(a=c.contentMatchAt(c.childCount)).findWrapping(l.type))&&a.matchType(s[0]||l.type).validEnd){if(n){for(var u=e.pos+l.nodeSize,f=o["Fragment"].empty,p=s.length-1;p>=0;p--)f=o["Fragment"].from(s[p].create(null,f));f=o["Fragment"].from(c.copy(f));var d=t.tr.step(new r["a"](e.pos-1,u,e.pos,u,new o["Slice"](f,1,0),s.length,!0)),h=u+2*s.length;Object(r["d"])(d.doc,h)&&d.join(h),n(d.scrollIntoView())}return!0}var v=i["Selection"].findFrom(e,1),m=v&&v.$from.blockRange(v.$to),g=m&&Object(r["i"])(m);return null!=g&&g>=e.depth&&(n&&n(t.tr.lift(m,g).scrollIntoView()),!0)}function k(t,e){return function(n,o){var i=n.selection,s=i.$from,a=i.$to,c=s.blockRange(a),l=c&&Object(r["g"])(c,t,e);return!!l&&(o&&o(n.tr.wrap(c,l).scrollIntoView()),!0)}}function C(t,e){return function(n,r){var o=n.selection,i=o.from,s=o.to,a=!1;return n.doc.nodesBetween(i,s,(function(r,o){if(a)return!1;if(r.isTextblock&&!r.hasMarkup(t,e))if(r.type==t)a=!0;else{var i=n.doc.resolve(o),s=i.index();a=i.parent.canReplaceWith(s,s+1,t)}})),!!a&&(r&&r(n.tr.setBlockType(i,s,t,e).scrollIntoView()),!0)}}function O(t,e,n){for(var r=function(r){var o=e[r],i=o.$from,s=o.$to,a=0==i.depth&&t.type.allowsMarkType(n);if(t.nodesBetween(i.pos,s.pos,(function(t){if(a)return!1;a=t.inlineContent&&t.type.allowsMarkType(n)})),a)return{v:!0}},o=0;o<e.length;o++){var i=r(o);if(i)return i.v}return!1}function M(t,e){return function(n,r){var o=n.selection,i=o.empty,s=o.$cursor,a=o.ranges;if(i&&!s||!O(n.doc,a,t))return!1;if(r)if(s)t.isInSet(n.storedMarks||s.marks())?r(n.tr.removeStoredMark(t)):r(n.tr.addStoredMark(t.create(e)));else{for(var c=!1,l=n.tr,u=0;!c&&u<a.length;u++){var f=a[u],p=f.$from,d=f.$to;c=n.doc.rangeHasMark(p.pos,d.pos,t)}for(var h=0;h<a.length;h++){var v=a[h],m=v.$from,g=v.$to;c?l.removeMark(m.pos,g.pos,t):l.addMark(m.pos,g.pos,t.create(e))}r(l.scrollIntoView())}return!0}}function N(){var t=[],e=arguments.length;while(e--)t[e]=arguments[e];return function(e,n,r){for(var o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}var A=N(s,a,l),_=N(s,f,p),T={Enter:N(v,g,y,b),"Mod-Enter":m,Backspace:A,"Mod-Backspace":A,Delete:_,"Mod-Delete":_,"Mod-a":w},D={"Ctrl-h":T["Backspace"],"Alt-Backspace":T["Mod-Backspace"],"Ctrl-d":T["Delete"],"Ctrl-Alt-Backspace":T["Mod-Delete"],"Alt-Delete":T["Mod-Delete"],"Alt-d":T["Mod-Delete"]};for(var E in T)D[E]=T[E];var P="undefined"!=typeof navigator?/Mac/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform(),R=P?D:T},"00ee":function(t,e,n){var r=n("b622"),o=r("toStringTag"),i={};i[o]="z",t.exports="[object z]"===String(i)},"057f":function(t,e,n){var r=n("fc6a"),o=n("241c").f,i={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return o(t)}catch(e){return s.slice()}};t.exports.f=function(t){return s&&"[object Window]"==i.call(t)?a(t):o(r(t))}},"06cf":function(t,e,n){var r=n("83ab"),o=n("d1e7"),i=n("5c6c"),s=n("fc6a"),a=n("c04e"),c=n("5135"),l=n("0cfb"),u=Object.getOwnPropertyDescriptor;e.f=r?u:function(t,e){if(t=s(t),e=a(e,!0),l)try{return u(t,e)}catch(n){}if(c(t,e))return i(!o.f.call(t,e),t[e])}},"0ac0":function(t,e,n){"use strict";n.d(e,"a",(function(){return w})),n.d(e,"b",(function(){return b})),n.d(e,"c",(function(){return d})),n.d(e,"d",(function(){return T})),n.d(e,"e",(function(){return _})),n.d(e,"f",(function(){return R})),n.d(e,"g",(function(){return C})),n.d(e,"h",(function(){return E})),n.d(e,"i",(function(){return k}));var r=n("304a"),o=65535,i=Math.pow(2,16);function s(t,e){return t+e*i}function a(t){return t&o}function c(t){return(t-(t&o))/i}var l=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=null),this.pos=t,this.deleted=e,this.recover=n},u=function(t,e){void 0===e&&(e=!1),this.ranges=t,this.inverted=e};u.prototype.recover=function(t){var e=0,n=a(t);if(!this.inverted)for(var r=0;r<n;r++)e+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+e+c(t)},u.prototype.mapResult=function(t,e){return void 0===e&&(e=1),this._map(t,e,!1)},u.prototype.map=function(t,e){return void 0===e&&(e=1),this._map(t,e,!0)},u.prototype._map=function(t,e,n){for(var r=0,o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var c=this.ranges[a]-(this.inverted?r:0);if(c>t)break;var u=this.ranges[a+o],f=this.ranges[a+i],p=c+u;if(t<=p){var d=u?t==c?-1:t==p?1:e:e,h=c+r+(d<0?0:f);if(n)return h;var v=s(a/3,t-c);return new l(h,e<0?t!=c:t!=p,v)}r+=f-u}return n?t+r:new l(t+r)},u.prototype.touches=function(t,e){for(var n=0,r=a(e),o=this.inverted?2:1,i=this.inverted?1:2,s=0;s<this.ranges.length;s+=3){var c=this.ranges[s]-(this.inverted?n:0);if(c>t)break;var l=this.ranges[s+o],u=c+l;if(t<=u&&s==3*r)return!0;n+=this.ranges[s+i]-l}return!1},u.prototype.forEach=function(t){for(var e=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r<this.ranges.length;r+=3){var i=this.ranges[r],s=i-(this.inverted?o:0),a=i+(this.inverted?0:o),c=this.ranges[r+e],l=this.ranges[r+n];t(s,s+c,a,a+l),o+=l-c}},u.prototype.invert=function(){return new u(this.ranges,!this.inverted)},u.prototype.toString=function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)},u.offset=function(t){return 0==t?u.empty:new u(t<0?[0,-t,0]:[0,0,t])},u.empty=new u([]);var f=function(t,e,n,r){this.maps=t||[],this.from=n||0,this.to=null==r?this.maps.length:r,this.mirror=e};function p(t){var e=Error.call(this,t);return e.__proto__=p.prototype,e}f.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.maps.length),new f(this.maps,this.mirror,t,e)},f.prototype.copy=function(){return new f(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)},f.prototype.appendMap=function(t,e){this.to=this.maps.push(t),null!=e&&this.setMirror(this.maps.length-1,e)},f.prototype.appendMapping=function(t){for(var e=0,n=this.maps.length;e<t.maps.length;e++){var r=t.getMirror(e);this.appendMap(t.maps[e],null!=r&&r<e?n+r:null)}},f.prototype.getMirror=function(t){if(this.mirror)for(var e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]},f.prototype.setMirror=function(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)},f.prototype.appendMappingInverted=function(t){for(var e=t.maps.length-1,n=this.maps.length+t.maps.length;e>=0;e--){var r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?n-r-1:null)}},f.prototype.invert=function(){var t=new f;return t.appendMappingInverted(this),t},f.prototype.map=function(t,e){if(void 0===e&&(e=1),this.mirror)return this._map(t,e,!0);for(var n=this.from;n<this.to;n++)t=this.maps[n].map(t,e);return t},f.prototype.mapResult=function(t,e){return void 0===e&&(e=1),this._map(t,e,!1)},f.prototype._map=function(t,e,n){for(var r=!1,o=null,i=this.from;i<this.to;i++){var s=this.maps[i],a=o&&o[i];if(null!=a&&s.touches(t,a))t=s.recover(a);else{var c=s.mapResult(t,e);if(null!=c.recover){var u=this.getMirror(i);if(null!=u&&u>i&&u<this.to){if(c.deleted){i=u,t=this.maps[u].recover(c.recover);continue}(o||(o=Object.create(null)))[u]=c.recover}}c.deleted&&(r=!0),t=c.pos}}return n?t:new l(t,r)},p.prototype=Object.create(Error.prototype),p.prototype.constructor=p,p.prototype.name="TransformError";var d=function(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new f},h={before:{configurable:!0},docChanged:{configurable:!0}};function v(){throw new Error("Override me")}h.before.get=function(){return this.docs.length?this.docs[0]:this.doc},d.prototype.step=function(t){var e=this.maybeStep(t);if(e.failed)throw new p(e.failed);return this},d.prototype.maybeStep=function(t){var e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e},h.docChanged.get=function(){return this.steps.length>0},d.prototype.addStep=function(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e},Object.defineProperties(d.prototype,h);var m=Object.create(null),g=function(){};g.prototype.apply=function(t){return v()},g.prototype.getMap=function(){return u.empty},g.prototype.invert=function(t){return v()},g.prototype.map=function(t){return v()},g.prototype.merge=function(t){return null},g.prototype.toJSON=function(){return v()},g.fromJSON=function(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=m[e.stepType];if(!n)throw new RangeError("No step type "+e.stepType+" defined");return n.fromJSON(t,e)},g.jsonID=function(t,e){if(t in m)throw new RangeError("Duplicate use of step JSON ID "+t);return m[t]=e,e.prototype.jsonID=t,e};var y=function(t,e){this.doc=t,this.failed=e};y.ok=function(t){return new y(t,null)},y.fail=function(t){return new y(null,t)},y.fromReplace=function(t,e,n,o){try{return y.ok(t.replace(e,n,o))}catch(i){if(i instanceof r["ReplaceError"])return y.fail(i.message);throw i}};var b=function(t){function e(e,n,r,o){t.call(this),this.from=e,this.to=n,this.slice=r,this.structure=!!o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){return this.structure&&S(t,this.from,this.to)?y.fail("Structure replace would overwrite content"):y.fromReplace(t,this.from,this.to,this.slice)},e.prototype.getMap=function(){return new u([this.from,this.to-this.from,this.slice.size])},e.prototype.invert=function(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new e(n.pos,Math.max(n.pos,r.pos),this.slice)},e.prototype.merge=function(t){if(!(t instanceof e)||t.structure!=this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;var n=this.slice.size+t.slice.size==0?r["Slice"].empty:new r["Slice"](t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}var o=this.slice.size+t.slice.size==0?r["Slice"].empty:new r["Slice"](this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),o,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(n.from,n.to,r["Slice"].fromJSON(t,n.slice),!!n.structure)},e}(g);g.jsonID("replace",b);var w=function(t){function e(e,n,r,o,i,s,a){t.call(this),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=s,this.structure=!!a}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){if(this.structure&&(S(t,this.from,this.gapFrom)||S(t,this.gapTo,this.to)))return y.fail("Structure gap-replace would overwrite content");var e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return y.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,e.content);return n?y.fromReplace(t,this.from,this.to,n):y.fail("Content does not fit in gap")},e.prototype.getMap=function(){return new u([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},e.prototype.invert=function(t){var n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),o=t.map(this.gapFrom,-1),i=t.map(this.gapTo,1);return n.deleted&&r.deleted||o<n.pos||i>r.pos?null:new e(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,r["Slice"].fromJSON(t,n.slice),n.insert,!!n.structure)},e}(g);function S(t,e,n){var r=t.resolve(e),o=n-e,i=r.depth;while(o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount)i--,o--;if(o>0){var s=r.node(i).maybeChild(r.indexAfter(i));while(o>0){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function x(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function k(t){for(var e=t.parent,n=e.content.cutByIndex(t.startIndex,t.endIndex),r=t.depth;;--r){var o=t.$from.node(r),i=t.$from.index(r),s=t.$to.indexAfter(r);if(r<t.depth&&o.canReplace(i,s,n))return r;if(0==r||o.type.spec.isolating||!x(o,i,s))break}}function C(t,e,n,r){void 0===r&&(r=t);var o=M(t,e),i=o&&N(r,e);return i?o.map(O).concat({type:e,attrs:n}).concat(i.map(O)):null}function O(t){return{type:t,attrs:null}}function M(t,e){var n=t.parent,r=t.startIndex,o=t.endIndex,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;var s=i.length?i[0]:e;return n.canReplaceWith(r,o,s)?i:null}function N(t,e){var n=t.parent,r=t.startIndex,o=t.endIndex,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;for(var a=s.length?s[s.length-1]:e,c=a.contentMatch,l=r;c&&l<o;l++)c=c.matchType(n.child(l).type);return c&&c.validEnd?s:null}function A(t,e,n){var r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function _(t,e,n,r){void 0===n&&(n=1);var o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var a=o.depth-1,c=n-2;a>i;a--,c--){var l=o.node(a),u=o.index(a);if(l.type.spec.isolating)return!1;var f=l.content.cutByIndex(u,l.childCount),p=r&&r[c]||l;if(p!=l&&(f=f.replaceChild(0,p.type.create(p.attrs))),!l.canReplace(u+1,l.childCount)||!p.type.validContent(f))return!1}var d=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(d,d,h?h.type:o.node(i+1).type)}function T(t,e){var n=t.resolve(e),r=n.index();return D(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function D(t,e){return t&&e&&!t.isLeaf&&t.canAppend(e)}function E(t,e,n){void 0===n&&(n=-1);for(var r=t.resolve(e),o=r.depth;;o--){var i=void 0,s=void 0;if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),s=r.node(o).maybeChild(r.index(o)+1)):(i=r.node(o).maybeChild(r.index(o)-1),s=r.node(o+1)),i&&!i.isTextblock&&D(i,s))return e;if(0==o)break;e=n<0?r.before(o):r.after(o)}}function P(t,e,n){var r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var s=r.depth-1;s>=0;s--){var a=r.indexAfter(s);if(r.node(s).canReplaceWith(a,a,n))return r.after(s+1);if(a<r.node(s).childCount)return null}}function R(t,e,n){var r=t.resolve(e);if(!n.content.size)return e;for(var o=n.content,i=0;i<n.openStart;i++)o=o.firstChild.content;for(var s=1;s<=(0==n.openStart&&n.size?2:1);s++)for(var a=r.depth;a>=0;a--){var c=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,l=r.index(a)+(c>0?1:0);if(1==s?r.node(a).canReplace(l,l,o):r.node(a).contentMatchAt(l).findWrapping(o.firstChild.type))return 0==c?r.pos:c<0?r.before(a+1):r.after(a+1)}return null}function $(t,e,n){for(var o=[],i=0;i<t.childCount;i++){var s=t.child(i);s.content.size&&(s=s.copy($(s.content,e,s))),s.isInline&&(s=e(s,n,i)),o.push(s)}return r["Fragment"].fromArray(o)}g.jsonID("replaceAround",w),d.prototype.lift=function(t,e){for(var n=t.$from,o=t.$to,i=t.depth,s=n.before(i+1),a=o.after(i+1),c=s,l=a,u=r["Fragment"].empty,f=0,p=i,d=!1;p>e;p--)d||n.index(p)>0?(d=!0,u=r["Fragment"].from(n.node(p).copy(u)),f++):c--;for(var h=r["Fragment"].empty,v=0,m=i,g=!1;m>e;m--)g||o.after(m+1)<o.end(m)?(g=!0,h=r["Fragment"].from(o.node(m).copy(h)),v++):l++;return this.step(new w(c,l,s,a,new r["Slice"](u.append(h),f,v),u.size-f,!0))},d.prototype.wrap=function(t,e){for(var n=r["Fragment"].empty,o=e.length-1;o>=0;o--)n=r["Fragment"].from(e[o].type.create(e[o].attrs,n));var i=t.start,s=t.end;return this.step(new w(i,s,i,s,new r["Slice"](n,0,0),e.length,!0))},d.prototype.setBlockType=function(t,e,n,o){var i=this;if(void 0===e&&(e=t),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var s=this.steps.length;return this.doc.nodesBetween(t,e,(function(t,e){if(t.isTextblock&&!t.hasMarkup(n,o)&&A(i.doc,i.mapping.slice(s).map(e),n)){i.clearIncompatible(i.mapping.slice(s).map(e,1),n);var a=i.mapping.slice(s),c=a.map(e,1),l=a.map(e+t.nodeSize,1);return i.step(new w(c,l,c+1,l-1,new r["Slice"](r["Fragment"].from(n.create(o,null,t.marks)),0,0),1,!0)),!1}})),this},d.prototype.setNodeMarkup=function(t,e,n,o){var i=this.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");e||(e=i.type);var s=e.create(n,null,o||i.marks);if(i.isLeaf)return this.replaceWith(t,t+i.nodeSize,s);if(!e.validContent(i.content))throw new RangeError("Invalid content for node type "+e.name);return this.step(new w(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new r["Slice"](r["Fragment"].from(s),0,0),1,!0))},d.prototype.split=function(t,e,n){void 0===e&&(e=1);for(var o=this.doc.resolve(t),i=r["Fragment"].empty,s=r["Fragment"].empty,a=o.depth,c=o.depth-e,l=e-1;a>c;a--,l--){i=r["Fragment"].from(o.node(a).copy(i));var u=n&&n[l];s=r["Fragment"].from(u?u.type.create(u.attrs,s):o.node(a).copy(s))}return this.step(new b(t,t,new r["Slice"](i.append(s),e,e),!0))},d.prototype.join=function(t,e){void 0===e&&(e=1);var n=new b(t-e,t+e,r["Slice"].empty,!0);return this.step(n)};var I=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),o=t.resolve(this.from),i=o.node(o.sharedDepth(this.to)),s=new r["Slice"]($(n.content,(function(t,n){return n.type.allowsMarkType(e.mark.type)?t.mark(e.mark.addToSet(t.marks)):t}),i),n.openStart,n.openEnd);return y.fromReplace(t,this.from,this.to,s)},e.prototype.invert=function(){return new j(this.from,this.to,this.mark)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))},e}(g);g.jsonID("addMark",I);var j=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),o=new r["Slice"]($(n.content,(function(t){return t.mark(e.mark.removeFromSet(t.marks))})),n.openStart,n.openEnd);return y.fromReplace(t,this.from,this.to,o)},e.prototype.invert=function(){return new I(this.from,this.to,this.mark)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))},e}(g);function z(t,e,n,o){if(void 0===n&&(n=e),void 0===o&&(o=r["Slice"].empty),e==n&&!o.size)return null;var i=t.resolve(e),s=t.resolve(n);if(H(i,s,o))return new b(e,n,o);var a=G(i,o),c=V(i,a),l=K(i,s,c);if(!l)return null;if(c.size!=l.size&&J(i,s,c)){var u=s.depth,f=s.after(u);while(u>1&&f==s.end(--u))++f;var p=K(i,t.resolve(f),c);if(p)return new w(e,f,n,s.end(),p,c.size)}return l.size||e!=n?new b(e,n,l):null}function F(t,e,n,o){var i=r["Fragment"].empty,s=0,a=n[e];if(t.depth>e){var c=F(t,e+1,n,o||a);s=c.openEnd+1,i=r["Fragment"].from(t.node(e+1).copy(c.content))}return a&&(i=i.append(a.content),s=a.openEnd),o&&(i=i.append(t.node(e).contentMatchAt(t.indexAfter(e)).fillBefore(r["Fragment"].empty,!0)),s=0),{content:i,openEnd:s}}function V(t,e){var n=F(t,0,e,!1),o=n.content,i=n.openEnd;return new r["Slice"](o,t.depth,i||0)}function B(t,e,n,r,o,i,s){var a,c=t.childCount,l=c-(s>0?1:0),u=i<0?e:n.node(o);a=i<0?u.contentMatchAt(l):1==c&&s>0?u.contentMatchAt(i?n.index(o):n.indexAfter(o)):u.contentMatchAt(n.indexAfter(o)).matchFragment(t,c>0&&i?1:0,l);var f=r.node(o);if(s>0&&o<r.depth){var p=f.content.cutByIndex(r.indexAfter(o)).addToStart(t.lastChild),d=a.fillBefore(p,!0);if(d&&d.size&&i>0&&1==c&&(d=null),d){var h=B(t.lastChild.content,t.lastChild,n,r,o+1,1==c?i-1:-1,s-1);if(h){var v=t.lastChild.copy(h);return d.size?t.cutByIndex(0,c-1).append(d).addToEnd(v):t.replaceChild(c-1,v)}}}s>0&&(a=a.matchType((1==c&&i>0?n.node(o+1):t.lastChild).type));var m=r.index(o);if(m==f.childCount&&!f.type.compatibleContent(e.type))return null;for(var g=a.fillBefore(f.content,!0,m),y=m;g&&y<f.content.childCount;y++)u.type.allowsMarks(f.content.child(y).marks)||(g=null);if(!g)return null;if(s>0){var b=L(t.lastChild,s-1,n,o+1,1==c?i-1:-1);t=t.replaceChild(c-1,b)}return t=t.append(g),r.depth>o&&(t=t.addToEnd(W(r,o+1))),t}function L(t,e,n,o,i){var s,a=t.content,c=a.childCount;if(s=i>=0?n.node(o).contentMatchAt(n.indexAfter(o)).matchFragment(a,i>0?1:0,c):t.contentMatchAt(c),e>0){var l=L(a.lastChild,e-1,n,o+1,1==c?i-1:-1);a=a.replaceChild(c-1,l)}return t.copy(a.append(s.fillBefore(r["Fragment"].empty,!0)))}function W(t,e){var n=t.node(e),r=n.contentMatchAt(0).fillBefore(n.content,!0,t.index(e));return t.depth>e&&(r=r.addToEnd(W(t,e+1))),n.copy(r)}function q(t,e,n){while(e>0&&n>0&&1==t.childCount)t=t.firstChild.content,e--,n--;return new r["Slice"](t,e,n)}function K(t,e,n){var r=B(n.content,t.node(0),t,e,0,n.openStart,n.openEnd);return r?q(r,n.openStart,e.depth):null}function H(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}function J(t,e,n){if(!e.parent.isTextblock)return!1;var r,o=n.openEnd?U(n.content,n.openEnd):t.node(t.depth-(n.openStart-n.openEnd));if(!o.isTextblock)return!1;for(var i=e.index();i<e.parent.childCount;i++)if(!o.type.allowsMarks(e.parent.child(i).marks))return!1;return n.openEnd?r=o.contentMatchAt(o.childCount):(r=o.contentMatchAt(o.childCount),n.size&&(r=r.matchFragment(n.content,n.openStart?1:0))),r=r.matchFragment(e.parent.content,e.index()),r&&r.validEnd}function U(t,e){for(var n=1;n<e;n++)t=t.lastChild.content;return t.lastChild}function G(t,e){for(var n=new X(t),r=1;e.size&&r<=3;r++){var o=n.placeSlice(e.content,e.openStart,e.openEnd,r);3==r&&o!=e&&o.size&&(r=0),e=o}while(n.open.length)n.closeNode();return n.placed}g.jsonID("removeMark",j),d.prototype.addMark=function(t,e,n){var r=this,o=[],i=[],s=null,a=null;return this.doc.nodesBetween(t,e,(function(r,c,l){if(r.isInline){var u=r.marks;if(!n.isInSet(u)&&l.type.allowsMarkType(n.type)){for(var f=Math.max(c,t),p=Math.min(c+r.nodeSize,e),d=n.addToSet(u),h=0;h<u.length;h++)u[h].isInSet(d)||(s&&s.to==f&&s.mark.eq(u[h])?s.to=p:o.push(s=new j(f,p,u[h])));a&&a.to==f?a.to=p:i.push(a=new I(f,p,n))}}})),o.forEach((function(t){return r.step(t)})),i.forEach((function(t){return r.step(t)})),this},d.prototype.removeMark=function(t,e,n){var o=this;void 0===n&&(n=null);var i=[],s=0;return this.doc.nodesBetween(t,e,(function(o,a){if(o.isInline){s++;var c=null;if(n instanceof r["MarkType"]){var l=n.isInSet(o.marks);l&&(c=[l])}else n?n.isInSet(o.marks)&&(c=[n]):c=o.marks;if(c&&c.length)for(var u=Math.min(a+o.nodeSize,e),f=0;f<c.length;f++){for(var p=c[f],d=void 0,h=0;h<i.length;h++){var v=i[h];v.step==s-1&&p.eq(i[h].style)&&(d=v)}d?(d.to=u,d.step=s):i.push({style:p,from:Math.max(a,t),to:u,step:s})}}})),i.forEach((function(t){return o.step(new j(t.from,t.to,t.style))})),this},d.prototype.clearIncompatible=function(t,e,n){void 0===n&&(n=e.contentMatch);for(var o=this.doc.nodeAt(t),i=[],s=t+1,a=0;a<o.childCount;a++){var c=o.child(a),l=s+c.nodeSize,u=n.matchType(c.type,c.attrs);if(u){n=u;for(var f=0;f<c.marks.length;f++)e.allowsMarkType(c.marks[f].type)||this.step(new j(s,l,c.marks[f]))}else i.push(new b(s,l,r["Slice"].empty));s=l}if(!n.validEnd){var p=n.fillBefore(r["Fragment"].empty,!0);this.replace(s,s,new r["Slice"](p,0,0))}for(var d=i.length-1;d>=0;d--)this.step(i[d]);return this},d.prototype.replace=function(t,e,n){void 0===e&&(e=t),void 0===n&&(n=r["Slice"].empty);var o=z(this.doc,t,e,n);return o&&this.step(o),this},d.prototype.replaceWith=function(t,e,n){return this.replace(t,e,new r["Slice"](r["Fragment"].from(n),0,0))},d.prototype.delete=function(t,e){return this.replace(t,e,r["Slice"].empty)},d.prototype.insert=function(t,e){return this.replaceWith(t,t,e)};var X=function(t){this.open=[];for(var e=0;e<=t.depth;e++){var n=t.node(e),o=n.contentMatchAt(t.indexAfter(e));this.open.push({parent:n,match:o,content:r["Fragment"].empty,wrapper:!1,openEnd:0,depth:e})}this.placed=[]};function Y(t,e,n){var r=t.content;if(e>1){var o=Y(t.firstChild,e-1,1==t.childCount?n-1:0);r=t.content.replaceChild(0,o)}var i=t.type.contentMatch.fillBefore(r,0==n);return t.copy(i.append(r))}function Q(t,e){var n=t.content;if(e>1){var o=Q(t.lastChild,e-1);n=t.content.replaceChild(t.childCount-1,o)}var i=t.contentMatchAt(t.childCount).fillBefore(r["Fragment"].empty,!0);return t.copy(n.append(i))}function Z(t,e){return e?t.replaceChild(t.childCount-1,Q(t.lastChild,e)):t}function tt(t,e,n,o,i){if(e<n){var s=t.firstChild;t=t.replaceChild(0,s.copy(tt(s.content,e+1,n,o,s)))}if(e>o){var a=i.contentMatchAt(0),c=a.fillBefore(t).append(t);t=c.append(a.matchFragment(c).fillBefore(r["Fragment"].empty,!0))}return t}function et(t,e){for(var n=[],r=Math.min(t.depth,e.depth),o=r;o>=0;o--){var i=t.start(o);if(i<t.pos-(t.depth-o)||e.end(o)>e.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;i==e.start(o)&&n.push(o)}return n}X.prototype.placeSlice=function(t,e,n,o,i){if(e>0){var s=t.firstChild,a=this.placeSlice(s.content,Math.max(0,e-1),n&&1==t.childCount?n-1:0,o,s);a.content!=s.content&&(a.content.size?(t=t.replaceChild(0,s.copy(a.content)),e=a.openStart+1):(1==t.childCount&&(n=0),t=t.cutByIndex(1),e=0))}var c=this.placeContent(t,e,n,o,i);if(o>2&&c.size&&0==e){var l=c.content.firstChild,u=1==c.content.childCount;this.placeContent(l.content,0,n&&u?n-1:0,o,l),c=u?r["Fragment"].empty:new r["Slice"](c.content.cutByIndex(1),0,n)}return c},X.prototype.placeContent=function(t,e,n,o,i){for(var s=0;s<t.childCount;s++){for(var a=t.child(s),c=!1,l=s==t.childCount-1,u=this.open.length-1;u>=0;u--){var f=this.open[u],p=void 0;if(o>1&&(p=f.match.findWrapping(a.type))&&(!i||!p.length||p[p.length-1]!=i.type)){while(this.open.length-1>u)this.closeNode();for(var d=0;d<p.length;d++)f.match=f.match.matchType(p[d]),u++,f={parent:p[d].create(),match:p[d].contentMatch,content:r["Fragment"].empty,wrapper:!0,openEnd:0,depth:u+d},this.open.push(f)}var h=f.match.matchType(a.type);if(!h){var v=f.match.fillBefore(r["Fragment"].from(a));if(!v){if(i&&f.match.matchType(i.type))break;continue}for(var m=0;m<v.childCount;m++){var g=v.child(m);this.addNode(f,g,0),h=f.match.matchFragment(g)}}while(this.open.length-1>u)this.closeNode();a=a.mark(f.parent.type.allowedMarks(a.marks)),e&&(a=Y(a,e,l?n:0),e=0),this.addNode(f,a,l?n:0),f.match=h,l&&(n=0),c=!0;break}if(!c)break}return this.open.length>1&&(s>0&&s==t.childCount||i&&this.open[this.open.length-1].parent.type==i.type)&&this.closeNode(),new r["Slice"](t.cutByIndex(s),e,n)},X.prototype.addNode=function(t,e,n){t.content=Z(t.content,t.openEnd).addToEnd(e),t.openEnd=n},X.prototype.closeNode=function(){var t=this.open.pop();0==t.content.size||(t.wrapper?this.addNode(this.open[this.open.length-1],t.parent.copy(t.content),t.openEnd+1):this.placed[t.depth]={depth:t.depth,content:t.content,openEnd:t.openEnd})},d.prototype.replaceRange=function(t,e,n){if(!n.size)return this.deleteRange(t,e);var o=this.doc.resolve(t),i=this.doc.resolve(e);if(H(o,i,n))return this.step(new b(t,e,n));var s=et(o,this.doc.resolve(e));0==s[s.length-1]&&s.pop();var a=-(o.depth+1);s.unshift(a);for(var c=o.depth,l=o.pos-1;c>0;c--,l--){var u=o.node(c).type.spec;if(u.defining||u.isolating)break;s.indexOf(c)>-1?a=c:o.before(c)==l&&s.splice(1,0,-c)}for(var f=s.indexOf(a),p=[],d=n.openStart,h=n.content,v=0;;v++){var m=h.firstChild;if(p.push(m),v==n.openStart)break;h=m.content}d>0&&p[d-1].type.spec.defining&&o.node(f).type!=p[d-1].type?d-=1:d>=2&&p[d-1].isTextblock&&p[d-2].type.spec.defining&&o.node(f).type!=p[d-2].type&&(d-=2);for(var g=n.openStart;g>=0;g--){var y=(g+d+1)%(n.openStart+1),w=p[y];if(w)for(var S=0;S<s.length;S++){var x=s[(S+f)%s.length],k=!0;x<0&&(k=!1,x=-x);var C=o.node(x-1),O=o.index(x-1);if(C.canReplaceWith(O,O,w.type,w.marks))return this.replace(o.before(x),k?i.after(x):e,new r["Slice"](tt(n.content,0,n.openStart,y),y,n.openEnd))}}for(var M=this.steps.length,N=s.length-1;N>=0;N--){if(this.replace(t,e,n),this.steps.length>M)break;var A=s[N];N<0||(t=o.before(A),e=i.after(A))}return this},d.prototype.replaceRangeWith=function(t,e,n){if(!n.isInline&&t==e&&this.doc.resolve(t).parent.content.size){var o=P(this.doc,t,n.type);null!=o&&(t=e=o)}return this.replaceRange(t,e,new r["Slice"](r["Fragment"].from(n),0,0))},d.prototype.deleteRange=function(t,e){for(var n=this.doc.resolve(t),r=this.doc.resolve(e),o=et(n,r),i=0;i<o.length;i++){var s=o[i],a=i==o.length-1;if(a&&0==s||n.node(s).type.contentMatch.validEnd)return this.delete(n.start(s),r.end(s));if(s>0&&(a||n.node(s-1).canReplace(n.index(s-1),r.indexAfter(s-1))))return this.delete(n.before(s),r.after(s))}for(var c=1;c<=n.depth&&c<=r.depth;c++)if(t-n.start(c)==n.depth-c&&e>n.end(c)&&r.end(c)-e!=r.depth-c)return this.delete(n.before(c),e);return this.delete(t,e)}},"0cfb":function(t,e,n){var r=n("83ab"),o=n("d039"),i=n("cc12");t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},1276:function(t,e,n){"use strict";var r=n("d784"),o=n("44e7"),i=n("825a"),s=n("1d80"),a=n("4840"),c=n("8aa5"),l=n("50c4"),u=n("14c3"),f=n("9263"),p=n("d039"),d=[].push,h=Math.min,v=4294967295,m=!p((function(){return!RegExp(v,"y")}));r("split",2,(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=String(s(this)),i=void 0===n?v:n>>>0;if(0===i)return[];if(void 0===t)return[r];if(!o(t))return e.call(r,t,i);var a,c,l,u=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,m=new RegExp(t.source,p+"g");while(a=f.call(m,r)){if(c=m.lastIndex,c>h&&(u.push(r.slice(h,a.index)),a.length>1&&a.index<r.length&&d.apply(u,a.slice(1)),l=a[0].length,h=c,u.length>=i))break;m.lastIndex===a.index&&m.lastIndex++}return h===r.length?!l&&m.test("")||u.push(""):u.push(r.slice(h)),u.length>i?u.slice(0,i):u}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var o=s(this),i=void 0==e?void 0:e[t];return void 0!==i?i.call(e,o,n):r.call(String(o),e,n)},function(t,o){var s=n(r,t,this,o,r!==e);if(s.done)return s.value;var f=i(t),p=String(this),d=a(f,RegExp),g=f.unicode,y=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(m?"y":"g"),b=new d(m?f:"^(?:"+f.source+")",y),w=void 0===o?v:o>>>0;if(0===w)return[];if(0===p.length)return null===u(b,p)?[p]:[];var S=0,x=0,k=[];while(x<p.length){b.lastIndex=m?x:0;var C,O=u(b,m?p:p.slice(x));if(null===O||(C=h(l(b.lastIndex+(m?0:x)),p.length))===S)x=c(p,x,g);else{if(k.push(p.slice(S,x)),k.length===w)return k;for(var M=1;M<=O.length-1;M++)if(k.push(O[M]),k.length===w)return k;x=S=C}}return k.push(p.slice(S)),k}]}),!m)},"131a":function(t,e,n){var r=n("23e7"),o=n("d2bb");r({target:"Object",stat:!0},{setPrototypeOf:o})},"14c3":function(t,e,n){var r=n("c6b6"),o=n("9263");t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var i=n.call(t,e);if("object"!==typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},"159b":function(t,e,n){var r=n("da84"),o=n("fdbc"),i=n("17c2"),s=n("9112");for(var a in o){var c=r[a],l=c&&c.prototype;if(l&&l.forEach!==i)try{s(l,"forEach",i)}catch(u){l.forEach=i}}},"17c2":function(t,e,n){"use strict";var r=n("b727").forEach,o=n("b301");t.exports=o("forEach")?function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}:[].forEach},"19aa":function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},"1be4":function(t,e,n){var r=n("d066");t.exports=r("document","documentElement")},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(t,e,n){var r=n("b622"),o=r("iterator"),i=!1;try{var s=0,a={next:function(){return{done:!!s++}},return:function(){i=!0}};a[o]=function(){return this},Array.from(a,(function(){throw 2}))}catch(c){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var r={};r[o]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(c){}return n}},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"1dde":function(t,e,n){var r=n("d039"),o=n("b622"),i=n("60ae"),s=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[],n=e.constructor={};return n[s]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},2266:function(t,e,n){var r=n("825a"),o=n("e95a"),i=n("50c4"),s=n("f8c2"),a=n("35a1"),c=n("9bdd"),l=function(t,e){this.stopped=t,this.result=e},u=t.exports=function(t,e,n,u,f){var p,d,h,v,m,g,y,b=s(e,n,u?2:1);if(f)p=t;else{if(d=a(t),"function"!=typeof d)throw TypeError("Target is not iterable");if(o(d)){for(h=0,v=i(t.length);v>h;h++)if(m=u?b(r(y=t[h])[0],y[1]):b(t[h]),m&&m instanceof l)return m;return new l(!1)}p=d.call(t)}g=p.next;while(!(y=g.call(p)).done)if(m=c(p,b,y.value,u),"object"==typeof m&&m&&m instanceof l)return m;return new l(!1)};u.stop=function(t){return new l(!0,t)}},"23cb":function(t,e,n){var r=n("a691"),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},"23e7":function(t,e,n){var r=n("da84"),o=n("06cf").f,i=n("9112"),s=n("6eeb"),a=n("ce4e"),c=n("e893"),l=n("94ca");t.exports=function(t,e){var n,u,f,p,d,h,v=t.target,m=t.global,g=t.stat;if(u=m?r:g?r[v]||a(v,{}):(r[v]||{}).prototype,u)for(f in e){if(d=e[f],t.noTargetGet?(h=o(u,f),p=h&&h.value):p=u[f],n=l(m?f:v+(g?".":"#")+f,t.forced),!n&&void 0!==p){if(typeof d===typeof p)continue;c(d,p)}(t.sham||p&&p.sham)&&i(d,"sham",!0),s(u,f,d,t)}}},"241c":function(t,e,n){var r=n("ca84"),o=n("7839"),i=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},"25eb":function(t,e,n){var r=n("23e7"),o=n("e583");r({target:"Number",stat:!0,forced:Number.parseInt!=o},{parseInt:o})},"25f0":function(t,e,n){"use strict";var r=n("6eeb"),o=n("825a"),i=n("d039"),s=n("ad6d"),a="toString",c=RegExp.prototype,l=c[a],u=i((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),f=l.name!=a;(u||f)&&r(RegExp.prototype,a,(function(){var t=o(this),e=String(t.source),n=t.flags,r=String(void 0===n&&t instanceof RegExp&&!("flags"in c)?s.call(t):n);return"/"+e+"/"+r}),{unsafe:!0})},2626:function(t,e,n){"use strict";var r=n("d066"),o=n("9bf2"),i=n("b622"),s=n("83ab"),a=i("species");t.exports=function(t){var e=r(t),n=o.f;s&&e&&!e[a]&&n(e,a,{configurable:!0,get:function(){return this}})}},"262e":function(t,e,n){"use strict";n("131a");function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}n.d(e,"a",(function(){return o}))},2877:function(t,e,n){"use strict";function r(t,e,n,r,o,i,s,a){var c,l="function"===typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),s?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},l._ssrRegister=c):o&&(c=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,e){return c.call(e),u(t,e)}}else{var f=l.beforeCreate;l.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:l}}n.d(e,"a",(function(){return r}))},"2b0e":function(t,e,n){"use strict";(function(t){ +/*! + * Vue.js v2.6.11 + * (c) 2014-2019 Evan You + * Released under the MIT License. + */ +var n=Object.freeze({});function r(t){return void 0===t||null===t}function o(t){return void 0!==t&&null!==t}function i(t){return!0===t}function s(t){return!1===t}function a(t){return"string"===typeof t||"number"===typeof t||"symbol"===typeof t||"boolean"===typeof t}function c(t){return null!==t&&"object"===typeof t}var l=Object.prototype.toString;function u(t){return"[object Object]"===l.call(t)}function f(t){return"[object RegExp]"===l.call(t)}function p(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return o(t)&&"function"===typeof t.then&&"function"===typeof t.catch}function h(t){return null==t?"":Array.isArray(t)||u(t)&&t.toString===l?JSON.stringify(t,null,2):String(t)}function v(t){var e=parseFloat(t);return isNaN(e)?t:e}function m(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}m("slot,component",!0);var g=m("key,ref,slot,slot-scope,is");function y(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}var b=Object.prototype.hasOwnProperty;function w(t,e){return b.call(t,e)}function S(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var x=/-(\w)/g,k=S((function(t){return t.replace(x,(function(t,e){return e?e.toUpperCase():""}))})),C=S((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),O=/\B([A-Z])/g,M=S((function(t){return t.replace(O,"-$1").toLowerCase()}));function N(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function A(t,e){return t.bind(e)}var _=Function.prototype.bind?A:N;function T(t,e){e=e||0;var n=t.length-e,r=new Array(n);while(n--)r[n]=t[n+e];return r}function D(t,e){for(var n in e)t[n]=e[n];return t}function E(t){for(var e={},n=0;n<t.length;n++)t[n]&&D(e,t[n]);return e}function P(t,e,n){}var R=function(t,e,n){return!1},$=function(t){return t};function I(t,e){if(t===e)return!0;var n=c(t),r=c(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var o=Array.isArray(t),i=Array.isArray(e);if(o&&i)return t.length===e.length&&t.every((function(t,n){return I(t,e[n])}));if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(o||i)return!1;var s=Object.keys(t),a=Object.keys(e);return s.length===a.length&&s.every((function(n){return I(t[n],e[n])}))}catch(l){return!1}}function j(t,e){for(var n=0;n<t.length;n++)if(I(t[n],e))return n;return-1}function z(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}var F="data-server-rendered",V=["component","directive","filter"],B=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],L={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:R,isReservedAttr:R,isUnknownElement:R,getTagNamespace:P,parsePlatformTagName:$,mustUseProp:R,async:!0,_lifecycleHooks:B},W=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function q(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function K(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var H=new RegExp("[^"+W.source+".$_\\d]");function J(t){if(!H.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}var U,G="__proto__"in{},X="undefined"!==typeof window,Y="undefined"!==typeof WXEnvironment&&!!WXEnvironment.platform,Q=Y&&WXEnvironment.platform.toLowerCase(),Z=X&&window.navigator.userAgent.toLowerCase(),tt=Z&&/msie|trident/.test(Z),et=Z&&Z.indexOf("msie 9.0")>0,nt=Z&&Z.indexOf("edge/")>0,rt=(Z&&Z.indexOf("android"),Z&&/iphone|ipad|ipod|ios/.test(Z)||"ios"===Q),ot=(Z&&/chrome\/\d+/.test(Z),Z&&/phantomjs/.test(Z),Z&&Z.match(/firefox\/(\d+)/)),it={}.watch,st=!1;if(X)try{var at={};Object.defineProperty(at,"passive",{get:function(){st=!0}}),window.addEventListener("test-passive",null,at)}catch(ks){}var ct=function(){return void 0===U&&(U=!X&&!Y&&"undefined"!==typeof t&&(t["process"]&&"server"===t["process"].env.VUE_ENV)),U},lt=X&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ut(t){return"function"===typeof t&&/native code/.test(t.toString())}var ft,pt="undefined"!==typeof Symbol&&ut(Symbol)&&"undefined"!==typeof Reflect&&ut(Reflect.ownKeys);ft="undefined"!==typeof Set&&ut(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var dt=P,ht=0,vt=function(){this.id=ht++,this.subs=[]};vt.prototype.addSub=function(t){this.subs.push(t)},vt.prototype.removeSub=function(t){y(this.subs,t)},vt.prototype.depend=function(){vt.target&&vt.target.addDep(this)},vt.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e<n;e++)t[e].update()},vt.target=null;var mt=[];function gt(t){mt.push(t),vt.target=t}function yt(){mt.pop(),vt.target=mt[mt.length-1]}var bt=function(t,e,n,r,o,i,s,a){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=s,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=a,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},wt={child:{configurable:!0}};wt.child.get=function(){return this.componentInstance},Object.defineProperties(bt.prototype,wt);var St=function(t){void 0===t&&(t="");var e=new bt;return e.text=t,e.isComment=!0,e};function xt(t){return new bt(void 0,void 0,void 0,String(t))}function kt(t){var e=new bt(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var Ct=Array.prototype,Ot=Object.create(Ct),Mt=["push","pop","shift","unshift","splice","sort","reverse"];Mt.forEach((function(t){var e=Ct[t];K(Ot,t,(function(){var n=[],r=arguments.length;while(r--)n[r]=arguments[r];var o,i=e.apply(this,n),s=this.__ob__;switch(t){case"push":case"unshift":o=n;break;case"splice":o=n.slice(2);break}return o&&s.observeArray(o),s.dep.notify(),i}))}));var Nt=Object.getOwnPropertyNames(Ot),At=!0;function _t(t){At=t}var Tt=function(t){this.value=t,this.dep=new vt,this.vmCount=0,K(t,"__ob__",this),Array.isArray(t)?(G?Dt(t,Ot):Et(t,Ot,Nt),this.observeArray(t)):this.walk(t)};function Dt(t,e){t.__proto__=e}function Et(t,e,n){for(var r=0,o=n.length;r<o;r++){var i=n[r];K(t,i,e[i])}}function Pt(t,e){var n;if(c(t)&&!(t instanceof bt))return w(t,"__ob__")&&t.__ob__ instanceof Tt?n=t.__ob__:At&&!ct()&&(Array.isArray(t)||u(t))&&Object.isExtensible(t)&&!t._isVue&&(n=new Tt(t)),e&&n&&n.vmCount++,n}function Rt(t,e,n,r,o){var i=new vt,s=Object.getOwnPropertyDescriptor(t,e);if(!s||!1!==s.configurable){var a=s&&s.get,c=s&&s.set;a&&!c||2!==arguments.length||(n=t[e]);var l=!o&&Pt(n);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=a?a.call(t):n;return vt.target&&(i.depend(),l&&(l.dep.depend(),Array.isArray(e)&&jt(e))),e},set:function(e){var r=a?a.call(t):n;e===r||e!==e&&r!==r||a&&!c||(c?c.call(t,e):n=e,l=!o&&Pt(e),i.notify())}})}}function $t(t,e,n){if(Array.isArray(t)&&p(e))return t.length=Math.max(t.length,e),t.splice(e,1,n),n;if(e in t&&!(e in Object.prototype))return t[e]=n,n;var r=t.__ob__;return t._isVue||r&&r.vmCount?n:r?(Rt(r.value,e,n),r.dep.notify(),n):(t[e]=n,n)}function It(t,e){if(Array.isArray(t)&&p(e))t.splice(e,1);else{var n=t.__ob__;t._isVue||n&&n.vmCount||w(t,e)&&(delete t[e],n&&n.dep.notify())}}function jt(t){for(var e=void 0,n=0,r=t.length;n<r;n++)e=t[n],e&&e.__ob__&&e.__ob__.dep.depend(),Array.isArray(e)&&jt(e)}Tt.prototype.walk=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)Rt(t,e[n])},Tt.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)Pt(t[e])};var zt=L.optionMergeStrategies;function Ft(t,e){if(!e)return t;for(var n,r,o,i=pt?Reflect.ownKeys(e):Object.keys(e),s=0;s<i.length;s++)n=i[s],"__ob__"!==n&&(r=t[n],o=e[n],w(t,n)?r!==o&&u(r)&&u(o)&&Ft(r,o):$t(t,n,o));return t}function Vt(t,e,n){return n?function(){var r="function"===typeof e?e.call(n,n):e,o="function"===typeof t?t.call(n,n):t;return r?Ft(r,o):o}:e?t?function(){return Ft("function"===typeof e?e.call(this,this):e,"function"===typeof t?t.call(this,this):t)}:e:t}function Bt(t,e){var n=e?t?t.concat(e):Array.isArray(e)?e:[e]:t;return n?Lt(n):n}function Lt(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}function Wt(t,e,n,r){var o=Object.create(t||null);return e?D(o,e):o}zt.data=function(t,e,n){return n?Vt(t,e,n):e&&"function"!==typeof e?t:Vt(t,e)},B.forEach((function(t){zt[t]=Bt})),V.forEach((function(t){zt[t+"s"]=Wt})),zt.watch=function(t,e,n,r){if(t===it&&(t=void 0),e===it&&(e=void 0),!e)return Object.create(t||null);if(!t)return e;var o={};for(var i in D(o,t),e){var s=o[i],a=e[i];s&&!Array.isArray(s)&&(s=[s]),o[i]=s?s.concat(a):Array.isArray(a)?a:[a]}return o},zt.props=zt.methods=zt.inject=zt.computed=function(t,e,n,r){if(!t)return e;var o=Object.create(null);return D(o,t),e&&D(o,e),o},zt.provide=Vt;var qt=function(t,e){return void 0===e?t:e};function Kt(t,e){var n=t.props;if(n){var r,o,i,s={};if(Array.isArray(n)){r=n.length;while(r--)o=n[r],"string"===typeof o&&(i=k(o),s[i]={type:null})}else if(u(n))for(var a in n)o=n[a],i=k(a),s[i]=u(o)?o:{type:o};else 0;t.props=s}}function Ht(t,e){var n=t.inject;if(n){var r=t.inject={};if(Array.isArray(n))for(var o=0;o<n.length;o++)r[n[o]]={from:n[o]};else if(u(n))for(var i in n){var s=n[i];r[i]=u(s)?D({from:i},s):{from:s}}else 0}}function Jt(t){var e=t.directives;if(e)for(var n in e){var r=e[n];"function"===typeof r&&(e[n]={bind:r,update:r})}}function Ut(t,e,n){if("function"===typeof e&&(e=e.options),Kt(e,n),Ht(e,n),Jt(e),!e._base&&(e.extends&&(t=Ut(t,e.extends,n)),e.mixins))for(var r=0,o=e.mixins.length;r<o;r++)t=Ut(t,e.mixins[r],n);var i,s={};for(i in t)a(i);for(i in e)w(t,i)||a(i);function a(r){var o=zt[r]||qt;s[r]=o(t[r],e[r],n,r)}return s}function Gt(t,e,n,r){if("string"===typeof n){var o=t[e];if(w(o,n))return o[n];var i=k(n);if(w(o,i))return o[i];var s=C(i);if(w(o,s))return o[s];var a=o[n]||o[i]||o[s];return a}}function Xt(t,e,n,r){var o=e[t],i=!w(n,t),s=n[t],a=te(Boolean,o.type);if(a>-1)if(i&&!w(o,"default"))s=!1;else if(""===s||s===M(t)){var c=te(String,o.type);(c<0||a<c)&&(s=!0)}if(void 0===s){s=Yt(r,o,t);var l=At;_t(!0),Pt(s),_t(l)}return s}function Yt(t,e,n){if(w(e,"default")){var r=e.default;return t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n]?t._props[n]:"function"===typeof r&&"Function"!==Qt(e.type)?r.call(t):r}}function Qt(t){var e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function Zt(t,e){return Qt(t)===Qt(e)}function te(t,e){if(!Array.isArray(e))return Zt(e,t)?0:-1;for(var n=0,r=e.length;n<r;n++)if(Zt(e[n],t))return n;return-1}function ee(t,e,n){gt();try{if(e){var r=e;while(r=r.$parent){var o=r.$options.errorCaptured;if(o)for(var i=0;i<o.length;i++)try{var s=!1===o[i].call(r,t,e,n);if(s)return}catch(ks){re(ks,r,"errorCaptured hook")}}}re(t,e,n)}finally{yt()}}function ne(t,e,n,r,o){var i;try{i=n?t.apply(e,n):t.call(e),i&&!i._isVue&&d(i)&&!i._handled&&(i.catch((function(t){return ee(t,r,o+" (Promise/async)")})),i._handled=!0)}catch(ks){ee(ks,r,o)}return i}function re(t,e,n){if(L.errorHandler)try{return L.errorHandler.call(null,t,e,n)}catch(ks){ks!==t&&oe(ks,null,"config.errorHandler")}oe(t,e,n)}function oe(t,e,n){if(!X&&!Y||"undefined"===typeof console)throw t;console.error(t)}var ie,se=!1,ae=[],ce=!1;function le(){ce=!1;var t=ae.slice(0);ae.length=0;for(var e=0;e<t.length;e++)t[e]()}if("undefined"!==typeof Promise&&ut(Promise)){var ue=Promise.resolve();ie=function(){ue.then(le),rt&&setTimeout(P)},se=!0}else if(tt||"undefined"===typeof MutationObserver||!ut(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())ie="undefined"!==typeof setImmediate&&ut(setImmediate)?function(){setImmediate(le)}:function(){setTimeout(le,0)};else{var fe=1,pe=new MutationObserver(le),de=document.createTextNode(String(fe));pe.observe(de,{characterData:!0}),ie=function(){fe=(fe+1)%2,de.data=String(fe)},se=!0}function he(t,e){var n;if(ae.push((function(){if(t)try{t.call(e)}catch(ks){ee(ks,e,"nextTick")}else n&&n(e)})),ce||(ce=!0,ie()),!t&&"undefined"!==typeof Promise)return new Promise((function(t){n=t}))}var ve=new ft;function me(t){ge(t,ve),ve.clear()}function ge(t,e){var n,r,o=Array.isArray(t);if(!(!o&&!c(t)||Object.isFrozen(t)||t instanceof bt)){if(t.__ob__){var i=t.__ob__.dep.id;if(e.has(i))return;e.add(i)}if(o){n=t.length;while(n--)ge(t[n],e)}else{r=Object.keys(t),n=r.length;while(n--)ge(t[r[n]],e)}}}var ye=S((function(t){var e="&"===t.charAt(0);t=e?t.slice(1):t;var n="~"===t.charAt(0);t=n?t.slice(1):t;var r="!"===t.charAt(0);return t=r?t.slice(1):t,{name:t,once:n,capture:r,passive:e}}));function be(t,e){function n(){var t=arguments,r=n.fns;if(!Array.isArray(r))return ne(r,null,arguments,e,"v-on handler");for(var o=r.slice(),i=0;i<o.length;i++)ne(o[i],null,t,e,"v-on handler")}return n.fns=t,n}function we(t,e,n,o,s,a){var c,l,u,f;for(c in t)l=t[c],u=e[c],f=ye(c),r(l)||(r(u)?(r(l.fns)&&(l=t[c]=be(l,a)),i(f.once)&&(l=t[c]=s(f.name,l,f.capture)),n(f.name,l,f.capture,f.passive,f.params)):l!==u&&(u.fns=l,t[c]=u));for(c in e)r(t[c])&&(f=ye(c),o(f.name,e[c],f.capture))}function Se(t,e,n){var s;t instanceof bt&&(t=t.data.hook||(t.data.hook={}));var a=t[e];function c(){n.apply(this,arguments),y(s.fns,c)}r(a)?s=be([c]):o(a.fns)&&i(a.merged)?(s=a,s.fns.push(c)):s=be([a,c]),s.merged=!0,t[e]=s}function xe(t,e,n){var i=e.options.props;if(!r(i)){var s={},a=t.attrs,c=t.props;if(o(a)||o(c))for(var l in i){var u=M(l);ke(s,c,l,u,!0)||ke(s,a,l,u,!1)}return s}}function ke(t,e,n,r,i){if(o(e)){if(w(e,n))return t[n]=e[n],i||delete e[n],!0;if(w(e,r))return t[n]=e[r],i||delete e[r],!0}return!1}function Ce(t){for(var e=0;e<t.length;e++)if(Array.isArray(t[e]))return Array.prototype.concat.apply([],t);return t}function Oe(t){return a(t)?[xt(t)]:Array.isArray(t)?Ne(t):void 0}function Me(t){return o(t)&&o(t.text)&&s(t.isComment)}function Ne(t,e){var n,s,c,l,u=[];for(n=0;n<t.length;n++)s=t[n],r(s)||"boolean"===typeof s||(c=u.length-1,l=u[c],Array.isArray(s)?s.length>0&&(s=Ne(s,(e||"")+"_"+n),Me(s[0])&&Me(l)&&(u[c]=xt(l.text+s[0].text),s.shift()),u.push.apply(u,s)):a(s)?Me(l)?u[c]=xt(l.text+s):""!==s&&u.push(xt(s)):Me(s)&&Me(l)?u[c]=xt(l.text+s.text):(i(t._isVList)&&o(s.tag)&&r(s.key)&&o(e)&&(s.key="__vlist"+e+"_"+n+"__"),u.push(s)));return u}function Ae(t){var e=t.$options.provide;e&&(t._provided="function"===typeof e?e.call(t):e)}function _e(t){var e=Te(t.$options.inject,t);e&&(_t(!1),Object.keys(e).forEach((function(n){Rt(t,n,e[n])})),_t(!0))}function Te(t,e){if(t){for(var n=Object.create(null),r=pt?Reflect.ownKeys(t):Object.keys(t),o=0;o<r.length;o++){var i=r[o];if("__ob__"!==i){var s=t[i].from,a=e;while(a){if(a._provided&&w(a._provided,s)){n[i]=a._provided[s];break}a=a.$parent}if(!a)if("default"in t[i]){var c=t[i].default;n[i]="function"===typeof c?c.call(e):c}else 0}}return n}}function De(t,e){if(!t||!t.length)return{};for(var n={},r=0,o=t.length;r<o;r++){var i=t[r],s=i.data;if(s&&s.attrs&&s.attrs.slot&&delete s.attrs.slot,i.context!==e&&i.fnContext!==e||!s||null==s.slot)(n.default||(n.default=[])).push(i);else{var a=s.slot,c=n[a]||(n[a]=[]);"template"===i.tag?c.push.apply(c,i.children||[]):c.push(i)}}for(var l in n)n[l].every(Ee)&&delete n[l];return n}function Ee(t){return t.isComment&&!t.asyncFactory||" "===t.text}function Pe(t,e,r){var o,i=Object.keys(e).length>0,s=t?!!t.$stable:!i,a=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(s&&r&&r!==n&&a===r.$key&&!i&&!r.$hasNormal)return r;for(var c in o={},t)t[c]&&"$"!==c[0]&&(o[c]=Re(e,c,t[c]))}else o={};for(var l in e)l in o||(o[l]=$e(e,l));return t&&Object.isExtensible(t)&&(t._normalized=o),K(o,"$stable",s),K(o,"$key",a),K(o,"$hasNormal",i),o}function Re(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({});return t=t&&"object"===typeof t&&!Array.isArray(t)?[t]:Oe(t),t&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function $e(t,e){return function(){return t[e]}}function Ie(t,e){var n,r,i,s,a;if(Array.isArray(t)||"string"===typeof t)for(n=new Array(t.length),r=0,i=t.length;r<i;r++)n[r]=e(t[r],r);else if("number"===typeof t)for(n=new Array(t),r=0;r<t;r++)n[r]=e(r+1,r);else if(c(t))if(pt&&t[Symbol.iterator]){n=[];var l=t[Symbol.iterator](),u=l.next();while(!u.done)n.push(e(u.value,n.length)),u=l.next()}else for(s=Object.keys(t),n=new Array(s.length),r=0,i=s.length;r<i;r++)a=s[r],n[r]=e(t[a],a,r);return o(n)||(n=[]),n._isVList=!0,n}function je(t,e,n,r){var o,i=this.$scopedSlots[t];i?(n=n||{},r&&(n=D(D({},r),n)),o=i(n)||e):o=this.$slots[t]||e;var s=n&&n.slot;return s?this.$createElement("template",{slot:s},o):o}function ze(t){return Gt(this.$options,"filters",t,!0)||$}function Fe(t,e){return Array.isArray(t)?-1===t.indexOf(e):t!==e}function Ve(t,e,n,r,o){var i=L.keyCodes[e]||n;return o&&r&&!L.keyCodes[e]?Fe(o,r):i?Fe(i,t):r?M(r)!==e:void 0}function Be(t,e,n,r,o){if(n)if(c(n)){var i;Array.isArray(n)&&(n=E(n));var s=function(s){if("class"===s||"style"===s||g(s))i=t;else{var a=t.attrs&&t.attrs.type;i=r||L.mustUseProp(e,a,s)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}var c=k(s),l=M(s);if(!(c in i)&&!(l in i)&&(i[s]=n[s],o)){var u=t.on||(t.on={});u["update:"+s]=function(t){n[s]=t}}};for(var a in n)s(a)}else;return t}function Le(t,e){var n=this._staticTrees||(this._staticTrees=[]),r=n[t];return r&&!e?r:(r=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,null,this),qe(r,"__static__"+t,!1),r)}function We(t,e,n){return qe(t,"__once__"+e+(n?"_"+n:""),!0),t}function qe(t,e,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]&&"string"!==typeof t[r]&&Ke(t[r],e+"_"+r,n);else Ke(t,e,n)}function Ke(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function He(t,e){if(e)if(u(e)){var n=t.on=t.on?D({},t.on):{};for(var r in e){var o=n[r],i=e[r];n[r]=o?[].concat(o,i):i}}else;return t}function Je(t,e,n,r){e=e||{$stable:!n};for(var o=0;o<t.length;o++){var i=t[o];Array.isArray(i)?Je(i,e,n):i&&(i.proxy&&(i.fn.proxy=!0),e[i.key]=i.fn)}return r&&(e.$key=r),e}function Ue(t,e){for(var n=0;n<e.length;n+=2){var r=e[n];"string"===typeof r&&r&&(t[e[n]]=e[n+1])}return t}function Ge(t,e){return"string"===typeof t?e+t:t}function Xe(t){t._o=We,t._n=v,t._s=h,t._l=Ie,t._t=je,t._q=I,t._i=j,t._m=Le,t._f=ze,t._k=Ve,t._b=Be,t._v=xt,t._e=St,t._u=Je,t._g=He,t._d=Ue,t._p=Ge}function Ye(t,e,r,o,s){var a,c=this,l=s.options;w(o,"_uid")?(a=Object.create(o),a._original=o):(a=o,o=o._original);var u=i(l._compiled),f=!u;this.data=t,this.props=e,this.children=r,this.parent=o,this.listeners=t.on||n,this.injections=Te(l.inject,o),this.slots=function(){return c.$slots||Pe(t.scopedSlots,c.$slots=De(r,o)),c.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return Pe(t.scopedSlots,this.slots())}}),u&&(this.$options=l,this.$slots=this.slots(),this.$scopedSlots=Pe(t.scopedSlots,this.$slots)),l._scopeId?this._c=function(t,e,n,r){var i=fn(a,t,e,n,r,f);return i&&!Array.isArray(i)&&(i.fnScopeId=l._scopeId,i.fnContext=o),i}:this._c=function(t,e,n,r){return fn(a,t,e,n,r,f)}}function Qe(t,e,r,i,s){var a=t.options,c={},l=a.props;if(o(l))for(var u in l)c[u]=Xt(u,l,e||n);else o(r.attrs)&&tn(c,r.attrs),o(r.props)&&tn(c,r.props);var f=new Ye(r,c,s,i,t),p=a.render.call(null,f._c,f);if(p instanceof bt)return Ze(p,r,f.parent,a,f);if(Array.isArray(p)){for(var d=Oe(p)||[],h=new Array(d.length),v=0;v<d.length;v++)h[v]=Ze(d[v],r,f.parent,a,f);return h}}function Ze(t,e,n,r,o){var i=kt(t);return i.fnContext=n,i.fnOptions=r,e.slot&&((i.data||(i.data={})).slot=e.slot),i}function tn(t,e){for(var n in e)t[k(n)]=e[n]}Xe(Ye.prototype);var en={init:function(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){var n=t;en.prepatch(n,n)}else{var r=t.componentInstance=on(t,Tn);r.$mount(e?t.elm:void 0,e)}},prepatch:function(t,e){var n=e.componentOptions,r=e.componentInstance=t.componentInstance;$n(r,n.propsData,n.listeners,e,n.children)},insert:function(t){var e=t.context,n=t.componentInstance;n._isMounted||(n._isMounted=!0,Fn(n,"mounted")),t.data.keepAlive&&(e._isMounted?Qn(n):jn(n,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?zn(e,!0):e.$destroy())}},nn=Object.keys(en);function rn(t,e,n,s,a){if(!r(t)){var l=n.$options._base;if(c(t)&&(t=l.extend(t)),"function"===typeof t){var u;if(r(t.cid)&&(u=t,t=Sn(u,l),void 0===t))return wn(u,e,n,s,a);e=e||{},Sr(t),o(e.model)&&cn(t.options,e);var f=xe(e,t,a);if(i(t.options.functional))return Qe(t,f,e,n,s);var p=e.on;if(e.on=e.nativeOn,i(t.options.abstract)){var d=e.slot;e={},d&&(e.slot=d)}sn(e);var h=t.options.name||a,v=new bt("vue-component-"+t.cid+(h?"-"+h:""),e,void 0,void 0,void 0,n,{Ctor:t,propsData:f,listeners:p,tag:a,children:s},u);return v}}}function on(t,e){var n={_isComponent:!0,_parentVnode:t,parent:e},r=t.data.inlineTemplate;return o(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns),new t.componentOptions.Ctor(n)}function sn(t){for(var e=t.hook||(t.hook={}),n=0;n<nn.length;n++){var r=nn[n],o=e[r],i=en[r];o===i||o&&o._merged||(e[r]=o?an(i,o):i)}}function an(t,e){var n=function(n,r){t(n,r),e(n,r)};return n._merged=!0,n}function cn(t,e){var n=t.model&&t.model.prop||"value",r=t.model&&t.model.event||"input";(e.attrs||(e.attrs={}))[n]=e.model.value;var i=e.on||(e.on={}),s=i[r],a=e.model.callback;o(s)?(Array.isArray(s)?-1===s.indexOf(a):s!==a)&&(i[r]=[a].concat(s)):i[r]=a}var ln=1,un=2;function fn(t,e,n,r,o,s){return(Array.isArray(n)||a(n))&&(o=r,r=n,n=void 0),i(s)&&(o=un),pn(t,e,n,r,o)}function pn(t,e,n,r,i){if(o(n)&&o(n.__ob__))return St();if(o(n)&&o(n.is)&&(e=n.is),!e)return St();var s,a,c;(Array.isArray(r)&&"function"===typeof r[0]&&(n=n||{},n.scopedSlots={default:r[0]},r.length=0),i===un?r=Oe(r):i===ln&&(r=Ce(r)),"string"===typeof e)?(a=t.$vnode&&t.$vnode.ns||L.getTagNamespace(e),s=L.isReservedTag(e)?new bt(L.parsePlatformTagName(e),n,r,void 0,void 0,t):n&&n.pre||!o(c=Gt(t.$options,"components",e))?new bt(e,n,r,void 0,void 0,t):rn(c,n,t,r,e)):s=rn(e,n,t,r);return Array.isArray(s)?s:o(s)?(o(a)&&dn(s,a),o(n)&&hn(n),s):St()}function dn(t,e,n){if(t.ns=e,"foreignObject"===t.tag&&(e=void 0,n=!0),o(t.children))for(var s=0,a=t.children.length;s<a;s++){var c=t.children[s];o(c.tag)&&(r(c.ns)||i(n)&&"svg"!==c.tag)&&dn(c,e,n)}}function hn(t){c(t.style)&&me(t.style),c(t.class)&&me(t.class)}function vn(t){t._vnode=null,t._staticTrees=null;var e=t.$options,r=t.$vnode=e._parentVnode,o=r&&r.context;t.$slots=De(e._renderChildren,o),t.$scopedSlots=n,t._c=function(e,n,r,o){return fn(t,e,n,r,o,!1)},t.$createElement=function(e,n,r,o){return fn(t,e,n,r,o,!0)};var i=r&&r.data;Rt(t,"$attrs",i&&i.attrs||n,null,!0),Rt(t,"$listeners",e._parentListeners||n,null,!0)}var mn,gn=null;function yn(t){Xe(t.prototype),t.prototype.$nextTick=function(t){return he(t,this)},t.prototype._render=function(){var t,e=this,n=e.$options,r=n.render,o=n._parentVnode;o&&(e.$scopedSlots=Pe(o.data.scopedSlots,e.$slots,e.$scopedSlots)),e.$vnode=o;try{gn=e,t=r.call(e._renderProxy,e.$createElement)}catch(ks){ee(ks,e,"render"),t=e._vnode}finally{gn=null}return Array.isArray(t)&&1===t.length&&(t=t[0]),t instanceof bt||(t=St()),t.parent=o,t}}function bn(t,e){return(t.__esModule||pt&&"Module"===t[Symbol.toStringTag])&&(t=t.default),c(t)?e.extend(t):t}function wn(t,e,n,r,o){var i=St();return i.asyncFactory=t,i.asyncMeta={data:e,context:n,children:r,tag:o},i}function Sn(t,e){if(i(t.error)&&o(t.errorComp))return t.errorComp;if(o(t.resolved))return t.resolved;var n=gn;if(n&&o(t.owners)&&-1===t.owners.indexOf(n)&&t.owners.push(n),i(t.loading)&&o(t.loadingComp))return t.loadingComp;if(n&&!o(t.owners)){var s=t.owners=[n],a=!0,l=null,u=null;n.$on("hook:destroyed",(function(){return y(s,n)}));var f=function(t){for(var e=0,n=s.length;e<n;e++)s[e].$forceUpdate();t&&(s.length=0,null!==l&&(clearTimeout(l),l=null),null!==u&&(clearTimeout(u),u=null))},p=z((function(n){t.resolved=bn(n,e),a?s.length=0:f(!0)})),h=z((function(e){o(t.errorComp)&&(t.error=!0,f(!0))})),v=t(p,h);return c(v)&&(d(v)?r(t.resolved)&&v.then(p,h):d(v.component)&&(v.component.then(p,h),o(v.error)&&(t.errorComp=bn(v.error,e)),o(v.loading)&&(t.loadingComp=bn(v.loading,e),0===v.delay?t.loading=!0:l=setTimeout((function(){l=null,r(t.resolved)&&r(t.error)&&(t.loading=!0,f(!1))}),v.delay||200)),o(v.timeout)&&(u=setTimeout((function(){u=null,r(t.resolved)&&h(null)}),v.timeout)))),a=!1,t.loading?t.loadingComp:t.resolved}}function xn(t){return t.isComment&&t.asyncFactory}function kn(t){if(Array.isArray(t))for(var e=0;e<t.length;e++){var n=t[e];if(o(n)&&(o(n.componentOptions)||xn(n)))return n}}function Cn(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&An(t,e)}function On(t,e){mn.$on(t,e)}function Mn(t,e){mn.$off(t,e)}function Nn(t,e){var n=mn;return function r(){var o=e.apply(null,arguments);null!==o&&n.$off(t,r)}}function An(t,e,n){mn=t,we(e,n||{},On,Mn,Nn,t),mn=void 0}function _n(t){var e=/^hook:/;t.prototype.$on=function(t,n){var r=this;if(Array.isArray(t))for(var o=0,i=t.length;o<i;o++)r.$on(t[o],n);else(r._events[t]||(r._events[t]=[])).push(n),e.test(t)&&(r._hasHookEvent=!0);return r},t.prototype.$once=function(t,e){var n=this;function r(){n.$off(t,r),e.apply(n,arguments)}return r.fn=e,n.$on(t,r),n},t.prototype.$off=function(t,e){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(t)){for(var r=0,o=t.length;r<o;r++)n.$off(t[r],e);return n}var i,s=n._events[t];if(!s)return n;if(!e)return n._events[t]=null,n;var a=s.length;while(a--)if(i=s[a],i===e||i.fn===e){s.splice(a,1);break}return n},t.prototype.$emit=function(t){var e=this,n=e._events[t];if(n){n=n.length>1?T(n):n;for(var r=T(arguments,1),o='event handler for "'+t+'"',i=0,s=n.length;i<s;i++)ne(n[i],e,r,e,o)}return e}}var Tn=null;function Dn(t){var e=Tn;return Tn=t,function(){Tn=e}}function En(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){while(n.$options.abstract&&n.$parent)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}function Pn(t){t.prototype._update=function(t,e){var n=this,r=n.$el,o=n._vnode,i=Dn(n);n._vnode=t,n.$el=o?n.__patch__(o,t):n.__patch__(n.$el,t,e,!1),i(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},t.prototype.$forceUpdate=function(){var t=this;t._watcher&&t._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){Fn(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||y(e.$children,t),t._watcher&&t._watcher.teardown();var n=t._watchers.length;while(n--)t._watchers[n].teardown();t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),Fn(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}function Rn(t,e,n){var r;return t.$el=e,t.$options.render||(t.$options.render=St),Fn(t,"beforeMount"),r=function(){t._update(t._render(),n)},new nr(t,r,P,{before:function(){t._isMounted&&!t._isDestroyed&&Fn(t,"beforeUpdate")}},!0),n=!1,null==t.$vnode&&(t._isMounted=!0,Fn(t,"mounted")),t}function $n(t,e,r,o,i){var s=o.data.scopedSlots,a=t.$scopedSlots,c=!!(s&&!s.$stable||a!==n&&!a.$stable||s&&t.$scopedSlots.$key!==s.$key),l=!!(i||t.$options._renderChildren||c);if(t.$options._parentVnode=o,t.$vnode=o,t._vnode&&(t._vnode.parent=o),t.$options._renderChildren=i,t.$attrs=o.data.attrs||n,t.$listeners=r||n,e&&t.$options.props){_t(!1);for(var u=t._props,f=t.$options._propKeys||[],p=0;p<f.length;p++){var d=f[p],h=t.$options.props;u[d]=Xt(d,h,e,t)}_t(!0),t.$options.propsData=e}r=r||n;var v=t.$options._parentListeners;t.$options._parentListeners=r,An(t,r,v),l&&(t.$slots=De(i,o.context),t.$forceUpdate())}function In(t){while(t&&(t=t.$parent))if(t._inactive)return!0;return!1}function jn(t,e){if(e){if(t._directInactive=!1,In(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var n=0;n<t.$children.length;n++)jn(t.$children[n]);Fn(t,"activated")}}function zn(t,e){if((!e||(t._directInactive=!0,!In(t)))&&!t._inactive){t._inactive=!0;for(var n=0;n<t.$children.length;n++)zn(t.$children[n]);Fn(t,"deactivated")}}function Fn(t,e){gt();var n=t.$options[e],r=e+" hook";if(n)for(var o=0,i=n.length;o<i;o++)ne(n[o],t,null,t,r);t._hasHookEvent&&t.$emit("hook:"+e),yt()}var Vn=[],Bn=[],Ln={},Wn=!1,qn=!1,Kn=0;function Hn(){Kn=Vn.length=Bn.length=0,Ln={},Wn=qn=!1}var Jn=0,Un=Date.now;if(X&&!tt){var Gn=window.performance;Gn&&"function"===typeof Gn.now&&Un()>document.createEvent("Event").timeStamp&&(Un=function(){return Gn.now()})}function Xn(){var t,e;for(Jn=Un(),qn=!0,Vn.sort((function(t,e){return t.id-e.id})),Kn=0;Kn<Vn.length;Kn++)t=Vn[Kn],t.before&&t.before(),e=t.id,Ln[e]=null,t.run();var n=Bn.slice(),r=Vn.slice();Hn(),Zn(n),Yn(r),lt&&L.devtools&<.emit("flush")}function Yn(t){var e=t.length;while(e--){var n=t[e],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&Fn(r,"updated")}}function Qn(t){t._inactive=!1,Bn.push(t)}function Zn(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,jn(t[e],!0)}function tr(t){var e=t.id;if(null==Ln[e]){if(Ln[e]=!0,qn){var n=Vn.length-1;while(n>Kn&&Vn[n].id>t.id)n--;Vn.splice(n+1,0,t)}else Vn.push(t);Wn||(Wn=!0,he(Xn))}}var er=0,nr=function(t,e,n,r,o){this.vm=t,o&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++er,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ft,this.newDepIds=new ft,this.expression="","function"===typeof e?this.getter=e:(this.getter=J(e),this.getter||(this.getter=P)),this.value=this.lazy?void 0:this.get()};nr.prototype.get=function(){var t;gt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(ks){if(!this.user)throw ks;ee(ks,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&me(t),yt(),this.cleanupDeps()}return t},nr.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},nr.prototype.cleanupDeps=function(){var t=this.deps.length;while(t--){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},nr.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():tr(this)},nr.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||c(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(ks){ee(ks,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},nr.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},nr.prototype.depend=function(){var t=this.deps.length;while(t--)this.deps[t].depend()},nr.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);var t=this.deps.length;while(t--)this.deps[t].removeSub(this);this.active=!1}};var rr={enumerable:!0,configurable:!0,get:P,set:P};function or(t,e,n){rr.get=function(){return this[e][n]},rr.set=function(t){this[e][n]=t},Object.defineProperty(t,n,rr)}function ir(t){t._watchers=[];var e=t.$options;e.props&&sr(t,e.props),e.methods&&hr(t,e.methods),e.data?ar(t):Pt(t._data={},!0),e.computed&&ur(t,e.computed),e.watch&&e.watch!==it&&vr(t,e.watch)}function sr(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[],i=!t.$parent;i||_t(!1);var s=function(i){o.push(i);var s=Xt(i,e,n,t);Rt(r,i,s),i in t||or(t,"_props",i)};for(var a in e)s(a);_t(!0)}function ar(t){var e=t.$options.data;e=t._data="function"===typeof e?cr(e,t):e||{},u(e)||(e={});var n=Object.keys(e),r=t.$options.props,o=(t.$options.methods,n.length);while(o--){var i=n[o];0,r&&w(r,i)||q(i)||or(t,"_data",i)}Pt(e,!0)}function cr(t,e){gt();try{return t.call(e,e)}catch(ks){return ee(ks,e,"data()"),{}}finally{yt()}}var lr={lazy:!0};function ur(t,e){var n=t._computedWatchers=Object.create(null),r=ct();for(var o in e){var i=e[o],s="function"===typeof i?i:i.get;0,r||(n[o]=new nr(t,s||P,P,lr)),o in t||fr(t,o,i)}}function fr(t,e,n){var r=!ct();"function"===typeof n?(rr.get=r?pr(e):dr(n),rr.set=P):(rr.get=n.get?r&&!1!==n.cache?pr(e):dr(n.get):P,rr.set=n.set||P),Object.defineProperty(t,e,rr)}function pr(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),vt.target&&e.depend(),e.value}}function dr(t){return function(){return t.call(this,this)}}function hr(t,e){t.$options.props;for(var n in e)t[n]="function"!==typeof e[n]?P:_(e[n],t)}function vr(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o<r.length;o++)mr(t,n,r[o]);else mr(t,n,r)}}function mr(t,e,n,r){return u(n)&&(r=n,n=n.handler),"string"===typeof n&&(n=t[n]),t.$watch(e,n,r)}function gr(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=$t,t.prototype.$delete=It,t.prototype.$watch=function(t,e,n){var r=this;if(u(e))return mr(r,t,e,n);n=n||{},n.user=!0;var o=new nr(r,t,e,n);if(n.immediate)try{e.call(r,o.value)}catch(i){ee(i,r,'callback for immediate watcher "'+o.expression+'"')}return function(){o.teardown()}}}var yr=0;function br(t){t.prototype._init=function(t){var e=this;e._uid=yr++,e._isVue=!0,t&&t._isComponent?wr(e,t):e.$options=Ut(Sr(e.constructor),t||{},e),e._renderProxy=e,e._self=e,En(e),Cn(e),vn(e),Fn(e,"beforeCreate"),_e(e),ir(e),Ae(e),Fn(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}function wr(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}function Sr(t){var e=t.options;if(t.super){var n=Sr(t.super),r=t.superOptions;if(n!==r){t.superOptions=n;var o=xr(t);o&&D(t.extendOptions,o),e=t.options=Ut(n,t.extendOptions),e.name&&(e.components[e.name]=t)}}return e}function xr(t){var e,n=t.options,r=t.sealedOptions;for(var o in n)n[o]!==r[o]&&(e||(e={}),e[o]=n[o]);return e}function kr(t){this._init(t)}function Cr(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=T(arguments,1);return n.unshift(this),"function"===typeof t.install?t.install.apply(t,n):"function"===typeof t&&t.apply(null,n),e.push(t),this}}function Or(t){t.mixin=function(t){return this.options=Ut(this.options,t),this}}function Mr(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=t.name||n.options.name;var s=function(t){this._init(t)};return s.prototype=Object.create(n.prototype),s.prototype.constructor=s,s.cid=e++,s.options=Ut(n.options,t),s["super"]=n,s.options.props&&Nr(s),s.options.computed&&Ar(s),s.extend=n.extend,s.mixin=n.mixin,s.use=n.use,V.forEach((function(t){s[t]=n[t]})),i&&(s.options.components[i]=s),s.superOptions=n.options,s.extendOptions=t,s.sealedOptions=D({},s.options),o[r]=s,s}}function Nr(t){var e=t.options.props;for(var n in e)or(t.prototype,"_props",n)}function Ar(t){var e=t.options.computed;for(var n in e)fr(t.prototype,n,e[n])}function _r(t){V.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&u(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"===typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}function Tr(t){return t&&(t.Ctor.options.name||t.tag)}function Dr(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"===typeof t?t.split(",").indexOf(e)>-1:!!f(t)&&t.test(e)}function Er(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var s=n[i];if(s){var a=Tr(s.componentOptions);a&&!e(a)&&Pr(n,i,r,o)}}}function Pr(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,y(n,e)}br(kr),gr(kr),_n(kr),Pn(kr),yn(kr);var Rr=[String,RegExp,Array],$r={name:"keep-alive",abstract:!0,props:{include:Rr,exclude:Rr,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Pr(this.cache,t,this.keys)},mounted:function(){var t=this;this.$watch("include",(function(e){Er(t,(function(t){return Dr(e,t)}))})),this.$watch("exclude",(function(e){Er(t,(function(t){return!Dr(e,t)}))}))},render:function(){var t=this.$slots.default,e=kn(t),n=e&&e.componentOptions;if(n){var r=Tr(n),o=this,i=o.include,s=o.exclude;if(i&&(!r||!Dr(i,r))||s&&r&&Dr(s,r))return e;var a=this,c=a.cache,l=a.keys,u=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;c[u]?(e.componentInstance=c[u].componentInstance,y(l,u),l.push(u)):(c[u]=e,l.push(u),this.max&&l.length>parseInt(this.max)&&Pr(c,l[0],l,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}},Ir={KeepAlive:$r};function jr(t){var e={get:function(){return L}};Object.defineProperty(t,"config",e),t.util={warn:dt,extend:D,mergeOptions:Ut,defineReactive:Rt},t.set=$t,t.delete=It,t.nextTick=he,t.observable=function(t){return Pt(t),t},t.options=Object.create(null),V.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,D(t.options.components,Ir),Cr(t),Or(t),Mr(t),_r(t)}jr(kr),Object.defineProperty(kr.prototype,"$isServer",{get:ct}),Object.defineProperty(kr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(kr,"FunctionalRenderContext",{value:Ye}),kr.version="2.6.11";var zr=m("style,class"),Fr=m("input,textarea,option,select,progress"),Vr=function(t,e,n){return"value"===n&&Fr(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Br=m("contenteditable,draggable,spellcheck"),Lr=m("events,caret,typing,plaintext-only"),Wr=function(t,e){return Ur(e)||"false"===e?"false":"contenteditable"===t&&Lr(e)?e:"true"},qr=m("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Kr="http://www.w3.org/1999/xlink",Hr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Jr=function(t){return Hr(t)?t.slice(6,t.length):""},Ur=function(t){return null==t||!1===t};function Gr(t){var e=t.data,n=t,r=t;while(o(r.componentInstance))r=r.componentInstance._vnode,r&&r.data&&(e=Xr(r.data,e));while(o(n=n.parent))n&&n.data&&(e=Xr(e,n.data));return Yr(e.staticClass,e.class)}function Xr(t,e){return{staticClass:Qr(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Yr(t,e){return o(t)||o(e)?Qr(t,Zr(e)):""}function Qr(t,e){return t?e?t+" "+e:t:e||""}function Zr(t){return Array.isArray(t)?to(t):c(t)?eo(t):"string"===typeof t?t:""}function to(t){for(var e,n="",r=0,i=t.length;r<i;r++)o(e=Zr(t[r]))&&""!==e&&(n&&(n+=" "),n+=e);return n}function eo(t){var e="";for(var n in t)t[n]&&(e&&(e+=" "),e+=n);return e}var no={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},ro=m("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),oo=m("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),io=function(t){return ro(t)||oo(t)};function so(t){return oo(t)?"svg":"math"===t?"math":void 0}var ao=Object.create(null);function co(t){if(!X)return!0;if(io(t))return!1;if(t=t.toLowerCase(),null!=ao[t])return ao[t];var e=document.createElement(t);return t.indexOf("-")>-1?ao[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:ao[t]=/HTMLUnknownElement/.test(e.toString())}var lo=m("text,number,password,search,email,tel,url");function uo(t){if("string"===typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function fo(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function po(t,e){return document.createElementNS(no[t],e)}function ho(t){return document.createTextNode(t)}function vo(t){return document.createComment(t)}function mo(t,e,n){t.insertBefore(e,n)}function go(t,e){t.removeChild(e)}function yo(t,e){t.appendChild(e)}function bo(t){return t.parentNode}function wo(t){return t.nextSibling}function So(t){return t.tagName}function xo(t,e){t.textContent=e}function ko(t,e){t.setAttribute(e,"")}var Co=Object.freeze({createElement:fo,createElementNS:po,createTextNode:ho,createComment:vo,insertBefore:mo,removeChild:go,appendChild:yo,parentNode:bo,nextSibling:wo,tagName:So,setTextContent:xo,setStyleScope:ko}),Oo={create:function(t,e){Mo(e)},update:function(t,e){t.data.ref!==e.data.ref&&(Mo(t,!0),Mo(e))},destroy:function(t){Mo(t,!0)}};function Mo(t,e){var n=t.data.ref;if(o(n)){var r=t.context,i=t.componentInstance||t.elm,s=r.$refs;e?Array.isArray(s[n])?y(s[n],i):s[n]===i&&(s[n]=void 0):t.data.refInFor?Array.isArray(s[n])?s[n].indexOf(i)<0&&s[n].push(i):s[n]=[i]:s[n]=i}}var No=new bt("",{},[]),Ao=["create","activate","update","remove","destroy"];function _o(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&To(t,e)||i(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&r(e.asyncFactory.error))}function To(t,e){if("input"!==t.tag)return!0;var n,r=o(n=t.data)&&o(n=n.attrs)&&n.type,i=o(n=e.data)&&o(n=n.attrs)&&n.type;return r===i||lo(r)&&lo(i)}function Do(t,e,n){var r,i,s={};for(r=e;r<=n;++r)i=t[r].key,o(i)&&(s[i]=r);return s}function Eo(t){var e,n,s={},c=t.modules,l=t.nodeOps;for(e=0;e<Ao.length;++e)for(s[Ao[e]]=[],n=0;n<c.length;++n)o(c[n][Ao[e]])&&s[Ao[e]].push(c[n][Ao[e]]);function u(t){return new bt(l.tagName(t).toLowerCase(),{},[],void 0,t)}function f(t,e){function n(){0===--n.listeners&&p(t)}return n.listeners=e,n}function p(t){var e=l.parentNode(t);o(e)&&l.removeChild(e,t)}function d(t,e,n,r,s,a,c){if(o(t.elm)&&o(a)&&(t=a[c]=kt(t)),t.isRootInsert=!s,!h(t,e,n,r)){var u=t.data,f=t.children,p=t.tag;o(p)?(t.elm=t.ns?l.createElementNS(t.ns,p):l.createElement(p,t),x(t),b(t,f,e),o(u)&&S(t,e),y(n,t.elm,r)):i(t.isComment)?(t.elm=l.createComment(t.text),y(n,t.elm,r)):(t.elm=l.createTextNode(t.text),y(n,t.elm,r))}}function h(t,e,n,r){var s=t.data;if(o(s)){var a=o(t.componentInstance)&&s.keepAlive;if(o(s=s.hook)&&o(s=s.init)&&s(t,!1),o(t.componentInstance))return v(t,e),y(n,t.elm,r),i(a)&&g(t,e,n,r),!0}}function v(t,e){o(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,w(t)?(S(t,e),x(t)):(Mo(t),e.push(t))}function g(t,e,n,r){var i,a=t;while(a.componentInstance)if(a=a.componentInstance._vnode,o(i=a.data)&&o(i=i.transition)){for(i=0;i<s.activate.length;++i)s.activate[i](No,a);e.push(a);break}y(n,t.elm,r)}function y(t,e,n){o(t)&&(o(n)?l.parentNode(n)===t&&l.insertBefore(t,e,n):l.appendChild(t,e))}function b(t,e,n){if(Array.isArray(e)){0;for(var r=0;r<e.length;++r)d(e[r],n,t.elm,null,!0,e,r)}else a(t.text)&&l.appendChild(t.elm,l.createTextNode(String(t.text)))}function w(t){while(t.componentInstance)t=t.componentInstance._vnode;return o(t.tag)}function S(t,n){for(var r=0;r<s.create.length;++r)s.create[r](No,t);e=t.data.hook,o(e)&&(o(e.create)&&e.create(No,t),o(e.insert)&&n.push(t))}function x(t){var e;if(o(e=t.fnScopeId))l.setStyleScope(t.elm,e);else{var n=t;while(n)o(e=n.context)&&o(e=e.$options._scopeId)&&l.setStyleScope(t.elm,e),n=n.parent}o(e=Tn)&&e!==t.context&&e!==t.fnContext&&o(e=e.$options._scopeId)&&l.setStyleScope(t.elm,e)}function k(t,e,n,r,o,i){for(;r<=o;++r)d(n[r],i,t,e,!1,n,r)}function C(t){var e,n,r=t.data;if(o(r))for(o(e=r.hook)&&o(e=e.destroy)&&e(t),e=0;e<s.destroy.length;++e)s.destroy[e](t);if(o(e=t.children))for(n=0;n<t.children.length;++n)C(t.children[n])}function O(t,e,n){for(;e<=n;++e){var r=t[e];o(r)&&(o(r.tag)?(M(r),C(r)):p(r.elm))}}function M(t,e){if(o(e)||o(t.data)){var n,r=s.remove.length+1;for(o(e)?e.listeners+=r:e=f(t.elm,r),o(n=t.componentInstance)&&o(n=n._vnode)&&o(n.data)&&M(n,e),n=0;n<s.remove.length;++n)s.remove[n](t,e);o(n=t.data.hook)&&o(n=n.remove)?n(t,e):e()}else p(t.elm)}function N(t,e,n,i,s){var a,c,u,f,p=0,h=0,v=e.length-1,m=e[0],g=e[v],y=n.length-1,b=n[0],w=n[y],S=!s;while(p<=v&&h<=y)r(m)?m=e[++p]:r(g)?g=e[--v]:_o(m,b)?(_(m,b,i,n,h),m=e[++p],b=n[++h]):_o(g,w)?(_(g,w,i,n,y),g=e[--v],w=n[--y]):_o(m,w)?(_(m,w,i,n,y),S&&l.insertBefore(t,m.elm,l.nextSibling(g.elm)),m=e[++p],w=n[--y]):_o(g,b)?(_(g,b,i,n,h),S&&l.insertBefore(t,g.elm,m.elm),g=e[--v],b=n[++h]):(r(a)&&(a=Do(e,p,v)),c=o(b.key)?a[b.key]:A(b,e,p,v),r(c)?d(b,i,t,m.elm,!1,n,h):(u=e[c],_o(u,b)?(_(u,b,i,n,h),e[c]=void 0,S&&l.insertBefore(t,u.elm,m.elm)):d(b,i,t,m.elm,!1,n,h)),b=n[++h]);p>v?(f=r(n[y+1])?null:n[y+1].elm,k(t,f,n,h,y,i)):h>y&&O(e,p,v)}function A(t,e,n,r){for(var i=n;i<r;i++){var s=e[i];if(o(s)&&_o(t,s))return i}}function _(t,e,n,a,c,u){if(t!==e){o(e.elm)&&o(a)&&(e=a[c]=kt(e));var f=e.elm=t.elm;if(i(t.isAsyncPlaceholder))o(e.asyncFactory.resolved)?E(t.elm,e,n):e.isAsyncPlaceholder=!0;else if(i(e.isStatic)&&i(t.isStatic)&&e.key===t.key&&(i(e.isCloned)||i(e.isOnce)))e.componentInstance=t.componentInstance;else{var p,d=e.data;o(d)&&o(p=d.hook)&&o(p=p.prepatch)&&p(t,e);var h=t.children,v=e.children;if(o(d)&&w(e)){for(p=0;p<s.update.length;++p)s.update[p](t,e);o(p=d.hook)&&o(p=p.update)&&p(t,e)}r(e.text)?o(h)&&o(v)?h!==v&&N(f,h,v,n,u):o(v)?(o(t.text)&&l.setTextContent(f,""),k(f,null,v,0,v.length-1,n)):o(h)?O(h,0,h.length-1):o(t.text)&&l.setTextContent(f,""):t.text!==e.text&&l.setTextContent(f,e.text),o(d)&&o(p=d.hook)&&o(p=p.postpatch)&&p(t,e)}}}function T(t,e,n){if(i(n)&&o(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r<e.length;++r)e[r].data.hook.insert(e[r])}var D=m("attrs,class,staticClass,staticStyle,key");function E(t,e,n,r){var s,a=e.tag,c=e.data,l=e.children;if(r=r||c&&c.pre,e.elm=t,i(e.isComment)&&o(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(o(c)&&(o(s=c.hook)&&o(s=s.init)&&s(e,!0),o(s=e.componentInstance)))return v(e,n),!0;if(o(a)){if(o(l))if(t.hasChildNodes())if(o(s=c)&&o(s=s.domProps)&&o(s=s.innerHTML)){if(s!==t.innerHTML)return!1}else{for(var u=!0,f=t.firstChild,p=0;p<l.length;p++){if(!f||!E(f,l[p],n,r)){u=!1;break}f=f.nextSibling}if(!u||f)return!1}else b(e,l,n);if(o(c)){var d=!1;for(var h in c)if(!D(h)){d=!0,S(e,n);break}!d&&c["class"]&&me(c["class"])}}else t.data!==e.text&&(t.data=e.text);return!0}return function(t,e,n,a){if(!r(e)){var c=!1,f=[];if(r(t))c=!0,d(e,f);else{var p=o(t.nodeType);if(!p&&_o(t,e))_(t,e,f,null,null,a);else{if(p){if(1===t.nodeType&&t.hasAttribute(F)&&(t.removeAttribute(F),n=!0),i(n)&&E(t,e,f))return T(e,f,!0),t;t=u(t)}var h=t.elm,v=l.parentNode(h);if(d(e,f,h._leaveCb?null:v,l.nextSibling(h)),o(e.parent)){var m=e.parent,g=w(e);while(m){for(var y=0;y<s.destroy.length;++y)s.destroy[y](m);if(m.elm=e.elm,g){for(var b=0;b<s.create.length;++b)s.create[b](No,m);var S=m.data.hook.insert;if(S.merged)for(var x=1;x<S.fns.length;x++)S.fns[x]()}else Mo(m);m=m.parent}}o(v)?O([t],0,0):o(t.tag)&&C(t)}}return T(e,f,c),e.elm}o(t)&&C(t)}}var Po={create:Ro,update:Ro,destroy:function(t){Ro(t,No)}};function Ro(t,e){(t.data.directives||e.data.directives)&&$o(t,e)}function $o(t,e){var n,r,o,i=t===No,s=e===No,a=jo(t.data.directives,t.context),c=jo(e.data.directives,e.context),l=[],u=[];for(n in c)r=a[n],o=c[n],r?(o.oldValue=r.value,o.oldArg=r.arg,Fo(o,"update",e,t),o.def&&o.def.componentUpdated&&u.push(o)):(Fo(o,"bind",e,t),o.def&&o.def.inserted&&l.push(o));if(l.length){var f=function(){for(var n=0;n<l.length;n++)Fo(l[n],"inserted",e,t)};i?Se(e,"insert",f):f()}if(u.length&&Se(e,"postpatch",(function(){for(var n=0;n<u.length;n++)Fo(u[n],"componentUpdated",e,t)})),!i)for(n in a)c[n]||Fo(a[n],"unbind",t,t,s)}var Io=Object.create(null);function jo(t,e){var n,r,o=Object.create(null);if(!t)return o;for(n=0;n<t.length;n++)r=t[n],r.modifiers||(r.modifiers=Io),o[zo(r)]=r,r.def=Gt(e.$options,"directives",r.name,!0);return o}function zo(t){return t.rawName||t.name+"."+Object.keys(t.modifiers||{}).join(".")}function Fo(t,e,n,r,o){var i=t.def&&t.def[e];if(i)try{i(n.elm,t,n,r,o)}catch(ks){ee(ks,n.context,"directive "+t.name+" "+e+" hook")}}var Vo=[Oo,Po];function Bo(t,e){var n=e.componentOptions;if((!o(n)||!1!==n.Ctor.options.inheritAttrs)&&(!r(t.data.attrs)||!r(e.data.attrs))){var i,s,a,c=e.elm,l=t.data.attrs||{},u=e.data.attrs||{};for(i in o(u.__ob__)&&(u=e.data.attrs=D({},u)),u)s=u[i],a=l[i],a!==s&&Lo(c,i,s);for(i in(tt||nt)&&u.value!==l.value&&Lo(c,"value",u.value),l)r(u[i])&&(Hr(i)?c.removeAttributeNS(Kr,Jr(i)):Br(i)||c.removeAttribute(i))}}function Lo(t,e,n){t.tagName.indexOf("-")>-1?Wo(t,e,n):qr(e)?Ur(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Br(e)?t.setAttribute(e,Wr(e,n)):Hr(e)?Ur(n)?t.removeAttributeNS(Kr,Jr(e)):t.setAttributeNS(Kr,e,n):Wo(t,e,n)}function Wo(t,e,n){if(Ur(n))t.removeAttribute(e);else{if(tt&&!et&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var qo={create:Bo,update:Bo};function Ko(t,e){var n=e.elm,i=e.data,s=t.data;if(!(r(i.staticClass)&&r(i.class)&&(r(s)||r(s.staticClass)&&r(s.class)))){var a=Gr(e),c=n._transitionClasses;o(c)&&(a=Qr(a,Zr(c))),a!==n._prevClass&&(n.setAttribute("class",a),n._prevClass=a)}}var Ho,Jo={create:Ko,update:Ko},Uo="__r",Go="__c";function Xo(t){if(o(t[Uo])){var e=tt?"change":"input";t[e]=[].concat(t[Uo],t[e]||[]),delete t[Uo]}o(t[Go])&&(t.change=[].concat(t[Go],t.change||[]),delete t[Go])}function Yo(t,e,n){var r=Ho;return function o(){var i=e.apply(null,arguments);null!==i&&ti(t,o,n,r)}}var Qo=se&&!(ot&&Number(ot[1])<=53);function Zo(t,e,n,r){if(Qo){var o=Jn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Ho.addEventListener(t,e,st?{capture:n,passive:r}:n)}function ti(t,e,n,r){(r||Ho).removeEventListener(t,e._wrapper||e,n)}function ei(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},o=t.data.on||{};Ho=e.elm,Xo(n),we(n,o,Zo,ti,Yo,e.context),Ho=void 0}}var ni,ri={create:ei,update:ei};function oi(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,i,s=e.elm,a=t.data.domProps||{},c=e.data.domProps||{};for(n in o(c.__ob__)&&(c=e.data.domProps=D({},c)),a)n in c||(s[n]="");for(n in c){if(i=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),i===a[n])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===n&&"PROGRESS"!==s.tagName){s._value=i;var l=r(i)?"":String(i);ii(s,l)&&(s.value=l)}else if("innerHTML"===n&&oo(s.tagName)&&r(s.innerHTML)){ni=ni||document.createElement("div"),ni.innerHTML="<svg>"+i+"</svg>";var u=ni.firstChild;while(s.firstChild)s.removeChild(s.firstChild);while(u.firstChild)s.appendChild(u.firstChild)}else if(i!==a[n])try{s[n]=i}catch(ks){}}}}function ii(t,e){return!t.composing&&("OPTION"===t.tagName||si(t,e)||ai(t,e))}function si(t,e){var n=!0;try{n=document.activeElement!==t}catch(ks){}return n&&t.value!==e}function ai(t,e){var n=t.value,r=t._vModifiers;if(o(r)){if(r.number)return v(n)!==v(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}var ci={create:oi,update:oi},li=S((function(t){var e={},n=/;(?![^(]*\))/g,r=/:(.+)/;return t.split(n).forEach((function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}})),e}));function ui(t){var e=fi(t.style);return t.staticStyle?D(t.staticStyle,e):e}function fi(t){return Array.isArray(t)?E(t):"string"===typeof t?li(t):t}function pi(t,e){var n,r={};if(e){var o=t;while(o.componentInstance)o=o.componentInstance._vnode,o&&o.data&&(n=ui(o.data))&&D(r,n)}(n=ui(t.data))&&D(r,n);var i=t;while(i=i.parent)i.data&&(n=ui(i.data))&&D(r,n);return r}var di,hi=/^--/,vi=/\s*!important$/,mi=function(t,e,n){if(hi.test(e))t.style.setProperty(e,n);else if(vi.test(n))t.style.setProperty(M(e),n.replace(vi,""),"important");else{var r=yi(e);if(Array.isArray(n))for(var o=0,i=n.length;o<i;o++)t.style[r]=n[o];else t.style[r]=n}},gi=["Webkit","Moz","ms"],yi=S((function(t){if(di=di||document.createElement("div").style,t=k(t),"filter"!==t&&t in di)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<gi.length;n++){var r=gi[n]+e;if(r in di)return r}}));function bi(t,e){var n=e.data,i=t.data;if(!(r(n.staticStyle)&&r(n.style)&&r(i.staticStyle)&&r(i.style))){var s,a,c=e.elm,l=i.staticStyle,u=i.normalizedStyle||i.style||{},f=l||u,p=fi(e.data.style)||{};e.data.normalizedStyle=o(p.__ob__)?D({},p):p;var d=pi(e,!0);for(a in f)r(d[a])&&mi(c,a,"");for(a in d)s=d[a],s!==f[a]&&mi(c,a,null==s?"":s)}}var wi={create:bi,update:bi},Si=/\s+/;function xi(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Si).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function ki(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Si).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";while(n.indexOf(r)>=0)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function Ci(t){if(t){if("object"===typeof t){var e={};return!1!==t.css&&D(e,Oi(t.name||"v")),D(e,t),e}return"string"===typeof t?Oi(t):void 0}}var Oi=S((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),Mi=X&&!et,Ni="transition",Ai="animation",_i="transition",Ti="transitionend",Di="animation",Ei="animationend";Mi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(_i="WebkitTransition",Ti="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Di="WebkitAnimation",Ei="webkitAnimationEnd"));var Pi=X?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Ri(t){Pi((function(){Pi(t)}))}function $i(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),xi(t,e))}function Ii(t,e){t._transitionClasses&&y(t._transitionClasses,e),ki(t,e)}function ji(t,e,n){var r=Fi(t,e),o=r.type,i=r.timeout,s=r.propCount;if(!o)return n();var a=o===Ni?Ti:Ei,c=0,l=function(){t.removeEventListener(a,u),n()},u=function(e){e.target===t&&++c>=s&&l()};setTimeout((function(){c<s&&l()}),i+1),t.addEventListener(a,u)}var zi=/\b(transform|all)(,|$)/;function Fi(t,e){var n,r=window.getComputedStyle(t),o=(r[_i+"Delay"]||"").split(", "),i=(r[_i+"Duration"]||"").split(", "),s=Vi(o,i),a=(r[Di+"Delay"]||"").split(", "),c=(r[Di+"Duration"]||"").split(", "),l=Vi(a,c),u=0,f=0;e===Ni?s>0&&(n=Ni,u=s,f=i.length):e===Ai?l>0&&(n=Ai,u=l,f=c.length):(u=Math.max(s,l),n=u>0?s>l?Ni:Ai:null,f=n?n===Ni?i.length:c.length:0);var p=n===Ni&&zi.test(r[_i+"Property"]);return{type:n,timeout:u,propCount:f,hasTransform:p}}function Vi(t,e){while(t.length<e.length)t=t.concat(t);return Math.max.apply(null,e.map((function(e,n){return Bi(e)+Bi(t[n])})))}function Bi(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function Li(t,e){var n=t.elm;o(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var i=Ci(t.data.transition);if(!r(i)&&!o(n._enterCb)&&1===n.nodeType){var s=i.css,a=i.type,l=i.enterClass,u=i.enterToClass,f=i.enterActiveClass,p=i.appearClass,d=i.appearToClass,h=i.appearActiveClass,m=i.beforeEnter,g=i.enter,y=i.afterEnter,b=i.enterCancelled,w=i.beforeAppear,S=i.appear,x=i.afterAppear,k=i.appearCancelled,C=i.duration,O=Tn,M=Tn.$vnode;while(M&&M.parent)O=M.context,M=M.parent;var N=!O._isMounted||!t.isRootInsert;if(!N||S||""===S){var A=N&&p?p:l,_=N&&h?h:f,T=N&&d?d:u,D=N&&w||m,E=N&&"function"===typeof S?S:g,P=N&&x||y,R=N&&k||b,$=v(c(C)?C.enter:C);0;var I=!1!==s&&!et,j=Ki(E),F=n._enterCb=z((function(){I&&(Ii(n,T),Ii(n,_)),F.cancelled?(I&&Ii(n,A),R&&R(n)):P&&P(n),n._enterCb=null}));t.data.show||Se(t,"insert",(function(){var e=n.parentNode,r=e&&e._pending&&e._pending[t.key];r&&r.tag===t.tag&&r.elm._leaveCb&&r.elm._leaveCb(),E&&E(n,F)})),D&&D(n),I&&($i(n,A),$i(n,_),Ri((function(){Ii(n,A),F.cancelled||($i(n,T),j||(qi($)?setTimeout(F,$):ji(n,a,F)))}))),t.data.show&&(e&&e(),E&&E(n,F)),I||j||F()}}}function Wi(t,e){var n=t.elm;o(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var i=Ci(t.data.transition);if(r(i)||1!==n.nodeType)return e();if(!o(n._leaveCb)){var s=i.css,a=i.type,l=i.leaveClass,u=i.leaveToClass,f=i.leaveActiveClass,p=i.beforeLeave,d=i.leave,h=i.afterLeave,m=i.leaveCancelled,g=i.delayLeave,y=i.duration,b=!1!==s&&!et,w=Ki(d),S=v(c(y)?y.leave:y);0;var x=n._leaveCb=z((function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[t.key]=null),b&&(Ii(n,u),Ii(n,f)),x.cancelled?(b&&Ii(n,l),m&&m(n)):(e(),h&&h(n)),n._leaveCb=null}));g?g(k):k()}function k(){x.cancelled||(!t.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[t.key]=t),p&&p(n),b&&($i(n,l),$i(n,f),Ri((function(){Ii(n,l),x.cancelled||($i(n,u),w||(qi(S)?setTimeout(x,S):ji(n,a,x)))}))),d&&d(n,x),b||w||x())}}function qi(t){return"number"===typeof t&&!isNaN(t)}function Ki(t){if(r(t))return!1;var e=t.fns;return o(e)?Ki(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function Hi(t,e){!0!==e.data.show&&Li(e)}var Ji=X?{create:Hi,activate:Hi,remove:function(t,e){!0!==t.data.show?Wi(t,e):e()}}:{},Ui=[qo,Jo,ri,ci,wi,Ji],Gi=Ui.concat(Vo),Xi=Eo({nodeOps:Co,modules:Gi});et&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&os(t,"input")}));var Yi={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Se(n,"postpatch",(function(){Yi.componentUpdated(t,e,n)})):Qi(t,e,n.context),t._vOptions=[].map.call(t.options,es)):("textarea"===n.tag||lo(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",ns),t.addEventListener("compositionend",rs),t.addEventListener("change",rs),et&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Qi(t,e,n.context);var r=t._vOptions,o=t._vOptions=[].map.call(t.options,es);if(o.some((function(t,e){return!I(t,r[e])}))){var i=t.multiple?e.value.some((function(t){return ts(t,o)})):e.value!==e.oldValue&&ts(e.value,o);i&&os(t,"change")}}}};function Qi(t,e,n){Zi(t,e,n),(tt||nt)&&setTimeout((function(){Zi(t,e,n)}),0)}function Zi(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,s,a=0,c=t.options.length;a<c;a++)if(s=t.options[a],o)i=j(r,es(s))>-1,s.selected!==i&&(s.selected=i);else if(I(es(s),r))return void(t.selectedIndex!==a&&(t.selectedIndex=a));o||(t.selectedIndex=-1)}}function ts(t,e){return e.every((function(e){return!I(e,t)}))}function es(t){return"_value"in t?t._value:t.value}function ns(t){t.target.composing=!0}function rs(t){t.target.composing&&(t.target.composing=!1,os(t.target,"input"))}function os(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function is(t){return!t.componentInstance||t.data&&t.data.transition?t:is(t.componentInstance._vnode)}var ss={bind:function(t,e,n){var r=e.value;n=is(n);var o=n.data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Li(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value,o=e.oldValue;if(!r!==!o){n=is(n);var i=n.data&&n.data.transition;i?(n.data.show=!0,r?Li(n,(function(){t.style.display=t.__vOriginalDisplay})):Wi(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none"}},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}},as={model:Yi,show:ss},cs={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ls(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?ls(kn(e.children)):t}function us(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var i in o)e[k(i)]=o[i];return e}function fs(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function ps(t){while(t=t.parent)if(t.data.transition)return!0}function ds(t,e){return e.key===t.key&&e.tag===t.tag}var hs=function(t){return t.tag||xn(t)},vs=function(t){return"show"===t.name},ms={name:"transition",props:cs,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(hs),n.length)){0;var r=this.mode;0;var o=n[0];if(ps(this.$vnode))return o;var i=ls(o);if(!i)return o;if(this._leaving)return fs(t,o);var s="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?s+"comment":s+i.tag:a(i.key)?0===String(i.key).indexOf(s)?i.key:s+i.key:i.key;var c=(i.data||(i.data={})).transition=us(this),l=this._vnode,u=ls(l);if(i.data.directives&&i.data.directives.some(vs)&&(i.data.show=!0),u&&u.data&&!ds(i,u)&&!xn(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var f=u.data.transition=D({},c);if("out-in"===r)return this._leaving=!0,Se(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),fs(t,o);if("in-out"===r){if(xn(i))return l;var p,d=function(){p()};Se(c,"afterEnter",d),Se(c,"enterCancelled",d),Se(f,"delayLeave",(function(t){p=t}))}}return o}}},gs=D({tag:String,moveClass:String},cs);delete gs.mode;var ys={props:gs,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Dn(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],s=us(this),a=0;a<o.length;a++){var c=o[a];if(c.tag)if(null!=c.key&&0!==String(c.key).indexOf("__vlist"))i.push(c),n[c.key]=c,(c.data||(c.data={})).transition=s;else;}if(r){for(var l=[],u=[],f=0;f<r.length;f++){var p=r[f];p.data.transition=s,p.data.pos=p.elm.getBoundingClientRect(),n[p.key]?l.push(p):u.push(p)}this.kept=t(e,null,l),this.removed=u}return t(e,null,i)},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(bs),t.forEach(ws),t.forEach(Ss),this._reflow=document.body.offsetHeight,t.forEach((function(t){if(t.data.moved){var n=t.elm,r=n.style;$i(n,e),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Ti,n._moveCb=function t(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Ti,t),n._moveCb=null,Ii(n,e))})}})))},methods:{hasMove:function(t,e){if(!Mi)return!1;if(this._hasMove)return this._hasMove;var n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach((function(t){ki(n,t)})),xi(n,e),n.style.display="none",this.$el.appendChild(n);var r=Fi(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}};function bs(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function ws(t){t.data.newPos=t.elm.getBoundingClientRect()}function Ss(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate("+r+"px,"+o+"px)",i.transitionDuration="0s"}}var xs={Transition:ms,TransitionGroup:ys};kr.config.mustUseProp=Vr,kr.config.isReservedTag=io,kr.config.isReservedAttr=zr,kr.config.getTagNamespace=so,kr.config.isUnknownElement=co,D(kr.options.directives,as),D(kr.options.components,xs),kr.prototype.__patch__=X?Xi:P,kr.prototype.$mount=function(t,e){return t=t&&X?uo(t):void 0,Rn(this,t,e)},X&&setTimeout((function(){L.devtools&<&<.emit("init",kr)}),0),e["a"]=kr}).call(this,n("c8ba"))},"2cf4":function(t,e,n){var r,o,i,s=n("da84"),a=n("d039"),c=n("c6b6"),l=n("f8c2"),u=n("1be4"),f=n("cc12"),p=n("b629"),d=s.location,h=s.setImmediate,v=s.clearImmediate,m=s.process,g=s.MessageChannel,y=s.Dispatch,b=0,w={},S="onreadystatechange",x=function(t){if(w.hasOwnProperty(t)){var e=w[t];delete w[t],e()}},k=function(t){return function(){x(t)}},C=function(t){x(t.data)},O=function(t){s.postMessage(t+"",d.protocol+"//"+d.host)};h&&v||(h=function(t){var e=[],n=1;while(arguments.length>n)e.push(arguments[n++]);return w[++b]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},r(b),b},v=function(t){delete w[t]},"process"==c(m)?r=function(t){m.nextTick(k(t))}:y&&y.now?r=function(t){y.now(k(t))}:g&&!p?(o=new g,i=o.port2,o.port1.onmessage=C,r=l(i.postMessage,i,1)):!s.addEventListener||"function"!=typeof postMessage||s.importScripts||a(O)?r=S in f("script")?function(t){u.appendChild(f("script"))[S]=function(){u.removeChild(this),x(t)}}:function(t){setTimeout(k(t),0)}:(r=O,s.addEventListener("message",C,!1))),t.exports={set:h,clear:v}},"2f62":function(t,e,n){"use strict";(function(t){ +/** + * vuex v3.1.2 + * (c) 2019 Evan You + * @license MIT + */ +function n(t){var e=Number(t.version.split(".")[0]);if(e>=2)t.mixin({beforeCreate:r});else{var n=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[r].concat(t.init):r,n.call(this,t)}}function r(){var t=this.$options;t.store?this.$store="function"===typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}var r="undefined"!==typeof window?window:"undefined"!==typeof t?t:{},o=r.__VUE_DEVTOOLS_GLOBAL_HOOK__;function i(t){o&&(t._devtoolHook=o,o.emit("vuex:init",t),o.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){o.emit("vuex:mutation",t,e)})))}function s(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function a(t){return null!==t&&"object"===typeof t}function c(t){return t&&"function"===typeof t.then}function l(t,e){return function(){return t(e)}}var u=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"===typeof n?n():n)||{}},f={namespaced:{configurable:!0}};f.namespaced.get=function(){return!!this._rawModule.namespaced},u.prototype.addChild=function(t,e){this._children[t]=e},u.prototype.removeChild=function(t){delete this._children[t]},u.prototype.getChild=function(t){return this._children[t]},u.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},u.prototype.forEachChild=function(t){s(this._children,t)},u.prototype.forEachGetter=function(t){this._rawModule.getters&&s(this._rawModule.getters,t)},u.prototype.forEachAction=function(t){this._rawModule.actions&&s(this._rawModule.actions,t)},u.prototype.forEachMutation=function(t){this._rawModule.mutations&&s(this._rawModule.mutations,t)},Object.defineProperties(u.prototype,f);var p=function(t){this.register([],t,!1)};function d(t,e,n){if(e.update(n),n.modules)for(var r in n.modules){if(!e.getChild(r))return void 0;d(t.concat(r),e.getChild(r),n.modules[r])}}p.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},p.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return e=e.getChild(n),t+(e.namespaced?n+"/":"")}),"")},p.prototype.update=function(t){d([],this.root,t)},p.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var o=new u(e,n);if(0===t.length)this.root=o;else{var i=this.get(t.slice(0,-1));i.addChild(t[t.length-1],o)}e.modules&&s(e.modules,(function(e,o){r.register(t.concat(o),e,n)}))},p.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var h;var v=function(t){var e=this;void 0===t&&(t={}),!h&&"undefined"!==typeof window&&window.Vue&&_(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var r=t.strict;void 0===r&&(r=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new p(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new h,this._makeLocalGettersCache=Object.create(null);var o=this,s=this,a=s.dispatch,c=s.commit;this.dispatch=function(t,e){return a.call(o,t,e)},this.commit=function(t,e,n){return c.call(o,t,e,n)},this.strict=r;var l=this._modules.root.state;w(this,l,[],this._modules.root),b(this,l),n.forEach((function(t){return t(e)}));var u=void 0!==t.devtools?t.devtools:h.config.devtools;u&&i(this)},m={state:{configurable:!0}};function g(t,e){return e.indexOf(t)<0&&e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function y(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;w(t,n,[],t._modules.root,!0),b(t,n,e)}function b(t,e,n){var r=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var o=t._wrappedGetters,i={};s(o,(function(e,n){i[n]=l(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var a=h.config.silent;h.config.silent=!0,t._vm=new h({data:{$$state:e},computed:i}),h.config.silent=a,t.strict&&M(t),r&&(n&&t._withCommit((function(){r._data.$$state=null})),h.nextTick((function(){return r.$destroy()})))}function w(t,e,n,r,o){var i=!n.length,s=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[s],t._modulesNamespaceMap[s]=r),!i&&!o){var a=N(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit((function(){h.set(a,c,r.state)}))}var l=r.context=S(t,s,n);r.forEachMutation((function(e,n){var r=s+n;k(t,r,e,l)})),r.forEachAction((function(e,n){var r=e.root?n:s+n,o=e.handler||e;C(t,r,o,l)})),r.forEachGetter((function(e,n){var r=s+n;O(t,r,e,l)})),r.forEachChild((function(r,i){w(t,e,n.concat(i),r,o)}))}function S(t,e,n){var r=""===e,o={dispatch:r?t.dispatch:function(n,r,o){var i=A(n,r,o),s=i.payload,a=i.options,c=i.type;return a&&a.root||(c=e+c),t.dispatch(c,s)},commit:r?t.commit:function(n,r,o){var i=A(n,r,o),s=i.payload,a=i.options,c=i.type;a&&a.root||(c=e+c),t.commit(c,s,a)}};return Object.defineProperties(o,{getters:{get:r?function(){return t.getters}:function(){return x(t,e)}},state:{get:function(){return N(t.state,n)}}}),o}function x(t,e){if(!t._makeLocalGettersCache[e]){var n={},r=e.length;Object.keys(t.getters).forEach((function(o){if(o.slice(0,r)===e){var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return t.getters[o]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}function k(t,e,n,r){var o=t._mutations[e]||(t._mutations[e]=[]);o.push((function(e){n.call(t,r.state,e)}))}function C(t,e,n,r){var o=t._actions[e]||(t._actions[e]=[]);o.push((function(e){var o=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e);return c(o)||(o=Promise.resolve(o)),t._devtoolHook?o.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):o}))}function O(t,e,n,r){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)})}function M(t){t._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}function N(t,e){return e.length?e.reduce((function(t,e){return t[e]}),t):t}function A(t,e,n){return a(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function _(t){h&&t===h||(h=t,n(h))}m.state.get=function(){return this._vm._data.$$state},m.state.set=function(t){0},v.prototype.commit=function(t,e,n){var r=this,o=A(t,e,n),i=o.type,s=o.payload,a=(o.options,{type:i,payload:s}),c=this._mutations[i];c&&(this._withCommit((function(){c.forEach((function(t){t(s)}))})),this._subscribers.forEach((function(t){return t(a,r.state)})))},v.prototype.dispatch=function(t,e){var n=this,r=A(t,e),o=r.type,i=r.payload,s={type:o,payload:i},a=this._actions[o];if(a){try{this._actionSubscribers.filter((function(t){return t.before})).forEach((function(t){return t.before(s,n.state)}))}catch(l){0}var c=a.length>1?Promise.all(a.map((function(t){return t(i)}))):a[0](i);return c.then((function(t){try{n._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(s,n.state)}))}catch(l){0}return t}))}},v.prototype.subscribe=function(t){return g(t,this._subscribers)},v.prototype.subscribeAction=function(t){var e="function"===typeof t?{before:t}:t;return g(e,this._actionSubscribers)},v.prototype.watch=function(t,e,n){var r=this;return this._watcherVM.$watch((function(){return t(r.state,r.getters)}),e,n)},v.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},v.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"===typeof t&&(t=[t]),this._modules.register(t,e),w(this,this.state,t,this._modules.get(t),n.preserveState),b(this,this.state)},v.prototype.unregisterModule=function(t){var e=this;"string"===typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var n=N(e.state,t.slice(0,-1));h.delete(n,t[t.length-1])})),y(this)},v.prototype.hotUpdate=function(t){this._modules.update(t),y(this,!0)},v.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(v.prototype,m);var T=j((function(t,e){var n={};return $(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=z(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"===typeof o?o.call(this,e,n):e[o]},n[r].vuex=!0})),n})),D=j((function(t,e){var n={};return $(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var r=this.$store.commit;if(t){var i=z(this.$store,"mapMutations",t);if(!i)return;r=i.context.commit}return"function"===typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}})),n})),E=j((function(t,e){var n={};return $(e).forEach((function(e){var r=e.key,o=e.val;o=t+o,n[r]=function(){if(!t||z(this.$store,"mapGetters",t))return this.$store.getters[o]},n[r].vuex=!0})),n})),P=j((function(t,e){var n={};return $(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var r=this.$store.dispatch;if(t){var i=z(this.$store,"mapActions",t);if(!i)return;r=i.context.dispatch}return"function"===typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}})),n})),R=function(t){return{mapState:T.bind(null,t),mapGetters:E.bind(null,t),mapMutations:D.bind(null,t),mapActions:P.bind(null,t)}};function $(t){return I(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function I(t){return Array.isArray(t)||a(t)}function j(t){return function(e,n){return"string"!==typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function z(t,e,n){var r=t._modulesNamespaceMap[n];return r}var F={Store:v,install:_,version:"3.1.2",mapState:T,mapMutations:D,mapGetters:E,mapActions:P,createNamespacedHelpers:R};e["a"]=F}).call(this,n("c8ba"))},"304a":function(t,e,n){"use strict";function r(t){this.content=t}n.r(e),r.prototype={constructor:r,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return-1==e?void 0:this.content[e+1]},update:function(t,e,n){var o=n&&n!=t?this.remove(n):this,i=o.find(t),s=o.content.slice();return-1==i?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new r(s)},remove:function(t){var e=this.find(t);if(-1==e)return this;var n=this.content.slice();return n.splice(e,2),new r(n)},addToStart:function(t,e){return new r([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new r(n)},addBefore:function(t,e,n){var o=this.remove(e),i=o.content.slice(),s=o.find(t);return i.splice(-1==s?i.length:s,0,e,n),new r(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=r.from(t),t.size?new r(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=r.from(t),t.size?new r(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=r.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},get size(){return this.content.length>>1}},r.from=function(t){if(t instanceof r)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new r(e)};var o=r,i=o;function s(t,e,n){for(var r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;var o=t.child(r),i=e.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(var a=0;o.text[a]==i.text[a];a++)n++;return n}if(o.content.size||i.content.size){var c=s(o.content,i.content,n+1);if(null!=c)return c}n+=o.nodeSize}else n+=o.nodeSize}}function a(t,e,n,r){for(var o=t.childCount,i=e.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};var s=t.child(--o),c=e.child(--i),l=s.nodeSize;if(s!=c){if(!s.sameMarkup(c))return{a:n,b:r};if(s.isText&&s.text!=c.text){var u=0,f=Math.min(s.text.length,c.text.length);while(u<f&&s.text[s.text.length-u-1]==c.text[c.text.length-u-1])u++,n--,r--;return{a:n,b:r}}if(s.content.size||c.content.size){var p=a(s.content,c.content,n-1,r-1);if(p)return p}n-=l,r-=l}else n-=l,r-=l}}n.d(e,"ContentMatch",(function(){return B})),n.d(e,"DOMParser",(function(){return dt})),n.d(e,"DOMSerializer",(function(){return At})),n.d(e,"Fragment",(function(){return c})),n.d(e,"Mark",(function(){return d})),n.d(e,"MarkType",(function(){return ut})),n.d(e,"Node",(function(){return j})),n.d(e,"NodeRange",(function(){return R})),n.d(e,"NodeType",(function(){return st})),n.d(e,"ReplaceError",(function(){return h})),n.d(e,"ResolvedPos",(function(){return _})),n.d(e,"Schema",(function(){return ft})),n.d(e,"Slice",(function(){return v}));var c=function(t,e){if(this.content=t,this.size=e||0,null==e)for(var n=0;n<t.length;n++)this.size+=t[n].nodeSize},l={firstChild:{configurable:!0},lastChild:{configurable:!0},childCount:{configurable:!0}};c.prototype.nodesBetween=function(t,e,n,r,o){void 0===r&&(r=0);for(var i=0,s=0;s<e;i++){var a=this.content[i],c=s+a.nodeSize;if(c>t&&!1!==n(a,r+s,o,i)&&a.content.size){var l=s+1;a.nodesBetween(Math.max(0,t-l),Math.min(a.content.size,e-l),n,r+l)}s=c}},c.prototype.descendants=function(t){this.nodesBetween(0,this.size,t)},c.prototype.textBetween=function(t,e,n,r){var o="",i=!0;return this.nodesBetween(t,e,(function(s,a){s.isText?(o+=s.text.slice(Math.max(t,a)-a,e-a),i=!n):s.isLeaf&&r?(o+=r,i=!n):!i&&s.isBlock&&(o+=n,i=!0)}),0),o},c.prototype.append=function(t){if(!t.size)return this;if(!this.size)return t;var e=this.lastChild,n=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),o=1);o<t.content.length;o++)r.push(t.content[o]);return new c(r,this.size+t.size)},c.prototype.cut=function(t,e){if(null==e&&(e=this.size),0==t&&e==this.size)return this;var n=[],r=0;if(e>t)for(var o=0,i=0;i<e;o++){var s=this.content[o],a=i+s.nodeSize;a>t&&((i<t||a>e)&&(s=s.isText?s.cut(Math.max(0,t-i),Math.min(s.text.length,e-i)):s.cut(Math.max(0,t-i-1),Math.min(s.content.size,e-i-1))),n.push(s),r+=s.nodeSize),i=a}return new c(n,r)},c.prototype.cutByIndex=function(t,e){return t==e?c.empty:0==t&&e==this.content.length?this:new c(this.content.slice(t,e))},c.prototype.replaceChild=function(t,e){var n=this.content[t];if(n==e)return this;var r=this.content.slice(),o=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new c(r,o)},c.prototype.addToStart=function(t){return new c([t].concat(this.content),this.size+t.nodeSize)},c.prototype.addToEnd=function(t){return new c(this.content.concat(t),this.size+t.nodeSize)},c.prototype.eq=function(t){if(this.content.length!=t.content.length)return!1;for(var e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0},l.firstChild.get=function(){return this.content.length?this.content[0]:null},l.lastChild.get=function(){return this.content.length?this.content[this.content.length-1]:null},l.childCount.get=function(){return this.content.length},c.prototype.child=function(t){var e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range for "+this);return e},c.prototype.maybeChild=function(t){return this.content[t]},c.prototype.forEach=function(t){for(var e=0,n=0;e<this.content.length;e++){var r=this.content[e];t(r,n,e),n+=r.nodeSize}},c.prototype.findDiffStart=function(t,e){return void 0===e&&(e=0),s(this,t,e)},c.prototype.findDiffEnd=function(t,e,n){return void 0===e&&(e=this.size),void 0===n&&(n=t.size),a(this,t,e,n)},c.prototype.findIndex=function(t,e){if(void 0===e&&(e=-1),0==t)return f(0,t);if(t==this.size)return f(this.content.length,t);if(t>this.size||t<0)throw new RangeError("Position "+t+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var o=this.child(n),i=r+o.nodeSize;if(i>=t)return i==t||e>0?f(n+1,i):f(n,r);r=i}},c.prototype.toString=function(){return"<"+this.toStringInner()+">"},c.prototype.toStringInner=function(){return this.content.join(", ")},c.prototype.toJSON=function(){return this.content.length?this.content.map((function(t){return t.toJSON()})):null},c.fromJSON=function(t,e){if(!e)return c.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new c(e.map(t.nodeFromJSON))},c.fromArray=function(t){if(!t.length)return c.empty;for(var e,n=0,r=0;r<t.length;r++){var o=t[r];n+=o.nodeSize,r&&o.isText&&t[r-1].sameMarkup(o)?(e||(e=t.slice(0,r)),e[e.length-1]=o.withText(e[e.length-1].text+o.text)):e&&e.push(o)}return new c(e||t,n)},c.from=function(t){if(!t)return c.empty;if(t instanceof c)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new c([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))},Object.defineProperties(c.prototype,l);var u={index:0,offset:0};function f(t,e){return u.index=t,u.offset=e,u}function p(t,e){if(t===e)return!0;if(!t||"object"!=typeof t||!e||"object"!=typeof e)return!1;var n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(var r=0;r<t.length;r++)if(!p(t[r],e[r]))return!1}else{for(var o in t)if(!(o in e)||!p(t[o],e[o]))return!1;for(var i in e)if(!(i in t))return!1}return!0}c.empty=new c([],0);var d=function(t,e){this.type=t,this.attrs=e};function h(t){var e=Error.call(this,t);return e.__proto__=h.prototype,e}d.prototype.addToSet=function(t){for(var e,n=!1,r=0;r<t.length;r++){var o=t[r];if(this.eq(o))return t;if(this.type.excludes(o.type))e||(e=t.slice(0,r));else{if(o.type.excludes(this.type))return t;!n&&o.type.rank>this.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(o)}}return e||(e=t.slice()),n||e.push(this),e},d.prototype.removeFromSet=function(t){for(var e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t},d.prototype.isInSet=function(t){for(var e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1},d.prototype.eq=function(t){return this==t||this.type==t.type&&p(this.attrs,t.attrs)},d.prototype.toJSON=function(){var t={type:this.type.name};for(var e in this.attrs){t.attrs=this.attrs;break}return t},d.fromJSON=function(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");var n=t.marks[e.type];if(!n)throw new RangeError("There is no mark type "+e.type+" in this schema");return n.create(e.attrs)},d.sameSet=function(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0},d.setFrom=function(t){if(!t||0==t.length)return d.none;if(t instanceof d)return[t];var e=t.slice();return e.sort((function(t,e){return t.type.rank-e.type.rank})),e},d.none=[],h.prototype=Object.create(Error.prototype),h.prototype.constructor=h,h.prototype.name="ReplaceError";var v=function(t,e,n){this.content=t,this.openStart=e,this.openEnd=n},m={size:{configurable:!0}};function g(t,e,n){var r=t.findIndex(e),o=r.index,i=r.offset,s=t.maybeChild(o),a=t.findIndex(n),c=a.index,l=a.offset;if(i==e||s.isText){if(l!=n&&!t.child(c).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(o!=c)throw new RangeError("Removing non-flat range");return t.replaceChild(o,s.copy(g(s.content,e-i-1,n-i-1)))}function y(t,e,n,r){var o=t.findIndex(e),i=o.index,s=o.offset,a=t.maybeChild(i);if(s==e||a.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));var c=y(a.content,e-s-1,n);return c&&t.replaceChild(i,a.copy(c))}function b(t,e,n){if(n.openStart>t.depth)throw new h("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new h("Inconsistent open depths");return w(t,e,n,0)}function w(t,e,n,r){var o=t.index(r),i=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){var s=w(t,e,n,r+1);return i.copy(i.content.replaceChild(o,s))}if(n.content.size){if(n.openStart||n.openEnd||t.depth!=r||e.depth!=r){var a=A(n,t),c=a.start,l=a.end;return O(i,M(t,c,l,e,r))}var u=t.parent,f=u.content;return O(u,f.cut(0,t.parentOffset).append(n.content).append(f.cut(e.parentOffset)))}return O(i,N(t,e,r))}function S(t,e){if(!e.type.compatibleContent(t.type))throw new h("Cannot join "+e.type.name+" onto "+t.type.name)}function x(t,e,n){var r=t.node(n);return S(r,e.node(n)),r}function k(t,e){var n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function C(t,e,n,r){var o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(k(t.nodeAfter,r),i++));for(var a=i;a<s;a++)k(o.child(a),r);e&&e.depth==n&&e.textOffset&&k(e.nodeBefore,r)}function O(t,e){if(!t.type.validContent(e))throw new h("Invalid content for node "+t.type.name);return t.copy(e)}function M(t,e,n,r,o){var i=t.depth>o&&x(t,e,o+1),s=r.depth>o&&x(n,r,o+1),a=[];return C(null,t,o,a),i&&s&&e.index(o)==n.index(o)?(S(i,s),k(O(i,M(t,e,n,r,o+1)),a)):(i&&k(O(i,N(t,e,o+1)),a),C(e,n,o,a),s&&k(O(s,N(n,r,o+1)),a)),C(r,null,o,a),new c(a)}function N(t,e,n){var r=[];if(C(null,t,n,r),t.depth>n){var o=x(t,e,n+1);k(O(o,N(t,e,n+1)),r)}return C(e,null,n,r),new c(r)}function A(t,e){for(var n=e.depth-t.openStart,r=e.node(n),o=r.copy(t.content),i=n-1;i>=0;i--)o=e.node(i).copy(c.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}m.size.get=function(){return this.content.size-this.openStart-this.openEnd},v.prototype.insertAt=function(t,e){var n=y(this.content,t+this.openStart,e,null);return n&&new v(n,this.openStart,this.openEnd)},v.prototype.removeBetween=function(t,e){return new v(g(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)},v.prototype.eq=function(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd},v.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},v.prototype.toJSON=function(){if(!this.content.size)return null;var t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t},v.fromJSON=function(t,e){if(!e)return v.empty;var n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new v(c.fromJSON(t,e.content),e.openStart||0,e.openEnd||0)},v.maxOpen=function(t,e){void 0===e&&(e=!0);for(var n=0,r=0,o=t.firstChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.firstChild)n++;for(var i=t.lastChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.lastChild)r++;return new v(t,n,r)},Object.defineProperties(v.prototype,m),v.empty=new v(c.empty,0,0);var _=function(t,e,n){this.pos=t,this.path=e,this.depth=e.length/3-1,this.parentOffset=n},T={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};_.prototype.resolveDepth=function(t){return null==t?this.depth:t<0?this.depth+t:t},T.parent.get=function(){return this.node(this.depth)},T.doc.get=function(){return this.node(0)},_.prototype.node=function(t){return this.path[3*this.resolveDepth(t)]},_.prototype.index=function(t){return this.path[3*this.resolveDepth(t)+1]},_.prototype.indexAfter=function(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)},_.prototype.start=function(t){return t=this.resolveDepth(t),0==t?0:this.path[3*t-1]+1},_.prototype.end=function(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size},_.prototype.before=function(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]},_.prototype.after=function(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize},T.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},T.nodeAfter.get=function(){var t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r},T.nodeBefore.get=function(){var t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)},_.prototype.marks=function(){var t=this.parent,e=this.index();if(0==t.content.size)return d.none;if(this.textOffset)return t.child(e).marks;var n=t.maybeChild(e-1),r=t.maybeChild(e);if(!n){var o=n;n=r,r=o}for(var i=n.marks,s=0;s<i.length;s++)!1!==i[s].type.spec.inclusive||r&&i[s].isInSet(r.marks)||(i=i[s--].removeFromSet(i));return i},_.prototype.marksAcross=function(t){var e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;for(var n=e.marks,r=t.parent.maybeChild(t.index()),o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n},_.prototype.sharedDepth=function(t){for(var e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0},_.prototype.blockRange=function(t,e){if(void 0===t&&(t=this),t.pos<this.pos)return t.blockRange(this);for(var n=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new R(this,t,n)},_.prototype.sameParent=function(t){return this.pos-this.parentOffset==t.pos-t.parentOffset},_.prototype.max=function(t){return t.pos>this.pos?t:this},_.prototype.min=function(t){return t.pos<this.pos?t:this},_.prototype.toString=function(){for(var t="",e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset},_.resolve=function(t,e){if(!(e>=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");for(var n=[],r=0,o=e,i=t;;){var s=i.content.findIndex(o),a=s.index,c=s.offset,l=o-c;if(n.push(i,a,r+c),!l)break;if(i=i.child(a),i.isText)break;o=l-1,r+=c+1}return new _(e,n,o)},_.resolveCached=function(t,e){for(var n=0;n<D.length;n++){var r=D[n];if(r.pos==e&&r.doc==t)return r}var o=D[E]=_.resolve(t,e);return E=(E+1)%P,o},Object.defineProperties(_.prototype,T);var D=[],E=0,P=12,R=function(t,e,n){this.$from=t,this.$to=e,this.depth=n},$={start:{configurable:!0},end:{configurable:!0},parent:{configurable:!0},startIndex:{configurable:!0},endIndex:{configurable:!0}};$.start.get=function(){return this.$from.before(this.depth+1)},$.end.get=function(){return this.$to.after(this.depth+1)},$.parent.get=function(){return this.$from.node(this.depth)},$.startIndex.get=function(){return this.$from.index(this.depth)},$.endIndex.get=function(){return this.$to.indexAfter(this.depth)},Object.defineProperties(R.prototype,$);var I=Object.create(null),j=function(t,e,n,r){this.type=t,this.attrs=e,this.content=n||c.empty,this.marks=r||d.none},z={nodeSize:{configurable:!0},childCount:{configurable:!0},textContent:{configurable:!0},firstChild:{configurable:!0},lastChild:{configurable:!0},isBlock:{configurable:!0},isTextblock:{configurable:!0},inlineContent:{configurable:!0},isInline:{configurable:!0},isText:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};z.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},z.childCount.get=function(){return this.content.childCount},j.prototype.child=function(t){return this.content.child(t)},j.prototype.maybeChild=function(t){return this.content.maybeChild(t)},j.prototype.forEach=function(t){this.content.forEach(t)},j.prototype.nodesBetween=function(t,e,n,r){void 0===r&&(r=0),this.content.nodesBetween(t,e,n,r,this)},j.prototype.descendants=function(t){this.nodesBetween(0,this.content.size,t)},z.textContent.get=function(){return this.textBetween(0,this.content.size,"")},j.prototype.textBetween=function(t,e,n,r){return this.content.textBetween(t,e,n,r)},z.firstChild.get=function(){return this.content.firstChild},z.lastChild.get=function(){return this.content.lastChild},j.prototype.eq=function(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)},j.prototype.sameMarkup=function(t){return this.hasMarkup(t.type,t.attrs,t.marks)},j.prototype.hasMarkup=function(t,e,n){return this.type==t&&p(this.attrs,e||t.defaultAttrs||I)&&d.sameSet(this.marks,n||d.none)},j.prototype.copy=function(t){return void 0===t&&(t=null),t==this.content?this:new this.constructor(this.type,this.attrs,t,this.marks)},j.prototype.mark=function(t){return t==this.marks?this:new this.constructor(this.type,this.attrs,this.content,t)},j.prototype.cut=function(t,e){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))},j.prototype.slice=function(t,e,n){if(void 0===e&&(e=this.content.size),void 0===n&&(n=!1),t==e)return v.empty;var r=this.resolve(t),o=this.resolve(e),i=n?0:r.sharedDepth(e),s=r.start(i),a=r.node(i),c=a.content.cut(r.pos-s,o.pos-s);return new v(c,r.depth-i,o.depth-i)},j.prototype.replace=function(t,e,n){return b(this.resolve(t),this.resolve(e),n)},j.prototype.nodeAt=function(t){for(var e=this;;){var n=e.content.findIndex(t),r=n.index,o=n.offset;if(e=e.maybeChild(r),!e)return null;if(o==t||e.isText)return e;t-=o+1}},j.prototype.childAfter=function(t){var e=this.content.findIndex(t),n=e.index,r=e.offset;return{node:this.content.maybeChild(n),index:n,offset:r}},j.prototype.childBefore=function(t){if(0==t)return{node:null,index:0,offset:0};var e=this.content.findIndex(t),n=e.index,r=e.offset;if(r<t)return{node:this.content.child(n),index:n,offset:r};var o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}},j.prototype.resolve=function(t){return _.resolveCached(this,t)},j.prototype.resolveNoCache=function(t){return _.resolve(this,t)},j.prototype.rangeHasMark=function(t,e,n){var r=!1;return e>t&&this.nodesBetween(t,e,(function(t){return n.isInSet(t.marks)&&(r=!0),!r})),r},z.isBlock.get=function(){return this.type.isBlock},z.isTextblock.get=function(){return this.type.isTextblock},z.inlineContent.get=function(){return this.type.inlineContent},z.isInline.get=function(){return this.type.isInline},z.isText.get=function(){return this.type.isText},z.isLeaf.get=function(){return this.type.isLeaf},z.isAtom.get=function(){return this.type.isAtom},j.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),V(this.marks,t)},j.prototype.contentMatchAt=function(t){var e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e},j.prototype.canReplace=function(t,e,n,r,o){void 0===n&&(n=c.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var i=this.contentMatchAt(t).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,e);if(!s||!s.validEnd)return!1;for(var a=r;a<o;a++)if(!this.type.allowsMarks(n.child(a).marks))return!1;return!0},j.prototype.canReplaceWith=function(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;var o=this.contentMatchAt(t).matchType(n),i=o&&o.matchFragment(this.content,e);return!!i&&i.validEnd},j.prototype.canAppend=function(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)},j.prototype.defaultContentType=function(t){return this.contentMatchAt(t).defaultType},j.prototype.check=function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node "+this.type.name+": "+this.content.toString().slice(0,50));this.content.forEach((function(t){return t.check()}))},j.prototype.toJSON=function(){var t={type:this.type.name};for(var e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map((function(t){return t.toJSON()}))),t},j.fromJSON=function(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,n)}var r=c.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,r,n)},Object.defineProperties(j.prototype,z);var F=function(t){function e(e,n,r,o){if(t.call(this,e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={textContent:{configurable:!0},nodeSize:{configurable:!0}};return e.prototype.toString=function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):V(this.marks,JSON.stringify(this.text))},n.textContent.get=function(){return this.text},e.prototype.textBetween=function(t,e){return this.text.slice(t,e)},n.nodeSize.get=function(){return this.text.length},e.prototype.mark=function(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)},e.prototype.withText=function(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)},e.prototype.cut=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.text.length),0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))},e.prototype.eq=function(t){return this.sameMarkup(t)&&this.text==t.text},e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.text=this.text,e},Object.defineProperties(e.prototype,n),e}(j);function V(t,e){for(var n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}var B=function(t){this.validEnd=t,this.next=[],this.wrapCache=[]},L={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};B.parse=function(t,e){var n=new W(t,e);if(null==n.next)return B.empty;var r=K(n);n.next&&n.err("Unexpected trailing text");var o=et(Q(r));return nt(o,n),o},B.prototype.matchType=function(t){for(var e=0;e<this.next.length;e+=2)if(this.next[e]==t)return this.next[e+1];return null},B.prototype.matchFragment=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=t.childCount);for(var r=this,o=e;r&&o<n;o++)r=r.matchType(t.child(o).type);return r},L.inlineContent.get=function(){var t=this.next[0];return!!t&&t.isInline},L.defaultType.get=function(){for(var t=0;t<this.next.length;t+=2){var e=this.next[t];if(!e.isText&&!e.hasRequiredAttrs())return e}},B.prototype.compatible=function(t){for(var e=0;e<this.next.length;e+=2)for(var n=0;n<t.next.length;n+=2)if(this.next[e]==t.next[n])return!0;return!1},B.prototype.fillBefore=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=0);var r=[this];function o(i,s){var a=i.matchFragment(t,n);if(a&&(!e||a.validEnd))return c.from(s.map((function(t){return t.createAndFill()})));for(var l=0;l<i.next.length;l+=2){var u=i.next[l],f=i.next[l+1];if(!u.isText&&!u.hasRequiredAttrs()&&-1==r.indexOf(f)){r.push(f);var p=o(f,s.concat(u));if(p)return p}}}return o(this,[])},B.prototype.findWrapping=function(t){for(var e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==t)return this.wrapCache[e+1];var n=this.computeWrapping(t);return this.wrapCache.push(t,n),n},B.prototype.computeWrapping=function(t){var e=Object.create(null),n=[{match:this,type:null,via:null}];while(n.length){var r=n.shift(),o=r.match;if(o.matchType(t)){for(var i=[],s=r;s.type;s=s.via)i.push(s.type);return i.reverse()}for(var a=0;a<o.next.length;a+=2){var c=o.next[a];c.isLeaf||c.hasRequiredAttrs()||c.name in e||r.type&&!o.next[a+1].validEnd||(n.push({match:c.contentMatch,type:c,via:r}),e[c.name]=!0)}}},L.edgeCount.get=function(){return this.next.length>>1},B.prototype.edge=function(t){var e=t<<1;if(e>=this.next.length)throw new RangeError("There's no "+t+"th edge in this content match");return{type:this.next[e],next:this.next[e+1]}},B.prototype.toString=function(){var t=[];function e(n){t.push(n);for(var r=1;r<n.next.length;r+=2)-1==t.indexOf(n.next[r])&&e(n.next[r])}return e(this),t.map((function(e,n){for(var r=n+(e.validEnd?"*":" ")+" ",o=0;o<e.next.length;o+=2)r+=(o?", ":"")+e.next[o].name+"->"+t.indexOf(e.next[o+1]);return r})).join("\n")},Object.defineProperties(B.prototype,L),B.empty=new B(!0);var W=function(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.unshift()},q={next:{configurable:!0}};function K(t){var e=[];do{e.push(H(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function H(t){var e=[];do{e.push(J(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function J(t){for(var e=Y(t);;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=G(t,e)}return e}function U(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");var e=Number(t.next);return t.pos++,e}function G(t,e){var n=U(t),r=n;return t.eat(",")&&(r="}"!=t.next?U(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function X(t,e){var n=t.nodeTypes,r=n[e];if(r)return[r];var o=[];for(var i in n){var s=n[i];s.groups.indexOf(e)>-1&&o.push(s)}return 0==o.length&&t.err("No node type or group '"+e+"' found"),o}function Y(t){if(t.eat("(")){var e=K(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){var n=X(t,t.next).map((function(e){return null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}}));return t.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}t.err("Unexpected token '"+t.next+"'")}function Q(t){var e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){var o={term:r,to:n};return e[t].push(o),o}function o(t,e){t.forEach((function(t){return t.to=e}))}function i(t,e){if("choice"==t.type)return t.exprs.reduce((function(t,n){return t.concat(i(n,e))}),[]);if("seq"==t.type)for(var s=0;;s++){var a=i(t.exprs[s],e);if(s==t.exprs.length-1)return a;o(a,e=n())}else{if("star"==t.type){var c=n();return r(e,c),o(i(t.expr,c),c),[r(c)]}if("plus"==t.type){var l=n();return o(i(t.expr,e),l),o(i(t.expr,l),l),[r(l)]}if("opt"==t.type)return[r(e)].concat(i(t.expr,e));if("range"==t.type){for(var u=e,f=0;f<t.min;f++){var p=n();o(i(t.expr,u),p),u=p}if(-1==t.max)o(i(t.expr,u),u);else for(var d=t.min;d<t.max;d++){var h=n();r(u,h),o(i(t.expr,u),h),u=h}return[r(u)]}if("name"==t.type)return[r(e,null,t.value)]}}}function Z(t,e){return e-t}function tt(t,e){var n=[];return r(e),n.sort(Z);function r(e){var o=t[e];if(1==o.length&&!o[0].term)return r(o[0].to);n.push(e);for(var i=0;i<o.length;i++){var s=o[i],a=s.term,c=s.to;a||-1!=n.indexOf(c)||r(c)}}}function et(t){var e=Object.create(null);return n(tt(t,0));function n(r){var o=[];r.forEach((function(e){t[e].forEach((function(e){var n=e.term,r=e.to;if(n){var i=o.indexOf(n),s=i>-1&&o[i+1];tt(t,r).forEach((function(t){s||o.push(n,s=[]),-1==s.indexOf(t)&&s.push(t)}))}}))}));for(var i=e[r.join(",")]=new B(r.indexOf(t.length-1)>-1),s=0;s<o.length;s+=2){var a=o[s+1].sort(Z);i.next.push(o[s],e[a.join(",")]||n(a))}return i}}function nt(t,e){for(var n=0,r=[t];n<r.length;n++){for(var o=r[n],i=!o.validEnd,s=[],a=0;a<o.next.length;a+=2){var c=o.next[a],l=o.next[a+1];s.push(c.name),!i||c.isText||c.hasRequiredAttrs()||(i=!1),-1==r.indexOf(l)&&r.push(l)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position")}}function rt(t){var e=Object.create(null);for(var n in t){var r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function ot(t,e){var n=Object.create(null);for(var r in t){var o=e&&e[r];if(void 0===o){var i=t[r];if(!i.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=i.default}n[r]=o}return n}function it(t){var e=Object.create(null);if(t)for(var n in t)e[n]=new ct(t[n]);return e}q.next.get=function(){return this.tokens[this.pos]},W.prototype.eat=function(t){return this.next==t&&(this.pos++||!0)},W.prototype.err=function(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")},Object.defineProperties(W.prototype,q);var st=function(t,e,n){this.name=t,this.schema=e,this.spec=n,this.groups=n.group?n.group.split(" "):[],this.attrs=it(n.attrs),this.defaultAttrs=rt(this.attrs),this.contentMatch=null,this.markSet=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==t),this.isText="text"==t},at={isInline:{configurable:!0},isTextblock:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};at.isInline.get=function(){return!this.isBlock},at.isTextblock.get=function(){return this.isBlock&&this.inlineContent},at.isLeaf.get=function(){return this.contentMatch==B.empty},at.isAtom.get=function(){return this.isLeaf||this.spec.atom},st.prototype.hasRequiredAttrs=function(t){for(var e in this.attrs)if(this.attrs[e].isRequired&&(!t||!(e in t)))return!0;return!1},st.prototype.compatibleContent=function(t){return this==t||this.contentMatch.compatible(t.contentMatch)},st.prototype.computeAttrs=function(t){return!t&&this.defaultAttrs?this.defaultAttrs:ot(this.attrs,t)},st.prototype.create=function(t,e,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new j(this,this.computeAttrs(t),c.from(e),d.setFrom(n))},st.prototype.createChecked=function(t,e,n){if(e=c.from(e),!this.validContent(e))throw new RangeError("Invalid content for node "+this.name);return new j(this,this.computeAttrs(t),e,d.setFrom(n))},st.prototype.createAndFill=function(t,e,n){if(t=this.computeAttrs(t),e=c.from(e),e.size){var r=this.contentMatch.fillBefore(e);if(!r)return null;e=r.append(e)}var o=this.contentMatch.matchFragment(e).fillBefore(c.empty,!0);return o?new j(this,t,e.append(o),d.setFrom(n)):null},st.prototype.validContent=function(t){var e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(var n=0;n<t.childCount;n++)if(!this.allowsMarks(t.child(n).marks))return!1;return!0},st.prototype.allowsMarkType=function(t){return null==this.markSet||this.markSet.indexOf(t)>-1},st.prototype.allowsMarks=function(t){if(null==this.markSet)return!0;for(var e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0},st.prototype.allowedMarks=function(t){if(null==this.markSet)return t;for(var e,n=0;n<t.length;n++)this.allowsMarkType(t[n].type)?e&&e.push(t[n]):e||(e=t.slice(0,n));return e?e.length?e:d.empty:t},st.compile=function(t,e){var n=Object.create(null);t.forEach((function(t,r){return n[t]=new st(t,e,r)}));var r=e.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(var o in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n},Object.defineProperties(st.prototype,at);var ct=function(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default},lt={isRequired:{configurable:!0}};lt.isRequired.get=function(){return!this.hasDefault},Object.defineProperties(ct.prototype,lt);var ut=function(t,e,n,r){this.name=t,this.schema=n,this.spec=r,this.attrs=it(r.attrs),this.rank=e,this.excluded=null;var o=rt(this.attrs);this.instance=o&&new d(this,o)};ut.prototype.create=function(t){return!t&&this.instance?this.instance:new d(this,ot(this.attrs,t))},ut.compile=function(t,e){var n=Object.create(null),r=0;return t.forEach((function(t,o){return n[t]=new ut(t,r++,e,o)})),n},ut.prototype.removeFromSet=function(t){for(var e=0;e<t.length;e++)if(t[e].type==this)return t.slice(0,e).concat(t.slice(e+1));return t},ut.prototype.isInSet=function(t){for(var e=0;e<t.length;e++)if(t[e].type==this)return t[e]},ut.prototype.excludes=function(t){return this.excluded.indexOf(t)>-1};var ft=function(t){for(var e in this.spec={},t)this.spec[e]=t[e];this.spec.nodes=i.from(t.nodes),this.spec.marks=i.from(t.marks),this.nodes=st.compile(this.spec.nodes,this),this.marks=ut.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var o=this.nodes[r],s=o.spec.content||"",a=o.spec.marks;o.contentMatch=n[s]||(n[s]=B.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?pt(this,a.split(" ")):""!=a&&o.inlineContent?null:[]}for(var c in this.marks){var l=this.marks[c],u=l.spec.excludes;l.excluded=null==u?[l]:""==u?[]:pt(this,u.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function pt(t,e){for(var n=[],r=0;r<e.length;r++){var o=e[r],i=t.marks[o],s=i;if(i)n.push(i);else for(var a in t.marks){var c=t.marks[a];("_"==o||c.spec.group&&c.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}ft.prototype.node=function(t,e,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof st))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)},ft.prototype.text=function(t,e){var n=this.nodes.text;return new F(n,n.defaultAttrs,t,d.setFrom(e))},ft.prototype.mark=function(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)},ft.prototype.nodeFromJSON=function(t){return j.fromJSON(this,t)},ft.prototype.markFromJSON=function(t){return d.fromJSON(this,t)},ft.prototype.nodeType=function(t){var e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e};var dt=function(t,e){var n=this;this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach((function(t){t.tag?n.tags.push(t):t.style&&n.styles.push(t)}))};dt.prototype.parse=function(t,e){void 0===e&&(e={});var n=new xt(this,e,!1);return n.addAll(t,null,e.from,e.to),n.finish()},dt.prototype.parseSlice=function(t,e){void 0===e&&(e={});var n=new xt(this,e,!0);return n.addAll(t,null,e.from,e.to),v.maxOpen(n.finish())},dt.prototype.matchTag=function(t,e){for(var n=0;n<this.tags.length;n++){var r=this.tags[n];if(Ot(t,r.tag)&&(void 0===r.namespace||t.namespaceURI==r.namespace)&&(!r.context||e.matchesContext(r.context))){if(r.getAttrs){var o=r.getAttrs(t);if(!1===o)continue;r.attrs=o}return r}}},dt.prototype.matchStyle=function(t,e,n){for(var r=0;r<this.styles.length;r++){var o=this.styles[r];if(!(0!=o.style.indexOf(t)||o.context&&!n.matchesContext(o.context)||o.style.length>t.length&&(61!=o.style.charCodeAt(t.length)||o.style.slice(t.length+1)!=e))){if(o.getAttrs){var i=o.getAttrs(e);if(!1===i)continue;o.attrs=i}return o}}},dt.schemaRules=function(t){var e=[];function n(t){for(var n=null==t.priority?50:t.priority,r=0;r<e.length;r++){var o=e[r],i=null==o.priority?50:o.priority;if(i<n)break}e.splice(r,0,t)}var r=function(e){var r=t.marks[e].spec.parseDOM;r&&r.forEach((function(t){n(t=Nt(t)),t.mark=e}))};for(var o in t.marks)r(o);var i=function(e){var r=t.nodes[s].spec.parseDOM;r&&r.forEach((function(t){n(t=Nt(t)),t.node=s}))};for(var s in t.nodes)i();return e},dt.fromSchema=function(t){return t.cached.domParser||(t.cached.domParser=new dt(t,dt.schemaRules(t)))};var ht={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},vt={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},mt={ol:!0,ul:!0},gt=1,yt=2,bt=4;function wt(t){return(t?gt:0)|("full"===t?yt:0)}var St=function(t,e,n,r,o,i){this.type=t,this.attrs=e,this.solid=r,this.match=o||(i&bt?null:t.contentMatch),this.options=i,this.content=[],this.marks=n,this.activeMarks=d.none};St.prototype.findWrapping=function(t){if(!this.match){if(!this.type)return[];var e=this.type.contentMatch.fillBefore(c.from(t));if(!e){var n,r=this.type.contentMatch;return(n=r.findWrapping(t.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)},St.prototype.finish=function(t){if(!(this.options>)){var e,n=this.content[this.content.length-1];n&&n.isText&&(e=/[ \t\r\n\u000c]+$/.exec(n.text))&&(n.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length)))}var r=c.from(this.content);return!t&&this.match&&(r=r.append(this.match.fillBefore(c.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r};var xt=function(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.pendingMarks=[];var r,o=e.topNode,i=wt(e.preserveWhitespace)|(n?bt:0);r=o?new St(o.type,o.attrs,d.none,!0,e.topMatch||o.type.contentMatch,i):new St(n?null:t.schema.topNodeType,null,d.none,!0,null,i),this.nodes=[r],this.open=0,this.find=e.findPositions,this.needsBlock=!1},kt={top:{configurable:!0},currentPos:{configurable:!0}};function Ct(t){for(var e=t.firstChild,n=null;e;e=e.nextSibling){var r=1==e.nodeType?e.nodeName.toLowerCase():null;r&&mt.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):"li"==r?n=e:r&&(n=null)}}function Ot(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Mt(t){var e,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];while(e=n.exec(t))r.push(e[1],e[2].trim());return r}function Nt(t){var e={};for(var n in t)e[n]=t[n];return e}kt.top.get=function(){return this.nodes[this.open]},xt.prototype.addDOM=function(t){if(3==t.nodeType)this.addTextNode(t);else if(1==t.nodeType){var e=t.getAttribute("style"),n=e?this.readStyles(Mt(e)):null;if(null!=n)for(var r=0;r<n.length;r++)this.addPendingMark(n[r]);if(this.addElement(t),null!=n)for(var o=0;o<n.length;o++)this.removePendingMark(n[o])}},xt.prototype.addTextNode=function(t){var e=t.nodeValue,n=this.top;if((n.type?n.type.inlineContent:n.content.length&&n.content[0].isInline)||/[^ \t\r\n\u000c]/.test(e)){if(n.options>)n.options&yt||(e=e.replace(/\r?\n|\r/g," "));else if(e=e.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(e)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],o=t.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(e=e.slice(1))}e&&this.insertNode(this.parser.schema.text(e)),this.findInText(t)}else this.findInside(t)},xt.prototype.addElement=function(t){var e=t.nodeName.toLowerCase();mt.hasOwnProperty(e)&&Ct(t);var n=this.options.ruleFromNode&&this.options.ruleFromNode(t)||this.parser.matchTag(t,this);if(n?n.ignore:vt.hasOwnProperty(e))this.findInside(t);else if(!n||n.skip){n&&n.skip.nodeType&&(t=n.skip);var r,o=this.top,i=this.needsBlock;if(ht.hasOwnProperty(e))r=!0,o.type||(this.needsBlock=!0);else if(!t.firstChild)return void this.leafFallback(t);this.addAll(t),r&&this.sync(o),this.needsBlock=i}else this.addElementByRule(t,n)},xt.prototype.leafFallback=function(t){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"))},xt.prototype.readStyles=function(t){for(var e=d.none,n=0;n<t.length;n+=2){var r=this.parser.matchStyle(t[n],t[n+1],this);if(r){if(r.ignore)return null;e=this.parser.schema.marks[r.mark].create(r.attrs).addToSet(e)}}return e},xt.prototype.addElementByRule=function(t,e){var n,r,o,i,s=this;e.node?(r=this.parser.schema.nodes[e.node],r.isLeaf?this.insertNode(r.create(e.attrs))||this.leafFallback(t):n=this.enter(r,e.attrs,e.preserveWhitespace)):(o=this.parser.schema.marks[e.mark],i=o.create(e.attrs),this.addPendingMark(i));var a=this.top;if(r&&r.isLeaf)this.findInside(t);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach((function(t){return s.insertNode(t)}));else{var c=e.contentElement;"string"==typeof c?c=t.querySelector(c):"function"==typeof c&&(c=c(t)),c||(c=t),this.findAround(t,c,!0),this.addAll(c,n)}n&&(this.sync(a),this.open--),i&&this.removePendingMark(i)},xt.prototype.addAll=function(t,e,n,r){for(var o=n||0,i=n?t.childNodes[n]:t.firstChild,s=null==r?null:t.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(i),e&&ht.hasOwnProperty(i.nodeName.toLowerCase())&&this.sync(e);this.findAtPoint(t,o)},xt.prototype.findPlace=function(t){for(var e,n,r=this.open;r>=0;r--){var o=this.nodes[r],i=o.findWrapping(t);if(i&&(!e||e.length>i.length)&&(e=i,n=o,!i.length))break;if(o.solid)break}if(!e)return!1;this.sync(n);for(var s=0;s<e.length;s++)this.enterInner(e[s],null,!1);return!0},xt.prototype.insertNode=function(t){if(t.isInline&&this.needsBlock&&!this.top.type){var e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(t)){this.closeExtra();var n=this.top;this.applyPendingMarks(n),n.match&&(n.match=n.match.matchType(t.type));for(var r=n.activeMarks,o=0;o<t.marks.length;o++)n.type&&!n.type.allowsMarkType(t.marks[o].type)||(r=t.marks[o].addToSet(r));return n.content.push(t.mark(r)),!0}return!1},xt.prototype.applyPendingMarks=function(t){for(var e=0;e<this.pendingMarks.length;e++){var n=this.pendingMarks[e];t.type&&!t.type.allowsMarkType(n.type)||n.isInSet(t.activeMarks)||(t.activeMarks=n.addToSet(t.activeMarks),this.pendingMarks.splice(e--,1))}},xt.prototype.enter=function(t,e,n){var r=this.findPlace(t.create(e));return r&&(this.applyPendingMarks(this.top),this.enterInner(t,e,!0,n)),r},xt.prototype.enterInner=function(t,e,n,r){this.closeExtra();var o=this.top;o.match=o.match&&o.match.matchType(t,e);var i=null==r?o.options&~bt:wt(r);o.options&bt&&0==o.content.length&&(i|=bt),this.nodes.push(new St(t,e,o.activeMarks,n,null,i)),this.open++},xt.prototype.closeExtra=function(t){var e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}},xt.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},xt.prototype.sync=function(t){for(var e=this.open;e>=0;e--)if(this.nodes[e]==t)return void(this.open=e)},xt.prototype.addPendingMark=function(t){this.pendingMarks.push(t)},xt.prototype.removePendingMark=function(t){var e=this.pendingMarks.lastIndexOf(t);if(e>-1)this.pendingMarks.splice(e,1);else{var n=this.top;n.activeMarks=t.removeFromSet(n.activeMarks)}},kt.currentPos.get=function(){this.closeExtra();for(var t=0,e=this.open;e>=0;e--){for(var n=this.nodes[e].content,r=n.length-1;r>=0;r--)t+=n[r].nodeSize;e&&t++}return t},xt.prototype.findAtPoint=function(t,e){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)},xt.prototype.findInside=function(t){if(this.find)for(var e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)},xt.prototype.findAround=function(t,e,n){if(t!=e&&this.find)for(var r=0;r<this.find.length;r++)if(null==this.find[r].pos&&1==t.nodeType&&t.contains(this.find[r].node)){var o=e.compareDocumentPosition(this.find[r].node);o&(n?2:4)&&(this.find[r].pos=this.currentPos)}},xt.prototype.findInText=function(t){if(this.find)for(var e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))},xt.prototype.matchesContext=function(t){var e=this;if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);var n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=function(t,a){for(;t>=0;t--){var c=n[t];if(""==c){if(t==n.length-1||0==t)continue;for(;a>=i;a--)if(s(t-1,a))return!0;return!1}var l=a>0||0==a&&o?e.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!l||l.name!=c&&-1==l.groups.indexOf(c))return!1;a--}return!0};return s(n.length-1,this.open)},xt.prototype.textblockFromContext=function(){var t=this.options.context;if(t)for(var e=t.depth;e>=0;e--){var n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}},Object.defineProperties(xt.prototype,kt);var At=function(t,e){this.nodes=t||{},this.marks=e||{}};function _t(t){var e={};for(var n in t){var r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Tt(t){return t.document||window.document}At.prototype.serializeFragment=function(t,e,n){var r=this;void 0===e&&(e={}),n||(n=Tt(e).createDocumentFragment());var o=n,i=null;return t.forEach((function(t){if(i||t.marks.length){i||(i=[]);var n=0,s=0;while(n<i.length&&s<t.marks.length){var a=t.marks[s];if(r.marks[a.type.name]){if(!a.eq(i[n])||!1===a.type.spec.spanning)break;n+=2,s++}else s++}while(n<i.length)o=i.pop(),i.pop();while(s<t.marks.length){var c=t.marks[s++],l=r.serializeMark(c,t.isInline,e);l&&(i.push(c,o),o.appendChild(l.dom),o=l.contentDOM||l.dom)}}o.appendChild(r.serializeNode(t,e))})),n},At.prototype.serializeNode=function(t,e){void 0===e&&(e={});var n=At.renderSpec(Tt(e),this.nodes[t.type.name](t)),r=n.dom,o=n.contentDOM;if(o){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");e.onContent?e.onContent(t,o,e):this.serializeFragment(t.content,e,o)}return r},At.prototype.serializeNodeAndMarks=function(t,e){void 0===e&&(e={});for(var n=this.serializeNode(t,e),r=t.marks.length-1;r>=0;r--){var o=this.serializeMark(t.marks[r],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n},At.prototype.serializeMark=function(t,e,n){void 0===n&&(n={});var r=this.marks[t.type.name];return r&&At.renderSpec(Tt(n),r(t,e))},At.renderSpec=function(t,e){if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};var n=t.createElement(e[0]),r=null,o=e[1],i=1;if(o&&"object"==typeof o&&null==o.nodeType&&!Array.isArray(o))for(var s in i=2,o)null!=o[s]&&n.setAttribute(s,o[s]);for(var a=i;a<e.length;a++){var c=e[a];if(0===c){if(a<e.length-1||a>i)throw new RangeError("Content hole must be the only child of its parent node");return{dom:n,contentDOM:n}}var l=At.renderSpec(t,c),u=l.dom,f=l.contentDOM;if(n.appendChild(u),f){if(r)throw new RangeError("Multiple content holes");r=f}}return{dom:n,contentDOM:r}},At.fromSchema=function(t){return t.cached.domSerializer||(t.cached.domSerializer=new At(this.nodesFromSchema(t),this.marksFromSchema(t)))},At.nodesFromSchema=function(t){var e=_t(t.nodes);return e.text||(e.text=function(t){return t.text}),e},At.marksFromSchema=function(t){return _t(t.marks)}},3410:function(t,e,n){var r=n("23e7"),o=n("d039"),i=n("7b0b"),s=n("e163"),a=n("e177"),c=o((function(){s(1)}));r({target:"Object",stat:!0,forced:c,sham:!a},{getPrototypeOf:function(t){return s(i(t))}})},"35a1":function(t,e,n){var r=n("f5df"),o=n("3f8c"),i=n("b622"),s=i("iterator");t.exports=function(t){if(void 0!=t)return t[s]||t["@@iterator"]||o[r(t)]}},"37e8":function(t,e,n){var r=n("83ab"),o=n("9bf2"),i=n("825a"),s=n("df75");t.exports=r?Object.defineProperties:function(t,e){i(t);var n,r=s(e),a=r.length,c=0;while(a>c)o.f(t,n=r[c++],e[n]);return t}},3835:function(t,e,n){"use strict";function r(t){if(Array.isArray(t))return t}n("a4d3"),n("e01a"),n("d28b"),n("e260"),n("d3b7"),n("25f0"),n("3ca3"),n("ddb0");function o(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0)if(n.push(s.value),e&&n.length===e)break}catch(c){o=!0,i=c}finally{try{r||null==a["return"]||a["return"]()}finally{if(o)throw i}}return n}}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function s(t,e){return r(t)||o(t,e)||i()}n.d(e,"a",(function(){return s}))},"3bbe":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"3ca3":function(t,e,n){"use strict";var r=n("6547").charAt,o=n("69f3"),i=n("7dd0"),s="String Iterator",a=o.set,c=o.getterFor(s);i(String,"String",(function(t){a(this,{type:s,string:String(t),index:0})}),(function(){var t,e=c(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},"3f8c":function(t,e){t.exports={}},"428f":function(t,e,n){var r=n("da84");t.exports=r},"44ad":function(t,e,n){var r=n("d039"),o=n("c6b6"),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},"44d2":function(t,e,n){var r=n("b622"),o=n("7c73"),i=n("9112"),s=r("unscopables"),a=Array.prototype;void 0==a[s]&&i(a,s,o(null)),t.exports=function(t){a[s][t]=!0}},"44de":function(t,e,n){var r=n("da84");t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},"44e7":function(t,e,n){var r=n("861d"),o=n("c6b6"),i=n("b622"),s=i("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[s])?!!e:"RegExp"==o(t))}},4840:function(t,e,n){var r=n("825a"),o=n("1c0b"),i=n("b622"),s=i("species");t.exports=function(t,e){var n,i=r(t).constructor;return void 0===i||void 0==(n=r(i)[s])?e:o(n)}},4930:function(t,e,n){var r=n("d039");t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},"4d64":function(t,e,n){var r=n("fc6a"),o=n("50c4"),i=n("23cb"),s=function(t){return function(e,n,s){var a,c=r(e),l=o(c.length),u=i(s,l);if(t&&n!=n){while(l>u)if(a=c[u++],a!=a)return!0}else for(;l>u;u++)if((t||u in c)&&c[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},"4de4":function(t,e,n){"use strict";var r=n("23e7"),o=n("b727").filter,i=n("d039"),s=n("1dde"),a=s("filter"),c=a&&!i((function(){[].filter.call({length:-1,0:1},(function(t){throw t}))}));r({target:"Array",proto:!0,forced:!a||!c},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},"4e82":function(t,e,n){"use strict";var r=n("23e7"),o=n("1c0b"),i=n("7b0b"),s=n("d039"),a=n("b301"),c=[],l=c.sort,u=s((function(){c.sort(void 0)})),f=s((function(){c.sort(null)})),p=a("sort"),d=u||!f||p;r({target:"Array",proto:!0,forced:d},{sort:function(t){return void 0===t?l.call(i(this)):l.call(i(this),o(t))}})},"4fad":function(t,e,n){var r=n("23e7"),o=n("6f53").entries;r({target:"Object",stat:!0},{entries:function(t){return o(t)}})},"50c4":function(t,e,n){var r=n("a691"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},5135:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},5313:function(t,e,n){"use strict";n.r(e),n.d(e,"AllSelection",(function(){return d})),n.d(e,"EditorState",(function(){return O})),n.d(e,"NodeSelection",(function(){return f})),n.d(e,"Plugin",(function(){return _})),n.d(e,"PluginKey",(function(){return E})),n.d(e,"Selection",(function(){return s})),n.d(e,"SelectionRange",(function(){return c})),n.d(e,"TextSelection",(function(){return l})),n.d(e,"Transaction",(function(){return w}));var r=n("304a"),o=n("0ac0"),i=Object.create(null),s=function(t,e,n){this.ranges=n||[new c(t.min(e),t.max(e))],this.$anchor=t,this.$head=e},a={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};a.anchor.get=function(){return this.$anchor.pos},a.head.get=function(){return this.$head.pos},a.from.get=function(){return this.$from.pos},a.to.get=function(){return this.$to.pos},a.$from.get=function(){return this.ranges[0].$from},a.$to.get=function(){return this.ranges[0].$to},a.empty.get=function(){for(var t=this.ranges,e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0},s.prototype.content=function(){return this.$from.node(0).slice(this.from,this.to,!0)},s.prototype.replace=function(t,e){void 0===e&&(e=r["Slice"].empty);for(var n=e.content.lastChild,o=null,i=0;i<e.openEnd;i++)o=n,n=n.lastChild;for(var s=t.steps.length,a=this.ranges,c=0;c<a.length;c++){var l=a[c],u=l.$from,f=l.$to,p=t.mapping.slice(s);t.replaceRange(p.map(u.pos),p.map(f.pos),c?r["Slice"].empty:e),0==c&&m(t,s,(n?n.isInline:o&&o.isTextblock)?-1:1)}},s.prototype.replaceWith=function(t,e){for(var n=t.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],s=i.$from,a=i.$to,c=t.mapping.slice(n),l=c.map(s.pos),u=c.map(a.pos);o?t.deleteRange(l,u):(t.replaceRangeWith(l,u,e),m(t,n,e.isInline?-1:1))}},s.findFrom=function(t,e,n){var r=t.parent.inlineContent?new l(t):v(t.node(0),t.parent,t.pos,t.index(),e,n);if(r)return r;for(var o=t.depth-1;o>=0;o--){var i=e<0?v(t.node(0),t.node(o),t.before(o+1),t.index(o),e,n):v(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,n);if(i)return i}},s.near=function(t,e){return void 0===e&&(e=1),this.findFrom(t,e)||this.findFrom(t,-e)||new d(t.node(0))},s.atStart=function(t){return v(t,t,0,0,1)||new d(t)},s.atEnd=function(t){return v(t,t,t.content.size,t.childCount,-1)||new d(t)},s.fromJSON=function(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=i[e.type];if(!n)throw new RangeError("No selection type "+e.type+" defined");return n.fromJSON(t,e)},s.jsonID=function(t,e){if(t in i)throw new RangeError("Duplicate use of selection JSON ID "+t);return i[t]=e,e.prototype.jsonID=t,e},s.prototype.getBookmark=function(){return l.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(s.prototype,a),s.prototype.visible=!0;var c=function(t,e){this.$from=t,this.$to=e},l=function(t){function e(e,n){void 0===n&&(n=e),t.call(this,e,n)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},e.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));if(!o.parent.inlineContent)return t.near(o);var i=n.resolve(r.map(this.anchor));return new e(i.parent.inlineContent?i:o,o)},e.prototype.replace=function(e,n){if(void 0===n&&(n=r["Slice"].empty),t.prototype.replace.call(this,e,n),n==r["Slice"].empty){var o=this.$from.marksAcross(this.$to);o&&e.ensureMarks(o)}},e.prototype.eq=function(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head},e.prototype.getBookmark=function(){return new u(this.anchor,this.head)},e.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},e.fromJSON=function(t,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))},e.create=function(t,e,n){void 0===n&&(n=e);var r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))},e.between=function(n,r,o){var i=n.pos-r.pos;if(o&&!i||(o=i>=0?1:-1),!r.parent.inlineContent){var s=t.findFrom(r,o,!0)||t.findFrom(r,-o,!0);if(!s)return t.near(r,o);r=s.$head}return n.parent.inlineContent||(0==i?n=r:(n=(t.findFrom(n,-o,!0)||t.findFrom(n,o,!0)).$anchor,n.pos<r.pos!=i<0&&(n=r))),new e(n,r)},Object.defineProperties(e.prototype,n),e}(s);s.jsonID("text",l);var u=function(t,e){this.anchor=t,this.head=e};u.prototype.map=function(t){return new u(t.map(this.anchor),t.map(this.head))},u.prototype.resolve=function(t){return l.between(t.resolve(this.anchor),t.resolve(this.head))};var f=function(t){function e(e){var n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);t.call(this,e,r),this.node=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.map=function(n,r){var o=r.mapResult(this.anchor),i=o.deleted,s=o.pos,a=n.resolve(s);return i?t.near(a):new e(a)},e.prototype.content=function(){return new r["Slice"](r["Fragment"].from(this.node),0,0)},e.prototype.eq=function(t){return t instanceof e&&t.anchor==this.anchor},e.prototype.toJSON=function(){return{type:"node",anchor:this.anchor}},e.prototype.getBookmark=function(){return new p(this.anchor)},e.fromJSON=function(t,n){if("number"!=typeof n.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new e(t.resolve(n.anchor))},e.create=function(t,e){return new this(t.resolve(e))},e.isSelectable=function(t){return!t.isText&&!1!==t.type.spec.selectable},e}(s);f.prototype.visible=!1,s.jsonID("node",f);var p=function(t){this.anchor=t};p.prototype.map=function(t){var e=t.mapResult(this.anchor),n=e.deleted,r=e.pos;return n?new u(r,r):new p(r)},p.prototype.resolve=function(t){var e=t.resolve(this.anchor),n=e.nodeAfter;return n&&f.isSelectable(n)?new f(e):s.near(e)};var d=function(t){function e(e){t.call(this,e.resolve(0),e.resolve(e.content.size))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toJSON=function(){return{type:"all"}},e.fromJSON=function(t){return new e(t)},e.prototype.map=function(t){return new e(t)},e.prototype.eq=function(t){return t instanceof e},e.prototype.getBookmark=function(){return h},e}(s);s.jsonID("all",d);var h={map:function(){return this},resolve:function(t){return new d(t)}};function v(t,e,n,r,o,i){if(e.inlineContent)return l.create(t,n);for(var s=r-(o>0?0:1);o>0?s<e.childCount:s>=0;s+=o){var a=e.child(s);if(a.isAtom){if(!i&&f.isSelectable(a))return f.create(t,n-(o<0?a.nodeSize:0))}else{var c=v(t,a,n+o,o<0?a.childCount:0,o,i);if(c)return c}n+=a.nodeSize*o}}function m(t,e,n){var r=t.steps.length-1;if(!(r<e)){var i=t.steps[r];if(i instanceof o["b"]||i instanceof o["a"]){var a,c=t.mapping.maps[r];c.forEach((function(t,e,n,r){null==a&&(a=r)})),t.setSelection(s.near(t.doc.resolve(a),n))}}}var g=1,y=2,b=4,w=function(t){function e(e){t.call(this,e.doc),this.time=Date.now(),this.curSelection=e.selection,this.curSelectionFor=0,this.storedMarks=e.storedMarks,this.updated=0,this.meta=Object.create(null)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={selection:{configurable:!0},selectionSet:{configurable:!0},storedMarksSet:{configurable:!0},isGeneric:{configurable:!0},scrolledIntoView:{configurable:!0}};return n.selection.get=function(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection},e.prototype.setSelection=function(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|g)&~y,this.storedMarks=null,this},n.selectionSet.get=function(){return(this.updated&g)>0},e.prototype.setStoredMarks=function(t){return this.storedMarks=t,this.updated|=y,this},e.prototype.ensureMarks=function(t){return r["Mark"].sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this},e.prototype.addStoredMark=function(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))},e.prototype.removeStoredMark=function(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(this.updated&y)>0},e.prototype.addStep=function(e,n){t.prototype.addStep.call(this,e,n),this.updated=this.updated&~y,this.storedMarks=null},e.prototype.setTime=function(t){return this.time=t,this},e.prototype.replaceSelection=function(t){return this.selection.replace(this,t),this},e.prototype.replaceSelectionWith=function(t,e){var n=this.selection;return!1!==e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r["Mark"].none))),n.replaceWith(this,t),this},e.prototype.deleteSelection=function(){return this.selection.replace(this),this},e.prototype.insertText=function(t,e,n){void 0===n&&(n=e);var r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();if(!t)return this.deleteRange(e,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(e);o=n==e?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,o)),this.selection.empty||this.setSelection(s.near(this.selection.$to)),this},e.prototype.setMeta=function(t,e){return this.meta["string"==typeof t?t:t.key]=e,this},e.prototype.getMeta=function(t){return this.meta["string"==typeof t?t:t.key]},n.isGeneric.get=function(){for(var t in this.meta)return!1;return!0},e.prototype.scrollIntoView=function(){return this.updated|=b,this},n.scrolledIntoView.get=function(){return(this.updated&b)>0},Object.defineProperties(e.prototype,n),e}(o["c"]);function S(t,e){return e&&t?t.bind(e):t}var x=function(t,e,n){this.name=t,this.init=S(e.init,n),this.apply=S(e.apply,n)},k=[new x("doc",{init:function(t){return t.doc||t.schema.topNodeType.createAndFill()},apply:function(t){return t.doc}}),new x("selection",{init:function(t,e){return t.selection||s.atStart(e.doc)},apply:function(t){return t.selection}}),new x("storedMarks",{init:function(t){return t.storedMarks||null},apply:function(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new x("scrollToSelection",{init:function(){return 0},apply:function(t,e){return t.scrolledIntoView?e+1:e}})],C=function(t,e){var n=this;this.schema=t,this.fields=k.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),e&&e.forEach((function(t){if(n.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");n.plugins.push(t),n.pluginsByKey[t.key]=t,t.spec.state&&n.fields.push(new x(t.key,t.spec.state,t))}))},O=function(t){this.config=t},M={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};M.schema.get=function(){return this.config.schema},M.plugins.get=function(){return this.config.plugins},O.prototype.apply=function(t){return this.applyTransaction(t).state},O.prototype.filterTransaction=function(t,e){void 0===e&&(e=-1);for(var n=0;n<this.config.plugins.length;n++)if(n!=e){var r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,t,this))return!1}return!0},O.prototype.applyTransaction=function(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};for(var e=[t],n=this.applyInner(t),r=null;;){for(var o=!1,i=0;i<this.config.plugins.length;i++){var s=this.config.plugins[i];if(s.spec.appendTransaction){var a=r?r[i].n:0,c=r?r[i].state:this,l=a<e.length&&s.spec.appendTransaction.call(s,a?e.slice(a):e,c,n);if(l&&n.filterTransaction(l,i)){if(l.setMeta("appendedTransaction",t),!r){r=[];for(var u=0;u<this.config.plugins.length;u++)r.push(u<i?{state:n,n:e.length}:{state:this,n:0})}e.push(l),n=n.applyInner(l),o=!0}r&&(r[i]={state:n,n:e.length})}}if(!o)return{state:n,transactions:e}}},O.prototype.applyInner=function(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var e=new O(this.config),n=this.config.fields,r=0;r<n.length;r++){var o=n[r];e[o.name]=o.apply(t,this[o.name],this,e)}for(var i=0;i<N.length;i++)N[i](this,t,e);return e},M.tr.get=function(){return new w(this)},O.create=function(t){for(var e=new C(t.schema||t.doc.type.schema,t.plugins),n=new O(e),r=0;r<e.fields.length;r++)n[e.fields[r].name]=e.fields[r].init(t,n);return n},O.prototype.reconfigure=function(t){for(var e=new C(t.schema||this.schema,t.plugins),n=e.fields,r=new O(e),o=0;o<n.length;o++){var i=n[o].name;r[i]=this.hasOwnProperty(i)?this[i]:n[o].init(t,r)}return r},O.prototype.toJSON=function(t){var e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map((function(t){return t.toJSON()}))),t&&"object"==typeof t)for(var n in t){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var r=t[n],o=r.spec.state;o&&o.toJSON&&(e[n]=o.toJSON.call(r,this[r.key]))}return e},O.fromJSON=function(t,e,n){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");var o=new C(t.schema,t.plugins),i=new O(o);return o.fields.forEach((function(o){if("doc"==o.name)i.doc=r["Node"].fromJSON(t.schema,e.doc);else if("selection"==o.name)i.selection=s.fromJSON(i.doc,e.selection);else if("storedMarks"==o.name)e.storedMarks&&(i.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(var a in n){var c=n[a],l=c.spec.state;if(c.key==o.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(e,a))return void(i[o.name]=l.fromJSON.call(c,t,e[a],i))}i[o.name]=o.init(t,i)}})),i},O.addApplyListener=function(t){N.push(t)},O.removeApplyListener=function(t){var e=N.indexOf(t);e>-1&&N.splice(e,1)},Object.defineProperties(O.prototype,M);var N=[];function A(t,e,n){for(var r in t){var o=t[r];o instanceof Function?o=o.bind(e):"handleDOMEvents"==r&&(o=A(o,e,{})),n[r]=o}return n}var _=function(t){this.props={},t.props&&A(t.props,this,this.props),this.spec=t,this.key=t.key?t.key.key:D("plugin")};_.prototype.getState=function(t){return t[this.key]};var T=Object.create(null);function D(t){return t in T?t+"$"+ ++T[t]:(T[t]=0,t+"$")}var E=function(t){void 0===t&&(t="key"),this.key=D(t)};E.prototype.get=function(t){return t.config.pluginsByKey[this.key]},E.prototype.getState=function(t){return t[this.key]}},5319:function(t,e,n){"use strict";var r=n("d784"),o=n("825a"),i=n("7b0b"),s=n("50c4"),a=n("a691"),c=n("1d80"),l=n("8aa5"),u=n("14c3"),f=Math.max,p=Math.min,d=Math.floor,h=/\$([$&'`]|\d\d?|<[^>]*>)/g,v=/\$([$&'`]|\d\d?)/g,m=function(t){return void 0===t?t:String(t)};r("replace",2,(function(t,e,n){return[function(n,r){var o=c(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,o,r):e.call(String(o),n,r)},function(t,i){var c=n(e,t,this,i);if(c.done)return c.value;var d=o(t),h=String(this),v="function"===typeof i;v||(i=String(i));var g=d.global;if(g){var y=d.unicode;d.lastIndex=0}var b=[];while(1){var w=u(d,h);if(null===w)break;if(b.push(w),!g)break;var S=String(w[0]);""===S&&(d.lastIndex=l(h,s(d.lastIndex),y))}for(var x="",k=0,C=0;C<b.length;C++){w=b[C];for(var O=String(w[0]),M=f(p(a(w.index),h.length),0),N=[],A=1;A<w.length;A++)N.push(m(w[A]));var _=w.groups;if(v){var T=[O].concat(N,M,h);void 0!==_&&T.push(_);var D=String(i.apply(void 0,T))}else D=r(O,h,M,N,_,i);M>=k&&(x+=h.slice(k,M)+D,k=M+O.length)}return x+h.slice(k)}];function r(t,n,r,o,s,a){var c=r+t.length,l=o.length,u=v;return void 0!==s&&(s=i(s),u=h),e.call(a,u,(function(e,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(c);case"<":a=s[i.slice(1,-1)];break;default:var u=+i;if(0===u)return e;if(u>l){var f=d(u/10);return 0===f?e:f<=l?void 0===o[f-1]?i.charAt(1):o[f-1]+i.charAt(1):e}a=o[u-1]}return void 0===a?"":a}))}}))},"53ca":function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));n("a4d3"),n("e01a"),n("d28b"),n("e260"),n("d3b7"),n("3ca3"),n("ddb0");function r(t){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t){return o="function"===typeof Symbol&&"symbol"===r(Symbol.iterator)?function(t){return r(t)}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":r(t)},o(t)}},"55be":function(t,e,n){"use strict";n.r(e),n.d(e,"CellSelection",(function(){return $})),n.d(e,"TableMap",(function(){return v})),n.d(e,"__clipCells",(function(){return U})),n.d(e,"__insertCells",(function(){return Q})),n.d(e,"__pastedCells",(function(){return K})),n.d(e,"addColumn",(function(){return mt})),n.d(e,"addColumnAfter",(function(){return yt})),n.d(e,"addColumnBefore",(function(){return gt})),n.d(e,"addRow",(function(){return xt})),n.d(e,"addRowAfter",(function(){return Ct})),n.d(e,"addRowBefore",(function(){return kt})),n.d(e,"cellAround",(function(){return S})),n.d(e,"colCount",(function(){return T})),n.d(e,"columnResizing",(function(){return Kt})),n.d(e,"columnResizingPluginKey",(function(){return qt})),n.d(e,"deleteColumn",(function(){return wt})),n.d(e,"deleteRow",(function(){return Mt})),n.d(e,"deleteTable",(function(){return Bt})),n.d(e,"findCell",(function(){return _})),n.d(e,"fixTables",(function(){return pt})),n.d(e,"fixTablesKey",(function(){return ut})),n.d(e,"goToNextCell",(function(){return Vt})),n.d(e,"handlePaste",(function(){return it})),n.d(e,"inSameTable",(function(){return A})),n.d(e,"isInTable",(function(){return k})),n.d(e,"mergeCells",(function(){return _t})),n.d(e,"moveCellForward",(function(){return N})),n.d(e,"nextCell",(function(){return D})),n.d(e,"removeColumn",(function(){return bt})),n.d(e,"removeRow",(function(){return Ot})),n.d(e,"rowIsHeader",(function(){return St})),n.d(e,"selectedRect",(function(){return ht})),n.d(e,"selectionCell",(function(){return C})),n.d(e,"setCellAttr",(function(){return Et})),n.d(e,"splitCell",(function(){return Tt})),n.d(e,"splitCellWithType",(function(){return Dt})),n.d(e,"tableEditing",(function(){return ie})),n.d(e,"tableEditingKey",(function(){return w})),n.d(e,"tableNodes",(function(){return W})),n.d(e,"toggleHeader",(function(){return $t})),n.d(e,"toggleHeaderCell",(function(){return zt})),n.d(e,"toggleHeaderColumn",(function(){return jt})),n.d(e,"toggleHeaderRow",(function(){return It})),n.d(e,"updateColumnsOnResize",(function(){return Wt}));var r,o,i=n("5313"),s=n("304a"),a=n("7f06"),c=n("576a"),l=n("0ac0");if("undefined"!=typeof WeakMap){var u=new WeakMap;r=function(t){return u.get(t)},o=function(t,e){return u.set(t,e),e}}else{var f=[],p=10,d=0;r=function(t){for(var e=0;e<f.length;e+=2)if(f[e]==t)return f[e+1]},o=function(t,e){return d==p&&(d=0),f[d++]=t,f[d++]=e}}var h=function(t,e,n,r){this.left=t,this.top=e,this.right=n,this.bottom=r},v=function(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r};function m(t){if("table"!=t.type.spec.tableRole)throw new RangeError("Not a table node: "+t.type.name);for(var e=g(t),n=t.childCount,r=[],o=0,i=null,s=[],a=0,c=e*n;a<c;a++)r[a]=0;for(var l=0,u=0;l<n;l++){var f=t.child(l);u++;for(var p=0;;p++){while(o<r.length&&0!=r[o])o++;if(p==f.childCount)break;for(var d=f.child(p),h=d.attrs,m=h.colspan,b=h.rowspan,w=h.colwidth,S=0;S<b;S++){if(S+l>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:u,n:b-S});break}for(var x=o+S*e,k=0;k<m;k++){0==r[x+k]?r[x+k]=u:(i||(i=[])).push({type:"collision",row:l,pos:u,n:m-k});var C=w&&w[k];if(C){var O=(x+k)%e*2,M=s[O];null==M||M!=C&&1==s[O+1]?(s[O]=C,s[O+1]=1):M==C&&s[O+1]++}}}o+=m,u+=d.nodeSize}var N=(l+1)*e,A=0;while(o<N)0==r[o++]&&A++;A&&(i||(i=[])).push({type:"missing",row:l,n:A}),u++}for(var _=new v(e,n,r,i),T=!1,D=0;!T&&D<s.length;D+=2)null!=s[D]&&s[D+1]<n&&(T=!0);return T&&y(_,s,t),_}function g(t){for(var e=-1,n=!1,r=0;r<t.childCount;r++){var o=t.child(r),i=0;if(n)for(var s=0;s<r;s++)for(var a=t.child(s),c=0;c<a.childCount;c++){var l=a.child(c);s+l.attrs.rowspan>r&&(i+=l.attrs.colspan)}for(var u=0;u<o.childCount;u++){var f=o.child(u);i+=f.attrs.colspan,f.attrs.rowspan>1&&(n=!0)}-1==e?e=i:e!=i&&(e=Math.max(e,i))}return e}function y(t,e,n){t.problems||(t.problems=[]);for(var r=0,o={};r<t.map.length;r++){var i=t.map[r];if(!o[i]){o[i]=!0;for(var s=n.nodeAt(i),a=null,c=0;c<s.attrs.colspan;c++){var l=(r+c)%t.width,u=e[2*l];null==u||s.attrs.colwidth&&s.attrs.colwidth[c]==u||((a||(a=b(s.attrs)))[c]=u)}a&&t.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:a})}}}function b(t){if(t.colwidth)return t.colwidth.slice();for(var e=[],n=0;n<t.colspan;n++)e.push(0);return e}v.prototype.findCell=function(t){for(var e=0;e<this.map.length;e++){var n=this.map[e];if(n==t){for(var r=e%this.width,o=e/this.width|0,i=r+1,s=o+1,a=1;i<this.width&&this.map[e+a]==n;a++)i++;for(var c=1;s<this.height&&this.map[e+this.width*c]==n;c++)s++;return new h(r,o,i,s)}}throw new RangeError("No cell with offset "+t+" found")},v.prototype.colCount=function(t){for(var e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError("No cell with offset "+t+" found")},v.prototype.nextCell=function(t,e,n){var r=this.findCell(t),o=r.left,i=r.right,s=r.top,a=r.bottom;return"horiz"==e?(n<0?0==o:i==this.width)?null:this.map[s*this.width+(n<0?o-1:i)]:(n<0?0==s:a==this.height)?null:this.map[o+this.width*(n<0?s-1:a)]},v.prototype.rectBetween=function(t,e){var n=this.findCell(t),r=n.left,o=n.right,i=n.top,s=n.bottom,a=this.findCell(e),c=a.left,l=a.right,u=a.top,f=a.bottom;return new h(Math.min(r,c),Math.min(i,u),Math.max(o,l),Math.max(s,f))},v.prototype.cellsInRect=function(t){for(var e=[],n={},r=t.top;r<t.bottom;r++)for(var o=t.left;o<t.right;o++){var i=r*this.width+o,s=this.map[i];n[s]||(n[s]=!0,o==t.left&&o&&this.map[i-1]==s||r==t.top&&r&&this.map[i-this.width]==s||e.push(s))}return e},v.prototype.positionAt=function(t,e,n){for(var r=0,o=0;;r++){var i=o+n.child(r).nodeSize;if(r==t){var s=e+t*this.width,a=(t+1)*this.width;while(s<a&&this.map[s]<o)s++;return s==a?i-1:this.map[s]}o=i}},v.get=function(t){return r(t)||o(t,m(t))};var w=new i["PluginKey"]("selectingCells");function S(t){for(var e=t.depth-1;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return t.node(0).resolve(t.before(e+1));return null}function x(t){for(var e=t.depth;e>0;e--){var n=t.node(e).type.spec.tableRole;if("cell"===n||"header_cell"===n)return t.node(e)}return null}function k(t){for(var e=t.selection.$head,n=e.depth;n>0;n--)if("row"==e.node(n).type.spec.tableRole)return!0;return!1}function C(t){var e=t.selection;return e.$anchorCell?e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell:e.node&&"cell"==e.node.type.spec.tableRole?e.$anchor:S(e.$head)||O(e.$head)}function O(t){for(var e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){var r=e.type.spec.tableRole;if("cell"==r||"header_cell"==r)return t.doc.resolve(n)}for(var o=t.nodeBefore,i=t.pos;o;o=o.lastChild,i--){var s=o.type.spec.tableRole;if("cell"==s||"header_cell"==s)return t.doc.resolve(i-o.nodeSize)}}function M(t){return"row"==t.parent.type.spec.tableRole&&t.nodeAfter}function N(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function A(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function _(t){return v.get(t.node(-1)).findCell(t.pos-t.start(-1))}function T(t){return v.get(t.node(-1)).colCount(t.pos-t.start(-1))}function D(t,e,n){var r=t.start(-1),o=v.get(t.node(-1)),i=o.nextCell(t.pos-r,e,n);return null==i?null:t.node(0).resolve(r+i)}function E(t,e,n){var r={};for(var o in t)r[o]=t[o];return r[e]=n,r}function P(t,e,n){void 0===n&&(n=1);var r=E(t,"colspan",t.colspan-n);return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some((function(t){return t>0}))||(r.colwidth=null)),r}function R(t,e,n){void 0===n&&(n=1);var r=E(t,"colspan",t.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(var o=0;o<n;o++)r.colwidth.splice(e,0,0)}return r}var $=function(t){function e(e,n){void 0===n&&(n=e);var r=e.node(-1),o=v.get(r),s=e.start(-1),a=o.rectBetween(e.pos-s,n.pos-s),c=e.node(0),l=o.cellsInRect(a).filter((function(t){return t!=n.pos-s}));l.unshift(n.pos-s);var u=l.map((function(t){var e=r.nodeAt(t),n=t+s+1;return new i["SelectionRange"](c.resolve(n),c.resolve(n+e.content.size))}));t.call(this,u[0].$from,u[0].$to,u),this.$anchorCell=e,this.$headCell=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.map=function(t,n){var r=t.resolve(n.map(this.$anchorCell.pos)),o=t.resolve(n.map(this.$headCell.pos));if(M(r)&&M(o)&&A(r,o)){var s=this.$anchorCell.node(-1)!=r.node(-1);return s&&this.isRowSelection()?e.rowSelection(r,o):s&&this.isColSelection()?e.colSelection(r,o):new e(r,o)}return i["TextSelection"].between(r,o)},e.prototype.content=function(){for(var t=this.$anchorCell.node(-1),e=v.get(t),n=this.$anchorCell.start(-1),r=e.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},i=[],a=r.top;a<r.bottom;a++){for(var c=[],l=a*e.width+r.left,u=r.left;u<r.right;u++,l++){var f=e.map[l];if(!o[f]){o[f]=!0;var p=e.findCell(f),d=t.nodeAt(f),h=r.left-p.left,m=p.right-r.right;if(h>0||m>0){var g=d.attrs;h>0&&(g=P(g,0,h)),m>0&&(g=P(g,g.colspan-m,m)),d=p.left<r.left?d.type.createAndFill(g):d.type.create(g,d.content)}if(p.top<r.top||p.bottom>r.bottom){var y=E(d.attrs,"rowspan",Math.min(p.bottom,r.bottom)-Math.max(p.top,r.top));d=p.top<r.top?d.type.createAndFill(y):d.type.create(y,d.content)}c.push(d)}}i.push(t.child(a).copy(s["Fragment"].from(c)))}var b=this.isColSelection()&&this.isRowSelection()?t:i;return new s["Slice"](s["Fragment"].from(b),1,1)},e.prototype.replace=function(e,n){void 0===n&&(n=s["Slice"].empty);for(var r=e.steps.length,o=this.ranges,i=0;i<o.length;i++){var a=o[i],c=a.$from,l=a.$to,u=e.mapping.slice(r);e.replace(u.map(c.pos),u.map(l.pos),i?s["Slice"].empty:n)}var f=t.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);f&&e.setSelection(f)},e.prototype.replaceWith=function(t,e){this.replace(t,new s["Slice"](s["Fragment"].from(e),0,0))},e.prototype.forEachCell=function(t){for(var e=this.$anchorCell.node(-1),n=v.get(e),r=this.$anchorCell.start(-1),o=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r)),i=0;i<o.length;i++)t(e.nodeAt(o[i]),r+o[i])},e.prototype.isColSelection=function(){var t=this.$anchorCell.index(-1),e=this.$headCell.index(-1);if(Math.min(t,e)>0)return!1;var n=t+this.$anchorCell.nodeAfter.attrs.rowspan,r=e+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount},e.colSelection=function(t,n){void 0===n&&(n=t);var r=v.get(t.node(-1)),o=t.start(-1),i=r.findCell(t.pos-o),s=r.findCell(n.pos-o),a=t.node(0);return i.top<=s.top?(i.top>0&&(t=a.resolve(o+r.map[i.left])),s.bottom<r.height&&(n=a.resolve(o+r.map[r.width*(r.height-1)+s.right-1]))):(s.top>0&&(n=a.resolve(o+r.map[s.left])),i.bottom<r.height&&(t=a.resolve(o+r.map[r.width*(r.height-1)+i.right-1]))),new e(t,n)},e.prototype.isRowSelection=function(){var t=v.get(this.$anchorCell.node(-1)),e=this.$anchorCell.start(-1),n=t.colCount(this.$anchorCell.pos-e),r=t.colCount(this.$headCell.pos-e);if(Math.min(n,r)>0)return!1;var o=n+this.$anchorCell.nodeAfter.attrs.colspan,i=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,i)==t.width},e.prototype.eq=function(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos},e.rowSelection=function(t,n){void 0===n&&(n=t);var r=v.get(t.node(-1)),o=t.start(-1),i=r.findCell(t.pos-o),s=r.findCell(n.pos-o),a=t.node(0);return i.left<=s.left?(i.left>0&&(t=a.resolve(o+r.map[i.top*r.width])),s.right<r.width&&(n=a.resolve(o+r.map[r.width*(s.top+1)-1]))):(s.left>0&&(n=a.resolve(o+r.map[s.top*r.width])),i.right<r.width&&(t=a.resolve(o+r.map[r.width*(i.top+1)-1]))),new e(t,n)},e.prototype.toJSON=function(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}},e.fromJSON=function(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))},e.create=function(t,n,r){return void 0===r&&(r=n),new e(t.resolve(n),t.resolve(r))},e.prototype.getBookmark=function(){return new I(this.$anchorCell.pos,this.$headCell.pos)},e}(i["Selection"]);$.prototype.visible=!1,i["Selection"].jsonID("cell",$);var I=function(t,e){this.anchor=t,this.head=e};function j(t){if(!(t.selection instanceof $))return null;var e=[];return t.selection.forEachCell((function(t,n){e.push(c["a"].node(n,n+t.nodeSize,{class:"selectedCell"}))})),c["b"].create(t.doc,e)}function z(t){var e=t.$from,n=t.$to;if(e.pos==n.pos||e.pos<e.pos-6)return!1;for(var r=e.pos,o=n.pos,i=e.depth;i>=0;i--,r++)if(e.after(i+1)<e.end(i))break;for(var s=n.depth;s>=0;s--,o--)if(n.before(s+1)>n.start(s))break;return r==o&&/row|table/.test(e.node(i).type.spec.tableRole)}function F(t){for(var e,n,r=t.$from,o=t.$to,i=r.depth;i>0;i--){var s=r.node(i);if("cell"===s.type.spec.tableRole||"header_cell"===s.type.spec.tableRole){e=s;break}}for(var a=o.depth;a>0;a--){var c=o.node(a);if("cell"===c.type.spec.tableRole||"header_cell"===c.type.spec.tableRole){n=c;break}}return e!==n&&0===o.parentOffset}function V(t,e,n){var r,o,s=(e||t).selection,a=(e||t).doc;if(s instanceof i["NodeSelection"]&&(o=s.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)r=$.create(a,s.from);else if("row"==o){var c=a.resolve(s.from+1);r=$.rowSelection(c,c)}else if(!n){var l=v.get(s.node),u=s.from+1,f=u+l.map[l.width*l.height-1];r=$.create(a,u+1,f)}}else s instanceof i["TextSelection"]&&z(s)?r=i["TextSelection"].create(a,s.from):s instanceof i["TextSelection"]&&F(s)&&(r=i["TextSelection"].create(a,s.$from.start(),s.$from.end()));return r&&(e||(e=t.tr)).setSelection(r),e}function B(t,e){var n=t.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map((function(t){return Number(t)})):null,o=Number(t.getAttribute("colspan")||1),i={colspan:o,rowspan:Number(t.getAttribute("rowspan")||1),colwidth:r&&r.length==o?r:null};for(var s in e){var a=e[s].getFromDOM,c=a&&a(t);null!=c&&(i[s]=c)}return i}function L(t,e){var n={};for(var r in 1!=t.attrs.colspan&&(n.colspan=t.attrs.colspan),1!=t.attrs.rowspan&&(n.rowspan=t.attrs.rowspan),t.attrs.colwidth&&(n["data-colwidth"]=t.attrs.colwidth.join(",")),e){var o=e[r].setDOMAttr;o&&o(t.attrs[r],n)}return n}function W(t){var e=t.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(var r in e)n[r]={default:e[r].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:t.tableGroup,parseDOM:[{tag:"table"}],toDOM:function(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:function(){return["tr",0]}},table_cell:{content:t.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:function(t){return B(t,e)}}],toDOM:function(t){return["td",L(t,e),0]}},table_header:{content:t.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:function(t){return B(t,e)}}],toDOM:function(t){return["th",L(t,e),0]}}}}function q(t){var e=t.cached.tableNodeTypes;if(!e)for(var n in e=t.cached.tableNodeTypes={},t.nodes){var r=t.nodes[n],o=r.spec.tableRole;o&&(e[o]=r)}return e}function K(t){if(!t.size)return null;var e=t.content,n=t.openStart,r=t.openEnd;while(1==e.childCount&&(n>0&&r>0||"table"==e.firstChild.type.spec.tableRole))n--,r--,e=e.firstChild.content;var o=e.firstChild,i=o.type.spec.tableRole,a=o.type.schema,c=[];if("row"==i)for(var l=0;l<e.childCount;l++){var u=e.child(l).content,f=l?0:Math.max(0,n-1),p=l<e.childCount-1?0:Math.max(0,r-1);(f||p)&&(u=J(q(a).row,new s["Slice"](u,f,p)).content),c.push(u)}else{if("cell"!=i&&"header_cell"!=i)return null;c.push(n||r?J(q(a).row,new s["Slice"](e,n,r)).content:e)}return H(a,c)}function H(t,e){for(var n=[],r=0;r<e.length;r++)for(var o=e[r],i=o.childCount-1;i>=0;i--)for(var a=o.child(i).attrs,c=a.rowspan,l=a.colspan,u=r;u<r+c;u++)n[u]=(n[u]||0)+l;for(var f=0,p=0;p<n.length;p++)f=Math.max(f,n[p]);for(var d=0;d<n.length;d++)if(d>=e.length&&e.push(s["Fragment"].empty),n[d]<f){for(var h=q(t).cell.createAndFill(),v=[],m=n[d];m<f;m++)v.push(h);e[d]=e[d].append(s["Fragment"].from(v))}return{height:e.length,width:f,rows:e}}function J(t,e){var n=t.createAndFill(),r=new l["c"](n).replace(0,n.content.size,e);return r.doc}function U(t,e,n){var r=t.width,o=t.height,i=t.rows;if(r!=e){for(var a=[],c=[],l=0;l<i.length;l++){for(var u=i[l],f=[],p=a[l]||0,d=0;p<e;d++){var h=u.child(d%u.childCount);p+h.attrs.colspan>e&&(h=h.type.create(P(h.attrs,h.attrs.colspan,p+h.attrs.colspan-e),h.content)),f.push(h),p+=h.attrs.colspan;for(var v=1;v<h.attrs.rowspan;v++)a[l+v]=(a[l+v]||0)+h.attrs.colspan}c.push(s["Fragment"].from(f))}i=c,r=e}if(o!=n){for(var m=[],g=0,y=0;g<n;g++,y++){for(var b=[],w=i[y%o],S=0;S<w.childCount;S++){var x=w.child(S);g+x.attrs.rowspan>n&&(x=x.type.create(E(x.attrs,"rowspan",n-x.attrs.rowspan),x.content)),b.push(x)}m.push(s["Fragment"].from(b))}i=m,o=n}return{width:r,height:o,rows:i}}function G(t,e,n,r,o,i,a){var c,l,u=t.doc.type.schema,f=q(u);if(o>e.width)for(var p=0,d=0;p<e.height;p++){var h=n.child(p);d+=h.nodeSize;var v=[],m=void 0;m=null==h.lastChild||h.lastChild.type==f.cell?c||(c=f.cell.createAndFill()):l||(l=f.header_cell.createAndFill());for(var g=e.width;g<o;g++)v.push(m);t.insert(t.mapping.slice(a).map(d-1+r),v)}if(i>e.height){for(var y=[],b=0,w=(e.height-1)*e.width;b<Math.max(e.width,o);b++){var S=!(b>=e.width)&&n.nodeAt(e.map[w+b]).type==f.header_cell;y.push(S?l||(l=f.header_cell.createAndFill()):c||(c=f.cell.createAndFill()))}for(var x=f.row.create(null,s["Fragment"].from(y)),k=[],C=e.height;C<i;C++)k.push(x);t.insert(t.mapping.slice(a).map(r+n.nodeSize-2),k)}return!(!c&&!l)}function X(t,e,n,r,o,i,s,a){if(0==s||s==e.height)return!1;for(var c=!1,l=o;l<i;l++){var u=s*e.width+l,f=e.map[u];if(e.map[u-e.width]==f){c=!0;var p=n.nodeAt(f),d=e.findCell(f),h=d.top,v=d.left;t.setNodeMarkup(t.mapping.slice(a).map(f+r),null,E(p.attrs,"rowspan",s-h)),t.insert(t.mapping.slice(a).map(e.positionAt(s,v,n)),p.type.createAndFill(E(p.attrs,"rowspan",h+p.attrs.rowspan-s))),l+=p.attrs.colspan-1}}return c}function Y(t,e,n,r,o,i,s,a){if(0==s||s==e.width)return!1;for(var c=!1,l=o;l<i;l++){var u=l*e.width+s,f=e.map[u];if(e.map[u-1]==f){c=!0;var p=n.nodeAt(f),d=e.colCount(f),h=t.mapping.slice(a).map(f+r);t.setNodeMarkup(h,null,P(p.attrs,s-d,p.attrs.colspan-(s-d))),t.insert(h+p.nodeSize,p.type.createAndFill(P(p.attrs,0,s-d))),l+=p.attrs.rowspan-1}}return c}function Q(t,e,n,r,o){var i=n?t.doc.nodeAt(n-1):t.doc,a=v.get(i),c=r.top,l=r.left,u=l+o.width,f=c+o.height,p=t.tr,d=0;function h(){i=n?p.doc.nodeAt(n-1):p.doc,a=v.get(i),d=p.mapping.maps.length}G(p,a,i,n,u,f,d)&&h(),X(p,a,i,n,l,u,c,d)&&h(),X(p,a,i,n,l,u,f,d)&&h(),Y(p,a,i,n,c,f,l,d)&&h(),Y(p,a,i,n,c,f,u,d)&&h();for(var m=c;m<f;m++){var g=a.positionAt(m,l,i),y=a.positionAt(m,u,i);p.replace(p.mapping.slice(d).map(g+n),p.mapping.slice(d).map(y+n),new s["Slice"](o.rows[m-c],0,0))}h(),p.setSelection(new $(p.doc.resolve(n+a.positionAt(c,l,i)),p.doc.resolve(n+a.positionAt(f-1,u-1,i)))),e(p)}I.prototype.map=function(t){return new I(t.map(this.anchor),t.map(this.head))},I.prototype.resolve=function(t){var e=t.resolve(this.anchor),n=t.resolve(this.head);return"row"==e.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&e.index()<e.parent.childCount&&n.index()<n.parent.childCount&&A(e,n)?new $(e,n):i["Selection"].near(n,1)};var Z=Object(a["a"])({ArrowLeft:et("horiz",-1),ArrowRight:et("horiz",1),ArrowUp:et("vert",-1),ArrowDown:et("vert",1),"Shift-ArrowLeft":nt("horiz",-1),"Shift-ArrowRight":nt("horiz",1),"Shift-ArrowUp":nt("vert",-1),"Shift-ArrowDown":nt("vert",1),Backspace:rt,"Mod-Backspace":rt,Delete:rt,"Mod-Delete":rt});function tt(t,e,n){return!n.eq(t.selection)&&(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function et(t,e){return function(n,r,o){var s=n.selection;if(s instanceof $)return tt(n,r,i["Selection"].near(s.$headCell,e));if("horiz"!=t&&!s.empty)return!1;var a=at(o,t,e);if(null==a)return!1;if("horiz"==t)return tt(n,r,i["Selection"].near(n.doc.resolve(s.head+e),e));var c,l=n.doc.resolve(a),u=D(l,t,e);return c=u?i["Selection"].near(u,1):e<0?i["Selection"].near(n.doc.resolve(l.before(-1)),-1):i["Selection"].near(n.doc.resolve(l.after(-1)),1),tt(n,r,c)}}function nt(t,e){return function(n,r,o){var i=n.selection;if(!(i instanceof $)){var s=at(o,t,e);if(null==s)return!1;i=new $(n.doc.resolve(s))}var a=D(i.$headCell,t,e);return!!a&&tt(n,r,new $(i.$anchorCell,a))}}function rt(t,e){var n=t.selection;if(!(n instanceof $))return!1;if(e){var r=t.tr,o=q(t.schema).cell.createAndFill().content;n.forEachCell((function(t,e){t.content.eq(o)||r.replace(r.mapping.map(e+1),r.mapping.map(e+t.nodeSize-1),new s["Slice"](o,0,0))})),r.docChanged&&e(r)}return!0}function ot(t,e){var n=t.state.doc,r=S(n.resolve(e));return!!r&&(t.dispatch(t.state.tr.setSelection(new $(r))),!0)}function it(t,e,n){if(!k(t.state))return!1;var r=K(n),o=t.state.selection;if(o instanceof $){r||(r={width:1,height:1,rows:[s["Fragment"].from(J(q(t.state.schema).cell,n))]});var i=o.$anchorCell.node(-1),a=o.$anchorCell.start(-1),c=v.get(i).rectBetween(o.$anchorCell.pos-a,o.$headCell.pos-a);return r=U(r,c.right-c.left,c.bottom-c.top),Q(t.state,t.dispatch,a,c,r),!0}if(r){var l=C(t.state),u=l.start(-1);return Q(t.state,t.dispatch,u,v.get(l.node(-1)).findCell(l.pos-u),r),!0}return!1}function st(t,e){if(!e.ctrlKey&&!e.metaKey){var n,r=ct(t,e.target);if(e.shiftKey&&t.state.selection instanceof $)o(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&null!=(n=S(t.state.selection.$anchor))&<(t,e).pos!=n.pos)o(n,e),e.preventDefault();else if(!r)return;t.root.addEventListener("mouseup",i),t.root.addEventListener("dragstart",i),t.root.addEventListener("mousemove",s)}function o(e,n){var r=lt(t,n),o=null==w.getState(t.state);if(!r||!A(e,r)){if(!o)return;r=e}var i=new $(e,r);if(o||!t.state.selection.eq(i)){var s=t.state.tr.setSelection(i);o&&s.setMeta(w,e.pos),t.dispatch(s)}}function i(){t.root.removeEventListener("mouseup",i),t.root.removeEventListener("dragstart",i),t.root.removeEventListener("mousemove",s),null!=w.getState(t.state)&&t.dispatch(t.state.tr.setMeta(w,-1))}function s(n){var s,a=w.getState(t.state);if(null!=a)s=t.state.doc.resolve(a);else if(ct(t,n.target)!=r&&(s=lt(t,e),!s))return i();s&&o(s,n)}}function at(t,e,n){if(!(t.state.selection instanceof i["TextSelection"]))return null;for(var r=t.state.selection,o=r.$head,s=o.depth-1;s>=0;s--){var a=o.node(s),c=n<0?o.index(s):o.indexAfter(s);if(c!=(n<0?0:a.childCount))return null;if("cell"==a.type.spec.tableRole||"header_cell"==a.type.spec.tableRole){var l=o.before(s),u="vert"==e?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(u)?l:null}}return null}function ct(t,e){for(;e&&e!=t.dom;e=e.parentNode)if("TD"==e.nodeName||"TH"==e.nodeName)return e}function lt(t,e){var n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?S(t.state.doc.resolve(n.pos)):null}var ut=new i["PluginKey"]("fix-tables");function ft(t,e,n,r){var o=t.childCount,i=e.childCount;t:for(var s=0,a=0;s<i;s++){for(var c=e.child(s),l=a,u=Math.min(o,s+3);l<u;l++)if(t.child(l)==c){a=l+1,n+=c.nodeSize;continue t}r(c,n),a<o&&t.child(a).sameMarkup(c)?ft(t.child(a),c,n+1,r):c.nodesBetween(0,c.content.size,r,n+1),n+=c.nodeSize}}function pt(t,e){var n,r=function(e,r){"table"==e.type.spec.tableRole&&(n=dt(t,e,r,n))};return e?e.doc!=t.doc&&ft(e.doc,t.doc,0,r):t.doc.descendants(r),n}function dt(t,e,n,r){var o=v.get(e);if(!o.problems)return r;r||(r=t.tr);for(var i,s,a=[],c=0;c<o.height;c++)a.push(0);for(var l=0;l<o.problems.length;l++){var u=o.problems[l];if("collision"==u.type){for(var f=e.nodeAt(u.pos),p=0;p<f.attrs.rowspan;p++)a[u.row+p]+=u.n;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,P(f.attrs,f.attrs.colspan-u.n,u.n))}else if("missing"==u.type)a[u.row]+=u.n;else if("overlong_rowspan"==u.type){var d=e.nodeAt(u.pos);r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,E(d.attrs,"rowspan",d.attrs.rowspan-u.n))}else if("colwidth mismatch"==u.type){var h=e.nodeAt(u.pos);r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,E(h.attrs,"colwidth",u.colwidth))}}for(var m=0;m<a.length;m++)a[m]&&(null==i&&(i=m),s=m);for(var g=0,y=n+1;g<o.height;g++){var b=e.child(g),w=y+b.nodeSize,S=a[g];if(S>0){var x="cell";b.firstChild&&(x=b.firstChild.type.spec.tableRole);for(var k=[],C=0;C<S;C++)k.push(q(t.schema)[x].createAndFill());var O=0!=g&&i!=g-1||s!=g?w-1:y+1;r.insert(r.mapping.map(O),k)}y=w}return r.setMeta(ut,{fixTables:!0})}function ht(t){var e,n=t.selection,r=C(t),o=r.node(-1),i=r.start(-1),s=v.get(o);return e=n instanceof $?s.rectBetween(n.$anchorCell.pos-i,n.$headCell.pos-i):s.findCell(r.pos-i),e.tableStart=i,e.map=s,e.table=o,e}function vt(t,e,n){for(var r=q(e.type.schema).header_cell,o=0;o<t.height;o++)if(e.nodeAt(t.map[n+o*t.width]).type!=r)return!1;return!0}function mt(t,e,n){var r=e.map,o=e.tableStart,i=e.table,s=n>0?-1:0;vt(r,i,n+s)&&(s=0==n||n==r.width?null:0);for(var a=0;a<r.height;a++){var c=a*r.width+n;if(n>0&&n<r.width&&r.map[c-1]==r.map[c]){var l=r.map[c],u=i.nodeAt(l);t.setNodeMarkup(t.mapping.map(o+l),null,R(u.attrs,n-r.colCount(l))),a+=u.attrs.rowspan-1}else{var f=null==s?q(i.type.schema).cell:i.nodeAt(r.map[c+s]).type,p=r.positionAt(a,n,i);t.insert(t.mapping.map(o+p),f.createAndFill())}}return t}function gt(t,e){if(!k(t))return!1;if(e){var n=ht(t);e(mt(t.tr,n,n.left))}return!0}function yt(t,e){if(!k(t))return!1;if(e){var n=ht(t);e(mt(t.tr,n,n.right))}return!0}function bt(t,e,n){for(var r=e.map,o=e.table,i=e.tableStart,s=t.mapping.maps.length,a=0;a<r.height;){var c=a*r.width+n,l=r.map[c],u=o.nodeAt(l);if(n>0&&r.map[c-1]==l||n<r.width-1&&r.map[c+1]==l)t.setNodeMarkup(t.mapping.slice(s).map(i+l),null,P(u.attrs,n-r.colCount(l)));else{var f=t.mapping.slice(s).map(i+l);t.delete(f,f+u.nodeSize)}a+=u.attrs.rowspan}}function wt(t,e){if(!k(t))return!1;if(e){var n=ht(t),r=t.tr;if(0==n.left&&n.right==n.map.width)return!1;for(var o=n.right-1;;o--){if(bt(r,n,o),o==n.left)break;n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=v.get(n.table)}e(r)}return!0}function St(t,e,n){for(var r=q(e.type.schema).header_cell,o=0;o<t.width;o++)if(e.nodeAt(t.map[o+n*t.width]).type!=r)return!1;return!0}function xt(t,e,n){for(var r=e.map,o=e.tableStart,i=e.table,s=o,a=0;a<n;a++)s+=i.child(a).nodeSize;var c=[],l=n>0?-1:0;St(r,i,n+l)&&(l=0==n||n==r.height?null:0);for(var u=0,f=r.width*n;u<r.width;u++,f++)if(n>0&&n<r.height&&r.map[f]==r.map[f-r.width]){var p=r.map[f],d=i.nodeAt(p).attrs;t.setNodeMarkup(o+p,null,E(d,"rowspan",d.rowspan+1)),u+=d.colspan-1}else{var h=null==l?q(i.type.schema).cell:i.nodeAt(r.map[f+l*r.width]).type;c.push(h.createAndFill())}return t.insert(s,q(i.type.schema).row.create(null,c)),t}function kt(t,e){if(!k(t))return!1;if(e){var n=ht(t);e(xt(t.tr,n,n.top))}return!0}function Ct(t,e){if(!k(t))return!1;if(e){var n=ht(t);e(xt(t.tr,n,n.bottom))}return!0}function Ot(t,e,n){for(var r=e.map,o=e.table,i=e.tableStart,s=0,a=0;a<n;a++)s+=o.child(a).nodeSize;var c=s+o.child(n).nodeSize,l=t.mapping.maps.length;t.delete(s+i,c+i);for(var u=0,f=n*r.width;u<r.width;u++,f++){var p=r.map[f];if(n>0&&p==r.map[f-r.width]){var d=o.nodeAt(p).attrs;t.setNodeMarkup(t.mapping.slice(l).map(p+i),null,E(d,"rowspan",d.rowspan-1)),u+=d.colspan-1}else if(n<r.width&&p==r.map[f+r.width]){var h=o.nodeAt(p),v=h.type.create(E(h.attrs,"rowspan",h.attrs.rowspan-1),h.content),m=r.positionAt(n+1,u,o);t.insert(t.mapping.slice(l).map(i+m),v),u+=h.attrs.colspan-1}}}function Mt(t,e){if(!k(t))return!1;if(e){var n=ht(t),r=t.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(var o=n.bottom-1;;o--){if(Ot(r,n,o),o==n.top)break;n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=v.get(n.table)}e(r)}return!0}function Nt(t){var e=t.content;return 1==e.childCount&&e.firstChild.isTextblock&&0==e.firstChild.childCount}function At(t,e){for(var n=t.width,r=t.height,o=t.map,i=e.top*n+e.left,s=i,a=(e.bottom-1)*n+e.left,c=i+(e.right-e.left-1),l=e.top;l<e.bottom;l++){if(e.left>0&&o[s]==o[s-1]||e.right<n&&o[c]==o[c+1])return!0;s+=n,c+=n}for(var u=e.left;u<e.right;u++){if(e.top>0&&o[i]==o[i-n]||e.bottom<r&&o[a]==o[a+n])return!0;i++,a++}return!1}function _t(t,e){var n=t.selection;if(!(n instanceof $)||n.$anchorCell.pos==n.$headCell.pos)return!1;var r=ht(t),o=r.map;if(At(o,r))return!1;if(e){for(var i,a,c=t.tr,l={},u=s["Fragment"].empty,f=r.top;f<r.bottom;f++)for(var p=r.left;p<r.right;p++){var d=o.map[f*o.width+p],h=r.table.nodeAt(d);if(!l[d])if(l[d]=!0,null==i)i=d,a=h;else{Nt(h)||(u=u.append(h.content));var v=c.mapping.map(d+r.tableStart);c.delete(v,v+h.nodeSize)}}if(c.setNodeMarkup(i+r.tableStart,null,E(R(a.attrs,a.attrs.colspan,r.right-r.left-a.attrs.colspan),"rowspan",r.bottom-r.top)),u.size){var m=i+1+a.content.size,g=Nt(a)?i+1:m;c.replaceWith(g+r.tableStart,m+r.tableStart,u)}c.setSelection(new $(c.doc.resolve(i+r.tableStart))),e(c)}return!0}function Tt(t,e){var n=q(t.schema);return Dt((function(t){var e=t.node;return n[e.type.spec.tableRole]}))(t,e)}function Dt(t){return function(e,n){var r,o,i=e.selection;if(i instanceof $){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;r=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{if(r=x(i.$from),!r)return!1;o=S(i.$from).pos}if(1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(n){var s=r.attrs,a=[],c=s.colwidth;s.rowspan>1&&(s=E(s,"rowspan",1)),s.colspan>1&&(s=E(s,"colspan",1));for(var l,u=ht(e),f=e.tr,p=0;p<u.right-u.left;p++)a.push(c?E(s,"colwidth",c&&c[p]?[c[p]]:null):s);for(var d=u.top;d<u.bottom;d++){var h=u.map.positionAt(d,u.left,u.table);d==u.top&&(h+=r.nodeSize);for(var v=u.left,m=0;v<u.right;v++,m++)v==u.left&&d==u.top||f.insert(l=f.mapping.map(h+u.tableStart,1),t({node:r,row:d,col:v}).createAndFill(a[m]))}f.setNodeMarkup(o,t({node:r,row:u.top,col:u.left}),a[0]),i instanceof $&&f.setSelection(new $(f.doc.resolve(i.$anchorCell.pos),l&&f.doc.resolve(l))),n(f)}return!0}}function Et(t,e){return function(n,r){if(!k(n))return!1;var o=C(n);if(o.nodeAfter.attrs[t]===e)return!1;if(r){var i=n.tr;n.selection instanceof $?n.selection.forEachCell((function(n,r){n.attrs[t]!==e&&i.setNodeMarkup(r,null,E(n.attrs,t,e))})):i.setNodeMarkup(o.pos,null,E(o.nodeAfter.attrs,t,e)),r(i)}return!0}}function Pt(t){return function(e,n){if(!k(e))return!1;if(n){for(var r=q(e.schema),o=ht(e),i=e.tr,s=o.map.cellsInRect("column"==t?new h(o.left,0,o.right,o.map.height):"row"==t?new h(0,o.top,o.map.width,o.bottom):o),a=s.map((function(t){return o.table.nodeAt(t)})),c=0;c<s.length;c++)a[c].type==r.header_cell&&i.setNodeMarkup(o.tableStart+s[c],r.cell,a[c].attrs);if(0==i.steps.length)for(var l=0;l<s.length;l++)i.setNodeMarkup(o.tableStart+s[l],r.header_cell,a[l].attrs);n(i)}return!0}}function Rt(t,e,n){for(var r=e.map.cellsInRect({left:0,top:0,right:"row"==t?e.map.width:1,bottom:"column"==t?e.map.height:1}),o=0;o<r.length;o++){var i=e.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function $t(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?Pt(t):function(e,n){if(!k(e))return!1;if(n){var r=q(e.schema),o=ht(e),i=e.tr,s=Rt("row",o,r),a=Rt("column",o,r),c="column"===t?s:"row"===t&&a,l=c?1:0,u="column"==t?new h(0,l,1,o.map.height):"row"==t?new h(l,0,o.map.width,1):o,f="column"==t?a?r.cell:r.header_cell:"row"==t?s?r.cell:r.header_cell:r.cell;o.map.cellsInRect(u).forEach((function(t){var e=t+o.tableStart,n=i.doc.nodeAt(e);n&&i.setNodeMarkup(e,f,n.attrs)})),n(i)}return!0}}var It=$t("row",{useDeprecatedLogic:!0}),jt=$t("column",{useDeprecatedLogic:!0}),zt=$t("cell",{useDeprecatedLogic:!0});function Ft(t,e){if(e<0){var n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(var r=t.index(-1)-1,o=t.before();r>=0;r--){var i=t.node(-1).child(r);if(i.childCount)return o-1-i.lastChild.nodeSize;o-=i.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;for(var s=t.node(-1),a=t.indexAfter(-1),c=t.after();a<s.childCount;a++){var l=s.child(a);if(l.childCount)return c+1;c+=l.nodeSize}}}function Vt(t){return function(e,n){if(!k(e))return!1;var r=Ft(C(e),t);if(null!=r){if(n){var o=e.doc.resolve(r);n(e.tr.setSelection(i["TextSelection"].between(o,N(o))).scrollIntoView())}return!0}}}function Bt(t,e){for(var n=t.selection.$anchor,r=n.depth;r>0;r--){var o=n.node(r);if("table"==o.type.spec.tableRole)return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0}return!1}var Lt=function(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Wt(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))};function Wt(t,e,n,r,o,i){for(var s=0,a=!0,c=e.firstChild,l=t.firstChild,u=0,f=0;u<l.childCount;u++)for(var p=l.child(u).attrs,d=p.colspan,h=p.colwidth,v=0;v<d;v++,f++){var m=o==f?i:h&&h[v],g=m?m+"px":"";s+=m||r,m||(a=!1),c?(c.style.width!=g&&(c.style.width=g),c=c.nextSibling):e.appendChild(document.createElement("col")).style.width=g}while(c){var y=c.nextSibling;c.parentNode.removeChild(c),c=y}a?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}Lt.prototype.update=function(t){return t.type==this.node.type&&(this.node=t,Wt(t,this.colgroup,this.table,this.cellMinWidth),!0)},Lt.prototype.ignoreMutation=function(t){return"attributes"==t.type&&(t.target==this.table||this.colgroup.contains(t.target))};var qt=new i["PluginKey"]("tableColumnResizing");function Kt(t){void 0===t&&(t={});var e=t.handleWidth;void 0===e&&(e=5);var n=t.cellMinWidth;void 0===n&&(n=25);var r=t.View;void 0===r&&(r=Lt);var o=t.lastColumnResizable;void 0===o&&(o=!0);var s=new i["Plugin"]({key:qt,state:{init:function(t,e){return this.spec.props.nodeViews[q(e.schema).table.name]=function(t,e){return new r(t,n,e)},new Ht(-1,!1)},apply:function(t,e){return e.apply(t)}},props:{attributes:function(t){var e=qt.getState(t);return e.activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(t,r){Jt(t,r,e,n,o)},mouseleave:function(t){Ut(t)},mousedown:function(t,e){Gt(t,e,n)}},decorations:function(t){var e=qt.getState(t);if(e.activeHandle>-1)return oe(t,e.activeHandle)},nodeViews:{}}});return s}var Ht=function(t,e){this.activeHandle=t,this.dragging=e};function Jt(t,e,n,r,o){var i=qt.getState(t.state);if(!i.dragging){var s=Yt(e.target),a=-1;if(s){var c=s.getBoundingClientRect(),l=c.left,u=c.right;e.clientX-l<=n?a=Qt(t,e,"left"):u-e.clientX<=n&&(a=Qt(t,e,"right"))}if(a!=i.activeHandle){if(!o&&-1!==a){var f=t.state.doc.resolve(a),p=f.node(-1),d=v.get(p),h=f.start(-1),m=d.colCount(f.pos-h)+f.nodeAfter.attrs.colspan-1;if(m==d.width-1)return}te(t,a)}}}function Ut(t){var e=qt.getState(t.state);e.activeHandle>-1&&!e.dragging&&te(t,-1)}function Gt(t,e,n){var r=qt.getState(t.state);if(-1==r.activeHandle||r.dragging)return!1;var o=t.state.doc.nodeAt(r.activeHandle),i=Xt(t,r.activeHandle,o.attrs);function s(e){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",a);var r=qt.getState(t.state);r.dragging&&(ee(t,r.activeHandle,Zt(r.dragging,e,n)),t.dispatch(t.state.tr.setMeta(qt,{setDragging:null})))}function a(e){if(!e.which)return s(e);var r=qt.getState(t.state),o=Zt(r.dragging,e,n);ne(t,r.activeHandle,o,n)}return t.dispatch(t.state.tr.setMeta(qt,{setDragging:{startX:e.clientX,startWidth:i}})),window.addEventListener("mouseup",s),window.addEventListener("mousemove",a),e.preventDefault(),!0}function Xt(t,e,n){var r=n.colspan,o=n.colwidth,i=o&&o[o.length-1];if(i)return i;var s=t.domAtPos(e),a=s.node.childNodes[s.offset],c=a.offsetWidth,l=r;if(o)for(var u=0;u<r;u++)o[u]&&(c-=o[u],l--);return c/l}function Yt(t){while(t&&"TD"!=t.nodeName&&"TH"!=t.nodeName)t=t.classList.contains("ProseMirror")?null:t.parentNode;return t}function Qt(t,e,n){var r=t.posAtCoords({left:e.clientX,top:e.clientY}),o=r.pos,i=S(t.state.doc.resolve(o));if(!i)return-1;if("right"==n)return i.pos;var s=v.get(i.node(-1)),a=i.start(-1),c=s.map.indexOf(i.pos-a);return c%s.width==0?-1:a+s.map[c-1]}function Zt(t,e,n){var r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function te(t,e){t.dispatch(t.state.tr.setMeta(qt,{setHandle:e}))}function ee(t,e,n){for(var r=t.state.doc.resolve(e),o=r.node(-1),i=v.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,c=t.state.tr,l=0;l<i.height;l++){var u=l*i.width+a;if(!l||i.map[u]!=i.map[u-i.width]){var f=i.map[u],p=o.nodeAt(f),d=p.attrs,h=1==d.colspan?0:a-i.colCount(f);if(!d.colwidth||d.colwidth[h]!=n){var m=d.colwidth?d.colwidth.slice():re(d.colspan);m[h]=n,c.setNodeMarkup(s+f,null,E(d,"colwidth",m))}}}c.docChanged&&t.dispatch(c)}function ne(t,e,n,r){var o=t.state.doc.resolve(e),i=o.node(-1),s=o.start(-1),a=v.get(i).colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1,c=t.domAtPos(o.start(-1)).node;while("TABLE"!=c.nodeName)c=c.parentNode;Wt(i,c.firstChild,c,r,a,n)}function re(t){for(var e=[],n=0;n<t;n++)e.push(0);return e}function oe(t,e){for(var n=[],r=t.doc.resolve(e),o=r.node(-1),i=v.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan,l=0;l<i.height;l++){var u=a+l*i.width-1;if((a==i.width||i.map[u]!=i.map[u+1])&&(0==l||i.map[u-1]!=i.map[u-1-i.width])){var f=i.map[u],p=s+f+o.nodeAt(f).nodeSize-1,d=document.createElement("div");d.className="column-resize-handle",n.push(c["a"].widget(p,d))}}return c["b"].create(t.doc,n)}function ie(t){void 0===t&&(t={});var e=t.allowTableNodeSelection;return void 0===e&&(e=!1),new i["Plugin"]({key:w,state:{init:function(){return null},apply:function(t,e){var n=t.getMeta(w);if(null!=n)return-1==n?null:n;if(null==e||!t.docChanged)return e;var r=t.mapping.mapResult(e),o=r.deleted,i=r.pos;return o?null:i}},props:{decorations:j,handleDOMEvents:{mousedown:st},createSelectionBetween:function(t){if(null!=w.getState(t.state))return t.state.selection},handleTripleClick:ot,handleKeyDown:Z,handlePaste:it},appendTransaction:function(t,n,r){return V(r,pt(r,n),e)}})}Ht.prototype.apply=function(t){var e=this,n=t.getMeta(qt);if(n&&null!=n.setHandle)return new Ht(n.setHandle,null);if(n&&void 0!==n.setDragging)return new Ht(e.activeHandle,n.setDragging);if(e.activeHandle>-1&&t.docChanged){var r=t.mapping.map(e.activeHandle,-1);M(t.doc.resolve(r))||(r=null),e=new Ht(r,e.dragging)}return e}},5692:function(t,e,n){var r=n("c430"),o=n("c6cd");(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.5.0",mode:r?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,n){var r=n("d066"),o=n("241c"),i=n("7418"),s=n("825a");t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(s(t)),n=i.f;return n?e.concat(n(t)):e}},"576a":function(t,e,n){"use strict";n.d(e,"a",(function(){return hn})),n.d(e,"b",(function(){return yn}));var r=n("5313"),o=n("304a"),i=n("0ac0"),s={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var a=/Edge\/(\d+)/.exec(navigator.userAgent),c=/MSIE \d/.test(navigator.userAgent),l=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);s.mac=/Mac/.test(navigator.platform);var u=s.ie=!!(c||l||a);s.ie_version=c?document.documentMode||6:l?+l[1]:a?+a[1]:null,s.gecko=!u&&/gecko\/(\d+)/i.test(navigator.userAgent),s.gecko_version=s.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var f=!u&&/Chrome\/(\d+)/.exec(navigator.userAgent);s.chrome=!!f,s.chrome_version=f&&+f[1],s.ios=!u&&/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),s.android=/Android \d/.test(navigator.userAgent),s.webkit=!u&&"WebkitAppearance"in document.documentElement.style,s.safari=/Apple Computer/.test(navigator.vendor),s.webkit_version=s.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var p=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},d=function(t){var e=t.parentNode;return e&&11==e.nodeType?e.host:e},h=function(t,e,n){var r=document.createRange();return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},v=function(t,e,n,r){return n&&(g(t,e,n,r,-1)||g(t,e,n,r,1))},m=/^(img|br|input|textarea|hr)$/i;function g(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:y(t))){var i=t.parentNode;if(1!=i.nodeType||b(t)||m.test(t.nodeName)||"false"==t.contentEditable)return!1;e=p(t)+(o<0?0:1),t=i}else{if(1!=t.nodeType)return!1;t=t.childNodes[e+(o<0?-1:0)],e=o<0?y(t):0}}}function y(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function b(t){for(var e,n=t;n;n=n.parentNode)if(e=n.pmViewDesc)break;return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}var w=function(t){var e=t.isCollapsed;return e&&s.chrome&&t.rangeCount&&!t.getRangeAt(0).collapsed&&(e=!1),e};function S(t,e){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function x(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function k(t,e){return"number"==typeof t?t:t[e]}function C(t,e,n){for(var r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument,s=i.defaultView,a=n||t.dom;;a=d(a)){if(!a)break;if(1==a.nodeType){var c=a==i.body||1!=a.nodeType,l=c?x(s):a.getBoundingClientRect(),u=0,f=0;if(e.top<l.top+k(r,"top")?f=-(l.top-e.top+k(o,"top")):e.bottom>l.bottom-k(r,"bottom")&&(f=e.bottom-l.bottom+k(o,"bottom")),e.left<l.left+k(r,"left")?u=-(l.left-e.left+k(o,"left")):e.right>l.right-k(r,"right")&&(u=e.right-l.right+k(o,"right")),(u||f)&&(c?s.scrollBy(u,f):(f&&(a.scrollTop+=f),u&&(a.scrollLeft+=u))),c)break}}}function O(t){for(var e,n,r=t.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,s=o+1;s<Math.min(innerHeight,r.bottom);s+=5){var a=t.root.elementFromPoint(i,s);if(a!=t.dom&&t.dom.contains(a)){var c=a.getBoundingClientRect();if(c.top>=o-20){e=a,n=c.top;break}}}return{refDOM:e,refTop:n,stack:M(t.dom)}}function M(t){for(var e=[],n=t.ownerDocument;t;t=d(t))if(e.push({dom:t,top:t.scrollTop,left:t.scrollLeft}),t==n)break;return e}function N(t){var e=t.refDOM,n=t.refTop,r=t.stack,o=e?e.getBoundingClientRect().top:0;A(r,0==o?0:o-n)}function A(t,e){for(var n=0;n<t.length;n++){var r=t[n],o=r.dom,i=r.top,s=r.left;o.scrollTop!=i+e&&(o.scrollTop=i+e),o.scrollLeft!=s&&(o.scrollLeft=s)}}var _=null;function T(t){if(t.setActive)return t.setActive();if(_)return t.focus(_);var e=M(t);t.focus(null==_?{get preventScroll(){return _={preventScroll:!0},!0}}:void 0),_||(_=!1,A(e,0))}function D(t,e){for(var n,r,o=2e8,i=0,s=e.top,a=e.top,c=t.firstChild,l=0;c;c=c.nextSibling,l++){var u=void 0;if(1==c.nodeType)u=c.getClientRects();else{if(3!=c.nodeType)continue;u=h(c).getClientRects()}for(var f=0;f<u.length;f++){var p=u[f];if(p.top<=s&&p.bottom>=a){s=Math.max(p.bottom,s),a=Math.min(p.top,a);var d=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(d<o){n=c,o=d,r=d&&3==n.nodeType?{left:p.right<e.left?p.right:p.left,top:e.top}:e,1==c.nodeType&&d&&(i=l+(e.left>=(p.left+p.right)/2?1:0));continue}}!n&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(i=l+1)}}return n&&3==n.nodeType?E(n,r):!n||o&&1==n.nodeType?{node:t,offset:i}:D(n,r)}function E(t,e){for(var n=t.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(t,o+1),r.setStart(t,o);var i=F(r,1);if(i.top!=i.bottom&&P(e,i))return{node:t,offset:o+(e.left>=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function P(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function R(t,e){var n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function $(t,e,n){var r=D(e,n),o=r.node,i=r.offset,s=-1;if(1==o.nodeType&&!o.firstChild){var a=o.getBoundingClientRect();s=a.left!=a.right&&n.left>(a.left+a.right)/2?1:-1}return t.docView.posFromDOM(o,i,s)}function I(t,e,n,r){for(var o=-1,i=e;;){if(i==t.dom)break;var s=t.docView.nearestDesc(i,!0);if(!s)return null;if(s.node.isBlock&&s.parent){var a=s.dom.getBoundingClientRect();if(a.left>r.left||a.top>r.top)o=s.posBefore;else{if(!(a.right<r.left||a.bottom<r.top))break;o=s.posAfter}}i=s.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n)}function j(t,e,n){var r=t.childNodes.length;if(r&&n.top<n.bottom)for(var o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=o;;){var s=t.childNodes[i];if(1==s.nodeType)for(var a=s.getClientRects(),c=0;c<a.length;c++){var l=a[c];if(P(e,l))return j(s,e,l)}if((i=(i+1)%r)==o)break}return t}function z(t,e){var n,r,o,i,a=t.root;if(a.caretPositionFromPoint)try{var c=a.caretPositionFromPoint(e.left,e.top);c&&(n=c,o=n.offsetNode,i=n.offset)}catch(m){}if(!o&&a.caretRangeFromPoint){var l=a.caretRangeFromPoint(e.left,e.top);l&&(r=l,o=r.startContainer,i=r.startOffset)}var u,f=a.elementFromPoint(e.left,e.top+1);if(!f||!t.dom.contains(1!=f.nodeType?f.parentNode:f)){var p=t.dom.getBoundingClientRect();if(!P(e,p))return null;if(f=j(t.dom,e,p),!f)return null}if(f=R(f,e),o){if(s.gecko&&1==o.nodeType&&(i=Math.min(i,o.childNodes.length),i<o.childNodes.length)){var d,h=o.childNodes[i];"IMG"==h.nodeName&&(d=h.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&i++}o==t.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&e.top>o.lastChild.getBoundingClientRect().bottom?u=t.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(u=I(t,o,i,e))}null==u&&(u=$(t,f,e));var v=t.docView.nearestDesc(f,!0);return{pos:u,inside:v?v.posAtStart-v.border:-1}}function F(t,e){var n=t.getClientRects();return n.length?n[e<0?0:n.length-1]:t.getBoundingClientRect()}function V(t,e){var n=t.docView.domFromPos(e),r=n.node,o=n.offset;if(3==r.nodeType&&(s.chrome||s.gecko)){var i=F(h(r,o,o),0);if(s.gecko&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){var a=F(h(r,o-1,o-1),-1);if(Math.abs(a.left-i.left)<1&&a.top==i.top){var c=F(h(r,o,o+1),-1);return B(c,c.left<a.left)}}return i}if(1==r.nodeType&&!t.state.doc.resolve(e).parent.inlineContent){var l,u=!0;if(o<r.childNodes.length){var f=r.childNodes[o];1==f.nodeType&&(l=f.getBoundingClientRect())}if(!l&&o){var p=r.childNodes[o-1];1==p.nodeType&&(l=p.getBoundingClientRect(),u=!1)}return L(l||r.getBoundingClientRect(),u)}for(var d=-1;d<2;d+=2)if(d<0&&o){var v=void 0,m=3==r.nodeType?h(r,o-1,o):3==(v=r.childNodes[o-1]).nodeType?h(v):1==v.nodeType&&"BR"!=v.nodeName?v:null;if(m){var g=F(m,1);if(g.top<g.bottom)return B(g,!1)}}else if(d>0&&o<y(r)){var b=void 0,w=3==r.nodeType?h(r,o,o+1):3==(b=r.childNodes[o]).nodeType?h(b):1==b.nodeType?b:null;if(w){var S=F(w,-1);if(S.top<S.bottom)return B(S,!0)}}return B(F(3==r.nodeType?h(r):r,0),!1)}function B(t,e){if(0==t.width)return t;var n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function L(t,e){if(0==t.height)return t;var n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function W(t,e,n){var r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o.focus()}}function q(t,e,n){var r=e.selection,o="up"==n?r.$anchor.min(r.$head):r.$anchor.max(r.$head);return W(t,e,(function(){for(var e=t.docView.domFromPos(o.pos),r=e.node;;){var i=t.docView.nearestDesc(r,!0);if(!i)break;if(i.node.isBlock){r=i.dom;break}r=i.dom.parentNode}for(var s=V(t,o.pos),a=r.firstChild;a;a=a.nextSibling){var c=void 0;if(1==a.nodeType)c=a.getClientRects();else{if(3!=a.nodeType)continue;c=h(a,0,a.nodeValue.length).getClientRects()}for(var l=0;l<c.length;l++){var u=c[l];if(u.bottom>u.top&&("up"==n?u.bottom<s.top+1:u.top>s.bottom-1))return!1}}return!0}))}var K=/[\u0590-\u08ac]/;function H(t,e,n){var r=e.selection,o=r.$head;if(!o.parent.isTextblock)return!1;var i=o.parentOffset,s=!i,a=i==o.parent.content.size,c=getSelection();return K.test(o.parent.textContent)&&c.modify?W(t,e,(function(){var e=c.getRangeAt(0),r=c.focusNode,i=c.focusOffset,s=c.caretBidiLevel;c.modify("move",n,"character");var a=o.depth?t.docView.domAfterPos(o.before()):t.dom,l=!a.contains(1==c.focusNode.nodeType?c.focusNode:c.focusNode.parentNode)||r==c.focusNode&&i==c.focusOffset;return c.removeAllRanges(),c.addRange(e),null!=s&&(c.caretBidiLevel=s),l})):"left"==n||"backward"==n?s:a}var J=null,U=null,G=!1;function X(t,e,n){return J==e&&U==n?G:(J=e,U=n,G="up"==n||"down"==n?q(t,e,n):H(t,e,n))}var Y=0,Q=1,Z=2,tt=3,et=function(t,e,n,r){this.parent=t,this.children=e,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=Y},nt={beforePosition:{configurable:!0},size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0}};et.prototype.matchesWidget=function(){return!1},et.prototype.matchesMark=function(){return!1},et.prototype.matchesNode=function(){return!1},et.prototype.matchesHack=function(){return!1},nt.beforePosition.get=function(){return!1},et.prototype.parseRule=function(){return null},et.prototype.stopEvent=function(){return!1},nt.size.get=function(){for(var t=0,e=0;e<this.children.length;e++)t+=this.children[e].size;return t},nt.border.get=function(){return 0},et.prototype.destroy=function(){this.parent=null,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=null);for(var t=0;t<this.children.length;t++)this.children[t].destroy()},et.prototype.posBeforeChild=function(t){for(var e=0,n=this.posAtStart;e<this.children.length;e++){var r=this.children[e];if(r==t)return n;n+=r.size}},nt.posBefore.get=function(){return this.parent.posBeforeChild(this)},nt.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},nt.posAfter.get=function(){return this.posBefore+this.size},nt.posAtEnd.get=function(){return this.posAtStart+this.size-2*this.border},et.prototype.localPosFromDOM=function(t,e,n){if(this.contentDOM&&this.contentDOM.contains(1==t.nodeType?t:t.parentNode)){if(n<0){var r,o;if(t==this.contentDOM)r=t.childNodes[e-1];else{while(t.parentNode!=this.contentDOM)t=t.parentNode;r=t.previousSibling}while(r&&(!(o=r.pmViewDesc)||o.parent!=this))r=r.previousSibling;return r?this.posBeforeChild(o)+o.size:this.posAtStart}var i,s;if(t==this.contentDOM)i=t.childNodes[e];else{while(t.parentNode!=this.contentDOM)t=t.parentNode;i=t.nextSibling}while(i&&(!(s=i.pmViewDesc)||s.parent!=this))i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}var a;if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))a=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(var c=t;;c=c.parentNode){if(c==this.dom){a=!1;break}if(c.parentNode.firstChild!=c)break}if(null==a&&e==t.childNodes.length)for(var l=t;;l=l.parentNode){if(l==this.dom){a=!0;break}if(l.parentNode.lastChild!=l)break}}return(null==a?n>0:a)?this.posAtEnd:this.posAtStart},et.prototype.nearestDesc=function(t,e){for(var n=!0,r=t;r;r=r.parentNode){var o=this.getDesc(r);if(o&&(!e||o.node)){if(!n||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(t):o.nodeDOM==t))return o;n=!1}}},et.prototype.getDesc=function(t){for(var e=t.pmViewDesc,n=e;n;n=n.parent)if(n==this)return e},et.prototype.posFromDOM=function(t,e,n){for(var r=t;;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(t,e,n)}},et.prototype.descAt=function(t){for(var e=0,n=0;e<this.children.length;e++){var r=this.children[e],o=n+r.size;if(n==t&&o!=n){while(!r.border&&r.children.length)r=r.children[0];return r}if(t<o)return r.descAt(t-n-r.border);n=o}},et.prototype.domFromPos=function(t){if(!this.contentDOM)return{node:this.dom,offset:0};for(var e=0,n=0;;n++){if(e==t){while(n<this.children.length&&(this.children[n].beforePosition||this.children[n].dom.parentNode!=this.contentDOM))n++;return{node:this.contentDOM,offset:n==this.children.length?this.contentDOM.childNodes.length:p(this.children[n].dom)}}if(n==this.children.length)throw new Error("Invalid position "+t);var r=this.children[n],o=e+r.size;if(t<o)return r.domFromPos(t-e-r.border);e=o}},et.prototype.parseRange=function(t,e,n){if(void 0===n&&(n=0),0==this.children.length)return{node:this.contentDOM,from:t,to:e,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,s=0;;s++){var a=this.children[s],c=i+a.size;if(-1==r&&t<=c){var l=i+a.border;if(t>=l&&e<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(t,e,l);t=i;for(var u=s;u>0;u--){var f=this.children[u-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=p(f.dom)+1;break}t-=f.size}-1==r&&(r=0)}if(r>-1&&e<=c){e=c;for(var d=s+1;d<this.children.length;d++){var h=this.children[d];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){o=p(h.dom);break}e+=h.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=c}return{node:this.contentDOM,from:t,to:e,fromOffset:r,toOffset:o}},et.prototype.emptyChildAt=function(t){if(this.border||!this.contentDOM||!this.children.length)return!1;var e=this.children[t<0?0:this.children.length-1];return 0==e.size||e.emptyChildAt(t)},et.prototype.domAfterPos=function(t){var e=this.domFromPos(t),n=e.node,r=e.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]},et.prototype.setSelection=function(t,e,n,r){for(var o=Math.min(t,e),i=Math.max(t,e),s=0,a=0;s<this.children.length;s++){var c=this.children[s],l=a+c.size;if(o>a&&i<l)return c.setSelection(t-a-c.border,e-a-c.border,n,r);a=l}var u=this.domFromPos(t),f=this.domFromPos(e),p=n.getSelection(),d=document.createRange();if(r||!v(u.node,u.offset,p.anchorNode,p.anchorOffset)||!v(f.node,f.offset,p.focusNode,p.focusOffset)){if(p.extend)d.setEnd(u.node,u.offset),d.collapse(!1);else{if(t>e){var h=u;u=f,f=h}d.setEnd(f.node,f.offset),d.setStart(u.node,u.offset)}p.removeAllRanges(),p.addRange(d),p.extend&&p.extend(f.node,f.offset)}},et.prototype.ignoreMutation=function(t){return!this.contentDOM},nt.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},et.prototype.markDirty=function(t,e){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?t<=i&&e>=n:t<i&&e>n){var s=n+o.border,a=i-o.border;if(t>=s&&e<=a)return this.dirty=t==n||e==i?Z:Q,void(t!=s||e!=a||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-s,e-s):o.dirty=tt);o.dirty=tt}n=i}this.dirty=Z},et.prototype.markParentsDirty=function(){for(var t=this.parent;t;t=t.parent){var e=Z;t.dirty<e&&(t.dirty=e)}},Object.defineProperties(et.prototype,nt);var rt=[],ot=function(t){function e(e,n,r,o){var i,s=n.type.toDOM;if("function"==typeof s&&(s=s(r,(function(){return i?i.parent?i.parent.posBeforeChild(i):void 0:o}))),!n.type.spec.raw){if(1!=s.nodeType){var a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable=!1,s.classList.add("ProseMirror-widget")}t.call(this,e,rt,s,null),this.widget=n,i=this}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={beforePosition:{configurable:!0}};return n.beforePosition.get=function(){return this.widget.type.side<0},e.prototype.matchesWidget=function(t){return this.dirty==Y&&t.type.eq(this.widget.type)},e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.stopEvent=function(t){var e=this.widget.spec.stopEvent;return!!e&&e(t)},Object.defineProperties(e.prototype,n),e}(et),it=function(t){function e(e,n,r,o){t.call(this,e,rt,n,null),this.textDOM=r,this.text=o}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={size:{configurable:!0}};return n.size.get=function(){return this.text.length},e.prototype.localPosFromDOM=function(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e},e.prototype.domFromPos=function(t){return{node:this.textDOM,offset:t}},e.prototype.ignoreMutation=function(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue},Object.defineProperties(e.prototype,n),e}(et),st=function(t){function e(e,n,r,o){t.call(this,e,[],r,o),this.mark=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.create=function(t,n,r,i){var s=i.nodeViews[n.type.name],a=s&&s(n,i,r);return a&&a.dom||(a=o["DOMSerializer"].renderSpec(document,n.type.spec.toDOM(n,r))),new e(t,n,a.dom,a.contentDOM||a.dom)},e.prototype.parseRule=function(){return{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}},e.prototype.matchesMark=function(t){return this.dirty!=tt&&this.mark.eq(t)},e.prototype.markDirty=function(e,n){if(t.prototype.markDirty.call(this,e,n),this.dirty!=Y){var r=this.parent;while(!r.node)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Y}},e.prototype.slice=function(t,n,r){var o=e.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=At(i,n,s,r)),t>0&&(i=At(i,0,t,r));for(var a=0;a<i.length;a++)i[a].parent=o;return o.children=i,o},e}(et),at=function(t){function e(e,n,r,o,i,s,a,c,l){t.call(this,e,n.isLeaf?rt:[],i,s),this.nodeDOM=a,this.node=n,this.outerDeco=r,this.innerDeco=o,s&&this.updateChildren(c,l)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={size:{configurable:!0},border:{configurable:!0}};return e.create=function(t,n,r,i,s,a){var c,l,u=s.nodeViews[n.type.name],f=u&&u(n,s,(function(){return l?l.parent?l.parent.posBeforeChild(l):void 0:a}),r),p=f&&f.dom,d=f&&f.contentDOM;if(n.isText)if(p){if(3!=p.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else p=document.createTextNode(n.text);else p||(c=o["DOMSerializer"].renderSpec(document,n.type.spec.toDOM(n)),p=c.dom,d=c.contentDOM);d||n.isText||"BR"==p.nodeName||(p.hasAttribute("contenteditable")||(p.contentEditable=!1),n.type.spec.draggable&&(p.draggable=!0));var h=p;return p=yt(p,r,n),f?l=new ft(t,n,r,i,p,d,h,f,s,a+1):n.isText?new lt(t,n,r,i,p,h,s):new e(t,n,r,i,p,d,h,s,a+1)},e.prototype.parseRule=function(){var t=this;if(this.node.type.spec.reparseInView)return null;var e={node:this.node.type.name,attrs:this.node.attrs};return this.node.type.spec.code&&(e.preserveWhitespace="full"),this.contentDOM&&!this.contentLost?e.contentElement=this.contentDOM:e.getContent=function(){return t.contentDOM?o["Fragment"].empty:t.node.content},e},e.prototype.matchesNode=function(t,e,n){return this.dirty==Y&&t.eq(this.node)&&bt(e,this.outerDeco)&&n.eq(this.innerDeco)},n.size.get=function(){return this.node.nodeSize},n.border.get=function(){return this.node.isLeaf?0:1},e.prototype.updateChildren=function(t,e){var n=this,r=this.node.inlineContent,i=e,s=r&&t.composing&&this.localCompositionNode(t,e),a=new St(this,s&&s.node);Ct(this.node,this.innerDeco,(function(e,s){e.spec.marks?a.syncToMarks(e.spec.marks,r,t):e.type.side>=0&&a.syncToMarks(s==n.node.childCount?o["Mark"].none:n.node.child(s).marks,r,t),a.placeWidget(e,t,i)}),(function(e,n,o,s){a.syncToMarks(e.marks,r,t),a.findNodeMatch(e,n,o,s)||a.updateNextNode(e,n,o,t,s)||a.addNode(e,n,o,t,i),i+=e.nodeSize})),a.syncToMarks(rt,r,t),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==Z)&&(s&&this.protectLocalComposition(t,s),this.renderChildren())},e.prototype.renderChildren=function(){pt(this.contentDOM,this.children),s.ios&&Ot(this.dom)},e.prototype.localCompositionNode=function(t,e){var n=t.state.selection,o=n.from,i=n.to;if(!(!(t.state.selection instanceof r["TextSelection"])||o<e||i>e+this.node.content.size)){var s=t.root.getSelection(),a=Mt(s.focusNode,s.focusOffset);if(a&&this.dom.contains(a.parentNode)){var c=a.nodeValue,l=Nt(this.node.content,c,o-e,i-e);return l<0?null:{node:a,pos:l,text:c}}}},e.prototype.protectLocalComposition=function(t,e){var n=e.node,r=e.pos,o=e.text;if(!this.getDesc(n)){for(var i=n;;i=i.parentNode){if(i.parentNode==this.contentDOM)break;while(i.previousSibling)i.parentNode.removeChild(i.previousSibling);while(i.nextSibling)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=null)}var s=new it(this,i,n,o);t.compositionNodes.push(s),this.children=At(this.children,r,r+o.length,t,s)}},e.prototype.update=function(t,e,n,r){return!(this.dirty==tt||!t.sameMarkup(this.node))&&(this.updateInner(t,e,n,r),!0)},e.prototype.updateInner=function(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=Y},e.prototype.updateOuterDeco=function(t){if(!bt(t,this.outerDeco)){var e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=mt(this.dom,this.nodeDOM,vt(this.outerDeco,this.node,e),vt(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=t}},e.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},e.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!1)},Object.defineProperties(e.prototype,n),e}(et);function ct(t,e,n,r,o){return yt(r,e,t),new at(null,t,e,n,r,r,r,o,0)}var lt=function(t){function e(e,n,r,o,i,s,a){t.call(this,e,n,r,o,i,null,s,a)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parseRule=function(){return{skip:this.nodeDOM.parentNode||!0}},e.prototype.update=function(t,e){return!(this.dirty==tt||this.dirty!=Y&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),this.dirty==Y&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text),this.node=t,this.dirty=Y,!0)},e.prototype.inParent=function(){for(var t=this.parent.contentDOM,e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1},e.prototype.domFromPos=function(t){return{node:this.nodeDOM,offset:t}},e.prototype.localPosFromDOM=function(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):t.prototype.localPosFromDOM.call(this,e,n,r)},e.prototype.ignoreMutation=function(t){return"characterData"!=t.type&&"selection"!=t.type},e.prototype.slice=function(t,n,r){var o=this.node.cut(t,n),i=document.createTextNode(o.text);return new e(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)},e}(at),ut=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.matchesHack=function(){return this.dirty==Y},e}(et),ft=function(t){function e(e,n,r,o,i,s,a,c,l,u){t.call(this,e,n,r,o,i,s,a,l,u),this.spec=c}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(e,n,r,o){if(this.dirty==tt)return!1;if(this.spec.update){var i=this.spec.update(e,n);return i&&this.updateInner(e,n,r,o),i}return!(!this.contentDOM&&!e.isLeaf)&&t.prototype.update.call(this,e,n,r,o)},e.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():t.prototype.selectNode.call(this)},e.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():t.prototype.deselectNode.call(this)},e.prototype.setSelection=function(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r):t.prototype.setSelection.call(this,e,n,r,o)},e.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),t.prototype.destroy.call(this)},e.prototype.stopEvent=function(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)},e.prototype.ignoreMutation=function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):t.prototype.ignoreMutation.call(this,e)},e}(at);function pt(t,e){for(var n=t.firstChild,r=0;r<e.length;r++){var o=e[r],i=o.dom;if(i.parentNode==t){while(i!=n)n=wt(n);n=n.nextSibling}else t.insertBefore(i,n);if(o instanceof st){var s=n?n.previousSibling:t.lastChild;pt(o.contentDOM,o.children),n=s?s.nextSibling:t.firstChild}}while(n)n=wt(n)}function dt(t){t&&(this.nodeName=t)}dt.prototype=Object.create(null);var ht=[new dt];function vt(t,e,n){if(0==t.length)return ht;for(var r=n?ht[0]:new dt,o=[r],i=0;i<t.length;i++){var s=t[i].type.attrs,a=r;if(s)for(var c in s.nodeName&&o.push(a=new dt(s.nodeName)),s){var l=s[c];null!=l&&(n&&1==o.length&&o.push(a=r=new dt(e.isInline?"span":"div")),"class"==c?a.class=(a.class?a.class+" ":"")+l:"style"==c?a.style=(a.style?a.style+";":"")+l:"nodeName"!=c&&(a[c]=l))}}return o}function mt(t,e,n,r){if(n==ht&&r==ht)return e;for(var o=e,i=0;i<r.length;i++){var s=r[i],a=n[i];if(i){var c=void 0;a&&a.nodeName==s.nodeName&&o!=t&&(c=o.parentNode)&&c.tagName.toLowerCase()==s.nodeName?o=c:(c=document.createElement(s.nodeName),c.appendChild(o),a=ht[0],o=c)}gt(o,a||ht[0],s)}return o}function gt(t,e,n){for(var r in e)"class"==r||"style"==r||"nodeName"==r||r in n||t.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=e[o]&&t.setAttribute(o,n[o]);if(e.class!=n.class){for(var i=e.class?e.class.split(" "):rt,s=n.class?n.class.split(" "):rt,a=0;a<i.length;a++)-1==s.indexOf(i[a])&&t.classList.remove(i[a]);for(var c=0;c<s.length;c++)-1==i.indexOf(s[c])&&t.classList.add(s[c])}if(e.style!=n.style){if(e.style){var l,u=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;while(l=u.exec(e.style))t.style.removeProperty(l[1])}n.style&&(t.style.cssText+=n.style)}}function yt(t,e,n){return mt(t,t,ht,vt(e,n,1!=t.nodeType))}function bt(t,e){if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function wt(t){var e=t.nextSibling;return t.parentNode.removeChild(t),e}var St=function(t,e){this.top=t,this.lock=e,this.index=0,this.stack=[],this.changed=!1;var n=xt(t.node.content,t.children);this.preMatched=n.nodes,this.preMatchOffset=n.offset};function xt(t,e){for(var n=[],r=t.childCount,o=e.length-1;r>0&&o>=0;o--){var i=e[o],s=i.node;if(s){if(s!=t.child(r-1))break;n.push(i),--r}}return{nodes:n.reverse(),offset:r}}function kt(t,e){return t.type.side-e.type.side}function Ct(t,e,n,r){var o=e.locals(t),i=0;if(0!=o.length)for(var s=0,a=[],c=null,l=0;;){if(s<o.length&&o[s].to==i){var u=o[s++],f=void 0;while(s<o.length&&o[s].to==i)(f||(f=[u])).push(o[s++]);if(f){f.sort(kt);for(var p=0;p<f.length;p++)n(f[p],l)}else n(u,l)}var d=void 0,h=void 0;if(c)h=-1,d=c,c=null;else{if(!(l<t.childCount))break;h=l,d=t.child(l++)}for(var v=0;v<a.length;v++)a[v].to<=i&&a.splice(v--,1);while(s<o.length&&o[s].from==i)a.push(o[s++]);var m=i+d.nodeSize;if(d.isText){var g=m;s<o.length&&o[s].from<g&&(g=o[s].from);for(var y=0;y<a.length;y++)a[y].to<g&&(g=a[y].to);g<m&&(c=d.cut(g-i),d=d.cut(0,g-i),m=g,h=-1)}r(d,a.length?a.slice():rt,e.forChild(i,d),h),i=m}else for(var b=0;b<t.childCount;b++){var w=t.child(b);r(w,o,e.forChild(i,w),b),i+=w.nodeSize}}function Ot(t){if("UL"==t.nodeName||"OL"==t.nodeName){var e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function Mt(t,e){for(;;){if(3==t.nodeType)return t;if(1==t.nodeType&&e>0){if(t.childNodes.length>e&&3==t.childNodes[e].nodeType)return t.childNodes[e];t=t.childNodes[e-1],e=y(t)}else{if(!(1==t.nodeType&&e<t.childNodes.length))return null;t=t.childNodes[e],e=0}}}function Nt(t,e,n,r){for(var o="",i=0,s=0;i<t.childCount;i++){var a=t.child(i),c=s+a.nodeSize;if(a.isText){if(o+=a.text,c>=r){var l=c-o.length,u=o.lastIndexOf(e);while(u>-1&&l+u>n)u=o.lastIndexOf(e,u-1);if(u>-1&&l+u+e.length>=r)return l+u;if(c>r)break}}else o="";s=c}return-1}function At(t,e,n,r,o){for(var i=[],s=0,a=0;s<t.length;s++){var c=t[s],l=a,u=a+=c.size;l>=n||u<=e?i.push(c):(l<e&&i.push(c.slice(0,e-l,r)),o&&(i.push(o),o=null),u>n&&i.push(c.slice(n-l,c.size,r)))}return i}function _t(t,e){var n=t.selection,o=n.$anchor,i=n.$head,s=e>0?o.max(i):o.min(i),a=s.parent.inlineContent?s.depth?t.doc.resolve(e>0?s.after():s.before()):null:s;return a&&r["Selection"].findFrom(a,e)}function Tt(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Dt(t,e,n){var o=t.state.selection;if(o instanceof r["TextSelection"]){if(!o.empty||n.indexOf("s")>-1)return!1;if(t.endOfTextblock(e>0?"right":"left")){var i=_t(t.state,e);return!!(i&&i instanceof r["NodeSelection"])&&Tt(t,i)}var a,c=o.$head,l=c.textOffset?null:e<0?c.nodeBefore:c.nodeAfter;if(!l||l.isText)return!1;var u=e<0?c.pos-l.nodeSize:c.pos;return!!(l.isAtom||(a=t.docView.descAt(u))&&!a.contentDOM)&&(r["NodeSelection"].isSelectable(l)?Tt(t,new r["NodeSelection"](e<0?t.state.doc.resolve(c.pos-l.nodeSize):c)):!!s.webkit&&Tt(t,new r["TextSelection"](t.state.doc.resolve(e<0?u:u+l.nodeSize))))}if(o instanceof r["NodeSelection"]&&o.node.isInline)return Tt(t,new r["TextSelection"](e>0?o.$to:o.$from));var f=_t(t.state,e);return!!f&&Tt(t,f)}function Et(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Pt(t){var e=t.pmViewDesc;return e&&0==e.size&&(t.nextSibling||"BR"!=t.nodeName)}function Rt(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){var o,i,a=!1;for(s.gecko&&1==n.nodeType&&r<Et(n)&&Pt(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var c=n.childNodes[r-1];if(Pt(c))o=n,i=--r;else{if(3!=c.nodeType)break;n=c,r=n.nodeValue.length}}else{if(It(n))break;var l=n.previousSibling;while(l&&Pt(l))o=n.parentNode,i=p(l),l=l.previousSibling;if(l)n=l,r=Et(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}a?jt(t,e,n,r):o&&jt(t,e,o,i)}}function $t(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){for(var o,i,s=Et(n);;)if(r<s){if(1!=n.nodeType)break;var a=n.childNodes[r];if(!Pt(a))break;o=n,i=++r}else{if(It(n))break;var c=n.nextSibling;while(c&&Pt(c))o=c.parentNode,i=p(c)+1,c=c.nextSibling;if(c)n=c,r=0,s=Et(n);else{if(n=n.parentNode,n==t.dom)break;r=s=0}}o&&jt(t,e,o,i)}}function It(t){var e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function jt(t,e,n,r){if(w(e)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),e.removeAllRanges(),e.addRange(o)}else e.extend&&e.extend(n,r);t.domObserver.setCurSelection()}function zt(t,e,n){var o=t.state.selection;if(o instanceof r["TextSelection"]&&!o.empty||n.indexOf("s")>-1)return!1;var i=o.$from,s=o.$to;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){var a=_t(t.state,e);if(a&&a instanceof r["NodeSelection"])return Tt(t,a)}if(!i.parent.inlineContent){var c=r["Selection"].findFrom(e<0?i:s,e);return!c||Tt(t,c)}return!1}function Ft(t,e){if(!(t.state.selection instanceof r["TextSelection"]))return!0;var n=t.state.selection,o=n.$head,i=n.$anchor,s=n.empty;if(!o.sameParent(i))return!0;if(!s)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;var a=!o.textOffset&&(e<0?o.nodeBefore:o.nodeAfter);if(a&&!a.isText){var c=t.state.tr;return e<0?c.delete(o.pos-a.nodeSize,o.pos):c.delete(o.pos,o.pos+a.nodeSize),t.dispatch(c),!0}return!1}function Vt(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Bt(t){if(s.chrome&&!(t.state.selection.$head.parentOffset>0)){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;Vt(t,o,!0),setTimeout((function(){return Vt(t,o,!1)}),20)}}}function Lt(t){var e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function Wt(t,e){var n=e.keyCode,r=Lt(e);return 8==n||s.mac&&72==n&&"c"==r?Ft(t,-1)||Rt(t):46==n||s.mac&&68==n&&"c"==r?Ft(t,1)||$t(t):13==n||27==n||(37==n?Dt(t,-1,r)||Rt(t):39==n?Dt(t,1,r)||$t(t):38==n?zt(t,-1,r)||Rt(t):40==n?Bt(t)||zt(t,1,r)||$t(t):r==(s.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function qt(t,e){var n,o,i=t.root.getSelection(),s=t.state.doc,a=t.docView.nearestDesc(i.focusNode),c=a&&0==a.size,l=t.docView.posFromDOM(i.focusNode,i.focusOffset),u=s.resolve(l);if(w(i)){n=u;while(a&&!a.node)a=a.parent;if(a&&a.node.isAtom&&r["NodeSelection"].isSelectable(a.node)&&a.parent){var f=a.posBefore;o=new r["NodeSelection"](l==f?u:s.resolve(f))}}else n=s.resolve(t.docView.posFromDOM(i.anchorNode,i.anchorOffset));if(!o){var p="pointer"==e||t.state.selection.head<u.pos&&!c?1:-1;o=Qt(t,n,u,p)}return o}function Kt(t,e){var n=t.state.selection;if(Xt(t,n),t.editable?t.hasFocus():te(t)&&document.activeElement.contains(t.dom)){if(t.domObserver.disconnectSelection(),t.cursorWrapper)Gt(t);else{var o,i,s=n.anchor,a=n.head;!Ht||n instanceof r["TextSelection"]||(n.$from.parent.inlineContent||(o=Jt(t,n.from)),n.empty||n.$from.parent.inlineContent||(i=Jt(t,n.to))),t.docView.setSelection(s,a,t.root,e),Ht&&(o&&(o.contentEditable="false"),i&&(i.contentEditable="false")),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):s!=a&&(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Ut(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}St.prototype.getPreMatch=function(t){return t>=this.preMatchOffset?this.preMatched[t-this.preMatchOffset]:null},St.prototype.destroyBetween=function(t,e){if(t!=e){for(var n=t;n<e;n++)this.top.children[n].destroy();this.top.children.splice(t,e-t),this.changed=!0}},St.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},St.prototype.syncToMarks=function(t,e,n){var r=0,o=this.stack.length>>1,i=Math.min(o,t.length);while(r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(t[r])&&!1!==t[r].type.spec.spanning)r++;while(r<o)this.destroyRest(),this.top.dirty=Y,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;while(o<t.length){this.stack.push(this.top,this.index+1);for(var s=-1,a=this.index;a<Math.min(this.index+3,this.top.children.length);a++)if(this.top.children[a].matchesMark(t[o])){s=a;break}if(s>-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{var c=st.create(this.top,t[o],e,n);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}},St.prototype.findNodeMatch=function(t,e,n,r){var o=-1,i=r<0?void 0:this.getPreMatch(r),s=this.top.children;if(i&&i.matchesNode(t,e,n))o=s.indexOf(i);else for(var a=this.index,c=Math.min(s.length,a+5);a<c;a++){var l=s[a];if(l.matchesNode(t,e,n)&&this.preMatched.indexOf(l)<0){o=a;break}}return!(o<0)&&(this.destroyBetween(this.index,o),this.index++,!0)},St.prototype.updateNextNode=function(t,e,n,r,o){if(this.index==this.top.children.length)return!1;var i=this.top.children[this.index];if(i instanceof at){var s=this.preMatched.indexOf(i);if(s>-1&&s+this.preMatchOffset!=o)return!1;var a=i.dom,c=this.lock&&(a==this.lock||1==a.nodeType&&a.contains(this.lock.parentNode))&&!(t.isText&&i.node&&i.node.isText&&i.nodeDOM.nodeValue==t.text&&i.dirty!=tt&&bt(e,i.outerDeco));if(!c&&i.update(t,e,n,r))return i.dom!=a&&(this.changed=!0),this.index++,!0}return!1},St.prototype.addNode=function(t,e,n,r,o){this.top.children.splice(this.index++,0,at.create(this.top,t,e,n,r,o)),this.changed=!0},St.prototype.placeWidget=function(t,e,n){if(this.index<this.top.children.length&&this.top.children[this.index].matchesWidget(t))this.index++;else{var r=new ot(this.top,t,e,n);this.top.children.splice(this.index++,0,r),this.changed=!0}},St.prototype.addTextblockHacks=function(){var t=this.top.children[this.index-1];while(t instanceof st)t=t.children[t.children.length-1];if(!t||!(t instanceof lt)||/\n$/.test(t.node.text))if(this.index<this.top.children.length&&this.top.children[this.index].matchesHack())this.index++;else{var e=document.createElement("br");this.top.children.splice(this.index++,0,new ut(this.top,rt,e,null)),this.changed=!0}};var Ht=s.safari||s.chrome&&s.chrome_version<63;function Jt(t,e){var n=t.docView.domFromPos(e),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,s=o?r.childNodes[o-1]:null;if((!i||"false"==i.contentEditable)&&(!s||"false"==s.contentEditable)){if(i)return i.contentEditable="true",i;if(s)return s.contentEditable="true",s}}function Ut(t){var e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.hideSelectionGuard);var n=t.root.getSelection(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(e.removeEventListener("selectionchange",t.hideSelectionGuard),t.dom.classList.remove("ProseMirror-hideselection"))})}function Gt(t){var e=t.root.getSelection(),n=document.createRange(),r=t.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,p(r)+1):n.setEnd(r,0),n.collapse(!1),e.removeAllRanges(),e.addRange(n),!o&&!t.state.selection.visible&&s.ie&&s.ie_version<=11&&(r.disabled=!0,r.disabled=!1)}function Xt(t,e){if(e instanceof r["NodeSelection"]){var n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Yt(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Yt(t)}function Yt(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=null)}function Qt(t,e,n,o){return t.someProp("createSelectionBetween",(function(r){return r(t,e,n)}))||r["TextSelection"].between(e,n,o)}function Zt(t){return(!t.editable||t.root.activeElement==t.dom)&&te(t)}function te(t){var e=t.root.getSelection();if(!e.anchorNode)return!1;try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch(n){return!1}}function ee(t){var e=t.docView.domFromPos(t.state.selection.anchor),n=t.root.getSelection();return v(e.node,e.offset,n.anchorNode,n.anchorOffset)}function ne(t,e,n){var r=t.docView.parseRange(e,n),i=r.node,a=r.fromOffset,c=r.toOffset,l=r.from,u=r.to,f=t.root.getSelection(),p=null,d=f.anchorNode;if(d&&t.dom.contains(1==d.nodeType?d:d.parentNode)&&(p=[{node:d,offset:f.anchorOffset}],w(f)||p.push({node:f.focusNode,offset:f.focusOffset})),s.chrome&&8===t.lastKeyCode)for(var h=c;h>a;h--){var v=i.childNodes[h-1],m=v.pmViewDesc;if("BR"==v.nodeType&&!m){c=h;break}if(!m||m.size)break}var g=t.state.doc,y=t.someProp("domParser")||o["DOMParser"].fromSchema(t.state.schema),b=g.resolve(l),S=null,x=y.parse(i,{topNode:b.parent,topMatch:b.parent.contentMatchAt(b.index()),topOpen:!0,from:a,to:c,preserveWhitespace:!b.parent.type.spec.code||"full",editableContent:!0,findPositions:p,ruleFromNode:re,context:b});if(p&&null!=p[0].pos){var k=p[0].pos,C=p[1]&&p[1].pos;null==C&&(C=k),S={anchor:k+l,head:C+l}}return{doc:x,sel:S,from:l,to:u}}function re(t){var e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(s.safari&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(t.parentNode.lastChild==t||s.safari&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0}}function oe(t,e,n,o){if(e<0){var i=t.lastSelectionTime>Date.now()-50?t.lastSelectionOrigin:null,a=qt(t,i);if(!t.state.selection.eq(a)){var c=t.state.tr.setSelection(a);"pointer"==i?c.setMeta("pointer",!0):"key"==i&&c.scrollIntoView(),t.dispatch(c)}}else{var l=t.state.doc.resolve(e),u=l.sharedDepth(n);e=l.before(u+1),n=t.state.doc.resolve(n).after(u+1);var f,p,d=t.state.selection,h=ne(t,e,n),v=t.state.doc,m=v.slice(h.from,h.to);8===t.lastKeyCode&&Date.now()-100<t.lastKeyCodeTime?(f=t.state.selection.to,p="end"):(f=t.state.selection.from,p="start"),t.lastKeyCode=null;var g=le(m.content,h.doc.content,h.from,f,p);if(!g){if(!(o&&d instanceof r["TextSelection"]&&!d.empty&&d.$head.sameParent(d.$anchor))||t.composing||h.sel&&h.sel.anchor!=h.sel.head){if(h.sel){var y=ie(t,t.state.doc,h.sel);y&&!y.eq(t.state.selection)&&t.dispatch(t.state.tr.setSelection(y))}return}g={start:d.from,endA:d.to,endB:d.to}}t.domChangeCount++,t.state.selection.from<t.state.selection.to&&g.start==g.endB&&t.state.selection instanceof r["TextSelection"]&&(g.start>t.state.selection.from&&g.start<=t.state.selection.from+2?g.start=t.state.selection.from:g.endA<t.state.selection.to&&g.endA>=t.state.selection.to-2&&(g.endB+=t.state.selection.to-g.endA,g.endA=t.state.selection.to)),s.ie&&s.ie_version<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>h.from&&"  "==h.doc.textBetween(g.start-h.from-1,g.start-h.from+1)&&(g.start--,g.endA--,g.endB--);var b,w=h.doc.resolveNoCache(g.start-h.from),x=h.doc.resolveNoCache(g.endB-h.from);if(!(!w.sameParent(x)&&w.pos<h.doc.content.size&&(b=r["Selection"].findFrom(h.doc.resolve(w.pos+1),1,!0))&&b.head==x.pos&&t.someProp("handleKeyDown",(function(e){return e(t,S(13,"Enter"))}))))if(t.state.selection.anchor>g.start&&ae(v,g.start,g.endA,w,x)&&t.someProp("handleKeyDown",(function(e){return e(t,S(8,"Backspace"))})))s.android&&s.chrome&&t.domObserver.suppressSelectionUpdates();else{var k,C,O,M,N=g.start,A=g.endA;if(w.sameParent(x)&&w.parent.inlineContent)if(w.pos==x.pos)s.ie&&s.ie_version<=11&&0==w.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout((function(){return Kt(t)}),20)),k=t.state.tr.delete(N,A),C=v.resolve(g.start).marksAcross(v.resolve(g.endA));else if(g.endA==g.endB&&(M=v.resolve(g.start))&&(O=se(w.parent.content.cut(w.parentOffset,x.parentOffset),M.parent.content.cut(M.parentOffset,g.endA-M.start()))))k=t.state.tr,"add"==O.type?k.addMark(N,A,O.mark):k.removeMark(N,A,O.mark);else if(w.parent.child(w.index()).isText&&w.index()==x.index()-(x.textOffset?0:1)){var _=w.parent.textBetween(w.parentOffset,x.parentOffset);if(t.someProp("handleTextInput",(function(e){return e(t,N,A,_)})))return;k=t.state.tr.insertText(_,N,A)}if(k||(k=t.state.tr.replace(N,A,h.doc.slice(g.start-h.from,g.endB-h.from))),h.sel){var T=ie(t,k.doc,h.sel);T&&!(s.chrome&&s.android&&t.composing&&T.empty&&T.head==N||s.ie&&T.empty&&T.head==N)&&k.setSelection(T)}C&&k.ensureMarks(C),t.dispatch(k.scrollIntoView())}}}function ie(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Qt(t,e.resolve(n.anchor),e.resolve(n.head))}function se(t,e){for(var n,r,i,s=t.firstChild.marks,a=e.firstChild.marks,c=s,l=a,u=0;u<a.length;u++)c=a[u].removeFromSet(c);for(var f=0;f<s.length;f++)l=s[f].removeFromSet(l);if(1==c.length&&0==l.length)r=c[0],n="add",i=function(t){return t.mark(r.addToSet(t.marks))};else{if(0!=c.length||1!=l.length)return null;r=l[0],n="remove",i=function(t){return t.mark(r.removeFromSet(t.marks))}}for(var p=[],d=0;d<e.childCount;d++)p.push(i(e.child(d)));if(o["Fragment"].from(p).eq(t))return{mark:r,type:n}}function ae(t,e,n,r,o){if(!r.parent.isTextblock||n-e<=o.pos-r.pos||ce(r,!0,!1)<o.pos)return!1;var i=t.resolve(e);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var s=t.resolve(ce(i,!0,!0));return!(!s.parent.isTextblock||s.pos>n||ce(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function ce(t,e,n){var r=t.depth,o=e?t.end():t.pos;while(r>0&&(e||t.indexAfter(r)==t.node(r).childCount))r--,o++,e=!1;if(n){var i=t.node(r).maybeChild(t.indexAfter(r));while(i&&!i.isLeaf)i=i.firstChild,o++}return o}function le(t,e,n,r,o){var i=t.findDiffStart(e,n);if(null==i)return null;var s=t.findDiffEnd(e,n+t.size,n+e.size),a=s.a,c=s.b;if("end"==o){var l=Math.max(0,i-Math.min(a,c));r-=a+l-i}if(a<i&&t.size<e.size){var u=r<=i&&r>=a?i-r:0;i-=u,c=i+(c-a),a=i}else if(c<i){var f=r<=i&&r>=c?i-r:0;i-=f,a=i+(a-c),c=i}return{start:i,endA:a,endB:c}}function ue(t,e){var n=[],r=e.content,i=e.openStart,s=e.openEnd;while(i>1&&s>1&&1==r.childCount&&1==r.firstChild.childCount){i--,s--;var a=r.firstChild;n.push(a.type.name,a.type.hasRequiredAttrs()?a.attrs:null),r=a.content}var c=t.someProp("clipboardSerializer")||o["DOMSerializer"].fromSchema(t.state.schema),l=we(),u=l.createElement("div");u.appendChild(c.serializeFragment(r,{document:l}));var f,p=u.firstChild;while(p&&1==p.nodeType&&(f=ye[p.nodeName.toLowerCase()])){for(var d=f.length-1;d>=0;d--){var h=l.createElement(f[d]);while(u.firstChild)h.appendChild(u.firstChild);u.appendChild(h)}p=u.firstChild}p&&1==p.nodeType&&p.setAttribute("data-pm-slice",i+" "+s+" "+JSON.stringify(n));var v=t.someProp("clipboardTextSerializer",(function(t){return t(e)}))||e.content.textBetween(0,e.content.size,"\n\n");return{dom:u,text:v}}function fe(t,e,n,r,i){var s,a,c=i.parent.type.spec.code;if(!n&&!e)return null;var l=e&&(r||c||!n);if(l){if(t.someProp("transformPastedText",(function(t){e=t(e)})),c)return new o["Slice"](o["Fragment"].from(t.state.schema.text(e)),0,0);var u=t.someProp("clipboardTextParser",(function(t){return t(e,i)}));u?a=u:(s=document.createElement("div"),e.trim().split(/(?:\r\n?|\n)+/).forEach((function(t){s.appendChild(document.createElement("p")).textContent=t})))}else t.someProp("transformPastedHTML",(function(t){n=t(n)})),s=Se(n);var f=s&&s.querySelector("[data-pm-slice]"),p=f&&/^(\d+) (\d+) (.*)/.exec(f.getAttribute("data-pm-slice"));if(!a){var d=t.someProp("clipboardParser")||t.someProp("domParser")||o["DOMParser"].fromSchema(t.state.schema);a=d.parseSlice(s,{preserveWhitespace:!(!l&&!p),context:i})}return a=p?xe(ge(a,+p[1],+p[2]),p[3]):o["Slice"].maxOpen(pe(a.content,i),!1),t.someProp("transformPasted",(function(t){a=t(a)})),a}function pe(t,e){if(t.childCount<2)return t;for(var n=function(n){var r=e.node(n),i=r.contentMatchAt(e.index(n)),s=void 0,a=[];if(t.forEach((function(t){if(a){var e,n=i.findWrapping(t.type);if(!n)return a=null;if(e=a.length&&s.length&&he(n,s,t,a[a.length-1],0))a[a.length-1]=e;else{a.length&&(a[a.length-1]=ve(a[a.length-1],s.length));var r=de(t,n);a.push(r),i=i.matchType(r.type,r.attrs),s=n}}})),a)return{v:o["Fragment"].from(a)}},r=e.depth;r>=0;r--){var i=n(r);if(i)return i.v}return t}function de(t,e,n){void 0===n&&(n=0);for(var r=e.length-1;r>=n;r--)t=e[r].create(null,o["Fragment"].from(t));return t}function he(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){var s=he(t,e,n,r.lastChild,i+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));var a=r.contentMatchAt(r.childCount);if(a.matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(o["Fragment"].from(de(n,t,i+1))))}}function ve(t,e){if(0==e)return t;var n=t.content.replaceChild(t.childCount-1,ve(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(o["Fragment"].empty,!0);return t.copy(n.append(r))}function me(t,e,n,r,i,s){var a=e<0?t.firstChild:t.lastChild,c=a.content;return i<r-1&&(c=me(c,e,n,r,i+1,s)),i>=n&&(c=e<0?a.contentMatchAt(0).fillBefore(c,t.childCount>1||s<=i).append(c):c.append(a.contentMatchAt(a.childCount).fillBefore(o["Fragment"].empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(c))}function ge(t,e,n){return e<t.openStart&&(t=new o["Slice"](me(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new o["Slice"](me(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}var ye={thead:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},be=null;function we(){return be||(be=document.implementation.createHTMLDocument("title"))}function Se(t){var e=/(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));var n,r=we().createElement("div"),o=/(?:<meta [^>]*>)*<([a-z][^>\s]+)/i.exec(t),i=0;(n=o&&ye[o[1].toLowerCase()])&&(t=n.map((function(t){return"<"+t+">"})).join("")+t+n.map((function(t){return"</"+t+">"})).reverse().join(""),i=n.length),r.innerHTML=t;for(var s=0;s<i;s++)r=r.firstChild;return r}function xe(t,e){if(!t.size)return t;var n,r=t.content.firstChild.type.schema;try{n=JSON.parse(e)}catch(u){return t}for(var i=t.content,s=t.openStart,a=t.openEnd,c=n.length-2;c>=0;c-=2){var l=r.nodes[n[c]];if(!l||l.hasRequiredAttrs())break;i=o["Fragment"].from(l.create(n[c+1],i)),s++,a++}return new o["Slice"](i,s,a)}var ke={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Ce=s.ie&&s.ie_version<=11,Oe=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};Oe.prototype.set=function(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset},Oe.prototype.eq=function(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset};var Me=function(t,e){var n=this;this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=!1,this.observer=window.MutationObserver&&new window.MutationObserver((function(t){for(var e=0;e<t.length;e++)n.queue.push(t[e]);s.ie&&s.ie_version<=11&&t.some((function(t){return"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new Oe,Ce&&(this.onCharData=function(t){n.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};Me.prototype.flushSoon=function(){var t=this;this.flushingSoon||(this.flushingSoon=!0,window.setTimeout((function(){t.flushingSoon=!1,t.flush()}),20))},Me.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,ke),Ce&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Me.prototype.stop=function(){var t=this;if(this.observer){var e=this.observer.takeRecords();if(e.length){for(var n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout((function(){return t.flush()}),20)}this.observer.disconnect()}Ce&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()},Me.prototype.connectSelection=function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)},Me.prototype.disconnectSelection=function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)},Me.prototype.suppressSelectionUpdates=function(){var t=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return t.suppressingSelectionUpdates=!1}),50)},Me.prototype.onSelectionChange=function(){if(Zt(this.view)){if(this.suppressingSelectionUpdates)return Kt(this.view);if(s.ie&&s.ie_version<=11&&!this.view.state.selection.empty){var t=this.view.root.getSelection();if(t.focusNode&&v(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}},Me.prototype.setCurSelection=function(){this.currentSelection.set(this.view.root.getSelection())},Me.prototype.ignoreSelectionChange=function(t){if(0==t.rangeCount)return!0;var e=t.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(e);return n&&n.ignoreMutation({type:"selection",target:3==e.nodeType?e.parentNode:e})},Me.prototype.flush=function(){if(this.view.docView&&!this.flushingSoon){var t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);var e=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&te(this.view)&&!this.ignoreSelectionChange(e),r=-1,o=-1,i=!1,a=[];if(this.view.editable)for(var c=0;c<t.length;c++){var l=this.registerMutation(t[c],a);l&&(r=r<0?l.from:Math.min(l.from,r),o=o<0?l.to:Math.max(l.to,o),l.typeOver&&!this.view.composing&&(i=!0))}if(s.gecko&&a.length>1){var u=a.filter((function(t){return"BR"==t.nodeName}));if(2==u.length){var f=u[0],p=u[1];f.parentNode&&f.parentNode.parentNode==p.parentNode?p.remove():f.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),Ae(this.view)),this.handleDOMChange(r,o,i),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(e)||Kt(this.view))}},Me.prototype.registerMutation=function(t,e){if(e.indexOf(t.target)>-1)return null;var n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){var r=t.previousSibling,o=t.nextSibling;if(s.ie&&s.ie_version<=11&&t.addedNodes.length)for(var i=0;i<t.addedNodes.length;i++){var a=t.addedNodes[i],c=a.previousSibling,l=a.nextSibling;(!c||Array.prototype.indexOf.call(t.addedNodes,c)<0)&&(r=c),(!l||Array.prototype.indexOf.call(t.addedNodes,l)<0)&&(o=l)}for(var u=r&&r.parentNode==t.target?p(r)+1:0,f=n.localPosFromDOM(t.target,u,-1),d=o&&o.parentNode==t.target?p(o):t.target.childNodes.length,h=0;h<t.addedNodes.length;h++)e.push(t.addedNodes[h]);var v=n.localPosFromDOM(t.target,d,1);return{from:f,to:v}}return"attributes"==t.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}};var Ne=!1;function Ae(t){Ne||(Ne=!0,"normal"==getComputedStyle(t.dom).whiteSpace&&console["warn"]("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."))}var _e={},Te={};function De(t){t.shiftKey=!1,t.mouseDown=null,t.lastKeyCode=null,t.lastKeyCodeTime=0,t.lastClick={time:0,x:0,y:0,type:""},t.lastSelectionOrigin=null,t.lastSelectionTime=0,t.composing=!1,t.composingTimeout=null,t.compositionNodes=[],t.compositionEndedAt=-2e8,t.domObserver=new Me(t,(function(e,n,r){return oe(t,e,n,r)})),t.domObserver.start(),t.domChangeCount=0,t.eventHandlers=Object.create(null);var e=function(e){var n=_e[e];t.dom.addEventListener(e,t.eventHandlers[e]=function(e){!Ie(t,e)||$e(t,e)||!t.editable&&e.type in Te||n(t,e)})};for(var n in _e)e(n);s.safari&&t.dom.addEventListener("input",(function(){return null})),Re(t)}function Ee(t,e){t.lastSelectionOrigin=e,t.lastSelectionTime=Date.now()}function Pe(t){for(var e in t.domObserver.stop(),t.eventHandlers)t.dom.removeEventListener(e,t.eventHandlers[e]);clearTimeout(t.composingTimeout)}function Re(t){t.someProp("handleDOMEvents",(function(e){for(var n in e)t.eventHandlers[n]||t.dom.addEventListener(n,t.eventHandlers[n]=function(e){return $e(t,e)})}))}function $e(t,e){return t.someProp("handleDOMEvents",(function(n){var r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)}))}function Ie(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(var n=e.target;n!=t.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function je(t,e){$e(t,e)||!_e[e.type]||!t.editable&&e.type in Te||_e[e.type](t,e)}function ze(t){return{left:t.clientX,top:t.clientY}}function Fe(t,e){var n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Ve(t,e,n,r,o){if(-1==r)return!1;for(var i=t.state.doc.resolve(r),s=function(r){if(t.someProp(e,(function(e){return r>i.depth?e(t,n,i.nodeAfter,i.before(r),o,!0):e(t,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},a=i.depth+1;a>0;a--){var c=s(a);if(c)return c.v}return!1}function Be(t,e,n){t.focused||t.focus();var r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function Le(t,e){if(-1==e)return!1;var n=t.state.doc.resolve(e),o=n.nodeAfter;return!!(o&&o.isAtom&&r["NodeSelection"].isSelectable(o))&&(Be(t,new r["NodeSelection"](n),"pointer"),!0)}function We(t,e){if(-1==e)return!1;var n,o,i=t.state.selection;i instanceof r["NodeSelection"]&&(n=i.node);for(var s=t.state.doc.resolve(e),a=s.depth+1;a>0;a--){var c=a>s.depth?s.nodeAfter:s.node(a);if(r["NodeSelection"].isSelectable(c)){o=n&&i.$from.depth>0&&a>=i.$from.depth&&s.before(i.$from.depth+1)==i.$from.pos?s.before(i.$from.depth):s.before(a);break}}return null!=o&&(Be(t,r["NodeSelection"].create(t.state.doc,o),"pointer"),!0)}function qe(t,e,n,r,o){return Ve(t,"handleClickOn",e,n,r)||t.someProp("handleClick",(function(n){return n(t,e,r)}))||(o?We(t,n):Le(t,n))}function Ke(t,e,n,r){return Ve(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",(function(n){return n(t,e,r)}))}function He(t,e,n,r){return Ve(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",(function(n){return n(t,e,r)}))||Je(t,n)}function Je(t,e){var n=t.state.doc;if(-1==e)return!!n.inlineContent&&(Be(t,r["TextSelection"].create(n,0,n.content.size),"pointer"),!0);for(var o=n.resolve(e),i=o.depth+1;i>0;i--){var s=i>o.depth?o.nodeAfter:o.node(i),a=o.before(i);if(s.inlineContent)Be(t,r["TextSelection"].create(n,a+1,a+1+s.content.size),"pointer");else{if(!r["NodeSelection"].isSelectable(s))continue;Be(t,r["NodeSelection"].create(n,a),"pointer")}return!0}}function Ue(t){return tn(t)}Te.keydown=function(t,e){t.shiftKey=16==e.keyCode||e.shiftKey,Ye(t,e)||(t.lastKeyCode=e.keyCode,t.lastKeyCodeTime=Date.now(),t.someProp("handleKeyDown",(function(n){return n(t,e)}))||Wt(t,e)?e.preventDefault():Ee(t,"key"))},Te.keyup=function(t,e){16==e.keyCode&&(t.shiftKey=!1)},Te.keypress=function(t,e){if(!(Ye(t,e)||!e.charCode||e.ctrlKey&&!e.altKey||s.mac&&e.metaKey))if(t.someProp("handleKeyPress",(function(n){return n(t,e)})))e.preventDefault();else{var n=t.state.selection;if(!(n instanceof r["TextSelection"])||!n.$from.sameParent(n.$to)){var o=String.fromCharCode(e.charCode);t.someProp("handleTextInput",(function(e){return e(t,n.$from.pos,n.$to.pos,o)}))||t.dispatch(t.state.tr.insertText(o).scrollIntoView()),e.preventDefault()}}};var Ge=s.mac?"metaKey":"ctrlKey";_e.mousedown=function(t,e){t.shiftKey=e.shiftKey;var n=Ue(t),r=Date.now(),o="singleClick";r-t.lastClick.time<500&&Fe(e,t.lastClick)&&!e[Ge]&&("singleClick"==t.lastClick.type?o="doubleClick":"doubleClick"==t.lastClick.type&&(o="tripleClick")),t.lastClick={time:r,x:e.clientX,y:e.clientY,type:o};var i=t.posAtCoords(ze(e));i&&("singleClick"==o?t.mouseDown=new Xe(t,i,e,n):("doubleClick"==o?Ke:He)(t,i.pos,i.inside,e)?e.preventDefault():Ee(t,"pointer"))};var Xe=function(t,e,n,o){var i,a,c=this;if(this.view=t,this.startDoc=t.state.doc,this.pos=e,this.event=n,this.flushed=o,this.selectNode=n[Ge],this.allowDefault=n.shiftKey,e.inside>-1)i=t.state.doc.nodeAt(e.inside),a=e.inside;else{var l=t.state.doc.resolve(e.pos);i=l.parent,a=l.depth?l.before():0}this.mightDrag=null;var u=o?null:n.target,f=u?t.docView.nearestDesc(u,!0):null;this.target=f?f.dom:null,(i.type.spec.draggable&&!1!==i.type.spec.selectable||t.state.selection instanceof r["NodeSelection"]&&a==t.state.selection.from)&&(this.mightDrag={node:i,pos:a,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&s.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){return c.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Ee(t,"pointer")};function Ye(t,e){return!!t.composing||!!(s.safari&&Math.abs(e.timeStamp-t.compositionEndedAt)<500)&&(t.compositionEndedAt=-2e8,!0)}Xe.prototype.done=function(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!1),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.view.mouseDown=null},Xe.prototype.up=function(t){if(this.done(),this.view.dom.contains(3==t.target.nodeType?t.target.parentNode:t.target)){var e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(ze(t))),this.allowDefault||!e?Ee(this.view,"pointer"):qe(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():!this.flushed&&(!s.chrome||this.view.state.selection instanceof r["TextSelection"]||e.pos!=this.view.state.selection.from&&e.pos!=this.view.state.selection.to)?Ee(this.view,"pointer"):(Be(this.view,r["Selection"].near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault())}},Xe.prototype.move=function(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0),Ee(this.view,"pointer")},_e.touchdown=function(t){Ue(t),Ee(t,"pointer")},_e.contextmenu=function(t){return Ue(t)};var Qe=s.android?5e3:-1;function Ze(t,e){clearTimeout(t.composingTimeout),e>-1&&(t.composingTimeout=setTimeout((function(){return tn(t)}),e))}function tn(t,e){t.composing=!1;while(t.compositionNodes.length>0)t.compositionNodes.pop().markParentsDirty();return!(!e&&!t.docView.dirty)&&(t.updateState(t.state),!0)}function en(t,e){var n=t.dom.ownerDocument,r=n.body.appendChild(n.createElement("div"));r.appendChild(e),r.style.cssText="position: fixed; left: -10000px; top: 10px";var o=getSelection(),i=n.createRange();i.selectNodeContents(e),t.dom.blur(),o.removeAllRanges(),o.addRange(i),setTimeout((function(){n.body.removeChild(r),t.focus()}),50)}Te.compositionstart=Te.compositionupdate=function(t){if(!t.composing){t.domObserver.flush();var e=t.state,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(t){return!1===t.type.spec.inclusive}))))t.markCursor=t.state.storedMarks||n.marks(),tn(t,!0),t.markCursor=null;else if(tn(t),s.gecko&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=t.root.getSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}t.composing=!0}Ze(t,Qe)},Te.compositionend=function(t,e){t.composing&&(t.composing=!1,t.compositionEndedAt=e.timeStamp,Ze(t,20))};var nn=s.ie&&s.ie_version<15||s.ios&&s.webkit_version<604;function rn(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}function on(t,e){var n=t.dom.ownerDocument,r=t.shiftKey||t.state.selection.$from.parent.type.spec.code,o=n.body.appendChild(n.createElement(r?"textarea":"div"));r||(o.contentEditable="true"),o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus(),setTimeout((function(){t.focus(),n.body.removeChild(o),r?sn(t,o.value,null,e):sn(t,o.textContent,o.innerHTML,e)}),50)}function sn(t,e,n,r){var i=fe(t,e,n,t.shiftKey,t.state.selection.$from);if(!t.someProp("handlePaste",(function(e){return e(t,r,i||o["Slice"].empty)}))&&i){var s=rn(i),a=s?t.state.tr.replaceSelectionWith(s,t.shiftKey):t.state.tr.replaceSelection(i);t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste"))}}_e.copy=Te.cut=function(t,e){var n=t.state.selection,r="cut"==e.type;if(!n.empty){var o=nn?null:e.clipboardData,i=n.content(),s=ue(t,i),a=s.dom,c=s.text;o?(e.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",c)):en(t,a),r&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Te.paste=function(t,e){var n=nn?null:e.clipboardData,r=n&&n.getData("text/html"),o=n&&n.getData("text/plain");n&&(r||o||n.files.length)?(sn(t,o,r,e),e.preventDefault()):on(t,e)};var an=function(t,e){this.slice=t,this.move=e},cn=s.mac?"altKey":"ctrlKey";for(var ln in _e.dragstart=function(t,e){var n=t.mouseDown;if(n&&n.done(),e.dataTransfer){var o=t.state.selection,i=o.empty?null:t.posAtCoords(ze(e));if(i&&i.pos>=o.from&&i.pos<=(o instanceof r["NodeSelection"]?o.to-1:o.to));else if(n&&n.mightDrag)t.dispatch(t.state.tr.setSelection(r["NodeSelection"].create(t.state.doc,n.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){var s=t.docView.nearestDesc(e.target,!0);if(!s||!s.node.type.spec.draggable||s==t.docView)return;t.dispatch(t.state.tr.setSelection(r["NodeSelection"].create(t.state.doc,s.posBefore)))}var a=t.state.selection.content(),c=ue(t,a),l=c.dom,u=c.text;e.dataTransfer.clearData(),e.dataTransfer.setData(nn?"Text":"text/html",l.innerHTML),nn||e.dataTransfer.setData("text/plain",u),t.dragging=new an(a,!e[cn])}},_e.dragend=function(t){window.setTimeout((function(){return t.dragging=null}),50)},Te.dragover=Te.dragenter=function(t,e){return e.preventDefault()},Te.drop=function(t,e){var n=t.dragging;if(t.dragging=null,e.dataTransfer){var o=t.posAtCoords(ze(e));if(o){var s=t.state.doc.resolve(o.pos);if(s){var a=n&&n.slice||fe(t,e.dataTransfer.getData(nn?"Text":"text/plain"),nn?null:e.dataTransfer.getData("text/html"),!1,s);if(a&&(e.preventDefault(),!t.someProp("handleDrop",(function(r){return r(t,e,a,n&&n.move)})))){var c=a?Object(i["f"])(t.state.doc,s.pos,a):s.pos;null==c&&(c=s.pos);var l=t.state.tr;n&&n.move&&l.deleteSelection();var u=l.mapping.map(c),f=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,p=l.doc;if(f?l.replaceRangeWith(u,u,a.content.firstChild):l.replaceRange(u,u,a),!l.doc.eq(p)){var d=l.doc.resolve(u);f&&r["NodeSelection"].isSelectable(a.content.firstChild)&&d.nodeAfter&&d.nodeAfter.sameMarkup(a.content.firstChild)?l.setSelection(new r["NodeSelection"](d)):l.setSelection(Qt(t,d,l.doc.resolve(l.mapping.map(c)))),t.focus(),t.dispatch(l.setMeta("uiEvent","drop"))}}}}}},_e.focus=function(t){t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0)},_e.blur=function(t){t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),t.domObserver.currentSelection.set({}),t.focused=!1)},_e.beforeinput=function(t,e){if(s.chrome&&s.android&&"deleteContentBackward"==e.inputType){var n=t.domChangeCount;setTimeout((function(){if(t.domChangeCount==n&&(t.dom.blur(),t.focus(),!t.someProp("handleKeyDown",(function(e){return e(t,S(8,"Backspace"))})))){var e=t.state.selection,r=e.$cursor;r&&r.pos>0&&t.dispatch(t.state.tr.delete(r.pos-1,r.pos).scrollIntoView())}}),50)}},Te)_e[ln]=Te[ln];function un(t,e){if(t==e)return!0;for(var n in t)if(t[n]!==e[n])return!1;for(var r in e)if(!(r in t))return!1;return!0}var fn=function(t,e){this.spec=e||gn,this.side=this.spec.side||0,this.toDOM=t};fn.prototype.map=function(t,e,n,r){var o=t.mapResult(e.from+r,this.side<0?-1:1),i=o.pos,s=o.deleted;return s?null:new hn(i-n,i-n,this)},fn.prototype.valid=function(){return!0},fn.prototype.eq=function(t){return this==t||t instanceof fn&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&un(this.spec,t.spec))};var pn=function(t,e){this.spec=e||gn,this.attrs=t};pn.prototype.map=function(t,e,n,r){var o=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,i=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new hn(o,i,this)},pn.prototype.valid=function(t,e){return e.from<e.to},pn.prototype.eq=function(t){return this==t||t instanceof pn&&un(this.attrs,t.attrs)&&un(this.spec,t.spec)},pn.is=function(t){return t.type instanceof pn};var dn=function(t,e){this.spec=e||gn,this.attrs=t};dn.prototype.map=function(t,e,n,r){var o=t.mapResult(e.from+r,1);if(o.deleted)return null;var i=t.mapResult(e.to+r,-1);return i.deleted||i.pos<=o.pos?null:new hn(o.pos-n,i.pos-n,this)},dn.prototype.valid=function(t,e){var n=t.content.findIndex(e.from),r=n.index,o=n.offset;return o==e.from&&o+t.child(r).nodeSize==e.to},dn.prototype.eq=function(t){return this==t||t instanceof dn&&un(this.attrs,t.attrs)&&un(this.spec,t.spec)};var hn=function(t,e,n){this.from=t,this.to=e,this.type=n},vn={spec:{configurable:!0}};hn.prototype.copy=function(t,e){return new hn(t,e,this.type)},hn.prototype.eq=function(t){return this.type.eq(t.type)&&this.from==t.from&&this.to==t.to},hn.prototype.map=function(t,e,n){return this.type.map(t,this,e,n)},hn.widget=function(t,e,n){return new hn(t,t,new fn(e,n))},hn.inline=function(t,e,n,r){return new hn(t,e,new pn(n,r))},hn.node=function(t,e,n,r){return new hn(t,e,new dn(n,r))},vn.spec.get=function(){return this.type.spec},Object.defineProperties(hn.prototype,vn);var mn=[],gn={},yn=function(t,e){this.local=t&&t.length?t:mn,this.children=e&&e.length?e:mn};yn.create=function(t,e){return e.length?Mn(e,t,0,gn):bn},yn.prototype.find=function(t,e,n){var r=[];return this.findInner(null==t?0:t,null==e?1e9:e,r,0,n),r},yn.prototype.findInner=function(t,e,n,r,o){for(var i=0;i<this.local.length;i++){var s=this.local[i];s.from<=e&&s.to>=t&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(var a=0;a<this.children.length;a+=3)if(this.children[a]<e&&this.children[a+1]>t){var c=this.children[a]+1;this.children[a+2].findInner(t-c,e-c,n,r+c,o)}},yn.prototype.map=function(t,e,n){return this==bn||0==t.maps.length?this:this.mapInner(t,e,0,0,n||gn)},yn.prototype.mapInner=function(t,e,n,r,o){for(var i,s=0;s<this.local.length;s++){var a=this.local[s].map(t,n,r);a&&a.type.valid(e,a)?(i||(i=[])).push(a):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?Sn(this.children,i,t,e,n,r,o):i?new yn(i.sort(Nn)):bn},yn.prototype.add=function(t,e){return e.length?this==bn?yn.create(t,e):this.addInner(t,e,0):this},yn.prototype.addInner=function(t,e,n){var r,o=this,i=0;t.forEach((function(t,s){var a,c=s+n;if(a=Cn(e,t,c)){r||(r=o.children.slice());while(i<r.length&&r[i]<s)i+=3;r[i]==s?r[i+2]=r[i+2].addInner(t,a,c+1):r.splice(i,0,s,s+t.nodeSize,Mn(a,t,c+1,gn)),i+=3}}));var s=xn(i?On(e):e,-n);return new yn(s.length?this.local.concat(s).sort(Nn):this.local,r||this.children)},yn.prototype.remove=function(t){return 0==t.length||this==bn?this:this.removeInner(t,0)},yn.prototype.removeInner=function(t,e){for(var n=this.children,r=this.local,o=0;o<n.length;o+=3){for(var i=void 0,s=n[o]+e,a=n[o+1]+e,c=0,l=void 0;c<t.length;c++)(l=t[c])&&l.from>s&&l.to<a&&(t[c]=null,(i||(i=[])).push(l));if(i){n==this.children&&(n=this.children.slice());var u=n[o+2].removeInner(i,s+1);u!=bn?n[o+2]=u:(n.splice(o,3),o-=3)}}if(r.length)for(var f=0,p=void 0;f<t.length;f++)if(p=t[f])for(var d=0;d<r.length;d++)r[d].type.eq(p.type)&&(r==this.local&&(r=this.local.slice()),r.splice(d--,1));return n==this.children&&r==this.local?this:r.length||n.length?new yn(r,n):bn},yn.prototype.forChild=function(t,e){if(this==bn)return this;if(e.isLeaf)return yn.empty;for(var n,r,o=0;o<this.children.length;o+=3)if(this.children[o]>=t){this.children[o]==t&&(n=this.children[o+2]);break}for(var i=t+1,s=i+e.content.size,a=0;a<this.local.length;a++){var c=this.local[a];if(c.from<s&&c.to>i&&c.type instanceof pn){var l=Math.max(i,c.from)-i,u=Math.min(s,c.to)-i;l<u&&(r||(r=[])).push(c.copy(l,u))}}if(r){var f=new yn(r.sort(Nn));return n?new wn([f,n]):f}return n||bn},yn.prototype.eq=function(t){if(this==t)return!0;if(!(t instanceof yn)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(var e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(var n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0},yn.prototype.locals=function(t){return An(this.localsInner(t))},yn.prototype.localsInner=function(t){if(this==bn)return mn;if(t.inlineContent||!this.local.some(pn.is))return this.local;for(var e=[],n=0;n<this.local.length;n++)this.local[n].type instanceof pn||e.push(this.local[n]);return e};var bn=new yn;yn.empty=bn,yn.removeOverlap=An;var wn=function(t){this.members=t};function Sn(t,e,n,r,o,i,s){for(var a=t.slice(),c=function(t,e,n,r){for(var s=0;s<a.length;s+=3){var c=a[s+1],l=void 0;-1==c||t>c+i||(e>=a[s]+i?a[s+1]=-1:(l=r-n-(e-t)+(i-o))&&(a[s]+=l,a[s+1]+=l))}},l=0;l<n.maps.length;l++)n.maps[l].forEach(c);for(var u=!1,f=0;f<a.length;f+=3)if(-1==a[f+1]){var p=n.map(a[f]+i),d=p-o;if(d<0||d>=r.content.size){u=!0;continue}var h=n.map(t[f+1]+i,-1),v=h-o,m=r.content.findIndex(d),g=m.index,y=m.offset,b=r.maybeChild(g);if(b&&y==d&&y+b.nodeSize==v){var w=a[f+2].mapInner(n,b,p+1,a[f]+i+1,s);w!=bn?(a[f]=d,a[f+1]=v,a[f+2]=w):(a[f+1]=-2,u=!0)}else u=!0}if(u){var S=kn(a,t,e||[],n,o,i,s),x=Mn(S,r,0,s);e=x.local;for(var k=0;k<a.length;k+=3)a[k+1]<0&&(a.splice(k,3),k-=3);for(var C=0,O=0;C<x.children.length;C+=3){var M=x.children[C];while(O<a.length&&a[O]<M)O+=3;a.splice(O,0,x.children[C],x.children[C+1],x.children[C+2])}}return new yn(e&&e.sort(Nn),a)}function xn(t,e){if(!e||!t.length)return t;for(var n=[],r=0;r<t.length;r++){var o=t[r];n.push(new hn(o.from+e,o.to+e,o.type))}return n}function kn(t,e,n,r,o,i,s){function a(t,e){for(var i=0;i<t.local.length;i++){var c=t.local[i].map(r,o,e);c?n.push(c):s.onRemove&&s.onRemove(t.local[i].spec)}for(var l=0;l<t.children.length;l+=3)a(t.children[l+2],t.children[l]+e+1)}for(var c=0;c<t.length;c+=3)-1==t[c+1]&&a(t[c+2],e[c]+i+1);return n}function Cn(t,e,n){if(e.isLeaf)return null;for(var r=n+e.nodeSize,o=null,i=0,s=void 0;i<t.length;i++)(s=t[i])&&s.from>n&&s.to<r&&((o||(o=[])).push(s),t[i]=null);return o}function On(t){for(var e=[],n=0;n<t.length;n++)null!=t[n]&&e.push(t[n]);return e}function Mn(t,e,n,r){var o=[],i=!1;e.forEach((function(e,s){var a=Cn(t,e,s+n);if(a){i=!0;var c=Mn(a,e,n+s+1,r);c!=bn&&o.push(s,s+e.nodeSize,c)}}));for(var s=xn(i?On(t):t,-n).sort(Nn),a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||o.length?new yn(s,o):bn}function Nn(t,e){return t.from-e.from||t.to-e.to}function An(t){for(var e=t,n=0;n<e.length-1;n++){var r=e[n];if(r.from!=r.to)for(var o=n+1;o<e.length;o++){var i=e[o];if(i.from!=r.from){i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),_n(e,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,r.to),_n(e,o+1,i.copy(r.to,i.to)))}}return e}function _n(t,e,n){while(e<t.length&&Nn(n,t[e])>0)e++;t.splice(e,0,n)}function Tn(t){var e=[];return t.someProp("decorations",(function(n){var r=n(t.state);r&&r!=bn&&e.push(r)})),t.cursorWrapper&&e.push(yn.create(t.state.doc,[t.cursorWrapper.deco])),wn.from(e)}wn.prototype.forChild=function(t,e){if(e.isLeaf)return yn.empty;for(var n=[],r=0;r<this.members.length;r++){var o=this.members[r].forChild(t,e);o!=bn&&(o instanceof wn?n=n.concat(o.members):n.push(o))}return wn.from(n)},wn.prototype.eq=function(t){if(!(t instanceof wn)||t.members.length!=this.members.length)return!1;for(var e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0},wn.prototype.locals=function(t){for(var e,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(t);if(o.length)if(e){n&&(e=e.slice(),n=!1);for(var i=0;i<o.length;i++)e.push(o[i])}else e=o}return e?An(n?e:e.sort(Nn)):mn},wn.from=function(t){switch(t.length){case 0:return bn;case 1:return t[0];default:return new wn(t)}};var Dn=function(t,e){this._props=e,this.state=e.state,this.dispatch=this.dispatch.bind(this),this._root=null,this.focused=!1,this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):t.apply?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=$n(this),this.markCursor=null,this.cursorWrapper=null,Rn(this),this.nodeViews=jn(this),this.docView=ct(this.state.doc,Pn(this),Tn(this),this.dom,this),this.lastSelectedViewDesc=null,this.dragging=null,De(this),this.pluginViews=[],this.updatePluginViews()},En={props:{configurable:!0},root:{configurable:!0}};function Pn(t){var e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",(function(n){if("function"==typeof n&&(n=n(t.state)),n)for(var r in n)"class"==r?e.class+=" "+n[r]:e[r]||"contenteditable"==r||"nodeName"==r||(e[r]=String(n[r]))})),[hn.node(0,t.state.doc.content.size,e)]}function Rn(t){var e=t.state.selection,n=e.$head,r=e.$anchor,o=e.visible;if(t.markCursor){var i=document.createElement("img");i.setAttribute("mark-placeholder","true"),t.cursorWrapper={dom:i,deco:hn.widget(n.pos,i,{raw:!0,marks:t.markCursor})}}else if(o||n.pos!=r.pos)t.cursorWrapper=null;else{var s;!t.cursorWrapper||t.cursorWrapper.dom.childNodes.length?(s=document.createElement("div"),s.style.position="absolute",s.style.left="-100000px"):t.cursorWrapper.deco.pos!=n.pos&&(s=t.cursorWrapper.dom),s&&(t.cursorWrapper={dom:s,deco:hn.widget(n.pos,s,{raw:!0})})}}function $n(t){return!t.someProp("editable",(function(e){return!1===e(t.state)}))}function In(t,e){var n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.node(n)!=e.$anchor.node(n)}function jn(t){var e={};return t.someProp("nodeViews",(function(t){for(var n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n])})),e}function zn(t,e){var n=0,r=0;for(var o in t){if(t[o]!=e[o])return!0;n++}for(var i in e)r++;return n!=r}En.props.get=function(){if(this._props.state!=this.state){var t=this._props;for(var e in this._props={},t)this._props[e]=t[e];this._props.state=this.state}return this._props},Dn.prototype.update=function(t){t.handleDOMEvents!=this._props.handleDOMEvents&&Re(this),this._props=t,this.updateStateInner(t.state,!0)},Dn.prototype.setProps=function(t){var e={};for(var n in this._props)e[n]=this._props[n];for(var r in e.state=this.state,t)e[r]=t[r];this.update(e)},Dn.prototype.updateState=function(t){this.updateStateInner(t,this.state.plugins!=t.plugins)},Dn.prototype.updateStateInner=function(t,e){var n=this,o=this.state,i=!1;if(this.state=t,e){var a=jn(this);zn(a,this.nodeViews)&&(this.nodeViews=a,i=!0),Re(this)}this.editable=$n(this),Rn(this);var c=Tn(this),l=Pn(this),u=e?"reset":t.scrollToSelection>o.scrollToSelection?"to selection":"preserve",f=i||!this.docView.matchesNode(t.doc,l,c),p=f||!t.selection.eq(o.selection),d="preserve"==u&&p&&null==this.dom.style.overflowAnchor&&O(this);if(p){this.domObserver.stop();var h=f&&(s.ie||s.chrome)&&!o.selection.empty&&!t.selection.empty&&In(o.selection,t.selection);f&&(!i&&this.docView.update(t.doc,l,c,this)||(this.docView.destroy(),this.docView=ct(t.doc,l,c,this.dom,this))),h||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&ee(this))?Kt(this,h):(Xt(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(o),"reset"==u)this.dom.scrollTop=0;else if("to selection"==u){var v=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(t){return t(n)}))||(t.selection instanceof r["NodeSelection"]?C(this,this.docView.domAfterPos(t.selection.from).getBoundingClientRect(),v):C(this,this.coordsAtPos(t.selection.head),v))}else d&&N(d)},Dn.prototype.destroyPluginViews=function(){var t;while(t=this.pluginViews.pop())t.destroy&&t.destroy()},Dn.prototype.updatePluginViews=function(t){if(t&&t.plugins==this.state.plugins)for(var e=0;e<this.pluginViews.length;e++){var n=this.pluginViews[e];n.update&&n.update(this,t)}else{this.destroyPluginViews();for(var r=0;r<this.state.plugins.length;r++){var o=this.state.plugins[r];o.spec.view&&this.pluginViews.push(o.spec.view(this))}}},Dn.prototype.someProp=function(t,e){var n,r=this._props&&this._props[t];if(null!=r&&(n=e?e(r):r))return n;var o=this.state.plugins;if(o)for(var i=0;i<o.length;i++){var s=o[i].props[t];if(null!=s&&(n=e?e(s):s))return n}},Dn.prototype.hasFocus=function(){return this.root.activeElement==this.dom},Dn.prototype.focus=function(){this.domObserver.stop(),this.editable&&T(this.dom),Kt(this),this.domObserver.start()},En.root.get=function(){var t=this._root;if(null==t)for(var e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=function(){return document.getSelection()}),this._root=e;return t||document},Dn.prototype.posAtCoords=function(t){return z(this,t)},Dn.prototype.coordsAtPos=function(t){return V(this,t)},Dn.prototype.domAtPos=function(t){return this.docView.domFromPos(t)},Dn.prototype.nodeDOM=function(t){var e=this.docView.descAt(t);return e?e.nodeDOM:null},Dn.prototype.posAtDOM=function(t,e,n){void 0===n&&(n=-1);var r=this.docView.posFromDOM(t,e,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r},Dn.prototype.endOfTextblock=function(t,e){return X(this,e||this.state,t)},Dn.prototype.destroy=function(){this.docView&&(Pe(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Tn(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},Dn.prototype.dispatchEvent=function(t){return je(this,t)},Dn.prototype.dispatch=function(t){var e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))},Object.defineProperties(Dn.prototype,En)},5899:function(t,e){t.exports="\t\n\v\f\r    â€â€‚         âŸã€€\u2028\u2029\ufeff"},"58a8":function(t,e,n){var r=n("1d80"),o=n("5899"),i="["+o+"]",s=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),c=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(s,"")),2&t&&(n=n.replace(a,"")),n}};t.exports={start:c(1),end:c(2),trim:c(3)}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6062:function(t,e,n){"use strict";var r=n("6d61"),o=n("6566");t.exports=r("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),o)},"60a3":function(t,e,n){"use strict";var r=n("2b0e"),o="undefined"!==typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys; +/** + * vue-class-component v7.1.0 + * (c) 2015-present Evan You + * @license MIT + */function i(t,e){s(t,e),Object.getOwnPropertyNames(e.prototype).forEach((function(n){s(t.prototype,e.prototype,n)})),Object.getOwnPropertyNames(e).forEach((function(n){s(t,e,n)}))}function s(t,e,n){var r=n?Reflect.getOwnMetadataKeys(e,n):Reflect.getOwnMetadataKeys(e);r.forEach((function(r){var o=n?Reflect.getOwnMetadata(r,e,n):Reflect.getOwnMetadata(r,e);n?Reflect.defineMetadata(r,o,t,n):Reflect.defineMetadata(r,o,t)}))}var a={__proto__:[]},c=a instanceof Array;function l(t){return function(e,n,r){var o="function"===typeof e?e:e.constructor;o.__decorators__||(o.__decorators__=[]),"number"!==typeof r&&(r=void 0),o.__decorators__.push((function(e){return t(e,n,r)}))}}function u(t){var e=typeof t;return null==t||"object"!==e&&"function"!==e}function f(t,e){var n=e.prototype._init;e.prototype._init=function(){var e=this,n=Object.getOwnPropertyNames(t);if(t.$options.props)for(var r in t.$options.props)t.hasOwnProperty(r)||n.push(r);n.forEach((function(n){"_"!==n.charAt(0)&&Object.defineProperty(e,n,{get:function(){return t[n]},set:function(e){t[n]=e},configurable:!0})}))};var r=new e;e.prototype._init=n;var o={};return Object.keys(r).forEach((function(t){void 0!==r[t]&&(o[t]=r[t])})),o}var p=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function d(t,e){void 0===e&&(e={}),e.name=e.name||t._componentTag||t.name;var n=t.prototype;Object.getOwnPropertyNames(n).forEach((function(t){if("constructor"!==t)if(p.indexOf(t)>-1)e[t]=n[t];else{var r=Object.getOwnPropertyDescriptor(n,t);void 0!==r.value?"function"===typeof r.value?(e.methods||(e.methods={}))[t]=r.value:(e.mixins||(e.mixins=[])).push({data:function(){var e;return e={},e[t]=r.value,e}}):(r.get||r.set)&&((e.computed||(e.computed={}))[t]={get:r.get,set:r.set})}})),(e.mixins||(e.mixins=[])).push({data:function(){return f(this,t)}});var s=t.__decorators__;s&&(s.forEach((function(t){return t(e)})),delete t.__decorators__);var a=Object.getPrototypeOf(t.prototype),c=a instanceof r["a"]?a.constructor:r["a"],l=c.extend(e);return v(l,t,c),o&&i(l,t),l}var h={prototype:!0,arguments:!0,callee:!0,caller:!0};function v(t,e,n){Object.getOwnPropertyNames(e).forEach((function(r){if(!h[r]){var o=Object.getOwnPropertyDescriptor(t,r);if(!o||o.configurable){var i=Object.getOwnPropertyDescriptor(e,r);if(!c){if("cid"===r)return;var s=Object.getOwnPropertyDescriptor(n,r);if(!u(i.value)&&s&&s.value===i.value)return}0,Object.defineProperty(t,r,i)}}}))}function m(t){return"function"===typeof t?d(t):function(e){return d(e,t)}}m.registerHooks=function(t){p.push.apply(p,t)};var g=m;n.d(e,"b",(function(){return w})),n.d(e,"d",(function(){return S})),n.d(e,"a",(function(){return g})),n.d(e,"c",(function(){return r["a"]}));var y="undefined"!==typeof Reflect&&"undefined"!==typeof Reflect.getMetadata;function b(t,e,n){y&&(Array.isArray(t)||"function"===typeof t||"undefined"!==typeof t.type||(t.type=Reflect.getMetadata("design:type",e,n)))}function w(t){return void 0===t&&(t={}),function(e,n){b(t,e,n),l((function(e,n){(e.props||(e.props={}))[n]=t}))(e,n)}}function S(t,e){void 0===e&&(e={});var n=e.deep,r=void 0!==n&&n,o=e.immediate,i=void 0!==o&&o;return l((function(e,n){"object"!==typeof e.watch&&(e.watch=Object.create(null));var o=e.watch;"object"!==typeof o[t]||Array.isArray(o[t])?"undefined"===typeof o[t]&&(o[t]=[]):o[t]=[o[t]],o[t].push({handler:n,deep:r,immediate:i})}))}},"60ae":function(t,e,n){var r,o,i=n("da84"),s=n("b39a"),a=i.process,c=a&&a.versions,l=c&&c.v8;l?(r=l.split("."),o=r[0]+r[1]):s&&(r=s.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/),r&&(o=r[1]))),t.exports=o&&+o},"60da":function(t,e,n){"use strict";var r=n("83ab"),o=n("d039"),i=n("df75"),s=n("7418"),a=n("d1e7"),c=n("7b0b"),l=n("44ad"),u=Object.assign,f=Object.defineProperty;t.exports=!u||o((function(){if(r&&1!==u({b:1},u(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||i(u({},e)).join("")!=o}))?function(t,e){var n=c(t),o=arguments.length,u=1,f=s.f,p=a.f;while(o>u){var d,h=l(arguments[u++]),v=f?i(h).concat(f(h)):i(h),m=v.length,g=0;while(m>g)d=v[g++],r&&!p.call(h,d)||(n[d]=h[d])}return n}:u},6547:function(t,e,n){var r=n("a691"),o=n("1d80"),i=function(t){return function(e,n){var i,s,a=String(o(e)),c=r(n),l=a.length;return c<0||c>=l?t?"":void 0:(i=a.charCodeAt(c),i<55296||i>56319||c+1===l||(s=a.charCodeAt(c+1))<56320||s>57343?t?a.charAt(c):i:t?a.slice(c,c+2):s-56320+(i-55296<<10)+65536)}};t.exports={codeAt:i(!1),charAt:i(!0)}},6566:function(t,e,n){"use strict";var r=n("9bf2").f,o=n("7c73"),i=n("e2cc"),s=n("f8c2"),a=n("19aa"),c=n("2266"),l=n("7dd0"),u=n("2626"),f=n("83ab"),p=n("f183").fastKey,d=n("69f3"),h=d.set,v=d.getterFor;t.exports={getConstructor:function(t,e,n,l){var u=t((function(t,r){a(t,u,e),h(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),f||(t.size=0),void 0!=r&&c(r,t[l],t,n)})),d=v(e),m=function(t,e,n){var r,o,i=d(t),s=g(t,e);return s?s.value=n:(i.last=s={index:o=p(e,!0),key:e,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=s),r&&(r.next=s),f?i.size++:t.size++,"F"!==o&&(i.index[o]=s)),t},g=function(t,e){var n,r=d(t),o=p(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==e)return n};return i(u.prototype,{clear:function(){var t=this,e=d(t),n=e.index,r=e.first;while(r)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete n[r.index],r=r.next;e.first=e.last=void 0,f?e.size=0:t.size=0},delete:function(t){var e=this,n=d(e),r=g(e,t);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first==r&&(n.first=o),n.last==r&&(n.last=i),f?n.size--:e.size--}return!!r},forEach:function(t){var e,n=d(this),r=s(t,arguments.length>1?arguments[1]:void 0,3);while(e=e?e.next:n.first){r(e.value,e.key,this);while(e&&e.removed)e=e.previous}},has:function(t){return!!g(this,t)}}),i(u.prototype,n?{get:function(t){var e=g(this,t);return e&&e.value},set:function(t,e){return m(this,0===t?0:t,e)}}:{add:function(t){return m(this,t=0===t?0:t,t)}}),f&&r(u.prototype,"size",{get:function(){return d(this).size}}),u},setStrong:function(t,e,n){var r=e+" Iterator",o=v(e),i=v(r);l(t,e,(function(t,e){h(this,{type:r,target:t,state:o(t),kind:e,last:void 0})}),(function(){var t=i(this),e=t.kind,n=t.last;while(n&&n.removed)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),u(e)}}},"65f0":function(t,e,n){var r=n("861d"),o=n("e8b5"),i=n("b622"),s=i("species");t.exports=function(t,e){var n;return o(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!o(n.prototype)?r(n)&&(n=n[s],null===n&&(n=void 0)):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},"69f3":function(t,e,n){var r,o,i,s=n("7f9a"),a=n("da84"),c=n("861d"),l=n("9112"),u=n("5135"),f=n("f772"),p=n("d012"),d=a.WeakMap,h=function(t){return i(t)?o(t):r(t,{})},v=function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(s){var m=new d,g=m.get,y=m.has,b=m.set;r=function(t,e){return b.call(m,t,e),e},o=function(t){return g.call(m,t)||{}},i=function(t){return y.call(m,t)}}else{var w=f("state");p[w]=!0,r=function(t,e){return l(t,w,e),e},o=function(t){return u(t,w)?t[w]:{}},i=function(t){return u(t,w)}}t.exports={set:r,get:o,has:i,enforce:h,getterFor:v}},"6d61":function(t,e,n){"use strict";var r=n("23e7"),o=n("da84"),i=n("94ca"),s=n("6eeb"),a=n("f183"),c=n("2266"),l=n("19aa"),u=n("861d"),f=n("d039"),p=n("1c7e"),d=n("d44e"),h=n("7156");t.exports=function(t,e,n){var v=-1!==t.indexOf("Map"),m=-1!==t.indexOf("Weak"),g=v?"set":"add",y=o[t],b=y&&y.prototype,w=y,S={},x=function(t){var e=b[t];s(b,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(m&&!u(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return m&&!u(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(m&&!u(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})};if(i(t,"function"!=typeof y||!(m||b.forEach&&!f((function(){(new y).entries().next()})))))w=n.getConstructor(e,t,v,g),a.REQUIRED=!0;else if(i(t,!0)){var k=new w,C=k[g](m?{}:-0,1)!=k,O=f((function(){k.has(1)})),M=p((function(t){new y(t)})),N=!m&&f((function(){var t=new y,e=5;while(e--)t[g](e,e);return!t.has(-0)}));M||(w=e((function(e,n){l(e,w,t);var r=h(new y,e,w);return void 0!=n&&c(n,r[g],r,v),r})),w.prototype=b,b.constructor=w),(O||N)&&(x("delete"),x("has"),v&&x("get")),(N||C)&&x(g),m&&b.clear&&delete b.clear}return S[t]=w,r({global:!0,forced:w!=y},S),d(w,t),m||n.setStrong(w,t,v),w}},"6eeb":function(t,e,n){var r=n("da84"),o=n("9112"),i=n("5135"),s=n("ce4e"),a=n("8925"),c=n("69f3"),l=c.get,u=c.enforce,f=String(String).split("String");(t.exports=function(t,e,n,a){var c=!!a&&!!a.unsafe,l=!!a&&!!a.enumerable,p=!!a&&!!a.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),u(n).source=f.join("string"==typeof e?e:"")),t!==r?(c?!p&&t[e]&&(l=!0):delete t[e],l?t[e]=n:o(t,e,n)):l?t[e]=n:s(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||a(this)}))},"6f53":function(t,e,n){var r=n("83ab"),o=n("df75"),i=n("fc6a"),s=n("d1e7").f,a=function(t){return function(e){var n,a=i(e),c=o(a),l=c.length,u=0,f=[];while(l>u)n=c[u++],r&&!s.call(a,n)||f.push(t?[n,a[n]]:a[n]);return f}};t.exports={entries:a(!0),values:a(!1)}},7156:function(t,e,n){var r=n("861d"),o=n("d2bb");t.exports=function(t,e,n){var i,s;return o&&"function"==typeof(i=e.constructor)&&i!==n&&r(s=i.prototype)&&s!==n.prototype&&o(t,s),t}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},"746f":function(t,e,n){var r=n("428f"),o=n("5135"),i=n("c032"),s=n("9bf2").f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||s(e,t,{value:i.f(t)})}},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,n){var r=n("1d80");t.exports=function(t){return Object(r(t))}},"7c73":function(t,e,n){var r=n("825a"),o=n("37e8"),i=n("7839"),s=n("d012"),a=n("1be4"),c=n("cc12"),l=n("f772"),u=l("IE_PROTO"),f="prototype",p=function(){},d=function(){var t,e=c("iframe"),n=i.length,r="<",o="script",s=">",l="java"+o+":";e.style.display="none",a.appendChild(e),e.src=String(l),t=e.contentWindow.document,t.open(),t.write(r+o+s+"document.F=Object"+r+"/"+o+s),t.close(),d=t.F;while(n--)delete d[f][i[n]];return d()};t.exports=Object.create||function(t,e){var n;return null!==t?(p[f]=r(t),n=new p,p[f]=null,n[u]=t):n=d(),void 0===e?n:o(n,e)},s[u]=!0},"7dd0":function(t,e,n){"use strict";var r=n("23e7"),o=n("9ed3"),i=n("e163"),s=n("d2bb"),a=n("d44e"),c=n("9112"),l=n("6eeb"),u=n("b622"),f=n("c430"),p=n("3f8c"),d=n("ae93"),h=d.IteratorPrototype,v=d.BUGGY_SAFARI_ITERATORS,m=u("iterator"),g="keys",y="values",b="entries",w=function(){return this};t.exports=function(t,e,n,u,d,S,x){o(n,e,u);var k,C,O,M=function(t){if(t===d&&D)return D;if(!v&&t in _)return _[t];switch(t){case g:return function(){return new n(this,t)};case y:return function(){return new n(this,t)};case b:return function(){return new n(this,t)}}return function(){return new n(this)}},N=e+" Iterator",A=!1,_=t.prototype,T=_[m]||_["@@iterator"]||d&&_[d],D=!v&&T||M(d),E="Array"==e&&_.entries||T;if(E&&(k=i(E.call(new t)),h!==Object.prototype&&k.next&&(f||i(k)===h||(s?s(k,h):"function"!=typeof k[m]&&c(k,m,w)),a(k,N,!0,!0),f&&(p[N]=w))),d==y&&T&&T.name!==y&&(A=!0,D=function(){return T.call(this)}),f&&!x||_[m]===D||c(_,m,D),p[e]=D,d)if(C={values:M(y),keys:S?D:M(g),entries:M(b)},x)for(O in C)!v&&!A&&O in _||l(_,O,C[O]);else r({target:e,proto:!0,forced:v||A},C);return C}},"7e84":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));n("3410"),n("131a");function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}},"7f06":function(t,e,n){"use strict";for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},o=r,i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:";",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},s="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),a="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),c="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),l="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),u="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),f=s&&(l||+s[1]<57)||c&&l,p=0;p<10;p++)r[48+p]=r[96+p]=String(p);for(p=1;p<=24;p++)r[p+111]="F"+p;for(p=65;p<=90;p++)r[p]=String.fromCharCode(p+32),i[p]=String.fromCharCode(p);for(var d in r)i.hasOwnProperty(d)||(i[d]=r[d]);var h=function(t){var e=f&&(t.ctrlKey||t.altKey||t.metaKey)||(a||u)&&t.shiftKey&&t.key&&1==t.key.length,n=!e&&t.key||(t.shiftKey?i:r)[t.keyCode]||t.key||"Unidentified";return"Esc"==n&&(n="Escape"),"Del"==n&&(n="Delete"),"Left"==n&&(n="ArrowLeft"),"Up"==n&&(n="ArrowUp"),"Right"==n&&(n="ArrowRight"),"Down"==n&&(n="ArrowDown"),n},v=n("5313");n.d(e,"a",(function(){return S})),n.d(e,"b",(function(){return w}));var m="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);function g(t){var e,n,r,o,i=t.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(var a=0;a<i.length-1;a++){var c=i[a];if(/^(cmd|meta|m)$/i.test(c))o=!0;else if(/^a(lt)?$/i.test(c))e=!0;else if(/^(c|ctrl|control)$/i.test(c))n=!0;else if(/^s(hift)?$/i.test(c))r=!0;else{if(!/^mod$/i.test(c))throw new Error("Unrecognized modifier name: "+c);m?o=!0:n=!0}}return e&&(s="Alt-"+s),n&&(s="Ctrl-"+s),o&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function y(t){var e=Object.create(null);for(var n in t)e[g(n)]=t[n];return e}function b(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==n&&e.shiftKey&&(t="Shift-"+t),t}function w(t){return new v["Plugin"]({props:{handleKeyDown:S(t)}})}function S(t){var e=y(t);return function(t,n){var r,i=h(n),s=1==i.length&&" "!=i,a=e[b(i,n,!s)];if(a&&a(t.state,t.dispatch,t))return!0;if(s&&(n.shiftKey||n.altKey||n.metaKey)&&(r=o[n.keyCode])&&r!=i){var c=e[b(r,n,!0)];if(c&&c(t.state,t.dispatch,t))return!0}else if(s&&n.shiftKey){var l=e[b(i,n,!0)];if(l&&l(t.state,t.dispatch,t))return!0}return!1}}},"7f9a":function(t,e,n){var r=n("da84"),o=n("8925"),i=r.WeakMap;t.exports="function"===typeof i&&/native code/.test(o(i))},"825a":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},"83ab":function(t,e,n){var r=n("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},8418:function(t,e,n){"use strict";var r=n("c04e"),o=n("9bf2"),i=n("5c6c");t.exports=function(t,e,n){var s=r(e);s in t?o.f(t,s,i(0,n)):t[s]=n}},"861d":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},8925:function(t,e,n){var r=n("c6cd"),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return o.call(t)}),t.exports=r.inspectSource},"8aa5":function(t,e,n){"use strict";var r=n("6547").charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"90e3":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},9112:function(t,e,n){var r=n("83ab"),o=n("9bf2"),i=n("5c6c");t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9263:function(t,e,n){"use strict";var r=n("ad6d"),o=RegExp.prototype.exec,i=String.prototype.replace,s=o,a=function(){var t=/a/,e=/b*/g;return o.call(t,"a"),o.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),c=void 0!==/()??/.exec("")[1],l=a||c;l&&(s=function(t){var e,n,s,l,u=this;return c&&(n=new RegExp("^"+u.source+"$(?!\\s)",r.call(u))),a&&(e=u.lastIndex),s=o.call(u,t),a&&s&&(u.lastIndex=u.global?s.index+s[0].length:e),c&&s&&s.length>1&&i.call(s[0],n,(function(){for(l=1;l<arguments.length-2;l++)void 0===arguments[l]&&(s[l]=void 0)})),s}),t.exports=s},"94ca":function(t,e,n){var r=n("d039"),o=/#|\.prototype\./,i=function(t,e){var n=a[s(t)];return n==l||n!=c&&("function"==typeof e?r(e):!!e)},s=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},a=i.data={},c=i.NATIVE="N",l=i.POLYFILL="P";t.exports=i},"986d":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("5313"),o=n("304a"),i=n("55be"),s=function(t){return function(e){var n=B(t)(e.selection);return n?k(n.pos)(e):e}},a=function(t,e){return function(n){Array.isArray(t)||(t=[t]);for(var r=0,o=t.length;r<o;r++){var i=B(t[r])(n.selection);if(i){var s=S(i.pos,e)(n);if(s!==n)return s}}return n}},c=function(t){if(y(t.selection)){var e=t.selection.$from.pos,n=t.selection.$to.pos;return w(t.delete(e,n))}return t},l=function(t){return function(e){if(y(e.selection)){var n=e.selection,i=n.$from,s=n.$to;if(t instanceof o.Fragment&&i.parent.canReplace(i.index(),i.indexAfter(),t)||i.parent.canReplaceWith(i.index(),i.indexAfter(),t.type))return w(e.replaceWith(i.pos,s.pos,t).setSelection(new r.NodeSelection(e.doc.resolve(i.pos))))}return e}},u=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(n){var o=r.Selection.findFrom(n.doc.resolve(t),e,!0);return o?n.setSelection(o):n}},f=function(t){return t.type&&t.type.spec.selectable},p=function(t){return f(t)&&t.type.isLeaf},d=function(t,e,n){return p(t)?n.setSelection(new r.NodeSelection(n.doc.resolve(e))):u(e)(n)},h=function(t,e,n){return function(r){var o="number"===typeof e,i=r.selection.$from,s=o?r.doc.resolve(e):y(r.selection)?r.doc.resolve(i.pos+1):i,c=s.parent;if(y(r.selection)&&n){var u=r;if(r=l(t)(r),u!==r)return r}if(M(c)){var p=r;if(r=a(c.type,t)(r),p!==r){var h=f(t)?s.before(s.depth):s.pos;return d(t,h,r)}}if(O(s,t)){r.insert(s.pos,t);var v=o?s.pos:f(t)?r.selection.$anchor.pos-1:r.selection.$anchor.pos;return w(d(t,v,r))}for(var m=s.depth;m>0;m--){var g=s.after(m),b=r.doc.resolve(g);if(O(b,t))return r.insert(g,t),w(d(t,g,r))}return r}},v=function(t,e,n,r){return function(o){var i=B(t)(o.selection);return i?w(o.setNodeMarkup(i.pos,e,Object.assign({},i.node.attrs,n),r)):o}},m=function(t){return function(e){if(!y(e.selection)){var n=B(t)(e.selection);if(n)return w(e.setSelection(r.NodeSelection.create(e.doc,n.pos)))}return e}},g=function(t){var e=H(t.selection);return"number"===typeof e?k(e)(t):t},y=function(t){return t instanceof r.NodeSelection},b=function(t,e){return Array.isArray(t)&&t.indexOf(e.type)>-1||e.type===t},w=function(t){return Object.assign(Object.create(t),t).setTime(Date.now())},S=function(t,e){return function(n){var r=n.doc.nodeAt(t),o=n.doc.resolve(t);if(x(o,e)){n=n.replaceWith(t,t+r.nodeSize,e);var i=n.selection.$from.pos-1;return n=u(Math.max(i,0),-1)(n),n=u(n.selection.$from.start())(n),w(n)}return n}},x=function(t,e){var n=t.node(t.depth);return n&&n.type.validContent(e instanceof o.Fragment?e:o.Fragment.from(e))},k=function(t){return function(e){var n=e.doc.nodeAt(t);return w(e.delete(t,t+n.nodeSize))}},C=function(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;var e={};return Object.keys(t.nodes).forEach((function(n){var r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)})),t.cached.tableNodeTypes=e,e},O=function(t,e){var n=t.index();return e instanceof o.Fragment?t.parent.canReplace(n,n,e):e instanceof o.Node&&t.parent.canReplaceWith(n,n,e.type)},M=function(t){return!t||"paragraph"===t.type.name&&2===t.nodeSize},N=function(t){var e=function(t){return t.type.spec.tableRole&&/table/i.test(t.type.spec.tableRole)};return z(t,e)},A=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e?t.createChecked(null,e):t.createAndFill()},_=function(t){return function(e){for(var n=i.TableMap.get(e.$anchorCell.node(-1)),r=e.$anchorCell.start(-1),o=n.cellsInRect(t),s=n.cellsInRect(n.rectBetween(e.$anchorCell.pos-r,e.$headCell.pos-r)),a=0,c=o.length;a<c;a++)if(-1===s.indexOf(o[a]))return!1;return!0}},T=function(t){return t[0].map((function(e,n){return t.map((function(t){return t[n]}))}))},D=function(t){for(var e=i.TableMap.get(t),n=[],r=0;r<e.height;r++){for(var o=[],s={},a=0;a<e.width;a++){var c=e.map[r*e.width+a],l=t.nodeAt(c),u=e.findCell(c);s[c]||u.top!==r?o.push(null):(s[c]=!0,o.push(l))}n.push(o)}return n},E=function(t,e){for(var n=[],r=i.TableMap.get(t),o=0;o<r.height;o++){for(var s=t.child(o),a=[],c=0;c<r.width;c++)if(e[o][c]){var l=r.map[o*r.width+c],u=e[o][c],f=t.nodeAt(l),p=f.type.createChecked(Object.assign({},u.attrs),u.content,u.marks);a.push(p)}n.push(s.type.createChecked(s.attrs,a,s.marks))}var d=t.type.createChecked(t.attrs,n,t.marks);return d},P=function(t,e,n,r){var o=T(D(t.node));return o=$(o,e,n,r),o=T(o),E(t.node,o)},R=function(t,e,n,r){var o=D(t.node);return o=$(o,e,n,r),E(t.node,o)},$=function(t,e,n,r){var o=e[0]>n[0]?-1:1,i=t.splice(e[0],e.length),s=i.length%2===0?1:0,a=void 0;return a=-1===r&&1===o?n[0]-1:1===r&&-1===o?n[n.length-1]-s+1:-1===o?n[0]:n[n.length-1]-s,t.splice.apply(t,[a,0].concat(i)),t},I=function(t,e,n,r){var o=t>e?-1:1,i="Target position is invalid, you can't move the "+r+" "+t+" to "+e+", the target can't be split. You could use tryToFit option.";if(1===o){if(-1!==n.slice(0,n.length-1).indexOf(e))throw new Error(i)}else if(-1!==n.slice(1).indexOf(e))throw new Error(i);return!0},j=function(t){return function(e){var n=e.$from;return z(n,t)}},z=function(t,e){for(var n=t.depth;n>0;n--){var r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}},F=function(t,e){return function(n){var r=j(t)(n);if(r)return J(r.pos,e)}},V=function(t){return function(e){return!!j(t)(e)}},B=function(t){return function(e){return j((function(e){return b(t,e)}))(e)}},L=function(t,e){return z(t,(function(t){return b(e,t)}))},W=function(t){return function(e){return V((function(e){return b(t,e)}))(e)}},q=function(t,e){return function(n){return F((function(e){return b(t,e)}),e)(n)}},K=function(t){return function(e){if(y(e)){var n=e.node,r=e.$from;if(b(t,n))return{node:n,pos:r.pos,depth:r.depth}}}},H=function(t){var e=t.$from.nodeBefore,n=r.Selection.findFrom(t.$from,-1);if(n&&e){var o=B(e.type)(n);return o?o.pos:n.$from.pos}},J=function(t,e){var n=e(t),r=n.node.childNodes[n.offset];return n.node.nodeType===Node.TEXT_NODE?n.node.parentNode:r&&r.nodeType!==Node.TEXT_NODE?r:n.node},U=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw new Error('Invalid "node" parameter');var n=[];return t.descendants((function(t,r){if(n.push({node:t,pos:r}),!e)return!1})),n},G=function(t,e,n){if(!t)throw new Error('Invalid "node" parameter');if(!e)throw new Error('Invalid "predicate" parameter');return U(t,n).filter((function(t){return e(t.node)}))},X=function(t,e){return G(t,(function(t){return t.isText}),e)},Y=function(t,e){return G(t,(function(t){return t.isInline}),e)},Q=function(t,e){return G(t,(function(t){return t.isBlock}),e)},Z=function(t,e,n){return G(t,(function(t){return!!e(t.attrs)}),n)},tt=function(t,e,n){return G(t,(function(t){return t.type===e}),n)},et=function(t,e,n){return G(t,(function(t){return e.isInSet(t.marks)}),n)},nt=function(t,e){return!!tt(t,e).length};function rt(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var ot=function(t){return j((function(t){return t.type.spec.tableRole&&"table"===t.type.spec.tableRole}))(t)},it=function(t){return t instanceof i.CellSelection},st=function(t){if(it(t)){var e=t.$anchorCell.start(-1),n=i.TableMap.get(t.$anchorCell.node(-1));return n.rectBetween(t.$anchorCell.pos-e,t.$headCell.pos-e)}},at=function(t){return function(e){if(it(e)){var n=i.TableMap.get(e.$anchorCell.node(-1));return _({left:t,right:t+1,top:0,bottom:n.height})(e)}return!1}},ct=function(t){return function(e){if(it(e)){var n=i.TableMap.get(e.$anchorCell.node(-1));return _({left:0,right:n.width,top:t,bottom:t+1})(e)}return!1}},lt=function(t){if(it(t)){var e=i.TableMap.get(t.$anchorCell.node(-1));return _({left:0,right:e.width,top:0,bottom:e.height})(t)}return!1},ut=function(t){return function(e){var n=ot(e);if(n){var r=i.TableMap.get(n.node),o=Array.isArray(t)?t:Array.from([t]);return o.reduce((function(t,e){if(e>=0&&e<=r.width-1){var o=r.cellsInRect({left:e,right:e+1,top:0,bottom:r.height});return t.concat(o.map((function(t){var e=n.node.nodeAt(t),r=t+n.start;return{pos:r,start:r+1,node:e}})))}}),[])}}},ft=function(t){return function(e){var n=ot(e);if(n){var r=i.TableMap.get(n.node),o=Array.isArray(t)?t:Array.from([t]);return o.reduce((function(t,e){if(e>=0&&e<=r.height-1){var o=r.cellsInRect({left:0,right:r.width,top:e,bottom:e+1});return t.concat(o.map((function(t){var e=n.node.nodeAt(t),r=t+n.start;return{pos:r,start:r+1,node:e}})))}}),[])}}},pt=function(t){var e=ot(t);if(e){var n=i.TableMap.get(e.node),r=n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height});return r.map((function(t){var n=e.node.nodeAt(t),r=t+e.start;return{pos:r,start:r+1,node:n}}))}},dt=function(t){return function(e,n){return function(r){var o=ot(r.selection),s="row"===t;if(o){var a=i.TableMap.get(o.node);if(e>=0&&e<(s?a.height:a.width)){var c=s?0:e,l=s?e:0,u=s?a.width:e+1,f=s?e+1:a.height;if(n){var p=Rt(r.selection.$from);if(!p)return r;var d=a.findCell(p.pos-o.start);s?(l=Math.min(l,d.top),f=Math.max(f,d.bottom)):(c=Math.min(c,d.left),u=Math.max(u,d.right))}var h=a.cellsInRect({left:c,top:l,right:s?u:c+1,bottom:s?l+1:f}),v=f-l===1?h:a.cellsInRect({left:s?c:u-1,top:s?f-1:l,right:u,bottom:f}),m=o.start+h[0],g=o.start+v[v.length-1],y=r.doc.resolve(m),b=r.doc.resolve(g);return w(r.setSelection(new i.CellSelection(b,y)))}}return r}}},ht=dt("column"),vt=dt("row"),mt=function(t){var e=ot(t.selection);if(e){var n=i.TableMap.get(e.node),r=n.map;if(r&&r.length){var o=e.start+r[0],s=e.start+r[r.length-1],a=t.doc.resolve(o),c=t.doc.resolve(s);return w(t.setSelection(new i.CellSelection(c,a)))}}return t},gt=function(t,e){return function(n){if(t){var r=C(e).cell.createAndFill(),o=r.content;if(!t.node.content.eq(o))return n.replaceWith(t.pos+1,t.pos+t.node.nodeSize,o),w(n)}return n}},yt=function(t){return function(e){var n=ot(e.selection);if(n){var r=i.TableMap.get(n.node);if(t>=0&&t<=r.width)return w(i.addColumn(e,{map:r,tableStart:n.start,table:n.node},t))}return e}},bt=function(t,e,n){return function(r){var o={tryToFit:!1,direction:0},i=Object.assign(o,n),s=ot(r.selection);if(!s)return r;var a=zt(t)(r),c=a.indexes,l=zt(e)(r),u=l.indexes;if(c.indexOf(e)>-1)return r;!i.tryToFit&&u.length>1&&I(t,e,u,"row");var f=R(s,c,u,i.direction);return w(r).replaceWith(s.pos,s.pos+s.node.nodeSize,f)}},wt=function(t,e,n){return function(r){var o={tryToFit:!1,direction:0},i=Object.assign(o,n),s=ot(r.selection);if(!s)return r;var a=jt(t)(r),c=a.indexes,l=jt(e)(r),u=l.indexes;if(c.indexOf(e)>-1)return r;!i.tryToFit&&u.length>1&&I(t,e,u,"column");var f=P(s,c,u,i.direction);return w(r).replaceWith(s.pos,s.pos+s.node.nodeSize,f)}},St=function(t,e){return function(n){var r=ot(n.selection);if(r){var o=i.TableMap.get(r.node),s=t-1;if(e&&s>=0)return w(xt(s)(n));if(t>=0&&t<=o.height)return w(i.addRow(n,{map:o,tableStart:r.start,table:r.node},t))}return n}},xt=function(t){return function(e){var n=ot(e.selection);if(n){var r=i.TableMap.get(n.node);if(t>=0&&t<=r.height){for(var o=n.node,s=C(o.type.schema),a=n.start,c=0;c<t+1;c++)a+=o.child(c).nodeSize;var l=o.child(t),u=[],f=0;if(l.forEach((function(t){1===t.attrs.rowspan&&(f+=t.attrs.colspan,u.push(s[t.type.spec.tableRole].createAndFill(t.attrs,t.marks)))})),f<r.width){for(var p=[],d=function(n){var r=It(n,(function(e,r){var o=e.node.attrs.rowspan,i=n+o;return o>1&&i>t}))(e);p.push.apply(p,rt(r))},v=t;v>=0;v--)d(v);p.length&&p.forEach((function(t){e=Et(t,{rowspan:t.node.attrs.rowspan+1})(e)}))}return h(s.row.create(l.attrs,u),a)(e)}}return e}},kt=function(t){return function(e){var n=ot(e.selection);if(n){var r=i.TableMap.get(n.node);if(0===t&&1===r.width)return Ot(e);if(t>=0&&t<=r.width)return i.removeColumn(e,{map:r,tableStart:n.start,table:n.node},t),w(e)}return e}},Ct=function(t){return function(e){var n=ot(e.selection);if(n){var r=i.TableMap.get(n.node);if(0===t&&1===r.height)return Ot(e);if(t>=0&&t<=r.height)return i.removeRow(e,{map:r,tableStart:n.start,table:n.node},t),w(e)}return e}},Ot=function(t){for(var e=t.selection.$from,n=e.depth;n>0;n--){var r=e.node(n);if("table"===r.type.spec.tableRole)return w(t.delete(e.before(n),e.after(n)))}return t},Mt=function(t){var e=t.selection;if(lt(e))return Ot(t);if(it(e)){var n=ot(e);if(n){var r=i.TableMap.get(n.node),o=r.rectBetween(e.$anchorCell.pos-n.start,e.$headCell.pos-n.start);if(0==o.left&&o.right==r.width)return!1;for(var s=Object.assign({},o,{map:r,table:n.node,tableStart:n.start}),a=s.right-1;;a--){if(i.removeColumn(t,s,a),a===s.left)break;s.table=s.tableStart?t.doc.nodeAt(s.tableStart-1):t.doc,s.map=i.TableMap.get(s.table)}return w(t)}}return t},Nt=function(t){var e=t.selection;if(lt(e))return Ot(t);if(it(e)){var n=ot(e);if(n){var r=i.TableMap.get(n.node),o=r.rectBetween(e.$anchorCell.pos-n.start,e.$headCell.pos-n.start);if(0==o.top&&o.bottom==r.height)return!1;for(var s=Object.assign({},o,{map:r,table:n.node,tableStart:n.start}),a=s.bottom-1;;a--){if(i.removeRow(t,s,a),a===s.top)break;s.table=s.tableStart?t.doc.nodeAt(s.tableStart-1):t.doc,s.map=i.TableMap.get(s.table)}return w(t)}}return t},At=function(t){return function(e){var n=$t(t);return n?kt(n.left)(u(t.pos)(e)):e}},_t=function(t){return function(e){var n=$t(t);return n?Ct(n.top)(u(t.pos)(e)):e}},Tt=function(t,e,n){return function(o){var i=ut(t)(o.selection);if(i){for(var s=i.length-1;s>=0;s--)o=e(i[s],o);if(n){var a=o.doc.resolve(o.mapping.map(i[i.length-1].pos));o.setSelection(r.Selection.near(a))}return w(o)}return o}},Dt=function(t,e,n){return function(o){var i=ft(t)(o.selection);if(i){for(var s=i.length-1;s>=0;s--)o=e(i[s],o);if(n){var a=o.doc.resolve(o.mapping.map(i[i.length-1].pos));o.setSelection(r.Selection.near(a))}}return o}},Et=function(t,e){return function(n){return t?(n.setNodeMarkup(t.pos,null,Object.assign({},t.node.attrs,e)),w(n)):n}},Pt=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=C(t),s=i.cell,a=i.header_cell,c=i.row,l=i.table,u=[],f=[],p=0;p<n;p++)u.push(A(s,o)),r&&f.push(A(a,o));for(var d=[],h=0;h<e;h++)d.push(c.createChecked(null,r&&0===h?f:u));return l.createChecked(null,d)},Rt=function(t){var e=function(t){return t.type.spec.tableRole&&/cell/i.test(t.type.spec.tableRole)};return z(t,e)},$t=function(t){var e=Rt(t);if(e){var n=N(t),r=i.TableMap.get(n.node),o=e.pos-n.start;return r.rectBetween(o,o)}},It=function(t,e){return function(n){var r=[],o=ft(t)(n.selection);if(o)for(var i=o.length-1;i>=0;i--)e(o[i],n)&&r.push(o[i]);return r}},jt=function(t){return function(e){for(var n=t,r=t,o=function(t){var o=ut(t)(e.selection);o&&o.forEach((function(e){var o=e.node.attrs.colspan+t-1;o>=n&&(n=t),o>r&&(r=o)}))},i=t;i>=0;i--)o(i);var s=function(t){var n=ut(t)(e.selection);n&&n.forEach((function(e){var n=e.node.attrs.colspan+t-1;e.node.attrs.colspan>1&&n>r&&(r=n)}))};for(i=t;i<=r;i++)s(i);var a=[];for(i=n;i<=r;i++){var c=ut(i)(e.selection);c&&c.length&&a.push(i)}n=a[0],r=a[a.length-1];for(var l=ut(n)(e.selection),u=ft(0)(e.selection),f=e.doc.resolve(l[l.length-1].pos),p=void 0,d=r;d>=n;d--){var h=ut(d)(e.selection);if(h&&h.length){for(var v=u.length-1;v>=0;v--)if(u[v].pos===h[0].pos){p=h[0];break}if(p)break}}var m=e.doc.resolve(p.pos);return{$anchor:f,$head:m,indexes:a}}},zt=function(t){return function(e){for(var n=t,r=t,o=function(t){var o=ft(t)(e.selection);o.forEach((function(e){var o=e.node.attrs.rowspan+t-1;o>=n&&(n=t),o>r&&(r=o)}))},i=t;i>=0;i--)o(i);var s=function(t){var n=ft(t)(e.selection);n.forEach((function(e){var n=e.node.attrs.rowspan+t-1;e.node.attrs.rowspan>1&&n>r&&(r=n)}))};for(i=t;i<=r;i++)s(i);var a=[];for(i=n;i<=r;i++){var c=ft(i)(e.selection);c&&c.length&&a.push(i)}n=a[0],r=a[a.length-1];for(var l=ft(n)(e.selection),u=ut(0)(e.selection),f=e.doc.resolve(l[l.length-1].pos),p=void 0,d=r;d>=n;d--){var h=ft(d)(e.selection);if(h&&h.length){for(var v=u.length-1;v>=0;v--)if(u[v].pos===h[0].pos){p=h[0];break}if(p)break}}var m=e.doc.resolve(p.pos);return{$anchor:f,$head:m,indexes:a}}};e.isNodeSelection=y,e.canInsert=O,e.convertTableNodeToArrayOfRows=D,e.convertArrayOfRowsToTableNode=E,e.findParentNode=j,e.findParentNodeClosestToPos=z,e.findParentDomRef=F,e.hasParentNode=V,e.findParentNodeOfType=B,e.findParentNodeOfTypeClosestToPos=L,e.hasParentNodeOfType=W,e.findParentDomRefOfType=q,e.findSelectedNodeOfType=K,e.findPositionOfNodeBefore=H,e.findDomRefAtPos=J,e.flatten=U,e.findChildren=G,e.findTextNodes=X,e.findInlineNodes=Y,e.findBlockNodes=Q,e.findChildrenByAttr=Z,e.findChildrenByType=tt,e.findChildrenByMark=et,e.contains=nt,e.findTable=ot,e.isCellSelection=it,e.getSelectionRect=st,e.isColumnSelected=at,e.isRowSelected=ct,e.isTableSelected=lt,e.getCellsInColumn=ut,e.getCellsInRow=ft,e.getCellsInTable=pt,e.selectColumn=ht,e.selectRow=vt,e.selectTable=mt,e.emptyCell=gt,e.addColumnAt=yt,e.moveRow=bt,e.moveColumn=wt,e.addRowAt=St,e.cloneRowAt=xt,e.removeColumnAt=kt,e.removeRowAt=Ct,e.removeTable=Ot,e.removeSelectedColumns=Mt,e.removeSelectedRows=Nt,e.removeColumnClosestToPos=At,e.removeRowClosestToPos=_t,e.forEachCellInColumn=Tt,e.forEachCellInRow=Dt,e.setCellAttrs=Et,e.createTable=Pt,e.findCellClosestToPos=Rt,e.findCellRectClosestToPos=$t,e.getSelectionRangeInColumn=jt,e.getSelectionRangeInRow=zt,e.removeParentNodeOfType=s,e.replaceParentNodeOfType=a,e.removeSelectedNode=c,e.replaceSelectedNode=l,e.setTextSelection=u,e.safeInsert=h,e.setParentNodeMarkup=v,e.selectParentNodeOfType=m,e.removeNodeBefore=g},"99af":function(t,e,n){"use strict";var r=n("23e7"),o=n("d039"),i=n("e8b5"),s=n("861d"),a=n("7b0b"),c=n("50c4"),l=n("8418"),u=n("65f0"),f=n("1dde"),p=n("b622"),d=n("60ae"),h=p("isConcatSpreadable"),v=9007199254740991,m="Maximum allowed index exceeded",g=d>=51||!o((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),y=f("concat"),b=function(t){if(!s(t))return!1;var e=t[h];return void 0!==e?!!e:i(t)},w=!g||!y;r({target:"Array",proto:!0,forced:w},{concat:function(t){var e,n,r,o,i,s=a(this),f=u(s,0),p=0;for(e=-1,r=arguments.length;e<r;e++)if(i=-1===e?s:arguments[e],b(i)){if(o=c(i.length),p+o>v)throw TypeError(m);for(n=0;n<o;n++,p++)n in i&&l(f,p,i[n])}else{if(p>=v)throw TypeError(m);l(f,p++,i)}return f.length=p,f}})},"99de":function(t,e,n){"use strict";var r=n("53ca");function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t,e){return!e||"object"!==Object(r["a"])(e)&&"function"!==typeof e?o(t):e}n.d(e,"a",(function(){return i}))},"9ab4":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));function r(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s}},"9bdd":function(t,e,n){var r=n("825a");t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(s){var i=t["return"];throw void 0!==i&&r(i.call(t)),s}}},"9bf2":function(t,e,n){var r=n("83ab"),o=n("0cfb"),i=n("825a"),s=n("c04e"),a=Object.defineProperty;e.f=r?a:function(t,e,n){if(i(t),e=s(e,!0),i(n),o)try{return a(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},"9ed3":function(t,e,n){"use strict";var r=n("ae93").IteratorPrototype,o=n("7c73"),i=n("5c6c"),s=n("d44e"),a=n("3f8c"),c=function(){return this};t.exports=function(t,e,n){var l=e+" Iterator";return t.prototype=o(r,{next:i(1,n)}),s(t,l,!1,!0),a[l]=c,t}},a15b:function(t,e,n){"use strict";var r=n("23e7"),o=n("44ad"),i=n("fc6a"),s=n("b301"),a=[].join,c=o!=Object,l=s("join",",");r({target:"Array",proto:!0,forced:c||l},{join:function(t){return a.call(i(this),void 0===t?",":t)}})},a15f:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return l})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return f}));var r=n("986d"); +/*! + * tiptap-utils v1.8.2 + * (c) 2019 Scrumpy UG (limited liability) + * @license MIT + */ +function o(t){return i(t)||s(t)||a()}function i(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function s(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function a(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function c(t,e){var n=t.selection,r=n.from,i=n.to,s=[];t.doc.nodesBetween(r,i,(function(t){s=[].concat(o(s),o(t.marks))}));var a=s.find((function(t){return t.type.name===e.name}));return a?a.attrs:{}}function l(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t||!e)return!1;var n=t.parent.childAfter(t.parentOffset);if(!n.node)return!1;var r=n.node.marks.find((function(t){return t.type===e}));if(!r)return!1;var o=t.index(),i=t.start()+n.offset,s=o+1,a=i+n.node.nodeSize;while(o>0&&r.isInSet(t.parent.child(o-1).marks))o-=1,i-=t.parent.child(o).nodeSize;while(s<t.parent.childCount&&r.isInSet(t.parent.child(s).marks))a+=t.parent.child(s).nodeSize,s+=1;return{from:i,to:a}}function u(t,e){var n=t.selection,r=n.from,o=n.$from,i=n.to,s=n.empty;return s?!!e.isInSet(t.storedMarks||o.marks()):!!t.doc.rangeHasMark(r,i,e)}function f(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=function(t){return t.type===e},i=Object(r["findSelectedNodeOfType"])(e)(t.selection)||Object(r["findParentNode"])(o)(t.selection);return Object.keys(n).length&&i?i.node.hasMarkup(e,n):!!i}},a434:function(t,e,n){"use strict";var r=n("23e7"),o=n("23cb"),i=n("a691"),s=n("50c4"),a=n("7b0b"),c=n("65f0"),l=n("8418"),u=n("1dde"),f=Math.max,p=Math.min,d=9007199254740991,h="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!u("splice")},{splice:function(t,e){var n,r,u,v,m,g,y=a(this),b=s(y.length),w=o(t,b),S=arguments.length;if(0===S?n=r=0:1===S?(n=0,r=b-w):(n=S-2,r=p(f(i(e),0),b-w)),b+n-r>d)throw TypeError(h);for(u=c(y,r),v=0;v<r;v++)m=w+v,m in y&&l(u,v,y[m]);if(u.length=r,n<r){for(v=w;v<b-r;v++)m=v+r,g=v+n,m in y?y[g]=y[m]:delete y[g];for(v=b;v>b-r+n;v--)delete y[v-1]}else if(n>r)for(v=b-r;v>w;v--)m=v+r-1,g=v+n-1,m in y?y[g]=y[m]:delete y[g];for(v=0;v<n;v++)y[v+w]=arguments[v+2];return y.length=b-r+n,u}})},a4d3:function(t,e,n){"use strict";var r=n("23e7"),o=n("da84"),i=n("d066"),s=n("c430"),a=n("83ab"),c=n("4930"),l=n("fdbf"),u=n("d039"),f=n("5135"),p=n("e8b5"),d=n("861d"),h=n("825a"),v=n("7b0b"),m=n("fc6a"),g=n("c04e"),y=n("5c6c"),b=n("7c73"),w=n("df75"),S=n("241c"),x=n("057f"),k=n("7418"),C=n("06cf"),O=n("9bf2"),M=n("d1e7"),N=n("9112"),A=n("6eeb"),_=n("5692"),T=n("f772"),D=n("d012"),E=n("90e3"),P=n("b622"),R=n("c032"),$=n("746f"),I=n("d44e"),j=n("69f3"),z=n("b727").forEach,F=T("hidden"),V="Symbol",B="prototype",L=P("toPrimitive"),W=j.set,q=j.getterFor(V),K=Object[B],H=o.Symbol,J=i("JSON","stringify"),U=C.f,G=O.f,X=x.f,Y=M.f,Q=_("symbols"),Z=_("op-symbols"),tt=_("string-to-symbol-registry"),et=_("symbol-to-string-registry"),nt=_("wks"),rt=o.QObject,ot=!rt||!rt[B]||!rt[B].findChild,it=a&&u((function(){return 7!=b(G({},"a",{get:function(){return G(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=U(K,e);r&&delete K[e],G(t,e,n),r&&t!==K&&G(K,e,r)}:G,st=function(t,e){var n=Q[t]=b(H[B]);return W(n,{type:V,tag:t,description:e}),a||(n.description=e),n},at=c&&"symbol"==typeof H.iterator?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof H},ct=function(t,e,n){t===K&&ct(Z,e,n),h(t);var r=g(e,!0);return h(n),f(Q,r)?(n.enumerable?(f(t,F)&&t[F][r]&&(t[F][r]=!1),n=b(n,{enumerable:y(0,!1)})):(f(t,F)||G(t,F,y(1,{})),t[F][r]=!0),it(t,r,n)):G(t,r,n)},lt=function(t,e){h(t);var n=m(e),r=w(n).concat(ht(n));return z(r,(function(e){a&&!ft.call(n,e)||ct(t,e,n[e])})),t},ut=function(t,e){return void 0===e?b(t):lt(b(t),e)},ft=function(t){var e=g(t,!0),n=Y.call(this,e);return!(this===K&&f(Q,e)&&!f(Z,e))&&(!(n||!f(this,e)||!f(Q,e)||f(this,F)&&this[F][e])||n)},pt=function(t,e){var n=m(t),r=g(e,!0);if(n!==K||!f(Q,r)||f(Z,r)){var o=U(n,r);return!o||!f(Q,r)||f(n,F)&&n[F][r]||(o.enumerable=!0),o}},dt=function(t){var e=X(m(t)),n=[];return z(e,(function(t){f(Q,t)||f(D,t)||n.push(t)})),n},ht=function(t){var e=t===K,n=X(e?Z:m(t)),r=[];return z(n,(function(t){!f(Q,t)||e&&!f(K,t)||r.push(Q[t])})),r};if(c||(H=function(){if(this instanceof H)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=E(t),n=function(t){this===K&&n.call(Z,t),f(this,F)&&f(this[F],e)&&(this[F][e]=!1),it(this,e,y(1,t))};return a&&ot&&it(K,e,{configurable:!0,set:n}),st(e,t)},A(H[B],"toString",(function(){return q(this).tag})),M.f=ft,O.f=ct,C.f=pt,S.f=x.f=dt,k.f=ht,a&&(G(H[B],"description",{configurable:!0,get:function(){return q(this).description}}),s||A(K,"propertyIsEnumerable",ft,{unsafe:!0}))),l||(R.f=function(t){return st(P(t),t)}),r({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:H}),z(w(nt),(function(t){$(t)})),r({target:V,stat:!0,forced:!c},{for:function(t){var e=String(t);if(f(tt,e))return tt[e];var n=H(e);return tt[e]=n,et[n]=e,n},keyFor:function(t){if(!at(t))throw TypeError(t+" is not a symbol");if(f(et,t))return et[t]},useSetter:function(){ot=!0},useSimple:function(){ot=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!a},{create:ut,defineProperty:ct,defineProperties:lt,getOwnPropertyDescriptor:pt}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:dt,getOwnPropertySymbols:ht}),r({target:"Object",stat:!0,forced:u((function(){k.f(1)}))},{getOwnPropertySymbols:function(t){return k.f(v(t))}}),J){var vt=!c||u((function(){var t=H();return"[null]"!=J([t])||"{}"!=J({a:t})||"{}"!=J(Object(t))}));r({target:"JSON",stat:!0,forced:vt},{stringify:function(t,e,n){var r,o=[t],i=1;while(arguments.length>i)o.push(arguments[i++]);if(r=e,(d(e)||void 0!==t)&&!at(t))return p(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!at(e))return e}),o[1]=e,J.apply(null,o)}})}H[B][L]||N(H[B],L,H[B].valueOf),I(H,V),D[F]=!0},a691:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},a79d:function(t,e,n){"use strict";var r=n("23e7"),o=n("c430"),i=n("fea9"),s=n("d039"),a=n("d066"),c=n("4840"),l=n("cdf9"),u=n("6eeb"),f=!!i&&s((function(){i.prototype["finally"].call({then:function(){}},(function(){}))}));r({target:"Promise",proto:!0,real:!0,forced:f},{finally:function(t){var e=c(this,a("Promise")),n="function"==typeof t;return this.then(n?function(n){return l(e,t()).then((function(){return n}))}:t,n?function(n){return l(e,t()).then((function(){throw n}))}:t)}}),o||"function"!=typeof i||i.prototype["finally"]||u(i.prototype,"finally",a("Promise").prototype["finally"])},a9de:function(t,e,n){"use strict";var r=n("0010");n("0ac0"),n("304a");n("f95e"),n("5313");var o=n("a15f");n("986d");function i(t){return function(e,n){var r=e.tr,i=e.selection,s=i.from,a=i.to,c=i.$from,l=i.empty;if(l){var u=Object(o["b"])(c,t);s=u.from,a=u.to}return r.removeMark(s,a,t),n(r)}}function s(t,e){return function(n,r){var i=n.tr,s=n.selection,a=n.doc,c=s.from,l=s.to,u=s.$from,f=s.empty;if(f){var p=Object(o["b"])(u,t);c=p.from,l=p.to}var d=a.rangeHasMark(c,l,t);return d&&i.removeMark(c,l,t),i.addMark(c,l,t.create(e)),r(i)}}n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return s})),n.d(e,"b",(function(){return r["c"]})),n.d(e,"c",(function(){return r["d"]}))},a9e3:function(t,e,n){"use strict";var r=n("83ab"),o=n("da84"),i=n("94ca"),s=n("6eeb"),a=n("5135"),c=n("c6b6"),l=n("7156"),u=n("c04e"),f=n("d039"),p=n("7c73"),d=n("241c").f,h=n("06cf").f,v=n("9bf2").f,m=n("58a8").trim,g="Number",y=o[g],b=y.prototype,w=c(p(b))==g,S=function(t){var e,n,r,o,i,s,a,c,l=u(t,!1);if("string"==typeof l&&l.length>2)if(l=m(l),e=l.charCodeAt(0),43===e||45===e){if(n=l.charCodeAt(2),88===n||120===n)return NaN}else if(48===e){switch(l.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+l}for(i=l.slice(2),s=i.length,a=0;a<s;a++)if(c=i.charCodeAt(a),c<48||c>o)return NaN;return parseInt(i,r)}return+l};if(i(g,!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var x,k=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof k&&(w?f((function(){b.valueOf.call(n)})):c(n)!=g)?l(new y(S(e)),n,k):S(e)},C=r?d(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),O=0;C.length>O;O++)a(y,x=C[O])&&!a(k,x)&&v(k,x,h(y,x));k.prototype=b,b.constructor=k,s(o,g,k)}},ad6d:function(t,e,n){"use strict";var r=n("825a");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},ade3:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},ae93:function(t,e,n){"use strict";var r,o,i,s=n("e163"),a=n("9112"),c=n("5135"),l=n("b622"),u=n("c430"),f=l("iterator"),p=!1,d=function(){return this};[].keys&&(i=[].keys(),"next"in i?(o=s(s(i)),o!==Object.prototype&&(r=o)):p=!0),void 0==r&&(r={}),u||c(r,f)||a(r,f,d),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},b041:function(t,e,n){"use strict";var r=n("00ee"),o=n("f5df");t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},b0c0:function(t,e,n){var r=n("83ab"),o=n("9bf2").f,i=Function.prototype,s=i.toString,a=/^\s*function ([^ (]*)/,c="name";!r||c in i||o(i,c,{configurable:!0,get:function(){try{return s.call(this).match(a)[1]}catch(t){return""}}})},b301:function(t,e,n){"use strict";var r=n("d039");t.exports=function(t,e){var n=[][t];return!n||!r((function(){n.call(null,e||function(){throw 1},1)}))}},b39a:function(t,e,n){var r=n("d066");t.exports=r("navigator","userAgent")||""},b575:function(t,e,n){var r,o,i,s,a,c,l,u,f=n("da84"),p=n("06cf").f,d=n("c6b6"),h=n("2cf4").set,v=n("b629"),m=f.MutationObserver||f.WebKitMutationObserver,g=f.process,y=f.Promise,b="process"==d(g),w=p(f,"queueMicrotask"),S=w&&w.value;S||(r=function(){var t,e;b&&(t=g.domain)&&t.exit();while(o){e=o.fn,o=o.next;try{e()}catch(n){throw o?s():i=void 0,n}}i=void 0,t&&t.enter()},b?s=function(){g.nextTick(r)}:m&&!v?(a=!0,c=document.createTextNode(""),new m(r).observe(c,{characterData:!0}),s=function(){c.data=a=!a}):y&&y.resolve?(l=y.resolve(void 0),u=l.then,s=function(){u.call(l,r)}):s=function(){h.call(f,r)}),t.exports=S||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,s()),i=e}},b622:function(t,e,n){var r=n("da84"),o=n("5692"),i=n("5135"),s=n("90e3"),a=n("4930"),c=n("fdbf"),l=o("wks"),u=r.Symbol,f=c?u:s;t.exports=function(t){return i(l,t)||(a&&i(u,t)?l[t]=u[t]:l[t]=f("Symbol."+t)),l[t]}},b629:function(t,e,n){var r=n("b39a");t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},b64b:function(t,e,n){var r=n("23e7"),o=n("7b0b"),i=n("df75"),s=n("d039"),a=s((function(){i(1)}));r({target:"Object",stat:!0,forced:a},{keys:function(t){return i(o(t))}})},b727:function(t,e,n){var r=n("f8c2"),o=n("44ad"),i=n("7b0b"),s=n("50c4"),a=n("65f0"),c=[].push,l=function(t){var e=1==t,n=2==t,l=3==t,u=4==t,f=6==t,p=5==t||f;return function(d,h,v,m){for(var g,y,b=i(d),w=o(b),S=r(h,v,3),x=s(w.length),k=0,C=m||a,O=e?C(d,x):n?C(d,0):void 0;x>k;k++)if((p||k in w)&&(g=w[k],y=S(g,k,b),t))if(e)O[k]=y;else if(y)switch(t){case 3:return!0;case 5:return g;case 6:return k;case 2:c.call(O,g)}else if(u)return!1;return f?-1:l||u?u:O}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},bb2f:function(t,e,n){var r=n("d039");t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},bee2:function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}n.d(e,"a",(function(){return o}))},c032:function(t,e,n){var r=n("b622");e.f=r},c04e:function(t,e,n){var r=n("861d");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},c430:function(t,e){t.exports=!1},c6b6:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},c6cd:function(t,e,n){var r=n("da84"),o=n("ce4e"),i="__core-js_shared__",s=r[i]||o(i,{});t.exports=s},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},c975:function(t,e,n){"use strict";var r=n("23e7"),o=n("4d64").indexOf,i=n("b301"),s=[].indexOf,a=!!s&&1/[1].indexOf(1,-0)<0,c=i("indexOf");r({target:"Array",proto:!0,forced:a||c},{indexOf:function(t){return a?s.apply(this,arguments)||0:o(this,t,arguments.length>1?arguments[1]:void 0)}})},ca84:function(t,e,n){var r=n("5135"),o=n("fc6a"),i=n("4d64").indexOf,s=n("d012");t.exports=function(t,e){var n,a=o(t),c=0,l=[];for(n in a)!r(s,n)&&r(a,n)&&l.push(n);while(e.length>c)r(a,n=e[c++])&&(~i(l,n)||l.push(n));return l}},cc12:function(t,e,n){var r=n("da84"),o=n("861d"),i=r.document,s=o(i)&&o(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},cca6:function(t,e,n){var r=n("23e7"),o=n("60da");r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},cd42:function(t,e,n){"use strict";var r=n("5313"),o=n("304a"),i=n("0ac0"),s={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var a=/Edge\/(\d+)/.exec(navigator.userAgent),c=/MSIE \d/.test(navigator.userAgent),l=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);s.mac=/Mac/.test(navigator.platform);var u=s.ie=!!(c||l||a);s.ie_version=c?document.documentMode||6:l?+l[1]:a?+a[1]:null,s.gecko=!u&&/gecko\/(\d+)/i.test(navigator.userAgent),s.gecko_version=s.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var f=!u&&/Chrome\/(\d+)/.exec(navigator.userAgent);s.chrome=!!f,s.chrome_version=f&&+f[1],s.ios=!u&&/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),s.android=/Android \d/.test(navigator.userAgent),s.webkit=!u&&"WebkitAppearance"in document.documentElement.style,s.safari=/Apple Computer/.test(navigator.vendor),s.webkit_version=s.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var p=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},d=function(t){var e=t.parentNode;return e&&11==e.nodeType?e.host:e},h=function(t,e,n){var r=document.createRange();return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},v=function(t,e,n,r){return n&&(g(t,e,n,r,-1)||g(t,e,n,r,1))},m=/^(img|br|input|textarea|hr)$/i;function g(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:y(t))){var i=t.parentNode;if(1!=i.nodeType||b(t)||m.test(t.nodeName)||"false"==t.contentEditable)return!1;e=p(t)+(o<0?0:1),t=i}else{if(1!=t.nodeType)return!1;t=t.childNodes[e+(o<0?-1:0)],e=o<0?y(t):0}}}function y(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function b(t){for(var e,n=t;n;n=n.parentNode)if(e=n.pmViewDesc)break;return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}var w=function(t){var e=t.isCollapsed;return e&&s.chrome&&t.rangeCount&&!t.getRangeAt(0).collapsed&&(e=!1),e};function S(t,e){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function x(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function k(t,e){return"number"==typeof t?t:t[e]}function C(t,e,n){for(var r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument,s=i.defaultView,a=n||t.dom;;a=d(a)){if(!a)break;if(1==a.nodeType){var c=a==i.body||1!=a.nodeType,l=c?x(s):a.getBoundingClientRect(),u=0,f=0;if(e.top<l.top+k(r,"top")?f=-(l.top-e.top+k(o,"top")):e.bottom>l.bottom-k(r,"bottom")&&(f=e.bottom-l.bottom+k(o,"bottom")),e.left<l.left+k(r,"left")?u=-(l.left-e.left+k(o,"left")):e.right>l.right-k(r,"right")&&(u=e.right-l.right+k(o,"right")),(u||f)&&(c?s.scrollBy(u,f):(f&&(a.scrollTop+=f),u&&(a.scrollLeft+=u))),c)break}}}function O(t){for(var e,n,r=t.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,s=o+1;s<Math.min(innerHeight,r.bottom);s+=5){var a=t.root.elementFromPoint(i,s);if(a!=t.dom&&t.dom.contains(a)){var c=a.getBoundingClientRect();if(c.top>=o-20){e=a,n=c.top;break}}}return{refDOM:e,refTop:n,stack:M(t.dom)}}function M(t){for(var e=[],n=t.ownerDocument;t;t=d(t))if(e.push({dom:t,top:t.scrollTop,left:t.scrollLeft}),t==n)break;return e}function N(t){var e=t.refDOM,n=t.refTop,r=t.stack,o=e?e.getBoundingClientRect().top:0;A(r,0==o?0:o-n)}function A(t,e){for(var n=0;n<t.length;n++){var r=t[n],o=r.dom,i=r.top,s=r.left;o.scrollTop!=i+e&&(o.scrollTop=i+e),o.scrollLeft!=s&&(o.scrollLeft=s)}}var _=null;function T(t){if(t.setActive)return t.setActive();if(_)return t.focus(_);var e=M(t);t.focus(null==_?{get preventScroll(){return _={preventScroll:!0},!0}}:void 0),_||(_=!1,A(e,0))}function D(t,e){for(var n,r,o=2e8,i=0,s=e.top,a=e.top,c=t.firstChild,l=0;c;c=c.nextSibling,l++){var u=void 0;if(1==c.nodeType)u=c.getClientRects();else{if(3!=c.nodeType)continue;u=h(c).getClientRects()}for(var f=0;f<u.length;f++){var p=u[f];if(p.top<=s&&p.bottom>=a){s=Math.max(p.bottom,s),a=Math.min(p.top,a);var d=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(d<o){n=c,o=d,r=d&&3==n.nodeType?{left:p.right<e.left?p.right:p.left,top:e.top}:e,1==c.nodeType&&d&&(i=l+(e.left>=(p.left+p.right)/2?1:0));continue}}!n&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(i=l+1)}}return n&&3==n.nodeType?E(n,r):!n||o&&1==n.nodeType?{node:t,offset:i}:D(n,r)}function E(t,e){for(var n=t.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(t,o+1),r.setStart(t,o);var i=F(r,1);if(i.top!=i.bottom&&P(e,i))return{node:t,offset:o+(e.left>=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function P(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function R(t,e){var n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function $(t,e,n){var r=D(e,n),o=r.node,i=r.offset,s=-1;if(1==o.nodeType&&!o.firstChild){var a=o.getBoundingClientRect();s=a.left!=a.right&&n.left>(a.left+a.right)/2?1:-1}return t.docView.posFromDOM(o,i,s)}function I(t,e,n,r){for(var o=-1,i=e;;){if(i==t.dom)break;var s=t.docView.nearestDesc(i,!0);if(!s)return null;if(s.node.isBlock&&s.parent){var a=s.dom.getBoundingClientRect();if(a.left>r.left||a.top>r.top)o=s.posBefore;else{if(!(a.right<r.left||a.bottom<r.top))break;o=s.posAfter}}i=s.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n)}function j(t,e,n){var r=t.childNodes.length;if(r&&n.top<n.bottom)for(var o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=o;;){var s=t.childNodes[i];if(1==s.nodeType)for(var a=s.getClientRects(),c=0;c<a.length;c++){var l=a[c];if(P(e,l))return j(s,e,l)}if((i=(i+1)%r)==o)break}return t}function z(t,e){var n,r,o,i,a=t.root;if(a.caretPositionFromPoint)try{var c=a.caretPositionFromPoint(e.left,e.top);c&&(n=c,o=n.offsetNode,i=n.offset)}catch(m){}if(!o&&a.caretRangeFromPoint){var l=a.caretRangeFromPoint(e.left,e.top);l&&(r=l,o=r.startContainer,i=r.startOffset)}var u,f=a.elementFromPoint(e.left,e.top+1);if(!f||!t.dom.contains(1!=f.nodeType?f.parentNode:f)){var p=t.dom.getBoundingClientRect();if(!P(e,p))return null;if(f=j(t.dom,e,p),!f)return null}if(f=R(f,e),o){if(s.gecko&&1==o.nodeType&&(i=Math.min(i,o.childNodes.length),i<o.childNodes.length)){var d,h=o.childNodes[i];"IMG"==h.nodeName&&(d=h.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&i++}o==t.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&e.top>o.lastChild.getBoundingClientRect().bottom?u=t.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(u=I(t,o,i,e))}null==u&&(u=$(t,f,e));var v=t.docView.nearestDesc(f,!0);return{pos:u,inside:v?v.posAtStart-v.border:-1}}function F(t,e){var n=t.getClientRects();return n.length?n[e<0?0:n.length-1]:t.getBoundingClientRect()}function V(t,e){var n=t.docView.domFromPos(e),r=n.node,o=n.offset;if(3==r.nodeType&&(s.chrome||s.gecko)){var i=F(h(r,o,o),0);if(s.gecko&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){var a=F(h(r,o-1,o-1),-1);if(Math.abs(a.left-i.left)<1&&a.top==i.top){var c=F(h(r,o,o+1),-1);return B(c,c.left<a.left)}}return i}if(1==r.nodeType&&!t.state.doc.resolve(e).parent.inlineContent){var l,u=!0;if(o<r.childNodes.length){var f=r.childNodes[o];1==f.nodeType&&(l=f.getBoundingClientRect())}if(!l&&o){var p=r.childNodes[o-1];1==p.nodeType&&(l=p.getBoundingClientRect(),u=!1)}return L(l||r.getBoundingClientRect(),u)}for(var d=-1;d<2;d+=2)if(d<0&&o){var v=void 0,m=3==r.nodeType?h(r,o-1,o):3==(v=r.childNodes[o-1]).nodeType?h(v):1==v.nodeType&&"BR"!=v.nodeName?v:null;if(m){var g=F(m,1);if(g.top<g.bottom)return B(g,!1)}}else if(d>0&&o<y(r)){var b=void 0,w=3==r.nodeType?h(r,o,o+1):3==(b=r.childNodes[o]).nodeType?h(b):1==b.nodeType?b:null;if(w){var S=F(w,-1);if(S.top<S.bottom)return B(S,!0)}}return B(F(3==r.nodeType?h(r):r,0),!1)}function B(t,e){if(0==t.width)return t;var n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function L(t,e){if(0==t.height)return t;var n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function W(t,e,n){var r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o.focus()}}function q(t,e,n){var r=e.selection,o="up"==n?r.$anchor.min(r.$head):r.$anchor.max(r.$head);return W(t,e,(function(){for(var e=t.docView.domFromPos(o.pos),r=e.node;;){var i=t.docView.nearestDesc(r,!0);if(!i)break;if(i.node.isBlock){r=i.dom;break}r=i.dom.parentNode}for(var s=V(t,o.pos),a=r.firstChild;a;a=a.nextSibling){var c=void 0;if(1==a.nodeType)c=a.getClientRects();else{if(3!=a.nodeType)continue;c=h(a,0,a.nodeValue.length).getClientRects()}for(var l=0;l<c.length;l++){var u=c[l];if(u.bottom>u.top&&("up"==n?u.bottom<s.top+1:u.top>s.bottom-1))return!1}}return!0}))}var K=/[\u0590-\u08ac]/;function H(t,e,n){var r=e.selection,o=r.$head;if(!o.parent.isTextblock)return!1;var i=o.parentOffset,s=!i,a=i==o.parent.content.size,c=getSelection();return K.test(o.parent.textContent)&&c.modify?W(t,e,(function(){var e=c.getRangeAt(0),r=c.focusNode,i=c.focusOffset,s=c.caretBidiLevel;c.modify("move",n,"character");var a=o.depth?t.docView.domAfterPos(o.before()):t.dom,l=!a.contains(1==c.focusNode.nodeType?c.focusNode:c.focusNode.parentNode)||r==c.focusNode&&i==c.focusOffset;return c.removeAllRanges(),c.addRange(e),null!=s&&(c.caretBidiLevel=s),l})):"left"==n||"backward"==n?s:a}var J=null,U=null,G=!1;function X(t,e,n){return J==e&&U==n?G:(J=e,U=n,G="up"==n||"down"==n?q(t,e,n):H(t,e,n))}var Y=0,Q=1,Z=2,tt=3,et=function(t,e,n,r){this.parent=t,this.children=e,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=Y},nt={beforePosition:{configurable:!0},size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0}};et.prototype.matchesWidget=function(){return!1},et.prototype.matchesMark=function(){return!1},et.prototype.matchesNode=function(){return!1},et.prototype.matchesHack=function(){return!1},nt.beforePosition.get=function(){return!1},et.prototype.parseRule=function(){return null},et.prototype.stopEvent=function(){return!1},nt.size.get=function(){for(var t=0,e=0;e<this.children.length;e++)t+=this.children[e].size;return t},nt.border.get=function(){return 0},et.prototype.destroy=function(){this.parent=null,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=null);for(var t=0;t<this.children.length;t++)this.children[t].destroy()},et.prototype.posBeforeChild=function(t){for(var e=0,n=this.posAtStart;e<this.children.length;e++){var r=this.children[e];if(r==t)return n;n+=r.size}},nt.posBefore.get=function(){return this.parent.posBeforeChild(this)},nt.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},nt.posAfter.get=function(){return this.posBefore+this.size},nt.posAtEnd.get=function(){return this.posAtStart+this.size-2*this.border},et.prototype.localPosFromDOM=function(t,e,n){if(this.contentDOM&&this.contentDOM.contains(1==t.nodeType?t:t.parentNode)){if(n<0){var r,o;if(t==this.contentDOM)r=t.childNodes[e-1];else{while(t.parentNode!=this.contentDOM)t=t.parentNode;r=t.previousSibling}while(r&&(!(o=r.pmViewDesc)||o.parent!=this))r=r.previousSibling;return r?this.posBeforeChild(o)+o.size:this.posAtStart}var i,s;if(t==this.contentDOM)i=t.childNodes[e];else{while(t.parentNode!=this.contentDOM)t=t.parentNode;i=t.nextSibling}while(i&&(!(s=i.pmViewDesc)||s.parent!=this))i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}var a;if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))a=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(var c=t;;c=c.parentNode){if(c==this.dom){a=!1;break}if(c.parentNode.firstChild!=c)break}if(null==a&&e==t.childNodes.length)for(var l=t;;l=l.parentNode){if(l==this.dom){a=!0;break}if(l.parentNode.lastChild!=l)break}}return(null==a?n>0:a)?this.posAtEnd:this.posAtStart},et.prototype.nearestDesc=function(t,e){for(var n=!0,r=t;r;r=r.parentNode){var o=this.getDesc(r);if(o&&(!e||o.node)){if(!n||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(t):o.nodeDOM==t))return o;n=!1}}},et.prototype.getDesc=function(t){for(var e=t.pmViewDesc,n=e;n;n=n.parent)if(n==this)return e},et.prototype.posFromDOM=function(t,e,n){for(var r=t;;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(t,e,n)}},et.prototype.descAt=function(t){for(var e=0,n=0;e<this.children.length;e++){var r=this.children[e],o=n+r.size;if(n==t&&o!=n){while(!r.border&&r.children.length)r=r.children[0];return r}if(t<o)return r.descAt(t-n-r.border);n=o}},et.prototype.domFromPos=function(t){if(!this.contentDOM)return{node:this.dom,offset:0};for(var e=0,n=0;;n++){if(e==t){while(n<this.children.length&&(this.children[n].beforePosition||this.children[n].dom.parentNode!=this.contentDOM))n++;return{node:this.contentDOM,offset:n==this.children.length?this.contentDOM.childNodes.length:p(this.children[n].dom)}}if(n==this.children.length)throw new Error("Invalid position "+t);var r=this.children[n],o=e+r.size;if(t<o)return r.domFromPos(t-e-r.border);e=o}},et.prototype.parseRange=function(t,e,n){if(void 0===n&&(n=0),0==this.children.length)return{node:this.contentDOM,from:t,to:e,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,s=0;;s++){var a=this.children[s],c=i+a.size;if(-1==r&&t<=c){var l=i+a.border;if(t>=l&&e<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(t,e,l);t=i;for(var u=s;u>0;u--){var f=this.children[u-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=p(f.dom)+1;break}t-=f.size}-1==r&&(r=0)}if(r>-1&&e<=c){e=c;for(var d=s+1;d<this.children.length;d++){var h=this.children[d];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){o=p(h.dom);break}e+=h.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=c}return{node:this.contentDOM,from:t,to:e,fromOffset:r,toOffset:o}},et.prototype.emptyChildAt=function(t){if(this.border||!this.contentDOM||!this.children.length)return!1;var e=this.children[t<0?0:this.children.length-1];return 0==e.size||e.emptyChildAt(t)},et.prototype.domAfterPos=function(t){var e=this.domFromPos(t),n=e.node,r=e.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]},et.prototype.setSelection=function(t,e,n,r){for(var o=Math.min(t,e),i=Math.max(t,e),s=0,a=0;s<this.children.length;s++){var c=this.children[s],l=a+c.size;if(o>a&&i<l)return c.setSelection(t-a-c.border,e-a-c.border,n,r);a=l}var u=this.domFromPos(t),f=this.domFromPos(e),p=n.getSelection(),d=document.createRange();if(r||!v(u.node,u.offset,p.anchorNode,p.anchorOffset)||!v(f.node,f.offset,p.focusNode,p.focusOffset)){if(p.extend)d.setEnd(u.node,u.offset),d.collapse(!1);else{if(t>e){var h=u;u=f,f=h}d.setEnd(f.node,f.offset),d.setStart(u.node,u.offset)}p.removeAllRanges(),p.addRange(d),p.extend&&p.extend(f.node,f.offset)}},et.prototype.ignoreMutation=function(t){return!this.contentDOM},nt.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},et.prototype.markDirty=function(t,e){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?t<=i&&e>=n:t<i&&e>n){var s=n+o.border,a=i-o.border;if(t>=s&&e<=a)return this.dirty=t==n||e==i?Z:Q,void(t!=s||e!=a||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-s,e-s):o.dirty=tt);o.dirty=tt}n=i}this.dirty=Z},et.prototype.markParentsDirty=function(){for(var t=this.parent;t;t=t.parent){var e=Z;t.dirty<e&&(t.dirty=e)}},Object.defineProperties(et.prototype,nt);var rt=[],ot=function(t){function e(e,n,r,o){var i,s=n.type.toDOM;if("function"==typeof s&&(s=s(r,(function(){return i?i.parent?i.parent.posBeforeChild(i):void 0:o}))),!n.type.spec.raw){if(1!=s.nodeType){var a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable=!1,s.classList.add("ProseMirror-widget")}t.call(this,e,rt,s,null),this.widget=n,i=this}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={beforePosition:{configurable:!0}};return n.beforePosition.get=function(){return this.widget.type.side<0},e.prototype.matchesWidget=function(t){return this.dirty==Y&&t.type.eq(this.widget.type)},e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.stopEvent=function(t){var e=this.widget.spec.stopEvent;return!!e&&e(t)},Object.defineProperties(e.prototype,n),e}(et),it=function(t){function e(e,n,r,o){t.call(this,e,rt,n,null),this.textDOM=r,this.text=o}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={size:{configurable:!0}};return n.size.get=function(){return this.text.length},e.prototype.localPosFromDOM=function(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e},e.prototype.domFromPos=function(t){return{node:this.textDOM,offset:t}},e.prototype.ignoreMutation=function(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue},Object.defineProperties(e.prototype,n),e}(et),st=function(t){function e(e,n,r,o){t.call(this,e,[],r,o),this.mark=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.create=function(t,n,r,i){var s=i.nodeViews[n.type.name],a=s&&s(n,i,r);return a&&a.dom||(a=o["DOMSerializer"].renderSpec(document,n.type.spec.toDOM(n,r))),new e(t,n,a.dom,a.contentDOM||a.dom)},e.prototype.parseRule=function(){return{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}},e.prototype.matchesMark=function(t){return this.dirty!=tt&&this.mark.eq(t)},e.prototype.markDirty=function(e,n){if(t.prototype.markDirty.call(this,e,n),this.dirty!=Y){var r=this.parent;while(!r.node)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Y}},e.prototype.slice=function(t,n,r){var o=e.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=At(i,n,s,r)),t>0&&(i=At(i,0,t,r));for(var a=0;a<i.length;a++)i[a].parent=o;return o.children=i,o},e}(et),at=function(t){function e(e,n,r,o,i,s,a,c,l){t.call(this,e,n.isLeaf?rt:[],i,s),this.nodeDOM=a,this.node=n,this.outerDeco=r,this.innerDeco=o,s&&this.updateChildren(c,l)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={size:{configurable:!0},border:{configurable:!0}};return e.create=function(t,n,r,i,s,a){var c,l,u=s.nodeViews[n.type.name],f=u&&u(n,s,(function(){return l?l.parent?l.parent.posBeforeChild(l):void 0:a}),r),p=f&&f.dom,d=f&&f.contentDOM;if(n.isText)if(p){if(3!=p.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else p=document.createTextNode(n.text);else p||(c=o["DOMSerializer"].renderSpec(document,n.type.spec.toDOM(n)),p=c.dom,d=c.contentDOM);d||n.isText||"BR"==p.nodeName||(p.hasAttribute("contenteditable")||(p.contentEditable=!1),n.type.spec.draggable&&(p.draggable=!0));var h=p;return p=yt(p,r,n),f?l=new ft(t,n,r,i,p,d,h,f,s,a+1):n.isText?new lt(t,n,r,i,p,h,s):new e(t,n,r,i,p,d,h,s,a+1)},e.prototype.parseRule=function(){var t=this;if(this.node.type.spec.reparseInView)return null;var e={node:this.node.type.name,attrs:this.node.attrs};return this.node.type.spec.code&&(e.preserveWhitespace="full"),this.contentDOM&&!this.contentLost?e.contentElement=this.contentDOM:e.getContent=function(){return t.contentDOM?o["Fragment"].empty:t.node.content},e},e.prototype.matchesNode=function(t,e,n){return this.dirty==Y&&t.eq(this.node)&&bt(e,this.outerDeco)&&n.eq(this.innerDeco)},n.size.get=function(){return this.node.nodeSize},n.border.get=function(){return this.node.isLeaf?0:1},e.prototype.updateChildren=function(t,e){var n=this,r=this.node.inlineContent,i=e,s=r&&t.composing&&this.localCompositionNode(t,e),a=new St(this,s&&s.node);Ct(this.node,this.innerDeco,(function(e,s){e.spec.marks?a.syncToMarks(e.spec.marks,r,t):e.type.side>=0&&a.syncToMarks(s==n.node.childCount?o["Mark"].none:n.node.child(s).marks,r,t),a.placeWidget(e,t,i)}),(function(e,n,o,s){a.syncToMarks(e.marks,r,t),a.findNodeMatch(e,n,o,s)||a.updateNextNode(e,n,o,t,s)||a.addNode(e,n,o,t,i),i+=e.nodeSize})),a.syncToMarks(rt,r,t),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==Z)&&(s&&this.protectLocalComposition(t,s),this.renderChildren())},e.prototype.renderChildren=function(){pt(this.contentDOM,this.children),s.ios&&Ot(this.dom)},e.prototype.localCompositionNode=function(t,e){var n=t.state.selection,o=n.from,i=n.to;if(!(!(t.state.selection instanceof r["TextSelection"])||o<e||i>e+this.node.content.size)){var s=t.root.getSelection(),a=Mt(s.focusNode,s.focusOffset);if(a&&this.dom.contains(a.parentNode)){var c=a.nodeValue,l=Nt(this.node.content,c,o-e,i-e);return l<0?null:{node:a,pos:l,text:c}}}},e.prototype.protectLocalComposition=function(t,e){var n=e.node,r=e.pos,o=e.text;if(!this.getDesc(n)){for(var i=n;;i=i.parentNode){if(i.parentNode==this.contentDOM)break;while(i.previousSibling)i.parentNode.removeChild(i.previousSibling);while(i.nextSibling)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=null)}var s=new it(this,i,n,o);t.compositionNodes.push(s),this.children=At(this.children,r,r+o.length,t,s)}},e.prototype.update=function(t,e,n,r){return!(this.dirty==tt||!t.sameMarkup(this.node))&&(this.updateInner(t,e,n,r),!0)},e.prototype.updateInner=function(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=Y},e.prototype.updateOuterDeco=function(t){if(!bt(t,this.outerDeco)){var e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=mt(this.dom,this.nodeDOM,vt(this.outerDeco,this.node,e),vt(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=t}},e.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},e.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!1)},Object.defineProperties(e.prototype,n),e}(et);function ct(t,e,n,r,o){return yt(r,e,t),new at(null,t,e,n,r,r,r,o,0)}var lt=function(t){function e(e,n,r,o,i,s,a){t.call(this,e,n,r,o,i,null,s,a)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parseRule=function(){return{skip:this.nodeDOM.parentNode||!0}},e.prototype.update=function(t,e){return!(this.dirty==tt||this.dirty!=Y&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),this.dirty==Y&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text),this.node=t,this.dirty=Y,!0)},e.prototype.inParent=function(){for(var t=this.parent.contentDOM,e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1},e.prototype.domFromPos=function(t){return{node:this.nodeDOM,offset:t}},e.prototype.localPosFromDOM=function(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):t.prototype.localPosFromDOM.call(this,e,n,r)},e.prototype.ignoreMutation=function(t){return"characterData"!=t.type&&"selection"!=t.type},e.prototype.slice=function(t,n,r){var o=this.node.cut(t,n),i=document.createTextNode(o.text);return new e(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)},e}(at),ut=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.matchesHack=function(){return this.dirty==Y},e}(et),ft=function(t){function e(e,n,r,o,i,s,a,c,l,u){t.call(this,e,n,r,o,i,s,a,l,u),this.spec=c}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(e,n,r,o){if(this.dirty==tt)return!1;if(this.spec.update){var i=this.spec.update(e,n);return i&&this.updateInner(e,n,r,o),i}return!(!this.contentDOM&&!e.isLeaf)&&t.prototype.update.call(this,e,n,r,o)},e.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():t.prototype.selectNode.call(this)},e.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():t.prototype.deselectNode.call(this)},e.prototype.setSelection=function(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r):t.prototype.setSelection.call(this,e,n,r,o)},e.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),t.prototype.destroy.call(this)},e.prototype.stopEvent=function(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)},e.prototype.ignoreMutation=function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):t.prototype.ignoreMutation.call(this,e)},e}(at);function pt(t,e){for(var n=t.firstChild,r=0;r<e.length;r++){var o=e[r],i=o.dom;if(i.parentNode==t){while(i!=n)n=wt(n);n=n.nextSibling}else t.insertBefore(i,n);if(o instanceof st){var s=n?n.previousSibling:t.lastChild;pt(o.contentDOM,o.children),n=s?s.nextSibling:t.firstChild}}while(n)n=wt(n)}function dt(t){t&&(this.nodeName=t)}dt.prototype=Object.create(null);var ht=[new dt];function vt(t,e,n){if(0==t.length)return ht;for(var r=n?ht[0]:new dt,o=[r],i=0;i<t.length;i++){var s=t[i].type.attrs,a=r;if(s)for(var c in s.nodeName&&o.push(a=new dt(s.nodeName)),s){var l=s[c];null!=l&&(n&&1==o.length&&o.push(a=r=new dt(e.isInline?"span":"div")),"class"==c?a.class=(a.class?a.class+" ":"")+l:"style"==c?a.style=(a.style?a.style+";":"")+l:"nodeName"!=c&&(a[c]=l))}}return o}function mt(t,e,n,r){if(n==ht&&r==ht)return e;for(var o=e,i=0;i<r.length;i++){var s=r[i],a=n[i];if(i){var c=void 0;a&&a.nodeName==s.nodeName&&o!=t&&(c=e.parentNode)&&c.tagName.toLowerCase()==s.nodeName?o=c:(c=document.createElement(s.nodeName),c.appendChild(o),o=c)}gt(o,a||ht[0],s)}return o}function gt(t,e,n){for(var r in e)"class"==r||"style"==r||"nodeName"==r||r in n||t.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=e[o]&&t.setAttribute(o,n[o]);if(e.class!=n.class){for(var i=e.class?e.class.split(" "):rt,s=n.class?n.class.split(" "):rt,a=0;a<i.length;a++)-1==s.indexOf(i[a])&&t.classList.remove(i[a]);for(var c=0;c<s.length;c++)-1==i.indexOf(s[c])&&t.classList.add(s[c])}if(e.style!=n.style){if(e.style){var l,u=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;while(l=u.exec(e.style))t.style[l[1].toLowerCase()]=""}n.style&&(t.style.cssText+=n.style)}}function yt(t,e,n){return mt(t,t,ht,vt(e,n,1!=t.nodeType))}function bt(t,e){if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function wt(t){var e=t.nextSibling;return t.parentNode.removeChild(t),e}var St=function(t,e){this.top=t,this.lock=e,this.index=0,this.stack=[],this.changed=!1;var n=xt(t.node.content,t.children);this.preMatched=n.nodes,this.preMatchOffset=n.offset};function xt(t,e){for(var n=[],r=t.childCount,o=e.length-1;r>0&&o>=0;o--){var i=e[o],s=i.node;if(s){if(s!=t.child(r-1))break;n.push(i),--r}}return{nodes:n.reverse(),offset:r}}function kt(t,e){return t.type.side-e.type.side}function Ct(t,e,n,r){var o=e.locals(t),i=0;if(0!=o.length)for(var s=0,a=[],c=null,l=0;;){if(s<o.length&&o[s].to==i){var u=o[s++],f=void 0;while(s<o.length&&o[s].to==i)(f||(f=[u])).push(o[s++]);if(f){f.sort(kt);for(var p=0;p<f.length;p++)n(f[p],l)}else n(u,l)}var d=void 0,h=void 0;if(c)h=-1,d=c,c=null;else{if(!(l<t.childCount))break;h=l,d=t.child(l++)}for(var v=0;v<a.length;v++)a[v].to<=i&&a.splice(v--,1);while(s<o.length&&o[s].from==i)a.push(o[s++]);var m=i+d.nodeSize;if(d.isText){var g=m;s<o.length&&o[s].from<g&&(g=o[s].from);for(var y=0;y<a.length;y++)a[y].to<g&&(g=a[y].to);g<m&&(c=d.cut(g-i),d=d.cut(0,g-i),m=g,h=-1)}r(d,a.length?a.slice():rt,e.forChild(i,d),h),i=m}else for(var b=0;b<t.childCount;b++){var w=t.child(b);r(w,o,e.forChild(i,w),b),i+=w.nodeSize}}function Ot(t){if("UL"==t.nodeName||"OL"==t.nodeName){var e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function Mt(t,e){for(;;){if(3==t.nodeType)return t;if(1==t.nodeType&&e>0){if(t.childNodes.length>e&&3==t.childNodes[e].nodeType)return t.childNodes[e];t=t.childNodes[e-1],e=y(t)}else{if(!(1==t.nodeType&&e<t.childNodes.length))return null;t=t.childNodes[e],e=0}}}function Nt(t,e,n,r){for(var o="",i=0,s=0;i<t.childCount;i++){var a=t.child(i),c=s+a.nodeSize;if(a.isText){if(o+=a.text,c>=r){var l=c-o.length,u=o.lastIndexOf(e);while(u>-1&&l+u>n)u=o.lastIndexOf(e,u-1);if(u>-1&&l+u+e.length>=r)return l+u;if(c>r)break}}else o="";s=c}return-1}function At(t,e,n,r,o){for(var i=[],s=0,a=0;s<t.length;s++){var c=t[s],l=a,u=a+=c.size;l>=n||u<=e?i.push(c):(l<e&&i.push(c.slice(0,e-l,r)),o&&(i.push(o),o=null),u>n&&i.push(c.slice(n-l,c.size,r)))}return i}function _t(t,e){var n=t.selection,o=n.$anchor,i=n.$head,s=e>0?o.max(i):o.min(i),a=s.parent.inlineContent?s.depth?t.doc.resolve(e>0?s.after():s.before()):null:s;return a&&r["Selection"].findFrom(a,e)}function Tt(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Dt(t,e,n){var o=t.state.selection;if(o instanceof r["TextSelection"]){if(!o.empty||n.indexOf("s")>-1)return!1;if(t.endOfTextblock(e>0?"right":"left")){var i=_t(t.state,e);return!!(i&&i instanceof r["NodeSelection"])&&Tt(t,i)}var a,c=o.$head,l=c.textOffset?null:e<0?c.nodeBefore:c.nodeAfter;if(!l||l.isText)return!1;var u=e<0?c.pos-l.nodeSize:c.pos;return!!(l.isAtom||(a=t.docView.descAt(u))&&!a.contentDOM)&&(r["NodeSelection"].isSelectable(l)?Tt(t,new r["NodeSelection"](e<0?t.state.doc.resolve(c.pos-l.nodeSize):c)):!!s.webkit&&Tt(t,new r["TextSelection"](t.state.doc.resolve(e<0?u:u+l.nodeSize))))}if(o instanceof r["NodeSelection"]&&o.node.isInline)return Tt(t,new r["TextSelection"](e>0?o.$to:o.$from));var f=_t(t.state,e);return!!f&&Tt(t,f)}function Et(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Pt(t){var e=t.pmViewDesc;return e&&0==e.size&&(t.nextSibling||"BR"!=t.nodeName)}function Rt(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){var o,i,a=!1;for(s.gecko&&1==n.nodeType&&r<Et(n)&&Pt(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var c=n.childNodes[r-1];if(Pt(c))o=n,i=--r;else{if(3!=c.nodeType)break;n=c,r=n.nodeValue.length}}else{if(It(n))break;var l=n.previousSibling;while(l&&Pt(l))o=n.parentNode,i=p(l),l=l.previousSibling;if(l)n=l,r=Et(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}a?jt(t,e,n,r):o&&jt(t,e,o,i)}}function $t(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){for(var o,i,s=Et(n);;)if(r<s){if(1!=n.nodeType)break;var a=n.childNodes[r];if(!Pt(a))break;o=n,i=++r}else{if(It(n))break;var c=n.nextSibling;while(c&&Pt(c))o=c.parentNode,i=p(c)+1,c=c.nextSibling;if(c)n=c,r=0,s=Et(n);else{if(n=n.parentNode,n==t.dom)break;r=s=0}}o&&jt(t,e,o,i)}}function It(t){var e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function jt(t,e,n,r){if(w(e)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),e.removeAllRanges(),e.addRange(o)}else e.extend&&e.extend(n,r);t.domObserver.setCurSelection()}function zt(t,e,n){var o=t.state.selection;if(o instanceof r["TextSelection"]&&!o.empty||n.indexOf("s")>-1)return!1;var i=o.$from,s=o.$to;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){var a=_t(t.state,e);if(a&&a instanceof r["NodeSelection"])return Tt(t,a)}if(!i.parent.inlineContent){var c=r["Selection"].findFrom(e<0?i:s,e);return!c||Tt(t,c)}return!1}function Ft(t,e){if(!(t.state.selection instanceof r["TextSelection"]))return!0;var n=t.state.selection,o=n.$head,i=n.$anchor,s=n.empty;if(!o.sameParent(i))return!0;if(!s)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;var a=!o.textOffset&&(e<0?o.nodeBefore:o.nodeAfter);if(a&&!a.isText){var c=t.state.tr;return e<0?c.delete(o.pos-a.nodeSize,o.pos):c.delete(o.pos,o.pos+a.nodeSize),t.dispatch(c),!0}return!1}function Vt(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Bt(t){if(s.chrome&&!(t.state.selection.$head.parentOffset>0)){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;Vt(t,o,!0),setTimeout((function(){return Vt(t,o,!1)}),20)}}}function Lt(t){var e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function Wt(t,e){var n=e.keyCode,r=Lt(e);return 8==n||s.mac&&72==n&&"c"==r?Ft(t,-1)||Rt(t):46==n||s.mac&&68==n&&"c"==r?Ft(t,1)||$t(t):13==n||27==n||(37==n?Dt(t,-1,r)||Rt(t):39==n?Dt(t,1,r)||$t(t):38==n?zt(t,-1,r)||Rt(t):40==n?Bt(t)||zt(t,1,r)||$t(t):r==(s.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function qt(t,e){var n,o,i=t.root.getSelection(),s=t.state.doc,a=t.docView.nearestDesc(i.focusNode),c=a&&0==a.size,l=t.docView.posFromDOM(i.focusNode,i.focusOffset),u=s.resolve(l);if(w(i)){n=u;while(a&&!a.node)a=a.parent;if(a&&a.node.isAtom&&r["NodeSelection"].isSelectable(a.node)&&a.parent){var f=a.posBefore;o=new r["NodeSelection"](l==f?u:s.resolve(f))}}else n=s.resolve(t.docView.posFromDOM(i.anchorNode,i.anchorOffset));if(!o){var p="pointer"==e||t.state.selection.head<u.pos&&!c?1:-1;o=Qt(t,n,u,p)}return o}function Kt(t,e){var n=t.state.selection;if(Xt(t,n),t.editable?t.hasFocus():te(t)&&document.activeElement.contains(t.dom)){if(t.domObserver.disconnectSelection(),t.cursorWrapper)Gt(t);else{var o,i,s=n.anchor,a=n.head;!Ht||n instanceof r["TextSelection"]||(n.$from.parent.inlineContent||(o=Jt(t,n.from)),n.empty||n.$from.parent.inlineContent||(i=Jt(t,n.to))),t.docView.setSelection(s,a,t.root,e),Ht&&(o&&(o.contentEditable="false"),i&&(i.contentEditable="false")),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):s!=a&&(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Ut(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}St.prototype.getPreMatch=function(t){return t>=this.preMatchOffset?this.preMatched[t-this.preMatchOffset]:null},St.prototype.destroyBetween=function(t,e){if(t!=e){for(var n=t;n<e;n++)this.top.children[n].destroy();this.top.children.splice(t,e-t),this.changed=!0}},St.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},St.prototype.syncToMarks=function(t,e,n){var r=0,o=this.stack.length>>1,i=Math.min(o,t.length);while(r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(t[r])&&!1!==t[r].type.spec.spanning)r++;while(r<o)this.destroyRest(),this.top.dirty=Y,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;while(o<t.length){this.stack.push(this.top,this.index+1);for(var s=-1,a=this.index;a<Math.min(this.index+3,this.top.children.length);a++)if(this.top.children[a].matchesMark(t[o])){s=a;break}if(s>-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{var c=st.create(this.top,t[o],e,n);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}},St.prototype.findNodeMatch=function(t,e,n,r){var o=-1,i=r<0?void 0:this.getPreMatch(r),s=this.top.children;if(i&&i.matchesNode(t,e,n))o=s.indexOf(i);else for(var a=this.index,c=Math.min(s.length,a+5);a<c;a++){var l=s[a];if(l.matchesNode(t,e,n)&&this.preMatched.indexOf(l)<0){o=a;break}}return!(o<0)&&(this.destroyBetween(this.index,o),this.index++,!0)},St.prototype.updateNextNode=function(t,e,n,r,o){if(this.index==this.top.children.length)return!1;var i=this.top.children[this.index];if(i instanceof at){var s=this.preMatched.indexOf(i);if(s>-1&&s+this.preMatchOffset!=o)return!1;var a=i.dom,c=this.lock&&(a==this.lock||1==a.nodeType&&a.contains(this.lock.parentNode))&&!(t.isText&&i.node&&i.node.isText&&i.nodeDOM.nodeValue==t.text&&i.dirty!=tt&&bt(e,i.outerDeco));if(!c&&i.update(t,e,n,r))return i.dom!=a&&(this.changed=!0),this.index++,!0}return!1},St.prototype.addNode=function(t,e,n,r,o){this.top.children.splice(this.index++,0,at.create(this.top,t,e,n,r,o)),this.changed=!0},St.prototype.placeWidget=function(t,e,n){if(this.index<this.top.children.length&&this.top.children[this.index].matchesWidget(t))this.index++;else{var r=new ot(this.top,t,e,n);this.top.children.splice(this.index++,0,r),this.changed=!0}},St.prototype.addTextblockHacks=function(){var t=this.top.children[this.index-1];while(t instanceof st)t=t.children[t.children.length-1];if(!t||!(t instanceof lt)||/\n$/.test(t.node.text))if(this.index<this.top.children.length&&this.top.children[this.index].matchesHack())this.index++;else{var e=document.createElement("br");this.top.children.splice(this.index++,0,new ut(this.top,rt,e,null)),this.changed=!0}};var Ht=s.safari||s.chrome&&s.chrome_version<63;function Jt(t,e){var n=t.docView.domFromPos(e),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,s=o?r.childNodes[o-1]:null;if((!i||"false"==i.contentEditable)&&(!s||"false"==s.contentEditable)){if(i)return i.contentEditable="true",i;if(s)return s.contentEditable="true",s}}function Ut(t){var e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.hideSelectionGuard);var n=t.root.getSelection(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(e.removeEventListener("selectionchange",t.hideSelectionGuard),t.dom.classList.remove("ProseMirror-hideselection"))})}function Gt(t){var e=t.root.getSelection(),n=document.createRange(),r=t.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,p(r)+1):n.setEnd(r,0),n.collapse(!1),e.removeAllRanges(),e.addRange(n),!o&&!t.state.selection.visible&&s.ie&&s.ie_version<=11&&(r.disabled=!0,r.disabled=!1)}function Xt(t,e){if(e instanceof r["NodeSelection"]){var n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Yt(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Yt(t)}function Yt(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=null)}function Qt(t,e,n,o){return t.someProp("createSelectionBetween",(function(r){return r(t,e,n)}))||r["TextSelection"].between(e,n,o)}function Zt(t){return(!t.editable||t.root.activeElement==t.dom)&&te(t)}function te(t){var e=t.root.getSelection();if(!e.anchorNode)return!1;try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch(n){return!1}}function ee(t){var e=t.docView.domFromPos(t.state.selection.anchor),n=t.root.getSelection();return v(e.node,e.offset,n.anchorNode,n.anchorOffset)}function ne(t,e,n){var r=t.docView.parseRange(e,n),i=r.node,a=r.fromOffset,c=r.toOffset,l=r.from,u=r.to,f=t.root.getSelection(),p=null,d=f.anchorNode;if(d&&t.dom.contains(1==d.nodeType?d:d.parentNode)&&(p=[{node:d,offset:f.anchorOffset}],w(f)||p.push({node:f.focusNode,offset:f.focusOffset})),s.chrome&&8===t.lastKeyCode)for(var h=c;h>a;h--){var v=i.childNodes[h-1],m=v.pmViewDesc;if("BR"==v.nodeType&&!m){c=h;break}if(!m||m.size)break}var g=t.state.doc,y=t.someProp("domParser")||o["DOMParser"].fromSchema(t.state.schema),b=g.resolve(l),S=null,x=y.parse(i,{topNode:b.parent,topMatch:b.parent.contentMatchAt(b.index()),topOpen:!0,from:a,to:c,preserveWhitespace:!b.parent.type.spec.code||"full",editableContent:!0,findPositions:p,ruleFromNode:re(y,b),context:b});if(p&&null!=p[0].pos){var k=p[0].pos,C=p[1]&&p[1].pos;null==C&&(C=k),S={anchor:k+l,head:C+l}}return{doc:x,sel:S,from:l,to:u}}function re(t,e){return function(n){var r=n.pmViewDesc;if(r)return r.parseRule();if("BR"==n.nodeName&&n.parentNode){if(s.safari&&/^(ul|ol)$/i.test(n.parentNode.nodeName))return t.matchTag(document.createElement("li"),e);if(n.parentNode.lastChild==n||s.safari&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if("IMG"==n.nodeName&&n.getAttribute("mark-placeholder"))return{ignore:!0}}}function oe(t,e,n,o){if(e<0){var i=t.lastSelectionTime>Date.now()-50?t.lastSelectionOrigin:null,a=qt(t,i);if(!t.state.selection.eq(a)){var c=t.state.tr.setSelection(a);"pointer"==i?c.setMeta("pointer",!0):"key"==i&&c.scrollIntoView(),t.dispatch(c)}}else{var l=t.state.doc.resolve(e),u=l.sharedDepth(n);e=l.before(u+1),n=t.state.doc.resolve(n).after(u+1);var f,p,d=t.state.selection,h=ne(t,e,n),v=t.state.doc,m=v.slice(h.from,h.to);8===t.lastKeyCode&&Date.now()-100<t.lastKeyCodeTime?(f=t.state.selection.to,p="end"):(f=t.state.selection.from,p="start"),t.lastKeyCode=null;var g=le(m.content,h.doc.content,h.from,f,p);if(!g){if(!(o&&d instanceof r["TextSelection"]&&!d.empty&&d.$head.sameParent(d.$anchor))||t.composing||h.sel&&h.sel.anchor!=h.sel.head){if(h.sel){var y=ie(t,t.state.doc,h.sel);y&&!y.eq(t.state.selection)&&t.dispatch(t.state.tr.setSelection(y))}return}g={start:d.from,endA:d.to,endB:d.to}}t.domChangeCount++,t.state.selection.from<t.state.selection.to&&g.start==g.endB&&t.state.selection instanceof r["TextSelection"]&&(g.start>t.state.selection.from&&g.start<=t.state.selection.from+2?g.start=t.state.selection.from:g.endA<t.state.selection.to&&g.endA>=t.state.selection.to-2&&(g.endB+=t.state.selection.to-g.endA,g.endA=t.state.selection.to)),s.ie&&s.ie_version<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>h.from&&"  "==h.doc.textBetween(g.start-h.from-1,g.start-h.from+1)&&(g.start--,g.endA--,g.endB--);var b,w=h.doc.resolveNoCache(g.start-h.from),x=h.doc.resolveNoCache(g.endB-h.from);if(!(!w.sameParent(x)&&w.pos<h.doc.content.size&&(b=r["Selection"].findFrom(h.doc.resolve(w.pos+1),1,!0))&&b.head==x.pos&&t.someProp("handleKeyDown",(function(e){return e(t,S(13,"Enter"))}))))if(t.state.selection.anchor>g.start&&ae(v,g.start,g.endA,w,x)&&t.someProp("handleKeyDown",(function(e){return e(t,S(8,"Backspace"))})))s.android&&s.chrome&&t.domObserver.suppressSelectionUpdates();else{var k,C,O,M,N=g.start,A=g.endA;if(w.sameParent(x)&&w.parent.inlineContent)if(w.pos==x.pos)s.ie&&s.ie_version<=11&&0==w.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout((function(){return Kt(t)}),20)),k=t.state.tr.delete(N,A),C=v.resolve(g.start).marksAcross(v.resolve(g.endA));else if(g.endA==g.endB&&(M=v.resolve(g.start))&&(O=se(w.parent.content.cut(w.parentOffset,x.parentOffset),M.parent.content.cut(M.parentOffset,g.endA-M.start()))))k=t.state.tr,"add"==O.type?k.addMark(N,A,O.mark):k.removeMark(N,A,O.mark);else if(w.parent.child(w.index()).isText&&w.index()==x.index()-(x.textOffset?0:1)){var _=w.parent.textBetween(w.parentOffset,x.parentOffset);if(t.someProp("handleTextInput",(function(e){return e(t,N,A,_)})))return;k=t.state.tr.insertText(_,N,A)}if(k||(k=t.state.tr.replace(N,A,h.doc.slice(g.start-h.from,g.endB-h.from))),h.sel){var T=ie(t,k.doc,h.sel);T&&!(s.chrome&&s.android&&t.composing&&T.empty&&T.head==N||s.ie&&T.empty&&T.head==N)&&k.setSelection(T)}C&&k.ensureMarks(C),t.dispatch(k.scrollIntoView())}}}function ie(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Qt(t,e.resolve(n.anchor),e.resolve(n.head))}function se(t,e){for(var n,r,i,s=t.firstChild.marks,a=e.firstChild.marks,c=s,l=a,u=0;u<a.length;u++)c=a[u].removeFromSet(c);for(var f=0;f<s.length;f++)l=s[f].removeFromSet(l);if(1==c.length&&0==l.length)r=c[0],n="add",i=function(t){return t.mark(r.addToSet(t.marks))};else{if(0!=c.length||1!=l.length)return null;r=l[0],n="remove",i=function(t){return t.mark(r.removeFromSet(t.marks))}}for(var p=[],d=0;d<e.childCount;d++)p.push(i(e.child(d)));if(o["Fragment"].from(p).eq(t))return{mark:r,type:n}}function ae(t,e,n,r,o){if(!r.parent.isTextblock||n-e<=o.pos-r.pos||ce(r,!0,!1)<o.pos)return!1;var i=t.resolve(e);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var s=t.resolve(ce(i,!0,!0));return!(!s.parent.isTextblock||s.pos>n||ce(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function ce(t,e,n){var r=t.depth,o=e?t.end():t.pos;while(r>0&&(e||t.indexAfter(r)==t.node(r).childCount))r--,o++,e=!1;if(n){var i=t.node(r).maybeChild(t.indexAfter(r));while(i&&!i.isLeaf)i=i.firstChild,o++}return o}function le(t,e,n,r,o){var i=t.findDiffStart(e,n);if(null==i)return null;var s=t.findDiffEnd(e,n+t.size,n+e.size),a=s.a,c=s.b;if("end"==o){var l=Math.max(0,i-Math.min(a,c));r-=a+l-i}if(a<i&&t.size<e.size){var u=r<=i&&r>=a?i-r:0;i-=u,c=i+(c-a),a=i}else if(c<i){var f=r<=i&&r>=c?i-r:0;i-=f,a=i+(a-c),c=i}return{start:i,endA:a,endB:c}}function ue(t,e){var n=[],r=e.content,i=e.openStart,s=e.openEnd;while(i>1&&s>1&&1==r.childCount&&1==r.firstChild.childCount){i--,s--;var a=r.firstChild;n.push(a.type.name,a.type.hasRequiredAttrs()?a.attrs:null),r=a.content}var c=t.someProp("clipboardSerializer")||o["DOMSerializer"].fromSchema(t.state.schema),l=we(),u=l.createElement("div");u.appendChild(c.serializeFragment(r,{document:l}));var f,p=u.firstChild;while(p&&1==p.nodeType&&(f=ye[p.nodeName.toLowerCase()])){for(var d=f.length-1;d>=0;d--){var h=l.createElement(f[d]);while(u.firstChild)h.appendChild(u.firstChild);u.appendChild(h)}p=u.firstChild}p&&1==p.nodeType&&p.setAttribute("data-pm-slice",i+" "+s+" "+JSON.stringify(n));var v=t.someProp("clipboardTextSerializer",(function(t){return t(e)}))||e.content.textBetween(0,e.content.size,"\n\n");return{dom:u,text:v}}function fe(t,e,n,r,i){var s,a,c=i.parent.type.spec.code;if(!n&&!e)return null;var l=e&&(r||c||!n);if(l){if(t.someProp("transformPastedText",(function(t){e=t(e)})),c)return new o["Slice"](o["Fragment"].from(t.state.schema.text(e)),0,0);var u=t.someProp("clipboardTextParser",(function(t){return t(e,i)}));u?a=u:(s=document.createElement("div"),e.trim().split(/(?:\r\n?|\n)+/).forEach((function(t){s.appendChild(document.createElement("p")).textContent=t})))}else t.someProp("transformPastedHTML",(function(t){n=t(n)})),s=Se(n);var f=s&&s.querySelector("[data-pm-slice]"),p=f&&/^(\d+) (\d+) (.*)/.exec(f.getAttribute("data-pm-slice"));if(!a){var d=t.someProp("clipboardParser")||t.someProp("domParser")||o["DOMParser"].fromSchema(t.state.schema);a=d.parseSlice(s,{preserveWhitespace:!(!l&&!p),context:i})}return a=p?xe(ge(a,+p[1],+p[2]),p[3]):o["Slice"].maxOpen(pe(a.content,i),!1),t.someProp("transformPasted",(function(t){a=t(a)})),a}function pe(t,e){if(t.childCount<2)return t;for(var n=function(n){var r=e.node(n),i=r.contentMatchAt(e.index(n)),s=void 0,a=[];if(t.forEach((function(t){if(a){var e,n=i.findWrapping(t.type);if(!n)return a=null;if(e=a.length&&s.length&&he(n,s,t,a[a.length-1],0))a[a.length-1]=e;else{a.length&&(a[a.length-1]=ve(a[a.length-1],s.length));var r=de(t,n);a.push(r),i=i.matchType(r.type,r.attrs),s=n}}})),a)return{v:o["Fragment"].from(a)}},r=e.depth;r>=0;r--){var i=n(r);if(i)return i.v}return t}function de(t,e,n){void 0===n&&(n=0);for(var r=e.length-1;r>=n;r--)t=e[r].create(null,o["Fragment"].from(t));return t}function he(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){var s=he(t,e,n,r.lastChild,i+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));var a=r.contentMatchAt(r.childCount);if(a.matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(o["Fragment"].from(de(n,t,i+1))))}}function ve(t,e){if(0==e)return t;var n=t.content.replaceChild(t.childCount-1,ve(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(o["Fragment"].empty,!0);return t.copy(n.append(r))}function me(t,e,n,r,i,s){var a=e<0?t.firstChild:t.lastChild,c=a.content;return i<r-1&&(c=me(c,e,n,r,i+1,s)),i>=n&&(c=e<0?a.contentMatchAt(0).fillBefore(c,t.childCount>1||s<=i).append(c):c.append(a.contentMatchAt(a.childCount).fillBefore(o["Fragment"].empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(c))}function ge(t,e,n){return e<t.openStart&&(t=new o["Slice"](me(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new o["Slice"](me(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}var ye={thead:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},be=null;function we(){return be||(be=document.implementation.createHTMLDocument("title"))}function Se(t){var e=/(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));var n,r=we().createElement("div"),o=/(?:<meta [^>]*>)*<([a-z][^>\s]+)/i.exec(t),i=0;(n=o&&ye[o[1].toLowerCase()])&&(t=n.map((function(t){return"<"+t+">"})).join("")+t+n.map((function(t){return"</"+t+">"})).reverse().join(""),i=n.length),r.innerHTML=t;for(var s=0;s<i;s++)r=r.firstChild;return r}function xe(t,e){if(!t.size)return t;var n,r=t.content.firstChild.type.schema;try{n=JSON.parse(e)}catch(u){return t}for(var i=t.content,s=t.openStart,a=t.openEnd,c=n.length-2;c>=0;c-=2){var l=r.nodes[n[c]];if(!l||l.hasRequiredAttrs())break;i=o["Fragment"].from(l.create(n[c+1],i)),s++,a++}return new o["Slice"](i,s,a)}var ke={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Ce=s.ie&&s.ie_version<=11,Oe=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};Oe.prototype.set=function(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset},Oe.prototype.eq=function(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset};var Me=function(t,e){var n=this;this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=!1,this.observer=window.MutationObserver&&new window.MutationObserver((function(t){for(var e=0;e<t.length;e++)n.queue.push(t[e]);s.ie&&s.ie_version<=11&&t.some((function(t){return"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new Oe,Ce&&(this.onCharData=function(t){n.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};Me.prototype.flushSoon=function(){var t=this;this.flushingSoon||(this.flushingSoon=!0,window.setTimeout((function(){t.flushingSoon=!1,t.flush()}),20))},Me.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,ke),Ce&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Me.prototype.stop=function(){var t=this;if(this.observer){var e=this.observer.takeRecords();if(e.length){for(var n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout((function(){return t.flush()}),20)}this.observer.disconnect()}Ce&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()},Me.prototype.connectSelection=function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)},Me.prototype.disconnectSelection=function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)},Me.prototype.suppressSelectionUpdates=function(){var t=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return t.suppressingSelectionUpdates=!1}),50)},Me.prototype.onSelectionChange=function(){if(Zt(this.view)){if(this.suppressingSelectionUpdates)return Kt(this.view);if(s.ie&&s.ie_version<=11&&!this.view.state.selection.empty){var t=this.view.root.getSelection();if(t.focusNode&&v(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}},Me.prototype.setCurSelection=function(){this.currentSelection.set(this.view.root.getSelection())},Me.prototype.ignoreSelectionChange=function(t){if(0==t.rangeCount)return!0;var e=t.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(e);return n&&n.ignoreMutation({type:"selection",target:3==e.nodeType?e.parentNode:e})},Me.prototype.flush=function(){if(this.view.docView&&!this.flushingSoon){var t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);var e=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&te(this.view)&&!this.ignoreSelectionChange(e),r=-1,o=-1,i=!1,s=[];if(this.view.editable)for(var a=0;a<t.length;a++){var c=this.registerMutation(t[a],s);c&&(r=r<0?c.from:Math.min(c.from,r),o=o<0?c.to:Math.max(c.to,o),c.typeOver&&!this.view.composing&&(i=!0))}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),Ae(this.view)),this.handleDOMChange(r,o,i),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(e)||Kt(this.view))}},Me.prototype.registerMutation=function(t,e){if(e.indexOf(t.target)>-1)return null;var n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){var r=t.previousSibling,o=t.nextSibling;if(s.ie&&s.ie_version<=11&&t.addedNodes.length)for(var i=0;i<t.addedNodes.length;i++){var a=t.addedNodes[i],c=a.previousSibling,l=a.nextSibling;(!c||Array.prototype.indexOf.call(t.addedNodes,c)<0)&&(r=c),(!l||Array.prototype.indexOf.call(t.addedNodes,l)<0)&&(o=l)}for(var u=r&&r.parentNode==t.target?p(r)+1:0,f=n.localPosFromDOM(t.target,u,-1),d=o&&o.parentNode==t.target?p(o):t.target.childNodes.length,h=0;h<t.addedNodes.length;h++)e.push(t.addedNodes[h]);var v=n.localPosFromDOM(t.target,d,1);return{from:f,to:v}}return"attributes"==t.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}};var Ne=!1;function Ae(t){Ne||(Ne=!0,"normal"==getComputedStyle(t.dom).whiteSpace&&console["warn"]("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."))}var _e={},Te={};function De(t){t.shiftKey=!1,t.mouseDown=null,t.lastKeyCode=null,t.lastKeyCodeTime=0,t.lastClick={time:0,x:0,y:0,type:""},t.lastSelectionOrigin=null,t.lastSelectionTime=0,t.composing=!1,t.composingTimeout=null,t.compositionNodes=[],t.compositionEndedAt=-2e8,t.domObserver=new Me(t,(function(e,n,r){return oe(t,e,n,r)})),t.domObserver.start(),t.domChangeCount=0,t.eventHandlers=Object.create(null);var e=function(e){var n=_e[e];t.dom.addEventListener(e,t.eventHandlers[e]=function(e){!Ie(t,e)||$e(t,e)||!t.editable&&e.type in Te||n(t,e)})};for(var n in _e)e(n);s.safari&&t.dom.addEventListener("input",(function(){return null})),Re(t)}function Ee(t,e){t.lastSelectionOrigin=e,t.lastSelectionTime=Date.now()}function Pe(t){for(var e in t.domObserver.stop(),t.eventHandlers)t.dom.removeEventListener(e,t.eventHandlers[e]);clearTimeout(t.composingTimeout)}function Re(t){t.someProp("handleDOMEvents",(function(e){for(var n in e)t.eventHandlers[n]||t.dom.addEventListener(n,t.eventHandlers[n]=function(e){return $e(t,e)})}))}function $e(t,e){return t.someProp("handleDOMEvents",(function(n){var r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)}))}function Ie(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(var n=e.target;n!=t.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function je(t,e){$e(t,e)||!_e[e.type]||!t.editable&&e.type in Te||_e[e.type](t,e)}function ze(t){return{left:t.clientX,top:t.clientY}}function Fe(t,e){var n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Ve(t,e,n,r,o){if(-1==r)return!1;for(var i=t.state.doc.resolve(r),s=function(r){if(t.someProp(e,(function(e){return r>i.depth?e(t,n,i.nodeAfter,i.before(r),o,!0):e(t,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},a=i.depth+1;a>0;a--){var c=s(a);if(c)return c.v}return!1}function Be(t,e,n){t.focused||t.focus();var r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function Le(t,e){if(-1==e)return!1;var n=t.state.doc.resolve(e),o=n.nodeAfter;return!!(o&&o.isAtom&&r["NodeSelection"].isSelectable(o))&&(Be(t,new r["NodeSelection"](n),"pointer"),!0)}function We(t,e){if(-1==e)return!1;var n,o,i=t.state.selection;i instanceof r["NodeSelection"]&&(n=i.node);for(var s=t.state.doc.resolve(e),a=s.depth+1;a>0;a--){var c=a>s.depth?s.nodeAfter:s.node(a);if(r["NodeSelection"].isSelectable(c)){o=n&&i.$from.depth>0&&a>=i.$from.depth&&s.before(i.$from.depth+1)==i.$from.pos?s.before(i.$from.depth):s.before(a);break}}return null!=o&&(Be(t,r["NodeSelection"].create(t.state.doc,o),"pointer"),!0)}function qe(t,e,n,r,o){return Ve(t,"handleClickOn",e,n,r)||t.someProp("handleClick",(function(n){return n(t,e,r)}))||(o?We(t,n):Le(t,n))}function Ke(t,e,n,r){return Ve(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",(function(n){return n(t,e,r)}))}function He(t,e,n,r){return Ve(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",(function(n){return n(t,e,r)}))||Je(t,n)}function Je(t,e){var n=t.state.doc;if(-1==e)return!!n.inlineContent&&(Be(t,r["TextSelection"].create(n,0,n.content.size),"pointer"),!0);for(var o=n.resolve(e),i=o.depth+1;i>0;i--){var s=i>o.depth?o.nodeAfter:o.node(i),a=o.before(i);if(s.inlineContent)Be(t,r["TextSelection"].create(n,a+1,a+1+s.content.size),"pointer");else{if(!r["NodeSelection"].isSelectable(s))continue;Be(t,r["NodeSelection"].create(n,a),"pointer")}return!0}}function Ue(t){return tn(t)}Te.keydown=function(t,e){t.shiftKey=16==e.keyCode||e.shiftKey,Ye(t,e)||(t.lastKeyCode=e.keyCode,t.lastKeyCodeTime=Date.now(),t.someProp("handleKeyDown",(function(n){return n(t,e)}))||Wt(t,e)?e.preventDefault():Ee(t,"key"))},Te.keyup=function(t,e){16==e.keyCode&&(t.shiftKey=!1)},Te.keypress=function(t,e){if(!(Ye(t,e)||!e.charCode||e.ctrlKey&&!e.altKey||s.mac&&e.metaKey))if(t.someProp("handleKeyPress",(function(n){return n(t,e)})))e.preventDefault();else{var n=t.state.selection;if(!(n instanceof r["TextSelection"])||!n.$from.sameParent(n.$to)){var o=String.fromCharCode(e.charCode);t.someProp("handleTextInput",(function(e){return e(t,n.$from.pos,n.$to.pos,o)}))||t.dispatch(t.state.tr.insertText(o).scrollIntoView()),e.preventDefault()}}};var Ge=s.mac?"metaKey":"ctrlKey";_e.mousedown=function(t,e){t.shiftKey=e.shiftKey;var n=Ue(t),r=Date.now(),o="singleClick";r-t.lastClick.time<500&&Fe(e,t.lastClick)&&!e[Ge]&&("singleClick"==t.lastClick.type?o="doubleClick":"doubleClick"==t.lastClick.type&&(o="tripleClick")),t.lastClick={time:r,x:e.clientX,y:e.clientY,type:o};var i=t.posAtCoords(ze(e));i&&("singleClick"==o?t.mouseDown=new Xe(t,i,e,n):("doubleClick"==o?Ke:He)(t,i.pos,i.inside,e)?e.preventDefault():Ee(t,"pointer"))};var Xe=function(t,e,n,o){var i,a,c=this;if(this.view=t,this.startDoc=t.state.doc,this.pos=e,this.event=n,this.flushed=o,this.selectNode=n[Ge],this.allowDefault=n.shiftKey,e.inside>-1)i=t.state.doc.nodeAt(e.inside),a=e.inside;else{var l=t.state.doc.resolve(e.pos);i=l.parent,a=l.depth?l.before():0}this.mightDrag=null;var u=o?null:n.target,f=u?t.docView.nearestDesc(u,!0):null;this.target=f?f.dom:null,(i.type.spec.draggable&&!1!==i.type.spec.selectable||t.state.selection instanceof r["NodeSelection"]&&a==t.state.selection.from)&&(this.mightDrag={node:i,pos:a,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&s.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){return c.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Ee(t,"pointer")};function Ye(t,e){return!!t.composing||!!(s.safari&&Math.abs(e.timeStamp-t.compositionEndedAt)<500)&&(t.compositionEndedAt=-2e8,!0)}Xe.prototype.done=function(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!1),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.view.mouseDown=null},Xe.prototype.up=function(t){if(this.done(),this.view.dom.contains(3==t.target.nodeType?t.target.parentNode:t.target)){var e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(ze(t))),this.allowDefault||!e?Ee(this.view,"pointer"):qe(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():!this.flushed&&(!s.chrome||this.view.state.selection instanceof r["TextSelection"]||e.pos!=this.view.state.selection.from&&e.pos!=this.view.state.selection.to)?Ee(this.view,"pointer"):(Be(this.view,r["Selection"].near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault())}},Xe.prototype.move=function(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0),Ee(this.view,"pointer")},_e.touchdown=function(t){Ue(t),Ee(t,"pointer")},_e.contextmenu=function(t){return Ue(t)};var Qe=s.android?5e3:-1;function Ze(t,e){clearTimeout(t.composingTimeout),e>-1&&(t.composingTimeout=setTimeout((function(){return tn(t)}),e))}function tn(t,e){t.composing=!1;while(t.compositionNodes.length>0)t.compositionNodes.pop().markParentsDirty();return!(!e&&!t.docView.dirty)&&(t.updateState(t.state),!0)}function en(t,e){var n=t.dom.ownerDocument,r=n.body.appendChild(n.createElement("div"));r.appendChild(e),r.style.cssText="position: fixed; left: -10000px; top: 10px";var o=getSelection(),i=n.createRange();i.selectNodeContents(e),t.dom.blur(),o.removeAllRanges(),o.addRange(i),setTimeout((function(){n.body.removeChild(r),t.focus()}),50)}Te.compositionstart=Te.compositionupdate=function(t){if(!t.composing){t.domObserver.flush();var e=t.state,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(t){return!1===t.type.spec.inclusive}))))t.markCursor=t.state.storedMarks||n.marks(),tn(t,!0),t.markCursor=null;else if(tn(t),s.gecko&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=t.root.getSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}t.composing=!0}Ze(t,Qe)},Te.compositionend=function(t,e){t.composing&&(t.composing=!1,t.compositionEndedAt=e.timeStamp,Ze(t,20))};var nn=s.ie&&s.ie_version<15||s.ios&&s.webkit_version<604;function rn(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}function on(t,e){var n=t.dom.ownerDocument,r=t.shiftKey||t.state.selection.$from.parent.type.spec.code,o=n.body.appendChild(n.createElement(r?"textarea":"div"));r||(o.contentEditable="true"),o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus(),setTimeout((function(){t.focus(),n.body.removeChild(o),r?sn(t,o.value,null,e):sn(t,o.textContent,o.innerHTML,e)}),50)}function sn(t,e,n,r){var i=fe(t,e,n,t.shiftKey,t.state.selection.$from);if(!t.someProp("handlePaste",(function(e){return e(t,r,i||o["Slice"].empty)}))&&i){var s=rn(i),a=s?t.state.tr.replaceSelectionWith(s,t.shiftKey):t.state.tr.replaceSelection(i);t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste"))}}_e.copy=Te.cut=function(t,e){var n=t.state.selection,r="cut"==e.type;if(!n.empty){var o=nn?null:e.clipboardData,i=n.content(),s=ue(t,i),a=s.dom,c=s.text;o?(e.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",c)):en(t,a),r&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Te.paste=function(t,e){var n=nn?null:e.clipboardData,r=n&&n.getData("text/html"),o=n&&n.getData("text/plain");n&&(r||o||n.files.length)?(sn(t,o,r,e),e.preventDefault()):on(t,e)};var an=function(t,e){this.slice=t,this.move=e},cn=s.mac?"altKey":"ctrlKey";for(var ln in _e.dragstart=function(t,e){var n=t.mouseDown;if(n&&n.done(),e.dataTransfer){var o=t.state.selection,i=o.empty?null:t.posAtCoords(ze(e));if(i&&i.pos>=o.from&&i.pos<=(o instanceof r["NodeSelection"]?o.to-1:o.to));else if(n&&n.mightDrag)t.dispatch(t.state.tr.setSelection(r["NodeSelection"].create(t.state.doc,n.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){var s=t.docView.nearestDesc(e.target,!0);if(!s||!s.node.type.spec.draggable||s==t.docView)return;t.dispatch(t.state.tr.setSelection(r["NodeSelection"].create(t.state.doc,s.posBefore)))}var a=t.state.selection.content(),c=ue(t,a),l=c.dom,u=c.text;e.dataTransfer.clearData(),e.dataTransfer.setData(nn?"Text":"text/html",l.innerHTML),nn||e.dataTransfer.setData("text/plain",u),t.dragging=new an(a,!e[cn])}},_e.dragend=function(t){window.setTimeout((function(){return t.dragging=null}),50)},Te.dragover=Te.dragenter=function(t,e){return e.preventDefault()},Te.drop=function(t,e){var n=t.dragging;if(t.dragging=null,e.dataTransfer){var o=t.posAtCoords(ze(e));if(o){var s=t.state.doc.resolve(o.pos);if(s){var a=n&&n.slice||fe(t,e.dataTransfer.getData(nn?"Text":"text/plain"),nn?null:e.dataTransfer.getData("text/html"),!1,s);if(a&&(e.preventDefault(),!t.someProp("handleDrop",(function(r){return r(t,e,a,n&&n.move)})))){var c=a?Object(i["f"])(t.state.doc,s.pos,a):s.pos;null==c&&(c=s.pos);var l=t.state.tr;n&&n.move&&l.deleteSelection();var u=l.mapping.map(c),f=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,p=l.doc;if(f?l.replaceRangeWith(u,u,a.content.firstChild):l.replaceRange(u,u,a),!l.doc.eq(p)){var d=l.doc.resolve(u);f&&r["NodeSelection"].isSelectable(a.content.firstChild)&&d.nodeAfter&&d.nodeAfter.sameMarkup(a.content.firstChild)?l.setSelection(new r["NodeSelection"](d)):l.setSelection(Qt(t,d,l.doc.resolve(l.mapping.map(c)))),t.focus(),t.dispatch(l.setMeta("uiEvent","drop"))}}}}}},_e.focus=function(t){t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0)},_e.blur=function(t){t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),t.domObserver.currentSelection.set({}),t.focused=!1)},_e.beforeinput=function(t,e){if(s.chrome&&s.android&&"deleteContentBackward"==e.inputType){var n=t.domChangeCount;setTimeout((function(){if(t.domChangeCount==n&&(t.dom.blur(),t.focus(),!t.someProp("handleKeyDown",(function(e){return e(t,S(8,"Backspace"))})))){var e=t.state.selection,r=e.$cursor;r&&r.pos>0&&t.dispatch(t.state.tr.delete(r.pos-1,r.pos).scrollIntoView())}}),50)}},Te)_e[ln]=Te[ln];function un(t,e){if(t==e)return!0;for(var n in t)if(t[n]!==e[n])return!1;for(var r in e)if(!(r in t))return!1;return!0}var fn=function(t,e){this.spec=e||gn,this.side=this.spec.side||0,this.toDOM=t};fn.prototype.map=function(t,e,n,r){var o=t.mapResult(e.from+r,this.side<0?-1:1),i=o.pos,s=o.deleted;return s?null:new hn(i-n,i-n,this)},fn.prototype.valid=function(){return!0},fn.prototype.eq=function(t){return this==t||t instanceof fn&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&un(this.spec,t.spec))};var pn=function(t,e){this.spec=e||gn,this.attrs=t};pn.prototype.map=function(t,e,n,r){var o=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,i=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new hn(o,i,this)},pn.prototype.valid=function(t,e){return e.from<e.to},pn.prototype.eq=function(t){return this==t||t instanceof pn&&un(this.attrs,t.attrs)&&un(this.spec,t.spec)},pn.is=function(t){return t.type instanceof pn};var dn=function(t,e){this.spec=e||gn,this.attrs=t};dn.prototype.map=function(t,e,n,r){var o=t.mapResult(e.from+r,1);if(o.deleted)return null;var i=t.mapResult(e.to+r,-1);return i.deleted||i.pos<=o.pos?null:new hn(o.pos-n,i.pos-n,this)},dn.prototype.valid=function(t,e){var n=t.content.findIndex(e.from),r=n.index,o=n.offset;return o==e.from&&o+t.child(r).nodeSize==e.to},dn.prototype.eq=function(t){return this==t||t instanceof dn&&un(this.attrs,t.attrs)&&un(this.spec,t.spec)};var hn=function(t,e,n){this.from=t,this.to=e,this.type=n},vn={spec:{configurable:!0}};hn.prototype.copy=function(t,e){return new hn(t,e,this.type)},hn.prototype.eq=function(t){return this.type.eq(t.type)&&this.from==t.from&&this.to==t.to},hn.prototype.map=function(t,e,n){return this.type.map(t,this,e,n)},hn.widget=function(t,e,n){return new hn(t,t,new fn(e,n))},hn.inline=function(t,e,n,r){return new hn(t,e,new pn(n,r))},hn.node=function(t,e,n,r){return new hn(t,e,new dn(n,r))},vn.spec.get=function(){return this.type.spec},Object.defineProperties(hn.prototype,vn);var mn=[],gn={},yn=function(t,e){this.local=t&&t.length?t:mn,this.children=e&&e.length?e:mn};yn.create=function(t,e){return e.length?Mn(e,t,0,gn):bn},yn.prototype.find=function(t,e,n){var r=[];return this.findInner(null==t?0:t,null==e?1e9:e,r,0,n),r},yn.prototype.findInner=function(t,e,n,r,o){for(var i=0;i<this.local.length;i++){var s=this.local[i];s.from<=e&&s.to>=t&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(var a=0;a<this.children.length;a+=3)if(this.children[a]<e&&this.children[a+1]>t){var c=this.children[a]+1;this.children[a+2].findInner(t-c,e-c,n,r+c,o)}},yn.prototype.map=function(t,e,n){return this==bn||0==t.maps.length?this:this.mapInner(t,e,0,0,n||gn)},yn.prototype.mapInner=function(t,e,n,r,o){for(var i,s=0;s<this.local.length;s++){var a=this.local[s].map(t,n,r);a&&a.type.valid(e,a)?(i||(i=[])).push(a):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?Sn(this.children,i,t,e,n,r,o):i?new yn(i.sort(Nn)):bn},yn.prototype.add=function(t,e){return e.length?this==bn?yn.create(t,e):this.addInner(t,e,0):this},yn.prototype.addInner=function(t,e,n){var r,o=this,i=0;t.forEach((function(t,s){var a,c=s+n;if(a=Cn(e,t,c)){r||(r=o.children.slice());while(i<r.length&&r[i]<s)i+=3;r[i]==s?r[i+2]=r[i+2].addInner(t,a,c+1):r.splice(i,0,s,s+t.nodeSize,Mn(a,t,c+1,gn)),i+=3}}));var s=xn(i?On(e):e,-n);return new yn(s.length?this.local.concat(s).sort(Nn):this.local,r||this.children)},yn.prototype.remove=function(t){return 0==t.length||this==bn?this:this.removeInner(t,0)},yn.prototype.removeInner=function(t,e){for(var n=this.children,r=this.local,o=0;o<n.length;o+=3){for(var i=void 0,s=n[o]+e,a=n[o+1]+e,c=0,l=void 0;c<t.length;c++)(l=t[c])&&l.from>s&&l.to<a&&(t[c]=null,(i||(i=[])).push(l));if(i){n==this.children&&(n=this.children.slice());var u=n[o+2].removeInner(i,s+1);u!=bn?n[o+2]=u:(n.splice(o,3),o-=3)}}if(r.length)for(var f=0,p=void 0;f<t.length;f++)if(p=t[f])for(var d=0;d<r.length;d++)r[d].type.eq(p.type)&&(r==this.local&&(r=this.local.slice()),r.splice(d--,1));return n==this.children&&r==this.local?this:r.length||n.length?new yn(r,n):bn},yn.prototype.forChild=function(t,e){if(this==bn)return this;if(e.isLeaf)return yn.empty;for(var n,r,o=0;o<this.children.length;o+=3)if(this.children[o]>=t){this.children[o]==t&&(n=this.children[o+2]);break}for(var i=t+1,s=i+e.content.size,a=0;a<this.local.length;a++){var c=this.local[a];if(c.from<s&&c.to>i&&c.type instanceof pn){var l=Math.max(i,c.from)-i,u=Math.min(s,c.to)-i;l<u&&(r||(r=[])).push(c.copy(l,u))}}if(r){var f=new yn(r.sort(Nn));return n?new wn([f,n]):f}return n||bn},yn.prototype.eq=function(t){if(this==t)return!0;if(!(t instanceof yn)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(var e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(var n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0},yn.prototype.locals=function(t){return An(this.localsInner(t))},yn.prototype.localsInner=function(t){if(this==bn)return mn;if(t.inlineContent||!this.local.some(pn.is))return this.local;for(var e=[],n=0;n<this.local.length;n++)this.local[n].type instanceof pn||e.push(this.local[n]);return e};var bn=new yn;yn.empty=bn,yn.removeOverlap=An;var wn=function(t){this.members=t};function Sn(t,e,n,r,o,i,s){for(var a=t.slice(),c=function(t,e,n,r){for(var s=0;s<a.length;s+=3){var c=a[s+1],l=void 0;-1==c||t>c+i||(e>=a[s]+i?a[s+1]=-1:(l=r-n-(e-t)+(i-o))&&(a[s]+=l,a[s+1]+=l))}},l=0;l<n.maps.length;l++)n.maps[l].forEach(c);for(var u=!1,f=0;f<a.length;f+=3)if(-1==a[f+1]){var p=n.map(a[f]+i),d=p-o;if(d<0||d>=r.content.size){u=!0;continue}var h=n.map(t[f+1]+i,-1),v=h-o,m=r.content.findIndex(d),g=m.index,y=m.offset,b=r.maybeChild(g);if(b&&y==d&&y+b.nodeSize==v){var w=a[f+2].mapInner(n,b,p+1,a[f]+i+1,s);w!=bn?(a[f]=d,a[f+1]=v,a[f+2]=w):(a[f+1]=-2,u=!0)}else u=!0}if(u){var S=kn(a,t,e||[],n,o,i,s),x=Mn(S,r,0,s);e=x.local;for(var k=0;k<a.length;k+=3)a[k+1]<0&&(a.splice(k,3),k-=3);for(var C=0,O=0;C<x.children.length;C+=3){var M=x.children[C];while(O<a.length&&a[O]<M)O+=3;a.splice(O,0,x.children[C],x.children[C+1],x.children[C+2])}}return new yn(e&&e.sort(Nn),a)}function xn(t,e){if(!e||!t.length)return t;for(var n=[],r=0;r<t.length;r++){var o=t[r];n.push(new hn(o.from+e,o.to+e,o.type))}return n}function kn(t,e,n,r,o,i,s){function a(t,e){for(var i=0;i<t.local.length;i++){var c=t.local[i].map(r,o,e);c?n.push(c):s.onRemove&&s.onRemove(t.local[i].spec)}for(var l=0;l<t.children.length;l+=3)a(t.children[l+2],t.children[l]+e+1)}for(var c=0;c<t.length;c+=3)-1==t[c+1]&&a(t[c+2],e[c]+i+1);return n}function Cn(t,e,n){if(e.isLeaf)return null;for(var r=n+e.nodeSize,o=null,i=0,s=void 0;i<t.length;i++)(s=t[i])&&s.from>n&&s.to<r&&((o||(o=[])).push(s),t[i]=null);return o}function On(t){for(var e=[],n=0;n<t.length;n++)null!=t[n]&&e.push(t[n]);return e}function Mn(t,e,n,r){var o=[],i=!1;e.forEach((function(e,s){var a=Cn(t,e,s+n);if(a){i=!0;var c=Mn(a,e,n+s+1,r);c!=bn&&o.push(s,s+e.nodeSize,c)}}));for(var s=xn(i?On(t):t,-n).sort(Nn),a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||o.length?new yn(s,o):bn}function Nn(t,e){return t.from-e.from||t.to-e.to}function An(t){for(var e=t,n=0;n<e.length-1;n++){var r=e[n];if(r.from!=r.to)for(var o=n+1;o<e.length;o++){var i=e[o];if(i.from!=r.from){i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),_n(e,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,r.to),_n(e,o+1,i.copy(r.to,i.to)))}}return e}function _n(t,e,n){while(e<t.length&&Nn(n,t[e])>0)e++;t.splice(e,0,n)}function Tn(t){var e=[];return t.someProp("decorations",(function(n){var r=n(t.state);r&&r!=bn&&e.push(r)})),t.cursorWrapper&&e.push(yn.create(t.state.doc,[t.cursorWrapper.deco])),wn.from(e)}wn.prototype.forChild=function(t,e){if(e.isLeaf)return yn.empty;for(var n=[],r=0;r<this.members.length;r++){var o=this.members[r].forChild(t,e);o!=bn&&(o instanceof wn?n=n.concat(o.members):n.push(o))}return wn.from(n)},wn.prototype.eq=function(t){if(!(t instanceof wn)||t.members.length!=this.members.length)return!1;for(var e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0},wn.prototype.locals=function(t){for(var e,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(t);if(o.length)if(e){n&&(e=e.slice(),n=!1);for(var i=0;i<o.length;i++)e.push(o[i])}else e=o}return e?An(n?e:e.sort(Nn)):mn},wn.from=function(t){switch(t.length){case 0:return bn;case 1:return t[0];default:return new wn(t)}};var Dn=function(t,e){this._props=e,this.state=e.state,this.dispatch=this.dispatch.bind(this),this._root=null,this.focused=!1,this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):t.apply?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=$n(this),this.markCursor=null,this.cursorWrapper=null,Rn(this),this.nodeViews=zn(this),this.docView=ct(this.state.doc,Pn(this),Tn(this),this.dom,this),this.lastSelectedViewDesc=null,this.dragging=null,De(this),this.pluginViews=[],this.updatePluginViews()},En={props:{configurable:!0},root:{configurable:!0}};function Pn(t){var e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",(function(n){if("function"==typeof n&&(n=n(t.state)),n)for(var r in n)"class"==r?e.class+=" "+n[r]:e[r]||"contenteditable"==r||"nodeName"==r||(e[r]=String(n[r]))})),[hn.node(0,t.state.doc.content.size,e)]}function Rn(t){var e=t.state.selection,n=e.$head,r=e.$anchor,o=e.visible;if(t.markCursor){var i=document.createElement("img");i.setAttribute("mark-placeholder","true"),t.cursorWrapper={dom:i,deco:hn.widget(n.pos,i,{raw:!0,marks:t.markCursor})}}else if(o||n.pos!=r.pos)t.cursorWrapper=null;else{var s;!t.cursorWrapper||t.cursorWrapper.dom.childNodes.length?(s=document.createElement("div"),s.style.position="absolute",s.style.left="-100000px"):t.cursorWrapper.deco.pos!=n.pos&&(s=t.cursorWrapper.dom),s&&(t.cursorWrapper={dom:s,deco:hn.widget(n.pos,s,{raw:!0})})}}function $n(t){return!t.someProp("editable",(function(e){return!1===e(t.state)}))}function In(t){var e=t.getSelection(),n=e.focusOffset,r=e.focusNode;return r&&3!=r.nodeType?[r,n,1==r.nodeType?r.childNodes[n-1]:null,1==r.nodeType?r.childNodes[n]:null]:null}function jn(t,e){var n=In(e);if(!n||3==n[0].nodeType)return!1;for(var r=0;r<t.length;r++)if(n[r]!=t[r])return!0;return!1}function zn(t){var e={};return t.someProp("nodeViews",(function(t){for(var n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n])})),e}function Fn(t,e){var n=0,r=0;for(var o in t){if(t[o]!=e[o])return!0;n++}for(var i in e)r++;return n!=r}function Vn(t){return void 0===t&&(t={}),new r["Plugin"]({view:function(e){return new Bn(e,t)}})}En.props.get=function(){if(this._props.state!=this.state){var t=this._props;for(var e in this._props={},t)this._props[e]=t[e];this._props.state=this.state}return this._props},Dn.prototype.update=function(t){t.handleDOMEvents!=this._props.handleDOMEvents&&Re(this),this._props=t,this.updateStateInner(t.state,!0)},Dn.prototype.setProps=function(t){var e={};for(var n in this._props)e[n]=this._props[n];for(var r in e.state=this.state,t)e[r]=t[r];this.update(e)},Dn.prototype.updateState=function(t){this.updateStateInner(t,this.state.plugins!=t.plugins)},Dn.prototype.updateStateInner=function(t,e){var n=this,o=this.state,i=!1;if(this.state=t,e){var a=zn(this);Fn(a,this.nodeViews)&&(this.nodeViews=a,i=!0),Re(this)}this.editable=$n(this),Rn(this);var c=Tn(this),l=Pn(this),u=e?"reset":t.scrollToSelection>o.scrollToSelection?"to selection":"preserve",f=i||!this.docView.matchesNode(t.doc,l,c),p=f||!t.selection.eq(o.selection),d="preserve"==u&&p&&null==this.dom.style.overflowAnchor&&O(this);if(p){this.domObserver.stop();var h=!1;if(f){var v=s.chrome&&In(this.root);!i&&this.docView.update(t.doc,l,c,this)||(this.docView.destroy(),this.docView=ct(t.doc,l,c,this.dom,this)),v&&(h=!this.composing&&jn(v,this.root)),s.ie&&s.ie_version<=11&&!o.selection.empty&&t.selection.empty&&t.doc.content.size<o.doc.content.size&&(h=!0)}h||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&ee(this))?Kt(this,h):(Xt(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(o),"reset"==u)this.dom.scrollTop=0;else if("to selection"==u){var m=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(t){return t(n)}))||(t.selection instanceof r["NodeSelection"]?C(this,this.docView.domAfterPos(t.selection.from).getBoundingClientRect(),m):C(this,this.coordsAtPos(t.selection.head),m))}else d&&N(d)},Dn.prototype.destroyPluginViews=function(){var t;while(t=this.pluginViews.pop())t.destroy&&t.destroy()},Dn.prototype.updatePluginViews=function(t){if(t&&t.plugins==this.state.plugins)for(var e=0;e<this.pluginViews.length;e++){var n=this.pluginViews[e];n.update&&n.update(this,t)}else{this.destroyPluginViews();for(var r=0;r<this.state.plugins.length;r++){var o=this.state.plugins[r];o.spec.view&&this.pluginViews.push(o.spec.view(this))}}},Dn.prototype.someProp=function(t,e){var n,r=this._props&&this._props[t];if(null!=r&&(n=e?e(r):r))return n;var o=this.state.plugins;if(o)for(var i=0;i<o.length;i++){var s=o[i].props[t];if(null!=s&&(n=e?e(s):s))return n}},Dn.prototype.hasFocus=function(){return this.root.activeElement==this.dom},Dn.prototype.focus=function(){this.domObserver.stop(),this.editable&&T(this.dom),Kt(this),this.domObserver.start()},En.root.get=function(){var t=this._root;if(null==t)for(var e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return this._root=e;return t||document},Dn.prototype.posAtCoords=function(t){return z(this,t)},Dn.prototype.coordsAtPos=function(t){return V(this,t)},Dn.prototype.domAtPos=function(t){return this.docView.domFromPos(t)},Dn.prototype.nodeDOM=function(t){var e=this.docView.descAt(t);return e?e.nodeDOM:null},Dn.prototype.posAtDOM=function(t,e,n){void 0===n&&(n=-1);var r=this.docView.posFromDOM(t,e,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r},Dn.prototype.endOfTextblock=function(t,e){return X(this,e||this.state,t)},Dn.prototype.destroy=function(){this.docView&&(Pe(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Tn(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},Dn.prototype.dispatchEvent=function(t){return je(this,t)},Dn.prototype.dispatch=function(t){var e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))},Object.defineProperties(Dn.prototype,En);var Bn=function(t,e){var n=this;this.editorView=t,this.width=e.width||1,this.color=e.color||"black",this.class=e.class,this.cursorPos=null,this.element=null,this.timeout=null,this.handlers=["dragover","dragend","drop","dragleave"].map((function(e){var r=function(t){return n[e](t)};return t.dom.addEventListener(e,r),{name:e,handler:r}}))};Bn.prototype.destroy=function(){var t=this;this.handlers.forEach((function(e){var n=e.name,r=e.handler;return t.editorView.dom.removeEventListener(n,r)}))},Bn.prototype.update=function(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&this.updateOverlay()},Bn.prototype.setCursor=function(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},Bn.prototype.updateOverlay=function(){var t,e=this.editorView.state.doc.resolve(this.cursorPos);if(!e.parent.inlineContent){var n=e.nodeBefore,r=e.nodeAfter;if(n||r){var o=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),i=n?o.bottom:o.top;n&&r&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),t={left:o.left,right:o.right,top:i-this.width/2,bottom:i+this.width/2}}}if(!t){var s=this.editorView.coordsAtPos(this.cursorPos);t={left:s.left-this.width/2,right:s.left+this.width/2,top:s.top,bottom:s.bottom}}var a=this.editorView.dom.offsetParent;this.element||(this.element=a.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color);var c=!a||a==document.body&&"static"==getComputedStyle(a).position?{left:-pageXOffset,top:-pageYOffset}:a.getBoundingClientRect();this.element.style.left=t.left-c.left+"px",this.element.style.top=t.top-c.top+"px",this.element.style.width=t.right-t.left+"px",this.element.style.height=t.bottom-t.top+"px"},Bn.prototype.scheduleRemoval=function(t){var e=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return e.setCursor(null)}),t)},Bn.prototype.dragover=function(t){if(this.editorView.editable){var e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY});if(e){var n=e.pos;this.editorView.dragging&&this.editorView.dragging.slice&&(n=Object(i["f"])(this.editorView.state.doc,n,this.editorView.dragging.slice),null==n&&(n=e.pos)),this.setCursor(n),this.scheduleRemoval(5e3)}}},Bn.prototype.dragend=function(){this.scheduleRemoval(20)},Bn.prototype.drop=function(){this.scheduleRemoval(20)},Bn.prototype.dragleave=function(t){t.target!=this.editorView.dom&&this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)};var Ln=n("7f06"),Wn=n("576a"),qn=function(t){function e(e){t.call(this,e,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));return e.valid(o)?new e(o):t.near(o)},e.prototype.content=function(){return o["Slice"].empty},e.prototype.eq=function(t){return t instanceof e&&t.head==this.head},e.prototype.toJSON=function(){return{type:"gapcursor",pos:this.head}},e.fromJSON=function(t,n){if("number"!=typeof n.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(n.pos))},e.prototype.getBookmark=function(){return new Kn(this.anchor)},e.valid=function(t){var e=t.parent;if(e.isTextblock||!Hn(t)||!Jn(t))return!1;var n=e.type.spec.allowGapCursor;if(null!=n)return n;var r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock},e.findFrom=function(t,n,r){if(!r&&e.valid(t))return t;for(var o=t.pos,i=null,s=t.depth;;s--){var a=t.node(s);if(n>0?t.indexAfter(s)<a.childCount:t.index(s)>0){i=a.maybeChild(n>0?t.indexAfter(s):t.index(s)-1);break}if(0==s)return null;o+=n;var c=t.doc.resolve(o);if(e.valid(c))return c}for(;;){if(i=n>0?i.firstChild:i.lastChild,!i)break;o+=n;var l=t.doc.resolve(o);if(e.valid(l))return l}return null},e}(r["Selection"]);qn.prototype.visible=!1,r["Selection"].jsonID("gapcursor",qn);var Kn=function(t){this.pos=t};function Hn(t){for(var e=t.depth;e>=0;e--){var n=t.index(e);if(0!=n)for(var r=t.node(e).child(n-1);;r=r.lastChild){if(0==r.childCount&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function Jn(t){for(var e=t.depth;e>=0;e--){var n=t.indexAfter(e),r=t.node(e);if(n!=r.childCount)for(var o=r.child(n);;o=o.firstChild){if(0==o.childCount&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}Kn.prototype.map=function(t){return new Kn(t.map(this.pos))},Kn.prototype.resolve=function(t){var e=t.resolve(this.pos);return qn.valid(e)?new qn(e):r["Selection"].near(e)};var Un=function(){return new r["Plugin"]({props:{decorations:Qn,createSelectionBetween:function(t,e,n){if(e.pos==n.pos&&qn.valid(n))return new qn(n)},handleClick:Yn,handleKeyDown:Gn}})},Gn=Object(Ln["a"])({ArrowLeft:Xn("horiz",-1),ArrowRight:Xn("horiz",1),ArrowUp:Xn("vert",-1),ArrowDown:Xn("vert",1)});function Xn(t,e){var n="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,o,i){var s=t.selection,a=e>0?s.$to:s.$from,c=s.empty;if(s instanceof r["TextSelection"]){if(!i.endOfTextblock(n))return!1;c=!1,a=t.doc.resolve(e>0?a.after():a.before())}var l=qn.findFrom(a,e,c);return!!l&&(o&&o(t.tr.setSelection(new qn(l))),!0)}}function Yn(t,e,n){if(!t.editable)return!1;var o=t.state.doc.resolve(e);if(!qn.valid(o))return!1;var i=t.posAtCoords({left:n.clientX,top:n.clientY}),s=i.inside;return!(s>-1&&r["NodeSelection"].isSelectable(t.state.doc.nodeAt(s)))&&(t.dispatch(t.state.tr.setSelection(new qn(o))),!0)}function Qn(t){if(!(t.selection instanceof qn))return null;var e=document.createElement("div");return e.className="ProseMirror-gapcursor",Wn["b"].create(t.doc,[Wn["a"].widget(t.selection.head,e,{key:"gapcursor"})])}var Zn=n("0010"),tr=n("f95e"),er=n("a15f"),nr=n("2b0e"),rr=n("a9de"); +/*! + * tiptap v1.26.5 + * (c) 2019 Scrumpy UG (limited liability) + * @license MIT + */ +function or(t){return or="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},or(t)}function ir(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ar(t,e,n){return e&&sr(t.prototype,e),n&&sr(t,n),t}function cr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ur(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?lr(Object(n),!0).forEach((function(e){cr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function fr(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&dr(t,e)}function pr(t){return pr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},pr(t)}function dr(t,e){return dr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},dr(t,e)}function hr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function vr(t,e){return!e||"object"!==typeof e&&"function"!==typeof e?hr(t):e}function mr(t,e){return br(t)||Sr(t,e)||kr()}function gr(t){return yr(t)||wr(t)||xr()}function yr(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function br(t){if(Array.isArray(t))return t}function wr(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function Sr(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0)if(n.push(s.value),e&&n.length===e)break}catch(c){o=!0,i=c}finally{try{r||null==a["return"]||a["return"]()}finally{if(o)throw i}}return n}}function xr(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function kr(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function Cr(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(function(t,e){return 0===e?t.toLowerCase():t.toUpperCase()})).replace(/\s+/g,"")}n.d(e,"a",(function(){return Pr})),n.d(e,"b",(function(){return jr})),n.d(e,"c",(function(){return zr})),n.d(e,"d",(function(){return Br})),n.d(e,"e",(function(){return Tr})),n.d(e,"f",(function(){return Er})),n.d(e,"g",(function(){return $r}));var Or=function(){function t(e,n){var r=n.editor,o=n.extension,i=n.parent,s=n.node,a=n.view,c=n.decorations,l=n.getPos;ir(this,t),this.component=e,this.editor=r,this.extension=o,this.parent=i,this.node=s,this.view=a,this.decorations=c,this.isNode=!!this.node.marks,this.isMark=!this.isNode,this.getPos=this.isMark?this.getMarkPos:l,this.captureEvents=!0,this.dom=this.createDOM(),this.contentDOM=this.vm.$refs.content}return ar(t,[{key:"createDOM",value:function(){var t=this,e=nr["a"].extend(this.component),n={editor:this.editor,node:this.node,view:this.view,getPos:function(){return t.getPos()},decorations:this.decorations,selected:!1,options:this.extension.options,updateAttrs:function(e){return t.updateAttrs(e)}};return"function"===typeof this.extension.setSelection&&(this.setSelection=this.extension.setSelection),this.vm=new e({parent:this.parent,propsData:n}).$mount(),this.vm.$el}},{key:"update",value:function(t,e){return t.type===this.node.type&&(t===this.node&&this.decorations===e||(this.node=t,this.decorations=e,this.updateComponentProps({node:t,decorations:e}),!0))}},{key:"updateComponentProps",value:function(t){var e=this;if(this.vm._props){var n=nr["a"].config.silent;nr["a"].config.silent=!0,Object.entries(t).forEach((function(t){var n=mr(t,2),r=n[0],o=n[1];e.vm._props[r]=o})),nr["a"].config.silent=n}}},{key:"updateAttrs",value:function(t){if(this.view.editable){var e=this.view.state,n=this.node.type,r=this.getPos(),o=ur({},this.node.attrs,{},t),i=this.isMark?e.tr.removeMark(r.from,r.to,n).addMark(r.from,r.to,n.create(o)):e.tr.setNodeMarkup(r,null,o);this.view.dispatch(i)}}},{key:"ignoreMutation",value:function(t){return"selection"!==t.type&&(!this.contentDOM||!this.contentDOM.contains(t.target))}},{key:"stopEvent",value:function(t){var e=this;if("function"===typeof this.extension.stopEvent)return this.extension.stopEvent(t);var n=!!this.extension.schema.draggable;if(n&&"mousedown"===t.type){var r=t.target.closest&&t.target.closest("[data-drag-handle]"),o=r&&(this.dom===r||this.dom.contains(r));o&&(this.captureEvents=!1,document.addEventListener("dragend",(function(){e.captureEvents=!0}),{once:!0}))}var i="copy"===t.type,s="paste"===t.type,a="cut"===t.type,c=t.type.startsWith("drag")||"drop"===t.type;return!(n&&c||i||s||a)&&this.captureEvents}},{key:"selectNode",value:function(){this.updateComponentProps({selected:!0})}},{key:"deselectNode",value:function(){this.updateComponentProps({selected:!1})}},{key:"getMarkPos",value:function(){var t=this.view.posAtDOM(this.dom),e=this.view.state.doc.resolve(t),n=Object(er["b"])(e,this.node.type);return n}},{key:"destroy",value:function(){this.vm.$destroy()}}]),t}(),Mr=function(){function t(){ir(this,t)}return ar(t,[{key:"on",value:function(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e),this}},{key:"emit",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this._callbacks=this._callbacks||{};var i=this._callbacks[t];return i&&i.forEach((function(t){return t.apply(e,r)})),this}},{key:"off",value:function(t,e){if(arguments.length){var n=this._callbacks?this._callbacks[t]:null;n&&(e?this._callbacks[t]=n.filter((function(t){return t!==e})):delete this._callbacks[t])}else this._callbacks={};return this}}]),t}(),Nr=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ir(this,t),this.options=ur({},this.defaultOptions,{},e)}return ar(t,[{key:"init",value:function(){return null}},{key:"bindEditor",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.editor=t}},{key:"inputRules",value:function(){return[]}},{key:"pasteRules",value:function(){return[]}},{key:"keys",value:function(){return{}}},{key:"name",get:function(){return null}},{key:"type",get:function(){return"extension"}},{key:"update",get:function(){return function(){}}},{key:"defaultOptions",get:function(){return{}}},{key:"plugins",get:function(){return[]}}]),t}(),Ar=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;ir(this,t),e.forEach((function(t){t.bindEditor(n),t.init()})),this.extensions=e}return ar(t,[{key:"keymaps",value:function(t){var e=t.schema,n=this.extensions.filter((function(t){return["extension"].includes(t.type)})).filter((function(t){return t.keys})).map((function(t){return t.keys({schema:e})})),r=this.extensions.filter((function(t){return["node","mark"].includes(t.type)})).filter((function(t){return t.keys})).map((function(t){return t.keys({type:e["".concat(t.type,"s")][t.name],schema:e})}));return[].concat(gr(n),gr(r)).map((function(t){return Object(Ln["b"])(t)}))}},{key:"inputRules",value:function(t){var e=t.schema,n=t.excludedExtensions;if(!(n instanceof Array)&&n)return[];var r=n instanceof Array?this.extensions.filter((function(t){return!n.includes(t.name)})):this.extensions,o=r.filter((function(t){return["extension"].includes(t.type)})).filter((function(t){return t.inputRules})).map((function(t){return t.inputRules({schema:e})})),i=r.filter((function(t){return["node","mark"].includes(t.type)})).filter((function(t){return t.inputRules})).map((function(t){return t.inputRules({type:e["".concat(t.type,"s")][t.name],schema:e})}));return[].concat(gr(o),gr(i)).reduce((function(t,e){return[].concat(gr(t),gr(e))}),[])}},{key:"pasteRules",value:function(t){var e=t.schema,n=t.excludedExtensions;if(!(n instanceof Array)&&n)return[];var r=n instanceof Array?this.extensions.filter((function(t){return!n.includes(t.name)})):this.extensions,o=r.filter((function(t){return["extension"].includes(t.type)})).filter((function(t){return t.pasteRules})).map((function(t){return t.pasteRules({schema:e})})),i=r.filter((function(t){return["node","mark"].includes(t.type)})).filter((function(t){return t.pasteRules})).map((function(t){return t.pasteRules({type:e["".concat(t.type,"s")][t.name],schema:e})}));return[].concat(gr(o),gr(i)).reduce((function(t,e){return[].concat(gr(t),gr(e))}),[])}},{key:"commands",value:function(t){var e=t.schema,n=t.view;return this.extensions.filter((function(t){return t.commands})).reduce((function(t,r){var o=r.name,i=r.type,s={},a=r.commands(ur({schema:e},["node","mark"].includes(i)?{type:e["".concat(i,"s")][o]}:{})),c=function(t,e){return!!n.editable&&(n.focus(),t(e)(n.state,n.dispatch,n))},l=function(t,e){Array.isArray(e)?s[t]=function(t){return e.forEach((function(e){return c(e,t)}))}:"function"===typeof e&&(s[t]=function(t){return c(e,t)})};return"object"===or(a)?Object.entries(a).forEach((function(t){var e=mr(t,2),n=e[0],r=e[1];l(n,r)})):l(o,a),ur({},t,{},s)}),{})}},{key:"nodes",get:function(){return this.extensions.filter((function(t){return"node"===t.type})).reduce((function(t,e){var n=e.name,r=e.schema;return ur({},t,cr({},n,r))}),{})}},{key:"options",get:function(){var t=this.view;return this.extensions.reduce((function(e,n){return ur({},e,cr({},n.name,new Proxy(n.options,{set:function(e,r,o){var i=e[r]!==o;return Object.assign(e,cr({},r,o)),i&&n.update(t),!0}})))}),{})}},{key:"marks",get:function(){return this.extensions.filter((function(t){return"mark"===t.type})).reduce((function(t,e){var n=e.name,r=e.schema;return ur({},t,cr({},n,r))}),{})}},{key:"plugins",get:function(){return this.extensions.filter((function(t){return t.plugins})).reduce((function(t,e){var n=e.plugins;return[].concat(gr(t),gr(n))}),[])}}]),t}();function _r(t){var e=document.createElement("style");e.type="text/css",e.textContent=t;var n=document,r=n.head,o=r.firstChild;o?r.insertBefore(e,o):r.appendChild(e)}var Tr=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ir(this,e),vr(this,pr(e).call(this,t))}return fr(e,t),ar(e,[{key:"command",value:function(){return function(){}}},{key:"type",get:function(){return"mark"}},{key:"view",get:function(){return null}},{key:"schema",get:function(){return null}}]),e}(Nr);function Dr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Math.min(Math.max(parseInt(t,10),e),n)}var Er=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ir(this,e),vr(this,pr(e).call(this,t))}return fr(e,t),ar(e,[{key:"command",value:function(){return function(){}}},{key:"type",get:function(){return"node"}},{key:"view",get:function(){return null}},{key:"schema",get:function(){return null}}]),e}(Nr),Pr=function(t){function e(){return ir(this,e),vr(this,pr(e).apply(this,arguments))}return fr(e,t),ar(e,[{key:"name",get:function(){return"doc"}},{key:"schema",get:function(){return{content:"block+"}}}]),e}(Er),Rr=function(t){function e(){return ir(this,e),vr(this,pr(e).apply(this,arguments))}return fr(e,t),ar(e,[{key:"commands",value:function(t){var e=t.type;return function(){return Object(rr["b"])(e)}}},{key:"name",get:function(){return"paragraph"}},{key:"schema",get:function(){return{content:"inline*",group:"block",draggable:!1,parseDOM:[{tag:"p"}],toDOM:function(){return["p",0]}}}}]),e}(Er),$r=function(t){function e(){return ir(this,e),vr(this,pr(e).apply(this,arguments))}return fr(e,t),ar(e,[{key:"name",get:function(){return"text"}},{key:"schema",get:function(){return{group:"inline"}}}]),e}(Er),Ir='.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n',jr=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ir(this,e),t=vr(this,pr(e).call(this)),t.defaultOptions={editorProps:{},editable:!0,autoFocus:null,extensions:[],content:"",topNode:"doc",emptyDocument:{type:"doc",content:[{type:"paragraph"}]},useBuiltInExtensions:!0,disableInputRules:!1,disablePasteRules:!1,dropCursor:{},parseOptions:{},injectCSS:!0,onInit:function(){},onTransaction:function(){},onUpdate:function(){},onFocus:function(){},onBlur:function(){},onPaste:function(){},onDrop:function(){}},t.events=["init","transaction","update","focus","blur","paste","drop"],t.init(n),t}return fr(e,t),ar(e,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.setOptions(ur({},this.defaultOptions,{},e)),this.focused=!1,this.selection={from:0,to:0},this.element=document.createElement("div"),this.extensions=this.createExtensions(),this.nodes=this.createNodes(),this.marks=this.createMarks(),this.schema=this.createSchema(),this.plugins=this.createPlugins(),this.keymaps=this.createKeymaps(),this.inputRules=this.createInputRules(),this.pasteRules=this.createPasteRules(),this.view=this.createView(),this.commands=this.createCommands(),this.setActiveNodesAndMarks(),this.options.injectCSS&&_r(Ir),null!==this.options.autoFocus&&this.focus(this.options.autoFocus),this.events.forEach((function(e){t.on(e,t.options[Cr("on ".concat(e))]||function(){})})),this.emit("init",{view:this.view,state:this.state}),this.extensions.view=this.view}},{key:"setOptions",value:function(t){this.options=ur({},this.options,{},t),this.view&&this.state&&this.view.updateState(this.state)}},{key:"createExtensions",value:function(){return new Ar([].concat(gr(this.builtInExtensions),gr(this.options.extensions)),this)}},{key:"createPlugins",value:function(){return this.extensions.plugins}},{key:"createKeymaps",value:function(){return this.extensions.keymaps({schema:this.schema})}},{key:"createInputRules",value:function(){return this.extensions.inputRules({schema:this.schema,excludedExtensions:this.options.disableInputRules})}},{key:"createPasteRules",value:function(){return this.extensions.pasteRules({schema:this.schema,excludedExtensions:this.options.disablePasteRules})}},{key:"createCommands",value:function(){return this.extensions.commands({schema:this.schema,view:this.view})}},{key:"createNodes",value:function(){return this.extensions.nodes}},{key:"createMarks",value:function(){return this.extensions.marks}},{key:"createSchema",value:function(){return new o["Schema"]({topNode:this.options.topNode,nodes:this.nodes,marks:this.marks})}},{key:"createState",value:function(){var t=this;return r["EditorState"].create({schema:this.schema,doc:this.createDocument(this.options.content),plugins:[].concat(gr(this.plugins),[Object(tr["b"])({rules:this.inputRules})],gr(this.pasteRules),gr(this.keymaps),[Object(Ln["b"])({Backspace:tr["c"]}),Object(Ln["b"])(Zn["a"]),Vn(this.options.dropCursor),Un(),new r["Plugin"]({key:new r["PluginKey"]("editable"),props:{editable:function(){return t.options.editable}}}),new r["Plugin"]({props:{attributes:{tabindex:0},handleDOMEvents:{focus:function(e,n){t.focused=!0,t.emit("focus",{event:n,state:e.state,view:e});var r=t.state.tr.setMeta("focused",!0);t.view.dispatch(r)},blur:function(e,n){t.focused=!1,t.emit("blur",{event:n,state:e.state,view:e});var r=t.state.tr.setMeta("focused",!1);t.view.dispatch(r)}}}}),new r["Plugin"]({props:this.options.editorProps})])})}},{key:"createDocument",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.parseOptions;if(null===t)return this.schema.nodeFromJSON(this.options.emptyDocument);if("object"===or(t))try{return this.schema.nodeFromJSON(t)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",r),this.schema.nodeFromJSON(this.options.emptyDocument)}if("string"===typeof t){var n=document.createElement("div");return n.innerHTML=t.trim(),o["DOMParser"].fromSchema(this.schema).parse(n,e)}return!1}},{key:"createView",value:function(){var t=this;return new Dn(this.element,{state:this.createState(),handlePaste:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.emit.apply(t,["paste"].concat(n))},handleDrop:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.emit.apply(t,["drop"].concat(n))},dispatchTransaction:this.dispatchTransaction.bind(this)})}},{key:"setParentComponent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t&&this.view.setProps({nodeViews:this.initNodeViews({parent:t,extensions:[].concat(gr(this.builtInExtensions),gr(this.options.extensions))})})}},{key:"initNodeViews",value:function(t){var e=this,n=t.parent,r=t.extensions;return r.filter((function(t){return["node","mark"].includes(t.type)})).filter((function(t){return t.view})).reduce((function(t,r){var o=function(t,o,i,s){var a=r.view;return new Or(a,{editor:e,extension:r,parent:n,node:t,view:o,getPos:i,decorations:s})};return ur({},t,cr({},r.name,o))}),{})}},{key:"dispatchTransaction",value:function(t){var e=this.state.apply(t);this.view.updateState(e),this.selection={from:this.state.selection.from,to:this.state.selection.to},this.setActiveNodesAndMarks(),this.emit("transaction",{getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:t}),t.docChanged&&!t.getMeta("preventUpdate")&&this.emitUpdate(t)}},{key:"emitUpdate",value:function(t){this.emit("update",{getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:t})}},{key:"resolveSelection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.selection&&null===t)return this.selection;if("start"===t||!0===t)return{from:0,to:0};if("end"===t){var e=this.state.doc;return{from:e.content.size,to:e.content.size}}return{from:t,to:t}}},{key:"focus",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!(this.view.focused&&null===e||!1===e)){var n=this.resolveSelection(e),r=n.from,o=n.to;this.setSelection(r,o),setTimeout((function(){return t.view.focus()}),10)}}},{key:"setSelection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.state,o=n.doc,i=n.tr,s=Dr(t,0,o.content.size),a=Dr(e,0,o.content.size),c=r["TextSelection"].create(o,s,a),l=i.setSelection(c);this.view.dispatch(l)}},{key:"blur",value:function(){this.view.dom.blur()}},{key:"getSchemaJSON",value:function(){return JSON.parse(JSON.stringify({nodes:this.extensions.nodes,marks:this.extensions.marks}))}},{key:"getHTML",value:function(){var t=document.createElement("div"),e=o["DOMSerializer"].fromSchema(this.schema).serializeFragment(this.state.doc.content);return t.appendChild(e),t.innerHTML}},{key:"getJSON",value:function(){return this.state.doc.toJSON()}},{key:"setContent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,o=this.state,i=o.doc,s=o.tr,a=this.createDocument(t,n),c=r["TextSelection"].create(i,0,i.content.size),l=s.setSelection(c).replaceSelectionWith(a,!1).setMeta("preventUpdate",!e);this.view.dispatch(l)}},{key:"clearContent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.setContent(this.options.emptyDocument,t)}},{key:"setActiveNodesAndMarks",value:function(){var t=this;this.activeMarks=Object.entries(this.schema.marks).reduce((function(e,n){var r=mr(n,2),o=r[0],i=r[1];return ur({},e,cr({},o,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(er["c"])(t.state,i,e)})))}),{}),this.activeMarkAttrs=Object.entries(this.schema.marks).reduce((function(e,n){var r=mr(n,2),o=r[0],i=r[1];return ur({},e,cr({},o,Object(er["a"])(t.state,i)))}),{}),this.activeNodes=Object.entries(this.schema.nodes).reduce((function(e,n){var r=mr(n,2),o=r[0],i=r[1];return ur({},e,cr({},o,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(er["d"])(t.state,i,e)})))}),{})}},{key:"getMarkAttrs",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.activeMarkAttrs[t]}},{key:"registerPlugin",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(t){var e=this.state.reconfigure({plugins:this.state.plugins.concat([t])});this.view.updateState(e)}}},{key:"unregisterPlugin",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(t&&this.view.docView){var e=this.state.reconfigure({plugins:this.state.plugins.filter((function(e){return!e.key.startsWith("".concat(t,"$"))}))});this.view.updateState(e)}}},{key:"destroy",value:function(){this.view&&this.view.destroy()}},{key:"builtInExtensions",get:function(){return this.options.useBuiltInExtensions?[new Pr,new $r,new Rr]:[]}},{key:"state",get:function(){return this.view?this.view.state:null}},{key:"isActive",get:function(){return Object.entries(ur({},this.activeMarks,{},this.activeNodes)).reduce((function(t,e){var n=mr(e,2),r=n[0],o=n[1];return ur({},t,cr({},r,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(t)})))}),{})}}]),e}(Mr),zr={props:{editor:{default:null,type:Object}},watch:{editor:{immediate:!0,handler:function(t){var e=this;t&&t.element&&this.$nextTick((function(){e.$el.appendChild(t.element.firstChild),t.setParentComponent(e)}))}}},render:function(t){return t("div")},beforeDestroy:function(){this.editor.element=this.$el}},Fr=function(){function t(e){var n=this,r=e.options;ir(this,t),this.options=r,this.preventHide=!1,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler),this.options.editor.on("blur",(function(){n.preventHide?n.preventHide=!1:n.options.editor.emit("menubar:focusUpdate",!1)}))}return ar(t,[{key:"handleClick",value:function(){this.preventHide=!0}},{key:"destroy",value:function(){this.options.element.removeEventListener("mousedown",this.mousedownHandler)}}]),t}();function Vr(t){return new r["Plugin"]({key:new r["PluginKey"]("menu_bar"),view:function(e){return new Fr({editorView:e,options:t})}})}var Br={props:{editor:{default:null,type:Object}},data:function(){return{focused:!1}},watch:{editor:{immediate:!0,handler:function(t){var e=this;t&&this.$nextTick((function(){t.registerPlugin(Vr({editor:t,element:e.$el})),e.focused=t.focused,t.on("focus",(function(){e.focused=!0})),t.on("menubar:focusUpdate",(function(t){e.focused=t}))}))}}},render:function(){return this.editor?this.$scopedSlots.default({focused:this.focused,focus:this.editor.focus,commands:this.editor.commands,isActive:this.editor.isActive,getMarkAttrs:this.editor.getMarkAttrs.bind(this.editor)}):null}};function Lr(t,e,n){var r=document.createRange();return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r}function Wr(t,e){var n=t.getClientRects();return n.length?n[e<0?0:n.length-1]:t.getBoundingClientRect()}function qr(t,e){var n,r,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.docView.domFromPos(e),s=i.node,a=i.offset;if(3===s.nodeType)o&&a<s.nodeValue.length?(r=Wr(Lr(s,a-1,a),-1),n="right"):a<s.nodeValue.length&&(r=Wr(Lr(s,a,a+1),-1),n="left");else if(s.firstChild){if(a<s.childNodes.length){var c=s.childNodes[a];r=Wr(3===c.nodeType?Lr(c):c,-1),n="left"}if((!r||r.top===r.bottom)&&a){var l=s.childNodes[a-1];r=Wr(3===l.nodeType?Lr(l):l,1),n="right"}}else r=s.getBoundingClientRect(),n="left";var u=r[n];return{top:r.top,bottom:r.bottom,left:u,right:u}}var Kr=function(){function t(e){var n=this,r=e.options,o=e.editorView;ir(this,t),this.options=ur({},{element:null,keepInBounds:!0,onUpdate:function(){return!1}},{},r),this.editorView=o,this.isActive=!1,this.left=0,this.bottom=0,this.top=0,this.preventHide=!1,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler),this.options.editor.on("focus",(function(t){var e=t.view;n.update(e)})),this.options.editor.on("blur",(function(t){var e=t.event;n.preventHide?n.preventHide=!1:n.hide(e)}))}return ar(t,[{key:"handleClick",value:function(){this.preventHide=!0}},{key:"update",value:function(t,e){var n=t.state;if(!t.composing&&!(e&&e.doc.eq(n.doc)&&e.selection.eq(n.selection)))if(n.selection.empty)this.hide();else{var r=n.selection,o=r.from,i=r.to,s=qr(t,o),a=qr(t,i,!0),c=this.options.element.offsetParent;if(c){var l=c.getBoundingClientRect(),u=this.options.element.getBoundingClientRect(),f=(s.left+a.left)/2-l.left;this.left=Math.round(this.options.keepInBounds?Math.min(l.width-u.width/2,Math.max(f,u.width/2)):f),this.bottom=Math.round(l.bottom-s.top),this.top=Math.round(a.bottom-l.top),this.isActive=!0,this.sendUpdate()}else this.hide()}}},{key:"sendUpdate",value:function(){this.options.onUpdate({isActive:this.isActive,left:this.left,bottom:this.bottom,top:this.top})}},{key:"hide",value:function(t){t&&t.relatedTarget&&this.options.element.parentNode.contains(t.relatedTarget)||(this.isActive=!1,this.sendUpdate())}},{key:"destroy",value:function(){this.options.element.removeEventListener("mousedown",this.mousedownHandler)}}]),t}();function Hr(t){return new r["Plugin"]({key:new r["PluginKey"]("menu_bubble"),view:function(e){return new Kr({editorView:e,options:t})}})}Boolean},cdf9:function(t,e,n){var r=n("825a"),o=n("861d"),i=n("f069");t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t),s=n.resolve;return s(e),n.promise}},ce4e:function(t,e,n){var r=n("da84"),o=n("9112");t.exports=function(t,e){try{o(r,t,e)}catch(n){r[t]=e}return e}},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d066:function(t,e,n){var r=n("428f"),o=n("da84"),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},d1e7:function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},d28b:function(t,e,n){var r=n("746f");r("iterator")},d2bb:function(t,e,n){var r=n("825a"),o=n("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(n,[]),e=n instanceof Array}catch(i){}return function(n,i){return r(n),o(i),e?t.call(n,i):n.__proto__=i,n}}():void 0)},d3b7:function(t,e,n){var r=n("00ee"),o=n("6eeb"),i=n("b041");r||o(Object.prototype,"toString",i,{unsafe:!0})},d44e:function(t,e,n){var r=n("9bf2").f,o=n("5135"),i=n("b622"),s=i("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,s)&&r(t,s,{configurable:!0,value:e})}},d4ec:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return r}))},d784:function(t,e,n){"use strict";var r=n("9112"),o=n("6eeb"),i=n("d039"),s=n("b622"),a=n("9263"),c=s("species"),l=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),u=!i((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,f){var p=s(t),d=!i((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),h=d&&!i((function(){var e=!1,n=/a/;return"split"===t&&(n={},n.constructor={},n.constructor[c]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return e=!0,null},n[p](""),!e}));if(!d||!h||"replace"===t&&!l||"split"===t&&!u){var v=/./[p],m=n(p,""[t],(function(t,e,n,r,o){return e.exec===a?d&&!o?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),g=m[0],y=m[1];o(String.prototype,t,g),o(RegExp.prototype,p,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)}),f&&r(RegExp.prototype[p],"sham",!0)}}},d81d:function(t,e,n){"use strict";var r=n("23e7"),o=n("b727").map,i=n("d039"),s=n("1dde"),a=s("map"),c=a&&!i((function(){[].map.call({length:-1,0:1},(function(t){throw t}))}));r({target:"Array",proto:!0,forced:!a||!c},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},da84:function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,n("c8ba"))},dbb4:function(t,e,n){var r=n("23e7"),o=n("83ab"),i=n("56ef"),s=n("fc6a"),a=n("06cf"),c=n("8418");r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){var e,n,r=s(t),o=a.f,l=i(r),u={},f=0;while(l.length>f)n=o(r,e=l[f++]),void 0!==n&&c(u,e,n);return u}})},ddb0:function(t,e,n){var r=n("da84"),o=n("fdbc"),i=n("e260"),s=n("9112"),a=n("b622"),c=a("iterator"),l=a("toStringTag"),u=i.values;for(var f in o){var p=r[f],d=p&&p.prototype;if(d){if(d[c]!==u)try{s(d,c,u)}catch(v){d[c]=u}if(d[l]||s(d,l,f),o[f])for(var h in i)if(d[h]!==i[h])try{s(d,h,i[h])}catch(v){d[h]=i[h]}}}},df75:function(t,e,n){var r=n("ca84"),o=n("7839");t.exports=Object.keys||function(t){return r(t,o)}},e01a:function(t,e,n){"use strict";var r=n("23e7"),o=n("83ab"),i=n("da84"),s=n("5135"),a=n("861d"),c=n("9bf2").f,l=n("e893"),u=i.Symbol;if(o&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var f={},p=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof p?new u(t):void 0===t?u():u(t);return""===t&&(f[e]=!0),e};l(p,u);var d=p.prototype=u.prototype;d.constructor=p;var h=d.toString,v="Symbol(test)"==String(u("test")),m=/^Symbol\((.*)\)[^)]+$/;c(d,"description",{configurable:!0,get:function(){var t=a(this)?this.valueOf():this,e=h.call(t);if(s(f,t))return"";var n=v?e.slice(7,-1):e.replace(m,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:p})}},e163:function(t,e,n){var r=n("5135"),o=n("7b0b"),i=n("f772"),s=n("e177"),a=i("IE_PROTO"),c=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){return t=o(t),r(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},e177:function(t,e,n){var r=n("d039");t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},e260:function(t,e,n){"use strict";var r=n("fc6a"),o=n("44d2"),i=n("3f8c"),s=n("69f3"),a=n("7dd0"),c="Array Iterator",l=s.set,u=s.getterFor(c);t.exports=a(Array,"Array",(function(t,e){l(this,{type:c,target:r(t),index:0,kind:e})}),(function(){var t=u(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},e2cc:function(t,e,n){var r=n("6eeb");t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},e439:function(t,e,n){var r=n("23e7"),o=n("d039"),i=n("fc6a"),s=n("06cf").f,a=n("83ab"),c=o((function(){s(1)})),l=!a||c;r({target:"Object",stat:!0,forced:l,sham:!a},{getOwnPropertyDescriptor:function(t,e){return s(i(t),e)}})},e583:function(t,e,n){var r=n("da84"),o=n("58a8").trim,i=n("5899"),s=r.parseInt,a=/^[+-]?0[Xx]/,c=8!==s(i+"08")||22!==s(i+"0x16");t.exports=c?function(t,e){var n=o(String(t));return s(n,e>>>0||(a.test(n)?16:10))}:s},e667:function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}},e6cf:function(t,e,n){"use strict";var r,o,i,s,a=n("23e7"),c=n("c430"),l=n("da84"),u=n("d066"),f=n("fea9"),p=n("6eeb"),d=n("e2cc"),h=n("d44e"),v=n("2626"),m=n("861d"),g=n("1c0b"),y=n("19aa"),b=n("c6b6"),w=n("8925"),S=n("2266"),x=n("1c7e"),k=n("4840"),C=n("2cf4").set,O=n("b575"),M=n("cdf9"),N=n("44de"),A=n("f069"),_=n("e667"),T=n("69f3"),D=n("94ca"),E=n("b622"),P=n("60ae"),R=E("species"),$="Promise",I=T.get,j=T.set,z=T.getterFor($),F=f,V=l.TypeError,B=l.document,L=l.process,W=u("fetch"),q=A.f,K=q,H="process"==b(L),J=!!(B&&B.createEvent&&l.dispatchEvent),U="unhandledrejection",G="rejectionhandled",X=0,Y=1,Q=2,Z=1,tt=2,et=D($,(function(){var t=w(F)!==String(F);if(!t){if(66===P)return!0;if(!H&&"function"!=typeof PromiseRejectionEvent)return!0}if(c&&!F.prototype["finally"])return!0;if(P>=51&&/native code/.test(F))return!1;var e=F.resolve(1),n=function(t){t((function(){}),(function(){}))},r=e.constructor={};return r[R]=n,!(e.then((function(){}))instanceof n)})),nt=et||!x((function(t){F.all(t)["catch"]((function(){}))})),rt=function(t){var e;return!(!m(t)||"function"!=typeof(e=t.then))&&e},ot=function(t,e,n){if(!e.notified){e.notified=!0;var r=e.reactions;O((function(){var o=e.value,i=e.state==Y,s=0;while(r.length>s){var a,c,l,u=r[s++],f=i?u.ok:u.fail,p=u.resolve,d=u.reject,h=u.domain;try{f?(i||(e.rejection===tt&&ct(t,e),e.rejection=Z),!0===f?a=o:(h&&h.enter(),a=f(o),h&&(h.exit(),l=!0)),a===u.promise?d(V("Promise-chain cycle")):(c=rt(a))?c.call(a,p,d):p(a)):d(o)}catch(v){h&&!l&&h.exit(),d(v)}}e.reactions=[],e.notified=!1,n&&!e.rejection&&st(t,e)}))}},it=function(t,e,n){var r,o;J?(r=B.createEvent("Event"),r.promise=e,r.reason=n,r.initEvent(t,!1,!0),l.dispatchEvent(r)):r={promise:e,reason:n},(o=l["on"+t])?o(r):t===U&&N("Unhandled promise rejection",n)},st=function(t,e){C.call(l,(function(){var n,r=e.value,o=at(e);if(o&&(n=_((function(){H?L.emit("unhandledRejection",r,t):it(U,t,r)})),e.rejection=H||at(e)?tt:Z,n.error))throw n.value}))},at=function(t){return t.rejection!==Z&&!t.parent},ct=function(t,e){C.call(l,(function(){H?L.emit("rejectionHandled",t):it(G,t,e.value)}))},lt=function(t,e,n,r){return function(o){t(e,n,o,r)}},ut=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=Q,ot(t,e,!0))},ft=function(t,e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(t===n)throw V("Promise can't be resolved itself");var o=rt(n);o?O((function(){var r={done:!1};try{o.call(n,lt(ft,t,r,e),lt(ut,t,r,e))}catch(i){ut(t,r,i,e)}})):(e.value=n,e.state=Y,ot(t,e,!1))}catch(i){ut(t,{done:!1},i,e)}}};et&&(F=function(t){y(this,F,$),g(t),r.call(this);var e=I(this);try{t(lt(ft,this,e),lt(ut,this,e))}catch(n){ut(this,e,n)}},r=function(t){j(this,{type:$,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:X,value:void 0})},r.prototype=d(F.prototype,{then:function(t,e){var n=z(this),r=q(k(this,F));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=H?L.domain:void 0,n.parent=!0,n.reactions.push(r),n.state!=X&&ot(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=I(t);this.promise=t,this.resolve=lt(ft,t,e),this.reject=lt(ut,t,e)},A.f=q=function(t){return t===F||t===i?new o(t):K(t)},c||"function"!=typeof f||(s=f.prototype.then,p(f.prototype,"then",(function(t,e){var n=this;return new F((function(t,e){s.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof W&&a({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return M(F,W.apply(l,arguments))}}))),a({global:!0,wrap:!0,forced:et},{Promise:F}),h(F,$,!1,!0),v($),i=u($),a({target:$,stat:!0,forced:et},{reject:function(t){var e=q(this);return e.reject.call(void 0,t),e.promise}}),a({target:$,stat:!0,forced:c||et},{resolve:function(t){return M(c&&this===i?F:this,t)}}),a({target:$,stat:!0,forced:nt},{all:function(t){var e=this,n=q(e),r=n.resolve,o=n.reject,i=_((function(){var n=g(e.resolve),i=[],s=0,a=1;S(t,(function(t){var c=s++,l=!1;i.push(void 0),a++,n.call(e,t).then((function(t){l||(l=!0,i[c]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=q(e),r=n.reject,o=_((function(){var o=g(e.resolve);S(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},e893:function(t,e,n){var r=n("5135"),o=n("56ef"),i=n("06cf"),s=n("9bf2");t.exports=function(t,e){for(var n=o(e),a=s.f,c=i.f,l=0;l<n.length;l++){var u=n[l];r(t,u)||a(t,u,c(e,u))}}},e8b5:function(t,e,n){var r=n("c6b6");t.exports=Array.isArray||function(t){return"Array"==r(t)}},e95a:function(t,e,n){var r=n("b622"),o=n("3f8c"),i=r("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||s[i]===t)}},f069:function(t,e,n){"use strict";var r=n("1c0b"),o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},f183:function(t,e,n){var r=n("d012"),o=n("861d"),i=n("5135"),s=n("9bf2").f,a=n("90e3"),c=n("bb2f"),l=a("meta"),u=0,f=Object.isExtensible||function(){return!0},p=function(t){s(t,l,{value:{objectID:"O"+ ++u,weakData:{}}})},d=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,l)){if(!f(t))return"F";if(!e)return"E";p(t)}return t[l].objectID},h=function(t,e){if(!i(t,l)){if(!f(t))return!0;if(!e)return!1;p(t)}return t[l].weakData},v=function(t){return c&&m.REQUIRED&&f(t)&&!i(t,l)&&p(t),t},m=t.exports={REQUIRED:!1,fastKey:d,getWeakData:h,onFreeze:v};r[l]=!0},f5df:function(t,e,n){var r=n("00ee"),o=n("c6b6"),i=n("b622"),s=i("toStringTag"),a="Arguments"==o(function(){return arguments}()),c=function(t,e){try{return t[e]}catch(n){}};t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=c(e=Object(t),s))?n:a?o(e):"Object"==(r=o(e))&&"function"==typeof e.callee?"Arguments":r}},f772:function(t,e,n){var r=n("5692"),o=n("90e3"),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},f8c2:function(t,e,n){var r=n("1c0b");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},f95e:function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return l}));var r=n("5313"),o=(n("0ac0"),function(t,e){this.match=t,this.handler="string"==typeof e?i(e):e});function i(t){return function(e,n,r,o){var i=t;if(n[1]){var s=n[0].lastIndexOf(n[1]);i+=n[0].slice(s+n[1].length),r+=s;var a=r-o;a>0&&(i=n[0].slice(s-a,s)+i,r=o)}return e.tr.insertText(i,r,o)}}var s=500;function a(t){var e=t.rules,n=new r["Plugin"]({state:{init:function(){return null},apply:function(t,e){var n=t.getMeta(this);return n||(t.selectionSet||t.docChanged?null:e)}},props:{handleTextInput:function(t,r,o,i){return c(t,r,o,i,e,n)},handleDOMEvents:{compositionend:function(t){setTimeout((function(){var r=t.state.selection,o=r.$cursor;o&&c(t,o.pos,o.pos,"",e,n)}))}}},isInputRules:!0});return n}function c(t,e,n,r,o,i){if(t.composing)return!1;var a=t.state,c=a.doc.resolve(e);if(c.parent.type.spec.code)return!1;for(var l=c.parent.textBetween(Math.max(0,c.parentOffset-s),c.parentOffset,null,"")+r,u=0;u<o.length;u++){var f=o[u].match.exec(l),p=f&&o[u].handler(a,f,e-(f[0].length-r.length),n);if(p)return t.dispatch(p.setMeta(i,{transform:p,from:e,to:n,text:r})),!0}return!1}function l(t,e){for(var n=t.plugins,r=0;r<n.length;r++){var o=n[r],i=void 0;if(o.spec.isInputRules&&(i=o.getState(t))){if(e){for(var s=t.tr,a=i.transform,c=a.steps.length-1;c>=0;c--)s.step(a.steps[c].invert(a.docs[c]));var l=s.doc.resolve(i.from).marks();e(s.replaceWith(i.from,i.to,t.schema.text(i.text,l)))}return!0}}return!1}new o(/--$/,"—"),new o(/\.\.\.$/,"…"),new o(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new o(/"$/,"â€"),new o(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),new o(/'$/,"’")},fb6a:function(t,e,n){"use strict";var r=n("23e7"),o=n("861d"),i=n("e8b5"),s=n("23cb"),a=n("50c4"),c=n("fc6a"),l=n("8418"),u=n("1dde"),f=n("b622"),p=f("species"),d=[].slice,h=Math.max;r({target:"Array",proto:!0,forced:!u("slice")},{slice:function(t,e){var n,r,u,f=c(this),v=a(f.length),m=s(t,v),g=s(void 0===e?v:e,v);if(i(f)&&(n=f.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)?o(n)&&(n=n[p],null===n&&(n=void 0)):n=void 0,n===Array||void 0===n))return d.call(f,m,g);for(r=new(void 0===n?Array:n)(h(g-m,0)),u=0;m<g;m++,u++)m in f&&l(r,u,f[m]);return r.length=u,r}})},fc6a:function(t,e,n){var r=n("44ad"),o=n("1d80");t.exports=function(t){return r(o(t))}},fdbc:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,e,n){var r=n("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol()},fea9:function(t,e,n){var r=n("da84");t.exports=r.Promise}}]); +//# sourceMappingURL=chunk-vendors.js.map +(function(t){function e(e){for(var a,s,o=e[0],c=e[1],u=e[2],d=0,f=[];d<o.length;d++)s=o[d],Object.prototype.hasOwnProperty.call(r,s)&&r[s]&&f.push(r[s][0]),r[s]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(t[a]=c[a]);l&&l(e);while(f.length)f.shift()();return i.push.apply(i,u||[]),n()}function n(){for(var t,e=0;e<i.length;e++){for(var n=i[e],a=!0,o=1;o<n.length;o++){var c=n[o];0!==r[c]&&(a=!1)}a&&(i.splice(e--,1),t=s(s.s=n[0]))}return t}var a={},r={app:0},i=[];function s(e){if(a[e])return a[e].exports;var n=a[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,s),n.l=!0,n.exports}s.m=t,s.c=a,s.d=function(t,e,n){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},s.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)s.d(n,a,function(e){return t[e]}.bind(null,a));return n},s.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="/";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],c=o.push.bind(o);o.push=e,o=o.slice();for(var u=0;u<o.length;u++)e(o[u]);var l=c;i.push([0,"chunk-vendors"]),n()})({0:function(t,e,n){t.exports=n("cd49")},"37ba":function(t,e,n){},"6d73":function(t,e,n){"use strict";var a=n("37ba"),r=n.n(a);e["default"]=r.a},ba8f:function(t,e,n){},cd49:function(t,e,n){"use strict";n.r(e);n("e260"),n("e6cf"),n("cca6"),n("a79d");var a=n("2b0e"),r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[n("tei-editor")],1)},i=[],s=n("d4ec"),o=n("bee2"),c=n("99de"),u=n("7e84"),l=n("262e"),d=n("9ab4"),f=n("60a3"),h=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"tei-editor"}},[n("nav",[n("aria-menubar",{scopedSlots:t._u([{key:"default",fn:function(e){var a=e.keyboardNav,r=e.mouseClickNav;return[n("ul",{attrs:{role:"menubar"}},[t.hasSaveCallback||t.hasLoadCallback?n("li",{attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:"0","aria-expanded":"false"},on:{keyup:a,click:r}},[t._v("File")]),n("aria-menu",{scopedSlots:t._u([{key:"default",fn:function(e){var a=e.keyboardNav,r=e.mouseClickNav;return[n("ul",{attrs:{role:"menu","aria-hidden":"true"}},[t.hasLoadCallback?n("li",{attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:"-1"},on:{click:function(e){r(e),t.load()},keyup:a}},[t._v("Load")])]):t._e(),t.hasSaveCallback?n("li",{attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:"-1"},on:{click:function(e){r(e),t.save()},keyup:a}},[t._v("Save")])]):t._e()])]}}],null,!0)})],1):t._e(),t._l(t.sections,(function(e,i,s){return n("li",{key:s,attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:"-1","aria-checked":i===t.currentSection?"true":"false"},on:{click:function(e){r(e),t.setCurrentSection(i)},keyup:a}},[t._v(t._s(e.label))])])}))],2)]}}])})],1),n("div",[t._l(t.sections,(function(e,a,r){return[a===t.currentSection?["MetadataEditor"===e.type?n("metadata-editor",{key:r,attrs:{config:e}}):t._e(),"TextEditor"===e.type?n("text-editor",{key:r,attrs:{section:a}}):t._e()]:t._e()]}))],2)])},p=[],v=(n("b64b"),n("a4d3"),n("e01a"),n("d28b"),n("d3b7"),n("3ca3"),n("ddb0"),function(t){function e(){return Object(s["a"])(this,e),Object(c["a"])(this,Object(u["a"])(e).apply(this,arguments))}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"render",value:function(){if(this.$scopedSlots.default)return this.$scopedSlots.default({keyboardNav:this.keyboardNavigation,mouseClickNav:this.mouseClickNavigation})}},{key:"keyboardNavigation",value:function(t){var e=t.target;if(e)if(39===t.keyCode){var n=this.findNextMenuitem(this.getParentMenubar(e),e,"next");n&&n.focus()}else if(37===t.keyCode){var a=this.findNextMenuitem(this.getParentMenubar(e),e,"previous");a&&a.focus()}else if(38===t.keyCode||40===t.keyCode){var r=!0,i=!1,s=void 0;try{for(var o,c=e.parentElement.children[Symbol.iterator]();!(r=(o=c.next()).done);r=!0){var u=o.value;if("menu"===u.getAttribute("role")){u.setAttribute("aria-hidden","false"),e.setAttribute("aria-expanded","true");var l=this.findNextMenuitem(u,null,"next");l&&l.focus()}}}catch(m){i=!0,s=m}finally{try{r||null==c.return||c.return()}finally{if(i)throw s}}}else if(13===t.keyCode||32==t.keyCode){var d=!0,f=!1,h=void 0;try{for(var p,v=e.parentElement.children[Symbol.iterator]();!(d=(p=v.next()).done);d=!0){var b=p.value;if("menu"===b.getAttribute("role"))if("false"===b.getAttribute("aria-hidden"))b.setAttribute("aria-hidden","true"),e.setAttribute("aria-expanded","false");else{b.setAttribute("aria-hidden","false"),e.setAttribute("aria-expanded","true");var g=this.findNextMenuitem(b,null,"next");if(g)return void g.focus()}}}catch(m){f=!0,h=m}finally{try{d||null==v.return||v.return()}finally{if(f)throw h}}e.click()}}},{key:"mouseClickNavigation",value:function(t){var e=t.target;if(e){var n=!0,a=!1,r=void 0;try{for(var i,s=e.parentElement.children[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var o=i.value;if("menu"===o.getAttribute("role"))if("false"===o.getAttribute("aria-hidden"))o.setAttribute("aria-hidden","true"),e.setAttribute("aria-expanded","false");else{o.setAttribute("aria-hidden","false"),e.setAttribute("aria-expanded","true");var c=this.findNextMenuitem(o,null,"next");if(c)return void c.focus()}}}catch(u){a=!0,r=u}finally{try{n||null==s.return||s.return()}finally{if(a)throw r}}}}},{key:"getParentMenubar",value:function(t){return t?"menubar"===t.getAttribute("role")?t:this.getParentMenubar(t.parentElement):null}},{key:"findNextMenuitem",value:function(t,e,n){if(!t)return null;var a=[];if("next"===n)for(var r=t.children.length-1;r>=0;r--)a.push(t.children[r]);else for(var i=0;i<t.children.length;i++)a.push(t.children[i]);var s=0;e||(s=1);while(a.length>0){var o=a.pop();if(0===s&&o===e)s=1;else if(1===s&&"menuitem"===o.getAttribute("role")&&"true"!==o.getAttribute("aria-disabled"))return o;if("menu"!==o.getAttribute("role"))if("next"===n)for(var c=o.children.length-1;c>=0;c--)a.push(o.children[c]);else for(var u=0;u<o.children.length;u++)a.push(o.children[u])}return null}}]),e}(f["c"]));v=d["a"]([Object(f["a"])({})],v);var b,g,m=v,y=m,k=n("6d73"),O=n("2877");function x(t){this["$style"]=k["default"].locals||k["default"]}var j=Object(O["a"])(y,b,g,!1,x,null,null),_=j.exports,A=function(t){function e(){return Object(s["a"])(this,e),Object(c["a"])(this,Object(u["a"])(e).apply(this,arguments))}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"render",value:function(){if(this.$scopedSlots.default)return this.$scopedSlots.default({keyboardNav:this.keyboardNavigation,mouseClickNav:this.mouseClickNavigation})}},{key:"keyboardNavigation",value:function(t){var e=t.target;if(e)if(39===t.keyCode);else if(37===t.keyCode);else if(38===t.keyCode){var n=this.findNextMenuitem(this.getParentMenu(e),e,"previous");n&&n.focus()}else if(40===t.keyCode){var a=this.findNextMenuitem(this.getParentMenu(e),e,"next");a&&a.focus()}else if(13===t.keyCode||32==t.keyCode)if(e.getAttribute("aria-expanded")){var r=!0,i=!1,s=void 0;try{for(var o,c=e.parentElement.children[Symbol.iterator]();!(r=(o=c.next()).done);r=!0){var u=o.value;if("menu"===u.getAttribute("role"))if("false"===u.getAttribute("aria-hidden"))u.setAttribute("aria-hidden","true"),e.setAttribute("aria-expanded","false");else{u.setAttribute("aria-hidden","false"),e.setAttribute("aria-expanded","true");var l=this.findNextMenuitem(u,null,"next");l&&l.focus()}}}catch(m){i=!0,s=m}finally{try{r||null==c.return||c.return()}finally{if(i)throw s}}}else e.click();else if(27===t.keyCode){var d=this.getParentMenu(e);if(d){d.setAttribute("aria-hidden","true");var f=!0,h=!1,p=void 0;try{for(var v,b=d.parentElement.children[Symbol.iterator]();!(f=(v=b.next()).done);f=!0){var g=v.value;"menuitem"===g.getAttribute("role")&&(g.setAttribute("aria-expanded","false"),g.focus())}}catch(m){h=!0,p=m}finally{try{f||null==b.return||b.return()}finally{if(h)throw p}}}}}},{key:"mouseClickNavigation",value:function(t){var e=t.target;if(e)if(e.getAttribute("aria-expanded")){var n=!0,a=!1,r=void 0;try{for(var i,s=e.parentElement.children[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var o=i.value;if("menu"===o.getAttribute("role"))if("false"===o.getAttribute("aria-hidden"))o.setAttribute("aria-hidden","true"),e.setAttribute("aria-expanded","false");else{o.setAttribute("aria-hidden","false"),e.setAttribute("aria-expanded","true");var c=this.findNextMenuitem(o,null,"next");c&&c.focus()}}}catch(b){a=!0,r=b}finally{try{n||null==s.return||s.return()}finally{if(a)throw r}}}else{var u=this.getParentMenu(e);if(u){u.setAttribute("aria-hidden","true");var l=!0,d=!1,f=void 0;try{for(var h,p=u.parentElement.children[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var v=h.value;"menuitem"===v.getAttribute("role")&&(v.setAttribute("aria-expanded","false"),v.focus())}}catch(b){d=!0,f=b}finally{try{l||null==p.return||p.return()}finally{if(d)throw f}}}}}},{key:"getParentMenu",value:function(t){return t?"menu"===t.getAttribute("role")?t:this.getParentMenu(t.parentElement):null}},{key:"getParentMenuOrMenubar",value:function(t){return t?"menu"===t.getAttribute("role")||"menubar"===t.getAttribute("role")?t:this.getParentMenuOrMenubar(t.parentElement):null}}]),e}(_);A=d["a"]([Object(f["a"])({})],A);var N,M,E=A,w=E,S=Object(O["a"])(w,N,M,!1,null,null,null),$=S.exports,C=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"metadata-editor"},t._l(t.config.ui,(function(e,a){return n("section",{key:a},[n("h2",[t._v(t._s(e.label))]),t._l(e.entries,(function(t,e){return n("div",{key:e},[n("metadata-field",{attrs:{config:t}})],1)}))],2)})),0)},T=[],V=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",["single-text"==t.config.type?[n("label",[n("span",{staticClass:"label-text"},[t._v(t._s(t.config.label))]),n("input",{attrs:{type:"text"},domProps:{value:t.value},on:{change:t.update}})])]:t._e(),"multi-row"==t.config.type?[n("ol",{staticClass:"multi-row"},t._l(t.value,(function(e,a){return n("li",{key:a},[t._l(t.config.entries,(function(e,r){return n("metadata-field",{key:r,attrs:{config:e,parent:t.parent+t.config.path+".["+a+"]"}})})),n("aria-menubar",{attrs:{items:t.modifyMenuItems(a)},on:{action:t.menuAction}}),n("aria-menubar",{scopedSlots:t._u([{key:"default",fn:function(e){var r=e.keyboardNav;return[n("ul",{attrs:{role:"menubar"}},[n("li",{attrs:{role:"presentation"}},[n("a",0===a?{attrs:{role:"menuitem","aria-disabled":!0}}:{attrs:{role:"menuitem",tabindex:1===t.value.length?null:0},on:{click:function(e){return t.menuAction("move-up:"+a)},keyup:r}},[n("svg",{attrs:{viewBox:"0 0 24 24","aria-label":"Move up"}},[n("path",{attrs:{d:"M19,3H5A2,2 0 0,0 3,5V19C3,20.11 3.9,21 5,21H19C20.11,21 21,20.11 21,19V5A2,2 0 0,0 19,3M16.59,15.71L12,11.12L7.41,15.71L6,14.29L12,8.29L18,14.29L16.59,15.71Z"}})])])]),n("li",{attrs:{role:"presentation"}},[a===t.value.length-1?n("a",{attrs:{role:"menuitem","aria-disabled":!0}},[n("svg",{attrs:{viewBox:"0 0 24 24","aria-label":"Move down"}},[n("path",{attrs:{d:"M19,3H5A2,2 0 0,0 3,5V19C3,20.11 3.9,21 5,21H19C20.11,21 21,20.11 21,19V5A2,2 0 0,0 19,3M12,15.71L6,9.71L7.41,8.29L12,12.88L16.59,8.29L18,9.71L12,15.71Z"}})])]):n("a",{attrs:{role:"menuitem",tabindex:1===t.value.length?null:0},on:{click:function(e){return t.menuAction("move-down:"+a)},keyup:r}},[n("svg",{attrs:{viewBox:"0 0 24 24","aria-label":"Move down"}},[n("path",{attrs:{d:"M19,3H5A2,2 0 0,0 3,5V19C3,20.11 3.9,21 5,21H19C20.11,21 21,20.11 21,19V5A2,2 0 0,0 19,3M12,15.71L6,9.71L7.41,8.29L12,12.88L16.59,8.29L18,9.71L12,15.71Z"}})])])]),n("li",{attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:1===t.value.length?0:-1},on:{click:function(e){return t.menuAction("delete:"+a)},keyup:r}},[n("svg",{attrs:{viewBox:"0 0 24 24","aria-label":"Delete"}},[n("path",{attrs:{d:"M17,13H7V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z"}})])])])])]}}],null,!0)})],2)})),0),n("aria-menubar",{scopedSlots:t._u([{key:"default",fn:function(e){var a=e.keyboardNav;return[n("ul",{attrs:{role:"menubar"}},[n("li",{attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:"0"},on:{click:function(e){return t.menuAction("add")},keyup:a}},[n("svg",{attrs:{viewBox:"0 0 24 24","aria-label":"Add"}},[n("path",{attrs:{d:"M17,13H13V17H11V13H7V11H11V7H13V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z"}})])])])])]}}],null,!1,3190783598)})]:t._e(),"multi-field"==t.config.type?[n("ol",{staticClass:"multi-field"},t._l(t.config.entries,(function(e,a){return n("li",{key:a},[n("metadata-field",{attrs:{config:e,parent:t.parent+t.config.path}})],1)})),0)]:t._e()],2)},P=[];n("c975"),n("a9e3"),n("25eb"),n("159b"),n("fb6a"),n("1276");function D(t,e){var n=e.split(".");while(t&&n.length>0){if("["===n[0][0]&&"]"===n[0][n[0].length-1]){var a=Number.parseInt(n[0].substring(1,n[0].length-1));a>=0&&a<t.length&&(t=t[a])}else t=t[n[0]];n=n.slice(1)}return t}var L=function(t){function e(){var t;return Object(s["a"])(this,e),t=Object(c["a"])(this,Object(u["a"])(e).apply(this,arguments)),t.addMenuItems=[{label:'<svg viewBox="0 0 24 24" aria-label="Add"><path d="M17,13H13V17H11V13H7V11H11V7H13V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z" /></svg>',action:"add"}],t}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"update",value:function(t){t&&t.target&&this.$store.commit("setMetadataValue",{path:this.$props.parent+this.$props.config.path,value:t.target.value})}},{key:"modifyMenuItems",value:function(t){return[{label:'<svg viewBox="0 0 24 24" aria-label="Move up"><path d="M19,3H5A2,2 0 0,0 3,5V19C3,20.11 3.9,21 5,21H19C20.11,21 21,20.11 21,19V5A2,2 0 0,0 19,3M16.59,15.71L12,11.12L7.41,15.71L6,14.29L12,8.29L18,14.29L16.59,15.71Z" /></svg>',action:"move-up:"+t,disabled:0===t},{label:'<svg viewBox="0 0 24 24" aria-label="Move down"><path d="M19,3H5A2,2 0 0,0 3,5V19C3,20.11 3.9,21 5,21H19C20.11,21 21,20.11 21,19V5A2,2 0 0,0 19,3M12,15.71L6,9.71L7.41,8.29L12,12.88L16.59,8.29L18,9.71L12,15.71Z" /></svg>',action:"move-down:"+t,disabled:t===this.value.length-1},{label:'<svg viewBox="0 0 24 24" aria-label="Delete"><path d="M17,13H7V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z" /></svg>',action:"delete:"+t}]}},{key:"menuAction",value:function(t){if("add"===t){var e={};this.$props.config.entries.forEach((function(t){var n=t.path;"."===n[0]&&(n=n.substring(1)),"single-text"===t.type?e[n]="":"multi-row"===t.type?e[n]=[]:"multi-field"===t.type&&t.entries.forEach((function(t){var n=t.path;"."===n[0]&&(n=n.substring(1)),"single-text"===t.type?e[n]="":"multi-row"===t.type&&(e[n]=[])}))})),this.$store.commit("addMetadataMuliRow",{path:this.$props.parent+this.$props.config.path,value:e})}else 0===t.indexOf("move-up:")?this.$store.commit("moveMetadataMultiRow",{path:this.$props.parent+this.$props.config.path,idx:Number.parseInt(t.substring(8)),move:-1}):0===t.indexOf("move-down:")?this.$store.commit("moveMetadataMultiRow",{path:this.$props.parent+this.$props.config.path,idx:Number.parseInt(t.substring(10)),move:1}):0===t.indexOf("delete:")&&this.$store.commit("removeMetadataMultiRow",{path:this.$props.parent+this.$props.config.path,value:Number.parseInt(t.substring(7))})}},{key:"value",get:function(){var t=D(this.$store.state.content[this.$store.state.settings.metadataSection],this.$props.parent+this.$props.config.path);return t||""}}]),e}(f["c"]);L=d["a"]([Object(f["a"])({components:{AriaMenubar:_},props:{config:Object,parent:{type:String,default:""}},name:"metadata-field"})],L);var H=L,I=H,R=Object(O["a"])(I,V,P,!1,null,null,null),B=R.exports,U=function(t){function e(){return Object(s["a"])(this,e),Object(c["a"])(this,Object(u["a"])(e).apply(this,arguments))}return Object(l["a"])(e,t),e}(f["c"]);U=d["a"]([Object(f["a"])({components:{MetadataField:B},props:{config:Object}})],U);var Z=U,F=Z,X=Object(O["a"])(F,C,T,!1,null,null,null),Y=X.exports,J=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"text-editor"},[n("editor-content",{attrs:{editor:t.editor}}),n("editor-menu-bar",{attrs:{editor:t.editor},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.commands,r=e.isActive;e.getMarkAttrs;return[n("div",{staticClass:"sidebar"},t._l(t.activeUIBlocks,(function(e,i){return n("div",{key:i},[n("h2",[t._v(t._s(e.label))]),t._l(e.entities,(function(e,i){return["list"===e.type?n("ul",{key:i},t._l(e.entities,(function(e,r){return n("li",{key:r,attrs:{role:"presentation"}},[n("label",[t._v(t._s(e.label)+" "),"setNodeAttrString"===e.type?n("input",{domProps:{value:t.getNodeAttributeValue(e.nodeType,e.attr)},on:{change:function(n){return t.setNodeAttributeValue(a,e.nodeType,e.attr,n.target.value)}}}):t._e()])])})),0):t._e(),"menubar"===e.type?n("aria-menubar",{key:i,scopedSlots:t._u([{key:"default",fn:function(i){var s=i.keyboardNav;return[n("ul",{attrs:{role:"menubar"}},t._l(e.entities,(function(e,i){return n("li",{key:i,class:"separator"===e.type?"separator":null,attrs:{role:"presentation"}},["setNodeType"===e.type?n("a",{attrs:{role:"menuitem",tabindex:0===i?"0":"-1","aria-checked":r[e.nodeType]()?"true":"false"},domProps:{innerHTML:t._s(e.label)},on:{keyup:s,click:function(t){a[e.nodeType]()}}}):t._e(),"setNodeAttrValue"===e.type?n("a",{attrs:{role:"menuitem",tabindex:0===i?"0":"-1","aria-checked":t.hasNodeAttributeValue(e.nodeType,e.attr,e.value)?"true":"false"},domProps:{innerHTML:t._s(e.label)},on:{keyup:s,click:function(n){return t.setNodeAttributeValue(a,e.nodeType,e.attr,e.value)}}}):t._e(),"toggleMark"===e.type?n("a",{attrs:{role:"menuitem",tabindex:0===i?"0":"-1","aria-checked":r[e.markType]()?"true":"false"},domProps:{innerHTML:t._s(e.label)},on:{keyup:s,click:function(t){a[e.markType]()}}}):t._e(),"selectNodeAttr"===e.type?n("select",{attrs:{role:"menuitem",tabindex:0===i?"0":"-1"},on:{keyup:s,change:function(n){return t.setNodeAttributeValue(a,e.nodeType,e.attr,n.target.value)}}},t._l(e.values,(function(a){return n("option",{key:a.value,domProps:{selected:t.hasNodeAttributeValue(e.nodeType,e.attr,a.value),value:a.value}},[t._v(t._s(a.label))])})),0):t._e(),"selectMarkAttr"===e.type?n("select",{attrs:{role:"menuitem",tabindex:0===i?"0":"-1"},on:{keyup:s,change:function(n){return t.setMarkAttributeValue(e.markType,e.attr,n.target.value)}}},t._l(e.values,(function(a){return n("option",{key:a.value,domProps:{selected:t.hasMarkAttributeValue(e.markType,e.attr,a.value),value:a.value}},[t._v(t._s(a.label))])})),0):t._e(),"editNestedDoc"===e.type?n("a",{attrs:{role:"menuitem",tabindex:0===i?"0":"-1"},domProps:{innerHTML:t._s(e.label)},on:{keyup:s,click:function(n){return t.editNestedDoc(a,e.nodeType,e.attr,e.targetNodeType)}}}):t._e(),"closeNested"===e.type?n("a",{attrs:{role:"menuitem",tabindex:0===i?"0":"-1"},domProps:{innerHTML:t._s(e.label)},on:{keyup:s,click:t.closeNestedAction}}):t._e(),"linkNestedDoc"===e.type?n("select",{attrs:{role:"menuitem",tabindex:0===i?"0":"-1"},on:{keyup:s,change:function(n){return t.setNodeAttributeValue(a,e.nodeType,e.attr,n.target.value)}}},t._l(t.getNestedIds(e.targetNodeType),(function(a){return n("option",{key:a.value,domProps:{selected:t.hasNodeAttributeValue(e.nodeType,e.attr,a.value),value:a.value}},[t._v(t._s(a.label))])})),0):t._e()])})),0)]}}],null,!0)}):t._e()]}))],2)})),0)]}}])}),t.showNested?n("div",{staticClass:"nested"},[n("text-editor",{attrs:{section:t.section,nestedSection:t.nestedSettings.section,nestedId:t.nestedSettings.id,closeNestedAction:t.closeNestedEditor}})],1):t._e()],1)},W=[],z=(n("4de4"),n("b0c0"),n("e439"),n("dbb4"),n("ade3")),G=n("cd42"),q=n("a9de"),K=(n("4fad"),n("3835")),Q=function(t){function e(t){var n;return Object(s["a"])(this,e),n=Object(c["a"])(this,Object(u["a"])(e).call(this)),n._config={},n._config=t,n}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"commands",value:function(t){var e,n=t.type;return e={},Object(z["a"])(e,n.name,(function(t){return Object(q["b"])(n,t)})),Object(z["a"])(e,n.name+"_setAttribute",(function(t){return Object(q["b"])(n,t)})),e}},{key:"name",get:function(){return this._config.name}},{key:"schema",get:function(){var t=this;return{content:"inline*",group:"block",draggable:!1,attrs:this._config.attrs,parseDOM:[{tag:"div.node-".concat(this._config.name),getAttrs:function(e){var n={};return t._config.attrs&&Object.keys(t._config.attrs).forEach((function(t){var a=e.getAttribute("data-".concat(t));a&&(n[t]=a)})),n}}],toDOM:function(e){var n={class:"node-".concat(t._config.name)};return Object.entries(e.attrs).forEach((function(t){var e=Object(K["a"])(t,2),a=e[0],r=e[1];n["data-".concat(a)]=r})),["div",n,0]}}}}]),e}(G["f"]),tt=n("986d"),et=n("0ac0"),nt=function(t){function e(t){var n;return Object(s["a"])(this,e),n=Object(c["a"])(this,Object(u["a"])(e).call(this)),n._config={},n._config=t,n}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"commands",value:function(t){var e=t.type,n=t.schema,a=n.nodes[this._config.content];return function(){return function(t,r){var i=t.selection,s=i.$from,o=i.$to,c=i.from,u=i.to,l=s.blockRange(o),d=l&&Object(et["i"])(l);if(!l||null===d)return!1;var f=Object(tt["findParentNode"])((function(t){return t.type===e}))(i);if(l.depth>=1&&f&&l.depth-f.depth<=1&&f.node.type===e){var h=t.tr.lift(l,d);return h=h.setBlockType(c,u,n.nodes.paragraph),r(h),!0}var p=t.tr.setBlockType(c,u,a);return p=p.wrap(l,[{type:e}]),r(p),!0}}}},{key:"name",get:function(){return this._config.name}},{key:"schema",get:function(){var t=this;return{content:this._config.content+"+",group:"block",draggable:!1,attrs:this._config.attrs,parseDOM:[{tag:"div.node-".concat(this._config.name),getAttrs:function(e){var n={};return t._config.attrs&&Object.keys(t._config.attrs).forEach((function(t){var a=e.getAttribute("data-".concat(t));a&&(n[t]=a)})),n}}],toDOM:function(e){var n={class:"node-".concat(t._config.name)};return Object.entries(e.attrs).forEach((function(t){var e=Object(K["a"])(t,2),a=e[0],r=e[1];n["data-".concat(a)]=r})),["div",n,0]}}}}]),e}(G["f"]),at=function(t){function e(t){var n;return Object(s["a"])(this,e),n=Object(c["a"])(this,Object(u["a"])(e).call(this)),n._config={},n._config=t,n}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"commands",value:function(t){var e,n=t.type;return e={},Object(z["a"])(e,n.name,(function(t){return function(e,a){var r=e.selection,i=r.$from,s=r.$to,o=r.from,c=r.to,u=!1;e.doc.nodesBetween(o,c,(function(t){t.type===n&&(u=!0)}));var l=i.parent.slice(i.parentOffset,s.parentOffset);return a(u?e.tr.replaceRange(o-1,c+1,l):e.tr.replaceRangeWith(o,c,n.create(t,l.content))),!0}})),Object(z["a"])(e,n.name+"_setAttribute",(function(t){return function(e,a){var r=e.selection,i=r.$from,s=r.$to,o=(r.from,r.to,i.blockRange(s));if(!o)return!1;var c=e.doc.slice(o.start+1,o.end-1);return a(e.tr.replaceRangeWith(o.start,o.end,n.create(t,c.content))),!0}})),e}},{key:"name",get:function(){return this._config.name}},{key:"schema",get:function(){var t=this;return{content:"inline*",group:"inline",inline:!0,attrs:this._config.attrs,parseDOM:[{tag:"span.node-".concat(this._config.name),getAttrs:function(e){var n={};return t._config.attrs&&Object.keys(t._config.attrs).forEach((function(t){var a=e.getAttribute("data-".concat(t));a&&(n[t]=a)})),n}}],toDOM:function(e){var n={class:"node-".concat(t._config.name)};return Object.entries(e.attrs).forEach((function(t){var e=Object(K["a"])(t,2),a=e[0],r=e[1];n["data-".concat(a)]=r})),["span",n,0]}}}}]),e}(G["f"]),rt=function(t){function e(t){var n;return Object(s["a"])(this,e),n=Object(c["a"])(this,Object(u["a"])(e).call(this)),n._config={},n._config=t,n}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"commands",value:function(t){var e=t.type;return function(){return Object(q["c"])(e)}}},{key:"name",get:function(){return this._config.name}},{key:"schema",get:function(){var t=this;return{attrs:this._config.attrs,parseDOM:[{tag:"span.mark-".concat(this._config.name),getAttrs:function(e){var n={};return t._config.attrs&&Object.keys(t._config.attrs).forEach((function(t){var a=e.getAttribute("data-".concat(t));a&&(n[t]=a)})),n}}],toDOM:function(e){var n={class:"mark-".concat(t._config.name)};return Object.entries(e.attrs).forEach((function(t){var e=Object(K["a"])(t,2),a=e[0],r=e[1];r&&(n["data-".concat(a)]=r)})),["span",n,0]}}}}]),e}(G["e"]);function it(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function st(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?it(Object(n),!0).forEach((function(e){Object(z["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ot=function(t){function e(){var t;return Object(s["a"])(this,e),t=Object(c["a"])(this,Object(u["a"])(e).apply(this,arguments)),t.editor=null,t.showNested=!1,t.nestedSettings=null,t.internalContentUpdate=!1,t.defaultNodeName="",t}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"mounted",value:function(){var t=this,e=[new G["a"],new G["g"]];this.defaultNodeName="",this.schema.forEach((function(n){"block"===n.type?(e.push(new Q(n)),""===t.defaultNodeName&&(t.defaultNodeName=n.name)):"wrapping"===n.type?e.push(new nt(n)):"inline"===n.type&&"text"!==n.name?e.push(new at(n)):"mark"===n.type&&e.push(new rt(n))})),this.editor=new G["b"]({useBuiltInExtensions:!1,extensions:e,content:{type:"doc",content:[{type:this.defaultNodeName,content:[]}]},onUpdate:function(e){var n=e.getJSON;t.internalContentUpdate=!0,t.$props.nestedSection&&t.$props.nestedId?t.$store.commit("setTextDoc",{path:t.$props.section+".nestedId."+t.$props.nestedSection+"."+t.$props.nestedId,doc:n()}):t.$store.commit("setTextDoc",{path:t.$props.section+".doc",doc:n()})}}),this.doc&&this.editor.setContent(this.doc),this.editor.focus()}},{key:"beforeDestroy",value:function(){this.editor&&this.editor.destroy()}},{key:"updateContent",value:function(t){!this.internalContentUpdate&&this.editor&&this.editor.setContent(t),this.internalContentUpdate=!1}},{key:"getNodeAttributeValue",value:function(t,e){var n=this.editor.state.selection,a=n.from,r=n.to,i="";return this.editor.state.doc.nodesBetween(a,r,(function(n){n.type.name===t&&void 0!==n.attrs[e]&&null!==n.attrs[e]&&(i=n.attrs[e])})),i}},{key:"hasNodeAttributeValue",value:function(t,e,n){return this.getNodeAttributeValue(t,e)===n}},{key:"setNodeAttributeValue",value:function(t,e,n,a){var r=this.editor.state.selection,i=r.from,s=r.to,o={};this.editor.state.doc.nodesBetween(i,s,(function(t){t.type.name===e&&(o=st({},o,{},t.attrs))})),o[n]=a,t[e+"_setAttribute"](o)}},{key:"getMarkAttributeValue",value:function(t,e){var n=this.editor.state.selection,a=n.from,r=n.to,i="";return this.editor.state.doc.nodesBetween(a,r,(function(n){n.marks&&n.marks.forEach((function(n){n.type.name===t&&(i=n.attrs[e])}))})),i}},{key:"hasMarkAttributeValue",value:function(t,e,n){return this.getMarkAttributeValue(t,e)===n}},{key:"setMarkAttributeValue",value:function(t,e,n){if(n){var a=this.editor.state.selection,r=a.from,i=a.to,s={};this.editor.state.doc.nodesBetween(r,i,(function(e){e.marks&&e.marks.forEach((function(e){e.type.name===t&&(s=st({},s,{},e.attrs))}))})),s[e]=n,Object(q["d"])(this.editor.schema.marks[t],s)(this.editor.state,this.editor.dispatchTransaction.bind(this.editor))}else Object(q["a"])(this.editor.schema.marks[t])(this.editor.state,this.editor.dispatchTransaction.bind(this.editor))}},{key:"getNestedIds",value:function(t){var e=[{value:"",label:"New"}];return Object.keys(this.$store.state.content[this.$props.section].nested[t]).forEach((function(t){e.push({value:t,label:t})})),e}},{key:"editNestedDoc",value:function(t,e,n,a){var r=this.getNodeAttributeValue(e,n);if(!r){var i=this.$store.state.content[this.$props.section].nested[a];r=a+"-1";var s=1;while(i&&i[r])s+=1,r=a+"-"+s;this.setNodeAttributeValue(t,e,n,r),this.$store.commit("addNestedDoc",{path:this.$props.section+".nested."+a+"."+r,doc:{type:"doc",content:[{type:"paragraph",content:[]}]}})}this.showNested=!0,this.nestedSettings={section:a,id:r}}},{key:"closeNestedEditor",value:function(){this.showNested=!1,this.nestedSettings=null}},{key:"schema",get:function(){return this.$store.state.sections[this.$props.section].schema}},{key:"content",get:function(){return this.$store.state.content[this.$props.section]}},{key:"doc",get:function(){if(this.content){if(!this.$props.nestedSection||!this.$props.nestedId)return this.content.doc;if(this.content.nested&&this.content.nested[this.$props.nestedSection]&&this.content.nested[this.$props.nestedSection][this.$props.nestedId])return this.content.nested[this.$props.nestedSection][this.$props.nestedId].content[0]}return null}},{key:"ui",get:function(){return this.$props.nestedSection&&this.$store.state.sections[this.$props.section].ui[this.$props.nestedSection]?this.$store.state.sections[this.$props.section].ui[this.$props.nestedSection]:this.$store.state.sections[this.$props.section].ui.doc}},{key:"activeUIBlocks",get:function(){var t=this.editor.isActive;return this.ui.filter((function(e){return!e.condition||"isActive"===e.condition.type&&t[e.condition.activeType]()}))}}]),e}(f["c"]);d["a"]([Object(f["b"])({type:String})],ot.prototype,"section",void 0),d["a"]([Object(f["b"])({type:String})],ot.prototype,"nestedSection",void 0),d["a"]([Object(f["b"])({type:String})],ot.prototype,"nestedId",void 0),d["a"]([Object(f["b"])({type:Function})],ot.prototype,"closeNestedAction",void 0),d["a"]([Object(f["d"])("doc")],ot.prototype,"updateContent",null),ot=d["a"]([Object(f["a"])({components:{EditorContent:G["c"],EditorMenuBar:G["d"],AriaMenubar:_},name:"text-editor"})],ot);var ct=ot,ut=ct,lt=Object(O["a"])(ut,J,W,!1,null,null,null),dt=lt.exports,ft=(n("99af"),n("a15b"),n("d81d"),n("4e82"),n("a434"),n("25f0"),n("6062"),n("5319"),n("53ca")),ht=function(){function t(){Object(s["a"])(this,t)}return Object(o["a"])(t,[{key:"serialise",value:function(t,e){var n=this,a={node:"tei:TEI",attrs:{"xmlns:tei":["http://www.tei-c.org/ns/1.0"]},children:[]};Object.entries(e).forEach((function(e){var r=Object(K["a"])(e,2),i=r[0],s=r[1];"MetadataEditor"===s.type&&n.mergeTrees(a,n.serialiseHeader(t[i],s))})),Object.entries(e).forEach((function(e){var r=Object(K["a"])(e,2),i=r[0],s=r[1];"TextEditor"===s.type&&n.mergeTrees(a,n.serialiseSingleText(t[i],s))}));var r=this.toString(a,"");return r.splice(0,0,'<?xml version="1.0" encoding="UTF-8"?>'),r.push(""),r.join("\n")}},{key:"mergeTrees",value:function(t,e){if(t&&e)for(var n=0;n<e.children.length;n++){for(var a=!1,r=0;r<t.children.length;r++)t.children[r].node===e.children[n].node&&this.objectsMatch(t.children[r].attrs,e.children[n].attrs)&&(this.mergeTrees(t.children[r],e.children[n]),a=!0);a||t.children.push(e.children[n])}}},{key:"objectsMatch",value:function(t,e){var n=this;if(t&&e){if(Object(ft["a"])(t)!==Object(ft["a"])(e))return!1;if("string"===typeof t||"number"===typeof t||"boolean"===typeof t)return t===e;var a=Object.keys(t),r=Object.keys(e);return a.forEach((function(a){return!(r.indexOf(a)<0)&&(!!n.objectsMatch(t[a],e[a])&&void r.splice(r.indexOf(a),1))})),!(r.length>0)}return!t&&!e}},{key:"serialiseSingleText",value:function(t,e){var n=this;if(t){var a=e.serialiser.tag.split("/");this.nested={};var r={node:a[a.length-1],children:t.doc.content.map((function(t){return n.serialiseTextNode(t,e.schema)})),attrs:{}};e.serialiser.attrs&&Object.entries(e.serialiser.attrs).forEach((function(t){var e=Object(K["a"])(t,2),n=e[0],a=e[1];r.attrs[n]?r.attrs[n].push(a):r.attrs[n]=[a]})),Object.entries(this.nested).forEach((function(a){var i=Object(K["a"])(a,2),s=i[0],o=i[1];new Set(o).forEach((function(a){t.nested[s]&&t.nested[s][a]&&r.children.push(n.serialiseTextNode(t.nested[s][a],e.schema))}))}));for(var i=a.length-2;i>=0;i--)r={node:a[i],children:[r]};return{node:"tei:TEI",children:[r]}}return null}},{key:"serialiseTextNode",value:function(t,e){var n=this,a=e.filter((function(e){return e.name===t.type&&e.serialiser}));if(1===a.length){a=a[0];var r={node:a.serialiser.tag,attrs:{},children:[],text:null};if(a.serialiser.attrs&&Object.entries(a.serialiser.attrs).forEach((function(t){r.attrs[t[0]]=[t[1]]})),t.attrs&&Object.entries(t.attrs).forEach((function(t){var e=a.attrs[t[0]].serialiser;if(e){var n=void 0;e.values?e.values[t[1]]&&(n=e.values[t[1]]):n=e.value?e.value.replace("{value}",t[1]):t[1],void 0!==n&&("text()"===e.attr?r.text=n:r.attrs[e.attr]?r.attrs[e.attr].push(n):r.attrs[e.attr]=[n])}})),"inline"===a.type){if(t.content)if(t.content.length>1||t.content[0].marks&&t.content[0].marks.length>0)t.content.forEach((function(t){r.children.push(n.serialiseTextNode(t,e))}));else{var i=this.serialiseTextNode(t.content[0],e);a.serialiser.text?r.attrs[a.serialiser.text.attr]?r.attrs[a.serialiser.text.attr].push(i.text):r.attrs[a.serialiser.text.attr]=[i.text]:r.text=i.text}else t.text&&(a.serialiser.text?r.attrs[a.serialiser.text.attr]?r.attrs[a.serialiser.text.attr].push(t.text):r.attrs[a.serialiser.text.attr]=[t.text]:r.text=t.text);if(t.marks){var s=t.marks.map((function(t){var n=e.filter((function(e){return e.name===t.type&&e.serialiser}));if(1===n.length){n=n[0];var a={node:r.node,attrs:{}},i=n.serialiser;return i.tag&&(a.node=i.tag),i.attrs&&Object.entries(i.attrs).forEach((function(t){t[1].value&&(a.attrs[t[0]]?a.attrs[t[0]].push(t[1].value):a.attrs[t[0]]=[t[1].value])})),t.attrs&&Object.entries(t.attrs).forEach((function(t){var e=void 0;n.attrs[t[0]].serialiser.value?e=n.attrs[t[0]].serialiser.value.replace("{value}",t[1]):n.attrs[t[0]].serialiser.values&&n.attrs[t[0]].serialiser.values[t[1]]&&(e=n.attrs[t[0]].serialiser.values[t[1]]),void 0!==e&&(a.attrs[n.attrs[t[0]].serialiser.attr]?a.attrs[n.attrs[t[0]].serialiser.attr].push(e):a.attrs[n.attrs[t[0]].serialiser.attr]=[e])})),a}return null})).filter((function(t){return t}));if(new Set(s.map((function(t){return t.node}))).size>1){s.sort((function(t,e){return t.node<e.node?-1:t.node>e.node?1:t.node===e.node?0:void 0}));var o=r;o.node=null,s.forEach((function(t){if(null===o.node||o.node===t.node)o.node=t.node,Object.entries(t.attrs).forEach((function(t){o.attrs[t[0]]?o.attrs[t[0]]=o.attrs[t[0]].concat(t[1]):o.attrs[t[0]]=t[1]}));else{var e={node:t.node,attrs:t.attrs,children:[],text:o.text};o.text=null,o.children.push(e),o=e}}))}else s.forEach((function(t){t&&(t.node&&(r.node=t.node),t.attrs&&Object.entries(t.attrs).forEach((function(t){r.attrs[t[0]]?r.attrs[t[0]]=r.attrs[t[0]].concat(t[1]):r.attrs[t[0]]=t[1]})))}))}}else t.content&&t.content.forEach((function(t){"doc"===t.type?t.content&&t.content.forEach((function(t){r.children.push(n.serialiseTextNode(t,e))})):r.children.push(n.serialiseTextNode(t,e))}));return a.reference&&(this.nested[a.reference.type]||(this.nested[a.reference.type]=[]),this.nested[a.reference.type].push(t.attrs[a.reference.attr])),r}return null}},{key:"serialiseHeader",value:function(t,e){var n=this;return{node:"tei:TEI",children:[{node:"tei:teiHeader",children:e.schema.map((function(e){return n.serialiseMetadataNode(t[e.tag.substring(4)],e)}))}]}}},{key:"serialiseMetadataNode",value:function(t,e){var n=this;if(e.multiple){var a=t.map((function(t){var a={node:e.tag};if(t._text&&(a.text=t._text),t._attrs&&(a.attrs={},Object.entries(t._attrs).forEach((function(t){a.attrs[t[0]]=[t[1]]}))),e.children){a.children=[];for(var r=0;r<e.children.length;r++)if(t[e.children[r].tag.substring(4)]){var i=n.serialiseMetadataNode(t[e.children[r].tag.substring(4)],e.children[r]);Array.isArray(i)?a.children=a.children.concat(i):a.children.push(i)}}return a}));return a}var r={node:e.tag};if(t&&(t._text&&(r.text=t._text),t._attrs&&(r.attrs={},Object.entries(t._attrs).forEach((function(t){r.attrs[t[0]]=[t[1]]}))),e.children)){r.children=[];for(var i=0;i<e.children.length;i++)if(t[e.children[i].tag.substring(4)]){var s=this.serialiseMetadataNode(t[e.children[i].tag.substring(4)],e.children[i]);Array.isArray(s)?r.children=r.children.concat(s):r.children.push(s)}}return r}},{key:"toString",value:function(t,e){var n=this;function a(t){return t.replace("&","&").replace("<","<").replace(">",">")}var r=[];if(t){var i=[e,"<",t.node];t.attrs&&Object.entries(t.attrs).forEach((function(t){t[1].length>0&&(t[1].sort(),i.push(" "+t[0]+'="'+a(t[1].join(" "))+'"'))})),t.children&&t.children.length>0?(i.push(">"),r.push(i.join("")),t.children.forEach((function(t){r=r.concat(n.toString(t,e+" "))})),r.push(e+"</"+t.node+">")):(t.text?(i.push(">"),i.push(a(t.text)),i.push("</"+t.node+">")):i.push("/>"),r.push(i.join("")))}return r}}]),t}(),pt=function(t){function e(){var t;return Object(s["a"])(this,e),t=Object(c["a"])(this,Object(u["a"])(e).apply(this,arguments)),t.currentSection=null,t}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"setCurrentSection",value:function(t){this.currentSection=t}},{key:"getContentForSection",value:function(t){return D(this.$store.state.content,t)}},{key:"setContentForSection",value:function(t,e){this.$store.commit("setTextDoc",{path:t,doc:e})}},{key:"mounted",value:function(){var t=Object.keys(this.sections);t.length>0&&(this.currentSection=t[0])}},{key:"save",value:function(){if(this.hasSaveCallback){var t=new ht;this.$store.state.callbacks.save(t.serialise(this.$store.state.content,this.$store.state.sections))}}},{key:"load",value:function(){var t=this;this.hasLoadCallback&&this.$store.state.callbacks.load((function(e){t.$store.dispatch("load",e)}))}},{key:"updateSections",value:function(){var t=Object.keys(this.sections);t.length>0&&(this.currentSection=t[0])}},{key:"sections",get:function(){return this.$store.state.sections}},{key:"hasSaveCallback",get:function(){return!!this.$store.state.callbacks.save}},{key:"hasLoadCallback",get:function(){return!!this.$store.state.callbacks.load}}]),e}(f["c"]);d["a"]([Object(f["d"])("sections")],pt.prototype,"updateSections",null),pt=d["a"]([Object(f["a"])({components:{AriaMenubar:_,AriaMenu:$,MetadataEditor:Y,TextEditor:dt}})],pt);var vt=pt,bt=vt,gt=(n("e215"),Object(O["a"])(bt,h,p,!1,null,null,null)),mt=gt.exports,yt=function(t){function e(){return Object(s["a"])(this,e),Object(c["a"])(this,Object(u["a"])(e).apply(this,arguments))}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"mounted",value:function(){var t=this,e=document.getElementById("TEIEditorConfig");if(e){var n=JSON.parse(e.innerHTML);n&&this.$store.commit("init",n)}this.$store.state.callbacks&&this.$store.state.callbacks.autoLoad&&this.$store.state.callbacks.autoLoad((function(e){t.$store.dispatch("load",e)}))}}]),e}(f["c"]);yt=d["a"]([Object(f["a"])({components:{TeiEditor:mt}})],yt);var kt=yt,Ot=kt,xt=Object(O["a"])(Ot,r,i,!1,null,null,null),jt=xt.exports,_t=n("2f62");function At(t){return"tei"===t?"http://www.tei-c.org/ns/1.0":"xml"===t?"http://www.w3.org/XML/1998/namespace":"http://www.tei-c.org/ns/1.0"}var Nt=function(){function t(e){Object(s["a"])(this,t),this.dom=e}return Object(o["a"])(t,[{key:"evaluate",value:function(t,e,n){return this.dom.evaluate(e,t,At,n,null)}},{key:"firstNode",value:function(t,e){return this.evaluate(t,e,XPathResult.FIRST_ORDERED_NODE_TYPE).singleNodeValue}},{key:"nodeIterator",value:function(t,e){return this.evaluate(t,e,XPathResult.ORDERED_NODE_ITERATOR_TYPE)}},{key:"stringValue",value:function(t,e){return this.evaluate(t,e,XPathResult.STRING_TYPE).stringValue}},{key:"booleanValue",value:function(t,e){return this.evaluate(t,e,XPathResult.BOOLEAN_TYPE).booleanValue}},{key:"numberValue",value:function(t,e){return this.evaluate(t,e,XPathResult.NUMBER_TYPE).numberValue}}]),t}(),Mt=function(){function t(e,n){Object(s["a"])(this,t),this.dom=e,this.xpath=new Nt(this.dom),this.config=n}return Object(o["a"])(t,[{key:"get",value:function(){if(!this.data){var t=this.xpath.firstNode(this.dom.documentElement,"/tei:TEI/tei:teiHeader");this.data={};for(var e=0;e<this.config.schema.length;e++){var n=this.parseHeaderNode(t,this.config.schema[e]);n&&(this.data[this.config.schema[e].tag.substring(4)]=n)}}return this.data}},{key:"parseHeaderNode",value:function(t,e){var n=this.xpath.nodeIterator(t,e.tag),a=[],r=n.iterateNext();while(r){for(var i={_attrs:{},_text:0===r.children.length?this.xpath.stringValue(r,"text()"):null},s=0;s<r.attributes.length;s++)i._attrs[r.attributes[s].name]=r.attributes[s].value;if(e.children)for(var o=0;o<e.children.length;o++){var c=this.parseHeaderNode(r,e.children[o]);c&&(i[e.children[o].tag.substring(e.children[o].tag.indexOf(":")+1)]=c)}a.push(i),r=n.iterateNext()}return 0===a.length?null:e.multiple?a:a[0]}}]),t}(),Et=function(){function t(e,n){Object(s["a"])(this,t),this.dom=e,this.xpath=new Nt(this.dom),this.config=n}return Object(o["a"])(t,[{key:"get",value:function(){if(!this.doc&&(this.doc={type:"doc",content:[]},this.nestedDocs={},this.config.parser&&this.config.parser.selector)){var t=this.xpath.firstNode(this.dom.documentElement,this.config.parser.selector);if(t)for(var e=0;e<t.children.length;e++){var n=this.parseContentNode(t.children[e],this.config);n&&!n.nestedDoc?this.doc.content.push(n):n&&n.nestedDoc&&this.addNestedDoc(n)}}return[this.doc,this.nestedDocs]}},{key:"parseContentAttributes",value:function(t,e){var n=this,a={};return Object.entries(e).forEach((function(e){var r=Object(K["a"])(e,2),i=r[0],s=r[1],o=[];s.parser?o.push(s.parser):s.parsers&&(o=s.parsers);for(var c=0;c<o.length;c++){var u=o[c];if("boolean"===u.type)a[i]=n.xpath.booleanValue(t,u.selector);else if("number"===u.type)try{a[i]=n.xpath.numberValue(t,u.selector)}catch(d){console.log(d)}else if("static"===u.type)n.xpath.booleanValue(t,u.selector)&&(a[i]=u.value);else try{var l=n.xpath.stringValue(t,u.selector);l&&(a[i]=l)}catch(d){console.log(d)}}})),a}},{key:"parseContentMarks",value:function(t,e){var n=this,a=[];return e.forEach((function(e){if("mark"===e.type){var r=[];e.parser?r.push(e.parser):e.parsers&&(r=e.parsers);for(var i=0;i<r.length;i++)if(n.xpath.booleanValue(t,r[i].selector)){var s={type:e.name};e.attrs&&(s.attrs=n.parseContentAttributes(t,e.attrs)),a.push(s)}}})),a}},{key:"parseContentNode",value:function(t,e){for(var n=Object.entries(e.schema),a=0;a<n.length;a++){var r=n[a][1],i=[];r.parser?i.push(r.parser):r.parsers&&(i=i.concat(r.parsers));for(var s=0;s<i.length;s++){var o=i[s];if(null!==this.xpath.firstNode(t,"self::"+o.selector)){var c={type:r.name};if(r.attrs&&(c.attrs=this.parseContentAttributes(t,r.attrs)),"nested"===r.type&&(c.nestedDoc=!0),"inline"===r.type)if("text"===r.name){if(c.text=this.xpath.stringValue(t,o.text),c.marks=this.parseContentMarks(t,e.schema),1===t.children.length){var u=this.parseContentNode(t.children[0],e);u.text&&""!==u.text&&(c.text=u.text),c.marks=c.marks.concat(u.marks)}}else if(0===t.children.length)this.xpath.stringValue(t,o.text)&&(c.content=[{type:"text",text:this.xpath.stringValue(t,o.text),marks:this.parseContentMarks(t,e.schema)}]);else{for(var l=[],d=0;d<t.children.length;d++){var f=this.parseContentNode(t.children[d],e);f&&l.push(f)}c.content=l}else{for(var h=[],p=0;p<t.children.length;p++){var v=this.parseContentNode(t.children[p],e);v&&!v.nestedDoc?h.push(v):v&&v.nestedDoc&&this.addNestedDoc(v)}c.content=h}return c}}}return null}},{key:"addNestedDoc",value:function(t){if(t.attrs&&t.attrs.id){this.nestedDocs[t.type]||(this.nestedDocs[t.type]={}),this.nestedDocs[t.type][t.attrs.id]=t;var e={type:"doc",content:t.content};t.content=[e]}}}]),t}();function wt(t){if(void 0!==t){if(null===t)return null;if(Array.isArray(t))return t.map((function(t){return wt(t)}));if("object"===Object(ft["a"])(t)){var e={};return Object.keys(t).forEach((function(n){e[n]=wt(t[n])})),e}return t}}a["a"].use(_t["a"]);var St={settings:{metadataSection:""},sections:{},content:{},callbacks:{save:void 0,load:void 0,autoLoad:void 0}},$t=new _t["a"].Store({state:St,mutations:{init:function(t,e){t.sections=e.sections,Object.keys(e.sections).forEach((function(n,r){"MetadataEditor"===e.sections[n].type&&(t.settings.metadataSection=n),a["a"].set(t.content,n,{}),a["a"].set(t.content[n],"doc",null),a["a"].set(t.content[n],"nested",{})})),window.TEIEditor&&window.TEIEditor.callbacks&&(a["a"].set(t.callbacks,"save",window.TEIEditor.callbacks.save),a["a"].set(t.callbacks,"load",window.TEIEditor.callbacks.load),a["a"].set(t.callbacks,"autoLoad",window.TEIEditor.callbacks.autoLoad))},setMetadata:function(t,e){a["a"].set(t.content,t.settings.metadataSection,e)},setMetadataValue:function(t,e){var n=t.content[t.settings.metadataSection];if(n){n=wt(n);var r=n,i=e.path.split(".");while(i.length>0){var s=i[0];if("["===s[0]&&"]"===s[s.length-1]&&Array.isArray(r)){var o=Number.parseInt(s.substring(1,s.length-1));o>=0&&o<r.length&&(i.length>1?r=r[o]:r[o]=e.value)}else r[s]?i.length>1?r=r[s]:r[s]=e.value:i.length>1?(r[s]={},r=r[s]):r[s]=e.value;i.splice(0,1)}a["a"].set(t.content,t.settings.metadataSection,n)}},addMetadataMuliRow:function(t,e){var n=t.content[t.settings.metadataSection];if(n){n=wt(n);var r=D(n,e.path);r&&(r.push(e.value),a["a"].set(t.content,t.settings.metadataSection,n))}},removeMetadataMultiRow:function(t,e){var n=t.content[t.settings.metadataSection];if(n){n=wt(n);var r=D(n,e.path);r&&e.value>=0&&e.value<r.length&&(r.splice(e.value,1),a["a"].set(t.content,t.settings.metadataSection,n))}},moveMetadataMultiRow:function(t,e){var n=t.content[t.settings.metadataSection];if(n){n=wt(n);var r=D(n,e.path);if(r&&e.idx>=0&&e.idx<r.length&&e.idx+e.move>=0&&e.idx+e.move<r.length){var i=r[e.idx];r.splice(e.idx,1),r.splice(e.idx+e.move,0,i),a["a"].set(t.content,t.settings.metadataSection,n)}}},setTextDoc:function(t,e){var n=e.path.split(".");2===n.length?a["a"].set(t.content[n[0]],n[1],e.doc):4===n.length&&a["a"].set(t.content[n[0]].nested[n[2]][n[3]],"content",[e.doc])},addNestedDoc:function(t,e){var n=e.path.split(".");4===n.length&&(t.content[n[0]].nested[n[2]]||a["a"].set(t.content[n[0]].nested,n[2],{}),a["a"].set(t.content[n[0]].nested[n[2]],n[3],{attrs:{id:n[3]},content:[e.doc],nestedDoc:!0,type:n[2]}))}},actions:{load:function(t,e){var n=t.commit,r=t.state,i=new DOMParser,s=i.parseFromString(e,"application/xml");a["a"].set(r,"content",{}),Object.keys(r.sections).forEach((function(t,e){a["a"].set(r.content,t,{}),a["a"].set(r.content[t],"doc",null),a["a"].set(r.content[t],"nested",{})})),Object.entries(r.sections).forEach((function(t){var e=Object(K["a"])(t,2),a=e[0],r=e[1];if("MetadataEditor"===r.type)n("setMetadata",new Mt(s,r).get());else if("TextEditor"===r.type){var i=new Et(s,r).get(),o=Object(K["a"])(i,2),c=o[0],u=o[1];n("setTextDoc",{path:a+".doc",doc:c}),Object.entries(u).forEach((function(t){var e=Object(K["a"])(t,2),r=e[0],i=e[1];Object.entries(i).forEach((function(t){var e=Object(K["a"])(t,2),i=e[0],s=e[1];n("addNestedDoc",{path:a+".nested."+r+"."+i,doc:s.content[0]})}))}))}}))}},modules:{}});a["a"].config.productionTip=!1,new a["a"]({store:$t,render:function(t){return t(jt)}}).$mount("#app")},e215:function(t,e,n){"use strict";var a=n("ba8f"),r=n.n(a);r.a}}); +//# sourceMappingURL=app.js.map \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 83c87c2b81a55f57dfd7ae11f69f97e43c39b069..357008dff400ab4b3fc6c4a014b4d52b2000be1f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -17,7 +17,9 @@ gulp.task('css:theme', function(cb) { gulp.task('css:editor', function(cb) { pump([ - gulp.src(['node_modules/tei-editor/dist/app.css']), + gulp.src([ + 'node_modules/tei-editor/dist/css/app.css', + ]), concat('tei-editor.css'), gulp.dest('editor/static/editor/css') ], cb); @@ -37,8 +39,8 @@ gulp.task('js:ui', function(cb) { gulp.task('js:editor', function(cb) { pump([ gulp.src([ - 'scripts/tei-editor/*.js', - 'node_modules/tei-editor/dist/app.js' + 'node_modules/tei-editor/dist/js/chunk-vendors.js', + 'node_modules/tei-editor/dist/js/app.js', ]), concat('tei-editor.js'), gulp.dest('editor/static/editor/js') diff --git a/package.json b/package.json index bbbb72c47825fdbf86daa628a62ddd81ea666b92..4f2e4ef44ca838fc695fe66f1a9c94b45f46dca9 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "gulp-concat": "^2.6.1", "gulp-sass": "^4.0.2", "pump": "^3.0.0", - "tei-editor": "^0.4.0" + "tei-editor": "^0.5.0" }, "browserslist": [ "last 2 versions", diff --git a/scripts/tei-editor/config.js b/scripts/tei-editor/config.js index a0182e28af654c2bed6cdfbfd889369752004d97..7dee8c35e12c34cc552dba74dc7542d728e5d553 100644 --- a/scripts/tei-editor/config.js +++ b/scripts/tei-editor/config.js @@ -12,7 +12,7 @@ tag: 'tei:teiHeader', schema: [ { - tag: 'tei:fileDesc', + "tag": 'tei:fileDesc', children: [ { tag: 'tei:titleStmt', diff --git a/theme/_aria-menu.scss b/theme/_aria-menu.scss index c6afcecacf45f03bf5524645d102da0dfaa4098b..2272ef46053013a26777c4776b5c6a58844c7559 100644 --- a/theme/_aria-menu.scss +++ b/theme/_aria-menu.scss @@ -9,7 +9,7 @@ nav.expanded { } } -*[role="menu"] { +*[role="menu"], *[role="menubar"] { @include menu-base; background: $light-gray; @@ -43,9 +43,24 @@ nav.expanded { &[aria-disabled="true"] { cursor: not-allowed; + background: $white; + color: $light-gray; + + svg path { + fill: $light-gray; + } + + &[aria-current="true"], &[aria-checked="true"], &:hover { + background: $white; + color: $light-gray; + + svg path { + fill: $light-gray; + } + } } - &[aria-current="true"], &:hover { + &[aria-current="true"], &[aria-checked="true"], &:hover { background: $primary-color; color: $white; diff --git a/theme/_generic.scss b/theme/_generic.scss new file mode 100644 index 0000000000000000000000000000000000000000..4834503528e87aa703d7932ddbba07bfdece5fad --- /dev/null +++ b/theme/_generic.scss @@ -0,0 +1,9 @@ +.margin-top { + margin-top: $global-margin; +} +.margin-bottom { + margin-bottom: $global-margin; +} +.margin-right { + margin-right: $global-margin; +} diff --git a/theme/_header.scss b/theme/_header.scss new file mode 100644 index 0000000000000000000000000000000000000000..de9baaca1b2da22ab018a1813aaf807905febc59 --- /dev/null +++ b/theme/_header.scss @@ -0,0 +1,5 @@ +header.top-bar { + padding-top: 0; + padding-bottom: 0; + border-bottom: 1px solid $medium-gray; +} diff --git a/theme/_help.scss b/theme/_help.scss new file mode 100644 index 0000000000000000000000000000000000000000..3345b64dc22a992ce4ebe145d254fa3b7fd45836 --- /dev/null +++ b/theme/_help.scss @@ -0,0 +1,5 @@ +.help aside { + dd { + margin-bottom: $global-margin; + } +} diff --git a/theme/_icons.scss b/theme/_icons.scss new file mode 100644 index 0000000000000000000000000000000000000000..7622614e4c1243001430df9cf1fa04dc1803fb91 --- /dev/null +++ b/theme/_icons.scss @@ -0,0 +1,9 @@ +[role="menuitem"] svg, [role="menuitem"] svg.mdi-icon { + width: 18px; + height: 18px; +} + +svg.mdi-icon { + height: 24px; + width: 24px; +} diff --git a/theme/_loading.scss b/theme/_loading.scss new file mode 100644 index 0000000000000000000000000000000000000000..0c1b0e903669bf7a1b5494a288d435b477fb15ed --- /dev/null +++ b/theme/_loading.scss @@ -0,0 +1,29 @@ +#loading { + z-index: -10; + position: fixed; + left: 0; + top: 0; + width: 100vw; + height: 100vh; + background-color: #00000000; + transition: background-color 0.5s; + visibility: hidden; + + &.is-visible { + z-index: 2000; + visibility: visible; + background-color: #00000066; + } + + svg { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + width: 150px; + height: 110px; + background: #ffffff; + padding: 30px 50px; + border-radius: 10px; + } +} diff --git a/theme/_main-menu.scss b/theme/_main-menu.scss new file mode 100644 index 0000000000000000000000000000000000000000..e546c13ef18c7efe8bc0c4ef4fb120b3c6e7f35f --- /dev/null +++ b/theme/_main-menu.scss @@ -0,0 +1,7 @@ +.tei-editor-menubar > [role="menu"] { + border-bottom: 1px solid $medium-gray; + + [role="menu"] { + box-shadow: 2px 5px 3px $dark-gray; + } +} diff --git a/theme/_tei-editor.scss b/theme/_tei-editor.scss new file mode 100644 index 0000000000000000000000000000000000000000..94906075ee6c0ab811c6d095ee17783982772258 --- /dev/null +++ b/theme/_tei-editor.scss @@ -0,0 +1,251 @@ +#app { + height: 100%; +} + +#tei-editor { + .metadata-editor { + display: flex; + flex-direction: row; + flex-wrap: wrap; + + & > section { + padding: 0 1rem; + box-sizing: border-box; + width: 100%; + + &:nth-child(1), &:nth-child(2) { + @include breakpoint(large) { + width: 50%; + } + } + + > div { + margin-bottom: $global-margin; + } + } + + input { + margin-bottom: 0; + } + + .multi-row { + > li { + &:not(:first-child) { + > div { + > label { + .label-text { + display: none; + } + } + } + } + } + } + + [role="menubar"] { + background: transparent; + align-items: center; + } + + [role="menu"] { + background: transparent; + } + } + + .text-editor { + padding: 0 1rem; + box-sizing: border-box; + font-family: 'Merriweather', Georgia, serif; + font-size: 11pt; + + .nested { + background: $white; + top: 0; + left: 0; + } + + > div { + overflow-y: auto; + + &:nth-child(2) { + background: $light-gray; + padding: 0 1rem; + width: 25%; + + > div { + margin-bottom: 1rem; + } + + h2 { + font-size: 14pt; + font-weight: bold; + } + + label { + input { + display: block; + } + } + } + } + + .node-paragraph { + text-indent: 2rem; + + &[data-noindent="true"] { + text-indent: 0; + } + + &[data-textalign="center"] { + text-align: center; + } + + &[data-textalign="right"] { + text-align: right; + } + + &[data-textalign="justify"] { + text-align: justify; + } + } + + .node-heading { + font-weight: bold; + text-align: center; + + &[data-level="1"] { + font-size: 15pt; + } + + &[data-level="2"] { + font-size: 13pt; + } + + &[data-level="3"] { + font-size: 12pt; + } + + + &[data-level="4"] { + font-size: 11pt; + } + } + + .node-lineGroup { + margin: 1rem 0; + } + + .node-pageBegin { + font-size: 80%; + font-style: italic; + + &::before { + content: '['; + } + + &::after { + content: ']'; + } + } + + .node-foreignLanguage { + font-weight: 300; + } + + .node-annotationMarker { + text-decoration: underline dotted; + } + + .node-annotationGlobal { + text-decoration: underline dotted; + } + + .node-footnoteMarker { + text-decoration: underline dotted; + } + + .node-quotation { + font-style: italic; + } + + .node-sourceList { + .node-source { + } + } + + .node-lineGroup { + margin-top: 1rem; + margin-left: 2rem; + + .node-line { + } + } + + .node-pageLineRef { + font-weight: bold; + } + + .node-wordRange { + padding-left: $global-padding; + } + + .node-sic { + font-style: italic; + } + + .node-reading { + font-style: italic; + } + + .node-lemma { + font-style: italic; + + &::after { + content: ' ]'; + font-style: normal; + } + } + + .node-missing { + &::before { + content: '\25fc'; + vertical-align: sub; + } + &::after { + content: '\25fc'; + vertical-align: super; + } + } + + .mark-letterSparse { + letter-spacing: 1.5pt; + } + + .mark-fontWeightBold { + font-weight: 700; + } + + .mark-fontStyleItalic { + font-style: italic; + } + + .mark-fontSize { + &[data-size="small"] { + font-size: 10pt; + } + + &[data-size="medium"] { + font-size: 13pt; + } + + &[data-size="large"] { + font-size: 15pt; + } + } + + .mark-sup { + vertical-align: super; + font-size: 80%; + } + } +} diff --git a/theme/_tree-view.scss b/theme/_tree-view.scss new file mode 100644 index 0000000000000000000000000000000000000000..d708f09cd8367f10f92568e1b756b7c4299c507c --- /dev/null +++ b/theme/_tree-view.scss @@ -0,0 +1,11 @@ +ul.tree { + margin: 0; + + li { + list-style-type: none; + + ul { + margin-left: $global-margin; + } + } +} diff --git a/theme/app.scss b/theme/app.scss index 3832d8d933e89b9262252022636606ed729c356c..b594abdc32f65d9778387095164ec240cf533d48 100644 --- a/theme/app.scss +++ b/theme/app.scss @@ -5,249 +5,12 @@ @include foundation-everything; @import 'aria-menu'; - -[role="menuitem"] svg, [role="menuitem"] svg.mdi-icon { - width: 18px; - height: 18px; -} - -svg.mdi-icon { - height: 24px; - width: 24px; -} - -.help aside { - dd { - margin-bottom: $global-margin; - } -} - -header.top-bar { - padding-top: 0; - padding-bottom: 0; - border-bottom: 1px solid $medium-gray; -} - -.margin-top { - margin-top: $global-margin; -} -.margin-bottom { - margin-bottom: $global-margin; -} -.margin-right { - margin-right: $global-margin; -} - -.tei-editor-menubar > [role="menu"] { - border-bottom: 1px solid $medium-gray; - - [role="menu"] { - box-shadow: 2px 5px 3px $dark-gray; - } -} - -ul.tree { - margin: 0; - - li { - list-style-type: none; - - ul { - margin-left: $global-margin; - } - } -} - -#loading { - z-index: -10; - position: fixed; - left: 0; - top: 0; - width: 100vw; - height: 100vh; - background-color: #00000000; - transition: background-color 0.5s; - visibility: hidden; - - &.is-visible { - z-index: 2000; - visibility: visible; - background-color: #00000066; - } - - svg { - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - width: 150px; - height: 110px; - background: #ffffff; - padding: 30px 50px; - border-radius: 10px; - } -} - -.tei-editor-prosemirror-sidebar { - background: $light-gray; - padding: $global-padding; - - dd { - margin-bottom: $global-margin; - } -} -#annotations .tei-editor-prosemirror-editor { - font-family: 'Merriweather Sans', Arial, serif; -} -.tei-editor-prosemirror-editor { - padding: $global-padding; - font-family: 'Merriweather', Georgia, serif; - - .tei-editor-pageBegin { - font-size: 80%; - font-style: italic; - - &::before { - content: '[' - } - &::after { - content: ']' - } - } - .tei-editor-letterSparse { - letter-spacing: 1.5pt; - } - .tei-editor-fontWeightBold { - font-weight: 700; - } - .tei-editor-fontStyleItalic { - font-style: italic; - } - .tei-editor-fontSize { - &[data-size="small"] { - font-size: 10pt; - } - &[data-size="medium"] { - font-size: 13pt; - } - &[data-size="large"] { - font-size: 15pt; - } - } - .tei-editor-foreignLanguage { - font-weight: 300; - } - .tei-editor-sup { - font-size: 80%; - vertical-align: super; - } - .tei-editor-quotation { - font-style: italic; - } - .tei-editor-annotation, .tei-editor-annotationGlobal { - text-decoration: underline dotted; - } - .tei-editor-heading { - &[data-level="1"] { - font-size: 15pt; - font-weight: bold; - text-align: center; - margin: 0; - } - } - * + .tei-editor-heading[data-level="1"] { - padding-top: 3rem; - } - .tei-editor-heading[data-level="1"] + .tei-editor-heading[data-level="1"] { - padding-top: 0; - } - .tei-editor-heading[data-level="2"] { - font-size: 13pt; - font-weight: bold; - text-align: center; - } - * + .tei-editor-heading[data-level="2"] { - padding-top: 2rem; - } - .tei-editor-heading[data-level="2"] + .tei-editor-heading[data-level="2"] { - padding-top: 0; - } - .tei-editor-heading[data-level="3"] { - font-size: 12pt; - font-weight: bold; - text-align: center; - } - * + .tei-editor-heading[data-level="3"] { - padding-top: 1.5rem; - } - .tei-editor-heading[data-level="2"] + .tei-editor-heading[data-level="3"] { - padding-top: 0; - } - .tei-editor-paragraph, .tei-editor-sourceList { - font-size: 11pt; - margin-bottom: 0; - text-indent: 1cm; - - &[data-noindent="true"] { - text-indent: 0; - } - - &[data-textalign="center"] { - text-align: center; - } - - &[data-textalign="right"] { - text-align: right; - } - - &[data-textalign="justify"] { - text-align: justify; - } - } - .tei-editor-heading[data-level="1"] + .tei-editor-paragraph, .tei-editor-heading[data-level="2"] + .tei-editor-paragraph { - margin-top: 3rem !important; - } - .tei-editor-lineGroup { - margin-top: 1rem; - margin-left: 2rem; - } - .tei-editor-line { - font-size: 11pt; - } - .tei-editor-pageLineRef { - font-weight: bold; - } - .tei-editor-wordRange { - padding-left: $global-padding; - } - .tei-editor-sic, .tei-editor-reading { - font-style: italic; - } - .tei-editor-lemma { - font-style: italic; - - &::after { - content: ' ]'; - font-style: normal; - } - } - .tei-editor-footnote { - font-size: 9pt; - font-weight: normal; - font-style: normal; - border: 1px solid $dark-gray; - border-radius: 3px; - padding: 0.1rem 0.2rem; - background: $light-gray; - } - .tei-editor-missing { - &::before { - content: '\25fc'; - vertical-align: sub; - } - &::after { - content: '\25fc'; - vertical-align: super; - } - } -} +@import 'generic'; +@import 'icons'; + +@import 'header'; +@import 'help'; +@import 'main-menu'; +@import 'tree-view'; +@import 'loading'; +@import 'tei-editor'; diff --git a/yarn.lock b/yarn.lock index 52de35ac49064d79245063bdb0cd2ef4473ee8a2..7f866b202aaff7a0303edc3d5fc96845748a8a82 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,17 +2,54 @@ # yarn lockfile v1 +"@types/orderedmap@*": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/orderedmap/-/orderedmap-1.0.0.tgz#807455a192bba52cbbb4517044bc82bdbfa8c596" + integrity sha512-dxKo80TqYx3YtBipHwA/SdFmMMyLCnP+5mkEqN0eMjcTBzHkiiX0ES118DsjDBjvD+zeSsSU9jULTZ+frog+Gw== + +"@types/prosemirror-model@*", "@types/prosemirror-model@^1.7.2": + version "1.7.2" + resolved "https://registry.yarnpkg.com/@types/prosemirror-model/-/prosemirror-model-1.7.2.tgz#9c7aff2fd62f0f56eb76e2e0eb27bf6996e6c28a" + integrity sha512-2l+yXvidg3AUHN07mO4Jd8Q84fo6ksFsy7LHUurLYrZ74uTahBp2fzcO49AKZMzww2EulXJ40Kl/OFaQ/7A1fw== + dependencies: + "@types/orderedmap" "*" + +"@types/prosemirror-state@*", "@types/prosemirror-state@^1.2.3": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@types/prosemirror-state/-/prosemirror-state-1.2.3.tgz#7f5f871acf7b8c22e1862ff0068f9bf7e9682c0e" + integrity sha512-6m433Hubix9bx+JgcLW7zzyiZuzwjq5mBdSMYY4Yi5c5ZpV2RiVmg7Cy6f9Thtts8vuztilw+PczJAgDm1Frfw== + dependencies: + "@types/prosemirror-model" "*" + "@types/prosemirror-transform" "*" + "@types/prosemirror-view" "*" + +"@types/prosemirror-transform@*": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/prosemirror-transform/-/prosemirror-transform-1.1.1.tgz#5a0de16e8e0123b4c3d9559235e19f39cee85e5c" + integrity sha512-yYCYSoiRH+Wcbl8GJc0PFCzeyMzNQ1vL2xrHHSXZuNcIlH75VoiKrZFeZ6BS9cl8mYXjZrlmdBe8YOxYvyKM6A== + dependencies: + "@types/prosemirror-model" "*" + +"@types/prosemirror-view@*": + version "1.11.2" + resolved "https://registry.yarnpkg.com/@types/prosemirror-view/-/prosemirror-view-1.11.2.tgz#58af5dcb7de20b7de874de99147552d5627209a1" + integrity sha512-EKcQmR4KdkFZU13wS5pWrkSojRCPGqz/l/uzpZFfW5cgdr7fQsftf2/ttvIjpk1a94ISifEY4UZwflVJ+uL4Rg== + dependencies: + "@types/prosemirror-model" "*" + "@types/prosemirror-state" "*" + "@types/prosemirror-transform" "*" + abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== ajv@^6.5.5: - version "6.10.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" - integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== + version "6.11.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.11.0.tgz#c3607cbc8ae392d8a5a536f25b21f8e5f3f87fe9" + integrity sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA== dependencies: - fast-deep-equal "^2.0.1" + fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.4.1" uri-js "^4.2.2" @@ -218,22 +255,22 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -atob@^2.1.1: +atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== autoprefixer@^9.6.1: - version "9.6.4" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.4.tgz#e6453be47af316b2923eaeaed87860f52ad4b7eb" - integrity sha512-Koz2cJU9dKOxG8P1f8uVaBntOv9lP4yz9ffWvWaicv9gHBPhpQB22nGijwd8gqW9CNT+UdkbQOQNLVI8jN1ZfQ== + version "9.7.4" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.4.tgz#f8bf3e06707d047f0641d87aee8cfb174b2a5378" + integrity sha512-g0Ya30YrMBAEZk60lp+qfX5YQllG+S5W3GYCFvyHTvhOki0AEQJLPEcIuGRsqVwLi8FvXPVtwTGhfr38hVpm0g== dependencies: - browserslist "^4.7.0" - caniuse-lite "^1.0.30000998" + browserslist "^4.8.3" + caniuse-lite "^1.0.30001020" chalk "^2.4.2" normalize-range "^0.1.2" num2fraction "^1.2.2" - postcss "^7.0.18" + postcss "^7.0.26" postcss-value-parser "^4.0.2" aws-sign2@~0.7.0: @@ -242,9 +279,9 @@ aws-sign2@~0.7.0: integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= aws4@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" - integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== + version "1.9.1" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e" + integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug== bach@^1.0.0: version "1.2.0" @@ -291,6 +328,13 @@ binary-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + block-stream@*: version "0.0.9" resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" @@ -322,14 +366,14 @@ braces@^2.3.1, braces@^2.3.2: split-string "^3.0.2" to-regex "^3.0.1" -browserslist@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17" - integrity sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA== +browserslist@^4.8.3: + version "4.8.5" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.5.tgz#691af4e327ac877b25e7a3f7ee869c4ef36cdea3" + integrity sha512-4LMHuicxkabIB+n9874jZX/az1IaZ5a+EUuvD7KFOu9x/Bd5YHyO0DIz2ls/Kl8g0ItS4X/ilEgf4T1Br0lgSg== dependencies: - caniuse-lite "^1.0.30000989" - electron-to-chromium "^1.3.247" - node-releases "^1.1.29" + caniuse-lite "^1.0.30001022" + electron-to-chromium "^1.3.338" + node-releases "^1.1.46" buffer-equal@^1.0.0: version "1.0.0" @@ -374,10 +418,10 @@ camelcase@^3.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= -caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30000998: - version "1.0.30000999" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000999.tgz#427253a69ad7bea4aa8d8345687b8eec51ca0e43" - integrity sha512-1CUyKyecPeksKwXZvYw0tEoaMCo/RwBlXmEtN5vVnabvO0KPd9RQLcaAuR9/1F+KDMv6esmOFWlsXuzDk+8rxg== +caniuse-lite@^1.0.30001020, caniuse-lite@^1.0.30001022: + version "1.0.30001022" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001022.tgz#9eeffe580c3a8f110b7b1742dcf06a395885e4c6" + integrity sha512-FjwPPtt/I07KyLPkBQ0g7/XuZg6oUkYBVnPHNj3VHJbOjmmJ/GdSo/GUY6MwINEQvjhP6WZVbX8Tvms8xh0D5A== caseless@~0.12.0: version "0.12.0" @@ -550,9 +594,9 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0: integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= convert-source-map@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" - integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== + version "1.7.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" + integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== dependencies: safe-buffer "~5.1.1" @@ -569,6 +613,11 @@ copy-props@^2.0.1: each-props "^1.3.0" is-plain-object "^2.0.1" +core-js@^3.4.3: + version "3.6.4" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.4.tgz#440a83536b458114b9cb2ac1580ba377dc470647" + integrity sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw== + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -720,10 +769,10 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -electron-to-chromium@^1.3.247: - version "1.3.280" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.280.tgz#5f8950c8329e3e11b59c705fd59b4b8d9b3de5b9" - integrity sha512-qYWNMjKLEfQAWZF2Sarvo+ahigu0EArnpCFSoUuZJS3W5wIeVfeEvsgmT2mgIrieQkeQ0+xFmykK3nx2ezekPQ== +electron-to-chromium@^1.3.338: + version "1.3.340" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.340.tgz#5d4fe78e984d4211194cf5a52e08069543da146f" + integrity sha512-hRFBAglhcj5iVYH+o8QU0+XId1WGoc0VGowJB1cuJAt3exHGrivZvWeAO5BRgBZqwZtwxjm8a5MQeGoT/Su3ww== end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.4" @@ -739,14 +788,14 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" -es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.51: - version "0.10.51" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.51.tgz#ed2d7d9d48a12df86e0299287e93a09ff478842f" - integrity sha512-oRpWzM2WcLHVKpnrcyB7OW8j/s67Ba04JCm0WnNv3RiABSvs7mrQlutB8DBv793gKcp0XENR8Il8WxGTlZ73gQ== +es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50: + version "0.10.53" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" + integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== dependencies: es6-iterator "~2.0.3" - es6-symbol "~3.1.1" - next-tick "^1.0.0" + es6-symbol "~3.1.3" + next-tick "~1.0.0" es6-iterator@^2.0.1, es6-iterator@^2.0.3, es6-iterator@~2.0.3: version "2.0.3" @@ -757,13 +806,13 @@ es6-iterator@^2.0.1, es6-iterator@^2.0.3, es6-iterator@~2.0.3: es5-ext "^0.10.35" es6-symbol "^3.1.1" -es6-symbol@^3.1.1, es6-symbol@~3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.2.tgz#859fdd34f32e905ff06d752e7171ddd4444a7ed1" - integrity sha512-/ZypxQsArlv+KHpGvng52/Iz8by3EQPxhmbuz8yFG89N/caTFBSbcXONDw0aMjy827gQg26XAjP4uXFvnfINmQ== +es6-symbol@^3.1.1, es6-symbol@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== dependencies: d "^1.0.1" - es5-ext "^0.10.51" + ext "^1.1.2" es6-weak-map@^2.0.1: version "2.0.3" @@ -800,6 +849,13 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" +ext@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244" + integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== + dependencies: + type "^2.0.0" + extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -854,15 +910,20 @@ fancy-log@^1.3.2: parse-node-version "^1.0.0" time-stamp "^1.0.0" -fast-deep-equal@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" - integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= +fast-deep-equal@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" + integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== fill-range@^4.0.0: version "4.0.0" @@ -953,9 +1014,9 @@ form-data@~2.3.2: mime-types "^2.1.12" foundation-sites@^6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/foundation-sites/-/foundation-sites-6.5.3.tgz#85373aaed72233ca0d16fdfcb034e976cc6943c9" - integrity sha512-ZwI0idjHHjezh6jRjpPxkczvmtUuJ1uGatZHpyloX0MvsFHfM0BFoxrqdXryXugGPdmb+yJi3JYMnz6+5t3K1A== + version "6.6.1" + resolved "https://registry.yarnpkg.com/foundation-sites/-/foundation-sites-6.6.1.tgz#79dce2f897cc08fafa7e8d56f5b0e88b51c45d38" + integrity sha512-4GrCL8L3osFJM6WCNRIQs5kGX5BCKNuO2zzQN68lUTblgpH7FUE28ctkbNFqoTnkUmWARj5VtiS3oQob3H0eZA== fragment-cache@^0.2.1: version "0.2.1" @@ -985,12 +1046,12 @@ fs.realpath@^1.0.0: integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^1.2.7: - version "1.2.9" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" - integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== + version "1.2.11" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.11.tgz#67bf57f4758f02ede88fb2a1712fef4d15358be3" + integrity sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw== dependencies: + bindings "^1.5.0" nan "^2.12.1" - node-pre-gyp "^0.12.0" fstream@^1.0.0, fstream@^1.0.12: version "1.0.12" @@ -1087,9 +1148,9 @@ glob-watcher@^5.0.3: object.defaults "^1.1.0" glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@~7.1.1: - version "7.1.4" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" - integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -1119,9 +1180,9 @@ global-prefix@^1.0.1: which "^1.2.14" globule@^1.0.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.1.tgz#5dffb1b191f22d20797a9369b49eab4e9839696d" - integrity sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ== + version "1.3.0" + resolved "https://registry.yarnpkg.com/globule/-/globule-1.3.0.tgz#41d0e9fb44afd4b80d93a23263714f90b3dec904" + integrity sha512-YlD4kdMqRCQHrhVdonet4TdRtv1/sZKepvoxNT4Nrhrp5HI8XFfc8kFlGlBn2myBo80aGp8Eft259mbcUJhgSg== dependencies: glob "~7.1.1" lodash "~4.17.10" @@ -1135,9 +1196,9 @@ glogg@^1.0.0: sparkles "^1.0.0" graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: - version "4.2.2" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02" - integrity sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q== + version "4.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" + integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== gulp-autoprefixer@^7.0.1: version "7.0.1" @@ -1241,9 +1302,9 @@ has-flag@^3.0.0: integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= has-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" - integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" + integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== has-unicode@^2.0.0: version "2.0.1" @@ -1627,9 +1688,9 @@ kind-of@^5.0.0, kind-of@^5.0.2: integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" - integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== last-run@^1.1.0: version "1.1.1" @@ -1690,7 +1751,7 @@ lodash.clonedeep@^4.3.2: resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= -lodash@^4.0.0, lodash@^4.17.11, lodash@~4.17.10: +lodash@^4.0.0, lodash@^4.17.15, lodash@~4.17.10: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -1780,17 +1841,17 @@ micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" -mime-db@1.40.0: - version "1.40.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" - integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== +mime-db@1.43.0: + version "1.43.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" + integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.24" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" - integrity sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ== + version "2.1.26" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" + integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== dependencies: - mime-db "1.40.0" + mime-db "1.43.0" minimatch@^3.0.4, minimatch@~3.0.2: version "3.0.4" @@ -1885,7 +1946,7 @@ needle@^2.2.1: iconv-lite "^0.4.4" sax "^1.2.4" -next-tick@^1.0.0: +next-tick@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= @@ -1908,10 +1969,10 @@ node-gyp@^3.8.0: tar "^2.0.0" which "1" -node-pre-gyp@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" - integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== +node-pre-gyp@*: + version "0.14.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83" + integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA== dependencies: detect-libc "^1.0.2" mkdirp "^0.5.1" @@ -1922,19 +1983,19 @@ node-pre-gyp@^0.12.0: rc "^1.2.7" rimraf "^2.6.1" semver "^5.3.0" - tar "^4" + tar "^4.4.2" -node-releases@^1.1.29: - version "1.1.35" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.35.tgz#32a74a3cd497aa77f23d509f483475fd160e4c48" - integrity sha512-JGcM/wndCN/2elJlU0IGdVEJQQnJwsLbgPCFd2pY7V0mxf17bZ0Gb/lgOtL29ZQhvEX5shnVhxQyZz3ex94N8w== +node-releases@^1.1.46: + version "1.1.47" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.47.tgz#c59ef739a1fd7ecbd9f0b7cf5b7871e8a8b591e4" + integrity sha512-k4xjVPx5FpwBUj0Gw7uvFOTF4Ep8Hok1I6qjwL3pLfwe7Y0REQSAqOwwv9TWBCUtMHxcXfY4PgRLRozcChvTcA== dependencies: semver "^6.3.0" node-sass@^4.8.3: - version "4.12.0" - resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.12.0.tgz#0914f531932380114a30cc5fa4fa63233a25f017" - integrity sha512-A1Iv4oN+Iel6EPv77/HddXErL2a+gZ4uBeZUy+a8O35CFYTXhgA8MgLCWBtwpGZdCvTvQ9d+bQxX/QC36GDPpQ== + version "4.13.1" + resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.13.1.tgz#9db5689696bb2eec2c32b98bfea4c7a2e992d0a3" + integrity sha512-TTWFx+ZhyDx1Biiez2nB0L3YrCZ/8oHagaDalbuBSlqXgUPsdkUSzJsVxeDO9LtPB49+Fh3WQl3slABo6AotNw== dependencies: async-foreach "^0.1.3" chalk "^1.1.1" @@ -1943,7 +2004,7 @@ node-sass@^4.8.3: get-stdin "^4.0.1" glob "^7.0.3" in-publish "^2.0.0" - lodash "^4.17.11" + lodash "^4.17.15" meow "^3.7.0" mkdirp "^0.5.1" nan "^2.13.2" @@ -2004,17 +2065,25 @@ now-and-later@^2.0.0: once "^1.3.2" npm-bundled@^1.0.1: - version "1.0.6" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" - integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== + version "1.1.1" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" + integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== + dependencies: + npm-normalize-package-bin "^1.0.1" + +npm-normalize-package-bin@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" + integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== npm-packlist@^1.1.6: - version "1.4.6" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.6.tgz#53ba3ed11f8523079f1457376dd379ee4ea42ff4" - integrity sha512-u65uQdb+qwtGvEJh/DgQgW1Xg7sqeNbmxYyrvlNznaVTjV3E5P6F/EFjM+BVHXl7JJlsdG8A64M0XI8FI/IOlg== + version "1.4.8" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" + integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== dependencies: ignore-walk "^3.0.1" npm-bundled "^1.0.1" + npm-normalize-package-bin "^1.0.1" "npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2: version "4.1.2" @@ -2124,6 +2193,11 @@ ordered-read-streams@^1.0.0: dependencies: readable-stream "^2.0.1" +orderedmap@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/orderedmap/-/orderedmap-1.1.1.tgz#c618e77611b3b21d0fe3edc92586265e0059c789" + integrity sha512-3Ux8um0zXbVacKUkcytc0u3HgC0b0bBLT+I60r2J/En72cI0nZffqrA7Xtf2Hqs27j1g82llR5Mhbd0Z1XW4AQ== + os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -2265,10 +2339,10 @@ postcss-value-parser@^4.0.2: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz#482282c09a42706d1fc9a069b73f44ec08391dc9" integrity sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ== -postcss@^7.0.17, postcss@^7.0.18: - version "7.0.18" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.18.tgz#4b9cda95ae6c069c67a4d933029eddd4838ac233" - integrity sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g== +postcss@^7.0.17, postcss@^7.0.26: + version "7.0.26" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.26.tgz#5ed615cfcab35ba9bbb82414a4fa88ea10429587" + integrity sha512-IY4oRjpXWYshuTDFxMVkJDtWIk2LhsTlu8bZnbEJA4+bYT16Lvpo8Qv6EvDumhYRgzjZl489pmsY3qVgJQ08nA== dependencies: chalk "^2.4.2" source-map "^0.6.1" @@ -2284,15 +2358,130 @@ process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== +prosemirror-commands@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prosemirror-commands/-/prosemirror-commands-1.1.2.tgz#6868cabc9f9112fba94c805139473527774b0dea" + integrity sha512-JBa06kjgX67d9JVUVJbCkxwvSGtQnWAN/85nq9csOMS5Z9WZLEvVDtVvZranNlu8l/XNVBWrZxOOK+pB03eTfA== + dependencies: + prosemirror-model "^1.0.0" + prosemirror-state "^1.0.0" + prosemirror-transform "^1.0.0" + +prosemirror-dropcursor@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/prosemirror-dropcursor/-/prosemirror-dropcursor-1.3.2.tgz#28738c4ed7102e814d7a8a26d70018523fc7cd6d" + integrity sha512-4c94OUGyobGnwcQI70OXyMhE/9T4aTgjU+CHxkd5c7D+jH/J0mKM/lk+jneFVKt7+E4/M0D9HzRPifu8U28Thw== + dependencies: + prosemirror-state "^1.0.0" + prosemirror-transform "^1.1.0" + prosemirror-view "^1.1.0" + +prosemirror-gapcursor@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prosemirror-gapcursor/-/prosemirror-gapcursor-1.1.2.tgz#a1400a86a51d4cccc065e68d5625a9fb5bc623e0" + integrity sha512-Z+eqk6RysZVxidGWN5aWoSTbn5bTHf1XZ+nQJVwUSdwdBVkfQMFdTHgfrXA8W5MhHHdNg/EEEYG3z3Zi/vE2QQ== + dependencies: + prosemirror-keymap "^1.0.0" + prosemirror-model "^1.0.0" + prosemirror-state "^1.0.0" + prosemirror-view "^1.0.0" + +prosemirror-inputrules@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prosemirror-inputrules/-/prosemirror-inputrules-1.1.2.tgz#487e46c763e1212a4577397aba7706139084f012" + integrity sha512-Ja5Z3BWestlHYGvtSGqyvxMeB8QEuBjlHM8YnKtLGUXMDp965qdDV4goV8lJb17kIWHk7e7JNj6Catuoa3302g== + dependencies: + prosemirror-state "^1.0.0" + prosemirror-transform "^1.0.0" + +prosemirror-keymap@1.1.3, prosemirror-keymap@^1.0.0, prosemirror-keymap@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/prosemirror-keymap/-/prosemirror-keymap-1.1.3.tgz#be22d6108df2521608e9216a87b1a810f0ed361e" + integrity sha512-PRA4NzkUMzV/NFf5pyQ6tmlIHiW/qjQ1kGWUlV2rF/dvlOxtpGpTEjIMhWgLuMf+HiDEFnUEP7uhYXu+t+491g== + dependencies: + prosemirror-state "^1.0.0" + w3c-keyname "^2.2.0" + +prosemirror-model@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/prosemirror-model/-/prosemirror-model-1.8.2.tgz#c74eaacb0bbfea49b59a6d89fef5516181666a56" + integrity sha512-piffokzW7opZVCjf/9YaoXvTC0g7zMRWKJib1hpphPfC+4x6ZXe5CiExgycoWZJe59VxxP7uHX8aFiwg2i9mUQ== + dependencies: + orderedmap "^1.1.0" + +prosemirror-model@^1.0.0, prosemirror-model@^1.1.0, prosemirror-model@^1.8.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/prosemirror-model/-/prosemirror-model-1.9.1.tgz#8c08cf556f593c5f015548d2c1a6825661df087f" + integrity sha512-Qblh8pm1c7Ll64sYLauwwzjimo/tFg1zW3Q3IWhKRhvfOEgRKqa6dC5pRrAa+XHOIjBFEYrqbi52J5bqA2dV8Q== + dependencies: + orderedmap "^1.1.0" + +prosemirror-schema-list@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prosemirror-schema-list/-/prosemirror-schema-list-1.1.2.tgz#310809209094b03425da7f5c337105074913da6c" + integrity sha512-dgM9PwtM4twa5WsgSYMB+J8bwjnR43DAD3L9MsR9rKm/nZR5Y85xcjB7gusVMSsbQ2NomMZF03RE6No6mTnclQ== + dependencies: + prosemirror-model "^1.0.0" + prosemirror-transform "^1.0.0" + +prosemirror-state@1.3.2, prosemirror-state@^1.0.0, prosemirror-state@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/prosemirror-state/-/prosemirror-state-1.3.2.tgz#1b910b0dc01c1f00926bb9ba1589f7b7ac0d658b" + integrity sha512-t/JqE3aR0SV9QrzFVkAXsQwsgrQBNs/BDbcFH20RssW0xauqNNdjTXxy/J/kM7F+0zYi6+BRmz7cMMQQFU3mwQ== + dependencies: + prosemirror-model "^1.0.0" + prosemirror-transform "^1.0.0" + +prosemirror-tables@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prosemirror-tables/-/prosemirror-tables-1.0.0.tgz#ec3d0b11e638c6a92dd14ae816d0a2efd1719b70" + integrity sha512-zFw5Us4G5Vdq0yIj8GiqZOGA6ud5UKpMKElux9O0HrfmhkuGa1jf1PCpz2R5pmIQJv+tIM24H1mox/ODBAX37Q== + dependencies: + prosemirror-keymap "^1.1.2" + prosemirror-model "^1.8.1" + prosemirror-state "^1.3.1" + prosemirror-transform "^1.2.1" + prosemirror-view "^1.13.3" + +prosemirror-transform@^1.0.0, prosemirror-transform@^1.1.0, prosemirror-transform@^1.2.1: + version "1.2.3" + resolved "https://registry.yarnpkg.com/prosemirror-transform/-/prosemirror-transform-1.2.3.tgz#239d17591af24d39ef3f1999daa09e1f1c76b06a" + integrity sha512-PUfayeskQfuUBXktvL6207ZWRwHBFNPNPiek4fR+LgCPnBofuEb2+L0FfbNtrAwffHVs6M3DaFvJB1W2VQdV0A== + dependencies: + prosemirror-model "^1.0.0" + +prosemirror-utils@0.9.6: + version "0.9.6" + resolved "https://registry.yarnpkg.com/prosemirror-utils/-/prosemirror-utils-0.9.6.tgz#3d97bd85897e3b535555867dc95a51399116a973" + integrity sha512-UC+j9hQQ1POYfMc5p7UFxBTptRiGPR7Kkmbl3jVvU8VgQbkI89tR/GK+3QYC8n+VvBZrtAoCrJItNhWSxX3slA== + +prosemirror-view@1.13.4: + version "1.13.4" + resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.13.4.tgz#01d873db7731e0aacc410a9038447d1b7536fd07" + integrity sha512-mtgWEK16uYQFk3kijRlkSpAmDuy7rxYuv0pgyEBDmLT1PCPY8380CoaYnP8znUT6BXIGlJ8oTveK3M50U+B0vw== + dependencies: + prosemirror-model "^1.1.0" + prosemirror-state "^1.0.0" + prosemirror-transform "^1.1.0" + +prosemirror-view@^1.0.0, prosemirror-view@^1.1.0, prosemirror-view@^1.13.3: + version "1.13.8" + resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.13.8.tgz#ee0998f67edb95d8558e76fb289641deacf68b4f" + integrity sha512-gz3msc9ocWo0m7PxCeNTLxaBZ8VSD9J+A/x16GwXnROAtyKalEMvZInwk+lH2kIEIM3tC/m90xe5U/vf+vM9IA== + dependencies: + prosemirror-model "^1.1.0" + prosemirror-state "^1.0.0" + prosemirror-transform "^1.1.0" + pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= psl@^1.1.24: - version "1.4.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.4.0.tgz#5dd26156cdb69fa1fdb8ab1991667d3f80ced7c2" - integrity sha512-HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw== + version "1.7.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.7.0.tgz#f1c4c47a8ef97167dea5d6bbf4816d736e884a3c" + integrity sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ== pump@^2.0.0: version "2.0.1" @@ -2362,18 +2551,18 @@ read-pkg@^1.0.0: path-type "^1.0.0" "readable-stream@2 || 3": - version "3.4.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" - integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== + version "3.5.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.5.0.tgz#465d70e6d1087f6162d079cd0b5db7fbebfd1606" + integrity sha512-gSz026xs2LfxBPudDuI41V1lka8cxg64E66SGe78zJlsUofOg/yqwezdIcdfwik6B4h8LFmWPA9ef9X3FiNFLA== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" util-deprecate "^1.0.1" readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" - integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== dependencies: core-util-is "~1.0.0" inherits "~2.0.3" @@ -2525,9 +2714,9 @@ resolve-url@^0.2.1: integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.4.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6" - integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w== + version "1.15.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.0.tgz#1b7ca96073ebb52e741ffd799f6b39ea462c67f5" + integrity sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw== dependencies: path-parse "^1.0.6" @@ -2661,11 +2850,11 @@ snapdragon@^0.8.1: use "^3.1.0" source-map-resolve@^0.5.0: - version "0.5.2" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" - integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== dependencies: - atob "^2.1.1" + atob "^2.1.2" decode-uri-component "^0.2.0" resolve-url "^0.2.1" source-map-url "^0.4.0" @@ -2772,9 +2961,9 @@ stream-exhaust@^1.0.1: integrity sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw== stream-shift@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" - integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI= + version "1.0.1" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" + integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" @@ -2876,7 +3065,7 @@ tar@^2.0.0: fstream "^1.0.12" inherits "2" -tar@^4: +tar@^4.4.2: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== @@ -2889,10 +3078,19 @@ tar@^4: safe-buffer "^5.1.2" yallist "^3.0.3" -tei-editor@^0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/tei-editor/-/tei-editor-0.4.2.tgz#ce86557e51ef660c44ecf7672e9de91a124183bc" - integrity sha512-tNAbs3y9qxxFOwb0bc4wznGOX9OJlcYFKH8ND2MxmY8NF8t/TUAWMpYRFjp8JIE5+Z7w3K57Zv+Rn4lqUPRFeg== +tei-editor@^0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/tei-editor/-/tei-editor-0.5.2.tgz#8d9111911838809efddf9e7bffaf851f1811ad7d" + integrity sha512-gW7NlAXHGMp6Z7YO+NFJa1+4ZMYijK7My0WB10uaJU3oWt7wIq+ZfZXomC2XvwwPmBAhM51vc2k9/CWYHHETbQ== + dependencies: + "@types/prosemirror-model" "^1.7.2" + "@types/prosemirror-state" "^1.2.3" + core-js "^3.4.3" + tiptap "^1.26.6" + vue "^2.6.10" + vue-class-component "^7.0.2" + vue-property-decorator "^8.3.0" + vuex "^3.1.2" through2-filter@^3.0.0: version "3.0.0" @@ -2922,6 +3120,46 @@ time-stamp@^1.0.0: resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= +tiptap-commands@^1.12.5: + version "1.12.5" + resolved "https://registry.yarnpkg.com/tiptap-commands/-/tiptap-commands-1.12.5.tgz#d2bd1adcc79fe47938bd64b91b6dec4688a88086" + integrity sha512-wzQCH3CL1VWy6E47Hy+9kt882w7SND+FD9e9xAAsYhG/QI0cmuvAf/8doZZhUmYwkraYeF7/2bU04IXr36t44Q== + dependencies: + prosemirror-commands "1.1.2" + prosemirror-inputrules "1.1.2" + prosemirror-model "1.8.2" + prosemirror-schema-list "1.1.2" + prosemirror-state "1.3.2" + prosemirror-tables "1.0.0" + prosemirror-utils "0.9.6" + tiptap-utils "^1.8.3" + +tiptap-utils@^1.8.3: + version "1.8.3" + resolved "https://registry.yarnpkg.com/tiptap-utils/-/tiptap-utils-1.8.3.tgz#fdfc8f7888f6e9ed0dae081f5f66b9f5429608a9" + integrity sha512-SgqDTCA5ux17KKTpEV2YC54ugBWU2jzpiFlCmVckPjYl5BhmOwuJ1Q5H/8v/XGcnHDqP31Ui4lk31Vts4NmtTA== + dependencies: + prosemirror-model "1.8.2" + prosemirror-state "1.3.2" + prosemirror-tables "1.0.0" + prosemirror-utils "0.9.6" + +tiptap@^1.26.6: + version "1.26.6" + resolved "https://registry.yarnpkg.com/tiptap/-/tiptap-1.26.6.tgz#b287fa7cb1c20690868aee8dc526de5390b054f0" + integrity sha512-U5qyYZi5IH7LhYwYrStRBp5MxF5MiGFLt9ogOAF/0N/LIg0XwVwe/AaSx0UH/s4dY7R8OvEa9u4qimO08Wp1LA== + dependencies: + prosemirror-commands "1.1.2" + prosemirror-dropcursor "1.3.2" + prosemirror-gapcursor "1.1.2" + prosemirror-inputrules "1.1.2" + prosemirror-keymap "1.1.3" + prosemirror-model "1.8.2" + prosemirror-state "1.3.2" + prosemirror-view "1.13.4" + tiptap-commands "^1.12.5" + tiptap-utils "^1.8.3" + to-absolute-glob@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1865f43d9e74b0822db9f145b78cff7d0f7c849b" @@ -2999,6 +3237,11 @@ type@^1.0.1: resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== +type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/type/-/type-2.0.0.tgz#5f16ff6ef2eb44f260494dae271033b29c09a9c3" + integrity sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow== + typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" @@ -3083,9 +3326,9 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= uuid@^3.3.2: - version "3.3.3" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" - integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== v8flags@^3.0.1: version "3.1.3" @@ -3171,6 +3414,33 @@ vinyl@^2.0.0: remove-trailing-separator "^1.0.1" replace-ext "^1.0.0" +vue-class-component@^7.0.2, vue-class-component@^7.1.0: + version "7.2.2" + resolved "https://registry.yarnpkg.com/vue-class-component/-/vue-class-component-7.2.2.tgz#aecc6d28801f64c61eb04407cf3a5476da26b0c0" + integrity sha512-QjVfjRffux0rUBNtxr1hvUxDrfifDvk9q/OSdB/sKIlfxAudDF2E1YTeiEC+qOYIOOBGWkgSKQSnast6H+S38w== + +vue-property-decorator@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/vue-property-decorator/-/vue-property-decorator-8.3.0.tgz#536f027dc7d626f37c8d85a2dc02f0a6cb979440" + integrity sha512-77YtTbZHd5CNiPzbqv51kEgL48yvD2dUDfF28vEyw3MbQ9bBAb/tDyFzskcqjNRbWyXk1vq4oM2CK/LfhxuIBg== + dependencies: + vue-class-component "^7.1.0" + +vue@^2.6.10: + version "2.6.11" + resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.11.tgz#76594d877d4b12234406e84e35275c6d514125c5" + integrity sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ== + +vuex@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/vuex/-/vuex-3.1.2.tgz#a2863f4005aa73f2587e55c3fadf3f01f69c7d4d" + integrity sha512-ha3jNLJqNhhrAemDXcmMJMKf1Zu4sybMPr9KxJIuOpVcsDQlTBYLLladav2U+g1AvdYDG5Gs0xBTb0M5pXXYFQ== + +w3c-keyname@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/w3c-keyname/-/w3c-keyname-2.2.2.tgz#7ea63170454bb19f1a3c6b628fc3dc8889276e91" + integrity sha512-8Vs/aVwcy0IJACaPm4tyzh1fzehZE70bGSjEl3dDms5UXtWnaBElrSHC8lDDeak0Gk5jxKOFstL64/65o7Ge2A== + which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f"