mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-04 05:44:32 +01:00
1 line
22 KiB
JavaScript
1 line
22 KiB
JavaScript
|
!function(){"use strict";var t,e,n,r,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},o=function(t){return function(){return t}},a=function(t){return t},u=o(!1),c=o(!0),s=u,f=c,d=function(){return m},m=(r={fold:function(t,e){return t()},is:s,isSome:s,isNone:f,getOr:n=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:n,orThunk:e,map:d,ap:d,each:function(){},bind:d,flatten:d,exists:s,forall:f,filter:d,equals:t=function(t){return t.isNone()},equals_:t,toArray:function(){return[]},toString:o("none()")},Object.freeze&&Object.freeze(r),r),g=function(n){var t=function(){return n},e=function(){return i},r=function(t){return t(n)},i={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:f,isNone:s,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return g(t(n))},ap:function(t){return t.fold(d,function(t){return g(t(n))})},each:function(t){t(n)},bind:r,flatten:t,exists:r,forall:r,filter:function(t){return t(n)?i:m},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(s,function(t){return e(n,t)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return i},v={some:g,none:d,from:function(t){return null===t||t===undefined?m:g(t)}},p=function(e){return function(t){return function(t){if(null===t)return"null";var e=typeof t;return"object"===e&&Array.prototype.isPrototypeOf(t)?"array":"object"===e&&String.prototype.isPrototypeOf(t)?"string":e}(t)===e}},w=p("string"),h=p("object"),b=p("function"),y=p("number"),O=Array.prototype.push,S=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!Array.prototype.isPrototypeOf(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);O.apply(e,t[n])}return e},A=(Array.prototype.slice,b(Array.from)&&Array.from,function(t){var n=v.none(),e=[],r=function(t){i()?a(t):e.push(t)},i=function(){return n.isSome()},o=function(t){!function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n,t)}(t,a)},a=function(e){n.each(function(t){setTimeout(function(){e(t)},0)})};return t(function(t){n=v.some(t),o(e),e=[]}),{get:r,map:function(n){return A(function(e){r(function(t){e(n(t))})})},isReady:i}}),D={nu:A,pure:function(e){return A(function(t){t(e)})}},x=function(e){var t=function(t){var r;e((r=t,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this;setTimeout(function(){r.apply(n,t)},0)}))},n=function(){return D.nu(t)};return{map:function(r){return x(function(n){t(function(t){var e=r(t);n(e)})})},bind:function(n){return x(function(e){t(function(t){n(t).get(e)})})},anonBind:function(n){return x(function(e){t(function(t){n.get(e)})})},toLazy:n,toCached:function(){var e=null;return x(function(t){null===e&&(e=n()),e.get(t)})},get:t}},T={nu:x,pure:function(e){return x(function(t){t(e)})}},C=function(n){return{is:function(t){return n===t},isValue:c,isError:u,getOr:o(n),getOrThunk:o(n),getOrDie:o(n),or:function(t){return C(n)},orThunk:function(t){return C(n)},fold:function(t,e){return e(n)},map:function(t){return C(t(n))},each:function(t){t(n)},bind:function(t){return t(n)},exists:function(t){return t(n)},forall:function(t){return t(n)},toOption:function(){return v.some(n)}}},_=function(n){return{is:u,isValue:u,isError:c,getOr:a,getOrThunk:function(t){return t()},getOrDie:function(){return t=String(n),function(){throw new Error(t)}();var t},or:function(t){return t},orThunk:function(t){return t()},fold:function(t,e){return t(n)},map:function(t){return _(n)},each:l,bind:function(t){return _(n)},exists:u,forall:c,toOption:v.none}},I={value:C,error:_},U=undefined&&undefined.__assign||function(){return(U=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},N=function(o){return U({},o,{toCached:function(){return N(o.toCached())
|