@progress/kendo-editor-common
Advanced tools
Comparing version 1.0.3-dev.202011240732 to 1.0.3-dev.202012030754
@@ -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),p=t(6),m=t(7),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.changeStyle=function(d,f){return function(e,t,n){var r=e.selection,o=r.empty,i=r.$cursor,s=r.ranges;if(o&&!i||!p.markApplies(e.doc,s,d))return!1;var a=!1;if(t)if(n=n||e.tr,i){i=e.storedMarks||i.marks();d.isInSet(i)&&(i=m.changeStyleFromMark(i,f),t(n.removeStoredMark(d)),t(n.addStoredMark(d.create({style:i.style}))),a=!0)}else{for(var l=0;l<s.length;l++)var u=s[l],c=u.$from,u=u.$to,a=m.changeStyleMark(n,c.pos,u.pos,f,d);a&&(n.scrollIntoView(),t(n))}return a}},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},l.getTypeName=function(e){return(e instanceof o.Node?e.type:e).name},l.findNthParentNode=function(o,i){return void 0===i&&(i=1),function(e){for(var t=e.$from,n=t.depth;0<n;n--){var r=t.node(n);if(o(r)&&0==--i)return{depth:n,node:r}}}},l.findNthParentNodeOfType=function(t,n){return void 0===n&&(n=1),function(e){return l.findNthParentNode(function(e){return l.getTypeName(e)===l.getTypeName(t)},n)(e)}},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$/,"")}},function(e,t){e.exports=v},function(e,t){e.exports=y},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 e=s[e],t=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,l=void 0===e?[]:e;return function(e,t){var r,n=e.schema,o=e.selection,i=o.empty,o=o.ranges,s=e.tr,a=(l instanceof Array?l:[l]).map(function(e){return e.name});i||(r=Object.keys(n.marks).map(function(e){return n.marks[e]}).filter(function(e){return-1===a.indexOf(e.name)}),o.forEach(function(e){var t=e.$from,n=e.$to;r.forEach(function(e){return s.removeMark(t.pos,n.pos,e)})}),t(s))}},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?g.selectionMarks(e,e.schema.marks.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,y,t){"use strict";Object.defineProperty(y,"__esModule",{value:!0});var k=t(1),M=t(4),d=t(3),m=t(6);y.changeStyleFromMark=function(e,t){e=e.find(function(e){return"style"===e.type.name}),e=e&&e.attrs.style;return d.changeStylesString(e,t)},y.changeStyleMark=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.changeStyleFromMark(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},y.getInlineStyles=function(e,t){return m.selectionMarks(e,e.schema.marks.style).map(function(e){return m.styleValue(e,t)}).filter(function(e){return null!==e})},y.changeStyle=function(f,p){return function(e,t,n){var r=e.selection,o=r.empty,i=r.$cursor,s=r.ranges;if(o&&!i||!m.markApplies(e.doc,s,f))return!1;var a=!1;if(t)if(n=n||e.tr,i){var l,e=e.storedMarks||i.marks();f.isInSet(e)&&(i=y.changeStyleFromMark(e,p),e=e.find(function(e){return"style"===e.type.name}),l=k.__assign({},e?e.attrs:{},{style:i.style||null}),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=y.changeStyleMark(n,d.pos,c.pos,p,f);a&&(n.scrollIntoView(),t(n))}return a}},y.toggleInlineFormat=function(c,d,f){return function(t,e){var n=t.schema.marks,r=c.altStyle,o=c.altMarks,i=void 0===o?[]:o,s=c.mark;d=d||t.tr;function a(){return u=!0}var l=!1,u=!1;r&&n.style&&(o=n.style,l=y.changeStyle(o,{style:r.name,value:r.value})(t,a,d));i=[s].concat(i).filter(function(e){return n[e]}).map(function(e){return m.hasMark(t,{mark:e})&&n[e]}).filter(function(e){return e});return i.length?m.removeMarks(i,t,a,d):l||m.toggleMark(n[s],f,d)(t,a),u&&e(d),u}},y.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||!m.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=d.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 y.changeStyle(n,r)(e,t,o)}}},function(e,t){e.exports=a},function(e,t){e.exports=m},function(e,c,t){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d=t(1),o=t(3),f=t(4),p=t(2);c.changeBlockNode=function(n,e,o,i,s,a){var t=n.selection,r=t.from,t=t.to,l=!1;if(n.doc.nodesBetween(r,t,function(e,t){return!l&&void(e.isTextblock&&!e.hasMarkup(s,a)&&(l=e.type===s||(t=(e=n.doc.resolve(t)).index(),e.parent.canReplaceWith(t,t+1,s))))}),!l)return!1;if(e){if(!s.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var u=o.steps.length;o.doc.nodesBetween(r,t,function(e,t){if(e.eq(i)&&e.isTextblock&&!e.hasMarkup(s,a)&&function(e,t,n){e=e.resolve(t),t=e.index();return e.parent.canReplaceWith(t,t+1,n)}(o.doc,o.mapping.slice(u).map(t),s)){o.clearIncompatible(o.mapping.slice(u).map(t,1),s);var n=o.mapping.slice(u),r=n.map(t,1),t=n.map(t+e.nodeSize,1),e=new p.Slice(p.Fragment.from(s.create(a,null,e.marks)),0,0);return o.step(new f.ReplaceAroundStep(r,t,r+1,t-1,e,1,!0)),!1}})}return!0},c.blockNodes=function(e){var t=e.selection,n=t.from,r=t.to,o=t.$from,i=[];return t.node?t.node.isBlock?i.push(t.node):o.parent&&o.parent.isBlock&&i.push(o.parent):e.doc.nodesBetween(n,r,function(e){e.isBlock&&i.push(e)}),i},c.formatBlockElements=function(u,t){return function(o,i){var e=c.blockNodes(o),s=o.schema.nodes,a=!1,l=o.tr;return l.setMeta("commandName",t),l.setMeta("args",{value:u}),e.forEach(function(e){var t,n,r;e.type.isTextblock&&("p"===u?(n=(t=e.attrs).level,r=d.__rest(t,["level"]),a=c.changeBlockNode(o,i,l,e,s.paragraph,r)||a):/^h[1-6]$/i.test(u)?(n=parseInt(u.substr(1),10),a=c.changeBlockNode(o,i,l,e,s.heading,d.__assign({},e.attrs,{level:n}))||a):"blockquote"===u&&(n=(t=e.attrs).level,r=d.__rest(t,["level"]),a=c.changeBlockNode(o,i,l,e,s.blockquote,r)||a))}),a&&i(l.scrollIntoView()),a}},c.getBlockFormats=function(e){var t=c.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},c.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})},c.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},c.parentBlockFormat=function(e){e=c.getBlockFormats(e);return 1===new Set(e).size?e[0]:null},c.activeNode=function(e){return{tag:c.parentBlockFormat(e)||""}}},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(7),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),d=t(10),a=t(3);o.indentBlocks=function(u,t,c){return function(i,s){var e=d.blockNodes(i),a=i.tr,l=!1;return a.setMeta("commandName",t),e.forEach(function(t){var e,n,r,o;t.type.isTextblock&&(e=void 0,(n=u.find(function(e){return e.node===t.type.name}))&&(r={name:o="rtl"===c?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=d.addStyles(t,[r])),e&&(l=d.changeBlockNode(i,s,a,t,t.type,e)||l))}),l&&s(a.scrollIntoView()),l}},o.isIndented=function(e,r,o){var i=!1;return d.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]&&d.hasNode(t,n[e.node])}))&&!d.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 l=n(10);t.alignBlocks=function(a,t){return function(r,o){var e=l.blockNodes(r),i=r.tr;i.setMeta("commandName",t);var s=!1;return e.forEach(function(t){var e,n;t.type.isTextblock&&(e={},(n=a.find(function(e){return e.node===t.type.name}))&&(e=l.addStyles(t,n.style)),s=l.changeBlockNode(r,o,i,t,t.type,e)||s)}),s&&o(i.scrollIntoView()),s}},t.isAligned=function(e,n){var r=!1;return l.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(7),h=t(6),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=e.selection,r=t.$cursor,o=t.from,t=t.to,i=e.schema.marks[p.mark];if(r){for(var s,a=r.parent,e=r.index(),l=a.child(e).marks.find(function(e){return e.type===i}),u=a.childCount,c=r.pos-r.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(o,t,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(7);t.applyInlineStyle=o.applyInlineStyle,t.getInlineStyles=o.getInlineStyles,t.toggleInlineFormat=o.toggleInlineFormat;o=n(36);t.applyLink=o.applyLink,t.removeLink=o.removeLink;o=n(35);t.insertText=o.insertText;o=n(34);t.insertImage=o.insertImage;o=n(33);t.alignBlocks=o.alignBlocks,t.isAligned=o.isAligned;o=n(10);t.hasNode=o.hasNode,t.activeNode=o.activeNode,t.formatBlockElements=o.formatBlockElements,t.getBlockFormats=o.getBlockFormats,t.parentBlockFormat=o.parentBlockFormat;o=n(6);t.hasMark=o.hasMark,t.getMark=o.getMark,t.getActiveMarks=o.getActiveMarks,t.removeAllMarks=o.removeAllMarks,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=37)}}}); | ||
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-view","prosemirror-transform"],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),p=t(6),m=t(7),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.changeStyle=function(d,f){return function(e,t,n){var r=e.selection,o=r.empty,i=r.$cursor,s=r.ranges;if(o&&!i||!p.markApplies(e.doc,s,d))return!1;var a=!1;if(t)if(n=n||e.tr,i){i=e.storedMarks||i.marks();d.isInSet(i)&&(i=m.changeStyleFromMark(i,f),t(n.removeStoredMark(d)),t(n.addStoredMark(d.create({style:i.style}))),a=!0)}else{for(var l=0;l<s.length;l++)var u=s[l],c=u.$from,u=u.$to,a=m.changeStyleMark(n,c.pos,u.pos,f,d);a&&(n.scrollIntoView(),t(n))}return a}},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},l.getTypeName=function(e){return(e instanceof o.Node?e.type:e).name},l.findNthParentNode=function(o,i){return void 0===i&&(i=1),function(e){for(var t=e.$from,n=t.depth;0<n;n--){var r=t.node(n);if(o(r)&&0==--i)return{depth:n,node:r}}}},l.findNthParentNodeOfType=function(t,n){return void 0===n&&(n=1),function(e){return l.findNthParentNode(function(e){return l.getTypeName(e)===l.getTypeName(t)},n)(e)}},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$/,"")}},function(e,t){e.exports=y},function(e,t){e.exports=v},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,l=void 0===e?[]:e;return function(e,t){var r,n=e.schema,o=e.selection,i=o.empty,o=o.ranges,s=e.tr,a=(l instanceof Array?l:[l]).map(function(e){return e.name});i||(r=Object.keys(n.marks).map(function(e){return n.marks[e]}).filter(function(e){return-1===a.indexOf(e.name)}),o.forEach(function(e){var t=e.$from,n=e.$to;r.forEach(function(e){return s.removeMark(t.pos,n.pos,e)})}),t(s))}},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?g.selectionMarks(e,e.schema.marks.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,y,t){"use strict";Object.defineProperty(y,"__esModule",{value:!0});var k=t(1),M=t(4),d=t(3),m=t(6);y.changeStyleFromMark=function(e,t){e=e.find(function(e){return"style"===e.type.name}),e=e&&e.attrs.style;return d.changeStylesString(e,t)},y.changeStyleMark=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.changeStyleFromMark(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},y.getInlineStyles=function(e,t){return m.selectionMarks(e,e.schema.marks.style).map(function(e){return m.styleValue(e,t)}).filter(function(e){return null!==e})},y.changeStyle=function(f,p){return function(e,t,n){var r=e.selection,o=r.empty,i=r.$cursor,s=r.ranges;if(o&&!i||!m.markApplies(e.doc,s,f))return!1;var a=!1;if(t)if(n=n||e.tr,i){var l,e=e.storedMarks||i.marks();f.isInSet(e)&&(i=y.changeStyleFromMark(e,p),e=e.find(function(e){return"style"===e.type.name}),l=k.__assign({},e?e.attrs:{},{style:i.style||null}),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=y.changeStyleMark(n,d.pos,c.pos,p,f);a&&(n.scrollIntoView(),t(n))}return a}},y.toggleInlineFormat=function(c,d,f){return function(t,e){var n=t.schema.marks,r=c.altStyle,o=c.altMarks,i=void 0===o?[]:o,s=c.mark;d=d||t.tr;function a(){return u=!0}var l=!1,u=!1;r&&n.style&&(o=n.style,l=y.changeStyle(o,{style:r.name,value:r.value})(t,a,d));i=[s].concat(i).filter(function(e){return n[e]}).map(function(e){return m.hasMark(t,{mark:e})&&n[e]}).filter(function(e){return e});return i.length?m.removeMarks(i,t,a,d):l||m.toggleMark(n[s],f,d)(t,a),u&&e(d),u}},y.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||!m.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=d.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 y.changeStyle(n,r)(e,t,o)}}},function(e,t){e.exports=a},function(e,t){e.exports=m},function(e,c,t){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d=t(1),o=t(3),f=t(4),p=t(2);c.changeBlockNode=function(n,e,o,i,s,a){var t=n.selection,r=t.from,t=t.to,l=!1;if(n.doc.nodesBetween(r,t,function(e,t){return!l&&void(e.isTextblock&&!e.hasMarkup(s,a)&&(l=e.type===s||(t=(e=n.doc.resolve(t)).index(),e.parent.canReplaceWith(t,t+1,s))))}),!l)return!1;if(e){if(!s.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var u=o.steps.length;o.doc.nodesBetween(r,t,function(e,t){if(e.eq(i)&&e.isTextblock&&!e.hasMarkup(s,a)&&function(e,t,n){e=e.resolve(t),t=e.index();return e.parent.canReplaceWith(t,t+1,n)}(o.doc,o.mapping.slice(u).map(t),s)){o.clearIncompatible(o.mapping.slice(u).map(t,1),s);var n=o.mapping.slice(u),r=n.map(t,1),t=n.map(t+e.nodeSize,1),e=new p.Slice(p.Fragment.from(s.create(a,null,e.marks)),0,0);return o.step(new f.ReplaceAroundStep(r,t,r+1,t-1,e,1,!0)),!1}})}return!0},c.blockNodes=function(e){var t=e.selection,n=t.from,r=t.to,o=t.$from,i=[];return t.node?t.node.isBlock?i.push(t.node):o.parent&&o.parent.isBlock&&i.push(o.parent):e.doc.nodesBetween(n,r,function(e){e.isBlock&&i.push(e)}),i},c.formatBlockElements=function(u,t){return function(o,i){var e=c.blockNodes(o),s=o.schema.nodes,a=!1,l=o.tr;return l.setMeta("commandName",t),l.setMeta("args",{value:u}),e.forEach(function(e){var t,n,r;e.type.isTextblock&&("p"===u?(n=(t=e.attrs).level,r=d.__rest(t,["level"]),a=c.changeBlockNode(o,i,l,e,s.paragraph,r)||a):/^h[1-6]$/i.test(u)?(n=parseInt(u.substr(1),10),a=c.changeBlockNode(o,i,l,e,s.heading,d.__assign({},e.attrs,{level:n}))||a):"blockquote"===u&&(n=(t=e.attrs).level,r=d.__rest(t,["level"]),a=c.changeBlockNode(o,i,l,e,s.blockquote,r)||a))}),a&&i(l.scrollIntoView()),a}},c.getBlockFormats=function(e){var t=c.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},c.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})},c.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},c.parentBlockFormat=function(e){e=c.getBlockFormats(e);return 1===new Set(e).size?e[0]:null},c.activeNode=function(e){return{tag:c.parentBlockFormat(e)||""}}},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(7),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),d=t(10),a=t(3);o.indentBlocks=function(u,t,c){return function(i,s){var e=d.blockNodes(i),a=i.tr,l=!1;return a.setMeta("commandName",t),e.forEach(function(t){var e,n,r,o;t.type.isTextblock&&(e=void 0,(n=u.find(function(e){return e.node===t.type.name}))&&(r={name:o="rtl"===c?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=d.addStyles(t,[r])),e&&(l=d.changeBlockNode(i,s,a,t,t.type,e)||l))}),l&&s(a.scrollIntoView()),l}},o.isIndented=function(e,r,o){var i=!1;return d.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]&&d.hasNode(t,n[e.node])}))&&!d.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 l=n(10);t.alignBlocks=function(a,t){return function(r,o){var e=l.blockNodes(r),i=r.tr;i.setMeta("commandName",t);var s=!1;return e.forEach(function(t){var e,n;t.type.isTextblock&&(e={},(n=a.find(function(e){return e.node===t.type.name}))&&(e=l.addStyles(t,n.style)),s=l.changeBlockNode(r,o,i,t,t.type,e)||s)}),s&&o(i.scrollIntoView()),s}},t.isAligned=function(e,n){var r=!1;return l.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(7),h=t(6),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(7);t.applyInlineStyle=o.applyInlineStyle,t.getInlineStyles=o.getInlineStyles,t.toggleInlineFormat=o.toggleInlineFormat;o=n(36);t.applyLink=o.applyLink,t.removeLink=o.removeLink;o=n(35);t.insertText=o.insertText;o=n(34);t.insertImage=o.insertImage;o=n(33);t.alignBlocks=o.alignBlocks,t.isAligned=o.isAligned;o=n(10);t.hasNode=o.hasNode,t.activeNode=o.activeNode,t.formatBlockElements=o.formatBlockElements,t.getBlockFormats=o.getBlockFormats,t.parentBlockFormat=o.parentBlockFormat;o=n(6);t.hasMark=o.hasMark,t.getMark=o.getMark,t.getActiveMarks=o.getActiveMarks,t.removeAllMarks=o.removeAllMarks,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=37)}}}); |
{ | ||
"name": "@progress/kendo-editor-common", | ||
"description": "Kendo UI TypeScript package exporting functions for Editor component", | ||
"version": "1.0.3-dev.202011240732", | ||
"version": "1.0.3-dev.202012030754", | ||
"keywords": [ | ||
@@ -31,3 +31,3 @@ "Kendo UI" | ||
"prosemirror-state": "1.3.3", | ||
"prosemirror-view": "1.16.3", | ||
"prosemirror-view": "1.16.4", | ||
"prosemirror-dropcursor": "1.3.2", | ||
@@ -34,0 +34,0 @@ "prosemirror-gapcursor": "1.1.5", |
+ Addedprosemirror-view@1.16.4(transitive)
- Removedprosemirror-view@1.16.3(transitive)
Updatedprosemirror-view@1.16.4