!function(){"use strict";functiont(r){returnfunction(t){returne=typeof(n=t),(null===n?"null":"object"==e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e)===r;varn,e}}functionn(n){returnfunction(t){returntypeoft===n}}functionh(){}functioni(t){returnfunction(){returnt}}functione(t){returnt}functionr(t,n){returnt===n}functiono(){returnv}varu,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.VK"),l=t("string"),d=t("array"),s=function(t){returnu===t},f=n("boolean"),p=n("function"),m=i(!1),g=i(!(u=null)),v={fold:function(t,n){returnt()},isSome:m,isNone:g,getOr:e,getOrThunk:k,getOrDie:function(t){thrownewError(t||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void0),or:e,orThunk:k,map:o,each:h,bind:o,exists:m,forall:g,filter:function(){returnv},toArray:function(){return[]},toString:i("none()")};functionk(t){returnt()}functiony(t,o,i){returnfunction(t){for(varn,e=0,r=t.length;e<r;e++)n=t[e],i=o(i,n,e)}(t),i}functionx(t){for(varn=[],e=0,r=t.length;e<r;++e){if(!d(t[e]))thrownewError("Arr.flatten item "+e+" was not an array, input: "+t);at.apply(n,t[e])}returnn}functionb(t,n){for(vare=0;e<t.length;e++){varr=n(t[e],e);if(r.isSome())returnr}returnit.none()}functionO(t,n,e){returnvoid0===e&&(e=r),t.exists(function(t){returne(t,n)})}functionw(t,n){returnt?it.some(n):it.none()}functionC(t){varn=t.getParam("link_assume_external_targets",!1);returnf(n)&&n?1:!l(n)||"http"!==n&&"https"!==n?0:n}functionN(t){returnt.getParam("default_link_target")}functionA(t){returnt.getParam("target_list",!0)}functionP(t){returnt.getParam("rel_list",[],"array")}functionT(t){returnt.getParam("allow_unsafe_link_target",!1,"boolean")}functionS(t){returnl(t.value)?t.value:""}function_(n){returnvoid0===n&&(n=S),function(t){returnit.from(t).map(function(t){returnct(t,n)})}}functionR(t,i,u,a){returnfunction(t){for(varn=mt(t),e=0,r=n.length;e<r;e++){varo=n[e];!function(t,n){(i(t,n)?u:a)(t,n)}(t[o],o)}}(t),1}functionD(t,n){returngt.call(t,n)}functionL(t){returnt&&"a"===t.nodeName.toLowerCase()}functionE(t){returnL(t)&&!!ht(t)}functionM(t,n){if(t.collapsed)return[];for(vare=t.cloneContents(),r=newdt(e.firstChild,e),o=[],i=e.firstChild;n(i)&&o.push(i),i=r.next(););returno}functionU(t){return/^\w+:/i.test(t)}functionB(t,n){functione(t){returnt.filter(function(t){return-1===lt.inArray(o,t)})}varr,o=["noopener"],i=t?t.split(/\s+/):[],u=n?0<(r=e(r=i)).length?r.concat(o):o:e(i);return0<u.length?lt.trim(u.sort().join(" ")):""}functionI(t,n){returnn=n||t.selection.getNode(),pt(n)?t.dom.select("a[href]",n)[0]:t.dom.getParent(n,"a[href]")}functionK(t,n){return(n?n.innerText||n.textContent:t.getContent({format:"text"})).replace(/\uFEFF/g,"")}functionz(t){return0<lt.grep(t,E).length}functionj(t){varn=t.schema.getTextInlineElements();return0===M(t.selection.getRng(),function(t){return1===t.nodeType&&!L(t)&&!D(n,t.nodeName.toLowerCase())}).length}functionV(l,c,f){vart,n,e,r,o,i,u,s=l.selection.getNode(),m=I(l,s),g=(n=l,e=y(["title","rel","class","target"],function(n,e){returnt[e].each(function(t){n[e]=0<t.length?t:null}),n},{href:(t=f).href}),u=st({},e),0<P(n).length||!1!==T(n)||(r=B(u.rel,"_blank"===u.target),u.rel=r||null),it.from(u.target).isNone()&&!1===A(n)&&(u.target=N(n)),u.href=(o=u.href,"http"!==(i=C(n))&&"https"!==i||U(o)?o:i+"://"+o),u);l.undoManager.transact(function(){varn,t,e,r,o,i,u,a;f.href===c.href&&c.attach(),m?(l.focus(),o=l,i=m,u=f.text,a=g,u.each(function(t){D(i,"innerText")?i.innerText=t:i.textContent=t}),o.dom.setAttribs(i,a),o.selection.select(i)):(n=l,e=f.text,r=g,pt(t=s)?kt(n,t,r):e.fold(function(){n.execCommand("mceInsertLink",!1,r)},function(t){n.insertContent(n.dom.createHTML("a",r,n.dom.encode(t)))}))})}functionq(t,n,e){varr,o,i,u,a,l,c,f;t.hasPlugin("rtc",!0)?t.execCommand("createlink",!1,(i=e.class,u=e.href,a=e.rel,l=e.target,c=e.text,f=