!function(){function t(t,r){var i,a=r.feed;if(this.caseSensitive=r.caseSensitive,this.marker=r.hasOwnProperty("marker")?r.marker:"@",this.minChars=null!==r.minChars&&void 0!==r.minChars?r.minChars:2,!(i=r.pattern)){i=this.minChars;var o="\\"+this.marker+"[_a-zA-Z0-9À-ž]";o=(i?o+"{"+i+",}":o+"*")+"$";i=new RegExp(o)}this.pattern=i,this.cache=void 0===r.cache||r.cache,this.throttle=void 0!==r.throttle?r.throttle:200,this._autocomplete=new CKEDITOR.plugins.autocomplete(t,{textTestCallback:e(this.marker,this.minChars,this.pattern),dataCallback:n(a,this),itemTemplate:r.itemTemplate,outputTemplate:r.outputTemplate,throttle:this.throttle,itemsLimit:r.itemsLimit})}function e(t,e,n){function r(t,e){var r=t.slice(0,e).match(n);if(!r)return null;var i=t[r.index-1];return void 0===i||i.match(/\s+/)?{start:r.index,end:e}:null}return function(t){return t.collapsed?CKEDITOR.plugins.textMatch.match(t,r):null}}function n(t,e){return function(n,i){function a(t){t&&(t=CKEDITOR.tools.array.map(t,(function(t){return CKEDITOR.tools.object.merge(t,{name:e.marker+t.name})})),i(t))}var o=n.query;e.marker&&(o=o.substring(e.marker.length)),CKEDITOR.tools.array.isArray(t)?function(){var n=function(t){var e=1;return CKEDITOR.tools.array.reduce(t,(function(t,n){return t.push({name:n,id:e++}),t}),[])}(t).filter((function(t){return t=t.name,e.caseSensitive||(t=t.toLowerCase(),o=o.toLowerCase()),0===t.indexOf(o)}));a(n)}():"string"==typeof t?function(){var n=new CKEDITOR.template(t).output({encodedQuery:encodeURIComponent(o)});if(e.cache&&r[n])return a(r[n]);CKEDITOR.ajax.load(n,(function(t){t=JSON.parse(t),e.cache&&null!==t&&(r[n]=t),a(t)}))}():t({query:o,marker:e.marker},a)}}CKEDITOR._.mentions={cache:{}};var r=CKEDITOR._.mentions.cache;CKEDITOR.plugins.add("mentions",{requires:"autocomplete,textmatch,ajax",instances:[],init:function(e){var n=this;e.on("instanceReady",(function(){CKEDITOR.tools.array.forEach(e.config.mentions||[],(function(r){n.instances.push(new t(e,r))}))}))},isSupportedEnvironment:function(t){return t.plugins.autocomplete.isSupportedEnvironment(t)}}),t.prototype={destroy:function(){this._autocomplete.destroy()}},CKEDITOR.plugins.mentions=t}();