!function(p){"use strict";vart,e,n,l=function(t){vare=t;return{get:function(){returne},set:function(t){e=t}}},r=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(){},f=function(t){returnfunction(){returnt}},i=f(!1),u=f(!0),a=function(){returnc},c=(t=function(t){returnt.isNone()},{fold:function(t,e){returnt()},is:i,isSome:i,isNone:u,getOr:n=function(t){returnt},getOrThunk:e=function(t){returnt()},getOrDie:function(t){thrownewError(t||"error: getOrDie called on none.")},getOrNull:f(null),getOrUndefined:f(undefined),or:n,orThunk:e,map:a,each:o,bind:a,exists:i,forall:u,filter:a,equals:t,equals_:t,toArray:function(){return[]},toString:f("none()")}),s=function(n){vart=f(n),e=function(){returno},r=function(t){returnt(n)},o={fold:function(t,e){returne(n)},is:function(t){returnn===t},isSome:u,isNone:i,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){returns(t(n))},each:function(t){t(n)},bind:r,exists:r,forall:r,filter:function(t){returnt(n)?o:c},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){returnt.is(n)},equals_:function(t,e){returnt.fold(i,function(t){returne(n,t)})}};returno},v={some:s,none:a,from:function(t){returnnull===t||t===undefined?c:s(t)}};functionm(t,e){returny(p.document.createElement("canvas"),t,e)}functionh(t){vare=m(t.width,t.height);returng(e).drawImage(t,0,0),e}functiong(t){returnt.getContext("2d")}functiony(t,e,n){returnt.width=e,t.height=n,t}varw,b,I,T=window.Promise?window.Promise:(b=(w=function(t){if("object"!=typeofthis)thrownewTypeError("Promises must be constructed via new");if("function"!=typeoft)thrownewTypeError("not a function");this._state=null,this._value=null,this._deferreds=[],L(t,_(U,this),_(A,this))}).immediateFn||"function"==typeofwindow.setImmediate&&window.setImmediate||function(t){p.setTimeout(t,1)},I=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},w.prototype["catch"]=function(t){returnthis.then(null,t)},w.prototype.then=function(n,r){varo=this;returnneww(function(t,e){R.call(o,newE(n,r,t,e))})},w.all=function(){for(vart=[],e=0;e<arguments.length;e++)t[e]=arguments[e];varc=Array.prototype.slice.call(1===t.length&&I(t[0])?t[0]:t);returnneww(function(o,i){if(0===c.length)returno([]);varu=c.length;functiona(e,t){try{if(t&&("object"==typeoft||"function"==typeoft)){varn=t.then;if("function"==typeofn)returnvoidn.call(t,function(t){a(e,t)},i)}c[e]=t,0==--u&&o(c)}catch(r){i(r)}}for(vart=0;t<c.length;t++)a(t,c[t])})},w.resolve=function(e){returne&&"object"==typeofe&&e.constructor===w?e:neww(function(t){t(e)})},w.reject=function(n){returnneww(function(t,e){e(n)})},w.race=function(o){returnneww(function(t,e){for(varn=0,r=o;n<r.length;n++)r[n].then(t,e)})},w);function_(t,e){returnfunction(){returnt.apply(e,arguments)}}functionR(r){varo=this;null!==this._state?b(function(){vart=o._state?r.onFulfilled:r.onRejected;if(null!==t){vare;try{e=t(o._value)}catch(n){returnvoidr.reject(n)}r.resolve(e)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}functionU(t){try{if(t===this)thrownewTypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeoft||"function"==typeoft)){vare=t.then;if("function"==typeofe)returnvoidL(_(e,t),_(U,this),_(A,this))}this._state=!0,this._value=t,x.call(this)}catch(n){A.call(this,n)}}functionA(t){this._state=!1,this._value=t,x.call(this)}functionx(){for(vart=0,e=this._deferreds;t<e.length;t++){varn=e[t];R.call(this,n)}this._deferreds=[]}functionE(t,e,n,r){this.onFulfilled="function"==typeoft?t:null,this.onRejected="function"==typeofe?e:null,this.resolve=n,this.reject=r}functionL(t,e,n){varr=!1;try{t(function(t){r||(r=!0,e(t))},function(t){r||(r=!0,n(t))})}catch(o){if(r)return;r=!0,n(o)}}functionj(t){vare=t.src;return(0===e.indexOf("data:")?k:functionn(r){returnnewT(function(t,n){vare=newp.XMLHttpRequest;e.open("GET",r,!0),e.responseType="blob",e.onload=function()