!function(){"use strict";vare,t,n,r,o,i,u,a,l,s,c=tinymce.util.Tools.resolve("tinymce.PluginManager"),f=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),d=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),m=tinymce.util.Tools.resolve("tinymce.util.VK"),p=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),g=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),h=function(e){returne&&"BR"===e.nodeName},y=function(e){returne&&3===e.nodeType},N=function(e){returne&&/^(OL|UL|DL)$/.test(e.nodeName)},S=function(e){returne&&/^(OL|UL)$/.test(e.nodeName)},O=function(e){returne&&/^(DT|DD)$/.test(e.nodeName)},C=function(e){returne&&/^(LI|DT|DD)$/.test(e.nodeName)},b=function(e){returne&&/^(TH|TD)$/.test(e.nodeName)},L=h,T=function(e,t){returnt&&!!e.schema.getTextBlockElements()[t.nodeName]},D=function(e,t){returne&&e.nodeNameint},E=function(e,t){return!!h(t)&&!(!e.isBlock(t.nextSibling)||h(t.previousSibling))},w=function(e,t,n){varr=e.isEmpty(t);return!(n&&0<e.select("span[data-mce-type=bookmark]",t).length)&&r},k=function(e,t){returne.isChildOf(t,e.getRoot())},A=function(e,t){if(y(e))return{container:e,offset:t};varn=f.getNode(e,t);returny(n)?{container:n,offset:t>=e.childNodes.length?n.data.length:0}:n.previousSibling&&y(n.previousSibling)?{container:n.previousSibling,offset:n.previousSibling.data.length}:n.nextSibling&&y(n.nextSibling)?{container:n.nextSibling,offset:0}:{container:e,offset:t}},x=function(e){vart=e.cloneRange(),n=A(e.startContainer,e.startOffset);t.setStart(n.container,n.offset);varr=A(e.endContainer,e.endOffset);returnt.setEnd(r.container,r.offset),t},R=g.DOM,I=function(o){vari={},e=function(e){vart,n,r;n=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"],1===n.nodeType&&(t=R.create("span",{"data-mce-type":"bookmark"}),n.hasChildNodes()?(r=Math.min(r,n.childNodes.length-1),e?n.insertBefore(t,n.childNodes[r]):R.insertAfter(t,n.childNodes[r])):n.appendChild(t),n=t,r=0),i[e?"startContainer":"endContainer"]=n,i[e?"startOffset":"endOffset"]=r};returne(!0),o.collapsed||e(),i},B=function(o){functione(e){vart,n,r;t=r=o[e?"startContainer":"endContainer"],n=o[e?"startOffset":"endOffset"],t&&(1===t.nodeType&&(n=function(e){for(vart=e.parentNode.firstChild,n=0;t;){if(t===e)returnn;1===t.nodeType&&"bookmark"===t.getAttribute("data-mce-type")||n++,t=t.nextSibling}return-1}(t),t=t.parentNode,R.remove(r),!t.hasChildNodes()&&R.isBlock(t)&&t.appendChild(R.create("br"))),o[e?"startContainer":"endContainer"]=t,o[e?"startOffset":"endOffset"]=n)}e(!0),e();vart=R.createRng();returnt.setStart(o.startContainer,o.startOffset),o.endContainer&&t.setEnd(o.endContainer,o.endOffset),x(t)},_=function(e){returnfunction(){returne}},P=function(n){returnfunction(){for(vare=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(null,e)}},M=_(!1),U=_(!0),F=M,j=U,H=function(){return$},$=(r={fold:function(e,t){returne()},is:F,isSome:F,isNone:j,getOr:n=function(e){returne},getOrThunk:t=function(e){returne()},getOrDie:function(e){thrownewError(e||"error: getOrDie called on none.")},getOrNull:function(){returnnull},getOrUndefined:function(){returnundefined},or:n,orThunk:t,map:H,ap:H,each:function(){},bind:H,flatten:H,exists:F,forall:j,filter:H,equals:e=function(e){returne.isNone()},equals_:e,toArray:function(){return[]},toString:_("none()")},Object.freeze&&Object.freeze(r),r),q=function(n){vare=function(){returnn},t=function(){returno},r=function(e){returne(n)},o={fold:function(e,t){returnt(n)},is:function(e){returnn===e},isSome:j,isNone:F,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){returnq(e(n))},ap:function(e){returne.fold(H,function(e){returnq(e(n))})},each:function(e){e(n)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){returne(n)?o:$},equals:function(e){returne.is(n)},equals_:function(e,t){returne.fold(F,function(e){returnt(n,e)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};returno},W={some:q,none:H,from:function(e){returnnu