[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
xampp
/
htdocs
/
bem
/
assets
/
tinymce
/
js
/
tinymce
/
plugins
/
emoticons
/
[
Home
]
File: plugin.min.js
/** * 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.0-1 (2019-02-04) */ !function(){"use strict";var n,t,e,r,o,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t]},c=function(n){return function(){return n}},a=function(n){return n},l=c(!1),f=c(!0),s=l,d=f,m=function(){return g},g=(r={fold:function(n,t){return n()},is:s,isSome:s,isNone:d,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:function(){return null},getOrUndefined:function(){return undefined},or:e,orThunk:t,map:m,ap:m,each:function(){},bind:m,flatten:m,exists:s,forall:d,filter:m,equals:n=function(n){return n.isNone()},equals_:n,toArray:function(){return[]},toString:c("none()")},Object.freeze&&Object.freeze(r),r),y=function(e){var n=function(){return 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:d,isNone:s,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return y(n(e))},ap:function(n){return n.fold(m,function(n){return y(n(e))})},each:function(n){n(e)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){return n(e)?o:g},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(s,function(n){return t(e,n)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},p={some:y,none:m,from:function(n){return null===n||n===undefined?g:y(n)}},h=(o="function",function(n){return function(n){if(null===n)return"null";var t=typeof n;return"object"===t&&Array.prototype.isPrototypeOf(n)?"array":"object"===t&&String.prototype.isPrototypeOf(n)?"string":t}(n)===o}),v=function(n,t){for(var e=0,r=n.length;e<r;e++)if(t(n[e],e,n))return p.some(e);return p.none()},O=(Array.prototype.slice,h(Array.from)&&Array.from,function(n,t){return-1!==n.indexOf(t)}),b=function(n,t){return O(n.title.toLowerCase(),t)||(e=n.keywords,v(e,function(n){return O(n.toLowerCase(),t)}).isSome());var e},w=function(n,t,e){for(var r=[],o=t.toLowerCase(),i=e.fold(function(){return l},function(t){return function(n){return t<=n}}),u=0;u<n.length&&(0!==t.length&&!b(n[u],o)||(r.push({value:n[u]["char"],text:n[u].title,icon:n[u]["char"]}),!i(r.length)));u++);return r},A=function(n,t){return 0===n.startOffset||/\s/.test(t.charAt(n.startOffset-1))},k=function(n){var t=n,e=function(){return t};return{get:e,set:function(n){t=n},clone:function(){return k(e())}}},C="undefined"!=typeof window?window:Function("return this;")(),T=Object.keys,j=Object.hasOwnProperty,S=function(e){return{is:function(n){return e===n},isValue:f,isError:l,getOr:c(e),getOrThunk:c(e),getOrDie:c(e),or:function(n){return S(e)},orThunk:function(n){return S(e)},fold:function(n,t){return t(e)},map:function(n){return S(n(e))},mapError:function(n){return S(e)},each:function(n){n(e)},bind:function(n){return n(e)},exists:function(n){return n(e)},forall:function(n){return n(e)},toOption:function(){return p.some(e)}}},x=function(e){return{is:l,isValue:l,isError:f,getOr:a,getOrThunk:function(n){return n()},getOrDie:function(){return n=String(e),function(){throw new Error(n)}();var n},or:function(n){return n},orThunk:function(n){return n()},fold:function(n,t){return n(e)},map:function(n){return x(e)},mapError:function(n){return x(n(e))},each:u,bind:function(n){return x(e)},exists:l,forall:f,toOption:p.none}},L={value:S,error:x},_=tinymce.util.Tools.resolve("tinymce.dom.ScriptLoader"),D=tinymce.util.Tools.resolve("tinymce.util.Promise"),E="All",P={symbols:"Symbols",people:"People",animals_and_nature:"Animals and Nature",food_and_drink:"Food and Drink",activity:"Activity",travel_and_places:"Travel and Places",objects:"Objects",flags:"Flags"},F="emoticons_plugin_database",N=function(n){return t=P,e=n,j.call(t,e)?P[n]:n;var t,e},q=function(n,u){var e=k(p.none()),t=k(p.none());n.on("init",function(){_.ScriptLoader.loadScript(u,function(){var o={},i=[];(function(n){if(C.tinymce[F]){var t=L.value(C.tinymce[F]);return delete C.tinymce[F],t}return L.error("URL "+n+" did not contain the expected format for emoticons")})(u).fold(function(n){console.log(n),e.set(p.some({})),t.set(p.some([]))},function(n){!function(n,t){for(var e=T(n),r=0,o=e.length;r<o;r++){var i=e[r];t(n[i],i,n)}}(n,function(n,t){var e={title:t,keywords:n.keywords,"char":n["char"],category:N(n.category)},r=o[e.category]!==undefined?o[e.category]:[];o[e.category]=r.concat([e]),i.push(e)}),e.set(p.some(o)),t.set(p.some(i))})},function(){})});var r=function(){return t.get().getOr([])},o=function(){return e.get().isSome()&&t.get().isSome()};return{listCategories:function(){return[E].concat(T(e.get().getOr({})))},hasLoaded:o,waitForLoad:function(){return o()?D.resolve(!0):new D(function(n,t){var e=3,r=setInterval(function(){o()?(clearInterval(r),n(!0)):--e<0&&(console.log("Could not load emojis from url: "+u),clearInterval(r),t(!1))},500)})},listAll:r,listCategory:function(t){return t===E?r():e.get().bind(function(n){return p.from(n[t])}).getOr([])}}},I="pattern",z=function(o,c){var e,r,i,n={pattern:"",results:w(c.listAll(),"",p.some(300))},u=(e=function(n){var t,e,r,o,i,u=a.get();e=u,r=(t=n).getData(),o=c.listCategory(e),i=w(o,r[I],e===E?p.some(300):p.none()),t.setData({results:i})},r=200,i=null,{cancel:function(){null!==i&&(clearTimeout(i),i=null)},throttle:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];null!==i&&clearTimeout(i),i=setTimeout(function(){e.apply(null,n),i=null},r)}}),a=k(E),t={label:"Search",type:"input",name:I},l={type:"collection",name:"results"},f=function(){return{title:"Emoticons",size:"normal",body:{type:"tabpanel",tabs: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,n)}return r}(c.listCategories(),function(n){return{title:n,items:[t,l]}})},initialData:n,onTabChange:function(n,t){a.set(t),u.throttle(n)},onChange:u.throttle,onAction:function(n,t){var e,r;"results"===t.name&&(e=o,r=t.value,e.insertContent(r),n.close())},buttons:[{type:"cancel",text:"Close",primary:!0}]}},s=o.windowManager.open(f());s.focus(I),c.hasLoaded()||(s.block("Loading emoticons..."),c.waitForLoad().then(function(){s.redial(f()),u.throttle(s),s.focus(I),s.unblock()})["catch"](function(n){s.redial({title:"Emoticons",body:{type:"panel",items:[{type:"alertbanner",level:"error",icon:"warning",text:"<p>Could not load emoticons</p>"}]},buttons:[{type:"cancel",text:"Close",primary:!0}],initialData:{pattern:"",results:[]}}),s.focus(I),s.unblock()}))},M=function(n,t){var e=function(){return z(n,t)};n.ui.registry.addButton("emoticons",{tooltip:"Emoticons",icon:"emoji",onAction:e}),n.ui.registry.addMenuItem("emoticons",{text:"Emoticons...",icon:"emoji",onAction:e})},U=function(n,t){return n.getParam("emoticons_database_url",t+"/js/emojis"+n.suffix+".js")};i.add("emoticons",function(n,t){var r,o,e=U(n,t),i=q(n,e);M(n,i),o=i,(r=n).ui.registry.addAutocompleter("emoticons",{ch:":",columns:"auto",minChars:2,matches:A,fetch:function(t,e){return o.waitForLoad().then(function(){var n=o.listAll();return w(n,t,p.some(e))})},onAction:function(n,t,e){r.selection.setRng(t),r.insertContent(e),n.hide()}})}),function R(){}}();