BookStack/public/libs/tinymce/themes/modern/theme.min.js

1 line
128 KiB
JavaScript
Raw Normal View History

2018-09-22 17:58:06 -04:00
!function(){"use strict";var e,t,n,i,r,o=tinymce.util.Tools.resolve("tinymce.ThemeManager"),h=tinymce.util.Tools.resolve("tinymce.EditorManager"),w=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=function(e){return!1!==c(e)},c=function(e){return e.getParam("menubar")},f=function(e){return e.getParam("toolbar_items_size")},m=function(e){return e.getParam("menu")},g=function(e){return!1===e.settings.skin},p=function(e){var t=e.getParam("resize","vertical");return!1===t?"none":"both"===t?"both":"vertical"},v=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),b=tinymce.util.Tools.resolve("tinymce.ui.Factory"),y=tinymce.util.Tools.resolve("tinymce.util.I18n"),s=function(e){return e.fire("SkinLoaded")},x=function(e){return e.fire("ResizeEditor")},_=function(e){return e.fire("BeforeRenderUI")},a=function(t,n){return function(){var e=t.find(n)[0];e&&e.focus(!0)}},C=function(e,t){e.shortcuts.add("Alt+F9","",a(t,"menubar")),e.shortcuts.add("Alt+F10,F10","",a(t,"toolbar")),e.shortcuts.add("Alt+F11","",a(t,"elementpath")),t.on("cancel",function(){e.focus()})},R=tinymce.util.Tools.resolve("tinymce.geom.Rect"),u=tinymce.util.Tools.resolve("tinymce.util.Delay"),E=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},k=function(e){return function(){return e}},l=k(!1),T=k(!0),H=l,S=T,M=function(){return N},N=(i={fold:function(e,t){return e()},is:H,isSome:H,isNone:S,getOr:n=function(e){return e},getOrThunk:t=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:n,orThunk:t,map:M,ap:M,each:function(){},bind:M,flatten:M,exists:H,forall:S,filter:M,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:k("none()")},Object.freeze&&Object.freeze(i),i),P=function(n){var e=function(){return n},t=function(){return r},i=function(e){return e(n)},r={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:S,isNone:H,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return P(e(n))},ap:function(e){return e.fold(M,function(e){return P(e(n))})},each:function(e){e(n)},bind:i,flatten:e,exists:i,forall:i,filter:function(e){return e(n)?r:N},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(H,function(e){return t(n,e)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return r},D={some:P,none:M,from:function(e){return null===e||e===undefined?N:P(e)}},W=function(e){return e?e.getRoot().uiContainer:null},O={getUiContainerDelta:function(e){var t=W(e);if(t&&"static"!==v.DOM.getStyle(t,"position",!0)){var n=v.DOM.getPos(t),i=t.scrollLeft-n.x,r=t.scrollTop-n.y;return D.some({x:i,y:r})}return D.none()},setUiContainer:function(e,t){var n=v.DOM.select(e.settings.ui_container)[0];t.getRoot().uiContainer=n},getUiContainer:W,inheritUiContainer:function(e,t){return t.uiContainer=W(e)}},A=function(i,e,r){var o,s=[];if(e)return w.each(e.split(/[ ,]/),function(t){var e,n=function(){var e=i.selection;t.settings.stateSelector&&e.selectorChanged(t.settings.stateSelector,function(e){t.active(e)},!0),t.settings.disabledStateSelector&&e.selectorChanged(t.settings.disabledStateSelector,function(e){t.disabled(e)})};"|"===t?o=null:(o||(o={type:"buttongroup",items:[]},s.push(o)),i.buttons[t]&&(e=t,"function"==typeof(t=i.buttons[e])&&(t=t()),t.type=t.type||"button",t.size=r,t=b.create(t),o.items.push(t),i.initialized?n():i.on("init",n)))}),{type:"toolbar",layout:"flow",items:s}},B=A,L=function(n,i){var e,t,r=[];if(w.each(!1===(t=(e=n).getParam("toolbar"))?[]:w.isArray(t)?w.grep(t,function(e){return 0<e.length}):function(e,t){for(var n=[],i=1;i<10;i++){var r=e["toolbar"+i];if(!r)break;n.push(r)}var o=e.toolbar?[e.toolbar]:[t];return 0<n.length?n:o}(e.settings,"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"),function(e){var t;(t=e)&&r.push(A(n,t,i))}),r.length)return{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ar