bludit/bl-plugins/tinymce/tinymce/plugins/fullscreen/plugin.min.js

9 lines
10 KiB
JavaScript
Raw Normal View History

2019-04-23 19:05:23 +02:00
/**
* 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/
*
2020-06-07 14:41:53 +02:00
* Version: 5.3.1 (2020-05-27)
2019-04-23 19:05:23 +02:00
*/
2020-05-26 17:10:21 +02:00
!function(g){"use strict";var n,t,e,r,c=function(n){var t=n;return{get:function(){return t},set:function(n){t=n}}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(n){return{isFullscreen:function(){return null!==n.get()}}},i=function(){},a=function(n){return function(){return n}},l=a(!1),f=a(!0),d=function(){return s},s=(n=function(n){return n.isNone()},{fold:function(n,t){return n()},is:l,isSome:l,isNone:f,getOr:e=function(n){return n},getOrThunk:t=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(undefined),or:e,orThunk:t,map:d,each:i,bind:d,exists:l,forall:f,filter:d,equals:n,equals_:n,toArray:function(){return[]},toString:a("none()")}),m=function(e){var n=a(e),t=function(){return o},r=function(n){return n(e)},o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:f,isNone:l,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return m(n(e))},each:function(n){n(e)},bind:r,exists:r,forall:r,filter:function(n){return n(e)?o:s},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(l,function(n){return t(e,n)})}};return o},h={some:m,none:d,from:function(n){return null===n||n===undefined?s:m(n)}},p=function(){return n=function(n){n.unbind()},t=c(h.none()),e=function(){t.get().each(n)},{clear:function(){e(),t.set(h.none())},isSet:function(){return t.get().isSome()},set:function(n){e(),t.set(h.some(n))}};var n,t,e},v=function(r){return function(n){return e=typeof(t=n),(null===t?"null":"object"==e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e)===r;var t,e}},y=function(t){return function(n){return typeof n===t}},w=v("string"),b=v("array"),S=y("boolean"),T=y("function"),x=y("number"),C=Array.prototype.push,A=function(n,t){for(var e=n.length,r=new Array(e),o=0;o<e;o++){var i=n[o];r[o]=t(i,o)}return r},E=function(n,t){for(var e=0,r=n.length;e<r;e++){t(n[e],e)}},O=function(n,t){for(var e=[],r=0,o=n.length;r<o;r++){var i=n[r];t(i,r)&&e.push(i)}return e},D=function(n,t){return function(n){for(var t=[],e=0,r=n.length;e<r;++e){if(!b(n[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+n);C.apply(t,n[e])}return t}(A(n,t))},M=Object.keys,N=function(n){return n.style!==undefined&&T(n.style.getPropertyValue)},k=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:a(n)}},F={fromHtml:function(n,t){var e=(t||g.document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw g.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return k(e.childNodes[0])},fromTag:function(n,t){var e=(t||g.document).createElement(n);return k(e)},fromText:function(n,t){var e=(t||g.document).createTextNode(n);return k(e)},fromDom:k,fromPoint:function(n,t,e){var r=n.dom();return h.from(r.elementFromPoint(t,e)).map(k)}},P=("undefined"!=typeof g.window?g.window:Function("return this;")(),r=3,function(n){return n.dom().nodeType===r}),L=function(n,t,e){!function(n,t,e){if(!(w(e)||S(e)||x(e)))throw g.console.error("Invalid call to Attr.set. Key ",t,":: Value ",e,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(t,e+"")}(n.dom(),t,e)},H=function(n,t){var e=n.dom().getAttribute(t);return null===e?undefined:e},q=function(n,t){n.dom().removeAttribute(t)},V=function(n,t){var e=n.dom();!function(n,t){for(var e=M(n),r=0,o=e.length;r<o;r++){var i=e[r];t(n[i],i)}}(t,function(n,t){!function(n,t,e){if(!w(e))throw g.console.error("Invalid call to CSS.set. Property ",t,":: Value ",e,":: Element ",n),new Error("CSS value must be a string: "+e);N(n)&&n.style.setProperty(t,e)}(e,t,n)})},W=function(n,t){var e,r,o=n.dom(),i=g.window.getComputedStyle(o).getPropertyValue(t);return""!==i||(r=P(e=n)?e.dom().parentNode:e.dom())!==