@progress/kendo-editor-common
Advanced tools
Comparing version 1.1.3-dev.202101150843 to 1.1.3-dev.202101190845
@@ -16,2 +16,2 @@ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prosemirror-state"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-view"),require("prosemirror-schema-list"),require("prosemirror-commands"),require("prosemirror-tables"),require("prosemirror-history"),require("prosemirror-inputrules"),require("prosemirror-dropcursor"),require("prosemirror-gapcursor"),require("prosemirror-keymap")):"function"==typeof define&&define.amd?define(["prosemirror-state","prosemirror-model","prosemirror-transform","prosemirror-view","prosemirror-schema-list","prosemirror-commands","prosemirror-tables","prosemirror-history","prosemirror-inputrules","prosemirror-dropcursor","prosemirror-gapcursor","prosemirror-keymap"],t):"object"==typeof exports?exports.KendoEditorCommon=t(require("prosemirror-state"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-view"),require("prosemirror-schema-list"),require("prosemirror-commands"),require("prosemirror-tables"),require("prosemirror-history"),require("prosemirror-inputrules"),require("prosemirror-dropcursor"),require("prosemirror-gapcursor"),require("prosemirror-keymap")):e.KendoEditorCommon=t(e["prosemirror-state"],e["prosemirror-model"],e["prosemirror-transform"],e["prosemirror-view"],e["prosemirror-schema-list"],e["prosemirror-commands"],e["prosemirror-tables"],e["prosemirror-history"],e["prosemirror-inputrules"],e["prosemirror-dropcursor"],e["prosemirror-gapcursor"],e["prosemirror-keymap"])}(window,(function(e,t,r,n,o,i,a,s,l,u,c,d){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=20)}([function(t,r){t.exports=e},function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",(function(){return o})),r.d(t,"__assign",(function(){return i})),r.d(t,"__rest",(function(){return a})),r.d(t,"__decorate",(function(){return s})),r.d(t,"__param",(function(){return l})),r.d(t,"__metadata",(function(){return u})),r.d(t,"__awaiter",(function(){return c})),r.d(t,"__generator",(function(){return d})),r.d(t,"__createBinding",(function(){return f})),r.d(t,"__exportStar",(function(){return p})),r.d(t,"__values",(function(){return m})),r.d(t,"__read",(function(){return v})),r.d(t,"__spread",(function(){return g})),r.d(t,"__spreadArrays",(function(){return h})),r.d(t,"__await",(function(){return y})),r.d(t,"__asyncGenerator",(function(){return k})),r.d(t,"__asyncDelegator",(function(){return b})),r.d(t,"__asyncValues",(function(){return _})),r.d(t,"__makeTemplateObject",(function(){return M})),r.d(t,"__importStar",(function(){return S})),r.d(t,"__importDefault",(function(){return x})),r.d(t,"__classPrivateFieldGet",(function(){return w})),r.d(t,"__classPrivateFieldSet",(function(){return T})); | ||
***************************************************************************** */ | ||
var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function o(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function s(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function l(e,t){return function(r,n){t(r,n,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))}function d(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function f(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function p(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function m(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function h(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}function y(e){return this instanceof y?(this.v=e,this):new y(e)}function k(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{(r=o[e](t)).value instanceof y?Promise.resolve(r.value.v).then(l,u):c(i[0][2],r)}catch(e){c(i[0][3],e)}var r}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function b(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:y(e[n](t)),done:"return"===n}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=m(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function M(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function x(e){return e&&e.__esModule?e:{default:e}}function w(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function T(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},function(e,r){e.exports=t},function(e,t){e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(0),i=r(11);t.changeStylesString=function(e,t){var r=t.style,n=t.value,o=t.newValue;if(!e)return{changed:!1,style:null};var i=e.split(/\s*;\s*/).filter((function(e){return Boolean(e)})),a=i.filter((function(e){var t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===r&&n.test(t[1]))}));return o&&a.push(r+": "+o),{style:a.join("; ")+(a.length?";":""),changed:Boolean(o)||a.length!==i.length}},t.canInsert=function(e,t){for(var r=e.selection.$from,n=r.depth;n>=0;n--){var o=r.index(n);if(r.node(n).canReplaceWith(o,o,t))return!0}return!1};var a=function(e){return e instanceof n.Node?e.type.name:e.name};t.findNthParentNodeOfType=function(e,t){return void 0===t&&(t=1),function(r){return function(e,t){return void 0===t&&(t=1),function(r){for(var n=r.$from,o=n.depth;o>0;o--){var i=n.node(o);if(e(i)&&0===(t-=1))return{depth:o,node:i}}}}((function(t){return a(t)===a(e)}),t)(r)}},t.insertNode=function(e,t){return function(r,n){var o=r.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),n(o)}},t.hasSameMarkup=function(e,t,r,o){var a=n.Fragment.from(i.parseContent(e,r,o)),s=n.Fragment.from(i.parseContent(t,r,o));return a.eq(s)},t.getSelectionText=function(e){var t=e.selection;if(t instanceof o.TextSelection||t instanceof o.AllSelection){var r=t.content().content;return r.textBetween(0,r.size)}return""},t.getNodeFromSelection=function(e){if(e.selection instanceof o.NodeSelection)return e.selection.node},t.selectedLineTextOnly=function(e){var r="",n=!1,o=e.selection,i=e.doc,a=o.$from,s=o.$to,l=o.from,u=o.to;return a.sameParent(s)&&(i.nodesBetween(l,u,(function(e){n=n||e.isLeaf&&!e.isText})),n||(r=t.getSelectionText(e))),r},t.indentHtml=function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")},t.shallowEqual=function(e,t){var r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every((function(r){return e[r]===t[r]}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),o=r(2);t.markApplies=function(e,t,r){for(var n=function(n){var o=t[n],i=o.$from,a=o.$to,s=0===i.depth&&e.type.allowsMarkType(r);if(e.nodesBetween(i.pos,a.pos,(function(e){if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(r)})),s)return{v:!0}},o=0;o<t.length;o++){var i=n(o);if(i)return i.v}return!1},t.toggleMark=function(e,r,n){return function(o,i){var a=o.selection,s=a.empty,l=a.$cursor,u=a.ranges;if(s&&!l||!t.markApplies(o.doc,u,e))return!1;if(i)if(l)e.isInSet(o.storedMarks||l.marks())?i(n.removeStoredMark(e)):i(n.addStoredMark(e.create(r)));else{for(var c=!1,d=0;!c&&d<u.length;d++){var f=u[d],p=f.$from,m=f.$to;c=o.doc.rangeHasMark(p.pos,m.pos,e)}for(d=0;d<u.length;d++){var v=u[d];p=v.$from,m=v.$to;c?n.removeMark(p.pos,m.pos,e):n.addMark(p.pos,m.pos,e.create(r))}i(n.scrollIntoView())}return!0}},t.removeMark=function(e,t,r,i){void 0===i&&(i=null);var a=[],s=0;return e.doc.nodesBetween(t,r,(function(e,n){if(e.isInline){s++;var l=null;if(i instanceof o.MarkType){var u=i.isInSet(e.marks);u&&(l=[u])}else i?i.isInSet(e.marks)&&(l=[i]):l=e.marks;if(l&&l.length)for(var c=Math.min(n+e.nodeSize,r),d=0;d<l.length;d++){for(var f=l[d],p=void 0,m=0;m<a.length;m++){var v=a[m];v.step===s-1&&f.eq(v.style)&&(p=v)}p?(p.to=c,p.step=s):a.push({style:f,from:Math.max(n,t),to:c,step:s})}}})),a.forEach((function(t){return e.step(new n.RemoveMarkStep(t.from,t.to,t.style))})),e},t.removeMarks=function(e,r,n,o){var i=r.selection,a=i.$cursor,s=i.ranges;if(o=o||r.tr,a)e.forEach((function(e){e.isInSet(r.storedMarks||a.marks())&&n(o.removeStoredMark(e))}));else{for(var l=function(r){var n=s[r],i=n.$from,a=n.$to;e.forEach((function(e){t.removeMark(o,i.pos,a.pos,e)}))},u=0;u<s.length;u++)l(u);n(o.scrollIntoView())}return!0};t.removeAllMarks=function(e){var r=(void 0===e?{}:e).except,n=void 0===r?[]:r;return function(e,r){var o,i=e.tr;t.cleanMarks(i,{except:(o=n,o instanceof Array?o:[o])}),i.docChanged&&r(i)}},t.cleanMarks=function(e,t){var r=t.except,n=e.doc,o=e.selection,i=n.type.schema,a=o.empty,s=o.ranges,l=(r||[]).map((function(e){return e.name}));if(!a){var u=Object.keys(i.marks).map((function(e){return i.marks[e]})).filter((function(e){return-1===l.indexOf(e.name)}));s.forEach((function(t){var r=t.$from,n=t.$to;u.forEach((function(t){return e.removeMark(r.pos,n.pos,t)}))}))}},t.hasMark=function(e,r){var n,o=e.schema.marks,i=(r.altMarks||[]).filter((function(e){return o[e]})),a=r.altStyle,s=e.selection,l=s.from,u=s.$from,c=s.to,d=s.empty,f=o[r.mark],p=e.doc,m=!1;return d?(n=e.storedMarks||u.marks(),m=f&&f.isInSet(n)||i.some((function(e){return o[e].isInSet(n)}))):m=f&&p.rangeHasMark(l,c,f)||i.some((function(e){return p.rangeHasMark(l,c,o[e])})),!m&&a&&o.style?t.selectionMarks(e,o.style).some((function(e){return null!==t.styleValue(e,a)})):Boolean(m)},t.styleValue=function(e,t){for(var r=(e&&e.attrs.style||"").split(/\s*;\s*/).filter((function(e){return Boolean(e)})),n=0;n<r.length;n++){var o=r[n].split(/\s*:\s*/);if(o[0].toLowerCase()===t.name&&t.value.test(o[1]))return o[1]}return null},t.selectionMarks=function(e,t){var r=e.selection,n=r.from,o=r.$from,i=r.to,a=r.empty,s=[];return a?s.push(t.isInSet(e.storedMarks||o.marks())):e.doc.nodesBetween(n,i,(function(e){e.isInline&&s.push(t.isInSet(e.marks))})),s},t.getMark=function(e,r){var n=t.selectionMarks(e,r),o=n.filter((function(e){return Boolean(e)}));return n.length===o.length?n[0]:void 0},t.getActiveMarks=function(e,r){var n=t.selectionMarks(e,r),o=n.filter((function(e){return Boolean(e)}));return{hasNodesWithoutMarks:n.length!==o.length,marks:o}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(4),i=r(3),a=r(2),s=r(0);t.changeTextBlock=function(e,t,r,n){if(!r.isTextblock)return!1;e.selection.ranges.forEach((function(o){var s=e.steps.length,l=o.$from.pos,u=o.$to.pos;e.doc.nodesBetween(l,u,(function(o,l){if(o.eq(t)&&o.isTextblock&&!o.hasMarkup(r,n)&&function(e,t,r){var n=e.resolve(t),o=n.index();return n.parent.canReplaceWith(o,o+1,r)}(e.doc,e.mapping.slice(s).map(l),r)){e.clearIncompatible(e.mapping.slice(s).map(l,1),r);var u=e.mapping.slice(s),c=u.map(l,1),d=u.map(l+o.nodeSize,1),f=new a.Slice(a.Fragment.from(r.create(n,null,o.marks)),0,0);return e.step(new i.ReplaceAroundStep(c,d,c+1,d-1,f,1,!0)),!1}}))}))},t.blockNodes=function(e,t){void 0===t&&(t={blocksInSelection:!1});var r=e.doc,n=e.selection,o=n.$from,i=n.ranges,a=t.blocksInSelection,l=[],u=n instanceof s.NodeSelection?n.node:void 0;return u?u.isBlock?(l.push(u),u.nodesBetween(0,u.content.size,(function(e){e.isBlock&&l.push(e)}))):!a&&o.parent&&o.parent.isBlock&&l.push(o.parent):i.forEach((function(e){var t=e.$from.pos,n=e.$to.pos;r.nodesBetween(t,n,(function(e,r,o,i){e.isBlock&&(!a||r>=t&&r+e.content.size+2<=n)&&l.push(e)}))})),l},t.formatBlockElements=function(e,r){return function(o,i){var a=t.blockNodes(o),s=o.schema.nodes,l=o.tr;l.setMeta("commandName",r),l.setMeta("args",{value:e}),a.forEach((function(r){if(r.type.isTextblock)if("p"===e){var o=r.attrs,i=o.level,a=n.__rest(o,["level"]);t.changeTextBlock(l,r,s.paragraph,a)}else if(/^h[1-6]$/i.test(e)){i=parseInt(e.substr(1),10);t.changeTextBlock(l,r,s.heading,n.__assign({},r.attrs,{level:i}))}else if("blockquote"===e){var u=r.attrs;i=u.level,a=n.__rest(u,["level"]);t.changeTextBlock(l,r,s.blockquote,a)}}));var u=l.docChanged;return u&&i(l.scrollIntoView()),u}},t.cleanTextBlockFormatting=function(e,r){void 0===r&&(r={blocksInSelection:!0});var o=e.doc,i=e.selection,a=r.blocksInSelection,s=r.blockNodeType;t.blockNodes({doc:o,selection:i},{blocksInSelection:a}).filter((function(e){return e.isTextblock})).forEach((function(r){var o=r.attrs||{},i=o.style,a=void 0===i?"":i,l=o.class,u=void 0===l?"":l,c=n.__rest(o,["style","class"]),d=s||r.type;(a||u||d!==r.type)&&t.changeTextBlock(e,r,d,c)}))},t.getBlockFormats=function(e){var r=t.blockNodes(e),n=e.schema.nodes,o=[];return r.forEach((function(e){e.type===n.paragraph?o.push("p"):e.type===n.heading?o.push("h"+e.attrs.level):e.type===n.blockquote&&o.push("blockquote")})),o},t.addStyles=function(e,t){var r,n,i=e.attrs.style;i&&t.forEach((function(e){n={style:e.name,value:/^.+$/,newValue:e.value},r=o.changeStylesString(i,n),i=r.changed?r.style:i}));return i=i||t.reduce((function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""}),""),Object.assign({},e.attrs,{style:i||null})},t.hasNode=function(e,t){var r=e.selection,n=r.from,o=r.to,i=!1;return e.doc.nodesBetween(n,o,(function(e){return!(i=i||e.type===t)})),i},t.parentBlockFormat=function(e){var r=t.getBlockFormats(e);return 1===new Set(r).size?r[0]:null},t.activeNode=function(e){return{tag:t.parentBlockFormat(e)||""}}},function(e,t){e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(3),i=r(4),a=r(5),s=function(e,t){var r=e.find((function(e){return"style"===e.type.name})),n=r&&r.attrs.style;return i.changeStylesString(n,t)},l=function(e,t,r,i,a){var l=a.create({style:i.style}),u=[],c=[],d=null,f=null;return e.doc.nodesBetween(t,r,(function(e,p,m){if(e.isInline){var v=e.marks;if(!l.isInSet(v)&&m.type.allowsMarkType(l.type)){var g=Math.max(p,t),h=Math.min(p+e.nodeSize,r),y=s(v,i);if(y.changed||i.newValue){for(var k=y.changed?{style:y.style||null}:{style:[i.style]+": "+i.newValue+";"},b=a.isInSet(v)?v.find((function(e){return"style"===e.type.name})):null,_=b?n.__assign({},b.attrs,k):k,M=a.create(_),S=M.addToSet(v),x=0;x<v.length;x++)v[x].isInSet(S)||(d&&d.to===g&&d.mark.eq(v[x])?d.to=h:(d=new o.RemoveMarkStep(g,h,v[x]),u.push(d)));var w=f&&f.to===g,T=w&&M.attrs.style===f.mark.attrs.style;w&&T?f.to=h:Object.keys(_).some((function(e){return null!==_[e]}))&&(f=new o.AddMarkStep(g,h,M),c.push(f))}}}})),u.forEach((function(t){return e.step(t)})),c.forEach((function(t){return e.step(t)})),u.length+c.length>0};t.getInlineStyles=function(e,t){var r=e.schema.marks.style;return(r?a.selectionMarks(e,r):[]).map((function(e){return a.styleValue(e,t)})).filter((function(e){return null!==e}))};var u=function(e,t){return function(r,o,u){var c=r.selection,d=c.empty,f=c.$cursor,p=c.ranges;if(d&&!f||!a.markApplies(r.doc,p,e))return!1;var m=!1;if(o)if(u=u||r.tr,f){var v=r.storedMarks||f.marks();if(e.isInSet(v)){var g=s(v,t),h=v.find((function(e){return"style"===e.type.name})),y=n.__assign({},h?h.attrs:{},{style:g.style||null});if(i.shallowEqual(h.attrs,y))return!1;o(u.removeStoredMark(e)),Object.keys(y).some((function(e){return null!==y[e]}))&&o(u.addStoredMark(e.create(y))),m=!0}}else{for(var k=0;k<p.length;k++){var b=p[k],_=b.$from,M=b.$to;m=l(u,_.pos,M.pos,t,e)}m&&(u.scrollIntoView(),o(u))}return m}};t.toggleInlineFormat=function(e,t,r){return function(n,o){var i=n.schema.marks,s=e.altStyle,l=e.altMarks,c=void 0===l?[]:l,d=e.mark;t=t||n.tr;var f=!1,p=!1,m=function(){return p=!0};s&&i.style&&(f=u(i.style,{style:s.name,value:s.value})(n,m,t));var v=[d].concat(c).filter((function(e){return i[e]})).map((function(e){return a.hasMark(n,{mark:e})&&i[e]})).filter((function(e){return e}));return v.length?a.removeMarks(v,n,m,t):f||a.toggleMark(i[d],r,t)(n,m),p&&o(t),p}},t.applyInlineStyle=function(e,t){return function(r,o){var s=r.schema.marks.style,l={style:e.style,value:/^.+$/,newValue:e.value},c=r.tr;t&&c.setMeta("commandName",t),c.setMeta("args",e);var d=r.selection,f=d.empty,p=d.$cursor,m=d.ranges;if(f&&!p||!s||!a.markApplies(r.doc,m,s))return!1;if(p){var v=r.storedMarks||p.marks(),g=s.isInSet(v)?v.find((function(e){return"style"===e.type.name})):null,h={style:null};if(g&&g.attrs.style){var y=i.changeStylesString(g.attrs.style,l);y.changed&&y.style&&(h.style=y.style)}else l.newValue&&(h.style=[l.style]+": "+l.newValue+";");var k=g?n.__assign({},g.attrs,h):h;return Object.keys(k).some((function(e){return null!==k[e]}))?o(c.addStoredMark(s.create(k))):o(c.removeStoredMark(s)),!0}return u(s,l)(r,o,c)}}},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(0);t.parseContent=function(e,t,r){var o,i=document.createElement("template");"content"in i?(i.innerHTML=e,o=i.content):o=(new DOMParser).parseFromString(e,"text/html").body||document.createDocumentFragment();return n.DOMParser.fromSchema(t).parse(o,r)},t.getHtml=function(e){var t=n.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),r=document.createElement("div");return r.appendChild(t),r.innerHTML},t.setHtml=function(e,r,n){return void 0===r&&(r="setHTML"),void 0===n&&(n={preserveWhitespace:"full"}),function(i,a){return a(i.tr.setSelection(new o.AllSelection(i.doc)).replaceSelectionWith(t.parseContent(e,i.schema,n)).setMeta("commandName",r))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(13);t.indentRules={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"}],listsTypes:n.__assign({},o.listsTypes)},t.outdentRules={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"}],listsTypes:n.__assign({},o.listsTypes)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1);t.listsTypes={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},t.orderedList={listType:t.listsTypes.orderedList,types:n.__assign({},t.listsTypes)},t.bulletList={listType:t.listsTypes.bulletList,types:n.__assign({},t.listsTypes)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(2),i=r(0),a=r(3),s=r(10),l=r(9),u=r(13),c=function(e,t,r){for(var n=t.depth,o=e.nodes[r.bulletList],i=e.nodes[r.orderedList],a=e.nodes[r.listItem],s=t.depth;s>0;s--){var l=t.node(s);if(l.type!==o&&l.type!==i||(n=s),l.type!==o&&l.type!==i&&l.type!==a)break}return n-1};function d(e){return function(t,r,n){if(!n)return!1;var o,i=(t=n.state).schema.nodes[e.listType],a=t.selection,u=a.$from,c=a.$to,d=u.node(-2),f=u.node(-3),m=function(e,t,r,n){return 0===function(e,t,r){var n=Array(),o=function(e,t){var r=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;var n=t.node(t.depth),o=t;for(;t.depth>=1;)t=e.resolve(t.before(t.depth)),(n=t.node(t.depth))&&-1!==r.indexOf(n.type.name)&&(o=t);return o}(e,t).depth,i=e.resolve(t.start(o));for(;i.pos<=r.start(r.depth);){var a=Math.min(i.depth,o),s=i.node(a);if(s&&n.push(s),0===a)break;var l=e.resolve(i.after(a));if(l.start(a)>=e.nodeSize-2)break;l.depth!==i.depth&&(l=e.resolve(l.pos+2)),i=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return n}(e,t,r).filter((function(e){return e.type!==n})).length}(t.doc,u,c,i);return(d&&d.type===i||f&&f.type===i)&&m?p(e)(t,r):(m||(p(e)(t,r),t=n.state),(o=i,s.autoJoin(l.wrapInList(o),(function(e,t){return e.type===t.type&&e.type===o})))(t,r))}}function f(e,t,r,n){n||(n=e.schema.nodes.listItem);var i=t.$from,s=t.$to,l=i.blockRange(s,(function(e){return e.childCount&&e.firstChild.type===n}));if(!l||l.depth<2||i.node(l.depth-1).type!==n)return r;var u=l.end,c=s.end(l.depth);return u<c&&(r.step(new a.ReplaceAroundStep(u-1,c,u,c,new o.Slice(o.Fragment.from(n.create(void 0,l.parent.copy())),1,0),1,!0)),l=new o.NodeRange(r.doc.resolve(i.pos),r.doc.resolve(c),l.depth)),r.lift(l,a.liftTarget(l)).scrollIntoView()}function p(e){return function(t,r){var n=t.tr,o=t.selection,s=o.$from,l=o.$to;return n.doc.nodesBetween(s.pos,l.pos,(function(r,o){if(r.isTextblock||"blockquote"===r.type.name||"div"===r.type.name){var s=new i.NodeSelection(n.doc.resolve(n.mapping.map(o))),l=s.$from.blockRange(s.$to);if(!l||s.$from.parent.type!==t.schema.nodes[e.listItem])return!1;var u=l&&a.liftTarget(l);if(null==u)return!1;n.lift(l,u)}})),r&&r(n),!0}}t.toggleList=function(e,t,r,n,o){var a=n.listType,s=e.selection,l=s.$from.node(s.$from.depth-2),u=s.$to.node(s.$to.depth-2);if(l&&l.type.name===a&&u&&u.type.name===a){var p=r.state.schema.nodes,m={bulletList:p[n.bulletList],orderedList:p[n.orderedList],listItem:p[n.listItem]},v=function(e,t){for(var r,n=t.bulletList,o=t.orderedList,i=t.listItem,a=e.depth-1;a>0;a--){var s=e.node(a);if(s.type!==n&&s.type!==o||(r=a),s.type!==n&&s.type!==o&&s.type!==i)break}return r}(s.$to,m),g=function(e,t,r,n,o,a){a||(a=e.schema.nodes.listItem);var s=!1;return o.doc.nodesBetween(t,r,(function(r,l){if(!s&&r.type===a&&l>t){s=!0;for(var u=n+3;u>n+2;){var c=o.doc.resolve(o.mapping.map(l));u=c.depth;var d=o.doc.resolve(o.mapping.map(l+r.textContent.length)),p=new i.TextSelection(c,d);o=f(e,p,o,a)}}})),o}(e,s.$to.pos,s.$to.end(v),v,r.state.tr,m.listItem);return(g=function(e,t,r){var n=e.selection,o=n.from,i=n.to,a=e.schema.nodes,s=a.paragraph,l=a.heading,u=[];t.doc.nodesBetween(o,i,(function(e,t){e.type!==s&&e.type!==l||u.push({node:e,pos:t})}));for(var d=u.length-1;d>=0;d--){var f=u[d],p=t.doc.resolve(t.mapping.map(f.pos));if(p.depth>0){var m=void 0;m=f.node.textContent&&f.node.textContent.length>0?t.doc.resolve(t.mapping.map(f.pos+f.node.textContent.length)):t.doc.resolve(t.mapping.map(f.pos+1));var v=p.blockRange(m);v&&t.lift(v,c(e.schema,p,r))}}return t}(e,g,n)).setMeta("commandName",o),t(g),!0}return d(n)(e,t,r)},t.toggleUnorderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.bulletList.listType},u.bulletList.types))},t.toggleOrderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.orderedList.listType},u.orderedList.types))},t.splitListItemKeepMarks=function(e){return function(t,r){return l.splitListItem(e)(t,(function(e){var n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();n&&e.ensureMarks(n),r(e)}))}}},function(e,t){e.exports=a},function(e,t){e.exports=s},function(e,t){e.exports=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bold={mark:"strong",altMarks:["b"],altStyle:{name:"font-weight",value:/^(bold(er)?|[5-9]\d{2,})$/}},t.italic={mark:"em",altMarks:["i"],altStyle:{name:"font-style",value:/^italic$/i}},t.underline={mark:"u",altStyle:{name:"text-decoration",value:/^underline$/i}},t.strikethrough={mark:"del",altStyle:{name:"text-decoration",value:/^line-through$/i}},t.subscript={mark:"sub"},t.superscript={mark:"sup"},t.link={mark:"link"},t.unlink={mark:"link"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,o=function(e){return/^MsoListParagraph/.test(e.className)},i=function(e){var t=e.innerHTML;return t=(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},a=function(e,t){var r=document.createElement(e);return r.style.listStyleType=t,r},s=function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},l=function(e,t){var r=[];Array.from(e).forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var n=e;n.getAttribute("datalist")?(r.push(e),t.add(r)):o(n)&&r.length?r.push(e):(r=[],"DIV"===n.nodeName?l(n.children,t):"TABLE"===n.nodeName&&Array.from(n.querySelectorAll("td,th")).forEach((function(e){l(e.children,t)})))}}))},u=function(e){var t,r=e.innerHTML,n=function(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")};return r=r.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(r)?{tag:"ul",style:(t=n(i(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(t)?null:/^o/.test(t)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(r)?{tag:"ol",style:s(n(i(e)))}:void 0},c=function(e){var t,r=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),1===e.childNodes.length?t=e.firstChild.nodeType===Node.TEXT_NODE?i(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),t="p"!==r?"<"+r+">"+e.innerHTML+"</"+r+">":e.innerHTML),e.parentNode.removeChild(e);var n=document.createElement("li");return n.innerHTML=t,n};t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=function(e){return e=e.replace(n,(function(e,t,r){return'datalist="'+t+'" datalevel="'+r+'" '+e}))}(e);var r=new Set;return l(t.children,r),r.forEach((function(e){return function(e){var t,r,n,i,s,l,d,f,p,m,v,g,h,y=-1,k={};for(f=0;f<e.length;f++){var b=(h={datalist:(p=e[f]).getAttribute("datalist"),datalevel:p.getAttribute("datalevel")}).datalist,_=u(p);if(m=_&&_.tag){if(v=h.datalevel||parseFloat(p.style.marginLeft||0),h.datalevel||p.style.marginLeft){var M=m+b;k[v]||(k[v]={}),(!r||r<0)&&(r=v,n=b,i=(d=e.filter((function(e){return e.getAttribute("datalist")===String(n)})))[d.length-1],l=a(m,_&&_.style),p.parentNode.insertBefore(l,p),y=v,k[v][M]=l),s=i===p,g=k[v][M],(v>y||!g)&&(g=a(m,_&&_.style),k[v][M]=g,t.appendChild(g)),t=c(p),g.appendChild(t),s?r=y=-1:y=v}}else!t||s&&!o(p)||(p.style.marginLeft&&(p.style.marginLeft=""),p.style.marginLeft&&(p.style.margin=""),t.appendChild(p))}}(e)})),t.innerHTML}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(11);t.getHtml=o.getHtml,t.setHtml=o.setHtml,t.parseContent=o.parseContent;var i=r(8);t.applyInlineStyle=i.applyInlineStyle,t.getInlineStyles=i.getInlineStyles,t.toggleInlineFormat=i.toggleInlineFormat;var a=r(21);t.applyLink=a.applyLink,t.removeLink=a.removeLink;var s=r(22);t.insertText=s.insertText;var l=r(23);t.insertImage=l.insertImage;var u=r(24);t.alignBlocks=u.alignBlocks,t.isAligned=u.isAligned;var c=r(25);t.cleanFormatting=c.cleanFormatting;var d=r(6);t.hasNode=d.hasNode,t.activeNode=d.activeNode,t.formatBlockElements=d.formatBlockElements,t.getBlockFormats=d.getBlockFormats,t.parentBlockFormat=d.parentBlockFormat,t.changeTextBlock=d.changeTextBlock,t.blockNodes=d.blockNodes,t.cleanTextBlockFormatting=d.cleanTextBlockFormatting;var f=r(5);t.hasMark=f.hasMark,t.getMark=f.getMark,t.getActiveMarks=f.getActiveMarks,t.removeAllMarks=f.removeAllMarks,t.cleanMarks=f.cleanMarks,t.selectionMarks=f.selectionMarks;var p=r(26);t.indent=p.indent,t.canIndentAsListItem=p.canIndentAsListItem,t.outdent=p.outdent,t.canOutdentAsListItem=p.canOutdentAsListItem,t.isIndented=p.isIndented,t.canBeIndented=p.canBeIndented,t.indentBlocks=p.indentBlocks;var m=r(14);t.toggleOrderedList=m.toggleOrderedList,t.toggleUnorderedList=m.toggleUnorderedList,t.toggleList=m.toggleList;var v=r(4);t.hasSameMarkup=v.hasSameMarkup,t.getSelectionText=v.getSelectionText,t.getNodeFromSelection=v.getNodeFromSelection,t.selectedLineTextOnly=v.selectedLineTextOnly,t.canInsert=v.canInsert,t.insertNode=v.insertNode,t.indentHtml=v.indentHtml;var g=r(27);t.alignLeftRules=g.alignLeftRules,t.alignCenterRules=g.alignCenterRules,t.alignRightRules=g.alignRightRules,t.alignJustifyRules=g.alignJustifyRules,t.alignRemoveRules=g.alignRemoveRules;var h=r(12);t.indentRules=h.indentRules,t.outdentRules=h.outdentRules;var y=r(28);t.nodes=y.nodes,t.marks=y.marks;var k=r(29);t.buildKeymap=k.buildKeymap,t.buildListKeymap=k.buildListKeymap;var b=r(18);t.bold=b.bold,t.italic=b.italic,t.underline=b.underline,t.strikethrough=b.strikethrough,t.subscript=b.subscript,t.superscript=b.superscript,t.link=b.link;var _=r(30);t.sanitize=_.sanitize,t.removeComments=_.removeComments,t.removeTag=_.removeTag,t.pasteCleanup=_.pasteCleanup,t.sanitizeClassAttr=_.sanitizeClassAttr,t.sanitizeStyleAttr=_.sanitizeStyleAttr,t.removeAttribute=_.removeAttribute;var M=r(19);t.convertMsLists=M.convertMsLists;var S=r(31);t.createTable=S.createTable;var x=r(32);t.find=x.find,t.findAt=x.findAt,t.findAll=x.findAll,t.replace=x.replace,t.replaceAll=x.replaceAll;var w=r(33);t.placeholder=w.placeholder;var T=r(34);t.spacesFix=T.spacesFix;var O=r(35);t.textHighlight=O.textHighlight,t.textHighlightKey=O.textHighlightKey,n.__exportStar(r(10),t),n.__exportStar(r(36),t),n.__exportStar(r(37),t),n.__exportStar(r(16),t),n.__exportStar(r(17),t),n.__exportStar(r(38),t),n.__exportStar(r(2),t),n.__exportStar(r(9),t),n.__exportStar(r(0),t),n.__exportStar(r(15),t),n.__exportStar(r(3),t),n.__exportStar(r(7),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8),o=r(5),i=r(0);t.removeLink=function(e,t){return function(r,i){var a=r.selection.$cursor;if(a){var s=a.parent,l=a.index(),u=r.schema.marks[e.mark],c=s.child(l).marks.find((function(e){return e.type===u})),d=s.childCount,f=a.pos-a.textOffset,p=s.child(l).nodeSize,m=void 0,v=void 0;for(m=l-1;m>=0&&c.isInSet(s.child(m).marks);)p+=v=s.child(m).nodeSize,f-=v,m-=1;for(m=l+1;m<d&&c.isInSet(s.child(m).marks);)p+=s.child(m).nodeSize,m+=1;i(o.removeMark(t||r.tr,f,f+p,c))}else n.toggleInlineFormat(e,t)(r,i)}};t.applyLink=function(e,r){var a=e.mark,s=e.attrs;return void 0===r&&(r="link"),function(e,l){var u=e.schema.marks,c=e.tr;r&&(c.setMeta("commandName",r),c.setMeta("args",s));var d=!1,f=function(){return d=!0};if(function(e,t){var r=o.selectionMarks(e,t);return 1===r.length&&r[0]?r[0]:null}(e,u[a]))!function(e,t){return function(r,n){var o=r.selection,i=o.$cursor,a=o.from,s=o.to,l=r.schema.marks[e.mark];if(i){var u=i.parent,c=i.index(),d=u.child(c).marks.find((function(e){return e.type===l})),f=u.childCount,p=i.pos-i.textOffset,m=u.child(c).nodeSize,v=void 0,g=void 0;for(v=c-1;v>=0&&d.isInSet(u.child(v).marks);)m+=g=u.child(v).nodeSize,p-=g,v-=1;for(v=c+1;v<f&&d.isInSet(u.child(v).marks);)m+=u.child(v).nodeSize,v+=1;t.removeMark(p,p+m,l),t.addMark(p,p+m,l.create(e.attrs)),n(t)}else t.doc.nodesBetween(a,s,(function(r,o){r.isInline&&l.isInSet(r.marks)&&(t.removeMark(o,o+r.nodeSize,l),t.addMark(o,o+r.nodeSize,l.create(e.attrs)),n(t))}))}}({mark:a,attrs:s},c)(e,f);else{var p=e;o.hasMark(e,{mark:a})&&(t.removeLink({mark:a,attrs:s},c)(e,f),p=i.EditorState.create({doc:c.doc,selection:c.selection})),d?o.toggleMark(u[a],s,c)(p,f):n.toggleInlineFormat({mark:a},c,s)(p,f)}return d&&l(c),d}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(e){return function(t,r){r(t.tr.insertText(e.text,e.from,e.to))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4);t.insertImage=function(e){return function(t,r){var o=t.schema.nodes.image,i=o.createAndFill(e);n.insertNode(i)(t,(function(t){return r(t.setMeta("commandName","insertImage").setMeta("args",e))}))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6);t.alignBlocks=function(e,t){return function(r,o){var i=n.blockNodes(r),a=r.tr;a.setMeta("commandName",t),i.forEach((function(t){if(t.type.isTextblock){var r={},o=e.find((function(e){return e.node===t.type.name}));o&&(r=n.addStyles(t,o.style)),n.changeTextBlock(a,t,t.type,r)}}));var s=a.docChanged;return s&&o(a.scrollIntoView()),s}},t.isAligned=function(e,t){var r=n.blockNodes(e),o=!1;return r.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var r=t.find((function(t){return t.node===e.type.name}));r&&(o=r.style.every((function(t){return!!t.value&&new RegExp(t.name+":\\s?"+t.value,"i").test(e.attrs.style)})))}})),o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6),o=r(5);t.cleanFormatting=function(e){return void 0===e&&(e={blocksInSelection:!0}),function(t,r){var i=t.tr,a=e.blocksInSelection,s=e.blockNodeType,l=(e.exceptMarks||[t.schema.marks.link]).filter(Boolean);o.cleanMarks(i,{except:l}),n.cleanTextBlockFormatting(i,{blocksInSelection:a,blockNodeType:s});var u=i.docChanged;return u&&r&&r(i),u}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9),o=r(12),i=r(6),a=r(4);t.indentBlocks=function(e,t,r){return function(n,o){var a=i.blockNodes(n),s=n.tr;s.setMeta("commandName",t),a.forEach((function(t){if(t.type.isTextblock){var n=void 0,o=e.find((function(e){return e.node===t.type.name}));if(o){var a="rtl"===r?o.rtlStyle:o.style,l={name:a,value:o.step>0?""+o.step+o.unit:""};if(t.attrs.style){var u=new RegExp(a+":\\s?(\\d+)"+o.unit,"i"),c=t.attrs.style.match(u);if(c){var d=parseFloat(c[1])+o.step;d=d<=0?"":d,l.value=""+d+(d?o.unit:"")}}n=i.addStyles(t,[l])}n&&i.changeTextBlock(s,t,t.type,n)}}));var l=s.docChanged;return l&&o(s.scrollIntoView()),l}},t.isIndented=function(e,t,r){var n=i.blockNodes(e),o=!1;return n.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var n=t.find((function(t){return t.node===e.type.name}));if(n){var i="rtl"===r?n.rtlStyle:n.style,a=new RegExp(i+":\\s?\\d+"+n.unit,"i");o=a.test(e.attrs.style)}}})),o},t.canIndentAsListItem=function(e,t){return n.sinkListItem(t)(e)},t.canOutdentAsListItem=function(e,t){var r=e.schema.nodes[t.listsTypes.listItem],o=e.schema.nodes[t.listsTypes.orderedList],i=e.schema.nodes[t.listsTypes.bulletList],s=!!a.findNthParentNodeOfType(o,2)(e.selection),l=!!a.findNthParentNodeOfType(i,2)(e.selection);return(s||l)&&n.liftListItem(r)(e)},t.canBeIndented=function(e,r){var n=e.schema.nodes,a=n[o.indentRules.listsTypes.listItem];return(t.isIndented(e,r.nodes)||o.indentRules.nodes.some((function(t){return n[t.node]&&i.hasNode(e,n[t.node])})))&&!i.hasNode(e,a)},t.indent=function(e,r){var i=e.schema.nodes[o.indentRules.listsTypes.listItem],a=t.canBeIndented(e,o.indentRules);t.canIndentAsListItem(e,i)?n.sinkListItem(i)(e,r):a&&t.indentBlocks(o.indentRules.nodes)(e,r)},t.outdent=function(e,r){var i=e.schema.nodes[o.outdentRules.listsTypes.listItem],a=t.canBeIndented(e,o.outdentRules);t.canOutdentAsListItem(e,o.outdentRules)?n.liftListItem(i)(e,r):a&&t.indentBlocks(o.outdentRules.nodes)(e,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){return{name:e,value:t}};t.alignLeftRules=[{node:"paragraph",style:[n("text-align","left")]},{node:"heading",style:[n("text-align","left")]}],t.alignRightRules=[{node:"paragraph",style:[n("text-align","right")]},{node:"heading",style:[n("text-align","right")]}],t.alignCenterRules=[{node:"paragraph",style:[n("text-align","center")]},{node:"heading",style:[n("text-align","center")]}],t.alignJustifyRules=[{node:"paragraph",style:[n("text-align","justify")]},{node:"heading",style:[n("text-align","justify")]}],t.alignRemoveRules=[{node:"paragraph",style:[n("text-align","")]},{node:"heading",style:[n("text-align","")]}]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(15),i=["blockquote",0],a=["hr"],s=["pre",["code",0]],l=["ol",0],u=["ul",0],c=["li",0],d=function(e){for(var t,r={},n=e.attributes,o=0;o<n.length;o++)r[(t=n[o]).name]=t.value;return r},f=function(e,t){for(var r in e)if(r&&null!==e[r]&&r!==t)return!0;return!1},p=function(e,t){var r={};for(var n in e)n&&null!==e[n]&&n!==t&&(r[n]=e[n]);return r},m=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},v=n.__assign({link:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:d}],toDOM:function(e){return["a",p(e.attrs),0]}}},m("strong"),m("b"),m("em"),m("i"),m("u"),m("del"),m("sub"),m("sup"),m("code"),{style:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["span",p(e.attrs),0]:["span",0]}}});t.marks=v;var g=n.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["p",p(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["div",p(e.attrs),0]:["div",0]}},blockquote:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return i}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return a}},heading:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return n.__assign({},d(e),{level:1})}},{tag:"h2",getAttrs:function(e){return n.__assign({},d(e),{level:2})}},{tag:"h3",getAttrs:function(e){return n.__assign({},d(e),{level:3})}},{tag:"h4",getAttrs:function(e){return n.__assign({},d(e),{level:4})}},{tag:"h5",getAttrs:function(e){return n.__assign({},d(e),{level:5})}},{tag:"h6",getAttrs:function(e){return n.__assign({},d(e),{level:6})}}],toDOM:function(e){return f(e.attrs,"level")?["h"+e.attrs.level,p(e.attrs,"level"),0]:["h"+e.attrs.level,0]}},code_block:{content:"text*",marks:"",group:"block",code:!0,defining:!0,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return s}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:n.__assign({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["img",p(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["br",p(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return n.__assign({},d(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?f(e.attrs,"order")?["ol",p(e.attrs,"order"),0]:l:["ol",n.__assign({},p(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["ul",p(e.attrs),0]:u}},list_item:{content:"block*",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["li",p(e.attrs),0]:c},defining:!0}},o.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(10),o=r(16),i=r(17),a=r(14),s=r(18),l=r(8),u="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var t={};if(t["Mod-z"]=o.undo,t["Shift-Mod-z"]=o.redo,t.Backspace=n.chainCommands(i.undoInputRule,n.deleteSelection,n.joinBackward,n.selectNodeBackward),t.Enter=n.chainCommands(n.newlineInCode,n.createParagraphNear,n.liftEmptyBlock,n.splitBlockKeepMarks),u||(t["Mod-y"]=o.redo),e.marks.strong&&(t["Mod-b"]=l.toggleInlineFormat(s.bold)),e.marks.em&&(t["Mod-i"]=l.toggleInlineFormat(s.italic)),e.marks.underline&&(t["Mod-u"]=l.toggleInlineFormat(s.underline)),e.nodes.hard_break){var r=e.nodes.hard_break,a=n.chainCommands(n.exitCode,(function(e,t){return t(e.tr.replaceSelectionWith(r.create()).scrollIntoView()),!0}));t["Shift-Enter"]=a}return t},t.buildListKeymap=function(e){var t={};return e.nodes.list_item&&(t.Enter=a.splitListItemKeepMarks(e.nodes.list_item)),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(19);t.sanitize=function(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/^[\s\S]+?<!--StartFragment-->\s*([\s\S]*?)\s*<!--EndFragment-->[\s\S]+$/,"$1")).replace(/<\/?[ovw]:[^>]*?>/gi,"")).replace(/<\\?\??xml[^>]*>/gi,"")).replace(/<(?:link|meta) [^>]+?>/gi,"")).replace(/<style[^>]*?>\s*<\/style>/gi,"")).replace(/<\/?st1:.*?>/gi,"")).replace(/<a name="[a-zA-Z0-9_]+">/gim,"")).replace(/v:shapes?="[^"]+"/gi,"")).replace(/<!\[if !supportLists\]>/gi,"")).replace(/<!\[endif\]>/gi,"")},t.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},t.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},t.removeAttribute=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},t.sanitizeClassAttr=function(e){/^Mso/.test(e.value)&&t.removeAttribute(e)};var o=/\s*;\s*/,i=/\s*:\s*/;t.sanitizeStyleAttr=function(e){var r,n,a=e.value.split(o).filter((function(e){return Boolean(e)})),s=e.ownerElement.style,l="";a.forEach((function(e){var t;t=e.split(i),r=t[0],n=t[1],void 0!==s[r]&&(l+=r+": "+n+"; ")})),(l=l.trim())?e.value=l:t.removeAttribute(e)};t.pasteCleanup=function(e,r){var o=e;if(r.convertMsLists&&(o=n.convertMsLists(o)),r.stripTags&&(o=t.removeTag(o,r.stripTags)),r.attributes){var i=document.createElement("div");i.innerHTML=o,Array.from(i.querySelectorAll("*")).forEach((function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var r=e.attributes.length-1;r>=0;r--){var n=e.attributes[r];t[n.name]?t[n.name](n):t["*"]&&t["*"](n)}"SPAN"===e.nodeName&&0===e.attributes.length&&function(e){var t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}(e)}}(e,r.attributes)})),o=i.innerHTML}return o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=function(e,t,r){for(var n,o=e.table,i=e.table_row,a=e.table_cell,s=[],l=0;l<t+1;l++){n=[];for(var u=0;u<r+1;u++)n.push(a.createAndFill());s.push(i.createAndFill(void 0,n))}return o.createAndFill(void 0,s)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(0);t.findAt=function(e,t,r,n,i){var l,u,c,d,f,p,m=[],v=[],g=t.matchCase,h=t.matchWord,y=t.useRegExp,k=t.text;if(y&&(/^\\$/.test(k)||/[^\\]\\$/.test(k))&&(k=k.substring(0,k.length-1)),!k)return m;var b=g?"g":"gi",_=y?new RegExp(k,b):s(k,b);return e.nodesBetween(r,n,(function(t,s,g){if(i(m))return!1;t.inlineContent&&s+t.content.size>=r&&(v.length=0,t.nodesBetween(0,t.content.size,(function(t,g,y,k){if(i(m))return!1;var b=1+s+g;if(t.isText&&b+t.nodeSize>=r){if(f=t.text||"",p=y.childCount-1>=k+1&&y.child(k+1),v.push(r<=b?{text:f,start:b}:{text:f.slice(r-b),start:r}),p&&p.isText)return;for(u=v.map((function(e){return e.text})).join(""),l=_.exec(u);null!==l&&(c=v[0].start+l.index,d=c+l[0].length,r<=c&&n>=d&&a(l,h)&&m.push(o.TextSelection.create(e,c,d)),!i(m));)l=_.exec(u)}else v.length=0})))})),m},t.find=function(e,r){var o=r.backward,i=r.matchCyclic,a=n.__rest(r,["backward","matchCyclic"]),s=o?function(){return!1}:function(e){return e.length>0},l=e.doc,u=e.selection,c=[];return o?!(c=t.findAt(l,a,0,u.from,s)).length&&i&&(c=t.findAt(l,a,u.from,l.content.size,s)):!(c=t.findAt(l,a,u.to,l.content.size,s)).length&&i&&(c=t.findAt(l,a,0,u.to,s)),c.length?c[c.length-1]:null},t.findAll=function(e,r){return t.findAt(e,r,0,e.content.size,(function(){return!1}))},t.replace=function(e,t,r){var n=e.from,i=e.to;return r.insertText(t,n,i).setSelection(o.TextSelection.create(r.doc,n,n+t.length)),r},t.replaceAll=function(e,r,n){var o=t.findAll(e.doc,n);if(0===o.length)return null;for(var i=e.tr,a=o.length-1;a>=0;a--)i.insertText(r,o[a].from,o[a].to);return i};var i=/^[\s0-9~`!@#$%\^&*\(\)_\-=+\\|\[\]{};:'"\?/.,<>]?$/,a=function(e,t){if(t){if(!0===t){var r=e.input,n=r.charAt(e.index-1),o=r.charAt(e.index+e[0].length);return i.test(n)&&i.test(o)}return t(e)}return!0},s=function(e,t){var r=e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/\s/g,"\\s");return new RegExp(r,t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(7);t.placeholder=function(e){var t={class:"k-placeholder","data-placeholder":e};return new n.Plugin({key:new n.PluginKey("placeholder"),props:{decorations:function(e){var r=e.doc,n=r.content.firstChild;if(!(0===r.childCount||1===r.childCount&&n.inlineContent&&0===n.childCount))return o.DecorationSet.empty;var i=[];return r.descendants((function(e,r){i.push(o.Decoration.node(r,r+e.nodeSize,t))})),o.DecorationSet.create(r,i)}}})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(7),i=/\s+/g,a=/text-align/;t.spacesFix=function(){return new n.Plugin({key:new n.PluginKey("spaces-fix"),props:{decorations:function(e){var t,r,n,s,l=[],u=e.doc;return u.nodesBetween(0,u.content.size,(function(e,u,c){if(e.type.isText&&function(e){return a.test(e&&e.attrs&&e.attrs.style||"")}(c))for(r=i.exec(e.text||"");null!==r;){if(t=u+r.index,n=r[0].length,r.index+n<r.input.length)for(s=0;s<=n-1;s+=2)l.push(o.Decoration.inline(t+s,t+s+1,{style:"white-space: normal"}));r=i.exec(e.text||"")}})),o.DecorationSet.create(u,l)}}})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(7);t.textHighlightKey=new n.PluginKey("highlight"),t.textHighlight=function(e){return void 0===e&&(e=t.textHighlightKey),new n.Plugin({key:e,state:{init:function(){return null},apply:function(e){return e.getMeta(this.spec.key)}},props:{decorations:function(e){var t=(this.spec.key.getState(e)||[]).map((function(e){return o.Decoration.inline(e.from,e.to,e.attrs)}));return o.DecorationSet.create(e.doc,t)}}})}},function(e,t){e.exports=u},function(e,t){e.exports=c},function(e,t){e.exports=d}])})); | ||
var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function o(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function s(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function l(e,t){return function(r,n){t(r,n,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))}function d(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function f(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function p(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function m(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function h(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}function y(e){return this instanceof y?(this.v=e,this):new y(e)}function k(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{(r=o[e](t)).value instanceof y?Promise.resolve(r.value.v).then(l,u):c(i[0][2],r)}catch(e){c(i[0][3],e)}var r}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function b(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:y(e[n](t)),done:"return"===n}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=m(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function M(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function x(e){return e&&e.__esModule?e:{default:e}}function w(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function T(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},function(e,r){e.exports=t},function(e,t){e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(0),i=r(11);t.changeStylesString=function(e,t){var r=t.style,n=t.value,o=t.newValue;if(!e)return{changed:!1,style:null};var i=e.split(/\s*;\s*/).filter((function(e){return Boolean(e)})),a=i.filter((function(e){var t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===r&&n.test(t[1]))}));return o&&a.push(r+": "+o),{style:a.join("; ")+(a.length?";":""),changed:Boolean(o)||a.length!==i.length}},t.canInsert=function(e,t){for(var r=e.selection.$from,n=r.depth;n>=0;n--){var o=r.index(n);if(r.node(n).canReplaceWith(o,o,t))return!0}return!1};var a=function(e){return e instanceof n.Node?e.type.name:e.name};t.findNthParentNodeOfType=function(e,t){return void 0===t&&(t=1),function(r){return function(e,t){return void 0===t&&(t=1),function(r){for(var n=r.$from,o=n.depth;o>0;o--){var i=n.node(o);if(e(i)&&0===(t-=1))return{depth:o,node:i}}}}((function(t){return a(t)===a(e)}),t)(r)}},t.insertNode=function(e,t){return function(r,n){var o=r.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),n(o)}},t.hasSameMarkup=function(e,t,r,o){var a=n.Fragment.from(i.parseContent(e,r,o)),s=n.Fragment.from(i.parseContent(t,r,o));return a.eq(s)},t.getSelectionText=function(e){var t=e.selection;if(t instanceof o.TextSelection||t instanceof o.AllSelection){var r=t.content().content;return r.textBetween(0,r.size)}return""},t.getNodeFromSelection=function(e){if(e.selection instanceof o.NodeSelection)return e.selection.node},t.selectedLineTextOnly=function(e){var r="",n=!1,o=e.selection,i=e.doc,a=o.$from,s=o.$to,l=o.from,u=o.to;return a.sameParent(s)&&(i.nodesBetween(l,u,(function(e){n=n||e.isLeaf&&!e.isText})),n||(r=t.getSelectionText(e))),r},t.indentHtml=function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")},t.shallowEqual=function(e,t){var r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every((function(r){return e[r]===t[r]}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),o=r(2);t.markApplies=function(e,t,r){for(var n=function(n){var o=t[n],i=o.$from,a=o.$to,s=0===i.depth&&e.type.allowsMarkType(r);if(e.nodesBetween(i.pos,a.pos,(function(e){if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(r)})),s)return{v:!0}},o=0;o<t.length;o++){var i=n(o);if(i)return i.v}return!1},t.toggleMark=function(e,r,n){return function(o,i){var a=o.selection,s=a.empty,l=a.$cursor,u=a.ranges;if(s&&!l||!t.markApplies(o.doc,u,e))return!1;if(i)if(l)e.isInSet(o.storedMarks||l.marks())?i(n.removeStoredMark(e)):i(n.addStoredMark(e.create(r)));else{for(var c=!1,d=0;!c&&d<u.length;d++){var f=u[d],p=f.$from,m=f.$to;c=o.doc.rangeHasMark(p.pos,m.pos,e)}for(d=0;d<u.length;d++){var v=u[d];p=v.$from,m=v.$to;c?n.removeMark(p.pos,m.pos,e):n.addMark(p.pos,m.pos,e.create(r))}i(n.scrollIntoView())}return!0}},t.removeMark=function(e,t,r,i){void 0===i&&(i=null);var a=[],s=0;return e.doc.nodesBetween(t,r,(function(e,n){if(e.isInline){s++;var l=null;if(i instanceof o.MarkType){var u=i.isInSet(e.marks);u&&(l=[u])}else i?i.isInSet(e.marks)&&(l=[i]):l=e.marks;if(l&&l.length)for(var c=Math.min(n+e.nodeSize,r),d=0;d<l.length;d++){for(var f=l[d],p=void 0,m=0;m<a.length;m++){var v=a[m];v.step===s-1&&f.eq(v.style)&&(p=v)}p?(p.to=c,p.step=s):a.push({style:f,from:Math.max(n,t),to:c,step:s})}}})),a.forEach((function(t){return e.step(new n.RemoveMarkStep(t.from,t.to,t.style))})),e},t.removeMarks=function(e,r,n,o){var i=r.selection,a=i.$cursor,s=i.ranges;if(o=o||r.tr,a)e.forEach((function(e){e.isInSet(r.storedMarks||a.marks())&&n(o.removeStoredMark(e))}));else{for(var l=function(r){var n=s[r],i=n.$from,a=n.$to;e.forEach((function(e){t.removeMark(o,i.pos,a.pos,e)}))},u=0;u<s.length;u++)l(u);n(o.scrollIntoView())}return!0};t.removeAllMarks=function(e){var r=(void 0===e?{}:e).except,n=void 0===r?[]:r;return function(e,r){var o,i=e.tr;t.cleanMarks(i,{except:(o=n,o instanceof Array?o:[o])}),i.docChanged&&r(i)}},t.cleanMarks=function(e,t){var r=t.except,n=e.doc,o=e.selection,i=n.type.schema,a=o.empty,s=o.ranges,l=(r||[]).map((function(e){return e.name}));if(!a){var u=Object.keys(i.marks).map((function(e){return i.marks[e]})).filter((function(e){return-1===l.indexOf(e.name)}));s.forEach((function(t){var r=t.$from,n=t.$to;u.forEach((function(t){return e.removeMark(r.pos,n.pos,t)}))}))}},t.hasMark=function(e,r){var n,o=e.schema.marks,i=(r.altMarks||[]).filter((function(e){return o[e]})),a=r.altStyle,s=e.selection,l=s.from,u=s.$from,c=s.to,d=s.empty,f=o[r.mark],p=e.doc,m=!1;return d?(n=e.storedMarks||u.marks(),m=f&&f.isInSet(n)||i.some((function(e){return o[e].isInSet(n)}))):m=f&&p.rangeHasMark(l,c,f)||i.some((function(e){return p.rangeHasMark(l,c,o[e])})),!m&&a&&o.style?t.selectionMarks(e,o.style).some((function(e){return null!==t.styleValue(e,a)})):Boolean(m)},t.styleValue=function(e,t){for(var r=(e&&e.attrs.style||"").split(/\s*;\s*/).filter((function(e){return Boolean(e)})),n=0;n<r.length;n++){var o=r[n].split(/\s*:\s*/);if(o[0].toLowerCase()===t.name&&t.value.test(o[1]))return o[1]}return null},t.selectionMarks=function(e,t){var r=e.selection,n=r.from,o=r.$from,i=r.to,a=r.empty,s=[];return a?s.push(t.isInSet(e.storedMarks||o.marks())):e.doc.nodesBetween(n,i,(function(e){e.isInline&&s.push(t.isInSet(e.marks))})),s},t.getMark=function(e,r){var n=t.selectionMarks(e,r),o=n.filter((function(e){return Boolean(e)}));return n.length===o.length?n[0]:void 0},t.getActiveMarks=function(e,r){var n=t.selectionMarks(e,r),o=n.filter((function(e){return Boolean(e)}));return{hasNodesWithoutMarks:n.length!==o.length,marks:o}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(4),i=r(3),a=r(2),s=r(0);t.changeTextBlock=function(e,t,r,n){if(!r.isTextblock)return!1;e.selection.ranges.forEach((function(o){var s=e.steps.length,l=o.$from.pos,u=o.$to.pos;e.doc.nodesBetween(l,u,(function(o,l){if(o.eq(t)&&o.isTextblock&&!o.hasMarkup(r,n)&&function(e,t,r){var n=e.resolve(t),o=n.index();return n.parent.canReplaceWith(o,o+1,r)}(e.doc,e.mapping.slice(s).map(l),r)){e.clearIncompatible(e.mapping.slice(s).map(l,1),r);var u=e.mapping.slice(s),c=u.map(l,1),d=u.map(l+o.nodeSize,1),f=new a.Slice(a.Fragment.from(r.create(n,null,o.marks)),0,0);return e.step(new i.ReplaceAroundStep(c,d,c+1,d-1,f,1,!0)),!1}}))}))},t.blockNodes=function(e,t){void 0===t&&(t={blocksInSelection:!1});var r=e.doc,n=e.selection,o=n.$from,i=n.ranges,a=t.blocksInSelection,l=[],u=n instanceof s.NodeSelection?n.node:void 0;return u?u.isBlock?(l.push(u),u.nodesBetween(0,u.content.size,(function(e){e.isBlock&&l.push(e)}))):!a&&o.parent&&o.parent.isBlock&&l.push(o.parent):i.forEach((function(e){var t=e.$from.pos,n=e.$to.pos;r.nodesBetween(t,n,(function(e,r,o,i){e.isBlock&&(!a||r>=t&&r+e.content.size+2<=n)&&l.push(e)}))})),l},t.formatBlockElements=function(e,r){return function(o,i){var a=t.blockNodes(o),s=o.schema.nodes,l=o.tr;l.setMeta("commandName",r),l.setMeta("args",{value:e}),a.forEach((function(r){if(r.type.isTextblock)if("p"===e){var o=r.attrs,i=o.level,a=n.__rest(o,["level"]);t.changeTextBlock(l,r,s.paragraph,a)}else if(/^h[1-6]$/i.test(e)){i=parseInt(e.substr(1),10);t.changeTextBlock(l,r,s.heading,n.__assign({},r.attrs,{level:i}))}else if("blockquote"===e){var u=r.attrs;i=u.level,a=n.__rest(u,["level"]);t.changeTextBlock(l,r,s.blockquote,a)}}));var u=l.docChanged;return u&&i(l.scrollIntoView()),u}},t.cleanTextBlockFormatting=function(e,r){void 0===r&&(r={blocksInSelection:!0});var o=e.doc,i=e.selection,a=r.blocksInSelection,s=r.blockNodeType;t.blockNodes({doc:o,selection:i},{blocksInSelection:a}).filter((function(e){return e.isTextblock})).forEach((function(r){var o=r.attrs||{},i=o.style,a=void 0===i?"":i,l=o.class,u=void 0===l?"":l,c=n.__rest(o,["style","class"]),d=s||r.type;(a||u||d!==r.type)&&t.changeTextBlock(e,r,d,c)}))},t.getBlockFormats=function(e){var r=t.blockNodes(e),n=e.schema.nodes,o=[];return r.forEach((function(e){e.type===n.paragraph?o.push("p"):e.type===n.heading?o.push("h"+e.attrs.level):e.type===n.blockquote&&o.push("blockquote")})),o},t.addStyles=function(e,t){var r,n,i=e.attrs.style;i&&t.forEach((function(e){n={style:e.name,value:/^.+$/,newValue:e.value},r=o.changeStylesString(i,n),i=r.changed?r.style:i}));return i=i||t.reduce((function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""}),""),Object.assign({},e.attrs,{style:i||null})},t.hasNode=function(e,t){var r=e.selection,n=r.from,o=r.to,i=!1;return e.doc.nodesBetween(n,o,(function(e){return!(i=i||e.type===t)})),i},t.parentBlockFormat=function(e){var r=t.getBlockFormats(e);return 1===new Set(r).size?r[0]:null},t.activeNode=function(e){return{tag:t.parentBlockFormat(e)||""}}},function(e,t){e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(3),i=r(4),a=r(5),s=function(e,t){var r=e.find((function(e){return"style"===e.type.name})),n=r&&r.attrs.style;return i.changeStylesString(n,t)},l=function(e,t,r,i,a){var l=a.create({style:i.style}),u=[],c=[],d=null,f=null;return e.doc.nodesBetween(t,r,(function(e,p,m){if(e.isInline){var v=e.marks;if(!l.isInSet(v)&&m.type.allowsMarkType(l.type)){var g=Math.max(p,t),h=Math.min(p+e.nodeSize,r),y=s(v,i);if(y.changed||i.newValue){for(var k=y.changed?{style:y.style||null}:{style:[i.style]+": "+i.newValue+";"},b=a.isInSet(v)?v.find((function(e){return"style"===e.type.name})):null,_=b?n.__assign({},b.attrs,k):k,M=a.create(_),S=M.addToSet(v),x=0;x<v.length;x++)v[x].isInSet(S)||(d&&d.to===g&&d.mark.eq(v[x])?d.to=h:(d=new o.RemoveMarkStep(g,h,v[x]),u.push(d)));var w=f&&f.to===g,T=w&&M.attrs.style===f.mark.attrs.style;w&&T?f.to=h:Object.keys(_).some((function(e){return null!==_[e]}))&&(f=new o.AddMarkStep(g,h,M),c.push(f))}}}})),u.forEach((function(t){return e.step(t)})),c.forEach((function(t){return e.step(t)})),u.length+c.length>0};t.getInlineStyles=function(e,t){var r=e.schema.marks.style;return(r?a.selectionMarks(e,r):[]).map((function(e){return a.styleValue(e,t)})).filter((function(e){return null!==e}))};var u=function(e,t){return function(r,o,u){var c=r.selection,d=c.empty,f=c.$cursor,p=c.ranges;if(d&&!f||!a.markApplies(r.doc,p,e))return!1;var m=!1;if(o)if(u=u||r.tr,f){var v=r.storedMarks||f.marks();if(e.isInSet(v)){var g=s(v,t),h=v.find((function(e){return"style"===e.type.name})),y=n.__assign({},h?h.attrs:{},{style:g.style||null});if(i.shallowEqual(h.attrs,y))return!1;o(u.removeStoredMark(e)),Object.keys(y).some((function(e){return null!==y[e]}))&&o(u.addStoredMark(e.create(y))),m=!0}}else{for(var k=0;k<p.length;k++){var b=p[k],_=b.$from,M=b.$to;m=l(u,_.pos,M.pos,t,e)}m&&(u.scrollIntoView(),o(u))}return m}};t.toggleInlineFormat=function(e,t,r){return function(n,o){var i=n.schema.marks,s=e.altStyle,l=e.altMarks,c=void 0===l?[]:l,d=e.mark;t=t||n.tr;var f=!1,p=!1,m=function(){return p=!0};s&&i.style&&(f=u(i.style,{style:s.name,value:s.value})(n,m,t));var v=[d].concat(c).filter((function(e){return i[e]})).map((function(e){return a.hasMark(n,{mark:e})&&i[e]})).filter((function(e){return e}));return v.length?a.removeMarks(v,n,m,t):f||a.toggleMark(i[d],r,t)(n,m),p&&o(t),p}},t.applyInlineStyle=function(e,t){return function(r,o){var s=r.schema.marks.style,l={style:e.style,value:/^.+$/,newValue:e.value},c=r.tr;t&&c.setMeta("commandName",t),c.setMeta("args",e);var d=r.selection,f=d.empty,p=d.$cursor,m=d.ranges;if(f&&!p||!s||!a.markApplies(r.doc,m,s))return!1;if(p){var v=r.storedMarks||p.marks(),g=s.isInSet(v)?v.find((function(e){return"style"===e.type.name})):null,h={style:null};if(g&&g.attrs.style){var y=i.changeStylesString(g.attrs.style,l);y.changed&&y.style&&(h.style=y.style)}else l.newValue&&(h.style=[l.style]+": "+l.newValue+";");var k=g?n.__assign({},g.attrs,h):h;return Object.keys(k).some((function(e){return null!==k[e]}))?o(c.addStoredMark(s.create(k))):o(c.removeStoredMark(s)),!0}return u(s,l)(r,o,c)}}},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(0);t.parseContent=function(e,t,r){var o,i=document.createElement("template");"content"in i?(i.innerHTML=e,o=i.content):o=(new DOMParser).parseFromString(e,"text/html").body||document.createDocumentFragment();return n.DOMParser.fromSchema(t).parse(o,r)},t.getHtml=function(e){var t=n.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),r=document.createElement("div");return r.appendChild(t),r.innerHTML},t.setHtml=function(e,r,n){return void 0===r&&(r="setHTML"),void 0===n&&(n={preserveWhitespace:"full"}),function(i,a){return a(i.tr.setSelection(new o.AllSelection(i.doc)).replaceSelectionWith(t.parseContent(e,i.schema,n)).setMeta("commandName",r))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(13);t.indentRules={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"}],listsTypes:n.__assign({},o.listsTypes)},t.outdentRules={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"}],listsTypes:n.__assign({},o.listsTypes)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1);t.listsTypes={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},t.orderedList={listType:t.listsTypes.orderedList,types:n.__assign({},t.listsTypes)},t.bulletList={listType:t.listsTypes.bulletList,types:n.__assign({},t.listsTypes)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(2),i=r(0),a=r(3),s=r(10),l=r(9),u=r(13),c=function(e,t,r){for(var n=t.depth,o=e.nodes[r.bulletList],i=e.nodes[r.orderedList],a=e.nodes[r.listItem],s=t.depth;s>0;s--){var l=t.node(s);if(l.type!==o&&l.type!==i||(n=s),l.type!==o&&l.type!==i&&l.type!==a)break}return n-1};function d(e){return function(t,r,n){if(!n)return!1;var o,i=(t=n.state).schema.nodes[e.listType],a=t.selection,u=a.$from,c=a.$to,d=u.node(-2),f=u.node(-3),m=function(e,t,r,n){return 0===function(e,t,r){var n=Array(),o=function(e,t){var r=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;var n=t.node(t.depth),o=t;for(;t.depth>=1;)t=e.resolve(t.before(t.depth)),(n=t.node(t.depth))&&-1!==r.indexOf(n.type.name)&&(o=t);return o}(e,t).depth,i=e.resolve(t.start(o));for(;i.pos<=r.start(r.depth);){var a=Math.min(i.depth,o),s=i.node(a);if(s&&n.push(s),0===a)break;var l=e.resolve(i.after(a));if(l.start(a)>=e.nodeSize-2)break;l.depth!==i.depth&&(l=e.resolve(l.pos+2)),i=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return n}(e,t,r).filter((function(e){return e.type!==n})).length}(t.doc,u,c,i);return(d&&d.type===i||f&&f.type===i)&&m?p(e)(t,r):(m||(p(e)(t,r),t=n.state),(o=i,s.autoJoin(l.wrapInList(o),(function(e,t){return e.type===t.type&&e.type===o})))(t,r))}}function f(e,t,r,n){n||(n=e.schema.nodes.listItem);var i=t.$from,s=t.$to,l=i.blockRange(s,(function(e){return e.childCount&&e.firstChild.type===n}));if(!l||l.depth<2||i.node(l.depth-1).type!==n)return r;var u=l.end,c=s.end(l.depth);return u<c&&(r.step(new a.ReplaceAroundStep(u-1,c,u,c,new o.Slice(o.Fragment.from(n.create(void 0,l.parent.copy())),1,0),1,!0)),l=new o.NodeRange(r.doc.resolve(i.pos),r.doc.resolve(c),l.depth)),r.lift(l,a.liftTarget(l)).scrollIntoView()}function p(e){return function(t,r){var n=t.tr,o=t.selection,s=o.$from,l=o.$to;return n.doc.nodesBetween(s.pos,l.pos,(function(r,o){if(r.isTextblock||"blockquote"===r.type.name||"div"===r.type.name){var s=new i.NodeSelection(n.doc.resolve(n.mapping.map(o))),l=s.$from.blockRange(s.$to);if(!l||s.$from.parent.type!==t.schema.nodes[e.listItem])return!1;var u=l&&a.liftTarget(l);if(null==u)return!1;n.lift(l,u)}})),r&&r(n),!0}}t.toggleList=function(e,t,r,n,o){var a=n.listType,s=e.selection,l=s.$from.node(s.$from.depth-2),u=s.$to.node(s.$to.depth-2);if(l&&l.type.name===a&&u&&u.type.name===a){var p=r.state.schema.nodes,m={bulletList:p[n.bulletList],orderedList:p[n.orderedList],listItem:p[n.listItem]},v=function(e,t){for(var r,n=t.bulletList,o=t.orderedList,i=t.listItem,a=e.depth-1;a>0;a--){var s=e.node(a);if(s.type!==n&&s.type!==o||(r=a),s.type!==n&&s.type!==o&&s.type!==i)break}return r}(s.$to,m),g=function(e,t,r,n,o,a){a||(a=e.schema.nodes.listItem);var s=!1;return o.doc.nodesBetween(t,r,(function(r,l){if(!s&&r.type===a&&l>t){s=!0;for(var u=n+3;u>n+2;){var c=o.doc.resolve(o.mapping.map(l));u=c.depth;var d=o.doc.resolve(o.mapping.map(l+r.textContent.length)),p=new i.TextSelection(c,d);o=f(e,p,o,a)}}})),o}(e,s.$to.pos,s.$to.end(v),v,r.state.tr,m.listItem);return(g=function(e,t,r){var n=e.selection,o=n.from,i=n.to,a=e.schema.nodes,s=a.paragraph,l=a.heading,u=[];t.doc.nodesBetween(o,i,(function(e,t){e.type!==s&&e.type!==l||u.push({node:e,pos:t})}));for(var d=u.length-1;d>=0;d--){var f=u[d],p=t.doc.resolve(t.mapping.map(f.pos));if(p.depth>0){var m=void 0;m=f.node.textContent&&f.node.textContent.length>0?t.doc.resolve(t.mapping.map(f.pos+f.node.textContent.length)):t.doc.resolve(t.mapping.map(f.pos+1));var v=p.blockRange(m);v&&t.lift(v,c(e.schema,p,r))}}return t}(e,g,n)).setMeta("commandName",o),t(g),!0}return d(n)(e,t,r)},t.toggleUnorderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.bulletList.listType},u.bulletList.types))},t.toggleOrderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.orderedList.listType},u.orderedList.types))},t.splitListItemKeepMarks=function(e){return function(t,r){return l.splitListItem(e)(t,(function(e){var n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();n&&e.ensureMarks(n),r(e)}))}}},function(e,t){e.exports=a},function(e,t){e.exports=s},function(e,t){e.exports=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bold={mark:"strong",altMarks:["b"],altStyle:{name:"font-weight",value:/^(bold(er)?|[5-9]\d{2,})$/}},t.italic={mark:"em",altMarks:["i"],altStyle:{name:"font-style",value:/^italic$/i}},t.underline={mark:"u",altStyle:{name:"text-decoration",value:/^underline$/i}},t.strikethrough={mark:"del",altStyle:{name:"text-decoration",value:/^line-through$/i}},t.subscript={mark:"sub"},t.superscript={mark:"sup"},t.link={mark:"link"},t.unlink={mark:"link"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,o=function(e){return/^MsoListParagraph/.test(e.className)},i=function(e){var t=e.innerHTML;return t=(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},a=function(e,t){var r=document.createElement(e);return r.style.listStyleType=t,r},s=function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},l=function(e,t){var r=[];Array.from(e).forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var n=e;n.getAttribute("datalist")?(r.push(e),t.add(r)):o(n)&&r.length?r.push(e):(r=[],"DIV"===n.nodeName?l(n.children,t):"TABLE"===n.nodeName&&Array.from(n.querySelectorAll("td,th")).forEach((function(e){l(e.children,t)})))}}))},u=function(e){var t,r=e.innerHTML,n=function(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")};return r=r.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(r)?{tag:"ul",style:(t=n(i(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(t)?null:/^o/.test(t)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(r)?{tag:"ol",style:s(n(i(e)))}:void 0},c=function(e){var t,r=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),1===e.childNodes.length?t=e.firstChild.nodeType===Node.TEXT_NODE?i(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),t="p"!==r?"<"+r+">"+e.innerHTML+"</"+r+">":e.innerHTML),e.parentNode.removeChild(e);var n=document.createElement("li");return n.innerHTML=t,n};t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=function(e){return e=e.replace(n,(function(e,t,r){return'datalist="'+t+'" datalevel="'+r+'" '+e}))}(e);var r=new Set;return l(t.children,r),r.forEach((function(e){return function(e){var t,r,n,i,s,l,d,f,p,m,v,g,h,y=-1,k={};for(f=0;f<e.length;f++){var b=(h={datalist:(p=e[f]).getAttribute("datalist"),datalevel:p.getAttribute("datalevel")}).datalist,_=u(p);if(m=_&&_.tag){if(v=h.datalevel||parseFloat(p.style.marginLeft||0),h.datalevel||p.style.marginLeft){var M=m+b;k[v]||(k[v]={}),(!r||r<0)&&(r=v,n=b,i=(d=e.filter((function(e){return e.getAttribute("datalist")===String(n)})))[d.length-1],l=a(m,_&&_.style),p.parentNode.insertBefore(l,p),y=v,k[v][M]=l),s=i===p,g=k[v][M],(v>y||!g)&&(g=a(m,_&&_.style),k[v][M]=g,t.appendChild(g)),t=c(p),g.appendChild(t),s?r=y=-1:y=v}}else!t||s&&!o(p)||(p.style.marginLeft&&(p.style.marginLeft=""),p.style.marginLeft&&(p.style.margin=""),t.appendChild(p))}}(e)})),t.innerHTML}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(11);t.getHtml=o.getHtml,t.setHtml=o.setHtml,t.parseContent=o.parseContent;var i=r(8);t.applyInlineStyle=i.applyInlineStyle,t.getInlineStyles=i.getInlineStyles,t.toggleInlineFormat=i.toggleInlineFormat;var a=r(21);t.applyLink=a.applyLink,t.removeLink=a.removeLink;var s=r(22);t.insertText=s.insertText;var l=r(23);t.insertImage=l.insertImage;var u=r(24);t.alignBlocks=u.alignBlocks,t.isAligned=u.isAligned;var c=r(25);t.cleanFormatting=c.cleanFormatting;var d=r(6);t.hasNode=d.hasNode,t.activeNode=d.activeNode,t.formatBlockElements=d.formatBlockElements,t.getBlockFormats=d.getBlockFormats,t.parentBlockFormat=d.parentBlockFormat,t.changeTextBlock=d.changeTextBlock,t.blockNodes=d.blockNodes,t.cleanTextBlockFormatting=d.cleanTextBlockFormatting;var f=r(5);t.hasMark=f.hasMark,t.getMark=f.getMark,t.getActiveMarks=f.getActiveMarks,t.removeAllMarks=f.removeAllMarks,t.cleanMarks=f.cleanMarks,t.selectionMarks=f.selectionMarks;var p=r(26);t.indent=p.indent,t.canIndentAsListItem=p.canIndentAsListItem,t.outdent=p.outdent,t.canOutdentAsListItem=p.canOutdentAsListItem,t.isIndented=p.isIndented,t.canBeIndented=p.canBeIndented,t.indentBlocks=p.indentBlocks;var m=r(14);t.toggleOrderedList=m.toggleOrderedList,t.toggleUnorderedList=m.toggleUnorderedList,t.toggleList=m.toggleList;var v=r(4);t.hasSameMarkup=v.hasSameMarkup,t.getSelectionText=v.getSelectionText,t.getNodeFromSelection=v.getNodeFromSelection,t.selectedLineTextOnly=v.selectedLineTextOnly,t.canInsert=v.canInsert,t.insertNode=v.insertNode,t.indentHtml=v.indentHtml;var g=r(27);t.alignLeftRules=g.alignLeftRules,t.alignCenterRules=g.alignCenterRules,t.alignRightRules=g.alignRightRules,t.alignJustifyRules=g.alignJustifyRules,t.alignRemoveRules=g.alignRemoveRules;var h=r(12);t.indentRules=h.indentRules,t.outdentRules=h.outdentRules;var y=r(28);t.nodes=y.nodes,t.marks=y.marks;var k=r(29);t.buildKeymap=k.buildKeymap,t.buildListKeymap=k.buildListKeymap;var b=r(18);t.bold=b.bold,t.italic=b.italic,t.underline=b.underline,t.strikethrough=b.strikethrough,t.subscript=b.subscript,t.superscript=b.superscript,t.link=b.link;var _=r(30);t.sanitize=_.sanitize,t.removeComments=_.removeComments,t.removeTag=_.removeTag,t.pasteCleanup=_.pasteCleanup,t.sanitizeClassAttr=_.sanitizeClassAttr,t.sanitizeStyleAttr=_.sanitizeStyleAttr,t.removeAttribute=_.removeAttribute;var M=r(19);t.convertMsLists=M.convertMsLists;var S=r(31);t.createTable=S.createTable;var x=r(32);t.find=x.find,t.findAt=x.findAt,t.findAll=x.findAll,t.replace=x.replace,t.replaceAll=x.replaceAll;var w=r(33);t.placeholder=w.placeholder;var T=r(34);t.spacesFix=T.spacesFix;var O=r(35);t.textHighlight=O.textHighlight,t.textHighlightKey=O.textHighlightKey,n.__exportStar(r(10),t),n.__exportStar(r(36),t),n.__exportStar(r(37),t),n.__exportStar(r(16),t),n.__exportStar(r(17),t),n.__exportStar(r(38),t),n.__exportStar(r(2),t),n.__exportStar(r(9),t),n.__exportStar(r(0),t),n.__exportStar(r(15),t),n.__exportStar(r(3),t),n.__exportStar(r(7),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8),o=r(5),i=r(0);t.removeLink=function(e,t){return function(r,i){var a=r.selection.$cursor;if(a){var s=a.parent,l=a.index(),u=r.schema.marks[e.mark],c=s.child(l).marks.find((function(e){return e.type===u})),d=s.childCount,f=a.pos-a.textOffset,p=s.child(l).nodeSize,m=void 0,v=void 0;for(m=l-1;m>=0&&c.isInSet(s.child(m).marks);)p+=v=s.child(m).nodeSize,f-=v,m-=1;for(m=l+1;m<d&&c.isInSet(s.child(m).marks);)p+=s.child(m).nodeSize,m+=1;i(o.removeMark(t||r.tr,f,f+p,c))}else n.toggleInlineFormat(e,t)(r,i)}};t.applyLink=function(e,r){var a=e.mark,s=e.attrs;return void 0===r&&(r="link"),function(e,l){var u=e.schema.marks,c=e.tr;r&&(c.setMeta("commandName",r),c.setMeta("args",s));var d=!1,f=function(){return d=!0};if(function(e,t){var r=o.selectionMarks(e,t);return 1===r.length&&r[0]?r[0]:null}(e,u[a]))!function(e,t){return function(r,n){var o=r.selection,i=o.$cursor,a=o.from,s=o.to,l=r.schema.marks[e.mark];if(i){var u=i.parent,c=i.index(),d=u.child(c).marks.find((function(e){return e.type===l})),f=u.childCount,p=i.pos-i.textOffset,m=u.child(c).nodeSize,v=void 0,g=void 0;for(v=c-1;v>=0&&d.isInSet(u.child(v).marks);)m+=g=u.child(v).nodeSize,p-=g,v-=1;for(v=c+1;v<f&&d.isInSet(u.child(v).marks);)m+=u.child(v).nodeSize,v+=1;t.removeMark(p,p+m,l),t.addMark(p,p+m,l.create(e.attrs)),n(t)}else t.doc.nodesBetween(a,s,(function(r,o){r.isInline&&l.isInSet(r.marks)&&(t.removeMark(o,o+r.nodeSize,l),t.addMark(o,o+r.nodeSize,l.create(e.attrs)),n(t))}))}}({mark:a,attrs:s},c)(e,f);else{var p=e;o.hasMark(e,{mark:a})&&(t.removeLink({mark:a,attrs:s},c)(e,f),p=i.EditorState.create({doc:c.doc,selection:c.selection})),d?o.toggleMark(u[a],s,c)(p,f):n.toggleInlineFormat({mark:a},c,s)(p,f)}return d&&l(c),d}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(e){return function(t,r){r(t.tr.insertText(e.text,e.from,e.to))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4);t.insertImage=function(e){return function(t,r){var o=t.schema.nodes.image,i=o.createAndFill(e);n.insertNode(i)(t,(function(t){return r(t.setMeta("commandName","insertImage").setMeta("args",e))}))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6);t.alignBlocks=function(e,t){return function(r,o){var i=n.blockNodes(r),a=r.tr;a.setMeta("commandName",t),i.forEach((function(t){if(t.type.isTextblock){var r={},o=e.find((function(e){return e.node===t.type.name}));o&&(r=n.addStyles(t,o.style)),n.changeTextBlock(a,t,t.type,r)}}));var s=a.docChanged;return s&&o(a.scrollIntoView()),s}},t.isAligned=function(e,t){var r=n.blockNodes(e),o=!1;return r.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var r=t.find((function(t){return t.node===e.type.name}));r&&(o=r.style.every((function(t){return!!t.value&&new RegExp(t.name+":\\s?"+t.value,"i").test(e.attrs.style)})))}})),o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6),o=r(5);t.cleanFormatting=function(e){return void 0===e&&(e={blocksInSelection:!0}),function(t,r){var i=t.tr,a=e.blocksInSelection,s=e.blockNodeType,l=(e.exceptMarks||[t.schema.marks.link]).filter(Boolean);o.cleanMarks(i,{except:l}),n.cleanTextBlockFormatting(i,{blocksInSelection:a,blockNodeType:s});var u=i.docChanged;return u&&r&&r(i),u}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9),o=r(12),i=r(6),a=r(4);t.indentBlocks=function(e,t,r){return function(n,o){var a=i.blockNodes(n),s=n.tr;s.setMeta("commandName",t),a.forEach((function(t){if(t.type.isTextblock){var n=void 0,o=e.find((function(e){return e.node===t.type.name}));if(o){var a="rtl"===r?o.rtlStyle:o.style,l={name:a,value:o.step>0?""+o.step+o.unit:""};if(t.attrs.style){var u=new RegExp(a+":\\s?(\\d+)"+o.unit,"i"),c=t.attrs.style.match(u);if(c){var d=parseFloat(c[1])+o.step;d=d<=0?"":d,l.value=""+d+(d?o.unit:"")}}n=i.addStyles(t,[l])}n&&i.changeTextBlock(s,t,t.type,n)}}));var l=s.docChanged;return l&&o(s.scrollIntoView()),l}},t.isIndented=function(e,t,r){var n=i.blockNodes(e),o=!1;return n.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var n=t.find((function(t){return t.node===e.type.name}));if(n){var i="rtl"===r?n.rtlStyle:n.style,a=new RegExp(i+":\\s?\\d+"+n.unit,"i");o=a.test(e.attrs.style)}}})),o},t.canIndentAsListItem=function(e,t){return n.sinkListItem(t)(e)},t.canOutdentAsListItem=function(e,t){var r=e.schema.nodes[t.listsTypes.listItem],o=e.schema.nodes[t.listsTypes.orderedList],i=e.schema.nodes[t.listsTypes.bulletList],s=!!a.findNthParentNodeOfType(o,2)(e.selection),l=!!a.findNthParentNodeOfType(i,2)(e.selection);return(s||l)&&n.liftListItem(r)(e)},t.canBeIndented=function(e,r){var n=e.schema.nodes,a=n[o.indentRules.listsTypes.listItem];return(t.isIndented(e,r.nodes)||o.indentRules.nodes.some((function(t){return n[t.node]&&i.hasNode(e,n[t.node])})))&&!i.hasNode(e,a)},t.indent=function(e,r){var i=e.schema.nodes[o.indentRules.listsTypes.listItem],a=t.canBeIndented(e,o.indentRules);t.canIndentAsListItem(e,i)?n.sinkListItem(i)(e,r):a&&t.indentBlocks(o.indentRules.nodes)(e,r)},t.outdent=function(e,r){var i=e.schema.nodes[o.outdentRules.listsTypes.listItem],a=t.canBeIndented(e,o.outdentRules);t.canOutdentAsListItem(e,o.outdentRules)?n.liftListItem(i)(e,r):a&&t.indentBlocks(o.outdentRules.nodes)(e,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){return{name:e,value:t}};t.alignLeftRules=[{node:"paragraph",style:[n("text-align","left")]},{node:"heading",style:[n("text-align","left")]}],t.alignRightRules=[{node:"paragraph",style:[n("text-align","right")]},{node:"heading",style:[n("text-align","right")]}],t.alignCenterRules=[{node:"paragraph",style:[n("text-align","center")]},{node:"heading",style:[n("text-align","center")]}],t.alignJustifyRules=[{node:"paragraph",style:[n("text-align","justify")]},{node:"heading",style:[n("text-align","justify")]}],t.alignRemoveRules=[{node:"paragraph",style:[n("text-align","")]},{node:"heading",style:[n("text-align","")]}]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(15),i=["blockquote",0],a=["hr"],s=["pre",["code",0]],l=["ol",0],u=["ul",0],c=["li",0],d=function(e){for(var t,r={},n=e.attributes,o=0;o<n.length;o++)r[(t=n[o]).name]=t.value;return r},f=function(e,t){for(var r in e)if(r&&null!==e[r]&&r!==t)return!0;return!1},p=function(e,t){var r={};for(var n in e)n&&null!==e[n]&&n!==t&&(r[n]=e[n]);return r},m=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},v=n.__assign({link:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:d}],toDOM:function(e){return["a",p(e.attrs),0]}}},m("strong"),m("b"),m("em"),m("i"),m("u"),m("del"),m("sub"),m("sup"),m("code"),{style:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["span",p(e.attrs),0]:["span",0]}}});t.marks=v;var g=n.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["p",p(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["div",p(e.attrs),0]:["div",0]}},blockquote:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return i}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return a}},heading:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return n.__assign({},d(e),{level:1})}},{tag:"h2",getAttrs:function(e){return n.__assign({},d(e),{level:2})}},{tag:"h3",getAttrs:function(e){return n.__assign({},d(e),{level:3})}},{tag:"h4",getAttrs:function(e){return n.__assign({},d(e),{level:4})}},{tag:"h5",getAttrs:function(e){return n.__assign({},d(e),{level:5})}},{tag:"h6",getAttrs:function(e){return n.__assign({},d(e),{level:6})}}],toDOM:function(e){return f(e.attrs,"level")?["h"+e.attrs.level,p(e.attrs,"level"),0]:["h"+e.attrs.level,0]}},code_block:{content:"text*",marks:"",group:"block",code:!0,defining:!0,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return s}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:n.__assign({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["img",p(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["br",p(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return n.__assign({},d(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?f(e.attrs,"order")?["ol",p(e.attrs,"order"),0]:l:["ol",n.__assign({},p(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["ul",p(e.attrs),0]:u}},list_item:{content:"(paragraph | heading) block*",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["li",p(e.attrs),0]:c},defining:!0}},o.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(10),o=r(16),i=r(17),a=r(14),s=r(18),l=r(8),u="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var t={};if(t["Mod-z"]=o.undo,t["Shift-Mod-z"]=o.redo,t.Backspace=n.chainCommands(i.undoInputRule,n.deleteSelection,n.joinBackward,n.selectNodeBackward),t.Enter=n.chainCommands(n.newlineInCode,n.createParagraphNear,n.liftEmptyBlock,n.splitBlockKeepMarks),u||(t["Mod-y"]=o.redo),e.marks.strong&&(t["Mod-b"]=l.toggleInlineFormat(s.bold)),e.marks.em&&(t["Mod-i"]=l.toggleInlineFormat(s.italic)),e.marks.underline&&(t["Mod-u"]=l.toggleInlineFormat(s.underline)),e.nodes.hard_break){var r=e.nodes.hard_break,a=n.chainCommands(n.exitCode,(function(e,t){return t(e.tr.replaceSelectionWith(r.create()).scrollIntoView()),!0}));t["Shift-Enter"]=a}return t},t.buildListKeymap=function(e){var t={};return e.nodes.list_item&&(t.Enter=a.splitListItemKeepMarks(e.nodes.list_item)),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(19);t.sanitize=function(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/^[\s\S]+?<!--StartFragment-->\s*([\s\S]*?)\s*<!--EndFragment-->[\s\S]+$/,"$1")).replace(/<\/?[ovw]:[^>]*?>/gi,"")).replace(/<\\?\??xml[^>]*>/gi,"")).replace(/<(?:link|meta) [^>]+?>/gi,"")).replace(/<style[^>]*?>\s*<\/style>/gi,"")).replace(/<\/?st1:.*?>/gi,"")).replace(/<a name="[a-zA-Z0-9_]+">/gim,"")).replace(/v:shapes?="[^"]+"/gi,"")).replace(/<!\[if !supportLists\]>/gi,"")).replace(/<!\[endif\]>/gi,"")},t.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},t.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},t.removeAttribute=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},t.sanitizeClassAttr=function(e){/^Mso/.test(e.value)&&t.removeAttribute(e)};var o=/\s*;\s*/,i=/\s*:\s*/;t.sanitizeStyleAttr=function(e){var r,n,a=e.value.split(o).filter((function(e){return Boolean(e)})),s=e.ownerElement.style,l="";a.forEach((function(e){var t;t=e.split(i),r=t[0],n=t[1],void 0!==s[r]&&(l+=r+": "+n+"; ")})),(l=l.trim())?e.value=l:t.removeAttribute(e)};t.pasteCleanup=function(e,r){var o=e;if(r.convertMsLists&&(o=n.convertMsLists(o)),r.stripTags&&(o=t.removeTag(o,r.stripTags)),r.attributes){var i=document.createElement("div");i.innerHTML=o,Array.from(i.querySelectorAll("*")).forEach((function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var r=e.attributes.length-1;r>=0;r--){var n=e.attributes[r];t[n.name]?t[n.name](n):t["*"]&&t["*"](n)}"SPAN"===e.nodeName&&0===e.attributes.length&&function(e){var t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}(e)}}(e,r.attributes)})),o=i.innerHTML}return o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=function(e,t,r){for(var n,o=e.table,i=e.table_row,a=e.table_cell,s=[],l=0;l<t+1;l++){n=[];for(var u=0;u<r+1;u++)n.push(a.createAndFill());s.push(i.createAndFill(void 0,n))}return o.createAndFill(void 0,s)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(0);t.findAt=function(e,t,r,n,i){var l,u,c,d,f,p,m=[],v=[],g=t.matchCase,h=t.matchWord,y=t.useRegExp,k=t.text;if(y&&(/^\\$/.test(k)||/[^\\]\\$/.test(k))&&(k=k.substring(0,k.length-1)),!k)return m;var b=g?"g":"gi",_=y?new RegExp(k,b):s(k,b);return e.nodesBetween(r,n,(function(t,s,g){if(i(m))return!1;t.inlineContent&&s+t.content.size>=r&&(v.length=0,t.nodesBetween(0,t.content.size,(function(t,g,y,k){if(i(m))return!1;var b=1+s+g;if(t.isText&&b+t.nodeSize>=r){if(f=t.text||"",p=y.childCount-1>=k+1&&y.child(k+1),v.push(r<=b?{text:f,start:b}:{text:f.slice(r-b),start:r}),p&&p.isText)return;for(u=v.map((function(e){return e.text})).join(""),l=_.exec(u);null!==l&&(c=v[0].start+l.index,d=c+l[0].length,r<=c&&n>=d&&a(l,h)&&m.push(o.TextSelection.create(e,c,d)),!i(m));)l=_.exec(u)}else v.length=0})))})),m},t.find=function(e,r){var o=r.backward,i=r.matchCyclic,a=n.__rest(r,["backward","matchCyclic"]),s=o?function(){return!1}:function(e){return e.length>0},l=e.doc,u=e.selection,c=[];return o?!(c=t.findAt(l,a,0,u.from,s)).length&&i&&(c=t.findAt(l,a,u.from,l.content.size,s)):!(c=t.findAt(l,a,u.to,l.content.size,s)).length&&i&&(c=t.findAt(l,a,0,u.to,s)),c.length?c[c.length-1]:null},t.findAll=function(e,r){return t.findAt(e,r,0,e.content.size,(function(){return!1}))},t.replace=function(e,t,r){var n=e.from,i=e.to;return r.insertText(t,n,i).setSelection(o.TextSelection.create(r.doc,n,n+t.length)),r},t.replaceAll=function(e,r,n){var o=t.findAll(e.doc,n);if(0===o.length)return null;for(var i=e.tr,a=o.length-1;a>=0;a--)i.insertText(r,o[a].from,o[a].to);return i};var i=/^[\s0-9~`!@#$%\^&*\(\)_\-=+\\|\[\]{};:'"\?/.,<>]?$/,a=function(e,t){if(t){if(!0===t){var r=e.input,n=r.charAt(e.index-1),o=r.charAt(e.index+e[0].length);return i.test(n)&&i.test(o)}return t(e)}return!0},s=function(e,t){var r=e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/\s/g,"\\s");return new RegExp(r,t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(7);t.placeholder=function(e){var t={class:"k-placeholder","data-placeholder":e};return new n.Plugin({key:new n.PluginKey("placeholder"),props:{decorations:function(e){var r=e.doc,n=r.content.firstChild;if(!(0===r.childCount||1===r.childCount&&n.inlineContent&&0===n.childCount))return o.DecorationSet.empty;var i=[];return r.descendants((function(e,r){i.push(o.Decoration.node(r,r+e.nodeSize,t))})),o.DecorationSet.create(r,i)}}})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(7),i=/\s+/g,a=/text-align/;t.spacesFix=function(){return new n.Plugin({key:new n.PluginKey("spaces-fix"),props:{decorations:function(e){var t,r,n,s,l=[],u=e.doc;return u.nodesBetween(0,u.content.size,(function(e,u,c){if(e.type.isText&&function(e){return a.test(e&&e.attrs&&e.attrs.style||"")}(c))for(r=i.exec(e.text||"");null!==r;){if(t=u+r.index,n=r[0].length,r.index+n<r.input.length)for(s=0;s<=n-1;s+=2)l.push(o.Decoration.inline(t+s,t+s+1,{style:"white-space: normal"}));r=i.exec(e.text||"")}})),o.DecorationSet.create(u,l)}}})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(7);t.textHighlightKey=new n.PluginKey("highlight"),t.textHighlight=function(e){return void 0===e&&(e=t.textHighlightKey),new n.Plugin({key:e,state:{init:function(){return null},apply:function(e){return e.getMeta(this.spec.key)}},props:{decorations:function(e){var t=(this.spec.key.getState(e)||[]).map((function(e){return o.Decoration.inline(e.from,e.to,e.attrs)}));return o.DecorationSet.create(e.doc,t)}}})}},function(e,t){e.exports=u},function(e,t){e.exports=c},function(e,t){e.exports=d}])})); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prosemirror-state"),require("tslib"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-view"),require("prosemirror-schema-list"),require("prosemirror-commands"),require("prosemirror-tables"),require("prosemirror-history"),require("prosemirror-inputrules"),require("prosemirror-dropcursor"),require("prosemirror-gapcursor"),require("prosemirror-keymap")):"function"==typeof define&&define.amd?define(["prosemirror-state","tslib","prosemirror-model","prosemirror-transform","prosemirror-view","prosemirror-schema-list","prosemirror-commands","prosemirror-tables","prosemirror-history","prosemirror-inputrules","prosemirror-dropcursor","prosemirror-gapcursor","prosemirror-keymap"],t):"object"==typeof exports?exports.KendoEditorCommon=t(require("prosemirror-state"),require("tslib"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-view"),require("prosemirror-schema-list"),require("prosemirror-commands"),require("prosemirror-tables"),require("prosemirror-history"),require("prosemirror-inputrules"),require("prosemirror-dropcursor"),require("prosemirror-gapcursor"),require("prosemirror-keymap")):e.KendoEditorCommon=t(e["prosemirror-state"],e.tslib,e["prosemirror-model"],e["prosemirror-transform"],e["prosemirror-view"],e["prosemirror-schema-list"],e["prosemirror-commands"],e["prosemirror-tables"],e["prosemirror-history"],e["prosemirror-inputrules"],e["prosemirror-dropcursor"],e["prosemirror-gapcursor"],e["prosemirror-keymap"])}(window,(function(e,t,r,n,o,i,a,s,l,u,c,d,f){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=20)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=r},function(e,t){e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(0),i=r(11);t.changeStylesString=function(e,t){var r=t.style,n=t.value,o=t.newValue;if(!e)return{changed:!1,style:null};var i=e.split(/\s*;\s*/).filter((function(e){return Boolean(e)})),a=i.filter((function(e){var t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===r&&n.test(t[1]))}));return o&&a.push(r+": "+o),{style:a.join("; ")+(a.length?";":""),changed:Boolean(o)||a.length!==i.length}},t.canInsert=function(e,t){for(var r=e.selection.$from,n=r.depth;n>=0;n--){var o=r.index(n);if(r.node(n).canReplaceWith(o,o,t))return!0}return!1};var a=function(e){return e instanceof n.Node?e.type.name:e.name};t.findNthParentNodeOfType=function(e,t){return void 0===t&&(t=1),function(r){return function(e,t){return void 0===t&&(t=1),function(r){for(var n=r.$from,o=n.depth;o>0;o--){var i=n.node(o);if(e(i)&&0===(t-=1))return{depth:o,node:i}}}}((function(t){return a(t)===a(e)}),t)(r)}},t.insertNode=function(e,t){return function(r,n){var o=r.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),n(o)}},t.hasSameMarkup=function(e,t,r,o){var a=n.Fragment.from(i.parseContent(e,r,o)),s=n.Fragment.from(i.parseContent(t,r,o));return a.eq(s)},t.getSelectionText=function(e){var t=e.selection;if(t instanceof o.TextSelection||t instanceof o.AllSelection){var r=t.content().content;return r.textBetween(0,r.size)}return""},t.getNodeFromSelection=function(e){if(e.selection instanceof o.NodeSelection)return e.selection.node},t.selectedLineTextOnly=function(e){var r="",n=!1,o=e.selection,i=e.doc,a=o.$from,s=o.$to,l=o.from,u=o.to;return a.sameParent(s)&&(i.nodesBetween(l,u,(function(e){n=n||e.isLeaf&&!e.isText})),n||(r=t.getSelectionText(e))),r},t.indentHtml=function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")},t.shallowEqual=function(e,t){var r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every((function(r){return e[r]===t[r]}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),o=r(2);t.markApplies=function(e,t,r){for(var n=function(n){var o=t[n],i=o.$from,a=o.$to,s=0===i.depth&&e.type.allowsMarkType(r);if(e.nodesBetween(i.pos,a.pos,(function(e){if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(r)})),s)return{v:!0}},o=0;o<t.length;o++){var i=n(o);if(i)return i.v}return!1},t.toggleMark=function(e,r,n){return function(o,i){var a=o.selection,s=a.empty,l=a.$cursor,u=a.ranges;if(s&&!l||!t.markApplies(o.doc,u,e))return!1;if(i)if(l)e.isInSet(o.storedMarks||l.marks())?i(n.removeStoredMark(e)):i(n.addStoredMark(e.create(r)));else{for(var c=!1,d=0;!c&&d<u.length;d++){var f=u[d],p=f.$from,m=f.$to;c=o.doc.rangeHasMark(p.pos,m.pos,e)}for(d=0;d<u.length;d++){var g=u[d];p=g.$from,m=g.$to;c?n.removeMark(p.pos,m.pos,e):n.addMark(p.pos,m.pos,e.create(r))}i(n.scrollIntoView())}return!0}},t.removeMark=function(e,t,r,i){void 0===i&&(i=null);var a=[],s=0;return e.doc.nodesBetween(t,r,(function(e,n){if(e.isInline){s++;var l=null;if(i instanceof o.MarkType){var u=i.isInSet(e.marks);u&&(l=[u])}else i?i.isInSet(e.marks)&&(l=[i]):l=e.marks;if(l&&l.length)for(var c=Math.min(n+e.nodeSize,r),d=0;d<l.length;d++){for(var f=l[d],p=void 0,m=0;m<a.length;m++){var g=a[m];g.step===s-1&&f.eq(g.style)&&(p=g)}p?(p.to=c,p.step=s):a.push({style:f,from:Math.max(n,t),to:c,step:s})}}})),a.forEach((function(t){return e.step(new n.RemoveMarkStep(t.from,t.to,t.style))})),e},t.removeMarks=function(e,r,n,o){var i=r.selection,a=i.$cursor,s=i.ranges;if(o=o||r.tr,a)e.forEach((function(e){e.isInSet(r.storedMarks||a.marks())&&n(o.removeStoredMark(e))}));else{for(var l=function(r){var n=s[r],i=n.$from,a=n.$to;e.forEach((function(e){t.removeMark(o,i.pos,a.pos,e)}))},u=0;u<s.length;u++)l(u);n(o.scrollIntoView())}return!0};t.removeAllMarks=function(e){var r=(void 0===e?{}:e).except,n=void 0===r?[]:r;return function(e,r){var o,i=e.tr;t.cleanMarks(i,{except:(o=n,o instanceof Array?o:[o])}),i.docChanged&&r(i)}},t.cleanMarks=function(e,t){var r=t.except,n=e.doc,o=e.selection,i=n.type.schema,a=o.empty,s=o.ranges,l=(r||[]).map((function(e){return e.name}));if(!a){var u=Object.keys(i.marks).map((function(e){return i.marks[e]})).filter((function(e){return-1===l.indexOf(e.name)}));s.forEach((function(t){var r=t.$from,n=t.$to;u.forEach((function(t){return e.removeMark(r.pos,n.pos,t)}))}))}},t.hasMark=function(e,r){var n,o=e.schema.marks,i=(r.altMarks||[]).filter((function(e){return o[e]})),a=r.altStyle,s=e.selection,l=s.from,u=s.$from,c=s.to,d=s.empty,f=o[r.mark],p=e.doc,m=!1;return d?(n=e.storedMarks||u.marks(),m=f&&f.isInSet(n)||i.some((function(e){return o[e].isInSet(n)}))):m=f&&p.rangeHasMark(l,c,f)||i.some((function(e){return p.rangeHasMark(l,c,o[e])})),!m&&a&&o.style?t.selectionMarks(e,o.style).some((function(e){return null!==t.styleValue(e,a)})):Boolean(m)},t.styleValue=function(e,t){for(var r=(e&&e.attrs.style||"").split(/\s*;\s*/).filter((function(e){return Boolean(e)})),n=0;n<r.length;n++){var o=r[n].split(/\s*:\s*/);if(o[0].toLowerCase()===t.name&&t.value.test(o[1]))return o[1]}return null},t.selectionMarks=function(e,t){var r=e.selection,n=r.from,o=r.$from,i=r.to,a=r.empty,s=[];return a?s.push(t.isInSet(e.storedMarks||o.marks())):e.doc.nodesBetween(n,i,(function(e){e.isInline&&s.push(t.isInSet(e.marks))})),s},t.getMark=function(e,r){var n=t.selectionMarks(e,r),o=n.filter((function(e){return Boolean(e)}));return n.length===o.length?n[0]:void 0},t.getActiveMarks=function(e,r){var n=t.selectionMarks(e,r),o=n.filter((function(e){return Boolean(e)}));return{hasNodesWithoutMarks:n.length!==o.length,marks:o}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(4),i=r(3),a=r(2),s=r(0);t.changeTextBlock=function(e,t,r,n){if(!r.isTextblock)return!1;e.selection.ranges.forEach((function(o){var s=e.steps.length,l=o.$from.pos,u=o.$to.pos;e.doc.nodesBetween(l,u,(function(o,l){if(o.eq(t)&&o.isTextblock&&!o.hasMarkup(r,n)&&function(e,t,r){var n=e.resolve(t),o=n.index();return n.parent.canReplaceWith(o,o+1,r)}(e.doc,e.mapping.slice(s).map(l),r)){e.clearIncompatible(e.mapping.slice(s).map(l,1),r);var u=e.mapping.slice(s),c=u.map(l,1),d=u.map(l+o.nodeSize,1),f=new a.Slice(a.Fragment.from(r.create(n,null,o.marks)),0,0);return e.step(new i.ReplaceAroundStep(c,d,c+1,d-1,f,1,!0)),!1}}))}))},t.blockNodes=function(e,t){void 0===t&&(t={blocksInSelection:!1});var r=e.doc,n=e.selection,o=n.$from,i=n.ranges,a=t.blocksInSelection,l=[],u=n instanceof s.NodeSelection?n.node:void 0;return u?u.isBlock?(l.push(u),u.nodesBetween(0,u.content.size,(function(e){e.isBlock&&l.push(e)}))):!a&&o.parent&&o.parent.isBlock&&l.push(o.parent):i.forEach((function(e){var t=e.$from.pos,n=e.$to.pos;r.nodesBetween(t,n,(function(e,r,o,i){e.isBlock&&(!a||r>=t&&r+e.content.size+2<=n)&&l.push(e)}))})),l},t.formatBlockElements=function(e,r){return function(o,i){var a=t.blockNodes(o),s=o.schema.nodes,l=o.tr;l.setMeta("commandName",r),l.setMeta("args",{value:e}),a.forEach((function(r){if(r.type.isTextblock)if("p"===e){var o=r.attrs,i=o.level,a=n.__rest(o,["level"]);t.changeTextBlock(l,r,s.paragraph,a)}else if(/^h[1-6]$/i.test(e)){i=parseInt(e.substr(1),10);t.changeTextBlock(l,r,s.heading,n.__assign({},r.attrs,{level:i}))}else if("blockquote"===e){var u=r.attrs;i=u.level,a=n.__rest(u,["level"]);t.changeTextBlock(l,r,s.blockquote,a)}}));var u=l.docChanged;return u&&i(l.scrollIntoView()),u}},t.cleanTextBlockFormatting=function(e,r){void 0===r&&(r={blocksInSelection:!0});var o=e.doc,i=e.selection,a=r.blocksInSelection,s=r.blockNodeType;t.blockNodes({doc:o,selection:i},{blocksInSelection:a}).filter((function(e){return e.isTextblock})).forEach((function(r){var o=r.attrs||{},i=o.style,a=void 0===i?"":i,l=o.class,u=void 0===l?"":l,c=n.__rest(o,["style","class"]),d=s||r.type;(a||u||d!==r.type)&&t.changeTextBlock(e,r,d,c)}))},t.getBlockFormats=function(e){var r=t.blockNodes(e),n=e.schema.nodes,o=[];return r.forEach((function(e){e.type===n.paragraph?o.push("p"):e.type===n.heading?o.push("h"+e.attrs.level):e.type===n.blockquote&&o.push("blockquote")})),o},t.addStyles=function(e,t){var r,n,i=e.attrs.style;i&&t.forEach((function(e){n={style:e.name,value:/^.+$/,newValue:e.value},r=o.changeStylesString(i,n),i=r.changed?r.style:i}));return i=i||t.reduce((function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""}),""),Object.assign({},e.attrs,{style:i||null})},t.hasNode=function(e,t){var r=e.selection,n=r.from,o=r.to,i=!1;return e.doc.nodesBetween(n,o,(function(e){return!(i=i||e.type===t)})),i},t.parentBlockFormat=function(e){var r=t.getBlockFormats(e);return 1===new Set(r).size?r[0]:null},t.activeNode=function(e){return{tag:t.parentBlockFormat(e)||""}}},function(e,t){e.exports=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(3),i=r(4),a=r(5),s=function(e,t){var r=e.find((function(e){return"style"===e.type.name})),n=r&&r.attrs.style;return i.changeStylesString(n,t)},l=function(e,t,r,i,a){var l=a.create({style:i.style}),u=[],c=[],d=null,f=null;return e.doc.nodesBetween(t,r,(function(e,p,m){if(e.isInline){var g=e.marks;if(!l.isInSet(g)&&m.type.allowsMarkType(l.type)){var v=Math.max(p,t),h=Math.min(p+e.nodeSize,r),y=s(g,i);if(y.changed||i.newValue){for(var k=y.changed?{style:y.style||null}:{style:[i.style]+": "+i.newValue+";"},b=a.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,M=b?n.__assign({},b.attrs,k):k,_=a.create(M),x=_.addToSet(g),S=0;S<g.length;S++)g[S].isInSet(x)||(d&&d.to===v&&d.mark.eq(g[S])?d.to=h:(d=new o.RemoveMarkStep(v,h,g[S]),u.push(d)));var T=f&&f.to===v,I=T&&_.attrs.style===f.mark.attrs.style;T&&I?f.to=h:Object.keys(M).some((function(e){return null!==M[e]}))&&(f=new o.AddMarkStep(v,h,_),c.push(f))}}}})),u.forEach((function(t){return e.step(t)})),c.forEach((function(t){return e.step(t)})),u.length+c.length>0};t.getInlineStyles=function(e,t){var r=e.schema.marks.style;return(r?a.selectionMarks(e,r):[]).map((function(e){return a.styleValue(e,t)})).filter((function(e){return null!==e}))};var u=function(e,t){return function(r,o,u){var c=r.selection,d=c.empty,f=c.$cursor,p=c.ranges;if(d&&!f||!a.markApplies(r.doc,p,e))return!1;var m=!1;if(o)if(u=u||r.tr,f){var g=r.storedMarks||f.marks();if(e.isInSet(g)){var v=s(g,t),h=g.find((function(e){return"style"===e.type.name})),y=n.__assign({},h?h.attrs:{},{style:v.style||null});if(i.shallowEqual(h.attrs,y))return!1;o(u.removeStoredMark(e)),Object.keys(y).some((function(e){return null!==y[e]}))&&o(u.addStoredMark(e.create(y))),m=!0}}else{for(var k=0;k<p.length;k++){var b=p[k],M=b.$from,_=b.$to;m=l(u,M.pos,_.pos,t,e)}m&&(u.scrollIntoView(),o(u))}return m}};t.toggleInlineFormat=function(e,t,r){return function(n,o){var i=n.schema.marks,s=e.altStyle,l=e.altMarks,c=void 0===l?[]:l,d=e.mark;t=t||n.tr;var f=!1,p=!1,m=function(){return p=!0};s&&i.style&&(f=u(i.style,{style:s.name,value:s.value})(n,m,t));var g=[d].concat(c).filter((function(e){return i[e]})).map((function(e){return a.hasMark(n,{mark:e})&&i[e]})).filter((function(e){return e}));return g.length?a.removeMarks(g,n,m,t):f||a.toggleMark(i[d],r,t)(n,m),p&&o(t),p}},t.applyInlineStyle=function(e,t){return function(r,o){var s=r.schema.marks.style,l={style:e.style,value:/^.+$/,newValue:e.value},c=r.tr;t&&c.setMeta("commandName",t),c.setMeta("args",e);var d=r.selection,f=d.empty,p=d.$cursor,m=d.ranges;if(f&&!p||!s||!a.markApplies(r.doc,m,s))return!1;if(p){var g=r.storedMarks||p.marks(),v=s.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,h={style:null};if(v&&v.attrs.style){var y=i.changeStylesString(v.attrs.style,l);y.changed&&y.style&&(h.style=y.style)}else l.newValue&&(h.style=[l.style]+": "+l.newValue+";");var k=v?n.__assign({},v.attrs,h):h;return Object.keys(k).some((function(e){return null!==k[e]}))?o(c.addStoredMark(s.create(k))):o(c.removeStoredMark(s)),!0}return u(s,l)(r,o,c)}}},function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(0);t.parseContent=function(e,t,r){var o,i=document.createElement("template");"content"in i?(i.innerHTML=e,o=i.content):o=(new DOMParser).parseFromString(e,"text/html").body||document.createDocumentFragment();return n.DOMParser.fromSchema(t).parse(o,r)},t.getHtml=function(e){var t=n.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),r=document.createElement("div");return r.appendChild(t),r.innerHTML},t.setHtml=function(e,r,n){return void 0===r&&(r="setHTML"),void 0===n&&(n={preserveWhitespace:"full"}),function(i,a){return a(i.tr.setSelection(new o.AllSelection(i.doc)).replaceSelectionWith(t.parseContent(e,i.schema,n)).setMeta("commandName",r))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(13);t.indentRules={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"}],listsTypes:n.__assign({},o.listsTypes)},t.outdentRules={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"}],listsTypes:n.__assign({},o.listsTypes)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1);t.listsTypes={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},t.orderedList={listType:t.listsTypes.orderedList,types:n.__assign({},t.listsTypes)},t.bulletList={listType:t.listsTypes.bulletList,types:n.__assign({},t.listsTypes)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(2),i=r(0),a=r(3),s=r(10),l=r(9),u=r(13),c=function(e,t,r){for(var n=t.depth,o=e.nodes[r.bulletList],i=e.nodes[r.orderedList],a=e.nodes[r.listItem],s=t.depth;s>0;s--){var l=t.node(s);if(l.type!==o&&l.type!==i||(n=s),l.type!==o&&l.type!==i&&l.type!==a)break}return n-1};function d(e){return function(t,r,n){if(!n)return!1;var o,i=(t=n.state).schema.nodes[e.listType],a=t.selection,u=a.$from,c=a.$to,d=u.node(-2),f=u.node(-3),m=function(e,t,r,n){return 0===function(e,t,r){var n=Array(),o=function(e,t){var r=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;var n=t.node(t.depth),o=t;for(;t.depth>=1;)t=e.resolve(t.before(t.depth)),(n=t.node(t.depth))&&-1!==r.indexOf(n.type.name)&&(o=t);return o}(e,t).depth,i=e.resolve(t.start(o));for(;i.pos<=r.start(r.depth);){var a=Math.min(i.depth,o),s=i.node(a);if(s&&n.push(s),0===a)break;var l=e.resolve(i.after(a));if(l.start(a)>=e.nodeSize-2)break;l.depth!==i.depth&&(l=e.resolve(l.pos+2)),i=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return n}(e,t,r).filter((function(e){return e.type!==n})).length}(t.doc,u,c,i);return(d&&d.type===i||f&&f.type===i)&&m?p(e)(t,r):(m||(p(e)(t,r),t=n.state),(o=i,s.autoJoin(l.wrapInList(o),(function(e,t){return e.type===t.type&&e.type===o})))(t,r))}}function f(e,t,r,n){n||(n=e.schema.nodes.listItem);var i=t.$from,s=t.$to,l=i.blockRange(s,(function(e){return e.childCount&&e.firstChild.type===n}));if(!l||l.depth<2||i.node(l.depth-1).type!==n)return r;var u=l.end,c=s.end(l.depth);return u<c&&(r.step(new a.ReplaceAroundStep(u-1,c,u,c,new o.Slice(o.Fragment.from(n.create(void 0,l.parent.copy())),1,0),1,!0)),l=new o.NodeRange(r.doc.resolve(i.pos),r.doc.resolve(c),l.depth)),r.lift(l,a.liftTarget(l)).scrollIntoView()}function p(e){return function(t,r){var n=t.tr,o=t.selection,s=o.$from,l=o.$to;return n.doc.nodesBetween(s.pos,l.pos,(function(r,o){if(r.isTextblock||"blockquote"===r.type.name||"div"===r.type.name){var s=new i.NodeSelection(n.doc.resolve(n.mapping.map(o))),l=s.$from.blockRange(s.$to);if(!l||s.$from.parent.type!==t.schema.nodes[e.listItem])return!1;var u=l&&a.liftTarget(l);if(null==u)return!1;n.lift(l,u)}})),r&&r(n),!0}}t.toggleList=function(e,t,r,n,o){var a=n.listType,s=e.selection,l=s.$from.node(s.$from.depth-2),u=s.$to.node(s.$to.depth-2);if(l&&l.type.name===a&&u&&u.type.name===a){var p=r.state.schema.nodes,m={bulletList:p[n.bulletList],orderedList:p[n.orderedList],listItem:p[n.listItem]},g=function(e,t){for(var r,n=t.bulletList,o=t.orderedList,i=t.listItem,a=e.depth-1;a>0;a--){var s=e.node(a);if(s.type!==n&&s.type!==o||(r=a),s.type!==n&&s.type!==o&&s.type!==i)break}return r}(s.$to,m),v=function(e,t,r,n,o,a){a||(a=e.schema.nodes.listItem);var s=!1;return o.doc.nodesBetween(t,r,(function(r,l){if(!s&&r.type===a&&l>t){s=!0;for(var u=n+3;u>n+2;){var c=o.doc.resolve(o.mapping.map(l));u=c.depth;var d=o.doc.resolve(o.mapping.map(l+r.textContent.length)),p=new i.TextSelection(c,d);o=f(e,p,o,a)}}})),o}(e,s.$to.pos,s.$to.end(g),g,r.state.tr,m.listItem);return(v=function(e,t,r){var n=e.selection,o=n.from,i=n.to,a=e.schema.nodes,s=a.paragraph,l=a.heading,u=[];t.doc.nodesBetween(o,i,(function(e,t){e.type!==s&&e.type!==l||u.push({node:e,pos:t})}));for(var d=u.length-1;d>=0;d--){var f=u[d],p=t.doc.resolve(t.mapping.map(f.pos));if(p.depth>0){var m=void 0;m=f.node.textContent&&f.node.textContent.length>0?t.doc.resolve(t.mapping.map(f.pos+f.node.textContent.length)):t.doc.resolve(t.mapping.map(f.pos+1));var g=p.blockRange(m);g&&t.lift(g,c(e.schema,p,r))}}return t}(e,v,n)).setMeta("commandName",o),t(v),!0}return d(n)(e,t,r)},t.toggleUnorderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.bulletList.listType},u.bulletList.types))},t.toggleOrderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.orderedList.listType},u.orderedList.types))},t.splitListItemKeepMarks=function(e){return function(t,r){return l.splitListItem(e)(t,(function(e){var n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();n&&e.ensureMarks(n),r(e)}))}}},function(e,t){e.exports=s},function(e,t){e.exports=l},function(e,t){e.exports=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bold={mark:"strong",altMarks:["b"],altStyle:{name:"font-weight",value:/^(bold(er)?|[5-9]\d{2,})$/}},t.italic={mark:"em",altMarks:["i"],altStyle:{name:"font-style",value:/^italic$/i}},t.underline={mark:"u",altStyle:{name:"text-decoration",value:/^underline$/i}},t.strikethrough={mark:"del",altStyle:{name:"text-decoration",value:/^line-through$/i}},t.subscript={mark:"sub"},t.superscript={mark:"sup"},t.link={mark:"link"},t.unlink={mark:"link"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,o=function(e){return/^MsoListParagraph/.test(e.className)},i=function(e){var t=e.innerHTML;return t=(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},a=function(e,t){var r=document.createElement(e);return r.style.listStyleType=t,r},s=function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},l=function(e,t){var r=[];Array.from(e).forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var n=e;n.getAttribute("datalist")?(r.push(e),t.add(r)):o(n)&&r.length?r.push(e):(r=[],"DIV"===n.nodeName?l(n.children,t):"TABLE"===n.nodeName&&Array.from(n.querySelectorAll("td,th")).forEach((function(e){l(e.children,t)})))}}))},u=function(e){var t,r=e.innerHTML,n=function(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")};return r=r.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(r)?{tag:"ul",style:(t=n(i(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(t)?null:/^o/.test(t)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(r)?{tag:"ol",style:s(n(i(e)))}:void 0},c=function(e){var t,r=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),1===e.childNodes.length?t=e.firstChild.nodeType===Node.TEXT_NODE?i(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),t="p"!==r?"<"+r+">"+e.innerHTML+"</"+r+">":e.innerHTML),e.parentNode.removeChild(e);var n=document.createElement("li");return n.innerHTML=t,n};t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=function(e){return e=e.replace(n,(function(e,t,r){return'datalist="'+t+'" datalevel="'+r+'" '+e}))}(e);var r=new Set;return l(t.children,r),r.forEach((function(e){return function(e){var t,r,n,i,s,l,d,f,p,m,g,v,h,y=-1,k={};for(f=0;f<e.length;f++){var b=(h={datalist:(p=e[f]).getAttribute("datalist"),datalevel:p.getAttribute("datalevel")}).datalist,M=u(p);if(m=M&&M.tag){if(g=h.datalevel||parseFloat(p.style.marginLeft||0),h.datalevel||p.style.marginLeft){var _=m+b;k[g]||(k[g]={}),(!r||r<0)&&(r=g,n=b,i=(d=e.filter((function(e){return e.getAttribute("datalist")===String(n)})))[d.length-1],l=a(m,M&&M.style),p.parentNode.insertBefore(l,p),y=g,k[g][_]=l),s=i===p,v=k[g][_],(g>y||!v)&&(v=a(m,M&&M.style),k[g][_]=v,t.appendChild(v)),t=c(p),v.appendChild(t),s?r=y=-1:y=g}}else!t||s&&!o(p)||(p.style.marginLeft&&(p.style.marginLeft=""),p.style.marginLeft&&(p.style.margin=""),t.appendChild(p))}}(e)})),t.innerHTML}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(11);t.getHtml=o.getHtml,t.setHtml=o.setHtml,t.parseContent=o.parseContent;var i=r(8);t.applyInlineStyle=i.applyInlineStyle,t.getInlineStyles=i.getInlineStyles,t.toggleInlineFormat=i.toggleInlineFormat;var a=r(21);t.applyLink=a.applyLink,t.removeLink=a.removeLink;var s=r(22);t.insertText=s.insertText;var l=r(23);t.insertImage=l.insertImage;var u=r(24);t.alignBlocks=u.alignBlocks,t.isAligned=u.isAligned;var c=r(25);t.cleanFormatting=c.cleanFormatting;var d=r(6);t.hasNode=d.hasNode,t.activeNode=d.activeNode,t.formatBlockElements=d.formatBlockElements,t.getBlockFormats=d.getBlockFormats,t.parentBlockFormat=d.parentBlockFormat,t.changeTextBlock=d.changeTextBlock,t.blockNodes=d.blockNodes,t.cleanTextBlockFormatting=d.cleanTextBlockFormatting;var f=r(5);t.hasMark=f.hasMark,t.getMark=f.getMark,t.getActiveMarks=f.getActiveMarks,t.removeAllMarks=f.removeAllMarks,t.cleanMarks=f.cleanMarks,t.selectionMarks=f.selectionMarks;var p=r(26);t.indent=p.indent,t.canIndentAsListItem=p.canIndentAsListItem,t.outdent=p.outdent,t.canOutdentAsListItem=p.canOutdentAsListItem,t.isIndented=p.isIndented,t.canBeIndented=p.canBeIndented,t.indentBlocks=p.indentBlocks;var m=r(14);t.toggleOrderedList=m.toggleOrderedList,t.toggleUnorderedList=m.toggleUnorderedList,t.toggleList=m.toggleList;var g=r(4);t.hasSameMarkup=g.hasSameMarkup,t.getSelectionText=g.getSelectionText,t.getNodeFromSelection=g.getNodeFromSelection,t.selectedLineTextOnly=g.selectedLineTextOnly,t.canInsert=g.canInsert,t.insertNode=g.insertNode,t.indentHtml=g.indentHtml;var v=r(27);t.alignLeftRules=v.alignLeftRules,t.alignCenterRules=v.alignCenterRules,t.alignRightRules=v.alignRightRules,t.alignJustifyRules=v.alignJustifyRules,t.alignRemoveRules=v.alignRemoveRules;var h=r(12);t.indentRules=h.indentRules,t.outdentRules=h.outdentRules;var y=r(28);t.nodes=y.nodes,t.marks=y.marks;var k=r(29);t.buildKeymap=k.buildKeymap,t.buildListKeymap=k.buildListKeymap;var b=r(18);t.bold=b.bold,t.italic=b.italic,t.underline=b.underline,t.strikethrough=b.strikethrough,t.subscript=b.subscript,t.superscript=b.superscript,t.link=b.link;var M=r(30);t.sanitize=M.sanitize,t.removeComments=M.removeComments,t.removeTag=M.removeTag,t.pasteCleanup=M.pasteCleanup,t.sanitizeClassAttr=M.sanitizeClassAttr,t.sanitizeStyleAttr=M.sanitizeStyleAttr,t.removeAttribute=M.removeAttribute;var _=r(19);t.convertMsLists=_.convertMsLists;var x=r(31);t.createTable=x.createTable;var S=r(32);t.find=S.find,t.findAt=S.findAt,t.findAll=S.findAll,t.replace=S.replace,t.replaceAll=S.replaceAll;var T=r(33);t.placeholder=T.placeholder;var I=r(34);t.spacesFix=I.spacesFix;var L=r(35);t.textHighlight=L.textHighlight,t.textHighlightKey=L.textHighlightKey,n.__exportStar(r(10),t),n.__exportStar(r(36),t),n.__exportStar(r(37),t),n.__exportStar(r(16),t),n.__exportStar(r(17),t),n.__exportStar(r(38),t),n.__exportStar(r(2),t),n.__exportStar(r(9),t),n.__exportStar(r(0),t),n.__exportStar(r(15),t),n.__exportStar(r(3),t),n.__exportStar(r(7),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8),o=r(5),i=r(0);t.removeLink=function(e,t){return function(r,i){var a=r.selection.$cursor;if(a){var s=a.parent,l=a.index(),u=r.schema.marks[e.mark],c=s.child(l).marks.find((function(e){return e.type===u})),d=s.childCount,f=a.pos-a.textOffset,p=s.child(l).nodeSize,m=void 0,g=void 0;for(m=l-1;m>=0&&c.isInSet(s.child(m).marks);)p+=g=s.child(m).nodeSize,f-=g,m-=1;for(m=l+1;m<d&&c.isInSet(s.child(m).marks);)p+=s.child(m).nodeSize,m+=1;i(o.removeMark(t||r.tr,f,f+p,c))}else n.toggleInlineFormat(e,t)(r,i)}};t.applyLink=function(e,r){var a=e.mark,s=e.attrs;return void 0===r&&(r="link"),function(e,l){var u=e.schema.marks,c=e.tr;r&&(c.setMeta("commandName",r),c.setMeta("args",s));var d=!1,f=function(){return d=!0};if(function(e,t){var r=o.selectionMarks(e,t);return 1===r.length&&r[0]?r[0]:null}(e,u[a]))!function(e,t){return function(r,n){var o=r.selection,i=o.$cursor,a=o.from,s=o.to,l=r.schema.marks[e.mark];if(i){var u=i.parent,c=i.index(),d=u.child(c).marks.find((function(e){return e.type===l})),f=u.childCount,p=i.pos-i.textOffset,m=u.child(c).nodeSize,g=void 0,v=void 0;for(g=c-1;g>=0&&d.isInSet(u.child(g).marks);)m+=v=u.child(g).nodeSize,p-=v,g-=1;for(g=c+1;g<f&&d.isInSet(u.child(g).marks);)m+=u.child(g).nodeSize,g+=1;t.removeMark(p,p+m,l),t.addMark(p,p+m,l.create(e.attrs)),n(t)}else t.doc.nodesBetween(a,s,(function(r,o){r.isInline&&l.isInSet(r.marks)&&(t.removeMark(o,o+r.nodeSize,l),t.addMark(o,o+r.nodeSize,l.create(e.attrs)),n(t))}))}}({mark:a,attrs:s},c)(e,f);else{var p=e;o.hasMark(e,{mark:a})&&(t.removeLink({mark:a,attrs:s},c)(e,f),p=i.EditorState.create({doc:c.doc,selection:c.selection})),d?o.toggleMark(u[a],s,c)(p,f):n.toggleInlineFormat({mark:a},c,s)(p,f)}return d&&l(c),d}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(e){return function(t,r){r(t.tr.insertText(e.text,e.from,e.to))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4);t.insertImage=function(e){return function(t,r){var o=t.schema.nodes.image,i=o.createAndFill(e);n.insertNode(i)(t,(function(t){return r(t.setMeta("commandName","insertImage").setMeta("args",e))}))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6);t.alignBlocks=function(e,t){return function(r,o){var i=n.blockNodes(r),a=r.tr;a.setMeta("commandName",t),i.forEach((function(t){if(t.type.isTextblock){var r={},o=e.find((function(e){return e.node===t.type.name}));o&&(r=n.addStyles(t,o.style)),n.changeTextBlock(a,t,t.type,r)}}));var s=a.docChanged;return s&&o(a.scrollIntoView()),s}},t.isAligned=function(e,t){var r=n.blockNodes(e),o=!1;return r.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var r=t.find((function(t){return t.node===e.type.name}));r&&(o=r.style.every((function(t){return!!t.value&&new RegExp(t.name+":\\s?"+t.value,"i").test(e.attrs.style)})))}})),o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6),o=r(5);t.cleanFormatting=function(e){return void 0===e&&(e={blocksInSelection:!0}),function(t,r){var i=t.tr,a=e.blocksInSelection,s=e.blockNodeType,l=(e.exceptMarks||[t.schema.marks.link]).filter(Boolean);o.cleanMarks(i,{except:l}),n.cleanTextBlockFormatting(i,{blocksInSelection:a,blockNodeType:s});var u=i.docChanged;return u&&r&&r(i),u}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9),o=r(12),i=r(6),a=r(4);t.indentBlocks=function(e,t,r){return function(n,o){var a=i.blockNodes(n),s=n.tr;s.setMeta("commandName",t),a.forEach((function(t){if(t.type.isTextblock){var n=void 0,o=e.find((function(e){return e.node===t.type.name}));if(o){var a="rtl"===r?o.rtlStyle:o.style,l={name:a,value:o.step>0?""+o.step+o.unit:""};if(t.attrs.style){var u=new RegExp(a+":\\s?(\\d+)"+o.unit,"i"),c=t.attrs.style.match(u);if(c){var d=parseFloat(c[1])+o.step;d=d<=0?"":d,l.value=""+d+(d?o.unit:"")}}n=i.addStyles(t,[l])}n&&i.changeTextBlock(s,t,t.type,n)}}));var l=s.docChanged;return l&&o(s.scrollIntoView()),l}},t.isIndented=function(e,t,r){var n=i.blockNodes(e),o=!1;return n.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var n=t.find((function(t){return t.node===e.type.name}));if(n){var i="rtl"===r?n.rtlStyle:n.style,a=new RegExp(i+":\\s?\\d+"+n.unit,"i");o=a.test(e.attrs.style)}}})),o},t.canIndentAsListItem=function(e,t){return n.sinkListItem(t)(e)},t.canOutdentAsListItem=function(e,t){var r=e.schema.nodes[t.listsTypes.listItem],o=e.schema.nodes[t.listsTypes.orderedList],i=e.schema.nodes[t.listsTypes.bulletList],s=!!a.findNthParentNodeOfType(o,2)(e.selection),l=!!a.findNthParentNodeOfType(i,2)(e.selection);return(s||l)&&n.liftListItem(r)(e)},t.canBeIndented=function(e,r){var n=e.schema.nodes,a=n[o.indentRules.listsTypes.listItem];return(t.isIndented(e,r.nodes)||o.indentRules.nodes.some((function(t){return n[t.node]&&i.hasNode(e,n[t.node])})))&&!i.hasNode(e,a)},t.indent=function(e,r){var i=e.schema.nodes[o.indentRules.listsTypes.listItem],a=t.canBeIndented(e,o.indentRules);t.canIndentAsListItem(e,i)?n.sinkListItem(i)(e,r):a&&t.indentBlocks(o.indentRules.nodes)(e,r)},t.outdent=function(e,r){var i=e.schema.nodes[o.outdentRules.listsTypes.listItem],a=t.canBeIndented(e,o.outdentRules);t.canOutdentAsListItem(e,o.outdentRules)?n.liftListItem(i)(e,r):a&&t.indentBlocks(o.outdentRules.nodes)(e,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){return{name:e,value:t}};t.alignLeftRules=[{node:"paragraph",style:[n("text-align","left")]},{node:"heading",style:[n("text-align","left")]}],t.alignRightRules=[{node:"paragraph",style:[n("text-align","right")]},{node:"heading",style:[n("text-align","right")]}],t.alignCenterRules=[{node:"paragraph",style:[n("text-align","center")]},{node:"heading",style:[n("text-align","center")]}],t.alignJustifyRules=[{node:"paragraph",style:[n("text-align","justify")]},{node:"heading",style:[n("text-align","justify")]}],t.alignRemoveRules=[{node:"paragraph",style:[n("text-align","")]},{node:"heading",style:[n("text-align","")]}]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(15),i=["blockquote",0],a=["hr"],s=["pre",["code",0]],l=["ol",0],u=["ul",0],c=["li",0],d=function(e){for(var t,r={},n=e.attributes,o=0;o<n.length;o++)r[(t=n[o]).name]=t.value;return r},f=function(e,t){for(var r in e)if(r&&null!==e[r]&&r!==t)return!0;return!1},p=function(e,t){var r={};for(var n in e)n&&null!==e[n]&&n!==t&&(r[n]=e[n]);return r},m=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},g=n.__assign({link:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:d}],toDOM:function(e){return["a",p(e.attrs),0]}}},m("strong"),m("b"),m("em"),m("i"),m("u"),m("del"),m("sub"),m("sup"),m("code"),{style:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["span",p(e.attrs),0]:["span",0]}}});t.marks=g;var v=n.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["p",p(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["div",p(e.attrs),0]:["div",0]}},blockquote:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return i}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return a}},heading:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return n.__assign({},d(e),{level:1})}},{tag:"h2",getAttrs:function(e){return n.__assign({},d(e),{level:2})}},{tag:"h3",getAttrs:function(e){return n.__assign({},d(e),{level:3})}},{tag:"h4",getAttrs:function(e){return n.__assign({},d(e),{level:4})}},{tag:"h5",getAttrs:function(e){return n.__assign({},d(e),{level:5})}},{tag:"h6",getAttrs:function(e){return n.__assign({},d(e),{level:6})}}],toDOM:function(e){return f(e.attrs,"level")?["h"+e.attrs.level,p(e.attrs,"level"),0]:["h"+e.attrs.level,0]}},code_block:{content:"text*",marks:"",group:"block",code:!0,defining:!0,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return s}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:n.__assign({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["img",p(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["br",p(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return n.__assign({},d(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?f(e.attrs,"order")?["ol",p(e.attrs,"order"),0]:l:["ol",n.__assign({},p(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["ul",p(e.attrs),0]:u}},list_item:{content:"block*",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["li",p(e.attrs),0]:c},defining:!0}},o.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(10),o=r(16),i=r(17),a=r(14),s=r(18),l=r(8),u="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var t={};if(t["Mod-z"]=o.undo,t["Shift-Mod-z"]=o.redo,t.Backspace=n.chainCommands(i.undoInputRule,n.deleteSelection,n.joinBackward,n.selectNodeBackward),t.Enter=n.chainCommands(n.newlineInCode,n.createParagraphNear,n.liftEmptyBlock,n.splitBlockKeepMarks),u||(t["Mod-y"]=o.redo),e.marks.strong&&(t["Mod-b"]=l.toggleInlineFormat(s.bold)),e.marks.em&&(t["Mod-i"]=l.toggleInlineFormat(s.italic)),e.marks.underline&&(t["Mod-u"]=l.toggleInlineFormat(s.underline)),e.nodes.hard_break){var r=e.nodes.hard_break,a=n.chainCommands(n.exitCode,(function(e,t){return t(e.tr.replaceSelectionWith(r.create()).scrollIntoView()),!0}));t["Shift-Enter"]=a}return t},t.buildListKeymap=function(e){var t={};return e.nodes.list_item&&(t.Enter=a.splitListItemKeepMarks(e.nodes.list_item)),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(19);t.sanitize=function(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/^[\s\S]+?<!--StartFragment-->\s*([\s\S]*?)\s*<!--EndFragment-->[\s\S]+$/,"$1")).replace(/<\/?[ovw]:[^>]*?>/gi,"")).replace(/<\\?\??xml[^>]*>/gi,"")).replace(/<(?:link|meta) [^>]+?>/gi,"")).replace(/<style[^>]*?>\s*<\/style>/gi,"")).replace(/<\/?st1:.*?>/gi,"")).replace(/<a name="[a-zA-Z0-9_]+">/gim,"")).replace(/v:shapes?="[^"]+"/gi,"")).replace(/<!\[if !supportLists\]>/gi,"")).replace(/<!\[endif\]>/gi,"")},t.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},t.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},t.removeAttribute=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},t.sanitizeClassAttr=function(e){/^Mso/.test(e.value)&&t.removeAttribute(e)};var o=/\s*;\s*/,i=/\s*:\s*/;t.sanitizeStyleAttr=function(e){var r,n,a=e.value.split(o).filter((function(e){return Boolean(e)})),s=e.ownerElement.style,l="";a.forEach((function(e){var t;t=e.split(i),r=t[0],n=t[1],void 0!==s[r]&&(l+=r+": "+n+"; ")})),(l=l.trim())?e.value=l:t.removeAttribute(e)};t.pasteCleanup=function(e,r){var o=e;if(r.convertMsLists&&(o=n.convertMsLists(o)),r.stripTags&&(o=t.removeTag(o,r.stripTags)),r.attributes){var i=document.createElement("div");i.innerHTML=o,Array.from(i.querySelectorAll("*")).forEach((function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var r=e.attributes.length-1;r>=0;r--){var n=e.attributes[r];t[n.name]?t[n.name](n):t["*"]&&t["*"](n)}"SPAN"===e.nodeName&&0===e.attributes.length&&function(e){var t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}(e)}}(e,r.attributes)})),o=i.innerHTML}return o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=function(e,t,r){for(var n,o=e.table,i=e.table_row,a=e.table_cell,s=[],l=0;l<t+1;l++){n=[];for(var u=0;u<r+1;u++)n.push(a.createAndFill());s.push(i.createAndFill(void 0,n))}return o.createAndFill(void 0,s)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(0);t.findAt=function(e,t,r,n,i){var l,u,c,d,f,p,m=[],g=[],v=t.matchCase,h=t.matchWord,y=t.useRegExp,k=t.text;if(y&&(/^\\$/.test(k)||/[^\\]\\$/.test(k))&&(k=k.substring(0,k.length-1)),!k)return m;var b=v?"g":"gi",M=y?new RegExp(k,b):s(k,b);return e.nodesBetween(r,n,(function(t,s,v){if(i(m))return!1;t.inlineContent&&s+t.content.size>=r&&(g.length=0,t.nodesBetween(0,t.content.size,(function(t,v,y,k){if(i(m))return!1;var b=1+s+v;if(t.isText&&b+t.nodeSize>=r){if(f=t.text||"",p=y.childCount-1>=k+1&&y.child(k+1),g.push(r<=b?{text:f,start:b}:{text:f.slice(r-b),start:r}),p&&p.isText)return;for(u=g.map((function(e){return e.text})).join(""),l=M.exec(u);null!==l&&(c=g[0].start+l.index,d=c+l[0].length,r<=c&&n>=d&&a(l,h)&&m.push(o.TextSelection.create(e,c,d)),!i(m));)l=M.exec(u)}else g.length=0})))})),m},t.find=function(e,r){var o=r.backward,i=r.matchCyclic,a=n.__rest(r,["backward","matchCyclic"]),s=o?function(){return!1}:function(e){return e.length>0},l=e.doc,u=e.selection,c=[];return o?!(c=t.findAt(l,a,0,u.from,s)).length&&i&&(c=t.findAt(l,a,u.from,l.content.size,s)):!(c=t.findAt(l,a,u.to,l.content.size,s)).length&&i&&(c=t.findAt(l,a,0,u.to,s)),c.length?c[c.length-1]:null},t.findAll=function(e,r){return t.findAt(e,r,0,e.content.size,(function(){return!1}))},t.replace=function(e,t,r){var n=e.from,i=e.to;return r.insertText(t,n,i).setSelection(o.TextSelection.create(r.doc,n,n+t.length)),r},t.replaceAll=function(e,r,n){var o=t.findAll(e.doc,n);if(0===o.length)return null;for(var i=e.tr,a=o.length-1;a>=0;a--)i.insertText(r,o[a].from,o[a].to);return i};var i=/^[\s0-9~`!@#$%\^&*\(\)_\-=+\\|\[\]{};:'"\?/.,<>]?$/,a=function(e,t){if(t){if(!0===t){var r=e.input,n=r.charAt(e.index-1),o=r.charAt(e.index+e[0].length);return i.test(n)&&i.test(o)}return t(e)}return!0},s=function(e,t){var r=e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/\s/g,"\\s");return new RegExp(r,t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(7);t.placeholder=function(e){var t={class:"k-placeholder","data-placeholder":e};return new n.Plugin({key:new n.PluginKey("placeholder"),props:{decorations:function(e){var r=e.doc,n=r.content.firstChild;if(!(0===r.childCount||1===r.childCount&&n.inlineContent&&0===n.childCount))return o.DecorationSet.empty;var i=[];return r.descendants((function(e,r){i.push(o.Decoration.node(r,r+e.nodeSize,t))})),o.DecorationSet.create(r,i)}}})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(7),i=/\s+/g,a=/text-align/;t.spacesFix=function(){return new n.Plugin({key:new n.PluginKey("spaces-fix"),props:{decorations:function(e){var t,r,n,s,l=[],u=e.doc;return u.nodesBetween(0,u.content.size,(function(e,u,c){if(e.type.isText&&function(e){return a.test(e&&e.attrs&&e.attrs.style||"")}(c))for(r=i.exec(e.text||"");null!==r;){if(t=u+r.index,n=r[0].length,r.index+n<r.input.length)for(s=0;s<=n-1;s+=2)l.push(o.Decoration.inline(t+s,t+s+1,{style:"white-space: normal"}));r=i.exec(e.text||"")}})),o.DecorationSet.create(u,l)}}})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(7);t.textHighlightKey=new n.PluginKey("highlight"),t.textHighlight=function(e){return void 0===e&&(e=t.textHighlightKey),new n.Plugin({key:e,state:{init:function(){return null},apply:function(e){return e.getMeta(this.spec.key)}},props:{decorations:function(e){var t=(this.spec.key.getState(e)||[]).map((function(e){return o.Decoration.inline(e.from,e.to,e.attrs)}));return o.DecorationSet.create(e.doc,t)}}})}},function(e,t){e.exports=c},function(e,t){e.exports=d},function(e,t){e.exports=f}])})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prosemirror-state"),require("tslib"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-view"),require("prosemirror-schema-list"),require("prosemirror-commands"),require("prosemirror-tables"),require("prosemirror-history"),require("prosemirror-inputrules"),require("prosemirror-dropcursor"),require("prosemirror-gapcursor"),require("prosemirror-keymap")):"function"==typeof define&&define.amd?define(["prosemirror-state","tslib","prosemirror-model","prosemirror-transform","prosemirror-view","prosemirror-schema-list","prosemirror-commands","prosemirror-tables","prosemirror-history","prosemirror-inputrules","prosemirror-dropcursor","prosemirror-gapcursor","prosemirror-keymap"],t):"object"==typeof exports?exports.KendoEditorCommon=t(require("prosemirror-state"),require("tslib"),require("prosemirror-model"),require("prosemirror-transform"),require("prosemirror-view"),require("prosemirror-schema-list"),require("prosemirror-commands"),require("prosemirror-tables"),require("prosemirror-history"),require("prosemirror-inputrules"),require("prosemirror-dropcursor"),require("prosemirror-gapcursor"),require("prosemirror-keymap")):e.KendoEditorCommon=t(e["prosemirror-state"],e.tslib,e["prosemirror-model"],e["prosemirror-transform"],e["prosemirror-view"],e["prosemirror-schema-list"],e["prosemirror-commands"],e["prosemirror-tables"],e["prosemirror-history"],e["prosemirror-inputrules"],e["prosemirror-dropcursor"],e["prosemirror-gapcursor"],e["prosemirror-keymap"])}(window,(function(e,t,r,n,o,i,a,s,l,u,c,d,f){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=20)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=r},function(e,t){e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(0),i=r(11);t.changeStylesString=function(e,t){var r=t.style,n=t.value,o=t.newValue;if(!e)return{changed:!1,style:null};var i=e.split(/\s*;\s*/).filter((function(e){return Boolean(e)})),a=i.filter((function(e){var t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===r&&n.test(t[1]))}));return o&&a.push(r+": "+o),{style:a.join("; ")+(a.length?";":""),changed:Boolean(o)||a.length!==i.length}},t.canInsert=function(e,t){for(var r=e.selection.$from,n=r.depth;n>=0;n--){var o=r.index(n);if(r.node(n).canReplaceWith(o,o,t))return!0}return!1};var a=function(e){return e instanceof n.Node?e.type.name:e.name};t.findNthParentNodeOfType=function(e,t){return void 0===t&&(t=1),function(r){return function(e,t){return void 0===t&&(t=1),function(r){for(var n=r.$from,o=n.depth;o>0;o--){var i=n.node(o);if(e(i)&&0===(t-=1))return{depth:o,node:i}}}}((function(t){return a(t)===a(e)}),t)(r)}},t.insertNode=function(e,t){return function(r,n){var o=r.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),n(o)}},t.hasSameMarkup=function(e,t,r,o){var a=n.Fragment.from(i.parseContent(e,r,o)),s=n.Fragment.from(i.parseContent(t,r,o));return a.eq(s)},t.getSelectionText=function(e){var t=e.selection;if(t instanceof o.TextSelection||t instanceof o.AllSelection){var r=t.content().content;return r.textBetween(0,r.size)}return""},t.getNodeFromSelection=function(e){if(e.selection instanceof o.NodeSelection)return e.selection.node},t.selectedLineTextOnly=function(e){var r="",n=!1,o=e.selection,i=e.doc,a=o.$from,s=o.$to,l=o.from,u=o.to;return a.sameParent(s)&&(i.nodesBetween(l,u,(function(e){n=n||e.isLeaf&&!e.isText})),n||(r=t.getSelectionText(e))),r},t.indentHtml=function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")},t.shallowEqual=function(e,t){var r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every((function(r){return e[r]===t[r]}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),o=r(2);t.markApplies=function(e,t,r){for(var n=function(n){var o=t[n],i=o.$from,a=o.$to,s=0===i.depth&&e.type.allowsMarkType(r);if(e.nodesBetween(i.pos,a.pos,(function(e){if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(r)})),s)return{v:!0}},o=0;o<t.length;o++){var i=n(o);if(i)return i.v}return!1},t.toggleMark=function(e,r,n){return function(o,i){var a=o.selection,s=a.empty,l=a.$cursor,u=a.ranges;if(s&&!l||!t.markApplies(o.doc,u,e))return!1;if(i)if(l)e.isInSet(o.storedMarks||l.marks())?i(n.removeStoredMark(e)):i(n.addStoredMark(e.create(r)));else{for(var c=!1,d=0;!c&&d<u.length;d++){var f=u[d],p=f.$from,m=f.$to;c=o.doc.rangeHasMark(p.pos,m.pos,e)}for(d=0;d<u.length;d++){var g=u[d];p=g.$from,m=g.$to;c?n.removeMark(p.pos,m.pos,e):n.addMark(p.pos,m.pos,e.create(r))}i(n.scrollIntoView())}return!0}},t.removeMark=function(e,t,r,i){void 0===i&&(i=null);var a=[],s=0;return e.doc.nodesBetween(t,r,(function(e,n){if(e.isInline){s++;var l=null;if(i instanceof o.MarkType){var u=i.isInSet(e.marks);u&&(l=[u])}else i?i.isInSet(e.marks)&&(l=[i]):l=e.marks;if(l&&l.length)for(var c=Math.min(n+e.nodeSize,r),d=0;d<l.length;d++){for(var f=l[d],p=void 0,m=0;m<a.length;m++){var g=a[m];g.step===s-1&&f.eq(g.style)&&(p=g)}p?(p.to=c,p.step=s):a.push({style:f,from:Math.max(n,t),to:c,step:s})}}})),a.forEach((function(t){return e.step(new n.RemoveMarkStep(t.from,t.to,t.style))})),e},t.removeMarks=function(e,r,n,o){var i=r.selection,a=i.$cursor,s=i.ranges;if(o=o||r.tr,a)e.forEach((function(e){e.isInSet(r.storedMarks||a.marks())&&n(o.removeStoredMark(e))}));else{for(var l=function(r){var n=s[r],i=n.$from,a=n.$to;e.forEach((function(e){t.removeMark(o,i.pos,a.pos,e)}))},u=0;u<s.length;u++)l(u);n(o.scrollIntoView())}return!0};t.removeAllMarks=function(e){var r=(void 0===e?{}:e).except,n=void 0===r?[]:r;return function(e,r){var o,i=e.tr;t.cleanMarks(i,{except:(o=n,o instanceof Array?o:[o])}),i.docChanged&&r(i)}},t.cleanMarks=function(e,t){var r=t.except,n=e.doc,o=e.selection,i=n.type.schema,a=o.empty,s=o.ranges,l=(r||[]).map((function(e){return e.name}));if(!a){var u=Object.keys(i.marks).map((function(e){return i.marks[e]})).filter((function(e){return-1===l.indexOf(e.name)}));s.forEach((function(t){var r=t.$from,n=t.$to;u.forEach((function(t){return e.removeMark(r.pos,n.pos,t)}))}))}},t.hasMark=function(e,r){var n,o=e.schema.marks,i=(r.altMarks||[]).filter((function(e){return o[e]})),a=r.altStyle,s=e.selection,l=s.from,u=s.$from,c=s.to,d=s.empty,f=o[r.mark],p=e.doc,m=!1;return d?(n=e.storedMarks||u.marks(),m=f&&f.isInSet(n)||i.some((function(e){return o[e].isInSet(n)}))):m=f&&p.rangeHasMark(l,c,f)||i.some((function(e){return p.rangeHasMark(l,c,o[e])})),!m&&a&&o.style?t.selectionMarks(e,o.style).some((function(e){return null!==t.styleValue(e,a)})):Boolean(m)},t.styleValue=function(e,t){for(var r=(e&&e.attrs.style||"").split(/\s*;\s*/).filter((function(e){return Boolean(e)})),n=0;n<r.length;n++){var o=r[n].split(/\s*:\s*/);if(o[0].toLowerCase()===t.name&&t.value.test(o[1]))return o[1]}return null},t.selectionMarks=function(e,t){var r=e.selection,n=r.from,o=r.$from,i=r.to,a=r.empty,s=[];return a?s.push(t.isInSet(e.storedMarks||o.marks())):e.doc.nodesBetween(n,i,(function(e){e.isInline&&s.push(t.isInSet(e.marks))})),s},t.getMark=function(e,r){var n=t.selectionMarks(e,r),o=n.filter((function(e){return Boolean(e)}));return n.length===o.length?n[0]:void 0},t.getActiveMarks=function(e,r){var n=t.selectionMarks(e,r),o=n.filter((function(e){return Boolean(e)}));return{hasNodesWithoutMarks:n.length!==o.length,marks:o}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(4),i=r(3),a=r(2),s=r(0);t.changeTextBlock=function(e,t,r,n){if(!r.isTextblock)return!1;e.selection.ranges.forEach((function(o){var s=e.steps.length,l=o.$from.pos,u=o.$to.pos;e.doc.nodesBetween(l,u,(function(o,l){if(o.eq(t)&&o.isTextblock&&!o.hasMarkup(r,n)&&function(e,t,r){var n=e.resolve(t),o=n.index();return n.parent.canReplaceWith(o,o+1,r)}(e.doc,e.mapping.slice(s).map(l),r)){e.clearIncompatible(e.mapping.slice(s).map(l,1),r);var u=e.mapping.slice(s),c=u.map(l,1),d=u.map(l+o.nodeSize,1),f=new a.Slice(a.Fragment.from(r.create(n,null,o.marks)),0,0);return e.step(new i.ReplaceAroundStep(c,d,c+1,d-1,f,1,!0)),!1}}))}))},t.blockNodes=function(e,t){void 0===t&&(t={blocksInSelection:!1});var r=e.doc,n=e.selection,o=n.$from,i=n.ranges,a=t.blocksInSelection,l=[],u=n instanceof s.NodeSelection?n.node:void 0;return u?u.isBlock?(l.push(u),u.nodesBetween(0,u.content.size,(function(e){e.isBlock&&l.push(e)}))):!a&&o.parent&&o.parent.isBlock&&l.push(o.parent):i.forEach((function(e){var t=e.$from.pos,n=e.$to.pos;r.nodesBetween(t,n,(function(e,r,o,i){e.isBlock&&(!a||r>=t&&r+e.content.size+2<=n)&&l.push(e)}))})),l},t.formatBlockElements=function(e,r){return function(o,i){var a=t.blockNodes(o),s=o.schema.nodes,l=o.tr;l.setMeta("commandName",r),l.setMeta("args",{value:e}),a.forEach((function(r){if(r.type.isTextblock)if("p"===e){var o=r.attrs,i=o.level,a=n.__rest(o,["level"]);t.changeTextBlock(l,r,s.paragraph,a)}else if(/^h[1-6]$/i.test(e)){i=parseInt(e.substr(1),10);t.changeTextBlock(l,r,s.heading,n.__assign({},r.attrs,{level:i}))}else if("blockquote"===e){var u=r.attrs;i=u.level,a=n.__rest(u,["level"]);t.changeTextBlock(l,r,s.blockquote,a)}}));var u=l.docChanged;return u&&i(l.scrollIntoView()),u}},t.cleanTextBlockFormatting=function(e,r){void 0===r&&(r={blocksInSelection:!0});var o=e.doc,i=e.selection,a=r.blocksInSelection,s=r.blockNodeType;t.blockNodes({doc:o,selection:i},{blocksInSelection:a}).filter((function(e){return e.isTextblock})).forEach((function(r){var o=r.attrs||{},i=o.style,a=void 0===i?"":i,l=o.class,u=void 0===l?"":l,c=n.__rest(o,["style","class"]),d=s||r.type;(a||u||d!==r.type)&&t.changeTextBlock(e,r,d,c)}))},t.getBlockFormats=function(e){var r=t.blockNodes(e),n=e.schema.nodes,o=[];return r.forEach((function(e){e.type===n.paragraph?o.push("p"):e.type===n.heading?o.push("h"+e.attrs.level):e.type===n.blockquote&&o.push("blockquote")})),o},t.addStyles=function(e,t){var r,n,i=e.attrs.style;i&&t.forEach((function(e){n={style:e.name,value:/^.+$/,newValue:e.value},r=o.changeStylesString(i,n),i=r.changed?r.style:i}));return i=i||t.reduce((function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""}),""),Object.assign({},e.attrs,{style:i||null})},t.hasNode=function(e,t){var r=e.selection,n=r.from,o=r.to,i=!1;return e.doc.nodesBetween(n,o,(function(e){return!(i=i||e.type===t)})),i},t.parentBlockFormat=function(e){var r=t.getBlockFormats(e);return 1===new Set(r).size?r[0]:null},t.activeNode=function(e){return{tag:t.parentBlockFormat(e)||""}}},function(e,t){e.exports=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(3),i=r(4),a=r(5),s=function(e,t){var r=e.find((function(e){return"style"===e.type.name})),n=r&&r.attrs.style;return i.changeStylesString(n,t)},l=function(e,t,r,i,a){var l=a.create({style:i.style}),u=[],c=[],d=null,f=null;return e.doc.nodesBetween(t,r,(function(e,p,m){if(e.isInline){var g=e.marks;if(!l.isInSet(g)&&m.type.allowsMarkType(l.type)){var v=Math.max(p,t),h=Math.min(p+e.nodeSize,r),y=s(g,i);if(y.changed||i.newValue){for(var k=y.changed?{style:y.style||null}:{style:[i.style]+": "+i.newValue+";"},b=a.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,M=b?n.__assign({},b.attrs,k):k,_=a.create(M),x=_.addToSet(g),S=0;S<g.length;S++)g[S].isInSet(x)||(d&&d.to===v&&d.mark.eq(g[S])?d.to=h:(d=new o.RemoveMarkStep(v,h,g[S]),u.push(d)));var T=f&&f.to===v,I=T&&_.attrs.style===f.mark.attrs.style;T&&I?f.to=h:Object.keys(M).some((function(e){return null!==M[e]}))&&(f=new o.AddMarkStep(v,h,_),c.push(f))}}}})),u.forEach((function(t){return e.step(t)})),c.forEach((function(t){return e.step(t)})),u.length+c.length>0};t.getInlineStyles=function(e,t){var r=e.schema.marks.style;return(r?a.selectionMarks(e,r):[]).map((function(e){return a.styleValue(e,t)})).filter((function(e){return null!==e}))};var u=function(e,t){return function(r,o,u){var c=r.selection,d=c.empty,f=c.$cursor,p=c.ranges;if(d&&!f||!a.markApplies(r.doc,p,e))return!1;var m=!1;if(o)if(u=u||r.tr,f){var g=r.storedMarks||f.marks();if(e.isInSet(g)){var v=s(g,t),h=g.find((function(e){return"style"===e.type.name})),y=n.__assign({},h?h.attrs:{},{style:v.style||null});if(i.shallowEqual(h.attrs,y))return!1;o(u.removeStoredMark(e)),Object.keys(y).some((function(e){return null!==y[e]}))&&o(u.addStoredMark(e.create(y))),m=!0}}else{for(var k=0;k<p.length;k++){var b=p[k],M=b.$from,_=b.$to;m=l(u,M.pos,_.pos,t,e)}m&&(u.scrollIntoView(),o(u))}return m}};t.toggleInlineFormat=function(e,t,r){return function(n,o){var i=n.schema.marks,s=e.altStyle,l=e.altMarks,c=void 0===l?[]:l,d=e.mark;t=t||n.tr;var f=!1,p=!1,m=function(){return p=!0};s&&i.style&&(f=u(i.style,{style:s.name,value:s.value})(n,m,t));var g=[d].concat(c).filter((function(e){return i[e]})).map((function(e){return a.hasMark(n,{mark:e})&&i[e]})).filter((function(e){return e}));return g.length?a.removeMarks(g,n,m,t):f||a.toggleMark(i[d],r,t)(n,m),p&&o(t),p}},t.applyInlineStyle=function(e,t){return function(r,o){var s=r.schema.marks.style,l={style:e.style,value:/^.+$/,newValue:e.value},c=r.tr;t&&c.setMeta("commandName",t),c.setMeta("args",e);var d=r.selection,f=d.empty,p=d.$cursor,m=d.ranges;if(f&&!p||!s||!a.markApplies(r.doc,m,s))return!1;if(p){var g=r.storedMarks||p.marks(),v=s.isInSet(g)?g.find((function(e){return"style"===e.type.name})):null,h={style:null};if(v&&v.attrs.style){var y=i.changeStylesString(v.attrs.style,l);y.changed&&y.style&&(h.style=y.style)}else l.newValue&&(h.style=[l.style]+": "+l.newValue+";");var k=v?n.__assign({},v.attrs,h):h;return Object.keys(k).some((function(e){return null!==k[e]}))?o(c.addStoredMark(s.create(k))):o(c.removeStoredMark(s)),!0}return u(s,l)(r,o,c)}}},function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(0);t.parseContent=function(e,t,r){var o,i=document.createElement("template");"content"in i?(i.innerHTML=e,o=i.content):o=(new DOMParser).parseFromString(e,"text/html").body||document.createDocumentFragment();return n.DOMParser.fromSchema(t).parse(o,r)},t.getHtml=function(e){var t=n.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),r=document.createElement("div");return r.appendChild(t),r.innerHTML},t.setHtml=function(e,r,n){return void 0===r&&(r="setHTML"),void 0===n&&(n={preserveWhitespace:"full"}),function(i,a){return a(i.tr.setSelection(new o.AllSelection(i.doc)).replaceSelectionWith(t.parseContent(e,i.schema,n)).setMeta("commandName",r))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(13);t.indentRules={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"}],listsTypes:n.__assign({},o.listsTypes)},t.outdentRules={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"}],listsTypes:n.__assign({},o.listsTypes)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1);t.listsTypes={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},t.orderedList={listType:t.listsTypes.orderedList,types:n.__assign({},t.listsTypes)},t.bulletList={listType:t.listsTypes.bulletList,types:n.__assign({},t.listsTypes)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(2),i=r(0),a=r(3),s=r(10),l=r(9),u=r(13),c=function(e,t,r){for(var n=t.depth,o=e.nodes[r.bulletList],i=e.nodes[r.orderedList],a=e.nodes[r.listItem],s=t.depth;s>0;s--){var l=t.node(s);if(l.type!==o&&l.type!==i||(n=s),l.type!==o&&l.type!==i&&l.type!==a)break}return n-1};function d(e){return function(t,r,n){if(!n)return!1;var o,i=(t=n.state).schema.nodes[e.listType],a=t.selection,u=a.$from,c=a.$to,d=u.node(-2),f=u.node(-3),m=function(e,t,r,n){return 0===function(e,t,r){var n=Array(),o=function(e,t){var r=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;var n=t.node(t.depth),o=t;for(;t.depth>=1;)t=e.resolve(t.before(t.depth)),(n=t.node(t.depth))&&-1!==r.indexOf(n.type.name)&&(o=t);return o}(e,t).depth,i=e.resolve(t.start(o));for(;i.pos<=r.start(r.depth);){var a=Math.min(i.depth,o),s=i.node(a);if(s&&n.push(s),0===a)break;var l=e.resolve(i.after(a));if(l.start(a)>=e.nodeSize-2)break;l.depth!==i.depth&&(l=e.resolve(l.pos+2)),i=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return n}(e,t,r).filter((function(e){return e.type!==n})).length}(t.doc,u,c,i);return(d&&d.type===i||f&&f.type===i)&&m?p(e)(t,r):(m||(p(e)(t,r),t=n.state),(o=i,s.autoJoin(l.wrapInList(o),(function(e,t){return e.type===t.type&&e.type===o})))(t,r))}}function f(e,t,r,n){n||(n=e.schema.nodes.listItem);var i=t.$from,s=t.$to,l=i.blockRange(s,(function(e){return e.childCount&&e.firstChild.type===n}));if(!l||l.depth<2||i.node(l.depth-1).type!==n)return r;var u=l.end,c=s.end(l.depth);return u<c&&(r.step(new a.ReplaceAroundStep(u-1,c,u,c,new o.Slice(o.Fragment.from(n.create(void 0,l.parent.copy())),1,0),1,!0)),l=new o.NodeRange(r.doc.resolve(i.pos),r.doc.resolve(c),l.depth)),r.lift(l,a.liftTarget(l)).scrollIntoView()}function p(e){return function(t,r){var n=t.tr,o=t.selection,s=o.$from,l=o.$to;return n.doc.nodesBetween(s.pos,l.pos,(function(r,o){if(r.isTextblock||"blockquote"===r.type.name||"div"===r.type.name){var s=new i.NodeSelection(n.doc.resolve(n.mapping.map(o))),l=s.$from.blockRange(s.$to);if(!l||s.$from.parent.type!==t.schema.nodes[e.listItem])return!1;var u=l&&a.liftTarget(l);if(null==u)return!1;n.lift(l,u)}})),r&&r(n),!0}}t.toggleList=function(e,t,r,n,o){var a=n.listType,s=e.selection,l=s.$from.node(s.$from.depth-2),u=s.$to.node(s.$to.depth-2);if(l&&l.type.name===a&&u&&u.type.name===a){var p=r.state.schema.nodes,m={bulletList:p[n.bulletList],orderedList:p[n.orderedList],listItem:p[n.listItem]},g=function(e,t){for(var r,n=t.bulletList,o=t.orderedList,i=t.listItem,a=e.depth-1;a>0;a--){var s=e.node(a);if(s.type!==n&&s.type!==o||(r=a),s.type!==n&&s.type!==o&&s.type!==i)break}return r}(s.$to,m),v=function(e,t,r,n,o,a){a||(a=e.schema.nodes.listItem);var s=!1;return o.doc.nodesBetween(t,r,(function(r,l){if(!s&&r.type===a&&l>t){s=!0;for(var u=n+3;u>n+2;){var c=o.doc.resolve(o.mapping.map(l));u=c.depth;var d=o.doc.resolve(o.mapping.map(l+r.textContent.length)),p=new i.TextSelection(c,d);o=f(e,p,o,a)}}})),o}(e,s.$to.pos,s.$to.end(g),g,r.state.tr,m.listItem);return(v=function(e,t,r){var n=e.selection,o=n.from,i=n.to,a=e.schema.nodes,s=a.paragraph,l=a.heading,u=[];t.doc.nodesBetween(o,i,(function(e,t){e.type!==s&&e.type!==l||u.push({node:e,pos:t})}));for(var d=u.length-1;d>=0;d--){var f=u[d],p=t.doc.resolve(t.mapping.map(f.pos));if(p.depth>0){var m=void 0;m=f.node.textContent&&f.node.textContent.length>0?t.doc.resolve(t.mapping.map(f.pos+f.node.textContent.length)):t.doc.resolve(t.mapping.map(f.pos+1));var g=p.blockRange(m);g&&t.lift(g,c(e.schema,p,r))}}return t}(e,v,n)).setMeta("commandName",o),t(v),!0}return d(n)(e,t,r)},t.toggleUnorderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.bulletList.listType},u.bulletList.types))},t.toggleOrderedList=function(e,r,o){return t.toggleList(e,r,o,n.__assign({listType:u.orderedList.listType},u.orderedList.types))},t.splitListItemKeepMarks=function(e){return function(t,r){return l.splitListItem(e)(t,(function(e){var n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();n&&e.ensureMarks(n),r(e)}))}}},function(e,t){e.exports=s},function(e,t){e.exports=l},function(e,t){e.exports=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bold={mark:"strong",altMarks:["b"],altStyle:{name:"font-weight",value:/^(bold(er)?|[5-9]\d{2,})$/}},t.italic={mark:"em",altMarks:["i"],altStyle:{name:"font-style",value:/^italic$/i}},t.underline={mark:"u",altStyle:{name:"text-decoration",value:/^underline$/i}},t.strikethrough={mark:"del",altStyle:{name:"text-decoration",value:/^line-through$/i}},t.subscript={mark:"sub"},t.superscript={mark:"sup"},t.link={mark:"link"},t.unlink={mark:"link"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,o=function(e){return/^MsoListParagraph/.test(e.className)},i=function(e){var t=e.innerHTML;return t=(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},a=function(e,t){var r=document.createElement(e);return r.style.listStyleType=t,r},s=function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},l=function(e,t){var r=[];Array.from(e).forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var n=e;n.getAttribute("datalist")?(r.push(e),t.add(r)):o(n)&&r.length?r.push(e):(r=[],"DIV"===n.nodeName?l(n.children,t):"TABLE"===n.nodeName&&Array.from(n.querySelectorAll("td,th")).forEach((function(e){l(e.children,t)})))}}))},u=function(e){var t,r=e.innerHTML,n=function(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")};return r=r.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(r)?{tag:"ul",style:(t=n(i(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(t)?null:/^o/.test(t)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(r)?{tag:"ol",style:s(n(i(e)))}:void 0},c=function(e){var t,r=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),1===e.childNodes.length?t=e.firstChild.nodeType===Node.TEXT_NODE?i(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),t="p"!==r?"<"+r+">"+e.innerHTML+"</"+r+">":e.innerHTML),e.parentNode.removeChild(e);var n=document.createElement("li");return n.innerHTML=t,n};t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=function(e){return e=e.replace(n,(function(e,t,r){return'datalist="'+t+'" datalevel="'+r+'" '+e}))}(e);var r=new Set;return l(t.children,r),r.forEach((function(e){return function(e){var t,r,n,i,s,l,d,f,p,m,g,v,h,y=-1,k={};for(f=0;f<e.length;f++){var b=(h={datalist:(p=e[f]).getAttribute("datalist"),datalevel:p.getAttribute("datalevel")}).datalist,M=u(p);if(m=M&&M.tag){if(g=h.datalevel||parseFloat(p.style.marginLeft||0),h.datalevel||p.style.marginLeft){var _=m+b;k[g]||(k[g]={}),(!r||r<0)&&(r=g,n=b,i=(d=e.filter((function(e){return e.getAttribute("datalist")===String(n)})))[d.length-1],l=a(m,M&&M.style),p.parentNode.insertBefore(l,p),y=g,k[g][_]=l),s=i===p,v=k[g][_],(g>y||!v)&&(v=a(m,M&&M.style),k[g][_]=v,t.appendChild(v)),t=c(p),v.appendChild(t),s?r=y=-1:y=g}}else!t||s&&!o(p)||(p.style.marginLeft&&(p.style.marginLeft=""),p.style.marginLeft&&(p.style.margin=""),t.appendChild(p))}}(e)})),t.innerHTML}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(11);t.getHtml=o.getHtml,t.setHtml=o.setHtml,t.parseContent=o.parseContent;var i=r(8);t.applyInlineStyle=i.applyInlineStyle,t.getInlineStyles=i.getInlineStyles,t.toggleInlineFormat=i.toggleInlineFormat;var a=r(21);t.applyLink=a.applyLink,t.removeLink=a.removeLink;var s=r(22);t.insertText=s.insertText;var l=r(23);t.insertImage=l.insertImage;var u=r(24);t.alignBlocks=u.alignBlocks,t.isAligned=u.isAligned;var c=r(25);t.cleanFormatting=c.cleanFormatting;var d=r(6);t.hasNode=d.hasNode,t.activeNode=d.activeNode,t.formatBlockElements=d.formatBlockElements,t.getBlockFormats=d.getBlockFormats,t.parentBlockFormat=d.parentBlockFormat,t.changeTextBlock=d.changeTextBlock,t.blockNodes=d.blockNodes,t.cleanTextBlockFormatting=d.cleanTextBlockFormatting;var f=r(5);t.hasMark=f.hasMark,t.getMark=f.getMark,t.getActiveMarks=f.getActiveMarks,t.removeAllMarks=f.removeAllMarks,t.cleanMarks=f.cleanMarks,t.selectionMarks=f.selectionMarks;var p=r(26);t.indent=p.indent,t.canIndentAsListItem=p.canIndentAsListItem,t.outdent=p.outdent,t.canOutdentAsListItem=p.canOutdentAsListItem,t.isIndented=p.isIndented,t.canBeIndented=p.canBeIndented,t.indentBlocks=p.indentBlocks;var m=r(14);t.toggleOrderedList=m.toggleOrderedList,t.toggleUnorderedList=m.toggleUnorderedList,t.toggleList=m.toggleList;var g=r(4);t.hasSameMarkup=g.hasSameMarkup,t.getSelectionText=g.getSelectionText,t.getNodeFromSelection=g.getNodeFromSelection,t.selectedLineTextOnly=g.selectedLineTextOnly,t.canInsert=g.canInsert,t.insertNode=g.insertNode,t.indentHtml=g.indentHtml;var v=r(27);t.alignLeftRules=v.alignLeftRules,t.alignCenterRules=v.alignCenterRules,t.alignRightRules=v.alignRightRules,t.alignJustifyRules=v.alignJustifyRules,t.alignRemoveRules=v.alignRemoveRules;var h=r(12);t.indentRules=h.indentRules,t.outdentRules=h.outdentRules;var y=r(28);t.nodes=y.nodes,t.marks=y.marks;var k=r(29);t.buildKeymap=k.buildKeymap,t.buildListKeymap=k.buildListKeymap;var b=r(18);t.bold=b.bold,t.italic=b.italic,t.underline=b.underline,t.strikethrough=b.strikethrough,t.subscript=b.subscript,t.superscript=b.superscript,t.link=b.link;var M=r(30);t.sanitize=M.sanitize,t.removeComments=M.removeComments,t.removeTag=M.removeTag,t.pasteCleanup=M.pasteCleanup,t.sanitizeClassAttr=M.sanitizeClassAttr,t.sanitizeStyleAttr=M.sanitizeStyleAttr,t.removeAttribute=M.removeAttribute;var _=r(19);t.convertMsLists=_.convertMsLists;var x=r(31);t.createTable=x.createTable;var S=r(32);t.find=S.find,t.findAt=S.findAt,t.findAll=S.findAll,t.replace=S.replace,t.replaceAll=S.replaceAll;var T=r(33);t.placeholder=T.placeholder;var I=r(34);t.spacesFix=I.spacesFix;var L=r(35);t.textHighlight=L.textHighlight,t.textHighlightKey=L.textHighlightKey,n.__exportStar(r(10),t),n.__exportStar(r(36),t),n.__exportStar(r(37),t),n.__exportStar(r(16),t),n.__exportStar(r(17),t),n.__exportStar(r(38),t),n.__exportStar(r(2),t),n.__exportStar(r(9),t),n.__exportStar(r(0),t),n.__exportStar(r(15),t),n.__exportStar(r(3),t),n.__exportStar(r(7),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8),o=r(5),i=r(0);t.removeLink=function(e,t){return function(r,i){var a=r.selection.$cursor;if(a){var s=a.parent,l=a.index(),u=r.schema.marks[e.mark],c=s.child(l).marks.find((function(e){return e.type===u})),d=s.childCount,f=a.pos-a.textOffset,p=s.child(l).nodeSize,m=void 0,g=void 0;for(m=l-1;m>=0&&c.isInSet(s.child(m).marks);)p+=g=s.child(m).nodeSize,f-=g,m-=1;for(m=l+1;m<d&&c.isInSet(s.child(m).marks);)p+=s.child(m).nodeSize,m+=1;i(o.removeMark(t||r.tr,f,f+p,c))}else n.toggleInlineFormat(e,t)(r,i)}};t.applyLink=function(e,r){var a=e.mark,s=e.attrs;return void 0===r&&(r="link"),function(e,l){var u=e.schema.marks,c=e.tr;r&&(c.setMeta("commandName",r),c.setMeta("args",s));var d=!1,f=function(){return d=!0};if(function(e,t){var r=o.selectionMarks(e,t);return 1===r.length&&r[0]?r[0]:null}(e,u[a]))!function(e,t){return function(r,n){var o=r.selection,i=o.$cursor,a=o.from,s=o.to,l=r.schema.marks[e.mark];if(i){var u=i.parent,c=i.index(),d=u.child(c).marks.find((function(e){return e.type===l})),f=u.childCount,p=i.pos-i.textOffset,m=u.child(c).nodeSize,g=void 0,v=void 0;for(g=c-1;g>=0&&d.isInSet(u.child(g).marks);)m+=v=u.child(g).nodeSize,p-=v,g-=1;for(g=c+1;g<f&&d.isInSet(u.child(g).marks);)m+=u.child(g).nodeSize,g+=1;t.removeMark(p,p+m,l),t.addMark(p,p+m,l.create(e.attrs)),n(t)}else t.doc.nodesBetween(a,s,(function(r,o){r.isInline&&l.isInSet(r.marks)&&(t.removeMark(o,o+r.nodeSize,l),t.addMark(o,o+r.nodeSize,l.create(e.attrs)),n(t))}))}}({mark:a,attrs:s},c)(e,f);else{var p=e;o.hasMark(e,{mark:a})&&(t.removeLink({mark:a,attrs:s},c)(e,f),p=i.EditorState.create({doc:c.doc,selection:c.selection})),d?o.toggleMark(u[a],s,c)(p,f):n.toggleInlineFormat({mark:a},c,s)(p,f)}return d&&l(c),d}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(e){return function(t,r){r(t.tr.insertText(e.text,e.from,e.to))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4);t.insertImage=function(e){return function(t,r){var o=t.schema.nodes.image,i=o.createAndFill(e);n.insertNode(i)(t,(function(t){return r(t.setMeta("commandName","insertImage").setMeta("args",e))}))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6);t.alignBlocks=function(e,t){return function(r,o){var i=n.blockNodes(r),a=r.tr;a.setMeta("commandName",t),i.forEach((function(t){if(t.type.isTextblock){var r={},o=e.find((function(e){return e.node===t.type.name}));o&&(r=n.addStyles(t,o.style)),n.changeTextBlock(a,t,t.type,r)}}));var s=a.docChanged;return s&&o(a.scrollIntoView()),s}},t.isAligned=function(e,t){var r=n.blockNodes(e),o=!1;return r.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var r=t.find((function(t){return t.node===e.type.name}));r&&(o=r.style.every((function(t){return!!t.value&&new RegExp(t.name+":\\s?"+t.value,"i").test(e.attrs.style)})))}})),o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6),o=r(5);t.cleanFormatting=function(e){return void 0===e&&(e={blocksInSelection:!0}),function(t,r){var i=t.tr,a=e.blocksInSelection,s=e.blockNodeType,l=(e.exceptMarks||[t.schema.marks.link]).filter(Boolean);o.cleanMarks(i,{except:l}),n.cleanTextBlockFormatting(i,{blocksInSelection:a,blockNodeType:s});var u=i.docChanged;return u&&r&&r(i),u}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9),o=r(12),i=r(6),a=r(4);t.indentBlocks=function(e,t,r){return function(n,o){var a=i.blockNodes(n),s=n.tr;s.setMeta("commandName",t),a.forEach((function(t){if(t.type.isTextblock){var n=void 0,o=e.find((function(e){return e.node===t.type.name}));if(o){var a="rtl"===r?o.rtlStyle:o.style,l={name:a,value:o.step>0?""+o.step+o.unit:""};if(t.attrs.style){var u=new RegExp(a+":\\s?(\\d+)"+o.unit,"i"),c=t.attrs.style.match(u);if(c){var d=parseFloat(c[1])+o.step;d=d<=0?"":d,l.value=""+d+(d?o.unit:"")}}n=i.addStyles(t,[l])}n&&i.changeTextBlock(s,t,t.type,n)}}));var l=s.docChanged;return l&&o(s.scrollIntoView()),l}},t.isIndented=function(e,t,r){var n=i.blockNodes(e),o=!1;return n.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var n=t.find((function(t){return t.node===e.type.name}));if(n){var i="rtl"===r?n.rtlStyle:n.style,a=new RegExp(i+":\\s?\\d+"+n.unit,"i");o=a.test(e.attrs.style)}}})),o},t.canIndentAsListItem=function(e,t){return n.sinkListItem(t)(e)},t.canOutdentAsListItem=function(e,t){var r=e.schema.nodes[t.listsTypes.listItem],o=e.schema.nodes[t.listsTypes.orderedList],i=e.schema.nodes[t.listsTypes.bulletList],s=!!a.findNthParentNodeOfType(o,2)(e.selection),l=!!a.findNthParentNodeOfType(i,2)(e.selection);return(s||l)&&n.liftListItem(r)(e)},t.canBeIndented=function(e,r){var n=e.schema.nodes,a=n[o.indentRules.listsTypes.listItem];return(t.isIndented(e,r.nodes)||o.indentRules.nodes.some((function(t){return n[t.node]&&i.hasNode(e,n[t.node])})))&&!i.hasNode(e,a)},t.indent=function(e,r){var i=e.schema.nodes[o.indentRules.listsTypes.listItem],a=t.canBeIndented(e,o.indentRules);t.canIndentAsListItem(e,i)?n.sinkListItem(i)(e,r):a&&t.indentBlocks(o.indentRules.nodes)(e,r)},t.outdent=function(e,r){var i=e.schema.nodes[o.outdentRules.listsTypes.listItem],a=t.canBeIndented(e,o.outdentRules);t.canOutdentAsListItem(e,o.outdentRules)?n.liftListItem(i)(e,r):a&&t.indentBlocks(o.outdentRules.nodes)(e,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){return{name:e,value:t}};t.alignLeftRules=[{node:"paragraph",style:[n("text-align","left")]},{node:"heading",style:[n("text-align","left")]}],t.alignRightRules=[{node:"paragraph",style:[n("text-align","right")]},{node:"heading",style:[n("text-align","right")]}],t.alignCenterRules=[{node:"paragraph",style:[n("text-align","center")]},{node:"heading",style:[n("text-align","center")]}],t.alignJustifyRules=[{node:"paragraph",style:[n("text-align","justify")]},{node:"heading",style:[n("text-align","justify")]}],t.alignRemoveRules=[{node:"paragraph",style:[n("text-align","")]},{node:"heading",style:[n("text-align","")]}]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(15),i=["blockquote",0],a=["hr"],s=["pre",["code",0]],l=["ol",0],u=["ul",0],c=["li",0],d=function(e){for(var t,r={},n=e.attributes,o=0;o<n.length;o++)r[(t=n[o]).name]=t.value;return r},f=function(e,t){for(var r in e)if(r&&null!==e[r]&&r!==t)return!0;return!1},p=function(e,t){var r={};for(var n in e)n&&null!==e[n]&&n!==t&&(r[n]=e[n]);return r},m=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},g=n.__assign({link:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:d}],toDOM:function(e){return["a",p(e.attrs),0]}}},m("strong"),m("b"),m("em"),m("i"),m("u"),m("del"),m("sub"),m("sup"),m("code"),{style:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["span",p(e.attrs),0]:["span",0]}}});t.marks=g;var v=n.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["p",p(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["div",p(e.attrs),0]:["div",0]}},blockquote:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return i}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return a}},heading:{attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return n.__assign({},d(e),{level:1})}},{tag:"h2",getAttrs:function(e){return n.__assign({},d(e),{level:2})}},{tag:"h3",getAttrs:function(e){return n.__assign({},d(e),{level:3})}},{tag:"h4",getAttrs:function(e){return n.__assign({},d(e),{level:4})}},{tag:"h5",getAttrs:function(e){return n.__assign({},d(e),{level:5})}},{tag:"h6",getAttrs:function(e){return n.__assign({},d(e),{level:6})}}],toDOM:function(e){return f(e.attrs,"level")?["h"+e.attrs.level,p(e.attrs,"level"),0]:["h"+e.attrs.level,0]}},code_block:{content:"text*",marks:"",group:"block",code:!0,defining:!0,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return s}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:n.__assign({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["img",p(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["br",p(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return n.__assign({},d(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?f(e.attrs,"order")?["ol",p(e.attrs,"order"),0]:l:["ol",n.__assign({},p(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["ul",p(e.attrs),0]:u}},list_item:{content:"(paragraph | heading) block*",attrs:n.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:d}],toDOM:function(e){return f(e.attrs)?["li",p(e.attrs),0]:c},defining:!0}},o.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(10),o=r(16),i=r(17),a=r(14),s=r(18),l=r(8),u="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var t={};if(t["Mod-z"]=o.undo,t["Shift-Mod-z"]=o.redo,t.Backspace=n.chainCommands(i.undoInputRule,n.deleteSelection,n.joinBackward,n.selectNodeBackward),t.Enter=n.chainCommands(n.newlineInCode,n.createParagraphNear,n.liftEmptyBlock,n.splitBlockKeepMarks),u||(t["Mod-y"]=o.redo),e.marks.strong&&(t["Mod-b"]=l.toggleInlineFormat(s.bold)),e.marks.em&&(t["Mod-i"]=l.toggleInlineFormat(s.italic)),e.marks.underline&&(t["Mod-u"]=l.toggleInlineFormat(s.underline)),e.nodes.hard_break){var r=e.nodes.hard_break,a=n.chainCommands(n.exitCode,(function(e,t){return t(e.tr.replaceSelectionWith(r.create()).scrollIntoView()),!0}));t["Shift-Enter"]=a}return t},t.buildListKeymap=function(e){var t={};return e.nodes.list_item&&(t.Enter=a.splitListItemKeepMarks(e.nodes.list_item)),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(19);t.sanitize=function(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/^[\s\S]+?<!--StartFragment-->\s*([\s\S]*?)\s*<!--EndFragment-->[\s\S]+$/,"$1")).replace(/<\/?[ovw]:[^>]*?>/gi,"")).replace(/<\\?\??xml[^>]*>/gi,"")).replace(/<(?:link|meta) [^>]+?>/gi,"")).replace(/<style[^>]*?>\s*<\/style>/gi,"")).replace(/<\/?st1:.*?>/gi,"")).replace(/<a name="[a-zA-Z0-9_]+">/gim,"")).replace(/v:shapes?="[^"]+"/gi,"")).replace(/<!\[if !supportLists\]>/gi,"")).replace(/<!\[endif\]>/gi,"")},t.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},t.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},t.removeAttribute=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},t.sanitizeClassAttr=function(e){/^Mso/.test(e.value)&&t.removeAttribute(e)};var o=/\s*;\s*/,i=/\s*:\s*/;t.sanitizeStyleAttr=function(e){var r,n,a=e.value.split(o).filter((function(e){return Boolean(e)})),s=e.ownerElement.style,l="";a.forEach((function(e){var t;t=e.split(i),r=t[0],n=t[1],void 0!==s[r]&&(l+=r+": "+n+"; ")})),(l=l.trim())?e.value=l:t.removeAttribute(e)};t.pasteCleanup=function(e,r){var o=e;if(r.convertMsLists&&(o=n.convertMsLists(o)),r.stripTags&&(o=t.removeTag(o,r.stripTags)),r.attributes){var i=document.createElement("div");i.innerHTML=o,Array.from(i.querySelectorAll("*")).forEach((function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var r=e.attributes.length-1;r>=0;r--){var n=e.attributes[r];t[n.name]?t[n.name](n):t["*"]&&t["*"](n)}"SPAN"===e.nodeName&&0===e.attributes.length&&function(e){var t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}(e)}}(e,r.attributes)})),o=i.innerHTML}return o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=function(e,t,r){for(var n,o=e.table,i=e.table_row,a=e.table_cell,s=[],l=0;l<t+1;l++){n=[];for(var u=0;u<r+1;u++)n.push(a.createAndFill());s.push(i.createAndFill(void 0,n))}return o.createAndFill(void 0,s)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(0);t.findAt=function(e,t,r,n,i){var l,u,c,d,f,p,m=[],g=[],v=t.matchCase,h=t.matchWord,y=t.useRegExp,k=t.text;if(y&&(/^\\$/.test(k)||/[^\\]\\$/.test(k))&&(k=k.substring(0,k.length-1)),!k)return m;var b=v?"g":"gi",M=y?new RegExp(k,b):s(k,b);return e.nodesBetween(r,n,(function(t,s,v){if(i(m))return!1;t.inlineContent&&s+t.content.size>=r&&(g.length=0,t.nodesBetween(0,t.content.size,(function(t,v,y,k){if(i(m))return!1;var b=1+s+v;if(t.isText&&b+t.nodeSize>=r){if(f=t.text||"",p=y.childCount-1>=k+1&&y.child(k+1),g.push(r<=b?{text:f,start:b}:{text:f.slice(r-b),start:r}),p&&p.isText)return;for(u=g.map((function(e){return e.text})).join(""),l=M.exec(u);null!==l&&(c=g[0].start+l.index,d=c+l[0].length,r<=c&&n>=d&&a(l,h)&&m.push(o.TextSelection.create(e,c,d)),!i(m));)l=M.exec(u)}else g.length=0})))})),m},t.find=function(e,r){var o=r.backward,i=r.matchCyclic,a=n.__rest(r,["backward","matchCyclic"]),s=o?function(){return!1}:function(e){return e.length>0},l=e.doc,u=e.selection,c=[];return o?!(c=t.findAt(l,a,0,u.from,s)).length&&i&&(c=t.findAt(l,a,u.from,l.content.size,s)):!(c=t.findAt(l,a,u.to,l.content.size,s)).length&&i&&(c=t.findAt(l,a,0,u.to,s)),c.length?c[c.length-1]:null},t.findAll=function(e,r){return t.findAt(e,r,0,e.content.size,(function(){return!1}))},t.replace=function(e,t,r){var n=e.from,i=e.to;return r.insertText(t,n,i).setSelection(o.TextSelection.create(r.doc,n,n+t.length)),r},t.replaceAll=function(e,r,n){var o=t.findAll(e.doc,n);if(0===o.length)return null;for(var i=e.tr,a=o.length-1;a>=0;a--)i.insertText(r,o[a].from,o[a].to);return i};var i=/^[\s0-9~`!@#$%\^&*\(\)_\-=+\\|\[\]{};:'"\?/.,<>]?$/,a=function(e,t){if(t){if(!0===t){var r=e.input,n=r.charAt(e.index-1),o=r.charAt(e.index+e[0].length);return i.test(n)&&i.test(o)}return t(e)}return!0},s=function(e,t){var r=e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/\s/g,"\\s");return new RegExp(r,t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(7);t.placeholder=function(e){var t={class:"k-placeholder","data-placeholder":e};return new n.Plugin({key:new n.PluginKey("placeholder"),props:{decorations:function(e){var r=e.doc,n=r.content.firstChild;if(!(0===r.childCount||1===r.childCount&&n.inlineContent&&0===n.childCount))return o.DecorationSet.empty;var i=[];return r.descendants((function(e,r){i.push(o.Decoration.node(r,r+e.nodeSize,t))})),o.DecorationSet.create(r,i)}}})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(7),i=/\s+/g,a=/text-align/;t.spacesFix=function(){return new n.Plugin({key:new n.PluginKey("spaces-fix"),props:{decorations:function(e){var t,r,n,s,l=[],u=e.doc;return u.nodesBetween(0,u.content.size,(function(e,u,c){if(e.type.isText&&function(e){return a.test(e&&e.attrs&&e.attrs.style||"")}(c))for(r=i.exec(e.text||"");null!==r;){if(t=u+r.index,n=r[0].length,r.index+n<r.input.length)for(s=0;s<=n-1;s+=2)l.push(o.Decoration.inline(t+s,t+s+1,{style:"white-space: normal"}));r=i.exec(e.text||"")}})),o.DecorationSet.create(u,l)}}})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(7);t.textHighlightKey=new n.PluginKey("highlight"),t.textHighlight=function(e){return void 0===e&&(e=t.textHighlightKey),new n.Plugin({key:e,state:{init:function(){return null},apply:function(e){return e.getMeta(this.spec.key)}},props:{decorations:function(e){var t=(this.spec.key.getState(e)||[]).map((function(e){return o.Decoration.inline(e.from,e.to,e.attrs)}));return o.DecorationSet.create(e.doc,t)}}})}},function(e,t){e.exports=c},function(e,t){e.exports=d},function(e,t){e.exports=f}])})); |
@@ -201,3 +201,3 @@ import * as tslib_1 from "tslib"; | ||
list_item: { | ||
content: 'block*', | ||
content: '(paragraph | heading) block*', | ||
attrs: tslib_1.__assign({}, commonAttributes()), | ||
@@ -204,0 +204,0 @@ parseDOM: [{ tag: 'li', getAttrs: getAttributes }], |
@@ -199,3 +199,3 @@ import { tableNodes } from 'prosemirror-tables'; | ||
list_item: { | ||
content: 'block*', | ||
content: '(paragraph | heading) block*', | ||
attrs: Object.assign({}, commonAttributes()), | ||
@@ -202,0 +202,0 @@ parseDOM: [{ tag: 'li', getAttrs: getAttributes }], |
@@ -204,3 +204,3 @@ "use strict"; | ||
list_item: { | ||
content: 'block*', | ||
content: '(paragraph | heading) block*', | ||
attrs: tslib_1.__assign({}, commonAttributes()), | ||
@@ -207,0 +207,0 @@ parseDOM: [{ tag: 'li', getAttrs: getAttributes }], |
@@ -1,1 +0,1 @@ | ||
System.register("@progress/kendo-editor-common",["tslib","prosemirror-commands","prosemirror-dropcursor","prosemirror-gapcursor","prosemirror-history","prosemirror-inputrules","prosemirror-keymap","prosemirror-model","prosemirror-schema-list","prosemirror-state","prosemirror-tables","prosemirror-transform","prosemirror-view"],function(i){var s,a,l,u,c,d,f,p,m,g,h,v,y;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){s=t(e)},function(e){a=t(e)},function(e){l=t(e)},function(e){u=t(e)},function(e){c=t(e)},function(e){d=t(e)},function(e){f=t(e)},function(e){p=t(e)},function(e){m=t(e)},function(e){g=t(e)},function(e){h=t(e)},function(e){v=t(e)},function(e){y=t(e)}],execute:function(){function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var n,o;o={},r.m=n=[function(e,t){e.exports=g},function(e,t){e.exports=s},function(e,t){e.exports=p},function(e,l,t){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var o=t(2),n=t(0),i=t(19);l.changeStylesString=function(e,t){var n=t.style,r=t.value,o=t.newValue;if(!e)return{changed:!1,style:null};t=e.split(/\s*;\s*/).filter(function(e){return Boolean(e)}),e=t.filter(function(e){e=e.split(/\s*:\s*/);return!(e[0].toLowerCase()===n&&r.test(e[1]))});return o&&e.push(n+": "+o),{style:e.join("; ")+(e.length?";":""),changed:Boolean(o)||e.length!==t.length}},l.canInsert=function(e,t){for(var n=e.selection.$from,r=n.depth;0<=r;r--){var o=n.index(r);if(n.node(r).canReplaceWith(o,o,t))return!0}return!1};function s(e){return(e instanceof o.Node?e.type:e).name}l.findNthParentNodeOfType=function(i,t){return void 0===t&&(t=1),function(e){return void 0===(o=t)&&(o=1),function(e){for(var t=e.$from,n=t.depth;0<n;n--){var r=t.node(n);if(s(r)===s(i)&&0==--o)return{depth:n,node:r}}}(e);var o}},l.insertNode=function(n,r){return function(e,t){e=e.tr.replaceSelectionWith(n);r&&e.scrollIntoView(),t(e)}},l.hasSameMarkup=function(e,t,n,r){e=o.Fragment.from(i.parseContent(e,n,r)),r=o.Fragment.from(i.parseContent(t,n,r));return e.eq(r)},l.getSelectionText=function(e){e=e.selection;if(e instanceof n.TextSelection||e instanceof n.AllSelection){e=e.content().content;return e.textBetween(0,e.size)}return""},l.getNodeFromSelection=function(e){if(e.selection instanceof n.NodeSelection)return e.selection.node},l.selectedLineTextOnly=function(e){var t="",n=!1,r=e.selection,o=e.doc,i=r.$from,s=r.$to,a=r.from,r=r.to;return i.sameParent(s)&&(o.nodesBetween(a,r,function(e){n=n||e.isLeaf&&!e.isText}),n||(t=l.getSelectionText(e))),t},l.indentHtml=function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")},l.shallowEqual=function(t,n){var e=Object.keys(t),r=Object.keys(n);return e.length===r.length&&e.every(function(e){return t[e]===n[e]})}},function(e,t){e.exports=v},function(e,t){e.exports=y},function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var l=t(1),o=t(3),u=t(4),c=t(2),i=t(0);a.changeTextBlock=function(i,s,a,l){if(!a.isTextblock)return!1;i.selection.ranges.forEach(function(e){var o=i.steps.length,t=e.$from.pos,e=e.$to.pos;i.doc.nodesBetween(t,e,function(e,t){if(e.eq(s)&&e.isTextblock&&!e.hasMarkup(a,l)&&function(e,t,n){e=e.resolve(t),t=e.index();return e.parent.canReplaceWith(t,t+1,n)}(i.doc,i.mapping.slice(o).map(t),a)){i.clearIncompatible(i.mapping.slice(o).map(t,1),a);var n=i.mapping.slice(o),r=n.map(t,1),t=n.map(t+e.nodeSize,1),e=new c.Slice(c.Fragment.from(a.create(l,null,e.marks)),0,0);return i.step(new u.ReplaceAroundStep(r,t,r+1,t-1,e,1,!0)),!1}})})},a.blockNodes=function(e,t){void 0===t&&(t={blocksInSelection:!1});var n=e.doc,r=e.selection,o=r.$from,e=r.ranges,s=t.blocksInSelection,a=[],r=r instanceof i.NodeSelection?r.node:void 0;return r?r.isBlock?(a.push(r),r.nodesBetween(0,r.content.size,function(e){e.isBlock&&a.push(e)})):!s&&o.parent&&o.parent.isBlock&&a.push(o.parent):e.forEach(function(e){var o=e.$from.pos,i=e.$to.pos;n.nodesBetween(o,i,function(e,t,n,r){e.isBlock&&(!s||o<=t&&t+e.content.size+2<=i)&&a.push(e)})}),a},a.formatBlockElements=function(s,r){return function(e,t){var n=a.blockNodes(e),o=e.schema.nodes,i=e.tr;i.setMeta("commandName",r),i.setMeta("args",{value:s}),n.forEach(function(e){var t,n,r;e.type.isTextblock&&("p"===s?(n=(t=e.attrs).level,r=l.__rest(t,["level"]),a.changeTextBlock(i,e,o.paragraph,r)):/^h[1-6]$/i.test(s)?(n=parseInt(s.substr(1),10),a.changeTextBlock(i,e,o.heading,l.__assign({},e.attrs,{level:n}))):"blockquote"===s&&(n=(t=e.attrs).level,r=l.__rest(t,["level"]),a.changeTextBlock(i,e,o.blockquote,r)))});n=i.docChanged;return n&&t(i.scrollIntoView()),n}},a.cleanTextBlockFormatting=function(i,e){void 0===e&&(e={blocksInSelection:!0});var t=i.doc,n=i.selection,r=e.blocksInSelection,s=e.blockNodeType;a.blockNodes({doc:t,selection:n},{blocksInSelection:r}).filter(function(e){return e.isTextblock}).forEach(function(e){var t=e.attrs||{},n=t.style,r=void 0===n?"":n,o=t.class,n=void 0===o?"":o,o=l.__rest(t,["style","class"]),t=s||e.type;(r||n||t!==e.type)&&a.changeTextBlock(i,e,t,o)})},a.getBlockFormats=function(e){var t=a.blockNodes(e),n=e.schema.nodes,r=[];return t.forEach(function(e){e.type===n.paragraph?r.push("p"):e.type===n.heading?r.push("h"+e.attrs.level):e.type===n.blockquote&&r.push("blockquote")}),r},a.addStyles=function(e,t){var n,r=e.attrs.style;return r&&t.forEach(function(e){n={style:e.name,value:/^.+$/,newValue:e.value},n=o.changeStylesString(r,n),r=n.changed?n.style:r}),r=r||t.reduce(function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""},""),Object.assign({},e.attrs,{style:r||null})},a.hasNode=function(e,t){var n=e.selection,r=n.from,n=n.to,o=!1;return e.doc.nodesBetween(r,n,function(e){return!(o=o||e.type===t)}),o},a.parentBlockFormat=function(e){e=a.getBlockFormats(e);return 1===new Set(e).size?e[0]:null},a.activeNode=function(e){return{tag:a.parentBlockFormat(e)||""}}},function(e,g,t){"use strict";Object.defineProperty(g,"__esModule",{value:!0});var n=t(4),h=t(2);g.markApplies=function(r,o,i){for(var e=0;e<o.length;e++){var t=function(e){var t=o[e],e=t.$from,t=t.$to,n=0===e.depth&&r.type.allowsMarkType(i);if(r.nodesBetween(e.pos,t.pos,function(e){return!n&&void(n=e.inlineContent&&e.type.allowsMarkType(i))}),n)return{v:!0}}(e);if(t)return t.v}return!1},g.toggleMark=function(f,p,m){return function(e,t){var n=e.selection,r=n.empty,o=n.$cursor,i=n.ranges;if(r&&!o||!g.markApplies(e.doc,i,f))return!1;if(t)if(o)f.isInSet(e.storedMarks||o.marks())?t(m.removeStoredMark(f)):t(m.addStoredMark(f.create(p)));else{for(var s=!1,a=0;!s&&a<i.length;a++)var l=i[a],u=l.$from,c=l.$to,s=e.doc.rangeHasMark(u.pos,c.pos,f);for(a=0;a<i.length;a++){var d=i[a],u=d.$from,c=d.$to;s?m.removeMark(u.pos,c.pos,f):m.addMark(u.pos,c.pos,f.create(p))}t(m.scrollIntoView())}return!0}},g.removeMark=function(t,c,d,f){void 0===f&&(f=null);var p=[],m=0;return t.doc.nodesBetween(c,d,function(e,t){if(e.isInline){m++;var n,r=null;if(f instanceof h.MarkType?(n=f.isInSet(e.marks))&&(r=[n]):f?f.isInSet(e.marks)&&(r=[f]):r=e.marks,r&&r.length)for(var o=Math.min(t+e.nodeSize,d),i=0;i<r.length;i++){for(var s=r[i],a=void 0,l=0;l<p.length;l++){var u=p[l];u.step===m-1&&s.eq(u.style)&&(a=u)}a?(a.to=o,a.step=m):p.push({style:s,from:Math.max(t,c),to:o,step:m})}}}),p.forEach(function(e){return t.step(new n.RemoveMarkStep(e.from,e.to,e.style))}),t},g.removeMarks=function(r,t,n,o){var e=t.selection,i=e.$cursor,s=e.ranges;if(o=o||t.tr,i)r.forEach(function(e){e.isInSet(t.storedMarks||i.marks())&&n(o.removeStoredMark(e))});else{for(var a=0;a<s.length;a++)!function(e){var t=(e=s[e]).$from,n=e.$to;r.forEach(function(e){g.removeMark(o,t.pos,n.pos,e)})}(a);n(o.scrollIntoView())}return!0},g.removeAllMarks=function(e){var e=(void 0===e?{}:e).except,n=void 0===e?[]:e;return function(e,t){e=e.tr;g.cleanMarks(e,{except:n instanceof Array?n:[n]}),e.docChanged&&t(e)}},g.cleanMarks=function(r,e){var o,t=e.except,n=r.doc,e=r.selection,i=n.type.schema,n=e.empty,e=e.ranges,s=(t||[]).map(function(e){return e.name});n||(o=Object.keys(i.marks).map(function(e){return i.marks[e]}).filter(function(e){return-1===s.indexOf(e.name)}),e.forEach(function(e){var t=e.$from,n=e.$to;o.forEach(function(e){return r.removeMark(t.pos,n.pos,e)})}))},g.hasMark=function(e,t){var n,r=e.schema.marks,o=(t.altMarks||[]).filter(function(e){return r[e]}),i=t.altStyle,s=e.selection,a=s.from,l=s.$from,u=s.to,c=s.empty,s=r[t.mark],d=e.doc,t=!1;return!(t=c?(n=e.storedMarks||l.marks(),s&&s.isInSet(n)||o.some(function(e){return r[e].isInSet(n)})):s&&d.rangeHasMark(a,u,s)||o.some(function(e){return d.rangeHasMark(a,u,r[e])}))&&i&&r.style?g.selectionMarks(e,r.style).some(function(e){return null!==g.styleValue(e,i)}):Boolean(t)},g.styleValue=function(e,t){for(var n=(e&&e.attrs.style||"").split(/\s*;\s*/).filter(function(e){return Boolean(e)}),r=0;r<n.length;r++){var o=n[r].split(/\s*:\s*/);if(o[0].toLowerCase()===t.name&&t.value.test(o[1]))return o[1]}return null},g.selectionMarks=function(e,t){var n=e.selection,r=n.from,o=n.$from,i=n.to,s=[];return n.empty?s.push(t.isInSet(e.storedMarks||o.marks())):e.doc.nodesBetween(r,i,function(e){e.isInline&&s.push(t.isInSet(e.marks))}),s},g.getMark=function(e,t){e=g.selectionMarks(e,t),t=e.filter(function(e){return Boolean(e)});return e.length===t.length?e[0]:void 0},g.getActiveMarks=function(e,t){e=g.selectionMarks(e,t),t=e.filter(function(e){return Boolean(e)});return{hasNodesWithoutMarks:e.length!==t.length,marks:t}}},function(e,t){e.exports=a},function(e,t){e.exports=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function y(e,t){return e=(e=e.find(function(e){return"style"===e.type.name}))&&e.attrs.style,m.changeStylesString(e,t)}var k=n(1),M=n(4),m=n(3),g=n(7);t.getInlineStyles=function(e,t){var n=e.schema.marks.style;return(n?g.selectionMarks(e,n):[]).map(function(e){return g.styleValue(e,t)}).filter(function(e){return null!==e})};function f(f,p){return function(e,t,n){var r=e.selection,o=r.empty,i=r.$cursor,s=r.ranges;if(o&&!i||!g.markApplies(e.doc,s,f))return!1;var a=!1;if(t)if(n=n||e.tr,i){e=e.storedMarks||i.marks();if(f.isInSet(e)){var i=y(e,p),e=e.find(function(e){return"style"===e.type.name}),l=k.__assign({},e?e.attrs:{},{style:i.style||null});if(m.shallowEqual(e.attrs,l))return!1;t(n.removeStoredMark(f)),Object.keys(l).some(function(e){return null!==l[e]})&&t(n.addStoredMark(f.create(l))),a=!0}}else{for(var u=0;u<s.length;u++)var c=s[u],d=c.$from,c=c.$to,a=function(t,u,c,d,f){var p=f.create({style:d.style}),m=[],g=[],h=null,v=null;return t.doc.nodesBetween(u,c,function(e,t,n){if(e.isInline){var r=e.marks;if(!p.isInSet(r)&&n.type.allowsMarkType(p.type)){var o=Math.max(t,u),i=Math.min(t+e.nodeSize,c),n=y(r,d);if(n.changed||d.newValue){for(var t=n.changed?{style:n.style||null}:{style:[d.style]+": "+d.newValue+";"},e=f.isInSet(r)?r.find(function(e){return"style"===e.type.name}):null,s=e?k.__assign({},e.attrs,t):t,n=f.create(s),a=n.addToSet(r),l=0;l<r.length;l++)r[l].isInSet(a)||(h&&h.to===o&&h.mark.eq(r[l])?h.to=i:(h=new M.RemoveMarkStep(o,i,r[l]),m.push(h)));e=v&&v.to===o,t=e&&n.attrs.style===v.mark.attrs.style;e&&t?v.to=i:Object.keys(s).some(function(e){return null!==s[e]})&&(v=new M.AddMarkStep(o,i,n),g.push(v))}}}}),m.forEach(function(e){return t.step(e)}),g.forEach(function(e){return t.step(e)}),0<m.length+g.length}(n,d.pos,c.pos,p,f);a&&(n.scrollIntoView(),t(n))}return a}}t.toggleInlineFormat=function(u,c,d){return function(t,e){var n=t.schema.marks,r=u.altStyle,o=u.altMarks,i=void 0===o?[]:o,s=u.mark;c=c||t.tr;var a=!1,l=!1,o=function(){return l=!0};r&&n.style&&(a=f(n.style,{style:r.name,value:r.value})(t,o,c));i=[s].concat(i).filter(function(e){return n[e]}).map(function(e){return g.hasMark(t,{mark:e})&&n[e]}).filter(function(e){return e});return i.length?g.removeMarks(i,t,o,c):a||g.toggleMark(n[s],d,c)(t,o),l&&e(c),l}},t.applyInlineStyle=function(u,c){return function(e,t){var n=e.schema.marks.style,r={style:u.style,value:/^.+$/,newValue:u.value},o=e.tr;c&&o.setMeta("commandName",c),o.setMeta("args",u);var i=e.selection,s=i.empty,a=i.$cursor,i=i.ranges;if(s&&!a||!n||!g.markApplies(e.doc,i,n))return!1;if(a){s=e.storedMarks||a.marks(),i=n.isInSet(s)?s.find(function(e){return"style"===e.type.name}):null,a={style:null};i&&i.attrs.style?(s=m.changeStylesString(i.attrs.style,r)).changed&&s.style&&(a.style=s.style):r.newValue&&(a.style=[r.style]+": "+r.newValue+";");var l=i?k.__assign({},i.attrs,a):a;return Object.keys(l).some(function(e){return null!==l[e]})?t(o.addStoredMark(n.create(l))):t(o.removeStoredMark(n)),!0}return f(n,r)(e,t,o)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function v(e){return/^MsoListParagraph/.test(e.className)}function y(e){return(e=(e=e.innerHTML).replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")}function k(e,t){return(e=document.createElement(e)).style.listStyleType=t,e}var r=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,o=function(e,n){var r=[];Array.from(e).forEach(function(e){var t;e.nodeType===Node.ELEMENT_NODE&&((t=e).getAttribute("datalist")?(r.push(e),n.add(r)):v(t)&&r.length?r.push(e):(r=[],"DIV"===t.nodeName?o(t.children,n):"TABLE"===t.nodeName&&Array.from(t.querySelectorAll("td,th")).forEach(function(e){o(e.children,n)})))})};t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=e.replace(r,function(e,t,n){return'datalist="'+t+'" datalevel="'+n+'" '+e});e=new Set;return o(t.children,e),e.forEach(function(e){for(var t,n,r,o,i,s,a,l,u,c=-1,d={},f=0;f<e.length;f++){var p,m,g=(p={datalist:(s=e[f]).getAttribute("datalist"),datalevel:s.getAttribute("datalevel")}).datalist,h=(h=u=l=void 0,u=function(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")},h=(h=(m=s).innerHTML).replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(h)?{tag:"ul",style:(l=u(y(m)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(l)?null:/^o/.test(l)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(h)?{tag:"ol",style:(u=u(y(m)),m=null,/^\d/.test(u)||(m=(/^[a-z]/.test(u)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(u)?"roman":"alpha")),m)}:void 0);(u=h&&h.tag)?(m=p.datalevel||parseFloat(s.style.marginLeft||0),(p.datalevel||s.style.marginLeft)&&(p=u+g,d[m]||(d[m]={}),(!n||n<0)&&(n=m,r=g,o=(i=e.filter(function(e){return e.getAttribute("datalist")===String(r)}))[i.length-1],a=k(u,h&&h.style),s.parentNode.insertBefore(a,s),d[c=m][p]=a),i=o===s,a=d[m][p],(c<m||!a)&&(a=k(u,h&&h.style),d[m][p]=a,t.appendChild(a)),t=function(e){var t=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),t=1===e.childNodes.length?e.firstChild.nodeType===Node.TEXT_NODE?y(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),"p"!==t?"<"+t+">"+e.innerHTML+"</"+t+">":e.innerHTML),e.parentNode.removeChild(e);e=document.createElement("li");return e.innerHTML=t,e}(s),a.appendChild(t),i?n=c=-1:c=m)):!t||i&&!v(s)||(s.style.marginLeft&&(s.style.marginLeft=""),s.style.marginLeft&&(s.style.margin=""),t.appendChild(s))}}),t.innerHTML}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bold={mark:"strong",altMarks:["b"],altStyle:{name:"font-weight",value:/^(bold(er)?|[5-9]\d{2,})$/}},t.italic={mark:"em",altMarks:["i"],altStyle:{name:"font-style",value:/^italic$/i}},t.underline={mark:"u",altStyle:{name:"text-decoration",value:/^underline$/i}},t.strikethrough={mark:"del",altStyle:{name:"text-decoration",value:/^line-through$/i}},t.subscript={mark:"sub"},t.superscript={mark:"sup"},t.link={mark:"link"},t.unlink={mark:"link"}},function(e,t){e.exports=d},function(e,t){e.exports=c},function(e,t){e.exports=h},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t(1),d=t(2),f=t(0),p=t(4),m=t(8),g=t(9),i=t(17);function c(d){return function(e,t,n){if(!n)return!1;var r,o,i=(e=n.state).schema.nodes[d.listType],s=e.selection,a=s.$from,l=s.$to,u=a.node(-2),c=a.node(-3),l=(s=e.doc,r=i,0===function(e,t,n){for(var r=Array(),o=function(e,t){var n=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;for(var r=t.node(t.depth),o=t;1<=t.depth;)(r=(t=e.resolve(t.before(t.depth))).node(t.depth))&&-1!==n.indexOf(r.type.name)&&(o=t);return o}(e,t).depth,i=e.resolve(t.start(o));i.pos<=n.start(n.depth);){var s=Math.min(i.depth,o),a=i.node(s);if(a&&r.push(a),0===s)break;a=e.resolve(i.after(s));if(a.start(s)>=e.nodeSize-2)break;a.depth!==i.depth&&(a=e.resolve(a.pos+2)),i=a.depth?e.resolve(a.start(a.depth)):e.resolve(a.end(a.depth))}return r}(s,a,l).filter(function(e){return e.type!==r}).length);return(u&&u.type===i||c&&c.type===i)&&l?h(d)(e,t):(l||(h(d)(e,t),e=n.state),o=i,m.autoJoin(g.wrapInList(o),function(e,t){return e.type===t.type&&e.type===o})(e,t))}}function h(i){return function(n,e){var r=n.tr,t=n.selection,o=t.$from,t=t.$to;return r.doc.nodesBetween(o.pos,t.pos,function(e,t){if(e.isTextblock||"blockquote"===e.type.name||"div"===e.type.name){e=new f.NodeSelection(r.doc.resolve(r.mapping.map(t))),t=e.$from.blockRange(e.$to);if(!t||e.$from.parent.type!==n.schema.nodes[i.listItem])return!1;e=t&&p.liftTarget(t);if(null==e)return!1;r.lift(t,e)}}),e&&e(r),!0}}r.toggleList=function(e,t,n,r,o){var i=r.listType,s=e.selection,a=s.$from.node(s.$from.depth-2),l=s.$to.node(s.$to.depth-2);if(a&&a.type.name===i&&l&&l.type.name===i){var i=n.state.schema.nodes,u={bulletList:i[r.bulletList],orderedList:i[r.orderedList],listItem:i[r.listItem]},i=function(e){for(var t,n=u.bulletList,r=u.orderedList,o=u.listItem,i=e.depth-1;0<i;i--){var s=e.node(i);if(s.type!==n&&s.type!==r||(t=i),s.type!==n&&s.type!==r&&s.type!==o)break}return t}(s.$to),i=function(i,s,e,a,l,u){u=u||i.schema.nodes.listItem;var c=!1;return l.doc.nodesBetween(s,e,function(e,t){if(!c&&e.type===u&&s<t){c=!0;for(var n=a+3;a+2<n;){var r=l.doc.resolve(l.mapping.map(t)),n=r.depth,o=l.doc.resolve(l.mapping.map(t+e.textContent.length)),o=new f.TextSelection(r,o);l=function(e,t,n,r){r=r||e.schema.nodes.listItem;var o=t.$from,i=t.$to;return!(e=o.blockRange(i,function(e){return e.childCount&&e.firstChild.type===r}))||e.depth<2||o.node(e.depth-1).type!==r?n:(t=e.end,i=i.end(e.depth),t<i&&(n.step(new p.ReplaceAroundStep(t-1,i,t,i,new d.Slice(d.Fragment.from(r.create(void 0,e.parent.copy())),1,0),1,!0)),e=new d.NodeRange(n.doc.resolve(o.pos),n.doc.resolve(i),e.depth)),n.lift(e,p.liftTarget(e)).scrollIntoView())}(i,o,l,u)}}}),l}(e,s.$to.pos,s.$to.end(i),i,n.state.tr,u.listItem);return(i=function(e,t,n){var r=e.selection,o=r.from,i=r.to,r=e.schema.nodes,s=r.paragraph,a=r.heading,l=[];t.doc.nodesBetween(o,i,function(e,t){e.type!==s&&e.type!==a||l.push({node:e,pos:t})});for(var u=l.length-1;0<=u;u--){var c,d=l[u],f=t.doc.resolve(t.mapping.map(d.pos));0<f.depth&&(c=void 0,c=d.node.textContent&&0<d.node.textContent.length?t.doc.resolve(t.mapping.map(d.pos+d.node.textContent.length)):t.doc.resolve(t.mapping.map(d.pos+1)),(c=f.blockRange(c))&&t.lift(c,function(e,t,n){for(var r=t.depth,o=e.nodes[n.bulletList],i=e.nodes[n.orderedList],s=e.nodes[n.listItem],a=t.depth;0<a;a--){var l=t.node(a);if(l.type!==o&&l.type!==i||(r=a),l.type!==o&&l.type!==i&&l.type!==s)break}return r-1}(e.schema,f,n)))}return t}(e,i,r)).setMeta("commandName",o),t(i),!0}return c(r)(e,t,n)},r.toggleUnorderedList=function(e,t,n){return r.toggleList(e,t,n,o.__assign({listType:i.bulletList.listType},i.bulletList.types))},r.toggleOrderedList=function(e,t,n){return r.toggleList(e,t,n,o.__assign({listType:i.orderedList.listType},i.orderedList.types))},r.splitListItemKeepMarks=function(e){return function(n,r){return g.splitListItem(e)(n,function(e){var t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();t&&e.ensureMarks(t),r(e)})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n=n(1);t.listsTypes={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},t.orderedList={listType:t.listsTypes.orderedList,types:n.__assign({},t.listsTypes)},t.bulletList={listType:t.listsTypes.bulletList,types:n.__assign({},t.listsTypes)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),n=n(17);t.indentRules={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"}],listsTypes:r.__assign({},n.listsTypes)},t.outdentRules={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"}],listsTypes:r.__assign({},n.listsTypes)}},function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=t(2),s=t(0);i.parseContent=function(e,t,n){var r=document.createElement("template"),e="content"in r?(r.innerHTML=e,r.content):(new DOMParser).parseFromString(e,"text/html").body||document.createDocumentFragment();return o.DOMParser.fromSchema(t).parse(e,n)},i.getHtml=function(e){var t=o.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),e=document.createElement("div");return e.appendChild(t),e.innerHTML},i.setHtml=function(n,r,o){return void 0===r&&(r="setHTML"),void 0===o&&(o={preserveWhitespace:"full"}),function(e,t){return t(e.tr.setSelection(new s.AllSelection(e.doc)).replaceSelectionWith(i.parseContent(n,e.schema,o)).setMeta("commandName",r))}}},function(e,t){e.exports=f},function(e,t){e.exports=u},function(e,t){e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(5);t.textHighlightKey=new r.PluginKey("highlight"),t.textHighlight=function(e){return void 0===e&&(e=t.textHighlightKey),new r.Plugin({key:e,state:{init:function(){return null},apply:function(e){return e.getMeta(this.spec.key)}},props:{decorations:function(e){var t=(this.spec.key.getState(e)||[]).map(function(e){return o.Decoration.inline(e.from,e.to,e.attrs)});return o.DecorationSet.create(e.doc,t)}}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),l=n(5),u=/\s+/g,c=/text-align/;t.spacesFix=function(){return new r.Plugin({key:new r.PluginKey("spaces-fix"),props:{decorations:function(e){var r,o,i,s,a=[],e=e.doc;return e.nodesBetween(0,e.content.size,function(e,t,n){if(e.type.isText&&c.test(n&&n.attrs&&n.attrs.style||""))for(o=u.exec(e.text||"");null!==o;){if(r=t+o.index,i=o[0].length,o.index+i<o.input.length)for(s=0;s<=i-1;s+=2)a.push(l.Decoration.inline(r+s,r+s+1,{style:"white-space: normal"}));o=u.exec(e.text||"")}}),l.DecorationSet.create(e,a)}}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(5);t.placeholder=function(e){var r={class:"k-placeholder","data-placeholder":e};return new o.Plugin({key:new o.PluginKey("placeholder"),props:{decorations:function(e){var t=e.doc,e=t.content.firstChild;if(!(0===t.childCount||1===t.childCount&&e.inlineContent&&0===e.childCount))return i.DecorationSet.empty;var n=[];return t.descendants(function(e,t){n.push(i.Decoration.node(t,t+e.nodeSize,r))}),i.DecorationSet.create(t,n)}}})}},function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var l=t(1),k=t(0);a.findAt=function(i,e,s,a,l){var u,c,d,f,p,m,g=[],h=[],t=e.matchCase,v=e.matchWord,n=e.useRegExp,e=e.text;if(n&&(/^\\$/.test(e)||/[^\\]\\$/.test(e))&&(e=e.substring(0,e.length-1)),!e)return g;var t=t?"g":"gi",y=n?new RegExp(e,t):o(e,t);return i.nodesBetween(s,a,function(e,o,t){return!l(g)&&void(e.inlineContent&&o+e.content.size>=s&&(h.length=0,e.nodesBetween(0,e.content.size,function(e,t,n,r){if(l(g))return!1;t=1+o+t;if(e.isText&&t+e.nodeSize>=s){if(p=e.text||"",m=n.childCount-1>=r+1&&n.child(r+1),h.push(s<=t?{text:p,start:t}:{text:p.slice(s-t),start:s}),!m||!m.isText)for(c=h.map(function(e){return e.text}).join(""),u=y.exec(c);null!==u&&(d=h[0].start+u.index,f=d+u[0].length,s<=d&&f<=a&&M(u,v)&&g.push(k.TextSelection.create(i,d,f)),!l(g));)u=y.exec(c)}else h.length=0})))}),g},a.find=function(e,t){var n=t.backward,r=t.matchCyclic,o=l.__rest(t,["backward","matchCyclic"]),i=n?function(){return!1}:function(e){return 0<e.length},s=e.doc,t=e.selection,e=[];return n?!(e=a.findAt(s,o,0,t.from,i)).length&&r&&(e=a.findAt(s,o,t.from,s.content.size,i)):!(e=a.findAt(s,o,t.to,s.content.size,i)).length&&r&&(e=a.findAt(s,o,0,t.to,i)),e.length?e[e.length-1]:null},a.findAll=function(e,t){return a.findAt(e,t,0,e.content.size,function(){return!1})},a.replace=function(e,t,n){var r=e.from,e=e.to;return n.insertText(t,r,e).setSelection(k.TextSelection.create(n.doc,r,r+t.length)),n},a.replaceAll=function(e,t,n){var r=a.findAll(e.doc,n);if(0===r.length)return null;for(var o=e.tr,i=r.length-1;0<=i;i--)o.insertText(t,r[i].from,r[i].to);return o};var r=/^[\s0-9~`!@#$%\^&*\(\)_\-=+\\|\[\]{};:'"\?/.,<>]?$/,M=function(e,t){if(t){if(!0!==t)return t(e);var n=e.input,t=n.charAt(e.index-1),e=n.charAt(e.index+e[0].length);return r.test(t)&&r.test(e)}return!0},o=function(e,t){e=e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/\s/g,"\\s");return new RegExp(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=function(e,t,n){for(var r,o=e.table,i=e.table_row,s=e.table_cell,a=[],l=0;l<t+1;l++){r=[];for(var u=0;u<n+1;u++)r.push(s.createAndFill());a.push(i.createAndFill(void 0,r))}return o.createAndFill(void 0,a)}},function(e,s,t){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r=t(11);s.sanitize=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/^[\s\S]+?<!--StartFragment-->\s*([\s\S]*?)\s*<!--EndFragment-->[\s\S]+$/,"$1")).replace(/<\/?[ovw]:[^>]*?>/gi,"")).replace(/<\\?\??xml[^>]*>/gi,"")).replace(/<(?:link|meta) [^>]+?>/gi,"")).replace(/<style[^>]*?>\s*<\/style>/gi,"")).replace(/<\/?st1:.*?>/gi,"")).replace(/<a name="[a-zA-Z0-9_]+">/gim,"")).replace(/v:shapes?="[^"]+"/gi,"")).replace(/<!\[if !supportLists\]>/gi,"")).replace(/<!\[endif\]>/gi,"")},s.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},s.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},s.removeAttribute=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},s.sanitizeClassAttr=function(e){/^Mso/.test(e.value)&&s.removeAttribute(e)};var a=/\s*;\s*/,l=/\s*:\s*/;s.sanitizeStyleAttr=function(e){var t,n,r=e.value.split(a).filter(function(e){return Boolean(e)}),o=e.ownerElement.style,i="";r.forEach(function(e){e=e.split(l);t=e[0],n=e[1],void 0!==o[t]&&(i+=t+": "+n+"; ")}),(i=i.trim())?e.value=i:s.removeAttribute(e)},s.pasteCleanup=function(e,t){var n=e;return t.convertMsLists&&(n=r.convertMsLists(n)),t.stripTags&&(n=s.removeTag(n,t.stripTags)),t.attributes&&((e=document.createElement("div")).innerHTML=n,Array.from(e.querySelectorAll("*")).forEach(function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var n=e.attributes.length-1;0<=n;n--){var r=e.attributes[n];t[r.name]?t[r.name](r):t["*"]&&t["*"](r)}"SPAN"===e.nodeName&&0===e.attributes.length&&function(e){var t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}(e)}}(e,t.attributes)}),n=e.innerHTML),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8),o=n(14),i=n(13),s=n(16),a=n(12),l=n(10),u="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var n,t={};return t["Mod-z"]=o.undo,t["Shift-Mod-z"]=o.redo,t.Backspace=r.chainCommands(i.undoInputRule,r.deleteSelection,r.joinBackward,r.selectNodeBackward),t.Enter=r.chainCommands(r.newlineInCode,r.createParagraphNear,r.liftEmptyBlock,r.splitBlockKeepMarks),u||(t["Mod-y"]=o.redo),e.marks.strong&&(t["Mod-b"]=l.toggleInlineFormat(a.bold)),e.marks.em&&(t["Mod-i"]=l.toggleInlineFormat(a.italic)),e.marks.underline&&(t["Mod-u"]=l.toggleInlineFormat(a.underline)),e.nodes.hard_break&&(n=e.nodes.hard_break,e=r.chainCommands(r.exitCode,function(e,t){return t(e.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0}),t["Shift-Enter"]=e),t},t.buildListKeymap=function(e){var t={};return e.nodes.list_item&&(t.Enter=s.splitListItemKeepMarks(e.nodes.list_item)),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e){for(var t,n={},r=e.attributes,o=0;o<r.length;o++)n[(t=r[o]).name]=t.value;return n}function o(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return 1}function i(e,t){var n,r={};for(n in e)n&&null!==e[n]&&n!==t&&(r[n]=e[n]);return r}var s=n(1),a=n(15),l=["blockquote",0],u=["hr"],c=["pre",["code",0]],d=["ol",0],f=["ul",0],p=["li",0],n=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},n=s.__assign({link:{attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:r}],toDOM:function(e){return["a",i(e.attrs),0]}}},n("strong"),n("b"),n("em"),n("i"),n("u"),n("del"),n("sub"),n("sup"),n("code"),{style:{attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["span",i(e.attrs),0]:["span",0]}}});t.marks=n;a=s.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["p",i(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["div",i(e.attrs),0]:["div",0]}},blockquote:{attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return l}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return u}},heading:{attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return s.__assign({},r(e),{level:1})}},{tag:"h2",getAttrs:function(e){return s.__assign({},r(e),{level:2})}},{tag:"h3",getAttrs:function(e){return s.__assign({},r(e),{level:3})}},{tag:"h4",getAttrs:function(e){return s.__assign({},r(e),{level:4})}},{tag:"h5",getAttrs:function(e){return s.__assign({},r(e),{level:5})}},{tag:"h6",getAttrs:function(e){return s.__assign({},r(e),{level:6})}}],toDOM:function(e){return o(e.attrs,"level")?["h"+e.attrs.level,i(e.attrs,"level"),0]:["h"+e.attrs.level,0]}},code_block:{content:"text*",marks:"",group:"block",code:!0,defining:!0,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return c}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:s.__assign({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["img",i(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["br",i(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return s.__assign({},r(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?o(e.attrs,"order")?["ol",i(e.attrs,"order"),0]:d:["ol",s.__assign({},i(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["ul",i(e.attrs),0]:f}},list_item:{content:"block*",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["li",i(e.attrs),0]:p},defining:!0}},a.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e,t){return{name:e,value:t}}t.alignLeftRules=[{node:"paragraph",style:[r("text-align","left")]},{node:"heading",style:[r("text-align","left")]}],t.alignRightRules=[{node:"paragraph",style:[r("text-align","right")]},{node:"heading",style:[r("text-align","right")]}],t.alignCenterRules=[{node:"paragraph",style:[r("text-align","center")]},{node:"heading",style:[r("text-align","center")]}],t.alignJustifyRules=[{node:"paragraph",style:[r("text-align","justify")]},{node:"heading",style:[r("text-align","justify")]}],t.alignRemoveRules=[{node:"paragraph",style:[r("text-align","")]},{node:"heading",style:[r("text-align","")]}]},function(e,o,t){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var i=t(9),s=t(18),l=t(6),a=t(3);o.indentBlocks=function(s,r,a){return function(e,t){var n=l.blockNodes(e),i=e.tr;i.setMeta("commandName",r),n.forEach(function(t){var e,n,r,o;t.type.isTextblock&&(e=void 0,(n=s.find(function(e){return e.node===t.type.name}))&&(r={name:o="rtl"===a?n.rtlStyle:n.style,value:0<n.step?""+n.step+n.unit:""},t.attrs.style&&(o=new RegExp(o+":\\s?(\\d+)"+n.unit,"i"),(o=t.attrs.style.match(o))&&(o=(o=parseFloat(o[1])+n.step)<=0?"":o,r.value=""+o+(o?n.unit:""))),e=l.addStyles(t,[r])),e&&l.changeTextBlock(i,t,t.type,e))});n=i.docChanged;return n&&t(i.scrollIntoView()),n}},o.isIndented=function(e,r,o){var i=!1;return l.blockNodes(e).forEach(function(t){var e,n;i||!t.type.isTextblock||!t.attrs.style||(n=r.find(function(e){return e.node===t.type.name}))&&(e="rtl"===o?n.rtlStyle:n.style,n=new RegExp(e+":\\s?\\d+"+n.unit,"i"),i=n.test(t.attrs.style))}),i},o.canIndentAsListItem=function(e,t){return i.sinkListItem(t)(e)},o.canOutdentAsListItem=function(e,t){var n=e.schema.nodes[t.listsTypes.listItem],r=e.schema.nodes[t.listsTypes.orderedList],t=e.schema.nodes[t.listsTypes.bulletList],r=!!a.findNthParentNodeOfType(r,2)(e.selection),t=!!a.findNthParentNodeOfType(t,2)(e.selection);return(r||t)&&i.liftListItem(n)(e)},o.canBeIndented=function(t,e){var n=t.schema.nodes,r=n[s.indentRules.listsTypes.listItem];return(o.isIndented(t,e.nodes)||s.indentRules.nodes.some(function(e){return n[e.node]&&l.hasNode(t,n[e.node])}))&&!l.hasNode(t,r)},o.indent=function(e,t){var n=e.schema.nodes[s.indentRules.listsTypes.listItem],r=o.canBeIndented(e,s.indentRules);o.canIndentAsListItem(e,n)?i.sinkListItem(n)(e,t):r&&o.indentBlocks(s.indentRules.nodes)(e,t)},o.outdent=function(e,t){var n=e.schema.nodes[s.outdentRules.listsTypes.listItem],r=o.canBeIndented(e,s.outdentRules);o.canOutdentAsListItem(e,s.outdentRules)?i.liftListItem(n)(e,t):r&&o.indentBlocks(s.outdentRules.nodes)(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=n(6),a=n(7);t.cleanFormatting=function(i){return void 0===i&&(i={blocksInSelection:!0}),function(e,t){var n=e.tr,r=i.blocksInSelection,o=i.blockNodeType,e=(i.exceptMarks||[e.schema.marks.link]).filter(Boolean);a.cleanMarks(n,{except:e}),s.cleanTextBlockFormatting(n,{blocksInSelection:r,blockNodeType:o});o=n.docChanged;return o&&t&&t(n),o}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=n(6);t.alignBlocks=function(o,i){return function(e,t){var n=s.blockNodes(e),r=e.tr;r.setMeta("commandName",i),n.forEach(function(t){var e,n;t.type.isTextblock&&(e={},(n=o.find(function(e){return e.node===t.type.name}))&&(e=s.addStyles(t,n.style)),s.changeTextBlock(r,t,t.type,e))});n=r.docChanged;return n&&t(r.scrollIntoView()),n}},t.isAligned=function(e,n){var r=!1;return s.blockNodes(e).forEach(function(t){var e;r||!t.type.isTextblock||!t.attrs.style||(e=n.find(function(e){return e.node===t.type.name}))&&(r=e.style.every(function(e){return!!e.value&&new RegExp(e.name+":\\s?"+e.value,"i").test(t.attrs.style)}))}),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(3);t.insertImage=function(r){return function(e,t){var n=e.schema.nodes.image.createAndFill(r);o.insertNode(n)(e,function(e){return t(e.setMeta("commandName","insertImage").setMeta("args",r))})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(n){return function(e,t){t(e.tr.insertText(n.text,n.from,n.to))}}},function(e,c,t){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var g=t(10),h=t(7),d=t(0);c.removeLink=function(f,p){return function(e,t){var n=e.selection.$cursor;if(n){for(var r,o=n.parent,i=n.index(),s=e.schema.marks[f.mark],a=o.child(i).marks.find(function(e){return e.type===s}),l=o.childCount,u=n.pos-n.textOffset,c=o.child(i).nodeSize,d=void 0,d=i-1;0<=d&&a.isInSet(o.child(d).marks);)c+=r=o.child(d).nodeSize,u-=r,--d;for(d=i+1;d<l&&a.isInSet(o.child(d).marks);)c+=o.child(d).nodeSize,d+=1;t(h.removeMark(p||e.tr,u,u+c,a))}else g.toggleInlineFormat(f,p)(e,t)}},c.applyLink=function(e,a){var l=e.mark,u=e.attrs;return void 0===a&&(a="link"),function(t,e){var n=t.schema.marks,r=t.tr;a&&(r.setMeta("commandName",a),r.setMeta("args",u));function o(){return s=!0}var i,p,m,s=!1;return!function(e){e=h.selectionMarks(t,e);return 1===e.length&&e[0]&&e[0]}(n[l])?(i=t,h.hasMark(t,{mark:l})&&(c.removeLink({mark:l,attrs:u},r)(t,o),i=d.EditorState.create({doc:r.doc,selection:r.selection})),(s?h.toggleMark(n[l],u,r):g.toggleInlineFormat({mark:l},r,u))(i,o)):(p={mark:l,attrs:u},m=r,function(e,n){var t=(o=e.selection).$cursor,r=o.from,o=o.to,i=e.schema.marks[p.mark];if(t){for(var s,a=t.parent,e=t.index(),l=a.child(e).marks.find(function(e){return e.type===i}),u=a.childCount,c=t.pos-t.textOffset,d=a.child(e).nodeSize,f=void 0,f=e-1;0<=f&&l.isInSet(a.child(f).marks);)d+=s=a.child(f).nodeSize,c-=s,--f;for(f=e+1;f<u&&l.isInSet(a.child(f).marks);)d+=a.child(f).nodeSize,f+=1;m.removeMark(c,c+d,i),m.addMark(c,c+d,i.create(p.attrs)),n(m)}else m.doc.nodesBetween(r,o,function(e,t){e.isInline&&i.isInSet(e.marks)&&(m.removeMark(t,t+e.nodeSize,i),m.addMark(t,t+e.nodeSize,i.create(p.attrs)),n(m))})}(t,o)),s&&e(r),s}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(19);t.getHtml=o.getHtml,t.setHtml=o.setHtml,t.parseContent=o.parseContent;o=n(10);t.applyInlineStyle=o.applyInlineStyle,t.getInlineStyles=o.getInlineStyles,t.toggleInlineFormat=o.toggleInlineFormat;o=n(37);t.applyLink=o.applyLink,t.removeLink=o.removeLink;o=n(36);t.insertText=o.insertText;o=n(35);t.insertImage=o.insertImage;o=n(34);t.alignBlocks=o.alignBlocks,t.isAligned=o.isAligned;o=n(33);t.cleanFormatting=o.cleanFormatting;o=n(6);t.hasNode=o.hasNode,t.activeNode=o.activeNode,t.formatBlockElements=o.formatBlockElements,t.getBlockFormats=o.getBlockFormats,t.parentBlockFormat=o.parentBlockFormat,t.changeTextBlock=o.changeTextBlock,t.blockNodes=o.blockNodes,t.cleanTextBlockFormatting=o.cleanTextBlockFormatting;o=n(7);t.hasMark=o.hasMark,t.getMark=o.getMark,t.getActiveMarks=o.getActiveMarks,t.removeAllMarks=o.removeAllMarks,t.cleanMarks=o.cleanMarks,t.selectionMarks=o.selectionMarks;o=n(32);t.indent=o.indent,t.canIndentAsListItem=o.canIndentAsListItem,t.outdent=o.outdent,t.canOutdentAsListItem=o.canOutdentAsListItem,t.isIndented=o.isIndented,t.canBeIndented=o.canBeIndented,t.indentBlocks=o.indentBlocks;o=n(16);t.toggleOrderedList=o.toggleOrderedList,t.toggleUnorderedList=o.toggleUnorderedList,t.toggleList=o.toggleList;o=n(3);t.hasSameMarkup=o.hasSameMarkup,t.getSelectionText=o.getSelectionText,t.getNodeFromSelection=o.getNodeFromSelection,t.selectedLineTextOnly=o.selectedLineTextOnly,t.canInsert=o.canInsert,t.insertNode=o.insertNode,t.indentHtml=o.indentHtml;o=n(31);t.alignLeftRules=o.alignLeftRules,t.alignCenterRules=o.alignCenterRules,t.alignRightRules=o.alignRightRules,t.alignJustifyRules=o.alignJustifyRules,t.alignRemoveRules=o.alignRemoveRules;o=n(18);t.indentRules=o.indentRules,t.outdentRules=o.outdentRules;o=n(30);t.nodes=o.nodes,t.marks=o.marks;o=n(29);t.buildKeymap=o.buildKeymap,t.buildListKeymap=o.buildListKeymap;o=n(12);t.bold=o.bold,t.italic=o.italic,t.underline=o.underline,t.strikethrough=o.strikethrough,t.subscript=o.subscript,t.superscript=o.superscript,t.link=o.link;o=n(28);t.sanitize=o.sanitize,t.removeComments=o.removeComments,t.removeTag=o.removeTag,t.pasteCleanup=o.pasteCleanup,t.sanitizeClassAttr=o.sanitizeClassAttr,t.sanitizeStyleAttr=o.sanitizeStyleAttr,t.removeAttribute=o.removeAttribute;o=n(11);t.convertMsLists=o.convertMsLists;o=n(27);t.createTable=o.createTable;o=n(26);t.find=o.find,t.findAt=o.findAt,t.findAll=o.findAll,t.replace=o.replace,t.replaceAll=o.replaceAll;o=n(25);t.placeholder=o.placeholder;o=n(24);t.spacesFix=o.spacesFix;o=n(23);t.textHighlight=o.textHighlight,t.textHighlightKey=o.textHighlightKey,r.__exportStar(n(8),t),r.__exportStar(n(22),t),r.__exportStar(n(21),t),r.__exportStar(n(14),t),r.__exportStar(n(13),t),r.__exportStar(n(20),t),r.__exportStar(n(2),t),r.__exportStar(n(9),t),r.__exportStar(n(0),t),r.__exportStar(n(15),t),r.__exportStar(n(4),t),r.__exportStar(n(5),t),function(e){for(var t in e)i(t,e[t])}(t)}],r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=38)}}}); | ||
System.register("@progress/kendo-editor-common",["tslib","prosemirror-commands","prosemirror-dropcursor","prosemirror-gapcursor","prosemirror-history","prosemirror-inputrules","prosemirror-keymap","prosemirror-model","prosemirror-schema-list","prosemirror-state","prosemirror-tables","prosemirror-transform","prosemirror-view"],function(i){var s,a,l,u,c,d,f,p,m,g,h,v,y;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){s=t(e)},function(e){a=t(e)},function(e){l=t(e)},function(e){u=t(e)},function(e){c=t(e)},function(e){d=t(e)},function(e){f=t(e)},function(e){p=t(e)},function(e){m=t(e)},function(e){g=t(e)},function(e){h=t(e)},function(e){v=t(e)},function(e){y=t(e)}],execute:function(){function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var n,o;o={},r.m=n=[function(e,t){e.exports=g},function(e,t){e.exports=s},function(e,t){e.exports=p},function(e,l,t){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var o=t(2),n=t(0),i=t(19);l.changeStylesString=function(e,t){var n=t.style,r=t.value,o=t.newValue;if(!e)return{changed:!1,style:null};t=e.split(/\s*;\s*/).filter(function(e){return Boolean(e)}),e=t.filter(function(e){e=e.split(/\s*:\s*/);return!(e[0].toLowerCase()===n&&r.test(e[1]))});return o&&e.push(n+": "+o),{style:e.join("; ")+(e.length?";":""),changed:Boolean(o)||e.length!==t.length}},l.canInsert=function(e,t){for(var n=e.selection.$from,r=n.depth;0<=r;r--){var o=n.index(r);if(n.node(r).canReplaceWith(o,o,t))return!0}return!1};function s(e){return(e instanceof o.Node?e.type:e).name}l.findNthParentNodeOfType=function(i,t){return void 0===t&&(t=1),function(e){return void 0===(o=t)&&(o=1),function(e){for(var t=e.$from,n=t.depth;0<n;n--){var r=t.node(n);if(s(r)===s(i)&&0==--o)return{depth:n,node:r}}}(e);var o}},l.insertNode=function(n,r){return function(e,t){e=e.tr.replaceSelectionWith(n);r&&e.scrollIntoView(),t(e)}},l.hasSameMarkup=function(e,t,n,r){e=o.Fragment.from(i.parseContent(e,n,r)),r=o.Fragment.from(i.parseContent(t,n,r));return e.eq(r)},l.getSelectionText=function(e){e=e.selection;if(e instanceof n.TextSelection||e instanceof n.AllSelection){e=e.content().content;return e.textBetween(0,e.size)}return""},l.getNodeFromSelection=function(e){if(e.selection instanceof n.NodeSelection)return e.selection.node},l.selectedLineTextOnly=function(e){var t="",n=!1,r=e.selection,o=e.doc,i=r.$from,s=r.$to,a=r.from,r=r.to;return i.sameParent(s)&&(o.nodesBetween(a,r,function(e){n=n||e.isLeaf&&!e.isText}),n||(t=l.getSelectionText(e))),t},l.indentHtml=function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")},l.shallowEqual=function(t,n){var e=Object.keys(t),r=Object.keys(n);return e.length===r.length&&e.every(function(e){return t[e]===n[e]})}},function(e,t){e.exports=v},function(e,t){e.exports=y},function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var l=t(1),o=t(3),u=t(4),c=t(2),i=t(0);a.changeTextBlock=function(i,s,a,l){if(!a.isTextblock)return!1;i.selection.ranges.forEach(function(e){var o=i.steps.length,t=e.$from.pos,e=e.$to.pos;i.doc.nodesBetween(t,e,function(e,t){if(e.eq(s)&&e.isTextblock&&!e.hasMarkup(a,l)&&function(e,t,n){e=e.resolve(t),t=e.index();return e.parent.canReplaceWith(t,t+1,n)}(i.doc,i.mapping.slice(o).map(t),a)){i.clearIncompatible(i.mapping.slice(o).map(t,1),a);var n=i.mapping.slice(o),r=n.map(t,1),t=n.map(t+e.nodeSize,1),e=new c.Slice(c.Fragment.from(a.create(l,null,e.marks)),0,0);return i.step(new u.ReplaceAroundStep(r,t,r+1,t-1,e,1,!0)),!1}})})},a.blockNodes=function(e,t){void 0===t&&(t={blocksInSelection:!1});var n=e.doc,r=e.selection,o=r.$from,e=r.ranges,s=t.blocksInSelection,a=[],r=r instanceof i.NodeSelection?r.node:void 0;return r?r.isBlock?(a.push(r),r.nodesBetween(0,r.content.size,function(e){e.isBlock&&a.push(e)})):!s&&o.parent&&o.parent.isBlock&&a.push(o.parent):e.forEach(function(e){var o=e.$from.pos,i=e.$to.pos;n.nodesBetween(o,i,function(e,t,n,r){e.isBlock&&(!s||o<=t&&t+e.content.size+2<=i)&&a.push(e)})}),a},a.formatBlockElements=function(s,r){return function(e,t){var n=a.blockNodes(e),o=e.schema.nodes,i=e.tr;i.setMeta("commandName",r),i.setMeta("args",{value:s}),n.forEach(function(e){var t,n,r;e.type.isTextblock&&("p"===s?(n=(t=e.attrs).level,r=l.__rest(t,["level"]),a.changeTextBlock(i,e,o.paragraph,r)):/^h[1-6]$/i.test(s)?(n=parseInt(s.substr(1),10),a.changeTextBlock(i,e,o.heading,l.__assign({},e.attrs,{level:n}))):"blockquote"===s&&(n=(t=e.attrs).level,r=l.__rest(t,["level"]),a.changeTextBlock(i,e,o.blockquote,r)))});n=i.docChanged;return n&&t(i.scrollIntoView()),n}},a.cleanTextBlockFormatting=function(i,e){void 0===e&&(e={blocksInSelection:!0});var t=i.doc,n=i.selection,r=e.blocksInSelection,s=e.blockNodeType;a.blockNodes({doc:t,selection:n},{blocksInSelection:r}).filter(function(e){return e.isTextblock}).forEach(function(e){var t=e.attrs||{},n=t.style,r=void 0===n?"":n,o=t.class,n=void 0===o?"":o,o=l.__rest(t,["style","class"]),t=s||e.type;(r||n||t!==e.type)&&a.changeTextBlock(i,e,t,o)})},a.getBlockFormats=function(e){var t=a.blockNodes(e),n=e.schema.nodes,r=[];return t.forEach(function(e){e.type===n.paragraph?r.push("p"):e.type===n.heading?r.push("h"+e.attrs.level):e.type===n.blockquote&&r.push("blockquote")}),r},a.addStyles=function(e,t){var n,r=e.attrs.style;return r&&t.forEach(function(e){n={style:e.name,value:/^.+$/,newValue:e.value},n=o.changeStylesString(r,n),r=n.changed?n.style:r}),r=r||t.reduce(function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""},""),Object.assign({},e.attrs,{style:r||null})},a.hasNode=function(e,t){var n=e.selection,r=n.from,n=n.to,o=!1;return e.doc.nodesBetween(r,n,function(e){return!(o=o||e.type===t)}),o},a.parentBlockFormat=function(e){e=a.getBlockFormats(e);return 1===new Set(e).size?e[0]:null},a.activeNode=function(e){return{tag:a.parentBlockFormat(e)||""}}},function(e,g,t){"use strict";Object.defineProperty(g,"__esModule",{value:!0});var n=t(4),h=t(2);g.markApplies=function(r,o,i){for(var e=0;e<o.length;e++){var t=function(e){var t=o[e],e=t.$from,t=t.$to,n=0===e.depth&&r.type.allowsMarkType(i);if(r.nodesBetween(e.pos,t.pos,function(e){return!n&&void(n=e.inlineContent&&e.type.allowsMarkType(i))}),n)return{v:!0}}(e);if(t)return t.v}return!1},g.toggleMark=function(f,p,m){return function(e,t){var n=e.selection,r=n.empty,o=n.$cursor,i=n.ranges;if(r&&!o||!g.markApplies(e.doc,i,f))return!1;if(t)if(o)f.isInSet(e.storedMarks||o.marks())?t(m.removeStoredMark(f)):t(m.addStoredMark(f.create(p)));else{for(var s=!1,a=0;!s&&a<i.length;a++)var l=i[a],u=l.$from,c=l.$to,s=e.doc.rangeHasMark(u.pos,c.pos,f);for(a=0;a<i.length;a++){var d=i[a],u=d.$from,c=d.$to;s?m.removeMark(u.pos,c.pos,f):m.addMark(u.pos,c.pos,f.create(p))}t(m.scrollIntoView())}return!0}},g.removeMark=function(t,c,d,f){void 0===f&&(f=null);var p=[],m=0;return t.doc.nodesBetween(c,d,function(e,t){if(e.isInline){m++;var n,r=null;if(f instanceof h.MarkType?(n=f.isInSet(e.marks))&&(r=[n]):f?f.isInSet(e.marks)&&(r=[f]):r=e.marks,r&&r.length)for(var o=Math.min(t+e.nodeSize,d),i=0;i<r.length;i++){for(var s=r[i],a=void 0,l=0;l<p.length;l++){var u=p[l];u.step===m-1&&s.eq(u.style)&&(a=u)}a?(a.to=o,a.step=m):p.push({style:s,from:Math.max(t,c),to:o,step:m})}}}),p.forEach(function(e){return t.step(new n.RemoveMarkStep(e.from,e.to,e.style))}),t},g.removeMarks=function(r,t,n,o){var e=t.selection,i=e.$cursor,s=e.ranges;if(o=o||t.tr,i)r.forEach(function(e){e.isInSet(t.storedMarks||i.marks())&&n(o.removeStoredMark(e))});else{for(var a=0;a<s.length;a++)!function(e){var t=(e=s[e]).$from,n=e.$to;r.forEach(function(e){g.removeMark(o,t.pos,n.pos,e)})}(a);n(o.scrollIntoView())}return!0},g.removeAllMarks=function(e){var e=(void 0===e?{}:e).except,n=void 0===e?[]:e;return function(e,t){e=e.tr;g.cleanMarks(e,{except:n instanceof Array?n:[n]}),e.docChanged&&t(e)}},g.cleanMarks=function(r,e){var o,t=e.except,n=r.doc,e=r.selection,i=n.type.schema,n=e.empty,e=e.ranges,s=(t||[]).map(function(e){return e.name});n||(o=Object.keys(i.marks).map(function(e){return i.marks[e]}).filter(function(e){return-1===s.indexOf(e.name)}),e.forEach(function(e){var t=e.$from,n=e.$to;o.forEach(function(e){return r.removeMark(t.pos,n.pos,e)})}))},g.hasMark=function(e,t){var n,r=e.schema.marks,o=(t.altMarks||[]).filter(function(e){return r[e]}),i=t.altStyle,s=e.selection,a=s.from,l=s.$from,u=s.to,c=s.empty,s=r[t.mark],d=e.doc,t=!1;return!(t=c?(n=e.storedMarks||l.marks(),s&&s.isInSet(n)||o.some(function(e){return r[e].isInSet(n)})):s&&d.rangeHasMark(a,u,s)||o.some(function(e){return d.rangeHasMark(a,u,r[e])}))&&i&&r.style?g.selectionMarks(e,r.style).some(function(e){return null!==g.styleValue(e,i)}):Boolean(t)},g.styleValue=function(e,t){for(var n=(e&&e.attrs.style||"").split(/\s*;\s*/).filter(function(e){return Boolean(e)}),r=0;r<n.length;r++){var o=n[r].split(/\s*:\s*/);if(o[0].toLowerCase()===t.name&&t.value.test(o[1]))return o[1]}return null},g.selectionMarks=function(e,t){var n=e.selection,r=n.from,o=n.$from,i=n.to,s=[];return n.empty?s.push(t.isInSet(e.storedMarks||o.marks())):e.doc.nodesBetween(r,i,function(e){e.isInline&&s.push(t.isInSet(e.marks))}),s},g.getMark=function(e,t){e=g.selectionMarks(e,t),t=e.filter(function(e){return Boolean(e)});return e.length===t.length?e[0]:void 0},g.getActiveMarks=function(e,t){e=g.selectionMarks(e,t),t=e.filter(function(e){return Boolean(e)});return{hasNodesWithoutMarks:e.length!==t.length,marks:t}}},function(e,t){e.exports=a},function(e,t){e.exports=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function y(e,t){return e=(e=e.find(function(e){return"style"===e.type.name}))&&e.attrs.style,m.changeStylesString(e,t)}var k=n(1),M=n(4),m=n(3),g=n(7);t.getInlineStyles=function(e,t){var n=e.schema.marks.style;return(n?g.selectionMarks(e,n):[]).map(function(e){return g.styleValue(e,t)}).filter(function(e){return null!==e})};function f(f,p){return function(e,t,n){var r=e.selection,o=r.empty,i=r.$cursor,s=r.ranges;if(o&&!i||!g.markApplies(e.doc,s,f))return!1;var a=!1;if(t)if(n=n||e.tr,i){e=e.storedMarks||i.marks();if(f.isInSet(e)){var i=y(e,p),e=e.find(function(e){return"style"===e.type.name}),l=k.__assign({},e?e.attrs:{},{style:i.style||null});if(m.shallowEqual(e.attrs,l))return!1;t(n.removeStoredMark(f)),Object.keys(l).some(function(e){return null!==l[e]})&&t(n.addStoredMark(f.create(l))),a=!0}}else{for(var u=0;u<s.length;u++)var c=s[u],d=c.$from,c=c.$to,a=function(t,u,c,d,f){var p=f.create({style:d.style}),m=[],g=[],h=null,v=null;return t.doc.nodesBetween(u,c,function(e,t,n){if(e.isInline){var r=e.marks;if(!p.isInSet(r)&&n.type.allowsMarkType(p.type)){var o=Math.max(t,u),i=Math.min(t+e.nodeSize,c),n=y(r,d);if(n.changed||d.newValue){for(var t=n.changed?{style:n.style||null}:{style:[d.style]+": "+d.newValue+";"},e=f.isInSet(r)?r.find(function(e){return"style"===e.type.name}):null,s=e?k.__assign({},e.attrs,t):t,n=f.create(s),a=n.addToSet(r),l=0;l<r.length;l++)r[l].isInSet(a)||(h&&h.to===o&&h.mark.eq(r[l])?h.to=i:(h=new M.RemoveMarkStep(o,i,r[l]),m.push(h)));e=v&&v.to===o,t=e&&n.attrs.style===v.mark.attrs.style;e&&t?v.to=i:Object.keys(s).some(function(e){return null!==s[e]})&&(v=new M.AddMarkStep(o,i,n),g.push(v))}}}}),m.forEach(function(e){return t.step(e)}),g.forEach(function(e){return t.step(e)}),0<m.length+g.length}(n,d.pos,c.pos,p,f);a&&(n.scrollIntoView(),t(n))}return a}}t.toggleInlineFormat=function(u,c,d){return function(t,e){var n=t.schema.marks,r=u.altStyle,o=u.altMarks,i=void 0===o?[]:o,s=u.mark;c=c||t.tr;var a=!1,l=!1,o=function(){return l=!0};r&&n.style&&(a=f(n.style,{style:r.name,value:r.value})(t,o,c));i=[s].concat(i).filter(function(e){return n[e]}).map(function(e){return g.hasMark(t,{mark:e})&&n[e]}).filter(function(e){return e});return i.length?g.removeMarks(i,t,o,c):a||g.toggleMark(n[s],d,c)(t,o),l&&e(c),l}},t.applyInlineStyle=function(u,c){return function(e,t){var n=e.schema.marks.style,r={style:u.style,value:/^.+$/,newValue:u.value},o=e.tr;c&&o.setMeta("commandName",c),o.setMeta("args",u);var i=e.selection,s=i.empty,a=i.$cursor,i=i.ranges;if(s&&!a||!n||!g.markApplies(e.doc,i,n))return!1;if(a){s=e.storedMarks||a.marks(),i=n.isInSet(s)?s.find(function(e){return"style"===e.type.name}):null,a={style:null};i&&i.attrs.style?(s=m.changeStylesString(i.attrs.style,r)).changed&&s.style&&(a.style=s.style):r.newValue&&(a.style=[r.style]+": "+r.newValue+";");var l=i?k.__assign({},i.attrs,a):a;return Object.keys(l).some(function(e){return null!==l[e]})?t(o.addStoredMark(n.create(l))):t(o.removeStoredMark(n)),!0}return f(n,r)(e,t,o)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function v(e){return/^MsoListParagraph/.test(e.className)}function y(e){return(e=(e=e.innerHTML).replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")}function k(e,t){return(e=document.createElement(e)).style.listStyleType=t,e}var r=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,o=function(e,n){var r=[];Array.from(e).forEach(function(e){var t;e.nodeType===Node.ELEMENT_NODE&&((t=e).getAttribute("datalist")?(r.push(e),n.add(r)):v(t)&&r.length?r.push(e):(r=[],"DIV"===t.nodeName?o(t.children,n):"TABLE"===t.nodeName&&Array.from(t.querySelectorAll("td,th")).forEach(function(e){o(e.children,n)})))})};t.convertMsLists=function(e){var t=document.createElement("div");t.innerHTML=e.replace(r,function(e,t,n){return'datalist="'+t+'" datalevel="'+n+'" '+e});e=new Set;return o(t.children,e),e.forEach(function(e){for(var t,n,r,o,i,s,a,l,u,c=-1,d={},f=0;f<e.length;f++){var p,m,g=(p={datalist:(s=e[f]).getAttribute("datalist"),datalevel:s.getAttribute("datalevel")}).datalist,h=(h=u=l=void 0,u=function(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")},h=(h=(m=s).innerHTML).replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(h)?{tag:"ul",style:(l=u(y(m)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(l)?null:/^o/.test(l)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(h)?{tag:"ol",style:(u=u(y(m)),m=null,/^\d/.test(u)||(m=(/^[a-z]/.test(u)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(u)?"roman":"alpha")),m)}:void 0);(u=h&&h.tag)?(m=p.datalevel||parseFloat(s.style.marginLeft||0),(p.datalevel||s.style.marginLeft)&&(p=u+g,d[m]||(d[m]={}),(!n||n<0)&&(n=m,r=g,o=(i=e.filter(function(e){return e.getAttribute("datalist")===String(r)}))[i.length-1],a=k(u,h&&h.style),s.parentNode.insertBefore(a,s),d[c=m][p]=a),i=o===s,a=d[m][p],(c<m||!a)&&(a=k(u,h&&h.style),d[m][p]=a,t.appendChild(a)),t=function(e){var t=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),t=1===e.childNodes.length?e.firstChild.nodeType===Node.TEXT_NODE?y(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),"p"!==t?"<"+t+">"+e.innerHTML+"</"+t+">":e.innerHTML),e.parentNode.removeChild(e);e=document.createElement("li");return e.innerHTML=t,e}(s),a.appendChild(t),i?n=c=-1:c=m)):!t||i&&!v(s)||(s.style.marginLeft&&(s.style.marginLeft=""),s.style.marginLeft&&(s.style.margin=""),t.appendChild(s))}}),t.innerHTML}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bold={mark:"strong",altMarks:["b"],altStyle:{name:"font-weight",value:/^(bold(er)?|[5-9]\d{2,})$/}},t.italic={mark:"em",altMarks:["i"],altStyle:{name:"font-style",value:/^italic$/i}},t.underline={mark:"u",altStyle:{name:"text-decoration",value:/^underline$/i}},t.strikethrough={mark:"del",altStyle:{name:"text-decoration",value:/^line-through$/i}},t.subscript={mark:"sub"},t.superscript={mark:"sup"},t.link={mark:"link"},t.unlink={mark:"link"}},function(e,t){e.exports=d},function(e,t){e.exports=c},function(e,t){e.exports=h},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t(1),d=t(2),f=t(0),p=t(4),m=t(8),g=t(9),i=t(17);function c(d){return function(e,t,n){if(!n)return!1;var r,o,i=(e=n.state).schema.nodes[d.listType],s=e.selection,a=s.$from,l=s.$to,u=a.node(-2),c=a.node(-3),l=(s=e.doc,r=i,0===function(e,t,n){for(var r=Array(),o=function(e,t){var n=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;for(var r=t.node(t.depth),o=t;1<=t.depth;)(r=(t=e.resolve(t.before(t.depth))).node(t.depth))&&-1!==n.indexOf(r.type.name)&&(o=t);return o}(e,t).depth,i=e.resolve(t.start(o));i.pos<=n.start(n.depth);){var s=Math.min(i.depth,o),a=i.node(s);if(a&&r.push(a),0===s)break;a=e.resolve(i.after(s));if(a.start(s)>=e.nodeSize-2)break;a.depth!==i.depth&&(a=e.resolve(a.pos+2)),i=a.depth?e.resolve(a.start(a.depth)):e.resolve(a.end(a.depth))}return r}(s,a,l).filter(function(e){return e.type!==r}).length);return(u&&u.type===i||c&&c.type===i)&&l?h(d)(e,t):(l||(h(d)(e,t),e=n.state),o=i,m.autoJoin(g.wrapInList(o),function(e,t){return e.type===t.type&&e.type===o})(e,t))}}function h(i){return function(n,e){var r=n.tr,t=n.selection,o=t.$from,t=t.$to;return r.doc.nodesBetween(o.pos,t.pos,function(e,t){if(e.isTextblock||"blockquote"===e.type.name||"div"===e.type.name){e=new f.NodeSelection(r.doc.resolve(r.mapping.map(t))),t=e.$from.blockRange(e.$to);if(!t||e.$from.parent.type!==n.schema.nodes[i.listItem])return!1;e=t&&p.liftTarget(t);if(null==e)return!1;r.lift(t,e)}}),e&&e(r),!0}}r.toggleList=function(e,t,n,r,o){var i=r.listType,s=e.selection,a=s.$from.node(s.$from.depth-2),l=s.$to.node(s.$to.depth-2);if(a&&a.type.name===i&&l&&l.type.name===i){var i=n.state.schema.nodes,u={bulletList:i[r.bulletList],orderedList:i[r.orderedList],listItem:i[r.listItem]},i=function(e){for(var t,n=u.bulletList,r=u.orderedList,o=u.listItem,i=e.depth-1;0<i;i--){var s=e.node(i);if(s.type!==n&&s.type!==r||(t=i),s.type!==n&&s.type!==r&&s.type!==o)break}return t}(s.$to),i=function(i,s,e,a,l,u){u=u||i.schema.nodes.listItem;var c=!1;return l.doc.nodesBetween(s,e,function(e,t){if(!c&&e.type===u&&s<t){c=!0;for(var n=a+3;a+2<n;){var r=l.doc.resolve(l.mapping.map(t)),n=r.depth,o=l.doc.resolve(l.mapping.map(t+e.textContent.length)),o=new f.TextSelection(r,o);l=function(e,t,n,r){r=r||e.schema.nodes.listItem;var o=t.$from,i=t.$to;return!(e=o.blockRange(i,function(e){return e.childCount&&e.firstChild.type===r}))||e.depth<2||o.node(e.depth-1).type!==r?n:(t=e.end,i=i.end(e.depth),t<i&&(n.step(new p.ReplaceAroundStep(t-1,i,t,i,new d.Slice(d.Fragment.from(r.create(void 0,e.parent.copy())),1,0),1,!0)),e=new d.NodeRange(n.doc.resolve(o.pos),n.doc.resolve(i),e.depth)),n.lift(e,p.liftTarget(e)).scrollIntoView())}(i,o,l,u)}}}),l}(e,s.$to.pos,s.$to.end(i),i,n.state.tr,u.listItem);return(i=function(e,t,n){var r=e.selection,o=r.from,i=r.to,r=e.schema.nodes,s=r.paragraph,a=r.heading,l=[];t.doc.nodesBetween(o,i,function(e,t){e.type!==s&&e.type!==a||l.push({node:e,pos:t})});for(var u=l.length-1;0<=u;u--){var c,d=l[u],f=t.doc.resolve(t.mapping.map(d.pos));0<f.depth&&(c=void 0,c=d.node.textContent&&0<d.node.textContent.length?t.doc.resolve(t.mapping.map(d.pos+d.node.textContent.length)):t.doc.resolve(t.mapping.map(d.pos+1)),(c=f.blockRange(c))&&t.lift(c,function(e,t,n){for(var r=t.depth,o=e.nodes[n.bulletList],i=e.nodes[n.orderedList],s=e.nodes[n.listItem],a=t.depth;0<a;a--){var l=t.node(a);if(l.type!==o&&l.type!==i||(r=a),l.type!==o&&l.type!==i&&l.type!==s)break}return r-1}(e.schema,f,n)))}return t}(e,i,r)).setMeta("commandName",o),t(i),!0}return c(r)(e,t,n)},r.toggleUnorderedList=function(e,t,n){return r.toggleList(e,t,n,o.__assign({listType:i.bulletList.listType},i.bulletList.types))},r.toggleOrderedList=function(e,t,n){return r.toggleList(e,t,n,o.__assign({listType:i.orderedList.listType},i.orderedList.types))},r.splitListItemKeepMarks=function(e){return function(n,r){return g.splitListItem(e)(n,function(e){var t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();t&&e.ensureMarks(t),r(e)})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n=n(1);t.listsTypes={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},t.orderedList={listType:t.listsTypes.orderedList,types:n.__assign({},t.listsTypes)},t.bulletList={listType:t.listsTypes.bulletList,types:n.__assign({},t.listsTypes)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),n=n(17);t.indentRules={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"}],listsTypes:r.__assign({},n.listsTypes)},t.outdentRules={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"}],listsTypes:r.__assign({},n.listsTypes)}},function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=t(2),s=t(0);i.parseContent=function(e,t,n){var r=document.createElement("template"),e="content"in r?(r.innerHTML=e,r.content):(new DOMParser).parseFromString(e,"text/html").body||document.createDocumentFragment();return o.DOMParser.fromSchema(t).parse(e,n)},i.getHtml=function(e){var t=o.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),e=document.createElement("div");return e.appendChild(t),e.innerHTML},i.setHtml=function(n,r,o){return void 0===r&&(r="setHTML"),void 0===o&&(o={preserveWhitespace:"full"}),function(e,t){return t(e.tr.setSelection(new s.AllSelection(e.doc)).replaceSelectionWith(i.parseContent(n,e.schema,o)).setMeta("commandName",r))}}},function(e,t){e.exports=f},function(e,t){e.exports=u},function(e,t){e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(5);t.textHighlightKey=new r.PluginKey("highlight"),t.textHighlight=function(e){return void 0===e&&(e=t.textHighlightKey),new r.Plugin({key:e,state:{init:function(){return null},apply:function(e){return e.getMeta(this.spec.key)}},props:{decorations:function(e){var t=(this.spec.key.getState(e)||[]).map(function(e){return o.Decoration.inline(e.from,e.to,e.attrs)});return o.DecorationSet.create(e.doc,t)}}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),l=n(5),u=/\s+/g,c=/text-align/;t.spacesFix=function(){return new r.Plugin({key:new r.PluginKey("spaces-fix"),props:{decorations:function(e){var r,o,i,s,a=[],e=e.doc;return e.nodesBetween(0,e.content.size,function(e,t,n){if(e.type.isText&&c.test(n&&n.attrs&&n.attrs.style||""))for(o=u.exec(e.text||"");null!==o;){if(r=t+o.index,i=o[0].length,o.index+i<o.input.length)for(s=0;s<=i-1;s+=2)a.push(l.Decoration.inline(r+s,r+s+1,{style:"white-space: normal"}));o=u.exec(e.text||"")}}),l.DecorationSet.create(e,a)}}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(5);t.placeholder=function(e){var r={class:"k-placeholder","data-placeholder":e};return new o.Plugin({key:new o.PluginKey("placeholder"),props:{decorations:function(e){var t=e.doc,e=t.content.firstChild;if(!(0===t.childCount||1===t.childCount&&e.inlineContent&&0===e.childCount))return i.DecorationSet.empty;var n=[];return t.descendants(function(e,t){n.push(i.Decoration.node(t,t+e.nodeSize,r))}),i.DecorationSet.create(t,n)}}})}},function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var l=t(1),k=t(0);a.findAt=function(i,e,s,a,l){var u,c,d,f,p,m,g=[],h=[],t=e.matchCase,v=e.matchWord,n=e.useRegExp,e=e.text;if(n&&(/^\\$/.test(e)||/[^\\]\\$/.test(e))&&(e=e.substring(0,e.length-1)),!e)return g;var t=t?"g":"gi",y=n?new RegExp(e,t):o(e,t);return i.nodesBetween(s,a,function(e,o,t){return!l(g)&&void(e.inlineContent&&o+e.content.size>=s&&(h.length=0,e.nodesBetween(0,e.content.size,function(e,t,n,r){if(l(g))return!1;t=1+o+t;if(e.isText&&t+e.nodeSize>=s){if(p=e.text||"",m=n.childCount-1>=r+1&&n.child(r+1),h.push(s<=t?{text:p,start:t}:{text:p.slice(s-t),start:s}),!m||!m.isText)for(c=h.map(function(e){return e.text}).join(""),u=y.exec(c);null!==u&&(d=h[0].start+u.index,f=d+u[0].length,s<=d&&f<=a&&M(u,v)&&g.push(k.TextSelection.create(i,d,f)),!l(g));)u=y.exec(c)}else h.length=0})))}),g},a.find=function(e,t){var n=t.backward,r=t.matchCyclic,o=l.__rest(t,["backward","matchCyclic"]),i=n?function(){return!1}:function(e){return 0<e.length},s=e.doc,t=e.selection,e=[];return n?!(e=a.findAt(s,o,0,t.from,i)).length&&r&&(e=a.findAt(s,o,t.from,s.content.size,i)):!(e=a.findAt(s,o,t.to,s.content.size,i)).length&&r&&(e=a.findAt(s,o,0,t.to,i)),e.length?e[e.length-1]:null},a.findAll=function(e,t){return a.findAt(e,t,0,e.content.size,function(){return!1})},a.replace=function(e,t,n){var r=e.from,e=e.to;return n.insertText(t,r,e).setSelection(k.TextSelection.create(n.doc,r,r+t.length)),n},a.replaceAll=function(e,t,n){var r=a.findAll(e.doc,n);if(0===r.length)return null;for(var o=e.tr,i=r.length-1;0<=i;i--)o.insertText(t,r[i].from,r[i].to);return o};var r=/^[\s0-9~`!@#$%\^&*\(\)_\-=+\\|\[\]{};:'"\?/.,<>]?$/,M=function(e,t){if(t){if(!0!==t)return t(e);var n=e.input,t=n.charAt(e.index-1),e=n.charAt(e.index+e[0].length);return r.test(t)&&r.test(e)}return!0},o=function(e,t){e=e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/\s/g,"\\s");return new RegExp(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=function(e,t,n){for(var r,o=e.table,i=e.table_row,s=e.table_cell,a=[],l=0;l<t+1;l++){r=[];for(var u=0;u<n+1;u++)r.push(s.createAndFill());a.push(i.createAndFill(void 0,r))}return o.createAndFill(void 0,a)}},function(e,s,t){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r=t(11);s.sanitize=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/^[\s\S]+?<!--StartFragment-->\s*([\s\S]*?)\s*<!--EndFragment-->[\s\S]+$/,"$1")).replace(/<\/?[ovw]:[^>]*?>/gi,"")).replace(/<\\?\??xml[^>]*>/gi,"")).replace(/<(?:link|meta) [^>]+?>/gi,"")).replace(/<style[^>]*?>\s*<\/style>/gi,"")).replace(/<\/?st1:.*?>/gi,"")).replace(/<a name="[a-zA-Z0-9_]+">/gim,"")).replace(/v:shapes?="[^"]+"/gi,"")).replace(/<!\[if !supportLists\]>/gi,"")).replace(/<!\[endif\]>/gi,"")},s.removeComments=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},s.removeTag=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},s.removeAttribute=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},s.sanitizeClassAttr=function(e){/^Mso/.test(e.value)&&s.removeAttribute(e)};var a=/\s*;\s*/,l=/\s*:\s*/;s.sanitizeStyleAttr=function(e){var t,n,r=e.value.split(a).filter(function(e){return Boolean(e)}),o=e.ownerElement.style,i="";r.forEach(function(e){e=e.split(l);t=e[0],n=e[1],void 0!==o[t]&&(i+=t+": "+n+"; ")}),(i=i.trim())?e.value=i:s.removeAttribute(e)},s.pasteCleanup=function(e,t){var n=e;return t.convertMsLists&&(n=r.convertMsLists(n)),t.stripTags&&(n=s.removeTag(n,t.stripTags)),t.attributes&&((e=document.createElement("div")).innerHTML=n,Array.from(e.querySelectorAll("*")).forEach(function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var n=e.attributes.length-1;0<=n;n--){var r=e.attributes[n];t[r.name]?t[r.name](r):t["*"]&&t["*"](r)}"SPAN"===e.nodeName&&0===e.attributes.length&&function(e){var t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}(e)}}(e,t.attributes)}),n=e.innerHTML),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8),o=n(14),i=n(13),s=n(16),a=n(12),l=n(10),u="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.buildKeymap=function(e){var n,t={};return t["Mod-z"]=o.undo,t["Shift-Mod-z"]=o.redo,t.Backspace=r.chainCommands(i.undoInputRule,r.deleteSelection,r.joinBackward,r.selectNodeBackward),t.Enter=r.chainCommands(r.newlineInCode,r.createParagraphNear,r.liftEmptyBlock,r.splitBlockKeepMarks),u||(t["Mod-y"]=o.redo),e.marks.strong&&(t["Mod-b"]=l.toggleInlineFormat(a.bold)),e.marks.em&&(t["Mod-i"]=l.toggleInlineFormat(a.italic)),e.marks.underline&&(t["Mod-u"]=l.toggleInlineFormat(a.underline)),e.nodes.hard_break&&(n=e.nodes.hard_break,e=r.chainCommands(r.exitCode,function(e,t){return t(e.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0}),t["Shift-Enter"]=e),t},t.buildListKeymap=function(e){var t={};return e.nodes.list_item&&(t.Enter=s.splitListItemKeepMarks(e.nodes.list_item)),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e){for(var t,n={},r=e.attributes,o=0;o<r.length;o++)n[(t=r[o]).name]=t.value;return n}function o(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return 1}function i(e,t){var n,r={};for(n in e)n&&null!==e[n]&&n!==t&&(r[n]=e[n]);return r}var s=n(1),a=n(15),l=["blockquote",0],u=["hr"],c=["pre",["code",0]],d=["ol",0],f=["ul",0],p=["li",0],n=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},n=s.__assign({link:{attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:r}],toDOM:function(e){return["a",i(e.attrs),0]}}},n("strong"),n("b"),n("em"),n("i"),n("u"),n("del"),n("sub"),n("sup"),n("code"),{style:{attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["span",i(e.attrs),0]:["span",0]}}});t.marks=n;a=s.__assign({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["p",i(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["div",i(e.attrs),0]:["div",0]}},blockquote:{attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return l}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return u}},heading:{attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return s.__assign({},r(e),{level:1})}},{tag:"h2",getAttrs:function(e){return s.__assign({},r(e),{level:2})}},{tag:"h3",getAttrs:function(e){return s.__assign({},r(e),{level:3})}},{tag:"h4",getAttrs:function(e){return s.__assign({},r(e),{level:4})}},{tag:"h5",getAttrs:function(e){return s.__assign({},r(e),{level:5})}},{tag:"h6",getAttrs:function(e){return s.__assign({},r(e),{level:6})}}],toDOM:function(e){return o(e.attrs,"level")?["h"+e.attrs.level,i(e.attrs,"level"),0]:["h"+e.attrs.level,0]}},code_block:{content:"text*",marks:"",group:"block",code:!0,defining:!0,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return c}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:s.__assign({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["img",i(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["br",i(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return s.__assign({},r(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?o(e.attrs,"order")?["ol",i(e.attrs,"order"),0]:d:["ol",s.__assign({},i(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["ul",i(e.attrs),0]:f}},list_item:{content:"(paragraph | heading) block*",attrs:s.__assign({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:r}],toDOM:function(e){return o(e.attrs)?["li",i(e.attrs),0]:p},defining:!0}},a.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:{}}));t.nodes=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e,t){return{name:e,value:t}}t.alignLeftRules=[{node:"paragraph",style:[r("text-align","left")]},{node:"heading",style:[r("text-align","left")]}],t.alignRightRules=[{node:"paragraph",style:[r("text-align","right")]},{node:"heading",style:[r("text-align","right")]}],t.alignCenterRules=[{node:"paragraph",style:[r("text-align","center")]},{node:"heading",style:[r("text-align","center")]}],t.alignJustifyRules=[{node:"paragraph",style:[r("text-align","justify")]},{node:"heading",style:[r("text-align","justify")]}],t.alignRemoveRules=[{node:"paragraph",style:[r("text-align","")]},{node:"heading",style:[r("text-align","")]}]},function(e,o,t){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var i=t(9),s=t(18),l=t(6),a=t(3);o.indentBlocks=function(s,r,a){return function(e,t){var n=l.blockNodes(e),i=e.tr;i.setMeta("commandName",r),n.forEach(function(t){var e,n,r,o;t.type.isTextblock&&(e=void 0,(n=s.find(function(e){return e.node===t.type.name}))&&(r={name:o="rtl"===a?n.rtlStyle:n.style,value:0<n.step?""+n.step+n.unit:""},t.attrs.style&&(o=new RegExp(o+":\\s?(\\d+)"+n.unit,"i"),(o=t.attrs.style.match(o))&&(o=(o=parseFloat(o[1])+n.step)<=0?"":o,r.value=""+o+(o?n.unit:""))),e=l.addStyles(t,[r])),e&&l.changeTextBlock(i,t,t.type,e))});n=i.docChanged;return n&&t(i.scrollIntoView()),n}},o.isIndented=function(e,r,o){var i=!1;return l.blockNodes(e).forEach(function(t){var e,n;i||!t.type.isTextblock||!t.attrs.style||(n=r.find(function(e){return e.node===t.type.name}))&&(e="rtl"===o?n.rtlStyle:n.style,n=new RegExp(e+":\\s?\\d+"+n.unit,"i"),i=n.test(t.attrs.style))}),i},o.canIndentAsListItem=function(e,t){return i.sinkListItem(t)(e)},o.canOutdentAsListItem=function(e,t){var n=e.schema.nodes[t.listsTypes.listItem],r=e.schema.nodes[t.listsTypes.orderedList],t=e.schema.nodes[t.listsTypes.bulletList],r=!!a.findNthParentNodeOfType(r,2)(e.selection),t=!!a.findNthParentNodeOfType(t,2)(e.selection);return(r||t)&&i.liftListItem(n)(e)},o.canBeIndented=function(t,e){var n=t.schema.nodes,r=n[s.indentRules.listsTypes.listItem];return(o.isIndented(t,e.nodes)||s.indentRules.nodes.some(function(e){return n[e.node]&&l.hasNode(t,n[e.node])}))&&!l.hasNode(t,r)},o.indent=function(e,t){var n=e.schema.nodes[s.indentRules.listsTypes.listItem],r=o.canBeIndented(e,s.indentRules);o.canIndentAsListItem(e,n)?i.sinkListItem(n)(e,t):r&&o.indentBlocks(s.indentRules.nodes)(e,t)},o.outdent=function(e,t){var n=e.schema.nodes[s.outdentRules.listsTypes.listItem],r=o.canBeIndented(e,s.outdentRules);o.canOutdentAsListItem(e,s.outdentRules)?i.liftListItem(n)(e,t):r&&o.indentBlocks(s.outdentRules.nodes)(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=n(6),a=n(7);t.cleanFormatting=function(i){return void 0===i&&(i={blocksInSelection:!0}),function(e,t){var n=e.tr,r=i.blocksInSelection,o=i.blockNodeType,e=(i.exceptMarks||[e.schema.marks.link]).filter(Boolean);a.cleanMarks(n,{except:e}),s.cleanTextBlockFormatting(n,{blocksInSelection:r,blockNodeType:o});o=n.docChanged;return o&&t&&t(n),o}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=n(6);t.alignBlocks=function(o,i){return function(e,t){var n=s.blockNodes(e),r=e.tr;r.setMeta("commandName",i),n.forEach(function(t){var e,n;t.type.isTextblock&&(e={},(n=o.find(function(e){return e.node===t.type.name}))&&(e=s.addStyles(t,n.style)),s.changeTextBlock(r,t,t.type,e))});n=r.docChanged;return n&&t(r.scrollIntoView()),n}},t.isAligned=function(e,n){var r=!1;return s.blockNodes(e).forEach(function(t){var e;r||!t.type.isTextblock||!t.attrs.style||(e=n.find(function(e){return e.node===t.type.name}))&&(r=e.style.every(function(e){return!!e.value&&new RegExp(e.name+":\\s?"+e.value,"i").test(t.attrs.style)}))}),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(3);t.insertImage=function(r){return function(e,t){var n=e.schema.nodes.image.createAndFill(r);o.insertNode(n)(e,function(e){return t(e.setMeta("commandName","insertImage").setMeta("args",r))})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertText=function(n){return function(e,t){t(e.tr.insertText(n.text,n.from,n.to))}}},function(e,c,t){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var g=t(10),h=t(7),d=t(0);c.removeLink=function(f,p){return function(e,t){var n=e.selection.$cursor;if(n){for(var r,o=n.parent,i=n.index(),s=e.schema.marks[f.mark],a=o.child(i).marks.find(function(e){return e.type===s}),l=o.childCount,u=n.pos-n.textOffset,c=o.child(i).nodeSize,d=void 0,d=i-1;0<=d&&a.isInSet(o.child(d).marks);)c+=r=o.child(d).nodeSize,u-=r,--d;for(d=i+1;d<l&&a.isInSet(o.child(d).marks);)c+=o.child(d).nodeSize,d+=1;t(h.removeMark(p||e.tr,u,u+c,a))}else g.toggleInlineFormat(f,p)(e,t)}},c.applyLink=function(e,a){var l=e.mark,u=e.attrs;return void 0===a&&(a="link"),function(t,e){var n=t.schema.marks,r=t.tr;a&&(r.setMeta("commandName",a),r.setMeta("args",u));function o(){return s=!0}var i,p,m,s=!1;return!function(e){e=h.selectionMarks(t,e);return 1===e.length&&e[0]&&e[0]}(n[l])?(i=t,h.hasMark(t,{mark:l})&&(c.removeLink({mark:l,attrs:u},r)(t,o),i=d.EditorState.create({doc:r.doc,selection:r.selection})),(s?h.toggleMark(n[l],u,r):g.toggleInlineFormat({mark:l},r,u))(i,o)):(p={mark:l,attrs:u},m=r,function(e,n){var t=(o=e.selection).$cursor,r=o.from,o=o.to,i=e.schema.marks[p.mark];if(t){for(var s,a=t.parent,e=t.index(),l=a.child(e).marks.find(function(e){return e.type===i}),u=a.childCount,c=t.pos-t.textOffset,d=a.child(e).nodeSize,f=void 0,f=e-1;0<=f&&l.isInSet(a.child(f).marks);)d+=s=a.child(f).nodeSize,c-=s,--f;for(f=e+1;f<u&&l.isInSet(a.child(f).marks);)d+=a.child(f).nodeSize,f+=1;m.removeMark(c,c+d,i),m.addMark(c,c+d,i.create(p.attrs)),n(m)}else m.doc.nodesBetween(r,o,function(e,t){e.isInline&&i.isInSet(e.marks)&&(m.removeMark(t,t+e.nodeSize,i),m.addMark(t,t+e.nodeSize,i.create(p.attrs)),n(m))})}(t,o)),s&&e(r),s}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(19);t.getHtml=o.getHtml,t.setHtml=o.setHtml,t.parseContent=o.parseContent;o=n(10);t.applyInlineStyle=o.applyInlineStyle,t.getInlineStyles=o.getInlineStyles,t.toggleInlineFormat=o.toggleInlineFormat;o=n(37);t.applyLink=o.applyLink,t.removeLink=o.removeLink;o=n(36);t.insertText=o.insertText;o=n(35);t.insertImage=o.insertImage;o=n(34);t.alignBlocks=o.alignBlocks,t.isAligned=o.isAligned;o=n(33);t.cleanFormatting=o.cleanFormatting;o=n(6);t.hasNode=o.hasNode,t.activeNode=o.activeNode,t.formatBlockElements=o.formatBlockElements,t.getBlockFormats=o.getBlockFormats,t.parentBlockFormat=o.parentBlockFormat,t.changeTextBlock=o.changeTextBlock,t.blockNodes=o.blockNodes,t.cleanTextBlockFormatting=o.cleanTextBlockFormatting;o=n(7);t.hasMark=o.hasMark,t.getMark=o.getMark,t.getActiveMarks=o.getActiveMarks,t.removeAllMarks=o.removeAllMarks,t.cleanMarks=o.cleanMarks,t.selectionMarks=o.selectionMarks;o=n(32);t.indent=o.indent,t.canIndentAsListItem=o.canIndentAsListItem,t.outdent=o.outdent,t.canOutdentAsListItem=o.canOutdentAsListItem,t.isIndented=o.isIndented,t.canBeIndented=o.canBeIndented,t.indentBlocks=o.indentBlocks;o=n(16);t.toggleOrderedList=o.toggleOrderedList,t.toggleUnorderedList=o.toggleUnorderedList,t.toggleList=o.toggleList;o=n(3);t.hasSameMarkup=o.hasSameMarkup,t.getSelectionText=o.getSelectionText,t.getNodeFromSelection=o.getNodeFromSelection,t.selectedLineTextOnly=o.selectedLineTextOnly,t.canInsert=o.canInsert,t.insertNode=o.insertNode,t.indentHtml=o.indentHtml;o=n(31);t.alignLeftRules=o.alignLeftRules,t.alignCenterRules=o.alignCenterRules,t.alignRightRules=o.alignRightRules,t.alignJustifyRules=o.alignJustifyRules,t.alignRemoveRules=o.alignRemoveRules;o=n(18);t.indentRules=o.indentRules,t.outdentRules=o.outdentRules;o=n(30);t.nodes=o.nodes,t.marks=o.marks;o=n(29);t.buildKeymap=o.buildKeymap,t.buildListKeymap=o.buildListKeymap;o=n(12);t.bold=o.bold,t.italic=o.italic,t.underline=o.underline,t.strikethrough=o.strikethrough,t.subscript=o.subscript,t.superscript=o.superscript,t.link=o.link;o=n(28);t.sanitize=o.sanitize,t.removeComments=o.removeComments,t.removeTag=o.removeTag,t.pasteCleanup=o.pasteCleanup,t.sanitizeClassAttr=o.sanitizeClassAttr,t.sanitizeStyleAttr=o.sanitizeStyleAttr,t.removeAttribute=o.removeAttribute;o=n(11);t.convertMsLists=o.convertMsLists;o=n(27);t.createTable=o.createTable;o=n(26);t.find=o.find,t.findAt=o.findAt,t.findAll=o.findAll,t.replace=o.replace,t.replaceAll=o.replaceAll;o=n(25);t.placeholder=o.placeholder;o=n(24);t.spacesFix=o.spacesFix;o=n(23);t.textHighlight=o.textHighlight,t.textHighlightKey=o.textHighlightKey,r.__exportStar(n(8),t),r.__exportStar(n(22),t),r.__exportStar(n(21),t),r.__exportStar(n(14),t),r.__exportStar(n(13),t),r.__exportStar(n(20),t),r.__exportStar(n(2),t),r.__exportStar(n(9),t),r.__exportStar(n(0),t),r.__exportStar(n(15),t),r.__exportStar(n(4),t),r.__exportStar(n(5),t),function(e){for(var t in e)i(t,e[t])}(t)}],r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=38)}}}); |
{ | ||
"name": "@progress/kendo-editor-common", | ||
"description": "Kendo UI TypeScript package exporting functions for Editor component", | ||
"version": "1.1.3-dev.202101150843", | ||
"version": "1.1.3-dev.202101190845", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "Kendo UI" |
457812