/*
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license/
*/
(function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var b=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,h={timestamp:"N28D",version:"4.20.2",revision:"3a6ef162af",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:b},status:"unloaded",basePath:function(){var e=window.CKEDITOR_BASEPATH||"";if(!e)for(var a=document.getElementsByTagName("script"),k=0;k<a.length;k++){var l=a[k].src.match(b);if(l){e=l[1];break}}-1==e.indexOf(":/")&&"//"!=e.slice(0,
2)&&(e=0===e.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+e:location.href.match(/^[^\?]*\/(?:)/)[0]+e);if(!e)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return e}(),getUrl:function(e){-1==e.indexOf(":/")&&0!==e.indexOf("/")&&(e=this.basePath+e);return e=this.appendTimestamp(e)},appendTimestamp:function(e){if(!this.timestamp||"/"===e.charAt(e.length-1)||/[&?]t=/.test(e))return e;
var a=0<=e.indexOf("?")?"\x26":"?";return e+a+"t\x3d"+this.timestamp},domReady:function(){function e(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",e,!1),window.removeEventListener("load",e,!1),a()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",e),window.detachEvent("onload",e),a())}catch(l){}}function a(){for(var e;e=b.shift();)e()}var b=[];return function(a){function c(){try{document.documentElement.doScroll("left")}catch(d){setTimeout(c,
1);return}e()}b.push(a);"complete"===document.readyState&&setTimeout(e,1);if(1==b.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",e,!1),window.addEventListener("load",e,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",e);window.attachEvent("onload",e);a=!1;try{a=!window.frameElement}catch(f){}document.documentElement.doScroll&&a&&c()}}}()},g=window.CKEDITOR_GETURL;if(g){var a=h.getUrl;h.getUrl=function(e){return g.call(h,e)||a.call(h,e)}}return h}()),
function(){var b={};CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(b){var g=CKEDITOR.event.prototype,a;for(a in g)null==b[a]&&(b[a]=g[a])},CKEDITOR.event.prototype=function(){function h(e){var b=g(this);return b[e]||(b[e]=new a(e))}var g=function(e){e=e.getPrivate&&e.getPrivate()||e._||(e._={});return e.events||(e.events={})},a=function(e){this.name=e;this.listeners=[]};a.prototype={getListenerIndex:function(e){for(var a=0,b=this.listeners;a<b.length;a++)if(b[a].fn==
e)return a;return-1}};return{define:function(e,a){var b=h.call(this,e);CKEDITOR.tools.extend(b,a,!0)},on:function(e,a,k,l,c){function f(n,c,f,q){n={name:e,sender:this,editor:n,data:c,listenerData:l,stop:f,cancel:q,removeListener:d};return!1===a.call(k,n)?b:n.data}function d(){n.removeListener(e,a)}var n=this,q=h.call(this,e);if(0>q.getListenerIndex(a)){q=q.listeners;k||(k=this);isNaN(c)&&(c=10);f.fn=a;f.priority=c;for(var g=q.length-1;0<=g;g--)if(q[g].priority<=c)return q.splice(g+1,0,f),{removeListener:d};
q.unshift(f)}return{removeListener:d}},once:function(){var e=Array.prototype.slice.call(arguments),a=e[1];e[1]=function(e){e.removeListener();return a.apply(this,arguments)};return this.on.apply(this,e)},capture:function(){CKEDITOR.event.useCapture=1;var e=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return e},fire:function(){var e=0,a=function(){e=1},k=0,l=function(){k=1};return function(c,f,d){var n=g(this)[c];c=e;var q=k;e=k=0;if(n){var h=n.listeners;if(h.length)for(var h=h.slice(0),
x,p=0;p<h.length;p++){if(n.errorProof)try{x=h[p].call(this,d,f,a,l)}catch(w){}else x=h[p].call(this,d,f,a,l);x===b?k=1:"undefined"!=typeof x&&(f=x);if(e||k)break}}f=k?!1:"undefined"==typeof f?!0:f;e=c;k=q;return f}}(),fireOnce:function(e,a,b){a=this.fire(e,a,b);delete g(this)[e];return a},removeListener:function(e,a){var b=g(this)[e];if(b){var l=b.getListenerIndex(a);0<=l&&b.listeners.splice(l,1)}},removeAllListeners:function(){var e=g(this),a;for(a in e)delete e[a]},hasListeners:function(a){return(a=
g(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(b,h){b in{instanceReady:1,loaded:1}&&(this[b]=!0);return CKEDITOR.event.prototype.fire.call(this,b,h,this)},CKEDITOR.editor.prototype.fireOnce=function(b,h){b in{instanceReady:1,loaded:1}&&(this[b]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,b,h,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),
CKEDITOR.env||(CKEDITOR.env=function(){var b=navigator.userAgent.toLowerCase(),h=b.match(/edge[ \/](\d+.?\d*)/),g=-1<b.indexOf("trident/"),g=!(!h&&!g),g={ie:g,edge:!!h,webkit:!g&&-1<b.indexOf(" applewebkit/"),air:-1<b.indexOf(" adobeair/"),mac:-1<b.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||10>document.documentMode),mobile:-1<b.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(b),isCustomDomain:function(){if(!this.ie)return!1;var a=document.domain,b=window.location.hostname;
return a!=b&&a!="["+b+"]"},secure:"https:"==location.protocol};g.gecko="Gecko"==navigator.product&&!g.webkit&&!g.ie;g.webkit&&(-1<b.indexOf("chrome")?g.chrome=!0:g.safari=!0);var a=0;g.ie&&(a=h?parseFloat(h[1]):g.quirks||!document.documentMode?parseFloat(b.match(/msie (\d+)/)[1]):document.documentMode,g.ie9Compat=9==a,g.ie8Compat=8==a,g.ie7Compat=7==a,g.ie6Compat=7>a||g.quirks);g.gecko&&(h=b.match(/rv:([\d\.]+)/))&&(h=h[1].split("."),a=1E4*h[0]+100*(h[1]||0)+1*(h[2]||0));g.air&&(a=parseFloat(b.match(/ adobeair\/(\d+)/)[1]));
g.webkit&&(a=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]));g.version=a;g.isCompatible=!(g.ie&&7>a)&&!(g.gecko&&4E4>a)&&!(g.webkit&&534>a);g.hidpi=2<=window.devicePixelRatio;g.needsBrFiller=g.gecko||g.webkit||g.ie&&10<a;g.needsNbspFiller=g.ie&&11>a;g.cssClass="cke_browser_"+(g.ie?"ie":g.gecko?"gecko":g.webkit?"webkit":"unknown");g.quirks&&(g.cssClass+=" cke_browser_quirks");g.ie&&(g.cssClass+=" cke_browser_ie"+(g.quirks?"6 cke_browser_iequirks":g.version));g.air&&(g.cssClass+=" cke_browser_air");
g.iOS&&(g.cssClass+=" cke_browser_ios");g.hidpi&&(g.cssClass+=" cke_hidpi");return g}()),"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 b=document.createElement("script");b.type="text/javascript";b.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(b)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=
function(b){(this._.pending||(this._.pending=[])).push(b)};(function(){CKEDITOR.domReady(function(){var b=CKEDITOR.loadFullCore,h=CKEDITOR.loadFullCoreTimeout;b&&(CKEDITOR.status="basic_ready",b&&b._load?b():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(b,h){CKEDITOR.verbosity&
CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:b,additionalData:h})},CKEDITOR.error=function(b,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:b,additionalData:h})},CKEDITOR.on("log",function(b){if(window.console&&window.console.log){var h=console[b.data.type]?b.data.type:"log",g=b.data.errorCode;if(b=b.data.additionalData)console[h]("[CKEDITOR] Error code: "+g+".",b);else console[h]("[CKEDITOR] Error code: "+g+".");console[h]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+
g)}},null,null,999),CKEDITOR.dom={},function(){function b(d,c,f){this._minInterval=d;this._context=f;this._lastOutput=this._scheduledTimer=0;this._output=CKEDITOR.tools.bind(c,f||{});var a=this;this.input=function(){function d(){a._lastOutput=(new Date).getTime();a._scheduledTimer=0;a._call()}if(!a._scheduledTimer||!1!==a._reschedule()){var n=(new Date).getTime()-a._lastOutput;n<a._minInterval?a._scheduledTimer=setTimeout(d,a._minInterval-n):d()}}}function h(d,c,f){b.call(this,d,c,f);this._args=[];
var a=this;this.input=CKEDITOR.tools.override(this.input,function(d){return function(){a._args=Array.prototype.slice.call(arguments);d.call(this)}})}var g=[],a=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",e=/&/g,m=/>/g,k=/</g,l=/"/g,c=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,f={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},d=function(d,c){return"#"==c[0]?String.fromCharCode(parseInt(c.slice(1),10)):f[c]};CKEDITOR.on("reset",function(){g=[]});CKEDITOR.tools=
{arrayCompare:function(d,c){if(!d&&!c)return!0;if(!d||!c||d.length!=c.length)return!1;for(var f=0;f<d.length;f++)if(d[f]!=c[f])return!1;return!0},getIndex:function(d,c){for(var f=0;f<d.length;++f)if(c(d[f]))return f;return-1},clone:function(d){var c;if(d&&d instanceof Array){c=[];for(var f=0;f<d.length;f++)c[f]=CKEDITOR.tools.clone(d[f]);return c}if(null===d||"object"!=typeof d||d instanceof String||d instanceof Number||d instanceof Boolean||d instanceof Date||d instanceof RegExp||d.nodeType||d.window===
d)return d;c=new d.constructor;for(f in d)c[f]=CKEDITOR.tools.clone(d[f]);return c},capitalize:function(d,c){return d.charAt(0).toUpperCase()+(c?d.slice(1):d.slice(1).toLowerCase())},extend:function(d){var c=arguments.length,f,a;"boolean"==typeof(f=arguments[c-1])?c--:"boolean"==typeof(f=arguments[c-2])&&(a=arguments[c-1],c-=2);for(var e=1;e<c;e++){var b=arguments[e]||{};CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(b),function(c){if(!0===f||null==d[c])if(!a||c in a)d[c]=b[c]})}return d},
prototypedCopy:function(d){var c=function(){};c.prototype=d;return new c},copy:function(d){var c={},f;for(f in d)c[f]=d[f];return c},isArray:function(d){return"[object Array]"==Object.prototype.toString.call(d)},isEmpty:function(d){for(var c in d)if(d.hasOwnProperty(c))return!1;return!0},cssVendorPrefix:function(d,c,f){if(f)return a+d+":"+c+";"+d+":"+c;f={};f[d]=c;f[a+d]=c;return f},cssStyleToDomStyle:function(){var d=document.createElement("div").style,c="undefined"!=typeof d.cssFloat?"cssFloat":
"undefined"!=typeof d.styleFloat?"styleFloat":"float";return function(d){return"float"==d?c:d.replace(/-./g,function(d){return d.substr(1).toUpperCase()})}}(),buildStyleHtml:function(d){d=[].concat(d);for(var c,f=[],a=0;a<d.length;a++)if(c=d[a])/@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(d){return void 0===d||null===d?"":String(d).replace(e,
"\x26amp;").replace(m,"\x26gt;").replace(k,"\x26lt;")},htmlDecode:function(n){return n.replace(c,d)},htmlEncodeAttr:function(d){return CKEDITOR.tools.htmlEncode(d).replace(l,"\x26quot;")},htmlDecodeAttr:function(d){return CKEDITOR.tools.htmlDecode(d)},transformPlainTextToHtml:function(d,c){var f=c==CKEDITOR.ENTER_BR,a=this.htmlEncode(d.replace(/\r\n/g,"\n")),a=a.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),e=c==CKEDITOR.ENTER_P?"p":"div";if(!f){var b=/\n{2}/g;if(b.test(a))var l="\x3c"+e+"\x3e",k=
"\x3c/"+e+"\x3e",a=l+a.replace(b,function(){return k+l})+k}a=a.replace(/\n/g,"\x3cbr\x3e");f||(a=a.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+e+"\x3e)"),function(d){return CKEDITOR.tools.repeat(d,2)}));a=a.replace(/^ | $/g,"\x26nbsp;");return a=a.replace(/(>|\s) /g,function(d,c){return c+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var d=0;return function(){return++d}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var d="e",c=0;8>c;c++)d+=
Math.floor(65536*(1+Math.random())).toString(16).substring(1);return d},override:function(d,c){var f=c(d);f.prototype=d.prototype;return f},setTimeout:function(d,c,f,a,e){e||(e=window);f||(f=e);return e.setTimeout(function(){a?d.apply(f,[].concat(a)):d.apply(f)},c||0)},debounce:function(d,c){var f;return function(){var a=this,e=arguments;clearTimeout(f);f=setTimeout(function(){f=null;d.apply(a,e)},c)}},throttle:function(d,c,f){return new this.buffers.throttle(d,c,f)},trim:function(){var d=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;
return function(c){return c.replace(d,"")}}(),ltrim:function(){var d=/^[ \t\n\r]+/g;return function(c){return c.replace(d,"")}}(),rtrim:function(){var d=/[ \t\n\r]+$/g;return function(c){return c.replace(d,"")}}(),indexOf:function(d,c){if("function"==typeof c)for(var f=0,a=d.length;f<a;f++){if(c(d[f]))return f}else{if(d.indexOf)return d.indexOf(c);f=0;for(a=d.length;f<a;f++)if(d[f]===c)return f}return-1},search:function(d,c){var f=CKEDITOR.tools.indexOf(d,c);return 0<=f?d[f]:null},bind:function(d,
c){var f=Array.prototype.slice.call(arguments,2);return function(){return d.apply(c,f.concat(Array.prototype.slice.call(arguments)))}},createClass:function(d){var c=d.$,f=d.base,a=d.privates||d._,e=d.proto;d=d.statics;!c&&(c=function(){f&&this.base.apply(this,arguments)});if(a)var b=c,c=function(){var d=this._||(this._={}),c;for(c in a){var f=a[c];d[c]="function"==typeof f?CKEDITOR.tools.bind(f,this):f}b.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 r(){this.base=f.prototype.base;f.apply(this,arguments);this.base=r});e&&this.extend(c.prototype,e,!0);d&&this.extend(c,d,!0);return c},addFunction:function(d,c){return g.push(function(){return d.apply(c||this,arguments)})-1},removeFunction:function(d){g[d]=null},callFunction:function(d){var c=g[d];return c&&c.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var d=/^-?\d+\.?\d*px$/,c;return function(f){c=CKEDITOR.tools.trim(f+
"")+"px";return d.test(c)?c:f||""}}(),convertToPx:function(){var d,c;return function(f){if(!d||d.isDetached())d=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(d);if(!/%$/.test(f)){var a=0>parseFloat(f);a&&(f=f.replace("-",""));d.setStyle("width",f);c=d.getClientRect();f=Math.round(c.width);return a?-f:f}return f}}(),repeat:function(d,c){return Array(c+
1).join(d)},tryThese:function(){for(var d,c=0,f=arguments.length;c<f;c++){var a=arguments[c];try{d=a();break}catch(e){}}return d},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(d){return function(){var c=arguments,f=this;window.setTimeout(function(){d.apply(f,c)},0)}},normalizeCssText:function(d,c){var f=[],a,e=CKEDITOR.tools.parseCssText(d,!0,c);for(a in e)f.push(a+":"+e[a]);f.sort();return f.length?f.join(";")+";":""},convertRgbToHex:function(d){return d.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,
function(d,c,f,a){d=[c,f,a];for(c=0;3>c;c++)d[c]=("0"+parseInt(d[c],10).toString(16)).slice(-2);return"#"+d.join("")})},normalizeHex:function(d){return d.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(d,c,f,a){d=c.toLowerCase();3==d.length&&(d=d.split(""),d=[d[0],d[0],d[1],d[1],d[2],d[2]].join(""));return"#"+d+a})},_isValidColorFormat:function(d){if(!d)return!1;d=d.replace(/\s+/g,"");return/^[a-z0-9()#%,./]+$/i.test(d)},parseCssText:function(d,c,f){var a={};f&&(d=(new CKEDITOR.dom.element("span")).setAttribute("style",
d).getAttribute("style")||"");d&&(d=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(d)));if(!d||";"==d)return a;d.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(d,f,e){c&&(f=f.toLowerCase(),"font-family"==f&&(e=e.replace(/\s*,\s*/g,",")),e=CKEDITOR.tools.trim(e));a[f]=e});return a},writeCssText:function(d,c){var f,a=[];for(f in d)a.push(f+":"+d[f]);c&&a.sort();return a.join("; ")},objectCompare:function(d,c,f){var a;if(!d&&!c)return!0;if(!d||!c)return!1;
for(a in d)if(d[a]!=c[a])return!1;if(!f)for(a in c)if(d[a]!=c[a])return!1;return!0},objectKeys:function(d){return CKEDITOR.tools.object.keys(d)},convertArrayToObject:function(d,c){var f={};1==arguments.length&&(c=!0);for(var a=0,e=d.length;a<e;++a)f[d[a]]=c;return f},getStyledSpans:function(d,c){var f=CKEDITOR.env.ie&&8==CKEDITOR.env.version?d.toUpperCase():d,f=c.find("span[style*\x3d"+f+"]").toArray();return CKEDITOR.tools.array.filter(f,function(c){return!!c.getStyle(d)})},fixDomain:function(){for(var d;;)try{d=
window.parent.document.domain;break}catch(c){d=d?d.replace(/.+?(?:\.|$)/,""):document.domain;if(!d)break;document.domain=d}return!!d},eventsBuffer:function(d,c,f){return new this.buffers.event(d,c,f)},enableHtml5Elements:function(d,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(" "),a=f.length,e;a--;)e=d.createElement(f[a]),c&&d.appendChild(e)},checkIfAnyArrayItemMatches:function(d,
c){for(var f=0,a=d.length;f<a;++f)if(d[f].match(c))return!0;return!1},checkIfAnyObjectPropertyMatches:function(d,c){for(var f in d)if(f.match(c))return!0;return!1},keystrokeToString:function(d,c){var f=this.keystrokeToArray(d,c);f.display=f.display.join("+");f.aria=f.aria.join("+");return f},keystrokeToArray:function(d,c){var f=c&16711680,a=c&65535,e=CKEDITOR.env.mac,b=[],l=[];f&CKEDITOR.CTRL&&(b.push(e?"⌘":d[17]),l.push(e?d[224]:d[17]));f&CKEDITOR.ALT&&(b.push(e?"⌥":d[18]),l.push(d[18]));f&CKEDITOR.SHIFT&&
(b.push(e?"⇧":d[16]),l.push(d[16]));a&&(d[a]?(b.push(d[a]),l.push(d[a])):(b.push(String.fromCharCode(a)),l.push(String.fromCharCode(a))));return{display:b,aria:l}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(d){d=d.toLowerCase();for(var c=document.cookie.split(";"),f,a,e=0;e<c.length;e++)if(f=c[e].split("\x3d"),a=decodeURIComponent(CKEDITOR.tools.trim(f[0]).toLowerCase()),a===d)return decodeURIComponent(1<f.length?
f[1]:"");return null},setCookie:function(d,c){document.cookie=encodeURIComponent(d)+"\x3d"+encodeURIComponent(c)+";path\x3d/"},getCsrfToken:function(){var d=CKEDITOR.tools.getCookie("ckCsrfToken");if(!d||40!=d.length){var d=[],c="";if(window.crypto&&window.crypto.getRandomValues)d=new Uint8Array(40),window.crypto.getRandomValues(d);else for(var f=0;40>f;f++)d.push(Math.floor(256*Math.random()));for(f=0;f<d.length;f++)var a="abcdefghijklmnopqrstuvwxyz0123456789".charAt(d[f]%36),c=c+(.5<Math.random()?
a.toUpperCase():a);d=c;CKEDITOR.tools.setCookie("ckCsrfToken",d)}return d},escapeCss:function(d){if(d)if(window.CSS&&CSS.escape)d=CSS.escape(d);else{d=String(d);for(var c=d.length,f=-1,a,e="",b=d.charCodeAt(0);++f<c;)a=d.charCodeAt(f),e=0==a?e+"�":127==a||1<=a&&31>=a||0==f&&48<=a&&57>=a||1==f&&48<=a&&57>=a&&45==b?e+("\\"+a.toString(16)+" "):0==f&&1==c&&45==a?e+("\\"+d.charAt(f)):128<=a||45==a||95==a||48<=a&&57>=a||65<=a&&90>=a||97<=a&&122>=a?e+d.charAt(f):e+("\\"+d.charAt(f));d=e}else d="";return d},
getMouseButton:function(d){return(d=d&&d.data?d.data.$:d)?CKEDITOR.tools.normalizeMouseButton(d.button):!1},normalizeMouseButton:function(d,c){if(!CKEDITOR.env.ie||9<=CKEDITOR.env.version&&!CKEDITOR.env.ie6Compat)return d;for(var f=[[CKEDITOR.MOUSE_BUTTON_LEFT,1],[CKEDITOR.MOUSE_BUTTON_MIDDLE,4],[CKEDITOR.MOUSE_BUTTON_RIGHT,2]],a=0;a<f.length;a++){var e=f[a];if(e[0]===d&&c)return e[1];if(!c&&e[1]===d)return e[0]}},convertHexStringToBytes:function(d){var c=[],f=d.length/2,a;for(a=0;a<f;a++)c.push(parseInt(d.substr(2*
a,2),16));return c},convertBytesToBase64:function(d){var c="",f=d.length,a;for(a=0;a<f;a+=3){var e=d.slice(a,a+3),b=e.length,l=[],k;if(3>b)for(k=b;3>k;k++)e[k]=0;l[0]=(e[0]&252)>>2;l[1]=(e[0]&3)<<4|e[1]>>4;l[2]=(e[1]&15)<<2|(e[2]&192)>>6;l[3]=e[2]&63;for(k=0;4>k;k++)c=k<=b?c+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l[k]):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(d){var c={},f=this._findColor(d);f.length&&(c.color=f[0],CKEDITOR.tools.array.forEach(f,function(c){d=d.replace(c,"")}));if(d=CKEDITOR.tools.trim(d))c.unprocessed=d;return c},margin:function(d){return CKEDITOR.tools.style.parse.sideShorthand(d,function(d){return d.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)||
["0px"]})},sideShorthand:function(d,c){function f(d){a.top=e[d[0]];a.right=e[d[1]];a.bottom=e[d[2]];a.left=e[d[3]]}var a={},e=c?c(d):d.split(/\s+/);switch(e.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 a},border:function(d){return CKEDITOR.tools.style.border.fromCssRule(d)},_findColor:function(d){var c=[],f=CKEDITOR.tools.array,c=c.concat(d.match(this._rgbaRegExp)||[]),c=c.concat(d.match(this._hslaRegExp)||[]);return c=c.concat(f.filter(d.split(/\s+/),
function(d){return d.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:d.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(d,c,f){var a=[];this.forEach(d,function(e,b){c.call(f,e,b,d)&&a.push(e)});return a},find:function(d,c,f){for(var a=d.length,e=0;e<a;){if(c.call(f,d[e],e,d))return d[e];e++}},forEach:function(d,c,f){var a=d.length,e;for(e=0;e<a;e++)c.call(f,d[e],e,d)},map:function(d,c,f){for(var a=[],e=0;e<d.length;e++)a.push(c.call(f,d[e],e,d));return a},reduce:function(d,
c,f,a){for(var e=0;e<d.length;e++)f=c.call(a,f,d[e],e,d);return f},every:function(d,c,f){if(!d.length)return!0;c=this.filter(d,c,f);return d.length===c.length},some:function(d,c,f){for(var a=0;a<d.length;a++)if(c.call(f,d[a],a,d))return!0;return!1},zip:function(d,c){return CKEDITOR.tools.array.map(d,function(d,f){return[d,c[f]]})},unique:function(d){return this.filter(d,function(c,f){return f===CKEDITOR.tools.array.indexOf(d,c)})}},object:{DONT_ENUMS:"toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),
entries:function(d){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(d),function(c){return[c,d[c]]})},values:function(d){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(d),function(c){return d[c]})},keys:function(d){var c=Object.prototype.hasOwnProperty,f=[],a=CKEDITOR.tools.object.DONT_ENUMS;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(!d||"object"!==typeof d)){c=[];if("string"===typeof d)for(f=0;f<d.length;f++)c.push(String(f));return c}for(var e in d)f.push(e);if(CKEDITOR.env.ie&&
9>CKEDITOR.env.version)for(e=0;e<a.length;e++)c.call(d,a[e])&&f.push(a[e]);return f},findKey:function(d,c){if("object"!==typeof d)return null;for(var f in d)if(d[f]===c)return f;return null},merge:function(d,c){var f=CKEDITOR.tools,a=f.clone(d),e=f.clone(c);f.array.forEach(f.object.keys(e),function(d){a[d]="object"===typeof e[d]&&"object"===typeof a[d]?f.object.merge(a[d],e[d]):e[d]});return a}},getAbsoluteRectPosition:function(d,c){function f(d){if(d){var c=d.getClientRect();a.top+=c.top;a.left+=
c.left;"x"in a&&"y"in a&&(a.x+=c.x,a.y+=c.y);f(d.getWindow().getFrame())}}var a=CKEDITOR.tools.copy(c);f(d.getFrame());var e=CKEDITOR.document.getWindow().getScrollPosition();a.top+=e.y;a.left+=e.x;"x"in a&&"y"in a&&(a.y+=e.y,a.x+=e.x);a.right=a.left+a.width;a.bottom=a.top+a.height;return a}};b.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(b.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=b;CKEDITOR.tools.buffers.throttle=h;CKEDITOR.tools.style.border=CKEDITOR.tools.createClass({$:function(d){d=d||{};this.width=d.width;this.style=d.style;this.color=d.color;this._.normalize()},_:{normalizeMap:{color:[[/windowtext/g,
"black"]]},normalize:function(){for(var d in this._.normalizeMap){var c=this[d];c&&(this[d]=CKEDITOR.tools.array.reduce(this._.normalizeMap[d],function(d,c){return d.replace(c[0],c[1])},c))}}},proto:{toString:function(){return CKEDITOR.tools.array.filter([this.width,this.style,this.color],function(d){return!!d}).join(" ")}},statics:{fromCssRule:function(d){var c={},f=d.split(/\s+/g);d=CKEDITOR.tools.style.parse._findColor(d);d.length&&(c.color=d[0]);CKEDITOR.tools.array.forEach(f,function(d){c.style||
-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,d)?!c.width&&CKEDITOR.tools.style.parse._widthRegExp.test(d)&&(c.width=d):c.style=d});return new CKEDITOR.tools.style.border(c)},splitCssValues:function(d,c){c=c||{};var f=CKEDITOR.tools.array.reduce(["width","style","color"],function(f,a){var e=d["border-"+a]||c[a];f[a]=e?CKEDITOR.tools.style.parse.sideShorthand(e):null;return f},{});return CKEDITOR.tools.array.reduce(["top","right","bottom","left"],function(c,a){var e={},b;for(b in f){var l=
d["border-"+a+"-"+b];e[b]=l?l:f[b]&&f[b][a]}c["border-"+a]=new CKEDITOR.tools.style.border(e);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 b=CKEDITOR.tools.extend,h=function(c,d){for(var a=CKEDITOR.tools.clone(c),e=1;e<arguments.length;e++){d=arguments[e];for(var b in d)delete a[b]}return a},g={},a={},
e={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},m={command:1,link:1,meta:1,noscript:1,script:1,style:1},k={},l={"#":1},c={center:1,dir:1,noframes:1};b(g,{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},l,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});b(a,e,g,c);h={a:h(g,{a:1,button:1}),abbr:g,address:a,area:k,article:a,aside:a,audio:b({source:1,track:1},a),b:g,base:k,bdi:g,bdo:g,blockquote:a,body:a,br:k,button:h(g,{a:1,button:1}),canvas:g,caption:a,cite:g,code:g,col:k,colgroup:{col:1},command:k,
datalist:b({option:1},g),dd:a,del:g,details:b({summary:1},a),dfn:g,div:a,dl:{dt:1,dd:1},dt:a,em:g,embed:k,fieldset:b({legend:1},a),figcaption:a,figure:b({figcaption:1},a),footer:a,form:a,h1:g,h2:g,h3:g,h4:g,h5:g,h6:g,head:b({title:1,base:1},m),header:a,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:k,html:b({head:1,body:1},a,m),i:g,iframe:l,img:k,input:k,ins:g,kbd:g,keygen:k,label:g,legend:g,li:a,link:k,main:a,map:a,mark:g,menu:b({li:1},a),meta:k,meter:h(g,{meter:1}),nav:a,noscript:b({link:1,meta:1,style:1},
g),object:b({param:1},g),ol:{li:1},optgroup:{option:1},option:l,output:g,p:g,param:k,pre:g,progress:h(g,{progress:1}),q:g,rp:g,rt:g,ruby:b({rp:1,rt:1},g),s:g,samp:g,script:l,section:a,select:{optgroup:1,option:1},small:g,source:k,span:g,strong:g,style:l,sub:g,summary:b({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},g),sup:g,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:a,textarea:l,tfoot:{tr:1},th:a,thead:{tr:1},time:h(g,{time:1}),title:l,tr:{th:1,td:1},track:k,u:g,ul:{li:1},"var":g,
video:b({source:1,track:1},a),wbr:k,acronym:g,applet:b({param:1},a),basefont:k,big:g,center:a,dialog:k,dir:{li:1},font:g,isindex:k,noframes:a,strike:g,tt:g};b(h,{$block:b({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},e,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:g,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:b({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(b){this.$=b},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var b=this.getKey();if(this.$.ctrlKey||this.$.metaKey)b+=CKEDITOR.CTRL;
this.$.shiftKey&&(b+=CKEDITOR.SHIFT);this.$.altKey&&(b+=CKEDITOR.ALT);return b},preventDefault:function(b){var h=this.$;h.preventDefault?h.preventDefault():h.returnValue=!1;b&&this.stopPropagation()},stopPropagation:function(){var b=this.$;b.stopPropagation?b.stopPropagation():b.cancelBubble=!0},getTarget:function(){var b=this.$.target||this.$.srcElement;return b?new CKEDITOR.dom.node(b):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var b=this.getTarget().getDocument().$;
return{x:this.$.pageX||this.$.clientX+(b.documentElement.scrollLeft||b.body.scrollLeft),y:this.$.pageY||this.$.clientY+(b.documentElement.scrollTop||b.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(b){b&&(this.$=b)},CKEDITOR.dom.domObject.prototype=function(){var b=
function(b,g){return function(a){"undefined"!=typeof CKEDITOR&&b.fire(g,new CKEDITOR.dom.event(a))}};return{getPrivate:function(){var b;(b=this.getCustomData("_"))||this.setCustomData("_",b={});return b},on:function(h){var g=this.getCustomData("_cke_nativeListeners");g||(g={},this.setCustomData("_cke_nativeListeners",g));g[h]||(g=g[h]=b(this,h),this.$.addEventListener?this.$.addEventListener(h,g,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+h,g));return CKEDITOR.event.prototype.on.apply(this,
arguments)},removeListener:function(b){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(b)){var g=this.getCustomData("_cke_nativeListeners"),a=g&&g[b];a&&(this.$.removeEventListener?this.$.removeEventListener(b,a,!1):this.$.detachEvent&&this.$.detachEvent("on"+b,a),delete g[b])}},removeAllListeners:function(){try{var b=this.getCustomData("_cke_nativeListeners"),g;for(g in b){var a=b[g];this.$.detachEvent?this.$.detachEvent("on"+g,a):this.$.removeEventListener&&this.$.removeEventListener(g,
a,!1);delete b[g]}}catch(e){if(!CKEDITOR.env.edge||-2146828218!==e.number)throw e;}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),function(b){var h={};CKEDITOR.on("reset",function(){h={}});b.equals=function(b){try{return b&&b.$===this.$}catch(a){return!1}};b.setCustomData=function(b,a){var e=this.getUniqueId();(h[e]||(h[e]={}))[b]=a;return this};b.getCustomData=function(b){var a=this.$["data-cke-expando"];return(a=a&&h[a])&&b in a?a[b]:null};b.removeCustomData=function(b){var a=this.$["data-cke-expando"],
a=a&&h[a],e,m;a&&(e=a[b],m=b in a,delete a[b]);return m?e:null};b.clearCustomData=function(){this.removeAllListeners();var b=this.getUniqueId();b&&delete h[b]};b.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(b)}(CKEDITOR.dom.domObject.prototype),CKEDITOR.dom.node=function(b){return b?new CKEDITOR.dom[b.nodeType==CKEDITOR.NODE_DOCUMENT?"document":b.nodeType==CKEDITOR.NODE_ELEMENT?"element":b.nodeType==
CKEDITOR.NODE_TEXT?"text":b.nodeType==CKEDITOR.NODE_COMMENT?"comment":b.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](b):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(b,h){b.append(this,h);return b},clone:function(b,h){function g(a){a["data-cke-expando"]&&(a["data-cke-expando"]=!1);if(a.nodeType==CKEDITOR.NODE_ELEMENT||a.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(h||a.nodeType!=CKEDITOR.NODE_ELEMENT||a.removeAttribute("id",!1),b){a=a.childNodes;for(var e=0;e<a.length;e++)g(a[e])}}function a(e){if(e.type==CKEDITOR.NODE_ELEMENT||e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var k=
e.getName();":"==k[0]&&e.renameNode(k.substring(1))}if(b)for(k=0;k<e.getChildCount();k++)a(e.getChild(k))}}var e=this.$.cloneNode(b);g(e);e=new CKEDITOR.dom.node(e);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&a(e);return e},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(b){b.$.parentNode.insertBefore(this.$,b.$.nextSibling);return b},insertBefore:function(b){b.$.parentNode.insertBefore(this.$,
b.$);return b},insertBeforeMe:function(b){this.$.parentNode.insertBefore(b.$,this.$);return b},getAddress:function(b){for(var h=[],g=this.getDocument().$.documentElement,a=this;a&&a!=g;){var e=a.getParent();e&&h.unshift(this.getIndex.call(a,b));a=e}return h},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(b){function h(a,e){var b=e?a.getNext():a.getPrevious();return b&&b.type==CKEDITOR.NODE_TEXT?b.isEmpty()?h(b,e):b:
null}var g=this,a=-1,e;if(!this.getParent()||b&&g.type==CKEDITOR.NODE_TEXT&&g.isEmpty()&&!h(g)&&!h(g,!0))return-1;do if(!b||g.equals(this)||g.type!=CKEDITOR.NODE_TEXT||!e&&!g.isEmpty())a++,e=g.type==CKEDITOR.NODE_TEXT;while(g=g.getPrevious());return a},getNextSourceNode:function(b,h,g){if(g&&!g.call){var a=g;g=function(e){return!e.equals(a)}}b=!b&&this.getFirst&&this.getFirst();var e;if(!b){if(this.type==CKEDITOR.NODE_ELEMENT&&g&&!1===g(this,!0))return null;b=this.getNext()}for(;!b&&(e=(e||this).getParent());){if(g&&
!1===g(e,!0))return null;b=e.getNext()}return!b||g&&!1===g(b)?null:h&&h!=b.type?b.getNextSourceNode(!1,h,g):b},getPreviousSourceNode:function(b,h,g){if(g&&!g.call){var a=g;g=function(e){return!e.equals(a)}}b=!b&&this.getLast&&this.getLast();var e;if(!b){if(this.type==CKEDITOR.NODE_ELEMENT&&g&&!1===g(this,!0))return null;b=this.getPrevious()}for(;!b&&(e=(e||this).getParent());){if(g&&!1===g(e,!0))return null;b=e.getPrevious()}return!b||g&&!1===g(b)?null:h&&b.type!=h?b.getPreviousSourceNode(!1,h,g):
b},getPrevious:function(b){var h=this.$,g;do g=(h=h.previousSibling)&&10!=h.nodeType&&new CKEDITOR.dom.node(h);while(g&&b&&!b(g));return g},getNext:function(b){var h=this.$,g;do g=(h=h.nextSibling)&&new CKEDITOR.dom.node(h);while(g&&b&&!b(g));return g},getParent:function(b){var h=this.$.parentNode;return h&&(h.nodeType==CKEDITOR.NODE_ELEMENT||b&&h.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(h):null},getParents:function(b){var h=this,g=[];do g[b?"push":"unshift"](h);while(h=h.getParent());
return g},getCommonAncestor:function(b){if(b.equals(this))return this;if(b.contains&&b.contains(this))return b;var h=this.contains?this:this.getParent();do if(h.contains(b))return h;while(h=h.getParent());return null},getPosition:function(b){var h=this.$,g=b.$;if(h.compareDocumentPosition)return h.compareDocumentPosition(g);if(h==g)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&b.type==CKEDITOR.NODE_ELEMENT){if(h.contains){if(h.contains(g))return CKEDITOR.POSITION_CONTAINS+
CKEDITOR.POSITION_PRECEDING;if(g.contains(h))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in h)return 0>h.sourceIndex||0>g.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:h.sourceIndex<g.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}h=this.getAddress();b=b.getAddress();for(var g=Math.min(h.length,b.length),a=0;a<g;a++)if(h[a]!=b[a])return h[a]<b[a]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return h.length<b.length?CKEDITOR.POSITION_CONTAINS+
CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(b,h){var g=this.$,a,e;h||(g=g.parentNode);"function"==typeof b?(e=!0,a=b):(e=!1,a=function(a){a="string"==typeof a.nodeName?a.nodeName.toLowerCase():"";return"string"==typeof b?a==b:a in b});for(;g;){if(a(e?new CKEDITOR.dom.node(g):g))return new CKEDITOR.dom.node(g);try{g=g.parentNode}catch(m){g=null}}return null},hasAscendant:function(b,h){var g=this.$;h||(g=g.parentNode);for(;g;){if(g.nodeName&&
g.nodeName.toLowerCase()==b)return!0;g=g.parentNode}return!1},move:function(b,h){b.append(this.remove(),h)},remove:function(b){var h=this.$,g=h.parentNode;if(g){if(b)for(;b=h.firstChild;)g.insertBefore(h.removeChild(b),h);g.removeChild(h)}return this},replace:function(b){this.insertBefore(b);b.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var b;this.getFirst&&(b=this.getFirst());){if(b.type==CKEDITOR.NODE_TEXT){var h=CKEDITOR.tools.ltrim(b.getText()),g=b.getLength();if(h)h.length<
g&&(b.split(g-h.length),this.$.removeChild(this.$.firstChild));else{b.remove();continue}}break}},rtrim:function(){for(var b;this.getLast&&(b=this.getLast());){if(b.type==CKEDITOR.NODE_TEXT){var h=CKEDITOR.tools.rtrim(b.getText()),g=b.getLength();if(h)h.length<g&&(b.split(h.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));else{b.remove();continue}}break}CKEDITOR.env.needsBrFiller&&(b=this.$.lastChild)&&1==b.type&&"br"==b.nodeName.toLowerCase()&&b.parentNode.removeChild(b)},isReadOnly:function(b){var h=
this;this.type!=CKEDITOR.NODE_ELEMENT&&(h=this.getParent());CKEDITOR.env.edge&&h&&h.is("textarea","input")&&(b=!0);if(!b&&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(b){CKEDITOR.dom.domObject.call(this,b)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,
CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var b=this.$.document,h="CSS1Compat"==b.compatMode;return{width:(h?b.documentElement.clientWidth:b.body.clientWidth)||0,height:(h?b.documentElement.clientHeight:b.body.clientHeight)||0}},getScrollPosition:function(){var b=this.$;if("pageXOffset"in b)return{x:b.pageXOffset||0,y:b.pageYOffset||0};b=b.document;return{x:b.documentElement.scrollLeft||b.body.scrollLeft||0,y:b.documentElement.scrollTop||
b.body.scrollTop||0}},getFrame:function(){var b=this.$.frameElement;return b?new CKEDITOR.dom.element.get(b):null}}),CKEDITOR.dom.document=function(b){CKEDITOR.dom.domObject.call(this,b)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(b){b=CKEDITOR.appendTimestamp(b);if(this.$.createStyleSheet)this.$.createStyleSheet(b);else{var h=new CKEDITOR.dom.element("link");h.setAttributes({rel:"stylesheet",
type:"text/css",href:b});this.getHead().append(h)}},appendStyleText:function(b){if(this.$.createStyleSheet){var h=this.$.createStyleSheet("");h.cssText=b}else{var g=new CKEDITOR.dom.element("style",this);g.append(new CKEDITOR.dom.text(b,this));this.getHead().append(g)}return h||g.$.sheet},createElement:function(b,h){var g=new CKEDITOR.dom.element(b,this);h&&(h.attributes&&g.setAttributes(h.attributes),h.styles&&g.setStyles(h.styles));return g},createText:function(b){return new CKEDITOR.dom.text(b,
this)},focus:function(){this.getWindow().focus()},getActive:function(){var b;try{b=this.$.activeElement}catch(h){return null}return new CKEDITOR.dom.element(b)},getById:function(b){return(b=this.$.getElementById(b))?new CKEDITOR.dom.element(b):null},getByAddress:function(b,h){for(var g=this.$.documentElement,a=0;g&&a<b.length;a++){var e=b[a];if(h)for(var m=-1,k=0;k<g.childNodes.length;k++){var l=g.childNodes[k];if(!0!==h||3!=l.nodeType||!l.previousSibling||3!=l.previousSibling.nodeType)if(m++,m==
e){g=l;break}}else g=g.childNodes[e]}return g?new CKEDITOR.dom.node(g):null},getElementsByTag:function(b,h){CKEDITOR.env.ie&&8>=document.documentMode||!h||(b=h+":"+b);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(b))},getHead:function(){var b=this.$.getElementsByTagName("head")[0];return b=b?new CKEDITOR.dom.element(b):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(b){this.$.open("text/html","replace");CKEDITOR.env.ie&&(b=b.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(b);this.$.close()},find:function(b){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(b))},findOne:function(b){return(b=this.$.querySelector(b))?new CKEDITOR.dom.element(b):null},
_getHtml5ShivFrag:function(){var b=this.getCustomData("html5ShivFrag");b||(b=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(b,!0),this.setCustomData("html5ShivFrag",b));return b}}),CKEDITOR.dom.nodeList=function(b){this.$=b},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(b){return 0>b||b>=this.$.length?null:(b=this.$[b])?new CKEDITOR.dom.node(b):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(b){return new CKEDITOR.dom.node(b)})}},
CKEDITOR.dom.element=function(b,h){"string"==typeof b&&(b=(h?h.$:document).createElement(b));CKEDITOR.dom.domObject.call(this,b)},CKEDITOR.dom.element.get=function(b){return(b="string"==typeof b?document.getElementById(b)||document.getElementsByName(b)[0]:b)&&(b.$?b:new CKEDITOR.dom.element(b))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(b,h){var g=new CKEDITOR.dom.element("div",h);g.setHtml(b);return g.getFirst().remove()},CKEDITOR.dom.element.setMarker=
function(b,h,g,a){var e=h.getCustomData("list_marker_id")||h.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),m=h.getCustomData("list_marker_names")||h.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");b[e]=h;m[g]=1;return h.setCustomData(g,a)},CKEDITOR.dom.element.clearAllMarkers=function(b){for(var h in b)CKEDITOR.dom.element.clearMarkers(b,b[h],1)},CKEDITOR.dom.element.clearMarkers=function(b,h,g){var a=h.getCustomData("list_marker_names"),
e=h.getCustomData("list_marker_id"),m;for(m in a)h.removeCustomData(m);h.removeCustomData("list_marker_names");g&&(h.removeCustomData("list_marker_id"),delete b[e])},function(){function b(a,c){return-1<(" "+a+" ").replace(m," ").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 g(a,c){var f=CKEDITOR.tools.escapeCss(a.$.id);return"#"+f+" "+c.split(/,\s*/).join(", #"+f+" ")}function a(a){for(var c=
0,f=0,d=k[a].length;f<d;f++)c+=parseFloat(this.getComputedStyle(k[a][f])||0,10)||0;return c}var e=document.createElement("_").classList,e="undefined"!==typeof e&&null!==String(e.add).match(/\[Native code\]/gi),m=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:e?function(a){this.$.classList.add(a);return this}:function(a){var c=this.$.className;c&&(b(c,a)||(c+=" "+a));this.$.className=c||a;return this},removeClass:e?function(a){var c=this.$;c.classList.remove(a);
c.className||c.removeAttribute("class");return this}:function(a){var c=this.getAttribute("class");c&&b(c,a)&&((c=c.replace(new RegExp("(?:^|\\s+)"+a+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",c):this.removeAttribute("class"));return this},hasClass:function(a){return b(this.$.className,a)},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 f=new CKEDITOR.dom.range(this.getDocument());f.setStartAfter(this);f.setEndAfter(a);var d=f.extractContents(!1,c||!1),e;f.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(f=new CKEDITOR.dom.element("div");e=d.getFirst();)e.$.style.backgroundColor&&(e.$.style.backgroundColor=e.$.style.backgroundColor),f.append(e);f.insertAfter(this);f.remove(!0)}else d.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 f=this.getDocument()._getHtml5ShivFrag();f.appendChild(c);c.innerHTML=a;f.removeChild(c);return a}catch(d){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(c){return this.$.getAttribute(c,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(c){switch(c){case "class":c=
"className";break;case "http-equiv":c="httpEquiv";break;case "name":return this.$.name;case "tabindex":return c=this.$.getAttribute(c,2),0!==c&&0===this.$.tabIndex&&(c=null),c;case "checked":return c=this.$.attributes.getNamedItem(c),(c.specified?c.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[c];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):
null}return this.$.getAttribute(c,2)}:a}(),getAttributes:function(a){var c={},f=this.$.attributes,d;a=CKEDITOR.tools.isArray(a)?a:[];for(d=0;d<f.length;d++)-1===CKEDITOR.tools.indexOf(a,f[d].name)&&(c[f[d].name]=f[d].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 f=this.getParent();f.type==CKEDITOR.NODE_ELEMENT&&(f=f.clone(),f.setHtml(c),c=f.getHtml(),f.setHtml(a),a=f.getHtml())}return c==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),c,f;a&&CKEDITOR.env.webkit&&
(c=this.getWindow(),!c.equals(CKEDITOR.document.getWindow())&&(f=c.$.frameElement)&&(a=(new CKEDITOR.dom.element(f)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var a=this.getChildren(),c=0,f=a.count();c<f;c++){var d=a.getItem(c);if(d.type!=CKEDITOR.NODE_ELEMENT||!d.data("cke-bookmark"))if(d.type==CKEDITOR.NODE_ELEMENT&&!d.isEmptyInlineRemoveable()||d.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(d.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 f=a[c];switch(f.nodeName){case "class":if(this.getAttribute("class"))return!0;case "data-cke-expando":continue;default:if(f.specified)return!0}}return!1}:function(){var a=this.$.attributes,c=a.length,f={"data-cke-expando":1,_moz_dirty:1};return 0<c&&(2<c||!f[a[0].nodeName]||2==c&&!f[a[1].nodeName])},hasAttribute:function(){function a(c){var f=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 f?f.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 f=this.$;
a=a.$;if(f!=a){var d;if(c)for(;d=f.lastChild;)a.insertBefore(f.removeChild(d),a.firstChild);else for(;d=f.firstChild;)a.appendChild(f.removeChild(d))}},mergeSiblings:function(){function a(c,f,d){if(f&&f.type==CKEDITOR.NODE_ELEMENT){for(var e=[];f.data("cke-bookmark")||f.isEmptyInlineRemoveable();)if(e.push(f),f=d?f.getNext():f.getPrevious(),!f||f.type!=CKEDITOR.NODE_ELEMENT)return;if(c.isIdentical(f)){for(var b=d?c.getLast():c.getFirst();e.length;)e.shift().move(c,!d);f.moveChildren(c,!d);f.remove();
b&&b.type==CKEDITOR.NODE_ELEMENT&&b.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,f){this.$.setAttribute(a,f);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(c,f){"class"==c?this.$.className=f:"style"==c?this.$.style.cssText=f:"tabindex"==c?
this.$.tabIndex=f:"checked"==c?this.$.checked=f:"contenteditable"==c?a.call(this,"contentEditable",f):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(c,f){if("src"==c&&f.match(/^http:\/\//))try{a.apply(this,arguments)}catch(d){}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 f=["top","left","right","bottom"],d;"border"==a&&(d=["color","style","width"]);for(var c=[],e=0;e<f.length;e++)if(d)for(var b=0;b<d.length;b++)c.push([a,f[e],d[b]].join("-"));else c.push([a,f[e]].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("*"),f=0,d=c.count();f<d;f++)a=c.getItem(f),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,f=0,d=this.getDocument(),e=d.getBody(),b="BackCompat"==d.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?8!==CKEDITOR.env.version:1)){var k=this.$.getBoundingClientRect(),g=d.$.documentElement,m=g.clientTop||e.$.clientTop||0,h=g.clientLeft||e.$.clientLeft||0,B=!0;CKEDITOR.env.ie&&(B=d.getDocumentElement().contains(this),
d=d.getBody().contains(this),B=b&&d||!b&&B);B&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(c=e.$.scrollLeft||g.scrollLeft,f=e.$.scrollTop||g.scrollTop):(f=b?e.$:g,c=f.scrollLeft,f=f.scrollTop),c=k.left+c-h,f=k.top+f-m)}else for(m=this,h=null;m&&"body"!=m.getName()&&"html"!=m.getName();){c+=m.$.offsetLeft-m.$.scrollLeft;f+=m.$.offsetTop-m.$.scrollTop;m.equals(this)||(c+=m.$.clientLeft||0,f+=m.$.clientTop||0);for(;h&&!h.equals(m);)c-=h.$.scrollLeft,f-=h.$.scrollTop,h=h.getParent();
h=m;m=(k=m.$.offsetParent)?new CKEDITOR.dom.element(k):null}a&&(k=this.getWindow(),m=a.getWindow(),!k.equals(m)&&k.$.frameElement&&(a=(new CKEDITOR.dom.element(k.$.frameElement)).getDocumentPosition(a),c+=a.x,f+=a.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||b||(c+=this.$.clientLeft?1:0,f+=this.$.clientTop?1:0);return{x:c,y:f}},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 f=c.getWindow();try{var d=f.$.frameElement;d&&(c=new CKEDITOR.dom.element(d))}catch(e){}}while(c=c.getParent())}},scrollIntoParent:function(a,c,f){var d,e,b,k;function g(d,c){/body|html/.test(a.getName())?a.getWindow().$.scrollBy(d,c):(a.$.scrollLeft+=d,a.$.scrollTop+=c)}function m(d,a){var c={x:0,y:0};if(!d.is(B?"body":"html")){var f=d.$.getBoundingClientRect();c.x=f.left;c.y=f.top}f=d.getWindow();f.equals(a)||(f=m(CKEDITOR.dom.element.get(f.$.frameElement),
a),c.x+=f.x,c.y+=f.y);return c}function h(d,a){return parseInt(d.getComputedStyle("margin-"+a)||0,10)||0}!a&&(a=this.getWindow());b=a.getDocument();var B="BackCompat"==b.$.compatMode;a instanceof CKEDITOR.dom.window&&(a=B?b.getBody():b.getDocumentElement());CKEDITOR.env.webkit&&(b=this.getEditor(!1))&&(b._.previousScrollTop=null);b=a.getWindow();e=m(this,b);var r=m(a,b),y=this.$.offsetHeight;d=this.$.offsetWidth;var z=a.$.clientHeight,v=a.$.clientWidth;b=e.x-h(this,"left")-r.x||0;k=e.y-h(this,"top")-
r.y||0;d=e.x+d+h(this,"right")-(r.x+v)||0;e=e.y+y+h(this,"bottom")-(r.y+z)||0;(0>k||0<e)&&g(0,!0===c?k:!1===c?e:0>k?k:e);f&&(0>b||0<d)&&g(0>b?b:d,0)},setState:function(a,c,f){c=c||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(c+"_on");this.removeClass(c+"_off");this.removeClass(c+"_disabled");f&&this.setAttribute("aria-pressed",!0);f&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(c+"_disabled");this.removeClass(c+"_off");this.removeClass(c+"_on");
f&&this.setAttribute("aria-disabled",!0);f&&this.removeAttribute("aria-pressed");break;default:this.addClass(c+"_off"),this.removeClass(c+"_on"),this.removeClass(c+"_disabled"),f&&this.removeAttribute("aria-pressed"),f&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(c){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,c){var f=this.$.attributes;c=c||{};for(var d=0;d<f.length;d++){var e=
f[d],b=e.nodeName.toLowerCase(),k;if(!(b in c))if("checked"==b&&(k=this.getAttribute(b)))a.setAttribute(b,k);else if(!CKEDITOR.env.ie||this.hasAttribute(b))k=this.getAttribute(b),null===k&&(k=e.nodeValue),a.setAttribute(b,k)}""!==this.$.style.cssText&&(a.$.style.cssText=this.$.style.cssText)},renameNode:function(a){if(this.getName()!=a){var c=this.getDocument();a=new CKEDITOR.dom.element(a,c);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(c,f){var d=c.childNodes;if(0<=f&&f<d.length)return d[f]}return function(c){var f=this.$;if(c.slice)for(c=c.slice();0<c.length&&f;)f=a(f,c.shift());else f=a(f,c);return f?new CKEDITOR.dom.node(f):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function a(c){return c.type==CKEDITOR.NODE_ELEMENT&&c.hasClass("cke_enable_context_menu")}this.on("contextmenu",
function(c){c.data.getTarget().getAscendant(a,!0)||c.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,c){a="data-"+a;if(void 0===c)return this.getAttribute(a);!1===c?this.removeAttribute(a):this.setAttribute(a,c);return null},getEditor:function(a){var c=CKEDITOR.instances,f,d,e;a=
a||void 0===a;for(f in c)if(d=c[f],d.element.equals(this)&&d.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!a&&(e=d.editable())&&(e.equals(this)||e.contains(this)))return d;return null},find:function(a){var c=h(this);a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(g(this,a)));c();return a},findOne:function(a){var c=h(this);a=this.$.querySelector(g(this,a));c();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,c,f){if(!(f||c&&this.type!=c))var d=a(this);if(!1!==d){f=this.getChildren();
for(var e=0;e<f.count();e++)d=f.getItem(e),d.type==CKEDITOR.NODE_ELEMENT?d.forEach(a,c):c&&d.type!=c||a(d)}},fireEventHandler:function(a,c){var f="on"+a,d=this.$;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version){var e=d.ownerDocument.createEventObject(),b;for(b in c)e[b]=c[b];d.fireEvent(f,e)}else d[d[a]?a:f](c)},isDetached:function(){var a=this.getDocument(),c=a.getDocumentElement();return c.equals(this)||c.contains(this)?!CKEDITOR.env.ie||8<CKEDITOR.env.version&&!CKEDITOR.env.quirks?!a.$.defaultView:
!1:!0}});var k={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(e,c,f){"number"==typeof c&&(!f||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(c-=a.call(this,e)),this.setStyle(e,c+"px"))};CKEDITOR.dom.element.prototype.getSize=function(e,c){var f=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(e)],this.$["client"+CKEDITOR.tools.capitalize(e)])||
0;c&&(f-=a.call(this,e));return f}}(),CKEDITOR.dom.documentFragment=function(b){b=b||CKEDITOR.document;this.$=b.type==CKEDITOR.NODE_DOCUMENT?b.$.createDocumentFragment():b},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(b){b=b.$;b.parentNode.insertBefore(this.$,b.nextSibling)},getHtml:function(){var b=new CKEDITOR.dom.element("div");this.clone(1,1).appendTo(b);return b.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 b(d,a){var c=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed)return this.end(),
null;c.optimize()}var f,e=c.startContainer;f=c.endContainer;var b=c.startOffset,k=c.endOffset,n,g=this.guard,m=this.type,h=d?"getPreviousSourceNode":"getNextSourceNode";if(!d&&!this._.guardLTR){var l=f.type==CKEDITOR.NODE_ELEMENT?f:f.getParent(),D=f.type==CKEDITOR.NODE_ELEMENT?f.getChild(k):f.getNext();this._.guardLTR=function(d,a){return(!a||!l.equals(d))&&(!D||!d.equals(D))&&(d.type!=CKEDITOR.NODE_ELEMENT||!a||!d.equals(c.root))}}if(d&&!this._.guardRTL){var A=e.type==CKEDITOR.NODE_ELEMENT?e:e.getParent(),
H=e.type==CKEDITOR.NODE_ELEMENT?b?e.getChild(b-1):null:e.getPrevious();this._.guardRTL=function(d,a){return(!a||!A.equals(d))&&(!H||!d.equals(H))&&(d.type!=CKEDITOR.NODE_ELEMENT||!a||!d.equals(c.root))}}var F=d?this._.guardRTL:this._.guardLTR;n=g?function(d,a){return!1===F(d,a)?!1:g(d,a)}:F;this.current?f=this.current[h](!1,m,n):(d?f.type==CKEDITOR.NODE_ELEMENT&&(f=0<k?f.getChild(k-1):!1===n(f,!0)?null:f.getPreviousSourceNode(!0,m,n)):(f=e,f.type==CKEDITOR.NODE_ELEMENT&&((f=f.getChild(b))||(f=!1===
n(e,!0)?null:e.getNextSourceNode(!0,m,n)))),f&&!1===n(f)&&(f=null));for(;f&&!this._.end;){this.current=f;if(!this.evaluator||!1!==this.evaluator(f)){if(!a)return f}else if(a&&this.evaluator)return!1;f=f[h](!1,m,n)}this.end();return this.current=null}function h(d){for(var a,c=null;a=b.call(this,d);)c=a;return c}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(d){this.range=d;this._={}},proto:{end:function(){this._.end=1},next:function(){return b.call(this)},previous:function(){return b.call(this,
1)},checkForward:function(){return!1!==b.call(this,0,1)},checkBackward:function(){return!1!==b.call(this,1,1)},lastForward:function(){return h.call(this)},lastBackward:function(){return h.call(this,1)},reset:function(){delete this.current;this._={}}}});var g={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},a={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=
function(d){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in a||!g[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||d&&this.is(d)):!0};CKEDITOR.dom.walker.blockBoundary=function(d){return function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary(d))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(d,a){function c(d){return d&&d.getName&&"span"==d.getName()&&d.data("cke-bookmark")}
return function(f){var e,b;e=f&&f.type!=CKEDITOR.NODE_ELEMENT&&(b=f.getParent())&&c(b);e=d?e:e||c(f);return!!(a^e)}};CKEDITOR.dom.walker.whitespaces=function(d){return function(a){var c;a&&a.type==CKEDITOR.NODE_TEXT&&(c=!CKEDITOR.tools.trim(a.getText())||CKEDITOR.env.webkit&&a.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);return!!(d^c)}};CKEDITOR.dom.walker.invisible=function(d){var a=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.env.webkit?1:0;return function(f){a(f)?f=1:(f.type==CKEDITOR.NODE_TEXT&&
(f=f.getParent()),f=f.$.offsetWidth<=c);return!!(d^f)}};CKEDITOR.dom.walker.nodeType=function(d,a){return function(c){return!!(a^c.type==d)}};CKEDITOR.dom.walker.bogus=function(d){function a(d){return!m(d)&&!k(d)}return function(c){var f=CKEDITOR.env.needsBrFiller?c.is&&c.is("br"):c.getText&&e.test(c.getText());f&&(f=c.getParent(),c=c.getNext(a),f=f.isBlockBoundary()&&(!c||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()));return!!(d^f)}};CKEDITOR.dom.walker.temp=function(d){return function(a){a.type!=
CKEDITOR.NODE_ELEMENT&&(a=a.getParent());a=a&&a.hasAttribute("data-cke-temp");return!!(d^a)}};var e=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,m=CKEDITOR.dom.walker.whitespaces(),k=CKEDITOR.dom.walker.bookmark(),l=CKEDITOR.dom.walker.temp(),c=function(d){return k(d)||m(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$inline)&&!d.is(CKEDITOR.dtd.$empty)};CKEDITOR.dom.walker.ignored=function(d){return function(a){a=m(a)||k(a)||l(a);return!!(d^a)}};var f=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=
function(d){return function(a){for(var c=0,e=a.getChildCount();c<e;++c)if(!f(a.getChild(c)))return!!d;return!d}};var d=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(d){var a={},c;for(c in d)CKEDITOR.dtd[c]["#"]&&(a[c]=1);return a}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=function(a){return function(c){c=f(c)?!1:c.type==CKEDITOR.NODE_TEXT||c.type==CKEDITOR.NODE_ELEMENT&&(c.is(CKEDITOR.dtd.$inline)||c.is("hr")||
"false"==c.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&c.is(n)&&d(c))?!0:!1;return!!(a^c)}};CKEDITOR.dom.element.prototype.getBogus=function(){var d=this;do d=d.getPreviousSourceNode();while(c(d));return d&&(CKEDITOR.env.needsBrFiller?d.is&&d.is("br"):d.getText&&e.test(d.getText()))?d:!1}}(),"use strict",CKEDITOR.dom.range=function(b){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=!0;var h=b instanceof CKEDITOR.dom.document;this.document=
h?b:b.getDocument();this.root=h?b.getBody():b},function(){function b(d){d.collapsed=d.startContainer&&d.endContainer&&d.startContainer.equals(d.endContainer)&&d.startOffset==d.endOffset}function h(d,a,c,f,e){function b(d,a,c,f){var k=c?d.getPrevious():d.getNext();if(f&&m)return k;l||f?a.append(d.clone(!0,e),c):(d.remove(),h&&a.append(d,c));return k}function k(){var d,a,c,f=Math.min(I.length,E.length);for(d=0;d<f;d++)if(a=I[d],c=E[d],!a.equals(c))return d;return d-1}function g(){var a=P-1,c=F&&J&&
!v.equals(t);a<L-1||a<O-1||c?(c?d.moveToPosition(t,CKEDITOR.POSITION_BEFORE_START):O==a+1&&H?d.moveToPosition(E[a],CKEDITOR.POSITION_BEFORE_END):d.moveToPosition(E[a+1],CKEDITOR.POSITION_BEFORE_START),f&&(a=I[a+1])&&a.type==CKEDITOR.NODE_ELEMENT&&(c=CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',d.document),c.insertAfter(a),a.mergeSiblings(!1),d.moveToBookmark({startNode:c}))):d.collapse(!0)}d.optimizeBookmark();var m=0===
a,h=1==a,l=2==a;a=l||h;var v=d.startContainer,t=d.endContainer,C=d.startOffset,D=d.endOffset,A,H,F,J,G,M;if(l&&t.type==CKEDITOR.NODE_TEXT&&(v.equals(t)||v.type===CKEDITOR.NODE_ELEMENT&&v.getFirst().equals(t)))c.append(d.document.createText(t.substring(C,D)));else{t.type==CKEDITOR.NODE_TEXT?l?M=!0:t=t.split(D):0<t.getChildCount()?D>=t.getChildCount()?(t=t.getChild(D-1),H=!0):t=t.getChild(D):J=H=!0;v.type==CKEDITOR.NODE_TEXT?l?G=!0:v.split(C):0<v.getChildCount()?0===C?(v=v.getChild(C),A=!0):v=v.getChild(C-
1):F=A=!0;for(var I=v.getParents(),E=t.getParents(),P=k(),L=I.length-1,O=E.length-1,N=c,X,S,Y,da=-1,U=P;U<=L;U++){S=I[U];Y=S.getNext();for(U!=L||S.equals(E[U])&&L<O?a&&(X=N.append(S.clone(0,e))):A?b(S,N,!1,F):G&&N.append(d.document.createText(S.substring(C)));Y;){if(Y.equals(E[U])){da=U;break}Y=b(Y,N)}N=X}N=c;for(U=P;U<=O;U++)if(c=E[U],Y=c.getPrevious(),c.equals(I[U]))a&&(N=N.getChild(0));else{U!=O||c.equals(I[U])&&O<L?a&&(X=N.append(c.clone(0,e))):H?b(c,N,!1,J):M&&N.append(d.document.createText(c.substring(0,
D)));if(U>da)for(;Y;)Y=b(Y,N,!0);N=X}l||g()}}function g(){var d=!1,a=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!0),f=CKEDITOR.dom.walker.bogus();return function(e){return c(e)||a(e)?!0:f(e)&&!d?d=!0:e.type==CKEDITOR.NODE_TEXT&&(e.hasAscendant("pre")||CKEDITOR.tools.trim(e.getText()).length)||e.type==CKEDITOR.NODE_ELEMENT&&!e.is(m)?!1:!0}}function a(d){var a=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(f){return c(f)||a(f)?!0:!d&&k(f)||
f.type==CKEDITOR.NODE_ELEMENT&&f.is(CKEDITOR.dtd.$removeEmpty)}}function e(d){return function(){var a;return this[d?"getPreviousNode":"getNextNode"](function(d){!a&&f(d)&&(a=d);return c(d)&&!(k(d)&&d.equals(a))})}}var m={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},k=CKEDITOR.dom.walker.bogus(),l=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,c=CKEDITOR.dom.walker.editable(),f=CKEDITOR.dom.walker.ignored(!0);
CKEDITOR.dom.range.prototype={clone:function(){var d=new CKEDITOR.dom.range(this.root);d._setStartContainer(this.startContainer);d.startOffset=this.startOffset;d._setEndContainer(this.endContainer);d.endOffset=this.endOffset;d.collapsed=this.collapsed;return d},collapse:function(d){d?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(d){var a=new CKEDITOR.dom.documentFragment(this.document);
this.collapsed||h(this,2,a,!1,"undefined"==typeof d?!0:d);return a},deleteContents:function(d){this.collapsed||h(this,0,null,d)},extractContents:function(d,a){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||h(this,1,c,d,"undefined"==typeof a?!0:a);return c},equals:function(d){return this.startOffset===d.startOffset&&this.endOffset===d.endOffset&&this.startContainer.equals(d.startContainer)&&this.endContainer.equals(d.endContainer)},createBookmark:function(d){function a(d){return d.getAscendant(function(d){var a;
if(a=d.data&&d.data("cke-temp"))a=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],d.getAttribute("id"));return a},!0)}var c=this.startContainer,f=this.endContainer,e=this.collapsed,b,k,g,m;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml("\x26nbsp;");d&&(g="cke_bm_"+CKEDITOR.tools.getNextNumber(),b.setAttribute("id",g+(e?"C":"S")));e||(k=b.clone(),k.setHtml("\x26nbsp;"),d&&k.setAttribute("id",g+"E"),m=this.clone(),a(f)&&(f=a(f),
m.moveToPosition(f,CKEDITOR.POSITION_AFTER_END)),m.collapse(),m.insertNode(k));m=this.clone();a(c)&&(f=a(c),m.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START));m.collapse(!0);m.insertNode(b);k?(this.setStartAfter(b),this.setEndBefore(k)):this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:d?g+(e?"C":"S"):b,endNode:d?g+"E":k,serializable:d,collapsed:e}},createBookmark2:function(){function d(d){var a=d.container,f=d.offset,e;e=a;var b=f;e=e.type!=CKEDITOR.NODE_ELEMENT||0===b||b==e.getChildCount()?
0:e.getChild(b-1).type==CKEDITOR.NODE_TEXT&&e.getChild(b).type==CKEDITOR.NODE_TEXT;e&&(a=a.getChild(f-1),f=a.getLength());if(a.type==CKEDITOR.NODE_ELEMENT&&0<f){a:{for(e=a;f--;)if(b=e.getChild(f).getIndex(!0),0<=b){f=b;break a}f=-1}f+=1}if(a.type==CKEDITOR.NODE_TEXT){e=a;for(b=0;(e=e.getPrevious())&&e.type==CKEDITOR.NODE_TEXT;)b+=e.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;e=b;a.isEmpty()?(b=a.getPrevious(c),e?(f=e,a=b?b.getNext():a.getParent().getFirst()):(a=a.getParent(),
f=b?b.getIndex(!0)+1:0)):f+=e}d.container=a;d.offset=f}function a(d,c){var f=c.getCustomData("cke-fillingChar");if(f){var e=d.container;f.equals(e)&&(d.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=d.offset&&(d.offset=e.getIndex(),d.container=e.getParent()))}}var c=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(c){var f=this.collapsed,e={container:this.startContainer,offset:this.startOffset},b={container:this.endContainer,offset:this.endOffset};c&&(d(e),a(e,this.root),
f||(d(b),a(b,this.root)));return{start:e.container.getAddress(c),end:f?null:b.container.getAddress(c),startOffset:e.offset,endOffset:b.offset,normalized:c,collapsed:f,is2:!0}}}(),moveToBookmark:function(d){if(d.is2){var a=this.document.getByAddress(d.start,d.normalized),c=d.startOffset,f=d.end&&this.document.getByAddress(d.end,d.normalized);d=d.endOffset;this.setStart(a,c);f?this.setEnd(f,d):this.collapse(!0)}else a=(c=d.serializable)?this.document.getById(d.startNode):d.startNode,d=c?this.document.getById(d.endNode):
d.endNode,this.setStartBefore(a),a.remove(),d?(this.setEndBefore(d),d.remove()):this.collapse(!0)},getBoundaryNodes:function(){var d=this.startContainer,a=this.endContainer,c=this.startOffset,f=this.endOffset,e;if(d.type==CKEDITOR.NODE_ELEMENT)if(e=d.getChildCount(),e>c)d=d.getChild(c);else if(1>e)d=d.getPreviousSourceNode();else{for(d=d.$;d.lastChild;)d=d.lastChild;d=new CKEDITOR.dom.node(d);d=d.getNextSourceNode()||d}if(a.type==CKEDITOR.NODE_ELEMENT)if(e=a.getChildCount(),e>f)a=a.getChild(f).getPreviousSourceNode(!0);
else if(1>e)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a)}d.getPosition(a)&CKEDITOR.POSITION_FOLLOWING&&(d=a);return{startNode:d,endNode:a}},getCommonAncestor:function(d,a){var c=this.startContainer,f=this.endContainer,c=c.equals(f)?d&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(f);return a&&!c.is?c.getParent():c},optimize:function(){var d=this.startContainer,a=this.startOffset;
d.type!=CKEDITOR.NODE_ELEMENT&&(a?a>=d.getLength()&&this.setStartAfter(d):this.setStartBefore(d));d=this.endContainer;a=this.endOffset;d.type!=CKEDITOR.NODE_ELEMENT&&(a?a>=d.getLength()&&this.setEndAfter(d):this.setEndBefore(d))},optimizeBookmark:function(){var d=this.startContainer,a=this.endContainer;d.is&&d.is("span")&&d.data("cke-bookmark")&&this.setStartAt(d,CKEDITOR.POSITION_BEFORE_START);a&&a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setEndAt(a,CKEDITOR.POSITION_AFTER_END)},trim:function(d,
a){var c=this.startContainer,f=this.startOffset,e=this.collapsed;if((!d||e)&&c&&c.type==CKEDITOR.NODE_TEXT){if(f)if(f>=c.getLength())f=c.getIndex()+1,c=c.getParent();else{var b=c.split(f),f=c.getIndex()+1,c=c.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(b,this.endOffset-this.startOffset):c.equals(this.endContainer)&&(this.endOffset+=1)}else f=c.getIndex(),c=c.getParent();this.setStart(c,f);if(e){this.collapse(!0);return}}c=this.endContainer;f=this.endOffset;a||e||!c||c.type!=
CKEDITOR.NODE_TEXT||(f?(f>=c.getLength()||c.split(f),f=c.getIndex()+1):f=c.getIndex(),c=c.getParent(),this.setEnd(c,f))},enlarge:function(d,a){function c(d){return d&&d.type==CKEDITOR.NODE_ELEMENT&&d.hasAttribute("contenteditable")?null:d}function f(d,a,c){var k=new CKEDITOR.dom.range(c);k.setStart(d,a);k.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(k);for(c.guard=function(d){return!(d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary())};k=c.next();){if(k.type!=CKEDITOR.NODE_TEXT)return!1;
b=k!=d?k.getText():k.substring(a);if(e.test(b))return!1}return!0}var e=new RegExp(/[^\s\ufeff]/),b,k;switch(d){case CKEDITOR.ENLARGE_INLINE:var g=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var m=this.getCommonAncestor();k=this.root;var h,l,v,t,C,D=!1,A;A=this.startContainer;var H=this.startOffset;A.type==CKEDITOR.NODE_TEXT?(H&&(A=!CKEDITOR.tools.trim(A.substring(0,H)).length&&A,D=!!A),A&&((t=A.getPrevious())||(v=A.getParent()))):(H&&(t=A.getChild(H-1)||A.getLast()),t||(v=A));for(v=c(v);v||
t;){if(v&&!t){!C&&v.equals(m)&&(C=!0);if(g?v.isBlockBoundary():!k.contains(v))break;D&&"inline"==v.getComputedStyle("display")||(D=!1,C?h=v:this.setStartBefore(v));t=v.getPrevious()}for(;t;)if(A=!1,t.type==CKEDITOR.NODE_COMMENT)t=t.getPrevious();else{if(t.type==CKEDITOR.NODE_TEXT)b=t.getText(),e.test(b)&&(t=null),A=/[\s\ufeff]$/.test(b);else if((t.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||a&&t.is("br"))&&!t.data("cke-bookmark"))if(D&&CKEDITOR.dtd.$removeEmpty[t.getName()]){b=t.getText();if(e.test(b))t=
null;else for(var H=t.$.getElementsByTagName("*"),F=0,J;J=H[F++];)if(!CKEDITOR.dtd.$removeEmpty[J.nodeName.toLowerCase()]){t=null;break}t&&(A=!!b.length)}else t=null;A&&(D?C?h=v:v&&this.setStartBefore(v):D=!0);if(t){A=t.getPrevious();if(!v&&!A){v=t;t=null;break}t=A}else v=null}v&&(v=c(v.getParent()))}A=this.endContainer;H=this.endOffset;v=t=null;C=D=!1;A.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(A.substring(H)).length?D=!0:(D=!A.getLength(),H==A.getLength()?(t=A.getNext())||(v=A.getParent()):f(A,
H,k)&&(v=A.getParent())):(t=A.getChild(H))||(v=A);for(;v||t;){if(v&&!t){!C&&v.equals(m)&&(C=!0);if(g?v.isBlockBoundary():!k.contains(v))break;D&&"inline"==v.getComputedStyle("display")||(D=!1,C?l=v:v&&this.setEndAfter(v));t=v.getNext()}for(;t;){A=!1;if(t.type==CKEDITOR.NODE_TEXT)b=t.getText(),f(t,0,k)||(t=null),A=/^[\s\ufeff]/.test(b);else if(t.type==CKEDITOR.NODE_ELEMENT){if((0<t.$.offsetWidth||a&&t.is("br"))&&!t.data("cke-bookmark"))if(D&&CKEDITOR.dtd.$removeEmpty[t.getName()]){b=t.getText();if(e.test(b))t=
null;else for(H=t.$.getElementsByTagName("*"),F=0;J=H[F++];)if(!CKEDITOR.dtd.$removeEmpty[J.nodeName.toLowerCase()]){t=null;break}t&&(A=!!b.length)}else t=null}else A=1;A&&D&&(C?l=v:this.setEndAfter(v));if(t){A=t.getNext();if(!v&&!A){v=t;t=null;break}t=A}else v=null}v&&(v=c(v.getParent()))}h&&l&&(m=h.contains(l)?l:h,this.setStartBefore(m),this.setEndAfter(m));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:v=new CKEDITOR.dom.range(this.root);k=this.root;v.setStartAt(k,
CKEDITOR.POSITION_AFTER_START);v.setEnd(this.startContainer,this.startOffset);v=new CKEDITOR.dom.walker(v);var G,M,I=CKEDITOR.dom.walker.blockBoundary(d==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),E=null,P=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&"false"==d.getAttribute("contenteditable"))if(E){if(E.equals(d)){E=null;return}}else E=d;else if(E)return;var a=I(d);a||(G=d);return a},g=function(d){var a=P(d);!a&&d.is&&d.is("br")&&(M=d);return a};v.guard=P;v=v.lastBackward();G=G||k;this.setStartAt(G,
!G.is("br")&&(!v&&this.checkStartOfBlock()||v&&G.contains(v))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(d==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){v=this.clone();v=new CKEDITOR.dom.walker(v);var L=CKEDITOR.dom.walker.whitespaces(),O=CKEDITOR.dom.walker.bookmark();v.evaluator=function(d){return!L(d)&&!O(d)};if((v=v.previous())&&v.type==CKEDITOR.NODE_ELEMENT&&v.is("br"))break}v=this.clone();v.collapse();v.setEndAt(k,CKEDITOR.POSITION_BEFORE_END);v=new CKEDITOR.dom.walker(v);v.guard=
d==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?g:P;G=E=M=null;v=v.lastForward();G=G||k;this.setEndAt(G,!v&&this.checkEndOfBlock()||v&&G.contains(v)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);M&&this.setEndAfter(M)}},shrink:function(d,a,c){var f="boolean"===typeof c?c:c&&"boolean"===typeof c.shrinkOnBlockBoundary?c.shrinkOnBlockBoundary:!0,e=c&&c.skipBogus;if(!this.collapsed){d=d||CKEDITOR.SHRINK_TEXT;var b=this.clone(),k=this.startContainer,g=this.endContainer,m=this.startOffset,h=this.endOffset,
l=c=1;k&&k.type==CKEDITOR.NODE_TEXT&&(m?m>=k.getLength()?b.setStartAfter(k):(b.setStartBefore(k),c=0):b.setStartBefore(k));g&&g.type==CKEDITOR.NODE_TEXT&&(h?h>=g.getLength()?b.setEndAfter(g):(b.setEndAfter(g),l=0):b.setEndBefore(g));var b=new CKEDITOR.dom.walker(b),v=CKEDITOR.dom.walker.bookmark(),t=CKEDITOR.dom.walker.bogus();b.evaluator=function(a){return a.type==(d==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var C;b.guard=function(a,c){if(e&&t(a)||v(a))return!0;if(d==CKEDITOR.SHRINK_ELEMENT&&
a.type==CKEDITOR.NODE_TEXT||c&&a.equals(C)||!1===f&&a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary()||a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable"))return!1;c||a.type!=CKEDITOR.NODE_ELEMENT||(C=a);return!0};c&&(k=b[d==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(k,a?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);l&&(b.reset(),(b=b[d==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(b,a?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));
return!(!c&&!l)}},insertNode:function(d){this.optimizeBookmark();this.trim(!1,!0);var a=this.startContainer,c=a.getChild(this.startOffset);c?d.insertBefore(c):a.append(d);d.getParent()&&d.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(d)},moveToPosition:function(d,a){this.setStartAt(d,a);this.collapse(!0)},moveToRange:function(d){this.setStart(d.startContainer,d.startOffset);this.setEnd(d.endContainer,d.endOffset)},selectNodeContents:function(d){this.setStart(d,0);this.setEnd(d,
d.type==CKEDITOR.NODE_TEXT?d.getLength():d.getChildCount())},setStart:function(d,a){d.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[d.getName()]&&(a=d.getIndex(),d=d.getParent());this._setStartContainer(d);this.startOffset=a;this.endContainer||(this._setEndContainer(d),this.endOffset=a);b(this)},setEnd:function(d,a){d.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[d.getName()]&&(a=d.getIndex()+1,d=d.getParent());this._setEndContainer(d);this.endOffset=a;this.startContainer||(this._setStartContainer(d),
this.startOffset=a);b(this)},setStartAfter:function(d){this.setStart(d.getParent(),d.getIndex()+1)},setStartBefore:function(d){this.setStart(d.getParent(),d.getIndex())},setEndAfter:function(d){this.setEnd(d.getParent(),d.getIndex()+1)},setEndBefore:function(d){this.setEnd(d.getParent(),d.getIndex())},setStartAt:function(d,a){switch(a){case CKEDITOR.POSITION_AFTER_START:this.setStart(d,0);break;case CKEDITOR.POSITION_BEFORE_END:d.type==CKEDITOR.NODE_TEXT?this.setStart(d,d.getLength()):this.setStart(d,
d.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(d);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(d)}b(this)},setEndAt:function(d,a){switch(a){case CKEDITOR.POSITION_AFTER_START:this.setEnd(d,0);break;case CKEDITOR.POSITION_BEFORE_END:d.type==CKEDITOR.NODE_TEXT?this.setEnd(d,d.getLength()):this.setEnd(d,d.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(d);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(d)}b(this)},fixBlock:function(d,
a){var c=this.createBookmark(),f=this.document.createElement(a);this.collapse(d);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(f);f.trim();this.insertNode(f);var e=f.getBogus();e&&e.remove();f.appendBogus();this.moveToBookmark(c);return f},splitBlock:function(d,a){var c=new CKEDITOR.dom.elementPath(this.startContainer,this.root),f=new CKEDITOR.dom.elementPath(this.endContainer,this.root),e=c.block,b=f.block,k=null;if(!c.blockLimit.equals(f.blockLimit))return null;"br"!=
d&&(e||(e=this.fixBlock(!0,d),b=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),b||(b=this.fixBlock(!1,d)));c=e&&this.checkStartOfBlock();f=b&&this.checkEndOfBlock();this.deleteContents();e&&e.equals(b)&&(f?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END),b=null):c?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e=null):(b=this.splitElement(e,a||
!1),e.is("ul","ol")||e.appendBogus()));return{previousBlock:e,nextBlock:b,wasStartOfBlock:c,wasEndOfBlock:f,elementPath:k}},splitElement:function(d,a){if(!this.collapsed)return null;this.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);var c=this.extractContents(!1,a||!1),f=d.clone(!1,a||!1);c.appendTo(f);f.insertAfter(d);this.moveToPosition(d,CKEDITOR.POSITION_AFTER_END);return f},removeEmptyBlocksAtEnd:function(){function d(d){return function(f){return a(f)||c(f)||f.type==CKEDITOR.NODE_ELEMENT&&f.isEmptyInlineRemoveable()||
d.is("table")&&f.is("caption")?!1:!0}}var a=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!1);return function(a){for(var c=this.createBookmark(),f=this[a?"endPath":"startPath"](),e=f.block||f.blockLimit,b;e&&!e.equals(f.root)&&!e.getFirst(d(e));)b=e.getParent(),this[a?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END),e.remove(1),e=b;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(d,c){var f=c==CKEDITOR.START,e=this.clone();e.collapse(f);e[f?"setStartAt":"setEndAt"](d,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=a(f);return e[f?"checkBackward":"checkForward"]()},checkStartOfBlock:function(d){var a=this.startContainer,c=this.startOffset;CKEDITOR.env.ie&&c&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.ltrim(a.substring(0,c)),l.test(a)&&this.trim(0,1));d||this.trim();d=new CKEDITOR.dom.elementPath(this.startContainer,
this.root);a=this.clone();a.collapse(!0);a.setStartAt(d.block||d.blockLimit,CKEDITOR.POSITION_AFTER_START);d=new CKEDITOR.dom.walker(a);d.evaluator=g();return d.checkBackward()},checkEndOfBlock:function(a){var c=this.endContainer,f=this.endOffset;CKEDITOR.env.ie&&c.type==CKEDITOR.NODE_TEXT&&(c=CKEDITOR.tools.rtrim(c.substring(f)),l.test(c)&&this.trim(1,0));a||this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);c=this.clone();c.collapse(!1);c.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);
a=new CKEDITOR.dom.walker(c);a.evaluator=g();return a.checkForward()},getPreviousNode:function(a,c,f){var e=this.clone();e.collapse(1);e.setStartAt(f||this.root,CKEDITOR.POSITION_AFTER_START);f=new CKEDITOR.dom.walker(e);f.evaluator=a;f.guard=c;return f.previous()},getNextNode:function(a,c,f){var e=this.clone();e.collapse();e.setEndAt(f||this.root,CKEDITOR.POSITION_BEFORE_END);f=new CKEDITOR.dom.walker(e);f.evaluator=a;f.guard=c;return f.next()},checkReadOnly:function(){function a(d,c){for(;d;){if(d.type==
CKEDITOR.NODE_ELEMENT){if("false"==d.getAttribute("contentEditable")&&!d.data("cke-editable"))return 0;if(d.is("html")||"true"==d.getAttribute("contentEditable")&&(d.contains(c)||d.equals(c)))break}d=d.getParent()}return 1}return function(){var c=this.startContainer,f=this.endContainer;return!(a(c,f)&&a(f,c))}}(),moveToElementEditablePosition:function(a,c){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,c?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),
!0;for(var e=0;a;){if(a.type==CKEDITOR.NODE_TEXT){c&&this.endContainer&&this.checkEndOfBlock()&&l.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,c?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);e=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),e=1;else if(c&&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 b=a,k=e,g=void 0;b.type==CKEDITOR.NODE_ELEMENT&&b.isEditable(!1)&&(g=b[c?"getLast":"getFirst"](f));k||g||(g=b[c?"getPrevious":"getNext"](f));a=g}return!!e},moveToClosestEditablePosition:function(a,c){var f,e=0,b,k,g=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(f=new CKEDITOR.dom.range(this.root),f.moveToPosition(a,g[c?0:1])):f=this.clone();if(a&&
!a.is(CKEDITOR.dtd.$block))e=1;else if(b=f[c?"getNextEditableNode":"getPreviousEditableNode"]())e=1,(k=b.type==CKEDITOR.NODE_ELEMENT)&&b.is(CKEDITOR.dtd.$block)&&"false"==b.getAttribute("contenteditable")?(f.setStartAt(b,CKEDITOR.POSITION_BEFORE_START),f.setEndAt(b,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&k&&b.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(f.setEnd(b,0),f.collapse()):f.moveToPosition(b,g[c?1:0]);e&&this.moveToRange(f);return!!e},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),c=CKEDITOR.dom.walker.bookmark(!1,!0),f=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return f(a)&&c(a)};var e=a.next();a.reset();return e&&e.equals(a.previous())?e: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:e(),getPreviousEditableNode:e(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var c=this.getTouchedStartNode(),f=this.getTouchedEndNode(),e=c.getAscendant("table",!0),f=f.getAscendant("table",!0);return e&&!this.root.contains(e)?
null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):e&&f&&(e.equals(f)||e.contains(f)||f.contains(e))?c.getAscendant(a,!0):null},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),c,f,e,b=this.clone();b.optimize();(e=b.startContainer.type==CKEDITOR.NODE_TEXT)?(f=b.startContainer.getText(),c=b.startContainer.split(b.startOffset),a.insertAfter(b.startContainer)):b.insertNode(a);a.scrollIntoView();e&&(b.startContainer.setText(f),
c.remove());a.remove()},getClientRects:function(){function a(d,c){var f=CKEDITOR.tools.array.map(d,function(a){return a}),e=new CKEDITOR.dom.range(c.root),b,k,g;c.startContainer instanceof CKEDITOR.dom.element&&(k=0===c.startOffset&&c.startContainer.hasAttribute("data-widget"));c.endContainer instanceof CKEDITOR.dom.element&&(g=(g=c.endOffset===(c.endContainer.getChildCount?c.endContainer.getChildCount():c.endContainer.length))&&c.endContainer.hasAttribute("data-widget"));k&&e.setStart(c.startContainer.getParent(),
c.startContainer.getIndex());g&&e.setEnd(c.endContainer.getParent(),c.endContainer.getIndex()+1);if(k||g)c=e;e=c.cloneContents().find("[data-cke-widget-id]").toArray();if(e=CKEDITOR.tools.array.map(e,function(a){var d=c.root.editor;a=a.getAttribute("data-cke-widget-id");return d.widgets.instances[a].element}))return e=CKEDITOR.tools.array.map(e,function(a){var d;d=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;b=this.root.getDocument().$.createRange();b.setStart(d.getParent().$,d.getIndex());
b.setEnd(d.getParent().$,d.getIndex()+1);d=b.getClientRects();d.widgetRect=a.getClientRect();return d},c),CKEDITOR.tools.array.forEach(e,function(a){function d(e){CKEDITOR.tools.array.forEach(f,function(d,b){var k=CKEDITOR.tools.objectCompare(a[e],d);k||(k=CKEDITOR.tools.objectCompare(a.widgetRect,d));k&&(Array.prototype.splice.call(f,b,a.length-e,a.widgetRect),c=!0)});c||(e<f.length-1?d(e+1):f.push(a.widgetRect))}var c;d(0)}),f}function c(a,d,f){var b;d.collapsed?f.startContainer instanceof CKEDITOR.dom.element?
(a=f.checkStartOfBlock(),b=new CKEDITOR.dom.text("​"),a?f.startContainer.append(b,!0):0===f.startOffset?b.insertBefore(f.startContainer.getFirst()):(f=f.startContainer.getChildren().getItem(f.startOffset-1),b.insertAfter(f)),d.setStart(b.$,0),d.setEnd(b.$,0),a=d.getClientRects(),b.remove()):f.startContainer instanceof CKEDITOR.dom.text&&(""===f.startContainer.getText()?(f.startContainer.setText("​"),a=d.getClientRects(),f.startContainer.setText("")):a=[e(f.createBookmark())]):a=[e(f.createBookmark())];
return a}function f(a,d,c){a=CKEDITOR.tools.extend({},a);d&&(a=CKEDITOR.tools.getAbsoluteRectPosition(c.document.getWindow(),a));!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a}function e(a){var d=a.startNode;a=a.endNode;var c;d.setText("​");d.removeStyle("display");a?(a.setText("​"),a.removeStyle("display"),c=[d.getClientRect(),a.getClientRect()],a.remove()):c=[d.getClientRect(),d.getClientRect()];d.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(e){var b=this.root.getDocument().$.createRange(),k;b.setStart(this.startContainer.$,this.startOffset);b.setEnd(this.endContainer.$,this.endOffset);k=b.getClientRects();k=a(k,this);k.length||(k=c(k,b,this));return CKEDITOR.tools.array.map(k,function(a){return f(a,e,this)},
this)}:function(a){return[f(e(this.createBookmark()),a,this)]}}(),_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,c){var f=this.getCommonAncestor(),e=this.getBoundaryNodes(),b=[],k,g,m,h;if(f&&f.find)for(g=f.find(a),k=0;k<g.count();k++)if(f=g.getItem(k),c||!f.isReadOnly())m=f.getPosition(e.startNode)&CKEDITOR.POSITION_FOLLOWING||e.startNode.equals(f),h=f.getPosition(e.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||
e.endNode.equals(f),m&&h&&b.push(f);return b}};CKEDITOR.dom.range.mergeRanges=function(a){return CKEDITOR.tools.array.reduce(a,function(a,d){var c=a[a.length-1],f=!1;d=d.clone();d.enlarge(CKEDITOR.ENLARGE_ELEMENT);if(c){var e=new CKEDITOR.dom.range(d.root),f=new CKEDITOR.dom.walker(e),b=CKEDITOR.dom.walker.whitespaces();e.setStart(c.endContainer,c.endOffset);e.setEnd(d.startContainer,d.startOffset);for(e=f.next();b(e)||d.endContainer.equals(e);)e=f.next();f=!e}f?c.setEnd(d.endContainer,d.endOffset):
a.push(d);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 b(a){1>arguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||
(this._={}))}function h(a){var d=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return d.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return d}function g(a,d,c,e){a:{null==e&&(e=h(c));for(var b;b=e.shift();)if(b.getDtd().p){e={element:b,remaining:e};break a}e=null}if(!e)return 0;if((b=CKEDITOR.filter.instances[e.element.data("cke-filter")])&&!b.check(d))return g(a,d,c,e.remaining);d=new CKEDITOR.dom.range(e.element);d.selectNodeContents(e.element);d=d.createIterator();d.enlargeBr=
a.enlargeBr;d.enforceRealBlocks=a.enforceRealBlocks;d.activeFilter=d.filter=b;a._.nestedEditable={element:e.element,container:c,remaining:e.remaining,iterator:d};return 1}function a(a,d,c){if(!d)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(d,c?CKEDITOR.START:CKEDITOR.END)}var e=/^[\r\n\t ]+$/,m=CKEDITOR.dom.walker.bookmark(!1,!0),k=CKEDITOR.dom.walker.whitespaces(!0),l=function(a){return m(a)&&k(a)},c={dd:1,dt:1,li:1};b.prototype={getNextParagraph:function(f){var d,b,k,h,x;
f=f||"p";if(this._.nestedEditable){if(d=this._.nestedEditable.iterator.getNextParagraph(f))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,d;this.activeFilter=this.filter;if(g(this,f,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(f);this._.nestedEditable=null}if(!this.range.root.getDtd()[f])return null;if(!this._.started){var p=this.range.clone();
b=p.startPath();var w=p.endPath(),B=!p.collapsed&&a(p,b.block),r=!p.collapsed&&a(p,w.block,1);p.shrink(CKEDITOR.SHRINK_ELEMENT,!0);B&&p.setStartAt(b.block,CKEDITOR.POSITION_BEFORE_END);r&&p.setEndAt(w.block,CKEDITOR.POSITION_AFTER_START);b=p.endContainer.hasAscendant("pre",!0)||p.startContainer.hasAscendant("pre",!0);p.enlarge(this.forceBrBreak&&!b||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);p.collapsed||(b=new CKEDITOR.dom.walker(p.clone()),w=CKEDITOR.dom.walker.bookmark(!0,
!0),b.evaluator=w,this._.nextNode=b.next(),b=new CKEDITOR.dom.walker(p.clone()),b.evaluator=w,b=b.previous(),this._.lastNode=b.getNextSourceNode(!0,null,p.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(w=this.range.clone(),w.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),w.checkEndOfBlock()&&(w=new CKEDITOR.dom.elementPath(w.endContainer,w.root),this._.lastNode=(w.block||
w.blockLimit).getNextSourceNode(!0))),this._.lastNode&&p.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=p.document.createText(""),this._.lastNode.insertAfter(b)),p=null);this._.started=1;b=p}w=this._.nextNode;p=this._.lastNode;for(this._.nextNode=null;w;){var B=0,r=w.hasAscendant("pre"),y=w.type!=CKEDITOR.NODE_ELEMENT,z=0;if(y)w.type==CKEDITOR.NODE_TEXT&&e.test(w.getText())&&(y=0);else{var v=w.getName();if(CKEDITOR.dtd.$block[v]&&"false"==w.getAttribute("contenteditable")){d=
w;g(this,f,d);break}else if(w.isBlockBoundary(this.forceBrBreak&&!r&&{br:1})){if("br"==v)y=1;else if(!b&&!w.getChildCount()&&"hr"!=v){d=w;k=w.equals(p);break}b&&(b.setEndAt(w,CKEDITOR.POSITION_BEFORE_START),"br"!=v&&(this._.nextNode=w));B=1}else{if(w.getFirst()){b||(b=this.range.clone(),b.setStartAt(w,CKEDITOR.POSITION_BEFORE_START));w=w.getFirst();continue}y=1}}y&&!b&&(b=this.range.clone(),b.setStartAt(w,CKEDITOR.POSITION_BEFORE_START));k=(!B||y)&&w.equals(p);if(b&&!B)for(;!w.getNext(l)&&!k;){v=
w.getParent();if(v.isBlockBoundary(this.forceBrBreak&&!r&&{br:1})){B=1;y=0;k||v.equals(p);b.setEndAt(v,CKEDITOR.POSITION_BEFORE_END);break}w=v;y=1;k=w.equals(p);z=1}y&&b.setEndAt(w,CKEDITOR.POSITION_AFTER_END);w=this._getNextSourceNode(w,z,p);if((k=!w)||B&&b)break}if(!d){if(!b)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;d=new CKEDITOR.dom.elementPath(b.startContainer,b.root);w=d.blockLimit;B={div:1,th:1,td:1};d=d.block;!d&&w&&!this.enforceRealBlocks&&B[w.getName()]&&
b.checkStartOfBlock()&&b.checkEndOfBlock()&&!w.equals(b.root)?d=w:!d||this.enforceRealBlocks&&d.is(c)?(d=this.range.document.createElement(f),b.extractContents().appendTo(d),d.trim(),b.insertNode(d),h=x=!0):"li"!=d.getName()?b.checkStartOfBlock()&&b.checkEndOfBlock()||(d=d.clone(!1),b.extractContents().appendTo(d),d.trim(),x=b.splitBlock(),h=!x.wasStartOfBlock,x=!x.wasEndOfBlock,b.insertNode(d)):k||(this._.nextNode=d.equals(p)?null:this._getNextSourceNode(b.getBoundaryNodes().endNode,1,p))}h&&(h=
d.getPrevious())&&h.type==CKEDITOR.NODE_ELEMENT&&("br"==h.getName()?h.remove():h.getLast()&&"br"==h.getLast().$.nodeName.toLowerCase()&&h.getLast().remove());x&&(h=d.getLast())&&h.type==CKEDITOR.NODE_ELEMENT&&"br"==h.getName()&&(!CKEDITOR.env.needsBrFiller||h.getPrevious(m)||h.getNext(m))&&h.remove();this._.nextNode||(this._.nextNode=k||d.equals(p)||!p?null:this._getNextSourceNode(d,1,p));return d},_getNextSourceNode:function(a,d,c){function e(a){return!(a.equals(c)||a.equals(b))}var b=this.range.root;
for(a=a.getNextSourceNode(d,null,e);!m(a);)a=a.getNextSourceNode(d,null,e);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new b(this)}}(),CKEDITOR.command=function(b,h){this.uiItems=[];this.exec=function(a){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&b.focus();return!1===this.fire("exec")?!0:!1!==h.exec.call(this,b,a)};this.refresh=function(a,e){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!e.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:e})?!0:h.refresh&&!1!==h.refresh.apply(this,arguments)};var g;this.checkAllowed=function(a){return a||"boolean"!=typeof g?g=b.activeFilter.checkFeature(this):g};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(b){if(this.state==b||b!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=b;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 b(a,d,c,f,e){var b,g;a=[];for(b in d){g=d[b];g="boolean"==typeof g?{}:"function"==typeof g?{match:g}:F(g);"$"!=b.charAt(0)&&(g.elements=b);c&&(g.featureName=c.toLowerCase());var m=g;m.elements=k(m.elements,/\s+/)||null;m.propertiesOnly=m.propertiesOnly||!0===m.elements;var h=/\s*,\s*/,l=void 0;for(l in M){m[l]=
k(m[l],h)||null;var n=m,q=I[l],w=k(m[I[l]],h),O=m[l],r=[],K=!0,L=void 0;w?K=!1:w={};for(L in O)"!"==L.charAt(0)&&(L=L.slice(1),r.push(L),w[L]=!0,K=!1);for(;L=r.pop();)O[L]=O["!"+L],delete O["!"+L];n[q]=(K?!1:w)||null}m.match=m.match||null;f.push(g);a.push(g)}d=e.elements;e=e.generic;var t;c=0;for(f=a.length;c<f;++c){b=F(a[c]);g=!0===b.classes||!0===b.styles||!0===b.attributes;m=b;l=q=h=void 0;for(h in M)m[h]=B(m[h]);n=!0;for(l in I){h=I[l];q=m[h];w=[];O=void 0;for(O in q)-1<O.indexOf("*")?w.push(new RegExp("^"+
O.replace(/\*/g,".*")+"$")):w.push(O);q=w;q.length&&(m[h]=q,n=!1)}m.nothingRequired=n;m.noProperties=!(m.attributes||m.classes||m.styles);if(!0===b.elements||null===b.elements)e[g?"unshift":"push"](b);else for(t in m=b.elements,delete b.elements,m)if(d[t])d[t][g?"unshift":"push"](b);else d[t]=[b]}}function h(a,d,c,f){if(!a.match||a.match(d))if(f||l(a,d))if(a.propertiesOnly||(c.valid=!0),c.allAttributes||(c.allAttributes=g(a.attributes,d.attributes,c.validAttributes)),c.allStyles||(c.allStyles=g(a.styles,
d.styles,c.validStyles)),!c.allClasses){a=a.classes;d=d.classes;f=c.validClasses;if(a)if(!0===a)a=!0;else{for(var e=0,b=d.length,k;e<b;++e)k=d[e],f[k]||(f[k]=a(k));a=!1}else a=!1;c.allClasses=a}}function g(a,d,c){if(!a)return!1;if(!0===a)return!0;for(var f in d)c[f]||(c[f]=a(f));return!1}function a(a,d,c){if(!a.match||a.match(d)){if(a.noProperties)return!1;c.hadInvalidAttribute=e(a.attributes,d.attributes)||c.hadInvalidAttribute;c.hadInvalidStyle=e(a.styles,d.styles)||c.hadInvalidStyle;a=a.classes;
d=d.classes;if(a){for(var f=!1,b=!0===a,k=d.length;k--;)if(b||a(d[k]))d.splice(k,1),f=!0;a=f}else a=!1;c.hadInvalidClass=a||c.hadInvalidClass}}function e(a,d){if(!a)return!1;var c=!1,f=!0===a,e;for(e in d)if(f||a(e))delete d[e],c=!0;return c}function m(a,d,c){if(a.disabled||a.customConfig&&!c||!d)return!1;a._.cachedChecks={};return!0}function k(a,d){if(!a)return!1;if(!0===a)return a;if("string"==typeof a)return a=J(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(d));if(CKEDITOR.tools.isArray(a))return a.length?
CKEDITOR.tools.convertArrayToObject(a):!1;var c={},f=0,e;for(e in a)c[e]=a[e],f++;return f?c:!1}function l(a,d){if(a.nothingRequired)return!0;var f,e,b,k;if(b=a.requiredClasses)for(k=d.classes,f=0;f<b.length;++f)if(e=b[f],"string"==typeof e){if(-1==CKEDITOR.tools.indexOf(k,e))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(k,e))return!1;return c(d.styles,a.requiredStyles)&&c(d.attributes,a.requiredAttributes)}function c(a,d){if(!d)return!0;for(var c=0,f;c<d.length;++c)if(f=d[c],"string"==
typeof f){if(!(f in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,f))return!1;return!0}function f(a){if(!a)return{};a=a.split(/\s*,\s*/).sort();for(var d={};a.length;)d[a.shift()]="cke-test";return d}function d(a){var d,c,f,e,b={},k=1;for(a=J(a);d=a.match(E);)(c=d[2])?(f=n(c,"styles"),e=n(c,"attrs"),c=n(c,"classes")):f=e=c=null,b["$"+k++]={elements:d[1],classes:c,styles:f,attributes:e},a=a.slice(d[0].length);return b}function n(a,d){var c=a.match(P[d]);return c?J(c[1]):null}
function q(a){var d=a.styleBackup=a.attributes.style,c=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(d||"",1));a.classes||(a.classes=c?c.split(/\s+/):[])}function u(d,c,f,e){var b=0,k;e.toHtml&&(c.name=c.name.replace(L,"$1"));if(e.doCallbacks&&d.elementCallbacks){a:{k=d.elementCallbacks;for(var g=0,m=k.length,l;g<m;++g)if(l=k[g](c)){k=l;break a}k=void 0}if(k)return k}if(e.doTransform&&(k=d._.transformations[c.name])){q(c);for(g=0;g<k.length;++g)v(d,c,k[g]);p(c)}if(e.doFilter){a:{g=
c.name;m=d._;d=m.allowedRules.elements[g];k=m.allowedRules.generic;g=m.disallowedRules.elements[g];m=m.disallowedRules.generic;l=e.skipRequired;var n={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},r,t;if(d||k){q(c);if(g)for(r=0,t=g.length;r<t;++r)if(!1===a(g[r],c,n)){d=null;break a}if(m)for(r=0,t=m.length;r<t;++r)a(m[r],c,n);if(d)for(r=0,t=d.length;r<t;++r)h(d[r],c,n,l);if(k)for(r=
0,t=k.length;r<t;++r)h(k[r],c,n,l);d=n}else d=null}if(!d||!d.valid)return f.push(c),1;t=d.validAttributes;var B=d.validStyles;k=d.validClasses;var g=c.attributes,F=c.styles,m=c.classes;l=c.classBackup;var D=c.styleBackup,K,H,J=[],n=[],A=/^data-cke-/;r=!1;delete g.style;delete g["class"];delete c.classBackup;delete c.styleBackup;if(!d.allAttributes)for(K in g)t[K]||(A.test(K)?K==(H=K.replace(/^data-cke-saved-/,""))||t[H]||(delete g[K],r=!0):(delete g[K],r=!0));if(!d.allStyles||d.hadInvalidStyle){for(K in F)d.allStyles||
B[K]?J.push(K+":"+F[K]):r=!0;J.length&&(g.style=J.sort().join("; "))}else D&&(g.style=D);if(!d.allClasses||d.hadInvalidClass){for(K=0;K<m.length;++K)(d.allClasses||k[m[K]])&&n.push(m[K]);n.length&&(g["class"]=n.sort().join(" "));l&&n.length<l.split(/\s+/).length&&(r=!0)}else l&&(g["class"]=l);r&&(b=1);if(!e.skipFinalValidation&&!w(c))return f.push(c),1}e.toHtml&&(c.name=c.name.replace(O,"cke:$1"));return b}function x(a){var d=[],c;for(c in a)-1<c.indexOf("*")&&d.push(c.replace(/\*/g,".*"));return d.length?
new RegExp("^(?:"+d.join("|")+")$"):null}function p(a){var d=a.attributes,c;delete d.style;delete d["class"];if(c=CKEDITOR.tools.writeCssText(a.styles,!0))d.style=c;a.classes.length&&(d["class"]=a.classes.sort().join(" "))}function w(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 B(a){if(!a)return!1;if(!0===a)return!0;var d=x(a);return function(c){return c in a||d&&c.match(d)}}function r(){return new CKEDITOR.htmlParser.element("br")}
function y(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==a.name||H.$block[a.name])}function z(a,d,c){var f=a.name;if(H.$empty[f]||!a.children.length)"hr"==f&&"br"==d?a.replaceWith(r()):(a.parent&&c.push({check:"it",el:a.parent}),a.remove());else if(H.$block[f]||"tr"==f)if("br"==d)a.previous&&!y(a.previous)&&(d=r(),d.insertBefore(a)),a.next&&!y(a.next)&&(d=r(),d.insertAfter(a)),a.replaceWithChildren();else{var f=a.children,e;b:{e=H[d];for(var b=0,k=f.length,g;b<k;++b)if(g=f[b],g.type==CKEDITOR.NODE_ELEMENT&&
!e[g.name]){e=!1;break b}e=!0}if(e)a.name=d,a.attributes={},c.push({check:"parent-down",el:a});else{e=a.parent;for(var b=e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==e.name,m,h,k=f.length;0<k;)g=f[--k],b&&(g.type==CKEDITOR.NODE_TEXT||g.type==CKEDITOR.NODE_ELEMENT&&H.$inline[g.name])?(m||(m=new CKEDITOR.htmlParser.element(d),m.insertAfter(a),c.push({check:"parent-down",el:m})),m.add(g,0)):(m=null,h=H[e.name]||H.span,g.insertAfter(a),e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||g.type!=CKEDITOR.NODE_ELEMENT||
h[g.name]||c.push({check:"el-up",el:g}));a.remove()}}else f in{style:1,script:1}?a.remove():(a.parent&&c.push({check:"it",el:a.parent}),a.replaceWithChildren())}function v(a,d,c){var f,e;for(f=0;f<c.length;++f)if(e=c[f],!(e.check&&!a.check(e.check,!1)||e.left&&!e.left(d))){e.right(d,N);break}}function t(a,d){var c=d.getDefinition(),f=c.attributes,e=c.styles,b,k,g,m;if(a.name!=c.element)return!1;for(b in f)if("class"==b)for(c=f[b].split(/\s+/),g=a.classes.join("|");m=c.pop();){if(-1==g.indexOf(m))return!1}else if(a.attributes[b]!=
f[b])return!1;for(k in e)if(a.styles[k]!=e[k])return!1;return!0}function C(a,d){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,d)}}]}function D(a){return function(d){return t(d,a)}}function A(a){return function(d,c){c[a](d)}}var H=CKEDITOR.dtd,F=CKEDITOR.tools.copy,J=CKEDITOR.tools.trim,G=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a,d){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&&!d){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(d||a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(a,c,f){if(!m(this,a,f))return!1;var e,k;if("string"==typeof a)a=d(a);else if(a instanceof CKEDITOR.style){if(a.toAllowedContentRules)return this.allow(a.toAllowedContentRules(this.editor),c,f);e=a.getDefinition();a={};f=e.attributes;a[e.element]=e={styles:e.styles,
requiredStyles:e.styles&&CKEDITOR.tools.object.keys(e.styles)};f&&(f=F(f),e.classes=f["class"]?f["class"].split(/\s+/):null,e.requiredClasses=e.classes,delete f["class"],e.attributes=f,e.requiredAttributes=f&&CKEDITOR.tools.object.keys(f))}else if(CKEDITOR.tools.isArray(a)){for(e=0;e<a.length;++e)k=this.allow(a[e],c,f);return k}b(this,a,c,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,d,c,f){if(this.disabled)return!1;var e=this,b=[],k=this.editor&&this.editor.config.protectedSource,
g,m=!1,h={doFilter:!c,doTransform:!0,doCallbacks:!0,toHtml:d};a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1;if(!d||"span"!=a.name||!~CKEDITOR.tools.object.keys(a.attributes).join("|").indexOf("data-cke-"))if(g=u(e,a,b,h),g&1)m=!0;else if(g&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 l,n,q;if(k)for(n=0;n<
k.length;++n)if((q=f.match(k[n]))&&q[0].length==f.length){c=!0;break a}f=CKEDITOR.htmlParser.fragment.fromHtml(f);1==f.children.length&&(l=f.children[0]).type==CKEDITOR.NODE_ELEMENT&&u(e,l,c,h);c=!c.length}c||b.push(a)}},null,!0);b.length&&(m=!0);var l;a=[];f=G[f||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var n;c=b.pop();)c.type==CKEDITOR.NODE_ELEMENT?z(c,f,a):c.remove();for(;l=a.pop();)if(c=l.el,c.parent)switch(n=H[c.parent.name]||H.span,l.check){case "it":H.$removeEmpty[c.name]&&
!c.children.length?z(c,f,a):w(c)||z(c,f,a);break;case "el-up":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[c.name]||z(c,f,a);break;case "parent-down":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[c.name]||z(c.parent,f,a)}return m},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(a){if(!m(this,a,!0))return!1;"string"==typeof a&&(a=
d(a));b(this,a,null,this.disallowedContent,this._.disallowedRules);return!0},addContentForms:function(a){if(!this.disabled&&a){var d,c,f=[],e;for(d=0;d<a.length&&!e;++d)c=a[d],("string"==typeof c||c instanceof CKEDITOR.style)&&this.check(c)&&(e=c);if(e){for(d=0;d<a.length;++d)f.push(C(a[d],e));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 d,c;if(!this.disabled&&a){var f=this._.transformations,e;for(e=0;e<a.length;++e){d=a[e];var b=void 0,k=void 0,g=void 0,m=void 0,h=void 0,l=void 0;c=[];for(k=0;k<d.length;++k)g=d[k],"string"==typeof g?(g=
g.split(/\s*:\s*/),m=g[0],h=null,l=g[1]):(m=g.check,h=g.left,l=g.right),b||(b=g,b=b.element?b.element:m?m.match(/^([a-z0-9]+)/i)[0]:b.left.getDefinition().element),h instanceof CKEDITOR.style&&(h=D(h)),c.push({check:m==b?null:m,left:h,right:"string"==typeof l?A(l):l});d=b;f[d]||(f[d]=[]);f[d].push(c)}}},check:function(a,c,e){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var b=a.length;b--;)if(this.check(a[b],c,e))return!0;return!1}var k,g;if("string"==typeof a){g=a+"\x3c"+(!1===c?"0":
"1")+(e?"1":"0")+"\x3e";if(g in this._.cachedChecks)return this._.cachedChecks[g];k=d(a).$1;var m=k.styles,b=k.classes;k.name=k.elements;k.classes=b=b?b.split(/\s*,\s*/):[];k.styles=f(m);k.attributes=f(k.attributes);k.children=[];b.length&&(k.attributes["class"]=b.join(" "));m&&(k.attributes.style=CKEDITOR.tools.writeCssText(k.styles))}else k=a.getDefinition(),m=k.styles,b=k.attributes||{},m&&!CKEDITOR.tools.isEmpty(m)?(m=F(m),b.style=CKEDITOR.tools.writeCssText(m,!0)):m={},k={name:k.element,attributes:b,
classes:b["class"]?b["class"].split(/\s+/):[],styles:m,children:[]};var m=CKEDITOR.tools.clone(k),h=[],l;if(!1!==c&&(l=this._.transformations[k.name])){for(b=0;b<l.length;++b)v(this,k,l[b]);p(k)}u(this,m,h,{doFilter:!0,doTransform:!1!==c,skipRequired:!e,skipFinalValidation:!e});0<h.length?e=!1:((c=k.attributes["class"])&&(k.attributes["class"]=k.attributes["class"].split(" ").sort().join(" ")),e=CKEDITOR.tools.objectCompare(k.attributes,m.attributes,!0),c&&(k.attributes["class"]=c));"string"==typeof a&&
(this._.cachedChecks[g]=e);return e},getAllowedEnterMode:function(){var a=["p","div","br"],d={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,f){var e=a.slice(),b;if(this.check(G[c]))return c;for(f||(e=e.reverse());b=e.pop();)if(this.check(b))return d[b];return CKEDITOR.ENTER_BR}}(),clone:function(){var a=new CKEDITOR.filter,d=CKEDITOR.tools.clone;a.allowedContent=d(this.allowedContent);a._.allowedRules=d(this._.allowedRules);a.disallowedContent=d(this.disallowedContent);
a._.disallowedRules=d(this._.disallowedRules);a._.transformations=d(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 M={styles:1,attributes:1,classes:1},I={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:/\(([^\)]+)\)/},L=/^cke:(object|embed|param)$/,O=/^(object|embed|param)$/,N;N=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,d,c){c=c||d;if(!(c in a.styles)){var f=a.attributes[d];f&&(/^\d+$/.test(f)&&(f+="px"),a.styles[c]=f)}delete a.attributes[d]},
lengthToAttribute:function(a,d,c){c=c||d;if(!(c in a.attributes)){var f=a.styles[d],e=f&&f.match(/^(\d+)(?:\.\d*)?px$/);e?a.attributes[c]=e[1]:"cke-test"==f&&(a.attributes[c]="cke-test")}delete a.styles[d]},alignmentToStyle:function(a){if(!("float"in a.styles)){var d=a.attributes.align;if("left"==d||"right"==d)a.styles["float"]=d}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in a.attributes)){var d=a.styles["float"];if("left"==d||"right"==d)a.attributes.align=d}delete a.styles["float"]},
splitBorderShorthand:function(a){if(a.styles.border){var d=CKEDITOR.tools.style.parse.border(a.styles.border);d.color&&(a.styles["border-color"]=d.color);d.style&&(a.styles["border-style"]=d.style);d.width&&(a.styles["border-width"]=d.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 d(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:d([0,0,0,0]);break;case 2:d([0,1,0,
1]);break;case 3:d([0,1,2,1]);break;case 4:d([0,1,2,3])}delete a.styles.margin}},matchesStyle:t,transform:function(a,d){if("string"==typeof d)a.name=d;else{var c=d.getDefinition(),f=c.styles,e=c.attributes,b,k,g,m;a.name=c.element;for(b in e)if("class"==b)for(c=a.classes.join("|"),g=e[b].split(/\s+/);m=g.pop();)-1==c.indexOf(m)&&a.classes.push(m);else a.attributes[b]=e[b];for(k in f)a.styles[k]=f[k]}}}}(),function(){CKEDITOR.focusManager=function(b){if(b.focusManager)return b.focusManager;this.hasFocus=
!1;this.currentActive=null;this._={editor:b};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(b){this._.timer&&clearTimeout(this._.timer);b&&(this.currentActive=b);this.hasFocus||this._.locked||((b=CKEDITOR.currentInstance)&&b.focusManager.blur(1),this.hasFocus=!0,(b=this._.editor.container)&&b.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(b){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 g=CKEDITOR.focusManager._.blurDelay;b||!g?h.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;h.call(this)},g,this)}},add:function(b,h){var g=b.getCustomData("focusmanager");if(!g||g!=this){g&&g.remove(b);var g="focus",a="blur";h&&(CKEDITOR.env.ie?(g="focusin",a="focusout"):CKEDITOR.event.useCapture=1);var e={blur:function(){b.equals(this.currentActive)&&
this.blur()},focus:function(){this.focus(b)}};b.on(g,e.focus,this);b.on(a,e.blur,this);h&&(CKEDITOR.event.useCapture=0);b.setCustomData("focusmanager",this);b.setCustomData("focusmanager_handlers",e)}},remove:function(b){b.removeCustomData("focusmanager");var h=b.removeCustomData("focusmanager_handlers");b.removeListener("blur",h.blur);b.removeListener("focus",h.focus)}}}(),CKEDITOR.keystrokeHandler=function(b){if(b.keystrokeHandler)return b.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes=
{};this._={editor:b};return this},function(){var b,h=function(a){a=a.data;var e=a.getKeystroke(),g=this.keystrokes[e],k=this._.editor;b=!1===k.fire("key",{keyCode:e,domEvent:a});b||(g&&(b=!1!==k.execCommand(g,{from:"keystrokeHandler"})),b||(b=!!this.blockedKeystrokes[e]));b&&a.preventDefault(!0);return!b},g=function(a){b&&(b=!1,a.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",h,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",g,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(b,h,g){b&&CKEDITOR.lang.languages[b]||
(b=this.detect(h,b));var a=this;h=function(){a[b].dir=a.rtl[b]?"rtl":"ltr";g(b,a[b])};this[b]?h():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+b+".js"),h,this)},detect:function(b,h){var g=this.languages;h=h||navigator.userLanguage||navigator.language||b;var a=h.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),e=a[1],a=a[2];g[e+"-"+a]?e=e+"-"+a:g[e]||(e=null);CKEDITOR.lang.detect=e?function(){return e}:function(a){return a};return e||b}}}(),CKEDITOR.scriptLoader=function(){var b={},h={};return{load:function(g,
a,e,m){var k="string"==typeof g;k&&(g=[g]);e||(e=CKEDITOR);var l=g.length,c=l,f=[],d=[],n=function(c){a&&(k?a.call(e,c):a.call(e,f,d))};if(0===c)n(!0);else{var q=function(a,e){(e?f:d).push(a);0>=--c&&(m&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),n(e))},u=function(a,d){b[a]=1;var c=h[a];delete h[a];for(var f=0;f<c.length;f++)c[f](a,d)},x=function(d){if(b[d])q(d,!0);else{var c=h[d]||(h[d]=[]);c.push(q);if(!(1<c.length)){var f=new CKEDITOR.dom.element("script");f.setAttributes({type:"text/javascript",
src:d});a&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?f.$.onreadystatechange=function(){if("loaded"==f.$.readyState||"complete"==f.$.readyState)f.$.onreadystatechange=null,u(d,!0)}:(f.$.onload=function(){setTimeout(function(){f.$.onload=null;f.$.onerror=null;u(d,!0)},0)},f.$.onerror=function(){f.$.onload=null;f.$.onerror=null;u(d,!1)}));f.appendTo(CKEDITOR.document.getHead())}}};m&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var p=0;p<l;p++)x(g[p])}},
queue:function(){function b(){var e;(e=a[0])&&this.load(e.scriptUrl,e.callback,CKEDITOR,0)}var a=[];return function(e,m){var k=this;a.push({scriptUrl:e,callback:function(){m&&m.apply(this,arguments);a.shift();b.call(k)}});1==a.length&&b.call(this)}}()}}(),CKEDITOR.resourceManager=function(b,h){this.basePath=b;this.fileName=h;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}},CKEDITOR.resourceManager.prototype={add:function(b,h){if(this.registered[b])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+
b+'" is already registered.');var g=this.registered[b]=h||{};g.name=b;g.path=this.getPath(b);CKEDITOR.fire(b+CKEDITOR.tools.capitalize(this.fileName)+"Ready",g);return this.get(b)},get:function(b){return this.registered[b]||null},getPath:function(b){var h=this.externals[b];return CKEDITOR.getUrl(h&&h.dir||this.basePath+b+"/")},getFilePath:function(b){var h=this.externals[b];return CKEDITOR.getUrl(this.getPath(b)+(h?h.file:this.fileName+".js"))},addExternal:function(b,h,g){g||(h=h.replace(/[^\/]+$/,
function(a){g=a;return""}));g=g||this.fileName+".js";b=b.split(",");for(var a=0;a<b.length;a++)this.externals[b[a]]={dir:h,file:g}},load:function(b,h,g){CKEDITOR.tools.isArray(b)||(b=b?[b]:[]);for(var a=this.loaded,e=this.registered,m=[],k={},l={},c=0;c<b.length;c++){var f=b[c];if(f)if(a[f]||e[f])l[f]=this.get(f);else{var d=this.getFilePath(f);m.push(d);d in k||(k[d]=[]);k[d].push(f)}}CKEDITOR.scriptLoader.load(m,function(d,c){if(c.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+
k[c[0]].join(",")+'" was not found at "'+c[0]+'".');for(var f=0;f<d.length;f++)for(var e=k[d[f]],b=0;b<e.length;b++){var m=e[b];l[m]=this.get(m);a[m]=1}h.call(g,l)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(b){var h={};return function(g,a,e){var m={},k=function(g){b.call(this,g,function(c){CKEDITOR.tools.extend(m,c);var f=[],d;for(d in c){var b=c[d],g=b&&b.requires;if(!h[d]){if(b.icons)for(var l=
b.icons.split(","),x=l.length;x--;)CKEDITOR.skin.addIcon(l[x],b.path+"icons/"+(CKEDITOR.env.hidpi&&b.hidpi?"hidpi/":"")+l[x]+".png");b.isSupportedEnvironment=b.isSupportedEnvironment||function(){return!0};h[d]=1}if(g)for(g.split&&(g=g.split(",")),b=0;b<g.length;b++)m[g[b]]||f.push(g[b])}if(f.length)k.call(this,f);else{for(d in m)b=m[d],b.onLoad&&!b.onLoad._called&&(!1===b.onLoad()&&delete m[d],b.onLoad._called=1);a&&a.call(e||window,m)}},this)};k.call(this,g)}}),CKEDITOR.plugins.setLang=function(b,
h,g){var a=this.get(b);b=a.langEntries||(a.langEntries={});a=a.lang||(a.lang=[]);a.split&&(a=a.split(","));-1==CKEDITOR.tools.indexOf(a,h)&&a.push(h);b[h]=g},CKEDITOR.ui=function(b){if(b.ui)return b.ui;this.items={};this.instances={};this.editor=b;this._={handlers:{}};return this},CKEDITOR.ui.prototype={add:function(b,h,g){g.name=b.toLowerCase();var a=this.items[b]={type:h,command:g.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(a,g)},get:function(b){return this.instances[b]},
create:function(b){var h=this.items[b],g=h&&this._.handlers[h.type],a=h&&h.command&&this.editor.getCommand(h.command),g=g&&g.create.apply(this,h.args);this.instances[b]=g;a&&a.uiItems.push(g);g&&!g.type&&(g.type=h.type);return g},addHandler:function(b,h){this._.handlers[b]=h},space:function(b){return CKEDITOR.document.getById(this.spaceId(b))},spaceId:function(b){return this.editor.id+"_"+b}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function b(d,c,f){CKEDITOR.event.call(this);d=d&&CKEDITOR.tools.clone(d);
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(!g(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",a);this.on("selectionChange",function(a){m(this,a.data.path)});this.on("activeFilterChange",
function(){m(this,this.elementPath(),!0)});this.on("mode",a);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()||l(this,d)},0,this)}function h(){do var a="editor"+ ++x;while(CKEDITOR.instances[a]);return a}function g(a,d){return d==CKEDITOR.ELEMENT_MODE_INLINE?a.is(CKEDITOR.dtd.$editable)||a.is("textarea"):d==CKEDITOR.ELEMENT_MODE_REPLACE?!a.is(CKEDITOR.dtd.$nonBodyContent):1}function a(){var a=this.commands,d;for(d in a)e(this,a[d])}function e(a,d){d[d.startDisabled?"disable":a.readOnly&&!d.readOnly?"disable":d.modes[a.mode]?"enable":"disable"]()}function m(a,d,c){if(d){var f,e,b=a.commands;
for(e in b)f=b[e],(c||f.contextSensitive)&&f.refresh(a,d)}}function k(a){var d=a.config.customConfig;if(!d)return!1;var d=CKEDITOR.getUrl(d),c=p[d]||(p[d]={});c.fn?(c.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=d&&k(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(d,function(){c.fn=c.fn||CKEDITOR.editorConfig||function(){};k(a)});return!0}function l(a,d){a.on("customConfigLoaded",function(){if(d){if(d.on)for(var f in d.on)a.on(f,d.on[f]);CKEDITOR.tools.extend(a.config,
d,!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)});d&&null!=d.customConfig&&(a.config.customConfig=d.customConfig);k(a)||a.fireOnce("customConfigLoaded")}function c(a){CKEDITOR.skin.loadPart("editor",
function(){f(a)})}function f(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(c,f){var e=a.config.title,b=a.config.applicationTitle;a.langCode=c;a.lang=CKEDITOR.tools.prototypedCopy(f);a.title="string"==typeof e||!1===e?e:[a.lang.editor,a.name].join(", ");a.applicationTitle="string"==typeof b||!1===b?b:[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");d(a)})}function d(a){a.getStylesSet(function(d){a.once("loaded",function(){a.fire("stylesSet",{styles:d})},null,null,1);n(a)})}function n(a){function d(a){if(!a)return"";CKEDITOR.tools.isArray(a)&&(a=a.join(","));return a.replace(/\s/g,"")}var c=a.config,f=d(c.plugins),e=d(c.extraPlugins),b=d(c.removePlugins);if(e)var k=new RegExp("(?:^|,)(?:"+e.replace(/,/g,"|")+")(?\x3d,|$)","g"),f=f.replace(k,""),f=f+(","+e);if(b)var g=new RegExp("(?:^|,)(?:"+b.replace(/,/g,"|")+
")(?\x3d,|$)","g"),f=f.replace(g,"");CKEDITOR.env.air&&(f+=",adobeair");CKEDITOR.plugins.load(f.split(","),function(d){var f=[],e=[],b=[];a.plugins=CKEDITOR.tools.extend({},a.plugins,d);for(var k in d){var m=d[k],h=m.lang,l=null,n=m.requires,q;CKEDITOR.tools.isArray(n)&&(n=n.join(","));if(n&&(q=n.match(g)))for(;n=q.pop();)CKEDITOR.error("editor-plugin-required",{plugin:n.replace(",",""),requiredBy:k});h&&!a.lang[k]&&(h.split&&(h=h.split(",")),0<=CKEDITOR.tools.indexOf(h,a.langCode)?l=a.langCode:(l=
a.langCode.replace(/-.*/,""),l=l!=a.langCode&&0<=CKEDITOR.tools.indexOf(h,l)?l:0<=CKEDITOR.tools.indexOf(h,"en")?"en":h[0]),m.langEntries&&m.langEntries[l]?(a.lang[k]=m.langEntries[l],l=null):b.push(CKEDITOR.getUrl(m.path+"lang/"+l+".js")));e.push(l);f.push(m)}CKEDITOR.scriptLoader.load(b,function(){if(!a.isDestroyed()&&!a.isDetached()){for(var d=["beforeInit","init","afterInit"],b=0;b<d.length;b++)for(var k=0;k<f.length;k++){var g=f[k];0===b&&e[k]&&g.lang&&g.langEntries&&(a.lang[g.name]=g.langEntries[e[k]]);
if(g[d[b]])g[d[b]](a)}a.fireOnce("pluginsLoaded");c.keystrokes&&a.setKeystroke(a.config.keystrokes);for(k=0;k<a.config.blockedKeystrokes.length;k++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[k]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)}})})}function q(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var d=this.getData();this.config.htmlEncodeOutput&&(d=CKEDITOR.tools.htmlEncode(d));a.is("textarea")?a.setValue(d):
a.setHtml(d);return!0}return!1}function u(a,d){function c(a){var d=a.startContainer,f=a.endContainer,e=d.is&&d.is("tr"),b=d.is&&d.is("td");a=b&&d.equals(f)&&a.endOffset===d.getChildCount();d=b&&1===d.getChildCount()&&"img"===d.getChildren().getItem(0).getName();return e||a&&!d?!0:!1}function f(a){var d=a.startContainer;return d.is("tr")?a.cloneContents():d.clone(!0)}for(var e=new CKEDITOR.dom.documentFragment,b,k,g,m=0;m<a.length;m++){var h=a[m],l=h.startContainer.getAscendant("tr",!0);c(h)?(b||(b=
l.getAscendant("table").clone(),b.append(l.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),e.append(b),b=b.findOne("thead, tbody, tfoot")),k&&k.equals(l)||(k=l,g=l.clone(),b.append(g)),g.append(f(h))):e.append(h.cloneContents())}return b?e:d.getHtmlFromRange(a[0])}b.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=b;var x=0,p={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{plugins:{detectConflict:function(a,d){for(var c=0;c<d.length;c++){var f=d[c];if(this[f])return CKEDITOR.warn("editor-plugin-conflict",
{plugin:a,replacedWith:f}),!0}return!1}},addCommand:function(a,d){d.name=a.toLowerCase();var c=d instanceof CKEDITOR.command?d:new CKEDITOR.command(this,d);this.mode&&e(this,c);return this.commands[a]=c},_attachToForm:function(){function a(d){c.updateElement();c._.required&&!f.getValue()&&!1===c.fire("required")&&d.data.preventDefault()}function d(a){return!!(a&&a.call&&a.apply)}var c=this,f=c.element,e=new CKEDITOR.dom.element(f.$.form);f.is("textarea")&&e&&(e.on("submit",a),d(e.$.submit)&&(e.$.submit=
CKEDITOR.tools.override(e.$.submit,function(d){return function(){a();d.apply?d.apply(this):d()}})),c.on("destroy",function(){e.removeListener("submit",a)}))},destroy:function(a){var d=CKEDITOR.filter.instances,c=this;this.fire("beforeDestroy");!a&&q.call(this);this.editable(null);this.filter&&delete this.filter;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(d),function(a){a=d[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,d){var c=this.getCommand(a),f={name:a,commandData:d||{},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 d=this._.data;"string"!=typeof d&&(d=(d=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?d.is("textarea")?d.getValue():d.getHtml():"");d={dataValue:d};!a&&this.fire("getData",d);return d.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,d,c){var f=!0,e=d;d&&"object"==typeof d&&(c=d.internal,e=d.callback,f=!d.noSnapshot);!c&&f&&this.fire("saveSnapshot");if(e||!c)this.once("dataReady",function(a){!c&&f&&this.fire("saveSnapshot");e&&e.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,d,c){this.fire("insertHtml",{dataValue:a,mode:d,range:c})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",a)},getSelectedHtml:function(a){var d=this.editable(),c=this.getSelection(),c=c&&c.getRanges();if(!d||!c||0===c.length)return null;d=u(c,d);return a?d.getHtml():d},extractSelectedHtml:function(a,
d){var c=this.editable(),f=this.getSelection().getRanges(),e=new CKEDITOR.dom.documentFragment,b;if(!c||0===f.length)return null;for(b=0;b<f.length;b++)e.append(c.extractHtmlFromRange(f[b],d));d||this.getSelection().selectRanges([f[0]]);return a?e.getHtml():e},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return q.call(this)},
setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,d=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],c,f,e=d.length;e--;)c=d[e],f=0,CKEDITOR.tools.isArray(c)&&(f=c[1],c=c[0]),f?a[c]=f:delete a[c]},getCommandKeystroke:function(a,d){var c="string"===typeof a?this.getCommand(a):a,f=[];if(c){var e=CKEDITOR.tools.object.findKey(this.commands,c),b=this.keystrokeHandler.keystrokes;if(c.fakeKeystroke)f.push(c.fakeKeystroke);else for(var k in b)b[k]===e&&f.push(k)}return d?
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,d){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;d=d?this.blockless?CKEDITOR.ENTER_BR:d:this.shiftEnterMode;
if(this.activeEnterMode!=a||this.activeShiftEnterMode!=d)this.activeEnterMode=a,this.activeShiftEnterMode=d,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 d=CKEDITOR.dom.element.get(a);return d?d.getEditor()?(CKEDITOR.error("editor-element-conflict",
{editorName:d.getEditor().name}),null):d:(CKEDITOR.error("editor-incorrect-element",{element:a}),null)};CKEDITOR.editor.initializeDelayedEditorCreation=function(a,d,c){if(d.delayIfDetached_callback)return CKEDITOR.warn("editor-delayed-creation",{method:"callback"}),d.delayIfDetached_callback(function(){CKEDITOR[c](a,d);CKEDITOR.warn("editor-delayed-creation-success",{method:"callback"})}),null;var f=void 0===d.delayIfDetached_interval?CKEDITOR.config.delayIfDetached_interval:d.delayIfDetached_interval;
CKEDITOR.warn("editor-delayed-creation",{method:"interval - "+f+" ms"});var e=setInterval(function(){a.isDetached()||(clearInterval(e),CKEDITOR[c](a,d),CKEDITOR.warn("editor-delayed-creation-success",{method:"interval - "+f+" ms"}))},f);return function(){clearInterval(e)}};CKEDITOR.editor.shouldDelayEditorCreation=function(a,d){CKEDITOR.editor.mergeDelayedCreationConfigs(d);return d&&d.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 b=/([\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(g){for(var a,e,m=0,k;a=this._.htmlPartsRegex.exec(g);){e=a.index;if(e>m)if(m=g.substring(m,e),k)k.push(m);else this.onText(m);m=this._.htmlPartsRegex.lastIndex;if(e=a[1])if(e=e.toLowerCase(),k&&CKEDITOR.dtd.$cdata[e]&&(this.onCDATA(k.join("")),k=null),!k){this.onTagClose(e);continue}if(k)k.push(a[0]);else if(e=a[3]){if(e=e.toLowerCase(),!/="/.test(e)){var l={},c,f=a[4];a=
!!a[5];if(f)for(;c=b.exec(f);){var d=c[1].toLowerCase();c=c[2]||c[3]||c[4]||"";l[d]=!c&&h[d]?d:CKEDITOR.tools.htmlDecodeAttr(c)}this.onTagOpen(e,l,a);!k&&CKEDITOR.dtd.$cdata[e]&&(k=[])}}else if(e=a[2])this.onComment(e)}if(g.length>m)this.onText(g.substring(m,g.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(b){this._.output.push("\x3c",b)},openTagClose:function(b,h){h?this._.output.push(" /\x3e"):this._.output.push("\x3e")},
attribute:function(b,h){"string"==typeof h&&(h=CKEDITOR.tools.htmlEncodeAttr(h));this._.output.push(" ",b,'\x3d"',h,'"')},closeTag:function(b){this._.output.push("\x3c/",b,"\x3e")},text:function(b){this._.output.push(b)},comment:function(b){this._.output.push("\x3c!--",b,"--\x3e")},write:function(b){this._.output.push(b)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(b){var h=this._.output.join("");b&&this.reset();return h}}}),"use strict",function(){CKEDITOR.htmlParser.node=
function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var b=this.parent.children,h=CKEDITOR.tools.indexOf(b,this),g=this.previous,a=this.next;g&&(g.next=a);a&&(a.previous=g);b.splice(h,1);this.parent=null},replaceWith:function(b){var h=this.parent.children,g=CKEDITOR.tools.indexOf(h,this),a=b.previous=this.previous,e=b.next=this.next;a&&(a.next=b);e&&(e.previous=b);h[g]=b;b.parent=this.parent;this.parent=null},insertAfter:function(b){var h=b.parent.children,g=CKEDITOR.tools.indexOf(h,
b),a=b.next;h.splice(g+1,0,this);this.next=b.next;this.previous=b;b.next=this;a&&(a.previous=this);this.parent=b.parent},insertBefore:function(b){var h=b.parent.children,g=CKEDITOR.tools.indexOf(h,b);h.splice(g,0,this);this.next=b;(this.previous=b.previous)&&(b.previous.next=this);b.previous=this;this.parent=b.parent},getAscendant:function(b){var h="function"==typeof b?b:"string"==typeof b?function(a){return a.name==b}:function(a){return a.name in b},g=this.parent;for(;g&&g.type==CKEDITOR.NODE_ELEMENT;){if(h(g))return g;
g=g.parent}return null},wrapWith:function(b){this.replaceWith(b);b.add(this);return b},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(b){return b||{}}}}(),"use strict",CKEDITOR.htmlParser.comment=function(b){this.value=b;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(b,h){var g=this.value;if(!(g=b.onComment(h,g,this)))return this.remove(),
!1;if("string"!=typeof g)return this.replaceWith(g),!1;this.value=g;return!0},writeHtml:function(b,h){h&&this.filter(h);b.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(b){this.value=b;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(b,h){if(!(this.value=b.onText(h,this.value,this)))return this.remove(),!1},writeHtml:function(b,h){h&&this.filter(h);b.text(this.value)}})}(),
"use strict",function(){CKEDITOR.htmlParser.cdata=function(b){this.value=b};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(b){var h=this.getAscendant("style");if(h&&h.getAscendant({math:1,svg:1})){var h=CKEDITOR.htmlParser.fragment.fromHtml(this.value),g=new CKEDITOR.htmlParser.basicWriter;b.applyTo(h);h.writeHtml(g);this.value=g.getHtml()}},writeHtml:function(b){b.write(this.value)}})}(),"use strict",CKEDITOR.htmlParser.fragment=
function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function b(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),g={ol:1,ul:1},a=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),e={ul:"li",ol:"li",dl:"dd",table:"tbody",
tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(m,k,l){function c(a){var d;if(0<w.length)for(var c=0;c<w.length;c++){var e=w[c],b=e.name,k=CKEDITOR.dtd[b],g=r.name&&CKEDITOR.dtd[r.name];g&&!g[b]||a&&k&&!k[a]&&CKEDITOR.dtd[a]?b==r.name&&(n(r,r.parent,1),c--):(d||(f(),d=1),e=e.clone(),e.parent=r,r=e,w.splice(c,1),c--)}}function f(){for(;B.length;)n(B.shift(),r)}function d(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var d=a.children.length,c=a.children[d-
1],f;c&&c.type==CKEDITOR.NODE_TEXT&&((f=CKEDITOR.tools.rtrim(c.value))?c.value=f:a.children.length=d-1)}}function n(a,c,f){c=c||r||p;var e=r;void 0===a.previous&&(q(c,a)&&(r=c,x.onTagOpen(l,{}),a.returnPoint=c=r),d(a),b(a)&&!a.children.length||c.add(a),"pre"==a.name&&(z=!1),"textarea"==a.name&&(y=!1));a.returnPoint?(r=a.returnPoint,delete a.returnPoint):r=f?c:e}function q(a,d){if((a==p||"body"==a.name)&&l&&(!a.name||CKEDITOR.dtd[a.name][l])){var c,f;return(c=d.attributes&&(f=d.attributes["data-cke-real-element-type"])?
f:d.name)&&c in CKEDITOR.dtd.$inline&&!(c in CKEDITOR.dtd.head)&&!d.isOrphan||d.type==CKEDITOR.NODE_TEXT}}function u(a,d){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==d||"dt"==a&&"dd"==d||"dd"==a&&"dt"==d:!1}var x=new CKEDITOR.htmlParser,p=k instanceof CKEDITOR.htmlParser.element?k:"string"==typeof k?new CKEDITOR.htmlParser.element(k):new CKEDITOR.htmlParser.fragment,w=[],B=[],r=p,y="textarea"==p.name,z="pre"==p.name;x.onTagOpen=function(d,e,k,m){e=new CKEDITOR.htmlParser.element(d,
e);e.isUnknown&&k&&(e.isEmpty=!0);e.isOptionalClose=m;if(b(e))w.push(e);else{if("pre"==d)z=!0;else{if("br"==d&&z){r.add(new CKEDITOR.htmlParser.text("\n"));return}"textarea"==d&&(y=!0)}if("br"==d)B.push(e);else{for(;!(m=(k=r.name)?CKEDITOR.dtd[k]||(r._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):a,e.isUnknown||r.isUnknown||m[d]);)if(r.isOptionalClose)x.onTagClose(k);else if(d in g&&k in g)k=r.children,(k=k[k.length-1])&&"li"==k.name||n(k=new CKEDITOR.htmlParser.element("li"),r),!e.returnPoint&&
(e.returnPoint=r),r=k;else if(d in CKEDITOR.dtd.$listItem&&!u(d,k))x.onTagOpen("li"==d?"ul":"dl",{},0,1);else if(k in h&&!u(d,k))!e.returnPoint&&(e.returnPoint=r),r=r.parent;else if(k in CKEDITOR.dtd.$inline&&w.unshift(r),r.parent)n(r,r.parent,1);else{e.isOrphan=1;break}c(d);f();e.parent=r;e.isEmpty?n(e):r=e}}};x.onTagClose=function(a){for(var d=w.length-1;0<=d;d--)if(a==w[d].name){w.splice(d,1);return}for(var c=[],e=[],b=r;b!=p&&b.name!=a;)b._.isBlockLike||e.unshift(b),c.push(b),b=b.returnPoint||
b.parent;if(b!=p){for(d=0;d<c.length;d++){var k=c[d];n(k,k.parent)}r=b;b._.isBlockLike?f():(d=CKEDITOR.config.shiftLineBreaks,!0!==d&&B.length&&("function"!==typeof d?f():(d=d(B[B.length-1]),!0!==d&&(f(),d instanceof CKEDITOR.htmlParser.text&&r.add(d),d instanceof CKEDITOR.htmlParser.element&&n(d,r)))));n(b,b.parent);b==r&&(r=r.parent);w=w.concat(e)}"body"==a&&(l=!1)};x.onText=function(d){if(!(r._.hasInlineStarted&&!B.length||z||y)&&(d=CKEDITOR.tools.ltrim(d),0===d.length))return;var b=r.name,k=b?
CKEDITOR.dtd[b]||(r._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):a;if(!y&&!k["#"]&&b in h)x.onTagOpen(e[b]||""),x.onText(d);else{f();c();z||y||(d=d.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));d=new CKEDITOR.htmlParser.text(d);if(q(r,d))this.onTagOpen(l,{},0,1);r.add(d)}};x.onCDATA=function(a){r.add(new CKEDITOR.htmlParser.cdata(a))};x.onComment=function(a){f();c();r.add(new CKEDITOR.htmlParser.comment(a))};x.parse(m);for(f();r!=p;)n(r,r.parent,1);d(p);return p};CKEDITOR.htmlParser.fragment.prototype=
{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,e){isNaN(e)&&(e=this.children.length);var b=0<e?this.children[e-1]:null;if(b){if(a._.isBlockLike&&b.type==CKEDITOR.NODE_TEXT&&(b.value=CKEDITOR.tools.rtrim(b.value),0===b.value.length)){this.children.pop();this.add(a);return}b.next=a}a.previous=b;a.parent=this;this.children.splice(e,0,a);this._.hasInlineStarted||(this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike)},filter:function(a,e){e=this.getFilterContext(e);
a.onRoot(e,this);this.filterChildren(a,!1,e)},filterChildren:function(a,e,b){if(this.childrenFilteredBy!=a.id){b=this.getFilterContext(b);if(e&&!this.parent)a.onRoot(b,this);this.childrenFilteredBy=a.id;for(e=0;e<this.children.length;e++)!1===this.children[e].filter(a,b)&&e--}},writeHtml:function(a,e){e&&this.filter(e);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,e,b){var c=this.getFilterContext();if(b&&!this.parent&&e)e.onRoot(c,this);e&&this.filterChildren(e,!1,c);e=0;b=this.children;
for(c=b.length;e<c;e++)b[e].writeHtml(a)},forEach:function(a,e,b){if(!(b||e&&this.type!=e))var c=a(this);if(!1!==c){b=this.children;for(var f=0;f<b.length;f++)c=b[f],c.type==CKEDITOR.NODE_ELEMENT?c.forEach(a,e):e&&c.type!=e||a(c)}},getFilterContext:function(a){return a||{}}};CKEDITOR.config.shiftLineBreaks=!0}(),"use strict",function(){function b(){this.rules=[]}function h(g,a,e,m){var k,h;for(k in a)(h=g[k])||(h=g[k]=new b),h.add(a[k],e,m)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(g){this.id=
CKEDITOR.tools.getNextNumber();this.elementNameRules=new b;this.attributeNameRules=new b;this.elementsRules={};this.attributesRules={};this.textRules=new b;this.commentRules=new b;this.rootRules=new b;g&&this.addRules(g,10)},proto:{addRules:function(b,a){var e;"number"==typeof a?e=a:a&&"priority"in a&&(e=a.priority);"number"!=typeof e&&(e=10);"object"!=typeof a&&(a={});b.elementNames&&this.elementNameRules.addMany(b.elementNames,e,a);b.attributeNames&&this.attributeNameRules.addMany(b.attributeNames,
e,a);b.elements&&h(this.elementsRules,b.elements,e,a);b.attributes&&h(this.attributesRules,b.attributes,e,a);b.text&&this.textRules.add(b.text,e,a);b.comment&&this.commentRules.add(b.comment,e,a);b.root&&this.rootRules.add(b.root,e,a)},applyTo:function(b){b.filter(this)},onElementName:function(b,a){return this.elementNameRules.execOnName(b,a)},onAttributeName:function(b,a){return this.attributeNameRules.execOnName(b,a)},onText:function(b,a,e){return this.textRules.exec(b,a,e)},onComment:function(b,
a,e){return this.commentRules.exec(b,a,e)},onRoot:function(b,a){return this.rootRules.exec(b,a)},onElement:function(b,a){for(var e=[this.elementsRules["^"],this.elementsRules[a.name],this.elementsRules.$],m,k=0;3>k;k++)if(m=e[k]){m=m.exec(b,a,this);if(!1===m)return null;if(m&&m!=a)return this.onNode(b,m);if(a.parent&&!a.name)break}return a},onNode:function(b,a){var e=a.type;return e==CKEDITOR.NODE_ELEMENT?this.onElement(b,a):e==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(b,a.value,
a)):e==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(b,a.value,a)):null},onAttribute:function(b,a,e,m){return(e=this.attributesRules[e])?e.exec(b,m,a,this):m}}});CKEDITOR.htmlParser.filterRulesGroup=b;b.prototype={add:function(b,a,e){this.rules.splice(this.findIndex(a),0,{value:b,priority:a,options:e})},addMany:function(b,a,e){for(var m=[this.findIndex(a),0],k=0,h=b.length;k<h;k++)m.push({value:b[k],priority:a,options:e});this.rules.splice.apply(this.rules,m)},findIndex:function(b){for(var a=
this.rules,e=a.length-1;0<=e&&b<a[e].priority;)e--;return e+1},exec:function(b,a){var e=a instanceof CKEDITOR.htmlParser.node||a instanceof CKEDITOR.htmlParser.fragment,m=Array.prototype.slice.call(arguments,1),k=this.rules,h=k.length,c,f,d,n;for(n=0;n<h;n++)if(e&&(c=a.type,f=a.name),d=k[n],!(b.nonEditable&&!d.options.applyToAll||b.nestedEditable&&d.options.excludeNestedEditable)){d=d.value.apply(null,m);if(!1===d||e&&d&&(d.name!=f||d.type!=c))return d;null!=d&&(m[0]=a=d)}return a},execOnName:function(b,
a){for(var e=0,m=this.rules,k=m.length,h;a&&e<k;e++)h=m[e],b.nonEditable&&!h.options.applyToAll||b.nestedEditable&&h.options.excludeNestedEditable||(a=a.replace(h.value[0],h.value[1]));return a}}}(),function(){function b(d,c){function f(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function b(d,c){return function(e){if(e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var b=[],k=g(e),l,q;if(k)for(h(k,1)&&b.push(k);k;)m(k)&&
(l=a(k))&&h(l)&&((q=a(l))&&!m(q)?b.push(l):(f(n).insertAfter(l),l.remove())),k=k.previous;for(k=0;k<b.length;k++)b[k].remove();if(b=!d||!1!==("function"==typeof c?c(e):c))n||CKEDITOR.env.needsBrFiller||e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?n||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||e.name in CKEDITOR.dtd.tr||e.name in CKEDITOR.dtd.$listItem)?(b=g(e),b=!b||"form"==e.name&&"input"==b.name):b=!1:b=!1;b&&e.add(f(d))}}}function h(a,d){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(B))&&(c.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,c.index))).insertBefore(a),a.value=c[0]),!CKEDITOR.env.needsBrFiller&&n&&(!d||a.parent.name in q)||!n&&((c=a.previous)&&"br"==c.name||!c||m(c)))?!0:!1}var l={elements:{}},n="html"==c,q=CKEDITOR.tools.extend({},v),L;for(L in q)"#"in y[L]||delete q[L];for(L in q)l.elements[L]=b(n,d.config.fillEmptyBlocks);l.root=b(n,!1);l.elements.br=
function(d){return function(c){if(c.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var b=c.attributes;if("data-cke-bogus"in b||"data-cke-eol"in b)delete b["data-cke-bogus"];else{for(b=c.next;b&&e(b);)b=b.next;var g=a(c);!b&&m(c.parent)?k(c.parent,f(d)):m(b)&&g&&!m(g)&&f(d).insertBefore(b)}}}}(n);return l}function h(a,d){return a!=CKEDITOR.ENTER_BR&&!1!==d?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function g(a){for(a=a.children[a.children.length-1];a&&e(a);)a=a.previous;return a}function a(a){for(a=a.previous;a&&
e(a);)a=a.previous;return a}function e(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function m(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in v||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function k(a,d){var c=a.children[a.children.length-1];a.children.push(d);d.parent=a;c&&(c.next=d,d.previous=c)}function l(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 f(a,d){return a.replace(H,function(a,c,f){return"\x3c"+c+f.replace(F,function(a,c){return J.test(c)&&-1==f.indexOf("data-cke-saved-"+c)?" data-cke-saved-"+a+" data-cke-"+d+"-"+a:a})+"\x3e"})}function d(a,d){return a.replace(d,function(a,d,c){0===a.indexOf("\x3ctextarea")&&(a=d+u(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(I,function(a,d){return decodeURIComponent(d)})}function q(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,function(a){return"\x3c!--"+r+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function u(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,d){return decodeURIComponent(d)})}function x(a,d){var c=d._.dataStore;
return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,d){return decodeURIComponent(d)}).replace(/\{cke_protected_(\d+)\}/g,function(a,d){return c&&c[d]||""})}function p(a,d,c){var f=[],e=d.config.protectedSource,b=d._.dataStore||(d._.dataStore={id:1}),k=new RegExp("\x3c\\!--\\{cke_temp_"+c+"(comment)?\\}(\\d*?)--\x3e","g"),e=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(e);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_temp_"+
c+"comment}"+(f.push(a)-1)+"--\x3e"});for(var g=0;g<e.length;g++)a=a.replace(e[g],function(a){a=a.replace(k,function(a,d,c){return f[c]});return k.test(a)?a:"\x3c!--{cke_temp_"+c+"}"+(f.push(a)-1)+"--\x3e"});a=a.replace(k,function(a,d,c){return"\x3c!--"+r+(d?"{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,
d){b[b.id]=decodeURIComponent(d);return"{cke_protected_"+b.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,f,e){return"\x3c"+c+f+"\x3e"+x(u(e),d)+"\x3c/"+c+"\x3e"})}var w;CKEDITOR.htmlDataProcessor=function(a){var c,e,k=this;this.editor=a;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(t);c.addRules(C,{applyToAll:!0});c.addRules(b(a,"data"),
{applyToAll:!0});e.addRules(D);e.addRules(A,{applyToAll:!0});e.addRules(b(a,"html"),{applyToAll:!0});a.on("toHtml",function(c){var e;var b=window.crypto||window.msCrypto;e=b?b.getRandomValues(new Uint32Array(1))[0]:Math.floor(9E9*Math.random()+1E9);c=c.data;var b=c.dataValue,b=w(b),b=p(b,a,e),b=d(b,M),b=f(b,e),b=d(b,G),b=b.replace(E,"$1cke:$2"),b=b.replace(L,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),b=b.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),b=b.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+
e+"-$2"),k=c.context||a.editable().getName(),g;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==k&&(k="div",b="\x3cpre\x3e"+b+"\x3c/pre\x3e",g=1);k=a.document.createElement(k);k.setHtml("a"+b);b=k.getHtml().substr(1);b=b.replace(new RegExp("data-cke-"+e+"-","ig"),"");g&&(b=b.replace(/^<pre>|<\/pre>$/gi,""));b=b.replace(P,"$1$2");b=n(b);b=u(b);e=!1===c.fixForBody?!1:h(c.enterMode,a.config.autoParagraph);b=CKEDITOR.htmlParser.fragment.fromHtml(b,c.context,e);e&&(g=b,!g.children.length&&CKEDITOR.dtd[g.name][e]&&
(e=new CKEDITOR.htmlParser.element(e),g.add(e)));c.dataValue=b},null,null,5);a.on("toHtml",function(d){d.data.filter.applyTo(d.data.dataValue,!0,d.data.dontFilter,d.data.enterMode)&&a.fire("dataFiltered")},null,null,6);a.on("toHtml",function(a){a.data.dataValue.filterChildren(k.dataFilter,!0)},null,null,10);a.on("toHtml",function(a){a=a.data;var d=a.dataValue,c=new CKEDITOR.htmlParser.basicWriter;d.writeChildrenHtml(c);d=c.getHtml(!0);a.dataValue=q(d)},null,null,15);a.on("toDataFormat",function(d){var c=
d.data.dataValue;d.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^<br *\/?>/i,""));d.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,d.data.context,h(d.data.enterMode,a.config.autoParagraph))},null,null,5);a.on("toDataFormat",function(a){a.data.dataValue.filterChildren(k.htmlFilter,!0)},null,null,10);a.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,!1,!0)},null,null,11);a.on("toDataFormat",function(d){var c=d.data.dataValue,f=k.writer;f.reset();c.writeChildrenHtml(f);
c=f.getHtml(!0);c=u(c);c=x(c,a);d.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,d,c,f){var e=this.editor,b,k,g,m;d&&"object"==typeof d?(b=d.context,c=d.fixForBody,f=d.dontFilter,k=d.filter,g=d.enterMode,m=d.protectedWhitespaces):b=d;b||null===b||(b=e.editable().getName());return e.fire("toHtml",{dataValue:a,context:b,fixForBody:c,dontFilter:f,filter:k||e.filter,enterMode:g||e.enterMode,protectedWhitespaces:m}).dataValue},toDataFormat:function(a,d){var c,
f,e;d&&(c=d.context,f=d.filter,e=d.enterMode);c||null===c||(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:f||this.editor.filter,context:c,enterMode:e||this.editor.enterMode}).dataValue},protectSource:function(a){return p(a,this.editor)},unprotectSource:function(a){return x(a,this.editor)},unprotectRealComments:function(a){return u(a)}};var B=/(?:&nbsp;|\xa0)$/,r="{cke_protected}",y=CKEDITOR.dtd,z="caption colgroup col thead tfoot tbody".split(" "),
v=CKEDITOR.tools.extend({},y.$blockLimit,y.$block),t={elements:{input:l,textarea:l}},C={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 d=a.attributes.src.toLowerCase().replace(/[^a-z]/gi,"");if(0===d.indexOf("javascript")||0===d.indexOf("data"))a.attributes["data-cke-pa-src"]=a.attributes.src,delete a.attributes.src}}}},D={elements:{embed:function(a){var d=a.parent;if(d&&"object"==
d.name){var c=d.attributes.width,d=d.attributes.height;c&&(a.attributes.width=c);d&&(a.attributes.height=d)}},a:function(a){var d=a.attributes;if(!(a.children.length||d.name||d.id||a.attributes["data-cke-saved-name"]))return!1}}},A={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var d=a.attributes;if(d){if(d["data-cke-temp"])return!1;for(var c=["name","href","src"],f,e=0;e<c.length;e++)f=
"data-cke-saved-"+c[e],f in d&&delete d[c[e]]}return a},table:function(a){a.children.slice(0).sort(function(a,d){var c,f;a.type==CKEDITOR.NODE_ELEMENT&&d.type==a.type&&(c=CKEDITOR.tools.indexOf(z,a.name),f=CKEDITOR.tools.indexOf(z,d.name));-1<c&&-1<f&&c!=f||(c=a.parent?a.getIndex():-1,f=d.parent?d.getIndex():-1);return c>f?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 d=a.children[0];d&&d.value&&(d.value=CKEDITOR.tools.trim(d.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var d=a.children[0];!d&&k(a,d=new CKEDITOR.htmlParser.text);d.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&&(A.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,J=/^(href|src|name)$/i,G=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,M=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,I=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,E=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,
P=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,L=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;w=function(){function a(d,c){for(var f=0;f<d.length;f++){var e=d[f];e.lastIndex=0;if(e.test(c))return!0}return!1}function d(a){return CKEDITOR.tools.array.reduce(a.split(""),function(a,d){var f=d.toLowerCase(),e=d.toUpperCase(),b=c(f);f!==e&&(b+="|"+c(e));return a+("("+b+")")},"")}function c(a){var d;d=a.charCodeAt(0);var f=d.toString(16);d={htmlCode:"\x26#"+d+";?",hex:"\x26#x0*"+f+";?",entity:{"\x3c":"\x26lt;",
"\x3e":"\x26gt;",":":"\x26colon;"}[a]};for(var e in d)d[e]&&(a+="|"+d[e]);return a}var f=[new RegExp("("+d("\x3ccke:encoded\x3e")+"(.*?)"+d("\x3c/cke:encoded\x3e")+")|("+d("\x3c")+d("/")+"?"+d("cke:encoded\x3e")+")","gi"),new RegExp("(("+d("{cke_protected")+")(_[0-9]*)?"+d("}")+")","gi"),/<!(?:\s*-\s*){2,3}!?\s*>/g];return function(d){for(;a(f,d);)for(var c=f,e=0;e<c.length;e++)d=d.replace(c[e],"");return d}}()}(),"use strict",CKEDITOR.htmlParser.element=function(b,h){this.name=b;this.attributes=
h||{};this.children=[];var g=b||"",a=g.match(/^cke:(.*)/);a&&(g=a[1]);g=!!(CKEDITOR.dtd.$nonBodyContent[g]||CKEDITOR.dtd.$block[g]||CKEDITOR.dtd.$listItem[g]||CKEDITOR.dtd.$tableContent[g]||CKEDITOR.dtd.$nonEditable[g]||"br"==g);this.isEmpty=!!CKEDITOR.dtd.$empty[b];this.isUnknown=!CKEDITOR.dtd[b];this._={isBlockLike:g,hasInlineStarted:this.isEmpty||!g}},CKEDITOR.htmlParser.cssStyle=function(b){var h={};((b instanceof CKEDITOR.htmlParser.element?b.attributes.style:b)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,
function(b,a,e){"font-family"==a&&(e=e.replace(/["']/g,""));h[a.toLowerCase()]=e});return{rules:h,populate:function(b){var a=this.toString();a&&(b instanceof CKEDITOR.dom.element?b.setAttribute("style",a):b instanceof CKEDITOR.htmlParser.element?b.attributes.style=a:b.style=a)},toString:function(){var b=[],a;for(a in h)h[a]&&b.push(a,":",h[a],";");return b.join("")}}},function(){function b(a){return function(e){return e.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof a?e.name==a:e.name in a)}}var h=
function(a,e){a=a[0];e=e[0];return a<e?-1:a>e?1:0},g=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:g.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,e){var b=this,k,g;e=b.getFilterContext(e);if(!b.parent)a.onRoot(e,b);for(;;){k=b.name;if(!(g=a.onElementName(e,k)))return this.remove(),!1;b.name=g;if(!(b=a.onElement(e,b)))return this.remove(),
!1;if(b!==this)return this.replaceWith(b),!1;if(b.name==k)break;if(b.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(b),!1;if(!b.name)return this.replaceWithChildren(),!1}k=b.attributes;var c,f;for(c in k){for(g=k[c];;)if(f=a.onAttributeName(e,c))if(f!=c)delete k[c],c=f;else break;else{delete k[c];break}f&&(!1===(g=a.onAttribute(e,b,f,g))?delete k[f]:k[f]=g)}b.isEmpty||this.filterChildren(a,!1,e);return!0},filterChildren:g.filterChildren,writeHtml:function(a,e){e&&this.filter(e);var b=this.name,
k=[],g=this.attributes,c,f;a.openTag(b,g);for(c in g)k.push([c,g[c]]);a.sortAttributes&&k.sort(h);c=0;for(f=k.length;c<f;c++)g=k[c],a.attribute(g[0],g[1]);a.openTagClose(b,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(b)},writeChildrenHtml:g.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,e=a.length;e;)a[--e].insertAfter(this);this.remove()},forEach:g.forEach,getFirst:function(a){if(!a)return this.children.length?this.children[0]:null;"function"!=typeof a&&
(a=b(a));for(var e=0,g=this.children.length;e<g;++e)if(a(this.children[e]))return this.children[e];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 e=0,b=a.length;e<b;++e)a[e].parent=this},getOuterHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},split:function(a){for(var e=this.children.splice(a,
this.children.length-a),b=this.clone(),k=0;k<e.length;++k)e[k].parent=b;b.children=e;e[0]&&(e[0].previous=null);0<a&&(this.children[a-1].next=null);this.parent.add(b,this.getIndex()+1);return b},find:function(a,e){void 0===e&&(e=!1);var b=[],k;for(k=0;k<this.children.length;k++){var g=this.children[k];"function"==typeof a&&a(g)?b.push(g):"string"==typeof a&&g.name===a&&b.push(g);e&&g.find&&(b=b.concat(g.find(a,e)))}return b},findOne:function(a,e){var b=null,k=CKEDITOR.tools.array.find(this.children,
function(k){var c="function"===typeof a?a(k):k.name===a;if(c||!e)return c;k.children&&k.findOne&&(b=k.findOne(a,!0));return!!b});return b||k||null},addClass:function(a){if(!this.hasClass(a)){var e=this.attributes["class"]||"";this.attributes["class"]=e+(e?" ":"")+a}},removeClass:function(a){var e=this.attributes["class"];e&&((e=CKEDITOR.tools.trim(e.replace(new RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=e:delete this.attributes["class"])},hasClass:function(a){var e=this.attributes["class"];
return e?(new RegExp("(?:^|\\s)"+a+"(?\x3d\\s|$)")).test(e):!1},getFilterContext:function(a){var e=[];a||(a={nonEditable:!1,nestedEditable:!1});a.nonEditable||"false"!=this.attributes.contenteditable?a.nonEditable&&!a.nestedEditable&&"true"==this.attributes.contenteditable&&e.push("nestedEditable",!0):e.push("nonEditable",!0);if(e.length){a=CKEDITOR.tools.copy(a);for(var b=0;b<e.length;b+=2)a[e[b]]=e[b+1]}return a}},!0)}(),function(){var b=/{([^}]+)}/g;CKEDITOR.template=function(b){this.source="function"===
typeof b?b:String(b)};CKEDITOR.template.prototype.output=function(h,g){var a=("function"===typeof this.source?this.source(h):this.source).replace(b,function(a,b){return void 0!==h[b]?h[b]:a});return g?g.push(a):a}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(b){function h(){CKEDITOR.currentInstance==b&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))}CKEDITOR.instances[b.name]=b;b.on("focus",function(){CKEDITOR.currentInstance!=
b&&(CKEDITOR.currentInstance=b,CKEDITOR.fire("currentInstance"))});b.on("blur",h);b.on("destroy",h);CKEDITOR.fire("instance",null,b)},CKEDITOR.remove=function(b){delete CKEDITOR.instances[b.name]},function(){var b={};CKEDITOR.addTemplate=function(h,g){var a=b[h];if(a)return a;a={name:h,source:g};CKEDITOR.fire("template",a);return b[h]=new CKEDITOR.template(a.source)};CKEDITOR.getTemplate=function(h){return b[h]}}(),function(){var b=[];CKEDITOR.addCss=function(h){b.push(h)};CKEDITOR.getCss=function(){return b.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(b,h){b=CKEDITOR.editor._getEditorElement(b);if(!b)return null;if(CKEDITOR.editor.shouldDelayEditorCreation(b,h))return CKEDITOR.editor.initializeDelayedEditorCreation(b,h,"inline");var g=b.is("textarea")?b:null,a=g?g.getValue():b.getHtml(),e=new CKEDITOR.editor(h,b,CKEDITOR.ELEMENT_MODE_INLINE);
g?(e.setData(a,null,!0),b=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+!!e.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+g.getValue()+"\x3c/div\x3e",CKEDITOR.document),b.insertAfter(g),g.hide(),g.$.form&&e._attachToForm()):(h&&"undefined"!==typeof h.readOnly&&!h.readOnly&&b.setAttribute("contenteditable","true"),e.setData(a,null,!0));e.on("loaded",function(){e.fire("uiReady");e.editable(b);e.container=b;e.ui.contentsElement=b;e.setData(e.getData(1));e.resetDirty();e.fire("contentDom");
e.mode="wysiwyg";e.fire("mode");e.status="ready";e.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,e)},null,null,1E4);e.on("destroy",function(){var a=e.container;g&&a&&(a.clearCustomData(),a.remove());g&&g.show();e.element.clearCustomData();delete e.element});return e};CKEDITOR.inlineAll=function(){var b,h,g;for(g in CKEDITOR.dtd.$editable)for(var a=CKEDITOR.document.getElementsByTag(g),e=0,m=a.count();e<m;e++)b=a.getItem(e),"true"!=b.getAttribute("contenteditable")||b.getEditor()||(h=
{element:b,config:{}},!1!==CKEDITOR.fire("inline",h)&&CKEDITOR.inline(b,h.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function b(a,e,b,k){a=CKEDITOR.editor._getEditorElement(a);if(!a)return null;if(CKEDITOR.editor.shouldDelayEditorCreation(a,e))return CKEDITOR.editor.initializeDelayedEditorCreation(a,e,"replace");var l=new CKEDITOR.editor(e,a,k);k==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.setStyle("visibility",
"hidden"),l._.required=a.hasAttribute("required"),a.removeAttribute("required"));b&&l.setData(b,null,!0);l.on("loaded",function(){l.isDestroyed()||l.isDetached()||(g(l),k==CKEDITOR.ELEMENT_MODE_REPLACE&&l.config.autoUpdateElement&&a.$.form&&l._attachToForm(),l.setMode(l.config.startupMode,function(){l.resetDirty();l.status="ready";l.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,l)}))});l.on("destroy",h);return l}function h(){var a=this.container,e=this.element;a&&(a.clearCustomData(),
a.remove());e&&(e.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(e.show(),this._.required&&e.setAttribute("required","required")),delete this.element)}function g(a){var e=a.name,b=a.element,k=a.elementMode,g=a.fire("uiSpace",{space:"top",html:""}).html,c=a.fire("uiSpace",{space:"bottom",html:""}).html,f=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'),e=CKEDITOR.dom.element.createFromHtml(f.output({id:a.id,name:e,langDir:a.lang.dir,
langCode:a.langCode,voiceLabel:a.applicationTitle,topHtml:g?'\x3cspan id\x3d"'+a.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+g+"\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"}));k==CKEDITOR.ELEMENT_MODE_REPLACE?(b.hide(),e.insertAfter(b)):b.append(e);a.container=
e;a.ui.contentsElement=a.ui.space("contents");g&&a.ui.space("top").unselectable();c&&a.ui.space("bottom").unselectable();b=a.config.width;k=a.config.height;b&&e.setStyle("width",CKEDITOR.tools.cssLength(b));k&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(k));e.disableContextMenu();CKEDITOR.env.webkit&&e.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(a,e){return b(a,e,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(a,e,g){return b(a,
e,g,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),e=0;e<a.length;e++){var b=null,k=a[e];if(k.name||k.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(k.className))continue}else if("function"==typeof arguments[0]&&(b={},!1===arguments[0](k,b)))continue;this.replace(k,b)}}};CKEDITOR.editor.prototype.addMode=function(a,e){(this._.modes||(this._.modes={}))[a]=e};CKEDITOR.editor.prototype.setMode=
function(a,e){var b=this,k=this._.modes;if(a!=b.mode&&k&&k[a]){b.fire("beforeSetMode",a);if(b.mode){var g=b.checkDirty(),k=b._.previousModeData,c,f=0;b.fire("beforeModeUnload");b.editable(0);b._.previousMode=b.mode;b._.previousModeData=c=b.getData(1);"source"==b.mode&&k==c&&(b.fire("lockSnapshot",{forceUpdate:!0}),f=1);b.ui.space("contents").setHtml("");b.mode=""}else b._.previousModeData=b.getData(1);this._.modes[a](function(){b.mode=a;void 0!==g&&!g&&b.resetDirty();f?b.fire("unlockSnapshot"):"wysiwyg"==
a&&b.fire("saveSnapshot");setTimeout(function(){b.isDestroyed()||b.isDetached()||(b.fire("mode"),e&&e.call(b))},0)})}};CKEDITOR.editor.prototype.resize=function(a,e,b,k){var g=this.container,c=this.ui.space("contents"),f=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;k=k?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):g;if(a||0===a)a=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(a));k.setSize("width",a,!0);f&&
(f.style.width="1%");e=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(e));var d=(k.$.offsetHeight||0)-(c.$.clientHeight||0),g=Math.max(e-(b?0:d),0);e=b?e+d:e;c.setStyle("height",CKEDITOR.tools.cssLength(g));f&&(f.style.width="100%");this.fire("resize",{outerHeight:e,contentsHeight:g,outerWidth:a||k.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 b(d){var f=d.editor,e=d.data.path,b=e.blockLimit,k=d.data.selection,g=k.getRanges()[0],m;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(k=h(k,e))k.appendBogus(),m=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.edge&&f._.previousActive;c(f,e.block,b)&&g.collapsed&&!g.getCommonAncestor().isReadOnly()&&(e=g.clone(),e.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),b=new CKEDITOR.dom.walker(e),b.guard=function(d){return!a(d)||
d.type==CKEDITOR.NODE_COMMENT||d.isReadOnly()},!b.checkForward()||e.checkStartOfBlock()&&e.checkEndOfBlock())&&(f=g.fixBlock(!0,f.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(f=f.getFirst(a))&&f.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(f.getText()).match(/^(?:&nbsp;|\xa0)$/)&&f.remove(),m=1,d.cancel());m&&g.select()}function h(d,c){if(d.isFake)return 0;var f=c.block||c.blockLimit,e=f&&f.getLast(a);if(!(!f||!f.isBlockBoundary()||e&&e.type==CKEDITOR.NODE_ELEMENT&&
e.isBlockBoundary()||f.is("pre")||f.getBogus()))return f}function g(a){var d=a.data.getTarget();d.is("input")&&(d=d.getAttribute("type"),"submit"!=d&&"reset"!=d||a.data.preventDefault())}function a(a){return u(a)&&x(a)}function e(a,d){return function(c){var f=c.data.$.toElement||c.data.$.fromElement||c.data.$.relatedTarget;(f=f&&f.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(f):null)&&(d.equals(f)||d.contains(f))||a.call(this,c)}}function m(a){return!!a.getRanges()[0].startPath().contains({table:1,
ul:1,ol:1,dl:1})}function k(d){function c(d){var e={table:1,ul:1,ol:1,dl:1};return function(c,b){b&&c.type==CKEDITOR.NODE_ELEMENT&&c.is(e)&&(f=c);if(!(b||!a(c)||d&&w(c)))return!1}}var f,e=d.getRanges()[0],b=d.root;return m(d)&&(d=e.clone(),d.collapse(1),d.setStartAt(b,CKEDITOR.POSITION_AFTER_START),b=new CKEDITOR.dom.walker(d),b.guard=c(),b.checkBackward(),f)?(d=e.clone(),d.collapse(),d.setEndAt(f,CKEDITOR.POSITION_AFTER_END),b=new CKEDITOR.dom.walker(d),b.guard=c(!0),f=!1,b.checkForward(),f):null}
function l(a){return a.block.getParent().getChildCount()}function c(a,d,c){return!1!==a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(c)&&!d||d&&"true"==d.getAttribute("contenteditable"))}function f(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function d(a){a&&a.isEmptyInlineRemoveable()&&a.remove()}function n(a){var d=a.editor;d.getSelection().scrollIntoView();setTimeout(function(){d.fire("saveSnapshot")},
0)}function q(a,d,c){var f=a.getCommonAncestor(d);for(d=a=c?d:a;(a=a.getParent())&&!f.equals(a)&&1==a.getChildCount();)d=a;d.remove()}var u,x,p,w,B,r,y,z,v,t,C={ul:1,ol:1,dl:1};CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,d){this.base(d.$||d);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 d=this.$.scrollTop;this.$.focus();this.$.scrollTop=d}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,d){var c=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a="focus"==a?"focusin":"focusout",d=e(d,this),c[0]=a,c[1]=d);return CKEDITOR.dom.element.prototype.on.apply(this,c)},attachListener:function(a){!this._.listeners&&(this._.listeners=[]);var d=Array.prototype.slice.call(arguments,1),d=a.on.apply(a,d);this._.listeners.push(d);return d},clearListeners:function(){var a=this._.listeners;
try{for(;a.length;)a.pop().removeListener()}catch(d){}},restoreAttrs:function(){var a=this._.attrChanges,d,c;for(c in a)a.hasOwnProperty(c)&&(d=a[c],null!==d?this.setAttribute(c,d):this.removeAttribute(c))},attachClass:function(a){var d=this.getCustomData("classes");this.hasClass(a)||(!d&&(d=[]),d.push(a),this.setCustomData("classes",d),this.addClass(a))},changeAttr:function(a,d){var c=this.getAttribute(a);d!==c&&(!this._.attrChanges&&(this._.attrChanges={}),a in this._.attrChanges||(this._.attrChanges[a]=
c),this.setAttribute(a,d))},insertText:function(a){this.editor.focus();this.insertHtml(this.transformPlainTextToHtml(a),"text")},transformPlainTextToHtml:function(a){var d=this.editor.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:this.editor.activeEnterMode;return CKEDITOR.tools.transformPlainTextToHtml(a,d)},insertHtml:function(a,d,c){var f=this.editor;f.focus();f.fire("saveSnapshot");c||(c=f.getSelection().getRanges()[0]);r(this,d||"html",a,c);c.select();n(this);this.editor.fire("afterInsertHtml",
{})},insertHtmlIntoRange:function(a,d,c){r(this,c||"html",a,d);this.editor.fire("afterInsertHtml",{intoRange:d})},insertElement:function(d,c){var f=this.editor;f.focus();f.fire("saveSnapshot");var e=f.activeEnterMode,f=f.getSelection(),b=d.getName(),b=CKEDITOR.dtd.$block[b];c||(c=f.getRanges()[0]);this.insertElementIntoRange(d,c)&&(c.moveToPosition(d,CKEDITOR.POSITION_AFTER_END),b&&((b=d.getNext(function(d){return a(d)&&!w(d)}))&&b.type==CKEDITOR.NODE_ELEMENT&&b.is(CKEDITOR.dtd.$block)?b.getDtd()["#"]?
c.moveToElementEditStart(b):c.moveToElementEditEnd(d):b||e==CKEDITOR.ENTER_BR||(b=c.fixBlock(!0,e==CKEDITOR.ENTER_DIV?"div":"p"),c.moveToElementEditStart(b))));f.selectRanges([c]);n(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,c){var f=this.editor,e=f.config.enterMode,b=a.getName(),k=CKEDITOR.dtd.$block[b];if(c.checkReadOnly())return!1;c.deleteContents(1);c.startContainer.type==CKEDITOR.NODE_ELEMENT&&(c.startContainer.is({tr:1,table:1,tbody:1,
thead:1,tfoot:1})?y(c):c.startContainer.is(CKEDITOR.dtd.$list)&&z(c));var g,h;if(k)for(;(g=c.getCommonAncestor(0,1))&&(h=CKEDITOR.dtd[g.getName()])&&(!h||!h[b]);)if(g.getName()in CKEDITOR.dtd.span){var k=c.splitElement(g),m=c.createBookmark();d(g);d(k);c.moveToBookmark(m)}else c.checkStartOfBlock()&&c.checkEndOfBlock()?(c.setStartBefore(g),c.collapse(!0),g.remove()):c.splitBlock(e==CKEDITOR.ENTER_DIV?"div":"p",f.editable());c.insertNode(a);return!0},setData:function(a,d){d||(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 d=this.getHtml();a||(d=this.editor.dataProcessor.toDataFormat(d));return d},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 d=c.getDocument().$,f=d.getSelection(),e;a:if(f.anchorNode&&f.anchorNode==c.$)e=!0;else{if(CKEDITOR.env.webkit&&(e=c.getDocument().getActive())&&e.equals(c)&&!f.anchorNode){e=!0;break a}e=void 0}e&&(e=new CKEDITOR.dom.range(c),e.moveToElementEditStart(c),
d=d.createRange(),d.setStart(e.startContainer.$,e.startOffset),d.collapse(!0),f.removeAllRanges(),f.addRange(d))}function d(){var a=c.getDocument().$,f=a.selection,e=c.getDocument().getActive();"None"==f.type&&e.equals(c)&&(f=new CKEDITOR.dom.range(c),a=a.body.createTextRange(),f.moveToElementEditStart(c),f=f.startContainer,f.type!=CKEDITOR.NODE_ELEMENT&&(f=f.getParent()),a.moveToElementText(f.$),a.collapse(!0),a.select())}var c=this;if(CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&
(this.focus(),d());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()};v.eol.detect(a,this);v.bogus.exclude(a);v.cell.shrink(a);a.fragment=a.range.cloneContents();v.tree.rebuild(a,this);v.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,d){var c=t,f={range:a,doc:a.document},
e=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),e;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.table.detectPurge(f);f.bookmark=a.createBookmark();delete f.range;var b=this.editor.createRange();b.moveToPosition(f.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);f.targetBookmark=b.createBookmark();c.list.detectMerge(f,this);c.table.detectRanges(f,this);c.block.detectMerge(f,this);f.tableContentsRanges?(c.table.deleteRanges(f),a.moveToBookmark(f.bookmark),f.range=a):(a.moveToBookmark(f.bookmark),
f.range=a,a.extractContents(c.detectExtractMerge(f)));a.moveToBookmark(f.targetBookmark);a.optimize();c.fixUneditableRangePosition(a);c.list.merge(f,this);c.table.purge(f,this);c.block.merge(f,this);if(d){c=a.startPath();if(f=a.checkStartOfBlock()&&a.checkEndOfBlock()&&c.block&&!a.root.equals(c.block)){a:{var f=c.block.getElementsByTag("span"),b=0,k;if(f)for(;k=f.getItem(b++);)if(!x(k)){f=!0;break a}f=!1}f=!f}f&&(a.moveToPosition(c.block,CKEDITOR.POSITION_BEFORE_START),c.block.remove())}else c.autoParagraph(this.editor,
a),p(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return e},setup:function(){var d=this.editor;this.attachListener(d,"beforeGetData",function(){var a=this.getData();this.is("textarea")||!1!==d.config.ignoreEmptyParagraph&&(a=a.replace(B,function(a,d){return d}));d.setData(a,null,1)},this);this.attachListener(d,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(d,"afterSetData",function(){this.setData(d.getData(1))},this);this.attachListener(d,
"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(d,"beforeFocus",function(){var a=d.getSelection();(a=a&&a.getNative())&&"Control"==a.type||this.focus()},this);this.attachListener(d,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(d,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(d,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(d.readOnly);this.attachClass("cke_editable");
d.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):d.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&d.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+d.config.contentsLangDirection);d.keystrokeHandler.blockedKeystrokes[8]=+d.readOnly;d.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(){d._.previousScrollTop=d.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14<CKEDITOR.env.version){var c=function(){var a=d.editable();null!=d._.previousScrollTop&&a.getDocument().equals(CKEDITOR.document)&&(a.$.scrollTop=d._.previousScrollTop,d._.previousScrollTop=null,this.removeListener("scroll",c))};this.on("scroll",c)}d.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,d.once("contentDom",function(){d.focusManager.focus(this)},this));this.isInline()&&
this.changeAttr("tabindex",d.tabIndex);if(!this.is("textarea")){d.document=this.getDocument();d.window=this.getWindow();var f=d.document;this.changeAttr("spellcheck",!d.config.disableNativeSpellChecker);var e=d.config.contentsLangDirection;this.getDirection(1)!=e&&this.changeAttr("dir",e);var b=CKEDITOR.getCss();if(b){var e=f.getHead(),h=e.getCustomData("stylesheet");h?b!=h.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?h.$.styleSheet.cssText=b:h.setText(b)):(b=f.appendStyleText(b),b=new CKEDITOR.dom.element(b.ownerNode||
b.owningElement),e.setCustomData("stylesheet",b),b.data("cke-temp",1))}e=f.getCustomData("stylesheet_ref")||0;f.setCustomData("stylesheet_ref",e+1);this.setCustomData("cke_includeReadonly",!d.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var d=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");d&&2!=a.$.button&&d.isReadOnly()&&a.preventDefault()});var n={8:1,46:1};this.attachListener(d,"key",function(a){if(d.readOnly)return!0;var c=a.data.domEvent.getKey(),
f,e=d.getSelection();if(0!==e.getRanges().length){if(c in n){var b;a=e.getRanges()[0];var g=a.startPath(),h,q,r,c=8==c,t=!1;if(CKEDITOR.env.ie&&11>CKEDITOR.env.version&&e.getSelectedElement())b=e.getSelectedElement();else if(m(e)){var w=new CKEDITOR.dom.walker(a),J=a.collapsed?a.startContainer:w.next(),t=!1,F;if(a.checkStartOfBlock()){F=a.startPath().block||a.startPath().blockLimit;var v=F.getName();F=-1!==CKEDITOR.tools.array.indexOf(["dd","dt","li"],v)&&null===F.getPrevious()}else F=!1;if(F){for(;J&&
!t;)t=J.$.nodeName.toLowerCase(),t=!!C[t],J=w.next();w=l(a.startPath());J=l(a.endPath());t=t||w!==J}else t=void 0;t||(b=k(e))}b||t?(d.fire("saveSnapshot"),t?((f=a.startContainer.getAscendant(C,!0))?(a.setStart(f,0),a.enlarge(CKEDITOR.ENLARGE_ELEMENT),b=a):b=null,b.deleteContents()):(a.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START),b.remove()),a.select(),d.fire("saveSnapshot"),f=1):a.collapsed&&((h=g.block)&&(r=h[c?"getPrevious":"getNext"](u))&&r.type==CKEDITOR.NODE_ELEMENT&&r.is("table")&&a[c?"checkStartOfBlock":
"checkEndOfBlock"]()?(d.fire("saveSnapshot"),a[c?"checkEndOfBlock":"checkStartOfBlock"]()&&h.remove(),a["moveToElementEdit"+(c?"End":"Start")](r),a.select(),d.fire("saveSnapshot"),f=1):g.blockLimit&&g.blockLimit.is("td")&&(q=g.blockLimit.getAscendant("table"))&&a.checkBoundaryOfElement(q,c?CKEDITOR.START:CKEDITOR.END)&&(r=q[c?"getPrevious":"getNext"](u))?(d.fire("saveSnapshot"),a["moveToElementEdit"+(c?"End":"Start")](r),a.checkStartOfBlock()&&a.checkEndOfBlock()?r.remove():a.select(),d.fire("saveSnapshot"),
f=1):(q=g.contains(["td","th","caption"]))&&a.checkBoundaryOfElement(q,c?CKEDITOR.START:CKEDITOR.END)&&(f=1))}return!f}});d.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(c){c.data.getKeystroke()in n&&!this.getFirst(a)&&(this.appendBogus(),c=d.createRange(),c.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),c.select())});this.attachListener(this,"dblclick",function(a){if(d.readOnly)return!1;a={element:a.data.getTarget()};d.fire("doubleclick",a)});
CKEDITOR.env.ie&&this.attachListener(this,"click",g);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(a){var c=a.data.getTarget();c.is("img","hr","input","textarea","select")&&!c.isReadOnly()&&(d.getSelection().selectElement(c),c.is("input","textarea","select")&&a.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(a){(a=a.data.getTarget())&&a.is("img")&&!a.isReadOnly()&&d.getSelection().selectElement(a)});CKEDITOR.env.gecko&&this.attachListener(this,
"mouseup",function(a){if(2==a.data.$.button&&(a=a.data.getTarget(),!a.getAscendant("table")&&!a.getOuterHtml().replace(B,""))){var c=d.createRange();c.moveToElementEditStart(a);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(d,"key",function(a){if(d.readOnly)return!0;
var c=a.data.domEvent.getKey();if(c in n&&(a=d.getSelection(),0!==a.getRanges().length)){var c=8==c,f=a.getRanges()[0];a=f.startPath();if(f.collapsed)a:{var e=a.block;if(e&&f[c?"checkStartOfBlock":"checkEndOfBlock"](!0)&&f.moveToClosestEditablePosition(e,!c)&&f.collapsed){if(f.startContainer.type==CKEDITOR.NODE_ELEMENT){var b=f.startContainer.getChild(f.startOffset-(c?1:0));if(b&&b.type==CKEDITOR.NODE_ELEMENT&&b.is("hr")){d.fire("saveSnapshot");b.remove();a=!0;break a}}f=f.startPath().block;if(!f||
f&&f.contains(e))a=void 0;else{d.fire("saveSnapshot");var k;(k=(c?f:e).getBogus())&&k.remove();k=d.getSelection();b=k.createBookmarks();(c?e:f).moveChildren(c?f:e,!1);a.lastElement.mergeSiblings();q(e,f,!c);k.selectBookmarks(b);a=!0}}else a=!1}else c=f,k=a.block,f=c.endPath().block,k&&f&&!k.equals(f)?(d.fire("saveSnapshot"),(e=k.getBogus())&&e.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),f.getParent()&&(f.moveChildren(k,!1),a.lastElement.mergeSiblings(),q(k,f,!0)),c=d.getSelection().getRanges()[0],
c.collapse(1),c.optimize(),""===c.startContainer.getHtml()&&c.startContainer.appendBogus(),c.select(),a=!0):a=!1;if(!a)return;d.getSelection().scrollIntoView();d.fire("saveSnapshot");return!1}},this,null,100)}},getUniqueId:function(){var a;try{this._.expandoNumber=a=CKEDITOR.dom.domObject.prototype.getUniqueId.call(this)}catch(d){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(),d=a.getHead();if(d.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");--c?a.setCustomData("stylesheet_ref",c):(a.removeCustomData("stylesheet_ref"),d.removeCustomData("stylesheet").remove())}}}}});CKEDITOR.editor.prototype.editable=function(a){var d=this._.editable;if(d&&a)return 0;if(!arguments.length)return d;a?d=a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(d&&d.detach(),d=
null);return this._.editable=d};CKEDITOR.on("instanceLoaded",function(a){var d=a.editor;d.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))});d.on("selectionChange",function(a){if(!d.readOnly){var c=d.getSelection();c&&!c.isLocked&&(c=d.checkDirty(),d.fire("lockSnapshot"),b(a),d.fire("unlockSnapshot"),
!c&&d.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var d=a.editor;d.on("mode",function(){var a=d.editable();if(a&&a.isInline()){var c=d.title;a.changeAttr("role","textbox");a.changeAttr("aria-multiline","true");c&&a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);var f=d.fire("ariaEditorHelpLabel",{}).label;if(f&&(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var e=CKEDITOR.tools.getNextId(),f=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+
e+'" class\x3d"cke_voice_label"\x3e'+f+"\x3c/span\x3e");c.append(f);a.changeAttr("aria-describedby",e)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");u=CKEDITOR.dom.walker.whitespaces(!0);x=CKEDITOR.dom.walker.bookmark(!1,!0);p=CKEDITOR.dom.walker.empty();w=CKEDITOR.dom.walker.bogus();B=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;r=
function(){function e(a){return a.type==CKEDITOR.NODE_ELEMENT}function b(a,d){var c,f,k,g,h=[],m=d.range.startContainer;c=d.range.startPath();for(var m=n[m.getName()],l=0,q=a.getChildren(),L=q.count(),r=-1,t=-1,w=0,J=c.contains(n.$list);l<L;++l)c=q.getItem(l),e(c)?(k=c.getName(),J&&k in CKEDITOR.dtd.$list?h=h.concat(b(c,d)):(g=!!m[k],"br"!=k||!c.data("cke-eol")||l&&l!=L-1||(w=(f=l?h[l-1].node:q.getItem(l+1))&&(!e(f)||!f.is("br")),f=f&&e(f)&&n.$block[f.getName()]),-1!=r||g||(r=l),g||(t=l),h.push({isElement:1,
isLineBreak:w,isBlock:c.isBlockBoundary(),hasBlockSibling:f,node:c,name:k,allowed:g}),f=w=0)):h.push({isElement:0,node:c,allowed:1});-1<r&&(h[r].firstNotAllowed=1);-1<t&&(h[t].lastNotAllowed=1);return h}function k(a,d){var c=[],f=a.getChildren(),b=f.count(),g,h=0,m=n[d],l=!a.is(n.$inline)||a.is("br");for(l&&c.push(" ");h<b;h++)g=f.getItem(h),e(g)&&!g.is(m)?c=c.concat(k(g,d)):c.push(g);l&&c.push(" ");return c}function g(a){return e(a.startContainer)&&a.startContainer.getChild(a.startOffset-1)}function h(a){return a&&
e(a)&&(a.is(n.$removeEmpty)||a.is("a")&&!a.isBlockBoundary())}function m(a,d,c,f){var b=a.clone(),k,g;b.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);(k=(new CKEDITOR.dom.walker(b)).next())&&e(k)&&q[k.getName()]&&(g=k.getPrevious())&&e(g)&&!g.getParent().equals(a.startContainer)&&c.contains(g)&&f.contains(k)&&k.isIdentical(g)&&(k.moveChildren(g),k.remove(),m(a,d,c,f))}function l(a,d){function c(a,d){if(d.isBlock&&d.isElement&&!d.node.is("br")&&e(a)&&a.is("br"))return a.remove(),1}var f=d.endContainer.getChild(d.endOffset),
b=d.endContainer.getChild(d.endOffset-1);f&&c(f,a[a.length-1]);b&&c(b,a[0])&&(d.setEnd(d.endContainer,d.endOffset-1),d.collapse())}var n=CKEDITOR.dtd,q={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},r={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},L=CKEDITOR.tools.extend({},n.$inline);delete L.br;return function(q,t,w,u){var v=q.editor,p=!1,z;"unfiltered_html"==t&&(t="html",p=!0);if(!u.checkReadOnly()){var x=(new CKEDITOR.dom.elementPath(u.startContainer,u.root)).blockLimit||
u.root;t={type:t,dontFilter:p,editable:q,editor:v,range:u,blockLimit:x,mergeCandidates:[],zombies:[]};var p=t.range,x=t.mergeCandidates,y="html"===t.type,E,C,T,Z,aa;"text"==t.type&&p.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(C=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",p.document),p.insertNode(C),p.setStartAfter(C));T=new CKEDITOR.dom.elementPath(p.startContainer);t.endPath=Z=new CKEDITOR.dom.elementPath(p.endContainer);if(!p.collapsed){E=Z.block||Z.blockLimit;var ca=p.getCommonAncestor();
E&&!E.equals(ca)&&!E.contains(ca)&&p.checkEndOfBlock()&&t.zombies.push(E);p.deleteContents()}for(;(aa=g(p))&&e(aa)&&aa.isBlockBoundary()&&T.contains(aa);)p.moveToPosition(aa,CKEDITOR.POSITION_BEFORE_END);m(p,t.blockLimit,T,Z);C&&(p.setEndBefore(C),p.collapse(),C.remove());C=p.startPath();if(E=C.contains(h,!1,1))z=p.splitElement(E),t.inlineStylesRoot=E,t.inlineStylesPeak=C.lastElement;C=p.createBookmark();y&&(d(E),d(z));(E=C.startNode.getPrevious(a))&&e(E)&&h(E)&&x.push(E);(E=C.startNode.getNext(a))&&
e(E)&&h(E)&&x.push(E);for(E=C.startNode;(E=E.getParent())&&h(E);)x.push(E);p.moveToBookmark(C);z=q.getHtml();z=""===z||z.match(B);v.enterMode===CKEDITOR.ENTER_DIV&&z&&((v=q.getFirst())&&v.remove(),u.setStartAt(q,CKEDITOR.POSITION_AFTER_START),u.collapse(!0));if(q=w){q=t.range;if("text"==t.type&&t.inlineStylesRoot){u=t.inlineStylesPeak;v=u.getDocument().createText("{cke-peak}");for(z=t.inlineStylesRoot.getParent();!u.equals(z);)v=v.appendTo(u.clone()),u=u.getParent();w=v.getOuterHtml().split("{cke-peak}").join(w)}u=
t.blockLimit.getName();if(/^\s+|\s+$/.test(w)&&"span"in CKEDITOR.dtd[u]){var V='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';w=V+w+V}w=t.editor.dataProcessor.toHtml(w,{context:null,fixForBody:!1,protectedWhitespaces:!!V,dontFilter:t.dontFilter,filter:t.editor.activeFilter,enterMode:t.editor.activeEnterMode});u=q.document.createElement("body");u.setHtml(w);V&&(u.getFirst().remove(),u.getLast().remove());if((V=q.startPath().block)&&(1!=V.getChildCount()||!V.getBogus()))a:{var Q;if(1==
u.getChildCount()&&e(Q=u.getFirst())&&Q.is(r)&&!Q.hasAttribute("contenteditable")){V=Q.getElementsByTag("*");q=0;for(z=V.count();q<z;q++)if(v=V.getItem(q),!v.is(L))break a;Q.moveChildren(Q.getParent(1));Q.remove()}}t.dataWrapper=u;q=w}if(q){Q=t.range;q=Q.document;u=t.blockLimit;z=0;var K,V=[],ea,R;w=C=0;var ba,v=Q.startContainer;aa=t.endPath.elements[0];var W,p=aa.getPosition(v),x=!!aa.getCommonAncestor(v)&&p!=CKEDITOR.POSITION_IDENTICAL&&!(p&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED),
v=b(t.dataWrapper,t);for(t.editor.enterMode!==CKEDITOR.ENTER_BR&&l(v,Q);z<v.length;z++){p=v[z];if(y=p.isLineBreak)y=Q,E=u,Z=T=void 0,p.hasBlockSibling?y=1:(T=y.startContainer.getAscendant(n.$block,1))&&T.is({div:1,p:1})?(Z=T.getPosition(E),Z==CKEDITOR.POSITION_IDENTICAL||Z==CKEDITOR.POSITION_CONTAINS?y=0:(E=y.splitElement(T),y.moveToPosition(E,CKEDITOR.POSITION_AFTER_START),y=1)):y=0;if(y)w=0<z;else{y=Q.startPath();!p.isBlock&&c(t.editor,y.block,y.blockLimit)&&(R=f(t.editor))&&(R=q.createElement(R),
R.appendBogus(),Q.insertNode(R),CKEDITOR.env.needsBrFiller&&(K=R.getBogus())&&K.remove(),Q.moveToPosition(R,CKEDITOR.POSITION_BEFORE_END));if((y=Q.startPath().block)&&!y.equals(ea)){if(K=y.getBogus())K.remove(),V.push(y);ea=y}p.firstNotAllowed&&(C=1);if(C&&p.isElement){y=Q.startContainer;for(E=null;y&&!n[y.getName()][p.name];){if(y.equals(u)){y=null;break}E=y;y=y.getParent()}if(y)E&&(ba=Q.splitElement(E),t.zombies.push(ba),t.zombies.push(E));else{E=u.getName();W=!z;y=z==v.length-1;E=k(p.node,E);T=
[];Z=E.length;for(var ca=0,ka=void 0,la=0,ma=-1;ca<Z;ca++)ka=E[ca]," "==ka?(la||W&&!ca||(T.push(new CKEDITOR.dom.text(" ")),ma=T.length),la=1):(T.push(ka),la=0);y&&ma==T.length&&T.pop();W=T}}if(W){for(;y=W.pop();)Q.insertNode(y);W=0}else Q.insertNode(p.node);p.lastNotAllowed&&z<v.length-1&&((ba=x?aa:ba)&&Q.setEndAt(ba,CKEDITOR.POSITION_AFTER_START),C=0);Q.collapse()}}1!=v.length?K=!1:(K=v[0],K=K.isElement&&"false"==K.node.getAttribute("contenteditable"));K&&(w=!0,y=v[0].node,Q.setStartAt(y,CKEDITOR.POSITION_BEFORE_START),
Q.setEndAt(y,CKEDITOR.POSITION_AFTER_END));t.dontMoveCaret=w;t.bogusNeededBlocks=V}K=t.range;var ga;W=t.bogusNeededBlocks;for(ea=K.createBookmark();R=t.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=t.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(!t.dontMoveCaret){for(R=g(K);R&&e(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(a)}ga&&K.moveToRange(ga)}}}}();y=function(){function a(d){d=new CKEDITOR.dom.walker(d);d.guard=function(a,d){if(d)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};
d.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};return d}function d(a,c,f){c=a.getDocument().createElement(c);a.append(c,f);return c}function c(a){var d=a.count(),f;for(d;0<d--;)f=a.getItem(d),CKEDITOR.tools.trim(f.getHtml())||(f.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&f.getChildCount()&&f.getFirst().remove())}return function(f){var e=f.startContainer,b=e.getAscendant("table",1),k=!1;c(b.getElementsByTag("td"));c(b.getElementsByTag("th"));b=f.clone();b.setStart(e,0);b=
a(b).lastBackward();b||(b=f.clone(),b.setEndAt(e,CKEDITOR.POSITION_BEFORE_END),b=a(b).lastForward(),k=!0);b||(b=e);b.is("table")?(f.setStartAt(b,CKEDITOR.POSITION_BEFORE_START),f.collapse(!0),b.remove()):(b.is({tbody:1,thead:1,tfoot:1})&&(b=d(b,"tr",k)),b.is("tr")&&(b=d(b,b.getParent().is("thead")?"th":"td",k)),(e=b.getBogus())&&e.remove(),f.moveToPosition(b,k?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();z=function(){function a(d){d=new CKEDITOR.dom.walker(d);d.guard=function(a,
d){if(d)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||a.is(CKEDITOR.dtd.$listItem)};d.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$listItem)};return d}return function(d){var c=d.startContainer,f=!1,e;e=d.clone();e.setStart(c,0);e=a(e).lastBackward();e||(e=d.clone(),e.setEndAt(c,CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),f=!0);e||(e=c);e.is(CKEDITOR.dtd.$list)?(d.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),d.collapse(!0),e.remove()):
((c=e.getBogus())&&c.remove(),d.moveToPosition(e,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),d.select())}}();v={eol:{detect:function(a,d){var c=a.range,f=c.clone(),e=c.clone(),b=new CKEDITOR.dom.elementPath(c.startContainer,d),k=new CKEDITOR.dom.elementPath(c.endContainer,d);f.collapse(1);e.collapse();b.block&&f.checkBoundaryOfElement(b.block,CKEDITOR.END)&&(c.setStartAfter(b.block),a.prependEolBr=1);k.block&&e.checkBoundaryOfElement(k.block,CKEDITOR.START)&&(c.setEndBefore(k.block),
a.appendEolBr=1)},fix:function(a,d){var c=d.getDocument(),f;a.appendEolBr&&(f=this.createEolBr(c),a.fragment.append(f));!a.prependEolBr||f&&!f.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 d=a.range.getBoundaryNodes(),c=d.startNode,d=d.endNode;!d||!w(d)||c&&c.equals(d)||a.range.setEndBefore(d)}},tree:{rebuild:function(a,d){var c=a.range,f=c.getCommonAncestor(),e=new CKEDITOR.dom.elementPath(f,
d),b=new CKEDITOR.dom.elementPath(c.startContainer,d),c=new CKEDITOR.dom.elementPath(c.endContainer,d),k;f.type==CKEDITOR.NODE_TEXT&&(f=f.getParent());if(e.blockLimit.is({tr:1,table:1})){var g=e.contains("table").getParent();k=function(a){return!a.equals(g)}}else if(e.block&&e.block.is(CKEDITOR.dtd.$listItem)&&(b=b.contains(CKEDITOR.dtd.$list),c=c.contains(CKEDITOR.dtd.$list),!b.equals(c))){var h=e.contains(CKEDITOR.dtd.$list).getParent();k=function(a){return!a.equals(h)}}k||(k=function(a){return!a.equals(e.block)&&
!a.equals(e.blockLimit)});this.rebuildFragment(a,d,f,k)},rebuildFragment:function(a,d,c,f){for(var e;c&&!c.equals(d)&&f(c);)e=c.clone(0,1),a.fragment.appendTo(e),a.fragment=e,c=c.getParent()}},cell:{shrink:function(a){a=a.range;var d=a.startContainer,c=a.endContainer,f=a.startOffset,e=a.endOffset;d.type==CKEDITOR.NODE_ELEMENT&&d.equals(c)&&d.is("tr")&&++f==e&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};t=function(){function a(d,c){var f=d.getParent();if(f.is(CKEDITOR.dtd.$inline))d[c?"insertBefore":"insertAfter"](f)}
function d(c,f,e){a(f);a(e,1);for(var b;b=e.getNext();)b.insertAfter(f),f=b;p(c)&&c.remove()}function e(a,d){var c=new CKEDITOR.dom.range(a);c.setStartAfter(d.startNode);c.setEndBefore(d.endNode);return c}return{list:{detectMerge:function(a,d){var c=e(d,a.bookmark),f=c.startPath(),b=c.endPath(),k=f.contains(CKEDITOR.dtd.$list),g=b.contains(CKEDITOR.dtd.$list);a.mergeList=k&&g&&k.getParent().equals(g.getParent())&&!k.equals(g);a.mergeListItems=f.block&&b.block&&f.block.is(CKEDITOR.dtd.$listItem)&&
b.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 f=a.mergeListBookmark.startNode,e=a.mergeListBookmark.endNode,b=new CKEDITOR.dom.elementPath(f,c),k=new CKEDITOR.dom.elementPath(e,c);if(a.mergeList){var g=b.contains(CKEDITOR.dtd.$list),h=k.contains(CKEDITOR.dtd.$list);g.equals(h)||(h.moveChildren(g),h.remove())}a.mergeListItems&&
(b=b.contains(CKEDITOR.dtd.$listItem),k=k.contains(CKEDITOR.dtd.$listItem),b.equals(k)||d(k,f,e));f.remove();e.remove()}}},block:{detectMerge:function(a,d){if(!a.tableContentsRanges&&!a.mergeListBookmark){var c=new CKEDITOR.dom.range(d);c.setStartBefore(a.bookmark.startNode);c.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=c.createBookmark()}},merge:function(a,c){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var f=a.mergeBlockBookmark.startNode,e=a.mergeBlockBookmark.endNode,b=new CKEDITOR.dom.elementPath(f,
c),k=new CKEDITOR.dom.elementPath(e,c),b=b.block,k=k.block;b&&k&&!b.equals(k)&&d(k,f,e);f.remove();e.remove()}}},table:function(){function a(f){var e=[],b,k=new CKEDITOR.dom.walker(f),g=f.startPath().contains(c),h=f.endPath().contains(c),m={};k.guard=function(a,k){if(a.type==CKEDITOR.NODE_ELEMENT){var l="visited_"+(k?"out":"in");if(a.getCustomData(l))return;CKEDITOR.dom.element.setMarker(m,a,l,1)}if(k&&g&&a.equals(g))b=f.clone(),b.setEndAt(g,CKEDITOR.POSITION_BEFORE_END),e.push(b);else if(!k&&h&&
a.equals(h))b=f.clone(),b.setStartAt(h,CKEDITOR.POSITION_AFTER_START),e.push(b);else{if(l=!k)l=a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&(!g||d(a,g))&&(!h||d(a,h));if(!l&&(l=k))if(a.is(c))var l=g&&g.getAscendant("table",!0),n=h&&h.getAscendant("table",!0),q=a.getAscendant("table",!0),l=l&&l.contains(q)||n&&n.contains(q);else l=void 0;l&&(b=f.clone(),b.selectNodeContents(a),e.push(b))}};k.lastForward();CKEDITOR.dom.element.clearAllMarkers(m);return e}function d(a,c){var f=CKEDITOR.POSITION_CONTAINS+
CKEDITOR.POSITION_IS_CONTAINED,e=a.getPosition(c);return e===CKEDITOR.POSITION_IDENTICAL?!1:0===(e&f)}var c={td:1,th:1,caption:1};return{detectPurge:function(a){var d=a.range,f=d.clone();f.enlarge(CKEDITOR.ENLARGE_ELEMENT);var f=new CKEDITOR.dom.walker(f),e=0;f.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&++e};f.checkForward();if(1<e){var f=d.startPath().contains("table"),b=d.endPath().contains("table");f&&b&&d.checkBoundaryOfElement(f,CKEDITOR.START)&&d.checkBoundaryOfElement(b,
CKEDITOR.END)&&(d=a.range.clone(),d.setStartBefore(f),d.setEndAfter(b),a.purgeTableBookmark=d.createBookmark())}},detectRanges:function(f,b){var k=e(b,f.bookmark),g=k.clone(),h,m,l=k.getCommonAncestor();l.is(CKEDITOR.dtd.$tableContent)&&!l.is(c)&&(l=l.getAscendant("table",!0));m=l;l=new CKEDITOR.dom.elementPath(k.startContainer,m);m=new CKEDITOR.dom.elementPath(k.endContainer,m);l=l.contains("table");m=m.contains("table");if(l||m)l&&m&&d(l,m)?(f.tableSurroundingRange=g,g.setStartAt(l,CKEDITOR.POSITION_AFTER_END),
g.setEndAt(m,CKEDITOR.POSITION_BEFORE_START),g=k.clone(),g.setEndAt(l,CKEDITOR.POSITION_AFTER_END),h=k.clone(),h.setStartAt(m,CKEDITOR.POSITION_BEFORE_START),h=a(g).concat(a(h))):l?m||(f.tableSurroundingRange=g,g.setStartAt(l,CKEDITOR.POSITION_AFTER_END),k.setEndAt(l,CKEDITOR.POSITION_AFTER_END)):(f.tableSurroundingRange=g,g.setEndAt(m,CKEDITOR.POSITION_BEFORE_START),k.setStartAt(m,CKEDITOR.POSITION_AFTER_START)),f.tableContentsRanges=h?h:a(k)},deleteRanges:function(a){for(var d;d=a.tableContentsRanges.pop();)d.extractContents(),
p(d.startContainer)&&d.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var d=a.doc,c=a.range.clone(),d=d.createElement("p");d.insertBefore(a.purgeTableBookmark.startNode);c.moveToBookmark(a.purgeTableBookmark);c.deleteContents();a.range.moveToPosition(d,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,d){var e=d.startPath(),b;c(a,e.block,e.blockLimit)&&(b=f(a))&&(b=d.document.createElement(b),b.appendBogus(),d.insertNode(b),d.moveToPosition(b,CKEDITOR.POSITION_AFTER_START))}}}()}(),function(){function b(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function h(a,d){if(0===a.length||b(a[0].getEnclosedNode()))return!1;var c,f;if((c=!d&&
1===a.length)&&!(c=a[0].collapsed)){var e=a[0];c=e.startContainer.getAscendant({td:1,th:1},!0);var k=e.endContainer.getAscendant({td:1,th:1},!0);f=CKEDITOR.tools.trim;c&&c.equals(k)&&!c.findOne("td, th, tr, tbody, table")?(e=e.cloneContents(),c=e.getFirst()?f(e.getFirst().getText())!==f(c.getText()):!0):c=!1}if(c)return!1;for(f=0;f<a.length;f++)if(c=a[f]._getTableElement(),!c)return!1;return!0}function g(a){function d(a){a=a.find("td, th");var c=[],f;for(f=0;f<a.count();f++)c.push(a.getItem(f));return c}
var c=[],f,e;for(e=0;e<a.length;e++)f=a[e]._getTableElement(),f.is&&f.is({td:1,th:1})?c.push(f):c=c.concat(d(f));return c}function a(a){a=g(a);var d="",c=[],f,e;for(e=0;e<a.length;e++)f&&!f.equals(a[e].getAscendant("tr"))?(d+=c.join("\t")+"\n",f=a[e].getAscendant("tr"),c=[]):0===e&&(f=a[e].getAscendant("tr")),c.push(a[e].getText());return d+=c.join("\t")}function e(d){var c=this.root.editor,f=c.getSelection(1);this.reset();z=!0;f.root.once("selectionchange",function(a){a.cancel()},null,null,0);f.selectRanges([d[0]]);
f=this._.cache;f.ranges=new CKEDITOR.dom.rangeList(d);f.type=CKEDITOR.SELECTION_TEXT;f.selectedElement=d[0]._getTableElement();f.selectedText=a(d);f.nativeSel=null;this.isFake=1;this.rev=B++;c._.fakeSelection=this;z=!1;this.root.fire("selectionchange")}function m(){var a=this._.fakeSelection,d;if(a){d=this.getSelection(1);var c;if(!(c=!d)&&(c=!d.isHidden())){c=a;var f=d.getRanges(),e=c.getRanges(),k=f.length&&f[0]._getTableElement()&&f[0]._getTableElement().getAscendant("table",!0),g=e.length&&e[0]._getTableElement()&&
e[0]._getTableElement().getAscendant("table",!0),m=1===f.length&&f[0]._getTableElement()&&f[0]._getTableElement().is("table"),l=1===e.length&&e[0]._getTableElement()&&e[0]._getTableElement().is("table");if(b(c.getSelectedElement()))c=!1;else{var n=1===f.length&&f[0].collapsed,e=h(f,!!CKEDITOR.env.webkit)&&h(e);k=k&&g?k.equals(g)||g.contains(k):!1;k&&(n||e)?(m&&!l&&c.selectRanges(f),c=!0):c=!1}c=!c}c&&(a.reset(),a=0)}if(!a&&(a=d||this.getSelection(1),!a||a.getType()==CKEDITOR.SELECTION_NONE))return;
this.fire("selectionCheck",a);d=this.elementPath();d.compare(this._.selectionPreviousPath)||(c=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(d.blockLimit),!CKEDITOR.env.webkit&&!CKEDITOR.env.gecko||c||(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=d,this.fire("selectionChange",{selection:a,path:d}))}function k(){t=!0;v||(l.call(this),v=CKEDITOR.tools.setTimeout(l,200,this))}function l(){v=null;t&&(CKEDITOR.tools.setTimeout(m,0,this),t=
!1)}function c(a){return C(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function f(a){function d(c,f){return c&&c.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(f?"End":"Start")](c):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;var f=a.startContainer,e=a.getPreviousNode(c,null,f),b=a.getNextNode(c,null,f);return d(e)||d(b,1)||!(e||b||f.type==CKEDITOR.NODE_ELEMENT&&f.isBlockBoundary()&&f.getBogus())?!0:!1}function d(a){n(a,!1);var d=a.getDocument().createText(r);
a.setCustomData("cke-fillingChar",d);return d}function n(a,d){var c=a&&a.removeCustomData("cke-fillingChar");if(c){if(!1!==d){var f=a.getDocument().getSelection().getNative(),e=f&&"None"!=f.type&&f.getRangeAt(0),b=r.length;if(c.getLength()>b&&e&&e.intersectsNode(c.$)){var k=[{node:f.anchorNode,offset:f.anchorOffset},{node:f.focusNode,offset:f.focusOffset}];f.anchorNode==c.$&&f.anchorOffset>b&&(k[0].offset-=b);f.focusNode==c.$&&f.focusOffset>b&&(k[1].offset-=b)}}c.setText(q(c.getText(),1));k&&(c=a.getDocument().$,
f=c.getSelection(),c=c.createRange(),c.setStart(k[0].node,k[0].offset),c.collapse(!0),f.removeAllRanges(),f.addRange(c),f.extend(k[1].node,k[1].offset))}}function q(a,d){return d?a.replace(y,function(a,d){return d?" ":""}):a.replace(r,"")}function u(a,d){var c=d&&CKEDITOR.tools.htmlEncode(d)||"\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 f=a.getSelection(1),e=a.createRange(),b=f.root.on("selectionchange",function(a){a.cancel()},null,null,0);e.setStartAt(c,CKEDITOR.POSITION_AFTER_START);e.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);f.selectRanges([e]);b.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=c}function x(a){var d={37:1,39:1,8:1,46:1};return function(c){var f=c.data.getKeystroke();if(d[f]){var e=a.getSelection(),k=e.getRanges()[0];
e.isCollapsed()&&(k=k[38>f?"getPreviousEditableNode":"getNextEditableNode"]())&&k.type==CKEDITOR.NODE_ELEMENT&&"false"==k.getAttribute("contenteditable")&&(e=e.getStartElement(),!e.isBlockBoundary()||""!==(void 0===e.$.textContent?e.$.innerText:e.$.textContent)||b(e.getFirst())||8!==f&&46!==f||(e.remove(),a.fire("saveSnapshot")),a.getSelection().fake(k),c.data.preventDefault(),c.cancel())}}}function p(a){for(var d=0;d<a.length;d++){var c=a[d];c.getCommonAncestor().isReadOnly()&&a.splice(d,1);if(!c.collapsed){if(c.startContainer.isReadOnly())for(var f=
c.startContainer,e;f&&!((e=f.type==CKEDITOR.NODE_ELEMENT)&&f.is("body")||!f.isReadOnly());)e&&"false"==f.getAttribute("contentEditable")&&c.setStartAfter(f),f=f.getParent();f=c.startContainer;e=c.endContainer;var b=c.startOffset,k=c.endOffset,g=c.clone();f&&f.type==CKEDITOR.NODE_TEXT&&(b>=f.getLength()?g.setStartAfter(f):g.setStartBefore(f));e&&e.type==CKEDITOR.NODE_TEXT&&(k?g.setEndAfter(e):g.setEndBefore(e));f=new CKEDITOR.dom.walker(g);f.evaluator=function(f){if(f.type==CKEDITOR.NODE_ELEMENT&&
f.isReadOnly()){var e=c.clone();c.setEndBefore(f);c.collapsed&&a.splice(d--,1);f.getPosition(g.endContainer)&CKEDITOR.POSITION_CONTAINS||(e.setStartAfter(f),e.collapsed||a.splice(d+1,0,e));return!0}return!1};f.next()}}return a}var w="function"!=typeof window.getSelection,B=1,r=CKEDITOR.tools.repeat("​",7),y=new RegExp(r+"( )?","g"),z,v,t,C=CKEDITOR.dom.walker.invisible(1),D=function(){function a(d){return function(a){var c=a.editor.createRange();c.moveToClosestEditablePosition(a.selected,d)&&a.editor.getSelection().selectRanges([c]);
return!1}}function d(a){return function(d){var c=d.editor,f=c.createRange(),e;if(!c.readOnly)return(e=f.moveToClosestEditablePosition(d.selected,a))||(e=f.moveToClosestEditablePosition(d.selected,!a)),e&&c.getSelection().selectRanges([f]),c.fire("saveSnapshot"),d.selected.remove(),e||(f.moveToElementEditablePosition(c.editable()),c.getSelection().selectRanges([f])),c.fire("saveSnapshot"),!1}}var c=a(),f=a(1);return{37:c,38:c,39:f,40:f,8:d(),46:d(1)}}();CKEDITOR.on("instanceCreated",function(a){function d(){var a=
c.getSelection();a&&a.removeAllRanges()}var c=a.editor;c.on("contentDom",function(){function a(){u=new CKEDITOR.dom.selection(c.getSelection());u.lock()}function d(){g.removeListener("mouseup",d);q.removeListener("mouseup",d);var a=CKEDITOR.document.$.selection,c=a.createRange();"None"!=a.type&&c.parentElement()&&c.parentElement().ownerDocument==b.$&&c.select()}function f(a){var d,c;d=(d=this.document.getActive())?"input"===d.getName()||"textarea"===d.getName():!1;d||(d=this.getSelection(1),(c=e(d))&&
!c.equals(h)&&(d.selectElement(c),a.data.preventDefault()))}function e(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 b=c.document,g=CKEDITOR.document,h=c.editable(),l=b.getBody(),q=b.getDocumentElement(),t=h.isInline(),r,u;CKEDITOR.env.gecko&&h.attachListener(h,"focus",function(a){a.removeListener();0!==r&&(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(r&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){r=c._.previousActive&&c._.previousActive.equals(b.getActive());var a=null!=c._.previousScrollTop&&c._.previousScrollTop!=h.$.scrollTop;CKEDITOR.env.webkit&&r&&a&&(h.$.scrollTop=c._.previousScrollTop)}c.unlockSelection(r);r=0},null,null,-1);h.attachListener(h,
"mousedown",function(){r=0});if(CKEDITOR.env.ie||CKEDITOR.env.gecko||t)w?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=u&&(u.isFake||2>u.getRanges().length);CKEDITOR.env.gecko&&!t&&a||(c.lockSelection(u),r=1)},null,null,-1),h.attachListener(h,"mousedown",function(){r=0});if(CKEDITOR.env.ie&&!t){var p;h.attachListener(h,"mousedown",function(a){2==
a.data.$.button&&((a=c.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(p=c.window.getScrollPosition()))});h.attachListener(h,"mouseup",function(a){2==a.data.$.button&&p&&(c.document.$.documentElement.scrollLeft=p.x,c.document.$.documentElement.scrollTop=p.y);p=null});if("BackCompat"!=b.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var v,z;q.on("mousedown",function(a){function d(a){a=a.data.$;if(v){var c=l.$.createTextRange();try{c.moveToPoint(a.clientX,a.clientY)}catch(f){}v.setEndPoint(0>
z.compareEndPoints("StartToStart",c)?"EndToEnd":"StartToStart",c);v.select()}}function c(){q.removeListener("mousemove",d);g.removeListener("mouseup",c);q.removeListener("mouseup",c);v.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<q.$.clientHeight&&a.$.x<q.$.clientWidth){v=l.$.createTextRange();try{v.moveToPoint(a.$.clientX,a.$.clientY)}catch(f){}z=v.duplicate();q.on("mousemove",d);g.on("mouseup",c);q.on("mouseup",c)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)q.on("mousedown",function(a){a.data.getTarget().is("html")&&
(g.on("mouseup",d),q.on("mouseup",d))})}}h.attachListener(h,"selectionchange",m,c);h.attachListener(h,"keyup",k,c);h.attachListener(h,"touchstart",k,c);h.attachListener(h,"touchend",k,c);CKEDITOR.env.ie&&h.attachListener(h,"keydown",f,c);h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){c.forceNextSelectionCheck();c.selectionChange(1)});if(t&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var B;h.attachListener(h,"mousedown",function(){B=1});h.attachListener(b.getDocumentElement(),
"mouseup",function(){B&&k.call(c);B=0})}else h.attachListener(CKEDITOR.env.ie?h:b.getDocumentElement(),"mouseup",k,c);CKEDITOR.env.webkit&&h.attachListener(b,"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",x(c),null,null,-1)});c.on("setData",function(){c.unlockSelection();CKEDITOR.env.webkit&&d()});c.on("contentDomUnload",function(){c.unlockSelection()});if(CKEDITOR.env.ie9Compat)c.on("beforeDestroy",
d,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),d=c.editable().getLast(a);d&&d.hasAttribute("data-cke-hidden-sel")&&(d.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 d=c.getSelection();if(d.isFake){var f=
D[a.data.keyCode];if(f)return f({editor:c,selected:d.getSelectedElement(),selection:d,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var d=a.editor;d.on("selectionChange",function(){var a=d.editable(),c=a.getCustomData("cke-fillingChar");c&&(c.getCustomData("ready")?(n(a),a.editor.fire("selectionCheck")):c.setCustomData("ready",1))},null,null,-1);d.on("beforeSetMode",function(){n(d.editable())},null,null,-1);d.on("getSnapshot",function(a){a.data&&(a.data=q(a.data))},
d,null,20);d.on("toDataFormat",function(a){a.data.dataValue=q(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?m:k).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 d=this.getSelection();
return d&&d.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 d=this._.savedSelection;return d?(d.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 d=a;a=a.root}var c=a instanceof CKEDITOR.dom.element;this.rev=d?d.rev:B++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=
c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(d)return CKEDITOR.tools.extend(this._.cache,d._.cache),this.isFake=d.isFake,this.isLocked=d.isLocked,this;a=this.getNative();var f,e;if(a)if(a.getRangeAt)f=(e=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(e.commonAncestorContainer);else{try{e=a.createRange()}catch(b){}f=e&&CKEDITOR.dom.element.get(e.item&&e.item(0)||e.parentElement())}if(!f||f.type!=CKEDITOR.NODE_ELEMENT&&f.type!=CKEDITOR.NODE_TEXT||!this.root.equals(f)&&!this.root.contains(f))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 A={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:q,_createFillingCharSequenceNode:d,FILLING_CHAR_SEQUENCE:r});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==
this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=w?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:w?function(){var a=this._.cache;if(a.type)return a.type;var d=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),f=c.type;"Text"==f&&(d=CKEDITOR.SELECTION_TEXT);"Control"==f&&(d=CKEDITOR.SELECTION_ELEMENT);c.createRange().parentElement()&&(d=CKEDITOR.SELECTION_TEXT)}catch(e){}return a.type=d}:function(){var a=this._.cache;if(a.type)return a.type;var d=
CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)d=CKEDITOR.SELECTION_NONE;else if(1==c.rangeCount){var c=c.getRangeAt(0),f=c.startContainer;f==c.endContainer&&1==f.nodeType&&1==c.endOffset-c.startOffset&&A[f.childNodes[c.startOffset].nodeName.toLowerCase()]&&(d=CKEDITOR.SELECTION_ELEMENT)}return a.type=d},getRanges:function(){var a=w?function(){function a(d){return(new CKEDITOR.dom.node(d)).getIndex()}var d=function(d,c){d=d.duplicate();d.collapse(c);var f=d.parentElement();if(!f.hasChildNodes())return{container:f,
offset:0};for(var e=f.children,b,k,g=d.duplicate(),h=0,m=e.length-1,l=-1,n,q;h<=m;)if(l=Math.floor((h+m)/2),b=e[l],g.moveToElementText(b),n=g.compareEndPoints("StartToStart",d),0<n)m=l-1;else if(0>n)h=l+1;else return{container:f,offset:a(b)};if(-1==l||l==e.length-1&&0>n){g.moveToElementText(f);g.setEndPoint("StartToStart",d);g=g.text.replace(/(\r\n|\r)/g,"\n").length;e=f.childNodes;if(!g)return b=e[e.length-1],b.nodeType!=CKEDITOR.NODE_TEXT?{container:f,offset:e.length}:{container:b,offset:b.nodeValue.length};
for(f=e.length;0<g&&0<f;)k=e[--f],k.nodeType==CKEDITOR.NODE_TEXT&&(q=k,g-=k.nodeValue.length);return{container:q,offset:-g}}g.collapse(0<n?!0:!1);g.setEndPoint(0<n?"StartToStart":"EndToStart",d);g=g.text.replace(/(\r\n|\r)/g,"\n").length;if(!g)return{container:f,offset:a(b)+(0<n?0:1)};for(;0<g;)try{k=b[0<n?"previousSibling":"nextSibling"],k.nodeType==CKEDITOR.NODE_TEXT&&(g-=k.nodeValue.length,q=k),b=k}catch(t){return{container:f,offset:a(b)}}return{container:q,offset:0<n?-g:q.nodeValue.length+g}};
return function(){var a=this.getNative(),c=a&&a.createRange(),f=this.getType();if(!a)return[];if(f==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),f=d(c,!0),a.setStart(new CKEDITOR.dom.node(f.container),f.offset),f=d(c),a.setEnd(new CKEDITOR.dom.node(f.container),f.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse(),[a];if(f==CKEDITOR.SELECTION_ELEMENT){for(var f=[],e=0;e<c.length;e++){for(var b=
c.item(e),k=b.parentNode,g=0,a=new CKEDITOR.dom.range(this.root);g<k.childNodes.length&&k.childNodes[g]!=b;g++);a.setStart(new CKEDITOR.dom.node(k),g);a.setEnd(new CKEDITOR.dom.node(k),g+1);f.push(a)}return f}return[]}}():function(){var a=[],d,c=this.getNative();if(!c)return a;for(var f=0;f<c.rangeCount;f++){var e=c.getRangeAt(f);d=new CKEDITOR.dom.range(this.root);d.setStart(new CKEDITOR.dom.node(e.startContainer),e.startOffset);d.setEnd(new CKEDITOR.dom.node(e.endContainer),e.endOffset);a.push(d)}return a};
return function(d){var c=this._.cache,f=c.ranges;f||(c.ranges=f=new CKEDITOR.dom.rangeList(a.call(this)));return d?p(new CKEDITOR.dom.rangeList(f.slice())):f}}(),getStartElement:function(){var a=this._.cache;if(void 0!==a.startElement)return a.startElement;var d;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];if(c){if(c.collapsed)d=c.startContainer,d.type!=CKEDITOR.NODE_ELEMENT&&(d=d.getParent());else{for(c.optimize();d=
c.startContainer,c.startOffset==(d.getChildCount?d.getChildCount():d.getLength())&&!d.isBlockBoundary();)c.setStartAfter(d);d=c.startContainer;if(d.type!=CKEDITOR.NODE_ELEMENT)return d.getParent();if((d=d.getChild(c.startOffset))&&d.type==CKEDITOR.NODE_ELEMENT)for(c=d.getFirst();c&&c.type==CKEDITOR.NODE_ELEMENT;)d=c,c=c.getFirst();else d=c.startContainer}d=d.$}}return a.startElement=d?new CKEDITOR.dom.element(d):null},getSelectedElement:function(){var a=this._.cache;if(void 0!==a.selectedElement)return a.selectedElement;
var d=this,c=CKEDITOR.tools.tryThese(function(){return d.getNative().createRange().item(0)},function(){for(var a=d.getRanges()[0].clone(),c,f,e=2;e&&!((c=a.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&A[c.getName()]&&(f=c));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return f&&f.$});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 d=this.getNative(),d=w?"Control"==d.type?"":d.createRange().text:
d.toString();return a.selectedText=d},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 d=this.getSelectedElement(),c=this.getRanges(),f=this.isFake;this.isLocked=0;this.reset();a&&(a=d||c[0]&&c[0].getCommonAncestor())&&a.getAscendant("body",1)&&((a=this.root.editor)&&a.plugins.tableselection&&a.plugins.tableselection.isSupportedEnvironment(a)&&h(c)?e.call(this,
c):f?this.fake(d):d&&2>c.length?this.selectElement(d):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 d=a._.hiddenSelectionContainer;if(d){var c=a.checkDirty();a.fire("lockSnapshot");d.remove();a.fire("unlockSnapshot");!c&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=B++},selectElement:function(a){var d=new CKEDITOR.dom.range(this.root);
d.setStartBefore(a);d.setEndAfter(a);this.selectRanges([d])},selectRanges:function(a){var c=this.root.editor,b=c&&c._.hiddenSelectionContainer;this.reset();if(b)for(var b=this.root,k,g=0;g<a.length;++g)k=a[g],k.endContainer.equals(b)&&(k.endOffset=Math.min(k.endOffset,b.getChildCount()));if(a.length)if(this.isLocked){var m=CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();m&&!m.equals(this.root)&&m.focus()}else{var l;a:{var q,t;if(1==a.length&&!(t=a[0]).collapsed&&(l=t.getEnclosedNode())&&
l.type==CKEDITOR.NODE_ELEMENT&&(t=t.clone(),t.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(q=t.getEnclosedNode())&&q.type==CKEDITOR.NODE_ELEMENT&&(l=q),"false"==l.getAttribute("contenteditable")))break a;l=void 0}if(l)this.fake(l);else if(c&&c.plugins.tableselection&&c.plugins.tableselection.isSupportedEnvironment(c)&&h(a)&&!z&&!a[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored"))e.call(this,a);else{if(w){q=CKEDITOR.dom.walker.whitespaces(!0);l=/\ufeff|\u00a0/;t={table:1,tbody:1,
tr:1};1<a.length&&(c=a[a.length-1],a[0].setEnd(c.endContainer,c.endOffset));c=a[0];a=c.collapsed;var r,u,p;if((b=c.getEnclosedNode())&&b.type==CKEDITOR.NODE_ELEMENT&&b.getName()in A&&(!b.is("a")||!b.getText()))try{p=b.$.createControlRange();p.addElement(b.$);p.select();return}catch(v){}if(c.startContainer.type==CKEDITOR.NODE_ELEMENT&&c.startContainer.getName()in t||c.endContainer.type==CKEDITOR.NODE_ELEMENT&&c.endContainer.getName()in t)c.shrink(CKEDITOR.NODE_ELEMENT,!0),a=c.collapsed;p=c.createBookmark();
t=p.startNode;a||(m=p.endNode);p=c.document.$.body.createTextRange();p.moveToElementText(t.$);p.moveStart("character",1);m?(l=c.document.$.body.createTextRange(),l.moveToElementText(m.$),p.setEndPoint("EndToEnd",l),p.moveEnd("character",-1)):(r=t.getNext(q),u=t.hasAscendant("pre"),r=!(r&&r.getText&&r.getText().match(l))&&(u||!t.hasPrevious()||t.getPrevious().is&&t.getPrevious().is("br")),u=c.document.createElement("span"),u.setHtml("\x26#65279;"),u.insertBefore(t),r&&c.document.createText("﻿").insertBefore(t));
c.setStartBefore(t);t.remove();a?(r?(p.moveStart("character",-1),p.select(),c.document.$.selection.clear()):p.select(),c.moveToPosition(u,CKEDITOR.POSITION_BEFORE_START),u.remove()):(c.setEndBefore(m),m.remove(),p.select())}else{m=this.getNative();if(!m)return;this.removeAllRanges();for(p=0;p<a.length;p++){if(p<a.length-1&&(r=a[p],u=a[p+1],l=r.clone(),l.setStart(r.endContainer,r.endOffset),l.setEnd(u.startContainer,u.startOffset),!l.collapsed&&(l.shrink(CKEDITOR.NODE_ELEMENT,!0),c=l.getCommonAncestor(),
l=l.getEnclosedNode(),c.isReadOnly()||l&&l.isReadOnly()))){u.setStart(r.startContainer,r.startOffset);a.splice(p--,1);continue}c=a[p];u=this.document.$.createRange();c.collapsed&&CKEDITOR.env.webkit&&f(c)&&(l=d(this.root),c.insertNode(l),(r=l.getNext())&&!l.getPrevious()&&r.type==CKEDITOR.NODE_ELEMENT&&"br"==r.getName()?(n(this.root),c.moveToPosition(r,CKEDITOR.POSITION_BEFORE_START)):c.moveToPosition(l,CKEDITOR.POSITION_AFTER_END));u.setStart(c.startContainer.$,c.startOffset);try{u.setEnd(c.endContainer.$,
c.endOffset)}catch(B){if(0<=B.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))c.collapse(1),u.setEnd(c.endContainer.$,c.endOffset);else throw B;}m.addRange(u)}}this.reset();this.root.fire("selectionchange")}}},fake:function(a,d){var c=this.root.editor;void 0===d&&a.hasAttribute("aria-label")&&(d=a.getAttribute("aria-label"));this.reset();u(c,d);var f=this._.cache,e=new CKEDITOR.dom.range(this.root);e.setStartBefore(a);e.setEndAfter(a);f.ranges=new CKEDITOR.dom.rangeList(e);f.selectedElement=f.startElement=
a;f.type=CKEDITOR.SELECTION_ELEMENT;f.selectedText=f.nativeSel=null;this.isFake=1;this.rev=B++;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 d=[],c,f=0;f<a.length;f++){var e=new CKEDITOR.dom.range(this.root);e.moveToBookmark(a[f]);d.push(e)}a.isFake&&(c=h(d)?d[0]._getTableElement():d[0].getEnclosedNode(),c&&c.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake&&!h(d)?this.fake(c):this.selectRanges(d);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[w?"empty":"removeAllRanges"]()}catch(d){}this.reset()}}}}(),"use strict",CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function b(a,d){for(var c,f;(a=a.getParent())&&
!a.equals(d);)if(a.getAttribute("data-nostyle"))c=a;else if(!f){var e=a.getAttribute("contentEditable");"false"==e?c=a:"true"==e&&(f=1)}return c}function h(a,d,c,f){return(a.getPosition(d)|f)==f&&(!c.childRule||c.childRule(a))}function g(a){var d=a.document;if(a.collapsed)d=B(this,d),a.insertNode(d),a.moveToPosition(d,CKEDITOR.POSITION_BEFORE_END);else{var c=this.element,f=this._.definition,k,m=f.ignoreReadonly,l=m||f.includeReadonly;null==l&&(l=a.root.getCustomData("cke_includeReadonly"));var n=
CKEDITOR.dtd[c];n||(k=!0,n=CKEDITOR.dtd.span);a.enlarge(CKEDITOR.ENLARGE_INLINE,1);a.trim();var q=a.createBookmark(),t=q.startNode,r=q.endNode,u=t,p;if(!m){var w=a.getCommonAncestor(),m=b(t,w),w=b(r,w);m&&(u=m.getNextSourceNode(!0));w&&(r=w)}for(u.getPosition(r)==CKEDITOR.POSITION_FOLLOWING&&(u=0);u;){m=!1;if(u.equals(r))u=null,m=!0;else{var v=u.type==CKEDITOR.NODE_ELEMENT?u.getName():null,w=v&&"false"==u.getAttribute("contentEditable"),z=v&&-1!==CKEDITOR.tools.array.indexOf(CKEDITOR.style.unstylableElements,
v),z=v&&(u.getAttribute("data-nostyle")||z);if(v&&u.data("cke-bookmark")||u.type===CKEDITOR.NODE_COMMENT){u=u.getNextSourceNode(!0);continue}if(w&&l&&CKEDITOR.dtd.$block[v])for(var y=u,C=e(y),A=void 0,D=C.length,K=0,y=D&&new CKEDITOR.dom.range(y.getDocument());K<D;++K){var A=C[K],ea=CKEDITOR.filter.instances[A.data("cke-filter")];if(ea?ea.check(this):1)y.selectNodeContents(A),g.call(this,y)}C=v?!n[v]||z?0:w&&!l?0:h(u,r,f,M):1;if(C)if(A=u.getParent(),C=f,D=c,K=k,!A||!(A.getDtd()||CKEDITOR.dtd.span)[D]&&
!K||C.parentRule&&!C.parentRule(A))m=!0;else{if(p||v&&CKEDITOR.dtd.$removeEmpty[v]&&(u.getPosition(r)|M)!=M||(p=a.clone(),p.setStartBefore(u)),v=u.type,v==CKEDITOR.NODE_TEXT||w||v==CKEDITOR.NODE_ELEMENT&&!u.getChildCount()){for(var v=u,R;(m=!v.getNext(J))&&(R=v.getParent(),n[R.getName()])&&h(R,t,f,I);)v=R;p.setEndAfter(v)}}else m=!0;u=u.getNextSourceNode(z||w)}if(m&&p&&!p.collapsed){for(var m=B(this,d),w=m.hasAttributes(),z=p.getCommonAncestor(),v={},C={},A={},D={},ba,W,F;m&&z;){if(z.getName()==c){for(ba in f.attributes)!D[ba]&&
(F=z.getAttribute(W))&&(m.getAttribute(ba)==F?C[ba]=1:D[ba]=1);for(W in f.styles)!A[W]&&(F=z.getStyle(W))&&(m.getStyle(W)==F?v[W]=1:A[W]=1)}z=z.getParent()}for(ba in C)m.removeAttribute(ba);for(W in v)m.removeStyle(W);w&&!m.hasAttributes()&&(m=null);m?(p.extractContents().appendTo(m),p.insertNode(m),x.call(this,m),m.mergeSiblings(),CKEDITOR.env.ie||m.$.normalize()):(m=new CKEDITOR.dom.element("span"),p.extractContents().appendTo(m),p.insertNode(m),x.call(this,m),m.remove(!0));p=null}}a.moveToBookmark(q);
a.shrink(CKEDITOR.SHRINK_TEXT);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function a(a){function d(){for(var a=new CKEDITOR.dom.elementPath(f.getParent()),c=new CKEDITOR.dom.elementPath(l.getParent()),e=null,b=null,k=0;k<a.elements.length;k++){var g=a.elements[k];if(g==a.block||g==a.blockLimit)break;n.checkElementRemovable(g,!0)&&(e=g)}for(k=0;k<c.elements.length;k++){g=c.elements[k];if(g==c.block||g==c.blockLimit)break;n.checkElementRemovable(g,!0)&&(b=g)}b&&l.breakParent(b);e&&f.breakParent(e)}a.enlarge(CKEDITOR.ENLARGE_INLINE,
1);var c=a.createBookmark(),f=c.startNode,e=this._.definition.alwaysRemoveElement;if(a.collapsed){for(var b=new CKEDITOR.dom.elementPath(f.getParent(),a.root),k,g=0,h;g<b.elements.length&&(h=b.elements[g])&&h!=b.block&&h!=b.blockLimit;g++)if(this.checkElementRemovable(h)){var m;!e&&a.collapsed&&(a.checkBoundaryOfElement(h,CKEDITOR.END)||(m=a.checkBoundaryOfElement(h,CKEDITOR.START)))?(k=h,k.match=m?"start":"end"):(h.mergeSiblings(),h.is(this.element)?u.call(this,h):p(h,z(this)[h.getName()]))}if(k){e=
f;for(g=0;;g++){h=b.elements[g];if(h.equals(k))break;else if(h.match)continue;else h=h.clone();h.append(e);e=h}e["start"==k.match?"insertBefore":"insertAfter"](k)}}else{var l=c.endNode,n=this;d();for(b=f;!b.equals(l);)k=b.getNextSourceNode(),b.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(b)&&(b.getName()==this.element?u.call(this,b):p(b,z(this)[b.getName()]),k.type==CKEDITOR.NODE_ELEMENT&&k.contains(f)&&(d(),k=f.getNext())),b=k}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function e(a){var d=
[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return d.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return d}function m(a){var d=a.getEnclosedNode()||a.getCommonAncestor(!1,!0);(a=(new CKEDITOR.dom.elementPath(d,a.root)).contains(this.element,1))&&!a.isReadOnly()&&r(a,this)}function k(a){var d=a.getCommonAncestor(!0,!0);if(a=(new CKEDITOR.dom.elementPath(d,a.root)).contains(this.element,1)){var d=this._.definition,c=d.attributes;if(c)for(var f in c)a.removeAttribute(f,c[f]);if(d.styles)for(var e in d.styles)d.styles.hasOwnProperty(e)&&
a.removeStyle(e)}}function l(a){var d=a.createBookmark(!0),c=a.createIterator();c.enforceRealBlocks=!0;this._.enterMode&&(c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var e,b=a.document,k;e=c.getNextParagraph();)!e.isReadOnly()&&(c.activeFilter?c.activeFilter.check(this):1)&&(k=B(this,b,e),f(e,k));a.moveToBookmark(d)}function c(a){var d=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=!0;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var e,b;e=c.getNextParagraph();)this.checkElementRemovable(e)&&
(e.is("pre")?((b=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&e.copyAttributes(b),f(e,b)):u.call(this,e));a.moveToBookmark(d)}function f(a,c){var f=!c;f&&(c=a.getDocument().createElement("div"),a.copyAttributes(c));var e=c&&c.is("pre"),b=a.is("pre"),k=!e&&b;if(e&&!b){b=c;(k=a.getBogus())&&k.remove();k=a.getHtml();k=n(k,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");k=k.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");k=k.replace(/([ \t\n\r]+|&nbsp;)/g,
" ");k=k.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var g=a.getDocument().createElement("div");g.append(b);b.$.outerHTML="\x3cpre\x3e"+k+"\x3c/pre\x3e";b.copyAttributes(g.getFirst());b=g.getFirst().remove()}else b.setHtml(k);c=b}else k?c=q(f?[a.getHtml()]:d(a),c):a.moveChildren(c);c.replace(a);if(e){var f=c,h;(h=f.getPrevious(G))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("pre")&&(e=n(h.getHtml(),/\n$/,"")+"\n\n"+n(f.getHtml(),/^\n/,""),CKEDITOR.env.ie?f.$.outerHTML="\x3cpre\x3e"+e+"\x3c/pre\x3e":
f.setHtml(e),h.remove())}else f&&w(c)}function d(a){var d=[];n(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,d,c){return d+"\x3c/pre\x3e"+c+"\x3cpre\x3e"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,c){d.push(c)});return d}function n(a,d,c){var f="",e="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,d,c){d&&(f=d);c&&(e=c);return""});return f+a.replace(d,c)+e}function q(a,d){var c;
1<a.length&&(c=new CKEDITOR.dom.documentFragment(d.getDocument()));for(var f=0;f<a.length;f++){var e=a[f],e=e.replace(/(\r\n|\r)/g,"\n"),e=n(e,/^[ \t]*\n/,""),e=n(e,/\n$/,""),e=n(e,/^[ \t]+|[ \t]+$/g,function(a,d){return 1==a.length?"\x26nbsp;":d?" "+CKEDITOR.tools.repeat("\x26nbsp;",a.length-1):CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "}),e=e.replace(/\n/g,"\x3cbr\x3e"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "});if(c){var b=d.clone();b.setHtml(e);
c.append(b)}else d.setHtml(e)}return c||d}function u(a,d){var c=this._.definition,f=c.attributes,c=c.styles,e=z(this)[a.getName()],b=CKEDITOR.tools.isEmpty(f)&&CKEDITOR.tools.isEmpty(c),k;for(k in f)if("class"!=k&&!this._.definition.fullMatch||a.getAttribute(k)==v(k,f[k]))d&&"data-"==k.slice(0,5)||(b=a.hasAttribute(k),a.removeAttribute(k));for(var g in c)this._.definition.fullMatch&&a.getStyle(g)!=v(g,c[g],!0)||(b=b||!!a.getStyle(g),a.removeStyle(g));p(a,e,D[a.getName()]);b&&(this._.definition.alwaysRemoveElement?
w(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?w(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function x(a){for(var d=z(this),c=a.getElementsByTag(this.element),f,e=c.count();0<=--e;)f=c.getItem(e),f.isReadOnly()||u.call(this,f,!0);for(var b in d)if(b!=this.element)for(c=a.getElementsByTag(b),e=c.count()-1;0<=e;e--)f=c.getItem(e),f.isReadOnly()||p(f,d[b])}function p(a,d,c){if(d=d&&d.attributes)for(var f=0;f<d.length;f++){var e=d[f][0],
b;if(b=a.getAttribute(e)){var k=d[f][1];(null===k||k.test&&k.test(b)||"string"==typeof k&&b==k)&&a.removeAttribute(e)}}c||w(a)}function w(a,d){if(!a.hasAttributes()||d)if(CKEDITOR.dtd.$block[a.getName()]){var c=a.getPrevious(G),f=a.getNext(G);!c||c.type!=CKEDITOR.NODE_TEXT&&c.isBlockBoundary({br:1})||a.append("br",1);!f||f.type!=CKEDITOR.NODE_TEXT&&f.isBlockBoundary({br:1})||a.append("br");a.remove(!0)}else c=a.getFirst(),f=a.getLast(),a.remove(!0),c&&(c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings(),
f&&!c.equals(f)&&f.type==CKEDITOR.NODE_ELEMENT&&f.mergeSiblings())}function B(a,d,c){var f;f=a.element;"*"==f&&(f="span");f=new CKEDITOR.dom.element(f,d);c&&c.copyAttributes(f);f=r(f,a);d.getCustomData("doc_processing_style")&&f.hasAttribute("id")?f.removeAttribute("id"):d.setCustomData("doc_processing_style",1);return f}function r(a,d){var c=d._.definition,f=c.attributes,c=CKEDITOR.style.getStyleText(c);if(f)for(var e in f)a.setAttribute(e,f[e]);c&&a.setAttribute("style",c);a.getDocument().removeCustomData("doc_processing_style");
return a}function y(a,d){for(var c in a)a[c]=a[c].replace(F,function(a,c){return d[c]})}function z(a){if(a._.overrides)return a._.overrides;var d=a._.overrides={},c=a._.definition.overrides;if(c){CKEDITOR.tools.isArray(c)||(c=[c]);for(var f=0;f<c.length;f++){var e=c[f],b,k;"string"==typeof e?b=e.toLowerCase():(b=e.element?e.element.toLowerCase():a.element,k=e.attributes);e=d[b]||(d[b]={});if(k){var e=e.attributes=e.attributes||[],g;for(g in k)e.push([g.toLowerCase(),k[g]])}}}return d}function v(a,
d,c){var f=new CKEDITOR.dom.element("span");f[c?"setStyle":"setAttribute"](a,d);return f[c?"getStyle":"getAttribute"](a)}function t(a,d){function c(a,d){return"font-family"==d.toLowerCase()?a.replace(/["']/g,""):a}"string"==typeof a&&(a=CKEDITOR.tools.parseCssText(a));"string"==typeof d&&(d=CKEDITOR.tools.parseCssText(d,!0));for(var f in a)if(!(f in d)||c(d[f],f)!=c(a[f],f)&&"inherit"!=a[f]&&"inherit"!=d[f])return!1;return!0}function C(a,d,c){var f=a.getRanges();d=d?this.removeFromRange:this.applyToRange;
for(var e,b=f.createIterator();e=b.getNextRange();)d.call(this,e,c);a.selectRanges(f)}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},A={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,J=CKEDITOR.dom.walker.bookmark(0,
1),G=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,d){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);d&&(a=CKEDITOR.tools.clone(a),y(a.attributes,d),y(a.styles,d));c=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(D[c]?CKEDITOR.STYLE_BLOCK:A[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 C.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var d=this._.enterMode;d||(this._.enterMode=a.activeEnterMode);C.call(this,a.getSelection(),0,a);this._.enterMode=d}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return C.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),
a)){var d=this._.enterMode;d||(this._.enterMode=a.activeEnterMode);C.call(this,a.getSelection(),1,a);this._.enterMode=d}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?g:this.type==CKEDITOR.STYLE_BLOCK?l:this.type==CKEDITOR.STYLE_OBJECT?m:null;return this.applyToRange(a)},removeFromRange:function(d){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?a:this.type==CKEDITOR.STYLE_BLOCK?c:this.type==CKEDITOR.STYLE_OBJECT?k:null;return this.removeFromRange(d)},applyToObject:function(a){r(a,
this)},checkActive:function(a,d){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,!0,d);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var c=a.elements,f=0,e;f<c.length;f++)if(e=c[f],this.type!=CKEDITOR.STYLE_INLINE||e!=a.block&&e!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var b=e.getName();if(!("string"==typeof this.element?b==this.element:b in this.element))continue}if(this.checkElementRemovable(e,!0,d))return!0}}return!1},checkApplicable:function(a,
d,c){d&&d instanceof CKEDITOR.filter&&(c=d);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,d){var c=this._.definition;if(!a||!c.ignoreReadonly&&a.isReadOnly())return!1;var f=a.getName();if("string"==typeof this.element?f==this.element:f in this.element){if(!d&&!a.hasAttributes())return!0;if(f=c._AC)c=f;else{var f={},e=0,b=c.attributes;
if(b)for(var k in b)e++,f[k]=b[k];if(k=CKEDITOR.style.getStyleText(c))f.style||e++,f.style=k;f._length=e;c=c._AC=f}if(c._length){for(var g in c)if("_length"!=g)if(f=a.getAttribute(g)||"","style"==g?t(c[g],f):c[g]==f){if(!d)return!0}else if(d)return!1;if(d)return!0}else return!0}return!1},checkElementRemovable:function(a,d,c){if(this.checkElementMatch(a,d,c))return!0;if(d=z(this)[a.getName()]){var f;if(!(d=d.attributes))return!0;for(c=0;c<d.length;c++)if(f=d[c][0],f=a.getAttribute(f)){var e=d[c][1];
if(null===e)return!0;if("string"==typeof e){if(f==e)return!0}else if(e.test(f))return!0}}return!1},buildPreview:function(a){var d=this._.definition,c=[],f=d.element;"bdo"==f&&(f="span");var c=["\x3c",f],e=d.attributes;if(e)for(var b in e)c.push(" ",b,'\x3d"',e[b],'"');(e=CKEDITOR.style.getStyleText(d))&&c.push(' style\x3d"',e,'"');c.push("\x3e",a||d.name,"\x3c/",f,"\x3e");return c.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var d=a._ST;if(d)return d;
var d=a.styles,c=a.attributes&&a.attributes.style||"",f="";c.length&&(c=c.replace(H,";"));for(var e in d){var b=d[e],k=(e+":"+b).replace(H,";");"inherit"==b?f+=k:c+=k}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,!0));return a._ST=c+f};CKEDITOR.style.customHandlers={};CKEDITOR.style.unstylableElements=[];CKEDITOR.style.addCustomHandler=function(a){var d=function(a){this._={definition:a};this.setup&&this.setup(a)};d.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),
{assignedTo:CKEDITOR.STYLE_OBJECT},a,!0);return this.customHandlers[a.type]=d};var M=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,I=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(b,h){this.requiredContent=this.allowedContent=this.style=b;CKEDITOR.tools.extend(this,h,!0)},CKEDITOR.styleCommand.prototype.exec=function(b){b.focus();this.state==CKEDITOR.TRISTATE_OFF?b.applyStyle(this.style):
this.state==CKEDITOR.TRISTATE_ON&&b.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(b,h,g){CKEDITOR.stylesSet.addExternal(b,h,"");CKEDITOR.stylesSet.load(b,g)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(b,h){var g=this._.styleStateChangeCallbacks;g||(g=this._.styleStateChangeCallbacks=[],this.on("selectionChange",
function(a){for(var e=0;e<g.length;e++){var b=g[e],k=b.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;b.fn.call(this,k)}}));g.push({style:b,fn:h})},applyStyle:function(b){b.apply(this)},removeStyle:function(b){b.remove(this)},getStylesSet:function(b){if(this._.stylesDefinitions)b(this._.stylesDefinitions);else{var h=this,g=h.config.stylesCombo_stylesSet||h.config.stylesSet;if(!1===g)b(null);else if(g instanceof Array)h._.stylesDefinitions=g,b(g);else{g||(g="default");
var g=g.split(":"),a=g[0];CKEDITOR.stylesSet.addExternal(a,g[1]?g.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(a,function(e){h._.stylesDefinitions=e[a];b(h._.stylesDefinitions)})}}}}),function(){if(window.Promise)CKEDITOR.tools.promise=Promise;else{var b=CKEDITOR.getUrl("vendor/promise.js");if("function"===typeof window.define&&window.define.amd&&"function"===typeof window.require)return window.require([b],function(b){CKEDITOR.tools.promise=b});CKEDITOR.scriptLoader.load(b,
function(h){if(!h)return CKEDITOR.error("no-vendor-lib",{path:b});if("undefined"!==typeof window.ES6Promise)return CKEDITOR.tools.promise=ES6Promise})}}(),function(){function b(a,e,b){a.once("selectionCheck",function(a){if(!h){var l=a.data.getRanges()[0];b.equals(l)?a.cancel():e.equals(l)&&(g=!0)}},null,null,-1)}var h=!0,g=!1;CKEDITOR.dom.selection.setupEditorOptimization=function(a){a.on("selectionCheck",function(a){a.data&&!g&&a.data.optimizeInElementEnds();g=!1});a.on("contentDom",function(){var e=
a.editable();e&&(e.attachListener(e,"keydown",function(a){this._.shiftPressed=a.data.$.shiftKey},this),e.attachListener(e,"keyup",function(a){this._.shiftPressed=a.data.$.shiftKey},this))})};CKEDITOR.dom.selection.prototype.optimizeInElementEnds=function(){var a=this.getRanges()[0],e=this.root.editor,g;if(this.root.editor._.shiftPressed||this.isFake||a.isCollapsed||a.startContainer.equals(a.endContainer)||(a.endContainer.is?a.endContainer.is("li"):a.endContainer.getParent().is&&a.endContainer.getParent().is("li")))g=
!1;else if(0===a.endOffset)g=!0;else{g=a.startContainer.type===CKEDITOR.NODE_TEXT;var k=a.endContainer.type===CKEDITOR.NODE_TEXT,l=g?a.startContainer.getLength():a.startContainer.getChildCount();g=a.startOffset===l||g^k}g&&(g=a.clone(),a.shrink(CKEDITOR.SHRINK_TEXT,!1,{skipBogus:!CKEDITOR.env.webkit}),h=!1,b(e,a,g),a.select(),h=!0)}}(),function(){function b(a,e){if(g(a))a=Math.round(e*(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,e){g(a)?a=e*(parseFloat(a)/100):"string"===typeof a&&a.match(/^\d?\.\d+/gm)&&(a=parseFloat(a));return a}function g(a){return"string"===typeof a&&a.match(/^((\d*\.\d+)|(\d+))%{1}$/gm)}function a(a,e,b){return!isNaN(a)&&a>=e&&a<=b}function e(a){a=a.toString(16);return 1==a.length?"0"+a:a}CKEDITOR.tools.color=CKEDITOR.tools.createClass({$:function(a,e){this._.initialColorCode=a;this._.defaultValue=e;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,e,
b,c){return CKEDITOR.tools.array.map([a,e,b],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,g,c){a="#"+e(a)+e(b)+e(g);void 0!==c&&(a+=e(c));return a.toUpperCase()},formatRgbString:function(a,e,b,c,f){e=[e,b,c];void 0!==f&&e.push(f);return a+"("+e.join(",")+")"},formatHslString:function(a,e,b,c,f){return a+"("+e+","+b+"%,"+c+"%"+(void 0!==f?","+f:"")+")"},parseInput:function(a){if("string"!==
typeof a)this._.isValidColor=!1;else{a=CKEDITOR.tools.trim(a);var e=this._.matchStringToNamedColor(a);e&&(a=e);var e=this._.extractColorChannelsFromHex(a),b=this._.extractColorChannelsFromRgba(a);a=this._.extractColorChannelsFromHsla(a);(a=e||b||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 e=1;a[7]&&a[8]&&(e=parseInt(a[7]+a[8],16),e/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,e=Number(e.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:e}},extractColorChannelsFromRgba:function(a){var e=this._.extractColorChannelsByPattern(a,CKEDITOR.tools.color.rgbRegExp);if(!e||3>e.length||4<e.length)return null;var g=4===e.length;a=b(e[0],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE);var c=b(e[1],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),f=b(e[2],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),d=1;g&&(d=h(e[3],CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE));e=
{type:CKEDITOR.tools.color.TYPE_RGB,red:a,green:c,blue:f,alpha:d};return this._.areColorChannelsValid(a,c,f,d)?e:null},extractColorChannelsFromHsla:function(a){var e=this._.extractColorChannelsByPattern(a,CKEDITOR.tools.color.hslRegExp);if(!e||3>e.length||4<e.length)return null;var g=4===e.length,c=b(e[0],CKEDITOR.tools.color.MAX_HUE_CHANNEL_VALUE),f=h(e[1],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),d=h(e[2],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),n=1;a=this._.hslToRgb(c,
f,d);g&&(n=h(e[3],CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE));a.push(n);e={type:CKEDITOR.tools.color.TYPE_HSL,red:a[0],green:a[1],blue:a[2],alpha:a[3],hue:c,saturation:Math.round(100*f),lightness:Math.round(100*d)};return this._.areColorChannelsValid(a[0],a[1],a[2],a[3])?e: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,e){var b=
a.match(e);if(!b)return null;var c=-1===b[1].indexOf(",")?/\s/:",",c=b[1].split(c),c=CKEDITOR.tools.array.reduce(c,function(a,d){var c=CKEDITOR.tools.trim(d);return 0===c.length?a:a.concat([c])},[]);b[2]&&(b=CKEDITOR.tools.trim(b[2].replace(/[\/,]/,"")),c.push(b));return c},areColorChannelsValid:function(e,b,g,c){return a(e,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&a(b,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&a(g,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&a(c,0,CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE)},
hslToRgb:function(a,e,b){var c=function(c){var d=(c+a/30)%12;c=e*Math.min(b,1-b);d=Math.min(d-3,9-d,1);d=Math.max(-1,d);return Math.round((b-c*d)*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)};return[c(0),c(8),c(4)]},rgbToHsl:function(a,e,b){a/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE;e/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE;var c=b/CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,f=Math.max(a,e,c),d=Math.min(a,e,c);b=f-d;var g=0;switch(f){case a:g=(e-c)/b%6;break;case e:g=(c-a)/b+2;break;case c:g=
(a-e)/b+4}a=0===b?0:60*g;e=(f+d)/2;f=0;1!==e&&0!==e&&(f=b/(1-Math.abs(2*e-1)));a=Math.round(a);f=Math.round(100*f);e=Math.round(100*e);return[a,f,e]}},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(b,h){"string"==typeof b&&(b=(h?h.$:document).createComment(b));CKEDITOR.dom.domObject.call(this,b)},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 b={},h={},g;for(g in CKEDITOR.dtd.$blockLimit)g in
CKEDITOR.dtd.$list||(b[g]=1);for(g in CKEDITOR.dtd.$block)g in CKEDITOR.dtd.$blockLimit||g in CKEDITOR.dtd.$empty||(h[g]=1);CKEDITOR.dom.elementPath=function(a,e){var g=null,k=null,l=[],c=a,f;e=e||a.getDocument().getBody();c||(c=e);do if(c.type==CKEDITOR.NODE_ELEMENT){l.push(c);if(!this.lastElement&&(this.lastElement=c,c.is(CKEDITOR.dtd.$object)||"false"==c.getAttribute("contenteditable")))continue;if(c.equals(e))break;if(!k&&(f=c.getName(),"true"==c.getAttribute("contenteditable")?k=c:!g&&h[f]&&
(g=c),b[f])){if(f=!g&&"div"==f){a:{f=c.getChildren();for(var d=0,n=f.count();d<n;d++){var q=f.getItem(d);if(q.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[q.getName()]){f=!0;break a}}f=!1}f=!f}f?g=c:k=c}}while(c=c.getParent());k||(k=e);this.block=g;this.blockLimit=k;this.root=e;this.elements=l}}(),CKEDITOR.dom.elementPath.prototype={compare:function(b){var h=this.elements;b=b&&b.elements;if(!b||h.length!=b.length)return!1;for(var g=0;g<h.length;g++)if(!h[g].equals(b[g]))return!1;return!0},contains:function(b,
h,g){var a=0,e;"string"==typeof b&&(e=function(a){return a.getName()==b});b instanceof CKEDITOR.dom.element?e=function(a){return a.equals(b)}:CKEDITOR.tools.isArray(b)?e=function(a){return-1<CKEDITOR.tools.indexOf(b,a.getName())}:"function"==typeof b?e=b:"object"==typeof b&&(e=function(a){return a.getName()in b});var m=this.elements,k=m.length;h&&(g?a+=1:--k);g&&(m=Array.prototype.slice.call(m,0),m.reverse());for(;a<k;a++)if(e(m[a]))return m[a];return null},isContextFor:function(b){var h;return b in
CKEDITOR.dtd.$block?(h=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!h.getDtd()[b]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(b,h){"string"==typeof b&&(b=(h?h.$:document).createTextNode(b));this.$=b},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(b){this.$.nodeValue=b},isEmpty:function(b){var h=this.getText();b&&(h=CKEDITOR.tools.trim(h));return!h||h===CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE},split:function(b){var h=this.$.parentNode,g=h.childNodes.length,a=this.getLength(),e=this.getDocument(),m=new CKEDITOR.dom.text(this.$.splitText(b),e);h.childNodes.length==g&&(b>=a?(m=e.createText(""),m.insertAfter(this)):(b=e.createText(""),b.insertAfter(m),b.remove()));return m},substring:function(b,
h){return"number"!=typeof h?this.$.nodeValue.substr(b):this.$.nodeValue.substring(b,h)}}),function(){function b(b,a,e){var h=b.serializable,k=a[e?"endContainer":"startContainer"],l=e?"endOffset":"startOffset",c=h?a.document.getById(b.startNode):b.startNode;b=h?a.document.getById(b.endNode):b.endNode;k.equals(c.getPrevious())?(a.startOffset=a.startOffset-k.getLength()-b.getPrevious().getLength(),k=b.getNext()):k.equals(b.getPrevious())&&(a.startOffset-=k.getLength(),k=b.getNext());k.equals(c.getParent())&&
a[l]++;k.equals(b.getParent())&&a[l]++;a[e?"endContainer":"startContainer"]=k;return a}CKEDITOR.dom.rangeList=function(b){if(b instanceof CKEDITOR.dom.rangeList)return b;b?b instanceof CKEDITOR.dom.range&&(b=[b]):b=[];return CKEDITOR.tools.extend(b,h)};var h={createIterator:function(){var b=this,a=CKEDITOR.dom.walker.bookmark(),e=[],h;return{getNextRange:function(k){h=void 0===h?0:h+1;var l=b[h];if(l&&1<b.length){if(!h)for(var c=b.length-1;0<=c;c--)e.unshift(b[c].createBookmark(!0));if(k)for(var f=
0;b[h+f+1];){var d=l.document;k=0;c=d.getById(e[f].endNode);for(d=d.getById(e[f+1].startNode);;){c=c.getNextSourceNode(!1);if(d.equals(c))k=1;else if(a(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary())continue;break}if(!k)break;f++}for(l.moveToBookmark(e.shift());f--;)c=b[++h],c.moveToBookmark(e.shift()),l.setEnd(c.endContainer,c.endOffset)}return l}}},createBookmarks:function(g){for(var a=[],e,h=0;h<this.length;h++){a.push(e=this[h].createBookmark(g,!0));for(var k=h+1;k<this.length;k++)this[k]=
b(e,this[k]),this[k]=b(e,this[k],!0)}return a},createBookmarks2:function(b){for(var a=[],e=0;e<this.length;e++)a.push(this[e].createBookmark2(b));return a},moveToBookmarks:function(b){for(var a=0;a<this.length;a++)this[a].moveToBookmark(b[a])}}}(),function(){function b(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function h(a){var d=CKEDITOR.skin["ua_"+a],c=CKEDITOR.env;if(d)for(var d=d.split(",").sort(function(a,d){return a>d?-1:1}),e=0,
k;e<d.length;e++)if(k=d[e],c.ie&&(k.replace(/^ie/,"")==c.version||c.quirks&&"iequirks"==k)&&(k="ie"),c[k]){a+="_"+d[e];break}return CKEDITOR.getUrl(b()+a+".css")}function g(a,d){m[a]||(CKEDITOR.document.appendStyleSheet(h(a)),m[a]=1);d&&d()}function a(a){var d=a.getById(k);d||(d=a.getHead().append("style"),d.setAttribute("id",k),d.setAttribute("type","text/css"));return d}function e(a,d,c){var e,b,k;if(CKEDITOR.env.webkit)for(d=d.split("}").slice(0,-1),b=0;b<d.length;b++)d[b]=d[b].split("{");for(var g=
0;g<a.length;g++)if(CKEDITOR.env.webkit)for(b=0;b<d.length;b++){k=d[b][1];for(e=0;e<c.length;e++)k=k.replace(c[e][0],c[e][1]);a[g].$.sheet.addRule(d[b][0],k)}else{k=d;for(e=0;e<c.length;e++)k=k.replace(c[e][0],c[e][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?a[g].$.styleSheet.cssText+=k:a[g].$.innerHTML+=k}}var m={};CKEDITOR.skin={path:b,loadPart:function(a,d){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(b()+"skin.js"),function(){g(a,d)}):g(a,d)},
getPath:function(a){return CKEDITOR.getUrl(h(a))},icons:{},addIcon:function(a,d,c,e){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:d,offset:c||0,bgsize:e||"16px"})},getIconStyle:function(a,d,c,e,b){var k;a&&(a=a.toLowerCase(),d&&(k=this.icons[a+"-rtl"]),k||(k=this.icons[a]));a=c||k&&k.path||"";e=e||k&&k.offset;b=b||k&&k.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+e+"px;background-size:"+b+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,
{getUiColor:function(){return this.uiColor},setUiColor:function(f){var d=a(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var f=CKEDITOR.skin.chameleon,b="",k="";"function"==typeof f&&(b=f(this,"editor"),k=f(this,"panel"));a=[[c,a]];e([d],b,a);e(l,k,a)}).call(this,f)}});var k="cke_ui_color",l=[],c=/\$color/g;CKEDITOR.on("instanceLoaded",function(f){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var d=f.editor;f=function(f){f=(f.data[0]||f.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();
if(!f.getById("cke_ui_color")){var b=a(f);l.push(b);d.on("destroy",function(){l=CKEDITOR.tools.array.filter(l,function(a){return b!==a})});(f=d.getUiColor())&&e([b],CKEDITOR.skin.chameleon(d,"panel"),[[c,f]])}};d.on("panelShow",f);d.on("menuShow",f);d.config.uiColor&&d.setUiColor(d.config.uiColor)}})}(),function(){var b=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);
b.appendTo(CKEDITOR.document.getHead());try{var h=b.getComputedStyle("border-top-color"),g=b.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!h||h!=g)}catch(a){CKEDITOR.env.hc=!1}b.remove();CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(b=CKEDITOR._.pending)for(delete CKEDITOR._.pending,h=0;h<b.length;h++)CKEDITOR.editor.prototype.constructor.apply(b[h][0],b[h][1]),CKEDITOR.add(b[h][0])}(),
CKEDITOR.skin.name="moono-lisa",CKEDITOR.skin.ua_editor="ie,iequirks,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,iequirks,ie8",CKEDITOR.skin.chameleon=function(){var b=function(){return function(b,a){for(var e=b.match(/[^#]./g),h=0;3>h;h++){var k=h,l;l=parseInt(e[h],16);l=("0"+(0>a?0|l*(1+a):0|l+(255-l)*a).toString(16)).slice(-2);e[k]=l}return"#"+e.join("")}}(),h={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_bottom [background-color:{defaultBackground};border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [background-color:{defaultBackground};outline-color:{defaultBorder};] {id} .cke_dialog_tab [background-color:{dialogTab};border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [background-color:{lightBackground};] {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} a.cke_button_off:hover,{id} a.cke_button_off:focus,{id} a.cke_button_off:active [background-color:{darkBackground};border-color:{toolbarElementsBorder};] {id} .cke_button_on [background-color:{ckeButtonOn};border-color:{toolbarElementsBorder};] {id} .cke_toolbar_separator,{id} .cke_toolgroup a.cke_button:last-child:after,{id} .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after [background-color: {toolbarElementsBorder};border-color: {toolbarElementsBorder};] {id} a.cke_combo_button:hover,{id} a.cke_combo_button:focus,{id} .cke_combo_on a.cke_combo_button [border-color:{toolbarElementsBorder};background-color:{darkBackground};] {id} .cke_combo:after [border-color:{toolbarElementsBorder};] {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:{darkBackground};] {id}.cke_panel [border-color:{defaultBorder};] "),
panel:new CKEDITOR.template(".cke_panel_grouptitle [background-color:{lightBackground};border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active [background-color:{menubuttonHover};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")};
return function(g,a){var e=b(g.uiColor,.4),e={id:"."+g.id,defaultBorder:b(e,-.2),toolbarElementsBorder:b(e,-.25),defaultBackground:e,lightBackground:b(e,.8),darkBackground:b(e,-.15),ckeButtonOn:b(e,.4),ckeResizer:b(e,-.4),ckeColorauto:b(e,.8),dialogBody:b(e,.7),dialogTab:b(e,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:b(e,-.6),menubuttonHover:b(e,.1),menubuttonIcon:b(e,.5),menubuttonIconHover:b(e,.3)};return h[a].output(e).replace(/\[/g,"{").replace(/\]/g,"}")}}(),
CKEDITOR.plugins.add("dialogui",{onLoad:function(){var b=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||!1;for(var f=[this._],d=1;d<arguments.length;d++)f.push(arguments[d]);f.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,f);return this._},h={build:function(a,f,d){return new CKEDITOR.ui.dialog.textInput(a,f,d)}},g={build:function(a,f,d){return new CKEDITOR.ui.dialog[f.type](a,f,d)}},a={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}},e=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(a,f){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",f)}},!0),m=/^on([A-Z]\w+)/,k=function(a){for(var f in a)(m.test(f)||"title"==f||"type"==f)&&delete a[f];return a},l=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(a,f,d,e){if(!(4>arguments.length)){var k=b.call(this,f);k.labelId=CKEDITOR.tools.getNextId()+
"_label";this._.children=[];var g={role:f.role||"presentation"};f.includeLabel&&(g["aria-labelledby"]=k.labelId);CKEDITOR.ui.dialog.uiElement.call(this,a,f,d,"div",null,g,function(){var d=[],b=f.required?" cke_required":"";"horizontal"!=f.labelLayout?d.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+b+'" ',' id\x3d"'+k.labelId+'"',k.inputId?' for\x3d"'+k.inputId+'"':"",(f.labelStyle?' style\x3d"'+f.labelStyle+'"':"")+"\x3e",f.required?f.label+'\x3cspan class\x3d"cke_dialog_ui_labeled_required" aria-hidden\x3d"true"\x3e*\x3c/span\x3e':
f.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"',f.controlStyle?' style\x3d"'+f.controlStyle+'"':"",' role\x3d"presentation"\x3e',e.call(this,a,f),"\x3c/div\x3e"):(b={type:"hbox",widths:f.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+b+'" id\x3d"'+k.labelId+'" for\x3d"'+k.inputId+'"'+(f.labelStyle?' style\x3d"'+f.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(f.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+
(f.controlStyle?' style\x3d"'+f.controlStyle+'"':"")+"\x3e"+e.call(this,a,f)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(a,b,d));return d.join("")})}},textInput:function(a,f,d){if(!(3>arguments.length)){b.call(this,f);var e=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",k={"class":"cke_dialog_ui_input_"+f.type,id:e,type:f.type};f.validate&&(this.validate=f.validate);f.maxLength&&(k.maxlength=f.maxLength);f.size&&(k.size=f.size);f.inputStyle&&(k.style=f.inputStyle);var g=
this,h=!1;a.on("load",function(){g.getInputElement().on("keydown",function(a){13==a.data.getKeystroke()&&(h=!0)});g.getInputElement().on("keyup",function(d){13==d.data.getKeystroke()&&h&&(a.getButton("ok")&&setTimeout(function(){a.getButton("ok").click()},0),h=!1);g.bidi&&l.call(g,d)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,a,f,d,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',f.type,'" role\x3d"presentation"'];f.width&&a.push('style\x3d"width:'+f.width+'" ');a.push("\x3e\x3cinput ");
k["aria-labelledby"]=this._.labelId;this._.required&&(k["aria-required"]=this._.required);for(var d in k)a.push(d+'\x3d"'+k[d]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(a,f,d){if(!(3>arguments.length)){b.call(this,f);var e=this,k=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",g={};f.validate&&(this.validate=f.validate);g.rows=f.rows||5;g.cols=f.cols||20;g["class"]="cke_dialog_ui_input_textarea "+(f["class"]||"");"undefined"!=typeof f.inputStyle&&(g.style=f.inputStyle);
f.dir&&(g.dir=f.dir);if(e.bidi)a.on("load",function(){e.getInputElement().on("keyup",l)},e);CKEDITOR.ui.dialog.labeledElement.call(this,a,f,d,function(){g["aria-labelledby"]=this._.labelId;this._.required&&(g["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',k,'" '],d;for(d in g)a.push(d+'\x3d"'+CKEDITOR.tools.htmlEncode(g[d])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(e._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");
return a.join("")})}},checkbox:function(a,f,d){if(!(3>arguments.length)){var e=b.call(this,f,{"default":!!f["default"]});f.validate&&(this.validate=f.validate);CKEDITOR.ui.dialog.uiElement.call(this,a,f,d,"span",null,null,function(){var d=CKEDITOR.tools.extend({},f,{id:f.id?f.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),b=[],g=CKEDITOR.tools.getNextId()+"_label",h={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":g};k(d);f["default"]&&(h.checked="checked");"undefined"!=
typeof d.inputStyle&&(d.style=d.inputStyle);e.checkbox=new CKEDITOR.ui.dialog.uiElement(a,d,b,"input",null,h);b.push(' \x3clabel id\x3d"',g,'" for\x3d"',h.id,'"'+(f.labelStyle?' style\x3d"'+f.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(f.label),"\x3c/label\x3e");return b.join("")})}},radio:function(a,f,d){if(!(3>arguments.length)){b.call(this,f);this._["default"]||(this._["default"]=this._.initValue=f.items[0][1]);f.validate&&(this.validate=f.validate);var e=[],g=this;f.role="radiogroup";
f.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,a,f,d,function(){for(var d=[],b=[],h=(f.id?f.id:CKEDITOR.tools.getNextId())+"_radio",l=0;l<f.items.length;l++){var m=f.items[l],r=void 0!==m[2]?m[2]:m[0],y=void 0!==m[1]?m[1]:m[0],z=CKEDITOR.tools.getNextId()+"_radio_input",v=z+"_label",z=CKEDITOR.tools.extend({},f,{id:z,title:null,type:null},!0),r=CKEDITOR.tools.extend({},z,{title:r},!0),t={type:"radio","class":"cke_dialog_ui_radio_input",name:h,value:y,"aria-labelledby":v},C=[];g._["default"]==
y&&(t.checked="checked");k(z);k(r);"undefined"!=typeof z.inputStyle&&(z.style=z.inputStyle);y=new CKEDITOR.ui.dialog.uiElement(a,z,C,"input",null,t);y.on("focus",function(){g.click()});e.push(y);C.push(" ");new CKEDITOR.ui.dialog.uiElement(a,r,C,"label",null,{id:v,"for":t.id},m[0]);d.push(C.join(""))}new CKEDITOR.ui.dialog.hbox(a,e,d,b);return b.join("")});this._.children=e}},button:function(a,f,d){if(arguments.length){"function"==typeof f&&(f=f(a.getParentEditor()));b.call(this,f,{disabled:f.disabled||
!1});CKEDITOR.event.implementOn(this);var e=this;a.on("load",function(){var a=this.getElement();(function(){a.on("click",function(a){e.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(e.click(),a.data.preventDefault())})})();a.unselectable()},this);var k=CKEDITOR.tools.extend({},f);delete k.style;var g=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,a,k,d,"a",null,{style:f.style,href:"javascript:void(0)",title:f.label,hidefocus:"true",
"class":f["class"],role:"button","aria-labelledby":g},'\x3cspan id\x3d"'+g+'" class\x3d"cke_dialog_ui_button"\x3e'+CKEDITOR.tools.htmlEncode(f.label)+"\x3c/span\x3e")}},select:function(a,f,d){if(!(3>arguments.length)){var e=b.call(this,f);f.validate&&(this.validate=f.validate);e.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,a,f,d,function(){var d=CKEDITOR.tools.extend({},f,{id:f.id?f.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),b=[],g=[],h={id:e.inputId,
"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};b.push('\x3cdiv class\x3d"cke_dialog_ui_input_',f.type,'" role\x3d"presentation"');f.width&&b.push('style\x3d"width:'+f.width+'" ');b.push("\x3e");void 0!==f.size&&(h.size=f.size);void 0!==f.multiple&&(h.multiple=f.multiple);k(d);for(var l=0,m;l<f.items.length&&(m=f.items[l]);l++)g.push('\x3coption value\x3d"',CKEDITOR.tools.htmlEncode(void 0!==m[1]?m[1]:m[0]).replace(/"/g,"\x26quot;"),'" /\x3e ',CKEDITOR.tools.htmlEncode(m[0]));
"undefined"!=typeof d.inputStyle&&(d.style=d.inputStyle);e.select=new CKEDITOR.ui.dialog.uiElement(a,d,b,"select",null,h,g.join(""));b.push("\x3c/div\x3e");return b.join("")})}},file:function(a,f,d){if(!(3>arguments.length)){void 0===f["default"]&&(f["default"]="");var e=CKEDITOR.tools.extend(b.call(this,f),{definition:f,buttons:[]});f.validate&&(this.validate=f.validate);a.on("load",function(){CKEDITOR.document.getById(e.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,
a,f,d,function(){e.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"',e.frameId,'" title\x3d"',f.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(a,f,d){var e=this;if(!(3>arguments.length)){b.call(this,
f);f.validate&&(this.validate=f.validate);var k=CKEDITOR.tools.extend({},f),g=k.onClick;k.className=(k.className?k.className+" ":"")+"cke_dialog_ui_button";k.onClick=function(d){var e=f["for"];d=g?g.call(this,d):!1;!1!==d&&("xhr"!==d&&a.getContentElement(e[0],e[1]).submit(),this.disable())};a.on("load",function(){a.getContentElement(f["for"][0],f["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,a,k,d)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,f=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,
d=/\/$/;return function(e,b,k){if(!(3>arguments.length)){var g=[],h=b.html;"\x3c"!=h.charAt(0)&&(h="\x3cspan\x3e"+h+"\x3c/span\x3e");var l=b.focus;if(l){var m=this.focus;this.focus=function(){("function"==typeof l?l:m).call(this);this.fire("focus")};b.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,e,b,g,"span",null,null,"");g=g.join("").match(a);h=h.match(f)||["","",""];d.test(h[1])&&(h[1]=h[1].slice(0,-1),h[2]="/"+h[2]);k.push([h[1],
" ",g[1]||"",h[2]].join(""))}}}(),fieldset:function(a,f,d,e,b){var k=b.label;this._={children:f};CKEDITOR.ui.dialog.uiElement.call(this,a,b,e,"fieldset",null,null,function(){var a=[];k&&a.push("\x3clegend"+(b.labelStyle?' style\x3d"'+b.labelStyle+'"':"")+"\x3e"+k+"\x3c/legend\x3e");for(var c=0;c<d.length;c++)a.push(d[c]);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 f=CKEDITOR.document.getById(this._.labelId);1>f.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(f):f.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:e},!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,f){this.on("click",function(){f.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 f=a.getInputElement();f&&f.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var f=a.getInputElement();f&&(f.$.focus(),f.$.select())},0)},accessKeyUp:function(){this.select()},
setValue:function(a){if(this.bidi){var f=a&&a.charAt(0);(f="‪"==f?"ltr":"‫"==f?"rtl":null)&&(a=a.slice(1));this.setDirectionMarker(f)}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 f=this.getDirectionMarker();f&&(a=("ltr"==f?"‪":"‫")+a)}return a},setDirectionMarker:function(a){var f=this.getInputElement();a?f.setAttributes({dir:a,"data-cke-dir-marker":a}):
this.getDirectionMarker()&&f.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},a,!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,f,d){var e=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),
b=this.getInputElement().$;e.$.text=a;e.$.value=void 0===f||null===f?a:f;void 0===d||null===d?CKEDITOR.env.ie?b.add(e.$):b.add(e.$,null):b.add(e.$,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},a,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},
setValue:function(a,f){this.getInputElement().$.checked=a;!f&&this.fire("change",{value:a});return this},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(a,f){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return e.onChange.apply(this,arguments);a.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(c){c=c.data.$;"checked"==c.propertyName&&this.fire("change",{value:a.$.checked})},
this)},this);this.on("change",f);return null}},keyboardFocusable:!0},a,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{focus:function(){var a=this._.children,f=a[0],d=this._.dialog._,e=d.currentFocusIndex,b=e===d.focusList.length-1&&0===this.focusIndex;e>this.focusIndex&&!b&&(f=a[a.length-1]);d.currentFocusIndex=this.focusIndex;for(d=0;d<a.length;d++)if(e=a[d],e.getInputElement().$.checked){f=e;break}f.focus()},setValue:function(a,f){for(var d=this._.children,
e,b=0;b<d.length&&(e=d[b]);b++)e.getElement().$.checked=e.getValue()==a;!f&&this.fire("change",{value:a});return this},getValue:function(){for(var a=this._.children,f=0;f<a.length;f++)if(a[f].getElement().$.checked)return a[f].getValue();return null},accessKeyUp:function(){var a=this._.children,f;for(f=0;f<a.length;f++)if(a[f].getElement().$.checked){a[f].getElement().focus();return}a[0].getElement().focus()},click:function(){this._.dialog._.currentFocusIndex=this.focusIndex},eventProcessors:{onChange:function(a,
f){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return e.onChange.apply(this,arguments);a.on("load",function(){for(var a=this._.children,c=this,f=0;f<a.length;f++)a[f].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&&this.$.checked&&c.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",f);return null}},keyboardFocusable:!0},a,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,a,{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 f=/^on([A-Z]\w+)/,d,e=function(a,d,c,f){a.on("formLoaded",function(){a.getInputElement().on(c,f,a)})},b;for(b in a)if(d=b.match(f))this.eventProcessors[b]?this.eventProcessors[b].call(this,
this._.dialog,a[b]):e(this,this._.dialog,d[1].toLowerCase(),a[b]);return this},reset:function(){function a(){d.$.open();var c="";e.size&&(c=e.size-(CKEDITOR.env.ie?7:0));var m=f.frameId+"_input";d.$.write(['\x3chtml dir\x3d"'+h+'" lang\x3d"'+l+'"\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"'+h+'" lang\x3d"'+l+'" action\x3d"',CKEDITOR.tools.htmlEncode(e.action),
'"\x3e\x3clabel id\x3d"',f.labelId,'" for\x3d"',m,'" style\x3d"display:none"\x3e',CKEDITOR.tools.htmlEncode(e.label),'\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',m,'" aria-labelledby\x3d"',f.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(e.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("+k+");",
"window.onbeforeunload \x3d function() {window.parent.CKEDITOR.tools.callFunction("+g+")}","\x3c/script\x3e"].join(""));d.$.close();for(c=0;c<b.length;c++)b[c].enable()}var f=this._,d=CKEDITOR.document.getById(f.frameId).getFrameDocument(),e=f.definition,b=f.buttons,k=this.formLoadedNumber,g=this.formUnloadNumber,h=f.dialog._.editor.lang.dir,l=f.dialog._.editor.langCode;k||(k=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),g=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},
this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(k);CKEDITOR.tools.removeFunction(g)}));CKEDITOR.env.gecko?setTimeout(a,500):a()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(a,f){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",f)}},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",g);CKEDITOR.dialog.addUIElement("checkbox",g);CKEDITOR.dialog.addUIElement("radio",g);CKEDITOR.dialog.addUIElement("button",g);
CKEDITOR.dialog.addUIElement("select",g);CKEDITOR.dialog.addUIElement("file",g);CKEDITOR.dialog.addUIElement("fileButton",g);CKEDITOR.dialog.addUIElement("html",g);CKEDITOR.dialog.addUIElement("fieldset",{build:function(a,f,d){for(var e=f.children,b,k=[],g=[],h=0;h<e.length&&(b=e[h]);h++){var l=[];k.push(l);g.push(CKEDITOR.dialog._.uiElementBuilders[b.type].build(a,b,l))}return new CKEDITOR.ui.dialog[f.type](a,g,k,d,f)}})}}),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 b(a){a._.tabBarMode=!0;a._.tabs[a._.currentTabId][0].focus();a._.currentFocusIndex=-1}function h(){for(var a=this._.tabIdList.length,d=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+a,c=d-1;c>d-a;c--)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function g(){for(var a=this._.tabIdList.length,d=CKEDITOR.tools.indexOf(this._.tabIdList,
this._.currentTabId),c=d+1;c<d+a;c++)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function a(a,d){for(var c=a.$.getElementsByTagName("input"),f=0,e=c.length;f<e;f++){var b=new CKEDITOR.dom.element(c[f]);"text"==b.getAttribute("type").toLowerCase()&&(d?(b.setAttribute("value",b.getCustomData("fake_value")||""),b.removeCustomData("fake_value")):(b.setCustomData("fake_value",b.getAttribute("value")),b.setAttribute("value","")))}}function e(a,d){var c=
this.getInputElement();c&&(a?c.removeAttribute("aria-invalid"):c.setAttribute("aria-invalid",!0));a||(this.select?this.select():this.focus());d&&alert(d);this.fire("validated",{valid:a,msg:d})}function m(){var a=this.getInputElement();a&&a.removeAttribute("aria-invalid")}function k(a){var d=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",J).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=d.getChild([0,0,0,0,0]),f=c.getChild(0),e=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()));f.unselectable();e.unselectable();return{element:d,parts:{dialog:d.getChild(0),title:f,close:e,tabs:c.getChild(2),contents:c.getChild([3,0,0,0]),footer:c.getChild([3,0,1,0])}}}function l(a,d,c){this.element=d;this.focusIndex=c;this.tabIndex=0;this.isFocusable=function(){return!d.getAttribute("disabled")&&d.isVisible()};this.focus=function(){a._.currentFocusIndex=this.focusIndex;this.element.focus()};d.on("keydown",function(a){a.data.getKeystroke()in
{32:1,13:1}&&this.fire("click")});d.on("focus",function(){this.fire("mouseover")});d.on("blur",function(){this.fire("mouseout")})}function c(a){function d(){a.layout()}var c=CKEDITOR.document.getWindow();c.on("resize",d);a.on("hide",function(){c.removeListener("resize",d)})}function f(a,c){this.dialog=a;for(var f=c.contents,e=0,b;b=f[e];e++)f[e]=b&&new d(a,b);CKEDITOR.tools.extend(this,c)}function d(a,d){this._={dialog:a};CKEDITOR.tools.extend(this,d)}function n(a){function d(c){var h=a.getSize(),
l=a.parts.dialog.getParent().getClientSize(),m=c.data.$.screenX,n=c.data.$.screenY,q=m-f.x,t=n-f.y;f={x:m,y:n};e.x+=q;e.y+=t;m=e.x+g[3]<k?-g[3]:e.x-g[1]>l.width-h.width-k?l.width-h.width+("rtl"==b.lang.dir?0:g[1]):e.x;h=e.y+g[0]<k?-g[0]:e.y-g[2]>l.height-h.height-k?l.height-h.height+g[2]:e.y;m=Math.floor(m);h=Math.floor(h);a.move(m,h,1);c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mousemove",d);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=
A.getChild(0).getFrameDocument();a.removeListener("mousemove",d);a.removeListener("mouseup",c)}}var f=null,e=null,b=a.getParentEditor(),k=b.config.dialog_magnetDistance,g=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof k&&(k=20);a.parts.title.on("mousedown",function(b){if(!a._.moved){var k=a._.element;k.getFirst().setStyle("position","absolute");k.removeStyle("display");a._.moved=!0;a.layout()}f={x:b.data.$.screenX,y:b.data.$.screenY};CKEDITOR.document.on("mousemove",d);CKEDITOR.document.on("mouseup",
c);e=a.getPosition();CKEDITOR.env.ie6Compat&&(k=A.getChild(0).getFrameDocument(),k.on("mousemove",d),k.on("mouseup",c));b.data.preventDefault()},a)}function q(a){function d(c){var n="rtl"==b.lang.dir,q=m.width,t=m.height,r=q+(c.data.$.screenX-l.x)*(n?-1:1)*(a._.moved?1:2),K=t+(c.data.$.screenY-l.y)*(a._.moved?1:2),v=a._.element.getFirst(),v=n&&parseInt(v.getComputedStyle("right"),10),w=a.getPosition();w.x=w.x||0;w.y=w.y||0;w.y+K>h.height&&(K=h.height-w.y);(n?v:w.x)+r>h.width&&(r=h.width-(n?v:w.x));
K=Math.floor(K);r=Math.floor(r);if(e==CKEDITOR.DIALOG_RESIZE_WIDTH||e==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(f.minWidth||0,r-k);if(e==CKEDITOR.DIALOG_RESIZE_HEIGHT||e==CKEDITOR.DIALOG_RESIZE_BOTH)t=Math.max(f.minHeight||0,K-g);a.resize(q,t);a._.moved&&u(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",d);n&&(n.remove(),n=null);if(CKEDITOR.env.ie6Compat){var a=A.getChild(0).getFrameDocument();
a.removeListener("mouseup",c);a.removeListener("mousemove",d)}}var f=a.definition,e=f.resizable;if(e!=CKEDITOR.DIALOG_RESIZE_NONE){var b=a.getParentEditor(),k,g,h,l,m,n,q=CKEDITOR.tools.addFunction(function(f){function e(a){return a.isVisible()}m=a.getSize();var b=a.parts.contents,q=b.$.getElementsByTagName("iframe").length,t=!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks);q&&(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'),
b.append(n));g=m.height-a.parts.contents.getFirst(e).getSize("height",t);k=m.width-a.parts.contents.getFirst(e).getSize("width",1);l={x:f.screenX,y:f.screenY};h=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",d);CKEDITOR.document.on("mouseup",c);CKEDITOR.env.ie6Compat&&(b=A.getChild(0).getFrameDocument(),b.on("mousemove",d),b.on("mouseup",c));f.preventDefault&&f.preventDefault()});a.on("load",function(){var d="";e==CKEDITOR.DIALOG_RESIZE_WIDTH?d=" cke_resizer_horizontal":
e==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(d=" cke_resizer_vertical");d=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+d+" cke_resizer_"+b.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(b.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+q+', event )"\x3e'+("ltr"==b.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(d,1)});b.on("destroy",function(){CKEDITOR.tools.removeFunction(q)})}}function u(a,d,c){var f=a.parts.dialog.getParent().getClientSize(),e=a.getSize(),
b=a._.viewportRatio,k=Math.max(f.width-e.width,0),f=Math.max(f.height-e.height,0);b.width=k?d/k:b.width;b.height=f?c/f:b.height;a._.viewportRatio=b}function x(a){a.data.preventDefault(1)}function p(a){var d=a.config,c=CKEDITOR.skinName||a.config.skin,f=d.dialog_backgroundCoverColor||("moono-lisa"==c?"black":"white"),c=d.dialog_backgroundCoverOpacity,e=d.baseFloatZIndex,d=CKEDITOR.tools.genKey(f,c,e),b=E[d];CKEDITOR.document.getBody().addClass("cke_dialog_open");b?b.show():(e=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',
CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",e,"; top: 0px; left: 0px; ","; width: 100%; height: 100%;",CKEDITOR.env.ie6Compat?"":"background-color: "+f,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(f="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+f+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",e.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),e.push("void((function(){"+encodeURIComponent("document.open();("+
CKEDITOR.tools.fixDomain+")();document.write( '"+f+"' );document.close();")+"})())"),e.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),e.push("\x3c/div\x3e"),b=CKEDITOR.dom.element.createFromHtml(e.join("")),b.setOpacity(void 0!==c?c:.5),b.on("keydown",x),b.on("keypress",x),b.on("keyup",x),b.appendTo(CKEDITOR.document.getBody()),E[d]=b);a.focusManager.add(b);A=b;CKEDITOR.env.mac&&CKEDITOR.env.webkit||
b.focus()}function w(a){CKEDITOR.document.getBody().removeClass("cke_dialog_open");A&&(a.focusManager.remove(A),A.hide())}function B(a){var d=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,f=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode);(d=P[(d?"CTRL+":"")+(c?"ALT+":"")+(f?"SHIFT+":"")+e])&&d.length&&(d=d[d.length-1],d.keydown&&d.keydown.call(d.uiElement,d.dialog,d.key),a.data.preventDefault())}function r(a){var d=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,f=a.data.$.shiftKey,
e=String.fromCharCode(a.data.$.keyCode);(d=P[(d?"CTRL+":"")+(c?"ALT+":"")+(f?"SHIFT+":"")+e])&&d.length&&(d=d[d.length-1],d.keyup&&(d.keyup.call(d.uiElement,d.dialog,d.key),a.data.preventDefault()))}function y(a,d,c,f,e){(P[c]||(P[c]=[])).push({uiElement:a,dialog:d,key:c,keyup:e||a.accessKeyUp,keydown:f||a.accessKeyDown})}function z(a){for(var d in P){for(var c=P[d],f=c.length-1;0<=f;f--)c[f].dialog!=a&&c[f].uiElement!=a||c.splice(f,1);0===c.length&&delete P[d]}}function v(a,d){a._.accessKeyMap[d]&&
a.selectPage(a._.accessKeyMap[d])}function t(){}var C=CKEDITOR.tools.cssLength,D,A,H=!1,F=!CKEDITOR.env.ie||CKEDITOR.env.edge,J='\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(a,d){function c(){var a=C._.focusList;a.sort(function(a,d){return a.tabIndex!=d.tabIndex?d.tabIndex-a.tabIndex:a.focusIndex-d.focusIndex});for(var d=a.length,f=0;f<d;f++)a[f].focusIndex=f}function l(a){var d=C._.focusList;a=a||0;if(!(1>d.length)){var c=C._.currentFocusIndex;C._.tabBarMode&&0>a&&(c=0);try{d[c].getInputElement().$.blur()}catch(f){}var e=c,b=1<C._.pageCount;do{e+=a;if(b&&!C._.tabBarMode&&(e==d.length||-1==e)){C._.tabBarMode=!0;C._.tabs[C._.currentTabId][0].focus();
C._.currentFocusIndex=-1;return}e=(e+d.length)%d.length;if(e==c)break}while(a&&!d[e].isFocusable());d[e].focus();"text"==d[e].type&&d[e].select()}}function t(d){if(C==CKEDITOR.dialog._.currentTop){var c=d.data.getKeystroke(),f="rtl"==a.lang.dir,e=[37,38,39,40];B=y=0;if(9==c||c==CKEDITOR.SHIFT+9)l(c==CKEDITOR.SHIFT+9?-1:1),B=1;else if(c==CKEDITOR.ALT+121&&!C._.tabBarMode&&1<C.getPageCount())b(C),B=1;else if(-1!=CKEDITOR.tools.indexOf(e,c)&&C._.tabBarMode)c=-1!=CKEDITOR.tools.indexOf([f?39:37,38],c)?
h.call(C):g.call(C),C.selectPage(c),C._.tabs[c][0].focus(),B=1;else if(13!=c&&32!=c||!C._.tabBarMode)if(13==c)c=d.data.getTarget(),c.is("a","button","select","textarea")||c.is("input")&&"button"==c.$.type||((c=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(c.click,0,c),B=1),y=1;else if(27==c)(c=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(c.click,0,c):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),y=1;else return;else this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex=
-1,l(1),B=1;r(d)}}function r(a){B?a.data.preventDefault(1):y&&a.data.stopPropagation()}var v=CKEDITOR.dialog._.dialogDefinitions[d],w=CKEDITOR.tools.clone(D),z=a.config.dialog_buttonsOrder||"OS",u=a.lang.dir,p={},B,y;("OS"==z&&CKEDITOR.env.mac||"rtl"==z&&"ltr"==u||"ltr"==z&&"rtl"==u)&&w.buttons.reverse();v=CKEDITOR.tools.extend(v(a),w);v=CKEDITOR.tools.clone(v);v=new f(this,v);w=k(a);this._={editor:a,element:w.element,name:d,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=w.parts;CKEDITOR.tools.setTimeout(function(){a.fire("ariaWidget",this.parts.contents)},0,this);w={top:0,visibility:"hidden"};CKEDITOR.env.ie6Compat&&(w.position="absolute");w["rtl"==u?"right":"left"]=0;this.parts.dialog.setStyles(w);CKEDITOR.event.call(this);this.definition=v=CKEDITOR.fire("dialogDefinition",
{name:d,definition:v,dialog:this},a).definition;if(!("removeDialogTabs"in a._)&&a.config.removeDialogTabs){w=a.config.removeDialogTabs.split(";");for(u=0;u<w.length;u++)if(z=w[u].split(":"),2==z.length){var x=z[0];p[x]||(p[x]=[]);p[x].push(z[1])}a._.removeDialogTabs=p}if(a._.removeDialogTabs&&(p=a._.removeDialogTabs[d]))for(u=0;u<p.length;u++)v.removeContents(p[u]);if(v.onLoad)this.on("load",v.onLoad);if(v.onShow)this.on("show",v.onShow);if(v.onHide)this.on("hide",v.onHide);if(v.onOk)this.on("ok",
function(d){a.fire("saveSnapshot");setTimeout(function(){a.fire("saveSnapshot")},0);!1===v.onOk.call(this,d)&&(d.data.hide=!1)});this.state=CKEDITOR.DIALOG_STATE_IDLE;if(v.onCancel)this.on("cancel",function(a){!1===v.onCancel.call(this,a)&&(a.data.hide=!1)});var C=this,A=function(a){var d=C._.contents,c=!1,f;for(f in d)for(var e in d[f])if(c=a.call(this,d[f][e]))return};this.on("ok",function(a){A(function(d){if(d.validate){var c=d.validate(this),f="string"==typeof c||!1===c;f&&(a.data.hide=!1,a.stop());
e.call(d,!f,"string"==typeof c?c:void 0);return f}})},this,null,0);this.on("cancel",function(d){A(function(c){if(c.isChanged())return a.config.dialog_noConfirmCancel||confirm(a.lang.common.confirmCancel)||(d.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=l;var F=this._.element;a.focusManager.add(F,1);this.on("show",function(){F.on("keydown",t,this);if(CKEDITOR.env.gecko)F.on("keypress",
r,this)});this.on("hide",function(){F.removeListener("keydown",t);CKEDITOR.env.gecko&&F.removeListener("keypress",r);A(function(a){m.apply(a)})});this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",t,this,null,0)});this.on("show",function(){c();var d=1<C._.pageCount;a.config.dialog_startupFocusTab&&d?(C._.tabBarMode=!0,C._.tabs[C._.currentTabId][0].focus(),C._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=d?-1:this._.focusList.length-
1,v.onFocus?(d=v.onFocus.call(this))&&d.focus():l(1))},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var a=this.getElement(),d=a.getFirst();d.remove();d.appendTo(a)},this);n(this);q(this);(new CKEDITOR.dom.text(v.title,CKEDITOR.document)).appendTo(this.parts.title);for(u=0;u<v.contents.length;u++)(p=v.contents[u])&&this.addPage(p);this.parts.tabs.on("click",function(a){var d=a.data.getTarget();d.hasClass("cke_dialog_tab")&&(d=d.$.id,this.selectPage(d.substring(4,d.lastIndexOf("_"))),
b(this),a.data.preventDefault())},this);u=[];p=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:v.buttons},u).getChild();this.parts.footer.setHtml(u.join(""));for(u=0;u<p.length;u++)this._.buttons[p[u].id]=p[u]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(a,d){if(!this._.contentSize||this._.contentSize.width!=a||this._.contentSize.height!=d){CKEDITOR.dialog.fire("resize",
{dialog:this,width:a,height:d},this._.editor);this.fire("resize",{width:a,height:d},this._.editor);this.parts.contents.setStyles({width:a+"px",height:d+"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:d}}},getSize:function(){var a=this._.element.getFirst();return{width:a.$.offsetWidth||0,height:a.$.offsetHeight||
0}},move:function(a,d,c){var f=this._.element.getFirst(),e="rtl"==this._.editor.lang.dir;CKEDITOR.env.ie&&f.setStyle("zoom","100%");var b=this.parts.dialog.getParent().getClientSize(),k=this.getSize(),g=this._.viewportRatio,h=Math.max(b.width-k.width,0),b=Math.max(b.height-k.height,0);this._.position&&this._.position.x==a&&this._.position.y==d?(a=Math.floor(h*g.width),d=Math.floor(b*g.height)):u(this,a,d);this._.position={x:a,y:d};e&&(a=h-a);d={top:(0<d?d:0)+"px"};d[e?"right":"left"]=(0<a?a:0)+"px";
f.setStyles(d);c&&(this._.moved=1)},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,d=this.definition,f=CKEDITOR.document.getBody(),e=this._.editor.config.baseFloatZIndex;a.getParent()&&a.getParent().equals(f)?a.setStyle("display",F?"flex":"block"):a.appendTo(f);this.resize(this._.contentSize&&this._.contentSize.width||d.width||d.minWidth,this._.contentSize&&this._.contentSize.height||d.height||d.minHeight);this.reset();null===this._.currentTabId&&
this.selectPage(this.definition.contents[0].id);null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=e);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,p(this._.editor)):CKEDITOR.dialog._.currentTop!==this&&(this._.parentDialog=CKEDITOR.dialog._.currentTop,f=this._.parentDialog.getElement().getFirst(),
f.$.style.zIndex-=Math.floor(e/2),this._.parentDialog.getElement().setStyle("z-index",f.$.style.zIndex),CKEDITOR.dialog._.currentTop=this);a.on("keydown",B);a.on("keyup",r);this._.hasFocus=!1;for(var b in d.contents)if(d.contents[b]){var a=d.contents[b],e=this._.tabs[a.id],f=a.requiredContent,k=0;if(e){for(var g in this._.contents[a.id]){var h=this._.contents[a.id][g];"hbox"!=h.type&&"vbox"!=h.type&&h.getInputElement()&&(h.requiredContent&&!this._.editor.activeFilter.check(h.requiredContent)?h.disable():
(h.enable(),k++))}!k||f&&!this._.editor.activeFilter.check(f)?e[0].addClass("cke_dialog_tab_disabled"):e[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 d=this.getSize(),c=CKEDITOR.document.getWindow().getViewPaneSize(),f;this._.moved&&this._.position?(f=this._.position.x,d=this._.position.y):(f=(c.width-d.width)/2,d=(c.height-d.height)/2);CKEDITOR.env.ie6Compat||(a.setStyle("position","absolute"),a.removeStyle("margin"));f=Math.floor(f);d=Math.floor(d);this.move(f,d)}},foreach:function(a){for(var d in this._.contents)for(var c in this._.contents[d])a.call(this,this._.contents[d][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(d){d.setup&&d.setup.apply(d,a)})},commitContent:function(){var a=arguments;this.foreach(function(d){CKEDITOR.env.ie&&this._.currentFocusIndex==d.focusIndex&&d.getInputElement().$.blur();d.commit&&d.commit.apply(d,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(z(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var d=this._.parentDialog.getElement().getFirst(),c=parseInt(d.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2);this._.parentDialog.getElement().setStyle("z-index",c);d.setStyle("z-index",c)}else w(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=
10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",B);a.removeListener("keyup",r);var f=this._.editor;f.focus();setTimeout(function(){f.focusManager.unlock();CKEDITOR.env.iOS&&f.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 d=[],c=a.label?' title\x3d"'+CKEDITOR.tools.htmlEncode(a.label)+
'"':"",f=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%;"},d),e=this._.contents[a.id]={},b=f.getChild(),k=0;f=b.shift();)f.notAllowed||"hbox"==f.type||"vbox"==f.type||k++,e[f.id]=f,"function"==typeof f.getChild&&b.push.apply(b,f.getChild());k||(a.hidden=!0);d=CKEDITOR.dom.element.createFromHtml(d.join(""));d.setAttribute("role","tabpanel");d.setStyle("min-height",
"100%");f=CKEDITOR.env;e="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"',e,'"',f.gecko&&!f.hc?"":' href\x3d"javascript:void(0)"',' tabIndex\x3d"-1" hidefocus\x3d"true" role\x3d"tab"\x3e',a.label,"\x3c/a\x3e"].join(""));d.setAttribute("aria-labelledby",e);this._.tabs[a.id]=[c,d];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++;
this._.lastTab=c;this.updateStyle();d.setAttribute("name",a.id);d.appendTo(this.parts.contents);c.unselectable();this.parts.tabs.append(c);a.accessKey&&(y(this,this,"CTRL+"+a.accessKey,t,v),this._.accessKeyMap["CTRL+"+a.accessKey]=a.id)}},selectPage:function(d){if(this._.currentTabId!=d&&!this._.tabs[d][0].hasClass("cke_dialog_tab_disabled")&&!1!==this.fire("selectPage",{page:d,currentPage:this._.currentTabId})){for(var c in this._.tabs){var f=this._.tabs[c][0],e=this._.tabs[c][1];c!=d&&(f.removeClass("cke_dialog_tab_selected"),
f.removeAttribute("aria-selected"),e.hide());e.setAttribute("aria-hidden",c!=d)}var b=this._.tabs[d];b[0].addClass("cke_dialog_tab_selected");b[0].setAttribute("aria-selected",!0);CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(a(b[1]),b[1].show(),setTimeout(function(){a(b[1],1)},0)):b[1].show();this._.currentTabId=d;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,d)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(a){var d=
this._.tabs[a]&&this._.tabs[a][0];d&&1!=this._.pageCount&&d.isVisible()&&(a==this._.currentTabId&&this.selectPage(h.call(this)),d.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,d){var c=this._.contents[a];return c&&c[d]},getValueOf:function(a,d){return this.getContentElement(a,d).getValue()},
setValueOf:function(a,d,c){return this.getContentElement(a,d).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,
d){if("undefined"==typeof d)d=this._.focusList.length,this._.focusList.push(new l(this,a,d));else{this._.focusList.splice(d,0,new l(this,a,d));for(var c=d+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 d=this.getParentEditor().lang.dir,c={attributes:{"class":"cke_dialog_spinner"},styles:{"float":"rtl"==d?"right":"left"}};c.styles["margin-"+("rtl"==d?"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,d){this._.dialogDefinitions[a]&&"function"!=typeof d||(this._.dialogDefinitions[a]=d)},exists:function(a){return!!this._.dialogDefinitions[a]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},
isTabEnabled:function(a,d,c){a=a.config.removeDialogTabs;return!(a&&a.match(new RegExp("(?:^|;)"+d+":"+c+"(?:$|;)","i")))},okButton:function(){var a=function(a,d){d=d||{};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()}},d,!0)};a.type="button";a.override=function(d){return CKEDITOR.tools.extend(function(c){return a(c,d)},{type:"button"},!0)};return a}(),cancelButton:function(){var a=
function(a,d){d=d||{};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()}},d,!0)};a.type="button";a.override=function(d){return CKEDITOR.tools.extend(function(c){return a(c,d)},{type:"button"},!0)};return a}(),addUIElement:function(a,d){this._.uiElementBuilders[a]=d}});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,d,c){for(var f=0,e;e=a[f];f++)if(e.id==d||c&&e[c]&&(e=G(e[c],d,c)))return e;return null},M=function(a,d,c,f,e){if(c){for(var b=0,k;k=a[b];b++){if(k.id==c)return a.splice(b,0,d),d;if(f&&k[f]&&(k=M(k[f],d,c,f,!0)))return k}if(e)return null}a.push(d);return d},
I=function(a,d,c){for(var f=0,e;e=a[f];f++){if(e.id==d)return a.splice(f,1);if(c&&e[c]&&(e=I(e[c],d,c)))return e}return null};f.prototype={getContents:function(a){return G(this.contents,a)},getButton:function(a){return G(this.buttons,a)},addContents:function(a,d){return M(this.contents,a,d)},addButton:function(a,d){return M(this.buttons,a,d)},removeContents:function(a){I(this.contents,a)},removeButton:function(a){I(this.buttons,a)}};d.prototype={get:function(a){return G(this.elements,a,"children")},
add:function(a,d){return M(this.elements,a,d,"children")},remove:function(a){I(this.elements,a,"children")}};var E={},P={};(function(){CKEDITOR.ui.dialog={uiElement:function(a,d,c,f,e,b,k){if(!(4>arguments.length)){var g=(f.call?f(d):f)||"div",h=["\x3c",g," "],l=(e&&e.call?e(d):e)||{},m=(b&&b.call?b(d):b)||{},n=(k&&k.call?k.call(this,a,d):k)||"",q=this.domId=m.id||CKEDITOR.tools.getNextId()+"_uiElement";d.requiredContent&&!a.getParentEditor().filter.check(d.requiredContent)&&(l.display="none",this.notAllowed=
!0);m.id=q;var t={};d.type&&(t["cke_dialog_ui_"+d.type]=1);d.className&&(t[d.className]=1);d.disabled&&(t.cke_disabled=1);for(var r=m["class"]&&m["class"].split?m["class"].split(" "):[],q=0;q<r.length;q++)r[q]&&(t[r[q]]=1);r=[];for(q in t)r.push(q);m["class"]=r.join(" ");d.title&&(m.title=d.title);t=(d.style||"").split(";");d.align&&(r=d.align,l["margin-left"]="left"==r?0:"auto",l["margin-right"]="right"==r?0:"auto");for(q in l)t.push(q+":"+l[q]);d.hidden&&t.push("display:none");for(q=t.length-1;0<=
q;q--)""===t[q]&&t.splice(q,1);0<t.length&&(m.style=(m.style?m.style+"; ":"")+t.join("; "));for(q in m)h.push(q+'\x3d"'+CKEDITOR.tools.htmlEncode(m[q])+'" ');h.push("\x3e",n,"\x3c/",g,"\x3e");c.push(h.join(""));(this._||(this._={})).dialog=a;"boolean"==typeof d.isChanged&&(this.isChanged=function(){return d.isChanged});"function"==typeof d.isChanged&&(this.isChanged=d.isChanged);"function"==typeof d.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(a){return function(c){a.call(this,
d.setValue.call(this,c))}}));"function"==typeof d.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,function(a){return function(){return d.getValue.call(this,a.call(this))}}));CKEDITOR.event.implementOn(this);this.registerEvents(d);this.accessKeyUp&&this.accessKeyDown&&d.accessKey&&y(this,a,"CTRL+"+d.accessKey);var v=this;a.on("load",function(){var d=v.getInputElement();if(d){var c=v.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?"cke_dialog_ui_focused":"";d.on("focus",
function(){a._.tabBarMode=!1;a._.hasFocus=!0;v.fire("focus");c&&this.addClass(c)});d.on("blur",function(){v.fire("blur");c&&this.removeClass(c)})}});CKEDITOR.tools.extend(this,d);this.keyboardFocusable&&(this.tabIndex=d.tabIndex||0,this.focusIndex=a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=v.focusIndex}))}},hbox:function(a,d,c,f,e){if(!(4>arguments.length)){this._||(this._={});var b=this._.children=d,k=e&&e.widths||null,g=e&&e.height||null,h,l={role:"presentation"};
e&&e.align&&(l.align=e.align);CKEDITOR.ui.dialog.uiElement.call(this,a,e||{type:"hbox"},f,"table",{},l,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(h=0;h<c.length;h++){var d="cke_dialog_ui_hbox_child",f=[];0===h&&(d="cke_dialog_ui_hbox_first");h==c.length-1&&(d="cke_dialog_ui_hbox_last");a.push('\x3ctd class\x3d"',d,'" role\x3d"presentation" ');k?k[h]&&f.push("width:"+C(k[h])):f.push("width:"+Math.floor(100/c.length)+"%");g&&f.push("height:"+C(g));e&&void 0!==e.padding&&
f.push("padding:"+C(e.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&b[h].align&&f.push("text-align:"+b[h].align);0<f.length&&a.push('style\x3d"'+f.join("; ")+'" ');a.push("\x3e",c[h],"\x3c/td\x3e")}a.push("\x3c/tr\x3e\x3c/tbody\x3e");return a.join("")})}},vbox:function(a,d,c,f,e){if(!(3>arguments.length)){this._||(this._={});var b=this._.children=d,k=e&&e.width||null,g=e&&e.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,e||{type:"vbox"},f,"div",null,{role:"presentation"},function(){var d=
['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];d.push('style\x3d"');e&&e.expand&&d.push("height:100%;");d.push("width:"+C(k||"100%"),";");CKEDITOR.env.webkit&&d.push("float:none;");d.push('"');d.push('align\x3d"',CKEDITOR.tools.htmlEncode(e&&e.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');d.push("\x3e\x3ctbody\x3e");for(var f=0;f<c.length;f++){var h=[];d.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');k&&h.push("width:"+C(k||"100%"));g?h.push("height:"+
C(g[f])):e&&e.expand&&h.push("height:"+Math.floor(100/c.length)+"%");e&&void 0!==e.padding&&h.push("padding:"+C(e.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&b[f].align&&h.push("text-align:"+b[f].align);0<h.length&&d.push('style\x3d"',h.join("; "),'" ');d.push(' class\x3d"cke_dialog_ui_vbox_child"\x3e',c[f],"\x3c/td\x3e\x3c/tr\x3e")}d.push("\x3c/tbody\x3e\x3c/table\x3e");return d.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,d){this.getInputElement().setValue(a);!d&&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 d=/^on([A-Z]\w+)/,c,f=function(a,d,c,f){d.on("load",function(){a.getInputElement().on(c,f,a)})},e;for(e in a)if(c=e.match(d))this.eventProcessors[e]?this.eventProcessors[e].call(this,this._.dialog,a[e]):f(this,this._.dialog,c[1].toLowerCase(),a[e]);return this},eventProcessors:{onLoad:function(a,d){a.on("load",d,this)},onShow:function(a,d){a.on("show",
d,this)},onHide:function(a,d){a.on("hide",d,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,
d,c){for(var f=d.children,e,b=[],k=[],g=0;g<f.length&&(e=f[g]);g++){var h=[];b.push(h);k.push(CKEDITOR.dialog._.uiElementBuilders[e.type].build(a,e,h))}return new CKEDITOR.ui.dialog[d.type](a,k,b,c,d)}};CKEDITOR.dialog.addUIElement("hbox",a);CKEDITOR.dialog.addUIElement("vbox",a)})();CKEDITOR.dialogCommand=function(a,d){this.dialogName=a;CKEDITOR.tools.extend(this,d,!0)};CKEDITOR.dialogCommand.prototype={exec:function(a){var d=this.tabId;a.openDialog(this.dialogName,function(a){d&&a.selectPage(d)})},
canUndo:!1,editorFocus:1};(function(){var a=/^\d*$/,d=/^\d*(?:\.\d+)?$/,c=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,f=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,e=/^(--|-?([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(d){this&&this.getValue&&(d=this.getValue());var c,f=CKEDITOR.VALIDATE_AND,e=[],b;for(b=0;b<a.length;b++)if("function"==typeof a[b])e.push(a[b]);
else break;b<a.length&&"string"==typeof a[b]&&(c=a[b],b++);b<a.length&&"number"==typeof a[b]&&(f=a[b]);b=f==CKEDITOR.VALIDATE_AND;for(var k=0;k<e.length;k++){var g=!0===e[k](d);b=f==CKEDITOR.VALIDATE_AND?b&&g:b||g}return b?!0:c}},regex:function(a,d){return this.functions(function(d){return a.test(d)},d)},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(d){return this.regex(a,d)},number:function(a){return this.regex(d,a)},cssLength:function(a){return this.functions(function(a){return f.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 e.test(CKEDITOR.tools.trim(a))})},
a)},equals:function(a,d){return this.functions(function(d){return d==a},d)},notEqual:function(a,d){return this.functions(function(d){return d!=a},d)}};CKEDITOR.on("instanceDestroyed",function(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var d;d=CKEDITOR.dialog._.currentTop;)d.hide();for(var c in E)E[c].remove();E={}}a=a.editor._.storedDialogs;for(var f in a)a[f].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,d,c){var f=null,e=CKEDITOR.dialog._.dialogDefinitions[a];
null===CKEDITOR.dialog._.currentTop&&p(this);if("function"==typeof e)e=this._.storedDialogs||(this._.storedDialogs={}),f=e[a]||(e[a]=new CKEDITOR.dialog(this,a)),f.setModel(c),d&&d.call(f,f),f.show();else{if("failed"==e)throw w(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');"string"==typeof e&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[a]&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed");
this.openDialog(a,d,c)},this,0,1)}CKEDITOR.skin.loadPart("dialog");if(f)f.once("hide",function(){f.setModel(null)},null,null,999);return f}});CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(a){H||(CKEDITOR.document.appendStyleSheet(this.path+"styles/dialog.css"),H=!0);a.on("doubleclick",function(d){d.data.dialog&&a.openDialog(d.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(b){var h=this;b.addCommand("a11yHelp",{exec:function(){var g=b.langCode,g=h.availableLangs[g]?g:h.availableLangs[g.replace(/-.*/,"")]?g.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(h.path+
"dialogs/lang/"+g+".js"),function(){b.lang.a11yhelp=h.langEntries[g];b.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:!1});b.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js");b.on("ariaEditorHelpLabel",function(g){g.data.label=b.lang.common.editorHelp})}})}(),CKEDITOR.plugins.add("about",{requires:"dialog",init:function(b){var h=b.addCommand("about",new CKEDITOR.dialogCommand("about"));h.modes={wysiwyg:1,source:1};h.canUndo=
!1;h.readOnly=1;b.ui.addButton&&b.ui.addButton("About",{label:b.lang.about.dlgTitle,command:"about",toolbar:"about"});CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}}),CKEDITOR.plugins.add("basicstyles",{init:function(b){var h=0,g=function(e,g,c,f){if(f){f=new CKEDITOR.style(f);var d=a[c];d.unshift(f);b.attachStyleStateChange(f,function(a){!b.readOnly&&b.getCommand(c).setState(a)});b.addCommand(c,new CKEDITOR.styleCommand(f,{contentForms:d}));b.ui.addButton&&b.ui.addButton(e,{isToggle:!0,
label:g,command:c,toolbar:"basicstyles,"+(h+=10)})}},a={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"]},e=b.config,m=b.lang.basicstyles;g("Bold",m.bold,"bold",
e.coreStyles_bold);g("Italic",m.italic,"italic",e.coreStyles_italic);g("Underline",m.underline,"underline",e.coreStyles_underline);g("Strike",m.strike,"strike",e.coreStyles_strike);g("Subscript",m.subscript,"subscript",e.coreStyles_subscript);g("Superscript",m.superscript,"superscript",e.coreStyles_superscript);b.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])},afterInit:function(b){if(b.config.coreStyles_toggleSubSup){var h=b.getCommand("subscript"),
g=b.getCommand("superscript");if(h&&g)b.on("afterCommandExec",function(a){a=a.data.name;if("subscript"===a||"superscript"===a){var e="subscript"===a?g:h;("subscript"===a?h:g).state===CKEDITOR.TRISTATE_ON&&e.state===CKEDITOR.TRISTATE_ON&&(e.exec(b),b.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 b(a,c,f,e){if(!a.isReadOnly()&&!a.equals(f.editable())){CKEDITOR.dom.element.setMarker(e,a,"bidi_processed",1);e=a;for(var b=f.editable();(e=e.getParent())&&!e.equals(b);)if(e.getCustomData("bidi_processed")){a.removeStyle("direction");a.removeAttribute("dir");return}e=f.config.useComputedState;(e?a.getComputedStyle("direction"):
a.getStyle("direction")||a.hasAttribute("dir"))!=c&&(a.removeStyle("direction"),e?(a.removeAttribute("dir"),c!=a.getComputedStyle("direction")&&a.setAttribute("dir",c)):a.setAttribute("dir",c),f.forceNextSelectionCheck())}}function h(a,c,f){var e=a.getCommonAncestor(!1,!0);a=a.clone();a.enlarge(f==CKEDITOR.ENTER_BR?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(a.checkBoundaryOfElement(e,CKEDITOR.START)&&a.checkBoundaryOfElement(e,CKEDITOR.END)){for(var b;e&&e.type==CKEDITOR.NODE_ELEMENT&&
(b=e.getParent())&&1==b.getChildCount()&&!(e.getName()in c);)e=b;return e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in c&&e}}function g(a){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,d){var c=a.config.useComputedState,f;if(!c){f=d.lastElement;for(var e=a.editable();f&&!(f.getName()in k||f.equals(e));){var b=f.getParent();if(!b)break;f=b}}f=f||d.block||d.blockLimit;f.equals(a.editable())&&
(e=a.getSelection().getRanges()[0].getEnclosedNode())&&e.type==CKEDITOR.NODE_ELEMENT&&(f=e);f&&(c=c?f.getComputedStyle("direction"):f.getStyle("direction")||f.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=(d.block||d.blockLimit||a.editable()).getDirection(1);c!=(a._.selDir||a.lang.dir)&&(a._.selDir=c,a.fire("contentDirChanged",c))},exec:function(c){var f=
c.getSelection(),k=c.config.enterMode,g=f.getRanges();if(g&&g.length){for(var l={},w=f.createBookmarks(),g=g.createIterator(),B,r=0;B=g.getNextRange(1);){var y=B.getEnclosedNode();y&&(!y||y.type==CKEDITOR.NODE_ELEMENT&&y.getName()in m)||(y=h(B,e,k));y&&b(y,a,c,l);var z=new CKEDITOR.dom.walker(B),v=w[r].startNode,t=w[r++].endNode;z.evaluator=function(a){var d=k==CKEDITOR.ENTER_P?"p":"div",c;if(c=(a?a.type==CKEDITOR.NODE_ELEMENT:!1)&&a.getName()in e){if(d=a.is(d))d=(d=a.getParent())?d.type==CKEDITOR.NODE_ELEMENT:
!1;c=!(d&&a.getParent().is("blockquote"))}return!!(c&&a.getPosition(v)&CKEDITOR.POSITION_FOLLOWING&&(a.getPosition(t)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_CONTAINS)==CKEDITOR.POSITION_PRECEDING)};for(;y=z.next();)b(y,a,c,l);B=B.createIterator();for(B.enlargeBr=k!=CKEDITOR.ENTER_BR;y=B.getNextParagraph(k==CKEDITOR.ENTER_P?"p":"div");)b(y,a,c,l)}CKEDITOR.dom.element.clearAllMarkers(l);c.forceNextSelectionCheck();f.selectBookmarks(w);c.focus()}}}}function a(a){var c=a==l.setAttribute,f=a==l.removeAttribute,
e=/\bdirection\s*:\s*(.*?)\s*(:?$|;)/;return function(b,k){if(!this.isReadOnly()){var g;if(g=b==(c||f?"dir":"direction")||"style"==b&&(f||e.test(k))){a:{g=this;for(var h=g.getDocument().getBody().getParent();g;){if(g.equals(h)){g=!1;break a}g=g.getParent()}g=!0}g=!g}if(g&&(g=this.getDirection(1),h=a.apply(this,arguments),g!=this.getDirection(1)))return this.getDocument().fire("dirChanged",this),h}return a.apply(this,arguments)}}var e={table:1,ul:1,ol:1,blockquote:1,div:1},m={},k={};CKEDITOR.tools.extend(m,
e,{tr:1,p:1,div:1,li:1});CKEDITOR.tools.extend(k,m,{td:1});CKEDITOR.plugins.add("bidi",{init:function(a){function c(f,e,b,k,g){a.addCommand(b,new CKEDITOR.command(a,k));a.ui.addButton&&a.ui.addButton(f,{isToggle:!0,label:e,command:b,toolbar:"bidi,"+g})}if(!a.blockless){var f=a.lang.bidi;c("BidiLtr",f.ltr,"bidiltr",g("ltr"),10);c("BidiRtl",f.rtl,"bidirtl",g("rtl"),20);a.on("contentDom",function(){a.document.on("dirChanged",function(c){a.fire("dirChanged",{node:c.data,dir:c.data.getDirection(1)})})});
a.on("contentDirChanged",function(c){c=(a.lang.dir!=c.data?"add":"remove")+"Class";var f=a.ui.space(a.config.toolbarLocation);if(f)f[c]("cke_mixed_dir_content")})}}});for(var l=CKEDITOR.dom.element.prototype,c=["setStyle","removeStyle","setAttribute","removeAttribute"],f=0;f<c.length;f++)l[c[f]]=CKEDITOR.tools.override(l[c[f]],a)}(),function(){var b={exec:function(b){var g=b.getCommand("blockquote").state,a=b.getSelection(),e=a&&a.getRanges()[0];if(e){var m=a.createBookmarks();if(CKEDITOR.env.ie){var k=
m[0].startNode,l=m[0].endNode,c;if(k&&"blockquote"==k.getParent().getName())for(c=k;c=c.getNext();)if(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()){k.move(c,!0);break}if(l&&"blockquote"==l.getParent().getName())for(c=l;c=c.getPrevious();)if(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()){l.move(c);break}}var f=e.createIterator();f.enlargeBr=b.config.enterMode!=CKEDITOR.ENTER_BR;if(g==CKEDITOR.TRISTATE_OFF){for(k=[];g=f.getNextParagraph();)k.push(g);1>k.length&&(g=b.document.createElement(b.config.enterMode==
CKEDITOR.ENTER_P?"p":"div"),l=m.shift(),e.insertNode(g),g.append(new CKEDITOR.dom.text("﻿",b.document)),e.moveToBookmark(l),e.selectNodeContents(g),e.collapse(!0),l=e.createBookmark(),k.push(g),m.unshift(l));c=k[0].getParent();e=[];for(l=0;l<k.length;l++)g=k[l],c=c.getCommonAncestor(g.getParent());for(g={table:1,tbody:1,tr:1,ol:1,ul:1};g[c.getName()];)c=c.getParent();for(l=null;0<k.length;){for(g=k.shift();!g.getParent().equals(c);)g=g.getParent();g.equals(l)||e.push(g);l=g}for(;0<e.length;)if(g=
e.shift(),"blockquote"==g.getName()){for(l=new CKEDITOR.dom.documentFragment(b.document);g.getFirst();)l.append(g.getFirst().remove()),k.push(l.getLast());l.replace(g)}else k.push(g);e=b.document.createElement("blockquote");for(e.insertBefore(k[0]);0<k.length;)g=k.shift(),e.append(g)}else if(g==CKEDITOR.TRISTATE_ON){l=[];for(c={};g=f.getNextParagraph();){for(k=e=null;g.getParent();){if("blockquote"==g.getParent().getName()){e=g.getParent();k=g;break}g=g.getParent()}e&&k&&!k.getCustomData("blockquote_moveout")&&
(l.push(k),CKEDITOR.dom.element.setMarker(c,k,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(c);g=[];k=[];for(c={};0<l.length;)f=l.shift(),e=f.getParent(),f.getPrevious()?f.getNext()?(f.breakParent(f.getParent()),k.push(f.getNext())):f.remove().insertAfter(e):f.remove().insertBefore(e),e.getCustomData("blockquote_processed")||(k.push(e),CKEDITOR.dom.element.setMarker(c,e,"blockquote_processed",!0)),g.push(f);CKEDITOR.dom.element.clearAllMarkers(c);for(l=k.length-1;0<=l;l--){e=k[l];
a:{c=e;for(var f=0,d=c.getChildCount(),n=void 0;f<d&&(n=c.getChild(f));f++)if(n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()){c=!1;break a}c=!0}c&&e.remove()}if(b.config.enterMode==CKEDITOR.ENTER_BR)for(e=!0;g.length;)if(f=g.shift(),"div"==f.getName()){l=new CKEDITOR.dom.documentFragment(b.document);!e||!f.getPrevious()||f.getPrevious().type==CKEDITOR.NODE_ELEMENT&&f.getPrevious().isBlockBoundary()||l.append(b.document.createElement("br"));for(e=f.getNext()&&!(f.getNext().type==CKEDITOR.NODE_ELEMENT&&
f.getNext().isBlockBoundary());f.getFirst();)f.getFirst().remove().appendTo(l);e&&l.append(b.document.createElement("br"));l.replace(f);e=!1}}a.selectBookmarks(m);b.focus()}},refresh:function(b,g){this.setState(b.elementPath(g.block||g.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",b),h.ui.addButton&&
h.ui.addButton("Blockquote",{isToggle:!0,label:h.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})}(),"use strict",function(){function b(b,a){CKEDITOR.tools.extend(this,a,{editor:b,id:"cke-"+CKEDITOR.tools.getUniqueId(),area:b._.notificationArea});a.type||(this.type="info");this.element=this._createElement();b.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element)}function h(b){var a=this;this.editor=b;this.notifications=[];this.element=this._createElement();
this._uiBuffer=CKEDITOR.tools.eventsBuffer(10,this._layout,this);this._changeBuffer=CKEDITOR.tools.eventsBuffer(500,this._layout,this);b.on("destroy",function(){a._removeListeners();a.element.remove()})}CKEDITOR.plugins.add("notification",{init:function(b){function a(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)}b._.notificationArea=new h(b);b.showNotification=function(a,h,k){var l,c;"progress"==h?l=k:c=k;a=new CKEDITOR.plugins.notification(b,{message:a,type:h,progress:l,duration:c});a.show();return a};b.on("key",function(e){if(27==e.data.keyCode){var h=b._.notificationArea.notifications;h.length&&(a(b.lang.notification.closed),h[h.length-1].hide(),e.cancel())}})}});b.prototype={show:function(){!1!==this.editor.fire("notificationShow",{notification:this})&&(this.area.add(this),this._hideAfterTimeout())},
update:function(b){var a=!0;!1===this.editor.fire("notificationUpdate",{notification:this,options:b})&&(a=!1);var e=this.element,h=e.findOne(".cke_notification_message"),k=e.findOne(".cke_notification_progress"),l=b.type;e.removeAttribute("role");b.progress&&"progress"!=this.type&&(l="progress");l&&(e.removeClass(this._getClass()),e.removeAttribute("aria-label"),this.type=l,e.addClass(this._getClass()),e.setAttribute("aria-label",this.type),"progress"!=this.type||k?"progress"!=this.type&&k&&k.remove():
(k=this._createProgressElement(),k.insertBefore(h)));void 0!==b.message&&(this.message=b.message,h.setHtml(this.message));void 0!==b.progress&&(this.progress=b.progress,k&&k.setStyle("width",this._getPercentageProgress()));a&&b.important&&(e.setAttribute("role","alert"),this.isVisible()||this.area.add(this));this.duration=b.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 b=this,a,e,h=this.editor.lang.common.close;a=new CKEDITOR.dom.element("div");a.addClass("cke_notification");a.addClass(this._getClass());a.setAttributes({id:this.id,role:"alert","aria-label":this.type});"progress"==this.type&&a.append(this._createProgressElement());e=new CKEDITOR.dom.element("p");e.addClass("cke_notification_message");e.setHtml(this.message);a.append(e);e=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');a.append(e);e.on("click",function(){b.editor.focus();b.hide()});return a},_getClass:function(){return"progress"==this.type?"cke_notification_info":"cke_notification_"+this.type},_createProgressElement:function(){var b=new CKEDITOR.dom.element("span");b.addClass("cke_notification_progress");b.setStyle("width",this._getPercentageProgress());return b},_getPercentageProgress:function(){return Math.round(100*
(this.progress||0))+"%"},_hideAfterTimeout:function(){var b=this,a;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId);if("number"==typeof this.duration)a=this.duration;else if("info"==this.type||"success"==this.type)a="number"==typeof this.editor.config.notification_duration?this.editor.config.notification_duration:5E3;a&&(b._hideTimeoutId=setTimeout(function(){b.hide()},a))}};h.prototype={add:function(b){this.notifications.push(b);this.element.append(b.element);1==this.element.getChildCount()&&
(CKEDITOR.document.getBody().append(this.element),this._attachListeners());this._layout()},remove:function(b){var a=CKEDITOR.tools.indexOf(this.notifications,b);0>a||(this.notifications.splice(a,1),b.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var b=this.editor,a=b.config,e=new CKEDITOR.dom.element("div");e.addClass("cke_notifications_area");e.setAttribute("id","cke_notifications_area_"+b.name);e.setStyle("z-index",a.baseFloatZIndex-
2);return e},_attachListeners:function(){var b=CKEDITOR.document.getWindow(),a=this.editor;b.on("scroll",this._uiBuffer.input);b.on("resize",this._uiBuffer.input);a.on("change",this._changeBuffer.input);a.on("floatingSpaceLayout",this._layout,this,null,20);a.on("blur",this._layout,this,null,20)},_removeListeners:function(){var b=CKEDITOR.document.getWindow(),a=this.editor;b.removeListener("scroll",this._uiBuffer.input);b.removeListener("resize",this._uiBuffer.input);a.removeListener("change",this._changeBuffer.input);
a.removeListener("floatingSpaceLayout",this._layout);a.removeListener("blur",this._layout)},_layout:function(){function b(){a.setStyle("left",B(r+h.width-n-q))}var a=this.element,e=this.editor,h=e.ui.contentsElement.getClientRect(),k=e.ui.contentsElement.getDocumentPosition(),l,c,f=a.getClientRect(),d,n=this._notificationWidth,q=this._notificationMargin;d=CKEDITOR.document.getWindow();var u=d.getScrollPosition(),x=d.getViewPaneSize(),p=CKEDITOR.document.getBody(),w=p.getDocumentPosition(),B=CKEDITOR.tools.cssLength;
n&&q||(d=this.element.getChild(0),n=this._notificationWidth=d.getClientRect().width,q=this._notificationMargin=parseInt(d.getComputedStyle("margin-left"),10)+parseInt(d.getComputedStyle("margin-right"),10));e.toolbar&&(l=e.ui.space(e.config.toolbarLocation),c=l.getClientRect());l&&l.isVisible()&&c.bottom>h.top&&c.bottom<h.bottom-f.height?a.setStyles({position:"fixed",top:B(c.bottom)}):0<h.top?a.setStyles({position:"absolute",top:B(k.y)}):k.y+h.height-f.height>u.y?a.setStyles({position:"fixed",top:0}):
a.setStyles({position:"absolute",top:B(k.y+h.height-f.height)});var r="fixed"==a.getStyle("position")?h.left:"static"!=p.getComputedStyle("position")?k.x-w.x:k.x;h.width<n+q?k.x+n+q>u.x+x.width?b():a.setStyle("left",B(r)):k.x+n+q>u.x+x.width?a.setStyle("left",B(r)):k.x+h.width/2+n/2+q>u.x+x.width?a.setStyle("left",B(r-k.x+u.x+x.width-n-q)):0>h.left+h.width-n-q?b():0>h.left+h.width/2-n/2?a.setStyle("left",B(r-k.x+u.x)):a.setStyle("left",B(r+h.width/2-n/2-q/2))}};CKEDITOR.plugins.notification=b}(),
function(){var b='\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&&(b+=' onkeypress\x3d"return false;"');
CKEDITOR.env.gecko&&(b+=' 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 b=b+(' 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',g=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),a=CKEDITOR.addTemplate("button",b);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(e,b){function k(){var a=e.mode;a&&(a=this.modes[a]?void 0!==h[a]?h[a]:CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED,a=e.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:a,this.setState(a),this.refresh&&this.refresh())}var h=null,c=CKEDITOR.env,f=this._.id=CKEDITOR.tools.getNextId(),d="",n=this.command,q,u,x;this._.editor=e;var p={id:f,button:this,editor:e,focus:function(){CKEDITOR.document.getById(f).focus()},execute:function(){this.button.click(e)},attach:function(a){this.button.attach(a)}},w=CKEDITOR.tools.addFunction(function(a){if(p.onkey)return a=new CKEDITOR.dom.event(a),!1!==
p.onkey(p,a.getKeystroke())}),B=CKEDITOR.tools.addFunction(function(a){var d;p.onfocus&&(d=!1!==p.onfocus(p,new CKEDITOR.dom.event(a)));return d}),r=0;p.clickFn=q=CKEDITOR.tools.addFunction(function(){r&&(e.unlockSelection(1),r=0);p.execute();c.iOS&&e.focus()});this.modes?(h={},e.on("beforeModeUnload",function(){e.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(h[e.mode]=this._.state)},this),e.on("activeFilterChange",k,this),e.on("mode",k,this),!this.readOnly&&e.on("readOnly",k,this)):n&&(n=e.getCommand(n))&&
(n.on("state",function(){this.setState(n.state)},this),d+=n.state==CKEDITOR.TRISTATE_ON?"on":n.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var y;if(this.directional)e.on("contentDirChanged",function(a){var d=CKEDITOR.document.getById(this._.id),c=d.getFirst();a=a.data;a!=e.lang.dir?d.addClass("cke_"+a):d.removeClass("cke_ltr").removeClass("cke_rtl");c.setAttribute("style",CKEDITOR.skin.getIconStyle(y,"rtl"==a,this.icon,this.iconOffset))},this);n?(u=e.getCommandKeystroke(n))&&(x=CKEDITOR.tools.keystrokeToString(e.lang.common.keyboard,
u)):d+="off";u=this.name||this.command;var z=null,v=this.icon;y=u;this.icon&&!/\./.test(this.icon)?(y=this.icon,v=null):(this.icon&&(z=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(z=this.iconHiDpi));z?(CKEDITOR.skin.addIcon(z,z),v=null):z=y;d={id:f,name:u,iconName:y,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:d,ariaDisabled:"disabled"==d?"true":"false",title:this.title+(x?" ("+x.display+")":""),ariaShortcutSpace:x?"\x26nbsp;":"",ariaShortcut:x?e.lang.common.keyboardShortcut+
" "+x.aria:"",titleJs:c.gecko&&!c.hc?"":(this.title||"").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:w,focusFn:B,clickFn:q,style:CKEDITOR.skin.getIconStyle(z,"rtl"==e.lang.dir,v,this.iconOffset),arrowHtml:this.hasArrow?g.output():"",hasArrowAriaHtml:this.hasArrow?' aria-expanded\x3d"false"':"",toggleAriaHtml:this.isToggle?'aria-pressed\x3d"false"':""};a.output(d,b);if(this.onRender)this.onRender();return p},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 b(a){function b(){for(var d=k(),c=CKEDITOR.tools.clone(a.config.toolbarGroups)||h(a),f=0;f<c.length;f++){var m=c[f];if("/"!=m){"string"==typeof m&&(m=c[f]={name:m});var p,w=m.groups;if(w)for(var B=0;B<w.length;B++)p=w[B],(p=d[p])&&g(m,p);(p=d[m.name])&&g(m,p)}}return c}function k(){var d={},c,f,b;for(c in a.ui.items)f=a.ui.items[c],b=f.toolbar||"others",b=b.split(","),f=b[0],b=parseInt(b[1]||-1,10),d[f]||(d[f]=[]),d[f].push({name:c,
order:b});for(f in d)d[f]=d[f].sort(function(a,d){return a.order==d.order?0:0>d.order?-1:0>a.order?1:a.order<d.order?-1:1});return d}function g(d,c){if(c.length){d.items?d.items.push(a.ui.create("-")):d.items=[];for(var b;b=c.shift();)b="string"==typeof b?b:b.name,f&&-1!=CKEDITOR.tools.indexOf(f,b)||(b=a.ui.create(b))&&a.addFeature(b)&&d.items.push(b)}}function c(a){var d=[],c,f,e;for(c=0;c<a.length;++c)f=a[c],e={},"/"==f?d.push(f):CKEDITOR.tools.isArray(f)?(g(e,CKEDITOR.tools.clone(f)),d.push(e)):
f.items&&(g(e,CKEDITOR.tools.clone(f.items)),e.name=f.name,d.push(e));return d}var f=function(a){return a&&"string"===typeof a?a.split(","):a}(a.config.removeButtons),d=a.config.toolbar;"string"==typeof d&&(d=a.config["toolbar_"+d]);return a.toolbar=d?c(d):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 g=function(){this.toolbars=[]};g.prototype.focus=function(){for(var a=0,b;b=this.toolbars[a++];)for(var k=0,g;g=b.items[k++];)if(g.focus){g.focus();return}};var a={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(e){var h,k=function(a,c){var f,d="rtl"==e.lang.dir,b=e.config.toolbarGroupCycling,g=d?37:39,d=d?39:37,b=void 0===b||b;switch(c){case 9:case CKEDITOR.SHIFT+9:for(;!f||!f.items.length;)if(f=9==c?(f?f.next:a.toolbar.next)||e.toolbox.toolbars[0]:(f?f.previous:a.toolbar.previous)||e.toolbox.toolbars[e.toolbox.toolbars.length-1],f.items.length)for(a=f.items[h?f.items.length-
1:0];a&&!a.focus;)(a=h?a.previous:a.next)||(f=0);a&&a.focus();return!1;case g:f=a;do f=f.next,!f&&b&&(f=a.toolbar.items[0]);while(f&&!f.focus);f?f.focus():k(a,9);return!1;case 40:return a.button&&a.button.hasArrow?a.execute():k(a,40==c?g:d),!1;case d:case 38:f=a;do f=f.previous,!f&&b&&(f=a.toolbar.items[a.toolbar.items.length-1]);while(f&&!f.focus);f?f.focus():(h=1,k(a,CKEDITOR.SHIFT+9),h=0);return!1;case 27:return e.focus(),!1;case 13:case 32:return a.execute(),!1;case CKEDITOR.ALT+122:return e.execCommand("elementsPathFocus"),
!1}return!0};e.on("uiSpace",function(a){if(a.data.space==e.config.toolbarLocation){a.removeListener();e.toolbox=new g;var c=CKEDITOR.tools.getNextId(),f=['\x3cspan id\x3d"',c,'" class\x3d"cke_voice_label"\x3e',e.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+e.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',c,'" onmousedown\x3d"return false;"\x3e'],c=!1!==e.config.toolbarStartupExpanded,d,h;e.config.toolbarCanCollapse&&e.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&
f.push('\x3cspan class\x3d"cke_toolbox_main"'+(c?"\x3e":' style\x3d"display:none"\x3e'));for(var m=e.toolbox.toolbars,u=b(e),x=u.length,p=0;p<x;p++){var w,B=0,r,y=u[p],z="/"!==y&&("/"===u[p+1]||p==x-1),v;if(y)if(d&&(f.push("\x3c/span\x3e"),h=d=0),"/"===y)f.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{v=y.items||y;for(var t=0;t<v.length;t++){var C=v[t],D;if(C){var A=function(a){a=a.render(e,f);H=B.items.push(a)-1;0<H&&(a.previous=B.items[H-1],a.previous.next=a);a.toolbar=B;a.onkey=
k};if(C.type==CKEDITOR.UI_SEPARATOR)h=d&&C;else{D=!1!==C.canGroup;if(!B){w=CKEDITOR.tools.getNextId();B={id:w,items:[]};r=y.name&&(e.lang.toolbar.toolbarGroups[y.name]||y.name);f.push('\x3cspan id\x3d"',w,'" class\x3d"cke_toolbar'+(z?' cke_toolbar_last"':'"'),r?' aria-labelledby\x3d"'+w+'_label"':"",' role\x3d"toolbar"\x3e');r&&f.push('\x3cspan id\x3d"',w,'_label" class\x3d"cke_voice_label"\x3e',r,"\x3c/span\x3e");f.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var H=m.push(B)-1;
0<H&&(B.previous=m[H-1],B.previous.next=B)}D?d||(f.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),d=1):d&&(f.push("\x3c/span\x3e"),d=0);h&&(A(h),h=0);A(C)}}}d&&(f.push("\x3c/span\x3e"),h=d=0);B&&f.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}e.config.toolbarCanCollapse&&f.push("\x3c/span\x3e");if(e.config.toolbarCanCollapse&&e.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var F=CKEDITOR.tools.addFunction(function(){e.execCommand("toolbarCollapse")});
e.on("destroy",function(){CKEDITOR.tools.removeFunction(F)});e.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var d=a.ui.space("toolbar_collapser"),c=d.getPrevious(),f=a.ui.space("contents"),e=c.getParent(),b=parseInt(f.$.style.height,10),k=e.$.offsetHeight,g=d.hasClass("cke_toolbox_collapser_min");g?(c.show(),d.removeClass("cke_toolbox_collapser_min"),d.setAttribute("title",a.lang.toolbar.toolbarCollapse)):(c.hide(),d.addClass("cke_toolbox_collapser_min"),d.setAttribute("title",a.lang.toolbar.toolbarExpand));
d.getFirst().setText(g?"▲":"◀");f.setStyle("height",b-(e.$.offsetHeight-k)+"px");a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:f.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});e.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");f.push('\x3ca title\x3d"'+(c?e.lang.toolbar.toolbarCollapse:e.lang.toolbar.toolbarExpand)+'" id\x3d"'+e.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');
c||f.push(" cke_toolbox_collapser_min");f.push('" onclick\x3d"CKEDITOR.tools.callFunction('+F+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',"\x3c/a\x3e")}f.push("\x3c/span\x3e");a.data.html+=f.join("")}});e.on("destroy",function(){if(this.toolbox){var a,c=0,f,d,e;for(a=this.toolbox.toolbars;c<a.length;c++)for(d=a[c].items,f=0;f<d.length;f++)e=d[f],e.clickFn&&CKEDITOR.tools.removeFunction(e.clickFn),e.keyDownFn&&CKEDITOR.tools.removeFunction(e.keyDownFn)}});e.on("uiReady",function(){var a=
e.ui.space("toolbox");a&&e.focusManager.add(a,1)});e.addCommand("toolbarFocus",a);e.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");e.ui.add("-",CKEDITOR.UI_SEPARATOR,{});e.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(a,c){c.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(a,b,k){var g=h(this.editor),c=0===b,f={name:a};if(k){if(k=CKEDITOR.tools.search(g,function(a){return a.name==
k})){!k.groups&&(k.groups=[]);if(b&&(b=CKEDITOR.tools.indexOf(k.groups,b),0<=b)){k.groups.splice(b+1,0,a);return}c?k.groups.splice(0,0,a):k.groups.push(a);return}b=null}b&&(b=CKEDITOR.tools.indexOf(g,function(a){return a.name==b}));c?g.splice(0,0,a):"number"==typeof b?g.splice(b+1,0,f):g.push(a)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top","use strict",function(){function b(a,c,f){c.type||(c.type="auto");if(f&&!1===a.fire("beforePaste",c)||!c.dataValue&&c.dataTransfer.isEmpty())return!1;
c.dataValue||(c.dataValue="");if(CKEDITOR.env.gecko&&"drop"==c.method&&a.toolbox)a.once("afterPaste",function(){a.toolbox.focus();a.focus()});return a.fire("paste",c)}function h(a){function c(){var f=a.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var e=function(c){a.getSelection().isCollapsed()||(a.readOnly&&"cut"==c.name||D.initPasteDataTransfer(c,a),c.data.preventDefault())};f.on("copy",e);f.on("cut",e);f.on("cut",function(){a.readOnly||a.extractSelectedHtml()},null,null,999)}f.on(D.mainPasteEvent,
function(a){"beforepaste"==D.mainPasteEvent&&A||v(a)});"beforepaste"==D.mainPasteEvent&&(f.on("paste",function(a){H||(k(),a.data.preventDefault(),v(a),h("paste"))}),f.on("contextmenu",g,null,null,0),f.on("beforepaste",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||g()},null,null,0));f.on("beforecut",function(){!A&&l(a)});var b;f.attachListener(CKEDITOR.env.ie?f:a.document.getDocumentElement(),"mouseup",function(){b=setTimeout(t,0)});a.on("destroy",function(){clearTimeout(b)});f.on("keyup",
t)}function f(c){return{type:c,canUndo:"cut"==c,startDisabled:!0,fakeKeystroke:"cut"==c?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==this.type&&l();var c;var f=this.type;if(CKEDITOR.env.ie)c=h(f);else try{c=a.document.$.execCommand(f,!1,null)}catch(e){c=!1}c||a.showNotification(a.lang.clipboard[this.type+"Error"]);return c}}}function e(){return{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(a,d){function c(d,k){k="undefined"!==typeof k?k:!0;d?(d.method="paste",d.dataTransfer||
(d.dataTransfer=D.initPasteDataTransfer()),b(a,d,k)):e&&!a._.forcePasteDialog&&a.showNotification(h,"info",a.config.clipboard_notificationDuration);a._.forcePasteDialog=!1;a.fire("afterCommandExec",{name:"paste",command:f,returnValue:!!d})}d="undefined"!==typeof d&&null!==d?d:{};var f=this,e="undefined"!==typeof d.notification?d.notification:!0,k=d.type,g=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,a.getCommandKeystroke(this)),h="string"===typeof e?e:a.lang.clipboard.pasteNotification.replace(/%1/,
'\x3ckbd aria-label\x3d"'+g.aria+'"\x3e'+g.display+"\x3c/kbd\x3e"),g="string"===typeof d?d:d.dataValue;k&&!0!==a.config.forcePasteAsPlainText&&"allow-word"!==a.config.forcePasteAsPlainText?a._.nextPasteType=k:delete a._.nextPasteType;"string"===typeof g?c({dataValue:g}):a.getClipboardData(c)}}}function k(){H=1;setTimeout(function(){H=0},100)}function g(){A=1;setTimeout(function(){A=0},10)}function h(c){var f=a.document,e=f.getBody(),b=!1,k=function(){b=!0};e.on(c,k);7<CKEDITOR.env.version?f.$.execCommand(c):
f.$.selection.createRange().execCommand(c);e.removeListener(c,k);return b}function l(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var c=a.getSelection(),f,e,b;c.getType()==CKEDITOR.SELECTION_ELEMENT&&(f=c.getSelectedElement())&&(e=c.getRanges()[0],b=a.document.createText(""),b.insertBefore(f),e.setStartBefore(b),e.setEndAfter(f),c.selectRanges([e]),setTimeout(function(){f.getParent()&&(b.remove(),c.selectElement(f))},0))}}function m(c,f){var e=a.document,b=a.editable(),k=function(a){a.cancel()},g;
if(!e.getById("cke_pastebin")){var h=a.getSelection(),l=h.createBookmarks();CKEDITOR.env.ie&&h.root.fire("selectionchange");var n=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!b.is("body")||CKEDITOR.env.ie?"div":"body",e);n.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var q=0,e=e.getWindow();CKEDITOR.env.webkit?(b.append(n),n.addClass("cke_editable"),b.is("body")||(q="static"!=b.getComputedStyle("position")?b:CKEDITOR.dom.element.get(b.$.offsetParent),q=q.getDocumentPosition().y)):b.getAscendant(CKEDITOR.env.ie?
"body":"html",1).append(n);n.setStyles({position:"absolute",top:e.getScrollPosition().y-q+10+"px",width:"1px",height:Math.max(1,e.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&n.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));(q=n.getParent().isReadOnly())?(n.setOpacity(0),n.setAttribute("contenteditable",!0)):n.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-10000px");a.on("selectionChange",k,null,null,0);if(CKEDITOR.env.webkit||
CKEDITOR.env.gecko)g=b.once("blur",k,null,null,-100);q&&n.focus();q=new CKEDITOR.dom.range(n);q.selectNodeContents(n);var t=q.select();CKEDITOR.env.ie&&(g=b.once("blur",function(){a.lockSelection(t)}));var r=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=r);g&&g.removeListener();CKEDITOR.env.ie&&b.focus();h.selectBookmarks(l);n.remove();var c;CKEDITOR.env.webkit&&(c=n.getFirst())&&c.is&&c.hasClass("Apple-style-span")&&
(n=c);a.removeListener("selectionChange",k);f(n.getHtml())},0)}}function y(){if("paste"==D.mainPasteEvent)return a.fire("beforePaste",{type:"auto",method:"paste"}),!1;a.focus();k();var c=a.focusManager;c.lock();if(a.editable().fire(D.mainPasteEvent)&&!h("paste"))return c.unlock(),!1;c.unlock();return!0}function z(c){if("wysiwyg"==a.mode)switch(c.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:c=a.editable();k();"paste"==D.mainPasteEvent&&c.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+
46:a.fire("saveSnapshot"),setTimeout(function(){a.fire("saveSnapshot")},50)}}function v(c){var f={type:"auto",method:"paste",dataTransfer:D.initPasteDataTransfer(c)};f.dataTransfer.cacheData();var e=!1!==a.fire("beforePaste",f);e&&D.canClipboardApiBeTrusted(f.dataTransfer,a)?(c.data.preventDefault(),setTimeout(function(){b(a,f)},0)):m(c,function(c){f.dataValue=c.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");e&&b(a,f)})}function t(){if("wysiwyg"==a.mode){var c=C("paste");a.getCommand("cut").setState(C("cut"));
a.getCommand("copy").setState(C("copy"));a.getCommand("paste").setState(c);a.fire("pasteState",c)}}function C(c){var f=a.getSelection(),f=f&&f.getRanges()[0];if((a.readOnly||f&&f.checkReadOnly())&&c in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==c)return CKEDITOR.TRISTATE_OFF;c=a.getSelection();f=c.getRanges();return c.getType()==CKEDITOR.SELECTION_NONE||1==f.length&&f[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var D=CKEDITOR.plugins.clipboard,A=0,H=0;(function(){a.on("key",
z);a.on("contentDom",c);a.on("selectionChange",t);if(a.contextMenu){a.contextMenu.addListener(function(){return{cut:C("cut"),copy:C("copy"),paste:C("paste")}});var f=null;a.on("menuShow",function(){f&&(f.removeListener(),f=null);var c=a.contextMenu.findItemByCommandName("paste");c&&c.element&&(f=c.element.on("touchend",function(){a._.forcePasteDialog=!0}))})}if(a.ui.addButton)a.once("instanceReady",function(){a._.pasteButtons&&CKEDITOR.tools.array.forEach(a._.pasteButtons,function(c){if(c=a.ui.get(c))if(c=
CKEDITOR.document.getById(c._.id))c.on("touchend",function(){a._.forcePasteDialog=!0})})})})();(function(){function c(f,e,b,k,g){var h=a.lang.clipboard[e];a.addCommand(e,b);a.ui.addButton&&a.ui.addButton(f,{label:h,command:e,toolbar:"clipboard,"+k});a.addMenuItems&&a.addMenuItem(e,{label:h,command:e,group:"clipboard",order:g})}c("Cut","cut",f("cut"),10,1);c("Copy","copy",f("copy"),20,4);c("Paste","paste",e(),30,8);a._.pasteButtons||(a._.pasteButtons=[]);a._.pasteButtons.push("Paste")})();a.getClipboardData=
function(c,f){function e(a){a.removeListener();a.cancel();f(a.data)}function b(a){a.removeListener();a.cancel();f({type:g,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var k=!1,g="auto";f||(f=c,c=null);a.on("beforePaste",function(a){a.removeListener();k=!0;g=a.data.type},null,null,1E3);a.on("paste",e,null,null,0);!1===y()&&(a.removeListener("paste",e),a._.forcePasteDialog&&k&&a.fire("pasteDialog")?(a.on("pasteDialogCommit",b),a.on("dialogHide",function(a){a.removeListener();
a.data.removeListener("pasteDialogCommit",b);a.data._.committed||f(null)})):f(null))}}function g(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 a(a,c){function f(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",
~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}c=c.replace(/(?!\u3000)\s+/g," ").replace(/> +</g,"\x3e\x3c").replace(/<br ?\/>/gi,"\x3cbr\x3e");c=c.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(c.match(/^[^<]$/))return c;CKEDITOR.env.webkit&&-1<c.indexOf("\x3cdiv\x3e")&&(c=c.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"\x3cbr\x3e").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"),c.match(/<div>(<br>|)<\/div>/)&&(c="\x3cp\x3e"+c.replace(/(<div>(<br>|)<\/div>)+/g,
function(a){return f(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),c=c.replace(/<\/div><div>/g,"\x3cbr\x3e"),c=c.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(c=c.replace(/^<br><br>$/,"\x3cbr\x3e")),-1<c.indexOf("\x3cbr\x3e\x3cbr\x3e")&&(c="\x3cp\x3e"+c.replace(/(<br>){2,}/g,function(a){return f(a.length/4)})+"\x3c/p\x3e"));return k(a,c)}function e(a){function c(){var a={},d;for(d in CKEDITOR.dtd)"$"!=d.charAt(0)&&"div"!=d&&"span"!=
d&&(a[d]=1);return a}var f={};return{get:function(e){return"plain-text"==e?f.plainText||(f.plainText=new CKEDITOR.filter(a,"br")):"semantic-content"==e?((e=f.semanticContent)||(e=new CKEDITOR.filter(a,{}),e.allow({$1:{elements:c(),attributes:!0,styles:!1,classes:!1}}),e=f.semanticContent=e),e):e?new CKEDITOR.filter(a,e):null}}}function m(a,c,f){c=CKEDITOR.htmlParser.fragment.fromHtml(c);var e=new CKEDITOR.htmlParser.basicWriter;f.applyTo(c,!0,!1,a.activeEnterMode);c.writeHtml(e);return e.getHtml()}
function k(a,c){a.enterMode==CKEDITOR.ENTER_BR?c=c.replace(/(<\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(c=c.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return c}function l(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function c(a){var c=CKEDITOR.plugins.clipboard;a.on("contentDom",function(){function f(c,e,k){e.select();b(a,{dataTransfer:k,method:"drop"},1);k.sourceEditor.fire("saveSnapshot");
k.sourceEditor.editable().extractHtmlFromRange(c);k.sourceEditor.getSelection().selectRanges([c]);k.sourceEditor.fire("saveSnapshot")}function e(f,k){f.select();b(a,{dataTransfer:k,method:"drop"},1);c.resetDragDataTransfer()}function k(c,f,e){var b={$:c.data.$,target:c.data.getTarget()};f&&(b.dragRange=f);e&&(b.dropRange=e);!1===a.fire(c.name,b)&&c.data.preventDefault()}function g(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}var h=a.editable(),l=CKEDITOR.plugins.clipboard.getDropTarget(a),
m=a.ui.space("top"),y=a.ui.space("bottom");c.preventDefaultDropOnElement(m);c.preventDefaultDropOnElement(y);h.attachListener(l,"dragstart",k);h.attachListener(a,"dragstart",c.resetDragDataTransfer,c,null,1);h.attachListener(a,"dragstart",function(f){c.initDragDataTransfer(f,a)},null,null,2);h.attachListener(a,"dragstart",function(){var f=c.dragRange=a.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(c.dragStartContainerChildCount=f?g(f.startContainer):null,c.dragEndContainerChildCount=
f?g(f.endContainer):null)},null,null,100);h.attachListener(l,"dragend",k);h.attachListener(a,"dragend",c.initDragDataTransfer,c,null,1);h.attachListener(a,"dragend",c.resetDragDataTransfer,c,null,100);h.attachListener(l,"dragover",function(a){if(CKEDITOR.env.edge)a.data.preventDefault();else{var d=a.data.getTarget();d&&d.is&&d.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()}});
h.attachListener(l,"drop",function(f){if(!f.data.$.defaultPrevented&&(f.data.preventDefault(),!a.readOnly)){var e=f.data.getTarget();if(!e.isReadOnly()||e.type==CKEDITOR.NODE_ELEMENT&&e.is("html")){var e=c.getRangeAtDropPosition(f,a),b=c.dragRange;e&&k(f,b,e)}}},null,null,9999);h.attachListener(a,"drop",c.initDragDataTransfer,c,null,1);h.attachListener(a,"drop",function(b){if(b=b.data){var k=b.dropRange,g=b.dragRange,h=b.dataTransfer;h.getTransferType(a)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){c.internalDrop(g,
k,h,a)},0):h.getTransferType(a)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?f(g,k,h):e(k,h)}},null,null,9999)})}var f;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",_supportedFileMatchers:[],init:function(d){function f(a){return-1!==CKEDITOR.tools.indexOf(["image/png","image/jpeg","image/gif"],a.type)}function b(a){return CKEDITOR.tools.array.some(d.plugins.clipboard._supportedFileMatchers,function(d){return d(a)})}function k(a){a.length&&(a=CKEDITOR.tools.array.unique(a),a=CKEDITOR.tools.array.filter(a,
function(a){return!!CKEDITOR.tools.trim(a)}),a=l(a.join(", ")),d.showNotification(a,"info",d.config.clipboard_notificationDuration))}function l(a){return a?d.lang.clipboard.fileFormatNotSupportedNotification.replace(/\${formats\}/g,"\x3cem\x3e"+a+"\x3c/em\x3e"):d.lang.clipboard.fileWithoutFormatNotSupportedNotification}function p(a,d){return CKEDITOR.env.ie&&a.data.fileTransferCancel||!(CKEDITOR.env.ie||d&&y!==d.id)?!1:d.isFileTransfer()&&1===d.getFilesCount()}var w,B=e(d);d.config.forcePasteAsPlainText?
w="plain-text":d.config.pasteFilter?w=d.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in d.config||(w="semantic-content");d.pasteFilter=B.get(w);h(d);c(d);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));var r=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||CKEDITOR.plugins.clipboard.isFileApiSupported,y;CKEDITOR.plugins.clipboard.addFileMatcher(d,f);d.on("paste",function(a){if(r){var d=a.data;a=d.dataTransfer;if(!d.dataValue){for(var d=[],c=0;c<a.getFilesCount();c++){var f=
a.getFile(c);b(f)||d.push(f.type)}k(d)}}},null,null,1);d.on("paste",function(a){if(r&&d.config.clipboard_handleImages){var c=a.data,e=c.dataTransfer;if(!c.dataValue&&p(a,e)&&(e=e.getFile(0),f(e))){var b=new FileReader;b.addEventListener("load",function(){a.data.dataValue='\x3cimg src\x3d"'+b.result+'" /\x3e';d.fire("paste",a.data)},!1);b.addEventListener("abort",function(){CKEDITOR.env.ie&&(a.data.fileTransferCancel=!0);d.fire("paste",a.data)},!1);b.addEventListener("error",function(){CKEDITOR.env.ie&&
(a.data.fileTransferCancel=!0);d.fire("paste",a.data)},!1);b.readAsDataURL(e);y=c.dataTransfer.id;a.stop()}}},null,null,1);d.on("paste",function(a){a.data.dataTransfer||(a.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!a.data.dataValue){var c=a.data.dataTransfer,f=c.getData("text/html");if(f)a.data.dataValue=f,a.data.type="html";else if(f=c.getData("text/plain"))a.data.dataValue=d.editable().transformPlainTextToHtml(f),a.data.type="text"}},null,null,1);d.on("paste",function(a){var d=
a.data.dataValue,c=CKEDITOR.dtd.$block;-1<d.indexOf("Apple-")&&(d=d.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi," "),"html"!=a.data.type&&(d=d.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(a,d){return d.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1<d.indexOf('\x3cbr class\x3d"Apple-interchange-newline"\x3e')&&(a.data.startsWithEOL=1,a.data.preSniffing="html",d=d.replace(/<br class="Apple-interchange-newline">/,"")),d=d.replace(/(<[^>]+) class="Apple-[^"]*"/gi,
"$1"));if(d.match(/^<[^<]+cke_(editable|contents)/i)){var f,e,b=new CKEDITOR.dom.element("div");for(b.setHtml(d);1==b.getChildCount()&&(f=b.getFirst())&&f.type==CKEDITOR.NODE_ELEMENT&&(f.hasClass("cke_editable")||f.hasClass("cke_contents"));)b=e=f;e&&(d=e.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?d=d.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(d,f){return f.toLowerCase()in c?(a.data.preSniffing="html","\x3c"+f):d}):CKEDITOR.env.webkit?d=d.replace(/<\/(\w+)><div><br><\/div>$/,function(d,f){return f in
c?(a.data.endsWithEOL=1,"\x3c/"+f+"\x3e"):d}):CKEDITOR.env.gecko&&(d=d.replace(/(\s)<br>$/,"$1"));a.data.dataValue=d},null,null,3);d.on("paste",function(c){c=c.data;var f=d._.nextPasteType||c.type,e=c.dataValue,b,k=d.config.clipboard_defaultContentType||"html",h=c.dataTransfer.getTransferType(d)==CKEDITOR.DATA_TRANSFER_EXTERNAL,l=!0===d.config.forcePasteAsPlainText;b="html"==f||"html"==c.preSniffing?"html":g(e);delete d._.nextPasteType;"htmlifiedtext"==b&&(e=a(d.config,e));if("text"==f&&"html"==b)e=
m(d,e,B.get("plain-text"));else if(h&&d.pasteFilter&&!c.dontFilter||l)e=m(d,e,d.pasteFilter);c.startsWithEOL&&(e='\x3cbr data-cke-eol\x3d"1"\x3e'+e);c.endsWithEOL&&(e+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==f&&(f="html"==b||"html"==k?"html":"text");c.type=f;c.dataValue=e;delete c.preSniffing;delete c.startsWithEOL;delete c.endsWithEOL},null,null,6);d.on("paste",function(a){a=a.data;a.dataValue&&(d.insertHtml(a.dataValue,a.type,a.range),setTimeout(function(){d.fire("afterPaste")},0))},null,null,
1E3);d.on("pasteDialog",function(a){setTimeout(function(){d.openDialog("paste",a.data)},0)})}});CKEDITOR.plugins.clipboard={addFileMatcher:function(a,c){a.plugins.clipboard._supportedFileMatchers.push(c)},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,c,f){a.ui.addButton&&(a.ui.addButton(c,f),a._.pasteButtons||(a._.pasteButtons=[]),a._.pasteButtons.push(c))},canClipboardApiBeTrusted:function(a,c){return a.getTransferType(c)!=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 c=a.editable();return CKEDITOR.env.ie&&9>CKEDITOR.env.version||c.isInline()?c:a.document},fixSplitNodesAfterDrop:function(a,c,f,e){function b(a,d,f){var e=a;e.type==CKEDITOR.NODE_TEXT&&(e=a.getParent());if(e.equals(d)&&f!=d.getChildCount())return a=c.startContainer.getChild(c.startOffset-1),d=c.startContainer.getChild(c.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&d&&d.type==CKEDITOR.NODE_TEXT&&(f=a.getLength(),a.setText(a.getText()+d.getText()),d.remove(),c.setStart(a,
f),c.collapse(!0)),!0}var k=c.startContainer;"number"==typeof e&&"number"==typeof f&&k.type==CKEDITOR.NODE_ELEMENT&&(b(a.startContainer,k,f)||b(a.endContainer,k,e))},isDropRangeAffectedByDragRange:function(a,c){var f=c.startContainer,e=c.endOffset;return a.endContainer.equals(f)&&a.endOffset<=e||a.startContainer.getParent().equals(f)&&a.startContainer.getIndex()<e||a.endContainer.getParent().equals(f)&&a.endContainer.getIndex()<e?!0:!1},internalDrop:function(a,c,f,e){var k=CKEDITOR.plugins.clipboard,
g=e.editable(),h,l;e.fire("saveSnapshot");e.fire("lockSnapshot",{dontUpdate:1});CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(a,c,k.dragStartContainerChildCount,k.dragEndContainerChildCount);(l=this.isDropRangeAffectedByDragRange(a,c))||(h=a.createBookmark(!1));k=c.clone().createBookmark(!1);l&&(h=a.createBookmark(!1));a=h.startNode;c=h.endNode;l=k.startNode;c&&a.getPosition(l)&CKEDITOR.POSITION_PRECEDING&&c.getPosition(l)&CKEDITOR.POSITION_FOLLOWING&&l.insertBefore(a);a=e.createRange();
a.moveToBookmark(h);g.extractHtmlFromRange(a,1);c=e.createRange();k.startNode.getCommonAncestor(g)||(k=e.getSelection().createBookmarks()[0]);c.moveToBookmark(k);b(e,{dataTransfer:f,method:"drop",range:c},1);e.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,c){var f=a.data.$,e=f.clientX,b=f.clientY,k=c.getSelection(!0).getRanges()[0],g=c.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&c.document.$.caretRangeFromPoint(e,b))f=c.document.$.caretRangeFromPoint(e,
b),g.setStart(CKEDITOR.dom.node(f.startContainer),f.startOffset),g.collapse(!0);else if(f.rangeParent)g.setStart(CKEDITOR.dom.node(f.rangeParent),f.rangeOffset),g.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&k&&c.editable().hasFocus)return k;if(document.body.createTextRange){c.focus();f=c.document.getBody().$.createTextRange();try{for(var h=!1,l=0;20>l&&!h;l++){if(!h)try{f.moveToPoint(e,b-l),h=!0}catch(m){}if(!h)try{f.moveToPoint(e,b+l),h=!0}catch(z){}}if(h){var v="cke-temp-"+(new Date).getTime();
f.pasteHTML('\x3cspan id\x3d"'+v+'"\x3e​\x3c/span\x3e');var t=c.document.getById(v);g.moveToPosition(t,CKEDITOR.POSITION_BEFORE_START);t.remove()}else{var C=c.document.$.elementFromPoint(e,b),D=new CKEDITOR.dom.element(C),A;if(D.equals(c.editable())||"html"==D.getName())return k&&k.startContainer&&!k.startContainer.equals(c.editable())?k:null;A=D.getClientRect();e<A.left?g.setStartAt(D,CKEDITOR.POSITION_AFTER_START):g.setStartAt(D,CKEDITOR.POSITION_BEFORE_END);g.collapse(!0)}}catch(H){return null}}else return null}return g},
initDragDataTransfer:function(a,c){var f=a.data.$?a.data.$.dataTransfer:null,e=new this.dataTransfer(f,c);"dragstart"===a.name&&e.storeId();f?this.dragData&&e.id==this.dragData.id?e=this.dragData:this.dragData=e:this.dragData?e=this.dragData:this.dragData=e;a.data.dataTransfer=e},resetDragDataTransfer:function(){this.dragData=null},initPasteDataTransfer:function(a,c){if(this.isCustomCopyCutSupported){if(a&&a.data&&a.data.$){var f=a.data.$.clipboardData,e=new this.dataTransfer(f,c);"copy"!==a.name&&
"cut"!==a.name||e.storeId();this.copyCutData&&e.id==this.copyCutData.id?(e=this.copyCutData,e.$=f):this.copyCutData=e;return e}return new this.dataTransfer(null,c)}return new this.dataTransfer(CKEDITOR.env.edge&&a&&a.data.$&&a.data.$.clipboardData||null,c)},preventDefaultDropOnElement:function(a){a&&a.on("dragover",l)}};f=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?"cke/id":"Text";CKEDITOR.plugins.clipboard.dataTransfer=function(a,c){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(f);this.id||(this.id="Text"==f?"":"cke-"+CKEDITOR.tools.getUniqueId());c&&(this.sourceEditor=c,this.setData("text/html",c.getSelectedHtml(1)),"Text"==f||this.getData("text/plain")||this.setData("text/plain",c.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,c){a=this._.normalizeType(a);var f="text/html"==a&&c?this._.nativeHtmlCache:this._.data[a];if(void 0===f||null===f||""===f){if(this._.fallbackDataTransfer.isRequired())f=this._.fallbackDataTransfer.getData(a,c);else try{f=this.$.getData(a)||""}catch(e){f=""}"text/html"!=a||c||(f=this._stripHtml(f))}"Text"==a&&CKEDITOR.env.gecko&&
this.getFilesCount()&&"file://"==f.substring(0,7)&&(f="");if("string"===typeof f)var b=f.indexOf("\x3c/html\x3e"),f=-1!==b?f.substring(0,b+7):f;return f},setData:function(a,c){a=this._.normalizeType(a);"text/html"==a?(this._.data[a]=this._stripHtml(c),this._.nativeHtmlCache=c):this._.data[a]=c;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a)if("Text"==f&&"Text"==a&&(this.id=c),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,c);else try{this.$.setData(a,
c)}catch(e){}},storeId:function(){"Text"!==f&&this.setData(f,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(d){d=c._.normalizeType(d);var f=c.getData(d);"text/html"==d&&(c._.nativeHtmlCache=c.getData(d,!0),f=c._stripHtml(f));f&&(c._.data[d]=f);c._.types.push(d)}if(this.$){var c=this,f,e,b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(f=
0;f<this.$.types.length;f++)a(this.$.types[f])}else a("Text"),a("URL");e=this._getImageFromClipboard();if((b=this.$&&this.$.files||null)||e){this._.files=[];if(b&&b.length)for(f=0;f<b.length;f++)this._.files.push(b[f]);0===this._.files.length&&e&&this._.files.push(e)}}},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 c=this.$&&this.$.files||null;return c&&c.length?c[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={},c;if(this.getFilesCount())return!1;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(this._.data),function(c){a[c]=1});if(this.$)if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(var e=
0;e<this.$.types.length;e++)a[this.$.types[e]]=1}else a.Text=1,a.URL=1;"Text"!=f&&(a[f]=0);for(c in a)if(a[c]&&""!==this.getData(c))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(c){}},_stripHtml:function(a){function c(a){var d=new CKEDITOR.htmlParser,f,e;d.onTagOpen=function(a){"body"===
a&&(f=d._.htmlPartsRegex.lastIndex)};d.onTagClose=function(a){"body"===a&&(e=d._.htmlPartsRegex.lastIndex)};d.parse(a);return"number"!==typeof f||"number"!==typeof e?a:a.substring(f,e).replace(/<\/body\s*>$/gi,"")}a&&a.length&&(a=c(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,c=this._dataTransfer.$;if(null===a._isCustomMimeTypeSupported)if(c){a._isCustomMimeTypeSupported=!1;if(CKEDITOR.env.edge&&17<=CKEDITOR.env.version)return!0;try{c.setData("cke/mimetypetest","cke test value"),a._isCustomMimeTypeSupported="cke test value"===c.getData("cke/mimetypetest"),c.clearData("cke/mimetypetest")}catch(f){}}else return!1;
return!a._isCustomMimeTypeSupported},getData:function(a,c){var f=this._getData(this._customDataFallbackType,!0);if(c)return f;var f=this._extractDataComment(f),e=null,e=a===this._customDataFallbackType?f.content:f.data&&f.data[a]?f.data[a]:this._getData(a,!0);return null!==e?e:""},setData:function(a,c){var f=a===this._customDataFallbackType;f&&(c=this._applyDataComment(c,this._getFallbackTypeData()));var e=c,b=this._dataTransfer.$;try{b.setData(a,e),f&&(this._dataTransfer._.nativeHtmlCache=e)}catch(k){if(this._isUnsupportedMimeTypeError(k)){f=
CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(f._customTypes,a)&&f._customTypes.push(a);var f=this._getFallbackTypeContent(),g=this._getFallbackTypeData();g[a]=e;try{e=this._applyDataComment(f,g),b.setData(this._customDataFallbackType,e),this._dataTransfer._.nativeHtmlCache=e}catch(h){e=""}}}return e},_getData:function(a,c){var f=this._dataTransfer._.data;if(!c&&f[a])return f[a];try{return this._dataTransfer.$.getData(a)}catch(e){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,c=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).data||{},f=this._dataTransfer._.data;CKEDITOR.tools.array.forEach(a,function(a){void 0!==f[a]?c[a]=f[a]:void 0!==c[a]&&(c[a]=c[a])},this);return c},_isUnsupportedMimeTypeError:function(a){return a.message&&
-1!==a.message.search(/element not found/gi)},_extractDataComment:function(a){var c={data:null,content:a||""};if(a&&16<a.length){var f;(f=/\x3c!--cke-data:(.*?)--\x3e/g.exec(a))&&f[1]&&(c.data=JSON.parse(decodeURIComponent(f[1])),c.content=a.replace(f[0],""))}return c},_applyDataComment:function(a,c){var f="";c&&CKEDITOR.tools.object.keys(c).length&&(f="\x3c!--cke-data:"+encodeURIComponent(JSON.stringify(c))+"--\x3e");return f+(a&&a.length?a:"")}}}(),CKEDITOR.config.clipboard_notificationDuration=
1E4,CKEDITOR.config.clipboard_handleImages=!0,CKEDITOR.plugins.add("panelbutton",{requires:"button",onLoad:function(){function b(b){var g=this._;g.state!=CKEDITOR.TRISTATE_DISABLED&&(this.createPanel(b),g.on?g.panel.hide():g.panel.showBlock(this._.id,this.document.getById(this._.id),4))}CKEDITOR.ui.panelButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(h){var g=h.panel||{};delete h.panel;this.base(h);this.document=g.parent&&g.parent.getDocument()||CKEDITOR.document;g.block={attributes:g.attributes};
g.toolbarRelated=!0;this.hasArrow="listbox";this.click=b;this._={panelDefinition:g}},statics:{handler:{create:function(b){return new CKEDITOR.ui.panelButton(b)}}},proto:{createPanel:function(b){var g=this._;if(!g.panel){var a=this._.panelDefinition,e=this._.panelDefinition.block,m=a.parent||CKEDITOR.document.getBody(),k=CKEDITOR.document.getById(this._.id),l=this._.panel=new CKEDITOR.ui.floatPanel(b,m,a),a=l.addBlock(g.id,e),c=this,f=b.getCommand(this.command);l.onShow=function(){c.className&&this.element.addClass(c.className+
"_panel");c.setState(CKEDITOR.TRISTATE_ON);k.setAttribute("aria-expanded","true");g.on=1;c.editorFocus&&b.focus();if(c.onOpen)c.onOpen()};l.onHide=function(a){c.className&&this.element.getFirst().removeClass(c.className+"_panel");!c.modes&&f?c.setStateFromCommand(f):c.setState(c.modes&&c.modes[b.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);g.on=0;k.setAttribute("aria-expanded","false");if(!a&&c.onClose)c.onClose()};l.onEscape=function(){l.hide(1);c.document.getById(g.id).focus()};if(this.onBlock)this.onBlock(l,
a);a.onHide=function(){g.on=0;!c.modes&&c.command?c.setStateFromCommand(f):c.setState(CKEDITOR.TRISTATE_OFF)}}},setStateFromCommand:function(b){this.setState(b.state)}}})},beforeInit:function(b){b.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,e){e&&CKEDITOR.tools.extend(this,
e);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 b=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'),g=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(a,e){var m={editorId:a.id,id:this.id,
langCode:a.langCode,dir:a.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":a.config.baseFloatZIndex+1};this.getHolderElement=function(){var a=this._.holder;if(!a){if(this.isFramed){var a=this.document.getById(this.id+"_frame"),c=a.getParent(),a=a.getFrameDocument();CKEDITOR.env.iOS&&c.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"});c=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=!0;if(this.onLoad)this.onLoad()},this));a.write(g.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),
onload:"window.parent.CKEDITOR.tools.callFunction("+c+");"},m)));a.getWindow().$.CKEDITOR=CKEDITOR;a.on("keydown",function(a){var c=a.data.getKeystroke(),e=this.document.getById(this.id).getAttribute("dir");if("input"!==a.data.getTarget().getName()||37!==c&&39!==c)this._.onKeyDown&&!1===this._.onKeyDown(c)?"input"===a.data.getTarget().getName()&&32===c||a.data.preventDefault():(27==c||c==("rtl"==e?39:37))&&this.onEscape&&!1===this.onEscape(c)&&a.data.preventDefault()},this);a=a.getBody();a.unselectable();
CKEDITOR.env.air&&CKEDITOR.tools.callFunction(c)}else a=this.document.getById(this.id);this._.holder=a}return a};if(this.isFramed){var k=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";m.frame=h.output({id:this.id+"_frame",src:k})}k=b.output(m);e&&e.push(k);return k},addBlock:function(a,e){e=this._.blocks[a]=e instanceof CKEDITOR.ui.panel.block?
e:new CKEDITOR.ui.panel.block(this.getHolderElement(),e);this._.currentBlock||this.showBlock(a);return e},getBlock:function(a){return this._.blocks[a]},showBlock:function(a){a=this._.blocks[a];var e=this._.currentBlock,b=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");e&&e.hide();this._.currentBlock=a;CKEDITOR.fire("ariaWidget",b);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,e){this.element=a.append(a.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));e&&CKEDITOR.tools.extend(this,e);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 e=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"none"==a.getStyle("display")},b=this._.getItems(),k,g,c=b.count()-1;0<=c;c--)if(k=b.getItem(c),k.getAscendant(e)||(g=k,this._.focusIndex=c),"true"==k.getAttribute("aria-selected")){g=k;this._.focusIndex=c;break}g&&(a&&a(),CKEDITOR.env.webkit&&
g.getDocument().getWindow().focus(),g.focus(),this.onMark&&this.onMark(g))},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,e){var b=this.keys[a];switch(b){case "next":for(var k=this._.focusIndex,b=this._.getItems(),g;g=b.getItem(++k);)if(g.getAttribute("_cke_focus")&&g.$.offsetWidth){this._.focusIndex=k;g.focus(!0);
break}return g||e?!1:(this._.focusIndex=-1,this.onKeyDown(a,1));case "prev":k=this._.focusIndex;for(b=this._.getItems();0<k&&(g=b.getItem(--k));){if(g.getAttribute("_cke_focus")&&g.$.offsetWidth){this._.focusIndex=k;g.focus(!0);break}g=null}return g||e?!1:(this._.focusIndex=b.count(),this.onKeyDown(a,1));case "click":case "mouseup":return k=this._.focusIndex,(g=0<=k&&this._.getItems().getItem(k))&&g.fireEventHandler(b,{button:CKEDITOR.tools.normalizeMouseButton(CKEDITOR.MOUSE_BUTTON_LEFT,!0)}),!1}return!0}}})}(),
CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function b(b,a,e,m,k){k=CKEDITOR.tools.genKey(a.getUniqueId(),e.getUniqueId(),b.lang.dir,b.uiColor||"",m.css||"",k||"");var l=h[k];l||(l=h[k]=new CKEDITOR.ui.panel(a,m),l.element=e.append(CKEDITOR.dom.element.createFromHtml(l.render(b),a)),l.element.setStyles({display:"none",position:"absolute"}));return l}var h={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(g,a,e,h){function k(){d.hide()}e.forceIFrame=1;e.toolbarRelated&&
g.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(a=CKEDITOR.document.getById("cke_"+g.name));var l=a.getDocument();h=b(g,l,a,e,h||0);var c=h.element,f=c.getFirst(),d=this;c.disableContextMenu();this.element=c;this._={editor:g,panel:h,parentElement:a,definition:e,document:l,iframe:f,children:[],dir:g.lang.dir,showBlockParams:null,markFirst:void 0!==e.markFirst?e.markFirst:!0};g.on("mode",k);g.on("resize",k);l.getWindow().on("resize",function(){this.reposition()},this)},proto:{addBlock:function(b,a){return this._.panel.addBlock(b,
a)},addListBlock:function(b,a){return this._.panel.addListBlock(b,a)},getBlock:function(b){return this._.panel.getBlock(b)},showBlock:function(b,a,e,h,k,l){var c=this._.panel,f=c.showBlock(b);this._.showBlockParams=[].slice.call(arguments);this.allowBlur(!1);var d=this._.editor.editable();this._.returnFocus=d.hasFocus?d:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);this._.hideTimeout=0;var n=this.element,d=this._.iframe,d=CKEDITOR.env.ie&&!CKEDITOR.env.edge?d:new CKEDITOR.dom.window(d.$.contentWindow),
q=n.getDocument(),u=this._.parentElement.getPositionedAncestor(),x=a.getDocumentPosition(q),q=u?u.getDocumentPosition(q):{x:0,y:0},p="rtl"==this._.dir,w=x.x+(h||0)-q.x,B=x.y+(k||0)-q.y;!p||1!=e&&4!=e?p||2!=e&&3!=e||(w+=a.$.offsetWidth-1):w+=a.$.offsetWidth;if(3==e||4==e)B+=a.$.offsetHeight-1;this._.panel._.offsetParentId=a.getId();n.setStyles({top:B+"px",left:0,display:""});n.setOpacity(0);n.getFirst().removeStyle("width");this._.editor.focusManager.add(d);this._.blurSet||(CKEDITOR.event.useCapture=
!0,d.on("blur",function(a){function c(){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(c,0,this)):c.call(this))},this),d.on("focus",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)},this),CKEDITOR.env.iOS&&(d.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this),d.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(f.autoSize){var d=f.element.getDocument(),d=(CKEDITOR.env.webkit||CKEDITOR.env.edge?f.element:d.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<d&&(d+=(a.$.offsetWidth||0)-(a.$.clientWidth||0)+3);a.setStyle("width",
d+10+"px");d=f.element.$.scrollHeight;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<d&&(d+=(a.$.offsetHeight||0)-(a.$.clientHeight||0)+3);a.setStyle("height",d+"px");c._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");p&&(w-=n.$.offsetWidth);n.setStyle("left",w+"px");var d=c.element.getWindow(),a=n.$.getBoundingClientRect(),d=d.getViewPaneSize(),e=a.width||a.right-a.left,b=a.height||a.bottom-a.top,k=p?a.right:d.width-a.left,g=p?d.width-a.right:a.left;
p?k<e&&(w=g>e?w+e:d.width>e?w-a.left:w-a.right+d.width):k<e&&(w=g>e?w-e:d.width>e?w-a.right+d.width:w-a.left);e=a.top;d.height-a.top<b&&(B=e>b?B-b:d.height>b?B-a.bottom+d.height:B-a.top);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&((d=a=n.$.offsetParent&&new CKEDITOR.dom.element(n.$.offsetParent))&&"html"==d.getName()&&(d=d.getDocument().getBody()),d&&"rtl"==d.getComputedStyle("direction")&&(w=CKEDITOR.env.ie8Compat?w-2*n.getDocument().getDocumentElement().$.scrollLeft:w-(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:B+"px",left:w+"px"});n.setOpacity(1);l&&l()},this);c.isLoaded?a():c.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();f.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.markFirst&&(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){f.markFirstDisplayed?
f.markFirstDisplayed():f._.markFirstDisplayed()},0):f.markFirstDisplayed?f.markFirstDisplayed():f._.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 b=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,b))},focus:function(){if(CKEDITOR.env.webkit){var b=CKEDITOR.document.getActive();b&&!b.equals(this._.iframe)&&b.$.blur()}(this._.lastFocused||
this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var b=this._.iframe.getFrameDocument().getActive();b&&b.is("a")&&(this._.lastFocused=b)},hide:function(b){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(b=b&&this._.returnFocus)CKEDITOR.env.webkit&&b.type&&b.getWindow().$.focus(),
b.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(b){var a=this._.panel;void 0!==b&&(a.allowBlur=b);return a.allowBlur},showAsChild:function(b,a,e,h,k,l){if(this._.activeChild!=b||b._.panel._.offsetParentId!=e.getId())this.hideChild(),b.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=b,this._.focused=!1,b.showBlock(a,e,h,k,l),this.blur(),
(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){b.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(b){var a=this._.activeChild;a&&(delete a.onHide,delete this._.activeChild,a.hide(),b&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var b=CKEDITOR.tools.isEmpty(CKEDITOR.instances),a;for(a in h){var e=h[a];b?e.destroy():e.element.hide()}b&&(h={})})}(),function(){var b,h,g;CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(a){function e(d){function e(){var c=
a.config["colorButton_"+w+"Style"];c.childRule="back"==w?function(a){return k(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||k(a)};return c}function n(c,d,f){var b={};c&&(b.color=c);d&&(b.colorName=d);d=!CKEDITOR.tools.isEmpty(b)&&new CKEDITOR.style(e(),b);a.execCommand(y,{newStyle:d});if(c&&f)for(f.addColor(c.substr(1).toUpperCase()),c=H.element.find("[role\x3doption]").toArray(),f=0;f<c.length;f++)c[f].setAttributes({"aria-posinset":f+1,"aria-setsize":c.length})}var p=d.name,
w=d.type,B=d.title,r=d.order,y=d.commandName;d=d.contentTransformations||{};var z=new CKEDITOR.style(c["colorButton_"+w+"Style"]),v=CKEDITOR.tools.getNextId()+"_colorBox",t={type:w},C=new CKEDITOR.style(c["colorButton_"+w+"Style"],{color:"inherit"}),D=function(){return CKEDITOR.tools.addFunction(function(c,d,f){a.focus();a.fire("saveSnapshot");"?"==c?a.getColorFromDialog(function(a){a&&n(a,d,A)},null,t):n(c&&"#"+c,d,A);f&&(f.setAttribute("cke_colorlast",!0),a.once("selectionChange",function(){f.removeAttribute("cke_colorlast")}))})}(),
A=g.getRowLimit(a)?new g(a,"back"==w?"background-color":"color",D):void 0,H;a.addCommand(y,{contextSensitive:!0,exec:function(a,c){if(!a.readOnly){var d=c.newStyle;a.removeStyle(C);a.focus();d&&a.applyStyle(d);a.fire("saveSnapshot")}},refresh:function(a,c){C.checkApplicable(c,a,a.activeFilter)?C.checkActive(c,a)?this.setState(CKEDITOR.TRISTATE_ON):this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}});a.ui.add(p,CKEDITOR.UI_PANELBUTTON,{label:B,title:B,command:y,editorFocus:0,
toolbar:"colors,"+r,allowedContent:z,requiredContent:z,contentTransformations:d,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(c.colorButton_contentsCss),attributes:{role:"listbox","aria-label":f.panelTitle}},select:function(a){var d=c.colorButton_colors.split(",");a=CKEDITOR.tools.array.find(d,a);a=b.normalizeColor(a);l(H,a);H._.markFirstDisplayed()},onBlock:function(c,d){H=d;d.autoSize=!0;d.element.addClass("cke_colorblock");d.element.setHtml(h(v,D,A?A.getLength():0));d.element.getDocument().getBody().setStyle("overflow",
"hidden");d.element.getAscendant({html:1}).setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var f=d.keys,e="rtl"==a.lang.dir;f[e?37:39]="next";f[40]="next";f[9]="next";f[e?39:37]="prev";f[38]="prev";f[CKEDITOR.SHIFT+9]="prev";f[32]="click";A&&A.setContainer(d.element.findOne(".cke_colorhistory"))},onOpen:function(){var d=a.getSelection(),f=d&&d.getStartElement(),e=a.elementPath(f),k="back"==w?"background-color":"color";if(e){f=e.block||e.blockLimit||a.document.getBody();do e=f&&f.getComputedStyle(k)||
"transparent";while("back"==w&&"transparent"==e&&f&&(f=f.getParent()));e&&"transparent"!=e||(e="#ffffff");c.colorButton_enableAutomatic&&H.element.findOne("#"+v).setStyle("background-color",e);if(f=d&&d.getRanges()[0]){for(var d=new CKEDITOR.dom.walker(f),g=f.collapsed?f.startContainer:d.next(),f="";g;){g.type!==CKEDITOR.NODE_ELEMENT&&(g=g.getParent());g=b.normalizeColor(g.getComputedStyle(k));f=f||g;if(f!==g){f="";break}g=d.next()}"transparent"==f&&(f="");"fore"==w&&(t.automaticTextColor="#"+b.normalizeColor(e));
t.selectionColor=f?"#"+f:"";l(H,f)}return e}}})}function h(d,e,k){var l=[],m=c.colorButton_colors.split(","),n=a.plugins.colordialog&&c.colorButton_enableMore;k=m.length+k+(n?1:0);var r=1;c.colorButton_enableAutomatic&&(k+=1,r+=1,l.push('\x3ca class\x3d"cke_colorauto" _cke_focus\x3d1 hidefocus\x3dtrue',' title\x3d"',f.auto,'"',' draggable\x3d"false"',' ondragstart\x3d"return false;"',' onclick\x3d"CKEDITOR.tools.callFunction(',e,',null);return false;"'," href\x3d\"javascript:void('",f.auto,"')\"",
' role\x3d"option" aria-posinset\x3d"1" aria-setsize\x3d"',k,'"\x3e','\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e',"\x3ctr\x3e",'\x3ctd colspan\x3d"',a.config.colorButton_colorsPerRow,'" align\x3d"center"\x3e','\x3cspan class\x3d"cke_colorbox" id\x3d"',d,'"\x3e\x3c/span\x3e',f.auto,"\x3c/td\x3e","\x3c/tr\x3e","\x3c/table\x3e","\x3c/a\x3e"));l.push('\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e\x3ctbody\x3e');for(d=
0;d<m.length;d++){0===d%a.config.colorButton_colorsPerRow&&l.push("\x3c/tr\x3e\x3ctr\x3e");var y=m[d].split("/"),z=y[0],y=new b(a,{color:y[1]||z,label:y[1]?z:void 0},e);y.setPositionIndex(r+d,k);l.push(y.getHtml())}g.getRowLimit(a)&&g.renderContainer(l,a);n&&l.push("\x3c/tr\x3e","\x3ctr\x3e",'\x3ctd colspan\x3d"',a.config.colorButton_colorsPerRow,'" align\x3d"center"\x3e','\x3ca class\x3d"cke_colormore" _cke_focus\x3d1 hidefocus\x3dtrue',' title\x3d"',f.more,'"',' draggable\x3d"false"',' ondragstart\x3d"return false;"',
' onclick\x3d"CKEDITOR.tools.callFunction(',e,",'?');return false;\""," href\x3d\"javascript:void('",f.more,"')\"",' role\x3d"option" aria-posinset\x3d"',k,'" aria-setsize\x3d"',k,'"\x3e',f.more,"\x3c/a\x3e","\x3c/td\x3e");l.push("\x3c/tr\x3e\x3c/tbody\x3e\x3c/table\x3e");return l.join("")}function k(a){return"false"==a.getAttribute("contentEditable")||a.getAttribute("data-nostyle")}function l(a,c){var d=a._.getItems(),f=a.element.findOne("[aria-selected]"),e=a.element.findOne("[cke_colorlast]");
f&&f.removeAttribute("aria-selected");if(e)e.setAttribute("aria-selected",!0);else for(f=0;f<d.count();f++)if(e=d.getItem(f),c&&c==b.normalizeColor(e.getAttribute("data-value"))){e.setAttribute("aria-selected",!0);break}}var c=a.config,f=a.lang.colorbutton;if(!CKEDITOR.env.hc){e({name:"TextColor",type:"fore",commandName:"textColor",title:f.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 d,n=a.config.colorButton_normalizeBackground;if(void 0===n||n)d=[[{element:"span",left:function(a){var c=CKEDITOR.tools;if("span"!=a.name||!a.styles||!a.styles.background)return!1;a=c.style.parse.background(a.styles.background);return a.color&&1===c.object.keys(a).length},right:function(c){var d=(new CKEDITOR.style(a.config.colorButton_backStyle,{color:c.styles.background})).getDefinition();c.name=d.element;
c.styles=d.styles;c.attributes=d.attributes||{};return c}}]];e({name:"BGColor",type:"back",commandName:"bgColor",title:f.bgColorTitle,order:20,contentTransformations:d})}}});b=CKEDITOR.tools.createClass({$:function(a,e,g){this.$=new CKEDITOR.dom.element("td");this.color=CKEDITOR.tools._isValidColorFormat(e.color)?e.color:"";this.clickFn=g;this.label=e.label||b.colorNames(a)[this.color]||this.color;this.setHtml()},statics:{colorNames:function(a){return a.lang.colorbutton.colors},normalizeColor:function(a){var e=
/^(rgb|hsl)a\(/g.test(a),b=/^rgba\((\s*0\s*,?){4}\)$/g.test(a);return e&&!b?(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,e){this.getElement().getChild(0).setAttributes({"aria-posinset":a,"aria-setsize":e})}}});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 e=CKEDITOR.tools.getIndex(this.boxes,function(e){return e.color===a});if(0>e)return null;this.boxes[e].getElement().remove();return this.boxes.splice(e,1)[0]}}});g=CKEDITOR.tools.createClass({$:function(a,e,b){this.editor=a;this.cssProperty=
e;this.clickFn=b;this.rows=[];this._.addNewRow();if(this.editor.config.colorButton_renderContentColors)this.editor.once("instanceReady",function(){this.renderContentColors()},this)},statics:{renderContainer:function(a,e){a.push('\x3c/tbody\x3e\x3ctbody class\x3d"cke_colorhistory" style\x3d"display:none;"\x3e',"\x3ctr\x3e",'\x3ctd colspan\x3d"',e.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 g.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 k=this._.getHexCode(b,this.cssProperty,g.colorList);a[k]=a[k]||0;a[k]+=1;return a},{},this)},getHexCode:function(a,e,g){var k=a.getStyle(e);return k in
g?g[k].substr(1):b.normalizeColor(a.getComputedStyle(e)).toUpperCase()},sortByOccurrencesAscending:function(a,e){var b=[],k;for(k in a){var g={};g[e]=k;g.frequency=a[k];b.push(g)}b.sort(function(a,f){return f.frequency-a.frequency});this._.trimToCapacity(b);return b.reverse()},trimToCapacity:function(a){a.splice(g.getCapacity(this.editor))},addColors:function(a){CKEDITOR.tools.array.forEach(a,function(a){this.addColor(a.colorCode)},this)},extractColorBox:function(a){for(var e=0;e<this.rows.length;e++){var b=
this.rows[e].extractColorBox(a);if(b)return b}return null},moveToBeginning:function(a){this.rows[0].addNewColor(a)},createAtBeginning:function(a){this._.moveToBeginning(new b(this.editor,{color:a},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<g.getRowLimit(this.editor)&&!(this.rows[a].boxes.length<=this.editor.config.colorButton_colorsPerRow);a++)this.rows[a+1]?this._.moveLastBoxToNextRow(a):
a<g.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(),e=this._.calculateFirstPosition(a);CKEDITOR.tools.array.forEach(this.rows,function(b){CKEDITOR.tools.array.forEach(b.boxes,function(b){b.setPositionIndex(e,a);e+=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 e=this._.extractColorBox(a);this.container&&!this.container.isVisible()&&this.show();e?this._.moveToBeginning(e):this._.createAtBeginning(a);this._.alignRows()},getLength:function(){return CKEDITOR.tools.array.reduce(this.rows,
function(a,e){return a+e.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(b){var h=new CKEDITOR.dialogCommand("colordialog");h.editorFocus=!1;b.addCommand("colordialog",h);CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js");b.getColorFromDialog=function(g,a,e){var h,
k,l,c;h=function(c){l(this);(c="ok"==c.name?this.getValueOf("picker","selectedColor"):null)&&!CKEDITOR.tools._isValidColorFormat(c)&&(c=null);/^[0-9a-f]{3}([0-9a-f]{3})?$/i.test(c)&&(c="#"+c);g.call(a,c)};k=function(a){e&&(a.data=e)};l=function(a){a.removeListener("ok",h);a.removeListener("cancel",h);a.removeListener("show",k)};c=function(a){a.on("ok",h);a.on("cancel",h);a.on("show",k,null,null,5)};b.execCommand("colordialog");if(b._.storedDialogs&&b._.storedDialogs.colordialog)c(b._.storedDialogs.colordialog);
else CKEDITOR.on("dialogDefinition",function(a){if("colordialog"==a.data.name){var d=a.data.definition;a.removeListener();d.onLoad=CKEDITOR.tools.override(d.onLoad,function(a){return function(){c(this);d.onLoad=a;"function"==typeof a&&a.call(this)}})}})}}},CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog),function(){function b(a,e,c,f){var d=new CKEDITOR.dom.walker(a);if(a=a.startContainer.getAscendant(e,!0)||a.endContainer.getAscendant(e,!0))if(c(a),f)return;for(;a=d.next();)if(a=
a.getAscendant(e,!0))if(c(a),f)break}function h(e,b){var c={ul:"ol",ol:"ul"};return-1!==a(b,function(a){return a.element===e||a.element===c[e]})}function g(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 a=CKEDITOR.tools.indexOf,e=CKEDITOR.tools.getMouseButton,
m=!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(b){var g=CKEDITOR.plugins.copyformatting;g._addScreenReaderContainer();m||(CKEDITOR.document.appendStyleSheet(this.path+"styles/copyformatting.css"),m=!0);b.addContentsCss&&b.addContentsCss(this.path+"styles/copyformatting.css");b.copyFormatting=new g.state(b);
b.addCommand("copyFormatting",g.commands.copyFormatting);b.addCommand("applyFormatting",g.commands.applyFormatting);b.ui.addButton("CopyFormatting",{isToggle:!0,label:b.lang.copyformatting.label,command:"copyFormatting",toolbar:"cleanup,0"});b.on("contentDom",function(){var a=b.getCommand("copyFormatting"),f=b.editable(),d=f.isInline()?f:b.document,g=b.ui.get("CopyFormatting");f.attachListener(d,"mouseup",function(d){e(d)===CKEDITOR.MOUSE_BUTTON_LEFT&&a.state===CKEDITOR.TRISTATE_ON&&b.execCommand("applyFormatting")});
f.attachListener(CKEDITOR.document,"mouseup",function(d){e(d)!==CKEDITOR.MOUSE_BUTTON_LEFT||a.state!==CKEDITOR.TRISTATE_ON||f.contains(d.data.getTarget())||b.execCommand("copyFormatting")});g&&(d=CKEDITOR.document.getById(g._.id),f.attachListener(d,"dblclick",function(){b.execCommand("copyFormatting",{sticky:!0})}),f.attachListener(d,"mouseup",function(a){a.data.stopPropagation()}))});b.config.copyFormatting_keystrokeCopy&&b.setKeystroke(b.config.copyFormatting_keystrokeCopy,"copyFormatting");b.on("key",
function(a){var f=b.getCommand("copyFormatting");a=a.data.domEvent;a.getKeystroke&&27===a.getKeystroke()&&f.state===CKEDITOR.TRISTATE_ON&&b.execCommand("copyFormatting")});b.copyFormatting.on("extractFormatting",function(a){var f=a.data.element;if(f.contains(b.editable())||f.equals(b.editable()))return a.cancel();f=g._convertElementToStyleDef(f);if(!b.copyFormatting.filter.check(new CKEDITOR.style(f),!0,!0))return a.cancel();a.data.styleDef=f});b.copyFormatting.on("applyFormatting",function(c){if(!c.data.preventFormatStripping){var f=
c.data.range,d=g._extractStylesFromRange(b,f),e=g._determineContext(f),m,u;if(b.copyFormatting._isContextAllowed(e))for(u=0;u<d.length;u++)e=d[u],m=f.createBookmark(),-1===a(g.preservedElements,e.element)?CKEDITOR.env.webkit&&!CKEDITOR.env.chrome?d[u].removeFromRange(c.data.range,c.editor):d[u].remove(c.editor):h(e.element,c.data.styles)&&g._removeStylesFromElementInRange(f,e.element),f.moveToBookmark(m)}});b.copyFormatting.on("applyFormatting",function(a){var f=CKEDITOR.plugins.copyformatting,d=
f._determineContext(a.data.range);"list"===d&&b.copyFormatting._isContextAllowed("list")?f._applyStylesToListContext(a.editor,a.data.range,a.data.styles):"table"===d&&b.copyFormatting._isContextAllowed("table")?f._applyStylesToTableContext(a.editor,a.data.range,a.data.styles):b.copyFormatting._isContextAllowed("text")&&f._applyStylesToTextContext(a.editor,a.data.range,a.data.styles)},null,null,999)}});g.prototype._isContextAllowed=function(e){var b=this.editor.config.copyFormatting_allowedContexts;
return!0===b||-1!==a(b,e)};CKEDITOR.event.implementOn(g.prototype);CKEDITOR.plugins.copyformatting={state:g,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,e){var c=CKEDITOR.plugins.copyformatting,f=a.copyFormatting,d=e?"keystrokeHandler"==e.from:!1,b=e?e.sticky||d:!1,g=c._getCursorContainer(a),h=CKEDITOR.document.getDocumentElement();if(this.state===CKEDITOR.TRISTATE_ON)return f.styles=null,f.sticky=!1,g.removeClass("cke_copyformatting_active"),h.removeClass("cke_copyformatting_disabled"),h.removeClass("cke_copyformatting_tableresize_cursor"),c._putScreenReaderMessage(a,"canceled"),c._detachPasteKeystrokeHandler(a),
this.setState(CKEDITOR.TRISTATE_OFF);f.styles=c._extractStylesFromElement(a,a.elementPath().lastElement);this.setState(CKEDITOR.TRISTATE_ON);d||(g.addClass("cke_copyformatting_active"),h.addClass("cke_copyformatting_tableresize_cursor"),a.config.copyFormatting_outerCursor&&h.addClass("cke_copyformatting_disabled"));f.sticky=b;c._putScreenReaderMessage(a,"copied");c._attachPasteKeystrokeHandler(a)}},applyFormatting:{editorFocus:CKEDITOR.env.ie&&!CKEDITOR.env.edge?!1:!0,exec:function(a,e){var c=a.getCommand("copyFormatting"),
f=e?"keystrokeHandler"==e.from:!1,d=CKEDITOR.plugins.copyformatting,b=a.copyFormatting,g=d._getCursorContainer(a),h=CKEDITOR.document.getDocumentElement();if(f&&!b.styles)return d._putScreenReaderMessage(a,"failed"),d._detachPasteKeystrokeHandler(a),!1;f=d._applyFormat(a,b.styles);b.sticky||(b.styles=null,g.removeClass("cke_copyformatting_active"),h.removeClass("cke_copyformatting_disabled"),h.removeClass("cke_copyformatting_tableresize_cursor"),c.setState(CKEDITOR.TRISTATE_OFF),d._detachPasteKeystrokeHandler(a));
d._putScreenReaderMessage(a,f?"applied":"canceled")}}},_getCursorContainer:function(a){return a.elementMode===CKEDITOR.ELEMENT_MODE_INLINE?a.editable():a.editable().getParent()},_convertElementToStyleDef:function(a){var e=CKEDITOR.tools,c=a.getAttributes(CKEDITOR.plugins.copyformatting.excludedAttributes),e=e.parseCssText(a.getAttribute("style"),!0,!0);return{element:a.getName(),type:CKEDITOR.STYLE_INLINE,attributes:c,styles:e}},_extractStylesFromElement:function(e,b){var c={},f=[];do if(b.type===
CKEDITOR.NODE_ELEMENT&&!b.hasAttribute("data-cke-bookmark")&&(c.element=b,e.copyFormatting.fire("extractFormatting",c,e)&&c.styleDef&&f.push(new CKEDITOR.style(c.styleDef)),b.getName&&-1!==a(CKEDITOR.plugins.copyformatting.breakOnElements,b.getName())))break;while((b=b.getParent())&&b.type===CKEDITOR.NODE_ELEMENT);return f},_extractStylesFromRange:function(a,e){for(var c=[],f=new CKEDITOR.dom.walker(e),d;d=f.next();)c=c.concat(CKEDITOR.plugins.copyformatting._extractStylesFromElement(a,d));return c},
_removeStylesFromElementInRange:function(e,b){for(var c=-1!==a(["ol","ul","table"],b),f=new CKEDITOR.dom.walker(e),d;d=f.next();)if(d=d.getAscendant(b,!0))if(d.removeAttributes(d.getAttributes()),c)break},_getSelectedWordOffset:function(e){function b(a,c){return a[c?"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 f(d,e){var k=
d,g=/\s/g,h="p br ol ul li td th div caption body".split(" "),m=!1,n=!1,q,p;do{for(q=b(k,e);!q&&k.getParent();){k=k.getParent();if(-1!==a(h,k.getName())){n=m=!0;break}q=b(k,e)}if(q&&q.getName&&-1!==a(h,q.getName())){m=!0;break}k=q}while(k&&k.getStyle&&("none"==k.getStyle("display")||!k.getText()));for(k||(k=d);k.type!==CKEDITOR.NODE_TEXT;)k=!m||e||n?k.getChild(0):k.getChild(k.getChildCount()-1);for(h=c(k);null!=(n=g.exec(h))&&(p=n.index,e););if("number"!==typeof p&&!m)return f(k,e);if(m)e?p=0:(g=
/([\.\b]*$)/,p=(n=g.exec(h))?n.index:h.length);else if(e&&(p+=1,p>h.length))return f(k);return{node:k,offset:p}}var d=/\b\w+\b/ig,g,h,m,x,p;m=x=p=e.startContainer;for(g=c(m);null!=(h=d.exec(g));)if(h.index+h[0].length>=e.startOffset)return e=h.index,d=h.index+h[0].length,0===h.index&&(h=f(m,!0),x=h.node,e=h.offset),d>=g.length&&(g=f(m),p=g.node,d=g.offset),{startNode:x,startOffset:e,endNode:p,endOffset:d};return null},_filterStyles:function(a){var e=CKEDITOR.tools.isEmpty,c=[],f,d;for(d=0;d<a.length;d++)f=
a[d]._.definition,-1!==CKEDITOR.tools.indexOf(CKEDITOR.plugins.copyformatting.inlineBoundary,f.element)&&(f.element=a[d].element="span"),"span"===f.element&&e(f.attributes)&&e(f.styles)||c.push(a[d]);return c},_determineContext:function(a){function e(c){var f=new CKEDITOR.dom.walker(a),d;if(a.startContainer.getAscendant(c,!0)||a.endContainer.getAscendant(c,!0))return!0;for(;d=f.next();)if(d.getAscendant(c,!0))return!0}return e({ul:1,ol:1})?"list":e("table")?"table":"text"},_applyStylesToTextContext:function(e,
b,c){var f=CKEDITOR.plugins.copyformatting,d=f.excludedAttributesFromInlineTransform,g,h;CKEDITOR.env.webkit&&!CKEDITOR.env.chrome&&e.getSelection().selectRanges([b]);for(g=0;g<c.length;g++)if(b=c[g],-1===a(f.excludedElementsFromInlineTransform,b.element)){if(-1!==a(f.elementsForInlineTransform,b.element))for(b.element=b._.definition.element="span",h=0;h<d.length;h++)b._.definition.attributes[d[h]]&&delete b._.definition.attributes[d[h]];b.apply(e)}},_applyStylesToListContext:function(a,e,c){var f,
d,g;for(g=0;g<c.length;g++)f=c[g],d=e.createBookmark(),"ol"===f.element||"ul"===f.element?b(e,{ul:1,ol:1},function(a){var c=f;a.getName()!==c.element&&a.renameNode(c.element);c.applyToObject(a)},!0):"li"===f.element?b(e,"li",function(a){f.applyToObject(a)}):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(a,e,[f]),e.moveToBookmark(d)},_applyStylesToTableContext:function(e,g,c){function f(a,c){a.getName()!==c.element&&(c=c.getDefinition(),c.element=a.getName(),c=new CKEDITOR.style(c));c.applyToObject(a)}
var d,h,m;for(m=0;m<c.length;m++)d=c[m],h=g.createBookmark(),-1!==a(["table","tr"],d.element)?b(g,d.element,function(a){d.applyToObject(a)}):-1!==a(["td","th"],d.element)?b(g,{td:1,th:1},function(a){f(a,d)}):-1!==a(["thead","tbody"],d.element)?b(g,{thead:1,tbody:1},function(a){f(a,d)}):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(e,g,[d]),g.moveToBookmark(h)},_applyFormat:function(a,e){var c=a.getSelection().getRanges()[0],f=CKEDITOR.plugins.copyformatting,d,b;if(!c)return!1;if(c.collapsed){b=
a.getSelection().createBookmarks();if(!(d=f._getSelectedWordOffset(c)))return;c=a.createRange();c.setStart(d.startNode,d.startOffset);c.setEnd(d.endNode,d.endOffset);c.select()}e=f._filterStyles(e);if(!a.copyFormatting.fire("applyFormatting",{styles:e,range:c,preventFormatStripping:!1},a))return!1;b&&a.getSelection().selectBookmarks(b);return!0},_putScreenReaderMessage:function(a,e){var c=this._getScreenReaderContainer();c&&c.setText(a.lang.copyformatting.notification[e])},_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 e=
a.config.copyFormatting_keystrokePaste;e&&(this._initialKeystrokePasteCommand=a.keystrokeHandler.keystrokes[e],a.setKeystroke(e,"applyFormatting"))},_detachPasteKeystrokeHandler:function(a){var e=a.config.copyFormatting_keystrokePaste;e&&a.setKeystroke(e,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}(),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(b){for(var h=b.config.menu_groups.split(","),g=b._.menuGroups={},a=b._.menuItems={},e=0;e<h.length;e++)g[h[e]]=e+1;b.addMenuGroup=function(a,e){g[a]=e||100};b.addMenuItem=function(e,b){g[b.group]&&(a[e]=new CKEDITOR.menuItem(this,
e,b))};b.addMenuItems=function(a){for(var e in a)this.addMenuItem(e,a[e])};b.getMenuItem=function(e){return a[e]};b.removeMenuItem=function(e){delete a[e]}}}),function(){function b(a){a.sort(function(a,c){return a.group<c.group?-1:a.group>c.group?1:a.order<c.order?-1:a.order>c.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"',
g="";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&&(g='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"'+g+'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',a=CKEDITOR.addTemplate("menuItem",h),e=CKEDITOR.addTemplate("menuArrow",
'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),m=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,e){e=this._.definition=e||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=e.level||1;var c=CKEDITOR.tools.extend({},e.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-
1,block:{}}),f=c.block.attributes=c.attributes||{};!f.role&&(f.role="menu");this._.panelDefinition=c},_:{onShow:function(){var a=this.editor.getSelection(),e=a&&a.getStartElement(),c=this.editor.elementPath(),f=this._.listeners;this.removeAll();for(var d=0;d<f.length;d++){var b=f[d](e,a,c);if(b)for(var g in b){var h=this.editor.getMenuItem(g);!h||h.command&&!this.editor.getCommand(h.command).state||(h.state=b[g],this.add(h))}}},onClick:function(a){this.hide();if(a.onClick)a.onClick();else a.command&&
this.editor.execCommand(a.command)},onEscape:function(a){var e=this.parent;e?e._.panel.hideChild(1):27==a&&this.hide(1);return!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(a){var e=this._.subMenu,c=this.items[a];if(c=c.getItems&&c.getItems()){e?e.removeAll():(e=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),e.parent=this,e._.onClick=CKEDITOR.tools.bind(this._.onClick,this));for(var f in c){var d=this.editor.getMenuItem(f);
d&&(d.state=c[f],e.add(d))}var b=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+String(a));setTimeout(function(){e.show(b,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(a,e,c,f){if(!this.parent&&(this._.onShow(),!this.items.length))return;e=e||("rtl"==this.editor.lang.dir?2:1);var d=this.items,g=this.editor,h=this._.panel,m=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);m=h.addBlock(this.id,this._.panelDefinition.block);m.autoSize=!0;var x=m.keys;x[40]="next";x[9]="next";x[38]="prev";x[CKEDITOR.SHIFT+
9]="prev";x["rtl"==g.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click";x[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(x[13]="mouseup");m=this._.element=m.element;x=m.getDocument();x.getBody().setStyle("overflow","hidden");x.getElementsByTag("html").getItem(0).setStyle("overflow","hidden");this._.itemOverFn=CKEDITOR.tools.addFunction(function(a){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,g.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 c=this.items[a];if(c.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(c.getItems)this._.showSubMenu(a);else this._.onClick(c)},this)}b(d);for(var x=g.elementPath(),x=['\x3cdiv class\x3d"cke_menu'+(x&&x.direction()!=g.lang.dir?" cke_mixed_dir_content":"")+'" role\x3d"presentation"\x3e'],p=d.length,w=p&&d[0].group,B=0;B<p;B++){var r=
d[B];w!=r.group&&(x.push('\x3cdiv class\x3d"cke_menuseparator" role\x3d"separator"\x3e\x3c/div\x3e'),w=r.group);r.render(this,B,x)}x.push("\x3c/div\x3e");m.setHtml(x.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(h,this.id,a,e,c,f):h.showBlock(this.id,a,e,c,f);g.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 e=CKEDITOR.tools.array.filter(this.items,
function(c){return a===c.command});return e.length?(e=e[0],{item:e,element:this._.element.findOne("."+e.className)}):null}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(a,e,c){CKEDITOR.tools.extend(this,c,{order:0,className:"cke_menubutton__"+e});this.group=a._.menuGroups[this.group];this.editor=a;this.name=e},proto:{render:function(b,g,c){var f=b.id+String(g),d="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,h="",q=this.editor,u,x,p=d==CKEDITOR.TRISTATE_ON?"on":d==CKEDITOR.TRISTATE_DISABLED?
"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(h=' aria-checked\x3d"'+(d==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var w=this.getItems,B="\x26#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",r=this.name;this.icon&&!/\./.test(this.icon)&&(r=this.icon);this.command&&(u=q.getCommand(this.command),(u=q.getCommandKeystroke(u))&&(x=CKEDITOR.tools.keystrokeToString(q.lang.common.keyboard,u)));u=CKEDITOR.tools.htmlEncodeAttr(this.label);b={id:f,name:this.name,iconName:r,label:this.label,
attrLabel:u,cls:this.className||"",state:p,hasPopup:w?"true":"false",disabled:d==CKEDITOR.TRISTATE_DISABLED,title:u+(x?" ("+x.display+")":""),ariaShortcut:x?q.lang.common.keyboardShortcut+" "+x.aria:"",href:"javascript:void('"+(u||"").replace("'")+"')",hoverFn:b._.itemOverFn,moveOutFn:b._.itemOutFn,clickFn:b._.itemClickFn,index:g,iconStyle:CKEDITOR.skin.getIconStyle(r,"rtl"==this.editor.lang.dir,r==this.icon?null:this.icon,this.iconOffset),shortcutHtml:x?m.output({shortcut:x.display}):"",arrowHtml:w?
e.output({label:B}):"",role:this.role?this.role:"menuitem",ariaChecked:h};a.output(b,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(b){this.base.call(this,b,{panel:{css:b.config.contextmenu_contentsCss,
className:"cke_menu_panel",attributes:{"aria-label":b.lang.contextmenu.options}}})},proto:{addTarget:function(b,h){function g(){e=!1}var a,e;b.on("contextmenu",function(b){b=b.data;var g=CKEDITOR.env.webkit?a:CKEDITOR.env.mac?b.$.metaKey:b.$.ctrlKey;if(!h||!g)if(b.preventDefault(),!e){if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var g=this.editor,c=(new CKEDITOR.dom.elementPath(b.getTarget(),g.editable())).contains(function(a){return a.hasAttribute("contenteditable")},!0);c&&"false"==c.getAttribute("contenteditable")&&
g.getSelection().fake(c)}var c=b.getTarget().getDocument(),f=b.getTarget().getDocument().getDocumentElement(),g=!c.equals(CKEDITOR.document),c=c.getWindow().getScrollPosition(),d=g?b.$.clientX:b.$.pageX||c.x+b.$.clientX,m=g?b.$.clientY:b.$.pageY||c.y+b.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(f,null,d,m)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.webkit){var m=function(){a=0};b.on("keydown",function(e){a=CKEDITOR.env.mac?e.data.$.metaKey:e.data.$.ctrlKey});b.on("keyup",m);
b.on("contextmenu",m)}CKEDITOR.env.gecko&&!CKEDITOR.env.mac&&(b.on("keydown",function(a){a.data.$.shiftKey&&121===a.data.$.keyCode&&(e=!0)},null,null,0),b.on("keyup",g),b.on("contextmenu",g))},open:function(b,h,g,a){!1!==this.editor.config.enableContextMenu&&this.editor.getSelection().getType()!==CKEDITOR.SELECTION_NONE&&(this.editor.focus(),b=b||CKEDITOR.document.getDocumentElement(),this.editor.selectionChange(1),this.show(b,h,g,a))}}})},beforeInit:function(b){var h=b.contextMenu=new CKEDITOR.plugins.contextMenu(b);
b.on("contentDom",function(){h.addTarget(b.editable(),!1!==b.config.browserContextMenuOnCtrl)});b.addCommand("contextMenu",{exec:function(b){var a=0,e=0,h=b.getSelection().getRanges(),h=h[h.length-1].getClientRects(b.editable().isInline());if(h=h[h.length-1])a=h["rtl"===b.lang.dir?"left":"right"],e=h.bottom;b.contextMenu.open(b.document.getBody().getParent(),null,a,e)}});b.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");b.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),function(){function b(a){var e=
this.att;a=a&&a.hasAttribute(e)&&a.getAttribute(e)||"";void 0!==a&&this.setValue(a)}function h(){for(var a,e=0;e<arguments.length;e++)if(arguments[e]instanceof CKEDITOR.dom.element){a=arguments[e];break}if(a){var e=this.att,b=this.getValue();b?a.setAttribute(e,b):a.removeAttribute(e,b)}}var g={id:1,dir:1,classes:1,styles:1};CKEDITOR.plugins.add("dialogadvtab",{requires:"dialog",allowedContent:function(a){a||(a=g);var e=[];a.id&&e.push("id");a.dir&&e.push("dir");var b="";e.length&&(b+="["+e.join(",")+
"]");a.classes&&(b+="(*)");a.styles&&(b+="{*}");return b},createAdvancedTab:function(a,e,m){e||(e=g);var k=a.lang.common,l={id:"advanced",label:k.advancedTab,title:k.advancedTab,elements:[{type:"vbox",padding:1,children:[]}]},c=[];if(e.id||e.dir)e.id&&c.push({id:"advId",att:"id",type:"text",requiredContent:m?m+"[id]":null,label:k.id,setup:b,commit:h}),e.dir&&c.push({id:"advLangDir",att:"dir",type:"select",requiredContent:m?m+"[dir]":null,label:k.langDir,"default":"",style:"width:100%",items:[[k.notSet,
""],[k.langDirLTR,"ltr"],[k.langDirRTL,"rtl"]],setup:b,commit:h}),l.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(c)});if(e.styles||e.classes)c=[],e.styles&&c.push({id:"advStyles",att:"style",type:"text",requiredContent:m?m+"{cke-xyz}":null,label:k.styles,"default":"",validate:CKEDITOR.dialog.validate.inlineStyle(k.invalidInlineStyle),onChange:function(){},getStyle:function(a,c){var e=this.getValue().match(new RegExp("(?:^|;)\\s*"+a+"\\s*:\\s*([^;]*)","i"));return e?
e[1]:c},updateStyle:function(c,d){var e=this.getValue(),b=a.document.createElement("span");b.setAttribute("style",e);b.setStyle(c,d);e=CKEDITOR.tools.normalizeCssText(b.getAttribute("style"));this.setValue(e,1)},setup:b,commit:h}),e.classes&&c.push({type:"hbox",widths:["45%","55%"],children:[{id:"advCSSClasses",att:"class",type:"text",requiredContent:m?m+"(cke-xyz)":null,label:k.cssClasses,"default":"",setup:b,commit:h}]}),l.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(c)});
return l}})}(),function(){CKEDITOR.plugins.add("div",{requires:"dialog",init:function(b){if(!b.blockless){var h=b.lang.div,g="div(*)";CKEDITOR.dialog.isTabEnabled(b,"editdiv","advanced")&&(g+=";div[dir,id,lang,title]{*}");b.addCommand("creatediv",new CKEDITOR.dialogCommand("creatediv",{allowedContent:g,requiredContent:"div",contextSensitive:!0,contentTransformations:[["div: alignmentToStyle"]],refresh:function(a,e){this.setState("div"in(a.config.div_wrapTable?e.root:e.blockLimit).getDtd()?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED)}}));b.addCommand("editdiv",new CKEDITOR.dialogCommand("editdiv",{requiredContent:"div"}));b.addCommand("removediv",{requiredContent:"div",exec:function(a){function e(c){(c=CKEDITOR.plugins.div.getSurroundDiv(a,c))&&!c.data("cke-div-added")&&(f.push(c),c.data("cke-div-added"))}for(var b=a.getSelection(),k=b&&b.getRanges(),g,c=b.createBookmarks(),f=[],d=0;d<k.length;d++)g=k[d],g.collapsed?e(b.getStartElement()):(g=new CKEDITOR.dom.walker(g),g.evaluator=e,g.lastForward());
for(d=0;d<f.length;d++)f[d].remove(!0);b.selectBookmarks(c)}});b.ui.addButton&&b.ui.addButton("CreateDiv",{label:h.toolbar,command:"creatediv",toolbar:"blocks,50"});b.addMenuItems&&(b.addMenuItems({editdiv:{label:h.edit,command:"editdiv",group:"div",order:1},removediv:{label:h.remove,command:"removediv",group:"div",order:5}}),b.contextMenu&&b.contextMenu.addListener(function(a){return!a||a.isReadOnly()?null:CKEDITOR.plugins.div.getSurroundDiv(b)?{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(b,h){var g=b.elementPath(h);return b.elementPath(g.blockLimit).contains(function(a){return a.is("div")&&!a.isReadOnly()},1)}}}(),function(){function b(e,b){function g(a){a=d.list[a];var c;a.equals(e.editable())||"true"==a.getAttribute("contenteditable")?(c=e.createRange(),c.selectNodeContents(a),c=c.select()):(c=e.getSelection(),
c.selectElement(a));CKEDITOR.env.ie&&e.fire("selectionChange",{selection:c,path:new CKEDITOR.dom.elementPath(a)});e.focus()}function l(){f&&f.setHtml('\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');delete d.list}var c=e.ui.spaceId("path"),f,d=e._.elementsPath,n=d.idBase;b.html+='\x3cspan id\x3d"'+c+'_label" class\x3d"cke_voice_label"\x3e'+e.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';
e.on("uiReady",function(){var a=e.ui.space("path");a&&e.focusManager.add(a,1)});d.onClick=g;var q=CKEDITOR.tools.addFunction(g),u=CKEDITOR.tools.addFunction(function(a,c){var f=d.idBase,b;c=new CKEDITOR.dom.event(c);b="rtl"==e.lang.dir;switch(c.getKeystroke()){case b?39:37:case 9:return(b=CKEDITOR.document.getById(f+(a+1)))||(b=CKEDITOR.document.getById(f+"0")),b.focus(),!1;case b?37:39:case CKEDITOR.SHIFT+9:return(b=CKEDITOR.document.getById(f+(a-1)))||(b=CKEDITOR.document.getById(f+(d.list.length-
1))),b.focus(),!1;case 27:return e.focus(),!1;case 13:case 32:return g(a),!1;case CKEDITOR.ALT+121:return e.execCommand("toolbarFocus"),!1}return!0});e.on("selectionChange",function(b){for(var g=[],k=d.list=[],h=[],m=d.filters,l=!0,z=b.data.path.elements,v=z.length;v--;){var t=z[v],C=0;b=t.data("cke-display-name")?t.data("cke-display-name"):t.data("cke-real-element-type")?t.data("cke-real-element-type"):t.getName();(l=t.hasAttribute("contenteditable")?"true"==t.getAttribute("contenteditable"):l)||
t.hasAttribute("contenteditable")||(C=1);for(var D=0;D<m.length;D++){var A=m[D](t,b);if(!1===A){C=1;break}b=A||b}C||(k.unshift(t),h.unshift(b))}k=k.length;for(m=0;m<k;m++)b=h[m],l=e.lang.elementspath.eleTitle.replace(/%1/,b),b=a.output({id:n+m,label:l,text:b,jsTitle:"javascript:void('"+b+"')",index:m,keyDownFn:u,clickFn:q}),g.unshift(b);f||(f=CKEDITOR.document.getById(c));h=f;h.setHtml(g.join("")+'\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');e.fire("elementsPathUpdate",{space:h})});
e.on("readOnly",l);e.on("contentDomUnload",l);e.addCommand("elementsPathFocus",h.toolbarFocus);e.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)}}},g="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(g+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(g+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var a=CKEDITOR.addTemplate("pathItem",
'\x3ca id\x3d"{id}" href\x3d"{jsTitle}" tabindex\x3d"-1" class\x3d"cke_path_item" title\x3d"{label}"'+g+' 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(a){a._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+
"_",filters:[]};a.on("uiSpace",function(g){"bottom"==g.data.space&&b(a,g.data)})}})}(),function(){function b(a,c,e){e=a.config.forceEnterMode||e;if("wysiwyg"==a.mode){c||(c=a.activeEnterMode);var b=a.elementPath();b&&!b.isContextFor("p")&&(c=CKEDITOR.ENTER_BR,e=1);a.fire("saveSnapshot");c==CKEDITOR.ENTER_BR?k(a,c,null,e):l(a,c,null,e);a.fire("saveSnapshot")}}function h(a){a=a.getSelection().getRanges(!0);for(var c=a.length-1;0<c;c--)a[c].deleteContents();return a[0]}function g(a){var c=a.startContainer.getAscendant(function(a){return a.type==
CKEDITOR.NODE_ELEMENT&&"true"==a.getAttribute("contenteditable")},!0);if(a.root.equals(c))return a;c=new CKEDITOR.dom.range(c);c.moveToRange(a);return c}CKEDITOR.plugins.add("enterkey",{init:function(a){a.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){b(a)}});a.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){b(a,a.activeShiftEnterMode,1)}});a.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var a=CKEDITOR.dom.walker.whitespaces(),e=
CKEDITOR.dom.walker.bookmark(),m,k,l,c;CKEDITOR.plugins.enterkey={enterBlock:function(f,d,b,m){function l(a){var c;if(a===CKEDITOR.ENTER_BR||-1===CKEDITOR.tools.indexOf(["td","th"],B.lastElement.getName())||1!==B.lastElement.getChildCount())return!1;a=B.lastElement.getChild(0).clone(!0);(c=a.getBogus())&&c.remove();return a.getText().length?!1:!0}if(b=b||h(f)){b=g(b);var x=b.document,p=b.checkStartOfBlock(),w=b.checkEndOfBlock(),B=f.elementPath(b.startContainer),r=B.block,y=d==CKEDITOR.ENTER_DIV?
"div":"p",z;if(r&&p&&w){p=r.getParent();if(p.is("li")&&1<p.getChildCount()){x=new CKEDITOR.dom.element("li");z=f.createRange();x.insertAfter(p);r.remove();z.setStart(x,0);f.getSelection().selectRanges([z]);return}if(r.is("li")||r.getParent().is("li")){r.is("li")||(r=r.getParent(),p=r.getParent());z=p.getParent();b=!r.hasPrevious();var v=!r.hasNext();m=f.getSelection();var y=m.createBookmarks(),t=r.getDirection(1),w=r.getAttribute("class"),C=r.getAttribute("style"),D=z.getDirection(1)!=t;f=f.enterMode!=
CKEDITOR.ENTER_BR||D||C||w;if(z.is("li"))b||v?(b&&v&&p.remove(),r[v?"insertAfter":"insertBefore"](z)):r.breakParent(z);else{if(f)if(B.block.is("li")?(z=x.createElement(d==CKEDITOR.ENTER_P?"p":"div"),D&&z.setAttribute("dir",t),C&&z.setAttribute("style",C),w&&z.setAttribute("class",w),r.moveChildren(z)):z=B.block,b||v)z[b?"insertBefore":"insertAfter"](p);else r.breakParent(p),z.insertAfter(p);else if(r.appendBogus(!0),b||v)for(;x=r[b?"getFirst":"getLast"]();)x[b?"insertBefore":"insertAfter"](p);else for(r.breakParent(p);x=
r.getLast();)x.insertAfter(p);r.remove()}m.selectBookmarks(y);return}if(r&&r.getParent().is("blockquote")){r.breakParent(r.getParent());r.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||r.getPrevious().remove();r.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||r.getNext().remove();b.moveToElementEditStart(r);b.select();return}}else if(r&&r.is("pre")&&!w){k(f,d,b,m);return}if(C=b.splitBlock(y)){f=C.previousBlock;r=C.nextBlock;p=C.wasStartOfBlock;w=C.wasEndOfBlock;r?(v=r.getParent(),
v.is("li")&&(r.breakParent(v),r.move(r.getNext(),1))):f&&(v=f.getParent())&&v.is("li")&&(f.breakParent(v),v=f.getNext(),b.moveToElementEditStart(v),f.move(f.getPrevious()));if(p||w)if(l(d))b.moveToElementEditStart(b.getTouchedStartNode());else{if(f){if(f.is("li")||!c.test(f.getName())&&!f.is("pre"))z=f.clone()}else r&&(z=r.clone());z?m&&!z.is("li")&&z.renameNode(y):v&&v.is("li")?z=v:(z=x.createElement(y),f&&(t=f.getDirection())&&z.setAttribute("dir",t));if(x=C.elementPath)for(d=0,m=x.elements.length;d<
m;d++){y=x.elements[d];if(y.equals(x.block)||y.equals(x.blockLimit))break;CKEDITOR.dtd.$removeEmpty[y.getName()]&&(y=y.clone(),z.moveChildren(y),z.append(y))}z.appendBogus();z.getParent()||b.insertNode(z);z.is("li")&&z.removeAttribute("value");!CKEDITOR.env.ie||!p||w&&f.getChildCount()||(b.moveToElementEditStart(w?f:z),b.select());b.moveToElementEditStart(p&&!w?r:z)}else r.is("li")&&(z=b.clone(),z.selectNodeContents(r),z=new CKEDITOR.dom.walker(z),z.evaluator=function(c){return!(e(c)||a(c)||c.type==
CKEDITOR.NODE_ELEMENT&&c.getName()in CKEDITOR.dtd.$inline&&!(c.getName()in CKEDITOR.dtd.$empty))},(v=z.next())&&v.type==CKEDITOR.NODE_ELEMENT&&v.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?x.createElement("br"):x.createText(" ")).insertBefore(v)),r&&b.moveToElementEditStart(r);b.select();b.scrollIntoView()}}},enterBr:function(a,d,b,e){if(b=b||h(a)){var g=b.document,k=b.checkEndOfBlock(),m=new CKEDITOR.dom.elementPath(a.getSelection().getStartElement()),w=m.block,B=w&&m.block.getName();e||"li"!=B?(!e&&
k&&c.test(B)?(k=w.getDirection())?(g=g.createElement("div"),g.setAttribute("dir",k),g.insertAfter(w),b.setStart(g,0)):(g.createElement("br").insertAfter(w),CKEDITOR.env.gecko&&g.createText("").insertAfter(w),b.setStartAt(w.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(a="pre"==B&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?g.createText("\r"):g.createElement("br"),b.deleteContents(),b.insertNode(a),CKEDITOR.env.needsBrFiller?(g.createText("﻿").insertAfter(a),
k&&(w||m.blockLimit).appendBogus(),a.getNext().$.nodeValue="",b.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):b.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),b.collapse(!0),b.select(),b.scrollIntoView()):l(a,d,b,e)}}};m=CKEDITOR.plugins.enterkey;k=m.enterBr;l=m.enterBlock;c=/^h[1-6]$/}(),function(){function b(b,g){var a={},e=[],m={nbsp:" ",shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};b=b.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(c,d){var b=g?"\x26"+d+";":m[d];
a[b]=g?m[d]:"\x26"+d+";";e.push(b);return""});b=b.replace(/,$/,"");if(!g&&b){b=b.split(",");var k=document.createElement("div"),l;k.innerHTML="\x26"+b.join(";\x26")+";";l=k.innerHTML;k=null;for(k=0;k<l.length;k++){var c=l.charAt(k);a[c]="\x26"+b[k]+";";e.push(c)}}a.regex=e.join(g?"|":"");return a}CKEDITOR.plugins.add("entities",{afterInit:function(h){function g(a){return c[a]}function a(a){return"force"!=e.entities_processNumerical&&k[a]?k[a]:"\x26#"+(CKEDITOR.env.ie?a.charCodeAt(0):a.codePointAt(0))+
";"}var e=h.config;if(h=(h=h.dataProcessor)&&h.htmlFilter){var m=[];!1!==e.basicEntities&&m.push("nbsp,gt,lt,amp");e.entities&&(m.length&&m.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"),
e.entities_latin&&m.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"),e.entities_greek&&m.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"),
e.entities_additional&&m.push(e.entities_additional));var k=b(m.join(",")),l=k.regex?"["+k.regex+"]":"a^";delete k.regex;e.entities&&e.entities_processNumerical&&(l="[^ -~]|"+l);var l=new RegExp(l,CKEDITOR.env.ie?"g":"gu"),c=b("nbsp,gt,lt,amp,shy",!0),f=new RegExp(c.regex,"g");h.addRules({text:function(c){return c.replace(f,g).replace(l,a)}},{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(b,h,g,a){h=h||"80%";g=g||"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 g&&1<g.length&&"%"==g.substr(g.length-1,1)&&(g=parseInt(window.screen.height*parseInt(g,10)/100,10));640>h&&(h=640);420>g&&(g=420);var e=parseInt((window.screen.height-g)/2,10),m=parseInt((window.screen.width-
h)/2,10);a=(a||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+",width\x3d"+h+",height\x3d"+g+",top\x3d"+e+",left\x3d"+m;var k=window.open("",null,a,!0);if(!k)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(k.moveTo(m,e),k.resizeTo(h,g)),k.focus(),k.location.href=b}catch(l){window.open(b,null,a,!0)}return!0}}),"use strict",function(){function b(a){this.editor=a;this.loaders=
[]}function h(a,b,k){var h=a.config.fileTools_defaultFileName;this.editor=a;this.lang=a.lang;"string"===typeof b?(this.data=b,this.file=g(this.data),this.loaded=this.total=this.file.size):(this.data=null,this.file=b,this.total=this.file.size,this.loaded=0);k?this.fileName=k: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 g(b){var g=b.match(a)[1];b=b.replace(a,"");b=atob(b);var k=[],h,c,f,d;for(h=0;h<b.length;h+=512){c=b.slice(h,h+512);f=Array(c.length);for(d=0;d<c.length;d++)f[d]=c.charCodeAt(d);c=new Uint8Array(f);k.push(c)}return new Blob(k,{type:g})}CKEDITOR.plugins.add("filetools",{beforeInit:function(a){a.uploadRepository=new b(a);a.on("fileUploadRequest",function(a){var b=a.data.fileLoader;b.xhr.open("POST",b.uploadUrl,!0);a.data.requestData.upload={file:b.file,name:b.fileName}},null,null,5);a.on("fileUploadRequest",
function(b){var g=b.data.fileLoader,h=new FormData;b=b.data.requestData;var c=a.config.fileTools_requestHeaders,f,d;for(d in b){var n=b[d];"object"===typeof n&&n.file?h.append(d,n.file,n.name):h.append(d,n)}h.append("ckCsrfToken",CKEDITOR.tools.getCsrfToken());if(c)for(f in c)g.xhr.setRequestHeader(f,c[f]);g.xhr.send(h)},null,null,999);a.on("fileUploadResponse",function(a){var b=a.data.fileLoader,e=b.xhr,c=a.data;try{var f=JSON.parse(e.responseText);f.error&&f.error.message&&(c.message=f.error.message);
if(f.uploaded)for(var d in f)c[d]=f[d];else a.cancel()}catch(g){c.message=b.lang.filetools.responseError,CKEDITOR.warn("filetools-response-error",{responseText:e.responseText}),a.cancel()}},null,null,999)}});b.prototype={create:function(a,b,g){g=g||h;var l=this.loaders.length;a=new g(this.editor,a,b);a.id=l;this.loaders[l]=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(h){h.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,h=this.xhr;g.abort=function(){h.abort();b()};h.onerror=a;h.onabort=b;h.upload?(h.upload.onprogress=function(a){a.lengthComputable&&(g.uploadTotal||(g.uploadTotal=a.total),g.uploaded=a.loaded,g.update())},h.upload.onerror=a,h.upload.onabort=b):(g.uploadTotal=g.total,g.update());h.onload=function(){g.update();if("abort"!=g.status)if(g.uploaded=g.uploadTotal,200>h.status||299<h.status)g.message=g.lang.filetools["httpError"+h.status],g.message||(g.message=g.lang.filetools.httpError.replace("%1",
h.status)),g.changeStatus("error");else{for(var a={fileLoader:g},b=["message","fileName","url"],d=g.editor.fire("fileUploadResponse",a),e=0;e<b.length;e++){var m=b[e];"string"===typeof a[m]&&(g[m]=a[m])}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(b.prototype);CKEDITOR.event.implementOn(h.prototype);var a=/^data:(\S*?);base64,/;CKEDITOR.fileTools||(CKEDITOR.fileTools={});CKEDITOR.tools.extend(CKEDITOR.fileTools,{uploadRepository:b,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 b(a,c){var d=[];if(c)for(var b in c)d.push(b+"\x3d"+encodeURIComponent(c[b]));else return a;return a+(-1!=a.indexOf("?")?"\x26":"?")+d.join("\x26")}function h(a){return!a.match(/command=QuickUpload/)||
a.match(/(\?|&)responseType=json/)?a:b(a,{responseType:"json"})}function g(a){a+="";return a.charAt(0).toUpperCase()+a.substr(1)}function a(){var a=this.getDialog(),c=a.getParentEditor();c._.filebrowserSe=this;var d=c.config["filebrowser"+g(a.getName())+"WindowWidth"]||c.config.filebrowserWindowWidth||"80%",a=c.config["filebrowser"+g(a.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=b(this.filebrowser.url,f);c.popup(f,d,a,c.config.filebrowserWindowFeatures||c.config.fileBrowserWindowFeatures)}function e(a){var c=new CKEDITOR.dom.element(a.$.form);c&&((a=c.$.elements.ckCsrfToken)?a=new CKEDITOR.dom.element(a):(a=new CKEDITOR.dom.element("input"),a.setAttributes({name:"ckCsrfToken",type:"hidden"}),c.append(a)),a.setAttribute("value",CKEDITOR.tools.getCsrfToken()))}function m(){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 k(a,c,d){var f=d.params||{};f.CKEditor=a.name;f.CKEditorFuncNum=a._.filebrowserFn;f.langCode||(f.langCode=a.langCode);c.action=b(d.url,f);c.filebrowser=d}function l(b,f,u,x){if(x&&x.length)for(var p,w=x.length;w--;)if(p=x[w],"hbox"!=p.type&&"vbox"!=p.type&&"fieldset"!=p.type||l(b,f,u,p.children),p.filebrowser)if("string"==typeof p.filebrowser&&(p.filebrowser={action:"fileButton"==
p.type?"QuickUpload":"Browse",target:p.filebrowser}),"Browse"==p.filebrowser.action){var B=p.filebrowser.url;void 0===B&&(B=b.config["filebrowser"+g(f)+"BrowseUrl"],void 0===B&&(B=b.config.filebrowserBrowseUrl));B&&(p.onClick=a,p.filebrowser.url=B,p.hidden=!1)}else if("QuickUpload"==p.filebrowser.action&&p["for"]&&(B=p.filebrowser.url,void 0===B&&(B=b.config["filebrowser"+g(f)+"UploadUrl"],void 0===B&&(B=b.config.filebrowserUploadUrl)),B)){var r=p.onClick;p.onClick=function(a){var f=a.sender,g=f.getDialog().getContentElement(this["for"][0],
this["for"][1]).getInputElement(),k=CKEDITOR.fileTools&&CKEDITOR.fileTools.isFileUploadSupported;if(r&&!1===r.call(f,a))return!1;if(m.call(f,a)){if("form"!==b.config.filebrowserUploadMethod&&k)return a=b.uploadRepository.create(g.$.files[0]),a.on("uploaded",function(a){var c=a.sender.responseData;d.call(a.sender.editor,c.url,c.message)}),a.on("error",c.bind(this)),a.on("abort",c.bind(this)),a.loadAndUpload(h(B)),"xhr";e(g);return!0}return!1};p.filebrowser.url=B;p.hidden=!1;k(b,u.getContents(p["for"][0]).get(p["for"][1]),
p.filebrowser)}}function c(a){var c={};try{c=JSON.parse(a.sender.xhr.response)||{}}catch(d){}this.enable();alert(c.error?c.error.message:a.sender.message)}function f(a,c,d){if(-1!==d.indexOf(";")){d=d.split(";");for(var b=0;b<d.length;b++)if(f(a,c,d[b]))return!0;return!1}return(a=a.getContents(c).get(d).filebrowser)&&a.url}function d(a,c){var d=this._.filebrowserSe.getDialog(),b=this._.filebrowserSe["for"],f=this._.filebrowserSe.filebrowser.onSelect;b&&d.getContentElement(b[0],b[1]).reset();if("function"!=
typeof c||!1!==c.call(this._.filebrowserSe))if(!f||!1!==f.call(this._.filebrowserSe,a,c))if("string"==typeof c&&c&&alert(c),a&&(b=this._.filebrowserSe,d=b.getDialog(),b=b.filebrowser.target||null))if(b=b.split(":"),f=d.getContentElement(b[0],b[1]))f.setValue(a),d.selectPage(b[0])}CKEDITOR.plugins.add("filebrowser",{requires:"popup,filetools",init:function(a){a._.filebrowserFn=CKEDITOR.tools.addFunction(d,a);a.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}});CKEDITOR.on("dialogDefinition",
function(a){if(a.editor.plugins.filebrowser)for(var c=a.data.definition,d,b=0;b<c.contents.length;++b)if(d=c.contents[b])l(a.editor,a.data.name,c,d.elements),d.hidden&&d.filebrowser&&(d.hidden=!f(c,d.id,d.filebrowser))})}(),CKEDITOR.plugins.add("find",{requires:"dialog",init:function(b){var h=b.addCommand("find",new CKEDITOR.dialogCommand("find")),g=b.addCommand("replace",new CKEDITOR.dialogCommand("find",{tabId:"replace"}));h.canUndo=!1;h.readOnly=1;g.canUndo=!1;b.ui.addButton&&(b.ui.addButton("Find",
{label:b.lang.find.find,command:"find",toolbar:"find,10"}),b.ui.addButton("Replace",{label:b.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 b(a){var b=a.config,m=a.fire("uiSpace",{space:"top",html:""}).html,k=function(){function d(a,b,f){c.setStyle(b,g(f));c.setStyle("position",a)}function f(a){var c=l.getDocumentPosition();
switch(a){case "top":d("absolute","top",c.y-r-v);break;case "pin":d("fixed","top",C);break;case "bottom":d("absolute","top",c.y+(w.height||w.bottom-w.top)+v)}m=a}var m,l,p,w,B,r,y,z=b.floatSpaceDockedOffsetX||0,v=b.floatSpaceDockedOffsetY||0,t=b.floatSpacePinnedOffsetX||0,C=b.floatSpacePinnedOffsetY||0;return function(d){if(l=a.editable()){var n=d&&"focus"==d.name;n&&c.show();a.fire("floatingSpaceLayout",{show:n});c.removeStyle("left");c.removeStyle("right");p=c.getClientRect();w=l.getClientRect();
B=h.getViewPaneSize();r=p.height;y="pageXOffset"in h.$?h.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;m?(r+v<=w.top?f("top"):r+v>B.height-w.bottom?f("pin"):f("bottom"),d=B.width/2,d=b.floatSpacePreferRight?"right":0<w.left&&w.right<B.width&&w.width>p.width?"rtl"==b.contentsLangDirection?"right":"left":d-w.left>w.right-d?"left":"right",p.width>B.width?(d="left",n=0):(n="left"==d?0<w.left?w.left:0:w.right<B.width?B.width-w.right:0,n+p.width>B.width&&(d="left"==d?"right":"left",n=0)),
c.setStyle(d,g(("pin"==m?t:z)+n+("pin"==m?0:"left"==d?y:-y)))):(m="pin",f("pin"),k(d))}}}();if(m){var l=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(l.output({content:m,id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(b.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.applicationTitle}))),f=CKEDITOR.tools.eventsBuffer(500,k),d=CKEDITOR.tools.eventsBuffer(100,k);c.unselectable();
c.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(c){k(c);a.on("change",f.input);h.on("scroll",d.input);h.on("resize",d.input)});a.on("blur",function(){c.hide();a.removeListener("change",f.input);h.removeListener("scroll",d.input);h.removeListener("resize",d.input)});a.on("destroy",function(){h.removeListener("scroll",d.input);h.removeListener("resize",d.input);c.clearCustomData();c.remove()});a.focusManager.hasFocus&&c.show();a.focusManager.add(c,
1)}}var h=CKEDITOR.document.getWindow(),g=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(a){a.on("loaded",function(){b(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var b=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}\')"  onclick\x3d"{onclick}CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'),
g=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'),a=/\'/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 a=b.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(a);
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(b,g,k){var l=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[b]=l;var c;c=CKEDITOR.tools.htmlEncodeAttr(b).replace(a,"\\'");b={id:l,val:c,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(k||b),text:g||b};this._.pendingList.push(h.output(b))},startGroup:function(a){this._.close();var b=CKEDITOR.tools.getNextId();this._.groups[a]=b;this._.pendingHtml.push(g.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(),h;for(h in a)g.getById(a[h]).setStyle("display","");for(var c in b)a=g.getById(b[c]),h=a.getNext(),a.setStyle("display",""),h&&"ul"==h.getName()&&h.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)},markFirstDisplayed:function(){var a=this;this._.markFirstDisplayed(function(){a.multiSelect||a.unmarkAll()})},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 h=a[g];b.getById(h).removeClass("cke_selected");b.getById(h+"_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,h=-1;if(a)for(g=this.element.getDocument().getById(this._.items[a]).getFirst();a=
b.getItem(++h);){if(a.equals(g)){this._.focusIndex=h;break}}else this.element.focus();g&&setTimeout(function(){g.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(b){b.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var b='\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&&(b+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(b+=' 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 b=b+(' 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"),g=CKEDITOR.addTemplate("combo",b);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 b=[];this.render(a,b);return b.join("")},render:function(a,b){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 k=CKEDITOR.env,l,c,f="cke_"+this.id,d=CKEDITOR.tools.addFunction(function(d){c&&(a.unlockSelection(1),c=0);l.execute(d)},this),n=this;l={id:f,combo:this,focus:function(){CKEDITOR.document.getById(f).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 b=n.getValue();b?d.list.mark(b):d.list.unmarkAll();d.panel.showBlock(n.id,new CKEDITOR.dom.element(c),4)}},clickFn:d};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 q=CKEDITOR.tools.addFunction(function(a,c){a=new CKEDITOR.dom.event(a);var b=a.getKeystroke();switch(b){case 13:case 32:case 40:CKEDITOR.tools.callFunction(d,
c);break;default:l.onkey(l,b)}a.preventDefault()}),u=CKEDITOR.tools.addFunction(function(){l.onfocus&&l.onfocus()});c=0;l.keyDownFn=q;k={id:f,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:k.gecko&&!k.hc?"":(this.title||"").replace("'",""),keydownFn:q,focusFn:u,clickFn:d};g.output(k,b);if(this.onRender)this.onRender();return l},createPanel:function(a){if(!this._.panel){var b=this._.panelDefinition,g=this._.panelDefinition.block,h=b.parent||CKEDITOR.document.getBody(),
l="cke_combopanel__"+this.name,c=new CKEDITOR.ui.floatPanel(a,h,b),b=c.addListBlock(this.id,g),f=this;c.onShow=function(){this.element.addClass(l);f.setState(CKEDITOR.TRISTATE_ON);f._.on=1;f.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(f.onOpen)f.onOpen()};c.onHide=function(c){this.element.removeClass(l);f.setState(f.modes&&f.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);f._.on=0;if(!c&&f.onClose)f.onClose()};c.onEscape=function(){c.hide(1)};b.onClick=function(a,b){f.onClick&&
f.onClick.call(f,a,b);c.hide()};this._.panel=c;this._.list=b;c.getBlock(this.id).onHide=function(){f._.on=0;f.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,b){this._.value=a;var g=this.document.getById("cke_"+this.id+"_text");g&&(a||b?g.removeClass("cke_combo_inlinelabel"):(b=this.label,g.addClass("cke_combo_inlinelabel")),g.setText("undefined"!=typeof b?b:a));var g="undefined"!=typeof b?b:a,h=this.label,g=g===h?g:g+", "+h;(h=this.document.getById("cke_"+this.id+"_label"))&&
h.setText(g)},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,b,g){this._.items[a]=g||a;this._.list.add(a,b,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 b=this.document.getById("cke_"+this.id),g=b.getElementsByTag("a").getItem(0);b.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?b.setAttribute("aria-disabled",!0):b.removeAttribute("aria-disabled");g&&g.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 b in this._.items)if(a({value:b,text:this._.items[b]})){this.setValue(b);break}}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,b){this.add(a,
CKEDITOR.UI_RICHCOMBO,b)}}(),function(){function b(a,b){var l=a.config,c=b.lang,f=new CKEDITOR.style(b.styleDefinition),d=new e({entries:b.entries,styleVariable:b.styleVariable,styleDefinition:b.styleDefinition}),n;a.addCommand(b.commandName,{exec:function(a,c){var d=c.newStyle,b=c.oldStyle,f=a.getSelection().getRanges()[0],e=void 0===d;if(b||d)b&&f.collapsed&&g({editor:a,range:f,style:b}),e?a.removeStyle(b):(b&&!h(b,d)&&a.removeStyle(b),a.applyStyle(d))},refresh:function(a,c){f.checkApplicable(c,
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:f,requiredContent:f,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 c=" x-small small medium large x-large xx-large 48px".split(" ");
a.name="span";a.attributes.size&&(a.styles["font-size"]=c[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(l.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);d.addToCombo(this)},onClick:function(c){var f=this.getValue();a.focus();a.fire("saveSnapshot");a.execCommand(b.commandName,{newStyle:d.getStyle(c),oldStyle:d.getStyle(f)});a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(c){var f=this.getValue();(c=d.getMatchingValue(a,c.data.path))?c!=f&&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 e=function(a,c){var b=a.getDefinition().attributes,e=c.getDefinition().attributes;return CKEDITOR.tools.objectCompare(b,e)}(a,b),c=function(a,c){return CKEDITOR.style.getStyleText(a.getDefinition())===CKEDITOR.style.getStyleText(c.getDefinition())}(a,b);return e&&c}function g(b){var e=b.editor,g=b.range,c=b.style,f,d,h;f=e.elementPath();if(b=f.contains(function(a){return c.checkElementRemovable(a)})){d=g.checkBoundaryOfElement(b,CKEDITOR.START);
h=g.checkBoundaryOfElement(b,CKEDITOR.END);if(d&&h){for(d=g.createBookmark();f=b.getFirst();)f.insertBefore(b);b.remove();g.moveToBookmark(d)}else d||h?g.moveToPosition(b,d?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END):(g.splitElement(b),g.moveToPosition(b,CKEDITOR.POSITION_AFTER_END)),a(g,f.elements.slice(),b);e.getSelection().selectRanges([g])}}function a(b,e,g){var c=e.pop();if(c){if(g)return a(b,e,c.equals(g)?null:g);g=c.clone();b.insertNode(g);b.moveToPosition(g,CKEDITOR.POSITION_AFTER_START);
a(b,e)}}var e=CKEDITOR.tools.createClass({$:function(a){var b=a.entries.split(";");this._.data={};this._.names=[];for(var e=0;e<b.length;e++){var c=b[e],f,d;c?(c=c.split("/"),f=c[0],c=c[1],d={},d[a.styleVariable]=c||f,this._.data[f]=new CKEDITOR.style(a.styleDefinition,d),this._.data[f]._.definition.name=f,this._.names.push(f)):(b.splice(e,1),e--)}},proto:{getStyle:function(a){return this._.data[a]},addToCombo:function(a){for(var b=0;b<this._.names.length;b++){var e=this._.names[b];a.add(e,this.getStyle(e).buildPreview(),
e)}},getMatchingValue:function(a,b){for(var e=b.elements,c=0,f;c<e.length;c++)if(f=e[c],f=this._.findMatchingStyleName(a,f))return f;return null}},_:{findMatchingStyleName:function(a,b){return CKEDITOR.tools.array.find(this._.names,function(e){return this.getStyle(e).checkElementMatch(b,!0,a)},this)}}});CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(a){var e=a.config;b(a,{comboName:"Font",commandName:"font",styleVariable:"family",lang:a.lang.font,entries:e.font_names,defaultLabel:e.font_defaultLabel,
styleDefinition:e.font_style,order:30});b(a,{comboName:"FontSize",commandName:"fontSize",styleVariable:"size",lang:a.lang.font.fontSize,entries:e.fontSize_sizes,defaultLabel:e.fontSize_defaultLabel,styleDefinition:e.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(b){if(!b.blockless){for(var h=b.config,g=b.lang.format,a=h.format_tags.split(";"),e={},m=0,k=[],l=0;l<a.length;l++){var c=a[l],f=new CKEDITOR.style(h["format_"+c]);if(!b.filter.customConfig||b.filter.check(f))m++,e[c]=f,e[c]._.enterMode=b.config.enterMode,k.push(f)}0!==m&&b.ui.addRichCombo("Format",{label:g.label,title:g.panelTitle,toolbar:"styles,20",allowedContent:k,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(h.contentsCss),multiSelect:!1,attributes:{"aria-label":g.panelTitle}},
init:function(){this.startGroup(g.panelTitle);for(var a in e){var c=g["tag_"+a];this.add(a,e[a].buildPreview(c),c)}},onClick:function(a){b.focus();b.fire("saveSnapshot");a=e[a];var c=b.elementPath();b.fire("stylesRemove",{type:CKEDITOR.STYLE_BLOCK});a.checkActive(c,b)||b.applyStyle(a);setTimeout(function(){b.fire("saveSnapshot")},0)},onRender:function(){b.on("selectionChange",function(a){var c=this.getValue();a=a.data.path;this.refresh();for(var f in e)if(e[f].checkActive(a,b)){f!=c&&this.setValue(f,
b.lang.format["tag_"+f]);return}this.setValue("")},this)},onOpen:function(){this.showAll();for(var a in e)b.activeFilter.check(e[a])||this.hideItem(a)},refresh:function(){var a=b.elementPath();if(a){if(a.isContextFor("p"))for(var c in e)if(b.activeFilter.check(e[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 b(a,b){var c=m.exec(a),f=m.exec(b);if(c){if(!c[2]&&"px"==f[2])return f[1];if("px"==c[2]&&!f[2])return f[1]+"px"}return b}function h(e){return{elements:{$:function(h){var c=h.attributes,
c=c&&c["data-cke-realelement"],f=g(e,decodeURIComponent(c));if((c=(c=c&&new CKEDITOR.htmlParser.fragment.fromHtml(f))&&c.children[0])&&h.attributes["data-cke-resizable"]){var d=(new a(h)).rules;h=c.attributes;f=d.width;d=d.height;f&&(h.width=b(h.width,f));d&&(h.height=b(h.height,d))}return c}}}}function g(a,b){var c=[],f=/^cke:/i,d=new CKEDITOR.htmlParser.filter({elements:{"^":function(a){f.test(a.name)&&(a.name=a.name.replace(f,""),c.push(a))},iframe:function(a){a.children=[]}}}),e=a.activeFilter,
g=new CKEDITOR.htmlParser.basicWriter,h=CKEDITOR.htmlParser.fragment.fromHtml(b);d.applyTo(h);e.applyTo(h);CKEDITOR.tools.array.forEach(c,function(a){a.name="cke:"+a.name});h.writeHtml(g);return g.getHtml()}var a=CKEDITOR.htmlParser.cssStyle,e=CKEDITOR.tools.cssLength,m=/^((?:\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(b,g,c,f){var d=this.lang.fakeobjects,d=d[c]||d.unknown;g={"class":g,"data-cke-realelement":encodeURIComponent(b.getOuterHtml()),"data-cke-real-node-type":b.type,alt:d,title:d,align:b.getAttribute("align")||""};CKEDITOR.env.hc||(g.src=CKEDITOR.tools.transparentImageData);c&&(g["data-cke-real-element-type"]=c);f&&(g["data-cke-resizable"]=f,c=new a,f=b.getAttribute("width"),b=b.getAttribute("height"),f&&(c.rules.width=
e(f)),b&&(c.rules.height=e(b)),c.populate(g));return this.document.createElement("img",{attributes:g})};CKEDITOR.editor.prototype.createFakeParserElement=function(b,g,c,f){var d=this.lang.fakeobjects,d=d[c]||d.unknown,h;h=new CKEDITOR.htmlParser.basicWriter;b.writeHtml(h);h=h.getHtml();g={"class":g,"data-cke-realelement":encodeURIComponent(h),"data-cke-real-node-type":b.type,alt:d,title:d,align:b.attributes.align||""};CKEDITOR.env.hc||(g.src=CKEDITOR.tools.transparentImageData);c&&(g["data-cke-real-element-type"]=
c);f&&(g["data-cke-resizable"]=f,f=b.attributes,b=new a,c=f.width,f=f.height,void 0!==c&&(b.rules.width=e(c)),void 0!==f&&(b.rules.height=e(f)),b.populate(g));return new CKEDITOR.htmlParser.element("img",g)};CKEDITOR.editor.prototype.restoreRealElement=function(a){if(a.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var e=decodeURIComponent(a.data("cke-realelement")),e=g(this,e),e=CKEDITOR.dom.element.createFromHtml(e,this.document);if(a.data("cke-resizable")){var c=a.getStyle("width");
a=a.getStyle("height");c&&e.setAttribute("width",b(e.getAttribute("width"),c));a&&e.setAttribute("height",b(e.getAttribute("height"),a))}return e}}(),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(b){var h=b.lang,g=0,a={email:1,password:1,search:1,tel:1,text:1,url:1},e={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}"},m={checkbox:"input",radio:"input",textfield:"input",textarea:"textarea",select:"select",button:"input",form:"form",hiddenfield:"input",imagebutton:"input"},k=function(a,c,k){var l={allowedContent:e[c],requiredContent:m[c]};"form"==c&&(l.context="form");b.addCommand(c,new CKEDITOR.dialogCommand(c,l));b.ui.addButton&&b.ui.addButton(a,{label:h.common[a.charAt(0).toLowerCase()+a.slice(1)],command:c,toolbar:"forms,"+
(g+=10)});CKEDITOR.dialog.add(c,k)},l=this.path+"dialogs/";!b.blockless&&k("Form","form",l+"form.js");k("Checkbox","checkbox",l+"checkbox.js");k("Radio","radio",l+"radio.js");k("TextField","textfield",l+"textfield.js");k("Textarea","textarea",l+"textarea.js");k("Select","select",l+"select.js");k("Button","button",l+"button.js");var c=b.plugins.image;c&&!b.plugins.image2&&k("ImageButton","imagebutton",CKEDITOR.plugins.getPath("image")+"dialogs/image.js");k("HiddenField","hiddenfield",l+"hiddenfield.js");
b.addMenuItems&&(k={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&&(k.imagebutton={label:h.image.titleButton,command:"imagebutton",group:"imagebutton"}),!b.blockless&&(k.form={label:h.forms.form.menu,command:"form",group:"form"}),b.addMenuItems(k));b.contextMenu&&(!b.blockless&&b.contextMenu.addListener(function(a,c,b){if((a=b.contains("form",1))&&!a.isReadOnly())return{form:CKEDITOR.TRISTATE_OFF}}),b.contextMenu.addListener(function(b){if(b&&!b.isReadOnly()){var d=b.getName();if("select"==d)return{select:CKEDITOR.TRISTATE_OFF};
if("textarea"==d)return{textarea:CKEDITOR.TRISTATE_OFF};if("input"==d){var e=b.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(a[e])return{textfield:CKEDITOR.TRISTATE_OFF}}if("img"==d&&"hiddenfield"==b.data("cke-real-element-type"))return{hiddenfield:CKEDITOR.TRISTATE_OFF}}}));
b.on("doubleclick",function(c){var d=c.data.element;if(!b.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"}a[d]&&(c.data.dialog="textfield")}})},afterInit:function(b){var h=b.dataProcessor,g=h&&h.htmlFilter,h=h&&h.dataFilter;CKEDITOR.env.ie&&g&&g.addRules({elements:{input:function(a){a=a.attributes;var b=a.type;b||(a.type="text");"checkbox"!=b&&"radio"!=b||"on"!=a.value||delete a.value}}},{applyToAll:!0});h&&h.addRules({elements:{input:function(a){if("hidden"==a.attributes.type)return b.createFakeParserElement(a,"cke_hidden","hiddenfield")}}},{applyToAll:!0})}}),
CKEDITOR.plugins.forms={_setupRequiredAttribute:function(b){this.setValue(b.hasAttribute("required"))}},function(){var b={canUndo:!1,exec:function(b){var g=b.document.createElement("hr");b.insertElement(g)},allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",{init:function(h){h.blockless||(h.addCommand("horizontalrule",b),h.ui.addButton&&h.ui.addButton("HorizontalRule",{label:h.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"}))}})}(),CKEDITOR.plugins.add("htmlwriter",
{init:function(b){var h=new CKEDITOR.htmlWriter;h.forceSimpleAmpersand=b.config.forceSimpleAmpersand;h.indentationChars="string"===typeof b.config.dataIndentationChars?b.config.dataIndentationChars:"\t";b.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 b=CKEDITOR.dtd,h;for(h in CKEDITOR.tools.extend({},b.$nonBodyContent,b.$block,b.$listItem,b.$tableContent))this.setRules(h,{indent:!b[h]["#"],breakBeforeOpen:1,breakBeforeClose:!b[h]["#"],breakAfterClose:1,needsSpace:h in b.$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(b){var h=this._.rules[b];
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",b);this._.afterCloser=0},openTagClose:function(b,h){var g=this._.rules[b];h?(this._.output.push(this.selfClosingEnd),g&&g.breakAfterClose&&(this._.needsSpace=g.needsSpace)):(this._.output.push("\x3e"),g&&g.indent&&(this._.indentation+=this.indentationChars));g&&g.breakAfterOpen&&this.lineBreak();"pre"==
b&&(this._.inPre=1)},attribute:function(b,h){"string"==typeof h&&(h=CKEDITOR.tools.htmlEncodeAttr(h),this.forceSimpleAmpersand&&(h=h.replace(/&amp;/g,"\x26")));this._.output.push(" ",b,'\x3d"',h,'"')},closeTag:function(b){var h=this._.rules[b];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/",b,"\x3e");"pre"==b&&(this._.inPre=0);h&&h.breakAfterClose&&
(this.lineBreak(),this._.needsSpace=h.needsSpace);this._.afterCloser=1},text:function(b){this._.indent&&(this.indentation(),!this._.inPre&&(b=CKEDITOR.tools.ltrim(b)));this._.output.push(b)},comment:function(b){this._.indent&&this.indentation();this._.output.push("\x3c!--",b,"--\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(b,h){var g=this._.rules[b];g?CKEDITOR.tools.extend(g,h,!0):this._.rules[b]=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(b){var h=b.lang.iframe,g="iframe[align,longdesc,tabindex,frameborder,height,name,scrolling,src,title,width]";b.plugins.dialogadvtab&&(g+=";iframe"+b.plugins.dialogadvtab.allowedContent({id:1,classes:1,styles:1}));CKEDITOR.dialog.add("iframe",this.path+"dialogs/iframe.js");b.addCommand("iframe",new CKEDITOR.dialogCommand("iframe",{allowedContent:g,requiredContent:"iframe"}));b.ui.addButton&&b.ui.addButton("Iframe",{label:h.toolbar,command:"iframe",toolbar:"insert,80"});b.on("doubleclick",
function(a){var b=a.data.element;b.is("img")&&"iframe"==b.data("cke-real-element-type")&&(a.data.dialog="iframe")});b.addMenuItems&&b.addMenuItems({iframe:{label:h.title,command:"iframe",group:"image"}});b.contextMenu&&b.contextMenu.addListener(function(a){if(a&&a.is("img")&&"iframe"==a.data("cke-real-element-type"))return{iframe:CKEDITOR.TRISTATE_OFF}})},afterInit:function(b){var h=b.dataProcessor;(h=h&&h.dataFilter)&&h.addRules({elements:{iframe:function(g){return b.createFakeParserElement(g,"cke_iframe",
"iframe",!0)}}})}})}(),function(){function b(b,a){a||(a=b.getSelection().getSelectedElement());if(a&&a.is("img")&&!a.data("cke-realelement")&&!a.isReadOnly())return a}function h(b){var a=b.getStyle("float");if("inherit"==a||"none"==a)a=0;a||(a=b.getAttribute("align"));return a}CKEDITOR.plugins.add("image",{requires:"dialog",init:function(g){if(!g.plugins.detectConflict("image",["easyimage","image2"])){CKEDITOR.dialog.add("image",this.path+"dialogs/image.js");var a="img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}";
CKEDITOR.dialog.isTabEnabled(g,"image","advanced")&&(a="img[alt,dir,id,lang,longdesc,!src,title]{*}(*)");g.addCommand("image",new CKEDITOR.dialogCommand("image",{allowedContent:a,requiredContent:"img[alt,src]",contentTransformations:[["img{width}: sizeToStyle","img[width]: sizeToAttribute"],["img{float}: alignmentToStyle","img[align]: alignmentToAttribute"]]}));g.ui.addButton&&g.ui.addButton("Image",{label:g.lang.common.image,command:"image",toolbar:"insert,10"});g.on("doubleclick",function(a){var b=
a.data.element;!b.is("img")||b.data("cke-realelement")||b.isReadOnly()||(a.data.dialog="image")});g.addMenuItems&&g.addMenuItems({image:{label:g.lang.image.menu,command:"image",group:"image"}});g.contextMenu&&g.contextMenu.addListener(function(a){if(b(g,a))return{image:CKEDITOR.TRISTATE_OFF}})}},afterInit:function(g){function a(a){var m=g.getCommand("justify"+a);if(m){if("left"==a||"right"==a)m.on("exec",function(k){var l=b(g),c;l&&(c=h(l),c==a?(l.removeStyle("float"),a==h(l)&&l.removeAttribute("align")):
l.setStyle("float",a),k.cancel())});m.on("refresh",function(k){var l=b(g);l&&(l=h(l),this.setState(l==a?CKEDITOR.TRISTATE_ON:"right"==a||"left"==a?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),k.cancel())})}}g.plugins.image2||(a("left"),a("right"),a("center"),a("block"))}})}(),CKEDITOR.config.image_removeLinkByEmptyURL=!0,function(){function b(a,b){var m,k;b.on("refresh",function(a){var c=[h],b;for(b in a.data.states)c.push(a.data.states[b]);this.setState(CKEDITOR.tools.search(c,g)?g:h)},b,null,
100);b.on("exec",function(b){m=a.getSelection();k=m.createBookmarks(1);b.data||(b.data={});b.data.done=!1},b,null,0);b.on("exec",function(){a.forceNextSelectionCheck();m.selectBookmarks(k)},b,null,100)}var h=CKEDITOR.TRISTATE_DISABLED,g=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(a){var e=CKEDITOR.plugins.indent.genericDefinition;b(a,a.addCommand("indent",new e(!0)));b(a,a.addCommand("outdent",new e));a.ui.addButton&&(a.ui.addButton("Indent",{label:a.lang.indent.indent,command:"indent",
directional:!0,toolbar:"indent,20"}),a.ui.addButton("Outdent",{label:a.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"}));a.on("dirChanged",function(b){var e=a.createRange(),g=b.data.node;e.setStartBefore(g);e.setEndAfter(g);for(var c=new CKEDITOR.dom.walker(e),f;f=c.next();)if(f.type==CKEDITOR.NODE_ELEMENT)if(!f.equals(g)&&f.getDirection())e.setStartAfter(f),c=new CKEDITOR.dom.walker(e);else{var d=a.config.indentClasses;if(d)for(var h="ltr"==b.data.dir?["_rtl",""]:["","_rtl"],
q=0;q<d.length;q++)f.hasClass(d[q]+h[0])&&(f.removeClass(d[q]+h[0]),f.addClass(d[q]+h[1]));d=f.getStyle("margin-right");h=f.getStyle("margin-left");d?f.setStyle("margin-left",d):f.removeStyle("margin-left");h?f.setStyle("margin-right",h):f.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(a){this.isIndent=!!a;this.startDisabled=!this.isIndent},specificDefinition:function(a,b,g){this.name=b;this.editor=a;this.jobs={};this.enterBr=a.config.enterMode==CKEDITOR.ENTER_BR;
this.isIndent=!!g;this.relatedGlobal=g?"indent":"outdent";this.indentKey=g?9:CKEDITOR.SHIFT+9;this.database={}},registerCommands:function(a,b){a.on("pluginsLoaded",function(){for(var a in b)(function(a,b){var c=a.getCommand(b.relatedGlobal),f;for(f in b.jobs)c.on("exec",function(c){c.data.done||(a.fire("lockSnapshot"),b.execJob(a,f)&&(c.data.done=!0),a.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(b.database))},this,null,f),c.on("refresh",function(c){c.data.states||(c.data.states={});
c.data.states[b.name+"@"+f]=b.refreshJob(a,f,c.data.path)},this,null,f);a.addFeature(b)})(this,b[a])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(a,b){var g=this.jobs[b];if(g.state!=h)return g.exec.call(this,a)},refreshJob:function(a,b,g){b=this.jobs[b];a.activeFilter.checkFeature(this)?b.state=b.refresh.call(this,a,g):b.state=h;return b.state},getContext:function(a){return a.contains(this.context)}}}(),
function(){function b(a){function c(c){for(var h=k.startContainer,m=k.endContainer;h&&!h.getParent().equals(c);)h=h.getParent();for(;m&&!m.getParent().equals(c);)m=m.getParent();if(!h||!m)return!1;for(var y=[],p=!1;!p;)h.equals(m)&&(p=!0),y.push(h),h=h.getNext();if(1>y.length)return!1;h=c.getParents(!0);for(m=0;m<h.length;m++)if(h[m].getName&&e[h[m].getName()]){c=h[m];break}for(var h=b.isIndent?1:-1,m=y[0],y=y[y.length-1],p=CKEDITOR.plugins.list.listToArray(c,d),v=p[y.getCustomData("listarray_index")].indent,
m=m.getCustomData("listarray_index");m<=y.getCustomData("listarray_index");m++)if(p[m].indent+=h,0<h){for(var t=p[m].parent,C=m-1;0<=C;C--)if(p[C].indent===h){t=p[C].parent;break}p[m].parent=new CKEDITOR.dom.element(t.getName(),t.getDocument())}for(m=y.getCustomData("listarray_index")+1;m<p.length&&p[m].indent>v;m++)p[m].indent+=h;h=CKEDITOR.plugins.list.arrayToList(p,d,null,a.config.enterMode,c.getDirection());if(!b.isIndent){var D;if((D=c.getParent())&&D.is("li"))for(var y=h.listNode.getChildren(),
A=[],u,m=y.count()-1;0<=m;m--)(u=y.getItem(m))&&u.is&&u.is("li")&&A.push(u)}h&&h.listNode.replace(c);if(A&&A.length)for(m=0;m<A.length;m++){for(u=c=A[m];(u=u.getNext())&&u.is&&u.getName()in e;)CKEDITOR.env.needsNbspFiller&&!c.getFirst(g)&&c.append(k.document.createText(" ")),c.append(u);c.insertAfter(D)}h&&a.fire("contentDomInvalidated");return!0}for(var b=this,d=this.database,e=this.context,k,m=a.getSelection(),m=(m&&m.getRanges()).createIterator();k=m.getNextRange();){for(var x=k.getCommonAncestor();x&&
(x.type!=CKEDITOR.NODE_ELEMENT||!e[x.getName()]);){if(a.editable().equals(x)){x=!1;break}x=x.getParent()}x||(x=k.startPath().contains(e))&&k.setEndAt(x,CKEDITOR.POSITION_BEFORE_END);if(!x){var p=k.getEnclosedNode();p&&p.type==CKEDITOR.NODE_ELEMENT&&p.getName()in e&&(k.setStartAt(p,CKEDITOR.POSITION_AFTER_START),k.setEndAt(p,CKEDITOR.POSITION_BEFORE_END),x=p)}x&&k.startContainer.type==CKEDITOR.NODE_ELEMENT&&k.startContainer.getName()in e&&(p=new CKEDITOR.dom.walker(k),p.evaluator=h,k.startContainer=
p.next());x&&k.endContainer.type==CKEDITOR.NODE_ELEMENT&&k.endContainer.getName()in e&&(p=new CKEDITOR.dom.walker(k),p.evaluator=h,k.endContainer=p.previous());if(x)return c(x)}return 0}function h(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")}function g(b){return a(b)&&e(b)}var a=CKEDITOR.dom.walker.whitespaces(!0),e=CKEDITOR.dom.walker.bookmark(!1,!0),m=CKEDITOR.TRISTATE_DISABLED,k=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(a){function c(a){f.specificDefinition.apply(this,
arguments);this.requiredContent=["ul","ol"];a.on("key",function(c){var b=a.elementPath();if("wysiwyg"==a.mode&&c.data.keyCode==this.indentKey&&b){var f=this.getContext(b);!f||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,b,f)||(a.execCommand(this.relatedGlobal),c.cancel())}},this);this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(a,c){var d=this.getContext(c),b=CKEDITOR.plugins.indentList.firstItemInPath(this.context,c,d);return d&&this.isIndent&&!b?k:m}:function(a,
c){return!this.getContext(c)||this.isIndent?m:k},exec:CKEDITOR.tools.bind(b,this)}}var f=CKEDITOR.plugins.indent;f.registerCommands(a,{indentlist:new c(a,"indentlist",!0),outdentlist:new c(a,"outdentlist")});CKEDITOR.tools.extend(c.prototype,f.specificDefinition.prototype,{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(a,c,b){var d=c.contains(h);b||(b=c.contains(a));return b&&d&&d.equals(b.getFirst(h))}}(),function(){function b(a,b,c){if(!a.getCustomData("indent_processed")){var f=
this.editor,d=this.isIndent;if(b){f=a.$.className.match(this.classNameRegex);c=0;f&&(f=f[1],c=CKEDITOR.tools.indexOf(b,f)+1);if(0>(c+=d?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 e=f.config.indentOffset||40;isNaN(c)&&(c=0);c+=(d?1:-1)*e;if(0>c)return;c=Math.max(c,0);c=Math.ceil(c/e)*e;a.setStyle(b,c?c+(f.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 g=CKEDITOR.dtd.$listItem,a=CKEDITOR.dtd.$list,e=CKEDITOR.TRISTATE_DISABLED,m=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(k){function l(){c.specificDefinition.apply(this,arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,
styles:f?null:"margin-left,margin-right",classes:f||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")+(f?
"("+f.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,c){var b=c.block||c.blockLimit;if(!b.is(g))var k=b.getAscendant(g),b=k&&c.contains(k)||b;b.is(g)&&(b=b.getParent());if(this.enterBr||this.getContext(c)){if(f){var k=f,b=b.$.className.match(this.classNameRegex),l=this.isIndent,k=b?l?b[1]!=k.slice(-1):!0:l;return k?m:e}return this.isIndent?m:b?CKEDITOR[0>=(parseInt(b.getStyle(h(b)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:e}return e},exec:function(c){var e=c.getSelection(),e=
e&&e.getRanges()[0],g;if(g=c.elementPath().contains(a))b.call(this,g,f);else for(e=e.createIterator(),c=c.config.enterMode,e.enforceRealBlocks=!0,e.enlargeBr=c!=CKEDITOR.ENTER_BR;g=e.getNextParagraph(c==CKEDITOR.ENTER_P?"p":"div");)g.isReadOnly()||b.call(this,g,f);return!0}}}}var c=CKEDITOR.plugins.indent,f=k.config.indentClasses;c.registerCommands(k,{indentblock:new l(k,"indentblock",!0),outdentblock:new l(k,"outdentblock")});CKEDITOR.tools.extend(l.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:f?new RegExp("(?:^|\\s+)("+f.join("|")+")(?\x3d$|\\s)"):null})}})}(),function(){function b(a,b){var g;if(b)g=a.getComputedStyle("text-align");else{for(;!a.hasAttribute||!a.hasAttribute("align")&&!a.getStyle("text-align");){g=a.getParent();if(!g)break;a=g}g=a.getStyle("text-align")||a.getAttribute("align")||""}g&&(g=g.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!g&&b&&(g="rtl"==a.getComputedStyle("direction")?"right":
"left");return g}function h(a,b,g){this.editor=a;this.name=b;this.value=g;this.context="p";b=a.config.justifyClasses;var h=a.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(b){switch(g){case "left":this.cssClassName=b[0];break;case "center":this.cssClassName=b[1];break;case "right":this.cssClassName=b[2];break;case "justify":this.cssClassName=b[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+b.join("|")+")(?\x3d$|\\s)");this.requiredContent=h+"("+this.cssClassName+")"}else this.requiredContent=h+
"{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 g(a){var b=a.editor,g=b.createRange();g.setStartBefore(a.data.node);g.setEndAfter(a.data.node);for(var h=new CKEDITOR.dom.walker(g),l;l=h.next();)if(l.type==CKEDITOR.NODE_ELEMENT)if(!l.equals(a.data.node)&&l.getDirection())g.setStartAfter(l),h=new CKEDITOR.dom.walker(g);
else{var c=b.config.justifyClasses;c&&(l.hasClass(c[0])?(l.removeClass(c[0]),l.addClass(c[2])):l.hasClass(c[2])&&(l.removeClass(c[2]),l.addClass(c[0])));c=l.getStyle("text-align");"left"==c?l.setStyle("text-align","right"):"right"==c&&l.setStyle("text-align","left")}}h.prototype={exec:function(a){var e=a.getSelection(),g=a.config.enterMode;if(e){for(var h=e.createBookmarks(),l=e.getRanges(),c=this.cssClassName,f,d,n=a.config.useComputedState,q=l.length-1;0<=q;q--)for(f=l[q].createIterator(),f.enlargeBr=
g!=CKEDITOR.ENTER_BR;d=f.getNextParagraph(g==CKEDITOR.ENTER_P?"p":"div");)if(!d.isReadOnly()){var u=d.getName(),x;x=a.activeFilter.check(u+"{text-align}");if((u=a.activeFilter.check(u+"("+c+")"))||x){d.removeAttribute("align");d.removeStyle("text-align");var p=c&&(d.$.className=CKEDITOR.tools.ltrim(d.$.className.replace(this.cssClassRegex,""))),w=this.state==CKEDITOR.TRISTATE_OFF&&(!n||b(d,!0)!=this.value);c&&u?w?d.addClass(c):p||d.removeAttribute("class"):w&&x&&d.setStyle("text-align",this.value)}}a.focus();
a.forceNextSelectionCheck();e.selectBookmarks(h)}},refresh:function(a,e){var g=e.block||e.blockLimit,h=g.getName(),l=g.equals(a.editable()),h=this.cssClassName?a.activeFilter.check(h+"("+this.cssClassName+")"):a.activeFilter.check(h+"{text-align}");l&&!CKEDITOR.dtd.$list[e.lastElement.getName()]?this.setState(CKEDITOR.TRISTATE_OFF):!l&&h?this.setState(b(g,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 b=new h(a,"justifyleft","left"),m=new h(a,"justifycenter","center"),k=new h(a,"justifyright","right"),l=new h(a,"justifyblock","justify");a.addCommand("justifyleft",b);a.addCommand("justifycenter",m);a.addCommand("justifyright",k);a.addCommand("justifyblock",l);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",g)}}})}(),CKEDITOR.plugins.add("menubutton",{requires:"button,menu",onLoad:function(){var b=function(b){var g=this._,a=CKEDITOR.document.getById(g.id),e=g.menu;g.state!==CKEDITOR.TRISTATE_DISABLED&&(g.on&&
e?e.hide():(g.previousState=g.state,e||(e=g.menu=new CKEDITOR.menu(b,{panel:{className:"cke_menu_panel",attributes:{"aria-label":b.lang.common.options}}}),e.onHide=CKEDITOR.tools.bind(function(){var e=this.command?b.getCommand(this.command).modes:this.modes;this.setState(!e||e[b.mode]?g.previousState:CKEDITOR.TRISTATE_DISABLED);g.on=0;a.setAttribute("aria-expanded","false")},this),this.onMenu&&e.addListener(this.onMenu)),this.setState(CKEDITOR.TRISTATE_ON),g.on=1,a.setAttribute("aria-expanded","true"),
setTimeout(function(){e.show(CKEDITOR.document.getById(g.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=b},statics:{handler:{create:function(b){return new CKEDITOR.ui.menuButton(b)}}}})},beforeInit:function(b){b.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}}),CKEDITOR.UI_MENUBUTTON="menubutton","use strict",function(){CKEDITOR.plugins.add("language",{requires:"menubutton",
init:function(b){var h=b.config.language_list||["ar:Arabic:rtl","fr:French","es:Spanish"],g=this,a=b.lang.language,e={},m,k,l,c;b.addCommand("language",{allowedContent:"span[!lang,dir]",requiredContent:"span[lang]",contextSensitive:!0,exec:function(a,c){var b=e["language_"+c];if(b)a[b.style.checkActive(a.elementPath(),a)?"removeStyle":"applyStyle"](b.style)},refresh:function(a){this.setState(g.getCurrentLangElement(a)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}});for(c=0;c<h.length;c++)m=h[c].split(":"),
k=m[0],l="language_"+k,e[l]={label:m[1],langId:k,group:"language",order:c,ltr:"rtl"!=(""+m[2]).toLowerCase(),onClick:function(){b.execCommand("language",this.langId)},role:"menuitemcheckbox"},e[l].style=new CKEDITOR.style({element:"span",attributes:{lang:k,dir:e[l].ltr?"ltr":"rtl"}});e.language_remove={label:a.remove,group:"language_remove",state:CKEDITOR.TRISTATE_DISABLED,order:e.length,onClick:function(){var a=g.getCurrentLangElement(b);a&&b.execCommand("language",a.getAttribute("lang"))}};b.addMenuGroup("language",
1);b.addMenuGroup("language_remove");b.addMenuItems(e);b.ui.add("Language",CKEDITOR.UI_MENUBUTTON,{label:a.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 c=CKEDITOR.tools.object.keys(CKEDITOR.lang.rtl),c=-1!==CKEDITOR.tools.array.indexOf(c,a.attributes.lang)?"rtl":"ltr";a.attributes.dir=c}}]],
onMenu:function(){var a={},c=g.getCurrentLangElement(b),h;for(h in e)a[h]=CKEDITOR.TRISTATE_OFF;a.language_remove=c?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;c&&(a["language_"+c.getAttribute("lang")]=CKEDITOR.TRISTATE_ON);return a}});b.addRemoveFormatFilter&&b.addRemoveFormatFilter(function(a){return!(a.is("span")&&a.getAttribute("dir")&&a.getAttribute("lang"))})},getCurrentLangElement:function(b){var h=b.elementPath();b=h&&h.elements;var g;if(h)for(var a=0;a<b.length;a++)h=b[a],!g&&"span"==
h.getName()&&h.hasAttribute("lang")&&(g=h);return g}})}(),"use strict",function(){function b(a){return a.replace(/'/g,"\\$\x26")}function h(a){for(var c=a.length,d=[],b,f=0;f<c;f++)b=a.charCodeAt(f),d.push(b);return"String.fromCharCode("+d.join(",")+")"}function g(a,c){for(var d=a.plugins.link,f=d.compiledProtectionFunction.params,d=[d.compiledProtectionFunction.name,"("],e,g,h=0;h<f.length;h++)e=f[h].toLowerCase(),g=c[e],0<h&&d.push(","),d.push("'",g?b(encodeURIComponent(c[e])):"","'");d.push(")");
return d.join("")}function a(a){a=a.config.emailProtection||"";var c;a&&"encode"!=a&&(c={},a.replace(/^([^(]+)\(([^)]+)\)$/,function(a,d,b){c.name=d;c.params=[];b.replace(/[^,\s]+/g,function(a){c.params.push(a)})}));return c}CKEDITOR.plugins.add("link",{requires:"dialog,fakeobjects",onLoad:function(){function a(c){return d.replace(/%1/g,"rtl"==c?"right":"left").replace(/%2/g,"cke_contents_"+c)}var c="background:url("+CKEDITOR.getUrl(this.path+"images"+(CKEDITOR.env.hidpi?"/hidpi":"")+"/anchor.png")+
") no-repeat %1 center;border:1px dotted #00f;background-size:16px;",d=".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{"+c+"padding-%1:18px;cursor:auto;}.%2 img.cke_anchor{"+c+"width:16px;min-height:15px;height:1.15em;vertical-align:text-bottom;}";CKEDITOR.addCss(a("ltr")+a("rtl"))},init:function(c){var d="a[!href]";CKEDITOR.dialog.isTabEnabled(c,"link","advanced")&&(d=d.replace("]",",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type,download]{*}(*)"));
CKEDITOR.dialog.isTabEnabled(c,"link","target")&&(d=d.replace("]",",target,onclick]"));c.addCommand("link",new CKEDITOR.dialogCommand("link",{allowedContent:d,requiredContent:"a[href]"}));c.addCommand("anchor",new CKEDITOR.dialogCommand("anchor",{allowedContent:"a[!name,id]",requiredContent:"a[name]"}));c.addCommand("unlink",new CKEDITOR.unlinkCommand);c.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand);c.setKeystroke(CKEDITOR.CTRL+76,"link");c.setKeystroke(CKEDITOR.CTRL+75,"link");c.ui.addButton&&
(c.ui.addButton("Link",{label:c.lang.link.toolbar,command:"link",toolbar:"links,10"}),c.ui.addButton("Unlink",{label:c.lang.link.unlink,command:"unlink",toolbar:"links,20"}),c.ui.addButton("Anchor",{label:c.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");c.on("doubleclick",function(a){var d=a.data.element.getAscendant({a:1,img:1},!0);d&&!d.isReadOnly()&&(d.is("a")?(a.data.dialog=
!d.getAttribute("name")||d.getAttribute("href")&&d.getChildCount()?"link":"anchor",a.data.link=d):CKEDITOR.plugins.link.tryRestoreFakeAnchor(c,d)&&(a.data.dialog="anchor"))},null,null,0);c.on("doubleclick",function(a){a.data.dialog in{link:1,anchor:1}&&a.data.link&&c.getSelection().selectElement(a.data.link)},null,null,20);c.addMenuItems&&c.addMenuItems({anchor:{label:c.lang.link.anchor.menu,command:"anchor",group:"anchor",order:1},removeAnchor:{label:c.lang.link.anchor.remove,command:"removeAnchor",
group:"anchor",order:5},link:{label:c.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:c.lang.link.unlink,command:"unlink",group:"link",order:5}});c.contextMenu&&c.contextMenu.addListener(function(a){if(!a||a.isReadOnly())return null;a=CKEDITOR.plugins.link.tryRestoreFakeAnchor(c,a);if(!a&&!(a=CKEDITOR.plugins.link.getSelectedLink(c)))return null;var d={};a.getAttribute("href")&&a.getChildCount()&&(d={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF});a&&a.hasAttribute("name")&&
(d.anchor=d.removeAnchor=CKEDITOR.TRISTATE_OFF);return d});this.compiledProtectionFunction=a(c)},afterInit:function(a){a.dataProcessor.dataFilter.addRules({elements:{a:function(c){return c.attributes.name?c.children.length?null:a.createFakeParserElement(c,"cke_anchor","anchor"):null}}});var c=a._.elementsPath&&a._.elementsPath.filters;c&&c.push(function(c,d){if("a"==d&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,c)||c.getAttribute("name")&&(!c.getAttribute("href")||!c.getChildCount())))return"anchor"})}});
var e=/^javascript:/,m=/^(?:mailto)(?:(?!\?(subject|body)=).)+/i,k=/subject=([^;?:@&=$,\/]*)/i,l=/body=([^;?:@&=$,\/]*)/i,c=/^#(.*)$/,f=/^((?:http|https|ftp|news):\/\/)?(.*)$/,d=/^(_(?:self|top|parent|blank))$/,n=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,q=/^javascript:([^(]+)\(([^)]+)\)$/,u=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,x=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,p=/^tel:(.*)$/,w={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,c){var d=a.getSelection(),b=d.getSelectedElement(),f=d.getRanges(),e=[],g;if(!c&&b&&b.is("a"))return b;for(b=0;b<f.length;b++)if(g=d.getRanges()[b],g.shrink(CKEDITOR.SHRINK_ELEMENT,!0,{skipBogus:!0}),(g=a.elementPath(g.getCommonAncestor()).contains("a",
1))&&c)e.push(g);else if(g)return g;return c?e:null},getEditorAnchors:function(a){for(var c=a.editable(),d=c.isInline()&&!a.plugins.divarea?a.document:c,c=d.getElementsByTag("a"),d=d.getElementsByTag("img"),b=[],f=0,e;e=c.getItem(f++);)(e.data("cke-saved-name")||e.hasAttribute("name"))&&b.push({name:e.data("cke-saved-name")||e.getAttribute("name"),id:e.getAttribute("id")});for(f=0;e=d.getItem(f++);)(e=this.tryRestoreFakeAnchor(a,e))&&b.push({name:e.getAttribute("name"),id:e.getAttribute("id")});return b},
fakeAnchor:!0,tryRestoreFakeAnchor:function(a,c){if(c&&c.data("cke-real-element-type")&&"anchor"==c.data("cke-real-element-type")){var d=a.restoreRealElement(c);if(d.data("cke-saved-name"))return d}},parseLinkAttributes:function(a,b){var g=b&&(b.data("cke-saved-href")||b.getAttribute("href"))||"",h=a.plugins.link.compiledProtectionFunction,v=a.config.emailProtection,t={},C;g.match(e)&&("encode"==v?g=g.replace(n,function(a,c,d){d=d||"";return"mailto:"+String.fromCharCode.apply(String,c.split(","))+
d.replace(/\\'/g,"'")}):v&&g.replace(q,function(a,c,d){if(c==h.name){t.type="email";a=t.email={};c=/(^')|('$)/g;d=d.match(/[^,\s]+/g);for(var b=d.length,f,e,g=0;g<b;g++)f=decodeURIComponent,e=d[g].replace(c,"").replace(/\\'/g,"'"),e=f(e),f=h.params[g].toLowerCase(),a[f]=e;a.address=[a.name,a.domain].join("@")}}));if(!t.type)if(v=g.match(c))t.type="anchor",t.anchor={},t.anchor.name=t.anchor.id=v[1];else if(v=g.match(p))t.type="tel",t.tel=v[1];else if(v=g.match(m)){C=g.match(k);var g=g.match(l),D=t.email=
{};t.type="email";D.address=v[0].replace("mailto:","");C&&(D.subject=decodeURIComponent(C[1]));g&&(D.body=decodeURIComponent(g[1]))}else g&&(C=g.match(f))&&(t.type="url",t.url={},t.url.protocol=C[1],t.url.url=C[2]);if(b){if(g=b.getAttribute("target"))t.target={type:g.match(d)?g:"frame",name:g};else if(g=(g=b.data("cke-pa-onclick")||b.getAttribute("onclick"))&&g.match(u))for(t.target={type:"popup",name:g[1]};v=x.exec(g[2]);)"yes"!=v[2]&&"1"!=v[2]||v[1]in{height:1,width:1,top:1,left:1}?isFinite(v[2])&&
(t.target[v[1]]=v[2]):t.target[v[1]]=!0;null!==b.getAttribute("download")&&(t.download=!0);var g={},A;for(A in w)(v=b.getAttribute(A))&&(g[w[A]]=v);if(A=b.data("cke-saved-name")||g.advName)g.advName=A;CKEDITOR.tools.isEmpty(g)||(t.advanced=g)}return t},getLinkAttributes:function(a,c){var d=a.config.emailProtection||"",f={};switch(c.type){case "url":var d=c.url&&void 0!==c.url.protocol?c.url.protocol:"http://",e=c.url&&CKEDITOR.tools.trim(c.url.url)||"";f["data-cke-saved-href"]=0===e.indexOf("/")?
e:d+e;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,e=k.address;switch(d){case "":case "encode":var m=encodeURIComponent(k.subject||""),l=encodeURIComponent(k.body||""),k=[];m&&k.push("subject\x3d"+m);l&&k.push("body\x3d"+l);k=k.length?"?"+k.join("\x26"):"";"encode"==d?(d=["javascript:void(location.href\x3d'mailto:'+",h(e)],k&&d.push("+'",b(k),"'"),d.push(")")):d=["mailto:",e,k];break;default:d=e.split("@",
2),k.name=d[0],k.domain=d[1],d=["javascript:",g(a,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(" "),e=n.length,m=function(a){c.target[a]&&n.push(a+"\x3d"+c.target[a])},k=0;k<e;k++)n[k]+=c.target[n[k]]?"\x3dyes":"\x3dno";m("width");m("left");m("height");m("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 p in w)(d=c.advanced[w[p]])&&(f[p]=d);f.name&&(f["data-cke-saved-name"]=f.name)}f["data-cke-saved-href"]&&(f.href=f["data-cke-saved-href"]);p={target:1,onclick:1,"data-cke-pa-onclick":1,"data-cke-saved-name":1,download:1};c.advanced&&CKEDITOR.tools.extend(p,w);for(var q in f)delete p[q];return{set:f,removed:CKEDITOR.tools.object.keys(p)}},
showDisplayTextForElement:function(a,c){var d={img:1,table:1,tbody:1,thead:1,tfoot:1,input:1,select:1,textarea:1},b=c.getSelection();return c.widgets&&c.widgets.focused||b&&1<b.getRanges().length?!1:!a||!a.getName||!a.is(d)}};CKEDITOR.unlinkCommand=function(){};CKEDITOR.unlinkCommand.prototype={exec:function(a){if(CKEDITOR.env.ie){var c=a.getSelection().getRanges()[0],d=c.getPreviousEditableNode()&&c.getPreviousEditableNode().getAscendant("a",!0)||c.getNextEditableNode()&&c.getNextEditableNode().getAscendant("a",
!0),b;c.collapsed&&d&&(b=c.createBookmark(),c.selectNodeContents(d),c.select())}d=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1});a.removeStyle(d);b&&(c.moveToBookmark(b),c.select())},refresh:function(a,c){var d=c.lastElement&&c.lastElement.getAscendant("a",!0);d&&"a"==d.getName()&&d.getAttribute("href")&&d.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 c=a.getSelection(),d=c.createBookmarks(),b;if(c&&(b=c.getSelectedElement())&&(b.getChildCount()?b.is("a"):CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,b)))b.remove(1);else if(b=CKEDITOR.plugins.link.getSelectedLink(a))b.hasAttribute("href")?(b.removeAttributes({name:1,"data-cke-saved-name":1}),b.removeClass("cke_anchor")):b.remove(1);c.selectBookmarks(d)},requiredContent:"a[name]"};
CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0,linkDefaultProtocol:"http://"})}(),function(){function b(a,c,d,b){for(var f=CKEDITOR.plugins.list.listToArray(c.root,d),e=[],g=0;g<c.contents.length;g++){var h=c.contents[g];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(e.push(h),CKEDITOR.dom.element.setMarker(d,h,"list_item_processed",!0))}for(var h=c.root.getDocument(),k,m,g=0;g<e.length;g++){var l=e[g].getCustomData("listarray_index");k=
f[l].parent;k.is(this.type)||(m=h.createElement(this.type),k.copyAttributes(m,{start:1,type:1}),m.removeStyle("list-style-type"),f[l].parent=m)}d=CKEDITOR.plugins.list.arrayToList(f,d,null,a.config.enterMode);for(var n,f=d.listNode.getChildCount(),g=0;g<f&&(n=d.listNode.getChild(g));g++)n.getName()==this.type&&b.push(n);d.listNode.replace(c.root);a.fire("contentDomInvalidated")}function h(a,c,d){var b=c.contents,f=c.root.getDocument(),e=[];if(1==b.length&&b[0].equals(c.root)){var g=f.createElement("div");
b[0].moveChildren&&b[0].moveChildren(g);b[0].append(g);b[0]=g}c=c.contents[0].getParent();for(g=0;g<b.length;g++)c=c.getCommonAncestor(b[g].getParent());a=a.config.useComputedState;for(var h,k,g=0;g<b.length;g++)for(var m=b[g],l;l=m.getParent();){if(l.equals(c)){e.push(m);!k&&m.getDirection()&&(k=1);m=m.getDirection(a);null!==h&&(h=h&&h!=m?null:m);break}m=l}if(!(1>e.length)){b=e[e.length-1].getNext();g=f.createElement(this.type);for(d.push(g);e.length;)d=e.shift(),a=f.createElement("li"),m=d,m.is("pre")||
x.test(m.getName())||"false"==m.getAttribute("contenteditable")?d.appendTo(a):(d.copyAttributes(a),h&&d.getDirection()&&(a.removeStyle("direction"),a.removeAttribute("dir")),d.moveChildren(a),d.remove()),a.appendTo(g);h&&k&&g.setAttribute("dir",h);b?g.insertBefore(b):g.appendTo(c)}}function g(a,c,d){function b(d){if(!(!(m=k[d?"getFirst":"getLast"]())||m.is&&m.isBlockBoundary()||!(l=c.root[d?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||l.is&&l.isBlockBoundary({br:1})))a.document.createElement("br")[d?
"insertBefore":"insertAfter"](m)}for(var f=CKEDITOR.plugins.list.listToArray(c.root,d),e=[],g=0;g<c.contents.length;g++){var h=c.contents[g];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(e.push(h),CKEDITOR.dom.element.setMarker(d,h,"list_item_processed",!0))}h=null;for(g=0;g<e.length;g++)h=e[g].getCustomData("listarray_index"),f[h].indent=-1;for(g=h+1;g<f.length;g++)if(f[g].indent>f[g-1].indent+1){e=f[g-1].indent+1-f[g].indent;for(h=f[g].indent;f[g]&&f[g].indent>=h;)f[g].indent+=
e,g++;g--}var k=CKEDITOR.plugins.list.arrayToList(f,d,null,a.config.enterMode,c.root.getAttribute("dir")).listNode,m,l;b(!0);b();k.replace(c.root);a.fire("contentDomInvalidated")}function a(a,c){this.name=a;this.context=this.type=c;this.allowedContent=c+" li";this.requiredContent=c}function e(a,c,d,b){for(var f,e;f=a[b?"getLast":"getFirst"](p);)(e=f.getDirection(1))!==c.getDirection(1)&&f.setAttribute("dir",e),f.remove(),d?f[b?"insertBefore":"insertAfter"](d):c.append(f,b),d=f}function m(a){function c(d){var b=
a[d?"getPrevious":"getNext"](q);b&&b.type==CKEDITOR.NODE_ELEMENT&&b.is(a.getName())&&(e(a,b,null,!d),a.remove(),a=b)}c();c(1)}function k(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function l(a,d,b){a.fire("saveSnapshot");b.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var f=b.extractContents();d.trim(!1,!0);var g=d.createBookmark(),h=new CKEDITOR.dom.elementPath(d.startContainer),k=h.block,h=h.lastElement.getAscendant("li",
1)||k,l=new CKEDITOR.dom.elementPath(b.startContainer),n=l.contains(CKEDITOR.dtd.$listItem),l=l.contains(CKEDITOR.dtd.$list);k?(k=k.getBogus())&&k.remove():l&&(k=l.getPrevious(q))&&u(k)&&k.remove();(k=f.getLast())&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("br")&&k.remove();(k=d.startContainer.getChild(d.startOffset))?f.insertBefore(k):d.startContainer.append(f);n&&(f=c(n))&&(h.contains(n)?(e(f,n.getParent(),n),f.remove()):h.append(f));for(;b.checkStartOfBlock()&&b.checkEndOfBlock();){l=b.startPath();f=
l.block;if(!f)break;f.is("li")&&(h=f.getParent(),f.equals(h.getLast(q))&&f.equals(h.getFirst(q))&&(f=h));b.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove()}b=b.clone();f=a.editable();b.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);b=new CKEDITOR.dom.walker(b);b.evaluator=function(a){return q(a)&&!u(a)};(b=b.next())&&b.type==CKEDITOR.NODE_ELEMENT&&b.getName()in CKEDITOR.dtd.$list&&m(b);d.moveToBookmark(g);d.select();a.fire("saveSnapshot")}function c(a){return(a=a.getLast(q))&&a.type==CKEDITOR.NODE_ELEMENT&&
a.getName()in f?a:null}var f={ol:1,ul:1},d=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(),q=function(a){return!(d(a)||n(a))},u=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,c,d,b,e){if(!f[a.getName()])return[];b||(b=0);d||(d=[]);for(var g=0,h=a.getChildCount();g<h;g++){var k=a.getChild(g);k.type==CKEDITOR.NODE_ELEMENT&&k.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(k,c,d,b+1);if("li"==k.$.nodeName.toLowerCase()){var m={parent:a,
indent:b,element:k,contents:[]};e?m.grandparent=e:(m.grandparent=a.getParent(),m.grandparent&&"li"==m.grandparent.$.nodeName.toLowerCase()&&(m.grandparent=m.grandparent.getParent()));c&&CKEDITOR.dom.element.setMarker(c,k,"listarray_index",d.length);d.push(m);for(var l=0,n=k.getChildCount(),p;l<n;l++)p=k.getChild(l),p.type==CKEDITOR.NODE_ELEMENT&&f[p.getName()]?CKEDITOR.plugins.list.listToArray(p,c,d,b+1,m.grandparent):m.contents.push(p)}}return d},arrayToList:function(a,c,d,b,e){d||(d=0);if(!a||a.length<
d+1)return null;for(var g,h=a[d].parent.getDocument(),k=new CKEDITOR.dom.documentFragment(h),m=null,l=d,p=Math.max(a[d].indent,0),u=null,x,G,M=b==CKEDITOR.ENTER_P?"p":"div";;){var I=a[l];g=I.grandparent;x=I.element.getDirection(1);if(I.indent==p){m&&a[l].parent.getName()==m.getName()||(m=a[l].parent.clone(!1,1),e&&m.setAttribute("dir",e),k.append(m));u=m.append(I.element.clone(0,1));x!=m.getDirection(1)&&u.setAttribute("dir",x);for(g=0;g<I.contents.length;g++)u.append(I.contents[g].clone(1,1));l++}else if(I.indent==
Math.max(p,0)+1)I=a[l-1].element.getDirection(1),l=CKEDITOR.plugins.list.arrayToList(a,null,l,b,I!=x?x:null),!u.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=h.$.documentMode&&u.append(h.createText(" ")),u.append(l.listNode),l=l.nextIndex;else if(-1==I.indent&&!d&&g){f[g.getName()]?(u=I.element.clone(!1,!0),x!=g.getDirection(1)&&u.setAttribute("dir",x)):u=new CKEDITOR.dom.documentFragment(h);var m=g.getDirection(1)!=x,E=I.element,P=E.getAttribute("class"),L=E.getAttribute("style"),O=u.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&
(b!=CKEDITOR.ENTER_BR||m||L||P),N,X=I.contents.length,S;for(g=0;g<X;g++)if(N=I.contents[g],n(N)&&1<X)O?S=N.clone(1,1):u.append(N.clone(1,1));else if(N.type==CKEDITOR.NODE_ELEMENT&&N.isBlockBoundary()){m&&!N.getDirection()&&N.setAttribute("dir",x);G=N;var Y=E.getAttribute("style");Y&&G.setAttribute("style",Y.replace(/([^;])$/,"$1;")+(G.getAttribute("style")||""));P&&N.addClass(P);G=null;S&&(u.append(S),S=null);u.append(N.clone(1,1))}else O?(G||(G=h.createElement(M),u.append(G),m&&G.setAttribute("dir",
x)),L&&G.setAttribute("style",L),P&&G.setAttribute("class",P),S&&(G.append(S),S=null),G.append(N.clone(1,1))):u.append(N.clone(1,1));S&&((G||u).append(S),S=null);u.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&l!=a.length-1&&(CKEDITOR.env.needsBrFiller&&(x=u.getLast())&&x.type==CKEDITOR.NODE_ELEMENT&&x.is("br")&&x.remove(),(x=u.getLast(q))&&x.type==CKEDITOR.NODE_ELEMENT&&x.is(CKEDITOR.dtd.$block)||u.append(h.createElement("br")));x=u.$.nodeName.toLowerCase();"div"!=x&&"p"!=x||u.appendBogus();k.append(u);
m=null;l++}else return null;G=null;if(a.length<=l||Math.max(a[l].indent,0)<p)break}if(c)for(a=k.getFirst();a;){if(a.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(c,a),a.getName()in CKEDITOR.dtd.$listItem&&(d=a,h=e=b=void 0,b=d.getDirection()))){for(e=d.getParent();e&&!(h=e.getDirection());)e=e.getParent();b==h&&d.removeAttribute("dir")}a=a.getNextSourceNode()}return{listNode:k,nextIndex:l}}};var x=/^h[1-6]$/,p=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);a.prototype={exec:function(a){function c(a){return f[a.root.getName()]&&
!d(a.root,[CKEDITOR.NODE_COMMENT])}function d(a,c){return CKEDITOR.tools.array.filter(a.getChildren().toArray(),function(a){return-1===CKEDITOR.tools.array.indexOf(c,a.type)}).length}function e(a){var c=!0;if(0===a.getChildCount())return!1;a.forEach(function(a){if(a.type!==CKEDITOR.NODE_COMMENT)return c=!1},null,!0);return c}this.refresh(a,a.elementPath());var k=a.config,l=a.getSelection(),n=l&&l.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var p=a.editable();if(p.getFirst(q)){var u=1==n.length&&
n[0];(k=u&&u.getEnclosedNode())&&k.is&&this.type==k.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else k.enterMode==CKEDITOR.ENTER_BR?p.appendBogus():n[0].fixBlock(1,k.enterMode==CKEDITOR.ENTER_P?"p":"div"),l.selectRanges(n)}for(var k=l.createBookmarks(!0),p=[],A={},n=n.createIterator(),x=0;(u=n.getNextRange())&&++x;){var F=u.getBoundaryNodes(),J=F.startNode,G=F.endNode;J.type==CKEDITOR.NODE_ELEMENT&&"td"==J.getName()&&u.setStartAt(F.startNode,CKEDITOR.POSITION_AFTER_START);G.type==CKEDITOR.NODE_ELEMENT&&
"td"==G.getName()&&u.setEndAt(F.endNode,CKEDITOR.POSITION_BEFORE_END);u=u.createIterator();for(u.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;F=u.getNextParagraph();)if(!F.getCustomData("list_block")&&!e(F)){CKEDITOR.dom.element.setMarker(A,F,"list_block",1);for(var M=a.elementPath(F),J=M.elements,G=0,M=M.blockLimit,I,E=J.length-1;0<=E&&(I=J[E]);E--)if(f[I.getName()]&&M.contains(I)){M.removeCustomData("list_group_object_"+x);(J=I.getCustomData("list_group_object"))?J.contents.push(F):(J={root:I,
contents:[F]},p.push(J),CKEDITOR.dom.element.setMarker(A,I,"list_group_object",J));G=1;break}G||(G=M,G.getCustomData("list_group_object_"+x)?G.getCustomData("list_group_object_"+x).contents.push(F):(J={root:G,contents:[F]},CKEDITOR.dom.element.setMarker(A,G,"list_group_object_"+x,J),p.push(J)))}}for(I=[];0<p.length;)J=p.shift(),this.state==CKEDITOR.TRISTATE_OFF?c(J)||(f[J.root.getName()]?b.call(this,a,J,A,I):h.call(this,a,J,I)):this.state==CKEDITOR.TRISTATE_ON&&f[J.root.getName()]&&!c(J)&&g.call(this,
a,J,A);for(E=0;E<I.length;E++)m(I[E]);CKEDITOR.dom.element.clearAllMarkers(A);l.selectBookmarks(k);a.focus()},refresh:function(a,c){var d=c.contains(f,1),b=c.blockLimit||c.root;d&&b.contains(d)?this.setState(d.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(d){d.blockless||(d.addCommand("numberedlist",new a("numberedlist","ol")),d.addCommand("bulletedlist",new a("bulletedlist","ul")),
d.ui.addButton&&(d.ui.addButton("NumberedList",{isToggle:!0,label:d.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),d.ui.addButton("BulletedList",{isToggle:!0,label:d.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),d.on("key",function(a){var b=a.data.domEvent.getKey(),e;if("wysiwyg"==d.mode&&b in{8:1,46:1}){var g=d.getSelection().getRanges()[0],h=g&&g.startPath();if(g&&g.collapsed){var m=8==b,n=d.editable(),p=new CKEDITOR.dom.walker(g.clone());
p.evaluator=function(a){return q(a)&&!u(a)};p.guard=function(a,c){return!(c&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};b=g.clone();if(m){var A;(A=h.contains(f))&&g.checkBoundaryOfElement(A,CKEDITOR.START)&&(A=A.getParent())&&A.is("li")&&(A=c(A))?(e=A,A=A.getPrevious(q),b.moveToPosition(A&&u(A)?A:e,CKEDITOR.POSITION_BEFORE_START)):(p.range.setStartAt(n,CKEDITOR.POSITION_AFTER_START),p.range.setEnd(g.startContainer,g.startOffset),(A=p.previous())&&A.type==CKEDITOR.NODE_ELEMENT&&(A.getName()in f||
A.is("li"))&&(A.is("li")||(p.range.selectNodeContents(A),p.reset(),p.evaluator=k,A=p.previous()),e=A,b.moveToElementEditEnd(e),b.moveToPosition(b.endPath().block,CKEDITOR.POSITION_BEFORE_END)));if(e)l(d,b,g),a.cancel();else{var x=h.contains(f);x&&g.checkBoundaryOfElement(x,CKEDITOR.START)&&(e=x.getFirst(q),g.checkBoundaryOfElement(e,CKEDITOR.START)&&(A=x.getPrevious(q),c(e)?A&&(g.moveToElementEditEnd(A),g.select()):d.execCommand("outdent"),a.cancel()))}}else if(e=h.contains("li")){if(p.range.setEndAt(n,
CKEDITOR.POSITION_BEFORE_END),m=(n=e.getLast(q))&&k(n)?n:e,h=0,(A=p.next())&&A.type==CKEDITOR.NODE_ELEMENT&&A.getName()in f&&A.equals(n)?(h=1,A=p.next()):g.checkBoundaryOfElement(m,CKEDITOR.END)&&(h=2),h&&A){g=g.clone();g.moveToElementEditStart(A);if(1==h&&(b.optimize(),!b.startContainer.equals(e))){for(e=b.startContainer;e.is(CKEDITOR.dtd.$inline);)x=e,e=e.getParent();x&&b.moveToPosition(x,CKEDITOR.POSITION_AFTER_END)}2==h&&(b.moveToPosition(b.endPath().block,CKEDITOR.POSITION_BEFORE_END),g.endPath().block&&
g.moveToPosition(g.endPath().block,CKEDITOR.POSITION_AFTER_START));l(d,b,g);a.cancel()}}else p.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),(A=p.next())&&A.type==CKEDITOR.NODE_ELEMENT&&A.is(f)&&(A=A.getFirst(q),h.block&&g.checkStartOfBlock()&&g.checkEndOfBlock()?(h.block.remove(),g.moveToElementEditStart(A),g.select()):c(A)?(g.moveToElementEditStart(A),g.select()):(g=g.clone(),g.moveToElementEditStart(A),l(d,b,g)),a.cancel());setTimeout(function(){d.selectionChange(1)})}}}))}})}(),function(){CKEDITOR.plugins.liststyle=
{requires:"dialog,contextmenu",init:function(b){if(!b.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=b.addCommand("numberedListStyle",h);b.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=b.addCommand("bulletedListStyle",h);b.addFeature(h);CKEDITOR.dialog.add("bulletedListStyle",this.path+"dialogs/liststyle.js");b.addMenuGroup("list",108);b.addMenuItems({numberedlist:{label:b.lang.liststyle.numberedTitle,group:"list",command:"numberedListStyle"},bulletedlist:{label:b.lang.liststyle.bulletedTitle,group:"list",command:"bulletedListStyle"}});b.contextMenu.addListener(function(b){if(!b||b.isReadOnly())return null;for(;b;){var a=b.getName();
if("ol"==a)return{numberedlist:CKEDITOR.TRISTATE_OFF};if("ul"==a)return{bulletedlist:CKEDITOR.TRISTATE_OFF};b=b.getParent()}return null})}}};CKEDITOR.plugins.add("liststyle",CKEDITOR.plugins.liststyle)}(),"use strict",function(){function b(a,c,d){return n(c)&&n(d)&&d.equals(c.getNext(function(a){return!(aa(a)||ca(a)||q(a))}))}function h(a){this.upper=a[0];this.lower=a[1];this.set.apply(this,a.slice(2))}function g(a){var c=a.element;if(c&&n(c)&&(c=c.getAscendant(a.triggers,!0))&&a.editable.contains(c)){var d=
k(c);if("true"==d.getAttribute("contenteditable"))return c;if(d.is(a.triggers))return d}return null}function a(a,c,d){z(a,c);z(a,d);a=c.size.bottom;d=d.size.top;return a&&d?0|(a+d)/2:a||d}function e(a,c,b){return c=c[b?"getPrevious":"getNext"](function(c){return c&&c.type==CKEDITOR.NODE_TEXT&&!aa(c)||n(c)&&!q(c)&&!d(a,c)})}function m(a,c,d){return a>c&&a<d}function k(a,c){if(a.data("cke-editable"))return null;for(c||(a=a.getParent());a&&!a.data("cke-editable");){if(a.hasAttribute("contenteditable"))return a;
a=a.getParent()}return null}function l(a){var d=a.doc,b=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',d),f=CKEDITOR.getUrl(this.path+"images/"+(F.hidpi?"hidpi/":"")+"icon"+(a.rtl?"-rtl":"")+".png");D(b,{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',
d),{base:fa+"height:17px;width:17px;"+(a.rtl?"left":"right")+":17px;background:url("+f+") 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,d),{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,d),{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(){z(a,this);var c=a.holdDistance,d=this.size;return d&&m(a.mouse.y,d.top-c,d.bottom+c)&&m(a.mouse.x,d.left-c,d.right+c)?!0:!1},place:function(){var c=
a.view,d=a.editable,b=a.trigger,f=b.upper,e=b.lower,g=f||e,h=g.getParent(),k={};this.trigger=b;f&&z(a,f,!0);e&&z(a,e,!0);z(a,h,!0);a.inInlineMode&&v(a,!0);h.equals(d)?(k.left=c.scroll.x,k.right=-c.scroll.x,k.width=""):(k.left=g.size.left-g.size.margin.left+c.scroll.x-(a.inInlineMode?c.editable.left+c.editable.border.left:0),k.width=g.size.outerWidth+g.size.margin.left+g.size.margin.right+c.scroll.x,k.right="");f&&e?k.top=f.size.margin.bottom===e.size.margin.top?0|f.size.bottom+f.size.margin.bottom/
2:f.size.margin.bottom<e.size.margin.top?f.size.bottom+f.size.margin.bottom:f.size.bottom+f.size.margin.bottom-e.size.margin.top:f?e||(k.top=f.size.bottom+f.size.margin.bottom):k.top=e.size.top-e.size.margin.top;b.is(O)||m(k.top,c.scroll.y-15,c.scroll.y+5)?(k.top=a.inInlineMode?0:c.scroll.y,this.look(O)):b.is(N)||m(k.top,c.pane.bottom-5,c.pane.bottom+15)?(k.top=a.inInlineMode?c.editable.height+c.editable.padding.top+c.editable.padding.bottom:c.pane.bottom-1,this.look(N)):(a.inInlineMode&&(k.top-=
c.editable.top+c.editable.border.top),this.look(X));a.inInlineMode&&(k.top--,k.top+=c.editable.scroll.top,k.left+=c.editable.scroll.left);for(var l in k)k[l]=CKEDITOR.tools.cssLength(k[l]);this.setStyles(k)},look:function(a){if(this.oldLook!=a){for(var c=this.lineChildren.length,d;c--;)(d=this.lineChildren[c]).setAttribute("style",d.base+d.looks[0|a/2]);this.oldLook=a}},wrap:new A("span",a.doc)});for(d=b.lineChildren.length;d--;)b.lineChildren[d].appendTo(b);b.look(X);b.appendTo(b.wrap);b.unselectable();
b.lineChildren[0].on("mouseup",function(d){b.detach();c(a,function(c){var d=a.line.trigger;c[d.is(I)?"insertBefore":"insertAfter"](d.is(I)?d.lower:d.upper)},!0);a.editor.focus();F.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();d.data.preventDefault(!0)});b.on("mousedown",function(a){a.data.preventDefault(!0)});a.line=b}function c(a,c,d){var b=new CKEDITOR.dom.range(a.doc),f=a.editor,e;F.ie&&a.enterMode==CKEDITOR.ENTER_BR?e=a.doc.createText(S):(e=(e=k(a.element,!0))&&e.data("cke-enter-mode")||
a.enterMode,e=new A(M[e],a.doc),e.is("br")||a.doc.createText(S).appendTo(e));d&&f.fire("saveSnapshot");c(e);b.moveToPosition(e,CKEDITOR.POSITION_AFTER_START);f.getSelection().selectRanges([b]);a.hotNode=e;d&&f.fire("saveSnapshot")}function f(a,d){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function b(f){var e=F.ie&&9>F.version?" ":S,g=a.hotNode&&a.hotNode.getText()==e&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!d;c(a,function(c){g&&a.hotNode&&a.hotNode.remove();c[d?"insertAfter":
"insertBefore"](f);c.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!d});a.lastCmdDirection=!!d});F.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(c){c=c.getSelection().getStartElement();var f;c=c.getAscendant(ha,1);if(!p(a,c)&&c&&!c.equals(a.editable)&&!c.contains(a.editable)){(f=k(c))&&"false"==f.getAttribute("contenteditable")&&(c=f);a.element=c;f=e(a,c,!d);var h;n(f)&&f.is(a.triggers)&&f.is(U)&&(!e(a,f,!d)||(h=e(a,f,!d))&&n(h)&&
h.is(a.triggers))?b(f):(h=g(a,c),n(h)&&(e(a,h,!d)?(c=e(a,h,!d))&&n(c)&&c.is(a.triggers)&&b(h):b(h)))}}}()}}function d(a,c){if(!c||c.type!=CKEDITOR.NODE_ELEMENT||!c.$)return!1;var d=a.line;return d.wrap.equals(c)||d.wrap.contains(c)}function n(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.$}function q(a){if(!n(a))return!1;var c;(c=u(a))||(n(a)?(c={left:1,right:1,center:1},c=!(!c[a.getComputedStyle("float")]&&!c[a.getAttribute("align")])):c=!1);return c}function u(a){return!!{absolute:1,fixed:1}[a.getComputedStyle("position")]}
function x(a,c){return n(c)?c.is(a.triggers):null}function p(a,c){if(!c)return!1;for(var d=c.getParents(1),b=d.length;b--;)for(var f=a.tabuList.length;f--;)if(d[b].hasAttribute(a.tabuList[f]))return!0;return!1}function w(a,c,d){c=c[d?"getLast":"getFirst"](function(c){return a.isRelevant(c)&&!c.is(da)});if(!c)return!1;z(a,c);return d?c.size.top>a.mouse.y:c.size.bottom<a.mouse.y}function B(a){var c=a.editable,b=a.mouse,f=a.view,e=a.triggerOffset;v(a);var g=b.y>(a.inInlineMode?f.editable.top+f.editable.height/
2:Math.min(f.editable.height,f.pane.height)/2),c=c[g?"getLast":"getFirst"](function(a){return!(aa(a)||ca(a))});if(!c)return null;d(a,c)&&(c=a.line.wrap[g?"getPrevious":"getNext"](function(a){return!(aa(a)||ca(a))}));if(!n(c)||q(c)||!x(a,c))return null;z(a,c);return!g&&0<=c.size.top&&m(b.y,0,c.size.top+e)?(a=a.inInlineMode||0===f.scroll.y?O:X,new h([null,c,I,L,a])):g&&c.size.bottom<=f.pane.height&&m(b.y,c.size.bottom-e,f.pane.height)?(a=a.inInlineMode||m(c.size.bottom,f.pane.height-e,f.pane.height)?
N:X,new h([c,null,E,L,a])):null}function r(a){var c=a.mouse,d=a.view,b=a.triggerOffset,f=g(a);if(!f)return null;z(a,f);var b=Math.min(b,0|f.size.outerHeight/2),k=[],l,t;if(m(c.y,f.size.top-1,f.size.top+b))t=!1;else if(m(c.y,f.size.bottom-b,f.size.bottom+1))t=!0;else return null;if(q(f)||w(a,f,t)||f.getParent().is(Y))return null;var p=e(a,f,!t);if(p){if(p&&p.type==CKEDITOR.NODE_TEXT)return null;if(n(p)){if(q(p)||!x(a,p)||p.getParent().is(Y))return null;k=[p,f][t?"reverse":"concat"]().concat([P,L])}}else f.equals(a.editable[t?
"getLast":"getFirst"](a.isRelevant))?(v(a),t&&m(c.y,f.size.bottom-b,d.pane.height)&&m(f.size.bottom,d.pane.height-b,d.pane.height)?l=N:m(c.y,0,f.size.top+b)&&(l=O)):l=X,k=[null,f][t?"reverse":"concat"]().concat([t?E:I,L,l,f.equals(a.editable[t?"getLast":"getFirst"](a.isRelevant))?t?N:O:X]);return 0 in k?new h(k):null}function y(a,c,d,b){for(var f=c.getDocumentPosition(),e={},g={},h={},k={},m=Q.length;m--;)e[Q[m]]=parseInt(c.getComputedStyle.call(c,"border-"+Q[m]+"-width"),10)||0,h[Q[m]]=parseInt(c.getComputedStyle.call(c,
"padding-"+Q[m]),10)||0,g[Q[m]]=parseInt(c.getComputedStyle.call(c,"margin-"+Q[m]),10)||0;d&&!b||t(a,b);k.top=f.y-(d?0:a.view.scroll.y);k.left=f.x-(d?0:a.view.scroll.x);k.outerWidth=c.$.offsetWidth;k.outerHeight=c.$.offsetHeight;k.height=k.outerHeight-(h.top+h.bottom+e.top+e.bottom);k.width=k.outerWidth-(h.left+h.right+e.left+e.right);k.bottom=k.top+k.outerHeight;k.right=k.left+k.outerWidth;a.inInlineMode&&(k.scroll={top:c.$.scrollTop,left:c.$.scrollLeft});return D({border:e,padding:h,margin:g,ignoreScroll:d},
k,!0)}function z(a,c,d){if(!n(c))return c.size=null;if(!c.size)c.size={};else if(c.size.ignoreScroll==d&&c.size.date>new Date-ia)return null;return D(c.size,y(a,c,d),{date:+new Date},!0)}function v(a,c){a.view.editable=y(a,a.editable,c,!0)}function t(a,c){a.view||(a.view={});var d=a.view;if(!(!c&&d&&d.date>new Date-ia)){var b=a.win,d=b.getScrollPosition(),b=b.getViewPaneSize();D(a.view,{scroll:{x:d.x,y:d.y,width:a.doc.$.documentElement.scrollWidth-b.width,height:a.doc.$.documentElement.scrollHeight-
b.height},pane:{width:b.width,height:b.height,bottom:b.height+d.y},date:+new Date},!0)}}function C(a,c,d,b){for(var f=b,e=b,g=0,k=!1,m=!1,l=a.view.pane.height,n=a.mouse;n.y+g<l&&0<n.y-g;){k||(k=c(f,b));m||(m=c(e,b));!k&&0<n.y-g&&(f=d(a,{x:n.x,y:n.y-g}));!m&&n.y+g<l&&(e=d(a,{x:n.x,y:n.y+g}));if(k&&m)break;g+=2}return new h([f,e,null,null])}CKEDITOR.plugins.add("magicline",{init:function(a){var b=a.config,k=b.magicline_triggerOffset||30,m={editor:a,enterMode:b.enterMode,triggerOffset:k,holdDistance:0|
k*(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}},w,C,A;m.isRelevant=function(a){return n(a)&&!d(m,a)&&!q(a)};a.on("contentDom",function(){var k=a.editable(),n=a.document,q=a.window;D(m,{editable:k,inInlineMode:k.isInline(),doc:n,win:q,hotNode:null},!0);m.boundary=m.inInlineMode?m.editable:
m.doc.getDocumentElement();k.is(G.$inline)||(m.inInlineMode&&!u(k)&&k.setStyles({position:"relative",top:null,left:null}),l.call(this,m),t(m),k.attachListener(a,"beforeUndoImage",function(){m.line.detach()}),k.attachListener(a,"beforeGetData",function(){m.line.wrap.getParent()&&(m.line.detach(),a.once("getData",function(){m.line.attach()},null,null,1E3))},null,null,0),k.attachListener(m.inInlineMode?n:n.getWindow().getFrame(),"mouseout",function(c){if("wysiwyg"==a.mode)if(m.inInlineMode){var d=c.data.$.clientX;
c=c.data.$.clientY;t(m);v(m,!0);var b=m.view.editable,f=m.view.scroll;d>b.left-f.x&&d<b.right-f.x&&c>b.top-f.y&&c<b.bottom-f.y||(clearTimeout(A),A=null,m.line.detach())}else clearTimeout(A),A=null,m.line.detach()}),k.attachListener(k,"keyup",function(){m.hiddenMode=0}),k.attachListener(k,"keydown",function(c){if("wysiwyg"==a.mode)switch(c.data.getKeystroke()){case 2228240:case 16:m.hiddenMode=1,m.line.detach()}}),k.attachListener(m.inInlineMode?k:n,"mousemove",function(c){C=!0;if("wysiwyg"==a.mode&&
!a.readOnly&&!A){var d={x:c.data.$.clientX,y:c.data.$.clientY};A=setTimeout(function(){m.mouse=d;A=m.trigger=null;t(m);C&&!m.hiddenMode&&a.focusManager.hasFocus&&!m.line.mouseNear()&&(m.element=Z(m,!0))&&((m.trigger=B(m)||r(m)||V(m))&&!p(m,m.trigger.upper||m.trigger.lower)?m.line.attach().place():(m.trigger=null,m.line.detach()),C=!1)},30)}}),k.attachListener(q,"scroll",function(){"wysiwyg"==a.mode&&(m.line.detach(),F.webkit&&(m.hiddenMode=1,clearTimeout(w),w=setTimeout(function(){m.mouseDown||(m.hiddenMode=
0)},50)))}),k.attachListener(J?n:q,"mousedown",function(){"wysiwyg"==a.mode&&(m.line.detach(),m.hiddenMode=1,m.mouseDown=1)}),k.attachListener(J?n:q,"mouseup",function(){m.hiddenMode=0;m.mouseDown=0}),a.addCommand("accessPreviousSpace",f(m)),a.addCommand("accessNextSpace",f(m,!0)),a.setKeystroke([[b.magicline_keystrokePrevious,"accessPreviousSpace"],[b.magicline_keystrokeNext,"accessNextSpace"]]),a.on("loadSnapshot",function(){var c,d,b,f;for(f in{p:1,br:1,div:1})for(c=a.document.getElementsByTag(f),
b=c.count();b--;)if((d=c.getItem(b)).data("cke-magicline-hot")){m.hotNode=d;m.lastCmdDirection="true"===d.data("cke-magicline-dir")?!0:!1;return}}),a._.magiclineBackdoor={accessFocusSpace:c,boxTrigger:h,isLine:d,getAscendantTrigger:g,getNonEmptyNeighbour:e,getSize:y,that:m,triggerEdge:r,triggerEditable:B,triggerExpand:V})},this)}});var D=CKEDITOR.tools.extend,A=CKEDITOR.dom.element,H=A.createFromHtml,F=CKEDITOR.env,J=CKEDITOR.env.ie&&9>CKEDITOR.env.version,G=CKEDITOR.dtd,M={},I=128,E=64,P=32,L=16,
O=4,N=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";M[CKEDITOR.ENTER_BR]="br";M[CKEDITOR.ENTER_P]="p";M[CKEDITOR.ENTER_DIV]="div";h.prototype={set:function(a,c,d){this.properties=a+c+(d||X);return this},is:function(a){return(this.properties&
a)==a}};var Z=function(){function a(c,d){var b=c.$.elementFromPoint(d.x,d.y);return b&&b.nodeType?new CKEDITOR.dom.element(b):null}return function(c,b,f){if(!c.mouse)return null;var e=c.doc,g=c.line.wrap;f=f||c.mouse;var h=a(e,f);b&&d(c,h)&&(g.hide(),h=a(e,f),g.show());return!h||h.type!=CKEDITOR.NODE_ELEMENT||!h.$||F.ie&&9>F.version&&!c.boundary.equals(h)&&!c.boundary.contains(h)?null:h}}(),aa=CKEDITOR.dom.walker.whitespaces(),ca=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),V=function(){function c(d){var e=
d.element,g,h,k;if(!n(e)||e.contains(d.editable)||e.isReadOnly())return null;k=C(d,function(a,c){return!c.equals(a)},function(a,c){return Z(a,!0,c)},e);g=k.upper;h=k.lower;if(b(d,g,h))return k.set(P,8);if(g&&e.contains(g))for(;!g.getParent().equals(e);)g=g.getParent();else g=e.getFirst(function(a){return f(d,a)});if(h&&e.contains(h))for(;!h.getParent().equals(e);)h=h.getParent();else h=e.getLast(function(a){return f(d,a)});if(!g||!h)return null;z(d,g);z(d,h);if(!m(d.mouse.y,g.size.top,h.size.bottom))return null;
for(var e=Number.MAX_VALUE,l,K,t,p;h&&!h.equals(g)&&(K=g.getNext(d.isRelevant));)l=Math.abs(a(d,g,K)-d.mouse.y),l<e&&(e=l,t=g,p=K),g=K,z(d,g);if(!t||!p||!m(d.mouse.y,t.size.top,p.size.bottom))return null;k.upper=t;k.lower=p;return k.set(P,8)}function f(a,c){return!(c&&c.type==CKEDITOR.NODE_TEXT||ca(c)||q(c)||d(a,c)||c.type==CKEDITOR.NODE_ELEMENT&&c.$&&c.is("br"))}return function(a){var d=c(a),f;if(f=d){f=d.upper;var e=d.lower;f=!f||!e||q(e)||q(f)||e.equals(f)||f.equals(e)||e.contains(f)||f.contains(e)?
!1:x(a,f)&&x(a,e)&&b(a,f,e)?!0:!1}return f?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 b(a){if(!a||a.type!=CKEDITOR.NODE_ELEMENT||"form"!=a.getName())return[];for(var b=[],e=["style","className"],c=0;c<e.length;c++){var f=a.$.elements.namedItem(e[c]);f&&(f=new CKEDITOR.dom.element(f),b.push([f,f.nextSibling]),f.remove())}return b}
function h(a,b){if(a&&a.type==CKEDITOR.NODE_ELEMENT&&"form"==a.getName()&&0<b.length)for(var e=b.length-1;0<=e;e--){var c=b[e][0],f=b[e][1];f?c.insertBefore(f):c.appendTo(a)}}function g(a,e){var g=b(a),c={},f=a.$;e||(c["class"]=f.className||"",f.className="");c.inline=f.style.cssText||"";e||(f.style.cssText="position: static; overflow: visible");h(g);return c}function a(a,e){var g=b(a),c=a.$;"class"in e&&(c.className=e["class"]);"inline"in e&&(c.style.cssText=e.inline);h(g)}function e(a){if(!a.editable().isInline()){var b=
CKEDITOR.instances,e;for(e in b){var c=b[e];"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(b){function h(){var a=d.getViewPaneSize();b.resize(a.width,a.height,null,!0)}function l(){var a=b.getCommand("maximize");a.state===CKEDITOR.TRISTATE_ON&&a.exec()}if(b.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var c=b.lang,f=CKEDITOR.document,
d=f.getWindow(),n,q,u,x=CKEDITOR.TRISTATE_OFF;b.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:!1,exec:function(){var c=b.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}),l=b.ui.space("contents");if("wysiwyg"==b.mode){var p=b.getSelection();n=p&&p.getRanges();q=d.getScrollPosition()}else{var y=b.editable().$;n=!CKEDITOR.env.ie&&[y.selectionStart,y.selectionEnd];q=[y.scrollLeft,y.scrollTop]}if(this.state==
CKEDITOR.TRISTATE_OFF){d.on("resize",h);u=d.getScrollPosition();for(p=b.container;p=p.getParent();)p.setCustomData("maximize_saved_styles",g(p)),p.setStyle("z-index",b.config.baseFloatZIndex-5);l.setCustomData("maximize_saved_styles",g(l,!0));c.setCustomData("maximize_saved_styles",g(c,!0));l={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0};f.getDocumentElement().setStyles(l);!CKEDITOR.env.gecko&&f.getDocumentElement().setStyle("position","fixed");CKEDITOR.env.gecko&&CKEDITOR.env.quirks||
f.getBody().setStyles(l);CKEDITOR.env.ie?setTimeout(function(){d.$.scrollTo(0,0)},0):d.$.scrollTo(0,0);c.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute");c.$.offsetLeft;c.setStyles({"z-index":b.config.baseFloatZIndex-5,left:"0px",top:"0px"});c.addClass("cke_maximized");h();l=c.getDocumentPosition();c.setStyles({left:-1*l.x+"px",top:-1*l.y+"px"});CKEDITOR.env.gecko&&e(b)}else if(this.state==CKEDITOR.TRISTATE_ON){d.removeListener("resize",h);for(var p=[l,c],z=0;z<p.length;z++)a(p[z],
p[z].getCustomData("maximize_saved_styles")),p[z].removeCustomData("maximize_saved_styles");for(p=b.container;p=p.getParent();)a(p,p.getCustomData("maximize_saved_styles")),p.removeCustomData("maximize_saved_styles");CKEDITOR.env.ie?setTimeout(function(){d.$.scrollTo(u.x,u.y)},0):d.$.scrollTo(u.x,u.y);c.removeClass("cke_maximized");CKEDITOR.env.webkit&&(c.setStyle("display","inline"),setTimeout(function(){c.setStyle("display","block")},0));b.fire("resize",{outerHeight:b.container.$.offsetHeight,contentsHeight:l.$.offsetHeight,
outerWidth:b.container.$.offsetWidth})}this.toggleState();"wysiwyg"==b.mode?n?(CKEDITOR.env.gecko&&e(b),b.getSelection().selectRanges(n),(y=b.getSelection().getStartElement())&&y.scrollIntoView(!0)):d.$.scrollTo(q.x,q.y):(n&&(y.selectionStart=n[0],y.selectionEnd=n[1]),y.scrollLeft=q[0],y.scrollTop=q[1]);n=q=null;x=this.state;b.fire("maximize",this.state)},canUndo:!1});b.ui.addButton&&b.ui.addButton("Maximize",{isToggle:!0,label:c.maximize.maximize,command:"maximize",toolbar:"tools,10"});b.on("mode",
function(){var a=b.getCommand("maximize");a.setState(a.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:x)},null,null,100);if(b.config.maximize_historyIntegration){var p=b.config.maximize_historyIntegration===CKEDITOR.HISTORY_NATIVE?"popstate":"hashchange";d.on(p,l);b.on("destroy",function(){d.removeListener(p,l)})}}}});CKEDITOR.config.maximize_historyIntegration=CKEDITOR.HISTORY_NATIVE}(),CKEDITOR.plugins.add("newpage",{init:function(b){b.addCommand("newpage",{modes:{wysiwyg:1,source:1},
exec:function(b){var g=this;b.setData(b.config.newpage_html||"",function(){b.focus();setTimeout(function(){b.fire("afterCommandExec",{name:"newpage",command:g});b.selectionChange()},200)})},async:!0});b.ui.addButton&&b.ui.addButton("NewPage",{label:b.lang.newpage.toolbar,command:"newpage",toolbar:"document,20"})}}),"use strict",function(){function b(b){return{"aria-label":b,"class":"cke_pagebreak",contenteditable:"false","data-cke-display-name":"pagebreak","data-cke-pagebreak":1,style:"page-break-after: always",
title:b}}CKEDITOR.plugins.add("pagebreak",{requires:"fakeobjects",onLoad:function(){var b=("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{"+b+"}")},init:function(b){b.blockless||(b.addCommand("pagebreak",CKEDITOR.plugins.pagebreakCmd),b.ui.addButton&&b.ui.addButton("PageBreak",
{label:b.lang.pagebreak.toolbar,command:"pagebreak",toolbar:"insert,70"}),CKEDITOR.env.webkit&&b.on("contentDom",function(){b.document.on("click",function(g){g=g.data.getTarget();g.is("div")&&g.hasClass("cke_pagebreak")&&b.getSelection().selectElement(g)})}))},afterInit:function(h){function g(a){CKEDITOR.tools.extend(a.attributes,b(h.lang.pagebreak.alt),!0);a.children.length=0}var a=h.dataProcessor,e=a&&a.dataFilter,a=a&&a.htmlFilter,m=/page-break-after\s*:\s*always/i,k=/display\s*:\s*none/i;a&&a.addRules({attributes:{"class":function(a,
c){var b=a.replace("cke_pagebreak","");if(b!=a){var d=CKEDITOR.htmlParser.fragment.fromHtml('\x3cspan style\x3d"display: none;"\x3e\x26nbsp;\x3c/span\x3e').children[0];c.children.length=0;c.add(d);d=c.attributes;delete d["aria-label"];delete d.contenteditable;delete d.title}return b}}},{applyToAll:!0,priority:5});e&&e.addRules({elements:{div:function(a){if(a.attributes["data-cke-pagebreak"])g(a);else if(m.test(a.attributes.style)){var c=a.children[0];c&&"span"==c.name&&k.test(c.attributes.style)&&
g(a)}}}})}});CKEDITOR.plugins.pagebreakCmd={exec:function(b){b.insertElement(CKEDITOR.plugins.pagebreak.createElement(b))},context:"div",allowedContent:{div:{styles:"!page-break-after"},span:{match:function(b){return(b=b.parent)&&"div"==b.name&&b.styles&&b.styles["page-break-after"]},styles:"display"}},requiredContent:"div{page-break-after}"};CKEDITOR.plugins.pagebreak={createElement:function(h){return h.document.createElement("div",{attributes:b(h.lang.pagebreak.alt)})}}}(),function(){CKEDITOR.plugins.add("xml",
{});CKEDITOR.xml=function(b){var h=null;if("object"==typeof b)h=b;else if(b=(b||"").replace(/&nbsp;/g," "),"ActiveXObject"in window){try{h=new ActiveXObject("MSXML2.DOMDocument")}catch(g){try{h=new ActiveXObject("Microsoft.XmlDom")}catch(a){}}h&&(h.async=!1,h.resolveExternals=!1,h.validateOnParse=!1,h.loadXML(b))}else window.DOMParser&&(h=(new DOMParser).parseFromString(b,"text/xml"));this.baseXml=h};CKEDITOR.xml.prototype={selectSingleNode:function(b,h){var g=this.baseXml;if(h||(h=g)){if("selectSingleNode"in
h)return h.selectSingleNode(b);if(g.evaluate)return(g=g.evaluate(b,h,null,9,null))&&g.singleNodeValue||null}return null},selectNodes:function(b,h){var g=this.baseXml,a=[];if(h||(h=g)){if("selectNodes"in h)return h.selectNodes(b);if(g.evaluate&&(g=g.evaluate(b,h,null,5,null)))for(var e;e=g.iterateNext();)a.push(e)}return a},getInnerXml:function(b,h){var g=this.selectSingleNode(b,h),a=[];if(g)for(g=g.firstChild;g;)g.xml?a.push(g.xml):window.XMLSerializer&&a.push((new XMLSerializer).serializeToString(g)),
g=g.nextSibling;return a.length?a.join(""):null}}}(),function(){CKEDITOR.plugins.add("ajax",{requires:"xml"});CKEDITOR.ajax=function(){function b(){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(g){}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 g=a.responseXML;return new CKEDITOR.xml(g&&g.firstChild?g:a.responseText);case "arraybuffer":return a.response;default:return null}}function g(a,g,k){var l=!!g,c=b();if(!c)return null;l&&"text"!==k&&"xml"!==k&&(c.responseType=k);c.open("GET",a,l);l&&(c.onreadystatechange=function(){4==c.readyState&&(g(h(c,k)),c=null)});c.send(null);return l?"":h(c,k)}function a(a,g,k,l,c){var f=b();if(!f)return null;f.open("POST",a,!0);f.onreadystatechange=function(){4==f.readyState&&(l&&l(h(f,c)),
f=null)};f.setRequestHeader("Content-type",k||"application/x-www-form-urlencoded; charset\x3dUTF-8");f.send(g)}return{load:function(a,b,h){return g(a,b,h||"text")},post:function(b,g,h,l){return a(b,g,h,l,"text")},loadXml:function(a,b){return g(a,b,"xml")},loadText:function(a,b){return g(a,b,"text")},loadBinary:function(a,b){return g(a,b,"arraybuffer")}}}()}(),function(){function b(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 g(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,f){return CKEDITOR.tools.array.indexOf(b,a)===f})}function a(a,b){var c=0,f,d;if(!CKEDITOR.tools.array.isArray(a)||0===a.length)return!0;f=CKEDITOR.tools.array.filter(a,function(a){return-1===CKEDITOR.tools.array.indexOf(e,
a)});if(0<f.length)for(d=0;d<f.length;d++)(function(a){CKEDITOR.scriptLoader.queue(a,function(d){d&&e.push(a);++c===f.length&&b()})})(f[d]);return 0===f.length}var e=[],m=CKEDITOR.tools.createClass({$:function(){this.handlers=[]},proto:{register:function(a){"number"!==typeof a.priority&&(a.priority=10);this.handlers.push(a)},addPasteListener:function(e){e.on("paste",function(m){var c=b(this.handlers,m),f;if(0!==c.length){f=g(c);f=a(f,function(){return e.fire("paste",m.data)});if(!f)return m.cancel();
h(c,m)}},this,null,3)}}});CKEDITOR.plugins.add("pastetools",{requires:["clipboard","ajax"],beforeInit:function(a){a.pasteTools=new m;a.pasteTools.addPasteListener(a)}});CKEDITOR.plugins.pastetools={filters:{},loadFilters:a,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(c){g.addRules(c(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,f=a.config,d=c.object.keys(f),e=["pasteTools_"+b,"pasteFromWord_"+b,"pasteFromWord"+c.capitalize(b,!0)],e=c.array.find(e,function(a){return-1!==c.array.indexOf(d,
a)});return f[e]}},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("pastefromlibreoffice",{requires:"pastetools",isSupportedEnvironment:function(){var b=CKEDITOR.env.ie&&11>=CKEDITOR.env.version;return!(CKEDITOR.env.webkit&&
!CKEDITOR.env.chrome)&&!b},init:function(b){if(this.isSupportedEnvironment()){var h=CKEDITOR.plugins.getPath("pastetools"),g=this.path;b.pasteTools.register({priority:100,filters:[CKEDITOR.getUrl(h+"filter/common.js"),CKEDITOR.getUrl(h+"filter/image.js"),CKEDITOR.getUrl(g+"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(a,e){var g=a.data,h=g.dataValue||
CKEDITOR.plugins.pastetools.getClipboardData(g,"text/html");g.dontFilter=!0;h=CKEDITOR.pasteFilters.image(h,b,CKEDITOR.plugins.pastetools.getClipboardData(g,"text/rtf"));g.dataValue=CKEDITOR.pasteFilters.libreoffice(h,b);!0===b.config.forcePasteAsPlainText&&(g.type="text");e()}})}}})}(),function(){CKEDITOR.plugins.add("pastefromword",{requires:"pastetools",init:function(b){var h=0,g=CKEDITOR.plugins.getPath("pastetools"),a=this.path,e=void 0===b.config.pasteFromWord_inlineImages?!0:b.config.pasteFromWord_inlineImages,
g=[CKEDITOR.getUrl(g+"filter/common.js"),CKEDITOR.getUrl(g+"filter/image.js"),CKEDITOR.getUrl(a+"filter/default.js")];b.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(b,"PasteFromWord",{label:b.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});b.pasteTools.register({filters:b.config.pasteFromWordCleanupFile?
[b.config.pasteFromWordCleanupFile]:g,canHandle:function(a){a=CKEDITOR.plugins.pastetools.getClipboardData(a.data,"text/html");var b=CKEDITOR.plugins.pastetools.getContentGeneratorName(a),e=/(class="?Mso|style=["'][^"]*?\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/,b=b?"microsoft"===b:e.test(a);return a&&(h||b)},handle:function(a,g){var l=a.data,c=CKEDITOR.plugins.pastetools.getClipboardData(l,"text/html"),f=CKEDITOR.plugins.pastetools.getClipboardData(l,"text/rtf"),c={dataValue:c,dataTransfer:{"text/rtf":f}};
if(!1!==b.fire("pasteFromWord",c)||h){l.dontFilter=!0;if(h||!b.config.pasteFromWordPromptCleanup||confirm(b.lang.pastefromword.confirmCleanup))c.dataValue=CKEDITOR.cleanWord(c.dataValue,b),CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&e&&CKEDITOR.pasteFilters.image&&(c.dataValue=CKEDITOR.pasteFilters.image(c.dataValue,b,f)),b.fire("afterPasteFromWord",c),l.dataValue=c.dataValue,!0===b.config.forcePasteAsPlainText?l.type="text":CKEDITOR.plugins.clipboard.isCustomCopyCutSupported||"allow-word"!==
b.config.forcePasteAsPlainText||(l.type="html");h=0;g()}}})}})}(),function(){var b={canUndo:!1,async:!0,exec:function(b,g){var a=b.lang,e=CKEDITOR.tools.keystrokeToString(a.common.keyboard,b.getCommandKeystroke(CKEDITOR.env.ie?b.commands.paste:this)),m=g&&"undefined"!==typeof g.notification?g.notification:!g||!g.from||"keystrokeHandler"===g.from&&CKEDITOR.env.ie,a=m&&"string"===typeof m?m:a.pastetext.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+e.aria+'"\x3e'+e.display+"\x3c/kbd\x3e");
b.execCommand("paste",{type:"text",notification:m?a:!1})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(h){var g=CKEDITOR.env.safari?CKEDITOR.CTRL+CKEDITOR.ALT+CKEDITOR.SHIFT+86:CKEDITOR.CTRL+CKEDITOR.SHIFT+86;h.addCommand("pastetext",b);h.setKeystroke(g,"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 b(a,b,g){var k=h;g&&(k=CKEDITOR.tools.debounce(h,g));a.on(b,k,null,{editor:a})}function h(a){var b=a.listenerData.editor;a=b.focusManager.hasFocus;var h=b.editable(),k=b.config.editorplaceholder,l=/<body.*?>((?:.|[\n\r])*?)<\/body>/i,c=b.config.fullPage,b=b.getData();c&&(l=b.match(l))&&1<l.length&&(b=l[1]);if(0!==b.length||a)return h.removeAttribute(g);h.setAttribute(g,k)}CKEDITOR.plugins.add("editorplaceholder",
{isSupportedEnvironment:function(){return!CKEDITOR.env.ie||9<=CKEDITOR.env.version},onLoad:function(){CKEDITOR.addCss(CKEDITOR.plugins.editorplaceholder.styles)},init:function(a){this.isSupportedEnvironment()&&a.config.editorplaceholder&&(b(a,"contentDom"),b(a,"focus"),b(a,"blur"),b(a,"change",a.config.editorplaceholder_delay))}});var g="data-cke-editorplaceholder";CKEDITOR.plugins.editorplaceholder={styles:"["+g+"]::before {position: absolute;opacity: .8;color: #aaa;content: attr( "+g+" );}.cke_wysiwyg_div["+
g+"]::before {margin-top: 1em;}"};CKEDITOR.config.editorplaceholder_delay=150;CKEDITOR.config.editorplaceholder=""}(),function(){function b(a,b){var g=CKEDITOR.plugins.getPath("preview"),h=a.config,l=a.title,c=function(){var a=location.origin,c=location.pathname;if(!h.baseHref&&!CKEDITOR.env.gecko)return"";if(h.baseHref)return'\x3cbase href\x3d"{HREF}"\x3e'.replace("{HREF}",h.baseHref);c=c.split("/");c.pop();c=c.join("/");return'\x3cbase href\x3d"{HREF}"\x3e'.replace("{HREF}",a+c+"/")}();return h.fullPage?
a.getData().replace(/<head>/,"$\x26"+c).replace(/[^>]*(?=<\/title>)/,"$\x26 \x26mdash; "+l):h.docType+'\x3chtml dir\x3d"'+h.contentsLangDirection+'"\x3e\x3chead\x3e'+c+"\x3ctitle\x3e"+l+"\x3c/title\x3e"+CKEDITOR.tools.buildStyleHtml(h.contentsCss)+'\x3clink rel\x3d"stylesheet" media\x3d"screen" href\x3d"'+g+'styles/screen.css"\x3e\x3c/head\x3e'+function(){var c="\x3cbody\x3e",b=a.document&&a.document.getBody();if(!b)return c;b.getAttribute("id")&&(c=c.replace("\x3e",' id\x3d"'+b.getAttribute("id")+
'"\x3e'));b.getAttribute("class")&&(c=c.replace("\x3e",' class\x3d"'+b.getAttribute("class")+'"\x3e'));return c}()+a.getData()+(b?"\x3cscript\x3e"+(CKEDITOR.env.ie?"window.onload":"document.onreadystatechange")+" \x3d function() { previewCallback(); } \x3c/script\x3e":"")+"\x3c/body\x3e\x3c/html\x3e"}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)}}function g(){var a=CKEDITOR.plugins.getPath("preview");return CKEDITOR.env.gecko?
CKEDITOR.getUrl(a+"preview.html"):""}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(a,e){var m={dataValue:b(a,e)},k=h(),l;l=CKEDITOR.env.ie||CKEDITOR.env.gecko?"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 c=g(),f,d;if(!1===a.fire("contentPreview",m))return!1;if(l||c)window._cke_htmlToLoad=m.dataValue;f=window.open(c,null,["toolbar\x3dyes,location\x3dno,status\x3dyes,menubar\x3dyes,scrollbars\x3dyes,resizable\x3dyes","width\x3d"+k.width,"height\x3d"+k.height,"left\x3d"+k.left].join());
d=new CKEDITOR.dom.window(f);l&&f&&(f.location=l);window._cke_htmlToLoad||(k=f.document,k.open(),k.write(m.dataValue),k.close());e&&(f.previewCallback=function(){"complete"===f.document.readyState&&e(d)},f.previewCallback());return d}}}(),function(){CKEDITOR.plugins.add("print",{requires:"preview",init:function(b){b.addCommand("print",CKEDITOR.plugins.print);b.ui.addButton&&b.ui.addButton("Print",{label:b.lang.print.toolbar,command:"print",toolbar:"document,50"})}});CKEDITOR.plugins.print={exec:function(b){CKEDITOR.plugins.preview.createPreview(b,
function(b){b=b.$;CKEDITOR.env.gecko?b.print():b.document.execCommand("Print");b.close()})},canUndo:!1,readOnly:1,modes:{wysiwyg:1}}}(),CKEDITOR.plugins.add("removeformat",{init:function(b){b.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);b.ui.addButton&&b.ui.addButton("RemoveFormat",{label:b.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(b){for(var h=b._.removeFormatRegex||
(b._.removeFormatRegex=new RegExp("^(?:"+b.config.removeFormatTags.replace(/,/g,"|")+")$","i")),g=b._.removeAttributes||(b._.removeAttributes=b.config.removeFormatAttributes.split(",")),a=CKEDITOR.plugins.removeformat.filter,e=b.getSelection().getRanges(),m=e.createIterator(),k=function(a){return a.type==CKEDITOR.NODE_ELEMENT},l;l=m.getNextRange();){l.enlarge(CKEDITOR.ENLARGE_INLINE);var c=l.createBookmark(),f=c.startNode,d=c.endNode,n=function(c){for(var d=b.elementPath(c),f=d.elements,e=1,g;(g=
f[e])&&!g.equals(d.block)&&!g.equals(d.blockLimit);e++)h.test(g.getName())&&a(b,g)&&c.breakParent(g)};n(f);if(d)for(n(d),f=f.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);f&&!f.equals(d);)if(f.isReadOnly()){if(f.getPosition(d)&CKEDITOR.POSITION_CONTAINS)break;f=f.getNext(k)}else n=f.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==f.getName()&&f.data("cke-realelement")||!a(b,f)||(h.test(f.getName())?f.remove(1):(f.removeAttributes(g),b.fire("removeFormatCleanup",f))),f=n;l.moveToBookmark(c)}b.forceNextSelectionCheck();
b.getSelection().selectRanges(e)}}},filter:function(b,h){for(var g=b._.removeFormatFilters||[],a=0;a<g.length;a++)if(!1===g[a](h))return!1;return!0}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(b){this._.removeFormatFilters||(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(b)},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(b){function h(e){var g=c.width,h=c.height,k=g+(e.data.$.screenX-l.x)*("rtl"==m?-1:1);e=h+(e.data.$.screenY-l.y);f&&(g=Math.max(a.resize_minWidth,Math.min(k,a.resize_maxWidth)));d&&(h=Math.max(a.resize_minHeight,Math.min(e,a.resize_maxHeight)));b.resize(f?g:null,h)}function g(){CKEDITOR.document.removeListener("mousemove",h);CKEDITOR.document.removeListener("mouseup",g);b.document&&(b.document.removeListener("mousemove",h),b.document.removeListener("mouseup",
g))}var a=b.config,e=b.ui.spaceId("resizer"),m=b.element?b.element.getDirection(1):"ltr";!a.resize_dir&&(a.resize_dir="vertical");void 0===a.resize_maxWidth&&(a.resize_maxWidth=3E3);void 0===a.resize_maxHeight&&(a.resize_maxHeight=3E3);void 0===a.resize_minWidth&&(a.resize_minWidth=750);void 0===a.resize_minHeight&&(a.resize_minHeight=250);if(!1!==a.resize_enabled){var k=null,l,c,f=("both"==a.resize_dir||"horizontal"==a.resize_dir)&&a.resize_minWidth!=a.resize_maxWidth,d=("both"==a.resize_dir||"vertical"==
a.resize_dir)&&a.resize_minHeight!=a.resize_maxHeight,n=CKEDITOR.tools.addFunction(function(d){k||(k=b.getResizable());c={width:k.$.offsetWidth||0,height:k.$.offsetHeight||0};l={x:d.screenX,y:d.screenY};a.resize_minWidth>c.width&&(a.resize_minWidth=c.width);a.resize_minHeight>c.height&&(a.resize_minHeight=c.height);CKEDITOR.document.on("mousemove",h);CKEDITOR.document.on("mouseup",g);b.document&&(b.document.on("mousemove",h),b.document.on("mouseup",g));d.preventDefault&&d.preventDefault()});b.on("destroy",
function(){CKEDITOR.tools.removeFunction(n)});b.on("uiSpace",function(a){if("bottom"==a.data.space){var c="";f&&!d&&(c=" cke_resizer_horizontal");!f&&d&&(c=" cke_resizer_vertical");var g='\x3cspan id\x3d"'+e+'" class\x3d"cke_resizer'+c+" cke_resizer_"+m+'" title\x3d"'+CKEDITOR.tools.htmlEncode(b.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event)"\x3e'+("ltr"==m?"◢":"◣")+"\x3c/span\x3e";"ltr"==m&&"ltr"==c?a.data.html+=g:a.data.html=g+a.data.html}},b,null,100);b.on("maximize",
function(a){b.ui.space("resizer")[a.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){var b={readOnly:1,modes:{wysiwyg:1,source:1},exec:function(b){if(b.fire("save")&&(b=b.element.$.form))try{b.submit()}catch(g){b.submit.click&&b.submit.click()}}};CKEDITOR.plugins.add("save",{init:function(h){h.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(h.addCommand("save",b).startDisabled=!h.element.$.form,h.ui.addButton&&h.ui.addButton("Save",{label:h.lang.save.toolbar,command:"save",toolbar:"document,10"}))}})}(),
function(){CKEDITOR.plugins.add("selectall",{init:function(b){b.addCommand("selectAll",{modes:{wysiwyg:1,source:1},exec:function(b){var g=b.editable();if(g.is("textarea"))b=g.$,CKEDITOR.env.ie&&b.createTextRange?b.createTextRange().execCommand("SelectAll"):(b.selectionStart=0,b.selectionEnd=b.value.length),b.focus();else{if(g.is("body"))b.document.$.execCommand("SelectAll",!1,null);else{var a=b.createRange();a.selectNodeContents(g);a.select()}b.forceNextSelectionCheck();b.selectionChange()}},canUndo:!1});
b.ui.addButton&&b.ui.addButton("SelectAll",{label:b.lang.selectall.toolbar,command:"selectAll",toolbar:"selection,10"})}})}(),function(){var b={readOnly:1,preserveState:!0,editorFocus:!1,exec:function(b){this.toggleState();this.refresh(b)},refresh:function(b){if(b.document){var g=this.state!=CKEDITOR.TRISTATE_ON||b.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&!b.focusManager.hasFocus?"removeClass":"attachClass";b.editable()[g]("cke_show_blocks")}}};CKEDITOR.plugins.add("showblocks",{onLoad:function(){var b=
"p div pre address blockquote h1 h2 h3 h4 h5 h6".split(" "),g,a,e,m,k=CKEDITOR.getUrl(this.path),l=!(CKEDITOR.env.ie&&9>CKEDITOR.env.version),c=l?":not([contenteditable\x3dfalse]):not(.cke_show_blocks_off)":"",f,d;for(g=a=e=m="";f=b.pop();)d=b.length?",":"",g+=".cke_show_blocks "+f+c+d,e+=".cke_show_blocks.cke_contents_ltr "+f+c+d,m+=".cke_show_blocks.cke_contents_rtl "+f+c+d,a+=".cke_show_blocks "+f+c+"{background-image:url("+CKEDITOR.getUrl(k+"images/block_"+f+".png")+")}";CKEDITOR.addCss((g+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(a,
e+"{background-position:top left;padding-left:8px}",m+"{background-position:top right;padding-right:8px}"));l||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 g(){a.refresh(h)}if(!h.blockless){var a=h.addCommand("showblocks",b);a.canUndo=!1;h.config.startupOutlineBlocks&&a.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(){a.state!=CKEDITOR.TRISTATE_DISABLED&&a.refresh(h)});h.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(h.on("focus",g),h.on("blur",g));h.on("contentDom",function(){a.state!=CKEDITOR.TRISTATE_DISABLED&&
a.refresh(h)})}}})}(),function(){var b={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(b){this.toggleState();this.refresh(b)},refresh:function(b){if(b.document){var g=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";b.editable()[g]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var b;b=(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(b)},init:function(h){var g=h.addCommand("showborders",b);g.canUndo=!1;!1!==h.config.startupShowBorders&&g.setState(CKEDITOR.TRISTATE_ON);h.on("mode",function(){g.state!=CKEDITOR.TRISTATE_DISABLED&&g.refresh(h)},null,null,100);h.on("contentDom",function(){g.state!=CKEDITOR.TRISTATE_DISABLED&&g.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(b){var g=b.dataProcessor;b=g&&g.dataFilter;g=g&&g.htmlFilter;b&&b.addRules({elements:{table:function(a){a=a.attributes;var b=a["class"],g=parseInt(a.border,10);g&&!(0>=g)||b&&-1!=b.indexOf("cke_show_border")||(a["class"]=(b||"")+" cke_show_border")}}});g&&g.addRules({elements:{table:function(a){a=a.attributes;var b=a["class"];b&&(a["class"]=b.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,
""))}}})}});CKEDITOR.on("dialogDefinition",function(b){var g=b.data.name;if("table"==g||"tableProperties"==g)if(b=b.data.definition,g=b.getContents("info").get("txtBorder"),g.commit=CKEDITOR.tools.override(g.commit,function(a){return function(b,g){a.apply(this,arguments);var h=parseInt(this.getValue(),10);g[!h||0>=h?"addClass":"removeClass"]("cke_show_border")}}),b=(b=b.getContents("advanced"))&&b.get("advCSSClasses"))b.setup=CKEDITOR.tools.override(b.setup,function(a){return function(){a.apply(this,
arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}}),b.commit=CKEDITOR.tools.override(b.commit,function(a){return function(b,g){a.apply(this,arguments);parseInt(g.getAttribute("border"),10)||g.addClass("cke_show_border")}})})}(),CKEDITOR.plugins.add("smiley",{requires:"dialog",init:function(b){b.config.smiley_path=b.config.smiley_path||this.path+"images/";b.addCommand("smiley",new CKEDITOR.dialogCommand("smiley",{allowedContent:"img[alt,height,!src,title,width]",requiredContent:"img"}));
b.ui.addButton&&b.ui.addButton("Smiley",{label:b.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 g(){var a=e&&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 a=
CKEDITOR.plugins.sourcearea;h.addMode("source",function(a){var e=h.ui.space("contents").getDocument().createElement("textarea");e.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)));e.setAttribute("dir","ltr");e.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu");h.ui.space("contents").append(e);e=h.editable(new b(h,
e));e.setData(h.getData(1));CKEDITOR.env.ie&&(e.attachListener(h,"resize",g,e),e.attachListener(CKEDITOR.document.getWindow(),"resize",g,e),CKEDITOR.tools.setTimeout(g,0,e));h.fire("ariaWidget",this);a()});h.addCommand("source",a.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 e=CKEDITOR.env.ie&&
9==CKEDITOR.env.version}}});var b=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(b){this.setValue(b);this.status="ready";this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(b){this[(b?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){b.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})}(),CKEDITOR.plugins.sourcearea=
{commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(b){"wysiwyg"==b.mode&&b.fire("saveSnapshot");b.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);b.setMode("source"==b.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(b){var h=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");b.addCommand("specialchar",{exec:function(){var g=b.langCode,g=h.availableLangs[g]?g:h.availableLangs[g.replace(/-.*/,"")]?g.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(h.path+"dialogs/lang/"+g+".js"),function(){CKEDITOR.tools.extend(b.lang.specialchar,
h.langEntries[g]);b.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1});b.ui.addButton&&b.ui.addButton("SpecialChar",{label:b.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(b){var h=b.config,g=b.lang.stylescombo,a={},e=[],m=[];b.on("stylesSet",function(g){if(g=g.data.styles){for(var l,c,f,d=0,n=g.length;d<n;d++)(l=g[d],b.blockless&&l.element in CKEDITOR.dtd.$block||"string"==typeof l.type&&!CKEDITOR.style.customHandlers[l.type]||(c=l.name,l=new CKEDITOR.style(l),b.filter.customConfig&&!b.filter.check(l)))||(l._name=c,l._.enterMode=h.enterMode,l._.type=f=l.assignedTo||l.type,l._.weight=
d+1E3*(f==CKEDITOR.STYLE_OBJECT?1:f==CKEDITOR.STYLE_BLOCK?2:3),a[c]=l,e.push(l),m.push(l));e.sort(function(a,c){return a._.weight-c._.weight})}});b.on("stylesRemove",function(e){e=e.data&&e.data.type;var g=void 0===e,c;for(c in a){var f=a[c];(g||f.type===e)&&b.removeStyle(f)}});b.ui.addRichCombo("Styles",{label:g.label,title:g.panelTitle,toolbar:"styles,10",allowedContent:m,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(h.contentsCss),multiSelect:!0,attributes:{"aria-label":g.panelTitle}},init:function(){var a,
b,c,f,d,h;d=0;for(h=e.length;d<h;d++)a=e[d],b=a._name,f=a._.type,f!=c&&(this.startGroup(g["panelTitle"+String(f)]),c=f),this.add(b,a.type==CKEDITOR.STYLE_OBJECT?b:a.buildPreview(),b);this.commit()},onClick:function(e){b.focus();b.fire("saveSnapshot");e=a[e];var g=b.elementPath();if(e.group&&e.removeStylesFromSameGroup(b))b.applyStyle(e);else b[e.checkActive(g,b)?"removeStyle":"applyStyle"](e);b.fire("saveSnapshot")},onRender:function(){b.on("selectionChange",function(e){var g=this.getValue();e=e.data.path.elements;
for(var c=0,f=e.length,d;c<f;c++){d=e[c];for(var h in a)if(a[h].checkElementRemovable(d,!0,b)){h!=g&&this.setValue(h);return}}this.setValue("")},this)},onOpen:function(){var e=b.getSelection(),e=e.getSelectedElement()||e.getStartElement()||b.editable(),e=b.elementPath(e),h=[0,0,0,0];this.showAll();this.unmarkAll();for(var c in a){var f=a[c],d=f._.type;f.checkApplicable(e,b,b.activeFilter)?h[d]++:this.hideItem(c);f.checkActive(e,b)&&this.mark(c)}h[CKEDITOR.STYLE_BLOCK]||this.hideGroup(g["panelTitle"+
String(CKEDITOR.STYLE_BLOCK)]);h[CKEDITOR.STYLE_INLINE]||this.hideGroup(g["panelTitle"+String(CKEDITOR.STYLE_INLINE)]);h[CKEDITOR.STYLE_OBJECT]||this.hideGroup(g["panelTitle"+String(CKEDITOR.STYLE_OBJECT)])},refresh:function(){var e=b.elementPath();if(e){for(var g in a)if(a[g].checkApplicable(e,b,b.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){a={};e=[]}})}})}(),function(){function b(a){return{editorFocus:!1,canUndo:!0,modes:{wysiwyg:1},exec:function(b){if(b.editable().hasFocus){var g=
b.getSelection(),h;if(h=(new CKEDITOR.dom.elementPath(g.getStartElement(),g.root)).contains({td:1,th:1},1)){var g=b.createRange(),c=CKEDITOR.tools.tryThese(function(){var c=h.getParent().$.cells[h.$.cellIndex+(a?-1:1)];c.parentNode.parentNode;return c},function(){var c=h.getParent(),c=c.getAscendant("table").$.rows[c.$.rowIndex+(a?-1:1)];return c.cells[a?c.cells.length-1:0]});if(c||a)if(c)c=new CKEDITOR.dom.element(c),g.moveToElementEditStart(c),g.checkStartOfBlock()&&g.checkEndOfBlock()||g.selectNodeContents(c);
else return!0;else{for(var f=h.getAscendant("table").$,c=h.getParent().$.cells,f=new CKEDITOR.dom.element(f.insertRow(-1),b.document),d=0,n=c.length;d<n;d++)f.append((new CKEDITOR.dom.element(c[d],b.document)).clone(!1,!1)).appendBogus();g.moveToElementEditStart(f)}g.select(!0);return!0}}return!1}}}var h={editorFocus:!1,modes:{wysiwyg:1,source:1}},g={exec:function(a){a.container.focusNext(!0,a.tabIndex)}},a={exec:function(a){a.container.focusPrevious(!0,a.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(e){for(var m=
!1!==e.config.enableTabKeyTools,k=e.config.tabSpaces||0,l="";k--;)l+=" ";if(l)e.on("key",function(a){9==a.data.keyCode&&(e.insertText(l),a.cancel())});if(m)e.on("key",function(a){(9==a.data.keyCode&&e.execCommand("selectNextCell")||a.data.keyCode==CKEDITOR.SHIFT+9&&e.execCommand("selectPreviousCell"))&&a.cancel()});e.addCommand("blur",CKEDITOR.tools.extend(g,h));e.addCommand("blurBack",CKEDITOR.tools.extend(a,h));e.addCommand("selectNextCell",b());e.addCommand("selectPreviousCell",b(!0))}})}(),CKEDITOR.dom.element.prototype.focusNext=
function(b,h){var g=void 0===h?this.getTabIndex():h,a,e,m,k,l,c;if(0>=g)for(l=this.getNextSourceNode(b,CKEDITOR.NODE_ELEMENT);l;){if(l.isVisible()&&0===l.getTabIndex()){m=l;break}l=l.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(l=this.getDocument().getBody().getFirst();l=l.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!a)if(!e&&l.equals(this)){if(e=!0,b){if(!(l=l.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;a=1}}else e&&!this.contains(l)&&(a=1);if(l.isVisible()&&!(0>(c=l.getTabIndex()))){if(a&&
c==g){m=l;break}c>g&&(!m||!k||c<k)?(m=l,k=c):m||0!==c||(m=l,k=c)}}m&&m.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(b,h){for(var g=void 0===h?this.getTabIndex():h,a,e,m,k=0,l,c=this.getDocument().getBody().getLast();c=c.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!a)if(!e&&c.equals(this)){if(e=!0,b){if(!(c=c.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;a=1}}else e&&!this.contains(c)&&(a=1);if(c.isVisible()&&!(0>(l=c.getTabIndex())))if(0>=g){if(a&&0===l){m=c;break}l>
k&&(m=c,k=l)}else{if(a&&l==g){m=c;break}l<g&&(!m||l>k)&&(m=c,k=l)}}m&&m.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(b){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(!b.blockless){var g=b.lang.table;b.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];"+
(b.plugins.dialogadvtab?"table"+b.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(a){if(a.styles){var b;if(a.styles.border)b=CKEDITOR.tools.style.parse.border(a.styles.border);else if(CKEDITOR.env.ie&&8===CKEDITOR.env.version){var g=a.styles;g["border-left"]&&g["border-left"]===g["border-right"]&&g["border-right"]===g["border-top"]&&
g["border-top"]===g["border-bottom"]&&(b=CKEDITOR.tools.style.parse.border(g["border-top"]))}b&&b.style&&"solid"===b.style&&b.width&&0!==parseFloat(b.width)&&(a.attributes.border=1);"collapse"==a.styles["border-collapse"]&&(a.attributes.cellspacing=0)}}}]]}));b.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",h()));b.addCommand("tableDelete",h({exec:function(a){var b=a.elementPath().contains("table",1);if(b){var g=b.getParent(),h=a.editable();1!=g.getChildCount()||g.is("td",
"th")||g.equals(h)||(b=g);a=a.createRange();a.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);b.remove();a.select()}}}));b.ui.addButton&&b.ui.addButton("Table",{label:g.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");b.addMenuItems&&b.addMenuItems({table:{label:g.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:g.deleteTable,command:"tableDelete",group:"table",
order:1}});b.on("doubleclick",function(a){a.data.element.is("table")&&(a.data.dialog="tableProperties")});b.contextMenu&&b.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function b(a,c){function b(a){return c?c.contains(a)&&a.getAscendant("table",!0).equals(c):!0}function d(a){var c=/^(?:td|th)$/;0<f.length||a.type!=CKEDITOR.NODE_ELEMENT||!c.test(a.getName())||a.getCustomData("selected_cell")||(CKEDITOR.dom.element.setMarker(e,
a,"selected_cell",!0),f.push(a))}var f=[],e={};if(!a)return f;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))&&b(k)&&f.push(k);else{var k=new CKEDITOR.dom.walker(k),m;for(k.guard=d;m=k.next();)m.type==CKEDITOR.NODE_ELEMENT&&m.is(CKEDITOR.dtd.table)||(m=m.getAscendant({td:1,th:1},!0))&&!m.getCustomData("selected_cell")&&b(m)&&(CKEDITOR.dom.element.setMarker(e,m,"selected_cell",!0),f.push(m))}}CKEDITOR.dom.element.clearAllMarkers(e);
return f}function h(a,c){for(var d=x(a)?a:b(a),f=d[0],e=f.getAscendant("table"),f=f.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(e.$.rows[k]),h=c?h:k,g=c?g:d,d=CKEDITOR.tools.buildTableMap(e),e=d[h],h=c?d[h-1]:d[h+1],d=d[0].length,f=f.createElement("tr"),k=0;e[k]&&k<d;k++){var m;1<e[k].rowSpan&&h&&e[k]==h[k]?(m=e[k],m.rowSpan+=1):(m=(new CKEDITOR.dom.element(e[k])).clone(),m.removeAttribute("rowSpan"),m.appendBogus(),
f.append(m),m=m.$);k+=m.colSpan-1}c?f.insertBefore(g):f.insertAfter(g);return f}function g(a){if(a instanceof CKEDITOR.dom.selection){var c=a.getRanges(),d=b(a),f=d[0].getAscendant("table"),e=CKEDITOR.tools.buildTableMap(f),h=d[0].getParent().$.rowIndex,d=d[d.length-1],k=d.getParent().$.rowIndex+d.$.rowSpan-1,d=[];a.reset();for(a=h;a<=k;a++){for(var m=e[a],l=new CKEDITOR.dom.element(f.$.rows[a]),n=0;n<m.length;n++){var q=new CKEDITOR.dom.element(m[n]),u=q.getParent().$.rowIndex;1==q.$.rowSpan?q.remove():
(--q.$.rowSpan,u==a&&(u=e[a+1],u[n-1]?q.insertAfter(new CKEDITOR.dom.element(u[n-1])):(new CKEDITOR.dom.element(f.$.rows[a+1])).append(q,1)));n+=q.$.colSpan-1}d.push(l)}e=f.$.rows;c[0].moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);h=new CKEDITOR.dom.element(e[k+1]||(0<h?e[h-1]:null)||f.$.parentNode);for(a=d.length;0<=a;a--)g(d[a]);return f.$.parentNode?h:(c[0].select(),null)}a instanceof CKEDITOR.dom.element&&(f=a.getAscendant("table"),1==f.$.rows.length?f.remove():a.remove());return null}function a(a){for(var c=
a.getParent().$.cells,b=0,d=0;d<c.length;d++){var f=c[d],b=b+f.colSpan;if(f==a.$)break}return b-1}function e(c,b){for(var d=b?Infinity:0,f=0;f<c.length;f++){var e=a(c[f]);if(b?e<d:e>d)d=e}return d}function m(a,c){for(var d=x(a)?a:b(a),f=d[0].getAscendant("table"),g=e(d,1),d=e(d),h=c?g:d,k=CKEDITOR.tools.buildTableMap(f),f=[],g=[],d=[],m=k.length,l=0;l<m;l++){var n=c?k[l][h-1]:k[l][h+1];f.push(k[l][h]);g.push(n)}for(l=0;l<m;l++)f[l]&&(1<f[l].colSpan&&g[l]==f[l]?(k=f[l],k.colSpan+=1):(h=new CKEDITOR.dom.element(f[l]),
k=h.clone(),k.removeAttribute("colSpan"),k.appendBogus(),k[c?"insertBefore":"insertAfter"].call(k,h),d.push(k),k=k.$),l+=k.rowSpan-1);return d}function k(a){function c(a){var b=a.getRanges(),d,f;if(1!==b.length)return a;b=b[0];if(b.collapsed||0!==b.endOffset)return a;d=b.endContainer;f=d.getName().toLowerCase();if("td"!==f&&"th"!==f)return a;for((f=d.getPrevious())||(f=d.getParent().getPrevious().getLast());f.type!==CKEDITOR.NODE_TEXT&&"br"!==f.getName().toLowerCase();)if(f=f.getLast(),!f)return a;
b.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);return b.select()}CKEDITOR.env.webkit&&!a.isFake&&(a=c(a));var d=a.getRanges(),f=b(a),e=f[0],g=f[f.length-1],f=e.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(f),k,m,l=[];a.reset();var n=0;for(a=h.length;n<a;n++)for(var q=0,u=h[n].length;q<u;q++)void 0===k&&h[n][q]==e.$&&(k=q),h[n][q]==g.$&&(m=q);for(n=k;n<=m;n++)for(q=0;q<h.length;q++)g=h[q],e=new CKEDITOR.dom.element(f.$.rows[q]),g=new CKEDITOR.dom.element(g[n]),g.$&&(1==g.$.colSpan?g.remove():--g.$.colSpan,
q+=g.$.rowSpan-1,e.$.cells.length||l.push(e));k=h[0].length-1>m?new CKEDITOR.dom.element(h[0][m+1]):k&&-1!==h[0][k-1].cellIndex?new CKEDITOR.dom.element(h[0][k-1]):new CKEDITOR.dom.element(f.$.parentNode);l.length==a&&(d[0].moveToPosition(f,CKEDITOR.POSITION_AFTER_END),d[0].select(),f.remove());return k}function l(a,c){var b=a.getStartElement().getAscendant({td:1,th:1},!0);if(b){var d=b.clone();d.appendBogus();c?d.insertBefore(b):d.insertAfter(b)}}function c(a){if(a instanceof CKEDITOR.dom.selection){var d=
a.getRanges(),e=b(a),g=e[0]&&e[0].getAscendant("table"),h;a:{var k=0;h=e.length-1;for(var m={},l,n;l=e[k++];)CKEDITOR.dom.element.setMarker(m,l,"delete_cell",!0);for(k=0;l=e[k++];)if((n=l.getPrevious())&&!n.getCustomData("delete_cell")||(n=l.getNext())&&!n.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(m);h=n;break a}CKEDITOR.dom.element.clearAllMarkers(m);k=e[0].getParent();(k=k.getPrevious())?h=k.getLast():(k=e[h].getParent(),h=(k=k.getNext())?k.getChild(0):null)}a.reset();for(a=
e.length-1;0<=a;a--)c(e[a]);h?f(h,!0):g&&(d[0].moveToPosition(g,CKEDITOR.POSITION_BEFORE_START),d[0].select(),g.remove())}else a instanceof CKEDITOR.dom.element&&(d=a.getParent(),1==d.getChildCount()?d.remove():a.remove())}function f(a,c){var b=a.getDocument(),d=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&(d.focus(),b.focus());b=new CKEDITOR.dom.range(b);b["moveToElementEdit"+(c?"End":"Start")](a)||(b.selectNodeContents(a),b.collapse(c?!1:!0));b.select(!0)}function d(a,c,b){a=a[c];
if("undefined"==typeof b)return a;for(c=0;a&&c<a.length;c++){if(b.is&&a[c]==b.$)return c;if(c==b)return new CKEDITOR.dom.element(a[c])}return b.is?-1:null}function n(a,c,f){var e=b(a),g;if((c?1!=e.length:2>e.length)||(g=a.getCommonAncestor())&&g.type==CKEDITOR.NODE_ELEMENT&&g.is("table"))return!1;a=e[0];g=a.getAscendant("table");var h=CKEDITOR.tools.buildTableMap(g),k=h.length,m=h[0].length,l=a.getParent().$.rowIndex,n=d(h,l,a),q;if(c){var u;try{var x=parseInt(a.getAttribute("rowspan"),10)||1;q=parseInt(a.getAttribute("colspan"),
10)||1;u=h["up"==c?l-x:"down"==c?l+x:l]["left"==c?n-q:"right"==c?n+q:n]}catch(J){return!1}if(!u||a.$==u)return!1;e["up"==c||"left"==c?"unshift":"push"](new CKEDITOR.dom.element(u))}c=a.getDocument();var G=l,x=u=0,M=!f&&new CKEDITOR.dom.documentFragment(c),I=0;for(c=0;c<e.length;c++){q=e[c];var E=q.getParent(),P=q.getFirst(),L=q.$.colSpan,O=q.$.rowSpan,E=E.$.rowIndex,N=d(h,E,q),I=I+L*O,x=Math.max(x,N-n+L);u=Math.max(u,E-l+O);f||(L=q,(O=L.getBogus())&&O.remove(),L.trim(),q.getChildren().count()&&(E==
G||!P||P.isBlockBoundary&&P.isBlockBoundary({br:1})||(G=M.getLast(CKEDITOR.dom.walker.whitespaces(!0)),!G||G.is&&G.is("br")||M.append("br")),q.moveChildren(M)),c?q.remove():q.setHtml(""));G=E}if(f)return u*x==I;M.moveChildren(a);a.appendBogus();x>=m?a.removeAttribute("rowSpan"):a.$.rowSpan=u;u>=k?a.removeAttribute("colSpan"):a.$.colSpan=x;f=new CKEDITOR.dom.nodeList(g.$.rows);e=f.count();for(c=e-1;0<=c;c--)g=f.getItem(c),g.$.cells.length||(g.remove(),e++);return a}function q(a,c){var f=b(a);if(1<
f.length)return!1;if(c)return!0;var f=f[0],e=f.getParent(),g=e.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(g),k=e.$.rowIndex,m=d(h,k,f),l=f.$.rowSpan,n;if(1<l){n=Math.ceil(l/2);for(var l=Math.floor(l/2),e=k+n,g=new CKEDITOR.dom.element(g.$.rows[e]),h=d(h,e),q,e=f.clone(),k=0;k<h.length;k++)if(q=h[k],q.parentNode==g.$&&k>m){e.insertBefore(new CKEDITOR.dom.element(q));break}else q=null;q||g.append(e)}else for(l=n=1,g=e.clone(),g.insertAfter(e),g.append(e=f.clone()),q=d(h,k),m=0;m<q.length;m++)q[m].rowSpan++;
e.appendBogus();f.$.rowSpan=n;e.$.rowSpan=l;1==n&&f.removeAttribute("rowSpan");1==l&&e.removeAttribute("rowSpan");return e}function u(a,c){var f=b(a);if(1<f.length)return!1;if(c)return!0;var f=f[0],e=f.getParent(),g=e.getAscendant("table"),g=CKEDITOR.tools.buildTableMap(g),h=d(g,e.$.rowIndex,f),k=f.$.colSpan;if(1<k)e=Math.ceil(k/2),k=Math.floor(k/2);else{for(var k=e=1,m=[],l=0;l<g.length;l++){var n=g[l];m.push(n[h]);1<n[h].rowSpan&&(l+=n[h].rowSpan-1)}for(g=0;g<m.length;g++)m[g].colSpan++}g=f.clone();
g.insertAfter(f);g.appendBogus();f.$.colSpan=e;g.$.colSpan=k;1==e&&f.removeAttribute("colSpan");1==k&&g.removeAttribute("colSpan");return g}var x=CKEDITOR.tools.isArray;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(a){function d(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,c){this.setState(c.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function e(c,b){var d=a.addCommand(c,b);a.addFeature(d)}var r=a.lang.table,
x=CKEDITOR.tools.style.parse,z="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(" ");e("cellProperties",new CKEDITOR.dialogCommand("cellProperties",d({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",requiredContent:z,contentTransformations:[[{element:"td",left:function(a){return a.styles.background&&x.background(a.styles.background).color},
right:function(a){a.styles["background-color"]=x.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(c){c.name in{td:1,th:1}&&(c.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");e("rowDelete",d({requiredContent:"table",exec:function(a){a=a.getSelection();(a=g(a))&&f(a)}}));e("rowInsertBefore",d({requiredContent:"table",exec:function(a){a=a.getSelection();a=b(a);h(a,!0)}}));
e("rowInsertAfter",d({requiredContent:"table",exec:function(a){a=a.getSelection();a=b(a);h(a)}}));e("columnDelete",d({requiredContent:"table",exec:function(a){a=a.getSelection();(a=k(a))&&f(a,!0)}}));e("columnInsertBefore",d({requiredContent:"table",exec:function(a){a=a.getSelection();a=b(a);m(a,!0)}}));e("columnInsertAfter",d({requiredContent:"table",exec:function(a){a=a.getSelection();a=b(a);m(a)}}));e("cellDelete",d({requiredContent:"table",exec:function(a){a=a.getSelection();c(a)}}));e("cellMerge",
d({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(a,c){c.cell=n(a.getSelection());f(c.cell,!0)}}));e("cellMergeRight",d({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a,c){c.cell=n(a.getSelection(),"right");f(c.cell,!0)}}));e("cellMergeDown",d({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a,c){c.cell=n(a.getSelection(),"down");f(c.cell,!0)}}));e("cellVerticalSplit",d({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",
exec:function(a){f(u(a.getSelection()))}}));e("cellHorizontalSplit",d({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){f(q(a.getSelection()))}}));e("cellInsertBefore",d({requiredContent:"table",exec:function(a){a=a.getSelection();l(a,!0)}}));e("cellInsertAfter",d({requiredContent:"table",exec:function(a){a=a.getSelection();l(a)}}));a.addMenuItems&&a.addMenuItems({tablecell:{label:r.cell.menu,group:"tablecell",order:1,getItems:function(){var c=a.getSelection(),d=b(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:u(c,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:q(c,!0)?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED};a.filter.check(z)&&(c.tablecell_properties=0<d.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);return c}},tablecell_insertBefore:{label:r.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:r.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:r.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:r.cell.merge,group:"tablecell",command:"cellMerge",
order:16},tablecell_merge_right:{label:r.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:r.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:r.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:r.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:r.cell.title,group:"tablecellproperties",command:"cellProperties",
order:21},tablerow:{label:r.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:r.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:r.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:r.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},
tablecolumn:{label:r.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:r.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:r.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:r.column.deleteColumn,group:"tablecolumn",
command:"columnDelete",order:15}});a.contextMenu&&a.contextMenu.addListener(function(a,c,b){return(a=b.contains({td:1,th:1},1))&&!a.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getCellColIndex:a,insertRow:h,insertColumn:m,getSelectedCells:b};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(b,h,g,a,e){b=b.$.rows;g=g||0;a="number"===typeof a?a:b.length-1;e="number"===typeof e?
e:-1;var m=-1,k=[];for(h=h||0;h<=a;h++){m++;!k[m]&&(k[m]=[]);for(var l=-1,c=g;c<=(-1===e?b[h].cells.length-1:e);c++){var f=b[h].cells[c];if(!f)break;for(l++;k[m][l];)l++;for(var d=isNaN(f.colSpan)?1:f.colSpan,f=isNaN(f.rowSpan)?1:f.rowSpan,n=0;n<f&&!(h+n>a);n++){k[m+n]||(k[m+n]=[]);for(var q=0;q<d;q++)k[m+n][l+q]=b[h].cells[c]}l+=d-1;if(-1!==e&&l>=e)break}}return k},CKEDITOR.config.tabletools_scopedHeaders=!1,function(){function b(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}
function h(a,b){var d=a.getAscendant("table"),f=b.getAscendant("table"),e=CKEDITOR.tools.buildTableMap(d),g=c(a),h=c(b),k=[],m={},l,n;d.contains(f)&&(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<e[g].length;d++)if(a.$===e[g][d]){l=d;break}for(d=0;d<e[h].length;d++)if(b.$===e[h][d]){n=d;break}l>n&&(d=l,l=n,n=d);for(d=g;d<=h;d++)for(g=l;g<=n;g++)f=new CKEDITOR.dom.element(e[d][g]),f.$&&!f.getCustomData("selected_cell")&&(k.push(f),CKEDITOR.dom.element.setMarker(m,f,
"selected_cell",!0));CKEDITOR.dom.element.clearAllMarkers(m);return k}function g(a){return(a=a.editable().findOne(".cke_table-faked-selection"))&&a.getAscendant("table")}function a(a,c){var b=a.editable().find(".cke_table-faked-selection"),d=a.editable().findOne("[data-cke-table-faked-selection-table]"),f;a.fire("lockSnapshot");a.editable().removeClass("cke_table-faked-selection-editor");for(f=0;f<b.count();f++)b.getItem(f).removeClass("cke_table-faked-selection");d&&d.data("cke-table-faked-selection-table",
!1);a.fire("unlockSnapshot");c&&(p={active:!1},a.getSelection().isInTable()&&a.getSelection().reset())}function e(a,c){var b=[],d,f;for(f=0;f<c.length;f++)d=a.createRange(),d.setStartBefore(c[f]),d.setEndAfter(c[f]),b.push(d);a.getSelection().selectRanges(b)}function m(a){var c=a.editable().find(".cke_table-faked-selection");1>c.count()||(c=h(c.getItem(0),c.getItem(c.count()-1)),e(a,c))}function k(c,d,f){var g=B(c.getSelection(!0));d=d.is("table")?null:d;var k;(k=p.active&&!p.first)&&!(k=d)&&(k=c.getSelection().getRanges(),
k=1<g.length||k[0]&&!k[0].collapsed?!0:!1);if(k)p.first=d||g[0],p.dirty=d?!1:1!==g.length;else if(p.active&&d&&p.first.getAscendant("table").equals(d.getAscendant("table"))){g=h(p.first,d);if(!p.dirty&&1===g.length&&!b(f.data.getTarget()))return a(c,"mouseup"===f.name);p.dirty=!0;p.last=d;e(c,g)}}function l(c){var b=(c=c.editor||c.sender.editor)&&c.getSelection(),d=b&&b.getRanges()||[],f=d&&d[0].getEnclosedNode(),f=f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("img"),e;if(b&&(a(c),b.isInTable()&&b.isFake))if(f)c.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")&&(e=d[0]._getTableElement());e=B(b,e);c.fire("lockSnapshot");for(b=0;b<e.length;b++)e[b].addClass("cke_table-faked-selection");0<e.length&&(c.editable().addClass("cke_table-faked-selection-editor"),e[0].getAscendant("table").data("cke-table-faked-selection-table",""));c.fire("unlockSnapshot")}}function c(a){return a.getAscendant("tr",
!0).$.rowIndex}function f(c){function d(a,c){return a&&c?a.equals(c)||a.contains(c)||c.contains(a)||a.getCommonAncestor(c).is(v):!1}function e(a){return!a.getAscendant("table",!0)&&a.getDocument().equals(l.document)}function h(a,c,b,d){if("mousedown"===a.name&&(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT||!d))return!0;if(c=a.name===(CKEDITOR.env.gecko?"mousedown":"mouseup")&&!e(a.data.getTarget()))a=a.data.getTarget().getAscendant({td:1,th:1},!0),c=!(a&&a.hasClass("cke_table-faked-selection"));
return c}if(c.data.getTarget().getName&&("mouseup"===c.name||!b(c.data.getTarget()))){var l=c.editor||c.listenerData.editor,n=l.getSelection(1),q=g(l),u=c.data.getTarget(),r=u&&u.getAscendant({td:1,th:1},!0),u=u&&u.getAscendant("table",!0),v={table:1,thead:1,tbody:1,tfoot:1,tr:1,td:1,th:1};u&&u.hasAttribute("data-cke-tableselection-ignored")||(h(c,n,q,u)&&a(l,!0),!p.active&&"mousedown"===c.name&&CKEDITOR.tools.getMouseButton(c)===CKEDITOR.MOUSE_BUTTON_LEFT&&u&&(p={active:!0},CKEDITOR.document.on("mouseup",
f,null,{editor:l})),(r||u)&&k(l,r||u,c),"mouseup"===c.name&&(CKEDITOR.tools.getMouseButton(c)===CKEDITOR.MOUSE_BUTTON_LEFT&&(e(c.data.getTarget())||d(q,u))&&m(l),p={active:!1},CKEDITOR.document.removeListener("mouseup",f)))}}function d(a){var c=a.data.getTarget().getAscendant("table",!0);p.active=!1;c&&c.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,c){function b(a){a.cancel()}var d=a.getSelection(),
f=d.createBookmarks(),e=a.document,g=a.createRange(),h=e.getDocumentElement().$,k=CKEDITOR.env.ie&&9>CKEDITOR.env.version,m=a.blockless||CKEDITOR.env.ie?"span":"div",l,n,p,q;e.getById("cke_table_copybin")||(l=e.createElement(m),n=e.createElement(m),n.setAttributes({id:"cke_table_copybin","data-cke-temp":"1"}),l.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"}),l.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-5000px"),l.setHtml(a.getSelectedHtml(!0)),a.fire("lockSnapshot"),
n.append(l),a.editable().append(n),q=a.on("selectionChange",b,null,null,0),k&&(p=h.scrollTop),g.selectNodeContents(l),g.select(),k&&(h.scrollTop=p),setTimeout(function(){n.remove();d.selectBookmarks(f);q.removeListener();a.fire("unlockSnapshot");c&&(a.extractSelectedHtml(),a.fire("saveSnapshot"))},100))}function q(a){var c=a.editor||a.sender.editor,b=c.getSelection();b.isInTable()&&(b.getRanges()[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored")||n(c,"cut"===a.name))}
function u(a){this._reset();a&&this.setSelectedCells(a)}function x(a,c,b){a.on("beforeCommandExec",function(b){-1!==CKEDITOR.tools.array.indexOf(c,b.data.name)&&(b.data.selectedCells=B(a.getSelection()))});a.on("afterCommandExec",function(d){-1!==CKEDITOR.tools.array.indexOf(c,d.data.name)&&b(a,d.data)},null,null,9)}var p={active:!1},w,B,r,y,z;u.prototype={};u.prototype._reset=function(){this.cells={first:null,last:null,all:[]};this.rows={first:null,last:null}};u.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")};u.prototype.getTableMap=function(){var a=r(this.cells.first),b;a:{b=this.cells.last;var d=b.getAscendant("table"),f=c(b),d=CKEDITOR.tools.buildTableMap(d),e;for(e=0;e<d[f].length;e++)if((new CKEDITOR.dom.element(d[f][e])).equals(b)){b=e;break a}b=void 0}return CKEDITOR.tools.buildTableMap(this._getTable(),
c(this.rows.first),a,c(this.rows.last),b)};u.prototype._getTable=function(){return this.rows.first.getAscendant("table")};u.prototype.insertRow=function(a,c,b){if("undefined"===typeof a)a=1;else if(0>=a)return;for(var d=this.cells.first.$.cellIndex,f=this.cells.last.$.cellIndex,e=b?[]:this.cells.all,g,h=0;h<a;h++)g=y(b?this.cells.all:e,c),g=CKEDITOR.tools.array.filter(g.find("td, th").toArray(),function(a){return b?!0:a.$.cellIndex>=d&&a.$.cellIndex<=f}),e=c?g.concat(e):e.concat(g);this.setSelectedCells(e)};
u.prototype.insertColumn=function(a){function b(a){a=c(a);return a>=e&&a<=g}if("undefined"===typeof a)a=1;else if(0>=a)return;for(var d=this.cells,f=d.all,e=c(d.first),g=c(d.last),d=0;d<a;d++)f=f.concat(CKEDITOR.tools.array.filter(z(f),b));this.setSelectedCells(f)};u.prototype.emptyCells=function(a){a=a||this.cells.all;for(var c=0;c<a.length;c++)a[c].setHtml("")};u.prototype._arraySortByDOMOrder=function(a){a.sort(function(a,c){return a.getPosition(c)&CKEDITOR.POSITION_PRECEDING?-1:1})};var v={onPaste:function(a){function c(a){var b=
d.createRange();b.selectNodeContents(a);b.select()}function b(a){return Math.max.apply(null,CKEDITOR.tools.array.map(a,function(a){return a.length},0))}var d=a.editor,f=d.getSelection(),g=B(f),k=f.isInTable(!0)&&this.isBoundarySelection(f),m=this.findTableInPastedContent(d,a.data.dataValue),l,n;(function(a,c,b,d){a=a.getRanges();var f=a.length&&a[0]._getTableElement({table:1});if(!c.length||f&&f.hasAttribute("data-cke-tableselection-ignored")||d&&!b)return!1;if(c=!d)(c=a[0])?(c=c.clone(),c.enlarge(CKEDITOR.ENLARGE_ELEMENT),
c=(c=c.getEnclosedNode())&&c.is&&c.is(CKEDITOR.dtd.$tableContent)):c=void 0,c=!c;return c?!1:!0})(f,g,m,k)&&"drop"!==a.data.method&&(g=g[0].getAscendant("table"),l=new u(B(f,g)),d.once("afterPaste",function(){var a;if(n){a=new CKEDITOR.dom.element(n[0][0]);var c=n[n.length-1];a=h(a,new CKEDITOR.dom.element(c[c.length-1]))}else a=l.cells.all;e(d,a)}),m?(a.stop(),k?(l.insertRow(1,1===k,!0),f.selectElement(l.rows.first)):(l.emptyCells(),e(d,l.cells.all)),a=l.getTableMap(),n=CKEDITOR.tools.buildTableMap(m),
l.insertRow(n.length-a.length),l.insertColumn(b(n)-b(a)),a=l.getTableMap(),this.pasteTable(l,a,n),d.fire("saveSnapshot"),setTimeout(function(){d.fire("afterPaste")},0)):(c(l.cells.first),d.once("afterPaste",function(){d.fire("lockSnapshot");l.emptyCells(l.cells.all.slice(1));e(d,l.cells.all);d.fire("unlockSnapshot")})))},isBoundarySelection:function(a){a=a.getRanges()[0];var c=a.endContainer.getAscendant("tr",!0);if(c&&a.collapsed){if(a.checkBoundaryOfElement(c,CKEDITOR.START))return 1;if(a.checkBoundaryOfElement(c,
CKEDITOR.END))return 2}return 0},findTableInPastedContent:function(a,c){var b=a.dataProcessor,d=new CKEDITOR.dom.element("body");b||(b=new CKEDITOR.htmlDataProcessor(a));d.setHtml(b.toHtml(c),{fixForBody:!1});return 1<d.getChildCount()?null:d.findOne("table")},pasteTable:function(a,c,b){var d,f=r(a.cells.first),e=a._getTable(),g={},h,k,m,l;for(m=0;m<b.length;m++)for(h=new CKEDITOR.dom.element(e.$.rows[a.rows.first.$.rowIndex+m]),l=0;l<b[m].length;l++)if(k=new CKEDITOR.dom.element(b[m][l]),d=c[m]&&
c[m][l]?new CKEDITOR.dom.element(c[m][l]):null,k&&!k.getCustomData("processed")){if(d&&d.getParent())k.replace(d);else if(0===l||b[m][l-1])(d=0!==l?new CKEDITOR.dom.element(b[m][l-1]):null)&&h.equals(d.getParent())?k.insertAfter(d):0<f?h.$.cells[f]?k.insertAfter(new CKEDITOR.dom.element(h.$.cells[f])):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 c(a){var b=a.getEnclosedNode();b&&"function"===typeof b.is&&b.is({td:1,th:1})?b.setText(""):a.deleteContents();CKEDITOR.tools.array.forEach(a._find("td"),function(a){a.appendBogus()})}var b=a.editable();b.attachListener(b,"keydown",function(a){function b(c,d){if(!d.length)return null;var e=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(f)){for(var m=k.getAscendant("table",!0),l=k.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT,m),n=!1,p=function(a){return!k.contains(a)&&a.is&&a.is("td","th")};l&&!p(l);)l=l.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT,m);!l&&h&&h.is&&!h.is("table")&&h.getNext()&&(l=h.getNext().findOne("td, th"),n=!0);if(l)e["moveToElementEdit"+(n?"Start":"End")](l);else e.setStartBefore(k.getAscendant("table",!0)),e.collapse(!0);g[0].deleteContents();return[e]}if(k)return e.moveToElementEditablePosition(k),
[e]}var d={37:1,38:1,39:1,40:1,8:1,46:1,13:1},f=CKEDITOR.tools.extend({table:1},CKEDITOR.dtd.$tableContent);delete f.td;delete f.th;return function(f){var e=f.data.getKey(),g=f.data.getKeystroke(),h,k=37===e||38==e,l,m,n;if(d[e]&&!a.readOnly&&(h=a.getSelection())&&h.isInTable()&&h.isFake){l=h.getRanges();m=l[0]._getTableElement();n=l[l.length-1]._getTableElement();if(13!==e||a.plugins.enterkey)f.data.preventDefault(),f.cancel();if(36<e&&41>e)l[0].moveToElementEditablePosition(k?m:n,!k),h.selectRanges([l[0]]);
else if(13!==e||13===g||g===CKEDITOR.SHIFT+13){for(f=0;f<l.length;f++)c(l[f]);(f=b(m,l))?l=f:l[0].moveToElementEditablePosition(m);h.selectRanges(l);13===e&&a.plugins.enterkey?(a.fire("lockSnapshot"),13===g?a.execCommand("enter"):a.execCommand("shiftEnter"),a.fire("unlockSnapshot"),a.fire("saveSnapshot")):13!==e&&a.fire("saveSnapshot")}}}}(a),null,null,-1);b.attachListener(b,"keypress",function(b){var d=a.getSelection(),f=b.data.$.charCode||13===b.data.getKey(),e;if(!a.readOnly&&d&&d.isInTable()&&
d.isFake&&f&&!(b.data.getKeystroke()&CKEDITOR.CTRL)){b=d.getRanges();f=b[0].getEnclosedNode().getAscendant({td:1,th:1},!0);for(e=0;e<b.length;e++)c(b[e]);f&&(b[0].moveToElementEditablePosition(f),d.selectRanges([b[0]]))}},null,null,-1);b.attachListener(b,"keyup",function(a){return function(c){c=c.data.getKey();var b=a.getSelection();9===c&&b.isInTable()&&m(a)}}(a),null,null,-1)}};CKEDITOR.plugins.add("tableselection",{requires:"clipboard,tabletools",isSupportedEnvironment:function(){return!(CKEDITOR.env.ie&&
11>CKEDITOR.env.version)},onLoad:function(){w=CKEDITOR.plugins.tabletools;B=w.getSelectedCells;r=w.getCellColIndex;y=w.insertRow;z=w.insertColumn;CKEDITOR.document.appendStyleSheet(this.path+"styles/tableselection.css")},init:function(c){this.isSupportedEnvironment()&&(c.addContentsCss&&c.addContentsCss(this.path+"styles/tableselection.css"),c.on("contentDom",function(){var a=c.editable(),b=a.isInline()?a:c.document,e={editor:c};a.attachListener(b,"mousedown",f,null,e);a.attachListener(b,"mousemove",
f,null,e);a.attachListener(b,"mouseup",f,null,e);a.attachListener(a,"dragstart",d);a.attachListener(c,"selectionCheck",l);CKEDITOR.plugins.tableselection.keyboardIntegration(c);CKEDITOR.plugins.clipboard&&!CKEDITOR.plugins.clipboard.isCustomCopyCutSupported&&(a.attachListener(a,"cut",q),a.attachListener(a,"copy",q))}),c.on("paste",v.onPaste,v),x(c,"rowInsertBefore rowInsertAfter columnInsertBefore columnInsertAfter cellInsertBefore cellInsertAfter".split(" "),function(a,c){e(a,c.selectedCells)}),
x(c,["cellMerge","cellMergeRight","cellMergeDown"],function(a,c){e(a,[c.commandData.cell])}),x(c,["cellDelete"],function(c){a(c,!0)}))}})}(),function(){CKEDITOR.plugins.add("templates",{requires:"dialog,ajax",init:function(b){CKEDITOR.dialog.add("templates",CKEDITOR.getUrl(this.path+"dialogs/templates.js"));b.addCommand("templates",new CKEDITOR.dialogCommand("templates"));b.ui.addButton&&b.ui.addButton("Templates",{label:b.lang.templates.button,command:"templates",toolbar:"doctools,10"})}});var b=
{},h={};CKEDITOR.addTemplates=function(g,a){b[g]=a};CKEDITOR.getTemplates=function(g){return b[g]};CKEDITOR.loadTemplates=function(b,a){for(var e=[],m=0,k=b.length;m<k;m++)h[b[m]]||(e.push(b[m]),h[b[m]]=1);e.length?CKEDITOR.scriptLoader.load(e,a):setTimeout(a,0)}}(),CKEDITOR.config.templates_files=[CKEDITOR.getUrl("plugins/templates/templates/default.js")],CKEDITOR.config.templates_replaceContent=!0,"use strict",function(){function b(a,b){return CKEDITOR.tools.array.reduce(b,function(a,c){return c(a)},
a)}var h=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],g={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(c){function b(a){e.enabled&&!1!==a.data.command.canUndo&&e.save()}function d(){e.enabled=c.readOnly?!1:"wysiwyg"==c.mode;e.onChange()}var e=c.undoManager=new a(c),g=e.editingHandler=new k(e),l=c.addCommand("undo",{exec:function(){e.undo()&&(c.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),m=c.addCommand("redo",{exec:function(){e.redo()&&(c.selectionChange(),
this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});c.setKeystroke([[h[0],"undo"],[h[1],"redo"],[h[2],"redo"]]);e.onChange=function(){l.setState(e.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);m.setState(e.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};c.on("beforeCommandExec",b);c.on("afterCommandExec",b);c.on("saveSnapshot",function(a){e.save(a.data&&a.data.contentOnly)});c.on("contentDom",g.attachListeners,g);c.on("instanceReady",function(){c.fire("saveSnapshot")});
c.on("beforeModeUnload",function(){"wysiwyg"==c.mode&&e.save(!0)});c.on("mode",d);c.on("readOnly",d);c.ui.addButton&&(c.ui.addButton("Undo",{label:c.lang.undo.undo,command:"undo",toolbar:"undo,10"}),c.ui.addButton("Redo",{label:c.lang.undo.redo,command:"redo",toolbar:"undo,20"}));c.resetUndo=function(){e.reset();c.fire("saveSnapshot")};c.on("updateSnapshot",function(){e.currentImage&&e.update()});c.on("lockSnapshot",function(a){a=a.data;e.lock(a&&a.dontUpdate,a&&a.forceUpdate)});c.on("unlockSnapshot",
e.unlock,e)}});CKEDITOR.plugins.undo={};var a=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,"")})};a.prototype={type:function(c,b){var d=a.getKeyGroup(c),e=this.strokesRecorded[d]+1;b=b||e>=this.strokesLimit;this.typing||(this.hasUndo=
this.typing=!0,this.hasRedo=!1,this.onChange());b?(e=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[d]=e;this.previousKeyGroup=d},keyGroupChanged:function(c){return a.getKeyGroup(c)!=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,d){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 e(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!==d&&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!==d&&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 e(this.editor));for(var b=this.index,d=this.snapshots;0<b&&this.currentImage.equalsContent(d[b-1]);)--b;d.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 d=null;if(b)d=!0;else{var g=new e(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(g)&&(d=g)}this.locked={update:d,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 e(this.editor,!0);a.equalsContent(b)||this.update()}}},addFilterRule:function(a){this._filterRules.push(a)}};
a.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1};a.keyGroups={PRINTABLE:0,FUNCTIONAL:1};a.isNavigationKey=function(c){return!!a.navigationKeyCodes[c]};a.getKeyGroup=function(c){var b=a.keyGroups;return g[c]?b.FUNCTIONAL:b.PRINTABLE};a.getOppositeKeyGroup=function(c){var b=a.keyGroups;return c==b.FUNCTIONAL?b.PRINTABLE:b.FUNCTIONAL};a.ieFunctionalKeysBug=function(c){return CKEDITOR.env.ie&&a.getKeyGroup(c)==a.keyGroups.FUNCTIONAL};var e=CKEDITOR.plugins.undo.Image=function(a,f){this.editor=
a;a.fire("beforeUndoImage");var d=a.getSnapshot();d&&(this.contents=b(d,a.undoManager._filterRules));f||(this.bookmarks=(d=d&&a.getSelection())&&d.createBookmarks2(!0));a.fire("afterUndoImage")},m=/\b(?:href|src|name)="[^"]*?"/gi;e.prototype={equalsContent:function(a){var b=this.contents;a=a.contents;CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(b=b.replace(m,""),a=a.replace(m,""));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 k=CKEDITOR.plugins.undo.NativeEditingHandler=function(a){this.undoManager=a;this.ignoreInputEvent=!1;this.keyEventsStack=new l;this.lastKeydownImage=null};k.prototype={onKeydown:function(c){var b=c.data.getKey();if(229!==b)if(-1<CKEDITOR.tools.indexOf(h,
c.data.getKeystroke()))c.data.preventDefault();else if(this.keyEventsStack.cleanUp(c),c=this.undoManager,this.keyEventsStack.getLast(b)||this.keyEventsStack.push(b),this.lastKeydownImage=new e(c.editor),a.isNavigationKey(b)||this.undoManager.keyGroupChanged(b))if(c.strokesRecorded[0]||c.strokesRecorded[1])c.save(!1,this.lastKeydownImage,!1),c.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(c){var b=this.undoManager;c=c.data.getKey();var d=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(c);if(!(a.ieFunctionalKeysBug(c)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new e(b.editor,!0))))if(0<d)b.type(c);else if(a.isNavigationKey(c))this.onNavigationKey(!0)},
onNavigationKey:function(a){var b=this.undoManager;!a&&b.save(!0,null,!1)||b.updateSelection(new e(b.editor));b.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=!1},attachListeners:function(){var c=this.undoManager.editor,b=c.editable(),d=this;b.attachListener(b,"keydown",function(c){d.onKeydown(c);if(a.ieFunctionalKeysBug(c.data.getKey()))d.onInput()},null,null,999);b.attachListener(b,CKEDITOR.env.ie?"keypress":
"input",d.onInput,d,null,999);b.attachListener(b,"keyup",d.onKeyup,d,null,999);b.attachListener(b,"paste",d.ignoreInputEventListener,d,null,999);b.attachListener(b,"drop",d.ignoreInputEventListener,d,null,999);c.on("afterPaste",d.activateInputEventListener,d,null,999);b.attachListener(b.isInline()?b:c.document.getDocumentElement(),"click",function(){d.onNavigationKey()},null,null,999);b.attachListener(this.undoManager.editor,"blur",function(){d.keyEventsStack.remove(9)},null,null,999)}};var l=CKEDITOR.plugins.undo.KeyEventsStack=
function(){this.stack=[]};l.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 b(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 g(a,b){var d=a.editable();CKEDITOR.tools.extend(this,{editor:a,editable:d,inline:d.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),k=CKEDITOR.tools.bind(this.removeAll,this);d.attachListener(this.winTop,"resize",g);d.attachListener(this.winTop,"scroll",g);d.attachListener(this.winTop,"resize",h);d.attachListener(this.win,"scroll",h);d.attachListener(this.inline?d:this.frame,"mouseout",function(a){var c=a.data.$.clientX;a=a.data.$.clientY;this.queryViewport();(c<=this.rect.left||c>=this.rect.right||a<=this.rect.top||a>=this.rect.bottom)&&this.hideVisible();(0>=c||c>=this.winTopPane.width||
0>=a||a>=this.winTopPane.height)&&this.hideVisible()},this);d.attachListener(a,"resize",g);d.attachListener(a,"mode",k);a.on("destroy",k);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({},m,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},
e,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},e,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function a(a){var b;if(b=a&&a.type==CKEDITOR.NODE_ELEMENT)b=!(k[a.getComputedStyle("float")]||k[a.getAttribute("align")]);return b&&!l[a.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=
1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;b.prototype={start:function(a){var b=this,d=this.editor,e=this.doc,g,h,k,l,m=CKEDITOR.tools.eventsBuffer(50,function(){d.readOnly||"wysiwyg"!=d.mode||(b.relations={},(h=e.$.elementFromPoint(k,l))&&h.nodeType&&(g=new CKEDITOR.dom.element(h),b.traverseSearch(g),isNaN(k+l)||b.pixelSearch(g,k,l),a&&a(b.relations,k,l)))});this.listener=this.editable.attachListener(this.target,"mousemove",function(a){k=a.data.$.clientX;l=a.data.$.clientY;m.input()});
this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){m.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 c(a,
c,b){var e=a.getUniqueId();e in b?b[e].type|=c:b[e]={element:a,type:c}}return function(b,d){var e;d&CKEDITOR.LINEUTILS_AFTER&&a(e=b.getNext())&&e.isVisible()&&(c(e,CKEDITOR.LINEUTILS_BEFORE,this.relations),d^=CKEDITOR.LINEUTILS_AFTER);d&CKEDITOR.LINEUTILS_INSIDE&&a(e=b.getFirst())&&e.isVisible()&&(c(e,CKEDITOR.LINEUTILS_BEFORE,this.relations),d^=CKEDITOR.LINEUTILS_INSIDE);c(b,d,this.relations)}}(),traverseSearch:function(c){var b,d,e;do if(e=c.$["data-cke-expando"],!(e&&e in this.relations)){if(c.equals(this.editable))break;
if(a(c))for(b in this.lookups)(d=this.lookups[b](c))&&this.store(c,d)}while((!c||c.type!=CKEDITOR.NODE_ELEMENT||"true"!=c.getAttribute("contenteditable"))&&(c=c.getParent()))},pixelSearch:function(){function c(c,e,g,h,k){for(var l=0,m;k(g);){g+=h;if(25==++l)break;if(m=this.doc.$.elementFromPoint(e,g))if(m==c)l=0;else if(b(c,m)&&(l=0,a(m=new CKEDITOR.dom.element(m))))return m}}var b=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,c){return a.contains(c)}:function(a,c){return!!(a.compareDocumentPosition(c)&
16)};return function(b,f,e){var g=this.win.getViewPaneSize().height,h=c.call(this,b.$,f,e,-1,function(a){return 0<a});f=c.call(this,b.$,f,e,1,function(a){return a<g});if(h)for(this.traverseSearch(h);!h.getParent().equals(b);)h=h.getParent();if(f)for(this.traverseSearch(f);!f.getParent().equals(b);)f=f.getParent();for(;h||f;){h&&(h=h.getNext(a));if(!h||h.equals(f))break;this.traverseSearch(h);f&&(f=f.getPrevious(a));if(!f||f.equals(h))break;this.traverseSearch(f)}}}(),greedySearch:function(){this.relations=
{};for(var c=this.editable.getElementsByTag("*"),b=0,d,e,g;d=c.getItem(b++);)if(!d.equals(this.editable)&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasAttribute("contenteditable")||!d.isReadOnly())&&a(d)&&d.isVisible())for(g in this.lookups)(e=this.lookups[g](d))&&this.store(d,e);return this.relations}};h.prototype={locate:function(){function c(c,b){var e=c.element[b===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();return e&&a(e)?(c.siblingRect=e.getClientRect(),b==CKEDITOR.LINEUTILS_BEFORE?(c.siblingRect.bottom+
c.elementRect.top)/2:(c.elementRect.bottom+c.siblingRect.top)/2):b==CKEDITOR.LINEUTILS_BEFORE?c.elementRect.top:c.elementRect.bottom}return function(a){var b;this.locations={};for(var e in a)b=a[e],b.elementRect=b.element.getClientRect(),b.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(e,CKEDITOR.LINEUTILS_BEFORE,c(b,CKEDITOR.LINEUTILS_BEFORE)),b.type&CKEDITOR.LINEUTILS_AFTER&&this.store(e,CKEDITOR.LINEUTILS_AFTER,c(b,CKEDITOR.LINEUTILS_AFTER)),b.type&CKEDITOR.LINEUTILS_INSIDE&&this.store(e,CKEDITOR.LINEUTILS_INSIDE,
(b.elementRect.top+b.elementRect.bottom)/2);return this.locations}}(),sort:function(){var a,b,d,e;return function(g,h){a=this.locations;b=[];for(var k in a)for(var l in a[k])if(d=Math.abs(g-a[k][l]),b.length){for(e=0;e<b.length;e++)if(d<b[e].dist){b.splice(e,0,{uid:+k,type:l,dist:d});break}e==b.length&&b.push({uid:+k,type:l,dist:d})}else b.push({uid:+k,type:l,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 e={display:"block",width:"0px",height:"0px","border-color":"transparent","border-style":"solid",position:"absolute",top:"-6px"},m={height:"0px","border-top":"1px dashed red",position:"absolute","z-index":9999};g.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 k={left:1,right:1,center:1},l={absolute:1,fixed:1};CKEDITOR.plugins.lineutils={finder:b,locator:h,liner:g}}(),function(){function b(b){return b.getName&&!b.hasAttribute("data-cke-temp")}CKEDITOR.plugins.add("widgetselection",{init:function(b){if(CKEDITOR.env.webkit){var g=CKEDITOR.plugins.widgetselection;b.on("contentDom",function(a){a=a.editor;var b=a.editable();b.attachListener(b,"keydown",function(a){a.data.getKeystroke()==
CKEDITOR.CTRL+65&&CKEDITOR.tools.setTimeout(function(){g.addFillers(b)||g.removeFillers(b)},0)},null,null,-1);a.on("selectionCheck",function(a){g.removeFillers(a.editor.editable())});a.on("paste",function(a){a.data.dataValue=g.cleanPasteData(a.data.dataValue)});"selectall"in a.plugins&&g.addSelectAllIntegration(a)})}}});CKEDITOR.plugins.widgetselection={startFiller:null,endFiller:null,fillerAttribute:"data-cke-filler-webkit",fillerContent:"\x26nbsp;",fillerTagName:"div",addFillers:function(h){var g=
h.editor;if(!this.isWholeContentSelected(h)&&0<h.getChildCount()){var a=h.getFirst(b),e=h.getLast(b);a&&a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable()&&(this.startFiller=this.createFiller(),h.append(this.startFiller,1));e&&e.type==CKEDITOR.NODE_ELEMENT&&!e.isEditable()&&(this.endFiller=this.createFiller(!0),h.append(this.endFiller,0));if(this.hasFiller(h))return g=g.createRange(),g.selectNodeContents(h),g.select(),!0}return!1},removeFillers:function(b){if(this.hasFiller(b)&&!this.isWholeContentSelected(b)){var g=
b.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dstart]"),a=b.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dend]");this.startFiller&&g&&this.startFiller.equals(g)?this.removeFiller(this.startFiller,b):this.startFiller=g;this.endFiller&&a&&this.endFiller.equals(a)?this.removeFiller(this.endFiller,b):this.endFiller=a}},cleanPasteData:function(b){b&&b.length&&(b=b.replace(this.createFillerRegex(),"").replace(this.createFillerRegex(!0),""));return b},isWholeContentSelected:function(b){var g=
b.editor.getSelection().getRanges()[0];return!g||g&&g.collapsed?!1:(g=g.clone(),g.enlarge(CKEDITOR.ENLARGE_ELEMENT),!!(g&&b&&g.startContainer&&g.endContainer&&0===g.startOffset&&g.endOffset===b.getChildCount()&&g.startContainer.equals(b)&&g.endContainer.equals(b)))},hasFiller:function(b){return 0<b.find(this.fillerTagName+"["+this.fillerAttribute+"]").count()},createFiller:function(b){var g=new CKEDITOR.dom.element(this.fillerTagName);g.setHtml(this.fillerContent);g.setAttribute(this.fillerAttribute,
b?"end":"start");g.setAttribute("data-cke-temp",1);g.setStyles({display:"block",width:0,height:0,padding:0,border:0,margin:0,position:"absolute",top:0,left:"-9999px",opacity:0,overflow:"hidden"});return g},removeFiller:function(b,g){if(b){var a=g.editor,e=g.editor.getSelection().getRanges()[0].startPath(),m=a.createRange(),k,l;e.contains(b)&&(k=b.getHtml(),l=!0);e="start"==b.getAttribute(this.fillerAttribute);b.remove();k&&0<k.length&&k!=this.fillerContent?(g.insertHtmlIntoRange(k,a.getSelection().getRanges()[0]),
m.setStartAt(g.getChild(g.getChildCount()-1),CKEDITOR.POSITION_BEFORE_END),a.getSelection().selectRanges([m])):l&&(e?m.setStartAt(g.getFirst().getNext(),CKEDITOR.POSITION_AFTER_START):m.setEndAt(g.getLast().getPrevious(),CKEDITOR.POSITION_BEFORE_END),g.editor.getSelection().selectRanges([m]))}},createFillerRegex:function(b){var g=this.createFiller(b).getOuterHtml().replace(/style="[^"]*"/gi,'style\x3d"[^"]*"').replace(/>[^<]*</gi,"\x3e[^\x3c]*\x3c");return new RegExp((b?"":"^")+g+(b?"$":""))},addSelectAllIntegration:function(b){var g=
this;b.editable().attachListener(b,"beforeCommandExec",function(a){var e=b.editable();"selectAll"==a.data.name&&e&&g.addFillers(e)},null,null,9999)}}}(),"use strict",function(){function b(a){this.editor=a;this.registered={};this.instances={};this.selected=[];this.widgetHoldingFocusedEditable=this.focused=null;this._={nextId:0,upcasts:[],upcastCallbacks:[],filters:{}};A(this);D(this);this.on("checkWidgets",k);this.editor.on("contentDomInvalidated",this.checkWidgets,this);C(this);z(this);v(this);y(this);
t(this)}function h(a,c,b,d,e){var f=a.editor;CKEDITOR.tools.extend(this,d,{editor:f,id:c,inline:"span"==b.getParent().getName(),element:b,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);N(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()&&f.editable().contains(this.wrapper)&&(this.ready=!0,this.fire("ready"))}function g(a,c,b){CKEDITOR.dom.element.call(this,c.$);this.editor=a;this._={};c=this.filter=b.filter;CKEDITOR.dtd[this.getName()].p?(this.enterMode=c?c.getAllowedEnterMode(a.enterMode):
a.enterMode,this.shiftEnterMode=c?c.getAllowedEnterMode(a.shiftEnterMode,!0):a.shiftEnterMode):this.enterMode=this.shiftEnterMode=CKEDITOR.ENTER_BR}function a(a,c){a.addCommand(c.name,{exec:function(a,b){function d(){a.widgets.finalizeCreation(h)}var e=a.widgets.focused;if(e&&e.name==c.name)e.edit();else if(c.insert)c.insert({editor:a,commandData:b});else if(c.template){var e="function"==typeof c.defaults?c.defaults():c.defaults,e=CKEDITOR.tools.object.merge(e||{},b&&b.startupData||{}),e=CKEDITOR.dom.element.createFromHtml(c.template.output(e),
a.document),f,g=a.widgets.wrapElement(e,c.name),h=new CKEDITOR.dom.documentFragment(g.getDocument());h.append(g);(f=a.widgets.initOn(e,c,b&&b.startupData))?(e=f.once("edit",function(c){if(c.data.dialog)f.once("dialog",function(c){c=c.data;var b,e;b=c.once("ok",d,null,null,20);e=c.once("cancel",function(c){c.data&&!1===c.data.hide||a.widgets.destroy(f,!0)});c.once("hide",function(){b.removeListener();e.removeListener()})});else d()},null,null,999),f.edit(),e.removeListener()):d()}},allowedContent:c.allowedContent,
requiredContent:c.requiredContent,contentForms:c.contentForms,contentTransformations:c.contentTransformations})}function e(a,c){function b(a,d){var e=c.upcast.split(","),f,g;for(g=0;g<e.length;g++)if(f=e[g],f===a.name)return c.upcasts[f].call(this,a,d);return!1}function d(c,b,e){var f=CKEDITOR.tools.getIndex(a._.upcasts,function(a){return a[2]>e});0>f&&(f=a._.upcasts.length);a._.upcasts.splice(f,0,[CKEDITOR.tools.bind(c,b),b.name,e])}var e=c.upcast,f=c.upcastPriority||10;e&&("string"==typeof e?d(b,
c,f):d(e,c,f))}function m(a,c){a.focused=null;if(c.isInited()){var b=c.editor.checkDirty();a.fire("widgetBlurred",{widget:c});c.setFocused(!1);!b&&c.editor.resetDirty()}}function k(a){a=a.data;if("wysiwyg"==this.editor.mode){var c=this.editor.editable(),b=this.instances,d,e,f,g;if(c){for(d in b)b[d].isReady()&&!c.contains(b[d].wrapper)&&this.destroy(b[d],!0);if(a&&a.initOnlyNew)b=this.initOnAll();else{var k=c.find(".cke_widget_wrapper"),b=[];d=0;for(e=k.count();d<e;d++){f=k.getItem(d);if(g=!this.getByElement(f,
!0)){a:{g=p;for(var l=f;l=l.getParent();)if(g(l)){g=!0;break a}g=!1}g=!g}g&&c.contains(f)&&(f.addClass("cke_widget_new"),b.push(this.initOn(f.getFirst(h.isDomWidgetElement))))}}a&&a.focusInited&&1==b.length&&b[0].focus()}}}function l(a){if("undefined"!=typeof a.attributes&&a.attributes["data-widget"]){var b=c(a),d=f(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 f(a){return a.find(function(a){return 3===a.type},!0).pop()}function d(a,c,b){if(!b.allowedContent&&!b.disallowedContent)return null;var d=this._.filters[a];d||(this._.filters[a]=d={});a=d[c];a||(a=b.allowedContent?new CKEDITOR.filter(b.allowedContent):this.editor.filter.clone(),d[c]=a,b.disallowedContent&&a.disallow(b.disallowedContent));
return a}function n(a){var c=[],b=a._.upcasts,d=a._.upcastCallbacks;return{toBeWrapped:c,iterator:function(a){var e,f,g,k,l;if("data-cke-widget-wrapper"in a.attributes)return(a=a.getFirst(h.isParserWidgetElement))&&c.push([a]),!1;if("data-widget"in a.attributes)return c.push([a]),!1;if(l=b.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=b[k],g={},f=e[0](a,g))return f instanceof CKEDITOR.htmlParser.element&&(a=f),a.attributes["data-cke-widget-data"]=
encodeURIComponent(JSON.stringify(g)),a.attributes["data-cke-widget-upcasted"]=1,c.push([a,e[1]]),!1}}}}function q(a,c){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")+(c?" cke_widget_"+c:"")}}function u(a,c,b){if(a.type==CKEDITOR.NODE_ELEMENT){var d=CKEDITOR.dtd[a.name];if(d&&!d[b.name]){var d=a.split(c),e=a.parent;c=d.getIndex();a.children.length||(--c,a.remove());d.children.length||
d.remove();return u(e,c,b)}}a.add(b,c)}function x(a,c){return"boolean"==typeof a.inline?a.inline:!!CKEDITOR.dtd.$inline[c]}function p(a){return a.hasAttribute("data-cke-temp")}function w(a,c,b,d){var e=a.editor;e.fire("lockSnapshot");b?(d=b.data("cke-widget-editable"),d=c.editables[d],a.widgetHoldingFocusedEditable=c,c.focusedEditable=d,b.addClass("cke_widget_editable_focused"),d.filter&&e.setActiveFilter(d.filter),e.setActiveEnterMode(d.enterMode,d.shiftEnterMode)):(d||c.focusedEditable.removeClass("cke_widget_editable_focused"),
c.focusedEditable=null,a.widgetHoldingFocusedEditable=null,e.setActiveFilter(null),e.setActiveEnterMode(null,null));e.fire("unlockSnapshot")}function B(a){a.contextMenu&&a.contextMenu.addListener(function(c){if(c=a.widgets.getByElement(c,!0))return c.fire("contextMenu",{})})}function r(a,c){return CKEDITOR.tools.trim(c)}function y(a){var c=a.editor,b=CKEDITOR.plugins.lineutils;c.on("dragstart",function(b){var d=b.data.target;h.isDomDragHandler(d)&&(d=a.getByElement(d),b.data.dataTransfer.setData("cke/widget-id",
d.id),c.focus(),d.focus())});c.on("drop",function(b){function d(a,c){return a&&c?a.wrapper.equals(c.wrapper)||a.wrapper.contains(c.wrapper):!1}var e=b.data.dataTransfer,f=e.getData("cke/widget-id"),g=e.getTransferType(c),e=c.createRange(),h=function(a){a=a.getBoundaryNodes().startNode;a.type!==CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return c.widgets.getByElement(a)}(b.data.dropRange);if(""!==f&&g===CKEDITOR.DATA_TRANSFER_CROSS_EDITORS)b.cancel();else if(g==CKEDITOR.DATA_TRANSFER_INTERNAL)if(""===
f&&0<c.widgets.selected.length)b.data.dataTransfer.setData("text/html",O(c));else if(f=a.instances[f])d(f,h)?b.cancel():(e.setStartBefore(f.wrapper),e.setEndAfter(f.wrapper),b.data.dragRange=e,delete CKEDITOR.plugins.clipboard.dragStartContainerChildCount,delete CKEDITOR.plugins.clipboard.dragEndContainerChildCount,b.data.dataTransfer.setData("text/html",f.getClipboardHtml()),c.widgets.destroy(f,!0))});c.on("contentDom",function(){var d=c.editable();CKEDITOR.tools.extend(a,{finder:new b.finder(c,
{lookups:{"default":function(c){if(!c.is(CKEDITOR.dtd.$listItem)&&c.is(CKEDITOR.dtd.$block)&&!h.isDomNestedEditable(c)&&!a._.draggedWidget.wrapper.contains(c)){var b=h.getNestedEditable(d,c);if(b){c=a._.draggedWidget;if(a.getByElement(b)==c)return;b=CKEDITOR.filter.instances[b.data("cke-filter")];c=c.requiredContent;if(b&&c&&!b.check(c))return}return CKEDITOR.LINEUTILS_BEFORE|CKEDITOR.LINEUTILS_AFTER}}}}),locator:new b.locator(c),liner:new b.liner(c,{lineStyle:{cursor:"move !important","border-top-color":"#666"},
tipLeftStyle:{"border-left-color":"#666"},tipRightStyle:{"border-right-color":"#666"}})},!0)})}function z(a){var c=a.editor;c.on("contentDom",function(){var b=c.editable(),d=b.isInline()?b:c.document,e,f;b.attachListener(d,"mousedown",function(b){var d=b.data.getTarget();e=d instanceof CKEDITOR.dom.element?a.getByElement(d):null;f=0;e&&(e.inline&&d.type==CKEDITOR.NODE_ELEMENT&&d.hasAttribute("data-cke-widget-drag-handler")?(f=1,a.focused!=e&&c.getSelection().removeAllRanges()):h.getNestedEditable(e.wrapper,
d)?e=null:(b.data.preventDefault(),CKEDITOR.env.ie||e.focus()))});b.attachListener(d,"mouseup",function(){f&&e&&e.wrapper&&(f=0,e.focus())});CKEDITOR.env.ie&&b.attachListener(d,"mouseup",function(){setTimeout(function(){e&&e.wrapper&&b.contains(e.wrapper)&&(e.focus(),e=null)})})});c.on("doubleclick",function(c){var b=a.getByElement(c.data.element);if(b&&!h.getNestedEditable(b.wrapper,c.data.element))return b.fire("doubleclick",{element:c.data.element})},null,null,1)}function v(a){a.editor.on("key",
function(c){var b=a.focused,d=a.widgetHoldingFocusedEditable,e;b?e=b.fire("key",{keyCode:c.data.keyCode}):d&&(b=c.data.keyCode,c=d.focusedEditable,b==CKEDITOR.CTRL+65?(b=c.getBogus(),d=d.editor.createRange(),d.selectNodeContents(c),b&&d.setEndAt(b,CKEDITOR.POSITION_BEFORE_START),d.select(),e=!1):8==b||46==b?(e=d.editor.getSelection().getRanges(),d=e[0],e=!(1==e.length&&d.collapsed&&d.checkBoundaryOfElement(c,CKEDITOR[8==b?"START":"END"]))):e=void 0);return e},null,null,1)}function t(a){function c(d){1>
a.selected.length||I(b,"cut"===d.name)}var b=a.editor;b.on("contentDom",function(){var a=b.editable();a.attachListener(a,"copy",c);a.attachListener(a,"cut",c)})}function C(a){function c(){var a=e.getSelection();if(a&&(a=a.getRanges()[0])&&!a.collapsed){var d=b(a.startContainer),f=b(a.endContainer);!d&&f?(a.setEndBefore(f.wrapper),a.select()):d&&!f&&(a.setStartAfter(d.wrapper),a.select())}}function b(a){return a?a.type==CKEDITOR.NODE_TEXT?b(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",c);a.on("checkSelection",a.checkSelection,a);e.on("selectionChange",function(c){var b=(c=h.getNestedEditable(e.editable(),c.data.selection.getStartElement()))&&a.getByElement(c),d=a.widgetHoldingFocusedEditable;d?d===b&&d.focusedEditable.equals(c)||(w(a,d,null),b&&c&&w(a,b,c)):b&&c&&w(a,b,c)});e.on("dataReady",function(){H(a).commit()});
e.on("blur",function(){var c;(c=a.focused)&&m(a,c);(c=a.widgetHoldingFocusedEditable)&&w(a,c,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 k=f(b);e.parent.attributes["data-cke-white-space-first"]&&(e.value=e.value.replace(/^&nbsp;/g," "));k.parent.attributes["data-cke-white-space-last"]&&
(k.value=k.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 c=
d[a.data.downcastingSessionId],b,e,f,g,h,k;b=c.shift();){e=b.widget;f=b.element;g=e._.downcastFn&&e._.downcastFn.call(e,f);a.data.widgetsCopy&&e.getClipboardHtml&&(g=CKEDITOR.htmlParser.fragment.fromHtml(e.getClipboardHtml()),g=g.children[0]);for(k in b.editables)h=b.editables[k],delete h.attributes.contenteditable,h.setHtml(e.editables[k].getData());g||(g=f);g?b.wrapper.replaceWith(g):b.wrapper.remove()}},null,null,13);b.on("contentDomUnload",function(){a.destroyAll(!0)})}function A(a){var c=a.editor,
b,d;c.on("toHtml",function(c){var d=n(a),e;for(c.data.dataValue.forEach(d.iterator,CKEDITOR.NODE_ELEMENT,!0);e=d.toBeWrapped.pop();){var f=e[0],g=f.parent;g.type==CKEDITOR.NODE_ELEMENT&&g.attributes["data-cke-widget-wrapper"]&&g.replaceWith(f);a.wrapElement(e[0],e[1])}b=c.data.protectedWhitespaces?3==c.data.dataValue.children.length&&h.isParserWidgetWrapper(c.data.dataValue.children[1]):1==c.data.dataValue.children.length&&h.isParserWidgetWrapper(c.data.dataValue.children[0])},null,null,8);c.on("dataReady",
function(){if(d)for(var b=c.editable().find(".cke_widget_wrapper"),e,f,g=0,k=b.count();g<k;++g)e=b.getItem(g),f=e.getFirst(h.isDomWidgetElement),f.type==CKEDITOR.NODE_ELEMENT&&f.data("widget")?(f.replace(e),a.wrapElement(f)):e.remove();d=0;a.destroyAll(!0);a.initOnAll()});c.on("loadSnapshot",function(c){/data-cke-widget/.test(c.data)&&(d=1);a.destroyAll(!0)},null,null,9);c.on("paste",function(a){a=a.data;a.dataValue=a.dataValue.replace(ca,r);a.range&&(a=h.getNestedEditable(c.editable(),a.range.startContainer))&&
(a=CKEDITOR.filter.instances[a.data("cke-filter")])&&c.setActiveFilter(a)});c.on("afterInsertHtml",function(d){d.data.intoRange?a.checkWidgets({initOnlyNew:!0}):(c.fire("lockSnapshot"),a.checkWidgets({initOnlyNew:!0,focusInited:b}),c.fire("unlockSnapshot"))})}function H(a){var c=a.selected,b=[],d=c.slice(0),e=null;return{select:function(a){0>CKEDITOR.tools.indexOf(c,a)&&b.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 f=
a.focused!==e,g,h;a.editor.fire("lockSnapshot");for(f&&(g=a.focused)&&m(a,g);g=d.pop();)c.splice(CKEDITOR.tools.indexOf(c,g),1),g.isInited()&&(h=g.editor.checkDirty(),g.setSelected(!1),!h&&g.editor.resetDirty());f&&e&&(h=a.editor.checkDirty(),a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!h&&a.editor.resetDirty());for(;g=b.pop();)c.push(g),g.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 J(a,c,b){var d=0;c=E(c);var e=a.data.classes||{},f;if(c){for(e=CKEDITOR.tools.clone(e);f=c.pop();)b?e[f]||(d=e[f]=1):e[f]&&(delete e[f],d=1);d&&a.setData("classes",e)}}function G(a){a.cancel()}function M(a,c){var b=function(a){return a==CKEDITOR.ENTER_BR?"br":a==CKEDITOR.ENTER_DIV?"div":"p"}(a.editor.config.enterMode),d=new CKEDITOR.dom.element(b);"br"!==b&&d.appendBogus();"after"===c?d.insertAfter(a.wrapper):d.insertBefore(a.wrapper);(function(c){var b=a.editor.createRange();b.setStart(c,
0);a.editor.getSelection().selectRanges([b])})(d)}function I(a,c){var b=a.widgets.focused,d,e,f;Q.hasCopyBin(a)||(e=new Q(a,{beforeDestroy:function(){!c&&b&&b.focus();f&&a.getSelection().selectBookmarks(f);d&&CKEDITOR.plugins.widgetselection.addFillers(a.editable())},afterDestroy:function(){c&&!a.readOnly&&(b?a.widgets.del(b):a.extractSelectedHtml(),a.fire("saveSnapshot"))}}),b||(d=CKEDITOR.env.webkit&&CKEDITOR.plugins.widgetselection.isWholeContentSelected(a.editable()),f=a.getSelection().createBookmarks(!0)),
e.handle(O(a)))}function E(a){return(a=(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function P(){var a=CKEDITOR.document.getActive(),c=this.editor,b=c.editable();(b.isInline()?b:c.document.getWindow().getFrame()).equals(a)&&c.focusManager.focus(b)}function L(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function O(a){var c=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(c)}function N(a,c){var b=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(c){var b=c.data.getTarget();h.getNestedEditable(a,b)||a.inline&&h.isDomDragHandler(b)||c.data.preventDefault()});a.wrapper.removeClass("cke_widget_new");a.element.addClass("cke_widget_element");
a.on("key",function(c){c=c.data.keyCode;if(c==b)M(a,"before"),a.editor.fire("saveSnapshot");else if(c==d)M(a,"after"),a.editor.fire("saveSnapshot");else if(13==c)a.edit();else{if(c==CKEDITOR.CTRL+67||c==CKEDITOR.CTRL+88){I(a.editor,c==CKEDITOR.CTRL+88);return}if(c in V||CKEDITOR.CTRL&c||CKEDITOR.ALT&c)return}return!1},null,null,999);a.on("doubleclick",function(c){a.edit()&&c.cancel()});if(c.data)a.on("data",c.data);if(c.edit)a.on("edit",c.edit)}function X(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id",
a.id)}function S(a,c){a.partSelectors||(a.partSelectors=a.parts);if(a.parts){var b={},d,e;for(e in a.partSelectors)c||!a.parts[e]||"string"==typeof a.parts[e]?(d=a.wrapper.findOne(a.partSelectors[e]),b[e]=d):b[e]=a.parts[e];a.parts=b}}function Y(a){var c=a.editables,b,d;a.editables={};if(a.editables)for(b in c)d=c[b],a.initEditable(b,"string"==typeof d?{selector:d}:d)}function da(a){if(!0===a.mask)U(a);else if(a.mask){var c=new CKEDITOR.tools.buffers.throttle(250,ha,a),b=CKEDITOR.env.gecko?300:0,
d,e;a.on("focus",function(){c.input();d=a.editor.on("change",c.input);e=a.on("blur",function(){d.removeListener();e.removeListener()})});a.editor.on("instanceReady",function(){setTimeout(function(){c.input()},b)});a.editor.on("mode",function(){setTimeout(function(){c.input()},b)});if(CKEDITOR.env.gecko){var f=a.element.find("img");CKEDITOR.tools.array.forEach(f.toArray(),function(a){a.on("load",function(){c.input()})})}for(var g in a.editables)a.editables[g].on("focus",function(){a.editor.on("change",
c.input);e&&e.removeListener()}),a.editables[g].on("blur",function(){a.editor.removeListener("change",c.input)});c.input()}}function U(a){var c=a.wrapper.findOne(".cke_widget_mask");c||(c=new CKEDITOR.dom.element("img",a.editor.document),c.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_mask"}),a.wrapper.append(c));a.mask=c}function ha(){if(this.wrapper){this.maskPart=this.maskPart||this.mask;var a=this.parts[this.maskPart],c;if(a&&"string"!=typeof a){c=this.wrapper.findOne(".cke_widget_partial_mask");
c||(c=new CKEDITOR.dom.element("img",this.editor.document),c.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_partial_mask"}),this.wrapper.append(c));this.mask=c;var b=c.$,d=a.$,e=!(b.offsetTop==d.offsetTop&&b.offsetLeft==d.offsetLeft);if(b.offsetWidth!=d.offsetWidth||b.offsetHeight!=d.offsetHeight||e)b=a.getParent(),d=CKEDITOR.plugins.widget.isDomWidget(b),c.setStyles({top:a.$.offsetTop+(d?0:b.$.offsetTop)+"px",left:a.$.offsetLeft+(d?0:b.$.offsetLeft)+"px",width:a.$.offsetWidth+
"px",height:a.$.offsetHeight+"px"})}}}function ia(a){if(a.draggable){var c=a.editor,b=a.wrapper.getLast(h.isDomDragHandlerContainer),d;b?d=b.findOne("img"):(b=new CKEDITOR.dom.element("span",c.document),b.setAttributes({"class":"cke_reset cke_widget_drag_handler_container",style:"background:rgba(220,220,220,0.5);background-image:url("+c.plugins.widget.path+"images/handle.png);display:none;"}),d=new CKEDITOR.dom.element("img",c.document),d.setAttributes({"class":"cke_reset cke_widget_drag_handler",
"data-cke-widget-drag-handler":"1",src:CKEDITOR.tools.transparentImageData,width:15,title:c.lang.widget.move,height:15,role:"presentation"}),a.inline&&d.setAttribute("draggable","true"),b.append(d),a.wrapper.append(b));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=b}}function fa(a){function c(){var b;for(p.reset();b=h.pop();)b.removeListener();var d=k;b=a.sender;var e=this.repository.finder,f=this.repository.liner,g=this.editor,l=this.editor.editable();CKEDITOR.tools.isEmpty(f.visible)||(d=e.getRange(d[0]),this.focus(),g.fire("drop",{dropRange:d,target:d.startContainer}));l.removeClass("cke_widget_dragging");f.hideVisible();g.fire("dragend",{target:b})}if(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT){var b=
this.repository.finder,d=this.repository.locator,e=this.repository.liner,f=this.editor,g=f.editable(),h=[],k=[],l,m;this.repository._.draggedWidget=this;var n=b.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())});g.addClass("cke_widget_dragging");h.push(g.on("mousemove",function(a){m=a.data.$.clientY;p.input()}));f.fire("dragstart",{target:a.sender});h.push(f.document.once("mouseup",c,this));g.isInline()||
h.push(CKEDITOR.document.once("mouseup",c,this))}}function ja(a){var c=null;a.on("data",function(){var a=this.data.classes,b;if(c!=a){for(b in c)a&&a[b]||this.removeClass(b);for(b in a)this.addClass(b);c=a}})}function T(a){a.on("data",function(){if(a.wrapper){var c=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",c)}},null,null,9999)}function Z(a){a.element.data("cke-widget-data",
encodeURIComponent(JSON.stringify(a.data)))}function aa(){function a(){}function c(a,b,d){return d&&this.checkElement(a)?(a=d.widgets.getByElement(a,!0))&&a.checkStyleActive(this):!1}function b(a){function c(a,b,d){for(var e=a.length,f=0;f<e;){if(b.call(d,a[f],f,a))return a[f];f++}}function e(a){function c(a,b){var d=CKEDITOR.tools.object.keys(a),e=CKEDITOR.tools.object.keys(b);if(d.length!==e.length)return!1;for(var f in a)if(("object"!==typeof a[f]||"object"!==typeof b[f]||!c(a[f],b[f]))&&a[f]!==
b[f])return!1;return!0}return function(b){return c(a.getDefinition(),b.getDefinition())}}var f=a.widget,g;d[f]||(d[f]={});for(var h=0,k=a.group.length;h<k;h++)g=a.group[h],d[f][g]||(d[f][g]=[]),g=d[f][g],c(g,e(a))||g.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)&&b(this)},apply:function(a){var c;a instanceof CKEDITOR.editor&&this.checkApplicable(a.elementPath(),a)&&(c=a.widgets.focused,
this.group&&this.removeStylesFromSameGroup(a),c.applyStyle(this))},remove:function(a){a instanceof CKEDITOR.editor&&this.checkApplicable(a.elementPath(),a)&&a.widgets.focused.removeStyle(this)},removeStylesFromSameGroup:function(a){var c=!1,b,e;if(!(a instanceof CKEDITOR.editor))return!1;e=a.elementPath();if(this.checkApplicable(e,a))for(var f=0,g=this.group.length;f<g;f++){b=d[this.widget][this.group[f]];for(var h=0;h<b.length;h++)b[h]!==this&&b[h].checkActive(e,a)&&(a.widgets.focused.removeStyle(b[h]),
c=!0)}return c},checkActive:function(a,c){return this.checkElementMatch(a.lastElement,0,c)},checkApplicable:function(a,c){return c instanceof CKEDITOR.editor?this.checkElement(a.lastElement):!1},checkElementMatch:c,checkElementRemovable:c,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 c,b={};if(!a)return null;if(a.styleableElements){c=this.getClassesArray();if(!c)return null;b[a.styleableElements]={classes:c,propertiesOnly:!0};return b}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(a){void 0!==CKEDITOR.document.$.querySelectorAll&&(a.widgets=new b(a))},afterInit:function(a){if(void 0!==CKEDITOR.document.$.querySelectorAll){var c=a.widgets.registered,b,d,e;for(d in c)b=c[d],(e=b.button)&&a.ui.addButton&&a.ui.addButton(CKEDITOR.tools.capitalize(b.name,!0),{label:e,command:b.name,toolbar:"insert,10"});B(a);F(a.undoManager)}}});b.prototype={MIN_SELECTION_CHECK_INTERVAL:500,add:function(c,b){var d=this.editor;b=CKEDITOR.tools.prototypedCopy(b);b.name=c;
b._=b._||{};d.fire("widgetDefinition",b);b.template&&(b.template=new CKEDITOR.template(b.template));a(d,b);e(this,b);this.registered[c]=b;if(b.dialog&&d.plugins.dialog)var f=CKEDITOR.on("dialogDefinition",function(a){a=a.data.definition;var c=a.dialog;a.getMode||c.getName()!==b.dialog||(a.getMode=function(){var a=c.getModel(d);return a&&a instanceof CKEDITOR.plugins.widget&&a.ready?CKEDITOR.dialog.EDITING_MODE:CKEDITOR.dialog.CREATION_MODE});f.removeListener()});return b},addUpcastCallback:function(a){this._.upcastCallbacks.push(a)},
checkSelection:function(){if(this.editor.getSelection()){var a=this.editor.getSelection(),c=a.getSelectedElement(),b=H(this),d;if(c&&(d=this.getByElement(c,!0)))return b.focus(d).select(d).commit();a=a.getRanges()[0];if(!a||a.collapsed)return b.commit();a=new CKEDITOR.dom.walker(a);for(a.evaluator=h.isDomWidgetWrapper;c=a.next();)b.select(this.getByElement(c));b.commit()}},checkWidgets:function(a){this.fire("checkWidgets",CKEDITOR.tools.copy(a||{}))},del:function(a){if(this.focused===a){var c=a.editor,
b=c.createRange(),d;(d=b.moveToClosestEditablePosition(a.wrapper,!0))||(d=b.moveToClosestEditablePosition(a.wrapper,!1));d&&c.getSelection().selectRanges([b])}a.wrapper.remove();this.destroy(a,!0)},destroy:function(a,c){this.widgetHoldingFocusedEditable===a&&w(this,a,null,c);a.destroy(c);delete this.instances[a.id];this.fire("instanceDestroyed",a)},destroyAll:function(a,c){var b,d,e=this.instances;if(c&&!a){d=c.find(".cke_widget_wrapper");for(var e=d.count(),f=0;f<e;++f)(b=this.getByElement(d.getItem(f),
!0))&&this.destroy(b)}else for(d in e)b=e[d],this.destroy(b,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(b){return b.is(c)&&b.data("cke-widget-id")}var c={div:1,span:1};return function(c,b){if(!c)return null;var d=a(c);if(!b&&!d){var e=this.editor.editable();do c=c.getParent();while(c&&!c.equals(e)&&!(d=a(c)))}return this.instances[d]||null}}(),
initOn:function(a,c,b){c?"string"==typeof c&&(c=this.registered[c]):c=this.registered[a.data("widget")];if(!c)return null;var d=this.wrapElement(a,c.name);return d?d.hasClass("cke_widget_new")?(a=new h(this,this._.nextId++,a,c,b),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 c=[],b,d=a.count();d--;)(b=this.initOn(a.getItem(d).getFirst(h.isDomWidgetElement)))&&c.push(b);return c},onWidget:function(a){var c=
Array.prototype.slice.call(arguments);c.shift();for(var b in this.instances){var d=this.instances[b];d.name==a&&d.on.apply(d,c)}this.on("instanceCreated",function(b){b=b.data;b.name==a&&b.on.apply(b,c)})},parseElementClasses:function(a){if(!a)return null;a=CKEDITOR.tools.trim(a).split(/\s+/);for(var c,b={},d=0;c=a.pop();)-1==c.indexOf("cke_")&&(b[c]=d=1);return d?b:null},wrapElement:function(a,c){var b=null,d,e;if(a instanceof CKEDITOR.dom.element){c=c||a.data("widget");d=this.registered[c];if(!d)return null;
if((b=a.getParent())&&b.type==CKEDITOR.NODE_ELEMENT&&b.data("cke-widget-wrapper"))return b;a.hasAttribute("data-cke-widget-keep-attr")||a.data("cke-widget-keep-attr",a.data("widget")?1:0);a.data("widget",c);(e=x(d,a.getName()))&&l(a);b=new CKEDITOR.dom.element(e?"span":"div",a.getDocument());b.setAttributes(q(e,c));b.data("cke-display-name",d.pathName?d.pathName:a.getName());a.getParent(!0)&&b.replace(a);a.appendTo(b)}else if(a instanceof CKEDITOR.htmlParser.element){c=c||a.attributes["data-widget"];
d=this.registered[c];if(!d)return null;if((b=a.parent)&&b.type==CKEDITOR.NODE_ELEMENT&&b.attributes["data-cke-widget-wrapper"])return b;"data-cke-widget-keep-attr"in a.attributes||(a.attributes["data-cke-widget-keep-attr"]=a.attributes["data-widget"]?1:0);c&&(a.attributes["data-widget"]=c);(e=x(d,a.name))&&l(a);b=new CKEDITOR.htmlParser.element(e?"span":"div",q(e,c));b.attributes["data-cke-display-name"]=d.pathName?d.pathName:a.name;d=a.parent;var f;d&&(f=a.getIndex(),a.remove());b.add(a);d&&u(d,
f,b)}return b},_tests_createEditableFilter:d};CKEDITOR.event.implementOn(b.prototype);h.prototype={addClass:function(a){this.element.addClass(a);this.wrapper.addClass(h.WRAPPER_CLASS_PREFIX+a)},applyStyle:function(a){J(this,a,1)},checkStyleActive:function(a){a=E(a);var c;if(!a)return!1;for(;c=a.pop();)if(!this.hasClass(c))return!1;return!0},destroy:function(a){this.fire("destroy");if(this.editables)for(var c in this.editables)this.destroyEditable(c,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,c){var b=this.editables[a],d=!0;b.removeListener("focus",L);b.removeListener("blur",P);this.editor.focusManager.remove(b);if(b.filter){for(var e in this.repository.instances){var f=this.repository.instances[e];f.editables&&(f=f.editables[a])&&f!==
b&&b.filter===f.filter&&(d=!1)}d&&(b.filter.destroy(),(d=this.repository._.filters[this.name])&&delete d[a])}c||(this.repository.destroyAll(!1,b),b.removeClass("cke_widget_editable"),b.removeClass("cke_widget_editable_focused"),b.removeAttributes(["contenteditable","data-cke-widget-editable","data-cke-enter-mode"]));delete this.editables[a]},edit:function(){var a={dialog:this.dialog},c=this;if(!1===this.fire("edit",a)||!a.dialog)return!1;this.editor.openDialog(a.dialog,function(a){var b,d;!1!==c.fire("dialog",
a)&&(b=a.on("show",function(){a.setupContent(c)}),d=a.on("ok",function(){var b,d=c.on("data",function(a){b=1;a.cancel()},null,null,0);c.editor.fire("saveSnapshot");a.commitContent(c);d.removeListener();b&&(c.fire("data",c.data),c.editor.fire("saveSnapshot"))}),a.once("hide",function(){b.removeListener();d.removeListener()}))},c);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,c){var b=this._findOneNotNested(c.selector);return b&&b.is(CKEDITOR.dtd.$editable)?(b=new g(this.editor,b,{filter:d.call(this.repository,this.name,a,c)}),this.editables[a]=b,b.setAttributes({contenteditable:"true","data-cke-widget-editable":a,"data-cke-enter-mode":b.enterMode}),b.filter&&b.data("cke-filter",
b.filter.id),b.addClass("cke_widget_editable"),b.removeClass("cke_widget_editable_focused"),c.pathName&&b.data("cke-display-name",c.pathName),this.editor.focusManager.add(b),b.on("focus",L,this),CKEDITOR.env.ie&&b.on("blur",P,this),b._.initialSetData=!0,b.setData(b.getHtml()),!0):!1},_findOneNotNested:function(a){a=this.wrapper.find(a);for(var c,b,d=0;d<a.count();d++)if(c=a.getItem(d),b=c.getAscendant(h.isDomWidgetWrapper),this.wrapper.equals(b))return c;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 c=this.editor.checkDirty();a.fake(this.wrapper);!c&&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){J(this,a,0)},setData:function(a,c){var b=this.data,
d=0;if("string"==typeof a)b[a]!==c&&(b[a]=c,d=1);else{var e=a;for(a in e)b[a]!==e[a]&&(d=1,b[a]=e[a])}d&&this.dataReady&&(Z(this),this.fire("data",b));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,c=this.element.$,b=this._.dragHandlerOffset,
c={x:c.offsetLeft,y:c.offsetTop-15};b&&c.x==b.x&&c.y==b.y||(b=a.checkDirty(),a.fire("lockSnapshot"),this.dragHandlerContainer.setStyles({top:c.y+"px",left:c.x+"px"}),this.dragHandlerContainer.removeStyle("display"),a.fire("unlockSnapshot"),!b&&a.resetDirty(),this._.dragHandlerOffset=c)}};CKEDITOR.event.implementOn(h.prototype);h.getNestedEditable=function(a,c){return!c||c.equals(a)?null:h.isDomNestedEditable(c)?c:h.getNestedEditable(a,c.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_";g.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,c){this._.createCopyBin(a,c);this._.createListeners(c)},_:{createCopyBin:function(a){var c=a.document,b=CKEDITOR.env.edge&&16<=CKEDITOR.env.version,d=!a.blockless&&!CKEDITOR.env.ie||b?"div":"span",b=c.createElement(d),c=c.createElement(d);c.setAttributes({id:"cke_copybin","data-cke-temp":"1"});b.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"});b.setStyle("ltr"==a.config.contentsLangDirection?
"left":"right","-5000px");this.editor=a;this.copyBin=b;this.container=c},createListeners:function(a){a&&(a.beforeDestroy&&(this.beforeDestroy=a.beforeDestroy),a.afterDestroy&&(this.afterDestroy=a.afterDestroy))}},proto:{handle:function(a){var c=this.copyBin,b=this.editor,d=this.container,e=CKEDITOR.env.ie&&9>CKEDITOR.env.version,f=b.document.getDocumentElement().$,g=b.createRange(),h=this,k=CKEDITOR.env.mac&&CKEDITOR.env.webkit,l=k?100:0,m=window.requestAnimationFrame&&!k?requestAnimationFrame:setTimeout,
n,p,q;c.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3e​\x3c/span\x3e'+a+'\x3cspan data-cke-copybin-end\x3d"1"\x3e​\x3c/span\x3e');b.fire("lockSnapshot");d.append(c);b.editable().append(d);n=b.on("selectionChange",G,null,null,0);p=b.widgets.on("checkSelection",G,null,null,0);e&&(q=f.scrollTop);g.selectNodeContents(c);g.select();e&&(f.scrollTop=q);return new CKEDITOR.tools.promise(function(a){m(function(){h.beforeDestroy&&h.beforeDestroy();d.remove();n.removeListener();p.removeListener();b.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=b;h.nestedEditable=g}(),CKEDITOR.config.widget_keystrokeInsertLineBefore=CKEDITOR.SHIFT+CKEDITOR.ALT+13,CKEDITOR.config.widget_keystrokeInsertLineAfter=CKEDITOR.SHIFT+13,function(){function b(b,a,e){this.editor=b;this.notification=null;this._message=new CKEDITOR.template(a);this._singularMessage=
e?new CKEDITOR.template(e):null;this._tasks=[];this._doneTasks=this._doneWeights=this._totalWeights=0}function h(b){this._weight=b||1;this._doneWeight=0;this._isCanceled=!1}CKEDITOR.plugins.add("notificationaggregator",{requires:"notification"});b.prototype={createTask:function(b){b=b||{};var a=!this.notification,e;a&&(this.notification=this._createNotification());e=this._addTask(b);e.on("updated",this._onTaskUpdate,this);e.on("done",this._onTaskDone,this);e.on("canceled",function(){this._removeTask(e)},
this);this.update();a&&this.notification.show();return e},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 b=this.getTaskCount(),a={current:this.getDoneTaskCount(),max:b,percentage:Math.round(100*this.getPercentage())};return(1==b&&this._singularMessage?this._singularMessage:this._message).output(a)},_createNotification:function(){return new CKEDITOR.plugins.notification(this.editor,{type:"progress"})},_addTask:function(b){b=new h(b.weight);this._tasks.push(b);this._totalWeights+=b._weight;return b},_removeTask:function(b){var a=CKEDITOR.tools.indexOf(this._tasks,
b);-1!==a&&(b._doneWeight&&(this._doneWeights-=b._doneWeight),this._totalWeights-=b._weight,this._tasks.splice(a,1),this.update())},_onTaskUpdate:function(b){this._doneWeights+=b.data;this.update()},_onTaskDone:function(){this._doneTasks+=1;this.update()}};CKEDITOR.event.implementOn(b.prototype);h.prototype={done:function(){this.update(this._weight)},update:function(b){if(!this.isDone()&&!this.isCanceled()){b=Math.min(this._weight,b);var a=b-this._doneWeight;this._doneWeight=b;this.fire("updated",
a);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=b;CKEDITOR.plugins.notificationAggregator.task=h}(),"use strict",function(){CKEDITOR.plugins.add("uploadwidget",{requires:"widget,clipboard,filetools,notificationaggregator",init:function(b){b.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(b,h,g){var a=CKEDITOR.fileTools,e=b.uploadRepository,m=g.supportedTypes?10:20;CKEDITOR.plugins.clipboard.addFileMatcher(b,function(b){return g.supportedTypes?a.isTypeSupported(b,g.supportedTypes):!0});if(g.fileToElement)b.on("paste",function(g){g=g.data;var l=b.widgets.registered[h],c=g.dataTransfer,
f=c.getFilesCount(),d=l.loadMethod||"loadAndUpload",m,q;if(!g.dataValue&&f)for(q=0;q<f;q++)if(m=c.getFile(q),!l.supportedTypes||a.isTypeSupported(m,l.supportedTypes)){var u=l.fileToElement(m);m=e.create(m,void 0,l.loaderType);u&&(m[d](l.uploadUrl,l.additionalRequestParameters),CKEDITOR.fileTools.markElement(u,h,m.id),"loadAndUpload"!=d&&"upload"!=d||l.skipNotifications||CKEDITOR.fileTools.bindNotifications(b,m),g.dataValue+=u.getOuterHtml())}},null,null,m);CKEDITOR.tools.extend(g,{downcast:function(){return new CKEDITOR.htmlParser.text("")},
init:function(){var a=this,g=this.wrapper.findOne("[data-cke-upload-id]").data("cke-upload-id"),c=e.loaders[g],f=CKEDITOR.tools.capitalize,d,h;c.on("update",function(e){if("abort"===c.status&&"function"===typeof a.onAbort)a.onAbort(c);if(a.wrapper&&a.wrapper.getParent()){b.fire("lockSnapshot");e="on"+f(c.status);if("abort"===c.status||"function"!==typeof a[e]||!1!==a[e](c))h="cke_upload_"+c.status,a.wrapper&&h!=d&&(d&&a.wrapper.removeClass(d),a.wrapper.addClass(h),d=h),"error"!=c.status&&"abort"!=
c.status||b.widgets.del(a);b.fire("unlockSnapshot")}else CKEDITOR.instances[b.name]&&b.editable().find('[data-cke-upload-id\x3d"'+g+'"]').count()||c.abort(),e.removeListener()});c.update()},replaceWith:function(a,e){if(""===a.trim())b.widgets.del(this);else{var c=this==b.widgets.focused,f=b.editable(),d=b.createRange(),g,h;c||(h=b.getSelection().createBookmarks());d.setStartBefore(this.wrapper);d.setEndAfter(this.wrapper);c&&(g=d.createBookmark());f.insertHtmlIntoRange(a,d,e);b.widgets.checkWidgets({initOnlyNew:!0});
b.widgets.destroy(this,!0);c?(d.moveToBookmark(g),d.select()):b.getSelection().selectBookmarks(h);b.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}});b.widgets.add(h,g)},markElement:function(b,h,g){b.setAttributes({"data-cke-upload-id":g,"data-widget":h})},bindNotifications:function(b,h){function g(){a=b._.uploadWidgetNotificaionAggregator;if(!a||a.isFinished())a=b._.uploadWidgetNotificaionAggregator=
new CKEDITOR.plugins.notificationAggregator(b,b.lang.uploadwidget.uploadMany,b.lang.uploadwidget.uploadOne),a.once("finished",function(){var e=a.getTaskCount();0===e?a.notification.hide():a.notification.update({message:1==e?b.lang.uploadwidget.doneOne:b.lang.uploadwidget.doneMany.replace("%1",e),type:"success",important:1})})}var a,e=null;h.on("update",function(){!e&&h.uploadTotal&&(g(),e=a.createTask({weight:h.uploadTotal}));e&&"uploading"==h.status&&e.update(h.uploaded)});h.on("uploaded",function(){e&&
e.done()});h.on("error",function(){e&&e.cancel();b.showNotification(h.message,"warning")});h.on("abort",function(){e&&e.cancel();CKEDITOR.instances[b.name]&&b.showNotification(b.lang.uploadwidget.abort,"info")})}})}(),"use strict",function(){function b(a){9>=a&&(a="0"+a);return String(a)}function h(a){var e=new Date,e=[e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds()];g+=1;return"image-"+CKEDITOR.tools.array.map(e,b).join("")+"-"+g+"."+a}var g=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 b=CKEDITOR.fileTools,g=b.getUploadUrl(a.config,"image");g&&(a.config.clipboard_handleImages&&(a.config.clipboard_handleImages=!1,CKEDITOR.warn("clipboard-image-handling-disabled",{editor:a.name,plugin:"uploadimage"})),b.addUploadWidget(a,"uploadimage",{supportedTypes:/image\/(jpeg|png|gif|bmp)/,
uploadUrl:g,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(k){if(k.data.dataValue.match(/<img[\s\S]+data:/i)){k=k.data;var l=document.implementation.createHTMLDocument(""),l=new CKEDITOR.dom.element(l.body),c,f,d;l.data("cke-editable",1);l.appendHtml(k.dataValue);c=l.find("img");for(d=0;d<c.count();d++){f=c.getItem(d);var n=f.getAttribute("src"),q=n&&"data:"==n.substring(0,5),u=null===f.data("cke-realelement");q&&u&&!f.data("cke-upload-id")&&!f.isReadOnly(1)&&(q=(q=n.match(/image\/([a-z]+?);/i))&&q[1]||"jpg",n=a.uploadRepository.create(n,
h(q)),n.upload(g),b.markElement(f,"uploadimage",n.id),b.bindNotifications(a,n))}k.dataValue=l.getHtml()}}))}}})}(),function(){function b(a){function b(a){var c=!1;d.attachListener(d,"keydown",function(){var b=l.getBody().getElementsByTag(a);if(!c){for(var d=0;d<b.count();d++)b.getItem(d).setCustomData("retain",!0);c=!0}},null,null,1);d.attachListener(d,"keyup",function(){var b=l.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 g=this.editor;if(g&&!g.isDetached()){var l=a.document,c=l.body,f=l.getElementById("cke_actscrpt");f&&f.parentNode.removeChild(f);(f=l.getElementById("cke_shimscrpt"))&&f.parentNode.removeChild(f);(f=l.getElementById("cke_basetagscrpt"))&&f.parentNode.removeChild(f);c.contentEditable=!0;CKEDITOR.env.ie&&(c.hideFocus=!0,c.disabled=!0,c.removeAttribute("disabled"));delete this._.isLoadingData;this.$=c;l=new CKEDITOR.dom.document(l);this.setup();this.fixInitialSelection();
var d=this;CKEDITOR.env.ie&&!CKEDITOR.env.edge&&l.getDocumentElement().addClass(l.$.compatMode);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&g.enterMode!=CKEDITOR.ENTER_P?b("p"):CKEDITOR.env.edge&&15>CKEDITOR.env.version&&g.enterMode!=CKEDITOR.ENTER_DIV&&b("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)l.getDocumentElement().on("mousedown",function(a){a.data.getTarget().is("html")&&setTimeout(function(){g.editable().focus()})});h(g);try{g.document.$.execCommand("2D-position",!1,!0)}catch(n){}(CKEDITOR.env.gecko||
CKEDITOR.env.ie&&"CSS1Compat"==g.document.$.compatMode)&&this.attachListener(this,"keydown",function(a){var c=a.data.getKeystroke();if(33==c||34==c)if(CKEDITOR.env.ie)setTimeout(function(){g.getSelection().scrollIntoView()},0);else if(g.window.$.innerHeight>this.$.offsetHeight){var b=g.createRange();b[33==c?"moveToElementEditStart":"moveToElementEditEnd"](this);b.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(l,"blur",function(){try{l.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&
this.attachListener(l,"touchend",function(){a.focus()});c=g.document.getElementsByTag("title").getItem(0);c.data("cke-title",c.getText());CKEDITOR.env.ie&&(g.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");g.fire("contentDom");this._.isPendingFocus&&(g.focus(),this._.isPendingFocus=!1);setTimeout(function(){g.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",g),c=null),b.$.attachEvent("onresizestart",g),c=b.$)})}function g(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 g(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");
var b=[],g;for(g in CKEDITOR.dtd.$removeEmpty)b.push("html.CSS1Compat "+g+"[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 a;CKEDITOR.plugins.add("wysiwygarea",{init:function(b){b.config.fullPage&&b.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",
requiredContent:"body"});b.addMode("wysiwyg",function(g){function h(d){d&&d.removeListener();if(!b.isDestroyed()&&!b.isDetached()&&(b.editable(new a(b,n.getFrameDocument().getBody())),b.setData(b.getData(1),g),B)){if(w)b.on("mode",l,{iframe:n,editor:b,callback:g});b.on("mode",function(){b.status="ready"});c()}}function l(a){a&&a.removeListener();n.on("load",function(){p&&(p=!1,f())})}function c(){r=new MutationObserver(function(a){for(var c=0;c<a.length;c++){var d=a[c];if("childList"===d.type&&0!==
d.addedNodes.length)for(var g=0;g<d.addedNodes.length;g++){var h=d.addedNodes[g];h.contains&&h.contains(b.container.$)&&(w?p=!0:f())}}});r.observe(b.config.observableParent,{childList:!0,subtree:!0})}function f(){var c=b.getData(!1),d;b.editable().preserveIframe=!0;b.editable(null);d=new a(b,n.getFrameDocument().getBody());b.editable(d);b.status="recreating";b.setData(c,{callback:g,internal:!1,noSnapshot:!1})}var d="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",
d=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(d)+"}())":"",n=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+d+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');n.setStyles({width:"100%",height:"100%"});n.addClass("cke_wysiwyg_frame").addClass("cke_reset");d=b.ui.space("contents");d.append(n);var q=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(q)n.on("load",h);var u=b.title,x=b.fire("ariaEditorHelpLabel",
{}).label,p=!1,w=CKEDITOR.env.ie&&11===CKEDITOR.env.version,B=!!window.MutationObserver,r;u&&(CKEDITOR.env.ie&&x&&(u+=", "+x),n.setAttribute("title",u));if(x){var u=CKEDITOR.tools.getNextId(),y=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+u+'" class\x3d"cke_voice_label"\x3e'+x+"\x3c/span\x3e");d.append(y,1);n.setAttribute("aria-describedby",u)}b.on("beforeModeUnload",function(a){a.removeListener();y&&y.remove();B&&r.disconnect()});b.on("destroy",function(){r&&r.disconnect()});n.setAttributes({tabIndex:b.tabIndex,
allowTransparency:"true"});!q&&h();b.fire("ariaWidget",n)})}});CKEDITOR.editor.prototype.addContentsCss=function(a){var b=this.config,g=b.contentsCss;CKEDITOR.tools.isArray(g)||(b.contentsCss=g?[g]:[]);b.contentsCss.push(a)};a=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(a){CKEDITOR.tools.setTimeout(b,0,this,a)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")||" "},base:CKEDITOR.editable,
proto:{preserveIframe:!1,setData:function(a,b){var h=this.editor;if(b)this.setHtml(a),this.fixInitialSelection(),h.fire("dataReady");else{this._.isLoadingData=!0;h._.dataStore={id:1};var l=h.config,c=l.fullPage,f=l.docType,d=CKEDITOR.tools.buildStyleHtml(g()).replace(/<style>/,'\x3cstyle data-cke-temp\x3d"1"\x3e');c||(d+=CKEDITOR.tools.buildStyleHtml(h.config.contentsCss));var n=l.baseHref?'\x3cbase href\x3d"'+l.baseHref+'" data-cke-temp\x3d"1" /\x3e':"";c&&(a=a.replace(/<!DOCTYPE[^>]*>/i,function(a){h.docType=
f=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){h.xmlDeclaration=a;return""}));a=h.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*>/,d+"$\x26"),a=
f+a):a=l.docType+'\x3chtml dir\x3d"'+l.contentsLangDirection+'" lang\x3d"'+(l.contentsLanguage||h.langCode)+'"\x3e\x3chead\x3e\x3ctitle\x3e'+this._.docTitle+"\x3c/title\x3e"+n+d+"\x3c/head\x3e\x3cbody"+(l.bodyId?' id\x3d"'+l.bodyId+'"':"")+(l.bodyClass?' class\x3d"'+l.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"');h.title&&(a=a.replace(/<body/,'\x3cbody aria-label\x3d"'+CKEDITOR.tools.htmlEncodeAttr(h.title)+'"'));CKEDITOR.env.gecko||(a=a.replace("\x3cbody",'\x3cbody tabindex\x3d"0" '));l='\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&&(l+='\x3cscript id\x3d"cke_shimscrpt"\x3ewindow.parent.CKEDITOR.tools.enableHtml5Elements(document)\x3c/script\x3e');n&&CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(l+='\x3cscript id\x3d"cke_basetagscrpt"\x3evar baseTag \x3d document.querySelector( "base" );baseTag.href \x3d baseTag.href;\x3c/script\x3e');a=a.replace(/(?=\s*<\/(:?head)>)/,
l);this.clearCustomData();this.clearListeners();h.fire("contentDomUnload");var q=this.getDocument();try{q.write(a)}catch(u){setTimeout(function(){q.write(a)},0)}}},getData:function(a){if(a)return this.getHtml();a=this.editor;var b=a.config,g=b.fullPage,h=g&&a.docType,c=g&&a.xmlDeclaration,f=this.getDocument(),f=g?f.getDocumentElement().getOuterHtml():f.getBody().getHtml();CKEDITOR.env.gecko&&b.enterMode!=CKEDITOR.ENTER_BR&&(f=f.replace(/<br>(?=\s*(:?$|<\/body>))/,""));g&&(f=f.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"));f=a.dataProcessor.toDataFormat(f);c&&(f=c+"\n"+f);h&&(f=h+"\n"+f);return f},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:a.baseProto.focus.call(this)},detach:function(){if(!this.preserveIframe){var b=this.editor,g=b.document,b=b.container.findOne("iframe.cke_wysiwyg_frame");
a.baseProto.detach.call(this);this.clearCustomData(this._.expandoNumber);g.getDocumentElement().clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);b&&(b.clearCustomData(),(g=b.removeCustomData("onResize"))&&g.removeListener(),b.isDetached()||b.remove())}}}})}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=!0,CKEDITOR.config.disableNativeSpellChecker=!0,CKEDITOR.config.observableParent=CKEDITOR.document.$,CKEDITOR.config.plugins="dialogui,dialog,a11yhelp,about,basicstyles,bidi,blockquote,notification,button,toolbar,clipboard,panelbutton,panel,floatpanel,colorbutton,colordialog,copyformatting,menu,contextmenu,dialogadvtab,div,elementspath,enterkey,entities,popup,filetools,filebrowser,find,floatingspace,listblock,richcombo,font,format,fakeobjects,forms,horizontalrule,htmlwriter,iframe,image,indent,indentlist,indentblock,justify,menubutton,language,link,list,liststyle,magicline,maximize,newpage,pagebreak,xml,ajax,pastetools,pastefromlibreoffice,pastefromword,pastetext,editorplaceholder,preview,print,removeformat,resize,save,selectall,showblocks,showborders,smiley,sourcearea,specialchar,stylescombo,tab,table,tabletools,tableselection,templates,undo,lineutils,widgetselection,widget,notificationaggregator,uploadwidget,uploadimage,wysiwygarea",
CKEDITOR.config.skin="moono-lisa",function(){var b=function(b,g){var a=CKEDITOR.getUrl("plugins/"+g);b=b.split(",");for(var e=0;e<b.length;e++)CKEDITOR.skin.icons[b[e]]={path:a,offset:-b[++e],bgsize:b[++e]}};CKEDITOR.env.hidpi?b("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,,iframe,1176,,image,1200,,indent-rtl,1224,,indent,1248,,outdent-rtl,1272,,outdent,1296,,justifyblock,1320,,justifycenter,1344,,justifyleft,1368,,justifyright,1392,,language,1416,,anchor-rtl,1440,,anchor,1464,,link,1488,,unlink,1512,,bulletedlist-rtl,1536,,bulletedlist,1560,,numberedlist-rtl,1584,,numberedlist,1608,,mathjax,1632,,maximize,1656,,newpage-rtl,1680,,newpage,1704,,pagebreak-rtl,1728,,pagebreak,1752,,pastefromword-rtl,1776,,pastefromword,1800,,pastetext-rtl,1824,,pastetext,1848,,placeholder,1872,,preview-rtl,1896,,preview,1920,,print,1944,,removeformat,1968,,save,1992,,scayt,2016,,selectall,2040,,showblocks-rtl,2064,,showblocks,2088,,smiley,2112,,source-rtl,2136,,source,2160,,sourcedialog-rtl,2184,,sourcedialog,2208,,specialchar,2232,,table,2256,,templates-rtl,2280,,templates,2304,,uicolor,2328,,redo-rtl,2352,,redo,2376,,undo-rtl,2400,,undo,2424,,simplebox,4896,auto",
"icons_hidpi.png"):b("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,iframe,1176,auto,image,1200,auto,indent-rtl,1224,auto,indent,1248,auto,outdent-rtl,1272,auto,outdent,1296,auto,justifyblock,1320,auto,justifycenter,1344,auto,justifyleft,1368,auto,justifyright,1392,auto,language,1416,auto,anchor-rtl,1440,auto,anchor,1464,auto,link,1488,auto,unlink,1512,auto,bulletedlist-rtl,1536,auto,bulletedlist,1560,auto,numberedlist-rtl,1584,auto,numberedlist,1608,auto,mathjax,1632,auto,maximize,1656,auto,newpage-rtl,1680,auto,newpage,1704,auto,pagebreak-rtl,1728,auto,pagebreak,1752,auto,pastefromword-rtl,1776,auto,pastefromword,1800,auto,pastetext-rtl,1824,auto,pastetext,1848,auto,placeholder,1872,auto,preview-rtl,1896,auto,preview,1920,auto,print,1944,auto,removeformat,1968,auto,save,1992,auto,scayt,2016,auto,selectall,2040,auto,showblocks-rtl,2064,auto,showblocks,2088,auto,smiley,2112,auto,source-rtl,2136,auto,source,2160,auto,sourcedialog-rtl,2184,auto,sourcedialog,2208,auto,specialchar,2232,auto,table,2256,auto,templates-rtl,2280,auto,templates,2304,auto,uicolor,2328,auto,redo-rtl,2352,auto,redo,2376,auto,undo-rtl,2400,auto,undo,2424,auto,simplebox,2448,auto",
"icons.png")}())})();