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