9 Zeilen
111 KiB
JavaScript
9 Zeilen
111 KiB
JavaScript
|
/**
|
||
|
* 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(p){"use strict";var S=function(e){var n=e;return{get:function(){return n},set:function(e){n=e}}},x=function(){},b=function(e){return function(){return e}},o=function(e){return e};function y(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=o.concat(e);return r.apply(null,t)}}var e,n,t,r,a=function(n){return function(e){return!n(e)}},f=b(!1),i=b(!0),u=function(){return c},c=(e=function(e){return e.isNone()},{fold:function(e,n){return e()},is:f,isSome:f,isNone:i,getOr:t=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:b(null),getOrUndefined:b(undefined),or:t,orThunk:n,map:u,each:x,bind:u,exists:f,forall:i,filter:u,equals:e,equals_:e,toArray:function(){return[]},toString:b("none()")}),l=function(t){var e=b(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:i,isNone:f,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return l(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:c},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(f,function(e){return n(t,e)})}};return o},C={some:l,none:u,from:function(e){return null===e||e===undefined?c:l(e)}},s=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=function(r){return function(e){return t=typeof(n=e),(null===n?"null":"object"==t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t)===r;var n,t}},m=function(n){return function(e){return typeof e===n}},g=d("string"),h=d("array"),v=m("boolean"),w=m("function"),R=m("number"),T=Array.prototype.slice,O=Array.prototype.indexOf,D=Array.prototype.push,A=function(e,n){return t=e,r=n,-1<O.call(t,r);var t,r},E=function(e,n){for(var t=0,r=e.length;t<r;t++){if(n(e[t],t))return!0}return!1},k=function(e,n){for(var t=e.length,r=new Array(t),o=0;o<t;o++){var i=e[o];r[o]=n(i,o)}return r},B=function(e,n){for(var t=0,r=e.length;t<r;t++){n(e[t],t)}},N=function(e,n){for(var t=[],r=0,o=e.length;r<o;r++){var i=e[r];n(i,r)&&t.push(i)}return t},I=function(e,n,t){return function(e,n){for(var t=e.length-1;0<=t;t--){n(e[t],t)}}(e,function(e){t=n(t,e)}),t},P=function(e,n,t){return B(e,function(e){t=n(t,e)}),t},M=function(e,n){return function(e,n,t){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(n(i,r))return C.some(i);if(t(i,r))break}return C.none()}(e,n,f)},_=function(e,n){for(var t=0,r=e.length;t<r;t++){if(n(e[t],t))return C.some(t)}return C.none()},W=function(e){for(var n=[],t=0,r=e.length;t<r;++t){if(!h(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);D.apply(n,e[t])}return n},j=function(e,n){return W(k(e,n))},z=function(e,n){for(var t=0,r=e.length;t<r;++t){if(!0!==n(e[t],t))return!1}return!0},L=function(e,n){for(var t=0;t<e.length;t++){var r=n(e[t],t);if(r.isSome())return r}return C.none()},F=Object.keys,H=Object.hasOwnProperty,q=function(e,n){for(var t=F(e),r=0,o=t.length;r<o;r++){var i=t[r];n(e[i],i)}},U=function(e,t){return V(e,function(e,n){return{k:n,v:t(e,n)}})},V=function(e,r){var o={};return q(e,function(e,n){var t=r(e,n);o[t.k]=t.v}),o},K=function(e,n){return X(e,n)?C.from(e[n]):C.none()},X=function(e,n){return H.call(e,n)},$=("undefined"!=typeof p.window?p.window:Function("return this;")(),function(e){return e.dom().nodeName.toLowerCase()}),G=function(e){return e.dom().nodeType},Y=function(n){return function(e){return G(e)===n}},J=function(e){return 8===G(e)||"#comment"===$(e)},Q=Y(1),Z=Y(3),ee=function(e,n,t){if(!(g(t)||v(t)||R(t)))throw p.console.error("Invalid call to Attr.set. Key ",n,":: Value ",t,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(n,t+"")},ne=function(e,n,t){ee(e.dom(),n,t)},te=function(e,n){var
|