!function(){"use strict";vare,t,r,n,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.Env"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),w=function(e){returne.getParam("media_scripts")},b=function(e){returne.getParam("audio_template_callback")},y=function(e){returne.getParam("video_template_callback")},a=function(e){returne.getParam("media_live_embeds",!0)},u=function(e){returne.getParam("media_filter_html",!0)},s=function(e){returne.getParam("media_url_resolver")},m=function(e){returne.getParam("media_alt_source",!0)},d=function(e){returne.getParam("media_poster",!0)},h=function(e){returne.getParam("media_dimensions",!0)},f=function(e){vart=e,r=function(){returnt};return{get:r,set:function(e){t=e},clone:function(){returnf(r())}}},c=function(){},l=function(e){returnfunction(){returne}},p=l(!1),g=l(!0),x=function(){returnO},O=(e=function(e){returne.isNone()},n={fold:function(e,t){returne()},is:p,isSome:p,isNone:g,getOr:r=function(e){returne},getOrThunk:t=function(e){returne()},getOrDie:function(e){thrownewError(e||"error: getOrDie called on none.")},getOrNull:l(null),getOrUndefined:l(undefined),or:r,orThunk:t,map:x,each:c,bind:x,exists:p,forall:g,filter:x,equals:e,equals_:e,toArray:function(){return[]},toString:l("none()")},Object.freeze&&Object.freeze(n),n),j=function(r){vare=l(r),t=function(){returni},n=function(e){returne(r)},i={fold:function(e,t){returnt(r)},is:function(e){returnr===e},isSome:g,isNone:p,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){returnj(e(r))},each:function(e){e(r)},bind:n,exists:n,forall:n,filter:function(e){returne(r)?i:O},toArray:function(){return[r]},toString:function(){return"some("+r+")"},equals:function(e){returne.is(r)},equals_:function(e,t){returne.fold(p,function(e){returnt(r,e)})}};returni},_=x,S=function(e){returnnull===e||e===undefined?O:j(e)},k=Object.hasOwnProperty,N=function(e,t){returnM(e,t)?S(e[t]):_()},M=function(e,t){returnk.call(e,t)},T=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),z=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),A=function(e,t){if(e)for(varr=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))returne[r]},C=T.DOM,$=function(e){returne.replace(/px$/,"")},P=function(a,e){varc=f(!1),u={};returnz({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(e,t){if(c.get());elseif(M(t.map,"data-ephox-embed-iri"))c.set(!0),i=(n=t).map.style,o=i?C.parseStyle(i):{},u={type:"ephox-embed-iri",source1:n.map["data-ephox-embed-iri"],source2:"",poster:"",width:N(o,"max-width").map($).getOr(""),height:N(o,"max-height").map($).getOr("")};else{if(u.source1||"param"!==e||(u.source1=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(u.type||(u.type=e),u=v.extend(t.map,u)),"script"===e){varr=A(a,t.map.src);if(!r)return;u={type:"script",source1:t.map.src,width:r.width,height:r.height}}"source"===e&&(u.source1?u.source2||(u.source2=t.map.src):u.source1=t.map.src),"img"!==e||u.poster||(u.poster=t.map.src)}varn,i,o}}).parse(e),u.source1=u.source1||u.src||u.data,u.source2=u.source2||"",u.poster=u.poster||"",u},F=tinymce.util.Tools.resolve("tinymce.util.Promise"),D=function(e){vart={mp3:"audio/mpeg",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"}[e.toLowerCase().split(".").pop()];returnt||""},L=tinymce.util.Tools.resolve("tinymce.html.Schema"),E=tinymce.util.Tools.resolve("tinymce.html.Writer"),J=T.DOM,R=function(e){return/^[0-9.]+$/.test(e)?e+"px":e},U=function(e,t){for(varrint){varn=""+t[r];if(e.map[r])for(vari=e.length;i--;){varo=e[i];o.name===r&&(n?(e.map[r]=n,o.value=n):(deletee.map[r],e.splice(i,1)))}elsen&&(e.push({name:r,value:n}),e.map[r]=n)}},W=function(e,c,u){vars,l=E(),m=f(!1),d=0;returnz({validate:!1,allow_conditional_comments:!0,special:"script,noscript",comment:function(e){l.comment(e)},cdata:function(e){l.cdata(e)},text:function(e,t){l.text(e,t)},start:function(e,t,r){if(m.get());elseif(M(t.map,"data-ephox-em