From e1932a88c5a10534acc05b06874ca459e426d0ad Mon Sep 17 00:00:00 2001 From: Christoph Schweppe Date: Tue, 9 Nov 2021 09:24:01 +0100 Subject: [PATCH] Bump dependencies --- dist/tiptap.umd.js | 94 +- package-lock.json | 2250 +++++++++++++++++++------------------------- package.json | 50 +- 3 files changed, 1065 insertions(+), 1329 deletions(-) diff --git a/dist/tiptap.umd.js b/dist/tiptap.umd.js index 2d1fc08..79edfce 100644 --- a/dist/tiptap.umd.js +++ b/dist/tiptap.umd.js @@ -1 +1,93 @@ -var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,e,n)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,__spreadValues=(t,e)=>{for(var n in e||(e={}))__hasOwnProp.call(e,n)&&__defNormalProp(t,n,e[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(e))__propIsEnum.call(e,n)&&__defNormalProp(t,n,e[n]);return t},__spreadProps=(t,e)=>__defProps(t,__getOwnPropDescs(e)),__objRest=(t,e)=>{var n={};for(var r in t)__hasOwnProp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))e.indexOf(r)<0&&__propIsEnum.call(t,r)&&(n[r]=t[r]);return n},__vite_style__=document.createElement("style");__vite_style__.innerHTML=".ProseMirror li>p:first-child,.ProseMirror div{display:inline}ul[data-type=taskList]{list-style:none;padding:0}ul[data-type=taskList] li{display:flex;align-items:center}ul[data-type=taskList] li>label{flex:0 0 auto;margin-right:.5rem}\n",document.head.appendChild(__vite_style__),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("vue")):"function"==typeof define&&define.amd?define(["vue"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Vue)}(this,(function(t){"use strict";function e(t){this.content=t}e.prototype={constructor:e,find:function(t){for(var e=0;e>1}},e.from=function(t){if(t instanceof e)return t;var n=[];if(t)for(var r in t)n.push(r,t[r]);return new e(n)};var n=e;function r(t,e,n){for(var o=0;;o++){if(o==t.childCount||o==e.childCount)return t.childCount==e.childCount?null:n;var i=t.child(o),s=e.child(o);if(i!=s){if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){for(var a=0;i.text[a]==s.text[a];a++)n++;return n}if(i.content.size||s.content.size){var c=r(i.content,s.content,n+1);if(null!=c)return c}n+=i.nodeSize}else n+=i.nodeSize}}function o(t,e,n,r){for(var i=t.childCount,s=e.childCount;;){if(0==i||0==s)return i==s?null:{a:n,b:r};var a=t.child(--i),c=e.child(--s),l=a.nodeSize;if(a!=c){if(!a.sameMarkup(c))return{a:n,b:r};if(a.isText&&a.text!=c.text){for(var p=0,d=Math.min(a.text.length,c.text.length);pt&&!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},p.prototype.removeFromSet=function(t){for(var e=0;et.depth)throw new d("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new d("Inconsistent open depths");return g(t,e,n,0)}function g(t,e,n,r){var o=t.index(r),s=t.node(r);if(o==e.index(r)&&r=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)}}(n,t);return x(s,M(t,c.start,c.end,e,r))}var l=t.parent,p=l.content;return x(l,p.cut(0,t.parentOffset).append(n.content).append(p.cut(e.parentOffset)))}return x(s,S(t,e,r))}function y(t,e){if(!e.type.compatibleContent(t.type))throw new d("Cannot join "+e.type.name+" onto "+t.type.name)}function b(t,e,n){var r=t.node(n);return y(r,e.node(n)),r}function w(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 k(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&&(w(t.nodeAfter,r),i++));for(var a=i;ao&&b(t,e,o+1),a=r.depth>o&&b(n,r,o+1),c=[];return k(null,t,o,c),s&&a&&e.index(o)==n.index(o)?(y(s,a),w(x(s,M(t,e,n,r,o+1)),c)):(s&&w(x(s,S(t,e,o+1)),c),k(e,n,o,c),a&&w(x(a,S(n,r,o+1)),c)),k(r,null,o,c),new i(c)}function S(t,e,n){var r=[];(k(null,t,n,r),t.depth>n)&&w(x(b(t,e,n+1),S(t,e,n+1)),r);return k(e,null,n,r),new i(r)}h.size.get=function(){return this.content.size-this.openStart-this.openEnd},u.prototype.insertAt=function(t,e){var n=m(this.content,t+this.openStart,e,null);return n&&new u(n,this.openStart,this.openEnd)},u.prototype.removeBetween=function(t,e){return new u(f(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)},u.prototype.eq=function(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd},u.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},u.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},u.fromJSON=function(t,e){if(!e)return u.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 u(i.fromJSON(t,e.content),n,r)},u.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 u(t,n,r)},Object.defineProperties(u.prototype,h),u.empty=new u(i.empty,0,0);var O=function(t,e,n){this.pos=t,this.path=e,this.depth=e.length/3-1,this.parentOffset=n},C={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};O.prototype.resolveDepth=function(t){return null==t?this.depth:t<0?this.depth+t:t},C.parent.get=function(){return this.node(this.depth)},C.doc.get=function(){return this.node(0)},O.prototype.node=function(t){return this.path[3*this.resolveDepth(t)]},O.prototype.index=function(t){return this.path[3*this.resolveDepth(t)+1]},O.prototype.indexAfter=function(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)},O.prototype.start=function(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1},O.prototype.end=function(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size},O.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]},O.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},C.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},C.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},C.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)},O.prototype.posAtIndex=function(t,e){e=this.resolveDepth(e);for(var n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1,o=0;o0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0},O.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 T(this,t,n)},O.prototype.sameParent=function(t){return this.pos-this.parentOffset==t.pos-t.parentOffset},O.prototype.max=function(t){return t.pos>this.pos?t:this},O.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 O(e,n,o)},O.resolveCached=function(t,e){for(var n=0;nt&&this.nodesBetween(t,e,(function(t){return n.isInSet(t.marks)&&(r=!0),!r})),r},z.isBlock.get=function(){return this.type.isBlock},z.isTextblock.get=function(){return this.type.isTextblock},z.inlineContent.get=function(){return this.type.inlineContent},z.isInline.get=function(){return this.type.isInline},z.isText.get=function(){return this.type.isText},z.isLeaf.get=function(){return this.type.isLeaf},z.isAtom.get=function(){return this.type.isAtom},D.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()+")"),I(this.marks,t)},D.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},D.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 B=function(t){this.validEnd=t,this.next=[],this.wrapCache=[]},P={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};B.parse=function(t,e){var n=new L(t,e);if(null==n.next)return B.empty;var r=$(n);n.next&&n.err("Unexpected trailing text");var o=function(t){var e=Object.create(null);return n(K(t,0));function n(r){var o=[];r.forEach((function(e){t[e].forEach((function(e){var n=e.term,r=e.to;if(n){var i=o.indexOf(n),s=i>-1&&o[i+1];K(t,r).forEach((function(t){s||o.push(n,s=[]),-1==s.indexOf(t)&&s.push(t)}))}}))}));for(var i=e[r.join(",")]=new B(r.indexOf(t.length-1)>-1),s=0;s>1},B.prototype.edge=function(t){var e=t<<1;if(e>=this.next.length)throw new RangeError("There's no "+t+"th edge in this content match");return{type:this.next[e],next:this.next[e+1]}},B.prototype.toString=function(){var t=[];return function e(n){t.push(n);for(var r=1;r"+t.indexOf(e.next[o+1]);return r})).join("\n")},Object.defineProperties(B.prototype,P),B.empty=new B(!0);var L=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.shift()},j={next:{configurable:!0}};function $(t){var e=[];do{e.push(F(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function F(t){var e=[];do{e.push(H(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function H(t){for(var e=function(t){if(t.eat("(")){var e=$(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=J(t,e)}return e}function q(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");var e=Number(t.next);return t.pos++,e}function J(t,e){var n=q(t),r=n;return t.eat(",")&&(r="}"!=t.next?q(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function W(t,e){return e-t}function K(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},Y.prototype.allowsMarks=function(t){if(null==this.markSet)return!0;for(var e=0;e-1};var nt=function(t){for(var e in this.spec={},t)this.spec[e]=t[e];this.spec.nodes=n.from(t.nodes),this.spec.marks=n.from(t.marks),this.nodes=Y.compile(this.spec.nodes,this),this.marks=et.compile(this.spec.marks,this);var r=Object.create(null);for(var o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");var i=this.nodes[o],s=i.spec.content||"",a=i.spec.marks;i.contentMatch=r[s]||(r[s]=B.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet="_"==a?null:a?rt(this,a.split(" ")):""!=a&&i.inlineContent?null:[]}for(var c in this.marks){var l=this.marks[c],p=l.spec.excludes;l.excluded=null==p?[l]:""==p?[]:rt(this,p.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 rt(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}nt.prototype.node=function(t,e,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof Y))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)},nt.prototype.text=function(t,e){var n=this.nodes.text;return new R(n,n.defaultAttrs,t,p.setFrom(e))},nt.prototype.mark=function(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)},nt.prototype.nodeFromJSON=function(t){return D.fromJSON(this,t)},nt.prototype.markFromJSON=function(t){return p.fromJSON(this,t)},nt.prototype.nodeType=function(t){var e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e};var ot=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)})),this.normalizeLists=!this.tags.some((function(e){if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;var n=t.nodes[e.node];return n.contentMatch.matchType(n)}))};ot.prototype.parse=function(t,e){void 0===e&&(e={});var n=new pt(this,e,!1);return n.addAll(t,null,e.from,e.to),n.finish()},ot.prototype.parseSlice=function(t,e){void 0===e&&(e={});var n=new pt(this,e,!0);return n.addAll(t,null,e.from,e.to),u.maxOpen(n.finish())},ot.prototype.matchTag=function(t,e,n){for(var r=n?this.tags.indexOf(n)+1:0;rt.length&&(61!=i.style.charCodeAt(t.length)||i.style.slice(t.length+1)!=e))){if(i.getAttrs){var s=i.getAttrs(e);if(!1===s)continue;i.attrs=s}return i}}},ot.schemaRules=function(t){var e=[];function n(t){for(var n=null==t.priority?50:t.priority,r=0;r=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]},lt.prototype.applyPending=function(t){for(var e=0,n=this.pendingMarks;e=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}},pt.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},pt.prototype.sync=function(t){for(var e=this.open;e>=0;e--)if(this.nodes[e]==t)return void(this.open=e)},dt.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},pt.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)},pt.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}},pt.prototype.addPendingMark=function(t){var e=function(t,e){for(var n=0;n=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);var o=r.popFromStashMark(t);o&&r.type&&r.type.allowsMarkType(o.type)&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==e)break}},Object.defineProperties(pt.prototype,dt);var mt=function(t,e){this.nodes=t||{},this.marks=e||{}};function vt(t){var e={};for(var n in t){var r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function gt(t){return t.document||window.document}mt.prototype.serializeFragment=function(t,e,n){var r=this;void 0===e&&(e={}),n||(n=gt(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},mt.prototype.serializeMark=function(t,e,n){void 0===n&&(n={});var r=this.marks[t.type.name];return r&&mt.renderSpec(gt(n),r(t,e))},mt.renderSpec=function(t,e,n){if(void 0===n&&(n=null),"string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;var r=e[0],o=r.indexOf(" ");o>0&&(n=r.slice(0,o),r=r.slice(o+1));var i=null,s=n?t.createElementNS(n,r):t.createElement(r),a=e[1],c=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a))for(var l in c=2,a)if(null!=a[l]){var p=l.indexOf(" ");p>0?s.setAttributeNS(l.slice(0,p),l.slice(p+1),a[l]):s.setAttribute(l,a[l])}for(var d=c;dc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}var h=mt.renderSpec(t,u,n),f=h.dom,m=h.contentDOM;if(s.appendChild(f),m){if(i)throw new RangeError("Multiple content holes");i=m}}return{dom:s,contentDOM:i}},mt.fromSchema=function(t){return t.cached.domSerializer||(t.cached.domSerializer=new mt(this.nodesFromSchema(t),this.marksFromSchema(t)))},mt.nodesFromSchema=function(t){var e=vt(t.nodes);return e.text||(e.text=function(t){return t.text}),e},mt.marksFromSchema=function(t){return vt(t.marks)};var yt=Math.pow(2,16);function bt(t){return 65535&t}var wt=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=null),this.pos=t,this.deleted=e,this.recover=n},kt=function(t,e){void 0===e&&(e=!1),this.ranges=t,this.inverted=e};kt.prototype.recover=function(t){var e=0,n=bt(t);if(!this.inverted)for(var r=0;rt)break;var c=this.ranges[s+o],l=this.ranges[s+i],p=a+c;if(t<=p){var d=a+r+((c?t==a?-1:t==p?1:e:e)<0?0:l);if(n)return d;var u=t==(e<0?a:p)?null:s/3+(t-a)*yt;return new wt(d,e<0?t!=a:t!=p,u)}r+=l-c}return n?t+r:new wt(t+r)},kt.prototype.touches=function(t,e){for(var n=0,r=bt(e),o=this.inverted?2:1,i=this.inverted?1:2,s=0;st)break;var c=this.ranges[s+o];if(t<=a+c&&s==3*r)return!0;n+=this.ranges[s+i]-c}return!1},kt.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)}},xt.prototype.invert=function(){var t=new xt;return t.appendMappingInverted(this),t},xt.prototype.map=function(t,e){if(void 0===e&&(e=1),this.mirror)return this._map(t,e,!0);for(var n=this.from;no&&s0},St.prototype.addStep=function(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e},Object.defineProperties(St.prototype,Ot);var Et=Object.create(null),Nt=function(){};Nt.prototype.apply=function(t){return Ct()},Nt.prototype.getMap=function(){return kt.empty},Nt.prototype.invert=function(t){return Ct()},Nt.prototype.map=function(t){return Ct()},Nt.prototype.merge=function(t){return null},Nt.prototype.toJSON=function(){return Ct()},Nt.fromJSON=function(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=Et[e.stepType];if(!n)throw new RangeError("No step type "+e.stepType+" defined");return n.fromJSON(t,e)},Nt.jsonID=function(t,e){if(t in Et)throw new RangeError("Duplicate use of step JSON ID "+t);return Et[t]=e,e.prototype.jsonID=t,e};var _t=function(t,e){this.doc=t,this.failed=e};_t.ok=function(t){return new _t(t,null)},_t.fail=function(t){return new _t(null,t)},_t.fromReplace=function(t,e,n,r){try{return _t.ok(t.replace(e,n,r))}catch(o){if(o instanceof d)return _t.fail(o.message);throw o}};var Tt=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&&At(t,this.from,this.to)?_t.fail("Structure replace would overwrite content"):_t.fromReplace(t,this.from,this.to,this.slice)},e.prototype.getMap=function(){return new kt([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?u.empty:new u(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}var r=this.slice.size+t.slice.size==0?u.empty:new u(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),r,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(n.from,n.to,u.fromJSON(t,n.slice),!!n.structure)},e}(Nt);Nt.jsonID("replace",Tt);var Vt=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&&(At(t,this.from,this.gapFrom)||At(t,this.gapTo,this.to)))return _t.fail("Structure gap-replace would overwrite content");var e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return _t.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,e.content);return n?_t.fromReplace(t,this.from,this.to,n):_t.fail("Content does not fit in gap")},e.prototype.getMap=function(){return new kt([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,u.fromJSON(t,n.slice),n.insert,!!n.structure)},e}(Nt);function At(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 Dt(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function zt(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),p=o.index(a);if(l.type.spec.isolating)return!1;var d=l.content.cutByIndex(p,l.childCount),u=r&&r[c]||l;if(u!=l&&(d=d.replaceChild(0,u.type.create(u.attrs))),!l.canReplace(p+1,l.childCount)||!u.type.validContent(d))return!1}var h=o.indexAfter(i),f=r&&r[0];return o.node(i).canReplaceWith(h,h,f?f.type:o.node(i+1).type)}function Pt(t,e){var n,r,o=t.resolve(e),i=o.index();return n=o.nodeBefore,r=o.nodeAfter,n&&r&&!n.isLeaf&&n.canAppend(r)&&o.parent.canReplace(i,i+1)}function Lt(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),p=r.node(a),d=!1;if(1==s)d=p.canReplace(l,l,o);else{var u=p.contentMatchAt(l).findWrapping(o.firstChild.type);d=u&&p.canReplaceWith(l,l,u[0])}if(d)return 0==c?r.pos:c<0?r.before(a+1):r.after(a+1)}return null}function jt(t,e,n){for(var r=[],o=0;oe;h--)f||n.index(h)>0?(f=!0,p=i.from(n.node(h).copy(p)),d++):c--;for(var m=i.empty,v=0,g=o,y=!1;g>e;g--)y||r.after(g+1)=0;r--)n=i.from(e[r].type.create(e[r].attrs,n));var o=t.start,s=t.end;return this.step(new Vt(o,s,o,s,new u(n,0,0),e.length,!0))},St.prototype.setBlockType=function(t,e,n,r){var o=this;if(void 0===e&&(e=t),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var s=this.steps.length;return this.doc.nodesBetween(t,e,(function(t,e){if(t.isTextblock&&!t.hasMarkup(n,r)&&function(t,e,n){var r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(o.doc,o.mapping.slice(s).map(e),n)){o.clearIncompatible(o.mapping.slice(s).map(e,1),n);var a=o.mapping.slice(s),c=a.map(e,1),l=a.map(e+t.nodeSize,1);return o.step(new Vt(c,l,c+1,l-1,new u(i.from(n.create(r,null,t.marks)),0,0),1,!0)),!1}})),this},St.prototype.setNodeMarkup=function(t,e,n,r){var o=this.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");e||(e=o.type);var s=e.create(n,null,r||o.marks);if(o.isLeaf)return this.replaceWith(t,t+o.nodeSize,s);if(!e.validContent(o.content))throw new RangeError("Invalid content for node type "+e.name);return this.step(new Vt(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new u(i.from(s),0,0),1,!0))},St.prototype.split=function(t,e,n){void 0===e&&(e=1);for(var r=this.doc.resolve(t),o=i.empty,s=i.empty,a=r.depth,c=r.depth-e,l=e-1;a>c;a--,l--){o=i.from(r.node(a).copy(o));var p=n&&n[l];s=i.from(p?p.type.create(p.attrs,s):r.node(a).copy(s))}return this.step(new Tt(t,t,new u(o.append(s),e,e),!0))},St.prototype.join=function(t,e){void 0===e&&(e=1);var n=new Tt(t-e,t+e,u.empty,!0);return this.step(n)};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),r=t.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new u(jt(n.content,(function(t,n){return t.isAtom&&n.type.allowsMarkType(e.mark.type)?t.mark(e.mark.addToSet(t.marks)):t}),o),n.openStart,n.openEnd);return _t.fromReplace(t,this.from,this.to,i)},e.prototype.invert=function(){return new Ft(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}(Nt);Nt.jsonID("addMark",$t);var Ft=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),r=new u(jt(n.content,(function(t){return t.mark(e.mark.removeFromSet(t.marks))})),n.openStart,n.openEnd);return _t.fromReplace(t,this.from,this.to,r)},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:"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}(Nt);function Ht(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}Nt.jsonID("removeMark",Ft),St.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 p=r.marks;if(!n.isInSet(p)&&l.type.allowsMarkType(n.type)){for(var d=Math.max(c,t),u=Math.min(c+r.nodeSize,e),h=n.addToSet(p),f=0;f=0;f--)this.step(o[f]);return this},St.prototype.replace=function(t,e,n){void 0===e&&(e=t),void 0===n&&(n=u.empty);var r=function(t,e,n,r){if(void 0===n&&(n=e),void 0===r&&(r=u.empty),e==n&&!r.size)return null;var o=t.resolve(e),i=t.resolve(n);return Ht(o,i,r)?new Tt(e,n,r):new qt(o,i,r).fit()}(this.doc,t,e,n);return r&&this.step(r),this},St.prototype.replaceWith=function(t,e,n){return this.replace(t,e,new u(i.from(n),0,0))},St.prototype.delete=function(t,e){return this.replace(t,e,u.empty)},St.prototype.insert=function(t,e){return this.replaceWith(t,t,e)};var qt=function(t,e,n){this.$to=e,this.$from=t,this.unplaced=n,this.frontier=[];for(var r=0;r<=t.depth;r++){var o=t.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(r))})}this.placed=i.empty;for(var s=t.depth;s>0;s--)this.placed=i.from(t.node(s).copy(this.placed))},Jt={depth:{configurable:!0}};function Wt(t,e,n){return 0==e?t.cutByIndex(n):t.replaceChild(0,t.firstChild.copy(Wt(t.firstChild.content,e-1,n)))}function Kt(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Kt(t.lastChild.content,e-1,n)))}function Ut(t,e){for(var n=0;n1&&(r=r.replaceChild(0,Gt(r.firstChild,e-1,1==r.childCount?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(i.empty,!0)))),t.copy(r)}function Xt(t,e,n,r,o){var i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;var a=r.fillBefore(i.content,!0,s);return a&&!function(t,e,n){for(var r=n;rr){var a=o.contentMatchAt(0),c=a.fillBefore(t).append(t);t=c.append(a.matchFragment(c).fillBefore(i.empty,!0))}return t}function Qt(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}Jt.depth.get=function(){return this.frontier.length-1},qt.prototype.fit=function(){for(;this.unplaced.size;){var t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}var e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;for(var i=this.placed,s=r.depth,a=o.depth;s&&a&&1==i.childCount;)i=i.firstChild.content,s--,a--;var c=new u(i,s,a);return e>-1?new Vt(r.pos,e,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new Tt(r.pos,o.pos,c):void 0},qt.prototype.findFittable=function(){for(var t=1;t<=2;t++)for(var e=this.unplaced.openStart;e>=0;e--)for(var n=void 0,r=(e?(n=Ut(this.unplaced.content,e-1).firstChild).content:this.unplaced.content).firstChild,o=this.depth;o>=0;o--){var s=this.frontier[o],a=s.type,c=s.match,l=void 0,p=void 0;if(1==t&&(r?c.matchType(r.type)||(p=c.fillBefore(i.from(r),!1)):a.compatibleContent(n.type)))return{sliceDepth:e,frontierDepth:o,parent:n,inject:p};if(2==t&&r&&(l=c.findWrapping(r.type)))return{sliceDepth:e,frontierDepth:o,parent:n,wrap:l};if(n&&c.matchType(n.type))break}},qt.prototype.openMore=function(){var t=this.unplaced,e=t.content,n=t.openStart,r=t.openEnd,o=Ut(e,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new u(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)},qt.prototype.dropNode=function(){var t=this.unplaced,e=t.content,n=t.openStart,r=t.openEnd,o=Ut(e,n);if(o.childCount<=1&&n>0){var i=e.size-n<=n+o.size;this.unplaced=new u(Wt(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new u(Wt(e,n,1),n,r)},qt.prototype.placeNodes=function(t){for(var e=t.sliceDepth,n=t.frontierDepth,r=t.parent,o=t.inject,s=t.wrap;this.depth>n;)this.closeFrontierNode();if(s)for(var a=0;a1||0==p||b.content.size)&&(m=w,h.push(Gt(b.mark(v.allowedMarks(b.marks)),1==d?p:0,d==l.childCount?y:-1)))}var k=d==l.childCount;k||(y=-1),this.placed=Kt(this.placed,n,i.from(h)),this.frontier[n].match=m,k&&y<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var x=0,M=l;x1&&r==this.$to.end(--n);)++r;return r},qt.prototype.findCloseLevel=function(t){t:for(var e=Math.min(this.depth,t.depth);e>=0;e--){var n=this.frontier[e],r=n.match,o=n.type,i=e=0;a--){var c=this.frontier[a],l=c.match,p=Xt(t,a,c.type,l,!0);if(!p||p.childCount)continue t}return{depth:e,fit:s,move:i?t.doc.resolve(t.after(e+1)):t}}}},qt.prototype.close=function(t){var e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=Kt(this.placed,e.depth,e.fit)),t=e.move;for(var n=e.depth+1;n<=t.depth;n++){var r=t.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,t.index(n));this.openFrontierNode(r.type,r.attrs,o)}return t},qt.prototype.openFrontierNode=function(t,e,n){var r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=Kt(this.placed,this.depth,i.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})},qt.prototype.closeFrontierNode=function(){var t=this.frontier.pop().match.fillBefore(i.empty,!0);t.childCount&&(this.placed=Kt(this.placed,this.frontier.length,t))},Object.defineProperties(qt.prototype,Jt),St.prototype.replaceRange=function(t,e,n){if(!n.size)return this.deleteRange(t,e);var r=this.doc.resolve(t),o=this.doc.resolve(e);if(Ht(r,o,n))return this.step(new Tt(t,e,n));var i=Qt(r,this.doc.resolve(e));0==i[i.length-1]&&i.pop();var s=-(r.depth+1);i.unshift(s);for(var a=r.depth,c=r.pos-1;a>0;a--,c--){var l=r.node(a).type.spec;if(l.defining||l.isolating)break;i.indexOf(a)>-1?s=a:r.before(a)==c&&i.splice(1,0,-a)}for(var p=i.indexOf(s),d=[],h=n.openStart,f=n.content,m=0;;m++){var v=f.firstChild;if(d.push(v),m==n.openStart)break;f=v.content}h>0&&d[h-1].type.spec.defining&&r.node(p).type!=d[h-1].type?h-=1:h>=2&&d[h-1].isTextblock&&d[h-2].type.spec.defining&&r.node(p).type!=d[h-2].type&&(h-=2);for(var g=n.openStart;g>=0;g--){var y=(g+h+1)%(n.openStart+1),b=d[y];if(b)for(var w=0;w=0&&(this.replace(t,e,n),!(this.steps.length>O));C--){var E=i[C];E<0||(t=r.before(E),e=o.after(E))}return this},St.prototype.replaceRangeWith=function(t,e,n){if(!n.isInline&&t==e&&this.doc.resolve(t).parent.content.size){var r=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)};var Zt=Object.create(null),te=function(t,e,n){this.ranges=n||[new ne(t.min(e),t.max(e))],this.$anchor=t,this.$head=e},ee={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};ee.anchor.get=function(){return this.$anchor.pos},ee.head.get=function(){return this.$head.pos},ee.from.get=function(){return this.$from.pos},ee.to.get=function(){return this.$to.pos},ee.$from.get=function(){return this.ranges[0].$from},ee.$to.get=function(){return this.ranges[0].$to},ee.empty.get=function(){for(var t=this.ranges,e=0;e=0;o--){var i=e<0?le(t.node(0),t.node(o),t.before(o+1),t.index(o),e,n):le(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,n);if(i)return i}},te.near=function(t,e){return void 0===e&&(e=1),this.findFrom(t,e)||this.findFrom(t,-e)||new ae(t.node(0))},te.atStart=function(t){return le(t,t,0,0,1)||new ae(t)},te.atEnd=function(t){return le(t,t,t.content.size,t.childCount,-1)||new ae(t)},te.fromJSON=function(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=Zt[e.type];if(!n)throw new RangeError("No selection type "+e.type+" defined");return n.fromJSON(t,e)},te.jsonID=function(t,e){if(t in Zt)throw new RangeError("Duplicate use of selection JSON ID "+t);return Zt[t]=e,e.prototype.jsonID=t,e},te.prototype.getBookmark=function(){return re.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(te.prototype,ee),te.prototype.visible=!0;var ne=function(t,e){this.$from=t,this.$to=e},re=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=u.empty),t.prototype.replace.call(this,e,n),n==u.empty){var r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}},e.prototype.eq=function(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head},e.prototype.getBookmark=function(){return new oe(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=(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&&ie.isSelectable(a))return ie.create(t,n-(o<0?a.nodeSize:0))}else{var c=le(t,a,n+o,o<0?a.childCount:0,o,i);if(c)return c}n+=a.nodeSize*o}}function pe(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 p.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)||p.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(te.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}(St);function ue(t,e){return e&&t?t.bind(e):t}var he=function(t,e,n){this.name=t,this.init=ue(e.init,n),this.apply=ue(e.apply,n)},fe=[new he("doc",{init:function(t){return t.doc||t.schema.topNodeType.createAndFill()},apply:function(t){return t.doc}}),new he("selection",{init:function(t,e){return t.selection||te.atStart(e.doc)},apply:function(t){return t.selection}}),new he("storedMarks",{init:function(t){return t.storedMarks||null},apply:function(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new he("scrollToSelection",{init:function(){return 0},apply:function(t,e){return t.scrolledIntoView?e+1:e}})],me=function(t,e){var n=this;this.schema=t,this.fields=fe.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 he(t.key,t.spec.state,t))}))},ve=function(t){this.config=t},ge={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};ge.schema.get=function(){return this.config.schema},ge.plugins.get=function(){return this.config.plugins},ve.prototype.apply=function(t){return this.applyTransaction(t).state},ve.prototype.filterTransaction=function(t,e){void 0===e&&(e=-1);for(var n=0;n-1&&ye.splice(e,1)},Object.defineProperties(ve.prototype,ge);var ye=[];function be(t,e,n){for(var r in t){var o=t[r];o instanceof Function?o=o.bind(e):"handleDOMEvents"==r&&(o=be(o,e,{})),n[r]=o}return n}var we=function(t){this.props={},t.props&&be(t.props,this,this.props),this.spec=t,this.key=t.key?t.key.key:xe("plugin")};we.prototype.getState=function(t){return t[this.key]};var ke=Object.create(null);function xe(t){return t in ke?t+"$"+ ++ke[t]:(ke[t]=0,t+"$")}var Me=function(t){void 0===t&&(t="key"),this.key=xe(t)};Me.prototype.get=function(t){return t.config.pluginsByKey[this.key]},Me.prototype.getState=function(t){return t[this.key]};var Se={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var Oe=/Edge\/(\d+)/.exec(navigator.userAgent),Ce=/MSIE \d/.test(navigator.userAgent),Ee=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);Se.mac=/Mac/.test(navigator.platform);var Ne=Se.ie=!!(Ce||Ee||Oe);Se.ie_version=Ce?document.documentMode||6:Ee?+Ee[1]:Oe?+Oe[1]:null,Se.gecko=!Ne&&/gecko\/(\d+)/i.test(navigator.userAgent),Se.gecko_version=Se.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var _e=!Ne&&/Chrome\/(\d+)/.exec(navigator.userAgent);Se.chrome=!!_e,Se.chrome_version=_e&&+_e[1],Se.safari=!Ne&&/Apple Computer/.test(navigator.vendor),Se.ios=Se.safari&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),Se.android=/Android \d/.test(navigator.userAgent),Se.webkit="webkitFontSmoothing"in document.documentElement.style,Se.webkit_version=Se.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var Te=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},Ve=function(t){var e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e},Ae=null,De=function(t,e,n){var r=Ae||(Ae=document.createRange());return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},ze=function(t,e,n,r){return n&&(Ie(t,e,n,r,-1)||Ie(t,e,n,r,1))},Re=/^(img|br|input|textarea|hr)$/i;function Ie(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:Be(t))){var i=t.parentNode;if(1!=i.nodeType||Pe(t)||Re.test(t.nodeName)||"false"==t.contentEditable)return!1;e=Te(t)+(o<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if("false"==(t=t.childNodes[e+(o<0?-1:0)]).contentEditable)return!1;e=o<0?Be(t):0}}}function Be(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Pe(t){for(var e,n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}var Le=function(t){var e=t.isCollapsed;return e&&Se.chrome&&t.rangeCount&&!t.getRangeAt(0).collapsed&&(e=!1),e};function je(t,e){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function $e(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Fe(t,e){return"number"==typeof t?t:t[e]}function He(t){var e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function qe(t,e,n){for(var r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument,s=n||t.dom;s;s=Ve(s))if(1==s.nodeType){var a=s==i.body||1!=s.nodeType,c=a?$e(i):He(s),l=0,p=0;if(e.topc.bottom-Fe(r,"bottom")&&(p=e.bottom-c.bottom+Fe(o,"bottom")),e.leftc.right-Fe(r,"right")&&(l=e.right-c.right+Fe(o,"right")),l||p)if(a)i.defaultView.scrollBy(l,p);else{var d=s.scrollLeft,u=s.scrollTop;p&&(s.scrollTop+=p),l&&(s.scrollLeft+=l);var h=s.scrollLeft-d,f=s.scrollTop-u;e={left:e.left-h,top:e.top-f,right:e.right-h,bottom:e.bottom-f}}if(a)break}}function Je(t){for(var e=[],n=t.ownerDocument;t&&(e.push({dom:t,top:t.scrollTop,left:t.scrollLeft}),t!=n);t=Ve(t));return e}function We(t,e){for(var n=0;n=a){s=Math.max(u.bottom,s),a=Math.min(u.top,a);var h=u.left>e.left?u.left-e.left:u.right=(u.left+u.right)/2?1:0));continue}}!n&&(e.left>=u.right&&e.top>=u.top||e.left>=u.left&&e.top>=u.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}:Ue(n,r)}function Ge(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Xe(t,e,n){var r=t.childNodes.length;if(r&&n.tope.top&&i++}o==t.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&e.top>o.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(l=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==l&&(l=function(t,e,n){var r=Ue(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:l,inside:m?m.posAtStart-m.border:-1}}function Qe(t,e){var n=t.getClientRects();return n.length?n[e<0?0:n.length-1]:t.getBoundingClientRect()}var Ze=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function tn(t,e,n){var r=t.docView.domFromPos(e,n<0?-1:1),o=r.node,i=r.offset,s=Se.webkit||Se.gecko;if(3==o.nodeType){if(!s||!Ze.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){var a=i,c=i,l=n<0?1:-1;return n<0&&!i?(c++,l=-1):n>=0&&i==o.nodeValue.length?(a--,l=1):n<0?a--:c++,en(Qe(De(o,a,c),l),l<0)}var p=Qe(De(o,i,i),n);if(Se.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i=0)}if(i&&(n<0||i==Be(o))){var m=o.childNodes[i-1],v=3==m.nodeType?De(m,Be(m)-(s?0:1)):1!=m.nodeType||"BR"==m.nodeName&&m.nextSibling?null:m;if(v)return en(Qe(v,1),!1)}if(i=0)}function en(t,e){if(0==t.width)return t;var n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function nn(t,e){if(0==t.height)return t;var n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function rn(t,e,n){var r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}var on=/[\u0590-\u08ac]/;var sn=null,an=null,cn=!1;function ln(t,e,n){return sn==e&&an==n?cn:(sn=e,an=n,cn="up"==n||"down"==n?function(t,e,n){var r=e.selection,o="up"==n?r.$from:r.$to;return rn(t,e,(function(){for(var e=t.docView.domFromPos(o.pos,"up"==n?-1:1).node;;){var r=t.docView.nearestDesc(e,!0);if(!r)break;if(r.node.isBlock){e=r.dom;break}e=r.dom.parentNode}for(var i=tn(t,o.pos,1),s=e.firstChild;s;s=s.nextSibling){var a=void 0;if(1==s.nodeType)a=s.getClientRects();else{if(3!=s.nodeType)continue;a=De(s,0,s.nodeValue.length).getClientRects()}for(var c=0;cl.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=t.root.getSelection();return on.test(r.parent.textContent)&&a.modify?rn(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 pn=function(t,e,n,r){this.parent=t,this.children=e,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},dn={beforePosition:{configurable:!0},size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0}};pn.prototype.matchesWidget=function(){return!1},pn.prototype.matchesMark=function(){return!1},pn.prototype.matchesNode=function(){return!1},pn.prototype.matchesHack=function(t){return!1},dn.beforePosition.get=function(){return!1},pn.prototype.parseRule=function(){return null},pn.prototype.stopEvent=function(){return!1},dn.size.get=function(){for(var t=0,e=0;eTe(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))a=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(var c=t;;c=c.parentNode){if(c==this.dom){a=!1;break}if(c.parentNode.firstChild!=c)break}if(null==a&&e==t.childNodes.length)for(var l=t;;l=l.parentNode){if(l==this.dom){a=!0;break}if(l.parentNode.lastChild!=l)break}}return(null==a?n>0:a)?this.posAtEnd:this.posAtStart},pn.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(1==t.nodeType?t:t.parentNode):o.nodeDOM==t))return o;n=!1}}},pn.prototype.getDesc=function(t){for(var e=t.pmViewDesc,n=e;n;n=n.parent)if(n==this)return e},pn.prototype.posFromDOM=function(t,e,n){for(var r=t;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(t,e,n)}return-1},pn.prototype.descAt=function(t){for(var e=0,n=0;e=t:s>t)&&(s>t||r+1>=this.children.length||!this.children[r+1].beforePosition))return i.domFromPos(t-n-i.border,e);n=s}},pn.prototype.parseRange=function(t,e,n){if(void 0===n&&(n=0),0==this.children.length)return{node:this.contentDOM,from:t,to:e,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,s=0;;s++){var a=this.children[s],c=i+a.size;if(-1==r&&t<=c){var l=i+a.border;if(t>=l&&e<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(t,e,l);t=i;for(var p=s;p>0;p--){var d=this.children[p-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){r=Te(d.dom)+1;break}t-=d.size}-1==r&&(r=0)}if(r>-1&&(c>e||s==this.children.length-1)){e=c;for(var u=s+1;ua&&ie){var x=p;p=d,d=x}var M=document.createRange();M.setEnd(d.node,d.offset),M.setStart(p.node,p.offset),u.removeAllRanges(),u.addRange(M)}}},pn.prototype.ignoreMutation=function(t){return!this.contentDOM&&"selection"!=t.type},dn.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},pn.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=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM?2:3}n=i}this.dirty=2},pn.prototype.markParentsDirty=function(){for(var t=1,e=this.parent;e;e=e.parent,t++){var n=1==t?2:1;e.dirty0&&(i=An(i,0,t,r));for(var a=0;a-1?i:null,a=i&&i.pos<0,c=new Tn(this,s&&s.node);!function(t,e,n,r){var o=e.locals(t),i=0;if(0==o.length){for(var s=0;si;)l.push(o[c++]);var y=i+m.nodeSize;if(m.isText){var b=y;c=0&&!s&&c.syncToMarks(i==n.node.childCount?p.none:n.node.child(i).marks,r,t),c.placeWidget(e,t,o)}),(function(e,n,s,l){var p;c.syncToMarks(e.marks,r,t),c.findNodeMatch(e,n,s,l)||a&&t.state.selection.from>o&&t.state.selection.to-1&&c.updateNodeAt(e,n,s,p,t)||c.updateNextNode(e,n,s,t,l)||c.addNode(e,n,s,t,o),o+=e.nodeSize})),c.syncToMarks(un,r,t),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||2==this.dirty)&&(s&&this.protectLocalComposition(t,s),kn(this.contentDOM,this.children,t),Se.ios&&function(t){if("UL"==t.nodeName||"OL"==t.nodeName){var e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}(this.dom))},e.prototype.localCompositionInfo=function(t,e){var n=t.state.selection,r=n.from,o=n.to;if(!(!(t.state.selection instanceof re)||re+this.node.content.size)){var i=t.root.getSelection(),s=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];e=Be(t=t.childNodes[e-1])}else{if(!(1==t.nodeType&&e=n){var p=c.lastIndexOf(e,r-a);if(p>=0&&p+e.length+a>=n)return a+p}}}return-1}(this.node.content,a,r-e,o-e);return c<0?null:{node:s,pos:c,text:a}}return{node:s,pos:-1}}}},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 fn(this,i,n,o);t.compositionNodes.push(s),this.children=An(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(!Nn(t,this.outerDeco)){var e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=On(this.dom,this.nodeDOM,Sn(this.outerDeco,this.node,e),Sn(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.removeAttribute("draggable")},n.domAtom.get=function(){return this.node.isAtom},Object.defineProperties(e.prototype,n),e}(pn);function gn(t,e,n,r,o){return En(r,e,t),new vn(null,t,e,n,r,r,r,o,0)}var yn=function(t){function e(e,n,r,o,i,s,a){t.call(this,e,n,r,o,i,null,s,a)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={domAtom:{configurable:!0}};return e.prototype.parseRule=function(){for(var t=this.nodeDOM.parentNode;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}},e.prototype.update=function(t,e,n,r){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,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),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.prototype.markDirty=function(e,n){t.prototype.markDirty.call(this,e,n),this.dom==this.nodeDOM||0!=e&&n!=this.nodeDOM.nodeValue.length||(this.dirty=3)},n.domAtom.get=function(){return!1},Object.defineProperties(e.prototype,n),e}(vn),bn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={domAtom:{configurable:!0}};return e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.matchesHack=function(t){return 0==this.dirty&&this.dom.nodeName==t},n.domAtom.get=function(){return!0},Object.defineProperties(e.prototype,n),e}(pn),wn=function(t){function e(e,n,r,o,i,s,a,c,l,p){t.call(this,e,n,r,o,i,s,a,l,p),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,r);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}(vn);function kn(t,e,n){for(var r=t.firstChild,o=!1,i=0;i0&&r>0;r--){var i=e[r-1],s=i.node;if(s){if(s!=t.child(n-1))break;--n,o.set(i,n)}}return{index:n,matched:o}}(t.node.content,t.children)};function Vn(t,e){return t.type.side-e.type.side}function An(t,e,n,r,o){for(var i=[],s=0,a=0;s=n||p<=e?i.push(c):(ln&&i.push(c.slice(n-l,c.size,r)))}return i}function Dn(t,e){var n=t.root.getSelection(),r=t.state.doc;if(!n.focusNode)return null;var o=t.docView.nearestDesc(n.focusNode),i=o&&0==o.size,s=t.docView.posFromDOM(n.focusNode,n.focusOffset);if(s<0)return null;var a,c,l=r.resolve(s);if(Le(n)){for(a=l;o&&!o.node;)o=o.parent;if(o&&o.node.isAtom&&ie.isSelectable(o.node)&&o.parent&&(!o.node.isInline||!function(t,e,n){for(var r=0==e,o=e==Be(t);r||o;){if(t==n)return!0;var i=Te(t);if(!(t=t.parentNode))return!1;r=r&&0==i,o=o&&i==Be(t)}}(n.focusNode,n.focusOffset,o.dom))){var p=o.posBefore;c=new ie(s==p?l:r.resolve(p))}}else{var d=t.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(d<0)return null;a=r.resolve(d)}c||(c=Fn(t,a,l,"pointer"==e||t.state.selection.head>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=mn.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++}},Tn.prototype.findNodeMatch=function(t,e,n,r){var o=this.top.children,i=-1;if(r>=this.preMatch.index){for(var s=this.index;s0?r.max(o):r.min(o),s=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return s&&te.findFrom(s,e)}function Jn(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Wn(t,e,n){var r=t.state.selection;if(!(r instanceof re)){if(r instanceof ie&&r.node.isInline)return Jn(t,new re(e>0?r.$to:r.$from));var o=qn(t.state,e);return!!o&&Jn(t,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(t.endOfTextblock(e>0?"right":"left")){var i=qn(t.state,e);return!!(i&&i instanceof ie)&&Jn(t,i)}if(!(Se.mac&&n.indexOf("m")>-1)){var s,a=r.$head,c=a.textOffset?null:e<0?a.nodeBefore:a.nodeAfter;if(!c||c.isText)return!1;var l=e<0?a.pos-c.nodeSize:a.pos;return!!(c.isAtom||(s=t.docView.descAt(l))&&!s.contentDOM)&&(ie.isSelectable(c)?Jn(t,new ie(e<0?t.state.doc.resolve(a.pos-c.nodeSize):a)):!!Se.webkit&&Jn(t,new re(t.state.doc.resolve(e<0?l:l+c.nodeSize))))}}function Kn(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Un(t){var e=t.pmViewDesc;return e&&0==e.size&&(t.nextSibling||"BR"!=t.nodeName)}function Gn(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){var o,i,s=!1;for(Se.gecko&&1==n.nodeType&&r0){if(1!=n.nodeType)break;var a=n.childNodes[r-1];if(Un(a))o=n,i=--r;else{if(3!=a.nodeType)break;r=(n=a).nodeValue.length}}else{if(Yn(n))break;for(var c=n.previousSibling;c&&Un(c);)o=n.parentNode,i=Te(c),c=c.previousSibling;if(c)r=Kn(n=c);else{if((n=n.parentNode)==t.dom)break;r=0}}s?Qn(t,e,n,r):o&&Qn(t,e,o,i)}}function Xn(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){for(var o,i,s=Kn(n);;)if(r-1)return!1;if(Se.mac&&n.indexOf("m")>-1)return!1;var o=r.$from,i=r.$to;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){var s=qn(t.state,e);if(s&&s instanceof ie)return Jn(t,s)}if(!o.parent.inlineContent){var a=e<0?o:i,c=r instanceof ae?te.near(a,e):te.findFrom(a,e);return!!c&&Jn(t,c)}return!1}function tr(t,e){if(!(t.state.selection instanceof re))return!0;var n=t.state.selection,r=n.$head,o=n.$anchor,i=n.empty;if(!r.sameParent(o))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;var s=!r.textOffset&&(e<0?r.nodeBefore:r.nodeAfter);if(s&&!s.isText){var a=t.state.tr;return e<0?a.delete(r.pos-s.nodeSize,r.pos):a.delete(r.pos,r.pos+s.nodeSize),t.dispatch(a),!0}return!1}function er(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function nr(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||Se.mac&&72==n&&"c"==r?tr(t,-1)||Gn(t):46==n||Se.mac&&68==n&&"c"==r?tr(t,1)||Xn(t):13==n||27==n||(37==n?Wn(t,-1,r)||Gn(t):39==n?Wn(t,1,r)||Xn(t):38==n?Zn(t,-1,r)||Gn(t):40==n?function(t){if(Se.safari&&!(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;er(t,o,!0),setTimeout((function(){return er(t,o,!1)}),20)}}}(t)||Zn(t,1,r)||Xn(t):r==(Se.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function rr(t){var e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(Se.safari&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(t.parentNode.lastChild==t||Se.safari&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0}}function or(t,e,n,r,o){if(e<0){var s=t.lastSelectionTime>Date.now()-50?t.lastSelectionOrigin:null,a=Dn(t,s);if(a&&!t.state.selection.eq(a)){var c=t.state.tr.setSelection(a);"pointer"==s?c.setMeta("pointer",!0):"key"==s&&c.scrollIntoView(),t.dispatch(c)}}else{var l=t.state.doc.resolve(e),p=l.sharedDepth(n);e=l.before(p+1),n=t.state.doc.resolve(n).after(p+1);var d=t.state.selection,u=function(t,e,n){var r=t.docView.parseRange(e,n),o=r.node,i=r.fromOffset,s=r.toOffset,a=r.from,c=r.to,l=t.root.getSelection(),p=null,d=l.anchorNode;if(d&&t.dom.contains(1==d.nodeType?d:d.parentNode)&&(p=[{node:d,offset:l.anchorOffset}],Le(l)||p.push({node:l.focusNode,offset:l.focusOffset})),Se.chrome&&8===t.lastKeyCode)for(var u=s;u>i;u--){var h=o.childNodes[u-1],f=h.pmViewDesc;if("BR"==h.nodeName&&!f){s=u;break}if(!f||f.size)break}var m=t.state.doc,v=t.someProp("domParser")||ot.fromSchema(t.state.schema),g=m.resolve(a),y=null,b=v.parse(o,{topNode:g.parent,topMatch:g.parent.contentMatchAt(g.index()),topOpen:!0,from:i,to:s,preserveWhitespace:!g.parent.type.spec.code||"full",editableContent:!0,findPositions:p,ruleFromNode:rr,context:g});if(p&&null!=p[0].pos){var w=p[0].pos,k=p[1]&&p[1].pos;null==k&&(k=w),y={anchor:w+a,head:k+a}}return{doc:b,sel:y,from:a,to:c}}(t,e,n);if(Se.chrome&&t.cursorWrapper&&u.sel&&u.sel.anchor==t.cursorWrapper.deco.from){var h=t.cursorWrapper.deco.type.toDOM.nextSibling,f=h&&h.nodeValue?h.nodeValue.length:1;u.sel={anchor:u.sel.anchor+f,head:u.sel.anchor+f}}var m,v,g=t.state.doc,y=g.slice(u.from,u.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}}(y.content,u.doc.content,u.from,m,v);if(!b){if(!(r&&d instanceof re&&!d.empty&&d.$head.sameParent(d.$anchor))||t.composing||u.sel&&u.sel.anchor!=u.sel.head){if((Se.ios&&t.lastIOSEnter>Date.now()-225||Se.android)&&o.some((function(t){return"DIV"==t.nodeName||"P"==t.nodeName}))&&t.someProp("handleKeyDown",(function(e){return e(t,je(13,"Enter"))})))return void(t.lastIOSEnter=0);if(u.sel){var w=ir(t,t.state.doc,u.sel);w&&!w.eq(t.state.selection)&&t.dispatch(t.state.tr.setSelection(w))}return}b={start:d.from,endA:d.to,endB:d.to}}t.domChangeCount++,t.state.selection.fromt.state.selection.from&&b.start<=t.state.selection.from+2?b.start=t.state.selection.from:b.endA=t.state.selection.to-2&&(b.endB+=t.state.selection.to-b.endA,b.endA=t.state.selection.to)),Se.ie&&Se.ie_version<=11&&b.endB==b.start+1&&b.endA==b.start&&b.start>u.from&&"  "==u.doc.textBetween(b.start-u.from-1,b.start-u.from+1)&&(b.start--,b.endA--,b.endB--);var k,x=u.doc.resolveNoCache(b.start-u.from),M=u.doc.resolveNoCache(b.endB-u.from),S=x.sameParent(M)&&x.parent.inlineContent;if((Se.ios&&t.lastIOSEnter>Date.now()-225&&(!S||o.some((function(t){return"DIV"==t.nodeName||"P"==t.nodeName})))||!S&&x.posb.start&&function(t,e,n,r,o){if(!r.parent.isTextblock||n-e<=o.pos-r.pos||sr(r,!0,!1)n||sr(s,!0,!1)e.content.size?null:Fn(t,e.resolve(n.anchor),e.resolve(n.head))}function sr(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 ar(t,e){for(var n=[],r=e.content,o=e.openStart,i=e.openEnd;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;var s=r.firstChild;n.push(s.type.name,s.attrs!=s.type.defaultAttrs?s.attrs:null),r=s.content}var a=t.someProp("clipboardSerializer")||mt.fromSchema(t.state.schema),c=mr(),l=c.createElement("div");l.appendChild(a.serializeFragment(r,{document:c}));for(var p,d=l.firstChild;d&&1==d.nodeType&&(p=hr[d.nodeName.toLowerCase()]);){for(var u=p.length-1;u>=0;u--){for(var h=c.createElement(p[u]);l.firstChild;)h.appendChild(l.firstChild);l.appendChild(h),"tbody"!=p[u]&&(o++,i++)}d=l.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice",o+" "+i+" "+JSON.stringify(n)),{dom:l,text:t.someProp("clipboardTextSerializer",(function(t){return t(e)}))||e.content.textBetween(0,e.content.size,"\n\n")}}function cr(t,e,n,r,o){var s,a,c=o.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||r)})),c)return new u(i.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0);var p=t.someProp("clipboardTextParser",(function(t){return t(e,o,r)}));if(p)a=p;else{var d=o.marks(),h=t.state.schema,f=mt.fromSchema(h);s=document.createElement("div"),e.trim().split(/(?:\r\n?|\n)+/).forEach((function(t){s.appendChild(document.createElement("p")).appendChild(f.serializeNode(h.text(t,d)))}))}}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=mr().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(t);(n=o&&hr[o[1].toLowerCase()])&&(t=n.map((function(t){return"<"+t+">"})).join("")+t+n.map((function(t){return""})).reverse().join(""));if(r.innerHTML=t,n)for(var i=0;i=0;c-=2){var l=r.nodes[n[c]];if(!l||l.hasRequiredAttrs())break;o=i.from(l.create(n[c+1],o)),s++,a++}return new u(o,s,a)}(function(t,e,n){e=0;r--){var o=n(r);if(o)return o.v}return t}(a.content,o),!1),t.someProp("transformPasted",(function(t){a=t(a)})),a}function lr(t,e,n){void 0===n&&(n=0);for(var r=e.length-1;r>=n;r--)t=e[r].create(null,i.from(t));return t}function pr(t,e,n,r,o){if(o=n&&(c=e<0?a.contentMatchAt(0).fillBefore(c,t.childCount>1||s<=o).append(c):c.append(a.contentMatchAt(a.childCount).fillBefore(i.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(c))}var hr={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},fr=null;function mr(){return fr||(fr=document.implementation.createHTMLDocument("title"))}var vr={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},gr=Se.ie&&Se.ie_version<=11,yr=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};yr.prototype.set=function(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset},yr.prototype.eq=function(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset};var br=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 yr,gr&&(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};br.prototype.flushSoon=function(){var t=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){t.flushingSoon=-1,t.flush()}),20))},br.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},br.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,vr),gr&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},br.prototype.stop=function(){var t=this;if(this.observer){var e=this.observer.takeRecords();if(e.length){for(var n=0;n-1)){var t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);var e=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&Hn(this.view)&&!this.ignoreSelectionChange(e),r=-1,o=-1,i=!1,s=[];if(this.view.editable)for(var a=0;a1){var l=s.filter((function(t){return"BR"==t.nodeName}));if(2==l.length){var p=l[0],d=l[1];p.parentNode&&p.parentNode.parentNode==d.parentNode?d.remove():p.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(t){if(wr)return;wr=!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,s),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(e)||Rn(this.view),this.currentSelection.set(e))}},br.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){for(var r=0;ri.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 Nr(t,e,n){t.focused||t.focus();var r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function _r(t,e,n,r,o){return Er(t,"handleClickOn",e,n,r)||t.someProp("handleClick",(function(n){return n(t,e,r)}))||(o?function(t,e){if(-1==e)return!1;var n,r,o=t.state.selection;o instanceof ie&&(n=o.node);for(var i=t.state.doc.resolve(e),s=i.depth+1;s>0;s--){var a=s>i.depth?i.nodeAfter:i.node(s);if(ie.isSelectable(a)){r=n&&o.$from.depth>0&&s>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(s);break}}return null!=r&&(Nr(t,ie.create(t.state.doc,r),"pointer"),!0)}(t,n):function(t,e){if(-1==e)return!1;var n=t.state.doc.resolve(e),r=n.nodeAfter;return!!(r&&r.isAtom&&ie.isSelectable(r))&&(Nr(t,new ie(n),"pointer"),!0)}(t,n))}function Tr(t,e,n,r){return Er(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",(function(n){return n(t,e,r)}))}function Vr(t,e,n,r){return Er(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",(function(n){return n(t,e,r)}))||function(t,e,n){if(0!=n.button)return!1;var r=t.state.doc;if(-1==e)return!!r.inlineContent&&(Nr(t,re.create(r,0,r.content.size),"pointer"),!0);for(var o=r.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)Nr(t,re.create(r,a+1,a+1+s.content.size),"pointer");else{if(!ie.isSelectable(s))continue;Nr(t,ie.create(r,a),"pointer")}return!0}}(t,n,r)}function Ar(t){return Lr(t)}xr.keydown=function(t,e){if(t.shiftKey=16==e.keyCode||e.shiftKey,!Rr(t,e))if(229!=e.keyCode&&t.domObserver.forceFlush(),t.lastKeyCode=e.keyCode,t.lastKeyCodeTime=Date.now(),!Se.ios||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)t.someProp("handleKeyDown",(function(n){return n(t,e)}))||nr(t,e)?e.preventDefault():Mr(t,"key");else{var n=Date.now();t.lastIOSEnter=n,t.lastIOSEnterFallbackTimeout=setTimeout((function(){t.lastIOSEnter==n&&(t.someProp("handleKeyDown",(function(e){return e(t,je(13,"Enter"))})),t.lastIOSEnter=0)}),200)}},xr.keyup=function(t,e){16==e.keyCode&&(t.shiftKey=!1)},xr.keypress=function(t,e){if(!(Rr(t,e)||!e.charCode||e.ctrlKey&&!e.altKey||Se.mac&&e.metaKey))if(t.someProp("handleKeyPress",(function(n){return n(t,e)})))e.preventDefault();else{var n=t.state.selection;if(!(n instanceof re&&n.$from.sameParent(n.$to))){var r=String.fromCharCode(e.charCode);t.someProp("handleTextInput",(function(e){return e(t,n.$from.pos,n.$to.pos,r)}))||t.dispatch(t.state.tr.insertText(r).scrollIntoView()),e.preventDefault()}}};var Dr=Se.mac?"metaKey":"ctrlKey";kr.mousedown=function(t,e){t.shiftKey=e.shiftKey;var n=Ar(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[Dr]&&("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(Cr(e));i&&("singleClick"==o?(t.mouseDown&&t.mouseDown.done(),t.mouseDown=new zr(t,i,e,n)):("doubleClick"==o?Tr:Vr)(t,i.pos,i.inside,e)?e.preventDefault():Mr(t,"pointer"))};var zr=function(t,e,n,r){var o,i,s=this;if(this.view=t,this.startDoc=t.state.doc,this.pos=e,this.event=n,this.flushed=r,this.selectNode=n[Dr],this.allowDefault=n.shiftKey,this.delayedSelectionSync=!1,e.inside>-1)o=t.state.doc.nodeAt(e.inside),i=e.inside;else{var a=t.state.doc.resolve(e.pos);o=a.parent,i=a.depth?a.before():0}this.mightDrag=null;var c=r?null:n.target,l=c?t.docView.nearestDesc(c,!0):null;this.target=l?l.dom:null;var p=t.state.selection;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||p instanceof ie&&p.from<=i&&p.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&Se.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(){s.view.mouseDown==s&&s.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)),Mr(t,"pointer")};function Rr(t,e){return!!t.composing||!!(Se.safari&&Math.abs(e.timeStamp-t.compositionEndedAt)<500)&&(t.compositionEndedAt=-2e8,!0)}zr.prototype.done=function(){var t=this;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.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((function(){return Rn(t.view)})),this.view.mouseDown=null},zr.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(Cr(t))),this.allowDefault||!e?Mr(this.view,"pointer"):_r(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||Se.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||Se.chrome&&!(this.view.state.selection instanceof re)&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(Nr(this.view,te.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):Mr(this.view,"pointer")}},zr.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),Mr(this.view,"pointer"),0==t.buttons&&this.done()},kr.touchdown=function(t){Ar(t),Mr(t,"pointer")},kr.contextmenu=function(t){return Ar(t)};var Ir=Se.android?5e3:-1;function Br(t,e){clearTimeout(t.composingTimeout),e>-1&&(t.composingTimeout=setTimeout((function(){return Lr(t)}),e))}function Pr(t){var e;for(t.composing&&(t.composing=!1,t.compositionEndedAt=((e=document.createEvent("Event")).initEvent("event",!0,!0),e.timeStamp));t.compositionNodes.length>0;)t.compositionNodes.pop().markParentsDirty()}function Lr(t,e){if(t.domObserver.forceFlush(),Pr(t),e||t.docView.dirty){var n=Dn(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):t.updateState(t.state),!0}return!1}xr.compositionstart=xr.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(),Lr(t,!0),t.markCursor=null;else if(Lr(t),Se.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 s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(3==s.nodeType){r.collapse(s,s.nodeValue.length);break}o=s,i=-1}t.composing=!0}Br(t,Ir)},xr.compositionend=function(t,e){t.composing&&(t.composing=!1,t.compositionEndedAt=e.timeStamp,Br(t,20))};var jr=Se.ie&&Se.ie_version<15||Se.ios&&Se.webkit_version<604;function $r(t,e,n,r){var o=cr(t,e,n,t.shiftKey,t.state.selection.$from);if(t.someProp("handlePaste",(function(e){return e(t,r,o||u.empty)})))return!0;if(!o)return!1;var i=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(o),s=i?t.state.tr.replaceSelectionWith(i,t.shiftKey):t.state.tr.replaceSelection(o);return t.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}kr.copy=xr.cut=function(t,e){var n=t.state.selection,r="cut"==e.type;if(!n.empty){var o=jr?null:e.clipboardData,i=ar(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){if(t.dom.parentNode){var n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),t.focus()}),50)}}(t,s),r&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},xr.paste=function(t,e){var n=jr?null:e.clipboardData;n&&$r(t,n.getData("text/plain"),n.getData("text/html"),e)?e.preventDefault():function(t,e){if(t.dom.parentNode){var n=t.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?$r(t,r.value,null,e):$r(t,r.textContent,r.innerHTML,e)}),50)}}(t,e)};var Fr=function(t,e){this.slice=t,this.move=e},Hr=Se.mac?"altKey":"ctrlKey";for(var qr in kr.dragstart=function(t,e){var n=t.mouseDown;if(n&&n.done(),e.dataTransfer){var r=t.state.selection,o=r.empty?null:t.posAtCoords(Cr(e));if(o&&o.pos>=r.from&&o.pos<=(r instanceof ie?r.to-1:r.to));else if(n&&n.mightDrag)t.dispatch(t.state.tr.setSelection(ie.create(t.state.doc,n.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){var i=t.docView.nearestDesc(e.target,!0);i&&i.node.type.spec.draggable&&i!=t.docView&&t.dispatch(t.state.tr.setSelection(ie.create(t.state.doc,i.posBefore)))}var s=t.state.selection.content(),a=ar(t,s),c=a.dom,l=a.text;e.dataTransfer.clearData(),e.dataTransfer.setData(jr?"Text":"text/html",c.innerHTML),e.dataTransfer.effectAllowed="copyMove",jr||e.dataTransfer.setData("text/plain",l),t.dragging=new Fr(s,!e[Hr])}},kr.dragend=function(t){var e=t.dragging;window.setTimeout((function(){t.dragging==e&&(t.dragging=null)}),50)},xr.dragover=xr.dragenter=function(t,e){return e.preventDefault()},xr.drop=function(t,e){var n=t.dragging;if(t.dragging=null,e.dataTransfer){var r=t.posAtCoords(Cr(e));if(r){var o=t.state.doc.resolve(r.pos);if(o){var i=n&&n.slice;i?t.someProp("transformPasted",(function(t){i=t(i)})):i=cr(t,e.dataTransfer.getData(jr?"Text":"text/plain"),jr?null:e.dataTransfer.getData("text/html"),!1,o);var s=n&&!e[Hr];if(t.someProp("handleDrop",(function(n){return n(t,e,i||u.empty,s)})))e.preventDefault();else if(i){e.preventDefault();var a=i?Lt(t.state.doc,o.pos,i):o.pos;null==a&&(a=o.pos);var c=t.state.tr;s&&c.deleteSelection();var l=c.mapping.map(a),p=0==i.openStart&&0==i.openEnd&&1==i.content.childCount,d=c.doc;if(p?c.replaceRangeWith(l,l,i.content.firstChild):c.replaceRange(l,l,i),!c.doc.eq(d)){var h=c.doc.resolve(l);if(p&&ie.isSelectable(i.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(i.content.firstChild))c.setSelection(new ie(h));else{var f=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach((function(t,e,n,r){return f=r})),c.setSelection(Fn(t,h,c.doc.resolve(f)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))}}}}}},kr.focus=function(t){t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout((function(){t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.root.getSelection())&&Rn(t)}),20))},kr.blur=function(t,e){t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),e.relatedTarget&&t.dom.contains(e.relatedTarget)&&t.domObserver.currentSelection.set({}),t.focused=!1)},kr.beforeinput=function(t,e){if(Se.chrome&&Se.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,je(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)}},xr)kr[qr]=xr[qr];function Jr(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 Wr=function(t,e){this.spec=e||Qr,this.side=this.spec.side||0,this.toDOM=t};Wr.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 Gr(i-n,i-n,this)},Wr.prototype.valid=function(){return!0},Wr.prototype.eq=function(t){return this==t||t instanceof Wr&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Jr(this.spec,t.spec))};var Kr=function(t,e){this.spec=e||Qr,this.attrs=t};Kr.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 Gr(o,i,this)},Kr.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)}},Zr.prototype.map=function(t,e,n){return this==to||0==t.maps.length?this:this.mapInner(t,e,0,0,n||Qr)},Zr.prototype.mapInner=function(t,e,n,r,o){for(var i,s=0;sc+i||(e>=a[s]+i?a[s+1]=-1:n>=o&&(l=r-n-(e-t))&&(a[s]+=l,a[s+1]+=l))}},l=0;l=r.content.size){p=!0;continue}var f=n.map(t[d+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==f){var b=a[d+2].mapInner(n,y,u+1,t[d]+i+1,s);b!=to?(a[d]=h,a[d+1]=f,a[d+2]=b):(a[d+1]=-2,p=!0)}else p=!0}if(p){var w=io(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 Kr){var l=Math.max(i,c.from)-i,p=Math.min(s,c.to)-i;ln&&s.to0;)e++;t.splice(e,0,n)}function lo(t){var e=[];return t.someProp("decorations",(function(n){var r=n(t.state);r&&r!=to&&e.push(r)})),t.cursorWrapper&&e.push(Zr.create(t.state.doc,[t.cursorWrapper.deco])),eo.from(e)}eo.prototype.map=function(t,e){var n=this.members.map((function(n){return n.map(t,e,Qr)}));return eo.from(n)},eo.prototype.forChild=function(t,e){if(e.isLeaf)return Zr.empty;for(var n=[],r=0;rr.scrollToSelection?"to selection":"preserve",p=o||!this.docView.matchesNode(t.doc,c,a);!p&&t.selection.eq(r.selection)||(i=!0);var d,u,h,f,m,v,g,y,b,w,k,x="preserve"==l&&i&&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:Je(t.dom)}}(this);if(i){this.domObserver.stop();var M=p&&(Se.ie||Se.chrome)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&(f=r.selection,m=t.selection,v=Math.min(f.$anchor.sharedDepth(f.head),m.$anchor.sharedDepth(m.head)),f.$anchor.start(v)!=m.$anchor.start(v));if(p){var S=Se.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!o&&this.docView.update(t.doc,c,a,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=gn(t.doc,c,a,this.dom,this)),S&&!this.trackWrites&&(M=!0)}M||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(d=this,u=d.docView.domFromPos(d.state.selection.anchor,0),h=d.root.getSelection(),ze(u.node,u.offset,h.anchorNode,h.anchorOffset)))?Rn(this,M):(jn(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(r),"reset"==l)this.dom.scrollTop=0;else if("to selection"==l){var O=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(t){return t(n)}))||(t.selection instanceof ie?qe(this,this.docView.domAfterPos(t.selection.from).getBoundingClientRect(),O):qe(this,this.coordsAtPos(t.selection.head,1),O))}else x&&(y=(g=x).refDOM,b=g.refTop,w=g.stack,k=y?y.getBoundingClientRect().top:0,We(w,0==k?0:k-b))},po.prototype.destroyPluginViews=function(){for(var t;t=this.pluginViews.pop();)t.destroy&&t.destroy()},po.prototype.updatePluginViews=function(t){if(t&&t.plugins==this.state.plugins)for(var e=0;e",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},bo="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),wo="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),ko="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),xo="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Mo="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),So=bo&&(xo||+bo[1]<57)||ko&&xo,Oo=0;Oo<10;Oo++)go[48+Oo]=go[96+Oo]=String(Oo);for(Oo=1;Oo<=24;Oo++)go[Oo+111]="F"+Oo;for(Oo=65;Oo<=90;Oo++)go[Oo]=String.fromCharCode(Oo+32),yo[Oo]=String.fromCharCode(Oo);for(var Co in go)yo.hasOwnProperty(Co)||(yo[Co]=go[Co]);var Eo="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);function No(t){var e,n,r,o,i=t.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(var a=0;a127)&&(r=go[n.keyCode])&&r!=o){var a=e[_o(r,n,!0)];if(a&&a(t.state,t.dispatch,t))return!0}else if(i&&n.shiftKey){var c=e[_o(o,n,!0)];if(c&&c(t.state,t.dispatch,t))return!0}return!1}}var Vo=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};function Ao(t,e,n,r,o,i){if(t.composing)return!1;var s=t.state,a=s.doc.resolve(e);if(a.parent.type.spec.code)return!1;for(var c=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,null,"")+r,l=0;l0))return!1;var o=Lo(r);if(!o){var i=r.blockRange(),s=i&&zt(i);return null!=s&&(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)}var a=o.nodeBefore;if(!a.type.spec.isolating&&Xo(t,o,e))return!0;if(0==r.parent.content.size&&(Bo(a,"end")||ie.isSelectable(a))){if(e){var c=t.tr.deleteRange(r.before(),r.after());c.setSelection(Bo(a,"end")?te.findFrom(c.doc.resolve(c.mapping.map(o.pos,-1)),-1):ie.create(c.doc,o.pos-a.nodeSize)),e(c.scrollIntoView())}return!0}return!(!a.isAtom||o.depth!=r.depth-1)&&(e&&e(t.tr.delete(o.pos-a.nodeSize,o.pos).scrollIntoView()),!0)}function Bo(t,e,n){for(;t;t="start"==e?t.firstChild:t.lastChild){if(t.isTextblock)return!0;if(n&&1!=t.childCount)return!1}return!1}function Po(t,e,n){var r=t.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):o.parentOffset>0)return!1;i=Lo(o)}var s=i&&i.nodeBefore;return!(!s||!ie.isSelectable(s))&&(e&&e(t.tr.setSelection(ie.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)}function Lo(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 jo(t,e,n){var r=t.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",t):r.parentOffset=0;e--){var n=t.node(e);if(t.index(e)+11&&n.after()!=n.end(-1)){var r=n.before();if(Bt(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}var o=n.blockRange(),i=o&&zt(o);return null!=i&&(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)}function Go(t,e){return e&&e(t.tr.setSelection(new ae(t.doc))),!0}function Xo(t,e,n){var r,o,s=e.nodeBefore,a=e.nodeAfter;if(s.type.spec.isolating||a.type.spec.isolating)return!1;if(function(t,e,n){var r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!(!(r&&o&&r.type.compatibleContent(o.type))||(!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),0):!e.parent.canReplace(i,i+1)||!o.isTextblock&&!Pt(t.doc,e.pos)||(n&&n(t.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),0)))}(t,e,n))return!0;var c=e.parent.canReplace(e.index(),e.index()+1);if(c&&(r=(o=s.contentMatchAt(s.childCount)).findWrapping(a.type))&&o.matchType(r[0]||a.type).validEnd){if(n){for(var l=e.pos+a.nodeSize,p=i.empty,d=r.length-1;d>=0;d--)p=i.from(r[d].create(null,p));p=i.from(s.copy(p));var h=t.tr.step(new Vt(e.pos-1,l,e.pos,l,new u(p,1,0),r.length,!0)),f=l+2*r.length;Pt(h.doc,f)&&h.join(f),n(h.scrollIntoView())}return!0}var m=te.findFrom(e,1),v=m&&m.$from.blockRange(m.$to),g=v&&zt(v);if(null!=g&&g>=e.depth)return n&&n(t.tr.lift(v,g).scrollIntoView()),!0;if(c&&Bo(a,"start",!0)&&Bo(s,"end")){for(var y=s,b=[];b.push(y),!y.isTextblock;)y=y.lastChild;for(var w=a,k=1;!w.isTextblock;w=w.firstChild)k++;if(y.canReplace(y.childCount,y.childCount,w.content)){if(n){for(var x=i.empty,M=b.length-1;M>=0;M--)x=i.from(b[M].copy(x));n(t.tr.step(new Vt(e.pos-b.length,e.pos+a.nodeSize,e.pos+k,e.pos+a.nodeSize-k,new u(x,b.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function Yo(t,e){return function(n,r){var o=n.selection,i=o.$from,s=o.$to,a=i.blockRange(s),c=a&&Rt(a,t,e);return!!c&&(r&&r(n.tr.wrap(a,c).scrollIntoView()),!0)}}function Qo(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return function(e,n,r){for(var o=0;o=2&&s.node(c.depth-1).type.compatibleContent(t)&&0==c.startIndex){if(0==s.index(c.depth-1))return!1;var d=n.doc.resolve(c.start-2);p=new T(d,d,c.depth),c.endIndex=0;a--)s=i.from(n[a].type.create(n[a].attrs,s));t.step(new Vt(e.start-(r?2:0),e.end,e.start,e.end,new u(s,0,0),n.length,!0));for(var c=0,l=0;lc;a--)s-=o.child(a).nodeSize,r.delete(s-1,s+1);var l=r.doc.resolve(n.start),p=l.nodeAfter,d=0==n.startIndex,h=n.endIndex==o.childCount,f=l.node(-1),m=l.index(-1);if(!f.canReplace(m+(d?0:1),m+1,p.content.append(h?i.empty:i.from(o))))return!1;var v=l.pos,g=v+p.nodeSize;return r.step(new Vt(v-(d?1:0),g+(h?1:0),v+1,g-1,new u((d?i.empty:i.from(o.copy(i.empty))).append(h?i.empty:i.from(o.copy(i.empty))),d?0:1,h?0:1),d?0:1)),e(r.scrollIntoView()),!0}(e,n,a)))}}function ei(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function ni(t,e){if("string"==typeof t){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function ri(t,e){if("string"==typeof t){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}function oi(t,e){const n=ri(e,t.schema),{from:r,to:o,empty:i}=t.selection;let s=[];i?s=t.selection.$head.marks():t.doc.nodesBetween(r,o,(t=>{s=[...s,...t.marks]}));const a=s.find((t=>t.type.name===n.name));return a?__spreadValues({},a.attrs):{}}function ii(t,e){const n=ei("string"==typeof e?e:e.name,t.schema);return"node"===n?function(t,e){const n=ni(e,t.schema),{from:r,to:o}=t.selection;let i=[];t.doc.nodesBetween(r,o,(t=>{i=[...i,t]}));const s=i.reverse().find((t=>t.type.name===n.name));return s?__spreadValues({},s.attrs):{}}(t,e):"mark"===n?oi(t,e):{}}function si(t,e,n={strict:!0}){const r=Object.keys(e);return!r.length||r.every((r=>{return n.strict?e[r]===t[r]:(o=e[r],"[object RegExp]"===Object.prototype.toString.call(o)?e[r].test(t[r]):e[r]===t[r]);var o}))}function ai(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,s=e?ni(e,t.schema):null;let a=[];if(t.doc.nodesBetween(r,o,((t,e)=>{if(!t.isText){const n=Math.max(r,e),i=Math.min(o,e+t.nodeSize);a=[...a,{node:t,from:n,to:i}]}})),i)return!!a.filter((t=>!s||s.name===t.node.type.name)).find((t=>si(t.node.attrs,n,{strict:!1})));const c=o-r;return a.filter((t=>!s||s.name===t.node.type.name)).filter((t=>si(t.node.attrs,n,{strict:!1}))).reduce(((t,e)=>t+(e.to-e.from)),0)>=c}function ci(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,s=e?ri(e,t.schema):null;if(i)return!!(t.storedMarks||t.selection.$from.marks()).filter((t=>!s||s.name===t.type.name)).find((t=>si(t.attrs,n,{strict:!1})));let a=0,c=[];if(t.doc.nodesBetween(r,o,((t,e)=>{if(t.isText){const n=Math.max(r,e),i=Math.min(o,e+t.nodeSize);a+=i-n,c=[...c,...t.marks.map((t=>({mark:t,from:n,to:i})))]}})),0===a)return!1;const l=c.filter((t=>!s||s.name===t.mark.type.name)).filter((t=>si(t.mark.attrs,n,{strict:!1}))).reduce(((t,e)=>t+(e.to-e.from)),0),p=c.filter((t=>!s||t.mark.type!==s&&t.mark.type.excludes(s))).reduce(((t,e)=>t+(e.to-e.from)),0);return(l>0?l+p:l)>=a}function li(t){const e=`${t}`;return(new window.DOMParser).parseFromString(e,"text/html").body}function pi(t,e,n){if(n=__spreadValues({slice:!0,parseOptions:{}},n),"object"==typeof t&&null!==t)try{return Array.isArray(t)?i.fromArray(t.map((t=>e.nodeFromJSON(t)))):e.nodeFromJSON(t)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",r),pi("",e,n)}if("string"==typeof t){const r=ot.fromSchema(e);return n.slice?r.parseSlice(li(t),n.parseOptions).content:r.parse(li(t),n.parseOptions)}return pi("",e,n)}function di(t,e,n={}){return pi(t,e,{slice:!1,parseOptions:n})}Qo(qo,Ko,Uo,(function(t,e){var n=t.selection,r=n.$from,o=n.$to;if(t.selection instanceof ie&&t.selection.node.isBlock)return!(!r.parentOffset||!Bt(t.doc,r.pos))&&(e&&e(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(e){var i=o.parentOffset==o.parent.content.size,s=t.tr;(t.selection instanceof re||t.selection instanceof ae)&&s.deleteSelection();var a=0==r.depth?null:Jo(r.node(-1).contentMatchAt(r.indexAfter(-1))),c=i&&a?[{type:a}]:null,l=Bt(s.doc,s.mapping.map(r.pos),1,c);if(c||l||!Bt(s.doc,s.mapping.map(r.pos),1,a&&[{type:a}])||(c=[{type:a}],l=!0),l&&(s.split(s.mapping.map(r.pos),1,c),!i&&!r.parentOffset&&r.parent.type!=a)){var p=s.mapping.map(r.before()),d=s.doc.resolve(p);r.node(-1).canReplaceWith(d.index(),d.index()+1,a)&&s.setNodeMarkup(s.mapping.map(r.before()),a)}e(s.scrollIntoView())}return!0})),"undefined"!=typeof navigator?/Mac/.test(navigator.platform):"undefined"!=typeof os&&os.platform();class ui{constructor(t,e){this.editor=t,this.commands=e}createCommands(){const{commands:t,editor:e}=this,{state:n,view:r}=e,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(t).map((([t,e])=>[t,(...t)=>{const n=e(...t)(i);return o.getMeta("preventDispatch")||r.dispatch(o),n}])))}createChain(t,e=!0){const{commands:n,editor:r}=this,{state:o,view:i}=r,s=[],a=!!t,c=t||o.tr,l=__spreadProps(__spreadValues({},Object.fromEntries(Object.entries(n).map((([t,n])=>[t,(...t)=>{const r=this.buildProps(c,e),o=n(...t)(r);return s.push(o),l}])))),{run:()=>(a||!e||c.getMeta("preventDispatch")||i.dispatch(c),s.every((t=>!0===t)))});return l}createCan(t){const{commands:e,editor:n}=this,{state:r}=n,o=void 0,i=t||r.tr,s=this.buildProps(i,o),a=Object.fromEntries(Object.entries(e).map((([t,e])=>[t,(...t)=>e(...t)(__spreadProps(__spreadValues({},s),{dispatch:o}))])));return __spreadProps(__spreadValues({},a),{chain:()=>this.createChain(i,o)})}buildProps(t,e=!0){const{editor:n,commands:r}=this,{state:o,view:i}=n;o.storedMarks&&t.setStoredMarks(o.storedMarks);const s={tr:t,editor:n,view:i,state:this.chainableState(t,o),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map((([t,e])=>[t,(...t)=>e(...t)(s)])))}};return s}chainableState(t,e){let{selection:n}=t,{doc:r}=t,{storedMarks:o}=t;return __spreadProps(__spreadValues({},e),{schema:e.schema,plugins:e.plugins,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return o},get selection(){return n},get doc(){return r},get tr(){return n=t.selection,r=t.doc,o=t.storedMarks,t}})}}function hi(t,e,n={}){if(void 0===t.config[e]&&t.parent)return hi(t.parent,e,n);if("function"==typeof t.config[e]){return t.config[e].bind(__spreadProps(__spreadValues({},n),{parent:t.parent?hi(t.parent,e,n):null}))}return t.config[e]}function fi(t){return{baseExtensions:t.filter((t=>"extension"===t.type)),nodeExtensions:t.filter((t=>"node"===t.type)),markExtensions:t.filter((t=>"mark"===t.type))}}function mi(t){const e=[],{nodeExtensions:n,markExtensions:r}=fi(t),o=[...n,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0};return t.forEach((t=>{const n=hi(t,"addGlobalAttributes",{name:t.name,options:t.options});if(!n)return;n().forEach((t=>{t.types.forEach((n=>{Object.entries(t.attributes).forEach((([t,r])=>{e.push({type:n,name:t,attribute:__spreadValues(__spreadValues({},i),r)})}))}))}))})),o.forEach((t=>{const n={name:t.name,options:t.options},r=hi(t,"addAttributes",n);if(!r)return;const o=r();Object.entries(o).forEach((([n,r])=>{e.push({type:t.name,name:n,attribute:__spreadValues(__spreadValues({},i),r)})}))})),e}function vi(...t){return t.filter((t=>!!t)).reduce(((t,e)=>{const n=__spreadValues({},t);return Object.entries(e).forEach((([t,e])=>{n[t]?n[t]="class"===t?[n[t],e].join(" "):"style"===t?[n[t],e].join("; "):e:n[t]=e})),n}),{})}function gi(t,e){return e.filter((t=>t.attribute.rendered)).map((e=>e.attribute.renderHTML?e.attribute.renderHTML(t.attrs)||{}:{[e.name]:t.attrs[e.name]})).reduce(((t,e)=>vi(t,e)),{})}function yi(t,e){return t.style?t:__spreadProps(__spreadValues({},t),{getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(!1===r)return!1;const o=e.filter((t=>t.attribute.rendered)).reduce(((t,e)=>{const r=e.attribute.parseHTML?e.attribute.parseHTML(n)||{}:{[e.name]:(o=n.getAttribute(e.name),"string"!=typeof o?o:o.match(/^\d*(\.\d+)?$/)?Number(o):"true"===o||"false"!==o&&o)};var o;const i=Object.fromEntries(Object.entries(r).filter((([,t])=>null!=t)));return __spreadValues(__spreadValues({},t),i)}),{});return __spreadValues(__spreadValues({},r),o)}})}function bi(t,e,...n){return"function"==typeof t?e?t.bind(e)(...n):t(...n):t}function wi(t){return Object.fromEntries(Object.entries(t).filter((([t,e])=>("attrs"!==t||!function(t={}){return 0===Object.keys(t).length&&t.constructor===Object}(e))&&null!=e)))}function ki(t,e){return e.nodes[t]?e.nodes[t]:e.marks[t]?e.marks[t]:null}class xi{constructor(t,e){this.splittableMarks=[],this.editor=e,this.extensions=xi.resolve(t),this.schema=function(t){var e;const n=mi(t),{nodeExtensions:r,markExtensions:o}=fi(t),i=null===(e=r.find((t=>hi(t,"topNode"))))||void 0===e?void 0:e.name,s=Object.fromEntries(r.map((e=>{const r=n.filter((t=>t.type===e.name)),o={name:e.name,options:e.options},i=t.reduce(((t,n)=>{const r=hi(n,"extendNodeSchema",o);return __spreadValues(__spreadValues({},t),r?r(e):{})}),{}),s=wi(__spreadProps(__spreadValues({},i),{content:bi(hi(e,"content",o)),marks:bi(hi(e,"marks",o)),group:bi(hi(e,"group",o)),inline:bi(hi(e,"inline",o)),atom:bi(hi(e,"atom",o)),selectable:bi(hi(e,"selectable",o)),draggable:bi(hi(e,"draggable",o)),code:bi(hi(e,"code",o)),defining:bi(hi(e,"defining",o)),isolating:bi(hi(e,"isolating",o)),attrs:Object.fromEntries(r.map((t=>{var e;return[t.name,{default:null===(e=null==t?void 0:t.attribute)||void 0===e?void 0:e.default}]})))})),a=bi(hi(e,"parseHTML",o));a&&(s.parseDOM=a.map((t=>yi(t,r))));const c=hi(e,"renderHTML",o);return c&&(s.toDOM=t=>c({node:t,HTMLAttributes:gi(t,r)})),[e.name,s]}))),a=Object.fromEntries(o.map((e=>{const r=n.filter((t=>t.type===e.name)),o={name:e.name,options:e.options},i=t.reduce(((t,n)=>{const r=hi(n,"extendMarkSchema",o);return __spreadValues(__spreadValues({},t),r?r(e):{})}),{}),s=wi(__spreadProps(__spreadValues({},i),{inclusive:bi(hi(e,"inclusive",o)),excludes:bi(hi(e,"excludes",o)),group:bi(hi(e,"group",o)),spanning:bi(hi(e,"spanning",o)),attrs:Object.fromEntries(r.map((t=>{var e;return[t.name,{default:null===(e=null==t?void 0:t.attribute)||void 0===e?void 0:e.default}]})))})),a=bi(hi(e,"parseHTML",o));a&&(s.parseDOM=a.map((t=>yi(t,r))));const c=hi(e,"renderHTML",o);return c&&(s.toDOM=t=>c({mark:t,HTMLAttributes:gi(t,r)})),[e.name,s]})));return new nt({topNode:i,nodes:s,marks:a})}(this.extensions),this.extensions.forEach((t=>{var e;const n={name:t.name,options:t.options,editor:this.editor,type:ki(t.name,this.schema)};if("mark"===t.type){(null===(e=bi(hi(t,"keepOnSplit",n)))||void 0===e||e)&&this.splittableMarks.push(t.name)}const r=hi(t,"onBeforeCreate",n);r&&this.editor.on("beforeCreate",r);const o=hi(t,"onCreate",n);o&&this.editor.on("create",o);const i=hi(t,"onUpdate",n);i&&this.editor.on("update",i);const s=hi(t,"onSelectionUpdate",n);s&&this.editor.on("selectionUpdate",s);const a=hi(t,"onTransaction",n);a&&this.editor.on("transaction",a);const c=hi(t,"onFocus",n);c&&this.editor.on("focus",c);const l=hi(t,"onBlur",n);l&&this.editor.on("blur",l);const p=hi(t,"onDestroy",n);p&&this.editor.on("destroy",p)}))}static resolve(t){return xi.sort(xi.flatten(t))}static flatten(t){return t.map((t=>{const e=hi(t,"addExtensions",{name:t.name,options:t.options});return e?[t,...this.flatten(e())]:t})).flat(10)}static sort(t){return t.sort(((t,e)=>{const n=hi(t,"priority")||100,r=hi(e,"priority")||100;return n>r?-1:n{const n=hi(e,"addCommands",{name:e.name,options:e.options,editor:this.editor,type:ki(e.name,this.schema)});return n?__spreadValues(__spreadValues({},t),n()):t}),{})}get plugins(){return[...this.extensions].reverse().map((t=>{const e={name:t.name,options:t.options,editor:this.editor,type:ki(t.name,this.schema)},n=[],r=hi(t,"addKeyboardShortcuts",e);if(r){const t=function(t){return new we({props:{handleKeyDown:To(t)}})}(Object.fromEntries(Object.entries(r()).map((([t,e])=>[t,()=>e({editor:this.editor})]))));n.push(t)}const o=hi(t,"addInputRules",e);if(this.editor.options.enableInputRules&&o){const t=o(),e=t.length?[(i={rules:t},s=i.rules,a=new we({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,e,n,r){return Ao(t,e,n,r,s,a)},handleDOMEvents:{compositionend:function(t){setTimeout((function(){var e=t.state.selection.$cursor;e&&Ao(t,e.pos,e.pos,"",s,a)}))}}},isInputRules:!0}),a)]:[];n.push(...e)}var i,s,a;const c=hi(t,"addPasteRules",e);if(this.editor.options.enablePasteRules&&c){const t=c();n.push(...t)}const l=hi(t,"addProseMirrorPlugins",e);if(l){const t=l();n.push(...t)}return n})).flat()}get attributes(){return mi(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=fi(this.extensions);return Object.fromEntries(e.filter((t=>!!hi(t,"addNodeView"))).map((e=>{const n=this.attributes.filter((t=>t.type===e.name)),r={name:e.name,options:e.options,editor:t,type:ni(e.name,this.schema)},o=hi(e,"addNodeView",r);if(!o)return[];return[e.name,(r,i,s,a)=>{const c=gi(r,n);return o()({editor:t,node:r,getPos:s,decorations:a,HTMLAttributes:c,extension:e})}]})))}get textSerializers(){const{editor:t}=this,{nodeExtensions:e}=fi(this.extensions);return Object.fromEntries(e.filter((t=>!!hi(t,"renderText"))).map((e=>{const n=hi(e,"renderText",{name:e.name,options:e.options,editor:t,type:ni(e.name,this.schema)});if(!n)return[];return[e.name,t=>n(t)]})))}}function Mi(t){return"Object"===function(t){return Object.prototype.toString.call(t).slice(8,-1)}(t)&&(t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype)}function Si(t,e){const n=__spreadValues({},t);return Mi(t)&&Mi(e)&&Object.keys(e).forEach((r=>{Mi(e[r])?r in t?n[r]=Si(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})})),n}class Oi{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=__spreadValues(__spreadValues({},this.config),t),this.name=this.config.name,this.options=this.config.defaultOptions}static create(t={}){return new Oi(t)}configure(t={}){const e=this.extend();return e.options=Si(this.options,t),e}extend(t={}){const e=new Oi(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,e.options=t.defaultOptions?t.defaultOptions:e.parent.options,e}}const Ci=Oi.create({name:"editable",addProseMirrorPlugins(){return[new we({key:new Me("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{from:e,to:n}=t.state.selection;return((t,e,n,r,o)=>{let i="",s=!0;return t.state.doc.nodesBetween(e,n,((a,c)=>{var l;const p=t.extensionManager.textSerializers[a.type.name];p?(i+=p({node:a}),s=!r):a.isText?(i+=null===(l=null==a?void 0:a.text)||void 0===l?void 0:l.slice(Math.max(e,c)-c,n-c),s=!r):a.isLeaf&&o?(i+=o,s=!r):!s&&a.isBlock&&(i+=r,s=!0)}),0),i})(t,e,n,"\n")}}})]}});var Ei=Object.freeze({__proto__:null,blur:()=>({editor:t,view:e})=>(requestAnimationFrame((()=>{t.isDestroyed||e.dom.blur()})),!0)});var Ni=Object.freeze({__proto__:null,clearContent:(t=!1)=>({commands:e})=>e.setContent("",t)});var _i=Object.freeze({__proto__:null,clearNodes:()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return o.forEach((r=>{t.doc.nodesBetween(r.$from.pos,r.$to.pos,((t,r)=>{if(t.type.isText)return;const o=e.doc.resolve(e.mapping.map(r)),i=e.doc.resolve(e.mapping.map(r+t.nodeSize)),s=o.blockRange(i);if(!s)return;const a=zt(s);if(t.type.isTextblock&&n){const{defaultType:t}=o.parent.contentMatchAt(o.index());e.setNodeMarkup(s.start,t)}(a||0===a)&&n&&e.lift(s,a)}))})),!0}});var Ti=Object.freeze({__proto__:null,command:t=>e=>t(e)});var Vi=Object.freeze({__proto__:null,createParagraphNear:()=>({state:t,dispatch:e})=>Ko(t,e)});var Ai=Object.freeze({__proto__:null,deleteNode:t=>({tr:e,state:n,dispatch:r})=>{const o=ni(t,n.schema),i=e.selection.$anchor;for(let t=i.depth;t>0;t-=1){if(i.node(t).type===o){if(r){const n=i.before(t),r=i.after(t);e.delete(n,r).scrollIntoView()}return!0}}return!1}});var Di=Object.freeze({__proto__:null,deleteRange:t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0}});var zi=Object.freeze({__proto__:null,deleteSelection:()=>({state:t,dispatch:e})=>Ro(t,e)});var Ri=Object.freeze({__proto__:null,enter:()=>({commands:t})=>t.keyboardShortcut("Enter")});var Ii=Object.freeze({__proto__:null,exitCode:()=>({state:t,dispatch:e})=>Wo(t,e)});function Bi(t,e,n={}){return t.find((t=>t.type===e&&si(t.attrs,n)))}function Pi(t,e,n={}){return!!Bi(t,e,n)}function Li(t,e,n={}){if(!t||!e)return;const r=t.parent.childAfter(t.parentOffset);if(!r.node)return;const o=Bi(r.node.marks,e,n);if(!o)return;let i=t.index(),s=t.start()+r.offset,a=i+1,c=s+r.node.nodeSize;for(Bi(r.node.marks,e,n);i>0&&o.isInSet(t.parent.child(i-1).marks);)i-=1,s-=t.parent.child(i).nodeSize;for(;a({tr:n,state:r,dispatch:o})=>{const i=ri(t,r.schema),{doc:s,selection:a}=n,{$from:c,from:l,to:p}=a;if(o){const t=Li(c,i,e);if(t&&t.from<=l&&t.to>=p){const e=re.create(s,t.from,t.to);n.setSelection(e)}}return!0}});var $i=Object.freeze({__proto__:null,first:t=>e=>{const n="function"==typeof t?t(e):t;for(let t=0;t({editor:e,view:n,tr:r,dispatch:o})=>{const i=()=>{(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document)&&n.dom.focus(),requestAnimationFrame((()=>{e.isDestroyed||(n.focus(),e.commands.scrollIntoView())}))};if(n.hasFocus()&&null===t||!1===t)return!0;if(o&&null===t&&!qi(e.state.selection))return i(),!0;const{from:s,to:a}=function(t,e=null){if(!e)return null;if("start"===e||!0===e)return{from:0,to:0};if("end"===e){const{size:e}=t.doc.content;return{from:e,to:e}}return{from:e,to:e}}(e.state,t)||e.state.selection,{doc:c,storedMarks:l}=r,p=te.atStart(c).from,d=te.atEnd(c).to,u=Fi(s,p,d),h=Fi(a,p,d),f=re.create(c,u,h),m=e.state.selection.eq(f);return o&&(m||r.setSelection(f),m&&l&&r.setStoredMarks(l),i()),!0}});var Wi=Object.freeze({__proto__:null,forEach:(t,e)=>n=>t.every(((t,r)=>e(t,__spreadProps(__spreadValues({},n),{index:r}))))});var Ki=Object.freeze({__proto__:null,insertContent:(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e)});var Ui=Object.freeze({__proto__:null,insertContentAt:(t,e,n)=>({tr:r,dispatch:o,editor:i})=>{if(o){const o=pi(e,i.schema,__spreadValues({parseOptions:{preserveWhitespace:"full"}},n||{}));if("<>"===o.toString())return!0;const{from:s,to:a}="number"==typeof t?{from:t,to:t}:t;r.replaceWith(s,a,o),function(t,e,n){const r=t.steps.length-1;if(r{0===s&&(s=r)})),t.setSelection(te.near(t.doc.resolve(s),n))}(r,r.steps.length-1,1)}return!0}});var Gi=Object.freeze({__proto__:null,joinBackward:()=>({state:t,dispatch:e})=>Io(t,e)});var Xi=Object.freeze({__proto__:null,joinForward:()=>({state:t,dispatch:e})=>jo(t,e)});const Yi="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);var Qi=Object.freeze({__proto__:null,keyboardShortcut:t=>({editor:e,view:n,tr:r,dispatch:o})=>{const i=function(t){const e=t.split(/-(?!$)/);let n,r,o,i,s=e[e.length-1];"Space"===s&&(s=" ");for(let a=0;a!["Alt","Ctrl","Meta","Shift"].includes(t))),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),c=e.captureTransaction((()=>{n.someProp("handleKeyDown",(t=>t(n,a)))}));return null==c||c.steps.forEach((t=>{const e=t.map(r.mapping);e&&o&&r.maybeStep(e)})),!0}});var Zi=Object.freeze({__proto__:null,lift:(t,e={})=>({state:n,dispatch:r})=>!!ai(n,ni(t,n.schema),e)&&Ho(n,r)});var ts=Object.freeze({__proto__:null,liftEmptyBlock:()=>({state:t,dispatch:e})=>Uo(t,e)});var es=Object.freeze({__proto__:null,liftListItem:t=>({state:e,dispatch:n})=>ti(ni(t,e.schema))(e,n)});var ns=Object.freeze({__proto__:null,newlineInCode:()=>({state:t,dispatch:e})=>qo(t,e)});function rs(t,e){const n="string"==typeof e?[e]:e;return Object.keys(t).reduce(((e,r)=>(n.includes(r)||(e[r]=t[r]),e)),{})}var is=Object.freeze({__proto__:null,resetAttributes:(t,e)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=ei("string"==typeof t?t:t.name,r.schema);return!!a&&("node"===a&&(i=ni(t,r.schema)),"mark"===a&&(s=ri(t,r.schema)),o&&n.selection.ranges.forEach((t=>{r.doc.nodesBetween(t.$from.pos,t.$to.pos,((t,r)=>{i&&i===t.type&&n.setNodeMarkup(r,void 0,rs(t.attrs,e)),s&&t.marks.length&&t.marks.forEach((o=>{s===o.type&&n.addMark(r,r+t.nodeSize,s.create(rs(o.attrs,e)))}))}))})),!0)}});var ss=Object.freeze({__proto__:null,scrollIntoView:()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0)});var as=Object.freeze({__proto__:null,selectAll:()=>({state:t,dispatch:e})=>Go(t,e)});var cs=Object.freeze({__proto__:null,selectNodeBackward:()=>({state:t,dispatch:e})=>Po(t,e)});var ls=Object.freeze({__proto__:null,selectNodeForward:()=>({state:t,dispatch:e})=>$o(t,e)});var ps=Object.freeze({__proto__:null,selectParentNode:()=>({state:t,dispatch:e})=>function(t,e){var n,r=t.selection,o=r.$from,i=r.to,s=o.sharedDepth(i);return 0!=s&&(n=o.before(s),e&&e(t.tr.setSelection(ie.create(t.doc,n))),!0)}(t,e)});var ds=Object.freeze({__proto__:null,setContent:(t,e=!1,n={})=>({tr:r,editor:o,dispatch:i})=>{const{doc:s}=r,a=di(t,o.schema,n),c=re.create(s,0,s.content.size);return i&&r.setSelection(c).replaceSelectionWith(a,!1).setMeta("preventUpdate",!e),!0}});var us=Object.freeze({__proto__:null,setMark:(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,c=ri(t,r.schema);if(o)if(s){const t=oi(r,c);n.addStoredMark(c.create(__spreadValues(__spreadValues({},t),e)))}else a.forEach((t=>{const o=t.$from.pos,i=t.$to.pos;r.doc.nodesBetween(o,i,((t,r)=>{const s=Math.max(r,o),a=Math.min(r+t.nodeSize,i);t.marks.find((t=>t.type===c))?t.marks.forEach((t=>{c===t.type&&n.addMark(s,a,c.create(__spreadValues(__spreadValues({},t.attrs),e)))})):n.addMark(s,a,c.create(e))}))}));return!0}});var hs=Object.freeze({__proto__:null,setMeta:(t,e)=>({tr:n})=>(n.setMeta(t,e),!0)});var fs=Object.freeze({__proto__:null,setNode:(t,e={})=>({state:n,dispatch:r})=>{const o=ni(t,n.schema);return(i=o,s=e,function(t,e){var n=t.selection,r=n.from,o=n.to,a=!1;return t.doc.nodesBetween(r,o,(function(e,n){if(a)return!1;if(e.isTextblock&&!e.hasMarkup(i,s))if(e.type==i)a=!0;else{var r=t.doc.resolve(n),o=r.index();a=r.parent.canReplaceWith(o,o+1,i)}})),!!a&&(e&&e(t.tr.setBlockType(r,o,i,s).scrollIntoView()),!0)})(n,r);var i,s}});var ms=Object.freeze({__proto__:null,setNodeSelection:t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,r=te.atStart(n).from,o=te.atEnd(n).to,i=Fi(t,r,o),s=ie.create(n,i);e.setSelection(s)}return!0}});var vs=Object.freeze({__proto__:null,setTextSelection:t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,{from:r,to:o}="number"==typeof t?{from:t,to:t}:t,i=te.atStart(n).from,s=te.atEnd(n).to,a=Fi(r,i,s),c=Fi(o,i,s),l=re.create(n,a,c);e.setSelection(l)}return!0}});var gs=Object.freeze({__proto__:null,sinkListItem:t=>({state:e,dispatch:n})=>{const r=ni(t,e.schema);return(o=r,function(t,e){var n=t.selection,r=n.$from,s=n.$to,a=r.blockRange(s,(function(t){return t.childCount&&t.firstChild.type==o}));if(!a)return!1;var c=a.startIndex;if(0==c)return!1;var l=a.parent,p=l.child(c-1);if(p.type!=o)return!1;if(e){var d=p.lastChild&&p.lastChild.type==l.type,h=i.from(d?o.create():null),f=new u(i.from(o.create(null,i.from(l.type.create(null,h)))),d?3:1,0),m=a.start,v=a.end;e(t.tr.step(new Vt(m-(d?3:1),v,m,v,f,1,!0)).scrollIntoView())}return!0})(e,n);var o}});function ys(t,e,n){return Object.fromEntries(Object.entries(n).filter((([n])=>{const r=t.find((t=>t.type===e&&t.name===n));return!!r&&r.attribute.keepOnSplit})))}function bs(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter((t=>null==e?void 0:e.includes(t.type.name)));t.tr.ensureMarks(r)}}var ws=Object.freeze({__proto__:null,splitBlock:({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=e,{$from:a,$to:c}=i,l=ys(o.extensionManager.attributes,a.node().type.name,a.node().attrs);if(i instanceof ie&&i.node.isBlock)return!(!a.parentOffset||!Bt(s,a.pos))&&(r&&(t&&bs(n,o.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(r){const r=c.parentOffset===c.parent.content.size;i instanceof re&&e.deleteSelection();const s=0===a.depth?void 0:function(t){for(let e=0;e({tr:e,state:n,dispatch:r,editor:o})=>{var s;const a=ni(t,n.schema),{$from:c,$to:l}=n.selection,p=n.selection.node;if(p&&p.isBlock||c.depth<2||!c.sameParent(l))return!1;const d=c.node(-1);if(d.type!==a)return!1;const h=o.extensionManager.attributes;if(0===c.parent.content.size&&c.node(-1).childCount===c.indexAfter(-1)){if(2===c.depth||c.node(-3).type!==a||c.index(-2)!==c.node(-2).childCount-1)return!1;if(r){let t=i.empty;const n=c.index(-1)?1:c.index(-2)?2:3;for(let e=c.depth-n;e>=c.depth-3;e-=1)t=i.from(c.node(e).copy(t));const r=c.indexAfter(-1){if(d>-1)return!1;t.isTextblock&&0===t.content.size&&(d=e+1)})),d>-1&&e.setSelection(re.near(e.doc.resolve(d))),e.scrollIntoView()}return!0}const f=l.pos===c.end()?d.contentMatchAt(0).defaultType:null,m=ys(h,d.type.name,d.attrs),v=ys(h,c.node().type.name,c.node().attrs);e.delete(c.pos,l.pos);const g=f?[{type:a,attrs:m},{type:f,attrs:v}]:[{type:a,attrs:m}];return!!Bt(e.doc,c.pos,2)&&(r&&e.split(c.pos,2,g).scrollIntoView(),!0)}});function xs(t,e){const{nodeExtensions:n}=fi(e),r=n.find((e=>e.name===t));if(!r)return!1;const o=bi(hi(r,"group",{name:r.name,options:r.options}));return"string"==typeof o&&o.split(" ").includes("list")}var Ms=Object.freeze({__proto__:null,toggleList:(t,e)=>({editor:n,tr:r,state:o,dispatch:i,chain:s,commands:a,can:c})=>{const{extensions:l}=n.extensionManager,p=ni(t,o.schema),d=ni(e,o.schema),{selection:u}=o,{$from:h,$to:f}=u,m=h.blockRange(f);if(!m)return!1;const v=(g=t=>xs(t.type.name,l),t=>function(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}(t.$from,g))(u);var g;if(m.depth>=1&&v&&m.depth-v.depth<=1){if(v.node.type===p)return a.liftListItem(d);if(xs(v.node.type.name,l)&&p.validContent(v.node.content)&&i)return r.setNodeMarkup(v.pos,p),!0}return c().wrapInList(p)?a.wrapInList(p):s().clearNodes().wrapInList(p).run()}});var Ss=Object.freeze({__proto__:null,toggleMark:(t,e={})=>({state:n,commands:r})=>{const o=ri(t,n.schema);return ci(n,o,e)?r.unsetMark(o):r.setMark(o,e)}});var Os=Object.freeze({__proto__:null,toggleNode:(t,e,n={})=>({state:r,commands:o})=>{const i=ni(t,r.schema),s=ni(e,r.schema);return ai(r,i,n)?o.setNode(s):o.setNode(i,n)}});var Cs=Object.freeze({__proto__:null,toggleWrap:(t,e={})=>({state:n,dispatch:r})=>{const o=ni(t,n.schema);return ai(n,o,e)?Ho(n,r):Yo(o,e)(n,r)}});var Es=Object.freeze({__proto__:null,undoInputRule:()=>({state:t,dispatch:e})=>function(t,e){for(var n=t.plugins,r=0;r=0;c--)s.step(a.steps[c].invert(a.docs[c]));if(i.text){var l=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,t.schema.text(i.text,l))}else s.delete(i.from,i.to);e(s)}return!0}}return!1}(t,e)});var Ns=Object.freeze({__proto__:null,unsetAllMarks:()=>({tr:t,state:e,dispatch:n})=>{const{selection:r}=t,{empty:o,ranges:i}=r;return o||n&&Object.entries(e.schema.marks).forEach((([,e])=>{i.forEach((n=>{t.removeMark(n.$from.pos,n.$to.pos,e)}))})),!0}});var _s=Object.freeze({__proto__:null,unsetMark:t=>({tr:e,state:n,dispatch:r})=>{const{selection:o}=e,i=ri(t,n.schema),{$from:s,empty:a,ranges:c}=o;if(r){if(a){let{from:t,to:n}=o;const r=Li(s,i);r&&(t=r.from,n=r.to),e.removeMark(t,n,i)}else c.forEach((t=>{e.removeMark(t.$from.pos,t.$to.pos,i)}));e.removeStoredMark(i)}return!0}});var Ts=Object.freeze({__proto__:null,updateAttributes:(t,e={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=ei("string"==typeof t?t:t.name,r.schema);return!!a&&("node"===a&&(i=ni(t,r.schema)),"mark"===a&&(s=ri(t,r.schema)),o&&n.selection.ranges.forEach((t=>{const o=t.$from.pos,a=t.$to.pos;r.doc.nodesBetween(o,a,((t,r)=>{i&&i===t.type&&n.setNodeMarkup(r,void 0,__spreadValues(__spreadValues({},t.attrs),e)),s&&t.marks.length&&t.marks.forEach((i=>{if(s===i.type){const c=Math.max(r,o),l=Math.min(r+t.nodeSize,a);n.addMark(c,l,s.create(__spreadValues(__spreadValues({},i.attrs),e)))}}))}))})),!0)}});var Vs=Object.freeze({__proto__:null,wrapIn:(t,e={})=>({state:n,dispatch:r})=>{const o=ni(t,n.schema);return!ai(n,o,e)&&Yo(o,e)(n,r)}});var As=Object.freeze({__proto__:null,wrapInList:(t,e={})=>({state:n,dispatch:r})=>Zo(ni(t,n.schema),e)(n,r)});const Ds=Oi.create({name:"commands",addCommands:()=>__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({},Ei),Ni),_i),Ti),Vi),Ai),Di),zi),Ri),Ii),ji),$i),Ji),Wi),Ki),Ui),Gi),Xi),Qi),Zi),ts),es),ns),is),ss),as),cs),ls),ps),ds),us),hs),fs),ms),vs),gs),ws),ks),Ms),Ss),Os),Cs),Es),Ns),_s),Ts),Vs),As)}),zs=Oi.create({name:"editable",addProseMirrorPlugins(){return[new we({key:new Me("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Rs=Oi.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new we({key:new Me("focusEvents"),props:{attributes:{tabindex:"0"},handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),Is=Oi.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first((({commands:t})=>[()=>t.undoInputRule(),()=>t.deleteSelection(),()=>t.joinBackward(),()=>t.selectNodeBackward()])),e=()=>this.editor.commands.first((({commands:t})=>[()=>t.deleteSelection(),()=>t.joinForward(),()=>t.selectNodeForward()]));return{Enter:()=>this.editor.commands.first((({commands:t})=>[()=>t.newlineInCode(),()=>t.createParagraphNear(),()=>t.liftEmptyBlock(),()=>t.splitBlock()])),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:()=>t(),"Mod-Backspace":()=>t(),Delete:()=>e(),"Mod-Delete":()=>e()}}});var Bs=Object.freeze({__proto__:null,ClipboardTextSerializer:Ci,Commands:Ds,Editable:zs,FocusEvents:Rs,Keymap:Is});class Ps{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=__spreadValues(__spreadValues({},this.config),t),this.name=this.config.name,this.options=this.config.defaultOptions}static create(t={}){return new Ps(t)}configure(t={}){const e=this.extend();return e.options=Si(this.options,t),e}extend(t={}){const e=new Ps(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,e.options=t.defaultOptions?t.defaultOptions:e.parent.options,e}}class Ls{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=__spreadValues(__spreadValues({},this.config),t),this.name=this.config.name,this.options=this.config.defaultOptions}static create(t={}){return new Ls(t)}configure(t={}){const e=this.extend();return e.options=Si(this.options,t),e}extend(t={}){const e=new Ls(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,e.options=t.defaultOptions?t.defaultOptions:e.parent.options,e}}function js(t,e,n){return new Vo(t,((t,r,o,i)=>{const s=n instanceof Function?n(r):n,{tr:a}=t;return r[0]&&a.replaceWith(o-1,i,e.create(s)),a}))}function $s(t,e,n){return new Vo(t,((t,r,o,i)=>{const s=n instanceof Function?n(r):n,{tr:a}=t,c=r[r.length-1],l=r[0];let p=i;if(c){const n=l.search(/\S/),r=o+l.indexOf(c),d=r+c.length;if(function(t,e,n){let r=[];return n.doc.nodesBetween(t,e,((t,e)=>{r=[...r,...t.marks.map((n=>({from:e,to:e+t.nodeSize,mark:n})))]})),r}(o,i,t).filter((t=>{const{excluded:n}=t.mark.type;return n.find((t=>t.name===e.name))})).filter((t=>t.to>r)).length)return null;do&&a.delete(o+n,r),p=o+n+c.length,a.addMark(o+n,p,e.create(s)),a.removeStoredMark(e)}return a}))}function Fs(t,e,n){const r=(o,s)=>{const a=[];return o.forEach((o=>{if(o.isText&&o.text){const{text:r}=o;let i,c=0;for(;null!==(i=t.exec(r));){const t=Math.max(i.length-2,0),r=Math.max(i.length-1,0);if(null==s?void 0:s.type.allowsMarkType(e)){const s=i.index+i[0].indexOf(i[t]),l=s+i[t].length,p=s+i[t].lastIndexOf(i[r]),d=p+i[r].length,u=n instanceof Function?n(i):n;if(!u&&void 0!==u)continue;s>0&&a.push(o.cut(c,s)),a.push(o.cut(p,d).mark(e.create(u).addToSet(o.marks))),c=l}}cnew u(r(t.content),t.openStart,t.openEnd)}})}function Hs(t,e,n){const r=t.coordsAtPos(e),o=t.coordsAtPos(n,-1),i=Math.min(r.top,o.top),s=Math.max(r.bottom,o.bottom),a=Math.min(r.left,o.left),c=Math.max(r.right,o.right),l={top:i,bottom:s,left:a,right:c,width:c-a,height:s-i,x:a,y:i};return __spreadProps(__spreadValues({},l),{toJSON:()=>l})}var qs="top",Js="bottom",Ws="right",Ks="left",Us="auto",Gs=[qs,Js,Ws,Ks],Xs="start",Ys="end",Qs="viewport",Zs="popper",ta=Gs.reduce((function(t,e){return t.concat([e+"-"+Xs,e+"-"+Ys])}),[]),ea=[].concat(Gs,[Us]).reduce((function(t,e){return t.concat([e,e+"-"+Xs,e+"-"+Ys])}),[]),na=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function ra(t){return t?(t.nodeName||"").toLowerCase():null}function oa(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ia(t){return t instanceof oa(t).Element||t instanceof Element}function sa(t){return t instanceof oa(t).HTMLElement||t instanceof HTMLElement}function aa(t){return"undefined"!=typeof ShadowRoot&&(t instanceof oa(t).ShadowRoot||t instanceof ShadowRoot)}var ca={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},r=e.attributes[t]||{},o=e.elements[t];sa(o)&&ra(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(t){var e=r[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var r=e.elements[t],o=e.attributes[t]||{},i=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});sa(r)&&ra(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]};function la(t){return t.split("-")[0]}var pa=Math.round;function da(t,e){void 0===e&&(e=!1);var n=t.getBoundingClientRect(),r=1,o=1;return sa(t)&&e&&(r=n.width/t.offsetWidth||1,o=n.height/t.offsetHeight||1),{width:pa(n.width/r),height:pa(n.height/o),top:pa(n.top/o),right:pa(n.right/r),bottom:pa(n.bottom/o),left:pa(n.left/r),x:pa(n.left/r),y:pa(n.top/o)}}function ua(t){var e=da(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function ha(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&aa(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function fa(t){return oa(t).getComputedStyle(t)}function ma(t){return["table","td","th"].indexOf(ra(t))>=0}function va(t){return((ia(t)?t.ownerDocument:t.document)||window.document).documentElement}function ga(t){return"html"===ra(t)?t:t.assignedSlot||t.parentNode||(aa(t)?t.host:null)||va(t)}function ya(t){return sa(t)&&"fixed"!==fa(t).position?t.offsetParent:null}function ba(t){for(var e=oa(t),n=ya(t);n&&ma(n)&&"static"===fa(n).position;)n=ya(n);return n&&("html"===ra(n)||"body"===ra(n)&&"static"===fa(n).position)?e:n||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&sa(t)&&"fixed"===fa(t).position)return null;for(var n=ga(t);sa(n)&&["html","body"].indexOf(ra(n))<0;){var r=fa(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||e&&"filter"===r.willChange||e&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(t)||e}function wa(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var ka=Math.max,xa=Math.min,Ma=Math.round;function Sa(t,e,n){return ka(t,xa(e,n))}function Oa(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Ca(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}var Ea={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Na(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.offsets,s=t.position,a=t.gpuAcceleration,c=t.adaptive,l=t.roundOffsets,p=!0===l?function(t){var e=t.x,n=t.y,r=window.devicePixelRatio||1;return{x:Ma(Ma(e*r)/r)||0,y:Ma(Ma(n*r)/r)||0}}(i):"function"==typeof l?l(i):i,d=p.x,u=void 0===d?0:d,h=p.y,f=void 0===h?0:h,m=i.hasOwnProperty("x"),v=i.hasOwnProperty("y"),g=Ks,y=qs,b=window;if(c){var w=ba(n),k="clientHeight",x="clientWidth";w===oa(n)&&"static"!==fa(w=va(n)).position&&(k="scrollHeight",x="scrollWidth"),w=w,o===qs&&(y=Js,f-=w[k]-r.height,f*=a?1:-1),o===Ks&&(g=Ws,u-=w[x]-r.width,u*=a?1:-1)}var M,S=Object.assign({position:s},c&&Ea);return a?Object.assign({},S,((M={})[y]=v?"0":"",M[g]=m?"0":"",M.transform=(b.devicePixelRatio||1)<2?"translate("+u+"px, "+f+"px)":"translate3d("+u+"px, "+f+"px, 0)",M)):Object.assign({},S,((e={})[y]=v?f+"px":"",e[g]=m?u+"px":"",e.transform="",e))}var _a={passive:!0};var Ta={left:"right",right:"left",bottom:"top",top:"bottom"};function Va(t){return t.replace(/left|right|bottom|top/g,(function(t){return Ta[t]}))}var Aa={start:"end",end:"start"};function Da(t){return t.replace(/start|end/g,(function(t){return Aa[t]}))}function za(t){var e=oa(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ra(t){return da(va(t)).left+za(t).scrollLeft}function Ia(t){var e=fa(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Ba(t){return["html","body","#document"].indexOf(ra(t))>=0?t.ownerDocument.body:sa(t)&&Ia(t)?t:Ba(ga(t))}function Pa(t,e){var n;void 0===e&&(e=[]);var r=Ba(t),o=r===(null==(n=t.ownerDocument)?void 0:n.body),i=oa(r),s=o?[i].concat(i.visualViewport||[],Ia(r)?r:[]):r,a=e.concat(s);return o?a:a.concat(Pa(ga(s)))}function La(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ja(t,e){return e===Qs?La(function(t){var e=oa(t),n=va(t),r=e.visualViewport,o=n.clientWidth,i=n.clientHeight,s=0,a=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,a=r.offsetTop)),{width:o,height:i,x:s+Ra(t),y:a}}(t)):sa(e)?function(t){var e=da(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):La(function(t){var e,n=va(t),r=za(t),o=null==(e=t.ownerDocument)?void 0:e.body,i=ka(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=ka(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+Ra(t),c=-r.scrollTop;return"rtl"===fa(o||n).direction&&(a+=ka(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:c}}(va(t)))}function $a(t,e,n){var r="clippingParents"===e?function(t){var e=Pa(ga(t)),n=["absolute","fixed"].indexOf(fa(t).position)>=0&&sa(t)?ba(t):t;return ia(n)?e.filter((function(t){return ia(t)&&ha(t,n)&&"body"!==ra(t)})):[]}(t):[].concat(e),o=[].concat(r,[n]),i=o[0],s=o.reduce((function(e,n){var r=ja(t,n);return e.top=ka(r.top,e.top),e.right=xa(r.right,e.right),e.bottom=xa(r.bottom,e.bottom),e.left=ka(r.left,e.left),e}),ja(t,i));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Fa(t){return t.split("-")[1]}function Ha(t){var e,n=t.reference,r=t.element,o=t.placement,i=o?la(o):null,s=o?Fa(o):null,a=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(i){case qs:e={x:a,y:n.y-r.height};break;case Js:e={x:a,y:n.y+n.height};break;case Ws:e={x:n.x+n.width,y:c};break;case Ks:e={x:n.x-r.width,y:c};break;default:e={x:n.x,y:n.y}}var l=i?wa(i):null;if(null!=l){var p="y"===l?"height":"width";switch(s){case Xs:e[l]=e[l]-(n[p]/2-r[p]/2);break;case Ys:e[l]=e[l]+(n[p]/2-r[p]/2)}}return e}function qa(t,e){void 0===e&&(e={});var n=e,r=n.placement,o=void 0===r?t.placement:r,i=n.boundary,s=void 0===i?"clippingParents":i,a=n.rootBoundary,c=void 0===a?Qs:a,l=n.elementContext,p=void 0===l?Zs:l,d=n.altBoundary,u=void 0!==d&&d,h=n.padding,f=void 0===h?0:h,m=Oa("number"!=typeof f?f:Ca(f,Gs)),v=p===Zs?"reference":Zs,g=t.elements.reference,y=t.rects.popper,b=t.elements[u?v:p],w=$a(ia(b)?b:b.contextElement||va(t.elements.popper),s,c),k=da(g),x=Ha({reference:k,element:y,strategy:"absolute",placement:o}),M=La(Object.assign({},y,x)),S=p===Zs?M:k,O={top:w.top-S.top+m.top,bottom:S.bottom-w.bottom+m.bottom,left:w.left-S.left+m.left,right:S.right-w.right+m.right},C=t.modifiersData.offset;if(p===Zs&&C){var E=C[o];Object.keys(O).forEach((function(t){var e=[Ws,Js].indexOf(t)>=0?1:-1,n=[qs,Js].indexOf(t)>=0?"y":"x";O[t]+=E[n]*e}))}return O}function Ja(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Wa(t){return[qs,Ws,Js,Ks].some((function(e){return t[e]>=0}))}function Ka(t,e,n){void 0===n&&(n=!1);var r,o,i=sa(e),s=sa(e)&&function(t){var e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return 1!==n||1!==r}(e),a=va(e),c=da(t,s),l={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(i||!i&&!n)&&(("body"!==ra(e)||Ia(a))&&(l=(r=e)!==oa(r)&&sa(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:za(r)),sa(e)?((p=da(e,!0)).x+=e.clientLeft,p.y+=e.clientTop):a&&(p.x=Ra(a))),{x:c.left+l.scrollLeft-p.x,y:c.top+l.scrollTop-p.y,width:c.width,height:c.height}}function Ua(t){var e=new Map,n=new Set,r=[];function o(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var r=e.get(t);r&&o(r)}})),r.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||o(t)})),r}var Ga={placement:"bottom",modifiers:[],strategy:"absolute"};function Xa(){for(var t=arguments.length,e=new Array(t),n=0;n=0?-1:1,i="function"==typeof n?n(Object.assign({},e,{placement:t})):n,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[Ks,Ws].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,e.rects,i),t}),{}),a=s[e.placement],c=a.x,l=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=l),e.modifiersData[r]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,s=n.altAxis,a=void 0===s||s,c=n.fallbackPlacements,l=n.padding,p=n.boundary,d=n.rootBoundary,u=n.altBoundary,h=n.flipVariations,f=void 0===h||h,m=n.allowedAutoPlacements,v=e.options.placement,g=la(v),y=c||(g===v||!f?[Va(v)]:function(t){if(la(t)===Us)return[];var e=Va(t);return[Da(t),e,Da(e)]}(v)),b=[v].concat(y).reduce((function(t,n){return t.concat(la(n)===Us?function(t,e){void 0===e&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?ea:c,p=Fa(r),d=p?a?ta:ta.filter((function(t){return Fa(t)===p})):Gs,u=d.filter((function(t){return l.indexOf(t)>=0}));0===u.length&&(u=d);var h=u.reduce((function(e,n){return e[n]=qa(t,{placement:n,boundary:o,rootBoundary:i,padding:s})[la(n)],e}),{});return Object.keys(h).sort((function(t,e){return h[t]-h[e]}))}(e,{placement:n,boundary:p,rootBoundary:d,padding:l,flipVariations:f,allowedAutoPlacements:m}):n)}),[]),w=e.rects.reference,k=e.rects.popper,x=new Map,M=!0,S=b[0],O=0;O=0,T=_?"width":"height",V=qa(e,{placement:C,boundary:p,rootBoundary:d,altBoundary:u,padding:l}),A=_?N?Ws:Ks:N?Js:qs;w[T]>k[T]&&(A=Va(A));var D=Va(A),z=[];if(i&&z.push(V[E]<=0),a&&z.push(V[A]<=0,V[D]<=0),z.every((function(t){return t}))){S=C,M=!1;break}x.set(C,z)}if(M)for(var R=function(t){var e=b.find((function(e){var n=x.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return S=e,"break"},I=f?3:1;I>0;I--){if("break"===R(I))break}e.placement!==S&&(e.modifiersData[r]._skip=!0,e.placement=S,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=void 0===o||o,s=n.altAxis,a=void 0!==s&&s,c=n.boundary,l=n.rootBoundary,p=n.altBoundary,d=n.padding,u=n.tether,h=void 0===u||u,f=n.tetherOffset,m=void 0===f?0:f,v=qa(e,{boundary:c,rootBoundary:l,padding:d,altBoundary:p}),g=la(e.placement),y=Fa(e.placement),b=!y,w=wa(g),k="x"===w?"y":"x",x=e.modifiersData.popperOffsets,M=e.rects.reference,S=e.rects.popper,O="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,C={x:0,y:0};if(x){if(i||a){var E="y"===w?qs:Ks,N="y"===w?Js:Ws,_="y"===w?"height":"width",T=x[w],V=x[w]+v[E],A=x[w]-v[N],D=h?-S[_]/2:0,z=y===Xs?M[_]:S[_],R=y===Xs?-S[_]:-M[_],I=e.elements.arrow,B=h&&I?ua(I):{width:0,height:0},P=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},L=P[E],j=P[N],$=Sa(0,M[_],B[_]),F=b?M[_]/2-D-$-L-O:z-$-L-O,H=b?-M[_]/2+D+$+j+O:R+$+j+O,q=e.elements.arrow&&ba(e.elements.arrow),J=q?"y"===w?q.clientTop||0:q.clientLeft||0:0,W=e.modifiersData.offset?e.modifiersData.offset[e.placement][w]:0,K=x[w]+F-W-J,U=x[w]+H-W;if(i){var G=Sa(h?xa(V,K):V,T,h?ka(A,U):A);x[w]=G,C[w]=G-T}if(a){var X="x"===w?qs:Ks,Y="x"===w?Js:Ws,Q=x[k],Z=Q+v[X],tt=Q-v[Y],et=Sa(h?xa(Z,K):Z,Q,h?ka(tt,U):tt);x[k]=et,C[k]=et-Q}}e.modifiersData[r]=C}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,a=la(n.placement),c=wa(a),l=[Ks,Ws].indexOf(a)>=0?"height":"width";if(i&&s){var p=function(t,e){return Oa("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Ca(t,Gs))}(o.padding,n),d=ua(i),u="y"===c?qs:Ks,h="y"===c?Js:Ws,f=n.rects.reference[l]+n.rects.reference[c]-s[c]-n.rects.popper[l],m=s[c]-n.rects.reference[c],v=ba(i),g=v?"y"===c?v.clientHeight||0:v.clientWidth||0:0,y=f/2-m/2,b=p[u],w=g-d[l]-p[h],k=g/2-d[l]/2+y,x=Sa(b,k,w),M=c;n.modifiersData[r]=((e={})[M]=x,e.centerOffset=x-k,e)}},effect:function(t){var e=t.state,n=t.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=e.elements.popper.querySelector(r)))&&ha(e.elements.popper,r)&&(e.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=qa(e,{elementContext:"reference"}),a=qa(e,{altBoundary:!0}),c=Ja(s,r),l=Ja(a,o,i),p=Wa(c),d=Wa(l);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:p,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":d})}}]}),Za="tippy-content",tc="tippy-arrow",ec="tippy-svg-arrow",nc={passive:!0,capture:!0};function rc(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function oc(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function ic(t,e){return"function"==typeof t?t.apply(void 0,e):t}function sc(t,e){return 0===e?t:function(r){clearTimeout(n),n=setTimeout((function(){t(r)}),e)};var n}function ac(t){return[].concat(t)}function cc(t,e){-1===t.indexOf(e)&&t.push(e)}function lc(t){return[].slice.call(t)}function pc(){return document.createElement("div")}function dc(t){return["Element","Fragment"].some((function(e){return oc(t,e)}))}function uc(t){return dc(t)?[t]:function(t){return oc(t,"NodeList")}(t)?lc(t):Array.isArray(t)?t:lc(document.querySelectorAll(t))}function hc(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function fc(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function mc(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[r](e,n)}))}var vc={isTouch:!1},gc=0;function yc(){vc.isTouch||(vc.isTouch=!0,window.performance&&document.addEventListener("mousemove",bc))}function bc(){var t=performance.now();t-gc<20&&(vc.isTouch=!1,document.removeEventListener("mousemove",bc)),gc=t}function wc(){var t,e=document.activeElement;if((t=e)&&t._tippy&&t._tippy.reference===t){var n=e._tippy;e.blur&&!n.state.isVisible&&e.blur()}}var kc="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",xc=/MSIE |Trident\//.test(kc),Mc=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Sc=Object.keys(Mc);function Oc(t){var e=(t.plugins||[]).reduce((function(e,n){var r=n.name,o=n.defaultValue;return r&&(e[r]=void 0!==t[r]?t[r]:o),e}),{});return Object.assign({},t,{},e)}function Cc(t,e){var n=Object.assign({},e,{content:ic(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Oc(Object.assign({},Mc,{plugins:e}))):Sc).reduce((function(e,n){var r=(t.getAttribute("data-tippy-"+n)||"").trim();if(!r)return e;if("content"===n)e[n]=r;else try{e[n]=JSON.parse(r)}catch(o){e[n]=r}return e}),{})}(t,e.plugins));return n.aria=Object.assign({},Mc.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?e.interactive:n.aria.expanded,content:"auto"===n.aria.content?e.interactive?null:"describedby":n.aria.content},n}function Ec(t,e){t.innerHTML=e}function Nc(t){var e=pc();return!0===t?e.className=tc:(e.className=ec,dc(t)?e.appendChild(t):Ec(e,t)),e}function _c(t,e){dc(e.content)?(Ec(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Ec(t,e.content):t.textContent=e.content)}function Tc(t){var e=t.firstElementChild,n=lc(e.children);return{box:e,content:n.find((function(t){return t.classList.contains(Za)})),arrow:n.find((function(t){return t.classList.contains(tc)||t.classList.contains(ec)})),backdrop:n.find((function(t){return t.classList.contains("tippy-backdrop")}))}}function Vc(t){var e=pc(),n=pc();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=pc();function o(n,r){var o=Tc(e),i=o.box,s=o.content,a=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||_c(s,t.props),r.arrow?a?n.arrow!==r.arrow&&(i.removeChild(a),i.appendChild(Nc(r.arrow))):i.appendChild(Nc(r.arrow)):a&&i.removeChild(a)}return r.className=Za,r.setAttribute("data-state","hidden"),_c(r,t.props),e.appendChild(n),n.appendChild(r),o(t.props,t.props),{popper:e,onUpdate:o}}Vc.$$tippy=!0;var Ac=1,Dc=[],zc=[];function Rc(t,e){var n,r,o,i,s,a,c,l,p,d=Cc(t,Object.assign({},Mc,{},Oc((n=e,Object.keys(n).reduce((function(t,e){return void 0!==n[e]&&(t[e]=n[e]),t}),{}))))),u=!1,h=!1,f=!1,m=!1,v=[],g=sc(U,d.interactiveDebounce),y=Ac++,b=(p=d.plugins).filter((function(t,e){return p.indexOf(t)===e})),w={id:y,reference:t,popper:pc(),popperInstance:null,props:d,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(i)},setProps:function(e){if(w.state.isDestroyed)return;z("onBeforeUpdate",[w,e]),W();var n=w.props,r=Cc(t,Object.assign({},w.props,{},e,{ignoreAttributes:!0}));w.props=r,J(),n.interactiveDebounce!==r.interactiveDebounce&&(B(),g=sc(U,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?ac(n.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):r.triggerTarget&&t.removeAttribute("aria-expanded");I(),D(),M&&M(n,r);w.popperInstance&&(Q(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));z("onAfterUpdate",[w,e])},setContent:function(t){w.setProps({content:t})},show:function(){var t=w.state.isVisible,e=w.state.isDestroyed,n=!w.state.isEnabled,r=vc.isTouch&&!w.props.touch,o=rc(w.props.duration,0,Mc.duration);if(t||e||n||r)return;if(_().hasAttribute("disabled"))return;if(z("onShow",[w],!1),!1===w.props.onShow(w))return;w.state.isVisible=!0,N()&&(x.style.visibility="visible");D(),$(),w.state.isMounted||(x.style.transition="none");if(N()){var i=V(),s=i.box,a=i.content;hc([s,a],0)}c=function(){var t;if(w.state.isVisible&&!m){if(m=!0,x.offsetHeight,x.style.transition=w.props.moveTransition,N()&&w.props.animation){var e=V(),n=e.box,r=e.content;hc([n,r],o),fc([n,r],"visible")}R(),I(),cc(zc,w),null==(t=w.popperInstance)||t.forceUpdate(),w.state.isMounted=!0,z("onMount",[w]),w.props.animation&&N()&&function(t,e){H(t,e)}(o,(function(){w.state.isShown=!0,z("onShown",[w])}))}},function(){var t,e=w.props.appendTo,n=_();t=w.props.interactive&&e===Mc.appendTo||"parent"===e?n.parentNode:ic(e,[n]);t.contains(x)||t.appendChild(x);Q()}()},hide:function(){var t=!w.state.isVisible,e=w.state.isDestroyed,n=!w.state.isEnabled,r=rc(w.props.duration,1,Mc.duration);if(t||e||n)return;if(z("onHide",[w],!1),!1===w.props.onHide(w))return;w.state.isVisible=!1,w.state.isShown=!1,m=!1,u=!1,N()&&(x.style.visibility="hidden");if(B(),F(),D(),N()){var o=V(),i=o.box,s=o.content;w.props.animation&&(hc([i,s],r),fc([i,s],"hidden"))}R(),I(),w.props.animation?N()&&function(t,e){H(t,(function(){!w.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&e()}))}(r,w.unmount):w.unmount()},hideWithInteractivity:function(t){T().addEventListener("mousemove",g),cc(Dc,g),g(t)},enable:function(){w.state.isEnabled=!0},disable:function(){w.hide(),w.state.isEnabled=!1},unmount:function(){w.state.isVisible&&w.hide();if(!w.state.isMounted)return;Z(),tt().forEach((function(t){t._tippy.unmount()})),x.parentNode&&x.parentNode.removeChild(x);zc=zc.filter((function(t){return t!==w})),w.state.isMounted=!1,z("onHidden",[w])},destroy:function(){if(w.state.isDestroyed)return;w.clearDelayTimeouts(),w.unmount(),W(),delete t._tippy,w.state.isDestroyed=!0,z("onDestroy",[w])}};if(!d.render)return w;var k=d.render(w),x=k.popper,M=k.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+w.id,w.popper=x,t._tippy=w,x._tippy=w;var S=b.map((function(t){return t.fn(w)})),O=t.hasAttribute("aria-expanded");return J(),I(),D(),z("onCreate",[w]),d.showOnCreate&&et(),x.addEventListener("mouseenter",(function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()})),x.addEventListener("mouseleave",(function(t){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&(T().addEventListener("mousemove",g),g(t))})),w;function C(){var t=w.props.touch;return Array.isArray(t)?t:[t,0]}function E(){return"hold"===C()[0]}function N(){var t;return!!(null==(t=w.props.render)?void 0:t.$$tippy)}function _(){return l||t}function T(){var t,e,n=_().parentNode;return n?(null==(e=ac(n)[0])||null==(t=e.ownerDocument)?void 0:t.body)?e.ownerDocument:document:document}function V(){return Tc(x)}function A(t){return w.state.isMounted&&!w.state.isVisible||vc.isTouch||s&&"focus"===s.type?0:rc(w.props.delay,t?0:1,Mc.delay)}function D(){x.style.pointerEvents=w.props.interactive&&w.state.isVisible?"":"none",x.style.zIndex=""+w.props.zIndex}function z(t,e,n){var r;(void 0===n&&(n=!0),S.forEach((function(n){n[t]&&n[t].apply(void 0,e)})),n)&&(r=w.props)[t].apply(r,e)}function R(){var e=w.props.aria;if(e.content){var n="aria-"+e.content,r=x.id;ac(w.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(n);if(w.state.isVisible)t.setAttribute(n,e?e+" "+r:r);else{var o=e&&e.replace(r,"").trim();o?t.setAttribute(n,o):t.removeAttribute(n)}}))}}function I(){!O&&w.props.aria.expanded&&ac(w.props.triggerTarget||t).forEach((function(t){w.props.interactive?t.setAttribute("aria-expanded",w.state.isVisible&&t===_()?"true":"false"):t.removeAttribute("aria-expanded")}))}function B(){T().removeEventListener("mousemove",g),Dc=Dc.filter((function(t){return t!==g}))}function P(t){if(!(vc.isTouch&&(f||"mousedown"===t.type)||w.props.interactive&&x.contains(t.target))){if(_().contains(t.target)){if(vc.isTouch)return;if(w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else z("onClickOutside",[w,t]);!0===w.props.hideOnClick&&(w.clearDelayTimeouts(),w.hide(),h=!0,setTimeout((function(){h=!1})),w.state.isMounted||F())}}function L(){f=!0}function j(){f=!1}function $(){var t=T();t.addEventListener("mousedown",P,!0),t.addEventListener("touchend",P,nc),t.addEventListener("touchstart",j,nc),t.addEventListener("touchmove",L,nc)}function F(){var t=T();t.removeEventListener("mousedown",P,!0),t.removeEventListener("touchend",P,nc),t.removeEventListener("touchstart",j,nc),t.removeEventListener("touchmove",L,nc)}function H(t,e){var n=V().box;function r(t){t.target===n&&(mc(n,"remove",r),e())}if(0===t)return e();mc(n,"remove",a),mc(n,"add",r),a=r}function q(e,n,r){void 0===r&&(r=!1),ac(w.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,n,r),v.push({node:t,eventType:e,handler:n,options:r})}))}function J(){var t;E()&&(q("touchstart",K,{passive:!0}),q("touchend",G,{passive:!0})),(t=w.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(q(t,K),t){case"mouseenter":q("mouseleave",G);break;case"focus":q(xc?"focusout":"blur",X);break;case"focusin":q("focusout",X)}}))}function W(){v.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,o=t.options;e.removeEventListener(n,r,o)})),v=[]}function K(t){var e,n=!1;if(w.state.isEnabled&&!Y(t)&&!h){var r="focus"===(null==(e=s)?void 0:e.type);s=t,l=t.currentTarget,I(),!w.state.isVisible&&oc(t,"MouseEvent")&&Dc.forEach((function(e){return e(t)})),"click"===t.type&&(w.props.trigger.indexOf("mouseenter")<0||u)&&!1!==w.props.hideOnClick&&w.state.isVisible?n=!0:et(t),"click"===t.type&&(u=!n),n&&!r&&nt(t)}}function U(t){var e=t.target,n=_().contains(e)||x.contains(e);"mousemove"===t.type&&n||function(t,e){var n=e.clientX,r=e.clientY;return t.every((function(t){var e=t.popperRect,o=t.popperState,i=t.props.interactiveBorder,s=o.placement.split("-")[0],a=o.modifiersData.offset;if(!a)return!0;var c="bottom"===s?a.top.y:0,l="top"===s?a.bottom.y:0,p="right"===s?a.left.x:0,d="left"===s?a.right.x:0,u=e.top-r+c>i,h=r-e.bottom-l>i,f=e.left-n+p>i,m=n-e.right-d>i;return u||h||f||m}))}(tt().concat(x).map((function(t){var e,n=null==(e=t._tippy.popperInstance)?void 0:e.state;return n?{popperRect:t.getBoundingClientRect(),popperState:n,props:d}:null})).filter(Boolean),t)&&(B(),nt(t))}function G(t){Y(t)||w.props.trigger.indexOf("click")>=0&&u||(w.props.interactive?w.hideWithInteractivity(t):nt(t))}function X(t){w.props.trigger.indexOf("focusin")<0&&t.target!==_()||w.props.interactive&&t.relatedTarget&&x.contains(t.relatedTarget)||nt(t)}function Y(t){return!!vc.isTouch&&E()!==t.type.indexOf("touch")>=0}function Q(){Z();var e=w.props,n=e.popperOptions,r=e.placement,o=e.offset,i=e.getReferenceClientRect,s=e.moveTransition,a=N()?Tc(x).arrow:null,l=i?{getBoundingClientRect:i,contextElement:i.contextElement||_()}:t,p=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(N()){var n=V().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?n.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?n.setAttribute("data-"+t,""):n.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];N()&&a&&p.push({name:"arrow",options:{element:a,padding:3}}),p.push.apply(p,(null==n?void 0:n.modifiers)||[]),w.popperInstance=Qa(l,x,Object.assign({},n,{placement:r,onFirstUpdate:c,modifiers:p}))}function Z(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function tt(){return lc(x.querySelectorAll("[data-tippy-root]"))}function et(t){w.clearDelayTimeouts(),t&&z("onTrigger",[w,t]),$();var e=A(!0),n=C(),o=n[0],i=n[1];vc.isTouch&&"hold"===o&&i&&(e=i),e?r=setTimeout((function(){w.show()}),e):w.show()}function nt(t){if(w.clearDelayTimeouts(),z("onUntrigger",[w,t]),w.state.isVisible){if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&u)){var e=A(!1);e?o=setTimeout((function(){w.state.isVisible&&w.hide()}),e):i=requestAnimationFrame((function(){w.hide()}))}}else F()}}function Ic(t,e){void 0===e&&(e={});var n=Mc.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",yc,nc),window.addEventListener("blur",wc);var r=Object.assign({},e,{plugins:n}),o=uc(t).reduce((function(t,e){var n=e&&Rc(e,r);return n&&t.push(n),t}),[]);return dc(t)?o[0]:o}Ic.defaultProps=Mc,Ic.setDefaultProps=function(t){Object.keys(t).forEach((function(e){Mc[e]=t[e]}))},Ic.currentInput=vc,Object.assign({},ca,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}}),Ic.setDefaultProps({render:Vc});class Bc{constructor({editor:t,element:e,view:n,tippyOptions:r,shouldShow:o}){this.preventHide=!1,this.shouldShow=({state:t,from:e,to:n})=>{const{doc:r,selection:o}=t,{empty:i}=o,s=!r.textBetween(e,n).length&&qi(t.selection);return!i&&!s},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout((()=>this.update(this.editor.view)))},this.blurHandler=({event:t})=>{var e;this.preventHide?this.preventHide=!1:(null==t?void 0:t.relatedTarget)&&(null===(e=this.element.parentNode)||void 0===e?void 0:e.contains(t.relatedTarget))||this.hide()},this.editor=t,this.element=e,this.view=n,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.element.style.visibility="visible",requestAnimationFrame((()=>{this.createTooltip(r)}))}createTooltip(t={}){this.tippy=Ic(this.editor.options.element,__spreadValues({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle"},t))}update(t,e){var n,r;const{state:o,composing:i}=t,{doc:s,selection:a}=o,c=e&&e.doc.eq(s)&&e.selection.eq(a);if(i||c)return;const{ranges:l}=a,p=Math.min(...l.map((t=>t.$from.pos))),d=Math.max(...l.map((t=>t.$to.pos)));(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:t,state:o,oldState:e,from:p,to:d}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:()=>{if(Hi(e=o.selection)&&e instanceof ie){const e=t.nodeDOM(p);if(e)return e.getBoundingClientRect()}var e;return Hs(t,p,d)}}),this.show()):this.hide()}show(){var t;null===(t=this.tippy)||void 0===t||t.show()}hide(){var t;null===(t=this.tippy)||void 0===t||t.hide()}destroy(){var t;null===(t=this.tippy)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Pc=t=>new we({key:"string"==typeof t.pluginKey?new Me(t.pluginKey):t.pluginKey,view:e=>new Bc(__spreadValues({view:e},t))});Oi.create({name:"bubbleMenu",defaultOptions:{element:null,tippyOptions:{},pluginKey:"bubbleMenu",shouldShow:null},addProseMirrorPlugins(){return this.options.element?[Pc({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});class Lc{constructor({editor:t,element:e,view:n,tippyOptions:r,shouldShow:o}){this.preventHide=!1,this.shouldShow=({state:t})=>{const{selection:e}=t,{$anchor:n,empty:r}=e,o=1===n.depth,i=n.parent.isTextblock&&!n.parent.type.spec.code&&!n.parent.textContent;return!!(r&&o&&i)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout((()=>this.update(this.editor.view)))},this.blurHandler=({event:t})=>{var e;this.preventHide?this.preventHide=!1:(null==t?void 0:t.relatedTarget)&&(null===(e=this.element.parentNode)||void 0===e?void 0:e.contains(t.relatedTarget))||this.hide()},this.editor=t,this.element=e,this.view=n,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.element.style.visibility="visible",requestAnimationFrame((()=>{this.createTooltip(r)}))}createTooltip(t={}){this.tippy=Ic(this.editor.options.element,__spreadValues({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle"},t))}update(t,e){var n,r;const{state:o,composing:i}=t,{doc:s,selection:a}=o,{from:c,to:l}=a,p=e&&e.doc.eq(s)&&e.selection.eq(a);if(i||p)return;(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:t,state:o,oldState:e}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:()=>Hs(t,c,l)}),this.show()):this.hide()}show(){var t;null===(t=this.tippy)||void 0===t||t.show()}hide(){var t;null===(t=this.tippy)||void 0===t||t.hide()}destroy(){var t;null===(t=this.tippy)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const jc=t=>new we({key:"string"==typeof t.pluginKey?new Me(t.pluginKey):t.pluginKey,view:e=>new Lc(__spreadValues({view:e},t))});Oi.create({name:"floatingMenu",defaultOptions:{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null},addProseMirrorPlugins(){return this.options.element?[jc({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});const $c=t.defineComponent({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(e,{slots:n}){const r=t.ref(null);return t.onMounted((()=>{const{pluginKey:t,editor:n,tippyOptions:o,shouldShow:i}=e;n.registerPlugin(Pc({pluginKey:t,editor:n,element:r.value,tippyOptions:o,shouldShow:i}))})),t.onBeforeUnmount((()=>{const{pluginKey:t,editor:n}=e;n.unregisterPlugin(t)})),()=>{var e;return t.h("div",{ref:r},null===(e=n.default)||void 0===e?void 0:e.call(n))}}});class Fc extends class extends class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach((t=>t.apply(this,e))),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter((t=>t!==e)):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}{constructor(t={}){super(),this.isFocused=!1,this.options={element:document.createElement("div"),content:"",injectCSS:!0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout((()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))}),0)}get commands(){return this.commandManager.createCommands()}chain(){return this.commandManager.createChain()}can(){return this.commandManager.createCan()}injectCSS(){this.options.injectCSS&&document&&(this.css=function(t){const e=document.querySelector("style[data-tiptap-style]");if(null!==e)return e;const n=document.createElement("style");return n.setAttribute("data-tiptap-style",""),n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n),n}('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\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\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}'))}setOptions(t={}){this.options=__spreadValues(__spreadValues({},this.options),t),this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t){this.setOptions({editable:t})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,e){const n="function"==typeof e?e(t,this.state.plugins):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});this.view.updateState(r)}unregisterPlugin(t){if(this.isDestroyed)return;const e="string"==typeof t?`${t}$`:t.key,n=this.state.reconfigure({plugins:this.state.plugins.filter((t=>!t.key.startsWith(e)))});this.view.updateState(n)}createExtensionManager(){const t=[...Object.entries(Bs).map((([,t])=>t)),...this.options.extensions].filter((t=>["extension","node","mark"].includes(null==t?void 0:t.type)));this.extensionManager=new xi(t,this)}createCommandManager(){this.commandManager=new ui(this,this.extensionManager.commands)}createSchema(){this.schema=this.extensionManager.schema}createView(){this.view=new po(this.options.element,__spreadProps(__spreadValues({},this.options.editorProps),{dispatchTransaction:this.dispatchTransaction.bind(this),state:ve.create({doc:di(this.options.content,this.schema,this.options.parseOptions)})}));const t=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(t),this.createNodeViews();this.view.dom.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.isCapturingTransaction)return this.capturedTransaction?void t.steps.forEach((t=>{var e;return null===(e=this.capturedTransaction)||void 0===e?void 0:e.step(t)})):void(this.capturedTransaction=t);const e=this.state.apply(t),n=!this.state.selection.eq(e.selection);this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t});const r=t.getMeta("focus"),o=t.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:t}),o&&this.emit("blur",{editor:this,event:o.event,transaction:t}),t.docChanged&&!t.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return ii(this.state,t)}isActive(t,e){const n="string"==typeof t?t:null,r="string"==typeof t?e:t;return function(t,e,n={}){if(!e)return ai(t,null,n)||ci(t,null,n);const r=ei(e,t.schema);return"node"===r?ai(t,e,n):"mark"===r&&ci(t,e,n)}(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return function(t,e){const n=mt.fromSchema(e).serializeFragment(t.content),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}(this.state.doc,this.schema)}get isEmpty(){return function(t){var e;const n=null===(e=t.type.createAndFill())||void 0===e?void 0:e.toJSON(),r=t.toJSON();return JSON.stringify(n)===JSON.stringify(r)}(this.state.doc)}getCharacterCount(){return this.state.doc.content.size-2}destroy(){var t;this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners(),(t=this.css)&&t.parentNode&&t.parentNode.removeChild(t)}get isDestroyed(){var t;return!(null===(t=this.view)||void 0===t?void 0:t.docView)}}{constructor(e={}){var n;return super(e),this.vueRenderers=t.reactive(new Map),this.contentComponent=null,this.reactiveState=(n=this.view.state,t.customRef(((t,e)=>({get:()=>(t(),n),set(t){n=t,requestAnimationFrame((()=>{requestAnimationFrame((()=>{e()}))}))}})))),this.on("transaction",(()=>{this.reactiveState.value=this.view.state})),t.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}registerPlugin(t,e){super.registerPlugin(t,e),this.reactiveState.value=this.view.state}unregisterPlugin(t){super.unregisterPlugin(t),this.reactiveState.value=this.view.state}}const Hc=t.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(e){const n=t.ref(),r=t.getCurrentInstance();return t.watchEffect((()=>{const o=e.editor;o&&o.options.element&&n.value&&t.nextTick((()=>{if(!n.value||!o.options.element.firstChild)return;const e=t.unref(n.value);n.value.append(...o.options.element.childNodes),o.contentComponent=r.ctx._,o.setOptions({element:e}),o.createNodeViews()}))})),t.onBeforeUnmount((()=>{const t=e.editor;if(!t)return;if(t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null,!t.options.element.firstChild)return;const n=document.createElement("div");n.append(...t.options.element.childNodes),t.setOptions({element:n})})),{rootEl:n}},render(){const e=[];return this.editor&&this.editor.vueRenderers.forEach((n=>{const r=t.h(t.Teleport,{to:n.teleportElement,key:n.id},t.h(n.component,__spreadValues({ref:n.id},n.props)));e.push(r)})),t.h("div",{ref:t=>{this.rootEl=t}},...e)}});t.defineComponent({name:"FloatingMenu",props:{pluginKey:{type:[String,Object],default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(e,{slots:n}){const r=t.ref(null);return t.onMounted((()=>{const{pluginKey:t,editor:n,tippyOptions:o,shouldShow:i}=e;n.registerPlugin(jc({pluginKey:t,editor:n,element:r.value,tippyOptions:o,shouldShow:i}))})),t.onBeforeUnmount((()=>{const{pluginKey:t,editor:n}=e;n.unregisterPlugin(t)})),()=>{var e;return t.h("div",{ref:r},null===(e=n.default)||void 0===e?void 0:e.call(n))}}}),t.defineComponent({props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var e,n;return t.h(this.as,{class:this.decorationClasses.value,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragStart:this.onDragStart},null===(n=(e=this.$slots).default)||void 0===n?void 0:n.call(e))}}),t.defineComponent({props:{as:{type:String,default:"div"}},render(){return t.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}});const qc=/^```(?[a-z]*)? $/,Jc=/^~~~(?[a-z]*)? $/,Wc=Ps.create({name:"codeBlock",defaultOptions:{languageClassPrefix:"language-",HTMLAttributes:{}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:t=>{var e;const n=null===(e=t.firstElementChild)||void 0===e?void 0:e.getAttribute("class");if(!n)return null;const r=new RegExp(`^(${this.options.languageClassPrefix})`);return{language:n.replace(r,"")}},renderHTML:t=>t.language?{class:this.options.languageClassPrefix+t.language}:null}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({HTMLAttributes:t}){return["pre",this.options.HTMLAttributes,["code",t,0]]},addCommands:()=>({setCodeBlock:t=>({commands:e})=>e.setNode("codeBlock",t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode("codeBlock","paragraph",t)}),addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=1===e.pos;return!(!t||e.parent.type.name!==this.name)&&(!(!n&&e.parent.textContent.length)&&this.editor.commands.clearNodes())}}},addInputRules(){return[zo(qc,this.type,(({groups:t})=>t)),zo(Jc,this.type,(({groups:t})=>t))]}}),Kc=Ls.create({name:"underline",defaultOptions:{HTMLAttributes:{}},parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("underline")&&{}}],renderHTML({HTMLAttributes:t}){return["u",vi(this.options.HTMLAttributes,t),0]},addCommands:()=>({setUnderline:()=>({commands:t})=>t.setMark("underline"),toggleUnderline:()=>({commands:t})=>t.toggleMark("underline"),unsetUnderline:()=>({commands:t})=>t.unsetMark("underline")}),addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline()}}});function Uc(t,e,n){for(var r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;var o=t.child(r),i=e.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(var s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){var a=Uc(o.content,i.content,n+1);if(null!=a)return a}n+=o.nodeSize}else n+=o.nodeSize}}function Gc(t,e,n,r){for(var o=t.childCount,i=e.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};var s=t.child(--o),a=e.child(--i),c=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){for(var l=0,p=Math.min(s.text.length,a.text.length);lt&&!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}},Xc.prototype.descendants=function(t){this.nodesBetween(0,this.size,t)},Xc.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},Xc.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,i=0;it&&((ie)&&(s=s.isText?s.cut(Math.max(0,t-i),Math.min(s.text.length,e-i)):s.cut(Math.max(0,t-i-1),Math.min(s.content.size,e-i-1))),n.push(s),r+=s.nodeSize),i=a}return new Xc(n,r)},Xc.prototype.cutByIndex=function(t,e){return t==e?Xc.empty:0==t&&e==this.content.length?this:new Xc(this.content.slice(t,e))},Xc.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 Xc(r,o)},Xc.prototype.addToStart=function(t){return new Xc([t].concat(this.content),this.size+t.nodeSize)},Xc.prototype.addToEnd=function(t){return new Xc(this.content.concat(t),this.size+t.nodeSize)},Xc.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?Zc(n+1,o):Zc(n,r);r=o}},Xc.prototype.toString=function(){return"<"+this.toStringInner()+">"},Xc.prototype.toStringInner=function(){return this.content.join(", ")},Xc.prototype.toJSON=function(){return this.content.length?this.content.map((function(t){return t.toJSON()})):null},Xc.fromJSON=function(t,e){if(!e)return Xc.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new Xc(e.map(t.nodeFromJSON))},Xc.fromArray=function(t){if(!t.length)return Xc.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},el.prototype.removeFromSet=function(t){for(var e=0;et.depth)throw new nl("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new nl("Inconsistent open depths");return cl(t,e,n,0)}function cl(t,e,n,r){var o=t.index(r),i=t.node(r);if(o==e.index(r)&&r=0;o--)r=e.node(o).copy(Xc.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(n,t);return hl(i,fl(t,a.start,a.end,e,r))}var c=t.parent,l=c.content;return hl(c,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}return hl(i,ml(t,e,r))}function ll(t,e){if(!e.type.compatibleContent(t.type))throw new nl("Cannot join "+e.type.name+" onto "+t.type.name)}function pl(t,e,n){var r=t.node(n);return ll(r,e.node(n)),r}function dl(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 ul(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&&(dl(t.nodeAfter,r),i++));for(var a=i;ao&&pl(t,e,o+1),s=r.depth>o&&pl(n,r,o+1),a=[];return ul(null,t,o,a),i&&s&&e.index(o)==n.index(o)?(ll(i,s),dl(hl(i,fl(t,e,n,r,o+1)),a)):(i&&dl(hl(i,ml(t,e,o+1)),a),ul(e,n,o,a),s&&dl(hl(s,ml(n,r,o+1)),a)),ul(r,null,o,a),new Xc(a)}function ml(t,e,n){var r=[];(ul(null,t,n,r),t.depth>n)&&dl(hl(pl(t,e,n+1),ml(t,e,n+1)),r);return ul(e,null,n,r),new Xc(r)}ol.size.get=function(){return this.content.size-this.openStart-this.openEnd},rl.prototype.insertAt=function(t,e){var n=sl(this.content,t+this.openStart,e,null);return n&&new rl(n,this.openStart,this.openEnd)},rl.prototype.removeBetween=function(t,e){return new rl(il(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)},rl.prototype.eq=function(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd},rl.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},rl.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},rl.fromJSON=function(t,e){if(!e)return rl.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 rl(Xc.fromJSON(t,e.content),n,r)},rl.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 rl(t,n,r)},Object.defineProperties(rl.prototype,ol),rl.empty=new rl(Xc.empty,0,0);var vl=function(t,e,n){this.pos=t,this.path=e,this.depth=e.length/3-1,this.parentOffset=n},gl={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};vl.prototype.resolveDepth=function(t){return null==t?this.depth:t<0?this.depth+t:t},gl.parent.get=function(){return this.node(this.depth)},gl.doc.get=function(){return this.node(0)},vl.prototype.node=function(t){return this.path[3*this.resolveDepth(t)]},vl.prototype.index=function(t){return this.path[3*this.resolveDepth(t)+1]},vl.prototype.indexAfter=function(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)},vl.prototype.start=function(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1},vl.prototype.end=function(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size},vl.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]},vl.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},gl.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},gl.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},gl.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)},vl.prototype.posAtIndex=function(t,e){e=this.resolveDepth(e);for(var n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1,o=0;o0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0},vl.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 kl(this,t,n)},vl.prototype.sameParent=function(t){return this.pos-this.parentOffset==t.pos-t.parentOffset},vl.prototype.max=function(t){return t.pos>this.pos?t:this},vl.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 vl(e,n,o)},vl.resolveCached=function(t,e){for(var n=0;nt&&this.nodesBetween(t,e,(function(t){return n.isInSet(t.marks)&&(r=!0),!r})),r},Ol.isBlock.get=function(){return this.type.isBlock},Ol.isTextblock.get=function(){return this.type.isTextblock},Ol.inlineContent.get=function(){return this.type.inlineContent},Ol.isInline.get=function(){return this.type.isInline},Ol.isText.get=function(){return this.type.isText},Ol.isLeaf.get=function(){return this.type.isLeaf},Ol.isAtom.get=function(){return this.type.isAtom},Sl.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()+")"),function(t,e){for(var n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}(this.marks,t)},Sl.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},Sl.prototype.canReplace=function(t,e,n,r,o){void 0===n&&(n=Xc.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var i=this.contentMatchAt(t).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,e);if(!s||!s.validEnd)return!1;for(var a=r;a-1&&o[i+1];Il(t,r).forEach((function(t){s||o.push(n,s=[]),-1==s.indexOf(t)&&s.push(t)}))}}))}));for(var i=e[r.join(",")]=new Cl(r.indexOf(t.length-1)>-1),s=0;s>1},Cl.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]}},Cl.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(Cl.prototype,El),Cl.empty=new Cl(!0);var Nl=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.shift()},_l={next:{configurable:!0}};function Tl(t){var e=[];do{e.push(Vl(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function Vl(t){var e=[];do{e.push(Al(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function Al(t){for(var e=function(t){if(t.eat("(")){var e=Tl(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=zl(t,e)}return e}function Dl(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");var e=Number(t.next);return t.pos++,e}function zl(t,e){var n=Dl(t),r=n;return t.eat(",")&&(r="}"!=t.next?Dl(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Rl(t,e){return e-t}function Il(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},jl.prototype.allowsMarks=function(t){if(null==this.markSet)return!0;for(var e=0;e-1};var Jl={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Wl={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Kl={ol:!0,ul:!0};function Ul(t){return(t?1:0)|("full"===t?2:0)}var Gl=function(t,e,n,r,o,i,s){this.type=t,this.attrs=e,this.solid=o,this.match=i||(4&s?null:t.contentMatch),this.options=s,this.content=[],this.marks=n,this.activeMarks=el.none,this.pendingMarks=r,this.stashMarks=[]};Gl.prototype.findWrapping=function(t){if(!this.match){if(!this.type)return[];var e=this.type.contentMatch.fillBefore(Xc.from(t));if(!e){var n,r=this.type.contentMatch;return(n=r.findWrapping(t.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)},Gl.prototype.finish=function(t){if(!(1&this.options)){var e,n=this.content[this.content.length-1];n&&n.isText&&(e=/[ \t\r\n\u000c]+$/.exec(n.text))&&(n.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length)))}var r=Xc.from(this.content);return!t&&this.match&&(r=r.append(this.match.fillBefore(Xc.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r},Gl.prototype.popFromStashMark=function(t){for(var e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]},Gl.prototype.applyPending=function(t){for(var e=0,n=this.pendingMarks;e=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}},Xl.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},Xl.prototype.sync=function(t){for(var e=this.open;e>=0;e--)if(this.nodes[e]==t)return void(this.open=e)},Yl.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},Xl.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)},Xl.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}},Xl.prototype.addPendingMark=function(t){var e=function(t,e){for(var n=0;n=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);var o=r.popFromStashMark(t);o&&r.type&&r.type.allowsMarkType(o.type)&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==e)break}},Object.defineProperties(Xl.prototype,Yl);var Zl=Math.pow(2,16);function tp(t){return 65535&t}var ep=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=null),this.pos=t,this.deleted=e,this.recover=n},np=function(t,e){void 0===e&&(e=!1),this.ranges=t,this.inverted=e};np.prototype.recover=function(t){var e=0,n=tp(t);if(!this.inverted)for(var r=0;rt)break;var c=this.ranges[s+o],l=this.ranges[s+i],p=a+c;if(t<=p){var d=a+r+((c?t==a?-1:t==p?1:e:e)<0?0:l);if(n)return d;var u=t==(e<0?a:p)?null:s/3+(t-a)*Zl;return new ep(d,e<0?t!=a:t!=p,u)}r+=l-c}return n?t+r:new ep(t+r)},np.prototype.touches=function(t,e){for(var n=0,r=tp(e),o=this.inverted?2:1,i=this.inverted?1:2,s=0;st)break;var c=this.ranges[s+o];if(t<=a+c&&s==3*r)return!0;n+=this.ranges[s+i]-c}return!1},np.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)}},rp.prototype.invert=function(){var t=new rp;return t.appendMappingInverted(this),t},rp.prototype.map=function(t,e){if(void 0===e&&(e=1),this.mirror)return this._map(t,e,!0);for(var n=this.from;no&&s0},ip.prototype.addStep=function(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e},Object.defineProperties(ip.prototype,sp);var cp=Object.create(null),lp=function(){};lp.prototype.apply=function(t){return ap()},lp.prototype.getMap=function(){return np.empty},lp.prototype.invert=function(t){return ap()},lp.prototype.map=function(t){return ap()},lp.prototype.merge=function(t){return null},lp.prototype.toJSON=function(){return ap()},lp.fromJSON=function(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=cp[e.stepType];if(!n)throw new RangeError("No step type "+e.stepType+" defined");return n.fromJSON(t,e)},lp.jsonID=function(t,e){if(t in cp)throw new RangeError("Duplicate use of step JSON ID "+t);return cp[t]=e,e.prototype.jsonID=t,e};var pp=function(t,e){this.doc=t,this.failed=e};pp.ok=function(t){return new pp(t,null)},pp.fail=function(t){return new pp(null,t)},pp.fromReplace=function(t,e,n,r){try{return pp.ok(t.replace(e,n,r))}catch(o){if(o instanceof nl)return pp.fail(o.message);throw o}};var dp=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&&hp(t,this.from,this.to)?pp.fail("Structure replace would overwrite content"):pp.fromReplace(t,this.from,this.to,this.slice)},e.prototype.getMap=function(){return new np([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?rl.empty:new rl(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}var r=this.slice.size+t.slice.size==0?rl.empty:new rl(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),r,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(n.from,n.to,rl.fromJSON(t,n.slice),!!n.structure)},e}(lp);lp.jsonID("replace",dp);var up=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&&(hp(t,this.from,this.gapFrom)||hp(t,this.gapTo,this.to)))return pp.fail("Structure gap-replace would overwrite content");var e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return pp.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,e.content);return n?pp.fromReplace(t,this.from,this.to,n):pp.fail("Content does not fit in gap")},e.prototype.getMap=function(){return new np([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,rl.fromJSON(t,n.slice),n.insert,!!n.structure)},e}(lp);function hp(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 fp(t,e,n){for(var r=[],o=0;oe;d--)u||n.index(d)>0?(u=!0,l=Xc.from(n.node(d).copy(l)),p++):a--;for(var h=Xc.empty,f=0,m=o,v=!1;m>e;m--)v||r.after(m+1)=0;r--)n=Xc.from(e[r].type.create(e[r].attrs,n));var o=t.start,i=t.end;return this.step(new up(o,i,o,i,new rl(n,0,0),e.length,!0))},ip.prototype.setBlockType=function(t,e,n,r){var o=this;if(void 0===e&&(e=t),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var i=this.steps.length;return this.doc.nodesBetween(t,e,(function(t,e){if(t.isTextblock&&!t.hasMarkup(n,r)&&function(t,e,n){var r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(o.doc,o.mapping.slice(i).map(e),n)){o.clearIncompatible(o.mapping.slice(i).map(e,1),n);var s=o.mapping.slice(i),a=s.map(e,1),c=s.map(e+t.nodeSize,1);return o.step(new up(a,c,a+1,c-1,new rl(Xc.from(n.create(r,null,t.marks)),0,0),1,!0)),!1}})),this},ip.prototype.setNodeMarkup=function(t,e,n,r){var o=this.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");e||(e=o.type);var i=e.create(n,null,r||o.marks);if(o.isLeaf)return this.replaceWith(t,t+o.nodeSize,i);if(!e.validContent(o.content))throw new RangeError("Invalid content for node type "+e.name);return this.step(new up(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new rl(Xc.from(i),0,0),1,!0))},ip.prototype.split=function(t,e,n){void 0===e&&(e=1);for(var r=this.doc.resolve(t),o=Xc.empty,i=Xc.empty,s=r.depth,a=r.depth-e,c=e-1;s>a;s--,c--){o=Xc.from(r.node(s).copy(o));var l=n&&n[c];i=Xc.from(l?l.type.create(l.attrs,i):r.node(s).copy(i))}return this.step(new dp(t,t,new rl(o.append(i),e,e),!0))},ip.prototype.join=function(t,e){void 0===e&&(e=1);var n=new dp(t-e,t+e,rl.empty,!0);return this.step(n)};var mp=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),r=t.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new rl(fp(n.content,(function(t,n){return t.isAtom&&n.type.allowsMarkType(e.mark.type)?t.mark(e.mark.addToSet(t.marks)):t}),o),n.openStart,n.openEnd);return pp.fromReplace(t,this.from,this.to,i)},e.prototype.invert=function(){return new vp(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}(lp);lp.jsonID("addMark",mp);var vp=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),r=new rl(fp(n.content,(function(t){return t.mark(e.mark.removeFromSet(t.marks))})),n.openStart,n.openEnd);return pp.fromReplace(t,this.from,this.to,r)},e.prototype.invert=function(){return new mp(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}(lp);function gp(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}lp.jsonID("removeMark",vp),ip.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 p=r.marks;if(!n.isInSet(p)&&l.type.allowsMarkType(n.type)){for(var d=Math.max(c,t),u=Math.min(c+r.nodeSize,e),h=n.addToSet(p),f=0;f=0;u--)this.step(o[u]);return this},ip.prototype.replace=function(t,e,n){void 0===e&&(e=t),void 0===n&&(n=rl.empty);var r=function(t,e,n,r){if(void 0===n&&(n=e),void 0===r&&(r=rl.empty),e==n&&!r.size)return null;var o=t.resolve(e),i=t.resolve(n);return gp(o,i,r)?new dp(e,n,r):new yp(o,i,r).fit()}(this.doc,t,e,n);return r&&this.step(r),this},ip.prototype.replaceWith=function(t,e,n){return this.replace(t,e,new rl(Xc.from(n),0,0))},ip.prototype.delete=function(t,e){return this.replace(t,e,rl.empty)},ip.prototype.insert=function(t,e){return this.replaceWith(t,t,e)};var yp=function(t,e,n){this.$to=e,this.$from=t,this.unplaced=n,this.frontier=[];for(var r=0;r<=t.depth;r++){var o=t.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(r))})}this.placed=Xc.empty;for(var i=t.depth;i>0;i--)this.placed=Xc.from(t.node(i).copy(this.placed))},bp={depth:{configurable:!0}};function wp(t,e,n){return 0==e?t.cutByIndex(n):t.replaceChild(0,t.firstChild.copy(wp(t.firstChild.content,e-1,n)))}function kp(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(kp(t.lastChild.content,e-1,n)))}function xp(t,e){for(var n=0;n1&&(r=r.replaceChild(0,Mp(r.firstChild,e-1,1==r.childCount?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(Xc.empty,!0)))),t.copy(r)}function Sp(t,e,n,r,o){var i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;var a=r.fillBefore(i.content,!0,s);return a&&!function(t,e,n){for(var r=n;rr){var s=o.contentMatchAt(0),a=s.fillBefore(t).append(t);t=a.append(s.matchFragment(a).fillBefore(Xc.empty,!0))}return t}function Cp(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}bp.depth.get=function(){return this.frontier.length-1},yp.prototype.fit=function(){for(;this.unplaced.size;){var t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}var e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;for(var i=this.placed,s=r.depth,a=o.depth;s&&a&&1==i.childCount;)i=i.firstChild.content,s--,a--;var c=new rl(i,s,a);return e>-1?new up(r.pos,e,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new dp(r.pos,o.pos,c):void 0},yp.prototype.findFittable=function(){for(var t=1;t<=2;t++)for(var e=this.unplaced.openStart;e>=0;e--)for(var n=void 0,r=(e?(n=xp(this.unplaced.content,e-1).firstChild).content:this.unplaced.content).firstChild,o=this.depth;o>=0;o--){var i=this.frontier[o],s=i.type,a=i.match,c=void 0,l=void 0;if(1==t&&(r?a.matchType(r.type)||(l=a.fillBefore(Xc.from(r),!1)):s.compatibleContent(n.type)))return{sliceDepth:e,frontierDepth:o,parent:n,inject:l};if(2==t&&r&&(c=a.findWrapping(r.type)))return{sliceDepth:e,frontierDepth:o,parent:n,wrap:c};if(n&&a.matchType(n.type))break}},yp.prototype.openMore=function(){var t=this.unplaced,e=t.content,n=t.openStart,r=t.openEnd,o=xp(e,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new rl(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)},yp.prototype.dropNode=function(){var t=this.unplaced,e=t.content,n=t.openStart,r=t.openEnd,o=xp(e,n);if(o.childCount<=1&&n>0){var i=e.size-n<=n+o.size;this.unplaced=new rl(wp(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new rl(wp(e,n,1),n,r)},yp.prototype.placeNodes=function(t){for(var e=t.sliceDepth,n=t.frontierDepth,r=t.parent,o=t.inject,i=t.wrap;this.depth>n;)this.closeFrontierNode();if(i)for(var s=0;s1||0==l||g.content.size)&&(h=y,d.push(Mp(g.mark(f.allowedMarks(g.marks)),1==p?l:0,p==c.childCount?v:-1)))}var b=p==c.childCount;b||(v=-1),this.placed=kp(this.placed,n,Xc.from(d)),this.frontier[n].match=h,b&&v<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var w=0,k=c;w1&&r==this.$to.end(--n);)++r;return r},yp.prototype.findCloseLevel=function(t){t:for(var e=Math.min(this.depth,t.depth);e>=0;e--){var n=this.frontier[e],r=n.match,o=n.type,i=e=0;a--){var c=this.frontier[a],l=c.match,p=Sp(t,a,c.type,l,!0);if(!p||p.childCount)continue t}return{depth:e,fit:s,move:i?t.doc.resolve(t.after(e+1)):t}}}},yp.prototype.close=function(t){var e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=kp(this.placed,e.depth,e.fit)),t=e.move;for(var n=e.depth+1;n<=t.depth;n++){var r=t.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,t.index(n));this.openFrontierNode(r.type,r.attrs,o)}return t},yp.prototype.openFrontierNode=function(t,e,n){var r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=kp(this.placed,this.depth,Xc.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})},yp.prototype.closeFrontierNode=function(){var t=this.frontier.pop().match.fillBefore(Xc.empty,!0);t.childCount&&(this.placed=kp(this.placed,this.frontier.length,t))},Object.defineProperties(yp.prototype,bp),ip.prototype.replaceRange=function(t,e,n){if(!n.size)return this.deleteRange(t,e);var r=this.doc.resolve(t),o=this.doc.resolve(e);if(gp(r,o,n))return this.step(new dp(t,e,n));var i=Cp(r,this.doc.resolve(e));0==i[i.length-1]&&i.pop();var s=-(r.depth+1);i.unshift(s);for(var a=r.depth,c=r.pos-1;a>0;a--,c--){var l=r.node(a).type.spec;if(l.defining||l.isolating)break;i.indexOf(a)>-1?s=a:r.before(a)==c&&i.splice(1,0,-a)}for(var p=i.indexOf(s),d=[],u=n.openStart,h=n.content,f=0;;f++){var m=h.firstChild;if(d.push(m),f==n.openStart)break;h=m.content}u>0&&d[u-1].type.spec.defining&&r.node(p).type!=d[u-1].type?u-=1:u>=2&&d[u-1].isTextblock&&d[u-2].type.spec.defining&&r.node(p).type!=d[u-2].type&&(u-=2);for(var v=n.openStart;v>=0;v--){var g=(v+u+1)%(n.openStart+1),y=d[g];if(y)for(var b=0;b=0&&(this.replace(t,e,n),!(this.steps.length>S));O--){var C=i[O];C<0||(t=r.before(C),e=o.after(C))}return this},ip.prototype.replaceRangeWith=function(t,e,n){if(!n.isInline&&t==e&&this.doc.resolve(t).parent.content.size){var r=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)};var Ep=Object.create(null),Np=function(t,e,n){this.ranges=n||[new Tp(t.min(e),t.max(e))],this.$anchor=t,this.$head=e},_p={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};_p.anchor.get=function(){return this.$anchor.pos},_p.head.get=function(){return this.$head.pos},_p.from.get=function(){return this.$from.pos},_p.to.get=function(){return this.$to.pos},_p.$from.get=function(){return this.ranges[0].$from},_p.$to.get=function(){return this.ranges[0].$to},_p.empty.get=function(){for(var t=this.ranges,e=0;e=0;o--){var i=e<0?Bp(t.node(0),t.node(o),t.before(o+1),t.index(o),e,n):Bp(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,n);if(i)return i}},Np.near=function(t,e){return void 0===e&&(e=1),this.findFrom(t,e)||this.findFrom(t,-e)||new Rp(t.node(0))},Np.atStart=function(t){return Bp(t,t,0,0,1)||new Rp(t)},Np.atEnd=function(t){return Bp(t,t,t.content.size,t.childCount,-1)||new Rp(t)},Np.fromJSON=function(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=Ep[e.type];if(!n)throw new RangeError("No selection type "+e.type+" defined");return n.fromJSON(t,e)},Np.jsonID=function(t,e){if(t in Ep)throw new RangeError("Duplicate use of selection JSON ID "+t);return Ep[t]=e,e.prototype.jsonID=t,e},Np.prototype.getBookmark=function(){return Vp.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(Np.prototype,_p),Np.prototype.visible=!0;var Tp=function(t,e){this.$from=t,this.$to=e},Vp=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=rl.empty),t.prototype.replace.call(this,e,n),n==rl.empty){var r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}},e.prototype.eq=function(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head},e.prototype.getBookmark=function(){return new Ap(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=(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&&Dp.isSelectable(a))return Dp.create(t,n-(o<0?a.nodeSize:0))}else{var c=Bp(t,a,n+o,o<0?a.childCount:0,o,i);if(c)return c}n+=a.nodeSize*o}}function Pp(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 el.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)||el.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(Np.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}(ip);function jp(t,e){return e&&t?t.bind(e):t}var $p=function(t,e,n){this.name=t,this.init=jp(e.init,n),this.apply=jp(e.apply,n)},Fp=[new $p("doc",{init:function(t){return t.doc||t.schema.topNodeType.createAndFill()},apply:function(t){return t.doc}}),new $p("selection",{init:function(t,e){return t.selection||Np.atStart(e.doc)},apply:function(t){return t.selection}}),new $p("storedMarks",{init:function(t){return t.storedMarks||null},apply:function(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new $p("scrollToSelection",{init:function(){return 0},apply:function(t,e){return t.scrolledIntoView?e+1:e}})],Hp=function(t,e){var n=this;this.schema=t,this.fields=Fp.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 $p(t.key,t.spec.state,t))}))},qp=function(t){this.config=t},Jp={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};Jp.schema.get=function(){return this.config.schema},Jp.plugins.get=function(){return this.config.plugins},qp.prototype.apply=function(t){return this.applyTransaction(t).state},qp.prototype.filterTransaction=function(t,e){void 0===e&&(e=-1);for(var n=0;n-1&&Wp.splice(e,1)},Object.defineProperties(qp.prototype,Jp);var Wp=[];function Kp(t,e,n){for(var r in t){var o=t[r];o instanceof Function?o=o.bind(e):"handleDOMEvents"==r&&(o=Kp(o,e,{})),n[r]=o}return n}var Up=function(t){this.props={},t.props&&Kp(t.props,this,this.props),this.spec=t,this.key=t.key?t.key.key:Xp("plugin")};Up.prototype.getState=function(t){return t[this.key]};var Gp=Object.create(null);function Xp(t){return t in Gp?t+"$"+ ++Gp[t]:(Gp[t]=0,t+"$")}var Yp=function(t){void 0===t&&(t="key"),this.key=Xp(t)};Yp.prototype.get=function(t){return t.config.pluginsByKey[this.key]},Yp.prototype.getState=function(t){return t[this.key]};const Qp=new Yp("characterLimit"),Zp=Oi.create({name:"characterCount",defaultOptions:{limit:0},addProseMirrorPlugins(){const{options:t}=this;return[new Up({key:Qp,appendTransaction:(e,n,r)=>{const o=r.doc.content.size;if(t.limit&&o>t.limit)return r.tr.insertText("",t.limit+1,o)}})]}}),td=Oi.create({name:"textAlign",defaultOptions:{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>({textAlign:t.style.textAlign||this.options.defaultAlignment}),renderHTML:t=>t.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${t.textAlign}`}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>!!this.options.alignments.includes(t)&&this.options.types.every((n=>e.updateAttributes(n,{textAlign:t}))),unsetTextAlign:()=>({commands:t})=>this.options.types.every((e=>t.resetAttributes(e,"textAlign")))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),ed=Ps.create({name:"horizontalRule",defaultOptions:{HTMLAttributes:{}},group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:t}){return["hr",vi(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t})=>t().command((({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,$anchor:o}=n,i=o.parent.isTextblock&&!o.parent.type.spec.code&&!o.parent.textContent;if(!r||!i||!e)return!0;const s=o.before();return t.deleteRange(s,s+1),!0})).insertContent({type:this.name}).command((({tr:t,dispatch:e})=>{var n;if(e){const{parent:e,pos:r}=t.selection.$from,o=r+1;if(!t.doc.nodeAt(o)){const r=null===(n=e.type.contentMatch.defaultType)||void 0===n?void 0:n.create();r&&(t.insert(o,r),t.setSelection(re.create(t.doc,o)))}t.scrollIntoView()}return!0})).run()}},addInputRules(){return[js(/^(?:---|—-|___\s|\*\*\*\s)$/,this.type)]}}),nd=/!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\)/;Ps.create({name:"image",defaultOptions:{inline:!1,HTMLAttributes:{}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML:()=>[{tag:"img[src]"}],renderHTML({HTMLAttributes:t}){return["img",vi(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[js(nd,this.type,(t=>{const[,e,n,r]=t;return{src:n,alt:e,title:r}}))]}});const rd=/^\s*([-+*])\s$/,od=Ps.create({name:"bulletList",defaultOptions:{HTMLAttributes:{}},group:"block list",content:"listItem+",parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:t}){return["ul",vi(this.options.HTMLAttributes,t),0]},addCommands:()=>({toggleBulletList:()=>({commands:t})=>t.toggleList("bulletList","listItem")}),addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){return[Do(rd,this.type)]}}),id=/^(\d+)\.\s$/,sd=Ps.create({name:"orderedList",defaultOptions:{HTMLAttributes:{}},group:"block list",content:"listItem+",addAttributes:()=>({start:{default:1,parseHTML:t=>({start:t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1})}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:t}){const e=t,{start:n}=e,r=__objRest(e,["start"]);return 1===n?["ol",vi(this.options.HTMLAttributes,r),0]:["ol",vi(this.options.HTMLAttributes,t),0]},addCommands:()=>({toggleOrderedList:()=>({commands:t})=>t.toggleList("orderedList","listItem")}),addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){return[Do(id,this.type,(t=>({start:+t[1]})),((t,e)=>e.childCount+e.attrs.start===+t[1]))]}}),ad=Ps.create({name:"taskList",defaultOptions:{HTMLAttributes:{}},group:"block list",content:"taskItem+",parseHTML:()=>[{tag:'ul[data-type="taskList"]',priority:51}],renderHTML:({HTMLAttributes:t})=>["ul",vi(t,{"data-type":"taskList"}),0],addCommands:()=>({toggleTaskList:()=>({commands:t})=>t.toggleList("taskList","taskItem")}),addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),cd=/^\s*(\[([ |x])\])\s$/,ld=Ps.create({name:"taskItem",defaultOptions:{nested:!1,HTMLAttributes:{}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,parseHTML:t=>({checked:"true"===t.getAttribute("data-checked")}),renderHTML:t=>({"data-checked":t.checked}),keepOnSplit:!1}}),parseHTML:()=>[{tag:'li[data-type="taskItem"]',priority:51}],renderHTML({HTMLAttributes:t}){return["li",vi(this.options.HTMLAttributes,t,{"data-type":"taskItem"}),0]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem("taskItem"),"Shift-Tab":()=>this.editor.commands.liftListItem("taskItem")};return this.options.nested?__spreadProps(__spreadValues({},t),{Tab:()=>this.editor.commands.sinkListItem("taskItem")}):t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),a=document.createElement("input"),c=document.createElement("div");return i.contentEditable="false",a.type="checkbox",a.addEventListener("change",(t=>{if(!r.isEditable)return void(a.checked=!a.checked);const{checked:e}=t.target;r.isEditable&&"function"==typeof n&&r.chain().focus().command((({tr:t})=>(t.setNodeMarkup(n(),void 0,{checked:e}),!0))).run()})),o.dataset.checked=t.attrs.checked,t.attrs.checked&&a.setAttribute("checked","checked"),i.append(a,s),o.append(i,c),Object.entries(e).forEach((([t,e])=>{o.setAttribute(t,e)})),{dom:o,contentDOM:c,update:t=>t.type===this.type&&(o.dataset.checked=t.attrs.checked,t.attrs.checked?a.setAttribute("checked","checked"):a.removeAttribute("checked"),!0)}}},addInputRules(){return[Do(cd,this.type,(t=>({checked:"x"===t[t.length-1]})))]}}),pd=/^\s*>\s$/gm,dd=Ps.create({name:"blockquote",defaultOptions:{HTMLAttributes:{}},content:"block*",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:t}){return["blockquote",vi(this.options.HTMLAttributes,t),0]},addCommands:()=>({setBlockquote:()=>({commands:t})=>t.wrapIn("blockquote"),toggleBlockquote:()=>({commands:t})=>t.toggleWrap("blockquote"),unsetBlockquote:()=>({commands:t})=>t.lift("blockquote")}),addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Do(pd,this.type)]}}),ud=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/gm,hd=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/gm,fd=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/gm,md=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/gm,vd=Ls.create({name:"bold",defaultOptions:{HTMLAttributes:{}},parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&null},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],renderHTML({HTMLAttributes:t}){return["strong",vi(this.options.HTMLAttributes,t),0]},addCommands:()=>({setBold:()=>({commands:t})=>t.setMark("bold"),toggleBold:()=>({commands:t})=>t.toggleMark("bold"),unsetBold:()=>({commands:t})=>t.unsetMark("bold")}),addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold()}},addInputRules(){return[$s(ud,this.type),$s(fd,this.type)]},addPasteRules(){return[Fs(hd,this.type),Fs(md,this.type)]}}),gd=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/gm,yd=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/gm,bd=Ls.create({name:"code",defaultOptions:{HTMLAttributes:{}},excludes:"_",parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:t}){return["code",vi(this.options.HTMLAttributes,t),0]},addCommands:()=>({setCode:()=>({commands:t})=>t.setMark("code"),toggleCode:()=>({commands:t})=>t.toggleMark("code"),unsetCode:()=>({commands:t})=>t.unsetMark("code")}),addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[$s(gd,this.type)]},addPasteRules(){return[Fs(yd,this.type)]}}),wd=Ps.create({name:"doc",topNode:!0,content:"block+"});var kd=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}}))};kd.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)}))},kd.prototype.update=function(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())},kd.prototype.setCursor=function(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},kd.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,c,l=this.editorView.dom.offsetParent;if(this.element||(this.element=l.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),!l||l==document.body&&"static"==getComputedStyle(l).position)a=-pageXOffset,c=-pageYOffset;else{var p=l.getBoundingClientRect();a=p.left-l.scrollLeft,c=p.top-l.scrollTop}this.element.style.left=t.left-a+"px",this.element.style.top=t.top-c+"px",this.element.style.width=t.right-t.left+"px",this.element.style.height=t.bottom-t.top+"px"},kd.prototype.scheduleRemoval=function(t){var e=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return e.setCursor(null)}),t)},kd.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;if(this.editorView.dragging&&this.editorView.dragging.slice&&null==(n=Lt(this.editorView.state.doc,n,this.editorView.dragging.slice)))return this.setCursor(null);this.setCursor(n),this.scheduleRemoval(5e3)}}},kd.prototype.dragend=function(){this.scheduleRemoval(20)},kd.prototype.drop=function(){this.scheduleRemoval(20)},kd.prototype.dragleave=function(t){t.target!=this.editorView.dom&&this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)};const xd=Oi.create({name:"dropCursor",defaultOptions:{color:"currentColor",width:1,class:null},addProseMirrorPlugins(){return[(t=this.options,void 0===t&&(t={}),new we({view:function(e){return new kd(e,t)}}))];var t}});var Md=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 u.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 Sd(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){t:for(;;){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.child(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(;;){var l=n>0?i.firstChild:i.lastChild;if(!l){if(i.isAtom&&!i.isText&&!ie.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*n),r=!1;continue t}break}i=l,o+=n;var p=t.doc.resolve(o);if(e.valid(p))return p}return null}},e}(te);Md.prototype.visible=!1,te.jsonID("gapcursor",Md);var Sd=function(t){this.pos=t};Sd.prototype.map=function(t){return new Sd(t.map(this.pos))},Sd.prototype.resolve=function(t){var e=t.resolve(this.pos);return Md.valid(e)?new Md(e):te.near(e)};var Od=To({ArrowLeft:Cd("horiz",-1),ArrowRight:Cd("horiz",1),ArrowUp:Cd("vert",-1),ArrowDown:Cd("vert",1)});function Cd(t,e){var n="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,r,o){var i=t.selection,s=e>0?i.$to:i.$from,a=i.empty;if(i instanceof re){if(!o.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=t.doc.resolve(e>0?s.after():s.before())}var c=Md.findFrom(s,e,a);return!!c&&(r&&r(t.tr.setSelection(new Md(c))),!0)}}function Ed(t,e,n){if(!t.editable)return!1;var r=t.state.doc.resolve(e);if(!Md.valid(r))return!1;var o=t.posAtCoords({left:n.clientX,top:n.clientY}).inside;return!(o>-1&&ie.isSelectable(t.state.doc.nodeAt(o)))&&(t.dispatch(t.state.tr.setSelection(new Md(r))),!0)}function Nd(t){if(!(t.selection instanceof Md))return null;var e=document.createElement("div");return e.className="ProseMirror-gapcursor",Zr.create(t.doc,[Gr.widget(t.selection.head,e,{key:"gapcursor"})])}const _d=Oi.create({name:"gapCursor",addProseMirrorPlugins:()=>[new we({props:{decorations:Nd,createSelectionBetween:function(t,e,n){if(e.pos==n.pos&&Md.valid(n))return new Md(n)},handleClick:Ed,handleKeyDown:Od}})],extendNodeSchema(t){var e;return{allowGapCursor:null!==(e=bi(hi(t,"allowGapCursor",{name:t.name,options:t.options})))&&void 0!==e?e:null}}}),Td=Ps.create({name:"hardBreak",defaultOptions:{HTMLAttributes:{}},inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:t}){return["br",vi(this.options.HTMLAttributes,t)]},addCommands(){return{setHardBreak:()=>({commands:t})=>t.first([()=>t.exitCode(),()=>t.insertContent({type:this.name})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Vd=Ps.create({name:"heading",defaultOptions:{levels:[1,2,3,4,5,6],HTMLAttributes:{}},content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((t=>({tag:`h${t}`,attrs:{level:t}})))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,vi(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.setNode("heading",t),toggleHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.toggleNode("heading","paragraph",t)}},addKeyboardShortcuts(){return this.options.levels.reduce(((t,e)=>__spreadValues(__spreadValues({},t),{[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})})),{})},addInputRules(){return this.options.levels.map((t=>zo(new RegExp(`^(#{1,${t}})\\s$`),this.type,{level:t})))}});var Ad=200,Dd=function(){};Dd.prototype.append=function(t){return t.length?(t=Dd.from(t),!this.length&&t||t.length=e?Dd.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},Dd.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},Dd.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)},Dd.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},Dd.from=function(t){return t instanceof Dd?t:t&&t.length?new zd(t):Dd.empty};var zd=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<=Ad)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=Ad)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}(Dd);Dd.empty=new zd([]);var Rd=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}(Dd),Id=Dd,Bd=function(t,e){this.items=t,this.eventCount=e};Bd.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=[],p=[];return this.items.forEach((function(t,e){if(!t.step)return r||(r=n.remapping(i,e+1),o=r.maps.length),o--,void p.push(t);if(r){p.push(new Pd(t.map));var d,u=t.step.map(r.slice(o));u&&c.maybeStep(u).doc&&(d=c.mapping.maps[c.mapping.maps.length-1],l.push(new Pd(d,null,null,l.length+p.length))),o--,d&&r.appendMap(d,o)}else c.maybeStep(t.step);return t.selection?(s=r?t.selection.map(r.slice(o)):t.selection,a=new Bd(n.items.slice(0,i).append(p.reverse().concat(l)),n.eventCount-1),!1):void 0}),this.items.length,0),{remaining:a,transform:c,selection:s}},Bd.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;cjd&&(h=m,(u=s).forEach((function(t,e){if(t.selection&&0==h--)return f=e,!1})),s=u.slice(f),i-=m),new Bd(s.append(o),i)},Bd.prototype.remapping=function(t,e){var n=new xt;return this.items.forEach((function(e,r){var o=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:null;n.appendMap(e.map,o)}),t,e),n},Bd.prototype.addMaps=function(t){return 0==this.eventCount?this:new Bd(this.items.append(t.map((function(t){return new Pd(t)}))),this.eventCount)},Bd.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]),p=e.selection&&e.selection.map(o.slice(a+1,r));p&&s++,n.push(new Pd(c,l,p))}else n.push(new Pd(c))}}),r);for(var c=[],l=e;l500&&(d=d.compress(this.items.length-n.length)),d},Bd.prototype.emptyItemCount=function(){var t=0;return this.items.forEach((function(e){e.step||t++})),t},Bd.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 p,d=new Pd(c.invert(),a,l),u=r.length-1;(p=r.length&&r[u].merge(d))?r[u]=p:r.push(d)}}else i.map&&n--}),this.items.length,0),new Bd(Id.from(r.reverse()),o)},Bd.empty=new Bd(Id.empty,0);var Pd=function(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r};Pd.prototype.merge=function(t){if(this.step&&t.step&&!t.selection){var e=t.step.merge(this.step);if(e)return new Pd(e.getMap().invert(),e,this.selection)}};var Ld=function(t,e,n,r){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r},jd=20;function $d(t){var e=[];return t.forEach((function(t,n,r,o){return e.push(r,o)})),e}function Fd(t,e){if(!t)return null;for(var n=[],r=0;r=e[o]&&(n=!0)})),n}(n,t.prevRanges)),c=s?Fd(t.prevRanges,n.mapping):$d(n.mapping.maps[n.steps.length-1]);return new Ld(t.done.addTransform(n,a?e.selection.getBookmark():null,r,Wd(e)),Bd.empty,c,n.time)}(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput:function(t,e){var n="historyUndo"==e.inputType?Xd(t.state,t.dispatch):"historyRedo"==e.inputType&&Yd(t.state,t.dispatch);return n&&e.preventDefault(),n}}}})}function Xd(t,e){var n=Kd.getState(t);return!(!n||0==n.done.eventCount)&&(e&&Hd(n,t,e,!1),!0)}function Yd(t,e){var n=Kd.getState(t);return!(!n||0==n.undone.eventCount)&&(e&&Hd(n,t,e,!0),!0)}const Qd=Oi.create({name:"history",defaultOptions:{depth:100,newGroupDelay:500},addCommands:()=>({undo:()=>({state:t,dispatch:e})=>Xd(t,e),redo:()=>({state:t,dispatch:e})=>Yd(t,e)}),addProseMirrorPlugins(){return[Gd(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),Zd=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/gm,tu=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/gm,eu=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/gm,nu=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/gm,ru=Ls.create({name:"italic",defaultOptions:{HTMLAttributes:{}},parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:t=>"normal"!==t.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:t}){return["em",vi(this.options.HTMLAttributes,t),0]},addCommands:()=>({setItalic:()=>({commands:t})=>t.setMark("italic"),toggleItalic:()=>({commands:t})=>t.toggleMark("italic"),unsetItalic:()=>({commands:t})=>t.unsetMark("italic")}),addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[$s(Zd,this.type),$s(eu,this.type)]},addPasteRules(){return[Fs(tu,this.type),Fs(nu,this.type)]}}),ou=Ps.create({name:"listItem",defaultOptions:{HTMLAttributes:{}},content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",vi(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem("listItem"),Tab:()=>this.editor.commands.sinkListItem("listItem"),"Shift-Tab":()=>this.editor.commands.liftListItem("listItem")}}}),iu=Ps.create({name:"paragraph",priority:1e3,defaultOptions:{HTMLAttributes:{}},group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",vi(this.options.HTMLAttributes,t),0]},addCommands:()=>({setParagraph:()=>({commands:t})=>t.setNode("paragraph")}),addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),su=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/gm,au=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/gm,cu=Ls.create({name:"strike",defaultOptions:{HTMLAttributes:{}},parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("line-through")&&{}}],renderHTML({HTMLAttributes:t}){return["s",vi(this.options.HTMLAttributes,t),0]},addCommands:()=>({setStrike:()=>({commands:t})=>t.setMark("strike"),toggleStrike:()=>({commands:t})=>t.toggleMark("strike"),unsetStrike:()=>({commands:t})=>t.unsetMark("strike")}),addKeyboardShortcuts(){return{"Mod-Shift-x":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[$s(su,this.type)]},addPasteRules(){return[Fs(au,this.type)]}}),lu=Ps.create({name:"text",group:"inline"}),pu=Oi.create({name:"starterKit",addExtensions(){var t,e,n,r,o,i,s,a,c,l,p,d,u,h,f,m,v,g;const y=[];return!1!==this.options.blockquote&&y.push(dd.configure(null===(t=this.options)||void 0===t?void 0:t.blockquote)),!1!==this.options.bold&&y.push(vd.configure(null===(e=this.options)||void 0===e?void 0:e.bold)),!1!==this.options.bulletList&&y.push(od.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&y.push(bd.configure(null===(r=this.options)||void 0===r?void 0:r.code)),!1!==this.options.codeBlock&&y.push(Wc.configure(null===(o=this.options)||void 0===o?void 0:o.codeBlock)),!1!==this.options.document&&y.push(wd.configure(null===(i=this.options)||void 0===i?void 0:i.document)),!1!==this.options.dropcursor&&y.push(xd.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&y.push(_d.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&y.push(Td.configure(null===(c=this.options)||void 0===c?void 0:c.hardBreak)),!1!==this.options.heading&&y.push(Vd.configure(null===(l=this.options)||void 0===l?void 0:l.heading)),!1!==this.options.history&&y.push(Qd.configure(null===(p=this.options)||void 0===p?void 0:p.history)),!1!==this.options.horizontalRule&&y.push(ed.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&y.push(ru.configure(null===(u=this.options)||void 0===u?void 0:u.italic)),!1!==this.options.listItem&&y.push(ou.configure(null===(h=this.options)||void 0===h?void 0:h.listItem)),!1!==this.options.orderedList&&y.push(sd.configure(null===(f=this.options)||void 0===f?void 0:f.orderedList)),!1!==this.options.paragraph&&y.push(iu.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&y.push(cu.configure(null===(v=this.options)||void 0===v?void 0:v.strike)),!1!==this.options.text&&y.push(lu.configure(null===(g=this.options)||void 0===g?void 0:g.text)),y}});const du={components:{EditorContent:Hc,BubbleMenu:$c},props:{modelValue:{type:String,default:""},maxChars:{type:Number,default:0},bubbleMenu:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},bold:{type:Boolean,default:!0},italic:{type:Boolean,default:!0},strike:{type:Boolean,default:!0},underline:{type:Boolean,default:!0},code:{type:Boolean,default:!0},codeBlock:{type:Boolean,default:!0},blockquote:{type:Boolean,default:!0},bulletList:{type:Boolean,default:!0},orderedList:{type:Boolean,default:!0},taskList:{type:Boolean,default:!0},heading:{type:Boolean,default:!0},textAlign:{type:Boolean,default:!0},horizontalRule:{type:Boolean,default:!0},undoRedo:{type:Boolean,default:!0}},data:()=>({editor:null,headingOpen:!1,alignOpen:!1}),watch:{modelValue(t){this.editor.getHTML()!==t&&this.editor.commands.setContent(this.modelValue,!1)},disabled(t){this.editor&&this.editor.setEditable(!t)}},methods:{insertImageFromURL(t){this.editor.chain().focus().setImage({src:t},!1).run()}},computed:{extensions(){return[pu,Kc,td,Wc,sd.configure({class:"inline-flex"}),od.configure({class:"inline-flex"}),Zp.configure({limit:this.maxChars}),ad,ld]},hasTextAlign(){return this.editor.isActive({textAlign:"left"})||this.editor.isActive({textAlign:"right"})||this.editor.isActive({textAlign:"center"})||this.editor.isActive({textAlign:"justify"})},charPercentage(){return Math.round(100/this.maxChars*this.editor.getCharacterCount())}},mounted(){this.editor=new Fc({content:this.modelValue,extensions:this.extensions,editorProps:{attributes:{class:"h-full overflow-y-auto input"}},editable:!this.disabled}).on("update",(({editor:t})=>{this.$emit("update:modelValue",t.getHTML())})),this.$watch((()=>this.maxChars),(()=>{}))},beforeUnmount(){this.editor.destroy()}},uu=["aria-label"],hu=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M7 5h6a3.5 3.5 0 0 1 0 7h-6z"}),t.createElementVNode("path",{d:"M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7"})],-1)],fu=["aria-label"],mu=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("line",{x1:"11",y1:"5",x2:"17",y2:"5"}),t.createElementVNode("line",{x1:"7",y1:"19",x2:"13",y2:"19"}),t.createElementVNode("line",{x1:"14",y1:"5",x2:"10",y2:"19"})],-1)],vu=["aria-label"],gu=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M7 5v9a5 5 0 0 0 10 0v-9"}),t.createElementVNode("path",{d:"M4 12h16"})],-1)],yu=["aria-label"],bu=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M7 5v5a5 5 0 0 0 10 0v-5"}),t.createElementVNode("path",{d:"M5 19h14"})],-1)],wu=["aria-label"],ku=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("polyline",{points:"7 8 3 12 7 16"}),t.createElementVNode("polyline",{points:"17 8 21 12 17 16"}),t.createElementVNode("line",{x1:"14",y1:"4",x2:"10",y2:"20"})],-1)],xu=["aria-label"],Mu=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),t.createElementVNode("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"}),t.createElementVNode("path",{d:"M10 13l-1 2l1 2"}),t.createElementVNode("path",{d:"M14 13l1 2l-1 2"})],-1)],Su=["aria-label"],Ou=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M6 15h15"}),t.createElementVNode("path",{d:"M21 19h-15"}),t.createElementVNode("path",{d:"M15 11h6"}),t.createElementVNode("path",{d:"M21 7h-6"}),t.createElementVNode("path",{d:"M9 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2"}),t.createElementVNode("path",{d:"M3 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2"})],-1)],Cu=["aria-label"],Eu=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("line",{x1:"9",y1:"6",x2:"20",y2:"6"}),t.createElementVNode("line",{x1:"9",y1:"12",x2:"20",y2:"12"}),t.createElementVNode("line",{x1:"9",y1:"18",x2:"20",y2:"18"}),t.createElementVNode("line",{x1:"5",y1:"6",x2:"5",y2:"6.01"}),t.createElementVNode("line",{x1:"5",y1:"12",x2:"5",y2:"12.01"}),t.createElementVNode("line",{x1:"5",y1:"18",x2:"5",y2:"18.01"})],-1)],Nu=["aria-label"],_u=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M11 6h9"}),t.createElementVNode("path",{d:"M11 12h9"}),t.createElementVNode("path",{d:"M12 18h8"}),t.createElementVNode("path",{d:"M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4"}),t.createElementVNode("path",{d:"M6 10v-6l-2 2"})],-1)],Tu=["aria-label"],Vu=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M3.5 5.5l1.5 1.5l2.5 -2.5"}),t.createElementVNode("path",{d:"M3.5 11.5l1.5 1.5l2.5 -2.5"}),t.createElementVNode("path",{d:"M3.5 17.5l1.5 1.5l2.5 -2.5"}),t.createElementVNode("line",{x1:"11",y1:"6",x2:"20",y2:"6"}),t.createElementVNode("line",{x1:"11",y1:"12",x2:"20",y2:"12"}),t.createElementVNode("line",{x1:"11",y1:"18",x2:"20",y2:"18"})],-1)],Au={key:10},Du=["aria-label"],zu=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M7 12h10"}),t.createElementVNode("path",{d:"M7 4v16"}),t.createElementVNode("path",{d:"M17 4v16"}),t.createElementVNode("path",{d:"M15 20h4"}),t.createElementVNode("path",{d:"M15 4h4"}),t.createElementVNode("path",{d:"M5 20h4"}),t.createElementVNode("path",{d:"M5 4h4"})],-1)],Ru={key:0,class:"mx-1 inline-flex space-x-1"},Iu=["aria-label"],Bu=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M19 18v-8l-2 2"}),t.createElementVNode("path",{d:"M4 6v12"}),t.createElementVNode("path",{d:"M12 6v12"}),t.createElementVNode("path",{d:"M11 18h2"}),t.createElementVNode("path",{d:"M3 18h2"}),t.createElementVNode("path",{d:"M4 12h8"}),t.createElementVNode("path",{d:"M3 6h2"}),t.createElementVNode("path",{d:"M11 6h2"})],-1)],Pu=["aria-label"],Lu=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 -.001"}),t.createElementVNode("path",{d:"M4 6v12"}),t.createElementVNode("path",{d:"M12 6v12"}),t.createElementVNode("path",{d:"M11 18h2"}),t.createElementVNode("path",{d:"M3 18h2"}),t.createElementVNode("path",{d:"M4 12h8"}),t.createElementVNode("path",{d:"M3 6h2"}),t.createElementVNode("path",{d:"M11 6h2"})],-1)],ju=["aria-label"],$u=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M19 14a2 2 0 1 0 -2 -2"}),t.createElementVNode("path",{d:"M17 16a2 2 0 1 0 2 -2"}),t.createElementVNode("path",{d:"M4 6v12"}),t.createElementVNode("path",{d:"M12 6v12"}),t.createElementVNode("path",{d:"M11 18h2"}),t.createElementVNode("path",{d:"M3 18h2"}),t.createElementVNode("path",{d:"M4 12h8"}),t.createElementVNode("path",{d:"M3 6h2"}),t.createElementVNode("path",{d:"M11 6h2"})],-1)],Fu=["aria-label"],Hu=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M20 18v-8l-4 6h5"}),t.createElementVNode("path",{d:"M4 6v12"}),t.createElementVNode("path",{d:"M12 6v12"}),t.createElementVNode("path",{d:"M11 18h2"}),t.createElementVNode("path",{d:"M3 18h2"}),t.createElementVNode("path",{d:"M4 12h8"}),t.createElementVNode("path",{d:"M3 6h2"}),t.createElementVNode("path",{d:"M11 6h2"})],-1)],qu=["aria-label"],Ju=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M17 18h2a2 2 0 1 0 0 -4h-2v-4h4"}),t.createElementVNode("path",{d:"M4 6v12"}),t.createElementVNode("path",{d:"M12 6v12"}),t.createElementVNode("path",{d:"M11 18h2"}),t.createElementVNode("path",{d:"M3 18h2"}),t.createElementVNode("path",{d:"M4 12h8"}),t.createElementVNode("path",{d:"M3 6h2"}),t.createElementVNode("path",{d:"M11 6h2"})],-1)],Wu=["aria-label"],Ku=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("circle",{transform:"rotate(180 19 16)",cx:"19",cy:"16",r:"2"}),t.createElementVNode("path",{d:"M21 12a2 2 0 1 0 -4 0v4"}),t.createElementVNode("path",{d:"M4 6v12"}),t.createElementVNode("path",{d:"M12 6v12"}),t.createElementVNode("path",{d:"M11 18h2"}),t.createElementVNode("path",{d:"M3 18h2"}),t.createElementVNode("path",{d:"M4 12h8"}),t.createElementVNode("path",{d:"M3 6h2"}),t.createElementVNode("path",{d:"M11 6h2"})],-1)],Uu={key:11},Gu=["aria-label"],Xu=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),t.createElementVNode("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),t.createElementVNode("line",{x1:"6",y1:"18",x2:"18",y2:"18"})],-1)],Yu={key:0,class:"inline-flex mx-1 space-x-1"},Qu=["aria-label"],Zu=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),t.createElementVNode("line",{x1:"4",y1:"12",x2:"14",y2:"12"}),t.createElementVNode("line",{x1:"4",y1:"18",x2:"18",y2:"18"})],-1)],th=["aria-label"],eh=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),t.createElementVNode("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),t.createElementVNode("line",{x1:"6",y1:"18",x2:"18",y2:"18"})],-1)],nh=["aria-label"],rh=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),t.createElementVNode("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),t.createElementVNode("line",{x1:"6",y1:"18",x2:"20",y2:"18"})],-1)],oh=["aria-label"],ih=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),t.createElementVNode("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),t.createElementVNode("line",{x1:"4",y1:"18",x2:"16",y2:"18"})],-1)],sh=["aria-label"],ah=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("line",{x1:"4",y1:"7",x2:"20",y2:"7"}),t.createElementVNode("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),t.createElementVNode("line",{x1:"14",y1:"11",x2:"14",y2:"17"}),t.createElementVNode("path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"}),t.createElementVNode("path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"})],-1)],ch=["aria-label"],lh=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),t.createElementVNode("line",{x1:"4",y1:"4",x2:"4",y2:"4.01"}),t.createElementVNode("line",{x1:"8",y1:"4",x2:"8",y2:"4.01"}),t.createElementVNode("line",{x1:"12",y1:"4",x2:"12",y2:"4.01"}),t.createElementVNode("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),t.createElementVNode("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),t.createElementVNode("line",{x1:"4",y1:"8",x2:"4",y2:"8.01"}),t.createElementVNode("line",{x1:"12",y1:"8",x2:"12",y2:"8.01"}),t.createElementVNode("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),t.createElementVNode("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),t.createElementVNode("line",{x1:"12",y1:"16",x2:"12",y2:"16.01"}),t.createElementVNode("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),t.createElementVNode("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),t.createElementVNode("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),t.createElementVNode("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),t.createElementVNode("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),t.createElementVNode("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})],-1)],ph=["aria-label"],dh=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M9 13l-4 -4l4 -4m-4 4h11a4 4 0 0 1 0 8h-1"})],-1)],uh=["aria-label"],hh=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M15 13l4 -4l-4 -4m4 4h-11a4 4 0 0 0 0 8h1"})],-1)];du.render=function(e,n,r,o,i,s){const a=t.resolveComponent("CollapseXTransition"),c=t.resolveComponent("editor-content"),l=t.resolveDirective("tooltip");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",null,[i.editor?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.bubbleMenu?"bubble-menu":"div"),{key:0,editor:i.editor,class:t.normalizeClass(["flex-wrap space-x-1",r.bubbleMenu?"bg-gray-600 rounded dark p-1":"mb-2"])},{default:t.withCtx((()=>[r.bold?t.withDirectives((t.openBlock(),t.createElementBlock("button",{key:0,"aria-label":e.__("tiptap::tiptap.bold"),onClick:n[0]||(n[0]=t=>i.editor.chain().focus().toggleBold().run()),class:t.normalizeClass(["button",{accent:i.editor.isActive("bold")}])},hu,10,uu)),[[l,e.__("tiptap::tiptap.bold")]]):t.createCommentVNode("",!0),r.italic?t.withDirectives((t.openBlock(),t.createElementBlock("button",{key:1,"aria-label":e.__("tiptap::tiptap.italic"),onClick:n[1]||(n[1]=t=>i.editor.chain().focus().toggleItalic().run()),class:t.normalizeClass(["button",{accent:i.editor.isActive("italic")}])},mu,10,fu)),[[l,e.__("tiptap::tiptap.italic")]]):t.createCommentVNode("",!0),r.strike?t.withDirectives((t.openBlock(),t.createElementBlock("button",{key:2,"aria-label":e.__("tiptap::tiptap.strike"),onClick:n[2]||(n[2]=t=>i.editor.chain().focus().toggleStrike().run()),class:t.normalizeClass(["button",{accent:i.editor.isActive("strike")}])},gu,10,vu)),[[l,e.__("tiptap::tiptap.strike")]]):t.createCommentVNode("",!0),r.underline?t.withDirectives((t.openBlock(),t.createElementBlock("button",{key:3,"aria-label":e.__("tiptap::tiptap.underline"),onClick:n[3]||(n[3]=t=>i.editor.chain().focus().toggleUnderline().run()),class:t.normalizeClass(["button",{accent:i.editor.isActive("underline")}])},bu,10,yu)),[[l,e.__("tiptap::tiptap.underline")]]):t.createCommentVNode("",!0),r.code?t.withDirectives((t.openBlock(),t.createElementBlock("button",{key:4,"aria-label":e.__("tiptap::tiptap.code"),onClick:n[4]||(n[4]=t=>i.editor.chain().focus().toggleCode().run()),class:t.normalizeClass(["button",{accent:i.editor.isActive("code")}])},ku,10,wu)),[[l,e.__("tiptap::tiptap.code")]]):t.createCommentVNode("",!0),r.codeBlock?t.withDirectives((t.openBlock(),t.createElementBlock("button",{key:5,"aria-label":e.__("tiptap::tiptap.code_block"),onClick:n[5]||(n[5]=t=>i.editor.chain().focus().toggleCodeBlock().run()),class:t.normalizeClass(["button",{accent:i.editor.isActive("codeBlock")}])},Mu,10,xu)),[[l,e.__("tiptap::tiptap.code_block")]]):t.createCommentVNode("",!0),r.blockquote?t.withDirectives((t.openBlock(),t.createElementBlock("button",{key:6,"aria-label":e.__("tiptap::tiptap.blockquote"),onClick:n[6]||(n[6]=t=>i.editor.chain().focus().toggleBlockquote().run()),class:t.normalizeClass(["button",{accent:i.editor.isActive("blockquote")}])},Ou,10,Su)),[[l,e.__("tiptap::tiptap.blockquote")]]):t.createCommentVNode("",!0),r.bulletList?t.withDirectives((t.openBlock(),t.createElementBlock("button",{key:7,"aria-label":e.__("tiptap::tiptap.bullet_list"),onClick:n[7]||(n[7]=t=>i.editor.chain().focus().toggleBulletList().run()),class:t.normalizeClass(["button",{accent:i.editor.isActive("bulletList")}])},Eu,10,Cu)),[[l,e.__("tiptap::tiptap.bullet_list")]]):t.createCommentVNode("",!0),r.orderedList?t.withDirectives((t.openBlock(),t.createElementBlock("button",{key:8,"aria-label":e.__("tiptap::tiptap.ordered_list"),onClick:n[8]||(n[8]=t=>i.editor.chain().focus().toggleOrderedList().run()),class:t.normalizeClass(["button",{accent:i.editor.isActive("orderedList")}])},_u,10,Nu)),[[l,e.__("tiptap::tiptap.ordered_list")]]):t.createCommentVNode("",!0),r.taskList?t.withDirectives((t.openBlock(),t.createElementBlock("button",{key:9,"aria-label":e.__("tiptap::tiptap.task_list"),onClick:n[9]||(n[9]=t=>i.editor.chain().focus().toggleTaskList().run()),class:t.normalizeClass(["button",{accent:i.editor.isActive("taskList")}])},Vu,10,Tu)),[[l,e.__("tiptap::tiptap.task_list")]]):t.createCommentVNode("",!0),r.heading?(t.openBlock(),t.createElementBlock("span",Au,[t.withDirectives(t.createElementVNode("button",{class:t.normalizeClass(["button",{accent:i.editor.isActive("heading")}]),onClick:n[10]||(n[10]=t=>{i.headingOpen=!i.headingOpen,i.alignOpen=!1}),"aria-label":e.__("tiptap::tiptap.heading")},zu,10,Du),[[l,e.__("tiptap::tiptap.heading")]]),t.createVNode(a,null,{default:t.withCtx((()=>[i.headingOpen?(t.openBlock(),t.createElementBlock("div",Ru,[t.withDirectives(t.createElementVNode("button",{class:t.normalizeClass(["button",{accent:i.editor.isActive("heading",{level:1})}]),"aria-label":`${e.__("tiptap::tiptap.heading")} 1`,onClick:n[11]||(n[11]=t=>i.editor.chain().focus().toggleHeading({level:1}).run())},Bu,10,Iu),[[l,`${e.__("tiptap::tiptap.heading")} 1`]]),t.withDirectives(t.createElementVNode("button",{class:t.normalizeClass(["button",{accent:i.editor.isActive("heading",{level:2})}]),"aria-label":`${e.__("tiptap::tiptap.heading")} 2`,onClick:n[12]||(n[12]=t=>i.editor.chain().focus().toggleHeading({level:2}).run())},Lu,10,Pu),[[l,`${e.__("tiptap::tiptap.heading")} 2`]]),t.withDirectives(t.createElementVNode("button",{class:t.normalizeClass(["button",{accent:i.editor.isActive("heading",{level:3})}]),"aria-label":`${e.__("tiptap::tiptap.heading")} 3`,onClick:n[13]||(n[13]=t=>i.editor.chain().focus().toggleHeading({level:3}).run())},$u,10,ju),[[l,`${e.__("tiptap::tiptap.heading")} 3`]]),t.withDirectives(t.createElementVNode("button",{class:t.normalizeClass(["button",{accent:i.editor.isActive("heading",{level:4})}]),"aria-label":`${e.__("tiptap::tiptap.heading")} 4`,onClick:n[14]||(n[14]=t=>i.editor.chain().focus().toggleHeading({level:4}).run())},Hu,10,Fu),[[l,`${e.__("tiptap::tiptap.heading")} 4`]]),t.withDirectives(t.createElementVNode("button",{class:t.normalizeClass(["button",{accent:i.editor.isActive("heading",{level:5})}]),"aria-label":`${e.__("tiptap::tiptap.heading")} 5`,onClick:n[15]||(n[15]=t=>i.editor.chain().focus().toggleHeading({level:5}).run())},Ju,10,qu),[[l,`${e.__("tiptap::tiptap.heading")} 5`]]),t.withDirectives(t.createElementVNode("button",{class:t.normalizeClass(["button",{accent:i.editor.isActive("heading",{level:6})}]),"aria-label":`${e.__("tiptap::tiptap.heading")} 6`,onClick:n[16]||(n[16]=t=>i.editor.chain().focus().toggleHeading({level:6}).run())},Ku,10,Wu),[[l,`${e.__("tiptap::tiptap.heading")} 6`]])])):t.createCommentVNode("",!0)])),_:1})])):t.createCommentVNode("",!0),r.textAlign?(t.openBlock(),t.createElementBlock("span",Uu,[t.withDirectives(t.createElementVNode("button",{class:t.normalizeClass(["button",{accent:s.hasTextAlign}]),onClick:n[17]||(n[17]=t=>{i.alignOpen=!i.alignOpen,i.headingOpen=!1}),"aria-label":e.__("tiptap::tiptap.text_align")},Xu,10,Gu),[[l,e.__("tiptap::tiptap.text_align")]]),t.createVNode(a,null,{default:t.withCtx((()=>[i.alignOpen?(t.openBlock(),t.createElementBlock("div",Yu,[t.withDirectives(t.createElementVNode("button",{class:t.normalizeClass(["button",{accent:i.editor.isActive({textAlign:"left"})}]),"aria-label":e.__("tiptap::tiptap.left"),onClick:n[18]||(n[18]=t=>i.editor.chain().focus().setTextAlign("left").run())},Zu,10,Qu),[[l,e.__("tiptap::tiptap.left")]]),t.withDirectives(t.createElementVNode("button",{class:t.normalizeClass(["button",{accent:i.editor.isActive({textAlign:"center"})}]),"aria-label":e.__("tiptap::tiptap.center"),onClick:n[19]||(n[19]=t=>i.editor.chain().focus().setTextAlign("center").run())},eh,10,th),[[l,e.__("tiptap::tiptap.center")]]),t.withDirectives(t.createElementVNode("button",{class:t.normalizeClass(["button",{accent:i.editor.isActive({textAlign:"right"})}]),"aria-label":e.__("tiptap::tiptap.right"),onClick:n[20]||(n[20]=t=>i.editor.chain().focus().setTextAlign("right").run())},rh,10,nh),[[l,e.__("tiptap::tiptap.right")]]),t.withDirectives(t.createElementVNode("button",{class:t.normalizeClass(["button",{accent:i.editor.isActive({textAlign:"justify"})}]),"aria-label":e.__("tiptap::tiptap.justify"),onClick:n[21]||(n[21]=t=>i.editor.chain().focus().setTextAlign("justify").run())},ih,10,oh),[[l,e.__("tiptap::tiptap.justify")]]),t.withDirectives(t.createElementVNode("button",{class:"button","aria-label":e.__("tiptap::tiptap.clear"),onClick:n[22]||(n[22]=t=>i.editor.chain().focus().unsetTextAlign().run())},ah,8,sh),[[l,e.__("tiptap::tiptap.clear")]])])):t.createCommentVNode("",!0)])),_:1})])):t.createCommentVNode("",!0),r.horizontalRule?t.withDirectives((t.openBlock(),t.createElementBlock("button",{key:12,"aria-label":e.__("tiptap::tiptap.horizontal_rule"),onClick:n[23]||(n[23]=t=>i.editor.chain().focus().setHorizontalRule().run()),class:"button"},lh,8,ch)),[[l,e.__("tiptap::tiptap.horizontal_rule")]]):t.createCommentVNode("",!0),r.undoRedo?t.withDirectives((t.openBlock(),t.createElementBlock("button",{key:13,"aria-label":e.__("tiptap::tiptap.undo"),onClick:n[24]||(n[24]=t=>i.editor.chain().focus().undo().run()),class:"button"},dh,8,ph)),[[l,e.__("tiptap::tiptap.undo")]]):t.createCommentVNode("",!0),r.undoRedo?t.withDirectives((t.openBlock(),t.createElementBlock("button",{key:14,"aria-label":e.__("tiptap::tiptap.redo"),onClick:n[25]||(n[25]=t=>i.editor.chain().focus().redo().run()),class:"button"},hh,8,uh)),[[l,e.__("tiptap::tiptap.redo")]]):t.createCommentVNode("",!0)])),_:1},8,["editor","class"])):t.createCommentVNode("",!0)]),t.createVNode(c,{editor:i.editor,class:"min-h-64 h-64",onClick:n[26]||(n[26]=t=>{i.headingOpen=!1,i.alignOpen=!1})},null,8,["editor"]),i.editor&&r.maxChars>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["w-full",s.charPercentage>90?"text-red-500":s.charPercentage>75?"text-yellow-500":null])},t.toDisplayString(e.__("tiptap::tiptap.character_count",{chars:i.editor.getCharacterCount(),max:r.maxChars})),3)):t.createCommentVNode("",!0)])};const fh={components:{Tiptap:du},data:()=>({bubbleMenu:!1,maxChars:280,content:"

This is tiptap 2 in Voyager II using Vue 3 🎉

",disabled:!1,bold:!0,italic:!0,strike:!0,underline:!0,code:!0,codeBlock:!0,blockquote:!0,bulletList:!0,orderedList:!0,taskList:!0,heading:!0,textAlign:!0,horizontalRule:!0,undoRedo:!0})},mh={class:"flex space-x-2"},vh={class:"input-group"},gh=t.createElementVNode("label",{for:"bubble",class:"label"},"Bubble menu",-1),yh={class:"mt-1"},bh={class:"input-group"},wh=t.createElementVNode("label",{for:"maxChars",class:"label"},"Max characters (0 = infinite)",-1),kh={class:"mt-1"},xh={class:"input-group"},Mh=t.createElementVNode("label",{for:"disabled",class:"label"},"Disabled",-1),Sh={class:"mt-1"},Oh={class:"flex flex-wrap space-x-2 mt-4"},Ch={class:"input-group"},Eh={for:"bold",class:"label"},Nh={class:"mt-1"},_h={class:"input-group"},Th={for:"italic",class:"label"},Vh={class:"mt-1"},Ah={class:"input-group"},Dh={for:"strike",class:"label"},zh={class:"mt-1"},Rh={class:"input-group"},Ih={for:"underline",class:"label"},Bh={class:"mt-1"},Ph={class:"input-group"},Lh={for:"code",class:"label"},jh={class:"mt-1"},$h={class:"input-group"},Fh={for:"codeBlock",class:"label"},Hh={class:"mt-1"},qh={class:"input-group"},Jh={for:"blockquote",class:"label"},Wh={class:"mt-1"},Kh={class:"input-group"},Uh={for:"bulletList",class:"label"},Gh={class:"mt-1"},Xh={class:"input-group"},Yh={for:"orderedList",class:"label"},Qh={class:"mt-1"},Zh={class:"input-group"},tf={for:"taskList",class:"label"},ef={class:"mt-1"},nf={class:"input-group"},rf={for:"heading",class:"label"},of={class:"mt-1"},sf={class:"input-group"},af={for:"textAlign",class:"label"},cf={class:"mt-1"},lf={class:"input-group"},pf={for:"horizontalRule",class:"label"},df={class:"mt-1"},uf={class:"input-group"},hf={for:"undoRedo",class:"label"},ff={class:"mt-1"};fh.render=function(e,n,r,o,i,s){const a=t.resolveComponent("tiptap"),c=t.resolveComponent("collapsible");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(a,{bubbleMenu:i.bubbleMenu,maxChars:i.maxChars,modelValue:i.content,"onUpdate:modelValue":n[0]||(n[0]=t=>i.content=t),disabled:i.disabled,bold:i.bold,italic:i.italic,strike:i.strike,underline:i.underline,code:i.code,codeBlock:i.codeBlock,blockquote:i.blockquote,bulletList:i.bulletList,orderedList:i.orderedList,taskList:i.taskList,heading:i.heading,textAlign:i.textAlign,horizontalRule:i.horizontalRule,undoRedo:i.undoRedo,class:"mb-2"},null,8,["bubbleMenu","maxChars","modelValue","disabled","bold","italic","strike","underline","code","codeBlock","blockquote","bulletList","orderedList","taskList","heading","textAlign","horizontalRule","undoRedo"]),t.createVNode(c,{title:"Options"},{default:t.withCtx((()=>[t.createElementVNode("div",mh,[t.createElementVNode("div",vh,[gh,t.createElementVNode("div",yh,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[1]||(n[1]=t=>i.bubbleMenu=t),id:"bubble"},null,512),[[t.vModelCheckbox,i.bubbleMenu]])])]),t.createElementVNode("div",bh,[wh,t.createElementVNode("div",kh,[t.withDirectives(t.createElementVNode("input",{type:"number",class:"input","onUpdate:modelValue":n[2]||(n[2]=t=>i.maxChars=t),min:"0",id:"maxChars"},null,512),[[t.vModelText,i.maxChars,void 0,{number:!0}]])])]),t.createElementVNode("div",xh,[Mh,t.createElementVNode("div",Sh,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[3]||(n[3]=t=>i.disabled=t),id:"disabled"},null,512),[[t.vModelCheckbox,i.disabled]])])])]),t.createElementVNode("div",Oh,[t.createElementVNode("div",Ch,[t.createElementVNode("label",Eh,t.toDisplayString(e.__("tiptap::tiptap.bold")),1),t.createElementVNode("div",Nh,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[4]||(n[4]=t=>i.bold=t),id:"bold"},null,512),[[t.vModelCheckbox,i.bold]])])]),t.createElementVNode("div",_h,[t.createElementVNode("label",Th,t.toDisplayString(e.__("tiptap::tiptap.italic")),1),t.createElementVNode("div",Vh,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[5]||(n[5]=t=>i.italic=t),id:"italic"},null,512),[[t.vModelCheckbox,i.italic]])])]),t.createElementVNode("div",Ah,[t.createElementVNode("label",Dh,t.toDisplayString(e.__("tiptap::tiptap.strike")),1),t.createElementVNode("div",zh,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[6]||(n[6]=t=>i.strike=t),id:"strike"},null,512),[[t.vModelCheckbox,i.strike]])])]),t.createElementVNode("div",Rh,[t.createElementVNode("label",Ih,t.toDisplayString(e.__("tiptap::tiptap.underline")),1),t.createElementVNode("div",Bh,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[7]||(n[7]=t=>i.underline=t),id:"underline"},null,512),[[t.vModelCheckbox,i.underline]])])]),t.createElementVNode("div",Ph,[t.createElementVNode("label",Lh,t.toDisplayString(e.__("tiptap::tiptap.code")),1),t.createElementVNode("div",jh,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[8]||(n[8]=t=>i.code=t),id:"code"},null,512),[[t.vModelCheckbox,i.code]])])]),t.createElementVNode("div",$h,[t.createElementVNode("label",Fh,t.toDisplayString(e.__("tiptap::tiptap.code_block")),1),t.createElementVNode("div",Hh,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[9]||(n[9]=t=>i.codeBlock=t),id:"codeBlock"},null,512),[[t.vModelCheckbox,i.codeBlock]])])]),t.createElementVNode("div",qh,[t.createElementVNode("label",Jh,t.toDisplayString(e.__("tiptap::tiptap.blockquote")),1),t.createElementVNode("div",Wh,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[10]||(n[10]=t=>i.blockquote=t),id:"blockquote"},null,512),[[t.vModelCheckbox,i.blockquote]])])]),t.createElementVNode("div",Kh,[t.createElementVNode("label",Uh,t.toDisplayString(e.__("tiptap::tiptap.bullet_list")),1),t.createElementVNode("div",Gh,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[11]||(n[11]=t=>i.bulletList=t),id:"bulletList"},null,512),[[t.vModelCheckbox,i.bulletList]])])]),t.createElementVNode("div",Xh,[t.createElementVNode("label",Yh,t.toDisplayString(e.__("tiptap::tiptap.ordered_list")),1),t.createElementVNode("div",Qh,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[12]||(n[12]=t=>i.orderedList=t),id:"orderedList"},null,512),[[t.vModelCheckbox,i.orderedList]])])]),t.createElementVNode("div",Zh,[t.createElementVNode("label",tf,t.toDisplayString(e.__("tiptap::tiptap.task_list")),1),t.createElementVNode("div",ef,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[13]||(n[13]=t=>i.taskList=t),id:"taskList"},null,512),[[t.vModelCheckbox,i.taskList]])])]),t.createElementVNode("div",nf,[t.createElementVNode("label",rf,t.toDisplayString(e.__("tiptap::tiptap.heading")),1),t.createElementVNode("div",of,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[14]||(n[14]=t=>i.heading=t),id:"heading"},null,512),[[t.vModelCheckbox,i.heading]])])]),t.createElementVNode("div",sf,[t.createElementVNode("label",af,t.toDisplayString(e.__("tiptap::tiptap.text_align")),1),t.createElementVNode("div",cf,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[15]||(n[15]=t=>i.textAlign=t),id:"textAlign"},null,512),[[t.vModelCheckbox,i.textAlign]])])]),t.createElementVNode("div",lf,[t.createElementVNode("label",pf,t.toDisplayString(e.__("tiptap::tiptap.horizontal_rule")),1),t.createElementVNode("div",df,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[16]||(n[16]=t=>i.horizontalRule=t),id:"horizontalRule"},null,512),[[t.vModelCheckbox,i.horizontalRule]])])]),t.createElementVNode("div",uf,[t.createElementVNode("label",hf,t.toDisplayString(e.__("tiptap::tiptap.undo"))+"/"+t.toDisplayString(e.__("tiptap::tiptap.redo")),1),t.createElementVNode("div",ff,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[17]||(n[17]=t=>i.undoRedo=t),id:"undoRedo"},null,512),[[t.vModelCheckbox,i.undoRedo]])])])])])),_:1}),t.createVNode(c,{title:"HTML Output"},{default:t.withCtx((()=>[t.withDirectives(t.createElementVNode("textarea",{class:"input w-full min-h-64","onUpdate:modelValue":n[18]||(n[18]=t=>i.content=t)},null,512),[[t.vModelText,i.content]])])),_:1})],64)};const mf={mixins:[voyager.formfieldMixin]},vf={key:1},gf={key:2};mf.render=function(e,n,r,o,i,s){const a=t.resolveComponent("tiptap");return"query"==e.action?t.renderSlot(e.$slots,"default",{key:0}):"add"==e.action||"edit"==e.action?(t.openBlock(),t.createElementBlock("div",vf,[t.createVNode(a,{bubbleMenu:e.options.bubbleMenu,maxChars:e.options.maxChars,modelValue:e.modelValue,"onUpdate:modelValue":n[0]||(n[0]=t=>e.$emit("update:modelValue",t)),bold:e.options.bold,italic:e.options.italic,strike:e.options.strike,underline:e.options.underline,code:e.options.code,codeBlock:e.options.codeBlock,blockquote:e.options.blockquote,bulletList:e.options.bulletList,orderedList:e.options.orderedList,taskList:e.options.taskList,heading:e.options.heading,textAlign:e.options.textAlign,horizontalRule:e.options.horizontalRule,undoRedo:e.options.undoRedo},null,8,["bubbleMenu","maxChars","modelValue","bold","italic","strike","underline","code","codeBlock","blockquote","bulletList","orderedList","taskList","heading","textAlign","horizontalRule","undoRedo"])])):"browse"==e.action?(t.openBlock(),t.createElementBlock("div",gf,t.toDisplayString(e.modelValue),1)):t.createCommentVNode("",!0)};const yf={mixins:[voyager.formfieldBuilderMixin],computed:{defaultListOptions:()=>({display_length:150}),defaultViewOptions:()=>({bubbleMenu:!1,maxChars:0,bold:!0,italic:!0,strike:!0,underline:!0,code:!0,codeBlock:!0,blockquote:!0,bulletList:!0,orderedList:!0,taskList:!0,heading:!0,textAlign:!0,horizontalRule:!0,undoRedo:!0})}},bf={key:0},wf={for:"length",class:"label"},kf={key:1},xf={class:"mt-2"},Mf={for:"maxChars",class:"label"},Sf={class:"grid grid-cols-3 lg:grid-cols-2 xl:grid-cols-3 gap-2 mt-2"},Of={class:"flex items-center space-x-1"},Cf={for:"bubble",class:"label"},Ef={class:"flex items-center space-x-1"},Nf={for:"bold",class:"label"},_f={class:"flex items-center space-x-1"},Tf={for:"italic",class:"label"},Vf={class:"flex items-center space-x-1"},Af={for:"strike",class:"label"},Df={class:"flex items-center space-x-1"},zf={for:"underline",class:"label"},Rf={class:"flex items-center space-x-1"},If={for:"code",class:"label"},Bf={class:"flex items-center space-x-1"},Pf={for:"codeBlock",class:"label"},Lf={class:"flex items-center space-x-1"},jf={for:"blockquote",class:"label"},$f={class:"flex items-center space-x-1"},Ff={for:"bulletList",class:"label"},Hf={class:"flex items-center space-x-1"},qf={for:"orderedList",class:"label"},Jf={class:"flex items-center space-x-1"},Wf={for:"taskList",class:"label"},Kf={class:"flex items-center space-x-1"},Uf={for:"heading",class:"label"},Gf={class:"flex items-center space-x-1"},Xf={for:"textAlign",class:"label"},Yf={class:"flex items-center space-x-1"},Qf={for:"horizontalRule",class:"label"},Zf={class:"flex items-center space-x-1"},tm={for:"undoRedo",class:"label"},em={key:2};yf.render=function(e,n,r,o,i,s){const a=t.resolveComponent("tiptap");return"list-options"==e.action?(t.openBlock(),t.createElementBlock("div",bf,[t.createElementVNode("label",wf,t.toDisplayString(e.__("voyager::generic.display_length")),1),t.withDirectives(t.createElementVNode("input",{type:"number",id:"length",class:"input w-full","onUpdate:modelValue":n[0]||(n[0]=t=>e.options.display_length=t)},null,512),[[t.vModelText,e.options.display_length,void 0,{number:!0}]])])):"view-options"==e.action?(t.openBlock(),t.createElementBlock("div",kf,[t.createElementVNode("div",xf,[t.createElementVNode("label",Mf,t.toDisplayString(e.__("tiptap::tiptap.max_characters")),1),t.withDirectives(t.createElementVNode("input",{type:"number",class:"input w-full","onUpdate:modelValue":n[1]||(n[1]=t=>e.options.maxChars=t),min:"0",id:"maxChars"},null,512),[[t.vModelText,e.options.maxChars,void 0,{number:!0}]])]),t.createElementVNode("div",Sf,[t.createElementVNode("div",Of,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[2]||(n[2]=t=>e.options.bubbleMenu=t),id:"bubble"},null,512),[[t.vModelCheckbox,e.options.bubbleMenu]]),t.createElementVNode("label",Cf,t.toDisplayString(e.__("tiptap::tiptap.bubble_menu")),1)]),t.createElementVNode("div",Ef,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[3]||(n[3]=t=>e.options.bold=t),id:"bold"},null,512),[[t.vModelCheckbox,e.options.bold]]),t.createElementVNode("label",Nf,t.toDisplayString(e.__("tiptap::tiptap.bold")),1)]),t.createElementVNode("div",_f,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[4]||(n[4]=t=>e.options.italic=t),id:"italic"},null,512),[[t.vModelCheckbox,e.options.italic]]),t.createElementVNode("label",Tf,t.toDisplayString(e.__("tiptap::tiptap.italic")),1)]),t.createElementVNode("div",Vf,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[5]||(n[5]=t=>e.options.strike=t),id:"strike"},null,512),[[t.vModelCheckbox,e.options.strike]]),t.createElementVNode("label",Af,t.toDisplayString(e.__("tiptap::tiptap.strike")),1)]),t.createElementVNode("div",Df,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[6]||(n[6]=t=>e.options.underline=t),id:"underline"},null,512),[[t.vModelCheckbox,e.options.underline]]),t.createElementVNode("label",zf,t.toDisplayString(e.__("tiptap::tiptap.underline")),1)]),t.createElementVNode("div",Rf,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[7]||(n[7]=t=>e.options.code=t),id:"code"},null,512),[[t.vModelCheckbox,e.options.code]]),t.createElementVNode("label",If,t.toDisplayString(e.__("tiptap::tiptap.code")),1)]),t.createElementVNode("div",Bf,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[8]||(n[8]=t=>e.options.codeBlock=t),id:"codeBlock"},null,512),[[t.vModelCheckbox,e.options.codeBlock]]),t.createElementVNode("label",Pf,t.toDisplayString(e.__("tiptap::tiptap.code_block")),1)]),t.createElementVNode("div",Lf,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[9]||(n[9]=t=>e.options.blockquote=t),id:"blockquote"},null,512),[[t.vModelCheckbox,e.options.blockquote]]),t.createElementVNode("label",jf,t.toDisplayString(e.__("tiptap::tiptap.blockquote")),1)]),t.createElementVNode("div",$f,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[10]||(n[10]=t=>e.options.bulletList=t),id:"bulletList"},null,512),[[t.vModelCheckbox,e.options.bulletList]]),t.createElementVNode("label",Ff,t.toDisplayString(e.__("tiptap::tiptap.bullet_list")),1)]),t.createElementVNode("div",Hf,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[11]||(n[11]=t=>e.options.orderedList=t),id:"orderedList"},null,512),[[t.vModelCheckbox,e.options.orderedList]]),t.createElementVNode("label",qf,t.toDisplayString(e.__("tiptap::tiptap.ordered_list")),1)]),t.createElementVNode("div",Jf,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[12]||(n[12]=t=>e.options.taskList=t),id:"taskList"},null,512),[[t.vModelCheckbox,e.options.taskList]]),t.createElementVNode("label",Wf,t.toDisplayString(e.__("tiptap::tiptap.task_list")),1)]),t.createElementVNode("div",Kf,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[13]||(n[13]=t=>e.options.heading=t),id:"heading"},null,512),[[t.vModelCheckbox,e.options.heading]]),t.createElementVNode("label",Uf,t.toDisplayString(e.__("tiptap::tiptap.heading")),1)]),t.createElementVNode("div",Gf,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[14]||(n[14]=t=>e.options.textAlign=t),id:"textAlign"},null,512),[[t.vModelCheckbox,e.options.textAlign]]),t.createElementVNode("label",Xf,t.toDisplayString(e.__("tiptap::tiptap.text_align")),1)]),t.createElementVNode("div",Yf,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[15]||(n[15]=t=>e.options.horizontalRule=t),id:"horizontalRule"},null,512),[[t.vModelCheckbox,e.options.horizontalRule]]),t.createElementVNode("label",Qf,t.toDisplayString(e.__("tiptap::tiptap.horizontal_rule")),1)]),t.createElementVNode("div",Zf,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":n[16]||(n[16]=t=>e.options.undoRedo=t),id:"undoRedo"},null,512),[[t.vModelCheckbox,e.options.undoRedo]]),t.createElementVNode("label",tm,t.toDisplayString(e.__("tiptap::tiptap.undo"))+"/"+t.toDisplayString(e.__("tiptap::tiptap.redo")),1)])])])):"view"==e.action?(t.openBlock(),t.createElementBlock("div",em,[t.createVNode(a,{bubbleMenu:e.options.bubbleMenu,maxChars:e.options.maxChars,value:"''",bold:e.options.bold,italic:e.options.italic,strike:e.options.strike,underline:e.options.underline,code:e.options.code,codeBlock:e.options.codeBlock,blockquote:e.options.blockquote,bulletList:e.options.bulletList,orderedList:e.options.orderedList,taskList:e.options.taskList,heading:e.options.heading,textAlign:e.options.textAlign,horizontalRule:e.options.horizontalRule,undoRedo:e.options.undoRedo},null,8,["bubbleMenu","maxChars","bold","italic","strike","underline","code","codeBlock","blockquote","bulletList","orderedList","taskList","heading","textAlign","horizontalRule","undoRedo"])])):t.createCommentVNode("",!0)},voyager.component("tiptap",du),voyager.component("tiptap-demo",fh),voyager.component("tiptap-formfield",mf),voyager.component("tiptap-builder",yf),voyager.addToUI("Tiptap","tiptap-demo")})); +var u1=Object.defineProperty,f1=Object.defineProperties;var p1=Object.getOwnPropertyDescriptors;var Po=Object.getOwnPropertySymbols;var Wu=Object.prototype.hasOwnProperty,Ku=Object.prototype.propertyIsEnumerable;var Uu=(f,H,dt)=>H in f?u1(f,H,{enumerable:!0,configurable:!0,writable:!0,value:dt}):f[H]=dt,x=(f,H)=>{for(var dt in H||(H={}))Wu.call(H,dt)&&Uu(f,dt,H[dt]);if(Po)for(var dt of Po(H))Ku.call(H,dt)&&Uu(f,dt,H[dt]);return f},Lt=(f,H)=>f1(f,p1(H));var Gu=(f,H)=>{var dt={};for(var Xt in f)Wu.call(f,Xt)&&H.indexOf(Xt)<0&&(dt[Xt]=f[Xt]);if(f!=null&&Po)for(var Xt of Po(f))H.indexOf(Xt)<0&&Ku.call(f,Xt)&&(dt[Xt]=f[Xt]);return dt};var __vite_style__=document.createElement("style");__vite_style__.innerHTML=`.ProseMirror li>p:first-child,.ProseMirror div{display:inline}ul[data-type=taskList]{list-style:none;padding:0}ul[data-type=taskList] li{display:flex;align-items:center}ul[data-type=taskList] li>label{flex:0 0 auto;margin-right:.5rem} +`;document.head.appendChild(__vite_style__);(function(f,H){typeof exports=="object"&&typeof module!="undefined"?H(require("vue")):typeof define=="function"&&define.amd?define(["vue"],H):(f=typeof globalThis!="undefined"?globalThis:f||self,H(f.Vue))})(this,function(f){"use strict";function H(n){this.content=n}H.prototype={constructor:H,find:function(n){for(var t=0;t>1}},H.from=function(n){if(n instanceof H)return n;var t=[];if(n)for(var e in n)t.push(e,n[e]);return new H(t)};var dt=H;function Xt(n,t,e){for(var r=0;;r++){if(r==n.childCount||r==t.childCount)return n.childCount==t.childCount?null:e;var o=n.child(r),i=t.child(r);if(o==i){e+=o.nodeSize;continue}if(!o.sameMarkup(i))return e;if(o.isText&&o.text!=i.text){for(var s=0;o.text[s]==i.text[s];s++)e++;return e}if(o.content.size||i.content.size){var a=Xt(o.content,i.content,e+1);if(a!=null)return a}e+=o.nodeSize}}function Hs(n,t,e,r){for(var o=n.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:e,b:r};var s=n.child(--o),a=t.child(--i),l=s.nodeSize;if(s==a){e-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:e,b:r};if(s.isText&&s.text!=a.text){for(var c=0,u=Math.min(s.text.length,a.text.length);ct&&r(l,o+a,i,s)!==!1&&l.content.size){var u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,e-u),r,o+u)}a=c}},S.prototype.descendants=function(t){this.nodesBetween(0,this.size,t)},S.prototype.textBetween=function(t,e,r,o){var i="",s=!0;return this.nodesBetween(t,e,function(a,l){a.isText?(i+=a.text.slice(Math.max(t,l)-l,e-l),s=!r):a.isLeaf&&o?(i+=typeof o=="function"?o(a):o,s=!r):!s&&a.isBlock&&(i+=r,s=!0)},0),i},S.prototype.append=function(t){if(!t.size)return this;if(!this.size)return t;var e=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(e.isText&&e.sameMarkup(r)&&(o[o.length-1]=e.withText(e.text+r.text),i=1);it)for(var i=0,s=0;st&&((se)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,e-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,e-s-1))),r.push(a),o+=a.nodeSize),s=l}return new S(r,o)},S.prototype.cutByIndex=function(t,e){return t==e?S.empty:t==0&&e==this.content.length?this:new S(this.content.slice(t,e))},S.prototype.replaceChild=function(t,e){var r=this.content[t];if(r==e)return this;var o=this.content.slice(),i=this.size+e.nodeSize-r.nodeSize;return o[t]=e,new S(o,i)},S.prototype.addToStart=function(t){return new S([t].concat(this.content),this.size+t.nodeSize)},S.prototype.addToEnd=function(t){return new S(this.content.concat(t),this.size+t.nodeSize)},S.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 r=0,o=0;;r++){var i=this.child(r),s=o+i.nodeSize;if(s>=t)return s==t||e>0?Pr(r+1,s):Pr(r,o);o=s}},S.prototype.toString=function(){return"<"+this.toStringInner()+">"},S.prototype.toStringInner=function(){return this.content.join(", ")},S.prototype.toJSON=function(){return this.content.length?this.content.map(function(t){return t.toJSON()}):null},S.fromJSON=function(t,e){if(!e)return S.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new S(e.map(t.nodeFromJSON))},S.fromArray=function(t){if(!t.length)return S.empty;for(var e,r=0,o=0;othis.type.rank&&(e||(e=t.slice(0,o)),e.push(this),r=!0),e&&e.push(i)}}return e||(e=t.slice()),r||e.push(this),e},J.prototype.removeFromSet=function(t){for(var e=0;e0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t},T.fromJSON=function(t,e){if(!e)return T.empty;var r=e.openStart||0,o=e.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new T(S.fromJSON(t,e.content),r,o)},T.maxOpen=function(t,e){e===void 0&&(e=!0);for(var r=0,o=0,i=t.firstChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.firstChild)r++;for(var s=t.lastChild;s&&!s.isLeaf&&(e||!s.type.spec.isolating);s=s.lastChild)o++;return new T(t,r,o)},Object.defineProperties(T.prototype,Js);function $s(n,t,e){var r=n.findIndex(t),o=r.index,i=r.offset,s=n.maybeChild(o),a=n.findIndex(e),l=a.index,c=a.offset;if(i==t||s.isText){if(c!=e&&!n.child(l).isText)throw new RangeError("Removing non-flat range");return n.cut(0,t).append(n.cut(e))}if(o!=l)throw new RangeError("Removing non-flat range");return n.replaceChild(o,s.copy($s(s.content,t-i-1,e-i-1)))}function qs(n,t,e,r){var o=n.findIndex(t),i=o.index,s=o.offset,a=n.maybeChild(i);if(s==t||a.isText)return r&&!r.canReplace(i,i,e)?null:n.cut(0,t).append(e).append(n.cut(t));var l=qs(a.content,t-s-1,e);return l&&n.replaceChild(i,a.copy(l))}T.empty=new T(S.empty,0,0);function Yu(n,t,e){if(e.openStart>n.depth)throw new he("Inserted content deeper than insertion position");if(n.depth-e.openStart!=t.depth-e.openEnd)throw new he("Inconsistent open depths");return js(n,t,e,0)}function js(n,t,e,r){var o=n.index(r),i=n.node(r);if(o==t.index(r)&&r=0&&n.isText&&n.sameMarkup(t[e])?t[e]=n.withText(t[e].text+n.text):t.push(n)}function Wn(n,t,e,r){var o=(t||n).node(e),i=0,s=t?t.index(e):o.childCount;n&&(i=n.index(e),n.depth>e?i++:n.textOffset&&(Ze(n.nodeAfter,r),i++));for(var a=i;ao&&Lo(n,t,o+1),s=r.depth>o&&Lo(e,r,o+1),a=[];return Wn(null,n,o,a),i&&s&&t.index(o)==e.index(o)?(Ws(i,s),Ze(tn(i,Ks(n,t,e,r,o+1)),a)):(i&&Ze(tn(i,Lr(n,t,o+1)),a),Wn(t,e,o,a),s&&Ze(tn(s,Lr(e,r,o+1)),a)),Wn(r,null,o,a),new S(a)}function Lr(n,t,e){var r=[];if(Wn(null,n,e,r),n.depth>e){var o=Lo(n,t,e+1);Ze(tn(o,Lr(n,t,e+1)),r)}return Wn(t,null,e,r),new S(r)}function Xu(n,t){for(var e=t.depth-n.openStart,r=t.node(e),o=r.copy(n.content),i=e-1;i>=0;i--)o=t.node(i).copy(S.from(o));return{start:o.resolveNoCache(n.openStart+e),end:o.resolveNoCache(o.content.size-n.openEnd-e)}}var nt=function(t,e,r){this.pos=t,this.path=e,this.depth=e.length/3-1,this.parentOffset=r},yn={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};nt.prototype.resolveDepth=function(t){return t==null?this.depth:t<0?this.depth+t:t},yn.parent.get=function(){return this.node(this.depth)},yn.doc.get=function(){return this.node(0)},nt.prototype.node=function(t){return this.path[this.resolveDepth(t)*3]},nt.prototype.index=function(t){return this.path[this.resolveDepth(t)*3+1]},nt.prototype.indexAfter=function(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)},nt.prototype.start=function(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1},nt.prototype.end=function(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size},nt.prototype.before=function(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]},nt.prototype.after=function(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize},yn.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},yn.nodeAfter.get=function(){var n=this.parent,t=this.index(this.depth);if(t==n.childCount)return null;var e=this.pos-this.path[this.path.length-1],r=n.child(t);return e?n.child(t).cut(e):r},yn.nodeBefore.get=function(){var n=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(n).cut(0,t):n==0?null:this.parent.child(n-1)},nt.prototype.posAtIndex=function(t,e){e=this.resolveDepth(e);for(var r=this.path[e*3],o=e==0?0:this.path[e*3-1]+1,i=0;i0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0},nt.prototype.blockRange=function(t,e){if(t===void 0&&(t=this),t.pos=0;r--)if(t.pos<=this.end(r)&&(!e||e(this.node(r))))return new Kn(this,t,r)},nt.prototype.sameParent=function(t){return this.pos-this.parentOffset==t.pos-t.parentOffset},nt.prototype.max=function(t){return t.pos>this.pos?t:this},nt.prototype.min=function(t){return t.pos=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");for(var r=[],o=0,i=e,s=t;;){var a=s.content.findIndex(i),l=a.index,c=a.offset,u=i-c;if(r.push(s,l,o+c),!u||(s=s.child(l),s.isText))break;i=u-1,o+=c+1}return new nt(e,r,i)},nt.resolveCached=function(t,e){for(var r=0;rt&&this.nodesBetween(t,e,function(i){return r.isInSet(i.marks)&&(o=!0),!o}),o},$t.isBlock.get=function(){return this.type.isBlock},$t.isTextblock.get=function(){return this.type.isTextblock},$t.inlineContent.get=function(){return this.type.inlineContent},$t.isInline.get=function(){return this.type.isInline},$t.isText.get=function(){return this.type.isText},$t.isLeaf.get=function(){return this.type.isLeaf},$t.isAtom.get=function(){return this.type.isAtom},$.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()+")"),Us(this.marks,t)},$.prototype.contentMatchAt=function(t){var e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e},$.prototype.canReplace=function(t,e,r,o,i){r===void 0&&(r=S.empty),o===void 0&&(o=0),i===void 0&&(i=r.childCount);var s=this.contentMatchAt(t).matchFragment(r,o,i),a=s&&s.matchFragment(this.content,e);if(!a||!a.validEnd)return!1;for(var l=o;l=0;e--)t=n[e].type.name+"("+t+")";return t}var xt=function(t){this.validEnd=t,this.next=[],this.wrapCache=[]},Fr={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};xt.parse=function(t,e){var r=new Hr(t,e);if(r.next==null)return xt.empty;var o=Ys(r);r.next&&r.err("Unexpected trailing text");var i=lf(af(o));return cf(i,r),i},xt.prototype.matchType=function(t){for(var e=0;e>1},xt.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]}},xt.prototype.toString=function(){var t=[];function e(r){t.push(r);for(var o=1;o"+t.indexOf(r.next[s+1]);return i}).join(` +`)},Object.defineProperties(xt.prototype,Fr),xt.empty=new xt(!0);var Hr=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.shift()},Gs={next:{configurable:!0}};Gs.next.get=function(){return this.tokens[this.pos]},Hr.prototype.eat=function(t){return this.next==t&&(this.pos++||!0)},Hr.prototype.err=function(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")},Object.defineProperties(Hr.prototype,Gs);function Ys(n){var t=[];do t.push(ef(n));while(n.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function ef(n){var t=[];do t.push(nf(n));while(n.next&&n.next!=")"&&n.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function nf(n){for(var t=sf(n);;)if(n.eat("+"))t={type:"plus",expr:t};else if(n.eat("*"))t={type:"star",expr:t};else if(n.eat("?"))t={type:"opt",expr:t};else if(n.eat("{"))t=rf(n,t);else break;return t}function Xs(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");var t=Number(n.next);return n.pos++,t}function rf(n,t){var e=Xs(n),r=e;return n.eat(",")&&(n.next!="}"?r=Xs(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:e,max:r,expr:t}}function of(n,t){var e=n.nodeTypes,r=e[t];if(r)return[r];var o=[];for(var i in e){var s=e[i];s.groups.indexOf(t)>-1&&o.push(s)}return o.length==0&&n.err("No node type or group '"+t+"' found"),o}function sf(n){if(n.eat("(")){var t=Ys(n);return n.eat(")")||n.err("Missing closing paren"),t}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{var e=of(n,n.next).map(function(r){return n.inline==null?n.inline=r.isInline:n.inline!=r.isInline&&n.err("Mixing inline and block content"),{type:"name",value:r}});return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function af(n){var t=[[]];return o(i(n,0),e()),t;function e(){return t.push([])-1}function r(s,a,l){var c={term:l,to:a};return t[s].push(c),c}function o(s,a){s.forEach(function(l){return l.to=a})}function i(s,a){if(s.type=="choice")return s.exprs.reduce(function(k,b){return k.concat(i(b,a))},[]);if(s.type=="seq")for(var l=0;;l++){var c=i(s.exprs[l],a);if(l==s.exprs.length-1)return c;o(c,a=e())}else if(s.type=="star"){var u=e();return r(a,u),o(i(s.expr,u),u),[r(u)]}else if(s.type=="plus"){var p=e();return o(i(s.expr,a),p),o(i(s.expr,p),p),[r(p)]}else{if(s.type=="opt")return[r(a)].concat(i(s.expr,a));if(s.type=="range"){for(var d=a,h=0;h-1&&o[d+1];Zs(n,p).forEach(function(m){h||o.push(u,h=[]),h.indexOf(m)==-1&&h.push(m)})}})});for(var i=t[r.join(",")]=new xt(r.indexOf(n.length-1)>-1),s=0;s-1},At.prototype.allowsMarks=function(t){if(this.markSet==null)return!0;for(var e=0;e-1};var en=function(t){this.spec={};for(var e in t)this.spec[e]=t[e];this.spec.nodes=dt.from(t.nodes),this.spec.marks=dt.from(t.marks),this.nodes=At.compile(this.spec.nodes,this),this.marks=Ve.compile(this.spec.marks,this);var r=Object.create(null);for(var o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");var i=this.nodes[o],s=i.spec.content||"",a=i.spec.marks;i.contentMatch=r[s]||(r[s]=xt.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=a=="_"?null:a?ia(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(var l in this.marks){var c=this.marks[l],u=c.spec.excludes;c.excluded=u==null?[c]:u==""?[]:ia(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)};en.prototype.node=function(t,e,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof At){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(e,r,o)},en.prototype.text=function(t,e){var r=this.nodes.text;return new tf(r,r.defaultAttrs,t,J.setFrom(e))},en.prototype.mark=function(t,e){return typeof t=="string"&&(t=this.marks[t]),t.create(e)},en.prototype.nodeFromJSON=function(t){return $.fromJSON(this,t)},en.prototype.markFromJSON=function(t){return J.fromJSON(this,t)},en.prototype.nodeType=function(t){var e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e};function ia(n,t){for(var e=[],r=0;r-1)&&e.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return e}var se=function(t,e){var r=this;this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach(function(o){o.tag?r.tags.push(o):o.style&&r.styles.push(o)}),this.normalizeLists=!this.tags.some(function(o){if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;var i=t.nodes[o.node];return i.contentMatch.matchType(i)})};se.prototype.parse=function(t,e){e===void 0&&(e={});var r=new tt(this,e,!1);return r.addAll(t,null,e.from,e.to),r.finish()},se.prototype.parseSlice=function(t,e){e===void 0&&(e={});var r=new tt(this,e,!0);return r.addAll(t,null,e.from,e.to),T.maxOpen(r.finish())},se.prototype.matchTag=function(t,e,r){for(var o=r?this.tags.indexOf(r)+1:0;ot.length&&(s.style.charCodeAt(t.length)!=61||s.style.slice(t.length+1)!=e))){if(s.getAttrs){var a=s.getAttrs(e);if(a===!1)continue;s.attrs=a}return s}}},se.schemaRules=function(t){var e=[];function r(l){for(var c=l.priority==null?50:l.priority,u=0;u=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]},Ce.prototype.applyPending=function(t){for(var e=0,r=this.pendingMarks;e=0;o--){var i=this.nodes[o],s=i.findWrapping(t);if(s&&(!e||e.length>s.length)&&(e=s,r=i,!s.length)||i.solid)break}if(!e)return!1;this.sync(r);for(var a=0;athis.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}},tt.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},tt.prototype.sync=function(t){for(var e=this.open;e>=0;e--)if(this.nodes[e]==t){this.open=e;return}},jo.currentPos.get=function(){this.closeExtra();for(var n=0,t=this.open;t>=0;t--){for(var e=this.nodes[t].content,r=e.length-1;r>=0;r--)n+=e[r].nodeSize;t&&n++}return n},tt.prototype.findAtPoint=function(t,e){if(this.find)for(var r=0;r-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);var r=t.split("/"),o=this.options.context,i=!this.isOpen&&(!o||o.parent.type==this.nodes[0].type),s=-(o?o.depth+1:0)+(i?0:1),a=function(l,c){for(;l>=0;l--){var u=r[l];if(u==""){if(l==r.length-1||l==0)continue;for(;c>=s;c--)if(a(l-1,c))return!0;return!1}else{var p=c>0||c==0&&i?e.nodes[c].type:o&&c>=s?o.node(c-s).type:null;if(!p||p.name!=u&&p.groups.indexOf(u)==-1)return!1;c--}}return!0};return a(r.length-1,this.open)},tt.prototype.textblockFromContext=function(){var t=this.options.context;if(t)for(var e=t.depth;e>=0;e--){var r=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(var o in this.parser.schema.nodes){var i=this.parser.schema.nodes[o];if(i.isTextblock&&i.defaultAttrs)return i}},tt.prototype.addPendingMark=function(t){var e=mf(t,this.top.pendingMarks);e&&this.top.stashMarks.push(e),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)},tt.prototype.removePendingMark=function(t,e){for(var r=this.open;r>=0;r--){var o=this.nodes[r],i=o.pendingMarks.lastIndexOf(t);if(i>-1)o.pendingMarks=t.removeFromSet(o.pendingMarks);else{o.activeMarks=t.removeFromSet(o.activeMarks);var s=o.popFromStashMark(t);s&&o.type&&o.type.allowsMarkType(s.type)&&(o.activeMarks=s.addToSet(o.activeMarks))}if(o==e)break}},Object.defineProperties(tt.prototype,jo);function ff(n){for(var t=n.firstChild,e=null;t;t=t.nextSibling){var r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&sa.hasOwnProperty(r)&&e?(e.appendChild(t),t=e):r=="li"?e=t:r&&(e=null)}}function pf(n,t){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,t)}function df(n){for(var t=/\s*([\w-]+)\s*:\s*([^;]+)/g,e,r=[];e=t.exec(n);)r.push(e[1],e[2].trim());return r}function la(n){var t={};for(var e in n)t[e]=n[e];return t}function hf(n,t){var e=t.schema.nodes,r=function(s){var a=e[s];if(!!a.allowsMarkType(n)){var l=[],c=function(u){l.push(u);for(var p=0;p=0;o--){var i=this.serializeMark(t.marks[o],t.isInline,e);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r},ht.prototype.serializeMark=function(t,e,r){r===void 0&&(r={});var o=this.marks[t.type.name];return o&&ht.renderSpec(Wo(r),o(t,e))},ht.renderSpec=function(t,e,r){if(r===void 0&&(r=null),typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;var o=e[0],i=o.indexOf(" ");i>0&&(r=o.slice(0,i),o=o.slice(i+1));var s=null,a=r?t.createElementNS(r,o):t.createElement(o),l=e[1],c=1;if(l&&typeof l=="object"&&l.nodeType==null&&!Array.isArray(l)){c=2;for(var u in l)if(l[u]!=null){var p=u.indexOf(" ");p>0?a.setAttributeNS(u.slice(0,p),u.slice(p+1),l[u]):a.setAttribute(u,l[u])}}for(var d=c;dc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{var m=ht.renderSpec(t,h,r),g=m.dom,y=m.contentDOM;if(a.appendChild(g),y){if(s)throw new RangeError("Multiple content holes");s=y}}}return{dom:a,contentDOM:s}},ht.fromSchema=function(t){return t.cached.domSerializer||(t.cached.domSerializer=new ht(this.nodesFromSchema(t),this.marksFromSchema(t)))},ht.nodesFromSchema=function(t){var e=ca(t.nodes);return e.text||(e.text=function(r){return r.text}),e},ht.marksFromSchema=function(t){return ca(t.marks)};function ca(n){var t={};for(var e in n){var r=n[e].spec.toDOM;r&&(t[e]=r)}return t}function Wo(n){return n.document||window.document}var ua=65535,fa=Math.pow(2,16);function vf(n,t){return n+t*fa}function pa(n){return n&ua}function gf(n){return(n-(n&ua))/fa}var Ko=function(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=null),this.pos=t,this.deleted=e,this.recover=r},mt=function(t,e){e===void 0&&(e=!1),this.ranges=t,this.inverted=e};mt.prototype.recover=function(t){var e=0,r=pa(t);if(!this.inverted)for(var o=0;ot)break;var c=this.ranges[a+i],u=this.ranges[a+s],p=l+c;if(t<=p){var d=c?t==l?-1:t==p?1:e:e,h=l+o+(d<0?0:u);if(r)return h;var m=t==(e<0?l:p)?null:vf(a/3,t-l);return new Ko(h,e<0?t!=l:t!=p,m)}o+=u-c}return r?t+o:new Ko(t+o)},mt.prototype.touches=function(t,e){for(var r=0,o=pa(e),i=this.inverted?2:1,s=this.inverted?1:2,a=0;at)break;var c=this.ranges[a+i],u=l+c;if(t<=u&&a==o*3)return!0;r+=this.ranges[a+s]-c}return!1},mt.prototype.forEach=function(t){for(var e=this.inverted?2:1,r=this.inverted?1:2,o=0,i=0;o=0;e--){var o=t.getMirror(e);this.appendMap(t.maps[e].invert(),o!=null&&o>e?r-o-1:null)}},Mt.prototype.invert=function(){var t=new Mt;return t.appendMappingInverted(this),t},Mt.prototype.map=function(t,e){if(e===void 0&&(e=1),this.mirror)return this._map(t,e,!0);for(var r=this.from;ri&&l0},at.prototype.addStep=function(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e},Object.defineProperties(at.prototype,Uo);function Jr(){throw new Error("Override me")}var Go=Object.create(null),Ct=function(){};Ct.prototype.apply=function(t){return Jr()},Ct.prototype.getMap=function(){return mt.empty},Ct.prototype.invert=function(t){return Jr()},Ct.prototype.map=function(t){return Jr()},Ct.prototype.merge=function(t){return null},Ct.prototype.toJSON=function(){return Jr()},Ct.fromJSON=function(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");var r=Go[e.stepType];if(!r)throw new RangeError("No step type "+e.stepType+" defined");return r.fromJSON(t,e)},Ct.jsonID=function(t,e){if(t in Go)throw new RangeError("Duplicate use of step JSON ID "+t);return Go[t]=e,e.prototype.jsonID=t,e};var Dt=function(t,e){this.doc=t,this.failed=e};Dt.ok=function(t){return new Dt(t,null)},Dt.fail=function(t){return new Dt(null,t)},Dt.fromReplace=function(t,e,r,o){try{return Dt.ok(t.replace(e,r,o))}catch(i){if(i instanceof he)return Dt.fail(i.message);throw i}};var Ee=function(n){function t(e,r,o,i){n.call(this),this.from=e,this.to=r,this.slice=o,this.structure=!!i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.apply=function(r){return this.structure&&Yo(r,this.from,this.to)?Dt.fail("Structure replace would overwrite content"):Dt.fromReplace(r,this.from,this.to,this.slice)},t.prototype.getMap=function(){return new mt([this.from,this.to-this.from,this.slice.size])},t.prototype.invert=function(r){return new t(this.from,this.from+this.slice.size,r.slice(this.from,this.to))},t.prototype.map=function(r){var o=r.mapResult(this.from,1),i=r.mapResult(this.to,-1);return o.deleted&&i.deleted?null:new t(o.pos,Math.max(o.pos,i.pos),this.slice)},t.prototype.merge=function(r){if(!(r instanceof t)||r.structure||this.structure)return null;if(this.from+this.slice.size==r.from&&!this.slice.openEnd&&!r.slice.openStart){var o=this.slice.size+r.slice.size==0?T.empty:new T(this.slice.content.append(r.slice.content),this.slice.openStart,r.slice.openEnd);return new t(this.from,this.to+(r.to-r.from),o,this.structure)}else if(r.to==this.from&&!this.slice.openStart&&!r.slice.openEnd){var i=this.slice.size+r.slice.size==0?T.empty:new T(r.slice.content.append(this.slice.content),r.slice.openStart,this.slice.openEnd);return new t(r.from,this.to,i,this.structure)}else return null},t.prototype.toJSON=function(){var r={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(r.slice=this.slice.toJSON()),this.structure&&(r.structure=!0),r},t.fromJSON=function(r,o){if(typeof o.from!="number"||typeof o.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new t(o.from,o.to,T.fromJSON(r,o.slice),!!o.structure)},t}(Ct);Ct.jsonID("replace",Ee);var Ft=function(n){function t(e,r,o,i,s,a,l){n.call(this),this.from=e,this.to=r,this.gapFrom=o,this.gapTo=i,this.slice=s,this.insert=a,this.structure=!!l}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.apply=function(r){if(this.structure&&(Yo(r,this.from,this.gapFrom)||Yo(r,this.gapTo,this.to)))return Dt.fail("Structure gap-replace would overwrite content");var o=r.slice(this.gapFrom,this.gapTo);if(o.openStart||o.openEnd)return Dt.fail("Gap is not a flat range");var i=this.slice.insertAt(this.insert,o.content);return i?Dt.fromReplace(r,this.from,this.to,i):Dt.fail("Content does not fit in gap")},t.prototype.getMap=function(){return new mt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},t.prototype.invert=function(r){var o=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+o,this.from+this.insert,this.from+this.insert+o,r.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},t.prototype.map=function(r){var o=r.mapResult(this.from,1),i=r.mapResult(this.to,-1),s=r.map(this.gapFrom,-1),a=r.map(this.gapTo,1);return o.deleted&&i.deleted||si.pos?null:new t(o.pos,i.pos,s,a,this.slice,this.insert,this.structure)},t.prototype.toJSON=function(){var r={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(r.slice=this.slice.toJSON()),this.structure&&(r.structure=!0),r},t.fromJSON=function(r,o){if(typeof o.from!="number"||typeof o.to!="number"||typeof o.gapFrom!="number"||typeof o.gapTo!="number"||typeof o.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new t(o.from,o.to,o.gapFrom,o.gapTo,T.fromJSON(r,o.slice),o.insert,!!o.structure)},t}(Ct);Ct.jsonID("replaceAround",Ft);function Yo(n,t,e){for(var r=n.resolve(t),o=e-t,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 yf(n,t,e){return(t==0||n.canReplace(t,n.childCount))&&(e==n.childCount||n.canReplace(0,e))}function wn(n){for(var t=n.parent,e=t.content.cutByIndex(n.startIndex,n.endIndex),r=n.depth;;--r){var o=n.$from.node(r),i=n.$from.index(r),s=n.$to.indexAfter(r);if(rt;p--)d||e.index(p)>0?(d=!0,c=S.from(e.node(p).copy(c)),u++):a--;for(var h=S.empty,m=0,g=o,y=!1;g>t;g--)y||r.after(g+1)=0;r--)e=S.from(t[r].type.create(t[r].attrs,e));var o=n.start,i=n.end;return this.step(new Ft(o,i,o,i,new T(e,0,0),t.length,!0))},at.prototype.setBlockType=function(n,t,e,r){var o=this;if(t===void 0&&(t=n),!e.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var i=this.steps.length;return this.doc.nodesBetween(n,t,function(s,a){if(s.isTextblock&&!s.hasMarkup(e,r)&&wf(o.doc,o.mapping.slice(i).map(a),e)){o.clearIncompatible(o.mapping.slice(i).map(a,1),e);var l=o.mapping.slice(i),c=l.map(a,1),u=l.map(a+s.nodeSize,1);return o.step(new Ft(c,u,c+1,u-1,new T(S.from(e.create(r,null,s.marks)),0,0),1,!0)),!1}}),this};function wf(n,t,e){var r=n.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,e)}at.prototype.setNodeMarkup=function(n,t,e,r){var o=this.doc.nodeAt(n);if(!o)throw new RangeError("No node at given position");t||(t=o.type);var i=t.create(e,null,r||o.marks);if(o.isLeaf)return this.replaceWith(n,n+o.nodeSize,i);if(!t.validContent(o.content))throw new RangeError("Invalid content for node type "+t.name);return this.step(new Ft(n,n+o.nodeSize,n+1,n+o.nodeSize-1,new T(S.from(i),0,0),1,!0))};function Oe(n,t,e,r){e===void 0&&(e=1);var o=n.resolve(t),i=o.depth-e,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,l=e-2;a>i;a--,l--){var c=o.node(a),u=o.index(a);if(c.type.spec.isolating)return!1;var p=c.content.cutByIndex(u,c.childCount),d=r&&r[l]||c;if(d!=c&&(p=p.replaceChild(0,d.type.create(d.attrs))),!c.canReplace(u+1,c.childCount)||!d.type.validContent(p))return!1}var h=o.indexAfter(i),m=r&&r[0];return o.node(i).canReplaceWith(h,h,m?m.type:o.node(i+1).type)}at.prototype.split=function(n,t,e){t===void 0&&(t=1);for(var r=this.doc.resolve(n),o=S.empty,i=S.empty,s=r.depth,a=r.depth-t,l=t-1;s>a;s--,l--){o=S.from(r.node(s).copy(o));var c=e&&e[l];i=S.from(c?c.type.create(c.attrs,i):r.node(s).copy(i))}return this.step(new Ee(n,n,new T(o.append(i),t,t),!0))};function Qo(n,t){var e=n.resolve(t),r=e.index();return Sf(e.nodeBefore,e.nodeAfter)&&e.parent.canReplace(r,r+1)}function Sf(n,t){return n&&t&&!n.isLeaf&&n.canAppend(t)}at.prototype.join=function(n,t){t===void 0&&(t=1);var e=new Ee(n-t,n+t,T.empty,!0);return this.step(e)};function xf(n,t,e){var r=n.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),e))return t;if(r.parentOffset==0)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,e))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,e))return r.after(s+1);if(a=0;a--){var l=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,c=r.index(a)+(l>0?1:0),u=r.node(a),p=!1;if(s==1)p=u.canReplace(c,c,o);else{var d=u.contentMatchAt(c).findWrapping(o.firstChild.type);p=d&&u.canReplaceWith(c,c,d[0])}if(p)return l==0?r.pos:l<0?r.before(a+1):r.after(a+1)}return null}function Zo(n,t,e){for(var r=[],o=0;o=i.pos?null:new t(o.pos,i.pos,this.mark)},t.prototype.merge=function(r){if(r instanceof t&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from)return new t(Math.min(this.from,r.from),Math.max(this.to,r.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(r,o){if(typeof o.from!="number"||typeof o.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new t(o.from,o.to,r.markFromJSON(o.mark))},t}(Ct);Ct.jsonID("addMark",ti);var Yn=function(n){function t(e,r,o){n.call(this),this.from=e,this.to=r,this.mark=o}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.apply=function(r){var o=this,i=r.slice(this.from,this.to),s=new T(Zo(i.content,function(a){return a.mark(o.mark.removeFromSet(a.marks))}),i.openStart,i.openEnd);return Dt.fromReplace(r,this.from,this.to,s)},t.prototype.invert=function(){return new ti(this.from,this.to,this.mark)},t.prototype.map=function(r){var o=r.mapResult(this.from,1),i=r.mapResult(this.to,-1);return o.deleted&&i.deleted||o.pos>=i.pos?null:new t(o.pos,i.pos,this.mark)},t.prototype.merge=function(r){if(r instanceof t&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from)return new t(Math.min(this.from,r.from),Math.max(this.to,r.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(r,o){if(typeof o.from!="number"||typeof o.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new t(o.from,o.to,r.markFromJSON(o.mark))},t}(Ct);Ct.jsonID("removeMark",Yn),at.prototype.addMark=function(n,t,e){var r=this,o=[],i=[],s=null,a=null;return this.doc.nodesBetween(n,t,function(l,c,u){if(!!l.isInline){var p=l.marks;if(!e.isInSet(p)&&u.type.allowsMarkType(e.type)){for(var d=Math.max(c,n),h=Math.min(c+l.nodeSize,t),m=e.addToSet(p),g=0;g=0;d--)this.step(o[d]);return this};function Mf(n,t,e,r){if(e===void 0&&(e=t),r===void 0&&(r=T.empty),t==e&&!r.size)return null;var o=n.resolve(t),i=n.resolve(e);return ma(o,i,r)?new Ee(t,e,r):new Qt(o,i,r).fit()}at.prototype.replace=function(n,t,e){t===void 0&&(t=n),e===void 0&&(e=T.empty);var r=Mf(this.doc,n,t,e);return r&&this.step(r),this},at.prototype.replaceWith=function(n,t,e){return this.replace(n,t,new T(S.from(e),0,0))},at.prototype.delete=function(n,t){return this.replace(n,t,T.empty)},at.prototype.insert=function(n,t){return this.replaceWith(n,n,t)};function ma(n,t,e){return!e.openStart&&!e.openEnd&&n.start()==t.start()&&n.parent.canReplace(n.index(),t.index(),e.content)}var Qt=function(t,e,r){this.$to=e,this.$from=t,this.unplaced=r,this.frontier=[];for(var o=0;o<=t.depth;o++){var i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}this.placed=S.empty;for(var s=t.depth;s>0;s--)this.placed=S.from(t.node(s).copy(this.placed))},va={depth:{configurable:!0}};va.depth.get=function(){return this.frontier.length-1},Qt.prototype.fit=function(){for(;this.unplaced.size;){var t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}var e=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,o=this.$from,i=this.close(e<0?this.$to:o.doc.resolve(e));if(!i)return null;for(var s=this.placed,a=o.depth,l=i.depth;a&&l&&s.childCount==1;)s=s.firstChild.content,a--,l--;var c=new T(s,a,l);if(e>-1)return new Ft(o.pos,e,this.$to.pos,this.$to.end(),c,r);if(c.size||o.pos!=this.$to.pos)return new Ee(o.pos,i.pos,c)},Qt.prototype.findFittable=function(){for(var t=1;t<=2;t++)for(var e=this.unplaced.openStart;e>=0;e--){var r=void 0,o=void 0;e?(o=ei(this.unplaced.content,e-1).firstChild,r=o.content):r=this.unplaced.content;for(var i=r.firstChild,s=this.depth;s>=0;s--){var a=this.frontier[s],l=a.type,c=a.match,u=void 0,p=void 0;if(t==1&&(i?c.matchType(i.type)||(p=c.fillBefore(S.from(i),!1)):l.compatibleContent(o.type)))return{sliceDepth:e,frontierDepth:s,parent:o,inject:p};if(t==2&&i&&(u=c.findWrapping(i.type)))return{sliceDepth:e,frontierDepth:s,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}},Qt.prototype.openMore=function(){var t=this.unplaced,e=t.content,r=t.openStart,o=t.openEnd,i=ei(e,r);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new T(e,r+1,Math.max(o,i.size+r>=e.size-o?r+1:0)),!0)},Qt.prototype.dropNode=function(){var t=this.unplaced,e=t.content,r=t.openStart,o=t.openEnd,i=ei(e,r);if(i.childCount<=1&&r>0){var s=e.size-r<=r+i.size;this.unplaced=new T(Xn(e,r-1,1),r-1,s?r-1:o)}else this.unplaced=new T(Xn(e,r,1),r,o)},Qt.prototype.placeNodes=function(t){for(var e=t.sliceDepth,r=t.frontierDepth,o=t.parent,i=t.inject,s=t.wrap;this.depth>r;)this.closeFrontierNode();if(s)for(var a=0;a1||u==0||b.content.size)&&(m=N,d.push(ga(b.mark(g.allowedMarks(b.marks)),p==1?u:0,p==c.childCount?k:-1)))}var v=p==c.childCount;v||(k=-1),this.placed=Qn(this.placed,r,S.from(d)),this.frontier[r].match=m,v&&k<0&&o&&o.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var O=0,C=c;O1&&i==this.$to.end(--o);)++i;return i},Qt.prototype.findCloseLevel=function(t){t:for(var e=Math.min(this.depth,t.depth);e>=0;e--){var r=this.frontier[e],o=r.match,i=r.type,s=e=0;l--){var c=this.frontier[l],u=c.match,p=c.type,d=ni(t,l,p,u,!0);if(!d||d.childCount)continue t}return{depth:e,fit:a,move:s?t.doc.resolve(t.after(e+1)):t}}}},Qt.prototype.close=function(t){var e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=Qn(this.placed,e.depth,e.fit)),t=e.move;for(var r=e.depth+1;r<=t.depth;r++){var o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t},Qt.prototype.openFrontierNode=function(t,e,r){var o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=Qn(this.placed,this.depth,S.from(t.create(e,r))),this.frontier.push({type:t,match:t.contentMatch})},Qt.prototype.closeFrontierNode=function(){var t=this.frontier.pop(),e=t.match.fillBefore(S.empty,!0);e.childCount&&(this.placed=Qn(this.placed,this.frontier.length,e))},Object.defineProperties(Qt.prototype,va);function Xn(n,t,e){return t==0?n.cutByIndex(e):n.replaceChild(0,n.firstChild.copy(Xn(n.firstChild.content,t-1,e)))}function Qn(n,t,e){return t==0?n.append(e):n.replaceChild(n.childCount-1,n.lastChild.copy(Qn(n.lastChild.content,t-1,e)))}function ei(n,t){for(var e=0;e1&&(r=r.replaceChild(0,ga(r.firstChild,t-1,r.childCount==1?e-1:0))),t>0&&(r=n.type.contentMatch.fillBefore(r).append(r),e<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(S.empty,!0)))),n.copy(r)}function ni(n,t,e,r,o){var i=n.node(t),s=o?n.indexAfter(t):n.index(t);if(s==i.childCount&&!e.compatibleContent(i.type))return null;var a=r.fillBefore(i.content,!0,s);return a&&!Cf(e,i.content,s)?a:null}function Cf(n,t,e){for(var r=e;r0;a--,l--){var c=r.node(a).type.spec;if(c.defining||c.isolating)break;i.indexOf(a)>-1?s=a:r.before(a)==l&&i.splice(1,0,-a)}for(var u=i.indexOf(s),p=[],d=e.openStart,h=e.content,m=0;;m++){var g=h.firstChild;if(p.push(g),m==e.openStart)break;h=g.content}d>0&&p[d-1].type.spec.defining&&r.node(u).type!=p[d-1].type?d-=1:d>=2&&p[d-1].isTextblock&&p[d-2].type.spec.defining&&r.node(u).type!=p[d-2].type&&(d-=2);for(var y=e.openStart;y>=0;y--){var k=(y+d+1)%(e.openStart+1),b=p[k];if(!!b)for(var N=0;N=0&&(this.replace(n,t,e),!(this.steps.length>I));V--){var F=i[V];F<0||(n=r.before(F),t=o.after(F))}return this};function ya(n,t,e,r,o){if(tr){var s=o.contentMatchAt(0),a=s.fillBefore(n).append(n);n=a.append(s.matchFragment(a).fillBefore(S.empty,!0))}return n}at.prototype.replaceRangeWith=function(n,t,e){if(!e.isInline&&n==t&&this.doc.resolve(n).parent.content.size){var r=xf(this.doc,n,e.type);r!=null&&(n=t=r)}return this.replaceRange(n,t,new T(S.from(e),0,0))},at.prototype.deleteRange=function(n,t){for(var e=this.doc.resolve(n),r=this.doc.resolve(t),o=ba(e,r),i=0;i0&&(a||e.node(s-1).canReplace(e.index(s-1),r.indexAfter(s-1))))return this.delete(e.before(s),r.after(s))}for(var l=1;l<=e.depth&&l<=r.depth;l++)if(n-e.start(l)==e.depth-l&&t>e.end(l)&&r.end(l)-t!=r.depth-l)return this.delete(e.before(l),t);return this.delete(n,t)};function ba(n,t){for(var e=[],r=Math.min(n.depth,t.depth),o=r;o>=0;o--){var i=n.start(o);if(it.pos+(t.depth-o)||n.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==n.depth&&o==t.depth&&n.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&e.push(o)}return e}var ri=Object.create(null),z=function(t,e,r){this.ranges=r||[new Ef(t.min(e),t.max(e))],this.$anchor=t,this.$head=e},Ie={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};Ie.anchor.get=function(){return this.$anchor.pos},Ie.head.get=function(){return this.$head.pos},Ie.from.get=function(){return this.$from.pos},Ie.to.get=function(){return this.$to.pos},Ie.$from.get=function(){return this.ranges[0].$from},Ie.$to.get=function(){return this.ranges[0].$to},Ie.empty.get=function(){for(var n=this.ranges,t=0;t=0;i--){var s=e<0?Sn(t.node(0),t.node(i),t.before(i+1),t.index(i),e,r):Sn(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,e,r);if(s)return s}},z.near=function(t,e){return e===void 0&&(e=1),this.findFrom(t,e)||this.findFrom(t,-e)||new Ne(t.node(0))},z.atStart=function(t){return Sn(t,t,0,0,1)||new Ne(t)},z.atEnd=function(t){return Sn(t,t,t.content.size,t.childCount,-1)||new Ne(t)},z.fromJSON=function(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");var r=ri[e.type];if(!r)throw new RangeError("No selection type "+e.type+" defined");return r.fromJSON(t,e)},z.jsonID=function(t,e){if(t in ri)throw new RangeError("Duplicate use of selection JSON ID "+t);return ri[t]=e,e.prototype.jsonID=t,e},z.prototype.getBookmark=function(){return K.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(z.prototype,Ie),z.prototype.visible=!0;var Ef=function(t,e){this.$from=t,this.$to=e},K=function(n){function t(r,o){o===void 0&&(o=r),n.call(this,r,o)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={$cursor:{configurable:!0}};return e.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},t.prototype.map=function(o,i){var s=o.resolve(i.map(this.head));if(!s.parent.inlineContent)return n.near(s);var a=o.resolve(i.map(this.anchor));return new t(a.parent.inlineContent?a:s,s)},t.prototype.replace=function(o,i){if(i===void 0&&(i=T.empty),n.prototype.replace.call(this,o,i),i==T.empty){var s=this.$from.marksAcross(this.$to);s&&o.ensureMarks(s)}},t.prototype.eq=function(o){return o instanceof t&&o.anchor==this.anchor&&o.head==this.head},t.prototype.getBookmark=function(){return new Zn(this.anchor,this.head)},t.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},t.fromJSON=function(o,i){if(typeof i.anchor!="number"||typeof i.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new t(o.resolve(i.anchor),o.resolve(i.head))},t.create=function(o,i,s){s===void 0&&(s=i);var a=o.resolve(i);return new this(a,s==i?a:o.resolve(s))},t.between=function(o,i,s){var a=o.pos-i.pos;if((!s||a)&&(s=a>=0?1:-1),!i.parent.inlineContent){var l=n.findFrom(i,s,!0)||n.findFrom(i,-s,!0);if(l)i=l.$head;else return n.near(i,s)}return o.parent.inlineContent||(a==0?o=i:(o=(n.findFrom(o,-s,!0)||n.findFrom(o,s,!0)).$anchor,o.pos0?0:1);o>0?s=0;s+=o){var a=t.child(s);if(a.isAtom){if(!i&&P.isSelectable(a))return P.create(n,e-(o<0?a.nodeSize:0))}else{var l=Sn(n,a,e+o,o<0?a.childCount:0,o,i);if(l)return l}e+=a.nodeSize*o}}function ka(n,t,e){var r=n.steps.length-1;if(!(r0},t.prototype.setStoredMarks=function(o){return this.storedMarks=o,this.updated|=qr,this},t.prototype.ensureMarks=function(o){return J.sameSet(this.storedMarks||this.selection.$from.marks(),o)||this.setStoredMarks(o),this},t.prototype.addStoredMark=function(o){return this.ensureMarks(o.addToSet(this.storedMarks||this.selection.$head.marks()))},t.prototype.removeStoredMark=function(o){return this.ensureMarks(o.removeFromSet(this.storedMarks||this.selection.$head.marks()))},e.storedMarksSet.get=function(){return(this.updated&qr)>0},t.prototype.addStep=function(o,i){n.prototype.addStep.call(this,o,i),this.updated=this.updated&~qr,this.storedMarks=null},t.prototype.setTime=function(o){return this.time=o,this},t.prototype.replaceSelection=function(o){return this.selection.replace(this,o),this},t.prototype.replaceSelectionWith=function(o,i){var s=this.selection;return i!==!1&&(o=o.mark(this.storedMarks||(s.empty?s.$from.marks():s.$from.marksAcross(s.$to)||J.none))),s.replaceWith(this,o),this},t.prototype.deleteSelection=function(){return this.selection.replace(this),this},t.prototype.insertText=function(o,i,s){s===void 0&&(s=i);var a=this.doc.type.schema;if(i==null)return o?this.replaceSelectionWith(a.text(o),!0):this.deleteSelection();if(!o)return this.deleteRange(i,s);var l=this.storedMarks;if(!l){var c=this.doc.resolve(i);l=s==i?c.marks():c.marksAcross(this.doc.resolve(s))}return this.replaceRangeWith(i,s,a.text(o,l)),this.selection.empty||this.setSelection(z.near(this.selection.$to)),this},t.prototype.setMeta=function(o,i){return this.meta[typeof o=="string"?o:o.key]=i,this},t.prototype.getMeta=function(o){return this.meta[typeof o=="string"?o:o.key]},e.isGeneric.get=function(){for(var r in this.meta)return!1;return!0},t.prototype.scrollIntoView=function(){return this.updated|=Sa,this},e.scrolledIntoView.get=function(){return(this.updated&Sa)>0},Object.defineProperties(t.prototype,e),t}(at);function xa(n,t){return!t||!n?n:n.bind(t)}var tr=function(t,e,r){this.name=t,this.init=xa(e.init,r),this.apply=xa(e.apply,r)},Tf=[new tr("doc",{init:function(t){return t.doc||t.schema.topNodeType.createAndFill()},apply:function(t){return t.doc}}),new tr("selection",{init:function(t,e){return t.selection||z.atStart(e.doc)},apply:function(t){return t.selection}}),new tr("storedMarks",{init:function(t){return t.storedMarks||null},apply:function(t,e,r,o){return o.selection.$cursor?t.storedMarks:null}}),new tr("scrollToSelection",{init:function(){return 0},apply:function(t,e){return t.scrolledIntoView?e+1:e}})],oi=function(t,e){var r=this;this.schema=t,this.fields=Tf.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),e&&e.forEach(function(o){if(r.pluginsByKey[o.key])throw new RangeError("Adding different instances of a keyed plugin ("+o.key+")");r.plugins.push(o),r.pluginsByKey[o.key]=o,o.spec.state&&r.fields.push(new tr(o.key,o.spec.state,o))})},Et=function(t){this.config=t},jr={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};jr.schema.get=function(){return this.config.schema},jr.plugins.get=function(){return this.config.plugins},Et.prototype.apply=function(t){return this.applyTransaction(t).state},Et.prototype.filterTransaction=function(t,e){e===void 0&&(e=-1);for(var r=0;r-1&&er.splice(e,1)},Object.defineProperties(Et.prototype,jr);var er=[];function Ma(n,t,e){for(var r in n){var o=n[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=Ma(o,t,{})),e[r]=o}return e}var Ht=function(t){this.props={},t.props&&Ma(t.props,this,this.props),this.spec=t,this.key=t.key?t.key.key:Ca("plugin")};Ht.prototype.getState=function(t){return t[this.key]};var ii=Object.create(null);function Ca(n){return n in ii?n+"$"+ ++ii[n]:(ii[n]=0,n+"$")}var ae=function(t){t===void 0&&(t="key"),this.key=Ca(t)};ae.prototype.get=function(t){return t.config.pluginsByKey[this.key]},ae.prototype.getState=function(t){return t[this.key]};function si(n,t){return n.selection.empty?!1:(t&&t(n.tr.deleteSelection().scrollIntoView()),!0)}function Ea(n,t,e){var r=n.selection,o=r.$cursor;if(!o||(e?!e.endOfTextblock("backward",n):o.parentOffset>0))return!1;var i=Na(o);if(!i){var s=o.blockRange(),a=s&&wn(s);return a==null?!1:(t&&t(n.tr.lift(s,a).scrollIntoView()),!0)}var l=i.nodeBefore;if(!l.type.spec.isolating&&Pa(n,i,t))return!0;if(o.parent.content.size==0&&(xn(l,"end")||P.isSelectable(l))){if(t){var c=n.tr.deleteRange(o.before(),o.after());c.setSelection(xn(l,"end")?z.findFrom(c.doc.resolve(c.mapping.map(i.pos,-1)),-1):P.create(c.doc,i.pos-l.nodeSize)),t(c.scrollIntoView())}return!0}return l.isAtom&&i.depth==o.depth-1?(t&&t(n.tr.delete(i.pos-l.nodeSize,i.pos).scrollIntoView()),!0):!1}function xn(n,t,e){for(;n;n=t=="start"?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(e&&n.childCount!=1)return!1}return!1}function Oa(n,t,e){var r=n.selection,o=r.$head,i=r.empty,s=o;if(!i)return!1;if(o.parent.isTextblock){if(e?!e.endOfTextblock("backward",n):o.parentOffset>0)return!1;s=Na(o)}var a=s&&s.nodeBefore;return!a||!P.isSelectable(a)?!1:(t&&t(n.tr.setSelection(P.create(n.doc,s.pos-a.nodeSize)).scrollIntoView()),!0)}function Na(n){if(!n.parent.type.spec.isolating)for(var t=n.depth-1;t>=0;t--){if(n.index(t)>0)return n.doc.resolve(n.before(t+1));if(n.node(t).type.spec.isolating)break}return null}function Ta(n,t,e){var r=n.selection,o=r.$cursor;if(!o||(e?!e.endOfTextblock("forward",n):o.parentOffset=0;t--){var e=n.node(t);if(n.index(t)+11&&r.after()!=r.end(-1)){var o=r.before();if(Oe(n.doc,o))return t&&t(n.tr.split(o).scrollIntoView()),!0}var i=r.blockRange(),s=i&&wn(i);return s==null?!1:(t&&t(n.tr.lift(i,s).scrollIntoView()),!0)}function _f(n,t){var e=n.selection,r=e.$from,o=e.$to;if(n.selection instanceof P&&n.selection.node.isBlock)return!r.parentOffset||!Oe(n.doc,r.pos)?!1:(t&&t(n.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(t){var i=o.parentOffset==o.parent.content.size,s=n.tr;(n.selection instanceof K||n.selection instanceof Ne)&&s.deleteSelection();var a=r.depth==0?null:ai(r.node(-1).contentMatchAt(r.indexAfter(-1))),l=i&&a?[{type:a}]:null,c=Oe(s.doc,s.mapping.map(r.pos),1,l);if(!l&&!c&&Oe(s.doc,s.mapping.map(r.pos),1,a&&[{type:a}])&&(l=[{type:a}],c=!0),c&&(s.split(s.mapping.map(r.pos),1,l),!i&&!r.parentOffset&&r.parent.type!=a)){var u=s.mapping.map(r.before()),p=s.doc.resolve(u);r.node(-1).canReplaceWith(p.index(),p.index()+1,a)&&s.setNodeMarkup(s.mapping.map(r.before()),a)}t(s.scrollIntoView())}return!0}function Af(n,t){var e=n.selection,r=e.$from,o=e.to,i,s=r.sharedDepth(o);return s==0?!1:(i=r.before(s),t&&t(n.tr.setSelection(P.create(n.doc,i))),!0)}function Df(n,t){return t&&t(n.tr.setSelection(new Ne(n.doc))),!0}function Rf(n,t,e){var r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(e&&e(n.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||Qo(n.doc,t.pos))?!1:(e&&e(n.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}function Pa(n,t,e){var r=t.nodeBefore,o=t.nodeAfter,i,s;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(Rf(n,t,e))return!0;var a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(i=(s=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&s.matchType(i[0]||o.type).validEnd){if(e){for(var l=t.pos+o.nodeSize,c=S.empty,u=i.length-1;u>=0;u--)c=S.from(i[u].create(null,c));c=S.from(r.copy(c));var p=n.tr.step(new Ft(t.pos-1,l,t.pos,l,new T(c,1,0),i.length,!0)),d=l+2*i.length;Qo(p.doc,d)&&p.join(d),e(p.scrollIntoView())}return!0}var h=z.findFrom(t,1),m=h&&h.$from.blockRange(h.$to),g=m&&wn(m);if(g!=null&&g>=t.depth)return e&&e(n.tr.lift(m,g).scrollIntoView()),!0;if(a&&xn(o,"start",!0)&&xn(r,"end")){for(var y=r,k=[];k.push(y),!y.isTextblock;)y=y.lastChild;for(var b=o,N=1;!b.isTextblock;b=b.firstChild)N++;if(y.canReplace(y.childCount,y.childCount,b.content)){if(e){for(var v=S.empty,O=k.length-1;O>=0;O--)v=S.from(k[O].copy(v));var C=n.tr.step(new Ft(t.pos-k.length,t.pos+o.nodeSize,t.pos+N,t.pos+o.nodeSize-N,new T(v,k.length,0),0,!0));e(C.scrollIntoView())}return!0}}return!1}function za(n,t){return function(e,r){var o=e.selection,i=o.$from,s=o.$to,a=i.blockRange(s),l=a&&Xo(a,n,t);return l?(r&&r(e.tr.wrap(a,l).scrollIntoView()),!0):!1}}function Vf(n,t){return function(e,r){var o=e.selection,i=o.from,s=o.to,a=!1;return e.doc.nodesBetween(i,s,function(l,c){if(a)return!1;if(!(!l.isTextblock||l.hasMarkup(n,t)))if(l.type==n)a=!0;else{var u=e.doc.resolve(c),p=u.index();a=u.parent.canReplaceWith(p,p+1,n)}}),a?(r&&r(e.tr.setBlockType(i,s,n,t).scrollIntoView()),!0):!1}}function li(){for(var n=[],t=arguments.length;t--;)n[t]=arguments[t];return function(e,r,o){for(var i=0;i=2&&i.node(a.depth-1).type.compatibleContent(n)&&a.startIndex==0){if(i.index(a.depth-1)==0)return!1;var u=e.doc.resolve(a.start-2);c=new Kn(u,u,a.depth),a.endIndex=0;s--)i=S.from(e[s].type.create(e[s].attrs,i));n.step(new Ft(t.start-(r?2:0),t.end,t.start,t.end,new T(i,0,0),e.length,!0));for(var a=0,l=0;la;s--)i-=o.child(s).nodeSize,r.delete(i-1,i+1);var l=r.doc.resolve(e.start),c=l.nodeAfter;if(r.mapping.map(e.end)!=e.start+l.nodeAfter.nodeSize)return!1;var u=e.startIndex==0,p=e.endIndex==o.childCount,d=l.node(-1),h=l.index(-1);if(!d.canReplace(h+(u?0:1),h+1,c.content.append(p?S.empty:S.from(o))))return!1;var m=l.pos,g=m+c.nodeSize;return r.step(new Ft(m-(u?1:0),g+(p?1:0),m+1,g-1,new T((u?S.empty:S.from(o.copy(S.empty))).append(p?S.empty:S.from(o.copy(S.empty))),u?0:1,p?0:1),u?0:1)),t(r.scrollIntoView()),!0}function Hf(n){return function(t,e){var r=t.selection,o=r.$from,i=r.$to,s=o.blockRange(i,function(g){return g.childCount&&g.firstChild.type==n});if(!s)return!1;var a=s.startIndex;if(a==0)return!1;var l=s.parent,c=l.child(a-1);if(c.type!=n)return!1;if(e){var u=c.lastChild&&c.lastChild.type==l.type,p=S.from(u?n.create():null),d=new T(S.from(n.create(null,S.from(l.type.create(null,p)))),u?3:1,0),h=s.start,m=s.end;e(t.tr.step(new Ft(h-(u?3:1),m,h,m,d,1,!0)).scrollIntoView())}return!0}}var M={};if(typeof navigator!="undefined"&&typeof document!="undefined"){var ui=/Edge\/(\d+)/.exec(navigator.userAgent),Ha=/MSIE \d/.test(navigator.userAgent),fi=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),pi=M.ie=!!(Ha||fi||ui);M.ie_version=Ha?document.documentMode||6:fi?+fi[1]:ui?+ui[1]:null,M.gecko=!pi&&/gecko\/(\d+)/i.test(navigator.userAgent),M.gecko_version=M.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var di=!pi&&/Chrome\/(\d+)/.exec(navigator.userAgent);M.chrome=!!di,M.chrome_version=di&&+di[1],M.safari=!pi&&/Apple Computer/.test(navigator.vendor),M.ios=M.safari&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),M.mac=M.ios||/Mac/.test(navigator.platform),M.android=/Android \d/.test(navigator.userAgent),M.webkit="webkitFontSmoothing"in document.documentElement.style,M.webkit_version=M.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var qt=function(n){for(var t=0;;t++)if(n=n.previousSibling,!n)return t},hi=function(n){var t=n.assignedSlot||n.parentNode;return t&&t.nodeType==11?t.host:t},Ja=null,Te=function(n,t,e){var r=Ja||(Ja=document.createRange());return r.setEnd(n,e==null?n.nodeValue.length:e),r.setStart(n,t||0),r},Wr=function(n,t,e,r){return e&&($a(n,t,e,r,-1)||$a(n,t,e,r,1))},Jf=/^(img|br|input|textarea|hr)$/i;function $a(n,t,e,r,o){for(;;){if(n==e&&t==r)return!0;if(t==(o<0?0:me(n))){var i=n.parentNode;if(i.nodeType!=1||qf(n)||Jf.test(n.nodeName)||n.contentEditable=="false")return!1;t=qt(n)+(o<0?0:1),n=i}else if(n.nodeType==1){if(n=n.childNodes[t+(o<0?-1:0)],n.contentEditable=="false")return!1;t=o<0?me(n):0}else return!1}}function me(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function $f(n,t,e){for(var r=t==0,o=t==me(n);r||o;){if(n==e)return!0;var i=qt(n);if(n=n.parentNode,!n)return!1;r=r&&i==0,o=o&&i==me(n)}}function qf(n){for(var t,e=n;e&&!(t=e.pmViewDesc);e=e.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==n||t.contentDOM==n)}var mi=function(n){var t=n.isCollapsed;return t&&M.chrome&&n.rangeCount&&!n.getRangeAt(0).collapsed&&(t=!1),t};function Mn(n,t){var e=document.createEvent("Event");return e.initEvent("keydown",!0,!0),e.keyCode=n,e.key=e.code=t,e}function jf(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function Pe(n,t){return typeof n=="number"?n:n[t]}function Wf(n){var t=n.getBoundingClientRect(),e=t.width/n.offsetWidth||1,r=t.height/n.offsetHeight||1;return{left:t.left,right:t.left+n.clientWidth*e,top:t.top,bottom:t.top+n.clientHeight*r}}function qa(n,t,e){for(var r=n.someProp("scrollThreshold")||0,o=n.someProp("scrollMargin")||5,i=n.dom.ownerDocument,s=e||n.dom;s;s=hi(s))if(s.nodeType==1){var a=s==i.body||s.nodeType!=1,l=a?jf(i):Wf(s),c=0,u=0;if(t.topl.bottom-Pe(r,"bottom")&&(u=t.bottom-l.bottom+Pe(o,"bottom")),t.leftl.right-Pe(r,"right")&&(c=t.right-l.right+Pe(o,"right")),c||u)if(a)i.defaultView.scrollBy(c,u);else{var p=s.scrollLeft,d=s.scrollTop;u&&(s.scrollTop+=u),c&&(s.scrollLeft+=c);var h=s.scrollLeft-p,m=s.scrollTop-d;t={left:t.left-h,top:t.top-m,right:t.right-h,bottom:t.bottom-m}}if(a)break}}function Kf(n){for(var t=n.dom.getBoundingClientRect(),e=Math.max(0,t.top),r,o,i=(t.left+t.right)/2,s=e+1;s=e-20){r=a,o=l.top;break}}}return{refDOM:r,refTop:o,stack:ja(n.dom)}}function ja(n){for(var t=[],e=n.ownerDocument;n&&(t.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),n!=e);n=hi(n));return t}function Uf(n){var t=n.refDOM,e=n.refTop,r=n.stack,o=t?t.getBoundingClientRect().top:0;Wa(r,o==0?0:o-e)}function Wa(n,t){for(var e=0;e=a){s=Math.max(d.bottom,s),a=Math.min(d.top,a);var h=d.left>t.left?d.left-t.left:d.right=(d.left+d.right)/2?1:0));continue}}!e&&(t.left>=d.right&&t.top>=d.top||t.left>=d.left&&t.top>=d.bottom)&&(i=c+1)}}return e&&e.nodeType==3?Yf(e,o):!e||r&&e.nodeType==1?{node:n,offset:i}:Ka(e,o)}function Yf(n,t){for(var e=n.nodeValue.length,r=document.createRange(),o=0;o=(i.left+i.right)/2?1:0)}}return{node:n,offset:0}}function vi(n,t){return n.left>=t.left-1&&n.left<=t.right+1&&n.top>=t.top-1&&n.top<=t.bottom+1}function Xf(n,t){var e=n.parentNode;return e&&/^li$/i.test(e.nodeName)&&t.left(a.left+a.right)/2?1:-1}return n.docView.posFromDOM(o,i,s)}function Zf(n,t,e,r){for(var o=-1,i=t;i!=n.dom;){var s=n.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:n.docView.posFromDOM(t,e)}function Ua(n,t,e){var r=n.childNodes.length;if(r&&e.topt.top&&s++}i==n.dom&&s==i.childNodes.length-1&&i.lastChild.nodeType==1&&t.top>i.lastChild.getBoundingClientRect().bottom?u=n.state.doc.content.size:(s==0||i.nodeType!=1||i.childNodes[s-1].nodeName!="BR")&&(u=Zf(n,i,s,t))}u==null&&(u=Qf(n,c,t));var g=n.docView.nearestDesc(c,!0);return{pos:u,inside:g?g.posAtStart-g.border:-1}}function ze(n,t){var e=n.getClientRects();return e.length?e[t<0?0:e.length-1]:n.getBoundingClientRect()}var ep=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Ga(n,t,e){var r=n.docView.domFromPos(t,e<0?-1:1),o=r.node,i=r.offset,s=M.webkit||M.gecko;if(o.nodeType==3)if(s&&(ep.test(o.nodeValue)||(e<0?!i:i==o.nodeValue.length))){var a=ze(Te(o,i,i),e);if(M.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i=0&&i==o.nodeValue.length?(u--,d=1):e<0?u--:p++,nr(ze(Te(o,u,p),d),d<0)}if(!n.state.doc.resolve(t).parent.inlineContent){if(i&&(e<0||i==me(o))){var h=o.childNodes[i-1];if(h.nodeType==1)return gi(h.getBoundingClientRect(),!1)}if(i=0)}if(i&&(e<0||i==me(o))){var g=o.childNodes[i-1],y=g.nodeType==3?Te(g,me(g)-(s?0:1)):g.nodeType==1&&(g.nodeName!="BR"||!g.nextSibling)?g:null;if(y)return nr(ze(y,1),!1)}if(i=0)}function nr(n,t){if(n.width==0)return n;var e=t?n.left:n.right;return{top:n.top,bottom:n.bottom,left:e,right:e}}function gi(n,t){if(n.height==0)return n;var e=t?n.top:n.bottom;return{top:e,bottom:e,left:n.left,right:n.right}}function Ya(n,t,e){var r=n.state,o=n.root.activeElement;r!=t&&n.updateState(t),o!=n.dom&&n.focus();try{return e()}finally{r!=t&&n.updateState(r),o!=n.dom&&o&&o.focus()}}function np(n,t,e){var r=t.selection,o=e=="up"?r.$from:r.$to;return Ya(n,t,function(){for(var i=n.docView.domFromPos(o.pos,e=="up"?-1:1),s=i.node;;){var a=n.docView.nearestDesc(s,!0);if(!a)break;if(a.node.isBlock){s=a.dom;break}s=a.dom.parentNode}for(var l=Ga(n,o.pos,1),c=s.firstChild;c;c=c.nextSibling){var u=void 0;if(c.nodeType==1)u=c.getClientRects();else if(c.nodeType==3)u=Te(c,0,c.nodeValue.length).getClientRects();else continue;for(var p=0;pd.top+1&&(e=="up"?l.top-d.top>(d.bottom-l.top)*2:d.bottom-l.bottom>(l.bottom-d.top)*2))return!1}}return!0})}var rp=/[\u0590-\u08ac]/;function op(n,t,e){var r=t.selection,o=r.$head;if(!o.parent.isTextblock)return!1;var i=o.parentOffset,s=!i,a=i==o.parent.content.size,l=n.root.getSelection();return!rp.test(o.parent.textContent)||!l.modify?e=="left"||e=="backward"?s:a:Ya(n,t,function(){var c=l.getRangeAt(0),u=l.focusNode,p=l.focusOffset,d=l.caretBidiLevel;l.modify("move",e,"character");var h=o.depth?n.docView.domAfterPos(o.before()):n.dom,m=!h.contains(l.focusNode.nodeType==1?l.focusNode:l.focusNode.parentNode)||u==l.focusNode&&p==l.focusOffset;return l.removeAllRanges(),l.addRange(c),d!=null&&(l.caretBidiLevel=d),m})}var Xa=null,Qa=null,Za=!1;function ip(n,t,e){return Xa==t&&Qa==e?Za:(Xa=t,Qa=e,Za=e=="up"||e=="down"?np(n,t,e):op(n,t,e))}var le=0,tl=1,rr=2,Le=3,Q=function(t,e,r,o){this.parent=t,this.children=e,this.dom=r,r.pmViewDesc=this,this.contentDOM=o,this.dirty=le},ve={size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};Q.prototype.matchesWidget=function(){return!1},Q.prototype.matchesMark=function(){return!1},Q.prototype.matchesNode=function(){return!1},Q.prototype.matchesHack=function(t){return!1},Q.prototype.parseRule=function(){return null},Q.prototype.stopEvent=function(){return!1},ve.size.get=function(){for(var n=0,t=0;tqt(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))l=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(e==0)for(var c=t;;c=c.parentNode){if(c==this.dom){l=!1;break}if(c.parentNode.firstChild!=c)break}if(l==null&&e==t.childNodes.length)for(var u=t;;u=u.parentNode){if(u==this.dom){l=!0;break}if(u.parentNode.lastChild!=u)break}}return(l==null?r>0:l)?this.posAtEnd:this.posAtStart},Q.prototype.nearestDesc=function(t,e){for(var r=!0,o=t;o;o=o.parentNode){var i=this.getDesc(o);if(i&&(!e||i.node))if(r&&i.nodeDOM&&!(i.nodeDOM.nodeType==1?i.nodeDOM.contains(t.nodeType==1?t:t.parentNode):i.nodeDOM==t))r=!1;else return i}},Q.prototype.getDesc=function(t){for(var e=t.pmViewDesc,r=e;r;r=r.parent)if(r==this)return e},Q.prototype.posFromDOM=function(t,e,r){for(var o=t;o;o=o.parentNode){var i=this.getDesc(o);if(i)return i.localPosFromDOM(t,e,r)}return-1},Q.prototype.descAt=function(t){for(var e=0,r=0;et||s instanceof ol){o=t-i;break}i=a}if(o)return this.children[r].domFromPos(o-this.children[r].border,e);for(var l=void 0;r&&!(l=this.children[r-1]).size&&l instanceof el&&l.widget.type.side>=0;r--);if(e<=0){for(var c,u=!0;c=r?this.children[r-1]:null,!(!c||c.dom.parentNode==this.contentDOM);r--,u=!1);return c&&e&&u&&!c.border&&!c.domAtom?c.domFromPos(c.size,e):{node:this.contentDOM,offset:c?qt(c.dom)+1:0}}else{for(var p,d=!0;p=r=u&&e<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,e,u);t=s;for(var p=a;p>0;p--){var d=this.children[p-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){o=qt(d.dom)+1;break}t-=d.size}o==-1&&(o=0)}if(o>-1&&(c>e||a==this.children.length-1)){e=c;for(var h=a+1;hl&&se){var A=p;p=d,d=A}var I=document.createRange();I.setEnd(d.node,d.offset),I.setStart(p.node,p.offset),h.removeAllRanges(),h.addRange(I)}}},Q.prototype.ignoreMutation=function(t){return!this.contentDOM&&t.type!="selection"},ve.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},Q.prototype.markDirty=function(t,e){for(var r=0,o=0;o=r:tr){var a=r+i.border,l=s-i.border;if(t>=a&&e<=l){this.dirty=t==r||e==s?rr:tl,t==a&&e==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Le:i.markDirty(t-a,e-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM?rr:Le}r=s}this.dirty=rr},Q.prototype.markParentsDirty=function(){for(var t=1,e=this.parent;e;e=e.parent,t++){var r=t==1?rr:tl;e.dirty0&&(a=wi(a,0,r,i));for(var c=0;c-1?c:null,p=c&&c.pos<0,d=new Zt(this,u&&u.node);fp(this.node,this.innerDeco,function(h,m,g){h.spec.marks?d.syncToMarks(h.spec.marks,a,o):h.type.side>=0&&!g&&d.syncToMarks(m==s.node.childCount?J.none:s.node.child(m).marks,a,o),d.placeWidget(h,o,l)},function(h,m,g,y){d.syncToMarks(h.marks,a,o);var k;d.findNodeMatch(h,m,g,y)||p&&o.state.selection.from>l&&o.state.selection.to-1&&d.updateNodeAt(h,m,g,k,o)||d.updateNextNode(h,m,g,o,y)||d.addNode(h,m,g,o,l),l+=h.nodeSize}),d.syncToMarks(Fe,a,o),this.node.isTextblock&&d.addTextblockHacks(),d.destroyRest(),(d.changed||this.dirty==rr)&&(u&&this.protectLocalComposition(o,u),il(this.contentDOM,this.children,o),M.ios&&pp(this.dom))},t.prototype.localCompositionInfo=function(o,i){var s=o.state.selection,a=s.from,l=s.to;if(!(!(o.state.selection instanceof K)||ai+this.node.content.size)){var c=o.root.getSelection(),u=dp(c.focusNode,c.focusOffset);if(!(!u||!this.dom.contains(u.parentNode)))if(this.node.inlineContent){var p=u.nodeValue,d=hp(this.node.content,p,a-i,l-i);return d<0?null:{node:u,pos:d,text:p}}else return{node:u,pos:-1}}},t.prototype.protectLocalComposition=function(o,i){var s=i.node,a=i.pos,l=i.text;if(!this.getDesc(s)){for(var c=s;c.parentNode!=this.contentDOM;c=c.parentNode){for(;c.previousSibling;)c.parentNode.removeChild(c.previousSibling);for(;c.nextSibling;)c.parentNode.removeChild(c.nextSibling);c.pmViewDesc&&(c.pmViewDesc=null)}var u=new sp(this,c,s,l);o.compositionNodes.push(u),this.children=wi(this.children,a,a+l.length,o,u)}},t.prototype.update=function(o,i,s,a){return this.dirty==Le||!o.sameMarkup(this.node)?!1:(this.updateInner(o,i,s,a),!0)},t.prototype.updateInner=function(o,i,s,a){this.updateOuterDeco(i),this.node=o,this.innerDeco=s,this.contentDOM&&this.updateChildren(a,this.posAtStart),this.dirty=le},t.prototype.updateOuterDeco=function(o){if(!ki(o,this.outerDeco)){var i=this.nodeDOM.nodeType!=1,s=this.dom;this.dom=sl(this.dom,this.nodeDOM,bi(this.outerDeco,this.node,i),bi(o,this.node,i)),this.dom!=s&&(s.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=o}},t.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)},t.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")},e.domAtom.get=function(){return this.node.isAtom},Object.defineProperties(t.prototype,e),t}(Q);function nl(n,t,e,r,o){return al(r,t,n),new or(null,n,t,e,r,r,r,o,0)}var rl=function(n){function t(r,o,i,s,a,l,c){n.call(this,r,o,i,s,a,null,l,c)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={domAtom:{configurable:!0}};return t.prototype.parseRule=function(){for(var o=this.nodeDOM.parentNode;o&&o!=this.dom&&!o.pmIsDeco;)o=o.parentNode;return{skip:o||!0}},t.prototype.update=function(o,i,s,a){return this.dirty==Le||this.dirty!=le&&!this.inParent()||!o.sameMarkup(this.node)?!1:(this.updateOuterDeco(i),(this.dirty!=le||o.text!=this.node.text)&&o.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=o.text,a.trackWrites==this.nodeDOM&&(a.trackWrites=null)),this.node=o,this.dirty=le,!0)},t.prototype.inParent=function(){for(var o=this.parent.contentDOM,i=this.nodeDOM;i;i=i.parentNode)if(i==o)return!0;return!1},t.prototype.domFromPos=function(o){return{node:this.nodeDOM,offset:o}},t.prototype.localPosFromDOM=function(o,i,s){return o==this.nodeDOM?this.posAtStart+Math.min(i,this.node.text.length):n.prototype.localPosFromDOM.call(this,o,i,s)},t.prototype.ignoreMutation=function(o){return o.type!="characterData"&&o.type!="selection"},t.prototype.slice=function(o,i,s){var a=this.node.cut(o,i),l=document.createTextNode(a.text);return new t(this.parent,a,this.outerDeco,this.innerDeco,l,l,s)},t.prototype.markDirty=function(o,i){n.prototype.markDirty.call(this,o,i),this.dom!=this.nodeDOM&&(o==0||i==this.nodeDOM.nodeValue.length)&&(this.dirty=Le)},e.domAtom.get=function(){return!1},Object.defineProperties(t.prototype,e),t}(or),ol=function(n){function t(){n.apply(this,arguments)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};return t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.matchesHack=function(o){return this.dirty==le&&this.dom.nodeName==o},e.domAtom.get=function(){return!0},e.ignoreForCoords.get=function(){return this.dom.nodeName=="IMG"},Object.defineProperties(t.prototype,e),t}(Q),ap=function(n){function t(e,r,o,i,s,a,l,c,u,p){n.call(this,e,r,o,i,s,a,l,u,p),this.spec=c}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.update=function(r,o,i,s){if(this.dirty==Le)return!1;if(this.spec.update){var a=this.spec.update(r,o,i);return a&&this.updateInner(r,o,i,s),a}else return!this.contentDOM&&!r.isLeaf?!1:n.prototype.update.call(this,r,o,i,s)},t.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():n.prototype.selectNode.call(this)},t.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():n.prototype.deselectNode.call(this)},t.prototype.setSelection=function(r,o,i,s){this.spec.setSelection?this.spec.setSelection(r,o,i):n.prototype.setSelection.call(this,r,o,i,s)},t.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),n.prototype.destroy.call(this)},t.prototype.stopEvent=function(r){return this.spec.stopEvent?this.spec.stopEvent(r):!1},t.prototype.ignoreMutation=function(r){return this.spec.ignoreMutation?this.spec.ignoreMutation(r):n.prototype.ignoreMutation.call(this,r)},t}(or);function il(n,t,e){for(var r=n.firstChild,o=!1,i=0;i>1,s=Math.min(i,t.length);o-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var c=yi.create(this.top,t[i],e,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,i++}},Zt.prototype.findNodeMatch=function(t,e,r,o){var i=this.top.children,s=-1;if(o>=this.preMatch.index){for(var a=this.index;a0&&r>0;r--){var i=t[r-1],s=i.node;if(!!s){if(s!=n.child(e-1))break;--e,o.set(i,e)}}return{index:e,matched:o}}function up(n,t){return n.type.side-t.type.side}function fp(n,t,e,r){var o=t.locals(n),i=0;if(o.length==0){for(var s=0;si;)c.push(o[l++]);var b=i+g.nodeSize;if(g.isText){var N=b;l0){if(n.childNodes.length>t&&n.childNodes[t].nodeType==3)return n.childNodes[t];n=n.childNodes[t-1],t=me(n)}else if(n.nodeType==1&&t=e){var u=l.lastIndexOf(t,r-a);if(u>=0&&u+t.length+a>=e)return a+u}}}return-1}function wi(n,t,e,r,o){for(var i=[],s=0,a=0;s=e||u<=t?i.push(l):(ce&&i.push(l.slice(e-c,l.size,r)))}return i}function cl(n,t){var e=n.root.getSelection(),r=n.state.doc;if(!e.focusNode)return null;var o=n.docView.nearestDesc(e.focusNode),i=o&&o.size==0,s=n.docView.posFromDOM(e.focusNode,e.focusOffset);if(s<0)return null;var a=r.resolve(s),l,c;if(mi(e)){for(l=a;o&&!o.node;)o=o.parent;if(o&&o.node.isAtom&&P.isSelectable(o.node)&&o.parent&&!(o.node.isInline&&$f(e.focusNode,e.focusOffset,o.dom))){var u=o.posBefore;c=new P(s==u?a:r.resolve(u))}}else{var p=n.docView.posFromDOM(e.anchorNode,e.anchorOffset);if(p<0)return null;l=r.resolve(p)}if(!c){var d=t=="pointer"||n.state.selection.head0?r.max(o):r.min(o),s=i.parent.inlineContent?i.depth?n.doc.resolve(t>0?i.after():i.before()):null:i;return s&&z.findFrom(s,t)}function rn(n,t){return n.dispatch(n.state.tr.setSelection(t).scrollIntoView()),!0}function vl(n,t,e){var r=n.state.selection;if(r instanceof K){if(!r.empty||e.indexOf("s")>-1)return!1;if(n.endOfTextblock(t>0?"right":"left")){var o=Ci(n.state,t);return o&&o instanceof P?rn(n,o):!1}else if(!(M.mac&&e.indexOf("m")>-1)){var i=r.$head,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,a;if(!s||s.isText)return!1;var l=t<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(a=n.docView.descAt(l))&&!a.contentDOM?P.isSelectable(s)?rn(n,new P(t<0?n.state.doc.resolve(i.pos-s.nodeSize):i)):M.webkit?rn(n,new K(n.state.doc.resolve(t<0?l:l+s.nodeSize))):!1:!1}}else{if(r instanceof P&&r.node.isInline)return rn(n,new K(t>0?r.$to:r.$from));var c=Ci(n.state,t);return c?rn(n,c):!1}}function Kr(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function sr(n){var t=n.pmViewDesc;return t&&t.size==0&&(n.nextSibling||n.nodeName!="BR")}function Ei(n){var t=n.root.getSelection(),e=t.focusNode,r=t.focusOffset;if(!!e){var o,i,s=!1;for(M.gecko&&e.nodeType==1&&r0){if(e.nodeType!=1)break;var a=e.childNodes[r-1];if(sr(a))o=e,i=--r;else if(a.nodeType==3)e=a,r=e.nodeValue.length;else break}else{if(gl(e))break;for(var l=e.previousSibling;l&&sr(l);)o=e.parentNode,i=qt(l),l=l.previousSibling;if(l)e=l,r=Kr(e);else{if(e=e.parentNode,e==n.dom)break;r=0}}s?Ni(n,t,e,r):o&&Ni(n,t,o,i)}}function Oi(n){var t=n.root.getSelection(),e=t.focusNode,r=t.focusOffset;if(!!e){for(var o=Kr(e),i,s;;)if(r-1||M.mac&&e.indexOf("m")>-1)return!1;var o=r.$from,i=r.$to;if(!o.parent.inlineContent||n.endOfTextblock(t<0?"up":"down")){var s=Ci(n.state,t);if(s&&s instanceof P)return rn(n,s)}if(!o.parent.inlineContent){var a=t<0?o:i,l=r instanceof Ne?z.near(a,t):z.findFrom(a,t);return l?rn(n,l):!1}return!1}function bl(n,t){if(!(n.state.selection instanceof K))return!0;var e=n.state.selection,r=e.$head,o=e.$anchor,i=e.empty;if(!r.sameParent(o))return!0;if(!i)return!1;if(n.endOfTextblock(t>0?"forward":"backward"))return!0;var s=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(s&&!s.isText){var a=n.state.tr;return t<0?a.delete(r.pos-s.nodeSize,r.pos):a.delete(r.pos,r.pos+s.nodeSize),n.dispatch(a),!0}return!1}function kl(n,t,e){n.domObserver.stop(),t.contentEditable=e,n.domObserver.start()}function bp(n){if(!(!M.safari||n.state.selection.$head.parentOffset>0)){var t=n.root.getSelection(),e=t.focusNode,r=t.focusOffset;if(e&&e.nodeType==1&&r==0&&e.firstChild&&e.firstChild.contentEditable=="false"){var o=e.firstChild;kl(n,o,!0),setTimeout(function(){return kl(n,o,!1)},20)}}}function kp(n){var t="";return n.ctrlKey&&(t+="c"),n.metaKey&&(t+="m"),n.altKey&&(t+="a"),n.shiftKey&&(t+="s"),t}function wp(n,t){var e=t.keyCode,r=kp(t);return e==8||M.mac&&e==72&&r=="c"?bl(n,-1)||Ei(n):e==46||M.mac&&e==68&&r=="c"?bl(n,1)||Oi(n):e==13||e==27?!0:e==37?vl(n,-1,r)||Ei(n):e==39?vl(n,1,r)||Oi(n):e==38?yl(n,-1,r)||Ei(n):e==40?bp(n)||yl(n,1,r)||Oi(n):r==(M.mac?"m":"c")&&(e==66||e==73||e==89||e==90)}function Sp(n,t,e){var r=n.docView.parseRange(t,e),o=r.node,i=r.fromOffset,s=r.toOffset,a=r.from,l=r.to,c=n.root.getSelection(),u=null,p=c.anchorNode;if(p&&n.dom.contains(p.nodeType==1?p:p.parentNode)&&(u=[{node:p,offset:c.anchorOffset}],mi(c)||u.push({node:c.focusNode,offset:c.focusOffset})),M.chrome&&n.lastKeyCode===8)for(var d=s;d>i;d--){var h=o.childNodes[d-1],m=h.pmViewDesc;if(h.nodeName=="BR"&&!m){s=d;break}if(!m||m.size)break}var g=n.state.doc,y=n.someProp("domParser")||se.fromSchema(n.state.schema),k=g.resolve(a),b=null,N=y.parse(o,{topNode:k.parent,topMatch:k.parent.contentMatchAt(k.index()),topOpen:!0,from:i,to:s,preserveWhitespace:k.parent.type.spec.code?"full":!0,editableContent:!0,findPositions:u,ruleFromNode:xp,context:k});if(u&&u[0].pos!=null){var v=u[0].pos,O=u[1]&&u[1].pos;O==null&&(O=v),b={anchor:v+a,head:O+a}}return{doc:N,sel:b,from:a,to:l}}function xp(n){var t=n.pmViewDesc;if(t)return t.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(M.safari&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){var e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}else if(n.parentNode.lastChild==n||M.safari&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0}}function Mp(n,t,e,r,o){if(t<0){var i=n.lastSelectionTime>Date.now()-50?n.lastSelectionOrigin:null,s=cl(n,i);if(s&&!n.state.selection.eq(s)){var a=n.state.tr.setSelection(s);i=="pointer"?a.setMeta("pointer",!0):i=="key"&&a.scrollIntoView(),n.dispatch(a)}return}var l=n.state.doc.resolve(t),c=l.sharedDepth(e);t=l.before(c+1),e=n.state.doc.resolve(e).after(c+1);var u=n.state.selection,p=Sp(n,t,e);if(M.chrome&&n.cursorWrapper&&p.sel&&p.sel.anchor==n.cursorWrapper.deco.from){var d=n.cursorWrapper.deco.type.toDOM.nextSibling,h=d&&d.nodeValue?d.nodeValue.length:1;p.sel={anchor:p.sel.anchor+h,head:p.sel.anchor+h}}var m=n.state.doc,g=m.slice(p.from,p.to),y,k;n.lastKeyCode===8&&Date.now()-100Date.now()-225||M.android)&&o.some(function(X){return X.nodeName=="DIV"||X.nodeName=="P"})&&n.someProp("handleKeyDown",function(X){return X(n,Mn(13,"Enter"))})){n.lastIOSEnter=0;return}else{if(p.sel){var N=wl(n,n.state.doc,p.sel);N&&!N.eq(n.state.selection)&&n.dispatch(n.state.tr.setSelection(N))}return}n.domChangeCount++,n.state.selection.fromn.state.selection.from&&b.start<=n.state.selection.from+2?b.start=n.state.selection.from:b.endA=n.state.selection.to-2&&(b.endB+=n.state.selection.to-b.endA,b.endA=n.state.selection.to)),M.ie&&M.ie_version<=11&&b.endB==b.start+1&&b.endA==b.start&&b.start>p.from&&p.doc.textBetween(b.start-p.from-1,b.start-p.from+1)==" \xA0"&&(b.start--,b.endA--,b.endB--);var v=p.doc.resolveNoCache(b.start-p.from),O=p.doc.resolveNoCache(b.endB-p.from),C=v.sameParent(O)&&v.parent.inlineContent,A;if((M.ios&&n.lastIOSEnter>Date.now()-225&&(!C||o.some(function(X){return X.nodeName=="DIV"||X.nodeName=="P"}))||!C&&v.posb.start&&Ep(m,b.start,b.endA,v,O)&&n.someProp("handleKeyDown",function(X){return X(n,Mn(8,"Backspace"))})){M.android&&M.chrome&&n.domObserver.suppressSelectionUpdates();return}M.chrome&&M.android&&b.toB==b.from&&(n.lastAndroidDelete=Date.now()),M.android&&!C&&v.start()!=O.start()&&O.parentOffset==0&&v.depth==O.depth&&p.sel&&p.sel.anchor==p.sel.head&&p.sel.head==b.endA&&(b.endB-=2,O=p.doc.resolveNoCache(b.endB-p.from),setTimeout(function(){n.someProp("handleKeyDown",function(X){return X(n,Mn(13,"Enter"))})},20));var I=b.start,V=b.endA,F,st,et,U;if(C){if(v.pos==O.pos)M.ie&&M.ie_version<=11&&v.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(function(){return He(n)},20)),F=n.state.tr.delete(I,V),st=m.resolve(b.start).marksAcross(m.resolve(b.endA));else if(b.endA==b.endB&&(U=m.resolve(b.start))&&(et=Cp(v.parent.content.cut(v.parentOffset,O.parentOffset),U.parent.content.cut(U.parentOffset,b.endA-U.start()))))F=n.state.tr,et.type=="add"?F.addMark(I,V,et.mark):F.removeMark(I,V,et.mark);else if(v.parent.child(v.index()).isText&&v.index()==O.index()-(O.textOffset?0:1)){var Nt=v.parent.textBetween(v.parentOffset,O.parentOffset);if(n.someProp("handleTextInput",function(X){return X(n,I,V,Nt)}))return;F=n.state.tr.insertText(Nt,I,V)}}if(F||(F=n.state.tr.replace(I,V,p.doc.slice(b.start-p.from,b.endB-p.from))),p.sel){var Z=wl(n,F.doc,p.sel);Z&&!(M.chrome&&M.android&&n.composing&&Z.empty&&(b.start!=b.endB||n.lastAndroidDeletet.content.size?null:xi(n,t.resolve(e.anchor),t.resolve(e.head))}function Cp(n,t){for(var e=n.firstChild.marks,r=t.firstChild.marks,o=e,i=r,s,a,l,c=0;ce||Ti(s,!0,!1)0&&(t||n.indexAfter(r)==n.node(r).childCount);)r--,o++,t=!1;if(e)for(var i=n.node(r).maybeChild(n.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}function Op(n,t,e,r,o){var i=n.findDiffStart(t,e);if(i==null)return null;var s=n.findDiffEnd(t,e+n.size,e+t.size),a=s.a,l=s.b;if(o=="end"){var c=Math.max(0,i-Math.min(a,l));r-=a+c-i}if(a=a?i-r:0;i-=u,l=i+(l-a),a=i}else if(l=l?i-r:0;i-=p,a=i+(a-l),l=i}return{start:i,endA:a,endB:l}}function Sl(n,t){for(var e=[],r=t.content,o=t.openStart,i=t.openEnd;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;var s=r.firstChild;e.push(s.type.name,s.attrs!=s.type.defaultAttrs?s.attrs:null),r=s.content}var a=n.someProp("clipboardSerializer")||ht.fromSchema(n.state.schema),l=_l(),c=l.createElement("div");c.appendChild(a.serializeFragment(r,{document:l}));for(var u=c.firstChild,p;u&&u.nodeType==1&&(p=Nl[u.nodeName.toLowerCase()]);){for(var d=p.length-1;d>=0;d--){for(var h=l.createElement(p[d]);c.firstChild;)h.appendChild(c.firstChild);c.appendChild(h),p[d]!="tbody"&&(o++,i++)}u=c.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",o+" "+i+" "+JSON.stringify(e));var m=n.someProp("clipboardTextSerializer",function(g){return g(t)})||t.content.textBetween(0,t.content.size,` + +`);return{dom:c,text:m}}function xl(n,t,e,r,o){var i,s=o.parent.type.spec.code,a;if(!e&&!t)return null;var l=t&&(r||s||!e);if(l){if(n.someProp("transformPastedText",function(O){t=O(t,s||r)}),s)return t?new T(S.from(n.state.schema.text(t.replace(/\r\n?/g,` +`))),0,0):T.empty;var c=n.someProp("clipboardTextParser",function(O){return O(t,o,r)});if(c)a=c;else{var u=o.marks(),p=n.state,d=p.schema,h=ht.fromSchema(d);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(function(O){var C=i.appendChild(document.createElement("p"));O&&C.appendChild(h.serializeNode(d.text(O,u)))})}}else n.someProp("transformPastedHTML",function(O){e=O(e)}),i=Tp(e),M.webkit&&_p(i);var m=i&&i.querySelector("[data-pm-slice]"),g=m&&/^(\d+) (\d+) (.*)/.exec(m.getAttribute("data-pm-slice"));if(!a){var y=n.someProp("clipboardParser")||n.someProp("domParser")||se.fromSchema(n.state.schema);a=y.parseSlice(i,{preserveWhitespace:!!(l||g),context:o})}if(g)a=Ap(Ol(a,+g[1],+g[2]),g[3]);else if(a=T.maxOpen(Np(a.content,o),!0),a.openStart||a.openEnd){for(var k=0,b=0,N=a.content.firstChild;k=0;r--){var o=e(r);if(o)return o.v}return n}function Ml(n,t,e){e===void 0&&(e=0);for(var r=t.length-1;r>=e;r--)n=t[r].create(null,S.from(n));return n}function Cl(n,t,e,r,o){if(o=e&&(a=t<0?s.contentMatchAt(0).fillBefore(a,n.childCount>1||i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(S.empty,!0))),n.replaceChild(t<0?0:n.childCount-1,s.copy(a))}function Ol(n,t,e){return t]*>)*/.exec(n);t&&(n=n.slice(t[0].length));var e=_l().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),o;if((o=r&&Nl[r[1].toLowerCase()])&&(n=o.map(function(s){return"<"+s+">"}).join("")+n+o.map(function(s){return""}).reverse().join("")),e.innerHTML=n,o)for(var i=0;i=0;a-=2){var l=e.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;o=S.from(l.create(r[a+1],o)),i++,s++}return new T(o,i,s)}var Dp={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Ai=M.ie&&M.ie_version<=11,Di=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};Di.prototype.set=function(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset},Di.prototype.eq=function(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset};var jt=function(t,e){var r=this;this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=window.MutationObserver&&new window.MutationObserver(function(o){for(var i=0;is.target.nodeValue.length})?r.flushSoon():r.flush()}),this.currentSelection=new Di,Ai&&(this.onCharData=function(o){r.queue.push({target:o.target,type:"characterData",oldValue:o.prevValue}),r.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};jt.prototype.flushSoon=function(){var t=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(function(){t.flushingSoon=-1,t.flush()},20))},jt.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},jt.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Dp),Ai&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},jt.prototype.stop=function(){var t=this;if(this.observer){var e=this.observer.takeRecords();if(e.length){for(var r=0;r-1)){var t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);var e=this.view.root.getSelection(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&Mi(this.view)&&!this.ignoreSelectionChange(e),o=-1,i=-1,s=!1,a=[];if(this.view.editable)for(var l=0;l1){var u=a.filter(function(h){return h.nodeName=="BR"});if(u.length==2){var p=u[0],d=u[1];p.parentNode&&p.parentNode.parentNode==d.parentNode?d.remove():p.remove()}}(o>-1||r)&&(o>-1&&(this.view.docView.markDirty(o,i),Rp(this.view)),this.handleDOMChange(o,i,s,a),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(e)||He(this.view),this.currentSelection.set(e))}},jt.prototype.registerMutation=function(t,e){if(e.indexOf(t.target)>-1)return null;var r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(var o=0;oi.depth?u(n,e,i.nodeAfter,i.before(c),o,!0):u(n,e,i.node(c),i.before(c),o,!1)}))return{v:!0}},a=i.depth+1;a>0;a--){var l=s(a);if(l)return l.v}return!1}function En(n,t,e){n.focused||n.focus();var r=n.state.tr.setSelection(t);e=="pointer"&&r.setMeta("pointer",!0),n.dispatch(r)}function Lp(n,t){if(t==-1)return!1;var e=n.state.doc.resolve(t),r=e.nodeAfter;return r&&r.isAtom&&P.isSelectable(r)?(En(n,new P(e),"pointer"),!0):!1}function Fp(n,t){if(t==-1)return!1;var e=n.state.selection,r,o;e instanceof P&&(r=e.node);for(var i=n.state.doc.resolve(t),s=i.depth+1;s>0;s--){var a=s>i.depth?i.nodeAfter:i.node(s);if(P.isSelectable(a)){r&&e.$from.depth>0&&s>=e.$from.depth&&i.before(e.$from.depth+1)==e.$from.pos?o=i.before(e.$from.depth):o=i.before(s);break}}return o!=null?(En(n,P.create(n.state.doc,o),"pointer"),!0):!1}function Hp(n,t,e,r,o){return Ii(n,"handleClickOn",t,e,r)||n.someProp("handleClick",function(i){return i(n,t,r)})||(o?Fp(n,e):Lp(n,e))}function Jp(n,t,e,r){return Ii(n,"handleDoubleClickOn",t,e,r)||n.someProp("handleDoubleClick",function(o){return o(n,t,r)})}function $p(n,t,e,r){return Ii(n,"handleTripleClickOn",t,e,r)||n.someProp("handleTripleClick",function(o){return o(n,t,r)})||qp(n,e,r)}function qp(n,t,e){if(e.button!=0)return!1;var r=n.state.doc;if(t==-1)return r.inlineContent?(En(n,K.create(r,0,r.content.size),"pointer"),!0):!1;for(var o=r.resolve(t),i=o.depth+1;i>0;i--){var s=i>o.depth?o.nodeAfter:o.node(i),a=o.before(i);if(s.inlineContent)En(n,K.create(r,a+1,a+1+s.content.size),"pointer");else if(P.isSelectable(s))En(n,P.create(r,a),"pointer");else continue;return!0}}function Bi(n){return Yr(n)}var Dl=M.mac?"metaKey":"ctrlKey";Jt.mousedown=function(n,t){n.shiftKey=t.shiftKey;var e=Bi(n),r=Date.now(),o="singleClick";r-n.lastClick.time<500&&zp(t,n.lastClick)&&!t[Dl]&&(n.lastClick.type=="singleClick"?o="doubleClick":n.lastClick.type=="doubleClick"&&(o="tripleClick")),n.lastClick={time:r,x:t.clientX,y:t.clientY,type:o};var i=n.posAtCoords(Ur(t));!i||(o=="singleClick"?(n.mouseDown&&n.mouseDown.done(),n.mouseDown=new Gr(n,i,t,e)):(o=="doubleClick"?Jp:$p)(n,i.pos,i.inside,t)?t.preventDefault():on(n,"pointer"))};var Gr=function(t,e,r,o){var i=this;this.view=t,this.startDoc=t.state.doc,this.pos=e,this.event=r,this.flushed=o,this.selectNode=r[Dl],this.allowDefault=r.shiftKey,this.delayedSelectionSync=!1;var s,a;if(e.inside>-1)s=t.state.doc.nodeAt(e.inside),a=e.inside;else{var l=t.state.doc.resolve(e.pos);s=l.parent,a=l.depth?l.before():0}this.mightDrag=null;var c=o?null:r.target,u=c?t.docView.nearestDesc(c,!0):null;this.target=u?u.dom:null;var p=t.state,d=p.selection;(r.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||d instanceof P&&d.from<=a&&d.to>a)&&(this.mightDrag={node:s,pos:a,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&M.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(){i.view.mouseDown==i&&i.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)),on(t,"pointer")};Gr.prototype.done=function(){var t=this;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.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(function(){return He(t.view)}),this.view.mouseDown=null},Gr.prototype.up=function(t){if(this.done(),!!this.view.dom.contains(t.target.nodeType==3?t.target.parentNode:t.target)){var e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(Ur(t))),this.allowDefault||!e?on(this.view,"pointer"):Hp(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||M.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||M.chrome&&!(this.view.state.selection instanceof K)&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(En(this.view,z.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):on(this.view,"pointer")}},Gr.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),on(this.view,"pointer"),t.buttons==0&&this.done()},Jt.touchdown=function(n){Bi(n),on(n,"pointer")},Jt.contextmenu=function(n){return Bi(n)};function Rl(n,t){return n.composing?!0:M.safari&&Math.abs(t.timeStamp-n.compositionEndedAt)<500?(n.compositionEndedAt=-2e8,!0):!1}var jp=M.android?5e3:-1;Rt.compositionstart=Rt.compositionupdate=function(n){if(!n.composing){n.domObserver.flush();var t=n.state,e=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!e.textOffset&&e.parentOffset&&e.nodeBefore.marks.some(function(a){return a.type.spec.inclusive===!1})))n.markCursor=n.state.storedMarks||e.marks(),Yr(n,!0),n.markCursor=null;else if(Yr(n),M.gecko&&t.selection.empty&&e.parentOffset&&!e.textOffset&&e.nodeBefore.marks.length)for(var r=n.root.getSelection(),o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){var s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){r.collapse(s,s.nodeValue.length);break}else o=s,i=-1}n.composing=!0}Vl(n,jp)},Rt.compositionend=function(n,t){n.composing&&(n.composing=!1,n.compositionEndedAt=t.timeStamp,Vl(n,20))};function Vl(n,t){clearTimeout(n.composingTimeout),t>-1&&(n.composingTimeout=setTimeout(function(){return Yr(n)},t))}function Il(n){for(n.composing&&(n.composing=!1,n.compositionEndedAt=Wp());n.compositionNodes.length>0;)n.compositionNodes.pop().markParentsDirty()}function Wp(){var n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function Yr(n,t){if(n.domObserver.forceFlush(),Il(n),t||n.docView.dirty){var e=cl(n);return e&&!e.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(e)):n.updateState(n.state),!0}return!1}function Kp(n,t){if(!!n.dom.parentNode){var e=n.dom.parentNode.appendChild(document.createElement("div"));e.appendChild(t),e.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),n.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(function(){e.parentNode&&e.parentNode.removeChild(e),n.focus()},50)}}var On=M.ie&&M.ie_version<15||M.ios&&M.webkit_version<604;Jt.copy=Rt.cut=function(n,t){var e=n.state.selection,r=t.type=="cut";if(!e.empty){var o=On?null:t.clipboardData,i=e.content(),s=Sl(n,i),a=s.dom,l=s.text;o?(t.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):Kp(n,a),r&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}};function Up(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function Gp(n,t){if(!!n.dom.parentNode){var e=n.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(e?"textarea":"div"));e||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout(function(){n.focus(),r.parentNode&&r.parentNode.removeChild(r),e?Pi(n,r.value,null,t):Pi(n,r.textContent,r.innerHTML,t)},50)}}function Pi(n,t,e,r){var o=xl(n,t,e,n.shiftKey,n.state.selection.$from);if(n.someProp("handlePaste",function(a){return a(n,r,o||T.empty)}))return!0;if(!o)return!1;var i=Up(o),s=i?n.state.tr.replaceSelectionWith(i,n.shiftKey):n.state.tr.replaceSelection(o);return n.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Rt.paste=function(n,t){var e=On?null:t.clipboardData;e&&Pi(n,e.getData("text/plain"),e.getData("text/html"),t)?t.preventDefault():Gp(n,t)};var Yp=function(t,e){this.slice=t,this.move=e},Bl=M.mac?"altKey":"ctrlKey";Jt.dragstart=function(n,t){var e=n.mouseDown;if(e&&e.done(),!!t.dataTransfer){var r=n.state.selection,o=r.empty?null:n.posAtCoords(Ur(t));if(!(o&&o.pos>=r.from&&o.pos<=(r instanceof P?r.to-1:r.to))){if(e&&e.mightDrag)n.dispatch(n.state.tr.setSelection(P.create(n.state.doc,e.mightDrag.pos)));else if(t.target&&t.target.nodeType==1){var i=n.docView.nearestDesc(t.target,!0);i&&i.node.type.spec.draggable&&i!=n.docView&&n.dispatch(n.state.tr.setSelection(P.create(n.state.doc,i.posBefore)))}}var s=n.state.selection.content(),a=Sl(n,s),l=a.dom,c=a.text;t.dataTransfer.clearData(),t.dataTransfer.setData(On?"Text":"text/html",l.innerHTML),t.dataTransfer.effectAllowed="copyMove",On||t.dataTransfer.setData("text/plain",c),n.dragging=new Yp(s,!t[Bl])}},Jt.dragend=function(n){var t=n.dragging;window.setTimeout(function(){n.dragging==t&&(n.dragging=null)},50)},Rt.dragover=Rt.dragenter=function(n,t){return t.preventDefault()},Rt.drop=function(n,t){var e=n.dragging;if(n.dragging=null,!!t.dataTransfer){var r=n.posAtCoords(Ur(t));if(!!r){var o=n.state.doc.resolve(r.pos);if(!!o){var i=e&&e.slice;i?n.someProp("transformPasted",function(m){i=m(i)}):i=xl(n,t.dataTransfer.getData(On?"Text":"text/plain"),On?null:t.dataTransfer.getData("text/html"),!1,o);var s=e&&!t[Bl];if(n.someProp("handleDrop",function(m){return m(n,t,i||T.empty,s)})){t.preventDefault();return}if(!!i){t.preventDefault();var a=i?ha(n.state.doc,o.pos,i):o.pos;a==null&&(a=o.pos);var l=n.state.tr;s&&l.deleteSelection();var c=l.mapping.map(a),u=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,p=l.doc;if(u?l.replaceRangeWith(c,c,i.content.firstChild):l.replaceRange(c,c,i),!l.doc.eq(p)){var d=l.doc.resolve(c);if(u&&P.isSelectable(i.content.firstChild)&&d.nodeAfter&&d.nodeAfter.sameMarkup(i.content.firstChild))l.setSelection(new P(d));else{var h=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach(function(m,g,y,k){return h=k}),l.setSelection(xi(n,d,l.doc.resolve(h)))}n.focus(),n.dispatch(l.setMeta("uiEvent","drop"))}}}}}},Jt.focus=function(n){n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(function(){n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.root.getSelection())&&He(n)},20))},Jt.blur=function(n,t){n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.set({}),n.focused=!1)},Jt.beforeinput=function(n,t){if(M.chrome&&M.android&&t.inputType=="deleteContentBackward"){var e=n.domChangeCount;setTimeout(function(){if(n.domChangeCount==e&&(n.dom.blur(),n.focus(),!n.someProp("handleKeyDown",function(i){return i(n,Mn(8,"Backspace"))}))){var r=n.state.selection,o=r.$cursor;o&&o.pos>0&&n.dispatch(n.state.tr.delete(o.pos-1,o.pos).scrollIntoView())}},50)}};for(var Pl in Rt)Jt[Pl]=Rt[Pl];function ar(n,t){if(n==t)return!0;for(var e in n)if(n[e]!==t[e])return!1;for(var r in t)if(!(r in n))return!1;return!0}var Nn=function(t,e){this.spec=e||sn,this.side=this.spec.side||0,this.toDOM=t};Nn.prototype.map=function(t,e,r,o){var i=t.mapResult(e.from+o,this.side<0?-1:1),s=i.pos,a=i.deleted;return a?null:new ut(s-r,s-r,this)},Nn.prototype.valid=function(){return!0},Nn.prototype.eq=function(t){return this==t||t instanceof Nn&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ar(this.spec,t.spec))},Nn.prototype.destroy=function(t){this.spec.destroy&&this.spec.destroy(t)};var ce=function(t,e){this.spec=e||sn,this.attrs=t};ce.prototype.map=function(t,e,r,o){var i=t.map(e.from+o,this.spec.inclusiveStart?-1:1)-r,s=t.map(e.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new ut(i,s,this)},ce.prototype.valid=function(t,e){return e.from=t&&(!i||i(a.spec))&&r.push(a.copy(a.from+o,a.to+o))}for(var l=0;lt){var c=this.children[l]+1;this.children[l+2].findInner(t-c,e-c,r,o+c,i)}},Y.prototype.map=function(t,e,r){return this==vt||t.maps.length==0?this:this.mapInner(t,e,0,0,r||sn)},Y.prototype.mapInner=function(t,e,r,o,i){for(var s,a=0;aa&&u.to=t){this.children[i]==t&&(r=this.children[i+2]);break}for(var s=t+1,a=s+e.content.size,l=0;ls&&c.type instanceof ce){var u=Math.max(s,c.from)-s,p=Math.min(a,c.to)-s;uX+i||(et>=a[Z]+i?a[Z+1]=-1:U>=o&&(Tt=Nt-U-(et-st))&&(a[Z]+=Tt,a[Z+1]+=Tt))}},c=0;c=r.content.size){u=!0;continue}var m=e.map(n[p+1]+i,-1),g=m-o,y=r.content.findIndex(h),k=y.index,b=y.offset,N=r.maybeChild(k);if(N&&b==h&&b+N.nodeSize==g){var v=a[p+2].mapInner(e,N,d+1,n[p]+i+1,s);v!=vt?(a[p]=h,a[p+1]=g,a[p+2]=v):(a[p+1]=-2,u=!0)}else u=!0}if(u){var O=Qp(a,n,t||[],e,o,i,s),C=Qr(O,r,0,s);t=C.local;for(var A=0;Ae&&s.to0;)t++;n.splice(t,0,e)}function Fi(n){var t=[];return n.someProp("decorations",function(e){var r=e(n.state);r&&r!=vt&&t.push(r)}),n.cursorWrapper&&t.push(Y.create(n.state.doc,[n.cursorWrapper.deco])),te.from(t)}var ct=function(t,e){this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(Wl),this.dispatch=this.dispatch.bind(this),this._root=null,this.focused=!1,this.trackWrites=null,this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):t.apply?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=ql(this),this.markCursor=null,this.cursorWrapper=null,$l(this),this.nodeViews=jl(this),this.docView=nl(this.state.doc,Jl(this),Fi(this),this.dom,this),this.lastSelectedViewDesc=null,this.dragging=null,Vp(this),this.prevDirectPlugins=[],this.pluginViews=[],this.updatePluginViews()},Hi={props:{configurable:!0},root:{configurable:!0}};Hi.props.get=function(){if(this._props.state!=this.state){var n=this._props;this._props={};for(var t in n)this._props[t]=n[t];this._props.state=this.state}return this._props},ct.prototype.update=function(t){t.handleDOMEvents!=this._props.handleDOMEvents&&Ri(this),this._props=t,t.plugins&&(t.plugins.forEach(Wl),this.directPlugins=t.plugins),this.updateStateInner(t.state,!0)},ct.prototype.setProps=function(t){var e={};for(var r in this._props)e[r]=this._props[r];e.state=this.state;for(var o in t)e[o]=t[o];this.update(e)},ct.prototype.updateState=function(t){this.updateStateInner(t,this.state.plugins!=t.plugins)},ct.prototype.updateStateInner=function(t,e){var r=this,o=this.state,i=!1,s=!1;if(t.storedMarks&&this.composing&&(Il(this),s=!0),this.state=t,e){var a=jl(this);td(a,this.nodeViews)&&(this.nodeViews=a,i=!0),Ri(this)}this.editable=ql(this),$l(this);var l=Fi(this),c=Jl(this),u=e?"reset":t.scrollToSelection>o.scrollToSelection?"to selection":"preserve",p=i||!this.docView.matchesNode(t.doc,c,l);(p||!t.selection.eq(o.selection))&&(s=!0);var d=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&Kf(this);if(s){this.domObserver.stop();var h=p&&(M.ie||M.chrome)&&!this.composing&&!o.selection.empty&&!t.selection.empty&&Zp(o.selection,t.selection);if(p){var m=M.chrome?this.trackWrites=this.root.getSelection().focusNode:null;(i||!this.docView.update(t.doc,c,l,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=nl(t.doc,c,l,this.dom,this)),m&&!this.trackWrites&&(h=!0)}h||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&yp(this))?He(this,h):(hl(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(o),u=="reset")this.dom.scrollTop=0;else if(u=="to selection"){var g=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",function(y){return y(r)})||(t.selection instanceof P?qa(this,this.docView.domAfterPos(t.selection.from).getBoundingClientRect(),g):qa(this,this.coordsAtPos(t.selection.head,1),g))}else d&&Uf(d)},ct.prototype.destroyPluginViews=function(){for(var t;t=this.pluginViews.pop();)t.destroy&&t.destroy()},ct.prototype.updatePluginViews=function(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(var e=0;e",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},Kl=typeof navigator!="undefined"&&/Chrome\/(\d+)/.exec(navigator.userAgent),ed=typeof navigator!="undefined"&&/Apple Computer/.test(navigator.vendor),nd=typeof navigator!="undefined"&&/Gecko\/\d+/.test(navigator.userAgent),Ul=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),rd=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),od=Kl&&(Ul||+Kl[1]<57)||nd&&Ul,gt=0;gt<10;gt++)Je[48+gt]=Je[96+gt]=String(gt);for(var gt=1;gt<=24;gt++)Je[gt+111]="F"+gt;for(var gt=65;gt<=90;gt++)Je[gt]=String.fromCharCode(gt+32),Zr[gt]=String.fromCharCode(gt);for(var Ji in Je)Zr.hasOwnProperty(Ji)||(Zr[Ji]=Je[Ji]);function id(n){var t=od&&(n.ctrlKey||n.altKey||n.metaKey)||(ed||rd)&&n.shiftKey&&n.key&&n.key.length==1,e=!t&&n.key||(n.shiftKey?Zr:Je)[n.keyCode]||n.key||"Unidentified";return e=="Esc"&&(e="Escape"),e=="Del"&&(e="Delete"),e=="Left"&&(e="ArrowLeft"),e=="Up"&&(e="ArrowUp"),e=="Right"&&(e="ArrowRight"),e=="Down"&&(e="ArrowDown"),e}var sd=typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function ad(n){var t=n.split(/-(?!$)/),e=t[t.length-1];e=="Space"&&(e=" ");for(var r,o,i,s,a=0;a127)&&(s=Je[r.keyCode])&&s!=o){var l=t[$i(s,r,!0)];if(l&&l(e.state,e.dispatch,e))return!0}else if(i&&r.shiftKey){var c=t[$i(o,r,!0)];if(c&&c(e.state,e.dispatch,e))return!0}return!1}}function ud(n){return Object.prototype.toString.call(n).slice(8,-1)}function qi(n){return ud(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function to(n,t){const e=x({},n);return qi(n)&&qi(t)&&Object.keys(t).forEach(r=>{qi(t[r])?r in n?e[r]=to(n[r],t[r]):Object.assign(e,{[r]:t[r]}):Object.assign(e,{[r]:t[r]})}),e}function Yl(n){return typeof n=="function"}function L(n,t=void 0,...e){return Yl(n)?t?n.bind(t)(...e):n(...e):n}function _(n,t,e){return n.config[t]===void 0&&n.parent?_(n.parent,t,e):typeof n.config[t]=="function"?n.config[t].bind(Lt(x({},e),{parent:n.parent?_(n.parent,t,e):null})):n.config[t]}class yt{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=x(x({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=L(_(this,"addOptions",{name:this.name}))),this.storage=L(_(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new yt(t)}configure(t={}){const e=this.extend();return e.options=to(this.options,t),e.storage=L(_(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new yt(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=t.defaultOptions?t.defaultOptions:e.parent.options,t.addOptions&&(e.options=L(_(e,"addOptions",{name:e.name}))),e.storage=L(_(e,"addStorage",{name:e.name,options:e.options})),e}}function Xl(n,t,e){const{from:r,to:o}=t,{blockSeparator:i=` + +`,textSerializers:s={}}=e||{};let a="",l=!0;return n.nodesBetween(r,o,(c,u,p,d)=>{var h;const m=s==null?void 0:s[c.type.name];m?(c.isBlock&&!l&&(a+=i,l=!0),a+=m({node:c,pos:u,parent:p,index:d})):c.isText?(a+=(h=c==null?void 0:c.text)===null||h===void 0?void 0:h.slice(Math.max(r,u)-u,o-u),l=!1):c.isBlock&&!l&&(a+=i,l=!0)}),a}function Ql(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,t])=>t.spec.toText).map(([t,e])=>[t,e.spec.toText]))}const fd=yt.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new Ht({key:new ae("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:t,schema:e}=n,{doc:r,selection:o}=t,{from:i,to:s}=o,a=Ql(e);return Xl(r,{from:i,to:s},{textSerializers:a})}}})]}});var pd=Object.freeze({__proto__:null,blur:()=>({editor:n,view:t})=>(requestAnimationFrame(()=>{n.isDestroyed||t.dom.blur()}),!0)}),dd=Object.freeze({__proto__:null,clearContent:(n=!1)=>({commands:t})=>t.setContent("",n)}),hd=Object.freeze({__proto__:null,clearNodes:()=>({state:n,tr:t,dispatch:e})=>{const{selection:r}=t,{ranges:o}=r;return o.forEach(i=>{n.doc.nodesBetween(i.$from.pos,i.$to.pos,(s,a)=>{if(s.type.isText)return;const l=t.doc.resolve(t.mapping.map(a)),c=t.doc.resolve(t.mapping.map(a+s.nodeSize)),u=l.blockRange(c);if(!u)return;const p=wn(u);if(s.type.isTextblock&&e){const{defaultType:d}=l.parent.contentMatchAt(l.index());t.setNodeMarkup(u.start,d)}(p||p===0)&&e&&t.lift(u,p)})}),!0}}),md=Object.freeze({__proto__:null,command:n=>t=>n(t)}),vd=Object.freeze({__proto__:null,createParagraphNear:()=>({state:n,dispatch:t})=>Ia(n,t)});function ft(n,t){if(typeof n=="string"){if(!t.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return t.nodes[n]}return n}var gd=Object.freeze({__proto__:null,deleteNode:n=>({tr:t,state:e,dispatch:r})=>{const o=ft(n,e.schema),i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){const l=i.before(s),c=i.after(s);t.delete(l,c).scrollIntoView()}return!0}return!1}}),yd=Object.freeze({__proto__:null,deleteRange:n=>({tr:t,dispatch:e})=>{const{from:r,to:o}=n;return e&&t.delete(r,o),!0}}),bd=Object.freeze({__proto__:null,deleteSelection:()=>({state:n,dispatch:t})=>si(n,t)}),kd=Object.freeze({__proto__:null,enter:()=>({commands:n})=>n.keyboardShortcut("Enter")}),wd=Object.freeze({__proto__:null,exitCode:()=>({state:n,dispatch:t})=>Va(n,t)});function $e(n,t){if(typeof n=="string"){if(!t.marks[n])throw Error(`There is no mark type named '${n}'. Maybe you forgot to add the extension?`);return t.marks[n]}return n}function ji(n){return Object.prototype.toString.call(n)==="[object RegExp]"}function eo(n,t,e={strict:!0}){const r=Object.keys(t);return r.length?r.every(o=>e.strict?t[o]===n[o]:ji(t[o])?t[o].test(n[o]):t[o]===n[o]):!0}function Wi(n,t,e={}){return n.find(r=>r.type===t&&eo(r.attrs,e))}function Sd(n,t,e={}){return!!Wi(n,t,e)}function Zl(n,t,e={}){if(!n||!t)return;const r=n.parent.childAfter(n.parentOffset);if(!r.node)return;const o=Wi(r.node.marks,t,e);if(!o)return;let i=n.index(),s=n.start()+r.offset,a=i+1,l=s+r.node.nodeSize;for(Wi(r.node.marks,t,e);i>0&&o.isInSet(n.parent.child(i-1).marks);)i-=1,s-=n.parent.child(i).nodeSize;for(;a({tr:e,state:r,dispatch:o})=>{const i=$e(n,r.schema),{doc:s,selection:a}=e,{$from:l,from:c,to:u}=a;if(o){const p=Zl(l,i,t);if(p&&p.from<=c&&p.to>=u){const d=K.create(s,p.from,p.to);e.setSelection(d)}}return!0}}),Md=Object.freeze({__proto__:null,first:n=>t=>{const e=typeof n=="function"?n(t):n;for(let r=0;r({editor:t,view:e,tr:r,dispatch:o})=>{const i=()=>{Ed()&&e.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(e.focus(),t.commands.scrollIntoView())})};if(e.hasFocus()&&n===null||n===!1)return!0;if(o&&n===null&&!tc(t.state.selection))return i(),!0;const{from:s,to:a}=Od(t.state,n)||t.state.selection,{doc:l,storedMarks:c}=r,u=z.atStart(l).from,p=z.atEnd(l).to,d=ln(s,u,p),h=ln(a,u,p),m=K.create(l,d,h),g=t.state.selection.eq(m);return o&&(g||r.setSelection(m),g&&c&&r.setStoredMarks(c),i()),!0}}),Td=Object.freeze({__proto__:null,forEach:(n,t)=>e=>n.every((r,o)=>t(r,Lt(x({},e),{index:o})))}),_d=Object.freeze({__proto__:null,insertContent:(n,t)=>({tr:e,commands:r})=>r.insertContentAt({from:e.selection.from,to:e.selection.to},n,t)});function ec(n){const t=`${n}`;return new window.DOMParser().parseFromString(t,"text/html").body}function no(n,t,e){if(e=x({slice:!0,parseOptions:{}},e),typeof n=="object"&&n!==null)try{return Array.isArray(n)?S.fromArray(n.map(r=>t.nodeFromJSON(r))):t.nodeFromJSON(n)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",r),no("",t,e)}if(typeof n=="string"){const r=se.fromSchema(t);return e.slice?r.parseSlice(ec(n),e.parseOptions).content:r.parse(ec(n),e.parseOptions)}return no("",t,e)}function Ad(n,t,e){const r=n.steps.length-1;if(r{s===0&&(s=u)}),n.setSelection(z.near(n.doc.resolve(s),e))}var Dd=Object.freeze({__proto__:null,insertContentAt:(n,t,e)=>({tr:r,dispatch:o,editor:i})=>{if(o){e=x({parseOptions:{},updateSelection:!0},e);const s=no(t,i.schema,{parseOptions:x({preserveWhitespace:"full"},e.parseOptions)});if(s.toString()==="<>")return!0;let{from:a,to:l}=typeof n=="number"?{from:n,to:n}:n,c=!0;if(s.forEach(u=>{c=c?u.isBlock:!1}),a===l&&c){const u=r.doc.resolve(a);u.parent.isTextblock&&!u.parent.type.spec.code&&!u.parent.textContent&&(a-=1,l+=1)}r.replaceWith(a,l,s),e.updateSelection&&Ad(r,r.steps.length-1,-1)}return!0}}),Rd=Object.freeze({__proto__:null,joinBackward:()=>({state:n,dispatch:t})=>Ea(n,t)}),Vd=Object.freeze({__proto__:null,joinForward:()=>({state:n,dispatch:t})=>Ta(n,t)});const Id=typeof navigator!="undefined"?/Mac/.test(navigator.platform):!1;function Bd(n){const t=n.split(/-(?!$)/);let e=t[t.length-1];e==="Space"&&(e=" ");let r,o,i,s;for(let a=0;a({editor:t,view:e,tr:r,dispatch:o})=>{const i=Bd(n).split(/-(?!$)/),s=i.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{e.someProp("handleKeyDown",c=>c(e,a))});return l==null||l.steps.forEach(c=>{const u=c.map(r.mapping);u&&o&&r.maybeStep(u)}),!0}});function Tn(n,t,e={}){const{from:r,to:o,empty:i}=n.selection,s=t?ft(t,n.schema):null,a=[];n.doc.nodesBetween(r,o,(p,d)=>{if(p.isText)return;const h=Math.max(r,d),m=Math.min(o,d+p.nodeSize);a.push({node:p,from:h,to:m})});const l=o-r,c=a.filter(p=>s?s.name===p.node.type.name:!0).filter(p=>eo(p.node.attrs,e,{strict:!1}));return i?!!c.length:c.reduce((p,d)=>p+d.to-d.from,0)>=l}var zd=Object.freeze({__proto__:null,lift:(n,t={})=>({state:e,dispatch:r})=>{const o=ft(n,e.schema);return Tn(e,o,t)?Da(e,r):!1}}),Ld=Object.freeze({__proto__:null,liftEmptyBlock:()=>({state:n,dispatch:t})=>Ba(n,t)}),Fd=Object.freeze({__proto__:null,liftListItem:n=>({state:t,dispatch:e})=>{const r=ft(n,t.schema);return zf(r)(t,e)}}),Hd=Object.freeze({__proto__:null,newlineInCode:()=>({state:n,dispatch:t})=>Ra(n,t)});function ro(n,t){return t.nodes[n]?"node":t.marks[n]?"mark":null}function nc(n,t){const e=typeof t=="string"?[t]:t;return Object.keys(n).reduce((r,o)=>(e.includes(o)||(r[o]=n[o]),r),{})}var Jd=Object.freeze({__proto__:null,resetAttributes:(n,t)=>({tr:e,state:r,dispatch:o})=>{let i=null,s=null;const a=ro(typeof n=="string"?n:n.name,r.schema);return a?(a==="node"&&(i=ft(n,r.schema)),a==="mark"&&(s=$e(n,r.schema)),o&&e.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{i&&i===c.type&&e.setNodeMarkup(u,void 0,nc(c.attrs,t)),s&&c.marks.length&&c.marks.forEach(p=>{s===p.type&&e.addMark(u,u+c.nodeSize,s.create(nc(p.attrs,t)))})})}),!0):!1}}),$d=Object.freeze({__proto__:null,scrollIntoView:()=>({tr:n,dispatch:t})=>(t&&n.scrollIntoView(),!0)}),qd=Object.freeze({__proto__:null,selectAll:()=>({tr:n,commands:t})=>t.setTextSelection({from:0,to:n.doc.content.size})}),jd=Object.freeze({__proto__:null,selectNodeBackward:()=>({state:n,dispatch:t})=>Oa(n,t)}),Wd=Object.freeze({__proto__:null,selectNodeForward:()=>({state:n,dispatch:t})=>_a(n,t)}),Kd=Object.freeze({__proto__:null,selectParentNode:()=>({state:n,dispatch:t})=>Af(n,t)});function rc(n,t,e={}){return no(n,t,{slice:!1,parseOptions:e})}var Ud=Object.freeze({__proto__:null,setContent:(n,t=!1,e={})=>({tr:r,editor:o,dispatch:i})=>{const{doc:s}=r,a=rc(n,o.schema,e),l=K.create(s,0,s.content.size);return i&&r.setSelection(l).replaceSelectionWith(a,!1).setMeta("preventUpdate",!t),!0}});function oc(n,t){const e=$e(t,n.schema),{from:r,to:o,empty:i}=n.selection,s=[];i?(n.storedMarks&&s.push(...n.storedMarks),s.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,o,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===e.name);return a?x({},a.attrs):{}}var Gd=Object.freeze({__proto__:null,setMark:(n,t={})=>({tr:e,state:r,dispatch:o})=>{const{selection:i}=e,{empty:s,ranges:a}=i,l=$e(n,r.schema);if(o)if(s){const c=oc(r,l);e.addStoredMark(l.create(x(x({},c),t)))}else a.forEach(c=>{const u=c.$from.pos,p=c.$to.pos;r.doc.nodesBetween(u,p,(d,h)=>{const m=Math.max(h,u),g=Math.min(h+d.nodeSize,p);d.marks.find(k=>k.type===l)?d.marks.forEach(k=>{l===k.type&&e.addMark(m,g,l.create(x(x({},k.attrs),t)))}):e.addMark(m,g,l.create(t))})});return!0}}),Yd=Object.freeze({__proto__:null,setMeta:(n,t)=>({tr:e})=>(e.setMeta(n,t),!0)}),Xd=Object.freeze({__proto__:null,setNode:(n,t={})=>({state:e,dispatch:r})=>{const o=ft(n,e.schema);return Vf(o,t)(e,r)}}),Qd=Object.freeze({__proto__:null,setNodeSelection:n=>({tr:t,dispatch:e})=>{if(e){const{doc:r}=t,o=z.atStart(r).from,i=z.atEnd(r).to,s=ln(n,o,i),a=P.create(r,s);t.setSelection(a)}return!0}}),Zd=Object.freeze({__proto__:null,setTextSelection:n=>({tr:t,dispatch:e})=>{if(e){const{doc:r}=t,{from:o,to:i}=typeof n=="number"?{from:n,to:n}:n,s=z.atStart(r).from,a=z.atEnd(r).to,l=ln(o,s,a),c=ln(i,s,a),u=K.create(r,l,c);t.setSelection(u)}return!0}}),th=Object.freeze({__proto__:null,sinkListItem:n=>({state:t,dispatch:e})=>{const r=ft(n,t.schema);return Hf(r)(t,e)}});function oo(n,t,e){return Object.fromEntries(Object.entries(e).filter(([r])=>{const o=n.find(i=>i.type===t&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}function eh(n){for(let t=0;tt==null?void 0:t.includes(o.type.name));n.tr.ensureMarks(r)}}var nh=Object.freeze({__proto__:null,splitBlock:({keepMarks:n=!0}={})=>({tr:t,state:e,dispatch:r,editor:o})=>{const{selection:i,doc:s}=t,{$from:a,$to:l}=i,c=o.extensionManager.attributes,u=oo(c,a.node().type.name,a.node().attrs);if(i instanceof P&&i.node.isBlock)return!a.parentOffset||!Oe(s,a.pos)?!1:(r&&(n&&ic(e,o.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(r){const p=l.parentOffset===l.parent.content.size;i instanceof K&&t.deleteSelection();const d=a.depth===0?void 0:eh(a.node(-1).contentMatchAt(a.indexAfter(-1)));let h=p&&d?[{type:d,attrs:u}]:void 0,m=Oe(t.doc,t.mapping.map(a.pos),1,h);if(!h&&!m&&Oe(t.doc,t.mapping.map(a.pos),1,d?[{type:d}]:void 0)&&(m=!0,h=d?[{type:d,attrs:u}]:void 0),m&&(t.split(t.mapping.map(a.pos),1,h),d&&!p&&!a.parentOffset&&a.parent.type!==d)){const g=t.mapping.map(a.before()),y=t.doc.resolve(g);a.node(-1).canReplaceWith(y.index(),y.index()+1,d)&&t.setNodeMarkup(t.mapping.map(a.before()),d)}n&&ic(e,o.extensionManager.splittableMarks),t.scrollIntoView()}return!0}}),rh=Object.freeze({__proto__:null,splitListItem:n=>({tr:t,state:e,dispatch:r,editor:o})=>{var i;const s=ft(n,e.schema),{$from:a,$to:l}=e.selection,c=e.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;const u=a.node(-1);if(u.type!==s)return!1;const p=o.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let y=S.empty;const k=a.index(-1)?1:a.index(-2)?2:3;for(let A=a.depth-k;A>=a.depth-3;A-=1)y=S.from(a.node(A).copy(y));const b=a.indexAfter(-1){if(C>-1)return!1;A.isTextblock&&A.content.size===0&&(C=I+1)}),C>-1&&t.setSelection(K.near(t.doc.resolve(C))),t.scrollIntoView()}return!0}const d=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,h=oo(p,u.type.name,u.attrs),m=oo(p,a.node().type.name,a.node().attrs);t.delete(a.pos,l.pos);const g=d?[{type:s,attrs:h},{type:d,attrs:m}]:[{type:s,attrs:h}];return Oe(t.doc,a.pos,2)?(r&&t.split(a.pos,2,g).scrollIntoView(),!0):!1}});function oh(n,t){for(let e=n.depth;e>0;e-=1){const r=n.node(e);if(t(r))return{pos:e>0?n.before(e):0,start:n.start(e),depth:e,node:r}}}function ih(n){return t=>oh(t.$from,n)}function io(n){const t=n.filter(o=>o.type==="extension"),e=n.filter(o=>o.type==="node"),r=n.filter(o=>o.type==="mark");return{baseExtensions:t,nodeExtensions:e,markExtensions:r}}function sc(n,t){const{nodeExtensions:e}=io(t),r=e.find(s=>s.name===n);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=L(_(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}var sh=Object.freeze({__proto__:null,toggleList:(n,t)=>({editor:e,tr:r,state:o,dispatch:i,chain:s,commands:a,can:l})=>{const{extensions:c}=e.extensionManager,u=ft(n,o.schema),p=ft(t,o.schema),{selection:d}=o,{$from:h,$to:m}=d,g=h.blockRange(m);if(!g)return!1;const y=ih(b=>sc(b.type.name,c))(d);if(g.depth>=1&&y&&g.depth-y.depth<=1){if(y.node.type===u)return a.liftListItem(p);if(sc(y.node.type.name,c)&&u.validContent(y.node.content)&&i)return r.setNodeMarkup(y.pos,u),!0}return l().wrapInList(u)?a.wrapInList(u):s().clearNodes().wrapInList(u).run()}});function Ui(n,t,e={}){const{empty:r,ranges:o}=n.selection,i=t?$e(t,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(p=>i?i.name===p.type.name:!0).find(p=>eo(p.attrs,e,{strict:!1}));let s=0;const a=[];if(o.forEach(({$from:p,$to:d})=>{const h=p.pos,m=d.pos;n.doc.nodesBetween(h,m,(g,y)=>{if(!g.isText&&!g.marks.length)return;const k=Math.max(h,y),b=Math.min(m,y+g.nodeSize);s+=b-k,a.push(...g.marks.map(v=>({mark:v,from:k,to:b})))})}),s===0)return!1;const l=a.filter(p=>i?i.name===p.mark.type.name:!0).filter(p=>eo(p.mark.attrs,e,{strict:!1})).reduce((p,d)=>p+d.to-d.from,0),c=a.filter(p=>i?p.mark.type!==i&&p.mark.type.excludes(i):!0).reduce((p,d)=>p+d.to-d.from,0);return(l>0?l+c:l)>=s}var ah=Object.freeze({__proto__:null,toggleMark:(n,t={},e={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=e,s=$e(n,r.schema);return Ui(r,s,t)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)}}),lh=Object.freeze({__proto__:null,toggleNode:(n,t,e={})=>({state:r,commands:o})=>{const i=ft(n,r.schema),s=ft(t,r.schema);return Tn(r,i,e)?o.setNode(s):o.setNode(i,e)}}),ch=Object.freeze({__proto__:null,toggleWrap:(n,t={})=>({state:e,dispatch:r})=>{const o=ft(n,e.schema);return Tn(e,o,t)?Da(e,r):za(o,t)(e,r)}}),uh=Object.freeze({__proto__:null,undoInputRule:()=>({state:n,dispatch:t})=>{const e=n.plugins;for(let r=0;r=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(i.text){const l=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,n.schema.text(i.text,l))}else s.delete(i.from,i.to)}return!0}}return!1}}),fh=Object.freeze({__proto__:null,unsetAllMarks:()=>({tr:n,state:t,dispatch:e})=>{const{selection:r}=n,{empty:o,ranges:i}=r;return o||e&&Object.entries(t.schema.marks).forEach(([,s])=>{i.forEach(a=>{n.removeMark(a.$from.pos,a.$to.pos,s)})}),!0}}),ph=Object.freeze({__proto__:null,unsetMark:(n,t={})=>({tr:e,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=e,l=$e(n,r.schema),{$from:c,empty:u,ranges:p}=a;if(!o)return!0;if(u&&s){let{from:d,to:h}=a;const m=(i=c.marks().find(y=>y.type===l))===null||i===void 0?void 0:i.attrs,g=Zl(c,l,m);g&&(d=g.from,h=g.to),e.removeMark(d,h,l)}else p.forEach(d=>{e.removeMark(d.$from.pos,d.$to.pos,l)});return e.removeStoredMark(l),!0}}),dh=Object.freeze({__proto__:null,updateAttributes:(n,t={})=>({tr:e,state:r,dispatch:o})=>{let i=null,s=null;const a=ro(typeof n=="string"?n:n.name,r.schema);return a?(a==="node"&&(i=ft(n,r.schema)),a==="mark"&&(s=$e(n,r.schema)),o&&e.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;r.doc.nodesBetween(c,u,(p,d)=>{i&&i===p.type&&e.setNodeMarkup(d,void 0,x(x({},p.attrs),t)),s&&p.marks.length&&p.marks.forEach(h=>{if(s===h.type){const m=Math.max(d,c),g=Math.min(d+p.nodeSize,u);e.addMark(m,g,s.create(x(x({},h.attrs),t)))}})})}),!0):!1}}),hh=Object.freeze({__proto__:null,wrapIn:(n,t={})=>({state:e,dispatch:r})=>{const o=ft(n,e.schema);return Tn(e,o,t)?!1:za(o,t)(e,r)}}),mh=Object.freeze({__proto__:null,wrapInList:(n,t={})=>({state:e,dispatch:r})=>{const o=ft(n,e.schema);return Bf(o,t)(e,r)}});const vh=yt.create({name:"commands",addCommands(){return x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x({},pd),dd),hd),md),vd),gd),yd),bd),kd),wd),xd),Md),Nd),Td),_d),Dd),Rd),Vd),Pd),zd),Ld),Fd),Hd),Jd),$d),qd),jd),Wd),Kd),Ud),Gd),Yd),Xd),Qd),Zd),th),nh),rh),sh),ah),lh),ch),uh),fh),ph),dh),hh),mh)}}),gh=yt.create({name:"editable",addProseMirrorPlugins(){return[new Ht({key:new ae("editable"),props:{editable:()=>this.editor.options.editable}})]}}),yh=yt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new Ht({key:new ae("focusEvents"),props:{handleDOMEvents:{focus:(t,e)=>{n.isFocused=!0;const r=n.state.tr.setMeta("focus",{event:e}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,e)=>{n.isFocused=!1;const r=n.state.tr.setMeta("blur",{event:e}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),bh=yt.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:e})=>[()=>e.undoInputRule(),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:e})=>[()=>e.deleteSelection(),()=>e.joinForward(),()=>e.selectNodeForward()]);return{Enter:()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()}}}),kh=yt.create({name:"tabindex",addProseMirrorPlugins(){return[new Ht({key:new ae("tabindex"),props:{attributes:{tabindex:"0"}}})]}});var wh=Object.freeze({__proto__:null,ClipboardTextSerializer:fd,Commands:vh,Editable:gh,FocusEvents:yh,Keymap:bh,Tabindex:kh});function Sh(n,t){const e=ft(t,n.schema),{from:r,to:o}=n.selection,i=[];n.doc.nodesBetween(r,o,a=>{i.push(a)});const s=i.reverse().find(a=>a.type.name===e.name);return s?x({},s.attrs):{}}function xh(n,t){const e=ro(typeof t=="string"?t:t.name,n.schema);return e==="node"?Sh(n,t):e==="mark"?oc(n,t):{}}function Mh(n,t,e={}){if(!t)return Tn(n,null,e)||Ui(n,null,e);const r=ro(t,n.schema);return r==="node"?Tn(n,t,e):r==="mark"?Ui(n,t,e):!1}function Ch(n){(n==null?void 0:n.parentNode)&&n.parentNode.removeChild(n)}function Eh(n,t){const e=ht.fromSchema(t).serializeFragment(n),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(e),o.innerHTML}function Oh(n,t){const e={from:0,to:n.content.size};return Xl(n,e,t)}function Nh(n){var t;const e=(t=n.type.createAndFill())===null||t===void 0?void 0:t.toJSON(),r=n.toJSON();return JSON.stringify(e)===JSON.stringify(r)}function Th(n){const t=document.querySelector("style[data-tiptap-style]");if(t!==null)return t;const e=document.createElement("style");return e.setAttribute("data-tiptap-style",""),e.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(e),e}function Gi(n){const{state:t,transaction:e}=n;let{selection:r}=e,{doc:o}=e,{storedMarks:i}=e;return Lt(x({},t),{schema:t.schema,plugins:t.plugins,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=e.selection,o=e.doc,i=e.storedMarks,e}})}class Yi{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:r}=this,{view:o}=e,{tr:i}=r,s=this.buildProps(i);return Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...u)=>{const p=l(...u)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(i),p}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,a=[],l=!!t,c=t||i.tr,u=()=>(!l&&e&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),a.every(d=>d===!0)),p=Lt(x({},Object.fromEntries(Object.entries(r).map(([d,h])=>[d,(...g)=>{const y=this.buildProps(c,e),k=h(...g)(y);return a.push(k),p}]))),{run:u});return p}createCan(t){const{rawCommands:e,state:r}=this,o=void 0,i=t||r.tr,s=this.buildProps(i,o),a=Object.fromEntries(Object.entries(e).map(([l,c])=>[l,(...u)=>c(...u)(Lt(x({},s),{dispatch:o}))]));return Lt(x({},a),{chain:()=>this.createChain(i,o)})}buildProps(t,e=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o;i.storedMarks&&t.setStoredMarks(i.storedMarks);const a={tr:t,editor:o,view:s,state:Gi({state:i,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}class so{constructor(t){this.find=t.find,this.handler=t.handler}}const _h=(n,t)=>{if(ji(t))return t.exec(n);const e=t(n);if(!e)return null;const r=[];return r.push(e.text),r.index=e.index,r.input=n,r.data=e.data,e.replaceWith&&(e.text.includes(e.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(e.replaceWith)),r};function Xi(n){var t;const{editor:e,from:r,to:o,text:i,rules:s,plugin:a}=n,{view:l}=e;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||!!((t=c.nodeBefore||c.nodeAfter)===null||t===void 0?void 0:t.marks.find(h=>h.type.spec.code)))return!1;let u=!1;const p=500,d=c.parent.textBetween(Math.max(0,c.parentOffset-p),c.parentOffset,void 0,"\uFFFC")+i;return s.forEach(h=>{if(u)return;const m=_h(d,h.find);if(!m)return;const g=l.state.tr,y=Gi({state:l.state,transaction:g}),k={from:r-(m[0].length-i.length),to:o},{commands:b,chain:N,can:v}=new Yi({editor:e,state:y});h.handler({state:y,range:k,match:m,commands:b,chain:N,can:v}),!!g.steps.length&&(g.setMeta(a,{transform:g,from:r,to:o,text:i}),l.dispatch(g),u=!0)}),u}function Ah(n){const{editor:t,rules:e}=n,r=new Ht({state:{init(){return null},apply(o,i){const s=o.getMeta(this);return s||(o.selectionSet||o.docChanged?null:i)}},props:{handleTextInput(o,i,s,a){return Xi({editor:t,from:i,to:s,text:a,rules:e,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&Xi({editor:t,from:i.pos,to:i.pos,text:"",rules:e,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:s}=o.state.selection;return s?Xi({editor:t,from:s.pos,to:s.pos,text:` +`,rules:e,plugin:r}):!1}},isInputRules:!0});return r}function Dh(n){return typeof n=="number"}class Rh{constructor(t){this.find=t.find,this.handler=t.handler}}const Vh=(n,t)=>{if(ji(t))return[...n.matchAll(t)];const e=t(n);return e?e.map(r=>{const o=[];return o.push(r.text),o.index=r.index,o.input=n,o.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(r.replaceWith)),o}):[]};function Ih(n){const{editor:t,state:e,from:r,to:o,rules:i}=n,{commands:s,chain:a,can:l}=new Yi({editor:t,state:e});e.doc.nodesBetween(r,o,(c,u)=>{if(!c.isTextblock||c.type.spec.code)return;const p=Math.max(r,u),d=Math.min(o,u+c.content.size),h=c.textBetween(p-u,d-u,void 0,"\uFFFC");i.forEach(m=>{Vh(h,m.find).forEach(y=>{if(y.index===void 0)return;const k=p+y.index+1,b=k+y[0].length,N={from:e.tr.mapping.map(k),to:e.tr.mapping.map(b)};m.handler({state:e,range:N,match:y,commands:s,chain:a,can:l})})})})}function Bh(n){const{editor:t,rules:e}=n;let r=!1;const o=new Ht({props:{handlePaste:(i,s)=>{var a;const l=(a=s.clipboardData)===null||a===void 0?void 0:a.getData("text/html");return r=!!(l==null?void 0:l.includes("data-pm-slice")),!1}},appendTransaction:(i,s,a)=>{const l=i[0];if(!l.getMeta("paste")||r)return;const{doc:c,before:u}=l,p=u.content.findDiffStart(c.content),d=u.content.findDiffEnd(c.content);if(!Dh(p)||!d||p===d.b)return;const h=a.tr,m=Gi({state:a,transaction:h});if(Ih({editor:t,state:m,from:Math.max(p-1,0),to:d.b,rules:e,plugin:o}),!!h.steps.length)return h},isPasteRules:!0});return o}function ac(n){const t=[],{nodeExtensions:e,markExtensions:r}=io(n),o=[...e,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0};return n.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},l=_(s,"addGlobalAttributes",a);if(!l)return;l().forEach(u=>{u.types.forEach(p=>{Object.entries(u.attributes).forEach(([d,h])=>{t.push({type:p,name:d,attribute:x(x({},i),h)})})})})}),o.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},l=_(s,"addAttributes",a);if(!l)return;const c=l();Object.entries(c).forEach(([u,p])=>{t.push({type:s.name,name:u,attribute:x(x({},i),p)})})}),t}function pt(...n){return n.filter(t=>!!t).reduce((t,e)=>{const r=x({},t);return Object.entries(e).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}o==="class"?r[o]=[r[o],i].join(" "):o==="style"?r[o]=[r[o],i].join("; "):r[o]=i}),r},{})}function Qi(n,t){return t.filter(e=>e.attribute.rendered).map(e=>e.attribute.renderHTML?e.attribute.renderHTML(n.attrs)||{}:{[e.name]:n.attrs[e.name]}).reduce((e,r)=>pt(e,r),{})}function Ph(n={}){return Object.keys(n).length===0&&n.constructor===Object}function zh(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function lc(n,t){return n.style?n:Lt(x({},n),{getAttrs:e=>{const r=n.getAttrs?n.getAttrs(e):n.attrs;if(r===!1)return!1;const o=t.filter(i=>i.attribute.rendered).reduce((i,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(e):zh(e.getAttribute(s.name));return Ki(a)&&console.warn(`[tiptap warn]: BREAKING CHANGE: "parseHTML" for your attribute "${s.name}" returns an object but should return the value itself. If this is expected you can ignore this message. This warning will be removed in one of the next releases. Further information: https://github.com/ueberdosis/tiptap/issues/1863`),a==null?i:Lt(x({},i),{[s.name]:a})},{});return x(x({},r),o)}})}function cc(n){return Object.fromEntries(Object.entries(n).filter(([t,e])=>t==="attrs"&&Ph(e)?!1:e!=null))}function Lh(n){var t;const e=ac(n),{nodeExtensions:r,markExtensions:o}=io(n),i=(t=r.find(l=>_(l,"topNode")))===null||t===void 0?void 0:t.name,s=Object.fromEntries(r.map(l=>{const c=e.filter(y=>y.type===l.name),u={name:l.name,options:l.options,storage:l.storage},p=n.reduce((y,k)=>{const b=_(k,"extendNodeSchema",u);return x(x({},y),b?b(l):{})},{}),d=cc(Lt(x({},p),{content:L(_(l,"content",u)),marks:L(_(l,"marks",u)),group:L(_(l,"group",u)),inline:L(_(l,"inline",u)),atom:L(_(l,"atom",u)),selectable:L(_(l,"selectable",u)),draggable:L(_(l,"draggable",u)),code:L(_(l,"code",u)),defining:L(_(l,"defining",u)),isolating:L(_(l,"isolating",u)),attrs:Object.fromEntries(c.map(y=>{var k;return[y.name,{default:(k=y==null?void 0:y.attribute)===null||k===void 0?void 0:k.default}]}))})),h=L(_(l,"parseHTML",u));h&&(d.parseDOM=h.map(y=>lc(y,c)));const m=_(l,"renderHTML",u);m&&(d.toDOM=y=>m({node:y,HTMLAttributes:Qi(y,c)}));const g=_(l,"renderText",u);return g&&(d.toText=g),[l.name,d]})),a=Object.fromEntries(o.map(l=>{const c=e.filter(g=>g.type===l.name),u={name:l.name,options:l.options,storage:l.storage},p=n.reduce((g,y)=>{const k=_(y,"extendMarkSchema",u);return x(x({},g),k?k(l):{})},{}),d=cc(Lt(x({},p),{inclusive:L(_(l,"inclusive",u)),excludes:L(_(l,"excludes",u)),group:L(_(l,"group",u)),spanning:L(_(l,"spanning",u)),code:L(_(l,"code",u)),attrs:Object.fromEntries(c.map(g=>{var y;return[g.name,{default:(y=g==null?void 0:g.attribute)===null||y===void 0?void 0:y.default}]}))})),h=L(_(l,"parseHTML",u));h&&(d.parseDOM=h.map(g=>lc(g,c)));const m=_(l,"renderHTML",u);return m&&(d.toDOM=g=>m({mark:g,HTMLAttributes:Qi(g,c)})),[l.name,d]}));return new en({topNode:i,nodes:s,marks:a})}function Zi(n,t){return t.nodes[n]||t.marks[n]||null}function Fh(n){const t=n.filter((e,r)=>n.indexOf(e)!==r);return[...new Set(t)]}class _n{constructor(t,e){this.splittableMarks=[],this.editor=e,this.extensions=_n.resolve(t),this.schema=Lh(this.extensions),this.extensions.forEach(r=>{var o;this.editor.extensionStorage[r.name]=r.storage;const i={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:Zi(r.name,this.schema)};r.type==="mark"&&((o=L(_(r,"keepOnSplit",i)))!==null&&o!==void 0?o:!0)&&this.splittableMarks.push(r.name);const s=_(r,"onBeforeCreate",i);s&&this.editor.on("beforeCreate",s);const a=_(r,"onCreate",i);a&&this.editor.on("create",a);const l=_(r,"onUpdate",i);l&&this.editor.on("update",l);const c=_(r,"onSelectionUpdate",i);c&&this.editor.on("selectionUpdate",c);const u=_(r,"onTransaction",i);u&&this.editor.on("transaction",u);const p=_(r,"onFocus",i);p&&this.editor.on("focus",p);const d=_(r,"onBlur",i);d&&this.editor.on("blur",d);const h=_(r,"onDestroy",i);h&&this.editor.on("destroy",h)})}static resolve(t){const e=_n.sort(_n.flatten(t)),r=Fh(e.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),e}static flatten(t){return t.map(e=>{const r={name:e.name,options:e.options,storage:e.storage},o=_(e,"addExtensions",r);return o?[e,...this.flatten(o())]:e}).flat(10)}static sort(t){const e=100;return t.sort((r,o)=>{const i=_(r,"priority")||e,s=_(o,"priority")||e;return i>s?-1:i{const r={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:Zi(e.name,this.schema)},o=_(e,"addCommands",r);return o?x(x({},t),o()):t},{})}get plugins(){const{editor:t}=this,e=_n.sort([...this.extensions].reverse()),r=[],o=[],i=e.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:t,type:Zi(s.name,this.schema)},l=[],c=_(s,"addKeyboardShortcuts",a);if(c){const h=Object.fromEntries(Object.entries(c()).map(([g,y])=>[g,()=>y({editor:t})])),m=cd(h);l.push(m)}const u=_(s,"addInputRules",a);t.options.enableInputRules&&u&&r.push(...u());const p=_(s,"addPasteRules",a);t.options.enablePasteRules&&p&&o.push(...p());const d=_(s,"addProseMirrorPlugins",a);if(d){const h=d();l.push(...h)}return l}).flat();return[Ah({editor:t,rules:r}),Bh({editor:t,rules:o}),...i]}get attributes(){return ac(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=io(this.extensions);return Object.fromEntries(e.filter(r=>!!_(r,"addNodeView")).map(r=>{const o=this.attributes.filter(l=>l.type===r.name),i={name:r.name,options:r.options,storage:r.storage,editor:t,type:ft(r.name,this.schema)},s=_(r,"addNodeView",i);if(!s)return[];const a=(l,c,u,p)=>{const d=Qi(l,o);return s()({editor:t,node:l,getPos:u,decorations:p,HTMLAttributes:d,extension:r})};return[r.name,a]}))}}class Hh{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const r=this.callbacks[t];return r&&r.forEach(o=>o.apply(this,e)),this}off(t,e){const r=this.callbacks[t];return r&&(e?this.callbacks[t]=r.filter(o=>o!==e):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}const Jh=`.ProseMirror { + position: relative; +} + +.ProseMirror { + word-wrap: break-word; + white-space: pre-wrap; + white-space: break-spaces; + -webkit-font-variant-ligatures: none; + font-variant-ligatures: none; + font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ +} + +.ProseMirror [contenteditable="false"] { + white-space: normal; +} + +.ProseMirror [contenteditable="false"] [contenteditable="true"] { + white-space: pre-wrap; +} + +.ProseMirror pre { + white-space: pre-wrap; +} + +img.ProseMirror-separator { + display: inline !important; + border: none !important; + margin: 0 !important; + width: 1px !important; + height: 1px !important; +} + +.ProseMirror-gapcursor { + display: none; + pointer-events: none; + position: absolute; +} + +.ProseMirror-gapcursor:after { + content: ""; + display: block; + position: absolute; + top: -2px; + width: 20px; + border-top: 1px solid black; + animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; +} + +@keyframes ProseMirror-cursor-blink { + to { + visibility: hidden; + } +} + +.ProseMirror-hideselection *::selection { + background: transparent; +} + +.ProseMirror-hideselection *::-moz-selection { + background: transparent; +} + +.ProseMirror-hideselection * { + caret-color: transparent; +} + +.ProseMirror-focused .ProseMirror-gapcursor { + display: block; +} + +.tippy-box[data-animation=fade][data-state=hidden] { + opacity: 0 +}`;class $h extends Hh{constructor(t={}){super();this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=Th(Jh))}setOptions(t={}){this.options=x(x({},this.options),t),!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t){this.setOptions({editable:t})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,e){const r=Yl(e)?e(t,this.state.plugins):[...this.state.plugins,t],o=this.state.reconfigure({plugins:r});this.view.updateState(o)}unregisterPlugin(t){if(this.isDestroyed)return;const e=typeof t=="string"?`${t}$`:t.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(o=>!o.key.startsWith(e))});this.view.updateState(r)}createExtensionManager(){const e=[...this.options.enableCoreExtensions?Object.values(wh):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r==null?void 0:r.type));this.extensionManager=new _n(e,this)}createCommandManager(){this.commandManager=new Yi({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){this.view=new ct(this.options.element,Lt(x({},this.options.editorProps),{dispatchTransaction:this.dispatchTransaction.bind(this),state:Et.create({doc:rc(this.options.content,this.schema,this.options.parseOptions)})}));const t=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(t),this.createNodeViews();const e=this.view.dom;e.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(s=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(s)});return}const e=this.state.apply(t),r=!this.state.selection.eq(e.selection);this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const o=t.getMeta("focus"),i=t.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:t}),i&&this.emit("blur",{editor:this,event:i.event,transaction:t}),!(!t.docChanged||t.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return xh(this.state,t)}isActive(t,e){const r=typeof t=="string"?t:null,o=typeof t=="string"?e:t;return Mh(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Eh(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=` + +`,textSerializers:r={}}=t||{};return Oh(this.state.doc,{blockSeparator:e,textSerializers:x(x({},r),Ql(this.schema))})}get isEmpty(){return Nh(this.state.doc)}getCharacterCount(){return this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners(),Ch(this.css)}get isDestroyed(){var t;return!((t=this.view)===null||t===void 0?void 0:t.docView)}}class bt{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=x(x({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=L(_(this,"addOptions",{name:this.name}))),this.storage=L(_(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new bt(t)}configure(t={}){const e=this.extend();return e.options=to(this.options,t),e.storage=L(_(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new bt(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=t.defaultOptions?t.defaultOptions:e.parent.options,t.addOptions&&(e.options=L(_(e,"addOptions",{name:e.name}))),e.storage=L(_(e,"addStorage",{name:e.name,options:e.options})),e}}class qe{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=x(x({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=L(_(this,"addOptions",{name:this.name}))),this.storage=L(_(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new qe(t)}configure(t={}){const e=this.extend();return e.options=to(this.options,t),e.storage=L(_(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new qe(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=t.defaultOptions?t.defaultOptions:e.parent.options,t.addOptions&&(e.options=L(_(e,"addOptions",{name:e.name}))),e.storage=L(_(e,"addStorage",{name:e.name,options:e.options})),e}}function uc(n){return new so({find:n.find,handler:({state:t,range:e,match:r})=>{const o=L(n.getAttributes,void 0,r)||{},{tr:i}=t,s=e.from;let a=e.to;if(r[1]){const l=r[0].lastIndexOf(r[1]);let c=s+l;c>a?c=a:a=c+r[1].length;const u=r[0][r[0].length-1];i.insertText(u,s+r[0].length-1),i.replaceWith(c,a,n.type.create(o))}else r[0]&&i.replaceWith(s,a,n.type.create(o))}})}function fc(n,t,e){const r=[];return e.doc.nodesBetween(n,t,(o,i)=>{r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}function An(n){return new so({find:n.find,handler:({state:t,range:e,match:r})=>{const o=L(n.getAttributes,void 0,r);if(o===!1||o===null)return;const{tr:i}=t,s=r[r.length-1],a=r[0];let l=e.to;if(s){const c=a.search(/\S/),u=e.from+a.indexOf(s),p=u+s.length;if(fc(e.from,e.to,t).filter(h=>h.mark.type.excluded.find(g=>g===n.type&&g!==h.mark.type)).filter(h=>h.to>u).length)return null;pe.from&&i.delete(e.from+c,u),l=e.from+c+s.length,i.addMark(e.from+c,l,n.type.create(o||{})),i.removeStoredMark(n.type)}}})}function ts(n){return new so({find:n.find,handler:({state:t,range:e,match:r})=>{const o=t.doc.resolve(e.from),i=L(n.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),n.type))return null;t.tr.delete(e.from,e.to).setBlockType(e.from,e.from,n.type,i)}})}function ao(n){return new so({find:n.find,handler:({state:t,range:e,match:r})=>{const o=L(n.getAttributes,void 0,r)||{},i=t.tr.delete(e.from,e.to),a=i.doc.resolve(e.from).blockRange(),l=a&&Xo(a,n.type,o);if(!l)return null;i.wrap(a,l);const c=i.doc.resolve(e.from-1).nodeBefore;c&&c.type===n.type&&Qo(i.doc,e.from-1)&&(!n.joinPredicate||n.joinPredicate(r,c))&&i.join(e.from-1)}})}function Dn(n){return new Rh({find:n.find,handler:({state:t,range:e,match:r})=>{const o=L(n.getAttributes,void 0,r);if(o===!1||o===null)return;const{tr:i}=t,s=r[r.length-1],a=r[0];let l=e.to;if(s){const c=a.search(/\S/),u=e.from+a.indexOf(s),p=u+s.length;if(fc(e.from,e.to,t).filter(h=>h.mark.type.excluded.find(g=>g===n.type&&g!==h.mark.type)).filter(h=>h.to>u).length)return null;pe.from&&i.delete(e.from+c,u),l=e.from+c+s.length,i.addMark(e.from+c,l,n.type.create(o||{})),i.removeStoredMark(n.type)}}})}function qh(n){return Ki(n)&&n instanceof P}function pc(n,t,e){const r=0,o=n.state.doc.content.size,i=ln(t,r,o),s=ln(e,r,o),a=n.coordsAtPos(i),l=n.coordsAtPos(s,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),p=Math.min(a.left,l.left),d=Math.max(a.right,l.right),h=d-p,m=u-c,k={top:c,bottom:u,left:p,right:d,width:h,height:m,x:p,y:c};return Lt(x({},k),{toJSON:()=>k})}var Wt="top",ee="bottom",ne="right",Kt="left",es="auto",cr=[Wt,ee,ne,Kt],Rn="start",ur="end",jh="clippingParents",dc="viewport",fr="popper",Wh="reference",hc=cr.reduce(function(n,t){return n.concat([t+"-"+Rn,t+"-"+ur])},[]),mc=[].concat(cr,[es]).reduce(function(n,t){return n.concat([t,t+"-"+Rn,t+"-"+ur])},[]),Kh="beforeRead",Uh="read",Gh="afterRead",Yh="beforeMain",Xh="main",Qh="afterMain",Zh="beforeWrite",tm="write",em="afterWrite",nm=[Kh,Uh,Gh,Yh,Xh,Qh,Zh,tm,em];function ge(n){return n?(n.nodeName||"").toLowerCase():null}function ue(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var t=n.ownerDocument;return t&&t.defaultView||window}return n}function pr(n){var t=ue(n).Element;return n instanceof t||n instanceof Element}function re(n){var t=ue(n).HTMLElement;return n instanceof t||n instanceof HTMLElement}function vc(n){if(typeof ShadowRoot=="undefined")return!1;var t=ue(n).ShadowRoot;return n instanceof t||n instanceof ShadowRoot}function rm(n){var t=n.state;Object.keys(t.elements).forEach(function(e){var r=t.styles[e]||{},o=t.attributes[e]||{},i=t.elements[e];!re(i)||!ge(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var a=o[s];a===!1?i.removeAttribute(s):i.setAttribute(s,a===!0?"":a)}))})}function om(n){var t=n.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:e[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!re(o)||!ge(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}var gc={name:"applyStyles",enabled:!0,phase:"write",fn:rm,effect:om,requires:["computeStyles"]};function ye(n){return n.split("-")[0]}function Vn(n,t){var e=n.getBoundingClientRect(),r=1,o=1;return{width:e.width/r,height:e.height/o,top:e.top/o,right:e.right/r,bottom:e.bottom/o,left:e.left/r,x:e.left/r,y:e.top/o}}function ns(n){var t=Vn(n),e=n.offsetWidth,r=n.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:n.offsetLeft,y:n.offsetTop,width:e,height:r}}function yc(n,t){var e=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(e&&vc(e)){var r=t;do{if(r&&n.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function _e(n){return ue(n).getComputedStyle(n)}function im(n){return["table","td","th"].indexOf(ge(n))>=0}function je(n){return((pr(n)?n.ownerDocument:n.document)||window.document).documentElement}function lo(n){return ge(n)==="html"?n:n.assignedSlot||n.parentNode||(vc(n)?n.host:null)||je(n)}function bc(n){return!re(n)||_e(n).position==="fixed"?null:n.offsetParent}function sm(n){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,e=navigator.userAgent.indexOf("Trident")!==-1;if(e&&re(n)){var r=_e(n);if(r.position==="fixed")return null}for(var o=lo(n);re(o)&&["html","body"].indexOf(ge(o))<0;){var i=_e(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function dr(n){for(var t=ue(n),e=bc(n);e&&im(e)&&_e(e).position==="static";)e=bc(e);return e&&(ge(e)==="html"||ge(e)==="body"&&_e(e).position==="static")?t:e||sm(n)||t}function rs(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}var We=Math.max,hr=Math.min,co=Math.round;function uo(n,t,e){return We(n,hr(t,e))}function kc(){return{top:0,right:0,bottom:0,left:0}}function wc(n){return Object.assign({},kc(),n)}function Sc(n,t){return t.reduce(function(e,r){return e[r]=n,e},{})}var am=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,wc(typeof t!="number"?t:Sc(t,cr))};function lm(n){var t,e=n.state,r=n.name,o=n.options,i=e.elements.arrow,s=e.modifiersData.popperOffsets,a=ye(e.placement),l=rs(a),c=[Kt,ne].indexOf(a)>=0,u=c?"height":"width";if(!(!i||!s)){var p=am(o.padding,e),d=ns(i),h=l==="y"?Wt:Kt,m=l==="y"?ee:ne,g=e.rects.reference[u]+e.rects.reference[l]-s[l]-e.rects.popper[u],y=s[l]-e.rects.reference[l],k=dr(i),b=k?l==="y"?k.clientHeight||0:k.clientWidth||0:0,N=g/2-y/2,v=p[h],O=b-d[u]-p[m],C=b/2-d[u]/2+N,A=uo(v,C,O),I=l;e.modifiersData[r]=(t={},t[I]=A,t.centerOffset=A-C,t)}}function cm(n){var t=n.state,e=n.options,r=e.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||!yc(t.elements.popper,o)||(t.elements.arrow=o))}var um={name:"arrow",enabled:!0,phase:"main",fn:lm,effect:cm,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function In(n){return n.split("-")[1]}var fm={top:"auto",right:"auto",bottom:"auto",left:"auto"};function pm(n){var t=n.x,e=n.y,r=window,o=r.devicePixelRatio||1;return{x:co(co(t*o)/o)||0,y:co(co(e*o)/o)||0}}function xc(n){var t,e=n.popper,r=n.popperRect,o=n.placement,i=n.variation,s=n.offsets,a=n.position,l=n.gpuAcceleration,c=n.adaptive,u=n.roundOffsets,p=u===!0?pm(s):typeof u=="function"?u(s):s,d=p.x,h=d===void 0?0:d,m=p.y,g=m===void 0?0:m,y=s.hasOwnProperty("x"),k=s.hasOwnProperty("y"),b=Kt,N=Wt,v=window;if(c){var O=dr(e),C="clientHeight",A="clientWidth";O===ue(e)&&(O=je(e),_e(O).position!=="static"&&a==="absolute"&&(C="scrollHeight",A="scrollWidth")),O=O,(o===Wt||(o===Kt||o===ne)&&i===ur)&&(N=ee,g-=O[C]-r.height,g*=l?1:-1),(o===Kt||(o===Wt||o===ee)&&i===ur)&&(b=ne,h-=O[A]-r.width,h*=l?1:-1)}var I=Object.assign({position:a},c&&fm);if(l){var V;return Object.assign({},I,(V={},V[N]=k?"0":"",V[b]=y?"0":"",V.transform=(v.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",V))}return Object.assign({},I,(t={},t[N]=k?g+"px":"",t[b]=y?h+"px":"",t.transform="",t))}function dm(n){var t=n.state,e=n.options,r=e.gpuAcceleration,o=r===void 0?!0:r,i=e.adaptive,s=i===void 0?!0:i,a=e.roundOffsets,l=a===void 0?!0:a,c={placement:ye(t.placement),variation:In(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,xc(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,xc(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var hm={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:dm,data:{}},fo={passive:!0};function mm(n){var t=n.state,e=n.instance,r=n.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,a=s===void 0?!0:s,l=ue(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",e.update,fo)}),a&&l.addEventListener("resize",e.update,fo),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",e.update,fo)}),a&&l.removeEventListener("resize",e.update,fo)}}var vm={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:mm,data:{}},gm={left:"right",right:"left",bottom:"top",top:"bottom"};function po(n){return n.replace(/left|right|bottom|top/g,function(t){return gm[t]})}var ym={start:"end",end:"start"};function Mc(n){return n.replace(/start|end/g,function(t){return ym[t]})}function is(n){var t=ue(n),e=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:e,scrollTop:r}}function ss(n){return Vn(je(n)).left+is(n).scrollLeft}function bm(n){var t=ue(n),e=je(n),r=t.visualViewport,o=e.clientWidth,i=e.clientHeight,s=0,a=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,a=r.offsetTop)),{width:o,height:i,x:s+ss(n),y:a}}function km(n){var t,e=je(n),r=is(n),o=(t=n.ownerDocument)==null?void 0:t.body,i=We(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=We(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+ss(n),l=-r.scrollTop;return _e(o||e).direction==="rtl"&&(a+=We(e.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}function as(n){var t=_e(n),e=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+o+r)}function Cc(n){return["html","body","#document"].indexOf(ge(n))>=0?n.ownerDocument.body:re(n)&&as(n)?n:Cc(lo(n))}function mr(n,t){var e;t===void 0&&(t=[]);var r=Cc(n),o=r===((e=n.ownerDocument)==null?void 0:e.body),i=ue(r),s=o?[i].concat(i.visualViewport||[],as(r)?r:[]):r,a=t.concat(s);return o?a:a.concat(mr(lo(s)))}function ls(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function wm(n){var t=Vn(n);return t.top=t.top+n.clientTop,t.left=t.left+n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top,t}function Ec(n,t){return t===dc?ls(bm(n)):re(t)?wm(t):ls(km(je(n)))}function Sm(n){var t=mr(lo(n)),e=["absolute","fixed"].indexOf(_e(n).position)>=0,r=e&&re(n)?dr(n):n;return pr(r)?t.filter(function(o){return pr(o)&&yc(o,r)&&ge(o)!=="body"}):[]}function xm(n,t,e){var r=t==="clippingParents"?Sm(n):[].concat(t),o=[].concat(r,[e]),i=o[0],s=o.reduce(function(a,l){var c=Ec(n,l);return a.top=We(c.top,a.top),a.right=hr(c.right,a.right),a.bottom=hr(c.bottom,a.bottom),a.left=We(c.left,a.left),a},Ec(n,i));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Oc(n){var t=n.reference,e=n.element,r=n.placement,o=r?ye(r):null,i=r?In(r):null,s=t.x+t.width/2-e.width/2,a=t.y+t.height/2-e.height/2,l;switch(o){case Wt:l={x:s,y:t.y-e.height};break;case ee:l={x:s,y:t.y+t.height};break;case ne:l={x:t.x+t.width,y:a};break;case Kt:l={x:t.x-e.width,y:a};break;default:l={x:t.x,y:t.y}}var c=o?rs(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case Rn:l[c]=l[c]-(t[u]/2-e[u]/2);break;case ur:l[c]=l[c]+(t[u]/2-e[u]/2);break}}return l}function vr(n,t){t===void 0&&(t={});var e=t,r=e.placement,o=r===void 0?n.placement:r,i=e.boundary,s=i===void 0?jh:i,a=e.rootBoundary,l=a===void 0?dc:a,c=e.elementContext,u=c===void 0?fr:c,p=e.altBoundary,d=p===void 0?!1:p,h=e.padding,m=h===void 0?0:h,g=wc(typeof m!="number"?m:Sc(m,cr)),y=u===fr?Wh:fr,k=n.rects.popper,b=n.elements[d?y:u],N=xm(pr(b)?b:b.contextElement||je(n.elements.popper),s,l),v=Vn(n.elements.reference),O=Oc({reference:v,element:k,strategy:"absolute",placement:o}),C=ls(Object.assign({},k,O)),A=u===fr?C:v,I={top:N.top-A.top+g.top,bottom:A.bottom-N.bottom+g.bottom,left:N.left-A.left+g.left,right:A.right-N.right+g.right},V=n.modifiersData.offset;if(u===fr&&V){var F=V[o];Object.keys(I).forEach(function(st){var et=[ne,ee].indexOf(st)>=0?1:-1,U=[Wt,ee].indexOf(st)>=0?"y":"x";I[st]+=F[U]*et})}return I}function Mm(n,t){t===void 0&&(t={});var e=t,r=e.placement,o=e.boundary,i=e.rootBoundary,s=e.padding,a=e.flipVariations,l=e.allowedAutoPlacements,c=l===void 0?mc:l,u=In(r),p=u?a?hc:hc.filter(function(m){return In(m)===u}):cr,d=p.filter(function(m){return c.indexOf(m)>=0});d.length===0&&(d=p);var h=d.reduce(function(m,g){return m[g]=vr(n,{placement:g,boundary:o,rootBoundary:i,padding:s})[ye(g)],m},{});return Object.keys(h).sort(function(m,g){return h[m]-h[g]})}function Cm(n){if(ye(n)===es)return[];var t=po(n);return[Mc(n),t,Mc(t)]}function Em(n){var t=n.state,e=n.options,r=n.name;if(!t.modifiersData[r]._skip){for(var o=e.mainAxis,i=o===void 0?!0:o,s=e.altAxis,a=s===void 0?!0:s,l=e.fallbackPlacements,c=e.padding,u=e.boundary,p=e.rootBoundary,d=e.altBoundary,h=e.flipVariations,m=h===void 0?!0:h,g=e.allowedAutoPlacements,y=t.options.placement,k=ye(y),b=k===y,N=l||(b||!m?[po(y)]:Cm(y)),v=[y].concat(N).reduce(function(Me,Yt){return Me.concat(ye(Yt)===es?Mm(t,{placement:Yt,boundary:u,rootBoundary:p,padding:c,flipVariations:m,allowedAutoPlacements:g}):Yt)},[]),O=t.rects.reference,C=t.rects.popper,A=new Map,I=!0,V=v[0],F=0;F=0,Z=Nt?"width":"height",X=vr(t,{placement:st,boundary:u,rootBoundary:p,altBoundary:d,padding:c}),Tt=Nt?U?ne:Kt:U?ee:Wt;O[Z]>C[Z]&&(Tt=po(Tt));var _t=po(Tt),De=[];if(i&&De.push(X[et]<=0),a&&De.push(X[Tt]<=0,X[_t]<=0),De.every(function(Me){return Me})){V=st,I=!1;break}A.set(st,De)}if(I)for(var xe=m?3:1,hn=function(Yt){var Xe=v.find(function(Tr){var Qe=A.get(Tr);if(Qe)return Qe.slice(0,Yt).every(function($n){return $n})});if(Xe)return V=Xe,"break"},de=xe;de>0;de--){var mn=hn(de);if(mn==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}var Om={name:"flip",enabled:!0,phase:"main",fn:Em,requiresIfExists:["offset"],data:{_skip:!1}};function Nc(n,t,e){return e===void 0&&(e={x:0,y:0}),{top:n.top-t.height-e.y,right:n.right-t.width+e.x,bottom:n.bottom-t.height+e.y,left:n.left-t.width-e.x}}function Tc(n){return[Wt,ne,ee,Kt].some(function(t){return n[t]>=0})}function Nm(n){var t=n.state,e=n.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=vr(t,{elementContext:"reference"}),a=vr(t,{altBoundary:!0}),l=Nc(s,r),c=Nc(a,o,i),u=Tc(l),p=Tc(c);t.modifiersData[e]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}var Tm={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Nm};function _m(n,t,e){var r=ye(n),o=[Kt,Wt].indexOf(r)>=0?-1:1,i=typeof e=="function"?e(Object.assign({},t,{placement:n})):e,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[Kt,ne].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function Am(n){var t=n.state,e=n.options,r=n.name,o=e.offset,i=o===void 0?[0,0]:o,s=mc.reduce(function(u,p){return u[p]=_m(p,t.rects,i),u},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}var Dm={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Am};function Rm(n){var t=n.state,e=n.name;t.modifiersData[e]=Oc({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Vm={name:"popperOffsets",enabled:!0,phase:"read",fn:Rm,data:{}};function Im(n){return n==="x"?"y":"x"}function Bm(n){var t=n.state,e=n.options,r=n.name,o=e.mainAxis,i=o===void 0?!0:o,s=e.altAxis,a=s===void 0?!1:s,l=e.boundary,c=e.rootBoundary,u=e.altBoundary,p=e.padding,d=e.tether,h=d===void 0?!0:d,m=e.tetherOffset,g=m===void 0?0:m,y=vr(t,{boundary:l,rootBoundary:c,padding:p,altBoundary:u}),k=ye(t.placement),b=In(t.placement),N=!b,v=rs(k),O=Im(v),C=t.modifiersData.popperOffsets,A=t.rects.reference,I=t.rects.popper,V=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,F={x:0,y:0};if(!!C){if(i||a){var st=v==="y"?Wt:Kt,et=v==="y"?ee:ne,U=v==="y"?"height":"width",Nt=C[v],Z=C[v]+y[st],X=C[v]-y[et],Tt=h?-I[U]/2:0,_t=b===Rn?A[U]:I[U],De=b===Rn?-I[U]:-A[U],xe=t.elements.arrow,hn=h&&xe?ns(xe):{width:0,height:0},de=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:kc(),mn=de[st],Me=de[et],Yt=uo(0,A[U],hn[U]),Xe=N?A[U]/2-Tt-Yt-mn-V:_t-Yt-mn-V,Tr=N?-A[U]/2+Tt+Yt+Me+V:De+Yt+Me+V,Qe=t.elements.arrow&&dr(t.elements.arrow),$n=Qe?v==="y"?Qe.clientTop||0:Qe.clientLeft||0:0,Re=t.modifiersData.offset?t.modifiersData.offset[t.placement][v]:0,_r=C[v]+Xe-Re-$n,Ar=C[v]+Tr-Re;if(i){var Dr=uo(h?hr(Z,_r):Z,Nt,h?We(X,Ar):X);C[v]=Dr,F[v]=Dr-Nt}if(a){var Do=v==="x"?Wt:Kt,Ro=v==="x"?ee:ne,vn=C[O],Rr=vn+y[Do],Vr=vn-y[Ro],Ir=uo(h?hr(Rr,_r):Rr,vn,h?We(Vr,Ar):Vr);C[O]=Ir,F[O]=Ir-vn}}t.modifiersData[r]=F}}var Pm={name:"preventOverflow",enabled:!0,phase:"main",fn:Bm,requiresIfExists:["offset"]};function zm(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function Lm(n){return n===ue(n)||!re(n)?is(n):zm(n)}function Fm(n){var t=n.getBoundingClientRect(),e=t.width/n.offsetWidth||1,r=t.height/n.offsetHeight||1;return e!==1||r!==1}function Hm(n,t,e){e===void 0&&(e=!1);var r=re(t);re(t)&&Fm(t);var o=je(t),i=Vn(n),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!e)&&((ge(t)!=="body"||as(o))&&(s=Lm(t)),re(t)?(a=Vn(t),a.x+=t.clientLeft,a.y+=t.clientTop):o&&(a.x=ss(o))),{x:i.left+s.scrollLeft-a.x,y:i.top+s.scrollTop-a.y,width:i.width,height:i.height}}function Jm(n){var t=new Map,e=new Set,r=[];n.forEach(function(i){t.set(i.name,i)});function o(i){e.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(a){if(!e.has(a)){var l=t.get(a);l&&o(l)}}),r.push(i)}return n.forEach(function(i){e.has(i.name)||o(i)}),r}function $m(n){var t=Jm(n);return nm.reduce(function(e,r){return e.concat(t.filter(function(o){return o.phase===r}))},[])}function qm(n){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(n())})})),t}}function jm(n){var t=n.reduce(function(e,r){var o=e[r.name];return e[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,e},{});return Object.keys(t).map(function(e){return t[e]})}var _c={placement:"bottom",modifiers:[],strategy:"absolute"};function Ac(){for(var n=arguments.length,t=new Array(n),e=0;e-1}function Bc(n,t){return typeof n=="function"?n.apply(void 0,t):n}function Pc(n,t){if(t===0)return n;var e;return function(r){clearTimeout(e),e=setTimeout(function(){n(r)},t)}}function Xm(n){return n.split(/\s+/).filter(Boolean)}function Bn(n){return[].concat(n)}function zc(n,t){n.indexOf(t)===-1&&n.push(t)}function Qm(n){return n.filter(function(t,e){return n.indexOf(t)===e})}function Zm(n){return n.split("-")[0]}function ho(n){return[].slice.call(n)}function Lc(n){return Object.keys(n).reduce(function(t,e){return n[e]!==void 0&&(t[e]=n[e]),t},{})}function gr(){return document.createElement("div")}function mo(n){return["Element","Fragment"].some(function(t){return us(n,t)})}function tv(n){return us(n,"NodeList")}function ev(n){return us(n,"MouseEvent")}function nv(n){return!!(n&&n._tippy&&n._tippy.reference===n)}function rv(n){return mo(n)?[n]:tv(n)?ho(n):Array.isArray(n)?n:ho(document.querySelectorAll(n))}function fs(n,t){n.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function Fc(n,t){n.forEach(function(e){e&&e.setAttribute("data-state",t)})}function ov(n){var t,e=Bn(n),r=e[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function iv(n,t){var e=t.clientX,r=t.clientY;return n.every(function(o){var i=o.popperRect,s=o.popperState,a=o.props,l=a.interactiveBorder,c=Zm(s.placement),u=s.modifiersData.offset;if(!u)return!0;var p=c==="bottom"?u.top.y:0,d=c==="top"?u.bottom.y:0,h=c==="right"?u.left.x:0,m=c==="left"?u.right.x:0,g=i.top-r+p>l,y=r-i.bottom-d>l,k=i.left-e+h>l,b=e-i.right-m>l;return g||y||k||b})}function ps(n,t,e){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){n[r](o,e)})}function sv(n,t){for(var e=t;e;){var r;if(n.contains(e))return!0;e=e.getRootNode==null||(r=e.getRootNode())==null?void 0:r.host}return!1}var be={isTouch:!1},Hc=0;function av(){be.isTouch||(be.isTouch=!0,window.performance&&document.addEventListener("mousemove",Jc))}function Jc(){var n=performance.now();n-Hc<20&&(be.isTouch=!1,document.removeEventListener("mousemove",Jc)),Hc=n}function lv(){var n=document.activeElement;if(nv(n)){var t=n._tippy;n.blur&&!t.state.isVisible&&n.blur()}}function cv(){document.addEventListener("touchstart",av,cn),window.addEventListener("blur",lv)}var uv=typeof window!="undefined"&&typeof document!="undefined",fv=uv?!!window.msCrypto:!1,pv={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},dv={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},fe=Object.assign({appendTo:Ic,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},pv,dv),hv=Object.keys(fe),mv=function(t){var e=Object.keys(t);e.forEach(function(r){fe[r]=t[r]})};function $c(n){var t=n.plugins||[],e=t.reduce(function(r,o){var i=o.name,s=o.defaultValue;if(i){var a;r[i]=n[i]!==void 0?n[i]:(a=fe[i])!=null?a:s}return r},{});return Object.assign({},n,e)}function vv(n,t){var e=t?Object.keys($c(Object.assign({},fe,{plugins:t}))):hv,r=e.reduce(function(o,i){var s=(n.getAttribute("data-tippy-"+i)||"").trim();if(!s)return o;if(i==="content")o[i]=s;else try{o[i]=JSON.parse(s)}catch{o[i]=s}return o},{});return r}function qc(n,t){var e=Object.assign({},t,{content:Bc(t.content,[n])},t.ignoreAttributes?{}:vv(n,t.plugins));return e.aria=Object.assign({},fe.aria,e.aria),e.aria={expanded:e.aria.expanded==="auto"?t.interactive:e.aria.expanded,content:e.aria.content==="auto"?t.interactive?null:"describedby":e.aria.content},e}var gv=function(){return"innerHTML"};function ds(n,t){n[gv()]=t}function jc(n){var t=gr();return n===!0?t.className=Rc:(t.className=Vc,mo(n)?t.appendChild(n):ds(t,n)),t}function Wc(n,t){mo(t.content)?(ds(n,""),n.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?ds(n,t.content):n.textContent=t.content)}function hs(n){var t=n.firstElementChild,e=ho(t.children);return{box:t,content:e.find(function(r){return r.classList.contains(Dc)}),arrow:e.find(function(r){return r.classList.contains(Rc)||r.classList.contains(Vc)}),backdrop:e.find(function(r){return r.classList.contains(Ym)})}}function Kc(n){var t=gr(),e=gr();e.className=Gm,e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var r=gr();r.className=Dc,r.setAttribute("data-state","hidden"),Wc(r,n.props),t.appendChild(e),e.appendChild(r),o(n.props,n.props);function o(i,s){var a=hs(t),l=a.box,c=a.content,u=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),typeof s.animation=="string"?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(i.content!==s.content||i.allowHTML!==s.allowHTML)&&Wc(c,n.props),s.arrow?u?i.arrow!==s.arrow&&(l.removeChild(u),l.appendChild(jc(s.arrow))):l.appendChild(jc(s.arrow)):u&&l.removeChild(u)}return{popper:t,onUpdate:o}}Kc.$$tippy=!0;var yv=1,vo=[],ms=[];function bv(n,t){var e=qc(n,Object.assign({},fe,$c(Lc(t)))),r,o,i,s=!1,a=!1,l=!1,c=!1,u,p,d,h=[],m=Pc(Do,e.interactiveDebounce),g,y=yv++,k=null,b=Qm(e.plugins),N={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},v={id:y,reference:n,popper:gr(),popperInstance:k,props:e,state:N,plugins:b,clearDelayTimeouts:e1,setProps:n1,setContent:r1,show:o1,hide:i1,hideWithInteractivity:s1,enable:Zb,disable:t1,unmount:a1,destroy:l1};if(!e.render)return v;var O=e.render(v),C=O.popper,A=O.onUpdate;C.setAttribute("data-tippy-root",""),C.id="tippy-"+v.id,v.popper=C,n._tippy=v,C._tippy=v;var I=b.map(function(w){return w.fn(v)}),V=n.hasAttribute("aria-expanded");return _r(),xe(),Tt(),_t("onCreate",[v]),e.showOnCreate&&qu(),C.addEventListener("mouseenter",function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()}),C.addEventListener("mouseleave",function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&Nt().addEventListener("mousemove",m)}),v;function F(){var w=v.props.touch;return Array.isArray(w)?w:[w,0]}function st(){return F()[0]==="hold"}function et(){var w;return!!((w=v.props.render)!=null&&w.$$tippy)}function U(){return g||n}function Nt(){var w=U().parentNode;return w?ov(w):document}function Z(){return hs(C)}function X(w){return v.state.isMounted&&!v.state.isVisible||be.isTouch||u&&u.type==="focus"?0:cs(v.props.delay,w?0:1,fe.delay)}function Tt(){C.style.pointerEvents=v.props.interactive&&v.state.isVisible?"":"none",C.style.zIndex=""+v.props.zIndex}function _t(w,D,B){if(B===void 0&&(B=!0),I.forEach(function(W){W[w]&&W[w].apply(W,D)}),B){var G;(G=v.props)[w].apply(G,D)}}function De(){var w=v.props.aria;if(!!w.content){var D="aria-"+w.content,B=C.id,G=Bn(v.props.triggerTarget||n);G.forEach(function(W){var zt=W.getAttribute(D);if(v.state.isVisible)W.setAttribute(D,zt?zt+" "+B:B);else{var ie=zt&&zt.replace(B,"").trim();ie?W.setAttribute(D,ie):W.removeAttribute(D)}})}}function xe(){if(!(V||!v.props.aria.expanded)){var w=Bn(v.props.triggerTarget||n);w.forEach(function(D){v.props.interactive?D.setAttribute("aria-expanded",v.state.isVisible&&D===U()?"true":"false"):D.removeAttribute("aria-expanded")})}}function hn(){Nt().removeEventListener("mousemove",m),vo=vo.filter(function(w){return w!==m})}function de(w){if(!(be.isTouch&&(l||w.type==="mousedown"))){var D=w.composedPath&&w.composedPath()[0]||w.target;if(!(v.props.interactive&&sv(C,D))){if(Bn(v.props.triggerTarget||n).indexOf(D)!==-1){if(be.isTouch||v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else _t("onClickOutside",[v,w]);v.props.hideOnClick===!0&&(v.clearDelayTimeouts(),v.hide(),a=!0,setTimeout(function(){a=!1}),v.state.isMounted||Xe())}}}function mn(){l=!0}function Me(){l=!1}function Yt(){var w=Nt();w.addEventListener("mousedown",de,!0),w.addEventListener("touchend",de,cn),w.addEventListener("touchstart",Me,cn),w.addEventListener("touchmove",mn,cn)}function Xe(){var w=Nt();w.removeEventListener("mousedown",de,!0),w.removeEventListener("touchend",de,cn),w.removeEventListener("touchstart",Me,cn),w.removeEventListener("touchmove",mn,cn)}function Tr(w,D){$n(w,function(){!v.state.isVisible&&C.parentNode&&C.parentNode.contains(C)&&D()})}function Qe(w,D){$n(w,D)}function $n(w,D){var B=Z().box;function G(W){W.target===B&&(ps(B,"remove",G),D())}if(w===0)return D();ps(B,"remove",p),ps(B,"add",G),p=G}function Re(w,D,B){B===void 0&&(B=!1);var G=Bn(v.props.triggerTarget||n);G.forEach(function(W){W.addEventListener(w,D,B),h.push({node:W,eventType:w,handler:D,options:B})})}function _r(){st()&&(Re("touchstart",Dr,{passive:!0}),Re("touchend",Ro,{passive:!0})),Xm(v.props.trigger).forEach(function(w){if(w!=="manual")switch(Re(w,Dr),w){case"mouseenter":Re("mouseleave",Ro);break;case"focus":Re(fv?"focusout":"blur",vn);break;case"focusin":Re("focusout",vn);break}})}function Ar(){h.forEach(function(w){var D=w.node,B=w.eventType,G=w.handler,W=w.options;D.removeEventListener(B,G,W)}),h=[]}function Dr(w){var D,B=!1;if(!(!v.state.isEnabled||Rr(w)||a)){var G=((D=u)==null?void 0:D.type)==="focus";u=w,g=w.currentTarget,xe(),!v.state.isVisible&&ev(w)&&vo.forEach(function(W){return W(w)}),w.type==="click"&&(v.props.trigger.indexOf("mouseenter")<0||s)&&v.props.hideOnClick!==!1&&v.state.isVisible?B=!0:qu(w),w.type==="click"&&(s=!B),B&&!G&&Vo(w)}}function Do(w){var D=w.target,B=U().contains(D)||C.contains(D);if(!(w.type==="mousemove"&&B)){var G=zs().concat(C).map(function(W){var zt,ie=W._tippy,qn=(zt=ie.popperInstance)==null?void 0:zt.state;return qn?{popperRect:W.getBoundingClientRect(),popperState:qn,props:e}:null}).filter(Boolean);iv(G,w)&&(hn(),Vo(w))}}function Ro(w){var D=Rr(w)||v.props.trigger.indexOf("click")>=0&&s;if(!D){if(v.props.interactive){v.hideWithInteractivity(w);return}Vo(w)}}function vn(w){v.props.trigger.indexOf("focusin")<0&&w.target!==U()||v.props.interactive&&w.relatedTarget&&C.contains(w.relatedTarget)||Vo(w)}function Rr(w){return be.isTouch?st()!==w.type.indexOf("touch")>=0:!1}function Vr(){Ir();var w=v.props,D=w.popperOptions,B=w.placement,G=w.offset,W=w.getReferenceClientRect,zt=w.moveTransition,ie=et()?hs(C).arrow:null,qn=W?{getBoundingClientRect:W,contextElement:W.contextElement||U()}:n,ju={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Io){var jn=Io.state;if(et()){var c1=Z(),Fs=c1.box;["placement","reference-hidden","escaped"].forEach(function(Bo){Bo==="placement"?Fs.setAttribute("data-placement",jn.placement):jn.attributes.popper["data-popper-"+Bo]?Fs.setAttribute("data-"+Bo,""):Fs.removeAttribute("data-"+Bo)}),jn.attributes.popper={}}}},gn=[{name:"offset",options:{offset:G}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!zt}},ju];et()&&ie&&gn.push({name:"arrow",options:{element:ie,padding:3}}),gn.push.apply(gn,(D==null?void 0:D.modifiers)||[]),v.popperInstance=Um(qn,C,Object.assign({},D,{placement:B,onFirstUpdate:d,modifiers:gn}))}function Ir(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function Qb(){var w=v.props.appendTo,D,B=U();v.props.interactive&&w===Ic||w==="parent"?D=B.parentNode:D=Bc(w,[B]),D.contains(C)||D.appendChild(C),Vr()}function zs(){return ho(C.querySelectorAll("[data-tippy-root]"))}function qu(w){v.clearDelayTimeouts(),w&&_t("onTrigger",[v,w]),Yt();var D=X(!0),B=F(),G=B[0],W=B[1];be.isTouch&&G==="hold"&&W&&(D=W),D?r=setTimeout(function(){v.show()},D):v.show()}function Vo(w){if(v.clearDelayTimeouts(),_t("onUntrigger",[v,w]),!v.state.isVisible){Xe();return}if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(w.type)>=0&&s)){var D=X(!1);D?o=setTimeout(function(){v.state.isVisible&&v.hide()},D):i=requestAnimationFrame(function(){v.hide()})}}function Zb(){v.state.isEnabled=!0}function t1(){v.hide(),v.state.isEnabled=!1}function e1(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(i)}function n1(w){if(!v.state.isDestroyed){_t("onBeforeUpdate",[v,w]),Ar();var D=v.props,B=qc(n,Object.assign({},D,Lc(w),{ignoreAttributes:!0}));v.props=B,_r(),D.interactiveDebounce!==B.interactiveDebounce&&(hn(),m=Pc(Do,B.interactiveDebounce)),D.triggerTarget&&!B.triggerTarget?Bn(D.triggerTarget).forEach(function(G){G.removeAttribute("aria-expanded")}):B.triggerTarget&&n.removeAttribute("aria-expanded"),xe(),Tt(),A&&A(D,B),v.popperInstance&&(Vr(),zs().forEach(function(G){requestAnimationFrame(G._tippy.popperInstance.forceUpdate)})),_t("onAfterUpdate",[v,w])}}function r1(w){v.setProps({content:w})}function o1(){var w=v.state.isVisible,D=v.state.isDestroyed,B=!v.state.isEnabled,G=be.isTouch&&!v.props.touch,W=cs(v.props.duration,0,fe.duration);if(!(w||D||B||G)&&!U().hasAttribute("disabled")&&(_t("onShow",[v],!1),v.props.onShow(v)!==!1)){if(v.state.isVisible=!0,et()&&(C.style.visibility="visible"),Tt(),Yt(),v.state.isMounted||(C.style.transition="none"),et()){var zt=Z(),ie=zt.box,qn=zt.content;fs([ie,qn],0)}d=function(){var gn;if(!(!v.state.isVisible||c)){if(c=!0,C.offsetHeight,C.style.transition=v.props.moveTransition,et()&&v.props.animation){var Ls=Z(),Io=Ls.box,jn=Ls.content;fs([Io,jn],W),Fc([Io,jn],"visible")}De(),xe(),zc(ms,v),(gn=v.popperInstance)==null||gn.forceUpdate(),v.state.isMounted=!0,_t("onMount",[v]),v.props.animation&&et()&&Qe(W,function(){v.state.isShown=!0,_t("onShown",[v])})}},Qb()}}function i1(){var w=!v.state.isVisible,D=v.state.isDestroyed,B=!v.state.isEnabled,G=cs(v.props.duration,1,fe.duration);if(!(w||D||B)&&(_t("onHide",[v],!1),v.props.onHide(v)!==!1)){if(v.state.isVisible=!1,v.state.isShown=!1,c=!1,s=!1,et()&&(C.style.visibility="hidden"),hn(),Xe(),Tt(),et()){var W=Z(),zt=W.box,ie=W.content;v.props.animation&&(fs([zt,ie],G),Fc([zt,ie],"hidden"))}De(),xe(),v.props.animation?et()&&Tr(G,v.unmount):v.unmount()}}function s1(w){Nt().addEventListener("mousemove",m),zc(vo,m),m(w)}function a1(){v.state.isVisible&&v.hide(),!!v.state.isMounted&&(Ir(),zs().forEach(function(w){w._tippy.unmount()}),C.parentNode&&C.parentNode.removeChild(C),ms=ms.filter(function(w){return w!==v}),v.state.isMounted=!1,_t("onHidden",[v]))}function l1(){v.state.isDestroyed||(v.clearDelayTimeouts(),v.unmount(),Ar(),delete n._tippy,v.state.isDestroyed=!0,_t("onDestroy",[v]))}}function Pn(n,t){t===void 0&&(t={});var e=fe.plugins.concat(t.plugins||[]);cv();var r=Object.assign({},t,{plugins:e}),o=rv(n),i=o.reduce(function(s,a){var l=a&&bv(a,r);return l&&s.push(l),s},[]);return mo(n)?i[0]:i}Pn.defaultProps=fe,Pn.setDefaultProps=mv,Pn.currentInput=be,Object.assign({},gc,{effect:function(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow)}}),Pn.setDefaultProps({render:Kc});class kv{constructor({editor:t,element:e,view:r,tippyOptions:o={},shouldShow:i}){this.preventHide=!1,this.shouldShow=({state:s,from:a,to:l})=>{const{doc:c,selection:u}=s,{empty:p}=u,d=!c.textBetween(a,l).length&&tc(s.selection);return!(p||d)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var a;if(this.preventHide){this.preventHide=!1;return}(s==null?void 0:s.relatedTarget)&&((a=this.element.parentNode)===null||a===void 0?void 0:a.contains(s.relatedTarget))||this.hide()},this.editor=t,this.element=e,this.view=r,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=o,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,e=!!t.parentElement;this.tippy||!e||(this.tippy=Pn(t,x({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle"},this.tippyOptions)))}update(t,e){var r,o;const{state:i,composing:s}=t,{doc:a,selection:l}=i,c=e&&e.doc.eq(a)&&e.selection.eq(l);if(s||c)return;this.createTooltip();const{ranges:u}=l,p=Math.min(...u.map(m=>m.$from.pos)),d=Math.max(...u.map(m=>m.$to.pos));if(!((r=this.shouldShow)===null||r===void 0?void 0:r.call(this,{editor:this.editor,view:t,state:i,oldState:e,from:p,to:d}))){this.hide();return}(o=this.tippy)===null||o===void 0||o.setProps({getReferenceClientRect:()=>{if(qh(i.selection)){const m=t.nodeDOM(p);if(m)return m.getBoundingClientRect()}return pc(t,p,d)}}),this.show()}show(){var t;(t=this.tippy)===null||t===void 0||t.show()}hide(){var t;(t=this.tippy)===null||t===void 0||t.hide()}destroy(){var t;(t=this.tippy)===null||t===void 0||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Uc=n=>new Ht({key:typeof n.pluginKey=="string"?new ae(n.pluginKey):n.pluginKey,view:t=>new kv(x({view:t},n))});yt.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Uc({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});class wv{constructor({editor:t,element:e,view:r,tippyOptions:o={},shouldShow:i}){this.preventHide=!1,this.shouldShow=({state:s})=>{const{selection:a}=s,{$anchor:l,empty:c}=a,u=l.depth===1,p=l.parent.isTextblock&&!l.parent.type.spec.code&&!l.parent.textContent;return!(!c||!u||!p)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var a;if(this.preventHide){this.preventHide=!1;return}(s==null?void 0:s.relatedTarget)&&((a=this.element.parentNode)===null||a===void 0?void 0:a.contains(s.relatedTarget))||this.hide()},this.editor=t,this.element=e,this.view=r,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=o,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,e=!!t.parentElement;this.tippy||!e||(this.tippy=Pn(t,x({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle"},this.tippyOptions)))}update(t,e){var r,o;const{state:i,composing:s}=t,{doc:a,selection:l}=i,{from:c,to:u}=l,p=e&&e.doc.eq(a)&&e.selection.eq(l);if(s||p)return;if(this.createTooltip(),!((r=this.shouldShow)===null||r===void 0?void 0:r.call(this,{editor:this.editor,view:t,state:i,oldState:e}))){this.hide();return}(o=this.tippy)===null||o===void 0||o.setProps({getReferenceClientRect:()=>pc(t,c,u)}),this.show()}show(){var t;(t=this.tippy)===null||t===void 0||t.show()}hide(){var t;(t=this.tippy)===null||t===void 0||t.hide()}destroy(){var t;(t=this.tippy)===null||t===void 0||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Gc=n=>new Ht({key:typeof n.pluginKey=="string"?new ae(n.pluginKey):n.pluginKey,view:t=>new wv(x({view:t},n))});yt.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Gc({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});const Sv=f.defineComponent({name:"BubbleMenu",props:{pluginKey:{type:null,default:"bubbleMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(n,{slots:t}){const e=f.ref(null);return f.onMounted(()=>{const{pluginKey:r,editor:o,tippyOptions:i,shouldShow:s}=n;o.registerPlugin(Uc({pluginKey:r,editor:o,element:e.value,tippyOptions:i,shouldShow:s}))}),f.onBeforeUnmount(()=>{const{pluginKey:r,editor:o}=n;o.unregisterPlugin(r)}),()=>{var r;return f.h("div",{ref:e},(r=t.default)===null||r===void 0?void 0:r.call(t))}}});function Yc(n){return f.customRef((t,e)=>({get(){return t(),n},set(r){n=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{e()})})}}))}class xv extends $h{constructor(t={}){super(t);return this.vueRenderers=f.reactive(new Map),this.contentComponent=null,this.reactiveState=Yc(this.view.state),this.reactiveExtensionStorage=Yc(this.extensionStorage),this.on("transaction",()=>{this.reactiveState.value=this.view.state,this.reactiveExtensionStorage.value=this.extensionStorage}),f.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(t,e){super.registerPlugin(t,e),this.reactiveState.value=this.view.state}unregisterPlugin(t){super.unregisterPlugin(t),this.reactiveState.value=this.view.state}}const Mv=f.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(n){const t=f.ref(),e=f.getCurrentInstance();return f.watchEffect(()=>{const r=n.editor;r&&r.options.element&&t.value&&f.nextTick(()=>{if(!t.value||!r.options.element.firstChild)return;const o=f.unref(t.value);t.value.append(...r.options.element.childNodes),r.contentComponent=e.ctx._,r.setOptions({element:o}),r.createNodeViews()})}),f.onBeforeUnmount(()=>{const r=n.editor;if(!r||(r.isDestroyed||r.view.setProps({nodeViews:{}}),r.contentComponent=null,!r.options.element.firstChild))return;const o=document.createElement("div");o.append(...r.options.element.childNodes),r.setOptions({element:o})}),{rootEl:t}},render(){const n=[];return this.editor&&this.editor.vueRenderers.forEach(t=>{const e=f.h(f.Teleport,{to:t.teleportElement,key:t.id},f.h(t.component,x({ref:t.id},t.props)));n.push(e)}),f.h("div",{ref:t=>{this.rootEl=t}},...n)}});f.defineComponent({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(n,{slots:t}){const e=f.ref(null);return f.onMounted(()=>{const{pluginKey:r,editor:o,tippyOptions:i,shouldShow:s}=n;o.registerPlugin(Gc({pluginKey:r,editor:o,element:e.value,tippyOptions:i,shouldShow:s}))}),f.onBeforeUnmount(()=>{const{pluginKey:r,editor:o}=n;o.unregisterPlugin(r)}),()=>{var r;return f.h("div",{ref:e},(r=t.default)===null||r===void 0?void 0:r.call(t))}}}),f.defineComponent({props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var n,t;return f.h(this.as,{class:this.decorationClasses.value,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(t=(n=this.$slots).default)===null||t===void 0?void 0:t.call(n))}}),f.defineComponent({props:{as:{type:String,default:"div"}},render(){return f.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}});const Cv=/^```(?[a-z]*)?[\s\n]$/,Ev=/^~~~(?[a-z]*)?[\s\n]$/,Xc=bt.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:n=>{var t;const{languageClassPrefix:e}=this.options,i=[...((t=n.firstElementChild)===null||t===void 0?void 0:t.classList)||[]].filter(s=>s.startsWith(e)).map(s=>s.replace(e,""))[0];return i||null},renderHTML:n=>n.language?{class:this.options.languageClassPrefix+n.language}:null}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({HTMLAttributes:n}){return["pre",this.options.HTMLAttributes,["code",n,0]]},addCommands(){return{setCodeBlock:n=>({commands:t})=>t.setNode("codeBlock",n),toggleCodeBlock:n=>({commands:t})=>t.toggleNode("codeBlock","paragraph",n)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:n,$anchor:t}=this.editor.state.selection,e=t.pos===1;return!n||t.parent.type.name!==this.name?!1:e||!t.parent.textContent.length?this.editor.commands.clearNodes():!1}}},addInputRules(){return[ts({find:Cv,type:this.type,getAttributes:({groups:n})=>n}),ts({find:Ev,type:this.type,getAttributes:({groups:n})=>n})]},addProseMirrorPlugins(){return[new Ht({key:new ae("codeBlockVSCodeHandler"),props:{handlePaste:(n,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const e=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o==null?void 0:o.mode;if(!e||!i)return!1;const{tr:s}=n.state;return s.replaceSelectionWith(this.type.create({language:i})),s.setSelection(K.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(e.replace(/\r\n?/g,` +`)),s.setMeta("paste",!0),n.dispatch(s),!0}}})]}}),Ov=qe.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",pt(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark("underline"),toggleUnderline:()=>({commands:n})=>n.toggleMark("underline"),unsetUnderline:()=>({commands:n})=>n.unsetMark("underline")}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline()}}});function Qc(n,t,e){for(var r=0;;r++){if(r==n.childCount||r==t.childCount)return n.childCount==t.childCount?null:e;var o=n.child(r),i=t.child(r);if(o==i){e+=o.nodeSize;continue}if(!o.sameMarkup(i))return e;if(o.isText&&o.text!=i.text){for(var s=0;o.text[s]==i.text[s];s++)e++;return e}if(o.content.size||i.content.size){var a=Qc(o.content,i.content,e+1);if(a!=null)return a}e+=o.nodeSize}}function Zc(n,t,e,r){for(var o=n.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:e,b:r};var s=n.child(--o),a=t.child(--i),l=s.nodeSize;if(s==a){e-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:e,b:r};if(s.isText&&s.text!=a.text){for(var c=0,u=Math.min(s.text.length,a.text.length);ct&&r(l,o+a,i,s)!==!1&&l.content.size){var u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,e-u),r,o+u)}a=c}},E.prototype.descendants=function(t){this.nodesBetween(0,this.size,t)},E.prototype.textBetween=function(t,e,r,o){var i="",s=!0;return this.nodesBetween(t,e,function(a,l){a.isText?(i+=a.text.slice(Math.max(t,l)-l,e-l),s=!r):a.isLeaf&&o?(i+=typeof o=="function"?o(a):o,s=!r):!s&&a.isBlock&&(i+=r,s=!0)},0),i},E.prototype.append=function(t){if(!t.size)return this;if(!this.size)return t;var e=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(e.isText&&e.sameMarkup(r)&&(o[o.length-1]=e.withText(e.text+r.text),i=1);it)for(var i=0,s=0;st&&((se)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,e-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,e-s-1))),r.push(a),o+=a.nodeSize),s=l}return new E(r,o)},E.prototype.cutByIndex=function(t,e){return t==e?E.empty:t==0&&e==this.content.length?this:new E(this.content.slice(t,e))},E.prototype.replaceChild=function(t,e){var r=this.content[t];if(r==e)return this;var o=this.content.slice(),i=this.size+e.nodeSize-r.nodeSize;return o[t]=e,new E(o,i)},E.prototype.addToStart=function(t){return new E([t].concat(this.content),this.size+t.nodeSize)},E.prototype.addToEnd=function(t){return new E(this.content.concat(t),this.size+t.nodeSize)},E.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 r=0,o=0;;r++){var i=this.child(r),s=o+i.nodeSize;if(s>=t)return s==t||e>0?yo(r+1,s):yo(r,o);o=s}},E.prototype.toString=function(){return"<"+this.toStringInner()+">"},E.prototype.toStringInner=function(){return this.content.join(", ")},E.prototype.toJSON=function(){return this.content.length?this.content.map(function(t){return t.toJSON()}):null},E.fromJSON=function(t,e){if(!e)return E.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new E(e.map(t.nodeFromJSON))},E.fromArray=function(t){if(!t.length)return E.empty;for(var e,r=0,o=0;othis.type.rank&&(e||(e=t.slice(0,o)),e.push(this),r=!0),e&&e.push(i)}}return e||(e=t.slice()),r||e.push(this),e},q.prototype.removeFromSet=function(t){for(var e=0;e0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t},R.fromJSON=function(t,e){if(!e)return R.empty;var r=e.openStart||0,o=e.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new R(E.fromJSON(t,e.content),r,o)},R.maxOpen=function(t,e){e===void 0&&(e=!0);for(var r=0,o=0,i=t.firstChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.firstChild)r++;for(var s=t.lastChild;s&&!s.isLeaf&&(e||!s.type.spec.isolating);s=s.lastChild)o++;return new R(t,r,o)},Object.defineProperties(R.prototype,tu);function eu(n,t,e){var r=n.findIndex(t),o=r.index,i=r.offset,s=n.maybeChild(o),a=n.findIndex(e),l=a.index,c=a.offset;if(i==t||s.isText){if(c!=e&&!n.child(l).isText)throw new RangeError("Removing non-flat range");return n.cut(0,t).append(n.cut(e))}if(o!=l)throw new RangeError("Removing non-flat range");return n.replaceChild(o,s.copy(eu(s.content,t-i-1,e-i-1)))}function nu(n,t,e,r){var o=n.findIndex(t),i=o.index,s=o.offset,a=n.maybeChild(i);if(s==t||a.isText)return r&&!r.canReplace(i,i,e)?null:n.cut(0,t).append(e).append(n.cut(t));var l=nu(a.content,t-s-1,e);return l&&n.replaceChild(i,a.copy(l))}R.empty=new R(E.empty,0,0);function Nv(n,t,e){if(e.openStart>n.depth)throw new ke("Inserted content deeper than insertion position");if(n.depth-e.openStart!=t.depth-e.openEnd)throw new ke("Inconsistent open depths");return ru(n,t,e,0)}function ru(n,t,e,r){var o=n.index(r),i=n.node(r);if(o==t.index(r)&&r=0&&n.isText&&n.sameMarkup(t[e])?t[e]=n.withText(t[e].text+n.text):t.push(n)}function yr(n,t,e,r){var o=(t||n).node(e),i=0,s=t?t.index(e):o.childCount;n&&(i=n.index(e),n.depth>e?i++:n.textOffset&&(un(n.nodeAfter,r),i++));for(var a=i;ao&&gs(n,t,o+1),s=r.depth>o&&gs(e,r,o+1),a=[];return yr(null,n,o,a),i&&s&&t.index(o)==e.index(o)?(ou(i,s),un(fn(i,iu(n,t,e,r,o+1)),a)):(i&&un(fn(i,ko(n,t,o+1)),a),yr(t,e,o,a),s&&un(fn(s,ko(e,r,o+1)),a)),yr(r,null,o,a),new E(a)}function ko(n,t,e){var r=[];if(yr(null,n,e,r),n.depth>e){var o=gs(n,t,e+1);un(fn(o,ko(n,t,e+1)),r)}return yr(t,null,e,r),new E(r)}function Tv(n,t){for(var e=t.depth-n.openStart,r=t.node(e),o=r.copy(n.content),i=e-1;i>=0;i--)o=t.node(i).copy(E.from(o));return{start:o.resolveNoCache(n.openStart+e),end:o.resolveNoCache(o.content.size-n.openEnd-e)}}var rt=function(t,e,r){this.pos=t,this.path=e,this.depth=e.length/3-1,this.parentOffset=r},zn={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};rt.prototype.resolveDepth=function(t){return t==null?this.depth:t<0?this.depth+t:t},zn.parent.get=function(){return this.node(this.depth)},zn.doc.get=function(){return this.node(0)},rt.prototype.node=function(t){return this.path[this.resolveDepth(t)*3]},rt.prototype.index=function(t){return this.path[this.resolveDepth(t)*3+1]},rt.prototype.indexAfter=function(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)},rt.prototype.start=function(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1},rt.prototype.end=function(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size},rt.prototype.before=function(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]},rt.prototype.after=function(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize},zn.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},zn.nodeAfter.get=function(){var n=this.parent,t=this.index(this.depth);if(t==n.childCount)return null;var e=this.pos-this.path[this.path.length-1],r=n.child(t);return e?n.child(t).cut(e):r},zn.nodeBefore.get=function(){var n=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(n).cut(0,t):n==0?null:this.parent.child(n-1)},rt.prototype.posAtIndex=function(t,e){e=this.resolveDepth(e);for(var r=this.path[e*3],o=e==0?0:this.path[e*3-1]+1,i=0;i0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0},rt.prototype.blockRange=function(t,e){if(t===void 0&&(t=this),t.pos=0;r--)if(t.pos<=this.end(r)&&(!e||e(this.node(r))))return new su(this,t,r)},rt.prototype.sameParent=function(t){return this.pos-this.parentOffset==t.pos-t.parentOffset},rt.prototype.max=function(t){return t.pos>this.pos?t:this},rt.prototype.min=function(t){return t.pos=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");for(var r=[],o=0,i=e,s=t;;){var a=s.content.findIndex(i),l=a.index,c=a.offset,u=i-c;if(r.push(s,l,o+c),!u||(s=s.child(l),s.isText))break;i=u-1,o+=c+1}return new rt(e,r,i)},rt.resolveCached=function(t,e){for(var r=0;rt&&this.nodesBetween(t,e,function(i){return r.isInSet(i.marks)&&(o=!0),!o}),o},Ut.isBlock.get=function(){return this.type.isBlock},Ut.isTextblock.get=function(){return this.type.isTextblock},Ut.inlineContent.get=function(){return this.type.inlineContent},Ut.isInline.get=function(){return this.type.isInline},Ut.isText.get=function(){return this.type.isText},Ut.isLeaf.get=function(){return this.type.isLeaf},Ut.isAtom.get=function(){return this.type.isAtom},j.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),Dv(this.marks,t)},j.prototype.contentMatchAt=function(t){var e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e},j.prototype.canReplace=function(t,e,r,o,i){r===void 0&&(r=E.empty),o===void 0&&(o=0),i===void 0&&(i=r.childCount);var s=this.contentMatchAt(t).matchFragment(r,o,i),a=s&&s.matchFragment(this.content,e);if(!a||!a.validEnd)return!1;for(var l=o;l=0;e--)t=n[e].type.name+"("+t+")";return t}var Vt=function(t){this.validEnd=t,this.next=[],this.wrapCache=[]},wo={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};Vt.parse=function(t,e){var r=new So(t,e);if(r.next==null)return Vt.empty;var o=lu(r);r.next&&r.err("Unexpected trailing text");var i=Lv(zv(o));return Fv(i,r),i},Vt.prototype.matchType=function(t){for(var e=0;e>1},Vt.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]}},Vt.prototype.toString=function(){var t=[];function e(r){t.push(r);for(var o=1;o"+t.indexOf(r.next[s+1]);return i}).join(` +`)},Object.defineProperties(Vt.prototype,wo),Vt.empty=new Vt(!0);var So=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.shift()},au={next:{configurable:!0}};au.next.get=function(){return this.tokens[this.pos]},So.prototype.eat=function(t){return this.next==t&&(this.pos++||!0)},So.prototype.err=function(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")},Object.defineProperties(So.prototype,au);function lu(n){var t=[];do t.push(Rv(n));while(n.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function Rv(n){var t=[];do t.push(Vv(n));while(n.next&&n.next!=")"&&n.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function Vv(n){for(var t=Pv(n);;)if(n.eat("+"))t={type:"plus",expr:t};else if(n.eat("*"))t={type:"star",expr:t};else if(n.eat("?"))t={type:"opt",expr:t};else if(n.eat("{"))t=Iv(n,t);else break;return t}function cu(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");var t=Number(n.next);return n.pos++,t}function Iv(n,t){var e=cu(n),r=e;return n.eat(",")&&(n.next!="}"?r=cu(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:e,max:r,expr:t}}function Bv(n,t){var e=n.nodeTypes,r=e[t];if(r)return[r];var o=[];for(var i in e){var s=e[i];s.groups.indexOf(t)>-1&&o.push(s)}return o.length==0&&n.err("No node type or group '"+t+"' found"),o}function Pv(n){if(n.eat("(")){var t=lu(n);return n.eat(")")||n.err("Missing closing paren"),t}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{var e=Bv(n,n.next).map(function(r){return n.inline==null?n.inline=r.isInline:n.inline!=r.isInline&&n.err("Mixing inline and block content"),{type:"name",value:r}});return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function zv(n){var t=[[]];return o(i(n,0),e()),t;function e(){return t.push([])-1}function r(s,a,l){var c={term:l,to:a};return t[s].push(c),c}function o(s,a){s.forEach(function(l){return l.to=a})}function i(s,a){if(s.type=="choice")return s.exprs.reduce(function(k,b){return k.concat(i(b,a))},[]);if(s.type=="seq")for(var l=0;;l++){var c=i(s.exprs[l],a);if(l==s.exprs.length-1)return c;o(c,a=e())}else if(s.type=="star"){var u=e();return r(a,u),o(i(s.expr,u),u),[r(u)]}else if(s.type=="plus"){var p=e();return o(i(s.expr,a),p),o(i(s.expr,p),p),[r(p)]}else{if(s.type=="opt")return[r(a)].concat(i(s.expr,a));if(s.type=="range"){for(var d=a,h=0;h-1&&o[d+1];fu(n,p).forEach(function(m){h||o.push(u,h=[]),h.indexOf(m)==-1&&h.push(m)})}})});for(var i=t[r.join(",")]=new Vt(r.indexOf(n.length-1)>-1),s=0;s-1},Gt.prototype.allowsMarks=function(t){if(this.markSet==null)return!0;for(var e=0;e-1};var ks={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Hv={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},gu={ol:!0,ul:!0},ws=1,Ss=2,kr=4;function yu(n){return(n?ws:0)|(n==="full"?Ss:0)}var Ae=function(t,e,r,o,i,s,a){this.type=t,this.attrs=e,this.solid=i,this.match=s||(a&kr?null:t.contentMatch),this.options=a,this.content=[],this.marks=r,this.activeMarks=q.none,this.pendingMarks=o,this.stashMarks=[]};Ae.prototype.findWrapping=function(t){if(!this.match){if(!this.type)return[];var e=this.type.contentMatch.fillBefore(E.from(t));if(e)this.match=this.type.contentMatch.matchFragment(e);else{var r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)},Ae.prototype.finish=function(t){if(!(this.options&ws)){var e=this.content[this.content.length-1],r;e&&e.isText&&(r=/[ \t\r\n\u000c]+$/.exec(e.text))&&(e.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=e.withText(e.text.slice(0,e.text.length-r[0].length)))}var o=E.from(this.content);return!t&&this.match&&(o=o.append(this.match.fillBefore(E.empty,!0))),this.type?this.type.create(this.attrs,o,this.marks):o},Ae.prototype.popFromStashMark=function(t){for(var e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]},Ae.prototype.applyPending=function(t){for(var e=0,r=this.pendingMarks;e=0;o--){var i=this.nodes[o],s=i.findWrapping(t);if(s&&(!e||e.length>s.length)&&(e=s,r=i,!s.length)||i.solid)break}if(!e)return!1;this.sync(r);for(var a=0;athis.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}},ot.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},ot.prototype.sync=function(t){for(var e=this.open;e>=0;e--)if(this.nodes[e]==t){this.open=e;return}},xs.currentPos.get=function(){this.closeExtra();for(var n=0,t=this.open;t>=0;t--){for(var e=this.nodes[t].content,r=e.length-1;r>=0;r--)n+=e[r].nodeSize;t&&n++}return n},ot.prototype.findAtPoint=function(t,e){if(this.find)for(var r=0;r-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);var r=t.split("/"),o=this.options.context,i=!this.isOpen&&(!o||o.parent.type==this.nodes[0].type),s=-(o?o.depth+1:0)+(i?0:1),a=function(l,c){for(;l>=0;l--){var u=r[l];if(u==""){if(l==r.length-1||l==0)continue;for(;c>=s;c--)if(a(l-1,c))return!0;return!1}else{var p=c>0||c==0&&i?e.nodes[c].type:o&&c>=s?o.node(c-s).type:null;if(!p||p.name!=u&&p.groups.indexOf(u)==-1)return!1;c--}}return!0};return a(r.length-1,this.open)},ot.prototype.textblockFromContext=function(){var t=this.options.context;if(t)for(var e=t.depth;e>=0;e--){var r=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(var o in this.parser.schema.nodes){var i=this.parser.schema.nodes[o];if(i.isTextblock&&i.defaultAttrs)return i}},ot.prototype.addPendingMark=function(t){var e=jv(t,this.top.pendingMarks);e&&this.top.stashMarks.push(e),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)},ot.prototype.removePendingMark=function(t,e){for(var r=this.open;r>=0;r--){var o=this.nodes[r],i=o.pendingMarks.lastIndexOf(t);if(i>-1)o.pendingMarks=t.removeFromSet(o.pendingMarks);else{o.activeMarks=t.removeFromSet(o.activeMarks);var s=o.popFromStashMark(t);s&&o.type&&o.type.allowsMarkType(s.type)&&(o.activeMarks=s.addToSet(o.activeMarks))}if(o==e)break}},Object.defineProperties(ot.prototype,xs);function Jv(n){for(var t=n.firstChild,e=null;t;t=t.nextSibling){var r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&gu.hasOwnProperty(r)&&e?(e.appendChild(t),t=e):r=="li"?e=t:r&&(e=null)}}function $v(n){for(var t=/\s*([\w-]+)\s*:\s*([^;]+)/g,e,r=[];e=t.exec(n);)r.push(e[1],e[2].trim());return r}function qv(n,t){var e=t.schema.nodes,r=function(s){var a=e[s];if(!!a.allowsMarkType(n)){var l=[],c=function(u){l.push(u);for(var p=0;pt)break;var c=this.ranges[a+i],u=this.ranges[a+s],p=l+c;if(t<=p){var d=c?t==l?-1:t==p?1:e:e,h=l+o+(d<0?0:u);if(r)return h;var m=t==(e<0?l:p)?null:Wv(a/3,t-l);return new Ms(h,e<0?t!=l:t!=p,m)}o+=u-c}return r?t+o:new Ms(t+o)},kt.prototype.touches=function(t,e){for(var r=0,o=wu(e),i=this.inverted?2:1,s=this.inverted?1:2,a=0;at)break;var c=this.ranges[a+i],u=l+c;if(t<=u&&a==o*3)return!0;r+=this.ranges[a+s]-c}return!1},kt.prototype.forEach=function(t){for(var e=this.inverted?2:1,r=this.inverted?1:2,o=0,i=0;o=0;e--){var o=t.getMirror(e);this.appendMap(t.maps[e].invert(),o!=null&&o>e?r-o-1:null)}},It.prototype.invert=function(){var t=new It;return t.appendMappingInverted(this),t},It.prototype.map=function(t,e){if(e===void 0&&(e=1),this.mirror)return this._map(t,e,!0);for(var r=this.from;ri&&l0},lt.prototype.addStep=function(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e},Object.defineProperties(lt.prototype,Cs);function xo(){throw new Error("Override me")}var Es=Object.create(null),Ot=function(){};Ot.prototype.apply=function(t){return xo()},Ot.prototype.getMap=function(){return kt.empty},Ot.prototype.invert=function(t){return xo()},Ot.prototype.map=function(t){return xo()},Ot.prototype.merge=function(t){return null},Ot.prototype.toJSON=function(){return xo()},Ot.fromJSON=function(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");var r=Es[e.stepType];if(!r)throw new RangeError("No step type "+e.stepType+" defined");return r.fromJSON(t,e)},Ot.jsonID=function(t,e){if(t in Es)throw new RangeError("Duplicate use of step JSON ID "+t);return Es[t]=e,e.prototype.jsonID=t,e};var Bt=function(t,e){this.doc=t,this.failed=e};Bt.ok=function(t){return new Bt(t,null)},Bt.fail=function(t){return new Bt(null,t)},Bt.fromReplace=function(t,e,r,o){try{return Bt.ok(t.replace(e,r,o))}catch(i){if(i instanceof ke)return Bt.fail(i.message);throw i}};var Ke=function(n){function t(e,r,o,i){n.call(this),this.from=e,this.to=r,this.slice=o,this.structure=!!i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.apply=function(r){return this.structure&&Os(r,this.from,this.to)?Bt.fail("Structure replace would overwrite content"):Bt.fromReplace(r,this.from,this.to,this.slice)},t.prototype.getMap=function(){return new kt([this.from,this.to-this.from,this.slice.size])},t.prototype.invert=function(r){return new t(this.from,this.from+this.slice.size,r.slice(this.from,this.to))},t.prototype.map=function(r){var o=r.mapResult(this.from,1),i=r.mapResult(this.to,-1);return o.deleted&&i.deleted?null:new t(o.pos,Math.max(o.pos,i.pos),this.slice)},t.prototype.merge=function(r){if(!(r instanceof t)||r.structure||this.structure)return null;if(this.from+this.slice.size==r.from&&!this.slice.openEnd&&!r.slice.openStart){var o=this.slice.size+r.slice.size==0?R.empty:new R(this.slice.content.append(r.slice.content),this.slice.openStart,r.slice.openEnd);return new t(this.from,this.to+(r.to-r.from),o,this.structure)}else if(r.to==this.from&&!this.slice.openStart&&!r.slice.openEnd){var i=this.slice.size+r.slice.size==0?R.empty:new R(r.slice.content.append(this.slice.content),r.slice.openStart,this.slice.openEnd);return new t(r.from,this.to,i,this.structure)}else return null},t.prototype.toJSON=function(){var r={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(r.slice=this.slice.toJSON()),this.structure&&(r.structure=!0),r},t.fromJSON=function(r,o){if(typeof o.from!="number"||typeof o.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new t(o.from,o.to,R.fromJSON(r,o.slice),!!o.structure)},t}(Ot);Ot.jsonID("replace",Ke);var dn=function(n){function t(e,r,o,i,s,a,l){n.call(this),this.from=e,this.to=r,this.gapFrom=o,this.gapTo=i,this.slice=s,this.insert=a,this.structure=!!l}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.apply=function(r){if(this.structure&&(Os(r,this.from,this.gapFrom)||Os(r,this.gapTo,this.to)))return Bt.fail("Structure gap-replace would overwrite content");var o=r.slice(this.gapFrom,this.gapTo);if(o.openStart||o.openEnd)return Bt.fail("Gap is not a flat range");var i=this.slice.insertAt(this.insert,o.content);return i?Bt.fromReplace(r,this.from,this.to,i):Bt.fail("Content does not fit in gap")},t.prototype.getMap=function(){return new kt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},t.prototype.invert=function(r){var o=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+o,this.from+this.insert,this.from+this.insert+o,r.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},t.prototype.map=function(r){var o=r.mapResult(this.from,1),i=r.mapResult(this.to,-1),s=r.map(this.gapFrom,-1),a=r.map(this.gapTo,1);return o.deleted&&i.deleted||si.pos?null:new t(o.pos,i.pos,s,a,this.slice,this.insert,this.structure)},t.prototype.toJSON=function(){var r={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(r.slice=this.slice.toJSON()),this.structure&&(r.structure=!0),r},t.fromJSON=function(r,o){if(typeof o.from!="number"||typeof o.to!="number"||typeof o.gapFrom!="number"||typeof o.gapTo!="number"||typeof o.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new t(o.from,o.to,o.gapFrom,o.gapTo,R.fromJSON(r,o.slice),o.insert,!!o.structure)},t}(Ot);Ot.jsonID("replaceAround",dn);function Os(n,t,e){for(var r=n.resolve(t),o=e-t,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}lt.prototype.lift=function(n,t){for(var e=n.$from,r=n.$to,o=n.depth,i=e.before(o+1),s=r.after(o+1),a=i,l=s,c=E.empty,u=0,p=o,d=!1;p>t;p--)d||e.index(p)>0?(d=!0,c=E.from(e.node(p).copy(c)),u++):a--;for(var h=E.empty,m=0,g=o,y=!1;g>t;g--)y||r.after(g+1)=0;r--)e=E.from(t[r].type.create(t[r].attrs,e));var o=n.start,i=n.end;return this.step(new dn(o,i,o,i,new R(e,0,0),t.length,!0))},lt.prototype.setBlockType=function(n,t,e,r){var o=this;if(t===void 0&&(t=n),!e.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var i=this.steps.length;return this.doc.nodesBetween(n,t,function(s,a){if(s.isTextblock&&!s.hasMarkup(e,r)&&Uv(o.doc,o.mapping.slice(i).map(a),e)){o.clearIncompatible(o.mapping.slice(i).map(a,1),e);var l=o.mapping.slice(i),c=l.map(a,1),u=l.map(a+s.nodeSize,1);return o.step(new dn(c,u,c+1,u-1,new R(E.from(e.create(r,null,s.marks)),0,0),1,!0)),!1}}),this};function Uv(n,t,e){var r=n.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,e)}lt.prototype.setNodeMarkup=function(n,t,e,r){var o=this.doc.nodeAt(n);if(!o)throw new RangeError("No node at given position");t||(t=o.type);var i=t.create(e,null,r||o.marks);if(o.isLeaf)return this.replaceWith(n,n+o.nodeSize,i);if(!t.validContent(o.content))throw new RangeError("Invalid content for node type "+t.name);return this.step(new dn(n,n+o.nodeSize,n+1,n+o.nodeSize-1,new R(E.from(i),0,0),1,!0))},lt.prototype.split=function(n,t,e){t===void 0&&(t=1);for(var r=this.doc.resolve(n),o=E.empty,i=E.empty,s=r.depth,a=r.depth-t,l=t-1;s>a;s--,l--){o=E.from(r.node(s).copy(o));var c=e&&e[l];i=E.from(c?c.type.create(c.attrs,i):r.node(s).copy(i))}return this.step(new Ke(n,n,new R(o.append(i),t,t),!0))},lt.prototype.join=function(n,t){t===void 0&&(t=1);var e=new Ke(n-t,n+t,R.empty,!0);return this.step(e)};function Gv(n,t,e){var r=n.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),e))return t;if(r.parentOffset==0)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,e))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,e))return r.after(s+1);if(a=i.pos?null:new t(o.pos,i.pos,this.mark)},t.prototype.merge=function(r){if(r instanceof t&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from)return new t(Math.min(this.from,r.from),Math.max(this.to,r.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(r,o){if(typeof o.from!="number"||typeof o.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new t(o.from,o.to,r.markFromJSON(o.mark))},t}(Ot);Ot.jsonID("addMark",Ts);var wr=function(n){function t(e,r,o){n.call(this),this.from=e,this.to=r,this.mark=o}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.apply=function(r){var o=this,i=r.slice(this.from,this.to),s=new R(Ns(i.content,function(a){return a.mark(o.mark.removeFromSet(a.marks))}),i.openStart,i.openEnd);return Bt.fromReplace(r,this.from,this.to,s)},t.prototype.invert=function(){return new Ts(this.from,this.to,this.mark)},t.prototype.map=function(r){var o=r.mapResult(this.from,1),i=r.mapResult(this.to,-1);return o.deleted&&i.deleted||o.pos>=i.pos?null:new t(o.pos,i.pos,this.mark)},t.prototype.merge=function(r){if(r instanceof t&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from)return new t(Math.min(this.from,r.from),Math.max(this.to,r.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(r,o){if(typeof o.from!="number"||typeof o.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new t(o.from,o.to,r.markFromJSON(o.mark))},t}(Ot);Ot.jsonID("removeMark",wr),lt.prototype.addMark=function(n,t,e){var r=this,o=[],i=[],s=null,a=null;return this.doc.nodesBetween(n,t,function(l,c,u){if(!!l.isInline){var p=l.marks;if(!e.isInSet(p)&&u.type.allowsMarkType(e.type)){for(var d=Math.max(c,n),h=Math.min(c+l.nodeSize,t),m=e.addToSet(p),g=0;g=0;d--)this.step(o[d]);return this};function Yv(n,t,e,r){if(e===void 0&&(e=t),r===void 0&&(r=R.empty),t==e&&!r.size)return null;var o=n.resolve(t),i=n.resolve(e);return Su(o,i,r)?new Ke(t,e,r):new oe(o,i,r).fit()}lt.prototype.replace=function(n,t,e){t===void 0&&(t=n),e===void 0&&(e=R.empty);var r=Yv(this.doc,n,t,e);return r&&this.step(r),this},lt.prototype.replaceWith=function(n,t,e){return this.replace(n,t,new R(E.from(e),0,0))},lt.prototype.delete=function(n,t){return this.replace(n,t,R.empty)},lt.prototype.insert=function(n,t){return this.replaceWith(n,n,t)};function Su(n,t,e){return!e.openStart&&!e.openEnd&&n.start()==t.start()&&n.parent.canReplace(n.index(),t.index(),e.content)}var oe=function(t,e,r){this.$to=e,this.$from=t,this.unplaced=r,this.frontier=[];for(var o=0;o<=t.depth;o++){var i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}this.placed=E.empty;for(var s=t.depth;s>0;s--)this.placed=E.from(t.node(s).copy(this.placed))},xu={depth:{configurable:!0}};xu.depth.get=function(){return this.frontier.length-1},oe.prototype.fit=function(){for(;this.unplaced.size;){var t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}var e=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,o=this.$from,i=this.close(e<0?this.$to:o.doc.resolve(e));if(!i)return null;for(var s=this.placed,a=o.depth,l=i.depth;a&&l&&s.childCount==1;)s=s.firstChild.content,a--,l--;var c=new R(s,a,l);if(e>-1)return new dn(o.pos,e,this.$to.pos,this.$to.end(),c,r);if(c.size||o.pos!=this.$to.pos)return new Ke(o.pos,i.pos,c)},oe.prototype.findFittable=function(){for(var t=1;t<=2;t++)for(var e=this.unplaced.openStart;e>=0;e--){var r=void 0,o=void 0;e?(o=_s(this.unplaced.content,e-1).firstChild,r=o.content):r=this.unplaced.content;for(var i=r.firstChild,s=this.depth;s>=0;s--){var a=this.frontier[s],l=a.type,c=a.match,u=void 0,p=void 0;if(t==1&&(i?c.matchType(i.type)||(p=c.fillBefore(E.from(i),!1)):l.compatibleContent(o.type)))return{sliceDepth:e,frontierDepth:s,parent:o,inject:p};if(t==2&&i&&(u=c.findWrapping(i.type)))return{sliceDepth:e,frontierDepth:s,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}},oe.prototype.openMore=function(){var t=this.unplaced,e=t.content,r=t.openStart,o=t.openEnd,i=_s(e,r);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new R(e,r+1,Math.max(o,i.size+r>=e.size-o?r+1:0)),!0)},oe.prototype.dropNode=function(){var t=this.unplaced,e=t.content,r=t.openStart,o=t.openEnd,i=_s(e,r);if(i.childCount<=1&&r>0){var s=e.size-r<=r+i.size;this.unplaced=new R(Sr(e,r-1,1),r-1,s?r-1:o)}else this.unplaced=new R(Sr(e,r,1),r,o)},oe.prototype.placeNodes=function(t){for(var e=t.sliceDepth,r=t.frontierDepth,o=t.parent,i=t.inject,s=t.wrap;this.depth>r;)this.closeFrontierNode();if(s)for(var a=0;a1||u==0||b.content.size)&&(m=N,d.push(Mu(b.mark(g.allowedMarks(b.marks)),p==1?u:0,p==c.childCount?k:-1)))}var v=p==c.childCount;v||(k=-1),this.placed=xr(this.placed,r,E.from(d)),this.frontier[r].match=m,v&&k<0&&o&&o.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var O=0,C=c;O1&&i==this.$to.end(--o);)++i;return i},oe.prototype.findCloseLevel=function(t){t:for(var e=Math.min(this.depth,t.depth);e>=0;e--){var r=this.frontier[e],o=r.match,i=r.type,s=e=0;l--){var c=this.frontier[l],u=c.match,p=c.type,d=As(t,l,p,u,!0);if(!d||d.childCount)continue t}return{depth:e,fit:a,move:s?t.doc.resolve(t.after(e+1)):t}}}},oe.prototype.close=function(t){var e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=xr(this.placed,e.depth,e.fit)),t=e.move;for(var r=e.depth+1;r<=t.depth;r++){var o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t},oe.prototype.openFrontierNode=function(t,e,r){var o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=xr(this.placed,this.depth,E.from(t.create(e,r))),this.frontier.push({type:t,match:t.contentMatch})},oe.prototype.closeFrontierNode=function(){var t=this.frontier.pop(),e=t.match.fillBefore(E.empty,!0);e.childCount&&(this.placed=xr(this.placed,this.frontier.length,e))},Object.defineProperties(oe.prototype,xu);function Sr(n,t,e){return t==0?n.cutByIndex(e):n.replaceChild(0,n.firstChild.copy(Sr(n.firstChild.content,t-1,e)))}function xr(n,t,e){return t==0?n.append(e):n.replaceChild(n.childCount-1,n.lastChild.copy(xr(n.lastChild.content,t-1,e)))}function _s(n,t){for(var e=0;e1&&(r=r.replaceChild(0,Mu(r.firstChild,t-1,r.childCount==1?e-1:0))),t>0&&(r=n.type.contentMatch.fillBefore(r).append(r),e<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(E.empty,!0)))),n.copy(r)}function As(n,t,e,r,o){var i=n.node(t),s=o?n.indexAfter(t):n.index(t);if(s==i.childCount&&!e.compatibleContent(i.type))return null;var a=r.fillBefore(i.content,!0,s);return a&&!Xv(e,i.content,s)?a:null}function Xv(n,t,e){for(var r=e;r0;a--,l--){var c=r.node(a).type.spec;if(c.defining||c.isolating)break;i.indexOf(a)>-1?s=a:r.before(a)==l&&i.splice(1,0,-a)}for(var u=i.indexOf(s),p=[],d=e.openStart,h=e.content,m=0;;m++){var g=h.firstChild;if(p.push(g),m==e.openStart)break;h=g.content}d>0&&p[d-1].type.spec.defining&&r.node(u).type!=p[d-1].type?d-=1:d>=2&&p[d-1].isTextblock&&p[d-2].type.spec.defining&&r.node(u).type!=p[d-2].type&&(d-=2);for(var y=e.openStart;y>=0;y--){var k=(y+d+1)%(e.openStart+1),b=p[k];if(!!b)for(var N=0;N=0&&(this.replace(n,t,e),!(this.steps.length>I));V--){var F=i[V];F<0||(n=r.before(F),t=o.after(F))}return this};function Cu(n,t,e,r,o){if(tr){var s=o.contentMatchAt(0),a=s.fillBefore(n).append(n);n=a.append(s.matchFragment(a).fillBefore(E.empty,!0))}return n}lt.prototype.replaceRangeWith=function(n,t,e){if(!e.isInline&&n==t&&this.doc.resolve(n).parent.content.size){var r=Gv(this.doc,n,e.type);r!=null&&(n=t=r)}return this.replaceRange(n,t,new R(E.from(e),0,0))},lt.prototype.deleteRange=function(n,t){for(var e=this.doc.resolve(n),r=this.doc.resolve(t),o=Eu(e,r),i=0;i0&&(a||e.node(s-1).canReplace(e.index(s-1),r.indexAfter(s-1))))return this.delete(e.before(s),r.after(s))}for(var l=1;l<=e.depth&&l<=r.depth;l++)if(n-e.start(l)==e.depth-l&&t>e.end(l)&&r.end(l)-t!=r.depth-l)return this.delete(e.before(l),t);return this.delete(n,t)};function Eu(n,t){for(var e=[],r=Math.min(n.depth,t.depth),o=r;o>=0;o--){var i=n.start(o);if(it.pos+(t.depth-o)||n.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==n.depth&&o==t.depth&&n.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&e.push(o)}return e}var Ds=Object.create(null),it=function(t,e,r){this.ranges=r||[new Qv(t.min(e),t.max(e))],this.$anchor=t,this.$head=e},Ue={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};Ue.anchor.get=function(){return this.$anchor.pos},Ue.head.get=function(){return this.$head.pos},Ue.from.get=function(){return this.$from.pos},Ue.to.get=function(){return this.$to.pos},Ue.$from.get=function(){return this.ranges[0].$from},Ue.$to.get=function(){return this.ranges[0].$to},Ue.empty.get=function(){for(var n=this.ranges,t=0;t=0;i--){var s=e<0?Jn(t.node(0),t.node(i),t.before(i+1),t.index(i),e,r):Jn(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,e,r);if(s)return s}},it.near=function(t,e){return e===void 0&&(e=1),this.findFrom(t,e)||this.findFrom(t,-e)||new Er(t.node(0))},it.atStart=function(t){return Jn(t,t,0,0,1)||new Er(t)},it.atEnd=function(t){return Jn(t,t,t.content.size,t.childCount,-1)||new Er(t)},it.fromJSON=function(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");var r=Ds[e.type];if(!r)throw new RangeError("No selection type "+e.type+" defined");return r.fromJSON(t,e)},it.jsonID=function(t,e){if(t in Ds)throw new RangeError("Duplicate use of selection JSON ID "+t);return Ds[t]=e,e.prototype.jsonID=t,e},it.prototype.getBookmark=function(){return Mr.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(it.prototype,Ue),it.prototype.visible=!0;var Qv=function(t,e){this.$from=t,this.$to=e},Mr=function(n){function t(r,o){o===void 0&&(o=r),n.call(this,r,o)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={$cursor:{configurable:!0}};return e.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},t.prototype.map=function(o,i){var s=o.resolve(i.map(this.head));if(!s.parent.inlineContent)return n.near(s);var a=o.resolve(i.map(this.anchor));return new t(a.parent.inlineContent?a:s,s)},t.prototype.replace=function(o,i){if(i===void 0&&(i=R.empty),n.prototype.replace.call(this,o,i),i==R.empty){var s=this.$from.marksAcross(this.$to);s&&o.ensureMarks(s)}},t.prototype.eq=function(o){return o instanceof t&&o.anchor==this.anchor&&o.head==this.head},t.prototype.getBookmark=function(){return new Cr(this.anchor,this.head)},t.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},t.fromJSON=function(o,i){if(typeof i.anchor!="number"||typeof i.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new t(o.resolve(i.anchor),o.resolve(i.head))},t.create=function(o,i,s){s===void 0&&(s=i);var a=o.resolve(i);return new this(a,s==i?a:o.resolve(s))},t.between=function(o,i,s){var a=o.pos-i.pos;if((!s||a)&&(s=a>=0?1:-1),!i.parent.inlineContent){var l=n.findFrom(i,s,!0)||n.findFrom(i,-s,!0);if(l)i=l.$head;else return n.near(i,s)}return o.parent.inlineContent||(a==0?o=i:(o=(n.findFrom(o,-s,!0)||n.findFrom(o,s,!0)).$anchor,o.pos0?0:1);o>0?s=0;s+=o){var a=t.child(s);if(a.isAtom){if(!i&&Hn.isSelectable(a))return Hn.create(n,e-(o<0?a.nodeSize:0))}else{var l=Jn(n,a,e+o,o<0?a.childCount:0,o,i);if(l)return l}e+=a.nodeSize*o}}function Ou(n,t,e){var r=n.steps.length-1;if(!(r0},t.prototype.setStoredMarks=function(o){return this.storedMarks=o,this.updated|=Co,this},t.prototype.ensureMarks=function(o){return q.sameSet(this.storedMarks||this.selection.$from.marks(),o)||this.setStoredMarks(o),this},t.prototype.addStoredMark=function(o){return this.ensureMarks(o.addToSet(this.storedMarks||this.selection.$head.marks()))},t.prototype.removeStoredMark=function(o){return this.ensureMarks(o.removeFromSet(this.storedMarks||this.selection.$head.marks()))},e.storedMarksSet.get=function(){return(this.updated&Co)>0},t.prototype.addStep=function(o,i){n.prototype.addStep.call(this,o,i),this.updated=this.updated&~Co,this.storedMarks=null},t.prototype.setTime=function(o){return this.time=o,this},t.prototype.replaceSelection=function(o){return this.selection.replace(this,o),this},t.prototype.replaceSelectionWith=function(o,i){var s=this.selection;return i!==!1&&(o=o.mark(this.storedMarks||(s.empty?s.$from.marks():s.$from.marksAcross(s.$to)||q.none))),s.replaceWith(this,o),this},t.prototype.deleteSelection=function(){return this.selection.replace(this),this},t.prototype.insertText=function(o,i,s){s===void 0&&(s=i);var a=this.doc.type.schema;if(i==null)return o?this.replaceSelectionWith(a.text(o),!0):this.deleteSelection();if(!o)return this.deleteRange(i,s);var l=this.storedMarks;if(!l){var c=this.doc.resolve(i);l=s==i?c.marks():c.marksAcross(this.doc.resolve(s))}return this.replaceRangeWith(i,s,a.text(o,l)),this.selection.empty||this.setSelection(it.near(this.selection.$to)),this},t.prototype.setMeta=function(o,i){return this.meta[typeof o=="string"?o:o.key]=i,this},t.prototype.getMeta=function(o){return this.meta[typeof o=="string"?o:o.key]},e.isGeneric.get=function(){for(var r in this.meta)return!1;return!0},t.prototype.scrollIntoView=function(){return this.updated|=Tu,this},e.scrolledIntoView.get=function(){return(this.updated&Tu)>0},Object.defineProperties(t.prototype,e),t}(lt);function _u(n,t){return!t||!n?n:n.bind(t)}var Or=function(t,e,r){this.name=t,this.init=_u(e.init,r),this.apply=_u(e.apply,r)},eg=[new Or("doc",{init:function(t){return t.doc||t.schema.topNodeType.createAndFill()},apply:function(t){return t.doc}}),new Or("selection",{init:function(t,e){return t.selection||it.atStart(e.doc)},apply:function(t){return t.selection}}),new Or("storedMarks",{init:function(t){return t.storedMarks||null},apply:function(t,e,r,o){return o.selection.$cursor?t.storedMarks:null}}),new Or("scrollToSelection",{init:function(){return 0},apply:function(t,e){return t.scrolledIntoView?e+1:e}})],Rs=function(t,e){var r=this;this.schema=t,this.fields=eg.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),e&&e.forEach(function(o){if(r.pluginsByKey[o.key])throw new RangeError("Adding different instances of a keyed plugin ("+o.key+")");r.plugins.push(o),r.pluginsByKey[o.key]=o,o.spec.state&&r.fields.push(new Or(o.key,o.spec.state,o))})},Pt=function(t){this.config=t},Eo={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};Eo.schema.get=function(){return this.config.schema},Eo.plugins.get=function(){return this.config.plugins},Pt.prototype.apply=function(t){return this.applyTransaction(t).state},Pt.prototype.filterTransaction=function(t,e){e===void 0&&(e=-1);for(var r=0;r-1&&Nr.splice(e,1)},Object.defineProperties(Pt.prototype,Eo);var Nr=[];function Au(n,t,e){for(var r in n){var o=n[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=Au(o,t,{})),e[r]=o}return e}var Du=function(t){this.props={},t.props&&Au(t.props,this,this.props),this.spec=t,this.key=t.key?t.key.key:Ru("plugin")};Du.prototype.getState=function(t){return t[this.key]};var Vs=Object.create(null);function Ru(n){return n in Vs?n+"$"+ ++Vs[n]:(Vs[n]=0,n+"$")}var Is=function(t){t===void 0&&(t="key"),this.key=Ru(t)};Is.prototype.get=function(t){return t.config.pluginsByKey[this.key]},Is.prototype.getState=function(t){return t[this.key]};const ng=new Is("characterLimit"),rg=yt.create({name:"characterCount",addOptions(){return{limit:0}},addProseMirrorPlugins(){const{options:n}=this;return[new Du({key:ng,appendTransaction:(t,e,r)=>{const o=r.doc.content.size;if(n.limit&&o>n.limit)return r.tr.insertText("",n.limit+1,o)}})]}}),og=yt.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>n.style.textAlign||this.options.defaultAlignment,renderHTML:n=>n.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${n.textAlign}`}}}}]},addCommands(){return{setTextAlign:n=>({commands:t})=>this.options.alignments.includes(n)?this.options.types.every(e=>t.updateAttributes(e,{textAlign:n})):!1,unsetTextAlign:()=>({commands:n})=>this.options.types.every(t=>n.resetAttributes(t,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),ig=bt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:n}){return["hr",pt(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n})=>n().insertContent({type:this.name}).command(({tr:t,dispatch:e})=>{var r;if(e){const{parent:o,pos:i}=t.selection.$from,s=i+1;if(t.doc.nodeAt(s))t.setSelection(K.create(t.doc,s));else{const l=(r=o.type.contentMatch.defaultType)===null||r===void 0?void 0:r.create();l&&(t.insert(s,l),t.setSelection(K.create(t.doc,s)))}t.scrollIntoView()}return!0}).run()}},addInputRules(){return[uc({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),sg=/(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))/;bt.create({name:"image",addOptions(){return{inline:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:"img[src]"}]},renderHTML({HTMLAttributes:n}){return["img",pt(this.options.HTMLAttributes,n)]},addCommands(){return{setImage:n=>({commands:t})=>t.insertContent({type:this.name,attrs:n})}},addInputRules(){return[uc({find:sg,type:this.type,getAttributes:n=>{const[,,t,e,r]=n;return{src:e,alt:t,title:r}}})]}});const ag=/^\s*([-+*])\s$/,Vu=bt.create({name:"bulletList",addOptions(){return{HTMLAttributes:{}}},group:"block list",content:"listItem+",parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:n}){return["ul",pt(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n})=>n.toggleList("bulletList","listItem")}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){return[ao({find:ag,type:this.type})]}}),lg=/^(\d+)\.\s$/,Iu=bt.create({name:"orderedList",addOptions(){return{HTMLAttributes:{}}},group:"block list",content:"listItem+",addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const r=n,{start:t}=r,e=Gu(r,["start"]);return t===1?["ol",pt(this.options.HTMLAttributes,e),0]:["ol",pt(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n})=>n.toggleList("orderedList","listItem")}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){return[ao({find:lg,type:this.type,getAttributes:n=>({start:+n[1]}),joinPredicate:(n,t)=>t.childCount+t.attrs.start===+n[1]})]}}),cg=bt.create({name:"taskList",addOptions(){return{HTMLAttributes:{}}},group:"block list",content:"taskItem+",parseHTML(){return[{tag:'ul[data-type="taskList"]',priority:51}]},renderHTML({HTMLAttributes:n}){return["ul",pt(this.options.HTMLAttributes,n,{"data-type":"taskList"}),0]},addCommands(){return{toggleTaskList:()=>({commands:n})=>n.toggleList("taskList","taskItem")}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),ug=/^\s*(\[([ |x])\])\s$/,fg=bt.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{}}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:n=>n.getAttribute("data-checked")==="true",renderHTML:n=>({"data-checked":n.checked})}}},parseHTML(){return[{tag:'li[data-type="taskItem"]',priority:51}]},renderHTML({node:n,HTMLAttributes:t}){return["li",pt(this.options.HTMLAttributes,t,{"data-type":"taskItem"}),["label",["input",{type:"checkbox",checked:n.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const n={Enter:()=>this.editor.commands.splitListItem("taskItem"),"Shift-Tab":()=>this.editor.commands.liftListItem("taskItem")};return this.options.nested?Lt(x({},n),{Tab:()=>this.editor.commands.sinkListItem("taskItem")}):n},addNodeView(){return({node:n,HTMLAttributes:t,getPos:e,editor:r})=>{const o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div");return i.contentEditable="false",a.type="checkbox",a.addEventListener("change",c=>{if(!r.isEditable){a.checked=!a.checked;return}const{checked:u}=c.target;r.isEditable&&typeof e=="function"&&r.chain().focus().command(({tr:p})=>(p.setNodeMarkup(e(),void 0,{checked:u}),!0)).run()}),Object.entries(this.options.HTMLAttributes).forEach(([c,u])=>{o.setAttribute(c,u)}),o.dataset.checked=n.attrs.checked,n.attrs.checked&&a.setAttribute("checked","checked"),i.append(a,s),o.append(i,l),Object.entries(t).forEach(([c,u])=>{o.setAttribute(c,u)}),{dom:o,contentDOM:l,update:c=>c.type!==this.type?!1:(o.dataset.checked=c.attrs.checked,c.attrs.checked?a.setAttribute("checked","checked"):a.removeAttribute("checked"),!0)}}},addInputRules(){return[ao({find:ug,type:this.type,getAttributes:n=>({checked:n[n.length-1]==="x"})})]}}),pg=/^\s*>\s$/,dg=bt.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block*",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:n}){return["blockquote",pt(this.options.HTMLAttributes,n),0]},addCommands(){return{setBlockquote:()=>({commands:n})=>n.wrapIn("blockquote"),toggleBlockquote:()=>({commands:n})=>n.toggleWrap("blockquote"),unsetBlockquote:()=>({commands:n})=>n.lift("blockquote")}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[ao({find:pg,type:this.type})]}}),hg=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,mg=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,vg=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,gg=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,yg=qe.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:n=>n.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}]},renderHTML({HTMLAttributes:n}){return["strong",pt(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark("bold"),toggleBold:()=>({commands:n})=>n.toggleMark("bold"),unsetBold:()=>({commands:n})=>n.unsetMark("bold")}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold()}},addInputRules(){return[An({find:hg,type:this.type}),An({find:vg,type:this.type})]},addPasteRules(){return[Dn({find:mg,type:this.type}),Dn({find:gg,type:this.type})]}}),bg=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,kg=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,wg=qe.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:n}){return["code",pt(this.options.HTMLAttributes,n),0]},addCommands(){return{setCode:()=>({commands:n})=>n.setMark("code"),toggleCode:()=>({commands:n})=>n.toggleMark("code"),unsetCode:()=>({commands:n})=>n.unsetMark("code")}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[An({find:bg,type:this.type})]},addPasteRules(){return[Dn({find:kg,type:this.type})]}}),Sg=bt.create({name:"doc",topNode:!0,content:"block+"});function xg(n){return n===void 0&&(n={}),new Ht({view:function(e){return new we(e,n)}})}var we=function(t,e){var r=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(o){var i=function(s){return r[o](s)};return t.dom.addEventListener(o,i),{name:o,handler:i}})};we.prototype.destroy=function(){var t=this;this.handlers.forEach(function(e){var r=e.name,o=e.handler;return t.editorView.dom.removeEventListener(r,o)})},we.prototype.update=function(t,e){this.cursorPos!=null&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())},we.prototype.setCursor=function(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},we.prototype.updateOverlay=function(){var t=this.editorView.state.doc.resolve(this.cursorPos),e;if(!t.parent.inlineContent){var r=t.nodeBefore,o=t.nodeAfter;if(r||o){var i=this.editorView.nodeDOM(this.cursorPos-(r?r.nodeSize:0)).getBoundingClientRect(),s=r?i.bottom:i.top;r&&o&&(s=(s+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:i.left,right:i.right,top:s-this.width/2,bottom:s+this.width/2}}}if(!e){var a=this.editorView.coordsAtPos(this.cursorPos);e={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}var l=this.editorView.dom.offsetParent;this.element||(this.element=l.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,u;if(!l||l==document.body&&getComputedStyle(l).position=="static")c=-pageXOffset,u=-pageYOffset;else{var p=l.getBoundingClientRect();c=p.left-l.scrollLeft,u=p.top-l.scrollTop}this.element.style.left=e.left-c+"px",this.element.style.top=e.top-u+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"},we.prototype.scheduleRemoval=function(t){var e=this;clearTimeout(this.timeout),this.timeout=setTimeout(function(){return e.setCursor(null)},t)},we.prototype.dragover=function(t){if(!!this.editorView.editable){var e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY});if(e){var r=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&(r=ha(this.editorView.state.doc,r,this.editorView.dragging.slice),r==null))return this.setCursor(null);this.setCursor(r),this.scheduleRemoval(5e3)}}},we.prototype.dragend=function(){this.scheduleRemoval(20)},we.prototype.drop=function(){this.scheduleRemoval(20)},we.prototype.dragleave=function(t){(t.target==this.editorView.dom||!this.editorView.dom.contains(t.relatedTarget))&&this.setCursor(null)};const Mg=yt.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:null}},addProseMirrorPlugins(){return[xg(this.options)]}});var pe=function(n){function t(e){n.call(this,e,e)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.map=function(r,o){var i=r.resolve(o.map(this.head));return t.valid(i)?new t(i):n.near(i)},t.prototype.content=function(){return T.empty},t.prototype.eq=function(r){return r instanceof t&&r.head==this.head},t.prototype.toJSON=function(){return{type:"gapcursor",pos:this.head}},t.fromJSON=function(r,o){if(typeof o.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new t(r.resolve(o.pos))},t.prototype.getBookmark=function(){return new Oo(this.anchor)},t.valid=function(r){var o=r.parent;if(o.isTextblock||!Cg(r)||!Eg(r))return!1;var i=o.type.spec.allowGapCursor;if(i!=null)return i;var s=o.contentMatchAt(r.index()).defaultType;return s&&s.isTextblock},t.findFrom=function(r,o,i){t:for(;;){if(!i&&t.valid(r))return r;for(var s=r.pos,a=null,l=r.depth;;l--){var c=r.node(l);if(o>0?r.indexAfter(l)0){a=c.child(o>0?r.indexAfter(l):r.index(l)-1);break}else if(l==0)return null;s+=o;var u=r.doc.resolve(s);if(t.valid(u))return u}for(;;){var p=o>0?a.firstChild:a.lastChild;if(!p){if(a.isAtom&&!a.isText&&!P.isSelectable(a)){r=r.doc.resolve(s+a.nodeSize*o),i=!1;continue t}break}a=p,s+=o;var d=r.doc.resolve(s);if(t.valid(d))return d}return null}},t}(z);pe.prototype.visible=!1,z.jsonID("gapcursor",pe);var Oo=function(t){this.pos=t};Oo.prototype.map=function(t){return new Oo(t.map(this.pos))},Oo.prototype.resolve=function(t){var e=t.resolve(this.pos);return pe.valid(e)?new pe(e):z.near(e)};function Cg(n){for(var t=n.depth;t>=0;t--){var e=n.index(t);if(e!=0)for(var r=n.node(t).child(e-1);;r=r.lastChild){if(r.childCount==0&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function Eg(n){for(var t=n.depth;t>=0;t--){var e=n.indexAfter(t),r=n.node(t);if(e!=r.childCount)for(var o=r.child(e);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}var Og=function(){return new Ht({props:{decorations:_g,createSelectionBetween:function(t,e,r){if(e.pos==r.pos&&pe.valid(r))return new pe(r)},handleClick:Tg,handleKeyDown:Ng}})},Ng=Gl({ArrowLeft:No("horiz",-1),ArrowRight:No("horiz",1),ArrowUp:No("vert",-1),ArrowDown:No("vert",1)});function No(n,t){var e=n=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,i){var s=r.selection,a=t>0?s.$to:s.$from,l=s.empty;if(s instanceof K){if(!i.endOfTextblock(e)||a.depth==0)return!1;l=!1,a=r.doc.resolve(t>0?a.after():a.before())}var c=pe.findFrom(a,t,l);return c?(o&&o(r.tr.setSelection(new pe(c))),!0):!1}}function Tg(n,t,e){if(!n.editable)return!1;var r=n.state.doc.resolve(t);if(!pe.valid(r))return!1;var o=n.posAtCoords({left:e.clientX,top:e.clientY}),i=o.inside;return i>-1&&P.isSelectable(n.state.doc.nodeAt(i))?!1:(n.dispatch(n.state.tr.setSelection(new pe(r))),!0)}function _g(n){if(!(n.selection instanceof pe))return null;var t=document.createElement("div");return t.className="ProseMirror-gapcursor",Y.create(n.doc,[ut.widget(n.selection.head,t,{key:"gapcursor"})])}const Ag=yt.create({name:"gapCursor",addProseMirrorPlugins(){return[Og()]},extendNodeSchema(n){var t;const e={name:n.name,options:n.options,storage:n.storage};return{allowGapCursor:(t=L(_(n,"allowGapCursor",e)))!==null&&t!==void 0?t:null}}}),Dg=bt.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:n}){return["br",pt(this.options.HTMLAttributes,n)]},renderText(){return` +`},addCommands(){return{setHardBreak:()=>({commands:n,chain:t,state:e,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:o,storedMarks:i}=e;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=i||o.$to.parentOffset&&o.$from.marks();return t().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&s){const p=l.filter(d=>a.includes(d.type.name));c.ensureMarks(p)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Rg=bt.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:t}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,pt(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:n=>({commands:t})=>this.options.levels.includes(n.level)?t.setNode("heading",n):!1,toggleHeading:n=>({commands:t})=>this.options.levels.includes(n.level)?t.toggleNode("heading","paragraph",n):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((n,t)=>Lt(x({},n),{[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(n=>ts({find:new RegExp(`^(#{1,${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var To=200,wt=function(){};wt.prototype.append=function(t){return t.length?(t=wt.from(t),!this.length&&t||t.length=e?wt.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},wt.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},wt.prototype.forEach=function(t,e,r){e===void 0&&(e=0),r===void 0&&(r=this.length),e<=r?this.forEachInner(t,e,r,0):this.forEachInvertedInner(t,e,r,0)},wt.prototype.map=function(t,e,r){e===void 0&&(e=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(t(i,s))},e,r),o},wt.from=function(t){return t instanceof wt?t:t&&t.length?new Bu(t):wt.empty};var Bu=function(n){function t(r){n.call(this),this.values=r}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new t(this.values.slice(o,i))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,i,s,a){for(var l=i;l=s;l--)if(o(this.values[l],a+l)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=To)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=To)return new t(o.flatten().concat(this.values))},e.length.get=function(){return this.values.length},e.depth.get=function(){return 0},Object.defineProperties(t.prototype,e),t}(wt);wt.empty=new Bu([]);var Vg=function(n){function t(e,r){n.call(this),this.left=e,this.right=r,this.length=e.length+r.length,this.depth=Math.max(e.depth,r.depth)+1}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return ra&&this.right.forEachInner(r,Math.max(o-a,0),Math.min(this.length,i)-a,s+a)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,i,s){var a=this.left.length;if(o>a&&this.right.forEachInvertedInner(r,o-a,Math.max(i,a)-a,s+a)===!1||i=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(wt),Pu=wt,Ig=500,St=function(t,e){this.items=t,this.eventCount=e};St.prototype.popEvent=function(t,e){var r=this;if(this.eventCount==0)return null;for(var o=this.items.length;;o--){var i=this.items.get(o-1);if(i.selection){--o;break}}var s,a;e&&(s=this.remapping(o,this.items.length),a=s.maps.length);var l=t.tr,c,u,p=[],d=[];return this.items.forEach(function(h,m){if(!h.step){s||(s=r.remapping(o,m+1),a=s.maps.length),a--,d.push(h);return}if(s){d.push(new Se(h.map));var g=h.step.map(s.slice(a)),y;g&&l.maybeStep(g).doc&&(y=l.mapping.maps[l.mapping.maps.length-1],p.push(new Se(y,null,null,p.length+d.length))),a--,y&&s.appendMap(y,a)}else l.maybeStep(h.step);if(h.selection)return c=s?h.selection.map(s.slice(a)):h.selection,u=new St(r.items.slice(0,o).append(d.reverse().concat(p)),r.eventCount-1),!1},this.items.length,0),{remaining:u,transform:l,selection:c}},St.prototype.addTransform=function(t,e,r,o){for(var i=[],s=this.eventCount,a=this.items,l=!o&&a.length?a.get(a.length-1):null,c=0;cPg&&(a=Bg(a,h),s-=h),new St(a.append(i),s)},St.prototype.remapping=function(t,e){var r=new Mt;return this.items.forEach(function(o,i){var s=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:null;r.appendMap(o.map,s)},t,e),r},St.prototype.addMaps=function(t){return this.eventCount==0?this:new St(this.items.append(t.map(function(e){return new Se(e)})),this.eventCount)},St.prototype.rebased=function(t,e){if(!this.eventCount)return this;var r=[],o=Math.max(0,this.items.length-e),i=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(function(h){h.selection&&a--},o);var l=e;this.items.forEach(function(h){var m=i.getMirror(--l);if(m!=null){s=Math.min(s,m);var g=i.maps[m];if(h.step){var y=t.steps[m].invert(t.docs[m]),k=h.selection&&h.selection.map(i.slice(l+1,m));k&&a++,r.push(new Se(g,y,k))}else r.push(new Se(g))}},o);for(var c=[],u=e;uIg&&(d=d.compress(this.items.length-r.length)),d},St.prototype.emptyItemCount=function(){var t=0;return this.items.forEach(function(e){e.step||t++}),t},St.prototype.compress=function(t){t===void 0&&(t=this.items.length);var e=this.remapping(0,t),r=e.maps.length,o=[],i=0;return this.items.forEach(function(s,a){if(a>=t)o.push(s),s.selection&&i++;else if(s.step){var l=s.step.map(e.slice(r)),c=l&&l.getMap();if(r--,c&&e.appendMap(c,r),l){var u=s.selection&&s.selection.map(e.slice(r));u&&i++;var p=new Se(c.invert(),l,u),d,h=o.length-1;(d=o.length&&o[h].merge(p))?o[h]=d:o.push(p)}}else s.map&&r--},this.items.length,0),new St(Pu.from(o.reverse()),i)},St.empty=new St(Pu.empty,0);function Bg(n,t){var e;return n.forEach(function(r,o){if(r.selection&&t--==0)return e=o,!1}),n.slice(e)}var Se=function(t,e,r,o){this.map=t,this.step=e,this.selection=r,this.mirrorOffset=o};Se.prototype.merge=function(t){if(this.step&&t.step&&!t.selection){var e=t.step.merge(this.step);if(e)return new Se(e.getMap().invert(),e,this.selection)}};var Ge=function(t,e,r,o){this.done=t,this.undone=e,this.prevRanges=r,this.prevTime=o},Pg=20;function zg(n,t,e,r){var o=e.getMeta(Ye),i;if(o)return o.historyState;e.getMeta(Fg)&&(n=new Ge(n.done,n.undone,null,0));var s=e.getMeta("appendedTransaction");if(e.steps.length==0)return n;if(s&&s.getMeta(Ye))return s.getMeta(Ye).redo?new Ge(n.done.addTransform(e,null,r,_o(t)),n.undone,zu(e.mapping.maps[e.steps.length-1]),n.prevTime):new Ge(n.done,n.undone.addTransform(e,null,r,_o(t)),null,n.prevTime);if(e.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){var a=n.prevTime==0||!s&&(n.prevTime<(e.time||0)-r.newGroupDelay||!Lg(e,n.prevRanges)),l=s?Bs(n.prevRanges,e.mapping):zu(e.mapping.maps[e.steps.length-1]);return new Ge(n.done.addTransform(e,a?t.selection.getBookmark():null,r,_o(t)),St.empty,l,e.time)}else return(i=e.getMeta("rebased"))?new Ge(n.done.rebased(e,i),n.undone.rebased(e,i),Bs(n.prevRanges,e.mapping),n.prevTime):new Ge(n.done.addMaps(e.mapping.maps),n.undone.addMaps(e.mapping.maps),Bs(n.prevRanges,e.mapping),n.prevTime)}function Lg(n,t){if(!t)return!1;if(!n.docChanged)return!0;var e=!1;return n.mapping.maps[0].forEach(function(r,o){for(var i=0;i=t[i]&&(e=!0)}),e}function zu(n){var t=[];return n.forEach(function(e,r,o,i){return t.push(o,i)}),t}function Bs(n,t){if(!n)return null;for(var e=[],r=0;r({state:n,dispatch:t})=>Hu(n,t),redo:()=>({state:n,dispatch:t})=>Ju(n,t)}},addProseMirrorPlugins(){return[Hg(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}}),$g=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,qg=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,jg=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,Wg=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,Kg=qe.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:n=>n.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:n}){return["em",pt(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark("italic"),toggleItalic:()=>({commands:n})=>n.toggleMark("italic"),unsetItalic:()=>({commands:n})=>n.unsetMark("italic")}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[An({find:$g,type:this.type}),An({find:jg,type:this.type})]},addPasteRules(){return[Dn({find:qg,type:this.type}),Dn({find:Wg,type:this.type})]}}),Ug=bt.create({name:"listItem",addOptions(){return{HTMLAttributes:{}}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",pt(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem("listItem"),Tab:()=>this.editor.commands.sinkListItem("listItem"),"Shift-Tab":()=>this.editor.commands.liftListItem("listItem")}}}),Gg=bt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",pt(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode("paragraph")}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Yg=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,Xg=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,Qg=qe.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",pt(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark("strike"),toggleStrike:()=>({commands:n})=>n.toggleMark("strike"),unsetStrike:()=>({commands:n})=>n.unsetMark("strike")}},addKeyboardShortcuts(){return{"Mod-Shift-x":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[An({find:Yg,type:this.type})]},addPasteRules(){return[Dn({find:Xg,type:this.type})]}}),Zg=bt.create({name:"text",group:"inline"}),ty=yt.create({name:"starterKit",addExtensions(){var n,t,e,r,o,i,s,a,l,c,u,p,d,h,m,g,y,k;const b=[];return this.options.blockquote!==!1&&b.push(dg.configure((n=this.options)===null||n===void 0?void 0:n.blockquote)),this.options.bold!==!1&&b.push(yg.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.bulletList!==!1&&b.push(Vu.configure((e=this.options)===null||e===void 0?void 0:e.bulletList)),this.options.code!==!1&&b.push(wg.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&b.push(Xc.configure((o=this.options)===null||o===void 0?void 0:o.codeBlock)),this.options.document!==!1&&b.push(Sg.configure((i=this.options)===null||i===void 0?void 0:i.document)),this.options.dropcursor!==!1&&b.push(Mg.configure((s=this.options)===null||s===void 0?void 0:s.dropcursor)),this.options.gapcursor!==!1&&b.push(Ag.configure((a=this.options)===null||a===void 0?void 0:a.gapcursor)),this.options.hardBreak!==!1&&b.push(Dg.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&b.push(Rg.configure((c=this.options)===null||c===void 0?void 0:c.heading)),this.options.history!==!1&&b.push(Jg.configure((u=this.options)===null||u===void 0?void 0:u.history)),this.options.horizontalRule!==!1&&b.push(ig.configure((p=this.options)===null||p===void 0?void 0:p.horizontalRule)),this.options.italic!==!1&&b.push(Kg.configure((d=this.options)===null||d===void 0?void 0:d.italic)),this.options.listItem!==!1&&b.push(Ug.configure((h=this.options)===null||h===void 0?void 0:h.listItem)),this.options.orderedList!==!1&&b.push(Iu.configure((m=this.options)===null||m===void 0?void 0:m.orderedList)),this.options.paragraph!==!1&&b.push(Gg.configure((g=this.options)===null||g===void 0?void 0:g.paragraph)),this.options.strike!==!1&&b.push(Qg.configure((y=this.options)===null||y===void 0?void 0:y.strike)),this.options.text!==!1&&b.push(Zg.configure((k=this.options)===null||k===void 0?void 0:k.text)),b}});var ak="",Ao=(n,t)=>{for(const[e,r]of t)n[e]=r;return n};const ey={components:{EditorContent:Mv,BubbleMenu:Sv},props:{modelValue:{type:String,default:""},maxChars:{type:Number,default:0},bubbleMenu:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},bold:{type:Boolean,default:!0},italic:{type:Boolean,default:!0},strike:{type:Boolean,default:!0},underline:{type:Boolean,default:!0},code:{type:Boolean,default:!0},codeBlock:{type:Boolean,default:!0},blockquote:{type:Boolean,default:!0},bulletList:{type:Boolean,default:!0},orderedList:{type:Boolean,default:!0},taskList:{type:Boolean,default:!0},heading:{type:Boolean,default:!0},textAlign:{type:Boolean,default:!0},horizontalRule:{type:Boolean,default:!0},undoRedo:{type:Boolean,default:!0}},data(){return{editor:null,headingOpen:!1,alignOpen:!1}},watch:{modelValue(n){this.editor.getHTML()!==n&&this.editor.commands.setContent(this.modelValue,!1)},disabled(n){this.editor&&this.editor.setEditable(!n)}},methods:{insertImageFromURL(n){this.editor.chain().focus().setImage({src:n},!1).run()}},computed:{extensions(){return[ty,Ov,og,Xc,Iu.configure({class:"inline-flex"}),Vu.configure({class:"inline-flex"}),rg.configure({limit:this.maxChars}),cg,fg]},hasTextAlign(){return this.editor.isActive({textAlign:"left"})||this.editor.isActive({textAlign:"right"})||this.editor.isActive({textAlign:"center"})||this.editor.isActive({textAlign:"justify"})},charPercentage(){return Math.round(100/this.maxChars*this.editor.getCharacterCount())}},mounted(){this.editor=new xv({content:this.modelValue,extensions:this.extensions,editorProps:{attributes:{class:"h-full overflow-y-auto input"}},editable:!this.disabled}).on("update",({editor:n})=>{this.$emit("update:modelValue",n.getHTML())}),this.$watch(()=>this.maxChars,()=>{})},beforeUnmount(){this.editor.destroy()}},ny=["aria-label"],ry=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M7 5h6a3.5 3.5 0 0 1 0 7h-6z"}),f.createElementVNode("path",{d:"M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7"})],-1)],oy=["aria-label"],iy=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("line",{x1:"11",y1:"5",x2:"17",y2:"5"}),f.createElementVNode("line",{x1:"7",y1:"19",x2:"13",y2:"19"}),f.createElementVNode("line",{x1:"14",y1:"5",x2:"10",y2:"19"})],-1)],sy=["aria-label"],ay=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M7 5v9a5 5 0 0 0 10 0v-9"}),f.createElementVNode("path",{d:"M4 12h16"})],-1)],ly=["aria-label"],cy=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M7 5v5a5 5 0 0 0 10 0v-5"}),f.createElementVNode("path",{d:"M5 19h14"})],-1)],uy=["aria-label"],fy=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("polyline",{points:"7 8 3 12 7 16"}),f.createElementVNode("polyline",{points:"17 8 21 12 17 16"}),f.createElementVNode("line",{x1:"14",y1:"4",x2:"10",y2:"20"})],-1)],py=["aria-label"],dy=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),f.createElementVNode("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"}),f.createElementVNode("path",{d:"M10 13l-1 2l1 2"}),f.createElementVNode("path",{d:"M14 13l1 2l-1 2"})],-1)],hy=["aria-label"],my=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M6 15h15"}),f.createElementVNode("path",{d:"M21 19h-15"}),f.createElementVNode("path",{d:"M15 11h6"}),f.createElementVNode("path",{d:"M21 7h-6"}),f.createElementVNode("path",{d:"M9 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2"}),f.createElementVNode("path",{d:"M3 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2"})],-1)],vy=["aria-label"],gy=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("line",{x1:"9",y1:"6",x2:"20",y2:"6"}),f.createElementVNode("line",{x1:"9",y1:"12",x2:"20",y2:"12"}),f.createElementVNode("line",{x1:"9",y1:"18",x2:"20",y2:"18"}),f.createElementVNode("line",{x1:"5",y1:"6",x2:"5",y2:"6.01"}),f.createElementVNode("line",{x1:"5",y1:"12",x2:"5",y2:"12.01"}),f.createElementVNode("line",{x1:"5",y1:"18",x2:"5",y2:"18.01"})],-1)],yy=["aria-label"],by=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M11 6h9"}),f.createElementVNode("path",{d:"M11 12h9"}),f.createElementVNode("path",{d:"M12 18h8"}),f.createElementVNode("path",{d:"M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4"}),f.createElementVNode("path",{d:"M6 10v-6l-2 2"})],-1)],ky=["aria-label"],wy=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M3.5 5.5l1.5 1.5l2.5 -2.5"}),f.createElementVNode("path",{d:"M3.5 11.5l1.5 1.5l2.5 -2.5"}),f.createElementVNode("path",{d:"M3.5 17.5l1.5 1.5l2.5 -2.5"}),f.createElementVNode("line",{x1:"11",y1:"6",x2:"20",y2:"6"}),f.createElementVNode("line",{x1:"11",y1:"12",x2:"20",y2:"12"}),f.createElementVNode("line",{x1:"11",y1:"18",x2:"20",y2:"18"})],-1)],Sy={key:10},xy=["aria-label"],My=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M7 12h10"}),f.createElementVNode("path",{d:"M7 4v16"}),f.createElementVNode("path",{d:"M17 4v16"}),f.createElementVNode("path",{d:"M15 20h4"}),f.createElementVNode("path",{d:"M15 4h4"}),f.createElementVNode("path",{d:"M5 20h4"}),f.createElementVNode("path",{d:"M5 4h4"})],-1)],Cy={key:0,class:"mx-1 inline-flex space-x-1"},Ey=["aria-label"],Oy=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M19 18v-8l-2 2"}),f.createElementVNode("path",{d:"M4 6v12"}),f.createElementVNode("path",{d:"M12 6v12"}),f.createElementVNode("path",{d:"M11 18h2"}),f.createElementVNode("path",{d:"M3 18h2"}),f.createElementVNode("path",{d:"M4 12h8"}),f.createElementVNode("path",{d:"M3 6h2"}),f.createElementVNode("path",{d:"M11 6h2"})],-1)],Ny=["aria-label"],Ty=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 -.001"}),f.createElementVNode("path",{d:"M4 6v12"}),f.createElementVNode("path",{d:"M12 6v12"}),f.createElementVNode("path",{d:"M11 18h2"}),f.createElementVNode("path",{d:"M3 18h2"}),f.createElementVNode("path",{d:"M4 12h8"}),f.createElementVNode("path",{d:"M3 6h2"}),f.createElementVNode("path",{d:"M11 6h2"})],-1)],_y=["aria-label"],Ay=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M19 14a2 2 0 1 0 -2 -2"}),f.createElementVNode("path",{d:"M17 16a2 2 0 1 0 2 -2"}),f.createElementVNode("path",{d:"M4 6v12"}),f.createElementVNode("path",{d:"M12 6v12"}),f.createElementVNode("path",{d:"M11 18h2"}),f.createElementVNode("path",{d:"M3 18h2"}),f.createElementVNode("path",{d:"M4 12h8"}),f.createElementVNode("path",{d:"M3 6h2"}),f.createElementVNode("path",{d:"M11 6h2"})],-1)],Dy=["aria-label"],Ry=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M20 18v-8l-4 6h5"}),f.createElementVNode("path",{d:"M4 6v12"}),f.createElementVNode("path",{d:"M12 6v12"}),f.createElementVNode("path",{d:"M11 18h2"}),f.createElementVNode("path",{d:"M3 18h2"}),f.createElementVNode("path",{d:"M4 12h8"}),f.createElementVNode("path",{d:"M3 6h2"}),f.createElementVNode("path",{d:"M11 6h2"})],-1)],Vy=["aria-label"],Iy=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M17 18h2a2 2 0 1 0 0 -4h-2v-4h4"}),f.createElementVNode("path",{d:"M4 6v12"}),f.createElementVNode("path",{d:"M12 6v12"}),f.createElementVNode("path",{d:"M11 18h2"}),f.createElementVNode("path",{d:"M3 18h2"}),f.createElementVNode("path",{d:"M4 12h8"}),f.createElementVNode("path",{d:"M3 6h2"}),f.createElementVNode("path",{d:"M11 6h2"})],-1)],By=["aria-label"],Py=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("circle",{transform:"rotate(180 19 16)",cx:"19",cy:"16",r:"2"}),f.createElementVNode("path",{d:"M21 12a2 2 0 1 0 -4 0v4"}),f.createElementVNode("path",{d:"M4 6v12"}),f.createElementVNode("path",{d:"M12 6v12"}),f.createElementVNode("path",{d:"M11 18h2"}),f.createElementVNode("path",{d:"M3 18h2"}),f.createElementVNode("path",{d:"M4 12h8"}),f.createElementVNode("path",{d:"M3 6h2"}),f.createElementVNode("path",{d:"M11 6h2"})],-1)],zy={key:11},Ly=["aria-label"],Fy=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),f.createElementVNode("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),f.createElementVNode("line",{x1:"6",y1:"18",x2:"18",y2:"18"})],-1)],Hy={key:0,class:"inline-flex mx-1 space-x-1"},Jy=["aria-label"],$y=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),f.createElementVNode("line",{x1:"4",y1:"12",x2:"14",y2:"12"}),f.createElementVNode("line",{x1:"4",y1:"18",x2:"18",y2:"18"})],-1)],qy=["aria-label"],jy=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),f.createElementVNode("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),f.createElementVNode("line",{x1:"6",y1:"18",x2:"18",y2:"18"})],-1)],Wy=["aria-label"],Ky=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),f.createElementVNode("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),f.createElementVNode("line",{x1:"6",y1:"18",x2:"20",y2:"18"})],-1)],Uy=["aria-label"],Gy=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),f.createElementVNode("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),f.createElementVNode("line",{x1:"4",y1:"18",x2:"16",y2:"18"})],-1)],Yy=["aria-label"],Xy=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("line",{x1:"4",y1:"7",x2:"20",y2:"7"}),f.createElementVNode("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),f.createElementVNode("line",{x1:"14",y1:"11",x2:"14",y2:"17"}),f.createElementVNode("path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"}),f.createElementVNode("path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"})],-1)],Qy=["aria-label"],Zy=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),f.createElementVNode("line",{x1:"4",y1:"4",x2:"4",y2:"4.01"}),f.createElementVNode("line",{x1:"8",y1:"4",x2:"8",y2:"4.01"}),f.createElementVNode("line",{x1:"12",y1:"4",x2:"12",y2:"4.01"}),f.createElementVNode("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),f.createElementVNode("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),f.createElementVNode("line",{x1:"4",y1:"8",x2:"4",y2:"8.01"}),f.createElementVNode("line",{x1:"12",y1:"8",x2:"12",y2:"8.01"}),f.createElementVNode("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),f.createElementVNode("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),f.createElementVNode("line",{x1:"12",y1:"16",x2:"12",y2:"16.01"}),f.createElementVNode("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),f.createElementVNode("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),f.createElementVNode("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),f.createElementVNode("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),f.createElementVNode("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),f.createElementVNode("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})],-1)],t0=["aria-label"],e0=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M9 13l-4 -4l4 -4m-4 4h11a4 4 0 0 1 0 8h-1"})],-1)],n0=["aria-label"],r0=[f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M15 13l4 -4l-4 -4m4 4h-11a4 4 0 0 0 0 8h1"})],-1)];function o0(n,t,e,r,o,i){const s=f.resolveComponent("CollapseXTransition"),a=f.resolveComponent("editor-content"),l=f.resolveDirective("tooltip");return f.openBlock(),f.createElementBlock("div",null,[f.createElementVNode("div",null,[o.editor?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(e.bubbleMenu?"bubble-menu":"div"),{key:0,editor:o.editor,class:f.normalizeClass(["flex-wrap space-x-1",e.bubbleMenu?"bg-gray-600 rounded dark p-1":"mb-2"])},{default:f.withCtx(()=>[e.bold?f.withDirectives((f.openBlock(),f.createElementBlock("button",{key:0,"aria-label":n.__("tiptap::tiptap.bold"),onClick:t[0]||(t[0]=c=>o.editor.chain().focus().toggleBold().run()),class:f.normalizeClass(["button",{accent:o.editor.isActive("bold")}])},ry,10,ny)),[[l,n.__("tiptap::tiptap.bold")]]):f.createCommentVNode("",!0),e.italic?f.withDirectives((f.openBlock(),f.createElementBlock("button",{key:1,"aria-label":n.__("tiptap::tiptap.italic"),onClick:t[1]||(t[1]=c=>o.editor.chain().focus().toggleItalic().run()),class:f.normalizeClass(["button",{accent:o.editor.isActive("italic")}])},iy,10,oy)),[[l,n.__("tiptap::tiptap.italic")]]):f.createCommentVNode("",!0),e.strike?f.withDirectives((f.openBlock(),f.createElementBlock("button",{key:2,"aria-label":n.__("tiptap::tiptap.strike"),onClick:t[2]||(t[2]=c=>o.editor.chain().focus().toggleStrike().run()),class:f.normalizeClass(["button",{accent:o.editor.isActive("strike")}])},ay,10,sy)),[[l,n.__("tiptap::tiptap.strike")]]):f.createCommentVNode("",!0),e.underline?f.withDirectives((f.openBlock(),f.createElementBlock("button",{key:3,"aria-label":n.__("tiptap::tiptap.underline"),onClick:t[3]||(t[3]=c=>o.editor.chain().focus().toggleUnderline().run()),class:f.normalizeClass(["button",{accent:o.editor.isActive("underline")}])},cy,10,ly)),[[l,n.__("tiptap::tiptap.underline")]]):f.createCommentVNode("",!0),e.code?f.withDirectives((f.openBlock(),f.createElementBlock("button",{key:4,"aria-label":n.__("tiptap::tiptap.code"),onClick:t[4]||(t[4]=c=>o.editor.chain().focus().toggleCode().run()),class:f.normalizeClass(["button",{accent:o.editor.isActive("code")}])},fy,10,uy)),[[l,n.__("tiptap::tiptap.code")]]):f.createCommentVNode("",!0),e.codeBlock?f.withDirectives((f.openBlock(),f.createElementBlock("button",{key:5,"aria-label":n.__("tiptap::tiptap.code_block"),onClick:t[5]||(t[5]=c=>o.editor.chain().focus().toggleCodeBlock().run()),class:f.normalizeClass(["button",{accent:o.editor.isActive("codeBlock")}])},dy,10,py)),[[l,n.__("tiptap::tiptap.code_block")]]):f.createCommentVNode("",!0),e.blockquote?f.withDirectives((f.openBlock(),f.createElementBlock("button",{key:6,"aria-label":n.__("tiptap::tiptap.blockquote"),onClick:t[6]||(t[6]=c=>o.editor.chain().focus().toggleBlockquote().run()),class:f.normalizeClass(["button",{accent:o.editor.isActive("blockquote")}])},my,10,hy)),[[l,n.__("tiptap::tiptap.blockquote")]]):f.createCommentVNode("",!0),e.bulletList?f.withDirectives((f.openBlock(),f.createElementBlock("button",{key:7,"aria-label":n.__("tiptap::tiptap.bullet_list"),onClick:t[7]||(t[7]=c=>o.editor.chain().focus().toggleBulletList().run()),class:f.normalizeClass(["button",{accent:o.editor.isActive("bulletList")}])},gy,10,vy)),[[l,n.__("tiptap::tiptap.bullet_list")]]):f.createCommentVNode("",!0),e.orderedList?f.withDirectives((f.openBlock(),f.createElementBlock("button",{key:8,"aria-label":n.__("tiptap::tiptap.ordered_list"),onClick:t[8]||(t[8]=c=>o.editor.chain().focus().toggleOrderedList().run()),class:f.normalizeClass(["button",{accent:o.editor.isActive("orderedList")}])},by,10,yy)),[[l,n.__("tiptap::tiptap.ordered_list")]]):f.createCommentVNode("",!0),e.taskList?f.withDirectives((f.openBlock(),f.createElementBlock("button",{key:9,"aria-label":n.__("tiptap::tiptap.task_list"),onClick:t[9]||(t[9]=c=>o.editor.chain().focus().toggleTaskList().run()),class:f.normalizeClass(["button",{accent:o.editor.isActive("taskList")}])},wy,10,ky)),[[l,n.__("tiptap::tiptap.task_list")]]):f.createCommentVNode("",!0),e.heading?(f.openBlock(),f.createElementBlock("span",Sy,[f.withDirectives(f.createElementVNode("button",{class:f.normalizeClass(["button",{accent:o.editor.isActive("heading")}]),onClick:t[10]||(t[10]=c=>{o.headingOpen=!o.headingOpen,o.alignOpen=!1}),"aria-label":n.__("tiptap::tiptap.heading")},My,10,xy),[[l,n.__("tiptap::tiptap.heading")]]),f.createVNode(s,null,{default:f.withCtx(()=>[o.headingOpen?(f.openBlock(),f.createElementBlock("div",Cy,[f.withDirectives(f.createElementVNode("button",{class:f.normalizeClass(["button",{accent:o.editor.isActive("heading",{level:1})}]),"aria-label":`${n.__("tiptap::tiptap.heading")} 1`,onClick:t[11]||(t[11]=c=>o.editor.chain().focus().toggleHeading({level:1}).run())},Oy,10,Ey),[[l,`${n.__("tiptap::tiptap.heading")} 1`]]),f.withDirectives(f.createElementVNode("button",{class:f.normalizeClass(["button",{accent:o.editor.isActive("heading",{level:2})}]),"aria-label":`${n.__("tiptap::tiptap.heading")} 2`,onClick:t[12]||(t[12]=c=>o.editor.chain().focus().toggleHeading({level:2}).run())},Ty,10,Ny),[[l,`${n.__("tiptap::tiptap.heading")} 2`]]),f.withDirectives(f.createElementVNode("button",{class:f.normalizeClass(["button",{accent:o.editor.isActive("heading",{level:3})}]),"aria-label":`${n.__("tiptap::tiptap.heading")} 3`,onClick:t[13]||(t[13]=c=>o.editor.chain().focus().toggleHeading({level:3}).run())},Ay,10,_y),[[l,`${n.__("tiptap::tiptap.heading")} 3`]]),f.withDirectives(f.createElementVNode("button",{class:f.normalizeClass(["button",{accent:o.editor.isActive("heading",{level:4})}]),"aria-label":`${n.__("tiptap::tiptap.heading")} 4`,onClick:t[14]||(t[14]=c=>o.editor.chain().focus().toggleHeading({level:4}).run())},Ry,10,Dy),[[l,`${n.__("tiptap::tiptap.heading")} 4`]]),f.withDirectives(f.createElementVNode("button",{class:f.normalizeClass(["button",{accent:o.editor.isActive("heading",{level:5})}]),"aria-label":`${n.__("tiptap::tiptap.heading")} 5`,onClick:t[15]||(t[15]=c=>o.editor.chain().focus().toggleHeading({level:5}).run())},Iy,10,Vy),[[l,`${n.__("tiptap::tiptap.heading")} 5`]]),f.withDirectives(f.createElementVNode("button",{class:f.normalizeClass(["button",{accent:o.editor.isActive("heading",{level:6})}]),"aria-label":`${n.__("tiptap::tiptap.heading")} 6`,onClick:t[16]||(t[16]=c=>o.editor.chain().focus().toggleHeading({level:6}).run())},Py,10,By),[[l,`${n.__("tiptap::tiptap.heading")} 6`]])])):f.createCommentVNode("",!0)]),_:1})])):f.createCommentVNode("",!0),e.textAlign?(f.openBlock(),f.createElementBlock("span",zy,[f.withDirectives(f.createElementVNode("button",{class:f.normalizeClass(["button",{accent:i.hasTextAlign}]),onClick:t[17]||(t[17]=c=>{o.alignOpen=!o.alignOpen,o.headingOpen=!1}),"aria-label":n.__("tiptap::tiptap.text_align")},Fy,10,Ly),[[l,n.__("tiptap::tiptap.text_align")]]),f.createVNode(s,null,{default:f.withCtx(()=>[o.alignOpen?(f.openBlock(),f.createElementBlock("div",Hy,[f.withDirectives(f.createElementVNode("button",{class:f.normalizeClass(["button",{accent:o.editor.isActive({textAlign:"left"})}]),"aria-label":n.__("tiptap::tiptap.left"),onClick:t[18]||(t[18]=c=>o.editor.chain().focus().setTextAlign("left").run())},$y,10,Jy),[[l,n.__("tiptap::tiptap.left")]]),f.withDirectives(f.createElementVNode("button",{class:f.normalizeClass(["button",{accent:o.editor.isActive({textAlign:"center"})}]),"aria-label":n.__("tiptap::tiptap.center"),onClick:t[19]||(t[19]=c=>o.editor.chain().focus().setTextAlign("center").run())},jy,10,qy),[[l,n.__("tiptap::tiptap.center")]]),f.withDirectives(f.createElementVNode("button",{class:f.normalizeClass(["button",{accent:o.editor.isActive({textAlign:"right"})}]),"aria-label":n.__("tiptap::tiptap.right"),onClick:t[20]||(t[20]=c=>o.editor.chain().focus().setTextAlign("right").run())},Ky,10,Wy),[[l,n.__("tiptap::tiptap.right")]]),f.withDirectives(f.createElementVNode("button",{class:f.normalizeClass(["button",{accent:o.editor.isActive({textAlign:"justify"})}]),"aria-label":n.__("tiptap::tiptap.justify"),onClick:t[21]||(t[21]=c=>o.editor.chain().focus().setTextAlign("justify").run())},Gy,10,Uy),[[l,n.__("tiptap::tiptap.justify")]]),f.withDirectives(f.createElementVNode("button",{class:"button","aria-label":n.__("tiptap::tiptap.clear"),onClick:t[22]||(t[22]=c=>o.editor.chain().focus().unsetTextAlign().run())},Xy,8,Yy),[[l,n.__("tiptap::tiptap.clear")]])])):f.createCommentVNode("",!0)]),_:1})])):f.createCommentVNode("",!0),e.horizontalRule?f.withDirectives((f.openBlock(),f.createElementBlock("button",{key:12,"aria-label":n.__("tiptap::tiptap.horizontal_rule"),onClick:t[23]||(t[23]=c=>o.editor.chain().focus().setHorizontalRule().run()),class:"button"},Zy,8,Qy)),[[l,n.__("tiptap::tiptap.horizontal_rule")]]):f.createCommentVNode("",!0),e.undoRedo?f.withDirectives((f.openBlock(),f.createElementBlock("button",{key:13,"aria-label":n.__("tiptap::tiptap.undo"),onClick:t[24]||(t[24]=c=>o.editor.chain().focus().undo().run()),class:"button"},e0,8,t0)),[[l,n.__("tiptap::tiptap.undo")]]):f.createCommentVNode("",!0),e.undoRedo?f.withDirectives((f.openBlock(),f.createElementBlock("button",{key:14,"aria-label":n.__("tiptap::tiptap.redo"),onClick:t[25]||(t[25]=c=>o.editor.chain().focus().redo().run()),class:"button"},r0,8,n0)),[[l,n.__("tiptap::tiptap.redo")]]):f.createCommentVNode("",!0)]),_:1},8,["editor","class"])):f.createCommentVNode("",!0)]),f.createVNode(a,{editor:o.editor,class:"min-h-64 h-64",onClick:t[26]||(t[26]=c=>{o.headingOpen=!1,o.alignOpen=!1})},null,8,["editor"]),o.editor&&e.maxChars>0?(f.openBlock(),f.createElementBlock("div",{key:0,class:f.normalizeClass(["w-full",i.charPercentage>90?"text-red-500":i.charPercentage>75?"text-yellow-500":null])},f.toDisplayString(n.__("tiptap::tiptap.character_count",{chars:o.editor.getCharacterCount(),max:e.maxChars})),3)):f.createCommentVNode("",!0)])}var $u=Ao(ey,[["render",o0]]);const i0={components:{Tiptap:$u},data(){return{bubbleMenu:!1,maxChars:280,content:"

This is tiptap 2 in Voyager II using Vue 3 \u{1F389}

",disabled:!1,bold:!0,italic:!0,strike:!0,underline:!0,code:!0,codeBlock:!0,blockquote:!0,bulletList:!0,orderedList:!0,taskList:!0,heading:!0,textAlign:!0,horizontalRule:!0,undoRedo:!0}}},s0={class:"flex space-x-2"},a0={class:"input-group"},l0=f.createElementVNode("label",{for:"bubble",class:"label"},"Bubble menu",-1),c0={class:"mt-1"},u0={class:"input-group"},f0=f.createElementVNode("label",{for:"maxChars",class:"label"},"Max characters (0 = infinite)",-1),p0={class:"mt-1"},d0={class:"input-group"},h0=f.createElementVNode("label",{for:"disabled",class:"label"},"Disabled",-1),m0={class:"mt-1"},v0={class:"flex flex-wrap space-x-2 mt-4"},g0={class:"input-group"},y0={for:"bold",class:"label"},b0={class:"mt-1"},k0={class:"input-group"},w0={for:"italic",class:"label"},S0={class:"mt-1"},x0={class:"input-group"},M0={for:"strike",class:"label"},C0={class:"mt-1"},E0={class:"input-group"},O0={for:"underline",class:"label"},N0={class:"mt-1"},T0={class:"input-group"},_0={for:"code",class:"label"},A0={class:"mt-1"},D0={class:"input-group"},R0={for:"codeBlock",class:"label"},V0={class:"mt-1"},I0={class:"input-group"},B0={for:"blockquote",class:"label"},P0={class:"mt-1"},z0={class:"input-group"},L0={for:"bulletList",class:"label"},F0={class:"mt-1"},H0={class:"input-group"},J0={for:"orderedList",class:"label"},$0={class:"mt-1"},q0={class:"input-group"},j0={for:"taskList",class:"label"},W0={class:"mt-1"},K0={class:"input-group"},U0={for:"heading",class:"label"},G0={class:"mt-1"},Y0={class:"input-group"},X0={for:"textAlign",class:"label"},Q0={class:"mt-1"},Z0={class:"input-group"},tb={for:"horizontalRule",class:"label"},eb={class:"mt-1"},nb={class:"input-group"},rb={for:"undoRedo",class:"label"},ob={class:"mt-1"};function ib(n,t,e,r,o,i){const s=f.resolveComponent("tiptap"),a=f.resolveComponent("collapsible");return f.openBlock(),f.createElementBlock(f.Fragment,null,[f.createVNode(s,{bubbleMenu:o.bubbleMenu,maxChars:o.maxChars,modelValue:o.content,"onUpdate:modelValue":t[0]||(t[0]=l=>o.content=l),disabled:o.disabled,bold:o.bold,italic:o.italic,strike:o.strike,underline:o.underline,code:o.code,codeBlock:o.codeBlock,blockquote:o.blockquote,bulletList:o.bulletList,orderedList:o.orderedList,taskList:o.taskList,heading:o.heading,textAlign:o.textAlign,horizontalRule:o.horizontalRule,undoRedo:o.undoRedo,class:"mb-2"},null,8,["bubbleMenu","maxChars","modelValue","disabled","bold","italic","strike","underline","code","codeBlock","blockquote","bulletList","orderedList","taskList","heading","textAlign","horizontalRule","undoRedo"]),f.createVNode(a,{title:"Options"},{default:f.withCtx(()=>[f.createElementVNode("div",s0,[f.createElementVNode("div",a0,[l0,f.createElementVNode("div",c0,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[1]||(t[1]=l=>o.bubbleMenu=l),id:"bubble"},null,512),[[f.vModelCheckbox,o.bubbleMenu]])])]),f.createElementVNode("div",u0,[f0,f.createElementVNode("div",p0,[f.withDirectives(f.createElementVNode("input",{type:"number",class:"input","onUpdate:modelValue":t[2]||(t[2]=l=>o.maxChars=l),min:"0",id:"maxChars"},null,512),[[f.vModelText,o.maxChars,void 0,{number:!0}]])])]),f.createElementVNode("div",d0,[h0,f.createElementVNode("div",m0,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[3]||(t[3]=l=>o.disabled=l),id:"disabled"},null,512),[[f.vModelCheckbox,o.disabled]])])])]),f.createElementVNode("div",v0,[f.createElementVNode("div",g0,[f.createElementVNode("label",y0,f.toDisplayString(n.__("tiptap::tiptap.bold")),1),f.createElementVNode("div",b0,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[4]||(t[4]=l=>o.bold=l),id:"bold"},null,512),[[f.vModelCheckbox,o.bold]])])]),f.createElementVNode("div",k0,[f.createElementVNode("label",w0,f.toDisplayString(n.__("tiptap::tiptap.italic")),1),f.createElementVNode("div",S0,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[5]||(t[5]=l=>o.italic=l),id:"italic"},null,512),[[f.vModelCheckbox,o.italic]])])]),f.createElementVNode("div",x0,[f.createElementVNode("label",M0,f.toDisplayString(n.__("tiptap::tiptap.strike")),1),f.createElementVNode("div",C0,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[6]||(t[6]=l=>o.strike=l),id:"strike"},null,512),[[f.vModelCheckbox,o.strike]])])]),f.createElementVNode("div",E0,[f.createElementVNode("label",O0,f.toDisplayString(n.__("tiptap::tiptap.underline")),1),f.createElementVNode("div",N0,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[7]||(t[7]=l=>o.underline=l),id:"underline"},null,512),[[f.vModelCheckbox,o.underline]])])]),f.createElementVNode("div",T0,[f.createElementVNode("label",_0,f.toDisplayString(n.__("tiptap::tiptap.code")),1),f.createElementVNode("div",A0,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[8]||(t[8]=l=>o.code=l),id:"code"},null,512),[[f.vModelCheckbox,o.code]])])]),f.createElementVNode("div",D0,[f.createElementVNode("label",R0,f.toDisplayString(n.__("tiptap::tiptap.code_block")),1),f.createElementVNode("div",V0,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[9]||(t[9]=l=>o.codeBlock=l),id:"codeBlock"},null,512),[[f.vModelCheckbox,o.codeBlock]])])]),f.createElementVNode("div",I0,[f.createElementVNode("label",B0,f.toDisplayString(n.__("tiptap::tiptap.blockquote")),1),f.createElementVNode("div",P0,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[10]||(t[10]=l=>o.blockquote=l),id:"blockquote"},null,512),[[f.vModelCheckbox,o.blockquote]])])]),f.createElementVNode("div",z0,[f.createElementVNode("label",L0,f.toDisplayString(n.__("tiptap::tiptap.bullet_list")),1),f.createElementVNode("div",F0,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[11]||(t[11]=l=>o.bulletList=l),id:"bulletList"},null,512),[[f.vModelCheckbox,o.bulletList]])])]),f.createElementVNode("div",H0,[f.createElementVNode("label",J0,f.toDisplayString(n.__("tiptap::tiptap.ordered_list")),1),f.createElementVNode("div",$0,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[12]||(t[12]=l=>o.orderedList=l),id:"orderedList"},null,512),[[f.vModelCheckbox,o.orderedList]])])]),f.createElementVNode("div",q0,[f.createElementVNode("label",j0,f.toDisplayString(n.__("tiptap::tiptap.task_list")),1),f.createElementVNode("div",W0,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[13]||(t[13]=l=>o.taskList=l),id:"taskList"},null,512),[[f.vModelCheckbox,o.taskList]])])]),f.createElementVNode("div",K0,[f.createElementVNode("label",U0,f.toDisplayString(n.__("tiptap::tiptap.heading")),1),f.createElementVNode("div",G0,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[14]||(t[14]=l=>o.heading=l),id:"heading"},null,512),[[f.vModelCheckbox,o.heading]])])]),f.createElementVNode("div",Y0,[f.createElementVNode("label",X0,f.toDisplayString(n.__("tiptap::tiptap.text_align")),1),f.createElementVNode("div",Q0,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[15]||(t[15]=l=>o.textAlign=l),id:"textAlign"},null,512),[[f.vModelCheckbox,o.textAlign]])])]),f.createElementVNode("div",Z0,[f.createElementVNode("label",tb,f.toDisplayString(n.__("tiptap::tiptap.horizontal_rule")),1),f.createElementVNode("div",eb,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[16]||(t[16]=l=>o.horizontalRule=l),id:"horizontalRule"},null,512),[[f.vModelCheckbox,o.horizontalRule]])])]),f.createElementVNode("div",nb,[f.createElementVNode("label",rb,f.toDisplayString(n.__("tiptap::tiptap.undo"))+"/"+f.toDisplayString(n.__("tiptap::tiptap.redo")),1),f.createElementVNode("div",ob,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[17]||(t[17]=l=>o.undoRedo=l),id:"undoRedo"},null,512),[[f.vModelCheckbox,o.undoRedo]])])])])]),_:1}),f.createVNode(a,{title:"HTML Output"},{default:f.withCtx(()=>[f.withDirectives(f.createElementVNode("textarea",{class:"input w-full min-h-64","onUpdate:modelValue":t[18]||(t[18]=l=>o.content=l)},null,512),[[f.vModelText,o.content]])]),_:1})],64)}var sb=Ao(i0,[["render",ib]]);const ab={mixins:[voyager.formfieldMixin]},lb={key:1},cb={key:2};function ub(n,t,e,r,o,i){const s=f.resolveComponent("tiptap");return n.action=="query"?f.renderSlot(n.$slots,"default",{key:0}):n.action=="add"||n.action=="edit"?(f.openBlock(),f.createElementBlock("div",lb,[f.createVNode(s,{bubbleMenu:n.options.bubbleMenu,maxChars:n.options.maxChars,modelValue:n.modelValue,"onUpdate:modelValue":t[0]||(t[0]=a=>n.$emit("update:modelValue",a)),bold:n.options.bold,italic:n.options.italic,strike:n.options.strike,underline:n.options.underline,code:n.options.code,codeBlock:n.options.codeBlock,blockquote:n.options.blockquote,bulletList:n.options.bulletList,orderedList:n.options.orderedList,taskList:n.options.taskList,heading:n.options.heading,textAlign:n.options.textAlign,horizontalRule:n.options.horizontalRule,undoRedo:n.options.undoRedo},null,8,["bubbleMenu","maxChars","modelValue","bold","italic","strike","underline","code","codeBlock","blockquote","bulletList","orderedList","taskList","heading","textAlign","horizontalRule","undoRedo"])])):n.action=="browse"?(f.openBlock(),f.createElementBlock("div",cb,f.toDisplayString(n.modelValue),1)):f.createCommentVNode("",!0)}var fb=Ao(ab,[["render",ub]]);const pb={mixins:[voyager.formfieldBuilderMixin],computed:{defaultListOptions(){return{display_length:150}},defaultViewOptions(){return{bubbleMenu:!1,maxChars:0,bold:!0,italic:!0,strike:!0,underline:!0,code:!0,codeBlock:!0,blockquote:!0,bulletList:!0,orderedList:!0,taskList:!0,heading:!0,textAlign:!0,horizontalRule:!0,undoRedo:!0}}}},db={key:0},hb={for:"length",class:"label"},mb={key:1},vb={class:"mt-2"},gb={for:"maxChars",class:"label"},yb={class:"grid grid-cols-3 lg:grid-cols-2 xl:grid-cols-3 gap-2 mt-2"},bb={class:"flex items-center space-x-1"},kb={for:"bubble",class:"label"},wb={class:"flex items-center space-x-1"},Sb={for:"bold",class:"label"},xb={class:"flex items-center space-x-1"},Mb={for:"italic",class:"label"},Cb={class:"flex items-center space-x-1"},Eb={for:"strike",class:"label"},Ob={class:"flex items-center space-x-1"},Nb={for:"underline",class:"label"},Tb={class:"flex items-center space-x-1"},_b={for:"code",class:"label"},Ab={class:"flex items-center space-x-1"},Db={for:"codeBlock",class:"label"},Rb={class:"flex items-center space-x-1"},Vb={for:"blockquote",class:"label"},Ib={class:"flex items-center space-x-1"},Bb={for:"bulletList",class:"label"},Pb={class:"flex items-center space-x-1"},zb={for:"orderedList",class:"label"},Lb={class:"flex items-center space-x-1"},Fb={for:"taskList",class:"label"},Hb={class:"flex items-center space-x-1"},Jb={for:"heading",class:"label"},$b={class:"flex items-center space-x-1"},qb={for:"textAlign",class:"label"},jb={class:"flex items-center space-x-1"},Wb={for:"horizontalRule",class:"label"},Kb={class:"flex items-center space-x-1"},Ub={for:"undoRedo",class:"label"},Gb={key:2};function Yb(n,t,e,r,o,i){const s=f.resolveComponent("tiptap");return n.action=="list-options"?(f.openBlock(),f.createElementBlock("div",db,[f.createElementVNode("label",hb,f.toDisplayString(n.__("voyager::generic.display_length")),1),f.withDirectives(f.createElementVNode("input",{type:"number",id:"length",class:"input w-full","onUpdate:modelValue":t[0]||(t[0]=a=>n.options.display_length=a)},null,512),[[f.vModelText,n.options.display_length,void 0,{number:!0}]])])):n.action=="view-options"?(f.openBlock(),f.createElementBlock("div",mb,[f.createElementVNode("div",vb,[f.createElementVNode("label",gb,f.toDisplayString(n.__("tiptap::tiptap.max_characters")),1),f.withDirectives(f.createElementVNode("input",{type:"number",class:"input w-full","onUpdate:modelValue":t[1]||(t[1]=a=>n.options.maxChars=a),min:"0",id:"maxChars"},null,512),[[f.vModelText,n.options.maxChars,void 0,{number:!0}]])]),f.createElementVNode("div",yb,[f.createElementVNode("div",bb,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[2]||(t[2]=a=>n.options.bubbleMenu=a),id:"bubble"},null,512),[[f.vModelCheckbox,n.options.bubbleMenu]]),f.createElementVNode("label",kb,f.toDisplayString(n.__("tiptap::tiptap.bubble_menu")),1)]),f.createElementVNode("div",wb,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[3]||(t[3]=a=>n.options.bold=a),id:"bold"},null,512),[[f.vModelCheckbox,n.options.bold]]),f.createElementVNode("label",Sb,f.toDisplayString(n.__("tiptap::tiptap.bold")),1)]),f.createElementVNode("div",xb,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[4]||(t[4]=a=>n.options.italic=a),id:"italic"},null,512),[[f.vModelCheckbox,n.options.italic]]),f.createElementVNode("label",Mb,f.toDisplayString(n.__("tiptap::tiptap.italic")),1)]),f.createElementVNode("div",Cb,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[5]||(t[5]=a=>n.options.strike=a),id:"strike"},null,512),[[f.vModelCheckbox,n.options.strike]]),f.createElementVNode("label",Eb,f.toDisplayString(n.__("tiptap::tiptap.strike")),1)]),f.createElementVNode("div",Ob,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[6]||(t[6]=a=>n.options.underline=a),id:"underline"},null,512),[[f.vModelCheckbox,n.options.underline]]),f.createElementVNode("label",Nb,f.toDisplayString(n.__("tiptap::tiptap.underline")),1)]),f.createElementVNode("div",Tb,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[7]||(t[7]=a=>n.options.code=a),id:"code"},null,512),[[f.vModelCheckbox,n.options.code]]),f.createElementVNode("label",_b,f.toDisplayString(n.__("tiptap::tiptap.code")),1)]),f.createElementVNode("div",Ab,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[8]||(t[8]=a=>n.options.codeBlock=a),id:"codeBlock"},null,512),[[f.vModelCheckbox,n.options.codeBlock]]),f.createElementVNode("label",Db,f.toDisplayString(n.__("tiptap::tiptap.code_block")),1)]),f.createElementVNode("div",Rb,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[9]||(t[9]=a=>n.options.blockquote=a),id:"blockquote"},null,512),[[f.vModelCheckbox,n.options.blockquote]]),f.createElementVNode("label",Vb,f.toDisplayString(n.__("tiptap::tiptap.blockquote")),1)]),f.createElementVNode("div",Ib,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[10]||(t[10]=a=>n.options.bulletList=a),id:"bulletList"},null,512),[[f.vModelCheckbox,n.options.bulletList]]),f.createElementVNode("label",Bb,f.toDisplayString(n.__("tiptap::tiptap.bullet_list")),1)]),f.createElementVNode("div",Pb,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[11]||(t[11]=a=>n.options.orderedList=a),id:"orderedList"},null,512),[[f.vModelCheckbox,n.options.orderedList]]),f.createElementVNode("label",zb,f.toDisplayString(n.__("tiptap::tiptap.ordered_list")),1)]),f.createElementVNode("div",Lb,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[12]||(t[12]=a=>n.options.taskList=a),id:"taskList"},null,512),[[f.vModelCheckbox,n.options.taskList]]),f.createElementVNode("label",Fb,f.toDisplayString(n.__("tiptap::tiptap.task_list")),1)]),f.createElementVNode("div",Hb,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[13]||(t[13]=a=>n.options.heading=a),id:"heading"},null,512),[[f.vModelCheckbox,n.options.heading]]),f.createElementVNode("label",Jb,f.toDisplayString(n.__("tiptap::tiptap.heading")),1)]),f.createElementVNode("div",$b,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[14]||(t[14]=a=>n.options.textAlign=a),id:"textAlign"},null,512),[[f.vModelCheckbox,n.options.textAlign]]),f.createElementVNode("label",qb,f.toDisplayString(n.__("tiptap::tiptap.text_align")),1)]),f.createElementVNode("div",jb,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[15]||(t[15]=a=>n.options.horizontalRule=a),id:"horizontalRule"},null,512),[[f.vModelCheckbox,n.options.horizontalRule]]),f.createElementVNode("label",Wb,f.toDisplayString(n.__("tiptap::tiptap.horizontal_rule")),1)]),f.createElementVNode("div",Kb,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",class:"input","onUpdate:modelValue":t[16]||(t[16]=a=>n.options.undoRedo=a),id:"undoRedo"},null,512),[[f.vModelCheckbox,n.options.undoRedo]]),f.createElementVNode("label",Ub,f.toDisplayString(n.__("tiptap::tiptap.undo"))+"/"+f.toDisplayString(n.__("tiptap::tiptap.redo")),1)])])])):n.action=="view"?(f.openBlock(),f.createElementBlock("div",Gb,[f.createVNode(s,{bubbleMenu:n.options.bubbleMenu,maxChars:n.options.maxChars,value:"''",bold:n.options.bold,italic:n.options.italic,strike:n.options.strike,underline:n.options.underline,code:n.options.code,codeBlock:n.options.codeBlock,blockquote:n.options.blockquote,bulletList:n.options.bulletList,orderedList:n.options.orderedList,taskList:n.options.taskList,heading:n.options.heading,textAlign:n.options.textAlign,horizontalRule:n.options.horizontalRule,undoRedo:n.options.undoRedo},null,8,["bubbleMenu","maxChars","bold","italic","strike","underline","code","codeBlock","blockquote","bulletList","orderedList","taskList","heading","textAlign","horizontalRule","undoRedo"])])):f.createCommentVNode("",!0)}var Xb=Ao(pb,[["render",Yb]]);voyager.component("tiptap",$u),voyager.component("tiptap-demo",sb),voyager.component("tiptap-formfield",fb),voyager.component("tiptap-builder",Xb),voyager.addToUI("Tiptap","tiptap-demo")}); diff --git a/package-lock.json b/package-lock.json index 2604e2f..06424e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,43 +8,35 @@ "name": "tiptap-vite", "version": "0.0.0", "dependencies": { - "@tabler/icons": "^1.41.2", - "@tiptap/core": "^2.0.0-beta.102", - "@tiptap/extension-blockquote": "^2.0.0-beta.15", - "@tiptap/extension-bullet-list": "^2.0.0-beta.15", - "@tiptap/extension-character-count": "^2.0.0-beta.13", - "@tiptap/extension-code-block": "^2.0.0-beta.17", + "@tabler/icons": "^1.42.0", + "@tiptap/core": "^2.0.0-beta.133", + "@tiptap/extension-blockquote": "^2.0.0-beta.21", + "@tiptap/extension-bullet-list": "^2.0.0-beta.20", + "@tiptap/extension-character-count": "^2.0.0-beta.15", + "@tiptap/extension-code-block": "^2.0.0-beta.26", "@tiptap/extension-document": "^2.0.0-beta.13", - "@tiptap/extension-heading": "^2.0.0-beta.15", - "@tiptap/extension-history": "^2.0.0-beta.16", - "@tiptap/extension-horizontal-rule": "^2.0.0-beta.19", - "@tiptap/extension-image": "^2.0.0-beta.15", - "@tiptap/extension-list-item": "^2.0.0-beta.14", - "@tiptap/extension-ordered-list": "^2.0.0-beta.15", - "@tiptap/extension-paragraph": "^2.0.0-beta.17", - "@tiptap/extension-task-item": "^2.0.0-beta.17", - "@tiptap/extension-task-list": "^2.0.0-beta.17", + "@tiptap/extension-heading": "^2.0.0-beta.20", + "@tiptap/extension-history": "^2.0.0-beta.18", + "@tiptap/extension-horizontal-rule": "^2.0.0-beta.27", + "@tiptap/extension-image": "^2.0.0-beta.21", + "@tiptap/extension-list-item": "^2.0.0-beta.16", + "@tiptap/extension-ordered-list": "^2.0.0-beta.21", + "@tiptap/extension-paragraph": "^2.0.0-beta.19", + "@tiptap/extension-task-item": "^2.0.0-beta.25", + "@tiptap/extension-task-list": "^2.0.0-beta.20", "@tiptap/extension-text": "^2.0.0-beta.13", - "@tiptap/extension-text-align": "^2.0.0-beta.22", - "@tiptap/extension-typography": "^2.0.0-beta.14", - "@tiptap/extension-underline": "^2.0.0-beta.16", - "@tiptap/starter-kit": "^2.0.0-beta.101", - "@tiptap/vue-3": "^2.0.0-beta.56", - "vue": "^3.0.11" + "@tiptap/extension-text-align": "^2.0.0-beta.25", + "@tiptap/extension-typography": "^2.0.0-beta.17", + "@tiptap/extension-underline": "^2.0.0-beta.18", + "@tiptap/starter-kit": "^2.0.0-beta.135", + "@tiptap/vue-3": "^2.0.0-beta.76", + "vue": "^3.2.21" }, "devDependencies": { - "@vitejs/plugin-vue": "^1.6.0", - "@vue/compiler-sfc": "^3.2.6", - "sass": "^1.38.2", - "vite": "^2.5.1" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", - "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", - "engines": { - "node": ">=6.9.0" + "@vitejs/plugin-vue": "^1.9.4", + "@vue/compiler-sfc": "^3.2.21", + "sass": "^1.43.4", + "vite": "^2.6.13" } }, "node_modules/@babel/parser": { @@ -58,31 +50,19 @@ "node": ">=6.0.0" } }, - "node_modules/@babel/types": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.0.tgz", - "integrity": "sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.14.9", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@popperjs/core": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.3.tgz", - "integrity": "sha512-xDu17cEfh7Kid/d95kB6tZsLOmSWKCZKtprnhVepjsSaCij+lM3mItSJDuuHDMbCWTh8Ejmebwb+KONcCJ0eXQ==", + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.10.2.tgz", + "integrity": "sha512-IXf3XA7+XyN7CP9gGh/XB0UxVMlvARGEgGXLubFICsUMGz6Q+DU+i4gGlpOxTjKvXjkJDJC8YdqdKkDj9qZHEQ==", "funding": { "type": "opencollective", "url": "https://opencollective.com/popperjs" } }, "node_modules/@tabler/icons": { - "version": "1.41.2", - "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-1.41.2.tgz", - "integrity": "sha512-X6cQmMC24hiwg0p2BzasvU3IeCCdOk0f/9d6gNNtJM4lzG2TCloTns1bVvU5MAFkITGukxUqjPFE3Ecd6kGsfw==", + "version": "1.42.0", + "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-1.42.0.tgz", + "integrity": "sha512-GpTiG+TmvgtO2IJFM6Q36fzptgI0aNqmJIP9sr5IcXP4yLDEpTRTXTG94YxenlHARPUk3obsruMPPHO8v/UE4g==", "funding": { "type": "github", "url": "https://github.com/sponsors/codecalm" @@ -93,26 +73,24 @@ } }, "node_modules/@tiptap/core": { - "version": "2.0.0-beta.102", - "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.0.0-beta.102.tgz", - "integrity": "sha512-ykSAyYfyb14xiYWQ6mTaa+GF6j5dQvSDgeXQDNcy8xvBjZHm1g+51D0jm9FF/dsrY0rEps5h8yX883h7MaGFHA==", + "version": "2.0.0-beta.133", + "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.0.0-beta.133.tgz", + "integrity": "sha512-Fi2uBgT0nvGm+FYLDUXGWlqUq03ufPpuaqi2KlCis+mr+hP8GX1gYOdJIKTaf5kPVQ++hMyGP9Nh+pjml074tQ==", "dependencies": { "@types/prosemirror-commands": "^1.0.4", - "@types/prosemirror-inputrules": "^1.0.4", "@types/prosemirror-keymap": "^1.0.4", "@types/prosemirror-model": "^1.13.2", "@types/prosemirror-schema-list": "^1.0.3", - "@types/prosemirror-state": "^1.2.7", + "@types/prosemirror-state": "^1.2.8", "@types/prosemirror-transform": "^1.1.4", - "@types/prosemirror-view": "^1.17.2", - "prosemirror-commands": "^1.1.10", - "prosemirror-inputrules": "^1.1.3", - "prosemirror-keymap": "^1.1.3", - "prosemirror-model": "^1.14.3", - "prosemirror-schema-list": "^1.1.5", + "@types/prosemirror-view": "^1.19.1", + "prosemirror-commands": "^1.1.12", + "prosemirror-keymap": "^1.1.5", + "prosemirror-model": "^1.15.0", + "prosemirror-schema-list": "^1.1.6", "prosemirror-state": "^1.3.4", - "prosemirror-transform": "^1.3.2", - "prosemirror-view": "^1.19.3" + "prosemirror-transform": "^1.3.3", + "prosemirror-view": "^1.22.0" }, "funding": { "type": "github", @@ -120,12 +98,9 @@ } }, "node_modules/@tiptap/extension-blockquote": { - "version": "2.0.0-beta.15", - "resolved": "https://registry.npmjs.org/@tiptap/extension-blockquote/-/extension-blockquote-2.0.0-beta.15.tgz", - "integrity": "sha512-Cso44KsYsqKqaNveQmx5KVaLy9krq5AzE9WhGVDBSFqWhvuIJkQYrTRBbOTfUDs/st9VuwJrbjTDD65ow50wEw==", - "dependencies": { - "prosemirror-inputrules": "^1.1.3" - }, + "version": "2.0.0-beta.21", + "resolved": "https://registry.npmjs.org/@tiptap/extension-blockquote/-/extension-blockquote-2.0.0-beta.21.tgz", + "integrity": "sha512-yE2N2A6zfH9C/9DAs/p9dLbyy6iWzTpX7tTSGnWyAb1h+SEkqzPBxJryNUU4DYw+Rq/hasQIu37TrHTrOqJyiA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -135,9 +110,9 @@ } }, "node_modules/@tiptap/extension-bold": { - "version": "2.0.0-beta.15", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-2.0.0-beta.15.tgz", - "integrity": "sha512-jKyV6iiwhxwa0+7uuKD74jNDVNLNOS1GmU14MgaA95pY5e1fyaRBPPX8Gtt89niz2CLOY711AV17RPZTe/e60w==", + "version": "2.0.0-beta.21", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-2.0.0-beta.21.tgz", + "integrity": "sha512-GRsImvcUJ4vspvoZvugO7Y9akigjeHFpHti1sGJGULPsv4oX5vMMxys4yaI3/qA+Tm8qyK+14ju6Jb7YKwvdBA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -147,13 +122,13 @@ } }, "node_modules/@tiptap/extension-bubble-menu": { - "version": "2.0.0-beta.31", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.0.0-beta.31.tgz", - "integrity": "sha512-O0U12A+4tWZo97MRWOhGrZ+Z0DWYHPzLP3rbUMl1bClvOoggKgMZnSdvgjC7LmP5h/8Y+qB92swk5LVYvrOcDQ==", + "version": "2.0.0-beta.46", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.0.0-beta.46.tgz", + "integrity": "sha512-61JufrJn0513x9VFRpgSIcMKM1JaDjSGVDHbjeWT+cRZPXQBPRXKQ2vG/rUn+EVAE+u1Ifi2PVAOMJpyfHGzJQ==", "dependencies": { "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.19.3", - "tippy.js": "^6.3.1" + "prosemirror-view": "^1.22.0", + "tippy.js": "^6.3.4" }, "funding": { "type": "github", @@ -164,12 +139,9 @@ } }, "node_modules/@tiptap/extension-bullet-list": { - "version": "2.0.0-beta.15", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-2.0.0-beta.15.tgz", - "integrity": "sha512-5i44JzsZOh8Ci6CuYRQy6W3jCpYgX0+VuJKeHvZ6Aomy4Qqrtc9Jk43PBmCj91lNUUtH6Io9l+kDrLCumEFnEg==", - "dependencies": { - "prosemirror-inputrules": "^1.1.3" - }, + "version": "2.0.0-beta.20", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-2.0.0-beta.20.tgz", + "integrity": "sha512-/2gPQ4UvjD/VxKnovtHwdz6xSJZdZ0tPRRB6Lm7uwFcrmCCoUFMrzYmQruyMNcWWbrgoLh3A70HTFVdOCxL+nw==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -179,9 +151,9 @@ } }, "node_modules/@tiptap/extension-character-count": { - "version": "2.0.0-beta.13", - "resolved": "https://registry.npmjs.org/@tiptap/extension-character-count/-/extension-character-count-2.0.0-beta.13.tgz", - "integrity": "sha512-2rRMvp+ppocyw6tmJx/hpl8wvs9BOIFN5fvDpVxH9INXJu9ZnZPfb2Pko/2RYsx+uWn2q7nKS4jgqNmkZA0ovg==", + "version": "2.0.0-beta.15", + "resolved": "https://registry.npmjs.org/@tiptap/extension-character-count/-/extension-character-count-2.0.0-beta.15.tgz", + "integrity": "sha512-y01lKwiwOBQYSNHNidl75r2CTPUYQUpf7vsgXhFWlEcYan05FM9oIjqAXQOKah5kuNdQqiUhq75AO/1Zu/o9fw==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -192,9 +164,9 @@ } }, "node_modules/@tiptap/extension-code": { - "version": "2.0.0-beta.16", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-2.0.0-beta.16.tgz", - "integrity": "sha512-Kakg/RMiVrxjzIkLVDXtbCzRh/9W8dgSG04IhMZNOI8N9vWn8Z78jdUyxEEDTcL/JyWWcMxn9AsJw2U5ajO3pA==", + "version": "2.0.0-beta.22", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-2.0.0-beta.22.tgz", + "integrity": "sha512-jJCCkj6/C/rwv+ppx0MIF7ynhessU06lN8IGjJsDTUh1Z4TYP3tpUNrgF7jfrg7G23QvPWbEVj7siDd+px6xCw==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -204,11 +176,11 @@ } }, "node_modules/@tiptap/extension-code-block": { - "version": "2.0.0-beta.17", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-2.0.0-beta.17.tgz", - "integrity": "sha512-u3RY991mXtjuw+trVaDwbAhuPPlU8l6kS4rXIxWJ5W/sNElbmfHLVu7RP++YwM8KOQrCrQl8TJbZTEIekMw61w==", + "version": "2.0.0-beta.26", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-2.0.0-beta.26.tgz", + "integrity": "sha512-ZG60N90RbhwvJR9VsDc9t9FdBMEEfcmzbRr4j/LcvvVbAG7poDbC9HRmSim484GSEN2yBDEgk+Ifxi9TiaBy1g==", "dependencies": { - "prosemirror-inputrules": "^1.1.3" + "prosemirror-state": "^1.3.4" }, "funding": { "type": "github", @@ -231,9 +203,9 @@ } }, "node_modules/@tiptap/extension-dropcursor": { - "version": "2.0.0-beta.19", - "resolved": "https://registry.npmjs.org/@tiptap/extension-dropcursor/-/extension-dropcursor-2.0.0-beta.19.tgz", - "integrity": "sha512-rslIcVvD42NNh5sEbkCkG03DWMFBrS5KoK+lDOdIcC1DjmTtpVgcLvvE01btzaB3ljx+UVqI2Zaxa6VOiTeEMw==", + "version": "2.0.0-beta.21", + "resolved": "https://registry.npmjs.org/@tiptap/extension-dropcursor/-/extension-dropcursor-2.0.0-beta.21.tgz", + "integrity": "sha512-QA4dgBRgRtv3TbLh7ZhhnATHepfLzEQMGsqSuxEdI8GpPDQ/vwRxFh7lJ8bHs4KZngxbfLD6znEyTZXEy2z/eQ==", "dependencies": { "@types/prosemirror-dropcursor": "^1.0.3", "prosemirror-dropcursor": "^1.3.5" @@ -247,13 +219,13 @@ } }, "node_modules/@tiptap/extension-floating-menu": { - "version": "2.0.0-beta.25", - "resolved": "https://registry.npmjs.org/@tiptap/extension-floating-menu/-/extension-floating-menu-2.0.0-beta.25.tgz", - "integrity": "sha512-nXBi1eA3Kji8tk+gOIyxXKsaTpGBgXSX9hHTgIvbBMMvfP9onLKuZIAKG/cBUMBzt+CKns1XooE71UqyMESDhQ==", + "version": "2.0.0-beta.40", + "resolved": "https://registry.npmjs.org/@tiptap/extension-floating-menu/-/extension-floating-menu-2.0.0-beta.40.tgz", + "integrity": "sha512-zq+VkbnaIsEiPwR+/9J8AJSATG3Fcm4HlZvZhb5a0SrFA6Qe8W1kQ2UGDQpO8jpEGqaqCSAm+3nYMHyi1vI41A==", "dependencies": { "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.19.3", - "tippy.js": "^6.3.1" + "prosemirror-view": "^1.22.0", + "tippy.js": "^6.3.4" }, "funding": { "type": "github", @@ -264,12 +236,12 @@ } }, "node_modules/@tiptap/extension-gapcursor": { - "version": "2.0.0-beta.19", - "resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-2.0.0-beta.19.tgz", - "integrity": "sha512-GZYMR+Z45bn87CMuOHyxzTJOFoCv58mNakIBdSGX+8A+ExBFeZr/qLqxDxN3wz+LRqy7pREe5K3UxJxpsYnCzA==", + "version": "2.0.0-beta.30", + "resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-2.0.0-beta.30.tgz", + "integrity": "sha512-6K8N+BiztReMqj9qu8h5Y/qvFGm7XrprGb03l+sG6eZ4fKYLU202zt/DReJYRDCTPHM/6zthUCK5xoR0+TtN2A==", "dependencies": { "@types/prosemirror-gapcursor": "^1.0.4", - "prosemirror-gapcursor": "^1.1.5" + "prosemirror-gapcursor": "^1.2.0" }, "funding": { "type": "github", @@ -280,9 +252,9 @@ } }, "node_modules/@tiptap/extension-hard-break": { - "version": "2.0.0-beta.15", - "resolved": "https://registry.npmjs.org/@tiptap/extension-hard-break/-/extension-hard-break-2.0.0-beta.15.tgz", - "integrity": "sha512-MS7MjGOtKtC1bVNAShwCetFRuk8nPr/j18OOzKChNrJFrZXWNJrid3dUojwDLqCraYdzSTmiOmMgU+yoUe/gnw==", + "version": "2.0.0-beta.27", + "resolved": "https://registry.npmjs.org/@tiptap/extension-hard-break/-/extension-hard-break-2.0.0-beta.27.tgz", + "integrity": "sha512-Jki9LWsOyWwXypU0vr3aRDZwu0SrZ1CjMgMrEg9R6yUEB5lhb2g4orgaCGecmVDnl4Zx0Yq/3et/FbMGTVupCA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -292,12 +264,9 @@ } }, "node_modules/@tiptap/extension-heading": { - "version": "2.0.0-beta.15", - "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-2.0.0-beta.15.tgz", - "integrity": "sha512-UoXDwEdCV9KiPh0wj0jj2Jt6VDqkoTaSU3d9bmEBLwg1Gjgbuv39JDst7oxSqbf9rgbl3txbeOy35wVBKe9CqA==", - "dependencies": { - "prosemirror-inputrules": "^1.1.3" - }, + "version": "2.0.0-beta.20", + "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-2.0.0-beta.20.tgz", + "integrity": "sha512-JQEs6Pilk9Q/5/hZa3og3pt2Si7MwXIl3UJwCyljXpTdnuSon4OppAo4lVN5L9A8tZNqrX7TOpd/yaDoI/0ToQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -307,9 +276,9 @@ } }, "node_modules/@tiptap/extension-history": { - "version": "2.0.0-beta.16", - "resolved": "https://registry.npmjs.org/@tiptap/extension-history/-/extension-history-2.0.0-beta.16.tgz", - "integrity": "sha512-nrNwV8a7zUt1t2I/kPX5Y6N9vZ8mrugimJIQmPGIp/4mmw1SEUzkaPpIsv6+ELmqMHSDktQ0ofb3pXeWDXWZvw==", + "version": "2.0.0-beta.18", + "resolved": "https://registry.npmjs.org/@tiptap/extension-history/-/extension-history-2.0.0-beta.18.tgz", + "integrity": "sha512-8yR+NozZlHFwlYaNqAKrstdWb5nXhfrYTdxjR68LpjlWLgPCn2bm7ZoJDuYaHGa3sIT1HqBus6zerqOjr/YYig==", "dependencies": { "@types/prosemirror-history": "^1.0.3", "prosemirror-history": "^1.2.0" @@ -323,9 +292,9 @@ } }, "node_modules/@tiptap/extension-horizontal-rule": { - "version": "2.0.0-beta.19", - "resolved": "https://registry.npmjs.org/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.0.0-beta.19.tgz", - "integrity": "sha512-RrU7+inExgC+rRmFWoTxALbu/IgRGRik11LPhMhqrCB+n0XFRUMyVEb/jbfgHWVrPmTXq0MbSWW6LYw3iREzRA==", + "version": "2.0.0-beta.27", + "resolved": "https://registry.npmjs.org/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.0.0-beta.27.tgz", + "integrity": "sha512-qia/dB+JXk55t4/RVxK84ZNMXlwWxdJeC6o3ecM7K35beY9xkF7aeVy16mZZSsSmR41kD5p6hsdMSdyvB2ds5A==", "dependencies": { "prosemirror-state": "^1.3.4" }, @@ -338,9 +307,9 @@ } }, "node_modules/@tiptap/extension-image": { - "version": "2.0.0-beta.15", - "resolved": "https://registry.npmjs.org/@tiptap/extension-image/-/extension-image-2.0.0-beta.15.tgz", - "integrity": "sha512-iMwQ154RPefOxgqTTHjOA735YWesyjBhYvD9fFxRDctM2vLxEYYYFOENXEBCFLNAr94gfaxefCEdkuNYHl9H7g==", + "version": "2.0.0-beta.21", + "resolved": "https://registry.npmjs.org/@tiptap/extension-image/-/extension-image-2.0.0-beta.21.tgz", + "integrity": "sha512-0GUh4GwRhN1Wgl8WJXjQ1jmGHpa4H4c2CGII4G6b9XKNqFSQPum3qKzQCw8uAlYpsEjEuPR2GFK9Yc0iT08m8w==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -350,9 +319,9 @@ } }, "node_modules/@tiptap/extension-italic": { - "version": "2.0.0-beta.15", - "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-2.0.0-beta.15.tgz", - "integrity": "sha512-ZCz1vCysLdvOUrwODuyBP0BDaemCLh6ib7qTYoSDKdive9kfn0Vc5Fg3o8xgHrtrUfwKIJz/sWOknjDEGIc9cw==", + "version": "2.0.0-beta.21", + "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-2.0.0-beta.21.tgz", + "integrity": "sha512-q2H3Og3Qg01N70jC7c/UYMTdeXdWOY5cTrZP2vtGmedGimJpMGpenMc5mrnmEXKssjmNaz/Q8409MV4rHwbmzg==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -362,9 +331,9 @@ } }, "node_modules/@tiptap/extension-list-item": { - "version": "2.0.0-beta.14", - "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-2.0.0-beta.14.tgz", - "integrity": "sha512-t6xwEqP+d5443Ul2Jvqz9kXb3ro7bA7yY9HA0vskm3120WxxHW9jxgxZN+82Ot5Tm7nXOAlsN6vuqnt4idnxZQ==", + "version": "2.0.0-beta.16", + "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-2.0.0-beta.16.tgz", + "integrity": "sha512-I/Tmj9zW5BHeftGByYj/TVJBqZi6cRLsiwufaV4CTMlfYUHE8DDjiQlukGSksa+Nba+wPErWriXAOaBBkjFhjw==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -374,12 +343,9 @@ } }, "node_modules/@tiptap/extension-ordered-list": { - "version": "2.0.0-beta.15", - "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-2.0.0-beta.15.tgz", - "integrity": "sha512-j9Xh8CYtV+C/wrTXEWN+U7NJIQ/cQrjta80Mm2hFiE2KDtFNkpsPqG6UBoky04EPFphR5xDUsO1nCT7T7Tei5A==", - "dependencies": { - "prosemirror-inputrules": "^1.1.3" - }, + "version": "2.0.0-beta.21", + "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-2.0.0-beta.21.tgz", + "integrity": "sha512-TkUWOAayblM2z9rtyREau5fNw7CvvlT6rHlSLGty+VQ861Nuu5gi8Ew4oQETYCmKNYQtZJhm65XjPPyl2GD2dA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -389,9 +355,9 @@ } }, "node_modules/@tiptap/extension-paragraph": { - "version": "2.0.0-beta.17", - "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-2.0.0-beta.17.tgz", - "integrity": "sha512-qCQVCf9c2hgaeIdfy22PaoZyW5Vare/1aGkOEAaZma5RjrUbV9hrRKwoW9LsDjnh1EN1fIeKdg02yEhnHWtG8A==", + "version": "2.0.0-beta.19", + "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-2.0.0-beta.19.tgz", + "integrity": "sha512-mk8Es7kZIAAETHqXqMItNs34HnnlFvYp8+u7e8PQZtMF85YaIH4IVCVhCC2/buVRQTBnFJ3bJDbJAnawnxAWBQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -401,9 +367,9 @@ } }, "node_modules/@tiptap/extension-strike": { - "version": "2.0.0-beta.17", - "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-2.0.0-beta.17.tgz", - "integrity": "sha512-+WRd0RuCK4+jFKNVN+4rHTa5VMqqGDO2uc+TknkqhFqWp/z96OAGlpHJOwPrnW1fLbpjEBBQIr1vVYSw6KgcZg==", + "version": "2.0.0-beta.23", + "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-2.0.0-beta.23.tgz", + "integrity": "sha512-xUCpuCDb8lG9BVve+/uq8fxOAPJgndQ0gapFZXCEb2wuZj0HfsHNwva8q0pMeIYXTSAIjobkueHtT8NjvSLtnw==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -413,12 +379,9 @@ } }, "node_modules/@tiptap/extension-task-item": { - "version": "2.0.0-beta.17", - "resolved": "https://registry.npmjs.org/@tiptap/extension-task-item/-/extension-task-item-2.0.0-beta.17.tgz", - "integrity": "sha512-uV5f9rWo9NAZ+oyt/mkhFEZfcngr92pVL2sn291RiT0qw9NRvdIQ6PLH24il9zu+jjeWmh1cJnBuQos+MQqjyg==", - "dependencies": { - "prosemirror-inputrules": "^1.1.3" - }, + "version": "2.0.0-beta.25", + "resolved": "https://registry.npmjs.org/@tiptap/extension-task-item/-/extension-task-item-2.0.0-beta.25.tgz", + "integrity": "sha512-rX9PTu5lw8JAvcQ70YsR4si9i1WbhlNdJ9S/pU0N6GXNhCah8ZE27y3Ir9mhqjFJCpmngPeBlIhoQA2jyX7kkA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -428,9 +391,9 @@ } }, "node_modules/@tiptap/extension-task-list": { - "version": "2.0.0-beta.17", - "resolved": "https://registry.npmjs.org/@tiptap/extension-task-list/-/extension-task-list-2.0.0-beta.17.tgz", - "integrity": "sha512-E17VBqW2lXF59hCQ/3/Kg0hYSDGvVC4B3W8miZwCXt5WTOl98Gk6qAiDXl+2mDKZvnsLty/YrgkD88OlZSIEbQ==", + "version": "2.0.0-beta.20", + "resolved": "https://registry.npmjs.org/@tiptap/extension-task-list/-/extension-task-list-2.0.0-beta.20.tgz", + "integrity": "sha512-pSojFNlfrj86wNXVQwcnAmlrhoO6iLKS8yt90GZUwZlh0/cWjgWo/USweApYAhJlOmI01K5c7YmMu6q1k7zBcw==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -452,9 +415,9 @@ } }, "node_modules/@tiptap/extension-text-align": { - "version": "2.0.0-beta.22", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text-align/-/extension-text-align-2.0.0-beta.22.tgz", - "integrity": "sha512-47jbI0DyiS+debUo0Wo2eexoRAdFZajw1+PJgpbtKLq5kWYqXeAvOyMkIIOFYHEl5u8pi4SsQd1NgEt21j0mig==", + "version": "2.0.0-beta.25", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text-align/-/extension-text-align-2.0.0-beta.25.tgz", + "integrity": "sha512-Lu9K4bT35ofIuSCqYYGCS+eDgKc7tJmXopWyqTG6O33jzJ9DdI1xbR5XSz4ERrR3HqA9g01ZnCC2kd3RbpzUxA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -477,12 +440,9 @@ } }, "node_modules/@tiptap/extension-typography": { - "version": "2.0.0-beta.14", - "resolved": "https://registry.npmjs.org/@tiptap/extension-typography/-/extension-typography-2.0.0-beta.14.tgz", - "integrity": "sha512-Z+mS0TCUsKfpdv+T2+dx02f+Ew7dfCNKsNfJJyNnQbQRvuOpVR9G+FMUcPwHR5tQMgMrn3XhCWFM1sbmI1HoOQ==", - "dependencies": { - "prosemirror-inputrules": "^1.1.3" - }, + "version": "2.0.0-beta.17", + "resolved": "https://registry.npmjs.org/@tiptap/extension-typography/-/extension-typography-2.0.0-beta.17.tgz", + "integrity": "sha512-w98KiifXdK9I+/vTKap2DJdEGvG72Sg02t93kpzyw5P7pYG0ZzCpFgdF7Vh8+Xp4JqffBayYh81mKEB+rxeu3w==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -492,9 +452,9 @@ } }, "node_modules/@tiptap/extension-underline": { - "version": "2.0.0-beta.16", - "resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-2.0.0-beta.16.tgz", - "integrity": "sha512-N3wMfSJkn+A5HbuLSpbn1Zp9CWWLXfMexpVdg4eUwTMOgF/kpVRaPGCkBonhHH3NfWtT7QbSipdWc7DKpBb8Jw==", + "version": "2.0.0-beta.18", + "resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-2.0.0-beta.18.tgz", + "integrity": "sha512-zYx9aAAbwKdrF/QJvRhaZFpBebcmXNYAjZmYyyErTR1NXmPi2SMAE8OaDC3S7xRnt8HeHwDAUbqiUfXJWG1XRA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -504,28 +464,28 @@ } }, "node_modules/@tiptap/starter-kit": { - "version": "2.0.0-beta.101", - "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-2.0.0-beta.101.tgz", - "integrity": "sha512-1SoVrPe2JMPo5/Je0NprZWN8G0q0EOTpoVHQ/+VwthectJBz1TyCuNOqoR1WNL9II6Fj9AZelyhPWacw7vM27A==", - "dependencies": { - "@tiptap/core": "^2.0.0-beta.102", - "@tiptap/extension-blockquote": "^2.0.0-beta.15", - "@tiptap/extension-bold": "^2.0.0-beta.15", - "@tiptap/extension-bullet-list": "^2.0.0-beta.15", - "@tiptap/extension-code": "^2.0.0-beta.16", - "@tiptap/extension-code-block": "^2.0.0-beta.17", + "version": "2.0.0-beta.135", + "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-2.0.0-beta.135.tgz", + "integrity": "sha512-rolfgLHlv2SVRpWWaiJTWtVeSclAg2d4bnbN8GHrgnxKCpEqFsJQtaQQnEJLq58nAOJcVOx4fR7rqz5bxXjHuw==", + "dependencies": { + "@tiptap/core": "^2.0.0-beta.133", + "@tiptap/extension-blockquote": "^2.0.0-beta.21", + "@tiptap/extension-bold": "^2.0.0-beta.21", + "@tiptap/extension-bullet-list": "^2.0.0-beta.20", + "@tiptap/extension-code": "^2.0.0-beta.22", + "@tiptap/extension-code-block": "^2.0.0-beta.26", "@tiptap/extension-document": "^2.0.0-beta.13", - "@tiptap/extension-dropcursor": "^2.0.0-beta.19", - "@tiptap/extension-gapcursor": "^2.0.0-beta.19", - "@tiptap/extension-hard-break": "^2.0.0-beta.15", - "@tiptap/extension-heading": "^2.0.0-beta.15", - "@tiptap/extension-history": "^2.0.0-beta.16", - "@tiptap/extension-horizontal-rule": "^2.0.0-beta.19", - "@tiptap/extension-italic": "^2.0.0-beta.15", - "@tiptap/extension-list-item": "^2.0.0-beta.14", - "@tiptap/extension-ordered-list": "^2.0.0-beta.15", - "@tiptap/extension-paragraph": "^2.0.0-beta.17", - "@tiptap/extension-strike": "^2.0.0-beta.17", + "@tiptap/extension-dropcursor": "^2.0.0-beta.21", + "@tiptap/extension-gapcursor": "^2.0.0-beta.30", + "@tiptap/extension-hard-break": "^2.0.0-beta.27", + "@tiptap/extension-heading": "^2.0.0-beta.20", + "@tiptap/extension-history": "^2.0.0-beta.18", + "@tiptap/extension-horizontal-rule": "^2.0.0-beta.27", + "@tiptap/extension-italic": "^2.0.0-beta.21", + "@tiptap/extension-list-item": "^2.0.0-beta.16", + "@tiptap/extension-ordered-list": "^2.0.0-beta.21", + "@tiptap/extension-paragraph": "^2.0.0-beta.19", + "@tiptap/extension-strike": "^2.0.0-beta.23", "@tiptap/extension-text": "^2.0.0-beta.13" }, "funding": { @@ -534,30 +494,24 @@ } }, "node_modules/@tiptap/vue-3": { - "version": "2.0.0-beta.56", - "resolved": "https://registry.npmjs.org/@tiptap/vue-3/-/vue-3-2.0.0-beta.56.tgz", - "integrity": "sha512-fY1Np4hvz6n1RYvOHVWcaLppRy/+J/adJ2lGkfbYrQiuFiEOrx15CYYkSsoYZH23Y7LCJAVoYaBhlzdgOh02cA==", + "version": "2.0.0-beta.76", + "resolved": "https://registry.npmjs.org/@tiptap/vue-3/-/vue-3-2.0.0-beta.76.tgz", + "integrity": "sha512-n9fCaB5B73mtC4x/CPPxJ4+VbC+8evstx2Va+PJUygqrepYfA66cJFUZNl/FnxbdvqyLSmiLVjzDj9slDXGCNQ==", "dependencies": { - "@tiptap/extension-bubble-menu": "^2.0.0-beta.31", - "@tiptap/extension-floating-menu": "^2.0.0-beta.25", + "@tiptap/extension-bubble-menu": "^2.0.0-beta.46", + "@tiptap/extension-floating-menu": "^2.0.0-beta.40", "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.19.3", - "vue": "^3.0.0" + "prosemirror-view": "^1.22.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.0.0-beta.1" + "@tiptap/core": "^2.0.0-beta.1", + "vue": "^3.0.0" } }, - "node_modules/@types/estree": { - "version": "0.0.48", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.48.tgz", - "integrity": "sha512-LfZwXoGUDo0C3me81HXgkBg5CTQYb6xzEl+fNmbO4JdRiSKQ8A0GD1OBBvKAIsbCUgoyAty7m99GqqMQe784ew==", - "dev": true - }, "node_modules/@types/orderedmap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/orderedmap/-/orderedmap-1.0.0.tgz", @@ -599,15 +553,6 @@ "@types/prosemirror-state": "*" } }, - "node_modules/@types/prosemirror-inputrules": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/prosemirror-inputrules/-/prosemirror-inputrules-1.0.4.tgz", - "integrity": "sha512-lJIMpOjO47SYozQybUkpV6QmfuQt7GZKHtVrvS+mR5UekA8NMC5HRIVMyaIauJLWhKU6oaNjpVaXdw41kh165g==", - "dependencies": { - "@types/prosemirror-model": "*", - "@types/prosemirror-state": "*" - } - }, "node_modules/@types/prosemirror-keymap": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@types/prosemirror-keymap/-/prosemirror-keymap-1.0.4.tgz", @@ -638,9 +583,9 @@ } }, "node_modules/@types/prosemirror-state": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@types/prosemirror-state/-/prosemirror-state-1.2.7.tgz", - "integrity": "sha512-clJf5uw3/XQnBJtl2RqYXoLMGBySnLYl43xtDvFfQZKkLnnYcM1SDU8dcz7lWjl2Dm+H98RpLOl44pp7DYT+wA==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@types/prosemirror-state/-/prosemirror-state-1.2.8.tgz", + "integrity": "sha512-mq9uyQWcpu8jeamO6Callrdvf/e1H/aRLR2kZWSpZrPHctEsxWHBbluD/wqVjXBRIOoMHLf6ZvOkrkmGLoCHVA==", "dependencies": { "@types/prosemirror-model": "*", "@types/prosemirror-transform": "*", @@ -656,9 +601,9 @@ } }, "node_modules/@types/prosemirror-view": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/@types/prosemirror-view/-/prosemirror-view-1.18.0.tgz", - "integrity": "sha512-7NBy7qIV/ig49ThfkrIJrvW8E+HwumMgmpopUTYJlKwOh/fQ6SVUG/RtdnAIBLD+4uK0R2SMObbGZm06x6OwbA==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/@types/prosemirror-view/-/prosemirror-view-1.19.1.tgz", + "integrity": "sha512-fyQ4NVxAdfISWrE2qT8cpZdosXoH/1JuVYMBs9CdaXPbvi/8R2L2tkkcMRM314piKrO8nfYH5OBZKzP2Ax3jtA==", "dependencies": { "@types/prosemirror-model": "*", "@types/prosemirror-state": "*", @@ -666,195 +611,118 @@ } }, "node_modules/@vitejs/plugin-vue": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-1.6.0.tgz", - "integrity": "sha512-n3i8htn8pTg9M+kM3cnEfsPZx/6ngInlTroth6fA1LQTJq5aTVQ8ggaE5pPoAy9vCgHPtcaXMzwpldhqRAkebQ==", + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-1.9.4.tgz", + "integrity": "sha512-0CZqaCoChriPTTtGkERy1LGPcYjGFpi2uYRhBPIkqJqUGV5JnJFhQAgh6oH9j5XZHfrRaisX8W0xSpO4T7S78A==", "dev": true, "engines": { "node": ">=12.0.0" }, "peerDependencies": { - "@vue/compiler-sfc": "^3.2.6" + "vite": "^2.5.10" } }, "node_modules/@vue/compiler-core": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.1.5.tgz", - "integrity": "sha512-TXBhFinoBaXKDykJzY26UEuQU1K07FOp/0Ie+OXySqqk0bS0ZO7Xvl7UmiTUPYcLrWbxWBR7Bs/y55AI0MNc2Q==", + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.21.tgz", + "integrity": "sha512-NhhiQZNG71KNq1h5pMW/fAXdTF7lJRaSI7LDm2edhHXVz1ROMICo8SreUmQnSf4Fet0UPBVqJ988eF4+936iDQ==", "dependencies": { - "@babel/parser": "^7.12.0", - "@babel/types": "^7.12.0", - "@vue/shared": "3.1.5", - "estree-walker": "^2.0.1", + "@babel/parser": "^7.15.0", + "@vue/shared": "3.2.21", + "estree-walker": "^2.0.2", "source-map": "^0.6.1" } }, "node_modules/@vue/compiler-dom": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.1.5.tgz", - "integrity": "sha512-ZsL3jqJ52OjGU/YiT/9XiuZAmWClKInZM2aFJh9gnsAPqOrj2JIELMbkIFpVKR/CrVO/f2VxfPiiQdQTr65jcQ==", + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.21.tgz", + "integrity": "sha512-gsJD3DpYZSYquiA7UIPsMDSlAooYWDvHPq9VRsqzJEk2PZtFvLvHPb4aaMD8Ufd62xzYn32cnnkzsEOJhyGilA==", "dependencies": { - "@vue/compiler-core": "3.1.5", - "@vue/shared": "3.1.5" + "@vue/compiler-core": "3.2.21", + "@vue/shared": "3.2.21" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.6.tgz", - "integrity": "sha512-Ariz1eDsf+2fw6oWXVwnBNtfKHav72RjlWXpEgozYBLnfRPzP+7jhJRw4Nq0OjSsLx2HqjF3QX7HutTjYB0/eA==", - "dev": true, + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.21.tgz", + "integrity": "sha512-+yDlUSebKpz/ovxM2vLRRx7w/gVfY767pOfYTgbIhAs+ogvIV2BsIt4fpxlThnlCNChJ+yE0ERUNoROv2kEGEQ==", "dependencies": { "@babel/parser": "^7.15.0", - "@babel/types": "^7.15.0", - "@types/estree": "^0.0.48", - "@vue/compiler-core": "3.2.6", - "@vue/compiler-dom": "3.2.6", - "@vue/compiler-ssr": "3.2.6", - "@vue/ref-transform": "3.2.6", - "@vue/shared": "3.2.6", - "consolidate": "^0.16.0", + "@vue/compiler-core": "3.2.21", + "@vue/compiler-dom": "3.2.21", + "@vue/compiler-ssr": "3.2.21", + "@vue/ref-transform": "3.2.21", + "@vue/shared": "3.2.21", "estree-walker": "^2.0.2", - "hash-sum": "^2.0.0", - "lru-cache": "^5.1.1", "magic-string": "^0.25.7", - "merge-source-map": "^1.1.0", "postcss": "^8.1.10", - "postcss-modules": "^4.0.0", - "postcss-selector-parser": "^6.0.4", "source-map": "^0.6.1" } }, - "node_modules/@vue/compiler-sfc/node_modules/@vue/compiler-core": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.6.tgz", - "integrity": "sha512-vbwnz7+OhtLO5p5i630fTuQCL+MlUpEMTKHuX+RfetQ+3pFCkItt2JUH+9yMaBG2Hkz6av+T9mwN/acvtIwpbw==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.15.0", - "@babel/types": "^7.15.0", - "@vue/shared": "3.2.6", - "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "node_modules/@vue/compiler-sfc/node_modules/@vue/compiler-dom": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.6.tgz", - "integrity": "sha512-+a/3oBAzFIXhHt8L5IHJOTP4a5egzvpXYyi13jR7CUYOR1S+Zzv7vBWKYBnKyJLwnrxTZnTQVjeHCgJq743XKg==", - "dev": true, - "dependencies": { - "@vue/compiler-core": "3.2.6", - "@vue/shared": "3.2.6" - } - }, - "node_modules/@vue/compiler-sfc/node_modules/@vue/shared": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.6.tgz", - "integrity": "sha512-uwX0Qs2e6kdF+WmxwuxJxOnKs/wEkMArtYpHSm7W+VY/23Tl8syMRyjnzEeXrNCAP0/8HZxEGkHJsjPEDNRuHw==", - "dev": true - }, "node_modules/@vue/compiler-ssr": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.6.tgz", - "integrity": "sha512-A7IKRKHSyPnTC4w1FxHkjzoyjXInsXkcs/oX22nBQ+6AWlXj2Tt1le96CWPOXy5vYlsTYkF1IgfBaKIdeN/39g==", - "dev": true, - "dependencies": { - "@vue/compiler-dom": "3.2.6", - "@vue/shared": "3.2.6" - } - }, - "node_modules/@vue/compiler-ssr/node_modules/@vue/compiler-core": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.6.tgz", - "integrity": "sha512-vbwnz7+OhtLO5p5i630fTuQCL+MlUpEMTKHuX+RfetQ+3pFCkItt2JUH+9yMaBG2Hkz6av+T9mwN/acvtIwpbw==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.15.0", - "@babel/types": "^7.15.0", - "@vue/shared": "3.2.6", - "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "node_modules/@vue/compiler-ssr/node_modules/@vue/compiler-dom": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.6.tgz", - "integrity": "sha512-+a/3oBAzFIXhHt8L5IHJOTP4a5egzvpXYyi13jR7CUYOR1S+Zzv7vBWKYBnKyJLwnrxTZnTQVjeHCgJq743XKg==", - "dev": true, + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.21.tgz", + "integrity": "sha512-eU+A0iWYy+1zAo2CRIJ0zSVlv1iuGAIbNRCnllSJ31pV1lX3jypJYzGbJlSRAbB7VP6E+tYveVT1Oq8JKewa3g==", "dependencies": { - "@vue/compiler-core": "3.2.6", - "@vue/shared": "3.2.6" + "@vue/compiler-dom": "3.2.21", + "@vue/shared": "3.2.21" } }, - "node_modules/@vue/compiler-ssr/node_modules/@vue/shared": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.6.tgz", - "integrity": "sha512-uwX0Qs2e6kdF+WmxwuxJxOnKs/wEkMArtYpHSm7W+VY/23Tl8syMRyjnzEeXrNCAP0/8HZxEGkHJsjPEDNRuHw==", - "dev": true - }, "node_modules/@vue/reactivity": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.1.5.tgz", - "integrity": "sha512-1tdfLmNjWG6t/CsPldh+foumYFo3cpyCHgBYQ34ylaMsJ+SNHQ1kApMIa8jN+i593zQuaw3AdWH0nJTARzCFhg==", + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.21.tgz", + "integrity": "sha512-7C57zFm/5E3SSTUhVuYj1InDwuJ+GIVQ/z+H43C9sST85gIThGXVhksl1yWTAadf8Yz4T5lSbqi5Ds8U/ueWcw==", "dependencies": { - "@vue/shared": "3.1.5" + "@vue/shared": "3.2.21" } }, "node_modules/@vue/ref-transform": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/ref-transform/-/ref-transform-3.2.6.tgz", - "integrity": "sha512-ie39+Y4nbirDLvH+WEq6Eo/l3n3mFATayqR+kEMSphrtMW6Uh/eEMx1Gk2Jnf82zmj3VLRq7dnmPx72JLcBYkQ==", - "dev": true, + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/ref-transform/-/ref-transform-3.2.21.tgz", + "integrity": "sha512-uiEWWBsrGeun9O7dQExYWzXO3rHm/YdtFNXDVqCSoPypzOVxWxdiL+8hHeWzxMB58fVuV2sT80aUtIVyaBVZgQ==", "dependencies": { "@babel/parser": "^7.15.0", - "@vue/compiler-core": "3.2.6", - "@vue/shared": "3.2.6", + "@vue/compiler-core": "3.2.21", + "@vue/shared": "3.2.21", "estree-walker": "^2.0.2", "magic-string": "^0.25.7" } }, - "node_modules/@vue/ref-transform/node_modules/@vue/compiler-core": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.6.tgz", - "integrity": "sha512-vbwnz7+OhtLO5p5i630fTuQCL+MlUpEMTKHuX+RfetQ+3pFCkItt2JUH+9yMaBG2Hkz6av+T9mwN/acvtIwpbw==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.15.0", - "@babel/types": "^7.15.0", - "@vue/shared": "3.2.6", - "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "node_modules/@vue/ref-transform/node_modules/@vue/shared": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.6.tgz", - "integrity": "sha512-uwX0Qs2e6kdF+WmxwuxJxOnKs/wEkMArtYpHSm7W+VY/23Tl8syMRyjnzEeXrNCAP0/8HZxEGkHJsjPEDNRuHw==", - "dev": true - }, "node_modules/@vue/runtime-core": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.1.5.tgz", - "integrity": "sha512-YQbG5cBktN1RowQDKA22itmvQ+b40f0WgQ6CXK4VYoYICAiAfu6Cc14777ve8zp1rJRGtk5oIeS149TOculrTg==", + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.21.tgz", + "integrity": "sha512-7oOxKaU0D2IunOAMOOHZgJVrHg63xwng8BZx3fbgmakqEIMwHhQcp+5GV1sOg/sWW7R4UhaRDIUCukO2GRVK2Q==", "dependencies": { - "@vue/reactivity": "3.1.5", - "@vue/shared": "3.1.5" + "@vue/reactivity": "3.2.21", + "@vue/shared": "3.2.21" } }, "node_modules/@vue/runtime-dom": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.1.5.tgz", - "integrity": "sha512-tNcf3JhVR0RfW0kw1p8xZgv30nvX8Y9rsz7eiQ0dHe273sfoCngAG0y4GvMaY4Xd8FsjUwFedd4suQ8Lu8meXg==", + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.21.tgz", + "integrity": "sha512-apBdriD6QsI4ywbllY8kjr9/0scGuStDuvLbJULPQkFPtHzntd51bP5PQTQVAEIc9kwnTozmj6x6ZdX/cwo7xA==", "dependencies": { - "@vue/runtime-core": "3.1.5", - "@vue/shared": "3.1.5", + "@vue/runtime-core": "3.2.21", + "@vue/shared": "3.2.21", "csstype": "^2.6.8" } }, + "node_modules/@vue/server-renderer": { + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.21.tgz", + "integrity": "sha512-QBgYqVgI7XCSBCqGa4LduV9vpfQFdZBOodFmq5Txk5W/v1KrJ1LoOh2Q0RHiRgtoK/UR9uyvRVcYqOmwHkZNEg==", + "dependencies": { + "@vue/compiler-ssr": "3.2.21", + "@vue/shared": "3.2.21" + }, + "peerDependencies": { + "vue": "3.2.21" + } + }, "node_modules/@vue/shared": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.1.5.tgz", - "integrity": "sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA==" + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.21.tgz", + "integrity": "sha512-5EQmIPK6gw4UVYUbM959B0uPsJ58+xoMESCZs3N89XyvJ9e+fX4pqEPrOGV8OroIk3SbEvJcC+eYc8BH9JQrHA==" }, "node_modules/anymatch": { "version": "3.1.2", @@ -869,15 +737,6 @@ "node": ">= 8" } }, - "node_modules/big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -887,12 +746,6 @@ "node": ">=8" } }, - "node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, "node_modules/braces": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", @@ -926,59 +779,260 @@ "fsevents": "~2.3.1" } }, - "node_modules/colorette": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", - "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", - "dev": true - }, - "node_modules/consolidate": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.16.0.tgz", - "integrity": "sha512-Nhl1wzCslqXYTJVDyJCu3ODohy9OfBMB5uD2BiBTzd7w+QY0lBzafkR8y8755yMYHAaMD4NuzbAw03/xzfw+eQ==", - "dev": true, - "dependencies": { - "bluebird": "^3.7.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/csstype": { - "version": "2.6.17", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.17.tgz", - "integrity": "sha512-u1wmTI1jJGzCJzWndZo8mk4wnPTZd1eOIYTYvuEyOQGfmDl3TrabCCfKnOC86FZwW/9djqTl933UF/cS425i9A==" - }, - "node_modules/emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true, - "engines": { - "node": ">= 4" - } + "version": "2.6.18", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.18.tgz", + "integrity": "sha512-RSU6Hyeg14am3Ah4VZEmeX8H7kLwEEirXe6aU2IPfKNvhXwTflK5HQRDNI0ypQXoqmm+QPyG2IaPuQE5zMwSIQ==" }, "node_modules/esbuild": { - "version": "0.12.24", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.24.tgz", - "integrity": "sha512-C0ibY+HsXzYB6L/pLWEiWjMpghKsIc58Q5yumARwBQsHl9DXPakW+5NI/Y9w4YXiz0PEP6XTGTT/OV4Nnsmb4A==", + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.13.13.tgz", + "integrity": "sha512-Z17A/R6D0b4s3MousytQ/5i7mTCbaF+Ua/yPfoe71vdTv4KBvVAvQ/6ytMngM2DwGJosl8WxaD75NOQl2QF26Q==", "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" - } + }, + "optionalDependencies": { + "esbuild-android-arm64": "0.13.13", + "esbuild-darwin-64": "0.13.13", + "esbuild-darwin-arm64": "0.13.13", + "esbuild-freebsd-64": "0.13.13", + "esbuild-freebsd-arm64": "0.13.13", + "esbuild-linux-32": "0.13.13", + "esbuild-linux-64": "0.13.13", + "esbuild-linux-arm": "0.13.13", + "esbuild-linux-arm64": "0.13.13", + "esbuild-linux-mips64le": "0.13.13", + "esbuild-linux-ppc64le": "0.13.13", + "esbuild-netbsd-64": "0.13.13", + "esbuild-openbsd-64": "0.13.13", + "esbuild-sunos-64": "0.13.13", + "esbuild-windows-32": "0.13.13", + "esbuild-windows-64": "0.13.13", + "esbuild-windows-arm64": "0.13.13" + } + }, + "node_modules/esbuild-android-arm64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.13.13.tgz", + "integrity": "sha512-T02aneWWguJrF082jZworjU6vm8f4UQ+IH2K3HREtlqoY9voiJUwHLRL6khRlsNLzVglqgqb7a3HfGx7hAADCQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/esbuild-darwin-64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.13.13.tgz", + "integrity": "sha512-wkaiGAsN/09X9kDlkxFfbbIgR78SNjMOfUhoel3CqKBDsi9uZhw7HBNHNxTzYUK8X8LAKFpbODgcRB3b/I8gHA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/esbuild-darwin-arm64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.13.tgz", + "integrity": "sha512-b02/nNKGSV85Gw9pUCI5B48AYjk0vFggDeom0S6QMP/cEDtjSh1WVfoIFNAaLA0MHWfue8KBwoGVsN7rBshs4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/esbuild-freebsd-64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.13.tgz", + "integrity": "sha512-ALgXYNYDzk9YPVk80A+G4vz2D22Gv4j4y25exDBGgqTcwrVQP8rf/rjwUjHoh9apP76oLbUZTmUmvCMuTI1V9A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/esbuild-freebsd-arm64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.13.tgz", + "integrity": "sha512-uFvkCpsZ1yqWQuonw5T1WZ4j59xP/PCvtu6I4pbLejhNo4nwjW6YalqnBvBSORq5/Ifo9S/wsIlVHzkzEwdtlw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/esbuild-linux-32": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.13.13.tgz", + "integrity": "sha512-yxR9BBwEPs9acVEwTrEE2JJNHYVuPQC9YGjRfbNqtyfK/vVBQYuw8JaeRFAvFs3pVJdQD0C2BNP4q9d62SCP4w==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.13.13.tgz", + "integrity": "sha512-kzhjlrlJ+6ESRB/n12WTGll94+y+HFeyoWsOrLo/Si0s0f+Vip4b8vlnG0GSiS6JTsWYAtGHReGczFOaETlKIw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-arm": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.13.13.tgz", + "integrity": "sha512-hXub4pcEds+U1TfvLp1maJ+GHRw7oizvzbGRdUvVDwtITtjq8qpHV5Q5hWNNn6Q+b3b2UxF03JcgnpzCw96nUQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-arm64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.13.tgz", + "integrity": "sha512-KMrEfnVbmmJxT3vfTnPv/AiXpBFbbyExH13BsUGy1HZRPFMi5Gev5gk8kJIZCQSRfNR17aqq8sO5Crm2KpZkng==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-mips64le": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.13.tgz", + "integrity": "sha512-cJT9O1LYljqnnqlHaS0hdG73t7hHzF3zcN0BPsjvBq+5Ad47VJun+/IG4inPhk8ta0aEDK6LdP+F9299xa483w==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-ppc64le": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.13.tgz", + "integrity": "sha512-+rghW8st6/7O6QJqAjVK3eXzKkZqYAw6LgHv7yTMiJ6ASnNvghSeOcIvXFep3W2oaJc35SgSPf21Ugh0o777qQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-netbsd-64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.13.13.tgz", + "integrity": "sha512-A/B7rwmzPdzF8c3mht5TukbnNwY5qMJqes09ou0RSzA5/jm7Jwl/8z853ofujTFOLhkNHUf002EAgokzSgEMpQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ] + }, + "node_modules/esbuild-openbsd-64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.13.tgz", + "integrity": "sha512-szwtuRA4rXKT3BbwoGpsff6G7nGxdKgUbW9LQo6nm0TVCCjDNDC/LXxT994duIW8Tyq04xZzzZSW7x7ttDiw1w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/esbuild-sunos-64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.13.13.tgz", + "integrity": "sha512-ihyds9O48tVOYF48iaHYUK/boU5zRaLOXFS+OOL3ceD39AyHo46HVmsJLc7A2ez0AxNZCxuhu+P9OxfPfycTYQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ] + }, + "node_modules/esbuild-windows-32": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.13.13.tgz", + "integrity": "sha512-h2RTYwpG4ldGVJlbmORObmilzL8EECy8BFiF8trWE1ZPHLpECE9//J3Bi+W3eDUuv/TqUbiNpGrq4t/odbayUw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/esbuild-windows-64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.13.13.tgz", + "integrity": "sha512-oMrgjP4CjONvDHe7IZXHrMk3wX5Lof/IwFEIbwbhgbXGBaN2dke9PkViTiXC3zGJSGpMvATXVplEhlInJ0drHA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/esbuild-windows-arm64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.13.tgz", + "integrity": "sha512-6fsDfTuTvltYB5k+QPah/x7LrI2+OLAJLE3bWLDiZI6E8wXMQU+wLqtEO/U/RvJgVY1loPs5eMpUBpVajczh1A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] }, "node_modules/estree-walker": { "version": "2.0.2", @@ -1017,15 +1071,6 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "node_modules/generic-names": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/generic-names/-/generic-names-2.0.1.tgz", - "integrity": "sha512-kPCHWa1m9wGG/OwQpeweTwM/PYiQLrUIxXbt/P4Nic3LbGjCP0YwrALHW1uNLKZ0LIMg+RF+XRlj2ekT9ZlZAQ==", - "dev": true, - "dependencies": { - "loader-utils": "^1.1.0" - } - }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -1050,30 +1095,6 @@ "node": ">= 0.4.0" } }, - "node_modules/hash-sum": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-2.0.0.tgz", - "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==", - "dev": true - }, - "node_modules/icss-replace-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", - "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", - "dev": true - }, - "node_modules/icss-utils": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", - "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -1087,9 +1108,9 @@ } }, "node_modules/is-core-module": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.3.0.tgz", - "integrity": "sha512-xSphU2KG9867tsYdLD4RWQ1VqdFl4HTO9Thf3I/3dLEfr0dbPTWKsuCKrgqMljg4nPE+Gq0VCnzT3gr0CyBmsw==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", + "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -1134,38 +1155,6 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "peer": true }, - "node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", - "dev": true, - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", - "dev": true - }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -1178,44 +1167,18 @@ "loose-envify": "cli.js" } }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, "node_modules/magic-string": { "version": "0.25.7", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", - "dev": true, "dependencies": { "sourcemap-codec": "^1.4.4" } }, - "node_modules/merge-source-map": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", - "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", - "dev": true, - "dependencies": { - "source-map": "^0.6.1" - } - }, - "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, "node_modules/nanoid": { - "version": "3.1.23", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", - "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==", - "dev": true, + "version": "3.1.30", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.30.tgz", + "integrity": "sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ==", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -1252,6 +1215,11 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, "node_modules/picomatch": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", @@ -1265,13 +1233,12 @@ } }, "node_modules/postcss": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.6.tgz", - "integrity": "sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==", - "dev": true, + "version": "8.3.11", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.11.tgz", + "integrity": "sha512-hCmlUAIlUiav8Xdqw3Io4LcpA1DOt7h3LSTAC4G6JGHFFaWzI6qvFt9oilvl8BmkbBRX1IhM90ZAmpk68zccQA==", "dependencies": { - "colorette": "^1.2.2", - "nanoid": "^3.1.23", + "nanoid": "^3.1.30", + "picocolors": "^1.0.0", "source-map-js": "^0.6.2" }, "engines": { @@ -1282,107 +1249,10 @@ "url": "https://opencollective.com/postcss/" } }, - "node_modules/postcss-modules": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/postcss-modules/-/postcss-modules-4.2.2.tgz", - "integrity": "sha512-/H08MGEmaalv/OU8j6bUKi/kZr2kqGF6huAW8m9UAgOLWtpFdhA14+gPBoymtqyv+D4MLsmqaF2zvIegdCxJXg==", - "dev": true, - "dependencies": { - "generic-names": "^2.0.1", - "icss-replace-symbols": "^1.1.0", - "lodash.camelcase": "^4.3.0", - "postcss-modules-extract-imports": "^3.0.0", - "postcss-modules-local-by-default": "^4.0.0", - "postcss-modules-scope": "^3.0.0", - "postcss-modules-values": "^4.0.0", - "string-hash": "^1.1.1" - }, - "peerDependencies": { - "postcss": "^8.0.0" - } - }, - "node_modules/postcss-modules-extract-imports": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", - "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", - "dev": true, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-local-by-default": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz", - "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==", - "dev": true, - "dependencies": { - "icss-utils": "^5.0.0", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.1.0" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-scope": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", - "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.4" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-values": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", - "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", - "dev": true, - "dependencies": { - "icss-utils": "^5.0.0" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-selector-parser": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz", - "integrity": "sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==", - "dev": true, - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss-value-parser": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", - "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", - "dev": true - }, "node_modules/prosemirror-commands": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.1.10.tgz", - "integrity": "sha512-IWyBBXNAd44RM6NnBPljwq+/CM2oYCQJkF+YhKEAZNwzW0uFdGf4qComhjbKZzqFdu6Iub2ZhNsXgwPibA0lCQ==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.1.12.tgz", + "integrity": "sha512-+CrMs3w/ZVPSkR+REg8KL/clyFLv/1+SgY/OMN+CB22Z24j9TZDje72vL36lOZ/E4NeRXuiCcmENcW/vAcG67A==", "dependencies": { "prosemirror-model": "^1.0.0", "prosemirror-state": "^1.0.0", @@ -1400,9 +1270,9 @@ } }, "node_modules/prosemirror-gapcursor": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/prosemirror-gapcursor/-/prosemirror-gapcursor-1.1.5.tgz", - "integrity": "sha512-SjbUZq5pgsBDuV3hu8GqgIpZR5eZvGLM+gPQTqjVVYSMUCfKW3EGXTEYaLHEl1bGduwqNC95O3bZflgtAb4L6w==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/prosemirror-gapcursor/-/prosemirror-gapcursor-1.2.0.tgz", + "integrity": "sha512-yCLy5+0rVqLir/KcHFathQj4Rf8aRHi80FmEfKtM0JmyzvwdomslLzDZ/pX4oFhFKDgjl/WBBBFNqDyNifWg7g==", "dependencies": { "prosemirror-keymap": "^1.0.0", "prosemirror-model": "^1.0.0", @@ -1420,36 +1290,27 @@ "rope-sequence": "^1.3.0" } }, - "node_modules/prosemirror-inputrules": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/prosemirror-inputrules/-/prosemirror-inputrules-1.1.3.tgz", - "integrity": "sha512-ZaHCLyBtvbyIHv0f5p6boQTIJjlD6o2NPZiEaZWT2DA+j591zS29QQEMT4lBqwcLW3qRSf7ZvoKNbf05YrsStw==", - "dependencies": { - "prosemirror-state": "^1.0.0", - "prosemirror-transform": "^1.0.0" - } - }, "node_modules/prosemirror-keymap": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.1.4.tgz", - "integrity": "sha512-Al8cVUOnDFL4gcI5IDlG6xbZ0aOD/i3B17VT+1JbHWDguCgt/lBHVTHUBcKvvbSg6+q/W4Nj1Fu6bwZSca3xjg==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.1.5.tgz", + "integrity": "sha512-8SZgPH3K+GLsHL2wKuwBD9rxhsbnVBTwpHCO4VUO5GmqUQlxd/2GtBVWTsyLq4Dp3N9nGgPd3+lZFKUDuVp+Vw==", "dependencies": { "prosemirror-state": "^1.0.0", "w3c-keyname": "^2.2.0" } }, "node_modules/prosemirror-model": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.14.3.tgz", - "integrity": "sha512-yzZlBaSxfUPIIP6U5Edh5zKxJPZ5f7bwZRhiCuH3UYkWhj+P3d8swHsbuAMOu/iDatDc5J/Qs5Mb3++mZf+CvQ==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.15.0.tgz", + "integrity": "sha512-hQJv7SnIhlAy9ga3lhPPgaufhvCbQB9tHwscJ9E1H1pPHmN8w5V/lURueoYv9Kc3/bpNWoyHa8r3g//m7N0ChQ==", "dependencies": { "orderedmap": "^1.1.0" } }, "node_modules/prosemirror-schema-list": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.1.5.tgz", - "integrity": "sha512-9gadhga/wySVfb/iZ2vOpndbG0XroeLw0HkkZN5demNbOea6U5oQtJmvyYWC7ZVf3WkhmVdVsOXrllM9JcC20A==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.1.6.tgz", + "integrity": "sha512-aFGEdaCWmJzouZ8DwedmvSsL50JpRkqhQ6tcpThwJONVVmCgI36LJHtoQ4VGZbusMavaBhXXr33zyD2IVsTlkw==", "dependencies": { "prosemirror-model": "^1.0.0", "prosemirror-transform": "^1.0.0" @@ -1465,17 +1326,17 @@ } }, "node_modules/prosemirror-transform": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.3.2.tgz", - "integrity": "sha512-/G6d/u9Mf6Bv3H1XR8VxhpjmUO75LYmnvj+s3ZfZpakU1hnQbsvCEybml1B3f2IWUAAQRFkbO1PnsbFhLZsYsw==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.3.3.tgz", + "integrity": "sha512-9NLVXy1Sfa2G6qPqhWMkEvwQQMTw7OyTqOZbJaGQWsCeH3hH5Cw+c5eNaLM1Uu75EyKLsEZhJ93XpHJBa6RX8A==", "dependencies": { "prosemirror-model": "^1.0.0" } }, "node_modules/prosemirror-view": { - "version": "1.19.3", - "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.19.3.tgz", - "integrity": "sha512-YP/ZzVwqPPwbHbJi97U2/CeyZ8PIHmLJt0gIhZWP8XfnuBRGG3y+jwLzUoBVmiuoUCy3R6PSB+pOATliGzLfPg==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.22.0.tgz", + "integrity": "sha512-kCZoHp0Sa2AHhwV64aNFi69QlqBocZ8G8gbvZRFDdEj57whOCdPjdVLYBVyM9+S5oHDSrzjkoMm+JvvHFhMRJw==", "dependencies": { "prosemirror-model": "^1.14.3", "prosemirror-state": "^1.0.0", @@ -1535,9 +1396,9 @@ } }, "node_modules/rollup": { - "version": "2.47.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.47.0.tgz", - "integrity": "sha512-rqBjgq9hQfW0vRmz+0S062ORRNJXvwRpzxhFXORvar/maZqY6za3rgQ/p1Glg+j1hnc1GtYyQCPiAei95uTElg==", + "version": "2.59.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.59.0.tgz", + "integrity": "sha512-l7s90JQhCQ6JyZjKgo7Lq1dKh2RxatOM+Jr6a9F7WbS9WgKbocyUSeLmZl8evAse7y96Ae98L2k1cBOwWD8nHw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -1546,7 +1407,7 @@ "node": ">=10.0.0" }, "optionalDependencies": { - "fsevents": "~2.3.1" + "fsevents": "~2.3.2" } }, "node_modules/rope-sequence": { @@ -1555,9 +1416,9 @@ "integrity": "sha512-ku6MFrwEVSVmXLvy3dYph3LAMNS0890K7fabn+0YIRQ2T96T9F4gkFf0vf0WW0JUraNWwGRtInEpH7yO4tbQZg==" }, "node_modules/sass": { - "version": "1.38.2", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.38.2.tgz", - "integrity": "sha512-Bz1fG6qiyF0FX6m/I+VxtdVKz1Dfmg/e9kfDy2PhWOkq3T384q2KxwIfP0fXpeI+EyyETdOauH+cRHQDFASllA==", + "version": "1.43.4", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.43.4.tgz", + "integrity": "sha512-/ptG7KE9lxpGSYiXn7Ar+lKOv37xfWsZRtFYal2QHNigyVQDx685VFT/h7ejVr+R8w7H4tmUgtulsKl5YpveOg==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0" @@ -1591,7 +1452,6 @@ "version": "0.6.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz", "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -1599,29 +1459,14 @@ "node_modules/sourcemap-codec": { "version": "1.4.8", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "dev": true - }, - "node_modules/string-hash": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/string-hash/-/string-hash-1.1.3.tgz", - "integrity": "sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=", - "dev": true + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" }, "node_modules/tippy.js": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-6.3.1.tgz", - "integrity": "sha512-JnFncCq+rF1dTURupoJ4yPie5Cof978inW6/4S6kmWV7LL9YOSEVMifED3KdrVPEG+Z/TFH2CDNJcQEfaeuQww==", + "version": "6.3.5", + "resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-6.3.5.tgz", + "integrity": "sha512-B9hAQ5KNF+jDJRg6cRysV6Y3J+5fiNfD60GuXR5TP0sfrcltpgdzVc7f1wMtjQ3W0+Xsy80CDvk0Z+Vr0cM4sQ==", "dependencies": { - "@popperjs/core": "^2.8.3" - } - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "engines": { - "node": ">=4" + "@popperjs/core": "^2.9.0" } }, "node_modules/to-regex-range": { @@ -1636,22 +1481,16 @@ "node": ">=8.0" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, "node_modules/vite": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-2.5.1.tgz", - "integrity": "sha512-FwmLbbz8MB1pBs9dKoRDgpiqoijif8hSK1+NNUYc12/cnf+pM2UFhhQ1rcpXgbMhm/5c2USZdVAf0FSkSxaFDA==", + "version": "2.6.13", + "resolved": "https://registry.npmjs.org/vite/-/vite-2.6.13.tgz", + "integrity": "sha512-+tGZ1OxozRirTudl4M3N3UTNJOlxdVo/qBl2IlDEy/ZpTFcskp+k5ncNjayR3bRYTCbqSOFz2JWGN1UmuDMScA==", "dev": true, "dependencies": { - "esbuild": "^0.12.17", - "postcss": "^8.3.6", + "esbuild": "^0.13.2", + "postcss": "^8.3.8", "resolve": "^1.20.0", - "rollup": "^2.38.5" + "rollup": "^2.57.0" }, "bin": { "vite": "bin/vite.js" @@ -1661,134 +1500,126 @@ }, "optionalDependencies": { "fsevents": "~2.3.2" + }, + "peerDependencies": { + "less": "*", + "sass": "*", + "stylus": "*" + }, + "peerDependenciesMeta": { + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + } } }, "node_modules/vue": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.1.5.tgz", - "integrity": "sha512-Ho7HNb1nfDoO+HVb6qYZgeaobt1XbY6KXFe4HGs1b9X6RhkWG/113n4/SrtM1LUclM6OrP/Se5aPHHvAPG1iVQ==", + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.21.tgz", + "integrity": "sha512-jpy7ckXdyclfRzqLjL4mtq81AkzQleE54KjZsJg/9OorNVurAxdlU5XpD49GpjKdnftuffKUvx2C5jDOrgc/zg==", "dependencies": { - "@vue/compiler-dom": "3.1.5", - "@vue/runtime-dom": "3.1.5", - "@vue/shared": "3.1.5" + "@vue/compiler-dom": "3.2.21", + "@vue/compiler-sfc": "3.2.21", + "@vue/runtime-dom": "3.2.21", + "@vue/server-renderer": "3.2.21", + "@vue/shared": "3.2.21" } }, "node_modules/w3c-keyname": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.4.tgz", "integrity": "sha512-tOhfEwEzFLJzf6d1ZPkYfGj+FWhIpBux9ppoP3rlclw3Z0BZv3N7b7030Z1kYth+6rDuAsXUFr+d0VE6Ed1ikw==" - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true } }, "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", - "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==" - }, "@babel/parser": { "version": "7.15.3", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz", "integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==" }, - "@babel/types": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.0.tgz", - "integrity": "sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==", - "requires": { - "@babel/helper-validator-identifier": "^7.14.9", - "to-fast-properties": "^2.0.0" - } - }, "@popperjs/core": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.3.tgz", - "integrity": "sha512-xDu17cEfh7Kid/d95kB6tZsLOmSWKCZKtprnhVepjsSaCij+lM3mItSJDuuHDMbCWTh8Ejmebwb+KONcCJ0eXQ==" + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.10.2.tgz", + "integrity": "sha512-IXf3XA7+XyN7CP9gGh/XB0UxVMlvARGEgGXLubFICsUMGz6Q+DU+i4gGlpOxTjKvXjkJDJC8YdqdKkDj9qZHEQ==" }, "@tabler/icons": { - "version": "1.41.2", - "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-1.41.2.tgz", - "integrity": "sha512-X6cQmMC24hiwg0p2BzasvU3IeCCdOk0f/9d6gNNtJM4lzG2TCloTns1bVvU5MAFkITGukxUqjPFE3Ecd6kGsfw==", + "version": "1.42.0", + "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-1.42.0.tgz", + "integrity": "sha512-GpTiG+TmvgtO2IJFM6Q36fzptgI0aNqmJIP9sr5IcXP4yLDEpTRTXTG94YxenlHARPUk3obsruMPPHO8v/UE4g==", "requires": {} }, "@tiptap/core": { - "version": "2.0.0-beta.102", - "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.0.0-beta.102.tgz", - "integrity": "sha512-ykSAyYfyb14xiYWQ6mTaa+GF6j5dQvSDgeXQDNcy8xvBjZHm1g+51D0jm9FF/dsrY0rEps5h8yX883h7MaGFHA==", + "version": "2.0.0-beta.133", + "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.0.0-beta.133.tgz", + "integrity": "sha512-Fi2uBgT0nvGm+FYLDUXGWlqUq03ufPpuaqi2KlCis+mr+hP8GX1gYOdJIKTaf5kPVQ++hMyGP9Nh+pjml074tQ==", "requires": { "@types/prosemirror-commands": "^1.0.4", - "@types/prosemirror-inputrules": "^1.0.4", "@types/prosemirror-keymap": "^1.0.4", "@types/prosemirror-model": "^1.13.2", "@types/prosemirror-schema-list": "^1.0.3", - "@types/prosemirror-state": "^1.2.7", + "@types/prosemirror-state": "^1.2.8", "@types/prosemirror-transform": "^1.1.4", - "@types/prosemirror-view": "^1.17.2", - "prosemirror-commands": "^1.1.10", - "prosemirror-inputrules": "^1.1.3", - "prosemirror-keymap": "^1.1.3", - "prosemirror-model": "^1.14.3", - "prosemirror-schema-list": "^1.1.5", + "@types/prosemirror-view": "^1.19.1", + "prosemirror-commands": "^1.1.12", + "prosemirror-keymap": "^1.1.5", + "prosemirror-model": "^1.15.0", + "prosemirror-schema-list": "^1.1.6", "prosemirror-state": "^1.3.4", - "prosemirror-transform": "^1.3.2", - "prosemirror-view": "^1.19.3" + "prosemirror-transform": "^1.3.3", + "prosemirror-view": "^1.22.0" } }, "@tiptap/extension-blockquote": { - "version": "2.0.0-beta.15", - "resolved": "https://registry.npmjs.org/@tiptap/extension-blockquote/-/extension-blockquote-2.0.0-beta.15.tgz", - "integrity": "sha512-Cso44KsYsqKqaNveQmx5KVaLy9krq5AzE9WhGVDBSFqWhvuIJkQYrTRBbOTfUDs/st9VuwJrbjTDD65ow50wEw==", - "requires": { - "prosemirror-inputrules": "^1.1.3" - } + "version": "2.0.0-beta.21", + "resolved": "https://registry.npmjs.org/@tiptap/extension-blockquote/-/extension-blockquote-2.0.0-beta.21.tgz", + "integrity": "sha512-yE2N2A6zfH9C/9DAs/p9dLbyy6iWzTpX7tTSGnWyAb1h+SEkqzPBxJryNUU4DYw+Rq/hasQIu37TrHTrOqJyiA==", + "requires": {} }, "@tiptap/extension-bold": { - "version": "2.0.0-beta.15", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-2.0.0-beta.15.tgz", - "integrity": "sha512-jKyV6iiwhxwa0+7uuKD74jNDVNLNOS1GmU14MgaA95pY5e1fyaRBPPX8Gtt89niz2CLOY711AV17RPZTe/e60w==", + "version": "2.0.0-beta.21", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-2.0.0-beta.21.tgz", + "integrity": "sha512-GRsImvcUJ4vspvoZvugO7Y9akigjeHFpHti1sGJGULPsv4oX5vMMxys4yaI3/qA+Tm8qyK+14ju6Jb7YKwvdBA==", "requires": {} }, "@tiptap/extension-bubble-menu": { - "version": "2.0.0-beta.31", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.0.0-beta.31.tgz", - "integrity": "sha512-O0U12A+4tWZo97MRWOhGrZ+Z0DWYHPzLP3rbUMl1bClvOoggKgMZnSdvgjC7LmP5h/8Y+qB92swk5LVYvrOcDQ==", + "version": "2.0.0-beta.46", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.0.0-beta.46.tgz", + "integrity": "sha512-61JufrJn0513x9VFRpgSIcMKM1JaDjSGVDHbjeWT+cRZPXQBPRXKQ2vG/rUn+EVAE+u1Ifi2PVAOMJpyfHGzJQ==", "requires": { "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.19.3", - "tippy.js": "^6.3.1" + "prosemirror-view": "^1.22.0", + "tippy.js": "^6.3.4" } }, "@tiptap/extension-bullet-list": { - "version": "2.0.0-beta.15", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-2.0.0-beta.15.tgz", - "integrity": "sha512-5i44JzsZOh8Ci6CuYRQy6W3jCpYgX0+VuJKeHvZ6Aomy4Qqrtc9Jk43PBmCj91lNUUtH6Io9l+kDrLCumEFnEg==", - "requires": { - "prosemirror-inputrules": "^1.1.3" - } + "version": "2.0.0-beta.20", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-2.0.0-beta.20.tgz", + "integrity": "sha512-/2gPQ4UvjD/VxKnovtHwdz6xSJZdZ0tPRRB6Lm7uwFcrmCCoUFMrzYmQruyMNcWWbrgoLh3A70HTFVdOCxL+nw==", + "requires": {} }, "@tiptap/extension-character-count": { - "version": "2.0.0-beta.13", - "resolved": "https://registry.npmjs.org/@tiptap/extension-character-count/-/extension-character-count-2.0.0-beta.13.tgz", - "integrity": "sha512-2rRMvp+ppocyw6tmJx/hpl8wvs9BOIFN5fvDpVxH9INXJu9ZnZPfb2Pko/2RYsx+uWn2q7nKS4jgqNmkZA0ovg==", + "version": "2.0.0-beta.15", + "resolved": "https://registry.npmjs.org/@tiptap/extension-character-count/-/extension-character-count-2.0.0-beta.15.tgz", + "integrity": "sha512-y01lKwiwOBQYSNHNidl75r2CTPUYQUpf7vsgXhFWlEcYan05FM9oIjqAXQOKah5kuNdQqiUhq75AO/1Zu/o9fw==", "requires": {} }, "@tiptap/extension-code": { - "version": "2.0.0-beta.16", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-2.0.0-beta.16.tgz", - "integrity": "sha512-Kakg/RMiVrxjzIkLVDXtbCzRh/9W8dgSG04IhMZNOI8N9vWn8Z78jdUyxEEDTcL/JyWWcMxn9AsJw2U5ajO3pA==", + "version": "2.0.0-beta.22", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-2.0.0-beta.22.tgz", + "integrity": "sha512-jJCCkj6/C/rwv+ppx0MIF7ynhessU06lN8IGjJsDTUh1Z4TYP3tpUNrgF7jfrg7G23QvPWbEVj7siDd+px6xCw==", "requires": {} }, "@tiptap/extension-code-block": { - "version": "2.0.0-beta.17", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-2.0.0-beta.17.tgz", - "integrity": "sha512-u3RY991mXtjuw+trVaDwbAhuPPlU8l6kS4rXIxWJ5W/sNElbmfHLVu7RP++YwM8KOQrCrQl8TJbZTEIekMw61w==", + "version": "2.0.0-beta.26", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-2.0.0-beta.26.tgz", + "integrity": "sha512-ZG60N90RbhwvJR9VsDc9t9FdBMEEfcmzbRr4j/LcvvVbAG7poDbC9HRmSim484GSEN2yBDEgk+Ifxi9TiaBy1g==", "requires": { - "prosemirror-inputrules": "^1.1.3" + "prosemirror-state": "^1.3.4" } }, "@tiptap/extension-document": { @@ -1798,114 +1629,108 @@ "requires": {} }, "@tiptap/extension-dropcursor": { - "version": "2.0.0-beta.19", - "resolved": "https://registry.npmjs.org/@tiptap/extension-dropcursor/-/extension-dropcursor-2.0.0-beta.19.tgz", - "integrity": "sha512-rslIcVvD42NNh5sEbkCkG03DWMFBrS5KoK+lDOdIcC1DjmTtpVgcLvvE01btzaB3ljx+UVqI2Zaxa6VOiTeEMw==", + "version": "2.0.0-beta.21", + "resolved": "https://registry.npmjs.org/@tiptap/extension-dropcursor/-/extension-dropcursor-2.0.0-beta.21.tgz", + "integrity": "sha512-QA4dgBRgRtv3TbLh7ZhhnATHepfLzEQMGsqSuxEdI8GpPDQ/vwRxFh7lJ8bHs4KZngxbfLD6znEyTZXEy2z/eQ==", "requires": { "@types/prosemirror-dropcursor": "^1.0.3", "prosemirror-dropcursor": "^1.3.5" } }, "@tiptap/extension-floating-menu": { - "version": "2.0.0-beta.25", - "resolved": "https://registry.npmjs.org/@tiptap/extension-floating-menu/-/extension-floating-menu-2.0.0-beta.25.tgz", - "integrity": "sha512-nXBi1eA3Kji8tk+gOIyxXKsaTpGBgXSX9hHTgIvbBMMvfP9onLKuZIAKG/cBUMBzt+CKns1XooE71UqyMESDhQ==", + "version": "2.0.0-beta.40", + "resolved": "https://registry.npmjs.org/@tiptap/extension-floating-menu/-/extension-floating-menu-2.0.0-beta.40.tgz", + "integrity": "sha512-zq+VkbnaIsEiPwR+/9J8AJSATG3Fcm4HlZvZhb5a0SrFA6Qe8W1kQ2UGDQpO8jpEGqaqCSAm+3nYMHyi1vI41A==", "requires": { "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.19.3", - "tippy.js": "^6.3.1" + "prosemirror-view": "^1.22.0", + "tippy.js": "^6.3.4" } }, "@tiptap/extension-gapcursor": { - "version": "2.0.0-beta.19", - "resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-2.0.0-beta.19.tgz", - "integrity": "sha512-GZYMR+Z45bn87CMuOHyxzTJOFoCv58mNakIBdSGX+8A+ExBFeZr/qLqxDxN3wz+LRqy7pREe5K3UxJxpsYnCzA==", + "version": "2.0.0-beta.30", + "resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-2.0.0-beta.30.tgz", + "integrity": "sha512-6K8N+BiztReMqj9qu8h5Y/qvFGm7XrprGb03l+sG6eZ4fKYLU202zt/DReJYRDCTPHM/6zthUCK5xoR0+TtN2A==", "requires": { "@types/prosemirror-gapcursor": "^1.0.4", - "prosemirror-gapcursor": "^1.1.5" + "prosemirror-gapcursor": "^1.2.0" } }, "@tiptap/extension-hard-break": { - "version": "2.0.0-beta.15", - "resolved": "https://registry.npmjs.org/@tiptap/extension-hard-break/-/extension-hard-break-2.0.0-beta.15.tgz", - "integrity": "sha512-MS7MjGOtKtC1bVNAShwCetFRuk8nPr/j18OOzKChNrJFrZXWNJrid3dUojwDLqCraYdzSTmiOmMgU+yoUe/gnw==", + "version": "2.0.0-beta.27", + "resolved": "https://registry.npmjs.org/@tiptap/extension-hard-break/-/extension-hard-break-2.0.0-beta.27.tgz", + "integrity": "sha512-Jki9LWsOyWwXypU0vr3aRDZwu0SrZ1CjMgMrEg9R6yUEB5lhb2g4orgaCGecmVDnl4Zx0Yq/3et/FbMGTVupCA==", "requires": {} }, "@tiptap/extension-heading": { - "version": "2.0.0-beta.15", - "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-2.0.0-beta.15.tgz", - "integrity": "sha512-UoXDwEdCV9KiPh0wj0jj2Jt6VDqkoTaSU3d9bmEBLwg1Gjgbuv39JDst7oxSqbf9rgbl3txbeOy35wVBKe9CqA==", - "requires": { - "prosemirror-inputrules": "^1.1.3" - } + "version": "2.0.0-beta.20", + "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-2.0.0-beta.20.tgz", + "integrity": "sha512-JQEs6Pilk9Q/5/hZa3og3pt2Si7MwXIl3UJwCyljXpTdnuSon4OppAo4lVN5L9A8tZNqrX7TOpd/yaDoI/0ToQ==", + "requires": {} }, "@tiptap/extension-history": { - "version": "2.0.0-beta.16", - "resolved": "https://registry.npmjs.org/@tiptap/extension-history/-/extension-history-2.0.0-beta.16.tgz", - "integrity": "sha512-nrNwV8a7zUt1t2I/kPX5Y6N9vZ8mrugimJIQmPGIp/4mmw1SEUzkaPpIsv6+ELmqMHSDktQ0ofb3pXeWDXWZvw==", + "version": "2.0.0-beta.18", + "resolved": "https://registry.npmjs.org/@tiptap/extension-history/-/extension-history-2.0.0-beta.18.tgz", + "integrity": "sha512-8yR+NozZlHFwlYaNqAKrstdWb5nXhfrYTdxjR68LpjlWLgPCn2bm7ZoJDuYaHGa3sIT1HqBus6zerqOjr/YYig==", "requires": { "@types/prosemirror-history": "^1.0.3", "prosemirror-history": "^1.2.0" } }, "@tiptap/extension-horizontal-rule": { - "version": "2.0.0-beta.19", - "resolved": "https://registry.npmjs.org/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.0.0-beta.19.tgz", - "integrity": "sha512-RrU7+inExgC+rRmFWoTxALbu/IgRGRik11LPhMhqrCB+n0XFRUMyVEb/jbfgHWVrPmTXq0MbSWW6LYw3iREzRA==", + "version": "2.0.0-beta.27", + "resolved": "https://registry.npmjs.org/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.0.0-beta.27.tgz", + "integrity": "sha512-qia/dB+JXk55t4/RVxK84ZNMXlwWxdJeC6o3ecM7K35beY9xkF7aeVy16mZZSsSmR41kD5p6hsdMSdyvB2ds5A==", "requires": { "prosemirror-state": "^1.3.4" } }, "@tiptap/extension-image": { - "version": "2.0.0-beta.15", - "resolved": "https://registry.npmjs.org/@tiptap/extension-image/-/extension-image-2.0.0-beta.15.tgz", - "integrity": "sha512-iMwQ154RPefOxgqTTHjOA735YWesyjBhYvD9fFxRDctM2vLxEYYYFOENXEBCFLNAr94gfaxefCEdkuNYHl9H7g==", + "version": "2.0.0-beta.21", + "resolved": "https://registry.npmjs.org/@tiptap/extension-image/-/extension-image-2.0.0-beta.21.tgz", + "integrity": "sha512-0GUh4GwRhN1Wgl8WJXjQ1jmGHpa4H4c2CGII4G6b9XKNqFSQPum3qKzQCw8uAlYpsEjEuPR2GFK9Yc0iT08m8w==", "requires": {} }, "@tiptap/extension-italic": { - "version": "2.0.0-beta.15", - "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-2.0.0-beta.15.tgz", - "integrity": "sha512-ZCz1vCysLdvOUrwODuyBP0BDaemCLh6ib7qTYoSDKdive9kfn0Vc5Fg3o8xgHrtrUfwKIJz/sWOknjDEGIc9cw==", + "version": "2.0.0-beta.21", + "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-2.0.0-beta.21.tgz", + "integrity": "sha512-q2H3Og3Qg01N70jC7c/UYMTdeXdWOY5cTrZP2vtGmedGimJpMGpenMc5mrnmEXKssjmNaz/Q8409MV4rHwbmzg==", "requires": {} }, "@tiptap/extension-list-item": { - "version": "2.0.0-beta.14", - "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-2.0.0-beta.14.tgz", - "integrity": "sha512-t6xwEqP+d5443Ul2Jvqz9kXb3ro7bA7yY9HA0vskm3120WxxHW9jxgxZN+82Ot5Tm7nXOAlsN6vuqnt4idnxZQ==", + "version": "2.0.0-beta.16", + "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-2.0.0-beta.16.tgz", + "integrity": "sha512-I/Tmj9zW5BHeftGByYj/TVJBqZi6cRLsiwufaV4CTMlfYUHE8DDjiQlukGSksa+Nba+wPErWriXAOaBBkjFhjw==", "requires": {} }, "@tiptap/extension-ordered-list": { - "version": "2.0.0-beta.15", - "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-2.0.0-beta.15.tgz", - "integrity": "sha512-j9Xh8CYtV+C/wrTXEWN+U7NJIQ/cQrjta80Mm2hFiE2KDtFNkpsPqG6UBoky04EPFphR5xDUsO1nCT7T7Tei5A==", - "requires": { - "prosemirror-inputrules": "^1.1.3" - } + "version": "2.0.0-beta.21", + "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-2.0.0-beta.21.tgz", + "integrity": "sha512-TkUWOAayblM2z9rtyREau5fNw7CvvlT6rHlSLGty+VQ861Nuu5gi8Ew4oQETYCmKNYQtZJhm65XjPPyl2GD2dA==", + "requires": {} }, "@tiptap/extension-paragraph": { - "version": "2.0.0-beta.17", - "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-2.0.0-beta.17.tgz", - "integrity": "sha512-qCQVCf9c2hgaeIdfy22PaoZyW5Vare/1aGkOEAaZma5RjrUbV9hrRKwoW9LsDjnh1EN1fIeKdg02yEhnHWtG8A==", + "version": "2.0.0-beta.19", + "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-2.0.0-beta.19.tgz", + "integrity": "sha512-mk8Es7kZIAAETHqXqMItNs34HnnlFvYp8+u7e8PQZtMF85YaIH4IVCVhCC2/buVRQTBnFJ3bJDbJAnawnxAWBQ==", "requires": {} }, "@tiptap/extension-strike": { - "version": "2.0.0-beta.17", - "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-2.0.0-beta.17.tgz", - "integrity": "sha512-+WRd0RuCK4+jFKNVN+4rHTa5VMqqGDO2uc+TknkqhFqWp/z96OAGlpHJOwPrnW1fLbpjEBBQIr1vVYSw6KgcZg==", + "version": "2.0.0-beta.23", + "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-2.0.0-beta.23.tgz", + "integrity": "sha512-xUCpuCDb8lG9BVve+/uq8fxOAPJgndQ0gapFZXCEb2wuZj0HfsHNwva8q0pMeIYXTSAIjobkueHtT8NjvSLtnw==", "requires": {} }, "@tiptap/extension-task-item": { - "version": "2.0.0-beta.17", - "resolved": "https://registry.npmjs.org/@tiptap/extension-task-item/-/extension-task-item-2.0.0-beta.17.tgz", - "integrity": "sha512-uV5f9rWo9NAZ+oyt/mkhFEZfcngr92pVL2sn291RiT0qw9NRvdIQ6PLH24il9zu+jjeWmh1cJnBuQos+MQqjyg==", - "requires": { - "prosemirror-inputrules": "^1.1.3" - } + "version": "2.0.0-beta.25", + "resolved": "https://registry.npmjs.org/@tiptap/extension-task-item/-/extension-task-item-2.0.0-beta.25.tgz", + "integrity": "sha512-rX9PTu5lw8JAvcQ70YsR4si9i1WbhlNdJ9S/pU0N6GXNhCah8ZE27y3Ir9mhqjFJCpmngPeBlIhoQA2jyX7kkA==", + "requires": {} }, "@tiptap/extension-task-list": { - "version": "2.0.0-beta.17", - "resolved": "https://registry.npmjs.org/@tiptap/extension-task-list/-/extension-task-list-2.0.0-beta.17.tgz", - "integrity": "sha512-E17VBqW2lXF59hCQ/3/Kg0hYSDGvVC4B3W8miZwCXt5WTOl98Gk6qAiDXl+2mDKZvnsLty/YrgkD88OlZSIEbQ==", + "version": "2.0.0-beta.20", + "resolved": "https://registry.npmjs.org/@tiptap/extension-task-list/-/extension-task-list-2.0.0-beta.20.tgz", + "integrity": "sha512-pSojFNlfrj86wNXVQwcnAmlrhoO6iLKS8yt90GZUwZlh0/cWjgWo/USweApYAhJlOmI01K5c7YmMu6q1k7zBcw==", "requires": {} }, "@tiptap/extension-text": { @@ -1915,9 +1740,9 @@ "requires": {} }, "@tiptap/extension-text-align": { - "version": "2.0.0-beta.22", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text-align/-/extension-text-align-2.0.0-beta.22.tgz", - "integrity": "sha512-47jbI0DyiS+debUo0Wo2eexoRAdFZajw1+PJgpbtKLq5kWYqXeAvOyMkIIOFYHEl5u8pi4SsQd1NgEt21j0mig==", + "version": "2.0.0-beta.25", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text-align/-/extension-text-align-2.0.0-beta.25.tgz", + "integrity": "sha512-Lu9K4bT35ofIuSCqYYGCS+eDgKc7tJmXopWyqTG6O33jzJ9DdI1xbR5XSz4ERrR3HqA9g01ZnCC2kd3RbpzUxA==", "requires": {} }, "@tiptap/extension-text-style": { @@ -1928,63 +1753,54 @@ "requires": {} }, "@tiptap/extension-typography": { - "version": "2.0.0-beta.14", - "resolved": "https://registry.npmjs.org/@tiptap/extension-typography/-/extension-typography-2.0.0-beta.14.tgz", - "integrity": "sha512-Z+mS0TCUsKfpdv+T2+dx02f+Ew7dfCNKsNfJJyNnQbQRvuOpVR9G+FMUcPwHR5tQMgMrn3XhCWFM1sbmI1HoOQ==", - "requires": { - "prosemirror-inputrules": "^1.1.3" - } + "version": "2.0.0-beta.17", + "resolved": "https://registry.npmjs.org/@tiptap/extension-typography/-/extension-typography-2.0.0-beta.17.tgz", + "integrity": "sha512-w98KiifXdK9I+/vTKap2DJdEGvG72Sg02t93kpzyw5P7pYG0ZzCpFgdF7Vh8+Xp4JqffBayYh81mKEB+rxeu3w==", + "requires": {} }, "@tiptap/extension-underline": { - "version": "2.0.0-beta.16", - "resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-2.0.0-beta.16.tgz", - "integrity": "sha512-N3wMfSJkn+A5HbuLSpbn1Zp9CWWLXfMexpVdg4eUwTMOgF/kpVRaPGCkBonhHH3NfWtT7QbSipdWc7DKpBb8Jw==", + "version": "2.0.0-beta.18", + "resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-2.0.0-beta.18.tgz", + "integrity": "sha512-zYx9aAAbwKdrF/QJvRhaZFpBebcmXNYAjZmYyyErTR1NXmPi2SMAE8OaDC3S7xRnt8HeHwDAUbqiUfXJWG1XRA==", "requires": {} }, "@tiptap/starter-kit": { - "version": "2.0.0-beta.101", - "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-2.0.0-beta.101.tgz", - "integrity": "sha512-1SoVrPe2JMPo5/Je0NprZWN8G0q0EOTpoVHQ/+VwthectJBz1TyCuNOqoR1WNL9II6Fj9AZelyhPWacw7vM27A==", - "requires": { - "@tiptap/core": "^2.0.0-beta.102", - "@tiptap/extension-blockquote": "^2.0.0-beta.15", - "@tiptap/extension-bold": "^2.0.0-beta.15", - "@tiptap/extension-bullet-list": "^2.0.0-beta.15", - "@tiptap/extension-code": "^2.0.0-beta.16", - "@tiptap/extension-code-block": "^2.0.0-beta.17", + "version": "2.0.0-beta.135", + "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-2.0.0-beta.135.tgz", + "integrity": "sha512-rolfgLHlv2SVRpWWaiJTWtVeSclAg2d4bnbN8GHrgnxKCpEqFsJQtaQQnEJLq58nAOJcVOx4fR7rqz5bxXjHuw==", + "requires": { + "@tiptap/core": "^2.0.0-beta.133", + "@tiptap/extension-blockquote": "^2.0.0-beta.21", + "@tiptap/extension-bold": "^2.0.0-beta.21", + "@tiptap/extension-bullet-list": "^2.0.0-beta.20", + "@tiptap/extension-code": "^2.0.0-beta.22", + "@tiptap/extension-code-block": "^2.0.0-beta.26", "@tiptap/extension-document": "^2.0.0-beta.13", - "@tiptap/extension-dropcursor": "^2.0.0-beta.19", - "@tiptap/extension-gapcursor": "^2.0.0-beta.19", - "@tiptap/extension-hard-break": "^2.0.0-beta.15", - "@tiptap/extension-heading": "^2.0.0-beta.15", - "@tiptap/extension-history": "^2.0.0-beta.16", - "@tiptap/extension-horizontal-rule": "^2.0.0-beta.19", - "@tiptap/extension-italic": "^2.0.0-beta.15", - "@tiptap/extension-list-item": "^2.0.0-beta.14", - "@tiptap/extension-ordered-list": "^2.0.0-beta.15", - "@tiptap/extension-paragraph": "^2.0.0-beta.17", - "@tiptap/extension-strike": "^2.0.0-beta.17", + "@tiptap/extension-dropcursor": "^2.0.0-beta.21", + "@tiptap/extension-gapcursor": "^2.0.0-beta.30", + "@tiptap/extension-hard-break": "^2.0.0-beta.27", + "@tiptap/extension-heading": "^2.0.0-beta.20", + "@tiptap/extension-history": "^2.0.0-beta.18", + "@tiptap/extension-horizontal-rule": "^2.0.0-beta.27", + "@tiptap/extension-italic": "^2.0.0-beta.21", + "@tiptap/extension-list-item": "^2.0.0-beta.16", + "@tiptap/extension-ordered-list": "^2.0.0-beta.21", + "@tiptap/extension-paragraph": "^2.0.0-beta.19", + "@tiptap/extension-strike": "^2.0.0-beta.23", "@tiptap/extension-text": "^2.0.0-beta.13" } }, "@tiptap/vue-3": { - "version": "2.0.0-beta.56", - "resolved": "https://registry.npmjs.org/@tiptap/vue-3/-/vue-3-2.0.0-beta.56.tgz", - "integrity": "sha512-fY1Np4hvz6n1RYvOHVWcaLppRy/+J/adJ2lGkfbYrQiuFiEOrx15CYYkSsoYZH23Y7LCJAVoYaBhlzdgOh02cA==", + "version": "2.0.0-beta.76", + "resolved": "https://registry.npmjs.org/@tiptap/vue-3/-/vue-3-2.0.0-beta.76.tgz", + "integrity": "sha512-n9fCaB5B73mtC4x/CPPxJ4+VbC+8evstx2Va+PJUygqrepYfA66cJFUZNl/FnxbdvqyLSmiLVjzDj9slDXGCNQ==", "requires": { - "@tiptap/extension-bubble-menu": "^2.0.0-beta.31", - "@tiptap/extension-floating-menu": "^2.0.0-beta.25", + "@tiptap/extension-bubble-menu": "^2.0.0-beta.46", + "@tiptap/extension-floating-menu": "^2.0.0-beta.40", "prosemirror-state": "^1.3.4", - "prosemirror-view": "^1.19.3", - "vue": "^3.0.0" + "prosemirror-view": "^1.22.0" } }, - "@types/estree": { - "version": "0.0.48", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.48.tgz", - "integrity": "sha512-LfZwXoGUDo0C3me81HXgkBg5CTQYb6xzEl+fNmbO4JdRiSKQ8A0GD1OBBvKAIsbCUgoyAty7m99GqqMQe784ew==", - "dev": true - }, "@types/orderedmap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/orderedmap/-/orderedmap-1.0.0.tgz", @@ -2026,15 +1842,6 @@ "@types/prosemirror-state": "*" } }, - "@types/prosemirror-inputrules": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/prosemirror-inputrules/-/prosemirror-inputrules-1.0.4.tgz", - "integrity": "sha512-lJIMpOjO47SYozQybUkpV6QmfuQt7GZKHtVrvS+mR5UekA8NMC5HRIVMyaIauJLWhKU6oaNjpVaXdw41kh165g==", - "requires": { - "@types/prosemirror-model": "*", - "@types/prosemirror-state": "*" - } - }, "@types/prosemirror-keymap": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@types/prosemirror-keymap/-/prosemirror-keymap-1.0.4.tgz", @@ -2065,9 +1872,9 @@ } }, "@types/prosemirror-state": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@types/prosemirror-state/-/prosemirror-state-1.2.7.tgz", - "integrity": "sha512-clJf5uw3/XQnBJtl2RqYXoLMGBySnLYl43xtDvFfQZKkLnnYcM1SDU8dcz7lWjl2Dm+H98RpLOl44pp7DYT+wA==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@types/prosemirror-state/-/prosemirror-state-1.2.8.tgz", + "integrity": "sha512-mq9uyQWcpu8jeamO6Callrdvf/e1H/aRLR2kZWSpZrPHctEsxWHBbluD/wqVjXBRIOoMHLf6ZvOkrkmGLoCHVA==", "requires": { "@types/prosemirror-model": "*", "@types/prosemirror-transform": "*", @@ -2083,9 +1890,9 @@ } }, "@types/prosemirror-view": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/@types/prosemirror-view/-/prosemirror-view-1.18.0.tgz", - "integrity": "sha512-7NBy7qIV/ig49ThfkrIJrvW8E+HwumMgmpopUTYJlKwOh/fQ6SVUG/RtdnAIBLD+4uK0R2SMObbGZm06x6OwbA==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/@types/prosemirror-view/-/prosemirror-view-1.19.1.tgz", + "integrity": "sha512-fyQ4NVxAdfISWrE2qT8cpZdosXoH/1JuVYMBs9CdaXPbvi/8R2L2tkkcMRM314piKrO8nfYH5OBZKzP2Ax3jtA==", "requires": { "@types/prosemirror-model": "*", "@types/prosemirror-state": "*", @@ -2093,196 +1900,110 @@ } }, "@vitejs/plugin-vue": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-1.6.0.tgz", - "integrity": "sha512-n3i8htn8pTg9M+kM3cnEfsPZx/6ngInlTroth6fA1LQTJq5aTVQ8ggaE5pPoAy9vCgHPtcaXMzwpldhqRAkebQ==", + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-1.9.4.tgz", + "integrity": "sha512-0CZqaCoChriPTTtGkERy1LGPcYjGFpi2uYRhBPIkqJqUGV5JnJFhQAgh6oH9j5XZHfrRaisX8W0xSpO4T7S78A==", "dev": true, "requires": {} }, "@vue/compiler-core": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.1.5.tgz", - "integrity": "sha512-TXBhFinoBaXKDykJzY26UEuQU1K07FOp/0Ie+OXySqqk0bS0ZO7Xvl7UmiTUPYcLrWbxWBR7Bs/y55AI0MNc2Q==", + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.21.tgz", + "integrity": "sha512-NhhiQZNG71KNq1h5pMW/fAXdTF7lJRaSI7LDm2edhHXVz1ROMICo8SreUmQnSf4Fet0UPBVqJ988eF4+936iDQ==", "requires": { - "@babel/parser": "^7.12.0", - "@babel/types": "^7.12.0", - "@vue/shared": "3.1.5", - "estree-walker": "^2.0.1", + "@babel/parser": "^7.15.0", + "@vue/shared": "3.2.21", + "estree-walker": "^2.0.2", "source-map": "^0.6.1" } }, "@vue/compiler-dom": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.1.5.tgz", - "integrity": "sha512-ZsL3jqJ52OjGU/YiT/9XiuZAmWClKInZM2aFJh9gnsAPqOrj2JIELMbkIFpVKR/CrVO/f2VxfPiiQdQTr65jcQ==", + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.21.tgz", + "integrity": "sha512-gsJD3DpYZSYquiA7UIPsMDSlAooYWDvHPq9VRsqzJEk2PZtFvLvHPb4aaMD8Ufd62xzYn32cnnkzsEOJhyGilA==", "requires": { - "@vue/compiler-core": "3.1.5", - "@vue/shared": "3.1.5" + "@vue/compiler-core": "3.2.21", + "@vue/shared": "3.2.21" } }, "@vue/compiler-sfc": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.6.tgz", - "integrity": "sha512-Ariz1eDsf+2fw6oWXVwnBNtfKHav72RjlWXpEgozYBLnfRPzP+7jhJRw4Nq0OjSsLx2HqjF3QX7HutTjYB0/eA==", - "dev": true, + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.21.tgz", + "integrity": "sha512-+yDlUSebKpz/ovxM2vLRRx7w/gVfY767pOfYTgbIhAs+ogvIV2BsIt4fpxlThnlCNChJ+yE0ERUNoROv2kEGEQ==", "requires": { "@babel/parser": "^7.15.0", - "@babel/types": "^7.15.0", - "@types/estree": "^0.0.48", - "@vue/compiler-core": "3.2.6", - "@vue/compiler-dom": "3.2.6", - "@vue/compiler-ssr": "3.2.6", - "@vue/ref-transform": "3.2.6", - "@vue/shared": "3.2.6", - "consolidate": "^0.16.0", + "@vue/compiler-core": "3.2.21", + "@vue/compiler-dom": "3.2.21", + "@vue/compiler-ssr": "3.2.21", + "@vue/ref-transform": "3.2.21", + "@vue/shared": "3.2.21", "estree-walker": "^2.0.2", - "hash-sum": "^2.0.0", - "lru-cache": "^5.1.1", "magic-string": "^0.25.7", - "merge-source-map": "^1.1.0", "postcss": "^8.1.10", - "postcss-modules": "^4.0.0", - "postcss-selector-parser": "^6.0.4", "source-map": "^0.6.1" - }, - "dependencies": { - "@vue/compiler-core": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.6.tgz", - "integrity": "sha512-vbwnz7+OhtLO5p5i630fTuQCL+MlUpEMTKHuX+RfetQ+3pFCkItt2JUH+9yMaBG2Hkz6av+T9mwN/acvtIwpbw==", - "dev": true, - "requires": { - "@babel/parser": "^7.15.0", - "@babel/types": "^7.15.0", - "@vue/shared": "3.2.6", - "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "@vue/compiler-dom": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.6.tgz", - "integrity": "sha512-+a/3oBAzFIXhHt8L5IHJOTP4a5egzvpXYyi13jR7CUYOR1S+Zzv7vBWKYBnKyJLwnrxTZnTQVjeHCgJq743XKg==", - "dev": true, - "requires": { - "@vue/compiler-core": "3.2.6", - "@vue/shared": "3.2.6" - } - }, - "@vue/shared": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.6.tgz", - "integrity": "sha512-uwX0Qs2e6kdF+WmxwuxJxOnKs/wEkMArtYpHSm7W+VY/23Tl8syMRyjnzEeXrNCAP0/8HZxEGkHJsjPEDNRuHw==", - "dev": true - } } }, "@vue/compiler-ssr": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.6.tgz", - "integrity": "sha512-A7IKRKHSyPnTC4w1FxHkjzoyjXInsXkcs/oX22nBQ+6AWlXj2Tt1le96CWPOXy5vYlsTYkF1IgfBaKIdeN/39g==", - "dev": true, + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.21.tgz", + "integrity": "sha512-eU+A0iWYy+1zAo2CRIJ0zSVlv1iuGAIbNRCnllSJ31pV1lX3jypJYzGbJlSRAbB7VP6E+tYveVT1Oq8JKewa3g==", "requires": { - "@vue/compiler-dom": "3.2.6", - "@vue/shared": "3.2.6" - }, - "dependencies": { - "@vue/compiler-core": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.6.tgz", - "integrity": "sha512-vbwnz7+OhtLO5p5i630fTuQCL+MlUpEMTKHuX+RfetQ+3pFCkItt2JUH+9yMaBG2Hkz6av+T9mwN/acvtIwpbw==", - "dev": true, - "requires": { - "@babel/parser": "^7.15.0", - "@babel/types": "^7.15.0", - "@vue/shared": "3.2.6", - "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "@vue/compiler-dom": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.6.tgz", - "integrity": "sha512-+a/3oBAzFIXhHt8L5IHJOTP4a5egzvpXYyi13jR7CUYOR1S+Zzv7vBWKYBnKyJLwnrxTZnTQVjeHCgJq743XKg==", - "dev": true, - "requires": { - "@vue/compiler-core": "3.2.6", - "@vue/shared": "3.2.6" - } - }, - "@vue/shared": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.6.tgz", - "integrity": "sha512-uwX0Qs2e6kdF+WmxwuxJxOnKs/wEkMArtYpHSm7W+VY/23Tl8syMRyjnzEeXrNCAP0/8HZxEGkHJsjPEDNRuHw==", - "dev": true - } + "@vue/compiler-dom": "3.2.21", + "@vue/shared": "3.2.21" } }, "@vue/reactivity": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.1.5.tgz", - "integrity": "sha512-1tdfLmNjWG6t/CsPldh+foumYFo3cpyCHgBYQ34ylaMsJ+SNHQ1kApMIa8jN+i593zQuaw3AdWH0nJTARzCFhg==", + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.21.tgz", + "integrity": "sha512-7C57zFm/5E3SSTUhVuYj1InDwuJ+GIVQ/z+H43C9sST85gIThGXVhksl1yWTAadf8Yz4T5lSbqi5Ds8U/ueWcw==", "requires": { - "@vue/shared": "3.1.5" + "@vue/shared": "3.2.21" } }, "@vue/ref-transform": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/ref-transform/-/ref-transform-3.2.6.tgz", - "integrity": "sha512-ie39+Y4nbirDLvH+WEq6Eo/l3n3mFATayqR+kEMSphrtMW6Uh/eEMx1Gk2Jnf82zmj3VLRq7dnmPx72JLcBYkQ==", - "dev": true, + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/ref-transform/-/ref-transform-3.2.21.tgz", + "integrity": "sha512-uiEWWBsrGeun9O7dQExYWzXO3rHm/YdtFNXDVqCSoPypzOVxWxdiL+8hHeWzxMB58fVuV2sT80aUtIVyaBVZgQ==", "requires": { "@babel/parser": "^7.15.0", - "@vue/compiler-core": "3.2.6", - "@vue/shared": "3.2.6", + "@vue/compiler-core": "3.2.21", + "@vue/shared": "3.2.21", "estree-walker": "^2.0.2", "magic-string": "^0.25.7" - }, - "dependencies": { - "@vue/compiler-core": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.6.tgz", - "integrity": "sha512-vbwnz7+OhtLO5p5i630fTuQCL+MlUpEMTKHuX+RfetQ+3pFCkItt2JUH+9yMaBG2Hkz6av+T9mwN/acvtIwpbw==", - "dev": true, - "requires": { - "@babel/parser": "^7.15.0", - "@babel/types": "^7.15.0", - "@vue/shared": "3.2.6", - "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "@vue/shared": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.6.tgz", - "integrity": "sha512-uwX0Qs2e6kdF+WmxwuxJxOnKs/wEkMArtYpHSm7W+VY/23Tl8syMRyjnzEeXrNCAP0/8HZxEGkHJsjPEDNRuHw==", - "dev": true - } } }, "@vue/runtime-core": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.1.5.tgz", - "integrity": "sha512-YQbG5cBktN1RowQDKA22itmvQ+b40f0WgQ6CXK4VYoYICAiAfu6Cc14777ve8zp1rJRGtk5oIeS149TOculrTg==", + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.21.tgz", + "integrity": "sha512-7oOxKaU0D2IunOAMOOHZgJVrHg63xwng8BZx3fbgmakqEIMwHhQcp+5GV1sOg/sWW7R4UhaRDIUCukO2GRVK2Q==", "requires": { - "@vue/reactivity": "3.1.5", - "@vue/shared": "3.1.5" + "@vue/reactivity": "3.2.21", + "@vue/shared": "3.2.21" } }, "@vue/runtime-dom": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.1.5.tgz", - "integrity": "sha512-tNcf3JhVR0RfW0kw1p8xZgv30nvX8Y9rsz7eiQ0dHe273sfoCngAG0y4GvMaY4Xd8FsjUwFedd4suQ8Lu8meXg==", + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.21.tgz", + "integrity": "sha512-apBdriD6QsI4ywbllY8kjr9/0scGuStDuvLbJULPQkFPtHzntd51bP5PQTQVAEIc9kwnTozmj6x6ZdX/cwo7xA==", "requires": { - "@vue/runtime-core": "3.1.5", - "@vue/shared": "3.1.5", + "@vue/runtime-core": "3.2.21", + "@vue/shared": "3.2.21", "csstype": "^2.6.8" } }, + "@vue/server-renderer": { + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.21.tgz", + "integrity": "sha512-QBgYqVgI7XCSBCqGa4LduV9vpfQFdZBOodFmq5Txk5W/v1KrJ1LoOh2Q0RHiRgtoK/UR9uyvRVcYqOmwHkZNEg==", + "requires": { + "@vue/compiler-ssr": "3.2.21", + "@vue/shared": "3.2.21" + } + }, "@vue/shared": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.1.5.tgz", - "integrity": "sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA==" + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.21.tgz", + "integrity": "sha512-5EQmIPK6gw4UVYUbM959B0uPsJ58+xoMESCZs3N89XyvJ9e+fX4pqEPrOGV8OroIk3SbEvJcC+eYc8BH9JQrHA==" }, "anymatch": { "version": "3.1.2", @@ -2294,24 +2015,12 @@ "picomatch": "^2.0.4" } }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true - }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, "braces": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", @@ -2337,43 +2046,154 @@ "readdirp": "~3.5.0" } }, - "colorette": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", - "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", - "dev": true + "csstype": { + "version": "2.6.18", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.18.tgz", + "integrity": "sha512-RSU6Hyeg14am3Ah4VZEmeX8H7kLwEEirXe6aU2IPfKNvhXwTflK5HQRDNI0ypQXoqmm+QPyG2IaPuQE5zMwSIQ==" }, - "consolidate": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.16.0.tgz", - "integrity": "sha512-Nhl1wzCslqXYTJVDyJCu3ODohy9OfBMB5uD2BiBTzd7w+QY0lBzafkR8y8755yMYHAaMD4NuzbAw03/xzfw+eQ==", + "esbuild": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.13.13.tgz", + "integrity": "sha512-Z17A/R6D0b4s3MousytQ/5i7mTCbaF+Ua/yPfoe71vdTv4KBvVAvQ/6ytMngM2DwGJosl8WxaD75NOQl2QF26Q==", + "dev": true, + "requires": { + "esbuild-android-arm64": "0.13.13", + "esbuild-darwin-64": "0.13.13", + "esbuild-darwin-arm64": "0.13.13", + "esbuild-freebsd-64": "0.13.13", + "esbuild-freebsd-arm64": "0.13.13", + "esbuild-linux-32": "0.13.13", + "esbuild-linux-64": "0.13.13", + "esbuild-linux-arm": "0.13.13", + "esbuild-linux-arm64": "0.13.13", + "esbuild-linux-mips64le": "0.13.13", + "esbuild-linux-ppc64le": "0.13.13", + "esbuild-netbsd-64": "0.13.13", + "esbuild-openbsd-64": "0.13.13", + "esbuild-sunos-64": "0.13.13", + "esbuild-windows-32": "0.13.13", + "esbuild-windows-64": "0.13.13", + "esbuild-windows-arm64": "0.13.13" + } + }, + "esbuild-android-arm64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.13.13.tgz", + "integrity": "sha512-T02aneWWguJrF082jZworjU6vm8f4UQ+IH2K3HREtlqoY9voiJUwHLRL6khRlsNLzVglqgqb7a3HfGx7hAADCQ==", "dev": true, - "requires": { - "bluebird": "^3.7.2" - } + "optional": true }, - "cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true + "esbuild-darwin-64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.13.13.tgz", + "integrity": "sha512-wkaiGAsN/09X9kDlkxFfbbIgR78SNjMOfUhoel3CqKBDsi9uZhw7HBNHNxTzYUK8X8LAKFpbODgcRB3b/I8gHA==", + "dev": true, + "optional": true }, - "csstype": { - "version": "2.6.17", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.17.tgz", - "integrity": "sha512-u1wmTI1jJGzCJzWndZo8mk4wnPTZd1eOIYTYvuEyOQGfmDl3TrabCCfKnOC86FZwW/9djqTl933UF/cS425i9A==" + "esbuild-darwin-arm64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.13.tgz", + "integrity": "sha512-b02/nNKGSV85Gw9pUCI5B48AYjk0vFggDeom0S6QMP/cEDtjSh1WVfoIFNAaLA0MHWfue8KBwoGVsN7rBshs4g==", + "dev": true, + "optional": true }, - "emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true + "esbuild-freebsd-64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.13.tgz", + "integrity": "sha512-ALgXYNYDzk9YPVk80A+G4vz2D22Gv4j4y25exDBGgqTcwrVQP8rf/rjwUjHoh9apP76oLbUZTmUmvCMuTI1V9A==", + "dev": true, + "optional": true }, - "esbuild": { - "version": "0.12.24", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.24.tgz", - "integrity": "sha512-C0ibY+HsXzYB6L/pLWEiWjMpghKsIc58Q5yumARwBQsHl9DXPakW+5NI/Y9w4YXiz0PEP6XTGTT/OV4Nnsmb4A==", - "dev": true + "esbuild-freebsd-arm64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.13.tgz", + "integrity": "sha512-uFvkCpsZ1yqWQuonw5T1WZ4j59xP/PCvtu6I4pbLejhNo4nwjW6YalqnBvBSORq5/Ifo9S/wsIlVHzkzEwdtlw==", + "dev": true, + "optional": true + }, + "esbuild-linux-32": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.13.13.tgz", + "integrity": "sha512-yxR9BBwEPs9acVEwTrEE2JJNHYVuPQC9YGjRfbNqtyfK/vVBQYuw8JaeRFAvFs3pVJdQD0C2BNP4q9d62SCP4w==", + "dev": true, + "optional": true + }, + "esbuild-linux-64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.13.13.tgz", + "integrity": "sha512-kzhjlrlJ+6ESRB/n12WTGll94+y+HFeyoWsOrLo/Si0s0f+Vip4b8vlnG0GSiS6JTsWYAtGHReGczFOaETlKIw==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.13.13.tgz", + "integrity": "sha512-hXub4pcEds+U1TfvLp1maJ+GHRw7oizvzbGRdUvVDwtITtjq8qpHV5Q5hWNNn6Q+b3b2UxF03JcgnpzCw96nUQ==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.13.tgz", + "integrity": "sha512-KMrEfnVbmmJxT3vfTnPv/AiXpBFbbyExH13BsUGy1HZRPFMi5Gev5gk8kJIZCQSRfNR17aqq8sO5Crm2KpZkng==", + "dev": true, + "optional": true + }, + "esbuild-linux-mips64le": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.13.tgz", + "integrity": "sha512-cJT9O1LYljqnnqlHaS0hdG73t7hHzF3zcN0BPsjvBq+5Ad47VJun+/IG4inPhk8ta0aEDK6LdP+F9299xa483w==", + "dev": true, + "optional": true + }, + "esbuild-linux-ppc64le": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.13.tgz", + "integrity": "sha512-+rghW8st6/7O6QJqAjVK3eXzKkZqYAw6LgHv7yTMiJ6ASnNvghSeOcIvXFep3W2oaJc35SgSPf21Ugh0o777qQ==", + "dev": true, + "optional": true + }, + "esbuild-netbsd-64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.13.13.tgz", + "integrity": "sha512-A/B7rwmzPdzF8c3mht5TukbnNwY5qMJqes09ou0RSzA5/jm7Jwl/8z853ofujTFOLhkNHUf002EAgokzSgEMpQ==", + "dev": true, + "optional": true + }, + "esbuild-openbsd-64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.13.tgz", + "integrity": "sha512-szwtuRA4rXKT3BbwoGpsff6G7nGxdKgUbW9LQo6nm0TVCCjDNDC/LXxT994duIW8Tyq04xZzzZSW7x7ttDiw1w==", + "dev": true, + "optional": true + }, + "esbuild-sunos-64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.13.13.tgz", + "integrity": "sha512-ihyds9O48tVOYF48iaHYUK/boU5zRaLOXFS+OOL3ceD39AyHo46HVmsJLc7A2ez0AxNZCxuhu+P9OxfPfycTYQ==", + "dev": true, + "optional": true + }, + "esbuild-windows-32": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.13.13.tgz", + "integrity": "sha512-h2RTYwpG4ldGVJlbmORObmilzL8EECy8BFiF8trWE1ZPHLpECE9//J3Bi+W3eDUuv/TqUbiNpGrq4t/odbayUw==", + "dev": true, + "optional": true + }, + "esbuild-windows-64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.13.13.tgz", + "integrity": "sha512-oMrgjP4CjONvDHe7IZXHrMk3wX5Lof/IwFEIbwbhgbXGBaN2dke9PkViTiXC3zGJSGpMvATXVplEhlInJ0drHA==", + "dev": true, + "optional": true + }, + "esbuild-windows-arm64": { + "version": "0.13.13", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.13.tgz", + "integrity": "sha512-6fsDfTuTvltYB5k+QPah/x7LrI2+OLAJLE3bWLDiZI6E8wXMQU+wLqtEO/U/RvJgVY1loPs5eMpUBpVajczh1A==", + "dev": true, + "optional": true }, "estree-walker": { "version": "2.0.2", @@ -2402,15 +2222,6 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "generic-names": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/generic-names/-/generic-names-2.0.1.tgz", - "integrity": "sha512-kPCHWa1m9wGG/OwQpeweTwM/PYiQLrUIxXbt/P4Nic3LbGjCP0YwrALHW1uNLKZ0LIMg+RF+XRlj2ekT9ZlZAQ==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0" - } - }, "glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -2429,25 +2240,6 @@ "function-bind": "^1.1.1" } }, - "hash-sum": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-2.0.0.tgz", - "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==", - "dev": true - }, - "icss-replace-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", - "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", - "dev": true - }, - "icss-utils": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", - "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true, - "requires": {} - }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -2458,9 +2250,9 @@ } }, "is-core-module": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.3.0.tgz", - "integrity": "sha512-xSphU2KG9867tsYdLD4RWQ1VqdFl4HTO9Thf3I/3dLEfr0dbPTWKsuCKrgqMljg4nPE+Gq0VCnzT3gr0CyBmsw==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", + "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", "dev": true, "requires": { "has": "^1.0.3" @@ -2493,32 +2285,6 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "peer": true }, - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" - } - }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", - "dev": true - }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -2528,44 +2294,18 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, "magic-string": { "version": "0.25.7", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", - "dev": true, "requires": { "sourcemap-codec": "^1.4.4" } }, - "merge-source-map": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", - "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", - "dev": true, - "requires": { - "source-map": "^0.6.1" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, "nanoid": { - "version": "3.1.23", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", - "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==", - "dev": true + "version": "3.1.30", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.30.tgz", + "integrity": "sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ==" }, "normalize-path": { "version": "3.0.0", @@ -2590,6 +2330,11 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, "picomatch": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", @@ -2597,88 +2342,19 @@ "dev": true }, "postcss": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.6.tgz", - "integrity": "sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==", - "dev": true, + "version": "8.3.11", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.11.tgz", + "integrity": "sha512-hCmlUAIlUiav8Xdqw3Io4LcpA1DOt7h3LSTAC4G6JGHFFaWzI6qvFt9oilvl8BmkbBRX1IhM90ZAmpk68zccQA==", "requires": { - "colorette": "^1.2.2", - "nanoid": "^3.1.23", + "nanoid": "^3.1.30", + "picocolors": "^1.0.0", "source-map-js": "^0.6.2" } }, - "postcss-modules": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/postcss-modules/-/postcss-modules-4.2.2.tgz", - "integrity": "sha512-/H08MGEmaalv/OU8j6bUKi/kZr2kqGF6huAW8m9UAgOLWtpFdhA14+gPBoymtqyv+D4MLsmqaF2zvIegdCxJXg==", - "dev": true, - "requires": { - "generic-names": "^2.0.1", - "icss-replace-symbols": "^1.1.0", - "lodash.camelcase": "^4.3.0", - "postcss-modules-extract-imports": "^3.0.0", - "postcss-modules-local-by-default": "^4.0.0", - "postcss-modules-scope": "^3.0.0", - "postcss-modules-values": "^4.0.0", - "string-hash": "^1.1.1" - } - }, - "postcss-modules-extract-imports": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", - "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", - "dev": true, - "requires": {} - }, - "postcss-modules-local-by-default": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz", - "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==", - "dev": true, - "requires": { - "icss-utils": "^5.0.0", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.1.0" - } - }, - "postcss-modules-scope": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", - "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", - "dev": true, - "requires": { - "postcss-selector-parser": "^6.0.4" - } - }, - "postcss-modules-values": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", - "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", - "dev": true, - "requires": { - "icss-utils": "^5.0.0" - } - }, - "postcss-selector-parser": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz", - "integrity": "sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==", - "dev": true, - "requires": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - } - }, - "postcss-value-parser": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", - "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", - "dev": true - }, "prosemirror-commands": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.1.10.tgz", - "integrity": "sha512-IWyBBXNAd44RM6NnBPljwq+/CM2oYCQJkF+YhKEAZNwzW0uFdGf4qComhjbKZzqFdu6Iub2ZhNsXgwPibA0lCQ==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.1.12.tgz", + "integrity": "sha512-+CrMs3w/ZVPSkR+REg8KL/clyFLv/1+SgY/OMN+CB22Z24j9TZDje72vL36lOZ/E4NeRXuiCcmENcW/vAcG67A==", "requires": { "prosemirror-model": "^1.0.0", "prosemirror-state": "^1.0.0", @@ -2696,9 +2372,9 @@ } }, "prosemirror-gapcursor": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/prosemirror-gapcursor/-/prosemirror-gapcursor-1.1.5.tgz", - "integrity": "sha512-SjbUZq5pgsBDuV3hu8GqgIpZR5eZvGLM+gPQTqjVVYSMUCfKW3EGXTEYaLHEl1bGduwqNC95O3bZflgtAb4L6w==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/prosemirror-gapcursor/-/prosemirror-gapcursor-1.2.0.tgz", + "integrity": "sha512-yCLy5+0rVqLir/KcHFathQj4Rf8aRHi80FmEfKtM0JmyzvwdomslLzDZ/pX4oFhFKDgjl/WBBBFNqDyNifWg7g==", "requires": { "prosemirror-keymap": "^1.0.0", "prosemirror-model": "^1.0.0", @@ -2716,36 +2392,27 @@ "rope-sequence": "^1.3.0" } }, - "prosemirror-inputrules": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/prosemirror-inputrules/-/prosemirror-inputrules-1.1.3.tgz", - "integrity": "sha512-ZaHCLyBtvbyIHv0f5p6boQTIJjlD6o2NPZiEaZWT2DA+j591zS29QQEMT4lBqwcLW3qRSf7ZvoKNbf05YrsStw==", - "requires": { - "prosemirror-state": "^1.0.0", - "prosemirror-transform": "^1.0.0" - } - }, "prosemirror-keymap": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.1.4.tgz", - "integrity": "sha512-Al8cVUOnDFL4gcI5IDlG6xbZ0aOD/i3B17VT+1JbHWDguCgt/lBHVTHUBcKvvbSg6+q/W4Nj1Fu6bwZSca3xjg==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.1.5.tgz", + "integrity": "sha512-8SZgPH3K+GLsHL2wKuwBD9rxhsbnVBTwpHCO4VUO5GmqUQlxd/2GtBVWTsyLq4Dp3N9nGgPd3+lZFKUDuVp+Vw==", "requires": { "prosemirror-state": "^1.0.0", "w3c-keyname": "^2.2.0" } }, "prosemirror-model": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.14.3.tgz", - "integrity": "sha512-yzZlBaSxfUPIIP6U5Edh5zKxJPZ5f7bwZRhiCuH3UYkWhj+P3d8swHsbuAMOu/iDatDc5J/Qs5Mb3++mZf+CvQ==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.15.0.tgz", + "integrity": "sha512-hQJv7SnIhlAy9ga3lhPPgaufhvCbQB9tHwscJ9E1H1pPHmN8w5V/lURueoYv9Kc3/bpNWoyHa8r3g//m7N0ChQ==", "requires": { "orderedmap": "^1.1.0" } }, "prosemirror-schema-list": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.1.5.tgz", - "integrity": "sha512-9gadhga/wySVfb/iZ2vOpndbG0XroeLw0HkkZN5demNbOea6U5oQtJmvyYWC7ZVf3WkhmVdVsOXrllM9JcC20A==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.1.6.tgz", + "integrity": "sha512-aFGEdaCWmJzouZ8DwedmvSsL50JpRkqhQ6tcpThwJONVVmCgI36LJHtoQ4VGZbusMavaBhXXr33zyD2IVsTlkw==", "requires": { "prosemirror-model": "^1.0.0", "prosemirror-transform": "^1.0.0" @@ -2761,17 +2428,17 @@ } }, "prosemirror-transform": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.3.2.tgz", - "integrity": "sha512-/G6d/u9Mf6Bv3H1XR8VxhpjmUO75LYmnvj+s3ZfZpakU1hnQbsvCEybml1B3f2IWUAAQRFkbO1PnsbFhLZsYsw==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.3.3.tgz", + "integrity": "sha512-9NLVXy1Sfa2G6qPqhWMkEvwQQMTw7OyTqOZbJaGQWsCeH3hH5Cw+c5eNaLM1Uu75EyKLsEZhJ93XpHJBa6RX8A==", "requires": { "prosemirror-model": "^1.0.0" } }, "prosemirror-view": { - "version": "1.19.3", - "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.19.3.tgz", - "integrity": "sha512-YP/ZzVwqPPwbHbJi97U2/CeyZ8PIHmLJt0gIhZWP8XfnuBRGG3y+jwLzUoBVmiuoUCy3R6PSB+pOATliGzLfPg==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.22.0.tgz", + "integrity": "sha512-kCZoHp0Sa2AHhwV64aNFi69QlqBocZ8G8gbvZRFDdEj57whOCdPjdVLYBVyM9+S5oHDSrzjkoMm+JvvHFhMRJw==", "requires": { "prosemirror-model": "^1.14.3", "prosemirror-state": "^1.0.0", @@ -2819,12 +2486,12 @@ } }, "rollup": { - "version": "2.47.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.47.0.tgz", - "integrity": "sha512-rqBjgq9hQfW0vRmz+0S062ORRNJXvwRpzxhFXORvar/maZqY6za3rgQ/p1Glg+j1hnc1GtYyQCPiAei95uTElg==", + "version": "2.59.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.59.0.tgz", + "integrity": "sha512-l7s90JQhCQ6JyZjKgo7Lq1dKh2RxatOM+Jr6a9F7WbS9WgKbocyUSeLmZl8evAse7y96Ae98L2k1cBOwWD8nHw==", "dev": true, "requires": { - "fsevents": "~2.3.1" + "fsevents": "~2.3.2" } }, "rope-sequence": { @@ -2833,9 +2500,9 @@ "integrity": "sha512-ku6MFrwEVSVmXLvy3dYph3LAMNS0890K7fabn+0YIRQ2T96T9F4gkFf0vf0WW0JUraNWwGRtInEpH7yO4tbQZg==" }, "sass": { - "version": "1.38.2", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.38.2.tgz", - "integrity": "sha512-Bz1fG6qiyF0FX6m/I+VxtdVKz1Dfmg/e9kfDy2PhWOkq3T384q2KxwIfP0fXpeI+EyyETdOauH+cRHQDFASllA==", + "version": "1.43.4", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.43.4.tgz", + "integrity": "sha512-/ptG7KE9lxpGSYiXn7Ar+lKOv37xfWsZRtFYal2QHNigyVQDx685VFT/h7ejVr+R8w7H4tmUgtulsKl5YpveOg==", "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0" @@ -2859,34 +2526,21 @@ "source-map-js": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz", - "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==", - "dev": true + "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==" }, "sourcemap-codec": { "version": "1.4.8", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "dev": true - }, - "string-hash": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/string-hash/-/string-hash-1.1.3.tgz", - "integrity": "sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=", - "dev": true + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" }, "tippy.js": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-6.3.1.tgz", - "integrity": "sha512-JnFncCq+rF1dTURupoJ4yPie5Cof978inW6/4S6kmWV7LL9YOSEVMifED3KdrVPEG+Z/TFH2CDNJcQEfaeuQww==", + "version": "6.3.5", + "resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-6.3.5.tgz", + "integrity": "sha512-B9hAQ5KNF+jDJRg6cRysV6Y3J+5fiNfD60GuXR5TP0sfrcltpgdzVc7f1wMtjQ3W0+Xsy80CDvk0Z+Vr0cM4sQ==", "requires": { - "@popperjs/core": "^2.8.3" + "@popperjs/core": "^2.9.0" } }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" - }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -2896,45 +2550,35 @@ "is-number": "^7.0.0" } }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, "vite": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-2.5.1.tgz", - "integrity": "sha512-FwmLbbz8MB1pBs9dKoRDgpiqoijif8hSK1+NNUYc12/cnf+pM2UFhhQ1rcpXgbMhm/5c2USZdVAf0FSkSxaFDA==", + "version": "2.6.13", + "resolved": "https://registry.npmjs.org/vite/-/vite-2.6.13.tgz", + "integrity": "sha512-+tGZ1OxozRirTudl4M3N3UTNJOlxdVo/qBl2IlDEy/ZpTFcskp+k5ncNjayR3bRYTCbqSOFz2JWGN1UmuDMScA==", "dev": true, "requires": { - "esbuild": "^0.12.17", + "esbuild": "^0.13.2", "fsevents": "~2.3.2", - "postcss": "^8.3.6", + "postcss": "^8.3.8", "resolve": "^1.20.0", - "rollup": "^2.38.5" + "rollup": "^2.57.0" } }, "vue": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.1.5.tgz", - "integrity": "sha512-Ho7HNb1nfDoO+HVb6qYZgeaobt1XbY6KXFe4HGs1b9X6RhkWG/113n4/SrtM1LUclM6OrP/Se5aPHHvAPG1iVQ==", + "version": "3.2.21", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.21.tgz", + "integrity": "sha512-jpy7ckXdyclfRzqLjL4mtq81AkzQleE54KjZsJg/9OorNVurAxdlU5XpD49GpjKdnftuffKUvx2C5jDOrgc/zg==", "requires": { - "@vue/compiler-dom": "3.1.5", - "@vue/runtime-dom": "3.1.5", - "@vue/shared": "3.1.5" + "@vue/compiler-dom": "3.2.21", + "@vue/compiler-sfc": "3.2.21", + "@vue/runtime-dom": "3.2.21", + "@vue/server-renderer": "3.2.21", + "@vue/shared": "3.2.21" } }, "w3c-keyname": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.4.tgz", "integrity": "sha512-tOhfEwEzFLJzf6d1ZPkYfGj+FWhIpBux9ppoP3rlclw3Z0BZv3N7b7030Z1kYth+6rDuAsXUFr+d0VE6Ed1ikw==" - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true } } } diff --git a/package.json b/package.json index 94ce088..0c70f38 100644 --- a/package.json +++ b/package.json @@ -6,34 +6,34 @@ "watch": "vite build --mode development --watch" }, "dependencies": { - "@tabler/icons": "^1.41.2", - "@tiptap/core": "^2.0.0-beta.102", - "@tiptap/extension-blockquote": "^2.0.0-beta.15", - "@tiptap/extension-bullet-list": "^2.0.0-beta.15", - "@tiptap/extension-character-count": "^2.0.0-beta.13", - "@tiptap/extension-code-block": "^2.0.0-beta.17", + "@tabler/icons": "^1.42.0", + "@tiptap/core": "^2.0.0-beta.133", + "@tiptap/extension-blockquote": "^2.0.0-beta.21", + "@tiptap/extension-bullet-list": "^2.0.0-beta.20", + "@tiptap/extension-character-count": "^2.0.0-beta.15", + "@tiptap/extension-code-block": "^2.0.0-beta.26", "@tiptap/extension-document": "^2.0.0-beta.13", - "@tiptap/extension-heading": "^2.0.0-beta.15", - "@tiptap/extension-history": "^2.0.0-beta.16", - "@tiptap/extension-horizontal-rule": "^2.0.0-beta.19", - "@tiptap/extension-image": "^2.0.0-beta.15", - "@tiptap/extension-list-item": "^2.0.0-beta.14", - "@tiptap/extension-ordered-list": "^2.0.0-beta.15", - "@tiptap/extension-paragraph": "^2.0.0-beta.17", - "@tiptap/extension-task-item": "^2.0.0-beta.17", - "@tiptap/extension-task-list": "^2.0.0-beta.17", + "@tiptap/extension-heading": "^2.0.0-beta.20", + "@tiptap/extension-history": "^2.0.0-beta.18", + "@tiptap/extension-horizontal-rule": "^2.0.0-beta.27", + "@tiptap/extension-image": "^2.0.0-beta.21", + "@tiptap/extension-list-item": "^2.0.0-beta.16", + "@tiptap/extension-ordered-list": "^2.0.0-beta.21", + "@tiptap/extension-paragraph": "^2.0.0-beta.19", + "@tiptap/extension-task-item": "^2.0.0-beta.25", + "@tiptap/extension-task-list": "^2.0.0-beta.20", "@tiptap/extension-text": "^2.0.0-beta.13", - "@tiptap/extension-text-align": "^2.0.0-beta.22", - "@tiptap/extension-typography": "^2.0.0-beta.14", - "@tiptap/extension-underline": "^2.0.0-beta.16", - "@tiptap/starter-kit": "^2.0.0-beta.101", - "@tiptap/vue-3": "^2.0.0-beta.56", - "vue": "^3.0.11" + "@tiptap/extension-text-align": "^2.0.0-beta.25", + "@tiptap/extension-typography": "^2.0.0-beta.17", + "@tiptap/extension-underline": "^2.0.0-beta.18", + "@tiptap/starter-kit": "^2.0.0-beta.135", + "@tiptap/vue-3": "^2.0.0-beta.76", + "vue": "^3.2.21" }, "devDependencies": { - "@vitejs/plugin-vue": "^1.6.0", - "@vue/compiler-sfc": "^3.2.6", - "sass": "^1.38.2", - "vite": "^2.5.1" + "@vitejs/plugin-vue": "^1.9.4", + "@vue/compiler-sfc": "^3.2.21", + "sass": "^1.43.4", + "vite": "^2.6.13" } }