/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ * * Version: 5.3.1 (2020-05-27) */ !function(c){"use strict";var e,t,n,r,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=0,l=function(e,t,n){var r,o,i,u;o=(r=e.editorUpload.blobCache).create((i="mceu",u=(new Date).getTime(),i+"_"+Math.floor(1e9*Math.random())+ ++a+String(u)),n,t),r.add(o),e.insertContent(e.dom.createHTML("img",{src:o.blobUri()}))},f=tinymce.util.Tools.resolve("tinymce.util.Promise"),s=tinymce.util.Tools.resolve("tinymce.Env"),d=tinymce.util.Tools.resolve("tinymce.util.Delay"),i=function(u){u.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:function(){var i;i=u,new f(function(n){var r=c.document.createElement("input");r.type="file",r.accept="image/*",r.style.position="fixed",r.style.left="0",r.style.top="0",r.style.opacity="0.001",c.document.body.appendChild(r),r.addEventListener("change",function(e){n(Array.prototype.slice.call(e.target.files))});var o=function(e){var t=function(){n([]),r.parentNode.removeChild(r)};s.os.isAndroid()&&"remove"!==e.type?d.setEditorTimeout(i,t,0):t(),i.off("focusin remove",o)};i.on("focusin remove",o),r.click()}).then(function(e){if(0",n=0;n
";o+=""}return o+="",o+=""}(o,i)),(e=r.dom.select("*[data-mce-id]")[0]).removeAttribute("data-mce-id"),t=r.dom.select("td,th",e),r.selection.setCursorLocation(t[0],0)}))}})},u=function(e){return function(){return e}},m=u(!1),g=u(!0),h=function(){return p},p=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:m,isSome:m,isNone:g,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(undefined),or:n,orThunk:t,map:h,each:function(){},bind:h,exists:m,forall:g,filter:h,equals:e,equals_:e,toArray:function(){return[]},toString:u("none()")}),b=function(n){var e=u(n),t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:g,isNone:m,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return b(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?o:p},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(m,function(e){return t(n,e)})}};return o},v={some:b,none:h,from:function(e){return null===e||e===undefined?p:b(e)}},y=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:u(e)}},w={fromHtml:function(e,t){var n=(t||c.document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1