!function(r){"use strict";varn,t,e,o,u,i,c=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(n){returnfunction(){returnn}},s=a(!1),f=a(!0),l=function(){returnd},d=(n=function(n){returnn.isNone()},{fold:function(n,t){returnn()},is:s,isSome:s,isNone:f,getOr:e=function(n){returnn},getOrThunk:t=function(n){returnn()},getOrDie:function(n){thrownewError(n||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(undefined),or:e,orThunk:t,map:l,each:function(){},bind:l,exists:s,forall:f,filter:l,equals:n,equals_:n,toArray:function(){return[]},toString:a("none()")}),m=function(e){varn=a(e),t=function(){returno},r=function(n){returnn(e)},o={fold:function(n,t){returnt(e)},is:function(n){returne===n},isSome:f,isNone:s,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){returnm(n(e))},each:function(n){n(e)},bind:r,exists:r,forall:r,filter:function(n){returnn(e)?o:d},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){returnn.is(e)},equals_:function(n,t){returnn.fold(s,function(n){returnt(e,n)})}};returno},v=function(n){returnnull===n||n===undefined?d:m(n)},g=function(t){returnfunction(n){returntypeofn===t}},h=(o="string",function(n){returne=typeof(t=n),(null===t?"null":"object"==e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e)===o;vart,e}),p=g("boolean"),y=g("number"),w=function(n,t){for(vare=0,r=n.length;e<r;e++){t(n[e],e)}},b=Object.keys,N=function(n,t){for(vare=b(n),r=0,o=e.length;r<o;r++){varu=e[r];t(n[u],u)}},T=("undefined"!=typeofr.window?r.window:Function("return this;")(),function(n){returnn.dom().nodeValue}),k=(u=3,function(n){returnn.dom().nodeType===u}),A=function(n,t,e){!function(n,t,e){if(!(h(e)||p(e)||y(e)))throwr.console.error("Invalid call to Attr.set. Key ",t,":: Value ",e,":: Element ",n),newError("Attribute value was not simple");n.setAttribute(t,e+"")}(n.dom(),t,e)},O=function(n,t){n.dom().removeAttribute(t)},C=function(n,t){vare,r,o=(e=t,null===(r=n.dom().getAttribute(e))?undefined:r);returno===undefined||""===o?[]:o.split(" ")},S=function(n){returnn.dom().classList!==undefined},D=function(n,t){returno=t,u=C(e=n,r="class").concat([o]),A(e,r,u.join(" ")),!0;vare,r,o,u},E=function(n,t){returno=t,0<(u=function(n,t){for(vare=[],r=0,o=n.length;r<o;r++){varu=n[r];t(u,r)&&e.push(u)}returne}(C(e=n,r="class"),function(n){returnn!==o})).length?A(e,r,u.join(" ")):O(e,r),!1;vare,r,o,u},L=function(n){0===(S(n)?n.dom().classList:C(n,"class")).length&&O(n,"class")},x=function(n){if(null===n||n===undefined)thrownewError("Node cannot be null or undefined");return{dom:a(n)}},V={fromHtml:function(n,t){vare=(t||r.document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throwr.console.error("HTML does not have a single root node",n),newError("HTML must have a single root node");returnx(e.childNodes[0])},fromTag:function(n,t){vare=(t||r.document).createElement(n);returnx(e)},fromText:function(n,t){vare=(t||r.document).createTextNode(n);returnx(e)},fromDom:x,fromPoint:function(n,t,e){varr=n.dom();returnv(r.elementFromPoint(t,e)).map(x)}},B={"\xa0":"nbsp","\xad":"shy"},P=function(n,t){vare="";returnN(n,function(n,t){e+=t}),newRegExp("["+e+"]",t?"g":"")},_=P(B),j=P(B,!0),M=(i="",N(B,function(n){i&&(i+=","),i+="span.mce-"+n}),i),q="mce-nbsp",H=function(n){return'<span data-mce-bogus="1" class="mce-'+B[n]+'">'+n+"</span>"},F=function(n){vart=T(n);returnk(n)&&t!==undefined&&_.test(t)},I=function(n,t){vare=[],r=function(n,t){for(vare=n.length,r=newArray(e),o=0;o<e;o++){varu=n[o];r[o]=t(u,o)}returnr}(n.dom().childNodes,V.fromDom);returnw(r,function(n){t(n)&&(e=e.concat([n])),e=e.concat(I(n,t))}),e},U=function(n){return"span"===n.nodeName.toLowerCase()&&n.classList.contains("mce-nbsp-wrap")},K=function(c,n){vart=I(V.fromDom(n),F);w(t,function(n){vart,e,r=n.dom().parentNode;if(U(r))t=V.fromD