(window.textWebpackJsonp=window.textWebpackJsonp||[]).push([[189],{166:function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(t,e){return r.call(t,e)}function i(t){return!(t>=55296&&t<=57343)&&(!(t>=64976&&t<=65007)&&(65535!=(65535&t)&&65534!=(65535&t)&&(!(t>=0&&t<=8)&&(11!==t&&(!(t>=14&&t<=31)&&(!(t>=127&&t<=159)&&!(t>1114111)))))))}function s(t){if(t>65535){var e=55296+((t-=65536)>>10),n=56320+(1023&t);return String.fromCharCode(e,n)}return String.fromCharCode(t)}var a=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,c=new RegExp(a.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),l=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=n(402);var p=/[&<>"]/,f=/[&<>"]/g,h={"&":"&","<":"<",">":">",'"':"""};function d(t){return h[t]}var m=/[.?*+^$[\]\\(){}|-]/g;var v=n(378);e.lib={},e.lib.mdurl=n(403),e.lib.ucmicro=n(428),e.assign=function(t){return Array.prototype.slice.call(arguments,1).forEach((function(e){if(e){if("object"!=typeof e)throw new TypeError(e+"must be object");Object.keys(e).forEach((function(n){t[n]=e[n]}))}})),t},e.isString=function(t){return"[object String]"===function(t){return Object.prototype.toString.call(t)}(t)},e.has=o,e.unescapeMd=function(t){return t.indexOf("\\")<0?t:t.replace(a,"$1")},e.unescapeAll=function(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(c,(function(t,e,n){return e||function(t,e){var n=0;return o(u,e)?u[e]:35===e.charCodeAt(0)&&l.test(e)&&i(n="x"===e[1].toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10))?s(n):t}(t,n)}))},e.isValidEntityCode=i,e.fromCodePoint=s,e.escapeHtml=function(t){return p.test(t)?t.replace(f,d):t},e.arrayReplaceAt=function(t,e,n){return[].concat(t.slice(0,e),n,t.slice(e+1))},e.isSpace=function(t){switch(t){case 9:case 32:return!0}return!1},e.isWhiteSpace=function(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},e.isMdAsciiPunct=function(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},e.isPunctChar=function(t){return v.test(t)},e.escapeRE=function(t){return t.replace(m,"\\$&")},e.normalizeReference=function(t){return t.trim().replace(/\s+/g," ").toUpperCase()}},167:function(t,e,n){"use strict";n.d(e,"a",(function(){return C})),n.d(e,"b",(function(){return g})),n.d(e,"c",(function(){return p})),n.d(e,"d",(function(){return u})),n.d(e,"e",(function(){return m})),n.d(e,"f",(function(){return v})),n.d(e,"g",(function(){return d}));var r=n(171),o=n(170),i=n(168);function s(t,e){return!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0)}function a(t,e){for(;t;t="start"==e?t.firstChild:t.lastChild)if(t.isTextblock)return!0;return!1}function c(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 l(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=0;f--)p=o.Fragment.from(s[f].create(null,p));p=o.Fragment.from(c.copy(p));var h=t.tr.step(new r.b(e.pos-1,u,e.pos,u,new o.Slice(p,1,0),s.length,!0)),d=u+2*s.length;Object(r.f)(h.doc,d)&&h.join(d),n(h.scrollIntoView())}return!0}var m=i.Selection.findFrom(e,1),v=m&&m.$from.blockRange(m.$to),g=v&&Object(r.k)(v);return null!=g&&g>=e.depth&&(n&&n(t.tr.lift(v,g).scrollIntoView()),!0)}function d(t,e){return function(n,o){var i=n.selection,s=i.$from,a=i.$to,c=s.blockRange(a),l=c&&Object(r.i)(c,t,e);return!!l&&(o&&o(n.tr.wrap(c,l).scrollIntoView()),!0)}}function m(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 v(t,e){return function(n,r){var o=n.selection,i=o.empty,s=o.$cursor,a=o.ranges;if(i&&!s||!function(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;o0))return!1;var s=c(o);if(!s){var l=o.blockRange(),u=l&&Object(r.k)(l);return null!=u&&(e&&e(t.tr.lift(l,u).scrollIntoView()),!0)}var p=s.nodeBefore;if(!p.type.spec.isolating&&h(t,s,e))return!0;if(0==o.parent.content.size&&(a(p,"end")||i.NodeSelection.isSelectable(p))){if(e){var f=t.tr.deleteRange(o.before(),o.after());f.setSelection(a(p,"end")?i.Selection.findFrom(f.doc.resolve(f.mapping.map(s.pos,-1)),-1):i.NodeSelection.create(f.doc,s.pos-p.nodeSize)),e(f.scrollIntoView())}return!0}return!(!p.isAtom||s.depth!=o.depth-1)&&(e&&e(t.tr.delete(s.pos-p.nodeSize,s.pos).scrollIntoView()),!0)}),(function(t,e,n){var r=t.selection.$cursor;if(!r||(n?!n.endOfTextblock("backward",t):r.parentOffset>0))return!1;var o=c(r),s=o&&o.nodeBefore;return!(!s||!i.NodeSelection.isSelectable(s))&&(e&&e(t.tr.setSelection(i.NodeSelection.create(t.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)})),b=g(s,(function(t,e,n){var r=t.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",t):r.parentOffset1&&n.after()!=n.end(-1)){var o=n.before();if(Object(r.g)(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}var i=n.blockRange(),s=i&&Object(r.k)(i);return null!=s&&(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)}),f),"Mod-Enter":p,Backspace:y,"Mod-Backspace":y,Delete:b,"Mod-Delete":b,"Mod-a":function(t,e){return e&&e(t.tr.setSelection(new i.AllSelection(t.doc))),!0}},k={"Ctrl-h":w.Backspace,"Alt-Backspace":w["Mod-Backspace"],"Ctrl-d":w.Delete,"Ctrl-Alt-Backspace":w["Mod-Delete"],"Alt-Delete":w["Mod-Delete"],"Alt-d":w["Mod-Delete"]};for(var x in w)k[x]=w[x];var C=("undefined"!=typeof navigator?/Mac/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?k:w},168:function(t,e,n){"use strict";n.r(e),n.d(e,"AllSelection",(function(){return h})),n.d(e,"EditorState",(function(){return x})),n.d(e,"NodeSelection",(function(){return p})),n.d(e,"Plugin",(function(){return _})),n.d(e,"PluginKey",(function(){return M})),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 g}));var r=n(170),o=n(171),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=0;o--){var i=e<0?m(t.node(0),t.node(o),t.before(o+1),t.index(o),e,n):m(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 h(t.node(0))},s.atStart=function(t){return m(t,t,0,0,1)||new h(t)},s.atEnd=function(t){return m(t,t,t.content.size,t.childCount,-1)||new h(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).pos0?0:1);o>0?s=0;s+=o){var a=e.child(s);if(a.isAtom){if(!i&&p.isSelectable(a))return p.create(t,n-(o<0?a.nodeSize:0))}else{var c=m(t,a,n+o,o<0?a.childCount:0,o,i);if(c)return c}n+=a.nodeSize*o}}function v(t,e,n){var r=t.steps.length-1;if(!(r0},e.prototype.setStoredMarks=function(t){return this.storedMarks=t,this.updated|=2,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(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)||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|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(e.prototype,n),e}(o.e);function y(t,e){return e&&t?t.bind(e):t}var b=function(t,e,n){this.name=t,this.init=y(e.init,n),this.apply=y(e.apply,n)},w=[new b("doc",{init:function(t){return t.doc||t.schema.topNodeType.createAndFill()},apply:function(t){return t.doc}}),new b("selection",{init:function(t,e){return t.selection||s.atStart(e.doc)},apply:function(t){return t.selection}}),new b("storedMarks",{init:function(t){return t.storedMarks||null},apply:function(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new b("scrollToSelection",{init:function(){return 0},apply:function(t,e){return t.scrolledIntoView?e+1:e}})],k=function(t,e){var n=this;this.schema=t,this.fields=w.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 b(t.key,t.spec.state,t))}))},x=function(t){this.config=t},C={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};C.schema.get=function(){return this.config.schema},C.plugins.get=function(){return this.config.plugins},x.prototype.apply=function(t){return this.applyTransaction(t).state},x.prototype.filterTransaction=function(t,e){void 0===e&&(e=-1);for(var n=0;n-1&&S.splice(e,1)},Object.defineProperties(x.prototype,C);var S=[];var _=function(t){this.props={},t.props&&function t(e,n,r){for(var o in e){var i=e[o];i instanceof Function?i=i.bind(n):"handleDOMEvents"==o&&(i=t(i,n,{})),r[o]=i}return r}(t.props,this,this.props),this.spec=t,this.key=t.key?t.key.key:O("plugin")};_.prototype.getState=function(t){return t[this.key]};var A=Object.create(null);function O(t){return t in A?t+"$"+ ++A[t]:(A[t]=0,t+"$")}var M=function(t){void 0===t&&(t="key"),this.key=O(t)};M.prototype.get=function(t){return t.config.pluginsByKey[this.key]},M.prototype.getState=function(t){return t[this.key]}},169:function(t,e,n){"use strict";var r=n(168),o=n(182),i=n(170),s=n(171);var a=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}}))};a.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)}))},a.prototype.update=function(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&this.updateOverlay()},a.prototype.setCursor=function(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},a.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"},a.prototype.scheduleRemoval=function(t){var e=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return e.setCursor(null)}),t)},a.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&&null==(n=Object(s.h)(this.editorView.state.doc,n,this.editorView.dragging.slice))&&(n=e.pos),this.setCursor(n),this.scheduleRemoval(5e3)}}},a.prototype.dragend=function(){this.scheduleRemoval(20)},a.prototype.drop=function(){this.scheduleRemoval(20)},a.prototype.dragleave=function(t){t.target!=this.editorView.dom&&this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)};var c=n(400),l=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 i.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 u(this.anchor)},e.valid=function(t){var e=t.parent;if(e.isTextblock||!function(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}(t)||!function(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}(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)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(;i=n>0?i.firstChild:i.lastChild;){o+=n;var l=t.doc.resolve(o);if(e.valid(l))return l}return null},e}(r.Selection);l.prototype.visible=!1,r.Selection.jsonID("gapcursor",l);var u=function(t){this.pos=t};u.prototype.map=function(t){return new u(t.map(this.pos))},u.prototype.resolve=function(t){var e=t.resolve(this.pos);return l.valid(e)?new l(e):r.Selection.near(e)};var p=Object(c.a)({ArrowLeft:f("horiz",-1),ArrowRight:f("horiz",1),ArrowUp:f("vert",-1),ArrowDown:f("vert",1)});function f(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 u=l.findFrom(a,e,c);return!!u&&(o&&o(t.tr.setSelection(new l(u))),!0)}}function h(t,e,n){if(!t.editable)return!1;var o=t.state.doc.resolve(e);if(!l.valid(o))return!1;var i=t.posAtCoords({left:n.clientX,top:n.clientY}).inside;return!(i>-1&&r.NodeSelection.isSelectable(t.state.doc.nodeAt(i)))&&(t.dispatch(t.state.tr.setSelection(new l(o))),!0)}function d(t){if(!(t.selection instanceof l))return null;var e=document.createElement("div");return e.className="ProseMirror-gapcursor",o.b.create(t.doc,[o.a.widget(t.selection.head,e,{key:"gapcursor"})])}var m=n(167),v=n(177),g=n(374),y=n(42),b=n(176); /*! * tiptap v1.26.5 * (c) 2019 Scrumpy UG (limited liability) * @license MIT */ function w(t){return(w="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})(t)}function k(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x(t,e){for(var n=0;n1?n-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{};k(this,t),this.options=A({},this.defaultOptions,{},e)}return C(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}(),P=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;k(this,t),e.forEach((function(t){t.bindEditor(n),t.init()})),this.extensions=e}return C(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(N(n),N(r)).map((function(t){return Object(c.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(N(o),N(i)).reduce((function(t,e){return[].concat(N(t),N(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(N(o),N(i)).reduce((function(t,e){return[].concat(N(t),N(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(A({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"===w(a)?Object.entries(a).forEach((function(t){var e=T(t,2),n=e[0],r=e[1];l(n,r)})):l(o,a),A({},t,{},s)}),{})}},{key:"nodes",get:function(){return this.extensions.filter((function(t){return"node"===t.type})).reduce((function(t,e){return A({},t,S({},e.name,e.schema))}),{})}},{key:"options",get:function(){var t=this.view;return this.extensions.reduce((function(e,n){return A({},e,S({},n.name,new Proxy(n.options,{set:function(e,r,o){var i=e[r]!==o;return Object.assign(e,S({},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){return A({},t,S({},e.name,e.schema))}),{})}},{key:"plugins",get:function(){return this.extensions.filter((function(t){return t.plugins})).reduce((function(t,e){var n=e.plugins;return[].concat(N(t),N(n))}),[])}}]),t}();function B(t){var e=document.createElement("style");e.type="text/css",e.textContent=t;var n=document.head,r=n.firstChild;r?n.insertBefore(e,r):n.appendChild(e)}var L=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k(this,e),D(this,M(e).call(this,t))}return O(e,t),C(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}(F);function j(){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 $=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k(this,e),D(this,M(e).call(this,t))}return O(e,t),C(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}(F),q=function(t){function e(){return k(this,e),D(this,M(e).apply(this,arguments))}return O(e,t),C(e,[{key:"name",get:function(){return"doc"}},{key:"schema",get:function(){return{content:"block+"}}}]),e}($),V=function(t){function e(){return k(this,e),D(this,M(e).apply(this,arguments))}return O(e,t),C(e,[{key:"commands",value:function(t){var e=t.type;return function(){return Object(b.k)(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}($),H=function(t){function e(){return k(this,e),D(this,M(e).apply(this,arguments))}return O(e,t),C(e,[{key:"name",get:function(){return"text"}},{key:"schema",get:function(){return{group:"inline"}}}]),e}($),U='.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',W=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k(this,e),(t=D(this,M(e).call(this))).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 O(e,t),C(e,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.setOptions(A({},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&&B(U),null!==this.options.autoFocus&&this.focus(this.options.autoFocus),this.events.forEach((function(e){t.on(e,t.options[R("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=A({},this.options,{},t),this.view&&this.state&&this.view.updateState(this.state)}},{key:"createExtensions",value:function(){return new P([].concat(N(this.builtInExtensions),N(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 i.Schema({topNode:this.options.topNode,nodes:this.nodes,marks:this.marks})}},{key:"createState",value:function(){var t,e=this;return r.EditorState.create({schema:this.schema,doc:this.createDocument(this.options.content),plugins:[].concat(N(this.plugins),[Object(v.b)({rules:this.inputRules})],N(this.pasteRules),N(this.keymaps),[Object(c.b)({Backspace:v.d}),Object(c.b)(m.a),(t=this.options.dropCursor,void 0===t&&(t={}),new r.Plugin({view:function(e){return new a(e,t)}})),new r.Plugin({props:{decorations:d,createSelectionBetween:function(t,e,n){if(e.pos==n.pos&&l.valid(n))return new l(n)},handleClick:h,handleKeyDown:p}}),new r.Plugin({key:new r.PluginKey("editable"),props:{editable:function(){return e.options.editable}}}),new r.Plugin({props:{attributes:{tabindex:0},handleDOMEvents:{focus:function(t,n){e.focused=!0,e.emit("focus",{event:n,state:t.state,view:t});var r=e.state.tr.setMeta("focused",!0);e.view.dispatch(r)},blur:function(t,n){e.focused=!1,e.emit("blur",{event:n,state:t.state,view:t});var r=e.state.tr.setMeta("focused",!1);e.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"===w(t))try{return this.schema.nodeFromJSON(t)}catch(e){return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",e),this.schema.nodeFromJSON(this.options.emptyDocument)}if("string"==typeof t){var n=document.createElement("div");return n.innerHTML=t.trim(),i.DOMParser.fromSchema(this.schema).parse(n,e)}return!1}},{key:"createView",value:function(){var t=this;return new o.c(this.element,{state:this.createState(),handlePaste:function(){for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:null;t&&this.view.setProps({nodeViews:this.initNodeViews({parent:t,extensions:[].concat(N(this.builtInExtensions),N(this.options.extensions))})})}},{key:"initNodeViews",value:function(t){var e=this,n=t.parent;return t.extensions.filter((function(t){return["node","mark"].includes(t.type)})).filter((function(t){return t.view})).reduce((function(t,r){return A({},t,S({},r.name,(function(t,o,i,s){var a=r.view;return new I(a,{editor:e,extension:r,parent:n,node:t,view:o,getPos:i,decorations:s})})))}),{})}},{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=j(t,0,o.content.size),a=j(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=i.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=T(n,2),o=r[0],i=r[1];return A({},e,S({},o,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(g.c)(t.state,i,e)})))}),{}),this.activeMarkAttrs=Object.entries(this.schema.marks).reduce((function(e,n){var r=T(n,2),o=r[0],i=r[1];return A({},e,S({},o,Object(g.a)(t.state,i)))}),{}),this.activeNodes=Object.entries(this.schema.nodes).reduce((function(e,n){var r=T(n,2),o=r[0],i=r[1];return A({},e,S({},o,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(g.e)(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 q,new H,new V]:[]}},{key:"state",get:function(){return this.view?this.view.state:null}},{key:"isActive",get:function(){return Object.entries(A({},this.activeMarks,{},this.activeNodes)).reduce((function(t,e){var n=T(e,2),r=n[0],o=n[1];return A({},t,S({},r,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(t)})))}),{})}}]),e}(z),J={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}},K=function(){function t(e){var n=this,r=e.options;k(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 C(t,[{key:"handleClick",value:function(){this.preventHide=!0}},{key:"destroy",value:function(){this.options.element.removeEventListener("mousedown",this.mousedownHandler)}}]),t}();var G={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(){var n;t.registerPlugin((n={editor:t,element:e.$el},new r.Plugin({key:new r.PluginKey("menu_bar"),view:function(t){return new K({editorView:t,options:n})}}))),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 Z(t,e,n){var r=document.createRange();return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r}function X(t,e){var n=t.getClientRects();return n.length?n[e<0?0:n.length-1]:t.getBoundingClientRect()}function Y(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>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;n.d(e,"ContentMatch",(function(){return R})),n.d(e,"DOMParser",(function(){return tt})),n.d(e,"DOMSerializer",(function(){return ft})),n.d(e,"Fragment",(function(){return i})),n.d(e,"Mark",(function(){return u})),n.d(e,"MarkType",(function(){return X})),n.d(e,"Node",(function(){return E})),n.d(e,"NodeRange",(function(){return A})),n.d(e,"NodeType",(function(){return J})),n.d(e,"ReplaceError",(function(){return p})),n.d(e,"ResolvedPos",(function(){return k})),n.d(e,"Schema",(function(){return Y})),n.d(e,"Slice",(function(){return f}));var i=function(t,e){if(this.content=t,this.size=e||0,null==e)for(var n=0;nt&&!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}},i.prototype.descendants=function(t){this.nodesBetween(0,this.size,t)},i.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},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(),o=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),o=1);ot)for(var o=0,s=0;st&&((se)&&(a=a.isText?a.cut(Math.max(0,t-s),Math.min(a.text.length,e-s)):a.cut(Math.max(0,t-s-1),Math.min(a.content.size,e-s-1))),n.push(a),r+=a.nodeSize),s=c}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(),o=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new i(r,o)},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;ethis.size||t<0)throw new RangeError("Position "+t+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var o=r+this.child(n).nodeSize;if(o>=t)return o==t||e>0?c(n+1,o):c(n,r);r=o}},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;rthis.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},u.prototype.removeFromSet=function(t){for(var e=0;et.depth)throw new p("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new p("Inconsistent open depths");return function t(e,n,r,o){var s=e.index(o),a=e.node(o);if(s==n.index(o)&&o=0;o--)r=e.node(o).copy(i.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(r,e),u=l.start,p=l.end;return b(a,function t(e,n,r,o,s){var a=e.depth>s&&v(e,n,s+1),c=o.depth>s&&v(r,o,s+1),l=[];y(null,e,s,l),a&&c&&n.index(s)==r.index(s)?(m(a,c),g(b(a,t(e,n,r,o,s+1)),l)):(a&&g(b(a,w(e,n,s+1)),l),y(n,r,s,l),c&&g(b(c,w(r,o,s+1)),l));return y(o,null,s,l),new i(l)}(e,u,p,n,o))}var f=e.parent,h=f.content;return b(f,h.cut(0,e.parentOffset).append(r.content).append(h.cut(n.parentOffset)))}return b(a,w(e,n,o))}(t,e,n,0)}function m(t,e){if(!e.type.compatibleContent(t.type))throw new p("Cannot join "+e.type.name+" onto "+t.type.name)}function v(t,e,n){var r=t.node(n);return m(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 y(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&&(g(t.nodeAfter,r),i++));for(var a=i;an)&&g(b(v(t,e,n+1),w(t,e,n+1)),r);return y(e,null,n,r),new i(r)}h.size.get=function(){return this.content.size-this.openStart-this.openEnd},f.prototype.insertAt=function(t,e){var n=function t(e,n,r,o){var i=e.findIndex(n),s=i.index,a=i.offset,c=e.maybeChild(s);if(a==n||c.isText)return o&&!o.canReplace(s,s,r)?null:e.cut(0,n).append(r).append(e.cut(n));var l=t(c.content,n-a-1,r);return l&&e.replaceChild(s,c.copy(l))}(this.content,t+this.openStart,e,null);return n&&new f(n,this.openStart,this.openEnd)},f.prototype.removeBetween=function(t,e){return new f(function t(e,n,r){var o=e.findIndex(n),i=o.index,s=o.offset,a=e.maybeChild(i),c=e.findIndex(r),l=c.index,u=c.offset;if(s==n||a.isText){if(u!=r&&!e.child(l).isText)throw new RangeError("Removing non-flat range");return e.cut(0,n).append(e.cut(r))}if(i!=l)throw new RangeError("Removing non-flat range");return e.replaceChild(i,a.copy(t(a.content,n-s-1,r-s-1)))}(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)},f.prototype.eq=function(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd},f.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},f.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},f.fromJSON=function(t,e){if(!e)return f.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 f(i.fromJSON(t,e.content),e.openStart||0,e.openEnd||0)},f.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 f(t,n,r)},Object.defineProperties(f.prototype,h),f.empty=new f(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},x={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};k.prototype.resolveDepth=function(t){return null==t?this.depth:t<0?this.depth+t:t},x.parent.get=function(){return this.node(this.depth)},x.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},x.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},x.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},x.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 u.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;s0;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=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new A(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=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)).isText)break;o=l-1,r+=c+1}return new k(e,n,o)},k.resolveCached=function(t,e){for(var n=0;nt&&this.nodesBetween(t,e,(function(t){return n.isInSet(t.marks)&&(r=!0),!r})),r},D.isBlock.get=function(){return this.type.isBlock},D.isTextblock.get=function(){return this.type.isTextblock},D.inlineContent.get=function(){return this.type.inlineContent},D.isInline.get=function(){return this.type.isInline},D.isText.get=function(){return this.type.isText},D.isLeaf.get=function(){return this.type.isLeaf},D.isAtom.get=function(){return this.type.isAtom},E.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()+")"),N(this.marks,t)},E.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},E.prototype.canReplace=function(t,e,n,r,o){void 0===n&&(n=i.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var s=this.contentMatchAt(t).matchFragment(n,r,o),a=s&&s.matchFragment(this.content,e);if(!a||!a.validEnd)return!1;for(var c=r;c=0;n--)e=t[n].type.name+"("+e+")";return e}var R=function(t){this.validEnd=t,this.next=[],this.wrapCache=[]},I={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};R.parse=function(t,e){var n=new z(t,e);if(null==n.next)return R.empty;var r=P(n);n.next&&n.err("Unexpected trailing text");var o=function(t){var e=Object.create(null);return 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];V(t,r).forEach((function(t){s||o.push(n,s=[]),-1==s.indexOf(t)&&s.push(t)}))}}))}));for(var i=e[r.join(",")]=new R(r.indexOf(t.length-1)>-1),s=0;s>1},R.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]}},R.prototype.toString=function(){var t=[];return function e(n){t.push(n);for(var r=1;r"+t.indexOf(e.next[o+1]);return r})).join("\n")},Object.defineProperties(R.prototype,I),R.empty=new R(!0);var z=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()},F={next:{configurable:!0}};function P(t){var e=[];do{e.push(B(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function B(t){var e=[];do{e.push(L(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function L(t){for(var e=function(t){if(t.eat("(")){var e=P(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 o=[];for(var i in n){var s=n[i];s.groups.indexOf(e)>-1&&o.push(s)}0==o.length&&t.err("No node type or group '"+e+"' found");return o}(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=$(t,e)}return e}function j(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");var e=Number(t.next);return t.pos++,e}function $(t,e){var n=j(t),r=n;return t.eat(",")&&(r="}"!=t.next?j(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function q(t,e){return e-t}function V(t,e){var n=[];return function e(r){var o=t[r];if(1==o.length&&!o[0].term)return e(o[0].to);n.push(r);for(var i=0;i-1},J.prototype.allowsMarks=function(t){if(null==this.markSet)return!0;for(var e=0;e-1};var Y=function(t){for(var e in this.spec={},t)this.spec[e]=t[e];this.spec.nodes=o.from(t.nodes),this.spec.marks=o.from(t.marks),this.nodes=J.compile(this.spec.nodes,this),this.marks=X.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 i=this.nodes[r],s=i.spec.content||"",a=i.spec.marks;i.contentMatch=n[s]||(n[s]=R.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet="_"==a?null:a?Q(this,a.split(" ")):""!=a&&i.inlineContent?null:[]}for(var c in this.marks){var l=this.marks[c],u=l.spec.excludes;l.excluded=null==u?[l]:""==u?[]:Q(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 Q(t,e){for(var n=[],r=0;r-1)&&n.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}Y.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)},Y.prototype.text=function(t,e){var n=this.nodes.text;return new T(n,n.defaultAttrs,t,u.setFrom(e))},Y.prototype.mark=function(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)},Y.prototype.nodeFromJSON=function(t){return E.fromJSON(this,t)},Y.prototype.markFromJSON=function(t){return u.fromJSON(this,t)},Y.prototype.nodeType=function(t){var e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e};var tt=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)}))};tt.prototype.parse=function(t,e){void 0===e&&(e={});var n=new ct(this,e,!1);return n.addAll(t,null,e.from,e.to),n.finish()},tt.prototype.parseSlice=function(t,e){void 0===e&&(e={});var n=new ct(this,e,!0);return n.addAll(t,null,e.from,e.to),f.maxOpen(n.finish())},tt.prototype.matchTag=function(t,e){for(var n=0;nt.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}}},tt.schemaRules=function(t){var e=[];function n(t){for(var n=null==t.priority?50:t.priority,r=0;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;sthis.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}},ct.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},ct.prototype.sync=function(t){for(var e=this.open;e>=0;e--)if(this.nodes[e]==t)return void(this.open=e)},ct.prototype.addPendingMark=function(t){this.pendingMarks.push(t)},ct.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},ct.prototype.findAtPoint=function(t,e){if(this.find)for(var n=0;n-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)},ct.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(ct.prototype,lt);var ft=function(t,e){this.nodes=t||{},this.marks=e||{}};function ht(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}ft.prototype.serializeFragment=function(t,e,n){var r=this;void 0===e&&(e={}),n||(n=dt(e).createDocumentFragment());var o=n,i=null;return t.forEach((function(t){if(i||t.marks.length){i||(i=[]);for(var n=0,s=0;n=0;r--){var o=this.serializeMark(t.marks[r],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n},ft.prototype.serializeMark=function(t,e,n){void 0===n&&(n={});var r=this.marks[t.type.name];return r&&ft.renderSpec(dt(n),r(t,e))},ft.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;ai)throw new RangeError("Content hole must be the only child of its parent node");return{dom:n,contentDOM:n}}var l=ft.renderSpec(t,c),u=l.dom,p=l.contentDOM;if(n.appendChild(u),p){if(r)throw new RangeError("Multiple content holes");r=p}}return{dom:n,contentDOM:r}},ft.fromSchema=function(t){return t.cached.domSerializer||(t.cached.domSerializer=new ft(this.nodesFromSchema(t),this.marksFromSchema(t)))},ft.nodesFromSchema=function(t){var e=ht(t.nodes);return e.text||(e.text=function(t){return t.text}),e},ft.marksFromSchema=function(t){return ht(t.marks)}},171:function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return y})),n.d(e,"c",(function(){return g})),n.d(e,"d",(function(){return m})),n.d(e,"e",(function(){return p})),n.d(e,"f",(function(){return _})),n.d(e,"g",(function(){return S})),n.d(e,"h",(function(){return M})),n.d(e,"i",(function(){return x})),n.d(e,"j",(function(){return O})),n.d(e,"k",(function(){return k}));var r=n(170),o=65535,i=Math.pow(2,16);function s(t){return t&o}var a=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=null),this.pos=t,this.deleted=e,this.recover=n},c=function(t,e){void 0===e&&(e=!1),this.ranges=t,this.inverted=e};c.prototype.recover=function(t){var e=0,n=s(t);if(!this.inverted)for(var r=0;rt)break;var u=this.ranges[c+o],p=this.ranges[c+s],f=l+u;if(t<=f){var h=l+r+((u?t==l?-1:t==f?1:e:e)<0?0:p);if(n)return h;var d=c/3+(t-l)*i;return new a(h,e<0?t!=l:t!=f,d)}r+=p-u}return n?t+r:new a(t+r)},c.prototype.touches=function(t,e){for(var n=0,r=s(e),o=this.inverted?2:1,i=this.inverted?1:2,a=0;at)break;var l=this.ranges[a+o];if(t<=c+l&&a==3*r)return!0;n+=this.ranges[a+i]-l}return!1},c.prototype.forEach=function(t){for(var e=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r=0;e--){var r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?n-r-1:null)}},l.prototype.invert=function(){var t=new l;return t.appendMappingInverted(this),t},l.prototype.map=function(t,e){if(void 0===e&&(e=1),this.mirror)return this._map(t,e,!0);for(var n=this.from;ni&&u0},p.prototype.addStep=function(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e},Object.defineProperties(p.prototype,f);var d=Object.create(null),m=function(){};m.prototype.apply=function(t){return h()},m.prototype.getMap=function(){return c.empty},m.prototype.invert=function(t){return h()},m.prototype.map=function(t){return h()},m.prototype.merge=function(t){return null},m.prototype.toJSON=function(){return h()},m.fromJSON=function(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=d[e.stepType];if(!n)throw new RangeError("No step type "+e.stepType+" defined");return n.fromJSON(t,e)},m.jsonID=function(t,e){if(t in d)throw new RangeError("Duplicate use of step JSON ID "+t);return d[t]=e,e.prototype.jsonID=t,e};var v=function(t,e){this.doc=t,this.failed=e};v.ok=function(t){return new v(t,null)},v.fail=function(t){return new v(null,t)},v.fromReplace=function(t,e,n,o){try{return v.ok(t.replace(e,n,o))}catch(t){if(t instanceof r.ReplaceError)return v.fail(t.message);throw t}};var g=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&&b(t,this.from,this.to)?v.fail("Structure replace would overwrite content"):v.fromReplace(t,this.from,this.to,this.slice)},e.prototype.getMap=function(){return new c([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}(m);m.jsonID("replace",g);var y=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&&(b(t,this.from,this.gapFrom)||b(t,this.gapTo,this.to)))return v.fail("Structure gap-replace would overwrite content");var e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return v.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,e.content);return n?v.fromReplace(t,this.from,this.to,n):v.fail("Content does not fit in gap")},e.prototype.getMap=function(){return new c([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||or.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}(m);function b(t,e,n){for(var r=t.resolve(e),o=n-e,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var s=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}return!1}function w(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.content.cutByIndex(t.startIndex,t.endIndex),n=t.depth;;--n){var r=t.$from.node(n),o=t.$from.index(n),i=t.$to.indexAfter(n);if(ni;a--,c--){var l=o.node(a),u=o.index(a);if(l.type.spec.isolating)return!1;var p=l.content.cutByIndex(u,l.childCount),f=r&&r[c]||l;if(f!=l&&(p=p.replaceChild(0,f.type.create(f.attrs))),!l.canReplace(u+1,l.childCount)||!f.type.validContent(p))return!1}var h=o.indexAfter(i),d=r&&r[0];return o.node(i).canReplaceWith(h,h,d?d.type:o.node(i+1).type)}function _(t,e){var n=t.resolve(e),r=n.index();return A(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function A(t,e){return t&&e&&!t.isLeaf&&t.canAppend(e)}function O(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&&A(i,s))return e;if(0==o)break;e=n<0?r.before(o):r.after(o)}}function M(t,e,n){var r=t.resolve(e);if(!n.content.size)return e;for(var o=n.content,i=0;i=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 E(t,e,n){for(var o=[],i=0;ie;f--)h||n.index(f)>0?(h=!0,u=r.Fragment.from(n.node(f).copy(u)),p++):c--;for(var d=r.Fragment.empty,m=0,v=i,g=!1;v>e;v--)g||o.after(v+1)=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 y(i,s,i,s,new r.Slice(n,0,0),e.length,!0))},p.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)&&function(t,e,n){var r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(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 y(c,l,c+1,l-1,new r.Slice(r.Fragment.from(n.create(o,null,t.marks)),0,0),1,!0)),!1}})),this},p.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 y(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new r.Slice(r.Fragment.from(s),0,0),1,!0))},p.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 g(t,t,new r.Slice(i.append(s),e,e),!0))},p.prototype.join=function(t,e){void 0===e&&(e=1);var n=new g(t-e,t+e,r.Slice.empty,!0);return this.step(n)};var D=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(E(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 v.fromReplace(t,this.from,this.to,s)},e.prototype.invert=function(){return new T(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}(m);m.jsonID("addMark",D);var T=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(E(n.content,(function(t){return t.mark(e.mark.removeFromSet(t.marks))})),n.openStart,n.openEnd);return v.fromReplace(t,this.from,this.to,o)},e.prototype.invert=function(){return new D(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}(m);function N(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(z(i,s,o))return new g(e,n,o);var a=function(t,e){var n=function t(e,n,o,i){var s=r.Fragment.empty,a=0,c=o[n];if(e.depth>n){var l=t(e,n+1,o,i||c);a=l.openEnd+1,s=r.Fragment.from(e.node(n+1).copy(l.content))}c&&(s=s.append(c.content),a=c.openEnd);i&&(s=s.append(e.node(n).contentMatchAt(e.indexAfter(n)).fillBefore(r.Fragment.empty,!0)),a=0);return{content:s,openEnd:a}}(t,0,e,!1),o=n.content,i=n.openEnd;return new r.Slice(o,t.depth,i||0)}(i,function(t,e){for(var n=new F(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}for(;n.open.length;)n.closeNode();return n.placed}(i,o)),c=I(i,s,a);if(!c)return null;if(a.size!=c.size&&function(t,e,n){if(!e.parent.isTextblock)return!1;var r,o=n.openEnd?function(t,e){for(var n=1;n1&&u==s.end(--l);)++u;var p=I(i,t.resolve(u),a);if(p)return new y(e,u,n,s.end(),p,a.size)}return c.size||e!=n?new g(e,n,c):null}function R(t,e,n,o,i,s,a){var c,l=t.childCount,u=l-(a>0?1:0),p=s<0?e:n.node(i);c=s<0?p.contentMatchAt(u):1==l&&a>0?p.contentMatchAt(s?n.index(i):n.indexAfter(i)):p.contentMatchAt(n.indexAfter(i)).matchFragment(t,l>0&&s?1:0,u);var f=o.node(i);if(a>0&&i0&&1==l&&(d=null),d){var m=R(t.lastChild.content,t.lastChild,n,o,i+1,1==l?s-1:-1,a-1);if(m){var v=t.lastChild.copy(m);return d.size?t.cutByIndex(0,l-1).append(d).addToEnd(v):t.replaceChild(l-1,v)}}}a>0&&(c=c.matchType((1==l&&s>0?n.node(i+1):t.lastChild).type));var g=o.index(i);if(g==f.childCount&&!f.type.compatibleContent(e.type))return null;for(var y=c.fillBefore(f.content,!0,g),b=g;y&&b0){var w=function t(e,n,o,i,s){var a,c=e.content,l=c.childCount;a=s>=0?o.node(i).contentMatchAt(o.indexAfter(i)).matchFragment(c,s>0?1:0,l):e.contentMatchAt(l);if(n>0){var u=t(c.lastChild,n-1,o,i+1,1==l?s-1:-1);c=c.replaceChild(l-1,u)}return e.copy(c.append(a.fillBefore(r.Fragment.empty,!0)))}(t.lastChild,a-1,n,i+1,1==l?s-1:-1);t=t.replaceChild(l-1,w)}return t=t.append(y),o.depth>i&&(t=t.addToEnd(function t(e,n){var r=e.node(n),o=r.contentMatchAt(0).fillBefore(r.content,!0,e.index(n));e.depth>n&&(o=o.addToEnd(t(e,n+1)));return r.copy(o)}(o,i+1))),t}function I(t,e,n){var o=R(n.content,t.node(0),t,e,0,n.openStart,n.openEnd);return o?function(t,e,n){for(;e>0&&n>0&&1==t.childCount;)t=t.firstChild.content,e--,n--;return new r.Slice(t,e,n)}(o,n.openStart,e.depth):null}function z(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}m.jsonID("removeMark",T),p.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 p=Math.max(c,t),f=Math.min(c+r.nodeSize,e),h=n.addToSet(u),d=0;d=0;h--)this.step(i[h]);return this},p.prototype.replace=function(t,e,n){void 0===e&&(e=t),void 0===n&&(n=r.Slice.empty);var o=N(this.doc,t,e,n);return o&&this.step(o),this},p.prototype.replaceWith=function(t,e,n){return this.replace(t,e,new r.Slice(r.Fragment.from(n),0,0))},p.prototype.delete=function(t,e){return this.replace(t,e,r.Slice.empty)},p.prototype.insert=function(t,e){return this.replaceWith(t,t,e)};var F=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 P(t,e,n){var r=t.content;if(e>1){var o=P(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 B(t,e,n,o,i){if(eo){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 L(t,e){for(var n=[],r=Math.min(t.depth,e.depth);r>=0;r--){var o=t.start(r);if(oe.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;o==e.start(r)&&n.push(r)}return n}F.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},F.prototype.placeContent=function(t,e,n,o,i){for(var s=0;s=0;u--){var p=this.open[u],f=void 0;if(o>1&&(f=p.match.findWrapping(a.type))&&(!i||!f.length||f[f.length-1]!=i.type)){for(;this.open.length-1>u;)this.closeNode();for(var h=0;hu;)this.closeNode();a=a.mark(p.parent.type.allowedMarks(a.marks)),e&&(a=P(a,e,l?n:0),e=0),this.addNode(p,a,l?n:0),p.match=d,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)},F.prototype.addNode=function(t,e,n){var o,i;t.content=(o=t.content,i=t.openEnd,i?o.replaceChild(o.childCount-1,function t(e,n){var o=e.content;if(n>1){var i=t(e.lastChild,n-1);o=e.content.replaceChild(e.childCount-1,i)}var s=e.contentMatchAt(e.childCount).fillBefore(r.Fragment.empty,!0);return e.copy(o.append(s))}(o.lastChild,i)):o).addToEnd(e),t.openEnd=n},F.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})},p.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(z(o,i,n))return this.step(new g(t,e,n));var s=L(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 p=s.indexOf(a),f=[],h=n.openStart,d=n.content,m=0;;m++){var v=d.firstChild;if(f.push(v),m==n.openStart)break;d=v.content}h>0&&f[h-1].type.spec.defining&&o.node(p).type!=f[h-1].type?h-=1:h>=2&&f[h-1].isTextblock&&f[h-2].type.spec.defining&&o.node(p).type!=f[h-2].type&&(h-=2);for(var y=n.openStart;y>=0;y--){var b=(y+h+1)%(n.openStart+1),w=f[b];if(w)for(var k=0;k=0&&(this.replace(t,e,n),!(this.steps.length>A));O--){var M=s[O];O<0||(t=o.before(M),e=i.after(M))}return this},p.prototype.replaceRangeWith=function(t,e,n){if(!n.isInline&&t==e&&this.doc.resolve(t).parent.content.size){var o=function(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(a0&&(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)}},172:function(t,e,n){"use strict";var r=n(169),o=n(176),i=n(418),s=n.n(i),a=n(182),c=n(178),l=n(168),u=n(401),p=n(374),f=n(171),h=n(373),d=function(){};d.prototype.append=function(t){return t.length?(t=d.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},d.prototype.prepend=function(t){return t.length?d.from(t).append(this):this},d.prototype.appendInner=function(t){return new v(this,t)},d.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?d.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},d.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},d.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)},d.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},d.from=function(t){return t instanceof d?t:t&&t.length?new m(t):d.empty};var m=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:{configurable:!0},depth:{configurable:!0}};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 o=e;o=n;o--)if(!1===t(this.values[o],r+o))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}(d);d.empty=new m([]);var v=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 to&&!1===this.right.forEachInner(t,Math.max(e-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},e.prototype.forEachInvertedInner=function(t,e,n,r){var o=this.left.length;return!(e>o&&!1===this.right.forEachInvertedInner(t,e-o,Math.max(n,o)-o,r+o))&&(!(n=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}(d),g=d,y=function(t,e){this.items=t,this.eventCount=e};y.prototype.popEvent=function(t,e){var n=this;if(0==this.eventCount)return null;for(var r,o,i=this.items.length;;i--){if(this.items.get(i-1).selection){--i;break}}e&&(r=this.remapping(i,this.items.length),o=r.maps.length);var s,a,c=t.tr,l=[],u=[];return this.items.forEach((function(t,e){if(!t.step)return r||(r=n.remapping(i,e+1),o=r.maps.length),o--,void u.push(t);if(r){u.push(new b(t.map));var p,f=t.step.map(r.slice(o));f&&c.maybeStep(f).doc&&(p=c.mapping.maps[c.mapping.maps.length-1],l.push(new b(p,null,null,l.length+u.length))),o--,p&&r.appendMap(p,o)}else c.maybeStep(t.step);return t.selection?(s=r?t.selection.map(r.slice(o)):t.selection,a=new y(n.items.slice(0,i).append(u.reverse().concat(l)),n.eventCount-1),!1):void 0}),this.items.length,0),{remaining:a,transform:c,selection:s}},y.prototype.addTransform=function(t,e,n,r){for(var o=[],i=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null,c=0;ck&&(h=m,(f=s).forEach((function(t,e){if(t.selection&&0==h--)return d=e,!1})),s=f.slice(d),i-=m),new y(s.append(o),i)},y.prototype.remapping=function(t,e){var n=new f.a;return this.items.forEach((function(e,r){var o=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?o=n.maps.length-e.mirrorOffset:null;n.appendMap(e.map,o)}),t,e),n},y.prototype.addMaps=function(t){return 0==this.eventCount?this:new y(this.items.append(t.map((function(t){return new b(t)}))),this.eventCount)},y.prototype.rebased=function(t,e){if(!this.eventCount)return this;var n=[],r=Math.max(0,this.items.length-e),o=t.mapping,i=t.steps.length,s=this.eventCount;this.items.forEach((function(t){t.selection&&s--}),r);var a=e;this.items.forEach((function(e){var r=o.getMirror(--a);if(null!=r){i=Math.min(i,r);var c=o.maps[r];if(e.step){var l=t.steps[r].invert(t.docs[r]),u=e.selection&&e.selection.map(o.slice(a+1,r));u&&s++,n.push(new b(c,l,u))}else n.push(new b(c))}}),r);for(var c=[],l=e;l500&&(p=p.compress(this.items.length-n.length)),p},y.prototype.emptyItemCount=function(){var t=0;return this.items.forEach((function(e){e.step||t++})),t},y.prototype.compress=function(t){void 0===t&&(t=this.items.length);var e=this.remapping(0,t),n=e.maps.length,r=[],o=0;return this.items.forEach((function(i,s){if(s>=t)r.push(i),i.selection&&o++;else if(i.step){var a=i.step.map(e.slice(n)),c=a&&a.getMap();if(n--,c&&e.appendMap(c,n),a){var l=i.selection&&i.selection.map(e.slice(n));l&&o++;var u,p=new b(c.invert(),a,l),f=r.length-1;(u=r.length&&r[f].merge(p))?r[f]=u:r.push(p)}}else i.map&&n--}),this.items.length,0),new y(g.from(r.reverse()),o)},y.empty=new y(g.empty,0);var b=function(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r};b.prototype.merge=function(t){if(this.step&&t.step&&!t.selection){var e=t.step.merge(this.step);if(e)return new b(e.getMap().invert(),e,this.selection)}};var w=function(t,e,n,r){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r},k=20;function x(t){var e=[];return t.forEach((function(t,n,r,o){return e.push(r,o)})),e}function C(t,e){if(!t)return null;for(var n=[],r=0;r=e[o]&&(n=!0)})),n}(n,t.prevRanges)),c=s?C(t.prevRanges,n.mapping):x(n.mapping.maps[n.steps.length-1]);return new w(t.done.addTransform(n,a?e.selection.getBookmark():null,r,O(e)),y.empty,c,n.time)}(n,r,e,t)}},config:t})}function T(t,e){var n=M.getState(t);return!(!n||0==n.done.eventCount)&&(e&&S(n,t,e,!1),!0)}function N(t,e){var n=M.getState(t);return!(!n||0==n.undone.eventCount)&&(e&&S(n,t,e,!0),!0)}function R(t){var e=M.getState(t);return e?e.done.eventCount:0}function I(t){var e=M.getState(t);return e?e.undone.eventCount:0} /*! * tiptap-extensions v1.28.5 * (c) 2019 Scrumpy UG (limited liability) * @license MIT */ function z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F(t,e){for(var n=0;n":Object(o.s)(e)}}},{key:"inputRules",value:function(t){var e=t.type;return[Object(o.u)(/^\s*>\s$/,e)]}},{key:"name",get:function(){return"blockquote"}},{key:"schema",get:function(){return{content:"block*",group:"block",defining:!0,draggable:!1,parseDOM:[{tag:"blockquote"}],toDOM:function(){return["blockquote",0]}}}}]),e}(r.g),K=function(t){function e(){return z(this,e),H(this,q(e).apply(this,arguments))}return $(e,t),P(e,[{key:"commands",value:function(t){var e=t.type,n=t.schema;return function(){return Object(o.q)(e,n.nodes.list_item)}}},{key:"keys",value:function(t){var e=t.type,n=t.schema;return{"Shift-Ctrl-8":Object(o.q)(e,n.nodes.list_item)}}},{key:"inputRules",value:function(t){var e=t.type;return[Object(o.u)(/^\s*([-+*])\s$/,e)]}},{key:"name",get:function(){return"bullet_list"}},{key:"schema",get:function(){return{content:"list_item+",group:"block",parseDOM:[{tag:"ul"}],toDOM:function(){return["ul",0]}}}}]),e}(r.g),G=function(t){function e(){return z(this,e),H(this,q(e).apply(this,arguments))}return $(e,t),P(e,[{key:"commands",value:function(t){var e=t.type,n=t.schema;return function(){return Object(o.p)(e,n.nodes.paragraph)}}},{key:"keys",value:function(t){var e=t.type;return{"Shift-Ctrl-\\":Object(o.k)(e)}}},{key:"inputRules",value:function(t){var e=t.type;return[Object(o.o)(/^```$/,e)]}},{key:"name",get:function(){return"code_block"}},{key:"schema",get:function(){return{content:"text*",marks:"",group:"block",code:!0,defining:!0,draggable:!1,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return["pre",["code",0]]}}}}]),e}(r.g);function Z(t){var e=t.doc,n=t.name,r=[],o=Object(c.findBlockNodes)(e).filter((function(t){return t.node.type.name===n}));return o.forEach((function(t){var e=t.pos+1;(function t(e){return e.reduce((function(e,n){return e.concat(Array.isArray(n)?t(n):n)}),[])})(function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.map((function(e){var r=[].concat(W(n),W(e.properties?e.properties.className:[]));return e.children?t(e.children,r):{text:e.value,classes:r}}))}(s.a.highlightAuto(t.node.textContent).value)).map((function(t){var n=e,r=n+t.text.length;return e=r,j({},t,{from:n,to:r})})).forEach((function(t){var e=a.a.inline(t.from,t.to,{class:t.classes.join(" ")});r.push(e)}))})),a.b.create(e,r)}var X=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};z(this,e),t=H(this,q(e).call(this,n));try{Object.entries(t.options.languages).forEach((function(t){var e=U(t,2),n=e[0],r=e[1];s.a.registerLanguage(n,r)}))}catch(t){throw new Error("Invalid syntax highlight definitions: define at least one highlight.js language mapping")}return t}return $(e,t),P(e,[{key:"commands",value:function(t){var e=t.type,n=t.schema;return function(){return Object(o.p)(e,n.nodes.paragraph)}}},{key:"keys",value:function(t){var e=t.type;return{"Shift-Ctrl-\\":Object(o.k)(e)}}},{key:"inputRules",value:function(t){var e=t.type;return[Object(o.o)(/^```$/,e)]}},{key:"name",get:function(){return"code_block"}},{key:"defaultOptions",get:function(){return{languages:{}}}},{key:"schema",get:function(){return{content:"text*",marks:"",group:"block",code:!0,defining:!0,draggable:!1,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return["pre",["code",0]]}}}},{key:"plugins",get:function(){return[(t={name:this.name},e=t.name,new r.h({name:new r.i("highlight"),state:{init:function(t,n){return Z({doc:n.doc,name:e})},apply:function(t,n,r,o){var i=o.selection.$head.parent.type.name,s=r.selection.$head.parent.type.name;return t.docChanged&&[i,s].includes(e)?Z({doc:t.doc,name:e}):n.map(t.mapping,t.doc)}},props:{decorations:function(t){return this.getState(t)}}}))];var t,e}}]),e}(r.g),Y=function(t){function e(){return z(this,e),H(this,q(e).apply(this,arguments))}return $(e,t),P(e,[{key:"keys",value:function(t){var e=t.type,n=Object(o.a)(o.b,(function(t,n){return n(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0}));return{"Mod-Enter":n,"Shift-Enter":n}}},{key:"name",get:function(){return"hard_break"}},{key:"schema",get:function(){return{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:function(){return["br"]}}}}]),e}(r.g),Q=function(t){function e(){return z(this,e),H(this,q(e).apply(this,arguments))}return $(e,t),P(e,[{key:"commands",value:function(t){var e=t.type,n=t.schema;return function(t){return Object(o.p)(e,n.nodes.paragraph,t)}}},{key:"keys",value:function(t){var e=t.type;return this.options.levels.reduce((function(t,n){return j({},t,{},B({},"Shift-Ctrl-".concat(n),Object(o.k)(e,{level:n})))}),{})}},{key:"inputRules",value:function(t){var e=t.type;return this.options.levels.map((function(t){return Object(o.o)(new RegExp("^(#{1,".concat(t,"})\\s$")),e,(function(){return{level:t}}))}))}},{key:"name",get:function(){return"heading"}},{key:"defaultOptions",get:function(){return{levels:[1,2,3,4,5,6]}}},{key:"schema",get:function(){return{attrs:{level:{default:1}},content:"inline*",group:"block",defining:!0,draggable:!1,parseDOM:this.options.levels.map((function(t){return{tag:"h".concat(t),attrs:{level:t}}})),toDOM:function(t){return["h".concat(t.attrs.level),0]}}}}]),e}(r.g),tt=function(t){function e(){return z(this,e),H(this,q(e).apply(this,arguments))}return $(e,t),P(e,[{key:"commands",value:function(t){var e=t.type;return function(){return function(t,n){return n(t.tr.replaceSelectionWith(e.create()))}}}},{key:"inputRules",value:function(t){var e=t.type;return[Object(o.g)(/^(?:---|___\s|\*\*\*\s)$/,e)]}},{key:"name",get:function(){return"horizontal_rule"}},{key:"schema",get:function(){return{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return["hr"]}}}}]),e}(r.g),et=/!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\)/,nt=function(t){function e(){return z(this,e),H(this,q(e).apply(this,arguments))}return $(e,t),P(e,[{key:"commands",value:function(t){var e=t.type;return function(t){return function(n,r){var o=n.selection,i=o.$cursor?o.$cursor.pos:o.$to.pos,s=e.create(t);r(n.tr.insert(i,s))}}}},{key:"inputRules",value:function(t){var e=t.type;return[Object(o.g)(et,e,(function(t){var e=U(t,4),n=e[1];return{src:e[2],alt:n,title:e[3]}}))]}},{key:"name",get:function(){return"image"}},{key:"schema",get:function(){return{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs:function(t){return{src:t.getAttribute("src"),title:t.getAttribute("title"),alt:t.getAttribute("alt")}}}],toDOM:function(t){return["img",t.attrs]}}}},{key:"plugins",get:function(){return[new r.h({props:{handleDOMEvents:{drop:function(t,e){if(e.dataTransfer&&e.dataTransfer.files&&e.dataTransfer.files.length){var n=Array.from(e.dataTransfer.files).filter((function(t){return/image/i.test(t.type)}));if(0!==n.length){e.preventDefault();var r=t.state.schema,o=t.posAtCoords({left:e.clientX,top:e.clientY});n.forEach((function(e){var n=new FileReader;n.onload=function(e){var n=r.nodes.image.create({src:e.target.result}),i=t.state.tr.insert(o.pos,n);t.dispatch(i)},n.readAsDataURL(e)}))}}}}}})]}}]),e}(r.g),rt=function(t){function e(){return z(this,e),H(this,q(e).apply(this,arguments))}return $(e,t),P(e,[{key:"keys",value:function(t){var e=t.type;return{Enter:Object(o.m)(e),Tab:Object(o.l)(e),"Shift-Tab":Object(o.d)(e)}}},{key:"name",get:function(){return"list_item"}},{key:"schema",get:function(){return{content:"paragraph block*",defining:!0,draggable:!1,parseDOM:[{tag:"li"}],toDOM:function(){return["li",0]}}}}]),e}(r.g);function ot(t){var e=t.matcher,n=void 0===e?{char:"@",allowSpaces:!1,startOfLine:!1}:e,r=t.appendText,i=void 0===r?null:r,s=t.suggestionClass,c=void 0===s?"suggestion":s,u=t.command,p=void 0===u?function(){return!1}:u,f=t.items,h=void 0===f?[]:f,d=t.onEnter,m=void 0===d?function(){return!1}:d,v=t.onChange,g=void 0===v?function(){return!1}:v,y=t.onExit,b=void 0===y?function(){return!1}:y,w=t.onKeyDown,k=void 0===w?function(){return!1}:w,x=t.onFilter,C=void 0===x?function(t,e){return e?t.filter((function(t){return JSON.stringify(t).toLowerCase().includes(e.toLowerCase())})):t}:x;return new l.Plugin({key:new l.PluginKey("suggestions"),view:function(){var t=this;return{update:function(e,n){var r=t.key.getState(n),s=t.key.getState(e.state),a=r.active&&s.active&&r.range.from!==s.range.from,c=!r.active&&s.active,l=r.active&&!s.active,u=c||a,f=!c&&!l&&r.query!==s.query&&!a,d=l||a;if(u||f||d){var v=d?r:s,y=document.querySelector('[data-decoration-id="'.concat(v.decorationId,'"]')),w=y?{getBoundingClientRect:function(){return y.getBoundingClientRect()},clientWidth:y.clientWidth,clientHeight:y.clientHeight}:null,k={view:e,range:v.range,query:v.query,text:v.text,decorationNode:y,virtualNode:w,items:C(Array.isArray(h)?h:h(),v.query),command:function(t){var n=t.range,r=t.attrs;p({range:n,attrs:r,schema:e.state.schema})(e.state,e.dispatch,e),i&&Object(o.c)(i)(e.state,e.dispatch,e)}};d&&b(k),f&&g(k),u&&m(k)}}}},state:{init:function(){return{active:!1,range:{},query:null,text:null}},apply:function(t,e){var r,o,i,s,a,c,l,u=t.selection,p=j({},e);if(u.from===u.to){(u.frome.range.to)&&(p.active=!1);var f=u.$from,h=(o=(r=n).char,i=void 0===o?"@":o,s=r.allowSpaces,a=void 0!==s&&s,c=r.startOfLine,l=void 0!==c&&c,function(t){if(t.depth<=0)return!1;for(var e,n="\\".concat(i),r=new RegExp("\\s".concat(n,"$")),o=l?"^":"",s=a?new RegExp("".concat(o).concat(n,".*?(?=\\s").concat(n,"|$)"),"gm"):new RegExp("".concat(o,"(?:^)?").concat(n,"[^\\s").concat(n,"]*"),"gm"),c=t.before(),u=t.end(),p=t.doc.textBetween(c,u,"\0","\0"),f=s.exec(p);null!==f;){var h=f.input.slice(Math.max(0,f.index-1),f.index);if(/^[\s\0]?$/.test(h)){var d=f.index+t.start(),m=d+f[0].length;a&&r.test(p.slice(m-1,m+1))&&(f[0]+=" ",m+=1),d=t.pos&&(e={range:{from:d,to:m},query:f[0].slice(i.length),text:f[0]})}f=s.exec(p)}return e})(f),d=(Math.random()+1).toString(36).substr(2,5);h?(p.active=!0,p.decorationId=e.decorationId?e.decorationId:d,p.range=h.range,p.query=h.query,p.text=h.text):p.active=!1}else p.active=!1;return p.active||(p.decorationId=null,p.range={},p.query=null,p.text=null),p}},props:{handleKeyDown:function(t,e){var n=this.getState(t.state),r=n.active,o=n.range;return!!r&&k({view:t,event:e,range:o})},decorations:function(t){var e=this.getState(t),n=e.active,r=e.range,o=e.decorationId;return n?a.b.create(t.doc,[a.a.inline(r.from,r.to,{nodeName:"span",class:c,"data-decoration-id":o})]):null}}})}r.g;var it=function(t){function e(){return z(this,e),H(this,q(e).apply(this,arguments))}return $(e,t),P(e,[{key:"commands",value:function(t){var e=t.type,n=t.schema;return function(){return Object(o.q)(e,n.nodes.list_item)}}},{key:"keys",value:function(t){var e=t.type,n=t.schema;return{"Shift-Ctrl-9":Object(o.q)(e,n.nodes.list_item)}}},{key:"inputRules",value:function(t){var e=t.type;return[Object(o.u)(/^(\d+)\.\s$/,e,(function(t){return{order:+t[1]}}),(function(t,e){return e.childCount+e.attrs.order===+t[1]}))]}},{key:"name",get:function(){return"ordered_list"}},{key:"schema",get:function(){return{attrs:{order:{default:1}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:function(t){return{order:t.hasAttribute("start")?+t.getAttribute("start"):1}}}],toDOM:function(t){return 1===t.attrs.order?["ol",0]:["ol",{start:t.attrs.order},0]}}}}]),e}(r.g),st=Object(u.tableNodes)({tableGroup:"block",cellContent:"block+",cellAttributes:{background:{default:null,getFromDOM:function(t){return t.style.backgroundColor||null},setDOMAttr:function(t,e){if(t){var n={style:"".concat(e.style||"","background-color: ").concat(t,";")};Object.assign(e,n)}}}}}),at=(r.g,r.g,r.g,r.g,r.g,r.g,function(t){function e(){return z(this,e),H(this,q(e).apply(this,arguments))}return $(e,t),P(e,[{key:"keys",value:function(t){var e=t.type;return{"Mod-b":Object(o.r)(e)}}},{key:"commands",value:function(t){var e=t.type;return function(){return Object(o.r)(e)}}},{key:"inputRules",value:function(t){var e=t.type;return[Object(o.e)(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,e)]}},{key:"pasteRules",value:function(t){var e=t.type;return[Object(o.f)(/(?:\*\*|__)([^*_]+)(?:\*\*|__)/g,e)]}},{key:"name",get:function(){return"bold"}},{key:"schema",get:function(){return{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:function(t){return"normal"!==t.style.fontWeight&&null}},{style:"font-weight",getAttrs:function(t){return/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}}],toDOM:function(){return["strong",0]}}}}]),e}(r.f)),ct=function(t){function e(){return z(this,e),H(this,q(e).apply(this,arguments))}return $(e,t),P(e,[{key:"keys",value:function(t){var e=t.type;return{"Mod-`":Object(o.r)(e)}}},{key:"commands",value:function(t){var e=t.type;return function(){return Object(o.r)(e)}}},{key:"inputRules",value:function(t){var e=t.type;return[Object(o.e)(/(?:`)([^`]+)(?:`)$/,e)]}},{key:"pasteRules",value:function(t){var e=t.type;return[Object(o.f)(/(?:`)([^`]+)(?:`)/g,e)]}},{key:"name",get:function(){return"code"}},{key:"schema",get:function(){return{excludes:"_",parseDOM:[{tag:"code"}],toDOM:function(){return["code",0]}}}}]),e}(r.f),lt=function(t){function e(){return z(this,e),H(this,q(e).apply(this,arguments))}return $(e,t),P(e,[{key:"keys",value:function(t){var e=t.type;return{"Mod-i":Object(o.r)(e)}}},{key:"commands",value:function(t){var e=t.type;return function(){return Object(o.r)(e)}}},{key:"inputRules",value:function(t){var e=t.type;return[Object(o.e)(/(?:^|[^_])(_([^_]+)_)$/,e),Object(o.e)(/(?:^|[^*])(\*([^*]+)\*)$/,e)]}},{key:"pasteRules",value:function(t){var e=t.type;return[Object(o.f)(/_([^_]+)_/g,e),Object(o.f)(/\*([^*]+)\*/g,e)]}},{key:"name",get:function(){return"italic"}},{key:"schema",get:function(){return{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}],toDOM:function(){return["em",0]}}}}]),e}(r.f),ut=function(t){function e(){return z(this,e),H(this,q(e).apply(this,arguments))}return $(e,t),P(e,[{key:"commands",value:function(t){var e=t.type;return function(t){return t.href?Object(o.t)(e,t):Object(o.i)(e)}}},{key:"pasteRules",value:function(t){var e=t.type;return[Object(o.h)(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-zA-Z]{2,}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g,e,(function(t){return{href:t}}))]}},{key:"name",get:function(){return"link"}},{key:"defaultOptions",get:function(){return{openOnClick:!0}}},{key:"schema",get:function(){return{attrs:{href:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(t){return{href:t.getAttribute("href")}}}],toDOM:function(t){return["a",j({},t.attrs,{rel:"noopener noreferrer nofollow"}),0]}}}},{key:"plugins",get:function(){return this.options.openOnClick?[new r.h({props:{handleClick:function(t,e,n){var r=t.state.schema,o=Object(p.a)(t.state,r.marks.link);o.href&&n.target instanceof HTMLAnchorElement&&(n.stopPropagation(),window.open(o.href))}}})]:[]}}]),e}(r.f),pt=function(t){function e(){return z(this,e),H(this,q(e).apply(this,arguments))}return $(e,t),P(e,[{key:"keys",value:function(t){var e=t.type;return{"Mod-d":Object(o.r)(e)}}},{key:"commands",value:function(t){var e=t.type;return function(){return Object(o.r)(e)}}},{key:"inputRules",value:function(t){var e=t.type;return[Object(o.e)(/~([^~]+)~$/,e)]}},{key:"pasteRules",value:function(t){var e=t.type;return[Object(o.f)(/~([^~]+)~/g,e)]}},{key:"name",get:function(){return"strike"}},{key:"schema",get:function(){return{parseDOM:[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",getAttrs:function(t){return"line-through"===t}}],toDOM:function(){return["s",0]}}}}]),e}(r.f),ft=(r.f,function(t){function e(){return z(this,e),H(this,q(e).apply(this,arguments))}return $(e,t),P(e,[{key:"init",value:function(){var t=this;this.getSendableSteps=this.debounce((function(e){var n=Object(h.d)(e);n&&t.options.onSendable({editor:t.editor,sendable:{version:n.version,steps:n.steps.map((function(t){return t.toJSON()})),clientID:n.clientID}})}),this.options.debounce),this.editor.on("transaction",(function(e){var n=e.state;t.getSendableSteps(n)}))}},{key:"debounce",value:function(t,e){var n;return function(){for(var r=arguments.length,o=new Array(r),i=0;ir||s.dispatch(Object(h.c)(i,n.map((function(t){return f.d.fromJSON(a,t.step)})),n.map((function(t){return t.clientID}))))}}}},{key:"plugins",get:function(){return[Object(h.a)({version:this.options.version,clientID:this.options.clientID})]}}]),e}(r.e)),ht=(r.e,function(t){function e(){return z(this,e),H(this,q(e).apply(this,arguments))}return $(e,t),P(e,[{key:"keys",value:function(){return{"Mod-z":T,"Mod-y":N,"Shift-Mod-z":N}}},{key:"commands",value:function(){return{undo:function(){return T},redo:function(){return N},undoDepth:function(){return R},redoDepth:function(){return I}}}},{key:"name",get:function(){return"history"}},{key:"defaultOptions",get:function(){return{depth:"",newGroupDelay:""}}},{key:"plugins",get:function(){return[D({depth:this.options.depth,newGroupDelay:this.options.newGroupDelay})]}}]),e}(r.e)),dt=function(t){function e(){return z(this,e),H(this,q(e).apply(this,arguments))}return $(e,t),P(e,[{key:"name",get:function(){return"placeholder"}},{key:"defaultOptions",get:function(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",emptyNodeText:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0}}},{key:"update",get:function(){return function(t){t.updateState(t.state)}}},{key:"plugins",get:function(){var t=this;return[new r.h({props:{decorations:function(e){var n=e.doc,r=e.plugins,o=e.selection,i=r.find((function(t){return t.key.startsWith("editable$")})).props.editable()||!t.options.showOnlyWhenEditable,s=o.anchor,c=[],l=0===n.textContent.length;return!!i&&(n.descendants((function(e,n){var r=s>=n&&s<=n+e.nodeSize,o=0===e.content.size;if((r||!t.options.showOnlyCurrent)&&o){var i=[t.options.emptyNodeClass];l&&i.push(t.options.emptyEditorClass);var u=a.a.node(n,n+e.nodeSize,{class:i.join(" "),"data-empty-text":"function"==typeof t.options.emptyNodeText?t.options.emptyNodeText(e):t.options.emptyNodeText});c.push(u)}return!1})),a.b.create(n,c))}}})]}}]),e}(r.e);r.e,r.e},176:function(t,e,n){"use strict";var r=n(167),o=n(171),i=n(170);function s(t,e){return function(n,r){var s=n.selection,a=s.$from,c=s.$to,l=a.blockRange(c),u=!1,p=l;if(!l)return!1;if(l.depth>=2&&a.node(l.depth-1).type.compatibleContent(t)&&0==l.startIndex){if(0==a.index(l.depth-1))return!1;var f=n.doc.resolve(l.start-2);p=new i.NodeRange(f,f,l.depth),l.endIndex=0;c--)a=i.Fragment.from(n[c].type.create(n[c].attrs,a));t.step(new o.b(e.start-(r?2:0),e.end,e.start,e.end,new i.Slice(a,0,0),n.length,!0));for(var l=0,u=0;u0,f=s.depth-(p?1:2);f>=s.depth-3;f--)u=i.Fragment.from(s.node(f).copy(u));u=u.append(i.Fragment.from(t.createAndFill()));var h=e.tr.replace(s.before(p?null:-1),s.after(-3),new i.Slice(u,p?3:2,2));h.setSelection(e.selection.constructor.near(h.doc.resolve(s.pos+(p?3:2)))),n(h.scrollIntoView())}return!0}var d=a.pos==s.end()?l.contentMatchAt(0).defaultType:null,m=e.tr.delete(s.pos,a.pos),v=d&&[null,{type:d}];return!!Object(o.g)(m.doc,s.pos,2,v)&&(n&&n(m.split(s.pos,2,v).scrollIntoView()),!0)}}function c(t){return function(e,n){var r=e.selection,s=r.$from,a=r.$to,c=s.blockRange(a,(function(e){return e.childCount&&e.firstChild.type==t}));return!!c&&(!n||(s.node(c.depth-1).type==t?function(t,e,n,r){var s=t.tr,a=r.end,c=r.$to.end(r.depth);al;c--)a-=s.child(c).nodeSize,r.delete(a-1,a+1);var u=r.doc.resolve(n.start),p=u.nodeAfter,f=0==n.startIndex,h=n.endIndex==s.childCount,d=u.node(-1),m=u.index(-1);if(!d.canReplace(m+(f?0:1),m+1,p.content.append(h?i.Fragment.empty:i.Fragment.from(s))))return!1;var v=u.pos,g=v+p.nodeSize;return r.step(new o.b(v-(f?1:0),g+(h?1:0),v+1,g-1,new i.Slice((f?i.Fragment.empty:i.Fragment.from(s.copy(i.Fragment.empty))).append(h?i.Fragment.empty:i.Fragment.from(s.copy(i.Fragment.empty))),f?0:1,h?0:1),f?0:1)),e(r.scrollIntoView()),!0}(e,n,c)))}}function l(t){return function(e,n){var r=e.selection,s=r.$from,a=r.$to,c=s.blockRange(a,(function(e){return e.childCount&&e.firstChild.type==t}));if(!c)return!1;var l=c.startIndex;if(0==l)return!1;var u=c.parent,p=u.child(l-1);if(p.type!=t)return!1;if(n){var f=p.lastChild&&p.lastChild.type==u.type,h=i.Fragment.from(f?t.create():null),d=new i.Slice(i.Fragment.from(t.create(null,i.Fragment.from(u.type.create(null,h)))),f?3:1,0),m=c.start,v=c.end;n(e.tr.step(new o.b(m-(f?3:1),v,m,v,d,1,!0)).scrollIntoView())}return!0}}var u=n(177),p=n(168),f=n(374),h=n(178); /*! * tiptap-commands v1.12.4 * (c) 2019 Scrumpy UG (limited liability) * @license MIT */ function d(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(e,n){var r=e.selection.$from.pos.pos;return n(e.tr.insertText(t,r)),!0}}function m(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);ep})).length)return!1;dp&&a.delete(p,h),l=(u=p)+r[c].length}return a.addMark(u,l,e.create(s)),a.removeStoredMark(e),a}))}function g(t,e,n){return new u.a(t,(function(t,r,o,i){var s=n instanceof Function?n(r):n,a=t.tr;return r[0]&&a.replaceWith(o-1,i,e.create(s)),a}))}function y(t,e,n){return new p.Plugin({props:{transformPasted:function(r){return new i.Slice(function r(o){var s=[];return o.forEach((function(o){if(o.isText){var i,a=o.text,c=0;do{if(i=t.exec(a)){var l=i.index,u=l+i[0].length,p=n instanceof Function?n(i[0]):n;l>0&&s.push(o.cut(c,l)),s.push(o.cut(l,u).mark(e.create(p).addToSet(o.marks))),c=u}}while(i);c0&&s.push(o.cut(c,u)),s.push(o.cut(f,h).mark(e.create(d).addToSet(o.marks))),c=p}c0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r,o){var i=r.selection,s=i.$from,a=i.$to,c=s.index(),l=t?t.from:s.pos,u=t?t.to:a.pos;return!!s.parent.canReplaceWith(c,c,e)&&(o&&o(r.tr.replaceWith(l,u,e.create(n))),!0)}}function x(t){return function(e,n){var r=e.selection,o=r.$from,s=r.$to,a=r.node;if(a&&a.isBlock||o.depth<2||!o.sameParent(s))return!1;var c=o.node(-1);if(c.type!=t)return!1;if(0==o.parent.content.size){if(2==o.depth||o.node(-3).type!=t||o.index(-2)!=o.node(-2).childCount-1)return!1;if(n){for(var l=i.Fragment.empty,u=o.index(-1)>0,p=o.depth-(u?1:2);p>=o.depth-3;p--)l=i.Fragment.from(o.node(p).copy(l));l=l.append(i.Fragment.from(t.createAndFill()));var f=e.tr.replace(o.before(u?null:-1),o.after(-3),new i.Slice(l,u?3:2,2));f.setSelection(e.selection.constructor.near(f.doc.resolve(o.pos+(u?3:2)))),n(f.scrollIntoView())}return!0}var h=s.pos==o.end()?c.contentMatchAt(o.indexAfter(-1)).defaultType:null,d=e.tr.delete(o.pos,s.pos),m=h&&[{type:t},{type:h}];return m||(m=[{type:t},null]),!!function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,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 p=l.content.cutByIndex(u,l.childCount),f=r&&r[c]||l;if(f!=l&&(p=p.replaceChild(0,f.type.create(f.attrs))),!l.canReplace(u+1,l.childCount))return!1}var h=o.indexAfter(i),d=r&&r[0];return o.node(i).canReplaceWith(h,h,d?d.type:o.node(i+1).type)}(d.doc,o.pos,2,m)&&(n&&n(d.split(o.pos,2,m).scrollIntoView()),!0)}}function C(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(o,i,s){return Object(f.e)(o,t,n)?Object(r.e)(e)(o,i,s):Object(r.e)(t,n)(o,i,s)}}function S(t,e){return t.type===e.nodes.bullet_list||t.type===e.nodes.ordered_list||t.type===e.nodes.todo_list}function _(t,e){return function(n,r,o){var i=n.schema,a=n.selection,l=a.$from,u=a.$to,p=l.blockRange(u);if(!p)return!1;var f=Object(h.findParentNode)((function(t){return S(t,i)}))(a);if(p.depth>=1&&f&&p.depth-f.depth<=1){if(f.node.type===t)return c(e)(n,r,o);if(S(f.node,i)&&t.validContent(f.node.content)){var d=n.tr;return d.setNodeMarkup(f.pos,t),r&&r(d),!1}}return s(t)(n,r,o)}}function A(t){return function(e,n,o){return Object(f.e)(e,t)?Object(r.d)(e,n):Object(r.g)(t)(e,n,o)}}function O(t,e){return function(n,r){var o=n.tr,i=n.selection,s=n.doc,a=i.from,c=i.to,l=i.$from;if(i.empty){var u=Object(f.b)(l,t);a=u.from,c=u.to}return s.rangeHasMark(a,c,t)&&o.removeMark(a,c,t),o.addMark(a,c,t.create(e)),r(o)}}n.d(e,"c",(function(){return d})),n.d(e,"e",(function(){return v})),n.d(e,"f",(function(){return b})),n.d(e,"g",(function(){return g})),n.d(e,"h",(function(){return y})),n.d(e,"i",(function(){return w})),n.d(e,"j",(function(){return k})),n.d(e,"n",(function(){return x})),n.d(e,"p",(function(){return C})),n.d(e,"q",(function(){return _})),n.d(e,"s",(function(){return A})),n.d(e,"t",(function(){return O})),n.d(e,"a",(function(){return r.b})),n.d(e,"b",(function(){return r.c})),n.d(e,"k",(function(){return r.e})),n.d(e,"r",(function(){return r.f})),n.d(e,"d",(function(){return c})),n.d(e,"l",(function(){return l})),n.d(e,"m",(function(){return a})),n.d(e,"o",(function(){return u.c})),n.d(e,"u",(function(){return u.e}))},177:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return p})),n.d(e,"d",(function(){return l})),n.d(e,"e",(function(){return u}));var r=n(168),o=n(171),i=function(t,e){var n;this.match=t,this.handler="string"==typeof e?(n=e,function(t,e,r,o){var i=n;if(e[1]){var s=e[0].lastIndexOf(e[1]);i+=e[0].slice(s+e[1].length);var a=(r+=s)-o;a>0&&(i=e[0].slice(s-a,s)+i,r=o)}return t.tr.insertText(i,r,o)}):e};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.$cursor;r&&c(t,r.pos,r.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=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 i(/--$/,"—"),new i(/\.\.\.$/,"…"),new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new i(/"$/,"”"),new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),new i(/'$/,"’");function u(t,e,n,r){return new i(t,(function(t,i,s,a){var c=n instanceof Function?n(i):n,l=t.tr.delete(s,a),u=l.doc.resolve(s).blockRange(),p=u&&Object(o.i)(u,e,c);if(!p)return null;l.wrap(u,p);var f=l.doc.resolve(s-1).nodeBefore;return f&&f.type==e&&Object(o.f)(l.doc,s-1)&&(!r||r(i,f))&&l.join(s-1),l}))}function p(t,e,n){return new i(t,(function(t,r,o,i){var s=t.doc.resolve(o),a=n instanceof Function?n(r):n;return s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),e)?t.tr.delete(o,i).setBlockType(o,o,e,a):null}))}},178:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(168),o=n(170),i=n(401),s=function(t,e){return function(n){Array.isArray(t)||(t=[t]);for(var r=0,o=t.length;r1&&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}},l=function(t){return t.type&&t.type.spec.selectable},u=function(t,e,n){return function(t){return l(t)&&t.type.isLeaf}(t)?n.setSelection(new r.NodeSelection(n.doc.resolve(e))):c(e)(n)},p=function(t,e,n){return function(r){var o="number"==typeof e,i=r.selection.$from,c=o?r.doc.resolve(e):f(r.selection)?r.doc.resolve(i.pos+1):i,p=c.parent;if(f(r.selection)&&n&&r!==(r=a(t)(r)))return r;if(w(p)&&r!==(r=s(p.type,t)(r))){var h=l(t)?c.before(c.depth):c.pos;return u(t,h,r)}if(b(c,t)){r.insert(c.pos,t);var m=o?c.pos:l(t)?r.selection.$anchor.pos-1:r.selection.$anchor.pos;return d(u(t,m,r))}for(var v=c.depth;v>0;v--){var g=c.after(v),y=r.doc.resolve(g);if(b(y,t))return r.insert(g,t),d(u(t,g,r))}return r}},f=function(t){return t instanceof r.NodeSelection},h=function(t,e){return Array.isArray(t)&&t.indexOf(e.type)>-1||e.type===t},d=function(t){return Object.assign(Object.create(t),t).setTime(Date.now())},m=function(t,e){return function(n){var r=n.doc.nodeAt(t),o=n.doc.resolve(t);if(v(o,e)){var i=(n=n.replaceWith(t,t+r.nodeSize,e)).selection.$from.pos-1;return n=c(Math.max(i,0),-1)(n),n=c(n.selection.$from.start())(n),d(n)}return n}},v=function(t,e){var n=t.node(t.depth);return n&&n.type.validContent(e instanceof o.Fragment?e:o.Fragment.from(e))},g=function(t){return function(e){var n=e.doc.nodeAt(t);return d(e.delete(t,t+n.nodeSize))}},y=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},b=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)},w=function(t){return!t||"paragraph"===t.type.name&&2===t.nodeSize},k=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e?t.createChecked(null,e):t.createAndFill()},x=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;an[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},O=function(t,e,n,r){var o="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===(t>e?-1:1)){if(-1!==n.slice(0,n.length-1).indexOf(e))throw new Error(o)}else if(-1!==n.slice(1).indexOf(e))throw new Error(o);return!0},M=function(t){return function(e){var n=e.$from;return E(n,t)}},E=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}}},D=function(t,e){return function(n){var r=M(t)(n);if(r)return I(r.pos,e)}},T=function(t){return function(e){return!!M(t)(e)}},N=function(t){return function(e){return M((function(e){return h(t,e)}))(e)}},R=function(t){var e=t.$from.nodeBefore,n=r.Selection.findFrom(t.$from,-1);if(n&&e){var o=N(e.type)(n);return o?o.pos:n.$from.pos}},I=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},z=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},F=function(t,e,n){if(!t)throw new Error('Invalid "node" parameter');if(!e)throw new Error('Invalid "predicate" parameter');return z(t,n).filter((function(t){return e(t.node)}))},P=function(t,e,n){return F(t,(function(t){return t.type===e}),n)};var B=function(t){return M((function(t){return t.type.spec.tableRole&&"table"===t.type.spec.tableRole}))(t)},L=function(t){return t instanceof i.CellSelection},j=function(t){if(L(t)){var e=i.TableMap.get(t.$anchorCell.node(-1));return x({left:0,right:e.width,top:0,bottom:e.height})(t)}return!1},$=function(t){return function(e){var n=B(e);if(n){var r=i.TableMap.get(n.node);return(Array.isArray(t)?t:Array.from([t])).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}})))}}),[])}}},q=function(t){return function(e){var n=B(e);if(n){var r=i.TableMap.get(n.node);return(Array.isArray(t)?t:Array.from([t])).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}})))}}),[])}}},V=function(t){return function(e,n){return function(r){var o=B(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,p=s?e+1:a.height;if(n){var f=X(r.selection.$from);if(!f)return r;var h=a.findCell(f.pos-o.start);s?(l=Math.min(l,h.top),p=Math.max(p,h.bottom)):(c=Math.min(c,h.left),u=Math.max(u,h.right))}var m=a.cellsInRect({left:c,top:l,right:s?u:c+1,bottom:s?l+1:p}),v=p-l==1?m:a.cellsInRect({left:s?c:u-1,top:s?p-1:l,right:u,bottom:p}),g=o.start+m[0],y=o.start+v[v.length-1],b=r.doc.resolve(g),w=r.doc.resolve(y);return d(r.setSelection(new i.CellSelection(w,b)))}}return r}}},H=V("column"),U=V("row"),W=function(t){return function(e){var n=B(e.selection);if(n){var r=i.TableMap.get(n.node);if(t>=0&&t<=r.height){for(var o=n.node,s=y(o.type.schema),a=n.start,c=0;c1&&n+o>t}))(e);h.push.apply(h,function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e=0;m--)d(m);h.length&&h.forEach((function(t){e=Z(t,{rowspan:t.node.attrs.rowspan+1})(e)}))}return p(s.row.create(l.attrs,u),a)(e)}}return e}},J=function(t){return function(e){var n=B(e.selection);if(n){var r=i.TableMap.get(n.node);if(0===t&&1===r.width)return G(e);if(t>=0&&t<=r.width)return i.removeColumn(e,{map:r,tableStart:n.start,table:n.node},t),d(e)}return e}},K=function(t){return function(e){var n=B(e.selection);if(n){var r=i.TableMap.get(n.node);if(0===t&&1===r.height)return G(e);if(t>=0&&t<=r.height)return i.removeRow(e,{map:r,tableStart:n.start,table:n.node},t),d(e)}return e}},G=function(t){for(var e=t.selection.$from,n=e.depth;n>0;n--){if("table"===e.node(n).type.spec.tableRole)return d(t.delete(e.before(n),e.after(n)))}return t},Z=function(t,e){return function(n){return t?(n.setNodeMarkup(t.pos,null,Object.assign({},t.node.attrs,e)),d(n)):n}},X=function(t){return E(t,(function(t){return t.type.spec.tableRole&&/cell/i.test(t.type.spec.tableRole)}))},Y=function(t){var e=X(t);if(e){var n=function(t){return E(t,(function(t){return t.type.spec.tableRole&&/table/i.test(t.type.spec.tableRole)}))}(t),r=i.TableMap.get(n.node),o=e.pos-n.start;return r.rectBetween(o,o)}},Q=function(t,e){return function(n){var r=[],o=q(t)(n.selection);if(o)for(var i=o.length-1;i>=0;i--)e(o[i],n)&&r.push(o[i]);return r}},tt=function(t){return function(e){for(var n=t,r=t,o=function(t){var o=$(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=$(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=$(i)(e.selection);c&&c.length&&a.push(i)}n=a[0],r=a[a.length-1];for(var l=$(n)(e.selection),u=q(0)(e.selection),p=e.doc.resolve(l[l.length-1].pos),f=void 0,h=r;h>=n;h--){var d=$(h)(e.selection);if(d&&d.length){for(var m=u.length-1;m>=0;m--)if(u[m].pos===d[0].pos){f=d[0];break}if(f)break}}return{$anchor:p,$head:e.doc.resolve(f.pos),indexes:a}}},et=function(t){return function(e){for(var n=t,r=t,o=function(t){q(t)(e.selection).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){q(t)(e.selection).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=q(i)(e.selection);c&&c.length&&a.push(i)}n=a[0],r=a[a.length-1];for(var l=q(n)(e.selection),u=$(0)(e.selection),p=e.doc.resolve(l[l.length-1].pos),f=void 0,h=r;h>=n;h--){var d=q(h)(e.selection);if(d&&d.length){for(var m=u.length-1;m>=0;m--)if(u[m].pos===d[0].pos){f=d[0];break}if(f)break}}return{$anchor:p,$head:e.doc.resolve(f.pos),indexes:a}}};e.isNodeSelection=f,e.canInsert=b,e.convertTableNodeToArrayOfRows=S,e.convertArrayOfRowsToTableNode=_,e.findParentNode=M,e.findParentNodeClosestToPos=E,e.findParentDomRef=D,e.hasParentNode=T,e.findParentNodeOfType=N,e.findParentNodeOfTypeClosestToPos=function(t,e){return E(t,(function(t){return h(e,t)}))},e.hasParentNodeOfType=function(t){return function(e){return T((function(e){return h(t,e)}))(e)}},e.findParentDomRefOfType=function(t,e){return function(n){return D((function(e){return h(t,e)}),e)(n)}},e.findSelectedNodeOfType=function(t){return function(e){if(f(e)){var n=e.node,r=e.$from;if(h(t,n))return{node:n,pos:r.pos,depth:r.depth}}}},e.findPositionOfNodeBefore=R,e.findDomRefAtPos=I,e.flatten=z,e.findChildren=F,e.findTextNodes=function(t,e){return F(t,(function(t){return t.isText}),e)},e.findInlineNodes=function(t,e){return F(t,(function(t){return t.isInline}),e)},e.findBlockNodes=function(t,e){return F(t,(function(t){return t.isBlock}),e)},e.findChildrenByAttr=function(t,e,n){return F(t,(function(t){return!!e(t.attrs)}),n)},e.findChildrenByType=P,e.findChildrenByMark=function(t,e,n){return F(t,(function(t){return e.isInSet(t.marks)}),n)},e.contains=function(t,e){return!!P(t,e).length},e.findTable=B,e.isCellSelection=L,e.getSelectionRect=function(t){if(L(t)){var e=t.$anchorCell.start(-1);return i.TableMap.get(t.$anchorCell.node(-1)).rectBetween(t.$anchorCell.pos-e,t.$headCell.pos-e)}},e.isColumnSelected=function(t){return function(e){if(L(e)){var n=i.TableMap.get(e.$anchorCell.node(-1));return x({left:t,right:t+1,top:0,bottom:n.height})(e)}return!1}},e.isRowSelected=function(t){return function(e){if(L(e)){var n=i.TableMap.get(e.$anchorCell.node(-1));return x({left:0,right:n.width,top:t,bottom:t+1})(e)}return!1}},e.isTableSelected=j,e.getCellsInColumn=$,e.getCellsInRow=q,e.getCellsInTable=function(t){var e=B(t);if(e){var n=i.TableMap.get(e.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map((function(t){var n=e.node.nodeAt(t),r=t+e.start;return{pos:r,start:r+1,node:n}}))}},e.selectColumn=H,e.selectRow=U,e.selectTable=function(t){var e=B(t.selection);if(e){var n=i.TableMap.get(e.node).map;if(n&&n.length){var r=e.start+n[0],o=e.start+n[n.length-1],s=t.doc.resolve(r),a=t.doc.resolve(o);return d(t.setSelection(new i.CellSelection(a,s)))}}return t},e.emptyCell=function(t,e){return function(n){if(t){var r=y(e).cell.createAndFill().content;if(!t.node.content.eq(r))return n.replaceWith(t.pos+1,t.pos+t.node.nodeSize,r),d(n)}return n}},e.addColumnAt=function(t){return function(e){var n=B(e.selection);if(n){var r=i.TableMap.get(n.node);if(t>=0&&t<=r.width)return d(i.addColumn(e,{map:r,tableStart:n.start,table:n.node},t))}return e}},e.moveRow=function(t,e,n){return function(r){var o=Object.assign({tryToFit:!1,direction:0},n),i=B(r.selection);if(!i)return r;var s=et(t)(r).indexes,a=et(e)(r).indexes;if(s.indexOf(e)>-1)return r;!o.tryToFit&&a.length>1&&O(t,e,a,"row");var c=function(t,e,n,r){var o=S(t.node);return o=A(o,e,n,r),_(t.node,o)}(i,s,a,o.direction);return d(r).replaceWith(i.pos,i.pos+i.node.nodeSize,c)}},e.moveColumn=function(t,e,n){return function(r){var o=Object.assign({tryToFit:!1,direction:0},n),i=B(r.selection);if(!i)return r;var s=tt(t)(r).indexes,a=tt(e)(r).indexes;if(s.indexOf(e)>-1)return r;!o.tryToFit&&a.length>1&&O(t,e,a,"column");var c=function(t,e,n,r){var o=C(S(t.node));return o=A(o,e,n,r),o=C(o),_(t.node,o)}(i,s,a,o.direction);return d(r).replaceWith(i.pos,i.pos+i.node.nodeSize,c)}},e.addRowAt=function(t,e){return function(n){var r=B(n.selection);if(r){var o=i.TableMap.get(r.node),s=t-1;if(e&&s>=0)return d(W(s)(n));if(t>=0&&t<=o.height)return d(i.addRow(n,{map:o,tableStart:r.start,table:r.node},t))}return n}},e.cloneRowAt=W,e.removeColumnAt=J,e.removeRowAt=K,e.removeTable=G,e.removeSelectedColumns=function(t){var e=t.selection;if(j(e))return G(t);if(L(e)){var n=B(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;i.removeColumn(t,s,a),a!==s.left;a--)s.table=s.tableStart?t.doc.nodeAt(s.tableStart-1):t.doc,s.map=i.TableMap.get(s.table);return d(t)}}return t},e.removeSelectedRows=function(t){var e=t.selection;if(j(e))return G(t);if(L(e)){var n=B(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;i.removeRow(t,s,a),a!==s.top;a--)s.table=s.tableStart?t.doc.nodeAt(s.tableStart-1):t.doc,s.map=i.TableMap.get(s.table);return d(t)}}return t},e.removeColumnClosestToPos=function(t){return function(e){var n=Y(t);return n?J(n.left)(c(t.pos)(e)):e}},e.removeRowClosestToPos=function(t){return function(e){var n=Y(t);return n?K(n.top)(c(t.pos)(e)):e}},e.forEachCellInColumn=function(t,e,n){return function(o){var i=$(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 d(o)}return o}},e.forEachCellInRow=function(t,e,n){return function(o){var i=q(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}},e.setCellAttrs=Z,e.createTable=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=y(t),s=i.cell,a=i.header_cell,c=i.row,l=i.table,u=[],p=[],f=0;fl.bottom-C(r,"bottom")&&(p=e.bottom-l.bottom+C(o,"bottom")),e.leftl.right-C(r,"right")&&(u=e.right-l.right+C(o,"right")),(u||p)&&(c?s.scrollBy(u,p):(p&&(a.scrollTop+=p),u&&(a.scrollLeft+=u))),c)break}}function _(t){for(var e=[],n=t.ownerDocument;t&&(e.push({dom:t,top:t.scrollTop,left:t.scrollLeft}),t!=n);t=h(t));return e}function A(t,e){for(var n=0;n=a){s=Math.max(f.bottom,s),a=Math.min(f.top,a);var h=f.left>e.left?f.left-e.left:f.right=(f.left+f.right)/2?1:0));continue}}!n&&(e.left>=f.right&&e.top>=f.top||e.left>=f.left&&e.top>=f.bottom)&&(i=l+1)}}return n&&3==n.nodeType?function(t,e){for(var n=t.nodeValue.length,r=document.createRange(),o=0;o=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:t,offset:i}:M(n,r)}function E(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function D(t,e){var n,r,o,i,a=t.root;if(a.caretPositionFromPoint)try{var c=a.caretPositionFromPoint(e.left,e.top);c&&(o=(n=c).offsetNode,i=n.offset)}catch(t){}if(!o&&a.caretRangeFromPoint){var l=a.caretRangeFromPoint(e.left,e.top);l&&(o=(r=l).startContainer,i=r.startOffset)}var u,p=a.elementFromPoint(e.left,e.top+1);if(!p||!t.dom.contains(1!=p.nodeType?p.parentNode:p)){var f=t.dom.getBoundingClientRect();if(!E(e,f))return null;if(!(p=function t(e,n,r){var o=e.childNodes.length;if(o&&r.tope.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=function(t,e,n,r){for(var o=-1,i=e;i!=t.dom;){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-1?o:t.docView.posFromDOM(e,n)}(t,o,i,e))}null==u&&(u=function(t,e,n){var r=M(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)}(t,p,e));var m=t.docView.nearestDesc(p,!0);return{pos:u,inside:m?m.posAtStart-m.border:-1}}function T(t,e){var n=t.getClientRects();return n.length?n[e<0?0:n.length-1]:t.getBoundingClientRect()}function N(t,e){var n=t.docView.domFromPos(e),r=n.node,o=n.offset;if(3==r.nodeType&&(s.chrome||s.gecko)){var i=T(d(r,o,o),0);if(s.gecko&&o&&/\s/.test(r.nodeValue[o-1])&&o0&&ol.top&&("up"==n?l.bottomi.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 o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=getSelection();return z.test(r.parent.textContent)&&a.modify?I(t,e,(function(){var e=a.getRangeAt(0),o=a.focusNode,i=a.focusOffset,s=a.caretBidiLevel;a.modify("move",n,"character");var c=!(r.depth?t.docView.domAfterPos(r.before()):t.dom).contains(1==a.focusNode.nodeType?a.focusNode:a.focusNode.parentNode)||o==a.focusNode&&i==a.focusOffset;return a.removeAllRanges(),a.addRange(e),null!=s&&(a.caretBidiLevel=s),c})):"left"==n||"backward"==n?i:s}(t,e,n))}var j=function(t,e,n,r){this.parent=t,this.children=e,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},$={beforePosition:{configurable:!0},size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0}};j.prototype.matchesWidget=function(){return!1},j.prototype.matchesMark=function(){return!1},j.prototype.matchesNode=function(){return!1},j.prototype.matchesHack=function(){return!1},$.beforePosition.get=function(){return!1},j.prototype.parseRule=function(){return null},j.prototype.stopEvent=function(){return!1},$.size.get=function(){for(var t=0,e=0;e0:a)?this.posAtEnd:this.posAtStart},j.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}}},j.prototype.getDesc=function(t){for(var e=t.pmViewDesc,n=e;n;n=n.parent)if(n==this)return e},j.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)}},j.prototype.descAt=function(t){for(var e=0,n=0;e=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 p=this.children[u-1];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(1)){r=f(p.dom)+1;break}t-=p.size}-1==r&&(r=0)}if(r>-1&&e<=c){e=c;for(var h=s+1;ha&&ie){var d=u;u=p,p=d}h.setEnd(p.node,p.offset),h.setStart(u.node,u.offset)}f.removeAllRanges(),f.addRange(h),f.extend&&f.extend(p.node,p.offset)}},j.prototype.ignoreMutation=function(t){return!this.contentDOM},$.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},j.prototype.markDirty=function(t,e){for(var n=0,r=0;r=n:tn){var s=n+o.border,a=i-o.border;if(t>=s&&e<=a)return this.dirty=t==n||e==i?2:1,void(t!=s||e!=a||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-s,e-s):o.dirty=3);o.dirty=3}n=i}this.dirty=2},j.prototype.markParentsDirty=function(){for(var t=this.parent;t;t=t.parent){t.dirty<2&&(t.dirty=2)}},Object.defineProperties(j.prototype,$);var q=[],V=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,q,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 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}(j),H=function(t){function e(e,n,r,o){t.call(this,e,q,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}(j),U=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 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.dirty0&&(i=at(i,0,t,r));for(var a=0;a=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(q,r,t),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||2==this.dirty)&&(s&&this.protectLocalComposition(t,s),this.renderChildren())},e.prototype.renderChildren=function(){!function t(e,n){for(var r=e.firstChild,o=0;oe+this.node.content.size)){var s=t.root.getSelection(),a=function(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=r){for(var l=c-o.length,u=o.lastIndexOf(e);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}(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.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=null)}var s=new H(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!(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(!rt(t,this.outerDeco)){var e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=tt(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,n),e}(j);function J(t,e,n,r,o){return nt(r,e,t),new W(null,t,e,n,r,r,r,o,0)}var K=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!(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&&"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}(W),G=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}(j),Z=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(3==this.dirty)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}(W);function X(t){t&&(this.nodeName=t)}X.prototype=Object.create(null);var Y=[new X];function Q(t,e,n){if(0==t.length)return Y;for(var r=n?Y[0]:new X,o=[r],i=0;i0&&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}}(t.node.content,t.children);this.preMatched=n.nodes,this.preMatchOffset=n.offset};function st(t,e){return t.type.side-e.type.side}function at(t,e,n,r,o){for(var i=[],s=0,a=0;s=n||u<=e?i.push(c):(ln&&i.push(c.slice(n-l,c.size,r)))}return i}function ct(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 lt(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function ut(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=ct(t.state,e);return!!(i&&i instanceof r.NodeSelection)&<(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)?lt(t,new r.NodeSelection(e<0?t.state.doc.resolve(c.pos-l.nodeSize):c)):!!s.webkit&<(t,new r.TextSelection(t.state.doc.resolve(e<0?u:u+l.nodeSize))))}if(o instanceof r.NodeSelection&&o.node.isInline)return lt(t,new r.TextSelection(e>0?o.$to:o.$from));var p=ct(t.state,e);return!!p&<(t,p)}function pt(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function ft(t){var e=t.pmViewDesc;return e&&0==e.size&&(t.nextSibling||"BR"!=t.nodeName)}function ht(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&&r0){if(1!=n.nodeType)break;var c=n.childNodes[r-1];if(ft(c))o=n,i=--r;else{if(3!=c.nodeType)break;r=(n=c).nodeValue.length}}else{if(mt(n))break;for(var l=n.previousSibling;l&&ft(l);)o=n.parentNode,i=f(l),l=l.previousSibling;if(l)r=pt(n=l);else{if((n=n.parentNode)==t.dom)break;r=0}}a?vt(t,e,n,r):o&&vt(t,e,o,i)}}function dt(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){for(var o,i,s=pt(n);;)if(r-1)return!1;var i=o.$from,s=o.$to;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){var a=ct(t.state,e);if(a&&a instanceof r.NodeSelection)return lt(t,a)}if(!i.parent.inlineContent){var c=r.Selection.findFrom(e<0?i:s,e);return!c||lt(t,c)}return!1}function yt(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 bt(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function wt(t,e){var n=e.keyCode,r=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==n||s.mac&&72==n&&"c"==r?yt(t,-1)||ht(t):46==n||s.mac&&68==n&&"c"==r?yt(t,1)||dt(t):13==n||27==n||(37==n?ut(t,-1,r)||ht(t):39==n?ut(t,1,r)||dt(t):38==n?gt(t,-1,r)||ht(t):40==n?function(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;bt(t,o,!0),setTimeout((function(){return bt(t,o,!1)}),20)}}}(t)||gt(t,1,r)||dt(t):r==(s.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function kt(t,e){var n=t.state.selection;if(St(t,n),t.editable?t.hasFocus():Ot(t)&&document.activeElement.contains(t.dom)){if(t.domObserver.disconnectSelection(),t.cursorWrapper)!function(t){var e=t.root.getSelection(),n=document.createRange(),r=t.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,f(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)}(t);else{var o,i,a=n.anchor,c=n.head;!xt||n instanceof r.TextSelection||(n.$from.parent.inlineContent||(o=Ct(t,n.from)),n.empty||n.$from.parent.inlineContent||(i=Ct(t,n.to))),t.docView.setSelection(a,c,t.root,e),xt&&(o&&(o.contentEditable="false"),i&&(i.contentEditable="false")),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):a!=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,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"))})}(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}it.prototype.getPreMatch=function(t){return t>=this.preMatchOffset?this.preMatched[t-this.preMatchOffset]:null},it.prototype.destroyBetween=function(t,e){if(t!=e){for(var n=t;n>1,i=Math.min(o,t.length);r-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{var c=U.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++}},it.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-1&&s+this.preMatchOffset!=o)return!1;var a=i.dom;if(!(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&&3!=i.dirty&&rt(e,i.outerDeco)))&&i.update(t,e,n,r))return i.dom!=a&&(this.changed=!0),this.index++,!0}return!1},it.prototype.addNode=function(t,e,n,r,o){this.top.children.splice(this.index++,0,W.create(this.top,t,e,n,r,o)),this.changed=!0},it.prototype.placeWidget=function(t,e,n){if(this.indexDate.now()-50?t.lastSelectionOrigin:null,c=function(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)){for(n=u;a&&!a.node;)a=a.parent;if(a&&a.node.isAtom&&r.NodeSelection.isSelectable(a.node)&&a.parent){var p=a.posBefore;o=new r.NodeSelection(l==p?u:s.resolve(p))}}else n=s.resolve(t.docView.posFromDOM(i.anchorNode,i.anchorOffset));return o||(o=At(t,n,u,"pointer"==e||t.state.selection.heada;d--){var m=i.childNodes[d-1],v=m.pmViewDesc;if("BR"==m.nodeType&&!v){c=d;break}if(!v||v.size)break}var g=t.state.doc,y=t.someProp("domParser")||o.DOMParser.fromSchema(t.state.schema),b=g.resolve(l),k=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:f,ruleFromNode:Mt,context:b});if(f&&null!=f[0].pos){var C=f[0].pos,S=f[1]&&f[1].pos;null==S&&(S=C),k={anchor:C+l,head:S+l}}return{doc:x,sel:k,from:l,to:u}}(t,e,n),v=t.state.doc,g=v.slice(m.from,m.to);8===t.lastKeyCode&&Date.now()-100=a?i-r:0)+(c-a),a=i}else if(c=c?i-r:0)+(a-c),c=i}return{start:i,endA:a,endB:c}}(g.content,m.doc.content,m.from,f,h);if(!y){if(!(i&&d instanceof r.TextSelection&&!d.empty&&d.$head.sameParent(d.$anchor))||t.composing||m.sel&&m.sel.anchor!=m.sel.head){if(m.sel){var b=Dt(t,t.state.doc,m.sel);b&&!b.eq(t.state.selection)&&t.dispatch(t.state.tr.setSelection(b))}return}y={start:d.from,endA:d.to,endB:d.to}}t.domChangeCount++,t.state.selection.fromt.state.selection.from&&y.start<=t.state.selection.from+2?y.start=t.state.selection.from:y.endA=t.state.selection.to-2&&(y.endB+=t.state.selection.to-y.endA,y.endA=t.state.selection.to)),s.ie&&s.ie_version<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>m.from&&"  "==m.doc.textBetween(y.start-m.from-1,y.start-m.from+1)&&(y.start--,y.endA--,y.endB--);var x,C=m.doc.resolveNoCache(y.start-m.from),S=m.doc.resolveNoCache(y.endB-m.from);if(!(!C.sameParent(S)&&C.posy.start&&function(t,e,n,r,o){if(!r.parent.isTextblock||n-e<=o.pos-r.pos||Tt(r,!0,!1)n||Tt(s,!0,!1)e.content.size?null:At(t,e.resolve(n.anchor),e.resolve(n.head))}function Tt(t,e,n){for(var r=t.depth,o=e?t.end():t.pos;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n)for(var i=t.node(r).maybeChild(t.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}function Nt(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 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=Bt(),u=l.createElement("div");u.appendChild(c.serializeFragment(r,{document:l}));for(var p,f=u.firstChild;f&&1==f.nodeType&&(p=Ft[f.nodeName.toLowerCase()]);){for(var h=p.length-1;h>=0;h--){for(var d=l.createElement(p[h]);u.firstChild;)d.appendChild(u.firstChild);u.appendChild(d)}f=u.firstChild}return f&&1==f.nodeType&&f.setAttribute("data-pm-slice",i+" "+s+" "+JSON.stringify(n)),{dom:u,text:t.someProp("clipboardTextSerializer",(function(t){return t(e)}))||e.content.textBetween(0,e.content.size,"\n\n")}}function Rt(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=function(t){var e=/(\s*]*>)*/.exec(t);e&&(t=t.slice(e[0].length));var n,r=Bt().createElement("div"),o=/(?:]*>)*<([a-z][^>\s]+)/i.exec(t),i=0;(n=o&&Ft[o[1].toLowerCase()])&&(t=n.map((function(t){return"<"+t+">"})).join("")+t+n.map((function(t){return""})).reverse().join(""),i=n.length);r.innerHTML=t;for(var s=0;s=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)}(function(t,e,n){e=0;r--){var i=n(r);if(i)return i.v}return t}(a.content,i),!1),t.someProp("transformPasted",(function(t){a=t(a)})),a}function It(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 zt(t,e,n,r,i,s){var a=e<0?t.firstChild:t.lastChild,c=a.content;return 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))}var Ft={thead:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Pt=null;function Bt(){return Pt||(Pt=document.implementation.createHTMLDocument("title"))}var Lt={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},jt=s.ie&&s.ie_version<=11,$t=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};$t.prototype.set=function(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset},$t.prototype.eq=function(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset};var qt=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;et.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new $t,jt&&(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};qt.prototype.flushSoon=function(){var t=this;this.flushingSoon||(this.flushingSoon=!0,window.setTimeout((function(){t.flushingSoon=!1,t.flush()}),20))},qt.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Lt),jt&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},qt.prototype.stop=function(){var t=this;if(this.observer){var e=this.observer.takeRecords();if(e.length){for(var n=0;n1){var u=a.filter((function(t){return"BR"==t.nodeName}));if(2==u.length){var p=u[0],f=u[1];p.parentNode&&p.parentNode.parentNode==f.parentNode?f.remove():p.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(t){if(Vt)return;Vt=!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.")}(this.view)),this.handleDOMChange(r,o,i),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(e)||kt(this.view))}},qt.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;ii.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 Xt(t,e,n){t.focused||t.focus();var r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function Yt(t,e,n,o,i){return Zt(t,"handleClickOn",e,n,o)||t.someProp("handleClick",(function(n){return n(t,e,o)}))||(i?function(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&&(Xt(t,r.NodeSelection.create(t.state.doc,o),"pointer"),!0)}(t,n):function(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))&&(Xt(t,new r.NodeSelection(n),"pointer"),!0)}(t,n))}function Qt(t,e,n,r){return Zt(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",(function(n){return n(t,e,r)}))}function te(t,e,n,o){return Zt(t,"handleTripleClickOn",e,n,o)||t.someProp("handleTripleClick",(function(n){return n(t,e,o)}))||function(t,e){var n=t.state.doc;if(-1==e)return!!n.inlineContent&&(Xt(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)Xt(t,r.TextSelection.create(n,a+1,a+1+s.content.size),"pointer");else{if(!r.NodeSelection.isSelectable(s))continue;Xt(t,r.NodeSelection.create(n,a),"pointer")}return!0}}(t,n)}function ee(t){return ae(t)}Ut.keydown=function(t,e){t.shiftKey=16==e.keyCode||e.shiftKey,oe(t,e)||(t.lastKeyCode=e.keyCode,t.lastKeyCodeTime=Date.now(),t.someProp("handleKeyDown",(function(n){return n(t,e)}))||wt(t,e)?e.preventDefault():Wt(t,"key"))},Ut.keyup=function(t,e){16==e.keyCode&&(t.shiftKey=!1)},Ut.keypress=function(t,e){if(!(oe(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 ne=s.mac?"metaKey":"ctrlKey";Ht.mousedown=function(t,e){t.shiftKey=e.shiftKey;var n=ee(t),r=Date.now(),o="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[ne]&&("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(Gt(e));i&&("singleClick"==o?t.mouseDown=new re(t,i,e,n):("doubleClick"==o?Qt:te)(t,i.pos,i.inside,e)?e.preventDefault():Wt(t,"pointer"))};var re=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[ne],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,p=u?t.docView.nearestDesc(u,!0):null;this.target=p?p.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)),Wt(t,"pointer")};function oe(t,e){return!!t.composing||!!(s.safari&&Math.abs(e.timeStamp-t.compositionEndedAt)<500)&&(t.compositionEndedAt=-2e8,!0)}re.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},re.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(Gt(t))),this.allowDefault||!e?Wt(this.view,"pointer"):Yt(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)?Wt(this.view,"pointer"):(Xt(this.view,r.Selection.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault())}},re.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),Wt(this.view,"pointer")},Ht.touchdown=function(t){ee(t),Wt(t,"pointer")},Ht.contextmenu=function(t){return ee(t)};var ie=s.android?5e3:-1;function se(t,e){clearTimeout(t.composingTimeout),e>-1&&(t.composingTimeout=setTimeout((function(){return ae(t)}),e))}function ae(t,e){for(t.composing=!1;t.compositionNodes.length>0;)t.compositionNodes.pop().markParentsDirty();return!(!e&&!t.docView.dirty)&&(t.updateState(t.state),!0)}Ut.compositionstart=Ut.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(),ae(t,!0),t.markCursor=null;else if(ae(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}se(t,ie)},Ut.compositionend=function(t,e){t.composing&&(t.composing=!1,t.compositionEndedAt=e.timeStamp,se(t,20))};var ce=s.ie&&s.ie_version<15||s.ios&&s.webkit_version<604;function le(t,e,n,r){var i=Rt(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=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(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"))}}Ht.copy=Ut.cut=function(t,e){var n=t.state.selection,r="cut"==e.type;if(!n.empty){var o=ce?null:e.clipboardData,i=Nt(t,n.content()),s=i.dom,a=i.text;o?(e.preventDefault(),o.clearData(),o.setData("text/html",s.innerHTML),o.setData("text/plain",a)):function(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)}(t,s),r&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Ut.paste=function(t,e){var n=ce?null:e.clipboardData,r=n&&n.getData("text/html"),o=n&&n.getData("text/plain");n&&(r||o||n.files.length)?(le(t,o,r,e),e.preventDefault()):function(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?le(t,o.value,null,e):le(t,o.textContent,o.innerHTML,e)}),50)}(t,e)};var ue=function(t,e){this.slice=t,this.move=e},pe=s.mac?"altKey":"ctrlKey";for(var fe in Ht.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(Gt(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=Nt(t,a),l=c.dom,u=c.text;e.dataTransfer.clearData(),e.dataTransfer.setData(ce?"Text":"text/html",l.innerHTML),ce||e.dataTransfer.setData("text/plain",u),t.dragging=new ue(a,!e[pe])}},Ht.dragend=function(t){window.setTimeout((function(){return t.dragging=null}),50)},Ut.dragover=Ut.dragenter=function(t,e){return e.preventDefault()},Ut.drop=function(t,e){var n=t.dragging;if(t.dragging=null,e.dataTransfer){var o=t.posAtCoords(Gt(e));if(o){var s=t.state.doc.resolve(o.pos);if(s){var a=n&&n.slice||Rt(t,e.dataTransfer.getData(ce?"Text":"text/plain"),ce?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.h)(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),p=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,f=l.doc;if(p?l.replaceRangeWith(u,u,a.content.firstChild):l.replaceRange(u,u,a),!l.doc.eq(f)){var h=l.doc.resolve(u);p&&r.NodeSelection.isSelectable(a.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(a.content.firstChild)?l.setSelection(new r.NodeSelection(h)):l.setSelection(At(t,h,l.doc.resolve(l.mapping.map(c)))),t.focus(),t.dispatch(l.setMeta("uiEvent","drop"))}}}}}},Ht.focus=function(t){t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0)},Ht.blur=function(t){t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),t.domObserver.currentSelection.set({}),t.focused=!1)},Ht.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,k(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)}},Ut)Ht[fe]=Ut[fe];function he(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 de=function(t,e){this.spec=e||we,this.side=this.spec.side||0,this.toDOM=t};de.prototype.map=function(t,e,n,r){var o=t.mapResult(e.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new ge(i-n,i-n,this)},de.prototype.valid=function(){return!0},de.prototype.eq=function(t){return this==t||t instanceof de&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&he(this.spec,t.spec))};var me=function(t,e){this.spec=e||we,this.attrs=t};me.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 ge(o,i,this)},me.prototype.valid=function(t,e){return e.from=t&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(var a=0;at){var c=this.children[a]+1;this.children[a+2].findInner(t-c,e-c,n,r+c,o)}},ke.prototype.map=function(t,e,n){return this==xe||0==t.maps.length?this:this.mapInner(t,e,0,0,n||we)},ke.prototype.mapInner=function(t,e,n,r,o){for(var i,s=0;sc+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=r.content.size){u=!0;continue}var d=n.map(t[p+1]+i,-1)-o,m=r.content.findIndex(h),v=m.index,g=m.offset,y=r.maybeChild(v);if(y&&g==h&&g+y.nodeSize==d){var b=a[p+2].mapInner(n,y,f+1,a[p]+i+1,s);b!=xe?(a[p]=h,a[p+1]=d,a[p+2]=b):(a[p+1]=-2,u=!0)}else u=!0}if(u){var w=Oe(function(t,e,n,r,o,i,s){function a(t,e){for(var i=0;is&&l.to=t){this.children[o]==t&&(n=this.children[o+2]);break}for(var i=t+1,s=i+e.content.size,a=0;ai&&c.type instanceof me){var l=Math.max(i,c.from)-i,u=Math.min(s,c.to)-i;ln&&s.to0;)e++;t.splice(e,0,n)}function Te(t){var e=[];return t.someProp("decorations",(function(n){var r=n(t.state);r&&r!=xe&&e.push(r)})),t.cursorWrapper&&e.push(ke.create(t.state.doc,[t.cursorWrapper.deco])),Ce.from(e)}Ce.prototype.forChild=function(t,e){if(e.isLeaf)return ke.empty;for(var n=[],r=0;ro.scrollToSelection?"to selection":"preserve",C=i||!this.docView.matchesNode(t.doc,k,w),O=C||!t.selection.eq(o.selection),M="preserve"==x&&O&&null==this.dom.style.overflowAnchor&&function(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=o-20){e=a,n=c.top;break}}}return{refDOM:e,refTop:n,stack:_(t.dom)}}(this);if(O){this.domObserver.stop();var E=C&&(s.ie||s.chrome)&&!o.selection.empty&&!t.selection.empty&&(p=o.selection,f=t.selection,h=Math.min(p.$anchor.sharedDepth(p.head),f.$anchor.sharedDepth(f.head)),p.$anchor.node(h)!=f.$anchor.node(h));C&&(!i&&this.docView.update(t.doc,k,w,this)||(this.docView.destroy(),this.docView=J(t.doc,k,w,this.dom,this))),E||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(c=this,l=c.docView.domFromPos(c.state.selection.anchor),u=c.root.getSelection(),m(l.node,l.offset,u.anchorNode,u.anchorOffset)))?kt(this,E):(St(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(o),"reset"==x)this.dom.scrollTop=0;else if("to selection"==x){var D=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(t){return t(n)}))||(t.selection instanceof r.NodeSelection?S(this,this.docView.domAfterPos(t.selection.from).getBoundingClientRect(),D):S(this,this.coordsAtPos(t.selection.head),D))}else M&&(v=(d=M).refDOM,g=d.refTop,y=d.stack,b=v?v.getBoundingClientRect().top:0,A(y,0==b?0:b-g))},Ne.prototype.destroyPluginViews=function(){for(var t;t=this.pluginViews.pop();)t.destroy&&t.destroy()},Ne.prototype.updatePluginViews=function(t){if(t&&t.plugins==this.state.plugins)for(var e=0;e]/;t.exports=function(t){var e,n=""+t,o=r.exec(n);if(!o)return n;var i="",s=0,a=0;for(s=o.index;s=0;r--)n.step(t[r].inverted);for(var i=0;i0&&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;for(var o=t.index(),i=t.start()+n.offset,s=o+1,a=i+n.node.nodeSize;o>0&&r.isInSet(t.parent.child(o-1).marks);)o-=1,i-=t.parent.child(o).nodeSize;for(;s2&&void 0!==arguments[2]?arguments[2]:{},o=Object(r.findSelectedNodeOfType)(e)(t.selection)||Object(r.findParentNode)((function(t){return t.type===e}))(t.selection);return Object.keys(n).length&&o?o.node.hasMarkup(e,n):!!o}},377:function(t,e,n){"use strict";t.exports=n(422)},378:function(t,e){t.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},379:function(t,e,n){"use strict";function r(){this.__rules__=[],this.__cache__=null}r.prototype.__find__=function(t){for(var e=0;e=0&&(n=this.attrs[e][1]),n},r.prototype.attrJoin=function(t,e){var n=this.attrIndex(t);n<0?this.attrPush([t,e]):this.attrs[n][1]=this.attrs[n][1]+" "+e},t.exports=r},400: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),p=s&&+s[1]<57||c&&l,f=0;f<10;f++)r[48+f]=r[96+f]=String(f);for(f=1;f<=24;f++)r[f+111]="F"+f;for(f=65;f<=90;f++)r[f]=String.fromCharCode(f+32),i[f]=String.fromCharCode(f);for(var h in r)i.hasOwnProperty(h)||(i[h]=r[h]);var d=function(t){var e=!(p&&(t.ctrlKey||t.altKey||t.metaKey)||(a||u)&&t.shiftKey&&t.key&&1==t.key.length)&&t.key||(t.shiftKey?i:r)[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},m=n(168);n.d(e,"a",(function(){return w})),n.d(e,"b",(function(){return b}));var v="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;ar&&(i+=l.attrs.colspan)}for(var u=0;u1&&(n=!0)}-1==e?e=i:e!=i&&(e=Math.max(e,i))}return e}(t),n=t.childCount,r=[],o=0,i=null,s=[],a=0,c=e*n;a=n){(i||(i=[])).push({type:"overlong_rowspan",pos:u,n:y-w});break}for(var k=o+w*e,x=0;x0;e--)if("row"==t.node(e).type.spec.tableRole)return t.node(0).resolve(t.before(e+1));return null}function y(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 b(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:g(e.$head)||function(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)}}(e.$head)}function w(t){return"row"==t.parent.type.spec.tableRole&&t.nodeAfter}function k(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function x(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function C(t){return d.get(t.node(-1)).findCell(t.pos-t.start(-1))}function S(t){return d.get(t.node(-1)).colCount(t.pos-t.start(-1))}function _(t,e,n){var r=t.start(-1),o=d.get(t.node(-1)).nextCell(t.pos-r,e,n);return null==o?null:t.node(0).resolve(r+o)}function A(t,e,n){var r={};for(var o in t)r[o]=t[o];return r[e]=n,r}function O(t,e,n){void 0===n&&(n=1);var r=A(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 M(t,e,n){void 0===n&&(n=1);var r=A(t,"colspan",t.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(var o=0;o0||v>0){var g=h.attrs;m>0&&(g=O(g,0,m)),v>0&&(g=O(g,g.colspan-v,v)),h=f.leftr.bottom){var y=A(h.attrs,"rowspan",Math.min(f.bottom,r.bottom)-Math.max(f.top,r.top));h=f.top0)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=d.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.bottom0&&(n=a.resolve(o+r.map[s.left])),i.bottom0)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=d.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.right0&&(n=a.resolve(o+r.map[s.top*r.width])),i.right0&&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=0;i--)for(var a=o.child(i).attrs,c=a.rowspan,l=a.colspan,u=r;u=e.length&&e.push(s.Fragment.empty),n[h]e&&(d=d.type.create(O(d.attrs,d.attrs.colspan,f+d.attrs.colspan-e),d.content)),p.push(d),f+=d.attrs.colspan;for(var m=1;mn&&(x=x.type.create(A(x.attrs,"rowspan",n-x.attrs.rowspan),x.content)),b.push(x)}v.push(s.Fragment.from(b))}i=v,o=n}return{width:r,height:o,rows:i}}function L(t,e,n,r,o,i,s,a){if(0==s||s==e.height)return!1;for(var c=!1,l=o;le.width)for(var p=0,f=0;pe.height){for(var g=[],y=0,b=(e.height-1)*e.width;y=e.width)&&n.nodeAt(e.map[b+y]).type==u.header_cell;g.push(w?l||(l=u.header_cell.createAndFill()):c||(c=u.cell.createAndFill()))}for(var k=u.row.create(null,s.Fragment.from(g)),x=[],C=e.height;C=0;o--){var s=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:s.childCount))return null;if("cell"==s.type.spec.tableRole||"header_cell"==s.type.spec.tableRole){var a=r.before(o),c="vert"==e?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(c)?a:null}}return null}function X(t,e){for(;e&&e!=t.dom;e=e.parentNode)if("TD"==e.nodeName||"TH"==e.nodeName)return e}function Y(t,e){var n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?g(t.state.doc.resolve(n.pos)):null}var Q=new i.PluginKey("fix-tables");function tt(t,e){var n,r=function(e,r){"table"==e.type.spec.tableRole&&(n=function(t,e,n,r){var o=d.get(e);if(!o.problems)return r;r||(r=t.tr);for(var i,s,a=[],c=0;c0){var x="cell";b.firstChild&&(x=b.firstChild.type.spec.tableRole);for(var C=[],S=0;S0?-1:0;(function(t,e,n){for(var r=z(e.type.schema).header_cell,o=0;o0&&n0&&r.map[c-1]==l||n0?-1:0;at(r,i,n+l)&&(l=0==n||n==r.height?null:0);for(var u=0,p=r.width*n;u0&&n0&&f==r.map[p-r.width]){var h=o.nodeAt(f).attrs;t.setNodeMarkup(t.mapping.slice(l).map(f+i),null,A(h,"rowspan",h.rowspan-1)),u+=h.colspan-1}else if(n0&&o[s]==o[s-1]||e.right0&&o[i]==o[i-n]||e.bottom0;e--){var n=t.node(e).type.spec.tableRole;if("cell"===n||"header_cell"===n)return t.node(e)}return null}(i.$from)))return!1;o=g(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=A(s,"rowspan",1)),s.colspan>1&&(s=A(s,"colspan",1));for(var l,u=et(e),p=e.tr,f=0;f=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()0;r--){if("table"==n.node(r).type.spec.tableRole)return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0}return!1}var _t=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")),At(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))};function At(t,e,n,r,o,i){for(var s=0,a=!0,c=e.firstChild,l=t.firstChild,u=0,p=0;u-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(t,n){!function(t,e,n,r,o){var i=Ot.getState(t.state);if(!i.dragging){var s=function(t){for(;t&&"TD"!=t.nodeName&&"TH"!=t.nodeName;)t=t.classList.contains("ProseMirror")?null:t.parentNode;return t}(e.target),a=-1;if(s){var c=s.getBoundingClientRect(),l=c.left,u=c.right;e.clientX-l<=n?a=Dt(t,e,"left"):u-e.clientX<=n&&(a=Dt(t,e,"right"))}if(a!=i.activeHandle){if(!o&&-1!==a){var p=t.state.doc.resolve(a),f=p.node(-1),h=d.get(f),m=p.start(-1);if(h.colCount(p.pos-m)+p.nodeAfter.attrs.colspan-1==h.width-1)return}Nt(t,a)}}}(t,n,e,0,o)},mouseleave:function(t){!function(t){var e=Ot.getState(t.state);e.activeHandle>-1&&!e.dragging&&Nt(t,-1)}(t)},mousedown:function(t,e){!function(t,e,n){var r=Ot.getState(t.state);if(-1==r.activeHandle||r.dragging)return!1;var o=t.state.doc.nodeAt(r.activeHandle),i=function(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].offsetWidth,c=r;if(o)for(var l=0;l-1)return function(t,e){for(var n=[],r=t.doc.resolve(e),o=r.node(-1),i=d.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan,l=0;l=0&&!(e.after(i+1)=0&&!(n.before(s+1)>n.start(s));s--,o--);return r==o&&/row|table/.test(e.node(i).type.spec.tableRole)}(s)?r=i.TextSelection.create(a,s.from):s instanceof i.TextSelection&&function(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}(s)&&(r=i.TextSelection.create(a,s.$from.start(),s.$from.end()));return r&&(e||(e=t.tr)).setSelection(r),e}(r,tt(r,n),e)}})}Et.prototype.apply=function(t){var e=this,n=t.getMeta(Ot);if(n&&null!=n.setHandle)return new Et(n.setHandle,null);if(n&&void 0!==n.setDragging)return new Et(e.activeHandle,n.setDragging);if(e.activeHandle>-1&&t.docChanged){var r=t.mapping.map(e.activeHandle,-1);w(t.doc.resolve(r))||(r=null),e=new Et(r,e.dragging)}return e}},402:function(t,e,n){"use strict";t.exports=n(423)},403:function(t,e,n){"use strict";t.exports.encode=n(424),t.exports.decode=n(425),t.exports.format=n(426),t.exports.parse=n(427)},404:function(t,e){t.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},405:function(t,e){t.exports=/[\0-\x1F\x7F-\x9F]/},406:function(t,e){t.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},407:function(t,e,n){"use strict";var r="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",o="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",i=new RegExp("^(?:"+r+"|"+o+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)"),s=new RegExp("^(?:"+r+"|"+o+")");t.exports.HTML_TAG_RE=i,t.exports.HTML_OPEN_CLOSE_TAG_RE=s},408:function(t,e,n){"use strict";t.exports.tokenize=function(t,e){var n,r,o,i,s=t.pos,a=t.src.charCodeAt(s);if(e)return!1;if(126!==a)return!1;if(o=(r=t.scanDelims(t.pos,!0)).length,i=String.fromCharCode(a),o<2)return!1;for(o%2&&(t.push("text","",0).content=i,o--),n=0;n=0;e--)95!==(n=a[e]).marker&&42!==n.marker||-1!==n.end&&(r=a[n.end],s=e>0&&a[e-1].end===n.end+1&&a[e-1].token===n.token-1&&a[n.end+1].token===r.token+1&&a[e-1].marker===n.marker,i=String.fromCharCode(n.marker),(o=t.tokens[n.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?i+i:i,o.content="",(o=t.tokens[r.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?i+i:i,o.content="",s&&(t.tokens[a[e-1].token].content="",t.tokens[a[n.end+1].token].content="",e--))}},410:function(t,e){var n=!0,r=!1,o=!1;function i(t,e,n){var r=t.attrIndex(e),o=[e,n];r<0?t.attrPush(o):t.attrs[r]=o}function s(t,e){for(var n=t[e].level-1,r=e-1;r>=0;r--)if(t[r].level===n)return r;return-1}function a(t,e){return"inline"===t[e].type&&function(t){return"paragraph_open"===t.type}(t[e-1])&&function(t){return"list_item_open"===t.type}(t[e-2])&&function(t){return 0===t.content.indexOf("[ ] ")||0===t.content.indexOf("[x] ")||0===t.content.indexOf("[X] ")}(t[e])}function c(t,e){if(t.children.unshift(function(t,e){var r=new e("html_inline","",0),o=n?' disabled="" ':"";0===t.content.indexOf("[ ] ")?r.content='':0!==t.content.indexOf("[x] ")&&0!==t.content.indexOf("[X] ")||(r.content='');return r}(t,e)),t.children[1].content=t.children[1].content.slice(3),t.content=t.content.slice(3),r)if(o){t.children.pop();var i="task-item-"+Math.ceil(1e7*Math.random()-1e3);t.children[0].content=t.children[0].content.slice(0,-1)+' id="'+i+'">',t.children.push(function(t,e,n){var r=new n("html_inline","",0);return r.content='",r.attrs=[{for:e}],r}(t.content,i,e))}else t.children.unshift(function(t){var e=new t("html_inline","",0);return e.content="",e}(e))}t.exports=function(t,e){e&&(n=!e.enabled,r=!!e.label,o=!!e.labelAfter),t.core.ruler.after("inline","github-task-lists",(function(t){for(var e=t.tokens,r=2;r ",null,e,(function(){return t.renderContent(e)}))},code_block:function(t,e){t.write("```"+(e.attrs.params||"")+"\n"),t.text(e.textContent,!1),t.ensureNewLine(),t.write("```"),t.closeBlock(e)},heading:function(t,e){t.write(t.repeat("#",e.attrs.level)+" "),t.renderInline(e),t.closeBlock(e)},horizontal_rule:function(t,e){t.write(e.attrs.markup||"---"),t.closeBlock(e)},bullet_list:function(t,e){t.renderList(e," ",(function(){return(e.attrs.bullet||"*")+" "}))},ordered_list:function(t,e){var n=e.attrs.order||1,r=String(n+e.childCount-1).length,o=t.repeat(" ",r+2);t.renderList(e,o,(function(e){var o=String(n+e);return t.repeat(" ",r-o.length)+o+". "}))},list_item:function(t,e){t.renderContent(e)},paragraph:function(t,e){t.renderInline(e),t.closeBlock(e)},image:function(t,e){t.write("!["+t.esc(e.attrs.alt||"")+"]("+t.esc(e.attrs.src)+(e.attrs.title?" "+t.quote(e.attrs.title):"")+")")},hard_break:function(t,e,n,r){for(var o=r+1;o":"]("+t.esc(e.attrs.href)+(e.attrs.title?" "+t.quote(e.attrs.title):"")+")"}},code:{open:function(t,e,n,r){return m(n.child(r),-1)},close:function(t,e,n,r){return m(n.child(r-1),1)},escape:!1}});function m(t,e){var n,r=/`+/g,o=0;if(t.isText)for(;n=r.exec(t.text);)o=Math.max(o,n[0].length);for(var i=o>0&&e>0?" `":"`",s=0;s0&&e<0&&(i+=" "),i}function v(t,e,n,r){if(t.attrs.title||!/^\w+:/.test(t.attrs.href))return!1;var o=e.child(n+(r<0?-1:0));if(!o.isText||o.text!=t.attrs.href||o.marks[o.marks.length-1]!=t)return!1;if(n==(r<0?1:e.childCount-1))return!0;var i=e.child(n+(r<0?-2:1));return!t.isInSet(i.marks)}var g=function(t,e,n){this.nodes=t,this.marks=e,this.delim=this.out="",this.closed=!1,this.inTightList=!1,this.options=n||{},void 0===this.options.tightLists&&(this.options.tightLists=!1)};g.prototype.flushClose=function(t){if(this.closed){if(this.atBlank()||(this.out+="\n"),null==t&&(t=2),t>1){var e=this.delim,n=/\s+$/.exec(e);n&&(e=e.slice(0,e.length-n[0].length));for(var r=1;ry?a=a.slice(0,y).concat(g).concat(a.slice(y,v)).concat(a.slice(v+1,m)):y>v&&(a=a.slice(0,v).concat(a.slice(v+1,y)).concat(g).concat(a.slice(y,m)));continue t}}}for(var w=0;wr.relevance&&(r=i),i.relevance>n.relevance&&(r=n,n=i));return r.language&&(n.secondBest=r),n}function C(t,e){var n,r,o,i,s=t;for(n in e&&((s={})[t]=e),s)for(o=(r="string"==typeof(r=s[n])?[r]:r).length,i=-1;++i0;){if(null===(s=a.exec(i))){l+=i;break}l+=i.slice(0,s.index),i=i.slice(s.index+s[0].length),s[0][0]===g&&s[1]?l+=g+String(Number(s[1])+o):(l+=s[0],s[0]===m&&c++)}l+=v}return l}(h,d),!0),a={lastIndex:0,exec:function(n){var r,o,c,l;if(0===s.length)return null;if(e.lastIndex=a.lastIndex,!(l=e.exec(n)))return null;r=l.length,o=-1;for(;++o");return T+=s,s.length}function F(t){var e;t.className&&(e=$(t.className,[])),e&&(p.push(e),D.push(p),p=e.children),a=Object.create(t,{parent:{value:a}})}function P(){var t=a.subLanguage?function(){var t,e="string"==typeof a.subLanguage;if(e&&!w[a.subLanguage])return L(T,[]);t=e?S(a.subLanguage,T,!0,r,E[a.subLanguage]):x(T,{subset:0===a.subLanguage.length?void 0:a.subLanguage,prefix:r});if(!t.language)return[j(T)];a.relevance>0&&(N+=t.relevance);e&&(E[a.subLanguage]=t.top);return[$(t.language,t.value,!0)]}():function(){var t,e,n,r,o=[];if(!a.keywords)return L(T,o);t=0,a.lexemesRe.lastIndex=0,e=a.lexemesRe.exec(T);for(;e;)L(T.slice(t,e.index),o),(r=q(a,e))?(N+=r[1],n=$(r[0],[]),o.push(n),L(e[0],n.children)):L(e[0],o),t=a.lexemesRe.lastIndex,e=a.lexemesRe.exec(T);return L(T.slice(t),o),o}();return T="",t}function B(t,e){for(var n,r=t.length,o=-1;++o]+>|\t|)+|(?:\n)))/gm,u="",p="Could not find the language '{}', did you forget to load/include a language module?",f={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},h="of and for in not or if then".split(" ");function d(t){return t.replace(/&/g,"&").replace(//g,">")}function m(t){return t.nodeName.toLowerCase()}function v(t){return a.test(t)}function g(t){var e,n={},r=Array.prototype.slice.call(arguments,1);for(e in t)n[e]=t[e];return r.forEach((function(t){for(e in t)n[e]=t[e]})),n}function y(t){var e=[];return function t(n,r){for(var o=n.firstChild;o;o=o.nextSibling)3===o.nodeType?r+=o.nodeValue.length:1===o.nodeType&&(e.push({event:"start",offset:r,node:o}),r=t(o,r),m(o).match(/br|hr|img|input/)||e.push({event:"stop",offset:r,node:o}));return r}(t,0),e}function b(t){return t.variants&&!t.cached_variants&&(t.cached_variants=t.variants.map((function(e){return g(t,{variants:null},e)}))),t.cached_variants?t.cached_variants:function t(e){return!!e&&(e.endsWithParent||t(e.starts))}(t)?[g(t,{starts:t.starts?g(t.starts):null})]:Object.isFrozen(t)?[g(t)]:[t]}function w(t){if(e&&!t.langApiRestored){for(var n in t.langApiRestored=!0,e)t[n]&&(t[e[n]]=t[n]);(t.contains||[]).concat(t.variants||[]).forEach(w)}}function k(t,e){return e?Number(e):(n=t,-1!=h.indexOf(n.toLowerCase())?0:1);var n}function x(t){function e(t){return t&&t.source||t}function n(n,r){return new RegExp(e(n),"m"+(t.case_insensitive?"i":"")+(r?"g":""))}function o(t){var r,o,i={},s=[],a={},c=1;function l(t,e){i[c]=t,s.push([t,e]),c+=function(t){return new RegExp(t.toString()+"|").exec("").length-1}(e)+1}for(var u=0;u0&&(i+=n),i+="(";c.length>0;){var l=r.exec(c);if(null==l){i+=c;break}i+=c.substring(0,l.index),c=c.substring(l.index+l[0].length),"\\"==l[0][0]&&l[1]?i+="\\"+String(Number(l[1])+a):(i+=l[0],"("==l[0]&&o++)}i+=")"}return i}(p,"|"),!0),a.lastIndex=0,a.exec=function(e){var n;if(0===s.length)return null;r.lastIndex=a.lastIndex;var o=r.exec(e);if(!o)return null;for(var c=0;c')+e+(n?"":u)}function c(){_+=null!=w.subLanguage?function(){var t="string"==typeof w.subLanguage;if(t&&!o[w.subLanguage])return d(A);var e=t?C(w.subLanguage,A,!0,k[w.subLanguage]):S(A,w.subLanguage.length?w.subLanguage:void 0);return w.relevance>0&&(O+=e.relevance),t&&(k[w.subLanguage]=e.top),a(e.language,e.value,!1,!0)}():function(){var t,e,n,r;if(!w.keywords)return d(A);for(r="",e=0,w.lexemesRe.lastIndex=0,n=w.lexemesRe.exec(A);n;)r+=d(A.substring(e,n.index)),(t=i(w,n))?(O+=t[1],r+=a(t[0],d(n[0]))):r+=d(n[0]),e=w.lexemesRe.lastIndex,n=w.lexemesRe.exec(A);return r+d(A.substr(e))}(),A=""}function l(t){_+=t.className?a(t.className,"",!0):"",w=Object.create(t,{parent:{value:w}})}function h(t){var e=t[0],n=t.rule;return n&&n.endSameAsBegin&&(n.endRe=function(t){return new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}(e)),n.skip?A+=e:(n.excludeBegin&&(A+=e),c(),n.returnBegin||n.excludeBegin||(A=e)),l(n),n.returnBegin?0:e.length}function m(t){var n=t[0],r=e.substr(t.index),o=function t(e,n){if(function(t,e){var n=t&&t.exec(e);return n&&0===n.index}(e.endRe,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}if(e.endsWithParent)return t(e.parent,n)}(w,r);if(o){var i=w;i.skip?A+=n:(i.returnEnd||i.excludeEnd||(A+=n),c(),i.excludeEnd&&(A=n));do{w.className&&(_+=u),w.skip||w.subLanguage||(O+=w.relevance),w=w.parent}while(w!==o.parent);return o.starts&&(o.endSameAsBegin&&(o.starts.endRe=o.endRe),l(o.starts)),i.returnEnd?0:n.length}}var v={};function g(t,r){var o=r&&r[0];if(A+=t,null==o)return c(),0;if("begin"==v.type&&"end"==r.type&&v.index==r.index&&""===o)return A+=e.slice(r.index,r.index+1),1;if(v=r,"begin"===r.type)return h(r);if("illegal"===r.type&&!n)throw new Error('Illegal lexeme "'+o+'" for mode "'+(w.className||"")+'"');if("end"===r.type){var i=m(r);if(null!=i)return i}return A+=o,o.length}var y=E(t);if(!y)throw console.error(p.replace("{}",t)),new Error('Unknown language: "'+t+'"');x(y);var b,w=r||y,k={},_="";for(b=w;b!==y;b=b.parent)b.className&&(_=a(b.className,"",!0)+_);var A="",O=0;try{for(var M,D,T=0;w.terminators.lastIndex=T,M=w.terminators.exec(e);)D=g(e.substring(T,M.index),M),T=M.index+D;for(g(e.substr(T)),b=w;b.parent;b=b.parent)b.className&&(_+=u);return{relevance:O,value:_,illegal:!1,language:t,top:w}}catch(n){if(n.message&&-1!==n.message.indexOf("Illegal"))return{illegal:!0,relevance:0,value:d(e)};if(s)return{relevance:0,value:d(e),language:t,top:w,errorRaised:n};throw n}}function S(t,e){e=e||f.languages||r(o);var n={relevance:0,value:d(t)},i=n;return e.filter(E).filter(D).forEach((function(e){var r=C(e,t,!1);r.language=e,r.relevance>i.relevance&&(i=r),r.relevance>n.relevance&&(i=n,n=r)})),i.language&&(n.second_best=i),n}function _(t){return f.tabReplace||f.useBR?t.replace(l,(function(t,e){return f.useBR&&"\n"===t?"
":f.tabReplace?e.replace(/\t/g,f.tabReplace):""})):t}function A(t){var e,r,o,s,a,l=function(t){var e,n,r,o,i=t.className+" ";if(i+=t.parentNode?t.parentNode.className:"",n=c.exec(i)){var s=E(n[1]);return s||(console.warn(p.replace("{}",n[1])),console.warn("Falling back to no-highlight mode for this block.",t)),s?n[1]:"no-highlight"}for(e=0,r=(i=i.split(/\s+/)).length;e/g,"\n"):e=t,a=e.textContent,o=l?C(l,a,!0):S(a),(r=y(e)).length&&((s=document.createElement("div")).innerHTML=o.value,o.value=function(t,e,r){var o=0,i="",s=[];function a(){return t.length&&e.length?t[0].offset!==e[0].offset?t[0].offset"}function l(t){i+=""}function u(t){("start"===t.event?c:l)(t.node)}for(;t.length||e.length;){var p=a();if(i+=d(r.substring(o,p[0].offset)),o=p[0].offset,p===t){s.reverse().forEach(l);do{u(p.splice(0,1)[0]),p=a()}while(p===t&&p.length&&p[0].offset===o);s.reverse().forEach(c)}else"start"===p[0].event?s.push(p[0].node):s.pop(),u(p.splice(0,1)[0])}return i+d(r.substr(o))}(r,y(s),a)),o.value=_(o.value),t.innerHTML=o.value,t.className=function(t,e,n){var r=e?i[e]:n,o=[t.trim()];return t.match(/\bhljs\b/)||o.push("hljs"),-1===t.indexOf(r)&&o.push(r),o.join(" ").trim()}(t.className,l,o.language),t.result={language:o.language,re:o.relevance},o.second_best&&(t.second_best={language:o.second_best.language,re:o.second_best.relevance}))}function O(){if(!O.called){O.called=!0;var t=document.querySelectorAll("pre code");n.forEach.call(t,A)}}var M={disableAutodetect:!0};function E(t){return t=(t||"").toLowerCase(),o[t]||o[i[t]]}function D(t){var e=E(t);return e&&!e.disableAutodetect}return t.highlight=C,t.highlightAuto=S,t.fixMarkup=_,t.highlightBlock=A,t.configure=function(t){f=g(f,t)},t.initHighlighting=O,t.initHighlightingOnLoad=function(){window.addEventListener("DOMContentLoaded",O,!1),window.addEventListener("load",O,!1)},t.registerLanguage=function(e,n){var r;try{r=n(t)}catch(t){if(console.error("Language definition for '{}' could not be registered.".replace("{}",e)),!s)throw t;console.error(t),r=M}o[e]=r,w(r),r.rawDefinition=n.bind(null,t),r.aliases&&r.aliases.forEach((function(t){i[t]=e}))},t.listLanguages=function(){return r(o)},t.getLanguage=E,t.requireLanguage=function(t){var e=E(t);if(e)return e;throw new Error("The '{}' language is required, but not loaded.".replace("{}",t))},t.autoDetection=D,t.inherit=g,t.debugMode=function(){s=!1},t.IDENT_RE="[a-zA-Z]\\w*",t.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",t.NUMBER_RE="\\b\\d+(\\.\\d+)?",t.C_NUMBER_RE="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",t.BINARY_NUMBER_RE="\\b(0b[01]+)",t.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",t.BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},t.APOS_STRING_MODE={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},t.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},t.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},t.COMMENT=function(e,n,r){var o=t.inherit({className:"comment",begin:e,end:n,contains:[]},r||{});return o.contains.push(t.PHRASAL_WORDS_MODE),o.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|XXX):",relevance:0}),o},t.C_LINE_COMMENT_MODE=t.COMMENT("//","$"),t.C_BLOCK_COMMENT_MODE=t.COMMENT("/\\*","\\*/"),t.HASH_COMMENT_MODE=t.COMMENT("#","$"),t.NUMBER_MODE={className:"number",begin:t.NUMBER_RE,relevance:0},t.C_NUMBER_MODE={className:"number",begin:t.C_NUMBER_RE,relevance:0},t.BINARY_NUMBER_MODE={className:"number",begin:t.BINARY_NUMBER_RE,relevance:0},t.CSS_NUMBER_MODE={className:"number",begin:t.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},t.REGEXP_MODE={className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[t.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[t.BACKSLASH_ESCAPE]}]},t.TITLE_MODE={className:"title",begin:t.IDENT_RE,relevance:0},t.UNDERSCORE_TITLE_MODE={className:"title",begin:t.UNDERSCORE_IDENT_RE,relevance:0},t.METHOD_GUARD={begin:"\\.\\s*"+t.UNDERSCORE_IDENT_RE,relevance:0},[t.BACKSLASH_ESCAPE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,t.PHRASAL_WORDS_MODE,t.COMMENT,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.HASH_COMMENT_MODE,t.NUMBER_MODE,t.C_NUMBER_MODE,t.BINARY_NUMBER_MODE,t.CSS_NUMBER_MODE,t.REGEXP_MODE,t.TITLE_MODE,t.UNDERSCORE_TITLE_MODE,t.METHOD_GUARD].forEach((function(t){!function t(e){Object.freeze(e);var n="function"==typeof e;return Object.getOwnPropertyNames(e).forEach((function(r){!e.hasOwnProperty(r)||null===e[r]||"object"!=typeof e[r]&&"function"!=typeof e[r]||n&&("caller"===r||"callee"===r||"arguments"===r)||Object.isFrozen(e[r])||t(e[r])})),e}(t)})),t},i="object"==typeof window&&window||"object"==typeof self&&self,e.nodeType?i&&(i.hljs=o({}),void 0===(r=function(){return i.hljs}.apply(e,[]))||(t.exports=r)):o(e)},420:function(t,e,n){"use strict";var r=n(421),o=i(Error);function i(t){return e.displayName=t.displayName||t.name,e;function e(e){return e&&(e=r.apply(null,arguments)),new t(e)}}t.exports=o,o.eval=i(EvalError),o.range=i(RangeError),o.reference=i(ReferenceError),o.syntax=i(SyntaxError),o.type=i(TypeError),o.uri=i(URIError),o.create=i},421:function(t,e,n){!function(){var e;function n(t){for(var e,n,r,o,i=1,s=[].slice.call(arguments),a=0,c=t.length,l="",u=!1,p=!1,f=function(){return s[i++]},h=function(){for(var n="";/\d/.test(t[a]);)n+=t[a++],e=t[a];return n.length>0?parseInt(n):null};a=0))try{e.hostname=p.toASCII(e.hostname)}catch(t){}return u.encode(u.format(e))}function y(t){var e=u.parse(t,!0);if(e.hostname&&(!e.protocol||v.indexOf(e.protocol)>=0))try{e.hostname=p.toUnicode(e.hostname)}catch(t){}return u.decode(u.format(e))}function b(t,e){if(!(this instanceof b))return new b(t,e);e||r.isString(t)||(e=t||{},t="default"),this.inline=new c,this.block=new a,this.core=new s,this.renderer=new i,this.linkify=new l,this.validateLink=m,this.normalizeLink=g,this.normalizeLinkText=y,this.utils=r,this.helpers=r.assign({},o),this.options={},this.configure(t),e&&this.set(e)}b.prototype.set=function(t){return r.assign(this.options,t),this},b.prototype.configure=function(t){var e,n=this;if(r.isString(t)&&!(t=f[e=t]))throw new Error('Wrong `markdown-it` preset "'+e+'", check name');if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&n.set(t.options),t.components&&Object.keys(t.components).forEach((function(e){t.components[e].rules&&n[e].ruler.enableOnly(t.components[e].rules),t.components[e].rules2&&n[e].ruler2.enableOnly(t.components[e].rules2)})),this},b.prototype.enable=function(t,e){var n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){n=n.concat(this[e].ruler.enable(t,!0))}),this),n=n.concat(this.inline.ruler2.enable(t,!0));var r=t.filter((function(t){return n.indexOf(t)<0}));if(r.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},b.prototype.disable=function(t,e){var n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){n=n.concat(this[e].ruler.disable(t,!0))}),this),n=n.concat(this.inline.ruler2.disable(t,!0));var r=t.filter((function(t){return n.indexOf(t)<0}));if(r.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},b.prototype.use=function(t){var e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},b.prototype.parse=function(t,e){if("string"!=typeof t)throw new Error("Input data should be a String");var n=new this.core.State(t,this,e);return this.core.process(n),n.tokens},b.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},b.prototype.parseInline=function(t,e){var n=new this.core.State(t,this,e);return n.inlineMode=!0,this.core.process(n),n.tokens},b.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)},t.exports=b},423:function(t){t.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')},424:function(t,e,n){"use strict";var r={};function o(t,e,n){var i,s,a,c,l,u="";for("string"!=typeof e&&(n=e,e=o.defaultChars),void 0===n&&(n=!0),l=function(t){var e,n,o=r[t];if(o)return o;for(o=r[t]=[],e=0;e<128;e++)n=String.fromCharCode(e),/^[0-9a-z]$/i.test(n)?o.push(n):o.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2));for(e=0;e=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1=56320&&c<=57343){u+=encodeURIComponent(t[i]+t[i+1]),i++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(t[i]);return u}o.defaultChars=";/?:@&=+$,-_.!~*'()#",o.componentChars="-_.!~*'()",t.exports=o},425:function(t,e,n){"use strict";var r={};function o(t,e){var n;return"string"!=typeof e&&(e=o.defaultChars),n=function(t){var e,n,o=r[t];if(o)return o;for(o=r[t]=[],e=0;e<128;e++)n=String.fromCharCode(e),o.push(n);for(e=0;e=55296&&c<=57343?"���":String.fromCharCode(c),e+=6):240==(248&o)&&e+91114111?l+="����":(c-=65536,l+=String.fromCharCode(55296+(c>>10),56320+(1023&c))),e+=9):l+="�";return l}))}o.defaultChars=";/?:@&=+$,#",o.componentChars="",t.exports=o},426:function(t,e,n){"use strict";t.exports=function(t){var e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&-1!==t.hostname.indexOf(":")?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||""}},427:function(t,e,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var o=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,a=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(a),l=["%","/","?",";","#"].concat(c),u=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},d={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};r.prototype.parse=function(t,e){var n,r,i,a,c,m=t;if(m=m.trim(),!e&&1===t.split("#").length){var v=s.exec(m);if(v)return this.pathname=v[1],v[2]&&(this.search=v[2]),this}var g=o.exec(m);if(g&&(i=(g=g[0]).toLowerCase(),this.protocol=g,m=m.substr(g.length)),(e||g||m.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(c="//"===m.substr(0,2))||g&&h[g]||(m=m.substr(2),this.slashes=!0)),!h[g]&&(c||g&&!d[g])){var y,b,w=-1;for(n=0;n127?_+="x":_+=S[A];if(!_.match(p)){var M=C.slice(0,n),E=C.slice(n+1),D=S.match(f);D&&(M.push(D[1]),E.unshift(D[2])),E.length&&(m=E.join(".")+m),this.hostname=M.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var T=m.indexOf("#");-1!==T&&(this.hash=m.substr(T),m=m.slice(0,T));var N=m.indexOf("?");return-1!==N&&(this.search=m.substr(N),m=m.slice(0,N)),m&&(this.pathname=m),d[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},r.prototype.parseHost=function(t){var e=i.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},t.exports=function(t,e){if(t&&t instanceof r)return t;var n=new r;return n.parse(t,e),n}},428:function(t,e,n){"use strict";e.Any=n(404),e.Cc=n(405),e.Cf=n(429),e.P=n(378),e.Z=n(406)},429:function(t,e){t.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},430:function(t,e,n){"use strict";e.parseLinkLabel=n(431),e.parseLinkDestination=n(432),e.parseLinkTitle=n(433)},431:function(t,e,n){"use strict";t.exports=function(t,e,n){var r,o,i,s,a=-1,c=t.posMax,l=t.pos;for(t.pos=e+1,r=1;t.pos=n)return c;if(34!==(i=t.charCodeAt(e))&&39!==i&&40!==i)return c;for(e++,40===i&&(i=41);e"+i(t[e].content)+""},s.code_block=function(t,e,n,r,o){var s=t[e];return""+i(t[e].content)+"\n"},s.fence=function(t,e,n,r,s){var a,c,l,u,p=t[e],f=p.info?o(p.info).trim():"",h="";return f&&(h=f.split(/\s+/g)[0]),0===(a=n.highlight&&n.highlight(p.content,h)||i(p.content)).indexOf(""+a+"\n"):"
"+a+"
\n"},s.image=function(t,e,n,r,o){var i=t[e];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(t,e,n)},s.hardbreak=function(t,e,n){return n.xhtmlOut?"
\n":"
\n"},s.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut?"
\n":"
\n":"\n"},s.text=function(t,e){return i(t[e].content)},s.html_block=function(t,e){return t[e].content},s.html_inline=function(t,e){return t[e].content},a.prototype.renderAttrs=function(t){var e,n,r;if(!t.attrs)return"";for(r="",e=0,n=t.attrs.length;e\n":">")},a.prototype.renderInline=function(t,e,n){for(var r,o="",i=this.rules,s=0,a=t.length;s/i.test(t)}t.exports=function(t){var e,n,i,s,a,c,l,u,p,f,h,d,m,v,g,y,b,w,k=t.tokens;if(t.md.options.linkify)for(n=0,i=k.length;n=0;e--)if("link_close"!==(c=s[e]).type){if("html_inline"===c.type&&(w=c.content,/^\s]/i.test(w)&&m>0&&m--,o(c.content)&&m++),!(m>0)&&"text"===c.type&&t.md.linkify.test(c.content)){for(p=c.content,b=t.md.linkify.match(p),l=[],d=c.level,h=0,u=0;uh&&((a=new t.Token("text","",0)).content=p.slice(h,f),a.level=d,l.push(a)),(a=new t.Token("link_open","a",1)).attrs=[["href",g]],a.level=d++,a.markup="linkify",a.info="auto",l.push(a),(a=new t.Token("text","",0)).content=y,a.level=d,l.push(a),(a=new t.Token("link_close","a",-1)).level=--d,a.markup="linkify",a.info="auto",l.push(a),h=b[u].lastIndex);h=0;e--)"text"!==(n=t[e]).type||r||(n.content=n.content.replace(i,a)),"link_open"===n.type&&"auto"===n.info&&r--,"link_close"===n.type&&"auto"===n.info&&r++}function l(t){var e,n,o=0;for(e=t.length-1;e>=0;e--)"text"!==(n=t[e]).type||o||r.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2")),"link_open"===n.type&&"auto"===n.info&&o--,"link_close"===n.type&&"auto"===n.info&&o++}t.exports=function(t){var e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)"inline"===t.tokens[e].type&&(o.test(t.tokens[e].content)&&c(t.tokens[e].children),r.test(t.tokens[e].content)&&l(t.tokens[e].children))}},441:function(t,e,n){"use strict";var r=n(166).isWhiteSpace,o=n(166).isPunctChar,i=n(166).isMdAsciiPunct,s=/['"]/,a=/['"]/g,c="’";function l(t,e,n){return t.substr(0,e)+n+t.substr(e+1)}function u(t,e){var n,s,u,p,f,h,d,m,v,g,y,b,w,k,x,C,S,_,A,O,M;for(A=[],n=0;n=0&&!(A[S].level<=d);S--);if(A.length=S+1,"text"===s.type){f=0,h=(u=s.content).length;t:for(;f=0)v=u.charCodeAt(p.index-1);else for(S=n-1;S>=0&&("softbreak"!==t[S].type&&"hardbreak"!==t[S].type);S--)if("text"===t[S].type){v=t[S].content.charCodeAt(t[S].content.length-1);break}if(g=32,f=48&&v<=57&&(C=x=!1),x&&C&&(x=!1,C=b),x||C){if(C)for(S=A.length-1;S>=0&&(m=A[S],!(A[S].level=0;e--)"inline"===t.tokens[e].type&&s.test(t.tokens[e].content)&&u(t.tokens[e].children,t)}},442:function(t,e,n){"use strict";var r=n(380);function o(t,e,n){this.src=t,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=e}o.prototype.Token=r,t.exports=o},443:function(t,e,n){"use strict";var r=n(379),o=[["table",n(444),["paragraph","reference"]],["code",n(445)],["fence",n(446),["paragraph","reference","blockquote","list"]],["blockquote",n(447),["paragraph","reference","blockquote","list"]],["hr",n(448),["paragraph","reference","blockquote","list"]],["list",n(449),["paragraph","reference","blockquote"]],["reference",n(450)],["heading",n(451),["paragraph","reference","blockquote"]],["lheading",n(452)],["html_block",n(453),["paragraph","reference","blockquote"]],["paragraph",n(455)]];function i(){this.ruler=new r;for(var t=0;t=n))&&!(t.sCount[s]=c){t.line=n;break}for(r=0;rn)return!1;if(p=e+1,t.sCount[p]=4)return!1;if((l=t.bMarks[p]+t.tShift[p])>=t.eMarks[p])return!1;if(124!==(a=t.src.charCodeAt(l++))&&45!==a&&58!==a)return!1;for(;l=4)return!1;if((h=(f=i(c.replace(/^\||\|$/g,""))).length)>m.length)return!1;if(s)return!0;for((d=t.push("table_open","table",1)).map=g=[e,0],(d=t.push("thead_open","thead",1)).map=[e,e+1],(d=t.push("tr_open","tr",1)).map=[e,e+1],u=0;u=4);p++){for(f=i(c.replace(/^\||\|$/g,"")),d=t.push("tr_open","tr",1),u=0;u=4))break;o=++r}return t.line=o,(i=t.push("code_block","code",0)).content=t.getLines(e,o,4+t.blkIndent,!0),i.map=[e,t.line],!0}},446:function(t,e,n){"use strict";t.exports=function(t,e,n,r){var o,i,s,a,c,l,u,p=!1,f=t.bMarks[e]+t.tShift[e],h=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(f+3>h)return!1;if(126!==(o=t.src.charCodeAt(f))&&96!==o)return!1;if(c=f,(i=(f=t.skipChars(f,o))-c)<3)return!1;if(u=t.src.slice(c,f),(s=t.src.slice(f,h)).indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;for(a=e;!(++a>=n)&&!((f=c=t.bMarks[a]+t.tShift[a])<(h=t.eMarks[a])&&t.sCount[a]=4||(f=t.skipChars(f,o))-c=4)return!1;if(62!==t.src.charCodeAt(A++))return!1;if(o)return!0;for(c=h=t.sCount[e]+A-(t.bMarks[e]+t.tShift[e]),32===t.src.charCodeAt(A)?(A++,c++,h++,i=!1,w=!0):9===t.src.charCodeAt(A)?(w=!0,(t.bsCount[e]+h)%4==3?(A++,c++,h++,i=!1):i=!0):w=!1,d=[t.bMarks[e]],t.bMarks[e]=A;A=O,y=[t.sCount[e]],t.sCount[e]=h-c,b=[t.tShift[e]],t.tShift[e]=A-t.bMarks[e],x=t.md.block.ruler.getRules("blockquote"),g=t.parentType,t.parentType="blockquote",S=!1,f=e+1;f=(O=t.eMarks[f])));f++)if(62!==t.src.charCodeAt(A++)||S){if(u)break;for(k=!1,a=0,l=x.length;a=O,m.push(t.bsCount[f]),t.bsCount[f]=t.sCount[f]+1+(w?1:0),y.push(t.sCount[f]),t.sCount[f]=h-c,b.push(t.tShift[f]),t.tShift[f]=A-t.bMarks[f]}for(v=t.blkIndent,t.blkIndent=0,(C=t.push("blockquote_open","blockquote",1)).markup=">",C.map=p=[e,0],t.md.block.tokenize(t,e,f),(C=t.push("blockquote_close","blockquote",-1)).markup=">",t.lineMax=_,t.parentType=g,p[1]=t.line,a=0;a=4)return!1;if(42!==(i=t.src.charCodeAt(l++))&&45!==i&&95!==i)return!1;for(s=1;l=s)return-1;if((n=t.src.charCodeAt(i++))<48||n>57)return-1;for(;;){if(i>=s)return-1;if(!((n=t.src.charCodeAt(i++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(i-o>=10)return-1}return i=4)return!1;if(r&&"paragraph"===t.parentType&&t.tShift[e]>=t.blkIndent&&(I=!0),(M=i(t,e))>=0){if(f=!0,D=t.bMarks[e]+t.tShift[e],y=Number(t.src.substr(D,M-D-1)),I&&1!==y)return!1}else{if(!((M=o(t,e))>=0))return!1;f=!1}if(I&&t.skipSpaces(M)>=t.eMarks[e])return!1;if(g=t.src.charCodeAt(M-1),r)return!0;for(v=t.tokens.length,f?(R=t.push("ordered_list_open","ol",1),1!==y&&(R.attrs=[["start",y]])):R=t.push("bullet_list_open","ul",1),R.map=m=[e,0],R.markup=String.fromCharCode(g),w=e,E=!1,N=t.md.block.ruler.getRules("list"),S=t.parentType,t.parentType="list";w=b?1:k-p)>4&&(u=1),l=p+u,(R=t.push("list_item_open","li",1)).markup=String.fromCharCode(g),R.map=h=[e,0],x=t.blkIndent,A=t.tight,_=t.tShift[e],C=t.sCount[e],t.blkIndent=l,t.tight=!0,t.tShift[e]=a-t.bMarks[e],t.sCount[e]=k,a>=b&&t.isEmpty(e+1)?t.line=Math.min(t.line+2,n):t.md.block.tokenize(t,e,n,!0),t.tight&&!E||(z=!1),E=t.line-e>1&&t.isEmpty(t.line-1),t.blkIndent=x,t.tShift[e]=_,t.sCount[e]=C,t.tight=A,(R=t.push("list_item_close","li",-1)).markup=String.fromCharCode(g),w=e=t.line,h[1]=w,a=t.bMarks[e],w>=n)break;if(t.sCount[w]=4)return!1;if(91!==t.src.charCodeAt(C))return!1;for(;++C3||t.sCount[_]<0)){for(b=!1,p=0,f=w.length;p=4)return!1;if(35!==(i=t.src.charCodeAt(l))||l>=u)return!1;for(s=1,i=t.src.charCodeAt(++l);35===i&&l6||ll&&r(t.src.charCodeAt(a-1))&&(u=a),t.line=e+1,(c=t.push("heading_open","h"+String(s),1)).markup="########".slice(0,s),c.map=[e,t.line],(c=t.push("inline","",0)).content=t.src.slice(l,u).trim(),c.map=[e,t.line],c.children=[],(c=t.push("heading_close","h"+String(s),-1)).markup="########".slice(0,s),!0))}},452:function(t,e,n){"use strict";t.exports=function(t,e,n){var r,o,i,s,a,c,l,u,p,f,h=e+1,d=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;for(f=t.parentType,t.parentType="paragraph";h3)){if(t.sCount[h]>=t.blkIndent&&(c=t.bMarks[h]+t.tShift[h])<(l=t.eMarks[h])&&(45===(p=t.src.charCodeAt(c))||61===p)&&(c=t.skipChars(c,p),(c=t.skipSpaces(c))>=l)){u=61===p?1:2;break}if(!(t.sCount[h]<0)){for(o=!1,i=0,s=d.length;i|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(o.source+"\\s*$"),/^$/,!1]];t.exports=function(t,e,n,r){var o,s,a,c,l=t.bMarks[e]+t.tShift[e],u=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(!t.md.options.html)return!1;if(60!==t.src.charCodeAt(l))return!1;for(c=t.src.slice(l,u),o=0;o3||t.sCount[c]<0)){for(r=!1,o=0,i=l.length;o0&&this.level++,this.tokens.push(o),o},i.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},i.prototype.skipEmptyLines=function(t){for(var e=this.lineMax;te;)if(!o(this.src.charCodeAt(--t)))return t+1;return t},i.prototype.skipChars=function(t,e){for(var n=this.src.length;tn;)if(e!==this.src.charCodeAt(--t))return t+1;return t},i.prototype.getLines=function(t,e,n,r){var i,s,a,c,l,u,p,f=t;if(t>=e)return"";for(u=new Array(e-t),i=0;fn?new Array(s-n+1).join(" ")+this.src.slice(c,l):this.src.slice(c,l)}return u.join("")},i.prototype.Token=r,t.exports=i},457:function(t,e,n){"use strict";var r=n(379),o=[["text",n(458)],["newline",n(459)],["escape",n(460)],["backticks",n(461)],["strikethrough",n(408).tokenize],["emphasis",n(409).tokenize],["link",n(462)],["image",n(463)],["autolink",n(464)],["html_inline",n(465)],["entity",n(466)]],i=[["balance_pairs",n(467)],["strikethrough",n(408).postProcess],["emphasis",n(409).postProcess],["text_collapse",n(468)]];function s(){var t;for(this.ruler=new r,t=0;t=i)break}else t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},s.prototype.parse=function(t,e,n,r){var o,i,s,a=new this.State(t,e,n,r);for(this.tokenize(a),s=(i=this.ruler2.getRules("")).length,o=0;o=0&&32===t.pending.charCodeAt(n)?n>=1&&32===t.pending.charCodeAt(n-1)?(t.pending=t.pending.replace(/ +$/,""),t.push("hardbreak","br",0)):(t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0)):t.push("softbreak","br",0)),i++;i?@[]^_`{|}~-".split("").forEach((function(t){o[t.charCodeAt(0)]=1})),t.exports=function(t,e){var n,i=t.pos,s=t.posMax;if(92!==t.src.charCodeAt(i))return!1;if(++i=m)return!1;for(v=l,(u=t.md.helpers.parseLinkDestination(t.src,l,t.posMax)).ok&&(h=t.md.normalizeLink(u.str),t.md.validateLink(h)?l=u.pos:h=""),v=l;l=m||41!==t.src.charCodeAt(l))&&(g=!0),l++}if(g){if(void 0===t.env.references)return!1;if(l=0?s=t.src.slice(v,l++):l=a+1):l=a+1,s||(s=t.src.slice(c,a)),!(p=t.env.references[r(s)]))return t.pos=d,!1;h=p.href,f=p.title}return e||(t.pos=c,t.posMax=a,t.push("link_open","a",1).attrs=n=[["href",h]],f&&n.push(["title",f]),t.md.inline.tokenize(t),t.push("link_close","a",-1)),t.pos=l,t.posMax=m,!0}},463:function(t,e,n){"use strict";var r=n(166).normalizeReference,o=n(166).isSpace;t.exports=function(t,e){var n,i,s,a,c,l,u,p,f,h,d,m,v,g="",y=t.pos,b=t.posMax;if(33!==t.src.charCodeAt(t.pos))return!1;if(91!==t.src.charCodeAt(t.pos+1))return!1;if(l=t.pos+2,(c=t.md.helpers.parseLinkLabel(t,t.pos+1,!1))<0)return!1;if((u=c+1)=b)return!1;for(v=u,(f=t.md.helpers.parseLinkDestination(t.src,u,t.posMax)).ok&&(g=t.md.normalizeLink(f.str),t.md.validateLink(g)?u=f.pos:g=""),v=u;u=b||41!==t.src.charCodeAt(u))return t.pos=y,!1;u++}else{if(void 0===t.env.references)return!1;if(u=0?a=t.src.slice(v,u++):u=c+1):u=c+1,a||(a=t.src.slice(l,c)),!(p=t.env.references[r(a)]))return t.pos=y,!1;g=p.href,h=p.title}return e||(s=t.src.slice(l,c),t.md.inline.parse(s,t.md,t.env,m=[]),(d=t.push("image","img",0)).attrs=n=[["src",g],["alt",""]],d.children=m,d.content=s,h&&n.push(["title",h])),t.pos=u,t.posMax=b,!0}},464:function(t,e,n){"use strict";var r=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,o=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;t.exports=function(t,e){var n,i,s,a,c,l,u=t.pos;return 60===t.src.charCodeAt(u)&&(!((n=t.src.slice(u)).indexOf(">")<0)&&(o.test(n)?(a=(i=n.match(o))[0].slice(1,-1),c=t.md.normalizeLink(a),!!t.md.validateLink(c)&&(e||((l=t.push("link_open","a",1)).attrs=[["href",c]],l.markup="autolink",l.info="auto",(l=t.push("text","",0)).content=t.md.normalizeLinkText(a),(l=t.push("link_close","a",-1)).markup="autolink",l.info="auto"),t.pos+=i[0].length,!0)):!!r.test(n)&&(a=(s=n.match(r))[0].slice(1,-1),c=t.md.normalizeLink("mailto:"+a),!!t.md.validateLink(c)&&(e||((l=t.push("link_open","a",1)).attrs=[["href",c]],l.markup="autolink",l.info="auto",(l=t.push("text","",0)).content=t.md.normalizeLinkText(a),(l=t.push("link_close","a",-1)).markup="autolink",l.info="auto"),t.pos+=s[0].length,!0))))}},465:function(t,e,n){"use strict";var r=n(407).HTML_TAG_RE;t.exports=function(t,e){var n,o,i,s=t.pos;return!!t.md.options.html&&(i=t.posMax,!(60!==t.src.charCodeAt(s)||s+2>=i)&&(!(33!==(n=t.src.charCodeAt(s+1))&&63!==n&&47!==n&&!function(t){var e=32|t;return e>=97&&e<=122}(n))&&(!!(o=t.src.slice(s).match(r))&&(e||(t.push("html_inline","",0).content=t.src.slice(s,s+o[0].length)),t.pos+=o[0].length,!0))))}},466:function(t,e,n){"use strict";var r=n(402),o=n(166).has,i=n(166).isValidEntityCode,s=n(166).fromCodePoint,a=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,c=/^&([a-z][a-z0-9]{1,31});/i;t.exports=function(t,e){var n,l,u=t.pos,p=t.posMax;if(38!==t.src.charCodeAt(u))return!1;if(u+1=0;){if((o=i[n]).open&&o.marker===r.marker&&o.end<0&&o.level===r.level)if(!((o.close||r.open)&&void 0!==o.length&&void 0!==r.length&&(o.length+r.length)%3==0)){r.jump=e-n,r.open=!1,o.end=e,o.jump=0;break}n-=o.jump+1}}},468:function(t,e,n){"use strict";t.exports=function(t){var e,n,r=0,o=t.tokens,i=t.tokens.length;for(e=n=0;e0&&this.level++,this.pendingLevel=this.level,this.tokens.push(o),o},a.prototype.scanDelims=function(t,e){var n,r,a,c,l,u,p,f,h,d=t,m=!0,v=!0,g=this.posMax,y=this.src.charCodeAt(t);for(n=t>0?this.src.charCodeAt(t-1):32;d=3&&":"===t[e-3]?0:e>=3&&"/"===t[e-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,n){var r=t.slice(e);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},l="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",u="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function p(t){var e=t.re=n(471)(t.__opts__),r=t.__tlds__.slice();function a(t){return t.replace("%TLDS%",e.src_tlds)}t.onCompile(),t.__tlds_replaced__||r.push(l),r.push(e.src_xn),e.src_tlds=r.join("|"),e.email_fuzzy=RegExp(a(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(a(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(a(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(a(e.tpl_host_fuzzy_test),"i");var c=[];function u(t,e){throw new Error('(LinkifyIt) Invalid schema "'+t+'": '+e)}t.__compiled__={},Object.keys(t.__schemas__).forEach((function(e){var n=t.__schemas__[e];if(null!==n){var r={validate:null,link:null};if(t.__compiled__[e]=r,"[object Object]"===o(n))return!function(t){return"[object RegExp]"===o(t)}(n.validate)?i(n.validate)?r.validate=n.validate:u(e,n):r.validate=function(t){return function(e,n){var r=e.slice(n);return t.test(r)?r.match(t)[0].length:0}}(n.validate),void(i(n.normalize)?r.normalize=n.normalize:n.normalize?u(e,n):r.normalize=function(t,e){e.normalize(t)});!function(t){return"[object String]"===o(t)}(n)?u(e,n):c.push(e)}})),c.forEach((function(e){t.__compiled__[t.__schemas__[e]]&&(t.__compiled__[e].validate=t.__compiled__[t.__schemas__[e]].validate,t.__compiled__[e].normalize=t.__compiled__[t.__schemas__[e]].normalize)})),t.__compiled__[""]={validate:null,normalize:function(t,e){e.normalize(t)}};var p=Object.keys(t.__compiled__).filter((function(e){return e.length>0&&t.__compiled__[e]})).map(s).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+p+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+p+")","ig"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),function(t){t.__index__=-1,t.__text_cache__=""}(t)}function f(t,e){var n=t.__index__,r=t.__last_index__,o=t.__text_cache__.slice(n,r);this.schema=t.__schema__.toLowerCase(),this.index=n+e,this.lastIndex=r+e,this.raw=o,this.text=o,this.url=o}function h(t,e){var n=new f(t,e);return t.__compiled__[n.schema].normalize(n,t),n}function d(t,e){if(!(this instanceof d))return new d(t,e);var n;e||(n=t,Object.keys(n||{}).reduce((function(t,e){return t||a.hasOwnProperty(e)}),!1)&&(e=t,t={})),this.__opts__=r({},a,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},c,t),this.__compiled__={},this.__tlds__=u,this.__tlds_replaced__=!1,this.re={},p(this)}d.prototype.add=function(t,e){return this.__schemas__[t]=e,p(this),this},d.prototype.set=function(t){return this.__opts__=r(this.__opts__,t),this},d.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var e,n,r,o,i,s,a,c;if(this.re.schema_test.test(t))for((a=this.re.schema_search).lastIndex=0;null!==(e=a.exec(t));)if(o=this.testSchemaAt(t,e[2],a.lastIndex)){this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=t.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||c=0&&null!==(r=t.match(this.re.email_fuzzy))&&(i=r.index+r[1].length,s=r.index+r[0].length,(this.__index__<0||ithis.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=s)),this.__index__>=0},d.prototype.pretest=function(t){return this.re.pretest.test(t)},d.prototype.testSchemaAt=function(t,e,n){return this.__compiled__[e.toLowerCase()]?this.__compiled__[e.toLowerCase()].validate(t,n,this):0},d.prototype.match=function(t){var e=0,n=[];this.__index__>=0&&this.__text_cache__===t&&(n.push(h(this,e)),e=this.__last_index__);for(var r=e?t.slice(e):t;this.test(r);)n.push(h(this,e)),r=r.slice(this.__last_index__),e+=this.__last_index__;return n.length?n:null},d.prototype.tlds=function(t,e){return t=Array.isArray(t)?t:[t],e?(this.__tlds__=this.__tlds__.concat(t).sort().filter((function(t,e,n){return t!==n[e-1]})).reverse(),p(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,p(this),this)},d.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),"mailto:"!==t.schema||/^mailto:/i.test(t.url)||(t.url="mailto:"+t.url)},d.prototype.onCompile=function(){},t.exports=d},471:function(t,e,n){"use strict";t.exports=function(t){var e={};e.src_Any=n(404).source,e.src_Cc=n(405).source,e.src_Z=n(406).source,e.src_P=n(378).source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");return e.src_pseudo_letter="(?:(?![><|]|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|[><|]|"+e.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+e.src_ZCc+"|[.]).|"+(t&&t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+e.src_ZCc+").|\\!(?!"+e.src_ZCc+"|[!]).|\\?(?!"+e.src_ZCc+"|[?]).)+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy='(^|[><|]|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}},472:function(t,e,n){(function(t,r){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof r&&r;s.global!==s&&s.window!==s&&s.self;var a,c=2147483647,l=36,u=1,p=26,f=38,h=700,d=72,m=128,v="-",g=/^xn--/,y=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k=l-u,x=Math.floor,C=String.fromCharCode;function S(t){throw new RangeError(w[t])}function _(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function A(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+_((t=t.replace(b,".")).split("."),e).join(".")}function O(t){for(var e,n,r=[],o=0,i=t.length;o=55296&&e<=56319&&o65535&&(e+=C((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=C(t)})).join("")}function E(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function D(t,e,n){var r=0;for(t=n?x(t/h):t>>1,t+=x(t/e);t>k*p>>1;r+=l)t=x(t/k);return x(r+(k+1)*t/(t+f))}function T(t){var e,n,r,o,i,s,a,f,h,g,y,b=[],w=t.length,k=0,C=m,_=d;for((n=t.lastIndexOf(v))<0&&(n=0),r=0;r=128&&S("not-basic"),b.push(t.charCodeAt(r));for(o=n>0?n+1:0;o=w&&S("invalid-input"),((f=(y=t.charCodeAt(o++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:l)>=l||f>x((c-k)/s))&&S("overflow"),k+=f*s,!(f<(h=a<=_?u:a>=_+p?p:a-_));a+=l)s>x(c/(g=l-h))&&S("overflow"),s*=g;_=D(k-i,e=b.length+1,0==i),x(k/e)>c-C&&S("overflow"),C+=x(k/e),k%=e,b.splice(k++,0,C)}return M(b)}function N(t){var e,n,r,o,i,s,a,f,h,g,y,b,w,k,_,A=[];for(b=(t=O(t)).length,e=m,n=0,i=d,s=0;s=e&&yx((c-n)/(w=r+1))&&S("overflow"),n+=(a-e)*w,e=a,s=0;sc&&S("overflow"),y==e){for(f=n,h=l;!(f<(g=h<=i?u:h>=i+p?p:h-i));h+=l)_=f-g,k=l-g,A.push(C(E(g+_%k,0))),f=x(_/k);A.push(C(E(f,0))),i=D(n,w,r==o),n=0,++r}++n,++e}return A.join("")}a={version:"1.4.1",ucs2:{decode:O,encode:M},decode:T,encode:N,toASCII:function(t){return A(t,(function(t){return y.test(t)?"xn--"+N(t):t}))},toUnicode:function(t){return A(t,(function(t){return g.test(t)?T(t.slice(4).toLowerCase()):t}))}},void 0===(o=function(){return a}.call(e,n,e,t))||(t.exports=o)}()}).call(this,n(473)(t),n(43))},473:function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},474:function(t,e,n){"use strict";t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},475:function(t,e,n){"use strict";t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},476:function(t,e,n){"use strict";t.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}}}]); //# sourceMappingURL=vendors~editor~preview.js.map?v=d048e4fc2d496c60d2d1