Joywork/js/tinymce/plugins/moxiemanager/plugin.min.js

1 line
11 KiB
JavaScript
Raw Normal View History

2026-05-22 20:21:54 +02:00
(function(exports,undefined){"use strict";var modules={};function require(ids,callback){var module,defs=[];for(var i=0;i<ids.length;++i){module=modules[ids[i]]||resolve(ids[i]);if(!module){throw"module definition dependecy not found: "+ids[i]}defs.push(module)}callback.apply(null,defs)}function define(id,dependencies,definition){if(typeof id!=="string"){throw"invalid module definition, module id must be defined and be a string"}if(dependencies===undefined){throw"invalid module definition, dependencies must be specified"}if(definition===undefined){throw"invalid module definition, definition function must be specified"}require(dependencies,function(){modules[id]=definition.apply(null,arguments)})}function defined(id){return!!modules[id]}function resolve(id){var target=exports;var fragments=id.split(/[.\/]/);for(var fi=0;fi<fragments.length;++fi){if(!target[fragments[fi]]){return}target=target[fragments[fi]]}return target}function expose(ids){for(var i=0;i<ids.length;i++){var target=exports;var id=ids[i];var fragments=id.split(/[.\/]/);for(var fi=0;fi<fragments.length-1;++fi){if(target[fragments[fi]]===undefined){target[fragments[fi]]={}}target=target[fragments[fi]]}target[fragments[fragments.length-1]]=modules[id]}}var __moxman_util_Loader="moxman/util/Loader",__moxman_Env="moxman/Env",__moxman_util_I18n="moxman/util/I18n",__moxman_Loader="moxman/Loader",__moxman_interop_TinyMcePlugin="moxman/interop/TinyMcePlugin",__moxman_interop_CkEditorPlugin="moxman/interop/CkEditorPlugin";define(__moxman_util_Loader,[],function(){"use strict";var idCount=0,loadedUrls={};function noop(){}function appendToHead(node){document.getElementsByTagName("head")[0].appendChild(node)}var Loader={maxLoadTime:5,load:function(urls,loadedCallback,errorCallback){var cssFiles=urls.css||[],jsFiles=urls.js||[];function loadNextScript(){if(jsFiles.length){Loader.loadScript(jsFiles.shift(),loadNextScript,errorCallback)}else{loadNextCss()}}function loadNextCss(){if(cssFiles.length){Loader.loadCss(cssFiles.shift(),loadNextCss,errorCallback)}else{loadedCallback()}}loadNextScript()},loadScript:function(url,loadedCallback,errorCallback){var key,script;function done(){loadedUrls[url]=true;loadedCallback()}if(loadedUrls[url]){loadedCallback();return}loadedCallback=loadedCallback||noop;errorCallback=errorCallback||noop;script=document.createElement("script");script.type="text/javascript";if(typeof url=="object"){for(key in url){script.setAttribute(key,url[key])}}else{script.src=url}if("onload"in script){script.onload=done;script.onerror=errorCallback}else{script.onreadystatechange=function(){var state=script.readyState;if(state=="complete"||state=="loaded"){done()}};script.onerror=errorCallback}appendToHead(script)},loadCss:function(url,loadedCallback,errorCallback){var doc=document,link,style,startTime;function done(){loadedUrls[url]=true;loadedCallback()}if(loadedUrls[url]){loadedCallback();return}loadedCallback=loadedCallback||noop;errorCallback=errorCallback||noop;function isOldWebKit(){var webKitChunks=navigator.userAgent.match(/WebKit\/(\d*)/);return!!(webKitChunks&&webKitChunks[1]<536)}function waitForWebKitLinkLoaded(){var styleSheets=doc.styleSheets,file,i=styleSheets.length,owner;while(i--){file=styleSheets[i];owner=file.ownerNode?file.ownerNode:file.owningElement;if(owner&&owner.id===link.id){done();return}}if((new Date).getTime()-startTime<Loader.maxLoadTime*1e3){window.setTimeout(waitForWebKitLinkLoaded,0)}else{errorCallback()}}function waitForGeckoLinkLoaded(){try{var cssRules=style.sheet.cssRules;done();return cssRules}catch(ex){}if((new Date).getTime()-startTime<Loader.maxLoadTime*1e3){window.setTimeout(waitForGeckoLinkLoaded,0)}else{errorCallback()}}link=doc.createElement("link");link.rel="stylesheet";link.type="text/css";link.href=url;link.id="u"+idCount++;startTime=(new Date).getTime();if("onload"in link&&!isOldWebKit()){link.onload=done;link.onerror=errorCallback}else{if(navigator.userAgent.indexOf("Firefox")>0){style=doc.createElement("style");style.textContent='@import "'+url+'"';waitForGeckoLinkLoaded();appendToHead(style);return}else{wait