11 lines
9.8 KiB
JavaScript
11 lines
9.8 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.0.12 (2019-07-18)
|
||
|
*/
|
||
|
|
||
|
!function(d){"use strict";var e,n,r,t,o,i,u,s,c,a,f=function(e){var n=e,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return f(r())}}},l=tinymce.util.Tools.resolve("tinymce.PluginManager"),m=function(e){return{isFullscreen:function(){return null!==e.get()}}},h=function(){},v=function(e){return function(){return e}},g=v(!1),O=v(!0),S=g,p=O,x=function(){return E},E=(t={fold:function(e,n){return e()},is:S,isSome:S,isNone:p,getOr:r=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:r,orThunk:n,map:x,ap:x,each:function(){},bind:x,flatten:x,exists:S,forall:p,filter:x,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:v("none()")},Object.freeze&&Object.freeze(t),t),w=function(r){var e=function(){return r},n=function(){return o},t=function(e){return e(r)},o={fold:function(e,n){return n(r)},is:function(e){return r===e},isSome:p,isNone:S,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return w(e(r))},ap:function(e){return e.fold(x,function(e){return w(e(r))})},each:function(e){e(r)},bind:t,flatten:e,exists:t,forall:t,filter:function(e){return e(r)?o:E},equals:function(e){return e.is(r)},equals_:function(e,n){return e.fold(S,function(e){return n(r,e)})},toArray:function(){return[r]},toString:function(){return"some("+r+")"}};return o},N={some:w,none:x,from:function(e){return null===e||e===undefined?E:w(e)}},T=function(n){return function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"===n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n}(e)===n}},y=T("string"),C=T("function"),b=Array.prototype.slice,A=(C(Array.from)&&Array.from,Object.keys),D=function(e,n){return-1!==e.indexOf(n)},_=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:v(e)}},F={fromHtml:function(e,n){var r=(n||d.document).createElement("div");if(r.innerHTML=e,!r.hasChildNodes()||1<r.childNodes.length)throw d.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return _(r.childNodes[0])},fromTag:function(e,n){var r=(n||d.document).createElement(e);return _(r)},fromText:function(e,n){var r=(n||d.document).createTextNode(e);return _(r)},fromDom:_,fromPoint:function(e,n,r){var t=e.dom();return N.from(t.elementFromPoint(n,r)).map(_)}},R=(d.Node.ATTRIBUTE_NODE,d.Node.CDATA_SECTION_NODE,d.Node.COMMENT_NODE,d.Node.DOCUMENT_NODE,d.Node.DOCUMENT_TYPE_NODE,d.Node.DOCUMENT_FRAGMENT_NODE,d.Node.ELEMENT_NODE,d.Node.TEXT_NODE,d.Node.PROCESSING_INSTRUCTION_NODE,d.Node.ENTITY_REFERENCE_NODE,d.Node.ENTITY_NODE,d.Node.NOTATION_NODE,function(e,n,r){if(!y(r))throw d.console.error("Invalid call to CSS.set. Property ",n,":: Value ",r,":: Element ",e),new Error("CSS value must be a string: "+r);var t;(t=e).style!==undefined&&C(t.style.getPropertyValue)&&e.style.setProperty(n,r)}),M=function(e,n){var r=e.dom();!function(e,n){for(var r=A(e),t=0,o=r.length;t<o;t++){var i=r[t];n(e[i],i,e)}}(n,function(e,n){R(r,n,e)})},P=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),L=function(e,n){e.fire("FullscreenStateChanged",{state:n})},k=function(e,n){var r=function(e,n){for(var r=0;r<e.length;r++){var t=e[r];if(t.test(n))return t}return undefined}(e,n);if(!r)return{major:0,minor:0};var t=function(e){return Number(n.replace(r,"$"+e))};return j(t(1),t(2))},I=function(){return j(0,0)},j=function(e,n){return{major:e,minor:n}},H={nu:j,detect:function(e,n){var r=String(n).toLowerCase();return 0===e.length?I():k(e,r)},unknown:I},W="Firefox",U=function(e,n){return function(){return n===e}},q=function(e){var n=e.current;return{current:n,version:e.version,isEdge:U("Edge",n),isChrome:U("Chrome",n),isIE:U("IE",n),isOpera:U("Opera",n),isFirefox:U(W,n),isSafari:U("Safari",n
|