/*
Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license/
*/
(function(){function ma(a){return a.match(/^(?:https?:\/\/)?(?:(?:www|m).)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/)?RegExp.$1:!1}function oa(a){var h=Math.floor(a/3600),e=Math.floor(a/60%60);a%=60;var b=function(a){a=String(a);return 2<=a.length?a:"0"+a};return 0<h?b(h)+":"+b(e)+":"+b(a):b(e)+":"+b(a)}function pa(a){var h=function(e){return a.match(new RegExp("(\\d+)"+e))?parseInt(RegExp.$1,10):0};return 3600*h("h")+60*h("m")+h("s")}window.CKEDITOR&&
window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,h={timestamp:"P8U8",version:"4.22.1",revision:"0",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var e=document.getElementsByTagName("script"),g=0;g<e.length;g++){var m=e[g].src.match(a);if(m){b=m[1];break}}-1==b.indexOf(":/")&&"//"!=b.slice(0,2)&&(b=0===b.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+
b:location.href.match(/^[^\?]*\/(?:)/)[0]+b);if(!b)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return b}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);return a=this.appendTimestamp(a)},appendTimestamp:function(a){if(!this.timestamp||"/"===a.charAt(a.length-1)||/[&?]t=/.test(a))return a;var b=0<=a.indexOf("?")?"\x26":"?";return a+b+"t\x3d"+this.timestamp},
domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",a,!1),window.removeEventListener("load",a,!1),b()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),window.detachEvent("onload",a),b())}catch(m){}}function b(){for(var a;a=g.shift();)a()}var g=[];return function(b){function c(){try{document.documentElement.doScroll("left")}catch(f){setTimeout(c,1);return}a()}g.push(b);"complete"===document.readyState&&
setTimeout(a,1);if(1==g.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);b=!1;try{b=!window.frameElement}catch(k){}document.documentElement.doScroll&&b&&c()}}}()},e=window.CKEDITOR_GETURL;if(e){var b=h.getUrl;h.getUrl=function(a){return e.call(h,a)||b.call(h,a)}}return h}()),function(){var a={};CKEDITOR.event||(CKEDITOR.event=
function(){},CKEDITOR.event.implementOn=function(a){var e=CKEDITOR.event.prototype,b;for(b in e)null==a[b]&&(a[b]=e[b])},CKEDITOR.event.prototype=function(){function h(a){var l=e(this);return l[a]||(l[a]=new b(a))}var e=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},b=function(a){this.name=a;this.listeners=[]};b.prototype={getListenerIndex:function(a){for(var b=0,g=this.listeners;b<g.length;b++)if(g[b].fn==a)return b;return-1}};return{define:function(a,b){var g=
h.call(this,a);CKEDITOR.tools.extend(g,b,!0)},on:function(b,e,g,m,c){function k(c,n,k,r){c={name:b,sender:this,editor:c,data:n,listenerData:m,stop:k,cancel:r,removeListener:f};return!1===e.call(g,c)?a:c.data}function f(){n.removeListener(b,e)}var n=this,r=h.call(this,b);if(0>r.getListenerIndex(e)){r=r.listeners;g||(g=this);isNaN(c)&&(c=10);k.fn=e;k.priority=c;for(var v=r.length-1;0<=v;v--)if(r[v].priority<=c)return r.splice(v+1,0,k),{removeListener:f};r.unshift(k)}return{removeListener:f}},once:function(){var a=
Array.prototype.slice.call(arguments),b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var b=0,l=function(){b=1},g=0,m=function(){g=1};return function(c,k,f){var n=e(this)[c];c=b;var r=g;b=g=0;if(n){var h=n.listeners;if(h.length)for(var h=h.slice(0),u,q=0;q<h.length;q++){if(n.errorProof)try{u=h[q].call(this,
f,k,l,m)}catch(t){}else u=h[q].call(this,f,k,l,m);u===a?g=1:"undefined"!=typeof u&&(k=u);if(b||g)break}}k=g?!1:"undefined"==typeof k?!0:k;b=c;g=r;return k}}(),fireOnce:function(a,b,g){b=this.fire(a,b,g);delete e(this)[a];return b},removeListener:function(a,b){var g=e(this)[a];if(g){var m=g.getListenerIndex(b);0<=m&&g.listeners.splice(m,1)}},removeAllListeners:function(){var a=e(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=e(this)[a])&&0<a.listeners.length}}}())}(),CKEDITOR.editor||
(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,h){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fire.call(this,a,h,this)},CKEDITOR.editor.prototype.fireOnce=function(a,h){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,a,h,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var a=
navigator.userAgent.toLowerCase(),h=a.match(/edge[ \/](\d+.?\d*)/),e=-1<a.indexOf("trident/"),e=!(!h&&!e),e={ie:e,edge:!!h,webkit:!e&&-1<a.indexOf(" applewebkit/"),air:-1<a.indexOf(" adobeair/"),mac:-1<a.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||10>document.documentMode),mobile:-1<a.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return!1;var a=document.domain,b=window.location.hostname;return a!=b&&a!="["+b+"]"},
secure:"https:"==location.protocol};e.gecko="Gecko"==navigator.product&&!e.webkit&&!e.ie;e.webkit&&(-1<a.indexOf("chrome")?e.chrome=!0:e.safari=!0);var b=0;e.ie&&(b=h?parseFloat(h[1]):e.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode,e.ie9Compat=9==b,e.ie8Compat=8==b,e.ie7Compat=7==b,e.ie6Compat=7>b||e.quirks);e.gecko&&(h=a.match(/rv:([\d\.]+)/))&&(h=h[1].split("."),b=1E4*h[0]+100*(h[1]||0)+1*(h[2]||0));e.air&&(b=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));
e.webkit&&(b=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));e.version=b;e.isCompatible=!(e.ie&&7>b)&&!(e.gecko&&4E4>b)&&!(e.webkit&&534>b);e.hidpi=2<=window.devicePixelRatio;e.needsBrFiller=e.gecko||e.webkit||e.ie&&10<b;e.needsNbspFiller=e.ie&&11>b;e.cssClass="cke_browser_"+(e.ie?"ie":e.gecko?"gecko":e.webkit?"webkit":"unknown");e.quirks&&(e.cssClass+=" cke_browser_quirks");e.ie&&(e.cssClass+=" cke_browser_ie"+(e.quirks?"6 cke_browser_iequirks":e.version));e.air&&(e.cssClass+=" cke_browser_air");
e.iOS&&(e.cssClass+=" cke_browser_ios");e.hidpi&&(e.cssClass+=" cke_hidpi");return e}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=
function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a=CKEDITOR.loadFullCore,h=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status="basic_ready",a&&a._load?a():h&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*h))})})();CKEDITOR.status="basic_loaded"}(),"use strict",CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(a,h){CKEDITOR.verbosity&
CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:a,additionalData:h})},CKEDITOR.error=function(a,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:a,additionalData:h})},CKEDITOR.on("log",function(a){if(window.console&&window.console.log){var h=console[a.data.type]?a.data.type:"log",e=a.data.errorCode;if(a=a.data.additionalData)console[h]("[CKEDITOR] Error code: "+e+".",a);else console[h]("[CKEDITOR] Error code: "+e+".");console[h]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+
e)}},null,null,999),CKEDITOR.dom={},function(){function a(a,c,f){this._minInterval=a;this._context=f;this._lastOutput=this._scheduledTimer=0;this._output=CKEDITOR.tools.bind(c,f||{});var b=this;this.input=function(){function a(){b._lastOutput=(new Date).getTime();b._scheduledTimer=0;b._call()}if(!b._scheduledTimer||!1!==b._reschedule()){var c=(new Date).getTime()-b._lastOutput;c<b._minInterval?b._scheduledTimer=setTimeout(a,b._minInterval-c):a()}}}function h(c,f,b){a.call(this,c,f,b);this._args=[];
var k=this;this.input=CKEDITOR.tools.override(this.input,function(a){return function(){k._args=Array.prototype.slice.call(arguments);a.call(this)}})}var e=[],b=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",d=/&/g,l=/>/g,g=/</g,m=/"/g,c=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,k={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},f=function(a,c){return"#"==c[0]?String.fromCharCode(parseInt(c.slice(1),10)):k[c]};CKEDITOR.on("reset",function(){e=[]});CKEDITOR.tools=
{arrayCompare:function(a,c){if(!a&&!c)return!0;if(!a||!c||a.length!=c.length)return!1;for(var f=0;f<a.length;f++)if(a[f]!=c[f])return!1;return!0},getIndex:function(a,c){for(var f=0;f<a.length;++f)if(c(a[f]))return f;return-1},clone:function(a){var c;if(a&&a instanceof Array){c=[];for(var f=0;f<a.length;f++)c[f]=CKEDITOR.tools.clone(a[f]);return c}if(null===a||"object"!=typeof a||a instanceof String||a instanceof Number||a instanceof Boolean||a instanceof Date||a instanceof RegExp||a.nodeType||a.window===
a)return a;c=new a.constructor;for(f in a)c[f]=CKEDITOR.tools.clone(a[f]);return c},capitalize:function(a,c){return a.charAt(0).toUpperCase()+(c?a.slice(1):a.slice(1).toLowerCase())},extend:function(a){var c=arguments.length,f,b;"boolean"==typeof(f=arguments[c-1])?c--:"boolean"==typeof(f=arguments[c-2])&&(b=arguments[c-1],c-=2);for(var k=1;k<c;k++){var d=arguments[k]||{};CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(d),function(c){if(!0===f||null==a[c])if(!b||c in b)a[c]=d[c]})}return a},
prototypedCopy:function(a){var c=function(){};c.prototype=a;return new c},copy:function(a){var c={},f;for(f in a)c[f]=a[f];return c},isArray:function(a){return"[object Array]"==Object.prototype.toString.call(a)},isEmpty:function(a){for(var c in a)if(a.hasOwnProperty(c))return!1;return!0},cssVendorPrefix:function(a,c,f){if(f)return b+a+":"+c+";"+a+":"+c;f={};f[a]=c;f[b+a]=c;return f},cssStyleToDomStyle:function(){var a=document.createElement("div").style,c="undefined"!=typeof a.cssFloat?"cssFloat":
"undefined"!=typeof a.styleFloat?"styleFloat":"float";return function(a){return"float"==a?c:a.replace(/-./g,function(a){return a.substr(1).toUpperCase()})}}(),buildStyleHtml:function(a){a=[].concat(a);for(var c,f=[],b=0;b<a.length;b++)if(c=a[b])/@import|[{}]/.test(c)?f.push("\x3cstyle\x3e"+c+"\x3c/style\x3e"):(c=CKEDITOR.appendTimestamp(c),f.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+c+'"\x3e'));return f.join("")},htmlEncode:function(a){return void 0===a||null===a?"":String(a).replace(d,
"\x26amp;").replace(l,"\x26gt;").replace(g,"\x26lt;")},htmlDecode:function(a){return a.replace(c,f)},htmlEncodeAttr:function(a){return CKEDITOR.tools.htmlEncode(a).replace(m,"\x26quot;")},htmlDecodeAttr:function(a){return CKEDITOR.tools.htmlDecode(a)},transformPlainTextToHtml:function(a,c){var f=c==CKEDITOR.ENTER_BR,b=this.htmlEncode(a.replace(/\r\n/g,"\n")),b=b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),k=c==CKEDITOR.ENTER_P?"p":"div";if(!f){var d=/\n{2}/g;if(d.test(b))var m="\x3c"+k+"\x3e",g=
"\x3c/"+k+"\x3e",b=m+b.replace(d,function(){return g+m})+g}b=b.replace(/\n/g,"\x3cbr\x3e");f||(b=b.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+k+"\x3e)"),function(a){return CKEDITOR.tools.repeat(a,2)}));b=b.replace(/^ | $/g,"\x26nbsp;");return b=b.replace(/(>|\s) /g,function(a,c){return c+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var a="e",c=0;8>c;c++)a+=
Math.floor(65536*(1+Math.random())).toString(16).substring(1);return a},override:function(a,c){var f=c(a);f.prototype=a.prototype;return f},setTimeout:function(a,c,f,b,k){k||(k=window);f||(f=k);return k.setTimeout(function(){b?a.apply(f,[].concat(b)):a.apply(f)},c||0)},debounce:function(a,c){var f;return function(){var b=this,k=arguments;clearTimeout(f);f=setTimeout(function(){f=null;a.apply(b,k)},c)}},throttle:function(a,c,f){return new this.buffers.throttle(a,c,f)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;
return function(c){return c.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(c){return c.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(c){return c.replace(a,"")}}(),indexOf:function(a,c){if("function"==typeof c)for(var f=0,b=a.length;f<b;f++){if(c(a[f]))return f}else{if(a.indexOf)return a.indexOf(c);f=0;for(b=a.length;f<b;f++)if(a[f]===c)return f}return-1},search:function(a,c){var f=CKEDITOR.tools.indexOf(a,c);return 0<=f?a[f]:null},bind:function(a,
c){var f=Array.prototype.slice.call(arguments,2);return function(){return a.apply(c,f.concat(Array.prototype.slice.call(arguments)))}},createClass:function(a){var c=a.$,f=a.base,b=a.privates||a._,k=a.proto;a=a.statics;!c&&(c=function(){f&&this.base.apply(this,arguments)});if(b)var d=c,c=function(){var a=this._||(this._={}),c;for(c in b){var f=b[c];a[c]="function"==typeof f?CKEDITOR.tools.bind(f,this):f}d.apply(this,arguments)};f&&(c.prototype=this.prototypedCopy(f.prototype),c.prototype.constructor=
c,c.base=f,c.baseProto=f.prototype,c.prototype.base=function p(){this.base=f.prototype.base;f.apply(this,arguments);this.base=p});k&&this.extend(c.prototype,k,!0);a&&this.extend(c,a,!0);return c},addFunction:function(a,c){return e.push(function(){return a.apply(c||this,arguments)})-1},removeFunction:function(a){e[a]=null},callFunction:function(a){var c=e[a];return c&&c.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,c;return function(f){c=CKEDITOR.tools.trim(f+
"")+"px";return a.test(c)?c:f||""}}(),convertToPx:function(){var a,c;return function(f){if(!a||a.isDetached())a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"\x3e\x3c/div\x3e',CKEDITOR.document),CKEDITOR.document.getBody().append(a);if(!/%$/.test(f)){var b=0>parseFloat(f);b&&(f=f.replace("-",""));a.setStyle("width",f);c=a.getClientRect();f=Math.round(c.width);return b?-f:f}return f}}(),repeat:function(a,c){return Array(c+
1).join(a)},tryThese:function(){for(var a,c=0,f=arguments.length;c<f;c++){var b=arguments[c];try{a=b();break}catch(k){}}return a},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var c=arguments,f=this;window.setTimeout(function(){a.apply(f,c)},0)}},normalizeCssText:function(a,c){var f=[],b,k=CKEDITOR.tools.parseCssText(a,!0,c);for(b in k)f.push(b+":"+k[b]);f.sort();return f.length?f.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,
function(a,c,f,b){a=[c,f,b];for(c=0;3>c;c++)a[c]=("0"+parseInt(a[c],10).toString(16)).slice(-2);return"#"+a.join("")})},normalizeHex:function(a){return a.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(a,c,f,b){a=c.toLowerCase();3==a.length&&(a=a.split(""),a=[a[0],a[0],a[1],a[1],a[2],a[2]].join(""));return"#"+a+b})},_isValidColorFormat:function(a){if(!a)return!1;a=a.replace(/\s+/g,"");return/^[a-z0-9()#%,./]+$/i.test(a)},parseCssText:function(a,c,f){var b={};f&&(a=(new CKEDITOR.dom.element("span")).setAttribute("style",
a).getAttribute("style")||"");a&&(a=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(a)));if(!a||";"==a)return b;a.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,f,k){c&&(f=f.toLowerCase(),"font-family"==f&&(k=k.replace(/\s*,\s*/g,",")),k=CKEDITOR.tools.trim(k));b[f]=k});return b},writeCssText:function(a,c){var f,b=[];for(f in a)b.push(f+":"+a[f]);c&&b.sort();return b.join("; ")},objectCompare:function(a,c,f){var b;if(!a&&!c)return!0;if(!a||!c)return!1;
for(b in a)if(a[b]!=c[b])return!1;if(!f)for(b in c)if(a[b]!=c[b])return!1;return!0},objectKeys:function(a){return CKEDITOR.tools.object.keys(a)},convertArrayToObject:function(a,c){var f={};1==arguments.length&&(c=!0);for(var b=0,k=a.length;b<k;++b)f[a[b]]=c;return f},getStyledSpans:function(a,c){var f=CKEDITOR.env.ie&&8==CKEDITOR.env.version?a.toUpperCase():a,f=c.find("span[style*\x3d"+f+"]").toArray();return CKEDITOR.tools.array.filter(f,function(c){return!!c.getStyle(a)})},fixDomain:function(){for(var a;;)try{a=
window.parent.document.domain;break}catch(c){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a},eventsBuffer:function(a,c,f){return new this.buffers.event(a,c,f)},enableHtml5Elements:function(a,c){for(var f="abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video".split(" "),b=f.length,k;b--;)k=a.createElement(f[b]),c&&a.appendChild(k)},checkIfAnyArrayItemMatches:function(a,
c){for(var f=0,b=a.length;f<b;++f)if(a[f].match(c))return!0;return!1},checkIfAnyObjectPropertyMatches:function(a,c){for(var f in a)if(f.match(c))return!0;return!1},keystrokeToString:function(a,c){var f=this.keystrokeToArray(a,c);f.display=f.display.join("+");f.aria=f.aria.join("+");return f},keystrokeToArray:function(a,c){var f=c&16711680,b=c&65535,k=CKEDITOR.env.mac,d=[],m=[];f&CKEDITOR.CTRL&&(d.push(k?"⌘":a[17]),m.push(k?a[224]:a[17]));f&CKEDITOR.ALT&&(d.push(k?"⌥":a[18]),m.push(a[18]));f&CKEDITOR.SHIFT&&
(d.push(k?"⇧":a[16]),m.push(a[16]));b&&(a[b]?(d.push(a[b]),m.push(a[b])):(d.push(String.fromCharCode(b)),m.push(String.fromCharCode(b))));return{display:d,aria:m}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(a){a=a.toLowerCase();for(var c=document.cookie.split(";"),f,b,k=0;k<c.length;k++)if(f=c[k].split("\x3d"),b=decodeURIComponent(CKEDITOR.tools.trim(f[0]).toLowerCase()),b===a)return decodeURIComponent(1<f.length?
f[1]:"");return null},setCookie:function(a,c){document.cookie=encodeURIComponent(a)+"\x3d"+encodeURIComponent(c)+";path\x3d/"},getCsrfToken:function(){var a=CKEDITOR.tools.getCookie("ckCsrfToken");if(!a||40!=a.length){var a=[],c="";if(window.crypto&&window.crypto.getRandomValues)a=new Uint8Array(40),window.crypto.getRandomValues(a);else for(var f=0;40>f;f++)a.push(Math.floor(256*Math.random()));for(f=0;f<a.length;f++)var b="abcdefghijklmnopqrstuvwxyz0123456789".charAt(a[f]%36),c=c+(.5<Math.random()?
b.toUpperCase():b);a=c;CKEDITOR.tools.setCookie("ckCsrfToken",a)}return a},escapeCss:function(a){if(a)if(window.CSS&&CSS.escape)a=CSS.escape(a);else{a=String(a);for(var c=a.length,f=-1,b,k="",d=a.charCodeAt(0);++f<c;)b=a.charCodeAt(f),k=0==b?k+"�":127==b||1<=b&&31>=b||0==f&&48<=b&&57>=b||1==f&&48<=b&&57>=b&&45==d?k+("\\"+b.toString(16)+" "):0==f&&1==c&&45==b?k+("\\"+a.charAt(f)):128<=b||45==b||95==b||48<=b&&57>=b||65<=b&&90>=b||97<=b&&122>=b?k+a.charAt(f):k+("\\"+a.charAt(f));a=k}else a="";return a},
getMouseButton:function(a){return(a=a&&a.data?a.data.$:a)?CKEDITOR.tools.normalizeMouseButton(a.button):!1},normalizeMouseButton:function(a,c){if(!CKEDITOR.env.ie||9<=CKEDITOR.env.version&&!CKEDITOR.env.ie6Compat)return a;for(var f=[[CKEDITOR.MOUSE_BUTTON_LEFT,1],[CKEDITOR.MOUSE_BUTTON_MIDDLE,4],[CKEDITOR.MOUSE_BUTTON_RIGHT,2]],b=0;b<f.length;b++){var k=f[b];if(k[0]===a&&c)return k[1];if(!c&&k[1]===a)return k[0]}},convertHexStringToBytes:function(a){var c=[],f=a.length/2,b;for(b=0;b<f;b++)c.push(parseInt(a.substr(2*
b,2),16));return c},convertBytesToBase64:function(a){var c="",f=a.length,b;for(b=0;b<f;b+=3){var k=a.slice(b,b+3),d=k.length,m=[],g;if(3>d)for(g=d;3>g;g++)k[g]=0;m[0]=(k[0]&252)>>2;m[1]=(k[0]&3)<<4|k[1]>>4;m[2]=(k[1]&15)<<2|(k[2]&192)>>6;m[3]=k[2]&63;for(g=0;4>g;g++)c=g<=d?c+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(m[g]):c+"\x3d"}return c},style:{parse:{_borderStyle:"none hidden dotted dashed solid double groove ridge inset outset".split(" "),_widthRegExp:/^(thin|medium|thick|[\+-]?\d+(\.\d+)?[a-z%]+|[\+-]?0+(\.0+)?|\.\d+[a-z%]+)$/,
_rgbaRegExp:/rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi,_hslaRegExp:/hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi,background:function(a){var c={},f=this._findColor(a);f.length&&(c.color=f[0],CKEDITOR.tools.array.forEach(f,function(c){a=a.replace(c,"")}));if(a=CKEDITOR.tools.trim(a))c.unprocessed=a;return c},margin:function(a){return CKEDITOR.tools.style.parse.sideShorthand(a,function(a){return a.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)||
["0px"]})},sideShorthand:function(a,c){function f(a){b.top=k[a[0]];b.right=k[a[1]];b.bottom=k[a[2]];b.left=k[a[3]]}var b={},k=c?c(a):a.split(/\s+/);switch(k.length){case 1:f([0,0,0,0]);break;case 2:f([0,1,0,1]);break;case 3:f([0,1,2,1]);break;case 4:f([0,1,2,3])}return b},border:function(a){return CKEDITOR.tools.style.border.fromCssRule(a)},_findColor:function(a){var c=[],f=CKEDITOR.tools.array,c=c.concat(a.match(this._rgbaRegExp)||[]),c=c.concat(a.match(this._hslaRegExp)||[]);return c=c.concat(f.filter(a.split(/\s+/),
function(a){return a.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:a.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(a,c,f){var b=[];this.forEach(a,function(k,d){c.call(f,k,d,a)&&b.push(k)});return b},find:function(a,c,f){for(var b=a.length,k=0;k<b;){if(c.call(f,a[k],k,a))return a[k];k++}},forEach:function(a,c,f){var b=a.length,k;for(k=0;k<b;k++)c.call(f,a[k],k,a)},map:function(a,c,f){for(var b=[],k=0;k<a.length;k++)b.push(c.call(f,a[k],k,a));return b},reduce:function(a,
c,f,b){for(var k=0;k<a.length;k++)f=c.call(b,f,a[k],k,a);return f},every:function(a,c,f){if(!a.length)return!0;c=this.filter(a,c,f);return a.length===c.length},some:function(a,c,f){for(var b=0;b<a.length;b++)if(c.call(f,a[b],b,a))return!0;return!1},zip:function(a,c){return CKEDITOR.tools.array.map(a,function(a,f){return[a,c[f]]})},unique:function(a){return this.filter(a,function(c,f){return f===CKEDITOR.tools.array.indexOf(a,c)})}},object:{DONT_ENUMS:"toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),
entries:function(a){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(a),function(c){return[c,a[c]]})},values:function(a){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(a),function(c){return a[c]})},keys:function(a){var c=Object.prototype.hasOwnProperty,f=[],b=CKEDITOR.tools.object.DONT_ENUMS;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(!a||"object"!==typeof a)){c=[];if("string"===typeof a)for(f=0;f<a.length;f++)c.push(String(f));return c}for(var k in a)f.push(k);if(CKEDITOR.env.ie&&
9>CKEDITOR.env.version)for(k=0;k<b.length;k++)c.call(a,b[k])&&f.push(b[k]);return f},findKey:function(a,c){if("object"!==typeof a)return null;for(var f in a)if(a[f]===c)return f;return null},merge:function(a,c){var f=CKEDITOR.tools,b=f.clone(a),k=f.clone(c);f.array.forEach(f.object.keys(k),function(a){b[a]="object"===typeof k[a]&&"object"===typeof b[a]?f.object.merge(b[a],k[a]):k[a]});return b}},getAbsoluteRectPosition:function(a,c){function f(a){if(a){var c=a.getClientRect();b.top+=c.top;b.left+=
c.left;"x"in b&&"y"in b&&(b.x+=c.x,b.y+=c.y);f(a.getWindow().getFrame())}}var b=CKEDITOR.tools.copy(c);f(a.getFrame());var k=CKEDITOR.document.getWindow().getScrollPosition();b.top+=k.y;b.left+=k.x;"x"in b&&"y"in b&&(b.y+=k.y,b.x+=k.x);b.right=b.left+b.width;b.bottom=b.top+b.height;return b}};a.prototype={reset:function(){this._lastOutput=0;this._clearTimer()},_reschedule:function(){return!1},_call:function(){this._output()},_clearTimer:function(){this._scheduledTimer&&clearTimeout(this._scheduledTimer);
this._scheduledTimer=0}};h.prototype=CKEDITOR.tools.prototypedCopy(a.prototype);h.prototype._reschedule=function(){this._scheduledTimer&&this._clearTimer()};h.prototype._call=function(){this._output.apply(this._context,this._args)};CKEDITOR.tools.buffers={};CKEDITOR.tools.buffers.event=a;CKEDITOR.tools.buffers.throttle=h;CKEDITOR.tools.style.border=CKEDITOR.tools.createClass({$:function(a){a=a||{};this.width=a.width;this.style=a.style;this.color=a.color;this._.normalize()},_:{normalizeMap:{color:[[/windowtext/g,
"black"]]},normalize:function(){for(var a in this._.normalizeMap){var c=this[a];c&&(this[a]=CKEDITOR.tools.array.reduce(this._.normalizeMap[a],function(a,c){return a.replace(c[0],c[1])},c))}}},proto:{toString:function(){return CKEDITOR.tools.array.filter([this.width,this.style,this.color],function(a){return!!a}).join(" ")}},statics:{fromCssRule:function(a){var c={},f=a.split(/\s+/g);a=CKEDITOR.tools.style.parse._findColor(a);a.length&&(c.color=a[0]);CKEDITOR.tools.array.forEach(f,function(a){c.style||
-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,a)?!c.width&&CKEDITOR.tools.style.parse._widthRegExp.test(a)&&(c.width=a):c.style=a});return new CKEDITOR.tools.style.border(c)},splitCssValues:function(a,c){c=c||{};var f=CKEDITOR.tools.array.reduce(["width","style","color"],function(f,b){var k=a["border-"+b]||c[b];f[b]=k?CKEDITOR.tools.style.parse.sideShorthand(k):null;return f},{});return CKEDITOR.tools.array.reduce(["top","right","bottom","left"],function(c,b){var k={},d;for(d in f){var m=
a["border-"+b+"-"+d];k[d]=m?m:f[d]&&f[d][b]}c["border-"+b]=new CKEDITOR.tools.style.border(k);return c},{})}}});CKEDITOR.tools.array.indexOf=CKEDITOR.tools.indexOf;CKEDITOR.tools.array.isArray=CKEDITOR.tools.isArray;CKEDITOR.MOUSE_BUTTON_LEFT=0;CKEDITOR.MOUSE_BUTTON_MIDDLE=1;CKEDITOR.MOUSE_BUTTON_RIGHT=2}(),CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,h=function(a,c){for(var b=CKEDITOR.tools.clone(a),d=1;d<arguments.length;d++){c=arguments[d];for(var m in c)delete b[m]}return b},e={},b={},
d={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},l={command:1,link:1,meta:1,noscript:1,script:1,style:1},g={},m={"#":1},c={center:1,dir:1,noframes:1};a(e,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,
mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},m,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(b,d,e,c);h={a:h(e,{a:1,button:1}),abbr:e,address:b,area:g,article:b,aside:b,audio:a({source:1,track:1},b),b:e,base:g,bdi:e,bdo:e,blockquote:b,body:b,br:g,button:h(e,{a:1,button:1}),canvas:e,caption:b,cite:e,code:e,col:g,colgroup:{col:1},command:g,
datalist:a({option:1},e),dd:b,del:e,details:a({summary:1},b),dfn:e,div:b,dl:{dt:1,dd:1},dt:b,em:e,embed:g,fieldset:a({legend:1},b),figcaption:b,figure:a({figcaption:1},b),footer:b,form:b,h1:e,h2:e,h3:e,h4:e,h5:e,h6:e,head:a({title:1,base:1},l),header:b,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:g,html:a({head:1,body:1},b,l),i:e,iframe:m,img:g,input:g,ins:e,kbd:e,keygen:g,label:e,legend:e,li:b,link:g,main:b,map:b,mark:e,menu:a({li:1},b),meta:g,meter:h(e,{meter:1}),nav:b,noscript:a({link:1,meta:1,style:1},
e),object:a({param:1},e),ol:{li:1},optgroup:{option:1},option:m,output:e,p:e,param:g,pre:e,progress:h(e,{progress:1}),q:e,rp:e,rt:e,ruby:a({rp:1,rt:1},e),s:e,samp:e,script:m,section:b,select:{optgroup:1,option:1},small:e,source:g,span:e,strong:e,style:m,sub:e,summary:a({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},e),sup:e,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:b,textarea:m,tfoot:{tr:1},th:b,thead:{tr:1},time:h(e,{time:1}),title:m,tr:{th:1,td:1},track:g,u:e,ul:{li:1},"var":e,
video:a({source:1,track:1},b),wbr:g,acronym:e,applet:a({param:1},b),basefont:g,big:e,center:b,dialog:g,dir:{li:1},font:e,isindex:g,noframes:b,strike:e,tt:e};a(h,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},d,c),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,
aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,main:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1},$inline:e,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},h.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1,
option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,mark:1,meter:1,output:1,q:1,ruby:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,
td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}});return h}(),CKEDITOR.dom.event=function(a){this.$=a},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var a=this.getKey();if(this.$.ctrlKey||this.$.metaKey)a+=CKEDITOR.CTRL;
this.$.shiftKey&&(a+=CKEDITOR.SHIFT);this.$.altKey&&(a+=CKEDITOR.ALT);return a},preventDefault:function(a){var h=this.$;h.preventDefault?h.preventDefault():h.returnValue=!1;a&&this.stopPropagation()},stopPropagation:function(){var a=this.$;a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},getTarget:function(){var a=this.$.target||this.$.srcElement;return a?new CKEDITOR.dom.node(a):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var a=this.getTarget().getDocument().$;
return{x:this.$.pageX||this.$.clientX+(a.documentElement.scrollLeft||a.body.scrollLeft),y:this.$.pageY||this.$.clientY+(a.documentElement.scrollTop||a.body.scrollTop)}}},CKEDITOR.CTRL=1114112,CKEDITOR.SHIFT=2228224,CKEDITOR.ALT=4456448,CKEDITOR.EVENT_PHASE_CAPTURING=1,CKEDITOR.EVENT_PHASE_AT_TARGET=2,CKEDITOR.EVENT_PHASE_BUBBLING=3,CKEDITOR.HISTORY_NATIVE=1,CKEDITOR.HISTORY_HASH=2,CKEDITOR.HISTORY_OFF=0,CKEDITOR.dom.domObject=function(a){a&&(this.$=a)},CKEDITOR.dom.domObject.prototype=function(){var a=
function(a,e){return function(b){"undefined"!=typeof CKEDITOR&&a.fire(e,new CKEDITOR.dom.event(b))}};return{getPrivate:function(){var a;(a=this.getCustomData("_"))||this.setCustomData("_",a={});return a},on:function(h){var e=this.getCustomData("_cke_nativeListeners");e||(e={},this.setCustomData("_cke_nativeListeners",e));e[h]||(e=e[h]=a(this,h),this.$.addEventListener?this.$.addEventListener(h,e,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+h,e));return CKEDITOR.event.prototype.on.apply(this,
arguments)},removeListener:function(a){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(a)){var e=this.getCustomData("_cke_nativeListeners"),b=e&&e[a];b&&(this.$.removeEventListener?this.$.removeEventListener(a,b,!1):this.$.detachEvent&&this.$.detachEvent("on"+a,b),delete e[a])}},removeAllListeners:function(){try{var a=this.getCustomData("_cke_nativeListeners"),e;for(e in a){var b=a[e];this.$.detachEvent?this.$.detachEvent("on"+e,b):this.$.removeEventListener&&this.$.removeEventListener(e,
b,!1);delete a[e]}}catch(d){if(!CKEDITOR.env.edge||-2146828218!==d.number)throw d;}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),function(a){var h={};CKEDITOR.on("reset",function(){h={}});a.equals=function(a){try{return a&&a.$===this.$}catch(b){return!1}};a.setCustomData=function(a,b){var d=this.getUniqueId();(h[d]||(h[d]={}))[a]=b;return this};a.getCustomData=function(a){var b=this.$["data-cke-expando"];return(b=b&&h[b])&&a in b?b[a]:null};a.removeCustomData=function(a){var b=this.$["data-cke-expando"],
b=b&&h[b],d,l;b&&(d=b[a],l=a in b,delete b[a]);return l?d:null};a.clearCustomData=function(){this.removeAllListeners();var a=this.getUniqueId();a&&delete h[a]};a.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(a)}(CKEDITOR.dom.domObject.prototype),CKEDITOR.dom.node=function(a){return a?new CKEDITOR.dom[a.nodeType==CKEDITOR.NODE_DOCUMENT?"document":a.nodeType==CKEDITOR.NODE_ELEMENT?"element":a.nodeType==
CKEDITOR.NODE_TEXT?"text":a.nodeType==CKEDITOR.NODE_COMMENT?"comment":a.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](a):this},CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject,CKEDITOR.NODE_ELEMENT=1,CKEDITOR.NODE_DOCUMENT=9,CKEDITOR.NODE_TEXT=3,CKEDITOR.NODE_COMMENT=8,CKEDITOR.NODE_DOCUMENT_FRAGMENT=11,CKEDITOR.POSITION_IDENTICAL=0,CKEDITOR.POSITION_DISCONNECTED=1,CKEDITOR.POSITION_FOLLOWING=2,CKEDITOR.POSITION_PRECEDING=4,CKEDITOR.POSITION_IS_CONTAINED=8,CKEDITOR.POSITION_CONTAINS=
16,CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(a,h){a.append(this,h);return a},clone:function(a,h){function e(b){b["data-cke-expando"]&&(b["data-cke-expando"]=!1);if(b.nodeType==CKEDITOR.NODE_ELEMENT||b.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(h||b.nodeType!=CKEDITOR.NODE_ELEMENT||b.removeAttribute("id",!1),a){b=b.childNodes;for(var d=0;d<b.length;d++)e(b[d])}}function b(d){if(d.type==CKEDITOR.NODE_ELEMENT||d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var g=
d.getName();":"==g[0]&&d.renameNode(g.substring(1))}if(a)for(g=0;g<d.getChildCount();g++)b(d.getChild(g))}}var d=this.$.cloneNode(a);e(d);d=new CKEDITOR.dom.node(d);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&b(d);return d},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,
a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var h=[],e=this.getDocument().$.documentElement,b=this;b&&b!=e;){var d=b.getParent();d&&h.unshift(this.getIndex.call(b,a));b=d}return h},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){function h(a,b){var d=b?a.getNext():a.getPrevious();return d&&d.type==CKEDITOR.NODE_TEXT?d.isEmpty()?h(d,b):d:
null}var e=this,b=-1,d;if(!this.getParent()||a&&e.type==CKEDITOR.NODE_TEXT&&e.isEmpty()&&!h(e)&&!h(e,!0))return-1;do if(!a||e.equals(this)||e.type!=CKEDITOR.NODE_TEXT||!d&&!e.isEmpty())b++,d=e.type==CKEDITOR.NODE_TEXT;while(e=e.getPrevious());return b},getNextSourceNode:function(a,h,e){if(e&&!e.call){var b=e;e=function(a){return!a.equals(b)}}a=!a&&this.getFirst&&this.getFirst();var d;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&e&&!1===e(this,!0))return null;a=this.getNext()}for(;!a&&(d=(d||this).getParent());){if(e&&
!1===e(d,!0))return null;a=d.getNext()}return!a||e&&!1===e(a)?null:h&&h!=a.type?a.getNextSourceNode(!1,h,e):a},getPreviousSourceNode:function(a,h,e){if(e&&!e.call){var b=e;e=function(a){return!a.equals(b)}}a=!a&&this.getLast&&this.getLast();var d;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&e&&!1===e(this,!0))return null;a=this.getPrevious()}for(;!a&&(d=(d||this).getParent());){if(e&&!1===e(d,!0))return null;a=d.getPrevious()}return!a||e&&!1===e(a)?null:h&&a.type!=h?a.getPreviousSourceNode(!1,h,e):
a},getPrevious:function(a){var h=this.$,e;do e=(h=h.previousSibling)&&10!=h.nodeType&&new CKEDITOR.dom.node(h);while(e&&a&&!a(e));return e},getNext:function(a){var h=this.$,e;do e=(h=h.nextSibling)&&new CKEDITOR.dom.node(h);while(e&&a&&!a(e));return e},getParent:function(a){var h=this.$.parentNode;return h&&(h.nodeType==CKEDITOR.NODE_ELEMENT||a&&h.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(h):null},getParents:function(a){var h=this,e=[];do e[a?"push":"unshift"](h);while(h=h.getParent());
return e},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;var h=this.contains?this:this.getParent();do if(h.contains(a))return h;while(h=h.getParent());return null},getPosition:function(a){var h=this.$,e=a.$;if(h.compareDocumentPosition)return h.compareDocumentPosition(e);if(h==e)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(h.contains){if(h.contains(e))return CKEDITOR.POSITION_CONTAINS+
CKEDITOR.POSITION_PRECEDING;if(e.contains(h))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in h)return 0>h.sourceIndex||0>e.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:h.sourceIndex<e.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}h=this.getAddress();a=a.getAddress();for(var e=Math.min(h.length,a.length),b=0;b<e;b++)if(h[b]!=a[b])return h[b]<a[b]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return h.length<a.length?CKEDITOR.POSITION_CONTAINS+
CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(a,h){var e=this.$,b,d;h||(e=e.parentNode);"function"==typeof a?(d=!0,b=a):(d=!1,b=function(b){b="string"==typeof b.nodeName?b.nodeName.toLowerCase():"";return"string"==typeof a?b==a:b in a});for(;e;){if(b(d?new CKEDITOR.dom.node(e):e))return new CKEDITOR.dom.node(e);try{e=e.parentNode}catch(l){e=null}}return null},hasAscendant:function(a,h){var e=this.$;h||(e=e.parentNode);for(;e;){if(e.nodeName&&
e.nodeName.toLowerCase()==a)return!0;e=e.parentNode}return!1},move:function(a,h){a.append(this.remove(),h)},remove:function(a){var h=this.$,e=h.parentNode;if(e){if(a)for(;a=h.firstChild;)e.insertBefore(h.removeChild(a),h);e.removeChild(h)}return this},replace:function(a){this.insertBefore(a);a.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var a;this.getFirst&&(a=this.getFirst());){if(a.type==CKEDITOR.NODE_TEXT){var h=CKEDITOR.tools.ltrim(a.getText()),e=a.getLength();if(h)h.length<
e&&(a.split(e-h.length),this.$.removeChild(this.$.firstChild));else{a.remove();continue}}break}},rtrim:function(){for(var a;this.getLast&&(a=this.getLast());){if(a.type==CKEDITOR.NODE_TEXT){var h=CKEDITOR.tools.rtrim(a.getText()),e=a.getLength();if(h)h.length<e&&(a.split(h.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));else{a.remove();continue}}break}CKEDITOR.env.needsBrFiller&&(a=this.$.lastChild)&&1==a.type&&"br"==a.nodeName.toLowerCase()&&a.parentNode.removeChild(a)},isReadOnly:function(a){var h=
this;this.type!=CKEDITOR.NODE_ELEMENT&&(h=this.getParent());CKEDITOR.env.edge&&h&&h.is("textarea","input")&&(a=!0);if(!a&&h&&"undefined"!=typeof h.$.isContentEditable)return!(h.$.isContentEditable||h.data("cke-editable"));for(;h;){if(h.data("cke-editable"))return!1;if(h.hasAttribute("contenteditable"))return"false"==h.getAttribute("contenteditable");h=h.getParent()}return!0}}),CKEDITOR.dom.window=function(a){CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,
CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var a=this.$.document,h="CSS1Compat"==a.compatMode;return{width:(h?a.documentElement.clientWidth:a.body.clientWidth)||0,height:(h?a.documentElement.clientHeight:a.body.clientHeight)||0}},getScrollPosition:function(){var a=this.$;if("pageXOffset"in a)return{x:a.pageXOffset||0,y:a.pageYOffset||0};a=a.document;return{x:a.documentElement.scrollLeft||a.body.scrollLeft||0,y:a.documentElement.scrollTop||
a.body.scrollTop||0}},getFrame:function(){var a=this.$.frameElement;return a?new CKEDITOR.dom.element.get(a):null}}),CKEDITOR.dom.document=function(a){CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(a){a=CKEDITOR.appendTimestamp(a);if(this.$.createStyleSheet)this.$.createStyleSheet(a);else{var h=new CKEDITOR.dom.element("link");h.setAttributes({rel:"stylesheet",
type:"text/css",href:a});this.getHead().append(h)}},appendStyleText:function(a){if(this.$.createStyleSheet){var h=this.$.createStyleSheet("");h.cssText=a}else{var e=new CKEDITOR.dom.element("style",this);e.append(new CKEDITOR.dom.text(a,this));this.getHead().append(e)}return h||e.$.sheet},createElement:function(a,h){var e=new CKEDITOR.dom.element(a,this);h&&(h.attributes&&e.setAttributes(h.attributes),h.styles&&e.setStyles(h.styles));return e},createText:function(a){return new CKEDITOR.dom.text(a,
this)},focus:function(){this.getWindow().focus()},getActive:function(){var a;try{a=this.$.activeElement}catch(h){return null}return new CKEDITOR.dom.element(a)},getById:function(a){return(a=this.$.getElementById(a))?new CKEDITOR.dom.element(a):null},getByAddress:function(a,h){for(var e=this.$.documentElement,b=0;e&&b<a.length;b++){var d=a[b];if(h)for(var l=-1,g=0;g<e.childNodes.length;g++){var m=e.childNodes[g];if(!0!==h||3!=m.nodeType||!m.previousSibling||3!=m.previousSibling.nodeType)if(l++,l==
d){e=m;break}}else e=e.childNodes[d]}return e?new CKEDITOR.dom.node(e):null},getElementsByTag:function(a,h){CKEDITOR.env.ie&&8>=document.documentMode||!h||(a=h+":"+a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a=a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},
getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},
_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");a||(a=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(a,!0),this.setCustomData("html5ShivFrag",a));return a}}),CKEDITOR.dom.nodeList=function(a){this.$=a},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){return 0>a||a>=this.$.length?null:(a=this.$[a])?new CKEDITOR.dom.node(a):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(a){return new CKEDITOR.dom.node(a)})}},
CKEDITOR.dom.element=function(a,h){"string"==typeof a&&(a=(h?h.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.element.get=function(a){return(a="string"==typeof a?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(a,h){var e=new CKEDITOR.dom.element("div",h);e.setHtml(a);return e.getFirst().remove()},CKEDITOR.dom.element.setMarker=
function(a,h,e,b){var d=h.getCustomData("list_marker_id")||h.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),l=h.getCustomData("list_marker_names")||h.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[d]=h;l[e]=1;return h.setCustomData(e,b)},CKEDITOR.dom.element.clearAllMarkers=function(a){for(var h in a)CKEDITOR.dom.element.clearMarkers(a,a[h],1)},CKEDITOR.dom.element.clearMarkers=function(a,h,e){var b=h.getCustomData("list_marker_names"),
d=h.getCustomData("list_marker_id"),l;for(l in b)h.removeCustomData(l);h.removeCustomData("list_marker_names");e&&(h.removeCustomData("list_marker_id"),delete a[d])},function(){function a(a,c){return-1<(" "+a+" ").replace(l," ").indexOf(" "+c+" ")}function h(a){var c=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),c=!1);return function(){c||a.removeAttribute("id")}}function e(a,c){var b=CKEDITOR.tools.escapeCss(a.$.id);return"#"+b+" "+c.split(/,\s*/).join(", #"+b+" ")}function b(a){for(var c=
0,b=0,f=g[a].length;b<f;b++)c+=parseFloat(this.getComputedStyle(g[a][b])||0,10)||0;return c}var d=document.createElement("_").classList,d="undefined"!==typeof d&&null!==String(d.add).match(/\[Native code\]/gi),l=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:d?function(a){this.$.classList.add(a);return this}:function(b){var c=this.$.className;c&&(a(c,b)||(c+=" "+b));this.$.className=c||b;return this},removeClass:d?function(a){var c=this.$;c.classList.remove(a);
c.className||c.removeAttribute("class");return this}:function(b){var c=this.getAttribute("class");c&&a(c,b)&&((c=c.replace(new RegExp("(?:^|\\s+)"+b+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",c):this.removeAttribute("class"));return this},hasClass:function(b){return a(this.$.className,b)},append:function(a,c){"string"==typeof a&&(a=this.getDocument().createElement(a));c?this.$.insertBefore(a.$,this.$.firstChild):this.$.appendChild(a.$);return a},appendHtml:function(a){if(this.$.childNodes.length){var c=
new CKEDITOR.dom.element("div",this.getDocument());c.setHtml(a);c.moveChildren(this)}else this.setHtml(a)},appendText:function(a){null!=this.$.text&&CKEDITOR.env.ie&&9>CKEDITOR.env.version?this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&&a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type",
"_moz"),this.append(a))}},breakParent:function(a,c){var b=new CKEDITOR.dom.range(this.getDocument());b.setStartAfter(this);b.setEndAfter(a);var f=b.extractContents(!1,c||!1),d;b.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(b=new CKEDITOR.dom.element("div");d=f.getFirst();)d.$.style.backgroundColor&&(d.$.style.backgroundColor=d.$.style.backgroundColor),b.append(d);b.insertAfter(this);b.remove(!0)}else f.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&
16)}:function(a){var c=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?c.contains(a.getParent().$):c!=a.$&&c.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(c){}}return function(c){c?CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(!0));
return a.innerHTML},getClientRect:function(a){var c=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!c.width&&(c.width=c.right-c.left);!c.height&&(c.height=c.bottom-c.top);return a?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),c):c},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var c=this.$;if(this.getParent())return c.innerHTML=a;var b=this.getDocument()._getHtml5ShivFrag();b.appendChild(c);c.innerHTML=a;b.removeChild(c);return a}catch(f){this.$.innerHTML="";
c=new CKEDITOR.dom.element("body",this.getDocument());c.$.innerHTML=a;for(c=c.getChildren();c.count();)this.append(c.getItem(0));return a}}:function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p");a.innerHTML="x";a=a.textContent;return function(c){this.$[a?"textContent":"innerText"]=c}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a=
"className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":return a=this.$.getAttribute(a,2),0!==a&&0===this.$.tabIndex&&(a=null),a;case "checked":return a=this.$.attributes.getNamedItem(a),(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):
null}return this.$.getAttribute(a,2)}:a}(),getAttributes:function(a){var c={},b=this.$.attributes,f;a=CKEDITOR.tools.isArray(a)?a:[];for(f=0;f<b.length;f++)-1===CKEDITOR.tools.indexOf(a,b[f].name)&&(c[b[f].name]=b[f].value);return c},getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getClientSize:function(){return{width:this.$.clientWidth,height:this.$.clientHeight}},getComputedStyle:document.defaultView&&document.defaultView.getComputedStyle?function(a){var c=this.getWindow().$.getComputedStyle(this.$,
null);return c?c.getPropertyValue(a):""}:function(a){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)]},getDtd:function(){var a=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return a};return a},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:function(){var a=this.$.tabIndex;return 0!==a||CKEDITOR.dtd.$tabIndex[this.getName()]||0===parseInt(this.getAttribute("tabindex"),10)?a:-1},getText:function(){return this.$.textContent||this.$.innerText||""},
getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||null},getName:function(){var a=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&8>=document.documentMode){var c=this.$.scopeName;"HTML"!=c&&(a=c.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var c=this.$.firstChild;(c=c&&new CKEDITOR.dom.node(c))&&a&&!a(c)&&(c=c.getNext(a));
return c},getLast:function(a){var c=this.$.lastChild;(c=c&&new CKEDITOR.dom.node(c))&&a&&!a(c)&&(c=c.getPrevious(a));return c},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];for(var c=0;c<arguments.length;c++)if(arguments[c]==a)return!0;return!1},isEditable:function(a){var c=this.getName();return this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||
CKEDITOR.dtd.$nonEditable[c]||CKEDITOR.dtd.$empty[c]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:!1!==a?(a=CKEDITOR.dtd[c]||CKEDITOR.dtd.span,!(!a||!a["#"])):!0},isIdentical:function(a){var c=this.clone(0,1);a=a.clone(0,1);c.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);a.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(c.$.isEqualNode)return c.$.style.cssText=
CKEDITOR.tools.normalizeCssText(c.$.style.cssText),a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText),c.$.isEqualNode(a.$);c=c.getOuterHtml();a=a.getOuterHtml();if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&this.is("a")){var b=this.getParent();b.type==CKEDITOR.NODE_ELEMENT&&(b=b.clone(),b.setHtml(c),c=b.getHtml(),b.setHtml(a),a=b.getHtml())}return c==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),c,b;a&&CKEDITOR.env.webkit&&
(c=this.getWindow(),!c.equals(CKEDITOR.document.getWindow())&&(b=c.$.frameElement)&&(a=(new CKEDITOR.dom.element(b)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var a=this.getChildren(),c=0,b=a.count();c<b;c++){var f=a.getItem(c);if(f.type!=CKEDITOR.NODE_ELEMENT||!f.data("cke-bookmark"))if(f.type==CKEDITOR.NODE_ELEMENT&&!f.isEmptyInlineRemoveable()||f.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(f.getText()))return!1}return!0},
hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var a=this.$.attributes,c=0;c<a.length;c++){var b=a[c];switch(b.nodeName){case "class":if(this.getAttribute("class"))return!0;case "data-cke-expando":continue;default:if(b.specified)return!0}}return!1}:function(){var a=this.$.attributes,c=a.length,b={"data-cke-expando":1,_moz_dirty:1};return 0<c&&(2<c||!b[a[0].nodeName]||2==c&&!b[a[1].nodeName])},hasAttribute:function(){function a(c){var b=this.$.attributes.getNamedItem(c);
if("input"==this.getName())switch(c){case "class":return 0<this.$.className.length;case "checked":return!!this.$.checked;case "value":return c=this.getAttribute("type"),"checkbox"==c||"radio"==c?"on"!=this.$.value:!!this.$.value}return b?b.specified:!1}return CKEDITOR.env.ie?8>CKEDITOR.env.version?function(c){return"name"==c?!!this.$.name:a.call(this,c)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,c){var b=this.$;
a=a.$;if(b!=a){var f;if(c)for(;f=b.lastChild;)a.insertBefore(b.removeChild(f),a.firstChild);else for(;f=b.firstChild;)a.appendChild(b.removeChild(f))}},mergeSiblings:function(){function a(c,b,f){if(b&&b.type==CKEDITOR.NODE_ELEMENT){for(var d=[];b.data("cke-bookmark")||b.isEmptyInlineRemoveable();)if(d.push(b),b=f?b.getNext():b.getPrevious(),!b||b.type!=CKEDITOR.NODE_ELEMENT)return;if(c.isIdentical(b)){for(var g=f?c.getLast():c.getFirst();d.length;)d.shift().move(c,!f);b.moveChildren(c,!f);b.remove();
g&&g.type==CKEDITOR.NODE_ELEMENT&&g.mergeSiblings()}}}return function(c){if(!1===c||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var a=function(a,b){this.$.setAttribute(a,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(c,b){"class"==c?this.$.className=b:"style"==c?this.$.style.cssText=b:"tabindex"==c?
this.$.tabIndex=b:"checked"==c?this.$.checked=b:"contenteditable"==c?a.call(this,"contentEditable",b):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(c,b){if("src"==c&&b.match(/^http:\/\//))try{a.apply(this,arguments)}catch(f){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var c in a)this.setAttribute(c,a[c]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};
return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var c=0;c<a.length;c++)this.removeAttribute(a[c]);else for(c in a=a||this.getAttributes(),a)a.hasOwnProperty(c)&&this.removeAttribute(c)},removeStyle:function(a){var c=this.$.style;if(c.removeProperty||"border"!=a&&"margin"!=a&&"padding"!=
a)c.removeProperty?c.removeProperty(a):c.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a)),this.$.style.cssText||this.removeAttribute("style");else{var b=["top","left","right","bottom"],f;"border"==a&&(f=["color","style","width"]);for(var c=[],d=0;d<b.length;d++)if(f)for(var g=0;g<f.length;g++)c.push([a,b[d],f[g]].join("-"));else c.push([a,b[d]].join("-"));for(a=0;a<c.length;a++)this.removeStyle(c[a])}},setStyle:function(a,c){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=c;return this},setStyles:function(a){for(var c in a)this.setStyle(c,
a[c]);return this},setOpacity:function(a){CKEDITOR.env.ie&&9>CKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,c=this.getElementsByTag("*"),b=0,f=c.count();b<f;b++)a=c.getItem(b),a.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var a=
this;"html"!=a.getName();){if("static"!=a.getComputedStyle("position"))return a;a=a.getParent()}return null},getDocumentPosition:function(a){var c=0,b=0,f=this.getDocument(),d=f.getBody(),g="BackCompat"==f.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?8!==CKEDITOR.env.version:1)){var e=this.$.getBoundingClientRect(),l=f.$.documentElement,h=l.clientTop||d.$.clientTop||0,t=l.clientLeft||d.$.clientLeft||0,z=!0;CKEDITOR.env.ie&&(z=f.getDocumentElement().contains(this),
f=f.getBody().contains(this),z=g&&f||!g&&z);z&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(c=d.$.scrollLeft||l.scrollLeft,b=d.$.scrollTop||l.scrollTop):(b=g?d.$:l,c=b.scrollLeft,b=b.scrollTop),c=e.left+c-t,b=e.top+b-h)}else for(h=this,t=null;h&&"body"!=h.getName()&&"html"!=h.getName();){c+=h.$.offsetLeft-h.$.scrollLeft;b+=h.$.offsetTop-h.$.scrollTop;h.equals(this)||(c+=h.$.clientLeft||0,b+=h.$.clientTop||0);for(;t&&!t.equals(h);)c-=t.$.scrollLeft,b-=t.$.scrollTop,t=t.getParent();
t=h;h=(e=h.$.offsetParent)?new CKEDITOR.dom.element(e):null}a&&(e=this.getWindow(),h=a.getWindow(),!e.equals(h)&&e.$.frameElement&&(a=(new CKEDITOR.dom.element(e.$.frameElement)).getDocumentPosition(a),c+=a.x,b+=a.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||g||(c+=this.$.clientLeft?1:0,b+=this.$.clientTop?1:0);return{x:c,y:b}},scrollIntoView:function(a){var c=this.getParent();if(c){do if((c.$.clientWidth&&c.$.clientWidth<c.$.scrollWidth||c.$.clientHeight&&c.$.clientHeight<
c.$.scrollHeight)&&!c.is("body")&&this.scrollIntoParent(c,a,1),c.is("html")){var b=c.getWindow();try{var f=b.$.frameElement;f&&(c=new CKEDITOR.dom.element(f))}catch(d){}}while(c=c.getParent())}},scrollIntoParent:function(a,c,b){var f,d,g,e;function l(c,b){/body|html/.test(a.getName())?a.getWindow().$.scrollBy(c,b):(a.$.scrollLeft+=c,a.$.scrollTop+=b)}function h(a,c){var b={x:0,y:0};if(!a.is(z?"body":"html")){var f=a.$.getBoundingClientRect();b.x=f.left;b.y=f.top}f=a.getWindow();f.equals(c)||(f=h(CKEDITOR.dom.element.get(f.$.frameElement),
c),b.x+=f.x,b.y+=f.y);return b}function t(a,b){return parseInt(a.getComputedStyle("margin-"+b)||0,10)||0}!a&&(a=this.getWindow());g=a.getDocument();var z="BackCompat"==g.$.compatMode;a instanceof CKEDITOR.dom.window&&(a=z?g.getBody():g.getDocumentElement());CKEDITOR.env.webkit&&(g=this.getEditor(!1))&&(g._.previousScrollTop=null);g=a.getWindow();d=h(this,g);var p=h(a,g),A=this.$.offsetHeight;f=this.$.offsetWidth;var y=a.$.clientHeight,x=a.$.clientWidth;g=d.x-t(this,"left")-p.x||0;e=d.y-t(this,"top")-
p.y||0;f=d.x+f+t(this,"right")-(p.x+x)||0;d=d.y+A+t(this,"bottom")-(p.y+y)||0;(0>e||0<d)&&l(0,!0===c?e:!1===c?d:0>e?e:d);b&&(0>g||0<f)&&l(0>g?g:f,0)},setState:function(a,b,k){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+"_off");this.removeClass(b+"_disabled");k&&this.setAttribute("aria-pressed",!0);k&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");
k&&this.setAttribute("aria-disabled",!0);k&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),k&&this.removeAttribute("aria-pressed"),k&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,b){var k=this.$.attributes;b=b||{};for(var f=0;f<k.length;f++){var d=
k[f],g=d.nodeName.toLowerCase(),e;if(!(g in b))if("checked"==g&&(e=this.getAttribute(g)))a.setAttribute(g,e);else if(!CKEDITOR.env.ie||this.hasAttribute(g))e=this.getAttribute(g),null===e&&(e=d.nodeValue),a.setAttribute(g,e)}""!==this.$.style.cssText&&(a.$.style.cssText=this.$.style.cssText)},renameNode:function(a){if(this.getName()!=a){var b=this.getDocument();a=new CKEDITOR.dom.element(a,b);this.copyAttributes(a);this.moveChildren(a);this.getParent(!0)&&this.$.parentNode.replaceChild(a.$,this.$);
a.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=a.$;delete this.getName}},getChild:function(){function a(b,k){var f=b.childNodes;if(0<=k&&k<f.length)return f[k]}return function(b){var k=this.$;if(b.slice)for(b=b.slice();0<b.length&&k;)k=a(k,b.shift());else k=a(k,b);return k?new CKEDITOR.dom.node(k):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT&&b.hasClass("cke_enable_context_menu")}this.on("contextmenu",
function(b){b.data.getTarget().getAscendant(a,!0)||b.data.preventDefault()})},getDirection:function(a){return a?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(a,b){a="data-"+a;if(void 0===b)return this.getAttribute(a);!1===b?this.removeAttribute(a):this.setAttribute(a,b);return null},getEditor:function(a){var b=CKEDITOR.instances,k,f,d;a=
a||void 0===a;for(k in b)if(f=b[k],f.element.equals(this)&&f.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!a&&(d=f.editable())&&(d.equals(this)||d.contains(this)))return f;return null},find:function(a){var b=h(this);a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(e(this,a)));b();return a},findOne:function(a){var b=h(this);a=this.$.querySelector(e(this,a));b();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,b,k){if(!(k||b&&this.type!=b))var f=a(this);if(!1!==f){k=this.getChildren();
for(var d=0;d<k.count();d++)f=k.getItem(d),f.type==CKEDITOR.NODE_ELEMENT?f.forEach(a,b):b&&f.type!=b||a(f)}},fireEventHandler:function(a,b){var k="on"+a,f=this.$;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version){var d=f.ownerDocument.createEventObject(),g;for(g in b)d[g]=b[g];f.fireEvent(k,d)}else f[f[a]?a:k](b)},isDetached:function(){var a=this.getDocument(),b=a.getDocumentElement();return b.equals(this)||b.contains(this)?!CKEDITOR.env.ie||8<CKEDITOR.env.version&&!CKEDITOR.env.quirks?!a.$.defaultView:
!1:!0}});var g={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};CKEDITOR.dom.element.prototype.setSize=function(a,c,k){"number"==typeof c&&(!k||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(c-=b.call(this,a)),this.setStyle(a,c+"px"))};CKEDITOR.dom.element.prototype.getSize=function(a,c){var k=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||
0;c&&(k-=b.call(this,a));return k}}(),CKEDITOR.dom.documentFragment=function(a){a=a||CKEDITOR.document;this.$=a.type==CKEDITOR.NODE_DOCUMENT?a.$.createDocumentFragment():a},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(a){a=a.$;a.parentNode.insertBefore(this.$,a.nextSibling)},getHtml:function(){var a=new CKEDITOR.dom.element("div");this.clone(1,1).appendTo(a);return a.getHtml().replace(/\s*data-cke-expando=".*?"/g,
"")}},!0,{append:1,appendBogus:1,clone:1,getFirst:1,getHtml:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1}),CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.document.prototype,!0,{find:1,findOne:1}),function(){function a(a,b){var f=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(f.collapsed)return this.end(),
null;f.optimize()}var c,k=f.startContainer;c=f.endContainer;var d=f.startOffset,g=f.endOffset,e,l=this.guard,n=this.type,h=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var m=c.type==CKEDITOR.NODE_ELEMENT?c:c.getParent(),D=c.type==CKEDITOR.NODE_ELEMENT?c.getChild(g):c.getNext();this._.guardLTR=function(a,b){return(!b||!m.equals(a))&&(!D||!a.equals(D))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(f.root))}}if(a&&!this._.guardRTL){var C=k.type==CKEDITOR.NODE_ELEMENT?k:k.getParent(),
H=k.type==CKEDITOR.NODE_ELEMENT?d?k.getChild(d-1):null:k.getPrevious();this._.guardRTL=function(a,b){return(!b||!C.equals(a))&&(!H||!a.equals(H))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(f.root))}}var F=a?this._.guardRTL:this._.guardLTR;e=l?function(a,b){return!1===F(a,b)?!1:l(a,b)}:F;this.current?c=this.current[h](!1,n,e):(a?c.type==CKEDITOR.NODE_ELEMENT&&(c=0<g?c.getChild(g-1):!1===e(c,!0)?null:c.getPreviousSourceNode(!0,n,e)):(c=k,c.type==CKEDITOR.NODE_ELEMENT&&((c=c.getChild(d))||(c=!1===
e(k,!0)?null:k.getNextSourceNode(!0,n,e)))),c&&!1===e(c)&&(c=null));for(;c&&!this._.end;){this.current=c;if(!this.evaluator||!1!==this.evaluator(c)){if(!b)return c}else if(b&&this.evaluator)return!1;c=c[h](!1,n,e)}this.end();return this.current=null}function h(b){for(var f,c=null;f=a.call(this,b);)c=f;return c}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return a.call(this)},previous:function(){return a.call(this,
1)},checkForward:function(){return!1!==a.call(this,0,1)},checkBackward:function(){return!1!==a.call(this,1,1)},lastForward:function(){return h.call(this)},lastBackward:function(){return h.call(this,1)},reset:function(){delete this.current;this._={}}}});var e={block:1,"list-item":1,table:1,"table-row-group":1,"table-header-group":1,"table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1,"table-caption":1},b={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=
function(a){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in b||!e[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a)):!0};CKEDITOR.dom.walker.blockBoundary=function(a){return function(b){return!(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,b){function f(a){return a&&a.getName&&"span"==a.getName()&&a.data("cke-bookmark")}
return function(c){var k,d;k=c&&c.type!=CKEDITOR.NODE_ELEMENT&&(d=c.getParent())&&f(d);k=a?k:k||f(c);return!!(b^k)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var f;b&&b.type==CKEDITOR.NODE_TEXT&&(f=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);return!!(a^f)}};CKEDITOR.dom.walker.invisible=function(a){var b=CKEDITOR.dom.walker.whitespaces(),f=CKEDITOR.env.webkit?1:0;return function(c){b(c)?c=1:(c.type==CKEDITOR.NODE_TEXT&&
(c=c.getParent()),c=c.$.offsetWidth<=f);return!!(a^c)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(f){return!!(b^f.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!l(a)&&!g(a)}return function(f){var c=CKEDITOR.env.needsBrFiller?f.is&&f.is("br"):f.getText&&d.test(f.getText());c&&(c=f.getParent(),f=f.getNext(b),c=c.isBlockBoundary()&&(!f||f.type==CKEDITOR.NODE_ELEMENT&&f.isBlockBoundary()));return!!(a^c)}};CKEDITOR.dom.walker.temp=function(a){return function(b){b.type!=
CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b=b&&b.hasAttribute("data-cke-temp");return!!(a^b)}};var d=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,l=CKEDITOR.dom.walker.whitespaces(),g=CKEDITOR.dom.walker.bookmark(),m=CKEDITOR.dom.walker.temp(),c=function(a){return g(a)||l(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)};CKEDITOR.dom.walker.ignored=function(a){return function(b){b=l(b)||g(b)||m(b);return!!(a^b)}};var k=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=
function(a){return function(b){for(var f=0,c=b.getChildCount();f<c;++f)if(!k(b.getChild(f)))return!!a;return!a}};var f=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var b={},f;for(f in a)CKEDITOR.dtd[f]["#"]&&(b[f]=1);return b}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=function(a){return function(b){b=k(b)?!1:b.type==CKEDITOR.NODE_TEXT||b.type==CKEDITOR.NODE_ELEMENT&&(b.is(CKEDITOR.dtd.$inline)||b.is("hr")||
"false"==b.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&b.is(n)&&f(b))?!0:!1;return!!(a^b)}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(c(a));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&d.test(a.getText()))?a:!1}}(),"use strict",CKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=!0;var h=a instanceof CKEDITOR.dom.document;this.document=
h?a:a.getDocument();this.root=h?a.getBody():a},function(){function a(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function h(a,b,c,k,d){function g(a,b,c,f){var k=c?a.getPrevious():a.getNext();if(f&&h)return k;y||f?b.append(a.clone(!0,d),c):(a.remove(),m&&b.append(a,c));return k}function e(){var a,b,c,f=Math.min(J.length,E.length);for(a=0;a<f;a++)if(b=J[a],c=E[a],!b.equals(c))return a;return a-1}function l(){var b=P-1,c=F&&L&&
!x.equals(w);b<I-1||b<M-1||c?(c?a.moveToPosition(w,CKEDITOR.POSITION_BEFORE_START):M==b+1&&H?a.moveToPosition(E[b],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(E[b+1],CKEDITOR.POSITION_BEFORE_START),k&&(b=J[b+1])&&b.type==CKEDITOR.NODE_ELEMENT&&(c=CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',a.document),c.insertAfter(b),b.mergeSiblings(!1),a.moveToBookmark({startNode:c}))):a.collapse(!0)}a.optimizeBookmark();var h=0===
b,m=1==b,y=2==b;b=y||m;var x=a.startContainer,w=a.endContainer,B=a.startOffset,D=a.endOffset,C,H,F,L,G,N;if(y&&w.type==CKEDITOR.NODE_TEXT&&(x.equals(w)||x.type===CKEDITOR.NODE_ELEMENT&&x.getFirst().equals(w)))c.append(a.document.createText(w.substring(B,D)));else{w.type==CKEDITOR.NODE_TEXT?y?N=!0:w=w.split(D):0<w.getChildCount()?D>=w.getChildCount()?(w=w.getChild(D-1),H=!0):w=w.getChild(D):L=H=!0;x.type==CKEDITOR.NODE_TEXT?y?G=!0:x.split(B):0<x.getChildCount()?0===B?(x=x.getChild(B),C=!0):x=x.getChild(B-
1):F=C=!0;for(var J=x.getParents(),E=w.getParents(),P=e(),I=J.length-1,M=E.length-1,O=c,X,S,Y,da=-1,U=P;U<=I;U++){S=J[U];Y=S.getNext();for(U!=I||S.equals(E[U])&&I<M?b&&(X=O.append(S.clone(0,d))):C?g(S,O,!1,F):G&&O.append(a.document.createText(S.substring(B)));Y;){if(Y.equals(E[U])){da=U;break}Y=g(Y,O)}O=X}O=c;for(U=P;U<=M;U++)if(c=E[U],Y=c.getPrevious(),c.equals(J[U]))b&&(O=O.getChild(0));else{U!=M||c.equals(J[U])&&M<I?b&&(X=O.append(c.clone(0,d))):H?g(c,O,!1,L):N&&O.append(a.document.createText(c.substring(0,
D)));if(U>da)for(;Y;)Y=g(Y,O,!0);O=X}y||l()}}function e(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!0),k=CKEDITOR.dom.walker.bogus();return function(d){return c(d)||b(d)?!0:k(d)&&!a?a=!0:d.type==CKEDITOR.NODE_TEXT&&(d.hasAscendant("pre")||CKEDITOR.tools.trim(d.getText()).length)||d.type==CKEDITOR.NODE_ELEMENT&&!d.is(l)?!1:!0}}function b(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(k){return c(k)||b(k)?!0:!a&&g(k)||
k.type==CKEDITOR.NODE_ELEMENT&&k.is(CKEDITOR.dtd.$removeEmpty)}}function d(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&k(a)&&(b=a);return c(a)&&!(g(a)&&a.equals(b))})}}var l={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},g=CKEDITOR.dom.walker.bogus(),m=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,c=CKEDITOR.dom.walker.editable(),k=CKEDITOR.dom.walker.ignored(!0);
CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);
this.collapsed||h(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||h(this,0,null,a)},extractContents:function(a,b){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||h(this,1,c,a,"undefined"==typeof b?!0:b);return c},equals:function(a){return this.startOffset===a.startOffset&&this.endOffset===a.endOffset&&this.startContainer.equals(a.startContainer)&&this.endContainer.equals(a.endContainer)},createBookmark:function(a){function b(a){return a.getAscendant(function(a){var b;
if(b=a.data&&a.data("cke-temp"))b=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],a.getAttribute("id"));return b},!0)}var c=this.startContainer,k=this.endContainer,d=this.collapsed,g,e,l,h;g=this.document.createElement("span");g.data("cke-bookmark",1);g.setStyle("display","none");g.setHtml("\x26nbsp;");a&&(l="cke_bm_"+CKEDITOR.tools.getNextNumber(),g.setAttribute("id",l+(d?"C":"S")));d||(e=g.clone(),e.setHtml("\x26nbsp;"),a&&e.setAttribute("id",l+"E"),h=this.clone(),b(k)&&(k=b(k),
h.moveToPosition(k,CKEDITOR.POSITION_AFTER_END)),h.collapse(),h.insertNode(e));h=this.clone();b(c)&&(k=b(c),h.moveToPosition(k,CKEDITOR.POSITION_BEFORE_START));h.collapse(!0);h.insertNode(g);e?(this.setStartAfter(g),this.setEndBefore(e)):this.moveToPosition(g,CKEDITOR.POSITION_AFTER_END);return{startNode:a?l+(d?"C":"S"):g,endNode:a?l+"E":e,serializable:a,collapsed:d}},createBookmark2:function(){function a(b){var f=b.container,k=b.offset,d;d=f;var g=k;d=d.type!=CKEDITOR.NODE_ELEMENT||0===g||g==d.getChildCount()?
0:d.getChild(g-1).type==CKEDITOR.NODE_TEXT&&d.getChild(g).type==CKEDITOR.NODE_TEXT;d&&(f=f.getChild(k-1),k=f.getLength());if(f.type==CKEDITOR.NODE_ELEMENT&&0<k){a:{for(d=f;k--;)if(g=d.getChild(k).getIndex(!0),0<=g){k=g;break a}k=-1}k+=1}if(f.type==CKEDITOR.NODE_TEXT){d=f;for(g=0;(d=d.getPrevious())&&d.type==CKEDITOR.NODE_TEXT;)g+=d.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;d=g;f.isEmpty()?(g=f.getPrevious(c),d?(k=d,f=g?g.getNext():f.getParent().getFirst()):(f=f.getParent(),
k=g?g.getIndex(!0)+1:0)):k+=d}b.container=f;b.offset=k}function b(a,c){var f=c.getCustomData("cke-fillingChar");if(f){var k=a.container;f.equals(k)&&(a.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=a.offset&&(a.offset=k.getIndex(),a.container=k.getParent()))}}var c=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(c){var k=this.collapsed,d={container:this.startContainer,offset:this.startOffset},g={container:this.endContainer,offset:this.endOffset};c&&(a(d),b(d,this.root),
k||(a(g),b(g,this.root)));return{start:d.container.getAddress(c),end:k?null:g.container.getAddress(c),startOffset:d.offset,endOffset:g.offset,normalized:c,collapsed:k,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,k=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(b,c);k?this.setEnd(k,a):this.collapse(!0)}else b=(c=a.serializable)?this.document.getById(a.startNode):a.startNode,a=c?this.document.getById(a.endNode):
a.endNode,this.setStartBefore(b),b.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,k=this.endOffset,d;if(a.type==CKEDITOR.NODE_ELEMENT)if(d=a.getChildCount(),d>c)a=a.getChild(c);else if(1>d)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}if(b.type==CKEDITOR.NODE_ELEMENT)if(d=b.getChildCount(),d>k)b=b.getChild(k).getPreviousSourceNode(!0);
else if(1>d)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,k=this.endContainer,c=c.equals(k)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(k);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;
a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&b.is&&b.is("span")&&b.data("cke-bookmark")&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,
b){var c=this.startContainer,k=this.startOffset,d=this.collapsed;if((!a||d)&&c&&c.type==CKEDITOR.NODE_TEXT){if(k)if(k>=c.getLength())k=c.getIndex()+1,c=c.getParent();else{var g=c.split(k),k=c.getIndex()+1,c=c.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(g,this.endOffset-this.startOffset):c.equals(this.endContainer)&&(this.endOffset+=1)}else k=c.getIndex(),c=c.getParent();this.setStart(c,k);if(d){this.collapse(!0);return}}c=this.endContainer;k=this.endOffset;b||d||!c||c.type!=
CKEDITOR.NODE_TEXT||(k?(k>=c.getLength()||c.split(k),k=c.getIndex()+1):k=c.getIndex(),c=c.getParent(),this.setEnd(c,k))},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}function k(a,b,c){var f=new CKEDITOR.dom.range(c);f.setStart(a,b);f.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(f);for(c.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};f=c.next();){if(f.type!=CKEDITOR.NODE_TEXT)return!1;
g=f!=a?f.getText():f.substring(b);if(d.test(g))return!1}return!0}var d=new RegExp(/[^\s\ufeff]/),g,e;switch(a){case CKEDITOR.ENLARGE_INLINE:var l=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var h=this.getCommonAncestor();e=this.root;var m,y,x,w,B,D=!1,C;C=this.startContainer;var H=this.startOffset;C.type==CKEDITOR.NODE_TEXT?(H&&(C=!CKEDITOR.tools.trim(C.substring(0,H)).length&&C,D=!!C),C&&((w=C.getPrevious())||(x=C.getParent()))):(H&&(w=C.getChild(H-1)||C.getLast()),w||(x=C));for(x=c(x);x||
w;){if(x&&!w){!B&&x.equals(h)&&(B=!0);if(l?x.isBlockBoundary():!e.contains(x))break;D&&"inline"==x.getComputedStyle("display")||(D=!1,B?m=x:this.setStartBefore(x));w=x.getPrevious()}for(;w;)if(C=!1,w.type==CKEDITOR.NODE_COMMENT)w=w.getPrevious();else{if(w.type==CKEDITOR.NODE_TEXT)g=w.getText(),d.test(g)&&(w=null),C=/[\s\ufeff]$/.test(g);else if((w.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&w.is("br"))&&!w.data("cke-bookmark"))if(D&&CKEDITOR.dtd.$removeEmpty[w.getName()]){g=w.getText();if(d.test(g))w=
null;else for(var H=w.$.getElementsByTagName("*"),F=0,L;L=H[F++];)if(!CKEDITOR.dtd.$removeEmpty[L.nodeName.toLowerCase()]){w=null;break}w&&(C=!!g.length)}else w=null;C&&(D?B?m=x:x&&this.setStartBefore(x):D=!0);if(w){C=w.getPrevious();if(!x&&!C){x=w;w=null;break}w=C}else x=null}x&&(x=c(x.getParent()))}C=this.endContainer;H=this.endOffset;x=w=null;B=D=!1;C.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(C.substring(H)).length?D=!0:(D=!C.getLength(),H==C.getLength()?(w=C.getNext())||(x=C.getParent()):k(C,
H,e)&&(x=C.getParent())):(w=C.getChild(H))||(x=C);for(;x||w;){if(x&&!w){!B&&x.equals(h)&&(B=!0);if(l?x.isBlockBoundary():!e.contains(x))break;D&&"inline"==x.getComputedStyle("display")||(D=!1,B?y=x:x&&this.setEndAfter(x));w=x.getNext()}for(;w;){C=!1;if(w.type==CKEDITOR.NODE_TEXT)g=w.getText(),k(w,0,e)||(w=null),C=/^[\s\ufeff]/.test(g);else if(w.type==CKEDITOR.NODE_ELEMENT){if((0<w.$.offsetWidth||b&&w.is("br"))&&!w.data("cke-bookmark"))if(D&&CKEDITOR.dtd.$removeEmpty[w.getName()]){g=w.getText();if(d.test(g))w=
null;else for(H=w.$.getElementsByTagName("*"),F=0;L=H[F++];)if(!CKEDITOR.dtd.$removeEmpty[L.nodeName.toLowerCase()]){w=null;break}w&&(C=!!g.length)}else w=null}else C=1;C&&D&&(B?y=x:this.setEndAfter(x));if(w){C=w.getNext();if(!x&&!C){x=w;w=null;break}w=C}else x=null}x&&(x=c(x.getParent()))}m&&y&&(h=m.contains(y)?y:m,this.setStartBefore(h),this.setEndAfter(h));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:x=new CKEDITOR.dom.range(this.root);e=this.root;x.setStartAt(e,
CKEDITOR.POSITION_AFTER_START);x.setEnd(this.startContainer,this.startOffset);x=new CKEDITOR.dom.walker(x);var G,N,J=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),E=null,P=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&"false"==a.getAttribute("contenteditable"))if(E){if(E.equals(a)){E=null;return}}else E=a;else if(E)return;var b=J(a);b||(G=a);return b},l=function(a){var b=P(a);!b&&a.is&&a.is("br")&&(N=a);return b};x.guard=P;x=x.lastBackward();G=G||e;this.setStartAt(G,
!G.is("br")&&(!x&&this.checkStartOfBlock()||x&&G.contains(x))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){x=this.clone();x=new CKEDITOR.dom.walker(x);var I=CKEDITOR.dom.walker.whitespaces(),M=CKEDITOR.dom.walker.bookmark();x.evaluator=function(a){return!I(a)&&!M(a)};if((x=x.previous())&&x.type==CKEDITOR.NODE_ELEMENT&&x.is("br"))break}x=this.clone();x.collapse();x.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);x=new CKEDITOR.dom.walker(x);x.guard=
a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?l:P;G=E=N=null;x=x.lastForward();G=G||e;this.setEndAt(G,!x&&this.checkEndOfBlock()||x&&G.contains(x)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);N&&this.setEndAfter(N)}},shrink:function(a,b,c){var k="boolean"===typeof c?c:c&&"boolean"===typeof c.shrinkOnBlockBoundary?c.shrinkOnBlockBoundary:!0,d=c&&c.skipBogus;if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var g=this.clone(),e=this.startContainer,l=this.endContainer,h=this.startOffset,m=this.endOffset,
y=c=1;e&&e.type==CKEDITOR.NODE_TEXT&&(h?h>=e.getLength()?g.setStartAfter(e):(g.setStartBefore(e),c=0):g.setStartBefore(e));l&&l.type==CKEDITOR.NODE_TEXT&&(m?m>=l.getLength()?g.setEndAfter(l):(g.setEndAfter(l),y=0):g.setEndBefore(l));var g=new CKEDITOR.dom.walker(g),x=CKEDITOR.dom.walker.bookmark(),w=CKEDITOR.dom.walker.bogus();g.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var B;g.guard=function(b,c){if(d&&w(b)||x(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&
b.type==CKEDITOR.NODE_TEXT||c&&b.equals(B)||!1===k&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;c||b.type!=CKEDITOR.NODE_ELEMENT||(B=b);return!0};c&&(e=g[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(e,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);y&&(g.reset(),(g=g[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(g,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));
return!(!c&&!y)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,
a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex(),b=b.getParent());this._setStartContainer(b);this.startOffset=c;this.endContainer||(this._setEndContainer(b),this.endOffset=c);a(this)},setEnd:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex()+1,b=b.getParent());this._setEndContainer(b);this.endOffset=c;this.startContainer||(this._setStartContainer(b),
this.startOffset=c);a(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setStart(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setStart(b,b.getLength()):this.setStart(b,
b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(b)}a(this)},setEndAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setEnd(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setEnd(b,b.getLength()):this.setEnd(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(b)}a(this)},fixBlock:function(a,
b){var c=this.createBookmark(),k=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(k);k.trim();this.insertNode(k);var d=k.getBogus();d&&d.remove();k.appendBogus();this.moveToBookmark(c);return k},splitBlock:function(a,b){var c=new CKEDITOR.dom.elementPath(this.startContainer,this.root),k=new CKEDITOR.dom.elementPath(this.endContainer,this.root),d=c.block,g=k.block,e=null;if(!c.blockLimit.equals(k.blockLimit))return null;"br"!=
a&&(d||(d=this.fixBlock(!0,a),g=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),g||(g=this.fixBlock(!1,a)));c=d&&this.checkStartOfBlock();k=g&&this.checkEndOfBlock();this.deleteContents();d&&d.equals(g)&&(k?(e=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(g,CKEDITOR.POSITION_AFTER_END),g=null):c?(e=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START),d=null):(g=this.splitElement(d,b||
!1),d.is("ul","ol")||d.appendBogus()));return{previousBlock:d,nextBlock:g,wasStartOfBlock:c,wasEndOfBlock:k,elementPath:e}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var c=this.extractContents(!1,b||!1),k=a.clone(!1,b||!1);c.appendTo(k);k.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return k},removeEmptyBlocksAtEnd:function(){function a(f){return function(a){return b(a)||c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||
f.is("table")&&a.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var c=this.createBookmark(),k=this[b?"endPath":"startPath"](),d=k.block||k.blockLimit,g;d&&!d.equals(k.root)&&!d.getFirst(a(d));)g=d.getParent(),this[b?"setEndAt":"setStartAt"](d,CKEDITOR.POSITION_AFTER_END),d.remove(1),d=g;this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,
this.root)},checkBoundaryOfElement:function(a,c){var k=c==CKEDITOR.START,d=this.clone();d.collapse(k);d[k?"setStartAt":"setEndAt"](a,k?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=b(k);return d[k?"checkBackward":"checkForward"]()},checkStartOfBlock:function(a){var b=this.startContainer,c=this.startOffset;CKEDITOR.env.ie&&c&&b.type==CKEDITOR.NODE_TEXT&&(b=CKEDITOR.tools.ltrim(b.substring(0,c)),m.test(b)&&this.trim(0,1));a||this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,
this.root);b=this.clone();b.collapse(!0);b.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(b);a.evaluator=e();return a.checkBackward()},checkEndOfBlock:function(a){var b=this.endContainer,c=this.endOffset;CKEDITOR.env.ie&&b.type==CKEDITOR.NODE_TEXT&&(b=CKEDITOR.tools.rtrim(b.substring(c)),m.test(b)&&this.trim(1,0));a||this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);b=this.clone();b.collapse(!1);b.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);
a=new CKEDITOR.dom.walker(b);a.evaluator=e();return a.checkForward()},getPreviousNode:function(a,b,c){var k=this.clone();k.collapse(1);k.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(k);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var k=this.clone();k.collapse();k.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(k);c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,c){for(;b;){if(b.type==
CKEDITOR.NODE_ELEMENT){if("false"==b.getAttribute("contentEditable")&&!b.data("cke-editable"))return 0;if(b.is("html")||"true"==b.getAttribute("contentEditable")&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),
!0;for(var c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&m.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=1;else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);
else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var d=a,g=c,e=void 0;d.type==CKEDITOR.NODE_ELEMENT&&d.isEditable(!1)&&(e=d[b?"getLast":"getFirst"](k));g||e||(e=d[b?"getPrevious":"getNext"](k));a=e}return!!c},moveToClosestEditablePosition:function(a,b){var c,k=0,d,g,e=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(c=new CKEDITOR.dom.range(this.root),c.moveToPosition(a,e[b?0:1])):c=this.clone();if(a&&
!a.is(CKEDITOR.dtd.$block))k=1;else if(d=c[b?"getNextEditableNode":"getPreviousEditableNode"]())k=1,(g=d.type==CKEDITOR.NODE_ELEMENT)&&d.is(CKEDITOR.dtd.$block)&&"false"==d.getAttribute("contenteditable")?(c.setStartAt(d,CKEDITOR.POSITION_BEFORE_START),c.setEndAt(d,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&g&&d.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(c.setEnd(d,0),c.collapse()):c.moveToPosition(d,e[b?1:0]);k&&this.moveToRange(c);return!!k},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},
moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(!1,!0),c=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return c(a)&&b(a)};var k=a.next();a.reset();return k&&k.equals(a.previous())?k:null},getTouchedStartNode:function(){var a=this.startContainer;
return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:d(),getPreviousEditableNode:d(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var b=this.getTouchedStartNode(),c=this.getTouchedEndNode(),k=b.getAscendant("table",!0),c=c.getAscendant("table",!0);return k&&!this.root.contains(k)?
null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):k&&c&&(k.equals(c)||k.contains(c)||c.contains(k))?b.getAscendant(a,!0):null},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,c,k,d=this.clone();d.optimize();(k=d.startContainer.type==CKEDITOR.NODE_TEXT)?(c=d.startContainer.getText(),b=d.startContainer.split(d.startOffset),a.insertAfter(d.startContainer)):d.insertNode(a);a.scrollIntoView();k&&(d.startContainer.setText(c),
b.remove());a.remove()},getClientRects:function(){function a(b,c){var f=CKEDITOR.tools.array.map(b,function(a){return a}),k=new CKEDITOR.dom.range(c.root),d,g,e;c.startContainer instanceof CKEDITOR.dom.element&&(g=0===c.startOffset&&c.startContainer.hasAttribute("data-widget"));c.endContainer instanceof CKEDITOR.dom.element&&(e=(e=c.endOffset===(c.endContainer.getChildCount?c.endContainer.getChildCount():c.endContainer.length))&&c.endContainer.hasAttribute("data-widget"));g&&k.setStart(c.startContainer.getParent(),
c.startContainer.getIndex());e&&k.setEnd(c.endContainer.getParent(),c.endContainer.getIndex()+1);if(g||e)c=k;k=c.cloneContents().find("[data-cke-widget-id]").toArray();if(k=CKEDITOR.tools.array.map(k,function(a){var b=c.root.editor;a=a.getAttribute("data-cke-widget-id");return b.widgets.instances[a].element}))return k=CKEDITOR.tools.array.map(k,function(a){var b;b=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;d=this.root.getDocument().$.createRange();d.setStart(b.getParent().$,b.getIndex());
d.setEnd(b.getParent().$,b.getIndex()+1);b=d.getClientRects();b.widgetRect=a.getClientRect();return b},c),CKEDITOR.tools.array.forEach(k,function(a){function b(k){CKEDITOR.tools.array.forEach(f,function(b,d){var g=CKEDITOR.tools.objectCompare(a[k],b);g||(g=CKEDITOR.tools.objectCompare(a.widgetRect,b));g&&(Array.prototype.splice.call(f,d,a.length-k,a.widgetRect),c=!0)});c||(k<f.length-1?b(k+1):f.push(a.widgetRect))}var c;b(0)}),f}function b(a,c,f){var d;c.collapsed?f.startContainer instanceof CKEDITOR.dom.element?
(a=f.checkStartOfBlock(),d=new CKEDITOR.dom.text("​"),a?f.startContainer.append(d,!0):0===f.startOffset?d.insertBefore(f.startContainer.getFirst()):(f=f.startContainer.getChildren().getItem(f.startOffset-1),d.insertAfter(f)),c.setStart(d.$,0),c.setEnd(d.$,0),a=c.getClientRects(),d.remove()):f.startContainer instanceof CKEDITOR.dom.text&&(""===f.startContainer.getText()?(f.startContainer.setText("​"),a=c.getClientRects(),f.startContainer.setText("")):a=[k(f.createBookmark())]):a=[k(f.createBookmark())];
return a}function c(a,b,f){a=CKEDITOR.tools.extend({},a);b&&(a=CKEDITOR.tools.getAbsoluteRectPosition(f.document.getWindow(),a));!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a}function k(a){var b=a.startNode;a=a.endNode;var c;b.setText("​");b.removeStyle("display");a?(a.setText("​"),a.removeStyle("display"),c=[b.getClientRect(),a.getClientRect()],a.remove()):c=[b.getClientRect(),b.getClientRect()];b.remove();return{right:Math.max(c[0].right,c[1].right),bottom:Math.max(c[0].bottom,
c[1].bottom),left:Math.min(c[0].left,c[1].left),top:Math.min(c[0].top,c[1].top),width:Math.abs(c[0].left-c[1].left),height:Math.max(c[0].bottom,c[1].bottom)-Math.min(c[0].top,c[1].top)}}return void 0!==document.getSelection?function(k){var d=this.root.getDocument().$.createRange(),g;d.setStart(this.startContainer.$,this.startOffset);d.setEnd(this.endContainer.$,this.endOffset);g=d.getClientRects();g=a(g,this);g.length||(g=b(g,d,this));return CKEDITOR.tools.array.map(g,function(a){return c(a,k,this)},
this)}:function(a){return[c(k(this.createBookmark()),a,this)]}}(),_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,b){var c=this.getCommonAncestor(),k=this.getBoundaryNodes(),d=[],g,e,l,h;if(c&&c.find)for(e=c.find(a),g=0;g<e.count();g++)if(c=e.getItem(g),b||!c.isReadOnly())l=c.getPosition(k.startNode)&CKEDITOR.POSITION_FOLLOWING||k.startNode.equals(c),h=c.getPosition(k.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||
k.endNode.equals(c),l&&h&&d.push(c);return d}};CKEDITOR.dom.range.mergeRanges=function(a){return CKEDITOR.tools.array.reduce(a,function(a,b){var c=a[a.length-1],f=!1;b=b.clone();b.enlarge(CKEDITOR.ENLARGE_ELEMENT);if(c){var k=new CKEDITOR.dom.range(b.root),f=new CKEDITOR.dom.walker(k),d=CKEDITOR.dom.walker.whitespaces();k.setStart(c.endContainer,c.endOffset);k.setEnd(b.startContainer,b.startOffset);for(k=f.next();d(k)||b.endContainer.equals(k);)k=f.next();f=!k}f?c.setEnd(b.endContainer,b.endOffset):
a.push(b);return a},[])}}(),CKEDITOR.POSITION_AFTER_START=1,CKEDITOR.POSITION_BEFORE_END=2,CKEDITOR.POSITION_BEFORE_START=3,CKEDITOR.POSITION_AFTER_END=4,CKEDITOR.ENLARGE_ELEMENT=1,CKEDITOR.ENLARGE_BLOCK_CONTENTS=2,CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3,CKEDITOR.ENLARGE_INLINE=4,CKEDITOR.START=1,CKEDITOR.END=2,CKEDITOR.SHRINK_ELEMENT=1,CKEDITOR.SHRINK_TEXT=2,"use strict",function(){function a(a){1>arguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||
(this._={}))}function h(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function e(a,b,c,d){a:{null==d&&(d=h(c));for(var g;g=d.shift();)if(g.getDtd().p){d={element:g,remaining:d};break a}d=null}if(!d)return 0;if((g=CKEDITOR.filter.instances[d.element.data("cke-filter")])&&!g.check(b))return e(a,b,c,d.remaining);b=new CKEDITOR.dom.range(d.element);b.selectNodeContents(d.element);b=b.createIterator();b.enlargeBr=
a.enlargeBr;b.enforceRealBlocks=a.enforceRealBlocks;b.activeFilter=b.filter=g;a._.nestedEditable={element:d.element,container:c,remaining:d.remaining,iterator:b};return 1}function b(a,b,c){if(!b)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}var d=/^[\r\n\t ]+$/,l=CKEDITOR.dom.walker.bookmark(!1,!0),g=CKEDITOR.dom.walker.whitespaces(!0),m=function(a){return l(a)&&g(a)},c={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var f,g,h,v,u;
a=a||"p";if(this._.nestedEditable){if(f=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,f;this.activeFilter=this.filter;if(e(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable=null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var q=this.range.clone();
g=q.startPath();var t=q.endPath(),z=!q.collapsed&&b(q,g.block),p=!q.collapsed&&b(q,t.block,1);q.shrink(CKEDITOR.SHRINK_ELEMENT,!0);z&&q.setStartAt(g.block,CKEDITOR.POSITION_BEFORE_END);p&&q.setEndAt(t.block,CKEDITOR.POSITION_AFTER_START);g=q.endContainer.hasAscendant("pre",!0)||q.startContainer.hasAscendant("pre",!0);q.enlarge(this.forceBrBreak&&!g||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);q.collapsed||(g=new CKEDITOR.dom.walker(q.clone()),t=CKEDITOR.dom.walker.bookmark(!0,
!0),g.evaluator=t,this._.nextNode=g.next(),g=new CKEDITOR.dom.walker(q.clone()),g.evaluator=t,g=g.previous(),this._.lastNode=g.getNextSourceNode(!0,null,q.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(t=this.range.clone(),t.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),t.checkEndOfBlock()&&(t=new CKEDITOR.dom.elementPath(t.endContainer,t.root),this._.lastNode=(t.block||
t.blockLimit).getNextSourceNode(!0))),this._.lastNode&&q.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=q.document.createText(""),this._.lastNode.insertAfter(g)),q=null);this._.started=1;g=q}t=this._.nextNode;q=this._.lastNode;for(this._.nextNode=null;t;){var z=0,p=t.hasAscendant("pre"),A=t.type!=CKEDITOR.NODE_ELEMENT,y=0;if(A)t.type==CKEDITOR.NODE_TEXT&&d.test(t.getText())&&(A=0);else{var x=t.getName();if(CKEDITOR.dtd.$block[x]&&"false"==t.getAttribute("contenteditable")){f=
t;e(this,a,f);break}else if(t.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){if("br"==x)A=1;else if(!g&&!t.getChildCount()&&"hr"!=x){f=t;h=t.equals(q);break}g&&(g.setEndAt(t,CKEDITOR.POSITION_BEFORE_START),"br"!=x&&(this._.nextNode=t));z=1}else{if(t.getFirst()){g||(g=this.range.clone(),g.setStartAt(t,CKEDITOR.POSITION_BEFORE_START));t=t.getFirst();continue}A=1}}A&&!g&&(g=this.range.clone(),g.setStartAt(t,CKEDITOR.POSITION_BEFORE_START));h=(!z||A)&&t.equals(q);if(g&&!z)for(;!t.getNext(m)&&!h;){x=
t.getParent();if(x.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){z=1;A=0;h||x.equals(q);g.setEndAt(x,CKEDITOR.POSITION_BEFORE_END);break}t=x;A=1;h=t.equals(q);y=1}A&&g.setEndAt(t,CKEDITOR.POSITION_AFTER_END);t=this._getNextSourceNode(t,y,q);if((h=!t)||z&&g)break}if(!f){if(!g)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;f=new CKEDITOR.dom.elementPath(g.startContainer,g.root);t=f.blockLimit;z={div:1,th:1,td:1};f=f.block;!f&&t&&!this.enforceRealBlocks&&z[t.getName()]&&
g.checkStartOfBlock()&&g.checkEndOfBlock()&&!t.equals(g.root)?f=t:!f||this.enforceRealBlocks&&f.is(c)?(f=this.range.document.createElement(a),g.extractContents().appendTo(f),f.trim(),g.insertNode(f),v=u=!0):"li"!=f.getName()?g.checkStartOfBlock()&&g.checkEndOfBlock()||(f=f.clone(!1),g.extractContents().appendTo(f),f.trim(),u=g.splitBlock(),v=!u.wasStartOfBlock,u=!u.wasEndOfBlock,g.insertNode(f)):h||(this._.nextNode=f.equals(q)?null:this._getNextSourceNode(g.getBoundaryNodes().endNode,1,q))}v&&(v=
f.getPrevious())&&v.type==CKEDITOR.NODE_ELEMENT&&("br"==v.getName()?v.remove():v.getLast()&&"br"==v.getLast().$.nodeName.toLowerCase()&&v.getLast().remove());u&&(v=f.getLast())&&v.type==CKEDITOR.NODE_ELEMENT&&"br"==v.getName()&&(!CKEDITOR.env.needsBrFiller||v.getPrevious(l)||v.getNext(l))&&v.remove();this._.nextNode||(this._.nextNode=h||f.equals(q)||!q?null:this._getNextSourceNode(f,1,q));return f},_getNextSourceNode:function(a,b,c){function d(a){return!(a.equals(c)||a.equals(g))}var g=this.range.root;
for(a=a.getNextSourceNode(b,null,d);!l(a);)a=a.getNextSourceNode(b,null,d);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}}(),CKEDITOR.command=function(a,h){this.uiItems=[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire("exec")?!0:!1!==h.exec.call(this,a,b)};this.refresh=function(a,d){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!d.isContextFor(this.context)||
!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return!1===this.fire("refresh",{editor:a,path:d})?!0:h.refresh&&!1!==h.refresh.apply(this,arguments)};var e;this.checkAllowed=function(b){return b||"boolean"!=typeof e?e=a.activeFilter.checkFeature(this):e};CKEDITOR.tools.extend(this,h,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!h.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)},CKEDITOR.command.prototype=
{enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=a;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):
this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype),CKEDITOR.ENTER_P=1,CKEDITOR.ENTER_BR=2,CKEDITOR.ENTER_DIV=3,CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"),
extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,useComputedState:!0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function a(a,b,c,f,d){var k,e;a=[];for(k in b){e=b[k];e="boolean"==typeof e?{}:"function"==typeof e?{match:e}:F(e);"$"!=k.charAt(0)&&(e.elements=k);c&&(e.featureName=c.toLowerCase());var l=e;l.elements=g(l.elements,/\s+/)||null;l.propertiesOnly=l.propertiesOnly||!0===l.elements;var h=/\s*,\s*/,m=void 0;for(m in N){l[m]=
g(l[m],h)||null;var n=l,t=J[m],r=g(l[J[m]],h),M=l[m],p=[],K=!0,I=void 0;r?K=!1:r={};for(I in M)"!"==I.charAt(0)&&(I=I.slice(1),p.push(I),r[I]=!0,K=!1);for(;I=p.pop();)M[I]=M["!"+I],delete M["!"+I];n[t]=(K?!1:r)||null}l.match=l.match||null;f.push(e);a.push(e)}b=d.elements;d=d.generic;var w;c=0;for(f=a.length;c<f;++c){k=F(a[c]);e=!0===k.classes||!0===k.styles||!0===k.attributes;l=k;m=t=h=void 0;for(h in N)l[h]=z(l[h]);n=!0;for(m in J){h=J[m];t=l[h];r=[];M=void 0;for(M in t)-1<M.indexOf("*")?r.push(new RegExp("^"+
M.replace(/\*/g,".*")+"$")):r.push(M);t=r;t.length&&(l[h]=t,n=!1)}l.nothingRequired=n;l.noProperties=!(l.attributes||l.classes||l.styles);if(!0===k.elements||null===k.elements)d[e?"unshift":"push"](k);else for(w in l=k.elements,delete k.elements,l)if(b[w])b[w][e?"unshift":"push"](k);else b[w]=[k]}}function h(a,b,c,f){if(!a.match||a.match(b))if(f||m(a,b))if(a.propertiesOnly||(c.valid=!0),c.allAttributes||(c.allAttributes=e(a.attributes,b.attributes,c.validAttributes)),c.allStyles||(c.allStyles=e(a.styles,
b.styles,c.validStyles)),!c.allClasses){a=a.classes;b=b.classes;f=c.validClasses;if(a)if(!0===a)a=!0;else{for(var d=0,k=b.length,g;d<k;++d)g=b[d],f[g]||(f[g]=a(g));a=!1}else a=!1;c.allClasses=a}}function e(a,b,c){if(!a)return!1;if(!0===a)return!0;for(var f in b)c[f]||(c[f]=a(f));return!1}function b(a,b,c){if(!a.match||a.match(b)){if(a.noProperties)return!1;c.hadInvalidAttribute=d(a.attributes,b.attributes)||c.hadInvalidAttribute;c.hadInvalidStyle=d(a.styles,b.styles)||c.hadInvalidStyle;a=a.classes;
b=b.classes;if(a){for(var f=!1,k=!0===a,g=b.length;g--;)if(k||a(b[g]))b.splice(g,1),f=!0;a=f}else a=!1;c.hadInvalidClass=a||c.hadInvalidClass}}function d(a,b){if(!a)return!1;var c=!1,f=!0===a,d;for(d in b)if(f||a(d))delete b[d],c=!0;return c}function l(a,b,c){if(a.disabled||a.customConfig&&!c||!b)return!1;a._.cachedChecks={};return!0}function g(a,b){if(!a)return!1;if(!0===a)return a;if("string"==typeof a)return a=L(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(b));if(CKEDITOR.tools.isArray(a))return a.length?
CKEDITOR.tools.convertArrayToObject(a):!1;var c={},f=0,d;for(d in a)c[d]=a[d],f++;return f?c:!1}function m(a,b){if(a.nothingRequired)return!0;var f,d,k,g;if(k=a.requiredClasses)for(g=b.classes,f=0;f<k.length;++f)if(d=k[f],"string"==typeof d){if(-1==CKEDITOR.tools.indexOf(g,d))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(g,d))return!1;return c(b.styles,a.requiredStyles)&&c(b.attributes,a.requiredAttributes)}function c(a,b){if(!b)return!0;for(var c=0,f;c<b.length;++c)if(f=b[c],"string"==
typeof f){if(!(f in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,f))return!1;return!0}function k(a){if(!a)return{};a=a.split(/\s*,\s*/).sort();for(var b={};a.length;)b[a.shift()]="cke-test";return b}function f(a){var b,c,f,d,k={},g=1;for(a=L(a);b=a.match(E);)(c=b[2])?(f=n(c,"styles"),d=n(c,"attrs"),c=n(c,"classes")):f=d=c=null,k["$"+g++]={elements:b[1],classes:c,styles:f,attributes:d},a=a.slice(b[0].length);return k}function n(a,b){var c=a.match(P[b]);return c?L(c[1]):null}
function r(a){var b=a.styleBackup=a.attributes.style,c=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(b||"",1));a.classes||(a.classes=c?c.split(/\s+/):[])}function v(a,c,f,d){var k=0,g;d.toHtml&&(c.name=c.name.replace(I,"$1"));if(d.doCallbacks&&a.elementCallbacks){a:{g=a.elementCallbacks;for(var e=0,l=g.length,m;e<l;++e)if(m=g[e](c)){g=m;break a}g=void 0}if(g)return g}if(d.doTransform&&(g=a._.transformations[c.name])){r(c);for(e=0;e<g.length;++e)x(a,c,g[e]);q(c)}if(d.doFilter){a:{e=
c.name;l=a._;a=l.allowedRules.elements[e];g=l.allowedRules.generic;e=l.disallowedRules.elements[e];l=l.disallowedRules.generic;m=d.skipRequired;var n={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},p,z;if(a||g){r(c);if(e)for(p=0,z=e.length;p<z;++p)if(!1===b(e[p],c,n)){a=null;break a}if(l)for(p=0,z=l.length;p<z;++p)b(l[p],c,n);if(a)for(p=0,z=a.length;p<z;++p)h(a[p],c,n,m);if(g)for(p=
0,z=g.length;p<z;++p)h(g[p],c,n,m);a=n}else a=null}if(!a||!a.valid)return f.push(c),1;z=a.validAttributes;var w=a.validStyles;g=a.validClasses;var e=c.attributes,F=c.styles,l=c.classes;m=c.classBackup;var H=c.styleBackup,K,D,L=[],n=[],v=/^data-cke-/;p=!1;delete e.style;delete e["class"];delete c.classBackup;delete c.styleBackup;if(!a.allAttributes)for(K in e)z[K]||(v.test(K)?K==(D=K.replace(/^data-cke-saved-/,""))||z[D]||(delete e[K],p=!0):(delete e[K],p=!0));if(!a.allStyles||a.hadInvalidStyle){for(K in F)a.allStyles||
w[K]?L.push(K+":"+F[K]):p=!0;L.length&&(e.style=L.sort().join("; "))}else H&&(e.style=H);if(!a.allClasses||a.hadInvalidClass){for(K=0;K<l.length;++K)(a.allClasses||g[l[K]])&&n.push(l[K]);n.length&&(e["class"]=n.sort().join(" "));m&&n.length<m.split(/\s+/).length&&(p=!0)}else m&&(e["class"]=m);p&&(k=1);if(!d.skipFinalValidation&&!t(c))return f.push(c),1}d.toHtml&&(c.name=c.name.replace(M,"cke:$1"));return k}function u(a){var b=[],c;for(c in a)-1<c.indexOf("*")&&b.push(c.replace(/\*/g,".*"));return b.length?
new RegExp("^(?:"+b.join("|")+")$"):null}function q(a){var b=a.attributes,c;delete b.style;delete b["class"];if(c=CKEDITOR.tools.writeCssText(a.styles,!0))b.style=c;a.classes.length&&(b["class"]=a.classes.sort().join(" "))}function t(a){switch(a.name){case "a":if(!(a.children.length||a.attributes.name||a.attributes.id))return!1;break;case "img":if(!a.attributes.src)return!1}return!0}function z(a){if(!a)return!1;if(!0===a)return!0;var b=u(a);return function(c){return c in a||b&&c.match(b)}}function p(){return new CKEDITOR.htmlParser.element("br")}
function A(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==a.name||H.$block[a.name])}function y(a,b,c){var f=a.name;if(H.$empty[f]||!a.children.length)"hr"==f&&"br"==b?a.replaceWith(p()):(a.parent&&c.push({check:"it",el:a.parent}),a.remove());else if(H.$block[f]||"tr"==f)if("br"==b)a.previous&&!A(a.previous)&&(b=p(),b.insertBefore(a)),a.next&&!A(a.next)&&(b=p(),b.insertAfter(a)),a.replaceWithChildren();else{var f=a.children,d;b:{d=H[b];for(var k=0,g=f.length,e;k<g;++k)if(e=f[k],e.type==CKEDITOR.NODE_ELEMENT&&
!d[e.name]){d=!1;break b}d=!0}if(d)a.name=b,a.attributes={},c.push({check:"parent-down",el:a});else{d=a.parent;for(var k=d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==d.name,l,h,g=f.length;0<g;)e=f[--g],k&&(e.type==CKEDITOR.NODE_TEXT||e.type==CKEDITOR.NODE_ELEMENT&&H.$inline[e.name])?(l||(l=new CKEDITOR.htmlParser.element(b),l.insertAfter(a),c.push({check:"parent-down",el:l})),l.add(e,0)):(l=null,h=H[d.name]||H.span,e.insertAfter(a),d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||e.type!=CKEDITOR.NODE_ELEMENT||
h[e.name]||c.push({check:"el-up",el:e}));a.remove()}}else f in{style:1,script:1}?a.remove():(a.parent&&c.push({check:"it",el:a.parent}),a.replaceWithChildren())}function x(a,b,c){var f,d;for(f=0;f<c.length;++f)if(d=c[f],!(d.check&&!a.check(d.check,!1)||d.left&&!d.left(b))){d.right(b,O);break}}function w(a,b){var c=b.getDefinition(),f=c.attributes,d=c.styles,k,g,e,l;if(a.name!=c.element)return!1;for(k in f)if("class"==k)for(c=f[k].split(/\s+/),e=a.classes.join("|");l=c.pop();){if(-1==e.indexOf(l))return!1}else if(a.attributes[k]!=
f[k])return!1;for(g in d)if(a.styles[g]!=d[g])return!1;return!0}function B(a,b){var c,f;"string"==typeof a?c=a:a instanceof CKEDITOR.style?f=a:(c=a[0],f=a[1]);return[{element:c,left:f,right:function(a,c){c.transform(a,b)}}]}function D(a){return function(b){return w(b,a)}}function C(a){return function(b,c){c[a](b)}}var H=CKEDITOR.dtd,F=CKEDITOR.tools.copy,L=CKEDITOR.tools.trim,G=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a,b){this.allowedContent=[];this.disallowedContent=
[];this.elementCallbacks=null;this.disabled=!1;this.editor=null;this.id=CKEDITOR.tools.getNextNumber();this._={allowedRules:{elements:{},generic:[]},disallowedRules:{elements:{},generic:[]},transformations:{},cachedTests:{},cachedChecks:{}};CKEDITOR.filter.instances[this.id]=this;var c=this.editor=a instanceof CKEDITOR.editor?a:null;if(c&&!b){this.customConfig=!0;var f=c.config.allowedContent;!0===f?this.disabled=!0:(f||(this.customConfig=!1),this.allow(f,"config",1),this.allow(c.config.extraAllowedContent,
"extra",1),this.allow(G[c.enterMode]+" "+G[c.shiftEnterMode],"default",1),this.disallow(c.config.disallowedContent))}else this.customConfig=!1,this.allow(b||a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(b,c,d){if(!l(this,b,d))return!1;var k,g;if("string"==typeof b)b=f(b);else if(b instanceof CKEDITOR.style){if(b.toAllowedContentRules)return this.allow(b.toAllowedContentRules(this.editor),c,d);k=b.getDefinition();b={};d=k.attributes;b[k.element]=k={styles:k.styles,
requiredStyles:k.styles&&CKEDITOR.tools.object.keys(k.styles)};d&&(d=F(d),k.classes=d["class"]?d["class"].split(/\s+/):null,k.requiredClasses=k.classes,delete d["class"],k.attributes=d,k.requiredAttributes=d&&CKEDITOR.tools.object.keys(d))}else if(CKEDITOR.tools.isArray(b)){for(k=0;k<b.length;++k)g=this.allow(b[k],c,d);return g}a(this,b,c,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,c,f){if(this.disabled)return!1;var d=this,k=[],g=this.editor&&this.editor.config.protectedSource,
e,l=!1,h={doFilter:!c,doTransform:!0,doCallbacks:!0,toHtml:b};a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1;if(!b||"span"!=a.name||!~CKEDITOR.tools.object.keys(a.attributes).join("|").indexOf("data-cke-"))if(e=v(d,a,k,h),e&1)l=!0;else if(e&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var c;a:{var f=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));c=[];var m,n,t;if(g)for(n=0;n<
g.length;++n)if((t=f.match(g[n]))&&t[0].length==f.length){c=!0;break a}f=CKEDITOR.htmlParser.fragment.fromHtml(f);1==f.children.length&&(m=f.children[0]).type==CKEDITOR.NODE_ELEMENT&&v(d,m,c,h);c=!c.length}c||k.push(a)}},null,!0);k.length&&(l=!0);var m;a=[];f=G[f||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var n;c=k.pop();)c.type==CKEDITOR.NODE_ELEMENT?y(c,f,a):c.remove();for(;m=a.pop();)if(c=m.el,c.parent)switch(n=H[c.parent.name]||H.span,m.check){case "it":H.$removeEmpty[c.name]&&
!c.children.length?y(c,f,a):t(c)||y(c,f,a);break;case "el-up":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[c.name]||y(c,f,a);break;case "parent-down":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[c.name]||y(c.parent,f,a)}return l},checkFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=!0},disallow:function(b){if(!l(this,b,!0))return!1;"string"==typeof b&&(b=
f(b));a(this,b,null,this.disallowedContent,this._.disallowedRules);return!0},addContentForms:function(a){if(!this.disabled&&a){var b,c,f=[],d;for(b=0;b<a.length&&!d;++b)c=a[b],("string"==typeof c||c instanceof CKEDITOR.style)&&this.check(c)&&(d=c);if(d){for(b=0;b<a.length;++b)f.push(B(a[b],d));this.addTransformations(f)}}},addElementCallback:function(a){this.elementCallbacks||(this.elementCallbacks=[]);this.elementCallbacks.push(a)},addFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&
(a=a.toFeature(this.editor));this.allow(a.allowedContent,a.name);this.addTransformations(a.contentTransformations);this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?this.check(a.requiredContent):!0},addTransformations:function(a){var b,c;if(!this.disabled&&a){var f=this._.transformations,d;for(d=0;d<a.length;++d){b=a[d];var k=void 0,g=void 0,e=void 0,l=void 0,h=void 0,m=void 0;c=[];for(g=0;g<b.length;++g)e=b[g],"string"==typeof e?(e=
e.split(/\s*:\s*/),l=e[0],h=null,m=e[1]):(l=e.check,h=e.left,m=e.right),k||(k=e,k=k.element?k.element:l?l.match(/^([a-z0-9]+)/i)[0]:k.left.getDefinition().element),h instanceof CKEDITOR.style&&(h=D(h)),c.push({check:l==k?null:l,left:h,right:"string"==typeof m?C(m):m});b=k;f[b]||(f[b]=[]);f[b].push(c)}}},check:function(a,b,c){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var d=a.length;d--;)if(this.check(a[d],b,c))return!0;return!1}var g,e;if("string"==typeof a){e=a+"\x3c"+(!1===b?"0":
"1")+(c?"1":"0")+"\x3e";if(e in this._.cachedChecks)return this._.cachedChecks[e];g=f(a).$1;var l=g.styles,d=g.classes;g.name=g.elements;g.classes=d=d?d.split(/\s*,\s*/):[];g.styles=k(l);g.attributes=k(g.attributes);g.children=[];d.length&&(g.attributes["class"]=d.join(" "));l&&(g.attributes.style=CKEDITOR.tools.writeCssText(g.styles))}else g=a.getDefinition(),l=g.styles,d=g.attributes||{},l&&!CKEDITOR.tools.isEmpty(l)?(l=F(l),d.style=CKEDITOR.tools.writeCssText(l,!0)):l={},g={name:g.element,attributes:d,
classes:d["class"]?d["class"].split(/\s+/):[],styles:l,children:[]};var l=CKEDITOR.tools.clone(g),h=[],m;if(!1!==b&&(m=this._.transformations[g.name])){for(d=0;d<m.length;++d)x(this,g,m[d]);q(g)}v(this,l,h,{doFilter:!0,doTransform:!1!==b,skipRequired:!c,skipFinalValidation:!c});0<h.length?c=!1:((b=g.attributes["class"])&&(g.attributes["class"]=g.attributes["class"].split(" ").sort().join(" ")),c=CKEDITOR.tools.objectCompare(g.attributes,l.attributes,!0),b&&(g.attributes["class"]=b));"string"==typeof a&&
(this._.cachedChecks[e]=c);return c},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,f){var d=a.slice(),k;if(this.check(G[c]))return c;for(f||(d=d.reverse());k=d.pop();)if(this.check(k))return b[k];return CKEDITOR.ENTER_BR}}(),clone:function(){var a=new CKEDITOR.filter,b=CKEDITOR.tools.clone;a.allowedContent=b(this.allowedContent);a._.allowedRules=b(this._.allowedRules);a.disallowedContent=b(this.disallowedContent);
a._.disallowedRules=b(this._.disallowedRules);a._.transformations=b(this._.transformations);a.disabled=this.disabled;a.editor=this.editor;return a},destroy:function(){delete CKEDITOR.filter.instances[this.id];delete this._;delete this.allowedContent;delete this.disallowedContent}};var N={styles:1,attributes:1,classes:1},J={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},E=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,
P={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},I=/^cke:(object|embed|param)$/,M=/^(object|embed|param)$/,O;O=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,b,c){c=c||b;if(!(c in a.styles)){var f=a.attributes[b];f&&(/^\d+$/.test(f)&&(f+="px"),a.styles[c]=f)}delete a.attributes[b]},
lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var f=a.styles[b],d=f&&f.match(/^(\d+)(?:\.\d*)?px$/);d?a.attributes[c]=d[1]:"cke-test"==f&&(a.attributes[c]="cke-test")}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in a.styles)){var b=a.attributes.align;if("left"==b||"right"==b)a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in a.attributes)){var b=a.styles["float"];if("left"==b||"right"==b)a.attributes.align=b}delete a.styles["float"]},
splitBorderShorthand:function(a){if(a.styles.border){var b=CKEDITOR.tools.style.parse.border(a.styles.border);b.color&&(a.styles["border-color"]=b.color);b.style&&(a.styles["border-style"]=b.style);b.width&&(a.styles["border-width"]=b.width);delete a.styles.border}},listTypeToStyle:function(a){if(a.attributes.type)switch(a.attributes.type){case "a":a.styles["list-style-type"]="lower-alpha";break;case "A":a.styles["list-style-type"]="upper-alpha";break;case "i":a.styles["list-style-type"]="lower-roman";
break;case "I":a.styles["list-style-type"]="upper-roman";break;case "1":a.styles["list-style-type"]="decimal";break;default:a.styles["list-style-type"]=a.attributes.type}},splitMarginShorthand:function(a){function b(f){a.styles["margin-top"]=c[f[0]];a.styles["margin-right"]=c[f[1]];a.styles["margin-bottom"]=c[f[2]];a.styles["margin-left"]=c[f[3]]}if(a.styles.margin){var c=a.styles.margin.match(/(auto|0|(?:\-?[\.\d]+(?:\w+|%)))/g)||["0px"];switch(c.length){case 1:b([0,0,0,0]);break;case 2:b([0,1,0,
1]);break;case 3:b([0,1,2,1]);break;case 4:b([0,1,2,3])}delete a.styles.margin}},matchesStyle:w,transform:function(a,b){if("string"==typeof b)a.name=b;else{var c=b.getDefinition(),f=c.styles,d=c.attributes,k,g,e,l;a.name=c.element;for(k in d)if("class"==k)for(c=a.classes.join("|"),e=d[k].split(/\s+/);l=e.pop();)-1==c.indexOf(l)&&a.classes.push(l);else a.attributes[k]=d[k];for(g in f)a.styles[g]=f[g]}}}}(),function(){CKEDITOR.focusManager=function(a){if(a.focusManager)return a.focusManager;this.hasFocus=
!1;this.currentActive=null;this._={editor:a};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(a){this._.timer&&clearTimeout(this._.timer);a&&(this.currentActive=a);this.hasFocus||this._.locked||((a=CKEDITOR.currentInstance)&&a.focusManager.blur(1),this.hasFocus=!0,(a=this._.editor.container)&&a.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(a){function h(){if(this.hasFocus){this.hasFocus=
!1;var a=this._.editor.container;a&&a.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var e=CKEDITOR.focusManager._.blurDelay;a||!e?h.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;h.call(this)},e,this)}},add:function(a,h){var e=a.getCustomData("focusmanager");if(!e||e!=this){e&&e.remove(a);var e="focus",b="blur";h&&(CKEDITOR.env.ie?(e="focusin",b="focusout"):CKEDITOR.event.useCapture=1);var d={blur:function(){a.equals(this.currentActive)&&
this.blur()},focus:function(){this.focus(a)}};a.on(e,d.focus,this);a.on(b,d.blur,this);h&&(CKEDITOR.event.useCapture=0);a.setCustomData("focusmanager",this);a.setCustomData("focusmanager_handlers",d)}},remove:function(a){a.removeCustomData("focusmanager");var h=a.removeCustomData("focusmanager_handlers");a.removeListener("blur",h.blur);a.removeListener("focus",h.focus)}}}(),CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes=
{};this._={editor:a};return this},function(){var a,h=function(b){b=b.data;var d=b.getKeystroke(),e=this.keystrokes[d],g=this._.editor;a=!1===g.fire("key",{keyCode:d,domEvent:b});a||(e&&(a=!1!==g.execCommand(e,{from:"keystrokeHandler"})),a||(a=!!this.blockedKeystrokes[d]));a&&b.preventDefault(!0);return!a},e=function(b){a&&(a=!1,b.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",h,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",e,this)}}}(),
function(){CKEDITOR.lang={languages:{af:1,ar:1,az:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,oc:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(a,h,e){a&&CKEDITOR.lang.languages[a]||
(a=this.detect(h,a));var b=this;h=function(){b[a].dir=b.rtl[a]?"rtl":"ltr";e(a,b[a])};this[a]?h():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+a+".js"),h,this)},detect:function(a,h){var e=this.languages;h=h||navigator.userLanguage||navigator.language||a;var b=h.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),d=b[1],b=b[2];e[d+"-"+b]?d=d+"-"+b:e[d]||(d=null);CKEDITOR.lang.detect=d?function(){return d}:function(a){return a};return d||a}}}(),CKEDITOR.scriptLoader=function(){var a={},h={};return{load:function(e,
b,d,l){var g="string"==typeof e;g&&(e=[e]);d||(d=CKEDITOR);var m=e.length,c=m,k=[],f=[],n=function(a){b&&(g?b.call(d,a):b.call(d,k,f))};if(0===c)n(!0);else{var r=function(a,b){(b?k:f).push(a);0>=--c&&(l&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),n(b))},v=function(b,c){a[b]=1;var f=h[b];delete h[b];for(var d=0;d<f.length;d++)f[d](b,c)},u=function(c){if(a[c])r(c,!0);else{var f=h[c]||(h[c]=[]);f.push(r);if(!(1<f.length)){var d=new CKEDITOR.dom.element("script");d.setAttributes({type:"text/javascript",
src:c});b&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?d.$.onreadystatechange=function(){if("loaded"==d.$.readyState||"complete"==d.$.readyState)d.$.onreadystatechange=null,v(c,!0)}:(d.$.onload=function(){setTimeout(function(){d.$.onload=null;d.$.onerror=null;v(c,!0)},0)},d.$.onerror=function(){d.$.onload=null;d.$.onerror=null;v(c,!1)}));d.appendTo(CKEDITOR.document.getHead())}}};l&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var q=0;q<m;q++)u(e[q])}},
queue:function(){function a(){var d;(d=b[0])&&this.load(d.scriptUrl,d.callback,CKEDITOR,0)}var b=[];return function(d,l){var g=this;b.push({scriptUrl:d,callback:function(){l&&l.apply(this,arguments);b.shift();a.call(g)}});1==b.length&&a.call(this)}}()}}(),CKEDITOR.resourceManager=function(a,h){this.basePath=a;this.fileName=h;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}},CKEDITOR.resourceManager.prototype={add:function(a,h){if(this.registered[a])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+
a+'" is already registered.');var e=this.registered[a]=h||{};e.name=a;e.path=this.getPath(a);CKEDITOR.fire(a+CKEDITOR.tools.capitalize(this.fileName)+"Ready",e);return this.get(a)},get:function(a){return this.registered[a]||null},getPath:function(a){var h=this.externals[a];return CKEDITOR.getUrl(h&&h.dir||this.basePath+a+"/")},getFilePath:function(a){var h=this.externals[a];return CKEDITOR.getUrl(this.getPath(a)+(h?h.file:this.fileName+".js"))},addExternal:function(a,h,e){e||(h=h.replace(/[^\/]+$/,
function(a){e=a;return""}));e=e||this.fileName+".js";a=a.split(",");for(var b=0;b<a.length;b++)this.externals[a[b]]={dir:h,file:e}},load:function(a,h,e){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var b=this.loaded,d=this.registered,l=[],g={},m={},c=0;c<a.length;c++){var k=a[c];if(k)if(b[k]||d[k])m[k]=this.get(k);else{var f=this.getFilePath(k);l.push(f);f in g||(g[f]=[]);g[f].push(k)}}CKEDITOR.scriptLoader.load(l,function(a,c){if(c.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+
g[c[0]].join(",")+'" was not found at "'+c[0]+'".');for(var f=0;f<a.length;f++)for(var d=g[a[f]],k=0;k<d.length;k++){var l=d[k];m[l]=this.get(l);b[l]=1}h.call(e,m)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(a){var h={};return function(e,b,d){var l={},g=function(e){a.call(this,e,function(a){CKEDITOR.tools.extend(l,a);var k=[],f;for(f in a){var e=a[f],m=e&&e.requires;if(!h[f]){if(e.icons)for(var v=
e.icons.split(","),u=v.length;u--;)CKEDITOR.skin.addIcon(v[u],e.path+"icons/"+(CKEDITOR.env.hidpi&&e.hidpi?"hidpi/":"")+v[u]+".png");e.isSupportedEnvironment=e.isSupportedEnvironment||function(){return!0};h[f]=1}if(m)for(m.split&&(m=m.split(",")),e=0;e<m.length;e++)l[m[e]]||k.push(m[e])}if(k.length)g.call(this,k);else{for(f in l)e=l[f],e.onLoad&&!e.onLoad._called&&(!1===e.onLoad()&&delete l[f],e.onLoad._called=1);b&&b.call(d||window,l)}},this)};g.call(this,e)}}),CKEDITOR.plugins.setLang=function(a,
h,e){var b=this.get(a);a=b.langEntries||(b.langEntries={});b=b.lang||(b.lang=[]);b.split&&(b=b.split(","));-1==CKEDITOR.tools.indexOf(b,h)&&b.push(h);a[h]=e},CKEDITOR.ui=function(a){if(a.ui)return a.ui;this.items={};this.instances={};this.editor=a;this._={handlers:{}};return this},CKEDITOR.ui.prototype={add:function(a,h,e){e.name=a.toLowerCase();var b=this.items[a]={type:h,command:e.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(b,e)},get:function(a){return this.instances[a]},
create:function(a){var h=this.items[a],e=h&&this._.handlers[h.type],b=h&&h.command&&this.editor.getCommand(h.command),e=e&&e.create.apply(this,h.args);this.instances[a]=e;b&&b.uiItems.push(e);e&&!e.type&&(e.type=h.type);return e},addHandler:function(a,h){this._.handlers[a]=h},space:function(a){return CKEDITOR.document.getById(this.spaceId(a))},spaceId:function(a){return this.editor.id+"_"+a}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function a(a,c,f){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);
if(void 0!==c){if(!(c instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!f)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&f==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!e(c,f))throw Error('The specified element mode is not supported on element: "'+c.getName()+'".');this.element=c;this.elementMode=f;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&
(c.getId()||c.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||h();this.id=CKEDITOR.tools.getNextId();this.status="unloaded";this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);this.ui=new CKEDITOR.ui(this);this.focusManager=new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);this.on("readOnly",b);this.on("selectionChange",function(a){l(this,a.data.path)});this.on("activeFilterChange",
function(){l(this,this.elementPath(),!0)});this.on("mode",b);CKEDITOR.dom.selection.setupEditorOptimization(this);this.on("instanceReady",function(){if(this.config.startupFocus){if("end"===this.config.startupFocus){var a=this.createRange();a.selectNodeContents(this.editable());a.shrink(CKEDITOR.SHRINK_ELEMENT,!0);a.collapse();this.getSelection().selectRanges([a])}this.focus()}});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){this.isDestroyed()||
this.isDetached()||m(this,a)},0,this)}function h(){do var a="editor"+ ++u;while(CKEDITOR.instances[a]);return a}function e(a,b){return b==CKEDITOR.ELEMENT_MODE_INLINE?a.is(CKEDITOR.dtd.$editable)||a.is("textarea"):b==CKEDITOR.ELEMENT_MODE_REPLACE?!a.is(CKEDITOR.dtd.$nonBodyContent):1}function b(){var a=this.commands,b;for(b in a)d(this,a[b])}function d(a,b){b[b.startDisabled?"disable":a.readOnly&&!b.readOnly?"disable":b.modes[a.mode]?"enable":"disable"]()}function l(a,b,c){if(b){var f,d,k=a.commands;
for(d in k)f=k[d],(c||f.contextSensitive)&&f.refresh(a,b)}}function g(a){var b=a.config.customConfig;if(!b)return!1;var b=CKEDITOR.getUrl(b),c=q[b]||(q[b]={});c.fn?(c.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=b&&g(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(b,function(){c.fn=c.fn||CKEDITOR.editorConfig||function(){};g(a)});return!0}function m(a,b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var f in b.on)a.on(f,b.on[f]);CKEDITOR.tools.extend(a.config,
b,!0);delete a.config.on}f=a.config;a.readOnly=f.readOnly?!0:a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.is("textarea")?a.element.hasAttribute("disabled")||a.element.hasAttribute("readonly"):a.element.isReadOnly():a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?a.element.hasAttribute("disabled")||a.element.hasAttribute("readonly"):!1;a.blockless=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?!(a.element.is("textarea")||CKEDITOR.dtd[a.element.getName()].p):!1;a.tabIndex=f.tabIndex||a.element&&
a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:f.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:f.shiftEnterMode;f.skin&&(CKEDITOR.skinName=f.skin);a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);c(a)});b&&null!=b.customConfig&&(a.config.customConfig=b.customConfig);g(a)||a.fireOnce("customConfigLoaded")}function c(a){CKEDITOR.skin.loadPart("editor",
function(){k(a)})}function k(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(b,c){var d=a.config.title,k=a.config.applicationTitle;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(c);a.title="string"==typeof d||!1===d?d:[a.lang.editor,a.name].join(", ");a.applicationTitle="string"==typeof k||!1===k?k:[a.lang.application,a.name].join(", ");a.config.contentsLangDirection||(a.config.contentsLangDirection=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):
a.lang.dir);a.fire("langLoaded");f(a)})}function f(a){a.getStylesSet(function(b){a.once("loaded",function(){a.fire("stylesSet",{styles:b})},null,null,1);n(a)})}function n(a){function b(a){if(!a)return"";CKEDITOR.tools.isArray(a)&&(a=a.join(","));return a.replace(/\s/g,"")}var c=a.config,f=b(c.plugins),d=b(c.extraPlugins),k=b(c.removePlugins);if(d)var g=new RegExp("(?:^|,)(?:"+d.replace(/,/g,"|")+")(?\x3d,|$)","g"),f=f.replace(g,""),f=f+(","+d);if(k)var e=new RegExp("(?:^|,)(?:"+k.replace(/,/g,"|")+
")(?\x3d,|$)","g"),f=f.replace(e,"");CKEDITOR.env.air&&(f+=",adobeair");CKEDITOR.plugins.load(f.split(","),function(b){var f=[],d=[],k=[];a.plugins=CKEDITOR.tools.extend({},a.plugins,b);for(var g in b){var l=b[g],h=l.lang,m=null,n=l.requires,r;CKEDITOR.tools.isArray(n)&&(n=n.join(","));if(n&&(r=n.match(e)))for(;n=r.pop();)CKEDITOR.error("editor-plugin-required",{plugin:n.replace(",",""),requiredBy:g});h&&!a.lang[g]&&(h.split&&(h=h.split(",")),0<=CKEDITOR.tools.indexOf(h,a.langCode)?m=a.langCode:(m=
a.langCode.replace(/-.*/,""),m=m!=a.langCode&&0<=CKEDITOR.tools.indexOf(h,m)?m:0<=CKEDITOR.tools.indexOf(h,"en")?"en":h[0]),l.langEntries&&l.langEntries[m]?(a.lang[g]=l.langEntries[m],m=null):k.push(CKEDITOR.getUrl(l.path+"lang/"+m+".js")));d.push(m);f.push(l)}CKEDITOR.scriptLoader.load(k,function(){if(!a.isDestroyed()&&!a.isDetached()){for(var b=["beforeInit","init","afterInit"],k=0;k<b.length;k++)for(var g=0;g<f.length;g++){var e=f[g];0===k&&d[g]&&e.lang&&e.langEntries&&(a.lang[e.name]=e.langEntries[d[g]]);
if(e[b[k]])e[b[k]](a)}a.fireOnce("pluginsLoaded");c.keystrokes&&a.setKeystroke(a.config.keystrokes);for(g=0;g<a.config.blockedKeystrokes.length;g++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[g]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)}})})}function r(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();this.config.htmlEncodeOutput&&(b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b):
a.setHtml(b);return!0}return!1}function v(a,b){function c(a){var b=a.startContainer,f=a.endContainer,d=b.is&&b.is("tr"),k=b.is&&b.is("td");a=k&&b.equals(f)&&a.endOffset===b.getChildCount();b=k&&1===b.getChildCount()&&"img"===b.getChildren().getItem(0).getName();return d||a&&!b?!0:!1}function f(a){var b=a.startContainer;return b.is("tr")?a.cloneContents():b.clone(!0)}for(var d=new CKEDITOR.dom.documentFragment,k,g,e,l=0;l<a.length;l++){var h=a[l],m=h.startContainer.getAscendant("tr",!0);c(h)?(k||(k=
m.getAscendant("table").clone(),k.append(m.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),d.append(k),k=k.findOne("thead, tbody, tfoot")),g&&g.equals(m)||(g=m,e=m.clone(),k.append(e)),e.append(f(h))):d.append(h.cloneContents())}return k?d:b.getHtmlFromRange(a[0])}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=a;var u=0,q={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{plugins:{detectConflict:function(a,b){for(var c=0;c<b.length;c++){var f=b[c];if(this[f])return CKEDITOR.warn("editor-plugin-conflict",
{plugin:a,replacedWith:f}),!0}return!1}},addCommand:function(a,b){b.name=a.toLowerCase();var c=b instanceof CKEDITOR.command?b:new CKEDITOR.command(this,b);this.mode&&d(this,c);return this.commands[a]=c},_attachToForm:function(){function a(b){c.updateElement();c._.required&&!f.getValue()&&!1===c.fire("required")&&b.data.preventDefault()}function b(a){return!!(a&&a.call&&a.apply)}var c=this,f=c.element,d=new CKEDITOR.dom.element(f.$.form);f.is("textarea")&&d&&(d.on("submit",a),b(d.$.submit)&&(d.$.submit=
CKEDITOR.tools.override(d.$.submit,function(b){return function(){a();b.apply?b.apply(this):b()}})),c.on("destroy",function(){d.removeListener("submit",a)}))},destroy:function(a){var b=CKEDITOR.filter.instances,c=this;this.fire("beforeDestroy");!a&&r.call(this);this.editable(null);this.filter&&delete this.filter;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(b),function(a){a=b[a];c===a.editor&&a.destroy()});delete this.activeFilter;this.status="destroyed";this.fire("destroy");this.removeAllListeners();
CKEDITOR.remove(this);CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(a){if(!a){a=this.getSelection();if(!a)return null;a=a.getStartElement()}return a?new CKEDITOR.dom.elementPath(a,this.editable()):null},createRange:function(){var a=this.editable();return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,b){var c=this.getCommand(a),f={name:a,commandData:b||{},command:c};return c&&c.state!=CKEDITOR.TRISTATE_DISABLED&&!1!==this.fire("beforeCommandExec",f)&&(f.returnValue=
c.exec(f.commandData),!c.async&&!1!==this.fire("afterCommandExec",f))?f.returnValue:!1},getCommand:function(a){return this.commands[a]},getData:function(a){!a&&this.fire("beforeGetData");var b=this._.data;"string"!=typeof b&&(b=(b=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?b.is("textarea")?b.getValue():b.getHtml():"");b={dataValue:b};!a&&this.fire("getData",b);return b.dataValue},getSnapshot:function(){var a=this.fire("getSnapshot");"string"!=typeof a&&(a=(a=this.element)&&this.elementMode==
CKEDITOR.ELEMENT_MODE_REPLACE?a.is("textarea")?a.getValue():a.getHtml():"");return a},loadSnapshot:function(a){this.fire("loadSnapshot",a)},setData:function(a,b,c){var f=!0,d=b;b&&"object"==typeof b&&(c=b.internal,d=b.callback,f=!b.noSnapshot);!c&&f&&this.fire("saveSnapshot");if(d||!c)this.once("dataReady",function(a){!c&&f&&this.fire("saveSnapshot");d&&d.call(a.editor)});a={dataValue:a};!c&&this.fire("setData",a);this._.data=a.dataValue;!c&&this.fire("afterSetData",a)},setReadOnly:function(a){a=
null==a||a;this.readOnly!=a&&(this.readOnly=a,this.keystrokeHandler.blockedKeystrokes[8]=+a,this.editable().setReadOnly(a),this.fire("readOnly"))},insertHtml:function(a,b,c){this.fire("insertHtml",{dataValue:a,mode:b,range:c})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",a)},getSelectedHtml:function(a){var b=this.editable(),c=this.getSelection(),c=c&&c.getRanges();if(!b||!c||0===c.length)return null;b=v(c,b);return a?b.getHtml():b},extractSelectedHtml:function(a,
b){var c=this.editable(),f=this.getSelection().getRanges(),d=new CKEDITOR.dom.documentFragment,k;if(!c||0===f.length)return null;for(k=0;k<f.length;k++)d.append(c.extractHtmlFromRange(f[k],b));b||this.getSelection().selectRanges([f[0]]);return a?d.getHtml():d},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return r.call(this)},
setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],c,f,d=b.length;d--;)c=b[d],f=0,CKEDITOR.tools.isArray(c)&&(f=c[1],c=c[0]),f?a[c]=f:delete a[c]},getCommandKeystroke:function(a,b){var c="string"===typeof a?this.getCommand(a):a,f=[];if(c){var d=CKEDITOR.tools.object.findKey(this.commands,c),k=this.keystrokeHandler.keystrokes;if(c.fakeKeystroke)f.push(c.fakeKeystroke);else for(var g in k)k[g]===d&&f.push(g)}return b?
f:f[0]||null},addFeature:function(a){return this.filter.addFeature(a)},setActiveFilter:function(a){a||(a=this.filter);this.activeFilter!==a&&(this.activeFilter=a,this.fire("activeFilterChange"),a===this.filter?this.setActiveEnterMode(null,null):this.setActiveEnterMode(a.getAllowedEnterMode(this.enterMode),a.getAllowedEnterMode(this.shiftEnterMode,!0)))},setActiveEnterMode:function(a,b){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;b=b?this.blockless?CKEDITOR.ENTER_BR:b:this.shiftEnterMode;
if(this.activeEnterMode!=a||this.activeShiftEnterMode!=b)this.activeEnterMode=a,this.activeShiftEnterMode=b,this.fire("activeEnterModeChange")},showNotification:function(a){alert(a)},isDetached:function(){return!!this.container&&this.container.isDetached()},isDestroyed:function(){return"destroyed"===this.status}});CKEDITOR.editor._getEditorElement=function(a){if(!CKEDITOR.env.isCompatible)return null;var b=CKEDITOR.dom.element.get(a);return b?b.getEditor()?(CKEDITOR.error("editor-element-conflict",
{editorName:b.getEditor().name}),null):b:(CKEDITOR.error("editor-incorrect-element",{element:a}),null)};CKEDITOR.editor.initializeDelayedEditorCreation=function(a,b,c){if(b.delayIfDetached_callback)return CKEDITOR.warn("editor-delayed-creation",{method:"callback"}),b.delayIfDetached_callback(function(){CKEDITOR[c](a,b);CKEDITOR.warn("editor-delayed-creation-success",{method:"callback"})}),null;var f=void 0===b.delayIfDetached_interval?CKEDITOR.config.delayIfDetached_interval:b.delayIfDetached_interval;
CKEDITOR.warn("editor-delayed-creation",{method:"interval - "+f+" ms"});var d=setInterval(function(){a.isDetached()||(clearInterval(d),CKEDITOR[c](a,b),CKEDITOR.warn("editor-delayed-creation-success",{method:"interval - "+f+" ms"}))},f);return function(){clearInterval(d)}};CKEDITOR.editor.shouldDelayEditorCreation=function(a,b){CKEDITOR.editor.mergeDelayedCreationConfigs(b);return b&&b.delayIfDetached&&a.isDetached()};CKEDITOR.editor.mergeDelayedCreationConfigs=function(a){a&&(a.delayIfDetached="boolean"===
typeof a.delayIfDetached?a.delayIfDetached:CKEDITOR.config.delayIfDetached,a.delayIfDetached_interval=isNaN(a.delayIfDetached_interval)?CKEDITOR.config.delayIfDetached_interval:a.delayIfDetached_interval,a.delayIfDetached_callback=a.delayIfDetached_callback||CKEDITOR.config.delayIfDetached_callback)}}(),CKEDITOR.ELEMENT_MODE_NONE=0,CKEDITOR.ELEMENT_MODE_REPLACE=1,CKEDITOR.ELEMENT_MODE_APPENDTO=2,CKEDITOR.ELEMENT_MODE_INLINE=3,CKEDITOR.config.delayIfDetached=!1,CKEDITOR.config.delayIfDetached_callback=
void 0,CKEDITOR.config.delayIfDetached_interval=50,CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--!?>)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}},function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,h={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype=
{onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(e){for(var b,d,l=0,g;b=this._.htmlPartsRegex.exec(e);){d=b.index;if(d>l)if(l=e.substring(l,d),g)g.push(l);else this.onText(l);l=this._.htmlPartsRegex.lastIndex;if(d=b[1])if(d=d.toLowerCase(),g&&CKEDITOR.dtd.$cdata[d]&&(this.onCDATA(g.join("")),g=null),!g){this.onTagClose(d);continue}if(g)g.push(b[0]);else if(d=b[3]){if(d=d.toLowerCase(),!/="/.test(d)){var m={},c,k=b[4];b=
!!b[5];if(k)for(;c=a.exec(k);){var f=c[1].toLowerCase();c=c[2]||c[3]||c[4]||"";m[f]=!c&&h[f]?f:CKEDITOR.tools.htmlDecodeAttr(c)}this.onTagOpen(d,m,b);!g&&CKEDITOR.dtd.$cdata[d]&&(g=[])}}else if(d=b[2])this.onComment(d)}if(e.length>l)this.onText(e.substring(l,e.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c",a)},openTagClose:function(a,h){h?this._.output.push(" /\x3e"):this._.output.push("\x3e")},
attribute:function(a,h){"string"==typeof h&&(h=CKEDITOR.tools.htmlEncodeAttr(h));this._.output.push(" ",a,'\x3d"',h,'"')},closeTag:function(a){this._.output.push("\x3c/",a,"\x3e")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("\x3c!--",a,"--\x3e")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(a){var h=this._.output.join("");a&&this.reset();return h}}}),"use strict",function(){CKEDITOR.htmlParser.node=
function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,h=CKEDITOR.tools.indexOf(a,this),e=this.previous,b=this.next;e&&(e.next=b);b&&(b.previous=e);a.splice(h,1);this.parent=null},replaceWith:function(a){var h=this.parent.children,e=CKEDITOR.tools.indexOf(h,this),b=a.previous=this.previous,d=a.next=this.next;b&&(b.next=a);d&&(d.previous=a);h[e]=a;a.parent=this.parent;this.parent=null},insertAfter:function(a){var h=a.parent.children,e=CKEDITOR.tools.indexOf(h,
a),b=a.next;h.splice(e+1,0,this);this.next=a.next;this.previous=a;a.next=this;b&&(b.previous=this);this.parent=a.parent},insertBefore:function(a){var h=a.parent.children,e=CKEDITOR.tools.indexOf(h,a);h.splice(e,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var h="function"==typeof a?a:"string"==typeof a?function(b){return b.name==a}:function(b){return b.name in a},e=this.parent;for(;e&&e.type==CKEDITOR.NODE_ELEMENT;){if(h(e))return e;
e=e.parent}return null},wrapWith:function(a){this.replaceWith(a);a.add(this);return a},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(a){return a||{}}}}(),"use strict",CKEDITOR.htmlParser.comment=function(a){this.value=a;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(a,h){var e=this.value;if(!(e=a.onComment(h,e,this)))return this.remove(),
!1;if("string"!=typeof e)return this.replaceWith(e),!1;this.value=e;return!0},writeHtml:function(a,h){h&&this.filter(h);a.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,h){if(!(this.value=a.onText(h,this.value,this)))return this.remove(),!1},writeHtml:function(a,h){h&&this.filter(h);a.text(this.value)}})}(),
"use strict",function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a){var h=this.getAscendant("style");if(h&&h.getAscendant({math:1,svg:1})){var h=CKEDITOR.htmlParser.fragment.fromHtml(this.value),e=new CKEDITOR.htmlParser.basicWriter;a.applyTo(h);h.writeHtml(e);this.value=e.getHtml()}},writeHtml:function(a){a.write(this.value)}})}(),"use strict",CKEDITOR.htmlParser.fragment=
function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function a(a){return a.attributes["data-cke-survive"]?!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var h=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),e={ol:1,ul:1},b=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),d={ul:"li",ol:"li",dl:"dd",table:"tbody",
tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(l,g,m){function c(a){var b;if(0<t.length)for(var c=0;c<t.length;c++){var f=t[c],d=f.name,g=CKEDITOR.dtd[d],e=p.name&&CKEDITOR.dtd[p.name];e&&!e[d]||a&&g&&!g[a]&&CKEDITOR.dtd[a]?d==p.name&&(n(p,p.parent,1),c--):(b||(k(),b=1),f=f.clone(),f.parent=p,p=f,t.splice(c,1),c--)}}function k(){for(;z.length;)n(z.shift(),p)}function f(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var b=a.children.length,c=a.children[b-
1],f;c&&c.type==CKEDITOR.NODE_TEXT&&((f=CKEDITOR.tools.rtrim(c.value))?c.value=f:a.children.length=b-1)}}function n(b,c,d){c=c||p||q;var k=p;void 0===b.previous&&(r(c,b)&&(p=c,u.onTagOpen(m,{}),b.returnPoint=c=p),f(b),a(b)&&!b.children.length||c.add(b),"pre"==b.name&&(y=!1),"textarea"==b.name&&(A=!1));b.returnPoint?(p=b.returnPoint,delete b.returnPoint):p=d?c:k}function r(a,b){if((a==q||"body"==a.name)&&m&&(!a.name||CKEDITOR.dtd[a.name][m])){var c,f;return(c=b.attributes&&(f=b.attributes["data-cke-real-element-type"])?
f:b.name)&&c in CKEDITOR.dtd.$inline&&!(c in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function v(a,b){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==b||"dt"==a&&"dd"==b||"dd"==a&&"dt"==b:!1}var u=new CKEDITOR.htmlParser,q=g instanceof CKEDITOR.htmlParser.element?g:"string"==typeof g?new CKEDITOR.htmlParser.element(g):new CKEDITOR.htmlParser.fragment,t=[],z=[],p=q,A="textarea"==q.name,y="pre"==q.name;u.onTagOpen=function(f,d,g,l){d=new CKEDITOR.htmlParser.element(f,
d);d.isUnknown&&g&&(d.isEmpty=!0);d.isOptionalClose=l;if(a(d))t.push(d);else{if("pre"==f)y=!0;else{if("br"==f&&y){p.add(new CKEDITOR.htmlParser.text("\n"));return}"textarea"==f&&(A=!0)}if("br"==f)z.push(d);else{for(;!(l=(g=p.name)?CKEDITOR.dtd[g]||(p._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):b,d.isUnknown||p.isUnknown||l[f]);)if(p.isOptionalClose)u.onTagClose(g);else if(f in e&&g in e)g=p.children,(g=g[g.length-1])&&"li"==g.name||n(g=new CKEDITOR.htmlParser.element("li"),p),!d.returnPoint&&
(d.returnPoint=p),p=g;else if(f in CKEDITOR.dtd.$listItem&&!v(f,g))u.onTagOpen("li"==f?"ul":"dl",{},0,1);else if(g in h&&!v(f,g))!d.returnPoint&&(d.returnPoint=p),p=p.parent;else if(g in CKEDITOR.dtd.$inline&&t.unshift(p),p.parent)n(p,p.parent,1);else{d.isOrphan=1;break}c(f);k();d.parent=p;d.isEmpty?n(d):p=d}}};u.onTagClose=function(a){for(var b=t.length-1;0<=b;b--)if(a==t[b].name){t.splice(b,1);return}for(var c=[],f=[],d=p;d!=q&&d.name!=a;)d._.isBlockLike||f.unshift(d),c.push(d),d=d.returnPoint||
d.parent;if(d!=q){for(b=0;b<c.length;b++){var g=c[b];n(g,g.parent)}p=d;d._.isBlockLike?k():(b=CKEDITOR.config.shiftLineBreaks,!0!==b&&z.length&&("function"!==typeof b?k():(b=b(z[z.length-1]),!0!==b&&(k(),b instanceof CKEDITOR.htmlParser.text&&p.add(b),b instanceof CKEDITOR.htmlParser.element&&n(b,p)))));n(d,d.parent);d==p&&(p=p.parent);t=t.concat(f)}"body"==a&&(m=!1)};u.onText=function(a){if(!(p._.hasInlineStarted&&!z.length||y||A)&&(a=CKEDITOR.tools.ltrim(a),0===a.length))return;var f=p.name,g=f?
CKEDITOR.dtd[f]||(p._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):b;if(!A&&!g["#"]&&f in h)u.onTagOpen(d[f]||""),u.onText(a);else{k();c();y||A||(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a);if(r(p,a))this.onTagOpen(m,{},0,1);p.add(a)}};u.onCDATA=function(a){p.add(new CKEDITOR.htmlParser.cdata(a))};u.onComment=function(a){k();c();p.add(new CKEDITOR.htmlParser.comment(a))};u.parse(l);for(k();p!=q;)n(p,p.parent,1);f(q);return q};CKEDITOR.htmlParser.fragment.prototype=
{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,b){isNaN(b)&&(b=this.children.length);var d=0<b?this.children[b-1]:null;if(d){if(a._.isBlockLike&&d.type==CKEDITOR.NODE_TEXT&&(d.value=CKEDITOR.tools.rtrim(d.value),0===d.value.length)){this.children.pop();this.add(a);return}d.next=a}a.previous=d;a.parent=this;this.children.splice(b,0,a);this._.hasInlineStarted||(this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike)},filter:function(a,b){b=this.getFilterContext(b);
a.onRoot(b,this);this.filterChildren(a,!1,b)},filterChildren:function(a,b,d){if(this.childrenFilteredBy!=a.id){d=this.getFilterContext(d);if(b&&!this.parent)a.onRoot(d,this);this.childrenFilteredBy=a.id;for(b=0;b<this.children.length;b++)!1===this.children[b].filter(a,d)&&b--}},writeHtml:function(a,b){b&&this.filter(b);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,b,d){var c=this.getFilterContext();if(d&&!this.parent&&b)b.onRoot(c,this);b&&this.filterChildren(b,!1,c);b=0;d=this.children;
for(c=d.length;b<c;b++)d[b].writeHtml(a)},forEach:function(a,b,d){if(!(d||b&&this.type!=b))var c=a(this);if(!1!==c){d=this.children;for(var k=0;k<d.length;k++)c=d[k],c.type==CKEDITOR.NODE_ELEMENT?c.forEach(a,b):b&&c.type!=b||a(c)}},getFilterContext:function(a){return a||{}}};CKEDITOR.config.shiftLineBreaks=!0}(),"use strict",function(){function a(){this.rules=[]}function h(e,b,d,l){var g,h;for(g in b)(h=e[g])||(h=e[g]=new a),h.add(b[g],d,l)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(e){this.id=
CKEDITOR.tools.getNextNumber();this.elementNameRules=new a;this.attributeNameRules=new a;this.elementsRules={};this.attributesRules={};this.textRules=new a;this.commentRules=new a;this.rootRules=new a;e&&this.addRules(e,10)},proto:{addRules:function(a,b){var d;"number"==typeof b?d=b:b&&"priority"in b&&(d=b.priority);"number"!=typeof d&&(d=10);"object"!=typeof b&&(b={});a.elementNames&&this.elementNameRules.addMany(a.elementNames,d,b);a.attributeNames&&this.attributeNameRules.addMany(a.attributeNames,
d,b);a.elements&&h(this.elementsRules,a.elements,d,b);a.attributes&&h(this.attributesRules,a.attributes,d,b);a.text&&this.textRules.add(a.text,d,b);a.comment&&this.commentRules.add(a.comment,d,b);a.root&&this.rootRules.add(a.root,d,b)},applyTo:function(a){a.filter(this)},onElementName:function(a,b){return this.elementNameRules.execOnName(a,b)},onAttributeName:function(a,b){return this.attributeNameRules.execOnName(a,b)},onText:function(a,b,d){return this.textRules.exec(a,b,d)},onComment:function(a,
b,d){return this.commentRules.exec(a,b,d)},onRoot:function(a,b){return this.rootRules.exec(a,b)},onElement:function(a,b){for(var d=[this.elementsRules["^"],this.elementsRules[b.name],this.elementsRules.$],l,g=0;3>g;g++)if(l=d[g]){l=l.exec(a,b,this);if(!1===l)return null;if(l&&l!=b)return this.onNode(a,l);if(b.parent&&!b.name)break}return b},onNode:function(a,b){var d=b.type;return d==CKEDITOR.NODE_ELEMENT?this.onElement(a,b):d==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,b.value,
b)):d==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,b.value,b)):null},onAttribute:function(a,b,d,l){return(d=this.attributesRules[d])?d.exec(a,l,b,this):l}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype={add:function(a,b,d){this.rules.splice(this.findIndex(b),0,{value:a,priority:b,options:d})},addMany:function(a,b,d){for(var l=[this.findIndex(b),0],g=0,h=a.length;g<h;g++)l.push({value:a[g],priority:b,options:d});this.rules.splice.apply(this.rules,l)},findIndex:function(a){for(var b=
this.rules,d=b.length-1;0<=d&&a<b[d].priority;)d--;return d+1},exec:function(a,b){var d=b instanceof CKEDITOR.htmlParser.node||b instanceof CKEDITOR.htmlParser.fragment,l=Array.prototype.slice.call(arguments,1),g=this.rules,h=g.length,c,k,f,n;for(n=0;n<h;n++)if(d&&(c=b.type,k=b.name),f=g[n],!(a.nonEditable&&!f.options.applyToAll||a.nestedEditable&&f.options.excludeNestedEditable)){f=f.value.apply(null,l);if(!1===f||d&&f&&(f.name!=k||f.type!=c))return f;null!=f&&(l[0]=b=f)}return b},execOnName:function(a,
b){for(var d=0,l=this.rules,g=l.length,h;b&&d<g;d++)h=l[d],a.nonEditable&&!h.options.applyToAll||a.nestedEditable&&h.options.excludeNestedEditable||(b=b.replace(h.value[0],h.value[1]));return b}}}(),function(){function a(a,c){function f(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function k(a,c){return function(d){if(d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var k=[],g=e(d),m,r;if(g)for(h(g,1)&&k.push(g);g;)l(g)&&
(m=b(g))&&h(m)&&((r=b(m))&&!l(r)?k.push(m):(f(n).insertAfter(m),m.remove())),g=g.previous;for(g=0;g<k.length;g++)k[g].remove();if(k=!a||!1!==("function"==typeof c?c(d):c))n||CKEDITOR.env.needsBrFiller||d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?n||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||d.name in CKEDITOR.dtd.tr||d.name in CKEDITOR.dtd.$listItem)?(k=e(d),k=!k||"form"==d.name&&"input"==k.name):k=!1:k=!1;k&&d.add(f(a))}}}function h(a,b){if((!n||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&
"br"==a.name&&!a.attributes["data-cke-eol"])return!0;var c;return a.type==CKEDITOR.NODE_TEXT&&(c=a.value.match(z))&&(c.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,c.index))).insertBefore(a),a.value=c[0]),!CKEDITOR.env.needsBrFiller&&n&&(!b||a.parent.name in r)||!n&&((c=a.previous)&&"br"==c.name||!c||l(c)))?!0:!1}var m={elements:{}},n="html"==c,r=CKEDITOR.tools.extend({},x),I;for(I in r)"#"in A[I]||delete r[I];for(I in r)m.elements[I]=k(n,a.config.fillEmptyBlocks);m.root=k(n,!1);m.elements.br=
function(a){return function(c){if(c.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var k=c.attributes;if("data-cke-bogus"in k||"data-cke-eol"in k)delete k["data-cke-bogus"];else{for(k=c.next;k&&d(k);)k=k.next;var e=b(c);!k&&l(c.parent)?g(c.parent,f(a)):l(k)&&e&&!l(e)&&f(a).insertBefore(k)}}}}(n);return m}function h(a,b){return a!=CKEDITOR.ENTER_BR&&!1!==b?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function e(a){for(a=a.children[a.children.length-1];a&&d(a);)a=a.previous;return a}function b(a){for(a=a.previous;a&&
d(a);)a=a.previous;return a}function d(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function l(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in x||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function g(a,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;c&&(c.next=b,b.previous=c)}function m(a){a=a.attributes;"false"!=a.contenteditable&&(a["data-cke-editable"]=a.contenteditable?"true":1);
a.contenteditable="false"}function c(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function k(a,b){return a.replace(H,function(a,c,f){return"\x3c"+c+f.replace(F,function(a,c){return L.test(c)&&-1==f.indexOf("data-cke-saved-"+c)?" data-cke-saved-"+a+" data-cke-"+b+"-"+a:a})+"\x3e"})}function f(a,b){return a.replace(b,function(a,b,c){0===a.indexOf("\x3ctextarea")&&(a=b+v(c).replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;")+
"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function n(a){return a.replace(J,function(a,b){return decodeURIComponent(b)})}function r(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,function(a){return"\x3c!--"+p+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function v(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function u(a,b){var c=b._.dataStore;
return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function q(a,b,c){var f=[],d=b.config.protectedSource,k=b._.dataStore||(b._.dataStore={id:1}),g=new RegExp("\x3c\\!--\\{cke_temp_"+c+"(comment)?\\}(\\d*?)--\x3e","g"),d=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(d);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_temp_"+
c+"comment}"+(f.push(a)-1)+"--\x3e"});for(var e=0;e<d.length;e++)a=a.replace(d[e],function(a){a=a.replace(g,function(a,b,c){return f[c]});return g.test(a)?a:"\x3c!--{cke_temp_"+c+"}"+(f.push(a)-1)+"--\x3e"});a=a.replace(g,function(a,b,c){return"\x3c!--"+p+(b?"{C}":"")+encodeURIComponent(f[c]).replace(/--/g,"%2D%2D")+"--\x3e"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,
b){k[k.id]=decodeURIComponent(b);return"{cke_protected_"+k.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,f,d){return"\x3c"+c+f+"\x3e"+u(v(d),b)+"\x3c/"+c+"\x3e"})}var t;CKEDITOR.htmlDataProcessor=function(b){var c,d,g=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=d=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(w);c.addRules(B,{applyToAll:!0});c.addRules(a(b,"data"),
{applyToAll:!0});d.addRules(D);d.addRules(C,{applyToAll:!0});d.addRules(a(b,"html"),{applyToAll:!0});b.on("toHtml",function(a){var c;var d=window.crypto||window.msCrypto;c=d?d.getRandomValues(new Uint32Array(1))[0]:Math.floor(9E9*Math.random()+1E9);a=a.data;var d=a.dataValue,d=t(d),d=q(d,b,c),d=f(d,N),d=k(d,c),d=f(d,G),d=d.replace(E,"$1cke:$2"),d=d.replace(I,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),d=d.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),d=d.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+
c+"-$2"),g=a.context||b.editable().getName(),e;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==g&&(g="div",d="\x3cpre\x3e"+d+"\x3c/pre\x3e",e=1);g=b.document.createElement(g);g.setHtml("a"+d);d=g.getHtml().substr(1);d=d.replace(new RegExp("data-cke-"+c+"-","ig"),"");e&&(d=d.replace(/^<pre>|<\/pre>$/gi,""));d=d.replace(P,"$1$2");d=n(d);d=v(d);c=!1===a.fixForBody?!1:h(a.enterMode,b.config.autoParagraph);d=CKEDITOR.htmlParser.fragment.fromHtml(d,a.context,c);c&&(e=d,!e.children.length&&CKEDITOR.dtd[e.name][c]&&
(c=new CKEDITOR.htmlParser.element(c),e.add(c)));a.dataValue=d},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(g.dataFilter,!0)},null,null,10);b.on("toHtml",function(a){a=a.data;var b=a.dataValue,c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(!0);a.dataValue=r(b)},null,null,15);b.on("toDataFormat",function(a){var c=
a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^<br *\/?>/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,h(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(g.htmlFilter,!0)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,!1,!0)},null,null,11);b.on("toDataFormat",function(a){var c=a.data.dataValue,d=g.writer;d.reset();c.writeChildrenHtml(d);
c=d.getHtml(!0);c=v(c);c=u(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var f=this.editor,k,g,e,l;b&&"object"==typeof b?(k=b.context,c=b.fixForBody,d=b.dontFilter,g=b.filter,e=b.enterMode,l=b.protectedWhitespaces):k=b;k||null===k||(k=f.editable().getName());return f.fire("toHtml",{dataValue:a,context:k,fixForBody:c,dontFilter:d,filter:g||f.filter,enterMode:e||f.enterMode,protectedWhitespaces:l}).dataValue},toDataFormat:function(a,b){var c,
d,f;b&&(c=b.context,d=b.filter,f=b.enterMode);c||null===c||(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:d||this.editor.filter,context:c,enterMode:f||this.editor.enterMode}).dataValue},protectSource:function(a){return q(a,this.editor)},unprotectSource:function(a){return u(a,this.editor)},unprotectRealComments:function(a){return v(a)}};var z=/(?:&nbsp;|\xa0)$/,p="{cke_protected}",A=CKEDITOR.dtd,y="caption colgroup col thead tfoot tbody".split(" "),
x=CKEDITOR.tools.extend({},A.$blockLimit,A.$block),w={elements:{input:m,textarea:m}},B={attributeNames:[[/^on/,"data-cke-pa-on"],[/^srcdoc/,"data-cke-pa-srcdoc"],[/^data-cke-expando$/,""]],elements:{iframe:function(a){if(a.attributes&&a.attributes.src){var b=a.attributes.src.toLowerCase().replace(/[^a-z]/gi,"");if(0===b.indexOf("javascript")||0===b.indexOf("data"))a.attributes["data-cke-pa-src"]=a.attributes.src,delete a.attributes.src}}}},D={elements:{embed:function(a){var b=a.parent;if(b&&"object"==
b.name){var c=b.attributes.width,b=b.attributes.height;c&&(a.attributes.width=c);b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length||b.name||b.id||a.attributes["data-cke-saved-name"]))return!1}}},C={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var c=["name","href","src"],d,f=0;f<c.length;f++)d=
"data-cke-saved-"+c[f],d in b&&delete b[c[f]]}return a},table:function(a){a.children.slice(0).sort(function(a,b){var c,d;a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type&&(c=CKEDITOR.tools.indexOf(y,a.name),d=CKEDITOR.tools.indexOf(y,b.name));-1<c&&-1<d&&c!=d||(c=a.parent?a.getIndex():-1,d=b.parent?b.getIndex():-1);return c>d?1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;
delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&g(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:c,textarea:c},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};
CKEDITOR.env.ie&&(C.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var H=/<(a|area|img|input|source)\b([^>]*)>/gi,F=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,L=/^(href|src|name)$/i,G=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,N=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,J=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,E=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,
P=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,I=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;t=function(){function a(b,c){for(var d=0;d<b.length;d++){var f=b[d];f.lastIndex=0;if(f.test(c))return!0}return!1}function b(a){return CKEDITOR.tools.array.reduce(a.split(""),function(a,b){var d=b.toLowerCase(),f=b.toUpperCase(),k=c(d);d!==f&&(k+="|"+c(f));return a+("("+k+")")},"")}function c(a){var b;b=a.charCodeAt(0);var d=b.toString(16);b={htmlCode:"\x26#"+b+";?",hex:"\x26#x0*"+d+";?",entity:{"\x3c":"\x26lt;",
"\x3e":"\x26gt;",":":"\x26colon;"}[a]};for(var f in b)b[f]&&(a+="|"+b[f]);return a}var d=[new RegExp("("+b("\x3ccke:encoded\x3e")+"(.*?)"+b("\x3c/cke:encoded\x3e")+")|("+b("\x3c")+b("/")+"?"+b("cke:encoded\x3e")+")","gi"),new RegExp("(("+b("{cke_protected")+")(_[0-9]*)?"+b("}")+")","gi"),/<!(?:\s*-\s*){2,3}!?\s*>/g];return function(b){for(;a(d,b);)for(var c=d,f=0;f<c.length;f++)b=b.replace(c[f],"");return b}}()}(),"use strict",CKEDITOR.htmlParser.element=function(a,h){this.name=a;this.attributes=
h||{};this.children=[];var e=a||"",b=e.match(/^cke:(.*)/);b&&(e=b[1]);e=!!(CKEDITOR.dtd.$nonBodyContent[e]||CKEDITOR.dtd.$block[e]||CKEDITOR.dtd.$listItem[e]||CKEDITOR.dtd.$tableContent[e]||CKEDITOR.dtd.$nonEditable[e]||"br"==e);this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:e,hasInlineStarted:this.isEmpty||!e}},CKEDITOR.htmlParser.cssStyle=function(a){var h={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,
function(a,b,d){"font-family"==b&&(d=d.replace(/["']/g,""));h[b.toLowerCase()]=d});return{rules:h,populate:function(a){var b=this.toString();b&&(a instanceof CKEDITOR.dom.element?a.setAttribute("style",b):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=b:a.style=b)},toString:function(){var a=[],b;for(b in h)h[b]&&a.push(b,":",h[b],";");return a.join("")}}},function(){function a(a){return function(d){return d.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof a?d.name==a:d.name in a)}}var h=
function(a,d){a=a[0];d=d[0];return a<d?-1:a>d?1:0},e=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:e.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,d){var e=this,g,h;d=e.getFilterContext(d);if(!e.parent)a.onRoot(d,e);for(;;){g=e.name;if(!(h=a.onElementName(d,g)))return this.remove(),!1;e.name=h;if(!(e=a.onElement(d,e)))return this.remove(),
!1;if(e!==this)return this.replaceWith(e),!1;if(e.name==g)break;if(e.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(e),!1;if(!e.name)return this.replaceWithChildren(),!1}g=e.attributes;var c,k;for(c in g){for(h=g[c];;)if(k=a.onAttributeName(d,c))if(k!=c)delete g[c],c=k;else break;else{delete g[c];break}k&&(!1===(h=a.onAttribute(d,e,k,h))?delete g[k]:g[k]=h)}e.isEmpty||this.filterChildren(a,!1,d);return!0},filterChildren:e.filterChildren,writeHtml:function(a,d){d&&this.filter(d);var e=this.name,
g=[],m=this.attributes,c,k;a.openTag(e,m);for(c in m)g.push([c,m[c]]);a.sortAttributes&&g.sort(h);c=0;for(k=g.length;c<k;c++)m=g[c],a.attribute(m[0],m[1]);a.openTagClose(e,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(e)},writeChildrenHtml:e.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,d=a.length;d;)a[--d].insertAfter(this);this.remove()},forEach:e.forEach,getFirst:function(b){if(!b)return this.children.length?this.children[0]:null;"function"!=typeof b&&
(b=a(b));for(var d=0,e=this.children.length;d<e;++d)if(b(this.children[d]))return this.children[d];return null},getHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml(a);return a.getHtml()},setHtml:function(a){a=this.children=CKEDITOR.htmlParser.fragment.fromHtml(a).children;for(var d=0,e=a.length;d<e;++d)a[d].parent=this},getOuterHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},split:function(a){for(var d=this.children.splice(a,
this.children.length-a),e=this.clone(),g=0;g<d.length;++g)d[g].parent=e;e.children=d;d[0]&&(d[0].previous=null);0<a&&(this.children[a-1].next=null);this.parent.add(e,this.getIndex()+1);return e},find:function(a,d){void 0===d&&(d=!1);var e=[],g;for(g=0;g<this.children.length;g++){var h=this.children[g];"function"==typeof a&&a(h)?e.push(h):"string"==typeof a&&h.name===a&&e.push(h);d&&h.find&&(e=e.concat(h.find(a,d)))}return e},findOne:function(a,d){var e=null,g=CKEDITOR.tools.array.find(this.children,
function(g){var c="function"===typeof a?a(g):g.name===a;if(c||!d)return c;g.children&&g.findOne&&(e=g.findOne(a,!0));return!!e});return e||g||null},addClass:function(a){if(!this.hasClass(a)){var d=this.attributes["class"]||"";this.attributes["class"]=d+(d?" ":"")+a}},removeClass:function(a){var d=this.attributes["class"];d&&((d=CKEDITOR.tools.trim(d.replace(new RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=d:delete this.attributes["class"])},hasClass:function(a){var d=this.attributes["class"];
return d?(new RegExp("(?:^|\\s)"+a+"(?\x3d\\s|$)")).test(d):!1},getFilterContext:function(a){var d=[];a||(a={nonEditable:!1,nestedEditable:!1});a.nonEditable||"false"!=this.attributes.contenteditable?a.nonEditable&&!a.nestedEditable&&"true"==this.attributes.contenteditable&&d.push("nestedEditable",!0):d.push("nonEditable",!0);if(d.length){a=CKEDITOR.tools.copy(a);for(var e=0;e<d.length;e+=2)a[d[e]]=d[e+1]}return a}},!0)}(),function(){var a=/{([^}]+)}/g;CKEDITOR.template=function(a){this.source="function"===
typeof a?a:String(a)};CKEDITOR.template.prototype.output=function(h,e){var b=("function"===typeof this.source?this.source(h):this.source).replace(a,function(a,b){return void 0!==h[b]?h[b]:a});return e?e.push(b):b}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(a){function h(){CKEDITOR.currentInstance==a&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))}CKEDITOR.instances[a.name]=a;a.on("focus",function(){CKEDITOR.currentInstance!=
a&&(CKEDITOR.currentInstance=a,CKEDITOR.fire("currentInstance"))});a.on("blur",h);a.on("destroy",h);CKEDITOR.fire("instance",null,a)},CKEDITOR.remove=function(a){delete CKEDITOR.instances[a.name]},function(){var a={};CKEDITOR.addTemplate=function(h,e){var b=a[h];if(b)return b;b={name:h,source:e};CKEDITOR.fire("template",b);return a[h]=new CKEDITOR.template(b.source)};CKEDITOR.getTemplate=function(h){return a[h]}}(),function(){var a=[];CKEDITOR.addCss=function(h){a.push(h)};CKEDITOR.getCss=function(){return a.join("\n")}}(),
CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")}),CKEDITOR.TRISTATE_ON=1,CKEDITOR.TRISTATE_OFF=2,CKEDITOR.TRISTATE_DISABLED=0,function(){CKEDITOR.inline=function(a,h){a=CKEDITOR.editor._getEditorElement(a);if(!a)return null;if(CKEDITOR.editor.shouldDelayEditorCreation(a,h))return CKEDITOR.editor.initializeDelayedEditorCreation(a,h,"inline");var e=a.is("textarea")?a:null,b=e?e.getValue():a.getHtml(),d=new CKEDITOR.editor(h,a,CKEDITOR.ELEMENT_MODE_INLINE);
e?(d.setData(b,null,!0),a=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+!!d.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+e.getValue()+"\x3c/div\x3e",CKEDITOR.document),a.insertAfter(e),e.hide(),e.$.form&&d._attachToForm()):(h&&"undefined"!==typeof h.readOnly&&!h.readOnly&&a.setAttribute("contenteditable","true"),d.setData(b,null,!0));d.on("loaded",function(){d.fire("uiReady");d.editable(a);d.container=a;d.ui.contentsElement=a;d.setData(d.getData(1));d.resetDirty();d.fire("contentDom");
d.mode="wysiwyg";d.fire("mode");d.status="ready";d.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,d)},null,null,1E4);d.on("destroy",function(){var a=d.container;e&&a&&(a.clearCustomData(),a.remove());e&&e.show();d.element.clearCustomData();delete d.element});return d};CKEDITOR.inlineAll=function(){var a,h,e;for(e in CKEDITOR.dtd.$editable)for(var b=CKEDITOR.document.getElementsByTag(e),d=0,l=b.count();d<l;d++)a=b.getItem(d),"true"!=a.getAttribute("contenteditable")||a.getEditor()||(h=
{element:a,config:{}},!1!==CKEDITOR.fire("inline",h)&&CKEDITOR.inline(a,h.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function a(a,d,l,g){a=CKEDITOR.editor._getEditorElement(a);if(!a)return null;if(CKEDITOR.editor.shouldDelayEditorCreation(a,d))return CKEDITOR.editor.initializeDelayedEditorCreation(a,d,"replace");var m=new CKEDITOR.editor(d,a,g);g==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.setStyle("visibility",
"hidden"),m._.required=a.hasAttribute("required"),a.removeAttribute("required"));l&&m.setData(l,null,!0);m.on("loaded",function(){m.isDestroyed()||m.isDetached()||(e(m),g==CKEDITOR.ELEMENT_MODE_REPLACE&&m.config.autoUpdateElement&&a.$.form&&m._attachToForm(),m.setMode(m.config.startupMode,function(){m.resetDirty();m.status="ready";m.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,m)}))});m.on("destroy",h);return m}function h(){var a=this.container,d=this.element;a&&(a.clearCustomData(),
a.remove());d&&(d.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(d.show(),this._.required&&d.setAttribute("required","required")),delete this.element)}function e(a){var d=a.name,e=a.element,g=a.elementMode,h=a.fire("uiSpace",{space:"top",html:""}).html,c=a.fire("uiSpace",{space:"bottom",html:""}).html,k=new CKEDITOR.template('\x3c{outerEl} id\x3d"cke_{name}" class\x3d"{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'"  dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"application"'+
(a.applicationTitle?' aria-labelledby\x3d"cke_{name}_arialbl"':"")+"\x3e"+(a.applicationTitle?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':"")+'\x3c{outerEl} class\x3d"cke_inner cke_reset" role\x3d"presentation"\x3e{topHtml}\x3c{outerEl} id\x3d"{contentId}" class\x3d"cke_contents cke_reset" role\x3d"presentation"\x3e\x3c/{outerEl}\x3e{bottomHtml}\x3c/{outerEl}\x3e\x3c/{outerEl}\x3e'),d=CKEDITOR.dom.element.createFromHtml(k.output({id:a.id,name:d,langDir:a.lang.dir,
langCode:a.langCode,voiceLabel:a.applicationTitle,topHtml:h?'\x3cspan id\x3d"'+a.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+h+"\x3c/span\x3e":"",contentId:a.ui.spaceId("contents"),bottomHtml:c?'\x3cspan id\x3d"'+a.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+c+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));g==CKEDITOR.ELEMENT_MODE_REPLACE?(e.hide(),d.insertAfter(e)):e.append(d);a.container=
d;a.ui.contentsElement=a.ui.space("contents");h&&a.ui.space("top").unselectable();c&&a.ui.space("bottom").unselectable();e=a.config.width;g=a.config.height;e&&d.setStyle("width",CKEDITOR.tools.cssLength(e));g&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(g));d.disableContextMenu();CKEDITOR.env.webkit&&d.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(b,d){return a(b,d,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(b,d,e){return a(b,
d,e,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),d=0;d<a.length;d++){var e=null,g=a[d];if(g.name||g.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(g.className))continue}else if("function"==typeof arguments[0]&&(e={},!1===arguments[0](g,e)))continue;this.replace(g,e)}}};CKEDITOR.editor.prototype.addMode=function(a,d){(this._.modes||(this._.modes={}))[a]=d};CKEDITOR.editor.prototype.setMode=
function(a,d){var e=this,g=this._.modes;if(a!=e.mode&&g&&g[a]){e.fire("beforeSetMode",a);if(e.mode){var h=e.checkDirty(),g=e._.previousModeData,c,k=0;e.fire("beforeModeUnload");e.editable(0);e._.previousMode=e.mode;e._.previousModeData=c=e.getData(1);"source"==e.mode&&g==c&&(e.fire("lockSnapshot",{forceUpdate:!0}),k=1);e.ui.space("contents").setHtml("");e.mode=""}else e._.previousModeData=e.getData(1);this._.modes[a](function(){e.mode=a;void 0!==h&&!h&&e.resetDirty();k?e.fire("unlockSnapshot"):"wysiwyg"==
a&&e.fire("saveSnapshot");setTimeout(function(){e.isDestroyed()||e.isDetached()||(e.fire("mode"),d&&d.call(e))},0)})}};CKEDITOR.editor.prototype.resize=function(a,d,e,g){var h=this.container,c=this.ui.space("contents"),k=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;g=g?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):h;if(a||0===a)a=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(a));g.setSize("width",a,!0);k&&
(k.style.width="1%");d=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(d));var f=(g.$.offsetHeight||0)-(c.$.clientHeight||0),h=Math.max(d-(e?0:f),0);d=e?d+f:d;c.setStyle("height",CKEDITOR.tools.cssLength(h));k&&(k.style.width="100%");this.fire("resize",{outerHeight:d,contentsHeight:h,outerWidth:a||g.getSize("width")})};CKEDITOR.editor.prototype.getResizable=function(a){return a?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),
CKEDITOR.config.startupMode="wysiwyg",function(){function a(a){var d=a.editor,f=a.data.path,k=f.blockLimit,g=a.data.selection,e=g.getRanges()[0],l;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(g=h(g,f))g.appendBogus(),l=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.edge&&d._.previousActive;c(d,f.block,k)&&e.collapsed&&!e.getCommonAncestor().isReadOnly()&&(f=e.clone(),f.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),k=new CKEDITOR.dom.walker(f),k.guard=function(a){return!b(a)||
a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!k.checkForward()||f.checkStartOfBlock()&&f.checkEndOfBlock())&&(d=e.fixBlock(!0,d.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(d=d.getFirst(b))&&d.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(d.getText()).match(/^(?:&nbsp;|\xa0)$/)&&d.remove(),l=1,a.cancel());l&&e.select()}function h(a,c){if(a.isFake)return 0;var d=c.block||c.blockLimit,f=d&&d.getLast(b);if(!(!d||!d.isBlockBoundary()||f&&f.type==CKEDITOR.NODE_ELEMENT&&
f.isBlockBoundary()||d.is("pre")||d.getBogus()))return d}function e(a){var b=a.data.getTarget();b.is("input")&&(b=b.getAttribute("type"),"submit"!=b&&"reset"!=b||a.data.preventDefault())}function b(a){return v(a)&&u(a)}function d(a,b){return function(c){var d=c.data.$.toElement||c.data.$.fromElement||c.data.$.relatedTarget;(d=d&&d.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(d):null)&&(b.equals(d)||b.contains(d))||a.call(this,c)}}function l(a){return!!a.getRanges()[0].startPath().contains({table:1,
ul:1,ol:1,dl:1})}function g(a){function c(a){var f={table:1,ul:1,ol:1,dl:1};return function(c,k){k&&c.type==CKEDITOR.NODE_ELEMENT&&c.is(f)&&(d=c);if(!(k||!b(c)||a&&t(c)))return!1}}var d,f=a.getRanges()[0],k=a.root;return l(a)&&(a=f.clone(),a.collapse(1),a.setStartAt(k,CKEDITOR.POSITION_AFTER_START),k=new CKEDITOR.dom.walker(a),k.guard=c(),k.checkBackward(),d)?(a=f.clone(),a.collapse(),a.setEndAt(d,CKEDITOR.POSITION_AFTER_END),k=new CKEDITOR.dom.walker(a),k.guard=c(!0),d=!1,k.checkForward(),d):null}
function m(a){return a.block.getParent().getChildCount()}function c(a,b,c){return!1!==a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(c)&&!b||b&&"true"==b.getAttribute("contenteditable"))}function k(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function f(a){a&&a.isEmptyInlineRemoveable()&&a.remove()}function n(a){var b=a.editor;b.getSelection().scrollIntoView();setTimeout(function(){b.fire("saveSnapshot")},
0)}function r(a,b,c){var d=a.getCommonAncestor(b);for(b=a=c?b:a;(a=a.getParent())&&!d.equals(a)&&1==a.getChildCount();)b=a;b.remove()}var v,u,q,t,z,p,A,y,x,w,B={ul:1,ol:1,dl:1};CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,b){this.base(b.$||b);this.editor=a;this.status="unloaded";this.hasFocus=!1;this.setup()},proto:{focus:function(){var a;if(CKEDITOR.env.webkit&&!this.hasFocus&&(a=this.editor._.previousActive||this.getDocument().getActive(),this.contains(a))){a.focus();
return}CKEDITOR.env.edge&&14<CKEDITOR.env.version&&!this.hasFocus&&this.getDocument().equals(CKEDITOR.document)&&(this.editor._.previousScrollTop=this.$.scrollTop);try{if(!CKEDITOR.env.ie||CKEDITOR.env.edge&&14<CKEDITOR.env.version||!this.getDocument().equals(CKEDITOR.document))if(CKEDITOR.env.chrome){var b=this.$.scrollTop;this.$.focus();this.$.scrollTop=b}else this.$.focus();else this.$.setActive()}catch(c){if(!CKEDITOR.env.ie)throw c;}CKEDITOR.env.safari&&!this.isInline()&&(a=CKEDITOR.document.getActive(),
a.equals(this.getWindow().getFrame())||this.getWindow().focus())},on:function(a,b){var c=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a="focus"==a?"focusin":"focusout",b=d(b,this),c[0]=a,c[1]=b);return CKEDITOR.dom.element.prototype.on.apply(this,c)},attachListener:function(a){!this._.listeners&&(this._.listeners=[]);var b=Array.prototype.slice.call(arguments,1),b=a.on.apply(a,b);this._.listeners.push(b);return b},clearListeners:function(){var a=this._.listeners;
try{for(;a.length;)a.pop().removeListener()}catch(b){}},restoreAttrs:function(){var a=this._.attrChanges,b,c;for(c in a)a.hasOwnProperty(c)&&(b=a[c],null!==b?this.setAttribute(c,b):this.removeAttribute(c))},attachClass:function(a){var b=this.getCustomData("classes");this.hasClass(a)||(!b&&(b=[]),b.push(a),this.setCustomData("classes",b),this.addClass(a))},changeAttr:function(a,b){var c=this.getAttribute(a);b!==c&&(!this._.attrChanges&&(this._.attrChanges={}),a in this._.attrChanges||(this._.attrChanges[a]=
c),this.setAttribute(a,b))},insertText:function(a){this.editor.focus();this.insertHtml(this.transformPlainTextToHtml(a),"text")},transformPlainTextToHtml:function(a){var b=this.editor.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:this.editor.activeEnterMode;return CKEDITOR.tools.transformPlainTextToHtml(a,b)},insertHtml:function(a,b,c){var d=this.editor;d.focus();d.fire("saveSnapshot");c||(c=d.getSelection().getRanges()[0]);p(this,b||"html",a,c);c.select();n(this);this.editor.fire("afterInsertHtml",
{})},insertHtmlIntoRange:function(a,b,c){p(this,c||"html",a,b);this.editor.fire("afterInsertHtml",{intoRange:b})},insertElement:function(a,c){var d=this.editor;d.focus();d.fire("saveSnapshot");var f=d.activeEnterMode,d=d.getSelection(),k=a.getName(),k=CKEDITOR.dtd.$block[k];c||(c=d.getRanges()[0]);this.insertElementIntoRange(a,c)&&(c.moveToPosition(a,CKEDITOR.POSITION_AFTER_END),k&&((k=a.getNext(function(a){return b(a)&&!t(a)}))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is(CKEDITOR.dtd.$block)?k.getDtd()["#"]?
c.moveToElementEditStart(k):c.moveToElementEditEnd(a):k||f==CKEDITOR.ENTER_BR||(k=c.fixBlock(!0,f==CKEDITOR.ENTER_DIV?"div":"p"),c.moveToElementEditStart(k))));d.selectRanges([c]);n(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,b){var c=this.editor,d=c.config.enterMode,k=a.getName(),g=CKEDITOR.dtd.$block[k];if(b.checkReadOnly())return!1;b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&(b.startContainer.is({tr:1,table:1,tbody:1,
thead:1,tfoot:1})?A(b):b.startContainer.is(CKEDITOR.dtd.$list)&&y(b));var e,h;if(g)for(;(e=b.getCommonAncestor(0,1))&&(h=CKEDITOR.dtd[e.getName()])&&(!h||!h[k]);)if(e.getName()in CKEDITOR.dtd.span){var g=b.splitElement(e),l=b.createBookmark();f(e);f(g);b.moveToBookmark(l)}else b.checkStartOfBlock()&&b.checkEndOfBlock()?(b.setStartBefore(e),b.collapse(!0),e.remove()):b.splitBlock(d==CKEDITOR.ENTER_DIV?"div":"p",c.editable());b.insertNode(a);return!0},setData:function(a,b){b||(a=this.editor.dataProcessor.toHtml(a));
this.setHtml(a);this.fixInitialSelection();"unloaded"==this.status&&(this.status="ready");this.editor.fire("dataReady")},getData:function(a){var b=this.getHtml();a||(b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute("contenteditable",String(!a));this.setAttribute("aria-readonly",String(a))},detach:function(){this.status="detached";this.editor.setData(this.editor.getData(),{internal:!0});this.clearListeners();try{this._.cleanCustomData()}catch(a){if(!CKEDITOR.env.ie||
-2146828218!==a.number)throw a;}this.editor.fire("contentDomUnload");delete this.editor.document;delete this.editor.window;delete this.editor},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},fixInitialSelection:function(){function a(){var b=c.getDocument().$,d=b.getSelection(),f;a:if(d.anchorNode&&d.anchorNode==c.$)f=!0;else{if(CKEDITOR.env.webkit&&(f=c.getDocument().getActive())&&f.equals(c)&&!d.anchorNode){f=!0;break a}f=void 0}f&&(f=new CKEDITOR.dom.range(c),f.moveToElementEditStart(c),
b=b.createRange(),b.setStart(f.startContainer.$,f.startOffset),b.collapse(!0),d.removeAllRanges(),d.addRange(b))}function b(){var a=c.getDocument().$,d=a.selection,f=c.getDocument().getActive();"None"==d.type&&f.equals(c)&&(d=new CKEDITOR.dom.range(c),a=a.body.createTextRange(),d.moveToElementEditStart(c),d=d.startContainer,d.type!=CKEDITOR.NODE_ELEMENT&&(d=d.getParent()),a.moveToElementText(d.$),a.collapse(!0),a.select())}var c=this;if(CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&
(this.focus(),b());else if(this.hasFocus)this.focus(),a();else this.once("focus",function(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);a={doc:this.getDocument(),range:a.clone()};x.eol.detect(a,this);x.bogus.exclude(a);x.cell.shrink(a);a.fragment=a.range.cloneContents();x.tree.rebuild(a,this);x.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var c=w,d={range:a,doc:a.document},
f=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),f;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.table.detectPurge(d);d.bookmark=a.createBookmark();delete d.range;var k=this.editor.createRange();k.moveToPosition(d.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);d.targetBookmark=k.createBookmark();c.list.detectMerge(d,this);c.table.detectRanges(d,this);c.block.detectMerge(d,this);d.tableContentsRanges?(c.table.deleteRanges(d),a.moveToBookmark(d.bookmark),d.range=a):(a.moveToBookmark(d.bookmark),
d.range=a,a.extractContents(c.detectExtractMerge(d)));a.moveToBookmark(d.targetBookmark);a.optimize();c.fixUneditableRangePosition(a);c.list.merge(d,this);c.table.purge(d,this);c.block.merge(d,this);if(b){c=a.startPath();if(d=a.checkStartOfBlock()&&a.checkEndOfBlock()&&c.block&&!a.root.equals(c.block)){a:{var d=c.block.getElementsByTag("span"),k=0,g;if(d)for(;g=d.getItem(k++);)if(!u(g)){d=!0;break a}d=!1}d=!d}d&&(a.moveToPosition(c.block,CKEDITOR.POSITION_BEFORE_START),c.block.remove())}else c.autoParagraph(this.editor,
a),q(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return f},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||!1!==a.config.ignoreEmptyParagraph&&(b=b.replace(z,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,
"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&"Control"==b.type||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");
a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):a.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);if(CKEDITOR.env.webkit)this.on("scroll",
function(){a._.previousScrollTop=a.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14<CKEDITOR.env.version){var c=function(){var b=a.editable();null!=a._.previousScrollTop&&b.getDocument().equals(CKEDITOR.document)&&(b.$.scrollTop=a._.previousScrollTop,a._.previousScrollTop=null,this.removeListener("scroll",c))};this.on("scroll",c)}a.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,a.once("contentDom",function(){a.focusManager.focus(this)},this));this.isInline()&&
this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var d=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var f=a.config.contentsLangDirection;this.getDirection(1)!=f&&this.changeAttr("dir",f);var k=CKEDITOR.getCss();if(k){var f=d.getHead(),h=f.getCustomData("stylesheet");h?k!=h.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?h.$.styleSheet.cssText=k:h.setText(k)):(k=d.appendStyleText(k),k=new CKEDITOR.dom.element(k.ownerNode||
k.owningElement),f.setCustomData("stylesheet",k),k.data("cke-temp",1))}f=d.getCustomData("stylesheet_ref")||0;d.setCustomData("stylesheet_ref",f+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var n={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var c=b.data.domEvent.getKey(),
d,f=a.getSelection();if(0!==f.getRanges().length){if(c in n){var k;b=f.getRanges()[0];var e=b.startPath(),h,r,t,c=8==c,p=!1;if(CKEDITOR.env.ie&&11>CKEDITOR.env.version&&f.getSelectedElement())k=f.getSelectedElement();else if(l(f)){var w=new CKEDITOR.dom.walker(b),L=b.collapsed?b.startContainer:w.next(),p=!1,F;if(b.checkStartOfBlock()){F=b.startPath().block||b.startPath().blockLimit;var z=F.getName();F=-1!==CKEDITOR.tools.array.indexOf(["dd","dt","li"],z)&&null===F.getPrevious()}else F=!1;if(F){for(;L&&
!p;)p=L.$.nodeName.toLowerCase(),p=!!B[p],L=w.next();w=m(b.startPath());L=m(b.endPath());p=p||w!==L}else p=void 0;p||(k=g(f))}k||p?(a.fire("saveSnapshot"),p?((d=b.startContainer.getAscendant(B,!0))?(b.setStart(d,0),b.enlarge(CKEDITOR.ENLARGE_ELEMENT),k=b):k=null,k.deleteContents()):(b.moveToPosition(k,CKEDITOR.POSITION_BEFORE_START),k.remove()),b.select(),a.fire("saveSnapshot"),d=1):b.collapsed&&((h=e.block)&&(t=h[c?"getPrevious":"getNext"](v))&&t.type==CKEDITOR.NODE_ELEMENT&&t.is("table")&&b[c?"checkStartOfBlock":
"checkEndOfBlock"]()?(a.fire("saveSnapshot"),b[c?"checkEndOfBlock":"checkStartOfBlock"]()&&h.remove(),b["moveToElementEdit"+(c?"End":"Start")](t),b.select(),a.fire("saveSnapshot"),d=1):e.blockLimit&&e.blockLimit.is("td")&&(r=e.blockLimit.getAscendant("table"))&&b.checkBoundaryOfElement(r,c?CKEDITOR.START:CKEDITOR.END)&&(t=r[c?"getPrevious":"getNext"](v))?(a.fire("saveSnapshot"),b["moveToElementEdit"+(c?"End":"Start")](t),b.checkStartOfBlock()&&b.checkEndOfBlock()?t.remove():b.select(),a.fire("saveSnapshot"),
d=1):(r=e.contains(["td","th","caption"]))&&b.checkBoundaryOfElement(r,c?CKEDITOR.START:CKEDITOR.END)&&(d=1))}return!d}});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(c){c.data.getKeystroke()in n&&!this.getFirst(b)&&(this.appendBogus(),c=a.createRange(),c.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),c.select())});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return!1;b={element:b.data.getTarget()};a.fire("doubleclick",b)});
CKEDITOR.env.ie&&this.attachListener(this,"click",e);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(b){var c=b.data.getTarget();c.is("img","hr","input","textarea","select")&&!c.isReadOnly()&&(a.getSelection().selectElement(c),c.is("input","textarea","select")&&b.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(b){(b=b.data.getTarget())&&b.is("img")&&!b.isReadOnly()&&a.getSelection().selectElement(b)});CKEDITOR.env.gecko&&this.attachListener(this,
"mouseup",function(b){if(2==b.data.$.button&&(b=b.data.getTarget(),!b.getAscendant("table")&&!b.getOuterHtml().replace(z,""))){var c=a.createRange();c.moveToElementEditStart(b);c.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){if(a.readOnly)return!0;
var c=b.data.domEvent.getKey();if(c in n&&(b=a.getSelection(),0!==b.getRanges().length)){var c=8==c,d=b.getRanges()[0];b=d.startPath();if(d.collapsed)a:{var f=b.block;if(f&&d[c?"checkStartOfBlock":"checkEndOfBlock"](!0)&&d.moveToClosestEditablePosition(f,!c)&&d.collapsed){if(d.startContainer.type==CKEDITOR.NODE_ELEMENT){var k=d.startContainer.getChild(d.startOffset-(c?1:0));if(k&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("hr")){a.fire("saveSnapshot");k.remove();b=!0;break a}}d=d.startPath().block;if(!d||
d&&d.contains(f))b=void 0;else{a.fire("saveSnapshot");var g;(g=(c?d:f).getBogus())&&g.remove();g=a.getSelection();k=g.createBookmarks();(c?f:d).moveChildren(c?d:f,!1);b.lastElement.mergeSiblings();r(f,d,!c);g.selectBookmarks(k);b=!0}}else b=!1}else c=d,g=b.block,d=c.endPath().block,g&&d&&!g.equals(d)?(a.fire("saveSnapshot"),(f=g.getBogus())&&f.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),d.getParent()&&(d.moveChildren(g,!1),b.lastElement.mergeSiblings(),r(g,d,!0)),c=a.getSelection().getRanges()[0],
c.collapse(1),c.optimize(),""===c.startContainer.getHtml()&&c.startContainer.appendBogus(),c.select(),b=!0):b=!1;if(!b)return;a.getSelection().scrollIntoView();a.fire("saveSnapshot");return!1}},this,null,100)}},getUniqueId:function(){var a;try{this._.expandoNumber=a=CKEDITOR.dom.domObject.prototype.getUniqueId.call(this)}catch(b){a=this._&&this._.expandoNumber}return a}},_:{cleanCustomData:function(){this.removeClass("cke_editable");this.restoreAttrs();for(var a=this.removeCustomData("classes");a&&
a.length;)this.removeClass(a.pop());if(!this.is("textarea")){var a=this.getDocument(),b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");--c?a.setCustomData("stylesheet_ref",c):(a.removeCustomData("stylesheet_ref"),b.removeCustomData("stylesheet").remove())}}}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(!arguments.length)return b;a?b=a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),b=
null);return this._.editable=b};CKEDITOR.on("instanceLoaded",function(b){var c=b.editor;c.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1"),a.setAttribute("contentEditable",!1))});c.on("selectionChange",function(b){if(!c.readOnly){var d=c.getSelection();d&&!d.isLocked&&(d=c.checkDirty(),c.fire("lockSnapshot"),a(b),c.fire("unlockSnapshot"),
!d&&c.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-multiline","true");c&&a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);var d=b.fire("ariaEditorHelpLabel",{}).label;if(d&&(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var f=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+
f+'" class\x3d"cke_voice_label"\x3e'+d+"\x3c/span\x3e");c.append(d);a.changeAttr("aria-describedby",f)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");v=CKEDITOR.dom.walker.whitespaces(!0);u=CKEDITOR.dom.walker.bookmark(!1,!0);q=CKEDITOR.dom.walker.empty();t=CKEDITOR.dom.walker.bogus();z=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;p=
function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function d(b,c){var f,k,g,e,h=[],l=c.range.startContainer;f=c.range.startPath();for(var l=n[l.getName()],m=0,r=b.getChildren(),I=r.count(),t=-1,p=-1,v=0,w=f.contains(n.$list);m<I;++m)f=r.getItem(m),a(f)?(g=f.getName(),w&&g in CKEDITOR.dtd.$list?h=h.concat(d(f,c)):(e=!!l[g],"br"!=g||!f.data("cke-eol")||m&&m!=I-1||(v=(k=m?h[m-1].node:r.getItem(m+1))&&(!a(k)||!k.is("br")),k=k&&a(k)&&n.$block[k.getName()]),-1!=t||e||(t=m),e||(p=m),h.push({isElement:1,
isLineBreak:v,isBlock:f.isBlockBoundary(),hasBlockSibling:k,node:f,name:g,allowed:e}),k=v=0)):h.push({isElement:0,node:f,allowed:1});-1<t&&(h[t].firstNotAllowed=1);-1<p&&(h[p].lastNotAllowed=1);return h}function g(b,c){var d=[],f=b.getChildren(),k=f.count(),e,h=0,l=n[c],m=!b.is(n.$inline)||b.is("br");for(m&&d.push(" ");h<k;h++)e=f.getItem(h),a(e)&&!e.is(l)?d=d.concat(g(e,c)):d.push(e);m&&d.push(" ");return d}function e(b){return a(b.startContainer)&&b.startContainer.getChild(b.startOffset-1)}function h(b){return b&&
a(b)&&(b.is(n.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function l(b,c,d,f){var k=b.clone(),g,e;k.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);(g=(new CKEDITOR.dom.walker(k)).next())&&a(g)&&r[g.getName()]&&(e=g.getPrevious())&&a(e)&&!e.getParent().equals(b.startContainer)&&d.contains(e)&&f.contains(g)&&g.isIdentical(e)&&(g.moveChildren(e),g.remove(),l(b,c,d,f))}function m(b,c){function d(b,c){if(c.isBlock&&c.isElement&&!c.node.is("br")&&a(b)&&b.is("br"))return b.remove(),1}var f=c.endContainer.getChild(c.endOffset),
k=c.endContainer.getChild(c.endOffset-1);f&&d(f,b[b.length-1]);k&&d(k,b[0])&&(c.setEnd(c.endContainer,c.endOffset-1),c.collapse())}var n=CKEDITOR.dtd,r={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},t={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},I=CKEDITOR.tools.extend({},n.$inline);delete I.br;return function(r,p,v,w){var u=r.editor,q=!1,y;"unfiltered_html"==p&&(p="html",q=!0);if(!w.checkReadOnly()){var x=(new CKEDITOR.dom.elementPath(w.startContainer,w.root)).blockLimit||
w.root;p={type:p,dontFilter:q,editable:r,editor:u,range:w,blockLimit:x,mergeCandidates:[],zombies:[]};var q=p.range,x=p.mergeCandidates,A="html"===p.type,E,B,T,Z,aa;"text"==p.type&&q.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(B=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",q.document),q.insertNode(B),q.setStartAfter(B));T=new CKEDITOR.dom.elementPath(q.startContainer);p.endPath=Z=new CKEDITOR.dom.elementPath(q.endContainer);if(!q.collapsed){E=Z.block||Z.blockLimit;var ca=q.getCommonAncestor();
E&&!E.equals(ca)&&!E.contains(ca)&&q.checkEndOfBlock()&&p.zombies.push(E);q.deleteContents()}for(;(aa=e(q))&&a(aa)&&aa.isBlockBoundary()&&T.contains(aa);)q.moveToPosition(aa,CKEDITOR.POSITION_BEFORE_END);l(q,p.blockLimit,T,Z);B&&(q.setEndBefore(B),q.collapse(),B.remove());B=q.startPath();if(E=B.contains(h,!1,1))y=q.splitElement(E),p.inlineStylesRoot=E,p.inlineStylesPeak=B.lastElement;B=q.createBookmark();A&&(f(E),f(y));(E=B.startNode.getPrevious(b))&&a(E)&&h(E)&&x.push(E);(E=B.startNode.getNext(b))&&
a(E)&&h(E)&&x.push(E);for(E=B.startNode;(E=E.getParent())&&h(E);)x.push(E);q.moveToBookmark(B);y=r.getHtml();y=""===y||y.match(z);u.enterMode===CKEDITOR.ENTER_DIV&&y&&((u=r.getFirst())&&u.remove(),w.setStartAt(r,CKEDITOR.POSITION_AFTER_START),w.collapse(!0));if(r=v){r=p.range;if("text"==p.type&&p.inlineStylesRoot){w=p.inlineStylesPeak;u=w.getDocument().createText("{cke-peak}");for(y=p.inlineStylesRoot.getParent();!w.equals(y);)u=u.appendTo(w.clone()),w=w.getParent();v=u.getOuterHtml().split("{cke-peak}").join(v)}w=
p.blockLimit.getName();if(/^\s+|\s+$/.test(v)&&"span"in CKEDITOR.dtd[w]){var V='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';v=V+v+V}v=p.editor.dataProcessor.toHtml(v,{context:null,fixForBody:!1,protectedWhitespaces:!!V,dontFilter:p.dontFilter,filter:p.editor.activeFilter,enterMode:p.editor.activeEnterMode});w=r.document.createElement("body");w.setHtml(v);V&&(w.getFirst().remove(),w.getLast().remove());if((V=r.startPath().block)&&(1!=V.getChildCount()||!V.getBogus()))a:{var Q;if(1==
w.getChildCount()&&a(Q=w.getFirst())&&Q.is(t)&&!Q.hasAttribute("contenteditable")){V=Q.getElementsByTag("*");r=0;for(y=V.count();r<y;r++)if(u=V.getItem(r),!u.is(I))break a;Q.moveChildren(Q.getParent(1));Q.remove()}}p.dataWrapper=w;r=v}if(r){Q=p.range;r=Q.document;w=p.blockLimit;y=0;var K,V=[],ea,R;v=B=0;var ba,u=Q.startContainer;aa=p.endPath.elements[0];var W,q=aa.getPosition(u),x=!!aa.getCommonAncestor(u)&&q!=CKEDITOR.POSITION_IDENTICAL&&!(q&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED),
u=d(p.dataWrapper,p);for(p.editor.enterMode!==CKEDITOR.ENTER_BR&&m(u,Q);y<u.length;y++){q=u[y];if(A=q.isLineBreak)A=Q,E=w,Z=T=void 0,q.hasBlockSibling?A=1:(T=A.startContainer.getAscendant(n.$block,1))&&T.is({div:1,p:1})?(Z=T.getPosition(E),Z==CKEDITOR.POSITION_IDENTICAL||Z==CKEDITOR.POSITION_CONTAINS?A=0:(E=A.splitElement(T),A.moveToPosition(E,CKEDITOR.POSITION_AFTER_START),A=1)):A=0;if(A)v=0<y;else{A=Q.startPath();!q.isBlock&&c(p.editor,A.block,A.blockLimit)&&(R=k(p.editor))&&(R=r.createElement(R),
R.appendBogus(),Q.insertNode(R),CKEDITOR.env.needsBrFiller&&(K=R.getBogus())&&K.remove(),Q.moveToPosition(R,CKEDITOR.POSITION_BEFORE_END));if((A=Q.startPath().block)&&!A.equals(ea)){if(K=A.getBogus())K.remove(),V.push(A);ea=A}q.firstNotAllowed&&(B=1);if(B&&q.isElement){A=Q.startContainer;for(E=null;A&&!n[A.getName()][q.name];){if(A.equals(w)){A=null;break}E=A;A=A.getParent()}if(A)E&&(ba=Q.splitElement(E),p.zombies.push(ba),p.zombies.push(E));else{E=w.getName();W=!y;A=y==u.length-1;E=g(q.node,E);T=
[];Z=E.length;for(var ca=0,ka=void 0,la=0,na=-1;ca<Z;ca++)ka=E[ca]," "==ka?(la||W&&!ca||(T.push(new CKEDITOR.dom.text(" ")),na=T.length),la=1):(T.push(ka),la=0);A&&na==T.length&&T.pop();W=T}}if(W){for(;A=W.pop();)Q.insertNode(A);W=0}else Q.insertNode(q.node);q.lastNotAllowed&&y<u.length-1&&((ba=x?aa:ba)&&Q.setEndAt(ba,CKEDITOR.POSITION_AFTER_START),B=0);Q.collapse()}}1!=u.length?K=!1:(K=u[0],K=K.isElement&&"false"==K.node.getAttribute("contenteditable"));K&&(v=!0,A=u[0].node,Q.setStartAt(A,CKEDITOR.POSITION_BEFORE_START),
Q.setEndAt(A,CKEDITOR.POSITION_AFTER_END));p.dontMoveCaret=v;p.bogusNeededBlocks=V}K=p.range;var ga;W=p.bogusNeededBlocks;for(ea=K.createBookmark();R=p.zombies.pop();)R.getParent()&&(ba=K.clone(),ba.moveToElementEditStart(R),ba.removeEmptyBlocksAtEnd());if(W)for(;R=W.pop();)CKEDITOR.env.needsBrFiller?R.appendBogus():R.append(K.document.createText(" "));for(;R=p.mergeCandidates.pop();)R.mergeSiblings();CKEDITOR.env.webkit&&K.startPath()&&(R=K.startPath(),R.block?R.block.$.normalize():R.blockLimit&&
R.blockLimit.$.normalize());K.moveToBookmark(ea);if(!p.dontMoveCaret){for(R=e(K);R&&a(R)&&!R.is(n.$empty);){if(R.isBlockBoundary())K.moveToPosition(R,CKEDITOR.POSITION_BEFORE_END);else{if(h(R)&&R.getHtml().match(/(\s|&nbsp;)$/g)){ga=null;break}ga=K.clone();ga.moveToPosition(R,CKEDITOR.POSITION_BEFORE_END)}R=R.getLast(b)}ga&&K.moveToRange(ga)}}}}();A=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};
b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};return b}function b(a,c,d){c=a.getDocument().createElement(c);a.append(c,d);return c}function c(a){var b=a.count(),d;for(b;0<b--;)d=a.getItem(b),CKEDITOR.tools.trim(d.getHtml())||(d.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&d.getChildCount()&&d.getFirst().remove())}return function(d){var f=d.startContainer,k=f.getAscendant("table",1),g=!1;c(k.getElementsByTag("td"));c(k.getElementsByTag("th"));k=d.clone();k.setStart(f,0);k=
a(k).lastBackward();k||(k=d.clone(),k.setEndAt(f,CKEDITOR.POSITION_BEFORE_END),k=a(k).lastForward(),g=!0);k||(k=f);k.is("table")?(d.setStartAt(k,CKEDITOR.POSITION_BEFORE_START),d.collapse(!0),k.remove()):(k.is({tbody:1,thead:1,tfoot:1})&&(k=b(k,"tr",g)),k.is("tr")&&(k=b(k,k.getParent().is("thead")?"th":"td",g)),(f=k.getBogus())&&f.remove(),d.moveToPosition(k,g?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();y=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,
b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||a.is(CKEDITOR.dtd.$listItem)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$listItem)};return b}return function(b){var c=b.startContainer,d=!1,f;f=b.clone();f.setStart(c,0);f=a(f).lastBackward();f||(f=b.clone(),f.setEndAt(c,CKEDITOR.POSITION_BEFORE_END),f=a(f).lastForward(),d=!0);f||(f=c);f.is(CKEDITOR.dtd.$list)?(b.setStartAt(f,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),f.remove()):
((c=f.getBogus())&&c.remove(),b.moveToPosition(f,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),b.select())}}();x={eol:{detect:function(a,b){var c=a.range,d=c.clone(),f=c.clone(),k=new CKEDITOR.dom.elementPath(c.startContainer,b),g=new CKEDITOR.dom.elementPath(c.endContainer,b);d.collapse(1);f.collapse();k.block&&d.checkBoundaryOfElement(k.block,CKEDITOR.END)&&(c.setStartAfter(k.block),a.prependEolBr=1);g.block&&f.checkBoundaryOfElement(g.block,CKEDITOR.START)&&(c.setEndBefore(g.block),
a.appendEolBr=1)},fix:function(a,b){var c=b.getDocument(),d;a.appendEolBr&&(d=this.createEolBr(c),a.fragment.append(d));!a.prependEolBr||d&&!d.getPrevious()||a.fragment.append(this.createEolBr(c),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),c=b.startNode,b=b.endNode;!b||!t(b)||c&&c.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var c=a.range,d=c.getCommonAncestor(),f=new CKEDITOR.dom.elementPath(d,
b),k=new CKEDITOR.dom.elementPath(c.startContainer,b),c=new CKEDITOR.dom.elementPath(c.endContainer,b),g;d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent());if(f.blockLimit.is({tr:1,table:1})){var e=f.contains("table").getParent();g=function(a){return!a.equals(e)}}else if(f.block&&f.block.is(CKEDITOR.dtd.$listItem)&&(k=k.contains(CKEDITOR.dtd.$list),c=c.contains(CKEDITOR.dtd.$list),!k.equals(c))){var h=f.contains(CKEDITOR.dtd.$list).getParent();g=function(a){return!a.equals(h)}}g||(g=function(a){return!a.equals(f.block)&&
!a.equals(f.blockLimit)});this.rebuildFragment(a,b,d,g)},rebuildFragment:function(a,b,c,d){for(var f;c&&!c.equals(b)&&d(c);)f=c.clone(0,1),a.fragment.appendTo(f),a.fragment=f,c=c.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,c=a.endContainer,d=a.startOffset,f=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(c)&&b.is("tr")&&++d==f&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};w=function(){function a(b,c){var d=b.getParent();if(d.is(CKEDITOR.dtd.$inline))b[c?"insertBefore":"insertAfter"](d)}
function b(c,d,f){a(d);a(f,1);for(var k;k=f.getNext();)k.insertAfter(d),d=k;q(c)&&c.remove()}function d(a,b){var c=new CKEDITOR.dom.range(a);c.setStartAfter(b.startNode);c.setEndBefore(b.endNode);return c}return{list:{detectMerge:function(a,b){var c=d(b,a.bookmark),f=c.startPath(),k=c.endPath(),g=f.contains(CKEDITOR.dtd.$list),e=k.contains(CKEDITOR.dtd.$list);a.mergeList=g&&e&&g.getParent().equals(e.getParent())&&!g.equals(e);a.mergeListItems=f.block&&k.block&&f.block.is(CKEDITOR.dtd.$listItem)&&
k.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)c=c.clone(),c.setStartBefore(a.bookmark.startNode),c.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=c.createBookmark()},merge:function(a,c){if(a.mergeListBookmark){var d=a.mergeListBookmark.startNode,f=a.mergeListBookmark.endNode,k=new CKEDITOR.dom.elementPath(d,c),g=new CKEDITOR.dom.elementPath(f,c);if(a.mergeList){var e=k.contains(CKEDITOR.dtd.$list),h=g.contains(CKEDITOR.dtd.$list);e.equals(h)||(h.moveChildren(e),h.remove())}a.mergeListItems&&
(k=k.contains(CKEDITOR.dtd.$listItem),g=g.contains(CKEDITOR.dtd.$listItem),k.equals(g)||b(g,d,f));d.remove();f.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var c=new CKEDITOR.dom.range(b);c.setStartBefore(a.bookmark.startNode);c.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=c.createBookmark()}},merge:function(a,c){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var d=a.mergeBlockBookmark.startNode,f=a.mergeBlockBookmark.endNode,k=new CKEDITOR.dom.elementPath(d,
c),g=new CKEDITOR.dom.elementPath(f,c),k=k.block,g=g.block;k&&g&&!k.equals(g)&&b(g,d,f);d.remove();f.remove()}}},table:function(){function a(d){var f=[],k,g=new CKEDITOR.dom.walker(d),e=d.startPath().contains(c),h=d.endPath().contains(c),l={};g.guard=function(a,g){if(a.type==CKEDITOR.NODE_ELEMENT){var m="visited_"+(g?"out":"in");if(a.getCustomData(m))return;CKEDITOR.dom.element.setMarker(l,a,m,1)}if(g&&e&&a.equals(e))k=d.clone(),k.setEndAt(e,CKEDITOR.POSITION_BEFORE_END),f.push(k);else if(!g&&h&&
a.equals(h))k=d.clone(),k.setStartAt(h,CKEDITOR.POSITION_AFTER_START),f.push(k);else{if(m=!g)m=a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&(!e||b(a,e))&&(!h||b(a,h));if(!m&&(m=g))if(a.is(c))var m=e&&e.getAscendant("table",!0),n=h&&h.getAscendant("table",!0),r=a.getAscendant("table",!0),m=m&&m.contains(r)||n&&n.contains(r);else m=void 0;m&&(k=d.clone(),k.selectNodeContents(a),f.push(k))}};g.lastForward();CKEDITOR.dom.element.clearAllMarkers(l);return f}function b(a,c){var d=CKEDITOR.POSITION_CONTAINS+
CKEDITOR.POSITION_IS_CONTAINED,f=a.getPosition(c);return f===CKEDITOR.POSITION_IDENTICAL?!1:0===(f&d)}var c={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,d=b.clone();d.enlarge(CKEDITOR.ENLARGE_ELEMENT);var d=new CKEDITOR.dom.walker(d),f=0;d.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&++f};d.checkForward();if(1<f){var d=b.startPath().contains("table"),k=b.endPath().contains("table");d&&k&&b.checkBoundaryOfElement(d,CKEDITOR.START)&&b.checkBoundaryOfElement(k,
CKEDITOR.END)&&(b=a.range.clone(),b.setStartBefore(d),b.setEndAfter(k),a.purgeTableBookmark=b.createBookmark())}},detectRanges:function(f,k){var g=d(k,f.bookmark),e=g.clone(),h,l,m=g.getCommonAncestor();m.is(CKEDITOR.dtd.$tableContent)&&!m.is(c)&&(m=m.getAscendant("table",!0));l=m;m=new CKEDITOR.dom.elementPath(g.startContainer,l);l=new CKEDITOR.dom.elementPath(g.endContainer,l);m=m.contains("table");l=l.contains("table");if(m||l)m&&l&&b(m,l)?(f.tableSurroundingRange=e,e.setStartAt(m,CKEDITOR.POSITION_AFTER_END),
e.setEndAt(l,CKEDITOR.POSITION_BEFORE_START),e=g.clone(),e.setEndAt(m,CKEDITOR.POSITION_AFTER_END),h=g.clone(),h.setStartAt(l,CKEDITOR.POSITION_BEFORE_START),h=a(e).concat(a(h))):m?l||(f.tableSurroundingRange=e,e.setStartAt(m,CKEDITOR.POSITION_AFTER_END),g.setEndAt(m,CKEDITOR.POSITION_AFTER_END)):(f.tableSurroundingRange=e,e.setEndAt(l,CKEDITOR.POSITION_BEFORE_START),g.setStartAt(l,CKEDITOR.POSITION_AFTER_START)),f.tableContentsRanges=h?h:a(g)},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();)b.extractContents(),
q(b.startContainer)&&b.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var b=a.doc,c=a.range.clone(),b=b.createElement("p");b.insertBefore(a.purgeTableBookmark.startNode);c.moveToBookmark(a.purgeTableBookmark);c.deleteContents();a.range.moveToPosition(b,CKEDITOR.POSITION_AFTER_START)}}}}(),detectExtractMerge:function(a){return!(a.range.startPath().contains(CKEDITOR.dtd.$listItem)&&a.range.endPath().contains(CKEDITOR.dtd.$listItem))},
fixUneditableRangePosition:function(a){a.startContainer.getDtd()["#"]||a.moveToClosestEditablePosition(null,!0)},autoParagraph:function(a,b){var d=b.startPath(),f;c(a,d.block,d.blockLimit)&&(f=k(a))&&(f=b.document.createElement(f),f.appendBogus(),b.insertNode(f),b.moveToPosition(f,CKEDITOR.POSITION_AFTER_START))}}}()}(),function(){function a(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function h(b,c){if(0===b.length||a(b[0].getEnclosedNode()))return!1;var d,f;if((d=!c&&
1===b.length)&&!(d=b[0].collapsed)){var k=b[0];d=k.startContainer.getAscendant({td:1,th:1},!0);var g=k.endContainer.getAscendant({td:1,th:1},!0);f=CKEDITOR.tools.trim;d&&d.equals(g)&&!d.findOne("td, th, tr, tbody, table")?(k=k.cloneContents(),d=k.getFirst()?f(k.getFirst().getText())!==f(d.getText()):!0):d=!1}if(d)return!1;for(f=0;f<b.length;f++)if(d=b[f]._getTableElement(),!d)return!1;return!0}function e(a){function b(a){a=a.find("td, th");var c=[],d;for(d=0;d<a.count();d++)c.push(a.getItem(d));return c}
var c=[],d,f;for(f=0;f<a.length;f++)d=a[f]._getTableElement(),d.is&&d.is({td:1,th:1})?c.push(d):c=c.concat(b(d));return c}function b(a){a=e(a);var b="",c=[],d,f;for(f=0;f<a.length;f++)d&&!d.equals(a[f].getAscendant("tr"))?(b+=c.join("\t")+"\n",d=a[f].getAscendant("tr"),c=[]):0===f&&(d=a[f].getAscendant("tr")),c.push(a[f].getText());return b+=c.join("\t")}function d(a){var c=this.root.editor,d=c.getSelection(1);this.reset();y=!0;d.root.once("selectionchange",function(a){a.cancel()},null,null,0);d.selectRanges([a[0]]);
d=this._.cache;d.ranges=new CKEDITOR.dom.rangeList(a);d.type=CKEDITOR.SELECTION_TEXT;d.selectedElement=a[0]._getTableElement();d.selectedText=b(a);d.nativeSel=null;this.isFake=1;this.rev=z++;c._.fakeSelection=this;y=!1;this.root.fire("selectionchange")}function l(){var b=this._.fakeSelection,c;if(b){c=this.getSelection(1);var d;if(!(d=!c)&&(d=!c.isHidden())){d=b;var f=c.getRanges(),k=d.getRanges(),g=f.length&&f[0]._getTableElement()&&f[0]._getTableElement().getAscendant("table",!0),e=k.length&&k[0]._getTableElement()&&
k[0]._getTableElement().getAscendant("table",!0),l=1===f.length&&f[0]._getTableElement()&&f[0]._getTableElement().is("table"),m=1===k.length&&k[0]._getTableElement()&&k[0]._getTableElement().is("table");if(a(d.getSelectedElement()))d=!1;else{var n=1===f.length&&f[0].collapsed,k=h(f,!!CKEDITOR.env.webkit)&&h(k);g=g&&e?g.equals(e)||e.contains(g):!1;g&&(n||k)?(l&&!m&&d.selectRanges(f),d=!0):d=!1}d=!d}d&&(b.reset(),b=0)}if(!b&&(b=c||this.getSelection(1),!b||b.getType()==CKEDITOR.SELECTION_NONE))return;
this.fire("selectionCheck",b);c=this.elementPath();c.compare(this._.selectionPreviousPath)||(d=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(c.blockLimit),!CKEDITOR.env.webkit&&!CKEDITOR.env.gecko||d||(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=c,this.fire("selectionChange",{selection:b,path:c}))}function g(){w=!0;x||(m.call(this),x=CKEDITOR.tools.setTimeout(m,200,this))}function m(){x=null;w&&(CKEDITOR.tools.setTimeout(l,0,this),w=
!1)}function c(a){return B(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function k(a){function b(c,d){return c&&c.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(d?"End":"Start")](c):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;var d=a.startContainer,f=a.getPreviousNode(c,null,d),k=a.getNextNode(c,null,d);return b(f)||b(k,1)||!(f||k||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()&&d.getBogus())?!0:!1}function f(a){n(a,!1);var b=a.getDocument().createText(p);
a.setCustomData("cke-fillingChar",b);return b}function n(a,b){var c=a&&a.removeCustomData("cke-fillingChar");if(c){if(!1!==b){var d=a.getDocument().getSelection().getNative(),f=d&&"None"!=d.type&&d.getRangeAt(0),k=p.length;if(c.getLength()>k&&f&&f.intersectsNode(c.$)){var g=[{node:d.anchorNode,offset:d.anchorOffset},{node:d.focusNode,offset:d.focusOffset}];d.anchorNode==c.$&&d.anchorOffset>k&&(g[0].offset-=k);d.focusNode==c.$&&d.focusOffset>k&&(g[1].offset-=k)}}c.setText(r(c.getText(),1));g&&(c=a.getDocument().$,
d=c.getSelection(),c=c.createRange(),c.setStart(g[0].node,g[0].offset),c.collapse(!0),d.removeAllRanges(),d.addRange(c),d.extend(g[1].node,g[1].offset))}}function r(a,b){return b?a.replace(A,function(a,b){return b?" ":""}):a.replace(p,"")}function v(a,b){var c=b&&CKEDITOR.tools.htmlEncode(b)||"\x26nbsp;",c=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+(CKEDITOR.env.ie&&14>CKEDITOR.env.version?"display:none":"position:fixed;top:0;left:-1000px;width:0;height:0;overflow:hidden;")+
'"\x3e'+c+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(c);var d=a.getSelection(1),f=a.createRange(),k=d.root.on("selectionchange",function(a){a.cancel()},null,null,0);f.setStartAt(c,CKEDITOR.POSITION_AFTER_START);f.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);d.selectRanges([f]);k.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=c}function u(b){var c={37:1,39:1,8:1,46:1};return function(d){var f=d.data.getKeystroke();if(c[f]){var k=b.getSelection(),g=k.getRanges()[0];
k.isCollapsed()&&(g=g[38>f?"getPreviousEditableNode":"getNextEditableNode"]())&&g.type==CKEDITOR.NODE_ELEMENT&&"false"==g.getAttribute("contenteditable")&&(k=k.getStartElement(),!k.isBlockBoundary()||""!==(void 0===k.$.textContent?k.$.innerText:k.$.textContent)||a(k.getFirst())||8!==f&&46!==f||(k.remove(),b.fire("saveSnapshot")),b.getSelection().fake(g),d.data.preventDefault(),d.cancel())}}}function q(a){for(var b=0;b<a.length;b++){var c=a[b];c.getCommonAncestor().isReadOnly()&&a.splice(b,1);if(!c.collapsed){if(c.startContainer.isReadOnly())for(var d=
c.startContainer,f;d&&!((f=d.type==CKEDITOR.NODE_ELEMENT)&&d.is("body")||!d.isReadOnly());)f&&"false"==d.getAttribute("contentEditable")&&c.setStartAfter(d),d=d.getParent();d=c.startContainer;f=c.endContainer;var k=c.startOffset,g=c.endOffset,e=c.clone();d&&d.type==CKEDITOR.NODE_TEXT&&(k>=d.getLength()?e.setStartAfter(d):e.setStartBefore(d));f&&f.type==CKEDITOR.NODE_TEXT&&(g?e.setEndAfter(f):e.setEndBefore(f));d=new CKEDITOR.dom.walker(e);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&
d.isReadOnly()){var f=c.clone();c.setEndBefore(d);c.collapsed&&a.splice(b--,1);d.getPosition(e.endContainer)&CKEDITOR.POSITION_CONTAINS||(f.setStartAfter(d),f.collapsed||a.splice(b+1,0,f));return!0}return!1};d.next()}}return a}var t="function"!=typeof window.getSelection,z=1,p=CKEDITOR.tools.repeat("​",7),A=new RegExp(p+"( )?","g"),y,x,w,B=CKEDITOR.dom.walker.invisible(1),D=function(){function a(b){return function(a){var c=a.editor.createRange();c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]);
return!1}}function b(a){return function(b){var c=b.editor,d=c.createRange(),f;if(!c.readOnly)return(f=d.moveToClosestEditablePosition(b.selected,a))||(f=d.moveToClosestEditablePosition(b.selected,!a)),f&&c.getSelection().selectRanges([d]),c.fire("saveSnapshot"),b.selected.remove(),f||(d.moveToElementEditablePosition(c.editable()),c.getSelection().selectRanges([d])),c.fire("saveSnapshot"),!1}}var c=a(),d=a(1);return{37:c,38:c,39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(a){function b(){var a=
c.getSelection();a&&a.removeAllRanges()}var c=a.editor;c.on("contentDom",function(){function a(){v=new CKEDITOR.dom.selection(c.getSelection());v.lock()}function b(){e.removeListener("mouseup",b);r.removeListener("mouseup",b);var a=CKEDITOR.document.$.selection,c=a.createRange();"None"!=a.type&&c.parentElement()&&c.parentElement().ownerDocument==k.$&&c.select()}function d(a){var b,c;b=(b=this.document.getActive())?"input"===b.getName()||"textarea"===b.getName():!1;b||(b=this.getSelection(1),(c=f(b))&&
!c.equals(h)&&(b.selectElement(c),a.data.preventDefault()))}function f(a){a=a.getRanges()[0];return a?(a=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")},!0))&&"false"===a.getAttribute("contenteditable")?a:null:null}var k=c.document,e=CKEDITOR.document,h=c.editable(),m=k.getBody(),r=k.getDocumentElement(),p=h.isInline(),w,v;CKEDITOR.env.gecko&&h.attachListener(h,"focus",function(a){a.removeListener();0!==w&&(a=c.getSelection().getNative())&&
a.isCollapsed&&a.anchorNode==h.$&&(a=c.createRange(),a.moveToElementEditStart(h),a.select())},null,null,-2);h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){if(w&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){w=c._.previousActive&&c._.previousActive.equals(k.getActive());var a=null!=c._.previousScrollTop&&c._.previousScrollTop!=h.$.scrollTop;CKEDITOR.env.webkit&&w&&a&&(h.$.scrollTop=c._.previousScrollTop)}c.unlockSelection(w);w=0},null,null,-1);h.attachListener(h,
"mousedown",function(){w=0});if(CKEDITOR.env.ie||CKEDITOR.env.gecko||p)t?h.attachListener(h,"beforedeactivate",a,null,null,-1):h.attachListener(c,"selectionCheck",a,null,null,-1),h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusout":"blur",function(){var a=v&&(v.isFake||2>v.getRanges().length);CKEDITOR.env.gecko&&!p&&a||(c.lockSelection(v),w=1)},null,null,-1),h.attachListener(h,"mousedown",function(){w=0});if(CKEDITOR.env.ie&&!p){var q;h.attachListener(h,"mousedown",function(a){2==
a.data.$.button&&((a=c.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(q=c.window.getScrollPosition()))});h.attachListener(h,"mouseup",function(a){2==a.data.$.button&&q&&(c.document.$.documentElement.scrollLeft=q.x,c.document.$.documentElement.scrollTop=q.y);q=null});if("BackCompat"!=k.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var y,z;r.on("mousedown",function(a){function b(a){a=a.data.$;if(y){var c=m.$.createTextRange();try{c.moveToPoint(a.clientX,a.clientY)}catch(d){}y.setEndPoint(0>
z.compareEndPoints("StartToStart",c)?"EndToEnd":"StartToStart",c);y.select()}}function c(){r.removeListener("mousemove",b);e.removeListener("mouseup",c);r.removeListener("mouseup",c);y.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<r.$.clientHeight&&a.$.x<r.$.clientWidth){y=m.$.createTextRange();try{y.moveToPoint(a.$.clientX,a.$.clientY)}catch(d){}z=y.duplicate();r.on("mousemove",b);e.on("mouseup",c);r.on("mouseup",c)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)r.on("mousedown",function(a){a.data.getTarget().is("html")&&
(e.on("mouseup",b),r.on("mouseup",b))})}}h.attachListener(h,"selectionchange",l,c);h.attachListener(h,"keyup",g,c);h.attachListener(h,"touchstart",g,c);h.attachListener(h,"touchend",g,c);CKEDITOR.env.ie&&h.attachListener(h,"keydown",d,c);h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){c.forceNextSelectionCheck();c.selectionChange(1)});if(p&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var x;h.attachListener(h,"mousedown",function(){x=1});h.attachListener(k.getDocumentElement(),
"mouseup",function(){x&&g.call(c);x=0})}else h.attachListener(CKEDITOR.env.ie?h:k.getDocumentElement(),"mouseup",g,c);CKEDITOR.env.webkit&&h.attachListener(k,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:h.hasFocus&&n(h)}},null,null,-1);h.attachListener(h,"keydown",u(c),null,null,-1)});c.on("setData",function(){c.unlockSelection();CKEDITOR.env.webkit&&b()});c.on("contentDomUnload",function(){c.unlockSelection()});if(CKEDITOR.env.ie9Compat)c.on("beforeDestroy",
b,null,null,9);c.on("dataReady",function(){delete c._.fakeSelection;delete c._.hiddenSelectionContainer;c.selectionChange(1)});c.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=c.editable().getLast(a);b&&b.hasAttribute("data-cke-hidden-sel")&&(b.remove(),CKEDITOR.env.gecko&&(a=c.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);c.on("key",function(a){if("wysiwyg"==c.mode){var b=c.getSelection();if(b.isFake){var d=
D[a.data.keyCode];if(d)return d({editor:c,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var b=a.editor;b.on("selectionChange",function(){var a=b.editable(),c=a.getCustomData("cke-fillingChar");c&&(c.getCustomData("ready")?(n(a),a.editor.fire("selectionCheck")):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){n(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=r(a.data))},
b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=r(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?l:g).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&"wysiwyg"==this.mode&&"recreating"!==this.status?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.getSelectedRanges=function(a){var b=this.getSelection();
return b&&b.getRanges(a)||[]};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE?(!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;return b?(b.unlock(a),delete this._.savedSelection,!0):!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};
CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection){var b=a;a=a.root}var c=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:z++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=
c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b)return CKEDITOR.tools.extend(this._.cache,b._.cache),this.isFake=b.isFake,this.isLocked=b.isLocked,this;a=this.getNative();var d,f;if(a)if(a.getRangeAt)d=(f=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(f.commonAncestorContainer);else{try{f=a.createRange()}catch(k){}d=f&&CKEDITOR.dom.element.get(f.item&&f.item(0)||f.parentElement())}if(!d||d.type!=CKEDITOR.NODE_ELEMENT&&d.type!=CKEDITOR.NODE_TEXT||!this.root.equals(d)&&!this.root.contains(d))this._.cache.type=
CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList;return this};var C={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:r,_createFillingCharSequenceNode:f,FILLING_CHAR_SEQUENCE:p});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==
this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=t?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:t?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),d=c.type;"Text"==d&&(b=CKEDITOR.SELECTION_TEXT);"Control"==d&&(b=CKEDITOR.SELECTION_ELEMENT);c.createRange().parentElement()&&(b=CKEDITOR.SELECTION_TEXT)}catch(f){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=
CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(1==c.rangeCount){var c=c.getRangeAt(0),d=c.startContainer;d==c.endContainer&&1==d.nodeType&&1==c.endOffset-c.startOffset&&C[d.childNodes[c.startOffset].nodeName.toLowerCase()]&&(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=t?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,
offset:0};for(var f=d.children,k,g,e=b.duplicate(),h=0,l=f.length-1,m=-1,n,r;h<=l;)if(m=Math.floor((h+l)/2),k=f[m],e.moveToElementText(k),n=e.compareEndPoints("StartToStart",b),0<n)l=m-1;else if(0>n)h=m+1;else return{container:d,offset:a(k)};if(-1==m||m==f.length-1&&0>n){e.moveToElementText(d);e.setEndPoint("StartToStart",b);e=e.text.replace(/(\r\n|\r)/g,"\n").length;f=d.childNodes;if(!e)return k=f[f.length-1],k.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:f.length}:{container:k,offset:k.nodeValue.length};
for(d=f.length;0<e&&0<d;)g=f[--d],g.nodeType==CKEDITOR.NODE_TEXT&&(r=g,e-=g.nodeValue.length);return{container:r,offset:-e}}e.collapse(0<n?!0:!1);e.setEndPoint(0<n?"StartToStart":"EndToStart",b);e=e.text.replace(/(\r\n|\r)/g,"\n").length;if(!e)return{container:d,offset:a(k)+(0<n?0:1)};for(;0<e;)try{g=k[0<n?"previousSibling":"nextSibling"],g.nodeType==CKEDITOR.NODE_TEXT&&(e-=g.nodeValue.length,r=g),k=g}catch(p){return{container:d,offset:a(k)}}return{container:r,offset:0<n?-e:r.nodeValue.length+e}};
return function(){var a=this.getNative(),c=a&&a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),d=b(c,!0),a.setStart(new CKEDITOR.dom.node(d.container),d.offset),d=b(c),a.setEnd(new CKEDITOR.dom.node(d.container),d.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse(),[a];if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],f=0;f<c.length;f++){for(var k=
c.item(f),g=k.parentNode,e=0,a=new CKEDITOR.dom.range(this.root);e<g.childNodes.length&&g.childNodes[e]!=k;e++);a.setStart(new CKEDITOR.dom.node(g),e);a.setEnd(new CKEDITOR.dom.node(g),e+1);d.push(a)}return d}return[]}}():function(){var a=[],b,c=this.getNative();if(!c)return a;for(var d=0;d<c.rangeCount;d++){var f=c.getRangeAt(d);b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(f.startContainer),f.startOffset);b.setEnd(new CKEDITOR.dom.node(f.endContainer),f.endOffset);a.push(b)}return a};
return function(b){var c=this._.cache,d=c.ranges;d||(c.ranges=d=new CKEDITOR.dom.rangeList(a.call(this)));return b?q(new CKEDITOR.dom.rangeList(d.slice())):d}}(),getStartElement:function(){var a=this._.cache;if(void 0!==a.startElement)return a.startElement;var b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];if(c){if(c.collapsed)b=c.startContainer,b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());else{for(c.optimize();b=
c.startContainer,c.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary();)c.setStartAfter(b);b=c.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();if((b=b.getChild(c.startOffset))&&b.type==CKEDITOR.NODE_ELEMENT)for(c=b.getFirst();c&&c.type==CKEDITOR.NODE_ELEMENT;)b=c,c=c.getFirst();else b=c.startContainer}b=b.$}}return a.startElement=b?new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(void 0!==a.selectedElement)return a.selectedElement;
var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0].clone(),c,d,f=2;f&&!((c=a.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&C[c.getName()]&&(d=c));f--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d&&d.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=this._.cache;if(void 0!==a.selectedText)return a.selectedText;var b=this.getNative(),b=t?"Control"==b.type?"":b.createRange().text:
b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),c=this.getRanges(),f=this.isFake;this.isLocked=0;this.reset();a&&(a=b||c[0]&&c[0].getCommonAncestor())&&a.getAscendant("body",1)&&((a=this.root.editor)&&a.plugins.tableselection&&a.plugins.tableselection.isSupportedEnvironment(a)&&h(c)?d.call(this,
c):f?this.fake(b):b&&2>c.length?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection)if(this.rev==a._.fakeSelection.rev){delete a._.fakeSelection;var b=a._.hiddenSelectionContainer;if(b){var c=a.checkDirty();a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot");!c&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=z++},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);
b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){var b=this.root.editor,c=b&&b._.hiddenSelectionContainer;this.reset();if(c)for(var c=this.root,g,e=0;e<a.length;++e)g=a[e],g.endContainer.equals(c)&&(g.endOffset=Math.min(g.endOffset,c.getChildCount()));if(a.length)if(this.isLocked){var l=CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();l&&!l.equals(this.root)&&l.focus()}else{var m;a:{var r,p;if(1==a.length&&!(p=a[0]).collapsed&&(m=p.getEnclosedNode())&&
m.type==CKEDITOR.NODE_ELEMENT&&(p=p.clone(),p.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(r=p.getEnclosedNode())&&r.type==CKEDITOR.NODE_ELEMENT&&(m=r),"false"==m.getAttribute("contenteditable")))break a;m=void 0}if(m)this.fake(m);else if(b&&b.plugins.tableselection&&b.plugins.tableselection.isSupportedEnvironment(b)&&h(a)&&!y&&!a[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored"))d.call(this,a);else{if(t){r=CKEDITOR.dom.walker.whitespaces(!0);m=/\ufeff|\u00a0/;p={table:1,tbody:1,
tr:1};1<a.length&&(b=a[a.length-1],a[0].setEnd(b.endContainer,b.endOffset));b=a[0];a=b.collapsed;var w,v,q;if((c=b.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&c.getName()in C&&(!c.is("a")||!c.getText()))try{q=c.$.createControlRange();q.addElement(c.$);q.select();return}catch(u){}if(b.startContainer.type==CKEDITOR.NODE_ELEMENT&&b.startContainer.getName()in p||b.endContainer.type==CKEDITOR.NODE_ELEMENT&&b.endContainer.getName()in p)b.shrink(CKEDITOR.NODE_ELEMENT,!0),a=b.collapsed;q=b.createBookmark();
p=q.startNode;a||(l=q.endNode);q=b.document.$.body.createTextRange();q.moveToElementText(p.$);q.moveStart("character",1);l?(m=b.document.$.body.createTextRange(),m.moveToElementText(l.$),q.setEndPoint("EndToEnd",m),q.moveEnd("character",-1)):(w=p.getNext(r),v=p.hasAscendant("pre"),w=!(w&&w.getText&&w.getText().match(m))&&(v||!p.hasPrevious()||p.getPrevious().is&&p.getPrevious().is("br")),v=b.document.createElement("span"),v.setHtml("\x26#65279;"),v.insertBefore(p),w&&b.document.createText("﻿").insertBefore(p));
b.setStartBefore(p);p.remove();a?(w?(q.moveStart("character",-1),q.select(),b.document.$.selection.clear()):q.select(),b.moveToPosition(v,CKEDITOR.POSITION_BEFORE_START),v.remove()):(b.setEndBefore(l),l.remove(),q.select())}else{l=this.getNative();if(!l)return;this.removeAllRanges();for(q=0;q<a.length;q++){if(q<a.length-1&&(w=a[q],v=a[q+1],m=w.clone(),m.setStart(w.endContainer,w.endOffset),m.setEnd(v.startContainer,v.startOffset),!m.collapsed&&(m.shrink(CKEDITOR.NODE_ELEMENT,!0),b=m.getCommonAncestor(),
m=m.getEnclosedNode(),b.isReadOnly()||m&&m.isReadOnly()))){v.setStart(w.startContainer,w.startOffset);a.splice(q--,1);continue}b=a[q];v=this.document.$.createRange();b.collapsed&&CKEDITOR.env.webkit&&k(b)&&(m=f(this.root),b.insertNode(m),(w=m.getNext())&&!m.getPrevious()&&w.type==CKEDITOR.NODE_ELEMENT&&"br"==w.getName()?(n(this.root),b.moveToPosition(w,CKEDITOR.POSITION_BEFORE_START)):b.moveToPosition(m,CKEDITOR.POSITION_AFTER_END));v.setStart(b.startContainer.$,b.startOffset);try{v.setEnd(b.endContainer.$,
b.endOffset)}catch(z){if(0<=z.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))b.collapse(1),v.setEnd(b.endContainer.$,b.endOffset);else throw z;}l.addRange(v)}}this.reset();this.root.fire("selectionchange")}}},fake:function(a,b){var c=this.root.editor;void 0===b&&a.hasAttribute("aria-label")&&(b=a.getAttribute("aria-label"));this.reset();v(c,b);var d=this._.cache,f=new CKEDITOR.dom.range(this.root);f.setStartBefore(a);f.setEndAfter(a);d.ranges=new CKEDITOR.dom.rangeList(f);d.selectedElement=d.startElement=
a;d.type=CKEDITOR.SELECTION_ELEMENT;d.selectedText=d.nativeSel=null;this.isFake=1;this.rev=z++;c._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a=this.getCommonAncestor();a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))},isInTable:function(a){return h(this.getRanges(),a)},isCollapsed:function(){var a=this.getRanges();return 1===a.length&&a[0].collapsed},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&
(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b=[],c,d=0;d<a.length;d++){var f=new CKEDITOR.dom.range(this.root);f.moveToBookmark(a[d]);b.push(f)}a.isFake&&(c=h(b)?b[0]._getTableElement():b[0].getEnclosedNode(),c&&c.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake&&!h(b)?this.fake(c):this.selectRanges(b);return this},getCommonAncestor:function(){var a=
this.getRanges();return a.length?a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer):null},scrollIntoView:function(){this.getType()!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var a=this.getNative();try{a&&a[t?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}}}(),"use strict",CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function a(a,b){for(var c,d;(a=a.getParent())&&
!a.equals(b);)if(a.getAttribute("data-nostyle"))c=a;else if(!d){var f=a.getAttribute("contentEditable");"false"==f?c=a:"true"==f&&(d=1)}return c}function h(a,b,c,d){return(a.getPosition(b)|d)==d&&(!c.childRule||c.childRule(a))}function e(b){var c=b.document;if(b.collapsed)c=z(this,c),b.insertNode(c),b.moveToPosition(c,CKEDITOR.POSITION_BEFORE_END);else{var f=this.element,k=this._.definition,g,l=k.ignoreReadonly,m=l||k.includeReadonly;null==m&&(m=b.root.getCustomData("cke_includeReadonly"));var n=
CKEDITOR.dtd[f];n||(g=!0,n=CKEDITOR.dtd.span);b.enlarge(CKEDITOR.ENLARGE_INLINE,1);b.trim();var r=b.createBookmark(),p=r.startNode,w=r.endNode,v=p,t;if(!l){var q=b.getCommonAncestor(),l=a(p,q),q=a(w,q);l&&(v=l.getNextSourceNode(!0));q&&(w=q)}for(v.getPosition(w)==CKEDITOR.POSITION_FOLLOWING&&(v=0);v;){l=!1;if(v.equals(w))v=null,l=!0;else{var y=v.type==CKEDITOR.NODE_ELEMENT?v.getName():null,q=y&&"false"==v.getAttribute("contentEditable"),x=y&&-1!==CKEDITOR.tools.array.indexOf(CKEDITOR.style.unstylableElements,
y),x=y&&(v.getAttribute("data-nostyle")||x);if(y&&v.data("cke-bookmark")||v.type===CKEDITOR.NODE_COMMENT){v=v.getNextSourceNode(!0);continue}if(q&&m&&CKEDITOR.dtd.$block[y])for(var A=v,B=d(A),C=void 0,D=B.length,K=0,A=D&&new CKEDITOR.dom.range(A.getDocument());K<D;++K){var C=B[K],ea=CKEDITOR.filter.instances[C.data("cke-filter")];if(ea?ea.check(this):1)A.selectNodeContents(C),e.call(this,A)}B=y?!n[y]||x?0:q&&!m?0:h(v,w,k,N):1;if(B)if(C=v.getParent(),B=k,D=f,K=g,!C||!(C.getDtd()||CKEDITOR.dtd.span)[D]&&
!K||B.parentRule&&!B.parentRule(C))l=!0;else{if(t||y&&CKEDITOR.dtd.$removeEmpty[y]&&(v.getPosition(w)|N)!=N||(t=b.clone(),t.setStartBefore(v)),y=v.type,y==CKEDITOR.NODE_TEXT||q||y==CKEDITOR.NODE_ELEMENT&&!v.getChildCount()){for(var y=v,R;(l=!y.getNext(L))&&(R=y.getParent(),n[R.getName()])&&h(R,p,k,J);)y=R;t.setEndAfter(y)}}else l=!0;v=v.getNextSourceNode(x||q)}if(l&&t&&!t.collapsed){for(var l=z(this,c),q=l.hasAttributes(),x=t.getCommonAncestor(),y={},B={},C={},D={},ba,W,F;l&&x;){if(x.getName()==f){for(ba in k.attributes)!D[ba]&&
(F=x.getAttribute(W))&&(l.getAttribute(ba)==F?B[ba]=1:D[ba]=1);for(W in k.styles)!C[W]&&(F=x.getStyle(W))&&(l.getStyle(W)==F?y[W]=1:C[W]=1)}x=x.getParent()}for(ba in B)l.removeAttribute(ba);for(W in y)l.removeStyle(W);q&&!l.hasAttributes()&&(l=null);l?(t.extractContents().appendTo(l),t.insertNode(l),u.call(this,l),l.mergeSiblings(),CKEDITOR.env.ie||l.$.normalize()):(l=new CKEDITOR.dom.element("span"),t.extractContents().appendTo(l),t.insertNode(l),u.call(this,l),l.remove(!0));t=null}}b.moveToBookmark(r);
b.shrink(CKEDITOR.SHRINK_TEXT);b.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function b(a){function b(){for(var a=new CKEDITOR.dom.elementPath(d.getParent()),c=new CKEDITOR.dom.elementPath(m.getParent()),f=null,k=null,g=0;g<a.elements.length;g++){var e=a.elements[g];if(e==a.block||e==a.blockLimit)break;n.checkElementRemovable(e,!0)&&(f=e)}for(g=0;g<c.elements.length;g++){e=c.elements[g];if(e==c.block||e==c.blockLimit)break;n.checkElementRemovable(e,!0)&&(k=e)}k&&m.breakParent(k);f&&d.breakParent(f)}a.enlarge(CKEDITOR.ENLARGE_INLINE,
1);var c=a.createBookmark(),d=c.startNode,f=this._.definition.alwaysRemoveElement;if(a.collapsed){for(var k=new CKEDITOR.dom.elementPath(d.getParent(),a.root),g,e=0,h;e<k.elements.length&&(h=k.elements[e])&&h!=k.block&&h!=k.blockLimit;e++)if(this.checkElementRemovable(h)){var l;!f&&a.collapsed&&(a.checkBoundaryOfElement(h,CKEDITOR.END)||(l=a.checkBoundaryOfElement(h,CKEDITOR.START)))?(g=h,g.match=l?"start":"end"):(h.mergeSiblings(),h.is(this.element)?v.call(this,h):q(h,y(this)[h.getName()]))}if(g){f=
d;for(e=0;;e++){h=k.elements[e];if(h.equals(g))break;else if(h.match)continue;else h=h.clone();h.append(f);f=h}f["start"==g.match?"insertBefore":"insertAfter"](g)}}else{var m=c.endNode,n=this;b();for(k=d;!k.equals(m);)g=k.getNextSourceNode(),k.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(k)&&(k.getName()==this.element?v.call(this,k):q(k,y(this)[k.getName()]),g.type==CKEDITOR.NODE_ELEMENT&&g.contains(d)&&(b(),g=d.getNext())),k=g}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function d(a){var b=
[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function l(a){var b=a.getEnclosedNode()||a.getCommonAncestor(!1,!0);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&p(a,this)}function g(a){var b=a.getCommonAncestor(!0,!0);if(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1)){var b=this._.definition,c=b.attributes;if(c)for(var d in c)a.removeAttribute(d,c[d]);if(b.styles)for(var f in b.styles)b.styles.hasOwnProperty(f)&&
a.removeStyle(f)}}function m(a){var b=a.createBookmark(!0),c=a.createIterator();c.enforceRealBlocks=!0;this._.enterMode&&(c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var d,f=a.document,g;d=c.getNextParagraph();)!d.isReadOnly()&&(c.activeFilter?c.activeFilter.check(this):1)&&(g=z(this,f,d),k(d,g));a.moveToBookmark(b)}function c(a){var b=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=!0;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,f;d=c.getNextParagraph();)this.checkElementRemovable(d)&&
(d.is("pre")?((f=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&d.copyAttributes(f),k(d,f)):v.call(this,d));a.moveToBookmark(b)}function k(a,b){var c=!b;c&&(b=a.getDocument().createElement("div"),a.copyAttributes(b));var d=b&&b.is("pre"),k=a.is("pre"),g=!d&&k;if(d&&!k){k=b;(g=a.getBogus())&&g.remove();g=a.getHtml();g=n(g,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");g=g.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");g=g.replace(/([ \t\n\r]+|&nbsp;)/g,
" ");g=g.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var e=a.getDocument().createElement("div");e.append(k);k.$.outerHTML="\x3cpre\x3e"+g+"\x3c/pre\x3e";k.copyAttributes(e.getFirst());k=e.getFirst().remove()}else k.setHtml(g);b=k}else g?b=r(c?[a.getHtml()]:f(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,h;(h=c.getPrevious(G))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("pre")&&(d=n(h.getHtml(),/\n$/,"")+"\n\n"+n(c.getHtml(),/^\n/,""),CKEDITOR.env.ie?c.$.outerHTML="\x3cpre\x3e"+d+"\x3c/pre\x3e":
c.setHtml(d),h.remove())}else c&&t(b)}function f(a){var b=[];n(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"\x3c/pre\x3e"+c+"\x3cpre\x3e"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function n(a,b,c){var d="",f="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(f=c);return""});return d+a.replace(b,c)+f}function r(a,b){var c;
1<a.length&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var d=0;d<a.length;d++){var f=a[d],f=f.replace(/(\r\n|\r)/g,"\n"),f=n(f,/^[ \t]*\n/,""),f=n(f,/\n$/,""),f=n(f,/^[ \t]+|[ \t]+$/g,function(a,b){return 1==a.length?"\x26nbsp;":b?" "+CKEDITOR.tools.repeat("\x26nbsp;",a.length-1):CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "}),f=f.replace(/\n/g,"\x3cbr\x3e"),f=f.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "});if(c){var k=b.clone();k.setHtml(f);
c.append(k)}else b.setHtml(f)}return c||b}function v(a,b){var c=this._.definition,d=c.attributes,c=c.styles,f=y(this)[a.getName()],k=CKEDITOR.tools.isEmpty(d)&&CKEDITOR.tools.isEmpty(c),g;for(g in d)if("class"!=g&&!this._.definition.fullMatch||a.getAttribute(g)==x(g,d[g]))b&&"data-"==g.slice(0,5)||(k=a.hasAttribute(g),a.removeAttribute(g));for(var e in c)this._.definition.fullMatch&&a.getStyle(e)!=x(e,c[e],!0)||(k=k||!!a.getStyle(e),a.removeStyle(e));q(a,f,D[a.getName()]);k&&(this._.definition.alwaysRemoveElement?
t(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?t(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function u(a){for(var b=y(this),c=a.getElementsByTag(this.element),d,f=c.count();0<=--f;)d=c.getItem(f),d.isReadOnly()||v.call(this,d,!0);for(var k in b)if(k!=this.element)for(c=a.getElementsByTag(k),f=c.count()-1;0<=f;f--)d=c.getItem(f),d.isReadOnly()||q(d,b[k])}function q(a,b,c){if(b=b&&b.attributes)for(var d=0;d<b.length;d++){var f=b[d][0],
k;if(k=a.getAttribute(f)){var g=b[d][1];(null===g||g.test&&g.test(k)||"string"==typeof g&&k==g)&&a.removeAttribute(f)}}c||t(a)}function t(a,b){if(!a.hasAttributes()||b)if(CKEDITOR.dtd.$block[a.getName()]){var c=a.getPrevious(G),d=a.getNext(G);!c||c.type!=CKEDITOR.NODE_TEXT&&c.isBlockBoundary({br:1})||a.append("br",1);!d||d.type!=CKEDITOR.NODE_TEXT&&d.isBlockBoundary({br:1})||a.append("br");a.remove(!0)}else c=a.getFirst(),d=a.getLast(),a.remove(!0),c&&(c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings(),
d&&!c.equals(d)&&d.type==CKEDITOR.NODE_ELEMENT&&d.mergeSiblings())}function z(a,b,c){var d;d=a.element;"*"==d&&(d="span");d=new CKEDITOR.dom.element(d,b);c&&c.copyAttributes(d);d=p(d,a);b.getCustomData("doc_processing_style")&&d.hasAttribute("id")?d.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return d}function p(a,b){var c=b._.definition,d=c.attributes,c=CKEDITOR.style.getStyleText(c);if(d)for(var f in d)a.setAttribute(f,d[f]);c&&a.setAttribute("style",c);a.getDocument().removeCustomData("doc_processing_style");
return a}function A(a,b){for(var c in a)a[c]=a[c].replace(F,function(a,c){return b[c]})}function y(a){if(a._.overrides)return a._.overrides;var b=a._.overrides={},c=a._.definition.overrides;if(c){CKEDITOR.tools.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++){var f=c[d],k,g;"string"==typeof f?k=f.toLowerCase():(k=f.element?f.element.toLowerCase():a.element,g=f.attributes);f=b[k]||(b[k]={});if(g){var f=f.attributes=f.attributes||[],e;for(e in g)f.push([e.toLowerCase(),g[e]])}}}return b}function x(a,
b,c){var d=new CKEDITOR.dom.element("span");d[c?"setStyle":"setAttribute"](a,b);return d[c?"getStyle":"getAttribute"](a)}function w(a,b){function c(a,b){return"font-family"==b.toLowerCase()?a.replace(/["']/g,""):a}"string"==typeof a&&(a=CKEDITOR.tools.parseCssText(a));"string"==typeof b&&(b=CKEDITOR.tools.parseCssText(b,!0));for(var d in a)if(!(d in b)||c(b[d],d)!=c(a[d],d)&&"inherit"!=a[d]&&"inherit"!=b[d])return!1;return!0}function B(a,b,c){var d=a.getRanges();b=b?this.removeFromRange:this.applyToRange;
for(var f,k=d.createIterator();f=k.getNextRange();)b.call(this,f,c);a.selectRanges(d)}var D={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},C={a:1,blockquote:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},H=/\s*(?:;\s*|$)/,F=/#\((.+?)\)/g,L=CKEDITOR.dom.walker.bookmark(0,
1),G=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,b){if("string"==typeof a.type)return new CKEDITOR.style.customHandlers[a.type](a);var c=a.attributes;c&&c.style&&(a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(c.style)),delete c.style);b&&(a=CKEDITOR.tools.clone(a),A(a.attributes,b),A(a.styles,b));c=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(D[c]?CKEDITOR.STYLE_BLOCK:C[c]?CKEDITOR.STYLE_OBJECT:
CKEDITOR.STYLE_INLINE);"object"==typeof this.element&&(this.type=CKEDITOR.STYLE_OBJECT);this._={definition:a}};CKEDITOR.style.prototype={apply:function(a){if(a instanceof CKEDITOR.dom.document)return B.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);B.call(this,a.getSelection(),0,a);this._.enterMode=b}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return B.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),
a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);B.call(this,a.getSelection(),1,a);this._.enterMode=b}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?e:this.type==CKEDITOR.STYLE_BLOCK?m:this.type==CKEDITOR.STYLE_OBJECT?l:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?b:this.type==CKEDITOR.STYLE_BLOCK?c:this.type==CKEDITOR.STYLE_OBJECT?g:null;return this.removeFromRange(a)},applyToObject:function(a){p(a,
this)},checkActive:function(a,b){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,!0,b);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var c=a.elements,d=0,f;d<c.length;d++)if(f=c[d],this.type!=CKEDITOR.STYLE_INLINE||f!=a.block&&f!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var k=f.getName();if(!("string"==typeof this.element?k==this.element:k in this.element))continue}if(this.checkElementRemovable(f,!0,b))return!0}}return!1},checkApplicable:function(a,
b,c){b&&b instanceof CKEDITOR.filter&&(c=b);if(c&&!c.check(this))return!1;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!a.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!a.blockLimit.getDtd()[this.element]}return!0},checkElementMatch:function(a,b){var c=this._.definition;if(!a||!c.ignoreReadonly&&a.isReadOnly())return!1;var d=a.getName();if("string"==typeof this.element?d==this.element:d in this.element){if(!b&&!a.hasAttributes())return!0;if(d=c._AC)c=d;else{var d={},f=0,k=c.attributes;
if(k)for(var g in k)f++,d[g]=k[g];if(g=CKEDITOR.style.getStyleText(c))d.style||f++,d.style=g;d._length=f;c=c._AC=d}if(c._length){for(var e in c)if("_length"!=e)if(d=a.getAttribute(e)||"","style"==e?w(c[e],d):c[e]==d){if(!b)return!0}else if(b)return!1;if(b)return!0}else return!0}return!1},checkElementRemovable:function(a,b,c){if(this.checkElementMatch(a,b,c))return!0;if(b=y(this)[a.getName()]){var d;if(!(b=b.attributes))return!0;for(c=0;c<b.length;c++)if(d=b[c][0],d=a.getAttribute(d)){var f=b[c][1];
if(null===f)return!0;if("string"==typeof f){if(d==f)return!0}else if(f.test(d))return!0}}return!1},buildPreview:function(a){var b=this._.definition,c=[],d=b.element;"bdo"==d&&(d="span");var c=["\x3c",d],f=b.attributes;if(f)for(var k in f)c.push(" ",k,'\x3d"',f[k],'"');(f=CKEDITOR.style.getStyleText(b))&&c.push(' style\x3d"',f,'"');c.push("\x3e",a||b.name,"\x3c/",d,"\x3e");return c.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;
var b=a.styles,c=a.attributes&&a.attributes.style||"",d="";c.length&&(c=c.replace(H,";"));for(var f in b){var k=b[f],g=(f+":"+k).replace(H,";");"inherit"==k?d+=g:c+=g}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,!0));return a._ST=c+d};CKEDITOR.style.customHandlers={};CKEDITOR.style.unstylableElements=[];CKEDITOR.style.addCustomHandler=function(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),
{assignedTo:CKEDITOR.STYLE_OBJECT},a,!0);return this.customHandlers[a.type]=b};var N=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,J=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(a,h){this.requiredContent=this.allowedContent=this.style=a;CKEDITOR.tools.extend(this,h,!0)},CKEDITOR.styleCommand.prototype.exec=function(a){a.focus();this.state==CKEDITOR.TRISTATE_OFF?a.applyStyle(this.style):
this.state==CKEDITOR.TRISTATE_ON&&a.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(a,h,e){CKEDITOR.stylesSet.addExternal(a,h,"");CKEDITOR.stylesSet.load(a,e)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(a,h){var e=this._.styleStateChangeCallbacks;e||(e=this._.styleStateChangeCallbacks=[],this.on("selectionChange",
function(a){for(var d=0;d<e.length;d++){var h=e[d],g=h.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;h.fn.call(this,g)}}));e.push({style:a,fn:h})},applyStyle:function(a){a.apply(this)},removeStyle:function(a){a.remove(this)},getStylesSet:function(a){if(this._.stylesDefinitions)a(this._.stylesDefinitions);else{var h=this,e=h.config.stylesCombo_stylesSet||h.config.stylesSet;if(!1===e)a(null);else if(e instanceof Array)h._.stylesDefinitions=e,a(e);else{e||(e="default");
var e=e.split(":"),b=e[0];CKEDITOR.stylesSet.addExternal(b,e[1]?e.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(b,function(d){h._.stylesDefinitions=d[b];a(h._.stylesDefinitions)})}}}}),function(){if(window.Promise)CKEDITOR.tools.promise=Promise;else{var a=CKEDITOR.getUrl("vendor/promise.js");if("function"===typeof window.define&&window.define.amd&&"function"===typeof window.require)return window.require([a],function(a){CKEDITOR.tools.promise=a});CKEDITOR.scriptLoader.load(a,
function(h){if(!h)return CKEDITOR.error("no-vendor-lib",{path:a});if("undefined"!==typeof window.ES6Promise)return CKEDITOR.tools.promise=ES6Promise})}}(),function(){function a(a,d,l){a.once("selectionCheck",function(a){if(!h){var b=a.data.getRanges()[0];l.equals(b)?a.cancel():d.equals(b)&&(e=!0)}},null,null,-1)}var h=!0,e=!1;CKEDITOR.dom.selection.setupEditorOptimization=function(a){a.on("selectionCheck",function(a){a.data&&!e&&a.data.optimizeInElementEnds();e=!1});a.on("contentDom",function(){var d=
a.editable();d&&(d.attachListener(d,"keydown",function(a){this._.shiftPressed=a.data.$.shiftKey},this),d.attachListener(d,"keyup",function(a){this._.shiftPressed=a.data.$.shiftKey},this))})};CKEDITOR.dom.selection.prototype.optimizeInElementEnds=function(){var b=this.getRanges()[0],d=this.root.editor,e;if(this.root.editor._.shiftPressed||this.isFake||b.isCollapsed||b.startContainer.equals(b.endContainer)||(b.endContainer.is?b.endContainer.is("li"):b.endContainer.getParent().is&&b.endContainer.getParent().is("li")))e=
!1;else if(0===b.endOffset)e=!0;else{e=b.startContainer.type===CKEDITOR.NODE_TEXT;var g=b.endContainer.type===CKEDITOR.NODE_TEXT,m=e?b.startContainer.getLength():b.startContainer.getChildCount();e=b.startOffset===m||e^g}e&&(e=b.clone(),b.shrink(CKEDITOR.SHRINK_TEXT,!1,{skipBogus:!CKEDITOR.env.webkit}),h=!1,a(d,b,e),b.select(),h=!0)}}(),function(){function a(a,b){if(e(a))a=Math.round(b*(parseFloat(a)/100));else if("string"===typeof a&&a.match(/^\d+$/gm)||"string"===typeof a&&a.match(/^\d+(?:deg)?$/gm))a=
parseInt(a,10);return a}function h(a,b){e(a)?a=b*(parseFloat(a)/100):"string"===typeof a&&a.match(/^\d?\.\d+/gm)&&(a=parseFloat(a));return a}function e(a){return"string"===typeof a&&a.match(/^((\d*\.\d+)|(\d+))%{1}$/gm)}function b(a,b,d){return!isNaN(a)&&a>=b&&a<=d}function d(a){a=a.toString(16);return 1==a.length?"0"+a:a}CKEDITOR.tools.color=CKEDITOR.tools.createClass({$:function(a,b){this._.initialColorCode=a;this._.defaultValue=b;this._.parseInput(a)},proto:{getHex:function(){if(!this._.isValidColor)return this._.defaultValue;
var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatHexString(a[0],a[1],a[2])},getHexWithAlpha:function(){if(!this._.isValidColor)return this._.defaultValue;var a=Math.round(this._.alpha*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE);return this._.formatHexString(this._.red,this._.green,this._.blue,a)},getRgb:function(){if(!this._.isValidColor)return this._.defaultValue;var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatRgbString("rgb",
a[0],a[1],a[2])},getRgba:function(){return this._.isValidColor?this._.formatRgbString("rgba",this._.red,this._.green,this._.blue,this._.alpha):this._.defaultValue},getHsl:function(){var a=0===this._.alpha||1===this._.alpha;if(!this._.isValidColor)return this._.defaultValue;this._.type===CKEDITOR.tools.color.TYPE_HSL&&a?a=[this._.hue,this._.saturation,this._.lightness]:(a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha),a=this._.rgbToHsl(a[0],a[1],a[2]));return this._.formatHslString("hsl",
a[0],a[1],a[2])},getHsla:function(){var a;if(!this._.isValidColor)return this._.defaultValue;a=this._.type===CKEDITOR.tools.color.TYPE_HSL?[this._.hue,this._.saturation,this._.lightness]:this._.rgbToHsl(this._.red,this._.green,this._.blue);return this._.formatHslString("hsla",a[0],a[1],a[2],this._.alpha)},getInitialValue:function(){return this._.initialColorCode}},_:{initialColorCode:"",isValidColor:!0,type:0,hue:0,saturation:0,lightness:0,red:0,green:0,blue:0,alpha:1,blendAlphaColor:function(a,b,
d,c){return CKEDITOR.tools.array.map([a,b,d],function(a){return Math.round(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-c*(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-a))})},formatHexString:function(a,b,e,c){a="#"+d(a)+d(b)+d(e);void 0!==c&&(a+=d(c));return a.toUpperCase()},formatRgbString:function(a,b,d,c,k){b=[b,d,c];void 0!==k&&b.push(k);return a+"("+b.join(",")+")"},formatHslString:function(a,b,d,c,k){return a+"("+b+","+d+"%,"+c+"%"+(void 0!==k?","+k:"")+")"},parseInput:function(a){if("string"!==
typeof a)this._.isValidColor=!1;else{a=CKEDITOR.tools.trim(a);var b=this._.matchStringToNamedColor(a);b&&(a=b);var b=this._.extractColorChannelsFromHex(a),d=this._.extractColorChannelsFromRgba(a);a=this._.extractColorChannelsFromHsla(a);(a=b||d||a)?(this._.type=a.type,this._.red=a.red,this._.green=a.green,this._.blue=a.blue,this._.alpha=a.alpha,a.type===CKEDITOR.tools.color.TYPE_HSL&&(this._.hue=a.hue,this._.saturation=a.saturation,this._.lightness=a.lightness)):this._.isValidColor=!1}},matchStringToNamedColor:function(a){return CKEDITOR.tools.color.namedColors[a.toLowerCase()]||
null},extractColorChannelsFromHex:function(a){-1===a.indexOf("#")&&(a="#"+a);a.match(CKEDITOR.tools.color.hex3CharsRegExp)&&(a=this._.hex3ToHex6(a));a.match(CKEDITOR.tools.color.hex4CharsRegExp)&&(a=this._.hex4ToHex8(a));if(!a.match(CKEDITOR.tools.color.hex6CharsRegExp)&&!a.match(CKEDITOR.tools.color.hex8CharsRegExp))return null;a=a.split("");var b=1;a[7]&&a[8]&&(b=parseInt(a[7]+a[8],16),b/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,b=Number(b.toFixed(1)));return{type:CKEDITOR.tools.color.TYPE_RGB,
red:parseInt(a[1]+a[2],16),green:parseInt(a[3]+a[4],16),blue:parseInt(a[5]+a[6],16),alpha:b}},extractColorChannelsFromRgba:function(b){var d=this._.extractColorChannelsByPattern(b,CKEDITOR.tools.color.rgbRegExp);if(!d||3>d.length||4<d.length)return null;var e=4===d.length;b=a(d[0],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE);var c=a(d[1],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),k=a(d[2],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),f=1;e&&(f=h(d[3],CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE));d=
{type:CKEDITOR.tools.color.TYPE_RGB,red:b,green:c,blue:k,alpha:f};return this._.areColorChannelsValid(b,c,k,f)?d:null},extractColorChannelsFromHsla:function(b){var d=this._.extractColorChannelsByPattern(b,CKEDITOR.tools.color.hslRegExp);if(!d||3>d.length||4<d.length)return null;var e=4===d.length,c=a(d[0],CKEDITOR.tools.color.MAX_HUE_CHANNEL_VALUE),k=h(d[1],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),f=h(d[2],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),n=1;b=this._.hslToRgb(c,
k,f);e&&(n=h(d[3],CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE));b.push(n);d={type:CKEDITOR.tools.color.TYPE_HSL,red:b[0],green:b[1],blue:b[2],alpha:b[3],hue:c,saturation:Math.round(100*k),lightness:Math.round(100*f)};return this._.areColorChannelsValid(b[0],b[1],b[2],b[3])?d:null},hex3ToHex6:function(a){a=a.split("");return"#"+a[1]+a[1]+a[2]+a[2]+a[3]+a[3]},hex4ToHex8:function(a){return this._.hex3ToHex6(a.substr(0,4))+CKEDITOR.tools.repeat(a[4],2)},extractColorChannelsByPattern:function(a,b){var d=
a.match(b);if(!d)return null;var c=-1===d[1].indexOf(",")?/\s/:",",c=d[1].split(c),c=CKEDITOR.tools.array.reduce(c,function(a,b){var c=CKEDITOR.tools.trim(b);return 0===c.length?a:a.concat([c])},[]);d[2]&&(d=CKEDITOR.tools.trim(d[2].replace(/[\/,]/,"")),c.push(d));return c},areColorChannelsValid:function(a,d,e,c){return b(a,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&b(d,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&b(e,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&b(c,0,CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE)},
hslToRgb:function(a,b,d){var c=function(c){var f=(c+a/30)%12;c=b*Math.min(d,1-d);f=Math.min(f-3,9-f,1);f=Math.max(-1,f);return Math.round((d-c*f)*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)};return[c(0),c(8),c(4)]},rgbToHsl:function(a,b,d){a/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE;b/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE;var c=d/CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,k=Math.max(a,b,c),f=Math.min(a,b,c);d=k-f;var e=0;switch(k){case a:e=(b-c)/d%6;break;case b:e=(c-a)/d+2;break;case c:e=
(a-b)/d+4}a=0===d?0:60*e;b=(k+f)/2;k=0;1!==b&&0!==b&&(k=d/(1-Math.abs(2*b-1)));a=Math.round(a);k=Math.round(100*k);b=Math.round(100*b);return[a,k,b]}},statics:{TYPE_RGB:1,TYPE_HSL:2,MAX_RGB_CHANNEL_VALUE:255,MAX_ALPHA_CHANNEL_VALUE:1,MAX_HUE_CHANNEL_VALUE:360,MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE:1,hex3CharsRegExp:/#([0-9a-f]{3}$)/gim,hex4CharsRegExp:/#([0-9a-f]{4}$)/gim,hex6CharsRegExp:/#([0-9a-f]{6}$)/gim,hex8CharsRegExp:/#([0-9a-f]{8}$)/gim,rgbRegExp:/rgba?\(([.,\d\s%]*)(\s*\/\s*[\d.%]+)?\s*\)/i,
hslRegExp:/hsla?\((\s*(?:[.\d]+(?:deg)?)(?:\s*,?\s*[.\d]+%){2})((?:(?:\s*\/\s*)|(?:\s*,\s*))[\d.]+%?)?\s*\)/i,namedColors:{aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",
cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",
firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",
lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",
mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",
red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",windowtext:"windowtext",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",
yellowgreen:"#9ACD32"}}});CKEDITOR.tools.style.parse._colors=CKEDITOR.tools.color.namedColors}(),CKEDITOR.dom.comment=function(a,h){"string"==typeof a&&(a=(h?h.$:document).createComment(a));CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"\x3c!--"+this.$.nodeValue+"--\x3e"}}),"use strict",function(){var a={},h={},e;for(e in CKEDITOR.dtd.$blockLimit)e in
CKEDITOR.dtd.$list||(a[e]=1);for(e in CKEDITOR.dtd.$block)e in CKEDITOR.dtd.$blockLimit||e in CKEDITOR.dtd.$empty||(h[e]=1);CKEDITOR.dom.elementPath=function(b,d){var e=null,g=null,m=[],c=b,k;d=d||b.getDocument().getBody();c||(c=d);do if(c.type==CKEDITOR.NODE_ELEMENT){m.push(c);if(!this.lastElement&&(this.lastElement=c,c.is(CKEDITOR.dtd.$object)||"false"==c.getAttribute("contenteditable")))continue;if(c.equals(d))break;if(!g&&(k=c.getName(),"true"==c.getAttribute("contenteditable")?g=c:!e&&h[k]&&
(e=c),a[k])){if(k=!e&&"div"==k){a:{k=c.getChildren();for(var f=0,n=k.count();f<n;f++){var r=k.getItem(f);if(r.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[r.getName()]){k=!0;break a}}k=!1}k=!k}k?e=c:g=c}}while(c=c.getParent());g||(g=d);this.block=e;this.blockLimit=g;this.root=d;this.elements=m}}(),CKEDITOR.dom.elementPath.prototype={compare:function(a){var h=this.elements;a=a&&a.elements;if(!a||h.length!=a.length)return!1;for(var e=0;e<h.length;e++)if(!h[e].equals(a[e]))return!1;return!0},contains:function(a,
h,e){var b=0,d;"string"==typeof a&&(d=function(b){return b.getName()==a});a instanceof CKEDITOR.dom.element?d=function(b){return b.equals(a)}:CKEDITOR.tools.isArray(a)?d=function(b){return-1<CKEDITOR.tools.indexOf(a,b.getName())}:"function"==typeof a?d=a:"object"==typeof a&&(d=function(b){return b.getName()in a});var l=this.elements,g=l.length;h&&(e?b+=1:--g);e&&(l=Array.prototype.slice.call(l,0),l.reverse());for(;b<g;b++)if(d(l[b]))return l[b];return null},isContextFor:function(a){var h;return a in
CKEDITOR.dtd.$block?(h=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!h.getDtd()[a]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(a,h){"string"==typeof a&&(a=(h?h.$:document).createTextNode(a));this.$=a},CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},
getText:function(){return this.$.nodeValue},setText:function(a){this.$.nodeValue=a},isEmpty:function(a){var h=this.getText();a&&(h=CKEDITOR.tools.trim(h));return!h||h===CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE},split:function(a){var h=this.$.parentNode,e=h.childNodes.length,b=this.getLength(),d=this.getDocument(),l=new CKEDITOR.dom.text(this.$.splitText(a),d);h.childNodes.length==e&&(a>=b?(l=d.createText(""),l.insertAfter(this)):(a=d.createText(""),a.insertAfter(l),a.remove()));return l},substring:function(a,
h){return"number"!=typeof h?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,h)}}),function(){function a(a,b,d){var h=a.serializable,g=b[d?"endContainer":"startContainer"],m=d?"endOffset":"startOffset",c=h?b.document.getById(a.startNode):a.startNode;a=h?b.document.getById(a.endNode):a.endNode;g.equals(c.getPrevious())?(b.startOffset=b.startOffset-g.getLength()-a.getPrevious().getLength(),g=a.getNext()):g.equals(a.getPrevious())&&(b.startOffset-=g.getLength(),g=a.getNext());g.equals(c.getParent())&&
b[m]++;g.equals(a.getParent())&&b[m]++;b[d?"endContainer":"startContainer"]=g;return b}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,h)};var h={createIterator:function(){var a=this,b=CKEDITOR.dom.walker.bookmark(),d=[],h;return{getNextRange:function(g){h=void 0===h?0:h+1;var m=a[h];if(m&&1<a.length){if(!h)for(var c=a.length-1;0<=c;c--)d.unshift(a[c].createBookmark(!0));if(g)for(var k=
0;a[h+k+1];){var f=m.document;g=0;c=f.getById(d[k].endNode);for(f=f.getById(d[k+1].startNode);;){c=c.getNextSourceNode(!1);if(f.equals(c))g=1;else if(b(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary())continue;break}if(!g)break;k++}for(m.moveToBookmark(d.shift());k--;)c=a[++h],c.moveToBookmark(d.shift()),m.setEnd(c.endContainer,c.endOffset)}return m}}},createBookmarks:function(e){for(var b=[],d,h=0;h<this.length;h++){b.push(d=this[h].createBookmark(e,!0));for(var g=h+1;g<this.length;g++)this[g]=
a(d,this[g]),this[g]=a(d,this[g],!0)}return b},createBookmarks2:function(a){for(var b=[],d=0;d<this.length;d++)b.push(this[d].createBookmark2(a));return b},moveToBookmarks:function(a){for(var b=0;b<this.length;b++)this[b].moveToBookmark(a[b])}}}(),function(){function a(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function h(b){var c=CKEDITOR.skin["ua_"+b],d=CKEDITOR.env;if(c)for(var c=c.split(",").sort(function(a,b){return a>b?-1:1}),g=0,
e;g<c.length;g++)if(e=c[g],d.ie&&(e.replace(/^ie/,"")==d.version||d.quirks&&"iequirks"==e)&&(e="ie"),d[e]){b+="_"+c[g];break}return CKEDITOR.getUrl(a()+b+".css")}function e(a,b){l[a]||(CKEDITOR.document.appendStyleSheet(h(a)),l[a]=1);b&&b()}function b(a){var b=a.getById(g);b||(b=a.getHead().append("style"),b.setAttribute("id",g),b.setAttribute("type","text/css"));return b}function d(a,b,c){var d,g,e;if(CKEDITOR.env.webkit)for(b=b.split("}").slice(0,-1),g=0;g<b.length;g++)b[g]=b[g].split("{");for(var h=
0;h<a.length;h++)if(CKEDITOR.env.webkit)for(g=0;g<b.length;g++){e=b[g][1];for(d=0;d<c.length;d++)e=e.replace(c[d][0],c[d][1]);a[h].$.sheet.addRule(b[g][0],e)}else{e=b;for(d=0;d<c.length;d++)e=e.replace(c[d][0],c[d][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?a[h].$.styleSheet.cssText+=e:a[h].$.innerHTML+=e}}var l={};CKEDITOR.skin={path:a,loadPart:function(b,c){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){e(b,c)}):e(b,c)},
getPath:function(a){return CKEDITOR.getUrl(h(a))},icons:{},addIcon:function(a,b,c,d){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:d||"16px"})},getIconStyle:function(a,b,c,d,g){var e;a&&(a=a.toLowerCase(),b&&(e=this.icons[a+"-rtl"]),e||(e=this.icons[a]));a=c||e&&e.path||"";d=d||e&&e.offset;g=g||e&&e.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+d+"px;background-size:"+g+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,
{getUiColor:function(){return this.uiColor},setUiColor:function(a){var f=b(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var b=CKEDITOR.skin.chameleon,k="",g="";"function"==typeof b&&(k=b(this,"editor"),g=b(this,"panel"));a=[[c,a]];d([f],k,a);d(m,g,a)}).call(this,a)}});var g="cke_ui_color",m=[],c=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var f=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();
if(!a.getById("cke_ui_color")){var k=b(a);m.push(k);f.on("destroy",function(){m=CKEDITOR.tools.array.filter(m,function(a){return k!==a})});(a=f.getUiColor())&&d([k],CKEDITOR.skin.chameleon(f,"panel"),[[c,a]])}};f.on("panelShow",a);f.on("menuShow",a);f.config.uiColor&&f.setUiColor(f.config.uiColor)}})}(),function(){var a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e',CKEDITOR.document);
a.appendTo(CKEDITOR.document.getHead());try{var h=a.getComputedStyle("border-top-color"),e=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!h||h!=e)}catch(b){CKEDITOR.env.hc=!1}a.remove();CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending)for(delete CKEDITOR._.pending,h=0;h<a.length;h++)CKEDITOR.editor.prototype.constructor.apply(a[h][0],a[h][1]),CKEDITOR.add(a[h][0])}(),
CKEDITOR.skin.name="moono",CKEDITOR.skin.ua_editor="ie,iequirks,ie7,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,iequirks,ie7,ie8",CKEDITOR.skin.chameleon=function(){var a=function(){return function(a,d){for(var e=a.match(/[^#]./g),g=0;3>g;g++){var h=g,c;c=parseInt(e[g],16);c=("0"+(0>d?0|c*(1+d):0|c+(255-c)*d).toString(16)).slice(-2);e[h]=c}return"#"+e.join("")}}(),h=function(){var a=new CKEDITOR.template("background:#{to};background-image:linear-gradient(to bottom,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType\x3d0,startColorstr\x3d'{from}',endColorstr\x3d'{to}');");
return function(d,e){return a.output({from:d,to:e})}}(),e={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "),
panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")};
return function(b,d){var l=b.uiColor,l={id:"."+b.id,defaultBorder:a(l,-.1),defaultGradient:h(a(l,.9),l),lightGradient:h(a(l,1),a(l,.7)),mediumGradient:h(a(l,.8),a(l,.5)),ckeButtonOn:h(a(l,.6),a(l,.7)),ckeResizer:a(l,-.4),ckeToolbarSeparator:a(l,.5),ckeColorauto:a(l,.8),dialogBody:a(l,.7),dialogTabSelected:h("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:a(l,-.6),elementsPathBg:l,menubuttonIcon:a(l,.5),menubuttonIconHover:a(l,.3)};return e[d].output(l).replace(/\[/g,"{").replace(/\]/g,
"}")}}(),CKEDITOR.plugins.add("dialogui",{onLoad:function(){var a=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||!1;for(var b=[this._],d=1;d<arguments.length;d++)b.push(arguments[d]);b.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,b);return this._},h={build:function(a,b,d){return new CKEDITOR.ui.dialog.textInput(a,b,d)}},e={build:function(a,b,d){return new CKEDITOR.ui.dialog[b.type](a,b,d)}},b={isChanged:function(){return this.getValue()!=
this.getInitValue()},reset:function(a){this.setValue(this.getInitValue(),a)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},d=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(a,b){this._.domOnChangeRegistered||(a.on("load",function(){this.getInputElement().on("change",function(){a.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},
this)},this),this._.domOnChangeRegistered=!0);this.on("change",b)}},!0),l=/^on([A-Z]\w+)/,g=function(a){for(var b in a)(l.test(b)||"title"==b||"type"==b)&&delete a[b];return a},m=function(a){a=a.data.getKeystroke();a==CKEDITOR.SHIFT+CKEDITOR.ALT+36?this.setDirectionMarker("ltr"):a==CKEDITOR.SHIFT+CKEDITOR.ALT+35&&this.setDirectionMarker("rtl")};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(b,d,f,g){if(!(4>arguments.length)){var e=a.call(this,d);e.labelId=CKEDITOR.tools.getNextId()+
"_label";this._.children=[];var h={role:d.role||"presentation"};d.includeLabel&&(h["aria-labelledby"]=e.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,d,f,"div",null,h,function(){var a=[],f=d.required?" cke_required":"";"horizontal"!=d.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+f+'" ',' id\x3d"'+e.labelId+'"',e.inputId?' for\x3d"'+e.inputId+'"':"",(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e",d.required?d.label+'\x3cspan class\x3d"cke_dialog_ui_labeled_required" aria-hidden\x3d"true"\x3e*\x3c/span\x3e':
d.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"',d.controlStyle?' style\x3d"'+d.controlStyle+'"':"",' role\x3d"presentation"\x3e',g.call(this,b,d),"\x3c/div\x3e"):(f={type:"hbox",widths:d.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+f+'" id\x3d"'+e.labelId+'" for\x3d"'+e.inputId+'"'+(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(d.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+
(d.controlStyle?' style\x3d"'+d.controlStyle+'"':"")+"\x3e"+g.call(this,b,d)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,f,a));return a.join("")})}},textInput:function(b,d,f){if(!(3>arguments.length)){a.call(this,d);var g=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",e={"class":"cke_dialog_ui_input_"+d.type,id:g,type:d.type};d.validate&&(this.validate=d.validate);d.maxLength&&(e.maxlength=d.maxLength);d.size&&(e.size=d.size);d.inputStyle&&(e.style=d.inputStyle);var h=
this,l=!1;b.on("load",function(){h.getInputElement().on("keydown",function(a){13==a.data.getKeystroke()&&(l=!0)});h.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&l&&(b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0),l=!1);h.bidi&&m.call(h,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,d,f,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',d.type,'" role\x3d"presentation"'];d.width&&a.push('style\x3d"width:'+d.width+'" ');a.push("\x3e\x3cinput ");
e["aria-labelledby"]=this._.labelId;this._.required&&(e["aria-required"]=this._.required);for(var b in e)a.push(b+'\x3d"'+e[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(b,d,f){if(!(3>arguments.length)){a.call(this,d);var g=this,e=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",h={};d.validate&&(this.validate=d.validate);h.rows=d.rows||5;h.cols=d.cols||20;h["class"]="cke_dialog_ui_input_textarea "+(d["class"]||"");"undefined"!=typeof d.inputStyle&&(h.style=d.inputStyle);
d.dir&&(h.dir=d.dir);if(g.bidi)b.on("load",function(){g.getInputElement().on("keyup",m)},g);CKEDITOR.ui.dialog.labeledElement.call(this,b,d,f,function(){h["aria-labelledby"]=this._.labelId;this._.required&&(h["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',e,'" '],b;for(b in h)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(h[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(g._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");
return a.join("")})}},checkbox:function(b,d,f){if(!(3>arguments.length)){var e=a.call(this,d,{"default":!!d["default"]});d.validate&&(this.validate=d.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,d,f,"span",null,null,function(){var a=CKEDITOR.tools.extend({},d,{id:d.id?d.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),f=[],h=CKEDITOR.tools.getNextId()+"_label",m={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":h};g(a);d["default"]&&(m.checked="checked");"undefined"!=
typeof a.inputStyle&&(a.style=a.inputStyle);e.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,f,"input",null,m);f.push(' \x3clabel id\x3d"',h,'" for\x3d"',m.id,'"'+(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(d.label),"\x3c/label\x3e");return f.join("")})}},radio:function(b,d,f){if(!(3>arguments.length)){a.call(this,d);this._["default"]||(this._["default"]=this._.initValue=d.items[0][1]);d.validate&&(this.validate=d.validate);var e=[],h=this;d.role="radiogroup";
d.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,b,d,f,function(){for(var a=[],f=[],m=(d.id?d.id:CKEDITOR.tools.getNextId())+"_radio",l=0;l<d.items.length;l++){var z=d.items[l],p=void 0!==z[2]?z[2]:z[0],A=void 0!==z[1]?z[1]:z[0],y=CKEDITOR.tools.getNextId()+"_radio_input",x=y+"_label",y=CKEDITOR.tools.extend({},d,{id:y,title:null,type:null},!0),p=CKEDITOR.tools.extend({},y,{title:p},!0),w={type:"radio","class":"cke_dialog_ui_radio_input",name:m,value:A,"aria-labelledby":x},B=[];h._["default"]==
A&&(w.checked="checked");g(y);g(p);"undefined"!=typeof y.inputStyle&&(y.style=y.inputStyle);A=new CKEDITOR.ui.dialog.uiElement(b,y,B,"input",null,w);A.on("focus",function(){h.click()});e.push(A);B.push(" ");new CKEDITOR.ui.dialog.uiElement(b,p,B,"label",null,{id:x,"for":w.id},z[0]);a.push(B.join(""))}new CKEDITOR.ui.dialog.hbox(b,e,a,f);return f.join("")});this._.children=e}},button:function(b,d,f){if(arguments.length){"function"==typeof d&&(d=d(b.getParentEditor()));a.call(this,d,{disabled:d.disabled||
!1});CKEDITOR.event.implementOn(this);var g=this;b.on("load",function(){var a=this.getElement();(function(){a.on("click",function(a){g.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(g.click(),a.data.preventDefault())})})();a.unselectable()},this);var e=CKEDITOR.tools.extend({},d);delete e.style;var h=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,b,e,f,"a",null,{style:d.style,href:"javascript:void(0)",title:d.label,hidefocus:"true",
"class":d["class"],role:"button","aria-labelledby":h},'\x3cspan id\x3d"'+h+'" class\x3d"cke_dialog_ui_button"\x3e'+CKEDITOR.tools.htmlEncode(d.label)+"\x3c/span\x3e")}},select:function(b,d,f){if(!(3>arguments.length)){var e=a.call(this,d);d.validate&&(this.validate=d.validate);e.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,d,f,function(){var a=CKEDITOR.tools.extend({},d,{id:d.id?d.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),f=[],h=[],m={id:e.inputId,
"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};f.push('\x3cdiv class\x3d"cke_dialog_ui_input_',d.type,'" role\x3d"presentation"');d.width&&f.push('style\x3d"width:'+d.width+'" ');f.push("\x3e");void 0!==d.size&&(m.size=d.size);void 0!==d.multiple&&(m.multiple=d.multiple);g(a);for(var l=0,z;l<d.items.length&&(z=d.items[l]);l++)h.push('\x3coption value\x3d"',CKEDITOR.tools.htmlEncode(void 0!==z[1]?z[1]:z[0]).replace(/"/g,"\x26quot;"),'" /\x3e ',CKEDITOR.tools.htmlEncode(z[0]));
"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);e.select=new CKEDITOR.ui.dialog.uiElement(b,a,f,"select",null,m,h.join(""));f.push("\x3c/div\x3e");return f.join("")})}},file:function(b,d,f){if(!(3>arguments.length)){void 0===d["default"]&&(d["default"]="");var g=CKEDITOR.tools.extend(a.call(this,d),{definition:d,buttons:[]});d.validate&&(this.validate=d.validate);b.on("load",function(){CKEDITOR.document.getById(g.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,
b,d,f,function(){g.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"',g.frameId,'" title\x3d"',d.label,'" src\x3d"javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"\x3e\x3c/iframe\x3e');return a.join("")})}},fileButton:function(b,d,f){var g=this;if(!(3>arguments.length)){a.call(this,
d);d.validate&&(this.validate=d.validate);var e=CKEDITOR.tools.extend({},d),h=e.onClick;e.className=(e.className?e.className+" ":"")+"cke_dialog_ui_button";e.onClick=function(a){var f=d["for"];a=h?h.call(this,a):!1;!1!==a&&("xhr"!==a&&b.getContentElement(f[0],f[1]).submit(),this.disable())};b.on("load",function(){b.getContentElement(d["for"][0],d["for"][1])._.buttons.push(g)});CKEDITOR.ui.dialog.button.call(this,b,e,f)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,
d=/\/$/;return function(g,e,h){if(!(3>arguments.length)){var m=[],l=e.html;"\x3c"!=l.charAt(0)&&(l="\x3cspan\x3e"+l+"\x3c/span\x3e");var t=e.focus;if(t){var z=this.focus;this.focus=function(){("function"==typeof t?t:z).call(this);this.fire("focus")};e.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,g,e,m,"span",null,null,"");m=m.join("").match(a);l=l.match(b)||["","",""];d.test(l[1])&&(l[1]=l[1].slice(0,-1),l[2]="/"+l[2]);h.push([l[1],
" ",m[1]||"",l[2]].join(""))}}}(),fieldset:function(a,b,d,g,e){var h=e.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,e,g,"fieldset",null,null,function(){var a=[];h&&a.push("\x3clegend"+(e.labelStyle?' style\x3d"'+e.labelStyle+'"':"")+"\x3e"+h+"\x3c/legend\x3e");for(var b=0;b<d.length;b++)a.push(d[b]);return a.join("")})}},!0);CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement;CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,
{setLabel:function(a){var b=CKEDITOR.document.getById(this._.labelId);1>b.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(b):b.getChild(0).$.nodeValue=a;return this},getLabel:function(){var a=CKEDITOR.document.getById(this._.labelId);return!a||1>a.getChildCount()?"":a.getChild(0).getText()},eventProcessors:d},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},
enable:function(){this._.disabled=!1;var a=this.getElement();a&&a.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(a,b){this.on("click",function(){b.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},
accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},focus:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&b.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&(b.$.focus(),b.$.select())},0)},accessKeyUp:function(){this.select()},
setValue:function(a){if(this.bidi){var b=a&&a.charAt(0);(b="‪"==b?"ltr":"‫"==b?"rtl":null)&&(a=a.slice(1));this.setDirectionMarker(b)}a||(a="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},getValue:function(){var a=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&a){var b=this.getDirectionMarker();b&&(a=("ltr"==b?"‪":"‫")+a)}return a},setDirectionMarker:function(a){var b=this.getInputElement();a?b.setAttributes({dir:a,"data-cke-dir-marker":a}):
this.getDirectionMarker()&&b.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},b,!0);CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(a,b,d){var g=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),
e=this.getInputElement().$;g.$.text=a;g.$.value=void 0===b||null===b?a:b;void 0===d||null===d?CKEDITOR.env.ie?e.add(g.$):e.add(g.$,null):e.add(g.$,d);return this},remove:function(a){this.getInputElement().$.remove(a);return this},clear:function(){for(var a=this.getInputElement().$;0<a.length;)a.remove(0);return this},keyboardFocusable:!0},b,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},
setValue:function(a,b){this.getInputElement().$.checked=a;!b&&this.fire("change",{value:a});return this},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(a,b){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return d.onChange.apply(this,arguments);a.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;"checked"==b.propertyName&&this.fire("change",{value:a.$.checked})},
this)},this);this.on("change",b);return null}},keyboardFocusable:!0},b,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{focus:function(){var a=this._.children,b=a[0],d=this._.dialog._,g=d.currentFocusIndex,e=g===d.focusList.length-1&&0===this.focusIndex;g>this.focusIndex&&!e&&(b=a[a.length-1]);d.currentFocusIndex=this.focusIndex;for(d=0;d<a.length;d++)if(g=a[d],g.getInputElement().$.checked){b=g;break}b.focus()},setValue:function(a,b){for(var d=this._.children,
g,e=0;e<d.length&&(g=d[e]);e++)g.getElement().$.checked=g.getValue()==a;!b&&this.fire("change",{value:a});return this},getValue:function(){for(var a=this._.children,b=0;b<a.length;b++)if(a[b].getElement().$.checked)return a[b].getValue();return null},accessKeyUp:function(){var a=this._.children,b;for(b=0;b<a.length;b++)if(a[b].getElement().$.checked){a[b].getElement().focus();return}a[0].getElement().focus()},click:function(){this._.dialog._.currentFocusIndex=this.focusIndex},eventProcessors:{onChange:function(a,
b){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return d.onChange.apply(this,arguments);a.on("load",function(){for(var a=this._.children,b=this,c=0;c<a.length;c++)a[c].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&&this.$.checked&&b.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",b);return null}},keyboardFocusable:!0},b,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,b,{getInputElement:function(){var a=
CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<a.$.forms.length?new CKEDITOR.dom.element(a.$.forms[0].elements[0]):this.getElement()},submit:function(){this.getInputElement().getParent().$.submit();return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(a){var b=/^on([A-Z]\w+)/,d,g=function(a,b,c,d){a.on("formLoaded",function(){a.getInputElement().on(c,d,a)})},e;for(e in a)if(d=e.match(b))this.eventProcessors[e]?this.eventProcessors[e].call(this,
this._.dialog,a[e]):g(this,this._.dialog,d[1].toLowerCase(),a[e]);return this},reset:function(){function a(){d.$.open();var c="";g.size&&(c=g.size-(CKEDITOR.env.ie?7:0));var p=b.frameId+"_input";d.$.write(['\x3chtml dir\x3d"'+l+'" lang\x3d"'+t+'"\x3e\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e\x3cbody style\x3d"margin: 0; overflow: hidden; background: transparent;"\x3e','\x3cform enctype\x3d"multipart/form-data" method\x3d"POST" dir\x3d"'+l+'" lang\x3d"'+t+'" action\x3d"',CKEDITOR.tools.htmlEncode(g.action),
'"\x3e\x3clabel id\x3d"',b.labelId,'" for\x3d"',p,'" style\x3d"display:none"\x3e',CKEDITOR.tools.htmlEncode(g.label),'\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',p,'" aria-labelledby\x3d"',b.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(g.id||"cke_upload"),'" size\x3d"',CKEDITOR.tools.htmlEncode(0<c?c:""),'" /\x3e\x3c/form\x3e\x3c/body\x3e\x3c/html\x3e\x3cscript\x3e',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+h+");",
"window.onbeforeunload \x3d function() {window.parent.CKEDITOR.tools.callFunction("+m+")}","\x3c/script\x3e"].join(""));d.$.close();for(c=0;c<e.length;c++)e[c].enable()}var b=this._,d=CKEDITOR.document.getById(b.frameId).getFrameDocument(),g=b.definition,e=b.buttons,h=this.formLoadedNumber,m=this.formUnloadNumber,l=b.dialog._.editor.lang.dir,t=b.dialog._.editor.langCode;h||(h=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),m=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},
this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(h);CKEDITOR.tools.removeFunction(m)}));CKEDITOR.env.gecko?setTimeout(a,500):a()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(a,b){this._.domOnChangeRegistered||(this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=
!0);this.on("change",b)}},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.fileButton.prototype=new CKEDITOR.ui.dialog.button;CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype);CKEDITOR.dialog.addUIElement("text",h);CKEDITOR.dialog.addUIElement("password",h);CKEDITOR.dialog.addUIElement("tel",h);CKEDITOR.dialog.addUIElement("textarea",e);CKEDITOR.dialog.addUIElement("checkbox",e);CKEDITOR.dialog.addUIElement("radio",e);CKEDITOR.dialog.addUIElement("button",e);
CKEDITOR.dialog.addUIElement("select",e);CKEDITOR.dialog.addUIElement("file",e);CKEDITOR.dialog.addUIElement("fileButton",e);CKEDITOR.dialog.addUIElement("html",e);CKEDITOR.dialog.addUIElement("fieldset",{build:function(a,b,d){for(var g=b.children,e,h=[],m=[],l=0;l<g.length&&(e=g[l]);l++){var t=[];h.push(t);m.push(CKEDITOR.dialog._.uiElementBuilders[e.type].build(a,e,t))}return new CKEDITOR.ui.dialog[b.type](a,m,h,d,b)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=
2,CKEDITOR.DIALOG_RESIZE_BOTH=3,CKEDITOR.DIALOG_STATE_IDLE=1,CKEDITOR.DIALOG_STATE_BUSY=2,function(){function a(a){a._.tabBarMode=!0;a._.tabs[a._.currentTabId][0].focus();a._.currentFocusIndex=-1}function h(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+a,c=b-1;c>b-a;c--)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function e(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,
this._.currentTabId),c=b+1;c<b+a;c++)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function b(a,b){for(var c=a.$.getElementsByTagName("input"),d=0,f=c.length;d<f;d++){var g=new CKEDITOR.dom.element(c[d]);"text"==g.getAttribute("type").toLowerCase()&&(b?(g.setAttribute("value",g.getCustomData("fake_value")||""),g.removeCustomData("fake_value")):(g.setCustomData("fake_value",g.getAttribute("value")),g.setAttribute("value","")))}}function d(a,b){var c=
this.getInputElement();c&&(a?c.removeAttribute("aria-invalid"):c.setAttribute("aria-invalid",!0));a||(this.select?this.select():this.focus());b&&alert(b);this.fire("validated",{valid:a,msg:b})}function l(){var a=this.getInputElement();a&&a.removeAttribute("aria-invalid")}function g(a){var b=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",L).output({id:CKEDITOR.tools.getNextNumber(),editorId:a.id,langDir:a.lang.dir,langCode:a.langCode,editorDialogClass:"cke_editor_"+a.name.replace(/\./g,
"\\.")+"_dialog",closeTitle:a.lang.common.close,hidpi:CKEDITOR.env.hidpi?"cke_hidpi":""})),c=b.getChild([0,0,0,0,0]),d=c.getChild(0),f=c.getChild(1);a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(c);!CKEDITOR.env.ie||CKEDITOR.env.quirks||CKEDITOR.env.edge||(a="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())",CKEDITOR.dom.element.createFromHtml('\x3ciframe frameBorder\x3d"0" class\x3d"cke_iframe_shim" src\x3d"'+
a+'" tabIndex\x3d"-1"\x3e\x3c/iframe\x3e').appendTo(c.getParent()));d.unselectable();f.unselectable();return{element:b,parts:{dialog:b.getChild(0),title:d,close:f,tabs:c.getChild(2),contents:c.getChild([3,0,0,0]),footer:c.getChild([3,0,1,0])}}}function m(a,b,c){this.element=b;this.focusIndex=c;this.tabIndex=0;this.isFocusable=function(){return!b.getAttribute("disabled")&&b.isVisible()};this.focus=function(){a._.currentFocusIndex=this.focusIndex;this.element.focus()};b.on("keydown",function(a){a.data.getKeystroke()in
{32:1,13:1}&&this.fire("click")});b.on("focus",function(){this.fire("mouseover")});b.on("blur",function(){this.fire("mouseout")})}function c(a){function b(){a.layout()}var c=CKEDITOR.document.getWindow();c.on("resize",b);a.on("hide",function(){c.removeListener("resize",b)})}function k(a,b){this.dialog=a;for(var c=b.contents,d=0,g;g=c[d];d++)c[d]=g&&new f(a,g);CKEDITOR.tools.extend(this,b)}function f(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function n(a){function b(c){var h=a.getSize(),
m=a.parts.dialog.getParent().getClientSize(),l=c.data.$.screenX,n=c.data.$.screenY,r=l-d.x,p=n-d.y;d={x:l,y:n};f.x+=r;f.y+=p;l=f.x+e[3]<k?-e[3]:f.x-e[1]>m.width-h.width-k?m.width-h.width+("rtl"==g.lang.dir?0:e[1]):f.x;h=f.y+e[0]<k?-e[0]:f.y-e[2]>m.height-h.height-k?m.height-h.height+e[2]:f.y;l=Math.floor(l);h=Math.floor(h);a.move(l,h,1);c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=
C.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",c)}}var d=null,f=null,g=a.getParentEditor(),k=g.config.dialog_magnetDistance,e=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof k&&(k=20);a.parts.title.on("mousedown",function(g){if(!a._.moved){var k=a._.element;k.getFirst().setStyle("position","absolute");k.removeStyle("display");a._.moved=!0;a.layout()}d={x:g.data.$.screenX,y:g.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",
c);f=a.getPosition();CKEDITOR.env.ie6Compat&&(k=C.getChild(0).getFrameDocument(),k.on("mousemove",b),k.on("mouseup",c));g.data.preventDefault()},a)}function r(a){function b(c){var n="rtl"==g.lang.dir,r=l.width,p=l.height,w=r+(c.data.$.screenX-m.x)*(n?-1:1)*(a._.moved?1:2),K=p+(c.data.$.screenY-m.y)*(a._.moved?1:2),t=a._.element.getFirst(),t=n&&parseInt(t.getComputedStyle("right"),10),y=a.getPosition();y.x=y.x||0;y.y=y.y||0;y.y+K>h.height&&(K=h.height-y.y);(n?t:y.x)+w>h.width&&(w=h.width-(n?t:y.x));
K=Math.floor(K);w=Math.floor(w);if(f==CKEDITOR.DIALOG_RESIZE_WIDTH||f==CKEDITOR.DIALOG_RESIZE_BOTH)r=Math.max(d.minWidth||0,w-k);if(f==CKEDITOR.DIALOG_RESIZE_HEIGHT||f==CKEDITOR.DIALOG_RESIZE_BOTH)p=Math.max(d.minHeight||0,K-e);a.resize(r,p);a._.moved&&v(a,a._.position.x,a._.position.y);a._.moved||a.layout();c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mouseup",c);CKEDITOR.document.removeListener("mousemove",b);n&&(n.remove(),n=null);if(CKEDITOR.env.ie6Compat){var a=C.getChild(0).getFrameDocument();
a.removeListener("mouseup",c);a.removeListener("mousemove",b)}}var d=a.definition,f=d.resizable;if(f!=CKEDITOR.DIALOG_RESIZE_NONE){var g=a.getParentEditor(),k,e,h,m,l,n,r=CKEDITOR.tools.addFunction(function(d){function f(a){return a.isVisible()}l=a.getSize();var g=a.parts.contents,r=g.$.getElementsByTagName("iframe").length,p=!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks);r&&(n=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%; left:0; top:0;"\x3e\x3c/div\x3e'),
g.append(n));e=l.height-a.parts.contents.getFirst(f).getSize("height",p);k=l.width-a.parts.contents.getFirst(f).getSize("width",1);m={x:d.screenX,y:d.screenY};h=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);CKEDITOR.env.ie6Compat&&(g=C.getChild(0).getFrameDocument(),g.on("mousemove",b),g.on("mouseup",c));d.preventDefault&&d.preventDefault()});a.on("load",function(){var b="";f==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":
f==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+b+" cke_resizer_"+g.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(g.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+r+', event )"\x3e'+("ltr"==g.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});g.on("destroy",function(){CKEDITOR.tools.removeFunction(r)})}}function v(a,b,c){var d=a.parts.dialog.getParent().getClientSize(),f=a.getSize(),
g=a._.viewportRatio,k=Math.max(d.width-f.width,0),d=Math.max(d.height-f.height,0);g.width=k?b/k:g.width;g.height=d?c/d:g.height;a._.viewportRatio=g}function u(a){a.data.preventDefault(1)}function q(a){var b=a.config,c=CKEDITOR.skinName||a.config.skin,d=b.dialog_backgroundCoverColor||("moono-lisa"==c?"black":"white"),c=b.dialog_backgroundCoverOpacity,f=b.baseFloatZIndex,b=CKEDITOR.tools.genKey(d,c,f),g=E[b];CKEDITOR.document.getBody().addClass("cke_dialog_open");g?g.show():(f=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',
CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",f,"; top: 0px; left: 0px; ","; width: 100%; height: 100%;",CKEDITOR.env.ie6Compat?"":"background-color: "+d,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(d="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+d+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",f.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),f.push("void((function(){"+encodeURIComponent("document.open();("+
CKEDITOR.tools.fixDomain+")();document.write( '"+d+"' );document.close();")+"})())"),f.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),f.push("\x3c/div\x3e"),g=CKEDITOR.dom.element.createFromHtml(f.join("")),g.setOpacity(void 0!==c?c:.5),g.on("keydown",u),g.on("keypress",u),g.on("keyup",u),g.appendTo(CKEDITOR.document.getBody()),E[b]=g);a.focusManager.add(g);C=g;CKEDITOR.env.mac&&CKEDITOR.env.webkit||
g.focus()}function t(a){CKEDITOR.document.getBody().removeClass("cke_dialog_open");C&&(a.focusManager.remove(C),C.hide())}function z(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,f=String.fromCharCode(a.data.$.keyCode);(b=P[(b?"CTRL+":"")+(c?"ALT+":"")+(d?"SHIFT+":"")+f])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())}function p(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,
f=String.fromCharCode(a.data.$.keyCode);(b=P[(b?"CTRL+":"")+(c?"ALT+":"")+(d?"SHIFT+":"")+f])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),a.data.preventDefault()))}function A(a,b,c,d,f){(P[c]||(P[c]=[])).push({uiElement:a,dialog:b,key:c,keyup:f||a.accessKeyUp,keydown:d||a.accessKeyDown})}function y(a){for(var b in P){for(var c=P[b],d=c.length-1;0<=d;d--)c[d].dialog!=a&&c[d].uiElement!=a||c.splice(d,1);0===c.length&&delete P[b]}}function x(a,b){a._.accessKeyMap[b]&&
a.selectPage(a._.accessKeyMap[b])}function w(){}var B=CKEDITOR.tools.cssLength,D,C,H=!1,F=!CKEDITOR.env.ie||CKEDITOR.env.edge,L='\x3cdiv class\x3d"cke_reset_all cke_dialog_container {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" style\x3d"'+(F?"display:flex":"")+'" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" style\x3d"'+(F?"margin:auto":"position:absolute")+'" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e';
CKEDITOR.dialog=function(b,c){function f(){var a=B._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,c=0;c<b;c++)a[c].focusIndex=c}function m(a){var b=B._.focusList;a=a||0;if(!(1>b.length)){var c=B._.currentFocusIndex;B._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(d){}var f=c,g=1<B._.pageCount;do{f+=a;if(g&&!B._.tabBarMode&&(f==b.length||-1==f)){B._.tabBarMode=!0;B._.tabs[B._.currentTabId][0].focus();
B._.currentFocusIndex=-1;return}f=(f+b.length)%b.length;if(f==c)break}while(a&&!b[f].isFocusable());b[f].focus();"text"==b[f].type&&b[f].select()}}function p(c){if(B==CKEDITOR.dialog._.currentTop){var d=c.data.getKeystroke(),f="rtl"==b.lang.dir,g=[37,38,39,40];z=A=0;if(9==d||d==CKEDITOR.SHIFT+9)m(d==CKEDITOR.SHIFT+9?-1:1),z=1;else if(d==CKEDITOR.ALT+121&&!B._.tabBarMode&&1<B.getPageCount())a(B),z=1;else if(-1!=CKEDITOR.tools.indexOf(g,d)&&B._.tabBarMode)d=-1!=CKEDITOR.tools.indexOf([f?39:37,38],d)?
h.call(B):e.call(B),B.selectPage(d),B._.tabs[d][0].focus(),z=1;else if(13!=d&&32!=d||!B._.tabBarMode)if(13==d)d=c.data.getTarget(),d.is("a","button","select","textarea")||d.is("input")&&"button"==d.$.type||((d=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(d.click,0,d),z=1),A=1;else if(27==d)(d=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(d.click,0,d):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),A=1;else return;else this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex=
-1,m(1),z=1;w(c)}}function w(a){z?a.data.preventDefault(1):A&&a.data.stopPropagation()}var t=CKEDITOR.dialog._.dialogDefinitions[c],y=CKEDITOR.tools.clone(D),v=b.config.dialog_buttonsOrder||"OS",x=b.lang.dir,q={},z,A;("OS"==v&&CKEDITOR.env.mac||"rtl"==v&&"ltr"==x||"ltr"==v&&"rtl"==x)&&y.buttons.reverse();t=CKEDITOR.tools.extend(t(b),y);t=CKEDITOR.tools.clone(t);t=new k(this,t);y=g(b);this._={editor:b,element:y.element,name:c,model:null,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},
buttons:{},accessKeyMap:{},viewportRatio:{width:.5,height:.5},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1};this.parts=y.parts;CKEDITOR.tools.setTimeout(function(){b.fire("ariaWidget",this.parts.contents)},0,this);y={top:0,visibility:"hidden"};CKEDITOR.env.ie6Compat&&(y.position="absolute");y["rtl"==x?"right":"left"]=0;this.parts.dialog.setStyles(y);CKEDITOR.event.call(this);this.definition=t=CKEDITOR.fire("dialogDefinition",
{name:c,definition:t,dialog:this},b).definition;if(!("removeDialogTabs"in b._)&&b.config.removeDialogTabs){y=b.config.removeDialogTabs.split(";");for(x=0;x<y.length;x++)if(v=y[x].split(":"),2==v.length){var u=v[0];q[u]||(q[u]=[]);q[u].push(v[1])}b._.removeDialogTabs=q}if(b._.removeDialogTabs&&(q=b._.removeDialogTabs[c]))for(x=0;x<q.length;x++)t.removeContents(q[x]);if(t.onLoad)this.on("load",t.onLoad);if(t.onShow)this.on("show",t.onShow);if(t.onHide)this.on("hide",t.onHide);if(t.onOk)this.on("ok",
function(a){b.fire("saveSnapshot");setTimeout(function(){b.fire("saveSnapshot")},0);!1===t.onOk.call(this,a)&&(a.data.hide=!1)});this.state=CKEDITOR.DIALOG_STATE_IDLE;if(t.onCancel)this.on("cancel",function(a){!1===t.onCancel.call(this,a)&&(a.data.hide=!1)});var B=this,C=function(a){var b=B._.contents,c=!1,d;for(d in b)for(var f in b[d])if(c=a.call(this,b[d][f]))return};this.on("ok",function(a){C(function(b){if(b.validate){var c=b.validate(this),f="string"==typeof c||!1===c;f&&(a.data.hide=!1,a.stop());
d.call(b,!f,"string"==typeof c?c:void 0);return f}})},this,null,0);this.on("cancel",function(a){C(function(c){if(c.isChanged())return b.config.dialog_noConfirmCancel||confirm(b.lang.common.confirmCancel)||(a.data.hide=!1),!0})},this,null,0);this.parts.close.on("click",function(a){!1!==this.fire("cancel",{hide:!0}).hide&&this.hide();a.data.preventDefault()},this);this.changeFocus=m;var F=this._.element;b.focusManager.add(F,1);this.on("show",function(){F.on("keydown",p,this);if(CKEDITOR.env.gecko)F.on("keypress",
w,this)});this.on("hide",function(){F.removeListener("keydown",p);CKEDITOR.env.gecko&&F.removeListener("keypress",w);C(function(a){l.apply(a)})});this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",p,this,null,0)});this.on("show",function(){f();var a=1<B._.pageCount;b.config.dialog_startupFocusTab&&a?(B._.tabBarMode=!0,B._.tabs[B._.currentTabId][0].focus(),B._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=a?-1:this._.focusList.length-
1,t.onFocus?(a=t.onFocus.call(this))&&a.focus():m(1))},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var a=this.getElement(),b=a.getFirst();b.remove();b.appendTo(a)},this);n(this);r(this);(new CKEDITOR.dom.text(t.title,CKEDITOR.document)).appendTo(this.parts.title);for(x=0;x<t.contents.length;x++)(q=t.contents[x])&&this.addPage(q);this.parts.tabs.on("click",function(b){var c=b.data.getTarget();c.hasClass("cke_dialog_tab")&&(c=c.$.id,this.selectPage(c.substring(4,c.lastIndexOf("_"))),
a(this),b.data.preventDefault())},this);x=[];q=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:t.buttons},x).getChild();this.parts.footer.setHtml(x.join(""));for(x=0;x<q.length;x++)this._.buttons[q[x].id]=q[x]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(a,b){if(!this._.contentSize||this._.contentSize.width!=a||this._.contentSize.height!=b){CKEDITOR.dialog.fire("resize",
{dialog:this,width:a,height:b},this._.editor);this.fire("resize",{width:a,height:b},this._.editor);this.parts.contents.setStyles({width:a+"px",height:b+"px"});if("rtl"==this._.editor.lang.dir&&this._.position){var c=this.parts.dialog.getParent().getClientSize().width;this._.position.x=c-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10)}this._.contentSize={width:a,height:b}}},getSize:function(){var a=this._.element.getFirst();return{width:a.$.offsetWidth||0,height:a.$.offsetHeight||
0}},move:function(a,b,c){var d=this._.element.getFirst(),f="rtl"==this._.editor.lang.dir;CKEDITOR.env.ie&&d.setStyle("zoom","100%");var g=this.parts.dialog.getParent().getClientSize(),k=this.getSize(),e=this._.viewportRatio,h=Math.max(g.width-k.width,0),g=Math.max(g.height-k.height,0);this._.position&&this._.position.x==a&&this._.position.y==b?(a=Math.floor(h*e.width),b=Math.floor(g*e.height)):v(this,a,b);this._.position={x:a,y:b};f&&(a=h-a);b={top:(0<b?b:0)+"px"};b[f?"right":"left"]=(0<a?a:0)+"px";
d.setStyles(b);c&&(this._.moved=1)},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,b=this.definition,d=CKEDITOR.document.getBody(),f=this._.editor.config.baseFloatZIndex;a.getParent()&&a.getParent().equals(d)?a.setStyle("display",F?"flex":"block"):a.appendTo(d);this.resize(this._.contentSize&&this._.contentSize.width||b.width||b.minWidth,this._.contentSize&&this._.contentSize.height||b.height||b.minHeight);this.reset();null===this._.currentTabId&&
this.selectPage(this.definition.contents[0].id);null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=f);this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10);this.getElement().setStyle("z-index",CKEDITOR.dialog._.currentZIndex);null===CKEDITOR.dialog._.currentTop?(CKEDITOR.dialog._.currentTop=this,this._.parentDialog=null,q(this._.editor)):CKEDITOR.dialog._.currentTop!==this&&(this._.parentDialog=CKEDITOR.dialog._.currentTop,d=this._.parentDialog.getElement().getFirst(),
d.$.style.zIndex-=Math.floor(f/2),this._.parentDialog.getElement().setStyle("z-index",d.$.style.zIndex),CKEDITOR.dialog._.currentTop=this);a.on("keydown",z);a.on("keyup",p);this._.hasFocus=!1;for(var g in b.contents)if(b.contents[g]){var a=b.contents[g],f=this._.tabs[a.id],d=a.requiredContent,k=0;if(f){for(var e in this._.contents[a.id]){var h=this._.contents[a.id][e];"hbox"!=h.type&&"vbox"!=h.type&&h.getInputElement()&&(h.requiredContent&&!this._.editor.activeFilter.check(h.requiredContent)?h.disable():
(h.enable(),k++))}!k||d&&!this._.editor.activeFilter.check(d)?f[0].addClass("cke_dialog_tab_disabled"):f[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();c(this);this.parts.dialog.setStyle("visibility","");this.fireOnce("load",{});CKEDITOR.ui.fire("ready",this);this.fire("show",{});this._.editor.fire("dialogShow",this);this._.parentDialog||this._.editor.focusManager.lock();this.foreach(function(a){a.setInitValue&&a.setInitValue()})},100,this)},layout:function(){var a=
this.parts.dialog;if(this._.moved||!F){var b=this.getSize(),c=CKEDITOR.document.getWindow().getViewPaneSize(),d;this._.moved&&this._.position?(d=this._.position.x,b=this._.position.y):(d=(c.width-b.width)/2,b=(c.height-b.height)/2);CKEDITOR.env.ie6Compat||(a.setStyle("position","absolute"),a.removeStyle("margin"));d=Math.floor(d);b=Math.floor(b);this.move(d,b)}},foreach:function(a){for(var b in this._.contents)for(var c in this._.contents[b])a.call(this,this._.contents[b][c]);return this},reset:function(){var a=
function(a){a.reset&&a.reset(1)};return function(){this.foreach(a);return this}}(),setupContent:function(){var a=arguments;this.foreach(function(b){b.setup&&b.setup.apply(b,a)})},commitContent:function(){var a=arguments;this.foreach(function(b){CKEDITOR.env.ie&&this._.currentFocusIndex==b.focusIndex&&b.getInputElement().$.blur();b.commit&&b.commit.apply(b,a)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{});this._.editor.fire("dialogHide",this);this.selectPage(this._.tabIdList[0]);
var a=this._.element;a.setStyle("display","none");this.parts.dialog.setStyle("visibility","hidden");for(y(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst(),c=parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2);this._.parentDialog.getElement().setStyle("z-index",c);b.setStyle("z-index",c)}else t(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=
10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",z);a.removeListener("keyup",p);var d=this._.editor;d.focus();setTimeout(function(){d.focusManager.unlock();CKEDITOR.env.iOS&&d.window.focus()},0)}delete this._.parentDialog;this.foreach(function(a){a.resetInitValue&&a.resetInitValue()});this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(a){if(!a.requiredContent||this._.editor.filter.check(a.requiredContent)){for(var b=[],c=a.label?' title\x3d"'+CKEDITOR.tools.htmlEncode(a.label)+
'"':"",d=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:a.elements,expand:!!a.expand,padding:a.padding,style:a.style||"width: 100%;"},b),f=this._.contents[a.id]={},g=d.getChild(),k=0;d=g.shift();)d.notAllowed||"hbox"==d.type||"vbox"==d.type||k++,f[d.id]=d,"function"==typeof d.getChild&&g.push.apply(g,d.getChild());k||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");b.setStyle("min-height",
"100%");d=CKEDITOR.env;f="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();c=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"',0<this._.pageCount?" cke_last":"cke_first",c,a.hidden?' style\x3d"display:none"':"",' id\x3d"',f,'"',d.gecko&&!d.hc?"":' href\x3d"javascript:void(0)"',' tabIndex\x3d"-1" hidefocus\x3d"true" role\x3d"tab"\x3e',a.label,"\x3c/a\x3e"].join(""));b.setAttribute("aria-labelledby",f);this._.tabs[a.id]=[c,b];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++;
this._.lastTab=c;this.updateStyle();b.setAttribute("name",a.id);b.appendTo(this.parts.contents);c.unselectable();this.parts.tabs.append(c);a.accessKey&&(A(this,this,"CTRL+"+a.accessKey,w,x),this._.accessKeyMap["CTRL+"+a.accessKey]=a.id)}},selectPage:function(a){if(this._.currentTabId!=a&&!this._.tabs[a][0].hasClass("cke_dialog_tab_disabled")&&!1!==this.fire("selectPage",{page:a,currentPage:this._.currentTabId})){for(var c in this._.tabs){var d=this._.tabs[c][0],f=this._.tabs[c][1];c!=a&&(d.removeClass("cke_dialog_tab_selected"),
d.removeAttribute("aria-selected"),f.hide());f.setAttribute("aria-hidden",c!=a)}var g=this._.tabs[a];g[0].addClass("cke_dialog_tab_selected");g[0].setAttribute("aria-selected",!0);CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(b(g[1]),g[1].show(),setTimeout(function(){b(g[1],1)},0)):g[1].show();this._.currentTabId=a;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,a)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(a){var b=
this._.tabs[a]&&this._.tabs[a][0];b&&1!=this._.pageCount&&b.isVisible()&&(a==this._.currentTabId&&this.selectPage(h.call(this)),b.hide(),this._.pageCount--,this.updateStyle())},showPage:function(a){if(a=this._.tabs[a]&&this._.tabs[a][0])a.show(),this._.pageCount++,this.updateStyle()},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(a,b){var c=this._.contents[a];return c&&c[b]},getValueOf:function(a,b){return this.getContentElement(a,b).getValue()},
setValueOf:function(a,b,c){return this.getContentElement(a,b).setValue(c)},getButton:function(a){return this._.buttons[a]},click:function(a){return this._.buttons[a].click()},disableButton:function(a){return this._.buttons[a].disable()},enableButton:function(a){return this._.buttons[a].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(a,
b){if("undefined"==typeof b)b=this._.focusList.length,this._.focusList.push(new m(this,a,b));else{this._.focusList.splice(b,0,new m(this,a,b));for(var c=b+1;c<this._.focusList.length;c++)this._.focusList[c].focusIndex++}},setState:function(a){if(this.state!=a){this.state=a;if(a==CKEDITOR.DIALOG_STATE_BUSY){if(!this.parts.spinner){var b=this.getParentEditor().lang.dir,c={attributes:{"class":"cke_dialog_spinner"},styles:{"float":"rtl"==b?"right":"left"}};c.styles["margin-"+("rtl"==b?"left":"right")]=
"8px";this.parts.spinner=CKEDITOR.document.createElement("div",c);this.parts.spinner.setHtml("\x26#8987;");this.parts.spinner.appendTo(this.parts.title,1)}this.parts.spinner.show();this.getButton("ok")&&this.getButton("ok").disable()}else a==CKEDITOR.DIALOG_STATE_IDLE&&(this.parts.spinner&&this.parts.spinner.hide(),this.getButton("ok")&&this.getButton("ok").enable());this.fire("state",a)}},getModel:function(a){return this._.model?this._.model:this.definition.getModel?this.definition.getModel(a):null},
setModel:function(a){this._.model=a},getMode:function(a){if(this.definition.getMode)return this.definition.getMode(a);a=this.getModel(a);return!a||a instanceof CKEDITOR.dom.element&&!a.getParent()?CKEDITOR.dialog.CREATION_MODE:CKEDITOR.dialog.EDITING_MODE}};CKEDITOR.tools.extend(CKEDITOR.dialog,{CREATION_MODE:0,EDITING_MODE:1,add:function(a,b){this._.dialogDefinitions[a]&&"function"!=typeof b||(this._.dialogDefinitions[a]=b)},exists:function(a){return!!this._.dialogDefinitions[a]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},
isTabEnabled:function(a,b,c){a=a.config.removeDialogTabs;return!(a&&a.match(new RegExp("(?:^|;)"+b+":"+c+"(?:$|;)","i")))},okButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"ok",type:"button",label:a.lang.common.ok,"class":"cke_dialog_ui_button_ok",onClick:function(a){a=a.data.dialog;!1!==a.fire("ok",{hide:!0}).hide&&a.hide()}},b,!0)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},!0)};return a}(),cancelButton:function(){var a=
function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"cancel",type:"button",label:a.lang.common.cancel,"class":"cke_dialog_ui_button_cancel",onClick:function(a){a=a.data.dialog;!1!==a.fire("cancel",{hide:!0}).hide&&a.hide()}},b,!0)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},!0)};return a}(),addUIElement:function(a,b){this._.uiElementBuilders[a]=b}});CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};
CKEDITOR.event.implementOn(CKEDITOR.dialog);CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);D={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]};var G=function(a,b,c){for(var d=0,f;f=a[d];d++)if(f.id==b||c&&f[c]&&(f=G(f[c],b,c)))return f;return null},N=function(a,b,c,d,f){if(c){for(var g=0,k;k=a[g];g++){if(k.id==c)return a.splice(g,0,b),b;if(d&&k[d]&&(k=N(k[d],b,c,d,!0)))return k}if(f)return null}a.push(b);return b},
J=function(a,b,c){for(var d=0,f;f=a[d];d++){if(f.id==b)return a.splice(d,1);if(c&&f[c]&&(f=J(f[c],b,c)))return f}return null};k.prototype={getContents:function(a){return G(this.contents,a)},getButton:function(a){return G(this.buttons,a)},addContents:function(a,b){return N(this.contents,a,b)},addButton:function(a,b){return N(this.buttons,a,b)},removeContents:function(a){J(this.contents,a)},removeButton:function(a){J(this.buttons,a)}};f.prototype={get:function(a){return G(this.elements,a,"children")},
add:function(a,b){return N(this.elements,a,b,"children")},remove:function(a){J(this.elements,a,"children")}};var E={},P={};(function(){CKEDITOR.ui.dialog={uiElement:function(a,b,c,d,f,g,k){if(!(4>arguments.length)){var e=(d.call?d(b):d)||"div",h=["\x3c",e," "],m=(f&&f.call?f(b):f)||{},l=(g&&g.call?g(b):g)||{},n=(k&&k.call?k.call(this,a,b):k)||"",r=this.domId=l.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(m.display="none",this.notAllowed=
!0);l.id=r;var p={};b.type&&(p["cke_dialog_ui_"+b.type]=1);b.className&&(p[b.className]=1);b.disabled&&(p.cke_disabled=1);for(var w=l["class"]&&l["class"].split?l["class"].split(" "):[],r=0;r<w.length;r++)w[r]&&(p[w[r]]=1);w=[];for(r in p)w.push(r);l["class"]=w.join(" ");b.title&&(l.title=b.title);p=(b.style||"").split(";");b.align&&(w=b.align,m["margin-left"]="left"==w?0:"auto",m["margin-right"]="right"==w?0:"auto");for(r in m)p.push(r+":"+m[r]);b.hidden&&p.push("display:none");for(r=p.length-1;0<=
r;r--)""===p[r]&&p.splice(r,1);0<p.length&&(l.style=(l.style?l.style+"; ":"")+p.join("; "));for(r in l)h.push(r+'\x3d"'+CKEDITOR.tools.htmlEncode(l[r])+'" ');h.push("\x3e",n,"\x3c/",e,"\x3e");c.push(h.join(""));(this._||(this._={})).dialog=a;"boolean"==typeof b.isChanged&&(this.isChanged=function(){return b.isChanged});"function"==typeof b.isChanged&&(this.isChanged=b.isChanged);"function"==typeof b.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(a){return function(c){a.call(this,
b.setValue.call(this,c))}}));"function"==typeof b.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,function(a){return function(){return b.getValue.call(this,a.call(this))}}));CKEDITOR.event.implementOn(this);this.registerEvents(b);this.accessKeyUp&&this.accessKeyDown&&b.accessKey&&A(this,a,"CTRL+"+b.accessKey);var t=this;a.on("load",function(){var b=t.getInputElement();if(b){var c=t.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?"cke_dialog_ui_focused":"";b.on("focus",
function(){a._.tabBarMode=!1;a._.hasFocus=!0;t.fire("focus");c&&this.addClass(c)});b.on("blur",function(){t.fire("blur");c&&this.removeClass(c)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex=b.tabIndex||0,this.focusIndex=a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=t.focusIndex}))}},hbox:function(a,b,c,d,f){if(!(4>arguments.length)){this._||(this._={});var g=this._.children=b,k=f&&f.widths||null,e=f&&f.height||null,h,m={role:"presentation"};
f&&f.align&&(m.align=f.align);CKEDITOR.ui.dialog.uiElement.call(this,a,f||{type:"hbox"},d,"table",{},m,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(h=0;h<c.length;h++){var b="cke_dialog_ui_hbox_child",d=[];0===h&&(b="cke_dialog_ui_hbox_first");h==c.length-1&&(b="cke_dialog_ui_hbox_last");a.push('\x3ctd class\x3d"',b,'" role\x3d"presentation" ');k?k[h]&&d.push("width:"+B(k[h])):d.push("width:"+Math.floor(100/c.length)+"%");e&&d.push("height:"+B(e));f&&void 0!==f.padding&&
d.push("padding:"+B(f.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&g[h].align&&d.push("text-align:"+g[h].align);0<d.length&&a.push('style\x3d"'+d.join("; ")+'" ');a.push("\x3e",c[h],"\x3c/td\x3e")}a.push("\x3c/tr\x3e\x3c/tbody\x3e");return a.join("")})}},vbox:function(a,b,c,d,f){if(!(3>arguments.length)){this._||(this._={});var g=this._.children=b,k=f&&f.width||null,e=f&&f.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,f||{type:"vbox"},d,"div",null,{role:"presentation"},function(){var b=
['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];b.push('style\x3d"');f&&f.expand&&b.push("height:100%;");b.push("width:"+B(k||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(f&&f.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var d=0;d<c.length;d++){var h=[];b.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');k&&h.push("width:"+B(k||"100%"));e?h.push("height:"+
B(e[d])):f&&f.expand&&h.push("height:"+Math.floor(100/c.length)+"%");f&&void 0!==f.padding&&h.push("padding:"+B(f.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&g[d].align&&h.push("text-align:"+g[d].align);0<h.length&&b.push('style\x3d"',h.join("; "),'" ');b.push(' class\x3d"cke_dialog_ui_vbox_child"\x3e',c[d],"\x3c/td\x3e\x3c/tr\x3e")}b.push("\x3c/tbody\x3e\x3c/table\x3e");return b.join("")})}}}})();CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},
getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(a,b){this.getInputElement().setValue(a);!b&&this.fire("change",{value:a});return this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var a=this.getInputElement();(a=a.getParent())&&-1==a.$.className.search("cke_dialog_page_contents"););if(!a)return this;a=a.getAttribute("name");this._.dialog._.currentTabId!=
a&&this._.dialog.selectPage(a);return this},focus:function(){this.selectParentTab().getInputElement().focus();return this},registerEvents:function(a){var b=/^on([A-Z]\w+)/,c,d=function(a,b,c,d){b.on("load",function(){a.getInputElement().on(c,d,a)})},f;for(f in a)if(c=f.match(b))this.eventProcessors[f]?this.eventProcessors[f].call(this,this._.dialog,a[f]):d(this,this._.dialog,c[1].toLowerCase(),a[f]);return this},eventProcessors:{onLoad:function(a,b){a.on("load",b,this)},onShow:function(a,b){a.on("show",
b,this)},onHide:function(a,b){a.on("hide",b,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var a=this.getElement();this.getInputElement().setAttribute("disabled","true");a.addClass("cke_disabled")},enable:function(){var a=this.getElement();this.getInputElement().removeAttribute("disabled");a.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},
isFocusable:function(){return this.isEnabled()&&this.isVisible()?!0:!1}};CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(a){if(1>arguments.length)return this._.children.concat();a.splice||(a=[a]);return 2>a.length?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,
b,c){for(var d=b.children,f,g=[],k=[],e=0;e<d.length&&(f=d[e]);e++){var h=[];g.push(h);k.push(CKEDITOR.dialog._.uiElementBuilders[f.type].build(a,f,h))}return new CKEDITOR.ui.dialog[b.type](a,k,g,c,b)}};CKEDITOR.dialog.addUIElement("hbox",a);CKEDITOR.dialog.addUIElement("vbox",a)})();CKEDITOR.dialogCommand=function(a,b){this.dialogName=a;CKEDITOR.tools.extend(this,b,!0)};CKEDITOR.dialogCommand.prototype={exec:function(a){var b=this.tabId;a.openDialog(this.dialogName,function(a){b&&a.selectPage(b)})},
canUndo:!1,editorFocus:1};(function(){var a=/^\d*$/,b=/^\d*(?:\.\d+)?$/,c=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,d=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,f=/^(--|-?([a-zA-Z_]|\\))(\\|[a-zA-Z0-9-_])*\s*?:\s*?[^:;]+$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_AND=2;CKEDITOR.dialog.validate={functions:function(){var a=arguments;return function(b){this&&this.getValue&&(b=this.getValue());var c,d=CKEDITOR.VALIDATE_AND,f=[],g;for(g=0;g<a.length;g++)if("function"==typeof a[g])f.push(a[g]);
else break;g<a.length&&"string"==typeof a[g]&&(c=a[g],g++);g<a.length&&"number"==typeof a[g]&&(d=a[g]);g=d==CKEDITOR.VALIDATE_AND;for(var k=0;k<f.length;k++){var e=!0===f[k](b);g=d==CKEDITOR.VALIDATE_AND?g&&e:g||e}return g?!0:c}},regex:function(a,b){return this.functions(function(b){return a.test(b)},b)},notEmpty:function(a){return this.functions(function(a){return 0<a.replace(RegExp("^[\\u0020\\u00a0\\u1680\\u202f\\u205f\\u3000\\u2000-\\u200a\\s]+|[\\u0020\\u00a0\\u1680\\u202f\\u205f\\u3000\\u2000-\\u200a\\s]+$",
"g"),"").length},a)},integer:function(b){return this.regex(a,b)},number:function(a){return this.regex(b,a)},cssLength:function(a){return this.functions(function(a){return d.test(CKEDITOR.tools.trim(a))},a)},htmlLength:function(a){return this.functions(function(a){return c.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(function(a){a=CKEDITOR.tools.trim(a).split(";");""===a[a.length-1]&&a.pop();return CKEDITOR.tools.array.every(a,function(a){return f.test(CKEDITOR.tools.trim(a))})},
a)},equals:function(a,b){return this.functions(function(b){return b==a},b)},notEqual:function(a,b){return this.functions(function(b){return b!=a},b)}};CKEDITOR.on("instanceDestroyed",function(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var b;b=CKEDITOR.dialog._.currentTop;)b.hide();for(var c in E)E[c].remove();E={}}a=a.editor._.storedDialogs;for(var d in a)a[d].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b,c){var d=null,f=CKEDITOR.dialog._.dialogDefinitions[a];
null===CKEDITOR.dialog._.currentTop&&q(this);if("function"==typeof f)f=this._.storedDialogs||(this._.storedDialogs={}),d=f[a]||(f[a]=new CKEDITOR.dialog(this,a)),d.setModel(c),b&&b.call(d,d),d.show();else{if("failed"==f)throw t(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');"string"==typeof f&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(f),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[a]&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed");
this.openDialog(a,b,c)},this,0,1)}CKEDITOR.skin.loadPart("dialog");if(d)d.once("hide",function(){d.setModel(null)},null,null,999);return d}});CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(a){H||(CKEDITOR.document.appendStyleSheet(this.path+"styles/dialog.css"),H=!0);a.on("doubleclick",function(b){b.data.dialog&&a.openDialog(b.data.dialog)},null,null,999)}})}(),function(){CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,
"de-ch":1,el:1,en:1,"en-au":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fo:1,fr:1,"fr-ca":1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},init:function(a){var h=this;a.addCommand("a11yHelp",{exec:function(){var e=a.langCode,e=h.availableLangs[e]?e:h.availableLangs[e.replace(/-.*/,"")]?e.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(h.path+
"dialogs/lang/"+e+".js"),function(){a.lang.a11yhelp=h.langEntries[e];a.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:!1});a.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js");a.on("ariaEditorHelpLabel",function(e){e.data.label=a.lang.common.editorHelp})}})}(),CKEDITOR.plugins.add("about",{requires:"dialog",init:function(a){var h=a.addCommand("about",new CKEDITOR.dialogCommand("about"));h.modes={wysiwyg:1,source:1};h.canUndo=
!1;h.readOnly=1;a.ui.addButton&&a.ui.addButton("About",{label:a.lang.about.dlgTitle,command:"about",toolbar:"about"});CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}}),CKEDITOR.plugins.add("basicstyles",{init:function(a){var h=0,e=function(d,e,c,k){if(k){k=new CKEDITOR.style(k);var f=b[c];f.unshift(k);a.attachStyleStateChange(k,function(b){!a.readOnly&&a.getCommand(c).setState(b)});a.addCommand(c,new CKEDITOR.styleCommand(k,{contentForms:f}));a.ui.addButton&&a.ui.addButton(d,{isToggle:!0,
label:e,command:c,toolbar:"basicstyles,"+(h+=10)})}},b={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"==a.styles["font-style"]}]],underline:["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]],strike:["s","strike",["span",function(a){return"line-through"==a.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},d=a.config,l=a.lang.basicstyles;e("Bold",l.bold,"bold",
d.coreStyles_bold);e("Italic",l.italic,"italic",d.coreStyles_italic);e("Underline",l.underline,"underline",d.coreStyles_underline);e("Strike",l.strike,"strike",d.coreStyles_strike);e("Subscript",l.subscript,"subscript",d.coreStyles_subscript);e("Superscript",l.superscript,"superscript",d.coreStyles_superscript);a.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])},afterInit:function(a){if(a.config.coreStyles_toggleSubSup){var h=a.getCommand("subscript"),
e=a.getCommand("superscript");if(h&&e)a.on("afterCommandExec",function(b){b=b.data.name;if("subscript"===b||"superscript"===b){var d="subscript"===b?e:h;("subscript"===b?h:e).state===CKEDITOR.TRISTATE_ON&&d.state===CKEDITOR.TRISTATE_ON&&(d.exec(a),a.fire("updateSnapshot"))}})}}}),CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"},CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"},CKEDITOR.config.coreStyles_underline={element:"u"},CKEDITOR.config.coreStyles_strike={element:"s",
overrides:"strike"},CKEDITOR.config.coreStyles_subscript={element:"sub"},CKEDITOR.config.coreStyles_superscript={element:"sup"},CKEDITOR.config.coreStyles_toggleSubSup=!1,function(){function a(a,b,c,d){if(!a.isReadOnly()&&!a.equals(c.editable())){CKEDITOR.dom.element.setMarker(d,a,"bidi_processed",1);d=a;for(var g=c.editable();(d=d.getParent())&&!d.equals(g);)if(d.getCustomData("bidi_processed")){a.removeStyle("direction");a.removeAttribute("dir");return}d=c.config.useComputedState;(d?a.getComputedStyle("direction"):
a.getStyle("direction")||a.hasAttribute("dir"))!=b&&(a.removeStyle("direction"),d?(a.removeAttribute("dir"),b!=a.getComputedStyle("direction")&&a.setAttribute("dir",b)):a.setAttribute("dir",b),c.forceNextSelectionCheck())}}function h(a,b,c){var d=a.getCommonAncestor(!1,!0);a=a.clone();a.enlarge(c==CKEDITOR.ENTER_BR?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(a.checkBoundaryOfElement(d,CKEDITOR.START)&&a.checkBoundaryOfElement(d,CKEDITOR.END)){for(var g;d&&d.type==CKEDITOR.NODE_ELEMENT&&
(g=d.getParent())&&1==g.getChildCount()&&!(d.getName()in b);)d=g;return d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in b&&d}}function e(b){return{context:"p",allowedContent:{"h1 h2 h3 h4 h5 h6 table ul ol blockquote div tr p div li td":{propertiesOnly:!0,attributes:"dir"}},requiredContent:"p[dir]",refresh:function(a,b){var c=a.config.useComputedState,d;if(!c){d=b.lastElement;for(var f=a.editable();d&&!(d.getName()in g||d.equals(f));){var k=d.getParent();if(!k)break;d=k}}d=d||b.block||b.blockLimit;d.equals(a.editable())&&
(f=a.getSelection().getRanges()[0].getEnclosedNode())&&f.type==CKEDITOR.NODE_ELEMENT&&(d=f);d&&(c=c?d.getComputedStyle("direction"):d.getStyle("direction")||d.getAttribute("dir"),a.getCommand("bidirtl").setState("rtl"==c?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),a.getCommand("bidiltr").setState("ltr"==c?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF));c=(b.block||b.blockLimit||a.editable()).getDirection(1);c!=(a._.selDir||a.lang.dir)&&(a._.selDir=c,a.fire("contentDirChanged",c))},exec:function(c){var g=
c.getSelection(),k=c.config.enterMode,e=g.getRanges();if(e&&e.length){for(var m={},t=g.createBookmarks(),e=e.createIterator(),z,p=0;z=e.getNextRange(1);){var A=z.getEnclosedNode();A&&(!A||A.type==CKEDITOR.NODE_ELEMENT&&A.getName()in l)||(A=h(z,d,k));A&&a(A,b,c,m);var y=new CKEDITOR.dom.walker(z),x=t[p].startNode,w=t[p++].endNode;y.evaluator=function(a){var b=k==CKEDITOR.ENTER_P?"p":"div",c;if(c=(a?a.type==CKEDITOR.NODE_ELEMENT:!1)&&a.getName()in d){if(b=a.is(b))b=(b=a.getParent())?b.type==CKEDITOR.NODE_ELEMENT:
!1;c=!(b&&a.getParent().is("blockquote"))}return!!(c&&a.getPosition(x)&CKEDITOR.POSITION_FOLLOWING&&(a.getPosition(w)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_CONTAINS)==CKEDITOR.POSITION_PRECEDING)};for(;A=y.next();)a(A,b,c,m);z=z.createIterator();for(z.enlargeBr=k!=CKEDITOR.ENTER_BR;A=z.getNextParagraph(k==CKEDITOR.ENTER_P?"p":"div");)a(A,b,c,m)}CKEDITOR.dom.element.clearAllMarkers(m);c.forceNextSelectionCheck();g.selectBookmarks(t);c.focus()}}}}function b(a){var b=a==m.setAttribute,c=a==m.removeAttribute,
d=/\bdirection\s*:\s*(.*?)\s*(:?$|;)/;return function(g,k){if(!this.isReadOnly()){var e;if(e=g==(b||c?"dir":"direction")||"style"==g&&(c||d.test(k))){a:{e=this;for(var h=e.getDocument().getBody().getParent();e;){if(e.equals(h)){e=!1;break a}e=e.getParent()}e=!0}e=!e}if(e&&(e=this.getDirection(1),h=a.apply(this,arguments),e!=this.getDirection(1)))return this.getDocument().fire("dirChanged",this),h}return a.apply(this,arguments)}}var d={table:1,ul:1,ol:1,blockquote:1,div:1},l={},g={};CKEDITOR.tools.extend(l,
d,{tr:1,p:1,div:1,li:1});CKEDITOR.tools.extend(g,l,{td:1});CKEDITOR.plugins.add("bidi",{init:function(a){function b(c,d,g,k,e){a.addCommand(g,new CKEDITOR.command(a,k));a.ui.addButton&&a.ui.addButton(c,{isToggle:!0,label:d,command:g,toolbar:"bidi,"+e})}if(!a.blockless){var c=a.lang.bidi;b("BidiLtr",c.ltr,"bidiltr",e("ltr"),10);b("BidiRtl",c.rtl,"bidirtl",e("rtl"),20);a.on("contentDom",function(){a.document.on("dirChanged",function(b){a.fire("dirChanged",{node:b.data,dir:b.data.getDirection(1)})})});
a.on("contentDirChanged",function(b){b=(a.lang.dir!=b.data?"add":"remove")+"Class";var c=a.ui.space(a.config.toolbarLocation);if(c)c[b]("cke_mixed_dir_content")})}}});for(var m=CKEDITOR.dom.element.prototype,c=["setStyle","removeStyle","setAttribute","removeAttribute"],k=0;k<c.length;k++)m[c[k]]=CKEDITOR.tools.override(m[c[k]],b)}(),function(){var a={exec:function(a){var e=a.getCommand("blockquote").state,b=a.getSelection(),d=b&&b.getRanges()[0];if(d){var l=b.createBookmarks();if(CKEDITOR.env.ie){var g=
l[0].startNode,m=l[0].endNode,c;if(g&&"blockquote"==g.getParent().getName())for(c=g;c=c.getNext();)if(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()){g.move(c,!0);break}if(m&&"blockquote"==m.getParent().getName())for(c=m;c=c.getPrevious();)if(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()){m.move(c);break}}var k=d.createIterator();k.enlargeBr=a.config.enterMode!=CKEDITOR.ENTER_BR;if(e==CKEDITOR.TRISTATE_OFF){for(g=[];e=k.getNextParagraph();)g.push(e);1>g.length&&(e=a.document.createElement(a.config.enterMode==
CKEDITOR.ENTER_P?"p":"div"),m=l.shift(),d.insertNode(e),e.append(new CKEDITOR.dom.text("﻿",a.document)),d.moveToBookmark(m),d.selectNodeContents(e),d.collapse(!0),m=d.createBookmark(),g.push(e),l.unshift(m));c=g[0].getParent();d=[];for(m=0;m<g.length;m++)e=g[m],c=c.getCommonAncestor(e.getParent());for(e={table:1,tbody:1,tr:1,ol:1,ul:1};e[c.getName()];)c=c.getParent();for(m=null;0<g.length;){for(e=g.shift();!e.getParent().equals(c);)e=e.getParent();e.equals(m)||d.push(e);m=e}for(;0<d.length;)if(e=
d.shift(),"blockquote"==e.getName()){for(m=new CKEDITOR.dom.documentFragment(a.document);e.getFirst();)m.append(e.getFirst().remove()),g.push(m.getLast());m.replace(e)}else g.push(e);d=a.document.createElement("blockquote");for(d.insertBefore(g[0]);0<g.length;)e=g.shift(),d.append(e)}else if(e==CKEDITOR.TRISTATE_ON){m=[];for(c={};e=k.getNextParagraph();){for(g=d=null;e.getParent();){if("blockquote"==e.getParent().getName()){d=e.getParent();g=e;break}e=e.getParent()}d&&g&&!g.getCustomData("blockquote_moveout")&&
(m.push(g),CKEDITOR.dom.element.setMarker(c,g,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(c);e=[];g=[];for(c={};0<m.length;)k=m.shift(),d=k.getParent(),k.getPrevious()?k.getNext()?(k.breakParent(k.getParent()),g.push(k.getNext())):k.remove().insertAfter(d):k.remove().insertBefore(d),d.getCustomData("blockquote_processed")||(g.push(d),CKEDITOR.dom.element.setMarker(c,d,"blockquote_processed",!0)),e.push(k);CKEDITOR.dom.element.clearAllMarkers(c);for(m=g.length-1;0<=m;m--){d=g[m];
a:{c=d;for(var k=0,f=c.getChildCount(),n=void 0;k<f&&(n=c.getChild(k));k++)if(n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()){c=!1;break a}c=!0}c&&d.remove()}if(a.config.enterMode==CKEDITOR.ENTER_BR)for(d=!0;e.length;)if(k=e.shift(),"div"==k.getName()){m=new CKEDITOR.dom.documentFragment(a.document);!d||!k.getPrevious()||k.getPrevious().type==CKEDITOR.NODE_ELEMENT&&k.getPrevious().isBlockBoundary()||m.append(a.document.createElement("br"));for(d=k.getNext()&&!(k.getNext().type==CKEDITOR.NODE_ELEMENT&&
k.getNext().isBlockBoundary());k.getFirst();)k.getFirst().remove().appendTo(m);d&&m.append(a.document.createElement("br"));m.replace(k);d=!1}}b.selectBookmarks(l);a.focus()}},refresh:function(a,e){this.setState(a.elementPath(e.block||e.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(h){h.blockless||(h.addCommand("blockquote",a),h.ui.addButton&&
h.ui.addButton("Blockquote",{isToggle:!0,label:h.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})}(),"use strict",function(){function a(a,b){CKEDITOR.tools.extend(this,b,{editor:a,id:"cke-"+CKEDITOR.tools.getUniqueId(),area:a._.notificationArea});b.type||(this.type="info");this.element=this._createElement();a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element)}function h(a){var b=this;this.editor=a;this.notifications=[];this.element=this._createElement();
this._uiBuffer=CKEDITOR.tools.eventsBuffer(10,this._layout,this);this._changeBuffer=CKEDITOR.tools.eventsBuffer(500,this._layout,this);a.on("destroy",function(){b._removeListeners();b.element.remove()})}CKEDITOR.plugins.add("notification",{init:function(a){function b(a){var b=new CKEDITOR.dom.element("div");b.setStyles({position:"fixed","margin-left":"-9999px"});b.setAttributes({"aria-live":"assertive","aria-atomic":"true"});b.setText(a);CKEDITOR.document.getBody().append(b);setTimeout(function(){b.remove()},
100)}a._.notificationArea=new h(a);a.showNotification=function(b,h,g){var m,c;"progress"==h?m=g:c=g;b=new CKEDITOR.plugins.notification(a,{message:b,type:h,progress:m,duration:c});b.show();return b};a.on("key",function(d){if(27==d.data.keyCode){var h=a._.notificationArea.notifications;h.length&&(b(a.lang.notification.closed),h[h.length-1].hide(),d.cancel())}})}});a.prototype={show:function(){!1!==this.editor.fire("notificationShow",{notification:this})&&(this.area.add(this),this._hideAfterTimeout())},
update:function(a){var b=!0;!1===this.editor.fire("notificationUpdate",{notification:this,options:a})&&(b=!1);var d=this.element,h=d.findOne(".cke_notification_message"),g=d.findOne(".cke_notification_progress"),m=a.type;d.removeAttribute("role");a.progress&&"progress"!=this.type&&(m="progress");m&&(d.removeClass(this._getClass()),d.removeAttribute("aria-label"),this.type=m,d.addClass(this._getClass()),d.setAttribute("aria-label",this.type),"progress"!=this.type||g?"progress"!=this.type&&g&&g.remove():
(g=this._createProgressElement(),g.insertBefore(h)));void 0!==a.message&&(this.message=a.message,h.setHtml(this.message));void 0!==a.progress&&(this.progress=a.progress,g&&g.setStyle("width",this._getPercentageProgress()));b&&a.important&&(d.setAttribute("role","alert"),this.isVisible()||this.area.add(this));this.duration=a.duration;this._hideAfterTimeout()},hide:function(){!1!==this.editor.fire("notificationHide",{notification:this})&&this.area.remove(this)},isVisible:function(){return 0<=CKEDITOR.tools.indexOf(this.area.notifications,
this)},_createElement:function(){var a=this,b,d,h=this.editor.lang.common.close;b=new CKEDITOR.dom.element("div");b.addClass("cke_notification");b.addClass(this._getClass());b.setAttributes({id:this.id,role:"alert","aria-label":this.type});"progress"==this.type&&b.append(this._createProgressElement());d=new CKEDITOR.dom.element("p");d.addClass("cke_notification_message");d.setHtml(this.message);b.append(d);d=CKEDITOR.dom.element.createFromHtml('\x3ca class\x3d"cke_notification_close" href\x3d"javascript:void(0)" title\x3d"'+
h+'" role\x3d"button" tabindex\x3d"-1"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e');b.append(d);d.on("click",function(){a.editor.focus();a.hide()});return b},_getClass:function(){return"progress"==this.type?"cke_notification_info":"cke_notification_"+this.type},_createProgressElement:function(){var a=new CKEDITOR.dom.element("span");a.addClass("cke_notification_progress");a.setStyle("width",this._getPercentageProgress());return a},_getPercentageProgress:function(){return Math.round(100*
(this.progress||0))+"%"},_hideAfterTimeout:function(){var a=this,b;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId);if("number"==typeof this.duration)b=this.duration;else if("info"==this.type||"success"==this.type)b="number"==typeof this.editor.config.notification_duration?this.editor.config.notification_duration:5E3;b&&(a._hideTimeoutId=setTimeout(function(){a.hide()},b))}};h.prototype={add:function(a){this.notifications.push(a);this.element.append(a.element);1==this.element.getChildCount()&&
(CKEDITOR.document.getBody().append(this.element),this._attachListeners());this._layout()},remove:function(a){var b=CKEDITOR.tools.indexOf(this.notifications,a);0>b||(this.notifications.splice(b,1),a.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var a=this.editor,b=a.config,d=new CKEDITOR.dom.element("div");d.addClass("cke_notifications_area");d.setAttribute("id","cke_notifications_area_"+a.name);d.setStyle("z-index",b.baseFloatZIndex-
2);return d},_attachListeners:function(){var a=CKEDITOR.document.getWindow(),b=this.editor;a.on("scroll",this._uiBuffer.input);a.on("resize",this._uiBuffer.input);b.on("change",this._changeBuffer.input);b.on("floatingSpaceLayout",this._layout,this,null,20);b.on("blur",this._layout,this,null,20)},_removeListeners:function(){var a=CKEDITOR.document.getWindow(),b=this.editor;a.removeListener("scroll",this._uiBuffer.input);a.removeListener("resize",this._uiBuffer.input);b.removeListener("change",this._changeBuffer.input);
b.removeListener("floatingSpaceLayout",this._layout);b.removeListener("blur",this._layout)},_layout:function(){function a(){b.setStyle("left",z(p+h.width-n-r))}var b=this.element,d=this.editor,h=d.ui.contentsElement.getClientRect(),g=d.ui.contentsElement.getDocumentPosition(),m,c,k=b.getClientRect(),f,n=this._notificationWidth,r=this._notificationMargin;f=CKEDITOR.document.getWindow();var v=f.getScrollPosition(),u=f.getViewPaneSize(),q=CKEDITOR.document.getBody(),t=q.getDocumentPosition(),z=CKEDITOR.tools.cssLength;
n&&r||(f=this.element.getChild(0),n=this._notificationWidth=f.getClientRect().width,r=this._notificationMargin=parseInt(f.getComputedStyle("margin-left"),10)+parseInt(f.getComputedStyle("margin-right"),10));d.toolbar&&(m=d.ui.space(d.config.toolbarLocation),c=m.getClientRect());m&&m.isVisible()&&c.bottom>h.top&&c.bottom<h.bottom-k.height?b.setStyles({position:"fixed",top:z(c.bottom)}):0<h.top?b.setStyles({position:"absolute",top:z(g.y)}):g.y+h.height-k.height>v.y?b.setStyles({position:"fixed",top:0}):
b.setStyles({position:"absolute",top:z(g.y+h.height-k.height)});var p="fixed"==b.getStyle("position")?h.left:"static"!=q.getComputedStyle("position")?g.x-t.x:g.x;h.width<n+r?g.x+n+r>v.x+u.width?a():b.setStyle("left",z(p)):g.x+n+r>v.x+u.width?b.setStyle("left",z(p)):g.x+h.width/2+n/2+r>v.x+u.width?b.setStyle("left",z(p-g.x+v.x+u.width-n-r)):0>h.left+h.width-n-r?a():0>h.left+h.width/2-n/2?b.setStyle("left",z(p-g.x+v.x)):b.setStyle("left",z(p+h.width/2-n/2-r/2))}};CKEDITOR.plugins.notification=a}(),
function(){var a='\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' title\x3d"{title}" tabindex\x3d"-1" hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasArrow}" aria-disabled\x3d"{ariaDisabled}"{hasArrowAriaHtml}{toggleAriaHtml}';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(a+=' onkeypress\x3d"return false;"');
CKEDITOR.env.gecko&&(a+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var h="";CKEDITOR.env.ie&&(h='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var a=a+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+h+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"')+
'\x3e\x26nbsp;\x3c/span\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_button_label cke_button__{name}_label" aria-hidden\x3d"false"\x3e{label}\x3c/span\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_button_label" aria-hidden\x3d"false"\x3e{ariaShortcutSpace}{ariaShortcut}\x3c/span\x3e{arrowHtml}\x3c/a\x3e',e=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),b=CKEDITOR.addTemplate("button",a);CKEDITOR.plugins.add("button",
{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{isToggle:a.isToggle||!1,title:a.label,click:a.click||function(b){b.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};CKEDITOR.ui.button.prototype={render:function(a,h){function g(){var b=a.mode;b&&(b=this.modes[b]?void 0!==m[b]?m[b]:CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED,b=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:b,this.setState(b),this.refresh&&this.refresh())}var m=null,c=CKEDITOR.env,k=this._.id=CKEDITOR.tools.getNextId(),f="",n=this.command,r,v,u;this._.editor=a;var q={id:k,button:this,editor:a,focus:function(){CKEDITOR.document.getById(k).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}},t=CKEDITOR.tools.addFunction(function(a){if(q.onkey)return a=new CKEDITOR.dom.event(a),!1!==
q.onkey(q,a.getKeystroke())}),z=CKEDITOR.tools.addFunction(function(a){var b;q.onfocus&&(b=!1!==q.onfocus(q,new CKEDITOR.dom.event(a)));return b}),p=0;q.clickFn=r=CKEDITOR.tools.addFunction(function(){p&&(a.unlockSelection(1),p=0);q.execute();c.iOS&&a.focus()});this.modes?(m={},a.on("beforeModeUnload",function(){a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(m[a.mode]=this._.state)},this),a.on("activeFilterChange",g,this),a.on("mode",g,this),!this.readOnly&&a.on("readOnly",g,this)):n&&(n=a.getCommand(n))&&
(n.on("state",function(){this.setState(n.state)},this),f+=n.state==CKEDITOR.TRISTATE_ON?"on":n.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var A;if(this.directional)a.on("contentDirChanged",function(b){var c=CKEDITOR.document.getById(this._.id),f=c.getFirst();b=b.data;b!=a.lang.dir?c.addClass("cke_"+b):c.removeClass("cke_ltr").removeClass("cke_rtl");f.setAttribute("style",CKEDITOR.skin.getIconStyle(A,"rtl"==b,this.icon,this.iconOffset))},this);n?(v=a.getCommandKeystroke(n))&&(u=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,
v)):f+="off";v=this.name||this.command;var y=null,x=this.icon;A=v;this.icon&&!/\./.test(this.icon)?(A=this.icon,x=null):(this.icon&&(y=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(y=this.iconHiDpi));y?(CKEDITOR.skin.addIcon(y,y),x=null):y=A;f={id:k,name:v,iconName:A,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:f,ariaDisabled:"disabled"==f?"true":"false",title:this.title+(u?" ("+u.display+")":""),ariaShortcutSpace:u?"\x26nbsp;":"",ariaShortcut:u?a.lang.common.keyboardShortcut+
" "+u.aria:"",titleJs:c.gecko&&!c.hc?"":(this.title||"").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:t,focusFn:z,clickFn:r,style:CKEDITOR.skin.getIconStyle(y,"rtl"==a.lang.dir,x,this.iconOffset),arrowHtml:this.hasArrow?e.output():"",hasArrowAriaHtml:this.hasArrow?' aria-expanded\x3d"false"':"",toggleAriaHtml:this.isToggle?'aria-pressed\x3d"false"':""};b.output(f,h);if(this.onRender)this.onRender();return q},setState:function(a){if(this._.state==
a)return!1;this._.state=a;var b=CKEDITOR.document.getById(this._.id);return b?(b.setState(a,"cke_button"),b.setAttribute("aria-disabled",a==CKEDITOR.TRISTATE_DISABLED),this.isToggle&&!this.hasArrow&&b.setAttribute("aria-pressed",a===CKEDITOR.TRISTATE_ON),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var b=this;this.allowedContent||this.requiredContent||!this.command||(b=a.getCommand(this.command)||b);return this._.feature=b}};CKEDITOR.ui.prototype.addButton=
function(a,b){this.add(a,CKEDITOR.UI_BUTTON,b)}}(),function(){function a(a){function b(){for(var c=g(),f=CKEDITOR.tools.clone(a.config.toolbarGroups)||h(a),k=0;k<f.length;k++){var l=f[k];if("/"!=l){"string"==typeof l&&(l=f[k]={name:l});var q,t=l.groups;if(t)for(var z=0;z<t.length;z++)q=t[z],(q=c[q])&&e(l,q);(q=c[l.name])&&e(l,q)}}return f}function g(){var b={},c,f,g;for(c in a.ui.items)f=a.ui.items[c],g=f.toolbar||"others",g=g.split(","),f=g[0],g=parseInt(g[1]||-1,10),b[f]||(b[f]=[]),b[f].push({name:c,
order:g});for(f in b)b[f]=b[f].sort(function(a,b){return a.order==b.order?0:0>b.order?-1:0>a.order?1:a.order<b.order?-1:1});return b}function e(b,c){if(c.length){b.items?b.items.push(a.ui.create("-")):b.items=[];for(var f;f=c.shift();)f="string"==typeof f?f:f.name,k&&-1!=CKEDITOR.tools.indexOf(k,f)||(f=a.ui.create(f))&&a.addFeature(f)&&b.items.push(f)}}function c(a){var b=[],c,d,f;for(c=0;c<a.length;++c)d=a[c],f={},"/"==d?b.push(d):CKEDITOR.tools.isArray(d)?(e(f,CKEDITOR.tools.clone(d)),b.push(f)):
d.items&&(e(f,CKEDITOR.tools.clone(d.items)),f.name=d.name,b.push(f));return b}var k=function(a){return a&&"string"===typeof a?a.split(","):a}(a.config.removeButtons),f=a.config.toolbar;"string"==typeof f&&(f=a.config["toolbar_"+f]);return a.toolbar=f?c(f):b()}function h(a){return a._.toolbarGroups||(a._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},"/",
{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var e=function(){this.toolbars=[]};e.prototype.focus=function(){for(var a=0,b;b=this.toolbars[a++];)for(var g=0,e;e=b.items[g++];)if(e.focus){e.focus();return}};var b={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(a){a.toolbox&&(CKEDITOR.env.ie||CKEDITOR.env.air?
setTimeout(function(){a.toolbox.focus()},100):a.toolbox.focus())}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(d){var h,g=function(a,b){var k,f="rtl"==d.lang.dir,e=d.config.toolbarGroupCycling,r=f?37:39,f=f?39:37,e=void 0===e||e;switch(b){case 9:case CKEDITOR.SHIFT+9:for(;!k||!k.items.length;)if(k=9==b?(k?k.next:a.toolbar.next)||d.toolbox.toolbars[0]:(k?k.previous:a.toolbar.previous)||d.toolbox.toolbars[d.toolbox.toolbars.length-1],k.items.length)for(a=k.items[h?k.items.length-
1:0];a&&!a.focus;)(a=h?a.previous:a.next)||(k=0);a&&a.focus();return!1;case r:k=a;do k=k.next,!k&&e&&(k=a.toolbar.items[0]);while(k&&!k.focus);k?k.focus():g(a,9);return!1;case 40:return a.button&&a.button.hasArrow?a.execute():g(a,40==b?r:f),!1;case f:case 38:k=a;do k=k.previous,!k&&e&&(k=a.toolbar.items[a.toolbar.items.length-1]);while(k&&!k.focus);k?k.focus():(h=1,g(a,CKEDITOR.SHIFT+9),h=0);return!1;case 27:return d.focus(),!1;case 13:case 32:return a.execute(),!1;case CKEDITOR.ALT+122:return d.execCommand("elementsPathFocus"),
!1}return!0};d.on("uiSpace",function(b){if(b.data.space==d.config.toolbarLocation){b.removeListener();d.toolbox=new e;var c=CKEDITOR.tools.getNextId(),k=['\x3cspan id\x3d"',c,'" class\x3d"cke_voice_label"\x3e',d.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+d.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',c,'" onmousedown\x3d"return false;"\x3e'],c=!1!==d.config.toolbarStartupExpanded,f,h;d.config.toolbarCanCollapse&&d.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&
k.push('\x3cspan class\x3d"cke_toolbox_main"'+(c?"\x3e":' style\x3d"display:none"\x3e'));for(var l=d.toolbox.toolbars,v=a(d),u=v.length,q=0;q<u;q++){var t,z=0,p,A=v[q],y="/"!==A&&("/"===v[q+1]||q==u-1),x;if(A)if(f&&(k.push("\x3c/span\x3e"),h=f=0),"/"===A)k.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{x=A.items||A;for(var w=0;w<x.length;w++){var B=x[w],D;if(B){var C=function(a){a=a.render(d,k);H=z.items.push(a)-1;0<H&&(a.previous=z.items[H-1],a.previous.next=a);a.toolbar=z;a.onkey=
g};if(B.type==CKEDITOR.UI_SEPARATOR)h=f&&B;else{D=!1!==B.canGroup;if(!z){t=CKEDITOR.tools.getNextId();z={id:t,items:[]};p=A.name&&(d.lang.toolbar.toolbarGroups[A.name]||A.name);k.push('\x3cspan id\x3d"',t,'" class\x3d"cke_toolbar'+(y?' cke_toolbar_last"':'"'),p?' aria-labelledby\x3d"'+t+'_label"':"",' role\x3d"toolbar"\x3e');p&&k.push('\x3cspan id\x3d"',t,'_label" class\x3d"cke_voice_label"\x3e',p,"\x3c/span\x3e");k.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var H=l.push(z)-1;
0<H&&(z.previous=l[H-1],z.previous.next=z)}D?f||(k.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),f=1):f&&(k.push("\x3c/span\x3e"),f=0);h&&(C(h),h=0);C(B)}}}f&&(k.push("\x3c/span\x3e"),h=f=0);z&&k.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}d.config.toolbarCanCollapse&&k.push("\x3c/span\x3e");if(d.config.toolbarCanCollapse&&d.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var F=CKEDITOR.tools.addFunction(function(){d.execCommand("toolbarCollapse")});
d.on("destroy",function(){CKEDITOR.tools.removeFunction(F)});d.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b=a.ui.space("toolbar_collapser"),c=b.getPrevious(),d=a.ui.space("contents"),f=c.getParent(),g=parseInt(d.$.style.height,10),k=f.$.offsetHeight,e=b.hasClass("cke_toolbox_collapser_min");e?(c.show(),b.removeClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarCollapse)):(c.hide(),b.addClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarExpand));
b.getFirst().setText(e?"▲":"◀");d.setStyle("height",g-(f.$.offsetHeight-k)+"px");a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:d.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});d.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");k.push('\x3ca title\x3d"'+(c?d.lang.toolbar.toolbarCollapse:d.lang.toolbar.toolbarExpand)+'" id\x3d"'+d.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');
c||k.push(" cke_toolbox_collapser_min");k.push('" onclick\x3d"CKEDITOR.tools.callFunction('+F+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',"\x3c/a\x3e")}k.push("\x3c/span\x3e");b.data.html+=k.join("")}});d.on("destroy",function(){if(this.toolbox){var a,b=0,d,f,g;for(a=this.toolbox.toolbars;b<a.length;b++)for(f=a[b].items,d=0;d<f.length;d++)g=f[d],g.clickFn&&CKEDITOR.tools.removeFunction(g.clickFn),g.keyDownFn&&CKEDITOR.tools.removeFunction(g.keyDownFn)}});d.on("uiReady",function(){var a=
d.ui.space("toolbox");a&&d.focusManager.add(a,1)});d.addCommand("toolbarFocus",b);d.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");d.ui.add("-",CKEDITOR.UI_SEPARATOR,{});d.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(a,b){b.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(a,b,g){var e=h(this.editor),c=0===b,k={name:a};if(g){if(g=CKEDITOR.tools.search(e,function(a){return a.name==
g})){!g.groups&&(g.groups=[]);if(b&&(b=CKEDITOR.tools.indexOf(g.groups,b),0<=b)){g.groups.splice(b+1,0,a);return}c?g.groups.splice(0,0,a):g.groups.push(a);return}b=null}b&&(b=CKEDITOR.tools.indexOf(e,function(a){return a.name==b}));c?e.splice(0,0,a):"number"==typeof b?e.splice(b+1,0,k):e.push(a)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top","use strict",function(){function a(a,b,c){b.type||(b.type="auto");if(c&&!1===a.fire("beforePaste",b)||!b.dataValue&&b.dataTransfer.isEmpty())return!1;
b.dataValue||(b.dataValue="");if(CKEDITOR.env.gecko&&"drop"==b.method&&a.toolbox)a.once("afterPaste",function(){a.toolbox.focus();a.focus()});return a.fire("paste",b)}function h(b){function c(){var a=b.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var d=function(a){b.getSelection().isCollapsed()||(b.readOnly&&"cut"==a.name||D.initPasteDataTransfer(a,b),a.data.preventDefault())};a.on("copy",d);a.on("cut",d);a.on("cut",function(){b.readOnly||b.extractSelectedHtml()},null,null,999)}a.on(D.mainPasteEvent,
function(a){"beforepaste"==D.mainPasteEvent&&C||x(a)});"beforepaste"==D.mainPasteEvent&&(a.on("paste",function(a){H||(k(),a.data.preventDefault(),x(a),h("paste"))}),a.on("contextmenu",e,null,null,0),a.on("beforepaste",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||e()},null,null,0));a.on("beforecut",function(){!C&&m(b)});var g;a.attachListener(CKEDITOR.env.ie?a:b.document.getDocumentElement(),"mouseup",function(){g=setTimeout(w,0)});b.on("destroy",function(){clearTimeout(g)});a.on("keyup",
w)}function d(a){return{type:a,canUndo:"cut"==a,startDisabled:!0,fakeKeystroke:"cut"==a?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==this.type&&m();var a;var c=this.type;if(CKEDITOR.env.ie)a=h(c);else try{a=b.document.$.execCommand(c,!1,null)}catch(d){a=!1}a||b.showNotification(b.lang.clipboard[this.type+"Error"]);return a}}}function g(){return{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(b,c){function d(c,k){k="undefined"!==typeof k?k:!0;c?(c.method="paste",c.dataTransfer||
(c.dataTransfer=D.initPasteDataTransfer()),a(b,c,k)):g&&!b._.forcePasteDialog&&b.showNotification(h,"info",b.config.clipboard_notificationDuration);b._.forcePasteDialog=!1;b.fire("afterCommandExec",{name:"paste",command:f,returnValue:!!c})}c="undefined"!==typeof c&&null!==c?c:{};var f=this,g="undefined"!==typeof c.notification?c.notification:!0,k=c.type,e=CKEDITOR.tools.keystrokeToString(b.lang.common.keyboard,b.getCommandKeystroke(this)),h="string"===typeof g?g:b.lang.clipboard.pasteNotification.replace(/%1/,
'\x3ckbd aria-label\x3d"'+e.aria+'"\x3e'+e.display+"\x3c/kbd\x3e"),e="string"===typeof c?c:c.dataValue;k&&!0!==b.config.forcePasteAsPlainText&&"allow-word"!==b.config.forcePasteAsPlainText?b._.nextPasteType=k:delete b._.nextPasteType;"string"===typeof e?d({dataValue:e}):b.getClipboardData(d)}}}function k(){H=1;setTimeout(function(){H=0},100)}function e(){C=1;setTimeout(function(){C=0},10)}function h(a){var c=b.document,d=c.getBody(),g=!1,k=function(){g=!0};d.on(a,k);7<CKEDITOR.env.version?c.$.execCommand(a):
c.$.selection.createRange().execCommand(a);d.removeListener(a,k);return g}function m(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var a=b.getSelection(),c,d,g;a.getType()==CKEDITOR.SELECTION_ELEMENT&&(c=a.getSelectedElement())&&(d=a.getRanges()[0],g=b.document.createText(""),g.insertBefore(c),d.setStartBefore(g),d.setEndAfter(c),a.selectRanges([d]),setTimeout(function(){c.getParent()&&(g.remove(),a.selectElement(c))},0))}}function l(a,c){var d=b.document,g=b.editable(),k=function(a){a.cancel()},e;
if(!d.getById("cke_pastebin")){var h=b.getSelection(),m=h.createBookmarks();CKEDITOR.env.ie&&h.root.fire("selectionchange");var n=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!g.is("body")||CKEDITOR.env.ie?"div":"body",d);n.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var r=0,d=d.getWindow();CKEDITOR.env.webkit?(g.append(n),n.addClass("cke_editable"),g.is("body")||(r="static"!=g.getComputedStyle("position")?g:CKEDITOR.dom.element.get(g.$.offsetParent),r=r.getDocumentPosition().y)):g.getAscendant(CKEDITOR.env.ie?
"body":"html",1).append(n);n.setStyles({position:"absolute",top:d.getScrollPosition().y-r+10+"px",width:"1px",height:Math.max(1,d.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&n.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));(r=n.getParent().isReadOnly())?(n.setOpacity(0),n.setAttribute("contenteditable",!0)):n.setStyle("ltr"==b.config.contentsLangDirection?"left":"right","-10000px");b.on("selectionChange",k,null,null,0);if(CKEDITOR.env.webkit||
CKEDITOR.env.gecko)e=g.once("blur",k,null,null,-100);r&&n.focus();r=new CKEDITOR.dom.range(n);r.selectNodeContents(n);var p=r.select();CKEDITOR.env.ie&&(e=g.once("blur",function(){b.lockSelection(p)}));var w=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=w);e&&e.removeListener();CKEDITOR.env.ie&&g.focus();h.selectBookmarks(m);n.remove();var a;CKEDITOR.env.webkit&&(a=n.getFirst())&&a.is&&a.hasClass("Apple-style-span")&&
(n=a);b.removeListener("selectionChange",k);c(n.getHtml())},0)}}function A(){if("paste"==D.mainPasteEvent)return b.fire("beforePaste",{type:"auto",method:"paste"}),!1;b.focus();k();var a=b.focusManager;a.lock();if(b.editable().fire(D.mainPasteEvent)&&!h("paste"))return a.unlock(),!1;a.unlock();return!0}function y(a){if("wysiwyg"==b.mode)switch(a.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:a=b.editable();k();"paste"==D.mainPasteEvent&&a.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+
46:b.fire("saveSnapshot"),setTimeout(function(){b.fire("saveSnapshot")},50)}}function x(c){var d={type:"auto",method:"paste",dataTransfer:D.initPasteDataTransfer(c)};d.dataTransfer.cacheData();var g=!1!==b.fire("beforePaste",d);g&&D.canClipboardApiBeTrusted(d.dataTransfer,b)?(c.data.preventDefault(),setTimeout(function(){a(b,d)},0)):l(c,function(c){d.dataValue=c.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");g&&a(b,d)})}function w(){if("wysiwyg"==b.mode){var a=B("paste");b.getCommand("cut").setState(B("cut"));
b.getCommand("copy").setState(B("copy"));b.getCommand("paste").setState(a);b.fire("pasteState",a)}}function B(a){var c=b.getSelection(),c=c&&c.getRanges()[0];if((b.readOnly||c&&c.checkReadOnly())&&a in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==a)return CKEDITOR.TRISTATE_OFF;a=b.getSelection();c=a.getRanges();return a.getType()==CKEDITOR.SELECTION_NONE||1==c.length&&c[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var D=CKEDITOR.plugins.clipboard,C=0,H=0;(function(){b.on("key",
y);b.on("contentDom",c);b.on("selectionChange",w);if(b.contextMenu){b.contextMenu.addListener(function(){return{cut:B("cut"),copy:B("copy"),paste:B("paste")}});var a=null;b.on("menuShow",function(){a&&(a.removeListener(),a=null);var c=b.contextMenu.findItemByCommandName("paste");c&&c.element&&(a=c.element.on("touchend",function(){b._.forcePasteDialog=!0}))})}if(b.ui.addButton)b.once("instanceReady",function(){b._.pasteButtons&&CKEDITOR.tools.array.forEach(b._.pasteButtons,function(a){if(a=b.ui.get(a))if(a=
CKEDITOR.document.getById(a._.id))a.on("touchend",function(){b._.forcePasteDialog=!0})})})})();(function(){function a(c,d,g,k,e){var h=b.lang.clipboard[d];b.addCommand(d,g);b.ui.addButton&&b.ui.addButton(c,{label:h,command:d,toolbar:"clipboard,"+k});b.addMenuItems&&b.addMenuItem(d,{label:h,command:d,group:"clipboard",order:e})}a("Cut","cut",d("cut"),10,1);a("Copy","copy",d("copy"),20,4);a("Paste","paste",g(),30,8);b._.pasteButtons||(b._.pasteButtons=[]);b._.pasteButtons.push("Paste")})();b.getClipboardData=
function(a,c){function d(a){a.removeListener();a.cancel();c(a.data)}function g(a){a.removeListener();a.cancel();c({type:e,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var k=!1,e="auto";c||(c=a,a=null);b.on("beforePaste",function(a){a.removeListener();k=!0;e=a.data.type},null,null,1E3);b.on("paste",d,null,null,0);!1===A()&&(b.removeListener("paste",d),b._.forcePasteDialog&&k&&b.fire("pasteDialog")?(b.on("pasteDialogCommit",g),b.on("dialogHide",function(a){a.removeListener();
a.data.removeListener("pasteDialogCommit",g);a.data._.committed||c(null)})):c(null))}}function e(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi)&&!a.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}else return"html";return"htmlifiedtext"}function b(a,b){function c(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",
~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/(?!\u3000)\s+/g," ").replace(/> +</g,"\x3e\x3c").replace(/<br ?\/>/gi,"\x3cbr\x3e");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1<b.indexOf("\x3cdiv\x3e")&&(b=b.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"\x3cbr\x3e").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"),b.match(/<div>(<br>|)<\/div>/)&&(b="\x3cp\x3e"+b.replace(/(<div>(<br>|)<\/div>)+/g,
function(a){return c(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),b=b.replace(/<\/div><div>/g,"\x3cbr\x3e"),b=b.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(b=b.replace(/^<br><br>$/,"\x3cbr\x3e")),-1<b.indexOf("\x3cbr\x3e\x3cbr\x3e")&&(b="\x3cp\x3e"+b.replace(/(<br>){2,}/g,function(a){return c(a.length/4)})+"\x3c/p\x3e"));return g(a,b)}function d(a){function b(){var a={},c;for(c in CKEDITOR.dtd)"$"!=c.charAt(0)&&"div"!=c&&"span"!=
c&&(a[c]=1);return a}var c={};return{get:function(d){return"plain-text"==d?c.plainText||(c.plainText=new CKEDITOR.filter(a,"br")):"semantic-content"==d?((d=c.semanticContent)||(d=new CKEDITOR.filter(a,{}),d.allow({$1:{elements:b(),attributes:!0,styles:!1,classes:!1}}),d=c.semanticContent=d),d):d?new CKEDITOR.filter(a,d):null}}}function l(a,b,c){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var d=new CKEDITOR.htmlParser.basicWriter;c.applyTo(b,!0,!1,a.activeEnterMode);b.writeHtml(d);return d.getHtml()}
function g(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return b}function m(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function c(b){var c=CKEDITOR.plugins.clipboard;b.on("contentDom",function(){function d(c,g,k){g.select();a(b,{dataTransfer:k,method:"drop"},1);k.sourceEditor.fire("saveSnapshot");
k.sourceEditor.editable().extractHtmlFromRange(c);k.sourceEditor.getSelection().selectRanges([c]);k.sourceEditor.fire("saveSnapshot")}function g(d,k){d.select();a(b,{dataTransfer:k,method:"drop"},1);c.resetDragDataTransfer()}function k(a,c,d){var g={$:a.data.$,target:a.data.getTarget()};c&&(g.dragRange=c);d&&(g.dropRange=d);!1===b.fire(a.name,g)&&a.data.preventDefault()}function e(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}var h=b.editable(),m=CKEDITOR.plugins.clipboard.getDropTarget(b),
l=b.ui.space("top"),A=b.ui.space("bottom");c.preventDefaultDropOnElement(l);c.preventDefaultDropOnElement(A);h.attachListener(m,"dragstart",k);h.attachListener(b,"dragstart",c.resetDragDataTransfer,c,null,1);h.attachListener(b,"dragstart",function(a){c.initDragDataTransfer(a,b)},null,null,2);h.attachListener(b,"dragstart",function(){var a=c.dragRange=b.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(c.dragStartContainerChildCount=a?e(a.startContainer):null,c.dragEndContainerChildCount=
a?e(a.endContainer):null)},null,null,100);h.attachListener(m,"dragend",k);h.attachListener(b,"dragend",c.initDragDataTransfer,c,null,1);h.attachListener(b,"dragend",c.resetDragDataTransfer,c,null,100);h.attachListener(m,"dragover",function(a){if(CKEDITOR.env.edge)a.data.preventDefault();else{var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()}});
h.attachListener(m,"drop",function(a){if(!a.data.$.defaultPrevented&&(a.data.preventDefault(),!b.readOnly)){var d=a.data.getTarget();if(!d.isReadOnly()||d.type==CKEDITOR.NODE_ELEMENT&&d.is("html")){var d=c.getRangeAtDropPosition(a,b),g=c.dragRange;d&&k(a,g,d)}}},null,null,9999);h.attachListener(b,"drop",c.initDragDataTransfer,c,null,1);h.attachListener(b,"drop",function(a){if(a=a.data){var k=a.dropRange,e=a.dragRange,h=a.dataTransfer;h.getTransferType(b)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){c.internalDrop(e,
k,h,b)},0):h.getTransferType(b)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?d(e,k,h):g(k,h)}},null,null,9999)})}var k;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",_supportedFileMatchers:[],init:function(a){function g(b){return a.config.clipboard_handleImages?-1!==CKEDITOR.tools.indexOf(["image/png","image/jpeg","image/gif"],b.type):!1}function k(b){return CKEDITOR.tools.array.some(a.plugins.clipboard._supportedFileMatchers,function(a){return a(b)})}function m(b){b.length&&(b=
CKEDITOR.tools.array.unique(b),b=CKEDITOR.tools.array.filter(b,function(a){return!!CKEDITOR.tools.trim(a)}),b=u(b.join(", ")),a.showNotification(b,"info",a.config.clipboard_notificationDuration))}function u(b){return b?a.lang.clipboard.fileFormatNotSupportedNotification.replace(/\${formats\}/g,"\x3cem\x3e"+b+"\x3c/em\x3e"):a.lang.clipboard.fileWithoutFormatNotSupportedNotification}function q(a,b){return CKEDITOR.env.ie&&a.data.fileTransferCancel||!(CKEDITOR.env.ie||b&&A!==b.id)?!1:b.isFileTransfer()&&
1===b.getFilesCount()}var t,z=d(a);a.config.forcePasteAsPlainText?t="plain-text":a.config.pasteFilter?t=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(t="semantic-content");a.pasteFilter=z.get(t);h(a);c(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));var p=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||CKEDITOR.plugins.clipboard.isFileApiSupported,A;CKEDITOR.plugins.clipboard.addFileMatcher(a,g);a.on("paste",function(a){if(p){var b=a.data;
a=b.dataTransfer;if(!b.dataValue){for(var b=[],c=0;c<a.getFilesCount();c++){var d=a.getFile(c);k(d)||b.push(d.type)}m(b)}}},null,null,1);a.on("paste",function(b){if(p&&a.config.clipboard_handleImages){var c=b.data,d=c.dataTransfer;if(!c.dataValue&&q(b,d)&&(d=d.getFile(0),g(d))){var k=new FileReader;k.addEventListener("load",function(){b.data.dataValue='\x3cimg src\x3d"'+k.result+'" /\x3e';a.fire("paste",b.data)},!1);k.addEventListener("abort",function(){CKEDITOR.env.ie&&(b.data.fileTransferCancel=
!0);a.fire("paste",b.data)},!1);k.addEventListener("error",function(){CKEDITOR.env.ie&&(b.data.fileTransferCancel=!0);a.fire("paste",b.data)},!1);k.readAsDataURL(d);A=c.dataTransfer.id;b.stop()}}},null,null,1);a.on("paste",function(b){b.data.dataTransfer||(b.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!b.data.dataValue){var c=b.data.dataTransfer,d=c.getData("text/html");if(d)b.data.dataValue=d,b.data.type="html";else if(d=c.getData("text/plain"))b.data.dataValue=a.editable().transformPlainTextToHtml(d),
b.data.type="text"}},null,null,1);a.on("paste",function(a){var b=a.data.dataValue,c=CKEDITOR.dtd.$block;-1<b.indexOf("Apple-")&&(b=b.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi," "),"html"!=a.data.type&&(b=b.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1<b.indexOf('\x3cbr class\x3d"Apple-interchange-newline"\x3e')&&(a.data.startsWithEOL=1,a.data.preSniffing="html",b=b.replace(/<br class="Apple-interchange-newline">/,
"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var d,f,g=new CKEDITOR.dom.element("div");for(g.setHtml(b);1==g.getChildCount()&&(d=g.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)g=f=d;f&&(b=f.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?b=b.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(b,d){return d.toLowerCase()in c?(a.data.preSniffing="html","\x3c"+d):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,
function(b,d){return d in c?(a.data.endsWithEOL=1,"\x3c/"+d+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$1"));a.data.dataValue=b},null,null,3);a.on("paste",function(c){c=c.data;var d=a._.nextPasteType||c.type,g=c.dataValue,k,h=a.config.clipboard_defaultContentType||"html",m=c.dataTransfer.getTransferType(a)==CKEDITOR.DATA_TRANSFER_EXTERNAL,n=!0===a.config.forcePasteAsPlainText;k="html"==d||"html"==c.preSniffing?"html":e(g);delete a._.nextPasteType;"htmlifiedtext"==k&&(g=b(a.config,g));
if("text"==d&&"html"==k)g=l(a,g,z.get("plain-text"));else if(m&&a.pasteFilter&&!c.dontFilter||n)g=l(a,g,a.pasteFilter);c.startsWithEOL&&(g='\x3cbr data-cke-eol\x3d"1"\x3e'+g);c.endsWithEOL&&(g+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==d&&(d="html"==k||"html"==h?"html":"text");c.type=d;c.dataValue=g;delete c.preSniffing;delete c.startsWithEOL;delete c.endsWithEOL},null,null,6);a.on("paste",function(b){b=b.data;b.dataValue&&(a.insertHtml(b.dataValue,b.type,b.range),setTimeout(function(){a.fire("afterPaste")},
0))},null,null,1E3);a.on("pasteDialog",function(b){setTimeout(function(){a.openDialog("paste",b.data)},0)})}});CKEDITOR.plugins.clipboard={addFileMatcher:function(a,b){a.plugins.clipboard._supportedFileMatchers.push(b)},isCustomCopyCutSupported:CKEDITOR.env.ie&&16>CKEDITOR.env.version||CKEDITOR.env.iOS&&605>CKEDITOR.env.version?!1:!0,isCustomDataTypesSupported:!CKEDITOR.env.ie||16<=CKEDITOR.env.version,isFileApiSupported:!CKEDITOR.env.ie||9<CKEDITOR.env.version,mainPasteEvent:CKEDITOR.env.ie&&!CKEDITOR.env.edge?
"beforepaste":"paste",addPasteButton:function(a,b,c){a.ui.addButton&&(a.ui.addButton(b,c),a._.pasteButtons||(a._.pasteButtons=[]),a._.pasteButtons.push(b))},canClipboardApiBeTrusted:function(a,b){return a.getTransferType(b)!=CKEDITOR.DATA_TRANSFER_EXTERNAL||CKEDITOR.env.chrome&&!a.isEmpty()||CKEDITOR.env.gecko&&(a.getData("text/html")||a.getFilesCount())||CKEDITOR.env.safari&&603<=CKEDITOR.env.version&&!CKEDITOR.env.iOS||CKEDITOR.env.iOS&&605<=CKEDITOR.env.version||CKEDITOR.env.edge&&16<=CKEDITOR.env.version?
!0:!1},getDropTarget:function(a){var b=a.editable();return CKEDITOR.env.ie&&9>CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,b,c,d){function g(a,c,d){var f=a;f.type==CKEDITOR.NODE_TEXT&&(f=a.getParent());if(f.equals(c)&&d!=c.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),c=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(d=a.getLength(),a.setText(a.getText()+c.getText()),c.remove(),b.setStart(a,
d),b.collapse(!0)),!0}var k=b.startContainer;"number"==typeof d&&"number"==typeof c&&k.type==CKEDITOR.NODE_ELEMENT&&(g(a.startContainer,k,c)||g(a.endContainer,k,d))},isDropRangeAffectedByDragRange:function(a,b){var c=b.startContainer,d=b.endOffset;return a.endContainer.equals(c)&&a.endOffset<=d||a.startContainer.getParent().equals(c)&&a.startContainer.getIndex()<d||a.endContainer.getParent().equals(c)&&a.endContainer.getIndex()<d?!0:!1},internalDrop:function(b,c,d,g){var k=CKEDITOR.plugins.clipboard,
e=g.editable(),h,m;g.fire("saveSnapshot");g.fire("lockSnapshot",{dontUpdate:1});CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(b,c,k.dragStartContainerChildCount,k.dragEndContainerChildCount);(m=this.isDropRangeAffectedByDragRange(b,c))||(h=b.createBookmark(!1));k=c.clone().createBookmark(!1);m&&(h=b.createBookmark(!1));b=h.startNode;c=h.endNode;m=k.startNode;c&&b.getPosition(m)&CKEDITOR.POSITION_PRECEDING&&c.getPosition(m)&CKEDITOR.POSITION_FOLLOWING&&m.insertBefore(b);b=g.createRange();
b.moveToBookmark(h);e.extractHtmlFromRange(b,1);c=g.createRange();k.startNode.getCommonAncestor(e)||(k=g.getSelection().createBookmarks()[0]);c.moveToBookmark(k);a(g,{dataTransfer:d,method:"drop",range:c},1);g.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var c=a.data.$,d=c.clientX,g=c.clientY,k=b.getSelection(!0).getRanges()[0],e=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(d,g))c=b.document.$.caretRangeFromPoint(d,
g),e.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),e.collapse(!0);else if(c.rangeParent)e.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),e.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&k&&b.editable().hasFocus)return k;if(document.body.createTextRange){b.focus();c=b.document.getBody().$.createTextRange();try{for(var h=!1,m=0;20>m&&!h;m++){if(!h)try{c.moveToPoint(d,g-m),h=!0}catch(l){}if(!h)try{c.moveToPoint(d,g+m),h=!0}catch(y){}}if(h){var x="cke-temp-"+(new Date).getTime();
c.pasteHTML('\x3cspan id\x3d"'+x+'"\x3e​\x3c/span\x3e');var w=b.document.getById(x);e.moveToPosition(w,CKEDITOR.POSITION_BEFORE_START);w.remove()}else{var B=b.document.$.elementFromPoint(d,g),D=new CKEDITOR.dom.element(B),C;if(D.equals(b.editable())||"html"==D.getName())return k&&k.startContainer&&!k.startContainer.equals(b.editable())?k:null;C=D.getClientRect();d<C.left?e.setStartAt(D,CKEDITOR.POSITION_AFTER_START):e.setStartAt(D,CKEDITOR.POSITION_BEFORE_END);e.collapse(!0)}}catch(H){return null}}else return null}return e},
initDragDataTransfer:function(a,b){var c=a.data.$?a.data.$.dataTransfer:null,d=new this.dataTransfer(c,b);"dragstart"===a.name&&d.storeId();c?this.dragData&&d.id==this.dragData.id?d=this.dragData:this.dragData=d:this.dragData?d=this.dragData:this.dragData=d;a.data.dataTransfer=d},resetDragDataTransfer:function(){this.dragData=null},initPasteDataTransfer:function(a,b){if(this.isCustomCopyCutSupported){if(a&&a.data&&a.data.$){var c=a.data.$.clipboardData,d=new this.dataTransfer(c,b);"copy"!==a.name&&
"cut"!==a.name||d.storeId();this.copyCutData&&d.id==this.copyCutData.id?(d=this.copyCutData,d.$=c):this.copyCutData=d;return d}return new this.dataTransfer(null,b)}return new this.dataTransfer(CKEDITOR.env.edge&&a&&a.data.$&&a.data.$.clipboardData||null,b)},preventDefaultDropOnElement:function(a){a&&a.on("dragover",m)}};k=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?"cke/id":"Text";CKEDITOR.plugins.clipboard.dataTransfer=function(a,b){a&&(this.$=a);this._={metaRegExp:/^<meta.*?>/i,fragmentRegExp:/\s*\x3c!--StartFragment--\x3e|\x3c!--EndFragment--\x3e\s*/g,
types:[],data:{},files:[],nativeHtmlCache:"",normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":"files"===a?"Files":a}};this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);this.id=this.getData(k);this.id||(this.id="Text"==k?"":"cke-"+CKEDITOR.tools.getUniqueId());b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==k||this.getData("text/plain")||this.setData("text/plain",b.getSelection().getSelectedText()))};
CKEDITOR.DATA_TRANSFER_INTERNAL=1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(a,b){a=this._.normalizeType(a);var c="text/html"==a&&b?this._.nativeHtmlCache:this._.data[a];if(void 0===c||null===c||""===c){if(this._.fallbackDataTransfer.isRequired())c=this._.fallbackDataTransfer.getData(a,b);else try{c=this.$.getData(a)||""}catch(d){c=""}"text/html"!=a||b||(c=this._stripHtml(c))}"Text"==a&&CKEDITOR.env.gecko&&
this.getFilesCount()&&"file://"==c.substring(0,7)&&(c="");if("string"===typeof c)var g=c.indexOf("\x3c/html\x3e"),c=-1!==g?c.substring(0,g+7):c;return c},setData:function(a,b){a=this._.normalizeType(a);"text/html"==a?(this._.data[a]=this._stripHtml(b),this._.nativeHtmlCache=b):this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a)if("Text"==k&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a,
b)}catch(c){}},storeId:function(){"Text"!==k&&this.setData(k,this.id)},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(c){c=b._.normalizeType(c);var d=b.getData(c);"text/html"==c&&(b._.nativeHtmlCache=b.getData(c,!0),d=b._stripHtml(d));d&&(b._.data[c]=d);b._.types.push(c)}if(this.$){var b=this,c,d,g;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=
0;c<this.$.types.length;c++)a(this.$.types[c])}else a("Text"),a("URL");d=this._getImageFromClipboard();if((g=this.$&&this.$.files||null)||d){this._.files=[];if(g&&g.length)for(c=0;c<g.length;c++)this._.files.push(g[c]);0===this._.files.length&&d&&this._.files.push(d)}}},getFilesCount:function(){if(this._.files.length)return this._.files.length;var a=this.$&&this.$.files||null;return a&&a.length?a.length:this._getImageFromClipboard()?1:0},getFile:function(a){if(this._.files.length)return this._.files[a];
var b=this.$&&this.$.files||null;return b&&b.length?b[a]:0===a?this._getImageFromClipboard():void 0},isFileTransfer:function(){var a=this.getTypes(),a=CKEDITOR.tools.array.filter(a,function(a){return"application/x-moz-file"!==a});return 1===a.length&&"files"===a[0].toLowerCase()},isEmpty:function(){var a={},b;if(this.getFilesCount())return!1;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(this._.data),function(b){a[b]=1});if(this.$)if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(var c=
0;c<this.$.types.length;c++)a[this.$.types[c]]=1}else a.Text=1,a.URL=1;"Text"!=k&&(a[k]=0);for(b in a)if(a[b]&&""!==this.getData(b))return!1;return!0},getTypes:function(){return 0<this._.types.length?this._.types:this.$&&this.$.types?[].slice.call(this.$.types):[]},_getImageFromClipboard:function(){var a;try{if(this.$&&this.$.items&&this.$.items[0]&&(a=this.$.items[0].getAsFile())&&a.type)return a}catch(b){}},_stripHtml:function(a){function b(a){var c=new CKEDITOR.htmlParser,d,g;c.onTagOpen=function(a){"body"===
a&&(d=c._.htmlPartsRegex.lastIndex)};c.onTagClose=function(a){"body"===a&&(g=c._.htmlPartsRegex.lastIndex)};c.parse(a);return"number"!==typeof d||"number"!==typeof g?a:a.substring(d,g).replace(/<\/body\s*>$/gi,"")}a&&a.length&&(a=b(a),a=a.replace(this._.metaRegExp,""),a=a.replace(this._.fragmentRegExp,""));return a}};CKEDITOR.plugins.clipboard.fallbackDataTransfer=function(a){this._dataTransfer=a;this._customDataFallbackType="text/html"};CKEDITOR.plugins.clipboard.fallbackDataTransfer._isCustomMimeTypeSupported=
null;CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes=[];CKEDITOR.plugins.clipboard.fallbackDataTransfer.prototype={isRequired:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer,b=this._dataTransfer.$;if(null===a._isCustomMimeTypeSupported)if(b){a._isCustomMimeTypeSupported=!1;if(CKEDITOR.env.edge&&17<=CKEDITOR.env.version)return!0;try{b.setData("cke/mimetypetest","cke test value"),a._isCustomMimeTypeSupported="cke test value"===b.getData("cke/mimetypetest"),b.clearData("cke/mimetypetest")}catch(c){}}else return!1;
return!a._isCustomMimeTypeSupported},getData:function(a,b){var c=this._getData(this._customDataFallbackType,!0);if(b)return c;var c=this._extractDataComment(c),d=null,d=a===this._customDataFallbackType?c.content:c.data&&c.data[a]?c.data[a]:this._getData(a,!0);return null!==d?d:""},setData:function(a,b){var c=a===this._customDataFallbackType;c&&(b=this._applyDataComment(b,this._getFallbackTypeData()));var d=b,g=this._dataTransfer.$;try{g.setData(a,d),c&&(this._dataTransfer._.nativeHtmlCache=d)}catch(k){if(this._isUnsupportedMimeTypeError(k)){c=
CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(c._customTypes,a)&&c._customTypes.push(a);var c=this._getFallbackTypeContent(),e=this._getFallbackTypeData();e[a]=d;try{d=this._applyDataComment(c,e),g.setData(this._customDataFallbackType,d),this._dataTransfer._.nativeHtmlCache=d}catch(h){d=""}}}return d},_getData:function(a,b){var c=this._dataTransfer._.data;if(!b&&c[a])return c[a];try{return this._dataTransfer.$.getData(a)}catch(d){return null}},_getFallbackTypeContent:function(){var a=
this._dataTransfer._.data[this._customDataFallbackType];a||(a=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).content);return a},_getFallbackTypeData:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes,b=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).data||{},c=this._dataTransfer._.data;CKEDITOR.tools.array.forEach(a,function(a){void 0!==c[a]?b[a]=c[a]:void 0!==b[a]&&(b[a]=b[a])},this);return b},_isUnsupportedMimeTypeError:function(a){return a.message&&
-1!==a.message.search(/element not found/gi)},_extractDataComment:function(a){var b={data:null,content:a||""};if(a&&16<a.length){var c;(c=/\x3c!--cke-data:(.*?)--\x3e/g.exec(a))&&c[1]&&(b.data=JSON.parse(decodeURIComponent(c[1])),b.content=a.replace(c[0],""))}return b},_applyDataComment:function(a,b){var c="";b&&CKEDITOR.tools.object.keys(b).length&&(c="\x3c!--cke-data:"+encodeURIComponent(JSON.stringify(b))+"--\x3e");return c+(a&&a.length?a:"")}}}(),CKEDITOR.config.clipboard_notificationDuration=
1E4,CKEDITOR.config.clipboard_handleImages=!0,CKEDITOR.plugins.add("panelbutton",{requires:"button",onLoad:function(){function a(a){var e=this._;e.state!=CKEDITOR.TRISTATE_DISABLED&&(this.createPanel(a),e.on?e.panel.hide():e.panel.showBlock(this._.id,this.document.getById(this._.id),4))}CKEDITOR.ui.panelButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(h){var e=h.panel||{};delete h.panel;this.base(h);this.document=e.parent&&e.parent.getDocument()||CKEDITOR.document;e.block={attributes:e.attributes};
e.toolbarRelated=!0;this.hasArrow="listbox";this.click=a;this._={panelDefinition:e}},statics:{handler:{create:function(a){return new CKEDITOR.ui.panelButton(a)}}},proto:{createPanel:function(a){var e=this._;if(!e.panel){var b=this._.panelDefinition,d=this._.panelDefinition.block,l=b.parent||CKEDITOR.document.getBody(),g=CKEDITOR.document.getById(this._.id),m=this._.panel=new CKEDITOR.ui.floatPanel(a,l,b),b=m.addBlock(e.id,d),c=this,k=a.getCommand(this.command);m.onShow=function(){c.className&&this.element.addClass(c.className+
"_panel");c.setState(CKEDITOR.TRISTATE_ON);g.setAttribute("aria-expanded","true");e.on=1;c.editorFocus&&a.focus();if(c.onOpen)c.onOpen()};m.onHide=function(b){c.className&&this.element.getFirst().removeClass(c.className+"_panel");!c.modes&&k?c.setStateFromCommand(k):c.setState(c.modes&&c.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);e.on=0;g.setAttribute("aria-expanded","false");if(!b&&c.onClose)c.onClose()};m.onEscape=function(){m.hide(1);c.document.getById(e.id).focus()};if(this.onBlock)this.onBlock(m,
b);b.onHide=function(){e.on=0;!c.modes&&c.command?c.setStateFromCommand(k):c.setState(CKEDITOR.TRISTATE_OFF)}}},setStateFromCommand:function(a){this.setState(a.state)}}})},beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_PANELBUTTON,CKEDITOR.ui.panelButton.handler)}}),CKEDITOR.UI_PANELBUTTON="panelbutton",function(){CKEDITOR.plugins.add("panel",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}});CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(a,d){d&&CKEDITOR.tools.extend(this,
d);CKEDITOR.tools.extend(this,{className:"",css:[]});this.id=CKEDITOR.tools.getNextId();this.document=a;this.isFramed=this.forceIFrame||this.css.length;this._={blocks:{}}};CKEDITOR.ui.panel.handler={create:function(a){return new CKEDITOR.ui.panel(a)}};var a=CKEDITOR.addTemplate("panel",'\x3cdiv lang\x3d"{langCode}" id\x3d"{id}" dir\x3d{dir} class\x3d"cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style\x3d"z-index:{z-index}" role\x3d"presentation"\x3e{frame}\x3c/div\x3e'),h=CKEDITOR.addTemplate("panel-frame",
'\x3ciframe id\x3d"{id}" class\x3d"cke_panel_frame" role\x3d"presentation" frameborder\x3d"0" src\x3d"{src}"\x3e\x3c/iframe\x3e'),e=CKEDITOR.addTemplate("panel-frame-inner",'\x3c!DOCTYPE html\x3e\x3chtml class\x3d"cke_panel_container {env}" dir\x3d"{dir}" lang\x3d"{langCode}"\x3e\x3chead\x3e{css}\x3c/head\x3e\x3cbody class\x3d"cke_{dir}" style\x3d"margin:0;padding:0" onload\x3d"{onload}"\x3e\x3c/body\x3e\x3c/html\x3e');CKEDITOR.ui.panel.prototype={render:function(b,d){var l={editorId:b.id,id:this.id,
langCode:b.langCode,dir:b.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":b.config.baseFloatZIndex+1};this.getHolderElement=function(){var a=this._.holder;if(!a){if(this.isFramed){var a=this.document.getById(this.id+"_frame"),b=a.getParent(),a=a.getFrameDocument();CKEDITOR.env.iOS&&b.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"});b=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=!0;if(this.onLoad)this.onLoad()},this));a.write(e.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),
onload:"window.parent.CKEDITOR.tools.callFunction("+b+");"},l)));a.getWindow().$.CKEDITOR=CKEDITOR;a.on("keydown",function(a){var b=a.data.getKeystroke(),c=this.document.getById(this.id).getAttribute("dir");if("input"!==a.data.getTarget().getName()||37!==b&&39!==b)this._.onKeyDown&&!1===this._.onKeyDown(b)?"input"===a.data.getTarget().getName()&&32===b||a.data.preventDefault():(27==b||b==("rtl"==c?39:37))&&this.onEscape&&!1===this.onEscape(b)&&a.data.preventDefault()},this);a=a.getBody();a.unselectable();
CKEDITOR.env.air&&CKEDITOR.tools.callFunction(b)}else a=this.document.getById(this.id);this._.holder=a}return a};if(this.isFramed){var g=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";l.frame=h.output({id:this.id+"_frame",src:g})}g=a.output(l);d&&d.push(g);return g},addBlock:function(a,d){d=this._.blocks[a]=d instanceof CKEDITOR.ui.panel.block?
d:new CKEDITOR.ui.panel.block(this.getHolderElement(),d);this._.currentBlock||this.showBlock(a);return d},getBlock:function(a){return this._.blocks[a]},showBlock:function(a){a=this._.blocks[a];var d=this._.currentBlock,e=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");d&&d.hide();this._.currentBlock=a;CKEDITOR.fire("ariaWidget",e);a._.focusIndex=-1;this._.onKeyDown=a.onKeyDown&&CKEDITOR.tools.bind(a.onKeyDown,a);a.show();return a},destroy:function(){this.element&&
this.element.remove()}};CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(a,d){this.element=a.append(a.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));d&&CKEDITOR.tools.extend(this,d);this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title||this.attributes["aria-label"]});this.keys={};this._.focusIndex=-1;this.element.disableContextMenu()},
_:{markItem:function(a){-1!=a&&(a=this._.getItems().getItem(this._.focusIndex=a),CKEDITOR.env.webkit&&a.getDocument().getWindow().focus(),a.focus(),this.onMark&&this.onMark(a))},markFirstDisplayed:function(a){for(var d=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"none"==a.getStyle("display")},e=this._.getItems(),g,h,c=e.count()-1;0<=c;c--)if(g=e.getItem(c),g.getAscendant(d)||(h=g,this._.focusIndex=c),"true"==g.getAttribute("aria-selected")){h=g;this._.focusIndex=c;break}h&&(a&&a(),CKEDITOR.env.webkit&&
h.getDocument().getWindow().focus(),h.focus(),this.onMark&&this.onMark(h))},getItems:function(){return this.element.find("a,input")}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle("display","none")},onKeyDown:function(a,d){var e=this.keys[a];switch(e){case "next":for(var g=this._.focusIndex,e=this._.getItems(),h;h=e.getItem(++g);)if(h.getAttribute("_cke_focus")&&h.$.offsetWidth){this._.focusIndex=g;h.focus(!0);
break}return h||d?!1:(this._.focusIndex=-1,this.onKeyDown(a,1));case "prev":g=this._.focusIndex;for(e=this._.getItems();0<g&&(h=e.getItem(--g));){if(h.getAttribute("_cke_focus")&&h.$.offsetWidth){this._.focusIndex=g;h.focus(!0);break}h=null}return h||d?!1:(this._.focusIndex=e.count(),this.onKeyDown(a,1));case "click":case "mouseup":return g=this._.focusIndex,(h=0<=g&&this._.getItems().getItem(g))&&h.fireEventHandler(e,{button:CKEDITOR.tools.normalizeMouseButton(CKEDITOR.MOUSE_BUTTON_LEFT,!0)}),!1}return!0}}})}(),
CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function a(a,b,d,l,g){g=CKEDITOR.tools.genKey(b.getUniqueId(),d.getUniqueId(),a.lang.dir,a.uiColor||"",l.css||"",g||"");var m=h[g];m||(m=h[g]=new CKEDITOR.ui.panel(b,l),m.element=d.append(CKEDITOR.dom.element.createFromHtml(m.render(a),b)),m.element.setStyles({display:"none",position:"absolute"}));return m}var h={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(e,b,d,h){function g(){f.hide()}d.forceIFrame=1;d.toolbarRelated&&
e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(b=CKEDITOR.document.getById("cke_"+e.name));var m=b.getDocument();h=a(e,m,b,d,h||0);var c=h.element,k=c.getFirst(),f=this;c.disableContextMenu();this.element=c;this._={editor:e,panel:h,parentElement:b,definition:d,document:m,iframe:k,children:[],dir:e.lang.dir,showBlockParams:null,markFirst:void 0!==d.markFirst?d.markFirst:!0};e.on("mode",g);e.on("resize",g);m.getWindow().on("resize",function(){this.reposition()},this)},proto:{addBlock:function(a,b){return this._.panel.addBlock(a,
b)},addListBlock:function(a,b){return this._.panel.addListBlock(a,b)},getBlock:function(a){return this._.panel.getBlock(a)},showBlock:function(a,b,d,h,g,m){var c=this._.panel,k=c.showBlock(a);this._.showBlockParams=[].slice.call(arguments);this.allowBlur(!1);var f=this._.editor.editable();this._.returnFocus=f.hasFocus?f:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);this._.hideTimeout=0;var n=this.element,f=this._.iframe,f=CKEDITOR.env.ie&&!CKEDITOR.env.edge?f:new CKEDITOR.dom.window(f.$.contentWindow),
r=n.getDocument(),v=this._.parentElement.getPositionedAncestor(),u=b.getDocumentPosition(r),r=v?v.getDocumentPosition(r):{x:0,y:0},q="rtl"==this._.dir,t=u.x+(h||0)-r.x,z=u.y+(g||0)-r.y;!q||1!=d&&4!=d?q||2!=d&&3!=d||(t+=b.$.offsetWidth-1):t+=b.$.offsetWidth;if(3==d||4==d)z+=b.$.offsetHeight-1;this._.panel._.offsetParentId=b.getId();n.setStyles({top:z+"px",left:0,display:""});n.setOpacity(0);n.getFirst().removeStyle("width");this._.editor.focusManager.add(f);this._.blurSet||(CKEDITOR.event.useCapture=
!0,f.on("blur",function(a){function b(){delete this._.returnFocus;this.hide()}this.allowBlur()&&a.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild&&(CKEDITOR.env.iOS?this._.hideTimeout||(this._.hideTimeout=CKEDITOR.tools.setTimeout(b,0,this)):b.call(this))},this),f.on("focus",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)},this),CKEDITOR.env.iOS&&(f.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this),f.on("touchend",function(){this._.hideTimeout=
0;this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1);c.onEscape=CKEDITOR.tools.bind(function(a){if(this.onEscape&&!1===this.onEscape(a))return!1},this);CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.tools.bind(function(){var a=n;a.removeStyle("width");if(k.autoSize){var b=k.element.getDocument(),b=(CKEDITOR.env.webkit||CKEDITOR.env.edge?k.element:b.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetWidth||0)-(a.$.clientWidth||0)+3);a.setStyle("width",
b+10+"px");b=k.element.$.scrollHeight;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetHeight||0)-(a.$.clientHeight||0)+3);a.setStyle("height",b+"px");c._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");q&&(t-=n.$.offsetWidth);n.setStyle("left",t+"px");var b=c.element.getWindow(),a=n.$.getBoundingClientRect(),b=b.getViewPaneSize(),d=a.width||a.right-a.left,g=a.height||a.bottom-a.top,f=q?a.right:b.width-a.left,e=q?b.width-a.right:a.left;
q?f<d&&(t=e>d?t+d:b.width>d?t-a.left:t-a.right+b.width):f<d&&(t=e>d?t-d:b.width>d?t-a.right+b.width:t-a.left);d=a.top;b.height-a.top<g&&(z=d>g?z-g:b.height>g?z-a.bottom+b.height:z-a.top);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&((b=a=n.$.offsetParent&&new CKEDITOR.dom.element(n.$.offsetParent))&&"html"==b.getName()&&(b=b.getDocument().getBody()),b&&"rtl"==b.getComputedStyle("direction")&&(t=CKEDITOR.env.ie8Compat?t-2*n.getDocument().getDocumentElement().$.scrollLeft:t-(a.$.scrollWidth-a.$.clientWidth)));
var a=n.getFirst(),h;(h=a.getCustomData("activePanel"))&&h.onHide&&h.onHide.call(this,1);a.setCustomData("activePanel",this);n.setStyles({top:z+"px",left:t+"px"});n.setOpacity(1);m&&m()},this);c.isLoaded?a():c.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();k.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.markFirst&&(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){k.markFirstDisplayed?
k.markFirstDisplayed():k._.markFirstDisplayed()},0):k.markFirstDisplayed?k.markFirstDisplayed():k._.markFirstDisplayed());this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var a=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,a))},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();a&&!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused||
this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var a=this._.iframe.getFrameDocument().getActive();a&&a.is("a")&&(this._.lastFocused=a)},hide:function(a){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(a=a&&this._.returnFocus)CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus(),
a.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(a){var b=this._.panel;void 0!==a&&(b.allowBlur=a);return b.allowBlur},showAsChild:function(a,b,d,h,g,m){if(this._.activeChild!=a||a._.panel._.offsetParentId!=d.getId())this.hideChild(),a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(b,d,h,g,m),this.blur(),
(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(a){var b=this._.activeChild;b&&(delete b.onHide,delete this._.activeChild,b.hide(),a&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),b;for(b in h){var d=h[b];a?d.destroy():d.element.hide()}a&&(h={})})}(),function(){var a,h,e;CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(b){function d(d){function f(){var a=
b.config["colorButton_"+t+"Style"];a.childRule="back"==t?function(a){return g(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||g(a)};return a}function n(a,c,d){var g={};a&&(g.color=a);c&&(g.colorName=c);c=!CKEDITOR.tools.isEmpty(g)&&new CKEDITOR.style(f(),g);b.execCommand(A,{newStyle:c});if(a&&d)for(d.addColor(a.substr(1).toUpperCase()),a=H.element.find("[role\x3doption]").toArray(),d=0;d<a.length;d++)a[d].setAttributes({"aria-posinset":d+1,"aria-setsize":a.length})}var q=d.name,
t=d.type,z=d.title,p=d.order,A=d.commandName;d=d.contentTransformations||{};var y=new CKEDITOR.style(c["colorButton_"+t+"Style"]),x=CKEDITOR.tools.getNextId()+"_colorBox",w={type:t},B=new CKEDITOR.style(c["colorButton_"+t+"Style"],{color:"inherit"}),D=function(){return CKEDITOR.tools.addFunction(function(a,c,d){b.focus();b.fire("saveSnapshot");"?"==a?b.getColorFromDialog(function(a){a&&n(a,c,C)},null,w):n(a&&"#"+a,c,C);d&&(d.setAttribute("cke_colorlast",!0),b.once("selectionChange",function(){d.removeAttribute("cke_colorlast")}))})}(),
C=e.getRowLimit(b)?new e(b,"back"==t?"background-color":"color",D):void 0,H;b.addCommand(A,{contextSensitive:!0,exec:function(a,b){if(!a.readOnly){var c=b.newStyle;a.removeStyle(B);a.focus();c&&a.applyStyle(c);a.fire("saveSnapshot")}},refresh:function(a,b){B.checkApplicable(b,a,a.activeFilter)?B.checkActive(b,a)?this.setState(CKEDITOR.TRISTATE_ON):this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}});b.ui.add(q,CKEDITOR.UI_PANELBUTTON,{label:z,title:z,command:A,editorFocus:0,
toolbar:"colors,"+p,allowedContent:y,requiredContent:y,contentTransformations:d,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(c.colorButton_contentsCss),attributes:{role:"listbox","aria-label":k.panelTitle}},select:function(b){var d=c.colorButton_colors.split(",");b=CKEDITOR.tools.array.find(d,b);b=a.normalizeColor(b);m(H,b);H._.markFirstDisplayed()},onBlock:function(a,c){H=c;c.autoSize=!0;c.element.addClass("cke_colorblock");c.element.setHtml(h(x,D,C?C.getLength():0));c.element.getDocument().getBody().setStyle("overflow",
"hidden");c.element.getAscendant({html:1}).setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var d=c.keys,g="rtl"==b.lang.dir;d[g?37:39]="next";d[40]="next";d[9]="next";d[g?39:37]="prev";d[38]="prev";d[CKEDITOR.SHIFT+9]="prev";d[32]="click";C&&C.setContainer(c.element.findOne(".cke_colorhistory"))},onOpen:function(){var d=b.getSelection(),g=d&&d.getStartElement(),f=b.elementPath(g),k="back"==t?"background-color":"color";if(f){g=f.block||f.blockLimit||b.document.getBody();do f=g&&g.getComputedStyle(k)||
"transparent";while("back"==t&&"transparent"==f&&g&&(g=g.getParent()));f&&"transparent"!=f||(f="#ffffff");c.colorButton_enableAutomatic&&H.element.findOne("#"+x).setStyle("background-color",f);if(g=d&&d.getRanges()[0]){for(var d=new CKEDITOR.dom.walker(g),e=g.collapsed?g.startContainer:d.next(),g="";e;){e.type!==CKEDITOR.NODE_ELEMENT&&(e=e.getParent());e=a.normalizeColor(e.getComputedStyle(k));g=g||e;if(g!==e){g="";break}e=d.next()}"transparent"==g&&(g="");"fore"==t&&(w.automaticTextColor="#"+a.normalizeColor(f));
w.selectionColor=g?"#"+g:"";m(H,g)}return f}}})}function h(d,g,f){var m=[],l=c.colorButton_colors.split(","),n=b.plugins.colordialog&&c.colorButton_enableMore;f=l.length+f+(n?1:0);var p=1;c.colorButton_enableAutomatic&&(f+=1,p+=1,m.push('\x3ca class\x3d"cke_colorauto" _cke_focus\x3d1 hidefocus\x3dtrue',' title\x3d"',k.auto,'"',' draggable\x3d"false"',' ondragstart\x3d"return false;"',' onclick\x3d"CKEDITOR.tools.callFunction(',g,',null);return false;"'," href\x3d\"javascript:void('",k.auto,"')\"",
' role\x3d"option" aria-posinset\x3d"1" aria-setsize\x3d"',f,'"\x3e','\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e',"\x3ctr\x3e",'\x3ctd colspan\x3d"',b.config.colorButton_colorsPerRow,'" align\x3d"center"\x3e','\x3cspan class\x3d"cke_colorbox" id\x3d"',d,'"\x3e\x3c/span\x3e',k.auto,"\x3c/td\x3e","\x3c/tr\x3e","\x3c/table\x3e","\x3c/a\x3e"));m.push('\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e\x3ctbody\x3e');for(d=
0;d<l.length;d++){0===d%b.config.colorButton_colorsPerRow&&m.push("\x3c/tr\x3e\x3ctr\x3e");var A=l[d].split("/"),y=A[0],A=new a(b,{color:A[1]||y,label:A[1]?y:void 0},g);A.setPositionIndex(p+d,f);m.push(A.getHtml())}e.getRowLimit(b)&&e.renderContainer(m,b);n&&m.push("\x3c/tr\x3e","\x3ctr\x3e",'\x3ctd colspan\x3d"',b.config.colorButton_colorsPerRow,'" align\x3d"center"\x3e','\x3ca class\x3d"cke_colormore" _cke_focus\x3d1 hidefocus\x3dtrue',' title\x3d"',k.more,'"',' draggable\x3d"false"',' ondragstart\x3d"return false;"',
' onclick\x3d"CKEDITOR.tools.callFunction(',g,",'?');return false;\""," href\x3d\"javascript:void('",k.more,"')\"",' role\x3d"option" aria-posinset\x3d"',f,'" aria-setsize\x3d"',f,'"\x3e',k.more,"\x3c/a\x3e","\x3c/td\x3e");m.push("\x3c/tr\x3e\x3c/tbody\x3e\x3c/table\x3e");return m.join("")}function g(a){return"false"==a.getAttribute("contentEditable")||a.getAttribute("data-nostyle")}function m(b,c){var d=b._.getItems(),g=b.element.findOne("[aria-selected]"),f=b.element.findOne("[cke_colorlast]");
g&&g.removeAttribute("aria-selected");if(f)f.setAttribute("aria-selected",!0);else for(g=0;g<d.count();g++)if(f=d.getItem(g),c&&c==a.normalizeColor(f.getAttribute("data-value"))){f.setAttribute("aria-selected",!0);break}}var c=b.config,k=b.lang.colorbutton;if(!CKEDITOR.env.hc){d({name:"TextColor",type:"fore",commandName:"textColor",title:k.textColorTitle,order:10,contentTransformations:[[{element:"font",check:"span{color}",left:function(a){return!!a.attributes.color},right:function(a){a.name="span";
a.attributes.color&&(a.styles.color=a.attributes.color);delete a.attributes.color}}]]});var f,n=b.config.colorButton_normalizeBackground;if(void 0===n||n)f=[[{element:"span",left:function(a){var b=CKEDITOR.tools;if("span"!=a.name||!a.styles||!a.styles.background)return!1;a=b.style.parse.background(a.styles.background);return a.color&&1===b.object.keys(a).length},right:function(a){var c=(new CKEDITOR.style(b.config.colorButton_backStyle,{color:a.styles.background})).getDefinition();a.name=c.element;
a.styles=c.styles;a.attributes=c.attributes||{};return a}}]];d({name:"BGColor",type:"back",commandName:"bgColor",title:k.bgColorTitle,order:20,contentTransformations:f})}}});a=CKEDITOR.tools.createClass({$:function(b,d,e){this.$=new CKEDITOR.dom.element("td");this.color=CKEDITOR.tools._isValidColorFormat(d.color)?d.color:"";this.clickFn=e;this.label=d.label||a.colorNames(b)[this.color]||this.color;this.setHtml()},statics:{colorNames:function(a){return a.lang.colorbutton.colors},normalizeColor:function(a){var d=
/^(rgb|hsl)a\(/g.test(a),e=/^rgba\((\s*0\s*,?){4}\)$/g.test(a);return d&&!e?(a=new CKEDITOR.tools.color(a),CKEDITOR.tools.normalizeHex(a.getHex()||"").replace(/#/g,"")):CKEDITOR.tools.normalizeHex("#"+CKEDITOR.tools.convertRgbToHex(a||"")).replace(/#/g,"")}},proto:{getElement:function(){return this.$},getHtml:function(){return this.getElement().getOuterHtml()},setHtml:function(){this.getElement().setHtml('\x3ca class\x3d"cke_colorbox" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"'+this.label+'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction('+
this.clickFn+",'"+this.color+"','"+this.label+"', this); return false;\" href\x3d\"javascript:void('"+this.color+'\')" data-value\x3d"'+this.color+'" role\x3d"option"\x3e\x3cspan class\x3d"cke_colorbox" style\x3d"background-color:#'+this.color+'"\x3e\x3c/span\x3e\x3c/a\x3e')},setPositionIndex:function(a,d){this.getElement().getChild(0).setAttributes({"aria-posinset":a,"aria-setsize":d})}}});h=CKEDITOR.tools.createClass({$:function(){this.$=new CKEDITOR.dom.element("tr");this.$.addClass("cke_colorhistory_row");
this.boxes=[]},proto:{getElement:function(){return this.$},removeLastColor:function(){this.getElement().getLast().remove();return this.boxes.pop()},addNewColor:function(a){this.boxes.unshift(a);this.getElement().append(a.getElement(),!0)},extractColorBox:function(a){var d=CKEDITOR.tools.getIndex(this.boxes,function(d){return d.color===a});if(0>d)return null;this.boxes[d].getElement().remove();return this.boxes.splice(d,1)[0]}}});e=CKEDITOR.tools.createClass({$:function(a,d,e){this.editor=a;this.cssProperty=
d;this.clickFn=e;this.rows=[];this._.addNewRow();if(this.editor.config.colorButton_renderContentColors)this.editor.once("instanceReady",function(){this.renderContentColors()},this)},statics:{renderContainer:function(a,d){a.push('\x3c/tbody\x3e\x3ctbody class\x3d"cke_colorhistory" style\x3d"display:none;"\x3e',"\x3ctr\x3e",'\x3ctd colspan\x3d"',d.config.colorButton_colorsPerRow,'" align\x3d"center"\x3e',"\x3cspan\x3e\x3chr\x3e\x3c/span\x3e","\x3c/td\x3e","\x3c/tr\x3e","\x3c/tbody\x3e\x3ctbody\x3e")},
getRowLimit:function(a){return a.config.colorButton_historyRowLimit},getCapacity:function(a){return e.getRowLimit(a)*a.config.colorButton_colorsPerRow},colorList:CKEDITOR.tools.style.parse._colors},_:{countColors:function(){var a=CKEDITOR.tools.getStyledSpans(this.cssProperty,this.editor.editable());return CKEDITOR.tools.array.reduce(a,function(a,b){var g=this._.getHexCode(b,this.cssProperty,e.colorList);a[g]=a[g]||0;a[g]+=1;return a},{},this)},getHexCode:function(b,d,e){var g=b.getStyle(d);return g in
e?e[g].substr(1):a.normalizeColor(b.getComputedStyle(d)).toUpperCase()},sortByOccurrencesAscending:function(a,d){var e=[],g;for(g in a){var h={};h[d]=g;h.frequency=a[g];e.push(h)}e.sort(function(a,b){return b.frequency-a.frequency});this._.trimToCapacity(e);return e.reverse()},trimToCapacity:function(a){a.splice(e.getCapacity(this.editor))},addColors:function(a){CKEDITOR.tools.array.forEach(a,function(a){this.addColor(a.colorCode)},this)},extractColorBox:function(a){for(var d=0;d<this.rows.length;d++){var e=
this.rows[d].extractColorBox(a);if(e)return e}return null},moveToBeginning:function(a){this.rows[0].addNewColor(a)},createAtBeginning:function(b){this._.moveToBeginning(new a(this.editor,{color:b},this.clickFn))},addNewRow:function(){this.rows.push(new h);this.container&&this.container.append(this.rows[this.rows.length-1].getElement())},alignRows:function(){for(var a=0;a<e.getRowLimit(this.editor)&&!(this.rows[a].boxes.length<=this.editor.config.colorButton_colorsPerRow);a++)this.rows[a+1]?this._.moveLastBoxToNextRow(a):
a<e.getRowLimit(this.editor)-1?(this._.addNewRow(),this._.moveLastBoxToNextRow(a)):this.rows[a].removeLastColor()},moveLastBoxToNextRow:function(a){this.rows[a+1].addNewColor(this.rows[a].removeLastColor())},refreshPositions:function(){var a=this._.countPanelElements(),d=this._.calculateFirstPosition(a);CKEDITOR.tools.array.forEach(this.rows,function(e){CKEDITOR.tools.array.forEach(e.boxes,function(g){g.setPositionIndex(d,a);d+=1})})},countPanelElements:function(){var a=this.editor.config.colorButton_colors.split(",").length+
this.getLength();this.editor.plugins.colordialog&&this.editor.config.colorButton_enableMore&&(a+=1);this.editor.config.colorButton_enableAutomatic&&(a+=1);return a},calculateFirstPosition:function(a){return this.editor.plugins.colordialog&&this.editor.config.colorButton_enableMore?a-this.getLength():a-this.getLength()+1},attachRows:function(){CKEDITOR.tools.array.forEach(this.rows,function(a){this.container.append(a.getElement())},this)}},proto:{setContainer:function(a){this.container=a;this._.attachRows();
this.getLength()&&this.show()},show:function(){this.container&&this.container.show()},renderContentColors:function(){var a=this._.countColors();CKEDITOR.tools.isEmpty(a)||(a=this._.sortByOccurrencesAscending(a,"colorCode"),this._.addColors(a),this._.refreshPositions())},addColor:function(a){var d=this._.extractColorBox(a);this.container&&!this.container.isVisible()&&this.show();d?this._.moveToBeginning(d):this._.createAtBeginning(a);this._.alignRows()},getLength:function(){return CKEDITOR.tools.array.reduce(this.rows,
function(a,d){return a+d.boxes.length},0)}}})}(),CKEDITOR.config.colorButton_enableMore=!0,CKEDITOR.config.colorButton_colors="1ABC9C,2ECC71,3498DB,9B59B6,4E5F70,F1C40F,16A085,27AE60,2980B9,8E44AD,2C3E50,F39C12,E67E22,E74C3C,ECF0F1,95A5A6,DDD,FFF,D35400,C0392B,BDC3C7,7F8C8D,999,000",CKEDITOR.config.colorButton_foreStyle={element:"span",styles:{color:"#(color)"},overrides:[{element:"font",attributes:{color:null}}]},CKEDITOR.config.colorButton_backStyle={element:"span",styles:{"background-color":"#(color)"}},
CKEDITOR.config.colorButton_enableAutomatic=!0,CKEDITOR.config.colorButton_colorsPerRow=6,CKEDITOR.config.colorButton_historyRowLimit=1,CKEDITOR.config.colorButton_renderContentColors=!0,CKEDITOR.config.colorButton_contentsCss=[],CKEDITOR.plugins.colordialog={requires:"dialog",init:function(a){var h=new CKEDITOR.dialogCommand("colordialog");h.editorFocus=!1;a.addCommand("colordialog",h);CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js");a.getColorFromDialog=function(e,b,d){var h,
g,m,c;h=function(a){m(this);(a="ok"==a.name?this.getValueOf("picker","selectedColor"):null)&&!CKEDITOR.tools._isValidColorFormat(a)&&(a=null);/^[0-9a-f]{3}([0-9a-f]{3})?$/i.test(a)&&(a="#"+a);e.call(b,a)};g=function(a){d&&(a.data=d)};m=function(a){a.removeListener("ok",h);a.removeListener("cancel",h);a.removeListener("show",g)};c=function(a){a.on("ok",h);a.on("cancel",h);a.on("show",g,null,null,5)};a.execCommand("colordialog");if(a._.storedDialogs&&a._.storedDialogs.colordialog)c(a._.storedDialogs.colordialog);
else CKEDITOR.on("dialogDefinition",function(a){if("colordialog"==a.data.name){var b=a.data.definition;a.removeListener();b.onLoad=CKEDITOR.tools.override(b.onLoad,function(a){return function(){c(this);b.onLoad=a;"function"==typeof a&&a.call(this)}})}})}}},CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(a){for(var h=a.config.menu_groups.split(","),e=a._.menuGroups={},b=a._.menuItems={},d=0;d<h.length;d++)e[h[d]]=
d+1;a.addMenuGroup=function(a,b){e[a]=b||100};a.addMenuItem=function(a,d){e[d.group]&&(b[a]=new CKEDITOR.menuItem(this,a,d))};a.addMenuItems=function(a){for(var b in a)this.addMenuItem(b,a[b])};a.getMenuItem=function(a){return b[a]};a.removeMenuItem=function(a){delete b[a]}}}),function(){function a(a){a.sort(function(a,b){return a.group<b.group?-1:a.group>b.group?1:a.order<b.order?-1:a.order>b.order?1:0})}var h='\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1" _cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-label\x3d"{attrLabel}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"',
e="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(h+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(h+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');CKEDITOR.env.ie&&(e='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var h=h+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" onclick\x3d"'+e+'CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e')+
'\x3cspan class\x3d"cke_menubutton_inner"\x3e\x3cspan class\x3d"cke_menubutton_icon"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{iconStyle}"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"cke_menubutton_label"\x3e{label}\x3c/span\x3e{shortcutHtml}{arrowHtml}\x3c/span\x3e\x3c/a\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_voice_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e\x3c/span\x3e',b=CKEDITOR.addTemplate("menuItem",h),d=CKEDITOR.addTemplate("menuArrow",
'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),l=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,b){b=this._.definition=b||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=b.level||1;var c=CKEDITOR.tools.extend({},b.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-
1,block:{}}),d=c.block.attributes=c.attributes||{};!d.role&&(d.role="menu");this._.panelDefinition=c},_:{onShow:function(){var a=this.editor.getSelection(),b=a&&a.getStartElement(),c=this.editor.elementPath(),d=this._.listeners;this.removeAll();for(var f=0;f<d.length;f++){var e=d[f](b,a,c);if(e)for(var h in e){var l=this.editor.getMenuItem(h);!l||l.command&&!this.editor.getCommand(l.command).state||(l.state=e[h],this.add(l))}}},onClick:function(a){this.hide();if(a.onClick)a.onClick();else a.command&&
this.editor.execCommand(a.command)},onEscape:function(a){var b=this.parent;b?b._.panel.hideChild(1):27==a&&this.hide(1);return!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(a){var b=this._.subMenu,c=this.items[a];if(c=c.getItems&&c.getItems()){b?b.removeAll():(b=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),b.parent=this,b._.onClick=CKEDITOR.tools.bind(this._.onClick,this));for(var d in c){var f=this.editor.getMenuItem(d);
f&&(f.state=c[d],b.add(f))}var e=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+String(a));setTimeout(function(){b.show(e,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(a){a.order||(a.order=this.items.length);this.items.push(a)},removeAll:function(){this.items=[]},show:function(b,d,c,k){if(!this.parent&&(this._.onShow(),!this.items.length))return;d=d||("rtl"==this.editor.lang.dir?2:1);var f=this.items,e=this.editor,h=this._.panel,l=this._.element;if(!h){h=this._.panel=
new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);h.onEscape=CKEDITOR.tools.bind(function(a){if(!1===this._.onEscape(a))return!1},this);h.onShow=function(){h._.panel.getHolderElement().getParent().addClass("cke").addClass("cke_reset_all")};h.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);l=h.addBlock(this.id,this._.panelDefinition.block);l.autoSize=!0;var u=l.keys;u[40]="next";u[9]="next";u[38]="prev";u[CKEDITOR.SHIFT+
9]="prev";u["rtl"==e.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click";u[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(u[13]="mouseup");l=this._.element=l.element;u=l.getDocument();u.getBody().setStyle("overflow","hidden");u.getElementsByTag("html").getItem(0).setStyle("overflow","hidden");this._.itemOverFn=CKEDITOR.tools.addFunction(function(a){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,e.config.menu_subMenuDelay||400,this,[a])},
this);this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this);this._.itemClickFn=CKEDITOR.tools.addFunction(function(a){var b=this.items[a];if(b.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(b.getItems)this._.showSubMenu(a);else this._.onClick(b)},this)}a(f);for(var u=e.elementPath(),u=['\x3cdiv class\x3d"cke_menu'+(u&&u.direction()!=e.lang.dir?" cke_mixed_dir_content":"")+'" role\x3d"presentation"\x3e'],q=f.length,t=q&&f[0].group,z=0;z<q;z++){var p=
f[z];t!=p.group&&(u.push('\x3cdiv class\x3d"cke_menuseparator" role\x3d"separator"\x3e\x3c/div\x3e'),t=p.group);p.render(this,z,u)}u.push("\x3c/div\x3e");l.setHtml(u.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(h,this.id,b,d,c,k):h.showBlock(this.id,b,d,c,k);e.fire("menuShow",[h])},addListener:function(a){this._.listeners.push(a)},hide:function(a){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(a)},findItemByCommandName:function(a){var b=CKEDITOR.tools.array.filter(this.items,
function(b){return a===b.command});return b.length?(b=b[0],{item:b,element:this._.element.findOne("."+b.className)}):null}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(a,b,c){CKEDITOR.tools.extend(this,c,{order:0,className:"cke_menubutton__"+b});this.group=a._.menuGroups[this.group];this.editor=a;this.name=b},proto:{render:function(a,e,c){var k=a.id+String(e),f="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,h="",r=this.editor,v,u,q=f==CKEDITOR.TRISTATE_ON?"on":f==CKEDITOR.TRISTATE_DISABLED?
"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(h=' aria-checked\x3d"'+(f==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var t=this.getItems,z="\x26#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",p=this.name;this.icon&&!/\./.test(this.icon)&&(p=this.icon);this.command&&(v=r.getCommand(this.command),(v=r.getCommandKeystroke(v))&&(u=CKEDITOR.tools.keystrokeToString(r.lang.common.keyboard,v)));v=CKEDITOR.tools.htmlEncodeAttr(this.label);a={id:k,name:this.name,iconName:p,label:this.label,
attrLabel:v,cls:this.className||"",state:q,hasPopup:t?"true":"false",disabled:f==CKEDITOR.TRISTATE_DISABLED,title:v+(u?" ("+u.display+")":""),ariaShortcut:u?r.lang.common.keyboardShortcut+" "+u.aria:"",href:"javascript:void('"+(v||"").replace("'")+"')",hoverFn:a._.itemOverFn,moveOutFn:a._.itemOutFn,clickFn:a._.itemClickFn,index:e,iconStyle:CKEDITOR.skin.getIconStyle(p,"rtl"==this.editor.lang.dir,p==this.icon?null:this.icon,this.iconOffset),shortcutHtml:u?l.output({shortcut:u.display}):"",arrowHtml:t?
d.output({label:z}):"",role:this.role?this.role:"menuitem",ariaChecked:h};b.output(a,c)}}})}(),CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div",CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,$:function(a){this.base.call(this,a,{panel:{css:a.config.contextmenu_contentsCss,
className:"cke_menu_panel",attributes:{"aria-label":a.lang.contextmenu.options}}})},proto:{addTarget:function(a,h){function e(){d=!1}var b,d;a.on("contextmenu",function(a){a=a.data;var e=CKEDITOR.env.webkit?b:CKEDITOR.env.mac?a.$.metaKey:a.$.ctrlKey;if(!h||!e)if(a.preventDefault(),!d){if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var e=this.editor,c=(new CKEDITOR.dom.elementPath(a.getTarget(),e.editable())).contains(function(a){return a.hasAttribute("contenteditable")},!0);c&&"false"==c.getAttribute("contenteditable")&&
e.getSelection().fake(c)}var c=a.getTarget().getDocument(),k=a.getTarget().getDocument().getDocumentElement(),e=!c.equals(CKEDITOR.document),c=c.getWindow().getScrollPosition(),f=e?a.$.clientX:a.$.pageX||c.x+a.$.clientX,l=e?a.$.clientY:a.$.pageY||c.y+a.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(k,null,f,l)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.webkit){var l=function(){b=0};a.on("keydown",function(a){b=CKEDITOR.env.mac?a.data.$.metaKey:a.data.$.ctrlKey});a.on("keyup",l);
a.on("contextmenu",l)}CKEDITOR.env.gecko&&!CKEDITOR.env.mac&&(a.on("keydown",function(a){a.data.$.shiftKey&&121===a.data.$.keyCode&&(d=!0)},null,null,0),a.on("keyup",e),a.on("contextmenu",e))},open:function(a,h,e,b){!1!==this.editor.config.enableContextMenu&&this.editor.getSelection().getType()!==CKEDITOR.SELECTION_NONE&&(this.editor.focus(),a=a||CKEDITOR.document.getDocumentElement(),this.editor.selectionChange(1),this.show(a,h,e,b))}}})},beforeInit:function(a){var h=a.contextMenu=new CKEDITOR.plugins.contextMenu(a);
a.on("contentDom",function(){h.addTarget(a.editable(),!1!==a.config.browserContextMenuOnCtrl)});a.addCommand("contextMenu",{exec:function(a){var b=0,d=0,h=a.getSelection().getRanges(),h=h[h.length-1].getClientRects(a.editable().isInline());if(h=h[h.length-1])b=h["rtl"===a.lang.dir?"left":"right"],d=h.bottom;a.contextMenu.open(a.document.getBody().getParent(),null,b,d)}});a.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");a.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),function(){function a(a,
b,c,d){var f=new CKEDITOR.dom.walker(a);if(a=a.startContainer.getAscendant(b,!0)||a.endContainer.getAscendant(b,!0))if(c(a),d)return;for(;a=f.next();)if(a=a.getAscendant(b,!0))if(c(a),d)break}function h(a,d){var c={ul:"ol",ol:"ul"};return-1!==b(d,function(b){return b.element===a||b.element===c[a]})}function e(a){this.styles=null;this.sticky=!1;this.editor=a;this.filter=new CKEDITOR.filter(a,a.config.copyFormatting_allowRules);!0===a.config.copyFormatting_allowRules&&(this.filter.disabled=!0);a.config.copyFormatting_disallowRules&&
this.filter.disallow(a.config.copyFormatting_disallowRules)}var b=CKEDITOR.tools.indexOf,d=CKEDITOR.tools.getMouseButton,l=!1;CKEDITOR.plugins.add("copyformatting",{lang:"ar,az,bg,cs,da,de,de-ch,el,en,en-au,eo,es-mx,et,eu,fa,fr,gl,hr,hu,it,ja,ko,ku,lv,nb,nl,oc,pl,pt,pt-br,ro,ru,sk,sq,sr,sr-latn,sv,tr,uk,vi,zh,zh-cn",icons:"copyformatting",hidpi:!0,init:function(a){var e=CKEDITOR.plugins.copyformatting;e._addScreenReaderContainer();l||(CKEDITOR.document.appendStyleSheet(this.path+"styles/copyformatting.css"),
l=!0);a.addContentsCss&&a.addContentsCss(this.path+"styles/copyformatting.css");a.copyFormatting=new e.state(a);a.addCommand("copyFormatting",e.commands.copyFormatting);a.addCommand("applyFormatting",e.commands.applyFormatting);a.ui.addButton("CopyFormatting",{isToggle:!0,label:a.lang.copyformatting.label,command:"copyFormatting",toolbar:"cleanup,0"});a.on("contentDom",function(){var b=a.getCommand("copyFormatting"),k=a.editable(),f=k.isInline()?k:a.document,e=a.ui.get("CopyFormatting");k.attachListener(f,
"mouseup",function(f){d(f)===CKEDITOR.MOUSE_BUTTON_LEFT&&b.state===CKEDITOR.TRISTATE_ON&&a.execCommand("applyFormatting")});k.attachListener(CKEDITOR.document,"mouseup",function(f){d(f)!==CKEDITOR.MOUSE_BUTTON_LEFT||b.state!==CKEDITOR.TRISTATE_ON||k.contains(f.data.getTarget())||a.execCommand("copyFormatting")});e&&(f=CKEDITOR.document.getById(e._.id),k.attachListener(f,"dblclick",function(){a.execCommand("copyFormatting",{sticky:!0})}),k.attachListener(f,"mouseup",function(a){a.data.stopPropagation()}))});
a.config.copyFormatting_keystrokeCopy&&a.setKeystroke(a.config.copyFormatting_keystrokeCopy,"copyFormatting");a.on("key",function(b){var d=a.getCommand("copyFormatting");b=b.data.domEvent;b.getKeystroke&&27===b.getKeystroke()&&d.state===CKEDITOR.TRISTATE_ON&&a.execCommand("copyFormatting")});a.copyFormatting.on("extractFormatting",function(b){var d=b.data.element;if(d.contains(a.editable())||d.equals(a.editable()))return b.cancel();d=e._convertElementToStyleDef(d);if(!a.copyFormatting.filter.check(new CKEDITOR.style(d),
!0,!0))return b.cancel();b.data.styleDef=d});a.copyFormatting.on("applyFormatting",function(c){if(!c.data.preventFormatStripping){var d=c.data.range,f=e._extractStylesFromRange(a,d),l=e._determineContext(d),r,v;if(a.copyFormatting._isContextAllowed(l))for(v=0;v<f.length;v++)l=f[v],r=d.createBookmark(),-1===b(e.preservedElements,l.element)?CKEDITOR.env.webkit&&!CKEDITOR.env.chrome?f[v].removeFromRange(c.data.range,c.editor):f[v].remove(c.editor):h(l.element,c.data.styles)&&e._removeStylesFromElementInRange(d,
l.element),d.moveToBookmark(r)}});a.copyFormatting.on("applyFormatting",function(b){var d=CKEDITOR.plugins.copyformatting,f=d._determineContext(b.data.range);"list"===f&&a.copyFormatting._isContextAllowed("list")?d._applyStylesToListContext(b.editor,b.data.range,b.data.styles):"table"===f&&a.copyFormatting._isContextAllowed("table")?d._applyStylesToTableContext(b.editor,b.data.range,b.data.styles):a.copyFormatting._isContextAllowed("text")&&d._applyStylesToTextContext(b.editor,b.data.range,b.data.styles)},
null,null,999)}});e.prototype._isContextAllowed=function(a){var d=this.editor.config.copyFormatting_allowedContexts;return!0===d||-1!==b(d,a)};CKEDITOR.event.implementOn(e.prototype);CKEDITOR.plugins.copyformatting={state:e,inlineBoundary:"h1 h2 h3 h4 h5 h6 p div".split(" "),excludedAttributes:["id","style","href","data-cke-saved-href","dir"],elementsForInlineTransform:["li"],excludedElementsFromInlineTransform:["table","thead","tbody","ul","ol"],excludedAttributesFromInlineTransform:["value","type"],
preservedElements:"ul ol li td th tr thead tbody table".split(" "),breakOnElements:["ul","ol","table"],_initialKeystrokePasteCommand:null,commands:{copyFormatting:{exec:function(a,b){var c=CKEDITOR.plugins.copyformatting,d=a.copyFormatting,f=b?"keystrokeHandler"==b.from:!1,e=b?b.sticky||f:!1,h=c._getCursorContainer(a),l=CKEDITOR.document.getDocumentElement();if(this.state===CKEDITOR.TRISTATE_ON)return d.styles=null,d.sticky=!1,h.removeClass("cke_copyformatting_active"),l.removeClass("cke_copyformatting_disabled"),
l.removeClass("cke_copyformatting_tableresize_cursor"),c._putScreenReaderMessage(a,"canceled"),c._detachPasteKeystrokeHandler(a),this.setState(CKEDITOR.TRISTATE_OFF);d.styles=c._extractStylesFromElement(a,a.elementPath().lastElement);this.setState(CKEDITOR.TRISTATE_ON);f||(h.addClass("cke_copyformatting_active"),l.addClass("cke_copyformatting_tableresize_cursor"),a.config.copyFormatting_outerCursor&&l.addClass("cke_copyformatting_disabled"));d.sticky=e;c._putScreenReaderMessage(a,"copied");c._attachPasteKeystrokeHandler(a)}},
applyFormatting:{editorFocus:CKEDITOR.env.ie&&!CKEDITOR.env.edge?!1:!0,exec:function(a,b){var c=a.getCommand("copyFormatting"),d=b?"keystrokeHandler"==b.from:!1,f=CKEDITOR.plugins.copyformatting,e=a.copyFormatting,h=f._getCursorContainer(a),l=CKEDITOR.document.getDocumentElement();if(d&&!e.styles)return f._putScreenReaderMessage(a,"failed"),f._detachPasteKeystrokeHandler(a),!1;d=f._applyFormat(a,e.styles);e.sticky||(e.styles=null,h.removeClass("cke_copyformatting_active"),l.removeClass("cke_copyformatting_disabled"),
l.removeClass("cke_copyformatting_tableresize_cursor"),c.setState(CKEDITOR.TRISTATE_OFF),f._detachPasteKeystrokeHandler(a));f._putScreenReaderMessage(a,d?"applied":"canceled")}}},_getCursorContainer:function(a){return a.elementMode===CKEDITOR.ELEMENT_MODE_INLINE?a.editable():a.editable().getParent()},_convertElementToStyleDef:function(a){var b=CKEDITOR.tools,c=a.getAttributes(CKEDITOR.plugins.copyformatting.excludedAttributes),b=b.parseCssText(a.getAttribute("style"),!0,!0);return{element:a.getName(),
type:CKEDITOR.STYLE_INLINE,attributes:c,styles:b}},_extractStylesFromElement:function(a,d){var c={},e=[];do if(d.type===CKEDITOR.NODE_ELEMENT&&!d.hasAttribute("data-cke-bookmark")&&(c.element=d,a.copyFormatting.fire("extractFormatting",c,a)&&c.styleDef&&e.push(new CKEDITOR.style(c.styleDef)),d.getName&&-1!==b(CKEDITOR.plugins.copyformatting.breakOnElements,d.getName())))break;while((d=d.getParent())&&d.type===CKEDITOR.NODE_ELEMENT);return e},_extractStylesFromRange:function(a,b){for(var c=[],d=new CKEDITOR.dom.walker(b),
f;f=d.next();)c=c.concat(CKEDITOR.plugins.copyformatting._extractStylesFromElement(a,f));return c},_removeStylesFromElementInRange:function(a,d){for(var c=-1!==b(["ol","ul","table"],d),e=new CKEDITOR.dom.walker(a),f;f=e.next();)if(f=f.getAscendant(d,!0))if(f.removeAttributes(f.getAttributes()),c)break},_getSelectedWordOffset:function(a){function d(a,b){return a[b?"getPrevious":"getNext"](function(a){return a.type!==CKEDITOR.NODE_COMMENT})}function c(a){return a.type==CKEDITOR.NODE_ELEMENT?(a=a.getHtml().replace(/<span.*?>&nbsp;<\/span>/g,
""),a.replace(/<.*?>/g,"")):a.getText()}function e(a,f){var g=a,h=/\s/g,l="p br ol ul li td th div caption body".split(" "),n=!1,w=!1,r,q;do{for(r=d(g,f);!r&&g.getParent();){g=g.getParent();if(-1!==b(l,g.getName())){w=n=!0;break}r=d(g,f)}if(r&&r.getName&&-1!==b(l,r.getName())){n=!0;break}g=r}while(g&&g.getStyle&&("none"==g.getStyle("display")||!g.getText()));for(g||(g=a);g.type!==CKEDITOR.NODE_TEXT;)g=!n||f||w?g.getChild(0):g.getChild(g.getChildCount()-1);for(l=c(g);null!=(w=h.exec(l))&&(q=w.index,
f););if("number"!==typeof q&&!n)return e(g,f);if(n)f?q=0:(h=/([\.\b]*$)/,q=(w=h.exec(l))?w.index:l.length);else if(f&&(q+=1,q>l.length))return e(g);return{node:g,offset:q}}var f=/\b\w+\b/ig,h,l,v,u,q;v=u=q=a.startContainer;for(h=c(v);null!=(l=f.exec(h));)if(l.index+l[0].length>=a.startOffset)return a=l.index,f=l.index+l[0].length,0===l.index&&(l=e(v,!0),u=l.node,a=l.offset),f>=h.length&&(h=e(v),q=h.node,f=h.offset),{startNode:u,startOffset:a,endNode:q,endOffset:f};return null},_filterStyles:function(a){var b=
CKEDITOR.tools.isEmpty,c=[],d,f;for(f=0;f<a.length;f++)d=a[f]._.definition,-1!==CKEDITOR.tools.indexOf(CKEDITOR.plugins.copyformatting.inlineBoundary,d.element)&&(d.element=a[f].element="span"),"span"===d.element&&b(d.attributes)&&b(d.styles)||c.push(a[f]);return c},_determineContext:function(a){function b(c){var d=new CKEDITOR.dom.walker(a),f;if(a.startContainer.getAscendant(c,!0)||a.endContainer.getAscendant(c,!0))return!0;for(;f=d.next();)if(f.getAscendant(c,!0))return!0}return b({ul:1,ol:1})?
"list":b("table")?"table":"text"},_applyStylesToTextContext:function(a,d,c){var e=CKEDITOR.plugins.copyformatting,f=e.excludedAttributesFromInlineTransform,h,l;CKEDITOR.env.webkit&&!CKEDITOR.env.chrome&&a.getSelection().selectRanges([d]);for(h=0;h<c.length;h++)if(d=c[h],-1===b(e.excludedElementsFromInlineTransform,d.element)){if(-1!==b(e.elementsForInlineTransform,d.element))for(d.element=d._.definition.element="span",l=0;l<f.length;l++)d._.definition.attributes[f[l]]&&delete d._.definition.attributes[f[l]];
d.apply(a)}},_applyStylesToListContext:function(b,d,c){var e,f,h;for(h=0;h<c.length;h++)e=c[h],f=d.createBookmark(),"ol"===e.element||"ul"===e.element?a(d,{ul:1,ol:1},function(a){var b=e;a.getName()!==b.element&&a.renameNode(b.element);b.applyToObject(a)},!0):"li"===e.element?a(d,"li",function(a){e.applyToObject(a)}):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(b,d,[e]),d.moveToBookmark(f)},_applyStylesToTableContext:function(d,e,c){function k(a,b){a.getName()!==b.element&&(b=b.getDefinition(),
b.element=a.getName(),b=new CKEDITOR.style(b));b.applyToObject(a)}var f,h,l;for(l=0;l<c.length;l++)f=c[l],h=e.createBookmark(),-1!==b(["table","tr"],f.element)?a(e,f.element,function(a){f.applyToObject(a)}):-1!==b(["td","th"],f.element)?a(e,{td:1,th:1},function(a){k(a,f)}):-1!==b(["thead","tbody"],f.element)?a(e,{thead:1,tbody:1},function(a){k(a,f)}):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(d,e,[f]),e.moveToBookmark(h)},_applyFormat:function(a,b){var c=a.getSelection().getRanges()[0],
d=CKEDITOR.plugins.copyformatting,f,e;if(!c)return!1;if(c.collapsed){e=a.getSelection().createBookmarks();if(!(f=d._getSelectedWordOffset(c)))return;c=a.createRange();c.setStart(f.startNode,f.startOffset);c.setEnd(f.endNode,f.endOffset);c.select()}b=d._filterStyles(b);if(!a.copyFormatting.fire("applyFormatting",{styles:b,range:c,preventFormatStripping:!1},a))return!1;e&&a.getSelection().selectBookmarks(e);return!0},_putScreenReaderMessage:function(a,b){var c=this._getScreenReaderContainer();c&&c.setText(a.lang.copyformatting.notification[b])},
_addScreenReaderContainer:function(){if(this._getScreenReaderContainer())return this._getScreenReaderContainer();if(!CKEDITOR.env.ie6Compat&&!CKEDITOR.env.ie7Compat)return CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_screen_reader_only cke_copyformatting_notification"\x3e\x3cdiv aria-live\x3d"polite"\x3e\x3c/div\x3e\x3c/div\x3e')).getChild(0)},_getScreenReaderContainer:function(){if(!CKEDITOR.env.ie6Compat&&!CKEDITOR.env.ie7Compat)return CKEDITOR.document.getBody().findOne(".cke_copyformatting_notification div[aria-live]")},
_attachPasteKeystrokeHandler:function(a){var b=a.config.copyFormatting_keystrokePaste;b&&(this._initialKeystrokePasteCommand=a.keystrokeHandler.keystrokes[b],a.setKeystroke(b,"applyFormatting"))},_detachPasteKeystrokeHandler:function(a){var b=a.config.copyFormatting_keystrokePaste;b&&a.setKeystroke(b,this._initialKeystrokePasteCommand||!1)}};CKEDITOR.config.copyFormatting_outerCursor=!0;CKEDITOR.config.copyFormatting_allowRules="b s u i em strong span p div td th ol ul li(*)[*]{*}";CKEDITOR.config.copyFormatting_disallowRules=
"*[data-cke-widget*,data-widget*,data-cke-realelement](cke_widget*)";CKEDITOR.config.copyFormatting_allowedContexts=!0;CKEDITOR.config.copyFormatting_keystrokeCopy=CKEDITOR.CTRL+CKEDITOR.SHIFT+67;CKEDITOR.config.copyFormatting_keystrokePaste=CKEDITOR.CTRL+CKEDITOR.SHIFT+86}(),function(){function a(a){var d=this.att;a=a&&a.hasAttribute(d)&&a.getAttribute(d)||"";void 0!==a&&this.setValue(a)}function h(){for(var a,d=0;d<arguments.length;d++)if(arguments[d]instanceof CKEDITOR.dom.element){a=arguments[d];
break}if(a){var d=this.att,e=this.getValue();e?a.setAttribute(d,e):a.removeAttribute(d,e)}}var e={id:1,dir:1,classes:1,styles:1};CKEDITOR.plugins.add("dialogadvtab",{requires:"dialog",allowedContent:function(a){a||(a=e);var d=[];a.id&&d.push("id");a.dir&&d.push("dir");var h="";d.length&&(h+="["+d.join(",")+"]");a.classes&&(h+="(*)");a.styles&&(h+="{*}");return h},createAdvancedTab:function(b,d,l){d||(d=e);var g=b.lang.common,m={id:"advanced",label:g.advancedTab,title:g.advancedTab,elements:[{type:"vbox",
padding:1,children:[]}]},c=[];if(d.id||d.dir)d.id&&c.push({id:"advId",att:"id",type:"text",requiredContent:l?l+"[id]":null,label:g.id,setup:a,commit:h}),d.dir&&c.push({id:"advLangDir",att:"dir",type:"select",requiredContent:l?l+"[dir]":null,label:g.langDir,"default":"",style:"width:100%",items:[[g.notSet,""],[g.langDirLTR,"ltr"],[g.langDirRTL,"rtl"]],setup:a,commit:h}),m.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(c)});if(d.styles||d.classes)c=[],d.styles&&c.push({id:"advStyles",
att:"style",type:"text",requiredContent:l?l+"{cke-xyz}":null,label:g.styles,"default":"",validate:CKEDITOR.dialog.validate.inlineStyle(g.invalidInlineStyle),onChange:function(){},getStyle:function(a,b){var c=this.getValue().match(new RegExp("(?:^|;)\\s*"+a+"\\s*:\\s*([^;]*)","i"));return c?c[1]:b},updateStyle:function(a,c){var d=this.getValue(),g=b.document.createElement("span");g.setAttribute("style",d);g.setStyle(a,c);d=CKEDITOR.tools.normalizeCssText(g.getAttribute("style"));this.setValue(d,1)},
setup:a,commit:h}),d.classes&&c.push({type:"hbox",widths:["45%","55%"],children:[{id:"advCSSClasses",att:"class",type:"text",requiredContent:l?l+"(cke-xyz)":null,label:g.cssClasses,"default":"",setup:a,commit:h}]}),m.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(c)});return m}})}(),function(){CKEDITOR.plugins.add("div",{requires:"dialog",init:function(a){if(!a.blockless){var h=a.lang.div,e="div(*)";CKEDITOR.dialog.isTabEnabled(a,"editdiv","advanced")&&(e+=";div[dir,id,lang,title]{*}");
a.addCommand("creatediv",new CKEDITOR.dialogCommand("creatediv",{allowedContent:e,requiredContent:"div",contextSensitive:!0,contentTransformations:[["div: alignmentToStyle"]],refresh:function(a,d){this.setState("div"in(a.config.div_wrapTable?d.root:d.blockLimit).getDtd()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}}));a.addCommand("editdiv",new CKEDITOR.dialogCommand("editdiv",{requiredContent:"div"}));a.addCommand("removediv",{requiredContent:"div",exec:function(a){function d(c){(c=CKEDITOR.plugins.div.getSurroundDiv(a,
c))&&!c.data("cke-div-added")&&(k.push(c),c.data("cke-div-added"))}for(var e=a.getSelection(),g=e&&e.getRanges(),h,c=e.createBookmarks(),k=[],f=0;f<g.length;f++)h=g[f],h.collapsed?d(e.getStartElement()):(h=new CKEDITOR.dom.walker(h),h.evaluator=d,h.lastForward());for(f=0;f<k.length;f++)k[f].remove(!0);e.selectBookmarks(c)}});a.ui.addButton&&a.ui.addButton("CreateDiv",{label:h.toolbar,command:"creatediv",toolbar:"blocks,50"});a.addMenuItems&&(a.addMenuItems({editdiv:{label:h.edit,command:"editdiv",
group:"div",order:1},removediv:{label:h.remove,command:"removediv",group:"div",order:5}}),a.contextMenu&&a.contextMenu.addListener(function(b){return!b||b.isReadOnly()?null:CKEDITOR.plugins.div.getSurroundDiv(a)?{editdiv:CKEDITOR.TRISTATE_OFF,removediv:CKEDITOR.TRISTATE_OFF}:null}));CKEDITOR.dialog.add("creatediv",this.path+"dialogs/div.js");CKEDITOR.dialog.add("editdiv",this.path+"dialogs/div.js")}}});CKEDITOR.plugins.div={getSurroundDiv:function(a,h){var e=a.elementPath(h);return a.elementPath(e.blockLimit).contains(function(a){return a.is("div")&&
!a.isReadOnly()},1)}}}(),function(){function a(a,d,e){var g=h;e&&(g=CKEDITOR.tools.debounce(h,e));a.on(d,g,null,{editor:a})}function h(a){var d=a.listenerData.editor;a=d.focusManager.hasFocus;var h=d.editable(),g=d.config.editorplaceholder,m=/<body.*?>((?:.|[\n\r])*?)<\/body>/i,c=d.config.fullPage,d=d.getData();c&&(m=d.match(m))&&1<m.length&&(d=m[1]);if(0!==d.length||a)return h.removeAttribute(e);h.setAttribute(e,g)}CKEDITOR.plugins.add("editorplaceholder",{isSupportedEnvironment:function(){return!CKEDITOR.env.ie||
9<=CKEDITOR.env.version},onLoad:function(){CKEDITOR.addCss(CKEDITOR.plugins.editorplaceholder.styles)},init:function(b){this.isSupportedEnvironment()&&b.config.editorplaceholder&&(a(b,"contentDom"),a(b,"focus"),a(b,"blur"),a(b,"change",b.config.editorplaceholder_delay))}});var e="data-cke-editorplaceholder";CKEDITOR.plugins.editorplaceholder={styles:"["+e+"]::before {position: absolute;opacity: .8;color: #aaa;content: attr( "+e+" );}.cke_wysiwyg_div["+e+"]::before {margin-top: 1em;}"};CKEDITOR.config.editorplaceholder_delay=
150;CKEDITOR.config.editorplaceholder=""}(),function(){function a(a,e){function g(b){b=f.list[b];var c;b.equals(a.editable())||"true"==b.getAttribute("contenteditable")?(c=a.createRange(),c.selectNodeContents(b),c=c.select()):(c=a.getSelection(),c.selectElement(b));CKEDITOR.env.ie&&a.fire("selectionChange",{selection:c,path:new CKEDITOR.dom.elementPath(b)});a.focus()}function m(){k&&k.setHtml('\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');delete f.list}var c=a.ui.spaceId("path"),
k,f=a._.elementsPath,n=f.idBase;e.html+='\x3cspan id\x3d"'+c+'_label" class\x3d"cke_voice_label"\x3e'+a.lang.elementspath.eleLabel+'\x3c/span\x3e\x3cspan id\x3d"'+c+'" class\x3d"cke_path" role\x3d"group" aria-labelledby\x3d"'+c+'_label"\x3e\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e\x3c/span\x3e';a.on("uiReady",function(){var b=a.ui.space("path");b&&a.focusManager.add(b,1)});f.onClick=g;var r=CKEDITOR.tools.addFunction(g),v=CKEDITOR.tools.addFunction(function(b,c){var e=f.idBase,
k;c=new CKEDITOR.dom.event(c);k="rtl"==a.lang.dir;switch(c.getKeystroke()){case k?39:37:case 9:return(k=CKEDITOR.document.getById(e+(b+1)))||(k=CKEDITOR.document.getById(e+"0")),k.focus(),!1;case k?37:39:case CKEDITOR.SHIFT+9:return(k=CKEDITOR.document.getById(e+(b-1)))||(k=CKEDITOR.document.getById(e+(f.list.length-1))),k.focus(),!1;case 27:return a.focus(),!1;case 13:case 32:return g(b),!1;case CKEDITOR.ALT+121:return a.execCommand("toolbarFocus"),!1}return!0});a.on("selectionChange",function(g){for(var e=
[],h=f.list=[],l=[],m=f.filters,A=!0,y=g.data.path.elements,x=y.length;x--;){var w=y[x],B=0;g=w.data("cke-display-name")?w.data("cke-display-name"):w.data("cke-real-element-type")?w.data("cke-real-element-type"):w.getName();(A=w.hasAttribute("contenteditable")?"true"==w.getAttribute("contenteditable"):A)||w.hasAttribute("contenteditable")||(B=1);for(var D=0;D<m.length;D++){var C=m[D](w,g);if(!1===C){B=1;break}g=C||g}B||(h.unshift(w),l.unshift(g))}h=h.length;for(m=0;m<h;m++)g=l[m],A=a.lang.elementspath.eleTitle.replace(/%1/,
g),g=b.output({id:n+m,label:A,text:g,jsTitle:"javascript:void('"+g+"')",index:m,keyDownFn:v,clickFn:r}),e.unshift(g);k||(k=CKEDITOR.document.getById(c));l=k;l.setHtml(e.join("")+'\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');a.fire("elementsPathUpdate",{space:l})});a.on("readOnly",m);a.on("contentDomUnload",m);a.addCommand("elementsPathFocus",h.toolbarFocus);a.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}var h={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(a){(a=CKEDITOR.document.getById(a._.elementsPath.idBase+
"0"))&&a.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}}},e="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(e+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var b=CKEDITOR.addTemplate("pathItem",'\x3ca id\x3d"{id}" href\x3d"{jsTitle}" tabindex\x3d"-1" class\x3d"cke_path_item" title\x3d"{label}"'+e+' hidefocus\x3d"true"  draggable\x3d"false"  ondragstart\x3d"return false;" onkeydown\x3d"return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );" onclick\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;" role\x3d"button" aria-label\x3d"{label}"\x3e{text}\x3c/a\x3e');
CKEDITOR.plugins.add("elementspath",{init:function(b){b._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",filters:[]};b.on("uiSpace",function(e){"bottom"==e.data.space&&a(b,e.data)})}})}(),function(){function a(a,b,c){c=a.config.forceEnterMode||c;if("wysiwyg"==a.mode){b||(b=a.activeEnterMode);var d=a.elementPath();d&&!d.isContextFor("p")&&(b=CKEDITOR.ENTER_BR,c=1);a.fire("saveSnapshot");b==CKEDITOR.ENTER_BR?g(a,b,null,c):m(a,b,null,c);a.fire("saveSnapshot")}}function h(a){a=
a.getSelection().getRanges(!0);for(var b=a.length-1;0<b;b--)a[b].deleteContents();return a[0]}function e(a){var b=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"true"==a.getAttribute("contenteditable")},!0);if(a.root.equals(b))return a;b=new CKEDITOR.dom.range(b);b.moveToRange(a);return b}CKEDITOR.plugins.add("enterkey",{init:function(b){b.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(b){a(b)}});b.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,
exec:function(b){a(b,b.activeShiftEnterMode,1)}});b.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(),l,g,m,c;CKEDITOR.plugins.enterkey={enterBlock:function(a,f,l,m){function v(a){var b;if(a===CKEDITOR.ENTER_BR||-1===CKEDITOR.tools.indexOf(["td","th"],z.lastElement.getName())||1!==z.lastElement.getChildCount())return!1;a=z.lastElement.getChild(0).clone(!0);(b=a.getBogus())&&b.remove();return a.getText().length?
!1:!0}if(l=l||h(a)){l=e(l);var u=l.document,q=l.checkStartOfBlock(),t=l.checkEndOfBlock(),z=a.elementPath(l.startContainer),p=z.block,A=f==CKEDITOR.ENTER_DIV?"div":"p",y;if(p&&q&&t){q=p.getParent();if(q.is("li")&&1<q.getChildCount()){u=new CKEDITOR.dom.element("li");y=a.createRange();u.insertAfter(q);p.remove();y.setStart(u,0);a.getSelection().selectRanges([y]);return}if(p.is("li")||p.getParent().is("li")){p.is("li")||(p=p.getParent(),q=p.getParent());y=q.getParent();l=!p.hasPrevious();var x=!p.hasNext();
m=a.getSelection();var A=m.createBookmarks(),w=p.getDirection(1),t=p.getAttribute("class"),B=p.getAttribute("style"),D=y.getDirection(1)!=w;a=a.enterMode!=CKEDITOR.ENTER_BR||D||B||t;if(y.is("li"))l||x?(l&&x&&q.remove(),p[x?"insertAfter":"insertBefore"](y)):p.breakParent(y);else{if(a)if(z.block.is("li")?(y=u.createElement(f==CKEDITOR.ENTER_P?"p":"div"),D&&y.setAttribute("dir",w),B&&y.setAttribute("style",B),t&&y.setAttribute("class",t),p.moveChildren(y)):y=z.block,l||x)y[l?"insertBefore":"insertAfter"](q);
else p.breakParent(q),y.insertAfter(q);else if(p.appendBogus(!0),l||x)for(;u=p[l?"getFirst":"getLast"]();)u[l?"insertBefore":"insertAfter"](q);else for(p.breakParent(q);u=p.getLast();)u.insertAfter(q);p.remove()}m.selectBookmarks(A);return}if(p&&p.getParent().is("blockquote")){p.breakParent(p.getParent());p.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||p.getPrevious().remove();p.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||p.getNext().remove();l.moveToElementEditStart(p);l.select();
return}}else if(p&&p.is("pre")&&!t){g(a,f,l,m);return}if(B=l.splitBlock(A)){a=B.previousBlock;p=B.nextBlock;q=B.wasStartOfBlock;t=B.wasEndOfBlock;p?(x=p.getParent(),x.is("li")&&(p.breakParent(x),p.move(p.getNext(),1))):a&&(x=a.getParent())&&x.is("li")&&(a.breakParent(x),x=a.getNext(),l.moveToElementEditStart(x),a.move(a.getPrevious()));if(q||t)if(v(f))l.moveToElementEditStart(l.getTouchedStartNode());else{if(a){if(a.is("li")||!c.test(a.getName())&&!a.is("pre"))y=a.clone()}else p&&(y=p.clone());y?
m&&!y.is("li")&&y.renameNode(A):x&&x.is("li")?y=x:(y=u.createElement(A),a&&(w=a.getDirection())&&y.setAttribute("dir",w));if(u=B.elementPath)for(f=0,m=u.elements.length;f<m;f++){A=u.elements[f];if(A.equals(u.block)||A.equals(u.blockLimit))break;CKEDITOR.dtd.$removeEmpty[A.getName()]&&(A=A.clone(),y.moveChildren(A),y.append(A))}y.appendBogus();y.getParent()||l.insertNode(y);y.is("li")&&y.removeAttribute("value");!CKEDITOR.env.ie||!q||t&&a.getChildCount()||(l.moveToElementEditStart(t?a:y),l.select());
l.moveToElementEditStart(q&&!t?p:y)}else p.is("li")&&(y=l.clone(),y.selectNodeContents(p),y=new CKEDITOR.dom.walker(y),y.evaluator=function(a){return!(d(a)||b(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty))},(x=y.next())&&x.type==CKEDITOR.NODE_ELEMENT&&x.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?u.createElement("br"):u.createText(" ")).insertBefore(x)),p&&l.moveToElementEditStart(p);l.select();l.scrollIntoView()}}},enterBr:function(a,b,
d,g){if(d=d||h(a)){var e=d.document,l=d.checkEndOfBlock(),q=new CKEDITOR.dom.elementPath(a.getSelection().getStartElement()),t=q.block,z=t&&q.block.getName();g||"li"!=z?(!g&&l&&c.test(z)?(l=t.getDirection())?(e=e.createElement("div"),e.setAttribute("dir",l),e.insertAfter(t),d.setStart(e,0)):(e.createElement("br").insertAfter(t),CKEDITOR.env.gecko&&e.createText("").insertAfter(t),d.setStartAt(t.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(a="pre"==z&&CKEDITOR.env.ie&&
8>CKEDITOR.env.version?e.createText("\r"):e.createElement("br"),d.deleteContents(),d.insertNode(a),CKEDITOR.env.needsBrFiller?(e.createText("﻿").insertAfter(a),l&&(t||q.blockLimit).appendBogus(),a.getNext().$.nodeValue="",d.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):d.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),d.collapse(!0),d.select(),d.scrollIntoView()):m(a,b,d,g)}}};l=CKEDITOR.plugins.enterkey;g=l.enterBr;m=l.enterBlock;c=/^h[1-6]$/}(),function(){function a(a,e){var b={},d=[],l={nbsp:" ",
shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,c){var g=e?"\x26"+c+";":l[c];b[g]=e?l[c]:"\x26"+c+";";d.push(g);return""});a=a.replace(/,$/,"");if(!e&&a){a=a.split(",");var g=document.createElement("div"),m;g.innerHTML="\x26"+a.join(";\x26")+";";m=g.innerHTML;g=null;for(g=0;g<m.length;g++){var c=m.charAt(g);b[c]="\x26"+a[g]+";";d.push(c)}}b.regex=d.join(e?"|":"");return b}CKEDITOR.plugins.add("entities",{afterInit:function(h){function e(a){return c[a]}
function b(a){return"force"!=d.entities_processNumerical&&g[a]?g[a]:"\x26#"+(CKEDITOR.env.ie?a.charCodeAt(0):a.codePointAt(0))+";"}var d=h.config;if(h=(h=h.dataProcessor)&&h.htmlFilter){var l=[];!1!==d.basicEntities&&l.push("nbsp,gt,lt,amp");d.entities&&(l.length&&l.push("quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro"),
d.entities_latin&&l.push("Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml"),d.entities_greek&&l.push("Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv"),
d.entities_additional&&l.push(d.entities_additional));var g=a(l.join(",")),m=g.regex?"["+g.regex+"]":"a^";delete g.regex;d.entities&&d.entities_processNumerical&&(m="[^ -~]|"+m);var m=new RegExp(m,CKEDITOR.env.ie?"g":"gu"),c=a("nbsp,gt,lt,amp,shy",!0),k=new RegExp(c.regex,"g");h.addRules({text:function(a){return a.replace(k,e).replace(m,b)}},{applyToAll:!0,excludeNestedEditable:!0})}}})}(),CKEDITOR.config.basicEntities=!0,CKEDITOR.config.entities=!0,CKEDITOR.config.entities_latin=!0,CKEDITOR.config.entities_greek=
!0,CKEDITOR.config.entities_additional="#39",CKEDITOR.plugins.add("popup"),CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{popup:function(a,h,e,b){h=h||"80%";e=e||"70%";"string"==typeof h&&1<h.length&&"%"==h.substr(h.length-1,1)&&(h=parseInt(window.screen.width*parseInt(h,10)/100,10));"string"==typeof e&&1<e.length&&"%"==e.substr(e.length-1,1)&&(e=parseInt(window.screen.height*parseInt(e,10)/100,10));640>h&&(h=640);420>e&&(e=420);var d=parseInt((window.screen.height-e)/2,10),l=parseInt((window.screen.width-
h)/2,10);b=(b||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+",width\x3d"+h+",height\x3d"+e+",top\x3d"+d+",left\x3d"+l;var g=window.open("",null,b,!0);if(!g)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(g.moveTo(l,d),g.resizeTo(h,e)),g.focus(),g.location.href=a}catch(m){window.open(a,null,b,!0)}return!0}}),"use strict",function(){function a(a){this.editor=a;this.loaders=
[]}function h(a,b,g){var h=a.config.fileTools_defaultFileName;this.editor=a;this.lang=a.lang;"string"===typeof b?(this.data=b,this.file=e(this.data),this.loaded=this.total=this.file.size):(this.data=null,this.file=b,this.total=this.file.size,this.loaded=0);g?this.fileName=g:this.file.name?this.fileName=this.file.name:(a=this.file.type.split("/"),h&&(a[0]=h),this.fileName=a.join("."));this.uploaded=0;this.responseData=this.uploadTotal=null;this.status="created";this.abort=function(){this.changeStatus("abort")}}
function e(a){var e=a.match(b)[1];a=a.replace(b,"");a=atob(a);var g=[],h,c,k,f;for(h=0;h<a.length;h+=512){c=a.slice(h,h+512);k=Array(c.length);for(f=0;f<c.length;f++)k[f]=c.charCodeAt(f);c=new Uint8Array(k);g.push(c)}return new Blob(g,{type:e})}CKEDITOR.plugins.add("filetools",{beforeInit:function(b){b.uploadRepository=new a(b);b.on("fileUploadRequest",function(a){var b=a.data.fileLoader;b.xhr.open("POST",b.uploadUrl,!0);b.xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");b.xhr.setRequestHeader("X-Seditio-Csrf",
document.querySelector('meta[name\x3d"csrf-token"]').content||"");a.data.requestData.upload={file:b.file,name:b.fileName}},null,null,5);b.on("fileUploadRequest",function(a){var g=a.data.fileLoader,e=new FormData;a=a.data.requestData;var c=b.config.fileTools_requestHeaders,k,f;for(f in a){var h=a[f];"object"===typeof h&&h.file?e.append(f,h.file,h.name):e.append(f,h)}e.append("ckCsrfToken",CKEDITOR.tools.getCsrfToken());if(c)for(k in c)g.xhr.setRequestHeader(k,c[k]);g.xhr.send(e)},null,null,999);b.on("fileUploadResponse",
function(a){var b=a.data.fileLoader,d=b.xhr,c=a.data;try{var e=JSON.parse(d.responseText);e.error&&e.error.message&&(c.message=e.error.message);if(e.uploaded)for(var f in e)c[f]=e[f];else a.cancel()}catch(h){c.message=b.lang.filetools.responseError,CKEDITOR.warn("filetools-response-error",{responseText:d.responseText}),a.cancel()}},null,null,999)}});a.prototype={create:function(a,b,g){g=g||h;var e=this.loaders.length;a=new g(this.editor,a,b);a.id=e;this.loaders[e]=a;this.fire("instanceCreated",a);
return a},isFinished:function(){for(var a=0;a<this.loaders.length;++a)if(!this.loaders[a].isFinished())return!1;return!0}};h.prototype={loadAndUpload:function(a,b){var g=this;this.once("loaded",function(e){e.cancel();g.once("update",function(a){a.cancel()},null,null,0);g.upload(a,b)},null,null,0);this.load()},load:function(){var a=this,b=this.reader=new FileReader;a.changeStatus("loading");this.abort=function(){a.reader.abort()};b.onabort=function(){a.changeStatus("abort")};b.onerror=function(){a.message=
a.lang.filetools.loadError;a.changeStatus("error")};b.onprogress=function(b){a.loaded=b.loaded;a.update()};b.onload=function(){a.loaded=a.total;a.data=b.result;a.changeStatus("loaded")};b.readAsDataURL(this.file)},upload:function(a,b){var g=b||{};a?(this.uploadUrl=a,this.xhr=new XMLHttpRequest,this.attachRequestListeners(),this.editor.fire("fileUploadRequest",{fileLoader:this,requestData:g})&&this.changeStatus("uploading")):(this.message=this.lang.filetools.noUrlError,this.changeStatus("error"))},
attachRequestListeners:function(){function a(){"error"!=g.status&&(g.message=g.lang.filetools.networkError,g.changeStatus("error"))}function b(){"abort"!=g.status&&g.changeStatus("abort")}var g=this,e=this.xhr;g.abort=function(){e.abort();b()};e.onerror=a;e.onabort=b;e.upload?(e.upload.onprogress=function(a){a.lengthComputable&&(g.uploadTotal||(g.uploadTotal=a.total),g.uploaded=a.loaded,g.update())},e.upload.onerror=a,e.upload.onabort=b):(g.uploadTotal=g.total,g.update());e.onload=function(){g.update();
if("abort"!=g.status)if(g.uploaded=g.uploadTotal,200>e.status||299<e.status)g.message=g.lang.filetools["httpError"+e.status],g.message||(g.message=g.lang.filetools.httpError.replace("%1",e.status)),g.changeStatus("error");else{for(var a={fileLoader:g},b=["message","fileName","url"],d=g.editor.fire("fileUploadResponse",a),h=0;h<b.length;h++){var l=b[h];"string"===typeof a[l]&&(g[l]=a[l])}g.responseData=a;delete g.responseData.fileLoader;!1===d?g.changeStatus("error"):g.changeStatus("uploaded")}}},
changeStatus:function(a){this.status=a;if("error"==a||"abort"==a||"loaded"==a||"uploaded"==a)this.abort=function(){};this.fire(a);this.update()},update:function(){this.fire("update")},isFinished:function(){return!!this.status.match(/^(?:loaded|uploaded|error|abort)$/)}};CKEDITOR.event.implementOn(a.prototype);CKEDITOR.event.implementOn(h.prototype);var b=/^data:(\S*?);base64,/;CKEDITOR.fileTools||(CKEDITOR.fileTools={});CKEDITOR.tools.extend(CKEDITOR.fileTools,{uploadRepository:a,fileLoader:h,getUploadUrl:function(a,
b){var g=CKEDITOR.tools.capitalize;return b&&a[b+"UploadUrl"]?a[b+"UploadUrl"]:a.uploadUrl?a.uploadUrl:b&&a["filebrowser"+g(b,1)+"UploadUrl"]?a["filebrowser"+g(b,1)+"UploadUrl"]+"\x26responseType\x3djson":a.filebrowserUploadUrl?a.filebrowserUploadUrl+"\x26responseType\x3djson":null},isTypeSupported:function(a,b){return!!a.type.match(b)},isFileUploadSupported:"function"===typeof FileReader&&"function"===typeof(new FileReader).readAsDataURL&&"function"===typeof FormData&&"function"===typeof(new FormData).append&&
"function"===typeof XMLHttpRequest&&"function"===typeof Blob})}(),function(){function a(a,b){var c=[];if(b)for(var d in b)c.push(d+"\x3d"+encodeURIComponent(b[d]));else return a;return a+(-1!=a.indexOf("?")?"\x26":"?")+c.join("\x26")}function h(b){return!b.match(/command=QuickUpload/)||b.match(/(\?|&)responseType=json/)?b:a(b,{responseType:"json"})}function e(a){a+="";return a.charAt(0).toUpperCase()+a.substr(1)}function b(){var b=this.getDialog(),c=b.getParentEditor();c._.filebrowserSe=this;var d=
c.config["filebrowser"+e(b.getName())+"WindowWidth"]||c.config.filebrowserWindowWidth||"80%",b=c.config["filebrowser"+e(b.getName())+"WindowHeight"]||c.config.filebrowserWindowHeight||"70%",f=this.filebrowser.params||{};f.CKEditor=c.name;f.CKEditorFuncNum=c._.filebrowserFn;f.langCode||(f.langCode=c.langCode);f=a(this.filebrowser.url,f);c.popup(f,d,b,c.config.filebrowserWindowFeatures||c.config.fileBrowserWindowFeatures)}function d(a){var b=new CKEDITOR.dom.element(a.$.form);b&&((a=b.$.elements.ckCsrfToken)?
a=new CKEDITOR.dom.element(a):(a=new CKEDITOR.dom.element("input"),a.setAttributes({name:"ckCsrfToken",type:"hidden"}),b.append(a)),a.setAttribute("value",CKEDITOR.tools.getCsrfToken()))}function l(){var a=this.getDialog();a.getParentEditor()._.filebrowserSe=this;return a.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value&&a.getContentElement(this["for"][0],this["for"][1]).getAction()?!0:!1}function g(b,c,d){var f=d.params||{};f.CKEditor=b.name;f.CKEditorFuncNum=b._.filebrowserFn;
f.langCode||(f.langCode=b.langCode);c.action=a(d.url,f);c.filebrowser=d}function m(a,k,v,u){if(u&&u.length)for(var q,t=u.length;t--;)if(q=u[t],"hbox"!=q.type&&"vbox"!=q.type&&"fieldset"!=q.type||m(a,k,v,q.children),q.filebrowser)if("string"==typeof q.filebrowser&&(q.filebrowser={action:"fileButton"==q.type?"QuickUpload":"Browse",target:q.filebrowser}),"Browse"==q.filebrowser.action){var z=q.filebrowser.url;void 0===z&&(z=a.config["filebrowser"+e(k)+"BrowseUrl"],void 0===z&&(z=a.config.filebrowserBrowseUrl));
z&&(q.onClick=b,q.filebrowser.url=z,q.hidden=!1)}else if("QuickUpload"==q.filebrowser.action&&q["for"]&&(z=q.filebrowser.url,void 0===z&&(z=a.config["filebrowser"+e(k)+"UploadUrl"],void 0===z&&(z=a.config.filebrowserUploadUrl)),z)){var p=q.onClick;q.onClick=function(b){var g=b.sender,e=g.getDialog().getContentElement(this["for"][0],this["for"][1]).getInputElement(),k=CKEDITOR.fileTools&&CKEDITOR.fileTools.isFileUploadSupported;if(p&&!1===p.call(g,b))return!1;if(l.call(g,b)){if("form"!==a.config.filebrowserUploadMethod&&
k)return b=a.uploadRepository.create(e.$.files[0]),b.on("uploaded",function(a){var b=a.sender.responseData;f.call(a.sender.editor,b.url,b.message)}),b.on("error",c.bind(this)),b.on("abort",c.bind(this)),b.loadAndUpload(h(z)),"xhr";d(e);return!0}return!1};q.filebrowser.url=z;q.hidden=!1;g(a,v.getContents(q["for"][0]).get(q["for"][1]),q.filebrowser)}}function c(a){var b={};try{b=JSON.parse(a.sender.xhr.response)||{}}catch(c){}this.enable();alert(b.error?b.error.message:a.sender.message)}function k(a,
b,c){if(-1!==c.indexOf(";")){c=c.split(";");for(var d=0;d<c.length;d++)if(k(a,b,c[d]))return!0;return!1}return(a=a.getContents(b).get(c).filebrowser)&&a.url}function f(a,b){var c=this._.filebrowserSe.getDialog(),d=this._.filebrowserSe["for"],f=this._.filebrowserSe.filebrowser.onSelect;d&&c.getContentElement(d[0],d[1]).reset();if("function"!=typeof b||!1!==b.call(this._.filebrowserSe))if(!f||!1!==f.call(this._.filebrowserSe,a,b))if("string"==typeof b&&b&&alert(b),a&&(d=this._.filebrowserSe,c=d.getDialog(),
d=d.filebrowser.target||null))if(d=d.split(":"),f=c.getContentElement(d[0],d[1]))f.setValue(a),c.selectPage(d[0])}CKEDITOR.plugins.add("filebrowser",{requires:"popup,filetools",init:function(a){a._.filebrowserFn=CKEDITOR.tools.addFunction(f,a);a.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}});CKEDITOR.on("dialogDefinition",function(a){if(a.editor.plugins.filebrowser)for(var b=a.data.definition,c,d=0;d<b.contents.length;++d)if(c=b.contents[d])m(a.editor,a.data.name,
b,c.elements),c.hidden&&c.filebrowser&&(c.hidden=!k(b,c.id,c.filebrowser))})}(),CKEDITOR.plugins.add("find",{requires:"dialog",init:function(a){var h=a.addCommand("find",new CKEDITOR.dialogCommand("find")),e=a.addCommand("replace",new CKEDITOR.dialogCommand("find",{tabId:"replace"}));h.canUndo=!1;h.readOnly=1;e.canUndo=!1;a.ui.addButton&&(a.ui.addButton("Find",{label:a.lang.find.find,command:"find",toolbar:"find,10"}),a.ui.addButton("Replace",{label:a.lang.find.replace,command:"replace",toolbar:"find,20"}));
CKEDITOR.dialog.add("find",this.path+"dialogs/find.js")}}),CKEDITOR.config.find_highlight={element:"span",styles:{"background-color":"#004",color:"#fff"}},function(){function a(a){var d=a.config,l=a.fire("uiSpace",{space:"top",html:""}).html,g=function(){function f(a,b,d){c.setStyle(b,e(d));c.setStyle("position",a)}function k(a){var b=m.getDocumentPosition();switch(a){case "top":f("absolute","top",b.y-p-x);break;case "pin":f("fixed","top",B);break;case "bottom":f("absolute","top",b.y+(t.height||t.bottom-
t.top)+x)}l=a}var l,m,q,t,z,p,A,y=d.floatSpaceDockedOffsetX||0,x=d.floatSpaceDockedOffsetY||0,w=d.floatSpacePinnedOffsetX||0,B=d.floatSpacePinnedOffsetY||0;return function(f){if(m=a.editable()){var n=f&&"focus"==f.name;n&&c.show();a.fire("floatingSpaceLayout",{show:n});c.removeStyle("left");c.removeStyle("right");q=c.getClientRect();t=m.getClientRect();z=h.getViewPaneSize();p=q.height;A="pageXOffset"in h.$?h.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;l?(p+x<=t.top?k("top"):p+x>z.height-
t.bottom?k("pin"):k("bottom"),f=z.width/2,f=d.floatSpacePreferRight?"right":0<t.left&&t.right<z.width&&t.width>q.width?"rtl"==d.contentsLangDirection?"right":"left":f-t.left>t.right-f?"left":"right",q.width>z.width?(f="left",n=0):(n="left"==f?0<t.left?t.left:0:t.right<z.width?z.width-t.right:0,n+q.width>z.width&&(f="left"==f?"right":"left",n=0)),c.setStyle(f,e(("pin"==l?w:y)+n+("pin"==l?0:"left"==f?A:-A)))):(l="pin",k("pin"),g(f))}}}();if(l){var m=new CKEDITOR.template('\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+
CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+(CKEDITOR.env.gecko?" ":"")+'" lang\x3d"{langCode}" role\x3d"application" style\x3d"{style}"'+(a.applicationTitle?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(a.applicationTitle?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':" ")+'\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),c=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(m.output({content:l,
id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(d.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.applicationTitle}))),k=CKEDITOR.tools.eventsBuffer(500,g),f=CKEDITOR.tools.eventsBuffer(100,g);c.unselectable();c.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(c){g(c);a.on("change",k.input);h.on("scroll",f.input);h.on("resize",f.input)});a.on("blur",function(){c.hide();a.removeListener("change",
k.input);h.removeListener("scroll",f.input);h.removeListener("resize",f.input)});a.on("destroy",function(){h.removeListener("scroll",f.input);h.removeListener("resize",f.input);c.clearCustomData();c.remove()});a.focusManager.hasFocus&&c.show();a.focusManager.add(c,1)}}var h=CKEDITOR.document.getWindow(),e=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(b){b.on("loaded",function(){a(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var a=
CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),h=CKEDITOR.addTemplate("panel-list-item",'\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" draggable\x3d"false" ondragstart\x3d"return false;" href\x3d"javascript:void(\'{val}\')"  {language} onclick\x3d"{onclick}CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'),
e=CKEDITOR.addTemplate("panel-list-group",'\x3ch1 id\x3d"{id}" draggable\x3d"false" ondragstart\x3d"return false;" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),b=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,b){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),b))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,b){b=b||{};var g=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&&
(g["aria-multiselectable"]=!0);!g.role&&(g.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",g.role);g=this.keys;g[40]="next";g[9]="next";g[38]="prev";g[CKEDITOR.SHIFT+9]="prev";g[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(g[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var b=a.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(b);
delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(a){var b=this.toggle(a);if(this.onClick)this.onClick(a,b)},this));return this._.click}},proto:{add:function(a,e,g,m){var c=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=c;var k;k=CKEDITOR.tools.htmlEncodeAttr(a).replace(b,"\\'");a={id:c,val:k,onclick:CKEDITOR.env.ie?'return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26':
"",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(g||a),text:e||a,language:m?'lang\x3d"'+m+'"':""};this._.pendingList.push(h.output(a))},startGroup:function(a){this._.close();var b=CKEDITOR.tools.getNextId();this._.groups[a]=b;this._.pendingHtml.push(e.output({id:b,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var b=this.isMarked(a);b?this.unmark(a):this.mark(a);return!b},
hideGroup:function(a){var b=(a=this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display","none"),b&&"ul"==b.getName()&&b.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,b=this._.groups,g=this.element.getDocument(),e;for(e in a)g.getById(a[e]).setStyle("display","");for(var c in b)a=g.getById(b[c]),e=a.getNext(),a.setStyle("display",""),e&&"ul"==
e.getName()&&e.setStyle("display","")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var b=this.element.getDocument().getById(a);b.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(b)},unmark:function(a){var b=this.element.getDocument();a=this._.items[a];var g=b.getById(a);g.removeClass("cke_selected");b.getById(a+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(g)},unmarkAll:function(){var a=
this._.items,b=this.element.getDocument(),g;for(g in a){var e=a[g];b.getById(e).removeClass("cke_selected");b.getById(e+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},focus:function(a){this._.focusIndex=-1;var b=this.element.getElementsByTag("a"),g,e=-1;if(a)for(g=this.element.getDocument().getById(this._.items[a]).getFirst();a=b.getItem(++e);){if(a.equals(g)){this._.focusIndex=
e;break}}else this.element.focus();g&&setTimeout(function(){g.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var a='\x3cspan id\x3d"{id}" class\x3d"cke_combo cke_combo__{name} {cls}" role\x3d"presentation"\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_combo_label"\x3e{label}\x3c/span\x3e\x3ca class\x3d"cke_combo_button" title\x3d"{title}" tabindex\x3d"-1"'+
(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"listbox"',h="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(a+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(a+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');CKEDITOR.env.ie&&(h='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var a=a+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+
h+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan id\x3d"{id}_text" class\x3d"cke_combo_text cke_combo_inlinelabel"\x3e{label}\x3c/span\x3e\x3cspan class\x3d"cke_combo_open"\x3e\x3cspan class\x3d"cke_combo_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":CKEDITOR.env.air?"\x26nbsp;":"")+"\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e"),e=CKEDITOR.addTemplate("combo",a);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this,
a,{canGroup:!1,title:a.label,modes:{wysiwyg:1},editorFocus:1});a=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=a.parent&&a.parent.getDocument()||CKEDITOR.document;a.className="cke_combopanel";a.block={multiSelect:a.multiSelect,attributes:a.attributes};a.toolbarRelated=!0;this._={panelDefinition:a,items:{},listeners:[]}},proto:{renderHtml:function(a){var d=[];this.render(a,d);return d.join("")},render:function(a,d){function h(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var c=
this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(c=CKEDITOR.TRISTATE_DISABLED);this.setState(c);this.setValue("");c!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var g=CKEDITOR.env,m,c,k="cke_"+this.id,f=CKEDITOR.tools.addFunction(function(d){c&&(a.unlockSelection(1),c=0);m.execute(d)},this),n=this;m={id:k,combo:this,focus:function(){CKEDITOR.document.getById(k).getChild(1).focus()},execute:function(c){var d=n._;if(d.state!=CKEDITOR.TRISTATE_DISABLED)if(n.createPanel(a),
d.on)d.panel.hide();else{n.commit();var f=n.getValue();f?d.list.mark(f):d.list.unmarkAll();d.panel.showBlock(n.id,new CKEDITOR.dom.element(c),4)}},clickFn:f};this._.listeners.push(a.on("activeFilterChange",h,this));this._.listeners.push(a.on("mode",h,this));this._.listeners.push(a.on("selectionChange",h,this));!this.readOnly&&this._.listeners.push(a.on("readOnly",h,this));var r=CKEDITOR.tools.addFunction(function(a,b){a=new CKEDITOR.dom.event(a);var c=a.getKeystroke();switch(c){case 13:case 32:case 40:CKEDITOR.tools.callFunction(f,
b);break;default:m.onkey(m,c)}a.preventDefault()}),v=CKEDITOR.tools.addFunction(function(){m.onfocus&&m.onfocus()});c=0;m.keyDownFn=r;g={id:k,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:g.gecko&&!g.hc?"":(this.title||"").replace("'",""),keydownFn:r,focusFn:v,clickFn:f};e.output(g,d);if(this.onRender)this.onRender();return m},createPanel:function(a){if(!this._.panel){var d=this._.panelDefinition,e=this._.panelDefinition.block,g=d.parent||CKEDITOR.document.getBody(),
h="cke_combopanel__"+this.name,c=new CKEDITOR.ui.floatPanel(a,g,d),d=c.addListBlock(this.id,e),k=this;c.onShow=function(){this.element.addClass(h);k.setState(CKEDITOR.TRISTATE_ON);k._.on=1;k.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(k.onOpen)k.onOpen()};c.onHide=function(c){this.element.removeClass(h);k.setState(k.modes&&k.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);k._.on=0;if(!c&&k.onClose)k.onClose()};c.onEscape=function(){c.hide(1)};d.onClick=function(a,b){k.onClick&&
k.onClick.call(k,a,b);c.hide()};this._.panel=c;this._.list=d;c.getBlock(this.id).onHide=function(){k._.on=0;k.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,d){this._.value=a;var e=this.document.getById("cke_"+this.id+"_text");e&&(a||d?e.removeClass("cke_combo_inlinelabel"):(d=this.label,e.addClass("cke_combo_inlinelabel")),e.setText("undefined"!=typeof d?d:a));var e="undefined"!=typeof d?d:a,g=this.label,e=e===g?e:e+", "+g;(g=this.document.getById("cke_"+this.id+"_label"))&&
g.setText(e)},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(a,d,e,g){this._.items[a]=e||a;this._.list.add(a,d,e,g)},startGroup:function(a){this._.list.startGroup(a)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));
this._.committed=1},setState:function(a){if(this._.state!=a){var d=this.document.getById("cke_"+this.id),e=d.getElementsByTag("a").getItem(0);d.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?d.setAttribute("aria-disabled",!0):d.removeAttribute("aria-disabled");e&&e.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON);this._.state=a}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=
CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))},destroy:function(){CKEDITOR.tools.array.forEach(this._.listeners,function(a){a.removeListener()});this._.listeners=[]},select:function(a){if(!CKEDITOR.tools.isEmpty(this._.items))for(var d in this._.items)if(a({value:d,text:this._.items[d]})){this.setValue(d);break}}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,d){this.add(a,
CKEDITOR.UI_RICHCOMBO,d)}}(),function(){function a(a,b){var m=a.config,c=b.lang,k=new CKEDITOR.style(b.styleDefinition),f=new d({entries:b.entries,styleVariable:b.styleVariable,styleDefinition:b.styleDefinition}),n;a.addCommand(b.commandName,{exec:function(a,b){var c=b.newStyle,d=b.oldStyle,f=a.getSelection().getRanges()[0],g=void 0===c;if(d||c)d&&f.collapsed&&e({editor:a,range:f,style:d}),g?a.removeStyle(d):(d&&!h(d,c)&&a.removeStyle(d),a.applyStyle(c))},refresh:function(a,b){k.checkApplicable(b,
a,a.activeFilter)||this.setState(CKEDITOR.TRISTATE_DISABLED)}});n=a.getCommand(b.commandName);a.ui.addRichCombo(b.comboName,{label:c.label,title:c.panelTitle,command:b.commandName,toolbar:"styles,"+b.order,defaultValue:"cke-default",allowedContent:k,requiredContent:k,contentTransformations:"span"===b.styleDefinition.element?[[{element:"font",check:"span",left:function(a){return!!a.attributes.size||!!a.attributes.align||!!a.attributes.face},right:function(a){var b=" x-small small medium large x-large xx-large 48px".split(" ");
a.name="span";a.attributes.size&&(a.styles["font-size"]=b[a.attributes.size],delete a.attributes.size);a.attributes.align&&(a.styles["text-align"]=a.attributes.align,delete a.attributes.align);a.attributes.face&&(a.styles["font-family"]=a.attributes.face,delete a.attributes.face)}}]]:null,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(m.contentsCss),multiSelect:!1,attributes:{"aria-label":c.panelTitle}},init:function(){var b="("+a.lang.common.optionDefault+")";this.startGroup(c.panelTitle);this.add(this.defaultValue,
b,b);f.addToCombo(this)},onClick:function(c){var d=this.getValue();a.focus();a.fire("saveSnapshot");a.execCommand(b.commandName,{newStyle:f.getStyle(c),oldStyle:f.getStyle(d)});a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(c){var d=this.getValue();(c=f.getMatchingValue(a,c.data.path))?c!=d&&this.setValue(c):this.setValue("",b.defaultLabel)},this);n.on("state",function(){this.setState(n.state)},this)},refresh:function(){this.setState(n.state)}})}function h(a,b){if(!(a instanceof
CKEDITOR.style&&b instanceof CKEDITOR.style))return!1;var d=function(a,b){var c=a.getDefinition().attributes,d=b.getDefinition().attributes;return CKEDITOR.tools.objectCompare(c,d)}(a,b),c=function(a,b){return CKEDITOR.style.getStyleText(a.getDefinition())===CKEDITOR.style.getStyleText(b.getDefinition())}(a,b);return d&&c}function e(a){var d=a.editor,e=a.range,c=a.style,k,f,h;k=d.elementPath();if(a=k.contains(function(a){return c.checkElementRemovable(a)})){f=e.checkBoundaryOfElement(a,CKEDITOR.START);
h=e.checkBoundaryOfElement(a,CKEDITOR.END);if(f&&h){for(f=e.createBookmark();k=a.getFirst();)k.insertBefore(a);a.remove();e.moveToBookmark(f)}else f||h?e.moveToPosition(a,f?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END):(e.splitElement(a),e.moveToPosition(a,CKEDITOR.POSITION_AFTER_END)),b(e,k.elements.slice(),a);d.getSelection().selectRanges([e])}}function b(a,d,e){var c=d.pop();if(c){if(e)return b(a,d,c.equals(e)?null:e);e=c.clone();a.insertNode(e);a.moveToPosition(e,CKEDITOR.POSITION_AFTER_START);
b(a,d)}}var d=CKEDITOR.tools.createClass({$:function(a){var b=a.entries.split(";");this._.data={};this._.names=[];for(var d=0;d<b.length;d++){var c=b[d],e,f;c?(c=c.split("/"),e=c[0],c=c[1],f={},f[a.styleVariable]=c||e,this._.data[e]=new CKEDITOR.style(a.styleDefinition,f),this._.data[e]._.definition.name=e,this._.names.push(e)):(b.splice(d,1),d--)}},proto:{getStyle:function(a){return this._.data[a]},addToCombo:function(a){for(var b=0;b<this._.names.length;b++){var d=this._.names[b];a.add(d,this.getStyle(d).buildPreview(),
d)}},getMatchingValue:function(a,b){for(var d=b.elements,c=0,e;c<d.length;c++)if(e=d[c],e=this._.findMatchingStyleName(a,e))return e;return null}},_:{findMatchingStyleName:function(a,b){return CKEDITOR.tools.array.find(this._.names,function(d){return this.getStyle(d).checkElementMatch(b,!0,a)},this)}}});CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(b){var d=b.config;a(b,{comboName:"Font",commandName:"font",styleVariable:"family",lang:b.lang.font,entries:d.font_names,defaultLabel:d.font_defaultLabel,
styleDefinition:d.font_style,order:30});a(b,{comboName:"FontSize",commandName:"fontSize",styleVariable:"size",lang:b.lang.font.fontSize,entries:d.fontSize_sizes,defaultLabel:d.fontSize_defaultLabel,styleDefinition:d.fontSize_style,order:40})}})}(),CKEDITOR.config.font_names="Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif",
CKEDITOR.config.font_defaultLabel="",CKEDITOR.config.font_style={element:"span",styles:{"font-family":"#(family)"},overrides:[{element:"font",attributes:{face:null}}]},CKEDITOR.config.fontSize_sizes="8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px",CKEDITOR.config.fontSize_defaultLabel="",CKEDITOR.config.fontSize_style={element:"span",styles:{"font-size":"#(size)"},overrides:[{element:"font",attributes:{size:null}}]},CKEDITOR.plugins.add("format",
{requires:"richcombo",init:function(a){if(!a.blockless){for(var h=a.config,e=a.lang.format,b=h.format_tags.split(";"),d={},l=0,g=[],m=0;m<b.length;m++){var c=b[m],k=new CKEDITOR.style(h["format_"+c]);if(!a.filter.customConfig||a.filter.check(k))l++,d[c]=k,d[c]._.enterMode=a.config.enterMode,g.push(k)}0!==l&&a.ui.addRichCombo("Format",{label:e.label,title:e.panelTitle,toolbar:"styles,20",allowedContent:g,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(h.contentsCss),multiSelect:!1,attributes:{"aria-label":e.panelTitle}},
init:function(){this.startGroup(e.panelTitle);for(var a in d){var b=e["tag_"+a];this.add(a,d[a].buildPreview(b),b)}},onClick:function(b){a.focus();a.fire("saveSnapshot");b=d[b];var c=a.elementPath();a.fire("stylesRemove",{type:CKEDITOR.STYLE_BLOCK});b.checkActive(c,a)||a.applyStyle(b);setTimeout(function(){a.fire("saveSnapshot")},0)},onRender:function(){a.on("selectionChange",function(b){var c=this.getValue();b=b.data.path;this.refresh();for(var e in d)if(d[e].checkActive(b,a)){e!=c&&this.setValue(e,
a.lang.format["tag_"+e]);return}this.setValue("")},this)},onOpen:function(){this.showAll();for(var b in d)a.activeFilter.check(d[b])||this.hideItem(b)},refresh:function(){var b=a.elementPath();if(b){if(b.isContextFor("p"))for(var c in d)if(a.activeFilter.check(d[c]))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}}})}}}),CKEDITOR.config.format_tags="p;h1;h2;h3;h4;h5;h6;pre;address;div",CKEDITOR.config.format_p={element:"p"},CKEDITOR.config.format_div={element:"div"},CKEDITOR.config.format_pre={element:"pre"},
CKEDITOR.config.format_address={element:"address"},CKEDITOR.config.format_h1={element:"h1"},CKEDITOR.config.format_h2={element:"h2"},CKEDITOR.config.format_h3={element:"h3"},CKEDITOR.config.format_h4={element:"h4"},CKEDITOR.config.format_h5={element:"h5"},CKEDITOR.config.format_h6={element:"h6"},function(){function a(a,b){var c=l.exec(a),d=l.exec(b);if(c){if(!c[2]&&"px"==d[2])return d[1];if("px"==c[2]&&!d[2])return d[1]+"px"}return b}function h(d){return{elements:{$:function(h){var c=h.attributes,
c=c&&c["data-cke-realelement"],k=e(d,decodeURIComponent(c));if((c=(c=c&&new CKEDITOR.htmlParser.fragment.fromHtml(k))&&c.children[0])&&h.attributes["data-cke-resizable"]){var f=(new b(h)).rules;h=c.attributes;k=f.width;f=f.height;k&&(h.width=a(h.width,k));f&&(h.height=a(h.height,f))}return c}}}}function e(a,b){var c=[],d=/^cke:/i,f=new CKEDITOR.htmlParser.filter({elements:{"^":function(a){d.test(a.name)&&(a.name=a.name.replace(d,""),c.push(a))},iframe:function(a){a.children=[]}}}),e=a.activeFilter,
h=new CKEDITOR.htmlParser.basicWriter,l=CKEDITOR.htmlParser.fragment.fromHtml(b);f.applyTo(l);e.applyTo(l);CKEDITOR.tools.array.forEach(c,function(a){a.name="cke:"+a.name});l.writeHtml(h);return h.getHtml()}var b=CKEDITOR.htmlParser.cssStyle,d=CKEDITOR.tools.cssLength,l=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i;CKEDITOR.plugins.add("fakeobjects",{init:function(a){a.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},afterInit:function(a){var b=a.dataProcessor;(b=b&&b.htmlFilter)&&
b.addRules(h(a),{applyToAll:!0})}});CKEDITOR.editor.prototype.createFakeElement=function(a,e,c,h){var f=this.lang.fakeobjects,f=f[c]||f.unknown;e={"class":e,"data-cke-realelement":encodeURIComponent(a.getOuterHtml()),"data-cke-real-node-type":a.type,alt:f,title:f,align:a.getAttribute("align")||""};CKEDITOR.env.hc||(e.src=CKEDITOR.tools.transparentImageData);c&&(e["data-cke-real-element-type"]=c);h&&(e["data-cke-resizable"]=h,c=new b,h=a.getAttribute("width"),a=a.getAttribute("height"),h&&(c.rules.width=
d(h)),a&&(c.rules.height=d(a)),c.populate(e));return this.document.createElement("img",{attributes:e})};CKEDITOR.editor.prototype.createFakeParserElement=function(a,e,c,h){var f=this.lang.fakeobjects,f=f[c]||f.unknown,l;l=new CKEDITOR.htmlParser.basicWriter;a.writeHtml(l);l=l.getHtml();e={"class":e,"data-cke-realelement":encodeURIComponent(l),"data-cke-real-node-type":a.type,alt:f,title:f,align:a.attributes.align||""};CKEDITOR.env.hc||(e.src=CKEDITOR.tools.transparentImageData);c&&(e["data-cke-real-element-type"]=
c);h&&(e["data-cke-resizable"]=h,h=a.attributes,a=new b,c=h.width,h=h.height,void 0!==c&&(a.rules.width=d(c)),void 0!==h&&(a.rules.height=d(h)),a.populate(e));return new CKEDITOR.htmlParser.element("img",e)};CKEDITOR.editor.prototype.restoreRealElement=function(b){if(b.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var d=decodeURIComponent(b.data("cke-realelement")),d=e(this,d),d=CKEDITOR.dom.element.createFromHtml(d,this.document);if(b.data("cke-resizable")){var c=b.getStyle("width");
b=b.getStyle("height");c&&d.setAttribute("width",a(d.getAttribute("width"),c));b&&d.setAttribute("height",a(d.getAttribute("height"),b))}return d}}(),CKEDITOR.plugins.add("forms",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss(".cke_editable form{border: 1px dotted #FF0000;padding: 2px;}\n");CKEDITOR.addCss("img.cke_hidden{background-image: url("+CKEDITOR.getUrl(this.path+"images/hiddenfield.gif")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 16px !important;height: 16px !important;}");
CKEDITOR.style.unstylableElements.push("select","option")},init:function(a){var h=a.lang,e=0,b={email:1,password:1,search:1,tel:1,text:1,url:1},d={checkbox:"input[type,name,checked,required]",radio:"input[type,name,checked,required]",textfield:"input[type,name,value,size,maxlength,required]",textarea:"textarea[cols,rows,name,required]",select:"select[name,size,multiple,required]; option[value,selected]",button:"input[type,name,value]",form:"form[action,name,id,enctype,target,method]",hiddenfield:"input[type,name,value]",
imagebutton:"input[type,alt,src]{width,height,border,border-width,border-style,margin,float}"},l={checkbox:"input",radio:"input",textfield:"input",textarea:"textarea",select:"select",button:"input",form:"form",hiddenfield:"input",imagebutton:"input"},g=function(b,c,g){var m={allowedContent:d[c],requiredContent:l[c]};"form"==c&&(m.context="form");a.addCommand(c,new CKEDITOR.dialogCommand(c,m));a.ui.addButton&&a.ui.addButton(b,{label:h.common[b.charAt(0).toLowerCase()+b.slice(1)],command:c,toolbar:"forms,"+
(e+=10)});CKEDITOR.dialog.add(c,g)},m=this.path+"dialogs/";!a.blockless&&g("Form","form",m+"form.js");g("Checkbox","checkbox",m+"checkbox.js");g("Radio","radio",m+"radio.js");g("TextField","textfield",m+"textfield.js");g("Textarea","textarea",m+"textarea.js");g("Select","select",m+"select.js");g("Button","button",m+"button.js");var c=a.plugins.image;c&&!a.plugins.image2&&g("ImageButton","imagebutton",CKEDITOR.plugins.getPath("image")+"dialogs/image.js");g("HiddenField","hiddenfield",m+"hiddenfield.js");
a.addMenuItems&&(g={checkbox:{label:h.forms.checkboxAndRadio.checkboxTitle,command:"checkbox",group:"checkbox"},radio:{label:h.forms.checkboxAndRadio.radioTitle,command:"radio",group:"radio"},textfield:{label:h.forms.textfield.title,command:"textfield",group:"textfield"},hiddenfield:{label:h.forms.hidden.title,command:"hiddenfield",group:"hiddenfield"},button:{label:h.forms.button.title,command:"button",group:"button"},select:{label:h.forms.select.title,command:"select",group:"select"},textarea:{label:h.forms.textarea.title,
command:"textarea",group:"textarea"}},c&&(g.imagebutton={label:h.image.titleButton,command:"imagebutton",group:"imagebutton"}),!a.blockless&&(g.form={label:h.forms.form.menu,command:"form",group:"form"}),a.addMenuItems(g));a.contextMenu&&(!a.blockless&&a.contextMenu.addListener(function(a,b,c){if((a=c.contains("form",1))&&!a.isReadOnly())return{form:CKEDITOR.TRISTATE_OFF}}),a.contextMenu.addListener(function(a){if(a&&!a.isReadOnly()){var d=a.getName();if("select"==d)return{select:CKEDITOR.TRISTATE_OFF};
if("textarea"==d)return{textarea:CKEDITOR.TRISTATE_OFF};if("input"==d){var e=a.getAttribute("type")||"text";switch(e){case "button":case "submit":case "reset":return{button:CKEDITOR.TRISTATE_OFF};case "checkbox":return{checkbox:CKEDITOR.TRISTATE_OFF};case "radio":return{radio:CKEDITOR.TRISTATE_OFF};case "image":return c?{imagebutton:CKEDITOR.TRISTATE_OFF}:null}if(b[e])return{textfield:CKEDITOR.TRISTATE_OFF}}if("img"==d&&"hiddenfield"==a.data("cke-real-element-type"))return{hiddenfield:CKEDITOR.TRISTATE_OFF}}}));
a.on("doubleclick",function(c){var d=c.data.element;if(!a.blockless&&d.is("form"))c.data.dialog="form";else if(d.is("select"))c.data.dialog="select";else if(d.is("textarea"))c.data.dialog="textarea";else if(d.is("img")&&"hiddenfield"==d.data("cke-real-element-type"))c.data.dialog="hiddenfield";else if(d.is("input")){d=d.getAttribute("type")||"text";switch(d){case "button":case "submit":case "reset":c.data.dialog="button";break;case "checkbox":c.data.dialog="checkbox";break;case "radio":c.data.dialog=
"radio";break;case "image":c.data.dialog="imagebutton"}b[d]&&(c.data.dialog="textfield")}})},afterInit:function(a){var h=a.dataProcessor,e=h&&h.htmlFilter,h=h&&h.dataFilter;CKEDITOR.env.ie&&e&&e.addRules({elements:{input:function(a){a=a.attributes;var d=a.type;d||(a.type="text");"checkbox"!=d&&"radio"!=d||"on"!=a.value||delete a.value}}},{applyToAll:!0});h&&h.addRules({elements:{input:function(b){if("hidden"==b.attributes.type)return a.createFakeParserElement(b,"cke_hidden","hiddenfield")}}},{applyToAll:!0})}}),
CKEDITOR.plugins.forms={_setupRequiredAttribute:function(a){this.setValue(a.hasAttribute("required"))}},function(){var a={canUndo:!1,exec:function(a){var e=a.document.createElement("hr");a.insertElement(e)},allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",{init:function(h){h.blockless||(h.addCommand("horizontalrule",a),h.ui.addButton&&h.ui.addButton("HorizontalRule",{label:h.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"}))}})}(),CKEDITOR.plugins.add("htmlwriter",
{init:function(a){var h=new CKEDITOR.htmlWriter;h.forceSimpleAmpersand=a.config.forceSimpleAmpersand;h.indentationChars="string"===typeof a.config.dataIndentationChars?a.config.dataIndentationChars:"\t";a.dataProcessor.writer=h}}),CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base();this.indentationChars="\t";this.selfClosingEnd=" /\x3e";this.lineBreakChars="\n";this.sortAttributes=1;this._.indent=0;this._.indentation="";this._.inPre=0;this._.rules=
{};var a=CKEDITOR.dtd,h;for(h in CKEDITOR.tools.extend({},a.$nonBodyContent,a.$block,a.$listItem,a.$tableContent))this.setRules(h,{indent:!a[h]["#"],breakBeforeOpen:1,breakBeforeClose:!a[h]["#"],breakAfterClose:1,needsSpace:h in a.$block&&!(h in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1});this.setRules("title",{indent:0,breakAfterOpen:0});this.setRules("style",{indent:0,breakBeforeClose:1});this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(a){var h=this._.rules[a];
this._.afterCloser&&h&&h.needsSpace&&this._.needsSpace&&this._.output.push("\n");this._.indent?this.indentation():h&&h.breakBeforeOpen&&(this.lineBreak(),this.indentation());this._.output.push("\x3c",a);this._.afterCloser=0},openTagClose:function(a,h){var e=this._.rules[a];h?(this._.output.push(this.selfClosingEnd),e&&e.breakAfterClose&&(this._.needsSpace=e.needsSpace)):(this._.output.push("\x3e"),e&&e.indent&&(this._.indentation+=this.indentationChars));e&&e.breakAfterOpen&&this.lineBreak();"pre"==
a&&(this._.inPre=1)},attribute:function(a,h){"string"==typeof h&&(h=CKEDITOR.tools.htmlEncodeAttr(h),this.forceSimpleAmpersand&&(h=h.replace(/&amp;/g,"\x26")));this._.output.push(" ",a,'\x3d"',h,'"')},closeTag:function(a){var h=this._.rules[a];h&&h.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length));this._.indent?this.indentation():h&&h.breakBeforeClose&&(this.lineBreak(),this.indentation());this._.output.push("\x3c/",a,"\x3e");"pre"==a&&(this._.inPre=0);h&&h.breakAfterClose&&
(this.lineBreak(),this._.needsSpace=h.needsSpace);this._.afterCloser=1},text:function(a){this._.indent&&(this.indentation(),!this._.inPre&&(a=CKEDITOR.tools.ltrim(a)));this._.output.push(a)},comment:function(a){this._.indent&&this.indentation();this._.output.push("\x3c!--",a,"--\x3e")},lineBreak:function(){!this._.inPre&&0<this._.output.length&&this._.output.push(this.lineBreakChars);this._.indent=1},indentation:function(){!this._.inPre&&this._.indentation&&this._.output.push(this._.indentation);
this._.indent=0},reset:function(){this._.output=[];this._.indent=0;this._.indentation="";this._.afterCloser=0;this._.inPre=0;this._.needsSpace=0},setRules:function(a,h){var e=this._.rules[a];e?CKEDITOR.tools.extend(e,h,!0):this._.rules[a]=h}}}),function(){CKEDITOR.plugins.add("iframe",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss("img.cke_iframe{background-image: url("+CKEDITOR.getUrl(this.path+"images/placeholder.png")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}")},
init:function(a){var h=a.lang.iframe,e="iframe[align,longdesc,tabindex,frameborder,height,name,scrolling,src,title,width,sandbox]";a.plugins.dialogadvtab&&(e+=";iframe"+a.plugins.dialogadvtab.allowedContent({id:1,classes:1,styles:1}));CKEDITOR.dialog.add("iframe",this.path+"dialogs/iframe.js");a.addCommand("iframe",new CKEDITOR.dialogCommand("iframe",{allowedContent:e,requiredContent:"iframe"}));a.ui.addButton&&a.ui.addButton("Iframe",{label:h.toolbar,command:"iframe",toolbar:"insert,80"});a.on("doubleclick",
function(a){var d=a.data.element;d.is("img")&&"iframe"==d.data("cke-real-element-type")&&(a.data.dialog="iframe")});a.addMenuItems&&a.addMenuItems({iframe:{label:h.title,command:"iframe",group:"image"}});a.contextMenu&&a.contextMenu.addListener(function(a){if(a&&a.is("img")&&"iframe"==a.data("cke-real-element-type"))return{iframe:CKEDITOR.TRISTATE_OFF}})},afterInit:function(a){var h=a.dataProcessor;(h=h&&h.dataFilter)&&h.addRules({elements:{iframe:function(e){var b=a.plugins.iframe._.getIframeAttributes(a,
e);void 0!==b&&(e.attributes=CKEDITOR.tools.object.merge(e.attributes,b));return a.createFakeParserElement(e,"cke_iframe","iframe",!0)}}})},_:{getIframeAttributes:function(a,h){var e=a.config.iframe_attributes;if("function"===typeof e)return e(h);if("object"===typeof e)return e}}})}(),CKEDITOR.config.iframe_attributes={sandbox:""},function(){function a(a,b){b||(b=a.getSelection().getSelectedElement());if(b&&b.is("img")&&!b.data("cke-realelement")&&!b.isReadOnly())return b}function h(a){var b=a.getStyle("float");
if("inherit"==b||"none"==b)b=0;b||(b=a.getAttribute("align"));return b}CKEDITOR.plugins.add("image",{requires:"dialog",init:function(e){if(!e.plugins.detectConflict("image",["easyimage","image2"])){CKEDITOR.dialog.add("image",this.path+"dialogs/image.js");var b="img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}";CKEDITOR.dialog.isTabEnabled(e,"image","advanced")&&(b="img[alt,dir,id,lang,longdesc,!src,title]{*}(*)");e.addCommand("image",
new CKEDITOR.dialogCommand("image",{allowedContent:b,requiredContent:"img[alt,src]",contentTransformations:[["img{width}: sizeToStyle","img[width]: sizeToAttribute"],["img{float}: alignmentToStyle","img[align]: alignmentToAttribute"]]}));e.ui.addButton&&e.ui.addButton("Image",{label:e.lang.common.image,command:"image",toolbar:"insert,10"});e.on("doubleclick",function(a){var b=a.data.element;!b.is("img")||b.data("cke-realelement")||b.isReadOnly()||(a.data.dialog="image")});e.addMenuItems&&e.addMenuItems({image:{label:e.lang.image.menu,
command:"image",group:"image"}});e.contextMenu&&e.contextMenu.addListener(function(b){if(a(e,b))return{image:CKEDITOR.TRISTATE_OFF}})}},afterInit:function(e){function b(b){var l=e.getCommand("justify"+b);if(l){if("left"==b||"right"==b)l.on("exec",function(g){var l=a(e),c;l&&(c=h(l),c==b?(l.removeStyle("float"),b==h(l)&&l.removeAttribute("align")):l.setStyle("float",b),g.cancel())});l.on("refresh",function(g){var l=a(e);l&&(l=h(l),this.setState(l==b?CKEDITOR.TRISTATE_ON:"right"==b||"left"==b?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED),g.cancel())})}}e.plugins.image2||(b("left"),b("right"),b("center"),b("block"))}})}(),CKEDITOR.config.image_removeLinkByEmptyURL=!0,function(){function a(a,d){var l,g;d.on("refresh",function(a){var b=[h],d;for(d in a.data.states)b.push(a.data.states[d]);this.setState(CKEDITOR.tools.search(b,e)?e:h)},d,null,100);d.on("exec",function(d){l=a.getSelection();g=l.createBookmarks(1);d.data||(d.data={});d.data.done=!1},d,null,0);d.on("exec",function(){a.forceNextSelectionCheck();
l.selectBookmarks(g)},d,null,100)}var h=CKEDITOR.TRISTATE_DISABLED,e=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(b){var d=CKEDITOR.plugins.indent.genericDefinition;a(b,b.addCommand("indent",new d(!0)));a(b,b.addCommand("outdent",new d));b.ui.addButton&&(b.ui.addButton("Indent",{label:b.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),b.ui.addButton("Outdent",{label:b.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"}));b.on("dirChanged",
function(a){var d=b.createRange(),e=a.data.node;d.setStartBefore(e);d.setEndAfter(e);for(var c=new CKEDITOR.dom.walker(d),h;h=c.next();)if(h.type==CKEDITOR.NODE_ELEMENT)if(!h.equals(e)&&h.getDirection())d.setStartAfter(h),c=new CKEDITOR.dom.walker(d);else{var f=b.config.indentClasses;if(f)for(var n="ltr"==a.data.dir?["_rtl",""]:["","_rtl"],r=0;r<f.length;r++)h.hasClass(f[r]+n[0])&&(h.removeClass(f[r]+n[0]),h.addClass(f[r]+n[1]));f=h.getStyle("margin-right");n=h.getStyle("margin-left");f?h.setStyle("margin-left",
f):h.removeStyle("margin-left");n?h.setStyle("margin-right",n):h.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(a){this.isIndent=!!a;this.startDisabled=!this.isIndent},specificDefinition:function(a,d,e){this.name=d;this.editor=a;this.jobs={};this.enterBr=a.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!e;this.relatedGlobal=e?"indent":"outdent";this.indentKey=e?9:CKEDITOR.SHIFT+9;this.database={}},registerCommands:function(a,d){a.on("pluginsLoaded",function(){for(var a in d)(function(a,
b){var c=a.getCommand(b.relatedGlobal),d;for(d in b.jobs)c.on("exec",function(c){c.data.done||(a.fire("lockSnapshot"),b.execJob(a,d)&&(c.data.done=!0),a.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(b.database))},this,null,d),c.on("refresh",function(c){c.data.states||(c.data.states={});c.data.states[b.name+"@"+d]=b.refreshJob(a,d,c.data.path)},this,null,d);a.addFeature(b)})(this,d[a])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype=
{execJob:function(a,d){var e=this.jobs[d];if(e.state!=h)return e.exec.call(this,a)},refreshJob:function(a,d,e){d=this.jobs[d];a.activeFilter.checkFeature(this)?d.state=d.refresh.call(this,a,e):d.state=h;return d.state},getContext:function(a){return a.contains(this.context)}}}(),function(){function a(a,b,c){if(!a.getCustomData("indent_processed")){var d=this.editor,e=this.isIndent;if(b){d=a.$.className.match(this.classNameRegex);c=0;d&&(d=d[1],c=CKEDITOR.tools.indexOf(b,d)+1);if(0>(c+=e?1:-1))return;
c=Math.min(c,b.length);c=Math.max(c,0);a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.classNameRegex,""));0<c&&a.addClass(b[c-1])}else{b=h(a,c);c=parseInt(a.getStyle(b),10);var l=d.config.indentOffset||40;isNaN(c)&&(c=0);c+=(e?1:-1)*l;if(0>c)return;c=Math.max(c,0);c=Math.ceil(c/l)*l;a.setStyle(b,c?c+(d.config.indentUnit||"px"):"");""===a.getAttribute("style")&&a.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,a,"indent_processed",1)}}function h(a,b){return"ltr"==
(b||a.getComputedStyle("direction"))?"margin-left":"margin-right"}var e=CKEDITOR.dtd.$listItem,b=CKEDITOR.dtd.$list,d=CKEDITOR.TRISTATE_DISABLED,l=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(g){function m(){c.specificDefinition.apply(this,arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,styles:k?null:"margin-left,margin-right",classes:k||null}};this.contentTransformations=[["div: splitMarginShorthand"],["h1: splitMarginShorthand"],
["h2: splitMarginShorthand"],["h3: splitMarginShorthand"],["h4: splitMarginShorthand"],["h5: splitMarginShorthand"],["h6: splitMarginShorthand"],["ol: splitMarginShorthand"],["p: splitMarginShorthand"],["pre: splitMarginShorthand"],["ul: splitMarginShorthand"]];this.enterBr&&(this.allowedContent.div=!0);this.requiredContent=(this.enterBr?"div":"p")+(k?"("+k.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,b){var c=b.block||b.blockLimit;if(!c.is(e))var g=c.getAscendant(e),c=g&&b.contains(g)||
c;c.is(e)&&(c=c.getParent());if(this.enterBr||this.getContext(b)){if(k){var g=k,c=c.$.className.match(this.classNameRegex),m=this.isIndent,g=c?m?c[1]!=g.slice(-1):!0:m;return g?l:d}return this.isIndent?l:c?CKEDITOR[0>=(parseInt(c.getStyle(h(c)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:d}return d},exec:function(c){var d=c.getSelection(),d=d&&d.getRanges()[0],e;if(e=c.elementPath().contains(b))a.call(this,e,k);else for(d=d.createIterator(),c=c.config.enterMode,d.enforceRealBlocks=!0,d.enlargeBr=
c!=CKEDITOR.ENTER_BR;e=d.getNextParagraph(c==CKEDITOR.ENTER_P?"p":"div");)e.isReadOnly()||a.call(this,e,k);return!0}}}}var c=CKEDITOR.plugins.indent,k=g.config.indentClasses;c.registerCommands(g,{indentblock:new m(g,"indentblock",!0),outdentblock:new m(g,"outdentblock")});CKEDITOR.tools.extend(m.prototype,c.specificDefinition.prototype,{context:{div:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:k?new RegExp("(?:^|\\s+)("+k.join("|")+")(?\x3d$|\\s)"):null})}})}(),
function(){function a(a){function b(c){for(var h=l.startContainer,p=l.endContainer;h&&!h.getParent().equals(c);)h=h.getParent();for(;p&&!p.getParent().equals(c);)p=p.getParent();if(!h||!p)return!1;for(var q=[],y=!1;!y;)h.equals(p)&&(y=!0),q.push(h),h=h.getNext();if(1>q.length)return!1;h=c.getParents(!0);for(p=0;p<h.length;p++)if(h[p].getName&&g[h[p].getName()]){c=h[p];break}for(var h=d.isIndent?1:-1,p=q[0],q=q[q.length-1],y=CKEDITOR.plugins.list.listToArray(c,f),x=y[q.getCustomData("listarray_index")].indent,
p=p.getCustomData("listarray_index");p<=q.getCustomData("listarray_index");p++)if(y[p].indent+=h,0<h){for(var w=y[p].parent,B=p-1;0<=B;B--)if(y[B].indent===h){w=y[B].parent;break}y[p].parent=new CKEDITOR.dom.element(w.getName(),w.getDocument())}for(p=q.getCustomData("listarray_index")+1;p<y.length&&y[p].indent>x;p++)y[p].indent+=h;h=CKEDITOR.plugins.list.arrayToList(y,f,null,a.config.enterMode,c.getDirection());if(!d.isIndent){var v;if((v=c.getParent())&&v.is("li"))for(var q=h.listNode.getChildren(),
C=[],u,p=q.count()-1;0<=p;p--)(u=q.getItem(p))&&u.is&&u.is("li")&&C.push(u)}h&&h.listNode.replace(c);if(C&&C.length)for(p=0;p<C.length;p++){for(u=c=C[p];(u=u.getNext())&&u.is&&u.getName()in g;)CKEDITOR.env.needsNbspFiller&&!c.getFirst(e)&&c.append(l.document.createText(" ")),c.append(u);c.insertAfter(v)}h&&a.fire("contentDomInvalidated");return!0}for(var d=this,f=this.database,g=this.context,l,v=a.getSelection(),v=(v&&v.getRanges()).createIterator();l=v.getNextRange();){for(var u=l.getCommonAncestor();u&&
(u.type!=CKEDITOR.NODE_ELEMENT||!g[u.getName()]);){if(a.editable().equals(u)){u=!1;break}u=u.getParent()}u||(u=l.startPath().contains(g))&&l.setEndAt(u,CKEDITOR.POSITION_BEFORE_END);if(!u){var q=l.getEnclosedNode();q&&q.type==CKEDITOR.NODE_ELEMENT&&q.getName()in g&&(l.setStartAt(q,CKEDITOR.POSITION_AFTER_START),l.setEndAt(q,CKEDITOR.POSITION_BEFORE_END),u=q)}u&&l.startContainer.type==CKEDITOR.NODE_ELEMENT&&l.startContainer.getName()in g&&(q=new CKEDITOR.dom.walker(l),q.evaluator=h,l.startContainer=
q.next());u&&l.endContainer.type==CKEDITOR.NODE_ELEMENT&&l.endContainer.getName()in g&&(q=new CKEDITOR.dom.walker(l),q.evaluator=h,l.endContainer=q.previous());if(u)return b(u)}return 0}function h(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")}function e(a){return b(a)&&d(a)}var b=CKEDITOR.dom.walker.whitespaces(!0),d=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.TRISTATE_DISABLED,g=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(b){function c(b){d.specificDefinition.apply(this,
arguments);this.requiredContent=["ul","ol"];b.on("key",function(a){var c=b.elementPath();if("wysiwyg"==b.mode&&a.data.keyCode==this.indentKey&&c){var d=this.getContext(c);!d||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,c,d)||(b.execCommand(this.relatedGlobal),a.cancel())}},this);this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(a,b){var c=this.getContext(b),d=CKEDITOR.plugins.indentList.firstItemInPath(this.context,b,c);return c&&this.isIndent&&!d?g:l}:function(a,
b){return!this.getContext(b)||this.isIndent?l:g},exec:CKEDITOR.tools.bind(a,this)}}var d=CKEDITOR.plugins.indent;d.registerCommands(b,{indentlist:new c(b,"indentlist",!0),outdentlist:new c(b,"outdentlist")});CKEDITOR.tools.extend(c.prototype,d.specificDefinition.prototype,{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(a,b,d){var e=b.contains(h);d||(d=b.contains(a));return d&&e&&e.equals(d.getFirst(h))}}(),function(){function a(a,d){var e;
if(d)e=a.getComputedStyle("text-align");else{for(;!a.hasAttribute||!a.hasAttribute("align")&&!a.getStyle("text-align");){e=a.getParent();if(!e)break;a=e}e=a.getStyle("text-align")||a.getAttribute("align")||""}e&&(e=e.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!e&&d&&(e="rtl"==a.getComputedStyle("direction")?"right":"left");return e}function h(a,d,e){this.editor=a;this.name=d;this.value=e;this.context="p";d=a.config.justifyClasses;var g=a.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(d){switch(e){case "left":this.cssClassName=
d[0];break;case "center":this.cssClassName=d[1];break;case "right":this.cssClassName=d[2];break;case "justify":this.cssClassName=d[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+d.join("|")+")(?\x3d$|\\s)");this.requiredContent=g+"("+this.cssClassName+")"}else this.requiredContent=g+"{text-align}";this.allowedContent={"caption div h1 h2 h3 h4 h5 h6 p pre td th li":{propertiesOnly:!0,styles:this.cssClassName?null:"text-align",classes:this.cssClassName||null}};a.config.enterMode==CKEDITOR.ENTER_BR&&
(this.allowedContent.div=!0)}function e(a){var d=a.editor,e=d.createRange();e.setStartBefore(a.data.node);e.setEndAfter(a.data.node);for(var g=new CKEDITOR.dom.walker(e),h;h=g.next();)if(h.type==CKEDITOR.NODE_ELEMENT)if(!h.equals(a.data.node)&&h.getDirection())e.setStartAfter(h),g=new CKEDITOR.dom.walker(e);else{var c=d.config.justifyClasses;c&&(h.hasClass(c[0])?(h.removeClass(c[0]),h.addClass(c[2])):h.hasClass(c[2])&&(h.removeClass(c[2]),h.addClass(c[0])));c=h.getStyle("text-align");"left"==c?h.setStyle("text-align",
"right"):"right"==c&&h.setStyle("text-align","left")}}h.prototype={exec:function(b){var d=b.getSelection(),e=b.config.enterMode;if(d){for(var g=d.createBookmarks(),h=d.getRanges(),c=this.cssClassName,k,f,n=b.config.useComputedState,r=h.length-1;0<=r;r--)for(k=h[r].createIterator(),k.enlargeBr=e!=CKEDITOR.ENTER_BR;f=k.getNextParagraph(e==CKEDITOR.ENTER_P?"p":"div");)if(!f.isReadOnly()){var v=f.getName(),u;u=b.activeFilter.check(v+"{text-align}");if((v=b.activeFilter.check(v+"("+c+")"))||u){f.removeAttribute("align");
f.removeStyle("text-align");var q=c&&(f.$.className=CKEDITOR.tools.ltrim(f.$.className.replace(this.cssClassRegex,""))),t=this.state==CKEDITOR.TRISTATE_OFF&&(!n||a(f,!0)!=this.value);c&&v?t?f.addClass(c):q||f.removeAttribute("class"):t&&u&&f.setStyle("text-align",this.value)}}b.focus();b.forceNextSelectionCheck();d.selectBookmarks(g)}},refresh:function(b,d){var e=d.block||d.blockLimit,g=e.getName(),h=e.equals(b.editable()),g=this.cssClassName?b.activeFilter.check(g+"("+this.cssClassName+")"):b.activeFilter.check(g+
"{text-align}");h&&!CKEDITOR.dtd.$list[d.lastElement.getName()]?this.setState(CKEDITOR.TRISTATE_OFF):!h&&g?this.setState(a(e,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}};CKEDITOR.plugins.add("justify",{init:function(a){if(!a.blockless){var d=new h(a,"justifyleft","left"),l=new h(a,"justifycenter","center"),g=new h(a,"justifyright","right"),m=new h(a,"justifyblock","justify");a.addCommand("justifyleft",d);a.addCommand("justifycenter",
l);a.addCommand("justifyright",g);a.addCommand("justifyblock",m);a.ui.addButton&&(a.ui.addButton("JustifyLeft",{isToggle:!0,label:a.lang.common.alignLeft,command:"justifyleft",toolbar:"align,10"}),a.ui.addButton("JustifyCenter",{isToggle:!0,label:a.lang.common.center,command:"justifycenter",toolbar:"align,20"}),a.ui.addButton("JustifyRight",{isToggle:!0,label:a.lang.common.alignRight,command:"justifyright",toolbar:"align,30"}),a.ui.addButton("JustifyBlock",{isToggle:!0,label:a.lang.common.justify,
command:"justifyblock",toolbar:"align,40"}));a.on("dirChanged",e)}}})}(),CKEDITOR.plugins.add("menubutton",{requires:"button,menu",onLoad:function(){var a=function(a){var e=this._,b=CKEDITOR.document.getById(e.id),d=e.menu;e.state!==CKEDITOR.TRISTATE_DISABLED&&(e.on&&d?d.hide():(e.previousState=e.state,d||(d=e.menu=new CKEDITOR.menu(a,{panel:{className:"cke_menu_panel",attributes:{"aria-label":a.lang.common.options}}}),d.onHide=CKEDITOR.tools.bind(function(){var d=this.command?a.getCommand(this.command).modes:
this.modes;this.setState(!d||d[a.mode]?e.previousState:CKEDITOR.TRISTATE_DISABLED);e.on=0;b.setAttribute("aria-expanded","false")},this),this.onMenu&&d.addListener(this.onMenu)),this.setState(CKEDITOR.TRISTATE_ON),e.on=1,b.setAttribute("aria-expanded","true"),setTimeout(function(){d.show(CKEDITOR.document.getById(e.id),4)},0)))};CKEDITOR.ui.menuButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(h){delete h.panel;this.base(h);this.hasArrow="menu";this.click=a},statics:{handler:{create:function(a){return new CKEDITOR.ui.menuButton(a)}}}})},
beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}}),CKEDITOR.UI_MENUBUTTON="menubutton","use strict",function(){CKEDITOR.plugins.add("language",{requires:"menubutton",init:function(a){var h=a.config.language_list||["ar:Arabic:rtl","fr:French","es:Spanish"],e=this,b=a.lang.language,d={},l,g,m,c;a.addCommand("language",{allowedContent:"span[!lang,dir]",requiredContent:"span[lang]",contextSensitive:!0,exec:function(a,b){var c=d["language_"+b];if(c)a[c.style.checkActive(a.elementPath(),
a)?"removeStyle":"applyStyle"](c.style)},refresh:function(a){this.setState(e.getCurrentLangElement(a)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}});for(c=0;c<h.length;c++)l=h[c].split(":"),g=l[0],m="language_"+g,d[m]={label:l[1],langId:g,group:"language",order:c,ltr:"rtl"!=(""+l[2]).toLowerCase(),onClick:function(){a.execCommand("language",this.langId)},role:"menuitemcheckbox"},d[m].style=new CKEDITOR.style({element:"span",attributes:{lang:g,dir:d[m].ltr?"ltr":"rtl"}});d.language_remove={label:b.remove,
group:"language_remove",state:CKEDITOR.TRISTATE_DISABLED,order:d.length,onClick:function(){var b=e.getCurrentLangElement(a);b&&a.execCommand("language",b.getAttribute("lang"))}};a.addMenuGroup("language",1);a.addMenuGroup("language_remove");a.addMenuItems(d);a.ui.add("Language",CKEDITOR.UI_MENUBUTTON,{label:b.button,allowedContent:"span[!lang,dir]",requiredContent:"span[lang]",toolbar:"bidi,30",command:"language",contentTransformations:[[{element:"span",left:function(a){return a.attributes.lang&&
(!a.attributes.dir||""===a.attributes.dir)},right:function(a){var b=CKEDITOR.tools.object.keys(CKEDITOR.lang.rtl),b=-1!==CKEDITOR.tools.array.indexOf(b,a.attributes.lang)?"rtl":"ltr";a.attributes.dir=b}}]],onMenu:function(){var b={},c=e.getCurrentLangElement(a),g;for(g in d)b[g]=CKEDITOR.TRISTATE_OFF;b.language_remove=c?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;c&&(b["language_"+c.getAttribute("lang")]=CKEDITOR.TRISTATE_ON);return b}});a.addRemoveFormatFilter&&a.addRemoveFormatFilter(function(a){return!(a.is("span")&&
a.getAttribute("dir")&&a.getAttribute("lang"))})},getCurrentLangElement:function(a){var h=a.elementPath();a=h&&h.elements;var e;if(h)for(var b=0;b<a.length;b++)h=a[b],!e&&"span"==h.getName()&&h.hasAttribute("lang")&&(e=h);return e}})}(),"use strict",function(){function a(a){return a.replace(/'/g,"\\$\x26")}function h(a){for(var b=a.length,c=[],d,e=0;e<b;e++)d=a.charCodeAt(e),c.push(d);return"String.fromCharCode("+c.join(",")+")"}function e(b,c){for(var d=b.plugins.link,e=d.compiledProtectionFunction.params,
d=[d.compiledProtectionFunction.name,"("],f,g,h=0;h<e.length;h++)f=e[h].toLowerCase(),g=c[f],0<h&&d.push(","),d.push("'",g?a(encodeURIComponent(c[f])):"","'");d.push(")");return d.join("")}function b(a){a=a.config.emailProtection||"";var b;a&&"encode"!=a&&(b={},a.replace(/^([^(]+)\(([^)]+)\)$/,function(a,c,d){b.name=c;b.params=[];d.replace(/[^,\s]+/g,function(a){b.params.push(a)})}));return b}CKEDITOR.plugins.add("link",{requires:"dialog,fakeobjects",onLoad:function(){function a(b){return c.replace(/%1/g,
"rtl"==b?"right":"left").replace(/%2/g,"cke_contents_"+b)}var b="background:url("+CKEDITOR.getUrl(this.path+"images"+(CKEDITOR.env.hidpi?"/hidpi":"")+"/anchor.png")+") no-repeat %1 center;border:1px dotted #00f;background-size:16px;",c=".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{"+b+"padding-%1:18px;cursor:auto;}.%2 img.cke_anchor{"+b+"width:16px;min-height:15px;height:1.15em;vertical-align:text-bottom;}";CKEDITOR.addCss(a("ltr")+a("rtl"))},
init:function(a){var c="a[!href]";CKEDITOR.dialog.isTabEnabled(a,"link","advanced")&&(c=c.replace("]",",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type,download]{*}(*)"));CKEDITOR.dialog.isTabEnabled(a,"link","target")&&(c=c.replace("]",",target,onclick]"));a.addCommand("link",new CKEDITOR.dialogCommand("link",{allowedContent:c,requiredContent:"a[href]"}));a.addCommand("anchor",new CKEDITOR.dialogCommand("anchor",{allowedContent:"a[!name,id]",requiredContent:"a[name]"}));a.addCommand("unlink",
new CKEDITOR.unlinkCommand);a.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand);a.setKeystroke(CKEDITOR.CTRL+76,"link");a.setKeystroke(CKEDITOR.CTRL+75,"link");a.ui.addButton&&(a.ui.addButton("Link",{label:a.lang.link.toolbar,command:"link",toolbar:"links,10"}),a.ui.addButton("Unlink",{label:a.lang.link.unlink,command:"unlink",toolbar:"links,20"}),a.ui.addButton("Anchor",{label:a.lang.link.anchor.toolbar,command:"anchor",toolbar:"links,30"}));CKEDITOR.dialog.add("link",this.path+"dialogs/link.js");
CKEDITOR.dialog.add("anchor",this.path+"dialogs/anchor.js");a.on("doubleclick",function(b){var c=b.data.element.getAscendant({a:1,img:1},!0);c&&!c.isReadOnly()&&(c.is("a")?(b.data.dialog=!c.getAttribute("name")||c.getAttribute("href")&&c.getChildCount()?"link":"anchor",b.data.link=c):CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,c)&&(b.data.dialog="anchor"))},null,null,0);a.on("doubleclick",function(b){b.data.dialog in{link:1,anchor:1}&&b.data.link&&a.getSelection().selectElement(b.data.link)},null,
null,20);a.addMenuItems&&a.addMenuItems({anchor:{label:a.lang.link.anchor.menu,command:"anchor",group:"anchor",order:1},removeAnchor:{label:a.lang.link.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:a.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:a.lang.link.unlink,command:"unlink",group:"link",order:5}});a.contextMenu&&a.contextMenu.addListener(function(b){if(!b||b.isReadOnly())return null;b=CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,b);if(!b&&!(b=
CKEDITOR.plugins.link.getSelectedLink(a)))return null;var c={};b.getAttribute("href")&&b.getChildCount()&&(c={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF});b&&b.hasAttribute("name")&&(c.anchor=c.removeAnchor=CKEDITOR.TRISTATE_OFF);return c});this.compiledProtectionFunction=b(a)},afterInit:function(a){a.dataProcessor.dataFilter.addRules({elements:{a:function(b){return b.attributes.name?b.children.length?null:a.createFakeParserElement(b,"cke_anchor","anchor"):null}}});var b=a._.elementsPath&&
a._.elementsPath.filters;b&&b.push(function(b,c){if("a"==c&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,b)||b.getAttribute("name")&&(!b.getAttribute("href")||!b.getChildCount())))return"anchor"})}});var d=/^javascript:/,l=/^(?:mailto)(?:(?!\?(subject|body)=).)+/i,g=/subject=([^;?:@&=$,\/]*)/i,m=/body=([^;?:@&=$,\/]*)/i,c=/^#(.*)$/,k=/^((?:http|https|ftp|news):\/\/)?(.*)$/,f=/^(_(?:self|top|parent|blank))$/,n=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,
r=/^javascript:([^(]+)\(([^)]+)\)$/,v=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,u=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,q=/^tel:(.*)$/,t={id:"advId",dir:"advLangDir",accessKey:"advAccessKey",name:"advName",lang:"advLangCode",tabindex:"advTabIndex",title:"advTitle",type:"advContentType","class":"advCSSClasses",charset:"advCharset",style:"advStyles",rel:"advRel"};CKEDITOR.plugins.link={getSelectedLink:function(a,b){var c=a.getSelection(),d=c.getSelectedElement(),
e=c.getRanges(),f=[],g;if(!b&&d&&d.is("a"))return d;for(d=0;d<e.length;d++)if(g=c.getRanges()[d],g.shrink(CKEDITOR.SHRINK_ELEMENT,!0,{skipBogus:!0}),(g=a.elementPath(g.getCommonAncestor()).contains("a",1))&&b)f.push(g);else if(g)return g;return b?f:null},getEditorAnchors:function(a){for(var b=a.editable(),c=b.isInline()&&!a.plugins.divarea?a.document:b,b=c.getElementsByTag("a"),c=c.getElementsByTag("img"),d=[],e=0,f;f=b.getItem(e++);)(f.data("cke-saved-name")||f.hasAttribute("name"))&&d.push({name:f.data("cke-saved-name")||
f.getAttribute("name"),id:f.getAttribute("id")});for(e=0;f=c.getItem(e++);)(f=this.tryRestoreFakeAnchor(a,f))&&d.push({name:f.getAttribute("name"),id:f.getAttribute("id")});return d},fakeAnchor:!0,tryRestoreFakeAnchor:function(a,b){if(b&&b.data("cke-real-element-type")&&"anchor"==b.data("cke-real-element-type")){var c=a.restoreRealElement(b);if(c.data("cke-saved-name"))return c}},parseLinkAttributes:function(a,b){var e=b&&(b.data("cke-saved-href")||b.getAttribute("href"))||"",h=a.plugins.link.compiledProtectionFunction,
x=a.config.emailProtection,w={},B;e.match(d)&&("encode"==x?e=e.replace(n,function(a,b,c){c=c||"";return"mailto:"+String.fromCharCode.apply(String,b.split(","))+c.replace(/\\'/g,"'")}):x&&e.replace(r,function(a,b,c){if(b==h.name){w.type="email";a=w.email={};b=/(^')|('$)/g;c=c.match(/[^,\s]+/g);for(var d=c.length,e,f,g=0;g<d;g++)e=decodeURIComponent,f=c[g].replace(b,"").replace(/\\'/g,"'"),f=e(f),e=h.params[g].toLowerCase(),a[e]=f;a.address=[a.name,a.domain].join("@")}}));if(!w.type)if(x=e.match(c))w.type=
"anchor",w.anchor={},w.anchor.name=w.anchor.id=x[1];else if(x=e.match(q))w.type="tel",w.tel=x[1];else if(x=e.match(l)){B=e.match(g);var e=e.match(m),D=w.email={};w.type="email";D.address=x[0].replace("mailto:","");B&&(D.subject=decodeURIComponent(B[1]));e&&(D.body=decodeURIComponent(e[1]))}else e&&(B=e.match(k))&&(w.type="url",w.url={},w.url.protocol=B[1],w.url.url=B[2]);if(b){if(e=b.getAttribute("target"))w.target={type:e.match(f)?e:"frame",name:e};else if(e=(e=b.data("cke-pa-onclick")||b.getAttribute("onclick"))&&
e.match(v))for(w.target={type:"popup",name:e[1]};x=u.exec(e[2]);)"yes"!=x[2]&&"1"!=x[2]||x[1]in{height:1,width:1,top:1,left:1}?isFinite(x[2])&&(w.target[x[1]]=x[2]):w.target[x[1]]=!0;null!==b.getAttribute("download")&&(w.download=!0);var e={},C;for(C in t)(x=b.getAttribute(C))&&(e[t[C]]=x);if(C=b.data("cke-saved-name")||e.advName)e.advName=C;CKEDITOR.tools.isEmpty(e)||(w.advanced=e)}return w},getLinkAttributes:function(b,c){var d=b.config.emailProtection||"",f={};switch(c.type){case "url":var d=c.url&&
void 0!==c.url.protocol?c.url.protocol:"http://",g=c.url&&CKEDITOR.tools.trim(c.url.url)||"";f["data-cke-saved-href"]=0===g.indexOf("/")?g:d+g;break;case "anchor":d=c.anchor&&c.anchor.id;f["data-cke-saved-href"]="#"+(c.anchor&&c.anchor.name||d||"");break;case "email":var k=c.email,g=k.address;switch(d){case "":case "encode":var l=encodeURIComponent(k.subject||""),m=encodeURIComponent(k.body||""),k=[];l&&k.push("subject\x3d"+l);m&&k.push("body\x3d"+m);k=k.length?"?"+k.join("\x26"):"";"encode"==d?(d=
["javascript:void(location.href\x3d'mailto:'+",h(g)],k&&d.push("+'",a(k),"'"),d.push(")")):d=["mailto:",g,k];break;default:d=g.split("@",2),k.name=d[0],k.domain=d[1],d=["javascript:",e(b,k)]}f["data-cke-saved-href"]=d.join("");break;case "tel":f["data-cke-saved-href"]="tel:"+c.tel}if(c.target)if("popup"==c.target.type){for(var d=["window.open(this.href, '",c.target.name||"","', '"],n="resizable status location toolbar menubar fullscreen scrollbars dependent".split(" "),g=n.length,l=function(a){c.target[a]&&
n.push(a+"\x3d"+c.target[a])},k=0;k<g;k++)n[k]+=c.target[n[k]]?"\x3dyes":"\x3dno";l("width");l("left");l("height");l("top");d.push(n.join(","),"'); return false;");f["data-cke-pa-onclick"]=d.join("")}else"notSet"!=c.target.type&&c.target.name&&(f.target=c.target.name);c.download&&(f.download="");if(c.advanced){for(var q in t)(d=c.advanced[t[q]])&&(f[q]=d);f.name&&(f["data-cke-saved-name"]=f.name)}f["data-cke-saved-href"]&&(f.href=f["data-cke-saved-href"]);q={target:1,onclick:1,"data-cke-pa-onclick":1,
"data-cke-saved-name":1,download:1};c.advanced&&CKEDITOR.tools.extend(q,t);for(var r in f)delete q[r];return{set:f,removed:CKEDITOR.tools.object.keys(q)}},showDisplayTextForElement:function(a,b){var c={img:1,table:1,tbody:1,thead:1,tfoot:1,input:1,select:1,textarea:1},d=b.getSelection();return b.widgets&&b.widgets.focused||d&&1<d.getRanges().length?!1:!a||!a.getName||!a.is(c)}};CKEDITOR.unlinkCommand=function(){};CKEDITOR.unlinkCommand.prototype={exec:function(a){if(CKEDITOR.env.ie){var b=a.getSelection().getRanges()[0],
c=b.getPreviousEditableNode()&&b.getPreviousEditableNode().getAscendant("a",!0)||b.getNextEditableNode()&&b.getNextEditableNode().getAscendant("a",!0),d;b.collapsed&&c&&(d=b.createBookmark(),b.selectNodeContents(c),b.select())}c=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1});a.removeStyle(c);d&&(b.moveToBookmark(d),b.select())},refresh:function(a,b){var c=b.lastElement&&b.lastElement.getAscendant("a",!0);c&&"a"==c.getName()&&c.getAttribute("href")&&c.getChildCount()?
this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)},contextSensitive:1,startDisabled:1,requiredContent:"a[href]",editorFocus:1};CKEDITOR.removeAnchorCommand=function(){};CKEDITOR.removeAnchorCommand.prototype={exec:function(a){var b=a.getSelection(),c=b.createBookmarks(),d;if(b&&(d=b.getSelectedElement())&&(d.getChildCount()?d.is("a"):CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,d)))d.remove(1);else if(d=CKEDITOR.plugins.link.getSelectedLink(a))d.hasAttribute("href")?(d.removeAttributes({name:1,
"data-cke-saved-name":1}),d.removeClass("cke_anchor")):d.remove(1);b.selectBookmarks(c)},requiredContent:"a[name]"};CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0,linkDefaultProtocol:"http://"})}(),function(){function a(a,b,c,d){for(var e=CKEDITOR.plugins.list.listToArray(b.root,c),f=[],g=0;g<b.contents.length;g++){var h=b.contents[g];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(f.push(h),CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",
!0))}for(var h=b.root.getDocument(),k,l,g=0;g<f.length;g++){var m=f[g].getCustomData("listarray_index");k=e[m].parent;k.is(this.type)||(l=h.createElement(this.type),k.copyAttributes(l,{start:1,type:1}),l.removeStyle("list-style-type"),e[m].parent=l)}c=CKEDITOR.plugins.list.arrayToList(e,c,null,a.config.enterMode);for(var n,e=c.listNode.getChildCount(),g=0;g<e&&(n=c.listNode.getChild(g));g++)n.getName()==this.type&&d.push(n);c.listNode.replace(b.root);a.fire("contentDomInvalidated")}function h(a,b,
c){var d=b.contents,e=b.root.getDocument(),f=[];if(1==d.length&&d[0].equals(b.root)){var g=e.createElement("div");d[0].moveChildren&&d[0].moveChildren(g);d[0].append(g);d[0]=g}b=b.contents[0].getParent();for(g=0;g<d.length;g++)b=b.getCommonAncestor(d[g].getParent());a=a.config.useComputedState;for(var h,k,g=0;g<d.length;g++)for(var l=d[g],m;m=l.getParent();){if(m.equals(b)){f.push(l);!k&&l.getDirection()&&(k=1);l=l.getDirection(a);null!==h&&(h=h&&h!=l?null:l);break}l=m}if(!(1>f.length)){d=f[f.length-
1].getNext();g=e.createElement(this.type);for(c.push(g);f.length;)c=f.shift(),a=e.createElement("li"),l=c,l.is("pre")||u.test(l.getName())||"false"==l.getAttribute("contenteditable")?c.appendTo(a):(c.copyAttributes(a),h&&c.getDirection()&&(a.removeStyle("direction"),a.removeAttribute("dir")),c.moveChildren(a),c.remove()),a.appendTo(g);h&&k&&g.setAttribute("dir",h);d?g.insertBefore(d):g.appendTo(b)}}function e(a,b,c){function d(c){if(!(!(l=k[c?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(m=
b.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||m.is&&m.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](l)}for(var e=CKEDITOR.plugins.list.listToArray(b.root,c),f=[],g=0;g<b.contents.length;g++){var h=b.contents[g];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(f.push(h),CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",!0))}h=null;for(g=0;g<f.length;g++)h=f[g].getCustomData("listarray_index"),e[h].indent=
-1;for(g=h+1;g<e.length;g++)if(e[g].indent>e[g-1].indent+1){f=e[g-1].indent+1-e[g].indent;for(h=e[g].indent;e[g]&&e[g].indent>=h;)e[g].indent+=f,g++;g--}var k=CKEDITOR.plugins.list.arrayToList(e,c,null,a.config.enterMode,b.root.getAttribute("dir")).listNode,l,m;d(!0);d();k.replace(b.root);a.fire("contentDomInvalidated")}function b(a,b){this.name=a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function d(a,b,c,d){for(var e,f;e=a[d?"getLast":"getFirst"](q);)(f=e.getDirection(1))!==
b.getDirection(1)&&e.setAttribute("dir",f),e.remove(),c?e[d?"insertBefore":"insertAfter"](c):b.append(e,d),c=e}function l(a){function b(c){var e=a[c?"getPrevious":"getNext"](r);e&&e.type==CKEDITOR.NODE_ELEMENT&&e.is(a.getName())&&(d(a,e,null,!c),a.remove(),a=e)}b();b(1)}function g(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function m(a,b,e){a.fire("saveSnapshot");e.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);
var f=e.extractContents();b.trim(!1,!0);var g=b.createBookmark(),h=new CKEDITOR.dom.elementPath(b.startContainer),k=h.block,h=h.lastElement.getAscendant("li",1)||k,m=new CKEDITOR.dom.elementPath(e.startContainer),n=m.contains(CKEDITOR.dtd.$listItem),m=m.contains(CKEDITOR.dtd.$list);k?(k=k.getBogus())&&k.remove():m&&(k=m.getPrevious(r))&&v(k)&&k.remove();(k=f.getLast())&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("br")&&k.remove();(k=b.startContainer.getChild(b.startOffset))?f.insertBefore(k):b.startContainer.append(f);
n&&(f=c(n))&&(h.contains(n)?(d(f,n.getParent(),n),f.remove()):h.append(f));for(;e.checkStartOfBlock()&&e.checkEndOfBlock();){m=e.startPath();f=m.block;if(!f)break;f.is("li")&&(h=f.getParent(),f.equals(h.getLast(r))&&f.equals(h.getFirst(r))&&(f=h));e.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove()}e=e.clone();f=a.editable();e.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=function(a){return r(a)&&!v(a)};(e=e.next())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in
CKEDITOR.dtd.$list&&l(e);b.moveToBookmark(g);b.select();a.fire("saveSnapshot")}function c(a){return(a=a.getLast(r))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in k?a:null}var k={ol:1,ul:1},f=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(),r=function(a){return!(f(a)||n(a))},v=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,c,d,e){if(!k[a.getName()])return[];d||(d=0);c||(c=[]);for(var f=0,g=a.getChildCount();f<g;f++){var h=a.getChild(f);h.type==CKEDITOR.NODE_ELEMENT&&
h.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(h,b,c,d+1);if("li"==h.$.nodeName.toLowerCase()){var l={parent:a,indent:d,element:h,contents:[]};e?l.grandparent=e:(l.grandparent=a.getParent(),l.grandparent&&"li"==l.grandparent.$.nodeName.toLowerCase()&&(l.grandparent=l.grandparent.getParent()));b&&CKEDITOR.dom.element.setMarker(b,h,"listarray_index",c.length);c.push(l);for(var m=0,n=h.getChildCount(),q;m<n;m++)q=h.getChild(m),q.type==CKEDITOR.NODE_ELEMENT&&k[q.getName()]?CKEDITOR.plugins.list.listToArray(q,
b,c,d+1,l.grandparent):l.contents.push(q)}}return c},arrayToList:function(a,b,c,d,e){c||(c=0);if(!a||a.length<c+1)return null;for(var f,g=a[c].parent.getDocument(),h=new CKEDITOR.dom.documentFragment(g),l=null,m=c,q=Math.max(a[c].indent,0),v=null,u,G,N=d==CKEDITOR.ENTER_P?"p":"div";;){var J=a[m];f=J.grandparent;u=J.element.getDirection(1);if(J.indent==q){l&&a[m].parent.getName()==l.getName()||(l=a[m].parent.clone(!1,1),e&&l.setAttribute("dir",e),h.append(l));v=l.append(J.element.clone(0,1));u!=l.getDirection(1)&&
v.setAttribute("dir",u);for(f=0;f<J.contents.length;f++)v.append(J.contents[f].clone(1,1));m++}else if(J.indent==Math.max(q,0)+1)J=a[m-1].element.getDirection(1),m=CKEDITOR.plugins.list.arrayToList(a,null,m,d,J!=u?u:null),!v.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=g.$.documentMode&&v.append(g.createText(" ")),v.append(m.listNode),m=m.nextIndex;else if(-1==J.indent&&!c&&f){k[f.getName()]?(v=J.element.clone(!1,!0),u!=f.getDirection(1)&&v.setAttribute("dir",u)):v=new CKEDITOR.dom.documentFragment(g);
var l=f.getDirection(1)!=u,E=J.element,P=E.getAttribute("class"),I=E.getAttribute("style"),M=v.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(d!=CKEDITOR.ENTER_BR||l||I||P),O,X=J.contents.length,S;for(f=0;f<X;f++)if(O=J.contents[f],n(O)&&1<X)M?S=O.clone(1,1):v.append(O.clone(1,1));else if(O.type==CKEDITOR.NODE_ELEMENT&&O.isBlockBoundary()){l&&!O.getDirection()&&O.setAttribute("dir",u);G=O;var Y=E.getAttribute("style");Y&&G.setAttribute("style",Y.replace(/([^;])$/,"$1;")+(G.getAttribute("style")||""));P&&
O.addClass(P);G=null;S&&(v.append(S),S=null);v.append(O.clone(1,1))}else M?(G||(G=g.createElement(N),v.append(G),l&&G.setAttribute("dir",u)),I&&G.setAttribute("style",I),P&&G.setAttribute("class",P),S&&(G.append(S),S=null),G.append(O.clone(1,1))):v.append(O.clone(1,1));S&&((G||v).append(S),S=null);v.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&m!=a.length-1&&(CKEDITOR.env.needsBrFiller&&(u=v.getLast())&&u.type==CKEDITOR.NODE_ELEMENT&&u.is("br")&&u.remove(),(u=v.getLast(r))&&u.type==CKEDITOR.NODE_ELEMENT&&
u.is(CKEDITOR.dtd.$block)||v.append(g.createElement("br")));u=v.$.nodeName.toLowerCase();"div"!=u&&"p"!=u||v.appendBogus();h.append(v);l=null;m++}else return null;G=null;if(a.length<=m||Math.max(a[m].indent,0)<q)break}if(b)for(a=h.getFirst();a;){if(a.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(b,a),a.getName()in CKEDITOR.dtd.$listItem&&(c=a,g=e=d=void 0,d=c.getDirection()))){for(e=c.getParent();e&&!(g=e.getDirection());)e=e.getParent();d==g&&c.removeAttribute("dir")}a=a.getNextSourceNode()}return{listNode:h,
nextIndex:m}}};var u=/^h[1-6]$/,q=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);b.prototype={exec:function(b){function c(a){return k[a.root.getName()]&&!d(a.root,[CKEDITOR.NODE_COMMENT])}function d(a,b){return CKEDITOR.tools.array.filter(a.getChildren().toArray(),function(a){return-1===CKEDITOR.tools.array.indexOf(b,a.type)}).length}function f(a){var b=!0;if(0===a.getChildCount())return!1;a.forEach(function(a){if(a.type!==CKEDITOR.NODE_COMMENT)return b=!1},null,!0);return b}this.refresh(b,b.elementPath());
var g=b.config,m=b.getSelection(),n=m&&m.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var q=b.editable();if(q.getFirst(r)){var v=1==n.length&&n[0];(g=v&&v.getEnclosedNode())&&g.is&&this.type==g.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else g.enterMode==CKEDITOR.ENTER_BR?q.appendBogus():n[0].fixBlock(1,g.enterMode==CKEDITOR.ENTER_P?"p":"div"),m.selectRanges(n)}for(var g=m.createBookmarks(!0),q=[],C={},n=n.createIterator(),u=0;(v=n.getNextRange())&&++u;){var F=v.getBoundaryNodes(),L=F.startNode,
G=F.endNode;L.type==CKEDITOR.NODE_ELEMENT&&"td"==L.getName()&&v.setStartAt(F.startNode,CKEDITOR.POSITION_AFTER_START);G.type==CKEDITOR.NODE_ELEMENT&&"td"==G.getName()&&v.setEndAt(F.endNode,CKEDITOR.POSITION_BEFORE_END);v=v.createIterator();for(v.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;F=v.getNextParagraph();)if(!F.getCustomData("list_block")&&!f(F)){CKEDITOR.dom.element.setMarker(C,F,"list_block",1);for(var N=b.elementPath(F),L=N.elements,G=0,N=N.blockLimit,J,E=L.length-1;0<=E&&(J=L[E]);E--)if(k[J.getName()]&&
N.contains(J)){N.removeCustomData("list_group_object_"+u);(L=J.getCustomData("list_group_object"))?L.contents.push(F):(L={root:J,contents:[F]},q.push(L),CKEDITOR.dom.element.setMarker(C,J,"list_group_object",L));G=1;break}G||(G=N,G.getCustomData("list_group_object_"+u)?G.getCustomData("list_group_object_"+u).contents.push(F):(L={root:G,contents:[F]},CKEDITOR.dom.element.setMarker(C,G,"list_group_object_"+u,L),q.push(L)))}}for(J=[];0<q.length;)L=q.shift(),this.state==CKEDITOR.TRISTATE_OFF?c(L)||(k[L.root.getName()]?
a.call(this,b,L,C,J):h.call(this,b,L,J)):this.state==CKEDITOR.TRISTATE_ON&&k[L.root.getName()]&&!c(L)&&e.call(this,b,L,C);for(E=0;E<J.length;E++)l(J[E]);CKEDITOR.dom.element.clearAllMarkers(C);m.selectBookmarks(g);b.focus()},refresh:function(a,b){var c=b.contains(k,1),d=b.blockLimit||b.root;c&&d.contains(c)?this.setState(c.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(a){a.blockless||
(a.addCommand("numberedlist",new b("numberedlist","ol")),a.addCommand("bulletedlist",new b("bulletedlist","ul")),a.ui.addButton&&(a.ui.addButton("NumberedList",{isToggle:!0,label:a.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),a.ui.addButton("BulletedList",{isToggle:!0,label:a.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),a.on("key",function(b){var d=b.data.domEvent.getKey(),e;if("wysiwyg"==a.mode&&d in{8:1,46:1}){var f=a.getSelection().getRanges()[0],
h=f&&f.startPath();if(f&&f.collapsed){var l=8==d,n=a.editable(),q=new CKEDITOR.dom.walker(f.clone());q.evaluator=function(a){return r(a)&&!v(a)};q.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};d=f.clone();if(l){var C;(C=h.contains(k))&&f.checkBoundaryOfElement(C,CKEDITOR.START)&&(C=C.getParent())&&C.is("li")&&(C=c(C))?(e=C,C=C.getPrevious(r),d.moveToPosition(C&&v(C)?C:e,CKEDITOR.POSITION_BEFORE_START)):(q.range.setStartAt(n,CKEDITOR.POSITION_AFTER_START),q.range.setEnd(f.startContainer,
f.startOffset),(C=q.previous())&&C.type==CKEDITOR.NODE_ELEMENT&&(C.getName()in k||C.is("li"))&&(C.is("li")||(q.range.selectNodeContents(C),q.reset(),q.evaluator=g,C=q.previous()),e=C,d.moveToElementEditEnd(e),d.moveToPosition(d.endPath().block,CKEDITOR.POSITION_BEFORE_END)));if(e)m(a,d,f),b.cancel();else{var u=h.contains(k);u&&f.checkBoundaryOfElement(u,CKEDITOR.START)&&(e=u.getFirst(r),f.checkBoundaryOfElement(e,CKEDITOR.START)&&(C=u.getPrevious(r),c(e)?C&&(f.moveToElementEditEnd(C),f.select()):
a.execCommand("outdent"),b.cancel()))}}else if(e=h.contains("li")){if(q.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),l=(n=e.getLast(r))&&g(n)?n:e,h=0,(C=q.next())&&C.type==CKEDITOR.NODE_ELEMENT&&C.getName()in k&&C.equals(n)?(h=1,C=q.next()):f.checkBoundaryOfElement(l,CKEDITOR.END)&&(h=2),h&&C){f=f.clone();f.moveToElementEditStart(C);if(1==h&&(d.optimize(),!d.startContainer.equals(e))){for(e=d.startContainer;e.is(CKEDITOR.dtd.$inline);)u=e,e=e.getParent();u&&d.moveToPosition(u,CKEDITOR.POSITION_AFTER_END)}2==
h&&(d.moveToPosition(d.endPath().block,CKEDITOR.POSITION_BEFORE_END),f.endPath().block&&f.moveToPosition(f.endPath().block,CKEDITOR.POSITION_AFTER_START));m(a,d,f);b.cancel()}}else q.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),(C=q.next())&&C.type==CKEDITOR.NODE_ELEMENT&&C.is(k)&&(C=C.getFirst(r),h.block&&f.checkStartOfBlock()&&f.checkEndOfBlock()?(h.block.remove(),f.moveToElementEditStart(C),f.select()):c(C)?(f.moveToElementEditStart(C),f.select()):(f=f.clone(),f.moveToElementEditStart(C),m(a,
d,f)),b.cancel());setTimeout(function(){a.selectionChange(1)})}}}))}})}(),function(){CKEDITOR.plugins.liststyle={requires:"dialog,contextmenu",init:function(a){if(!a.blockless){var h;h=new CKEDITOR.dialogCommand("numberedListStyle",{requiredContent:"ol",allowedContent:"ol{list-style-type}[start]; li{list-style-type}[value]",contentTransformations:[["ol: listTypeToStyle"]]});h=a.addCommand("numberedListStyle",h);a.addFeature(h);CKEDITOR.dialog.add("numberedListStyle",this.path+"dialogs/liststyle.js");
h=new CKEDITOR.dialogCommand("bulletedListStyle",{requiredContent:"ul",allowedContent:"ul{list-style-type}",contentTransformations:[["ul: listTypeToStyle"]]});h=a.addCommand("bulletedListStyle",h);a.addFeature(h);CKEDITOR.dialog.add("bulletedListStyle",this.path+"dialogs/liststyle.js");a.addMenuGroup("list",108);a.addMenuItems({numberedlist:{label:a.lang.liststyle.numberedTitle,group:"list",command:"numberedListStyle"},bulletedlist:{label:a.lang.liststyle.bulletedTitle,group:"list",command:"bulletedListStyle"}});
a.contextMenu.addListener(function(a){if(!a||a.isReadOnly())return null;for(;a;){var b=a.getName();if("ol"==b)return{numberedlist:CKEDITOR.TRISTATE_OFF};if("ul"==b)return{bulletedlist:CKEDITOR.TRISTATE_OFF};a=a.getParent()}return null})}}};CKEDITOR.plugins.add("liststyle",CKEDITOR.plugins.liststyle)}(),"use strict",function(){function a(a,b,c){return n(b)&&n(c)&&c.equals(b.getNext(function(a){return!(aa(a)||ca(a)||r(a))}))}function h(a){this.upper=a[0];this.lower=a[1];this.set.apply(this,a.slice(2))}
function e(a){var b=a.element;if(b&&n(b)&&(b=b.getAscendant(a.triggers,!0))&&a.editable.contains(b)){var c=g(b);if("true"==c.getAttribute("contenteditable"))return b;if(c.is(a.triggers))return c}return null}function b(a,b,c){y(a,b);y(a,c);a=b.size.bottom;c=c.size.top;return a&&c?0|(a+c)/2:a||c}function d(a,b,c){return b=b[c?"getPrevious":"getNext"](function(b){return b&&b.type==CKEDITOR.NODE_TEXT&&!aa(b)||n(b)&&!r(b)&&!f(a,b)})}function l(a,b,c){return a>b&&a<c}function g(a,b){if(a.data("cke-editable"))return null;
for(b||(a=a.getParent());a&&!a.data("cke-editable");){if(a.hasAttribute("contenteditable"))return a;a=a.getParent()}return null}function m(a){var b=a.doc,d=H('\x3cspan contenteditable\x3d"false" data-cke-magic-line\x3d"1" style\x3d"'+fa+"position:absolute;border-top:1px dashed "+a.boxColor+'"\x3e\x3c/span\x3e',b),e=CKEDITOR.getUrl(this.path+"images/"+(F.hidpi?"hidpi/":"")+"icon"+(a.rtl?"-rtl":"")+".png");D(d,{attach:function(){this.wrap.getParent()||this.wrap.appendTo(a.editable,!0);return this},
lineChildren:[D(H('\x3cspan title\x3d"'+a.editor.lang.magicline.title+'" contenteditable\x3d"false"\x3e\x26#8629;\x3c/span\x3e',b),{base:fa+"height:17px;width:17px;"+(a.rtl?"left":"right")+":17px;background:url("+e+") center no-repeat "+a.boxColor+";cursor:pointer;"+(F.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(F.hidpi?"background-size: 9px 10px;":""),looks:["top:-8px; border-radius: 2px;","top:-17px; border-radius: 2px 2px 0px 0px;","top:-1px; border-radius: 0px 0px 2px 2px;"]}),
D(H(T,b),{base:ja+"left:0px;border-left-color:"+a.boxColor+";",looks:["border-width:8px 0 8px 8px;top:-8px","border-width:8px 0 0 8px;top:-8px","border-width:0 0 8px 8px;top:0px"]}),D(H(T,b),{base:ja+"right:0px;border-right-color:"+a.boxColor+";",looks:["border-width:8px 8px 8px 0;top:-8px","border-width:8px 8px 0 0;top:-8px","border-width:0 8px 8px 0;top:0px"]})],detach:function(){this.wrap.getParent()&&this.wrap.remove();return this},mouseNear:function(){y(a,this);var b=a.holdDistance,c=this.size;
return c&&l(a.mouse.y,c.top-b,c.bottom+b)&&l(a.mouse.x,c.left-b,c.right+b)?!0:!1},place:function(){var b=a.view,c=a.editable,d=a.trigger,e=d.upper,f=d.lower,g=e||f,h=g.getParent(),k={};this.trigger=d;e&&y(a,e,!0);f&&y(a,f,!0);y(a,h,!0);a.inInlineMode&&x(a,!0);h.equals(c)?(k.left=b.scroll.x,k.right=-b.scroll.x,k.width=""):(k.left=g.size.left-g.size.margin.left+b.scroll.x-(a.inInlineMode?b.editable.left+b.editable.border.left:0),k.width=g.size.outerWidth+g.size.margin.left+g.size.margin.right+b.scroll.x,
k.right="");e&&f?k.top=e.size.margin.bottom===f.size.margin.top?0|e.size.bottom+e.size.margin.bottom/2:e.size.margin.bottom<f.size.margin.top?e.size.bottom+e.size.margin.bottom:e.size.bottom+e.size.margin.bottom-f.size.margin.top:e?f||(k.top=e.size.bottom+e.size.margin.bottom):k.top=f.size.top-f.size.margin.top;d.is(M)||l(k.top,b.scroll.y-15,b.scroll.y+5)?(k.top=a.inInlineMode?0:b.scroll.y,this.look(M)):d.is(O)||l(k.top,b.pane.bottom-5,b.pane.bottom+15)?(k.top=a.inInlineMode?b.editable.height+b.editable.padding.top+
b.editable.padding.bottom:b.pane.bottom-1,this.look(O)):(a.inInlineMode&&(k.top-=b.editable.top+b.editable.border.top),this.look(X));a.inInlineMode&&(k.top--,k.top+=b.editable.scroll.top,k.left+=b.editable.scroll.left);for(var m in k)k[m]=CKEDITOR.tools.cssLength(k[m]);this.setStyles(k)},look:function(a){if(this.oldLook!=a){for(var b=this.lineChildren.length,c;b--;)(c=this.lineChildren[b]).setAttribute("style",c.base+c.looks[0|a/2]);this.oldLook=a}},wrap:new C("span",a.doc)});for(b=d.lineChildren.length;b--;)d.lineChildren[b].appendTo(d);
d.look(X);d.appendTo(d.wrap);d.unselectable();d.lineChildren[0].on("mouseup",function(b){d.detach();c(a,function(b){var c=a.line.trigger;b[c.is(J)?"insertBefore":"insertAfter"](c.is(J)?c.lower:c.upper)},!0);a.editor.focus();F.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();b.data.preventDefault(!0)});d.on("mousedown",function(a){a.data.preventDefault(!0)});a.line=d}function c(a,b,c){var d=new CKEDITOR.dom.range(a.doc),e=a.editor,f;F.ie&&a.enterMode==CKEDITOR.ENTER_BR?f=a.doc.createText(S):
(f=(f=g(a.element,!0))&&f.data("cke-enter-mode")||a.enterMode,f=new C(N[f],a.doc),f.is("br")||a.doc.createText(S).appendTo(f));c&&e.fire("saveSnapshot");b(f);d.moveToPosition(f,CKEDITOR.POSITION_AFTER_START);e.getSelection().selectRanges([d]);a.hotNode=f;c&&e.fire("saveSnapshot")}function k(a,b){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function f(d){var e=F.ie&&9>F.version?" ":S,g=a.hotNode&&a.hotNode.getText()==e&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!b;c(a,function(c){g&&
a.hotNode&&a.hotNode.remove();c[b?"insertAfter":"insertBefore"](d);c.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!b});a.lastCmdDirection=!!b});F.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(c){c=c.getSelection().getStartElement();var h;c=c.getAscendant(ha,1);if(!q(a,c)&&c&&!c.equals(a.editable)&&!c.contains(a.editable)){(h=g(c))&&"false"==h.getAttribute("contenteditable")&&(c=h);a.element=c;h=d(a,c,!b);var k;n(h)&&h.is(a.triggers)&&
h.is(U)&&(!d(a,h,!b)||(k=d(a,h,!b))&&n(k)&&k.is(a.triggers))?f(h):(k=e(a,c),n(k)&&(d(a,k,!b)?(c=d(a,k,!b))&&n(c)&&c.is(a.triggers)&&f(k):f(k)))}}}()}}function f(a,b){if(!b||b.type!=CKEDITOR.NODE_ELEMENT||!b.$)return!1;var c=a.line;return c.wrap.equals(b)||c.wrap.contains(b)}function n(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.$}function r(a){if(!n(a))return!1;var b;(b=v(a))||(n(a)?(b={left:1,right:1,center:1},b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])):b=!1);return b}function v(a){return!!{absolute:1,
fixed:1}[a.getComputedStyle("position")]}function u(a,b){return n(b)?b.is(a.triggers):null}function q(a,b){if(!b)return!1;for(var c=b.getParents(1),d=c.length;d--;)for(var e=a.tabuList.length;e--;)if(c[d].hasAttribute(a.tabuList[e]))return!0;return!1}function t(a,b,c){b=b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(da)});if(!b)return!1;y(a,b);return c?b.size.top>a.mouse.y:b.size.bottom<a.mouse.y}function z(a){var b=a.editable,c=a.mouse,d=a.view,e=a.triggerOffset;x(a);var g=c.y>
(a.inInlineMode?d.editable.top+d.editable.height/2:Math.min(d.editable.height,d.pane.height)/2),b=b[g?"getLast":"getFirst"](function(a){return!(aa(a)||ca(a))});if(!b)return null;f(a,b)&&(b=a.line.wrap[g?"getPrevious":"getNext"](function(a){return!(aa(a)||ca(a))}));if(!n(b)||r(b)||!u(a,b))return null;y(a,b);return!g&&0<=b.size.top&&l(c.y,0,b.size.top+e)?(a=a.inInlineMode||0===d.scroll.y?M:X,new h([null,b,J,I,a])):g&&b.size.bottom<=d.pane.height&&l(c.y,b.size.bottom-e,d.pane.height)?(a=a.inInlineMode||
l(b.size.bottom,d.pane.height-e,d.pane.height)?O:X,new h([b,null,E,I,a])):null}function p(a){var b=a.mouse,c=a.view,f=a.triggerOffset,g=e(a);if(!g)return null;y(a,g);var f=Math.min(f,0|g.size.outerHeight/2),k=[],m,q;if(l(b.y,g.size.top-1,g.size.top+f))q=!1;else if(l(b.y,g.size.bottom-f,g.size.bottom+1))q=!0;else return null;if(r(g)||t(a,g,q)||g.getParent().is(Y))return null;var p=d(a,g,!q);if(p){if(p&&p.type==CKEDITOR.NODE_TEXT)return null;if(n(p)){if(r(p)||!u(a,p)||p.getParent().is(Y))return null;
k=[p,g][q?"reverse":"concat"]().concat([P,I])}}else g.equals(a.editable[q?"getLast":"getFirst"](a.isRelevant))?(x(a),q&&l(b.y,g.size.bottom-f,c.pane.height)&&l(g.size.bottom,c.pane.height-f,c.pane.height)?m=O:l(b.y,0,g.size.top+f)&&(m=M)):m=X,k=[null,g][q?"reverse":"concat"]().concat([q?E:J,I,m,g.equals(a.editable[q?"getLast":"getFirst"](a.isRelevant))?q?O:M:X]);return 0 in k?new h(k):null}function A(a,b,c,d){for(var e=b.getDocumentPosition(),f={},g={},h={},k={},l=Q.length;l--;)f[Q[l]]=parseInt(b.getComputedStyle.call(b,
"border-"+Q[l]+"-width"),10)||0,h[Q[l]]=parseInt(b.getComputedStyle.call(b,"padding-"+Q[l]),10)||0,g[Q[l]]=parseInt(b.getComputedStyle.call(b,"margin-"+Q[l]),10)||0;c&&!d||w(a,d);k.top=e.y-(c?0:a.view.scroll.y);k.left=e.x-(c?0:a.view.scroll.x);k.outerWidth=b.$.offsetWidth;k.outerHeight=b.$.offsetHeight;k.height=k.outerHeight-(h.top+h.bottom+f.top+f.bottom);k.width=k.outerWidth-(h.left+h.right+f.left+f.right);k.bottom=k.top+k.outerHeight;k.right=k.left+k.outerWidth;a.inInlineMode&&(k.scroll={top:b.$.scrollTop,
left:b.$.scrollLeft});return D({border:f,padding:h,margin:g,ignoreScroll:c},k,!0)}function y(a,b,c){if(!n(b))return b.size=null;if(!b.size)b.size={};else if(b.size.ignoreScroll==c&&b.size.date>new Date-ia)return null;return D(b.size,A(a,b,c),{date:+new Date},!0)}function x(a,b){a.view.editable=A(a,a.editable,b,!0)}function w(a,b){a.view||(a.view={});var c=a.view;if(!(!b&&c&&c.date>new Date-ia)){var d=a.win,c=d.getScrollPosition(),d=d.getViewPaneSize();D(a.view,{scroll:{x:c.x,y:c.y,width:a.doc.$.documentElement.scrollWidth-
d.width,height:a.doc.$.documentElement.scrollHeight-d.height},pane:{width:d.width,height:d.height,bottom:d.height+c.y},date:+new Date},!0)}}function B(a,b,c,d){for(var e=d,f=d,g=0,k=!1,l=!1,m=a.view.pane.height,n=a.mouse;n.y+g<m&&0<n.y-g;){k||(k=b(e,d));l||(l=b(f,d));!k&&0<n.y-g&&(e=c(a,{x:n.x,y:n.y-g}));!l&&n.y+g<m&&(f=c(a,{x:n.x,y:n.y+g}));if(k&&l)break;g+=2}return new h([e,f,null,null])}CKEDITOR.plugins.add("magicline",{init:function(a){var b=a.config,g=b.magicline_triggerOffset||30,l={editor:a,
enterMode:b.enterMode,triggerOffset:g,holdDistance:0|g*(b.magicline_holdDistance||.5),boxColor:b.magicline_color||"#ff0000",rtl:"rtl"==b.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(b.magicline_tabuList||[]),triggers:b.magicline_everywhere?ha:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},t,B,u;l.isRelevant=function(a){return n(a)&&!f(l,a)&&!r(a)};a.on("contentDom",function(){var g=a.editable(),n=a.document,r=a.window;D(l,{editable:g,inInlineMode:g.isInline(),doc:n,win:r,
hotNode:null},!0);l.boundary=l.inInlineMode?l.editable:l.doc.getDocumentElement();g.is(G.$inline)||(l.inInlineMode&&!v(g)&&g.setStyles({position:"relative",top:null,left:null}),m.call(this,l),w(l),g.attachListener(a,"beforeUndoImage",function(){l.line.detach()}),g.attachListener(a,"beforeGetData",function(){l.line.wrap.getParent()&&(l.line.detach(),a.once("getData",function(){l.line.attach()},null,null,1E3))},null,null,0),g.attachListener(l.inInlineMode?n:n.getWindow().getFrame(),"mouseout",function(b){if("wysiwyg"==
a.mode)if(l.inInlineMode){var c=b.data.$.clientX;b=b.data.$.clientY;w(l);x(l,!0);var d=l.view.editable,e=l.view.scroll;c>d.left-e.x&&c<d.right-e.x&&b>d.top-e.y&&b<d.bottom-e.y||(clearTimeout(u),u=null,l.line.detach())}else clearTimeout(u),u=null,l.line.detach()}),g.attachListener(g,"keyup",function(){l.hiddenMode=0}),g.attachListener(g,"keydown",function(b){if("wysiwyg"==a.mode)switch(b.data.getKeystroke()){case 2228240:case 16:l.hiddenMode=1,l.line.detach()}}),g.attachListener(l.inInlineMode?g:n,
"mousemove",function(b){B=!0;if("wysiwyg"==a.mode&&!a.readOnly&&!u){var c={x:b.data.$.clientX,y:b.data.$.clientY};u=setTimeout(function(){l.mouse=c;u=l.trigger=null;w(l);B&&!l.hiddenMode&&a.focusManager.hasFocus&&!l.line.mouseNear()&&(l.element=Z(l,!0))&&((l.trigger=z(l)||p(l)||V(l))&&!q(l,l.trigger.upper||l.trigger.lower)?l.line.attach().place():(l.trigger=null,l.line.detach()),B=!1)},30)}}),g.attachListener(r,"scroll",function(){"wysiwyg"==a.mode&&(l.line.detach(),F.webkit&&(l.hiddenMode=1,clearTimeout(t),
t=setTimeout(function(){l.mouseDown||(l.hiddenMode=0)},50)))}),g.attachListener(L?n:r,"mousedown",function(){"wysiwyg"==a.mode&&(l.line.detach(),l.hiddenMode=1,l.mouseDown=1)}),g.attachListener(L?n:r,"mouseup",function(){l.hiddenMode=0;l.mouseDown=0}),a.addCommand("accessPreviousSpace",k(l)),a.addCommand("accessNextSpace",k(l,!0)),a.setKeystroke([[b.magicline_keystrokePrevious,"accessPreviousSpace"],[b.magicline_keystrokeNext,"accessNextSpace"]]),a.on("loadSnapshot",function(){var b,c,d,e;for(e in{p:1,
br:1,div:1})for(b=a.document.getElementsByTag(e),d=b.count();d--;)if((c=b.getItem(d)).data("cke-magicline-hot")){l.hotNode=c;l.lastCmdDirection="true"===c.data("cke-magicline-dir")?!0:!1;return}}),a._.magiclineBackdoor={accessFocusSpace:c,boxTrigger:h,isLine:f,getAscendantTrigger:e,getNonEmptyNeighbour:d,getSize:A,that:l,triggerEdge:p,triggerEditable:z,triggerExpand:V})},this)}});var D=CKEDITOR.tools.extend,C=CKEDITOR.dom.element,H=C.createFromHtml,F=CKEDITOR.env,L=CKEDITOR.env.ie&&9>CKEDITOR.env.version,
G=CKEDITOR.dtd,N={},J=128,E=64,P=32,I=16,M=4,O=2,X=1,S=" ",Y=G.$listItem,da=G.$tableContent,U=D({},G.$nonEditable,G.$empty),ha=G.$block,ia=100,fa="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",ja=fa+"border-color:transparent;display:block;border-style:solid;",T="\x3cspan\x3e"+S+"\x3c/span\x3e";N[CKEDITOR.ENTER_BR]="br";N[CKEDITOR.ENTER_P]="p";N[CKEDITOR.ENTER_DIV]="div";h.prototype={set:function(a,b,c){this.properties=
a+b+(c||X);return this},is:function(a){return(this.properties&a)==a}};var Z=function(){function a(b,c){var d=b.$.elementFromPoint(c.x,c.y);return d&&d.nodeType?new CKEDITOR.dom.element(d):null}return function(b,c,d){if(!b.mouse)return null;var e=b.doc,g=b.line.wrap;d=d||b.mouse;var h=a(e,d);c&&f(b,h)&&(g.hide(),h=a(e,d),g.show());return!h||h.type!=CKEDITOR.NODE_ELEMENT||!h.$||F.ie&&9>F.version&&!b.boundary.equals(h)&&!b.boundary.contains(h)?null:h}}(),aa=CKEDITOR.dom.walker.whitespaces(),ca=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),
V=function(){function c(e){var f=e.element,g,h,k;if(!n(f)||f.contains(e.editable)||f.isReadOnly())return null;k=B(e,function(a,b){return!b.equals(a)},function(a,b){return Z(a,!0,b)},f);g=k.upper;h=k.lower;if(a(e,g,h))return k.set(P,8);if(g&&f.contains(g))for(;!g.getParent().equals(f);)g=g.getParent();else g=f.getFirst(function(a){return d(e,a)});if(h&&f.contains(h))for(;!h.getParent().equals(f);)h=h.getParent();else h=f.getLast(function(a){return d(e,a)});if(!g||!h)return null;y(e,g);y(e,h);if(!l(e.mouse.y,
g.size.top,h.size.bottom))return null;for(var f=Number.MAX_VALUE,m,K,q,p;h&&!h.equals(g)&&(K=g.getNext(e.isRelevant));)m=Math.abs(b(e,g,K)-e.mouse.y),m<f&&(f=m,q=g,p=K),g=K,y(e,g);if(!q||!p||!l(e.mouse.y,q.size.top,p.size.bottom))return null;k.upper=q;k.lower=p;return k.set(P,8)}function d(a,b){return!(b&&b.type==CKEDITOR.NODE_TEXT||ca(b)||r(b)||f(a,b)||b.type==CKEDITOR.NODE_ELEMENT&&b.$&&b.is("br"))}return function(b){var d=c(b),e;if(e=d){e=d.upper;var f=d.lower;e=!e||!f||r(f)||r(e)||f.equals(e)||
e.equals(f)||f.contains(e)||e.contains(f)?!1:u(b,e)&&u(b,f)&&a(b,e,f)?!0:!1}return e?d:null}}(),Q=["top","left","right","bottom"]}(),CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51,CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.SHIFT+52,function(){function a(a){if(!a||a.type!=CKEDITOR.NODE_ELEMENT||"form"!=a.getName())return[];for(var b=[],d=["style","className"],c=0;c<d.length;c++){var e=a.$.elements.namedItem(d[c]);e&&(e=new CKEDITOR.dom.element(e),b.push([e,
e.nextSibling]),e.remove())}return b}function h(a,b){if(a&&a.type==CKEDITOR.NODE_ELEMENT&&"form"==a.getName()&&0<b.length)for(var d=b.length-1;0<=d;d--){var c=b[d][0],e=b[d][1];e?c.insertBefore(e):c.appendTo(a)}}function e(b,d){var e=a(b),c={},k=b.$;d||(c["class"]=k.className||"",k.className="");c.inline=k.style.cssText||"";d||(k.style.cssText="position: static; overflow: visible");h(e);return c}function b(b,d){var e=a(b),c=b.$;"class"in d&&(c.className=d["class"]);"inline"in d&&(c.style.cssText=
d.inline);h(e)}function d(a){if(!a.editable().isInline()){var b=CKEDITOR.instances,d;for(d in b){var c=b[d];"wysiwyg"!=c.mode||c.readOnly||(c=c.document.getBody(),c.setAttribute("contentEditable",!1),c.setAttribute("contentEditable",!0))}a.editable().hasFocus&&(a.toolbox.focus(),a.focus())}}CKEDITOR.plugins.add("maximize",{init:function(a){function g(){var b=f.getViewPaneSize();a.resize(b.width,b.height,null,!0)}function h(){var b=a.getCommand("maximize");b.state===CKEDITOR.TRISTATE_ON&&b.exec()}
if(a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var c=a.lang,k=CKEDITOR.document,f=k.getWindow(),n,r,v,u=CKEDITOR.TRISTATE_OFF;a.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:!1,exec:function(){var c=a.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}),h=a.ui.space("contents");if("wysiwyg"==a.mode){var m=a.getSelection();n=m&&m.getRanges();r=f.getScrollPosition()}else{var q=a.editable().$;n=!CKEDITOR.env.ie&&
[q.selectionStart,q.selectionEnd];r=[q.scrollLeft,q.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){f.on("resize",g);v=f.getScrollPosition();for(m=a.container;m=m.getParent();)m.setCustomData("maximize_saved_styles",e(m)),m.setStyle("z-index",a.config.baseFloatZIndex-5);h.setCustomData("maximize_saved_styles",e(h,!0));c.setCustomData("maximize_saved_styles",e(c,!0));h={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0};k.getDocumentElement().setStyles(h);!CKEDITOR.env.gecko&&k.getDocumentElement().setStyle("position",
"fixed");CKEDITOR.env.gecko&&CKEDITOR.env.quirks||k.getBody().setStyles(h);CKEDITOR.env.ie?setTimeout(function(){f.$.scrollTo(0,0)},0):f.$.scrollTo(0,0);c.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute");c.$.offsetLeft;c.setStyles({"z-index":a.config.baseFloatZIndex-5,left:"0px",top:"0px"});c.addClass("cke_maximized");g();h=c.getDocumentPosition();c.setStyles({left:-1*h.x+"px",top:-1*h.y+"px"});CKEDITOR.env.gecko&&d(a)}else if(this.state==CKEDITOR.TRISTATE_ON){f.removeListener("resize",
g);for(var m=[h,c],y=0;y<m.length;y++)b(m[y],m[y].getCustomData("maximize_saved_styles")),m[y].removeCustomData("maximize_saved_styles");for(m=a.container;m=m.getParent();)b(m,m.getCustomData("maximize_saved_styles")),m.removeCustomData("maximize_saved_styles");CKEDITOR.env.ie?setTimeout(function(){f.$.scrollTo(v.x,v.y)},0):f.$.scrollTo(v.x,v.y);c.removeClass("cke_maximized");CKEDITOR.env.webkit&&(c.setStyle("display","inline"),setTimeout(function(){c.setStyle("display","block")},0));a.fire("resize",
{outerHeight:a.container.$.offsetHeight,contentsHeight:h.$.offsetHeight,outerWidth:a.container.$.offsetWidth})}this.toggleState();"wysiwyg"==a.mode?n?(CKEDITOR.env.gecko&&d(a),a.getSelection().selectRanges(n),(q=a.getSelection().getStartElement())&&q.scrollIntoView(!0)):f.$.scrollTo(r.x,r.y):(n&&(q.selectionStart=n[0],q.selectionEnd=n[1]),q.scrollLeft=r[0],q.scrollTop=r[1]);n=r=null;u=this.state;a.fire("maximize",this.state)},canUndo:!1});a.ui.addButton&&a.ui.addButton("Maximize",{isToggle:!0,label:c.maximize.maximize,
command:"maximize",toolbar:"tools,10"});a.on("mode",function(){var b=a.getCommand("maximize");b.setState(b.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:u)},null,null,100);if(a.config.maximize_historyIntegration){var q=a.config.maximize_historyIntegration===CKEDITOR.HISTORY_NATIVE?"popstate":"hashchange";f.on(q,h);a.on("destroy",function(){f.removeListener(q,h)})}}}});CKEDITOR.config.maximize_historyIntegration=CKEDITOR.HISTORY_NATIVE}(),function(){CKEDITOR.plugins.add("mediaembed",
{init:function(a){CKEDITOR.dialog.add("MediaEmbedDialog",function(a){return{title:"Embed Media",minWidth:550,minHeight:200,contents:[{id:"iframe",expand:!0,elements:[{id:"embedArea",type:"textarea",label:"Paste Embed Code Here",autofocus:"autofocus",setup:function(a){},commit:function(a){}}]}],onOk:function(){var e=a.document.createElement("div");e.setHtml(this.getContentElement("iframe","embedArea").getValue());a.insertElement(e)}}});a.addCommand("MediaEmbed",new CKEDITOR.dialogCommand("MediaEmbedDialog",
{allowedContent:"iframe[*]"}));a.ui.addButton("MediaEmbed",{label:"Embed Media",command:"MediaEmbed",toolbar:"mediaembed"})}})}(),CKEDITOR.plugins.add("newpage",{init:function(a){a.addCommand("newpage",{modes:{wysiwyg:1,source:1},exec:function(a){var e=this;a.setData(a.config.newpage_html||"",function(){a.focus();setTimeout(function(){a.fire("afterCommandExec",{name:"newpage",command:e});a.selectionChange()},200)})},async:!0});a.ui.addButton&&a.ui.addButton("NewPage",{label:a.lang.newpage.toolbar,
command:"newpage",toolbar:"document,20"})}}),"use strict",function(){function a(a){return{"aria-label":a,"class":"cke_pagebreak",contenteditable:"false","data-cke-display-name":"pagebreak","data-cke-pagebreak":1,style:"page-break-after: always",title:a}}CKEDITOR.plugins.add("pagebreak",{requires:"fakeobjects",onLoad:function(){var a=("background:url("+CKEDITOR.getUrl(this.path+"images/pagebreak.gif")+") no-repeat center center;clear:both;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;padding:0;height:7px;cursor:default;").replace(/;/g,
" !important;");CKEDITOR.addCss("div.cke_pagebreak{"+a+"}")},init:function(a){a.blockless||(a.addCommand("pagebreak",CKEDITOR.plugins.pagebreakCmd),a.ui.addButton&&a.ui.addButton("PageBreak",{label:a.lang.pagebreak.toolbar,command:"pagebreak",toolbar:"insert,70"}),CKEDITOR.env.webkit&&a.on("contentDom",function(){a.document.on("click",function(e){e=e.data.getTarget();e.is("div")&&e.hasClass("cke_pagebreak")&&a.getSelection().selectElement(e)})}))},afterInit:function(h){function e(b){CKEDITOR.tools.extend(b.attributes,
a(h.lang.pagebreak.alt),!0);b.children.length=0}var b=h.dataProcessor,d=b&&b.dataFilter,b=b&&b.htmlFilter,l=/page-break-after\s*:\s*always/i,g=/display\s*:\s*none/i;b&&b.addRules({attributes:{"class":function(a,b){var d=a.replace("cke_pagebreak","");if(d!=a){var e=CKEDITOR.htmlParser.fragment.fromHtml('\x3cspan style\x3d"display: none;"\x3e\x26nbsp;\x3c/span\x3e').children[0];b.children.length=0;b.add(e);e=b.attributes;delete e["aria-label"];delete e.contenteditable;delete e.title}return d}}},{applyToAll:!0,
priority:5});d&&d.addRules({elements:{div:function(a){if(a.attributes["data-cke-pagebreak"])e(a);else if(l.test(a.attributes.style)){var b=a.children[0];b&&"span"==b.name&&g.test(b.attributes.style)&&e(a)}}}})}});CKEDITOR.plugins.pagebreakCmd={exec:function(a){a.insertElement(CKEDITOR.plugins.pagebreak.createElement(a))},context:"div",allowedContent:{div:{styles:"!page-break-after"},span:{match:function(a){return(a=a.parent)&&"div"==a.name&&a.styles&&a.styles["page-break-after"]},styles:"display"}},
requiredContent:"div{page-break-after}"};CKEDITOR.plugins.pagebreak={createElement:function(h){return h.document.createElement("div",{attributes:a(h.lang.pagebreak.alt)})}}}(),function(){CKEDITOR.plugins.add("xml",{});CKEDITOR.xml=function(a){var h=null;if("object"==typeof a)h=a;else if(a=(a||"").replace(/&nbsp;/g," "),"ActiveXObject"in window){try{h=new ActiveXObject("MSXML2.DOMDocument")}catch(e){try{h=new ActiveXObject("Microsoft.XmlDom")}catch(b){}}h&&(h.async=!1,h.resolveExternals=!1,h.validateOnParse=
!1,h.loadXML(a))}else window.DOMParser&&(h=(new DOMParser).parseFromString(a,"text/xml"));this.baseXml=h};CKEDITOR.xml.prototype={selectSingleNode:function(a,h){var e=this.baseXml;if(h||(h=e)){if("selectSingleNode"in h)return h.selectSingleNode(a);if(e.evaluate)return(e=e.evaluate(a,h,null,9,null))&&e.singleNodeValue||null}return null},selectNodes:function(a,h){var e=this.baseXml,b=[];if(h||(h=e)){if("selectNodes"in h)return h.selectNodes(a);if(e.evaluate&&(e=e.evaluate(a,h,null,5,null)))for(var d;d=
e.iterateNext();)b.push(d)}return b},getInnerXml:function(a,h){var e=this.selectSingleNode(a,h),b=[];if(e)for(e=e.firstChild;e;)e.xml?b.push(e.xml):window.XMLSerializer&&b.push((new XMLSerializer).serializeToString(e)),e=e.nextSibling;return b.length?b.join(""):null}}}(),function(){CKEDITOR.plugins.add("ajax",{requires:"xml"});CKEDITOR.ajax=function(){function a(){if(!CKEDITOR.env.ie||"file:"!=location.protocol)try{return new XMLHttpRequest}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(b){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}return null}
function h(a,b){if(4!=a.readyState||!(200<=a.status&&300>a.status||304==a.status||0===a.status||1223==a.status))return null;switch(b){case "text":return a.responseText;case "xml":var e=a.responseXML;return new CKEDITOR.xml(e&&e.firstChild?e:a.responseText);case "arraybuffer":return a.response;default:return null}}function e(b,e,g){var m=!!e,c=a();if(!c)return null;m&&"text"!==g&&"xml"!==g&&(c.responseType=g);c.open("GET",b,m);c.setRequestHeader("X-Requested-With","XMLHttpRequest");c.setRequestHeader("X-Seditio-Csrf",
document.querySelector('meta[name\x3d"csrf-token"]').content||"");m&&(c.onreadystatechange=function(){4==c.readyState&&(e(h(c,g)),c=null)});c.send(null);return m?"":h(c,g)}function b(b,e,g,m,c){var k=a();if(!k)return null;k.open("POST",b,!0);k.setRequestHeader("X-Requested-With","XMLHttpRequest");k.setRequestHeader("X-Seditio-Csrf",document.querySelector('meta[name\x3d"csrf-token"]').content||"");k.onreadystatechange=function(){4==k.readyState&&(m&&m(h(k,c)),k=null)};k.setRequestHeader("Content-type",
g||"application/x-www-form-urlencoded; charset\x3dUTF-8");k.send(e)}return{load:function(a,b,g){return e(a,b,g||"text")},post:function(a,e,g,h){return b(a,e,g,h,"text")},loadXml:function(a,b){return e(a,b,"xml")},loadText:function(a,b){return e(a,b,"text")},loadBinary:function(a,b){return e(a,b,"arraybuffer")}}}()}(),function(){function a(a,b){return CKEDITOR.tools.array.filter(a,function(a){return a.canHandle(b)}).sort(function(a,b){return a.priority===b.priority?0:a.priority-b.priority})}function h(a,
b){var c=a.shift();c&&c.handle(b,function(){h(a,b)})}function e(a){var b=CKEDITOR.tools.array.reduce(a,function(a,b){return CKEDITOR.tools.array.isArray(b.filters)?a.concat(b.filters):a},[]);return CKEDITOR.tools.array.filter(b,function(a,d){return CKEDITOR.tools.array.indexOf(b,a)===d})}function b(a,b){var c=0,e,f;if(!CKEDITOR.tools.array.isArray(a)||0===a.length)return!0;e=CKEDITOR.tools.array.filter(a,function(a){return-1===CKEDITOR.tools.array.indexOf(d,a)});if(0<e.length)for(f=0;f<e.length;f++)(function(a){CKEDITOR.scriptLoader.queue(a,
function(f){f&&d.push(a);++c===e.length&&b()})})(e[f]);return 0===e.length}var d=[],l=CKEDITOR.tools.createClass({$:function(){this.handlers=[]},proto:{register:function(a){"number"!==typeof a.priority&&(a.priority=10);this.handlers.push(a)},addPasteListener:function(d){d.on("paste",function(l){var c=a(this.handlers,l),k;if(0!==c.length){k=e(c);k=b(k,function(){return d.fire("paste",l.data)});if(!k)return l.cancel();h(c,l)}},this,null,3)}}});CKEDITOR.plugins.add("pastetools",{requires:["clipboard",
"ajax"],beforeInit:function(a){a.pasteTools=new l;a.pasteTools.addPasteListener(a)}});CKEDITOR.plugins.pastetools={filters:{},loadFilters:b,createFilter:function(a){var b=CKEDITOR.tools.array.isArray(a.rules)?a.rules:[a.rules],c=a.additionalTransforms;return function(a,d){var e=new CKEDITOR.htmlParser.basicWriter,g=new CKEDITOR.htmlParser.filter,h;c&&(a=c(a,d));CKEDITOR.tools.array.forEach(b,function(b){g.addRules(b(a,d,g))});h=CKEDITOR.htmlParser.fragment.fromHtml(a);g.applyTo(h);h.writeHtml(e);
return e.getHtml()}},getClipboardData:function(a,b){var c;return CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"text/html"===b?(c=a.dataTransfer.getData(b,!0))||"text/html"!==b?c:a.dataValue:null},getConfigValue:function(a,b){if(a&&a.config){var c=CKEDITOR.tools,d=a.config,e=c.object.keys(d),h=["pasteTools_"+b,"pasteFromWord_"+b,"pasteFromWord"+c.capitalize(b,!0)],h=c.array.find(h,function(a){return-1!==c.array.indexOf(e,a)});return d[h]}},getContentGeneratorName:function(a){if((a=/<meta\s+name=["']?generator["']?\s+content=["']?(\w+)/gi.exec(a))&&
a.length)return a=a[1].toLowerCase(),0===a.indexOf("microsoft")?"microsoft":0===a.indexOf("libreoffice")?"libreoffice":"unknown"}};CKEDITOR.pasteFilters=CKEDITOR.plugins.pastetools.filters}(),function(){CKEDITOR.plugins.add("pastefromgdocs",{requires:"pastetools",init:function(a){var h=CKEDITOR.plugins.getPath("pastetools"),e=this.path;a.pasteTools.register({filters:[CKEDITOR.getUrl(h+"filter/common.js"),CKEDITOR.getUrl(e+"filter/default.js")],canHandle:function(a){return/id=(\"|\')?docs\-internal\-guid\-/.test(a.data.dataValue)},
handle:function(b,d){var e=b.data,g=CKEDITOR.plugins.pastetools.getClipboardData(e,"text/html");e.dontFilter=!0;e.dataValue=CKEDITOR.pasteFilters.gdocs(g,a);!0===a.config.forcePasteAsPlainText&&(e.type="text");d()}})}})}(),function(){CKEDITOR.plugins.add("pastefromlibreoffice",{requires:"pastetools",isSupportedEnvironment:function(){var a=CKEDITOR.env.ie&&11>=CKEDITOR.env.version;return!(CKEDITOR.env.webkit&&!CKEDITOR.env.chrome)&&!a},init:function(a){if(this.isSupportedEnvironment()){var h=CKEDITOR.plugins.getPath("pastetools"),
e=this.path;a.pasteTools.register({priority:100,filters:[CKEDITOR.getUrl(h+"filter/common.js"),CKEDITOR.getUrl(h+"filter/image.js"),CKEDITOR.getUrl(e+"filter/default.js")],canHandle:function(a){a=a.data;return(a=a.dataTransfer.getData("text/html",!0)||a.dataValue)?"libreoffice"===CKEDITOR.plugins.pastetools.getContentGeneratorName(a):!1},handle:function(b,d){var e=b.data,g=e.dataValue||CKEDITOR.plugins.pastetools.getClipboardData(e,"text/html");e.dontFilter=!0;g=CKEDITOR.pasteFilters.image(g,a,CKEDITOR.plugins.pastetools.getClipboardData(e,
"text/rtf"));e.dataValue=CKEDITOR.pasteFilters.libreoffice(g,a);!0===a.config.forcePasteAsPlainText&&(e.type="text");d()}})}}})}(),function(){CKEDITOR.plugins.add("pastefromword",{requires:"pastetools",init:function(a){var h=0,e=CKEDITOR.plugins.getPath("pastetools"),b=this.path,d=void 0===a.config.pasteFromWord_inlineImages?!0:a.config.pasteFromWord_inlineImages,e=[CKEDITOR.getUrl(e+"filter/common.js"),CKEDITOR.getUrl(e+"filter/image.js"),CKEDITOR.getUrl(b+"filter/default.js")];a.addCommand("pastefromword",
{canUndo:!1,async:!0,exec:function(a,b){h=1;a.execCommand("paste",{type:"html",notification:b&&"undefined"!==typeof b.notification?b.notification:!0})}});CKEDITOR.plugins.clipboard.addPasteButton(a,"PasteFromWord",{label:a.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});a.pasteTools.register({filters:a.config.pasteFromWordCleanupFile?[a.config.pasteFromWordCleanupFile]:e,canHandle:function(a){a=CKEDITOR.plugins.pastetools.getClipboardData(a.data,"text/html");var b=CKEDITOR.plugins.pastetools.getContentGeneratorName(a),
d=/(class="?Mso|style=["'][^"]*?\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/,b=b?"microsoft"===b:d.test(a);return a&&(h||b)},handle:function(b,e){var m=b.data,c=CKEDITOR.plugins.pastetools.getClipboardData(m,"text/html"),k=CKEDITOR.plugins.pastetools.getClipboardData(m,"text/rtf"),c={dataValue:c,dataTransfer:{"text/rtf":k}};if(!1!==a.fire("pasteFromWord",c)||h){m.dontFilter=!0;if(h||!a.config.pasteFromWordPromptCleanup||confirm(a.lang.pastefromword.confirmCleanup))c.dataValue=CKEDITOR.cleanWord(c.dataValue,
a),CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&d&&CKEDITOR.pasteFilters.image&&(c.dataValue=CKEDITOR.pasteFilters.image(c.dataValue,a,k)),a.fire("afterPasteFromWord",c),m.dataValue=c.dataValue,!0===a.config.forcePasteAsPlainText?m.type="text":CKEDITOR.plugins.clipboard.isCustomCopyCutSupported||"allow-word"!==a.config.forcePasteAsPlainText||(m.type="html");h=0;e()}}})}})}(),function(){var a={canUndo:!1,async:!0,exec:function(a,e){var b=a.lang,d=CKEDITOR.tools.keystrokeToString(b.common.keyboard,
a.getCommandKeystroke(CKEDITOR.env.ie?a.commands.paste:this)),l=e&&"undefined"!==typeof e.notification?e.notification:!e||!e.from||"keystrokeHandler"===e.from&&CKEDITOR.env.ie,b=l&&"string"===typeof l?l:b.pastetext.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+d.aria+'"\x3e'+d.display+"\x3c/kbd\x3e");a.execCommand("paste",{type:"text",notification:l?b:!1})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(h){var e=CKEDITOR.env.safari?CKEDITOR.CTRL+CKEDITOR.ALT+CKEDITOR.SHIFT+
86:CKEDITOR.CTRL+CKEDITOR.SHIFT+86;h.addCommand("pastetext",a);h.setKeystroke(e,"pastetext");CKEDITOR.plugins.clipboard.addPasteButton(h,"PasteText",{label:h.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(h.config.forcePasteAsPlainText)h.on("beforePaste",function(a){"html"!=a.data.type&&(a.data.type="text")});h.on("pasteState",function(a){h.getCommand("pastetext").setState(a.data)})}})}(),function(){function a(a,b){var d=CKEDITOR.plugins.getPath("preview"),h=a.config,g=a.title,
m;m=h.baseHref?'\x3cbase href\x3d"'+h.baseHref+'"\x3e':"";if(h.fullPage)d=a.getData().replace(/<head>/,"$\x26"+m).replace(/[^>]*(?=<\/title>)/,"$\x26 \x26mdash; "+g);else{d=h.docType+'\x3chtml dir\x3d"'+h.contentsLangDirection+'"\x3e\x3chead\x3e'+m+"\x3ctitle\x3e"+g+"\x3c/title\x3e"+CKEDITOR.tools.buildStyleHtml(h.contentsCss)+'\x3clink rel\x3d"stylesheet" media\x3d"screen" href\x3d"'+d+'styles/screen.css"\x3e\x3c/head\x3e';h="\x3cbody\x3e";if(g=a.document&&a.document.getBody())g.getAttribute("id")&&
(h=h.replace("\x3e",' id\x3d"'+g.getAttribute("id")+'"\x3e')),g.getAttribute("class")&&(h=h.replace("\x3e",' class\x3d"'+g.getAttribute("class")+'"\x3e'));d=d+h+a.getData()+(b?"\x3cscript\x3e"+(CKEDITOR.env.ie?"window.onload":"document.onreadystatechange")+" \x3d function() { previewCallback(); } \x3c/script\x3e":"")+"\x3c/body\x3e\x3c/html\x3e"}return d}function h(){var a=window.screen;return{width:Math.round(.8*a.width),height:Math.round(.7*a.height),left:Math.round(.1*a.width)}}CKEDITOR.plugins.add("preview",
{init:function(a){a.addCommand("preview",{modes:{wysiwyg:1},canUndo:!1,readOnly:1,exec:function(){CKEDITOR.plugins.preview.createPreview(a)}});a.ui.addButton&&a.ui.addButton("Preview",{label:a.lang.preview.preview,command:"preview",toolbar:"document,40"})}});CKEDITOR.plugins.preview={createPreview:function(e,b){var d={dataValue:a(e,b)},l=h(),g;g=CKEDITOR.env.ie?"javascript:void( (function(){document.open();"+("("+CKEDITOR.tools.fixDomain+")();").replace(/\/\/.*?\n/g,"").replace(/parent\./g,"window.opener.")+
"document.write( window.opener._cke_htmlToLoad );document.close();window.opener._cke_htmlToLoad \x3d null;})() )":null;var m,c;if(!1===e.fire("contentPreview",d))return!1;g&&(window._cke_htmlToLoad=d.dataValue);m=window.open("",null,["toolbar\x3dyes,location\x3dno,status\x3dyes,menubar\x3dyes,scrollbars\x3dyes,resizable\x3dyes","width\x3d"+l.width,"height\x3d"+l.height,"left\x3d"+l.left].join());c=new CKEDITOR.dom.window(m);g&&m&&(m.location=g);window._cke_htmlToLoad||(l=m.document,l.open(),l.write(d.dataValue),
l.close());b&&(m.previewCallback=function(){"complete"===m.document.readyState&&b(c)},m.previewCallback());return c}}}(),function(){CKEDITOR.plugins.add("print",{requires:"preview",init:function(a){a.addCommand("print",CKEDITOR.plugins.print);a.ui.addButton&&a.ui.addButton("Print",{label:a.lang.print.toolbar,command:"print",toolbar:"document,50"})}});CKEDITOR.plugins.print={exec:function(a){CKEDITOR.plugins.preview.createPreview(a,function(a){a=a.$;CKEDITOR.env.gecko?a.print():a.document.execCommand("Print");
a.close()})},canUndo:!1,readOnly:1,modes:{wysiwyg:1}}}(),CKEDITOR.plugins.add("removeformat",{init:function(a){a.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);a.ui.addButton&&a.ui.addButton("RemoveFormat",{label:a.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(a){for(var h=a._.removeFormatRegex||(a._.removeFormatRegex=new RegExp("^(?:"+a.config.removeFormatTags.replace(/,/g,
"|")+")$","i")),e=a._.removeAttributes||(a._.removeAttributes=a.config.removeFormatAttributes.split(",")),b=CKEDITOR.plugins.removeformat.filter,d=a.getSelection().getRanges(),l=d.createIterator(),g=function(a){return a.type==CKEDITOR.NODE_ELEMENT},m;m=l.getNextRange();){m.enlarge(CKEDITOR.ENLARGE_INLINE);var c=m.createBookmark(),k=c.startNode,f=c.endNode,n=function(c){for(var d=a.elementPath(c),e=d.elements,f=1,g;(g=e[f])&&!g.equals(d.block)&&!g.equals(d.blockLimit);f++)h.test(g.getName())&&b(a,
g)&&c.breakParent(g)};n(k);if(f)for(n(f),k=k.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);k&&!k.equals(f);)if(k.isReadOnly()){if(k.getPosition(f)&CKEDITOR.POSITION_CONTAINS)break;k=k.getNext(g)}else n=k.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==k.getName()&&k.data("cke-realelement")||!b(a,k)||(h.test(k.getName())?k.remove(1):(k.removeAttributes(e),a.fire("removeFormatCleanup",k))),k=n;m.moveToBookmark(c)}a.forceNextSelectionCheck();a.getSelection().selectRanges(d)}}},filter:function(a,h){for(var e=
a._.removeFormatFilters||[],b=0;b<e.length;b++)if(!1===e[b](h))return!1;return!0}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(a){this._.removeFormatFilters||(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(a)},CKEDITOR.config.removeFormatTags="b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var",CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign",CKEDITOR.plugins.add("resize",{init:function(a){function h(d){var e=
c.width,g=c.height,h=e+(d.data.$.screenX-m.x)*("rtl"==l?-1:1);d=g+(d.data.$.screenY-m.y);k&&(e=Math.max(b.resize_minWidth,Math.min(h,b.resize_maxWidth)));f&&(g=Math.max(b.resize_minHeight,Math.min(d,b.resize_maxHeight)));a.resize(k?e:null,g)}function e(){CKEDITOR.document.removeListener("mousemove",h);CKEDITOR.document.removeListener("mouseup",e);a.document&&(a.document.removeListener("mousemove",h),a.document.removeListener("mouseup",e))}var b=a.config,d=a.ui.spaceId("resizer"),l=a.element?a.element.getDirection(1):
"ltr";!b.resize_dir&&(b.resize_dir="vertical");void 0===b.resize_maxWidth&&(b.resize_maxWidth=3E3);void 0===b.resize_maxHeight&&(b.resize_maxHeight=3E3);void 0===b.resize_minWidth&&(b.resize_minWidth=750);void 0===b.resize_minHeight&&(b.resize_minHeight=250);if(!1!==b.resize_enabled){var g=null,m,c,k=("both"==b.resize_dir||"horizontal"==b.resize_dir)&&b.resize_minWidth!=b.resize_maxWidth,f=("both"==b.resize_dir||"vertical"==b.resize_dir)&&b.resize_minHeight!=b.resize_maxHeight,n=CKEDITOR.tools.addFunction(function(d){g||
(g=a.getResizable());c={width:g.$.offsetWidth||0,height:g.$.offsetHeight||0};m={x:d.screenX,y:d.screenY};b.resize_minWidth>c.width&&(b.resize_minWidth=c.width);b.resize_minHeight>c.height&&(b.resize_minHeight=c.height);CKEDITOR.document.on("mousemove",h);CKEDITOR.document.on("mouseup",e);a.document&&(a.document.on("mousemove",h),a.document.on("mouseup",e));d.preventDefault&&d.preventDefault()});a.on("destroy",function(){CKEDITOR.tools.removeFunction(n)});a.on("uiSpace",function(b){if("bottom"==b.data.space){var c=
"";k&&!f&&(c=" cke_resizer_horizontal");!k&&f&&(c=" cke_resizer_vertical");var e='\x3cspan id\x3d"'+d+'" class\x3d"cke_resizer'+c+" cke_resizer_"+l+'" title\x3d"'+CKEDITOR.tools.htmlEncode(a.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event)"\x3e'+("ltr"==l?"◢":"◣")+"\x3c/span\x3e";"ltr"==l&&"ltr"==c?b.data.html+=e:b.data.html=e+b.data.html}},a,null,100);a.on("maximize",function(b){a.ui.space("resizer")[b.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){var a=
{readOnly:1,modes:{wysiwyg:1,source:1},exec:function(a){if(a.fire("save")&&(a=a.element.$.form))try{a.submit()}catch(e){a.submit.click&&a.submit.click()}}};CKEDITOR.plugins.add("save",{init:function(h){h.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(h.addCommand("save",a).startDisabled=!h.element.$.form,h.ui.addButton&&h.ui.addButton("Save",{label:h.lang.save.toolbar,command:"save",toolbar:"document,10"}))}})}(),"use strict",CKEDITOR.plugins.add("scayt",{requires:"menubutton,dialog",tabToOpen:null,
dialogName:"scaytDialog",onLoad:function(a){"moono-lisa"==(CKEDITOR.skinName||a.config.skin)&&CKEDITOR.document.appendStyleSheet(CKEDITOR.getUrl(this.path+"skins/"+CKEDITOR.skin.name+"/scayt.css"));CKEDITOR.document.appendStyleSheet(CKEDITOR.getUrl(this.path+"dialogs/dialog.css"));var h=!1;CKEDITOR.on("instanceLoaded",function(a){if(!h&&CKEDITOR.plugins.autocomplete){h=!0;var b=CKEDITOR.plugins.autocomplete.prototype.getModel;CKEDITOR.plugins.autocomplete.prototype.getModel=function(a){var e=this.editor;
a=b.bind(this)(a);a.on("change-isActive",function(a){a.data?e.fire("autocompletePanelShow"):e.fire("autocompletePanelHide")});return a}}})},init:function(a){var h=this,e=CKEDITOR.plugins.scayt;this.bindEvents(a);this.parseConfig(a);this.addRule(a);CKEDITOR.dialog.add(this.dialogName,CKEDITOR.getUrl(this.path+"dialogs/options.js"));this.addMenuItems(a);var b=a.lang.scayt,d=CKEDITOR.env;a.ui.add("Scayt",CKEDITOR.UI_MENUBUTTON,{label:b.text_title,title:a.plugins.wsc?a.lang.wsc.title:b.text_title,modes:{wysiwyg:!(d.ie&&
(8>d.version||d.quirks))},toolbar:"spellchecker,20",refresh:function(){var b=a.ui.instances.Scayt.getState();a.scayt&&(b=e.state.scayt[a.name]?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF);a.fire("scaytButtonState",b)},onRender:function(){var b=this;a.on("scaytButtonState",function(a){void 0!==typeof a.data&&b.setState(a.data)})},onMenu:function(){var b=a.scayt;a.getMenuItem("scaytToggle").label=a.lang.scayt[b&&e.state.scayt[a.name]?"btn_disable":"btn_enable"];var d={scaytToggle:CKEDITOR.TRISTATE_OFF,
scaytOptions:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytLangs:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytDict:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytAbout:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,WSC:a.plugins.wsc?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED};a.config.scayt_uiTabs[0]||delete d.scaytOptions;a.config.scayt_uiTabs[1]||delete d.scaytLangs;a.config.scayt_uiTabs[2]||delete d.scaytDict;b&&!CKEDITOR.plugins.scayt.isNewUdSupported(b)&&
(delete d.scaytDict,a.config.scayt_uiTabs[2]=0,CKEDITOR.plugins.scayt.alarmCompatibilityMessage());return d}});a.contextMenu&&a.addMenuItems&&(a.contextMenu.addListener(function(b,d){var e=a.scayt,c,k;e&&(k=e.getSelectionNode())&&(c=h.menuGenerator(a,k),e.showBanner("."+a.contextMenu._.definition.panel.className.split(" ").join(" .")));return c}),a.contextMenu._.onHide=CKEDITOR.tools.override(a.contextMenu._.onHide,function(b){return function(){var d=a.scayt;d&&d.hideBanner();return b.apply(this)}}))},
addMenuItems:function(a){var h=this,e=CKEDITOR.plugins.scayt;a.addMenuGroup("scaytButton");for(var b=a.config.scayt_contextMenuItemsOrder.split("|"),d=0;d<b.length;d++)b[d]="scayt_"+b[d];if((b=["grayt_description","grayt_suggest","grayt_control"].concat(b))&&b.length)for(d=0;d<b.length;d++)a.addMenuGroup(b[d],d-10);a.addCommand("scaytToggle",{exec:function(a){var b=a.scayt;e.state.scayt[a.name]=!e.state.scayt[a.name];!0===e.state.scayt[a.name]?b||e.createScayt(a):b&&e.destroy(a)}});a.addCommand("scaytAbout",
{exec:function(a){a.scayt.tabToOpen="about";e.openDialog(h.dialogName,a)}});a.addCommand("scaytOptions",{exec:function(a){a.scayt.tabToOpen="options";e.openDialog(h.dialogName,a)}});a.addCommand("scaytLangs",{exec:function(a){a.scayt.tabToOpen="langs";e.openDialog(h.dialogName,a)}});a.addCommand("scaytDict",{exec:function(a){a.scayt.tabToOpen="dictionaries";e.openDialog(h.dialogName,a)}});b={scaytToggle:{label:a.lang.scayt.btn_enable,group:"scaytButton",command:"scaytToggle"},scaytAbout:{label:a.lang.scayt.btn_about,
group:"scaytButton",command:"scaytAbout"},scaytOptions:{label:a.lang.scayt.btn_options,group:"scaytButton",command:"scaytOptions"},scaytLangs:{label:a.lang.scayt.btn_langs,group:"scaytButton",command:"scaytLangs"},scaytDict:{label:a.lang.scayt.btn_dictionaries,group:"scaytButton",command:"scaytDict"}};a.plugins.wsc&&(b.WSC={label:a.lang.wsc.toolbar,group:"scaytButton",onClick:function(){var b=CKEDITOR.plugins.scayt,d=a.scayt,e=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.container.getText():a.document.getBody().getText();
(e=e.replace(/\s/g,""))?(d&&b.state.scayt[a.name]&&d.setMarkupPaused&&d.setMarkupPaused(!0),a.lockSelection(),a.execCommand("checkspell")):alert("Nothing to check!")}});a.addMenuItems(b)},bindEvents:function(a){var h=CKEDITOR.plugins.scayt,e=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE,b=function(){h.destroy(a)},d=function(){!h.state.scayt[a.name]||a.readOnly||a.scayt||h.createScayt(a)},l=function(){var b=a.editable();b.attachListener(b,"focus",function(b){CKEDITOR.plugins.scayt&&!a.scayt&&setTimeout(d,
0);b=CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[a.name]&&a.scayt;var g,f;if((e||b)&&a._.savedSelection){b=a._.savedSelection.getSelectedElement();b=!b&&a._.savedSelection.getRanges();for(var h=0;h<b.length;h++)f=b[h],"string"===typeof f.startContainer.$.nodeValue&&(g=f.startContainer.getText().length,(g<f.startOffset||g<f.endOffset)&&a.unlockSelection(!1))}},this,null,-10)},g=function(){e?a.config.scayt_inlineModeImmediateMarkup?d():(a.on("blur",function(){setTimeout(b,0)}),a.on("focus",
d),a.focusManager.hasFocus&&d()):d();l();var g=a.editable();g.attachListener(g,"mousedown",function(b){b=b.data.getTarget();var d=a.widgets&&a.widgets.getByElement(b);d&&(d.wrapper=b.getAscendant(function(a){return a.hasAttribute("data-cke-widget-wrapper")},!0))},this,null,-10)};a.on("contentDom",g);a.on("beforeCommandExec",function(b){var c=a.scayt,d=!1,e=!1,g=!0;b.data.name in h.options.disablingCommandExec&&"wysiwyg"==a.mode?c&&(h.destroy(a),a.fire("scaytButtonState",CKEDITOR.TRISTATE_DISABLED)):
"bold"!==b.data.name&&"italic"!==b.data.name&&"underline"!==b.data.name&&"strike"!==b.data.name&&"subscript"!==b.data.name&&"superscript"!==b.data.name&&"enter"!==b.data.name&&"cut"!==b.data.name&&"language"!==b.data.name||!c||("cut"===b.data.name&&(g=!1,e=!0),"language"===b.data.name&&(e=d=!0),a.fire("reloadMarkupScayt",{removeOptions:{removeInside:g,forceBookmark:e,language:d},timeout:0}))});a.on("beforeSetMode",function(b){if("source"==b.data){if(b=a.scayt)h.destroy(a),a.fire("scaytButtonState",
CKEDITOR.TRISTATE_DISABLED);a.document&&a.document.getBody().removeAttribute("_jquid")}});a.on("afterCommandExec",function(b){"wysiwyg"!=a.mode||"undo"!=b.data.name&&"redo"!=b.data.name||setTimeout(function(){h.reloadMarkup(a.scayt)},250)});a.on("readOnly",function(b){var c;b&&(c=a.scayt,!0===b.editor.readOnly?c&&c.fire("removeMarkupInDocument",{}):c?h.reloadMarkup(c):"wysiwyg"==b.editor.mode&&!0===h.state.scayt[b.editor.name]&&(h.createScayt(a),b.editor.fire("scaytButtonState",CKEDITOR.TRISTATE_ON)))});
a.on("beforeDestroy",b);a.on("setData",function(){b();(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE||a.plugins.divarea)&&g()},this,null,50);a.on("reloadMarkupScayt",function(b){var c=b.data&&b.data.removeOptions,d=b.data&&b.data.timeout,e=b.data&&b.data.language,g=a.scayt;g&&setTimeout(function(){e&&(c.selectionNode=a.plugins.language.getCurrentLangElement(a),c.selectionNode=c.selectionNode&&c.selectionNode.$||null);g.removeMarkupInSelectionNode(c);h.reloadMarkup(g)},d||0)});a.on("insertElement",function(){a.fire("reloadMarkupScayt",
{removeOptions:{forceBookmark:!0}})},this,null,50);a.on("insertHtml",function(){a.scayt&&a.scayt.setFocused&&a.scayt.setFocused(!0);a.fire("reloadMarkupScayt")},this,null,50);a.on("insertText",function(){a.scayt&&a.scayt.setFocused&&a.scayt.setFocused(!0);a.fire("reloadMarkupScayt")},this,null,50);a.on("scaytDialogShown",function(b){b.data.selectPage(a.scayt.tabToOpen)});a.on("autocompletePanelShow",function(b){(b=a.scayt)&&b.setMarkupPaused&&b.setMarkupPaused(!0)});a.on("autocompletePanelHide",function(b){(b=
a.scayt)&&b.setMarkupPaused&&b.setMarkupPaused(!1)})},parseConfig:function(a){var h=CKEDITOR.plugins.scayt;h.replaceOldOptionsNames(a.config);"boolean"!==typeof a.config.scayt_autoStartup&&(a.config.scayt_autoStartup=!1);h.state.scayt[a.name]=a.config.scayt_autoStartup;"boolean"!==typeof a.config.grayt_autoStartup&&(a.config.grayt_autoStartup=!1);"boolean"!==typeof a.config.scayt_inlineModeImmediateMarkup&&(a.config.scayt_inlineModeImmediateMarkup=!1);h.state.grayt[a.name]=a.config.grayt_autoStartup;
a.config.scayt_contextCommands||(a.config.scayt_contextCommands="ignoreall|add");a.config.scayt_contextMenuItemsOrder||(a.config.scayt_contextMenuItemsOrder="suggest|moresuggest|control");a.config.scayt_sLang||(a.config.scayt_sLang="en_US");if(void 0===a.config.scayt_maxSuggestions||"number"!=typeof a.config.scayt_maxSuggestions||0>a.config.scayt_maxSuggestions)a.config.scayt_maxSuggestions=3;if(void 0===a.config.scayt_minWordLength||"number"!=typeof a.config.scayt_minWordLength||1>a.config.scayt_minWordLength)a.config.scayt_minWordLength=
3;if(void 0===a.config.scayt_customDictionaryIds||"string"!==typeof a.config.scayt_customDictionaryIds)a.config.scayt_customDictionaryIds="";if(void 0===a.config.scayt_userDictionaryName||"string"!==typeof a.config.scayt_userDictionaryName)a.config.scayt_userDictionaryName=null;if("string"===typeof a.config.scayt_uiTabs&&3===a.config.scayt_uiTabs.split(",").length){var e=[],b=[];a.config.scayt_uiTabs=a.config.scayt_uiTabs.split(",");CKEDITOR.tools.search(a.config.scayt_uiTabs,function(a){1===Number(a)||
0===Number(a)?(b.push(!0),e.push(Number(a))):b.push(!1)});null===CKEDITOR.tools.search(b,!1)?a.config.scayt_uiTabs=e:a.config.scayt_uiTabs=[1,1,1]}else a.config.scayt_uiTabs=[1,1,1];"string"!=typeof a.config.scayt_serviceProtocol&&(a.config.scayt_serviceProtocol=null);"string"!=typeof a.config.scayt_serviceHost&&(a.config.scayt_serviceHost=null);"string"!=typeof a.config.scayt_servicePort&&(a.config.scayt_servicePort=null);"string"!=typeof a.config.scayt_servicePath&&(a.config.scayt_servicePath=null);
a.config.scayt_moreSuggestions||(a.config.scayt_moreSuggestions="on");"string"!==typeof a.config.scayt_customerId&&(a.config.scayt_customerId="1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2");"string"!==typeof a.config.scayt_customPunctuation&&(a.config.scayt_customPunctuation="-");"string"!==typeof a.config.scayt_srcUrl&&(a.config.scayt_srcUrl="https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js");"boolean"!==typeof CKEDITOR.config.scayt_handleCheckDirty&&
(CKEDITOR.config.scayt_handleCheckDirty=!0);"boolean"!==typeof CKEDITOR.config.scayt_handleUndoRedo&&(CKEDITOR.config.scayt_handleUndoRedo=!0);CKEDITOR.config.scayt_handleUndoRedo=CKEDITOR.plugins.undo?CKEDITOR.config.scayt_handleUndoRedo:!1;a.config.scayt_ignoreAllCapsWords&&"boolean"!==typeof a.config.scayt_ignoreAllCapsWords&&(a.config.scayt_ignoreAllCapsWords=!1);a.config.scayt_ignoreDomainNames&&"boolean"!==typeof a.config.scayt_ignoreDomainNames&&(a.config.scayt_ignoreDomainNames=!1);a.config.scayt_ignoreWordsWithMixedCases&&
"boolean"!==typeof a.config.scayt_ignoreWordsWithMixedCases&&(a.config.scayt_ignoreWordsWithMixedCases=!1);a.config.scayt_ignoreWordsWithNumbers&&"boolean"!==typeof a.config.scayt_ignoreWordsWithNumbers&&(a.config.scayt_ignoreWordsWithNumbers=!1);if(a.config.scayt_disableOptionsStorage){var h=CKEDITOR.tools.isArray(a.config.scayt_disableOptionsStorage)?a.config.scayt_disableOptionsStorage:"string"===typeof a.config.scayt_disableOptionsStorage?[a.config.scayt_disableOptionsStorage]:void 0,d="all options lang ignore-all-caps-words ignore-domain-names ignore-words-with-mixed-cases ignore-words-with-numbers".split(" "),
l=["lang","ignore-all-caps-words","ignore-domain-names","ignore-words-with-mixed-cases","ignore-words-with-numbers"],g=CKEDITOR.tools.search,m=CKEDITOR.tools.indexOf;a.config.scayt_disableOptionsStorage=function(a){for(var b=[],e=0;e<a.length;e++){var h=a[e],r=!!g(a,"options");if(!g(d,h)||r&&g(l,function(a){if("lang"===a)return!1}))return;g(l,h)&&l.splice(m(l,h),1);if("all"===h||r&&g(a,"lang"))return[];"options"===h&&(l=["lang"])}return b=b.concat(l)}(h)}},addRule:function(a){var h=CKEDITOR.plugins.scayt,
e=a.dataProcessor,b=e&&e.htmlFilter,d=a._.elementsPath&&a._.elementsPath.filters,e=e&&e.dataFilter,l=a.addRemoveFormatFilter,g=function(b){if(a.scayt&&(b.hasAttribute(h.options.data_attribute_name)||b.hasAttribute(h.options.problem_grammar_data_attribute)))return!1},m=function(b){var d=!0;a.scayt&&(b.hasAttribute(h.options.data_attribute_name)||b.hasAttribute(h.options.problem_grammar_data_attribute))&&(d=!1);return d};d&&d.push(g);e&&e.addRules({elements:{span:function(a){var b=a.hasClass(h.options.misspelled_word_class)&&
a.attributes[h.options.data_attribute_name],d=a.hasClass(h.options.problem_grammar_class)&&a.attributes[h.options.problem_grammar_data_attribute];h&&(b||d)&&delete a.name;return a}}});b&&b.addRules({elements:{span:function(a){var b=a.hasClass(h.options.misspelled_word_class)&&a.attributes[h.options.data_attribute_name],d=a.hasClass(h.options.problem_grammar_class)&&a.attributes[h.options.problem_grammar_data_attribute];h&&(b||d)&&delete a.name;return a}}});l&&l.call(a,m)},scaytMenuDefinition:function(a){var h=
this,e=CKEDITOR.plugins.scayt;a=a.scayt;return{scayt:{scayt_ignore:{label:a.getLocal("btn_ignore"),group:"scayt_control",order:1,exec:function(a){a.scayt.ignoreWord()}},scayt_ignoreall:{label:a.getLocal("btn_ignoreAll"),group:"scayt_control",order:2,exec:function(a){a.scayt.ignoreAllWords()}},scayt_add:{label:a.getLocal("btn_addWord"),group:"scayt_control",order:3,exec:function(a){var d=a.scayt;setTimeout(function(){d.addWordToUserDictionary()},10)}},scayt_option:{label:a.getLocal("btn_options"),
group:"scayt_control",order:4,exec:function(a){a.scayt.tabToOpen="options";e.openDialog(h.dialogName,a)},verification:function(a){return 1==a.config.scayt_uiTabs[0]?!0:!1}},scayt_language:{label:a.getLocal("btn_langs"),group:"scayt_control",order:5,exec:function(a){a.scayt.tabToOpen="langs";e.openDialog(h.dialogName,a)},verification:function(a){return 1==a.config.scayt_uiTabs[1]?!0:!1}},scayt_dictionary:{label:a.getLocal("btn_dictionaries"),group:"scayt_control",order:6,exec:function(a){a.scayt.tabToOpen=
"dictionaries";e.openDialog(h.dialogName,a)},verification:function(a){return 1==a.config.scayt_uiTabs[2]?!0:!1}},scayt_about:{label:a.getLocal("btn_about"),group:"scayt_control",order:7,exec:function(a){a.scayt.tabToOpen="about";e.openDialog(h.dialogName,a)}}},grayt:{grayt_problemdescription:{label:"Grammar problem description",group:"grayt_description",order:1,state:CKEDITOR.TRISTATE_DISABLED,exec:function(a){}},grayt_ignore:{label:a.getLocal("btn_ignore"),group:"grayt_control",order:2,exec:function(a){a.scayt.ignorePhrase()}},
grayt_ignoreall:{label:a.getLocal("btn_ignoreAll"),group:"grayt_control",order:3,exec:function(a){a.scayt.ignoreAllPhrases()}}}}},buildSuggestionMenuItems:function(a,h,e){var b={},d={},l=e?"word":"phrase",g=e?"startGrammarCheck":"startSpellCheck",m=a.scayt;if(0<h.length&&"no_any_suggestions"!==h[0])if(e)for(e=0;e<h.length;e++){var c="scayt_suggest_"+CKEDITOR.plugins.scayt.suggestions[e].replace(" ","_");a.addCommand(c,this.createCommand(CKEDITOR.plugins.scayt.suggestions[e],l,g));e<a.config.scayt_maxSuggestions?
(a.addMenuItem(c,{label:h[e],command:c,group:"scayt_suggest",order:e+1}),b[c]=CKEDITOR.TRISTATE_OFF):(a.addMenuItem(c,{label:h[e],command:c,group:"scayt_moresuggest",order:e+1}),d[c]=CKEDITOR.TRISTATE_OFF,"on"===a.config.scayt_moreSuggestions&&(a.addMenuItem("scayt_moresuggest",{label:m.getLocal("btn_moreSuggestions"),group:"scayt_moresuggest",order:10,getItems:function(){return d}}),b.scayt_moresuggest=CKEDITOR.TRISTATE_OFF))}else for(e=0;e<h.length;e++)c="grayt_suggest_"+CKEDITOR.plugins.scayt.suggestions[e].replace(" ",
"_"),a.addCommand(c,this.createCommand(CKEDITOR.plugins.scayt.suggestions[e],l,g)),a.addMenuItem(c,{label:h[e],command:c,group:"grayt_suggest",order:e+1}),b[c]=CKEDITOR.TRISTATE_OFF;else b.no_scayt_suggest=CKEDITOR.TRISTATE_DISABLED,a.addCommand("no_scayt_suggest",{exec:function(){}}),a.addMenuItem("no_scayt_suggest",{label:m.getLocal("btn_noSuggestions")||"no_scayt_suggest",command:"no_scayt_suggest",group:"scayt_suggest",order:0});return b},menuGenerator:function(a,h){var e=a.scayt,b=this.scaytMenuDefinition(a),
d={},l=a.config.scayt_contextCommands.split("|"),g=h.getAttribute(e.getLangAttribute())||e.getLang(),m,c,k,f;c=e.isScaytNode(h);k=e.isGraytNode(h);c?(b=b.scayt,m=h.getAttribute(e.getScaytNodeAttributeName()),e.fire("getSuggestionsList",{lang:g,word:m}),d=this.buildSuggestionMenuItems(a,CKEDITOR.plugins.scayt.suggestions,c)):k&&(b=b.grayt,d=h.getAttribute(e.getGraytNodeAttributeName()),e.getGraytNodeRuleAttributeName?(m=h.getAttribute(e.getGraytNodeRuleAttributeName()),e.getProblemDescriptionText(d,
m,g)):e.getProblemDescriptionText(d,g),f=e.getProblemDescriptionText(d,m,g),b.grayt_problemdescription&&f&&(f=f.replace(/([.!?])\s/g,"$1\x3cbr\x3e"),b.grayt_problemdescription.label=f),e.fire("getGrammarSuggestionsList",{lang:g,phrase:d,rule:m}),d=this.buildSuggestionMenuItems(a,CKEDITOR.plugins.scayt.suggestions,c));if(c&&"off"==a.config.scayt_contextCommands)return d;for(var n in b)c&&-1==CKEDITOR.tools.indexOf(l,n.replace("scayt_",""))&&"all"!=a.config.scayt_contextCommands||k&&"grayt_problemdescription"!==
n&&-1==CKEDITOR.tools.indexOf(l,n.replace("grayt_",""))&&"all"!=a.config.scayt_contextCommands||(d[n]="undefined"!=typeof b[n].state?b[n].state:CKEDITOR.TRISTATE_OFF,"function"!==typeof b[n].verification||b[n].verification(a)||delete d[n],a.addCommand(n,{exec:b[n].exec}),a.addMenuItem(n,{label:a.lang.scayt[b[n].label]||b[n].label,command:n,group:b[n].group,order:b[n].order}));return d},createCommand:function(a,h,e){return{exec:function(b){b=b.scayt;var d={};d[h]=a;b.replaceSelectionNode(d);"startGrammarCheck"===
e&&b.removeMarkupInSelectionNode({grammarOnly:!0});b.fire(e)}}}}),CKEDITOR.plugins.scayt={charsToObserve:[{charName:"cke-fillingChar",charCode:function(){var a=CKEDITOR.version,h=[4,5,6],e=String.fromCharCode(8203),b=Array(8).join(e),d,l;if(!a)return e;for(var a=a.split("."),g=0;g<h.length;g++){d=h[g];l=Number(a[g]);if(l>d)return b;if(l<d)break}return e}()}],state:{scayt:{},grayt:{}},warningCounter:0,suggestions:[],options:{disablingCommandExec:{source:!0,newpage:!0,templates:!0},data_attribute_name:"data-scayt-word",
misspelled_word_class:"scayt-misspell-word",problem_grammar_data_attribute:"data-grayt-phrase",problem_grammar_class:"gramm-problem"},backCompatibilityMap:{scayt_service_protocol:"scayt_serviceProtocol",scayt_service_host:"scayt_serviceHost",scayt_service_port:"scayt_servicePort",scayt_service_path:"scayt_servicePath",scayt_customerid:"scayt_customerId"},openDialog:function(a,h){var e=h.scayt;e.isAllModulesReady&&!1===e.isAllModulesReady()||(h.lockSelection(),h.openDialog(a))},alarmCompatibilityMessage:function(){5>
this.warningCounter&&(console.warn("You are using the latest version of SCAYT plugin for CKEditor with the old application version. In order to have access to the newest features, it is recommended to upgrade the application version to latest one as well. Contact us for more details at support@webspellchecker.net."),this.warningCounter+=1)},isNewUdSupported:function(a){return a.getUserDictionary?!0:!1},reloadMarkup:function(a){var h;a&&(h=a.getScaytLangList(),a.reloadMarkup?a.reloadMarkup():(this.alarmCompatibilityMessage(),
h&&h.ltr&&h.rtl&&a.fire("startSpellCheck, startGrammarCheck")))},replaceOldOptionsNames:function(a){for(var h in a)h in this.backCompatibilityMap&&(a[this.backCompatibilityMap[h]]=a[h],delete a[h])},createScayt:function(a){var h=this,e=CKEDITOR.plugins.scayt;this.loadScaytLibrary(a,function(a){function d(a){return new SCAYT.CKSCAYT(a,function(){},function(){})}var l;a.window&&(l="BODY"==a.editable().$.nodeName?a.window.getFrame():a.editable());if(l){l={lang:a.config.scayt_sLang,container:l.$,customDictionary:a.config.scayt_customDictionaryIds,
userDictionaryName:a.config.scayt_userDictionaryName,localization:a.langCode,customer_id:a.config.scayt_customerId,customPunctuation:a.config.scayt_customPunctuation,debug:a.config.scayt_debug,data_attribute_name:h.options.data_attribute_name,misspelled_word_class:h.options.misspelled_word_class,problem_grammar_data_attribute:h.options.problem_grammar_data_attribute,problem_grammar_class:h.options.problem_grammar_class,"options-to-restore":a.config.scayt_disableOptionsStorage,focused:a.editable().hasFocus,
ignoreElementsRegex:a.config.scayt_elementsToIgnore,ignoreGraytElementsRegex:a.config.grayt_elementsToIgnore,minWordLength:a.config.scayt_minWordLength,graytAutoStartup:a.config.grayt_autoStartup,charsToObserve:e.charsToObserve};a.config.scayt_serviceProtocol&&(l.service_protocol=a.config.scayt_serviceProtocol);a.config.scayt_serviceHost&&(l.service_host=a.config.scayt_serviceHost);a.config.scayt_servicePort&&(l.service_port=a.config.scayt_servicePort);a.config.scayt_servicePath&&(l.service_path=
a.config.scayt_servicePath);"boolean"===typeof a.config.scayt_ignoreAllCapsWords&&(l["ignore-all-caps-words"]=a.config.scayt_ignoreAllCapsWords);"boolean"===typeof a.config.scayt_ignoreDomainNames&&(l["ignore-domain-names"]=a.config.scayt_ignoreDomainNames);"boolean"===typeof a.config.scayt_ignoreWordsWithMixedCases&&(l["ignore-words-with-mixed-cases"]=a.config.scayt_ignoreWordsWithMixedCases);"boolean"===typeof a.config.scayt_ignoreWordsWithNumbers&&(l["ignore-words-with-numbers"]=a.config.scayt_ignoreWordsWithNumbers);
var g;try{g=d(l)}catch(m){h.alarmCompatibilityMessage(),delete l.charsToObserve,g=d(l)}g.subscribe("suggestionListSend",function(a){for(var b={},d=[],e=0;e<a.suggestionList.length;e++)b["word_"+a.suggestionList[e]]||(b["word_"+a.suggestionList[e]]=a.suggestionList[e],d.push(a.suggestionList[e]));CKEDITOR.plugins.scayt.suggestions=d});g.subscribe("selectionIsChanged",function(c){a.getSelection().isLocked&&"restoreSelection"!==c.action&&a.lockSelection();"restoreSelection"===c.action&&a.selectionChange(!0)});
g.subscribe("graytStateChanged",function(c){e.state.grayt[a.name]=c.state});g.addMarkupHandler&&g.addMarkupHandler(function(c){var d=a.editable(),e=d.getCustomData(c.charName);e&&(e.$=c.node,d.setCustomData(c.charName,e))});a.scayt=g;a.fire("scaytButtonState",a.readOnly?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_ON)}else e.state.scayt[a.name]=!1})},destroy:function(a){a.scayt&&a.scayt.destroy();delete a.scayt;a.fire("scaytButtonState",CKEDITOR.TRISTATE_OFF)},loadScaytLibrary:function(a,h){var e,
b=function(){CKEDITOR.fireOnce("scaytReady");a.scayt||"function"===typeof h&&h(a)};"undefined"===typeof window.SCAYT||"function"!==typeof window.SCAYT.CKSCAYT?(e=a.config.scayt_srcUrl,CKEDITOR.scriptLoader.load(e,function(a){a&&b()})):window.SCAYT&&"function"===typeof window.SCAYT.CKSCAYT&&b()}},CKEDITOR.on("dialogDefinition",function(a){var h=a.data.name;a=a.data.definition.dialog;"scaytDialog"!==h&&"checkspell"!==h&&(a.on("show",function(a){a=a.sender&&a.sender.getParentEditor();var b=CKEDITOR.plugins.scayt,
d=a.scayt;d&&b.state.scayt[a.name]&&d.setMarkupPaused&&d.setMarkupPaused(!0)}),a.on("hide",function(a){a=a.sender&&a.sender.getParentEditor();var b=CKEDITOR.plugins.scayt,d=a.scayt;d&&b.state.scayt[a.name]&&d.setMarkupPaused&&d.setMarkupPaused(!1)}));if("scaytDialog"===h)a.on("cancel",function(a){return!1},this,null,-1);if("checkspell"===h)a.on("cancel",function(a){a=a.sender&&a.sender.getParentEditor();var b=CKEDITOR.plugins.scayt,d=a.scayt;d&&b.state.scayt[a.name]&&d.setMarkupPaused&&d.setMarkupPaused(!1);
a.unlockSelection()},this,null,-2);if("link"===h)a.on("ok",function(a){var b=a.sender&&a.sender.getParentEditor();b&&setTimeout(function(){b.fire("reloadMarkupScayt",{removeOptions:{removeInside:!0,forceBookmark:!0},timeout:0})},0)});if("replace"===h)a.on("hide",function(a){a=a.sender&&a.sender.getParentEditor();var b=CKEDITOR.plugins.scayt,d=a.scayt;a&&setTimeout(function(){d&&(d.fire("removeMarkupInDocument",{}),b.reloadMarkup(d))},0)})}),CKEDITOR.on("scaytReady",function(){if(!0===CKEDITOR.config.scayt_handleCheckDirty){var a=
CKEDITOR.editor.prototype;a.checkDirty=CKEDITOR.tools.override(a.checkDirty,function(a){return function(){var b=null,d=this.scayt;if(CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[this.name]&&this.scayt){if(b="ready"==this.status)var h=d.removeMarkupFromString(this.getSnapshot()),d=d.removeMarkupFromString(this._.previousValue),b=b&&d!==h}else b=a.call(this);return b}});a.resetDirty=CKEDITOR.tools.override(a.resetDirty,function(a){return function(){var b=this.scayt;CKEDITOR.plugins.scayt&&
CKEDITOR.plugins.scayt.state.scayt[this.name]&&this.scayt?this._.previousValue=b.removeMarkupFromString(this.getSnapshot()):a.call(this)}})}if(!0===CKEDITOR.config.scayt_handleUndoRedo){var a=CKEDITOR.plugins.undo.Image.prototype,h="function"==typeof a.equalsContent?"equalsContent":"equals";a[h]=CKEDITOR.tools.override(a[h],function(a){return function(b){var d=b.editor.scayt,h=this.contents,g=b.contents,m=null;CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[b.editor.name]&&b.editor.scayt&&
(this.contents=d.removeMarkupFromString(h)||"",b.contents=d.removeMarkupFromString(g)||"");m=a.apply(this,arguments);this.contents=h;b.contents=g;return m}})}}),function(){CKEDITOR.plugins.add("selectall",{init:function(a){a.addCommand("selectAll",{modes:{wysiwyg:1,source:1},exec:function(a){var e=a.editable();if(e.is("textarea"))a=e.$,CKEDITOR.env.ie&&a.createTextRange?a.createTextRange().execCommand("SelectAll"):(a.selectionStart=0,a.selectionEnd=a.value.length),a.focus();else{if(e.is("body"))a.document.$.execCommand("SelectAll",
!1,null);else{var b=a.createRange();b.selectNodeContents(e);b.select()}a.forceNextSelectionCheck();a.selectionChange()}},canUndo:!1});a.ui.addButton&&a.ui.addButton("SelectAll",{label:a.lang.selectall.toolbar,command:"selectAll",toolbar:"selection,10"})}})}(),function(){var a={readOnly:1,preserveState:!0,editorFocus:!1,exec:function(a){this.toggleState();this.refresh(a)},refresh:function(a){if(a.document){var e=this.state!=CKEDITOR.TRISTATE_ON||a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&!a.focusManager.hasFocus?
"removeClass":"attachClass";a.editable()[e]("cke_show_blocks")}}};CKEDITOR.plugins.add("showblocks",{onLoad:function(){var a="p div pre address blockquote h1 h2 h3 h4 h5 h6".split(" "),e,b,d,l,g=CKEDITOR.getUrl(this.path),m=!(CKEDITOR.env.ie&&9>CKEDITOR.env.version),c=m?":not([contenteditable\x3dfalse]):not(.cke_show_blocks_off)":"",k,f;for(e=b=d=l="";k=a.pop();)f=a.length?",":"",e+=".cke_show_blocks "+k+c+f,d+=".cke_show_blocks.cke_contents_ltr "+k+c+f,l+=".cke_show_blocks.cke_contents_rtl "+k+c+
f,b+=".cke_show_blocks "+k+c+"{background-image:url("+CKEDITOR.getUrl(g+"images/block_"+k+".png")+")}";CKEDITOR.addCss((e+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(b,d+"{background-position:top left;padding-left:8px}",l+"{background-position:top right;padding-right:8px}"));m||CKEDITOR.addCss(".cke_show_blocks [contenteditable\x3dfalse],.cke_show_blocks .cke_show_blocks_off{border:none;padding-top:0;background-image:none}.cke_show_blocks.cke_contents_rtl [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_rtl .cke_show_blocks_off{padding-right:0}.cke_show_blocks.cke_contents_ltr [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_ltr .cke_show_blocks_off{padding-left:0}")},
init:function(h){function e(){b.refresh(h)}if(!h.blockless){var b=h.addCommand("showblocks",a);b.canUndo=!1;h.config.startupOutlineBlocks&&b.setState(CKEDITOR.TRISTATE_ON);h.ui.addButton&&h.ui.addButton("ShowBlocks",{label:h.lang.showblocks.toolbar,command:"showblocks",toolbar:"tools,20"});h.on("mode",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(h)});h.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(h.on("focus",e),h.on("blur",e));h.on("contentDom",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&
b.refresh(h)})}}})}(),function(){var a={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(a){this.toggleState();this.refresh(a)},refresh:function(a){if(a.document){var e=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";a.editable()[e]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var a;a=(CKEDITOR.env.ie6Compat?[".%1 table.%2,",".%1 table.%2 td, .%1 table.%2 th","{","border : #d3d3d3 1px dotted","}"]:".%1 table.%2,;.%1 table.%2 \x3e tr \x3e td, .%1 table.%2 \x3e tr \x3e th,;.%1 table.%2 \x3e tbody \x3e tr \x3e td, .%1 table.%2 \x3e tbody \x3e tr \x3e th,;.%1 table.%2 \x3e thead \x3e tr \x3e td, .%1 table.%2 \x3e thead \x3e tr \x3e th,;.%1 table.%2 \x3e tfoot \x3e tr \x3e td, .%1 table.%2 \x3e tfoot \x3e tr \x3e th;{;border : #d3d3d3 1px dotted;}".split(";")).join("").replace(/%2/g,
"cke_show_border").replace(/%1/g,"cke_show_borders ");CKEDITOR.addCss(a)},init:function(h){var e=h.addCommand("showborders",a);e.canUndo=!1;!1!==h.config.startupShowBorders&&e.setState(CKEDITOR.TRISTATE_ON);h.on("mode",function(){e.state!=CKEDITOR.TRISTATE_DISABLED&&e.refresh(h)},null,null,100);h.on("contentDom",function(){e.state!=CKEDITOR.TRISTATE_DISABLED&&e.refresh(h)});h.on("removeFormatCleanup",function(a){a=a.data;h.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&a.is("table")&&(!a.hasAttribute("border")||
0>=parseInt(a.getAttribute("border"),10))&&a.addClass("cke_show_border")})},afterInit:function(a){var e=a.dataProcessor;a=e&&e.dataFilter;e=e&&e.htmlFilter;a&&a.addRules({elements:{table:function(a){a=a.attributes;var d=a["class"],e=parseInt(a.border,10);e&&!(0>=e)||d&&-1!=d.indexOf("cke_show_border")||(a["class"]=(d||"")+" cke_show_border")}}});e&&e.addRules({elements:{table:function(a){a=a.attributes;var d=a["class"];d&&(a["class"]=d.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,
""))}}})}});CKEDITOR.on("dialogDefinition",function(a){var e=a.data.name;if("table"==e||"tableProperties"==e)if(a=a.data.definition,e=a.getContents("info").get("txtBorder"),e.commit=CKEDITOR.tools.override(e.commit,function(a){return function(d,e){a.apply(this,arguments);var g=parseInt(this.getValue(),10);e[!g||0>=g?"addClass":"removeClass"]("cke_show_border")}}),a=(a=a.getContents("advanced"))&&a.get("advCSSClasses"))a.setup=CKEDITOR.tools.override(a.setup,function(a){return function(){a.apply(this,
arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}}),a.commit=CKEDITOR.tools.override(a.commit,function(a){return function(d,e){a.apply(this,arguments);parseInt(e.getAttribute("border"),10)||e.addClass("cke_show_border")}})})}(),CKEDITOR.plugins.add("smiley",{requires:"dialog",init:function(a){a.config.smiley_path=a.config.smiley_path||this.path+"images/";a.addCommand("smiley",new CKEDITOR.dialogCommand("smiley",{allowedContent:"img[alt,height,!src,title,width]",requiredContent:"img"}));
a.ui.addButton&&a.ui.addButton("Smiley",{label:a.lang.smiley.toolbar,command:"smiley",toolbar:"insert,50"});CKEDITOR.dialog.add("smiley",this.path+"dialogs/smiley.js")}}),CKEDITOR.config.smiley_images="regular_smile.png sad_smile.png wink_smile.png teeth_smile.png confused_smile.png tongue_smile.png embarrassed_smile.png omg_smile.png whatchutalkingabout_smile.png angry_smile.png angel_smile.png shades_smile.png devil_smile.png cry_smile.png lightbulb.png thumbs_down.png thumbs_up.png heart.png broken_heart.png kiss.png envelope.png".split(" "),
CKEDITOR.config.smiley_descriptions="smiley;sad;wink;laugh;frown;cheeky;blush;surprise;indecision;angry;angel;cool;devil;crying;enlightened;no;yes;heart;broken heart;kiss;mail".split(";"),function(){CKEDITOR.plugins.add("sourcearea",{init:function(h){function e(){var a=d&&this.equals(CKEDITOR.document.getActive());this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+"px");this.show();a&&this.focus()}if(h.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var b=
CKEDITOR.plugins.sourcearea;h.addMode("source",function(b){var d=h.ui.space("contents").getDocument().createElement("textarea");d.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",h.config.sourceAreaTabSize||4)));d.setAttribute("dir","ltr");d.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu");h.ui.space("contents").append(d);d=h.editable(new a(h,
d));d.setData(h.getData(1));CKEDITOR.env.ie&&(d.attachListener(h,"resize",e,d),d.attachListener(CKEDITOR.document.getWindow(),"resize",e,d),CKEDITOR.tools.setTimeout(e,0,d));h.fire("ariaWidget",this);b()});h.addCommand("source",b.commands.source);h.ui.addButton&&h.ui.addButton("Source",{isToggle:!0,label:h.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});h.on("mode",function(){h.getCommand("source").setState("source"==h.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var d=CKEDITOR.env.ie&&
9==CKEDITOR.env.version}}});var a=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(a){this.setValue(a);this.status="ready";this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(a){this[(a?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){a.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})}(),CKEDITOR.plugins.sourcearea=
{commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(a){"wysiwyg"==a.mode&&a.fire("saveSnapshot");a.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);a.setMode("source"==a.mode?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("specialchar",{availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-au":1,"en-ca":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,
lt:1,lv:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},requires:"dialog",init:function(a){var h=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");a.addCommand("specialchar",{exec:function(){var e=a.langCode,e=h.availableLangs[e]?e:h.availableLangs[e.replace(/-.*/,"")]?e.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(h.path+"dialogs/lang/"+e+".js"),function(){CKEDITOR.tools.extend(a.lang.specialchar,
h.langEntries[e]);a.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1});a.ui.addButton&&a.ui.addButton("SpecialChar",{label:a.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}}),CKEDITOR.config.specialChars="! \x26quot; # $ % \x26amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; \x26lt; \x3d \x26gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x26euro; \x26lsquo; \x26rsquo; \x26ldquo; \x26rdquo; \x26ndash; \x26mdash; \x26iexcl; \x26cent; \x26pound; \x26curren; \x26yen; \x26brvbar; \x26sect; \x26uml; \x26copy; \x26ordf; \x26laquo; \x26not; \x26reg; \x26macr; \x26deg; \x26sup2; \x26sup3; \x26acute; \x26micro; \x26para; \x26middot; \x26cedil; \x26sup1; \x26ordm; \x26raquo; \x26frac14; \x26frac12; \x26frac34; \x26iquest; \x26Agrave; \x26Aacute; \x26Acirc; \x26Atilde; \x26Auml; \x26Aring; \x26AElig; \x26Ccedil; \x26Egrave; \x26Eacute; \x26Ecirc; \x26Euml; \x26Igrave; \x26Iacute; \x26Icirc; \x26Iuml; \x26ETH; \x26Ntilde; \x26Ograve; \x26Oacute; \x26Ocirc; \x26Otilde; \x26Ouml; \x26times; \x26Oslash; \x26Ugrave; \x26Uacute; \x26Ucirc; \x26Uuml; \x26Yacute; \x26THORN; \x26szlig; \x26agrave; \x26aacute; \x26acirc; \x26atilde; \x26auml; \x26aring; \x26aelig; \x26ccedil; \x26egrave; \x26eacute; \x26ecirc; \x26euml; \x26igrave; \x26iacute; \x26icirc; \x26iuml; \x26eth; \x26ntilde; \x26ograve; \x26oacute; \x26ocirc; \x26otilde; \x26ouml; \x26divide; \x26oslash; \x26ugrave; \x26uacute; \x26ucirc; \x26uuml; \x26yacute; \x26thorn; \x26yuml; \x26OElig; \x26oelig; \x26#372; \x26#374 \x26#373 \x26#375; \x26sbquo; \x26#8219; \x26bdquo; \x26hellip; \x26trade; \x26#9658; \x26bull; \x26rarr; \x26rArr; \x26hArr; \x26diams; \x26asymp;".split(" "),
function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(a){var h=a.config,e=a.lang.stylescombo,b={},d=[],l=[];a.on("stylesSet",function(e){if(e=e.data.styles){for(var m,c,k,f,n=0,r=e.length;n<r;n++)(m=e[n],a.blockless&&m.element in CKEDITOR.dtd.$block||"string"==typeof m.type&&!CKEDITOR.style.customHandlers[m.type]||(c=m.name,f=m.language||a.langCode,m=new CKEDITOR.style(m),a.filter.customConfig&&!a.filter.check(m)))||(m._name=c,m._.enterMode=h.enterMode,m._.type=k=m.assignedTo||
m.type,m._.weight=n+1E3*(k==CKEDITOR.STYLE_OBJECT?1:k==CKEDITOR.STYLE_BLOCK?2:3),m._.language=f,b[c]=m,d.push(m),l.push(m));d.sort(function(a,b){return a._.weight-b._.weight})}});a.on("stylesRemove",function(d){d=d.data&&d.data.type;var e=void 0===d,c;for(c in b){var h=b[c];(e||h.type===d)&&a.removeStyle(h)}});a.ui.addRichCombo("Styles",{label:e.label,title:e.panelTitle,toolbar:"styles,10",allowedContent:l,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(h.contentsCss),multiSelect:!0,attributes:{"aria-label":e.panelTitle}},
init:function(){var a,b,c,h,f,l,r;l=0;for(r=d.length;l<r;l++)a=d[l],b=a._name,h=a._.type,f=a._.definition.language,h!=c&&(this.startGroup(e["panelTitle"+String(h)]),c=h),this.add(b,a.type==CKEDITOR.STYLE_OBJECT?b:a.buildPreview(),b,f);this.commit()},onClick:function(d){a.focus();a.fire("saveSnapshot");d=b[d];var e=a.elementPath();if(d.group&&d.removeStylesFromSameGroup(a))a.applyStyle(d);else a[d.checkActive(e,a)?"removeStyle":"applyStyle"](d);a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",
function(d){var e=this.getValue();d=d.data.path.elements;for(var c=0,h=d.length,f;c<h;c++){f=d[c];for(var l in b)if(b[l].checkElementRemovable(f,!0,a)){l!=e&&this.setValue(l);return}}this.setValue("")},this)},onOpen:function(){var d=a.getSelection(),d=d.getSelectedElement()||d.getStartElement()||a.editable(),d=a.elementPath(d),h=[0,0,0,0];this.showAll();this.unmarkAll();for(var c in b){var k=b[c],f=k._.type;k.checkApplicable(d,a,a.activeFilter)?h[f]++:this.hideItem(c);k.checkActive(d,a)&&this.mark(c)}h[CKEDITOR.STYLE_BLOCK]||
this.hideGroup(e["panelTitle"+String(CKEDITOR.STYLE_BLOCK)]);h[CKEDITOR.STYLE_INLINE]||this.hideGroup(e["panelTitle"+String(CKEDITOR.STYLE_INLINE)]);h[CKEDITOR.STYLE_OBJECT]||this.hideGroup(e["panelTitle"+String(CKEDITOR.STYLE_OBJECT)])},refresh:function(){var d=a.elementPath();if(d){for(var e in b)if(b[e].checkApplicable(d,a,a.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){b={};d=[]}})}})}(),function(){function a(a){return{editorFocus:!1,canUndo:!0,modes:{wysiwyg:1},
exec:function(b){if(b.editable().hasFocus){var e=b.getSelection(),h;if(h=(new CKEDITOR.dom.elementPath(e.getStartElement(),e.root)).contains({td:1,th:1},1)){var e=b.createRange(),c=CKEDITOR.tools.tryThese(function(){var b=h.getParent().$.cells[h.$.cellIndex+(a?-1:1)];b.parentNode.parentNode;return b},function(){var b=h.getParent(),b=b.getAscendant("table").$.rows[b.$.rowIndex+(a?-1:1)];return b.cells[a?b.cells.length-1:0]});if(c||a)if(c)c=new CKEDITOR.dom.element(c),e.moveToElementEditStart(c),e.checkStartOfBlock()&&
e.checkEndOfBlock()||e.selectNodeContents(c);else return!0;else{for(var k=h.getAscendant("table").$,c=h.getParent().$.cells,k=new CKEDITOR.dom.element(k.insertRow(-1),b.document),f=0,n=c.length;f<n;f++)k.append((new CKEDITOR.dom.element(c[f],b.document)).clone(!1,!1)).appendBogus();e.moveToElementEditStart(k)}e.select(!0);return!0}}return!1}}}var h={editorFocus:!1,modes:{wysiwyg:1,source:1}},e={exec:function(a){a.container.focusNext(!0,a.tabIndex)}},b={exec:function(a){a.container.focusPrevious(!0,
a.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(d){for(var l=!1!==d.config.enableTabKeyTools,g=d.config.tabSpaces||0,m="";g--;)m+=" ";if(m)d.on("key",function(a){9==a.data.keyCode&&(d.insertText(m),a.cancel())});if(l)d.on("key",function(a){(9==a.data.keyCode&&d.execCommand("selectNextCell")||a.data.keyCode==CKEDITOR.SHIFT+9&&d.execCommand("selectPreviousCell"))&&a.cancel()});d.addCommand("blur",CKEDITOR.tools.extend(e,h));d.addCommand("blurBack",CKEDITOR.tools.extend(b,h));d.addCommand("selectNextCell",
a());d.addCommand("selectPreviousCell",a(!0))}})}(),CKEDITOR.dom.element.prototype.focusNext=function(a,h){var e=void 0===h?this.getTabIndex():h,b,d,l,g,m,c;if(0>=e)for(m=this.getNextSourceNode(a,CKEDITOR.NODE_ELEMENT);m;){if(m.isVisible()&&0===m.getTabIndex()){l=m;break}m=m.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(m=this.getDocument().getBody().getFirst();m=m.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!b)if(!d&&m.equals(this)){if(d=!0,a){if(!(m=m.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;
b=1}}else d&&!this.contains(m)&&(b=1);if(m.isVisible()&&!(0>(c=m.getTabIndex()))){if(b&&c==e){l=m;break}c>e&&(!l||!g||c<g)?(l=m,g=c):l||0!==c||(l=m,g=c)}}l&&l.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(a,h){for(var e=void 0===h?this.getTabIndex():h,b,d,l,g=0,m,c=this.getDocument().getBody().getLast();c=c.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!b)if(!d&&c.equals(this)){if(d=!0,a){if(!(c=c.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;b=1}}else d&&!this.contains(c)&&
(b=1);if(c.isVisible()&&!(0>(m=c.getTabIndex())))if(0>=e){if(b&&0===m){l=c;break}m>g&&(l=c,g=m)}else{if(b&&m==e){l=c;break}m<e&&(!l||m>g)&&(l=c,g=m)}}l&&l.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(a){function h(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!a.blockless){var e=a.lang.table;a.addCommand("table",new CKEDITOR.dialogCommand("table",
{context:"table",allowedContent:"table{width,height,border-collapse}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];td{border*,background-color,vertical-align,width,height}[colspan,rowspan];"+(a.plugins.dialogadvtab?"table"+a.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(a){if(a.styles){var d;
if(a.styles.border)d=CKEDITOR.tools.style.parse.border(a.styles.border);else if(CKEDITOR.env.ie&&8===CKEDITOR.env.version){var e=a.styles;e["border-left"]&&e["border-left"]===e["border-right"]&&e["border-right"]===e["border-top"]&&e["border-top"]===e["border-bottom"]&&(d=CKEDITOR.tools.style.parse.border(e["border-top"]))}d&&d.style&&"solid"===d.style&&d.width&&0!==parseFloat(d.width)&&(a.attributes.border=1);"collapse"==a.styles["border-collapse"]&&(a.attributes.cellspacing=0)}}}]]}));a.addCommand("tableProperties",
new CKEDITOR.dialogCommand("tableProperties",h()));a.addCommand("tableDelete",h({exec:function(a){var d=a.elementPath().contains("table",1);if(d){var e=d.getParent(),g=a.editable();1!=e.getChildCount()||e.is("td","th")||e.equals(g)||(d=e);a=a.createRange();a.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d.remove();a.select()}}}));a.ui.addButton&&a.ui.addButton("Table",{label:e.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",
this.path+"dialogs/table.js");a.addMenuItems&&a.addMenuItems({table:{label:e.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:e.deleteTable,command:"tableDelete",group:"table",order:1}});a.on("doubleclick",function(a){a.data.element.is("table")&&(a.data.dialog="tableProperties")});a.contextMenu&&a.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function a(a,b){function c(a){return b?b.contains(a)&&a.getAscendant("table",
!0).equals(b):!0}function d(a){var b=/^(?:td|th)$/;0<e.length||a.type!=CKEDITOR.NODE_ELEMENT||!b.test(a.getName())||a.getCustomData("selected_cell")||(CKEDITOR.dom.element.setMarker(f,a,"selected_cell",!0),e.push(a))}var e=[],f={};if(!a)return e;for(var g=a.getRanges(),h=0;h<g.length;h++){var k=g[h];if(k.collapsed)(k=k.getCommonAncestor().getAscendant({td:1,th:1},!0))&&c(k)&&e.push(k);else{var k=new CKEDITOR.dom.walker(k),l;for(k.guard=d;l=k.next();)l.type==CKEDITOR.NODE_ELEMENT&&l.is(CKEDITOR.dtd.table)||
(l=l.getAscendant({td:1,th:1},!0))&&!l.getCustomData("selected_cell")&&c(l)&&(CKEDITOR.dom.element.setMarker(f,l,"selected_cell",!0),e.push(l))}}CKEDITOR.dom.element.clearAllMarkers(f);return e}function h(b,c){for(var d=u(b)?b:a(b),e=d[0],f=e.getAscendant("table"),e=e.getDocument(),g=d[0].getParent(),h=g.$.rowIndex,d=d[d.length-1],k=d.getParent().$.rowIndex+d.$.rowSpan-1,d=new CKEDITOR.dom.element(f.$.rows[k]),h=c?h:k,g=c?g:d,d=CKEDITOR.tools.buildTableMap(f),f=d[h],h=c?d[h-1]:d[h+1],d=d[0].length,
e=e.createElement("tr"),k=0;f[k]&&k<d;k++){var l;1<f[k].rowSpan&&h&&f[k]==h[k]?(l=f[k],l.rowSpan+=1):(l=(new CKEDITOR.dom.element(f[k])).clone(),l.removeAttribute("rowSpan"),l.appendBogus(),e.append(l),l=l.$);k+=l.colSpan-1}c?e.insertBefore(g):e.insertAfter(g);return e}function e(b){if(b instanceof CKEDITOR.dom.selection){var c=b.getRanges(),d=a(b),f=d[0].getAscendant("table"),g=CKEDITOR.tools.buildTableMap(f),h=d[0].getParent().$.rowIndex,d=d[d.length-1],k=d.getParent().$.rowIndex+d.$.rowSpan-1,
d=[];b.reset();for(b=h;b<=k;b++){for(var l=g[b],m=new CKEDITOR.dom.element(f.$.rows[b]),n=0;n<l.length;n++){var r=new CKEDITOR.dom.element(l[n]),u=r.getParent().$.rowIndex;1==r.$.rowSpan?r.remove():(--r.$.rowSpan,u==b&&(u=g[b+1],u[n-1]?r.insertAfter(new CKEDITOR.dom.element(u[n-1])):(new CKEDITOR.dom.element(f.$.rows[b+1])).append(r,1)));n+=r.$.colSpan-1}d.push(m)}g=f.$.rows;c[0].moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);h=new CKEDITOR.dom.element(g[k+1]||(0<h?g[h-1]:null)||f.$.parentNode);
for(b=d.length;0<=b;b--)e(d[b]);return f.$.parentNode?h:(c[0].select(),null)}b instanceof CKEDITOR.dom.element&&(f=b.getAscendant("table"),1==f.$.rows.length?f.remove():b.remove());return null}function b(a){for(var b=a.getParent().$.cells,c=0,d=0;d<b.length;d++){var e=b[d],c=c+e.colSpan;if(e==a.$)break}return c-1}function d(a,c){for(var d=c?Infinity:0,e=0;e<a.length;e++){var f=b(a[e]);if(c?f<d:f>d)d=f}return d}function l(b,c){for(var e=u(b)?b:a(b),f=e[0].getAscendant("table"),g=d(e,1),e=d(e),h=c?
g:e,k=CKEDITOR.tools.buildTableMap(f),f=[],g=[],e=[],l=k.length,m=0;m<l;m++){var n=c?k[m][h-1]:k[m][h+1];f.push(k[m][h]);g.push(n)}for(m=0;m<l;m++)f[m]&&(1<f[m].colSpan&&g[m]==f[m]?(k=f[m],k.colSpan+=1):(h=new CKEDITOR.dom.element(f[m]),k=h.clone(),k.removeAttribute("colSpan"),k.appendBogus(),k[c?"insertBefore":"insertAfter"].call(k,h),e.push(k),k=k.$),m+=k.rowSpan-1);return e}function g(b){function c(a){var b=a.getRanges(),d,e;if(1!==b.length)return a;b=b[0];if(b.collapsed||0!==b.endOffset)return a;
d=b.endContainer;e=d.getName().toLowerCase();if("td"!==e&&"th"!==e)return a;for((e=d.getPrevious())||(e=d.getParent().getPrevious().getLast());e.type!==CKEDITOR.NODE_TEXT&&"br"!==e.getName().toLowerCase();)if(e=e.getLast(),!e)return a;b.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);return b.select()}CKEDITOR.env.webkit&&!b.isFake&&(b=c(b));var d=b.getRanges(),e=a(b),f=e[0],g=e[e.length-1],e=f.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(e),k,l,m=[];b.reset();var n=0;for(b=h.length;n<b;n++)for(var r=
0,u=h[n].length;r<u;r++)void 0===k&&h[n][r]==f.$&&(k=r),h[n][r]==g.$&&(l=r);for(n=k;n<=l;n++)for(r=0;r<h.length;r++)g=h[r],f=new CKEDITOR.dom.element(e.$.rows[r]),g=new CKEDITOR.dom.element(g[n]),g.$&&(1==g.$.colSpan?g.remove():--g.$.colSpan,r+=g.$.rowSpan-1,f.$.cells.length||m.push(f));k=h[0].length-1>l?new CKEDITOR.dom.element(h[0][l+1]):k&&-1!==h[0][k-1].cellIndex?new CKEDITOR.dom.element(h[0][k-1]):new CKEDITOR.dom.element(e.$.parentNode);m.length==b&&(d[0].moveToPosition(e,CKEDITOR.POSITION_AFTER_END),
d[0].select(),e.remove());return k}function m(a,b){var c=a.getStartElement().getAscendant({td:1,th:1},!0);if(c){var d=c.clone();d.appendBogus();b?d.insertBefore(c):d.insertAfter(c)}}function c(b){if(b instanceof CKEDITOR.dom.selection){var d=b.getRanges(),e=a(b),f=e[0]&&e[0].getAscendant("table"),g;a:{var h=0;g=e.length-1;for(var l={},m,n;m=e[h++];)CKEDITOR.dom.element.setMarker(l,m,"delete_cell",!0);for(h=0;m=e[h++];)if((n=m.getPrevious())&&!n.getCustomData("delete_cell")||(n=m.getNext())&&!n.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(l);
g=n;break a}CKEDITOR.dom.element.clearAllMarkers(l);h=e[0].getParent();(h=h.getPrevious())?g=h.getLast():(h=e[g].getParent(),g=(h=h.getNext())?h.getChild(0):null)}b.reset();for(b=e.length-1;0<=b;b--)c(e[b]);g?k(g,!0):f&&(d[0].moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),d[0].select(),f.remove())}else b instanceof CKEDITOR.dom.element&&(d=b.getParent(),1==d.getChildCount()?d.remove():b.remove())}function k(a,b){var c=a.getDocument(),d=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&
(d.focus(),c.focus());c=new CKEDITOR.dom.range(c);c["moveToElementEdit"+(b?"End":"Start")](a)||(c.selectNodeContents(a),c.collapse(b?!1:!0));c.select(!0)}function f(a,b,c){a=a[b];if("undefined"==typeof c)return a;for(b=0;a&&b<a.length;b++){if(c.is&&a[b]==c.$)return b;if(b==c)return new CKEDITOR.dom.element(a[b])}return c.is?-1:null}function n(b,c,d){var e=a(b),g;if((c?1!=e.length:2>e.length)||(g=b.getCommonAncestor())&&g.type==CKEDITOR.NODE_ELEMENT&&g.is("table"))return!1;b=e[0];g=b.getAscendant("table");
var h=CKEDITOR.tools.buildTableMap(g),k=h.length,l=h[0].length,m=b.getParent().$.rowIndex,n=f(h,m,b),r;if(c){var u;try{var v=parseInt(b.getAttribute("rowspan"),10)||1;r=parseInt(b.getAttribute("colspan"),10)||1;u=h["up"==c?m-v:"down"==c?m+v:m]["left"==c?n-r:"right"==c?n+r:n]}catch(L){return!1}if(!u||b.$==u)return!1;e["up"==c||"left"==c?"unshift":"push"](new CKEDITOR.dom.element(u))}c=b.getDocument();var G=m,v=u=0,N=!d&&new CKEDITOR.dom.documentFragment(c),J=0;for(c=0;c<e.length;c++){r=e[c];var E=
r.getParent(),P=r.getFirst(),I=r.$.colSpan,M=r.$.rowSpan,E=E.$.rowIndex,O=f(h,E,r),J=J+I*M,v=Math.max(v,O-n+I);u=Math.max(u,E-m+M);d||(I=r,(M=I.getBogus())&&M.remove(),I.trim(),r.getChildren().count()&&(E==G||!P||P.isBlockBoundary&&P.isBlockBoundary({br:1})||(G=N.getLast(CKEDITOR.dom.walker.whitespaces(!0)),!G||G.is&&G.is("br")||N.append("br")),r.moveChildren(N)),c?r.remove():r.setHtml(""));G=E}if(d)return u*v==J;N.moveChildren(b);b.appendBogus();v>=l?b.removeAttribute("rowSpan"):b.$.rowSpan=u;u>=
k?b.removeAttribute("colSpan"):b.$.colSpan=v;d=new CKEDITOR.dom.nodeList(g.$.rows);e=d.count();for(c=e-1;0<=c;c--)g=d.getItem(c),g.$.cells.length||(g.remove(),e++);return b}function r(b,c){var d=a(b);if(1<d.length)return!1;if(c)return!0;var d=d[0],e=d.getParent(),g=e.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(g),k=e.$.rowIndex,l=f(h,k,d),m=d.$.rowSpan,n;if(1<m){n=Math.ceil(m/2);for(var m=Math.floor(m/2),e=k+n,g=new CKEDITOR.dom.element(g.$.rows[e]),h=f(h,e),r,e=d.clone(),k=0;k<h.length;k++)if(r=
h[k],r.parentNode==g.$&&k>l){e.insertBefore(new CKEDITOR.dom.element(r));break}else r=null;r||g.append(e)}else for(m=n=1,g=e.clone(),g.insertAfter(e),g.append(e=d.clone()),r=f(h,k),l=0;l<r.length;l++)r[l].rowSpan++;e.appendBogus();d.$.rowSpan=n;e.$.rowSpan=m;1==n&&d.removeAttribute("rowSpan");1==m&&e.removeAttribute("rowSpan");return e}function v(b,c){var d=a(b);if(1<d.length)return!1;if(c)return!0;var d=d[0],e=d.getParent(),g=e.getAscendant("table"),g=CKEDITOR.tools.buildTableMap(g),h=f(g,e.$.rowIndex,
d),k=d.$.colSpan;if(1<k)e=Math.ceil(k/2),k=Math.floor(k/2);else{for(var k=e=1,l=[],m=0;m<g.length;m++){var n=g[m];l.push(n[h]);1<n[h].rowSpan&&(m+=n[h].rowSpan-1)}for(g=0;g<l.length;g++)l[g].colSpan++}g=d.clone();g.insertAfter(d);g.appendBogus();d.$.colSpan=e;g.$.colSpan=k;1==e&&d.removeAttribute("colSpan");1==k&&g.removeAttribute("colSpan");return g}var u=CKEDITOR.tools.isArray;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(b){function d(a){return CKEDITOR.tools.extend(a||
{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function f(a,c){var d=b.addCommand(a,c);b.addFeature(d)}var p=b.lang.table,u=CKEDITOR.tools.style.parse,y="td{width} td{height} td{border-color} td{background-color} td{white-space} td{vertical-align} td{text-align} td[colspan] td[rowspan] th".split(" ");f("cellProperties",new CKEDITOR.dialogCommand("cellProperties",d({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",
requiredContent:y,contentTransformations:[[{element:"td",left:function(a){return a.styles.background&&u.background(a.styles.background).color},right:function(a){a.styles["background-color"]=u.background(a.styles.background).color}},{element:"td",check:"td{vertical-align}",left:function(a){return a.attributes&&a.attributes.valign},right:function(a){a.styles["vertical-align"]=a.attributes.valign;delete a.attributes.valign}}],[{element:"tr",check:"td{height}",left:function(a){return a.styles&&a.styles.height},
right:function(a){CKEDITOR.tools.array.forEach(a.children,function(b){b.name in{td:1,th:1}&&(b.attributes["cke-row-height"]=a.styles.height)});delete a.styles.height}}],[{element:"td",check:"td{height}",left:function(a){return(a=a.attributes)&&a["cke-row-height"]},right:function(a){a.styles.height=a.attributes["cke-row-height"];delete a.attributes["cke-row-height"]}}]]})));CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js");f("rowDelete",d({requiredContent:"table",exec:function(a){a=
a.getSelection();(a=e(a))&&k(a)}}));f("rowInsertBefore",d({requiredContent:"table",exec:function(b){b=b.getSelection();b=a(b);h(b,!0)}}));f("rowInsertAfter",d({requiredContent:"table",exec:function(b){b=b.getSelection();b=a(b);h(b)}}));f("columnDelete",d({requiredContent:"table",exec:function(a){a=a.getSelection();(a=g(a))&&k(a,!0)}}));f("columnInsertBefore",d({requiredContent:"table",exec:function(b){b=b.getSelection();b=a(b);l(b,!0)}}));f("columnInsertAfter",d({requiredContent:"table",exec:function(b){b=
b.getSelection();b=a(b);l(b)}}));f("cellDelete",d({requiredContent:"table",exec:function(a){a=a.getSelection();c(a)}}));f("cellMerge",d({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(a,b){b.cell=n(a.getSelection());k(b.cell,!0)}}));f("cellMergeRight",d({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a,b){b.cell=n(a.getSelection(),"right");k(b.cell,!0)}}));f("cellMergeDown",d({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",
exec:function(a,b){b.cell=n(a.getSelection(),"down");k(b.cell,!0)}}));f("cellVerticalSplit",d({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a){k(v(a.getSelection()))}}));f("cellHorizontalSplit",d({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){k(r(a.getSelection()))}}));f("cellInsertBefore",d({requiredContent:"table",exec:function(a){a=a.getSelection();m(a,!0)}}));f("cellInsertAfter",d({requiredContent:"table",exec:function(a){a=a.getSelection();
m(a)}}));b.addMenuItems&&b.addMenuItems({tablecell:{label:p.cell.menu,group:"tablecell",order:1,getItems:function(){var c=b.getSelection(),d=a(c),c={tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:n(c,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:n(c,"right",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:n(c,"down",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,
tablecell_split_vertical:v(c,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:r(c,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED};b.filter.check(y)&&(c.tablecell_properties=0<d.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);return c}},tablecell_insertBefore:{label:p.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:p.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:p.cell.deleteCell,
group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:p.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:p.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:p.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:p.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:p.cell.splitVertical,group:"tablecell",
command:"cellVerticalSplit",order:20},tablecell_properties:{label:p.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:p.row.menu,group:"tablerow",order:1,getItems:function(){return{tablerow_insertBefore:CKEDITOR.TRISTATE_OFF,tablerow_insertAfter:CKEDITOR.TRISTATE_OFF,tablerow_delete:CKEDITOR.TRISTATE_OFF}}},tablerow_insertBefore:{label:p.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:p.row.insertAfter,group:"tablerow",
command:"rowInsertAfter",order:10},tablerow_delete:{label:p.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:p.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:CKEDITOR.TRISTATE_OFF,tablecolumn_insertAfter:CKEDITOR.TRISTATE_OFF,tablecolumn_delete:CKEDITOR.TRISTATE_OFF}}},tablecolumn_insertBefore:{label:p.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:p.column.insertAfter,
group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:p.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}});b.contextMenu&&b.contextMenu.addListener(function(a,b,c){return(a=c.contains({td:1,th:1},1))&&!a.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getCellColIndex:b,insertRow:h,insertColumn:l,getSelectedCells:a};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),
CKEDITOR.tools.buildTableMap=function(a,h,e,b,d){a=a.$.rows;e=e||0;b="number"===typeof b?b:a.length-1;d="number"===typeof d?d:-1;var l=-1,g=[];for(h=h||0;h<=b;h++){l++;!g[l]&&(g[l]=[]);for(var m=-1,c=e;c<=(-1===d?a[h].cells.length-1:d);c++){var k=a[h].cells[c];if(!k)break;for(m++;g[l][m];)m++;for(var f=isNaN(k.colSpan)?1:k.colSpan,k=isNaN(k.rowSpan)?1:k.rowSpan,n=0;n<k&&!(h+n>b);n++){g[l+n]||(g[l+n]=[]);for(var r=0;r<f;r++)g[l+n][m+r]=a[h].cells[c]}m+=f-1;if(-1!==d&&m>=d)break}}return g},CKEDITOR.config.tabletools_scopedHeaders=
!1,function(){function a(a){return CKEDITOR.env.ie?a.$.clientWidth:parseInt(a.getComputedStyle("width"),10)}function h(a,b){var d=a.getComputedStyle("border-"+b+"-width"),e={thin:"0px",medium:"1px",thick:"2px"};0>d.indexOf("px")&&(d=d in e&&"none"!=a.getComputedStyle("border-style")?e[d]:0);return parseFloat(d)}function e(a){var b=[],d={},e="rtl"===a.getComputedStyle("direction"),g=CKEDITOR.tools.array.zip((new CKEDITOR.dom.nodeList(a.$.rows)).toArray(),CKEDITOR.tools.buildTableMap(a));CKEDITOR.tools.array.forEach(g,
function(g){var l=g[0].$;g=g[1];var m=-1,r=0,z=null;l?(r=new CKEDITOR.dom.element(l),z={height:r.$.offsetHeight,position:r.getDocumentPosition()}):z=void 0;for(var l=CKEDITOR.env.ie&&!CKEDITOR.env.edge,p="collapse"===a.getComputedStyle("border-collapse"),r=z.height,z=z.position,A=0;A<g.length;A++){var y=new CKEDITOR.dom.element(g[A]),x=g[A+1]&&new CKEDITOR.dom.element(g[A+1]),w,B,D=y.getDocumentPosition().x,m=m+(y.$.colSpan||1);e?B=D+h(y,"left"):w=D+y.$.offsetWidth-h(y,"right");x?(D=x.getDocumentPosition().x,
e?w=D+x.$.offsetWidth-h(x,"right"):B=D+h(x,"left")):(D=a.getDocumentPosition().x,e?w=D:B=D+a.$.offsetWidth);y=Math.max(B-w,3);l&&p&&(w-=y,y=Math.max(B-w,3));y={table:a,index:m,x:w,y:z.y,width:y,height:r,rtl:e};d[m]=d[m]||[];d[m].push(y);y.alignedPillars=d[m];b.push(y)}});return b}function b(a){(a.data||a).preventDefault()}function d(c){function d(){z=0;t.setOpacity(0);A&&e();var a=u.table;setTimeout(function(){a.removeCustomData("_cke_table_pillars")},0);q.removeListener("dragstart",b)}function e(){for(var b=
u.rtl,d=b?w.length:x.length,f=0,k=0;k<d;k++){var l=x[k],m=w[k],n=u.table;CKEDITOR.tools.setTimeout(function(a,e,h,k,l,m){a&&a.setStyle("width",g(Math.max(e+m,1)));h&&h.setStyle("width",g(Math.max(k-m,1)));l&&n.setStyle("width",g(l+m*(b?-1:1)));++f==d&&c.fire("saveSnapshot")},0,this,[l,l&&a(l),m,m&&a(m),(!l||!m)&&a(n)+h(n,"left")+h(n,"right"),A])}}function l(d){b(d);c.fire("saveSnapshot");d=u.index;for(var e=CKEDITOR.tools.buildTableMap(u.table),f=[],g=[],h=Number.MAX_VALUE,k=h,m=u.rtl,n=0,y=e.length;n<
y;n++){var I=e[n],M=I[d+(m?1:0)],I=I[d+(m?0:1)],M=M&&new CKEDITOR.dom.element(M),I=I&&new CKEDITOR.dom.element(I);M&&I&&M.equals(I)||(M&&(h=Math.min(h,a(M))),I&&(k=Math.min(k,a(I))),f.push(M),g.push(I))}x=f;w=g;B=u.x-h;D=u.x+k;t.setOpacity(.5);p=parseInt(t.getStyle("left"),10);A=0;z=1;t.on("mousemove",v);q.on("dragstart",b);q.on("mouseup",r,this)}function r(a){a.removeListener();d()}function v(a){y(a.data.getPageOffset().x)}var u,q,t,z,p,A,y,x,w,B,D;q=c.document;t=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-temp\x3d1 contenteditable\x3dfalse unselectable\x3don style\x3d"position:absolute;cursor:col-resize;filter:alpha(opacity\x3d0);opacity:0;padding:0;background-color:#004;background-image:none;border:0px none;z-index:10000"\x3e\x3c/div\x3e',
q);c.on("destroy",function(){t.remove()});m||q.getDocumentElement().append(t);this.attachTo=function(a){var b,c,d;z||(m&&(q.getBody().append(t),A=0),u=a,b=u.alignedPillars[0],c=u.alignedPillars[u.alignedPillars.length-1],d=b.y,b=c.height+c.y-b.y,t.setStyles({width:g(a.width),height:g(b),left:g(a.x),top:g(d)}),m&&t.setOpacity(.25),t.on("mousedown",l,this),q.getBody().setStyle("cursor","col-resize"),t.show())};y=this.move=function(a,b){if(!u)return 0;if(!(z||a>=u.x&&a<=u.x+u.width&&b>=u.y&&b<=u.y+u.height))return u=
null,z=A=0,q.removeListener("mouseup",r),t.removeListener("mousedown",l),t.removeListener("mousemove",v),q.getBody().setStyle("cursor","auto"),m?t.remove():t.hide(),0;var c=a-Math.round(t.$.offsetWidth/2);if(z){if(c==B||c==D)return 1;c=Math.max(c,B);c=Math.min(c,D);A=c-p}t.setStyle("left",g(c));return 1}}function l(a){var b=a.data.getTarget();if("mouseout"==a.name){if(!b.is("table"))return;for(var d=new CKEDITOR.dom.element(a.data.$.relatedTarget||a.data.$.toElement);d&&d.$&&!d.equals(b)&&!d.is("body");)d=
d.getParent();if(!d||d.equals(b))return}b.getAscendant("table",1).removeCustomData("_cke_table_pillars");a.removeListener()}var g=CKEDITOR.tools.cssLength,m=CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks);CKEDITOR.plugins.add("tableresize",{requires:"tabletools",init:function(a){a.on("contentDom",function(){var g,f=a.editable(),h=f.isInline()?f:a.document;f.attachListener(h,"mousemove",function(f){f=f.data;var h=f.getTarget();if(h.type==CKEDITOR.NODE_ELEMENT){var m=f.getPageOffset().x,
n=f.getPageOffset().y;if(g&&g.move(m,n))b(f);else if(h.is("table")||h.getAscendant({thead:1,tbody:1,tfoot:1},1))if(f=h.getAscendant("table",1),a.editable().contains(f)){(h=f.getCustomData("_cke_table_pillars"))||(f.setCustomData("_cke_table_pillars",h=e(f)),f.on("mouseout",l),f.on("mousedown",l));a:{f=h;for(var h=0,t=f.length;h<t;h++){var z=f[h];if(m>=z.x&&m<=z.x+z.width&&n>=z.y&&n<=z.y+z.height){m=z;break a}}m=null}m&&(!g&&(g=new d(a)),g.attachTo(m))}}});f.attachListener(h,"scroll",function(){var a=
f.find("table").toArray();CKEDITOR.tools.array.forEach(a,CKEDITOR.tools.debounce(function(a){a.removeCustomData("_cke_table_pillars")},200))})})}})}(),function(){function a(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function h(a,b){var d=a.getAscendant("table"),e=b.getAscendant("table"),f=CKEDITOR.tools.buildTableMap(d),g=c(a),h=c(b),k=[],l={},m,n;d.contains(e)&&(b=b.getAscendant({td:1,th:1}),h=c(b));g>h&&(d=g,g=h,h=d,d=a,a=b,b=d);for(d=0;d<f[g].length;d++)if(a.$===
f[g][d]){m=d;break}for(d=0;d<f[h].length;d++)if(b.$===f[h][d]){n=d;break}m>n&&(d=m,m=n,n=d);for(d=g;d<=h;d++)for(g=m;g<=n;g++)e=new CKEDITOR.dom.element(f[d][g]),e.$&&!e.getCustomData("selected_cell")&&(k.push(e),CKEDITOR.dom.element.setMarker(l,e,"selected_cell",!0));CKEDITOR.dom.element.clearAllMarkers(l);return k}function e(a){return(a=a.editable().findOne(".cke_table-faked-selection"))&&a.getAscendant("table")}function b(a,b){var c=a.editable().find(".cke_table-faked-selection"),d=a.editable().findOne("[data-cke-table-faked-selection-table]"),
e;a.fire("lockSnapshot");a.editable().removeClass("cke_table-faked-selection-editor");for(e=0;e<c.count();e++)c.getItem(e).removeClass("cke_table-faked-selection");d&&d.data("cke-table-faked-selection-table",!1);a.fire("unlockSnapshot");b&&(q={active:!1},a.getSelection().isInTable()&&a.getSelection().reset())}function d(a,b){var c=[],d,e;for(e=0;e<b.length;e++)d=a.createRange(),d.setStartBefore(b[e]),d.setEndAfter(b[e]),c.push(d);a.getSelection().selectRanges(c)}function l(a){var b=a.editable().find(".cke_table-faked-selection");
1>b.count()||(b=h(b.getItem(0),b.getItem(b.count()-1)),d(a,b))}function g(c,e,f){var g=z(c.getSelection(!0));e=e.is("table")?null:e;var k;(k=q.active&&!q.first)&&!(k=e)&&(k=c.getSelection().getRanges(),k=1<g.length||k[0]&&!k[0].collapsed?!0:!1);if(k)q.first=e||g[0],q.dirty=e?!1:1!==g.length;else if(q.active&&e&&q.first.getAscendant("table").equals(e.getAscendant("table"))){g=h(q.first,e);if(!q.dirty&&1===g.length&&!a(f.data.getTarget()))return b(c,"mouseup"===f.name);q.dirty=!0;q.last=e;d(c,g)}}function m(a){var c=
(a=a.editor||a.sender.editor)&&a.getSelection(),d=c&&c.getRanges()||[],e=d&&d[0].getEnclosedNode(),e=e&&e.type==CKEDITOR.NODE_ELEMENT&&e.is("img"),f;if(c&&(b(a),c.isInTable()&&c.isFake))if(e)a.getSelection().reset();else if(!d[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored")){1===d.length&&d[0]._getTableElement()&&d[0]._getTableElement().is("table")&&(f=d[0]._getTableElement());f=z(c,f);a.fire("lockSnapshot");for(c=0;c<f.length;c++)f[c].addClass("cke_table-faked-selection");
0<f.length&&(a.editable().addClass("cke_table-faked-selection-editor"),f[0].getAscendant("table").data("cke-table-faked-selection-table",""));a.fire("unlockSnapshot")}}function c(a){return a.getAscendant("tr",!0).$.rowIndex}function k(c){function d(a,b){return a&&b?a.equals(b)||a.contains(b)||b.contains(a)||a.getCommonAncestor(b).is(t):!1}function f(a){return!a.getAscendant("table",!0)&&a.getDocument().equals(m.document)}function h(a,b,c,d){if("mousedown"===a.name&&(CKEDITOR.tools.getMouseButton(a)===
CKEDITOR.MOUSE_BUTTON_LEFT||!d))return!0;if(b=a.name===(CKEDITOR.env.gecko?"mousedown":"mouseup")&&!f(a.data.getTarget()))a=a.data.getTarget().getAscendant({td:1,th:1},!0),b=!(a&&a.hasClass("cke_table-faked-selection"));return b}if(c.data.getTarget().getName&&("mouseup"===c.name||!a(c.data.getTarget()))){var m=c.editor||c.listenerData.editor,n=m.getSelection(1),r=e(m),p=c.data.getTarget(),u=p&&p.getAscendant({td:1,th:1},!0),p=p&&p.getAscendant("table",!0),t={table:1,thead:1,tbody:1,tfoot:1,tr:1,td:1,
th:1};p&&p.hasAttribute("data-cke-tableselection-ignored")||(h(c,n,r,p)&&b(m,!0),!q.active&&"mousedown"===c.name&&CKEDITOR.tools.getMouseButton(c)===CKEDITOR.MOUSE_BUTTON_LEFT&&p&&(q={active:!0},CKEDITOR.document.on("mouseup",k,null,{editor:m})),(u||p)&&g(m,u||p,c),"mouseup"===c.name&&(CKEDITOR.tools.getMouseButton(c)===CKEDITOR.MOUSE_BUTTON_LEFT&&(f(c.data.getTarget())||d(r,p))&&l(m),q={active:!1},CKEDITOR.document.removeListener("mouseup",k)))}}function f(a){var b=a.data.getTarget().getAscendant("table",
!0);q.active=!1;b&&b.hasAttribute("data-cke-tableselection-ignored")||(a=a.data.getTarget().getAscendant({td:1,th:1},!0),!a||a.hasClass("cke_table-faked-selection"))}function n(a,b){function c(a){a.cancel()}var d=a.getSelection(),e=d.createBookmarks(),f=a.document,g=a.createRange(),h=f.getDocumentElement().$,k=CKEDITOR.env.ie&&9>CKEDITOR.env.version,l=a.blockless||CKEDITOR.env.ie?"span":"div",m,n,q,r;f.getById("cke_table_copybin")||(m=f.createElement(l),n=f.createElement(l),n.setAttributes({id:"cke_table_copybin",
"data-cke-temp":"1"}),m.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"}),m.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-5000px"),m.setHtml(a.getSelectedHtml(!0)),a.fire("lockSnapshot"),n.append(m),a.editable().append(n),r=a.on("selectionChange",c,null,null,0),k&&(q=h.scrollTop),g.selectNodeContents(m),g.select(),k&&(h.scrollTop=q),setTimeout(function(){n.remove();d.selectBookmarks(e);r.removeListener();a.fire("unlockSnapshot");b&&(a.extractSelectedHtml(),
a.fire("saveSnapshot"))},100))}function r(a){var b=a.editor||a.sender.editor,c=b.getSelection();c.isInTable()&&(c.getRanges()[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored")||n(b,"cut"===a.name))}function v(a){this._reset();a&&this.setSelectedCells(a)}function u(a,b,c){a.on("beforeCommandExec",function(c){-1!==CKEDITOR.tools.array.indexOf(b,c.data.name)&&(c.data.selectedCells=z(a.getSelection()))});a.on("afterCommandExec",function(d){-1!==CKEDITOR.tools.array.indexOf(b,
d.data.name)&&c(a,d.data)},null,null,9)}var q={active:!1},t,z,p,A,y;v.prototype={};v.prototype._reset=function(){this.cells={first:null,last:null,all:[]};this.rows={first:null,last:null}};v.prototype.setSelectedCells=function(a){this._reset();a=a.slice(0);this._arraySortByDOMOrder(a);this.cells.all=a;this.cells.first=a[0];this.cells.last=a[a.length-1];this.rows.first=a[0].getAscendant("tr");this.rows.last=this.cells.last.getAscendant("tr")};v.prototype.getTableMap=function(){var a=p(this.cells.first),
b;a:{b=this.cells.last;var d=b.getAscendant("table"),e=c(b),d=CKEDITOR.tools.buildTableMap(d),f;for(f=0;f<d[e].length;f++)if((new CKEDITOR.dom.element(d[e][f])).equals(b)){b=f;break a}b=void 0}return CKEDITOR.tools.buildTableMap(this._getTable(),c(this.rows.first),a,c(this.rows.last),b)};v.prototype._getTable=function(){return this.rows.first.getAscendant("table")};v.prototype.insertRow=function(a,b,c){if("undefined"===typeof a)a=1;else if(0>=a)return;for(var d=this.cells.first.$.cellIndex,e=this.cells.last.$.cellIndex,
f=c?[]:this.cells.all,g,h=0;h<a;h++)g=A(c?this.cells.all:f,b),g=CKEDITOR.tools.array.filter(g.find("td, th").toArray(),function(a){return c?!0:a.$.cellIndex>=d&&a.$.cellIndex<=e}),f=b?g.concat(f):f.concat(g);this.setSelectedCells(f)};v.prototype.insertColumn=function(a){function b(a){a=c(a);return a>=f&&a<=g}if("undefined"===typeof a)a=1;else if(0>=a)return;for(var d=this.cells,e=d.all,f=c(d.first),g=c(d.last),d=0;d<a;d++)e=e.concat(CKEDITOR.tools.array.filter(y(e),b));this.setSelectedCells(e)};v.prototype.emptyCells=
function(a){a=a||this.cells.all;for(var b=0;b<a.length;b++)a[b].setHtml("")};v.prototype._arraySortByDOMOrder=function(a){a.sort(function(a,b){return a.getPosition(b)&CKEDITOR.POSITION_PRECEDING?-1:1})};var x={onPaste:function(a){function b(a){var c=e.createRange();c.selectNodeContents(a);c.select()}function c(a){return Math.max.apply(null,CKEDITOR.tools.array.map(a,function(a){return a.length},0))}var e=a.editor,f=e.getSelection(),g=z(f),k=f.isInTable(!0)&&this.isBoundarySelection(f),l=this.findTableInPastedContent(e,
a.data.dataValue),m,n;(function(a,b,c,d){a=a.getRanges();var e=a.length&&a[0]._getTableElement({table:1});if(!b.length||e&&e.hasAttribute("data-cke-tableselection-ignored")||d&&!c)return!1;if(b=!d)(b=a[0])?(b=b.clone(),b.enlarge(CKEDITOR.ENLARGE_ELEMENT),b=(b=b.getEnclosedNode())&&b.is&&b.is(CKEDITOR.dtd.$tableContent)):b=void 0,b=!b;return b?!1:!0})(f,g,l,k)&&"drop"!==a.data.method&&(g=g[0].getAscendant("table"),m=new v(z(f,g)),e.once("afterPaste",function(){var a;if(n){a=new CKEDITOR.dom.element(n[0][0]);
var b=n[n.length-1];a=h(a,new CKEDITOR.dom.element(b[b.length-1]))}else a=m.cells.all;d(e,a)}),l?(a.stop(),k?(m.insertRow(1,1===k,!0),f.selectElement(m.rows.first)):(m.emptyCells(),d(e,m.cells.all)),a=m.getTableMap(),n=CKEDITOR.tools.buildTableMap(l),m.insertRow(n.length-a.length),m.insertColumn(c(n)-c(a)),a=m.getTableMap(),this.pasteTable(m,a,n),e.fire("saveSnapshot"),setTimeout(function(){e.fire("afterPaste")},0)):(b(m.cells.first),e.once("afterPaste",function(){e.fire("lockSnapshot");m.emptyCells(m.cells.all.slice(1));
d(e,m.cells.all);e.fire("unlockSnapshot")})))},isBoundarySelection:function(a){a=a.getRanges()[0];var b=a.endContainer.getAscendant("tr",!0);if(b&&a.collapsed){if(a.checkBoundaryOfElement(b,CKEDITOR.START))return 1;if(a.checkBoundaryOfElement(b,CKEDITOR.END))return 2}return 0},findTableInPastedContent:function(a,b){var c=a.dataProcessor,d=new CKEDITOR.dom.element("body");c||(c=new CKEDITOR.htmlDataProcessor(a));d.setHtml(c.toHtml(b),{fixForBody:!1});return 1<d.getChildCount()?null:d.findOne("table")},
pasteTable:function(a,b,c){var d,e=p(a.cells.first),f=a._getTable(),g={},h,k,l,m;for(l=0;l<c.length;l++)for(h=new CKEDITOR.dom.element(f.$.rows[a.rows.first.$.rowIndex+l]),m=0;m<c[l].length;m++)if(k=new CKEDITOR.dom.element(c[l][m]),d=b[l]&&b[l][m]?new CKEDITOR.dom.element(b[l][m]):null,k&&!k.getCustomData("processed")){if(d&&d.getParent())k.replace(d);else if(0===m||c[l][m-1])(d=0!==m?new CKEDITOR.dom.element(c[l][m-1]):null)&&h.equals(d.getParent())?k.insertAfter(d):0<e?h.$.cells[e]?k.insertAfter(new CKEDITOR.dom.element(h.$.cells[e])):
h.append(k):h.append(k,!0);CKEDITOR.dom.element.setMarker(g,k,"processed",!0)}else k.getCustomData("processed")&&d&&d.remove();CKEDITOR.dom.element.clearAllMarkers(g)}};CKEDITOR.plugins.tableselection={getCellsBetween:h,keyboardIntegration:function(a){function b(a){var c=a.getEnclosedNode();c&&"function"===typeof c.is&&c.is({td:1,th:1})?c.setText(""):a.deleteContents();CKEDITOR.tools.array.forEach(a._find("td"),function(a){a.appendBogus()})}var c=a.editable();c.attachListener(c,"keydown",function(a){function c(b,
d){if(!d.length)return null;var f=a.createRange(),g=CKEDITOR.dom.range.mergeRanges(d);CKEDITOR.tools.array.forEach(g,function(a){a.enlarge(CKEDITOR.ENLARGE_ELEMENT)});var h=g[0].getBoundaryNodes(),k=h.startNode,h=h.endNode;if(k&&k.is&&k.is(e)){for(var l=k.getAscendant("table",!0),m=k.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT,l),n=!1,q=function(a){return!k.contains(a)&&a.is&&a.is("td","th")};m&&!q(m);)m=m.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT,l);!m&&h&&h.is&&!h.is("table")&&h.getNext()&&
(m=h.getNext().findOne("td, th"),n=!0);if(m)f["moveToElementEdit"+(n?"Start":"End")](m);else f.setStartBefore(k.getAscendant("table",!0)),f.collapse(!0);g[0].deleteContents();return[f]}if(k)return f.moveToElementEditablePosition(k),[f]}var d={37:1,38:1,39:1,40:1,8:1,46:1,13:1},e=CKEDITOR.tools.extend({table:1},CKEDITOR.dtd.$tableContent);delete e.td;delete e.th;return function(e){var f=e.data.getKey(),g=e.data.getKeystroke(),h,k=37===f||38==f,l,m,n;if(d[f]&&!a.readOnly&&(h=a.getSelection())&&h.isInTable()&&
h.isFake){l=h.getRanges();m=l[0]._getTableElement();n=l[l.length-1]._getTableElement();if(13!==f||a.plugins.enterkey)e.data.preventDefault(),e.cancel();if(36<f&&41>f)l[0].moveToElementEditablePosition(k?m:n,!k),h.selectRanges([l[0]]);else if(13!==f||13===g||g===CKEDITOR.SHIFT+13){for(e=0;e<l.length;e++)b(l[e]);(e=c(m,l))?l=e:l[0].moveToElementEditablePosition(m);h.selectRanges(l);13===f&&a.plugins.enterkey?(a.fire("lockSnapshot"),13===g?a.execCommand("enter"):a.execCommand("shiftEnter"),a.fire("unlockSnapshot"),
a.fire("saveSnapshot")):13!==f&&a.fire("saveSnapshot")}}}}(a),null,null,-1);c.attachListener(c,"keypress",function(c){var d=a.getSelection(),e=c.data.$.charCode||13===c.data.getKey(),f;if(!a.readOnly&&d&&d.isInTable()&&d.isFake&&e&&!(c.data.getKeystroke()&CKEDITOR.CTRL)){c=d.getRanges();e=c[0].getEnclosedNode().getAscendant({td:1,th:1},!0);for(f=0;f<c.length;f++)b(c[f]);e&&(c[0].moveToElementEditablePosition(e),d.selectRanges([c[0]]))}},null,null,-1);c.attachListener(c,"keyup",function(a){return function(b){b=
b.data.getKey();var c=a.getSelection();9===b&&c.isInTable()&&l(a)}}(a),null,null,-1)}};CKEDITOR.plugins.add("tableselection",{requires:"clipboard,tabletools",isSupportedEnvironment:function(){return!(CKEDITOR.env.ie&&11>CKEDITOR.env.version)},onLoad:function(){t=CKEDITOR.plugins.tabletools;z=t.getSelectedCells;p=t.getCellColIndex;A=t.insertRow;y=t.insertColumn;CKEDITOR.document.appendStyleSheet(this.path+"styles/tableselection.css")},init:function(a){this.isSupportedEnvironment()&&(a.addContentsCss&&
a.addContentsCss(this.path+"styles/tableselection.css"),a.on("contentDom",function(){var b=a.editable(),c=b.isInline()?b:a.document,d={editor:a};b.attachListener(c,"mousedown",k,null,d);b.attachListener(c,"mousemove",k,null,d);b.attachListener(c,"mouseup",k,null,d);b.attachListener(b,"dragstart",f);b.attachListener(a,"selectionCheck",m);CKEDITOR.plugins.tableselection.keyboardIntegration(a);CKEDITOR.plugins.clipboard&&!CKEDITOR.plugins.clipboard.isCustomCopyCutSupported&&(b.attachListener(b,"cut",
r),b.attachListener(b,"copy",r))}),a.on("paste",x.onPaste,x),u(a,"rowInsertBefore rowInsertAfter columnInsertBefore columnInsertAfter cellInsertBefore cellInsertAfter".split(" "),function(a,b){d(a,b.selectedCells)}),u(a,["cellMerge","cellMergeRight","cellMergeDown"],function(a,b){d(a,[b.commandData.cell])}),u(a,["cellDelete"],function(a){b(a,!0)}))}})}(),function(){CKEDITOR.plugins.add("templates",{requires:"dialog,ajax",init:function(a){CKEDITOR.dialog.add("templates",CKEDITOR.getUrl(this.path+"dialogs/templates.js"));
a.addCommand("templates",new CKEDITOR.dialogCommand("templates"));a.ui.addButton&&a.ui.addButton("Templates",{label:a.lang.templates.button,command:"templates",toolbar:"doctools,10"})}});var a={},h={};CKEDITOR.addTemplates=function(e,b){a[e]=b};CKEDITOR.getTemplates=function(e){return a[e]};CKEDITOR.loadTemplates=function(a,b){for(var d=[],l=0,g=a.length;l<g;l++)h[a[l]]||(d.push(a[l]),h[a[l]]=1);d.length?CKEDITOR.scriptLoader.load(d,b):setTimeout(b,0)}}(),CKEDITOR.config.templates_files=[CKEDITOR.getUrl("plugins/templates/templates/default.js")],
CKEDITOR.config.templates_replaceContent=!0,"use strict",function(){function a(a,b){return CKEDITOR.tools.array.reduce(b,function(a,b){return b(a)},a)}var h=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],e={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(a){function d(a){l.enabled&&!1!==a.data.command.canUndo&&l.save()}function e(){l.enabled=a.readOnly?!1:"wysiwyg"==a.mode;l.onChange()}var l=a.undoManager=new b(a),m=l.editingHandler=new g(l),v=a.addCommand("undo",{exec:function(){l.undo()&&
(a.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),u=a.addCommand("redo",{exec:function(){l.redo()&&(a.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});a.setKeystroke([[h[0],"undo"],[h[1],"redo"],[h[2],"redo"]]);l.onChange=function(){v.setState(l.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);u.setState(l.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};a.on("beforeCommandExec",d);a.on("afterCommandExec",d);a.on("saveSnapshot",
function(a){l.save(a.data&&a.data.contentOnly)});a.on("contentDom",m.attachListeners,m);a.on("instanceReady",function(){a.fire("saveSnapshot")});a.on("beforeModeUnload",function(){"wysiwyg"==a.mode&&l.save(!0)});a.on("mode",e);a.on("readOnly",e);a.ui.addButton&&(a.ui.addButton("Undo",{label:a.lang.undo.undo,command:"undo",toolbar:"undo,10"}),a.ui.addButton("Redo",{label:a.lang.undo.redo,command:"redo",toolbar:"undo,20"}));a.resetUndo=function(){l.reset();a.fire("saveSnapshot")};a.on("updateSnapshot",
function(){l.currentImage&&l.update()});a.on("lockSnapshot",function(a){a=a.data;l.lock(a&&a.dontUpdate,a&&a.forceUpdate)});a.on("unlockSnapshot",l.unlock,l)}});CKEDITOR.plugins.undo={};var b=CKEDITOR.plugins.undo.UndoManager=function(a){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=a.config.undoStackSize||20;this.strokesLimit=25;this._filterRules=[];this.editor=a;this.reset();CKEDITOR.env.ie&&this.addFilterRule(function(a){return a.replace(/\s+data-cke-expando=".*?"/g,
"")})};b.prototype={type:function(a,d){var e=b.getKeyGroup(a),g=this.strokesRecorded[e]+1;d=d||g>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());d?(g=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[e]=g;this.previousKeyGroup=e},keyGroupChanged:function(a){return b.getKeyGroup(a)!=this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;
this.resetType()},resetType:function(){this.strokesRecorded=[0,0];this.typing=!1;this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(a,b,e){var g=this.editor;if(this.locked||"ready"!=g.status||"wysiwyg"!=g.mode)return!1;var h=g.editable();if(!h||"ready"!=h.status)return!1;h=this.snapshots;b||(b=new d(g));if(!1===b.contents)return!1;if(this.currentImage)if(b.equalsContent(this.currentImage)){if(a||
b.equalsSelection(this.currentImage))return!1}else!1!==e&&g.fire("change");h.splice(this.index+1,h.length-this.index-1);h.length==this.limit&&h.shift();this.index=h.push(b)-1;this.currentImage=b;!1!==e&&this.refreshState();return!0},restoreImage:function(a){var b=this.editor,d;a.bookmarks&&(b.focus(),d=b.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?d.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(d=this.editor.document.getBody().$.createTextRange(),d.collapse(!0),
d.select());this.locked=null;this.index=a.index;this.currentImage=this.snapshots[this.index];this.update();this.refreshState();b.fire("change")},getNextImage:function(a){var b=this.snapshots,d=this.currentImage,e;if(d)if(a)for(e=this.index-1;0<=e;e--){if(a=b[e],!d.equalsContent(a))return a.index=e,a}else for(e=this.index+1;e<b.length;e++)if(a=b[e],!d.equalsContent(a))return a.index=e,a;return null},redoable:function(){return this.enabled&&this.hasRedo},undoable:function(){return this.enabled&&this.hasUndo},
undo:function(){if(this.undoable()){this.save(!0);var a=this.getNextImage(!0);if(a)return this.restoreImage(a),!0}return!1},redo:function(){if(this.redoable()&&(this.save(!0),this.redoable())){var a=this.getNextImage(!1);if(a)return this.restoreImage(a),!0}return!1},update:function(a){if(!this.locked){a||(a=new d(this.editor));for(var b=this.index,e=this.snapshots;0<b&&this.currentImage.equalsContent(e[b-1]);)--b;e.splice(b,this.index-b+1,a);this.index=b;this.currentImage=a}},updateSelection:function(a){if(!this.snapshots.length)return!1;
var b=this.snapshots,d=b[b.length-1];return d.equalsContent(a)&&!d.equalsSelection(a)?(this.currentImage=b[b.length-1]=a,!0):!1},lock:function(a,b){if(this.locked)this.locked.level++;else if(a)this.locked={level:1};else{var e=null;if(b)e=!0;else{var g=new d(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(g)&&(e=g)}this.locked={update:e,level:1}}},unlock:function(){if(this.locked&&!--this.locked.level){var a=this.locked.update;this.locked=null;if(!0===a)this.update();else if(a){var b=
new d(this.editor,!0);a.equalsContent(b)||this.update()}}},addFilterRule:function(a){this._filterRules.push(a)}};b.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1};b.keyGroups={PRINTABLE:0,FUNCTIONAL:1};b.isNavigationKey=function(a){return!!b.navigationKeyCodes[a]};b.getKeyGroup=function(a){var d=b.keyGroups;return e[a]?d.FUNCTIONAL:d.PRINTABLE};b.getOppositeKeyGroup=function(a){var d=b.keyGroups;return a==d.FUNCTIONAL?d.PRINTABLE:d.FUNCTIONAL};b.ieFunctionalKeysBug=function(a){return CKEDITOR.env.ie&&
b.getKeyGroup(a)==b.keyGroups.FUNCTIONAL};var d=CKEDITOR.plugins.undo.Image=function(b,d){this.editor=b;b.fire("beforeUndoImage");var e=b.getSnapshot();e&&(this.contents=a(e,b.undoManager._filterRules));d||(this.bookmarks=(e=e&&b.getSelection())&&e.createBookmarks2(!0));b.fire("afterUndoImage")},l=/\b(?:href|src|name)="[^"]*?"/gi;d.prototype={equalsContent:function(a){var b=this.contents;a=a.contents;CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(b=b.replace(l,""),a=a.replace(l,
""));return b!=a?!1:!0},equalsSelection:function(a){var b=this.bookmarks;a=a.bookmarks;if(b||a){if(!b||!a||b.length!=a.length)return!1;for(var d=0;d<b.length;d++){var e=b[d],g=a[d];if(e.startOffset!=g.startOffset||e.endOffset!=g.endOffset||!CKEDITOR.tools.arrayCompare(e.start,g.start)||!CKEDITOR.tools.arrayCompare(e.end,g.end))return!1}}return!0}};var g=CKEDITOR.plugins.undo.NativeEditingHandler=function(a){this.undoManager=a;this.ignoreInputEvent=!1;this.keyEventsStack=new m;this.lastKeydownImage=
null};g.prototype={onKeydown:function(a){var e=a.data.getKey();if(229!==e)if(-1<CKEDITOR.tools.indexOf(h,a.data.getKeystroke()))a.data.preventDefault();else if(this.keyEventsStack.cleanUp(a),a=this.undoManager,this.keyEventsStack.getLast(e)||this.keyEventsStack.push(e),this.lastKeydownImage=new d(a.editor),b.isNavigationKey(e)||this.undoManager.keyGroupChanged(e))if(a.strokesRecorded[0]||a.strokesRecorded[1])a.save(!1,this.lastKeydownImage,!1),a.resetType()},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=
!1;else{var a=this.keyEventsStack.getLast();a||(a=this.keyEventsStack.push(0));this.keyEventsStack.increment(a.keyCode);this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&(this.undoManager.type(a.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(a){var e=this.undoManager;a=a.data.getKey();var f=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(a);if(!(b.ieFunctionalKeysBug(a)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new d(e.editor,
!0))))if(0<f)e.type(a);else if(b.isNavigationKey(a))this.onNavigationKey(!0)},onNavigationKey:function(a){var b=this.undoManager;!a&&b.save(!0,null,!1)||b.updateSelection(new d(b.editor));b.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=!1},attachListeners:function(){var a=this.undoManager.editor,d=a.editable(),e=this;d.attachListener(d,"keydown",function(a){e.onKeydown(a);if(b.ieFunctionalKeysBug(a.data.getKey()))e.onInput()},
null,null,999);d.attachListener(d,CKEDITOR.env.ie?"keypress":"input",e.onInput,e,null,999);d.attachListener(d,"keyup",e.onKeyup,e,null,999);d.attachListener(d,"paste",e.ignoreInputEventListener,e,null,999);d.attachListener(d,"drop",e.ignoreInputEventListener,e,null,999);a.on("afterPaste",e.activateInputEventListener,e,null,999);d.attachListener(d.isInline()?d:a.document.getDocumentElement(),"click",function(){e.onNavigationKey()},null,null,999);d.attachListener(this.undoManager.editor,"blur",function(){e.keyEventsStack.remove(9)},
null,null,999)}};var m=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=[]};m.prototype={push:function(a){a=this.stack.push({keyCode:a,inputs:0});return this.stack[a-1]},getLastIndex:function(a){if("number"!=typeof a)return this.stack.length-1;for(var b=this.stack.length;b--;)if(this.stack[b].keyCode==a)return b;return-1},getLast:function(a){a=this.getLastIndex(a);return-1!=a?this.stack[a]:null},increment:function(a){this.getLast(a).inputs++},remove:function(a){a=this.getLastIndex(a);-1!=
a&&this.stack.splice(a,1)},resetInputs:function(a){if("number"==typeof a)this.getLast(a).inputs=0;else for(a=this.stack.length;a--;)this.stack[a].inputs=0},getTotalInputs:function(){for(var a=this.stack.length,b=0;a--;)b+=this.stack[a].inputs;return b},cleanUp:function(a){a=a.data.$;a.ctrlKey||a.metaKey||this.remove(17);a.shiftKey||this.remove(16);a.altKey||this.remove(18)}}}(),"use strict",function(){function a(a,b){CKEDITOR.tools.extend(this,{editor:a,editable:a.editable(),doc:a.document,win:a.window},
b,!0);this.inline=this.editable.isInline();this.inline||(this.frame=this.win.getFrame());this.target=this[this.inline?"editable":"doc"]}function h(a,b){CKEDITOR.tools.extend(this,b,{editor:a},!0)}function e(a,b){var e=a.editable();CKEDITOR.tools.extend(this,{editor:a,editable:e,inline:e.isInline(),doc:a.document,win:a.window,container:CKEDITOR.document.getBody(),winTop:CKEDITOR.document.getWindow()},b,!0);this.hidden={};this.visible={};this.inline||(this.frame=this.win.getFrame());this.queryViewport();
var g=CKEDITOR.tools.bind(this.queryViewport,this),h=CKEDITOR.tools.bind(this.hideVisible,this),m=CKEDITOR.tools.bind(this.removeAll,this);e.attachListener(this.winTop,"resize",g);e.attachListener(this.winTop,"scroll",g);e.attachListener(this.winTop,"resize",h);e.attachListener(this.win,"scroll",h);e.attachListener(this.inline?e:this.frame,"mouseout",function(a){var b=a.data.$.clientX;a=a.data.$.clientY;this.queryViewport();(b<=this.rect.left||b>=this.rect.right||a<=this.rect.top||a>=this.rect.bottom)&&
this.hideVisible();(0>=b||b>=this.winTopPane.width||0>=a||a>=this.winTopPane.height)&&this.hideVisible()},this);e.attachListener(a,"resize",g);e.attachListener(a,"mode",m);a.on("destroy",m);this.lineTpl=(new CKEDITOR.template('\x3cdiv data-cke-lineutils-line\x3d"1" class\x3d"cke_reset_all" style\x3d"{lineStyle}"\x3e\x3cspan style\x3d"{tipLeftStyle}"\x3e\x26nbsp;\x3c/span\x3e\x3cspan style\x3d"{tipRightStyle}"\x3e\x26nbsp;\x3c/span\x3e\x3c/div\x3e')).output({lineStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},
l,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},d,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},d,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function b(a){var b;if(b=a&&a.type==CKEDITOR.NODE_ELEMENT)b=!(g[a.getComputedStyle("float")]||g[a.getAttribute("align")]);return b&&
!m[a.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;a.prototype={start:function(a){var b=this,d=this.editor,e=this.doc,g,h,l,m,t=CKEDITOR.tools.eventsBuffer(50,function(){d.readOnly||"wysiwyg"!=d.mode||(b.relations={},(h=e.$.elementFromPoint(l,m))&&h.nodeType&&(g=new CKEDITOR.dom.element(h),b.traverseSearch(g),isNaN(l+m)||b.pixelSearch(g,l,m),a&&a(b.relations,l,m)))});this.listener=this.editable.attachListener(this.target,
"mousemove",function(a){l=a.data.$.clientX;m=a.data.$.clientY;t.input()});this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){t.reset()})},stop:function(){this.listener&&this.listener.removeListener()},getRange:function(){var a={};a[CKEDITOR.LINEUTILS_BEFORE]=CKEDITOR.POSITION_BEFORE_START;a[CKEDITOR.LINEUTILS_AFTER]=CKEDITOR.POSITION_AFTER_END;a[CKEDITOR.LINEUTILS_INSIDE]=CKEDITOR.POSITION_AFTER_START;return function(b){var d=this.editor.createRange();d.moveToPosition(this.relations[b.uid].element,
a[b.type]);return d}}(),store:function(){function a(b,c,d){var e=b.getUniqueId();e in d?d[e].type|=c:d[e]={element:b,type:c}}return function(d,e){var g;e&CKEDITOR.LINEUTILS_AFTER&&b(g=d.getNext())&&g.isVisible()&&(a(g,CKEDITOR.LINEUTILS_BEFORE,this.relations),e^=CKEDITOR.LINEUTILS_AFTER);e&CKEDITOR.LINEUTILS_INSIDE&&b(g=d.getFirst())&&g.isVisible()&&(a(g,CKEDITOR.LINEUTILS_BEFORE,this.relations),e^=CKEDITOR.LINEUTILS_INSIDE);a(d,e,this.relations)}}(),traverseSearch:function(a){var d,e,g;do if(g=a.$["data-cke-expando"],
!(g&&g in this.relations)){if(a.equals(this.editable))break;if(b(a))for(d in this.lookups)(e=this.lookups[d](a))&&this.store(a,e)}while((!a||a.type!=CKEDITOR.NODE_ELEMENT||"true"!=a.getAttribute("contenteditable"))&&(a=a.getParent()))},pixelSearch:function(){function a(c,e,g,h,l){for(var m=0,t;l(g);){g+=h;if(25==++m)break;if(t=this.doc.$.elementFromPoint(e,g))if(t==c)m=0;else if(d(c,t)&&(m=0,b(t=new CKEDITOR.dom.element(t))))return t}}var d=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,b){return a.contains(b)}:
function(a,b){return!!(a.compareDocumentPosition(b)&16)};return function(d,e,g){var h=this.win.getViewPaneSize().height,k=a.call(this,d.$,e,g,-1,function(a){return 0<a});e=a.call(this,d.$,e,g,1,function(a){return a<h});if(k)for(this.traverseSearch(k);!k.getParent().equals(d);)k=k.getParent();if(e)for(this.traverseSearch(e);!e.getParent().equals(d);)e=e.getParent();for(;k||e;){k&&(k=k.getNext(b));if(!k||k.equals(e))break;this.traverseSearch(k);e&&(e=e.getPrevious(b));if(!e||e.equals(k))break;this.traverseSearch(e)}}}(),
greedySearch:function(){this.relations={};for(var a=this.editable.getElementsByTag("*"),d=0,e,g,h;e=a.getItem(d++);)if(!e.equals(this.editable)&&e.type==CKEDITOR.NODE_ELEMENT&&(e.hasAttribute("contenteditable")||!e.isReadOnly())&&b(e)&&e.isVisible())for(h in this.lookups)(g=this.lookups[h](e))&&this.store(e,g);return this.relations}};h.prototype={locate:function(){function a(c,d){var e=c.element[d===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();return e&&b(e)?(c.siblingRect=e.getClientRect(),
d==CKEDITOR.LINEUTILS_BEFORE?(c.siblingRect.bottom+c.elementRect.top)/2:(c.elementRect.bottom+c.siblingRect.top)/2):d==CKEDITOR.LINEUTILS_BEFORE?c.elementRect.top:c.elementRect.bottom}return function(b){var d;this.locations={};for(var e in b)d=b[e],d.elementRect=d.element.getClientRect(),d.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(e,CKEDITOR.LINEUTILS_BEFORE,a(d,CKEDITOR.LINEUTILS_BEFORE)),d.type&CKEDITOR.LINEUTILS_AFTER&&this.store(e,CKEDITOR.LINEUTILS_AFTER,a(d,CKEDITOR.LINEUTILS_AFTER)),d.type&
CKEDITOR.LINEUTILS_INSIDE&&this.store(e,CKEDITOR.LINEUTILS_INSIDE,(d.elementRect.top+d.elementRect.bottom)/2);return this.locations}}(),sort:function(){var a,b,d,e;return function(g,h){a=this.locations;b=[];for(var l in a)for(var m in a[l])if(d=Math.abs(g-a[l][m]),b.length){for(e=0;e<b.length;e++)if(d<b[e].dist){b.splice(e,0,{uid:+l,type:m,dist:d});break}e==b.length&&b.push({uid:+l,type:m,dist:d})}else b.push({uid:+l,type:m,dist:d});return"undefined"!=typeof h?b.slice(0,h):b}}(),store:function(a,
b,d){this.locations[a]||(this.locations[a]={});this.locations[a][b]=d}};var d={display:"block",width:"0px",height:"0px","border-color":"transparent","border-style":"solid",position:"absolute",top:"-6px"},l={height:"0px","border-top":"1px dashed red",position:"absolute","z-index":9999};e.prototype={removeAll:function(){for(var a in this.hidden)this.hidden[a].remove(),delete this.hidden[a];for(a in this.visible)this.visible[a].remove(),delete this.visible[a]},hideLine:function(a){var b=a.getUniqueId();
a.hide();this.hidden[b]=a;delete this.visible[b]},showLine:function(a){var b=a.getUniqueId();a.show();this.visible[b]=a;delete this.hidden[b]},hideVisible:function(){for(var a in this.visible)this.hideLine(this.visible[a])},placeLine:function(a,b){var d,e,g;if(d=this.getStyle(a.uid,a.type)){for(g in this.visible)if(this.visible[g].getCustomData("hash")!==this.hash){e=this.visible[g];break}if(!e)for(g in this.hidden)if(this.hidden[g].getCustomData("hash")!==this.hash){this.showLine(e=this.hidden[g]);
break}e||this.showLine(e=this.addLine());e.setCustomData("hash",this.hash);this.visible[e.getUniqueId()]=e;e.setStyles(d);b&&b(e)}},getStyle:function(a,b){var d=this.relations[a],e=this.locations[a][b],g={};g.width=d.siblingRect?Math.max(d.siblingRect.width,d.elementRect.width):d.elementRect.width;g.top=this.inline?e+this.winTopScroll.y-this.rect.relativeY:this.rect.top+this.winTopScroll.y+e;if(g.top-this.winTopScroll.y<this.rect.top||g.top-this.winTopScroll.y>this.rect.bottom)return!1;this.inline?
g.left=d.elementRect.left-this.rect.relativeX:(0<d.elementRect.left?g.left=this.rect.left+d.elementRect.left:(g.width+=d.elementRect.left,g.left=this.rect.left),0<(d=g.left+g.width-(this.rect.left+this.winPane.width))&&(g.width-=d));g.left+=this.winTopScroll.x;for(var h in g)g[h]=CKEDITOR.tools.cssLength(g[h]);return g},addLine:function(){var a=CKEDITOR.dom.element.createFromHtml(this.lineTpl);a.appendTo(this.container);return a},prepare:function(a,b){this.relations=a;this.locations=b;this.hash=Math.random()},
cleanup:function(){var a,b;for(b in this.visible)a=this.visible[b],a.getCustomData("hash")!==this.hash&&this.hideLine(a)},queryViewport:function(){this.winPane=this.win.getViewPaneSize();this.winTopScroll=this.winTop.getScrollPosition();this.winTopPane=this.winTop.getViewPaneSize();this.rect=this.getClientRect(this.inline?this.editable:this.frame)},getClientRect:function(a){a=a.getClientRect();var b=this.container.getDocumentPosition(),d=this.container.getComputedStyle("position");a.relativeX=a.relativeY=
0;"static"!=d&&(a.relativeY=b.y,a.relativeX=b.x,a.top-=a.relativeY,a.bottom-=a.relativeY,a.left-=a.relativeX,a.right-=a.relativeX);return a}};var g={left:1,right:1,center:1},m={absolute:1,fixed:1};CKEDITOR.plugins.lineutils={finder:a,locator:h,liner:e}}(),function(){function a(a){return a.getName&&!a.hasAttribute("data-cke-temp")}CKEDITOR.plugins.add("widgetselection",{init:function(a){if(CKEDITOR.env.webkit){var e=CKEDITOR.plugins.widgetselection;a.on("contentDom",function(a){a=a.editor;var d=a.editable();
d.attachListener(d,"keydown",function(a){a.data.getKeystroke()==CKEDITOR.CTRL+65&&CKEDITOR.tools.setTimeout(function(){e.addFillers(d)||e.removeFillers(d)},0)},null,null,-1);a.on("selectionCheck",function(a){e.removeFillers(a.editor.editable())});a.on("paste",function(a){a.data.dataValue=e.cleanPasteData(a.data.dataValue)});"selectall"in a.plugins&&e.addSelectAllIntegration(a)})}}});CKEDITOR.plugins.widgetselection={startFiller:null,endFiller:null,fillerAttribute:"data-cke-filler-webkit",fillerContent:"\x26nbsp;",
fillerTagName:"div",addFillers:function(h){var e=h.editor;if(!this.isWholeContentSelected(h)&&0<h.getChildCount()){var b=h.getFirst(a),d=h.getLast(a);b&&b.type==CKEDITOR.NODE_ELEMENT&&!b.isEditable()&&(this.startFiller=this.createFiller(),h.append(this.startFiller,1));d&&d.type==CKEDITOR.NODE_ELEMENT&&!d.isEditable()&&(this.endFiller=this.createFiller(!0),h.append(this.endFiller,0));if(this.hasFiller(h))return e=e.createRange(),e.selectNodeContents(h),e.select(),!0}return!1},removeFillers:function(a){if(this.hasFiller(a)&&
!this.isWholeContentSelected(a)){var e=a.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dstart]"),b=a.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dend]");this.startFiller&&e&&this.startFiller.equals(e)?this.removeFiller(this.startFiller,a):this.startFiller=e;this.endFiller&&b&&this.endFiller.equals(b)?this.removeFiller(this.endFiller,a):this.endFiller=b}},cleanPasteData:function(a){a&&a.length&&(a=a.replace(this.createFillerRegex(),"").replace(this.createFillerRegex(!0),""));
return a},isWholeContentSelected:function(a){var e=a.editor.getSelection().getRanges()[0];return!e||e&&e.collapsed?!1:(e=e.clone(),e.enlarge(CKEDITOR.ENLARGE_ELEMENT),!!(e&&a&&e.startContainer&&e.endContainer&&0===e.startOffset&&e.endOffset===a.getChildCount()&&e.startContainer.equals(a)&&e.endContainer.equals(a)))},hasFiller:function(a){return 0<a.find(this.fillerTagName+"["+this.fillerAttribute+"]").count()},createFiller:function(a){var e=new CKEDITOR.dom.element(this.fillerTagName);e.setHtml(this.fillerContent);
e.setAttribute(this.fillerAttribute,a?"end":"start");e.setAttribute("data-cke-temp",1);e.setStyles({display:"block",width:0,height:0,padding:0,border:0,margin:0,position:"absolute",top:0,left:"-9999px",opacity:0,overflow:"hidden"});return e},removeFiller:function(a,e){if(a){var b=e.editor,d=e.editor.getSelection().getRanges()[0].startPath(),l=b.createRange(),g,m;d.contains(a)&&(g=a.getHtml(),m=!0);d="start"==a.getAttribute(this.fillerAttribute);a.remove();g&&0<g.length&&g!=this.fillerContent?(e.insertHtmlIntoRange(g,
b.getSelection().getRanges()[0]),l.setStartAt(e.getChild(e.getChildCount()-1),CKEDITOR.POSITION_BEFORE_END),b.getSelection().selectRanges([l])):m&&(d?l.setStartAt(e.getFirst().getNext(),CKEDITOR.POSITION_AFTER_START):l.setEndAt(e.getLast().getPrevious(),CKEDITOR.POSITION_BEFORE_END),e.editor.getSelection().selectRanges([l]))}},createFillerRegex:function(a){var e=this.createFiller(a).getOuterHtml().replace(/style="[^"]*"/gi,'style\x3d"[^"]*"').replace(/>[^<]*</gi,"\x3e[^\x3c]*\x3c");return new RegExp((a?
"":"^")+e+(a?"$":""))},addSelectAllIntegration:function(a){var e=this;a.editable().attachListener(a,"beforeCommandExec",function(b){var d=a.editable();"selectAll"==b.data.name&&d&&e.addFillers(d)},null,null,9999)}}}(),"use strict",function(){function a(a){this.editor=a;this.registered={};this.instances={};this.selected=[];this.widgetHoldingFocusedEditable=this.focused=null;this._={nextId:0,upcasts:[],upcastCallbacks:[],filters:{}};C(this);D(this);this.on("checkWidgets",g);this.editor.on("contentDomInvalidated",
this.checkWidgets,this);B(this);y(this);x(this);A(this);w(this)}function h(a,b,c,d,e){var g=a.editor;CKEDITOR.tools.extend(this,d,{editor:g,id:b,inline:"span"==c.getParent().getName(),element:c,data:CKEDITOR.tools.extend({},"function"==typeof d.defaults?d.defaults():d.defaults),dataReady:!1,inited:!1,ready:!1,edit:h.prototype.edit,focusedEditable:null,definition:d,repository:a,draggable:!1!==d.draggable,_:{downcastFn:d.downcast&&"string"==typeof d.downcast?d.downcasts[d.downcast]:d.downcast}},!0);
a.fire("instanceCreated",this);O(this,d);this.init&&this.init();this.inited=!0;(a=this.element.data("cke-widget-data"))&&this.setData(JSON.parse(decodeURIComponent(a)));e&&this.setData(e);this.data.classes||this.setData("classes",this.getClasses());this.dataReady=!0;Z(this);this.fire("data",this.data);this.isInited()&&g.editable().contains(this.wrapper)&&(this.ready=!0,this.fire("ready"))}function e(a,b,c){CKEDITOR.dom.element.call(this,b.$);this.editor=a;this._={};b=this.filter=c.filter;CKEDITOR.dtd[this.getName()].p?
(this.enterMode=b?b.getAllowedEnterMode(a.enterMode):a.enterMode,this.shiftEnterMode=b?b.getAllowedEnterMode(a.shiftEnterMode,!0):a.shiftEnterMode):this.enterMode=this.shiftEnterMode=CKEDITOR.ENTER_BR}function b(a,b){a.addCommand(b.name,{exec:function(a,c){function d(){a.widgets.finalizeCreation(h)}var e=a.widgets.focused;if(e&&e.name==b.name)e.edit();else if(b.insert)b.insert({editor:a,commandData:c});else if(b.template){var e="function"==typeof b.defaults?b.defaults():b.defaults,e=CKEDITOR.tools.object.merge(e||
{},c&&c.startupData||{}),e=CKEDITOR.dom.element.createFromHtml(b.template.output(e),a.document),g,f=a.widgets.wrapElement(e,b.name),h=new CKEDITOR.dom.documentFragment(f.getDocument());h.append(f);(g=a.widgets.initOn(e,b,c&&c.startupData))?(e=g.once("edit",function(b){if(b.data.dialog)g.once("dialog",function(b){b=b.data;var c,e;c=b.once("ok",d,null,null,20);e=b.once("cancel",function(b){b.data&&!1===b.data.hide||a.widgets.destroy(g,!0)});b.once("hide",function(){c.removeListener();e.removeListener()})});
else d()},null,null,999),g.edit(),e.removeListener()):d()}},allowedContent:b.allowedContent,requiredContent:b.requiredContent,contentForms:b.contentForms,contentTransformations:b.contentTransformations})}function d(a,b){function c(a,d){var e=b.upcast.split(","),g,f;for(f=0;f<e.length;f++)if(g=e[f],g===a.name)return b.upcasts[g].call(this,a,d);return!1}function d(b,c,e){var g=CKEDITOR.tools.getIndex(a._.upcasts,function(a){return a[2]>e});0>g&&(g=a._.upcasts.length);a._.upcasts.splice(g,0,[CKEDITOR.tools.bind(b,
c),c.name,e])}var e=b.upcast,g=b.upcastPriority||10;e&&("string"==typeof e?d(c,b,g):d(e,b,g))}function l(a,b){a.focused=null;if(b.isInited()){var c=b.editor.checkDirty();a.fire("widgetBlurred",{widget:b});b.setFocused(!1);!c&&b.editor.resetDirty()}}function g(a){a=a.data;if("wysiwyg"==this.editor.mode){var b=this.editor.editable(),c=this.instances,d,e,g,f;if(b){for(d in c)c[d].isReady()&&!b.contains(c[d].wrapper)&&this.destroy(c[d],!0);if(a&&a.initOnlyNew)c=this.initOnAll();else{var k=b.find(".cke_widget_wrapper"),
c=[];d=0;for(e=k.count();d<e;d++){g=k.getItem(d);if(f=!this.getByElement(g,!0)){a:{f=q;for(var l=g;l=l.getParent();)if(f(l)){f=!0;break a}f=!1}f=!f}f&&b.contains(g)&&(g.addClass("cke_widget_new"),c.push(this.initOn(g.getFirst(h.isDomWidgetElement))))}}a&&a.focusInited&&1==c.length&&c[0].focus()}}}function m(a){if("undefined"!=typeof a.attributes&&a.attributes["data-widget"]){var b=c(a),d=k(a),e=!1;b&&b.value&&b.value.match(/^\s/g)&&(b.parent.attributes["data-cke-white-space-first"]=1,b.value=b.value.replace(/^\s/g,
"\x26nbsp;"),e=!0);d&&d.value&&d.value.match(/\s$/g)&&(d.parent.attributes["data-cke-white-space-last"]=1,d.value=d.value.replace(/\s$/g,"\x26nbsp;"),e=!0);e&&(a.attributes["data-cke-widget-white-space"]=1)}}function c(a){return a.find(function(a){return 3===a.type},!0).shift()}function k(a){return a.find(function(a){return 3===a.type},!0).pop()}function f(a,b,c){if(!c.allowedContent&&!c.disallowedContent)return null;var d=this._.filters[a];d||(this._.filters[a]=d={});a=d[b];a||(a=c.allowedContent?
new CKEDITOR.filter(c.allowedContent):this.editor.filter.clone(),d[b]=a,c.disallowedContent&&a.disallow(c.disallowedContent));return a}function n(a){var b=[],c=a._.upcasts,d=a._.upcastCallbacks;return{toBeWrapped:b,iterator:function(a){var e,g,f,k,l;if("data-cke-widget-wrapper"in a.attributes)return(a=a.getFirst(h.isParserWidgetElement))&&b.push([a]),!1;if("data-widget"in a.attributes)return b.push([a]),!1;if(l=c.length){if(a.attributes["data-cke-widget-upcasted"])return!1;k=0;for(e=d.length;k<e;++k)if(!1===
d[k](a))return;for(k=0;k<l;++k)if(e=c[k],f={},g=e[0](a,f))return g instanceof CKEDITOR.htmlParser.element&&(a=g),a.attributes["data-cke-widget-data"]=encodeURIComponent(JSON.stringify(f)),a.attributes["data-cke-widget-upcasted"]=1,b.push([a,e[1]]),!1}}}}function r(a,b){return{tabindex:-1,contenteditable:"false","data-cke-widget-wrapper":1,"data-cke-filter":"off","class":"cke_widget_wrapper cke_widget_new cke_widget_"+(a?"inline":"block")+(b?" cke_widget_"+b:"")}}function v(a,b,c){if(a.type==CKEDITOR.NODE_ELEMENT){var d=
CKEDITOR.dtd[a.name];if(d&&!d[c.name]){var d=a.split(b),e=a.parent;b=d.getIndex();a.children.length||(--b,a.remove());d.children.length||d.remove();return v(e,b,c)}}a.add(c,b)}function u(a,b){return"boolean"==typeof a.inline?a.inline:!!CKEDITOR.dtd.$inline[b]}function q(a){return a.hasAttribute("data-cke-temp")}function t(a,b,c,d){var e=a.editor;e.fire("lockSnapshot");c?(d=c.data("cke-widget-editable"),d=b.editables[d],a.widgetHoldingFocusedEditable=b,b.focusedEditable=d,c.addClass("cke_widget_editable_focused"),
d.filter&&e.setActiveFilter(d.filter),e.setActiveEnterMode(d.enterMode,d.shiftEnterMode)):(d||b.focusedEditable.removeClass("cke_widget_editable_focused"),b.focusedEditable=null,a.widgetHoldingFocusedEditable=null,e.setActiveFilter(null),e.setActiveEnterMode(null,null));e.fire("unlockSnapshot")}function z(a){a.contextMenu&&a.contextMenu.addListener(function(b){if(b=a.widgets.getByElement(b,!0))return b.fire("contextMenu",{})})}function p(a,b){return CKEDITOR.tools.trim(b)}function A(a){var b=a.editor,
c=CKEDITOR.plugins.lineutils;b.on("dragstart",function(c){var d=c.data.target;h.isDomDragHandler(d)&&(d=a.getByElement(d),c.data.dataTransfer.setData("cke/widget-id",d.id),b.focus(),d.focus())});b.on("drop",function(c){function d(a,b){return a&&b?a.wrapper.equals(b.wrapper)||a.wrapper.contains(b.wrapper):!1}var e=c.data.dataTransfer,g=e.getData("cke/widget-id"),f=e.getTransferType(b),e=b.createRange(),h=function(a){a=a.getBoundaryNodes().startNode;a.type!==CKEDITOR.NODE_ELEMENT&&(a=a.getParent());
return b.widgets.getByElement(a)}(c.data.dropRange);if(""!==g&&f===CKEDITOR.DATA_TRANSFER_CROSS_EDITORS)c.cancel();else if(f==CKEDITOR.DATA_TRANSFER_INTERNAL)if(""===g&&0<b.widgets.selected.length)c.data.dataTransfer.setData("text/html",M(b));else if(g=a.instances[g])d(g,h)?c.cancel():(e.setStartBefore(g.wrapper),e.setEndAfter(g.wrapper),c.data.dragRange=e,delete CKEDITOR.plugins.clipboard.dragStartContainerChildCount,delete CKEDITOR.plugins.clipboard.dragEndContainerChildCount,c.data.dataTransfer.setData("text/html",
g.getClipboardHtml()),b.widgets.destroy(g,!0))});b.on("contentDom",function(){var d=b.editable();CKEDITOR.tools.extend(a,{finder:new c.finder(b,{lookups:{"default":function(b){if(!b.is(CKEDITOR.dtd.$listItem)&&b.is(CKEDITOR.dtd.$block)&&!h.isDomNestedEditable(b)&&!a._.draggedWidget.wrapper.contains(b)){var c=h.getNestedEditable(d,b);if(c){b=a._.draggedWidget;if(a.getByElement(c)==b)return;c=CKEDITOR.filter.instances[c.data("cke-filter")];b=b.requiredContent;if(c&&b&&!c.check(b))return}return CKEDITOR.LINEUTILS_BEFORE|
CKEDITOR.LINEUTILS_AFTER}}}}),locator:new c.locator(b),liner:new c.liner(b,{lineStyle:{cursor:"move !important","border-top-color":"#666"},tipLeftStyle:{"border-left-color":"#666"},tipRightStyle:{"border-right-color":"#666"}})},!0)})}function y(a){var b=a.editor;b.on("contentDom",function(){var c=b.editable(),d=c.isInline()?c:b.document,e,g;c.attachListener(d,"mousedown",function(c){var d=c.data.getTarget();e=d instanceof CKEDITOR.dom.element?a.getByElement(d):null;g=0;e&&(e.inline&&d.type==CKEDITOR.NODE_ELEMENT&&
d.hasAttribute("data-cke-widget-drag-handler")?(g=1,a.focused!=e&&b.getSelection().removeAllRanges()):h.getNestedEditable(e.wrapper,d)?e=null:(c.data.preventDefault(),CKEDITOR.env.ie||e.focus()))});c.attachListener(d,"mouseup",function(){g&&e&&e.wrapper&&(g=0,e.focus())});CKEDITOR.env.ie&&c.attachListener(d,"mouseup",function(){setTimeout(function(){e&&e.wrapper&&c.contains(e.wrapper)&&(e.focus(),e=null)})})});b.on("doubleclick",function(b){var c=a.getByElement(b.data.element);if(c&&!h.getNestedEditable(c.wrapper,
b.data.element))return c.fire("doubleclick",{element:b.data.element})},null,null,1)}function x(a){a.editor.on("key",function(b){var c=a.focused,d=a.widgetHoldingFocusedEditable,e;c?e=c.fire("key",{keyCode:b.data.keyCode}):d&&(c=b.data.keyCode,b=d.focusedEditable,c==CKEDITOR.CTRL+65?(c=b.getBogus(),d=d.editor.createRange(),d.selectNodeContents(b),c&&d.setEndAt(c,CKEDITOR.POSITION_BEFORE_START),d.select(),e=!1):8==c||46==c?(e=d.editor.getSelection().getRanges(),d=e[0],e=!(1==e.length&&d.collapsed&&
d.checkBoundaryOfElement(b,CKEDITOR[8==c?"START":"END"]))):e=void 0);return e},null,null,1)}function w(a){function b(d){1>a.selected.length||J(c,"cut"===d.name)}var c=a.editor;c.on("contentDom",function(){var a=c.editable();a.attachListener(a,"copy",b);a.attachListener(a,"cut",b)})}function B(a){function b(){var a=e.getSelection();if(a&&(a=a.getRanges()[0])&&!a.collapsed){var d=c(a.startContainer),g=c(a.endContainer);!d&&g?(a.setEndBefore(g.wrapper),a.select()):d&&!g&&(a.setStartAfter(d.wrapper),
a.select())}}function c(a){return a?a.type==CKEDITOR.NODE_TEXT?c(a.getParent()):e.widgets.getByElement(a):null}function d(){a.fire("checkSelection")}var e=a.editor;e.on("selectionCheck",d);e.on("contentDom",function(){e.editable().attachListener(e,"key",function(){setTimeout(d,10)})});if(!CKEDITOR.env.ie)a.on("checkSelection",b);a.on("checkSelection",a.checkSelection,a);e.on("selectionChange",function(b){var c=(b=h.getNestedEditable(e.editable(),b.data.selection.getStartElement()))&&a.getByElement(b),
d=a.widgetHoldingFocusedEditable;d?d===c&&d.focusedEditable.equals(b)||(t(a,d,null),c&&b&&t(a,c,b)):c&&b&&t(a,c,b)});e.on("dataReady",function(){H(a).commit()});e.on("blur",function(){var b;(b=a.focused)&&l(a,b);(b=a.widgetHoldingFocusedEditable)&&t(a,b,null)})}function D(a){var b=a.editor,d={};b.on("toDataFormat",function(b){var e=CKEDITOR.tools.getNextNumber(),g=[];b.data.downcastingSessionId=e;d[e]=g;b.data.dataValue.forEach(function(b){var d=b.attributes,e;if("data-cke-widget-white-space"in d){e=
c(b);var f=k(b);e.parent.attributes["data-cke-white-space-first"]&&(e.value=e.value.replace(/^&nbsp;/g," "));f.parent.attributes["data-cke-white-space-last"]&&(f.value=f.value.replace(/&nbsp;$/g," "))}if("data-cke-widget-id"in d){if(d=a.instances[d["data-cke-widget-id"]])e=b.getFirst(h.isParserWidgetElement),g.push({wrapper:b,element:e,widget:d,editables:{}}),e&&"1"!=e.attributes["data-cke-widget-keep-attr"]&&delete e.attributes["data-widget"]}else if("data-cke-widget-editable"in d)return 0<g.length&&
(g[g.length-1].editables[d["data-cke-widget-editable"]]=b),!1},CKEDITOR.NODE_ELEMENT,!0)},null,null,8);b.on("toDataFormat",function(a){if(a.data.downcastingSessionId)for(var b=d[a.data.downcastingSessionId],c,e,g,f,h,k;c=b.shift();){e=c.widget;g=c.element;f=e._.downcastFn&&e._.downcastFn.call(e,g);a.data.widgetsCopy&&e.getClipboardHtml&&(f=CKEDITOR.htmlParser.fragment.fromHtml(e.getClipboardHtml()),f=f.children[0]);for(k in c.editables)h=c.editables[k],delete h.attributes.contenteditable,h.setHtml(e.editables[k].getData());
f||(f=g);f?c.wrapper.replaceWith(f):c.wrapper.remove()}},null,null,13);b.on("contentDomUnload",function(){a.destroyAll(!0)})}function C(a){var b=a.editor,c,d;b.on("toHtml",function(b){var d=n(a),e;for(b.data.dataValue.forEach(d.iterator,CKEDITOR.NODE_ELEMENT,!0);e=d.toBeWrapped.pop();){var g=e[0],f=g.parent;f.type==CKEDITOR.NODE_ELEMENT&&f.attributes["data-cke-widget-wrapper"]&&f.replaceWith(g);a.wrapElement(e[0],e[1])}c=b.data.protectedWhitespaces?3==b.data.dataValue.children.length&&h.isParserWidgetWrapper(b.data.dataValue.children[1]):
1==b.data.dataValue.children.length&&h.isParserWidgetWrapper(b.data.dataValue.children[0])},null,null,8);b.on("dataReady",function(){if(d)for(var c=b.editable().find(".cke_widget_wrapper"),e,g,f=0,k=c.count();f<k;++f)e=c.getItem(f),g=e.getFirst(h.isDomWidgetElement),g.type==CKEDITOR.NODE_ELEMENT&&g.data("widget")?(g.replace(e),a.wrapElement(g)):e.remove();d=0;a.destroyAll(!0);a.initOnAll()});b.on("loadSnapshot",function(b){/data-cke-widget/.test(b.data)&&(d=1);a.destroyAll(!0)},null,null,9);b.on("paste",
function(a){a=a.data;a.dataValue=a.dataValue.replace(ca,p);a.range&&(a=h.getNestedEditable(b.editable(),a.range.startContainer))&&(a=CKEDITOR.filter.instances[a.data("cke-filter")])&&b.setActiveFilter(a)});b.on("afterInsertHtml",function(d){d.data.intoRange?a.checkWidgets({initOnlyNew:!0}):(b.fire("lockSnapshot"),a.checkWidgets({initOnlyNew:!0,focusInited:c}),b.fire("unlockSnapshot"))})}function H(a){var b=a.selected,c=[],d=b.slice(0),e=null;return{select:function(a){0>CKEDITOR.tools.indexOf(b,a)&&
c.push(a);a=CKEDITOR.tools.indexOf(d,a);0<=a&&d.splice(a,1);return this},focus:function(a){e=a;return this},commit:function(){var g=a.focused!==e,f,h;a.editor.fire("lockSnapshot");for(g&&(f=a.focused)&&l(a,f);f=d.pop();)b.splice(CKEDITOR.tools.indexOf(b,f),1),f.isInited()&&(h=f.editor.checkDirty(),f.setSelected(!1),!h&&f.editor.resetDirty());g&&e&&(h=a.editor.checkDirty(),a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!h&&a.editor.resetDirty());for(;f=c.pop();)b.push(f),f.setSelected(!0);
a.editor.fire("unlockSnapshot")}}}function F(a){a&&a.addFilterRule(function(a){return a.replace(/\s*cke_widget_selected/g,"").replace(/\s*cke_widget_focused/g,"")})}function L(a,b,c){var d=0;b=E(b);var e=a.data.classes||{},g;if(b){for(e=CKEDITOR.tools.clone(e);g=b.pop();)c?e[g]||(d=e[g]=1):e[g]&&(delete e[g],d=1);d&&a.setData("classes",e)}}function G(a){a.cancel()}function N(a,b){var c=function(a){return a==CKEDITOR.ENTER_BR?"br":a==CKEDITOR.ENTER_DIV?"div":"p"}(a.editor.config.enterMode),d=new CKEDITOR.dom.element(c);
"br"!==c&&d.appendBogus();"after"===b?d.insertAfter(a.wrapper):d.insertBefore(a.wrapper);(function(b){var c=a.editor.createRange();c.setStart(b,0);a.editor.getSelection().selectRanges([c])})(d)}function J(a,b){var c=a.widgets.focused,d,e,g;Q.hasCopyBin(a)||(e=new Q(a,{beforeDestroy:function(){!b&&c&&c.focus();g&&a.getSelection().selectBookmarks(g);d&&CKEDITOR.plugins.widgetselection.addFillers(a.editable())},afterDestroy:function(){b&&!a.readOnly&&(c?a.widgets.del(c):a.extractSelectedHtml(),a.fire("saveSnapshot"))}}),
c||(d=CKEDITOR.env.webkit&&CKEDITOR.plugins.widgetselection.isWholeContentSelected(a.editable()),g=a.getSelection().createBookmarks(!0)),e.handle(M(a)))}function E(a){return(a=(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function P(){var a=CKEDITOR.document.getActive(),b=this.editor,c=b.editable();(c.isInline()?c:b.document.getWindow().getFrame()).equals(a)&&b.focusManager.focus(c)}function I(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),
this.editor.selectionChange(1))}function M(a){var b=a.getSelectedHtml(!0);if(a.widgets.focused)return a.widgets.focused.getClipboardHtml();a.once("toDataFormat",function(a){a.data.widgetsCopy=!0},null,null,-1);return a.dataProcessor.toDataFormat(b)}function O(a,b){var c=a.editor.config.widget_keystrokeInsertLineBefore,d=a.editor.config.widget_keystrokeInsertLineAfter;X(a);S(a);Y(a);da(a);ia(a);ja(a);T(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart",function(b){var c=b.data.getTarget();
h.getNestedEditable(a,c)||a.inline&&h.isDomDragHandler(c)||b.data.preventDefault()});a.wrapper.removeClass("cke_widget_new");a.element.addClass("cke_widget_element");a.on("key",function(b){b=b.data.keyCode;if(b==c)N(a,"before"),a.editor.fire("saveSnapshot");else if(b==d)N(a,"after"),a.editor.fire("saveSnapshot");else if(13==b)a.edit();else{if(b==CKEDITOR.CTRL+67||b==CKEDITOR.CTRL+88){J(a.editor,b==CKEDITOR.CTRL+88);return}if(b in V||CKEDITOR.CTRL&b||CKEDITOR.ALT&b)return}return!1},null,null,999);
a.on("doubleclick",function(b){a.edit()&&b.cancel()});if(b.data)a.on("data",b.data);if(b.edit)a.on("edit",b.edit)}function X(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id",a.id)}function S(a,b){a.partSelectors||(a.partSelectors=a.parts);if(a.parts){var c={},d,e;for(e in a.partSelectors)b||!a.parts[e]||"string"==typeof a.parts[e]?(d=a.wrapper.findOne(a.partSelectors[e]),c[e]=d):c[e]=a.parts[e];a.parts=c}}function Y(a){var b=a.editables,c,d;a.editables={};if(a.editables)for(c in b)d=
b[c],a.initEditable(c,"string"==typeof d?{selector:d}:d)}function da(a){if(!0===a.mask)U(a);else if(a.mask){var b=new CKEDITOR.tools.buffers.throttle(250,ha,a),c=CKEDITOR.env.gecko?300:0,d,e;a.on("focus",function(){b.input();d=a.editor.on("change",b.input);e=a.on("blur",function(){d.removeListener();e.removeListener()})});a.editor.on("instanceReady",function(){setTimeout(function(){b.input()},c)});a.editor.on("mode",function(){setTimeout(function(){b.input()},c)});if(CKEDITOR.env.gecko){var g=a.element.find("img");
CKEDITOR.tools.array.forEach(g.toArray(),function(a){a.on("load",function(){b.input()})})}for(var f in a.editables)a.editables[f].on("focus",function(){a.editor.on("change",b.input);e&&e.removeListener()}),a.editables[f].on("blur",function(){a.editor.removeListener("change",b.input)});b.input()}}function U(a){var b=a.wrapper.findOne(".cke_widget_mask");b||(b=new CKEDITOR.dom.element("img",a.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_mask"}),
a.wrapper.append(b));a.mask=b}function ha(){if(this.wrapper){this.maskPart=this.maskPart||this.mask;var a=this.parts[this.maskPart],b;if(a&&"string"!=typeof a){b=this.wrapper.findOne(".cke_widget_partial_mask");b||(b=new CKEDITOR.dom.element("img",this.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_partial_mask"}),this.wrapper.append(b));this.mask=b;var c=b.$,d=a.$,e=!(c.offsetTop==d.offsetTop&&c.offsetLeft==d.offsetLeft);if(c.offsetWidth!=
d.offsetWidth||c.offsetHeight!=d.offsetHeight||e)c=a.getParent(),d=CKEDITOR.plugins.widget.isDomWidget(c),b.setStyles({top:a.$.offsetTop+(d?0:c.$.offsetTop)+"px",left:a.$.offsetLeft+(d?0:c.$.offsetLeft)+"px",width:a.$.offsetWidth+"px",height:a.$.offsetHeight+"px"})}}}function ia(a){if(a.draggable){var b=a.editor,c=a.wrapper.getLast(h.isDomDragHandlerContainer),d;c?d=c.findOne("img"):(c=new CKEDITOR.dom.element("span",b.document),c.setAttributes({"class":"cke_reset cke_widget_drag_handler_container",
style:"background:rgba(220,220,220,0.5);background-image:url("+b.plugins.widget.path+"images/handle.png);display:none;"}),d=new CKEDITOR.dom.element("img",b.document),d.setAttributes({"class":"cke_reset cke_widget_drag_handler","data-cke-widget-drag-handler":"1",src:CKEDITOR.tools.transparentImageData,width:15,title:b.lang.widget.move,height:15,role:"presentation"}),a.inline&&d.setAttribute("draggable","true"),c.append(d),a.wrapper.append(c));a.wrapper.on("dragover",function(a){a.data.preventDefault()});
a.wrapper.on("mouseenter",a.updateDragHandlerPosition,a);setTimeout(function(){a.on("data",a.updateDragHandlerPosition,a)},50);if(!a.inline&&(d.on("mousedown",fa,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))d.on("dragstart",function(a){a.data.preventDefault(!0)});a.dragHandlerContainer=c}}function fa(a){function b(){var c;for(p.reset();c=h.pop();)c.removeListener();var d=k;c=a.sender;var e=this.repository.finder,g=this.repository.liner,f=this.editor,l=this.editor.editable();CKEDITOR.tools.isEmpty(g.visible)||
(d=e.getRange(d[0]),this.focus(),f.fire("drop",{dropRange:d,target:d.startContainer}));l.removeClass("cke_widget_dragging");g.hideVisible();f.fire("dragend",{target:c})}if(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT){var c=this.repository.finder,d=this.repository.locator,e=this.repository.liner,g=this.editor,f=g.editable(),h=[],k=[],l,m;this.repository._.draggedWidget=this;var n=c.greedySearch(),p=CKEDITOR.tools.eventsBuffer(50,function(){l=d.locate(n);k=d.sort(m,1);k.length&&(e.prepare(n,
l),e.placeLine(k[0]),e.cleanup())});f.addClass("cke_widget_dragging");h.push(f.on("mousemove",function(a){m=a.data.$.clientY;p.input()}));g.fire("dragstart",{target:a.sender});h.push(g.document.once("mouseup",b,this));f.isInline()||h.push(CKEDITOR.document.once("mouseup",b,this))}}function ja(a){var b=null;a.on("data",function(){var a=this.data.classes,c;if(b!=a){for(c in b)a&&a[c]||this.removeClass(c);for(c in a)this.addClass(c);b=a}})}function T(a){a.on("data",function(){if(a.wrapper){var b=this.getLabel?
this.getLabel():this.editor.lang.widget.label.replace(/%1/,this.pathName||this.element.getName());a.wrapper.setAttribute("role","region");a.wrapper.setAttribute("aria-label",b)}},null,null,9999)}function Z(a){a.element.data("cke-widget-data",encodeURIComponent(JSON.stringify(a.data)))}function aa(){function a(){}function b(a,c,d){return d&&this.checkElement(a)?(a=d.widgets.getByElement(a,!0))&&a.checkStyleActive(this):!1}function c(a){function b(a,c,d){for(var e=a.length,g=0;g<e;){if(c.call(d,a[g],
g,a))return a[g];g++}}function e(a){function b(a,c){var d=CKEDITOR.tools.object.keys(a),e=CKEDITOR.tools.object.keys(c);if(d.length!==e.length)return!1;for(var g in a)if(("object"!==typeof a[g]||"object"!==typeof c[g]||!b(a[g],c[g]))&&a[g]!==c[g])return!1;return!0}return function(c){return b(a.getDefinition(),c.getDefinition())}}var g=a.widget,f;d[g]||(d[g]={});for(var h=0,k=a.group.length;h<k;h++)f=a.group[h],d[g][f]||(d[g][f]=[]),f=d[g][f],b(f,e(a))||f.push(a)}var d={};CKEDITOR.style.addCustomHandler({type:"widget",
setup:function(a){this.widget=a.widget;(this.group="string"==typeof a.group?[a.group]:a.group)&&c(this)},apply:function(a){var b;a instanceof CKEDITOR.editor&&this.checkApplicable(a.elementPath(),a)&&(b=a.widgets.focused,this.group&&this.removeStylesFromSameGroup(a),b.applyStyle(this))},remove:function(a){a instanceof CKEDITOR.editor&&this.checkApplicable(a.elementPath(),a)&&a.widgets.focused.removeStyle(this)},removeStylesFromSameGroup:function(a){var b=!1,c,e;if(!(a instanceof CKEDITOR.editor))return!1;
e=a.elementPath();if(this.checkApplicable(e,a))for(var g=0,f=this.group.length;g<f;g++){c=d[this.widget][this.group[g]];for(var h=0;h<c.length;h++)c[h]!==this&&c[h].checkActive(e,a)&&(a.widgets.focused.removeStyle(c[h]),b=!0)}return b},checkActive:function(a,b){return this.checkElementMatch(a.lastElement,0,b)},checkApplicable:function(a,b){return b instanceof CKEDITOR.editor?this.checkElement(a.lastElement):!1},checkElementMatch:b,checkElementRemovable:b,checkElement:function(a){return h.isDomWidgetWrapper(a)?
(a=a.getFirst(h.isDomWidgetElement))&&a.data("widget")==this.widget:!1},buildPreview:function(a){return a||this._.definition.name},toAllowedContentRules:function(a){if(!a)return null;a=a.widgets.registered[this.widget];var b,c={};if(!a)return null;if(a.styleableElements){b=this.getClassesArray();if(!b)return null;c[a.styleableElements]={classes:b,propertiesOnly:!0};return c}return a.styleToAllowedContentRules?a.styleToAllowedContentRules(this):null},getClassesArray:function(){var a=this._.definition.attributes&&
this._.definition.attributes["class"];return a?CKEDITOR.tools.trim(a).split(/\s+/):null},applyToRange:a,removeFromRange:a,applyToObject:a})}CKEDITOR.plugins.add("widget",{requires:"lineutils,clipboard,widgetselection",onLoad:function(){void 0!==CKEDITOR.document.$.querySelectorAll&&(CKEDITOR.addCss('.cke_widget_wrapper{position:relative;outline:none}.cke_widget_inline{display:inline-block}.cke_widget_wrapper:hover\x3e.cke_widget_element{outline:2px solid #ffd25c;cursor:default}.cke_widget_wrapper:hover .cke_widget_editable{outline:2px solid #ffd25c}.cke_widget_wrapper.cke_widget_focused\x3e.cke_widget_element,.cke_widget_wrapper .cke_widget_editable.cke_widget_editable_focused{outline:2px solid #47a4f5}.cke_widget_editable{cursor:text}.cke_widget_drag_handler_container{position:absolute;width:15px;height:0;display:block;opacity:0.75;transition:height 0s 0.2s;line-height:0}.cke_widget_wrapper:hover\x3e.cke_widget_drag_handler_container{height:15px;transition:none}.cke_widget_drag_handler_container:hover{opacity:1}.cke_editable[contenteditable\x3d"false"] .cke_widget_drag_handler_container{display:none;}img.cke_widget_drag_handler{cursor:move;width:15px;height:15px;display:inline-block}.cke_widget_mask{position:absolute;top:0;left:0;width:100%;height:100%;display:block}.cke_widget_partial_mask{position:absolute;display:block}.cke_editable.cke_widget_dragging, .cke_editable.cke_widget_dragging *{cursor:move !important}'),
aa())},beforeInit:function(b){void 0!==CKEDITOR.document.$.querySelectorAll&&(b.widgets=new a(b))},afterInit:function(a){if(void 0!==CKEDITOR.document.$.querySelectorAll){var b=a.widgets.registered,c,d,e;for(d in b)c=b[d],(e=c.button)&&a.ui.addButton&&a.ui.addButton(CKEDITOR.tools.capitalize(c.name,!0),{label:e,command:c.name,toolbar:"insert,10"});z(a);F(a.undoManager)}}});a.prototype={MIN_SELECTION_CHECK_INTERVAL:500,add:function(a,c){var e=this.editor;c=CKEDITOR.tools.prototypedCopy(c);c.name=a;
c._=c._||{};e.fire("widgetDefinition",c);c.template&&(c.template=new CKEDITOR.template(c.template));b(e,c);d(this,c);this.registered[a]=c;if(c.dialog&&e.plugins.dialog)var g=CKEDITOR.on("dialogDefinition",function(a){a=a.data.definition;var b=a.dialog;a.getMode||b.getName()!==c.dialog||(a.getMode=function(){var a=b.getModel(e);return a&&a instanceof CKEDITOR.plugins.widget&&a.ready?CKEDITOR.dialog.EDITING_MODE:CKEDITOR.dialog.CREATION_MODE});g.removeListener()});return c},addUpcastCallback:function(a){this._.upcastCallbacks.push(a)},
checkSelection:function(){if(this.editor.getSelection()){var a=this.editor.getSelection(),b=a.getSelectedElement(),c=H(this),d;if(b&&(d=this.getByElement(b,!0)))return c.focus(d).select(d).commit();a=a.getRanges()[0];if(!a||a.collapsed)return c.commit();a=new CKEDITOR.dom.walker(a);for(a.evaluator=h.isDomWidgetWrapper;b=a.next();)c.select(this.getByElement(b));c.commit()}},checkWidgets:function(a){this.fire("checkWidgets",CKEDITOR.tools.copy(a||{}))},del:function(a){if(this.focused===a){var b=a.editor,
c=b.createRange(),d;(d=c.moveToClosestEditablePosition(a.wrapper,!0))||(d=c.moveToClosestEditablePosition(a.wrapper,!1));d&&b.getSelection().selectRanges([c])}a.wrapper.remove();this.destroy(a,!0)},destroy:function(a,b){this.widgetHoldingFocusedEditable===a&&t(this,a,null,b);a.destroy(b);delete this.instances[a.id];this.fire("instanceDestroyed",a)},destroyAll:function(a,b){var c,d,e=this.instances;if(b&&!a){d=b.find(".cke_widget_wrapper");for(var e=d.count(),g=0;g<e;++g)(c=this.getByElement(d.getItem(g),
!0))&&this.destroy(c)}else for(d in e)c=e[d],this.destroy(c,a)},finalizeCreation:function(a){(a=a.getFirst())&&h.isDomWidgetWrapper(a)&&(this.editor.insertElement(a),a=this.getByElement(a),a.ready=!0,a.fire("ready"),a.focus())},getByElement:function(){function a(c){return c.is(b)&&c.data("cke-widget-id")}var b={div:1,span:1};return function(b,c){if(!b)return null;var d=a(b);if(!c&&!d){var e=this.editor.editable();do b=b.getParent();while(b&&!b.equals(e)&&!(d=a(b)))}return this.instances[d]||null}}(),
initOn:function(a,b,c){b?"string"==typeof b&&(b=this.registered[b]):b=this.registered[a.data("widget")];if(!b)return null;var d=this.wrapElement(a,b.name);return d?d.hasClass("cke_widget_new")?(a=new h(this,this._.nextId++,a,b,c),a.isInited()?this.instances[a.id]=a:null):this.getByElement(a):null},initOnAll:function(a){a=(a||this.editor.editable()).find(".cke_widget_new");for(var b=[],c,d=a.count();d--;)(c=this.initOn(a.getItem(d).getFirst(h.isDomWidgetElement)))&&b.push(c);return b},onWidget:function(a){var b=
Array.prototype.slice.call(arguments);b.shift();for(var c in this.instances){var d=this.instances[c];d.name==a&&d.on.apply(d,b)}this.on("instanceCreated",function(c){c=c.data;c.name==a&&c.on.apply(c,b)})},parseElementClasses:function(a){if(!a)return null;a=CKEDITOR.tools.trim(a).split(/\s+/);for(var b,c={},d=0;b=a.pop();)-1==b.indexOf("cke_")&&(c[b]=d=1);return d?c:null},wrapElement:function(a,b){var c=null,d,e;if(a instanceof CKEDITOR.dom.element){b=b||a.data("widget");d=this.registered[b];if(!d)return null;
if((c=a.getParent())&&c.type==CKEDITOR.NODE_ELEMENT&&c.data("cke-widget-wrapper"))return c;a.hasAttribute("data-cke-widget-keep-attr")||a.data("cke-widget-keep-attr",a.data("widget")?1:0);a.data("widget",b);(e=u(d,a.getName()))&&m(a);c=new CKEDITOR.dom.element(e?"span":"div",a.getDocument());c.setAttributes(r(e,b));c.data("cke-display-name",d.pathName?d.pathName:a.getName());a.getParent(!0)&&c.replace(a);a.appendTo(c)}else if(a instanceof CKEDITOR.htmlParser.element){b=b||a.attributes["data-widget"];
d=this.registered[b];if(!d)return null;if((c=a.parent)&&c.type==CKEDITOR.NODE_ELEMENT&&c.attributes["data-cke-widget-wrapper"])return c;"data-cke-widget-keep-attr"in a.attributes||(a.attributes["data-cke-widget-keep-attr"]=a.attributes["data-widget"]?1:0);b&&(a.attributes["data-widget"]=b);(e=u(d,a.name))&&m(a);c=new CKEDITOR.htmlParser.element(e?"span":"div",r(e,b));c.attributes["data-cke-display-name"]=d.pathName?d.pathName:a.name;d=a.parent;var g;d&&(g=a.getIndex(),a.remove());c.add(a);d&&v(d,
g,c)}return c},_tests_createEditableFilter:f};CKEDITOR.event.implementOn(a.prototype);h.prototype={addClass:function(a){this.element.addClass(a);this.wrapper.addClass(h.WRAPPER_CLASS_PREFIX+a)},applyStyle:function(a){L(this,a,1)},checkStyleActive:function(a){a=E(a);var b;if(!a)return!1;for(;b=a.pop();)if(!this.hasClass(b))return!1;return!0},destroy:function(a){this.fire("destroy");if(this.editables)for(var b in this.editables)this.destroyEditable(b,a);a||("0"==this.element.data("cke-widget-keep-attr")&&
this.element.removeAttribute("data-widget"),this.element.removeAttributes(["data-cke-widget-data","data-cke-widget-keep-attr"]),this.element.removeClass("cke_widget_element"),this.element.replace(this.wrapper));this.wrapper=null},destroyEditable:function(a,b){var c=this.editables[a],d=!0;c.removeListener("focus",I);c.removeListener("blur",P);this.editor.focusManager.remove(c);if(c.filter){for(var e in this.repository.instances){var g=this.repository.instances[e];g.editables&&(g=g.editables[a])&&g!==
c&&c.filter===g.filter&&(d=!1)}d&&(c.filter.destroy(),(d=this.repository._.filters[this.name])&&delete d[a])}b||(this.repository.destroyAll(!1,c),c.removeClass("cke_widget_editable"),c.removeClass("cke_widget_editable_focused"),c.removeAttributes(["contenteditable","data-cke-widget-editable","data-cke-enter-mode"]));delete this.editables[a]},edit:function(){var a={dialog:this.dialog},b=this;if(!1===this.fire("edit",a)||!a.dialog)return!1;this.editor.openDialog(a.dialog,function(a){var c,d;!1!==b.fire("dialog",
a)&&(c=a.on("show",function(){a.setupContent(b)}),d=a.on("ok",function(){var c,d=b.on("data",function(a){c=1;a.cancel()},null,null,0);b.editor.fire("saveSnapshot");a.commitContent(b);d.removeListener();c&&(b.fire("data",b.data),b.editor.fire("saveSnapshot"))}),a.once("hide",function(){c.removeListener();d.removeListener()}))},b);return!0},getClasses:function(){return this.repository.parseElementClasses(this.element.getAttribute("class"))},getClipboardHtml:function(){var a=this.editor.createRange();
a.setStartBefore(this.wrapper);a.setEndAfter(this.wrapper);return this.editor.editable().getHtmlFromRange(a).getHtml()},hasClass:function(a){return this.element.hasClass(a)},initEditable:function(a,b){var c=this._findOneNotNested(b.selector);return c&&c.is(CKEDITOR.dtd.$editable)?(c=new e(this.editor,c,{filter:f.call(this.repository,this.name,a,b)}),this.editables[a]=c,c.setAttributes({contenteditable:"true","data-cke-widget-editable":a,"data-cke-enter-mode":c.enterMode}),c.filter&&c.data("cke-filter",
c.filter.id),c.addClass("cke_widget_editable"),c.removeClass("cke_widget_editable_focused"),b.pathName&&c.data("cke-display-name",b.pathName),this.editor.focusManager.add(c),c.on("focus",I,this),CKEDITOR.env.ie&&c.on("blur",P,this),c._.initialSetData=!0,c.setData(c.getHtml()),!0):!1},_findOneNotNested:function(a){a=this.wrapper.find(a);for(var b,c,d=0;d<a.count();d++)if(b=a.getItem(d),c=b.getAscendant(h.isDomWidgetWrapper),this.wrapper.equals(c))return b;return null},isInited:function(){return!(!this.wrapper||
!this.inited)},isReady:function(){return this.isInited()&&this.ready},focus:function(){var a=this.editor.getSelection();if(a){var b=this.editor.checkDirty();a.fake(this.wrapper);!b&&this.editor.resetDirty()}this.editor.focus()},refreshMask:function(){da(this)},refreshParts:function(a){S(this,"undefined"!==typeof a?a:!0)},removeClass:function(a){this.element.removeClass(a);this.wrapper.removeClass(h.WRAPPER_CLASS_PREFIX+a)},removeStyle:function(a){L(this,a,0)},setData:function(a,b){var c=this.data,
d=0;if("string"==typeof a)c[a]!==b&&(c[a]=b,d=1);else{var e=a;for(a in e)c[a]!==e[a]&&(d=1,c[a]=e[a])}d&&this.dataReady&&(Z(this),this.fire("data",c));return this},setFocused:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_focused");this.fire(a?"focus":"blur");return this},setSelected:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_selected");this.fire(a?"select":"deselect");return this},updateDragHandlerPosition:function(){var a=this.editor,b=this.element.$,c=this._.dragHandlerOffset,
b={x:b.offsetLeft,y:b.offsetTop-15};c&&b.x==c.x&&b.y==c.y||(c=a.checkDirty(),a.fire("lockSnapshot"),this.dragHandlerContainer.setStyles({top:b.y+"px",left:b.x+"px"}),this.dragHandlerContainer.removeStyle("display"),a.fire("unlockSnapshot"),!c&&a.resetDirty(),this._.dragHandlerOffset=b)}};CKEDITOR.event.implementOn(h.prototype);h.getNestedEditable=function(a,b){return!b||b.equals(a)?null:h.isDomNestedEditable(b)?b:h.getNestedEditable(a,b.getParent())};h.isDomDragHandler=function(a){return a.type==
CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-drag-handler")};h.isDomDragHandlerContainer=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_widget_drag_handler_container")};h.isDomNestedEditable=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-editable")};h.isDomWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-widget")};h.isDomWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-wrapper")};
h.isDomWidget=function(a){return a?this.isDomWidgetWrapper(a)||this.isDomWidgetElement(a):!1};h.isParserWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-widget"]};h.isParserWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-cke-widget-wrapper"]};h.WRAPPER_CLASS_PREFIX="cke_widget_wrapper_";e.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.dom.element.prototype),{setData:function(a){this._.initialSetData||
this.editor.widgets.destroyAll(!1,this);this._.initialSetData=!1;a=this.editor.dataProcessor.unprotectRealComments(a);a=this.editor.dataProcessor.unprotectSource(a);a=this.editor.dataProcessor.toHtml(a,{context:this.getName(),filter:this.filter,enterMode:this.enterMode});this.setHtml(a);this.editor.widgets.initOnAll(this)},getData:function(){return this.editor.dataProcessor.toDataFormat(this.getHtml(),{context:this.getName(),filter:this.filter,enterMode:this.enterMode})}});var ca=/^(?:<(?:div|span)(?: data-cke-temp="1")?(?: id="cke_copybin")?(?: data-cke-temp="1")?>)?(?:<(?:div|span)(?: style="[^"]+")?>)?<span [^>]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\s\S]+)<span [^>]*data-cke-copybin-end="1"[^>]*>.?<\/span>(?:<\/(?:div|span)>)?(?:<\/(?:div|span)>)?$/i,
V={37:1,38:1,39:1,40:1,8:1,46:1};V[CKEDITOR.SHIFT+121]=1;var Q=CKEDITOR.tools.createClass({$:function(a,b){this._.createCopyBin(a,b);this._.createListeners(b)},_:{createCopyBin:function(a){var b=a.document,c=CKEDITOR.env.edge&&16<=CKEDITOR.env.version,d=!a.blockless&&!CKEDITOR.env.ie||c?"div":"span",c=b.createElement(d),b=b.createElement(d);b.setAttributes({id:"cke_copybin","data-cke-temp":"1"});c.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"});c.setStyle("ltr"==a.config.contentsLangDirection?
"left":"right","-5000px");this.editor=a;this.copyBin=c;this.container=b},createListeners:function(a){a&&(a.beforeDestroy&&(this.beforeDestroy=a.beforeDestroy),a.afterDestroy&&(this.afterDestroy=a.afterDestroy))}},proto:{handle:function(a){var b=this.copyBin,c=this.editor,d=this.container,e=CKEDITOR.env.ie&&9>CKEDITOR.env.version,g=c.document.getDocumentElement().$,f=c.createRange(),h=this,k=CKEDITOR.env.mac&&CKEDITOR.env.webkit,l=k?100:0,m=window.requestAnimationFrame&&!k?requestAnimationFrame:setTimeout,
n,p,q;b.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3e​\x3c/span\x3e'+a+'\x3cspan data-cke-copybin-end\x3d"1"\x3e​\x3c/span\x3e');c.fire("lockSnapshot");d.append(b);c.editable().append(d);n=c.on("selectionChange",G,null,null,0);p=c.widgets.on("checkSelection",G,null,null,0);e&&(q=g.scrollTop);f.selectNodeContents(b);f.select();e&&(g.scrollTop=q);return new CKEDITOR.tools.promise(function(a){m(function(){h.beforeDestroy&&h.beforeDestroy();d.remove();n.removeListener();p.removeListener();c.fire("unlockSnapshot");
h.afterDestroy&&h.afterDestroy();a()},l)})}},statics:{hasCopyBin:function(a){return!!Q.getCopyBin(a)},getCopyBin:function(a){return a.document.getById("cke_copybin")}}});CKEDITOR.plugins.widget=h;h.repository=a;h.nestedEditable=e}(),CKEDITOR.config.widget_keystrokeInsertLineBefore=CKEDITOR.SHIFT+CKEDITOR.ALT+13,CKEDITOR.config.widget_keystrokeInsertLineAfter=CKEDITOR.SHIFT+13,function(){function a(a,b,d){this.editor=a;this.notification=null;this._message=new CKEDITOR.template(b);this._singularMessage=
d?new CKEDITOR.template(d):null;this._tasks=[];this._doneTasks=this._doneWeights=this._totalWeights=0}function h(a){this._weight=a||1;this._doneWeight=0;this._isCanceled=!1}CKEDITOR.plugins.add("notificationaggregator",{requires:"notification"});a.prototype={createTask:function(a){a=a||{};var b=!this.notification,d;b&&(this.notification=this._createNotification());d=this._addTask(a);d.on("updated",this._onTaskUpdate,this);d.on("done",this._onTaskDone,this);d.on("canceled",function(){this._removeTask(d)},
this);this.update();b&&this.notification.show();return d},update:function(){this._updateNotification();this.isFinished()&&this.fire("finished")},getPercentage:function(){return 0===this.getTaskCount()?1:this._doneWeights/this._totalWeights},isFinished:function(){return this.getDoneTaskCount()===this.getTaskCount()},getTaskCount:function(){return this._tasks.length},getDoneTaskCount:function(){return this._doneTasks},_updateNotification:function(){this.notification.update({message:this._getNotificationMessage(),
progress:this.getPercentage()})},_getNotificationMessage:function(){var a=this.getTaskCount(),b={current:this.getDoneTaskCount(),max:a,percentage:Math.round(100*this.getPercentage())};return(1==a&&this._singularMessage?this._singularMessage:this._message).output(b)},_createNotification:function(){return new CKEDITOR.plugins.notification(this.editor,{type:"progress"})},_addTask:function(a){a=new h(a.weight);this._tasks.push(a);this._totalWeights+=a._weight;return a},_removeTask:function(a){var b=CKEDITOR.tools.indexOf(this._tasks,
a);-1!==b&&(a._doneWeight&&(this._doneWeights-=a._doneWeight),this._totalWeights-=a._weight,this._tasks.splice(b,1),this.update())},_onTaskUpdate:function(a){this._doneWeights+=a.data;this.update()},_onTaskDone:function(){this._doneTasks+=1;this.update()}};CKEDITOR.event.implementOn(a.prototype);h.prototype={done:function(){this.update(this._weight)},update:function(a){if(!this.isDone()&&!this.isCanceled()){a=Math.min(this._weight,a);var b=a-this._doneWeight;this._doneWeight=a;this.fire("updated",
b);this.isDone()&&this.fire("done")}},cancel:function(){this.isDone()||this.isCanceled()||(this._isCanceled=!0,this.fire("canceled"))},isDone:function(){return this._weight===this._doneWeight},isCanceled:function(){return this._isCanceled}};CKEDITOR.event.implementOn(h.prototype);CKEDITOR.plugins.notificationAggregator=a;CKEDITOR.plugins.notificationAggregator.task=h}(),"use strict",function(){CKEDITOR.plugins.add("uploadwidget",{requires:"widget,clipboard,filetools,notificationaggregator",init:function(a){a.filter.allow("*[!data-widget,!data-cke-upload-id]")},
isSupportedEnvironment:function(){return CKEDITOR.plugins.clipboard.isFileApiSupported}});CKEDITOR.fileTools||(CKEDITOR.fileTools={});CKEDITOR.tools.extend(CKEDITOR.fileTools,{addUploadWidget:function(a,h,e){var b=CKEDITOR.fileTools,d=a.uploadRepository,l=e.supportedTypes?10:20;CKEDITOR.plugins.clipboard.addFileMatcher(a,function(a){return e.supportedTypes?b.isTypeSupported(a,e.supportedTypes):!0});if(e.fileToElement)a.on("paste",function(e){e=e.data;var l=a.widgets.registered[h],c=e.dataTransfer,
k=c.getFilesCount(),f=l.loadMethod||"loadAndUpload",n,r;if(!e.dataValue&&k)for(r=0;r<k;r++)if(n=c.getFile(r),!l.supportedTypes||b.isTypeSupported(n,l.supportedTypes)){var v=l.fileToElement(n);n=d.create(n,void 0,l.loaderType);v&&(n[f](l.uploadUrl,l.additionalRequestParameters),CKEDITOR.fileTools.markElement(v,h,n.id),"loadAndUpload"!=f&&"upload"!=f||l.skipNotifications||CKEDITOR.fileTools.bindNotifications(a,n),e.dataValue+=v.getOuterHtml())}},null,null,l);CKEDITOR.tools.extend(e,{downcast:function(){return new CKEDITOR.htmlParser.text("")},
init:function(){var b=this,e=this.wrapper.findOne("[data-cke-upload-id]").data("cke-upload-id"),c=d.loaders[e],h=CKEDITOR.tools.capitalize,f,l;c.on("update",function(d){if("abort"===c.status&&"function"===typeof b.onAbort)b.onAbort(c);if(b.wrapper&&b.wrapper.getParent()){a.fire("lockSnapshot");d="on"+h(c.status);if("abort"===c.status||"function"!==typeof b[d]||!1!==b[d](c))l="cke_upload_"+c.status,b.wrapper&&l!=f&&(f&&b.wrapper.removeClass(f),b.wrapper.addClass(l),f=l),"error"!=c.status&&"abort"!=
c.status||a.widgets.del(b);a.fire("unlockSnapshot")}else CKEDITOR.instances[a.name]&&a.editable().find('[data-cke-upload-id\x3d"'+e+'"]').count()||c.abort(),d.removeListener()});c.update()},replaceWith:function(b,d){if(""===b.trim())a.widgets.del(this);else{var c=this==a.widgets.focused,e=a.editable(),f=a.createRange(),h,l;c||(l=a.getSelection().createBookmarks());f.setStartBefore(this.wrapper);f.setEndAfter(this.wrapper);c&&(h=f.createBookmark());e.insertHtmlIntoRange(b,f,d);a.widgets.checkWidgets({initOnlyNew:!0});
a.widgets.destroy(this,!0);c?(f.moveToBookmark(h),f.select()):a.getSelection().selectBookmarks(l);a.fire("change")}},_getLoader:function(){var a=this.wrapper.findOne("[data-cke-upload-id]");return a?this.editor.uploadRepository.loaders[a.data("cke-upload-id")]:null}});a.widgets.add(h,e)},markElement:function(a,h,e){a.setAttributes({"data-cke-upload-id":e,"data-widget":h})},bindNotifications:function(a,h){function e(){b=a._.uploadWidgetNotificaionAggregator;if(!b||b.isFinished())b=a._.uploadWidgetNotificaionAggregator=
new CKEDITOR.plugins.notificationAggregator(a,a.lang.uploadwidget.uploadMany,a.lang.uploadwidget.uploadOne),b.once("finished",function(){var d=b.getTaskCount();0===d?b.notification.hide():b.notification.update({message:1==d?a.lang.uploadwidget.doneOne:a.lang.uploadwidget.doneMany.replace("%1",d),type:"success",important:1})})}var b,d=null;h.on("update",function(){!d&&h.uploadTotal&&(e(),d=b.createTask({weight:h.uploadTotal}));d&&"uploading"==h.status&&d.update(h.uploaded)});h.on("uploaded",function(){d&&
d.done()});h.on("error",function(){d&&d.cancel();a.showNotification(h.message,"warning")});h.on("abort",function(){d&&d.cancel();CKEDITOR.instances[a.name]&&a.showNotification(a.lang.uploadwidget.abort,"info")})}})}(),"use strict",function(){function a(a){9>=a&&(a="0"+a);return String(a)}function h(b){var d=new Date,d=[d.getFullYear(),d.getMonth()+1,d.getDate(),d.getHours(),d.getMinutes(),d.getSeconds()];e+=1;return"image-"+CKEDITOR.tools.array.map(d,a).join("")+"-"+e+"."+b}var e=0;CKEDITOR.plugins.add("uploadimage",
{requires:"uploadwidget",onLoad:function(){CKEDITOR.addCss(".cke_upload_uploading img{opacity: 0.3}")},isSupportedEnvironment:function(){return CKEDITOR.plugins.clipboard.isFileApiSupported},init:function(a){if(this.isSupportedEnvironment()){var d=CKEDITOR.fileTools,e=d.getUploadUrl(a.config,"image");e&&(a.config.clipboard_handleImages&&(a.config.clipboard_handleImages=!1,CKEDITOR.warn("clipboard-image-handling-disabled",{editor:a.name,plugin:"uploadimage"})),d.addUploadWidget(a,"uploadimage",{supportedTypes:a.config.uploadImage_supportedTypes,
uploadUrl:e,fileToElement:function(){var a=new CKEDITOR.dom.element("img");a.setAttribute("src","data:image/gif;base64,R0lGODlhDgAOAIAAAAAAAP///yH5BAAAAAAALAAAAAAOAA4AAAIMhI+py+0Po5y02qsKADs\x3d");return a},parts:{img:"img"},onUploading:function(a){this.parts.img.setAttribute("src",a.data)},onUploaded:function(a){var b=this.parts.img.$;this.replaceWith('\x3cimg src\x3d"'+a.url+'" width\x3d"'+(a.responseData.width||b.naturalWidth)+'" height\x3d"'+(a.responseData.height||b.naturalHeight)+'"\x3e')}}),
a.on("paste",function(g){if(g.data.dataValue.match(/<img[\s\S]+data:/i)){g=g.data;var m=document.implementation.createHTMLDocument(""),m=new CKEDITOR.dom.element(m.body),c,k,f;m.data("cke-editable",1);m.appendHtml(g.dataValue);c=m.find("img");for(f=0;f<c.count();f++){k=c.getItem(f);var n=k.getAttribute("src"),r=n&&"data:"==n.substring(0,5),v=null===k.data("cke-realelement");r&&v&&!k.data("cke-upload-id")&&!k.isReadOnly(1)&&(r=(r=n.match(/image\/([a-z]+?);/i))&&r[1]||"jpg",n=a.uploadRepository.create(n,
h(r)),n.upload(e),d.markElement(k,"uploadimage",n.id),d.bindNotifications(a,n))}g.dataValue=m.getHtml()}}))}}});CKEDITOR.config.uploadImage_supportedTypes=/image\/(jpeg|png|gif|bmp)/}(),function(){function a(a){function b(a){var c=!1;f.attachListener(f,"keydown",function(){var b=m.getBody().getElementsByTag(a);if(!c){for(var d=0;d<b.count();d++)b.getItem(d).setCustomData("retain",!0);c=!0}},null,null,1);f.attachListener(f,"keyup",function(){var b=m.getElementsByTag(a);c&&(1==b.count()&&!b.getItem(0).getCustomData("retain")&&
CKEDITOR.tools.isEmpty(b.getItem(0).getAttributes())&&b.getItem(0).remove(1),c=!1)})}var e=this.editor;if(e&&!e.isDetached()){var m=a.document,c=m.body,k=m.getElementById("cke_actscrpt");k&&k.parentNode.removeChild(k);(k=m.getElementById("cke_shimscrpt"))&&k.parentNode.removeChild(k);(k=m.getElementById("cke_basetagscrpt"))&&k.parentNode.removeChild(k);c.contentEditable=!0;CKEDITOR.env.ie&&(c.hideFocus=!0,c.disabled=!0,c.removeAttribute("disabled"));delete this._.isLoadingData;this.$=c;m=new CKEDITOR.dom.document(m);
this.setup();this.fixInitialSelection();var f=this;CKEDITOR.env.ie&&!CKEDITOR.env.edge&&m.getDocumentElement().addClass(m.$.compatMode);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&e.enterMode!=CKEDITOR.ENTER_P?b("p"):CKEDITOR.env.edge&&15>CKEDITOR.env.version&&e.enterMode!=CKEDITOR.ENTER_DIV&&b("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)m.getDocumentElement().on("mousedown",function(a){a.data.getTarget().is("html")&&setTimeout(function(){e.editable().focus()})});h(e);try{e.document.$.execCommand("2D-position",
!1,!0)}catch(n){}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==e.document.$.compatMode)&&this.attachListener(this,"keydown",function(a){var b=a.data.getKeystroke();if(33==b||34==b)if(CKEDITOR.env.ie)setTimeout(function(){e.getSelection().scrollIntoView()},0);else if(e.window.$.innerHeight>this.$.offsetHeight){var c=e.createRange();c[33==b?"moveToElementEditStart":"moveToElementEditEnd"](this);c.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(m,"blur",function(){try{m.$.selection.empty()}catch(a){}});
CKEDITOR.env.iOS&&this.attachListener(m,"touchend",function(){a.focus()});c=e.document.getElementsByTag("title").getItem(0);c.data("cke-title",c.getText());CKEDITOR.env.ie&&(e.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");e.fire("contentDom");this._.isPendingFocus&&(e.focus(),this._.isPendingFocus=!1);setTimeout(function(){e.fire("dataReady")},0)},0,this)}}function h(a){function b(){var c;a.editable().attachListener(a,"selectionChange",
function(){var b=a.getSelection().getSelectedElement();b&&(c&&(c.detachEvent("onresizestart",e),c=null),b.$.attachEvent("onresizestart",e),c=b.$)})}function e(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var h=a.document.$;h.execCommand("enableObjectResizing",!1,!a.config.disableObjectResizing);h.execCommand("enableInlineTableEditing",!1,!a.config.disableNativeTableHandles)}catch(c){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&a.config.disableObjectResizing&&b()}function e(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");
var b=[],e;for(e in CKEDITOR.dtd.$removeEmpty)b.push("html.CSS1Compat "+e+"[contenteditable\x3dfalse]");a.push(b.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(a.push("html{height:100% !important}"),a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}var b;CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",
requiredContent:"body"});a.addMode("wysiwyg",function(e){function g(g){g&&g.removeListener();if(!a.isDestroyed()&&!a.isDetached()&&(a.editable(new b(a,n.getFrameDocument().getBody())),a.setData(a.getData(1),e),z)){if(t)a.on("mode",h,{iframe:n,editor:a,callback:e});a.on("mode",function(){a.status="ready"});c()}}function h(a){a&&a.removeListener();n.on("load",function(){q&&(q=!1,k())})}function c(){p=new MutationObserver(function(b){for(var c=0;c<b.length;c++){var e=b[c];if("childList"===e.type&&0!==
e.addedNodes.length)for(var g=0;g<e.addedNodes.length;g++){var f=e.addedNodes[g];f.contains&&f.contains(a.container.$)&&(t?q=!0:k())}}});p.observe(a.config.observableParent,{childList:!0,subtree:!0})}function k(){var c=a.getData(!1),g;a.editable().preserveIframe=!0;a.editable(null);g=new b(a,n.getFrameDocument().getBody());a.editable(g);a.status="recreating";a.setData(c,{callback:e,internal:!1,noSnapshot:!1})}var f="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",
f=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(f)+"}())":"",n=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+f+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');n.setStyles({width:"100%",height:"100%"});n.addClass("cke_wysiwyg_frame").addClass("cke_reset");f=a.ui.space("contents");f.append(n);var r=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(r)n.on("load",g);var v=a.title,u=a.fire("ariaEditorHelpLabel",
{}).label,q=!1,t=CKEDITOR.env.ie&&11===CKEDITOR.env.version,z=!!window.MutationObserver,p;v&&(CKEDITOR.env.ie&&u&&(v+=", "+u),n.setAttribute("title",v));if(u){var v=CKEDITOR.tools.getNextId(),A=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+v+'" class\x3d"cke_voice_label"\x3e'+u+"\x3c/span\x3e");f.append(A,1);n.setAttribute("aria-describedby",v)}a.on("beforeModeUnload",function(a){a.removeListener();A&&A.remove();z&&p.disconnect()});a.on("destroy",function(){p&&p.disconnect()});n.setAttributes({tabIndex:a.tabIndex,
allowTransparency:"true"});!r&&g();a.fire("ariaWidget",n)})}});CKEDITOR.editor.prototype.addContentsCss=function(a){var b=this.config,e=b.contentsCss;CKEDITOR.tools.isArray(e)||(b.contentsCss=e?[e]:[]);b.contentsCss.push(a)};b=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(b){CKEDITOR.tools.setTimeout(a,0,this,b)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")||" "},base:CKEDITOR.editable,
proto:{preserveIframe:!1,setData:function(a,b){var g=this.editor;if(b)this.setHtml(a),this.fixInitialSelection(),g.fire("dataReady");else{this._.isLoadingData=!0;g._.dataStore={id:1};var h=g.config,c=h.fullPage,k=h.docType,f=CKEDITOR.tools.buildStyleHtml(e()).replace(/<style>/,'\x3cstyle data-cke-temp\x3d"1"\x3e');c||(f+=CKEDITOR.tools.buildStyleHtml(g.config.contentsCss));var n=h.baseHref?'\x3cbase href\x3d"'+h.baseHref+'" data-cke-temp\x3d"1" /\x3e':"";c&&(a=a.replace(/<!DOCTYPE[^>]*>/i,function(a){g.docType=
k=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){g.xmlDeclaration=a;return""}));a=g.dataProcessor.toHtml(a);c?(/<body[\s|>]/.test(a)||(a="\x3cbody\x3e"+a),/<html[\s|>]/.test(a)||(a="\x3chtml\x3e"+a+"\x3c/html\x3e"),/<head[\s|>]/.test(a)?/<title[\s|>]/.test(a)||(a=a.replace(/<head[^>]*>/,"$\x26\x3ctitle\x3e\x3c/title\x3e")):a=a.replace(/<html[^>]*>/,"$\x26\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e"),n&&(a=a.replace(/<head[^>]*?>/,"$\x26"+n)),a=a.replace(/<\/head\s*>/,f+"$\x26"),a=
k+a):a=h.docType+'\x3chtml dir\x3d"'+h.contentsLangDirection+'" lang\x3d"'+(h.contentsLanguage||g.langCode)+'"\x3e\x3chead\x3e\x3ctitle\x3e'+this._.docTitle+"\x3c/title\x3e"+n+f+"\x3c/head\x3e\x3cbody"+(h.bodyId?' id\x3d"'+h.bodyId+'"':"")+(h.bodyClass?' class\x3d"'+h.bodyClass+'"':"")+"\x3e"+a+"\x3c/body\x3e\x3c/html\x3e";CKEDITOR.env.gecko&&(a=a.replace(/<body/,'\x3cbody contenteditable\x3d"true" '),2E4>CKEDITOR.env.version&&(a=a.replace(/<body[^>]*>/,"$\x26\x3c!-- cke-content-start --\x3e")));
a=a.replace(/<body/,'\x3cbody role\x3d"textbox" aria-multiline\x3d"true"');g.title&&(a=a.replace(/<body/,'\x3cbody aria-label\x3d"'+CKEDITOR.tools.htmlEncodeAttr(g.title)+'"'));CKEDITOR.env.gecko||(a=a.replace("\x3cbody",'\x3cbody tabindex\x3d"0" '));h='\x3cscript id\x3d"cke_actscrpt" type\x3d"text/javascript"'+(CKEDITOR.env.ie?' defer\x3d"defer" ':"")+"\x3evar wasLoaded\x3d0;function onload(){if(!wasLoaded)window.parent.CKEDITOR \x26\x26 window.parent.CKEDITOR.tools.callFunction("+this._.frameLoadedHandler+
",window);wasLoaded\x3d1;}"+(CKEDITOR.env.ie?"onload();":'document.addEventListener("DOMContentLoaded", onload, false );')+"\x3c/script\x3e";CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(h+='\x3cscript id\x3d"cke_shimscrpt"\x3ewindow.parent.CKEDITOR.tools.enableHtml5Elements(document)\x3c/script\x3e');n&&CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(h+='\x3cscript id\x3d"cke_basetagscrpt"\x3evar baseTag \x3d document.querySelector( "base" );baseTag.href \x3d baseTag.href;\x3c/script\x3e');a=a.replace(/(?=\s*<\/(:?head)>)/,
h);this.clearCustomData();this.clearListeners();g.fire("contentDomUnload");var r=this.getDocument();try{r.write(a)}catch(v){setTimeout(function(){r.write(a)},0)}}},getData:function(a){if(a)return this.getHtml();a=this.editor;var b=a.config,e=b.fullPage,h=e&&a.docType,c=e&&a.xmlDeclaration,k=this.getDocument(),k=e?k.getDocumentElement().getOuterHtml():k.getBody().getHtml();CKEDITOR.env.gecko&&b.enterMode!=CKEDITOR.ENTER_BR&&(k=k.replace(/<br>(?=\s*(:?$|<\/body>))/,""));e&&(k=k.replace(/<body(.*?)role="?textbox"?/i,
"\x3cbody$1").replace(/<body(.*?)aria-multiline="?true"?/i,"\x3cbody$1").replace(/<body(.*?)tabindex="?0"?/i,"\x3cbody$1").replace(/<body(.*?)aria-label="(.+?)"/i,"\x3cbody$1").replace(/<body(.*?)aria-readonly="?(?:true|false)"?/i,"\x3cbody$1"));k=a.dataProcessor.toDataFormat(k);c&&(k=c+"\n"+k);h&&(k=h+"\n"+k);return k},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:b.baseProto.focus.call(this)},detach:function(){if(!this.preserveIframe){var a=this.editor,e=a.document,a=a.container.findOne("iframe.cke_wysiwyg_frame");
b.baseProto.detach.call(this);this.clearCustomData(this._.expandoNumber);e.getDocumentElement().clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);a&&(a.clearCustomData(),(e=a.removeCustomData("onResize"))&&e.removeListener(),a.isDetached()||a.remove())}}}})}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=!0,CKEDITOR.config.disableNativeSpellChecker=!0,CKEDITOR.config.observableParent=CKEDITOR.document.$,function(){CKEDITOR.plugins.add("youtube",
{lang:"en,tr,ru",init:function(a){a.addCommand("youtube",new CKEDITOR.dialogCommand("youtube",{allowedContent:"div{*}(*); iframe{*}[!width,!height,!src,!frameborder,!allowfullscreen,!allow]; object param[*]; a[*]; img[*]"}));a.ui.addButton("Youtube",{label:a.lang.youtube.button,toolbar:"insert",command:"youtube",icon:this.path+"images/icon.png"});CKEDITOR.dialog.add("youtube",function(h){function e(a,b){var c=ma(a.getValue()),d;d=a.getValue().match(/t=([0-9hms]+)/)?RegExp.$1:!1;0<a.getValue().length?
a.getDialog().getContentElement("youtubePlugin","txtEmbed").disable():l.length&&l.includes("txtEmbed")||a.getDialog().getContentElement("youtubePlugin","txtEmbed").enable();c&&d&&(c=pa(d),c=oa(c),a.getDialog().getContentElement("youtubePlugin","txtStartAt").setValue(c))}function b(a,b){0<a.getValue().length?a.getDialog().getContentElement("youtubePlugin","txtUrl").disable():a.getDialog().getContentElement("youtubePlugin","txtUrl").enable()}var d,l=a.config.youtube_disabled_fields||[];return{title:a.lang.youtube.title,
minWidth:510,minHeight:200,onShow:function(){for(var a=0;a<l.length;a++)this.getContentElement("youtubePlugin",l[a]).disable()},contents:[{id:"youtubePlugin",expand:!0,elements:[{id:"txtEmbed",type:"textarea",label:a.lang.youtube.txtEmbed,onChange:function(a){b(this,a)},onKeyUp:function(a){b(this,a)},validate:function(){if(this.isEnabled()){if(!this.getValue())return alert(a.lang.youtube.noCode),!1;if(0===this.getValue().length||-1===this.getValue().indexOf("//"))return alert(a.lang.youtube.invalidEmbed),
!1}}},{type:"html",html:a.lang.youtube.or+"\x3chr\x3e"},{type:"hbox",widths:["70%","15%","15%"],children:[{id:"txtUrl",type:"text",label:a.lang.youtube.txtUrl,onChange:function(a){e(this,a)},onKeyUp:function(a){e(this,a)},validate:function(){if(this.isEnabled())if(this.getValue()){if(d=ma(this.getValue()),0===this.getValue().length||!1===d)return alert(a.lang.youtube.invalidUrl),!1}else return alert(a.lang.youtube.noCode),!1}},{type:"text",id:"txtWidth",width:"60px",label:a.lang.youtube.txtWidth,
"default":null!=a.config.youtube_width?a.config.youtube_width:"640",validate:function(){if(this.getValue()){var b=Number(this.getValue());if(isNaN(b))return alert(a.lang.youtube.invalidWidth),!1}else return alert(a.lang.youtube.noWidth),!1}},{type:"text",id:"txtHeight",width:"60px",label:a.lang.youtube.txtHeight,"default":null!=a.config.youtube_height?a.config.youtube_height:"360",validate:function(){if(this.getValue()){var b=Number(this.getValue());if(isNaN(b))return alert(a.lang.youtube.invalidHeight),
!1}else return alert(a.lang.youtube.noHeight),!1}}]},{type:"hbox",widths:["55%","45%"],children:[{id:"chkResponsive",type:"checkbox",label:a.lang.youtube.txtResponsive,"default":null!=a.config.youtube_responsive?a.config.youtube_responsive:!1},{id:"chkNoEmbed",type:"checkbox",label:a.lang.youtube.txtNoEmbed,"default":null!=a.config.youtube_noembed?a.config.youtube_noembed:!1}]},{type:"hbox",widths:["55%","45%"],children:[{id:"chkRelated",type:"checkbox","default":null!=a.config.youtube_related?a.config.youtube_related:
!0,label:a.lang.youtube.chkRelated},{id:"chkOlderCode",type:"checkbox","default":null!=a.config.youtube_older?a.config.youtube_older:!1,label:a.lang.youtube.chkOlderCode}]},{type:"hbox",widths:["55%","45%"],children:[{id:"chkPrivacy",type:"checkbox",label:a.lang.youtube.chkPrivacy,"default":null!=a.config.youtube_privacy?a.config.youtube_privacy:!1},{id:"chkAutoplay",type:"checkbox","default":null!=a.config.youtube_autoplay?a.config.youtube_autoplay:!1,label:a.lang.youtube.chkAutoplay}]},{type:"hbox",
widths:["55%","45%"],children:[{id:"txtStartAt",type:"text",label:a.lang.youtube.txtStartAt,validate:function(){if(this.getValue()){var b=this.getValue();if(!/^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$/i.test(b))return alert(a.lang.youtube.invalidTime),!1}}},{id:"chkControls",type:"checkbox","default":null!=a.config.youtube_controls?a.config.youtube_controls:!0,label:a.lang.youtube.chkControls}]}]}],onOk:function(){var a="",b="";if(this.getContentElement("youtubePlugin","txtEmbed").isEnabled())a=
this.getValueOf("youtubePlugin","txtEmbed");else{var c="https://",e=[],f,h="",l=this.getValueOf("youtubePlugin","txtWidth"),v=this.getValueOf("youtubePlugin","txtHeight"),c=!0===this.getContentElement("youtubePlugin","chkPrivacy").getValue()?c+"www.youtube-nocookie.com/":c+"www.youtube.com/",c=c+("embed/"+d);!1===this.getContentElement("youtubePlugin","chkRelated").getValue()&&e.push("rel\x3d0");!0===this.getContentElement("youtubePlugin","chkAutoplay").getValue()&&(e.push("autoplay\x3d1"),h="autoplay");
!1===this.getContentElement("youtubePlugin","chkControls").getValue()&&e.push("controls\x3d0");if(f=this.getValueOf("youtubePlugin","txtStartAt")){f=f.split(":");for(var u=0,q=1;0<f.length;)u+=q*parseInt(f.pop(),10),q*=60;e.push("start\x3d"+u)}0<e.length&&(c=c+"?"+e.join("\x26"));!0===this.getContentElement("youtubePlugin","chkResponsive").getValue()&&(a+='\x3cdiv class\x3d"youtube-embed-wrapper" style\x3d"position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden"\x3e',b='style\x3d"position:absolute;top:0;left:0;width:100%;height:100%"');
!0===this.getContentElement("youtubePlugin","chkOlderCode").getValue()?(c=c.replace("embed/","v/"),c=c.replace(/&/g,"\x26amp;"),c=-1===c.indexOf("?")?c+"?":c+"\x26amp;",c+="hl\x3d"+(this.getParentEditor().config.language?this.getParentEditor().config.language:"en")+"\x26amp;version\x3d3",a=a+('\x3cobject width\x3d"'+l+'" height\x3d"'+v+'" '+b+"\x3e")+('\x3cparam name\x3d"movie" value\x3d"'+c+'"\x3e\x3c/param\x3e'),a+='\x3cparam name\x3d"allowFullScreen" value\x3d"true"\x3e\x3c/param\x3e',a+='\x3cparam name\x3d"allowscriptaccess" value\x3d"always"\x3e\x3c/param\x3e',
a+='\x3cembed src\x3d"'+c+'" type\x3d"application/x-shockwave-flash" ',a+='width\x3d"'+l+'" height\x3d"'+v+'" '+b+' allowscriptaccess\x3d"always" ',a+='allowfullscreen\x3d"true"\x3e\x3c/embed\x3e',a+="\x3c/object\x3e"):!0===this.getContentElement("youtubePlugin","chkNoEmbed").getValue()?a+='\x3ca href\x3d"'+c+'" \x3e\x3cimg width\x3d"'+l+'" height\x3d"'+v+'" src\x3d"'+("https://img.youtube.com/vi/"+d+"/sddefault.jpg")+'" '+b+"/\x3e\x3c/a\x3e":(a+="\x3ciframe "+(h?'allow\x3d"'+h+';" ':"")+'width\x3d"'+
l+'" height\x3d"'+v+'" src\x3d"'+c+'" '+b,a+='frameborder\x3d"0" allowfullscreen\x3e\x3c/iframe\x3e');!0===this.getContentElement("youtubePlugin","chkResponsive").getValue()&&(a+="\x3c/div\x3e")}a=CKEDITOR.dom.element.createFromHtml(a);this.getParentEditor().insertElement(a)}}})}})}(),CKEDITOR.config.plugins="dialogui,dialog,a11yhelp,about,basicstyles,bidi,blockquote,notification,button,toolbar,clipboard,panelbutton,panel,floatpanel,colorbutton,colordialog,menu,contextmenu,copyformatting,dialogadvtab,div,editorplaceholder,elementspath,enterkey,entities,popup,filetools,filebrowser,find,floatingspace,listblock,richcombo,font,format,fakeobjects,forms,horizontalrule,htmlwriter,iframe,image,indent,indentblock,indentlist,justify,menubutton,language,link,list,liststyle,magicline,maximize,mediaembed,newpage,pagebreak,xml,ajax,pastetools,pastefromgdocs,pastefromlibreoffice,pastefromword,pastetext,preview,print,removeformat,resize,save,scayt,selectall,showblocks,showborders,smiley,sourcearea,specialchar,stylescombo,tab,table,tabletools,tableresize,tableselection,templates,undo,lineutils,widgetselection,widget,notificationaggregator,uploadwidget,uploadimage,wysiwygarea,youtube",
CKEDITOR.config.skin="moono",function(){var a=function(a,e){var b=CKEDITOR.getUrl("plugins/"+e);a=a.split(",");for(var d=0;d<a.length;d++)CKEDITOR.skin.icons[a[d]]={path:b,offset:-a[++d],bgsize:a[++d]}};CKEDITOR.env.hidpi?a("about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,bidiltr,168,,bidirtl,192,,blockquote,216,,copy-rtl,240,,copy,264,,cut-rtl,288,,cut,312,,paste-rtl,336,,paste,360,,codesnippet,384,,bgcolor,408,,textcolor,432,,copyformatting,456,,creatediv,480,,docprops-rtl,504,,docprops,528,,easyimagealigncenter,552,,easyimagealignleft,576,,easyimagealignright,600,,easyimagealt,624,,easyimagefull,648,,easyimageside,672,,easyimageupload,696,,embed,720,,embedsemantic,744,,emojipanel,768,,find-rtl,792,,find,816,,replace,840,,button,864,,checkbox,888,,form,912,,hiddenfield,936,,imagebutton,960,,radio,984,,select-rtl,1008,,select,1032,,textarea-rtl,1056,,textarea,1080,,textfield-rtl,1104,,textfield,1128,,horizontalrule,1152,,html5video,2352,auto,iframe,1200,,image,1224,,indent-rtl,1248,,indent,1272,,outdent-rtl,1296,,outdent,1320,,internallink,1344,,justifyblock,1368,,justifycenter,1392,,justifyleft,1416,,justifyright,1440,,language,1464,,addlayout,2976,auto,anchor-rtl,1512,,anchor,1536,,link,1560,,unlink,1584,,bulletedlist-rtl,1608,,bulletedlist,1632,,numberedlist-rtl,1656,,numberedlist,1680,,mathjax,1704,,maximize,1728,,mediaembed,1752,,newpage-rtl,1776,,newpage,1800,,pagebreak-rtl,1824,,pagebreak,1848,,pastefromword-rtl,1872,,pastefromword,1896,,pastetext-rtl,1920,,pastetext,1944,,placeholder,1968,,preview-rtl,1992,,preview,2016,,print,2040,,removeformat,2064,,save,2088,,scayt,2112,,selectall,2136,,showblocks-rtl,2160,,showblocks,2184,,smiley,2208,,source-rtl,2232,,source,2256,,sourcedialog-rtl,2280,,sourcedialog,2304,,specialchar,2328,,spoiler,4704,auto,syntaxhighlight,4752,auto,tabber,4800,auto,table,2424,,templates-rtl,2448,,templates,2472,,uicolor,2496,,redo-rtl,2520,,redo,2544,,undo-rtl,2568,,undo,2592,,simplebox,5232,auto",
"icons_hidpi.png"):a("about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,bidiltr,168,auto,bidirtl,192,auto,blockquote,216,auto,copy-rtl,240,auto,copy,264,auto,cut-rtl,288,auto,cut,312,auto,paste-rtl,336,auto,paste,360,auto,codesnippet,384,auto,bgcolor,408,auto,textcolor,432,auto,copyformatting,456,auto,creatediv,480,auto,docprops-rtl,504,auto,docprops,528,auto,easyimagealigncenter,552,auto,easyimagealignleft,576,auto,easyimagealignright,600,auto,easyimagealt,624,auto,easyimagefull,648,auto,easyimageside,672,auto,easyimageupload,696,auto,embed,720,auto,embedsemantic,744,auto,emojipanel,768,auto,find-rtl,792,auto,find,816,auto,replace,840,auto,button,864,auto,checkbox,888,auto,form,912,auto,hiddenfield,936,auto,imagebutton,960,auto,radio,984,auto,select-rtl,1008,auto,select,1032,auto,textarea-rtl,1056,auto,textarea,1080,auto,textfield-rtl,1104,auto,textfield,1128,auto,horizontalrule,1152,auto,html5video,1176,auto,iframe,1200,auto,image,1224,auto,indent-rtl,1248,auto,indent,1272,auto,outdent-rtl,1296,auto,outdent,1320,auto,internallink,1344,auto,justifyblock,1368,auto,justifycenter,1392,auto,justifyleft,1416,auto,justifyright,1440,auto,language,1464,auto,addlayout,1488,auto,anchor-rtl,1512,auto,anchor,1536,auto,link,1560,auto,unlink,1584,auto,bulletedlist-rtl,1608,auto,bulletedlist,1632,auto,numberedlist-rtl,1656,auto,numberedlist,1680,auto,mathjax,1704,auto,maximize,1728,auto,mediaembed,1752,auto,newpage-rtl,1776,auto,newpage,1800,auto,pagebreak-rtl,1824,auto,pagebreak,1848,auto,pastefromword-rtl,1872,auto,pastefromword,1896,auto,pastetext-rtl,1920,auto,pastetext,1944,auto,placeholder,1968,auto,preview-rtl,1992,auto,preview,2016,auto,print,2040,auto,removeformat,2064,auto,save,2088,auto,scayt,2112,auto,selectall,2136,auto,showblocks-rtl,2160,auto,showblocks,2184,auto,smiley,2208,auto,source-rtl,2232,auto,source,2256,auto,sourcedialog-rtl,2280,auto,sourcedialog,2304,auto,specialchar,2328,auto,spoiler,2352,auto,syntaxhighlight,2376,auto,tabber,2400,auto,table,2424,auto,templates-rtl,2448,auto,templates,2472,auto,uicolor,2496,auto,redo-rtl,2520,auto,redo,2544,auto,undo-rtl,2568,auto,undo,2592,auto,simplebox,2616,auto",
"icons.png")}(),CKEDITOR.lang.languages={en:1,ru:1,tr:1})})();