diff --git a/build/asset-manifest.json b/build/asset-manifest.json index 0c9c655..e15074f 100644 --- a/build/asset-manifest.json +++ b/build/asset-manifest.json @@ -1,25 +1,25 @@ { "files": { "main.css": "./static/css/main.f947f3b2.chunk.css", - "main.js": "./static/js/main.6a8902d8.chunk.js", - "main.js.map": "./static/js/main.6a8902d8.chunk.js.map", + "main.js": "./static/js/main.766c694b.chunk.js", + "main.js.map": "./static/js/main.766c694b.chunk.js.map", "runtime-main.js": "./static/js/runtime-main.5a852d11.js", "runtime-main.js.map": "./static/js/runtime-main.5a852d11.js.map", "static/css/2.16816ef8.chunk.css": "./static/css/2.16816ef8.chunk.css", - "static/js/2.f1c12d18.chunk.js": "./static/js/2.f1c12d18.chunk.js", - "static/js/2.f1c12d18.chunk.js.map": "./static/js/2.f1c12d18.chunk.js.map", + "static/js/2.71cef58d.chunk.js": "./static/js/2.71cef58d.chunk.js", + "static/js/2.71cef58d.chunk.js.map": "./static/js/2.71cef58d.chunk.js.map", "index.html": "./index.html", - "precache-manifest.95b1b10c1aad3f150d2bc6f30b5e51a6.js": "./precache-manifest.95b1b10c1aad3f150d2bc6f30b5e51a6.js", + "precache-manifest.00f13e22fff7bbd5cb05788e322b4e59.js": "./precache-manifest.00f13e22fff7bbd5cb05788e322b4e59.js", "service-worker.js": "./service-worker.js", "static/css/2.16816ef8.chunk.css.map": "./static/css/2.16816ef8.chunk.css.map", "static/css/main.f947f3b2.chunk.css.map": "./static/css/main.f947f3b2.chunk.css.map", - "static/js/2.f1c12d18.chunk.js.LICENSE.txt": "./static/js/2.f1c12d18.chunk.js.LICENSE.txt" + "static/js/2.71cef58d.chunk.js.LICENSE.txt": "./static/js/2.71cef58d.chunk.js.LICENSE.txt" }, "entrypoints": [ "static/js/runtime-main.5a852d11.js", "static/css/2.16816ef8.chunk.css", - "static/js/2.f1c12d18.chunk.js", + "static/js/2.71cef58d.chunk.js", "static/css/main.f947f3b2.chunk.css", - "static/js/main.6a8902d8.chunk.js" + "static/js/main.766c694b.chunk.js" ] } \ No newline at end of file diff --git a/build/index.html b/build/index.html index 1f60e51..13dc387 100644 --- a/build/index.html +++ b/build/index.html @@ -1 +1 @@ -React App
\ No newline at end of file +React App
\ No newline at end of file diff --git a/build/precache-manifest.95b1b10c1aad3f150d2bc6f30b5e51a6.js b/build/precache-manifest.00f13e22fff7bbd5cb05788e322b4e59.js similarity index 52% rename from build/precache-manifest.95b1b10c1aad3f150d2bc6f30b5e51a6.js rename to build/precache-manifest.00f13e22fff7bbd5cb05788e322b4e59.js index 224630b..c78ae3e 100644 --- a/build/precache-manifest.95b1b10c1aad3f150d2bc6f30b5e51a6.js +++ b/build/precache-manifest.00f13e22fff7bbd5cb05788e322b4e59.js @@ -1,27 +1,27 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ { - "revision": "0cd81ce870debc41c512ddef98ea0832", + "revision": "27a99c127abbef13e9ff736e67c13198", "url": "./index.html" }, { - "revision": "2506122da75f23aa7627", + "revision": "5f7597cf4db0c27b5b25", "url": "./static/css/2.16816ef8.chunk.css" }, { - "revision": "78e318a9bf3a9da1969d", + "revision": "fe7b4b094a1c9c831d2d", "url": "./static/css/main.f947f3b2.chunk.css" }, { - "revision": "2506122da75f23aa7627", - "url": "./static/js/2.f1c12d18.chunk.js" + "revision": "5f7597cf4db0c27b5b25", + "url": "./static/js/2.71cef58d.chunk.js" }, { "revision": "54335a5caf6bd5c45ec571cb34ffcd63", - "url": "./static/js/2.f1c12d18.chunk.js.LICENSE.txt" + "url": "./static/js/2.71cef58d.chunk.js.LICENSE.txt" }, { - "revision": "78e318a9bf3a9da1969d", - "url": "./static/js/main.6a8902d8.chunk.js" + "revision": "fe7b4b094a1c9c831d2d", + "url": "./static/js/main.766c694b.chunk.js" }, { "revision": "3fae0b9d79f6c70627b6", diff --git a/build/service-worker.js b/build/service-worker.js index 6b1d69e..59bc520 100644 --- a/build/service-worker.js +++ b/build/service-worker.js @@ -14,7 +14,7 @@ importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); importScripts( - "./precache-manifest.95b1b10c1aad3f150d2bc6f30b5e51a6.js" + "./precache-manifest.00f13e22fff7bbd5cb05788e322b4e59.js" ); self.addEventListener('message', (event) => { diff --git a/build/static/js/2.71cef58d.chunk.js b/build/static/js/2.71cef58d.chunk.js new file mode 100644 index 0000000..2837888 --- /dev/null +++ b/build/static/js/2.71cef58d.chunk.js @@ -0,0 +1,3 @@ +/*! For license information please see 2.71cef58d.chunk.js.LICENSE.txt */ +(this["webpackJsonpsn-rme"]=this["webpackJsonpsn-rme"]||[]).push([[2],[function(e,t,n){"use strict";function r(e){this.content=e}n.r(t),n.d(t,"ContentMatch",(function(){return P})),n.d(t,"DOMParser",(function(){return ee})),n.d(t,"DOMSerializer",(function(){return de})),n.d(t,"Fragment",(function(){return i})),n.d(t,"Mark",(function(){return c})),n.d(t,"MarkType",(function(){return Y})),n.d(t,"Node",(function(){return L})),n.d(t,"NodeRange",(function(){return E})),n.d(t,"NodeType",(function(){return W})),n.d(t,"ReplaceError",(function(){return f})),n.d(t,"ResolvedPos",(function(){return w})),n.d(t,"Schema",(function(){return Q})),n.d(t,"Slice",(function(){return d})),r.prototype={constructor:r,find:function(e){for(var t=0;t>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};var o=r;var i=function(e,t){if(this.content=e,this.size=t||0,null==t)for(var n=0;ne&&!1!==n(s,r+a,o,i)&&s.content.size){var l=a+1;s.nodesBetween(Math.max(0,e-l),Math.min(s.content.size,t-l),n,r+l)}a=u}},i.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},i.prototype.textBetween=function(e,t,n,r){var o="",i=!0;return this.nodesBetween(e,t,(function(a,s){a.isText?(o+=a.text.slice(Math.max(e,s)-s,t-s),i=!n):a.isLeaf&&r?(o+=r,i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o},i.prototype.append=function(e){if(!e.size)return this;if(!this.size)return e;var t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);oe)for(var o=0,a=0;ae&&((at)&&(s=s.isText?s.cut(Math.max(0,e-a),Math.min(s.text.length,t-a)):s.cut(Math.max(0,e-a-1),Math.min(s.content.size,t-a-1))),n.push(s),r+=s.nodeSize),a=u}return new i(n,r)},i.prototype.cutByIndex=function(e,t){return e==t?i.empty:0==e&&t==this.content.length?this:new i(this.content.slice(e,t))},i.prototype.replaceChild=function(e,t){var n=this.content[e];if(n==t)return this;var r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new i(r,o)},i.prototype.addToStart=function(e){return new i([e].concat(this.content),this.size+e.nodeSize)},i.prototype.addToEnd=function(e){return new i(this.content.concat(e),this.size+e.nodeSize)},i.prototype.eq=function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;tthis.size||e<0)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?u(n+1,o):u(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(e){return e.toJSON()})):null},i.fromJSON=function(e,t){if(!t)return i.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new i(t.map(e.nodeFromJSON))},i.fromArray=function(e){if(!e.length)return i.empty;for(var t,n=0,r=0;rthis.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t},c.prototype.removeFromSet=function(e){for(var t=0;te.depth)throw new f("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new f("Inconsistent open depths");return function e(t,n,r,o){var a=t.index(o),s=t.node(o);if(a==n.index(o)&&o=0;o--)r=t.node(o).copy(i.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t),c=l.start,f=l.end;return b(s,function e(t,n,r,o,a){var s=t.depth>a&&v(t,n,a+1),u=o.depth>a&&v(r,o,a+1),l=[];y(null,t,a,l),s&&u&&n.index(a)==r.index(a)?(m(s,u),g(b(s,e(t,n,r,o,a+1)),l)):(s&&g(b(s,k(t,n,a+1)),l),y(n,r,a,l),u&&g(b(u,k(r,o,a+1)),l));return y(o,null,a,l),new i(l)}(t,c,f,n,o))}var d=t.parent,p=d.content;return b(d,p.cut(0,t.parentOffset).append(r.content).append(p.cut(n.parentOffset)))}return b(s,k(t,n,o))}(e,t,n,0)}function m(e,t){if(!t.type.compatibleContent(e.type))throw new f("Cannot join "+t.type.name+" onto "+e.type.name)}function v(e,t,n){var r=e.node(n);return m(r,t.node(n)),r}function g(e,t){var n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function y(e,t,n,r){var o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(g(e.nodeAfter,r),i++));for(var s=i;sn)&&g(b(v(e,t,n+1),k(e,t,n+1)),r);return y(t,null,n,r),new i(r)}p.size.get=function(){return this.content.size-this.openStart-this.openEnd},d.prototype.insertAt=function(e,t){var n=function e(t,n,r,o){var i=t.findIndex(n),a=i.index,s=i.offset,u=t.maybeChild(a);if(s==n||u.isText)return o&&!o.canReplace(a,a,r)?null:t.cut(0,n).append(r).append(t.cut(n));var l=e(u.content,n-s-1,r);return l&&t.replaceChild(a,u.copy(l))}(this.content,e+this.openStart,t,null);return n&&new d(n,this.openStart,this.openEnd)},d.prototype.removeBetween=function(e,t){return new d(function e(t,n,r){var o=t.findIndex(n),i=o.index,a=o.offset,s=t.maybeChild(i),u=t.findIndex(r),l=u.index,c=u.offset;if(a==n||s.isText){if(c!=r&&!t.child(l).isText)throw new RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=l)throw new RangeError("Removing non-flat range");return t.replaceChild(i,s.copy(e(s.content,n-a-1,r-a-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)},d.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},d.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},d.prototype.toJSON=function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e},d.fromJSON=function(e,t){if(!t)return d.empty;var n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new d(i.fromJSON(e,t.content),n,r)},d.maxOpen=function(e,t){void 0===t&&(t=!0);for(var n=0,r=0,o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)n++;for(var i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)r++;return new d(e,n,r)},Object.defineProperties(d.prototype,p),d.empty=new d(i.empty,0,0);var w=function(e,t,n){this.pos=e,this.path=t,this.depth=t.length/3-1,this.parentOffset=n},_={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};w.prototype.resolveDepth=function(e){return null==e?this.depth:e<0?this.depth+e:e},_.parent.get=function(){return this.node(this.depth)},_.doc.get=function(){return this.node(0)},w.prototype.node=function(e){return this.path[3*this.resolveDepth(e)]},w.prototype.index=function(e){return this.path[3*this.resolveDepth(e)+1]},w.prototype.indexAfter=function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)},w.prototype.start=function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1},w.prototype.end=function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size},w.prototype.before=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]},w.prototype.after=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize},_.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},_.nodeAfter.get=function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r},_.nodeBefore.get=function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)},w.prototype.posAtIndex=function(e,t){t=this.resolveDepth(t);for(var n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1,o=0;o0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0},w.prototype.blockRange=function(e,t){if(void 0===e&&(e=this),e.pos=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new E(this,e,n)},w.prototype.sameParent=function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset},w.prototype.max=function(e){return e.pos>this.pos?e:this},w.prototype.min=function(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");for(var n=[],r=0,o=t,i=e;;){var a=i.content.findIndex(o),s=a.index,u=a.offset,l=o-u;if(n.push(i,s,r+u),!l)break;if((i=i.child(s)).isText)break;o=l-1,r+=u+1}return new w(t,n,o)},w.resolveCached=function(e,t){for(var n=0;ne&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(r=!0),!r})),r},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},L.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),D(this.marks,e)},L.prototype.contentMatchAt=function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t},L.prototype.canReplace=function(e,t,n,r,o){void 0===n&&(n=i.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var a=this.contentMatchAt(e).matchFragment(n,r,o),s=a&&a.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(var u=r;u=0;n--)t=e[n].type.name+"("+t+")";return t}var P=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]},I={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};P.parse=function(e,t){var n=new N(e,t);if(null==n.next)return P.empty;var r=j(n);n.next&&n.err("Unexpected trailing text");var o=function(e){var t=Object.create(null);return function n(r){var o=[];r.forEach((function(t){e[t].forEach((function(t){var n=t.term,r=t.to;if(n){var i=o.indexOf(n),a=i>-1&&o[i+1];V(e,r).forEach((function(e){a||o.push(n,a=[]),-1==a.indexOf(e)&&a.push(e)}))}}))}));for(var i=t[r.join(",")]=new P(r.indexOf(e.length-1)>-1),a=0;a>1},P.prototype.edge=function(e){var t=e<<1;if(t>=this.next.length)throw new RangeError("There's no "+e+"th edge in this content match");return{type:this.next[t],next:this.next[t+1]}},P.prototype.toString=function(){var e=[];return function t(n){e.push(n);for(var r=1;r"+e.indexOf(t.next[o+1]);return r})).join("\n")},Object.defineProperties(P.prototype,I),P.empty=new P(!0);var N=function(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.unshift()},R={next:{configurable:!0}};function j(e){var t=[];do{t.push(z(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function z(e){var t=[];do{t.push(F(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function F(e){for(var t=function(e){if(e.eat("(")){var t=j(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(t)>-1&&o.push(a)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=$(e,t)}return t}function B(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function $(e,t){var n=B(e),r=n;return e.eat(",")&&(r="}"!=e.next?B(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function q(e,t){return t-e}function V(e,t){var n=[];return function t(r){var o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(var i=0;i-1},W.prototype.allowsMarks=function(e){if(null==this.markSet)return!0;for(var t=0;t-1};var Q=function(e){for(var t in this.spec={},e)this.spec[t]=e[t];this.spec.nodes=o.from(e.nodes),this.spec.marks=o.from(e.marks),this.nodes=W.compile(this.spec.nodes,this),this.marks=Y.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var i=this.nodes[r],a=i.spec.content||"",s=i.spec.marks;i.contentMatch=n[a]||(n[a]=P.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet="_"==s?null:s?X(this,s.split(" ")):""!=s&&i.inlineContent?null:[]}for(var u in this.marks){var l=this.marks[u],c=l.spec.excludes;l.excluded=null==c?[l]:""==c?[]:X(this,c.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 X(e,t){for(var n=[],r=0;r-1)&&n.push(a=u)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}Q.prototype.node=function(e,t,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof W))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)},Q.prototype.text=function(e,t){var n=this.nodes.text;return new A(n,n.defaultAttrs,e,c.setFrom(t))},Q.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},Q.prototype.nodeFromJSON=function(e){return L.fromJSON(this,e)},Q.prototype.markFromJSON=function(e){return c.fromJSON(this,e)},Q.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var ee=function(e,t){var n=this;this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((function(e){e.tag?n.tags.push(e):e.style&&n.styles.push(e)})),this.normalizeLists=!this.tags.some((function(t){if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;var n=e.nodes[t.node];return n.contentMatch.matchType(n)}))};ee.prototype.parse=function(e,t){void 0===t&&(t={});var n=new ae(this,t,!1);return n.addAll(e,null,t.from,t.to),n.finish()},ee.prototype.parseSlice=function(e,t){void 0===t&&(t={});var n=new ae(this,t,!0);return n.addAll(e,null,t.from,t.to),d.maxOpen(n.finish())},ee.prototype.matchTag=function(e,t){for(var n=0;ne.length&&(61!=o.style.charCodeAt(e.length)||o.style.slice(e.length+1)!=t))){if(o.getAttrs){var i=o.getAttrs(t);if(!1===i)continue;o.attrs=i}return o}}},ee.schemaRules=function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r=0;t--)if(this.stashMarks[t].type==e)return this.stashMarks.splice(t,1)[0]},ie.prototype.applyPending=function(e){for(var t=0,n=this.pendingMarks;t=0;r--){var o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(var a=0;athis.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}},ae.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},ae.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},se.currentPos.get=function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e},ae.prototype.findAtPoint=function(e,t){if(this.find)for(var n=0;n-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.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);return function e(a,s){for(;a>=0;a--){var u=n[a];if(""==u){if(a==n.length-1||0==a)continue;for(;s>=i;s--)if(e(a-1,s))return!0;return!1}var l=s>0||0==s&&o?t.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!l||l.name!=u&&-1==l.groups.indexOf(u))return!1;s--}return!0}(n.length-1,this.open)},ae.prototype.textblockFromContext=function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).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}},ae.prototype.addPendingMark=function(e){var t=fe(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)},ae.prototype.removePendingMark=function(e,t){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);var o=r.popFromStashMark(e.type);o&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==t)break}},Object.defineProperties(ae.prototype,se);var de=function(e,t){this.nodes=e||{},this.marks=t||{}};function pe(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function he(e){return e.document||window.document}de.prototype.serializeFragment=function(e,t,n){var r=this;void 0===t&&(t={}),n||(n=he(t).createDocumentFragment());var o=n,i=null;return e.forEach((function(e){if(i||e.marks.length){i||(i=[]);for(var n=0,a=0;n=0;r--){var o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n},de.prototype.serializeMark=function(e,t,n){void 0===n&&(n={});var r=this.marks[e.type.name];return r&&de.renderSpec(he(n),r(e,t))},de.renderSpec=function(e,t,n){if(void 0===n&&(n=null),"string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;var r=t[0],o=r.indexOf(" ");o>0&&(n=r.slice(0,o),r=r.slice(o+1));var i=null,a=n?e.createElementNS(n,r):e.createElement(r),s=t[1],u=1;if(s&&"object"==typeof s&&null==s.nodeType&&!Array.isArray(s))for(var l in u=2,s)if(null!=s[l]){var c=l.indexOf(" ");c>0?a.setAttributeNS(l.slice(0,c),l.slice(c+1),s[l]):a.setAttribute(l,s[l])}for(var f=u;fu)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var p=de.renderSpec(e,d,n),h=p.dom,m=p.contentDOM;if(a.appendChild(h),m){if(i)throw new RangeError("Multiple content holes");i=m}}return{dom:a,contentDOM:i}},de.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new de(this.nodesFromSchema(e),this.marksFromSchema(e)))},de.nodesFromSchema=function(e){var t=pe(e.nodes);return t.text||(t.text=function(e){return e.text}),t},de.marksFromSchema=function(e){return pe(e.marks)}},function(e,t,n){"use strict";e.exports=n(146)},function(e,t,n){"use strict";n.r(t),n.d(t,"AllSelection",(function(){return p})),n.d(t,"EditorState",(function(){return _})),n.d(t,"NodeSelection",(function(){return f})),n.d(t,"Plugin",(function(){return S})),n.d(t,"PluginKey",(function(){return O})),n.d(t,"Selection",(function(){return a})),n.d(t,"SelectionRange",(function(){return u})),n.d(t,"TextSelection",(function(){return l})),n.d(t,"Transaction",(function(){return g}));var r=n(0),o=n(8),i=Object.create(null),a=function(e,t,n){this.ranges=n||[new u(e.min(t),e.max(t))],this.$anchor=e,this.$head=t},s={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};s.anchor.get=function(){return this.$anchor.pos},s.head.get=function(){return this.$head.pos},s.from.get=function(){return this.$from.pos},s.to.get=function(){return this.$to.pos},s.$from.get=function(){return this.ranges[0].$from},s.$to.get=function(){return this.ranges[0].$to},s.empty.get=function(){for(var e=this.ranges,t=0;t=0;o--){var i=t<0?m(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):m(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}},a.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new p(e.node(0))},a.atStart=function(e){return m(e,e,0,0,1)||new p(e)},a.atEnd=function(e){return m(e,e,e.content.size,e.childCount,-1)||new p(e)},a.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=i[t.type];if(!n)throw new RangeError("No selection type "+t.type+" defined");return n.fromJSON(e,t)},a.jsonID=function(e,t){if(e in i)throw new RangeError("Duplicate use of selection JSON ID "+e);return i[e]=t,t.prototype.jsonID=e,t},a.prototype.getBookmark=function(){return l.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(a.prototype,s),a.prototype.visible=!0;var u=function(e,t){this.$from=e,this.$to=t},l=function(e){function t(t,n){void 0===n&&(n=t),e.call(this,t,n)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},t.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));if(!o.parent.inlineContent)return e.near(o);var i=n.resolve(r.map(this.anchor));return new t(i.parent.inlineContent?i:o,o)},t.prototype.replace=function(t,n){if(void 0===n&&(n=r.Slice.empty),e.prototype.replace.call(this,t,n),n==r.Slice.empty){var o=this.$from.marksAcross(this.$to);o&&t.ensureMarks(o)}},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor&&e.head==this.head},t.prototype.getBookmark=function(){return new c(this.anchor,this.head)},t.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,t,n){void 0===n&&(n=t);var r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))},t.between=function(n,r,o){var i=n.pos-r.pos;if(o&&!i||(o=i>=0?1:-1),!r.parent.inlineContent){var a=e.findFrom(r,o,!0)||e.findFrom(r,-o,!0);if(!a)return e.near(r,o);r=a.$head}return n.parent.inlineContent||(0==i||(n=(e.findFrom(n,-o,!0)||e.findFrom(n,o,!0)).$anchor).pos0?0:1);o>0?a=0;a+=o){var s=t.child(a);if(s.isAtom){if(!i&&f.isSelectable(s))return f.create(e,n-(o<0?s.nodeSize:0))}else{var u=m(e,s,n+o,o<0?s.childCount:0,o,i);if(u)return u}n+=s.nodeSize*o}}function v(e,t,n){var r=e.steps.length-1;if(!(r0},t.prototype.setStoredMarks=function(e){return this.storedMarks=e,this.updated|=2,this},t.prototype.ensureMarks=function(e){return r.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this},t.prototype.addStoredMark=function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))},t.prototype.removeStoredMark=function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(2&this.updated)>0},t.prototype.addStep=function(t,n){e.prototype.addStep.call(this,t,n),this.updated=-3&this.updated,this.storedMarks=null},t.prototype.setTime=function(e){return this.time=e,this},t.prototype.replaceSelection=function(e){return this.selection.replace(this,e),this},t.prototype.replaceSelectionWith=function(e,t){var n=this.selection;return!1!==t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.Mark.none))),n.replaceWith(this,e),this},t.prototype.deleteSelection=function(){return this.selection.replace(this),this},t.prototype.insertText=function(e,t,n){void 0===n&&(n=t);var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(!e)return this.deleteRange(t,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(t);o=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(a.near(this.selection.$to)),this},t.prototype.setMeta=function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this},t.prototype.getMeta=function(e){return this.meta["string"==typeof e?e:e.key]},n.isGeneric.get=function(){for(var e in this.meta)return!1;return!0},t.prototype.scrollIntoView=function(){return this.updated|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(t.prototype,n),t}(o.d);function y(e,t){return t&&e?e.bind(t):e}var b=function(e,t,n){this.name=e,this.init=y(t.init,n),this.apply=y(t.apply,n)},k=[new b("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new b("selection",{init:function(e,t){return e.selection||a.atStart(t.doc)},apply:function(e){return e.selection}}),new b("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new b("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],w=function(e,t){var n=this;this.schema=e,this.fields=k.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),t&&t.forEach((function(e){if(n.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");n.plugins.push(e),n.pluginsByKey[e.key]=e,e.spec.state&&n.fields.push(new b(e.key,e.spec.state,e))}))},_=function(e){this.config=e},C={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};C.schema.get=function(){return this.config.schema},C.plugins.get=function(){return this.config.plugins},_.prototype.apply=function(e){return this.applyTransaction(e).state},_.prototype.filterTransaction=function(e,t){void 0===t&&(t=-1);for(var n=0;n-1&&x.splice(t,1)},Object.defineProperties(_.prototype,C);var x=[];var S=function(e){this.props={},e.props&&function e(t,n,r){for(var o in t){var i=t[o];i instanceof Function?i=i.bind(n):"handleDOMEvents"==o&&(i=e(i,n,{})),r[o]=i}return r}(e.props,this,this.props),this.spec=e,this.key=e.key?e.key.key:M("plugin")};S.prototype.getState=function(e){return e[this.key]};var E=Object.create(null);function M(e){return e in E?e+"$"+ ++E[e]:(E[e]=0,e+"$")}var O=function(e){void 0===e&&(e="key"),this.key=M(e)};O.prototype.get=function(e){return e.config.pluginsByKey[this.key]},O.prototype.getState=function(e){return e[this.key]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1));t.default=function(e){var t=e.children,n=e.className,o=e.onClick,i=(e.theme,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["children","className","onClick","theme"])),a=i.size?i.size+"px":"24px",s="#4E5C6E";return i.color&&(s=i.color),i.light&&(s="#FFF"),i.black&&(s="#000"),r.createElement("svg",{fill:s,width:a,height:a,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:n,onClick:o},t)}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;ne)break;var c=this.ranges[u+i],f=this.ranges[u+s],d=l+c;if(e<=d){var p=l+r+((c?e==l?-1:e==d?1:t:t)<0?0:f);if(n)return p;var h=u/3+(e-l)*o;return new a(p,t<0?e!=l:e!=d,h)}r+=f-c}return n?e+r:new a(e+r)},s.prototype.touches=function(e,t){for(var n=0,r=i(t),o=this.inverted?2:1,a=this.inverted?1:2,s=0;se)break;var l=this.ranges[s+o];if(e<=u+l&&s==3*r)return!0;n+=this.ranges[s+a]-l}return!1},s.prototype.forEach=function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:null)}},u.prototype.invert=function(){var e=new u;return e.appendMappingInverted(this),e},u.prototype.map=function(e,t){if(void 0===t&&(t=1),this.mirror)return this._map(e,t,!0);for(var n=this.from;ni&&c0},c.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(c.prototype,f);var p=Object.create(null),h=function(){};h.prototype.apply=function(e){return d()},h.prototype.getMap=function(){return s.empty},h.prototype.invert=function(e){return d()},h.prototype.map=function(e){return d()},h.prototype.merge=function(e){return null},h.prototype.toJSON=function(){return d()},h.fromJSON=function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=p[t.stepType];if(!n)throw new RangeError("No step type "+t.stepType+" defined");return n.fromJSON(e,t)},h.jsonID=function(e,t){if(e in p)throw new RangeError("Duplicate use of step JSON ID "+e);return p[e]=t,t.prototype.jsonID=e,t};var m=function(e,t){this.doc=e,this.failed=t};m.ok=function(e){return new m(e,null)},m.fail=function(e){return new m(null,e)},m.fromReplace=function(e,t,n,o){try{return m.ok(e.replace(t,n,o))}catch(i){if(i instanceof r.ReplaceError)return m.fail(i.message);throw i}};var v=function(e){function t(t,n,r,o){e.call(this),this.from=t,this.to=n,this.slice=r,this.structure=!!o}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){return this.structure&&y(e,this.from,this.to)?m.fail("Structure replace would overwrite content"):m.fromReplace(e,this.from,this.to,this.slice)},t.prototype.getMap=function(){return new s([this.from,this.to-this.from,this.slice.size])},t.prototype.invert=function(e){return new t(this.from,this.from+this.slice.size,e.slice(this.from,this.to))},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new t(n.pos,Math.max(n.pos,r.pos),this.slice)},t.prototype.merge=function(e){if(!(e instanceof t)||e.structure!=this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var n=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new t(e.from,this.to,n,this.structure)}var o=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new t(this.from,this.to+(e.to-e.from),o,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new t(n.from,n.to,r.Slice.fromJSON(e,n.slice),!!n.structure)},t}(h);h.jsonID("replace",v);var g=function(e){function t(t,n,r,o,i,a,s){e.call(this),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=!!s}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){if(this.structure&&(y(e,this.from,this.gapFrom)||y(e,this.gapTo,this.to)))return m.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return m.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?m.fromReplace(e,this.from,this.to,n):m.fail("Content does not fit in gap")},t.prototype.getMap=function(){return new s([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},t.prototype.invert=function(e){var n=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return n.deleted&&r.deleted||or.pos?null:new t(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,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 t(n.from,n.to,n.gapFrom,n.gapTo,r.Slice.fromJSON(e,n.slice),n.insert,!!n.structure)},t}(h);function y(e,t,n){for(var r=e.resolve(t),o=n-t,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var a=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}return!1}function b(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function k(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(ni;s--,u--){var l=o.node(s),c=o.index(s);if(l.type.spec.isolating)return!1;var f=l.content.cutByIndex(c,l.childCount),d=r&&r[u]||l;if(d!=l&&(f=f.replaceChild(0,d.type.create(d.attrs))),!l.canReplace(c+1,l.childCount)||!d.type.validContent(f))return!1}var p=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(p,p,h?h.type:o.node(i+1).type)}function x(e,t){var n=e.resolve(t),r=n.index();return S(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function S(e,t){return e&&t&&!e.isLeaf&&e.canAppend(t)}function E(e,t,n){void 0===n&&(n=-1);for(var r=e.resolve(t),o=r.depth;;o--){var i=void 0,a=void 0,s=r.index(o);if(o==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(o+1),s++,a=r.node(o).maybeChild(s)):(i=r.node(o).maybeChild(s-1),a=r.node(o+1)),i&&!i.isTextblock&&S(i,a)&&r.node(o).canReplace(s,s+1))return t;if(0==o)break;t=n<0?r.before(o):r.after(o)}}function M(e,t,n){var r=e.resolve(t);if(!n.content.size)return t;for(var o=n.content,i=0;i=0;s--){var u=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(u>0?1:0);if(1==a?r.node(s).canReplace(l,l,o):r.node(s).contentMatchAt(l).findWrapping(o.firstChild.type))return 0==u?r.pos:u<0?r.before(s+1):r.after(s+1)}return null}function O(e,t,n){for(var o=[],i=0;it;d--)p||n.index(d)>0?(p=!0,c=r.Fragment.from(n.node(d).copy(c)),f++):u--;for(var h=r.Fragment.empty,m=0,v=i,y=!1;v>t;v--)y||o.after(v+1)=0;o--)n=r.Fragment.from(t[o].type.create(t[o].attrs,n));var i=e.start,a=e.end;return this.step(new g(i,a,i,a,new r.Slice(n,0,0),t.length,!0))},c.prototype.setBlockType=function(e,t,n,o){var i=this;if(void 0===t&&(t=e),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var a=this.steps.length;return this.doc.nodesBetween(e,t,(function(e,t){if(e.isTextblock&&!e.hasMarkup(n,o)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(i.doc,i.mapping.slice(a).map(t),n)){i.clearIncompatible(i.mapping.slice(a).map(t,1),n);var s=i.mapping.slice(a),u=s.map(t,1),l=s.map(t+e.nodeSize,1);return i.step(new g(u,l,u+1,l-1,new r.Slice(r.Fragment.from(n.create(o,null,e.marks)),0,0),1,!0)),!1}})),this},c.prototype.setNodeMarkup=function(e,t,n,o){var i=this.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");t||(t=i.type);var a=t.create(n,null,o||i.marks);if(i.isLeaf)return this.replaceWith(e,e+i.nodeSize,a);if(!t.validContent(i.content))throw new RangeError("Invalid content for node type "+t.name);return this.step(new g(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new r.Slice(r.Fragment.from(a),0,0),1,!0))},c.prototype.split=function(e,t,n){void 0===t&&(t=1);for(var o=this.doc.resolve(e),i=r.Fragment.empty,a=r.Fragment.empty,s=o.depth,u=o.depth-t,l=t-1;s>u;s--,l--){i=r.Fragment.from(o.node(s).copy(i));var c=n&&n[l];a=r.Fragment.from(c?c.type.create(c.attrs,a):o.node(s).copy(a))}return this.step(new v(e,e,new r.Slice(i.append(a),t,t),!0))},c.prototype.join=function(e,t){void 0===t&&(t=1);var n=new v(e-t,e+t,r.Slice.empty,!0);return this.step(n)};var L=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),o=e.resolve(this.from),i=o.node(o.sharedDepth(this.to)),a=new r.Slice(O(n.content,(function(e,n){return n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),i),n.openStart,n.openEnd);return m.fromReplace(e,this.from,this.to,a)},t.prototype.invert=function(){return new T(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(h);h.jsonID("addMark",L);var T=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),o=new r.Slice(O(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))})),n.openStart,n.openEnd);return m.fromReplace(e,this.from,this.to,o)},t.prototype.invert=function(){return new L(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(h);function A(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}h.jsonID("removeMark",T),c.prototype.addMark=function(e,t,n){var r=this,o=[],i=[],a=null,s=null;return this.doc.nodesBetween(e,t,(function(r,u,l){if(r.isInline){var c=r.marks;if(!n.isInSet(c)&&l.type.allowsMarkType(n.type)){for(var f=Math.max(u,e),d=Math.min(u+r.nodeSize,t),p=n.addToSet(c),h=0;h=0;p--)this.step(i[p]);return this},c.prototype.replace=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=r.Slice.empty);var o=function(e,t,n,o){if(void 0===n&&(n=t),void 0===o&&(o=r.Slice.empty),t==n&&!o.size)return null;var i=e.resolve(t),a=e.resolve(n);return A(i,a,o)?new v(t,n,o):new D(i,a,o).fit()}(this.doc,e,t,n);return o&&this.step(o),this},c.prototype.replaceWith=function(e,t,n){return this.replace(e,t,new r.Slice(r.Fragment.from(n),0,0))},c.prototype.delete=function(e,t){return this.replace(e,t,r.Slice.empty)},c.prototype.insert=function(e,t){return this.replaceWith(e,e,t)};var D=function(e,t,n){this.$to=t,this.$from=e,this.unplaced=n,this.frontier=[];for(var o=0;o<=e.depth;o++){var i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}this.placed=r.Fragment.empty;for(var a=e.depth;a>0;a--)this.placed=r.Fragment.from(e.node(a).copy(this.placed))},P={depth:{configurable:!0}};function I(e,t,n){return 0==t?e.cutByIndex(n):e.replaceChild(0,e.firstChild.copy(I(e.firstChild.content,t-1,n)))}function N(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(N(e.lastChild.content,t-1,n)))}function R(e,t){for(var n=0;n1&&(o=o.replaceChild(0,j(o.firstChild,t-1,1==o.childCount?n-1:0))),t>0&&(o=e.type.contentMatch.fillBefore(o).append(o),n<=0&&(o=o.append(e.type.contentMatch.matchFragment(o).fillBefore(r.Fragment.empty,!0)))),e.copy(o)}function z(e,t,n,r,o){var i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;var s=r.fillBefore(i.content,!0,a);return s&&!function(e,t,n){for(var r=n;ro){var s=i.contentMatchAt(0),u=s.fillBefore(e).append(e);e=u.append(s.matchFragment(u).fillBefore(r.Fragment.empty,!0))}return e}function B(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var o=e.start(r);if(ot.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;o==t.start(r)&&n.push(r)}return n}P.depth.get=function(){return this.frontier.length-1},D.prototype.fit=function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,o=this.$from,i=t<0?this.$to:o.doc.resolve(t);if(this.close(i)){for(var a=this.placed,s=o.depth,u=i.depth;s&&u&&1==a.childCount;)a=a.firstChild.content,s--,u--;var l=new r.Slice(a,s,u);if(t>-1)return new g(o.pos,t,this.$to.pos,this.$to.end(),l,n);if(l.size||o.pos!=this.$to.pos)return new v(o.pos,i.pos,l)}return null},D.prototype.findFittable=function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var n=void 0,o=(t?(n=R(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,i=this.depth;i>=0;i--){var a=this.frontier[i],s=a.type,u=a.match,l=void 0,c=void 0;if(1==e&&(o?u.matchType(o.type)||(c=u.fillBefore(r.Fragment.from(o),!1)):s.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:i,parent:n,inject:c};if(2==e&&o&&(l=u.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:i,parent:n,wrap:l};if(n&&u.matchType(n.type))break}},D.prototype.openMore=function(){var e=this.unplaced,t=e.content,n=e.openStart,o=e.openEnd,i=R(t,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new r.Slice(t,n+1,Math.max(o,i.size+n>=t.size-o?n+1:0)),!0)},D.prototype.dropNode=function(){var e=this.unplaced,t=e.content,n=e.openStart,o=e.openEnd,i=R(t,n);if(i.childCount<=1&&n>0){var a=t.size-n<=n+i.size;this.unplaced=new r.Slice(I(t,n-1,1),n-1,a?n-1:o)}else this.unplaced=new r.Slice(I(t,n,1),n,o)},D.prototype.placeNodes=function(e){for(var t=e.sliceDepth,n=e.frontierDepth,o=e.parent,i=e.inject,a=e.wrap;this.depth>n;)this.closeFrontierNode();if(a)for(var s=0;s1||0==c||y.content.size)&&(h=b,d.push(j(y.mark(m.allowedMarks(y.marks)),1==f?c:0,f==l.childCount?g:-1)))}var k=f==l.childCount;k||(g=-1),k&&g<0&&o&&o.type==this.frontier[this.depth].type?this.closeFrontierNode():this.frontier[n].match=h;for(var w=0,_=l;w1&&r==this.$to.end(--n);)++r;return r},D.prototype.findCloseLevel=function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],r=n.match,o=z(e,t,n.type,r,!1);if(o){for(var i=t-1;i>=0;i--){var a=this.frontier[i],s=a.match,u=z(e,i,a.type,s,!0);if(!u||u.childCount)continue e}return{depth:t,fit:o}}}},D.prototype.close=function(e){var t=this.findCloseLevel(e);if(!t)return!1;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=N(this.placed,t.depth,t.fit));for(var n=t.depth+1;n<=e.depth;n++){var r=e.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,o)}return!0},D.prototype.openFrontierNode=function(e,t,n){var o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=N(this.placed,this.depth,r.Fragment.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})},D.prototype.closeFrontierNode=function(){var e=this.frontier.pop().match.fillBefore(r.Fragment.empty,!0);e.childCount&&(this.placed=N(this.placed,this.frontier.length,e))},Object.defineProperties(D.prototype,P),c.prototype.replaceRange=function(e,t,n){if(!n.size)return this.deleteRange(e,t);var o=this.doc.resolve(e),i=this.doc.resolve(t);if(A(o,i,n))return this.step(new v(e,t,n));var a=B(o,this.doc.resolve(t));0==a[a.length-1]&&a.pop();var s=-(o.depth+1);a.unshift(s);for(var u=o.depth,l=o.pos-1;u>0;u--,l--){var c=o.node(u).type.spec;if(c.defining||c.isolating)break;a.indexOf(u)>-1?s=u:o.before(u)==l&&a.splice(1,0,-u)}for(var f=a.indexOf(s),d=[],p=n.openStart,h=n.content,m=0;;m++){var g=h.firstChild;if(d.push(g),m==n.openStart)break;h=g.content}p>0&&d[p-1].type.spec.defining&&o.node(f).type!=d[p-1].type?p-=1:p>=2&&d[p-1].isTextblock&&d[p-2].type.spec.defining&&o.node(f).type!=d[p-2].type&&(p-=2);for(var y=n.openStart;y>=0;y--){var b=(y+p+1)%(n.openStart+1),k=d[b];if(k)for(var w=0;w=0&&(this.replace(e,t,n),!(this.steps.length>E));M--){var O=a[M];M<0||(e=o.before(O),t=i.after(O))}return this},c.prototype.replaceRangeWith=function(e,t,n){if(!n.isInline&&e==t&&this.doc.resolve(e).parent.content.size){var o=function(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;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 a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s0&&(s||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return this.delete(n.before(a),r.after(a))}for(var u=1;u<=n.depth&&u<=r.depth;u++)if(e-n.start(u)==n.depth-u&&t>n.end(u)&&r.end(u)-t!=r.depth-u)return this.delete(n.before(u),t);return this.delete(e,t)}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return r.call(e,t)}function i(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!==(65535&e)&&65534!==(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),l=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,c=n(88);var f=/[&<>"]/,d=/[&<>"]/g,p={"&":"&","<":"<",">":">",'"':"""};function h(e){return p[e]}var m=/[.?*+^$[\]\\(){}|-]/g;var v=n(52);t.lib={},t.lib.mdurl=n(89),t.lib.ucmicro=n(320),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!==typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=o,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(u,(function(e,t,n){return t||function(e,t){var n=0;return o(c,t)?c[t]:35===t.charCodeAt(0)&&l.test(t)&&i(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(n):e}(e,n)}))},t.isValidEntityCode=i,t.fromCodePoint=a,t.escapeHtml=function(e){return f.test(e)?e.replace(d,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return v.test(e)},t.escapeRE=function(e){return e.replace(m,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"\u1e7e"==="\u1e9e".toLowerCase()&&(e=e.replace(/\u1e9e/g,"\xdf")),e.toLowerCase().toUpperCase()}},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"toMarkdown",value:function(e,t){console.error("toMarkdown not implemented",e,t)}},{key:"parseMarkdown",value:function(){}},{key:"type",get:function(){return"node"}},{key:"markdownToken",get:function(){return""}}]),n}(s(n(19)).default);t.default=u},function(e,t,n){e.exports=n(201)()},function(e,t,n){"use strict";n.r(t),n.d(t,"Decoration",(function(){return St})),n.d(t,"DecorationSet",(function(){return Lt})),n.d(t,"EditorView",(function(){return Bt})),n.d(t,"__endComposition",(function(){return mt})),n.d(t,"__parseFromClipboard",(function(){return Be})),n.d(t,"__serializeForClipboard",(function(){return Fe}));var r=n(2),o=n(0),i=n(8),a={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var s=/Edge\/(\d+)/.exec(navigator.userAgent),u=/MSIE \d/.test(navigator.userAgent),l=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);a.mac=/Mac/.test(navigator.platform);var c=a.ie=!!(u||l||s);a.ie_version=u?document.documentMode||6:l?+l[1]:s?+s[1]:null,a.gecko=!c&&/gecko\/(\d+)/i.test(navigator.userAgent),a.gecko_version=a.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var f=!c&&/Chrome\/(\d+)/.exec(navigator.userAgent);a.chrome=!!f,a.chrome_version=f&&+f[1],a.ios=!c&&/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),a.android=/Android \d/.test(navigator.userAgent),a.webkit="webkitFontSmoothing"in document.documentElement.style,a.safari=/Apple Computer/.test(navigator.vendor),a.webkit_version=a.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var d=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},p=function(e){var t=e.parentNode;return t&&11==t.nodeType?t.host:t},h=null,m=function(e,t,n){var r=h||(h=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},v=function(e,t,n,r){return n&&(y(e,t,n,r,-1)||y(e,t,n,r,1))},g=/^(img|br|input|textarea|hr)$/i;function y(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:b(e))){var i=e.parentNode;if(1!=i.nodeType||k(e)||g.test(e.nodeName)||"false"==e.contentEditable)return!1;t=d(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?b(e):0}}}function b(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function k(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var w=function(e){var t=e.isCollapsed;return t&&a.chrome&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function _(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function C(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function x(e,t){return"number"==typeof e?e:e[t]}function S(e){var t=e.getBoundingClientRect();return{left:t.left,right:t.left+e.clientWidth,top:t.top,bottom:t.top+e.clientHeight}}function E(e,t,n){for(var r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument,a=n||e.dom;a;a=p(a))if(1==a.nodeType){var s=a==i.body||1!=a.nodeType,u=s?C(i):S(a),l=0,c=0;if(t.topu.bottom-x(r,"bottom")&&(c=t.bottom-u.bottom+x(o,"bottom")),t.leftu.right-x(r,"right")&&(l=t.right-u.right+x(o,"right")),l||c)if(s)i.defaultView.scrollBy(l,c);else{var f=a.scrollLeft,d=a.scrollTop;c&&(a.scrollTop+=c),l&&(a.scrollLeft+=l);var h=a.scrollLeft-f,m=a.scrollTop-d;t={left:t.left-h,top:t.top-m,right:t.right-h,bottom:t.bottom-m}}if(s)break}}function M(e){for(var t=[],n=e.ownerDocument;e&&(t.push({dom:e,top:e.scrollTop,left:e.scrollLeft}),e!=n);e=p(e));return t}function O(e,t){for(var n=0;n=s){a=Math.max(d.bottom,a),s=Math.min(d.top,s);var p=d.left>t.left?d.left-t.left:d.right=(d.left+d.right)/2?1:0));continue}}!n&&(t.left>=d.right&&t.top>=d.top||t.left>=d.left&&t.top>=d.bottom)&&(i=l+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:T(n,r)}function A(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function D(e,t){var n,r,o,i,s=e.root;if(s.caretPositionFromPoint)try{var u=s.caretPositionFromPoint(t.left,t.top);u&&(o=(n=u).offsetNode,i=n.offset)}catch(v){}if(!o&&s.caretRangeFromPoint){var l=s.caretRangeFromPoint(t.left,t.top);l&&(o=(r=l).startContainer,i=r.startOffset)}var c,f=s.elementFromPoint(t.left,t.top+1);if(!f||!e.dom.contains(1!=f.nodeType?f.parentNode:f)){var d=e.dom.getBoundingClientRect();if(!A(t,d))return null;if(!(f=function e(t,n,r){var o=t.childNodes.length;if(o&&r.topt.top&&i++}o==e.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&t.top>o.lastChild.getBoundingClientRect().bottom?c=e.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(c=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right-1?o:e.docView.posFromDOM(t,n)}(e,o,i,t))}null==c&&(c=function(e,t,n){var r=T(t,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(o,i,a)}(e,f,t));var m=e.docView.nearestDesc(f,!0);return{pos:c,inside:m?m.posAtStart-m.border:-1}}function P(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var I=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function N(e,t,n){var r=e.docView.domFromPos(t),o=r.node,i=r.offset,s=e.state.doc.resolve(t),u=s.parent.inlineContent,l=a.webkit||a.gecko;if(3==o.nodeType&&l&&I.test(o.nodeValue)){var c=P(m(o,i,i),n);if(a.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i=0&&i==b(o)&&o!=h;)i=d(o)+1,o=o.parentNode}if(3==o.nodeType)return n<0?R(P(m(o,i-1,i),1),!1):R(P(m(o,i,i+1),-1),!0);if(!u){if(i&&(n<0||i==b(o))){var v=o.childNodes[i-1];if(1==v.nodeType)return j(v.getBoundingClientRect(),!1)}if(i=0)}if(i&&(n<0||i==b(o))){var y=o.childNodes[i-1],k=3==y.nodeType?m(y,b(y)-(l?0:1)):1==y.nodeType&&"BR"!=y.nodeName?y:null;if(k)return R(P(k,1),!1)}if(i=0)}function R(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function j(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function z(e,t,n){var r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}var F=/[\u0590-\u08ac]/;var B=null,$=null,q=!1;function V(e,t,n){return B==t&&$==n?q:(B=t,$=n,q="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$anchor.min(r.$head):r.$anchor.max(r.$head);return z(e,t,(function(){for(var t=e.docView.domFromPos(o.pos).node;;){var r=e.docView.nearestDesc(t,!0);if(!r)break;if(r.node.isBlock){t=r.dom;break}t=r.dom.parentNode}for(var i=N(e,o.pos,1),a=t.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=m(a,0,a.nodeValue.length).getClientRects()}for(var u=0;ul.top&&("up"==n?l.bottomi.bottom-1))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=getSelection();return F.test(r.parent.textContent)&&s.modify?z(e,t,(function(){var t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var u=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),u})):"left"==n||"backward"==n?i:a}(e,t,n))}var H=function(e,t,n,r){this.parent=e,this.children=t,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},U={beforePosition:{configurable:!0},size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0}};H.prototype.matchesWidget=function(){return!1},H.prototype.matchesMark=function(){return!1},H.prototype.matchesNode=function(){return!1},H.prototype.matchesHack=function(){return!1},U.beforePosition.get=function(){return!1},H.prototype.parseRule=function(){return null},H.prototype.stopEvent=function(){return!1},U.size.get=function(){for(var e=0,t=0;t0:s)?this.posAtEnd:this.posAtStart},H.prototype.nearestDesc=function(e,t){for(var n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(1==e.nodeType?e:e.parentNode):o.nodeDOM==e))return o;n=!1}}},H.prototype.getDesc=function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t},H.prototype.posFromDOM=function(e,t,n){for(var r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1},H.prototype.descAt=function(e){for(var t=0,n=0;t=l&&t<=u-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,l);e=i;for(var c=a;c>0;c--){var f=this.children[c-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=d(f.dom)+1;break}e-=f.size}-1==r&&(r=0)}if(r>-1&&(u>t||a==this.children.length-1)){t=u;for(var p=a+1;pu&&it){var y=f;f=d,d=y}var b=document.createRange();b.setEnd(d.node,d.offset),b.setStart(f.node,f.offset),p.removeAllRanges(),p.addRange(b)}}},H.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},U.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},H.prototype.markDirty=function(e,t){for(var n=0,r=0;r=n:en){var a=n+o.border,s=i-o.border;if(e>=a&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=a||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=3}n=i}this.dirty=2},H.prototype.markParentsDirty=function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?2:1;t.dirty0&&(i=fe(i,0,e,r));for(var s=0;si;)l.push(o[u++]);var y=i+m.nodeSize;if(m.isText){var b=y;u=0&&!s&&u.syncToMarks(a==n.node.childCount?o.Mark.none:n.node.child(a).marks,r,e),u.placeWidget(t,e,i)}),(function(t,n,o,a){u.syncToMarks(t.marks,r,e),u.findNodeMatch(t,n,o,a)||u.updateNextNode(t,n,o,e,a)||u.addNode(t,n,o,e,i),i+=t.nodeSize})),u.syncToMarks(Z,r,e),this.node.isTextblock&&u.addTextblockHacks(),u.destroyRest(),(u.changed||2==this.dirty)&&(s&&this.protectLocalComposition(e,s),function e(t,n,r){for(var o=t.firstChild,i=!1,a=0;at+this.node.content.size)){var a=e.root.getSelection(),s=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];e=e.childNodes[t-1],t=b(e)}else{if(!(1==e.nodeType&&t=n){var c=u.lastIndexOf(t,r-s);if(c>=0&&c+t.length+s>=n)return s+c}}}return-1}(this.node.content,u,o-t,i-t);return l<0?null:{node:s,pos:l,text:u}}}},t.prototype.protectLocalComposition=function(e,t){var n=t.node,r=t.pos,o=t.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 a=new K(this,i,n,o);e.compositionNodes.push(a),this.children=fe(this.children,r,r+o.length,e,a)}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)},t.prototype.updateInner=function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0},t.prototype.updateOuterDeco=function(e){if(!se(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=oe(this.dom,this.nodeDOM,re(this.outerDeco,this.node,t),re(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=e}},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")},Object.defineProperties(t.prototype,n),t}(H);function Y(e,t,n,r,o){return ae(r,t,e),new J(null,e,t,n,r,r,r,o,0)}var Q=function(e){function t(t,n,r,o,i,a,s){e.call(this,t,n,r,o,i,null,a,s)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.parseRule=function(){for(var e=this.nodeDOM.parentNode;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)},t.prototype.inParent=function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1},t.prototype.domFromPos=function(e){return{node:this.nodeDOM,offset:e}},t.prototype.localPosFromDOM=function(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):e.prototype.localPosFromDOM.call(this,t,n,r)},t.prototype.ignoreMutation=function(e){return"characterData"!=e.type&&"selection"!=e.type},t.prototype.slice=function(e,n,r){var o=this.node.cut(e,n),i=document.createTextNode(o.text);return new t(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)},t}(J),X=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.matchesHack=function(){return 0==this.dirty},t}(H),ee=function(e){function t(t,n,r,o,i,a,s,u,l,c){e.call(this,t,n,r,o,i,a,s,l,c),this.spec=u}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.update=function(t,n,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(t,n);return i&&this.updateInner(t,n,r,o),i}return!(!this.contentDOM&&!t.isLeaf)&&e.prototype.update.call(this,t,n,r,o)},t.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():e.prototype.selectNode.call(this)},t.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():e.prototype.deselectNode.call(this)},t.prototype.setSelection=function(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r):e.prototype.setSelection.call(this,t,n,r,o)},t.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),e.prototype.destroy.call(this)},t.prototype.stopEvent=function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)},t.prototype.ignoreMutation=function(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):e.prototype.ignoreMutation.call(this,t)},t}(J);function te(e){e&&(this.nodeName=e)}te.prototype=Object.create(null);var ne=[new te];function re(e,t,n){if(0==e.length)return ne;for(var r=n?ne[0]:new te,o=[r],i=0;i0&&o>=0;o--){var i=t[o],a=i.node;if(a){if(a!=e.child(r-1))break;n.push(i),--r}}return{nodes:n.reverse(),offset:r}}(e.node.content,e.children);this.preMatched=n.nodes,this.preMatchOffset=n.offset};function ce(e,t){return e.type.side-t.type.side}function fe(e,t,n,r,o){for(var i=[],a=0,s=0;a=n||c<=t?i.push(u):(ln&&i.push(u.slice(n-l,u.size,r)))}return i}function de(e,t){var n=e.root.getSelection(),o=e.state.doc;if(!n.focusNode)return null;var i=e.docView.nearestDesc(n.focusNode),a=i&&0==i.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset);if(s<0)return null;var u,l,c=o.resolve(s);if(w(n)){for(u=c;i&&!i.node;)i=i.parent;if(i&&i.node.isAtom&&r.NodeSelection.isSelectable(i.node)&&i.parent&&(!i.node.isInline||!function(e,t,n){for(var r=0==t,o=t==b(e);r||o;){if(e==n)return!0;var i=d(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==b(e)}}(n.focusNode,n.focusOffset,i.dom))){var f=i.posBefore;l=new r.NodeSelection(s==f?c:o.resolve(f))}}else{var p=e.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(p<0)return null;u=o.resolve(p)}l||(l=ke(e,u,c,"pointer"==t||e.state.selection.head=this.preMatchOffset?this.preMatched[e-this.preMatchOffset]:null},le.prototype.destroyBetween=function(e,t){if(e!=t){for(var n=e;n>1,i=Math.min(o,e.length);r-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var u=G.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,o++}},le.prototype.findNodeMatch=function(e,t,n,r){var o=-1,i=r<0?void 0:this.getPreMatch(r),a=this.top.children;if(i&&i.matchesNode(e,t,n))o=a.indexOf(i);else for(var s=this.index,u=Math.min(a.length,s+5);s-1&&s+this.preMatchOffset!=o)return!1;var u=a.dom;if(!(this.lock&&(u==this.lock||1==u.nodeType&&u.contains(this.lock.parentNode))&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&se(t,a.outerDeco)))&&a.update(e,t,n,r))return this.destroyBetween(this.index,i),a.dom!=u&&(this.changed=!0),this.index++,!0;break}}return!1},le.prototype.addNode=function(e,t,n,r,o){this.top.children.splice(this.index++,0,J.create(this.top,e,t,n,r,o)),this.changed=!0},le.prototype.placeWidget=function(e,t,n){var r=this.index0?o.max(i):o.min(i),s=a.parent.inlineContent?a.depth?e.doc.resolve(t>0?a.after():a.before()):null:a;return s&&r.Selection.findFrom(s,t)}function Ce(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function xe(e,t,n){var o=e.state.selection;if(!(o instanceof r.TextSelection)){if(o instanceof r.NodeSelection&&o.node.isInline)return Ce(e,new r.TextSelection(t>0?o.$to:o.$from));var i=_e(e.state,t);return!!i&&Ce(e,i)}if(!o.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var s=_e(e.state,t);return!!(s&&s instanceof r.NodeSelection)&&Ce(e,s)}if(!(a.mac&&n.indexOf("m")>-1)){var u,l=o.$head,c=l.textOffset?null:t<0?l.nodeBefore:l.nodeAfter;if(!c||c.isText)return!1;var f=t<0?l.pos-c.nodeSize:l.pos;return!!(c.isAtom||(u=e.docView.descAt(f))&&!u.contentDOM)&&(r.NodeSelection.isSelectable(c)?Ce(e,new r.NodeSelection(t<0?e.state.doc.resolve(l.pos-c.nodeSize):l)):!!a.webkit&&Ce(e,new r.TextSelection(e.state.doc.resolve(t<0?f:f+c.nodeSize))))}}function Se(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Ee(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Me(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,s=!1;for(a.gecko&&1==n.nodeType&&r0){if(1!=n.nodeType)break;var u=n.childNodes[r-1];if(Ee(u))o=n,i=--r;else{if(3!=u.nodeType)break;r=(n=u).nodeValue.length}}else{if(Le(n))break;for(var l=n.previousSibling;l&&Ee(l);)o=n.parentNode,i=d(l),l=l.previousSibling;if(l)r=Se(n=l);else{if((n=n.parentNode)==e.dom)break;r=0}}s?Te(e,t,n,r):o&&Te(e,t,o,i)}}function Oe(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=Se(n);;)if(r-1)return!1;if(a.mac&&n.indexOf("m")>-1)return!1;var i=o.$from,s=o.$to;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var u=_e(e.state,t);if(u&&u instanceof r.NodeSelection)return Ce(e,u)}if(!i.parent.inlineContent){var l=r.Selection.findFrom(t<0?i:s,t);return!l||Ce(e,l)}return!1}function De(e,t){if(!(e.state.selection instanceof r.TextSelection))return!0;var n=e.state.selection,o=n.$head,i=n.$anchor,a=n.empty;if(!o.sameParent(i))return!0;if(!a)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var s=!o.textOffset&&(t<0?o.nodeBefore:o.nodeAfter);if(s&&!s.isText){var u=e.state.tr;return t<0?u.delete(o.pos-s.nodeSize,o.pos):u.delete(o.pos,o.pos+s.nodeSize),e.dispatch(u),!0}return!1}function Pe(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Ie(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||a.mac&&72==n&&"c"==r?De(e,-1)||Me(e):46==n||a.mac&&68==n&&"c"==r?De(e,1)||Oe(e):13==n||27==n||(37==n?xe(e,-1,r)||Me(e):39==n?xe(e,1,r)||Oe(e):38==n?Ae(e,-1,r)||Me(e):40==n?function(e){if(a.safari&&!(e.state.selection.$head.parentOffset>0)){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;Pe(e,o,!0),setTimeout((function(){return Pe(e,o,!1)}),20)}}}(e)||Ae(e,1,r)||Oe(e):r==(a.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function Ne(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(a.safari&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||a.safari&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0}}function Re(e,t,n,i,s){if(t<0){var u=e.lastSelectionTime>Date.now()-50?e.lastSelectionOrigin:null,l=de(e,u);if(l&&!e.state.selection.eq(l)){var c=e.state.tr.setSelection(l);"pointer"==u?c.setMeta("pointer",!0):"key"==u&&c.scrollIntoView(),e.dispatch(c)}}else{var f=e.state.doc.resolve(t),d=f.sharedDepth(n);t=f.before(d+1),n=e.state.doc.resolve(n).after(d+1);var p,h,m=e.state.selection,v=function(e,t,n){var r=e.docView.parseRange(t,n),i=r.node,s=r.fromOffset,u=r.toOffset,l=r.from,c=r.to,f=e.root.getSelection(),d=null,p=f.anchorNode;if(p&&e.dom.contains(1==p.nodeType?p:p.parentNode)&&(d=[{node:p,offset:f.anchorOffset}],w(f)||d.push({node:f.focusNode,offset:f.focusOffset})),a.chrome&&8===e.lastKeyCode)for(var h=u;h>s;h--){var m=i.childNodes[h-1],v=m.pmViewDesc;if("BR"==m.nodeType&&!v){u=h;break}if(!v||v.size)break}var g=e.state.doc,y=e.someProp("domParser")||o.DOMParser.fromSchema(e.state.schema),b=g.resolve(l),k=null,_=y.parse(i,{topNode:b.parent,topMatch:b.parent.contentMatchAt(b.index()),topOpen:!0,from:s,to:u,preserveWhitespace:!b.parent.type.spec.code||"full",editableContent:!0,findPositions:d,ruleFromNode:Ne,context:b});if(d&&null!=d[0].pos){var C=d[0].pos,x=d[1]&&d[1].pos;null==x&&(x=C),k={anchor:C+l,head:x+l}}return{doc:_,sel:k,from:l,to:c}}(e,t,n),g=e.state.doc,y=g.slice(v.from,v.to);8===e.lastKeyCode&&Date.now()-100=s?i-r:0)+(u-s),s=i}else if(u=u?i-r:0)+(s-u),u=i}return{start:i,endA:s,endB:u}}(y.content,v.doc.content,v.from,p,h);if(!b){if(!(i&&m instanceof r.TextSelection&&!m.empty&&m.$head.sameParent(m.$anchor))||e.composing||v.sel&&v.sel.anchor!=v.sel.head){if(v.sel){var k=je(e,e.state.doc,v.sel);k&&!k.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(k))}return}b={start:m.from,endA:m.to,endB:m.to}}e.domChangeCount++,e.state.selection.frome.state.selection.from&&b.start<=e.state.selection.from+2?b.start=e.state.selection.from:b.endA=e.state.selection.to-2&&(b.endB+=e.state.selection.to-b.endA,b.endA=e.state.selection.to)),a.ie&&a.ie_version<=11&&b.endB==b.start+1&&b.endA==b.start&&b.start>v.from&&" \xa0"==v.doc.textBetween(b.start-v.from-1,b.start-v.from+1)&&(b.start--,b.endA--,b.endB--);var C,x=v.doc.resolveNoCache(b.start-v.from),S=v.doc.resolveNoCache(b.endB-v.from),E=x.sameParent(S)&&x.parent.inlineContent;if((a.ios&&e.lastIOSEnter>Date.now()-225&&(!E||s.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!E&&x.posb.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||ze(r,!0,!1)n||ze(a,!0,!1)t.content.size?null:ke(e,t.resolve(n.anchor),t.resolve(n.head))}function ze(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}function Fe(e,t){for(var n=[],r=t.content,i=t.openStart,a=t.openEnd;i>1&&a>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,a--;var s=r.firstChild;n.push(s.type.name,s.attrs!=s.type.defaultAttrs?s.attrs:null),r=s.content}var u=e.someProp("clipboardSerializer")||o.DOMSerializer.fromSchema(e.state.schema),l=Ue(),c=l.createElement("div");c.appendChild(u.serializeFragment(r,{document:l}));for(var f,d=c.firstChild;d&&1==d.nodeType&&(f=Ve[d.nodeName.toLowerCase()]);){for(var p=f.length-1;p>=0;p--){for(var h=l.createElement(f[p]);c.firstChild;)h.appendChild(c.firstChild);c.appendChild(h)}d=c.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice",i+" "+a+" "+JSON.stringify(n)),{dom:c,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function Be(e,t,n,r,i){var a,s,u=i.parent.type.spec.code;if(!n&&!t)return null;var l=t&&(r||u||!n);if(l){if(e.someProp("transformPastedText",(function(e){t=e(t,u||r)})),u)return new o.Slice(o.Fragment.from(e.state.schema.text(t)),0,0);var c=e.someProp("clipboardTextParser",(function(e){return e(t,i,r)}));c?s=c:(a=document.createElement("div"),t.trim().split(/(?:\r\n?|\n)+/).forEach((function(e){a.appendChild(document.createElement("p")).textContent=e})))}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),a=function(e){var t=/(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=Ue().createElement("div"),o=/(?:]*>)*<([a-z][^>\s]+)/i.exec(e),i=0;(n=o&&Ve[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return""})).reverse().join(""),i=n.length);r.innerHTML=e;for(var a=0;a=0;u-=2){var l=r.nodes[n[u]];if(!l||l.hasRequiredAttrs())break;i=o.Fragment.from(l.create(n[u+1],i)),a++,s++}return new o.Slice(i,a,s)}(function(e,t,n){t=0;r--){var i=n(r);if(i)return i.v}return e}(s.content,i),!1),e.someProp("transformPasted",(function(e){s=e(s)})),s}function $e(e,t,n){void 0===n&&(n=0);for(var r=t.length-1;r>=n;r--)e=t[r].create(null,o.Fragment.from(e));return e}function qe(e,t,n,r,i,a){var s=t<0?e.firstChild:e.lastChild,u=s.content;return i=n&&(u=t<0?s.contentMatchAt(0).fillBefore(u,e.childCount>1||a<=i).append(u):u.append(s.contentMatchAt(s.childCount).fillBefore(o.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(u))}var Ve={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},He=null;function Ue(){return He||(He=document.implementation.createHTMLDocument("title"))}var Ze={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},We=a.ie&&a.ie_version<=11,Ke=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};Ke.prototype.set=function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset},Ke.prototype.eq=function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset};var Ge=function(e,t){var n=this;this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;te.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new Ke,We&&(this.onCharData=function(e){n.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};Ge.prototype.flushSoon=function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))},Ge.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},Ge.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Ze),We&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Ge.prototype.stop=function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&we(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,s=[];if(this.view.editable)for(var u=0;u1){var c=s.filter((function(e){return"BR"==e.nodeName}));if(2==c.length){var f=c[0],d=c[1];f.parentNode&&f.parentNode.parentNode==d.parentNode?d.remove():f.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(Je)return;Je=!0,"normal"==getComputedStyle(e.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(t)||pe(this.view))}},Ge.prototype.registerMutation=function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){var r=e.previousSibling,o=e.nextSibling;if(a.ie&&a.ie_version<=11&&e.addedNodes.length)for(var i=0;ii.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var u=a(s);if(u)return u.v}return!1}function ot(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function it(e,t,n,o,i){return rt(e,"handleClickOn",t,n,o)||e.someProp("handleClick",(function(n){return n(e,t,o)}))||(i?function(e,t){if(-1==t)return!1;var n,o,i=e.state.selection;i instanceof r.NodeSelection&&(n=i.node);for(var a=e.state.doc.resolve(t),s=a.depth+1;s>0;s--){var u=s>a.depth?a.nodeAfter:a.node(s);if(r.NodeSelection.isSelectable(u)){o=n&&i.$from.depth>0&&s>=i.$from.depth&&a.before(i.$from.depth+1)==i.$from.pos?a.before(i.$from.depth):a.before(s);break}}return null!=o&&(ot(e,r.NodeSelection.create(e.state.doc,o),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),o=n.nodeAfter;return!!(o&&o.isAtom&&r.NodeSelection.isSelectable(o))&&(ot(e,new r.NodeSelection(n),"pointer"),!0)}(e,n))}function at(e,t,n,r){return rt(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function st(e,t,n,o){return rt(e,"handleTripleClickOn",t,n,o)||e.someProp("handleTripleClick",(function(n){return n(e,t,o)}))||function(e,t){var n=e.state.doc;if(-1==t)return!!n.inlineContent&&(ot(e,r.TextSelection.create(n,0,n.content.size),"pointer"),!0);for(var o=n.resolve(t),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)ot(e,r.TextSelection.create(n,s+1,s+1+a.content.size),"pointer");else{if(!r.NodeSelection.isSelectable(a))continue;ot(e,r.NodeSelection.create(n,s),"pointer")}return!0}}(e,n)}function ut(e){return mt(e)}Qe.keydown=function(e,t){if(e.shiftKey=16==t.keyCode||t.shiftKey,!ft(e,t))if(e.domObserver.forceFlush(),e.lastKeyCode=t.keyCode,e.lastKeyCodeTime=Date.now(),!a.ios||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",(function(n){return n(e,t)}))||Ie(e,t)?t.preventDefault():Xe(e,"key");else{var n=Date.now();e.lastIOSEnter=n,e.lastIOSEnterFallbackTimeout=setTimeout((function(){e.lastIOSEnter==n&&(e.someProp("handleKeyDown",(function(t){return t(e,_(13,"Enter"))})),e.lastIOSEnter=0)}),200)}},Qe.keyup=function(e,t){16==t.keyCode&&(e.shiftKey=!1)},Qe.keypress=function(e,t){if(!(ft(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||a.mac&&t.metaKey))if(e.someProp("handleKeyPress",(function(n){return n(e,t)})))t.preventDefault();else{var n=e.state.selection;if(!(n instanceof r.TextSelection)||!n.$from.sameParent(n.$to)){var o=String.fromCharCode(t.charCode);e.someProp("handleTextInput",(function(t){return t(e,n.$from.pos,n.$to.pos,o)}))||e.dispatch(e.state.tr.insertText(o).scrollIntoView()),t.preventDefault()}}};var lt=a.mac?"metaKey":"ctrlKey";Ye.mousedown=function(e,t){e.shiftKey=t.shiftKey;var n=ut(e),r=Date.now(),o="singleClick";r-e.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(t,e.lastClick)&&!t[lt]&&("singleClick"==e.lastClick.type?o="doubleClick":"doubleClick"==e.lastClick.type&&(o="tripleClick")),e.lastClick={time:r,x:t.clientX,y:t.clientY,type:o};var i=e.posAtCoords(nt(t));i&&("singleClick"==o?e.mouseDown=new ct(e,i,t,n):("doubleClick"==o?at:st)(e,i.pos,i.inside,t)?t.preventDefault():Xe(e,"pointer"))};var ct=function(e,t,n,o){var i,s,u=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=n,this.flushed=o,this.selectNode=n[lt],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),s=t.inside;else{var l=e.state.doc.resolve(t.pos);i=l.parent,s=l.depth?l.before():0}this.mightDrag=null;var c=o?null:n.target,f=c?e.docView.nearestDesc(c,!0):null;this.target=f?f.dom:null,(i.type.spec.draggable&&!1!==i.type.spec.selectable||e.state.selection instanceof r.NodeSelection&&s==e.state.selection.from)&&(this.mightDrag={node:i,pos:s,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&a.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){return u.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Xe(e,"pointer")};function ft(e,t){return!!e.composing||!!(a.safari&&Math.abs(t.timeStamp-e.compositionEndedAt)<500)&&(e.compositionEndedAt=-2e8,!0)}ct.prototype.done=function(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.view.mouseDown=null},ct.prototype.up=function(e){if(this.done(),this.view.dom.contains(3==e.target.nodeType?e.target.parentNode:e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(nt(e))),this.allowDefault||!t?Xe(this.view,"pointer"):it(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():this.flushed||a.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||a.chrome&&!(this.view.state.selection instanceof r.TextSelection)&&(t.pos==this.view.state.selection.from||t.pos==this.view.state.selection.to)?(ot(this.view,r.Selection.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Xe(this.view,"pointer")}},ct.prototype.move=function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),Xe(this.view,"pointer")},Ye.touchdown=function(e){ut(e),Xe(e,"pointer")},Ye.contextmenu=function(e){return ut(e)};var dt=a.android?5e3:-1;function pt(e,t){clearTimeout(e.composingTimeout),t>-1&&(e.composingTimeout=setTimeout((function(){return mt(e)}),t))}function ht(e){for(e.composing=!1;e.compositionNodes.length>0;)e.compositionNodes.pop().markParentsDirty()}function mt(e,t){if(e.domObserver.forceFlush(),ht(e),t||e.docView.dirty){var n=de(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}Qe.compositionstart=Qe.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),mt(e,!0),e.markCursor=null;else if(mt(e),a.gecko&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.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}e.composing=!0}pt(e,dt)},Qe.compositionend=function(e,t){e.composing&&(e.composing=!1,e.compositionEndedAt=t.timeStamp,pt(e,20))};var vt=a.ie&&a.ie_version<15||a.ios&&a.webkit_version<604;function gt(e,t,n,r){var i=Be(e,t,n,e.shiftKey,e.state.selection.$from);if(!e.someProp("handlePaste",(function(t){return t(e,r,i||o.Slice.empty)}))&&i){var a=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(i),s=a?e.state.tr.replaceSelectionWith(a,e.shiftKey):e.state.tr.replaceSelection(i);e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste"))}}Ye.copy=Qe.cut=function(e,t){var n=e.state.selection,r="cut"==t.type;if(!n.empty){var o=vt?null:t.clipboardData,i=Fe(e,n.content()),a=i.dom,s=i.text;o?(t.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",s)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}(e,a),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Qe.paste=function(e,t){var n=vt?null:t.clipboardData,r=n&&n.getData("text/html"),o=n&&n.getData("text/plain");n&&(r||o||n.files.length)?(gt(e,o,r,t),t.preventDefault()):function(e,t){if(e.dom.parentNode){var n=e.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.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(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?gt(e,r.value,null,t):gt(e,r.textContent,r.innerHTML,t)}),50)}}(e,t)};var yt=function(e,t){this.slice=e,this.move=t},bt=a.mac?"altKey":"ctrlKey";for(var kt in Ye.dragstart=function(e,t){var n=e.mouseDown;if(n&&n.done(),t.dataTransfer){var o=e.state.selection,i=o.empty?null:e.posAtCoords(nt(t));if(i&&i.pos>=o.from&&i.pos<=(o instanceof r.NodeSelection?o.to-1:o.to));else if(n&&n.mightDrag)e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,n.mightDrag.pos)));else if(t.target&&1==t.target.nodeType){var a=e.docView.nearestDesc(t.target,!0);if(!a||!a.node.type.spec.draggable||a==e.docView)return;e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),u=Fe(e,s),l=u.dom,c=u.text;t.dataTransfer.clearData(),t.dataTransfer.setData(vt?"Text":"text/html",l.innerHTML),vt||t.dataTransfer.setData("text/plain",c),e.dragging=new yt(s,!t[bt])}},Ye.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},Qe.dragover=Qe.dragenter=function(e,t){return t.preventDefault()},Qe.drop=function(e,t){var n=e.dragging;if(e.dragging=null,t.dataTransfer){var a=e.posAtCoords(nt(t));if(a){var s=e.state.doc.resolve(a.pos);if(s){var u=n&&n.slice||Be(e,t.dataTransfer.getData(vt?"Text":"text/plain"),vt?null:t.dataTransfer.getData("text/html"),!1,s),l=n&&!t[bt];if(e.someProp("handleDrop",(function(n){return n(e,t,u||o.Slice.empty,l)})))t.preventDefault();else if(u){t.preventDefault();var c=u?Object(i.g)(e.state.doc,s.pos,u):s.pos;null==c&&(c=s.pos);var f=e.state.tr;l&&f.deleteSelection();var d=f.mapping.map(c),p=0==u.openStart&&0==u.openEnd&&1==u.content.childCount,h=f.doc;if(p?f.replaceRangeWith(d,d,u.content.firstChild):f.replaceRange(d,d,u),!f.doc.eq(h)){var m=f.doc.resolve(d);if(p&&r.NodeSelection.isSelectable(u.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(u.content.firstChild))f.setSelection(new r.NodeSelection(m));else{var v=f.mapping.map(c);f.mapping.maps[f.mapping.maps.length-1].forEach((function(e,t,n,r){return v=r})),f.setSelection(ke(e,m,f.doc.resolve(v)))}e.focus(),e.dispatch(f.setMeta("uiEvent","drop"))}}}}}},Ye.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.root.getSelection())&&pe(e)}),20))},Ye.blur=function(e){e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),e.domObserver.currentSelection.set({}),e.focused=!1)},Ye.beforeinput=function(e,t){if(a.chrome&&a.android&&"deleteContentBackward"==t.inputType){var n=e.domChangeCount;setTimeout((function(){if(e.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,_(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},Qe)Ye[kt]=Qe[kt];function wt(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var _t=function(e,t){this.spec=t||Ot,this.side=this.spec.side||0,this.toDOM=e};_t.prototype.map=function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new St(i-n,i-n,this)},_t.prototype.valid=function(){return!0},_t.prototype.eq=function(e){return this==e||e instanceof _t&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&wt(this.spec,e.spec))};var Ct=function(e,t){this.spec=t||Ot,this.attrs=e};Ct.prototype.map=function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new St(o,i,this)},Ct.prototype.valid=function(e,t){return t.from=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;se){var u=this.children[s]+1;this.children[s+2].findInner(e-u,t-u,n,r+u,o)}},Lt.prototype.map=function(e,t,n){return this==Tt||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Ot)},Lt.prototype.mapInner=function(e,t,n,r,o){for(var i,a=0;au+i||(t>=s[a]+i?s[a+1]=-1:n>=o&&(l=r-n-(t-e))&&(s[a]+=l,s[a+1]+=l))}},l=0;l=r.content.size){c=!0;continue}var h=n.map(e[f+1]+i,-1)-o,m=r.content.findIndex(p),v=m.index,g=m.offset,y=r.maybeChild(v);if(y&&g==p&&g+y.nodeSize==h){var b=s[f+2].mapInner(n,y,d+1,e[f]+i+1,a);b!=Tt?(s[f]=p,s[f+1]=h,s[f+2]=b):(s[f+1]=-2,c=!0)}else c=!0}if(c){var k=Nt(function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;ia&&l.to=e){this.children[o]==e&&(n=this.children[o+2]);break}for(var i=e+1,a=i+t.content.size,s=0;si&&u.type instanceof Ct){var l=Math.max(i,u.from)-i,c=Math.min(a,u.to)-i;ln&&a.to0;)t++;e.splice(t,0,n)}function Ft(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=Tt&&t.push(r)})),e.cursorWrapper&&t.push(Lt.create(e.state.doc,[e.cursorWrapper.deco])),At.from(t)}At.prototype.forChild=function(e,t){if(t.isLeaf)return Lt.empty;for(var n=[],r=0;ro.scrollToSelection?"to selection":"preserve",d=i||!this.docView.matchesNode(e.doc,c,l);!d&&e.selection.eq(o.selection)||(s=!0);var p="preserve"==f&&s&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a=o-20){t=s,n=u.top;break}}}return{refDOM:t,refTop:n,stack:M(e.dom)}}(this);if(s){this.domObserver.stop();var h=d&&(a.ie||a.chrome)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&function(e,t){var n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(o.selection,e.selection);if(d){var m=a.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!i&&this.docView.update(e.doc,c,l,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Y(e.doc,c,l,this.dom,this)),m&&!this.trackWrites&&(h=!0)}h||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&function(e){var t=e.docView.domFromPos(e.state.selection.anchor),n=e.root.getSelection();return v(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?pe(this,h):(ye(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(o),"reset"==f)this.dom.scrollTop=0;else if("to selection"==f){var g=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(e){return e(n)}))||(e.selection instanceof r.NodeSelection?E(this,this.docView.domAfterPos(e.selection.from).getBoundingClientRect(),g):E(this,this.coordsAtPos(e.selection.head,1),g))}else p&&function(e){var t=e.refDOM,n=e.refTop,r=e.stack,o=t?t.getBoundingClientRect().top:0;O(r,0==o?0:o-n)}(p)},Bt.prototype.destroyPluginViews=function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()},Bt.prototype.updatePluginViews=function(e){if(e&&e.plugins==this.state.plugins)for(var t=0;t0&&(i=t[0].slice(a-s,a)+i,r=o)}return e.tr.insertText(i,r,o)}):t};function a(e){var t=e.rules,n=new r.Plugin({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,r,o,i){return s(e,r,o,i,t,n)},handleDOMEvents:{compositionend:function(e){setTimeout((function(){var r=e.state.selection.$cursor;r&&s(e,r.pos,r.pos,"",t,n)}))}}},isInputRules:!0});return n}function s(e,t,n,r,o,i){if(e.composing)return!1;var a=e.state,s=a.doc.resolve(t);if(s.parent.type.spec.code)return!1;for(var u=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,null,"\ufffc")+r,l=0;l=0;u--)a.step(s.steps[u].invert(s.docs[u]));if(i.text){var l=a.doc.resolve(i.from).marks();a.replaceWith(i.from,i.to,e.schema.text(i.text,l))}else a.delete(i.from,i.to);t(a)}return!0}}return!1}var l=new i(/--$/,"\u2014"),c=new i(/\.\.\.$/,"\u2026"),f=new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"\u201c"),d=new i(/"$/,"\u201d"),p=new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"\u2018"),h=new i(/'$/,"\u2019"),m=[f,d,p,h];function v(e,t,n,r){return new i(e,(function(e,i,a,s){var u=n instanceof Function?n(i):n,l=e.tr.delete(a,s),c=l.doc.resolve(a).blockRange(),f=c&&Object(o.h)(c,t,u);if(!f)return null;l.wrap(c,f);var d=l.doc.resolve(a-1).nodeBefore;return d&&d.type==t&&Object(o.e)(l.doc,a-1)&&(!r||r(i,d))&&l.join(a-1),l}))}function g(e,t,n){return new i(e,(function(e,r,o,i){var a=e.doc.resolve(o),s=n instanceof Function?n(r):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t)?e.tr.delete(o,i).setBlockType(o,o,t,s):null}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"autoJoin",(function(){return T})),n.d(t,"baseKeymap",(function(){return j})),n.d(t,"chainCommands",(function(){return A})),n.d(t,"createParagraphNear",(function(){return k})),n.d(t,"deleteSelection",(function(){return a})),n.d(t,"exitCode",(function(){return b})),n.d(t,"joinBackward",(function(){return s})),n.d(t,"joinDown",(function(){return m})),n.d(t,"joinForward",(function(){return f})),n.d(t,"joinUp",(function(){return h})),n.d(t,"lift",(function(){return v})),n.d(t,"liftEmptyBlock",(function(){return w})),n.d(t,"macBaseKeymap",(function(){return N})),n.d(t,"newlineInCode",(function(){return g})),n.d(t,"pcBaseKeymap",(function(){return I})),n.d(t,"selectAll",(function(){return S})),n.d(t,"selectNodeBackward",(function(){return l})),n.d(t,"selectNodeForward",(function(){return d})),n.d(t,"selectParentNode",(function(){return x})),n.d(t,"setBlockType",(function(){return O})),n.d(t,"splitBlock",(function(){return _})),n.d(t,"splitBlockKeepMarks",(function(){return C})),n.d(t,"toggleMark",(function(){return L})),n.d(t,"wrapIn",(function(){return M}));var r=n(8),o=n(0),i=n(2);function a(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)}function s(e,t,n){var o=e.selection.$cursor;if(!o||(n?!n.endOfTextblock("backward",e):o.parentOffset>0))return!1;var a=c(o);if(!a){var s=o.blockRange(),l=s&&Object(r.j)(s);return null!=l&&(t&&t(e.tr.lift(s,l).scrollIntoView()),!0)}var f=a.nodeBefore;if(!f.type.spec.isolating&&E(e,a,t))return!0;if(0==o.parent.content.size&&(u(f,"end")||i.NodeSelection.isSelectable(f))){if(t){var d=e.tr.deleteRange(o.before(),o.after());d.setSelection(u(f,"end")?i.Selection.findFrom(d.doc.resolve(d.mapping.map(a.pos,-1)),-1):i.NodeSelection.create(d.doc,a.pos-f.nodeSize)),t(d.scrollIntoView())}return!0}return!(!f.isAtom||a.depth!=o.depth-1)&&(t&&t(e.tr.delete(a.pos-f.nodeSize,a.pos).scrollIntoView()),!0)}function u(e,t){for(;e;e="start"==t?e.firstChild:e.lastChild)if(e.isTextblock)return!0;return!1}function l(e,t,n){var r=e.selection,o=r.$head,a=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):o.parentOffset>0)return!1;a=c(o)}var s=a&&a.nodeBefore;return!(!s||!i.NodeSelection.isSelectable(s))&&(t&&t(e.tr.setSelection(i.NodeSelection.create(e.doc,a.pos-s.nodeSize)).scrollIntoView()),!0)}function c(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function f(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){var n=e.node(t);if(e.index(t)+11&&n.after()!=n.end(-1)){var o=n.before();if(Object(r.f)(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}var i=n.blockRange(),a=i&&Object(r.j)(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}function _(e,t){var n=e.selection,a=n.$from,s=n.$to;if(e.selection instanceof i.NodeSelection&&e.selection.node.isBlock)return!(!a.parentOffset||!Object(r.f)(e.doc,a.pos))&&(t&&t(e.tr.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(t){var u=s.parentOffset==s.parent.content.size,l=e.tr;e.selection instanceof i.TextSelection&&l.deleteSelection();var c=0==a.depth?null:y(a.node(-1).contentMatchAt(a.indexAfter(-1))),f=u&&c?[{type:c}]:null,d=Object(r.f)(l.doc,l.mapping.map(a.pos),1,f);f||d||!Object(r.f)(l.doc,l.mapping.map(a.pos),1,c&&[{type:c}])||(f=[{type:c}],d=!0),d&&(l.split(l.mapping.map(a.pos),1,f),u||a.parentOffset||a.parent.type==c||!a.node(-1).canReplace(a.index(-1),a.indexAfter(-1),o.Fragment.from(c.create(),a.parent))||l.setNodeMarkup(l.mapping.map(a.before()),c)),t(l.scrollIntoView())}return!0}function C(e,t){return _(e,t&&function(n){var r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&n.ensureMarks(r),t(n)})}function x(e,t){var n,r=e.selection,o=r.$from,a=r.to,s=o.sharedDepth(a);return 0!=s&&(n=o.before(s),t&&t(e.tr.setSelection(i.NodeSelection.create(e.doc,n))),!0)}function S(e,t){return t&&t(e.tr.setSelection(new i.AllSelection(e.doc))),!0}function E(e,t,n){var a,s,u=t.nodeBefore,l=t.nodeAfter;if(u.type.spec.isolating||l.type.spec.isolating)return!1;if(function(e,t,n){var o=t.nodeBefore,i=t.nodeAfter,a=t.index();return!!(o&&i&&o.type.compatibleContent(i.type))&&(!o.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-o.nodeSize,t.pos).scrollIntoView()),!0):!(!t.parent.canReplace(a,a+1)||!i.isTextblock&&!Object(r.e)(e.doc,t.pos))&&(n&&n(e.tr.clearIncompatible(t.pos,o.type,o.contentMatchAt(o.childCount)).join(t.pos).scrollIntoView()),!0))}(e,t,n))return!0;if(t.parent.canReplace(t.index(),t.index()+1)&&(a=(s=u.contentMatchAt(u.childCount)).findWrapping(l.type))&&s.matchType(a[0]||l.type).validEnd){if(n){for(var c=t.pos+l.nodeSize,f=o.Fragment.empty,d=a.length-1;d>=0;d--)f=o.Fragment.from(a[d].create(null,f));f=o.Fragment.from(u.copy(f));var p=e.tr.step(new r.b(t.pos-1,c,t.pos,c,new o.Slice(f,1,0),a.length,!0)),h=c+2*a.length;Object(r.e)(p.doc,h)&&p.join(h),n(p.scrollIntoView())}return!0}var m=i.Selection.findFrom(t,1),v=m&&m.$from.blockRange(m.$to),g=v&&Object(r.j)(v);return null!=g&&g>=t.depth&&(n&&n(e.tr.lift(v,g).scrollIntoView()),!0)}function M(e,t){return function(n,o){var i=n.selection,a=i.$from,s=i.$to,u=a.blockRange(s),l=u&&Object(r.h)(u,e,t);return!!l&&(o&&o(n.tr.wrap(u,l).scrollIntoView()),!0)}}function O(e,t){return function(n,r){var o=n.selection,i=o.from,a=o.to,s=!1;return n.doc.nodesBetween(i,a,(function(r,o){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{var i=n.doc.resolve(o),a=i.index();s=i.parent.canReplaceWith(a,a+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(i,a,e,t).scrollIntoView()),!0)}}function L(e,t){return function(n,r){var o=n.selection,i=o.empty,a=o.$cursor,s=o.ranges;if(i&&!a||!function(e,t,n){for(var r=function(r){var o=t[r],i=o.$from,a=o.$to,s=0==i.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(i.pos,a.pos,(function(e){if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return{v:!0}},o=0;o-1}}return function(n,o){return e(n,o&&function(e,t){return function(n){if(!n.isGeneric)return e(n);for(var o=[],i=0;i=0;b--)Object(r.e)(n.doc,u[b])&&n.join(u[b]);e(n)}}(o,t))}}function A(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return function(t,n,r){for(var o=0;o1?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var O=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(w))return r}}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(w,"active"),r.setAttribute("data-styled-version","5.2.0");var a=E();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},L=function(){function e(e){var t=this.element=O(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&M(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i=N&&(N=t+1),P.set(e,t),I.set(t,e)},F="style["+w+'][data-styled-version="5.2.0"]',B=new RegExp("^"+w+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),$=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i0&&(l+=e+",")})),r+=""+s+u+'{content:"'+l+'"}/*!sc*/\n'}}}return r}(this)},e}(),Z=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},W=function(e){return Z(5381,e)},K=/^\s*\/\/.*$/gm,G=[":","[",".","#"];function J(e){var t,n,r,o,i=void 0===e?g:e,a=i.options,s=void 0===a?g:a,l=i.plugins,c=void 0===l?v:l,f=new u.a(s),d=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,s,u,l,c,f){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===l)return r+"/*|*/";break;case 3:switch(l){case 102:case 112:return e(o[0]+r),"";default:return r+(0===f?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){d.push(e)})),h=function(e,r,i){return 0===r&&G.includes(i[n.length])||i.match(o)?e:"."+t};function m(e,i,a,s){void 0===s&&(s="&");var u=e.replace(K,""),l=i&&a?a+" "+i+" { "+u+" }":u;return t=s,n=i,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),f(a||!i?"":i,l)}return f.use([].concat(c,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,h))},p,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=c.length?c.reduce((function(e,t){return t.name||M(15),Z(e,t.name)}),5381).toString():"",m}var Y=i.a.createContext(),Q=Y.Consumer,X=i.a.createContext(),ee=(X.Consumer,new U),te=J();function ne(){return Object(o.useContext)(Y)||ee}function re(){return Object(o.useContext)(X)||te}function oe(e){var t=Object(o.useState)(e.stylisPlugins),n=t[0],r=t[1],a=ne(),u=Object(o.useMemo)((function(){var t=a;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=Object(o.useMemo)((function(){return J({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return Object(o.useEffect)((function(){s()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),i.a.createElement(Y.Provider,{value:u},i.a.createElement(X.Provider,{value:l},e.children))}var ie=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=te);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return M(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=te),this.name+e.hash},e}(),ae=/([A-Z])/,se=new RegExp(ae,"g"),ue=/^ms-/,le=function(e){return"-"+e.toLowerCase()};function ce(e){return ae.test(e)?e.replace(se,le).replace(ue,"-ms-"):e}var fe=function(e){return null==e||!1===e||""===e};function de(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a1?t-1:0),r=1;r1?t-1:0),r=1;r25?39:97))};function ke(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=be(t%52)+n;return(be(t%52)+n).replace(ye,"$1-$2")}function we(e){for(var t=0;t>>0);if(!t.hasNameForId(r,a)){var s=n(i,"."+a,void 0,r);t.insertRules(r,a,s)}o.push(a),this.staticRulesId=a}else{for(var u=this.rules.length,l=Z(this.baseHash,n.hash),c="",f=0;f>>0);if(!t.hasNameForId(r,m)){var v=n(c,"."+m,void 0,r);t.insertRules(r,m,v)}o.push(m)}}return o.join(" ")},e}(),xe=(new Set,function(e,t,n){return void 0===n&&(n=g),e.theme!==n.theme&&e.theme||t||n.theme}),Se=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Ee=/(^-|-$)/g;function Me(e){return e.replace(Se,"-").replace(Ee,"")}function Oe(e){return"string"==typeof e&&!0}var Le=function(e){return ke(W(e)>>>0)},Te=i.a.createContext(),Ae=Te.Consumer;function De(e){var t=Object(o.useContext)(Te),n=Object(o.useMemo)((function(){return function(e,t){return e?y(e)?e(t):Array.isArray(e)||"object"!=typeof e?M(8):t?p({},t,{},e):e:M(14)}(e.theme,t)}),[e.theme,t]);return e.children?i.a.createElement(Te.Provider,{value:n},e.children):null}var Pe={};function Ie(e,t,n){var r=k(e),a=!Oe(e),s=t.displayName,u=void 0===s?function(e){return Oe(e)?"styled."+e:"Styled("+b(e)+")"}(e):s,l=t.componentId,f=void 0===l?function(e,t){var n="string"!=typeof e?"sc":Me(e);Pe[n]=(Pe[n]||0)+1;var r=n+"-"+Le("5.2.0"+n+Pe[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):l,h=t.attrs,m=void 0===h?v:h,w=t.displayName&&t.componentId?Me(t.displayName)+"-"+t.componentId:t.componentId||f,_=r&&e.attrs?Array.prototype.concat(e.attrs,m).filter(Boolean):m,C=t.shouldForwardProp;r&&e.shouldForwardProp&&(C=C?function(n,r){return e.shouldForwardProp(n,r)&&t.shouldForwardProp(n,r)}:e.shouldForwardProp);var x,S=new Ce(n,w,r?e.componentStyle:void 0),E=function(e,t){return function(e,t,n){var r=e.attrs,i=e.componentStyle,a=e.defaultProps,s=e.foldedComponentIds,u=e.shouldForwardProp,l=e.styledComponentId,f=e.target,d=function(e,t,n){void 0===e&&(e=g);var r=p({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,i,a=e;for(t in y(a)&&(a=a(r)),a)r[t]=o[t]="className"===t?(n=o[t],i=a[t],n&&i?n+" "+i:n||i):a[t]})),[r,o]}(xe(t,Object(o.useContext)(Te),a)||g,t,r),h=d[0],m=d[1],v=function(e,t,n,r){var o=ne(),i=re();return e.isStatic&&!t?e.generateAndInjectStyles(g,o,i):e.generateAndInjectStyles(n,o,i)}(i,r.length>0,h),b=n,k=m.$as||t.$as||m.as||t.as||f,w=Oe(k),_=m!==t?p({},t,{},m):t,C=u||w&&c.a,x={};for(var S in _)"$"!==S[0]&&"as"!==S&&("forwardedAs"===S?x.as=_[S]:C&&!C(S,c.a)||(x[S]=_[S]));return t.style&&m.style!==t.style&&(x.style=p({},t.style,{},m.style)),x.className=Array.prototype.concat(s,l,v!==l?v:null,t.className,m.className).filter(Boolean).join(" "),x.ref=b,Object(o.createElement)(k,x)}(x,e,t)};return E.displayName=u,(x=i.a.forwardRef(E)).attrs=_,x.componentStyle=S,x.displayName=u,x.shouldForwardProp=C,x.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):v,x.styledComponentId=w,x.target=r?e.target:e,x.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(t,["componentId"]),i=r&&r+"-"+(Oe(e)?e:Me(b(e)));return Ie(e,p({},o,{attrs:_,componentId:i}),n)},Object.defineProperty(x,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?ge({},e.defaultProps,t):t}}),x.toString=function(){return"."+x.styledComponentId},a&&d()(x,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,self:!0,styledComponentId:!0,target:!0,withComponent:!0}),x}var Ne=function(e){return function e(t,n,o){if(void 0===o&&(o=g),!Object(r.isValidElementType)(n))return M(1,String(n));var i=function(){return t(n,o,pe.apply(void 0,arguments))};return i.withConfig=function(r){return e(t,n,p({},o,{},r))},i.attrs=function(r){return e(t,n,p({},o,{attrs:Array.prototype.concat(o.attrs,r).filter(Boolean)}))},i}(Ie,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Ne[e]=Ne(e)}));var Re=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=we(e),U.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(de(this.rules,t,n,r).join(""),""),i=this.componentId+e;n.insertRules(i,i,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&U.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function je(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r"+t+""},this.getStyleTags=function(){return e.sealed?M(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return M(2);var n=((t={})[w]="",t["data-styled-version"]="5.2.0",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=E();return r&&(n.nonce=r),[i.a.createElement("style",p({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new U({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?M(2):i.a.createElement(oe,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return M(3)},e}(),Be=function(e){var t=i.a.forwardRef((function(t,n){var r=Object(o.useContext)(Te),a=e.defaultProps,s=xe(t,r,a);return i.a.createElement(e,p({},t,{theme:s,ref:n}))}));return d()(t,e),t.displayName="WithTheme("+b(e)+")",t},$e=function(){return Object(o.useContext)(Te)},qe={StyleSheet:U,masterSheet:ee};t.default=Ne}.call(this,n(72))},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}}(),e.exports=n(147)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(0),i=n(39),a=function(e,t){return function(n){Array.isArray(e)||(e=[e]);for(var r=0,o=e.length;r1&&void 0!==arguments[1]?arguments[1]:1;return function(n){var o=r.Selection.findFrom(n.doc.resolve(e),t,!0);return o?n.setSelection(o):n}},l=function(e){return e.type&&e.type.spec.selectable},c=function(e,t,n){return function(e){return l(e)&&e.type.isLeaf}(e)?n.setSelection(new r.NodeSelection(n.doc.resolve(t))):u(t)(n)},f=function(e,t,n){return function(r){var o="number"===typeof t,i=r.selection.$from,u=o?r.doc.resolve(t):d(r.selection)?r.doc.resolve(i.pos+1):i,f=u.parent;if(d(r.selection)&&n&&r!==(r=s(e)(r)))return r;if(k(f)&&r!==(r=a(f.type,e)(r))){var p=l(e)?u.before(u.depth):u.pos;return c(e,p,r)}if(b(u,e)){r.insert(u.pos,e);var m=o?u.pos:l(e)?r.selection.$anchor.pos-1:r.selection.$anchor.pos;return h(c(e,m,r))}for(var v=u.depth;v>0;v--){var g=u.after(v),y=r.doc.resolve(g);if(b(y,e))return r.insert(g,e),h(c(e,g,r))}return r}},d=function(e){return e instanceof r.NodeSelection},p=function(e,t){return Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e},h=function(e){return Object.assign(Object.create(e),e).setTime(Date.now())},m=function(e,t){return function(n){var r=n.doc.nodeAt(e),o=n.doc.resolve(e);if(v(o,t)){var i=(n=n.replaceWith(e,e+r.nodeSize,t)).selection.$from.pos-1;return n=u(Math.max(i,0),-1)(n),n=u(n.selection.$from.start())(n),h(n)}return n}},v=function(e,t){var n=e.node(e.depth);return n&&n.type.validContent(t instanceof o.Fragment?t:o.Fragment.from(t))},g=function(e){return function(t){var n=t.doc.nodeAt(e);return h(t.delete(e,e+n.nodeSize))}},y=function(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;var t={};return Object.keys(e.nodes).forEach((function(n){var r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)})),e.cached.tableNodeTypes=t,t},b=function(e,t){var n=e.index();return t instanceof o.Fragment?e.parent.canReplace(n,n,t):t instanceof o.Node&&e.parent.canReplaceWith(n,n,t.type)},k=function(e){return!e||"paragraph"===e.type.name&&2===e.nodeSize},w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t?e.createChecked(null,t):e.createAndFill()},_=function(e){return function(t){for(var n=i.TableMap.get(t.$anchorCell.node(-1)),r=t.$anchorCell.start(-1),o=n.cellsInRect(e),a=n.cellsInRect(n.rectBetween(t.$anchorCell.pos-r,t.$headCell.pos-r)),s=0,u=o.length;sn[0]?-1:1,i=e.splice(t[0],t.length),a=i.length%2===0?1:0,s=void 0;return s=-1===r&&1===o?n[0]-1:1===r&&-1===o?n[n.length-1]-a+1:-1===o?n[0]:n[n.length-1]-a,e.splice.apply(e,[s,0].concat(i)),e},M=function(e,t,n,r){var o="Target position is invalid, you can't move the "+r+" "+e+" to "+t+", the target can't be split. You could use tryToFit option.";if(1===(e>t?-1:1)){if(-1!==n.slice(0,n.length-1).indexOf(t))throw new Error(o)}else if(-1!==n.slice(1).indexOf(t))throw new Error(o);return!0},O=function(e){return function(t){var n=t.$from;return L(n,e)}},L=function(e,t){for(var n=e.depth;n>0;n--){var r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}},T=function(e,t){return function(n){var r=O(e)(n);if(r)return I(r.pos,t)}},A=function(e){return function(t){return!!O(e)(t)}},D=function(e){return function(t){return O((function(t){return p(e,t)}))(t)}},P=function(e){var t=e.$from.nodeBefore,n=r.Selection.findFrom(e.$from,-1);if(n&&t){var o=D(t.type)(n);return o?o.pos:n.$from.pos}},I=function(e,t){var n=t(e),r=n.node.childNodes[n.offset];return n.node.nodeType===Node.TEXT_NODE?n.node.parentNode:r&&r.nodeType!==Node.TEXT_NODE?r:n.node},N=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw new Error('Invalid "node" parameter');var n=[];return e.descendants((function(e,r){if(n.push({node:e,pos:r}),!t)return!1})),n},R=function(e,t,n){if(!e)throw new Error('Invalid "node" parameter');if(!t)throw new Error('Invalid "predicate" parameter');return N(e,n).filter((function(e){return t(e.node)}))},j=function(e,t,n){return R(e,(function(e){return e.type===t}),n)};var z=function(e){return O((function(e){return e.type.spec.tableRole&&"table"===e.type.spec.tableRole}))(e)},F=function(e){return e instanceof i.CellSelection},B=function(e){if(F(e)){var t=i.TableMap.get(e.$anchorCell.node(-1));return _({left:0,right:t.width,top:0,bottom:t.height})(e)}return!1},$=function(e){return function(t){var n=z(t);if(n){var r=i.TableMap.get(n.node);return(Array.isArray(e)?e:Array.from([e])).reduce((function(e,t){if(t>=0&&t<=r.width-1){var o=r.cellsInRect({left:t,right:t+1,top:0,bottom:r.height});return e.concat(o.map((function(e){var t=n.node.nodeAt(e),r=e+n.start;return{pos:r,start:r+1,node:t}})))}}),[])}}},q=function(e){return function(t){var n=z(t);if(n){var r=i.TableMap.get(n.node);return(Array.isArray(e)?e:Array.from([e])).reduce((function(e,t){if(t>=0&&t<=r.height-1){var o=r.cellsInRect({left:0,right:r.width,top:t,bottom:t+1});return e.concat(o.map((function(e){var t=n.node.nodeAt(e),r=e+n.start;return{pos:r,start:r+1,node:t}})))}}),[])}}},V=function(e){return function(t,n){return function(r){var o=z(r.selection),a="row"===e;if(o){var s=i.TableMap.get(o.node);if(t>=0&&t<(a?s.height:s.width)){var u=a?0:t,l=a?t:0,c=a?s.width:t+1,f=a?t+1:s.height;if(n){var d=Y(r.selection.$from);if(!d)return r;var p=s.findCell(d.pos-o.start);a?(l=Math.min(l,p.top),f=Math.max(f,p.bottom)):(u=Math.min(u,p.left),c=Math.max(c,p.right))}var m=s.cellsInRect({left:u,top:l,right:a?c:u+1,bottom:a?l+1:f}),v=f-l===1?m:s.cellsInRect({left:a?u:c-1,top:a?f-1:l,right:c,bottom:f}),g=o.start+m[0],y=o.start+v[v.length-1],b=r.doc.resolve(g),k=r.doc.resolve(y);return h(r.setSelection(new i.CellSelection(k,b)))}}return r}}},H=V("column"),U=V("row"),Z=function(e){return function(t){var n=z(t.selection);if(n){var r=i.TableMap.get(n.node);if(e>=0&&e<=r.height){for(var o=n.node,a=y(o.type.schema),s=n.start,u=0;u1&&n+o>e}))(t);p.push.apply(p,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=0;m--)h(m);p.length&&p.forEach((function(e){t=J(e,{rowspan:e.node.attrs.rowspan+1})(t)}))}return f(a.row.create(l.attrs,c),s)(t)}}return t}},W=function(e){return function(t){var n=z(t.selection);if(n){var r=i.TableMap.get(n.node);if(0===e&&1===r.width)return G(t);if(e>=0&&e<=r.width)return i.removeColumn(t,{map:r,tableStart:n.start,table:n.node},e),h(t)}return t}},K=function(e){return function(t){var n=z(t.selection);if(n){var r=i.TableMap.get(n.node);if(0===e&&1===r.height)return G(t);if(e>=0&&e<=r.height)return i.removeRow(t,{map:r,tableStart:n.start,table:n.node},e),h(t)}return t}},G=function(e){for(var t=e.selection.$from,n=t.depth;n>0;n--){if("table"===t.node(n).type.spec.tableRole)return h(e.delete(t.before(n),t.after(n)))}return e},J=function(e,t){return function(n){return e?(n.setNodeMarkup(e.pos,null,Object.assign({},e.node.attrs,t)),h(n)):n}},Y=function(e){return L(e,(function(e){return e.type.spec.tableRole&&/cell/i.test(e.type.spec.tableRole)}))},Q=function(e){var t=Y(e);if(t){var n=function(e){return L(e,(function(e){return e.type.spec.tableRole&&/table/i.test(e.type.spec.tableRole)}))}(e),r=i.TableMap.get(n.node),o=t.pos-n.start;return r.rectBetween(o,o)}},X=function(e,t){return function(n){var r=[],o=q(e)(n.selection);if(o)for(var i=o.length-1;i>=0;i--)t(o[i],n)&&r.push(o[i]);return r}},ee=function(e){return function(t){for(var n=e,r=e,o=function(e){var o=$(e)(t.selection);o&&o.forEach((function(t){var o=t.node.attrs.colspan+e-1;o>=n&&(n=e),o>r&&(r=o)}))},i=e;i>=0;i--)o(i);var a=function(e){var n=$(e)(t.selection);n&&n.forEach((function(t){var n=t.node.attrs.colspan+e-1;t.node.attrs.colspan>1&&n>r&&(r=n)}))};for(i=e;i<=r;i++)a(i);var s=[];for(i=n;i<=r;i++){var u=$(i)(t.selection);u&&u.length&&s.push(i)}n=s[0],r=s[s.length-1];for(var l=$(n)(t.selection),c=q(0)(t.selection),f=t.doc.resolve(l[l.length-1].pos),d=void 0,p=r;p>=n;p--){var h=$(p)(t.selection);if(h&&h.length){for(var m=c.length-1;m>=0;m--)if(c[m].pos===h[0].pos){d=h[0];break}if(d)break}}return{$anchor:f,$head:t.doc.resolve(d.pos),indexes:s}}},te=function(e){return function(t){for(var n=e,r=e,o=function(e){q(e)(t.selection).forEach((function(t){var o=t.node.attrs.rowspan+e-1;o>=n&&(n=e),o>r&&(r=o)}))},i=e;i>=0;i--)o(i);var a=function(e){q(e)(t.selection).forEach((function(t){var n=t.node.attrs.rowspan+e-1;t.node.attrs.rowspan>1&&n>r&&(r=n)}))};for(i=e;i<=r;i++)a(i);var s=[];for(i=n;i<=r;i++){var u=q(i)(t.selection);u&&u.length&&s.push(i)}n=s[0],r=s[s.length-1];for(var l=q(n)(t.selection),c=$(0)(t.selection),f=t.doc.resolve(l[l.length-1].pos),d=void 0,p=r;p>=n;p--){var h=q(p)(t.selection);if(h&&h.length){for(var m=c.length-1;m>=0;m--)if(c[m].pos===h[0].pos){d=h[0];break}if(d)break}}return{$anchor:f,$head:t.doc.resolve(d.pos),indexes:s}}};t.isNodeSelection=d,t.canInsert=b,t.convertTableNodeToArrayOfRows=x,t.convertArrayOfRowsToTableNode=S,t.findParentNode=O,t.findParentNodeClosestToPos=L,t.findParentDomRef=T,t.hasParentNode=A,t.findParentNodeOfType=D,t.findParentNodeOfTypeClosestToPos=function(e,t){return L(e,(function(e){return p(t,e)}))},t.hasParentNodeOfType=function(e){return function(t){return A((function(t){return p(e,t)}))(t)}},t.findParentDomRefOfType=function(e,t){return function(n){return T((function(t){return p(e,t)}),t)(n)}},t.findSelectedNodeOfType=function(e){return function(t){if(d(t)){var n=t.node,r=t.$from;if(p(e,n))return{node:n,pos:r.pos,depth:r.depth}}}},t.findPositionOfNodeBefore=P,t.findDomRefAtPos=I,t.flatten=N,t.findChildren=R,t.findTextNodes=function(e,t){return R(e,(function(e){return e.isText}),t)},t.findInlineNodes=function(e,t){return R(e,(function(e){return e.isInline}),t)},t.findBlockNodes=function(e,t){return R(e,(function(e){return e.isBlock}),t)},t.findChildrenByAttr=function(e,t,n){return R(e,(function(e){return!!t(e.attrs)}),n)},t.findChildrenByType=j,t.findChildrenByMark=function(e,t,n){return R(e,(function(e){return t.isInSet(e.marks)}),n)},t.contains=function(e,t){return!!j(e,t).length},t.findTable=z,t.isCellSelection=F,t.getSelectionRect=function(e){if(F(e)){var t=e.$anchorCell.start(-1);return i.TableMap.get(e.$anchorCell.node(-1)).rectBetween(e.$anchorCell.pos-t,e.$headCell.pos-t)}},t.isColumnSelected=function(e){return function(t){if(F(t)){var n=i.TableMap.get(t.$anchorCell.node(-1));return _({left:e,right:e+1,top:0,bottom:n.height})(t)}return!1}},t.isRowSelected=function(e){return function(t){if(F(t)){var n=i.TableMap.get(t.$anchorCell.node(-1));return _({left:0,right:n.width,top:e,bottom:e+1})(t)}return!1}},t.isTableSelected=B,t.getCellsInColumn=$,t.getCellsInRow=q,t.getCellsInTable=function(e){var t=z(e);if(t){var n=i.TableMap.get(t.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map((function(e){var n=t.node.nodeAt(e),r=e+t.start;return{pos:r,start:r+1,node:n}}))}},t.selectColumn=H,t.selectRow=U,t.selectTable=function(e){var t=z(e.selection);if(t){var n=i.TableMap.get(t.node).map;if(n&&n.length){var r=t.start+n[0],o=t.start+n[n.length-1],a=e.doc.resolve(r),s=e.doc.resolve(o);return h(e.setSelection(new i.CellSelection(s,a)))}}return e},t.emptyCell=function(e,t){return function(n){if(e){var r=y(t).cell.createAndFill().content;if(!e.node.content.eq(r))return n.replaceWith(e.pos+1,e.pos+e.node.nodeSize,r),h(n)}return n}},t.addColumnAt=function(e){return function(t){var n=z(t.selection);if(n){var r=i.TableMap.get(n.node);if(e>=0&&e<=r.width)return h(i.addColumn(t,{map:r,tableStart:n.start,table:n.node},e))}return t}},t.moveRow=function(e,t,n){return function(r){var o=Object.assign({tryToFit:!1,direction:0},n),i=z(r.selection);if(!i)return r;var a=te(e)(r).indexes,s=te(t)(r).indexes;if(a.indexOf(t)>-1)return r;!o.tryToFit&&s.length>1&&M(e,t,s,"row");var u=function(e,t,n,r){var o=x(e.node);return o=E(o,t,n,r),S(e.node,o)}(i,a,s,o.direction);return h(r).replaceWith(i.pos,i.pos+i.node.nodeSize,u)}},t.moveColumn=function(e,t,n){return function(r){var o=Object.assign({tryToFit:!1,direction:0},n),i=z(r.selection);if(!i)return r;var a=ee(e)(r).indexes,s=ee(t)(r).indexes;if(a.indexOf(t)>-1)return r;!o.tryToFit&&s.length>1&&M(e,t,s,"column");var u=function(e,t,n,r){var o=C(x(e.node));return o=E(o,t,n,r),o=C(o),S(e.node,o)}(i,a,s,o.direction);return h(r).replaceWith(i.pos,i.pos+i.node.nodeSize,u)}},t.addRowAt=function(e,t){return function(n){var r=z(n.selection);if(r){var o=i.TableMap.get(r.node),a=e-1;if(t&&a>=0)return h(Z(a)(n));if(e>=0&&e<=o.height)return h(i.addRow(n,{map:o,tableStart:r.start,table:r.node},e))}return n}},t.cloneRowAt=Z,t.removeColumnAt=W,t.removeRowAt=K,t.removeTable=G,t.removeSelectedColumns=function(e){var t=e.selection;if(B(t))return G(e);if(F(t)){var n=z(t);if(n){var r=i.TableMap.get(n.node),o=r.rectBetween(t.$anchorCell.pos-n.start,t.$headCell.pos-n.start);if(0==o.left&&o.right==r.width)return!1;for(var a=Object.assign({},o,{map:r,table:n.node,tableStart:n.start}),s=a.right-1;i.removeColumn(e,a,s),s!==a.left;s--)a.table=a.tableStart?e.doc.nodeAt(a.tableStart-1):e.doc,a.map=i.TableMap.get(a.table);return h(e)}}return e},t.removeSelectedRows=function(e){var t=e.selection;if(B(t))return G(e);if(F(t)){var n=z(t);if(n){var r=i.TableMap.get(n.node),o=r.rectBetween(t.$anchorCell.pos-n.start,t.$headCell.pos-n.start);if(0==o.top&&o.bottom==r.height)return!1;for(var a=Object.assign({},o,{map:r,table:n.node,tableStart:n.start}),s=a.bottom-1;i.removeRow(e,a,s),s!==a.top;s--)a.table=a.tableStart?e.doc.nodeAt(a.tableStart-1):e.doc,a.map=i.TableMap.get(a.table);return h(e)}}return e},t.removeColumnClosestToPos=function(e){return function(t){var n=Q(e);return n?W(n.left)(u(e.pos)(t)):t}},t.removeRowClosestToPos=function(e){return function(t){var n=Q(e);return n?K(n.top)(u(e.pos)(t)):t}},t.forEachCellInColumn=function(e,t,n){return function(o){var i=$(e)(o.selection);if(i){for(var a=i.length-1;a>=0;a--)o=t(i[a],o);if(n){var s=o.doc.resolve(o.mapping.map(i[i.length-1].pos));o.setSelection(r.Selection.near(s))}return h(o)}return o}},t.forEachCellInRow=function(e,t,n){return function(o){var i=q(e)(o.selection);if(i){for(var a=i.length-1;a>=0;a--)o=t(i[a],o);if(n){var s=o.doc.resolve(o.mapping.map(i[i.length-1].pos));o.setSelection(r.Selection.near(s))}}return o}},t.setCellAttrs=J,t.createTable=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=y(e),a=i.cell,s=i.header_cell,u=i.row,l=i.table,c=[],f=[],d=0;d0&&void 0!==arguments[0]?arguments[0]:{};r(this,e),this.options=Object.assign(Object.assign({},this.defaultOptions),t)}return o(e,[{key:"bindEditor",value:function(e){this.editor=e}},{key:"keys",value:function(e){return{}}},{key:"inputRules",value:function(e){return[]}},{key:"commands",value:function(e){return function(e){return function(){return!1}}}},{key:"type",get:function(){return"extension"}},{key:"name",get:function(){return""}},{key:"plugins",get:function(){return[]}},{key:"defaultOptions",get:function(){return{}}}]),e}();t.default=i},function(e,t,n){var r=n(287),o=n(288),i=n(45),a=n(289);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()}},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(14),l=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"parseMarkdown",value:function(){return{}}},{key:"commands",value:function(e){var t=e.type;return function(){return u.toggleMark(t)}}},{key:"type",get:function(){return"mark"}},{key:"markdownToken",get:function(){return""}},{key:"toMarkdown",get:function(){return{}}}]),n}(s(n(19)).default);t.default=l},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(152),o=n(153),i=n(45),a=n(154);e.exports=function(e){return r(e)||o(e)||i(e)||a()}},function(e,t,n){"use strict";var r=Le(n(204)),o=Le(n(205)),i=Le(n(206)),a=Le(n(207)),s=Le(n(208)),u=Le(n(209)),l=Le(n(210)),c=Le(n(211)),f=Le(n(212)),d=Le(n(213)),p=Le(n(214)),h=Le(n(215)),m=Le(n(216)),v=Le(n(217)),g=Le(n(218)),y=Le(n(219)),b=Le(n(220)),k=Le(n(221)),w=Le(n(222)),_=Le(n(223)),C=Le(n(224)),x=Le(n(225)),S=Le(n(226)),E=Le(n(227)),M=Le(n(228)),O=Le(n(229)),L=Le(n(230)),T=Le(n(231)),A=Le(n(232)),D=Le(n(233)),P=Le(n(234)),I=Le(n(235)),N=Le(n(236)),R=Le(n(237)),j=Le(n(238)),z=Le(n(239)),F=Le(n(3)),B=Le(n(240)),$=Le(n(241)),q=Le(n(242)),V=Le(n(243)),H=Le(n(244)),U=Le(n(245)),Z=Le(n(246)),W=Le(n(247)),K=Le(n(248)),G=Le(n(249)),J=Le(n(250)),Y=Le(n(251)),Q=Le(n(252)),X=Le(n(253)),ee=Le(n(254)),te=Le(n(255)),ne=Le(n(256)),re=Le(n(257)),oe=Le(n(258)),ie=Le(n(259)),ae=Le(n(260)),se=Le(n(261)),ue=Le(n(262)),le=Le(n(263)),ce=Le(n(264)),fe=Le(n(265)),de=Le(n(266)),pe=Le(n(267)),he=Le(n(268)),me=Le(n(269)),ve=Le(n(270)),ge=Le(n(271)),ye=Le(n(272)),be=Le(n(273)),ke=Le(n(274)),we=Le(n(275)),_e=Le(n(276)),Ce=Le(n(277)),xe=Le(n(278)),Se=Le(n(279)),Ee=Le(n(280)),Me=Le(n(281)),Oe=Le(n(282));function Le(e){return e&&e.__esModule?e:{default:e}}e.exports={AcademicCapIcon:r.default,AlignCenterIcon:o.default,AlignLeftIcon:i.default,AlignRightIcon:a.default,ArchiveIcon:s.default,BackIcon:u.default,BeakerIcon:l.default,BillingIcon:c.default,BlockQuoteIcon:f.default,BoldIcon:d.default,BuildingBlocksIcon:p.default,BulletedListIcon:h.default,CheckboxIcon:m.default,CheckmarkIcon:v.default,CloseIcon:g.default,CloudIcon:y.default,CodeIcon:b.default,CoinsIcon:k.default,CollapsedIcon:w.default,CollectionIcon:_.default,CommentIcon:C.default,DocumentIcon:x.default,EditIcon:S.default,EmailIcon:E.default,ExpandedIcon:M.default,EyeIcon:O.default,GlobeIcon:L.default,GoToIcon:T.default,GroupIcon:A.default,HashtagIcon:D.default,Heading1Icon:P.default,Heading2Icon:I.default,Heading3Icon:N.default,HighlightIcon:R.default,HomeIcon:j.default,HorizontalRuleIcon:z.default,Icon:F.default,ImageIcon:B.default,InfoIcon:$.default,InputIcon:q.default,InsertAboveIcon:V.default,InsertBelowIcon:H.default,InsertLeftIcon:U.default,InsertRightIcon:Z.default,ItalicIcon:W.default,JournalIcon:K.default,KeyboardIcon:G.default,LeafIcon:J.default,LightBulbIcon:Y.default,LinkIcon:Q.default,MenuIcon:X.default,MoonIcon:ee.default,MoreIcon:te.default,NewDocumentIcon:ne.default,NextIcon:re.default,NotepadIcon:oe.default,OpenIcon:ie.default,OrderedListIcon:ae.default,PadlockIcon:se.default,PaletteIcon:ue.default,PinIcon:le.default,PlusIcon:ce.default,PrivateCollectionIcon:fe.default,ProfileIcon:de.default,QuestionMarkIcon:pe.default,SearchIcon:he.default,SettingsIcon:me.default,ShapesIcon:ve.default,StarredIcon:ge.default,StrikethroughIcon:ye.default,SunIcon:be.default,TableIcon:ke.default,TableOfContentsIcon:we.default,TeamIcon:_e.default,TemplateIcon:Ce.default,TodoListIcon:xe.default,TrashIcon:Se.default,UserIcon:Ee.default,VehicleIcon:Me.default,WarningIcon:Oe.default}},function(e,t,n){"use strict";var r=n(23);Object.defineProperty(t,"__esModule",{value:!0});var o=n(13);t.default=function(e,t,n){return new o.InputRule(e,(function(e,o,i,a){var s=n instanceof Function?n(o):n,u=e.tr,l=o.length-1,c=a,f=i;if(o[l]){var d=i+o[0].indexOf(o[l-1]),p=d+o[l-1].length-1,h=d+o[l-1].lastIndexOf(o[l]),m=h+o[l].length;if(function(e,t,n){var o=[];return n.doc.nodesBetween(e,t,(function(e,t){o=[].concat(r(o),r(e.marks.map((function(n){return{start:t,end:t+e.nodeSize,mark:n}}))))})),o}(i,a,e).filter((function(e){return e.mark.type.excludes(t)})).filter((function(e){return e.end>d})).length)return null;md&&u.delete(d,h),c=(f=d)+o[l].length}return u.addMark(f,c,t.create(s)),u.removeStoredMark(t),u}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"keydownHandler",(function(){return y})),n.d(t,"keymap",(function(){return g}));for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},o={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},i="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),a="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),s="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),u="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),l="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),c=i&&(u||+i[1]<57)||s&&u,f=0;f<10;f++)r[48+f]=r[96+f]=String(f);for(f=1;f<=24;f++)r[f+111]="F"+f;for(f=65;f<=90;f++)r[f]=String.fromCharCode(f+32),o[f]=String.fromCharCode(f);for(var d in r)o.hasOwnProperty(d)||(o[d]=r[d]);var p=n(2),h="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);function m(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(var s=0;s127)&&(i=r[n.keyCode])&&i!=s){var d=t[v(i,n,!0)];if(d&&d(e.state,e.dispatch,e))return!0}else if(u&&n.shiftKey){var p=t[v(s,n,!0)];if(p&&p(e.state,e.dispatch,e))return!0}return!1}}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var o=r.findSelectedNodeOfType(e)(n.selection)||r.findParentNode((function(t){return t.type===e}))(n.selection);return Object.keys(t).length&&o?o.node.hasMarkup(e,Object.assign(Object.assign({},o.node.attrs),t)):!!o}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Error="error",e.Info="info"}(t.ToastType||(t.ToastType={}))},function(e,t,n){"use strict";function r(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}r.prototype.attrIndex=function(e){var t,n,r;if(!this.attrs)return-1;for(n=0,r=(t=this.attrs).length;n=0&&(n=this.attrs[t][1]),n},r.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=r},function(e,t,n){"use strict";var r=n(57),o=n(104),i=n(105);e.exports=function(e){var t,n,a=e.space,s=e.mustUseProperty||[],u=e.attributes||{},l=e.properties,c=e.transform,f={},d={};for(t in l)n=new i(t,c(u,t),l[t],a),-1!==s.indexOf(t)&&(n.mustUseProperty=!0),f[t]=n,d[r(t)]=t,d[r(n.attribute)]=t;return new o(f,d,a)}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;tr&&(i+=l.attrs.colspan)}for(var c=0;c1&&(n=!0)}-1==t?t=i:t!=i&&(t=Math.max(t,i))}return t}(e),n=e.childCount,r=[],o=0,i=null,a=[],s=0,u=t*n;s=n){(i||(i=[])).push({type:"overlong_rowspan",pos:c,n:y-k});break}for(var w=o+k*t,_=0;_0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function _(e){for(var t=e.selection.$head,n=t.depth;n>0;n--)if("row"==t.node(n).type.spec.tableRole)return!0;return!1}function C(e){var t=e.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&"cell"==t.node.type.spec.tableRole?t.$anchor:w(t.$head)||function(e){for(var t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){var r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(var o=e.nodeBefore,i=e.pos;o;o=o.lastChild,i--){var a=o.type.spec.tableRole;if("cell"==a||"header_cell"==a)return e.doc.resolve(i-o.nodeSize)}}(t.$head)}function x(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function S(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function E(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function M(e){return h.get(e.node(-1)).findCell(e.pos-e.start(-1))}function O(e){return h.get(e.node(-1)).colCount(e.pos-e.start(-1))}function L(e,t,n){var r=e.start(-1),o=h.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==o?null:e.node(0).resolve(r+o)}function T(e,t,n){var r={};for(var o in e)r[o]=e[o];return r[t]=n,r}function A(e,t,n){void 0===n&&(n=1);var r=T(e,"colspan",e.colspan-n);return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((function(e){return e>0}))||(r.colwidth=null)),r}function D(e,t,n){void 0===n&&(n=1);var r=T(e,"colspan",e.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(var o=0;o0||v>0){var g=p.attrs;m>0&&(g=A(g,0,m)),v>0&&(g=A(g,g.colspan-v,v)),p=d.leftr.bottom){var y=T(p.attrs,"rowspan",Math.min(d.bottom,r.bottom)-Math.max(d.top,r.top));p=d.top0)return!1;var n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount},t.colSelection=function(e,n){void 0===n&&(n=e);var r=h.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(n.pos-o),s=e.node(0);return i.top<=a.top?(i.top>0&&(e=s.resolve(o+r.map[i.left])),a.bottom0&&(n=s.resolve(o+r.map[a.left])),i.bottom0)return!1;var o=n+this.$anchorCell.nodeAfter.attrs.colspan,i=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,i)==e.width},t.prototype.eq=function(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos},t.rowSelection=function(e,n){void 0===n&&(n=e);var r=h.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(n.pos-o),s=e.node(0);return i.left<=a.left?(i.left>0&&(e=s.resolve(o+r.map[i.top*r.width])),a.right0&&(n=s.resolve(o+r.map[a.top*r.width])),i.right0&&r>0||"table"==t.firstChild.type.spec.tableRole);)n--,r--,t=t.firstChild.content;var o=t.firstChild,i=o.type.spec.tableRole,s=o.type.schema,u=[];if("row"==i)for(var l=0;l=0;i--)for(var s=o.child(i).attrs,u=s.rowspan,l=s.colspan,c=r;c=t.length&&t.push(a.Fragment.empty),n[p]t&&(h=h.type.create(A(h.attrs,h.attrs.colspan,d+h.attrs.colspan-t),h.content)),f.push(h),d+=h.attrs.colspan;for(var m=1;mn&&(_=_.type.create(T(_.attrs,"rowspan",Math.max(1,n-_.attrs.rowspan)),_.content)),b.push(_)}v.push(a.Fragment.from(b))}i=v,o=n}return{width:r,height:o,rows:i}}function B(e,t,n,r,o,i,a,s){if(0==a||a==t.height)return!1;for(var u=!1,l=o;lt.width)for(var f=0,d=0;ft.height){for(var g=[],y=0,k=(t.height-1)*t.width;y=t.width)&&n.nodeAt(t.map[k+y]).type==c.header_cell;g.push(w?l||(l=c.header_cell.createAndFill()):u||(u=c.cell.createAndFill()))}for(var _=c.row.create(null,a.Fragment.from(g)),C=[],x=t.height;x=0;o--){var a=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:a.childCount))return null;if("cell"==a.type.spec.tableRole||"header_cell"==a.type.spec.tableRole){var s=r.before(o),u="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(u)?s:null}}return null}function Q(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function X(e,t){var n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?w(e.state.doc.resolve(n.pos)):null}var ee=new i.PluginKey("fix-tables");function te(e,t){var n,r=function(t,r){"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){var o=h.get(t);if(!o.problems)return r;r||(r=e.tr);for(var i,a,s=[],u=0;u0){var C="cell";k.firstChild&&(C=k.firstChild.type.spec.tableRole);for(var x=[],S=0;S<_;S++)x.push(b(e.schema)[C].createAndFill());var E=0!=g&&i!=g-1||a!=g?w-1:y+1;r.insert(r.mapping.map(E),x)}y=w}return r.setMeta(ee,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&function e(t,n,r,o){var i=t.childCount,a=n.childCount;e:for(var s=0,u=0;s0?-1:0;P(r,i,n+a)&&(a=0==n||n==r.width?null:0);for(var s=0;s0&&n0&&r.map[u-1]==l||n0?-1:0;ue(r,i,n+l)&&(l=0==n||n==r.height?null:0);for(var c=0,f=r.width*n;c0&&n0&&d==r.map[f-r.width]){var p=o.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(l).map(d+i),null,T(p,"rowspan",p.rowspan-1)),c+=p.colspan-1}else if(n0&&o[a]==o[a-1]||t.right0&&o[i]==o[i-n]||t.bottom0;t--){var n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(i.$from)))return!1;o=w(i.$from).pos}if(1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(n){var a=r.attrs,s=[],u=a.colwidth;a.rowspan>1&&(a=T(a,"rowspan",1)),a.colspan>1&&(a=T(a,"colspan",1));for(var l,c=ne(t),f=t.tr,d=0;d=0;r--){var i=e.node(-1).child(r);if(i.childCount)return o-1-i.lastChild.nodeSize;o-=i.nodeSize}}else{if(e.index()0;r--){if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0}return!1}var Ee=function(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Me(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))};function Me(e,t,n,r,o,i){for(var a=0,s=!0,u=t.firstChild,l=e.firstChild,c=0,f=0;c-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,n){!function(e,t,n,r,o){var i=Oe.getState(e.state);if(!i.dragging){var a=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),s=-1;if(a){var u=a.getBoundingClientRect(),l=u.left,c=u.right;t.clientX-l<=n?s=Ae(e,t,"left"):c-t.clientX<=n&&(s=Ae(e,t,"right"))}if(s!=i.activeHandle){if(!o&&-1!==s){var f=e.state.doc.resolve(s),d=f.node(-1),p=h.get(d),m=f.start(-1);if(p.colCount(f.pos-m)+f.nodeAfter.attrs.colspan-1==p.width-1)return}Pe(e,s)}}}(e,n,t,0,o)},mouseleave:function(e){!function(e){var t=Oe.getState(e.state);t.activeHandle>-1&&!t.dragging&&Pe(e,-1)}(e)},mousedown:function(e,t){!function(e,t,n){var r=Oe.getState(e.state);if(-1==r.activeHandle||r.dragging)return!1;var o=e.state.doc.nodeAt(r.activeHandle),i=function(e,t,n){var r=n.colspan,o=n.colwidth,i=o&&o[o.length-1];if(i)return i;var a=e.domAtPos(t),s=a.node.childNodes[a.offset].offsetWidth,u=r;if(o)for(var l=0;l-1)return function(e,t){for(var n=[],r=e.doc.resolve(t),o=r.node(-1),i=h.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan,l=0;l=0&&!(t.after(i+1)=0&&!(n.before(a+1)>n.start(a));a--,o--);return r==o&&/row|table/.test(t.node(i).type.spec.tableRole)}(a)?r=i.TextSelection.create(s,a.from):a instanceof i.TextSelection&&function(e){for(var t,n,r=e.$from,o=e.$to,i=r.depth;i>0;i--){var a=r.node(i);if("cell"===a.type.spec.tableRole||"header_cell"===a.type.spec.tableRole){t=a;break}}for(var s=o.depth;s>0;s--){var u=o.node(s);if("cell"===u.type.spec.tableRole||"header_cell"===u.type.spec.tableRole){n=u;break}}return t!==n&&0===o.parentOffset}(a)&&(r=i.TextSelection.create(s,a.$from.start(),a.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}(r,te(r,n),t)}})}Te.prototype.apply=function(e){var t=this,n=e.getMeta(Oe);if(n&&null!=n.setHandle)return new Te(n.setHandle,null);if(n&&void 0!==n.setDragging)return new Te(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){var r=e.mapping.map(t.activeHandle,-1);x(e.doc.resolve(r))||(r=null),t=new Te(r,t.dragging)}return t}},function(e,t,n){e.exports=n(197)},function(e,t){function n(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(l){return void n(l)}s.done?t(u):Promise.resolve(u).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=e.apply(t,r);function s(e){n(a,o,i,s,u,"next",e)}function u(e){n(a,o,i,s,u,"throw",e)}s(void 0)}))}}},function(e,t,n){var r=n(45);e.exports=function(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=r(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i,a=!0,s=!1;return{s:function(){o=e[Symbol.iterator]()},n:function(){var e=o.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==o.return||o.return()}finally{if(s)throw i}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={errors:{controlled:"A component is changing a react-medium-image-zoom component from a controlled component to an uncontrolled one. ImageZoom elements should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled image zoom element for the lifetime of the component.",uncontrolled:"A component is changing a react-medium-image-zoom component from an uncontrolled component to a controlled one. ImageZoom elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled image zoom element for the lifetime of the component."},styles:{image:{cursor:"zoom-in"},zoomImage:{cursor:"zoom-out",position:"absolute",transition:"transform 300ms",transform:"translate3d(0, 0, 0) scale(1)",transformOrigin:"center center",willChange:"transform, top, left"},zoomContainer:{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:999},overlay:{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:"#fff",opacity:0,transition:"opacity 300ms"}},transitionDuration:300};t.default=r},function(e,t,n){"use strict";e.exports=n(194)},function(e,t,n){var r=n(69);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t,n){var r=n(36),o=n(169),i=n(170),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(168),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={almostBlack:"#181A1B",lightBlack:"#2F3336",almostWhite:"#E6E6E6",white:"#FFF",white10:"rgba(255, 255, 255, 0.1)",black:"#000",black10:"rgba(0, 0, 0, 0.1)",primary:"#1AB6FF",greyLight:"#F4F7FA",grey:"#E8EBED",greyMid:"#C5CCD3",greyDark:"#DAE1E9"};t.base=Object.assign(Object.assign({},r),{fontFamily:"-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen, Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif",fontFamilyMono:"'SFMono-Regular',Consolas,'Liberation Mono', Menlo, Courier,monospace",fontWeight:400,zIndex:100,link:r.primary,placeholder:"#B1BECC",textSecondary:"#4E5C6E",textLight:r.white,textHighlight:"#b3e7ff",selected:r.primary,codeComment:"#6a737d",codePunctuation:"#5e6687",codeNumber:"#d73a49",codeProperty:"#c08b30",codeTag:"#3d8fd1",codeString:"#032f62",codeSelector:"#6679cc",codeAttr:"#c76b29",codeEntity:"#22a2c9",codeKeyword:"#d73a49",codeFunction:"#6f42c1",codeStatement:"#22a2c9",codePlaceholder:"#3d8fd1",codeInserted:"#202746",codeImportant:"#c94922",blockToolbarBackground:r.white,blockToolbarTrigger:r.greyMid,blockToolbarTriggerIcon:r.white,blockToolbarItem:r.almostBlack,blockToolbarText:r.almostBlack,blockToolbarHoverBackground:r.greyLight,blockToolbarDivider:r.greyMid,noticeInfoBackground:"#F5BE31",noticeInfoText:r.almostBlack,noticeTipBackground:"#9E5CF7",noticeTipText:r.white,noticeWarningBackground:"#FF5C80",noticeWarningText:r.white}),t.light=Object.assign(Object.assign({},t.base),{background:r.white,text:r.almostBlack,code:r.lightBlack,cursor:r.black,divider:r.greyMid,toolbarBackground:r.lightBlack,toolbarHoverBackground:r.black,toolbarInput:r.white10,toolbarItem:r.white,tableDivider:r.greyMid,tableSelected:r.primary,tableSelectedBackground:"#E5F7FF",quote:r.greyDark,codeBackground:r.greyLight,codeBorder:r.grey,horizontalRule:r.greyMid,imageErrorBackground:r.greyLight,scrollbarBackground:r.greyLight,scrollbarThumb:r.greyMid}),t.dark=Object.assign(Object.assign({},t.base),{background:r.almostBlack,text:r.almostWhite,code:r.almostWhite,cursor:r.white,divider:"#4E5C6E",placeholder:"#52657A",toolbarBackground:r.white,toolbarHoverBackground:r.greyMid,toolbarInput:r.black10,toolbarItem:r.lightBlack,tableDivider:r.lightBlack,tableSelected:r.primary,tableSelectedBackground:"#002333",quote:r.greyDark,codeBackground:r.black,codeBorder:r.lightBlack,codeString:"#3d8fd1",horizontalRule:r.lightBlack,imageErrorBackground:"rgba(0, 0, 0, 0.5)",scrollbarBackground:r.black,scrollbarThumb:r.lightBlack}),t.default=t.light},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){return function(t){var n=t.selection,r=n.from,o=n.$from,i=n.to;return n.empty?e.isInSet(t.storedMarks||o.marks()):t.doc.rangeHasMark(r,i,e)}}},function(e,t,n){var r=n(298);e.exports=function(e){return null==e?"":r(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){"use strict";function r(){this.__rules__=[],this.__cache__=null}r.prototype.__find__=function(e){for(var t=0;t=1&&d&&f.depth-d.depth<=1){if(d.node.type===e)return o.liftListItem(t)(n,r);if(a.default(d.node,s)&&e.validContent(d.node.content)){var p=n.tr;return p.setNodeMarkup(d.pos,e),r&&r(p),!1}}return o.wrapInList(e)(n,r)}}},function(e,t,n){"use strict";n.r(t),n.d(t,"addListNodes",(function(){return d})),n.d(t,"bulletList",(function(){return l})),n.d(t,"liftListItem",(function(){return m})),n.d(t,"listItem",(function(){return c})),n.d(t,"orderedList",(function(){return u})),n.d(t,"sinkListItem",(function(){return v})),n.d(t,"splitListItem",(function(){return h})),n.d(t,"wrapInList",(function(){return p}));var r=n(8),o=n(0),i=["ol",0],a=["ul",0],s=["li",0],u={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:function(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1}}}],toDOM:function(e){return 1==e.attrs.order?i:["ol",{start:e.attrs.order},0]}},l={parseDOM:[{tag:"ul"}],toDOM:function(){return a}},c={parseDOM:[{tag:"li"}],toDOM:function(){return s},defining:!0};function f(e,t){var n={};for(var r in e)n[r]=e[r];for(var o in t)n[o]=t[o];return n}function d(e,t,n){return e.append({ordered_list:f(u,{content:"list_item+",group:n}),bullet_list:f(l,{content:"list_item+",group:n}),list_item:f(c,{content:t})})}function p(e,t){return function(n,i){var a=n.selection,s=a.$from,u=a.$to,l=s.blockRange(u),c=!1,f=l;if(!l)return!1;if(l.depth>=2&&s.node(l.depth-1).type.compatibleContent(e)&&0==l.startIndex){if(0==s.index(l.depth-1))return!1;var d=n.doc.resolve(l.start-2);f=new o.NodeRange(d,d,l.depth),l.endIndex=0;u--)s=o.Fragment.from(n[u].type.create(n[u].attrs,s));e.step(new r.b(t.start-(i?2:0),t.end,t.start,t.end,new o.Slice(s,0,0),n.length,!0));for(var l=0,c=0;c0,d=a.depth-(f?1:2);d>=a.depth-3;d--)c=o.Fragment.from(a.node(d).copy(c));c=c.append(o.Fragment.from(e.createAndFill()));var p=t.tr.replace(a.before(f?null:-1),a.after(-3),new o.Slice(c,f?3:2,2));p.setSelection(t.selection.constructor.near(p.doc.resolve(a.pos+(f?3:2)))),n(p.scrollIntoView())}return!0}var h=s.pos==a.end()?l.contentMatchAt(0).defaultType:null,m=t.tr.delete(a.pos,s.pos),v=h&&[null,{type:h}];return!!Object(r.f)(m.doc,a.pos,2,v)&&(n&&n(m.split(a.pos,2,v).scrollIntoView()),!0)}}function m(e){return function(t,n){var i=t.selection,a=i.$from,s=i.$to,u=a.blockRange(s,(function(t){return t.childCount&&t.firstChild.type==e}));return!!u&&(!n||(a.node(u.depth-1).type==e?function(e,t,n,i){var a=e.tr,s=i.end,u=i.$to.end(i.depth);sl;u--)s-=a.child(u).nodeSize,i.delete(s-1,s+1);var c=i.doc.resolve(n.start),f=c.nodeAfter,d=0==n.startIndex,p=n.endIndex==a.childCount,h=c.node(-1),m=c.index(-1);if(!h.canReplace(m+(d?0:1),m+1,f.content.append(p?o.Fragment.empty:o.Fragment.from(a))))return!1;var v=c.pos,g=v+f.nodeSize;return i.step(new r.b(v-(d?1:0),g+(p?1:0),v+1,g-1,new o.Slice((d?o.Fragment.empty:o.Fragment.from(a.copy(o.Fragment.empty))).append(p?o.Fragment.empty:o.Fragment.from(a.copy(o.Fragment.empty))),d?0:1,p?0:1),d?0:1)),t(i.scrollIntoView()),!0}(t,n,u)))}}function v(e){return function(t,n){var i=t.selection,a=i.$from,s=i.$to,u=a.blockRange(s,(function(t){return t.childCount&&t.firstChild.type==e}));if(!u)return!1;var l=u.startIndex;if(0==l)return!1;var c=u.parent,f=c.child(l-1);if(f.type!=e)return!1;if(n){var d=f.lastChild&&f.lastChild.type==c.type,p=o.Fragment.from(d?e.create():null),h=new o.Slice(o.Fragment.from(e.create(null,o.Fragment.from(c.type.create(null,p)))),d?3:1,0),m=u.start,v=u.end;n(t.tr.step(new r.b(m-(d?3:1),v,m,v,h,1,!0)).scrollIntoView())}return!0}}},function(e,t,n){"use strict";var r=n(20),o=n(4),i=n(5),a=n(6),s=n(7),u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var c=u(n(103)),f=u(n(408)),d=u(n(110)),p=u(n(111)),h=u(n(409)),m=u(n(410)),v=u(n(112)),g=u(n(411)),y=u(n(109)),b=u(n(412)),k=u(n(414)),w=u(n(415)),_=u(n(416)),C=u(n(417)),x=n(14),S=n(13),E=u(n(113)),M=l(n(419)),O=u(n(10)),L=n(29);[f.default,d.default,p.default,h.default,m.default,v.default,g.default,y.default,b.default,k.default,w.default,_.default,C.default].forEach(c.default.register);var T=function(e){a(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.apply(this,arguments)).handleLanguageChange=function(t){var n=e.editor.view,r=n.state.tr,o=t.target,i=o.getBoundingClientRect(),a=i.top,s=i.left,u=n.posAtCoords({top:a,left:s});if(u){var l=r.setNodeMarkup(u.inside,void 0,{language:o.value});n.dispatch(l)}},e}return i(n,[{key:"commands",value:function(e){var t=e.type;return function(){return x.setBlockType(t)}}},{key:"keys",value:function(e){var t=e.type;return{"Shift-Ctrl-\\":x.setBlockType(t)}}},{key:"handleCopyToClipboard",value:function(e){var t=this;return function(){E.default(e.textContent),t.options.onShowToast&&t.options.onShowToast(t.options.dictionary.codeCopied,L.ToastType.Info)}}},{key:"inputRules",value:function(e){var t=e.type;return[S.textblockTypeInputRule(/^```$/,t)]}},{key:"toMarkdown",value:function(e,t){e.write("```"+(t.attrs.language||"")+"\n"),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)}},{key:"parseMarkdown",value:function(){return{block:"code_block",getAttrs:function(e){return{language:e.info}}}}},{key:"languageOptions",get:function(){return Object.entries(M.LANGUAGES)}},{key:"name",get:function(){return"code_fence"}},{key:"schema",get:function(){var e=this;return{attrs:{language:{default:"javascript"}},content:"text*",marks:"",group:"block",code:!0,defining:!0,draggable:!1,parseDOM:[{tag:"pre",preserveWhitespace:"full"},{tag:".code-block",preserveWhitespace:"full",contentElement:"code",getAttrs:function(e){return{language:e.dataset.language}}}],toDOM:function(t){var n=document.createElement("button");n.innerText="Copy",n.type="button",n.addEventListener("click",e.handleCopyToClipboard(t));var o=document.createElement("select");return o.addEventListener("change",e.handleLanguageChange),e.languageOptions.forEach((function(e){var n=r(e,2),i=n[0],a=n[1],s=document.createElement("option"),u="none"===i?"":i;s.value=u,s.innerText=a,s.selected=t.attrs.language===u,o.appendChild(s)})),["div",{class:"code-block","data-language":t.attrs.language},["div",{contentEditable:!1},o,n],["pre",["code",{spellCheck:!1},0]]]}}}},{key:"plugins",get:function(){return[M.default({name:this.name,deferred:!this.options.initialReadOnly})]}},{key:"markdownToken",get:function(){return"fence"}}]),n}(O.default);t.default=T},function(e,t,n){"use strict";e.exports=function(e){return e.toLowerCase()}},function(e,t,n){"use strict";var r=0;function o(){return Math.pow(2,++r)}t.boolean=o(),t.booleanish=o(),t.overloadedBoolean=o(),t.number=o(),t.spaceSeparated=o(),t.commaSeparated=o(),t.commaOrSpaceSeparated=o()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.createPortalContainer=function(e){var t=document.createElement(e);return document.body.appendChild(t),t},t.removePortalContainer=function(e){document.body.removeChild(e)},t.fetchImage=function(e,t){var n=e.src,r=e.srcSet,o=e.sizes,i=new Image;i.addEventListener("load",(function e(){t(i),i.removeEventListener("load",e)})),i.src=n,r&&(i.srcset=r),o&&(i.sizes=o)};var r=t.getScale=function(e){var t=e.width,n=e.height,r=e.zoomMargin,o=window.innerWidth/(t+r),i=window.innerHeight/(n+r);return Math.min(o,i)};t.getMaxDimensionScale=function(e){var t=e.width,n=e.height,o=e.naturalWidth,i=e.naturalHeight,a=e.zoomMargin,s=r({width:o,height:i,zoomMargin:a}),u=o>i?o/t:i/n;return s>1?u:s*u},t.isMaxDimension=function(e){return e.clientWidth>=e.naturalWidth||e.clientHeight>=e.naturalHeight}},function(e,t,n){"use strict";n.r(t),n.d(t,"Portal",(function(){return k})),n.d(t,"PortalWithState",(function(){return x}));var r=n(17),o=n.n(r),i=n(1),a=n.n(i),s=n(11),u=n.n(s),l=!("undefined"===typeof window||!window.document||!window.document.createElement),c=function(){function e(e,t){for(var n=0;n"']/g,z=RegExp(R.source),F=RegExp(j.source),B=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,q=/<%=([\s\S]+?)%>/g,V=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H=/^\w*$/,U=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z=/[\\^$.*+?()[\]{}|]/g,W=RegExp(Z.source),K=/^\s+|\s+$/g,G=/^\s+/,J=/\s+$/,Y=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Q=/\{\n\/\* \[wrapped with (.+)\] \*/,X=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,oe=/^[-+]0x[0-9a-f]+$/i,ie=/^0b[01]+$/i,ae=/^\[object .+?Constructor\]$/,se=/^0o[0-7]+$/i,ue=/^(?:0|[1-9]\d*)$/,le=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ce=/($^)/,fe=/['\n\r\u2028\u2029\\]/g,de="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",he="[\\ud800-\\udfff]",me="["+pe+"]",ve="["+de+"]",ge="\\d+",ye="[\\u2700-\\u27bf]",be="[a-z\\xdf-\\xf6\\xf8-\\xff]",ke="[^\\ud800-\\udfff"+pe+ge+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",we="\\ud83c[\\udffb-\\udfff]",_e="[^\\ud800-\\udfff]",Ce="(?:\\ud83c[\\udde6-\\uddff]){2}",xe="[\\ud800-\\udbff][\\udc00-\\udfff]",Se="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ee="(?:"+be+"|"+ke+")",Me="(?:"+Se+"|"+ke+")",Oe="(?:"+ve+"|"+we+")"+"?",Le="[\\ufe0e\\ufe0f]?"+Oe+("(?:\\u200d(?:"+[_e,Ce,xe].join("|")+")[\\ufe0e\\ufe0f]?"+Oe+")*"),Te="(?:"+[ye,Ce,xe].join("|")+")"+Le,Ae="(?:"+[_e+ve+"?",ve,Ce,xe,he].join("|")+")",De=RegExp("['\u2019]","g"),Pe=RegExp(ve,"g"),Ie=RegExp(we+"(?="+we+")|"+Ae+Le,"g"),Ne=RegExp([Se+"?"+be+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[me,Se,"$"].join("|")+")",Me+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[me,Se+Ee,"$"].join("|")+")",Se+"?"+Ee+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Se+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ge,Te].join("|"),"g"),Re=RegExp("[\\u200d\\ud800-\\udfff"+de+"\\ufe0e\\ufe0f]"),je=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ze=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Fe=-1,Be={};Be[S]=Be[E]=Be[M]=Be[O]=Be[L]=Be[T]=Be["[object Uint8ClampedArray]"]=Be[A]=Be[D]=!0,Be[u]=Be[l]=Be[C]=Be[c]=Be[x]=Be[f]=Be[d]=Be[p]=Be[m]=Be[v]=Be[g]=Be[y]=Be[b]=Be[k]=Be[_]=!1;var $e={};$e[u]=$e[l]=$e[C]=$e[x]=$e[c]=$e[f]=$e[S]=$e[E]=$e[M]=$e[O]=$e[L]=$e[m]=$e[v]=$e[g]=$e[y]=$e[b]=$e[k]=$e[w]=$e[T]=$e["[object Uint8ClampedArray]"]=$e[A]=$e[D]=!0,$e[d]=$e[p]=$e[_]=!1;var qe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ve=parseFloat,He=parseInt,Ue="object"==typeof e&&e&&e.Object===Object&&e,Ze="object"==typeof self&&self&&self.Object===Object&&self,We=Ue||Ze||Function("return this")(),Ke=t&&!t.nodeType&&t,Ge=Ke&&"object"==typeof r&&r&&!r.nodeType&&r,Je=Ge&&Ge.exports===Ke,Ye=Je&&Ue.process,Qe=function(){try{var e=Ge&&Ge.require&&Ge.require("util").types;return e||Ye&&Ye.binding&&Ye.binding("util")}catch(t){}}(),Xe=Qe&&Qe.isArrayBuffer,et=Qe&&Qe.isDate,tt=Qe&&Qe.isMap,nt=Qe&&Qe.isRegExp,rt=Qe&&Qe.isSet,ot=Qe&&Qe.isTypedArray;function it(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function at(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o-1}function dt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r-1;);return n}function It(e,t){for(var n=e.length;n--&&wt(t,e[n],0)>-1;);return n}function Nt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Rt=Et({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),jt=Et({"&":"&","<":"<",">":">",'"':""","'":"'"});function zt(e){return"\\"+qe[e]}function Ft(e){return Re.test(e)}function Bt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function $t(e,t){return function(n){return e(t(n))}}function qt(e,t){for(var n=-1,r=e.length,o=0,i=[];++n",""":'"',"'":"'"});var Kt=function e(t){var n=(t=null==t?We:Kt.defaults(We.Object(),t,Kt.pick(We,ze))).Array,r=t.Date,o=t.Error,de=t.Function,pe=t.Math,he=t.Object,me=t.RegExp,ve=t.String,ge=t.TypeError,ye=n.prototype,be=de.prototype,ke=he.prototype,we=t["__core-js_shared__"],_e=be.toString,Ce=ke.hasOwnProperty,xe=0,Se=function(){var e=/[^.]+$/.exec(we&&we.keys&&we.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ee=ke.toString,Me=_e.call(he),Oe=We._,Le=me("^"+_e.call(Ce).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Te=Je?t.Buffer:void 0,Ae=t.Symbol,Ie=t.Uint8Array,Re=Te?Te.allocUnsafe:void 0,qe=$t(he.getPrototypeOf,he),Ue=he.create,Ze=ke.propertyIsEnumerable,Ke=ye.splice,Ge=Ae?Ae.isConcatSpreadable:void 0,Ye=Ae?Ae.iterator:void 0,Qe=Ae?Ae.toStringTag:void 0,yt=function(){try{var e=Xo(he,"defineProperty");return e({},"",{}),e}catch(t){}}(),Et=t.clearTimeout!==We.clearTimeout&&t.clearTimeout,Gt=r&&r.now!==We.Date.now&&r.now,Jt=t.setTimeout!==We.setTimeout&&t.setTimeout,Yt=pe.ceil,Qt=pe.floor,Xt=he.getOwnPropertySymbols,en=Te?Te.isBuffer:void 0,tn=t.isFinite,nn=ye.join,rn=$t(he.keys,he),on=pe.max,an=pe.min,sn=r.now,un=t.parseInt,ln=pe.random,cn=ye.reverse,fn=Xo(t,"DataView"),dn=Xo(t,"Map"),pn=Xo(t,"Promise"),hn=Xo(t,"Set"),mn=Xo(t,"WeakMap"),vn=Xo(he,"create"),gn=mn&&new mn,yn={},bn=Ei(fn),kn=Ei(dn),wn=Ei(pn),_n=Ei(hn),Cn=Ei(mn),xn=Ae?Ae.prototype:void 0,Sn=xn?xn.valueOf:void 0,En=xn?xn.toString:void 0;function Mn(e){if(Va(e)&&!Da(e)&&!(e instanceof An)){if(e instanceof Tn)return e;if(Ce.call(e,"__wrapped__"))return Mi(e)}return new Tn(e)}var On=function(){function e(){}return function(t){if(!qa(t))return{};if(Ue)return Ue(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Ln(){}function Tn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function An(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Dn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Gn(e,t,n,r,o,i){var a,s=1&t,l=2&t,d=4&t;if(n&&(a=o?n(e,r,o,i):n(e)),void 0!==a)return a;if(!qa(e))return e;var _=Da(e);if(_){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ce.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!s)return go(e,a)}else{var P=ni(e),I=P==p||P==h;if(Ra(e))return co(e,s);if(P==g||P==u||I&&!o){if(a=l||I?{}:oi(e),!s)return l?function(e,t){return yo(e,ti(e),t)}(e,function(e,t){return e&&yo(t,ks(t),e)}(a,e)):function(e,t){return yo(e,ei(e),t)}(e,Un(a,e))}else{if(!$e[P])return o?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case C:return fo(e);case c:case f:return new r(+e);case x:return function(e,t){var n=t?fo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case S:case E:case M:case O:case L:case T:case"[object Uint8ClampedArray]":case A:case D:return po(e,n);case m:return new r;case v:case k:return new r(e);case y:return function(e){var t=new e.constructor(e.source,re.exec(e));return t.lastIndex=e.lastIndex,t}(e);case b:return new r;case w:return o=e,Sn?he(Sn.call(o)):{}}var o}(e,P,s)}}i||(i=new Rn);var N=i.get(e);if(N)return N;i.set(e,a),Ka(e)?e.forEach((function(r){a.add(Gn(r,t,n,r,e,i))})):Ha(e)&&e.forEach((function(r,o){a.set(o,Gn(r,t,n,o,e,i))}));var R=_?void 0:(d?l?Zo:Uo:l?ks:bs)(e);return st(R||e,(function(r,o){R&&(r=e[o=r]),qn(a,o,Gn(r,t,n,o,e,i))})),a}function Jn(e,t,n){var r=n.length;if(null==e)return!r;for(e=he(e);r--;){var o=n[r],i=t[o],a=e[o];if(void 0===a&&!(o in e)||!i(a))return!1}return!0}function Yn(e,t,n){if("function"!=typeof e)throw new ge(i);return bi((function(){e.apply(void 0,n)}),t)}function Qn(e,t,n,r){var o=-1,i=ft,a=!0,s=e.length,u=[],l=t.length;if(!s)return u;n&&(t=pt(t,Tt(n))),r?(i=dt,a=!1):t.length>=200&&(i=Dt,a=!1,t=new Nn(t));e:for(;++o-1},Pn.prototype.set=function(e,t){var n=this.__data__,r=Vn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},In.prototype.clear=function(){this.size=0,this.__data__={hash:new Dn,map:new(dn||Pn),string:new Dn}},In.prototype.delete=function(e){var t=Yo(this,e).delete(e);return this.size-=t?1:0,t},In.prototype.get=function(e){return Yo(this,e).get(e)},In.prototype.has=function(e){return Yo(this,e).has(e)},In.prototype.set=function(e,t){var n=Yo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Nn.prototype.add=Nn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Nn.prototype.has=function(e){return this.__data__.has(e)},Rn.prototype.clear=function(){this.__data__=new Pn,this.size=0},Rn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Rn.prototype.get=function(e){return this.__data__.get(e)},Rn.prototype.has=function(e){return this.__data__.has(e)},Rn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Pn){var r=n.__data__;if(!dn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new In(r)}return n.set(e,t),this.size=n.size,this};var Xn=wo(sr),er=wo(ur,!0);function tr(e,t){var n=!0;return Xn(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function nr(e,t,n){for(var r=-1,o=e.length;++r0&&n(s)?t>1?or(s,t-1,n,r,o):ht(o,s):r||(o[o.length]=s)}return o}var ir=_o(),ar=_o(!0);function sr(e,t){return e&&ir(e,t,bs)}function ur(e,t){return e&&ar(e,t,bs)}function lr(e,t){return ct(t,(function(t){return Fa(e[t])}))}function cr(e,t){for(var n=0,r=(t=ao(t,e)).length;null!=e&&nt}function hr(e,t){return null!=e&&Ce.call(e,t)}function mr(e,t){return null!=e&&t in he(e)}function vr(e,t,r){for(var o=r?dt:ft,i=e[0].length,a=e.length,s=a,u=n(a),l=1/0,c=[];s--;){var f=e[s];s&&t&&(f=pt(f,Tt(t))),l=an(f.length,l),u[s]=!r&&(t||i>=120&&f.length>=120)?new Nn(s&&f):void 0}f=e[0];var d=-1,p=u[0];e:for(;++d=s)return u;var l=n[r];return u*("desc"==l?-1:1)}}return e.index-t.index}(e,t,n)}))}function Dr(e,t,n){for(var r=-1,o=t.length,i={};++r-1;)s!==e&&Ke.call(s,u,1),Ke.call(e,u,1);return e}function Ir(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;ai(o)?Ke.call(e,o,1):Qr(e,o)}}return e}function Nr(e,t){return e+Qt(ln()*(t-e+1))}function Rr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Qt(t/2))&&(e+=e)}while(t);return n}function jr(e,t){return ki(hi(e,t,Us),e+"")}function zr(e){return zn(Os(e))}function Fr(e,t){var n=Os(e);return Ci(n,Kn(t,0,n.length))}function Br(e,t,n,r){if(!qa(e))return e;for(var o=-1,i=(t=ao(t,e)).length,a=i-1,s=e;null!=s&&++oi?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=n(i);++o>>1,a=e[i];null!==a&&!Ja(a)&&(n?a<=t:a=200){var l=t?null:jo(e);if(l)return Vt(l);a=!1,o=Dt,u=new Nn}else u=t?[]:s;e:for(;++r=r?e:Hr(e,t,n)}var lo=Et||function(e){return We.clearTimeout(e)};function co(e,t){if(t)return e.slice();var n=e.length,r=Re?Re(n):new e.constructor(n);return e.copy(r),r}function fo(e){var t=new e.constructor(e.byteLength);return new Ie(t).set(new Ie(e)),t}function po(e,t){var n=t?fo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ho(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e===e,i=Ja(e),a=void 0!==t,s=null===t,u=t===t,l=Ja(t);if(!s&&!l&&!i&&e>t||i&&a&&u&&!s&&!l||r&&a&&u||!n&&u||!o)return 1;if(!r&&!i&&!l&&e1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&si(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=he(t);++r-1?o[i?t[a]:a]:void 0}}function Mo(e){return Ho((function(t){var n=t.length,r=n,o=Tn.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new ge(i);if(o&&!s&&"wrapper"==Ko(a))var s=new Tn([],!0)}for(r=s?r:n;++r1&&b.reverse(),f&&ls))return!1;var l=i.get(e),c=i.get(t);if(l&&c)return l==t&&c==e;var f=-1,d=!0,p=2&n?new Nn:void 0;for(i.set(e,t),i.set(t,e);++f-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Y,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return st(s,(function(n){var r="_."+n[0];t&n[1]&&!ft(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(Q);return t?t[1].split(X):[]}(r),n)))}function _i(e){var t=0,n=0;return function(){var r=sn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ci(e,t){var n=-1,r=e.length,o=r-1;for(t=void 0===t?r:t;++n1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Wi(e,n)}));function ea(e){var t=Mn(e);return t.__chain__=!0,t}function ta(e,t){return t(e)}var na=Ho((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return Wn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof An&&ai(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ta,args:[o],thisArg:void 0}),new Tn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(o)}));var ra=bo((function(e,t,n){Ce.call(e,n)?++e[n]:Zn(e,n,1)}));var oa=Eo(Ai),ia=Eo(Di);function aa(e,t){return(Da(e)?st:Xn)(e,Jo(t,3))}function sa(e,t){return(Da(e)?ut:er)(e,Jo(t,3))}var ua=bo((function(e,t,n){Ce.call(e,n)?e[n].push(t):Zn(e,n,[t])}));var la=jr((function(e,t,r){var o=-1,i="function"==typeof t,a=Ia(e)?n(e.length):[];return Xn(e,(function(e){a[++o]=i?it(t,e,r):gr(e,t,r)})),a})),ca=bo((function(e,t,n){Zn(e,n,t)}));function fa(e,t){return(Da(e)?pt:Er)(e,Jo(t,3))}var da=bo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var pa=jr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&si(e,t[0],t[1])?t=[]:n>2&&si(t[0],t[1],t[2])&&(t=[t[0]]),Ar(e,or(t,1),[])})),ha=Gt||function(){return We.Date.now()};function ma(e,t,n){return t=n?void 0:t,Fo(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function va(e,t){var n;if("function"!=typeof t)throw new ge(i);return e=ns(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var ga=jr((function(e,t,n){var r=1;if(n.length){var o=qt(n,Go(ga));r|=32}return Fo(e,r,t,n,o)})),ya=jr((function(e,t,n){var r=3;if(n.length){var o=qt(n,Go(ya));r|=32}return Fo(t,r,e,n,o)}));function ba(e,t,n){var r,o,a,s,u,l,c=0,f=!1,d=!1,p=!0;if("function"!=typeof e)throw new ge(i);function h(t){var n=r,i=o;return r=o=void 0,c=t,s=e.apply(i,n)}function m(e){return c=e,u=bi(g,t),f?h(e):s}function v(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=a}function g(){var e=ha();if(v(e))return y(e);u=bi(g,function(e){var n=t-(e-l);return d?an(n,a-(e-c)):n}(e))}function y(e){return u=void 0,p&&r?h(e):(r=o=void 0,s)}function b(){var e=ha(),n=v(e);if(r=arguments,o=this,l=e,n){if(void 0===u)return m(l);if(d)return lo(u),u=bi(g,t),h(l)}return void 0===u&&(u=bi(g,t)),s}return t=os(t)||0,qa(n)&&(f=!!n.leading,a=(d="maxWait"in n)?on(os(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),b.cancel=function(){void 0!==u&&lo(u),c=0,r=l=o=u=void 0},b.flush=function(){return void 0===u?s:y(ha())},b}var ka=jr((function(e,t){return Yn(e,1,t)})),wa=jr((function(e,t,n){return Yn(e,os(t)||0,n)}));function _a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ge(i);var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(_a.Cache||In),n}function Ca(e){if("function"!=typeof e)throw new ge(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}_a.Cache=In;var xa=so((function(e,t){var n=(t=1==t.length&&Da(t[0])?pt(t[0],Tt(Jo())):pt(or(t,1),Tt(Jo()))).length;return jr((function(r){for(var o=-1,i=an(r.length,n);++o=t})),Aa=yr(function(){return arguments}())?yr:function(e){return Va(e)&&Ce.call(e,"callee")&&!Ze.call(e,"callee")},Da=n.isArray,Pa=Xe?Tt(Xe):function(e){return Va(e)&&dr(e)==C};function Ia(e){return null!=e&&$a(e.length)&&!Fa(e)}function Na(e){return Va(e)&&Ia(e)}var Ra=en||ou,ja=et?Tt(et):function(e){return Va(e)&&dr(e)==f};function za(e){if(!Va(e))return!1;var t=dr(e);return t==d||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Za(e)}function Fa(e){if(!qa(e))return!1;var t=dr(e);return t==p||t==h||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ba(e){return"number"==typeof e&&e==ns(e)}function $a(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function qa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Va(e){return null!=e&&"object"==typeof e}var Ha=tt?Tt(tt):function(e){return Va(e)&&ni(e)==m};function Ua(e){return"number"==typeof e||Va(e)&&dr(e)==v}function Za(e){if(!Va(e)||dr(e)!=g)return!1;var t=qe(e);if(null===t)return!0;var n=Ce.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&_e.call(n)==Me}var Wa=nt?Tt(nt):function(e){return Va(e)&&dr(e)==y};var Ka=rt?Tt(rt):function(e){return Va(e)&&ni(e)==b};function Ga(e){return"string"==typeof e||!Da(e)&&Va(e)&&dr(e)==k}function Ja(e){return"symbol"==typeof e||Va(e)&&dr(e)==w}var Ya=ot?Tt(ot):function(e){return Va(e)&&$a(e.length)&&!!Be[dr(e)]};var Qa=Io(Sr),Xa=Io((function(e,t){return e<=t}));function es(e){if(!e)return[];if(Ia(e))return Ga(e)?Zt(e):go(e);if(Ye&&e[Ye])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ye]());var t=ni(e);return(t==m?Bt:t==b?Vt:Os)(e)}function ts(e){return e?(e=os(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function ns(e){var t=ts(e),n=t%1;return t===t?n?t-n:t:0}function rs(e){return e?Kn(ns(e),0,4294967295):0}function os(e){if("number"==typeof e)return e;if(Ja(e))return NaN;if(qa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=qa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(K,"");var n=ie.test(e);return n||se.test(e)?He(e.slice(2),n?2:8):oe.test(e)?NaN:+e}function is(e){return yo(e,ks(e))}function as(e){return null==e?"":Jr(e)}var ss=ko((function(e,t){if(fi(t)||Ia(t))yo(t,bs(t),e);else for(var n in t)Ce.call(t,n)&&qn(e,n,t[n])})),us=ko((function(e,t){yo(t,ks(t),e)})),ls=ko((function(e,t,n,r){yo(t,ks(t),e,r)})),cs=ko((function(e,t,n,r){yo(t,bs(t),e,r)})),fs=Ho(Wn);var ds=jr((function(e,t){e=he(e);var n=-1,r=t.length,o=r>2?t[2]:void 0;for(o&&si(t[0],t[1],o)&&(r=1);++n1),t})),yo(e,Zo(e),n),r&&(n=Gn(n,7,qo));for(var o=t.length;o--;)Qr(n,t[o]);return n}));var xs=Ho((function(e,t){return null==e?{}:function(e,t){return Dr(e,t,(function(t,n){return ms(e,n)}))}(e,t)}));function Ss(e,t){if(null==e)return{};var n=pt(Zo(e),(function(e){return[e]}));return t=Jo(t),Dr(e,n,(function(e,n){return t(e,n[0])}))}var Es=zo(bs),Ms=zo(ks);function Os(e){return null==e?[]:At(e,bs(e))}var Ls=xo((function(e,t,n){return t=t.toLowerCase(),e+(n?Ts(t):t)}));function Ts(e){return zs(as(e).toLowerCase())}function As(e){return(e=as(e))&&e.replace(le,Rt).replace(Pe,"")}var Ds=xo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ps=xo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Is=Co("toLowerCase");var Ns=xo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Rs=xo((function(e,t,n){return e+(n?" ":"")+zs(t)}));var js=xo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),zs=Co("toUpperCase");function Fs(e,t,n){return e=as(e),void 0===(t=n?void 0:t)?function(e){return je.test(e)}(e)?function(e){return e.match(Ne)||[]}(e):function(e){return e.match(ee)||[]}(e):e.match(t)||[]}var Bs=jr((function(e,t){try{return it(e,void 0,t)}catch(n){return za(n)?n:new o(n)}})),$s=Ho((function(e,t){return st(t,(function(t){t=Si(t),Zn(e,t,ga(e[t],e))})),e}));function qs(e){return function(){return e}}var Vs=Mo(),Hs=Mo(!0);function Us(e){return e}function Zs(e){return _r("function"==typeof e?e:Gn(e,1))}var Ws=jr((function(e,t){return function(n){return gr(n,e,t)}})),Ks=jr((function(e,t){return function(n){return gr(e,n,t)}}));function Gs(e,t,n){var r=bs(t),o=lr(t,r);null!=n||qa(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=lr(t,bs(t)));var i=!(qa(n)&&"chain"in n)||!!n.chain,a=Fa(e);return st(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=go(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,ht([this.value()],arguments))})})),e}function Js(){}var Ys=Ao(pt),Qs=Ao(lt),Xs=Ao(gt);function eu(e){return ui(e)?St(Si(e)):function(e){return function(t){return cr(t,e)}}(e)}var tu=Po(),nu=Po(!0);function ru(){return[]}function ou(){return!1}var iu=To((function(e,t){return e+t}),0),au=Ro("ceil"),su=To((function(e,t){return e/t}),1),uu=Ro("floor");var lu=To((function(e,t){return e*t}),1),cu=Ro("round"),fu=To((function(e,t){return e-t}),0);return Mn.after=function(e,t){if("function"!=typeof t)throw new ge(i);return e=ns(e),function(){if(--e<1)return t.apply(this,arguments)}},Mn.ary=ma,Mn.assign=ss,Mn.assignIn=us,Mn.assignInWith=ls,Mn.assignWith=cs,Mn.at=fs,Mn.before=va,Mn.bind=ga,Mn.bindAll=$s,Mn.bindKey=ya,Mn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Da(e)?e:[e]},Mn.chain=ea,Mn.chunk=function(e,t,r){t=(r?si(e,t,r):void 0===t)?1:on(ns(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,s=n(Yt(o/t));io?0:o+n),(r=void 0===r||r>o?o:ns(r))<0&&(r+=o),r=n>r?0:rs(r);n>>0)?(e=as(e))&&("string"==typeof t||null!=t&&!Wa(t))&&!(t=Jr(t))&&Ft(e)?uo(Zt(e),0,n):e.split(t,n):[]},Mn.spread=function(e,t){if("function"!=typeof e)throw new ge(i);return t=null==t?0:on(ns(t),0),jr((function(n){var r=n[t],o=uo(n,0,t);return r&&ht(o,r),it(e,this,o)}))},Mn.tail=function(e){var t=null==e?0:e.length;return t?Hr(e,1,t):[]},Mn.take=function(e,t,n){return e&&e.length?Hr(e,0,(t=n||void 0===t?1:ns(t))<0?0:t):[]},Mn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,(t=r-(t=n||void 0===t?1:ns(t)))<0?0:t,r):[]},Mn.takeRightWhile=function(e,t){return e&&e.length?eo(e,Jo(t,3),!1,!0):[]},Mn.takeWhile=function(e,t){return e&&e.length?eo(e,Jo(t,3)):[]},Mn.tap=function(e,t){return t(e),e},Mn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new ge(i);return qa(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),ba(e,t,{leading:r,maxWait:t,trailing:o})},Mn.thru=ta,Mn.toArray=es,Mn.toPairs=Es,Mn.toPairsIn=Ms,Mn.toPath=function(e){return Da(e)?pt(e,Si):Ja(e)?[e]:go(xi(as(e)))},Mn.toPlainObject=is,Mn.transform=function(e,t,n){var r=Da(e),o=r||Ra(e)||Ya(e);if(t=Jo(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:qa(e)&&Fa(i)?On(qe(e)):{}}return(o?st:sr)(e,(function(e,r,o){return t(n,e,r,o)})),n},Mn.unary=function(e){return ma(e,1)},Mn.union=Vi,Mn.unionBy=Hi,Mn.unionWith=Ui,Mn.uniq=function(e){return e&&e.length?Yr(e):[]},Mn.uniqBy=function(e,t){return e&&e.length?Yr(e,Jo(t,2)):[]},Mn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Yr(e,void 0,t):[]},Mn.unset=function(e,t){return null==e||Qr(e,t)},Mn.unzip=Zi,Mn.unzipWith=Wi,Mn.update=function(e,t,n){return null==e?e:Xr(e,t,io(n))},Mn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Xr(e,t,io(n),r)},Mn.values=Os,Mn.valuesIn=function(e){return null==e?[]:At(e,ks(e))},Mn.without=Ki,Mn.words=Fs,Mn.wrap=function(e,t){return Sa(io(t),e)},Mn.xor=Gi,Mn.xorBy=Ji,Mn.xorWith=Yi,Mn.zip=Qi,Mn.zipObject=function(e,t){return ro(e||[],t||[],qn)},Mn.zipObjectDeep=function(e,t){return ro(e||[],t||[],Br)},Mn.zipWith=Xi,Mn.entries=Es,Mn.entriesIn=Ms,Mn.extend=us,Mn.extendWith=ls,Gs(Mn,Mn),Mn.add=iu,Mn.attempt=Bs,Mn.camelCase=Ls,Mn.capitalize=Ts,Mn.ceil=au,Mn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=os(n))===n?n:0),void 0!==t&&(t=(t=os(t))===t?t:0),Kn(os(e),t,n)},Mn.clone=function(e){return Gn(e,4)},Mn.cloneDeep=function(e){return Gn(e,5)},Mn.cloneDeepWith=function(e,t){return Gn(e,5,t="function"==typeof t?t:void 0)},Mn.cloneWith=function(e,t){return Gn(e,4,t="function"==typeof t?t:void 0)},Mn.conformsTo=function(e,t){return null==t||Jn(e,t,bs(t))},Mn.deburr=As,Mn.defaultTo=function(e,t){return null==e||e!==e?t:e},Mn.divide=su,Mn.endsWith=function(e,t,n){e=as(e),t=Jr(t);var r=e.length,o=n=void 0===n?r:Kn(ns(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Mn.eq=Oa,Mn.escape=function(e){return(e=as(e))&&F.test(e)?e.replace(j,jt):e},Mn.escapeRegExp=function(e){return(e=as(e))&&W.test(e)?e.replace(Z,"\\$&"):e},Mn.every=function(e,t,n){var r=Da(e)?lt:tr;return n&&si(e,t,n)&&(t=void 0),r(e,Jo(t,3))},Mn.find=oa,Mn.findIndex=Ai,Mn.findKey=function(e,t){return bt(e,Jo(t,3),sr)},Mn.findLast=ia,Mn.findLastIndex=Di,Mn.findLastKey=function(e,t){return bt(e,Jo(t,3),ur)},Mn.floor=uu,Mn.forEach=aa,Mn.forEachRight=sa,Mn.forIn=function(e,t){return null==e?e:ir(e,Jo(t,3),ks)},Mn.forInRight=function(e,t){return null==e?e:ar(e,Jo(t,3),ks)},Mn.forOwn=function(e,t){return e&&sr(e,Jo(t,3))},Mn.forOwnRight=function(e,t){return e&&ur(e,Jo(t,3))},Mn.get=hs,Mn.gt=La,Mn.gte=Ta,Mn.has=function(e,t){return null!=e&&ri(e,t,hr)},Mn.hasIn=ms,Mn.head=Ii,Mn.identity=Us,Mn.includes=function(e,t,n,r){e=Ia(e)?e:Os(e),n=n&&!r?ns(n):0;var o=e.length;return n<0&&(n=on(o+n,0)),Ga(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&wt(e,t,n)>-1},Mn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ns(n);return o<0&&(o=on(r+o,0)),wt(e,t,o)},Mn.inRange=function(e,t,n){return t=ts(t),void 0===n?(n=t,t=0):n=ts(n),function(e,t,n){return e>=an(t,n)&&e=-9007199254740991&&e<=9007199254740991},Mn.isSet=Ka,Mn.isString=Ga,Mn.isSymbol=Ja,Mn.isTypedArray=Ya,Mn.isUndefined=function(e){return void 0===e},Mn.isWeakMap=function(e){return Va(e)&&ni(e)==_},Mn.isWeakSet=function(e){return Va(e)&&"[object WeakSet]"==dr(e)},Mn.join=function(e,t){return null==e?"":nn.call(e,t)},Mn.kebabCase=Ds,Mn.last=zi,Mn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return void 0!==n&&(o=(o=ns(n))<0?on(r+o,0):an(o,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):kt(e,Ct,o,!0)},Mn.lowerCase=Ps,Mn.lowerFirst=Is,Mn.lt=Qa,Mn.lte=Xa,Mn.max=function(e){return e&&e.length?nr(e,Us,pr):void 0},Mn.maxBy=function(e,t){return e&&e.length?nr(e,Jo(t,2),pr):void 0},Mn.mean=function(e){return xt(e,Us)},Mn.meanBy=function(e,t){return xt(e,Jo(t,2))},Mn.min=function(e){return e&&e.length?nr(e,Us,Sr):void 0},Mn.minBy=function(e,t){return e&&e.length?nr(e,Jo(t,2),Sr):void 0},Mn.stubArray=ru,Mn.stubFalse=ou,Mn.stubObject=function(){return{}},Mn.stubString=function(){return""},Mn.stubTrue=function(){return!0},Mn.multiply=lu,Mn.nth=function(e,t){return e&&e.length?Tr(e,ns(t)):void 0},Mn.noConflict=function(){return We._===this&&(We._=Oe),this},Mn.noop=Js,Mn.now=ha,Mn.pad=function(e,t,n){e=as(e);var r=(t=ns(t))?Ut(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Do(Qt(o),n)+e+Do(Yt(o),n)},Mn.padEnd=function(e,t,n){e=as(e);var r=(t=ns(t))?Ut(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var o=ln();return an(e+o*(t-e+Ve("1e-"+((o+"").length-1))),t)}return Nr(e,t)},Mn.reduce=function(e,t,n){var r=Da(e)?mt:Mt,o=arguments.length<3;return r(e,Jo(t,4),n,o,Xn)},Mn.reduceRight=function(e,t,n){var r=Da(e)?vt:Mt,o=arguments.length<3;return r(e,Jo(t,4),n,o,er)},Mn.repeat=function(e,t,n){return t=(n?si(e,t,n):void 0===t)?1:ns(t),Rr(as(e),t)},Mn.replace=function(){var e=arguments,t=as(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Mn.result=function(e,t,n){var r=-1,o=(t=ao(t,e)).length;for(o||(o=1,e=void 0);++r9007199254740991)return[];var n=4294967295,r=an(e,4294967295);e-=4294967295;for(var o=Lt(r,t=Jo(t));++n=i)return e;var s=n-Ut(r);if(s<1)return r;var u=a?uo(a,0,s).join(""):e.slice(0,s);if(void 0===o)return u+r;if(a&&(s+=u.length-s),Wa(o)){if(e.slice(s).search(o)){var l,c=u;for(o.global||(o=me(o.source,as(re.exec(o))+"g")),o.lastIndex=0;l=o.exec(c);)var f=l.index;u=u.slice(0,void 0===f?s:f)}}else if(e.indexOf(Jr(o),s)!=s){var d=u.lastIndexOf(o);d>-1&&(u=u.slice(0,d))}return u+r},Mn.unescape=function(e){return(e=as(e))&&z.test(e)?e.replace(R,Wt):e},Mn.uniqueId=function(e){var t=++xe;return as(e)+t},Mn.upperCase=js,Mn.upperFirst=zs,Mn.each=aa,Mn.eachRight=sa,Mn.first=Ii,Gs(Mn,function(){var e={};return sr(Mn,(function(t,n){Ce.call(Mn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Mn.VERSION="4.17.20",st(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Mn[e].placeholder=Mn})),st(["drop","take"],(function(e,t){An.prototype[e]=function(n){n=void 0===n?1:on(ns(n),0);var r=this.__filtered__&&!t?new An(this):this.clone();return r.__filtered__?r.__takeCount__=an(n,r.__takeCount__):r.__views__.push({size:an(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},An.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),st(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;An.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Jo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),st(["head","last"],(function(e,t){var n="take"+(t?"Right":"");An.prototype[e]=function(){return this[n](1).value()[0]}})),st(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");An.prototype[e]=function(){return this.__filtered__?new An(this):this[n](1)}})),An.prototype.compact=function(){return this.filter(Us)},An.prototype.find=function(e){return this.filter(e).head()},An.prototype.findLast=function(e){return this.reverse().find(e)},An.prototype.invokeMap=jr((function(e,t){return"function"==typeof e?new An(this):this.map((function(n){return gr(n,e,t)}))})),An.prototype.reject=function(e){return this.filter(Ca(Jo(e)))},An.prototype.slice=function(e,t){e=ns(e);var n=this;return n.__filtered__&&(e>0||t<0)?new An(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ns(t))<0?n.dropRight(-t):n.take(t-e)),n)},An.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},An.prototype.toArray=function(){return this.take(4294967295)},sr(An.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Mn[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);o&&(Mn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof An,u=a[0],l=s||Da(t),c=function(e){var t=o.apply(Mn,ht([e],a));return r&&f?t[0]:t};l&&n&&"function"==typeof u&&1!=u.length&&(s=l=!1);var f=this.__chain__,d=!!this.__actions__.length,p=i&&!f,h=s&&!d;if(!i&&l){t=h?t:new An(this);var m=e.apply(t,a);return m.__actions__.push({func:ta,args:[c],thisArg:void 0}),new Tn(m,f)}return p&&h?e.apply(this,a):(m=this.thru(c),p?r?m.value()[0]:m.value():m)})})),st(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ye[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Mn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Da(o)?o:[],e)}return this[n]((function(n){return t.apply(Da(n)?n:[],e)}))}})),sr(An.prototype,(function(e,t){var n=Mn[t];if(n){var r=n.name+"";Ce.call(yn,r)||(yn[r]=[]),yn[r].push({name:t,func:n})}})),yn[Oo(void 0,2).name]=[{name:"wrapper",func:void 0}],An.prototype.clone=function(){var e=new An(this.__wrapped__);return e.__actions__=go(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=go(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=go(this.__views__),e},An.prototype.reverse=function(){if(this.__filtered__){var e=new An(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},An.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Da(e),r=t<0,o=n?e.length:0,i=function(e,t,n){var r=-1,o=n.length;for(;++r=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Mn.prototype.plant=function(e){for(var t,n=this;n instanceof Ln;){var r=Mi(n);r.__index__=0,r.__values__=void 0,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Mn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof An){var t=e;return this.__actions__.length&&(t=new An(this)),(t=t.reverse()).__actions__.push({func:ta,args:[qi],thisArg:void 0}),new Tn(t,this.__chain__)}return this.thru(qi)},Mn.prototype.toJSON=Mn.prototype.valueOf=Mn.prototype.value=function(){return to(this.__wrapped__,this.__actions__)},Mn.prototype.first=Mn.prototype.head,Ye&&(Mn.prototype[Ye]=function(){return this}),Mn}();We._=Kt,void 0===(o=function(){return Kt}.call(t,n,t,r))||(r.exports=o)}).call(this)}).call(this,n(22),n(68)(e))},function(e,t,n){"use strict";e.exports=n(314)},function(e,t,n){"use strict";var r=n(44),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=c(n);f&&(a=a.concat(f(n)));for(var s=u(t),m=u(n),v=0;ve.length)&&(t=e.length);for(var n=0,r=new Array(t);n1)for(var n=1;n=0;l--)if(c[l]!==f[l])return!1;for(l=c.length-1;l>=0;l--)if(u=c[l],!y(e[u],t[u],n,r))return!1;return!0}(e,t,n,a))}return n?e===t:e==t}function b(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function k(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(n){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,n,r){var o;if("function"!==typeof t)throw new TypeError('"block" argument must be a function');"string"===typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(n){t=n}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&v(o,n,"Missing expected exception"+r);var a="string"===typeof r,s=!e&&o&&!n;if((!e&&i.isError(o)&&a&&k(o,n)||s)&&v(o,n,"Got unwanted exception"+r),e&&o&&n&&!k(o,n)||!e&&o)throw o}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return h(m(e.actual),128)+" "+e.operator+" "+h(m(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=p(t),i=r.indexOf("\n"+o);if(i>=0){var a=r.indexOf("\n",i+1);r=r.substring(a+1)}this.stack=r}}},i.inherits(f.AssertionError,Error),f.fail=v,f.ok=g,f.equal=function(e,t,n){e!=t&&v(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&v(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){y(e,t,!1)||v(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){y(e,t,!0)||v(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){y(e,t,!1)&&v(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){y(t,n,!0)&&v(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&v(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&v(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){w(!0,e,t,n)},f.doesNotThrow=function(e,t,n){w(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var _=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}}).call(this,n(22))},function(e,t,n){"use strict";var r=n(16),o=n(20);function i(){var e=r(["\n will-change: opacity, transform;\n padding: 8px 16px;\n position: absolute;\n z-index: ",";\n opacity: 0;\n background-color: ",';\n border-radius: 4px;\n transform: scale(0.95);\n transition: opacity 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275),\n transform 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275);\n transition-delay: 150ms;\n line-height: 0;\n height: 40px;\n box-sizing: border-box;\n pointer-events: none;\n white-space: nowrap;\n\n &::before {\n content: "";\n display: block;\n width: 24px;\n height: 24px;\n transform: translateX(-50%) rotate(45deg);\n background: ',";\n border-radius: 3px;\n z-index: -1;\n position: absolute;\n bottom: -2px;\n left: calc(50% - ","px);\n }\n\n * {\n box-sizing: border-box;\n }\n\n ",";\n\n @media print {\n display: none;\n }\n"]);return i=function(){return e},e}var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var u=a(n(290)),l=s(n(1)),c=n(60),f=a(n(15)),d="undefined"===typeof window,p={left:-1e3,top:0,offset:0,visible:!1};function h(e){var t=e.menuRef,n=e.isSelectingText,r=e.props,i=r.view,a=r.active,s=i.state.selection,c=function(e){var t=l.useState({width:0,height:0}),n=o(t,2),r=n[0],i=n[1];return l.useEffect((function(){var t=new u.default((function(e){e.forEach((function(e){var t=e.target;r.width===t.clientWidth&&r.height===t.clientHeight||i({width:t.clientWidth,height:t.clientHeight})}))}));return t.observe(e.current),function(){return t.disconnect()}}),[e]),r}(t),f=c.width,h=c.height;if(!a||!f||!h||d||n)return p;var m=i.coordsAtPos(s.$from.pos),v=i.coordsAtPos(s.$to.pos),g={top:Math.min(m.top,v.top),bottom:Math.max(m.bottom,v.bottom),left:Math.min(m.left,v.left),right:Math.max(m.right,v.right)},y=s.isColSelection&&s.isColSelection(),b=s.isRowSelection&&s.isRowSelection();if(y){var k=i.domAtPos(s.$from.pos).node.getBoundingClientRect().width;g.top-=20,g.right=g.left+k}b&&(g.right=g.left=g.left-18);var w=Math.abs(g.right-g.left)/2,_=g.left+w,C=Math.min(window.innerWidth-f-12,Math.max(12,_-f/2)),x=Math.min(window.innerHeight-h-12,Math.max(12,g.top-h)),S=C-(_-f/2);return{left:Math.round(C+window.scrollX),top:Math.round(x+window.scrollY),offset:Math.round(S),visible:!0}}function m(e){var t=e.forwardedRef||l.createRef(),n=l.useState(!1),r=o(n,2),i=r[0],a=r[1],s=h({menuRef:t,isSelectingText:i,props:e});return l.useEffect((function(){var t=function(){e.active||a(!0)},n=function(){a(!1)};return window.addEventListener("mousedown",t),window.addEventListener("mouseup",n),function(){window.removeEventListener("mousedown",t),window.removeEventListener("mouseup",n)}}),[e.active]),l.createElement(c.Portal,null,l.createElement(v,{active:e.active&&s.visible,ref:t,offset:s.offset,style:{top:"".concat(s.top,"px"),left:"".concat(s.left,"px")}},s.visible&&e.children))}var v=f.default.div(i(),(function(e){return e.theme.zIndex+100}),(function(e){return e.theme.toolbarBackground}),(function(e){return e.theme.toolbarBackground}),(function(e){return e.offset||0}),(function(e){return e.active&&"\n transform: translateY(-6px) scale(1);\n pointer-events: all;\n opacity: 1;\n "}));t.default=l.forwardRef((function(e,t){return l.createElement(m,Object.assign({},e,{forwardedRef:t}))}))},function(e,t,n){"use strict";var r=n(16),o=n(40),i=n(34),a=n(41),s=n(4),u=n(5),l=n(6),c=n(7);function f(){var e=r(["\n background: ",";\n position: absolute;\n top: 100%;\n width: 100%;\n height: auto;\n left: 0;\n padding: 4px 8px 8px;\n margin: 0;\n margin-top: -3px;\n margin-bottom: 0;\n border-radius: 0 0 4px 4px;\n overflow-y: auto;\n max-height: 25vh;\n"]);return f=function(){return e},e}function d(){var e=r(["\n margin-left: -8px;\n margin-right: -8px;\n min-width: 336px;\n"]);return d=function(){return e},e}var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},h=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var m=p(n(1)),v=n(18),g=n(24),y=p(n(15)),b=h(n(77)),k=h(n(73)),w=h(n(78)),_=h(n(79)),C=h(n(291)),x=function(e){l(n,e);var t=c(n);function n(){var e;return s(this,n),(e=t.apply(this,arguments)).discardInputValue=!1,e.initialValue=e.href,e.initialSelectionLength=e.props.to-e.props.from,e.state={selectedIndex:-1,value:e.href,previousValue:"",results:{}},e.componentWillUnmount=function(){if(!e.discardInputValue&&e.state.value!==e.initialValue){var t=(e.state.value||"").trim();if(!t)return e.handleRemoveLink();e.save(t,t)}},e.save=function(t,n){if(0!==(t=t.trim()).length){e.discardInputValue=!0;var r=e.props,o=r.from,i=r.to;b.default(t)||t.startsWith("/")||(t="https://".concat(t)),e.props.onSelectLink({href:t,title:n,from:o,to:i})}},e.handleKeyDown=function(t){switch(t.key){case"Enter":t.preventDefault();var n=e.state,r=n.selectedIndex,o=n.value,i=e.state.results[o]||[],a=e.props.onCreateLink;if(r>=0){var s=i[r];s?e.save(s.url,s.title):a&&r===i.length&&e.handleCreateLink(e.suggestedLinkTitle)}else e.save(o,o);return void(e.initialSelectionLength&&e.moveSelectionToEnd());case"Escape":return t.preventDefault(),void(e.initialValue?e.setState({value:e.initialValue},e.moveSelectionToEnd):e.handleRemoveLink());case"ArrowUp":if(t.shiftKey)return;t.preventDefault(),t.stopPropagation();var u=e.state.selectedIndex-1;return void e.setState({selectedIndex:Math.max(-1,u)});case"ArrowDown":if(t.shiftKey)return;case"Tab":t.preventDefault(),t.stopPropagation();var l=e.state,c=l.selectedIndex,f=l.value,d=(e.state.results[f]||[]).length,p=c+1;return void e.setState({selectedIndex:Math.min(p,d)})}},e.handleFocusLink=function(t){e.setState({selectedIndex:t})},e.handleChange=function(){var t=a(o.mark((function t(n){var r,a,s;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.target.value,e.setState({value:r,selectedIndex:-1}),!(a=r.trim())||!e.props.onSearchLink){t.next=14;break}return t.prev=4,t.next=7,e.props.onSearchLink(a);case 7:s=t.sent,e.setState((function(e){return{results:Object.assign(Object.assign({},e.results),i({},a,s)),previousValue:a}})),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),console.error(t.t0);case 14:case"end":return t.stop()}}),t,null,[[4,11]])})));return function(e){return t.apply(this,arguments)}}(),e.handleOpenLink=function(t){t.preventDefault(),e.props.onClickLink(e.href,t)},e.handleCreateLink=function(t){e.discardInputValue=!0;var n=e.props.onCreateLink;if(0!==(t=t.trim()).length)return n?n(t):void 0},e.handleRemoveLink=function(){e.discardInputValue=!0;var t=e.props,n=t.from,r=t.to,o=t.mark,i=t.view,a=t.onRemoveLink,s=e.props.view,u=s.state,l=s.dispatch;o&&l(u.tr.removeMark(n,r,o)),a&&a(),i.focus()},e.handleSelectLink=function(t,n){return function(r){r.preventDefault(),e.save(t,n),e.initialSelectionLength&&e.moveSelectionToEnd()}},e.moveSelectionToEnd=function(){var t=e.props,n=t.to,r=t.view,o=r.state;(0,r.dispatch)(v.setTextSelection(n)(o.tr)),r.focus()},e}return u(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.dictionary,r=t.theme,o=this.state,i=o.value,a=o.selectedIndex,s=this.state.results[i.trim()]||this.state.results[this.state.previousValue]||[],u=this.props.tooltip,l=i.match(/^https?:\/\//i),c=this.suggestedLinkTitle,f=!!this.props.onCreateLink&&!(c===this.initialValue)&&c.length>0&&!l,d=!!c&&(f||s.length>0);return m.createElement(S,null,m.createElement(w.default,{value:i,placeholder:f?n.findOrCreateDoc:n.searchOrPasteLink,onKeyDown:this.handleKeyDown,onChange:this.handleChange,autoFocus:""===this.href}),m.createElement(_.default,{onClick:this.handleOpenLink,disabled:!i},m.createElement(u,{tooltip:n.openLink,placement:"top"},m.createElement(g.OpenIcon,{color:r.toolbarItem}))),m.createElement(_.default,{onClick:this.handleRemoveLink},m.createElement(u,{tooltip:n.removeLink,placement:"top"},this.initialValue?m.createElement(g.TrashIcon,{color:r.toolbarItem}):m.createElement(g.CloseIcon,{color:r.toolbarItem}))),d&&m.createElement(E,{id:"link-search-results"},s.map((function(t,n){return m.createElement(C.default,{key:t.url,title:t.title,subtitle:t.subtitle,icon:m.createElement(g.DocumentIcon,{color:r.toolbarItem}),onMouseOver:function(){return e.handleFocusLink(n)},onClick:e.handleSelectLink(t.url,t.title),selected:n===a})})),f&&m.createElement(C.default,{key:"create",title:c,subtitle:n.createNewDoc,icon:m.createElement(g.PlusIcon,{color:r.toolbarItem}),onMouseOver:function(){return e.handleFocusLink(s.length)},onClick:function(){e.handleCreateLink(c),e.initialSelectionLength&&e.moveSelectionToEnd()},selected:s.length===a})))}},{key:"href",get:function(){return this.props.mark?this.props.mark.attrs.href:""}},{key:"suggestedLinkTitle",get:function(){var e=this.props.view.state,t=this.state.value,n=e.doc.cut(e.selection.from,e.selection.to).textContent;return t.trim()||n.trim()}}]),n}(m.Component),S=y.default(k.default)(d()),E=y.default.ol(f(),(function(e){return e.theme.toolbarBackground}));t.default=y.withTheme(x)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){try{return new URL(e),!0}catch(t){return!1}}},function(e,t,n){"use strict";var r=n(16);function o(){var e=r(["\n font-size: 15px;\n background: ",";\n color: ",";\n border-radius: 2px;\n padding: 3px 8px;\n border: 0;\n margin: 0;\n outline: none;\n flex-grow: 1;\n"]);return o=function(){return e},e}var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(n(15)).default.input(o(),(function(e){return e.theme.toolbarInput}),(function(e){return e.theme.toolbarItem}));t.default=a},function(e,t,n){"use strict";var r=n(16);function o(){var e=r(["\n display: inline-block;\n flex: 0;\n width: 24px;\n height: 24px;\n cursor: pointer;\n margin-left: 10px;\n border: none;\n background: none;\n transition: opacity 100ms ease-in-out;\n padding: 0;\n opacity: 0.7;\n outline: none;\n\n &:first-child {\n margin-left: 0;\n }\n\n &:hover {\n opacity: 1;\n }\n\n &:disabled {\n opacity: 0.3;\n cursor: default;\n }\n\n ",";\n"]);return o=function(){return e},e}var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(n(15));t.default=a.default.button(o(),(function(e){return e.active&&"opacity: 1;"}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e||!t)return!1;var n=e.parent.childAfter(e.parentOffset);if(!n.node)return!1;var r=n.node.marks.find((function(e){return e.type===t}));if(!r)return!1;for(var o=e.index(),i=e.start()+n.offset,a=o+1,s=i+n.node.nodeSize;o>0&&r.isInSet(e.parent.child(o-1).marks);)o-=1,i-=e.parent.child(o).nodeSize;for(;a1&&void 0!==arguments[1]?arguments[1]:0;"text"===r.type.name&&r.marks.forEach((function(e){if("link"===e.type.name&&e.attrs.href===t&&(n={node:r,pos:o}))return!1})),r.content.size&&r.descendants(e)}(e),n}var s=function(){var e=o(r.mark((function e(t,n,o,s){var u,l,c,f,d,p,h;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=t.dispatch,l=t.state,c=s.onCreateLink,f=s.onShowToast,e.prev=2,e.next=5,c(n);case 5:if(d=e.sent,p=a(t.state.doc,o)){e.next=9;break}return e.abrupt("return");case 9:u(t.state.tr.removeMark(p.pos,p.pos+p.node.nodeSize,l.schema.marks.link).addMark(p.pos,p.pos+p.node.nodeSize,l.schema.marks.link.create({href:d}))),e.next=19;break;case 12:if(e.prev=12,e.t0=e.catch(2),h=a(t.state.doc,o)){e.next=17;break}return e.abrupt("return");case 17:u(t.state.tr.removeMark(h.pos,h.pos+h.node.nodeSize,l.schema.marks.link)),f&&f(s.dictionary.createLinkError,i.ToastType.Error);case 19:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(t,n,r,o){return e.apply(this,arguments)}}();t.default=s},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return n.test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=[];if(e.dataTransfer){var n=e.dataTransfer;n.files&&n.files.length?t=n.files:n.items&&n.items.length&&(t=n.items)}else e.target&&e.target.files&&(t=e.target.files);return Array.prototype.slice.call(t)}},function(e,t,n){"use strict";var r=n(42),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(86)),a=n(29);t.default=function(e,t,n,o,s){var u=o.filter((function(e){return/image/i.test(e.type)}));if(0!==u.length){var l=s.dictionary,c=s.uploadImage,f=s.onImageUploadStart,d=s.onImageUploadStop,p=s.onShowToast;if(c){t.preventDefault(),f&&f();var h,m=e.state.schema,v=0,g=r(u);try{var y=function(){var t=h.value,r={},o=e.state.tr;o.setMeta(i.default,{add:{id:r,file:t,pos:n}}),e.dispatch(o),c(t).then((function(t){var n=i.findPlaceholder(e.state,r);if(null!==n){var o=e.state.tr.replaceWith(n,n,m.nodes.image.create({src:t})).setMeta(i.default,{remove:{id:r}});e.dispatch(o)}})).catch((function(t){console.error(t);var n=e.state.tr.setMeta(i.default,{remove:{id:r}});e.dispatch(n),p&&p(l.imageUploadError,a.ToastType.Error)})).finally((function(){++v===u.length&&d&&d()}))};for(g.s();!(h=g.n()).done;)y()}catch(b){g.e(b)}finally{g.f()}}else console.warn("uploadImage callback must be defined to handle image uploads.")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(12),i=new r.Plugin({state:{init:function(){return o.DecorationSet.empty},apply:function(e,t){t=t.map(e.mapping,e.doc);var n=e.getMeta(this);if(n&&n.add){var r=document.createElement("div");r.className="image placeholder";var i=document.createElement("img");i.src=URL.createObjectURL(n.add.file),r.appendChild(i);var a=o.Decoration.widget(n.add.pos,r,{id:n.add.id});t=t.add(e.doc,[a])}else n&&n.remove&&(t=t.remove(t.find(null,null,(function(e){return e.id===n.remove.id}))));return t}},props:{decorations:function(e){return this.getState(e)}}});t.default=i,t.findPlaceholder=function(e,t){var n=i.getState(e).find(null,null,(function(e){return e.id===t}));return n.length?n[0].from:null}},function(e,t,n){"use strict";var r=n(20),o=n(23),i=n(34),a=n(4),s=n(5),u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(26),c=n(313),f=n(368),d=u(n(369)),p=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;a(this,e),n&&t.forEach((function(e){e.bindEditor(n)})),this.extensions=t,this.embeds=n?n.props.embeds:void 0}return s(e,[{key:"serializer",value:function(){var e=this.extensions.filter((function(e){return"node"===e.type})).reduce((function(e,t){return Object.assign(Object.assign({},e),i({},t.name,t.toMarkdown))}),{}),t=this.extensions.filter((function(e){return"mark"===e.type})).reduce((function(e,t){return Object.assign(Object.assign({},e),i({},t.name,t.toMarkdown))}),{});return new f.MarkdownSerializer(e,t)}},{key:"parser",value:function(e){var t=e.schema,n=this.extensions.filter((function(e){return"mark"===e.type||"node"===e.type})).reduce((function(e,t){var n=t.parseMarkdown();return n?Object.assign(Object.assign({},e),i({},t.markdownToken||t.name,n)):e}),{});return new c.MarkdownParser(t,d.default({embeds:this.embeds}),n)}},{key:"keymaps",value:function(e){var t=e.schema,n=this.extensions.filter((function(e){return["extension"].includes(e.type)})).filter((function(e){return e.keys})).map((function(e){return e.keys({schema:t})})),r=this.extensions.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.keys})).map((function(e){return e.keys({type:t["".concat(e.type,"s")][e.name],schema:t})}));return[].concat(o(n),o(r)).map((function(e){return l.keymap(e)}))}},{key:"inputRules",value:function(e){var t=e.schema,n=this.extensions.filter((function(e){return["extension"].includes(e.type)})).filter((function(e){return e.inputRules})).map((function(e){return e.inputRules({schema:t})})),r=this.extensions.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.inputRules})).map((function(e){return e.inputRules({type:t["".concat(e.type,"s")][e.name],schema:t})}));return[].concat(o(n),o(r)).reduce((function(e,t){return[].concat(o(e),o(t))}),[])}},{key:"commands",value:function(e){var t=e.schema,n=e.view;return this.extensions.filter((function(e){return e.commands})).reduce((function(e,o){var i=o.name,a=o.type,s={},u=o.commands(Object.assign({schema:t},["node","mark"].includes(a)?{type:t["".concat(a,"s")][i]}:{})),l=function(e,t){return!!n.editable&&(n.focus(),e(t)(n.state,n.dispatch,n))},c=function(e,t){Array.isArray(t)?s[e]=function(e){return t.forEach((function(t){return l(t,e)}))}:"function"===typeof t&&(s[e]=function(e){return l(t,e)})};return"object"===typeof u?Object.entries(u).forEach((function(e){var t=r(e,2),n=t[0],o=t[1];c(n,o)})):c(i,u),Object.assign(Object.assign({},e),s)}),{})}},{key:"nodes",get:function(){return this.extensions.filter((function(e){return"node"===e.type})).reduce((function(e,t){return Object.assign(Object.assign({},e),i({},t.name,t.schema))}),{})}},{key:"marks",get:function(){return this.extensions.filter((function(e){return"mark"===e.type})).reduce((function(e,t){var n=t.name,r=t.schema;return Object.assign(Object.assign({},e),i({},n,r))}),{})}},{key:"plugins",get:function(){return this.extensions.filter((function(e){return e.plugins})).reduce((function(e,t){var n=t.plugins;return[].concat(o(e),o(n))}),[])}}]),e}();t.default=p},function(e,t,n){"use strict";e.exports=n(315)},function(e,t,n){"use strict";e.exports.encode=n(316),e.exports.decode=n(317),e.exports.format=n(318),e.exports.parse=n(319)},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t,n){"use strict";var r="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",o="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",i=new RegExp("^(?:"+r+"|"+o+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)"),a=new RegExp("^(?:"+r+"|"+o+")");e.exports.HTML_TAG_RE=i,e.exports.HTML_OPEN_CLOSE_TAG_RE=a},function(e,t,n){"use strict";function r(e,t){var n,r,o,i,a,s=[],u=t.length;for(n=0;n=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(o=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].token===r.token-1&&t[r.end+1].token===o.token+1&&t[n-1].marker===r.marker,a=String.fromCharCode(r.marker),(i=e.tokens[r.token]).type=s?"strong_open":"em_open",i.tag=s?"strong":"em",i.nesting=1,i.markup=s?a+a:a,i.content="",(i=e.tokens[o.token]).type=s?"strong_close":"em_close",i.tag=s?"strong":"em",i.nesting=-1,i.markup=s?a+a:a,i.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.tokenize=function(e,t){var n,r,o=e.pos,i=e.src.charCodeAt(o);if(t)return!1;if(95!==i&&42!==i)return!1;for(r=e.scanDelims(e.pos,42===i),n=0;n?@\[\]\\^_`{|}~]/g,lower:!0})))}t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=a(e.textContent);return 0===t?n:"".concat(n,"-").concat(t)}},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"name",get:function(){return"doc"}},{key:"schema",get:function(){return{content:"block+"}}}]),n}(s(n(10)).default);t.default=u},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"toMarkdown",value:function(e,t){e.text(t.text)}},{key:"name",get:function(){return"text"}},{key:"schema",get:function(){return{group:"inline"}}}]),n}(s(n(10)).default);t.default=u},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(13),l=s(n(10)),c=s(n(100)),f=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"inputRules",value:function(e){var t=e.type;return[u.wrappingInputRule(/^\s*>\s$/,t)]}},{key:"commands",value:function(e){var t=e.type;return function(){return c.default(t)}}},{key:"keys",value:function(e){var t=e.type;return{"Ctrl->":c.default(t),"Mod-]":c.default(t)}}},{key:"toMarkdown",value:function(e,t){e.wrapBlock("> ",null,t,(function(){return e.renderContent(t)}))}},{key:"parseMarkdown",value:function(){return{block:"blockquote"}}},{key:"name",get:function(){return"blockquote"}},{key:"schema",get:function(){return{content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return["blockquote",0]}}}}]),n}(l.default);t.default=f},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(14),i=r(n(28));t.default=function(e,t){return function(n,r){return i.default(e)(n)?o.lift(n,r):o.wrapIn(e,t)(n,r)}}},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(13),l=s(n(54)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return l.default(t,n.nodes.list_item)}}},{key:"keys",value:function(e){var t=e.type,n=e.schema;return{"Shift-Ctrl-8":l.default(t,n.nodes.list_item)}}},{key:"inputRules",value:function(e){var t=e.type;return[u.wrappingInputRule(/^\s*([-+*])\s$/,t)]}},{key:"toMarkdown",value:function(e,t){e.renderList(t," ",(function(){return(t.attrs.bullet||"*")+" "}))}},{key:"parseMarkdown",value:function(){return{block:"bullet_list"}}},{key:"name",get:function(){return"bullet_list"}},{key:"schema",get:function(){return{content:"list_item+",group:"block",parseDOM:[{tag:"ul"}],toDOM:function(){return["ul",0]}}}}]),n}(s(n(10)).default);t.default=c},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"name",get:function(){return"code_block"}},{key:"markdownToken",get:function(){return"code_block"}}]),n}(s(n(56)).default);t.default=u},function(e,t,n){"use strict";(function(t){var r=function(){var e="Prism"in t,n=e?t.Prism:void 0;return function(){e?t.Prism=n:delete t.Prism;e=void 0,n=void 0}}();("undefined"===typeof window?"undefined"===typeof self?{}:self:window).Prism={manual:!0,disableWorkerMessageHandler:!0};var o=n(384),i=n(400),a=n(407),s=n(109),u=n(110),l=n(111),c=n(112);r();var f={}.hasOwnProperty;function d(){}d.prototype=a;var p=new d;function h(e){if("function"!==typeof e||!e.displayName)throw new Error("Expected `function` for `grammar`, got `"+e+"`");void 0===p.languages[e.displayName]&&e(p)}e.exports=p,p.highlight=function(e,t){var n,r=a.highlight;if("string"!==typeof e)throw new Error("Expected `string` for `value`, got `"+e+"`");if("Object"===p.util.type(t))n=t,t=null;else{if("string"!==typeof t)throw new Error("Expected `string` for `name`, got `"+t+"`");if(!f.call(p.languages,t))throw new Error("Unknown language: `"+t+"` is not registered");n=p.languages[t]}return r.call(this,e,n,t)},p.register=h,p.alias=function(e,t){var n,r,o,i,a=p.languages,s=e;t&&((s={})[e]=t);for(n in s)for(r=s[n],o=(r="string"===typeof r?[r]:r).length,i=-1;++i=48&&t<=57}},function(e,t,n){"use strict";function r(e){e.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.value.replace(/&/,"&"))})),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[n]},r.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var i={};i[t]={pattern:RegExp(/(<__[\s\S]*?>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return t})),"i"),lookbehind:!0,greedy:!0,inside:o},e.languages.insertBefore("markup","cdata",i)}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}e.exports=r,r.displayName="markup",r.aliases=["html","mathml","svg","xml","ssml","atom","rss"]},function(e,t,n){"use strict";function r(e){!function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},n.tag))}(e)}e.exports=r,r.displayName="css",r.aliases=[]},function(e,t,n){"use strict";function r(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}e.exports=r,r.displayName="clike",r.aliases=[]},function(e,t,n){"use strict";function r(e){e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}}}),e.languages.markup&&e.languages.markup.tag.addInlined("script","javascript"),e.languages.js=e.languages.javascript}e.exports=r,r.displayName="javascript",r.aliases=["js"]},function(e,t,n){"use strict";var r=n(418),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,a,s,u,l,c=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),s=document.createRange(),u=document.getSelection(),(l=document.createElement("span")).textContent=e,l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[t.format]||o.default;window.clipboardData.setData(i,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(l),s.selectNodeContents(l),u.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(f){n&&console.error("unable to copy using clipboardData: ",f),n&&console.error("falling back to prompt"),i=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,e)}}finally{u&&("function"==typeof u.removeRange?u.removeRange(s):u.removeAllRanges()),l&&document.body.removeChild(l),a()}return c}},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(13),l=s(n(54)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"keys",value:function(e){var t=e.type,n=e.schema;return{"Shift-Ctrl-7":l.default(t,n.nodes.checkbox_item)}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return l.default(t,n.nodes.checkbox_item)}}},{key:"inputRules",value:function(e){var t=e.type;return[u.wrappingInputRule(/^-?\s*(\[ \])\s$/i,t)]}},{key:"toMarkdown",value:function(e,t){e.renderList(t," ",(function(){return"- "}))}},{key:"parseMarkdown",value:function(){return{block:"checkbox_list"}}},{key:"name",get:function(){return"checkbox_list"}},{key:"schema",get:function(){var e=this;return{group:"block",content:"checkbox_item+",toDOM:function(){return["ul",{class:e.name},0]},parseDOM:[{tag:'[class="'.concat(this.name,'"]')}]}}}]),n}(s(n(10)).default);t.default=c},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(55),l=function(e){i(n,e);var t=a(n);function n(){var e;return r(this,n),(e=t.apply(this,arguments)).handleChange=function(t){var n=e.editor.view,r=n.state.tr,o=t.target.getBoundingClientRect(),i=o.top,a=o.left,s=n.posAtCoords({top:i,left:a});if(s){var u=r.setNodeMarkup(s.inside,void 0,{checked:t.target.checked});n.dispatch(u)}},e}return o(n,[{key:"keys",value:function(e){var t=e.type;return{Enter:u.splitListItem(t),Tab:u.sinkListItem(t),"Shift-Tab":u.liftListItem(t),"Mod-]":u.sinkListItem(t),"Mod-[":u.liftListItem(t)}}},{key:"toMarkdown",value:function(e,t){e.write(t.attrs.checked?"[x] ":"[ ] "),e.renderContent(t)}},{key:"parseMarkdown",value:function(){return{block:"checkbox_item",getAttrs:function(e){return{checked:!!e.attrGet("checked")||void 0}}}}},{key:"name",get:function(){return"checkbox_item"}},{key:"schema",get:function(){var e=this;return{attrs:{checked:{default:!1}},content:"paragraph block*",defining:!0,draggable:!1,parseDOM:[{tag:'li[data-type="'.concat(this.name,'"]'),getAttrs:function(e){return{checked:e.className.includes("checked")}}}],toDOM:function(t){var n=document.createElement("input");return n.type="checkbox",n.addEventListener("change",e.handleChange),t.attrs.checked&&(n.checked=!0),["li",{"data-type":e.name,class:t.attrs.checked?"checked":void 0},["span",{contentEditable:!1},n],["div",0]]}}}}]),n}(s(n(10)).default);t.default=l},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=s(n(1)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"component",value:function(e){var t=e.isEditable,n=e.isSelected,r=e.theme,o=e.node,i=o.attrs.component;return l.createElement(i,{attrs:o.attrs,isEditable:t,isSelected:n,theme:r})}},{key:"commands",value:function(e){var t=e.type;return function(e){return function(n,r){return r(n.tr.replaceSelectionWith(t.create(e)).scrollIntoView()),!0}}}},{key:"toMarkdown",value:function(e,t){e.ensureNewLine(),e.write("["+e.esc(t.attrs.href)+"]("+e.esc(t.attrs.href)+")"),e.write("\n\n")}},{key:"parseMarkdown",value:function(){return{node:"embed",getAttrs:function(e){return{href:e.attrGet("href"),matches:e.attrGet("matches"),component:e.attrGet("component")}}}}},{key:"name",get:function(){return"embed"}},{key:"schema",get:function(){return{content:"inline*",group:"block",atom:!0,attrs:{href:{},component:{},matches:{}},parseDOM:[{tag:"iframe"}],toDOM:function(e){return["iframe",{src:e.attrs.href,contentEditable:!1},0]}}}}]),n}(u(n(10)).default);t.default=c},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=s(n(10)),l=n(39),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"commands",value:function(e){var t=e.type;return function(){return function(e,n){return n(e.tr.replaceSelectionWith(t.create()).scrollIntoView()),!0}}}},{key:"keys",value:function(e){var t=e.type;return{"Shift-Enter":function(e,n){return!!l.isInTable(e)&&(n(e.tr.replaceSelectionWith(t.create()).scrollIntoView()),!0)}}}},{key:"toMarkdown",value:function(e){e.write(" \\n ")}},{key:"parseMarkdown",value:function(){return{node:"br"}}},{key:"name",get:function(){return"br"}},{key:"schema",get:function(){return{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:function(){return["br"]}}}}]),n}(u.default);t.default=c},function(e,t,n){"use strict";var r=n(34),o=n(4),i=n(5),a=n(6),s=n(7),u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),c=u(n(113)),f=n(12),d=n(13),p=n(14),h=u(n(426)),m=u(n(427)),v=u(n(96)),g=u(n(10)),y=n(29),b=function(e){a(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.apply(this,arguments)).className="heading-name",e.handleCopyLink=function(){return function(t){var n=t.currentTarget.parentNode.previousSibling;if(!n.className.includes(e.className))throw new Error("Did not find anchor as previous sibling of heading");var r="#".concat(n.id),o=window.location.href.split("#")[0];c.default(o+r),e.options.onShowToast&&e.options.onShowToast(e.options.dictionary.linkCopied,y.ToastType.Info)}},e}return i(n,[{key:"toMarkdown",value:function(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t),e.closeBlock(t)}},{key:"parseMarkdown",value:function(){return{block:"heading",getAttrs:function(e){return{level:+e.tag.slice(1)}}}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(e){return m.default(t,n.nodes.paragraph,e)}}},{key:"keys",value:function(e){var t=e.type,n=this.options.levels.reduce((function(e,n){return Object.assign(Object.assign({},e),r({},"Shift-Ctrl-".concat(n),p.setBlockType(t,{level:n})))}),{});return Object.assign(Object.assign({},n),{Backspace:h.default(t)})}},{key:"inputRules",value:function(e){var t=e.type;return this.options.levels.map((function(e){return d.textblockTypeInputRule(new RegExp("^(#{1,".concat(e,"})\\s$")),t,(function(){return{level:e}}))}))}},{key:"name",get:function(){return"heading"}},{key:"defaultOptions",get:function(){return{levels:[1,2,3,4]}}},{key:"schema",get:function(){var e=this;return{attrs:{level:{default:1}},content:"inline*",group:"block",defining:!0,draggable:!1,parseDOM:this.options.levels.map((function(e){return{tag:"h".concat(e),attrs:{level:e},contentElement:"span"}})),toDOM:function(t){var n=document.createElement("button");return n.innerText="#",n.type="button",n.className="heading-anchor",n.addEventListener("click",e.handleCopyLink()),["h".concat(t.attrs.level+(e.options.offset||0)),n,["span",0]]}}}},{key:"plugins",get:function(){var e=this,t=function(t){var n=[],r={};return t.descendants((function(t,o){if(t.type.name===e.name){var i=v.default(t),a=i;r[i]>0&&(a=v.default(t,r[i])),r[i]=void 0!==r[i]?r[i]+1:1,n.push(f.Decoration.widget(o,(function(){var t=document.createElement("a");return t.id=a,t.className=e.className,t}),{side:-1,key:a}))}})),f.DecorationSet.create(t,n)},n=new l.Plugin({state:{init:function(e,n){return t(n.doc)},apply:function(e,n){return e.docChanged?t(e.doc):n}},props:{decorations:function(e){return n.getState(e)}}});return[n]}}]),n}(g.default);t.default=b},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(13),l=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"commands",value:function(e){var t=e.type;return function(){return function(e,n){return n(e.tr.replaceSelectionWith(t.create()).scrollIntoView()),!0}}}},{key:"keys",value:function(e){var t=e.type;return{"Mod-_":function(e,n){return n(e.tr.replaceSelectionWith(t.create()).scrollIntoView()),!0}}}},{key:"inputRules",value:function(e){var t=e.type;return[new u.InputRule(/^(?:---|___\s|\*\*\*\s)$/,(function(e,n,r,o){var i=e.tr;return n[0]&&i.replaceWith(r-1,o,t.create({})),i}))]}},{key:"toMarkdown",value:function(e,t){e.write(t.attrs.markup||"\n---"),e.closeBlock(t)}},{key:"parseMarkdown",value:function(){return{node:"hr"}}},{key:"name",get:function(){return"hr"}},{key:"schema",get:function(){return{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return["hr"]}}}}]),n}(s(n(10)).default);t.default=l},function(e,t,n){"use strict";var r=n(16),o=n(20),i=n(4),a=n(5),s=n(6),u=n(7);function l(){var e=r(["\n border: 0;\n display: block;\n font-size: 13px;\n font-style: italic;\n color: ",";\n padding: 2px 0;\n line-height: 16px;\n text-align: center;\n width: 100%;\n min-height: 1em;\n outline: none;\n background: none;\n resize: none;\n\n &:empty:before {\n color: ",';\n content: "Write a caption";\n pointer-events: none;\n }\n']);return l=function(){return e},e}function c(){var e=r(["\n line-height: 0;\n display: inline-block;\n"]);return c=function(){return e},e}var f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var p=f(n(1)),h=n(2),m=n(13),v=n(18),g=d(n(15)),y=d(n(428)),b=d(n(84)),k=d(n(86)),w=d(n(85)),_=d(n(10)),C=/!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\)/,x={display:"inline-block",maxWidth:"100%",maxHeight:"75vh"},S=function(e){s(n,e);var t=u(n);function n(){var e;return i(this,n),(e=t.apply(this,arguments)).handleKeyDown=function(t){var n=t.node,r=t.getPos;return function(t){if("Enter"===t.key){t.preventDefault();var o=e.editor.view,i=r()+n.nodeSize;return o.focus(),void o.dispatch(v.setTextSelection(i)(o.state.tr))}if("Backspace"===t.key&&""===t.target.innerText){var a=e.editor.view,s=a.state.doc.resolve(r()),u=a.state.tr.setSelection(new h.NodeSelection(s));return a.dispatch(u.deleteSelection()),void a.focus()}}},e.handleBlur=function(t){var n=t.node,r=t.getPos;return function(t){var o=t.target.innerText,i=n.attrs.src;if(o!==n.attrs.alt){var a=e.editor.view,s=a.state.tr,u=r(),l=s.setNodeMarkup(u,void 0,{src:i,alt:o});a.dispatch(l)}}},e.handleSelect=function(t){var n=t.getPos;return function(t){t.preventDefault();var r=e.editor.view,o=r.state.doc.resolve(n()),i=r.state.tr.setSelection(new h.NodeSelection(o));r.dispatch(i)}},e.component=function(t){var n=t.theme,r=t.isEditable,o=t.isSelected,i=t.node.attrs,a=i.alt,s=i.src;return p.createElement("div",{contentEditable:!1,className:"image"},p.createElement(E,{className:o?"ProseMirror-selectednode":"",onClick:r?e.handleSelect(t):void 0},p.createElement(y.default,{image:{src:s,alt:a,style:x},defaultStyles:{overlay:{backgroundColor:n.background}},shouldRespectMaxDimension:!0})),(r||a)&&p.createElement(M,{onKeyDown:e.handleKeyDown(t),onBlur:e.handleBlur(t),tabIndex:-1,contentEditable:r,suppressContentEditableWarning:!0},a))},e}return a(n,[{key:"toMarkdown",value:function(e,t){e.write("!["+e.esc((t.attrs.alt||"").replace("\n","")||"")+"]("+e.esc(t.attrs.src)+")")}},{key:"parseMarkdown",value:function(){return{node:"image",getAttrs:function(e){return{src:e.attrGet("src"),alt:e.children[0]&&e.children[0].content||null}}}}},{key:"commands",value:function(e){var t=e.type;return function(e){return function(n,r){var o=n.selection,i=o.$cursor?o.$cursor.pos:o.$to.pos,a=t.create(e);return r(n.tr.insert(i,a)),!0}}}},{key:"inputRules",value:function(e){var t=e.type;return[new m.InputRule(C,(function(e,n,r,i){var a=o(n,3),s=a[0],u=a[1],l=a[2],c=e.tr;return s&&c.replaceWith(r-1,i,t.create({src:l,alt:u})),c}))]}},{key:"name",get:function(){return"image"}},{key:"schema",get:function(){return{inline:!0,attrs:{src:{},alt:{default:null}},content:"text*",marks:"",group:"inline",selectable:!0,draggable:!0,parseDOM:[{tag:"div[class=image]",getAttrs:function(e){var t=e.getElementsByTagName("img")[0];return{src:t.getAttribute("src"),alt:t.getAttribute("alt")}}}],toDOM:function(e){return["div",{class:"image"},["img",Object.assign(Object.assign({},e.attrs),{contentEditable:!1})],["p",{class:"caption"},0]]}}}},{key:"plugins",get:function(){return[k.default,(e=this.options,new h.Plugin({props:{handleDOMEvents:{paste:function(t,n){if(t.props.editable&&!t.props.editable(t.state)||!e.uploadImage)return!1;if(!n.clipboardData)return!1;var r=Array.prototype.slice.call(n.clipboardData.items).map((function(e){return e.getAsFile()})).filter((function(e){return e}));if(0===r.length)return!1;var o=t.state.tr;o.selection.empty||o.deleteSelection();var i=o.selection.from;return w.default(t,n,i,r,e),!0},drop:function(t,n){if(t.props.editable&&!t.props.editable(t.state)||!e.uploadImage)return!1;var r=b.default(n).filter((function(e){return/image/i.test(e.type)}));if(0===r.length)return!1;var o=t.posAtCoords({left:n.clientX,top:n.clientY});return!!o&&(w.default(t,n,o.pos,r,e),!0)}}}}))];var e}}]),n}(_.default);t.default=S;var E=g.default.span(c()),M=g.default.p(l(),(function(e){return e.theme.textSecondary}),(function(e){return e.theme.placeholder}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={keys:["Enter"],keyCode:13},o=function(e){var t=e.keyCode,n=e.keys;return function(e){return e.keyCode?e.keyCode===t:-1!==n.indexOf(e.key)}},i=(t.isEnterOrSpaceBarKey=function(e){return o(r)(e)||i(e)},t.isTabKey=o({keys:["Tab"],keyCode:9}),t.isSpaceBarKey=o({keys:[" "],keyCode:32}));t.isEscapeKey=o({keys:["Escape","Esc"],keyCode:27})},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(55),l=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"keys",value:function(e){var t=e.type;return{Enter:u.splitListItem(t),Tab:u.sinkListItem(t),"Shift-Tab":u.liftListItem(t),"Mod-]":u.sinkListItem(t),"Mod-[":u.liftListItem(t)}}},{key:"toMarkdown",value:function(e,t){e.renderContent(t)}},{key:"parseMarkdown",value:function(){return{block:"list_item"}}},{key:"name",get:function(){return"list_item"}},{key:"schema",get:function(){return{content:"paragraph block*",defining:!0,draggable:!0,parseDOM:[{tag:"li"}],toDOM:function(){return["li",0]}}}}]),n}(s(n(10)).default);t.default=l},function(e,t,n){"use strict";var r=n(20),o=n(4),i=n(5),a=n(6),s=n(7),u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var c=n(13),f=u(n(100)),d=n(24),p=l(n(1)),h=u(n(17)),m=function(e){a(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.apply(this,arguments)).handleStyleChange=function(t){var n=e.editor.view,r=n.state.tr,o=t.target,i=o.getBoundingClientRect(),a=i.top,s=i.left,u=n.posAtCoords({top:a,left:s});if(u){var l=r.setNodeMarkup(u.inside,void 0,{style:o.value});n.dispatch(l)}},e}return i(n,[{key:"commands",value:function(e){var t=e.type;return function(e){return f.default(t,e)}}},{key:"inputRules",value:function(e){var t=e.type;return[c.wrappingInputRule(/^:::$/,t)]}},{key:"toMarkdown",value:function(e,t){e.write("\n:::"+(t.attrs.style||"info")+"\n"),e.renderContent(t),e.ensureNewLine(),e.write(":::"),e.closeBlock(t)}},{key:"parseMarkdown",value:function(){return{block:"container_notice",getAttrs:function(e){return{style:e.info}}}}},{key:"styleOptions",get:function(){return Object.entries({info:this.options.dictionary.info,warning:this.options.dictionary.warning,tip:this.options.dictionary.tip})}},{key:"name",get:function(){return"container_notice"}},{key:"schema",get:function(){var e=this;return{attrs:{style:{default:"info"}},content:"block+",group:"block",defining:!0,draggable:!0,parseDOM:[{tag:"div.notice-block",preserveWhitespace:"full",contentElement:"div:last-child",getAttrs:function(e){return{style:e.className.includes("tip")?"tip":e.className.includes("warning")?"warning":void 0}}}],toDOM:function(t){var n,o=document.createElement("select");o.addEventListener("change",e.handleStyleChange),e.styleOptions.forEach((function(e){var n=r(e,2),i=n[0],a=n[1],s=document.createElement("option");s.value=i,s.innerText=a,s.selected=t.attrs.style===i,o.appendChild(s)})),n="tip"===t.attrs.style?p.createElement(d.StarredIcon,{color:"currentColor"}):"warning"===t.attrs.style?p.createElement(d.WarningIcon,{color:"currentColor"}):p.createElement(d.InfoIcon,{color:"currentColor"});var i=document.createElement("div");return i.className="icon",h.default.render(n,i),["div",{class:"notice-block ".concat(t.attrs.style)},i,["div",{contentEditable:!1},o],["div",0]]}}}}]),n}(u(n(10)).default);t.default=m},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(13),l=s(n(54)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return l.default(t,n.nodes.list_item)}}},{key:"keys",value:function(e){var t=e.type,n=e.schema;return{"Shift-Ctrl-9":l.default(t,n.nodes.list_item)}}},{key:"inputRules",value:function(e){var t=e.type;return[u.wrappingInputRule(/^(\d+)\.\s$/,t,(function(e){return{order:+e[1]}}),(function(e,t){return t.childCount+t.attrs.order===+e[1]}))]}},{key:"toMarkdown",value:function(e,t){var n=t.attrs.order||1,r="".concat(n+t.childCount-1).length,o=e.repeat(" ",r+2);e.renderList(t,o,(function(t){var o="".concat(n+t);return e.repeat(" ",r-o.length)+o+". "}))}},{key:"parseMarkdown",value:function(){return{block:"ordered_list"}}},{key:"name",get:function(){return"ordered_list"}},{key:"schema",get:function(){return{attrs:{order:{default:1}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:function(e){return{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1}}}],toDOM:function(e){return 1===e.attrs.order?["ol",0]:["ol",{start:e.attrs.order},0]}}}}]),n}(s(n(10)).default);t.default=c},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(14),l=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"keys",value:function(e){var t=e.type;return{"Shift-Ctrl-0":u.setBlockType(t)}}},{key:"commands",value:function(e){var t=e.type;return function(){return u.setBlockType(t)}}},{key:"toMarkdown",value:function(e,t){""!==t.textContent.trim()||0!==t.childCount||e.inTable?(e.renderInline(t),e.closeBlock(t)):e.write("\\\n")}},{key:"parseMarkdown",value:function(){return{block:"paragraph"}}},{key:"name",get:function(){return"paragraph"}},{key:"schema",get:function(){return{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:function(){return["p",0]}}}}]),n}(s(n(10)).default);t.default=l},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=s(n(10)),l=n(12),c=n(39),f=n(18),d=n(2),p=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"commands",value:function(e){var t=e.schema;return{createTable:function(e){var n=e.rowsCount,r=e.colsCount;return function(e,o){var i=e.tr.selection.anchor+1,a=f.createTable(t,n,r),s=e.tr.replaceSelectionWith(a).scrollIntoView(),u=s.doc.resolve(i);s.setSelection(d.TextSelection.near(u)),o(s)}},setColumnAttr:function(e){var t=e.index,n=e.alignment;return function(e,r){var o=f.getCellsInColumn(t)(e.selection)||[],i=e.tr;o.forEach((function(e){var t=e.pos;i=i.setNodeMarkup(t,null,{alignment:n})})),r(i)}},addColumnBefore:function(){return c.addColumnBefore},addColumnAfter:function(){return c.addColumnAfter},deleteColumn:function(){return c.deleteColumn},addRowAfter:function(e){var t=e.index;return function(e,n){if(0===t){var r=f.addRowAt(t+2,!0)(e.tr);n(f.moveRow(t+2,t+1)(r))}else n(f.addRowAt(t+1,!0)(e.tr))}},deleteRow:function(){return c.deleteRow},deleteTable:function(){return c.deleteTable},toggleHeaderColumn:function(){return c.toggleHeaderColumn},toggleHeaderRow:function(){return c.toggleHeaderRow},toggleHeaderCell:function(){return c.toggleHeaderCell},setCellAttr:function(){return c.setCellAttr},fixTables:function(){return c.fixTables}}}},{key:"keys",value:function(){return{Tab:c.goToNextCell(1),"Shift-Tab":c.goToNextCell(-1),Enter:function(e,t){if(!c.isInTable(e))return!1;var n=f.getCellsInColumn(0)(e.selection)||[];return t(f.addRowAt(n.length,!0)(e.tr)),!0}}}},{key:"toMarkdown",value:function(e,t){e.renderTable(t),e.closeBlock(t)}},{key:"parseMarkdown",value:function(){return{block:"table"}}},{key:"name",get:function(){return"table"}},{key:"schema",get:function(){return{content:"tr+",tableRole:"table",isolating:!0,group:"block",parseDOM:[{tag:"table"}],toDOM:function(){return["div",{class:"scrollable-wrapper"},["div",{class:"scrollable"},["table",{class:"rme-table"},["tbody",0]]]]}}}},{key:"plugins",get:function(){var e=this;return[c.tableEditing(),new d.Plugin({props:{decorations:function(t){var n=t.doc,r=[],o=0;return n.descendants((function(t,n){if(t.type.name===e.name){var i=document.getElementsByClassName("rme-table")[o];if(i){var a=i.parentElement;!!(a&&a.scrollWidth>a.clientWidth)&&r.push(l.Decoration.widget(n+1,(function(){var e=document.createElement("div");return e.className="scrollable-shadow right",e}))),o++}}})),l.DecorationSet.create(n,r)}}})]}}]),n}(u.default);t.default=p},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(12),l=n(2),c=n(18),f=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"toMarkdown",value:function(e,t){e.renderContent(t)}},{key:"parseMarkdown",value:function(){return{block:"td",getAttrs:function(e){return{alignment:e.info}}}}},{key:"name",get:function(){return"td"}},{key:"schema",get:function(){return{content:"paragraph+",tableRole:"cell",isolating:!0,parseDOM:[{tag:"td"}],toDOM:function(e){return["td",e.attrs.alignment?{style:"text-align: ".concat(e.attrs.alignment)}:{},0]},attrs:{colspan:{default:1},rowspan:{default:1},alignment:{default:null}}}}},{key:"plugins",get:function(){var e=this;return[new l.Plugin({props:{decorations:function(t){var n=t.doc,r=t.selection,o=[],i=c.getCellsInColumn(0)(r);return i&&i.forEach((function(n,a){var s=n.pos;0===a&&o.push(u.Decoration.widget(s+1,(function(){var n="grip-table";c.isTableSelected(r)&&(n+=" selected");var o=document.createElement("a");return o.className=n,o.addEventListener("mousedown",(function(n){n.preventDefault(),e.options.onSelectTable(t)})),o}))),o.push(u.Decoration.widget(s+1,(function(){var n="grip-row";c.isRowSelected(a)(r)&&(n+=" selected"),0===a?n+=" first":a===i.length-1&&(n+=" last");var o=document.createElement("a");return o.className=n,o.addEventListener("mousedown",(function(n){n.preventDefault(),e.options.onSelectRow(a,t)})),o})))})),u.DecorationSet.create(n,o)}}})]}}]),n}(s(n(10)).default);t.default=f},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(12),l=n(2),c=n(18),f=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"toMarkdown",value:function(e,t){e.renderContent(t)}},{key:"parseMarkdown",value:function(){return{block:"th",getAttrs:function(e){return{alignment:e.info}}}}},{key:"name",get:function(){return"th"}},{key:"schema",get:function(){return{content:"paragraph+",tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th"}],toDOM:function(e){return["th",e.attrs.alignment?{style:"text-align: ".concat(e.attrs.alignment)}:{},0]},attrs:{colspan:{default:1},rowspan:{default:1},alignment:{default:null}}}}},{key:"plugins",get:function(){var e=this;return[new l.Plugin({props:{decorations:function(t){var n=t.doc,r=t.selection,o=[],i=c.getCellsInRow(0)(r);return i&&i.forEach((function(n,a){var s=n.pos;o.push(u.Decoration.widget(s+1,(function(){var n="grip-column";c.isColumnSelected(a)(r)&&(n+=" selected"),0===a?n+=" first":a===i.length-1&&(n+=" last");var o=document.createElement("a");return o.className=n,o.addEventListener("mousedown",(function(n){n.preventDefault(),e.options.onSelectColumn(a,t)})),o})))})),u.DecorationSet.create(n,o)}}})]}}]),n}(s(n(10)).default);t.default=f},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"parseMarkdown",value:function(){return{block:"tr"}}},{key:"name",get:function(){return"tr"}},{key:"schema",get:function(){return{content:"(th | td)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:function(){return["tr",0]}}}}]),n}(s(n(10)).default);t.default=u},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(14),l=s(n(25)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"inputRules",value:function(e){var t=e.type;return[l.default(/(?:\*\*)([^*]+)(?:\*\*)$/,t)]}},{key:"keys",value:function(e){var t=e.type;return{"Mod-b":u.toggleMark(t),"Mod-B":u.toggleMark(t)}}},{key:"parseMarkdown",value:function(){return{mark:"strong"}}},{key:"name",get:function(){return"strong"}},{key:"schema",get:function(){return{parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-style",getAttrs:function(e){return"bold"===e}}],toDOM:function(){return["strong"]}}}},{key:"toMarkdown",get:function(){return{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0}}}]),n}(s(n(21)).default);t.default=c},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(14),l=s(n(25));function c(e,t){var n,r=/`+/g,o=0;if(e.isText)for(;n=r.exec(e.text);)o=Math.max(o,n[0].length);for(var i=o>0&&t>0?" `":"`",a=0;a0&&t<0&&(i+=" "),i}var f=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"inputRules",value:function(e){var t=e.type;return[l.default(/(?:^|[^`])(`([^`]+)`)$/,t)]}},{key:"keys",value:function(e){var t=e.type;return{"Mod`":u.toggleMark(t)}}},{key:"parseMarkdown",value:function(){return{mark:"code_inline"}}},{key:"name",get:function(){return"code_inline"}},{key:"schema",get:function(){return{excludes:"_",parseDOM:[{tag:"code"}],toDOM:function(){return["code",{spellCheck:!1}]}}}},{key:"toMarkdown",get:function(){return{open:function(e,t,n,r){return c(n.child(r),-1)},close:function(e,t,n,r){return c(n.child(r-1),1)},escape:!1}}}]),n}(s(n(21)).default);t.default=f},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(14),l=s(n(25)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"inputRules",value:function(e){var t=e.type;return[l.default(/(?:==)([^=]+)(?:==)$/,t)]}},{key:"keys",value:function(e){var t=e.type;return{"Mod-Ctrl-h":u.toggleMark(t)}}},{key:"parseMarkdown",value:function(){return{mark:"mark"}}},{key:"name",get:function(){return"mark"}},{key:"schema",get:function(){return{parseDOM:[{tag:"mark"}],toDOM:function(){return["mark"]}}}},{key:"toMarkdown",get:function(){return{open:"==",close:"==",mixable:!0,expelEnclosingWhitespace:!0}}}]),n}(s(n(21)).default);t.default=c},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(14),l=s(n(25)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"inputRules",value:function(e){var t=e.type;return[l.default(/(?:^|[^_])(_([^_]+)_)$/,t),l.default(/(?:^|[^*])(\*([^*]+)\*)$/,t)]}},{key:"keys",value:function(e){var t=e.type;return{"Mod-i":u.toggleMark(t),"Mod-I":u.toggleMark(t)}}},{key:"parseMarkdown",value:function(){return{mark:"em"}}},{key:"name",get:function(){return"em"}},{key:"schema",get:function(){return{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:function(e){return"italic"===e}}],toDOM:function(){return["em"]}}}},{key:"toMarkdown",get:function(){return{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0}}}]),n}(s(n(21)).default);t.default=c},function(e,t,n){"use strict";var r=n(20),o=n(4),i=n(5),a=n(6),s=n(7),u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(14),c=n(2),f=n(13),d=u(n(21)),p=/\[(.+)]\((\S+)\)/;function h(e,t,n,r){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;var o=t.child(n+(r<0?-1:0));if(!o.isText||o.text!==e.attrs.href||o.marks[o.marks.length-1]!==e)return!1;if(n===(r<0?1:t.childCount-1))return!0;var i=t.child(n+(r<0?-2:1));return!e.isInSet(i.marks)}var m=function(e){a(n,e);var t=s(n);function n(){return o(this,n),t.apply(this,arguments)}return i(n,[{key:"inputRules",value:function(e){var t=this,n=e.type;return[new f.InputRule(p,(function(e,o,i,a){var s=r(o,3),u=s[0],l=s[1],c=s[2],f=e.tr;return u&&f.replaceWith(i,a,t.editor.schema.text(l)).addMark(i,i+l.length,n.create({href:c})),f}))]}},{key:"commands",value:function(e){var t=e.type;return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{href:""},n=e.href;return l.toggleMark(t,{href:n})}}},{key:"keys",value:function(e){var t=this,n=e.type;return{"Mod-k":function(e,r){return e.selection.empty?(t.options.onKeyboardShortcut(),!0):l.toggleMark(n,{href:""})(e,r)}}}},{key:"parseMarkdown",value:function(){return{mark:"link",getAttrs:function(e){return{href:e.attrGet("href"),title:e.attrGet("title")||null}}}}},{key:"name",get:function(){return"link"}},{key:"schema",get:function(){return{attrs:{href:{default:""}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(e){return{href:e.getAttribute("href")}}}],toDOM:function(e){return["a",Object.assign(Object.assign({},e.attrs),{rel:"noopener noreferrer nofollow"}),0]}}}},{key:"plugins",get:function(){var e=this;return[new c.Plugin({props:{handleDOMEvents:{mouseover:function(t,n){return!!(n.target instanceof HTMLAnchorElement&&!n.target.className.includes("ProseMirror-widget")&&e.options.onHoverLink)&&e.options.onHoverLink(n)},click:function(t,n){if(t.props.editable&&t.props.editable(t.state)&&!n.metaKey)return!1;if(n.target instanceof HTMLAnchorElement){var r=n.target.href||(n.target.parentNode instanceof HTMLAnchorElement?n.target.parentNode.href:"");if(r.startsWith("#")&&e.options.onClickHashtag)return n.stopPropagation(),n.preventDefault(),e.options.onClickHashtag(r,n),!0;if(e.options.onClickLink)return n.stopPropagation(),n.preventDefault(),e.options.onClickLink(r,n),!0}return!1}}}})]}},{key:"toMarkdown",get:function(){return{open:function(e,t,n,r){return h(t,n,r,1)?"<":"["},close:function(e,t,n,r){return h(t,n,r,-1)?">":"]("+e.esc(t.attrs.href)+(t.attrs.title?" "+e.quote(t.attrs.title):"")+")"}}}}]),n}(d.default);t.default=m},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(14),l=s(n(25)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"keys",value:function(e){var t=e.type;return{"Mod-d":u.toggleMark(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[l.default(/~([^~]+)~$/,t)]}},{key:"parseMarkdown",value:function(){return{mark:"strikethrough"}}},{key:"name",get:function(){return"strikethrough"}},{key:"schema",get:function(){return{parseDOM:[{tag:"s"},{tag:"del"},{tag:"strike"}],toDOM:function(){return["del",0]}}}},{key:"toMarkdown",get:function(){return{open:"~~",close:"~~",mixable:!0,expelEnclosingWhitespace:!0}}},{key:"markdownToken",get:function(){return"s"}}]),n}(s(n(21)).default);t.default=c},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(2),l=s(n(80)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"parseMarkdown",value:function(){return{mark:"placeholder"}}},{key:"name",get:function(){return"placeholder"}},{key:"schema",get:function(){return{parseDOM:[{tag:"span.template-placeholder"}],toDOM:function(){return["span",{class:"template-placeholder"}]}}}},{key:"toMarkdown",get:function(){return{open:"!!",close:"!!",mixable:!0,expelEnclosingWhitespace:!0}}},{key:"plugins",get:function(){var e=this;return[new u.Plugin({props:{handleTextInput:function(t,n,r,o){if(e.editor.props.template)return!1;var i=t.state,a=t.dispatch,s=i.doc.resolve(n),c=l.default(s,i.schema.marks.placeholder);if(!c)return!1;var f=Math.min(n,c.from),d=Math.max(r,c.to);a(i.tr.removeMark(c.from,c.to,i.schema.marks.placeholder).insertText(o,f,d));var p=t.state.doc.resolve(f+o.length);return a(t.state.tr.setSelection(u.TextSelection.near(p))),!0},handleKeyDown:function(t,n){if(!t.props.editable||!t.props.editable(t.state))return!1;if(e.editor.props.template)return!1;if("ArrowLeft"!==n.key&&"ArrowRight"!==n.key&&"Backspace"!==n.key)return!1;var r=t.state,o=t.dispatch;if("Backspace"===n.key){var i=l.default(r.doc.resolve(Math.max(0,r.selection.from-1)),r.schema.marks.placeholder);return!!i&&(o(r.tr.removeMark(i.from,i.to,r.schema.marks.placeholder).insertText("",i.from,i.to)),!0)}if("ArrowLeft"===n.key){var a=l.default(r.doc.resolve(Math.max(0,r.selection.from-1)),r.schema.marks.placeholder);if(!a)return!1;var s=r.doc.resolve(a.from);return o(r.tr.setSelection(u.TextSelection.near(s))),!0}if("ArrowRight"===n.key){var c=l.default(r.selection.$from,r.schema.marks.placeholder);if(!c)return!1;var f=r.doc.resolve(c.to);return o(r.tr.setSelection(u.TextSelection.near(f))),!0}return!1},handleClick:function(t,n,r){if(!t.props.editable||!t.props.editable(t.state))return!1;if(e.editor.props.template)return!1;if(r.target instanceof HTMLSpanElement&&r.target.className.includes("template-placeholder")){var o=t.state,i=t.dispatch,a=l.default(o.selection.$from,o.schema.marks.placeholder);if(!a)return!1;r.stopPropagation(),r.preventDefault();var s=o.doc.resolve(a.from);return i(o.tr.setSelection(u.TextSelection.near(s))),!0}return!1}}})]}}]),n}(s(n(21)).default);t.default=c},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(14),l=s(n(25)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"inputRules",value:function(e){var t=e.type;return[l.default(/(?:__)([^_]+)(?:__)$/,t)]}},{key:"keys",value:function(e){var t=e.type;return{"Mod-u":u.toggleMark(t)}}},{key:"parseMarkdown",value:function(){return{mark:"underline"}}},{key:"name",get:function(){return"underline"}},{key:"schema",get:function(){return{parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:function(e){return"underline"===e}}],toDOM:function(){return["u",0]}}}},{key:"toMarkdown",get:function(){return{open:"__",close:"__",mixable:!0,expelEnclosingWhitespace:!0}}}]),n}(s(n(21)).default);t.default=c},function(e,t,n){"use strict";function r(e){return null!=e&&"object"==typeof e&&1===e.nodeType}function o(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function i(e,t){if(e.clientHeightt||i>e&&a=t&&s>=n?i-e-r:a>t&&sn?a-t+o:0}n.r(t);var s=function(e,t){var n=window,o=t.scrollMode,s=t.block,u=t.inline,l=t.boundary,c=t.skipOverflowHiddenElements,f="function"==typeof l?l:function(e){return e!==l};if(!r(e))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,p=[],h=e;r(h)&&f(h);){if((h=h.parentNode)===d){p.push(h);break}h===document.body&&i(h)&&!i(document.documentElement)||i(h,c)&&p.push(h)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,v=n.visualViewport?n.visualViewport.height:innerHeight,g=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),k=b.height,w=b.width,_=b.top,C=b.right,x=b.bottom,S=b.left,E="start"===s||"nearest"===s?_:"end"===s?x:_+k/2,M="center"===u?S+w/2:"end"===u?C:S,O=[],L=0;L=0&&S>=0&&x<=v&&C<=m&&_>=I&&x<=R&&S>=j&&C<=N)return O;var z=getComputedStyle(T),F=parseInt(z.borderLeftWidth,10),B=parseInt(z.borderTopWidth,10),$=parseInt(z.borderRightWidth,10),q=parseInt(z.borderBottomWidth,10),V=0,H=0,U="offsetWidth"in T?T.offsetWidth-T.clientWidth-F-$:0,Z="offsetHeight"in T?T.offsetHeight-T.clientHeight-B-q:0;if(d===T)V="start"===s?E:"end"===s?E-v:"nearest"===s?a(y,y+v,v,B,q,y+E,y+E+k,k):E-v/2,H="start"===u?M:"center"===u?M-m/2:"end"===u?M-m:a(g,g+m,m,F,$,g+M,g+M+w,w),V=Math.max(0,V+y),H=Math.max(0,H+g);else{V="start"===s?E-I-B:"end"===s?E-R+q+Z:"nearest"===s?a(I,R,D,B,q+Z,E,E+k,k):E-(I+D/2)+Z/2,H="start"===u?M-j-F:"center"===u?M-(j+P/2)+U/2:"end"===u?M-N+$+U:a(j,N,P,F,$+U,M,M+w,w);var W=T.scrollLeft,K=T.scrollTop;E+=K-(V=Math.max(0,Math.min(K+V,T.scrollHeight-D+Z))),M+=W-(H=Math.max(0,Math.min(W+H,T.scrollWidth-P+U)))}O.push({el:T,top:V,left:H})}return O};function u(e){return e===Object(e)&&0!==Object.keys(e).length}var l,c=function(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(u(t)&&"function"===typeof t.behavior)return t.behavior(n?[]:s(e,t));if(!n){var r=function(e){return!1===e?{block:"end",inline:"nearest"}:u(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var r=e.el,o=e.top,i=e.left;r.scroll&&n?r.scroll({top:o,left:i,behavior:t}):(r.scrollTop=o,r.scrollLeft=i)}))}(s(e,r),r.behavior)}},f=function(){return l||(l="performance"in window?performance.now.bind(performance):Date.now),l()};function d(e,t,n,r,o,i){var a,s,u;void 0===r&&(r=600),void 0===o&&(o=function(e){return 1+--e*e*e*e*e}),a=e,s=e.scrollLeft,u=e.scrollTop,function e(t){var n=f(),r=Math.min((n-t.startTime)/t.duration,1),o=t.ease(r),i=t.startX+(t.x-t.startX)*o,a=t.startY+(t.y-t.startY)*o;t.method(i,a),i!==t.x||a!==t.y?requestAnimationFrame((function(){return e(t)})):t.cb()}({scrollable:a,method:function(t,n){e.scrollLeft=t,e.scrollTop=n},startTime:f(),startX:s,startY:u,x:t,y:n,duration:r,ease:o,cb:i})}var p=function(e,t){var n=t||{};return function(e){return e&&!e.behavior||"smooth"===e.behavior}(n)?c(e,{block:n.block,inline:n.inline,scrollMode:n.scrollMode,boundary:n.boundary,behavior:function(e){return Promise.all(e.reduce((function(e,t){var r=t.el,o=t.left,i=t.top,a=r.scrollLeft,s=r.scrollTop;return a===o&&s===i?e:[].concat(e,[new Promise((function(e){return d(r,o,i,n.duration,n.ease,(function(){return e({el:r,left:[a,o],top:[s,i]})}))}))])}),[]))}}):Promise.resolve(c(e,t))};t.default=p},function(e,t,n){"use strict";var r=n(16),o=n(34),i=n(23),a=n(4),s=n(5),u=n(6),l=n(7);function c(){var e=r(["\n color: ",";\n background: ",";\n font-family: ",";\n font-weight: ",';\n font-size: 1em;\n line-height: 1.7em;\n width: 100%;\n\n .ProseMirror {\n position: relative;\n outline: none;\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 pre {\n white-space: pre-wrap;\n }\n\n li {\n position: relative;\n }\n\n img {\n max-width: 100%;\n }\n\n .image {\n text-align: center;\n\n img {\n pointer-events: ',";\n }\n }\n\n .image.placeholder {\n position: relative;\n background: ",";\n\n img {\n opacity: 0.5;\n }\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n .ProseMirror-hideselection {\n caret-color: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: 2px solid\n ",';\n }\n\n /* Make sure li selections wrap around markers */\n\n li.ProseMirror-selectednode {\n outline: none;\n }\n\n li.ProseMirror-selectednode:after {\n content: "";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid ',";\n pointer-events: none;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin: 1em 0 0.5em;\n font-weight: 500;\n cursor: default;\n\n &:not(.placeholder):before {\n display: ",";\n position: absolute;\n font-family: ",";\n color: ",";\n font-size: 13px;\n left: -24px;\n }\n\n &:hover {\n .heading-anchor {\n opacity: 1;\n }\n }\n }\n\n .heading-name {\n color: ",';\n\n &:hover {\n text-decoration: none;\n }\n }\n\n a:first-child {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-top: 0;\n }\n }\n\n h1:not(.placeholder):before {\n content: "H1";\n line-height: 3em;\n }\n h2:not(.placeholder):before {\n content: "H2";\n line-height: 2.8em;\n }\n h3:not(.placeholder):before {\n content: "H3";\n line-height: 2.3em;\n }\n h4:not(.placeholder):before {\n content: "H4";\n line-height: 2.2em;\n }\n h5:not(.placeholder):before {\n content: "H5";\n }\n h6:not(.placeholder):before {\n content: "H6";\n }\n\n .with-emoji {\n margin-left: -1em;\n }\n\n .heading-anchor {\n opacity: 0;\n display: ',";\n color: ",";\n cursor: pointer;\n background: none;\n border: 0;\n outline: none;\n padding: 2px 12px 2px 4px;\n margin: 0;\n position: absolute;\n transition: opacity 100ms ease-in-out;\n font-family: ",";\n font-size: 22px;\n left: -1.3em;\n\n &:focus,\n &:hover {\n color: ",";\n }\n }\n\n .placeholder {\n &:before {\n display: block;\n content: ",";\n pointer-events: none;\n height: 0;\n color: ",";\n }\n }\n\n @media print {\n .placeholder {\n display: none;\n }\n }\n\n .notice-block {\n display: flex;\n align-items: center;\n background: ",";\n color: ",";\n border-radius: 4px;\n padding: 8px 16px;\n margin: 8px 0;\n\n a {\n color: ",";\n }\n\n a:not(.heading-name) {\n text-decoration: underline;\n }\n }\n\n .notice-block .icon {\n width: 24px;\n height: 24px;\n align-self: flex-start;\n margin-right: 4px;\n position: relative;\n top: 1px;\n }\n\n .notice-block.tip {\n background: ",";\n color: ",";\n\n a {\n color: ",";\n }\n }\n\n .notice-block.warning {\n background: ",";\n color: ",";\n\n a {\n color: ",";\n }\n }\n\n blockquote {\n border-left: 3px solid ",";\n margin: 0;\n padding-left: 10px;\n font-style: italic;\n }\n\n b,\n strong {\n font-weight: 600;\n }\n\n .template-placeholder {\n color: ",";\n border-bottom: 1px dotted ",";\n border-radius: 2px;\n cursor: text;\n\n &:hover {\n border-bottom: 1px dotted\n ",";\n }\n }\n\n p {\n position: relative;\n margin: 0;\n }\n\n a {\n color: ",";\n }\n\n a:hover {\n text-decoration: ",";\n }\n\n ul,\n ol {\n margin: 0 0.1em;\n padding: 0 0 0 1em;\n\n ul,\n ol {\n margin: 0;\n }\n }\n\n ol ol {\n list-style: lower-alpha;\n }\n\n ol ol ol {\n list-style: lower-roman;\n }\n\n ul.checkbox_list {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n\n ul.checkbox_list li {\n display: flex;\n }\n\n ul.checkbox_list li.checked > div > p {\n color: ",";\n text-decoration: line-through;\n }\n\n ul.checkbox_list li input {\n pointer-events: ",";\n opacity: ",";\n margin: 0 0.5em 0 0;\n width: 14px;\n height: 14px;\n }\n\n li p:first-child {\n margin: 0;\n word-break: break-all;\n }\n\n hr {\n height: 0;\n border: 0;\n border-top: 1px solid ",";\n }\n\n code {\n border-radius: 4px;\n border: 1px solid ",";\n padding: 3px 4px;\n font-family: ",";\n font-size: 85%;\n }\n\n mark {\n border-radius: 1px;\n color: ",";\n background: ",";\n }\n\n .code-block,\n .notice-block {\n position: relative;\n\n select,\n button {\n background: ",";\n color: ",";\n border-width: 1px;\n font-size: 13px;\n display: none;\n position: absolute;\n border-radius: 4px;\n padding: 2px;\n z-index: 1;\n top: 4px;\n right: 4px;\n }\n\n button {\n padding: 2px 4px;\n }\n\n &:hover {\n select {\n display: ",";\n }\n\n button {\n display: ",";\n }\n }\n\n select:focus,\n select:active {\n display: inline;\n }\n }\n\n pre {\n display: block;\n overflow-x: auto;\n padding: 0.75em 1em;\n line-height: 1.4em;\n position: relative;\n background: ",";\n border-radius: 4px;\n border: 1px solid ",";\n\n -webkit-font-smoothing: initial;\n font-family: ",";\n font-size: 13px;\n direction: ltr;\n text-align: left;\n white-space: pre;\n word-spacing: normal;\n word-break: normal;\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n -webkit-hyphens: none;\n -moz-hyphens: none;\n -ms-hyphens: none;\n hyphens: none;\n color: ",";\n margin: 0;\n\n code {\n font-size: 13px;\n background: none;\n padding: 0;\n border: 0;\n }\n }\n\n .token.comment,\n .token.prolog,\n .token.doctype,\n .token.cdata {\n color: ",";\n }\n\n .token.punctuation {\n color: ",";\n }\n\n .token.namespace {\n opacity: 0.7;\n }\n\n .token.operator,\n .token.boolean,\n .token.number {\n color: ",";\n }\n\n .token.property {\n color: ",";\n }\n\n .token.tag {\n color: ",";\n }\n\n .token.string {\n color: ",";\n }\n\n .token.selector {\n color: ",";\n }\n\n .token.attr-name {\n color: ",";\n }\n\n .token.entity,\n .token.url,\n .language-css .token.string,\n .style .token.string {\n color: ",";\n }\n\n .token.attr-value,\n .token.keyword,\n .token.control,\n .token.directive,\n .token.unit {\n color: ",";\n }\n\n .token.function {\n color: ",";\n }\n\n .token.statement,\n .token.regex,\n .token.atrule {\n color: ",";\n }\n\n .token.placeholder,\n .token.variable {\n color: ",";\n }\n\n .token.deleted {\n text-decoration: line-through;\n }\n\n .token.inserted {\n border-bottom: 1px dotted ",";\n text-decoration: none;\n }\n\n .token.italic {\n font-style: italic;\n }\n\n .token.important,\n .token.bold {\n font-weight: bold;\n }\n\n .token.important {\n color: ",";\n }\n\n .token.entity {\n cursor: help;\n }\n\n table {\n width: 100%;\n border-collapse: collapse;\n border-radius: 4px;\n margin-top: 1em;\n\n tr {\n position: relative;\n border-bottom: 1px solid ",";\n }\n\n th {\n background: ",";\n }\n\n td,\n th {\n position: relative;\n vertical-align: top;\n border: 1px solid ",";\n position: relative;\n padding: 4px 8px;\n text-align: left;\n min-width: 100px;\n }\n\n .selectedCell {\n background: ",';\n\n /* fixes Firefox background color painting over border:\n * https://bugzilla.mozilla.org/show_bug.cgi?id=688556 */\n background-clip: padding-box;\n }\n\n .grip-column {\n /* usage of ::after for all of the table grips works around a bug in\n * prosemirror-tables that causes Safari to hang when selecting a cell\n * in an empty table:\n * https://github.com/ProseMirror/prosemirror/issues/947 */\n &::after {\n content: "";\n cursor: pointer;\n position: absolute;\n top: -16px;\n left: 0;\n width: 100%;\n height: 12px;\n background: ',";\n border-bottom: 3px solid ",";\n display: ",";\n }\n\n &:hover::after {\n background: ",";\n }\n &.first::after {\n border-top-left-radius: 3px;\n }\n &.last::after {\n border-top-right-radius: 3px;\n }\n &.selected::after {\n background: ",';\n }\n }\n\n .grip-row {\n &::after {\n content: "";\n cursor: pointer;\n position: absolute;\n left: -16px;\n top: 0;\n height: 100%;\n width: 12px;\n background: ',";\n border-right: 3px solid ",";\n display: ",";\n }\n\n &:hover::after {\n background: ",";\n }\n &.first::after {\n border-top-left-radius: 3px;\n }\n &.last::after {\n border-bottom-left-radius: 3px;\n }\n &.selected::after {\n background: ",';\n }\n }\n\n .grip-table {\n &::after {\n content: "";\n cursor: pointer;\n background: ',";\n width: 13px;\n height: 13px;\n border-radius: 13px;\n border: 2px solid ",";\n position: absolute;\n top: -18px;\n left: -18px;\n display: ",";\n }\n\n &:hover::after {\n background: ",";\n }\n &.selected::after {\n background: ",";\n }\n }\n }\n\n .scrollable-wrapper {\n position: relative;\n margin: 0.5em 0px;\n scrollbar-width: thin;\n scrollbar-color: transparent transparent;\n\n &:hover {\n scrollbar-color: ","\n ",";\n }\n\n & ::-webkit-scrollbar {\n height: 14px;\n background-color: transparent;\n }\n\n &:hover ::-webkit-scrollbar {\n background-color: ",";\n }\n\n & ::-webkit-scrollbar-thumb {\n background-color: transparent;\n border: 3px solid transparent;\n border-radius: 7px;\n }\n\n &:hover ::-webkit-scrollbar-thumb {\n background-color: ",";\n border-color: ",";\n }\n }\n\n .scrollable {\n overflow-y: hidden;\n overflow-x: auto;\n padding-left: 1em;\n margin-left: -1em;\n border-left: 1px solid transparent;\n border-right: 1px solid transparent;\n transition: border 250ms ease-in-out 0s;\n }\n\n .scrollable-shadow {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -1em;\n width: 16px;\n transition: box-shadow 250ms ease-in-out;\n border: 0px solid transparent;\n border-left-width: 1em;\n pointer-events: none;\n\n &.left {\n box-shadow: 16px 0 16px -16px inset rgba(0, 0, 0, 0.25);\n border-left: 1em solid ",";\n }\n\n &.right {\n right: 0;\n left: auto;\n box-shadow: -16px 0 16px -16px inset rgba(0, 0, 0, 0.25);\n }\n }\n\n .block-menu-trigger {\n display: ",";\n height: 1em;\n color: ",";\n background: none;\n border-radius: 100%;\n font-size: 30px;\n position: absolute;\n transform: scale(0.9);\n transition: color 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275),\n transform 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275);\n outline: none;\n border: 0;\n line-height: 1;\n margin-top: -6px;\n left: -34px;\n\n &:hover,\n &:focus {\n cursor: pointer;\n transform: scale(1);\n color: ",';\n }\n }\n\n @media print {\n .block-menu-trigger {\n display: none;\n }\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 ',';\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-focused .ProseMirror-gapcursor {\n display: block;\n }\n\n @media print {\n em,\n blockquote {\n font-family: "SF Pro Text", ',";\n }\n }\n"]);return c=function(){return e},e}var f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var p=f(n(1)),h=d(n(161)),m=n(2),v=n(192),g=n(193),y=n(12),b=n(0),k=n(13),w=n(26),_=n(14),C=n(18),x=f(n(15)),S=n(48),E=d(n(195)),M=d(n(73)),O=d(n(196)),L=d(n(296)),T=d(n(311)),A=d(n(312)),D=d(n(87)),P=d(n(378)),I=d(n(96)),N=d(n(97)),R=d(n(98)),j=d(n(99)),z=d(n(101)),F=d(n(102)),B=d(n(56)),$=d(n(114)),q=d(n(115)),V=d(n(116)),H=d(n(117)),U=d(n(118)),Z=d(n(119)),W=d(n(120)),K=d(n(122)),G=d(n(123)),J=d(n(124)),Y=d(n(125)),Q=d(n(126)),X=d(n(127)),ee=d(n(128)),te=d(n(129)),ne=d(n(130)),re=d(n(131)),oe=d(n(132)),ie=d(n(133)),ae=d(n(134)),se=d(n(135)),ue=d(n(136)),le=d(n(137)),ce=d(n(433)),fe=d(n(434)),de=d(n(435)),pe=d(n(436)),he=d(n(437)),me=d(n(438)),ve=d(n(439)),ge=n(441);t.schema=ge.schema,t.parser=ge.parser,t.serializer=ge.serializer;var ye=n(19);t.Extension=ye.default,t.theme=S.light;var be=function(e){u(n,e);var t=l(n);function n(){var e;return a(this,n),(e=t.apply(this,arguments)).state={blockMenuOpen:!1,linkMenuOpen:!1,blockMenuSearch:""},e.value=function(){return e.serializer.serialize(e.view.state.doc)},e.handleChange=function(){e.props.onChange&&e.props.onChange((function(){return e.value()}))},e.handleSave=function(){var t=e.props.onSave;t&&t({done:!1})},e.handleSaveAndExit=function(){var t=e.props.onSave;t&&t({done:!0})},e.handleOpenLinkMenu=function(){e.setState({linkMenuOpen:!0})},e.handleCloseLinkMenu=function(){e.setState({linkMenuOpen:!1})},e.handleOpenBlockMenu=function(t){e.setState({blockMenuOpen:!0,blockMenuSearch:t})},e.handleCloseBlockMenu=function(){e.state.blockMenuOpen&&e.setState({blockMenuOpen:!1})},e.handleSelectRow=function(t,n){e.view.dispatch(C.selectRow(t)(n.tr))},e.handleSelectColumn=function(t,n){e.view.dispatch(C.selectColumn(t)(n.tr))},e.handleSelectTable=function(t){e.view.dispatch(C.selectTable(t.tr))},e.focusAtStart=function(){var t=m.Selection.atStart(e.view.state.doc),n=e.view.state.tr.setSelection(t);e.view.dispatch(n),e.view.focus()},e.focusAtEnd=function(){var t=m.Selection.atEnd(e.view.state.doc),n=e.view.state.tr.setSelection(t);e.view.dispatch(n),e.view.focus()},e.getHeadings=function(){var t=[],n={};return e.view.state.doc.forEach((function(e){if("heading"===e.type.name){var r=I.default(e),o=r;n[r]>0&&(o=I.default(e,n[r])),n[r]=void 0!==n[r]?n[r]+1:1,t.push({title:e.textContent,level:e.attrs.level,id:o})}})),t},e.theme=function(){return e.props.theme||(e.props.dark?S.dark:S.light)},e.dictionary=h.default((function(e){return Object.assign(Object.assign({},E.default),e)})),e.render=function(){var t=e.props,n=t.readOnly,r=t.readOnlyWriteCheckboxes,o=t.style,i=t.tooltip,a=t.className,s=t.onKeyDown,u=e.dictionary(e.props.dictionary);return p.createElement(M.default,{onKeyDown:s,style:o,className:a,align:"flex-start",justify:"center",column:!0},p.createElement(x.ThemeProvider,{theme:e.theme()},p.createElement(p.Fragment,null,p.createElement(ke,{readOnly:n,readOnlyWriteCheckboxes:r,ref:function(t){return e.element=t}}),!n&&e.view&&p.createElement(p.Fragment,null,p.createElement(O.default,{view:e.view,dictionary:u,commands:e.commands,isTemplate:!0===e.props.template,onSearchLink:e.props.onSearchLink,onClickLink:e.props.onClickLink,onCreateLink:e.props.onCreateLink,tooltip:i}),p.createElement(T.default,{view:e.view,dictionary:u,isActive:e.state.linkMenuOpen,onCreateLink:e.props.onCreateLink,onSearchLink:e.props.onSearchLink,onClickLink:e.props.onClickLink,onShowToast:e.props.onShowToast,onClose:e.handleCloseLinkMenu,tooltip:i}),p.createElement(L.default,{view:e.view,commands:e.commands,dictionary:u,isActive:e.state.blockMenuOpen,search:e.state.blockMenuSearch,onClose:e.handleCloseBlockMenu,uploadImage:e.props.uploadImage,onLinkToolbarOpen:e.handleOpenLinkMenu,onImageUploadStart:e.props.onImageUploadStart,onImageUploadStop:e.props.onImageUploadStop,onShowToast:e.props.onShowToast,embeds:e.props.embeds})))))},e}return s(n,[{key:"componentDidMount",value:function(){this.init(),this.props.scrollTo&&this.scrollToAnchor(this.props.scrollTo),this.props.readOnly||this.props.autoFocus&&this.focusAtEnd()}},{key:"componentDidUpdate",value:function(e){var t=this;if(this.props.value&&e.value!==this.props.value){var n=this.createState(this.props.value);this.view.updateState(n)}e.readOnly!==this.props.readOnly&&this.view.update(Object.assign(Object.assign({},this.view.props),{editable:function(){return!t.props.readOnly}})),this.props.scrollTo&&this.props.scrollTo!==e.scrollTo&&this.scrollToAnchor(this.props.scrollTo),e.readOnly&&!this.props.readOnly&&this.props.autoFocus&&this.focusAtEnd()}},{key:"init",value:function(){this.extensions=this.createExtensions(),this.nodes=this.createNodes(),this.marks=this.createMarks(),this.schema=this.createSchema(),this.plugins=this.createPlugins(),this.keymaps=this.createKeymaps(),this.serializer=this.createSerializer(),this.parser=this.createParser(),this.inputRules=this.createInputRules(),this.nodeViews=this.createNodeViews(),this.view=this.createView(),this.commands=this.createCommands()}},{key:"createExtensions",value:function(){var e=this.dictionary(this.props.dictionary);return new D.default([new N.default,new R.default,new H.default,new Y.default,new j.default,new F.default({dictionary:e,initialReadOnly:this.props.readOnly,onShowToast:this.props.onShowToast}),new B.default({dictionary:e,initialReadOnly:this.props.readOnly,onShowToast:this.props.onShowToast}),new $.default,new q.default,new z.default,new V.default,new K.default,new G.default({dictionary:e}),new U.default({dictionary:e,onShowToast:this.props.onShowToast,offset:this.props.headingsOffset}),new Z.default,new W.default({dictionary:e,uploadImage:this.props.uploadImage,onImageUploadStart:this.props.onImageUploadStart,onImageUploadStop:this.props.onImageUploadStop,onShowToast:this.props.onShowToast}),new Q.default,new X.default({onSelectTable:this.handleSelectTable,onSelectRow:this.handleSelectRow}),new ee.default({onSelectColumn:this.handleSelectColumn}),new te.default,new ne.default,new re.default,new oe.default,new ie.default,new ue.default,new le.default,new ae.default({onKeyboardShortcut:this.handleOpenLinkMenu,onClickLink:this.props.onClickLink,onClickHashtag:this.props.onClickHashtag,onHoverLink:this.props.onHoverLink}),new se.default,new J.default,new fe.default,new he.default,new me.default,new ve.default,new de.default({onSave:this.handleSave,onSaveAndExit:this.handleSaveAndExit,onCancel:this.props.onCancel}),new ce.default({dictionary:e,onOpen:this.handleOpenBlockMenu,onClose:this.handleCloseBlockMenu}),new pe.default({placeholder:this.props.placeholder})].concat(i(this.props.extensions)),this)}},{key:"createPlugins",value:function(){return this.extensions.plugins}},{key:"createKeymaps",value:function(){return this.extensions.keymaps({schema:this.schema})}},{key:"createInputRules",value:function(){return this.extensions.inputRules({schema:this.schema})}},{key:"createNodeViews",value:function(){var e=this;return this.extensions.extensions.filter((function(e){return e.component})).reduce((function(t,n){return Object.assign(Object.assign({},t),o({},n.name,(function(t,r,o,i){return new P.default(n.component,{editor:e,extension:n,node:t,view:r,getPos:o,decorations:i})})))}),{})}},{key:"createCommands",value:function(){return this.extensions.commands({schema:this.schema,view:this.view})}},{key:"createNodes",value:function(){return this.extensions.nodes}},{key:"createMarks",value:function(){return this.extensions.marks}},{key:"createSchema",value:function(){return new b.Schema({nodes:this.nodes,marks:this.marks})}},{key:"createSerializer",value:function(){return this.extensions.serializer()}},{key:"createParser",value:function(){return this.extensions.parser({schema:this.schema})}},{key:"createState",value:function(e){var t=this.createDocument(e||this.props.defaultValue);return m.EditorState.create({schema:this.schema,doc:t,plugins:[].concat(i(this.plugins),i(this.keymaps),[v.dropCursor({color:this.theme().cursor}),g.gapCursor(),k.inputRules({rules:this.inputRules}),w.keymap(_.baseKeymap)])})}},{key:"createDocument",value:function(e){return this.parser.parse(e)}},{key:"createView",value:function(){var e=this;if(!this.element)throw new Error("createView called before ref available");var t=function(t){return t.steps.some((function(t){return t.slice.content.firstChild&&t.slice.content.firstChild.type.name===e.schema.nodes.checkbox_item.name}))};return new y.EditorView(this.element,{state:this.createState(),editable:function(){return!e.props.readOnly},nodeViews:this.nodeViews,handleDOMEvents:this.props.handleDOMEvents,dispatchTransaction:function(n){var r=e.view.state.applyTransaction(n),o=r.state,i=r.transactions;e.view.updateState(o),i.some((function(e){return e.docChanged}))&&(!e.props.readOnly||e.props.readOnlyWriteCheckboxes&&i.some(t))&&e.handleChange(),e.forceUpdate()}})}},{key:"scrollToAnchor",value:function(e){if(e)try{var t=document.querySelector(e);t&&t.scrollIntoView({behavior:"smooth"})}catch(n){console.warn("Attempted to scroll to invalid hash: ".concat(e),n)}}}]),n}(p.PureComponent);be.defaultProps={defaultValue:"",placeholder:"Write something nice\u2026",onImageUploadStart:function(){},onImageUploadStop:function(){},onClickLink:function(e){window.open(e,"_blank")},embeds:[],extensions:[],tooltip:A.default};var ke=x.default("div")(c(),(function(e){return e.theme.text}),(function(e){return e.theme.background}),(function(e){return e.theme.fontFamily}),(function(e){return e.theme.fontWeight}),(function(e){return e.readOnly?"initial":"none"}),(function(e){return e.theme.background}),(function(e){return e.readOnly?"transparent":e.theme.selected}),(function(e){return e.theme.selected}),(function(e){return e.readOnly?"none":"block"}),(function(e){return e.theme.fontFamilyMono}),(function(e){return e.theme.textSecondary}),(function(e){return e.theme.text}),(function(e){return e.readOnly?"block":"none"}),(function(e){return e.theme.textSecondary}),(function(e){return e.theme.fontFamilyMono}),(function(e){return e.theme.text}),(function(e){return e.readOnly?"":"attr(data-empty-text)"}),(function(e){return e.theme.placeholder}),(function(e){return e.theme.noticeInfoBackground}),(function(e){return e.theme.noticeInfoText}),(function(e){return e.theme.noticeInfoText}),(function(e){return e.theme.noticeTipBackground}),(function(e){return e.theme.noticeTipText}),(function(e){return e.theme.noticeTipText}),(function(e){return e.theme.noticeWarningBackground}),(function(e){return e.theme.noticeWarningText}),(function(e){return e.theme.noticeWarningText}),(function(e){return e.theme.quote}),(function(e){return e.theme.placeholder}),(function(e){return e.theme.placeholder}),(function(e){return e.readOnly?e.theme.placeholder:e.theme.textSecondary}),(function(e){return e.theme.link}),(function(e){return e.readOnly?"underline":"none"}),(function(e){return e.theme.textSecondary}),(function(e){return e.readOnly&&!e.readOnlyWriteCheckboxes?"none":"initial"}),(function(e){return e.readOnly&&!e.readOnlyWriteCheckboxes?.75:1}),(function(e){return e.theme.horizontalRule}),(function(e){return e.theme.codeBorder}),(function(e){return e.theme.fontFamilyMono}),(function(e){return e.theme.black}),(function(e){return e.theme.textHighlight}),(function(e){return e.theme.blockToolbarBackground}),(function(e){return e.theme.blockToolbarItem}),(function(e){return e.readOnly?"none":"inline"}),(function(e){return e.readOnly?"inline":"none"}),(function(e){return e.theme.codeBackground}),(function(e){return e.theme.codeBorder}),(function(e){return e.theme.fontFamilyMono}),(function(e){return e.theme.code}),(function(e){return e.theme.codeComment}),(function(e){return e.theme.codePunctuation}),(function(e){return e.theme.codeNumber}),(function(e){return e.theme.codeProperty}),(function(e){return e.theme.codeTag}),(function(e){return e.theme.codeString}),(function(e){return e.theme.codeSelector}),(function(e){return e.theme.codeAttr}),(function(e){return e.theme.codeEntity}),(function(e){return e.theme.codeKeyword}),(function(e){return e.theme.codeFunction}),(function(e){return e.theme.codeStatement}),(function(e){return e.theme.codePlaceholder}),(function(e){return e.theme.codeInserted}),(function(e){return e.theme.codeImportant}),(function(e){return e.theme.tableDivider}),(function(e){return e.theme.tableHeaderBackground}),(function(e){return e.theme.tableDivider}),(function(e){return e.readOnly?"inherit":e.theme.tableSelectedBackground}),(function(e){return e.theme.tableDivider}),(function(e){return e.theme.background}),(function(e){return e.readOnly?"none":"block"}),(function(e){return e.theme.text}),(function(e){return e.theme.tableSelected}),(function(e){return e.theme.tableDivider}),(function(e){return e.theme.background}),(function(e){return e.readOnly?"none":"block"}),(function(e){return e.theme.text}),(function(e){return e.theme.tableSelected}),(function(e){return e.theme.tableDivider}),(function(e){return e.theme.background}),(function(e){return e.readOnly?"none":"block"}),(function(e){return e.theme.text}),(function(e){return e.theme.tableSelected}),(function(e){return e.theme.scrollbarThumb}),(function(e){return e.theme.scrollbarBackground}),(function(e){return e.theme.scrollbarBackground}),(function(e){return e.theme.scrollbarThumb}),(function(e){return e.theme.scrollbarBackground}),(function(e){return e.theme.background}),(function(e){return e.readOnly?"none":"block"}),(function(e){return e.theme.textSecondary}),(function(e){return e.theme.text}),(function(e){return e.theme.cursor}),(function(e){return e.theme.fontFamily}));t.default=be},function(e,t){e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),u=0;ur&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0u.charCodeAt(8))break;case 115:a=a.replace(u,"-webkit-"+u)+";"+a;break;case 207:case 102:a=a.replace(u,"-webkit-"+(102s.charCodeAt(0)&&(s=s.trim()),s=[s],0p)&&(F=(q=q.replace(" ",":")).length),00&&this.requestPermissions(this.initialPermissions);var t=!0,n=!1,r=void 0;try{for(var o,i=this.messageQueue[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;this.postMessage(a.action,a.data,a.callback)}}catch(s){n=!0,r=s}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}this.messageQueue=[],this.loggingEnabled&&console.log("onReadyData",e),this.activateThemes(e.activeThemeUrls||[]),this.onReadyCallback&&this.onReadyCallback()}},{key:"getSelfComponentUUID",value:function(){return this.uuid}},{key:"isRunningInDesktopApplication",value:function(){return"desktop"===this.environment}},{key:"setComponentDataValueForKey",value:function(e,t){this.componentData[e]=t,this.postMessage("set-component-data",{componentData:this.componentData},(function(e){}))}},{key:"clearComponentData",value:function(){this.componentData={},this.postMessage("set-component-data",{componentData:this.componentData},(function(e){}))}},{key:"componentDataValueForKey",value:function(e){return this.componentData[e]}},{key:"postMessage",value:function(e,t,n){if(this.sessionKey){var r={action:e,data:t,messageId:this.generateUUID(),sessionKey:this.sessionKey,api:"component"},o=JSON.parse(JSON.stringify(r));o.callback=n,this.sentMessages.push(o),this.isMobile&&(r=JSON.stringify(r)),this.loggingEnabled&&console.log("Posting message:",r),window.parent.postMessage(r,this.origin)}else this.messageQueue.push({action:e,data:t,callback:n})}},{key:"setSize",value:function(e,t,n){this.postMessage("set-size",{type:e,width:t,height:n},(function(e){}))}},{key:"requestPermissions",value:function(e,t){this.postMessage("request-permissions",{permissions:e},function(e){t&&t()}.bind(this))}},{key:"streamItems",value:function(e,t){Array.isArray(e)||(e=[e]),this.postMessage("stream-items",{content_types:e},function(e){t(e.items)}.bind(this))}},{key:"streamContextItem",value:function(e){var t=this;this.postMessage("stream-context-item",null,(function(n){var r=n.item;(!t.lastStreamedItem||t.lastStreamedItem.uuid!==r.uuid)&&t.pendingSaveTimeout&&(clearTimeout(t.pendingSaveTimeout),t._performSavingOfItems(t.pendingSaveParams),t.pendingSaveTimeout=null,t.pendingSaveParams=null),t.lastStreamedItem=r,e(t.lastStreamedItem)}))}},{key:"selectItem",value:function(e){this.postMessage("select-item",{item:this.jsonObjectForItem(e)})}},{key:"createItem",value:function(e,t){this.postMessage("create-item",{item:this.jsonObjectForItem(e)},function(e){var n=e.item;!n&&e.items&&e.items.length>0&&(n=e.items[0]),this.associateItem(n),t&&t(n)}.bind(this))}},{key:"createItems",value:function(e,t){var n=this,r=e.map((function(e){return n.jsonObjectForItem(e)}));this.postMessage("create-items",{items:r},function(e){t&&t(e.items)}.bind(this))}},{key:"associateItem",value:function(e){this.postMessage("associate-item",{item:this.jsonObjectForItem(e)})}},{key:"deassociateItem",value:function(e){this.postMessage("deassociate-item",{item:this.jsonObjectForItem(e)})}},{key:"clearSelection",value:function(){this.postMessage("clear-selection",{content_type:"Tag"})}},{key:"deleteItem",value:function(e,t){this.deleteItems([e],t)}},{key:"deleteItems",value:function(e,t){var n={items:e.map(function(e){return this.jsonObjectForItem(e)}.bind(this))};this.postMessage("delete-items",n,(function(e){t&&t(e)}))}},{key:"sendCustomEvent",value:function(e,t,n){this.postMessage(e,t,function(e){n&&n(e)}.bind(this))}},{key:"saveItem",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.saveItems([e],t,n)}},{key:"saveItemWithPresave",value:function(e,t,n){this.saveItemsWithPresave([e],t,n)}},{key:"saveItemsWithPresave",value:function(e,t,n){this.saveItems(e,n,!1,t)}},{key:"_performSavingOfItems",value:function(e){var t=e.items,n=e.presave,r=e.callback;n&&n();var o=[],i=!0,a=!1,s=void 0;try{for(var u,l=t[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var c=u.value;o.push(this.jsonObjectForItem(c))}}catch(f){a=!0,s=f}finally{try{i||null==l.return||l.return()}finally{if(a)throw s}}this.postMessage("save-items",{items:o},(function(e){r&&r()}))}},{key:"saveItems",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3?arguments[3]:void 0;if(this.pendingSaveItems||(this.pendingSaveItems=[]),1!=this.coallesedSaving||r)this._performSavingOfItems({items:e,presave:o,callback:t});else{this.pendingSaveTimeout&&clearTimeout(this.pendingSaveTimeout);var i=e.map((function(e){return e.uuid})),a=this.pendingSaveItems.filter((function(e){return!i.includes(e.uuid)}));this.pendingSaveItems=a.concat(e),this.pendingSaveParams={items:this.pendingSaveItems,presave:o,callback:t},this.pendingSaveTimeout=setTimeout((function(){n._performSavingOfItems(n.pendingSaveParams),n.pendingSaveItems=[],n.pendingSaveTimeout=null,n.pendingSaveParams=null}),this.coallesedSavingDelay)}}},{key:"jsonObjectForItem",value:function(e){var t=Object.assign({},e);return t.children=null,t.parent=null,t}},{key:"getItemAppDataValue",value:function(e,t){var n=e.content.appData&&e.content.appData["org.standardnotes.sn"];return n?n[t]:null}},{key:"activateThemes",value:function(e){if(this.loggingEnabled&&console.log("Incoming themes",e),this.activeThemes.sort().toString()!=e.sort().toString()){var t=e||[],n=[],r=!0,o=!1,i=void 0;try{for(var a,s=this.activeThemes[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;e.includes(u)?t=t.filter((function(e){return e!=u})):n.push(u)}}catch(b){o=!0,i=b}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}this.loggingEnabled&&(console.log("Deactivating themes:",n),console.log("Activating themes:",t));for(var l=0,c=n;l>3]>>n%8*4&15;return("x"==e?r:3&r|8).toString(16)}))}var r=(new Date).getTime();return window.performance&&"function"===typeof window.performance.now&&(r+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=(r+16*Math.random())%16|0;return r=Math.floor(r/16),("x"==e?t:3&t|8).toString(16)}))}}])&&r(t.prototype,n),o&&r(t,o),e}();"undefined"!=typeof e.exports&&(e.exports=o),window&&(window.ComponentManager=o)},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i,a=!0,s=!1;return{s:function(){o=e[Symbol.iterator]()},n:function(){var e=o.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==o.return||o.return()}finally{if(s)throw i}}}}n.d(t,"a",(function(){return o}))},,function(e,t,n){"use strict";var r=n(67),o="function"===typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,l=o?Symbol.for("react.profiler"):60114,c=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,d=o?Symbol.for("react.forward_ref"):60112,p=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.memo"):60115,m=o?Symbol.for("react.lazy"):60116,v="function"===typeof Symbol&&Symbol.iterator;function g(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nT.length&&T.push(e)}function P(e,t,n){return null==e?0:function e(t,n,r,o){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var u=!1;if(null===t)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case i:case a:u=!0}}if(u)return r(o,t,""===n?"."+I(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var l=0;l