/** * 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.1.4 (2019-12-11) */ !function(u){"use strict";function e(){}function l(e){return function(){return e}}function n(){return p}var r,t=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=0,o=function(e,n,r){e.plugins.table?e.plugins.table.insertTable(n,r):function(r,t,o){r.undoManager.transact(function(){var e,n;r.insertContent(function(e,n){var r,t,o;for(o='',o+="",t=0;t",r=0;r
";o+=""}return o+="
",o+="
"}(t,o)),(e=function(e){return e.dom.select("*[data-mce-id]")[0]}(r)).removeAttribute("data-mce-id"),n=r.dom.select("td,th",e),r.selection.setCursorLocation(n[0],0)})}(e,n,r)},c=function(e,n,r){var t,o;o=(t=e.editorUpload.blobCache).create(function(e){var n=(new Date).getTime();return e+"_"+Math.floor(1e9*Math.random())+ ++i+String(n)}("mceu"),r,n),t.add(o),e.insertContent(e.dom.createHTML("img",{src:o.blobUri()}))},s=tinymce.util.Tools.resolve("tinymce.util.Promise"),a=function(r){return new s(function(e){var n=new u.FileReader;n.onloadend=function(){e(n.result.split(",")[1])},n.readAsDataURL(r)})},f=tinymce.util.Tools.resolve("tinymce.Env"),d=tinymce.util.Tools.resolve("tinymce.util.Delay"),m=function(i){return new s(function(r){var t=u.document.createElement("input");t.type="file",t.style.position="fixed",t.style.left="0",t.style.top="0",t.style.opacity="0.001",u.document.body.appendChild(t);t.addEventListener("change",function(e){r(Array.prototype.slice.call(e.target.files))});var o=function(e){function n(){r([]),t.parentNode.removeChild(t)}f.os.isAndroid()&&"remove"!==e.type?d.setEditorTimeout(i,n,0):n(),i.off("focusin remove",o)};i.on("focusin remove",o),t.click()})},g=function(r){r.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:function(){m(r).then(function(e){if(0