/*
Copyright (c) 2003-2025, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
(function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var b=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,g={timestamp:"P1PF",version:"4.21.0",revision:"0",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:b},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var k=document.getElementsByTagName("script"),e=0;e<k.length;e++){var l=k[e].src.match(b);if(l){a=l[1];break}}-1==a.indexOf(":/")&&"//"!=a.slice(0,2)&&
(a=0===a.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+a:location.href.match(/^[^\?]*\/(?:)/)[0]+a);if(!a)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return a}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);return a=this.appendTimestamp(a)},appendTimestamp:function(a){if(!this.timestamp||"/"===a.charAt(a.length-1)||/[&?]t=/.test(a))return a;
var b=0<=a.indexOf("?")?"\x26":"?";return a+b+"t\x3d"+this.timestamp},domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",a,!1),window.removeEventListener("load",a,!1),b()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),window.detachEvent("onload",a),b())}catch(e){}}function b(){for(var a;a=e.shift();)a()}var e=[];return function(b){function d(){try{document.documentElement.doScroll("left")}catch(c){setTimeout(d,
1);return}a()}e.push(b);"complete"===document.readyState&&setTimeout(a,1);if(1==e.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);b=!1;try{b=!window.frameElement}catch(f){}document.documentElement.doScroll&&b&&d()}}}()},e=window.CKEDITOR_GETURL;if(e){var a=g.getUrl;g.getUrl=function(b){return e.call(g,b)||a.call(g,b)}}return g}()),
function(){var b={};CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(b){var e=CKEDITOR.event.prototype,a;for(a in e)null==b[a]&&(b[a]=e[a])},CKEDITOR.event.prototype=function(){function g(b){var k=e(this);return k[b]||(k[b]=new a(b))}var e=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},a=function(a){this.name=a;this.listeners=[]};a.prototype={getListenerIndex:function(a){for(var b=0,e=this.listeners;b<e.length;b++)if(e[b].fn==
a)return b;return-1}};return{define:function(a,b){var e=g.call(this,a);CKEDITOR.tools.extend(e,b,!0)},on:function(a,k,e,l,d){function f(n,d,x,f){n={name:a,sender:this,editor:n,data:d,listenerData:l,stop:x,cancel:f,removeListener:c};return!1===k.call(e,n)?b:n.data}function c(){n.removeListener(a,k)}var n=this,x=g.call(this,a);if(0>x.getListenerIndex(k)){x=x.listeners;e||(e=this);isNaN(d)&&(d=10);f.fn=k;f.priority=d;for(var y=x.length-1;0<=y;y--)if(x[y].priority<=d)return x.splice(y+1,0,f),{removeListener:c};
x.unshift(f)}return{removeListener:c}},once:function(){var a=Array.prototype.slice.call(arguments),b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,k=function(){a=1},g=0,l=function(){g=1};return function(d,f,c){var n=e(this)[d];d=a;var x=g;a=g=0;if(n){var y=n.listeners;if(y.length)for(var y=y.slice(0),
q,t=0;t<y.length;t++){if(n.errorProof)try{q=y[t].call(this,c,f,k,l)}catch(r){}else q=y[t].call(this,c,f,k,l);q===b?g=1:"undefined"!=typeof q&&(f=q);if(a||g)break}}f=g?!1:"undefined"==typeof f?!0:f;a=d;g=x;return f}}(),fireOnce:function(a,b,g){b=this.fire(a,b,g);delete e(this)[a];return b},removeListener:function(a,b){var g=e(this)[a];if(g){var l=g.getListenerIndex(b);0<=l&&g.listeners.splice(l,1)}},removeAllListeners:function(){var a=e(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=
e(this)[a])&&0<a.listeners.length}}}())}(),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(b,g){b in{instanceReady:1,loaded:1}&&(this[b]=!0);return CKEDITOR.event.prototype.fire.call(this,b,g,this)},CKEDITOR.editor.prototype.fireOnce=function(b,g){b in{instanceReady:1,loaded:1}&&(this[b]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,b,g,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),
CKEDITOR.env||(CKEDITOR.env=function(){var b=navigator.userAgent.toLowerCase(),g=b.match(/edge[ \/](\d+.?\d*)/),e=-1<b.indexOf("trident/"),e=!(!g&&!e),e={ie:e,edge:!!g,webkit:!e&&-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};e.gecko="Gecko"==navigator.product&&!e.webkit&&!e.ie;e.webkit&&(-1<b.indexOf("chrome")?e.chrome=!0:e.safari=!0);var a=0;e.ie&&(a=g?parseFloat(g[1]):e.quirks||!document.documentMode?parseFloat(b.match(/msie (\d+)/)[1]):document.documentMode,e.ie9Compat=9==a,e.ie8Compat=8==a,e.ie7Compat=7==a,e.ie6Compat=7>a||e.quirks);e.gecko&&(g=b.match(/rv:([\d\.]+)/))&&(g=g[1].split("."),a=1E4*g[0]+100*(g[1]||0)+1*(g[2]||0));e.air&&(a=parseFloat(b.match(/ adobeair\/(\d+)/)[1]));
e.webkit&&(a=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]));e.version=a;e.isCompatible=!(e.ie&&7>a)&&!(e.gecko&&4E4>a)&&!(e.webkit&&534>a);e.hidpi=2<=window.devicePixelRatio;e.needsBrFiller=e.gecko||e.webkit||e.ie&&10<a;e.needsNbspFiller=e.ie&&11>a;e.cssClass="cke_browser_"+(e.ie?"ie":e.gecko?"gecko":e.webkit?"webkit":"unknown");e.quirks&&(e.cssClass+=" cke_browser_quirks");e.ie&&(e.cssClass+=" cke_browser_ie"+(e.quirks?"6 cke_browser_iequirks":e.version));e.air&&(e.cssClass+=" cke_browser_air");
e.iOS&&(e.cssClass+=" cke_browser_ios");e.hidpi&&(e.cssClass+=" cke_hidpi");return e}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var 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,g=CKEDITOR.loadFullCoreTimeout;b&&(CKEDITOR.status="basic_ready",b&&b._load?b():g&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*g))})})();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,g){CKEDITOR.verbosity&
CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:b,additionalData:g})},CKEDITOR.error=function(b,g){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:b,additionalData:g})},CKEDITOR.on("log",function(b){if(window.console&&window.console.log){var g=console[b.data.type]?b.data.type:"log",e=b.data.errorCode;if(b=b.data.additionalData)console[g]("[CKEDITOR] Error code: "+e+".",b);else console[g]("[CKEDITOR] Error code: "+e+".");console[g]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+
e)}},null,null,999),CKEDITOR.dom={},function(){function b(n,c,a){this._minInterval=n;this._context=a;this._lastOutput=this._scheduledTimer=0;this._output=CKEDITOR.tools.bind(c,a||{});var d=this;this.input=function(){function n(){d._lastOutput=(new Date).getTime();d._scheduledTimer=0;d._call()}if(!d._scheduledTimer||!1!==d._reschedule()){var c=(new Date).getTime()-d._lastOutput;c<d._minInterval?d._scheduledTimer=setTimeout(n,d._minInterval-c):n()}}}function g(n,c,d){b.call(this,n,c,d);this._args=[];
var a=this;this.input=CKEDITOR.tools.override(this.input,function(c){return function(){a._args=Array.prototype.slice.call(arguments);c.call(this)}})}var e=[],a=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",h=/&/g,k=/>/g,m=/</g,l=/"/g,d=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,f={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},c=function(c,d){return"#"==d[0]?String.fromCharCode(parseInt(d.slice(1),10)):f[d]};CKEDITOR.on("reset",function(){e=[]});CKEDITOR.tools=
{arrayCompare:function(c,d){if(!c&&!d)return!0;if(!c||!d||c.length!=d.length)return!1;for(var a=0;a<c.length;a++)if(c[a]!=d[a])return!1;return!0},getIndex:function(c,d){for(var a=0;a<c.length;++a)if(d(c[a]))return a;return-1},clone:function(c){var d;if(c&&c instanceof Array){d=[];for(var a=0;a<c.length;a++)d[a]=CKEDITOR.tools.clone(c[a]);return d}if(null===c||"object"!=typeof c||c instanceof String||c instanceof Number||c instanceof Boolean||c instanceof Date||c instanceof RegExp||c.nodeType||c.window===
c)return c;d=new c.constructor;for(a in c)d[a]=CKEDITOR.tools.clone(c[a]);return d},capitalize:function(c,d){return c.charAt(0).toUpperCase()+(d?c.slice(1):c.slice(1).toLowerCase())},extend:function(c){var d=arguments.length,a,f;"boolean"==typeof(a=arguments[d-1])?d--:"boolean"==typeof(a=arguments[d-2])&&(f=arguments[d-1],d-=2);for(var b=1;b<d;b++){var e=arguments[b]||{};CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(e),function(d){if(!0===a||null==c[d])if(!f||d in f)c[d]=e[d]})}return c},
prototypedCopy:function(c){var d=function(){};d.prototype=c;return new d},copy:function(c){var d={},a;for(a in c)d[a]=c[a];return d},isArray:function(c){return"[object Array]"==Object.prototype.toString.call(c)},isEmpty:function(c){for(var d in c)if(c.hasOwnProperty(d))return!1;return!0},cssVendorPrefix:function(c,d,f){if(f)return a+c+":"+d+";"+c+":"+d;f={};f[c]=d;f[a+c]=d;return f},cssStyleToDomStyle:function(){var c=document.createElement("div").style,d="undefined"!=typeof c.cssFloat?"cssFloat":
"undefined"!=typeof c.styleFloat?"styleFloat":"float";return function(c){return"float"==c?d:c.replace(/-./g,function(c){return c.substr(1).toUpperCase()})}}(),buildStyleHtml:function(c){c=[].concat(c);for(var d,a=[],f=0;f<c.length;f++)if(d=c[f])/@import|[{}]/.test(d)?a.push("\x3cstyle\x3e"+d+"\x3c/style\x3e"):(d=CKEDITOR.appendTimestamp(d),a.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+d+'"\x3e'));return a.join("")},htmlEncode:function(c){return void 0===c||null===c?"":String(c).replace(h,
"\x26amp;").replace(k,"\x26gt;").replace(m,"\x26lt;")},htmlDecode:function(n){return n.replace(d,c)},htmlEncodeAttr:function(c){return CKEDITOR.tools.htmlEncode(c).replace(l,"\x26quot;")},htmlDecodeAttr:function(c){return CKEDITOR.tools.htmlDecode(c)},transformPlainTextToHtml:function(c,d){var a=d==CKEDITOR.ENTER_BR,f=this.htmlEncode(c.replace(/\r\n/g,"\n")),f=f.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),b=d==CKEDITOR.ENTER_P?"p":"div";if(!a){var e=/\n{2}/g;if(e.test(f))var k="\x3c"+b+"\x3e",h=
"\x3c/"+b+"\x3e",f=k+f.replace(e,function(){return h+k})+h}f=f.replace(/\n/g,"\x3cbr\x3e");a||(f=f.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+b+"\x3e)"),function(c){return CKEDITOR.tools.repeat(c,2)}));f=f.replace(/^ | $/g,"\x26nbsp;");return f=f.replace(/(>|\s) /g,function(c,n){return n+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var c=0;return function(){return++c}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var c="e",d=0;8>d;d++)c+=
Math.floor(65536*(1+Math.random())).toString(16).substring(1);return c},override:function(c,d){var a=d(c);a.prototype=c.prototype;return a},setTimeout:function(c,d,a,f,b){b||(b=window);a||(a=b);return b.setTimeout(function(){f?c.apply(a,[].concat(f)):c.apply(a)},d||0)},debounce:function(c,d){var a;return function(){var f=this,b=arguments;clearTimeout(a);a=setTimeout(function(){a=null;c.apply(f,b)},d)}},throttle:function(c,d,a){return new this.buffers.throttle(c,d,a)},trim:function(){var c=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;
return function(d){return d.replace(c,"")}}(),ltrim:function(){var c=/^[ \t\n\r]+/g;return function(d){return d.replace(c,"")}}(),rtrim:function(){var c=/[ \t\n\r]+$/g;return function(d){return d.replace(c,"")}}(),indexOf:function(c,d){if("function"==typeof d)for(var a=0,f=c.length;a<f;a++){if(d(c[a]))return a}else{if(c.indexOf)return c.indexOf(d);a=0;for(f=c.length;a<f;a++)if(c[a]===d)return a}return-1},search:function(c,d){var a=CKEDITOR.tools.indexOf(c,d);return 0<=a?c[a]:null},bind:function(c,
d){var a=Array.prototype.slice.call(arguments,2);return function(){return c.apply(d,a.concat(Array.prototype.slice.call(arguments)))}},createClass:function(c){var d=c.$,a=c.base,f=c.privates||c._,b=c.proto;c=c.statics;!d&&(d=function(){a&&this.base.apply(this,arguments)});if(f)var e=d,d=function(){var c=this._||(this._={}),d;for(d in f){var n=f[d];c[d]="function"==typeof n?CKEDITOR.tools.bind(n,this):n}e.apply(this,arguments)};a&&(d.prototype=this.prototypedCopy(a.prototype),d.prototype.constructor=
d,d.base=a,d.baseProto=a.prototype,d.prototype.base=function v(){this.base=a.prototype.base;a.apply(this,arguments);this.base=v});b&&this.extend(d.prototype,b,!0);c&&this.extend(d,c,!0);return d},addFunction:function(c,d){return e.push(function(){return c.apply(d||this,arguments)})-1},removeFunction:function(c){e[c]=null},callFunction:function(c){var d=e[c];return d&&d.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var c=/^-?\d+\.?\d*px$/,d;return function(a){d=CKEDITOR.tools.trim(a+
"")+"px";return c.test(d)?d:a||""}}(),convertToPx:function(){var c,d;return function(a){if(!c||c.isDetached())c=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(c);if(!/%$/.test(a)){var f=0>parseFloat(a);f&&(a=a.replace("-",""));c.setStyle("width",a);d=c.getClientRect();a=Math.round(d.width);return f?-a:a}return a}}(),repeat:function(c,d){return Array(d+
1).join(c)},tryThese:function(){for(var c,d=0,a=arguments.length;d<a;d++){var f=arguments[d];try{c=f();break}catch(b){}}return c},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(c){return function(){var d=arguments,a=this;window.setTimeout(function(){c.apply(a,d)},0)}},normalizeCssText:function(c,d){var a=[],f,b=CKEDITOR.tools.parseCssText(c,!0,d);for(f in b)a.push(f+":"+b[f]);a.sort();return a.length?a.join(";")+";":""},convertRgbToHex:function(c){return c.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,
function(c,d,a,n){c=[d,a,n];for(d=0;3>d;d++)c[d]=("0"+parseInt(c[d],10).toString(16)).slice(-2);return"#"+c.join("")})},normalizeHex:function(c){return c.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(c,d,a,n){c=d.toLowerCase();3==c.length&&(c=c.split(""),c=[c[0],c[0],c[1],c[1],c[2],c[2]].join(""));return"#"+c+n})},_isValidColorFormat:function(c){if(!c)return!1;c=c.replace(/\s+/g,"");return/^[a-z0-9()#%,./]+$/i.test(c)},parseCssText:function(c,d,a){var f={};a&&(c=(new CKEDITOR.dom.element("span")).setAttribute("style",
c).getAttribute("style")||"");c&&(c=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(c)));if(!c||";"==c)return f;c.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(c,a,n){d&&(a=a.toLowerCase(),"font-family"==a&&(n=n.replace(/\s*,\s*/g,",")),n=CKEDITOR.tools.trim(n));f[a]=n});return f},writeCssText:function(c,d){var a,f=[];for(a in c)f.push(a+":"+c[a]);d&&f.sort();return f.join("; ")},objectCompare:function(c,d,a){var f;if(!c&&!d)return!0;if(!c||!d)return!1;
for(f in c)if(c[f]!=d[f])return!1;if(!a)for(f in d)if(c[f]!=d[f])return!1;return!0},objectKeys:function(c){return CKEDITOR.tools.object.keys(c)},convertArrayToObject:function(c,d){var a={};1==arguments.length&&(d=!0);for(var f=0,b=c.length;f<b;++f)a[c[f]]=d;return a},getStyledSpans:function(c,d){var a=CKEDITOR.env.ie&&8==CKEDITOR.env.version?c.toUpperCase():c,a=d.find("span[style*\x3d"+a+"]").toArray();return CKEDITOR.tools.array.filter(a,function(d){return!!d.getStyle(c)})},fixDomain:function(){for(var c;;)try{c=
window.parent.document.domain;break}catch(d){c=c?c.replace(/.+?(?:\.|$)/,""):document.domain;if(!c)break;document.domain=c}return!!c},eventsBuffer:function(c,d,a){return new this.buffers.event(c,d,a)},enableHtml5Elements:function(c,d){for(var a="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(" "),f=a.length,b;f--;)b=c.createElement(a[f]),d&&c.appendChild(b)},checkIfAnyArrayItemMatches:function(c,
d){for(var a=0,f=c.length;a<f;++a)if(c[a].match(d))return!0;return!1},checkIfAnyObjectPropertyMatches:function(c,d){for(var a in c)if(a.match(d))return!0;return!1},keystrokeToString:function(c,d){var a=this.keystrokeToArray(c,d);a.display=a.display.join("+");a.aria=a.aria.join("+");return a},keystrokeToArray:function(c,d){var a=d&16711680,f=d&65535,b=CKEDITOR.env.mac,e=[],k=[];a&CKEDITOR.CTRL&&(e.push(b?"⌘":c[17]),k.push(b?c[224]:c[17]));a&CKEDITOR.ALT&&(e.push(b?"⌥":c[18]),k.push(c[18]));a&CKEDITOR.SHIFT&&
(e.push(b?"⇧":c[16]),k.push(c[16]));f&&(c[f]?(e.push(c[f]),k.push(c[f])):(e.push(String.fromCharCode(f)),k.push(String.fromCharCode(f))));return{display:e,aria:k}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(c){c=c.toLowerCase();for(var d=document.cookie.split(";"),a,f,b=0;b<d.length;b++)if(a=d[b].split("\x3d"),f=decodeURIComponent(CKEDITOR.tools.trim(a[0]).toLowerCase()),f===c)return decodeURIComponent(1<a.length?
a[1]:"");return null},setCookie:function(c,d){document.cookie=encodeURIComponent(c)+"\x3d"+encodeURIComponent(d)+";path\x3d/"},getCsrfToken:function(){var c=CKEDITOR.tools.getCookie("ckCsrfToken");if(!c||40!=c.length){var c=[],d="";if(window.crypto&&window.crypto.getRandomValues)c=new Uint8Array(40),window.crypto.getRandomValues(c);else for(var a=0;40>a;a++)c.push(Math.floor(256*Math.random()));for(a=0;a<c.length;a++)var f="abcdefghijklmnopqrstuvwxyz0123456789".charAt(c[a]%36),d=d+(.5<Math.random()?
f.toUpperCase():f);c=d;CKEDITOR.tools.setCookie("ckCsrfToken",c)}return c},escapeCss:function(c){if(c)if(window.CSS&&CSS.escape)c=CSS.escape(c);else{c=String(c);for(var d=c.length,a=-1,f,b="",e=c.charCodeAt(0);++a<d;)f=c.charCodeAt(a),b=0==f?b+"�":127==f||1<=f&&31>=f||0==a&&48<=f&&57>=f||1==a&&48<=f&&57>=f&&45==e?b+("\\"+f.toString(16)+" "):0==a&&1==d&&45==f?b+("\\"+c.charAt(a)):128<=f||45==f||95==f||48<=f&&57>=f||65<=f&&90>=f||97<=f&&122>=f?b+c.charAt(a):b+("\\"+c.charAt(a));c=b}else c="";return c},
getMouseButton:function(c){return(c=c&&c.data?c.data.$:c)?CKEDITOR.tools.normalizeMouseButton(c.button):!1},normalizeMouseButton:function(c,d){if(!CKEDITOR.env.ie||9<=CKEDITOR.env.version&&!CKEDITOR.env.ie6Compat)return c;for(var a=[[CKEDITOR.MOUSE_BUTTON_LEFT,1],[CKEDITOR.MOUSE_BUTTON_MIDDLE,4],[CKEDITOR.MOUSE_BUTTON_RIGHT,2]],f=0;f<a.length;f++){var b=a[f];if(b[0]===c&&d)return b[1];if(!d&&b[1]===c)return b[0]}},convertHexStringToBytes:function(c){var d=[],a=c.length/2,f;for(f=0;f<a;f++)d.push(parseInt(c.substr(2*
f,2),16));return d},convertBytesToBase64:function(c){var d="",a=c.length,f;for(f=0;f<a;f+=3){var b=c.slice(f,f+3),e=b.length,k=[],h;if(3>e)for(h=e;3>h;h++)b[h]=0;k[0]=(b[0]&252)>>2;k[1]=(b[0]&3)<<4|b[1]>>4;k[2]=(b[1]&15)<<2|(b[2]&192)>>6;k[3]=b[2]&63;for(h=0;4>h;h++)d=h<=e?d+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k[h]):d+"\x3d"}return d},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(c){var d={},a=this._findColor(c);a.length&&(d.color=a[0],CKEDITOR.tools.array.forEach(a,function(d){c=c.replace(d,"")}));if(c=CKEDITOR.tools.trim(c))d.unprocessed=c;return d},margin:function(c){return CKEDITOR.tools.style.parse.sideShorthand(c,function(c){return c.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)||
["0px"]})},sideShorthand:function(c,d){function a(c){f.top=b[c[0]];f.right=b[c[1]];f.bottom=b[c[2]];f.left=b[c[3]]}var f={},b=d?d(c):c.split(/\s+/);switch(b.length){case 1:a([0,0,0,0]);break;case 2:a([0,1,0,1]);break;case 3:a([0,1,2,1]);break;case 4:a([0,1,2,3])}return f},border:function(c){return CKEDITOR.tools.style.border.fromCssRule(c)},_findColor:function(c){var d=[],a=CKEDITOR.tools.array,d=d.concat(c.match(this._rgbaRegExp)||[]),d=d.concat(c.match(this._hslaRegExp)||[]);return d=d.concat(a.filter(c.split(/\s+/),
function(c){return c.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:c.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(c,d,a){var f=[];this.forEach(c,function(b,e){d.call(a,b,e,c)&&f.push(b)});return f},find:function(c,d,a){for(var f=c.length,b=0;b<f;){if(d.call(a,c[b],b,c))return c[b];b++}},forEach:function(c,d,a){var f=c.length,b;for(b=0;b<f;b++)d.call(a,c[b],b,c)},map:function(c,d,a){for(var f=[],b=0;b<c.length;b++)f.push(d.call(a,c[b],b,c));return f},reduce:function(c,
d,a,f){for(var b=0;b<c.length;b++)a=d.call(f,a,c[b],b,c);return a},every:function(c,d,a){if(!c.length)return!0;d=this.filter(c,d,a);return c.length===d.length},some:function(c,d,a){for(var f=0;f<c.length;f++)if(d.call(a,c[f],f,c))return!0;return!1},zip:function(c,d){return CKEDITOR.tools.array.map(c,function(c,a){return[c,d[a]]})},unique:function(c){return this.filter(c,function(d,a){return a===CKEDITOR.tools.array.indexOf(c,d)})}},object:{DONT_ENUMS:"toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),
entries:function(c){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(c),function(d){return[d,c[d]]})},values:function(c){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(c),function(d){return c[d]})},keys:function(c){var d=Object.prototype.hasOwnProperty,a=[],f=CKEDITOR.tools.object.DONT_ENUMS;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(!c||"object"!==typeof c)){d=[];if("string"===typeof c)for(a=0;a<c.length;a++)d.push(String(a));return d}for(var b in c)a.push(b);if(CKEDITOR.env.ie&&
9>CKEDITOR.env.version)for(b=0;b<f.length;b++)d.call(c,f[b])&&a.push(f[b]);return a},findKey:function(c,d){if("object"!==typeof c)return null;for(var a in c)if(c[a]===d)return a;return null},merge:function(c,d){var a=CKEDITOR.tools,f=a.clone(c),b=a.clone(d);a.array.forEach(a.object.keys(b),function(c){f[c]="object"===typeof b[c]&&"object"===typeof f[c]?a.object.merge(f[c],b[c]):b[c]});return f}},getAbsoluteRectPosition:function(c,d){function a(c){if(c){var d=c.getClientRect();f.top+=d.top;f.left+=
d.left;"x"in f&&"y"in f&&(f.x+=d.x,f.y+=d.y);a(c.getWindow().getFrame())}}var f=CKEDITOR.tools.copy(d);a(c.getFrame());var b=CKEDITOR.document.getWindow().getScrollPosition();f.top+=b.y;f.left+=b.x;"x"in f&&"y"in f&&(f.y+=b.y,f.x+=b.x);f.right=f.left+f.width;f.bottom=f.top+f.height;return f}};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}};g.prototype=CKEDITOR.tools.prototypedCopy(b.prototype);g.prototype._reschedule=function(){this._scheduledTimer&&this._clearTimer()};g.prototype._call=function(){this._output.apply(this._context,this._args)};CKEDITOR.tools.buffers={};CKEDITOR.tools.buffers.event=b;CKEDITOR.tools.buffers.throttle=g;CKEDITOR.tools.style.border=CKEDITOR.tools.createClass({$:function(c){c=c||{};this.width=c.width;this.style=c.style;this.color=c.color;this._.normalize()},_:{normalizeMap:{color:[[/windowtext/g,
"black"]]},normalize:function(){for(var c in this._.normalizeMap){var d=this[c];d&&(this[c]=CKEDITOR.tools.array.reduce(this._.normalizeMap[c],function(c,d){return c.replace(d[0],d[1])},d))}}},proto:{toString:function(){return CKEDITOR.tools.array.filter([this.width,this.style,this.color],function(c){return!!c}).join(" ")}},statics:{fromCssRule:function(c){var d={},a=c.split(/\s+/g);c=CKEDITOR.tools.style.parse._findColor(c);c.length&&(d.color=c[0]);CKEDITOR.tools.array.forEach(a,function(c){d.style||
-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,c)?!d.width&&CKEDITOR.tools.style.parse._widthRegExp.test(c)&&(d.width=c):d.style=c});return new CKEDITOR.tools.style.border(d)},splitCssValues:function(c,d){d=d||{};var a=CKEDITOR.tools.array.reduce(["width","style","color"],function(a,f){var b=c["border-"+f]||d[f];a[f]=b?CKEDITOR.tools.style.parse.sideShorthand(b):null;return a},{});return CKEDITOR.tools.array.reduce(["top","right","bottom","left"],function(d,f){var b={},e;for(e in a){var k=
c["border-"+f+"-"+e];b[e]=k?k:a[e]&&a[e][f]}d["border-"+f]=new CKEDITOR.tools.style.border(b);return d},{})}}});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,g=function(d,c){for(var a=CKEDITOR.tools.clone(d),b=1;b<arguments.length;b++){c=arguments[b];for(var e in c)delete a[e]}return a},e={},a={},
h={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},k={command:1,link:1,meta:1,noscript:1,script:1,style:1},m={},l={"#":1},d={center:1,dir:1,noframes:1};b(e,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,
mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},l,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});b(a,h,e,d);g={a:g(e,{a:1,button:1}),abbr:e,address:a,area:m,article:a,aside:a,audio:b({source:1,track:1},a),b:e,base:m,bdi:e,bdo:e,blockquote:a,body:a,br:m,button:g(e,{a:1,button:1}),canvas:e,caption:a,cite:e,code:e,col:m,colgroup:{col:1},command:m,
datalist:b({option:1},e),dd:a,del:e,details:b({summary:1},a),dfn:e,div:a,dl:{dt:1,dd:1},dt:a,em:e,embed:m,fieldset:b({legend:1},a),figcaption:a,figure:b({figcaption:1},a),footer:a,form:a,h1:e,h2:e,h3:e,h4:e,h5:e,h6:e,head:b({title:1,base:1},k),header:a,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:m,html:b({head:1,body:1},a,k),i:e,iframe:l,img:m,input:m,ins:e,kbd:e,keygen:m,label:e,legend:e,li:a,link:m,main:a,map:a,mark:e,menu:b({li:1},a),meta:m,meter:g(e,{meter:1}),nav:a,noscript:b({link:1,meta:1,style:1},
e),object:b({param:1},e),ol:{li:1},optgroup:{option:1},option:l,output:e,p:e,param:m,pre:e,progress:g(e,{progress:1}),q:e,rp:e,rt:e,ruby:b({rp:1,rt:1},e),s:e,samp:e,script:l,section:a,select:{optgroup:1,option:1},small:e,source:m,span:e,strong:e,style:l,sub:e,summary:b({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},e),sup:e,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:a,textarea:l,tfoot:{tr:1},th:a,thead:{tr:1},time:g(e,{time:1}),title:l,tr:{th:1,td:1},track:m,u:e,ul:{li:1},"var":e,
video:b({source:1,track:1},a),wbr:m,acronym:e,applet:b({param:1},a),basefont:m,big:e,center:a,dialog:m,dir:{li:1},font:e,isindex:m,noframes:a,strike:e,tt:e};b(g,{$block:b({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},h,d),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,
aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,main:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1},$inline:e,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:b({body:1,head:1,html:1},g.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 g}(),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 g=this.$;g.preventDefault?g.preventDefault():g.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,e){return function(a){"undefined"!=typeof CKEDITOR&&b.fire(e,new CKEDITOR.dom.event(a))}};return{getPrivate:function(){var b;(b=this.getCustomData("_"))||this.setCustomData("_",b={});return b},on:function(g){var e=this.getCustomData("_cke_nativeListeners");e||(e={},this.setCustomData("_cke_nativeListeners",e));e[g]||(e=e[g]=b(this,g),this.$.addEventListener?this.$.addEventListener(g,e,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+g,e));return CKEDITOR.event.prototype.on.apply(this,
arguments)},removeListener:function(b){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(b)){var e=this.getCustomData("_cke_nativeListeners"),a=e&&e[b];a&&(this.$.removeEventListener?this.$.removeEventListener(b,a,!1):this.$.detachEvent&&this.$.detachEvent("on"+b,a),delete e[b])}},removeAllListeners:function(){try{var b=this.getCustomData("_cke_nativeListeners"),e;for(e in b){var a=b[e];this.$.detachEvent?this.$.detachEvent("on"+e,a):this.$.removeEventListener&&this.$.removeEventListener(e,
a,!1);delete b[e]}}catch(h){if(!CKEDITOR.env.edge||-2146828218!==h.number)throw h;}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),function(b){var g={};CKEDITOR.on("reset",function(){g={}});b.equals=function(b){try{return b&&b.$===this.$}catch(a){return!1}};b.setCustomData=function(b,a){var h=this.getUniqueId();(g[h]||(g[h]={}))[b]=a;return this};b.getCustomData=function(b){var a=this.$["data-cke-expando"];return(a=a&&g[a])&&b in a?a[b]:null};b.removeCustomData=function(b){var a=this.$["data-cke-expando"],
a=a&&g[a],h,k;a&&(h=a[b],k=b in a,delete a[b]);return k?h:null};b.clearCustomData=function(){this.removeAllListeners();var b=this.getUniqueId();b&&delete g[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,g){b.append(this,g);return b},clone:function(b,g){function e(a){a["data-cke-expando"]&&(a["data-cke-expando"]=!1);if(a.nodeType==CKEDITOR.NODE_ELEMENT||a.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(g||a.nodeType!=CKEDITOR.NODE_ELEMENT||a.removeAttribute("id",!1),b){a=a.childNodes;for(var h=0;h<a.length;h++)e(a[h])}}function a(e){if(e.type==CKEDITOR.NODE_ELEMENT||e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var h=
e.getName();":"==h[0]&&e.renameNode(h.substring(1))}if(b)for(h=0;h<e.getChildCount();h++)a(e.getChild(h))}}var h=this.$.cloneNode(b);e(h);h=new CKEDITOR.dom.node(h);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&a(h);return h},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 g=[],e=this.getDocument().$.documentElement,a=this;a&&a!=e;){var h=a.getParent();h&&g.unshift(this.getIndex.call(a,b));a=h}return g},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(b){function g(a,b){var e=b?a.getNext():a.getPrevious();return e&&e.type==CKEDITOR.NODE_TEXT?e.isEmpty()?g(e,b):e:
null}var e=this,a=-1,h;if(!this.getParent()||b&&e.type==CKEDITOR.NODE_TEXT&&e.isEmpty()&&!g(e)&&!g(e,!0))return-1;do if(!b||e.equals(this)||e.type!=CKEDITOR.NODE_TEXT||!h&&!e.isEmpty())a++,h=e.type==CKEDITOR.NODE_TEXT;while(e=e.getPrevious());return a},getNextSourceNode:function(b,g,e){if(e&&!e.call){var a=e;e=function(b){return!b.equals(a)}}b=!b&&this.getFirst&&this.getFirst();var h;if(!b){if(this.type==CKEDITOR.NODE_ELEMENT&&e&&!1===e(this,!0))return null;b=this.getNext()}for(;!b&&(h=(h||this).getParent());){if(e&&
!1===e(h,!0))return null;b=h.getNext()}return!b||e&&!1===e(b)?null:g&&g!=b.type?b.getNextSourceNode(!1,g,e):b},getPreviousSourceNode:function(b,g,e){if(e&&!e.call){var a=e;e=function(b){return!b.equals(a)}}b=!b&&this.getLast&&this.getLast();var h;if(!b){if(this.type==CKEDITOR.NODE_ELEMENT&&e&&!1===e(this,!0))return null;b=this.getPrevious()}for(;!b&&(h=(h||this).getParent());){if(e&&!1===e(h,!0))return null;b=h.getPrevious()}return!b||e&&!1===e(b)?null:g&&b.type!=g?b.getPreviousSourceNode(!1,g,e):
b},getPrevious:function(b){var g=this.$,e;do e=(g=g.previousSibling)&&10!=g.nodeType&&new CKEDITOR.dom.node(g);while(e&&b&&!b(e));return e},getNext:function(b){var g=this.$,e;do e=(g=g.nextSibling)&&new CKEDITOR.dom.node(g);while(e&&b&&!b(e));return e},getParent:function(b){var g=this.$.parentNode;return g&&(g.nodeType==CKEDITOR.NODE_ELEMENT||b&&g.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(g):null},getParents:function(b){var g=this,e=[];do e[b?"push":"unshift"](g);while(g=g.getParent());
return e},getCommonAncestor:function(b){if(b.equals(this))return this;if(b.contains&&b.contains(this))return b;var g=this.contains?this:this.getParent();do if(g.contains(b))return g;while(g=g.getParent());return null},getPosition:function(b){var g=this.$,e=b.$;if(g.compareDocumentPosition)return g.compareDocumentPosition(e);if(g==e)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&b.type==CKEDITOR.NODE_ELEMENT){if(g.contains){if(g.contains(e))return CKEDITOR.POSITION_CONTAINS+
CKEDITOR.POSITION_PRECEDING;if(e.contains(g))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in g)return 0>g.sourceIndex||0>e.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:g.sourceIndex<e.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}g=this.getAddress();b=b.getAddress();for(var e=Math.min(g.length,b.length),a=0;a<e;a++)if(g[a]!=b[a])return g[a]<b[a]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return g.length<b.length?CKEDITOR.POSITION_CONTAINS+
CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(b,g){var e=this.$,a,h;g||(e=e.parentNode);"function"==typeof b?(h=!0,a=b):(h=!1,a=function(a){a="string"==typeof a.nodeName?a.nodeName.toLowerCase():"";return"string"==typeof b?a==b:a in b});for(;e;){if(a(h?new CKEDITOR.dom.node(e):e))return new CKEDITOR.dom.node(e);try{e=e.parentNode}catch(k){e=null}}return null},hasAscendant:function(b,g){var e=this.$;g||(e=e.parentNode);for(;e;){if(e.nodeName&&
e.nodeName.toLowerCase()==b)return!0;e=e.parentNode}return!1},move:function(b,g){b.append(this.remove(),g)},remove:function(b){var g=this.$,e=g.parentNode;if(e){if(b)for(;b=g.firstChild;)e.insertBefore(g.removeChild(b),g);e.removeChild(g)}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 g=CKEDITOR.tools.ltrim(b.getText()),e=b.getLength();if(g)g.length<
e&&(b.split(e-g.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 g=CKEDITOR.tools.rtrim(b.getText()),e=b.getLength();if(g)g.length<e&&(b.split(g.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 g=
this;this.type!=CKEDITOR.NODE_ELEMENT&&(g=this.getParent());CKEDITOR.env.edge&&g&&g.is("textarea","input")&&(b=!0);if(!b&&g&&"undefined"!=typeof g.$.isContentEditable)return!(g.$.isContentEditable||g.data("cke-editable"));for(;g;){if(g.data("cke-editable"))return!1;if(g.hasAttribute("contenteditable"))return"false"==g.getAttribute("contenteditable");g=g.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,g="CSS1Compat"==b.compatMode;return{width:(g?b.documentElement.clientWidth:b.body.clientWidth)||0,height:(g?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 g=new CKEDITOR.dom.element("link");g.setAttributes({rel:"stylesheet",
type:"text/css",href:b});this.getHead().append(g)}},appendStyleText:function(b){if(this.$.createStyleSheet){var g=this.$.createStyleSheet("");g.cssText=b}else{var e=new CKEDITOR.dom.element("style",this);e.append(new CKEDITOR.dom.text(b,this));this.getHead().append(e)}return g||e.$.sheet},createElement:function(b,g){var e=new CKEDITOR.dom.element(b,this);g&&(g.attributes&&e.setAttributes(g.attributes),g.styles&&e.setStyles(g.styles));return e},createText:function(b){return new CKEDITOR.dom.text(b,
this)},focus:function(){this.getWindow().focus()},getActive:function(){var b;try{b=this.$.activeElement}catch(g){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,g){for(var e=this.$.documentElement,a=0;e&&a<b.length;a++){var h=b[a];if(g)for(var k=-1,m=0;m<e.childNodes.length;m++){var l=e.childNodes[m];if(!0!==g||3!=l.nodeType||!l.previousSibling||3!=l.previousSibling.nodeType)if(k++,k==
h){e=l;break}}else e=e.childNodes[h]}return e?new CKEDITOR.dom.node(e):null},getElementsByTag:function(b,g){CKEDITOR.env.ie&&8>=document.documentMode||!g||(b=g+":"+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,g){"string"==typeof b&&(b=(g?g.$: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,g){var e=new CKEDITOR.dom.element("div",g);e.setHtml(b);return e.getFirst().remove()},CKEDITOR.dom.element.setMarker=
function(b,g,e,a){var h=g.getCustomData("list_marker_id")||g.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),k=g.getCustomData("list_marker_names")||g.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");b[h]=g;k[e]=1;return g.setCustomData(e,a)},CKEDITOR.dom.element.clearAllMarkers=function(b){for(var g in b)CKEDITOR.dom.element.clearMarkers(b,b[g],1)},CKEDITOR.dom.element.clearMarkers=function(b,g,e){var a=g.getCustomData("list_marker_names"),
h=g.getCustomData("list_marker_id"),k;for(k in a)g.removeCustomData(k);g.removeCustomData("list_marker_names");e&&(g.removeCustomData("list_marker_id"),delete b[h])},function(){function b(a,d){return-1<(" "+a+" ").replace(k," ").indexOf(" "+d+" ")}function g(a){var d=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),d=!1);return function(){d||a.removeAttribute("id")}}function e(a,d){var f=CKEDITOR.tools.escapeCss(a.$.id);return"#"+f+" "+d.split(/,\s*/).join(", #"+f+" ")}function a(a){for(var d=
0,f=0,c=m[a].length;f<c;f++)d+=parseFloat(this.getComputedStyle(m[a][f])||0,10)||0;return d}var h=document.createElement("_").classList,h="undefined"!==typeof h&&null!==String(h.add).match(/\[Native code\]/gi),k=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:h?function(a){this.$.classList.add(a);return this}:function(a){var d=this.$.className;d&&(b(d,a)||(d+=" "+a));this.$.className=d||a;return this},removeClass:h?function(a){var d=this.$;d.classList.remove(a);
d.className||d.removeAttribute("class");return this}:function(a){var d=this.getAttribute("class");d&&b(d,a)&&((d=d.replace(new RegExp("(?:^|\\s+)"+a+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",d):this.removeAttribute("class"));return this},hasClass:function(a){return b(this.$.className,a)},append:function(a,d){"string"==typeof a&&(a=this.getDocument().createElement(a));d?this.$.insertBefore(a.$,this.$.firstChild):this.$.appendChild(a.$);return a},appendHtml:function(a){if(this.$.childNodes.length){var d=
new CKEDITOR.dom.element("div",this.getDocument());d.setHtml(a);d.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,d){var f=new CKEDITOR.dom.range(this.getDocument());f.setStartAfter(this);f.setEndAfter(a);var c=f.extractContents(!1,d||!1),b;f.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(f=new CKEDITOR.dom.element("div");b=c.getFirst();)b.$.style.backgroundColor&&(b.$.style.backgroundColor=b.$.style.backgroundColor),f.append(b);f.insertAfter(this);f.remove(!0)}else c.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&
16)}:function(a){var d=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?d.contains(a.getParent().$):d!=a.$&&d.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(d){}}return function(d){d?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 d=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!d.width&&(d.width=d.right-d.left);!d.height&&(d.height=d.bottom-d.top);return a?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),d):d},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var d=this.$;if(this.getParent())return d.innerHTML=a;var f=this.getDocument()._getHtml5ShivFrag();f.appendChild(d);d.innerHTML=a;f.removeChild(d);return a}catch(c){this.$.innerHTML="";
d=new CKEDITOR.dom.element("body",this.getDocument());d.$.innerHTML=a;for(d=d.getChildren();d.count();)this.append(d.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(d){this.$[a?"textContent":"innerText"]=d}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a=
"className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":return a=this.$.getAttribute(a,2),0!==a&&0===this.$.tabIndex&&(a=null),a;case "checked":return a=this.$.attributes.getNamedItem(a),(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):
null}return this.$.getAttribute(a,2)}:a}(),getAttributes:function(a){var d={},f=this.$.attributes,c;a=CKEDITOR.tools.isArray(a)?a:[];for(c=0;c<f.length;c++)-1===CKEDITOR.tools.indexOf(a,f[c].name)&&(d[f[c].name]=f[c].value);return d},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 d=this.getWindow().$.getComputedStyle(this.$,
null);return d?d.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 d=this.$.scopeName;"HTML"!=d&&(a=d.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var d=this.$.firstChild;(d=d&&new CKEDITOR.dom.node(d))&&a&&!a(d)&&(d=d.getNext(a));
return d},getLast:function(a){var d=this.$.lastChild;(d=d&&new CKEDITOR.dom.node(d))&&a&&!a(d)&&(d=d.getPrevious(a));return d},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 d=0;d<arguments.length;d++)if(arguments[d]==a)return!0;return!1},isEditable:function(a){var d=this.getName();return this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||
CKEDITOR.dtd.$nonEditable[d]||CKEDITOR.dtd.$empty[d]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:!1!==a?(a=CKEDITOR.dtd[d]||CKEDITOR.dtd.span,!(!a||!a["#"])):!0},isIdentical:function(a){var d=this.clone(0,1);a=a.clone(0,1);d.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(d.$.isEqualNode)return d.$.style.cssText=
CKEDITOR.tools.normalizeCssText(d.$.style.cssText),a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText),d.$.isEqualNode(a.$);d=d.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(d),d=f.getHtml(),f.setHtml(a),a=f.getHtml())}return d==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),d,f;a&&CKEDITOR.env.webkit&&
(d=this.getWindow(),!d.equals(CKEDITOR.document.getWindow())&&(f=d.$.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(),d=0,f=a.count();d<f;d++){var c=a.getItem(d);if(c.type!=CKEDITOR.NODE_ELEMENT||!c.data("cke-bookmark"))if(c.type==CKEDITOR.NODE_ELEMENT&&!c.isEmptyInlineRemoveable()||c.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(c.getText()))return!1}return!0},
hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var a=this.$.attributes,d=0;d<a.length;d++){var f=a[d];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,d=a.length,f={"data-cke-expando":1,_moz_dirty:1};return 0<d&&(2<d||!f[a[0].nodeName]||2==d&&!f[a[1].nodeName])},hasAttribute:function(){function a(d){var f=this.$.attributes.getNamedItem(d);
if("input"==this.getName())switch(d){case "class":return 0<this.$.className.length;case "checked":return!!this.$.checked;case "value":return d=this.getAttribute("type"),"checkbox"==d||"radio"==d?"on"!=this.$.value:!!this.$.value}return f?f.specified:!1}return CKEDITOR.env.ie?8>CKEDITOR.env.version?function(d){return"name"==d?!!this.$.name:a.call(this,d)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,d){var f=this.$;
a=a.$;if(f!=a){var c;if(d)for(;c=f.lastChild;)a.insertBefore(f.removeChild(c),a.firstChild);else for(;c=f.firstChild;)a.appendChild(f.removeChild(c))}},mergeSiblings:function(){function a(d,f,c){if(f&&f.type==CKEDITOR.NODE_ELEMENT){for(var b=[];f.data("cke-bookmark")||f.isEmptyInlineRemoveable();)if(b.push(f),f=c?f.getNext():f.getPrevious(),!f||f.type!=CKEDITOR.NODE_ELEMENT)return;if(d.isIdentical(f)){for(var e=c?d.getLast():d.getFirst();b.length;)b.shift().move(d,!c);f.moveChildren(d,!c);f.remove();
e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(d){if(!1===d||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(d,f){"class"==d?this.$.className=f:"style"==d?this.$.style.cssText=f:"tabindex"==d?
this.$.tabIndex=f:"checked"==d?this.$.checked=f:"contenteditable"==d?a.call(this,"contentEditable",f):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(d,f){if("src"==d&&f.match(/^http:\/\//))try{a.apply(this,arguments)}catch(c){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var d in a)this.setAttribute(d,a[d]);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 d=0;d<a.length;d++)this.removeAttribute(a[d]);else for(d in a=a||this.getAttributes(),a)a.hasOwnProperty(d)&&this.removeAttribute(d)},removeStyle:function(a){var d=this.$.style;if(d.removeProperty||"border"!=a&&"margin"!=a&&"padding"!=
a)d.removeProperty?d.removeProperty(a):d.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a)),this.$.style.cssText||this.removeAttribute("style");else{var f=["top","left","right","bottom"],c;"border"==a&&(c=["color","style","width"]);for(var d=[],b=0;b<f.length;b++)if(c)for(var e=0;e<c.length;e++)d.push([a,f[b],c[e]].join("-"));else d.push([a,f[b]].join("-"));for(a=0;a<d.length;a++)this.removeStyle(d[a])}},setStyle:function(a,d){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=d;return this},setStyles:function(a){for(var d in a)this.setStyle(d,
a[d]);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,d=this.getElementsByTag("*"),f=0,c=d.count();f<c;f++)a=d.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 d=0,f=0,c=this.getDocument(),b=c.getBody(),e="BackCompat"==c.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?8!==CKEDITOR.env.version:1)){var h=this.$.getBoundingClientRect(),k=c.$.documentElement,g=k.clientTop||b.$.clientTop||0,r=k.clientLeft||b.$.clientLeft||0,m=!0;CKEDITOR.env.ie&&(m=c.getDocumentElement().contains(this),
c=c.getBody().contains(this),m=e&&c||!e&&m);m&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(d=b.$.scrollLeft||k.scrollLeft,f=b.$.scrollTop||k.scrollTop):(f=e?b.$:k,d=f.scrollLeft,f=f.scrollTop),d=h.left+d-r,f=h.top+f-g)}else for(g=this,r=null;g&&"body"!=g.getName()&&"html"!=g.getName();){d+=g.$.offsetLeft-g.$.scrollLeft;f+=g.$.offsetTop-g.$.scrollTop;g.equals(this)||(d+=g.$.clientLeft||0,f+=g.$.clientTop||0);for(;r&&!r.equals(g);)d-=r.$.scrollLeft,f-=r.$.scrollTop,r=r.getParent();
r=g;g=(h=g.$.offsetParent)?new CKEDITOR.dom.element(h):null}a&&(h=this.getWindow(),g=a.getWindow(),!h.equals(g)&&h.$.frameElement&&(a=(new CKEDITOR.dom.element(h.$.frameElement)).getDocumentPosition(a),d+=a.x,f+=a.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||e||(d+=this.$.clientLeft?1:0,f+=this.$.clientTop?1:0);return{x:d,y:f}},scrollIntoView:function(a){var d=this.getParent();if(d){do if((d.$.clientWidth&&d.$.clientWidth<d.$.scrollWidth||d.$.clientHeight&&d.$.clientHeight<
d.$.scrollHeight)&&!d.is("body")&&this.scrollIntoParent(d,a,1),d.is("html")){var f=d.getWindow();try{var c=f.$.frameElement;c&&(d=new CKEDITOR.dom.element(c))}catch(b){}}while(d=d.getParent())}},scrollIntoParent:function(a,d,f){var c,b,e,h;function k(c,d){/body|html/.test(a.getName())?a.getWindow().$.scrollBy(c,d):(a.$.scrollLeft+=c,a.$.scrollTop+=d)}function g(c,a){var d={x:0,y:0};if(!c.is(m?"body":"html")){var f=c.$.getBoundingClientRect();d.x=f.left;d.y=f.top}f=c.getWindow();f.equals(a)||(f=g(CKEDITOR.dom.element.get(f.$.frameElement),
a),d.x+=f.x,d.y+=f.y);return d}function r(c,a){return parseInt(c.getComputedStyle("margin-"+a)||0,10)||0}!a&&(a=this.getWindow());e=a.getDocument();var m="BackCompat"==e.$.compatMode;a instanceof CKEDITOR.dom.window&&(a=m?e.getBody():e.getDocumentElement());CKEDITOR.env.webkit&&(e=this.getEditor(!1))&&(e._.previousScrollTop=null);e=a.getWindow();b=g(this,e);var v=g(a,e),z=this.$.offsetHeight;c=this.$.offsetWidth;var u=a.$.clientHeight,p=a.$.clientWidth;e=b.x-r(this,"left")-v.x||0;h=b.y-r(this,"top")-
v.y||0;c=b.x+c+r(this,"right")-(v.x+p)||0;b=b.y+z+r(this,"bottom")-(v.y+u)||0;(0>h||0<b)&&k(0,!0===d?h:!1===d?b:0>h?h:b);f&&(0>e||0<c)&&k(0>e?e:c,0)},setState:function(a,d,f){d=d||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(d+"_on");this.removeClass(d+"_off");this.removeClass(d+"_disabled");f&&this.setAttribute("aria-pressed",!0);f&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(d+"_disabled");this.removeClass(d+"_off");this.removeClass(d+"_on");
f&&this.setAttribute("aria-disabled",!0);f&&this.removeAttribute("aria-pressed");break;default:this.addClass(d+"_off"),this.removeClass(d+"_on"),this.removeClass(d+"_disabled"),f&&this.removeAttribute("aria-pressed"),f&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(d){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,d){var f=this.$.attributes;d=d||{};for(var c=0;c<f.length;c++){var b=
f[c],e=b.nodeName.toLowerCase(),h;if(!(e in d))if("checked"==e&&(h=this.getAttribute(e)))a.setAttribute(e,h);else if(!CKEDITOR.env.ie||this.hasAttribute(e))h=this.getAttribute(e),null===h&&(h=b.nodeValue),a.setAttribute(e,h)}""!==this.$.style.cssText&&(a.$.style.cssText=this.$.style.cssText)},renameNode:function(a){if(this.getName()!=a){var d=this.getDocument();a=new CKEDITOR.dom.element(a,d);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(d,f){var c=d.childNodes;if(0<=f&&f<c.length)return c[f]}return function(d){var f=this.$;if(d.slice)for(d=d.slice();0<d.length&&f;)f=a(f,d.shift());else f=a(f,d);return f?new CKEDITOR.dom.node(f):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function a(d){return d.type==CKEDITOR.NODE_ELEMENT&&d.hasClass("cke_enable_context_menu")}this.on("contextmenu",
function(d){d.data.getTarget().getAscendant(a,!0)||d.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,d){a="data-"+a;if(void 0===d)return this.getAttribute(a);!1===d?this.removeAttribute(a):this.setAttribute(a,d);return null},getEditor:function(a){var d=CKEDITOR.instances,f,c,b;a=
a||void 0===a;for(f in d)if(c=d[f],c.element.equals(this)&&c.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!a&&(b=c.editable())&&(b.equals(this)||b.contains(this)))return c;return null},find:function(a){var d=g(this);a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(e(this,a)));d();return a},findOne:function(a){var d=g(this);a=this.$.querySelector(e(this,a));d();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,d,f){if(!(f||d&&this.type!=d))var c=a(this);if(!1!==c){f=this.getChildren();
for(var b=0;b<f.count();b++)c=f.getItem(b),c.type==CKEDITOR.NODE_ELEMENT?c.forEach(a,d):d&&c.type!=d||a(c)}},fireEventHandler:function(a,d){var f="on"+a,c=this.$;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version){var b=c.ownerDocument.createEventObject(),e;for(e in d)b[e]=d[e];c.fireEvent(f,b)}else c[c[a]?a:f](d)},isDetached:function(){var a=this.getDocument(),d=a.getDocumentElement();return d.equals(this)||d.contains(this)?!CKEDITOR.env.ie||8<CKEDITOR.env.version&&!CKEDITOR.env.quirks?!a.$.defaultView:
!1:!0}});var m={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(b,d,f){"number"==typeof d&&(!f||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(d-=a.call(this,b)),this.setStyle(b,d+"px"))};CKEDITOR.dom.element.prototype.getSize=function(b,d){var f=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(b)],this.$["client"+CKEDITOR.tools.capitalize(b)])||
0;d&&(f-=a.call(this,b));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(c,a){var d=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(d.collapsed)return this.end(),
null;d.optimize()}var f,b=d.startContainer;f=d.endContainer;var n=d.startOffset,e=d.endOffset,h,k=this.guard,g=this.type,m=c?"getPreviousSourceNode":"getNextSourceNode";if(!c&&!this._.guardLTR){var l=f.type==CKEDITOR.NODE_ELEMENT?f:f.getParent(),J=f.type==CKEDITOR.NODE_ELEMENT?f.getChild(e):f.getNext();this._.guardLTR=function(c,a){return(!a||!l.equals(c))&&(!J||!c.equals(J))&&(c.type!=CKEDITOR.NODE_ELEMENT||!a||!c.equals(d.root))}}if(c&&!this._.guardRTL){var B=b.type==CKEDITOR.NODE_ELEMENT?b:b.getParent(),
E=b.type==CKEDITOR.NODE_ELEMENT?n?b.getChild(n-1):null:b.getPrevious();this._.guardRTL=function(c,a){return(!a||!B.equals(c))&&(!E||!c.equals(E))&&(c.type!=CKEDITOR.NODE_ELEMENT||!a||!c.equals(d.root))}}var D=c?this._.guardRTL:this._.guardLTR;h=k?function(c,a){return!1===D(c,a)?!1:k(c,a)}:D;this.current?f=this.current[m](!1,g,h):(c?f.type==CKEDITOR.NODE_ELEMENT&&(f=0<e?f.getChild(e-1):!1===h(f,!0)?null:f.getPreviousSourceNode(!0,g,h)):(f=b,f.type==CKEDITOR.NODE_ELEMENT&&((f=f.getChild(n))||(f=!1===
h(b,!0)?null:b.getNextSourceNode(!0,g,h)))),f&&!1===h(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[m](!1,g,h)}this.end();return this.current=null}function g(c){for(var a,d=null;a=b.call(this,c);)d=a;return d}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(c){this.range=c;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 g.call(this)},lastBackward:function(){return g.call(this,1)},reset:function(){delete this.current;this._={}}}});var e={block:1,"list-item":1,table:1,"table-row-group":1,"table-header-group":1,"table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1,"table-caption":1},a={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=
function(c){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in a||!e[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||c&&this.is(c)):!0};CKEDITOR.dom.walker.blockBoundary=function(c){return function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary(c))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(c,a){function d(c){return c&&c.getName&&"span"==c.getName()&&c.data("cke-bookmark")}
return function(f){var b,n;b=f&&f.type!=CKEDITOR.NODE_ELEMENT&&(n=f.getParent())&&d(n);b=c?b:b||d(f);return!!(a^b)}};CKEDITOR.dom.walker.whitespaces=function(c){return function(a){var d;a&&a.type==CKEDITOR.NODE_TEXT&&(d=!CKEDITOR.tools.trim(a.getText())||CKEDITOR.env.webkit&&a.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);return!!(c^d)}};CKEDITOR.dom.walker.invisible=function(c){var a=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.env.webkit?1:0;return function(f){a(f)?f=1:(f.type==CKEDITOR.NODE_TEXT&&
(f=f.getParent()),f=f.$.offsetWidth<=d);return!!(c^f)}};CKEDITOR.dom.walker.nodeType=function(c,a){return function(d){return!!(a^d.type==c)}};CKEDITOR.dom.walker.bogus=function(c){function a(c){return!k(c)&&!m(c)}return function(d){var f=CKEDITOR.env.needsBrFiller?d.is&&d.is("br"):d.getText&&h.test(d.getText());f&&(f=d.getParent(),d=d.getNext(a),f=f.isBlockBoundary()&&(!d||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()));return!!(c^f)}};CKEDITOR.dom.walker.temp=function(c){return function(a){a.type!=
CKEDITOR.NODE_ELEMENT&&(a=a.getParent());a=a&&a.hasAttribute("data-cke-temp");return!!(c^a)}};var h=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,k=CKEDITOR.dom.walker.whitespaces(),m=CKEDITOR.dom.walker.bookmark(),l=CKEDITOR.dom.walker.temp(),d=function(c){return m(c)||k(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.is(CKEDITOR.dtd.$inline)&&!c.is(CKEDITOR.dtd.$empty)};CKEDITOR.dom.walker.ignored=function(c){return function(a){a=k(a)||m(a)||l(a);return!!(c^a)}};var f=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=
function(c){return function(a){for(var d=0,b=a.getChildCount();d<b;++d)if(!f(a.getChild(d)))return!!c;return!c}};var c=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(c){var a={},d;for(d in c)CKEDITOR.dtd[d]["#"]&&(a[d]=1);return a}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=function(a){return function(d){d=f(d)?!1:d.type==CKEDITOR.NODE_TEXT||d.type==CKEDITOR.NODE_ELEMENT&&(d.is(CKEDITOR.dtd.$inline)||d.is("hr")||
"false"==d.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&d.is(n)&&c(d))?!0:!1;return!!(a^d)}};CKEDITOR.dom.element.prototype.getBogus=function(){var c=this;do c=c.getPreviousSourceNode();while(d(c));return c&&(CKEDITOR.env.needsBrFiller?c.is&&c.is("br"):c.getText&&h.test(c.getText()))?c:!1}}(),"use strict",CKEDITOR.dom.range=function(b){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=!0;var g=b instanceof CKEDITOR.dom.document;this.document=
g?b:b.getDocument();this.root=g?b.getBody():b},function(){function b(c){c.collapsed=c.startContainer&&c.endContainer&&c.startContainer.equals(c.endContainer)&&c.startOffset==c.endOffset}function g(c,a,d,f,b){function e(c,a,d,f){var n=d?c.getPrevious():c.getNext();if(f&&g)return n;l||f?a.append(c.clone(!0,b),d):(c.remove(),m&&a.append(c,d));return n}function h(){var c,a,d,f=Math.min(M.length,K.length);for(c=0;c<f;c++)if(a=M[c],d=K[c],!a.equals(d))return c;return c-1}function k(){var a=Q-1,d=D&&G&&
!p.equals(w);a<H-1||a<F-1||d?(d?c.moveToPosition(w,CKEDITOR.POSITION_BEFORE_START):F==a+1&&E?c.moveToPosition(K[a],CKEDITOR.POSITION_BEFORE_END):c.moveToPosition(K[a+1],CKEDITOR.POSITION_BEFORE_START),f&&(a=M[a+1])&&a.type==CKEDITOR.NODE_ELEMENT&&(d=CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',c.document),d.insertAfter(a),a.mergeSiblings(!1),c.moveToBookmark({startNode:d}))):c.collapse(!0)}c.optimizeBookmark();var g=0===
a,m=1==a,l=2==a;a=l||m;var p=c.startContainer,w=c.endContainer,C=c.startOffset,J=c.endOffset,B,E,D,G,I,P;if(l&&w.type==CKEDITOR.NODE_TEXT&&(p.equals(w)||p.type===CKEDITOR.NODE_ELEMENT&&p.getFirst().equals(w)))d.append(c.document.createText(w.substring(C,J)));else{w.type==CKEDITOR.NODE_TEXT?l?P=!0:w=w.split(J):0<w.getChildCount()?J>=w.getChildCount()?(w=w.getChild(J-1),E=!0):w=w.getChild(J):G=E=!0;p.type==CKEDITOR.NODE_TEXT?l?I=!0:p.split(C):0<p.getChildCount()?0===C?(p=p.getChild(C),B=!0):p=p.getChild(C-
1):D=B=!0;for(var M=p.getParents(),K=w.getParents(),Q=h(),H=M.length-1,F=K.length-1,N=d,aa,S,X,ea=-1,U=Q;U<=H;U++){S=M[U];X=S.getNext();for(U!=H||S.equals(K[U])&&H<F?a&&(aa=N.append(S.clone(0,b))):B?e(S,N,!1,D):I&&N.append(c.document.createText(S.substring(C)));X;){if(X.equals(K[U])){ea=U;break}X=e(X,N)}N=aa}N=d;for(U=Q;U<=F;U++)if(d=K[U],X=d.getPrevious(),d.equals(M[U]))a&&(N=N.getChild(0));else{U!=F||d.equals(M[U])&&F<H?a&&(aa=N.append(d.clone(0,b))):E?e(d,N,!1,G):P&&N.append(c.document.createText(d.substring(0,
J)));if(U>ea)for(;X;)X=e(X,N,!0);N=aa}l||k()}}function e(){var c=!1,a=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!0),f=CKEDITOR.dom.walker.bogus();return function(b){return d(b)||a(b)?!0:f(b)&&!c?c=!0:b.type==CKEDITOR.NODE_TEXT&&(b.hasAscendant("pre")||CKEDITOR.tools.trim(b.getText()).length)||b.type==CKEDITOR.NODE_ELEMENT&&!b.is(k)?!1:!0}}function a(c){var a=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(1);return function(f){return d(f)||a(f)?!0:!c&&m(f)||
f.type==CKEDITOR.NODE_ELEMENT&&f.is(CKEDITOR.dtd.$removeEmpty)}}function h(c){return function(){var a;return this[c?"getPreviousNode":"getNextNode"](function(c){!a&&f(c)&&(a=c);return d(c)&&!(m(c)&&c.equals(a))})}}var k={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},m=CKEDITOR.dom.walker.bogus(),l=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,d=CKEDITOR.dom.walker.editable(),f=CKEDITOR.dom.walker.ignored(!0);
CKEDITOR.dom.range.prototype={clone:function(){var c=new CKEDITOR.dom.range(this.root);c._setStartContainer(this.startContainer);c.startOffset=this.startOffset;c._setEndContainer(this.endContainer);c.endOffset=this.endOffset;c.collapsed=this.collapsed;return c},collapse:function(c){c?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(c){var a=new CKEDITOR.dom.documentFragment(this.document);
this.collapsed||g(this,2,a,!1,"undefined"==typeof c?!0:c);return a},deleteContents:function(c){this.collapsed||g(this,0,null,c)},extractContents:function(c,a){var d=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||g(this,1,d,c,"undefined"==typeof a?!0:a);return d},equals:function(c){return this.startOffset===c.startOffset&&this.endOffset===c.endOffset&&this.startContainer.equals(c.startContainer)&&this.endContainer.equals(c.endContainer)},createBookmark:function(c){function a(c){return c.getAscendant(function(c){var a;
if(a=c.data&&c.data("cke-temp"))a=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],c.getAttribute("id"));return a},!0)}var d=this.startContainer,f=this.endContainer,b=this.collapsed,e,h,k,g;e=this.document.createElement("span");e.data("cke-bookmark",1);e.setStyle("display","none");e.setHtml("\x26nbsp;");c&&(k="cke_bm_"+CKEDITOR.tools.getNextNumber(),e.setAttribute("id",k+(b?"C":"S")));b||(h=e.clone(),h.setHtml("\x26nbsp;"),c&&h.setAttribute("id",k+"E"),g=this.clone(),a(f)&&(f=a(f),
g.moveToPosition(f,CKEDITOR.POSITION_AFTER_END)),g.collapse(),g.insertNode(h));g=this.clone();a(d)&&(f=a(d),g.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START));g.collapse(!0);g.insertNode(e);h?(this.setStartAfter(e),this.setEndBefore(h)):this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END);return{startNode:c?k+(b?"C":"S"):e,endNode:c?k+"E":h,serializable:c,collapsed:b}},createBookmark2:function(){function c(c){var a=c.container,f=c.offset,b;b=a;var e=f;b=b.type!=CKEDITOR.NODE_ELEMENT||0===e||e==b.getChildCount()?
0:b.getChild(e-1).type==CKEDITOR.NODE_TEXT&&b.getChild(e).type==CKEDITOR.NODE_TEXT;b&&(a=a.getChild(f-1),f=a.getLength());if(a.type==CKEDITOR.NODE_ELEMENT&&0<f){a:{for(b=a;f--;)if(e=b.getChild(f).getIndex(!0),0<=e){f=e;break a}f=-1}f+=1}if(a.type==CKEDITOR.NODE_TEXT){b=a;for(e=0;(b=b.getPrevious())&&b.type==CKEDITOR.NODE_TEXT;)e+=b.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;b=e;a.isEmpty()?(e=a.getPrevious(d),b?(f=b,a=e?e.getNext():a.getParent().getFirst()):(a=a.getParent(),
f=e?e.getIndex(!0)+1:0)):f+=b}c.container=a;c.offset=f}function a(c,d){var f=d.getCustomData("cke-fillingChar");if(f){var b=c.container;f.equals(b)&&(c.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=c.offset&&(c.offset=b.getIndex(),c.container=b.getParent()))}}var d=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(d){var f=this.collapsed,b={container:this.startContainer,offset:this.startOffset},e={container:this.endContainer,offset:this.endOffset};d&&(c(b),a(b,this.root),
f||(c(e),a(e,this.root)));return{start:b.container.getAddress(d),end:f?null:e.container.getAddress(d),startOffset:b.offset,endOffset:e.offset,normalized:d,collapsed:f,is2:!0}}}(),moveToBookmark:function(c){if(c.is2){var a=this.document.getByAddress(c.start,c.normalized),d=c.startOffset,f=c.end&&this.document.getByAddress(c.end,c.normalized);c=c.endOffset;this.setStart(a,d);f?this.setEnd(f,c):this.collapse(!0)}else a=(d=c.serializable)?this.document.getById(c.startNode):c.startNode,c=d?this.document.getById(c.endNode):
c.endNode,this.setStartBefore(a),a.remove(),c?(this.setEndBefore(c),c.remove()):this.collapse(!0)},getBoundaryNodes:function(){var c=this.startContainer,a=this.endContainer,d=this.startOffset,f=this.endOffset,b;if(c.type==CKEDITOR.NODE_ELEMENT)if(b=c.getChildCount(),b>d)c=c.getChild(d);else if(1>b)c=c.getPreviousSourceNode();else{for(c=c.$;c.lastChild;)c=c.lastChild;c=new CKEDITOR.dom.node(c);c=c.getNextSourceNode()||c}if(a.type==CKEDITOR.NODE_ELEMENT)if(b=a.getChildCount(),b>f)a=a.getChild(f).getPreviousSourceNode(!0);
else if(1>b)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a)}c.getPosition(a)&CKEDITOR.POSITION_FOLLOWING&&(c=a);return{startNode:c,endNode:a}},getCommonAncestor:function(a,d){var f=this.startContainer,b=this.endContainer,f=f.equals(b)?a&&f.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?f.getChild(this.startOffset):f:f.getCommonAncestor(b);return d&&!f.is?f.getParent():f},optimize:function(){var a=this.startContainer,d=this.startOffset;
a.type!=CKEDITOR.NODE_ELEMENT&&(d?d>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;d=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(d?d>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,d=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);d&&d.is&&d.is("span")&&d.data("cke-bookmark")&&this.setEndAt(d,CKEDITOR.POSITION_AFTER_END)},trim:function(a,
d){var f=this.startContainer,b=this.startOffset,e=this.collapsed;if((!a||e)&&f&&f.type==CKEDITOR.NODE_TEXT){if(b)if(b>=f.getLength())b=f.getIndex()+1,f=f.getParent();else{var h=f.split(b),b=f.getIndex()+1,f=f.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(h,this.endOffset-this.startOffset):f.equals(this.endContainer)&&(this.endOffset+=1)}else b=f.getIndex(),f=f.getParent();this.setStart(f,b);if(e){this.collapse(!0);return}}f=this.endContainer;b=this.endOffset;d||e||!f||f.type!=
CKEDITOR.NODE_TEXT||(b?(b>=f.getLength()||f.split(b),b=f.getIndex()+1):b=f.getIndex(),f=f.getParent(),this.setEnd(f,b))},enlarge:function(a,d){function f(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}function b(a,c,d){var f=new CKEDITOR.dom.range(d);f.setStart(a,c);f.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(f);for(d.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};f=d.next();){if(f.type!=CKEDITOR.NODE_TEXT)return!1;
h=f!=a?f.getText():f.substring(c);if(e.test(h))return!1}return!0}var e=new RegExp(/[^\s\ufeff]/),h,k;switch(a){case CKEDITOR.ENLARGE_INLINE:var g=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var m=this.getCommonAncestor();k=this.root;var l,u,p,w,C,J=!1,B;B=this.startContainer;var E=this.startOffset;B.type==CKEDITOR.NODE_TEXT?(E&&(B=!CKEDITOR.tools.trim(B.substring(0,E)).length&&B,J=!!B),B&&((w=B.getPrevious())||(p=B.getParent()))):(E&&(w=B.getChild(E-1)||B.getLast()),w||(p=B));for(p=f(p);p||
w;){if(p&&!w){!C&&p.equals(m)&&(C=!0);if(g?p.isBlockBoundary():!k.contains(p))break;J&&"inline"==p.getComputedStyle("display")||(J=!1,C?l=p:this.setStartBefore(p));w=p.getPrevious()}for(;w;)if(B=!1,w.type==CKEDITOR.NODE_COMMENT)w=w.getPrevious();else{if(w.type==CKEDITOR.NODE_TEXT)h=w.getText(),e.test(h)&&(w=null),B=/[\s\ufeff]$/.test(h);else if((w.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||d&&w.is("br"))&&!w.data("cke-bookmark"))if(J&&CKEDITOR.dtd.$removeEmpty[w.getName()]){h=w.getText();if(e.test(h))w=
null;else for(var E=w.$.getElementsByTagName("*"),D=0,G;G=E[D++];)if(!CKEDITOR.dtd.$removeEmpty[G.nodeName.toLowerCase()]){w=null;break}w&&(B=!!h.length)}else w=null;B&&(J?C?l=p:p&&this.setStartBefore(p):J=!0);if(w){B=w.getPrevious();if(!p&&!B){p=w;w=null;break}w=B}else p=null}p&&(p=f(p.getParent()))}B=this.endContainer;E=this.endOffset;p=w=null;C=J=!1;B.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(B.substring(E)).length?J=!0:(J=!B.getLength(),E==B.getLength()?(w=B.getNext())||(p=B.getParent()):b(B,
E,k)&&(p=B.getParent())):(w=B.getChild(E))||(p=B);for(;p||w;){if(p&&!w){!C&&p.equals(m)&&(C=!0);if(g?p.isBlockBoundary():!k.contains(p))break;J&&"inline"==p.getComputedStyle("display")||(J=!1,C?u=p:p&&this.setEndAfter(p));w=p.getNext()}for(;w;){B=!1;if(w.type==CKEDITOR.NODE_TEXT)h=w.getText(),b(w,0,k)||(w=null),B=/^[\s\ufeff]/.test(h);else if(w.type==CKEDITOR.NODE_ELEMENT){if((0<w.$.offsetWidth||d&&w.is("br"))&&!w.data("cke-bookmark"))if(J&&CKEDITOR.dtd.$removeEmpty[w.getName()]){h=w.getText();if(e.test(h))w=
null;else for(E=w.$.getElementsByTagName("*"),D=0;G=E[D++];)if(!CKEDITOR.dtd.$removeEmpty[G.nodeName.toLowerCase()]){w=null;break}w&&(B=!!h.length)}else w=null}else B=1;B&&J&&(C?u=p:this.setEndAfter(p));if(w){B=w.getNext();if(!p&&!B){p=w;w=null;break}w=B}else p=null}p&&(p=f(p.getParent()))}l&&u&&(m=l.contains(u)?u:l,this.setStartBefore(m),this.setEndAfter(m));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:p=new CKEDITOR.dom.range(this.root);k=this.root;p.setStartAt(k,
CKEDITOR.POSITION_AFTER_START);p.setEnd(this.startContainer,this.startOffset);p=new CKEDITOR.dom.walker(p);var I,P,M=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),K=null,Q=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&"false"==a.getAttribute("contenteditable"))if(K){if(K.equals(a)){K=null;return}}else K=a;else if(K)return;var c=M(a);c||(I=a);return c},g=function(a){var c=Q(a);!c&&a.is&&a.is("br")&&(P=a);return c};p.guard=Q;p=p.lastBackward();I=I||k;this.setStartAt(I,
!I.is("br")&&(!p&&this.checkStartOfBlock()||p&&I.contains(p))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){p=this.clone();p=new CKEDITOR.dom.walker(p);var H=CKEDITOR.dom.walker.whitespaces(),F=CKEDITOR.dom.walker.bookmark();p.evaluator=function(a){return!H(a)&&!F(a)};if((p=p.previous())&&p.type==CKEDITOR.NODE_ELEMENT&&p.is("br"))break}p=this.clone();p.collapse();p.setEndAt(k,CKEDITOR.POSITION_BEFORE_END);p=new CKEDITOR.dom.walker(p);p.guard=
a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?g:Q;I=K=P=null;p=p.lastForward();I=I||k;this.setEndAt(I,!p&&this.checkEndOfBlock()||p&&I.contains(p)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);P&&this.setEndAfter(P)}},shrink:function(a,d,f){var b="boolean"===typeof f?f:f&&"boolean"===typeof f.shrinkOnBlockBoundary?f.shrinkOnBlockBoundary:!0,e=f&&f.skipBogus;if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var h=this.clone(),k=this.startContainer,g=this.endContainer,m=this.startOffset,l=this.endOffset,
u=f=1;k&&k.type==CKEDITOR.NODE_TEXT&&(m?m>=k.getLength()?h.setStartAfter(k):(h.setStartBefore(k),f=0):h.setStartBefore(k));g&&g.type==CKEDITOR.NODE_TEXT&&(l?l>=g.getLength()?h.setEndAfter(g):(h.setEndAfter(g),u=0):h.setEndBefore(g));var h=new CKEDITOR.dom.walker(h),p=CKEDITOR.dom.walker.bookmark(),w=CKEDITOR.dom.walker.bogus();h.evaluator=function(d){return d.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var C;h.guard=function(d,f){if(e&&w(d)||p(d))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&
d.type==CKEDITOR.NODE_TEXT||f&&d.equals(C)||!1===b&&d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()||d.type==CKEDITOR.NODE_ELEMENT&&d.hasAttribute("contenteditable"))return!1;f||d.type!=CKEDITOR.NODE_ELEMENT||(C=d);return!0};f&&(k=h[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(k,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);u&&(h.reset(),(h=h[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(h,d?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));
return!(!f&&!u)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var d=this.startContainer,f=d.getChild(this.startOffset);f?a.insertBefore(f):d.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,d){this.setStartAt(a,d);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,
a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(a,d){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(d=a.getIndex(),a=a.getParent());this._setStartContainer(a);this.startOffset=d;this.endContainer||(this._setEndContainer(a),this.endOffset=d);b(this)},setEnd:function(a,d){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(d=a.getIndex()+1,a=a.getParent());this._setEndContainer(a);this.endOffset=d;this.startContainer||(this._setStartContainer(a),
this.startOffset=d);b(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(a,d){switch(d){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a,
a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}b(this)},setEndAt:function(a,d){switch(d){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setEnd(a,a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}b(this)},fixBlock:function(a,
d){var f=this.createBookmark(),b=this.document.createElement(d);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(b);b.trim();this.insertNode(b);var e=b.getBogus();e&&e.remove();b.appendBogus();this.moveToBookmark(f);return b},splitBlock:function(a,d){var f=new CKEDITOR.dom.elementPath(this.startContainer,this.root),b=new CKEDITOR.dom.elementPath(this.endContainer,this.root),e=f.block,h=b.block,k=null;if(!f.blockLimit.equals(b.blockLimit))return null;"br"!=
a&&(e||(e=this.fixBlock(!0,a),h=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),h||(h=this.fixBlock(!1,a)));f=e&&this.checkStartOfBlock();b=h&&this.checkEndOfBlock();this.deleteContents();e&&e.equals(h)&&(b?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(h,CKEDITOR.POSITION_AFTER_END),h=null):f?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e=null):(h=this.splitElement(e,d||
!1),e.is("ul","ol")||e.appendBogus()));return{previousBlock:e,nextBlock:h,wasStartOfBlock:f,wasEndOfBlock:b,elementPath:k}},splitElement:function(a,d){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var f=this.extractContents(!1,d||!1),b=a.clone(!1,d||!1);f.appendTo(b);b.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return b},removeEmptyBlocksAtEnd:function(){function a(c){return function(a){return d(a)||f(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||
c.is("table")&&a.is("caption")?!1:!0}}var d=CKEDITOR.dom.walker.whitespaces(),f=CKEDITOR.dom.walker.bookmark(!1);return function(d){for(var f=this.createBookmark(),b=this[d?"endPath":"startPath"](),e=b.block||b.blockLimit,h;e&&!e.equals(b.root)&&!e.getFirst(a(e));)h=e.getParent(),this[d?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END),e.remove(1),e=h;this.moveToBookmark(f)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,
this.root)},checkBoundaryOfElement:function(c,d){var f=d==CKEDITOR.START,b=this.clone();b.collapse(f);b[f?"setStartAt":"setEndAt"](c,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);b=new CKEDITOR.dom.walker(b);b.evaluator=a(f);return b[f?"checkBackward":"checkForward"]()},checkStartOfBlock:function(a){var d=this.startContainer,f=this.startOffset;CKEDITOR.env.ie&&f&&d.type==CKEDITOR.NODE_TEXT&&(d=CKEDITOR.tools.ltrim(d.substring(0,f)),l.test(d)&&this.trim(0,1));a||this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,
this.root);d=this.clone();d.collapse(!0);d.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(d);a.evaluator=e();return a.checkBackward()},checkEndOfBlock:function(a){var d=this.endContainer,f=this.endOffset;CKEDITOR.env.ie&&d.type==CKEDITOR.NODE_TEXT&&(d=CKEDITOR.tools.rtrim(d.substring(f)),l.test(d)&&this.trim(1,0));a||this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);d=this.clone();d.collapse(!1);d.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);
a=new CKEDITOR.dom.walker(d);a.evaluator=e();return a.checkForward()},getPreviousNode:function(a,d,f){var b=this.clone();b.collapse(1);b.setStartAt(f||this.root,CKEDITOR.POSITION_AFTER_START);f=new CKEDITOR.dom.walker(b);f.evaluator=a;f.guard=d;return f.previous()},getNextNode:function(a,d,f){var b=this.clone();b.collapse();b.setEndAt(f||this.root,CKEDITOR.POSITION_BEFORE_END);f=new CKEDITOR.dom.walker(b);f.evaluator=a;f.guard=d;return f.next()},checkReadOnly:function(){function a(c,d){for(;c;){if(c.type==
CKEDITOR.NODE_ELEMENT){if("false"==c.getAttribute("contentEditable")&&!c.data("cke-editable"))return 0;if(c.is("html")||"true"==c.getAttribute("contentEditable")&&(c.contains(d)||c.equals(d)))break}c=c.getParent()}return 1}return function(){var d=this.startContainer,f=this.endContainer;return!(a(d,f)&&a(f,d))}}(),moveToElementEditablePosition:function(a,d){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,d?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),
!0;for(var b=0;a;){if(a.type==CKEDITOR.NODE_TEXT){d&&this.endContainer&&this.checkEndOfBlock()&&l.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,d?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);b=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,d?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),b=1;else if(d&&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 e=a,h=b,k=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(!1)&&(k=e[d?"getLast":"getFirst"](f));h||k||(k=e[d?"getPrevious":"getNext"](f));a=k}return!!b},moveToClosestEditablePosition:function(a,d){var f,b=0,e,h,k=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(f=new CKEDITOR.dom.range(this.root),f.moveToPosition(a,k[d?0:1])):f=this.clone();if(a&&
!a.is(CKEDITOR.dtd.$block))b=1;else if(e=f[d?"getNextEditableNode":"getPreviousEditableNode"]())b=1,(h=e.type==CKEDITOR.NODE_ELEMENT)&&e.is(CKEDITOR.dtd.$block)&&"false"==e.getAttribute("contenteditable")?(f.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),f.setEndAt(e,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&h&&e.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(f.setEnd(e,0),f.collapse()):f.moveToPosition(e,k[d?1:0]);b&&this.moveToRange(f);return!!b},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),d=CKEDITOR.dom.walker.bookmark(!1,!0),f=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return f(a)&&d(a)};var b=a.next();a.reset();return b&&b.equals(a.previous())?b: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:h(),getPreviousEditableNode:h(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var d=this.getTouchedStartNode(),f=this.getTouchedEndNode(),b=d.getAscendant("table",!0),f=f.getAscendant("table",!0);return b&&!this.root.contains(b)?
null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):b&&f&&(b.equals(f)||b.contains(f)||f.contains(b))?d.getAscendant(a,!0):null},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),d,f,b,e=this.clone();e.optimize();(b=e.startContainer.type==CKEDITOR.NODE_TEXT)?(f=e.startContainer.getText(),d=e.startContainer.split(e.startOffset),a.insertAfter(e.startContainer)):e.insertNode(a);a.scrollIntoView();b&&(e.startContainer.setText(f),
d.remove());a.remove()},getClientRects:function(){function a(c,d){var f=CKEDITOR.tools.array.map(c,function(a){return a}),b=new CKEDITOR.dom.range(d.root),e,h,k;d.startContainer instanceof CKEDITOR.dom.element&&(h=0===d.startOffset&&d.startContainer.hasAttribute("data-widget"));d.endContainer instanceof CKEDITOR.dom.element&&(k=(k=d.endOffset===(d.endContainer.getChildCount?d.endContainer.getChildCount():d.endContainer.length))&&d.endContainer.hasAttribute("data-widget"));h&&b.setStart(d.startContainer.getParent(),
d.startContainer.getIndex());k&&b.setEnd(d.endContainer.getParent(),d.endContainer.getIndex()+1);if(h||k)d=b;b=d.cloneContents().find("[data-cke-widget-id]").toArray();if(b=CKEDITOR.tools.array.map(b,function(a){var c=d.root.editor;a=a.getAttribute("data-cke-widget-id");return c.widgets.instances[a].element}))return b=CKEDITOR.tools.array.map(b,function(a){var c;c=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;e=this.root.getDocument().$.createRange();e.setStart(c.getParent().$,c.getIndex());
e.setEnd(c.getParent().$,c.getIndex()+1);c=e.getClientRects();c.widgetRect=a.getClientRect();return c},d),CKEDITOR.tools.array.forEach(b,function(a){function c(b){CKEDITOR.tools.array.forEach(f,function(c,e){var h=CKEDITOR.tools.objectCompare(a[b],c);h||(h=CKEDITOR.tools.objectCompare(a.widgetRect,c));h&&(Array.prototype.splice.call(f,e,a.length-b,a.widgetRect),d=!0)});d||(b<f.length-1?c(b+1):f.push(a.widgetRect))}var d;c(0)}),f}function d(a,c,f){var e;c.collapsed?f.startContainer instanceof CKEDITOR.dom.element?
(a=f.checkStartOfBlock(),e=new CKEDITOR.dom.text("​"),a?f.startContainer.append(e,!0):0===f.startOffset?e.insertBefore(f.startContainer.getFirst()):(f=f.startContainer.getChildren().getItem(f.startOffset-1),e.insertAfter(f)),c.setStart(e.$,0),c.setEnd(e.$,0),a=c.getClientRects(),e.remove()):f.startContainer instanceof CKEDITOR.dom.text&&(""===f.startContainer.getText()?(f.startContainer.setText("​"),a=c.getClientRects(),f.startContainer.setText("")):a=[b(f.createBookmark())]):a=[b(f.createBookmark())];
return a}function f(a,c,d){a=CKEDITOR.tools.extend({},a);c&&(a=CKEDITOR.tools.getAbsoluteRectPosition(d.document.getWindow(),a));!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a}function b(a){var c=a.startNode;a=a.endNode;var d;c.setText("​");c.removeStyle("display");a?(a.setText("​"),a.removeStyle("display"),d=[c.getClientRect(),a.getClientRect()],a.remove()):d=[c.getClientRect(),c.getClientRect()];c.remove();return{right:Math.max(d[0].right,d[1].right),bottom:Math.max(d[0].bottom,
d[1].bottom),left:Math.min(d[0].left,d[1].left),top:Math.min(d[0].top,d[1].top),width:Math.abs(d[0].left-d[1].left),height:Math.max(d[0].bottom,d[1].bottom)-Math.min(d[0].top,d[1].top)}}return void 0!==document.getSelection?function(b){var e=this.root.getDocument().$.createRange(),h;e.setStart(this.startContainer.$,this.startOffset);e.setEnd(this.endContainer.$,this.endOffset);h=e.getClientRects();h=a(h,this);h.length||(h=d(h,e,this));return CKEDITOR.tools.array.map(h,function(a){return f(a,b,this)},
this)}:function(a){return[f(b(this.createBookmark()),a,this)]}}(),_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,d){var f=this.getCommonAncestor(),b=this.getBoundaryNodes(),e=[],h,k,g,m;if(f&&f.find)for(k=f.find(a),h=0;h<k.count();h++)if(f=k.getItem(h),d||!f.isReadOnly())g=f.getPosition(b.startNode)&CKEDITOR.POSITION_FOLLOWING||b.startNode.equals(f),m=f.getPosition(b.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||
b.endNode.equals(f),g&&m&&e.push(f);return e}};CKEDITOR.dom.range.mergeRanges=function(a){return CKEDITOR.tools.array.reduce(a,function(a,c){var d=a[a.length-1],f=!1;c=c.clone();c.enlarge(CKEDITOR.ENLARGE_ELEMENT);if(d){var b=new CKEDITOR.dom.range(c.root),f=new CKEDITOR.dom.walker(b),e=CKEDITOR.dom.walker.whitespaces();b.setStart(d.endContainer,d.endOffset);b.setEnd(c.startContainer,c.startOffset);for(b=f.next();e(b)||c.endContainer.equals(b);)b=f.next();f=!b}f?d.setEnd(c.endContainer,c.endOffset):
a.push(c);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 g(a){var c=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return c.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return c}function e(a,c,d,b){a:{null==b&&(b=g(d));for(var h;h=b.shift();)if(h.getDtd().p){b={element:h,remaining:b};break a}b=null}if(!b)return 0;if((h=CKEDITOR.filter.instances[b.element.data("cke-filter")])&&!h.check(c))return e(a,c,d,b.remaining);c=new CKEDITOR.dom.range(b.element);c.selectNodeContents(b.element);c=c.createIterator();c.enlargeBr=
a.enlargeBr;c.enforceRealBlocks=a.enforceRealBlocks;c.activeFilter=c.filter=h;a._.nestedEditable={element:b.element,container:d,remaining:b.remaining,iterator:c};return 1}function a(a,c,d){if(!c)return!1;a=a.clone();a.collapse(!d);return a.checkBoundaryOfElement(c,d?CKEDITOR.START:CKEDITOR.END)}var h=/^[\r\n\t ]+$/,k=CKEDITOR.dom.walker.bookmark(!1,!0),m=CKEDITOR.dom.walker.whitespaces(!0),l=function(a){return k(a)&&m(a)},d={dd:1,dt:1,li:1};b.prototype={getNextParagraph:function(f){var c,b,g,m,q;
f=f||"p";if(this._.nestedEditable){if(c=this._.nestedEditable.iterator.getNextParagraph(f))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,c;this.activeFilter=this.filter;if(e(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 t=this.range.clone();
b=t.startPath();var r=t.endPath(),A=!t.collapsed&&a(t,b.block),v=!t.collapsed&&a(t,r.block,1);t.shrink(CKEDITOR.SHRINK_ELEMENT,!0);A&&t.setStartAt(b.block,CKEDITOR.POSITION_BEFORE_END);v&&t.setEndAt(r.block,CKEDITOR.POSITION_AFTER_START);b=t.endContainer.hasAscendant("pre",!0)||t.startContainer.hasAscendant("pre",!0);t.enlarge(this.forceBrBreak&&!b||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);t.collapsed||(b=new CKEDITOR.dom.walker(t.clone()),r=CKEDITOR.dom.walker.bookmark(!0,
!0),b.evaluator=r,this._.nextNode=b.next(),b=new CKEDITOR.dom.walker(t.clone()),b.evaluator=r,b=b.previous(),this._.lastNode=b.getNextSourceNode(!0,null,t.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(r=this.range.clone(),r.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),r.checkEndOfBlock()&&(r=new CKEDITOR.dom.elementPath(r.endContainer,r.root),this._.lastNode=(r.block||
r.blockLimit).getNextSourceNode(!0))),this._.lastNode&&t.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=t.document.createText(""),this._.lastNode.insertAfter(b)),t=null);this._.started=1;b=t}r=this._.nextNode;t=this._.lastNode;for(this._.nextNode=null;r;){var A=0,v=r.hasAscendant("pre"),z=r.type!=CKEDITOR.NODE_ELEMENT,u=0;if(z)r.type==CKEDITOR.NODE_TEXT&&h.test(r.getText())&&(z=0);else{var p=r.getName();if(CKEDITOR.dtd.$block[p]&&"false"==r.getAttribute("contenteditable")){c=
r;e(this,f,c);break}else if(r.isBlockBoundary(this.forceBrBreak&&!v&&{br:1})){if("br"==p)z=1;else if(!b&&!r.getChildCount()&&"hr"!=p){c=r;g=r.equals(t);break}b&&(b.setEndAt(r,CKEDITOR.POSITION_BEFORE_START),"br"!=p&&(this._.nextNode=r));A=1}else{if(r.getFirst()){b||(b=this.range.clone(),b.setStartAt(r,CKEDITOR.POSITION_BEFORE_START));r=r.getFirst();continue}z=1}}z&&!b&&(b=this.range.clone(),b.setStartAt(r,CKEDITOR.POSITION_BEFORE_START));g=(!A||z)&&r.equals(t);if(b&&!A)for(;!r.getNext(l)&&!g;){p=
r.getParent();if(p.isBlockBoundary(this.forceBrBreak&&!v&&{br:1})){A=1;z=0;g||p.equals(t);b.setEndAt(p,CKEDITOR.POSITION_BEFORE_END);break}r=p;z=1;g=r.equals(t);u=1}z&&b.setEndAt(r,CKEDITOR.POSITION_AFTER_END);r=this._getNextSourceNode(r,u,t);if((g=!r)||A&&b)break}if(!c){if(!b)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;c=new CKEDITOR.dom.elementPath(b.startContainer,b.root);r=c.blockLimit;A={div:1,th:1,td:1};c=c.block;!c&&r&&!this.enforceRealBlocks&&A[r.getName()]&&
b.checkStartOfBlock()&&b.checkEndOfBlock()&&!r.equals(b.root)?c=r:!c||this.enforceRealBlocks&&c.is(d)?(c=this.range.document.createElement(f),b.extractContents().appendTo(c),c.trim(),b.insertNode(c),m=q=!0):"li"!=c.getName()?b.checkStartOfBlock()&&b.checkEndOfBlock()||(c=c.clone(!1),b.extractContents().appendTo(c),c.trim(),q=b.splitBlock(),m=!q.wasStartOfBlock,q=!q.wasEndOfBlock,b.insertNode(c)):g||(this._.nextNode=c.equals(t)?null:this._getNextSourceNode(b.getBoundaryNodes().endNode,1,t))}m&&(m=
c.getPrevious())&&m.type==CKEDITOR.NODE_ELEMENT&&("br"==m.getName()?m.remove():m.getLast()&&"br"==m.getLast().$.nodeName.toLowerCase()&&m.getLast().remove());q&&(m=c.getLast())&&m.type==CKEDITOR.NODE_ELEMENT&&"br"==m.getName()&&(!CKEDITOR.env.needsBrFiller||m.getPrevious(k)||m.getNext(k))&&m.remove();this._.nextNode||(this._.nextNode=g||c.equals(t)||!t?null:this._getNextSourceNode(c,1,t));return c},_getNextSourceNode:function(a,c,d){function b(a){return!(a.equals(d)||a.equals(e))}var e=this.range.root;
for(a=a.getNextSourceNode(c,null,b);!k(a);)a=a.getNextSourceNode(c,null,b);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new b(this)}}(),CKEDITOR.command=function(b,g){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!==g.exec.call(this,b,a)};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!b.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:b})?!0:g.refresh&&!1!==g.refresh.apply(this,arguments)};var e;this.checkAllowed=function(a){return a||"boolean"!=typeof e?e=b.activeFilter.checkFeature(this):e};CKEDITOR.tools.extend(this,g,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!g.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,c,d,f,b){var e,h;a=[];for(e in c){h=c[e];h="boolean"==typeof h?{}:"function"==typeof h?{match:h}:D(h);"$"!=e.charAt(0)&&(h.elements=e);d&&(h.featureName=d.toLowerCase());var k=h;k.elements=m(k.elements,/\s+/)||null;k.propertiesOnly=k.propertiesOnly||!0===k.elements;var g=/\s*,\s*/,F=void 0;for(F in P){k[F]=
m(k[F],g)||null;var n=k,r=M[F],H=m(k[M[F]],g),G=k[F],x=[],L=!0,l=void 0;H?L=!1:H={};for(l in G)"!"==l.charAt(0)&&(l=l.slice(1),x.push(l),H[l]=!0,L=!1);for(;l=x.pop();)G[l]=G["!"+l],delete G["!"+l];n[r]=(L?!1:H)||null}k.match=k.match||null;f.push(h);a.push(h)}c=b.elements;b=b.generic;var N;d=0;for(f=a.length;d<f;++d){e=D(a[d]);h=!0===e.classes||!0===e.styles||!0===e.attributes;k=e;F=r=g=void 0;for(g in P)k[g]=A(k[g]);n=!0;for(F in M){g=M[F];r=k[g];H=[];G=void 0;for(G in r)-1<G.indexOf("*")?H.push(new RegExp("^"+
G.replace(/\*/g,".*")+"$")):H.push(G);r=H;r.length&&(k[g]=r,n=!1)}k.nothingRequired=n;k.noProperties=!(k.attributes||k.classes||k.styles);if(!0===e.elements||null===e.elements)b[h?"unshift":"push"](e);else for(N in k=e.elements,delete e.elements,k)if(c[N])c[N][h?"unshift":"push"](e);else c[N]=[e]}}function g(a,c,d,f){if(!a.match||a.match(c))if(f||l(a,c))if(a.propertiesOnly||(d.valid=!0),d.allAttributes||(d.allAttributes=e(a.attributes,c.attributes,d.validAttributes)),d.allStyles||(d.allStyles=e(a.styles,
c.styles,d.validStyles)),!d.allClasses){a=a.classes;c=c.classes;f=d.validClasses;if(a)if(!0===a)a=!0;else{for(var b=0,h=c.length,k;b<h;++b)k=c[b],f[k]||(f[k]=a(k));a=!1}else a=!1;d.allClasses=a}}function e(a,c,d){if(!a)return!1;if(!0===a)return!0;for(var f in c)d[f]||(d[f]=a(f));return!1}function a(a,c,d){if(!a.match||a.match(c)){if(a.noProperties)return!1;d.hadInvalidAttribute=h(a.attributes,c.attributes)||d.hadInvalidAttribute;d.hadInvalidStyle=h(a.styles,c.styles)||d.hadInvalidStyle;a=a.classes;
c=c.classes;if(a){for(var f=!1,b=!0===a,e=c.length;e--;)if(b||a(c[e]))c.splice(e,1),f=!0;a=f}else a=!1;d.hadInvalidClass=a||d.hadInvalidClass}}function h(a,c){if(!a)return!1;var d=!1,f=!0===a,b;for(b in c)if(f||a(b))delete c[b],d=!0;return d}function k(a,c,d){if(a.disabled||a.customConfig&&!d||!c)return!1;a._.cachedChecks={};return!0}function m(a,c){if(!a)return!1;if(!0===a)return a;if("string"==typeof a)return a=G(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(c));if(CKEDITOR.tools.isArray(a))return a.length?
CKEDITOR.tools.convertArrayToObject(a):!1;var d={},f=0,b;for(b in a)d[b]=a[b],f++;return f?d:!1}function l(a,c){if(a.nothingRequired)return!0;var f,b,e,h;if(e=a.requiredClasses)for(h=c.classes,f=0;f<e.length;++f)if(b=e[f],"string"==typeof b){if(-1==CKEDITOR.tools.indexOf(h,b))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(h,b))return!1;return d(c.styles,a.requiredStyles)&&d(c.attributes,a.requiredAttributes)}function d(a,c){if(!c)return!0;for(var d=0,f;d<c.length;++d)if(f=c[d],"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 c={};a.length;)c[a.shift()]="cke-test";return c}function c(a){var c,d,f,b,e={},h=1;for(a=G(a);c=a.match(K);)(d=c[2])?(f=n(d,"styles"),b=n(d,"attrs"),d=n(d,"classes")):f=b=d=null,e["$"+h++]={elements:c[1],classes:d,styles:f,attributes:b},a=a.slice(c[0].length);return e}function n(a,c){var d=a.match(Q[c]);return d?G(d[1]):null}
function x(a){var c=a.styleBackup=a.attributes.style,d=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(c||"",1));a.classes||(a.classes=d?d.split(/\s+/):[])}function y(c,d,f,b){var e=0,h;b.toHtml&&(d.name=d.name.replace(H,"$1"));if(b.doCallbacks&&c.elementCallbacks){a:{h=c.elementCallbacks;for(var k=0,n=h.length,m;k<n;++k)if(m=h[k](d)){h=m;break a}h=void 0}if(h)return h}if(b.doTransform&&(h=c._.transformations[d.name])){x(d);for(k=0;k<h.length;++k)p(c,d,h[k]);t(d)}if(b.doFilter){a:{k=
d.name;n=c._;c=n.allowedRules.elements[k];h=n.allowedRules.generic;k=n.disallowedRules.elements[k];n=n.disallowedRules.generic;m=b.skipRequired;var G={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},D,l;if(c||h){x(d);if(k)for(D=0,l=k.length;D<l;++D)if(!1===a(k[D],d,G)){c=null;break a}if(n)for(D=0,l=n.length;D<l;++D)a(n[D],d,G);if(c)for(D=0,l=c.length;D<l;++D)g(c[D],d,G,m);if(h)for(D=
0,l=h.length;D<l;++D)g(h[D],d,G,m);c=G}else c=null}if(!c||!c.valid)return f.push(d),1;l=c.validAttributes;var N=c.validStyles;h=c.validClasses;var k=d.attributes,E=d.styles,n=d.classes;m=d.classBackup;var J=d.styleBackup,L,K,I=[],G=[],B=/^data-cke-/;D=!1;delete k.style;delete k["class"];delete d.classBackup;delete d.styleBackup;if(!c.allAttributes)for(L in k)l[L]||(B.test(L)?L==(K=L.replace(/^data-cke-saved-/,""))||l[K]||(delete k[L],D=!0):(delete k[L],D=!0));if(!c.allStyles||c.hadInvalidStyle){for(L in E)c.allStyles||
N[L]?I.push(L+":"+E[L]):D=!0;I.length&&(k.style=I.sort().join("; "))}else J&&(k.style=J);if(!c.allClasses||c.hadInvalidClass){for(L=0;L<n.length;++L)(c.allClasses||h[n[L]])&&G.push(n[L]);G.length&&(k["class"]=G.sort().join(" "));m&&G.length<m.split(/\s+/).length&&(D=!0)}else m&&(k["class"]=m);D&&(e=1);if(!b.skipFinalValidation&&!r(d))return f.push(d),1}b.toHtml&&(d.name=d.name.replace(F,"cke:$1"));return e}function q(a){var c=[],d;for(d in a)-1<d.indexOf("*")&&c.push(d.replace(/\*/g,".*"));return c.length?
new RegExp("^(?:"+c.join("|")+")$"):null}function t(a){var c=a.attributes,d;delete c.style;delete c["class"];if(d=CKEDITOR.tools.writeCssText(a.styles,!0))c.style=d;a.classes.length&&(c["class"]=a.classes.sort().join(" "))}function r(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 A(a){if(!a)return!1;if(!0===a)return!0;var c=q(a);return function(d){return d in a||c&&d.match(c)}}function v(){return new CKEDITOR.htmlParser.element("br")}
function z(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==a.name||E.$block[a.name])}function u(a,c,d){var f=a.name;if(E.$empty[f]||!a.children.length)"hr"==f&&"br"==c?a.replaceWith(v()):(a.parent&&d.push({check:"it",el:a.parent}),a.remove());else if(E.$block[f]||"tr"==f)if("br"==c)a.previous&&!z(a.previous)&&(c=v(),c.insertBefore(a)),a.next&&!z(a.next)&&(c=v(),c.insertAfter(a)),a.replaceWithChildren();else{var f=a.children,b;b:{b=E[c];for(var e=0,h=f.length,k;e<h;++e)if(k=f[e],k.type==CKEDITOR.NODE_ELEMENT&&
!b[k.name]){b=!1;break b}b=!0}if(b)a.name=c,a.attributes={},d.push({check:"parent-down",el:a});else{b=a.parent;for(var e=b.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==b.name,g,F,h=f.length;0<h;)k=f[--h],e&&(k.type==CKEDITOR.NODE_TEXT||k.type==CKEDITOR.NODE_ELEMENT&&E.$inline[k.name])?(g||(g=new CKEDITOR.htmlParser.element(c),g.insertAfter(a),d.push({check:"parent-down",el:g})),g.add(k,0)):(g=null,F=E[b.name]||E.span,k.insertAfter(a),b.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||k.type!=CKEDITOR.NODE_ELEMENT||
F[k.name]||d.push({check:"el-up",el:k}));a.remove()}}else f in{style:1,script:1}?a.remove():(a.parent&&d.push({check:"it",el:a.parent}),a.replaceWithChildren())}function p(a,c,d){var f,b;for(f=0;f<d.length;++f)if(b=d[f],!(b.check&&!a.check(b.check,!1)||b.left&&!b.left(c))){b.right(c,N);break}}function w(a,c){var d=c.getDefinition(),f=d.attributes,b=d.styles,e,h,k,g;if(a.name!=d.element)return!1;for(e in f)if("class"==e)for(d=f[e].split(/\s+/),k=a.classes.join("|");g=d.pop();){if(-1==k.indexOf(g))return!1}else if(a.attributes[e]!=
f[e])return!1;for(h in b)if(a.styles[h]!=b[h])return!1;return!0}function C(a,c){var d,f;"string"==typeof a?d=a:a instanceof CKEDITOR.style?f=a:(d=a[0],f=a[1]);return[{element:d,left:f,right:function(a,d){d.transform(a,c)}}]}function J(a){return function(c){return w(c,a)}}function B(a){return function(c,d){d[a](c)}}var E=CKEDITOR.dtd,D=CKEDITOR.tools.copy,G=CKEDITOR.tools.trim,I=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a,c){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 d=this.editor=a instanceof CKEDITOR.editor?a:null;if(d&&!c){this.customConfig=!0;var f=d.config.allowedContent;!0===f?this.disabled=!0:(f||(this.customConfig=!1),this.allow(f,"config",1),this.allow(d.config.extraAllowedContent,
"extra",1),this.allow(I[d.enterMode]+" "+I[d.shiftEnterMode],"default",1),this.disallow(d.config.disallowedContent))}else this.customConfig=!1,this.allow(c||a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(a,d,f){if(!k(this,a,f))return!1;var e,h;if("string"==typeof a)a=c(a);else if(a instanceof CKEDITOR.style){if(a.toAllowedContentRules)return this.allow(a.toAllowedContentRules(this.editor),d,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=D(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)h=this.allow(a[e],d,f);return h}b(this,a,d,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,c,d,f){if(this.disabled)return!1;var b=this,e=[],h=this.editor&&this.editor.config.protectedSource,
k,g=!1,F={doFilter:!d,doTransform:!0,doCallbacks:!0,toHtml:c};a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1;if(!c||"span"!=a.name||!~CKEDITOR.tools.object.keys(a.attributes).join("|").indexOf("data-cke-"))if(k=y(b,a,e,F),k&1)g=!0;else if(k&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var d;a:{var f=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));d=[];var n,m,r;if(h)for(m=0;m<
h.length;++m)if((r=f.match(h[m]))&&r[0].length==f.length){d=!0;break a}f=CKEDITOR.htmlParser.fragment.fromHtml(f);1==f.children.length&&(n=f.children[0]).type==CKEDITOR.NODE_ELEMENT&&y(b,n,d,F);d=!d.length}d||e.push(a)}},null,!0);e.length&&(g=!0);var n;a=[];f=I[f||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var m;d=e.pop();)d.type==CKEDITOR.NODE_ELEMENT?u(d,f,a):d.remove();for(;n=a.pop();)if(d=n.el,d.parent)switch(m=E[d.parent.name]||E.span,n.check){case "it":E.$removeEmpty[d.name]&&
!d.children.length?u(d,f,a):r(d)||u(d,f,a);break;case "el-up":d.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||m[d.name]||u(d,f,a);break;case "parent-down":d.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||m[d.name]||u(d.parent,f,a)}return g},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(!k(this,a,!0))return!1;"string"==typeof a&&(a=
c(a));b(this,a,null,this.disallowedContent,this._.disallowedRules);return!0},addContentForms:function(a){if(!this.disabled&&a){var c,d,f=[],b;for(c=0;c<a.length&&!b;++c)d=a[c],("string"==typeof d||d instanceof CKEDITOR.style)&&this.check(d)&&(b=d);if(b){for(c=0;c<a.length;++c)f.push(C(a[c],b));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 c,d;if(!this.disabled&&a){var f=this._.transformations,b;for(b=0;b<a.length;++b){c=a[b];var e=void 0,h=void 0,k=void 0,g=void 0,F=void 0,n=void 0;d=[];for(h=0;h<c.length;++h)k=c[h],"string"==typeof k?(k=
k.split(/\s*:\s*/),g=k[0],F=null,n=k[1]):(g=k.check,F=k.left,n=k.right),e||(e=k,e=e.element?e.element:g?g.match(/^([a-z0-9]+)/i)[0]:e.left.getDefinition().element),F instanceof CKEDITOR.style&&(F=J(F)),d.push({check:g==e?null:g,left:F,right:"string"==typeof n?B(n):n});c=e;f[c]||(f[c]=[]);f[c].push(d)}}},check:function(a,d,b){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var e=a.length;e--;)if(this.check(a[e],d,b))return!0;return!1}var h,k;if("string"==typeof a){k=a+"\x3c"+(!1===d?"0":
"1")+(b?"1":"0")+"\x3e";if(k in this._.cachedChecks)return this._.cachedChecks[k];h=c(a).$1;var g=h.styles,e=h.classes;h.name=h.elements;h.classes=e=e?e.split(/\s*,\s*/):[];h.styles=f(g);h.attributes=f(h.attributes);h.children=[];e.length&&(h.attributes["class"]=e.join(" "));g&&(h.attributes.style=CKEDITOR.tools.writeCssText(h.styles))}else h=a.getDefinition(),g=h.styles,e=h.attributes||{},g&&!CKEDITOR.tools.isEmpty(g)?(g=D(g),e.style=CKEDITOR.tools.writeCssText(g,!0)):g={},h={name:h.element,attributes:e,
classes:e["class"]?e["class"].split(/\s+/):[],styles:g,children:[]};var g=CKEDITOR.tools.clone(h),F=[],n;if(!1!==d&&(n=this._.transformations[h.name])){for(e=0;e<n.length;++e)p(this,h,n[e]);t(h)}y(this,g,F,{doFilter:!0,doTransform:!1!==d,skipRequired:!b,skipFinalValidation:!b});0<F.length?b=!1:((d=h.attributes["class"])&&(h.attributes["class"]=h.attributes["class"].split(" ").sort().join(" ")),b=CKEDITOR.tools.objectCompare(h.attributes,g.attributes,!0),d&&(h.attributes["class"]=d));"string"==typeof a&&
(this._.cachedChecks[k]=b);return b},getAllowedEnterMode:function(){var a=["p","div","br"],c={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(d,f){var b=a.slice(),e;if(this.check(I[d]))return d;for(f||(b=b.reverse());e=b.pop();)if(this.check(e))return c[e];return CKEDITOR.ENTER_BR}}(),clone:function(){var a=new CKEDITOR.filter,c=CKEDITOR.tools.clone;a.allowedContent=c(this.allowedContent);a._.allowedRules=c(this._.allowedRules);a.disallowedContent=c(this.disallowedContent);
a._.disallowedRules=c(this._.disallowedRules);a._.transformations=c(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 P={styles:1,attributes:1,classes:1},M={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},K=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,
Q={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},H=/^cke:(object|embed|param)$/,F=/^(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,c,d){d=d||c;if(!(d in a.styles)){var f=a.attributes[c];f&&(/^\d+$/.test(f)&&(f+="px"),a.styles[d]=f)}delete a.attributes[c]},
lengthToAttribute:function(a,c,d){d=d||c;if(!(d in a.attributes)){var f=a.styles[c],b=f&&f.match(/^(\d+)(?:\.\d*)?px$/);b?a.attributes[d]=b[1]:"cke-test"==f&&(a.attributes[d]="cke-test")}delete a.styles[c]},alignmentToStyle:function(a){if(!("float"in a.styles)){var c=a.attributes.align;if("left"==c||"right"==c)a.styles["float"]=c}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in a.attributes)){var c=a.styles["float"];if("left"==c||"right"==c)a.attributes.align=c}delete a.styles["float"]},
splitBorderShorthand:function(a){if(a.styles.border){var c=CKEDITOR.tools.style.parse.border(a.styles.border);c.color&&(a.styles["border-color"]=c.color);c.style&&(a.styles["border-style"]=c.style);c.width&&(a.styles["border-width"]=c.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 c(f){a.styles["margin-top"]=d[f[0]];a.styles["margin-right"]=d[f[1]];a.styles["margin-bottom"]=d[f[2]];a.styles["margin-left"]=d[f[3]]}if(a.styles.margin){var d=a.styles.margin.match(/(auto|0|(?:\-?[\.\d]+(?:\w+|%)))/g)||["0px"];switch(d.length){case 1:c([0,0,0,0]);break;case 2:c([0,1,0,
1]);break;case 3:c([0,1,2,1]);break;case 4:c([0,1,2,3])}delete a.styles.margin}},matchesStyle:w,transform:function(a,c){if("string"==typeof c)a.name=c;else{var d=c.getDefinition(),f=d.styles,b=d.attributes,e,h,k,g;a.name=d.element;for(e in b)if("class"==e)for(d=a.classes.join("|"),k=b[e].split(/\s+/);g=k.pop();)-1==d.indexOf(g)&&a.classes.push(g);else a.attributes[e]=b[e];for(h in f)a.styles[h]=f[h]}}}}(),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 g(){if(this.hasFocus){this.hasFocus=
!1;var a=this._.editor.container;a&&a.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var e=CKEDITOR.focusManager._.blurDelay;b||!e?g.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;g.call(this)},e,this)}},add:function(b,g){var e=b.getCustomData("focusmanager");if(!e||e!=this){e&&e.remove(b);var e="focus",a="blur";g&&(CKEDITOR.env.ie?(e="focusin",a="focusout"):CKEDITOR.event.useCapture=1);var h={blur:function(){b.equals(this.currentActive)&&
this.blur()},focus:function(){this.focus(b)}};b.on(e,h.focus,this);b.on(a,h.blur,this);g&&(CKEDITOR.event.useCapture=0);b.setCustomData("focusmanager",this);b.setCustomData("focusmanager_handlers",h)}},remove:function(b){b.removeCustomData("focusmanager");var g=b.removeCustomData("focusmanager_handlers");b.removeListener("blur",g.blur);b.removeListener("focus",g.focus)}}}(),CKEDITOR.keystrokeHandler=function(b){if(b.keystrokeHandler)return b.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes=
{};this._={editor:b};return this},function(){var b,g=function(a){a=a.data;var e=a.getKeystroke(),k=this.keystrokes[e],g=this._.editor;b=!1===g.fire("key",{keyCode:e,domEvent:a});b||(k&&(b=!1!==g.execCommand(k,{from:"keystrokeHandler"})),b||(b=!!this.blockedKeystrokes[e]));b&&a.preventDefault(!0);return!b},e=function(a){b&&(b=!1,a.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",g,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",e,this)}}}(),
function(){CKEDITOR.lang={languages:{af:1,ar:1,az:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,oc:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(b,g,e){b&&CKEDITOR.lang.languages[b]||
(b=this.detect(g,b));var a=this;g=function(){a[b].dir=a.rtl[b]?"rtl":"ltr";e(b,a[b])};this[b]?g():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+b+".js"),g,this)},detect:function(b,g){var e=this.languages;g=g||navigator.userLanguage||navigator.language||b;var a=g.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),h=a[1],a=a[2];e[h+"-"+a]?h=h+"-"+a:e[h]||(h=null);CKEDITOR.lang.detect=h?function(){return h}:function(a){return a};return h||b}}}(),CKEDITOR.scriptLoader=function(){var b={},g={};return{load:function(e,
a,h,k){var m="string"==typeof e;m&&(e=[e]);h||(h=CKEDITOR);var l=e.length,d=l,f=[],c=[],n=function(d){a&&(m?a.call(h,d):a.call(h,f,c))};if(0===d)n(!0);else{var x=function(a,b){(b?f:c).push(a);0>=--d&&(k&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),n(b))},y=function(a,c){b[a]=1;var d=g[a];delete g[a];for(var f=0;f<d.length;f++)d[f](a,c)},q=function(c){if(b[c])x(c,!0);else{var d=g[c]||(g[c]=[]);d.push(x);if(!(1<d.length)){var f=new CKEDITOR.dom.element("script");f.setAttributes({type:"text/javascript",
src:c});a&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?f.$.onreadystatechange=function(){if("loaded"==f.$.readyState||"complete"==f.$.readyState)f.$.onreadystatechange=null,y(c,!0)}:(f.$.onload=function(){setTimeout(function(){f.$.onload=null;f.$.onerror=null;y(c,!0)},0)},f.$.onerror=function(){f.$.onload=null;f.$.onerror=null;y(c,!1)}));f.appendTo(CKEDITOR.document.getHead())}}};k&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var t=0;t<l;t++)q(e[t])}},
queue:function(){function b(){var e;(e=a[0])&&this.load(e.scriptUrl,e.callback,CKEDITOR,0)}var a=[];return function(h,k){var g=this;a.push({scriptUrl:h,callback:function(){k&&k.apply(this,arguments);a.shift();b.call(g)}});1==a.length&&b.call(this)}}()}}(),CKEDITOR.resourceManager=function(b,g){this.basePath=b;this.fileName=g;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}},CKEDITOR.resourceManager.prototype={add:function(b,g){if(this.registered[b])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+
b+'" is already registered.');var e=this.registered[b]=g||{};e.name=b;e.path=this.getPath(b);CKEDITOR.fire(b+CKEDITOR.tools.capitalize(this.fileName)+"Ready",e);return this.get(b)},get:function(b){return this.registered[b]||null},getPath:function(b){var g=this.externals[b];return CKEDITOR.getUrl(g&&g.dir||this.basePath+b+"/")},getFilePath:function(b){var g=this.externals[b];return CKEDITOR.getUrl(this.getPath(b)+(g?g.file:this.fileName+".js"))},addExternal:function(b,g,e){e||(g=g.replace(/[^\/]+$/,
function(a){e=a;return""}));e=e||this.fileName+".js";b=b.split(",");for(var a=0;a<b.length;a++)this.externals[b[a]]={dir:g,file:e}},load:function(b,g,e){CKEDITOR.tools.isArray(b)||(b=b?[b]:[]);for(var a=this.loaded,h=this.registered,k=[],m={},l={},d=0;d<b.length;d++){var f=b[d];if(f)if(a[f]||h[f])l[f]=this.get(f);else{var c=this.getFilePath(f);k.push(c);c in m||(m[c]=[]);m[c].push(f)}}CKEDITOR.scriptLoader.load(k,function(c,d){if(d.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+
m[d[0]].join(",")+'" was not found at "'+d[0]+'".');for(var f=0;f<c.length;f++)for(var b=m[c[f]],h=0;h<b.length;h++){var k=b[h];l[k]=this.get(k);a[k]=1}g.call(e,l)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(b){var g={};return function(e,a,h){var k={},m=function(e){b.call(this,e,function(d){CKEDITOR.tools.extend(k,d);var f=[],c;for(c in d){var b=d[c],e=b&&b.requires;if(!g[c]){if(b.icons)for(var l=
b.icons.split(","),q=l.length;q--;)CKEDITOR.skin.addIcon(l[q],b.path+"icons/"+(CKEDITOR.env.hidpi&&b.hidpi?"hidpi/":"")+l[q]+".png");b.isSupportedEnvironment=b.isSupportedEnvironment||function(){return!0};g[c]=1}if(e)for(e.split&&(e=e.split(",")),b=0;b<e.length;b++)k[e[b]]||f.push(e[b])}if(f.length)m.call(this,f);else{for(c in k)b=k[c],b.onLoad&&!b.onLoad._called&&(!1===b.onLoad()&&delete k[c],b.onLoad._called=1);a&&a.call(h||window,k)}},this)};m.call(this,e)}}),CKEDITOR.plugins.setLang=function(b,
g,e){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,g)&&a.push(g);b[g]=e},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,g,e){e.name=b.toLowerCase();var a=this.items[b]={type:g,command:e.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(a,e)},get:function(b){return this.instances[b]},
create:function(b){var g=this.items[b],e=g&&this._.handlers[g.type],a=g&&g.command&&this.editor.getCommand(g.command),e=e&&e.create.apply(this,g.args);this.instances[b]=e;a&&a.uiItems.push(e);e&&!e.type&&(e.type=g.type);return e},addHandler:function(b,g){this._.handlers[b]=g},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(c,d,f){CKEDITOR.event.call(this);c=c&&CKEDITOR.tools.clone(c);
if(void 0!==d){if(!(d instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!f)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&f==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!e(d,f))throw Error('The specified element mode is not supported on element: "'+d.getName()+'".');this.element=d;this.elementMode=f;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&
(d.getId()||d.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||g();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){k(this,a.data.path)});this.on("activeFilterChange",
function(){k(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,c)},0,this)}function g(){do var a="editor"+ ++q;while(CKEDITOR.instances[a]);return a}function e(a,c){return c==CKEDITOR.ELEMENT_MODE_INLINE?a.is(CKEDITOR.dtd.$editable)||a.is("textarea"):c==CKEDITOR.ELEMENT_MODE_REPLACE?!a.is(CKEDITOR.dtd.$nonBodyContent):1}function a(){var a=this.commands,c;for(c in a)h(this,a[c])}function h(a,c){c[c.startDisabled?"disable":a.readOnly&&!c.readOnly?"disable":c.modes[a.mode]?"enable":"disable"]()}function k(a,c,d){if(c){var f,b,e=a.commands;
for(b in e)f=e[b],(d||f.contextSensitive)&&f.refresh(a,c)}}function m(a){var c=a.config.customConfig;if(!c)return!1;var c=CKEDITOR.getUrl(c),d=t[c]||(t[c]={});d.fn?(d.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=c&&m(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(c,function(){d.fn=d.fn||CKEDITOR.editorConfig||function(){};m(a)});return!0}function l(a,c){a.on("customConfigLoaded",function(){if(c){if(c.on)for(var f in c.on)a.on(f,c.on[f]);CKEDITOR.tools.extend(a.config,
c,!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);d(a)});c&&null!=c.customConfig&&(a.config.customConfig=c.customConfig);m(a)||a.fireOnce("customConfigLoaded")}function d(a){CKEDITOR.skin.loadPart("editor",
function(){f(a)})}function f(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(d,f){var b=a.config.title,e=a.config.applicationTitle;a.langCode=d;a.lang=CKEDITOR.tools.prototypedCopy(f);a.title="string"==typeof b||!1===b?b:[a.lang.editor,a.name].join(", ");a.applicationTitle="string"==typeof e||!1===e?e:[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");c(a)})}function c(a){a.getStylesSet(function(c){a.once("loaded",function(){a.fire("stylesSet",{styles:c})},null,null,1);n(a)})}function n(a){function c(a){if(!a)return"";CKEDITOR.tools.isArray(a)&&(a=a.join(","));return a.replace(/\s/g,"")}var d=a.config,f=c(d.plugins),b=c(d.extraPlugins),e=c(d.removePlugins);if(b)var h=new RegExp("(?:^|,)(?:"+b.replace(/,/g,"|")+")(?\x3d,|$)","g"),f=f.replace(h,""),f=f+(","+b);if(e)var k=new RegExp("(?:^|,)(?:"+e.replace(/,/g,"|")+
")(?\x3d,|$)","g"),f=f.replace(k,"");CKEDITOR.env.air&&(f+=",adobeair");CKEDITOR.plugins.load(f.split(","),function(c){var f=[],b=[],e=[];a.plugins=CKEDITOR.tools.extend({},a.plugins,c);for(var h in c){var g=c[h],n=g.lang,m=null,l=g.requires,x;CKEDITOR.tools.isArray(l)&&(l=l.join(","));if(l&&(x=l.match(k)))for(;l=x.pop();)CKEDITOR.error("editor-plugin-required",{plugin:l.replace(",",""),requiredBy:h});n&&!a.lang[h]&&(n.split&&(n=n.split(",")),0<=CKEDITOR.tools.indexOf(n,a.langCode)?m=a.langCode:(m=
a.langCode.replace(/-.*/,""),m=m!=a.langCode&&0<=CKEDITOR.tools.indexOf(n,m)?m:0<=CKEDITOR.tools.indexOf(n,"en")?"en":n[0]),g.langEntries&&g.langEntries[m]?(a.lang[h]=g.langEntries[m],m=null):e.push(CKEDITOR.getUrl(g.path+"lang/"+m+".js")));b.push(m);f.push(g)}CKEDITOR.scriptLoader.load(e,function(){if(!a.isDestroyed()&&!a.isDetached()){for(var c=["beforeInit","init","afterInit"],e=0;e<c.length;e++)for(var h=0;h<f.length;h++){var k=f[h];0===e&&b[h]&&k.lang&&k.langEntries&&(a.lang[k.name]=k.langEntries[b[h]]);
if(k[c[e]])k[c[e]](a)}a.fireOnce("pluginsLoaded");d.keystrokes&&a.setKeystroke(a.config.keystrokes);for(h=0;h<a.config.blockedKeystrokes.length;h++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[h]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)}})})}function x(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var c=this.getData();this.config.htmlEncodeOutput&&(c=CKEDITOR.tools.htmlEncode(c));a.is("textarea")?a.setValue(c):
a.setHtml(c);return!0}return!1}function y(a,c){function d(a){var c=a.startContainer,f=a.endContainer,b=c.is&&c.is("tr"),e=c.is&&c.is("td");a=e&&c.equals(f)&&a.endOffset===c.getChildCount();c=e&&1===c.getChildCount()&&"img"===c.getChildren().getItem(0).getName();return b||a&&!c?!0:!1}function f(a){var c=a.startContainer;return c.is("tr")?a.cloneContents():c.clone(!0)}for(var b=new CKEDITOR.dom.documentFragment,e,h,k,g=0;g<a.length;g++){var n=a[g],m=n.startContainer.getAscendant("tr",!0);d(n)?(e||(e=
m.getAscendant("table").clone(),e.append(m.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),b.append(e),e=e.findOne("thead, tbody, tfoot")),h&&h.equals(m)||(h=m,k=m.clone(),e.append(k)),k.append(f(n))):b.append(n.cloneContents())}return e?b:c.getHtmlFromRange(a[0])}b.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=b;var q=0,t={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{plugins:{detectConflict:function(a,c){for(var d=0;d<c.length;d++){var f=c[d];if(this[f])return CKEDITOR.warn("editor-plugin-conflict",
{plugin:a,replacedWith:f}),!0}return!1}},addCommand:function(a,c){c.name=a.toLowerCase();var d=c instanceof CKEDITOR.command?c:new CKEDITOR.command(this,c);this.mode&&h(this,d);return this.commands[a]=d},_attachToForm:function(){function a(c){d.updateElement();d._.required&&!f.getValue()&&!1===d.fire("required")&&c.data.preventDefault()}function c(a){return!!(a&&a.call&&a.apply)}var d=this,f=d.element,b=new CKEDITOR.dom.element(f.$.form);f.is("textarea")&&b&&(b.on("submit",a),c(b.$.submit)&&(b.$.submit=
CKEDITOR.tools.override(b.$.submit,function(c){return function(){a();c.apply?c.apply(this):c()}})),d.on("destroy",function(){b.removeListener("submit",a)}))},destroy:function(a){var c=CKEDITOR.filter.instances,d=this;this.fire("beforeDestroy");!a&&x.call(this);this.editable(null);this.filter&&delete this.filter;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(c),function(a){a=c[a];d===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,c){var d=this.getCommand(a),f={name:a,commandData:c||{},command:d};return d&&d.state!=CKEDITOR.TRISTATE_DISABLED&&!1!==this.fire("beforeCommandExec",f)&&(f.returnValue=
d.exec(f.commandData),!d.async&&!1!==this.fire("afterCommandExec",f))?f.returnValue:!1},getCommand:function(a){return this.commands[a]},getData:function(a){!a&&this.fire("beforeGetData");var c=this._.data;"string"!=typeof c&&(c=(c=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?c.is("textarea")?c.getValue():c.getHtml():"");c={dataValue:c};!a&&this.fire("getData",c);return c.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,c,d){var f=!0,b=c;c&&"object"==typeof c&&(d=c.internal,b=c.callback,f=!c.noSnapshot);!d&&f&&this.fire("saveSnapshot");if(b||!d)this.once("dataReady",function(a){!d&&f&&this.fire("saveSnapshot");b&&b.call(a.editor)});a={dataValue:a};!d&&this.fire("setData",a);this._.data=a.dataValue;!d&&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,c,d){this.fire("insertHtml",{dataValue:a,mode:c,range:d})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",a)},getSelectedHtml:function(a){var c=this.editable(),d=this.getSelection(),d=d&&d.getRanges();if(!c||!d||0===d.length)return null;c=y(d,c);return a?c.getHtml():c},extractSelectedHtml:function(a,
c){var d=this.editable(),f=this.getSelection().getRanges(),b=new CKEDITOR.dom.documentFragment,e;if(!d||0===f.length)return null;for(e=0;e<f.length;e++)b.append(d.extractHtmlFromRange(f[e],c));c||this.getSelection().selectRanges([f[0]]);return a?b.getHtml():b},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return x.call(this)},
setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,c=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],d,f,b=c.length;b--;)d=c[b],f=0,CKEDITOR.tools.isArray(d)&&(f=d[1],d=d[0]),f?a[d]=f:delete a[d]},getCommandKeystroke:function(a,c){var d="string"===typeof a?this.getCommand(a):a,f=[];if(d){var b=CKEDITOR.tools.object.findKey(this.commands,d),e=this.keystrokeHandler.keystrokes;if(d.fakeKeystroke)f.push(d.fakeKeystroke);else for(var h in e)e[h]===b&&f.push(h)}return c?
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,c){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;c=c?this.blockless?CKEDITOR.ENTER_BR:c:this.shiftEnterMode;
if(this.activeEnterMode!=a||this.activeShiftEnterMode!=c)this.activeEnterMode=a,this.activeShiftEnterMode=c,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 c=CKEDITOR.dom.element.get(a);return c?c.getEditor()?(CKEDITOR.error("editor-element-conflict",
{editorName:c.getEditor().name}),null):c:(CKEDITOR.error("editor-incorrect-element",{element:a}),null)};CKEDITOR.editor.initializeDelayedEditorCreation=function(a,c,d){if(c.delayIfDetached_callback)return CKEDITOR.warn("editor-delayed-creation",{method:"callback"}),c.delayIfDetached_callback(function(){CKEDITOR[d](a,c);CKEDITOR.warn("editor-delayed-creation-success",{method:"callback"})}),null;var f=void 0===c.delayIfDetached_interval?CKEDITOR.config.delayIfDetached_interval:c.delayIfDetached_interval;
CKEDITOR.warn("editor-delayed-creation",{method:"interval - "+f+" ms"});var b=setInterval(function(){a.isDetached()||(clearInterval(b),CKEDITOR[d](a,c),CKEDITOR.warn("editor-delayed-creation-success",{method:"interval - "+f+" ms"}))},f);return function(){clearInterval(b)}};CKEDITOR.editor.shouldDelayEditorCreation=function(a,c){CKEDITOR.editor.mergeDelayedCreationConfigs(c);return c&&c.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,g={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype=
{onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(e){for(var a,h,k=0,m;a=this._.htmlPartsRegex.exec(e);){h=a.index;if(h>k)if(k=e.substring(k,h),m)m.push(k);else this.onText(k);k=this._.htmlPartsRegex.lastIndex;if(h=a[1])if(h=h.toLowerCase(),m&&CKEDITOR.dtd.$cdata[h]&&(this.onCDATA(m.join("")),m=null),!m){this.onTagClose(h);continue}if(m)m.push(a[0]);else if(h=a[3]){if(h=h.toLowerCase(),!/="/.test(h)){var l={},d,f=a[4];a=
!!a[5];if(f)for(;d=b.exec(f);){var c=d[1].toLowerCase();d=d[2]||d[3]||d[4]||"";l[c]=!d&&g[c]?c:CKEDITOR.tools.htmlDecodeAttr(d)}this.onTagOpen(h,l,a);!m&&CKEDITOR.dtd.$cdata[h]&&(m=[])}}else if(h=a[2])this.onComment(h)}if(e.length>k)this.onText(e.substring(k,e.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(b){this._.output.push("\x3c",b)},openTagClose:function(b,g){g?this._.output.push(" /\x3e"):this._.output.push("\x3e")},
attribute:function(b,g){"string"==typeof g&&(g=CKEDITOR.tools.htmlEncodeAttr(g));this._.output.push(" ",b,'\x3d"',g,'"')},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 g=this._.output.join("");b&&this.reset();return g}}}),"use strict",function(){CKEDITOR.htmlParser.node=
function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var b=this.parent.children,g=CKEDITOR.tools.indexOf(b,this),e=this.previous,a=this.next;e&&(e.next=a);a&&(a.previous=e);b.splice(g,1);this.parent=null},replaceWith:function(b){var g=this.parent.children,e=CKEDITOR.tools.indexOf(g,this),a=b.previous=this.previous,h=b.next=this.next;a&&(a.next=b);h&&(h.previous=b);g[e]=b;b.parent=this.parent;this.parent=null},insertAfter:function(b){var g=b.parent.children,e=CKEDITOR.tools.indexOf(g,
b),a=b.next;g.splice(e+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 g=b.parent.children,e=CKEDITOR.tools.indexOf(g,b);g.splice(e,0,this);this.next=b;(this.previous=b.previous)&&(b.previous.next=this);b.previous=this;this.parent=b.parent},getAscendant:function(b){var g="function"==typeof b?b:"string"==typeof b?function(a){return a.name==b}:function(a){return a.name in b},e=this.parent;for(;e&&e.type==CKEDITOR.NODE_ELEMENT;){if(g(e))return e;
e=e.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,g){var e=this.value;if(!(e=b.onComment(g,e,this)))return this.remove(),
!1;if("string"!=typeof e)return this.replaceWith(e),!1;this.value=e;return!0},writeHtml:function(b,g){g&&this.filter(g);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,g){if(!(this.value=b.onText(g,this.value,this)))return this.remove(),!1},writeHtml:function(b,g){g&&this.filter(g);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 g=this.getAscendant("style");if(g&&g.getAscendant({math:1,svg:1})){var g=CKEDITOR.htmlParser.fragment.fromHtml(this.value),e=new CKEDITOR.htmlParser.basicWriter;b.applyTo(g);g.writeHtml(e);this.value=e.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 g=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),e={ol:1,ul:1},a=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),h={ul:"li",ol:"li",dl:"dd",table:"tbody",
tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(k,m,l){function d(a){var c;if(0<r.length)for(var d=0;d<r.length;d++){var b=r[d],e=b.name,h=CKEDITOR.dtd[e],k=v.name&&CKEDITOR.dtd[v.name];k&&!k[e]||a&&h&&!h[a]&&CKEDITOR.dtd[a]?e==v.name&&(n(v,v.parent,1),d--):(c||(f(),c=1),b=b.clone(),b.parent=v,v=b,r.splice(d,1),d--)}}function f(){for(;A.length;)n(A.shift(),v)}function c(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var c=a.children.length,d=a.children[c-
1],f;d&&d.type==CKEDITOR.NODE_TEXT&&((f=CKEDITOR.tools.rtrim(d.value))?d.value=f:a.children.length=c-1)}}function n(a,d,f){d=d||v||t;var e=v;void 0===a.previous&&(x(d,a)&&(v=d,q.onTagOpen(l,{}),a.returnPoint=d=v),c(a),b(a)&&!a.children.length||d.add(a),"pre"==a.name&&(u=!1),"textarea"==a.name&&(z=!1));a.returnPoint?(v=a.returnPoint,delete a.returnPoint):v=f?d:e}function x(a,c){if((a==t||"body"==a.name)&&l&&(!a.name||CKEDITOR.dtd[a.name][l])){var d,f;return(d=c.attributes&&(f=c.attributes["data-cke-real-element-type"])?
f:c.name)&&d in CKEDITOR.dtd.$inline&&!(d in CKEDITOR.dtd.head)&&!c.isOrphan||c.type==CKEDITOR.NODE_TEXT}}function y(a,c){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==c||"dt"==a&&"dd"==c||"dd"==a&&"dt"==c:!1}var q=new CKEDITOR.htmlParser,t=m instanceof CKEDITOR.htmlParser.element?m:"string"==typeof m?new CKEDITOR.htmlParser.element(m):new CKEDITOR.htmlParser.fragment,r=[],A=[],v=t,z="textarea"==t.name,u="pre"==t.name;q.onTagOpen=function(c,h,k,m){h=new CKEDITOR.htmlParser.element(c,
h);h.isUnknown&&k&&(h.isEmpty=!0);h.isOptionalClose=m;if(b(h))r.push(h);else{if("pre"==c)u=!0;else{if("br"==c&&u){v.add(new CKEDITOR.htmlParser.text("\n"));return}"textarea"==c&&(z=!0)}if("br"==c)A.push(h);else{for(;!(m=(k=v.name)?CKEDITOR.dtd[k]||(v._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):a,h.isUnknown||v.isUnknown||m[c]);)if(v.isOptionalClose)q.onTagClose(k);else if(c in e&&k in e)k=v.children,(k=k[k.length-1])&&"li"==k.name||n(k=new CKEDITOR.htmlParser.element("li"),v),!h.returnPoint&&
(h.returnPoint=v),v=k;else if(c in CKEDITOR.dtd.$listItem&&!y(c,k))q.onTagOpen("li"==c?"ul":"dl",{},0,1);else if(k in g&&!y(c,k))!h.returnPoint&&(h.returnPoint=v),v=v.parent;else if(k in CKEDITOR.dtd.$inline&&r.unshift(v),v.parent)n(v,v.parent,1);else{h.isOrphan=1;break}d(c);f();h.parent=v;h.isEmpty?n(h):v=h}}};q.onTagClose=function(a){for(var c=r.length-1;0<=c;c--)if(a==r[c].name){r.splice(c,1);return}for(var d=[],b=[],e=v;e!=t&&e.name!=a;)e._.isBlockLike||b.unshift(e),d.push(e),e=e.returnPoint||
e.parent;if(e!=t){for(c=0;c<d.length;c++){var h=d[c];n(h,h.parent)}v=e;e._.isBlockLike?f():(c=CKEDITOR.config.shiftLineBreaks,!0!==c&&A.length&&("function"!==typeof c?f():(c=c(A[A.length-1]),!0!==c&&(f(),c instanceof CKEDITOR.htmlParser.text&&v.add(c),c instanceof CKEDITOR.htmlParser.element&&n(c,v)))));n(e,e.parent);e==v&&(v=v.parent);r=r.concat(b)}"body"==a&&(l=!1)};q.onText=function(c){if(!(v._.hasInlineStarted&&!A.length||u||z)&&(c=CKEDITOR.tools.ltrim(c),0===c.length))return;var b=v.name,e=b?
CKEDITOR.dtd[b]||(v._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):a;if(!z&&!e["#"]&&b in g)q.onTagOpen(h[b]||""),q.onText(c);else{f();d();u||z||(c=c.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));c=new CKEDITOR.htmlParser.text(c);if(x(v,c))this.onTagOpen(l,{},0,1);v.add(c)}};q.onCDATA=function(a){v.add(new CKEDITOR.htmlParser.cdata(a))};q.onComment=function(a){f();d();v.add(new CKEDITOR.htmlParser.comment(a))};q.parse(k);for(f();v!=t;)n(v,v.parent,1);c(t);return t};CKEDITOR.htmlParser.fragment.prototype=
{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,b){isNaN(b)&&(b=this.children.length);var e=0<b?this.children[b-1]:null;if(e){if(a._.isBlockLike&&e.type==CKEDITOR.NODE_TEXT&&(e.value=CKEDITOR.tools.rtrim(e.value),0===e.value.length)){this.children.pop();this.add(a);return}e.next=a}a.previous=e;a.parent=this;this.children.splice(b,0,a);this._.hasInlineStarted||(this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike)},filter:function(a,b){b=this.getFilterContext(b);
a.onRoot(b,this);this.filterChildren(a,!1,b)},filterChildren:function(a,b,e){if(this.childrenFilteredBy!=a.id){e=this.getFilterContext(e);if(b&&!this.parent)a.onRoot(e,this);this.childrenFilteredBy=a.id;for(b=0;b<this.children.length;b++)!1===this.children[b].filter(a,e)&&b--}},writeHtml:function(a,b){b&&this.filter(b);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,b,e){var d=this.getFilterContext();if(e&&!this.parent&&b)b.onRoot(d,this);b&&this.filterChildren(b,!1,d);b=0;e=this.children;
for(d=e.length;b<d;b++)e[b].writeHtml(a)},forEach:function(a,b,e){if(!(e||b&&this.type!=b))var d=a(this);if(!1!==d){e=this.children;for(var f=0;f<e.length;f++)d=e[f],d.type==CKEDITOR.NODE_ELEMENT?d.forEach(a,b):b&&d.type!=b||a(d)}},getFilterContext:function(a){return a||{}}};CKEDITOR.config.shiftLineBreaks=!0}(),"use strict",function(){function b(){this.rules=[]}function g(e,a,h,k){var g,l;for(g in a)(l=e[g])||(l=e[g]=new b),l.add(a[g],h,k)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(e){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;e&&this.addRules(e,10)},proto:{addRules:function(b,a){var h;"number"==typeof a?h=a:a&&"priority"in a&&(h=a.priority);"number"!=typeof h&&(h=10);"object"!=typeof a&&(a={});b.elementNames&&this.elementNameRules.addMany(b.elementNames,h,a);b.attributeNames&&this.attributeNameRules.addMany(b.attributeNames,
h,a);b.elements&&g(this.elementsRules,b.elements,h,a);b.attributes&&g(this.attributesRules,b.attributes,h,a);b.text&&this.textRules.add(b.text,h,a);b.comment&&this.commentRules.add(b.comment,h,a);b.root&&this.rootRules.add(b.root,h,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,h){return this.textRules.exec(b,a,h)},onComment:function(b,
a,h){return this.commentRules.exec(b,a,h)},onRoot:function(b,a){return this.rootRules.exec(b,a)},onElement:function(b,a){for(var h=[this.elementsRules["^"],this.elementsRules[a.name],this.elementsRules.$],k,g=0;3>g;g++)if(k=h[g]){k=k.exec(b,a,this);if(!1===k)return null;if(k&&k!=a)return this.onNode(b,k);if(a.parent&&!a.name)break}return a},onNode:function(b,a){var h=a.type;return h==CKEDITOR.NODE_ELEMENT?this.onElement(b,a):h==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(b,a.value,
a)):h==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(b,a.value,a)):null},onAttribute:function(b,a,h,k){return(h=this.attributesRules[h])?h.exec(b,k,a,this):k}}});CKEDITOR.htmlParser.filterRulesGroup=b;b.prototype={add:function(b,a,h){this.rules.splice(this.findIndex(a),0,{value:b,priority:a,options:h})},addMany:function(b,a,h){for(var k=[this.findIndex(a),0],g=0,l=b.length;g<l;g++)k.push({value:b[g],priority:a,options:h});this.rules.splice.apply(this.rules,k)},findIndex:function(b){for(var a=
this.rules,h=a.length-1;0<=h&&b<a[h].priority;)h--;return h+1},exec:function(b,a){var h=a instanceof CKEDITOR.htmlParser.node||a instanceof CKEDITOR.htmlParser.fragment,k=Array.prototype.slice.call(arguments,1),g=this.rules,l=g.length,d,f,c,n;for(n=0;n<l;n++)if(h&&(d=a.type,f=a.name),c=g[n],!(b.nonEditable&&!c.options.applyToAll||b.nestedEditable&&c.options.excludeNestedEditable)){c=c.value.apply(null,k);if(!1===c||h&&c&&(c.name!=f||c.type!=d))return c;null!=c&&(k[0]=a=c)}return a},execOnName:function(b,
a){for(var h=0,k=this.rules,g=k.length,l;a&&h<g;h++)l=k[h],b.nonEditable&&!l.options.applyToAll||b.nestedEditable&&l.options.excludeNestedEditable||(a=a.replace(l.value[0],l.value[1]));return a}}}(),function(){function b(c,d){function f(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function b(c,d){return function(b){if(b.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var h=[],F=e(b),n,m;if(F)for(g(F,1)&&h.push(F);F;)k(F)&&
(n=a(F))&&g(n)&&((m=a(n))&&!k(m)?h.push(n):(f(H).insertAfter(n),n.remove())),F=F.previous;for(F=0;F<h.length;F++)h[F].remove();if(h=!c||!1!==("function"==typeof d?d(b):d))H||CKEDITOR.env.needsBrFiller||b.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?H||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||b.name in CKEDITOR.dtd.tr||b.name in CKEDITOR.dtd.$listItem)?(h=e(b),h=!h||"form"==b.name&&"input"==h.name):h=!1:h=!1;h&&b.add(f(c))}}}function g(a,c){if((!H||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&
"br"==a.name&&!a.attributes["data-cke-eol"])return!0;var d;return a.type==CKEDITOR.NODE_TEXT&&(d=a.value.match(A))&&(d.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,d.index))).insertBefore(a),a.value=d[0]),!CKEDITOR.env.needsBrFiller&&H&&(!c||a.parent.name in D)||!H&&((d=a.previous)&&"br"==d.name||!d||k(d)))?!0:!1}var n={elements:{}},H="html"==d,D=CKEDITOR.tools.extend({},p),G;for(G in D)"#"in z[G]||delete D[G];for(G in D)n.elements[G]=b(H,c.config.fillEmptyBlocks);n.root=b(H,!1);n.elements.br=
function(c){return function(d){if(d.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var b=d.attributes;if("data-cke-bogus"in b||"data-cke-eol"in b)delete b["data-cke-bogus"];else{for(b=d.next;b&&h(b);)b=b.next;var e=a(d);!b&&k(d.parent)?m(d.parent,f(c)):k(b)&&e&&!k(e)&&f(c).insertBefore(b)}}}}(H);return n}function g(a,c){return a!=CKEDITOR.ENTER_BR&&!1!==c?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function e(a){for(a=a.children[a.children.length-1];a&&h(a);)a=a.previous;return a}function a(a){for(a=a.previous;a&&
h(a);)a=a.previous;return a}function h(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function k(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in p||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function m(a,c){var d=a.children[a.children.length-1];a.children.push(c);c.parent=a;d&&(d.next=c,c.previous=d)}function l(a){a=a.attributes;"false"!=a.contenteditable&&(a["data-cke-editable"]=a.contenteditable?"true":1);
a.contenteditable="false"}function d(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function f(a,c){return a.replace(E,function(a,d,f){return"\x3c"+d+f.replace(D,function(a,d){return G.test(d)&&-1==f.indexOf("data-cke-saved-"+d)?" data-cke-saved-"+a+" data-cke-"+c+"-"+a:a})+"\x3e"})}function c(a,c){return a.replace(c,function(a,c,d){0===a.indexOf("\x3ctextarea")&&(a=c+y(d).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(M,function(a,c){return decodeURIComponent(c)})}function x(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,function(a){return"\x3c!--"+v+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function y(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,c){return decodeURIComponent(c)})}function q(a,c){var d=c._.dataStore;
return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,c){return decodeURIComponent(c)}).replace(/\{cke_protected_(\d+)\}/g,function(a,c){return d&&d[c]||""})}function t(a,c,d){var f=[],b=c.config.protectedSource,e=c._.dataStore||(c._.dataStore={id:1}),h=new RegExp("\x3c\\!--\\{cke_temp_"+d+"(comment)?\\}(\\d*?)--\x3e","g"),b=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(b);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_temp_"+
d+"comment}"+(f.push(a)-1)+"--\x3e"});for(var k=0;k<b.length;k++)a=a.replace(b[k],function(a){a=a.replace(h,function(a,c,d){return f[d]});return h.test(a)?a:"\x3c!--{cke_temp_"+d+"}"+(f.push(a)-1)+"--\x3e"});a=a.replace(h,function(a,c,d){return"\x3c!--"+v+(c?"{C}":"")+encodeURIComponent(f[d]).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,
c){e[e.id]=decodeURIComponent(c);return"{cke_protected_"+e.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,d,f,b){return"\x3c"+d+f+"\x3e"+q(y(b),c)+"\x3c/"+d+"\x3e"})}var r;CKEDITOR.htmlDataProcessor=function(a){var d,e,h=this;this.editor=a;this.dataFilter=d=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;d.addRules(w);d.addRules(C,{applyToAll:!0});d.addRules(b(a,"data"),
{applyToAll:!0});e.addRules(J);e.addRules(B,{applyToAll:!0});e.addRules(b(a,"html"),{applyToAll:!0});a.on("toHtml",function(d){var b;var e=window.crypto||window.msCrypto;b=e?e.getRandomValues(new Uint32Array(1))[0]:Math.floor(9E9*Math.random()+1E9);d=d.data;var e=d.dataValue,e=r(e),e=t(e,a,b),e=c(e,P),e=f(e,b),e=c(e,I),e=e.replace(K,"$1cke:$2"),e=e.replace(H,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),e=e.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),e=e.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+
b+"-$2"),h=d.context||a.editable().getName(),k;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==h&&(h="div",e="\x3cpre\x3e"+e+"\x3c/pre\x3e",k=1);h=a.document.createElement(h);h.setHtml("a"+e);e=h.getHtml().substr(1);e=e.replace(new RegExp("data-cke-"+b+"-","ig"),"");k&&(e=e.replace(/^<pre>|<\/pre>$/gi,""));e=e.replace(Q,"$1$2");e=n(e);e=y(e);b=!1===d.fixForBody?!1:g(d.enterMode,a.config.autoParagraph);e=CKEDITOR.htmlParser.fragment.fromHtml(e,d.context,b);b&&(k=e,!k.children.length&&CKEDITOR.dtd[k.name][b]&&
(b=new CKEDITOR.htmlParser.element(b),k.add(b)));d.dataValue=e},null,null,5);a.on("toHtml",function(c){c.data.filter.applyTo(c.data.dataValue,!0,c.data.dontFilter,c.data.enterMode)&&a.fire("dataFiltered")},null,null,6);a.on("toHtml",function(a){a.data.dataValue.filterChildren(h.dataFilter,!0)},null,null,10);a.on("toHtml",function(a){a=a.data;var c=a.dataValue,d=new CKEDITOR.htmlParser.basicWriter;c.writeChildrenHtml(d);c=d.getHtml(!0);a.dataValue=x(c)},null,null,15);a.on("toDataFormat",function(c){var d=
c.data.dataValue;c.data.enterMode!=CKEDITOR.ENTER_BR&&(d=d.replace(/^<br *\/?>/i,""));c.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(d,c.data.context,g(c.data.enterMode,a.config.autoParagraph))},null,null,5);a.on("toDataFormat",function(a){a.data.dataValue.filterChildren(h.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(c){var d=c.data.dataValue,f=h.writer;f.reset();d.writeChildrenHtml(f);
d=f.getHtml(!0);d=y(d);d=q(d,a);c.data.dataValue=d},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,c,d,f){var b=this.editor,e,h,k,g;c&&"object"==typeof c?(e=c.context,d=c.fixForBody,f=c.dontFilter,h=c.filter,k=c.enterMode,g=c.protectedWhitespaces):e=c;e||null===e||(e=b.editable().getName());return b.fire("toHtml",{dataValue:a,context:e,fixForBody:d,dontFilter:f,filter:h||b.filter,enterMode:k||b.enterMode,protectedWhitespaces:g}).dataValue},toDataFormat:function(a,c){var d,
f,b;c&&(d=c.context,f=c.filter,b=c.enterMode);d||null===d||(d=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:f||this.editor.filter,context:d,enterMode:b||this.editor.enterMode}).dataValue},protectSource:function(a){return t(a,this.editor)},unprotectSource:function(a){return q(a,this.editor)},unprotectRealComments:function(a){return y(a)}};var A=/(?:&nbsp;|\xa0)$/,v="{cke_protected}",z=CKEDITOR.dtd,u="caption colgroup col thead tfoot tbody".split(" "),
p=CKEDITOR.tools.extend({},z.$blockLimit,z.$block),w={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 c=a.attributes.src.toLowerCase().replace(/[^a-z]/gi,"");if(0===c.indexOf("javascript")||0===c.indexOf("data"))a.attributes["data-cke-pa-src"]=a.attributes.src,delete a.attributes.src}}}},J={elements:{embed:function(a){var c=a.parent;if(c&&"object"==
c.name){var d=c.attributes.width,c=c.attributes.height;d&&(a.attributes.width=d);c&&(a.attributes.height=c)}},a:function(a){var c=a.attributes;if(!(a.children.length||c.name||c.id||a.attributes["data-cke-saved-name"]))return!1}}},B={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var c=a.attributes;if(c){if(c["data-cke-temp"])return!1;for(var d=["name","href","src"],f,b=0;b<d.length;b++)f=
"data-cke-saved-"+d[b],f in c&&delete c[d[b]]}return a},table:function(a){a.children.slice(0).sort(function(a,c){var d,f;a.type==CKEDITOR.NODE_ELEMENT&&c.type==a.type&&(d=CKEDITOR.tools.indexOf(u,a.name),f=CKEDITOR.tools.indexOf(u,c.name));-1<d&&-1<f&&d!=f||(d=a.parent?a.getIndex():-1,f=c.parent?c.getIndex():-1);return d>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 c=a.children[0];c&&c.value&&(c.value=CKEDITOR.tools.trim(c.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var c=a.children[0];!c&&m(a,c=new CKEDITOR.htmlParser.text);c.value=a.attributes["data-cke-title"]||""},input:d,textarea:d},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};
CKEDITOR.env.ie&&(B.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var E=/<(a|area|img|input|source)\b([^>]*)>/gi,D=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,G=/^(href|src|name)$/i,I=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,P=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,M=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,K=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,
Q=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,H=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;r=function(){function a(c,d){for(var f=0;f<c.length;f++){var b=c[f];b.lastIndex=0;if(b.test(d))return!0}return!1}function c(a){return CKEDITOR.tools.array.reduce(a.split(""),function(a,c){var f=c.toLowerCase(),b=c.toUpperCase(),e=d(f);f!==b&&(e+="|"+d(b));return a+("("+e+")")},"")}function d(a){var c;c=a.charCodeAt(0);var f=c.toString(16);c={htmlCode:"\x26#"+c+";?",hex:"\x26#x0*"+f+";?",entity:{"\x3c":"\x26lt;",
"\x3e":"\x26gt;",":":"\x26colon;"}[a]};for(var b in c)c[b]&&(a+="|"+c[b]);return a}var f=[new RegExp("("+c("\x3ccke:encoded\x3e")+"(.*?)"+c("\x3c/cke:encoded\x3e")+")|("+c("\x3c")+c("/")+"?"+c("cke:encoded\x3e")+")","gi"),new RegExp("(("+c("{cke_protected")+")(_[0-9]*)?"+c("}")+")","gi"),/<!(?:\s*-\s*){2,3}!?\s*>/g];return function(c){for(;a(f,c);)for(var d=f,b=0;b<d.length;b++)c=c.replace(d[b],"");return c}}()}(),"use strict",CKEDITOR.htmlParser.element=function(b,g){this.name=b;this.attributes=
g||{};this.children=[];var e=b||"",a=e.match(/^cke:(.*)/);a&&(e=a[1]);e=!!(CKEDITOR.dtd.$nonBodyContent[e]||CKEDITOR.dtd.$block[e]||CKEDITOR.dtd.$listItem[e]||CKEDITOR.dtd.$tableContent[e]||CKEDITOR.dtd.$nonEditable[e]||"br"==e);this.isEmpty=!!CKEDITOR.dtd.$empty[b];this.isUnknown=!CKEDITOR.dtd[b];this._={isBlockLike:e,hasInlineStarted:this.isEmpty||!e}},CKEDITOR.htmlParser.cssStyle=function(b){var g={};((b instanceof CKEDITOR.htmlParser.element?b.attributes.style:b)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,
function(b,a,h){"font-family"==a&&(h=h.replace(/["']/g,""));g[a.toLowerCase()]=h});return{rules:g,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 g)g[a]&&b.push(a,":",g[a],";");return b.join("")}}},function(){function b(a){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof a?b.name==a:b.name in a)}}var g=
function(a,b){a=a[0];b=b[0];return a<b?-1:a>b?1:0},e=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:e.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var e=this,g,l;b=e.getFilterContext(b);if(!e.parent)a.onRoot(b,e);for(;;){g=e.name;if(!(l=a.onElementName(b,g)))return this.remove(),!1;e.name=l;if(!(e=a.onElement(b,e)))return this.remove(),
!1;if(e!==this)return this.replaceWith(e),!1;if(e.name==g)break;if(e.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(e),!1;if(!e.name)return this.replaceWithChildren(),!1}g=e.attributes;var d,f;for(d in g){for(l=g[d];;)if(f=a.onAttributeName(b,d))if(f!=d)delete g[d],d=f;else break;else{delete g[d];break}f&&(!1===(l=a.onAttribute(b,e,f,l))?delete g[f]:g[f]=l)}e.isEmpty||this.filterChildren(a,!1,b);return!0},filterChildren:e.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var e=this.name,
m=[],l=this.attributes,d,f;a.openTag(e,l);for(d in l)m.push([d,l[d]]);a.sortAttributes&&m.sort(g);d=0;for(f=m.length;d<f;d++)l=m[d],a.attribute(l[0],l[1]);a.openTagClose(e,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(e)},writeChildrenHtml:e.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,b=a.length;b;)a[--b].insertAfter(this);this.remove()},forEach:e.forEach,getFirst:function(a){if(!a)return this.children.length?this.children[0]:null;"function"!=typeof a&&
(a=b(a));for(var e=0,k=this.children.length;e<k;++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 b=0,e=a.length;b<e;++b)a[b].parent=this},getOuterHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},split:function(a){for(var b=this.children.splice(a,
this.children.length-a),e=this.clone(),g=0;g<b.length;++g)b[g].parent=e;e.children=b;b[0]&&(b[0].previous=null);0<a&&(this.children[a-1].next=null);this.parent.add(e,this.getIndex()+1);return e},find:function(a,b){void 0===b&&(b=!1);var e=[],g;for(g=0;g<this.children.length;g++){var l=this.children[g];"function"==typeof a&&a(l)?e.push(l):"string"==typeof a&&l.name===a&&e.push(l);b&&l.find&&(e=e.concat(l.find(a,b)))}return e},findOne:function(a,b){var e=null,g=CKEDITOR.tools.array.find(this.children,
function(g){var d="function"===typeof a?a(g):g.name===a;if(d||!b)return d;g.children&&g.findOne&&(e=g.findOne(a,!0));return!!e});return e||g||null},addClass:function(a){if(!this.hasClass(a)){var b=this.attributes["class"]||"";this.attributes["class"]=b+(b?" ":"")+a}},removeClass:function(a){var b=this.attributes["class"];b&&((b=CKEDITOR.tools.trim(b.replace(new RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=b:delete this.attributes["class"])},hasClass:function(a){var b=this.attributes["class"];
return b?(new RegExp("(?:^|\\s)"+a+"(?\x3d\\s|$)")).test(b):!1},getFilterContext:function(a){var b=[];a||(a={nonEditable:!1,nestedEditable:!1});a.nonEditable||"false"!=this.attributes.contenteditable?a.nonEditable&&!a.nestedEditable&&"true"==this.attributes.contenteditable&&b.push("nestedEditable",!0):b.push("nonEditable",!0);if(b.length){a=CKEDITOR.tools.copy(a);for(var e=0;e<b.length;e+=2)a[b[e]]=b[e+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(g,e){var a=("function"===typeof this.source?this.source(g):this.source).replace(b,function(a,b){return void 0!==g[b]?g[b]:a});return e?e.push(a):a}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(b){function g(){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",g);b.on("destroy",g);CKEDITOR.fire("instance",null,b)},CKEDITOR.remove=function(b){delete CKEDITOR.instances[b.name]},function(){var b={};CKEDITOR.addTemplate=function(g,e){var a=b[g];if(a)return a;a={name:g,source:e};CKEDITOR.fire("template",a);return b[g]=new CKEDITOR.template(a.source)};CKEDITOR.getTemplate=function(g){return b[g]}}(),function(){var b=[];CKEDITOR.addCss=function(g){b.push(g)};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,g){b=CKEDITOR.editor._getEditorElement(b);if(!b)return null;if(CKEDITOR.editor.shouldDelayEditorCreation(b,g))return CKEDITOR.editor.initializeDelayedEditorCreation(b,g,"inline");var e=b.is("textarea")?b:null,a=e?e.getValue():b.getHtml(),h=new CKEDITOR.editor(g,b,CKEDITOR.ELEMENT_MODE_INLINE);
e?(h.setData(a,null,!0),b=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+!!h.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+e.getValue()+"\x3c/div\x3e",CKEDITOR.document),b.insertAfter(e),e.hide(),e.$.form&&h._attachToForm()):(g&&"undefined"!==typeof g.readOnly&&!g.readOnly&&b.setAttribute("contenteditable","true"),h.setData(a,null,!0));h.on("loaded",function(){h.fire("uiReady");h.editable(b);h.container=b;h.ui.contentsElement=b;h.setData(h.getData(1));h.resetDirty();h.fire("contentDom");
h.mode="wysiwyg";h.fire("mode");h.status="ready";h.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,h)},null,null,1E4);h.on("destroy",function(){var a=h.container;e&&a&&(a.clearCustomData(),a.remove());e&&e.show();h.element.clearCustomData();delete h.element});return h};CKEDITOR.inlineAll=function(){var b,g,e;for(e in CKEDITOR.dtd.$editable)for(var a=CKEDITOR.document.getElementsByTag(e),h=0,k=a.count();h<k;h++)b=a.getItem(h),"true"!=b.getAttribute("contenteditable")||b.getEditor()||(g=
{element:b,config:{}},!1!==CKEDITOR.fire("inline",g)&&CKEDITOR.inline(b,g.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function b(a,b,k,m){a=CKEDITOR.editor._getEditorElement(a);if(!a)return null;if(CKEDITOR.editor.shouldDelayEditorCreation(a,b))return CKEDITOR.editor.initializeDelayedEditorCreation(a,b,"replace");var l=new CKEDITOR.editor(b,a,m);m==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.setStyle("visibility",
"hidden"),l._.required=a.hasAttribute("required"),a.removeAttribute("required"));k&&l.setData(k,null,!0);l.on("loaded",function(){l.isDestroyed()||l.isDetached()||(e(l),m==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",g);return l}function g(){var a=this.container,b=this.element;a&&(a.clearCustomData(),
a.remove());b&&(b.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(b.show(),this._.required&&b.setAttribute("required","required")),delete this.element)}function e(a){var b=a.name,e=a.element,g=a.elementMode,l=a.fire("uiSpace",{space:"top",html:""}).html,d=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'),b=CKEDITOR.dom.element.createFromHtml(f.output({id:a.id,name:b,langDir:a.lang.dir,
langCode:a.langCode,voiceLabel:a.applicationTitle,topHtml:l?'\x3cspan id\x3d"'+a.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+l+"\x3c/span\x3e":"",contentId:a.ui.spaceId("contents"),bottomHtml:d?'\x3cspan id\x3d"'+a.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+d+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));g==CKEDITOR.ELEMENT_MODE_REPLACE?(e.hide(),b.insertAfter(e)):e.append(b);a.container=
b;a.ui.contentsElement=a.ui.space("contents");l&&a.ui.space("top").unselectable();d&&a.ui.space("bottom").unselectable();e=a.config.width;g=a.config.height;e&&b.setStyle("width",CKEDITOR.tools.cssLength(e));g&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(g));b.disableContextMenu();CKEDITOR.env.webkit&&b.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,k){return b(a,
e,k,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b<a.length;b++){var e=null,g=a[b];if(g.name||g.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(g.className))continue}else if("function"==typeof arguments[0]&&(e={},!1===arguments[0](g,e)))continue;this.replace(g,e)}}};CKEDITOR.editor.prototype.addMode=function(a,b){(this._.modes||(this._.modes={}))[a]=b};CKEDITOR.editor.prototype.setMode=
function(a,b){var e=this,g=this._.modes;if(a!=e.mode&&g&&g[a]){e.fire("beforeSetMode",a);if(e.mode){var l=e.checkDirty(),g=e._.previousModeData,d,f=0;e.fire("beforeModeUnload");e.editable(0);e._.previousMode=e.mode;e._.previousModeData=d=e.getData(1);"source"==e.mode&&g==d&&(e.fire("lockSnapshot",{forceUpdate:!0}),f=1);e.ui.space("contents").setHtml("");e.mode=""}else e._.previousModeData=e.getData(1);this._.modes[a](function(){e.mode=a;void 0!==l&&!l&&e.resetDirty();f?e.fire("unlockSnapshot"):"wysiwyg"==
a&&e.fire("saveSnapshot");setTimeout(function(){e.isDestroyed()||e.isDetached()||(e.fire("mode"),b&&b.call(e))},0)})}};CKEDITOR.editor.prototype.resize=function(a,b,e,g){var l=this.container,d=this.ui.space("contents"),f=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;g=g?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):l;if(a||0===a)a=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(a));g.setSize("width",a,!0);f&&
(f.style.width="1%");b=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(b));var c=(g.$.offsetHeight||0)-(d.$.clientHeight||0),l=Math.max(b-(e?0:c),0);b=e?b+c:b;d.setStyle("height",CKEDITOR.tools.cssLength(l));f&&(f.style.width="100%");this.fire("resize",{outerHeight:b,contentsHeight:l,outerWidth:a||g.getSize("width")})};CKEDITOR.editor.prototype.getResizable=function(a){return a?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),
CKEDITOR.config.startupMode="wysiwyg",function(){function b(c){var b=c.editor,f=c.data.path,e=f.blockLimit,h=c.data.selection,k=h.getRanges()[0],n;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(h=g(h,f))h.appendBogus(),n=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.edge&&b._.previousActive;d(b,f.block,e)&&k.collapsed&&!k.getCommonAncestor().isReadOnly()&&(f=k.clone(),f.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),e=new CKEDITOR.dom.walker(f),e.guard=function(c){return!a(c)||
c.type==CKEDITOR.NODE_COMMENT||c.isReadOnly()},!e.checkForward()||f.checkStartOfBlock()&&f.checkEndOfBlock())&&(b=k.fixBlock(!0,b.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(b=b.getFirst(a))&&b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()).match(/^(?:&nbsp;|\xa0)$/)&&b.remove(),n=1,c.cancel());n&&k.select()}function g(c,d){if(c.isFake)return 0;var b=d.block||d.blockLimit,f=b&&b.getLast(a);if(!(!b||!b.isBlockBoundary()||f&&f.type==CKEDITOR.NODE_ELEMENT&&
f.isBlockBoundary()||b.is("pre")||b.getBogus()))return b}function e(a){var c=a.data.getTarget();c.is("input")&&(c=c.getAttribute("type"),"submit"!=c&&"reset"!=c||a.data.preventDefault())}function a(a){return y(a)&&q(a)}function h(a,c){return function(d){var b=d.data.$.toElement||d.data.$.fromElement||d.data.$.relatedTarget;(b=b&&b.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(b):null)&&(c.equals(b)||c.contains(b))||a.call(this,d)}}function k(a){return!!a.getRanges()[0].startPath().contains({table:1,
ul:1,ol:1,dl:1})}function m(c){function d(c){var f={table:1,ul:1,ol:1,dl:1};return function(d,e){e&&d.type==CKEDITOR.NODE_ELEMENT&&d.is(f)&&(b=d);if(!(e||!a(d)||c&&r(d)))return!1}}var b,f=c.getRanges()[0],e=c.root;return k(c)&&(c=f.clone(),c.collapse(1),c.setStartAt(e,CKEDITOR.POSITION_AFTER_START),e=new CKEDITOR.dom.walker(c),e.guard=d(),e.checkBackward(),b)?(c=f.clone(),c.collapse(),c.setEndAt(b,CKEDITOR.POSITION_AFTER_END),e=new CKEDITOR.dom.walker(c),e.guard=d(!0),b=!1,e.checkForward(),b):null}
function l(a){return a.block.getParent().getChildCount()}function d(a,c,d){return!1!==a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(d)&&!c||c&&"true"==c.getAttribute("contenteditable"))}function f(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function c(a){a&&a.isEmptyInlineRemoveable()&&a.remove()}function n(a){var c=a.editor;c.getSelection().scrollIntoView();setTimeout(function(){c.fire("saveSnapshot")},
0)}function x(a,c,d){var b=a.getCommonAncestor(c);for(c=a=d?c:a;(a=a.getParent())&&!b.equals(a)&&1==a.getChildCount();)c=a;c.remove()}var y,q,t,r,A,v,z,u,p,w,C={ul:1,ol:1,dl:1};CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,c){this.base(c.$||c);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 c=this.$.scrollTop;this.$.focus();this.$.scrollTop=c}else this.$.focus();else this.$.setActive()}catch(d){if(!CKEDITOR.env.ie)throw d;}CKEDITOR.env.safari&&!this.isInline()&&(a=CKEDITOR.document.getActive(),
a.equals(this.getWindow().getFrame())||this.getWindow().focus())},on:function(a,c){var d=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a="focus"==a?"focusin":"focusout",c=h(c,this),d[0]=a,d[1]=c);return CKEDITOR.dom.element.prototype.on.apply(this,d)},attachListener:function(a){!this._.listeners&&(this._.listeners=[]);var c=Array.prototype.slice.call(arguments,1),c=a.on.apply(a,c);this._.listeners.push(c);return c},clearListeners:function(){var a=this._.listeners;
try{for(;a.length;)a.pop().removeListener()}catch(c){}},restoreAttrs:function(){var a=this._.attrChanges,c,d;for(d in a)a.hasOwnProperty(d)&&(c=a[d],null!==c?this.setAttribute(d,c):this.removeAttribute(d))},attachClass:function(a){var c=this.getCustomData("classes");this.hasClass(a)||(!c&&(c=[]),c.push(a),this.setCustomData("classes",c),this.addClass(a))},changeAttr:function(a,c){var d=this.getAttribute(a);c!==d&&(!this._.attrChanges&&(this._.attrChanges={}),a in this._.attrChanges||(this._.attrChanges[a]=
d),this.setAttribute(a,c))},insertText:function(a){this.editor.focus();this.insertHtml(this.transformPlainTextToHtml(a),"text")},transformPlainTextToHtml:function(a){var c=this.editor.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:this.editor.activeEnterMode;return CKEDITOR.tools.transformPlainTextToHtml(a,c)},insertHtml:function(a,c,d){var b=this.editor;b.focus();b.fire("saveSnapshot");d||(d=b.getSelection().getRanges()[0]);v(this,c||"html",a,d);d.select();n(this);this.editor.fire("afterInsertHtml",
{})},insertHtmlIntoRange:function(a,c,d){v(this,d||"html",a,c);this.editor.fire("afterInsertHtml",{intoRange:c})},insertElement:function(c,d){var b=this.editor;b.focus();b.fire("saveSnapshot");var f=b.activeEnterMode,b=b.getSelection(),e=c.getName(),e=CKEDITOR.dtd.$block[e];d||(d=b.getRanges()[0]);this.insertElementIntoRange(c,d)&&(d.moveToPosition(c,CKEDITOR.POSITION_AFTER_END),e&&((e=c.getNext(function(c){return a(c)&&!r(c)}))&&e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$block)?e.getDtd()["#"]?
d.moveToElementEditStart(e):d.moveToElementEditEnd(c):e||f==CKEDITOR.ENTER_BR||(e=d.fixBlock(!0,f==CKEDITOR.ENTER_DIV?"div":"p"),d.moveToElementEditStart(e))));b.selectRanges([d]);n(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,d){var b=this.editor,f=b.config.enterMode,e=a.getName(),h=CKEDITOR.dtd.$block[e];if(d.checkReadOnly())return!1;d.deleteContents(1);d.startContainer.type==CKEDITOR.NODE_ELEMENT&&(d.startContainer.is({tr:1,table:1,tbody:1,
thead:1,tfoot:1})?z(d):d.startContainer.is(CKEDITOR.dtd.$list)&&u(d));var k,g;if(h)for(;(k=d.getCommonAncestor(0,1))&&(g=CKEDITOR.dtd[k.getName()])&&(!g||!g[e]);)if(k.getName()in CKEDITOR.dtd.span){var h=d.splitElement(k),n=d.createBookmark();c(k);c(h);d.moveToBookmark(n)}else d.checkStartOfBlock()&&d.checkEndOfBlock()?(d.setStartBefore(k),d.collapse(!0),k.remove()):d.splitBlock(f==CKEDITOR.ENTER_DIV?"div":"p",b.editable());d.insertNode(a);return!0},setData:function(a,c){c||(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 c=this.getHtml();a||(c=this.editor.dataProcessor.toDataFormat(c));return c},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 c=d.getDocument().$,b=c.getSelection(),f;a:if(b.anchorNode&&b.anchorNode==d.$)f=!0;else{if(CKEDITOR.env.webkit&&(f=d.getDocument().getActive())&&f.equals(d)&&!b.anchorNode){f=!0;break a}f=void 0}f&&(f=new CKEDITOR.dom.range(d),f.moveToElementEditStart(d),
c=c.createRange(),c.setStart(f.startContainer.$,f.startOffset),c.collapse(!0),b.removeAllRanges(),b.addRange(c))}function c(){var a=d.getDocument().$,b=a.selection,f=d.getDocument().getActive();"None"==b.type&&f.equals(d)&&(b=new CKEDITOR.dom.range(d),a=a.body.createTextRange(),b.moveToElementEditStart(d),b=b.startContainer,b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent()),a.moveToElementText(b.$),a.collapse(!0),a.select())}var d=this;if(CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&
(this.focus(),c());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()};p.eol.detect(a,this);p.bogus.exclude(a);p.cell.shrink(a);a.fragment=a.range.cloneContents();p.tree.rebuild(a,this);p.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,c){var d=w,b={range:a,doc:a.document},
f=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),f;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);d.table.detectPurge(b);b.bookmark=a.createBookmark();delete b.range;var e=this.editor.createRange();e.moveToPosition(b.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);b.targetBookmark=e.createBookmark();d.list.detectMerge(b,this);d.table.detectRanges(b,this);d.block.detectMerge(b,this);b.tableContentsRanges?(d.table.deleteRanges(b),a.moveToBookmark(b.bookmark),b.range=a):(a.moveToBookmark(b.bookmark),
b.range=a,a.extractContents(d.detectExtractMerge(b)));a.moveToBookmark(b.targetBookmark);a.optimize();d.fixUneditableRangePosition(a);d.list.merge(b,this);d.table.purge(b,this);d.block.merge(b,this);if(c){d=a.startPath();if(b=a.checkStartOfBlock()&&a.checkEndOfBlock()&&d.block&&!a.root.equals(d.block)){a:{var b=d.block.getElementsByTag("span"),e=0,h;if(b)for(;h=b.getItem(e++);)if(!q(h)){b=!0;break a}b=!1}b=!b}b&&(a.moveToPosition(d.block,CKEDITOR.POSITION_BEFORE_START),d.block.remove())}else d.autoParagraph(this.editor,
a),t(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return f},setup:function(){var c=this.editor;this.attachListener(c,"beforeGetData",function(){var a=this.getData();this.is("textarea")||!1!==c.config.ignoreEmptyParagraph&&(a=a.replace(A,function(a,c){return c}));c.setData(a,null,1)},this);this.attachListener(c,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(c,"afterSetData",function(){this.setData(c.getData(1))},this);this.attachListener(c,
"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(c,"beforeFocus",function(){var a=c.getSelection();(a=a&&a.getNative())&&"Control"==a.type||this.focus()},this);this.attachListener(c,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(c,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(c,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(c.readOnly);this.attachClass("cke_editable");
c.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):c.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&c.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+c.config.contentsLangDirection);c.keystrokeHandler.blockedKeystrokes[8]=+c.readOnly;c.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(){c._.previousScrollTop=c.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14<CKEDITOR.env.version){var d=function(){var a=c.editable();null!=c._.previousScrollTop&&a.getDocument().equals(CKEDITOR.document)&&(a.$.scrollTop=c._.previousScrollTop,c._.previousScrollTop=null,this.removeListener("scroll",d))};this.on("scroll",d)}c.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,c.once("contentDom",function(){c.focusManager.focus(this)},this));this.isInline()&&
this.changeAttr("tabindex",c.tabIndex);if(!this.is("textarea")){c.document=this.getDocument();c.window=this.getWindow();var b=c.document;this.changeAttr("spellcheck",!c.config.disableNativeSpellChecker);var f=c.config.contentsLangDirection;this.getDirection(1)!=f&&this.changeAttr("dir",f);var h=CKEDITOR.getCss();if(h){var f=b.getHead(),g=f.getCustomData("stylesheet");g?h!=g.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?g.$.styleSheet.cssText=h:g.setText(h)):(h=b.appendStyleText(h),h=new CKEDITOR.dom.element(h.ownerNode||
h.owningElement),f.setCustomData("stylesheet",h),h.data("cke-temp",1))}f=b.getCustomData("stylesheet_ref")||0;b.setCustomData("stylesheet_ref",f+1);this.setCustomData("cke_includeReadonly",!c.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var c=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");c&&2!=a.$.button&&c.isReadOnly()&&a.preventDefault()});var n={8:1,46:1};this.attachListener(c,"key",function(a){if(c.readOnly)return!0;var d=a.data.domEvent.getKey(),
b,f=c.getSelection();if(0!==f.getRanges().length){if(d in n){var e;a=f.getRanges()[0];var h=a.startPath(),g,x,G,d=8==d,D=!1;if(CKEDITOR.env.ie&&11>CKEDITOR.env.version&&f.getSelectedElement())e=f.getSelectedElement();else if(k(f)){var r=new CKEDITOR.dom.walker(a),E=a.collapsed?a.startContainer:r.next(),D=!1,I;if(a.checkStartOfBlock()){I=a.startPath().block||a.startPath().blockLimit;var q=I.getName();I=-1!==CKEDITOR.tools.array.indexOf(["dd","dt","li"],q)&&null===I.getPrevious()}else I=!1;if(I){for(;E&&
!D;)D=E.$.nodeName.toLowerCase(),D=!!C[D],E=r.next();r=l(a.startPath());E=l(a.endPath());D=D||r!==E}else D=void 0;D||(e=m(f))}e||D?(c.fire("saveSnapshot"),D?((b=a.startContainer.getAscendant(C,!0))?(a.setStart(b,0),a.enlarge(CKEDITOR.ENLARGE_ELEMENT),e=a):e=null,e.deleteContents()):(a.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove()),a.select(),c.fire("saveSnapshot"),b=1):a.collapsed&&((g=h.block)&&(G=g[d?"getPrevious":"getNext"](y))&&G.type==CKEDITOR.NODE_ELEMENT&&G.is("table")&&a[d?"checkStartOfBlock":
"checkEndOfBlock"]()?(c.fire("saveSnapshot"),a[d?"checkEndOfBlock":"checkStartOfBlock"]()&&g.remove(),a["moveToElementEdit"+(d?"End":"Start")](G),a.select(),c.fire("saveSnapshot"),b=1):h.blockLimit&&h.blockLimit.is("td")&&(x=h.blockLimit.getAscendant("table"))&&a.checkBoundaryOfElement(x,d?CKEDITOR.START:CKEDITOR.END)&&(G=x[d?"getPrevious":"getNext"](y))?(c.fire("saveSnapshot"),a["moveToElementEdit"+(d?"End":"Start")](G),a.checkStartOfBlock()&&a.checkEndOfBlock()?G.remove():a.select(),c.fire("saveSnapshot"),
b=1):(x=h.contains(["td","th","caption"]))&&a.checkBoundaryOfElement(x,d?CKEDITOR.START:CKEDITOR.END)&&(b=1))}return!b}});c.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(d){d.data.getKeystroke()in n&&!this.getFirst(a)&&(this.appendBogus(),d=c.createRange(),d.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),d.select())});this.attachListener(this,"dblclick",function(a){if(c.readOnly)return!1;a={element:a.data.getTarget()};c.fire("doubleclick",a)});
CKEDITOR.env.ie&&this.attachListener(this,"click",e);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(a){var d=a.data.getTarget();d.is("img","hr","input","textarea","select")&&!d.isReadOnly()&&(c.getSelection().selectElement(d),d.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()&&c.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(A,""))){var d=c.createRange();d.moveToElementEditStart(a);d.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(c,"key",function(a){if(c.readOnly)return!0;
var d=a.data.domEvent.getKey();if(d in n&&(a=c.getSelection(),0!==a.getRanges().length)){var d=8==d,b=a.getRanges()[0];a=b.startPath();if(b.collapsed)a:{var f=a.block;if(f&&b[d?"checkStartOfBlock":"checkEndOfBlock"](!0)&&b.moveToClosestEditablePosition(f,!d)&&b.collapsed){if(b.startContainer.type==CKEDITOR.NODE_ELEMENT){var e=b.startContainer.getChild(b.startOffset-(d?1:0));if(e&&e.type==CKEDITOR.NODE_ELEMENT&&e.is("hr")){c.fire("saveSnapshot");e.remove();a=!0;break a}}b=b.startPath().block;if(!b||
b&&b.contains(f))a=void 0;else{c.fire("saveSnapshot");var h;(h=(d?b:f).getBogus())&&h.remove();h=c.getSelection();e=h.createBookmarks();(d?f:b).moveChildren(d?b:f,!1);a.lastElement.mergeSiblings();x(f,b,!d);h.selectBookmarks(e);a=!0}}else a=!1}else d=b,h=a.block,b=d.endPath().block,h&&b&&!h.equals(b)?(c.fire("saveSnapshot"),(f=h.getBogus())&&f.remove(),d.enlarge(CKEDITOR.ENLARGE_INLINE),d.deleteContents(),b.getParent()&&(b.moveChildren(h,!1),a.lastElement.mergeSiblings(),x(h,b,!0)),d=c.getSelection().getRanges()[0],
d.collapse(1),d.optimize(),""===d.startContainer.getHtml()&&d.startContainer.appendBogus(),d.select(),a=!0):a=!1;if(!a)return;c.getSelection().scrollIntoView();c.fire("saveSnapshot");return!1}},this,null,100)}},getUniqueId:function(){var a;try{this._.expandoNumber=a=CKEDITOR.dom.domObject.prototype.getUniqueId.call(this)}catch(c){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(),c=a.getHead();if(c.getCustomData("stylesheet")){var d=a.getCustomData("stylesheet_ref");--d?a.setCustomData("stylesheet_ref",d):(a.removeCustomData("stylesheet_ref"),c.removeCustomData("stylesheet").remove())}}}}});CKEDITOR.editor.prototype.editable=function(a){var c=this._.editable;if(c&&a)return 0;if(!arguments.length)return c;a?c=a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(c&&c.detach(),c=
null);return this._.editable=c};CKEDITOR.on("instanceLoaded",function(a){var c=a.editor;c.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1"),a.setAttribute("contentEditable",!1))});c.on("selectionChange",function(a){if(!c.readOnly){var d=c.getSelection();d&&!d.isLocked&&(d=c.checkDirty(),c.fire("lockSnapshot"),b(a),c.fire("unlockSnapshot"),
!d&&c.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var c=a.editor;c.on("mode",function(){var a=c.editable();if(a&&a.isInline()){var d=c.title;a.changeAttr("role","textbox");a.changeAttr("aria-multiline","true");d&&a.changeAttr("aria-label",d);d&&a.changeAttr("title",d);var b=c.fire("ariaEditorHelpLabel",{}).label;if(b&&(d=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var f=CKEDITOR.tools.getNextId(),b=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+
f+'" class\x3d"cke_voice_label"\x3e'+b+"\x3c/span\x3e");d.append(b);a.changeAttr("aria-describedby",f)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");y=CKEDITOR.dom.walker.whitespaces(!0);q=CKEDITOR.dom.walker.bookmark(!1,!0);t=CKEDITOR.dom.walker.empty();r=CKEDITOR.dom.walker.bogus();A=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;v=
function(){function b(a){return a.type==CKEDITOR.NODE_ELEMENT}function e(a,c){var d,f,h,k,g=[],n=c.range.startContainer;d=c.range.startPath();for(var n=x[n.getName()],H=0,m=a.getChildren(),l=m.count(),G=-1,D=-1,r=0,I=d.contains(x.$list);H<l;++H)d=m.getItem(H),b(d)?(h=d.getName(),I&&h in CKEDITOR.dtd.$list?g=g.concat(e(d,c)):(k=!!n[h],"br"!=h||!d.data("cke-eol")||H&&H!=l-1||(r=(f=H?g[H-1].node:m.getItem(H+1))&&(!b(f)||!f.is("br")),f=f&&b(f)&&x.$block[f.getName()]),-1!=G||k||(G=H),k||(D=H),g.push({isElement:1,
isLineBreak:r,isBlock:d.isBlockBoundary(),hasBlockSibling:f,node:d,name:h,allowed:k}),f=r=0)):g.push({isElement:0,node:d,allowed:1});-1<G&&(g[G].firstNotAllowed=1);-1<D&&(g[D].lastNotAllowed=1);return g}function h(a,c){var d=[],f=a.getChildren(),e=f.count(),k,g=0,n=x[c],H=!a.is(x.$inline)||a.is("br");for(H&&d.push(" ");g<e;g++)k=f.getItem(g),b(k)&&!k.is(n)?d=d.concat(h(k,c)):d.push(k);H&&d.push(" ");return d}function k(a){return b(a.startContainer)&&a.startContainer.getChild(a.startOffset-1)}function g(a){return a&&
b(a)&&(a.is(x.$removeEmpty)||a.is("a")&&!a.isBlockBoundary())}function n(a,c,d,f){var e=a.clone(),h,k;e.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);(h=(new CKEDITOR.dom.walker(e)).next())&&b(h)&&l[h.getName()]&&(k=h.getPrevious())&&b(k)&&!k.getParent().equals(a.startContainer)&&d.contains(k)&&f.contains(h)&&h.isIdentical(k)&&(h.moveChildren(k),h.remove(),n(a,c,d,f))}function m(a,c){function d(a,c){if(c.isBlock&&c.isElement&&!c.node.is("br")&&b(a)&&a.is("br"))return a.remove(),1}var f=c.endContainer.getChild(c.endOffset),
e=c.endContainer.getChild(c.endOffset-1);f&&d(f,a[a.length-1]);e&&d(e,a[0])&&(c.setEnd(c.endContainer,c.endOffset-1),c.collapse())}var x=CKEDITOR.dtd,l={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},H=CKEDITOR.tools.extend({},x.$inline);delete H.br;return function(F,l,K,y){var q=F.editor,u=!1,t;"unfiltered_html"==l&&(l="html",u=!0);if(!y.checkReadOnly()){var v=(new CKEDITOR.dom.elementPath(y.startContainer,y.root)).blockLimit||
y.root;l={type:l,dontFilter:u,editable:F,editor:q,range:y,blockLimit:v,mergeCandidates:[],zombies:[]};var u=l.range,v=l.mergeCandidates,p="html"===l.type,w,z,C,Y,Z;"text"==l.type&&u.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(z=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",u.document),u.insertNode(z),u.setStartAfter(z));C=new CKEDITOR.dom.elementPath(u.startContainer);l.endPath=Y=new CKEDITOR.dom.elementPath(u.endContainer);if(!u.collapsed){w=Y.block||Y.blockLimit;var ba=u.getCommonAncestor();
w&&!w.equals(ba)&&!w.contains(ba)&&u.checkEndOfBlock()&&l.zombies.push(w);u.deleteContents()}for(;(Z=k(u))&&b(Z)&&Z.isBlockBoundary()&&C.contains(Z);)u.moveToPosition(Z,CKEDITOR.POSITION_BEFORE_END);n(u,l.blockLimit,C,Y);z&&(u.setEndBefore(z),u.collapse(),z.remove());z=u.startPath();if(w=z.contains(g,!1,1))t=u.splitElement(w),l.inlineStylesRoot=w,l.inlineStylesPeak=z.lastElement;z=u.createBookmark();p&&(c(w),c(t));(w=z.startNode.getPrevious(a))&&b(w)&&g(w)&&v.push(w);(w=z.startNode.getNext(a))&&b(w)&&
g(w)&&v.push(w);for(w=z.startNode;(w=w.getParent())&&g(w);)v.push(w);u.moveToBookmark(z);t=F.getHtml();t=""===t||t.match(A);q.enterMode===CKEDITOR.ENTER_DIV&&t&&((q=F.getFirst())&&q.remove(),y.setStartAt(F,CKEDITOR.POSITION_AFTER_START),y.collapse(!0));if(F=K){F=l.range;if("text"==l.type&&l.inlineStylesRoot){y=l.inlineStylesPeak;q=y.getDocument().createText("{cke-peak}");for(t=l.inlineStylesRoot.getParent();!y.equals(t);)q=q.appendTo(y.clone()),y=y.getParent();K=q.getOuterHtml().split("{cke-peak}").join(K)}y=
l.blockLimit.getName();if(/^\s+|\s+$/.test(K)&&"span"in CKEDITOR.dtd[y]){var V='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';K=V+K+V}K=l.editor.dataProcessor.toHtml(K,{context:null,fixForBody:!1,protectedWhitespaces:!!V,dontFilter:l.dontFilter,filter:l.editor.activeFilter,enterMode:l.editor.activeEnterMode});y=F.document.createElement("body");y.setHtml(K);V&&(y.getFirst().remove(),y.getLast().remove());if((V=F.startPath().block)&&(1!=V.getChildCount()||!V.getBogus()))a:{var R;if(1==
y.getChildCount()&&b(R=y.getFirst())&&R.is(r)&&!R.hasAttribute("contenteditable")){V=R.getElementsByTag("*");F=0;for(t=V.count();F<t;F++)if(q=V.getItem(F),!q.is(H))break a;R.moveChildren(R.getParent(1));R.remove()}}l.dataWrapper=y;F=K}if(F){R=l.range;F=R.document;y=l.blockLimit;t=0;var L,V=[],da,O;K=z=0;var W,q=R.startContainer;Z=l.endPath.elements[0];var T,u=Z.getPosition(q),v=!!Z.getCommonAncestor(q)&&u!=CKEDITOR.POSITION_IDENTICAL&&!(u&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED),
q=e(l.dataWrapper,l);for(l.editor.enterMode!==CKEDITOR.ENTER_BR&&m(q,R);t<q.length;t++){u=q[t];if(p=u.isLineBreak)p=R,w=y,Y=C=void 0,u.hasBlockSibling?p=1:(C=p.startContainer.getAscendant(x.$block,1))&&C.is({div:1,p:1})?(Y=C.getPosition(w),Y==CKEDITOR.POSITION_IDENTICAL||Y==CKEDITOR.POSITION_CONTAINS?p=0:(w=p.splitElement(C),p.moveToPosition(w,CKEDITOR.POSITION_AFTER_START),p=1)):p=0;if(p)K=0<t;else{p=R.startPath();!u.isBlock&&d(l.editor,p.block,p.blockLimit)&&(O=f(l.editor))&&(O=F.createElement(O),
O.appendBogus(),R.insertNode(O),CKEDITOR.env.needsBrFiller&&(L=O.getBogus())&&L.remove(),R.moveToPosition(O,CKEDITOR.POSITION_BEFORE_END));if((p=R.startPath().block)&&!p.equals(da)){if(L=p.getBogus())L.remove(),V.push(p);da=p}u.firstNotAllowed&&(z=1);if(z&&u.isElement){p=R.startContainer;for(w=null;p&&!x[p.getName()][u.name];){if(p.equals(y)){p=null;break}w=p;p=p.getParent()}if(p)w&&(W=R.splitElement(w),l.zombies.push(W),l.zombies.push(w));else{w=y.getName();T=!t;p=t==q.length-1;w=h(u.node,w);C=[];
Y=w.length;for(var ba=0,ca=void 0,ga=0,ha=-1;ba<Y;ba++)ca=w[ba]," "==ca?(ga||T&&!ba||(C.push(new CKEDITOR.dom.text(" ")),ha=C.length),ga=1):(C.push(ca),ga=0);p&&ha==C.length&&C.pop();T=C}}if(T){for(;p=T.pop();)R.insertNode(p);T=0}else R.insertNode(u.node);u.lastNotAllowed&&t<q.length-1&&((W=v?Z:W)&&R.setEndAt(W,CKEDITOR.POSITION_AFTER_START),z=0);R.collapse()}}1!=q.length?L=!1:(L=q[0],L=L.isElement&&"false"==L.node.getAttribute("contenteditable"));L&&(K=!0,p=q[0].node,R.setStartAt(p,CKEDITOR.POSITION_BEFORE_START),
R.setEndAt(p,CKEDITOR.POSITION_AFTER_END));l.dontMoveCaret=K;l.bogusNeededBlocks=V}L=l.range;var fa;T=l.bogusNeededBlocks;for(da=L.createBookmark();O=l.zombies.pop();)O.getParent()&&(W=L.clone(),W.moveToElementEditStart(O),W.removeEmptyBlocksAtEnd());if(T)for(;O=T.pop();)CKEDITOR.env.needsBrFiller?O.appendBogus():O.append(L.document.createText(" "));for(;O=l.mergeCandidates.pop();)O.mergeSiblings();CKEDITOR.env.webkit&&L.startPath()&&(O=L.startPath(),O.block?O.block.$.normalize():O.blockLimit&&O.blockLimit.$.normalize());
L.moveToBookmark(da);if(!l.dontMoveCaret){for(O=k(L);O&&b(O)&&!O.is(x.$empty);){if(O.isBlockBoundary())L.moveToPosition(O,CKEDITOR.POSITION_BEFORE_END);else{if(g(O)&&O.getHtml().match(/(\s|&nbsp;)$/g)){fa=null;break}fa=L.clone();fa.moveToPosition(O,CKEDITOR.POSITION_BEFORE_END)}O=O.getLast(a)}fa&&L.moveToRange(fa)}}}}();z=function(){function a(c){c=new CKEDITOR.dom.walker(c);c.guard=function(a,c){if(c)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};c.evaluator=function(a){return a.type==
CKEDITOR.NODE_ELEMENT};return c}function c(a,d,b){d=a.getDocument().createElement(d);a.append(d,b);return d}function d(a){var c=a.count(),b;for(c;0<c--;)b=a.getItem(c),CKEDITOR.tools.trim(b.getHtml())||(b.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&b.getChildCount()&&b.getFirst().remove())}return function(b){var f=b.startContainer,e=f.getAscendant("table",1),h=!1;d(e.getElementsByTag("td"));d(e.getElementsByTag("th"));e=b.clone();e.setStart(f,0);e=a(e).lastBackward();e||(e=b.clone(),e.setEndAt(f,
CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),h=!0);e||(e=f);e.is("table")?(b.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),e.remove()):(e.is({tbody:1,thead:1,tfoot:1})&&(e=c(e,"tr",h)),e.is("tr")&&(e=c(e,e.getParent().is("thead")?"th":"td",h)),(f=e.getBogus())&&f.remove(),b.moveToPosition(e,h?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();u=function(){function a(c){c=new CKEDITOR.dom.walker(c);c.guard=function(a,c){if(c)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||
a.is(CKEDITOR.dtd.$listItem)};c.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$listItem)};return c}return function(c){var d=c.startContainer,b=!1,f;f=c.clone();f.setStart(d,0);f=a(f).lastBackward();f||(f=c.clone(),f.setEndAt(d,CKEDITOR.POSITION_BEFORE_END),f=a(f).lastForward(),b=!0);f||(f=d);f.is(CKEDITOR.dtd.$list)?(c.setStartAt(f,CKEDITOR.POSITION_BEFORE_START),c.collapse(!0),f.remove()):((d=f.getBogus())&&d.remove(),c.moveToPosition(f,b?CKEDITOR.POSITION_AFTER_START:
CKEDITOR.POSITION_BEFORE_END),c.select())}}();p={eol:{detect:function(a,c){var d=a.range,b=d.clone(),f=d.clone(),e=new CKEDITOR.dom.elementPath(d.startContainer,c),h=new CKEDITOR.dom.elementPath(d.endContainer,c);b.collapse(1);f.collapse();e.block&&b.checkBoundaryOfElement(e.block,CKEDITOR.END)&&(d.setStartAfter(e.block),a.prependEolBr=1);h.block&&f.checkBoundaryOfElement(h.block,CKEDITOR.START)&&(d.setEndBefore(h.block),a.appendEolBr=1)},fix:function(a,c){var d=c.getDocument(),b;a.appendEolBr&&(b=
this.createEolBr(d),a.fragment.append(b));!a.prependEolBr||b&&!b.getPrevious()||a.fragment.append(this.createEolBr(d),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var c=a.range.getBoundaryNodes(),d=c.startNode,c=c.endNode;!c||!r(c)||d&&d.equals(c)||a.range.setEndBefore(c)}},tree:{rebuild:function(a,c){var d=a.range,b=d.getCommonAncestor(),f=new CKEDITOR.dom.elementPath(b,c),e=new CKEDITOR.dom.elementPath(d.startContainer,c),
d=new CKEDITOR.dom.elementPath(d.endContainer,c),h;b.type==CKEDITOR.NODE_TEXT&&(b=b.getParent());if(f.blockLimit.is({tr:1,table:1})){var k=f.contains("table").getParent();h=function(a){return!a.equals(k)}}else if(f.block&&f.block.is(CKEDITOR.dtd.$listItem)&&(e=e.contains(CKEDITOR.dtd.$list),d=d.contains(CKEDITOR.dtd.$list),!e.equals(d))){var g=f.contains(CKEDITOR.dtd.$list).getParent();h=function(a){return!a.equals(g)}}h||(h=function(a){return!a.equals(f.block)&&!a.equals(f.blockLimit)});this.rebuildFragment(a,
c,b,h)},rebuildFragment:function(a,c,d,b){for(var f;d&&!d.equals(c)&&b(d);)f=d.clone(0,1),a.fragment.appendTo(f),a.fragment=f,d=d.getParent()}},cell:{shrink:function(a){a=a.range;var c=a.startContainer,d=a.endContainer,b=a.startOffset,f=a.endOffset;c.type==CKEDITOR.NODE_ELEMENT&&c.equals(d)&&c.is("tr")&&++b==f&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};w=function(){function a(c,d){var b=c.getParent();if(b.is(CKEDITOR.dtd.$inline))c[d?"insertBefore":"insertAfter"](b)}function c(d,b,f){a(b);a(f,1);for(var e;e=
f.getNext();)e.insertAfter(b),b=e;t(d)&&d.remove()}function b(a,c){var d=new CKEDITOR.dom.range(a);d.setStartAfter(c.startNode);d.setEndBefore(c.endNode);return d}return{list:{detectMerge:function(a,c){var d=b(c,a.bookmark),f=d.startPath(),e=d.endPath(),h=f.contains(CKEDITOR.dtd.$list),k=e.contains(CKEDITOR.dtd.$list);a.mergeList=h&&k&&h.getParent().equals(k.getParent())&&!h.equals(k);a.mergeListItems=f.block&&e.block&&f.block.is(CKEDITOR.dtd.$listItem)&&e.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||
a.mergeListItems)d=d.clone(),d.setStartBefore(a.bookmark.startNode),d.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=d.createBookmark()},merge:function(a,d){if(a.mergeListBookmark){var b=a.mergeListBookmark.startNode,f=a.mergeListBookmark.endNode,e=new CKEDITOR.dom.elementPath(b,d),h=new CKEDITOR.dom.elementPath(f,d);if(a.mergeList){var k=e.contains(CKEDITOR.dtd.$list),g=h.contains(CKEDITOR.dtd.$list);k.equals(g)||(g.moveChildren(k),g.remove())}a.mergeListItems&&(e=e.contains(CKEDITOR.dtd.$listItem),
h=h.contains(CKEDITOR.dtd.$listItem),e.equals(h)||c(h,b,f));b.remove();f.remove()}}},block:{detectMerge:function(a,c){if(!a.tableContentsRanges&&!a.mergeListBookmark){var d=new CKEDITOR.dom.range(c);d.setStartBefore(a.bookmark.startNode);d.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=d.createBookmark()}},merge:function(a,d){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var b=a.mergeBlockBookmark.startNode,f=a.mergeBlockBookmark.endNode,e=new CKEDITOR.dom.elementPath(b,d),h=new CKEDITOR.dom.elementPath(f,
d),e=e.block,h=h.block;e&&h&&!e.equals(h)&&c(h,b,f);b.remove();f.remove()}}},table:function(){function a(b){var f=[],e,h=new CKEDITOR.dom.walker(b),k=b.startPath().contains(d),g=b.endPath().contains(d),n={};h.guard=function(a,h){if(a.type==CKEDITOR.NODE_ELEMENT){var m="visited_"+(h?"out":"in");if(a.getCustomData(m))return;CKEDITOR.dom.element.setMarker(n,a,m,1)}if(h&&k&&a.equals(k))e=b.clone(),e.setEndAt(k,CKEDITOR.POSITION_BEFORE_END),f.push(e);else if(!h&&g&&a.equals(g))e=b.clone(),e.setStartAt(g,
CKEDITOR.POSITION_AFTER_START),f.push(e);else{if(m=!h)m=a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&(!k||c(a,k))&&(!g||c(a,g));if(!m&&(m=h))if(a.is(d))var m=k&&k.getAscendant("table",!0),l=g&&g.getAscendant("table",!0),x=a.getAscendant("table",!0),m=m&&m.contains(x)||l&&l.contains(x);else m=void 0;m&&(e=b.clone(),e.selectNodeContents(a),f.push(e))}};h.lastForward();CKEDITOR.dom.element.clearAllMarkers(n);return f}function c(a,d){var b=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,f=a.getPosition(d);
return f===CKEDITOR.POSITION_IDENTICAL?!1:0===(f&b)}var d={td:1,th:1,caption:1};return{detectPurge:function(a){var c=a.range,b=c.clone();b.enlarge(CKEDITOR.ENLARGE_ELEMENT);var b=new CKEDITOR.dom.walker(b),f=0;b.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&++f};b.checkForward();if(1<f){var b=c.startPath().contains("table"),e=c.endPath().contains("table");b&&e&&c.checkBoundaryOfElement(b,CKEDITOR.START)&&c.checkBoundaryOfElement(e,CKEDITOR.END)&&(c=a.range.clone(),c.setStartBefore(b),
c.setEndAfter(e),a.purgeTableBookmark=c.createBookmark())}},detectRanges:function(f,e){var h=b(e,f.bookmark),k=h.clone(),g,n,m=h.getCommonAncestor();m.is(CKEDITOR.dtd.$tableContent)&&!m.is(d)&&(m=m.getAscendant("table",!0));n=m;m=new CKEDITOR.dom.elementPath(h.startContainer,n);n=new CKEDITOR.dom.elementPath(h.endContainer,n);m=m.contains("table");n=n.contains("table");if(m||n)m&&n&&c(m,n)?(f.tableSurroundingRange=k,k.setStartAt(m,CKEDITOR.POSITION_AFTER_END),k.setEndAt(n,CKEDITOR.POSITION_BEFORE_START),
k=h.clone(),k.setEndAt(m,CKEDITOR.POSITION_AFTER_END),g=h.clone(),g.setStartAt(n,CKEDITOR.POSITION_BEFORE_START),g=a(k).concat(a(g))):m?n||(f.tableSurroundingRange=k,k.setStartAt(m,CKEDITOR.POSITION_AFTER_END),h.setEndAt(m,CKEDITOR.POSITION_AFTER_END)):(f.tableSurroundingRange=k,k.setEndAt(n,CKEDITOR.POSITION_BEFORE_START),h.setStartAt(n,CKEDITOR.POSITION_AFTER_START)),f.tableContentsRanges=g?g:a(h)},deleteRanges:function(a){for(var c;c=a.tableContentsRanges.pop();)c.extractContents(),t(c.startContainer)&&
c.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var c=a.doc,d=a.range.clone(),c=c.createElement("p");c.insertBefore(a.purgeTableBookmark.startNode);d.moveToBookmark(a.purgeTableBookmark);d.deleteContents();a.range.moveToPosition(c,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,c){var b=c.startPath(),e;d(a,b.block,b.blockLimit)&&(e=f(a))&&(e=c.document.createElement(e),e.appendBogus(),c.insertNode(e),c.moveToPosition(e,CKEDITOR.POSITION_AFTER_START))}}}()}(),function(){function b(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function g(a,c){if(0===a.length||b(a[0].getEnclosedNode()))return!1;var d,f;if((d=!c&&
1===a.length)&&!(d=a[0].collapsed)){var e=a[0];d=e.startContainer.getAscendant({td:1,th:1},!0);var h=e.endContainer.getAscendant({td:1,th:1},!0);f=CKEDITOR.tools.trim;d&&d.equals(h)&&!d.findOne("td, th, tr, tbody, table")?(e=e.cloneContents(),d=e.getFirst()?f(e.getFirst().getText())!==f(d.getText()):!0):d=!1}if(d)return!1;for(f=0;f<a.length;f++)if(d=a[f]._getTableElement(),!d)return!1;return!0}function e(a){function c(a){a=a.find("td, th");var d=[],b;for(b=0;b<a.count();b++)d.push(a.getItem(b));return d}
var d=[],b,f;for(f=0;f<a.length;f++)b=a[f]._getTableElement(),b.is&&b.is({td:1,th:1})?d.push(b):d=d.concat(c(b));return d}function a(a){a=e(a);var c="",d=[],b,f;for(f=0;f<a.length;f++)b&&!b.equals(a[f].getAscendant("tr"))?(c+=d.join("\t")+"\n",b=a[f].getAscendant("tr"),d=[]):0===f&&(b=a[f].getAscendant("tr")),d.push(a[f].getText());return c+=d.join("\t")}function h(c){var d=this.root.editor,b=d.getSelection(1);this.reset();u=!0;b.root.once("selectionchange",function(a){a.cancel()},null,null,0);b.selectRanges([c[0]]);
b=this._.cache;b.ranges=new CKEDITOR.dom.rangeList(c);b.type=CKEDITOR.SELECTION_TEXT;b.selectedElement=c[0]._getTableElement();b.selectedText=a(c);b.nativeSel=null;this.isFake=1;this.rev=A++;d._.fakeSelection=this;u=!1;this.root.fire("selectionchange")}function k(){var a=this._.fakeSelection,c;if(a){c=this.getSelection(1);var d;if(!(d=!c)&&(d=!c.isHidden())){d=a;var f=c.getRanges(),e=d.getRanges(),h=f.length&&f[0]._getTableElement()&&f[0]._getTableElement().getAscendant("table",!0),k=e.length&&e[0]._getTableElement()&&
e[0]._getTableElement().getAscendant("table",!0),n=1===f.length&&f[0]._getTableElement()&&f[0]._getTableElement().is("table"),m=1===e.length&&e[0]._getTableElement()&&e[0]._getTableElement().is("table");if(b(d.getSelectedElement()))d=!1;else{var l=1===f.length&&f[0].collapsed,e=g(f,!!CKEDITOR.env.webkit)&&g(e);h=h&&k?h.equals(k)||k.contains(h):!1;h&&(l||e)?(n&&!m&&d.selectRanges(f),d=!0):d=!1}d=!d}d&&(a.reset(),a=0)}if(!a&&(a=c||this.getSelection(1),!a||a.getType()==CKEDITOR.SELECTION_NONE))return;
this.fire("selectionCheck",a);c=this.elementPath();c.compare(this._.selectionPreviousPath)||(d=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(c.blockLimit),!CKEDITOR.env.webkit&&!CKEDITOR.env.gecko||d||(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=c,this.fire("selectionChange",{selection:a,path:c}))}function m(){w=!0;p||(l.call(this),p=CKEDITOR.tools.setTimeout(l,200,this))}function l(){p=null;w&&(CKEDITOR.tools.setTimeout(k,0,this),w=
!1)}function d(a){return C(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function f(a){function c(d,b){return d&&d.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(b?"End":"Start")](d):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;var b=a.startContainer,f=a.getPreviousNode(d,null,b),e=a.getNextNode(d,null,b);return c(f)||c(e,1)||!(f||e||b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()&&b.getBogus())?!0:!1}function c(a){n(a,!1);var c=a.getDocument().createText(v);
a.setCustomData("cke-fillingChar",c);return c}function n(a,c){var d=a&&a.removeCustomData("cke-fillingChar");if(d){if(!1!==c){var b=a.getDocument().getSelection().getNative(),f=b&&"None"!=b.type&&b.getRangeAt(0),e=v.length;if(d.getLength()>e&&f&&f.intersectsNode(d.$)){var h=[{node:b.anchorNode,offset:b.anchorOffset},{node:b.focusNode,offset:b.focusOffset}];b.anchorNode==d.$&&b.anchorOffset>e&&(h[0].offset-=e);b.focusNode==d.$&&b.focusOffset>e&&(h[1].offset-=e)}}d.setText(x(d.getText(),1));h&&(d=a.getDocument().$,
b=d.getSelection(),d=d.createRange(),d.setStart(h[0].node,h[0].offset),d.collapse(!0),b.removeAllRanges(),b.addRange(d),b.extend(h[1].node,h[1].offset))}}function x(a,c){return c?a.replace(z,function(a,c){return c?" ":""}):a.replace(v,"")}function y(a,c){var d=c&&CKEDITOR.tools.htmlEncode(c)||"\x26nbsp;",d=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'+d+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(d);var b=a.getSelection(1),f=a.createRange(),e=b.root.on("selectionchange",function(a){a.cancel()},null,null,0);f.setStartAt(d,CKEDITOR.POSITION_AFTER_START);f.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);b.selectRanges([f]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=d}function q(a){var c={37:1,39:1,8:1,46:1};return function(d){var f=d.data.getKeystroke();if(c[f]){var e=a.getSelection(),h=e.getRanges()[0];
e.isCollapsed()&&(h=h[38>f?"getPreviousEditableNode":"getNextEditableNode"]())&&h.type==CKEDITOR.NODE_ELEMENT&&"false"==h.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(h),d.data.preventDefault(),d.cancel())}}}function t(a){for(var c=0;c<a.length;c++){var d=a[c];d.getCommonAncestor().isReadOnly()&&a.splice(c,1);if(!d.collapsed){if(d.startContainer.isReadOnly())for(var b=
d.startContainer,f;b&&!((f=b.type==CKEDITOR.NODE_ELEMENT)&&b.is("body")||!b.isReadOnly());)f&&"false"==b.getAttribute("contentEditable")&&d.setStartAfter(b),b=b.getParent();b=d.startContainer;f=d.endContainer;var e=d.startOffset,h=d.endOffset,k=d.clone();b&&b.type==CKEDITOR.NODE_TEXT&&(e>=b.getLength()?k.setStartAfter(b):k.setStartBefore(b));f&&f.type==CKEDITOR.NODE_TEXT&&(h?k.setEndAfter(f):k.setEndBefore(f));b=new CKEDITOR.dom.walker(k);b.evaluator=function(b){if(b.type==CKEDITOR.NODE_ELEMENT&&
b.isReadOnly()){var f=d.clone();d.setEndBefore(b);d.collapsed&&a.splice(c--,1);b.getPosition(k.endContainer)&CKEDITOR.POSITION_CONTAINS||(f.setStartAfter(b),f.collapsed||a.splice(c+1,0,f));return!0}return!1};b.next()}}return a}var r="function"!=typeof window.getSelection,A=1,v=CKEDITOR.tools.repeat("​",7),z=new RegExp(v+"( )?","g"),u,p,w,C=CKEDITOR.dom.walker.invisible(1),J=function(){function a(c){return function(a){var d=a.editor.createRange();d.moveToClosestEditablePosition(a.selected,c)&&a.editor.getSelection().selectRanges([d]);
return!1}}function c(a){return function(c){var d=c.editor,b=d.createRange(),f;if(!d.readOnly)return(f=b.moveToClosestEditablePosition(c.selected,a))||(f=b.moveToClosestEditablePosition(c.selected,!a)),f&&d.getSelection().selectRanges([b]),d.fire("saveSnapshot"),c.selected.remove(),f||(b.moveToElementEditablePosition(d.editable()),d.getSelection().selectRanges([b])),d.fire("saveSnapshot"),!1}}var d=a(),b=a(1);return{37:d,38:d,39:b,40:b,8:c(),46:c(1)}}();CKEDITOR.on("instanceCreated",function(a){function c(){var a=
d.getSelection();a&&a.removeAllRanges()}var d=a.editor;d.on("contentDom",function(){function a(){D=new CKEDITOR.dom.selection(d.getSelection());D.lock()}function c(){h.removeListener("mouseup",c);x.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,d=a.createRange();"None"!=a.type&&d.parentElement()&&d.parentElement().ownerDocument==e.$&&d.select()}function b(a){var c,d;c=(c=this.document.getActive())?"input"===c.getName()||"textarea"===c.getName():!1;c||(c=this.getSelection(1),(d=f(c))&&
!d.equals(g)&&(c.selectElement(d),a.data.preventDefault()))}function f(a){a=a.getRanges()[0];return a?(a=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")},!0))&&"false"===a.getAttribute("contenteditable")?a:null:null}var e=d.document,h=CKEDITOR.document,g=d.editable(),l=e.getBody(),x=e.getDocumentElement(),y=g.isInline(),u,D;CKEDITOR.env.gecko&&g.attachListener(g,"focus",function(a){a.removeListener();0!==u&&(a=d.getSelection().getNative())&&
a.isCollapsed&&a.anchorNode==g.$&&(a=d.createRange(),a.moveToElementEditStart(g),a.select())},null,null,-2);g.attachListener(g,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){if(u&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){u=d._.previousActive&&d._.previousActive.equals(e.getActive());var a=null!=d._.previousScrollTop&&d._.previousScrollTop!=g.$.scrollTop;CKEDITOR.env.webkit&&u&&a&&(g.$.scrollTop=d._.previousScrollTop)}d.unlockSelection(u);u=0},null,null,-1);g.attachListener(g,
"mousedown",function(){u=0});if(CKEDITOR.env.ie||CKEDITOR.env.gecko||y)r?g.attachListener(g,"beforedeactivate",a,null,null,-1):g.attachListener(d,"selectionCheck",a,null,null,-1),g.attachListener(g,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusout":"blur",function(){var a=D&&(D.isFake||2>D.getRanges().length);CKEDITOR.env.gecko&&!y&&a||(d.lockSelection(D),u=1)},null,null,-1),g.attachListener(g,"mousedown",function(){u=0});if(CKEDITOR.env.ie&&!y){var t;g.attachListener(g,"mousedown",function(a){2==
a.data.$.button&&((a=d.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(t=d.window.getScrollPosition()))});g.attachListener(g,"mouseup",function(a){2==a.data.$.button&&t&&(d.document.$.documentElement.scrollLeft=t.x,d.document.$.documentElement.scrollTop=t.y);t=null});if("BackCompat"!=e.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var p,v;x.on("mousedown",function(a){function c(a){a=a.data.$;if(p){var d=l.$.createTextRange();try{d.moveToPoint(a.clientX,a.clientY)}catch(b){}p.setEndPoint(0>
v.compareEndPoints("StartToStart",d)?"EndToEnd":"StartToStart",d);p.select()}}function d(){x.removeListener("mousemove",c);h.removeListener("mouseup",d);x.removeListener("mouseup",d);p.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<x.$.clientHeight&&a.$.x<x.$.clientWidth){p=l.$.createTextRange();try{p.moveToPoint(a.$.clientX,a.$.clientY)}catch(b){}v=p.duplicate();x.on("mousemove",c);h.on("mouseup",d);x.on("mouseup",d)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)x.on("mousedown",function(a){a.data.getTarget().is("html")&&
(h.on("mouseup",c),x.on("mouseup",c))})}}g.attachListener(g,"selectionchange",k,d);g.attachListener(g,"keyup",m,d);g.attachListener(g,"touchstart",m,d);g.attachListener(g,"touchend",m,d);CKEDITOR.env.ie&&g.attachListener(g,"keydown",b,d);g.attachListener(g,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){d.forceNextSelectionCheck();d.selectionChange(1)});if(y&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var w;g.attachListener(g,"mousedown",function(){w=1});g.attachListener(e.getDocumentElement(),
"mouseup",function(){w&&m.call(d);w=0})}else g.attachListener(CKEDITOR.env.ie?g:e.getDocumentElement(),"mouseup",m,d);CKEDITOR.env.webkit&&g.attachListener(e,"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:g.hasFocus&&n(g)}},null,null,-1);g.attachListener(g,"keydown",q(d),null,null,-1)});d.on("setData",function(){d.unlockSelection();CKEDITOR.env.webkit&&c()});d.on("contentDomUnload",function(){d.unlockSelection()});if(CKEDITOR.env.ie9Compat)d.on("beforeDestroy",
c,null,null,9);d.on("dataReady",function(){delete d._.fakeSelection;delete d._.hiddenSelectionContainer;d.selectionChange(1)});d.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),c=d.editable().getLast(a);c&&c.hasAttribute("data-cke-hidden-sel")&&(c.remove(),CKEDITOR.env.gecko&&(a=d.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);d.on("key",function(a){if("wysiwyg"==d.mode){var c=d.getSelection();if(c.isFake){var b=
J[a.data.keyCode];if(b)return b({editor:d,selected:c.getSelectedElement(),selection:c,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var c=a.editor;c.on("selectionChange",function(){var a=c.editable(),d=a.getCustomData("cke-fillingChar");d&&(d.getCustomData("ready")?(n(a),a.editor.fire("selectionCheck")):d.setCustomData("ready",1))},null,null,-1);c.on("beforeSetMode",function(){n(c.editable())},null,null,-1);c.on("getSnapshot",function(a){a.data&&(a.data=x(a.data))},
c,null,20);c.on("toDataFormat",function(a){a.data.dataValue=x(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?k:m).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 c=this.getSelection();
return c&&c.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 c=this._.savedSelection;return c?(c.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 c=a;a=a.root}var d=a instanceof CKEDITOR.dom.element;this.rev=c?c.rev:A++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=
d?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(c)return CKEDITOR.tools.extend(this._.cache,c._.cache),this.isFake=c.isFake,this.isLocked=c.isLocked,this;a=this.getNative();var b,f;if(a)if(a.getRangeAt)b=(f=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(f.commonAncestorContainer);else{try{f=a.createRange()}catch(e){}b=f&&CKEDITOR.dom.element.get(f.item&&f.item(0)||f.parentElement())}if(!b||b.type!=CKEDITOR.NODE_ELEMENT&&b.type!=CKEDITOR.NODE_TEXT||!this.root.equals(b)&&!this.root.contains(b))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 B={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:x,_createFillingCharSequenceNode:c,FILLING_CHAR_SEQUENCE:v});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==
this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=r?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:r?function(){var a=this._.cache;if(a.type)return a.type;var c=CKEDITOR.SELECTION_NONE;try{var d=this.getNative(),b=d.type;"Text"==b&&(c=CKEDITOR.SELECTION_TEXT);"Control"==b&&(c=CKEDITOR.SELECTION_ELEMENT);d.createRange().parentElement()&&(c=CKEDITOR.SELECTION_TEXT)}catch(f){}return a.type=c}:function(){var a=this._.cache;if(a.type)return a.type;var c=
CKEDITOR.SELECTION_TEXT,d=this.getNative();if(!d||!d.rangeCount)c=CKEDITOR.SELECTION_NONE;else if(1==d.rangeCount){var d=d.getRangeAt(0),b=d.startContainer;b==d.endContainer&&1==b.nodeType&&1==d.endOffset-d.startOffset&&B[b.childNodes[d.startOffset].nodeName.toLowerCase()]&&(c=CKEDITOR.SELECTION_ELEMENT)}return a.type=c},getRanges:function(){var a=r?function(){function a(c){return(new CKEDITOR.dom.node(c)).getIndex()}var c=function(c,d){c=c.duplicate();c.collapse(d);var b=c.parentElement();if(!b.hasChildNodes())return{container:b,
offset:0};for(var f=b.children,e,h,g=c.duplicate(),k=0,n=f.length-1,m=-1,l,x;k<=n;)if(m=Math.floor((k+n)/2),e=f[m],g.moveToElementText(e),l=g.compareEndPoints("StartToStart",c),0<l)n=m-1;else if(0>l)k=m+1;else return{container:b,offset:a(e)};if(-1==m||m==f.length-1&&0>l){g.moveToElementText(b);g.setEndPoint("StartToStart",c);g=g.text.replace(/(\r\n|\r)/g,"\n").length;f=b.childNodes;if(!g)return e=f[f.length-1],e.nodeType!=CKEDITOR.NODE_TEXT?{container:b,offset:f.length}:{container:e,offset:e.nodeValue.length};
for(b=f.length;0<g&&0<b;)h=f[--b],h.nodeType==CKEDITOR.NODE_TEXT&&(x=h,g-=h.nodeValue.length);return{container:x,offset:-g}}g.collapse(0<l?!0:!1);g.setEndPoint(0<l?"StartToStart":"EndToStart",c);g=g.text.replace(/(\r\n|\r)/g,"\n").length;if(!g)return{container:b,offset:a(e)+(0<l?0:1)};for(;0<g;)try{h=e[0<l?"previousSibling":"nextSibling"],h.nodeType==CKEDITOR.NODE_TEXT&&(g-=h.nodeValue.length,x=h),e=h}catch(r){return{container:b,offset:a(e)}}return{container:x,offset:0<l?-g:x.nodeValue.length+g}};
return function(){var a=this.getNative(),d=a&&a.createRange(),b=this.getType();if(!a)return[];if(b==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),b=c(d,!0),a.setStart(new CKEDITOR.dom.node(b.container),b.offset),b=c(d),a.setEnd(new CKEDITOR.dom.node(b.container),b.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse(),[a];if(b==CKEDITOR.SELECTION_ELEMENT){for(var b=[],f=0;f<d.length;f++){for(var e=
d.item(f),h=e.parentNode,g=0,a=new CKEDITOR.dom.range(this.root);g<h.childNodes.length&&h.childNodes[g]!=e;g++);a.setStart(new CKEDITOR.dom.node(h),g);a.setEnd(new CKEDITOR.dom.node(h),g+1);b.push(a)}return b}return[]}}():function(){var a=[],c,d=this.getNative();if(!d)return a;for(var b=0;b<d.rangeCount;b++){var f=d.getRangeAt(b);c=new CKEDITOR.dom.range(this.root);c.setStart(new CKEDITOR.dom.node(f.startContainer),f.startOffset);c.setEnd(new CKEDITOR.dom.node(f.endContainer),f.endOffset);a.push(c)}return a};
return function(c){var d=this._.cache,b=d.ranges;b||(d.ranges=b=new CKEDITOR.dom.rangeList(a.call(this)));return c?t(new CKEDITOR.dom.rangeList(b.slice())):b}}(),getStartElement:function(){var a=this._.cache;if(void 0!==a.startElement)return a.startElement;var c;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var d=this.getRanges()[0];if(d){if(d.collapsed)c=d.startContainer,c.type!=CKEDITOR.NODE_ELEMENT&&(c=c.getParent());else{for(d.optimize();c=
d.startContainer,d.startOffset==(c.getChildCount?c.getChildCount():c.getLength())&&!c.isBlockBoundary();)d.setStartAfter(c);c=d.startContainer;if(c.type!=CKEDITOR.NODE_ELEMENT)return c.getParent();if((c=c.getChild(d.startOffset))&&c.type==CKEDITOR.NODE_ELEMENT)for(d=c.getFirst();d&&d.type==CKEDITOR.NODE_ELEMENT;)c=d,d=d.getFirst();else c=d.startContainer}c=c.$}}return a.startElement=c?new CKEDITOR.dom.element(c):null},getSelectedElement:function(){var a=this._.cache;if(void 0!==a.selectedElement)return a.selectedElement;
var c=this,d=CKEDITOR.tools.tryThese(function(){return c.getNative().createRange().item(0)},function(){for(var a=c.getRanges()[0].clone(),d,b,f=2;f&&!((d=a.getEnclosedNode())&&d.type==CKEDITOR.NODE_ELEMENT&&B[d.getName()]&&(b=d));f--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return b&&b.$});return a.selectedElement=d?new CKEDITOR.dom.element(d):null},getSelectedText:function(){var a=this._.cache;if(void 0!==a.selectedText)return a.selectedText;var c=this.getNative(),c=r?"Control"==c.type?"":c.createRange().text:
c.toString();return a.selectedText=c},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 c=this.getSelectedElement(),d=this.getRanges(),b=this.isFake;this.isLocked=0;this.reset();a&&(a=c||d[0]&&d[0].getCommonAncestor())&&a.getAscendant("body",1)&&((a=this.root.editor)&&a.plugins.tableselection&&a.plugins.tableselection.isSupportedEnvironment(a)&&g(d)?h.call(this,
d):b?this.fake(c):c&&2>d.length?this.selectElement(c):this.selectRanges(d))}},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 c=a._.hiddenSelectionContainer;if(c){var d=a.checkDirty();a.fire("lockSnapshot");c.remove();a.fire("unlockSnapshot");!d&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=A++},selectElement:function(a){var c=new CKEDITOR.dom.range(this.root);
c.setStartBefore(a);c.setEndAfter(a);this.selectRanges([c])},selectRanges:function(a){var d=this.root.editor,b=d&&d._.hiddenSelectionContainer;this.reset();if(b)for(var b=this.root,e,k=0;k<a.length;++k)e=a[k],e.endContainer.equals(b)&&(e.endOffset=Math.min(e.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 x,H;if(1==a.length&&!(H=a[0]).collapsed&&(l=H.getEnclosedNode())&&
l.type==CKEDITOR.NODE_ELEMENT&&(H=H.clone(),H.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(x=H.getEnclosedNode())&&x.type==CKEDITOR.NODE_ELEMENT&&(l=x),"false"==l.getAttribute("contenteditable")))break a;l=void 0}if(l)this.fake(l);else if(d&&d.plugins.tableselection&&d.plugins.tableselection.isSupportedEnvironment(d)&&g(a)&&!u&&!a[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored"))h.call(this,a);else{if(r){x=CKEDITOR.dom.walker.whitespaces(!0);l=/\ufeff|\u00a0/;H={table:1,tbody:1,
tr:1};1<a.length&&(d=a[a.length-1],a[0].setEnd(d.endContainer,d.endOffset));d=a[0];a=d.collapsed;var F,y,q;if((b=d.getEnclosedNode())&&b.type==CKEDITOR.NODE_ELEMENT&&b.getName()in B&&(!b.is("a")||!b.getText()))try{q=b.$.createControlRange();q.addElement(b.$);q.select();return}catch(t){}if(d.startContainer.type==CKEDITOR.NODE_ELEMENT&&d.startContainer.getName()in H||d.endContainer.type==CKEDITOR.NODE_ELEMENT&&d.endContainer.getName()in H)d.shrink(CKEDITOR.NODE_ELEMENT,!0),a=d.collapsed;q=d.createBookmark();
H=q.startNode;a||(m=q.endNode);q=d.document.$.body.createTextRange();q.moveToElementText(H.$);q.moveStart("character",1);m?(l=d.document.$.body.createTextRange(),l.moveToElementText(m.$),q.setEndPoint("EndToEnd",l),q.moveEnd("character",-1)):(F=H.getNext(x),y=H.hasAscendant("pre"),F=!(F&&F.getText&&F.getText().match(l))&&(y||!H.hasPrevious()||H.getPrevious().is&&H.getPrevious().is("br")),y=d.document.createElement("span"),y.setHtml("\x26#65279;"),y.insertBefore(H),F&&d.document.createText("﻿").insertBefore(H));
d.setStartBefore(H);H.remove();a?(F?(q.moveStart("character",-1),q.select(),d.document.$.selection.clear()):q.select(),d.moveToPosition(y,CKEDITOR.POSITION_BEFORE_START),y.remove()):(d.setEndBefore(m),m.remove(),q.select())}else{m=this.getNative();if(!m)return;this.removeAllRanges();for(q=0;q<a.length;q++){if(q<a.length-1&&(F=a[q],y=a[q+1],l=F.clone(),l.setStart(F.endContainer,F.endOffset),l.setEnd(y.startContainer,y.startOffset),!l.collapsed&&(l.shrink(CKEDITOR.NODE_ELEMENT,!0),d=l.getCommonAncestor(),
l=l.getEnclosedNode(),d.isReadOnly()||l&&l.isReadOnly()))){y.setStart(F.startContainer,F.startOffset);a.splice(q--,1);continue}d=a[q];y=this.document.$.createRange();d.collapsed&&CKEDITOR.env.webkit&&f(d)&&(l=c(this.root),d.insertNode(l),(F=l.getNext())&&!l.getPrevious()&&F.type==CKEDITOR.NODE_ELEMENT&&"br"==F.getName()?(n(this.root),d.moveToPosition(F,CKEDITOR.POSITION_BEFORE_START)):d.moveToPosition(l,CKEDITOR.POSITION_AFTER_END));y.setStart(d.startContainer.$,d.startOffset);try{y.setEnd(d.endContainer.$,
d.endOffset)}catch(p){if(0<=p.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))d.collapse(1),y.setEnd(d.endContainer.$,d.endOffset);else throw p;}m.addRange(y)}}this.reset();this.root.fire("selectionchange")}}},fake:function(a,c){var d=this.root.editor;void 0===c&&a.hasAttribute("aria-label")&&(c=a.getAttribute("aria-label"));this.reset();y(d,c);var b=this._.cache,f=new CKEDITOR.dom.range(this.root);f.setStartBefore(a);f.setEndAfter(a);b.ranges=new CKEDITOR.dom.rangeList(f);b.selectedElement=b.startElement=
a;b.type=CKEDITOR.SELECTION_ELEMENT;b.selectedText=b.nativeSel=null;this.isFake=1;this.rev=A++;d._.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 g(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 c=[],d,b=0;b<a.length;b++){var f=new CKEDITOR.dom.range(this.root);f.moveToBookmark(a[b]);c.push(f)}a.isFake&&(d=g(c)?c[0]._getTableElement():c[0].getEnclosedNode(),d&&d.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake&&!g(c)?this.fake(d):this.selectRanges(c);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[r?"empty":"removeAllRanges"]()}catch(c){}this.reset()}}}}(),"use strict",CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function b(a,c){for(var d,b;(a=a.getParent())&&
!a.equals(c);)if(a.getAttribute("data-nostyle"))d=a;else if(!b){var f=a.getAttribute("contentEditable");"false"==f?d=a:"true"==f&&(b=1)}return d}function g(a,c,d,b){return(a.getPosition(c)|b)==b&&(!d.childRule||d.childRule(a))}function e(a){var c=a.document;if(a.collapsed)c=A(this,c),a.insertNode(c),a.moveToPosition(c,CKEDITOR.POSITION_BEFORE_END);else{var d=this.element,f=this._.definition,k,n=f.ignoreReadonly,m=n||f.includeReadonly;null==m&&(m=a.root.getCustomData("cke_includeReadonly"));var l=
CKEDITOR.dtd[d];l||(k=!0,l=CKEDITOR.dtd.span);a.enlarge(CKEDITOR.ENLARGE_INLINE,1);a.trim();var x=a.createBookmark(),r=x.startNode,y=x.endNode,u=r,t;if(!n){var p=a.getCommonAncestor(),n=b(r,p),p=b(y,p);n&&(u=n.getNextSourceNode(!0));p&&(y=p)}for(u.getPosition(y)==CKEDITOR.POSITION_FOLLOWING&&(u=0);u;){n=!1;if(u.equals(y))u=null,n=!0;else{var v=u.type==CKEDITOR.NODE_ELEMENT?u.getName():null,p=v&&"false"==u.getAttribute("contentEditable"),w=v&&-1!==CKEDITOR.tools.array.indexOf(CKEDITOR.style.unstylableElements,
v),w=v&&(u.getAttribute("data-nostyle")||w);if(v&&u.data("cke-bookmark")||u.type===CKEDITOR.NODE_COMMENT){u=u.getNextSourceNode(!0);continue}if(p&&m&&CKEDITOR.dtd.$block[v])for(var D=u,z=h(D),B=void 0,C=z.length,L=0,D=C&&new CKEDITOR.dom.range(D.getDocument());L<C;++L){var B=z[L],da=CKEDITOR.filter.instances[B.data("cke-filter")];if(da?da.check(this):1)D.selectNodeContents(B),e.call(this,D)}z=v?!l[v]||w?0:p&&!m?0:g(u,y,f,P):1;if(z)if(B=u.getParent(),z=f,C=d,L=k,!B||!(B.getDtd()||CKEDITOR.dtd.span)[C]&&
!L||z.parentRule&&!z.parentRule(B))n=!0;else{if(t||v&&CKEDITOR.dtd.$removeEmpty[v]&&(u.getPosition(y)|P)!=P||(t=a.clone(),t.setStartBefore(u)),v=u.type,v==CKEDITOR.NODE_TEXT||p||v==CKEDITOR.NODE_ELEMENT&&!u.getChildCount()){for(var v=u,O;(n=!v.getNext(G))&&(O=v.getParent(),l[O.getName()])&&g(O,r,f,M);)v=O;t.setEndAfter(v)}}else n=!0;u=u.getNextSourceNode(w||p)}if(n&&t&&!t.collapsed){for(var n=A(this,c),p=n.hasAttributes(),w=t.getCommonAncestor(),v={},z={},B={},C={},W,T,ca;n&&w;){if(w.getName()==d){for(W in f.attributes)!C[W]&&
(ca=w.getAttribute(T))&&(n.getAttribute(W)==ca?z[W]=1:C[W]=1);for(T in f.styles)!B[T]&&(ca=w.getStyle(T))&&(n.getStyle(T)==ca?v[T]=1:B[T]=1)}w=w.getParent()}for(W in z)n.removeAttribute(W);for(T in v)n.removeStyle(T);p&&!n.hasAttributes()&&(n=null);n?(t.extractContents().appendTo(n),t.insertNode(n),q.call(this,n),n.mergeSiblings(),CKEDITOR.env.ie||n.$.normalize()):(n=new CKEDITOR.dom.element("span"),t.extractContents().appendTo(n),t.insertNode(n),q.call(this,n),n.remove(!0));t=null}}a.moveToBookmark(x);
a.shrink(CKEDITOR.SHRINK_TEXT);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function a(a){function c(){for(var a=new CKEDITOR.dom.elementPath(b.getParent()),d=new CKEDITOR.dom.elementPath(m.getParent()),f=null,e=null,h=0;h<a.elements.length;h++){var g=a.elements[h];if(g==a.block||g==a.blockLimit)break;l.checkElementRemovable(g,!0)&&(f=g)}for(h=0;h<d.elements.length;h++){g=d.elements[h];if(g==d.block||g==d.blockLimit)break;l.checkElementRemovable(g,!0)&&(e=g)}e&&m.breakParent(e);f&&b.breakParent(f)}a.enlarge(CKEDITOR.ENLARGE_INLINE,
1);var d=a.createBookmark(),b=d.startNode,f=this._.definition.alwaysRemoveElement;if(a.collapsed){for(var e=new CKEDITOR.dom.elementPath(b.getParent(),a.root),h,g=0,k;g<e.elements.length&&(k=e.elements[g])&&k!=e.block&&k!=e.blockLimit;g++)if(this.checkElementRemovable(k)){var n;!f&&a.collapsed&&(a.checkBoundaryOfElement(k,CKEDITOR.END)||(n=a.checkBoundaryOfElement(k,CKEDITOR.START)))?(h=k,h.match=n?"start":"end"):(k.mergeSiblings(),k.is(this.element)?y.call(this,k):t(k,u(this)[k.getName()]))}if(h){f=
b;for(g=0;;g++){k=e.elements[g];if(k.equals(h))break;else if(k.match)continue;else k=k.clone();k.append(f);f=k}f["start"==h.match?"insertBefore":"insertAfter"](h)}}else{var m=d.endNode,l=this;c();for(e=b;!e.equals(m);)h=e.getNextSourceNode(),e.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(e)&&(e.getName()==this.element?y.call(this,e):t(e,u(this)[e.getName()]),h.type==CKEDITOR.NODE_ELEMENT&&h.contains(b)&&(c(),h=b.getNext())),e=h}a.moveToBookmark(d);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function h(a){var c=
[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return c.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return c}function k(a){var c=a.getEnclosedNode()||a.getCommonAncestor(!1,!0);(a=(new CKEDITOR.dom.elementPath(c,a.root)).contains(this.element,1))&&!a.isReadOnly()&&v(a,this)}function m(a){var c=a.getCommonAncestor(!0,!0);if(a=(new CKEDITOR.dom.elementPath(c,a.root)).contains(this.element,1)){var c=this._.definition,d=c.attributes;if(d)for(var b in d)a.removeAttribute(b,d[b]);if(c.styles)for(var f in c.styles)c.styles.hasOwnProperty(f)&&
a.removeStyle(f)}}function l(a){var c=a.createBookmark(!0),d=a.createIterator();d.enforceRealBlocks=!0;this._.enterMode&&(d.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var b,e=a.document,h;b=d.getNextParagraph();)!b.isReadOnly()&&(d.activeFilter?d.activeFilter.check(this):1)&&(h=A(this,e,b),f(b,h));a.moveToBookmark(c)}function d(a){var c=a.createBookmark(1),d=a.createIterator();d.enforceRealBlocks=!0;d.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var b,e;b=d.getNextParagraph();)this.checkElementRemovable(b)&&
(b.is("pre")?((e=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&b.copyAttributes(e),f(b,e)):y.call(this,b));a.moveToBookmark(c)}function f(a,d){var b=!d;b&&(d=a.getDocument().createElement("div"),a.copyAttributes(d));var f=d&&d.is("pre"),e=a.is("pre"),h=!f&&e;if(f&&!e){e=d;(h=a.getBogus())&&h.remove();h=a.getHtml();h=n(h,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");h=h.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");h=h.replace(/([ \t\n\r]+|&nbsp;)/g,
" ");h=h.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var g=a.getDocument().createElement("div");g.append(e);e.$.outerHTML="\x3cpre\x3e"+h+"\x3c/pre\x3e";e.copyAttributes(g.getFirst());e=g.getFirst().remove()}else e.setHtml(h);d=e}else h?d=x(b?[a.getHtml()]:c(a),d):a.moveChildren(d);d.replace(a);if(f){var b=d,k;(k=b.getPrevious(I))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(f=n(k.getHtml(),/\n$/,"")+"\n\n"+n(b.getHtml(),/^\n/,""),CKEDITOR.env.ie?b.$.outerHTML="\x3cpre\x3e"+f+"\x3c/pre\x3e":
b.setHtml(f),k.remove())}else b&&r(d)}function c(a){var c=[];n(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,c,d){return c+"\x3c/pre\x3e"+d+"\x3cpre\x3e"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,d){c.push(d)});return c}function n(a,c,d){var b="",f="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,c,d){c&&(b=c);d&&(f=d);return""});return b+a.replace(c,d)+f}function x(a,c){var d;
1<a.length&&(d=new CKEDITOR.dom.documentFragment(c.getDocument()));for(var b=0;b<a.length;b++){var f=a[b],f=f.replace(/(\r\n|\r)/g,"\n"),f=n(f,/^[ \t]*\n/,""),f=n(f,/\n$/,""),f=n(f,/^[ \t]+|[ \t]+$/g,function(a,c){return 1==a.length?"\x26nbsp;":c?" "+CKEDITOR.tools.repeat("\x26nbsp;",a.length-1):CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "}),f=f.replace(/\n/g,"\x3cbr\x3e"),f=f.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "});if(d){var e=c.clone();e.setHtml(f);
d.append(e)}else c.setHtml(f)}return d||c}function y(a,c){var d=this._.definition,b=d.attributes,d=d.styles,f=u(this)[a.getName()],e=CKEDITOR.tools.isEmpty(b)&&CKEDITOR.tools.isEmpty(d),h;for(h in b)if("class"!=h&&!this._.definition.fullMatch||a.getAttribute(h)==p(h,b[h]))c&&"data-"==h.slice(0,5)||(e=a.hasAttribute(h),a.removeAttribute(h));for(var g in d)this._.definition.fullMatch&&a.getStyle(g)!=p(g,d[g],!0)||(e=e||!!a.getStyle(g),a.removeStyle(g));t(a,f,J[a.getName()]);e&&(this._.definition.alwaysRemoveElement?
r(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?r(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function q(a){for(var c=u(this),d=a.getElementsByTag(this.element),b,f=d.count();0<=--f;)b=d.getItem(f),b.isReadOnly()||y.call(this,b,!0);for(var e in c)if(e!=this.element)for(d=a.getElementsByTag(e),f=d.count()-1;0<=f;f--)b=d.getItem(f),b.isReadOnly()||t(b,c[e])}function t(a,c,d){if(c=c&&c.attributes)for(var b=0;b<c.length;b++){var f=c[b][0],
e;if(e=a.getAttribute(f)){var h=c[b][1];(null===h||h.test&&h.test(e)||"string"==typeof h&&e==h)&&a.removeAttribute(f)}}d||r(a)}function r(a,c){if(!a.hasAttributes()||c)if(CKEDITOR.dtd.$block[a.getName()]){var d=a.getPrevious(I),b=a.getNext(I);!d||d.type!=CKEDITOR.NODE_TEXT&&d.isBlockBoundary({br:1})||a.append("br",1);!b||b.type!=CKEDITOR.NODE_TEXT&&b.isBlockBoundary({br:1})||a.append("br");a.remove(!0)}else d=a.getFirst(),b=a.getLast(),a.remove(!0),d&&(d.type==CKEDITOR.NODE_ELEMENT&&d.mergeSiblings(),
b&&!d.equals(b)&&b.type==CKEDITOR.NODE_ELEMENT&&b.mergeSiblings())}function A(a,c,d){var b;b=a.element;"*"==b&&(b="span");b=new CKEDITOR.dom.element(b,c);d&&d.copyAttributes(b);b=v(b,a);c.getCustomData("doc_processing_style")&&b.hasAttribute("id")?b.removeAttribute("id"):c.setCustomData("doc_processing_style",1);return b}function v(a,c){var d=c._.definition,b=d.attributes,d=CKEDITOR.style.getStyleText(d);if(b)for(var f in b)a.setAttribute(f,b[f]);d&&a.setAttribute("style",d);a.getDocument().removeCustomData("doc_processing_style");
return a}function z(a,c){for(var d in a)a[d]=a[d].replace(D,function(a,d){return c[d]})}function u(a){if(a._.overrides)return a._.overrides;var c=a._.overrides={},d=a._.definition.overrides;if(d){CKEDITOR.tools.isArray(d)||(d=[d]);for(var b=0;b<d.length;b++){var f=d[b],e,h;"string"==typeof f?e=f.toLowerCase():(e=f.element?f.element.toLowerCase():a.element,h=f.attributes);f=c[e]||(c[e]={});if(h){var f=f.attributes=f.attributes||[],g;for(g in h)f.push([g.toLowerCase(),h[g]])}}}return c}function p(a,
c,d){var b=new CKEDITOR.dom.element("span");b[d?"setStyle":"setAttribute"](a,c);return b[d?"getStyle":"getAttribute"](a)}function w(a,c){function d(a,c){return"font-family"==c.toLowerCase()?a.replace(/["']/g,""):a}"string"==typeof a&&(a=CKEDITOR.tools.parseCssText(a));"string"==typeof c&&(c=CKEDITOR.tools.parseCssText(c,!0));for(var b in a)if(!(b in c)||d(c[b],b)!=d(a[b],b)&&"inherit"!=a[b]&&"inherit"!=c[b])return!1;return!0}function C(a,c,d){var b=a.getRanges();c=c?this.removeFromRange:this.applyToRange;
for(var f,e=b.createIterator();f=e.getNextRange();)c.call(this,f,d);a.selectRanges(b)}var J={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},B={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},E=/\s*(?:;\s*|$)/,D=/#\((.+?)\)/g,G=CKEDITOR.dom.walker.bookmark(0,
1),I=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,c){if("string"==typeof a.type)return new CKEDITOR.style.customHandlers[a.type](a);var d=a.attributes;d&&d.style&&(a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(d.style)),delete d.style);c&&(a=CKEDITOR.tools.clone(a),z(a.attributes,c),z(a.styles,c));d=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(J[d]?CKEDITOR.STYLE_BLOCK:B[d]?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 c=this._.enterMode;c||(this._.enterMode=a.activeEnterMode);C.call(this,a.getSelection(),0,a);this._.enterMode=c}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return C.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),
a)){var c=this._.enterMode;c||(this._.enterMode=a.activeEnterMode);C.call(this,a.getSelection(),1,a);this._.enterMode=c}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?e:this.type==CKEDITOR.STYLE_BLOCK?l:this.type==CKEDITOR.STYLE_OBJECT?k:null;return this.applyToRange(a)},removeFromRange:function(c){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?a:this.type==CKEDITOR.STYLE_BLOCK?d:this.type==CKEDITOR.STYLE_OBJECT?m:null;return this.removeFromRange(c)},applyToObject:function(a){v(a,
this)},checkActive:function(a,c){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,!0,c);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var d=a.elements,b=0,f;b<d.length;b++)if(f=d[b],this.type!=CKEDITOR.STYLE_INLINE||f!=a.block&&f!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var e=f.getName();if(!("string"==typeof this.element?e==this.element:e in this.element))continue}if(this.checkElementRemovable(f,!0,c))return!0}}return!1},checkApplicable:function(a,
c,d){c&&c instanceof CKEDITOR.filter&&(d=c);if(d&&!d.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,c){var d=this._.definition;if(!a||!d.ignoreReadonly&&a.isReadOnly())return!1;var b=a.getName();if("string"==typeof this.element?b==this.element:b in this.element){if(!c&&!a.hasAttributes())return!0;if(b=d._AC)d=b;else{var b={},f=0,e=d.attributes;
if(e)for(var h in e)f++,b[h]=e[h];if(h=CKEDITOR.style.getStyleText(d))b.style||f++,b.style=h;b._length=f;d=d._AC=b}if(d._length){for(var g in d)if("_length"!=g)if(b=a.getAttribute(g)||"","style"==g?w(d[g],b):d[g]==b){if(!c)return!0}else if(c)return!1;if(c)return!0}else return!0}return!1},checkElementRemovable:function(a,c,d){if(this.checkElementMatch(a,c,d))return!0;if(c=u(this)[a.getName()]){var b;if(!(c=c.attributes))return!0;for(d=0;d<c.length;d++)if(b=c[d][0],b=a.getAttribute(b)){var f=c[d][1];
if(null===f)return!0;if("string"==typeof f){if(b==f)return!0}else if(f.test(b))return!0}}return!1},buildPreview:function(a){var c=this._.definition,d=[],b=c.element;"bdo"==b&&(b="span");var d=["\x3c",b],f=c.attributes;if(f)for(var e in f)d.push(" ",e,'\x3d"',f[e],'"');(f=CKEDITOR.style.getStyleText(c))&&d.push(' style\x3d"',f,'"');d.push("\x3e",a||c.name,"\x3c/",b,"\x3e");return d.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var c=a._ST;if(c)return c;
var c=a.styles,d=a.attributes&&a.attributes.style||"",b="";d.length&&(d=d.replace(E,";"));for(var f in c){var e=c[f],h=(f+":"+e).replace(E,";");"inherit"==e?b+=h:d+=h}d.length&&(d=CKEDITOR.tools.normalizeCssText(d,!0));return a._ST=d+b};CKEDITOR.style.customHandlers={};CKEDITOR.style.unstylableElements=[];CKEDITOR.style.addCustomHandler=function(a){var c=function(a){this._={definition:a};this.setup&&this.setup(a)};c.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),
{assignedTo:CKEDITOR.STYLE_OBJECT},a,!0);return this.customHandlers[a.type]=c};var P=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,M=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(b,g){this.requiredContent=this.allowedContent=this.style=b;CKEDITOR.tools.extend(this,g,!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,g,e){CKEDITOR.stylesSet.addExternal(b,g,"");CKEDITOR.stylesSet.load(b,e)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(b,g){var e=this._.styleStateChangeCallbacks;e||(e=this._.styleStateChangeCallbacks=[],this.on("selectionChange",
function(a){for(var b=0;b<e.length;b++){var g=e[b],m=g.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;g.fn.call(this,m)}}));e.push({style:b,fn:g})},applyStyle:function(b){b.apply(this)},removeStyle:function(b){b.remove(this)},getStylesSet:function(b){if(this._.stylesDefinitions)b(this._.stylesDefinitions);else{var g=this,e=g.config.stylesCombo_stylesSet||g.config.stylesSet;if(!1===e)b(null);else if(e instanceof Array)g._.stylesDefinitions=e,b(e);else{e||(e="default");
var e=e.split(":"),a=e[0];CKEDITOR.stylesSet.addExternal(a,e[1]?e.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(a,function(e){g._.stylesDefinitions=e[a];b(g._.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(g){if(!g)return CKEDITOR.error("no-vendor-lib",{path:b});if("undefined"!==typeof window.ES6Promise)return CKEDITOR.tools.promise=ES6Promise})}}(),function(){function b(a,b,k){a.once("selectionCheck",function(a){if(!g){var l=a.data.getRanges()[0];k.equals(l)?a.cancel():b.equals(l)&&(e=!0)}},null,null,-1)}var g=!0,e=!1;CKEDITOR.dom.selection.setupEditorOptimization=function(a){a.on("selectionCheck",function(a){a.data&&!e&&a.data.optimizeInElementEnds();e=!1});a.on("contentDom",function(){var b=
a.editable();b&&(b.attachListener(b,"keydown",function(a){this._.shiftPressed=a.data.$.shiftKey},this),b.attachListener(b,"keyup",function(a){this._.shiftPressed=a.data.$.shiftKey},this))})};CKEDITOR.dom.selection.prototype.optimizeInElementEnds=function(){var a=this.getRanges()[0],e=this.root.editor,k;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")))k=
!1;else if(0===a.endOffset)k=!0;else{k=a.startContainer.type===CKEDITOR.NODE_TEXT;var m=a.endContainer.type===CKEDITOR.NODE_TEXT,l=k?a.startContainer.getLength():a.startContainer.getChildCount();k=a.startOffset===l||k^m}k&&(k=a.clone(),a.shrink(CKEDITOR.SHRINK_TEXT,!1,{skipBogus:!CKEDITOR.env.webkit}),g=!1,b(e,a,k),a.select(),g=!0)}}(),function(){function b(a,b){if(e(a))a=Math.round(b*(parseFloat(a)/100));else if("string"===typeof a&&a.match(/^\d+$/gm)||"string"===typeof a&&a.match(/^\d+(?:deg)?$/gm))a=
parseInt(a,10);return a}function g(a,b){e(a)?a=b*(parseFloat(a)/100):"string"===typeof a&&a.match(/^\d?\.\d+/gm)&&(a=parseFloat(a));return a}function e(a){return"string"===typeof a&&a.match(/^((\d*\.\d+)|(\d+))%{1}$/gm)}function a(a,b,e){return!isNaN(a)&&a>=b&&a<=e}function h(a){a=a.toString(16);return 1==a.length?"0"+a:a}CKEDITOR.tools.color=CKEDITOR.tools.createClass({$:function(a,b){this._.initialColorCode=a;this._.defaultValue=b;this._.parseInput(a)},proto:{getHex:function(){if(!this._.isValidColor)return this._.defaultValue;
var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatHexString(a[0],a[1],a[2])},getHexWithAlpha:function(){if(!this._.isValidColor)return this._.defaultValue;var a=Math.round(this._.alpha*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE);return this._.formatHexString(this._.red,this._.green,this._.blue,a)},getRgb:function(){if(!this._.isValidColor)return this._.defaultValue;var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatRgbString("rgb",
a[0],a[1],a[2])},getRgba:function(){return this._.isValidColor?this._.formatRgbString("rgba",this._.red,this._.green,this._.blue,this._.alpha):this._.defaultValue},getHsl:function(){var a=0===this._.alpha||1===this._.alpha;if(!this._.isValidColor)return this._.defaultValue;this._.type===CKEDITOR.tools.color.TYPE_HSL&&a?a=[this._.hue,this._.saturation,this._.lightness]:(a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha),a=this._.rgbToHsl(a[0],a[1],a[2]));return this._.formatHslString("hsl",
a[0],a[1],a[2])},getHsla:function(){var a;if(!this._.isValidColor)return this._.defaultValue;a=this._.type===CKEDITOR.tools.color.TYPE_HSL?[this._.hue,this._.saturation,this._.lightness]:this._.rgbToHsl(this._.red,this._.green,this._.blue);return this._.formatHslString("hsla",a[0],a[1],a[2],this._.alpha)},getInitialValue:function(){return this._.initialColorCode}},_:{initialColorCode:"",isValidColor:!0,type:0,hue:0,saturation:0,lightness:0,red:0,green:0,blue:0,alpha:1,blendAlphaColor:function(a,b,
e,d){return CKEDITOR.tools.array.map([a,b,e],function(a){return Math.round(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-d*(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-a))})},formatHexString:function(a,b,e,d){a="#"+h(a)+h(b)+h(e);void 0!==d&&(a+=h(d));return a.toUpperCase()},formatRgbString:function(a,b,e,d,f){b=[b,e,d];void 0!==f&&b.push(f);return a+"("+b.join(",")+")"},formatHslString:function(a,b,e,d,f){return a+"("+b+","+e+"%,"+d+"%"+(void 0!==f?","+f:"")+")"},parseInput:function(a){if("string"!==
typeof a)this._.isValidColor=!1;else{a=CKEDITOR.tools.trim(a);var b=this._.matchStringToNamedColor(a);b&&(a=b);var b=this._.extractColorChannelsFromHex(a),e=this._.extractColorChannelsFromRgba(a);a=this._.extractColorChannelsFromHsla(a);(a=b||e||a)?(this._.type=a.type,this._.red=a.red,this._.green=a.green,this._.blue=a.blue,this._.alpha=a.alpha,a.type===CKEDITOR.tools.color.TYPE_HSL&&(this._.hue=a.hue,this._.saturation=a.saturation,this._.lightness=a.lightness)):this._.isValidColor=!1}},matchStringToNamedColor:function(a){return CKEDITOR.tools.color.namedColors[a.toLowerCase()]||
null},extractColorChannelsFromHex:function(a){-1===a.indexOf("#")&&(a="#"+a);a.match(CKEDITOR.tools.color.hex3CharsRegExp)&&(a=this._.hex3ToHex6(a));a.match(CKEDITOR.tools.color.hex4CharsRegExp)&&(a=this._.hex4ToHex8(a));if(!a.match(CKEDITOR.tools.color.hex6CharsRegExp)&&!a.match(CKEDITOR.tools.color.hex8CharsRegExp))return null;a=a.split("");var b=1;a[7]&&a[8]&&(b=parseInt(a[7]+a[8],16),b/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,b=Number(b.toFixed(1)));return{type:CKEDITOR.tools.color.TYPE_RGB,
red:parseInt(a[1]+a[2],16),green:parseInt(a[3]+a[4],16),blue:parseInt(a[5]+a[6],16),alpha:b}},extractColorChannelsFromRgba:function(a){var e=this._.extractColorChannelsByPattern(a,CKEDITOR.tools.color.rgbRegExp);if(!e||3>e.length||4<e.length)return null;var h=4===e.length;a=b(e[0],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE);var d=b(e[1],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),f=b(e[2],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),c=1;h&&(c=g(e[3],CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE));e=
{type:CKEDITOR.tools.color.TYPE_RGB,red:a,green:d,blue:f,alpha:c};return this._.areColorChannelsValid(a,d,f,c)?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 h=4===e.length,d=b(e[0],CKEDITOR.tools.color.MAX_HUE_CHANNEL_VALUE),f=g(e[1],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),c=g(e[2],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),n=1;a=this._.hslToRgb(d,
f,c);h&&(n=g(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:d,saturation:Math.round(100*f),lightness:Math.round(100*c)};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,b){var e=
a.match(b);if(!e)return null;var d=-1===e[1].indexOf(",")?/\s/:",",d=e[1].split(d),d=CKEDITOR.tools.array.reduce(d,function(a,c){var d=CKEDITOR.tools.trim(c);return 0===d.length?a:a.concat([d])},[]);e[2]&&(e=CKEDITOR.tools.trim(e[2].replace(/[\/,]/,"")),d.push(e));return d},areColorChannelsValid:function(b,e,h,d){return a(b,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&a(e,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&a(h,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&a(d,0,CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE)},
hslToRgb:function(a,b,e){var d=function(d){var c=(d+a/30)%12;d=b*Math.min(e,1-e);c=Math.min(c-3,9-c,1);c=Math.max(-1,c);return Math.round((e-d*c)*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)};return[d(0),d(8),d(4)]},rgbToHsl:function(a,b,e){a/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE;b/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE;var d=e/CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,f=Math.max(a,b,d),c=Math.min(a,b,d);e=f-c;var h=0;switch(f){case a:h=(b-d)/e%6;break;case b:h=(d-a)/e+2;break;case d:h=
(a-b)/e+4}a=0===e?0:60*h;b=(f+c)/2;f=0;1!==b&&0!==b&&(f=e/(1-Math.abs(2*b-1)));a=Math.round(a);f=Math.round(100*f);b=Math.round(100*b);return[a,f,b]}},statics:{TYPE_RGB:1,TYPE_HSL:2,MAX_RGB_CHANNEL_VALUE:255,MAX_ALPHA_CHANNEL_VALUE:1,MAX_HUE_CHANNEL_VALUE:360,MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE:1,hex3CharsRegExp:/#([0-9a-f]{3}$)/gim,hex4CharsRegExp:/#([0-9a-f]{4}$)/gim,hex6CharsRegExp:/#([0-9a-f]{6}$)/gim,hex8CharsRegExp:/#([0-9a-f]{8}$)/gim,rgbRegExp:/rgba?\(([.,\d\s%]*)(\s*\/\s*[\d.%]+)?\s*\)/i,
hslRegExp:/hsla?\((\s*(?:[.\d]+(?:deg)?)(?:\s*,?\s*[.\d]+%){2})((?:(?:\s*\/\s*)|(?:\s*,\s*))[\d.]+%?)?\s*\)/i,namedColors:{aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",
cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",
firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",
lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",
mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",
red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",windowtext:"windowtext",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",
yellowgreen:"#9ACD32"}}});CKEDITOR.tools.style.parse._colors=CKEDITOR.tools.color.namedColors}(),CKEDITOR.dom.comment=function(b,g){"string"==typeof b&&(b=(g?g.$: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={},g={},e;for(e in CKEDITOR.dtd.$blockLimit)e in
CKEDITOR.dtd.$list||(b[e]=1);for(e in CKEDITOR.dtd.$block)e in CKEDITOR.dtd.$blockLimit||e in CKEDITOR.dtd.$empty||(g[e]=1);CKEDITOR.dom.elementPath=function(a,e){var k=null,m=null,l=[],d=a,f;e=e||a.getDocument().getBody();d||(d=e);do if(d.type==CKEDITOR.NODE_ELEMENT){l.push(d);if(!this.lastElement&&(this.lastElement=d,d.is(CKEDITOR.dtd.$object)||"false"==d.getAttribute("contenteditable")))continue;if(d.equals(e))break;if(!m&&(f=d.getName(),"true"==d.getAttribute("contenteditable")?m=d:!k&&g[f]&&
(k=d),b[f])){if(f=!k&&"div"==f){a:{f=d.getChildren();for(var c=0,n=f.count();c<n;c++){var x=f.getItem(c);if(x.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[x.getName()]){f=!0;break a}}f=!1}f=!f}f?k=d:m=d}}while(d=d.getParent());m||(m=e);this.block=k;this.blockLimit=m;this.root=e;this.elements=l}}(),CKEDITOR.dom.elementPath.prototype={compare:function(b){var g=this.elements;b=b&&b.elements;if(!b||g.length!=b.length)return!1;for(var e=0;e<g.length;e++)if(!g[e].equals(b[e]))return!1;return!0},contains:function(b,
g,e){var a=0,h;"string"==typeof b&&(h=function(a){return a.getName()==b});b instanceof CKEDITOR.dom.element?h=function(a){return a.equals(b)}:CKEDITOR.tools.isArray(b)?h=function(a){return-1<CKEDITOR.tools.indexOf(b,a.getName())}:"function"==typeof b?h=b:"object"==typeof b&&(h=function(a){return a.getName()in b});var k=this.elements,m=k.length;g&&(e?a+=1:--m);e&&(k=Array.prototype.slice.call(k,0),k.reverse());for(;a<m;a++)if(h(k[a]))return k[a];return null},isContextFor:function(b){var g;return b in
CKEDITOR.dtd.$block?(g=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!g.getDtd()[b]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(b,g){"string"==typeof b&&(b=(g?g.$: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 g=this.getText();b&&(g=CKEDITOR.tools.trim(g));return!g||g===CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE},split:function(b){var g=this.$.parentNode,e=g.childNodes.length,a=this.getLength(),h=this.getDocument(),k=new CKEDITOR.dom.text(this.$.splitText(b),h);g.childNodes.length==e&&(b>=a?(k=h.createText(""),k.insertAfter(this)):(b=h.createText(""),b.insertAfter(k),b.remove()));return k},substring:function(b,
g){return"number"!=typeof g?this.$.nodeValue.substr(b):this.$.nodeValue.substring(b,g)}}),function(){function b(b,a,h){var g=b.serializable,m=a[h?"endContainer":"startContainer"],l=h?"endOffset":"startOffset",d=g?a.document.getById(b.startNode):b.startNode;b=g?a.document.getById(b.endNode):b.endNode;m.equals(d.getPrevious())?(a.startOffset=a.startOffset-m.getLength()-b.getPrevious().getLength(),m=b.getNext()):m.equals(b.getPrevious())&&(a.startOffset-=m.getLength(),m=b.getNext());m.equals(d.getParent())&&
a[l]++;m.equals(b.getParent())&&a[l]++;a[h?"endContainer":"startContainer"]=m;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,g)};var g={createIterator:function(){var b=this,a=CKEDITOR.dom.walker.bookmark(),h=[],g;return{getNextRange:function(m){g=void 0===g?0:g+1;var l=b[g];if(l&&1<b.length){if(!g)for(var d=b.length-1;0<=d;d--)h.unshift(b[d].createBookmark(!0));if(m)for(var f=
0;b[g+f+1];){var c=l.document;m=0;d=c.getById(h[f].endNode);for(c=c.getById(h[f+1].startNode);;){d=d.getNextSourceNode(!1);if(c.equals(d))m=1;else if(a(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary())continue;break}if(!m)break;f++}for(l.moveToBookmark(h.shift());f--;)d=b[++g],d.moveToBookmark(h.shift()),l.setEnd(d.endContainer,d.endOffset)}return l}}},createBookmarks:function(e){for(var a=[],h,g=0;g<this.length;g++){a.push(h=this[g].createBookmark(e,!0));for(var m=g+1;m<this.length;m++)this[m]=
b(h,this[m]),this[m]=b(h,this[m],!0)}return a},createBookmarks2:function(b){for(var a=[],h=0;h<this.length;h++)a.push(this[h].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 g(a){var c=CKEDITOR.skin["ua_"+a],d=CKEDITOR.env;if(c)for(var c=c.split(",").sort(function(a,c){return a>c?-1:1}),e=0,
h;e<c.length;e++)if(h=c[e],d.ie&&(h.replace(/^ie/,"")==d.version||d.quirks&&"iequirks"==h)&&(h="ie"),d[h]){a+="_"+c[e];break}return CKEDITOR.getUrl(b()+a+".css")}function e(a,c){k[a]||(CKEDITOR.document.appendStyleSheet(g(a)),k[a]=1);c&&c()}function a(a){var c=a.getById(m);c||(c=a.getHead().append("style"),c.setAttribute("id",m),c.setAttribute("type","text/css"));return c}function h(a,c,d){var b,e,h;if(CKEDITOR.env.webkit)for(c=c.split("}").slice(0,-1),e=0;e<c.length;e++)c[e]=c[e].split("{");for(var g=
0;g<a.length;g++)if(CKEDITOR.env.webkit)for(e=0;e<c.length;e++){h=c[e][1];for(b=0;b<d.length;b++)h=h.replace(d[b][0],d[b][1]);a[g].$.sheet.addRule(c[e][0],h)}else{h=c;for(b=0;b<d.length;b++)h=h.replace(d[b][0],d[b][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?a[g].$.styleSheet.cssText+=h:a[g].$.innerHTML+=h}}var k={};CKEDITOR.skin={path:b,loadPart:function(a,c){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(b()+"skin.js"),function(){e(a,c)}):e(a,c)},
getPath:function(a){return CKEDITOR.getUrl(g(a))},icons:{},addIcon:function(a,c,d,b){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:c,offset:d||0,bgsize:b||"16px"})},getIconStyle:function(a,c,d,b,e){var h;a&&(a=a.toLowerCase(),c&&(h=this.icons[a+"-rtl"]),h||(h=this.icons[a]));a=d||h&&h.path||"";b=b||h&&h.offset;e=e||h&&h.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+b+"px;background-size:"+e+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,
{getUiColor:function(){return this.uiColor},setUiColor:function(b){var c=a(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var b=CKEDITOR.skin.chameleon,f="",e="";"function"==typeof b&&(f=b(this,"editor"),e=b(this,"panel"));a=[[d,a]];h([c],f,a);h(l,e,a)}).call(this,b)}});var m="cke_ui_color",l=[],d=/\$color/g;CKEDITOR.on("instanceLoaded",function(b){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var c=b.editor;b=function(b){b=(b.data[0]||b.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();
if(!b.getById("cke_ui_color")){var f=a(b);l.push(f);c.on("destroy",function(){l=CKEDITOR.tools.array.filter(l,function(a){return f!==a})});(b=c.getUiColor())&&h([f],CKEDITOR.skin.chameleon(c,"panel"),[[d,b]])}};c.on("panelShow",b);c.on("menuShow",b);c.config.uiColor&&c.setUiColor(c.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 g=b.getComputedStyle("border-top-color"),e=b.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!g||g!=e)}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,g=0;g<b.length;g++)CKEDITOR.editor.prototype.constructor.apply(b[g][0],b[g][1]),CKEDITOR.add(b[g][0])}(),
CKEDITOR.skin.name="moono",CKEDITOR.skin.ua_editor="ie,iequirks,ie7,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,iequirks,ie7,ie8",CKEDITOR.skin.chameleon=function(){var b=function(){return function(a,b){for(var e=a.match(/[^#]./g),g=0;3>g;g++){var l=g,d;d=parseInt(e[g],16);d=("0"+(0>b?0|d*(1+b):0|d+(255-d)*b).toString(16)).slice(-2);e[l]=d}return"#"+e.join("")}}(),g=function(){var a=new CKEDITOR.template("background:#{to};background-image:linear-gradient(to bottom,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType\x3d0,startColorstr\x3d'{from}',endColorstr\x3d'{to}');");
return function(b,e){return a.output({from:b,to:e})}}(),e={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "),
panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")};
return function(a,h){var k=a.uiColor,k={id:"."+a.id,defaultBorder:b(k,-.1),defaultGradient:g(b(k,.9),k),lightGradient:g(b(k,1),b(k,.7)),mediumGradient:g(b(k,.8),b(k,.5)),ckeButtonOn:g(b(k,.6),b(k,.7)),ckeResizer:b(k,-.4),ckeToolbarSeparator:b(k,.5),ckeColorauto:b(k,.8),dialogBody:b(k,.7),dialogTabSelected:g("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:b(k,-.6),elementsPathBg:k,menubuttonIcon:b(k,.5),menubuttonIconHover:b(k,.3)};return e[h].output(k).replace(/\[/g,"{").replace(/\]/g,
"}")}}(),CKEDITOR.plugins.add("basicstyles",{init:function(b){var g=0,e=function(e,h,d,f){if(f){f=new CKEDITOR.style(f);var c=a[d];c.unshift(f);b.attachStyleStateChange(f,function(a){!b.readOnly&&b.getCommand(d).setState(a)});b.addCommand(d,new CKEDITOR.styleCommand(f,{contentForms:c}));b.ui.addButton&&b.ui.addButton(e,{isToggle:!0,label:h,command:d,toolbar:"basicstyles,"+(g+=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"]},h=b.config,k=b.lang.basicstyles;e("Bold",k.bold,"bold",h.coreStyles_bold);e("Italic",k.italic,"italic",h.coreStyles_italic);e("Underline",k.underline,"underline",h.coreStyles_underline);e("Strike",k.strike,"strike",h.coreStyles_strike);
e("Subscript",k.subscript,"subscript",h.coreStyles_subscript);e("Superscript",k.superscript,"superscript",h.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 g=b.getCommand("subscript"),e=b.getCommand("superscript");if(g&&e)b.on("afterCommandExec",function(a){a=a.data.name;if("subscript"===a||"superscript"===a){var h="subscript"===a?e:g;("subscript"===a?g:e).state===
CKEDITOR.TRISTATE_ON&&h.state===CKEDITOR.TRISTATE_ON&&(h.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,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 b=[this._],c=1;c<arguments.length;c++)b.push(arguments[c]);b.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,b);return this._},g={build:function(a,b,c){return new CKEDITOR.ui.dialog.textInput(a,b,c)}},e={build:function(a,b,c){return new CKEDITOR.ui.dialog[b.type](a,b,c)}},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}},h=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(a,b){this._.domOnChangeRegistered||(a.on("load",function(){this.getInputElement().on("change",function(){a.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0);this.on("change",
b)}},!0),k=/^on([A-Z]\w+)/,m=function(a){for(var b in a)(k.test(b)||"title"==b||"type"==b)&&delete a[b];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,c,e){if(!(4>arguments.length)){var h=b.call(this,f);h.labelId=CKEDITOR.tools.getNextId()+"_label";this._.children=[];var g={role:f.role||"presentation"};
f.includeLabel&&(g["aria-labelledby"]=h.labelId);CKEDITOR.ui.dialog.uiElement.call(this,a,f,c,"div",null,g,function(){var c=[],b=f.required?" cke_required":"";"horizontal"!=f.labelLayout?c.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+b+'" ',' id\x3d"'+h.labelId+'"',h.inputId?' for\x3d"'+h.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"'+h.labelId+'" for\x3d"'+h.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,c));return c.join("")})}},textInput:function(a,f,c){if(!(3>arguments.length)){b.call(this,f);var e=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",h={"class":"cke_dialog_ui_input_"+f.type,id:e,type:f.type};f.validate&&(this.validate=f.validate);f.maxLength&&(h.maxlength=f.maxLength);f.size&&(h.size=f.size);f.inputStyle&&(h.style=f.inputStyle);var g=
this,k=!1;a.on("load",function(){g.getInputElement().on("keydown",function(a){13==a.data.getKeystroke()&&(k=!0)});g.getInputElement().on("keyup",function(c){13==c.data.getKeystroke()&&k&&(a.getButton("ok")&&setTimeout(function(){a.getButton("ok").click()},0),k=!1);g.bidi&&l.call(g,c)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,a,f,c,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 ");
h["aria-labelledby"]=this._.labelId;this._.required&&(h["aria-required"]=this._.required);for(var c in h)a.push(c+'\x3d"'+h[c]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(a,f,c){if(!(3>arguments.length)){b.call(this,f);var e=this,h=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,c,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"',h,'" '],c;for(c in g)a.push(c+'\x3d"'+CKEDITOR.tools.htmlEncode(g[c])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(e._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");
return a.join("")})}},checkbox:function(a,f,c){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,c,"span",null,null,function(){var c=CKEDITOR.tools.extend({},f,{id:f.id?f.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),b=[],h=CKEDITOR.tools.getNextId()+"_label",g={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":h};m(c);f["default"]&&(g.checked="checked");"undefined"!=
typeof c.inputStyle&&(c.style=c.inputStyle);e.checkbox=new CKEDITOR.ui.dialog.uiElement(a,c,b,"input",null,g);b.push(' \x3clabel id\x3d"',h,'" for\x3d"',g.id,'"'+(f.labelStyle?' style\x3d"'+f.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(f.label),"\x3c/label\x3e");return b.join("")})}},radio:function(a,f,c){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=[],h=this;f.role="radiogroup";
f.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,a,f,c,function(){for(var c=[],b=[],g=(f.id?f.id:CKEDITOR.tools.getNextId())+"_radio",k=0;k<f.items.length;k++){var l=f.items[k],v=void 0!==l[2]?l[2]:l[0],z=void 0!==l[1]?l[1]:l[0],u=CKEDITOR.tools.getNextId()+"_radio_input",p=u+"_label",u=CKEDITOR.tools.extend({},f,{id:u,title:null,type:null},!0),v=CKEDITOR.tools.extend({},u,{title:v},!0),w={type:"radio","class":"cke_dialog_ui_radio_input",name:g,value:z,"aria-labelledby":p},C=[];h._["default"]==
z&&(w.checked="checked");m(u);m(v);"undefined"!=typeof u.inputStyle&&(u.style=u.inputStyle);z=new CKEDITOR.ui.dialog.uiElement(a,u,C,"input",null,w);z.on("focus",function(){h.click()});e.push(z);C.push(" ");new CKEDITOR.ui.dialog.uiElement(a,v,C,"label",null,{id:p,"for":w.id},l[0]);c.push(C.join(""))}new CKEDITOR.ui.dialog.hbox(a,e,c,b);return b.join("")});this._.children=e}},button:function(a,f,c){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 h=CKEDITOR.tools.extend({},f);delete h.style;var g=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,a,h,c,"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,c){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,c,function(){var c=CKEDITOR.tools.extend({},f,{id:f.id?f.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),b=[],h=[],g={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&&(g.size=f.size);void 0!==f.multiple&&(g.multiple=f.multiple);m(c);for(var k=0,l;k<f.items.length&&(l=f.items[k]);k++)h.push('\x3coption value\x3d"',CKEDITOR.tools.htmlEncode(void 0!==l[1]?l[1]:l[0]).replace(/"/g,"\x26quot;"),'" /\x3e ',CKEDITOR.tools.htmlEncode(l[0]));
"undefined"!=typeof c.inputStyle&&(c.style=c.inputStyle);e.select=new CKEDITOR.ui.dialog.uiElement(a,c,b,"select",null,g,h.join(""));b.push("\x3c/div\x3e");return b.join("")})}},file:function(a,f,c){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,c,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,c){var e=this;if(!(3>arguments.length)){b.call(this,
f);f.validate&&(this.validate=f.validate);var h=CKEDITOR.tools.extend({},f),g=h.onClick;h.className=(h.className?h.className+" ":"")+"cke_dialog_ui_button";h.onClick=function(c){var b=f["for"];c=g?g.call(this,c):!1;!1!==c&&("xhr"!==c&&a.getContentElement(b[0],b[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,h,c)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,
c=/\/$/;return function(e,h,g){if(!(3>arguments.length)){var k=[],l=h.html;"\x3c"!=l.charAt(0)&&(l="\x3cspan\x3e"+l+"\x3c/span\x3e");var m=h.focus;if(m){var A=this.focus;this.focus=function(){("function"==typeof m?m:A).call(this);this.fire("focus")};h.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,e,h,k,"span",null,null,"");k=k.join("").match(a);l=l.match(b)||["","",""];c.test(l[1])&&(l[1]=l[1].slice(0,-1),l[2]="/"+l[2]);g.push([l[1],
" ",k[1]||"",l[2]].join(""))}}}(),fieldset:function(a,b,c,e,h){var g=h.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,h,e,"fieldset",null,null,function(){var a=[];g&&a.push("\x3clegend"+(h.labelStyle?' style\x3d"'+h.labelStyle+'"':"")+"\x3e"+g+"\x3c/legend\x3e");for(var d=0;d<c.length;d++)a.push(c[d]);return a.join("")})}},!0);CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement;CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,
{setLabel:function(a){var b=CKEDITOR.document.getById(this._.labelId);1>b.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(b):b.getChild(0).$.nodeValue=a;return this},getLabel:function(){var a=CKEDITOR.document.getById(this._.labelId);return!a||1>a.getChildCount()?"":a.getChild(0).getText()},eventProcessors:h},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},
enable:function(){this._.disabled=!1;var a=this.getElement();a&&a.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(a,b){this.on("click",function(){b.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},
accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},focus:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&b.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&(b.$.focus(),b.$.select())},0)},accessKeyUp:function(){this.select()},
setValue:function(a){if(this.bidi){var b=a&&a.charAt(0);(b="‪"==b?"ltr":"‫"==b?"rtl":null)&&(a=a.slice(1));this.setDirectionMarker(b)}a||(a="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},getValue:function(){var a=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&a){var b=this.getDirectionMarker();b&&(a=("ltr"==b?"‪":"‫")+a)}return a},setDirectionMarker:function(a){var b=this.getInputElement();a?b.setAttributes({dir:a,"data-cke-dir-marker":a}):
this.getDirectionMarker()&&b.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},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,b,c){var e=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),
h=this.getInputElement().$;e.$.text=a;e.$.value=void 0===b||null===b?a:b;void 0===c||null===c?CKEDITOR.env.ie?h.add(e.$):h.add(e.$,null):h.add(e.$,c);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,b){this.getInputElement().$.checked=a;!b&&this.fire("change",{value:a});return this},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(a,b){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return h.onChange.apply(this,arguments);a.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(d){d=d.data.$;"checked"==d.propertyName&&this.fire("change",{value:a.$.checked})},
this)},this);this.on("change",b);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,b=a[0],c=this._.dialog._,e=c.currentFocusIndex,h=e===c.focusList.length-1&&0===this.focusIndex;e>this.focusIndex&&!h&&(b=a[a.length-1]);c.currentFocusIndex=this.focusIndex;for(c=0;c<a.length;c++)if(e=a[c],e.getInputElement().$.checked){b=e;break}b.focus()},setValue:function(a,b){for(var c=this._.children,
e,h=0;h<c.length&&(e=c[h]);h++)e.getElement().$.checked=e.getValue()==a;!b&&this.fire("change",{value:a});return this},getValue:function(){for(var a=this._.children,b=0;b<a.length;b++)if(a[b].getElement().$.checked)return a[b].getValue();return null},accessKeyUp:function(){var a=this._.children,b;for(b=0;b<a.length;b++)if(a[b].getElement().$.checked){a[b].getElement().focus();return}a[0].getElement().focus()},click:function(){this._.dialog._.currentFocusIndex=this.focusIndex},eventProcessors:{onChange:function(a,
b){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return h.onChange.apply(this,arguments);a.on("load",function(){for(var a=this._.children,d=this,b=0;b<a.length;b++)a[b].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&&this.$.checked&&d.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",b);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 b=/^on([A-Z]\w+)/,c,e=function(a,c,d,b){a.on("formLoaded",function(){a.getInputElement().on(d,b,a)})},h;for(h in a)if(c=h.match(b))this.eventProcessors[h]?this.eventProcessors[h].call(this,
this._.dialog,a[h]):e(this,this._.dialog,c[1].toLowerCase(),a[h]);return this},reset:function(){function a(){c.$.open();var d="";e.size&&(d=e.size-(CKEDITOR.env.ie?7:0));var v=b.frameId+"_input";c.$.write(['\x3chtml dir\x3d"'+l+'" lang\x3d"'+m+'"\x3e\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e\x3cbody style\x3d"margin: 0; overflow: hidden; background: transparent;"\x3e','\x3cform enctype\x3d"multipart/form-data" method\x3d"POST" dir\x3d"'+l+'" lang\x3d"'+m+'" action\x3d"',CKEDITOR.tools.htmlEncode(e.action),
'"\x3e\x3clabel id\x3d"',b.labelId,'" for\x3d"',v,'" style\x3d"display:none"\x3e',CKEDITOR.tools.htmlEncode(e.label),'\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',v,'" aria-labelledby\x3d"',b.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(e.id||"cke_upload"),'" size\x3d"',CKEDITOR.tools.htmlEncode(0<d?d:""),'" /\x3e\x3c/form\x3e\x3c/body\x3e\x3c/html\x3e\x3cscript\x3e',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+g+");",
"window.onbeforeunload \x3d function() {window.parent.CKEDITOR.tools.callFunction("+k+")}","\x3c/script\x3e"].join(""));c.$.close();for(d=0;d<h.length;d++)h[d].enable()}var b=this._,c=CKEDITOR.document.getById(b.frameId).getFrameDocument(),e=b.definition,h=b.buttons,g=this.formLoadedNumber,k=this.formUnloadNumber,l=b.dialog._.editor.lang.dir,m=b.dialog._.editor.langCode;g||(g=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),k=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},
this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(g);CKEDITOR.tools.removeFunction(k)}));CKEDITOR.env.gecko?setTimeout(a,500):a()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(a,b){this._.domOnChangeRegistered||(this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=
!0);this.on("change",b)}},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.fileButton.prototype=new CKEDITOR.ui.dialog.button;CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype);CKEDITOR.dialog.addUIElement("text",g);CKEDITOR.dialog.addUIElement("password",g);CKEDITOR.dialog.addUIElement("tel",g);CKEDITOR.dialog.addUIElement("textarea",e);CKEDITOR.dialog.addUIElement("checkbox",e);CKEDITOR.dialog.addUIElement("radio",e);CKEDITOR.dialog.addUIElement("button",e);
CKEDITOR.dialog.addUIElement("select",e);CKEDITOR.dialog.addUIElement("file",e);CKEDITOR.dialog.addUIElement("fileButton",e);CKEDITOR.dialog.addUIElement("html",e);CKEDITOR.dialog.addUIElement("fieldset",{build:function(a,b,c){for(var e=b.children,h,g=[],k=[],l=0;l<e.length&&(h=e[l]);l++){var m=[];g.push(m);k.push(CKEDITOR.dialog._.uiElementBuilders[h.type].build(a,h,m))}return new CKEDITOR.ui.dialog[b.type](a,k,g,c,b)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=
2,CKEDITOR.DIALOG_RESIZE_BOTH=3,CKEDITOR.DIALOG_STATE_IDLE=1,CKEDITOR.DIALOG_STATE_BUSY=2,function(){function b(a){a._.tabBarMode=!0;a._.tabs[a._.currentTabId][0].focus();a._.currentFocusIndex=-1}function g(){for(var a=this._.tabIdList.length,c=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+a,d=c-1;d>c-a;d--)if(this._.tabs[this._.tabIdList[d%a]][0].$.offsetHeight)return this._.tabIdList[d%a];return null}function e(){for(var a=this._.tabIdList.length,c=CKEDITOR.tools.indexOf(this._.tabIdList,
this._.currentTabId),d=c+1;d<c+a;d++)if(this._.tabs[this._.tabIdList[d%a]][0].$.offsetHeight)return this._.tabIdList[d%a];return null}function a(a,c){for(var d=a.$.getElementsByTagName("input"),b=0,f=d.length;b<f;b++){var e=new CKEDITOR.dom.element(d[b]);"text"==e.getAttribute("type").toLowerCase()&&(c?(e.setAttribute("value",e.getCustomData("fake_value")||""),e.removeCustomData("fake_value")):(e.setCustomData("fake_value",e.getAttribute("value")),e.setAttribute("value","")))}}function h(a,c){var d=
this.getInputElement();d&&(a?d.removeAttribute("aria-invalid"):d.setAttribute("aria-invalid",!0));a||(this.select?this.select():this.focus());c&&alert(c);this.fire("validated",{valid:a,msg:c})}function k(){var a=this.getInputElement();a&&a.removeAttribute("aria-invalid")}function m(a){var c=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",G).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":""})),d=c.getChild([0,0,0,0,0]),b=d.getChild(0),f=d.getChild(1);a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(d);!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(d.getParent()));b.unselectable();f.unselectable();return{element:c,parts:{dialog:c.getChild(0),title:b,close:f,tabs:d.getChild(2),contents:d.getChild([3,0,0,0]),footer:d.getChild([3,0,1,0])}}}function l(a,c,d){this.element=c;this.focusIndex=d;this.tabIndex=0;this.isFocusable=function(){return!c.getAttribute("disabled")&&c.isVisible()};this.focus=function(){a._.currentFocusIndex=this.focusIndex;this.element.focus()};c.on("keydown",function(a){a.data.getKeystroke()in
{32:1,13:1}&&this.fire("click")});c.on("focus",function(){this.fire("mouseover")});c.on("blur",function(){this.fire("mouseout")})}function d(a){function c(){a.layout()}var d=CKEDITOR.document.getWindow();d.on("resize",c);a.on("hide",function(){d.removeListener("resize",c)})}function f(a,d){this.dialog=a;for(var b=d.contents,f=0,e;e=b[f];f++)b[f]=e&&new c(a,e);CKEDITOR.tools.extend(this,d)}function c(a,c){this._={dialog:a};CKEDITOR.tools.extend(this,c)}function n(a){function c(d){var k=a.getSize(),
n=a.parts.dialog.getParent().getClientSize(),l=d.data.$.screenX,m=d.data.$.screenY,x=l-b.x,r=m-b.y;b={x:l,y:m};f.x+=x;f.y+=r;l=f.x+g[3]<h?-g[3]:f.x-g[1]>n.width-k.width-h?n.width-k.width+("rtl"==e.lang.dir?0:g[1]):f.x;k=f.y+g[0]<h?-g[0]:f.y-g[2]>n.height-k.height-h?n.height-k.height+g[2]:f.y;l=Math.floor(l);k=Math.floor(k);a.move(l,k,1);d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mousemove",c);CKEDITOR.document.removeListener("mouseup",d);if(CKEDITOR.env.ie6Compat){var a=
B.getChild(0).getFrameDocument();a.removeListener("mousemove",c);a.removeListener("mouseup",d)}}var b=null,f=null,e=a.getParentEditor(),h=e.config.dialog_magnetDistance,g=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof h&&(h=20);a.parts.title.on("mousedown",function(e){if(!a._.moved){var h=a._.element;h.getFirst().setStyle("position","absolute");h.removeStyle("display");a._.moved=!0;a.layout()}b={x:e.data.$.screenX,y:e.data.$.screenY};CKEDITOR.document.on("mousemove",c);CKEDITOR.document.on("mouseup",
d);f=a.getPosition();CKEDITOR.env.ie6Compat&&(h=B.getChild(0).getFrameDocument(),h.on("mousemove",c),h.on("mouseup",d));e.data.preventDefault()},a)}function x(a){function c(d){var m="rtl"==e.lang.dir,x=l.width,r=l.height,u=x+(d.data.$.screenX-n.x)*(m?-1:1)*(a._.moved?1:2),L=r+(d.data.$.screenY-n.y)*(a._.moved?1:2),p=a._.element.getFirst(),p=m&&parseInt(p.getComputedStyle("right"),10),v=a.getPosition();v.x=v.x||0;v.y=v.y||0;v.y+L>k.height&&(L=k.height-v.y);(m?p:v.x)+u>k.width&&(u=k.width-(m?p:v.x));
L=Math.floor(L);u=Math.floor(u);if(f==CKEDITOR.DIALOG_RESIZE_WIDTH||f==CKEDITOR.DIALOG_RESIZE_BOTH)x=Math.max(b.minWidth||0,u-h);if(f==CKEDITOR.DIALOG_RESIZE_HEIGHT||f==CKEDITOR.DIALOG_RESIZE_BOTH)r=Math.max(b.minHeight||0,L-g);a.resize(x,r);a._.moved&&y(a,a._.position.x,a._.position.y);a._.moved||a.layout();d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mouseup",d);CKEDITOR.document.removeListener("mousemove",c);m&&(m.remove(),m=null);if(CKEDITOR.env.ie6Compat){var a=B.getChild(0).getFrameDocument();
a.removeListener("mouseup",d);a.removeListener("mousemove",c)}}var b=a.definition,f=b.resizable;if(f!=CKEDITOR.DIALOG_RESIZE_NONE){var e=a.getParentEditor(),h,g,k,n,l,m,x=CKEDITOR.tools.addFunction(function(b){function f(a){return a.isVisible()}l=a.getSize();var e=a.parts.contents,x=e.$.getElementsByTagName("iframe").length,r=!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks);x&&(m=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'),
e.append(m));g=l.height-a.parts.contents.getFirst(f).getSize("height",r);h=l.width-a.parts.contents.getFirst(f).getSize("width",1);n={x:b.screenX,y:b.screenY};k=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",c);CKEDITOR.document.on("mouseup",d);CKEDITOR.env.ie6Compat&&(e=B.getChild(0).getFrameDocument(),e.on("mousemove",c),e.on("mouseup",d));b.preventDefault&&b.preventDefault()});a.on("load",function(){var c="";f==CKEDITOR.DIALOG_RESIZE_WIDTH?c=" cke_resizer_horizontal":
f==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(c=" cke_resizer_vertical");c=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+c+" cke_resizer_"+e.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+x+', event )"\x3e'+("ltr"==e.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(c,1)});e.on("destroy",function(){CKEDITOR.tools.removeFunction(x)})}}function y(a,c,d){var b=a.parts.dialog.getParent().getClientSize(),f=a.getSize(),
e=a._.viewportRatio,h=Math.max(b.width-f.width,0),b=Math.max(b.height-f.height,0);e.width=h?c/h:e.width;e.height=b?d/b:e.height;a._.viewportRatio=e}function q(a){a.data.preventDefault(1)}function t(a){var c=a.config,d=CKEDITOR.skinName||a.config.skin,b=c.dialog_backgroundCoverColor||("moono-lisa"==d?"black":"white"),d=c.dialog_backgroundCoverOpacity,f=c.baseFloatZIndex,c=CKEDITOR.tools.genKey(b,d,f),e=K[c];CKEDITOR.document.getBody().addClass("cke_dialog_open");e?e.show():(f=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',
CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",f,"; top: 0px; left: 0px; ","; width: 100%; height: 100%;",CKEDITOR.env.ie6Compat?"":"background-color: "+b,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(b="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+b+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",f.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),f.push("void((function(){"+encodeURIComponent("document.open();("+
CKEDITOR.tools.fixDomain+")();document.write( '"+b+"' );document.close();")+"})())"),f.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),f.push("\x3c/div\x3e"),e=CKEDITOR.dom.element.createFromHtml(f.join("")),e.setOpacity(void 0!==d?d:.5),e.on("keydown",q),e.on("keypress",q),e.on("keyup",q),e.appendTo(CKEDITOR.document.getBody()),K[c]=e);a.focusManager.add(e);B=e;CKEDITOR.env.mac&&CKEDITOR.env.webkit||
e.focus()}function r(a){CKEDITOR.document.getBody().removeClass("cke_dialog_open");B&&(a.focusManager.remove(B),B.hide())}function A(a){var c=a.data.$.ctrlKey||a.data.$.metaKey,d=a.data.$.altKey,b=a.data.$.shiftKey,f=String.fromCharCode(a.data.$.keyCode);(c=Q[(c?"CTRL+":"")+(d?"ALT+":"")+(b?"SHIFT+":"")+f])&&c.length&&(c=c[c.length-1],c.keydown&&c.keydown.call(c.uiElement,c.dialog,c.key),a.data.preventDefault())}function v(a){var c=a.data.$.ctrlKey||a.data.$.metaKey,d=a.data.$.altKey,b=a.data.$.shiftKey,
f=String.fromCharCode(a.data.$.keyCode);(c=Q[(c?"CTRL+":"")+(d?"ALT+":"")+(b?"SHIFT+":"")+f])&&c.length&&(c=c[c.length-1],c.keyup&&(c.keyup.call(c.uiElement,c.dialog,c.key),a.data.preventDefault()))}function z(a,c,d,b,f){(Q[d]||(Q[d]=[])).push({uiElement:a,dialog:c,key:d,keyup:f||a.accessKeyUp,keydown:b||a.accessKeyDown})}function u(a){for(var c in Q){for(var d=Q[c],b=d.length-1;0<=b;b--)d[b].dialog!=a&&d[b].uiElement!=a||d.splice(b,1);0===d.length&&delete Q[c]}}function p(a,c){a._.accessKeyMap[c]&&
a.selectPage(a._.accessKeyMap[c])}function w(){}var C=CKEDITOR.tools.cssLength,J,B,E=!1,D=!CKEDITOR.env.ie||CKEDITOR.env.edge,G='\x3cdiv class\x3d"cke_reset_all cke_dialog_container {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" style\x3d"'+(D?"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"'+(D?"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,c){function d(){var a=A._.focusList;a.sort(function(a,c){return a.tabIndex!=c.tabIndex?c.tabIndex-a.tabIndex:a.focusIndex-c.focusIndex});for(var c=a.length,b=0;b<c;b++)a[b].focusIndex=b}function l(a){var c=A._.focusList;a=a||0;if(!(1>c.length)){var d=A._.currentFocusIndex;A._.tabBarMode&&0>a&&(d=0);try{c[d].getInputElement().$.blur()}catch(b){}var f=d,e=1<A._.pageCount;do{f+=a;if(e&&!A._.tabBarMode&&(f==c.length||-1==f)){A._.tabBarMode=!0;A._.tabs[A._.currentTabId][0].focus();
A._.currentFocusIndex=-1;return}f=(f+c.length)%c.length;if(f==d)break}while(a&&!c[f].isFocusable());c[f].focus();"text"==c[f].type&&c[f].select()}}function r(c){if(A==CKEDITOR.dialog._.currentTop){var d=c.data.getKeystroke(),f="rtl"==a.lang.dir,h=[37,38,39,40];t=z=0;if(9==d||d==CKEDITOR.SHIFT+9)l(d==CKEDITOR.SHIFT+9?-1:1),t=1;else if(d==CKEDITOR.ALT+121&&!A._.tabBarMode&&1<A.getPageCount())b(A),t=1;else if(-1!=CKEDITOR.tools.indexOf(h,d)&&A._.tabBarMode)d=-1!=CKEDITOR.tools.indexOf([f?39:37,38],d)?
g.call(A):e.call(A),A.selectPage(d),A._.tabs[d][0].focus(),t=1;else if(13!=d&&32!=d||!A._.tabBarMode)if(13==d)d=c.data.getTarget(),d.is("a","button","select","textarea")||d.is("input")&&"button"==d.$.type||((d=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(d.click,0,d),t=1),z=1;else if(27==d)(d=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(d.click,0,d):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),z=1;else return;else this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex=
-1,l(1),t=1;u(c)}}function u(a){t?a.data.preventDefault(1):z&&a.data.stopPropagation()}var p=CKEDITOR.dialog._.dialogDefinitions[c],v=CKEDITOR.tools.clone(J),y=a.config.dialog_buttonsOrder||"OS",w=a.lang.dir,q={},t,z;("OS"==y&&CKEDITOR.env.mac||"rtl"==y&&"ltr"==w||"ltr"==y&&"rtl"==w)&&v.buttons.reverse();p=CKEDITOR.tools.extend(p(a),v);p=CKEDITOR.tools.clone(p);p=new f(this,p);v=m(a);this._={editor:a,element:v.element,name:c,model:null,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},
buttons:{},accessKeyMap:{},viewportRatio:{width:.5,height:.5},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1};this.parts=v.parts;CKEDITOR.tools.setTimeout(function(){a.fire("ariaWidget",this.parts.contents)},0,this);v={top:0,visibility:"hidden"};CKEDITOR.env.ie6Compat&&(v.position="absolute");v["rtl"==w?"right":"left"]=0;this.parts.dialog.setStyles(v);CKEDITOR.event.call(this);this.definition=p=CKEDITOR.fire("dialogDefinition",
{name:c,definition:p,dialog:this},a).definition;if(!("removeDialogTabs"in a._)&&a.config.removeDialogTabs){v=a.config.removeDialogTabs.split(";");for(w=0;w<v.length;w++)if(y=v[w].split(":"),2==y.length){var D=y[0];q[D]||(q[D]=[]);q[D].push(y[1])}a._.removeDialogTabs=q}if(a._.removeDialogTabs&&(q=a._.removeDialogTabs[c]))for(w=0;w<q.length;w++)p.removeContents(q[w]);if(p.onLoad)this.on("load",p.onLoad);if(p.onShow)this.on("show",p.onShow);if(p.onHide)this.on("hide",p.onHide);if(p.onOk)this.on("ok",
function(c){a.fire("saveSnapshot");setTimeout(function(){a.fire("saveSnapshot")},0);!1===p.onOk.call(this,c)&&(c.data.hide=!1)});this.state=CKEDITOR.DIALOG_STATE_IDLE;if(p.onCancel)this.on("cancel",function(a){!1===p.onCancel.call(this,a)&&(a.data.hide=!1)});var A=this,G=function(a){var c=A._.contents,d=!1,b;for(b in c)for(var f in c[b])if(d=a.call(this,c[b][f]))return};this.on("ok",function(a){G(function(c){if(c.validate){var d=c.validate(this),b="string"==typeof d||!1===d;b&&(a.data.hide=!1,a.stop());
h.call(c,!b,"string"==typeof d?d:void 0);return b}})},this,null,0);this.on("cancel",function(c){G(function(d){if(d.isChanged())return a.config.dialog_noConfirmCancel||confirm(a.lang.common.confirmCancel)||(c.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 B=this._.element;a.focusManager.add(B,1);this.on("show",function(){B.on("keydown",r,this);if(CKEDITOR.env.gecko)B.on("keypress",
u,this)});this.on("hide",function(){B.removeListener("keydown",r);CKEDITOR.env.gecko&&B.removeListener("keypress",u);G(function(a){k.apply(a)})});this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",r,this,null,0)});this.on("show",function(){d();var c=1<A._.pageCount;a.config.dialog_startupFocusTab&&c?(A._.tabBarMode=!0,A._.tabs[A._.currentTabId][0].focus(),A._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=c?-1:this._.focusList.length-
1,p.onFocus?(c=p.onFocus.call(this))&&c.focus():l(1))},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var a=this.getElement(),c=a.getFirst();c.remove();c.appendTo(a)},this);n(this);x(this);(new CKEDITOR.dom.text(p.title,CKEDITOR.document)).appendTo(this.parts.title);for(w=0;w<p.contents.length;w++)(q=p.contents[w])&&this.addPage(q);this.parts.tabs.on("click",function(a){var c=a.data.getTarget();c.hasClass("cke_dialog_tab")&&(c=c.$.id,this.selectPage(c.substring(4,c.lastIndexOf("_"))),
b(this),a.data.preventDefault())},this);w=[];q=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:p.buttons},w).getChild();this.parts.footer.setHtml(w.join(""));for(w=0;w<q.length;w++)this._.buttons[q[w].id]=q[w]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(a,c){if(!this._.contentSize||this._.contentSize.width!=a||this._.contentSize.height!=c){CKEDITOR.dialog.fire("resize",
{dialog:this,width:a,height:c},this._.editor);this.fire("resize",{width:a,height:c},this._.editor);this.parts.contents.setStyles({width:a+"px",height:c+"px"});if("rtl"==this._.editor.lang.dir&&this._.position){var d=this.parts.dialog.getParent().getClientSize().width;this._.position.x=d-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10)}this._.contentSize={width:a,height:c}}},getSize:function(){var a=this._.element.getFirst();return{width:a.$.offsetWidth||0,height:a.$.offsetHeight||
0}},move:function(a,c,d){var b=this._.element.getFirst(),f="rtl"==this._.editor.lang.dir;CKEDITOR.env.ie&&b.setStyle("zoom","100%");var e=this.parts.dialog.getParent().getClientSize(),h=this.getSize(),g=this._.viewportRatio,k=Math.max(e.width-h.width,0),e=Math.max(e.height-h.height,0);this._.position&&this._.position.x==a&&this._.position.y==c?(a=Math.floor(k*g.width),c=Math.floor(e*g.height)):y(this,a,c);this._.position={x:a,y:c};f&&(a=k-a);c={top:(0<c?c:0)+"px"};c[f?"right":"left"]=(0<a?a:0)+"px";
b.setStyles(c);d&&(this._.moved=1)},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,c=this.definition,b=CKEDITOR.document.getBody(),f=this._.editor.config.baseFloatZIndex;a.getParent()&&a.getParent().equals(b)?a.setStyle("display",D?"flex":"block"):a.appendTo(b);this.resize(this._.contentSize&&this._.contentSize.width||c.width||c.minWidth,this._.contentSize&&this._.contentSize.height||c.height||c.minHeight);this.reset();null===this._.currentTabId&&
this.selectPage(this.definition.contents[0].id);null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=f);this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10);this.getElement().setStyle("z-index",CKEDITOR.dialog._.currentZIndex);null===CKEDITOR.dialog._.currentTop?(CKEDITOR.dialog._.currentTop=this,this._.parentDialog=null,t(this._.editor)):CKEDITOR.dialog._.currentTop!==this&&(this._.parentDialog=CKEDITOR.dialog._.currentTop,b=this._.parentDialog.getElement().getFirst(),
b.$.style.zIndex-=Math.floor(f/2),this._.parentDialog.getElement().setStyle("z-index",b.$.style.zIndex),CKEDITOR.dialog._.currentTop=this);a.on("keydown",A);a.on("keyup",v);this._.hasFocus=!1;for(var e in c.contents)if(c.contents[e]){var a=c.contents[e],f=this._.tabs[a.id],b=a.requiredContent,h=0;if(f){for(var g in this._.contents[a.id]){var k=this._.contents[a.id][g];"hbox"!=k.type&&"vbox"!=k.type&&k.getInputElement()&&(k.requiredContent&&!this._.editor.activeFilter.check(k.requiredContent)?k.disable():
(k.enable(),h++))}!h||b&&!this._.editor.activeFilter.check(b)?f[0].addClass("cke_dialog_tab_disabled"):f[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();d(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||!D){var c=this.getSize(),d=CKEDITOR.document.getWindow().getViewPaneSize(),b;this._.moved&&this._.position?(b=this._.position.x,c=this._.position.y):(b=(d.width-c.width)/2,c=(d.height-c.height)/2);CKEDITOR.env.ie6Compat||(a.setStyle("position","absolute"),a.removeStyle("margin"));b=Math.floor(b);c=Math.floor(c);this.move(b,c)}},foreach:function(a){for(var c in this._.contents)for(var d in this._.contents[c])a.call(this,this._.contents[c][d]);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(c){c.setup&&c.setup.apply(c,a)})},commitContent:function(){var a=arguments;this.foreach(function(c){CKEDITOR.env.ie&&this._.currentFocusIndex==c.focusIndex&&c.getInputElement().$.blur();c.commit&&c.commit.apply(c,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(u(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var c=this._.parentDialog.getElement().getFirst(),d=parseInt(c.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2);this._.parentDialog.getElement().setStyle("z-index",d);c.setStyle("z-index",d)}else r(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=
10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",A);a.removeListener("keyup",v);var b=this._.editor;b.focus();setTimeout(function(){b.focusManager.unlock();CKEDITOR.env.iOS&&b.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 c=[],d=a.label?' title\x3d"'+CKEDITOR.tools.htmlEncode(a.label)+
'"':"",b=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%;"},c),f=this._.contents[a.id]={},e=b.getChild(),h=0;b=e.shift();)b.notAllowed||"hbox"==b.type||"vbox"==b.type||h++,f[b.id]=b,"function"==typeof b.getChild&&e.push.apply(e,b.getChild());h||(a.hidden=!0);c=CKEDITOR.dom.element.createFromHtml(c.join(""));c.setAttribute("role","tabpanel");c.setStyle("min-height",
"100%");b=CKEDITOR.env;f="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();d=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"',0<this._.pageCount?" cke_last":"cke_first",d,a.hidden?' style\x3d"display:none"':"",' id\x3d"',f,'"',b.gecko&&!b.hc?"":' href\x3d"javascript:void(0)"',' tabIndex\x3d"-1" hidefocus\x3d"true" role\x3d"tab"\x3e',a.label,"\x3c/a\x3e"].join(""));c.setAttribute("aria-labelledby",f);this._.tabs[a.id]=[d,c];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++;
this._.lastTab=d;this.updateStyle();c.setAttribute("name",a.id);c.appendTo(this.parts.contents);d.unselectable();this.parts.tabs.append(d);a.accessKey&&(z(this,this,"CTRL+"+a.accessKey,w,p),this._.accessKeyMap["CTRL+"+a.accessKey]=a.id)}},selectPage:function(c){if(this._.currentTabId!=c&&!this._.tabs[c][0].hasClass("cke_dialog_tab_disabled")&&!1!==this.fire("selectPage",{page:c,currentPage:this._.currentTabId})){for(var d in this._.tabs){var b=this._.tabs[d][0],f=this._.tabs[d][1];d!=c&&(b.removeClass("cke_dialog_tab_selected"),
b.removeAttribute("aria-selected"),f.hide());f.setAttribute("aria-hidden",d!=c)}var e=this._.tabs[c];e[0].addClass("cke_dialog_tab_selected");e[0].setAttribute("aria-selected",!0);CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(a(e[1]),e[1].show(),setTimeout(function(){a(e[1],1)},0)):e[1].show();this._.currentTabId=c;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,c)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(a){var c=
this._.tabs[a]&&this._.tabs[a][0];c&&1!=this._.pageCount&&c.isVisible()&&(a==this._.currentTabId&&this.selectPage(g.call(this)),c.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,c){var d=this._.contents[a];return d&&d[c]},getValueOf:function(a,c){return this.getContentElement(a,c).getValue()},
setValueOf:function(a,c,d){return this.getContentElement(a,c).setValue(d)},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,
c){if("undefined"==typeof c)c=this._.focusList.length,this._.focusList.push(new l(this,a,c));else{this._.focusList.splice(c,0,new l(this,a,c));for(var d=c+1;d<this._.focusList.length;d++)this._.focusList[d].focusIndex++}},setState:function(a){if(this.state!=a){this.state=a;if(a==CKEDITOR.DIALOG_STATE_BUSY){if(!this.parts.spinner){var c=this.getParentEditor().lang.dir,d={attributes:{"class":"cke_dialog_spinner"},styles:{"float":"rtl"==c?"right":"left"}};d.styles["margin-"+("rtl"==c?"left":"right")]=
"8px";this.parts.spinner=CKEDITOR.document.createElement("div",d);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,c){this._.dialogDefinitions[a]&&"function"!=typeof c||(this._.dialogDefinitions[a]=c)},exists:function(a){return!!this._.dialogDefinitions[a]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},
isTabEnabled:function(a,c,d){a=a.config.removeDialogTabs;return!(a&&a.match(new RegExp("(?:^|;)"+c+":"+d+"(?:$|;)","i")))},okButton:function(){var a=function(a,c){c=c||{};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()}},c,!0)};a.type="button";a.override=function(c){return CKEDITOR.tools.extend(function(d){return a(d,c)},{type:"button"},!0)};return a}(),cancelButton:function(){var a=
function(a,c){c=c||{};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()}},c,!0)};a.type="button";a.override=function(c){return CKEDITOR.tools.extend(function(d){return a(d,c)},{type:"button"},!0)};return a}(),addUIElement:function(a,c){this._.uiElementBuilders[a]=c}});CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};
CKEDITOR.event.implementOn(CKEDITOR.dialog);CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);J={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]};var I=function(a,c,d){for(var b=0,f;f=a[b];b++)if(f.id==c||d&&f[d]&&(f=I(f[d],c,d)))return f;return null},P=function(a,c,d,b,f){if(d){for(var e=0,h;h=a[e];e++){if(h.id==d)return a.splice(e,0,c),c;if(b&&h[b]&&(h=P(h[b],c,d,b,!0)))return h}if(f)return null}a.push(c);return c},
M=function(a,c,d){for(var b=0,f;f=a[b];b++){if(f.id==c)return a.splice(b,1);if(d&&f[d]&&(f=M(f[d],c,d)))return f}return null};f.prototype={getContents:function(a){return I(this.contents,a)},getButton:function(a){return I(this.buttons,a)},addContents:function(a,c){return P(this.contents,a,c)},addButton:function(a,c){return P(this.buttons,a,c)},removeContents:function(a){M(this.contents,a)},removeButton:function(a){M(this.buttons,a)}};c.prototype={get:function(a){return I(this.elements,a,"children")},
add:function(a,c){return P(this.elements,a,c,"children")},remove:function(a){M(this.elements,a,"children")}};var K={},Q={};(function(){CKEDITOR.ui.dialog={uiElement:function(a,c,d,b,f,e,h){if(!(4>arguments.length)){var g=(b.call?b(c):b)||"div",k=["\x3c",g," "],n=(f&&f.call?f(c):f)||{},l=(e&&e.call?e(c):e)||{},m=(h&&h.call?h.call(this,a,c):h)||"",x=this.domId=l.id||CKEDITOR.tools.getNextId()+"_uiElement";c.requiredContent&&!a.getParentEditor().filter.check(c.requiredContent)&&(n.display="none",this.notAllowed=
!0);l.id=x;var r={};c.type&&(r["cke_dialog_ui_"+c.type]=1);c.className&&(r[c.className]=1);c.disabled&&(r.cke_disabled=1);for(var u=l["class"]&&l["class"].split?l["class"].split(" "):[],x=0;x<u.length;x++)u[x]&&(r[u[x]]=1);u=[];for(x in r)u.push(x);l["class"]=u.join(" ");c.title&&(l.title=c.title);r=(c.style||"").split(";");c.align&&(u=c.align,n["margin-left"]="left"==u?0:"auto",n["margin-right"]="right"==u?0:"auto");for(x in n)r.push(x+":"+n[x]);c.hidden&&r.push("display:none");for(x=r.length-1;0<=
x;x--)""===r[x]&&r.splice(x,1);0<r.length&&(l.style=(l.style?l.style+"; ":"")+r.join("; "));for(x in l)k.push(x+'\x3d"'+CKEDITOR.tools.htmlEncode(l[x])+'" ');k.push("\x3e",m,"\x3c/",g,"\x3e");d.push(k.join(""));(this._||(this._={})).dialog=a;"boolean"==typeof c.isChanged&&(this.isChanged=function(){return c.isChanged});"function"==typeof c.isChanged&&(this.isChanged=c.isChanged);"function"==typeof c.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(a){return function(d){a.call(this,
c.setValue.call(this,d))}}));"function"==typeof c.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,function(a){return function(){return c.getValue.call(this,a.call(this))}}));CKEDITOR.event.implementOn(this);this.registerEvents(c);this.accessKeyUp&&this.accessKeyDown&&c.accessKey&&z(this,a,"CTRL+"+c.accessKey);var p=this;a.on("load",function(){var c=p.getInputElement();if(c){var d=p.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?"cke_dialog_ui_focused":"";c.on("focus",
function(){a._.tabBarMode=!1;a._.hasFocus=!0;p.fire("focus");d&&this.addClass(d)});c.on("blur",function(){p.fire("blur");d&&this.removeClass(d)})}});CKEDITOR.tools.extend(this,c);this.keyboardFocusable&&(this.tabIndex=c.tabIndex||0,this.focusIndex=a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=p.focusIndex}))}},hbox:function(a,c,d,b,f){if(!(4>arguments.length)){this._||(this._={});var e=this._.children=c,h=f&&f.widths||null,g=f&&f.height||null,k,n={role:"presentation"};
f&&f.align&&(n.align=f.align);CKEDITOR.ui.dialog.uiElement.call(this,a,f||{type:"hbox"},b,"table",{},n,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(k=0;k<d.length;k++){var c="cke_dialog_ui_hbox_child",b=[];0===k&&(c="cke_dialog_ui_hbox_first");k==d.length-1&&(c="cke_dialog_ui_hbox_last");a.push('\x3ctd class\x3d"',c,'" role\x3d"presentation" ');h?h[k]&&b.push("width:"+C(h[k])):b.push("width:"+Math.floor(100/d.length)+"%");g&&b.push("height:"+C(g));f&&void 0!==f.padding&&
b.push("padding:"+C(f.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e[k].align&&b.push("text-align:"+e[k].align);0<b.length&&a.push('style\x3d"'+b.join("; ")+'" ');a.push("\x3e",d[k],"\x3c/td\x3e")}a.push("\x3c/tr\x3e\x3c/tbody\x3e");return a.join("")})}},vbox:function(a,c,d,b,f){if(!(3>arguments.length)){this._||(this._={});var e=this._.children=c,h=f&&f.width||null,g=f&&f.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,f||{type:"vbox"},b,"div",null,{role:"presentation"},function(){var c=
['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];c.push('style\x3d"');f&&f.expand&&c.push("height:100%;");c.push("width:"+C(h||"100%"),";");CKEDITOR.env.webkit&&c.push("float:none;");c.push('"');c.push('align\x3d"',CKEDITOR.tools.htmlEncode(f&&f.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');c.push("\x3e\x3ctbody\x3e");for(var b=0;b<d.length;b++){var k=[];c.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');h&&k.push("width:"+C(h||"100%"));g?k.push("height:"+
C(g[b])):f&&f.expand&&k.push("height:"+Math.floor(100/d.length)+"%");f&&void 0!==f.padding&&k.push("padding:"+C(f.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e[b].align&&k.push("text-align:"+e[b].align);0<k.length&&c.push('style\x3d"',k.join("; "),'" ');c.push(' class\x3d"cke_dialog_ui_vbox_child"\x3e',d[b],"\x3c/td\x3e\x3c/tr\x3e")}c.push("\x3c/tbody\x3e\x3c/table\x3e");return c.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,c){this.getInputElement().setValue(a);!c&&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 c=/^on([A-Z]\w+)/,d,b=function(a,c,d,b){c.on("load",function(){a.getInputElement().on(d,b,a)})},f;for(f in a)if(d=f.match(c))this.eventProcessors[f]?this.eventProcessors[f].call(this,this._.dialog,a[f]):b(this,this._.dialog,d[1].toLowerCase(),a[f]);return this},eventProcessors:{onLoad:function(a,c){a.on("load",c,this)},onShow:function(a,c){a.on("show",
c,this)},onHide:function(a,c){a.on("hide",c,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,
c,d){for(var b=c.children,f,e=[],h=[],g=0;g<b.length&&(f=b[g]);g++){var k=[];e.push(k);h.push(CKEDITOR.dialog._.uiElementBuilders[f.type].build(a,f,k))}return new CKEDITOR.ui.dialog[c.type](a,h,e,d,c)}};CKEDITOR.dialog.addUIElement("hbox",a);CKEDITOR.dialog.addUIElement("vbox",a)})();CKEDITOR.dialogCommand=function(a,c){this.dialogName=a;CKEDITOR.tools.extend(this,c,!0)};CKEDITOR.dialogCommand.prototype={exec:function(a){var c=this.tabId;a.openDialog(this.dialogName,function(a){c&&a.selectPage(c)})},
canUndo:!1,editorFocus:1};(function(){var a=/^\d*$/,c=/^\d*(?:\.\d+)?$/,d=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,b=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,f=/^(--|-?([a-zA-Z_]|\\))(\\|[a-zA-Z0-9-_])*\s*?:\s*?[^:;]+$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_AND=2;CKEDITOR.dialog.validate={functions:function(){var a=arguments;return function(c){this&&this.getValue&&(c=this.getValue());var d,b=CKEDITOR.VALIDATE_AND,f=[],e;for(e=0;e<a.length;e++)if("function"==typeof a[e])f.push(a[e]);
else break;e<a.length&&"string"==typeof a[e]&&(d=a[e],e++);e<a.length&&"number"==typeof a[e]&&(b=a[e]);e=b==CKEDITOR.VALIDATE_AND;for(var h=0;h<f.length;h++){var g=!0===f[h](c);e=b==CKEDITOR.VALIDATE_AND?e&&g:e||g}return e?!0:d}},regex:function(a,c){return this.functions(function(c){return a.test(c)},c)},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(c){return this.regex(a,c)},number:function(a){return this.regex(c,a)},cssLength:function(a){return this.functions(function(a){return b.test(CKEDITOR.tools.trim(a))},a)},htmlLength:function(a){return this.functions(function(a){return d.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(function(a){a=CKEDITOR.tools.trim(a).split(";");""===a[a.length-1]&&a.pop();return CKEDITOR.tools.array.every(a,function(a){return f.test(CKEDITOR.tools.trim(a))})},
a)},equals:function(a,c){return this.functions(function(c){return c==a},c)},notEqual:function(a,c){return this.functions(function(c){return c!=a},c)}};CKEDITOR.on("instanceDestroyed",function(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var c;c=CKEDITOR.dialog._.currentTop;)c.hide();for(var d in K)K[d].remove();K={}}a=a.editor._.storedDialogs;for(var b in a)a[b].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,c,d){var b=null,f=CKEDITOR.dialog._.dialogDefinitions[a];
null===CKEDITOR.dialog._.currentTop&&t(this);if("function"==typeof f)f=this._.storedDialogs||(this._.storedDialogs={}),b=f[a]||(f[a]=new CKEDITOR.dialog(this,a)),b.setModel(d),c&&c.call(b,b),b.show();else{if("failed"==f)throw r(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');"string"==typeof f&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(f),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[a]&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed");
this.openDialog(a,c,d)},this,0,1)}CKEDITOR.skin.loadPart("dialog");if(b)b.once("hide",function(){b.setModel(null)},null,null,999);return b}});CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(a){E||(CKEDITOR.document.appendStyleSheet(this.path+"styles/dialog.css"),E=!0);a.on("doubleclick",function(c){c.data.dialog&&a.openDialog(c.data.dialog)},null,null,999)}})}(),"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 g(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 g(b);b.showNotification=function(a,g,m){var l,d;"progress"==g?l=m:d=m;a=new CKEDITOR.plugins.notification(b,{message:a,type:g,progress:l,duration:d});a.show();return a};b.on("key",function(h){if(27==h.data.keyCode){var g=b._.notificationArea.notifications;
g.length&&(a(b.lang.notification.closed),g[g.length-1].hide(),h.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 h=this.element,g=h.findOne(".cke_notification_message"),m=h.findOne(".cke_notification_progress"),l=b.type;h.removeAttribute("role");b.progress&&"progress"!=this.type&&
(l="progress");l&&(h.removeClass(this._getClass()),h.removeAttribute("aria-label"),this.type=l,h.addClass(this._getClass()),h.setAttribute("aria-label",this.type),"progress"!=this.type||m?"progress"!=this.type&&m&&m.remove():(m=this._createProgressElement(),m.insertBefore(g)));void 0!==b.message&&(this.message=b.message,g.setHtml(this.message));void 0!==b.progress&&(this.progress=b.progress,m&&m.setStyle("width",this._getPercentageProgress()));a&&b.important&&(h.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,h,g=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());h=new CKEDITOR.dom.element("p");h.addClass("cke_notification_message");h.setHtml(this.message);a.append(h);h=CKEDITOR.dom.element.createFromHtml('\x3ca class\x3d"cke_notification_close" href\x3d"javascript:void(0)" title\x3d"'+g+'" role\x3d"button" tabindex\x3d"-1"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e');a.append(h);h.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))}};g.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,h=new CKEDITOR.dom.element("div");h.addClass("cke_notifications_area");h.setAttribute("id","cke_notifications_area_"+b.name);h.setStyle("z-index",a.baseFloatZIndex-2);return h},_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",A(v+g.width-n-x))}var a=this.element,h=this.editor,g=h.ui.contentsElement.getClientRect(),
m=h.ui.contentsElement.getDocumentPosition(),l,d,f=a.getClientRect(),c,n=this._notificationWidth,x=this._notificationMargin;c=CKEDITOR.document.getWindow();var y=c.getScrollPosition(),q=c.getViewPaneSize(),t=CKEDITOR.document.getBody(),r=t.getDocumentPosition(),A=CKEDITOR.tools.cssLength;n&&x||(c=this.element.getChild(0),n=this._notificationWidth=c.getClientRect().width,x=this._notificationMargin=parseInt(c.getComputedStyle("margin-left"),10)+parseInt(c.getComputedStyle("margin-right"),10));h.toolbar&&
(l=h.ui.space(h.config.toolbarLocation),d=l.getClientRect());l&&l.isVisible()&&d.bottom>g.top&&d.bottom<g.bottom-f.height?a.setStyles({position:"fixed",top:A(d.bottom)}):0<g.top?a.setStyles({position:"absolute",top:A(m.y)}):m.y+g.height-f.height>y.y?a.setStyles({position:"fixed",top:0}):a.setStyles({position:"absolute",top:A(m.y+g.height-f.height)});var v="fixed"==a.getStyle("position")?g.left:"static"!=t.getComputedStyle("position")?m.x-r.x:m.x;g.width<n+x?m.x+n+x>y.x+q.width?b():a.setStyle("left",
A(v)):m.x+n+x>y.x+q.width?a.setStyle("left",A(v)):m.x+g.width/2+n/2+x>y.x+q.width?a.setStyle("left",A(v-m.x+y.x+q.width-n-x)):0>g.left+g.width-n-x?b():0>g.left+g.width/2-n/2?a.setStyle("left",A(v-m.x+y.x)):a.setStyle("left",A(v+g.width/2-n/2-x/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 g="";CKEDITOR.env.ie&&(g='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"'+g+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"')+
'\x3e\x26nbsp;\x3c/span\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_button_label cke_button__{name}_label" aria-hidden\x3d"false"\x3e{label}\x3c/span\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_button_label" aria-hidden\x3d"false"\x3e{ariaShortcutSpace}{ariaShortcut}\x3c/span\x3e{arrowHtml}\x3c/a\x3e',e=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),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(b,g){function m(){var a=b.mode;a&&(a=this.modes[a]?void 0!==l[a]?l[a]:CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED,a=b.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:a,this.setState(a),this.refresh&&this.refresh())}var l=null,d=CKEDITOR.env,f=this._.id=CKEDITOR.tools.getNextId(),c="",n=this.command,x,y,q;this._.editor=b;var t={id:f,button:this,editor:b,focus:function(){CKEDITOR.document.getById(f).focus()},execute:function(){this.button.click(b)},attach:function(a){this.button.attach(a)}},r=CKEDITOR.tools.addFunction(function(a){if(t.onkey)return a=new CKEDITOR.dom.event(a),!1!==
t.onkey(t,a.getKeystroke())}),A=CKEDITOR.tools.addFunction(function(a){var c;t.onfocus&&(c=!1!==t.onfocus(t,new CKEDITOR.dom.event(a)));return c}),v=0;t.clickFn=x=CKEDITOR.tools.addFunction(function(){v&&(b.unlockSelection(1),v=0);t.execute();d.iOS&&b.focus()});this.modes?(l={},b.on("beforeModeUnload",function(){b.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(l[b.mode]=this._.state)},this),b.on("activeFilterChange",m,this),b.on("mode",m,this),!this.readOnly&&b.on("readOnly",m,this)):n&&(n=b.getCommand(n))&&
(n.on("state",function(){this.setState(n.state)},this),c+=n.state==CKEDITOR.TRISTATE_ON?"on":n.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var z;if(this.directional)b.on("contentDirChanged",function(a){var c=CKEDITOR.document.getById(this._.id),d=c.getFirst();a=a.data;a!=b.lang.dir?c.addClass("cke_"+a):c.removeClass("cke_ltr").removeClass("cke_rtl");d.setAttribute("style",CKEDITOR.skin.getIconStyle(z,"rtl"==a,this.icon,this.iconOffset))},this);n?(y=b.getCommandKeystroke(n))&&(q=CKEDITOR.tools.keystrokeToString(b.lang.common.keyboard,
y)):c+="off";y=this.name||this.command;var u=null,p=this.icon;z=y;this.icon&&!/\./.test(this.icon)?(z=this.icon,p=null):(this.icon&&(u=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(u=this.iconHiDpi));u?(CKEDITOR.skin.addIcon(u,u),p=null):u=z;c={id:f,name:y,iconName:z,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:c,ariaDisabled:"disabled"==c?"true":"false",title:this.title+(q?" ("+q.display+")":""),ariaShortcutSpace:q?"\x26nbsp;":"",ariaShortcut:q?b.lang.common.keyboardShortcut+
" "+q.aria:"",titleJs:d.gecko&&!d.hc?"":(this.title||"").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:r,focusFn:A,clickFn:x,style:CKEDITOR.skin.getIconStyle(u,"rtl"==b.lang.dir,p,this.iconOffset),arrowHtml:this.hasArrow?e.output():"",hasArrowAriaHtml:this.hasArrow?' aria-expanded\x3d"false"':"",toggleAriaHtml:this.isToggle?'aria-pressed\x3d"false"':""};a.output(c,g);if(this.onRender)this.onRender();return t},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 c=e(),d=CKEDITOR.tools.clone(a.config.toolbarGroups)||g(a),f=0;f<d.length;f++){var k=d[f];if("/"!=k){"string"==typeof k&&(k=d[f]={name:k});var t,r=k.groups;if(r)for(var A=0;A<r.length;A++)t=r[A],(t=c[t])&&l(k,t);(t=c[k.name])&&l(k,t)}}return d}function e(){var c={},d,b,f;for(d in a.ui.items)b=a.ui.items[d],f=b.toolbar||"others",f=f.split(","),b=f[0],f=parseInt(f[1]||-1,10),c[b]||(c[b]=[]),c[b].push({name:d,
order:f});for(b in c)c[b]=c[b].sort(function(a,c){return a.order==c.order?0:0>c.order?-1:0>a.order?1:a.order<c.order?-1:1});return c}function l(c,d){if(d.length){c.items?c.items.push(a.ui.create("-")):c.items=[];for(var b;b=d.shift();)b="string"==typeof b?b:b.name,f&&-1!=CKEDITOR.tools.indexOf(f,b)||(b=a.ui.create(b))&&a.addFeature(b)&&c.items.push(b)}}function d(a){var c=[],d,b,f;for(d=0;d<a.length;++d)b=a[d],f={},"/"==b?c.push(b):CKEDITOR.tools.isArray(b)?(l(f,CKEDITOR.tools.clone(b)),c.push(f)):
b.items&&(l(f,CKEDITOR.tools.clone(b.items)),f.name=b.name,c.push(f));return c}var f=function(a){return a&&"string"===typeof a?a.split(","):a}(a.config.removeButtons),c=a.config.toolbar;"string"==typeof c&&(c=a.config["toolbar_"+c]);return a.toolbar=c?d(c):b()}function g(a){return a._.toolbarGroups||(a._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},"/",
{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var e=function(){this.toolbars=[]};e.prototype.focus=function(){for(var a=0,b;b=this.toolbars[a++];)for(var e=0,g;g=b.items[e++];)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(h){var g,m=function(a,d){var b,c="rtl"==h.lang.dir,e=h.config.toolbarGroupCycling,x=c?37:39,c=c?39:37,e=void 0===e||e;switch(d){case 9:case CKEDITOR.SHIFT+9:for(;!b||!b.items.length;)if(b=9==d?(b?b.next:a.toolbar.next)||h.toolbox.toolbars[0]:(b?b.previous:a.toolbar.previous)||h.toolbox.toolbars[h.toolbox.toolbars.length-1],b.items.length)for(a=b.items[g?b.items.length-
1:0];a&&!a.focus;)(a=g?a.previous:a.next)||(b=0);a&&a.focus();return!1;case x:b=a;do b=b.next,!b&&e&&(b=a.toolbar.items[0]);while(b&&!b.focus);b?b.focus():m(a,9);return!1;case 40:return a.button&&a.button.hasArrow?a.execute():m(a,40==d?x:c),!1;case c:case 38:b=a;do b=b.previous,!b&&e&&(b=a.toolbar.items[a.toolbar.items.length-1]);while(b&&!b.focus);b?b.focus():(g=1,m(a,CKEDITOR.SHIFT+9),g=0);return!1;case 27:return h.focus(),!1;case 13:case 32:return a.execute(),!1;case CKEDITOR.ALT+122:return h.execCommand("elementsPathFocus"),
!1}return!0};h.on("uiSpace",function(a){if(a.data.space==h.config.toolbarLocation){a.removeListener();h.toolbox=new e;var d=CKEDITOR.tools.getNextId(),f=['\x3cspan id\x3d"',d,'" class\x3d"cke_voice_label"\x3e',h.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+h.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',d,'" onmousedown\x3d"return false;"\x3e'],d=!1!==h.config.toolbarStartupExpanded,c,g;h.config.toolbarCanCollapse&&h.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&
f.push('\x3cspan class\x3d"cke_toolbox_main"'+(d?"\x3e":' style\x3d"display:none"\x3e'));for(var k=h.toolbox.toolbars,y=b(h),q=y.length,t=0;t<q;t++){var r,A=0,v,z=y[t],u="/"!==z&&("/"===y[t+1]||t==q-1),p;if(z)if(c&&(f.push("\x3c/span\x3e"),g=c=0),"/"===z)f.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{p=z.items||z;for(var w=0;w<p.length;w++){var C=p[w],J;if(C){var B=function(a){a=a.render(h,f);E=A.items.push(a)-1;0<E&&(a.previous=A.items[E-1],a.previous.next=a);a.toolbar=A;a.onkey=
m};if(C.type==CKEDITOR.UI_SEPARATOR)g=c&&C;else{J=!1!==C.canGroup;if(!A){r=CKEDITOR.tools.getNextId();A={id:r,items:[]};v=z.name&&(h.lang.toolbar.toolbarGroups[z.name]||z.name);f.push('\x3cspan id\x3d"',r,'" class\x3d"cke_toolbar'+(u?' cke_toolbar_last"':'"'),v?' aria-labelledby\x3d"'+r+'_label"':"",' role\x3d"toolbar"\x3e');v&&f.push('\x3cspan id\x3d"',r,'_label" class\x3d"cke_voice_label"\x3e',v,"\x3c/span\x3e");f.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var E=k.push(A)-1;
0<E&&(A.previous=k[E-1],A.previous.next=A)}J?c||(f.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),c=1):c&&(f.push("\x3c/span\x3e"),c=0);g&&(B(g),g=0);B(C)}}}c&&(f.push("\x3c/span\x3e"),g=c=0);A&&f.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}h.config.toolbarCanCollapse&&f.push("\x3c/span\x3e");if(h.config.toolbarCanCollapse&&h.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var D=CKEDITOR.tools.addFunction(function(){h.execCommand("toolbarCollapse")});
h.on("destroy",function(){CKEDITOR.tools.removeFunction(D)});h.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var c=a.ui.space("toolbar_collapser"),b=c.getPrevious(),d=a.ui.space("contents"),f=b.getParent(),e=parseInt(d.$.style.height,10),h=f.$.offsetHeight,g=c.hasClass("cke_toolbox_collapser_min");g?(b.show(),c.removeClass("cke_toolbox_collapser_min"),c.setAttribute("title",a.lang.toolbar.toolbarCollapse)):(b.hide(),c.addClass("cke_toolbox_collapser_min"),c.setAttribute("title",a.lang.toolbar.toolbarExpand));
c.getFirst().setText(g?"▲":"◀");d.setStyle("height",e-(f.$.offsetHeight-h)+"px");a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:d.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});h.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");f.push('\x3ca title\x3d"'+(d?h.lang.toolbar.toolbarCollapse:h.lang.toolbar.toolbarExpand)+'" id\x3d"'+h.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');
d||f.push(" cke_toolbox_collapser_min");f.push('" onclick\x3d"CKEDITOR.tools.callFunction('+D+')"\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("")}});h.on("destroy",function(){if(this.toolbox){var a,b=0,f,c,e;for(a=this.toolbox.toolbars;b<a.length;b++)for(c=a[b].items,f=0;f<c.length;f++)e=c[f],e.clickFn&&CKEDITOR.tools.removeFunction(e.clickFn),e.keyDownFn&&CKEDITOR.tools.removeFunction(e.keyDownFn)}});h.on("uiReady",function(){var a=
h.ui.space("toolbox");a&&h.focusManager.add(a,1)});h.addCommand("toolbarFocus",a);h.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");h.ui.add("-",CKEDITOR.UI_SEPARATOR,{});h.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(a,b){b.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(a,b,e){var l=g(this.editor),d=0===b,f={name:a};if(e){if(e=CKEDITOR.tools.search(l,function(a){return a.name==
e})){!e.groups&&(e.groups=[]);if(b&&(b=CKEDITOR.tools.indexOf(e.groups,b),0<=b)){e.groups.splice(b+1,0,a);return}d?e.groups.splice(0,0,a):e.groups.push(a);return}b=null}b&&(b=CKEDITOR.tools.indexOf(l,function(a){return a.name==b}));d?l.splice(0,0,a):"number"==typeof b?l.splice(b+1,0,f):l.push(a)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top","use strict",function(){function b(a,b,d){b.type||(b.type="auto");if(d&&!1===a.fire("beforePaste",b)||!b.dataValue&&b.dataTransfer.isEmpty())return!1;
b.dataValue||(b.dataValue="");if(CKEDITOR.env.gecko&&"drop"==b.method&&a.toolbox)a.once("afterPaste",function(){a.toolbox.focus();a.focus()});return a.fire("paste",b)}function g(a){function d(){var b=a.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var f=function(b){a.getSelection().isCollapsed()||(a.readOnly&&"cut"==b.name||J.initPasteDataTransfer(b,a),b.data.preventDefault())};b.on("copy",f);b.on("cut",f);b.on("cut",function(){a.readOnly||a.extractSelectedHtml()},null,null,999)}b.on(J.mainPasteEvent,
function(a){"beforepaste"==J.mainPasteEvent&&B||p(a)});"beforepaste"==J.mainPasteEvent&&(b.on("paste",function(a){E||(h(),a.data.preventDefault(),p(a),k("paste"))}),b.on("contextmenu",g,null,null,0),b.on("beforepaste",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||g()},null,null,0));b.on("beforecut",function(){!B&&l(a)});var e;b.attachListener(CKEDITOR.env.ie?b:a.document.getDocumentElement(),"mouseup",function(){e=setTimeout(w,0)});a.on("destroy",function(){clearTimeout(e)});b.on("keyup",
w)}function f(b){return{type:b,canUndo:"cut"==b,startDisabled:!0,fakeKeystroke:"cut"==b?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==this.type&&l();var b;var d=this.type;if(CKEDITOR.env.ie)b=k(d);else try{b=a.document.$.execCommand(d,!1,null)}catch(f){b=!1}b||a.showNotification(a.lang.clipboard[this.type+"Error"]);return b}}}function e(){return{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(a,c){function d(c,h){h="undefined"!==typeof h?h:!0;c?(c.method="paste",c.dataTransfer||
(c.dataTransfer=J.initPasteDataTransfer()),b(a,c,h)):e&&!a._.forcePasteDialog&&a.showNotification(k,"info",a.config.clipboard_notificationDuration);a._.forcePasteDialog=!1;a.fire("afterCommandExec",{name:"paste",command:f,returnValue:!!c})}c="undefined"!==typeof c&&null!==c?c:{};var f=this,e="undefined"!==typeof c.notification?c.notification:!0,h=c.type,g=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,a.getCommandKeystroke(this)),k="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 c?c:c.dataValue;h&&!0!==a.config.forcePasteAsPlainText&&"allow-word"!==a.config.forcePasteAsPlainText?a._.nextPasteType=h:delete a._.nextPasteType;"string"===typeof g?d({dataValue:g}):a.getClipboardData(d)}}}function h(){E=1;setTimeout(function(){E=0},100)}function g(){B=1;setTimeout(function(){B=0},10)}function k(b){var d=a.document,f=d.getBody(),e=!1,h=function(){e=!0};f.on(b,h);7<CKEDITOR.env.version?d.$.execCommand(b):
d.$.selection.createRange().execCommand(b);f.removeListener(b,h);return e}function l(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var b=a.getSelection(),d,f,e;b.getType()==CKEDITOR.SELECTION_ELEMENT&&(d=b.getSelectedElement())&&(f=b.getRanges()[0],e=a.document.createText(""),e.insertBefore(d),f.setStartBefore(e),f.setEndAfter(d),b.selectRanges([f]),setTimeout(function(){d.getParent()&&(e.remove(),b.selectElement(d))},0))}}function m(b,d){var f=a.document,e=a.editable(),h=function(a){a.cancel()},g;
if(!f.getById("cke_pastebin")){var k=a.getSelection(),n=k.createBookmarks();CKEDITOR.env.ie&&k.root.fire("selectionchange");var l=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!e.is("body")||CKEDITOR.env.ie?"div":"body",f);l.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var x=0,f=f.getWindow();CKEDITOR.env.webkit?(e.append(l),l.addClass("cke_editable"),e.is("body")||(x="static"!=e.getComputedStyle("position")?e:CKEDITOR.dom.element.get(e.$.offsetParent),x=x.getDocumentPosition().y)):e.getAscendant(CKEDITOR.env.ie?
"body":"html",1).append(l);l.setStyles({position:"absolute",top:f.getScrollPosition().y-x+10+"px",width:"1px",height:Math.max(1,f.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&l.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));(x=l.getParent().isReadOnly())?(l.setOpacity(0),l.setAttribute("contenteditable",!0)):l.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-10000px");a.on("selectionChange",h,null,null,0);if(CKEDITOR.env.webkit||
CKEDITOR.env.gecko)g=e.once("blur",h,null,null,-100);x&&l.focus();x=new CKEDITOR.dom.range(l);x.selectNodeContents(l);var u=x.select();CKEDITOR.env.ie&&(g=e.once("blur",function(){a.lockSelection(u)}));var r=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=r);g&&g.removeListener();CKEDITOR.env.ie&&e.focus();k.selectBookmarks(n);l.remove();var b;CKEDITOR.env.webkit&&(b=l.getFirst())&&b.is&&b.hasClass("Apple-style-span")&&
(l=b);a.removeListener("selectionChange",h);d(l.getHtml())},0)}}function z(){if("paste"==J.mainPasteEvent)return a.fire("beforePaste",{type:"auto",method:"paste"}),!1;a.focus();h();var b=a.focusManager;b.lock();if(a.editable().fire(J.mainPasteEvent)&&!k("paste"))return b.unlock(),!1;b.unlock();return!0}function u(b){if("wysiwyg"==a.mode)switch(b.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:b=a.editable();h();"paste"==J.mainPasteEvent&&b.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+
46:a.fire("saveSnapshot"),setTimeout(function(){a.fire("saveSnapshot")},50)}}function p(d){var f={type:"auto",method:"paste",dataTransfer:J.initPasteDataTransfer(d)};f.dataTransfer.cacheData();var e=!1!==a.fire("beforePaste",f);e&&J.canClipboardApiBeTrusted(f.dataTransfer,a)?(d.data.preventDefault(),setTimeout(function(){b(a,f)},0)):m(d,function(d){f.dataValue=d.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");e&&b(a,f)})}function w(){if("wysiwyg"==a.mode){var b=C("paste");a.getCommand("cut").setState(C("cut"));
a.getCommand("copy").setState(C("copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function C(b){var d=a.getSelection(),d=d&&d.getRanges()[0];if((a.readOnly||d&&d.checkReadOnly())&&b in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==b)return CKEDITOR.TRISTATE_OFF;b=a.getSelection();d=b.getRanges();return b.getType()==CKEDITOR.SELECTION_NONE||1==d.length&&d[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var J=CKEDITOR.plugins.clipboard,B=0,E=0;(function(){a.on("key",
u);a.on("contentDom",d);a.on("selectionChange",w);if(a.contextMenu){a.contextMenu.addListener(function(){return{cut:C("cut"),copy:C("copy"),paste:C("paste")}});var b=null;a.on("menuShow",function(){b&&(b.removeListener(),b=null);var d=a.contextMenu.findItemByCommandName("paste");d&&d.element&&(b=d.element.on("touchend",function(){a._.forcePasteDialog=!0}))})}if(a.ui.addButton)a.once("instanceReady",function(){a._.pasteButtons&&CKEDITOR.tools.array.forEach(a._.pasteButtons,function(b){if(b=a.ui.get(b))if(b=
CKEDITOR.document.getById(b._.id))b.on("touchend",function(){a._.forcePasteDialog=!0})})})})();(function(){function b(d,f,e,h,g){var k=a.lang.clipboard[f];a.addCommand(f,e);a.ui.addButton&&a.ui.addButton(d,{label:k,command:f,toolbar:"clipboard,"+h});a.addMenuItems&&a.addMenuItem(f,{label:k,command:f,group:"clipboard",order:g})}b("Cut","cut",f("cut"),10,1);b("Copy","copy",f("copy"),20,4);b("Paste","paste",e(),30,8);a._.pasteButtons||(a._.pasteButtons=[]);a._.pasteButtons.push("Paste")})();a.getClipboardData=
function(b,d){function f(a){a.removeListener();a.cancel();d(a.data)}function e(a){a.removeListener();a.cancel();d({type:g,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var h=!1,g="auto";d||(d=b,b=null);a.on("beforePaste",function(a){a.removeListener();h=!0;g=a.data.type},null,null,1E3);a.on("paste",f,null,null,0);!1===z()&&(a.removeListener("paste",f),a._.forcePasteDialog&&h&&a.fire("pasteDialog")?(a.on("pasteDialogCommit",e),a.on("dialogHide",function(a){a.removeListener();
a.data.removeListener("pasteDialogCommit",e);a.data._.committed||d(null)})):d(null))}}function e(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi)&&!a.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}else return"html";return"htmlifiedtext"}function a(a,b){function d(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",
~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/(?!\u3000)\s+/g," ").replace(/> +</g,"\x3e\x3c").replace(/<br ?\/>/gi,"\x3cbr\x3e");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1<b.indexOf("\x3cdiv\x3e")&&(b=b.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"\x3cbr\x3e").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"),b.match(/<div>(<br>|)<\/div>/)&&(b="\x3cp\x3e"+b.replace(/(<div>(<br>|)<\/div>)+/g,
function(a){return d(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),b=b.replace(/<\/div><div>/g,"\x3cbr\x3e"),b=b.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(b=b.replace(/^<br><br>$/,"\x3cbr\x3e")),-1<b.indexOf("\x3cbr\x3e\x3cbr\x3e")&&(b="\x3cp\x3e"+b.replace(/(<br>){2,}/g,function(a){return d(a.length/4)})+"\x3c/p\x3e"));return m(a,b)}function h(a){function b(){var a={},c;for(c in CKEDITOR.dtd)"$"!=c.charAt(0)&&"div"!=c&&"span"!=
c&&(a[c]=1);return a}var d={};return{get:function(f){return"plain-text"==f?d.plainText||(d.plainText=new CKEDITOR.filter(a,"br")):"semantic-content"==f?((f=d.semanticContent)||(f=new CKEDITOR.filter(a,{}),f.allow({$1:{elements:b(),attributes:!0,styles:!1,classes:!1}}),f=d.semanticContent=f),f):f?new CKEDITOR.filter(a,f):null}}}function k(a,b,d){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var f=new CKEDITOR.htmlParser.basicWriter;d.applyTo(b,!0,!1,a.activeEnterMode);b.writeHtml(f);return f.getHtml()}
function m(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return b}function l(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function d(a){var d=CKEDITOR.plugins.clipboard;a.on("contentDom",function(){function f(d,e,h){e.select();b(a,{dataTransfer:h,method:"drop"},1);h.sourceEditor.fire("saveSnapshot");
h.sourceEditor.editable().extractHtmlFromRange(d);h.sourceEditor.getSelection().selectRanges([d]);h.sourceEditor.fire("saveSnapshot")}function e(f,h){f.select();b(a,{dataTransfer:h,method:"drop"},1);d.resetDragDataTransfer()}function h(b,d,f){var e={$:b.data.$,target:b.data.getTarget()};d&&(e.dragRange=d);f&&(e.dropRange=f);!1===a.fire(b.name,e)&&b.data.preventDefault()}function g(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}var k=a.editable(),l=CKEDITOR.plugins.clipboard.getDropTarget(a),
m=a.ui.space("top"),z=a.ui.space("bottom");d.preventDefaultDropOnElement(m);d.preventDefaultDropOnElement(z);k.attachListener(l,"dragstart",h);k.attachListener(a,"dragstart",d.resetDragDataTransfer,d,null,1);k.attachListener(a,"dragstart",function(b){d.initDragDataTransfer(b,a)},null,null,2);k.attachListener(a,"dragstart",function(){var b=d.dragRange=a.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(d.dragStartContainerChildCount=b?g(b.startContainer):null,d.dragEndContainerChildCount=
b?g(b.endContainer):null)},null,null,100);k.attachListener(l,"dragend",h);k.attachListener(a,"dragend",d.initDragDataTransfer,d,null,1);k.attachListener(a,"dragend",d.resetDragDataTransfer,d,null,100);k.attachListener(l,"dragover",function(a){if(CKEDITOR.env.edge)a.data.preventDefault();else{var c=a.data.getTarget();c&&c.is&&c.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()}});
k.attachListener(l,"drop",function(b){if(!b.data.$.defaultPrevented&&(b.data.preventDefault(),!a.readOnly)){var f=b.data.getTarget();if(!f.isReadOnly()||f.type==CKEDITOR.NODE_ELEMENT&&f.is("html")){var f=d.getRangeAtDropPosition(b,a),e=d.dragRange;f&&h(b,e,f)}}},null,null,9999);k.attachListener(a,"drop",d.initDragDataTransfer,d,null,1);k.attachListener(a,"drop",function(b){if(b=b.data){var h=b.dropRange,g=b.dragRange,k=b.dataTransfer;k.getTransferType(a)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){d.internalDrop(g,
h,k,a)},0):k.getTransferType(a)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?f(g,h,k):e(h,k)}},null,null,9999)})}var f;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",_supportedFileMatchers:[],init:function(c){function b(a){return c.config.clipboard_handleImages?-1!==CKEDITOR.tools.indexOf(["image/png","image/jpeg","image/gif"],a.type):!1}function f(a){return CKEDITOR.tools.array.some(c.plugins.clipboard._supportedFileMatchers,function(c){return c(a)})}function l(a){a.length&&(a=
CKEDITOR.tools.array.unique(a),a=CKEDITOR.tools.array.filter(a,function(a){return!!CKEDITOR.tools.trim(a)}),a=m(a.join(", ")),c.showNotification(a,"info",c.config.clipboard_notificationDuration))}function m(a){return a?c.lang.clipboard.fileFormatNotSupportedNotification.replace(/\${formats\}/g,"\x3cem\x3e"+a+"\x3c/em\x3e"):c.lang.clipboard.fileWithoutFormatNotSupportedNotification}function t(a,c){return CKEDITOR.env.ie&&a.data.fileTransferCancel||!(CKEDITOR.env.ie||c&&z!==c.id)?!1:c.isFileTransfer()&&
1===c.getFilesCount()}var r,A=h(c);c.config.forcePasteAsPlainText?r="plain-text":c.config.pasteFilter?r=c.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in c.config||(r="semantic-content");c.pasteFilter=A.get(r);g(c);d(c);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));var v=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||CKEDITOR.plugins.clipboard.isFileApiSupported,z;CKEDITOR.plugins.clipboard.addFileMatcher(c,b);c.on("paste",function(a){if(v){var c=a.data;
a=c.dataTransfer;if(!c.dataValue){for(var c=[],b=0;b<a.getFilesCount();b++){var d=a.getFile(b);f(d)||c.push(d.type)}l(c)}}},null,null,1);c.on("paste",function(a){if(v&&c.config.clipboard_handleImages){var d=a.data,f=d.dataTransfer;if(!d.dataValue&&t(a,f)&&(f=f.getFile(0),b(f))){var e=new FileReader;e.addEventListener("load",function(){a.data.dataValue='\x3cimg src\x3d"'+e.result+'" /\x3e';c.fire("paste",a.data)},!1);e.addEventListener("abort",function(){CKEDITOR.env.ie&&(a.data.fileTransferCancel=
!0);c.fire("paste",a.data)},!1);e.addEventListener("error",function(){CKEDITOR.env.ie&&(a.data.fileTransferCancel=!0);c.fire("paste",a.data)},!1);e.readAsDataURL(f);z=d.dataTransfer.id;a.stop()}}},null,null,1);c.on("paste",function(a){a.data.dataTransfer||(a.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!a.data.dataValue){var b=a.data.dataTransfer,d=b.getData("text/html");if(d)a.data.dataValue=d,a.data.type="html";else if(d=b.getData("text/plain"))a.data.dataValue=c.editable().transformPlainTextToHtml(d),
a.data.type="text"}},null,null,1);c.on("paste",function(a){var c=a.data.dataValue,b=CKEDITOR.dtd.$block;-1<c.indexOf("Apple-")&&(c=c.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi," "),"html"!=a.data.type&&(c=c.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(a,c){return c.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1<c.indexOf('\x3cbr class\x3d"Apple-interchange-newline"\x3e')&&(a.data.startsWithEOL=1,a.data.preSniffing="html",c=c.replace(/<br class="Apple-interchange-newline">/,
"")),c=c.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));if(c.match(/^<[^<]+cke_(editable|contents)/i)){var d,f,e=new CKEDITOR.dom.element("div");for(e.setHtml(c);1==e.getChildCount()&&(d=e.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)e=f=d;f&&(c=f.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?c=c.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(c,d){return d.toLowerCase()in b?(a.data.preSniffing="html","\x3c"+d):c}):CKEDITOR.env.webkit?c=c.replace(/<\/(\w+)><div><br><\/div>$/,
function(c,d){return d in b?(a.data.endsWithEOL=1,"\x3c/"+d+"\x3e"):c}):CKEDITOR.env.gecko&&(c=c.replace(/(\s)<br>$/,"$1"));a.data.dataValue=c},null,null,3);c.on("paste",function(b){b=b.data;var d=c._.nextPasteType||b.type,f=b.dataValue,h,g=c.config.clipboard_defaultContentType||"html",n=b.dataTransfer.getTransferType(c)==CKEDITOR.DATA_TRANSFER_EXTERNAL,l=!0===c.config.forcePasteAsPlainText;h="html"==d||"html"==b.preSniffing?"html":e(f);delete c._.nextPasteType;"htmlifiedtext"==h&&(f=a(c.config,f));
if("text"==d&&"html"==h)f=k(c,f,A.get("plain-text"));else if(n&&c.pasteFilter&&!b.dontFilter||l)f=k(c,f,c.pasteFilter);b.startsWithEOL&&(f='\x3cbr data-cke-eol\x3d"1"\x3e'+f);b.endsWithEOL&&(f+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==d&&(d="html"==h||"html"==g?"html":"text");b.type=d;b.dataValue=f;delete b.preSniffing;delete b.startsWithEOL;delete b.endsWithEOL},null,null,6);c.on("paste",function(a){a=a.data;a.dataValue&&(c.insertHtml(a.dataValue,a.type,a.range),setTimeout(function(){c.fire("afterPaste")},
0))},null,null,1E3);c.on("pasteDialog",function(a){setTimeout(function(){c.openDialog("paste",a.data)},0)})}});CKEDITOR.plugins.clipboard={addFileMatcher:function(a,b){a.plugins.clipboard._supportedFileMatchers.push(b)},isCustomCopyCutSupported:CKEDITOR.env.ie&&16>CKEDITOR.env.version||CKEDITOR.env.iOS&&605>CKEDITOR.env.version?!1:!0,isCustomDataTypesSupported:!CKEDITOR.env.ie||16<=CKEDITOR.env.version,isFileApiSupported:!CKEDITOR.env.ie||9<CKEDITOR.env.version,mainPasteEvent:CKEDITOR.env.ie&&!CKEDITOR.env.edge?
"beforepaste":"paste",addPasteButton:function(a,b,d){a.ui.addButton&&(a.ui.addButton(b,d),a._.pasteButtons||(a._.pasteButtons=[]),a._.pasteButtons.push(b))},canClipboardApiBeTrusted:function(a,b){return a.getTransferType(b)!=CKEDITOR.DATA_TRANSFER_EXTERNAL||CKEDITOR.env.chrome&&!a.isEmpty()||CKEDITOR.env.gecko&&(a.getData("text/html")||a.getFilesCount())||CKEDITOR.env.safari&&603<=CKEDITOR.env.version&&!CKEDITOR.env.iOS||CKEDITOR.env.iOS&&605<=CKEDITOR.env.version||CKEDITOR.env.edge&&16<=CKEDITOR.env.version?
!0:!1},getDropTarget:function(a){var b=a.editable();return CKEDITOR.env.ie&&9>CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,b,d,f){function e(a,c,d){var f=a;f.type==CKEDITOR.NODE_TEXT&&(f=a.getParent());if(f.equals(c)&&d!=c.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),c=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(d=a.getLength(),a.setText(a.getText()+c.getText()),c.remove(),b.setStart(a,
d),b.collapse(!0)),!0}var h=b.startContainer;"number"==typeof f&&"number"==typeof d&&h.type==CKEDITOR.NODE_ELEMENT&&(e(a.startContainer,h,d)||e(a.endContainer,h,f))},isDropRangeAffectedByDragRange:function(a,b){var d=b.startContainer,f=b.endOffset;return a.endContainer.equals(d)&&a.endOffset<=f||a.startContainer.getParent().equals(d)&&a.startContainer.getIndex()<f||a.endContainer.getParent().equals(d)&&a.endContainer.getIndex()<f?!0:!1},internalDrop:function(a,d,f,e){var h=CKEDITOR.plugins.clipboard,
g=e.editable(),k,l;e.fire("saveSnapshot");e.fire("lockSnapshot",{dontUpdate:1});CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(a,d,h.dragStartContainerChildCount,h.dragEndContainerChildCount);(l=this.isDropRangeAffectedByDragRange(a,d))||(k=a.createBookmark(!1));h=d.clone().createBookmark(!1);l&&(k=a.createBookmark(!1));a=k.startNode;d=k.endNode;l=h.startNode;d&&a.getPosition(l)&CKEDITOR.POSITION_PRECEDING&&d.getPosition(l)&CKEDITOR.POSITION_FOLLOWING&&l.insertBefore(a);a=e.createRange();
a.moveToBookmark(k);g.extractHtmlFromRange(a,1);d=e.createRange();h.startNode.getCommonAncestor(g)||(h=e.getSelection().createBookmarks()[0]);d.moveToBookmark(h);b(e,{dataTransfer:f,method:"drop",range:d},1);e.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var d=a.data.$,f=d.clientX,e=d.clientY,h=b.getSelection(!0).getRanges()[0],g=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(f,e))d=b.document.$.caretRangeFromPoint(f,
e),g.setStart(CKEDITOR.dom.node(d.startContainer),d.startOffset),g.collapse(!0);else if(d.rangeParent)g.setStart(CKEDITOR.dom.node(d.rangeParent),d.rangeOffset),g.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&h&&b.editable().hasFocus)return h;if(document.body.createTextRange){b.focus();d=b.document.getBody().$.createTextRange();try{for(var k=!1,l=0;20>l&&!k;l++){if(!k)try{d.moveToPoint(f,e-l),k=!0}catch(m){}if(!k)try{d.moveToPoint(f,e+l),k=!0}catch(u){}}if(k){var p="cke-temp-"+(new Date).getTime();
d.pasteHTML('\x3cspan id\x3d"'+p+'"\x3e​\x3c/span\x3e');var w=b.document.getById(p);g.moveToPosition(w,CKEDITOR.POSITION_BEFORE_START);w.remove()}else{var C=b.document.$.elementFromPoint(f,e),J=new CKEDITOR.dom.element(C),B;if(J.equals(b.editable())||"html"==J.getName())return h&&h.startContainer&&!h.startContainer.equals(b.editable())?h:null;B=J.getClientRect();f<B.left?g.setStartAt(J,CKEDITOR.POSITION_AFTER_START):g.setStartAt(J,CKEDITOR.POSITION_BEFORE_END);g.collapse(!0)}}catch(E){return null}}else return null}return g},
initDragDataTransfer:function(a,b){var d=a.data.$?a.data.$.dataTransfer:null,f=new this.dataTransfer(d,b);"dragstart"===a.name&&f.storeId();d?this.dragData&&f.id==this.dragData.id?f=this.dragData:this.dragData=f:this.dragData?f=this.dragData:this.dragData=f;a.data.dataTransfer=f},resetDragDataTransfer:function(){this.dragData=null},initPasteDataTransfer:function(a,b){if(this.isCustomCopyCutSupported){if(a&&a.data&&a.data.$){var d=a.data.$.clipboardData,f=new this.dataTransfer(d,b);"copy"!==a.name&&
"cut"!==a.name||f.storeId();this.copyCutData&&f.id==this.copyCutData.id?(f=this.copyCutData,f.$=d):this.copyCutData=f;return f}return new this.dataTransfer(null,b)}return new this.dataTransfer(CKEDITOR.env.edge&&a&&a.data.$&&a.data.$.clipboardData||null,b)},preventDefaultDropOnElement:function(a){a&&a.on("dragover",l)}};f=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?"cke/id":"Text";CKEDITOR.plugins.clipboard.dataTransfer=function(a,b){a&&(this.$=a);this._={metaRegExp:/^<meta.*?>/i,fragmentRegExp:/\s*\x3c!--StartFragment--\x3e|\x3c!--EndFragment--\x3e\s*/g,
types:[],data:{},files:[],nativeHtmlCache:"",normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":"files"===a?"Files":a}};this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);this.id=this.getData(f);this.id||(this.id="Text"==f?"":"cke-"+CKEDITOR.tools.getUniqueId());b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==f||this.getData("text/plain")||this.setData("text/plain",b.getSelection().getSelectedText()))};
CKEDITOR.DATA_TRANSFER_INTERNAL=1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(a,b){a=this._.normalizeType(a);var d="text/html"==a&&b?this._.nativeHtmlCache:this._.data[a];if(void 0===d||null===d||""===d){if(this._.fallbackDataTransfer.isRequired())d=this._.fallbackDataTransfer.getData(a,b);else try{d=this.$.getData(a)||""}catch(f){d=""}"text/html"!=a||b||(d=this._stripHtml(d))}"Text"==a&&CKEDITOR.env.gecko&&
this.getFilesCount()&&"file://"==d.substring(0,7)&&(d="");if("string"===typeof d)var e=d.indexOf("\x3c/html\x3e"),d=-1!==e?d.substring(0,e+7):d;return d},setData:function(a,b){a=this._.normalizeType(a);"text/html"==a?(this._.data[a]=this._stripHtml(b),this._.nativeHtmlCache=b):this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a)if("Text"==f&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a,
b)}catch(d){}},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(c){c=b._.normalizeType(c);var d=b.getData(c);"text/html"==c&&(b._.nativeHtmlCache=b.getData(c,!0),d=b._stripHtml(d));d&&(b._.data[c]=d);b._.types.push(c)}if(this.$){var b=this,d,f,e;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(d=
0;d<this.$.types.length;d++)a(this.$.types[d])}else a("Text"),a("URL");f=this._getImageFromClipboard();if((e=this.$&&this.$.files||null)||f){this._.files=[];if(e&&e.length)for(d=0;d<e.length;d++)this._.files.push(e[d]);0===this._.files.length&&f&&this._.files.push(f)}}},getFilesCount:function(){if(this._.files.length)return this._.files.length;var a=this.$&&this.$.files||null;return a&&a.length?a.length:this._getImageFromClipboard()?1:0},getFile:function(a){if(this._.files.length)return this._.files[a];
var b=this.$&&this.$.files||null;return b&&b.length?b[a]:0===a?this._getImageFromClipboard():void 0},isFileTransfer:function(){var a=this.getTypes(),a=CKEDITOR.tools.array.filter(a,function(a){return"application/x-moz-file"!==a});return 1===a.length&&"files"===a[0].toLowerCase()},isEmpty:function(){var a={},b;if(this.getFilesCount())return!1;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(this._.data),function(b){a[b]=1});if(this.$)if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(var d=
0;d<this.$.types.length;d++)a[this.$.types[d]]=1}else a.Text=1,a.URL=1;"Text"!=f&&(a[f]=0);for(b in a)if(a[b]&&""!==this.getData(b))return!1;return!0},getTypes:function(){return 0<this._.types.length?this._.types:this.$&&this.$.types?[].slice.call(this.$.types):[]},_getImageFromClipboard:function(){var a;try{if(this.$&&this.$.items&&this.$.items[0]&&(a=this.$.items[0].getAsFile())&&a.type)return a}catch(b){}},_stripHtml:function(a){function b(a){var c=new CKEDITOR.htmlParser,d,f;c.onTagOpen=function(a){"body"===
a&&(d=c._.htmlPartsRegex.lastIndex)};c.onTagClose=function(a){"body"===a&&(f=c._.htmlPartsRegex.lastIndex)};c.parse(a);return"number"!==typeof d||"number"!==typeof f?a:a.substring(d,f).replace(/<\/body\s*>$/gi,"")}a&&a.length&&(a=b(a),a=a.replace(this._.metaRegExp,""),a=a.replace(this._.fragmentRegExp,""));return a}};CKEDITOR.plugins.clipboard.fallbackDataTransfer=function(a){this._dataTransfer=a;this._customDataFallbackType="text/html"};CKEDITOR.plugins.clipboard.fallbackDataTransfer._isCustomMimeTypeSupported=
null;CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes=[];CKEDITOR.plugins.clipboard.fallbackDataTransfer.prototype={isRequired:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer,b=this._dataTransfer.$;if(null===a._isCustomMimeTypeSupported)if(b){a._isCustomMimeTypeSupported=!1;if(CKEDITOR.env.edge&&17<=CKEDITOR.env.version)return!0;try{b.setData("cke/mimetypetest","cke test value"),a._isCustomMimeTypeSupported="cke test value"===b.getData("cke/mimetypetest"),b.clearData("cke/mimetypetest")}catch(d){}}else return!1;
return!a._isCustomMimeTypeSupported},getData:function(a,b){var d=this._getData(this._customDataFallbackType,!0);if(b)return d;var d=this._extractDataComment(d),f=null,f=a===this._customDataFallbackType?d.content:d.data&&d.data[a]?d.data[a]:this._getData(a,!0);return null!==f?f:""},setData:function(a,b){var d=a===this._customDataFallbackType;d&&(b=this._applyDataComment(b,this._getFallbackTypeData()));var f=b,e=this._dataTransfer.$;try{e.setData(a,f),d&&(this._dataTransfer._.nativeHtmlCache=f)}catch(h){if(this._isUnsupportedMimeTypeError(h)){d=
CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(d._customTypes,a)&&d._customTypes.push(a);var d=this._getFallbackTypeContent(),g=this._getFallbackTypeData();g[a]=f;try{f=this._applyDataComment(d,g),e.setData(this._customDataFallbackType,f),this._dataTransfer._.nativeHtmlCache=f}catch(k){f=""}}}return f},_getData:function(a,b){var d=this._dataTransfer._.data;if(!b&&d[a])return d[a];try{return this._dataTransfer.$.getData(a)}catch(f){return null}},_getFallbackTypeContent:function(){var a=
this._dataTransfer._.data[this._customDataFallbackType];a||(a=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).content);return a},_getFallbackTypeData:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes,b=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).data||{},d=this._dataTransfer._.data;CKEDITOR.tools.array.forEach(a,function(a){void 0!==d[a]?b[a]=d[a]:void 0!==b[a]&&(b[a]=b[a])},this);return b},_isUnsupportedMimeTypeError:function(a){return a.message&&
-1!==a.message.search(/element not found/gi)},_extractDataComment:function(a){var b={data:null,content:a||""};if(a&&16<a.length){var d;(d=/\x3c!--cke-data:(.*?)--\x3e/g.exec(a))&&d[1]&&(b.data=JSON.parse(decodeURIComponent(d[1])),b.content=a.replace(d[0],""))}return b},_applyDataComment:function(a,b){var d="";b&&CKEDITOR.tools.object.keys(b).length&&(d="\x3c!--cke-data:"+encodeURIComponent(JSON.stringify(b))+"--\x3e");return d+(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 e=this._;e.state!=CKEDITOR.TRISTATE_DISABLED&&(this.createPanel(b),e.on?e.panel.hide():e.panel.showBlock(this._.id,this.document.getById(this._.id),4))}CKEDITOR.ui.panelButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(g){var e=g.panel||{};delete g.panel;this.base(g);this.document=e.parent&&e.parent.getDocument()||CKEDITOR.document;e.block={attributes:e.attributes};
e.toolbarRelated=!0;this.hasArrow="listbox";this.click=b;this._={panelDefinition:e}},statics:{handler:{create:function(b){return new CKEDITOR.ui.panelButton(b)}}},proto:{createPanel:function(b){var e=this._;if(!e.panel){var a=this._.panelDefinition,h=this._.panelDefinition.block,k=a.parent||CKEDITOR.document.getBody(),m=CKEDITOR.document.getById(this._.id),l=this._.panel=new CKEDITOR.ui.floatPanel(b,k,a),a=l.addBlock(e.id,h),d=this,f=b.getCommand(this.command);l.onShow=function(){d.className&&this.element.addClass(d.className+
"_panel");d.setState(CKEDITOR.TRISTATE_ON);m.setAttribute("aria-expanded","true");e.on=1;d.editorFocus&&b.focus();if(d.onOpen)d.onOpen()};l.onHide=function(a){d.className&&this.element.getFirst().removeClass(d.className+"_panel");!d.modes&&f?d.setStateFromCommand(f):d.setState(d.modes&&d.modes[b.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);e.on=0;m.setAttribute("aria-expanded","false");if(!a&&d.onClose)d.onClose()};l.onEscape=function(){l.hide(1);d.document.getById(e.id).focus()};if(this.onBlock)this.onBlock(l,
a);a.onHide=function(){e.on=0;!d.modes&&d.command?d.setStateFromCommand(f):d.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,b){b&&CKEDITOR.tools.extend(this,
b);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'),g=CKEDITOR.addTemplate("panel-frame",
'\x3ciframe id\x3d"{id}" class\x3d"cke_panel_frame" role\x3d"presentation" frameborder\x3d"0" src\x3d"{src}"\x3e\x3c/iframe\x3e'),e=CKEDITOR.addTemplate("panel-frame-inner",'\x3c!DOCTYPE html\x3e\x3chtml class\x3d"cke_panel_container {env}" dir\x3d"{dir}" lang\x3d"{langCode}"\x3e\x3chead\x3e{css}\x3c/head\x3e\x3cbody class\x3d"cke_{dir}" style\x3d"margin:0;padding:0" onload\x3d"{onload}"\x3e\x3c/body\x3e\x3c/html\x3e');CKEDITOR.ui.panel.prototype={render:function(a,h){var k={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"),b=a.getParent(),a=a.getFrameDocument();CKEDITOR.env.iOS&&b.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"});b=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=!0;if(this.onLoad)this.onLoad()},this));a.write(e.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),
onload:"window.parent.CKEDITOR.tools.callFunction("+b+");"},k)));a.getWindow().$.CKEDITOR=CKEDITOR;a.on("keydown",function(a){var b=a.data.getKeystroke(),d=this.document.getById(this.id).getAttribute("dir");if("input"!==a.data.getTarget().getName()||37!==b&&39!==b)this._.onKeyDown&&!1===this._.onKeyDown(b)?"input"===a.data.getTarget().getName()&&32===b||a.data.preventDefault():(27==b||b==("rtl"==d?39:37))&&this.onEscape&&!1===this.onEscape(b)&&a.data.preventDefault()},this);a=a.getBody();a.unselectable();
CKEDITOR.env.air&&CKEDITOR.tools.callFunction(b)}else a=this.document.getById(this.id);this._.holder=a}return a};if(this.isFramed){var m=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";k.frame=g.output({id:this.id+"_frame",src:m})}m=b.output(k);h&&h.push(m);return m},addBlock:function(a,b){b=this._.blocks[a]=b instanceof CKEDITOR.ui.panel.block?
b:new CKEDITOR.ui.panel.block(this.getHolderElement(),b);this._.currentBlock||this.showBlock(a);return b},getBlock:function(a){return this._.blocks[a]},showBlock:function(a){a=this._.blocks[a];var b=this._.currentBlock,e=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");b&&b.hide();this._.currentBlock=a;CKEDITOR.fire("ariaWidget",e);a._.focusIndex=-1;this._.onKeyDown=a.onKeyDown&&CKEDITOR.tools.bind(a.onKeyDown,a);a.show();return a},destroy:function(){this.element&&
this.element.remove()}};CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(a,b){this.element=a.append(a.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));b&&CKEDITOR.tools.extend(this,b);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 b=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"none"==a.getStyle("display")},e=this._.getItems(),g,l,d=e.count()-1;0<=d;d--)if(g=e.getItem(d),g.getAscendant(b)||(l=g,this._.focusIndex=d),"true"==g.getAttribute("aria-selected")){l=g;this._.focusIndex=d;break}l&&(a&&a(),CKEDITOR.env.webkit&&
l.getDocument().getWindow().focus(),l.focus(),this.onMark&&this.onMark(l))},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,b){var e=this.keys[a];switch(e){case "next":for(var g=this._.focusIndex,e=this._.getItems(),l;l=e.getItem(++g);)if(l.getAttribute("_cke_focus")&&l.$.offsetWidth){this._.focusIndex=g;l.focus(!0);
break}return l||b?!1:(this._.focusIndex=-1,this.onKeyDown(a,1));case "prev":g=this._.focusIndex;for(e=this._.getItems();0<g&&(l=e.getItem(--g));){if(l.getAttribute("_cke_focus")&&l.$.offsetWidth){this._.focusIndex=g;l.focus(!0);break}l=null}return l||b?!1:(this._.focusIndex=e.count(),this.onKeyDown(a,1));case "click":case "mouseup":return g=this._.focusIndex,(l=0<=g&&this._.getItems().getItem(g))&&l.fireEventHandler(e,{button:CKEDITOR.tools.normalizeMouseButton(CKEDITOR.MOUSE_BUTTON_LEFT,!0)}),!1}return!0}}})}(),
CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function b(b,a,h,k,m){m=CKEDITOR.tools.genKey(a.getUniqueId(),h.getUniqueId(),b.lang.dir,b.uiColor||"",k.css||"",m||"");var l=g[m];l||(l=g[m]=new CKEDITOR.ui.panel(a,k),l.element=h.append(CKEDITOR.dom.element.createFromHtml(l.render(b),a)),l.element.setStyles({display:"none",position:"absolute"}));return l}var g={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(e,a,h,g){function m(){c.hide()}h.forceIFrame=1;h.toolbarRelated&&
e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(a=CKEDITOR.document.getById("cke_"+e.name));var l=a.getDocument();g=b(e,l,a,h,g||0);var d=g.element,f=d.getFirst(),c=this;d.disableContextMenu();this.element=d;this._={editor:e,panel:g,parentElement:a,definition:h,document:l,iframe:f,children:[],dir:e.lang.dir,showBlockParams:null,markFirst:void 0!==h.markFirst?h.markFirst:!0};e.on("mode",m);e.on("resize",m);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,h,g,m,l){var d=this._.panel,f=d.showBlock(b);this._.showBlockParams=[].slice.call(arguments);this.allowBlur(!1);var c=this._.editor.editable();this._.returnFocus=c.hasFocus?c:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);this._.hideTimeout=0;var n=this.element,c=this._.iframe,c=CKEDITOR.env.ie&&!CKEDITOR.env.edge?c:new CKEDITOR.dom.window(c.$.contentWindow),
x=n.getDocument(),y=this._.parentElement.getPositionedAncestor(),q=a.getDocumentPosition(x),x=y?y.getDocumentPosition(x):{x:0,y:0},t="rtl"==this._.dir,r=q.x+(g||0)-x.x,A=q.y+(m||0)-x.y;!t||1!=h&&4!=h?t||2!=h&&3!=h||(r+=a.$.offsetWidth-1):r+=a.$.offsetWidth;if(3==h||4==h)A+=a.$.offsetHeight-1;this._.panel._.offsetParentId=a.getId();n.setStyles({top:A+"px",left:0,display:""});n.setOpacity(0);n.getFirst().removeStyle("width");this._.editor.focusManager.add(c);this._.blurSet||(CKEDITOR.event.useCapture=
!0,c.on("blur",function(a){function b(){delete this._.returnFocus;this.hide()}this.allowBlur()&&a.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild&&(CKEDITOR.env.iOS?this._.hideTimeout||(this._.hideTimeout=CKEDITOR.tools.setTimeout(b,0,this)):b.call(this))},this),c.on("focus",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)},this),CKEDITOR.env.iOS&&(c.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this),c.on("touchend",function(){this._.hideTimeout=
0;this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1);d.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 b=f.element.getDocument(),b=(CKEDITOR.env.webkit||CKEDITOR.env.edge?f.element:b.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetWidth||0)-(a.$.clientWidth||0)+3);a.setStyle("width",
b+10+"px");b=f.element.$.scrollHeight;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetHeight||0)-(a.$.clientHeight||0)+3);a.setStyle("height",b+"px");d._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");t&&(r-=n.$.offsetWidth);n.setStyle("left",r+"px");var b=d.element.getWindow(),a=n.$.getBoundingClientRect(),b=b.getViewPaneSize(),c=a.width||a.right-a.left,e=a.height||a.bottom-a.top,h=t?a.right:b.width-a.left,g=t?b.width-a.right:a.left;
t?h<c&&(r=g>c?r+c:b.width>c?r-a.left:r-a.right+b.width):h<c&&(r=g>c?r-c:b.width>c?r-a.right+b.width:r-a.left);c=a.top;b.height-a.top<e&&(A=c>e?A-e:b.height>e?A-a.bottom+b.height:A-a.top);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&((b=a=n.$.offsetParent&&new CKEDITOR.dom.element(n.$.offsetParent))&&"html"==b.getName()&&(b=b.getDocument().getBody()),b&&"rtl"==b.getComputedStyle("direction")&&(r=CKEDITOR.env.ie8Compat?r-2*n.getDocument().getDocumentElement().$.scrollLeft:r-(a.$.scrollWidth-a.$.clientWidth)));
var a=n.getFirst(),k;(k=a.getCustomData("activePanel"))&&k.onHide&&k.onHide.call(this,1);a.setCustomData("activePanel",this);n.setStyles({top:A+"px",left:r+"px"});n.setOpacity(1);l&&l()},this);d.isLoaded?a():d.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,h,g,m,l){if(this._.activeChild!=b||b._.panel._.offsetParentId!=h.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,h,g,m,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 g){var h=g[a];b?h.destroy():h.element.hide()}b&&(g={})})}(),function(){var b,g,e;CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(a){function h(c){function h(){var b=
a.config["colorButton_"+r+"Style"];b.childRule="back"==r?function(a){return m(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||m(a)};return b}function n(b,d,c){var f={};b&&(f.color=b);d&&(f.colorName=d);d=!CKEDITOR.tools.isEmpty(f)&&new CKEDITOR.style(h(),f);a.execCommand(z,{newStyle:d});if(b&&c)for(c.addColor(b.substr(1).toUpperCase()),b=E.element.find("[role\x3doption]").toArray(),c=0;c<b.length;c++)b[c].setAttributes({"aria-posinset":c+1,"aria-setsize":b.length})}var t=c.name,
r=c.type,A=c.title,v=c.order,z=c.commandName;c=c.contentTransformations||{};var u=new CKEDITOR.style(d["colorButton_"+r+"Style"]),p=CKEDITOR.tools.getNextId()+"_colorBox",w={type:r},C=new CKEDITOR.style(d["colorButton_"+r+"Style"],{color:"inherit"}),J=function(){return CKEDITOR.tools.addFunction(function(b,d,c){a.focus();a.fire("saveSnapshot");"?"==b?a.getColorFromDialog(function(a){a&&n(a,d,B)},null,w):n(b&&"#"+b,d,B);c&&(c.setAttribute("cke_colorlast",!0),a.once("selectionChange",function(){c.removeAttribute("cke_colorlast")}))})}(),
B=e.getRowLimit(a)?new e(a,"back"==r?"background-color":"color",J):void 0,E;a.addCommand(z,{contextSensitive:!0,exec:function(a,b){if(!a.readOnly){var d=b.newStyle;a.removeStyle(C);a.focus();d&&a.applyStyle(d);a.fire("saveSnapshot")}},refresh:function(a,b){C.checkApplicable(b,a,a.activeFilter)?C.checkActive(b,a)?this.setState(CKEDITOR.TRISTATE_ON):this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}});a.ui.add(t,CKEDITOR.UI_PANELBUTTON,{label:A,title:A,command:z,editorFocus:0,
toolbar:"colors,"+v,allowedContent:u,requiredContent:u,contentTransformations:c,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(d.colorButton_contentsCss),attributes:{role:"listbox","aria-label":f.panelTitle}},select:function(a){var c=d.colorButton_colors.split(",");a=CKEDITOR.tools.array.find(c,a);a=b.normalizeColor(a);l(E,a);E._.markFirstDisplayed()},onBlock:function(b,d){E=d;d.autoSize=!0;d.element.addClass("cke_colorblock");d.element.setHtml(g(p,J,B?B.getLength():0));d.element.getDocument().getBody().setStyle("overflow",
"hidden");d.element.getAscendant({html:1}).setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var c=d.keys,f="rtl"==a.lang.dir;c[f?37:39]="next";c[40]="next";c[9]="next";c[f?39:37]="prev";c[38]="prev";c[CKEDITOR.SHIFT+9]="prev";c[32]="click";B&&B.setContainer(d.element.findOne(".cke_colorhistory"))},onOpen:function(){var c=a.getSelection(),f=c&&c.getStartElement(),e=a.elementPath(f),h="back"==r?"background-color":"color";if(e){f=e.block||e.blockLimit||a.document.getBody();do e=f&&f.getComputedStyle(h)||
"transparent";while("back"==r&&"transparent"==e&&f&&(f=f.getParent()));e&&"transparent"!=e||(e="#ffffff");d.colorButton_enableAutomatic&&E.element.findOne("#"+p).setStyle("background-color",e);if(f=c&&c.getRanges()[0]){for(var c=new CKEDITOR.dom.walker(f),g=f.collapsed?f.startContainer:c.next(),f="";g;){g.type!==CKEDITOR.NODE_ELEMENT&&(g=g.getParent());g=b.normalizeColor(g.getComputedStyle(h));f=f||g;if(f!==g){f="";break}g=c.next()}"transparent"==f&&(f="");"fore"==r&&(w.automaticTextColor="#"+b.normalizeColor(e));
w.selectionColor=f?"#"+f:"";l(E,f)}return e}}})}function g(c,h,k){var l=[],m=d.colorButton_colors.split(","),n=a.plugins.colordialog&&d.colorButton_enableMore;k=m.length+k+(n?1:0);var v=1;d.colorButton_enableAutomatic&&(k+=1,v+=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(',h,',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"',c,'"\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(c=
0;c<m.length;c++){0===c%a.config.colorButton_colorsPerRow&&l.push("\x3c/tr\x3e\x3ctr\x3e");var z=m[c].split("/"),u=z[0],z=new b(a,{color:z[1]||u,label:z[1]?u:void 0},h);z.setPositionIndex(v+c,k);l.push(z.getHtml())}e.getRowLimit(a)&&e.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(',h,",'?');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 m(a){return"false"==a.getAttribute("contentEditable")||a.getAttribute("data-nostyle")}function l(a,d){var c=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<c.count();f++)if(e=c.getItem(f),d&&d==b.normalizeColor(e.getAttribute("data-value"))){e.setAttribute("aria-selected",!0);break}}var d=a.config,f=a.lang.colorbutton;if(!CKEDITOR.env.hc){h({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 c,n=a.config.colorButton_normalizeBackground;if(void 0===n||n)c=[[{element:"span",left:function(a){var b=CKEDITOR.tools;if("span"!=a.name||!a.styles||!a.styles.background)return!1;a=b.style.parse.background(a.styles.background);return a.color&&1===b.object.keys(a).length},right:function(b){var d=(new CKEDITOR.style(a.config.colorButton_backStyle,{color:b.styles.background})).getDefinition();b.name=d.element;
b.styles=d.styles;b.attributes=d.attributes||{};return b}}]];h({name:"BGColor",type:"back",commandName:"bgColor",title:f.bgColorTitle,order:20,contentTransformations:c})}}});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 b=
/^(rgb|hsl)a\(/g.test(a),e=/^rgba\((\s*0\s*,?){4}\)$/g.test(a);return b&&!e?(a=new CKEDITOR.tools.color(a),CKEDITOR.tools.normalizeHex(a.getHex()||"").replace(/#/g,"")):CKEDITOR.tools.normalizeHex("#"+CKEDITOR.tools.convertRgbToHex(a||"")).replace(/#/g,"")}},proto:{getElement:function(){return this.$},getHtml:function(){return this.getElement().getOuterHtml()},setHtml:function(){this.getElement().setHtml('\x3ca class\x3d"cke_colorbox" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"'+this.label+'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction('+
this.clickFn+",'"+this.color+"','"+this.label+"', this); return false;\" href\x3d\"javascript:void('"+this.color+'\')" data-value\x3d"'+this.color+'" role\x3d"option"\x3e\x3cspan class\x3d"cke_colorbox" style\x3d"background-color:#'+this.color+'"\x3e\x3c/span\x3e\x3c/a\x3e')},setPositionIndex:function(a,b){this.getElement().getChild(0).setAttributes({"aria-posinset":a,"aria-setsize":b})}}});g=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 b=CKEDITOR.tools.getIndex(this.boxes,function(b){return b.color===a});if(0>b)return null;this.boxes[b].getElement().remove();return this.boxes.splice(b,1)[0]}}});e=CKEDITOR.tools.createClass({$:function(a,b,e){this.editor=a;this.cssProperty=
b;this.clickFn=e;this.rows=[];this._.addNewRow();if(this.editor.config.colorButton_renderContentColors)this.editor.once("instanceReady",function(){this.renderContentColors()},this)},statics:{renderContainer:function(a,b){a.push('\x3c/tbody\x3e\x3ctbody class\x3d"cke_colorhistory" style\x3d"display:none;"\x3e',"\x3ctr\x3e",'\x3ctd colspan\x3d"',b.config.colorButton_colorsPerRow,'" align\x3d"center"\x3e',"\x3cspan\x3e\x3chr\x3e\x3c/span\x3e","\x3c/td\x3e","\x3c/tr\x3e","\x3c/tbody\x3e\x3ctbody\x3e")},
getRowLimit:function(a){return a.config.colorButton_historyRowLimit},getCapacity:function(a){return e.getRowLimit(a)*a.config.colorButton_colorsPerRow},colorList:CKEDITOR.tools.style.parse._colors},_:{countColors:function(){var a=CKEDITOR.tools.getStyledSpans(this.cssProperty,this.editor.editable());return CKEDITOR.tools.array.reduce(a,function(a,b){var g=this._.getHexCode(b,this.cssProperty,e.colorList);a[g]=a[g]||0;a[g]+=1;return a},{},this)},getHexCode:function(a,e,g){var m=a.getStyle(e);return m in
g?g[m].substr(1):b.normalizeColor(a.getComputedStyle(e)).toUpperCase()},sortByOccurrencesAscending:function(a,b){var e=[],g;for(g in a){var l={};l[b]=g;l.frequency=a[g];e.push(l)}e.sort(function(a,b){return b.frequency-a.frequency});this._.trimToCapacity(e);return e.reverse()},trimToCapacity:function(a){a.splice(e.getCapacity(this.editor))},addColors:function(a){CKEDITOR.tools.array.forEach(a,function(a){this.addColor(a.colorCode)},this)},extractColorBox:function(a){for(var b=0;b<this.rows.length;b++){var e=
this.rows[b].extractColorBox(a);if(e)return e}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 g);this.container&&this.container.append(this.rows[this.rows.length-1].getElement())},alignRows:function(){for(var a=0;a<e.getRowLimit(this.editor)&&!(this.rows[a].boxes.length<=this.editor.config.colorButton_colorsPerRow);a++)this.rows[a+1]?this._.moveLastBoxToNextRow(a):
a<e.getRowLimit(this.editor)-1?(this._.addNewRow(),this._.moveLastBoxToNextRow(a)):this.rows[a].removeLastColor()},moveLastBoxToNextRow:function(a){this.rows[a+1].addNewColor(this.rows[a].removeLastColor())},refreshPositions:function(){var a=this._.countPanelElements(),b=this._.calculateFirstPosition(a);CKEDITOR.tools.array.forEach(this.rows,function(e){CKEDITOR.tools.array.forEach(e.boxes,function(e){e.setPositionIndex(b,a);b+=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 b=this._.extractColorBox(a);this.container&&!this.container.isVisible()&&this.show();b?this._.moveToBeginning(b):this._.createAtBeginning(a);this._.alignRows()},getLength:function(){return CKEDITOR.tools.array.reduce(this.rows,
function(a,b){return a+b.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 g=new CKEDITOR.dialogCommand("colordialog");g.editorFocus=!1;b.addCommand("colordialog",g);CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js");b.getColorFromDialog=function(e,a,h){var g,
m,l,d;g=function(b){l(this);(b="ok"==b.name?this.getValueOf("picker","selectedColor"):null)&&!CKEDITOR.tools._isValidColorFormat(b)&&(b=null);/^[0-9a-f]{3}([0-9a-f]{3})?$/i.test(b)&&(b="#"+b);e.call(a,b)};m=function(a){h&&(a.data=h)};l=function(a){a.removeListener("ok",g);a.removeListener("cancel",g);a.removeListener("show",m)};d=function(a){a.on("ok",g);a.on("cancel",g);a.on("show",m,null,null,5)};b.execCommand("colordialog");if(b._.storedDialogs&&b._.storedDialogs.colordialog)d(b._.storedDialogs.colordialog);
else CKEDITOR.on("dialogDefinition",function(a){if("colordialog"==a.data.name){var b=a.data.definition;a.removeListener();b.onLoad=CKEDITOR.tools.override(b.onLoad,function(a){return function(){d(this);b.onLoad=a;"function"==typeof a&&a.call(this)}})}})}}},CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog),CKEDITOR.plugins.add("divarea",{afterInit:function(b){b.addMode("wysiwyg",function(g){var e=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_wysiwyg_div cke_reset cke_enable_context_menu" hidefocus\x3d"true"\x3e\x3c/div\x3e');
b.ui.space("contents").append(e);e=b.editable(e);e.detach=CKEDITOR.tools.override(e.detach,function(a){return function(){a.apply(this,arguments);this.remove()}});b.setData(b.getData(1),g);b.fire("contentDom")})}}),function(){function b(b,e){function m(a){a=c.list[a];var d;a.equals(b.editable())||"true"==a.getAttribute("contenteditable")?(d=b.createRange(),d.selectNodeContents(a),d=d.select()):(d=b.getSelection(),d.selectElement(a));CKEDITOR.env.ie&&b.fire("selectionChange",{selection:d,path:new CKEDITOR.dom.elementPath(a)});
b.focus()}function l(){f&&f.setHtml('\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');delete c.list}var d=b.ui.spaceId("path"),f,c=b._.elementsPath,n=c.idBase;e.html+='\x3cspan id\x3d"'+d+'_label" class\x3d"cke_voice_label"\x3e'+b.lang.elementspath.eleLabel+'\x3c/span\x3e\x3cspan id\x3d"'+d+'" class\x3d"cke_path" role\x3d"group" aria-labelledby\x3d"'+d+'_label"\x3e\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e\x3c/span\x3e';b.on("uiReady",function(){var a=b.ui.space("path");
a&&b.focusManager.add(a,1)});c.onClick=m;var x=CKEDITOR.tools.addFunction(m),y=CKEDITOR.tools.addFunction(function(a,d){var f=c.idBase,e;d=new CKEDITOR.dom.event(d);e="rtl"==b.lang.dir;switch(d.getKeystroke()){case e?39:37:case 9:return(e=CKEDITOR.document.getById(f+(a+1)))||(e=CKEDITOR.document.getById(f+"0")),e.focus(),!1;case e?37:39:case CKEDITOR.SHIFT+9:return(e=CKEDITOR.document.getById(f+(a-1)))||(e=CKEDITOR.document.getById(f+(c.list.length-1))),e.focus(),!1;case 27:return b.focus(),!1;case 13:case 32:return m(a),
!1;case CKEDITOR.ALT+121:return b.execCommand("toolbarFocus"),!1}return!0});b.on("selectionChange",function(e){for(var g=[],k=c.list=[],l=[],m=c.filters,z=!0,u=e.data.path.elements,p=u.length;p--;){var w=u[p],C=0;e=w.data("cke-display-name")?w.data("cke-display-name"):w.data("cke-real-element-type")?w.data("cke-real-element-type"):w.getName();(z=w.hasAttribute("contenteditable")?"true"==w.getAttribute("contenteditable"):z)||w.hasAttribute("contenteditable")||(C=1);for(var J=0;J<m.length;J++){var B=
m[J](w,e);if(!1===B){C=1;break}e=B||e}C||(k.unshift(w),l.unshift(e))}k=k.length;for(m=0;m<k;m++)e=l[m],z=b.lang.elementspath.eleTitle.replace(/%1/,e),e=a.output({id:n+m,label:z,text:e,jsTitle:"javascript:void('"+e+"')",index:m,keyDownFn:y,clickFn:x}),g.unshift(e);f||(f=CKEDITOR.document.getById(d));l=f;l.setHtml(g.join("")+'\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');b.fire("elementsPathUpdate",{space:l})});b.on("readOnly",l);b.on("contentDomUnload",l);b.addCommand("elementsPathFocus",
g.toolbarFocus);b.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}var g={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(a){(a=CKEDITOR.document.getById(a._.elementsPath.idBase+"0"))&&a.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}}},e="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(e+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var a=CKEDITOR.addTemplate("pathItem",'\x3ca id\x3d"{id}" href\x3d"{jsTitle}" tabindex\x3d"-1" class\x3d"cke_path_item" title\x3d"{label}"'+
e+' hidefocus\x3d"true"  draggable\x3d"false"  ondragstart\x3d"return false;" onkeydown\x3d"return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );" onclick\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;" role\x3d"button" aria-label\x3d"{label}"\x3e{text}\x3c/a\x3e');CKEDITOR.plugins.add("elementspath",{init:function(a){a._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",filters:[]};a.on("uiSpace",function(e){"bottom"==e.data.space&&b(a,e.data)})}})}(),
function(){function b(a,b,d){d=a.config.forceEnterMode||d;if("wysiwyg"==a.mode){b||(b=a.activeEnterMode);var e=a.elementPath();e&&!e.isContextFor("p")&&(b=CKEDITOR.ENTER_BR,d=1);a.fire("saveSnapshot");b==CKEDITOR.ENTER_BR?m(a,b,null,d):l(a,b,null,d);a.fire("saveSnapshot")}}function g(a){a=a.getSelection().getRanges(!0);for(var b=a.length-1;0<b;b--)a[b].deleteContents();return a[0]}function e(a){var b=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"true"==a.getAttribute("contenteditable")},
!0);if(a.root.equals(b))return a;b=new CKEDITOR.dom.range(b);b.moveToRange(a);return b}CKEDITOR.plugins.add("enterkey",{init:function(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(),h=CKEDITOR.dom.walker.bookmark(),k,m,l,d;CKEDITOR.plugins.enterkey=
{enterBlock:function(b,c,k,l){function y(a){var b;if(a===CKEDITOR.ENTER_BR||-1===CKEDITOR.tools.indexOf(["td","th"],A.lastElement.getName())||1!==A.lastElement.getChildCount())return!1;a=A.lastElement.getChild(0).clone(!0);(b=a.getBogus())&&b.remove();return a.getText().length?!1:!0}if(k=k||g(b)){k=e(k);var q=k.document,t=k.checkStartOfBlock(),r=k.checkEndOfBlock(),A=b.elementPath(k.startContainer),v=A.block,z=c==CKEDITOR.ENTER_DIV?"div":"p",u;if(v&&t&&r){t=v.getParent();if(t.is("li")&&1<t.getChildCount()){q=
new CKEDITOR.dom.element("li");u=b.createRange();q.insertAfter(t);v.remove();u.setStart(q,0);b.getSelection().selectRanges([u]);return}if(v.is("li")||v.getParent().is("li")){v.is("li")||(v=v.getParent(),t=v.getParent());u=t.getParent();k=!v.hasPrevious();var p=!v.hasNext();l=b.getSelection();var z=l.createBookmarks(),w=v.getDirection(1),r=v.getAttribute("class"),C=v.getAttribute("style"),J=u.getDirection(1)!=w;b=b.enterMode!=CKEDITOR.ENTER_BR||J||C||r;if(u.is("li"))k||p?(k&&p&&t.remove(),v[p?"insertAfter":
"insertBefore"](u)):v.breakParent(u);else{if(b)if(A.block.is("li")?(u=q.createElement(c==CKEDITOR.ENTER_P?"p":"div"),J&&u.setAttribute("dir",w),C&&u.setAttribute("style",C),r&&u.setAttribute("class",r),v.moveChildren(u)):u=A.block,k||p)u[k?"insertBefore":"insertAfter"](t);else v.breakParent(t),u.insertAfter(t);else if(v.appendBogus(!0),k||p)for(;q=v[k?"getFirst":"getLast"]();)q[k?"insertBefore":"insertAfter"](t);else for(v.breakParent(t);q=v.getLast();)q.insertAfter(t);v.remove()}l.selectBookmarks(z);
return}if(v&&v.getParent().is("blockquote")){v.breakParent(v.getParent());v.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||v.getPrevious().remove();v.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||v.getNext().remove();k.moveToElementEditStart(v);k.select();return}}else if(v&&v.is("pre")&&!r){m(b,c,k,l);return}if(C=k.splitBlock(z)){b=C.previousBlock;v=C.nextBlock;t=C.wasStartOfBlock;r=C.wasEndOfBlock;v?(p=v.getParent(),p.is("li")&&(v.breakParent(p),v.move(v.getNext(),1))):b&&(p=b.getParent())&&
p.is("li")&&(b.breakParent(p),p=b.getNext(),k.moveToElementEditStart(p),b.move(b.getPrevious()));if(t||r)if(y(c))k.moveToElementEditStart(k.getTouchedStartNode());else{if(b){if(b.is("li")||!d.test(b.getName())&&!b.is("pre"))u=b.clone()}else v&&(u=v.clone());u?l&&!u.is("li")&&u.renameNode(z):p&&p.is("li")?u=p:(u=q.createElement(z),b&&(w=b.getDirection())&&u.setAttribute("dir",w));if(q=C.elementPath)for(c=0,l=q.elements.length;c<l;c++){z=q.elements[c];if(z.equals(q.block)||z.equals(q.blockLimit))break;
CKEDITOR.dtd.$removeEmpty[z.getName()]&&(z=z.clone(),u.moveChildren(z),u.append(z))}u.appendBogus();u.getParent()||k.insertNode(u);u.is("li")&&u.removeAttribute("value");!CKEDITOR.env.ie||!t||r&&b.getChildCount()||(k.moveToElementEditStart(r?b:u),k.select());k.moveToElementEditStart(t&&!r?v:u)}else v.is("li")&&(u=k.clone(),u.selectNodeContents(v),u=new CKEDITOR.dom.walker(u),u.evaluator=function(b){return!(h(b)||a(b)||b.type==CKEDITOR.NODE_ELEMENT&&b.getName()in CKEDITOR.dtd.$inline&&!(b.getName()in
CKEDITOR.dtd.$empty))},(p=u.next())&&p.type==CKEDITOR.NODE_ELEMENT&&p.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?q.createElement("br"):q.createText(" ")).insertBefore(p)),v&&k.moveToElementEditStart(v);k.select();k.scrollIntoView()}}},enterBr:function(a,b,e,h){if(e=e||g(a)){var k=e.document,m=e.checkEndOfBlock(),t=new CKEDITOR.dom.elementPath(a.getSelection().getStartElement()),r=t.block,A=r&&t.block.getName();h||"li"!=A?(!h&&m&&d.test(A)?(m=r.getDirection())?(k=k.createElement("div"),k.setAttribute("dir",
m),k.insertAfter(r),e.setStart(k,0)):(k.createElement("br").insertAfter(r),CKEDITOR.env.gecko&&k.createText("").insertAfter(r),e.setStartAt(r.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(a="pre"==A&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?k.createText("\r"):k.createElement("br"),e.deleteContents(),e.insertNode(a),CKEDITOR.env.needsBrFiller?(k.createText("﻿").insertAfter(a),m&&(r||t.blockLimit).appendBogus(),a.getNext().$.nodeValue="",e.setStartAt(a.getNext(),
CKEDITOR.POSITION_AFTER_START)):e.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),e.collapse(!0),e.select(),e.scrollIntoView()):l(a,b,e,h)}}};k=CKEDITOR.plugins.enterkey;m=k.enterBr;l=k.enterBlock;d=/^h[1-6]$/}(),function(){function b(b,e){var a={},h=[],k={nbsp:" ",shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};b=b.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(b,d){var g=e?"\x26"+d+";":k[d];a[g]=e?k[d]:"\x26"+d+";";h.push(g);return""});b=b.replace(/,$/,"");if(!e&&b){b=b.split(",");
var m=document.createElement("div"),l;m.innerHTML="\x26"+b.join(";\x26")+";";l=m.innerHTML;m=null;for(m=0;m<l.length;m++){var d=l.charAt(m);a[d]="\x26"+b[m]+";";h.push(d)}}a.regex=h.join(e?"|":"");return a}CKEDITOR.plugins.add("entities",{afterInit:function(g){function e(a){return d[a]}function a(a){return"force"!=h.entities_processNumerical&&m[a]?m[a]:"\x26#"+(CKEDITOR.env.ie?a.charCodeAt(0):a.codePointAt(0))+";"}var h=g.config;if(g=(g=g.dataProcessor)&&g.htmlFilter){var k=[];!1!==h.basicEntities&&
k.push("nbsp,gt,lt,amp");h.entities&&(k.length&&k.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"),
h.entities_latin&&k.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"),h.entities_greek&&k.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"),
h.entities_additional&&k.push(h.entities_additional));var m=b(k.join(",")),l=m.regex?"["+m.regex+"]":"a^";delete m.regex;h.entities&&h.entities_processNumerical&&(l="[^ -~]|"+l);var l=new RegExp(l,CKEDITOR.env.ie?"g":"gu"),d=b("nbsp,gt,lt,amp,shy",!0),f=new RegExp(d.regex,"g");g.addRules({text:function(b){return b.replace(f,e).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",function(){function b(a){var b=a.config,k=a.fire("uiSpace",{space:"top",html:""}).html,m=function(){function c(a,b,f){d.setStyle(b,e(f));d.setStyle("position",a)}function f(a){var b=l.getDocumentPosition();switch(a){case "top":c("absolute","top",b.y-v-p);break;case "pin":c("fixed","top",C);break;case "bottom":c("absolute","top",b.y+(r.height||r.bottom-r.top)+p)}k=a}var k,l,t,r,A,v,z,u=b.floatSpaceDockedOffsetX||0,p=b.floatSpaceDockedOffsetY||0,w=b.floatSpacePinnedOffsetX||
0,C=b.floatSpacePinnedOffsetY||0;return function(c){if(l=a.editable()){var n=c&&"focus"==c.name;n&&d.show();a.fire("floatingSpaceLayout",{show:n});d.removeStyle("left");d.removeStyle("right");t=d.getClientRect();r=l.getClientRect();A=g.getViewPaneSize();v=t.height;z="pageXOffset"in g.$?g.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;k?(v+p<=r.top?f("top"):v+p>A.height-r.bottom?f("pin"):f("bottom"),c=A.width/2,c=b.floatSpacePreferRight?"right":0<r.left&&r.right<A.width&&r.width>t.width?
"rtl"==b.contentsLangDirection?"right":"left":c-r.left>r.right-c?"left":"right",t.width>A.width?(c="left",n=0):(n="left"==c?0<r.left?r.left:0:r.right<A.width?A.width-r.right:0,n+t.width>A.width&&(c="left"==c?"right":"left",n=0)),d.setStyle(c,e(("pin"==k?w:u)+n+("pin"==k?0:"left"==c?z:-z)))):(k="pin",f("pin"),m(c))}}}();if(k){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'),d=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(l.output({content:k,
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,m),c=CKEDITOR.tools.eventsBuffer(100,m);d.unselectable();d.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(b){m(b);a.on("change",f.input);g.on("scroll",c.input);g.on("resize",c.input)});a.on("blur",function(){d.hide();a.removeListener("change",
f.input);g.removeListener("scroll",c.input);g.removeListener("resize",c.input)});a.on("destroy",function(){g.removeListener("scroll",c.input);g.removeListener("resize",c.input);d.clearCustomData();d.remove()});a.focusManager.hasFocus&&d.show();a.focusManager.add(d,1)}}var g=CKEDITOR.document.getWindow(),e=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'),g=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'),
e=CKEDITOR.addTemplate("panel-list-group",'\x3ch1 id\x3d"{id}" draggable\x3d"false" ondragstart\x3d"return false;" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),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 e=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&&
(e["aria-multiselectable"]=!0);!e.role&&(e.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",e.role);e=this.keys;e[40]="next";e[9]="next";e[38]="prev";e[CKEDITOR.SHIFT+9]="prev";e[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(e[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,e,m){var l=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[b]=l;var d;d=CKEDITOR.tools.htmlEncodeAttr(b).replace(a,"\\'");b={id:l,val:d,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(m||b),text:e||b};this._.pendingList.push(g.output(b))},startGroup:function(a){this._.close();var b=CKEDITOR.tools.getNextId();this._.groups[a]=b;this._.pendingHtml.push(e.output({id:b,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var b=this.isMarked(a);b?this.unmark(a):this.mark(a);return!b},hideGroup:function(a){var b=(a=
this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display","none"),b&&"ul"==b.getName()&&b.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,b=this._.groups,e=this.element.getDocument(),g;for(g in a)e.getById(a[g]).setStyle("display","");for(var d in b)a=e.getById(b[d]),g=a.getNext(),a.setStyle("display",""),g&&"ul"==g.getName()&&g.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 e=b.getById(a);e.removeClass("cke_selected");b.getById(a+"_option").removeAttribute("aria-selected");
this.onUnmark&&this.onUnmark(e)},unmarkAll:function(){var a=this._.items,b=this.element.getDocument(),e;for(e in a){var g=a[e];b.getById(g).removeClass("cke_selected");b.getById(g+"_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"),e,g=-1;if(a)for(e=this.element.getDocument().getById(this._.items[a]).getFirst();a=
b.getItem(++g);){if(a.equals(e)){this._.focusIndex=g;break}}else this.element.focus();e&&setTimeout(function(){e.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"',g="";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&&(g='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"'+
g+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan id\x3d"{id}_text" class\x3d"cke_combo_text cke_combo_inlinelabel"\x3e{label}\x3c/span\x3e\x3cspan class\x3d"cke_combo_open"\x3e\x3cspan class\x3d"cke_combo_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":CKEDITOR.env.air?"\x26nbsp;":"")+"\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e"),e=CKEDITOR.addTemplate("combo",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 g(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var b=
this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(b=CKEDITOR.TRISTATE_DISABLED);this.setState(b);this.setValue("");b!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var m=CKEDITOR.env,l,d,f="cke_"+this.id,c=CKEDITOR.tools.addFunction(function(b){d&&(a.unlockSelection(1),d=0);l.execute(b)},this),n=this;l={id:f,combo:this,focus:function(){CKEDITOR.document.getById(f).getChild(1).focus()},execute:function(b){var d=n._;if(d.state!=CKEDITOR.TRISTATE_DISABLED)if(n.createPanel(a),
d.on)d.panel.hide();else{n.commit();var c=n.getValue();c?d.list.mark(c):d.list.unmarkAll();d.panel.showBlock(n.id,new CKEDITOR.dom.element(b),4)}},clickFn:c};this._.listeners.push(a.on("activeFilterChange",g,this));this._.listeners.push(a.on("mode",g,this));this._.listeners.push(a.on("selectionChange",g,this));!this.readOnly&&this._.listeners.push(a.on("readOnly",g,this));var x=CKEDITOR.tools.addFunction(function(a,b){a=new CKEDITOR.dom.event(a);var d=a.getKeystroke();switch(d){case 13:case 32:case 40:CKEDITOR.tools.callFunction(c,
b);break;default:l.onkey(l,d)}a.preventDefault()}),y=CKEDITOR.tools.addFunction(function(){l.onfocus&&l.onfocus()});d=0;l.keyDownFn=x;m={id:f,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:m.gecko&&!m.hc?"":(this.title||"").replace("'",""),keydownFn:x,focusFn:y,clickFn:c};e.output(m,b);if(this.onRender)this.onRender();return l},createPanel:function(a){if(!this._.panel){var b=this._.panelDefinition,e=this._.panelDefinition.block,g=b.parent||CKEDITOR.document.getBody(),
l="cke_combopanel__"+this.name,d=new CKEDITOR.ui.floatPanel(a,g,b),b=d.addListBlock(this.id,e),f=this;d.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()};d.onHide=function(b){this.element.removeClass(l);f.setState(f.modes&&f.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);f._.on=0;if(!b&&f.onClose)f.onClose()};d.onEscape=function(){d.hide(1)};b.onClick=function(a,b){f.onClick&&
f.onClick.call(f,a,b);d.hide()};this._.panel=d;this._.list=b;d.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 e=this.document.getById("cke_"+this.id+"_text");e&&(a||b?e.removeClass("cke_combo_inlinelabel"):(b=this.label,e.addClass("cke_combo_inlinelabel")),e.setText("undefined"!=typeof b?b:a));var e="undefined"!=typeof b?b:a,g=this.label,e=e===g?e:e+", "+g;(g=this.document.getById("cke_"+this.id+"_label"))&&
g.setText(e)},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(a,b,e){this._.items[a]=e||a;this._.list.add(a,b,e)},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),e=b.getElementsByTag("a").getItem(0);b.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?b.setAttribute("aria-disabled",!0):b.removeAttribute("aria-disabled");e&&e.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON);this._.state=a}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=
CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))},destroy:function(){CKEDITOR.tools.array.forEach(this._.listeners,function(a){a.removeListener()});this._.listeners=[]},select:function(a){if(!CKEDITOR.tools.isEmpty(this._.items))for(var 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,d=b.lang,f=new CKEDITOR.style(b.styleDefinition),c=new h({entries:b.entries,styleVariable:b.styleVariable,styleDefinition:b.styleDefinition}),n;a.addCommand(b.commandName,{exec:function(a,b){var d=b.newStyle,c=b.oldStyle,f=a.getSelection().getRanges()[0],h=void 0===d;if(c||d)c&&f.collapsed&&e({editor:a,range:f,style:c}),h?a.removeStyle(c):(c&&!g(c,d)&&a.removeStyle(c),a.applyStyle(d))},refresh:function(a,b){f.checkApplicable(b,
a,a.activeFilter)||this.setState(CKEDITOR.TRISTATE_DISABLED)}});n=a.getCommand(b.commandName);a.ui.addRichCombo(b.comboName,{label:d.label,title:d.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 b=" x-small small medium large x-large xx-large 48px".split(" ");
a.name="span";a.attributes.size&&(a.styles["font-size"]=b[a.attributes.size],delete a.attributes.size);a.attributes.align&&(a.styles["text-align"]=a.attributes.align,delete a.attributes.align);a.attributes.face&&(a.styles["font-family"]=a.attributes.face,delete a.attributes.face)}}]]:null,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(l.contentsCss),multiSelect:!1,attributes:{"aria-label":d.panelTitle}},init:function(){var b="("+a.lang.common.optionDefault+")";this.startGroup(d.panelTitle);this.add(this.defaultValue,
b,b);c.addToCombo(this)},onClick:function(d){var f=this.getValue();a.focus();a.fire("saveSnapshot");a.execCommand(b.commandName,{newStyle:c.getStyle(d),oldStyle:c.getStyle(f)});a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(d){var f=this.getValue();(d=c.getMatchingValue(a,d.data.path))?d!=f&&this.setValue(d):this.setValue("",b.defaultLabel)},this);n.on("state",function(){this.setState(n.state)},this)},refresh:function(){this.setState(n.state)}})}function g(a,b){if(!(a instanceof
CKEDITOR.style&&b instanceof CKEDITOR.style))return!1;var e=function(a,b){var d=a.getDefinition().attributes,e=b.getDefinition().attributes;return CKEDITOR.tools.objectCompare(d,e)}(a,b),d=function(a,b){return CKEDITOR.style.getStyleText(a.getDefinition())===CKEDITOR.style.getStyleText(b.getDefinition())}(a,b);return e&&d}function e(b){var e=b.editor,g=b.range,d=b.style,f,c,h;f=e.elementPath();if(b=f.contains(function(a){return d.checkElementRemovable(a)})){c=g.checkBoundaryOfElement(b,CKEDITOR.START);
h=g.checkBoundaryOfElement(b,CKEDITOR.END);if(c&&h){for(c=g.createBookmark();f=b.getFirst();)f.insertBefore(b);b.remove();g.moveToBookmark(c)}else c||h?g.moveToPosition(b,c?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 d=e.pop();if(d){if(g)return a(b,e,d.equals(g)?null:g);g=d.clone();b.insertNode(g);b.moveToPosition(g,CKEDITOR.POSITION_AFTER_START);
a(b,e)}}var h=CKEDITOR.tools.createClass({$:function(a){var b=a.entries.split(";");this._.data={};this._.names=[];for(var e=0;e<b.length;e++){var d=b[e],f,c;d?(d=d.split("/"),f=d[0],d=d[1],c={},c[a.styleVariable]=d||f,this._.data[f]=new CKEDITOR.style(a.styleDefinition,c),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,d=0,f;d<e.length;d++)if(f=e[d],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("htmlwriter",
{init:function(b){var g=new CKEDITOR.htmlWriter;g.forceSimpleAmpersand=b.config.forceSimpleAmpersand;g.indentationChars="string"===typeof b.config.dataIndentationChars?b.config.dataIndentationChars:"\t";b.dataProcessor.writer=g}}),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,g;for(g in CKEDITOR.tools.extend({},b.$nonBodyContent,b.$block,b.$listItem,b.$tableContent))this.setRules(g,{indent:!b[g]["#"],breakBeforeOpen:1,breakBeforeClose:!b[g]["#"],breakAfterClose:1,needsSpace:g in b.$block&&!(g 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 g=this._.rules[b];
this._.afterCloser&&g&&g.needsSpace&&this._.needsSpace&&this._.output.push("\n");this._.indent?this.indentation():g&&g.breakBeforeOpen&&(this.lineBreak(),this.indentation());this._.output.push("\x3c",b);this._.afterCloser=0},openTagClose:function(b,g){var e=this._.rules[b];g?(this._.output.push(this.selfClosingEnd),e&&e.breakAfterClose&&(this._.needsSpace=e.needsSpace)):(this._.output.push("\x3e"),e&&e.indent&&(this._.indentation+=this.indentationChars));e&&e.breakAfterOpen&&this.lineBreak();"pre"==
b&&(this._.inPre=1)},attribute:function(b,g){"string"==typeof g&&(g=CKEDITOR.tools.htmlEncodeAttr(g),this.forceSimpleAmpersand&&(g=g.replace(/&amp;/g,"\x26")));this._.output.push(" ",b,'\x3d"',g,'"')},closeTag:function(b){var g=this._.rules[b];g&&g.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length));this._.indent?this.indentation():g&&g.breakBeforeClose&&(this.lineBreak(),this.indentation());this._.output.push("\x3c/",b,"\x3e");"pre"==b&&(this._.inPre=0);g&&g.breakAfterClose&&
(this.lineBreak(),this._.needsSpace=g.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,g){var e=this._.rules[b];e?CKEDITOR.tools.extend(e,g,!0):this._.rules[b]=g}}}),function(){function b(a,b){var k,m;b.on("refresh",function(a){var b=[g],f;for(f in a.data.states)b.push(a.data.states[f]);this.setState(CKEDITOR.tools.search(b,e)?e:g)},b,null,100);b.on("exec",function(b){k=a.getSelection();m=k.createBookmarks(1);b.data||(b.data=
{});b.data.done=!1},b,null,0);b.on("exec",function(){a.forceNextSelectionCheck();k.selectBookmarks(m)},b,null,100)}var g=CKEDITOR.TRISTATE_DISABLED,e=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 d=new CKEDITOR.dom.walker(e),f;f=d.next();)if(f.type==CKEDITOR.NODE_ELEMENT)if(!f.equals(g)&&f.getDirection())e.setStartAfter(f),d=new CKEDITOR.dom.walker(e);else{var c=a.config.indentClasses;if(c)for(var h="ltr"==b.data.dir?["_rtl",""]:["","_rtl"],x=0;x<c.length;x++)f.hasClass(c[x]+h[0])&&(f.removeClass(c[x]+h[0]),f.addClass(c[x]+h[1]));
c=f.getStyle("margin-right");h=f.getStyle("margin-left");c?f.setStyle("margin-left",c):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,e){this.name=b;this.editor=a;this.jobs={};this.enterBr=a.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!e;this.relatedGlobal=e?"indent":"outdent";this.indentKey=e?9:CKEDITOR.SHIFT+
9;this.database={}},registerCommands:function(a,b){a.on("pluginsLoaded",function(){for(var a in b)(function(a,b){var d=a.getCommand(b.relatedGlobal),f;for(f in b.jobs)d.on("exec",function(d){d.data.done||(a.fire("lockSnapshot"),b.execJob(a,f)&&(d.data.done=!0),a.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(b.database))},this,null,f),d.on("refresh",function(d){d.data.states||(d.data.states={});d.data.states[b.name+"@"+f]=b.refreshJob(a,f,d.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 e=this.jobs[b];if(e.state!=g)return e.exec.call(this,a)},refreshJob:function(a,b,e){b=this.jobs[b];a.activeFilter.checkFeature(this)?b.state=b.refresh.call(this,a,e):b.state=g;return b.state},getContext:function(a){return a.contains(this.context)}}}(),function(){function b(a,b,d){if(!a.getCustomData("indent_processed")){var f=
this.editor,c=this.isIndent;if(b){f=a.$.className.match(this.classNameRegex);d=0;f&&(f=f[1],d=CKEDITOR.tools.indexOf(b,f)+1);if(0>(d+=c?1:-1))return;d=Math.min(d,b.length);d=Math.max(d,0);a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.classNameRegex,""));0<d&&a.addClass(b[d-1])}else{b=g(a,d);d=parseInt(a.getStyle(b),10);var e=f.config.indentOffset||40;isNaN(d)&&(d=0);d+=(c?1:-1)*e;if(0>d)return;d=Math.max(d,0);d=Math.ceil(d/e)*e;a.setStyle(b,d?d+(f.config.indentUnit||"px"):"");""===
a.getAttribute("style")&&a.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,a,"indent_processed",1)}}function g(a,b){return"ltr"==(b||a.getComputedStyle("direction"))?"margin-left":"margin-right"}var e=CKEDITOR.dtd.$listItem,a=CKEDITOR.dtd.$list,h=CKEDITOR.TRISTATE_DISABLED,k=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(m){function l(){d.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,b){var d=b.block||b.blockLimit;if(!d.is(e))var l=d.getAscendant(e),d=l&&b.contains(l)||d;d.is(e)&&(d=d.getParent());if(this.enterBr||this.getContext(b)){if(f){var l=f,d=d.$.className.match(this.classNameRegex),m=this.isIndent,l=d?m?d[1]!=l.slice(-1):!0:m;return l?k:h}return this.isIndent?k:d?CKEDITOR[0>=(parseInt(d.getStyle(g(d)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:h}return h},exec:function(d){var e=d.getSelection(),e=
e&&e.getRanges()[0],g;if(g=d.elementPath().contains(a))b.call(this,g,f);else for(e=e.createIterator(),d=d.config.enterMode,e.enforceRealBlocks=!0,e.enlargeBr=d!=CKEDITOR.ENTER_BR;g=e.getNextParagraph(d==CKEDITOR.ENTER_P?"p":"div");)g.isReadOnly()||b.call(this,g,f);return!0}}}}var d=CKEDITOR.plugins.indent,f=m.config.indentClasses;d.registerCommands(m,{indentblock:new l(m,"indentblock",!0),outdentblock:new l(m,"outdentblock")});CKEDITOR.tools.extend(l.prototype,d.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){function b(d){for(var g=k.startContainer,m=k.endContainer;g&&!g.getParent().equals(d);)g=g.getParent();for(;m&&!m.getParent().equals(d);)m=m.getParent();if(!g||!m)return!1;for(var t=[],u=!1;!u;)g.equals(m)&&(u=!0),t.push(g),g=g.getNext();if(1>t.length)return!1;g=d.getParents(!0);for(m=0;m<g.length;m++)if(g[m].getName&&h[g[m].getName()]){d=
g[m];break}for(var g=f.isIndent?1:-1,m=t[0],t=t[t.length-1],u=CKEDITOR.plugins.list.listToArray(d,c),p=u[t.getCustomData("listarray_index")].indent,m=m.getCustomData("listarray_index");m<=t.getCustomData("listarray_index");m++)if(u[m].indent+=g,0<g){for(var w=u[m].parent,q=m-1;0<=q;q--)if(u[q].indent===g){w=u[q].parent;break}u[m].parent=new CKEDITOR.dom.element(w.getName(),w.getDocument())}for(m=t.getCustomData("listarray_index")+1;m<u.length&&u[m].indent>p;m++)u[m].indent+=g;g=CKEDITOR.plugins.list.arrayToList(u,
c,null,a.config.enterMode,d.getDirection());if(!f.isIndent){var y;if((y=d.getParent())&&y.is("li"))for(var t=g.listNode.getChildren(),B=[],E,m=t.count()-1;0<=m;m--)(E=t.getItem(m))&&E.is&&E.is("li")&&B.push(E)}g&&g.listNode.replace(d);if(B&&B.length)for(m=0;m<B.length;m++){for(E=d=B[m];(E=E.getNext())&&E.is&&E.getName()in h;)CKEDITOR.env.needsNbspFiller&&!d.getFirst(e)&&d.append(k.document.createText(" ")),d.append(E);d.insertAfter(y)}g&&a.fire("contentDomInvalidated");return!0}for(var f=this,c=this.database,
h=this.context,k,m=a.getSelection(),m=(m&&m.getRanges()).createIterator();k=m.getNextRange();){for(var q=k.getCommonAncestor();q&&(q.type!=CKEDITOR.NODE_ELEMENT||!h[q.getName()]);){if(a.editable().equals(q)){q=!1;break}q=q.getParent()}q||(q=k.startPath().contains(h))&&k.setEndAt(q,CKEDITOR.POSITION_BEFORE_END);if(!q){var t=k.getEnclosedNode();t&&t.type==CKEDITOR.NODE_ELEMENT&&t.getName()in h&&(k.setStartAt(t,CKEDITOR.POSITION_AFTER_START),k.setEndAt(t,CKEDITOR.POSITION_BEFORE_END),q=t)}q&&k.startContainer.type==
CKEDITOR.NODE_ELEMENT&&k.startContainer.getName()in h&&(t=new CKEDITOR.dom.walker(k),t.evaluator=g,k.startContainer=t.next());q&&k.endContainer.type==CKEDITOR.NODE_ELEMENT&&k.endContainer.getName()in h&&(t=new CKEDITOR.dom.walker(k),t.evaluator=g,k.endContainer=t.previous());if(q)return b(q)}return 0}function g(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")}function e(b){return a(b)&&h(b)}var a=CKEDITOR.dom.walker.whitespaces(!0),h=CKEDITOR.dom.walker.bookmark(!1,!0),k=CKEDITOR.TRISTATE_DISABLED,
m=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(a){function d(a){f.specificDefinition.apply(this,arguments);this.requiredContent=["ul","ol"];a.on("key",function(b){var d=a.elementPath();if("wysiwyg"==a.mode&&b.data.keyCode==this.indentKey&&d){var f=this.getContext(d);!f||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,d,f)||(a.execCommand(this.relatedGlobal),b.cancel())}},this);this.jobs[this.isIndent?10:30]={refresh:this.isIndent?
function(a,b){var d=this.getContext(b),c=CKEDITOR.plugins.indentList.firstItemInPath(this.context,b,d);return d&&this.isIndent&&!c?m:k}:function(a,b){return!this.getContext(b)||this.isIndent?k:m},exec:CKEDITOR.tools.bind(b,this)}}var f=CKEDITOR.plugins.indent;f.registerCommands(a,{indentlist:new d(a,"indentlist",!0),outdentlist:new d(a,"outdentlist")});CKEDITOR.tools.extend(d.prototype,f.specificDefinition.prototype,{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=
function(a,b,f){var c=b.contains(g);f||(f=b.contains(a));return f&&c&&c.equals(f.getFirst(g))}}(),function(){function b(a,b){var e;if(b)e=a.getComputedStyle("text-align");else{for(;!a.hasAttribute||!a.hasAttribute("align")&&!a.getStyle("text-align");){e=a.getParent();if(!e)break;a=e}e=a.getStyle("text-align")||a.getAttribute("align")||""}e&&(e=e.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!e&&b&&(e="rtl"==a.getComputedStyle("direction")?"right":"left");return e}function g(a,b,e){this.editor=
a;this.name=b;this.value=e;this.context="p";b=a.config.justifyClasses;var g=a.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(b){switch(e){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=g+"("+this.cssClassName+")"}else this.requiredContent=g+"{text-align}";this.allowedContent={"caption div h1 h2 h3 h4 h5 h6 p pre td th li":{propertiesOnly:!0,
styles:this.cssClassName?null:"text-align",classes:this.cssClassName||null}};a.config.enterMode==CKEDITOR.ENTER_BR&&(this.allowedContent.div=!0)}function e(a){var b=a.editor,e=b.createRange();e.setStartBefore(a.data.node);e.setEndAfter(a.data.node);for(var g=new CKEDITOR.dom.walker(e),l;l=g.next();)if(l.type==CKEDITOR.NODE_ELEMENT)if(!l.equals(a.data.node)&&l.getDirection())e.setStartAfter(l),g=new CKEDITOR.dom.walker(e);else{var d=b.config.justifyClasses;d&&(l.hasClass(d[0])?(l.removeClass(d[0]),
l.addClass(d[2])):l.hasClass(d[2])&&(l.removeClass(d[2]),l.addClass(d[0])));d=l.getStyle("text-align");"left"==d?l.setStyle("text-align","right"):"right"==d&&l.setStyle("text-align","left")}}g.prototype={exec:function(a){var e=a.getSelection(),g=a.config.enterMode;if(e){for(var m=e.createBookmarks(),l=e.getRanges(),d=this.cssClassName,f,c,n=a.config.useComputedState,x=l.length-1;0<=x;x--)for(f=l[x].createIterator(),f.enlargeBr=g!=CKEDITOR.ENTER_BR;c=f.getNextParagraph(g==CKEDITOR.ENTER_P?"p":"div");)if(!c.isReadOnly()){var y=
c.getName(),q;q=a.activeFilter.check(y+"{text-align}");if((y=a.activeFilter.check(y+"("+d+")"))||q){c.removeAttribute("align");c.removeStyle("text-align");var t=d&&(c.$.className=CKEDITOR.tools.ltrim(c.$.className.replace(this.cssClassRegex,""))),r=this.state==CKEDITOR.TRISTATE_OFF&&(!n||b(c,!0)!=this.value);d&&y?r?c.addClass(d):t||c.removeAttribute("class"):r&&q&&c.setStyle("text-align",this.value)}}a.focus();a.forceNextSelectionCheck();e.selectBookmarks(m)}},refresh:function(a,e){var g=e.block||
e.blockLimit,m=g.getName(),l=g.equals(a.editable()),m=this.cssClassName?a.activeFilter.check(m+"("+this.cssClassName+")"):a.activeFilter.check(m+"{text-align}");l&&!CKEDITOR.dtd.$list[e.lastElement.getName()]?this.setState(CKEDITOR.TRISTATE_OFF):!l&&m?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 g(a,"justifyleft",
"left"),k=new g(a,"justifycenter","center"),m=new g(a,"justifyright","right"),l=new g(a,"justifyblock","justify");a.addCommand("justifyleft",b);a.addCommand("justifycenter",k);a.addCommand("justifyright",m);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",e)}}})}(),function(){function b(a,b,d,c){for(var f=CKEDITOR.plugins.list.listToArray(b.root,d),e=[],g=0;g<b.contents.length;g++){var h=b.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=b.root.getDocument(),k,l,g=0;g<e.length;g++){var m=e[g].getCustomData("listarray_index");k=f[m].parent;k.is(this.type)||(l=h.createElement(this.type),k.copyAttributes(l,{start:1,type:1}),l.removeStyle("list-style-type"),f[m].parent=l)}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&&c.push(n);d.listNode.replace(b.root);a.fire("contentDomInvalidated")}function g(a,b,
d){var c=b.contents,f=b.root.getDocument(),e=[];if(1==c.length&&c[0].equals(b.root)){var g=f.createElement("div");c[0].moveChildren&&c[0].moveChildren(g);c[0].append(g);c[0]=g}b=b.contents[0].getParent();for(g=0;g<c.length;g++)b=b.getCommonAncestor(c[g].getParent());a=a.config.useComputedState;for(var h,k,g=0;g<c.length;g++)for(var l=c[g],m;m=l.getParent();){if(m.equals(b)){e.push(l);!k&&l.getDirection()&&(k=1);l=l.getDirection(a);null!==h&&(h=h&&h!=l?null:l);break}l=m}if(!(1>e.length)){c=e[e.length-
1].getNext();g=f.createElement(this.type);for(d.push(g);e.length;)d=e.shift(),a=f.createElement("li"),l=d,l.is("pre")||q.test(l.getName())||"false"==l.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);c?g.insertBefore(c):g.appendTo(b)}}function e(a,b,d){function c(d){if(!(!(l=k[d?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(m=
b.root[d?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||m.is&&m.isBlockBoundary({br:1})))a.document.createElement("br")[d?"insertBefore":"insertAfter"](l)}for(var f=CKEDITOR.plugins.list.listToArray(b.root,d),e=[],g=0;g<b.contents.length;g++){var h=b.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,b.root.getAttribute("dir")).listNode,l,m;c(!0);c();k.replace(b.root);a.fire("contentDomInvalidated")}function a(a,b){this.name=a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function h(a,b,d,c){for(var f,e;f=a[c?"getLast":"getFirst"](t);)(e=f.getDirection(1))!==
b.getDirection(1)&&f.setAttribute("dir",e),f.remove(),d?f[c?"insertBefore":"insertAfter"](d):b.append(f,c),d=f}function k(a){function b(d){var c=a[d?"getPrevious":"getNext"](x);c&&c.type==CKEDITOR.NODE_ELEMENT&&c.is(a.getName())&&(h(a,c,null,!d),a.remove(),a=c)}b();b(1)}function m(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,b,c){a.fire("saveSnapshot");c.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);
var f=c.extractContents();b.trim(!1,!0);var e=b.createBookmark(),g=new CKEDITOR.dom.elementPath(b.startContainer),l=g.block,g=g.lastElement.getAscendant("li",1)||l,m=new CKEDITOR.dom.elementPath(c.startContainer),n=m.contains(CKEDITOR.dtd.$listItem),m=m.contains(CKEDITOR.dtd.$list);l?(l=l.getBogus())&&l.remove():m&&(l=m.getPrevious(x))&&y(l)&&l.remove();(l=f.getLast())&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("br")&&l.remove();(l=b.startContainer.getChild(b.startOffset))?f.insertBefore(l):b.startContainer.append(f);
n&&(f=d(n))&&(g.contains(n)?(h(f,n.getParent(),n),f.remove()):g.append(f));for(;c.checkStartOfBlock()&&c.checkEndOfBlock();){m=c.startPath();f=m.block;if(!f)break;f.is("li")&&(g=f.getParent(),f.equals(g.getLast(x))&&f.equals(g.getFirst(x))&&(f=g));c.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove()}c=c.clone();f=a.editable();c.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(c);c.evaluator=function(a){return x(a)&&!y(a)};(c=c.next())&&c.type==CKEDITOR.NODE_ELEMENT&&c.getName()in
CKEDITOR.dtd.$list&&k(c);b.moveToBookmark(e);b.select();a.fire("saveSnapshot")}function d(a){return(a=a.getLast(x))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in f?a:null}var f={ol:1,ul:1},c=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(),x=function(a){return!(c(a)||n(a))},y=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,d,c,e){if(!f[a.getName()])return[];c||(c=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,b,d,c+1);if("li"==k.$.nodeName.toLowerCase()){var l={parent:a,indent:c,element:k,contents:[]};e?l.grandparent=e:(l.grandparent=a.getParent(),l.grandparent&&"li"==l.grandparent.$.nodeName.toLowerCase()&&(l.grandparent=l.grandparent.getParent()));b&&CKEDITOR.dom.element.setMarker(b,k,"listarray_index",d.length);d.push(l);for(var m=0,n=k.getChildCount(),x;m<n;m++)x=k.getChild(m),x.type==CKEDITOR.NODE_ELEMENT&&f[x.getName()]?CKEDITOR.plugins.list.listToArray(x,
b,d,c+1,l.grandparent):l.contents.push(x)}}return d},arrayToList:function(a,b,d,c,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),l=null,m=d,t=Math.max(a[d].indent,0),q=null,y,I,P=c==CKEDITOR.ENTER_P?"p":"div";;){var M=a[m];g=M.grandparent;y=M.element.getDirection(1);if(M.indent==t){l&&a[m].parent.getName()==l.getName()||(l=a[m].parent.clone(!1,1),e&&l.setAttribute("dir",e),k.append(l));q=l.append(M.element.clone(0,1));y!=l.getDirection(1)&&
q.setAttribute("dir",y);for(g=0;g<M.contents.length;g++)q.append(M.contents[g].clone(1,1));m++}else if(M.indent==Math.max(t,0)+1)M=a[m-1].element.getDirection(1),m=CKEDITOR.plugins.list.arrayToList(a,null,m,c,M!=y?y:null),!q.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=h.$.documentMode&&q.append(h.createText(" ")),q.append(m.listNode),m=m.nextIndex;else if(-1==M.indent&&!d&&g){f[g.getName()]?(q=M.element.clone(!1,!0),y!=g.getDirection(1)&&q.setAttribute("dir",y)):q=new CKEDITOR.dom.documentFragment(h);
var l=g.getDirection(1)!=y,K=M.element,Q=K.getAttribute("class"),H=K.getAttribute("style"),F=q.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(c!=CKEDITOR.ENTER_BR||l||H||Q),N,aa=M.contents.length,S;for(g=0;g<aa;g++)if(N=M.contents[g],n(N)&&1<aa)F?S=N.clone(1,1):q.append(N.clone(1,1));else if(N.type==CKEDITOR.NODE_ELEMENT&&N.isBlockBoundary()){l&&!N.getDirection()&&N.setAttribute("dir",y);I=N;var X=K.getAttribute("style");X&&I.setAttribute("style",X.replace(/([^;])$/,"$1;")+(I.getAttribute("style")||""));
Q&&N.addClass(Q);I=null;S&&(q.append(S),S=null);q.append(N.clone(1,1))}else F?(I||(I=h.createElement(P),q.append(I),l&&I.setAttribute("dir",y)),H&&I.setAttribute("style",H),Q&&I.setAttribute("class",Q),S&&(I.append(S),S=null),I.append(N.clone(1,1))):q.append(N.clone(1,1));S&&((I||q).append(S),S=null);q.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&m!=a.length-1&&(CKEDITOR.env.needsBrFiller&&(y=q.getLast())&&y.type==CKEDITOR.NODE_ELEMENT&&y.is("br")&&y.remove(),(y=q.getLast(x))&&y.type==CKEDITOR.NODE_ELEMENT&&
y.is(CKEDITOR.dtd.$block)||q.append(h.createElement("br")));y=q.$.nodeName.toLowerCase();"div"!=y&&"p"!=y||q.appendBogus();k.append(q);l=null;m++}else return null;I=null;if(a.length<=m||Math.max(a[m].indent,0)<t)break}if(b)for(a=k.getFirst();a;){if(a.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(b,a),a.getName()in CKEDITOR.dtd.$listItem&&(d=a,h=e=c=void 0,c=d.getDirection()))){for(e=d.getParent();e&&!(h=e.getDirection());)e=e.getParent();c==h&&d.removeAttribute("dir")}a=a.getNextSourceNode()}return{listNode:k,
nextIndex:m}}};var q=/^h[1-6]$/,t=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);a.prototype={exec:function(a){function d(a){return f[a.root.getName()]&&!c(a.root,[CKEDITOR.NODE_COMMENT])}function c(a,b){return CKEDITOR.tools.array.filter(a.getChildren().toArray(),function(a){return-1===CKEDITOR.tools.array.indexOf(b,a.type)}).length}function h(a){var b=!0;if(0===a.getChildCount())return!1;a.forEach(function(a){if(a.type!==CKEDITOR.NODE_COMMENT)return b=!1},null,!0);return b}this.refresh(a,a.elementPath());
var l=a.config,m=a.getSelection(),n=m&&m.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var t=a.editable();if(t.getFirst(x)){var q=1==n.length&&n[0];(l=q&&q.getEnclosedNode())&&l.is&&this.type==l.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else l.enterMode==CKEDITOR.ENTER_BR?t.appendBogus():n[0].fixBlock(1,l.enterMode==CKEDITOR.ENTER_P?"p":"div"),m.selectRanges(n)}for(var l=m.createBookmarks(!0),t=[],y={},n=n.createIterator(),E=0;(q=n.getNextRange())&&++E;){var D=q.getBoundaryNodes(),G=D.startNode,
I=D.endNode;G.type==CKEDITOR.NODE_ELEMENT&&"td"==G.getName()&&q.setStartAt(D.startNode,CKEDITOR.POSITION_AFTER_START);I.type==CKEDITOR.NODE_ELEMENT&&"td"==I.getName()&&q.setEndAt(D.endNode,CKEDITOR.POSITION_BEFORE_END);q=q.createIterator();for(q.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;D=q.getNextParagraph();)if(!D.getCustomData("list_block")&&!h(D)){CKEDITOR.dom.element.setMarker(y,D,"list_block",1);for(var P=a.elementPath(D),G=P.elements,I=0,P=P.blockLimit,M,K=G.length-1;0<=K&&(M=G[K]);K--)if(f[M.getName()]&&
P.contains(M)){P.removeCustomData("list_group_object_"+E);(G=M.getCustomData("list_group_object"))?G.contents.push(D):(G={root:M,contents:[D]},t.push(G),CKEDITOR.dom.element.setMarker(y,M,"list_group_object",G));I=1;break}I||(I=P,I.getCustomData("list_group_object_"+E)?I.getCustomData("list_group_object_"+E).contents.push(D):(G={root:I,contents:[D]},CKEDITOR.dom.element.setMarker(y,I,"list_group_object_"+E,G),t.push(G)))}}for(M=[];0<t.length;)G=t.shift(),this.state==CKEDITOR.TRISTATE_OFF?d(G)||(f[G.root.getName()]?
b.call(this,a,G,y,M):g.call(this,a,G,M)):this.state==CKEDITOR.TRISTATE_ON&&f[G.root.getName()]&&!d(G)&&e.call(this,a,G,y);for(K=0;K<M.length;K++)k(M[K]);CKEDITOR.dom.element.clearAllMarkers(y);m.selectBookmarks(l);a.focus()},refresh:function(a,b){var d=b.contains(f,1),c=b.blockLimit||b.root;d&&c.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(b){b.blockless||
(b.addCommand("numberedlist",new a("numberedlist","ol")),b.addCommand("bulletedlist",new a("bulletedlist","ul")),b.ui.addButton&&(b.ui.addButton("NumberedList",{isToggle:!0,label:b.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),b.ui.addButton("BulletedList",{isToggle:!0,label:b.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),b.on("key",function(a){var c=a.data.domEvent.getKey(),e;if("wysiwyg"==b.mode&&c in{8:1,46:1}){var g=b.getSelection().getRanges()[0],
h=g&&g.startPath();if(g&&g.collapsed){var k=8==c,n=b.editable(),t=new CKEDITOR.dom.walker(g.clone());t.evaluator=function(a){return x(a)&&!y(a)};t.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};c=g.clone();if(k){var q;(q=h.contains(f))&&g.checkBoundaryOfElement(q,CKEDITOR.START)&&(q=q.getParent())&&q.is("li")&&(q=d(q))?(e=q,q=q.getPrevious(x),c.moveToPosition(q&&y(q)?q:e,CKEDITOR.POSITION_BEFORE_START)):(t.range.setStartAt(n,CKEDITOR.POSITION_AFTER_START),t.range.setEnd(g.startContainer,
g.startOffset),(q=t.previous())&&q.type==CKEDITOR.NODE_ELEMENT&&(q.getName()in f||q.is("li"))&&(q.is("li")||(t.range.selectNodeContents(q),t.reset(),t.evaluator=m,q=t.previous()),e=q,c.moveToElementEditEnd(e),c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END)));if(e)l(b,c,g),a.cancel();else{var E=h.contains(f);E&&g.checkBoundaryOfElement(E,CKEDITOR.START)&&(e=E.getFirst(x),g.checkBoundaryOfElement(e,CKEDITOR.START)&&(q=E.getPrevious(x),d(e)?q&&(g.moveToElementEditEnd(q),g.select()):
b.execCommand("outdent"),a.cancel()))}}else if(e=h.contains("li")){if(t.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),k=(n=e.getLast(x))&&m(n)?n:e,h=0,(q=t.next())&&q.type==CKEDITOR.NODE_ELEMENT&&q.getName()in f&&q.equals(n)?(h=1,q=t.next()):g.checkBoundaryOfElement(k,CKEDITOR.END)&&(h=2),h&&q){g=g.clone();g.moveToElementEditStart(q);if(1==h&&(c.optimize(),!c.startContainer.equals(e))){for(e=c.startContainer;e.is(CKEDITOR.dtd.$inline);)E=e,e=e.getParent();E&&c.moveToPosition(E,CKEDITOR.POSITION_AFTER_END)}2==
h&&(c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END),g.endPath().block&&g.moveToPosition(g.endPath().block,CKEDITOR.POSITION_AFTER_START));l(b,c,g);a.cancel()}}else t.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),(q=t.next())&&q.type==CKEDITOR.NODE_ELEMENT&&q.is(f)&&(q=q.getFirst(x),h.block&&g.checkStartOfBlock()&&g.checkEndOfBlock()?(h.block.remove(),g.moveToElementEditStart(q),g.select()):d(q)?(g.moveToElementEditStart(q),g.select()):(g=g.clone(),g.moveToElementEditStart(q),l(b,
c,g)),a.cancel());setTimeout(function(){b.selectionChange(1)})}}}))}})}(),function(){CKEDITOR.plugins.add("sourcearea",{init:function(g){function e(){var a=h&&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(g.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var a=CKEDITOR.plugins.sourcearea;g.addMode("source",function(a){var h=g.ui.space("contents").getDocument().createElement("textarea");
h.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",g.config.sourceAreaTabSize||4)));h.setAttribute("dir","ltr");h.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu");g.ui.space("contents").append(h);h=g.editable(new b(g,h));h.setData(g.getData(1));CKEDITOR.env.ie&&(h.attachListener(g,"resize",e,h),h.attachListener(CKEDITOR.document.getWindow(),
"resize",e,h),CKEDITOR.tools.setTimeout(e,0,h));g.fire("ariaWidget",this);a()});g.addCommand("source",a.commands.source);g.ui.addButton&&g.ui.addButton("Source",{isToggle:!0,label:g.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});g.on("mode",function(){g.getCommand("source").setState("source"==g.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var h=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}}},"use strict",function(){function b(a,b){return CKEDITOR.tools.array.reduce(b,function(a,b){return b(a)},a)}var g=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],e={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(b){function f(a){e.enabled&&!1!==a.data.command.canUndo&&e.save()}function c(){e.enabled=b.readOnly?!1:"wysiwyg"==b.mode;e.onChange()}var e=b.undoManager=
new a(b),h=e.editingHandler=new m(e),k=b.addCommand("undo",{exec:function(){e.undo()&&(b.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),l=b.addCommand("redo",{exec:function(){e.redo()&&(b.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});b.setKeystroke([[g[0],"undo"],[g[1],"redo"],[g[2],"redo"]]);e.onChange=function(){k.setState(e.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);l.setState(e.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};
b.on("beforeCommandExec",f);b.on("afterCommandExec",f);b.on("saveSnapshot",function(a){e.save(a.data&&a.data.contentOnly)});b.on("contentDom",h.attachListeners,h);b.on("instanceReady",function(){b.fire("saveSnapshot")});b.on("beforeModeUnload",function(){"wysiwyg"==b.mode&&e.save(!0)});b.on("mode",c);b.on("readOnly",c);b.ui.addButton&&(b.ui.addButton("Undo",{label:b.lang.undo.undo,command:"undo",toolbar:"undo,10"}),b.ui.addButton("Redo",{label:b.lang.undo.redo,command:"redo",toolbar:"undo,20"}));
b.resetUndo=function(){e.reset();b.fire("saveSnapshot")};b.on("updateSnapshot",function(){e.currentImage&&e.update()});b.on("lockSnapshot",function(a){a=a.data;e.lock(a&&a.dontUpdate,a&&a.forceUpdate)});b.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(b,f){var c=a.getKeyGroup(b),e=this.strokesRecorded[c]+1;f=f||e>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());f?(e=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[c]=e;this.previousKeyGroup=c},keyGroupChanged:function(b){return a.getKeyGroup(b)!=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,c){var e=this.editor;if(this.locked||"ready"!=e.status||"wysiwyg"!=e.mode)return!1;var g=e.editable();if(!g||"ready"!=g.status)return!1;g=this.snapshots;b||(b=new h(e));if(!1===
b.contents)return!1;if(this.currentImage)if(b.equalsContent(this.currentImage)){if(a||b.equalsSelection(this.currentImage))return!1}else!1!==c&&e.fire("change");g.splice(this.index+1,g.length-this.index-1);g.length==this.limit&&g.shift();this.index=g.push(b)-1;this.currentImage=b;!1!==c&&this.refreshState();return!0},restoreImage:function(a){var b=this.editor,c;a.bookmarks&&(b.focus(),c=b.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?c.selectBookmarks(a.bookmarks):
CKEDITOR.env.ie&&(c=this.editor.document.getBody().$.createTextRange(),c.collapse(!0),c.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,c=this.currentImage,e;if(c)if(a)for(e=this.index-1;0<=e;e--){if(a=b[e],!c.equalsContent(a))return a.index=e,a}else for(e=this.index+1;e<b.length;e++)if(a=b[e],!c.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 h(this.editor));for(var b=this.index,c=this.snapshots;0<b&&this.currentImage.equalsContent(c[b-1]);)--b;c.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,c=b[b.length-1];return c.equalsContent(a)&&!c.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 c=null;if(b)c=!0;else{var e=new h(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(e)&&(c=e)}this.locked={update:c,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 h(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(b){return!!a.navigationKeyCodes[b]};a.getKeyGroup=function(b){var f=a.keyGroups;return e[b]?f.FUNCTIONAL:f.PRINTABLE};a.getOppositeKeyGroup=function(b){var f=
a.keyGroups;return b==f.FUNCTIONAL?f.PRINTABLE:f.FUNCTIONAL};a.ieFunctionalKeysBug=function(b){return CKEDITOR.env.ie&&a.getKeyGroup(b)==a.keyGroups.FUNCTIONAL};var h=CKEDITOR.plugins.undo.Image=function(a,f){this.editor=a;a.fire("beforeUndoImage");var c=a.getSnapshot();c&&(this.contents=b(c,a.undoManager._filterRules));f||(this.bookmarks=(c=c&&a.getSelection())&&c.createBookmarks2(!0));a.fire("afterUndoImage")},k=/\b(?:href|src|name)="[^"]*?"/gi;h.prototype={equalsContent:function(a){var b=this.contents;
a=a.contents;CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(b=b.replace(k,""),a=a.replace(k,""));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 c=0;c<b.length;c++){var e=b[c],g=a[c];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 m=CKEDITOR.plugins.undo.NativeEditingHandler=
function(a){this.undoManager=a;this.ignoreInputEvent=!1;this.keyEventsStack=new l;this.lastKeydownImage=null};m.prototype={onKeydown:function(b){var f=b.data.getKey();if(229!==f)if(-1<CKEDITOR.tools.indexOf(g,b.data.getKeystroke()))b.data.preventDefault();else if(this.keyEventsStack.cleanUp(b),b=this.undoManager,this.keyEventsStack.getLast(f)||this.keyEventsStack.push(f),this.lastKeydownImage=new h(b.editor),a.isNavigationKey(f)||this.undoManager.keyGroupChanged(f))if(b.strokesRecorded[0]||b.strokesRecorded[1])b.save(!1,
this.lastKeydownImage,!1),b.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(b){var f=this.undoManager;b=b.data.getKey();var c=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(b);
if(!(a.ieFunctionalKeysBug(b)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new h(f.editor,!0))))if(0<c)f.type(b);else if(a.isNavigationKey(b))this.onNavigationKey(!0)},onNavigationKey:function(a){var b=this.undoManager;!a&&b.save(!0,null,!1)||b.updateSelection(new h(b.editor));b.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=!1},attachListeners:function(){var b=this.undoManager.editor,f=b.editable(),
c=this;f.attachListener(f,"keydown",function(b){c.onKeydown(b);if(a.ieFunctionalKeysBug(b.data.getKey()))c.onInput()},null,null,999);f.attachListener(f,CKEDITOR.env.ie?"keypress":"input",c.onInput,c,null,999);f.attachListener(f,"keyup",c.onKeyup,c,null,999);f.attachListener(f,"paste",c.ignoreInputEventListener,c,null,999);f.attachListener(f,"drop",c.ignoreInputEventListener,c,null,999);b.on("afterPaste",c.activateInputEventListener,c,null,999);f.attachListener(f.isInline()?f:b.document.getDocumentElement(),
"click",function(){c.onNavigationKey()},null,null,999);f.attachListener(this.undoManager.editor,"blur",function(){c.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 g(a,b){CKEDITOR.tools.extend(this,b,{editor:a},!0)}function e(a,b){var c=a.editable();CKEDITOR.tools.extend(this,{editor:a,editable:c,inline:c.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 e=CKEDITOR.tools.bind(this.queryViewport,this),g=CKEDITOR.tools.bind(this.hideVisible,this),l=CKEDITOR.tools.bind(this.removeAll,this);c.attachListener(this.winTop,"resize",e);c.attachListener(this.winTop,"scroll",e);c.attachListener(this.winTop,"resize",g);c.attachListener(this.win,"scroll",g);c.attachListener(this.inline?c:this.frame,"mouseout",function(a){var b=a.data.$.clientX;a=a.data.$.clientY;
this.queryViewport();(b<=this.rect.left||b>=this.rect.right||a<=this.rect.top||a>=this.rect.bottom)&&this.hideVisible();(0>=b||b>=this.winTopPane.width||0>=a||a>=this.winTopPane.height)&&this.hideVisible()},this);c.attachListener(a,"resize",e);c.attachListener(a,"mode",l);a.on("destroy",l);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({},
k,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},h,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},h,{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=!(m[a.getComputedStyle("float")]||m[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,c=this.editor,e=this.doc,g,h,k,l,m=CKEDITOR.tools.eventsBuffer(50,function(){c.readOnly||"wysiwyg"!=c.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 c=this.editor.createRange();c.moveToPosition(this.relations[b.uid].element,
a[b.type]);return c}}(),store:function(){function b(a,c,d){var e=a.getUniqueId();e in d?d[e].type|=c:d[e]={element:a,type:c}}return function(e,c){var g;c&CKEDITOR.LINEUTILS_AFTER&&a(g=e.getNext())&&g.isVisible()&&(b(g,CKEDITOR.LINEUTILS_BEFORE,this.relations),c^=CKEDITOR.LINEUTILS_AFTER);c&CKEDITOR.LINEUTILS_INSIDE&&a(g=e.getFirst())&&g.isVisible()&&(b(g,CKEDITOR.LINEUTILS_BEFORE,this.relations),c^=CKEDITOR.LINEUTILS_INSIDE);b(e,c,this.relations)}}(),traverseSearch:function(b){var e,c,g;do if(g=b.$["data-cke-expando"],
!(g&&g in this.relations)){if(b.equals(this.editable))break;if(a(b))for(e in this.lookups)(c=this.lookups[e](b))&&this.store(b,c)}while((!b||b.type!=CKEDITOR.NODE_ELEMENT||"true"!=b.getAttribute("contenteditable"))&&(b=b.getParent()))},pixelSearch:function(){function b(c,d,g,h,k){for(var l=0,m;k(g);){g+=h;if(25==++l)break;if(m=this.doc.$.elementFromPoint(d,g))if(m==c)l=0;else if(e(c,m)&&(l=0,a(m=new CKEDITOR.dom.element(m))))return m}}var e=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,b){return a.contains(b)}:
function(a,b){return!!(a.compareDocumentPosition(b)&16)};return function(c,e,f){var g=this.win.getViewPaneSize().height,h=b.call(this,c.$,e,f,-1,function(a){return 0<a});e=b.call(this,c.$,e,f,1,function(a){return a<g});if(h)for(this.traverseSearch(h);!h.getParent().equals(c);)h=h.getParent();if(e)for(this.traverseSearch(e);!e.getParent().equals(c);)e=e.getParent();for(;h||e;){h&&(h=h.getNext(a));if(!h||h.equals(e))break;this.traverseSearch(h);e&&(e=e.getPrevious(a));if(!e||e.equals(h))break;this.traverseSearch(e)}}}(),
greedySearch:function(){this.relations={};for(var b=this.editable.getElementsByTag("*"),e=0,c,g,h;c=b.getItem(e++);)if(!c.equals(this.editable)&&c.type==CKEDITOR.NODE_ELEMENT&&(c.hasAttribute("contenteditable")||!c.isReadOnly())&&a(c)&&c.isVisible())for(h in this.lookups)(g=this.lookups[h](c))&&this.store(c,g);return this.relations}};g.prototype={locate:function(){function b(d,c){var e=d.element[c===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();return e&&a(e)?(d.siblingRect=e.getClientRect(),
c==CKEDITOR.LINEUTILS_BEFORE?(d.siblingRect.bottom+d.elementRect.top)/2:(d.elementRect.bottom+d.siblingRect.top)/2):c==CKEDITOR.LINEUTILS_BEFORE?d.elementRect.top:d.elementRect.bottom}return function(a){var c;this.locations={};for(var e in a)c=a[e],c.elementRect=c.element.getClientRect(),c.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(e,CKEDITOR.LINEUTILS_BEFORE,b(c,CKEDITOR.LINEUTILS_BEFORE)),c.type&CKEDITOR.LINEUTILS_AFTER&&this.store(e,CKEDITOR.LINEUTILS_AFTER,b(c,CKEDITOR.LINEUTILS_AFTER)),c.type&
CKEDITOR.LINEUTILS_INSIDE&&this.store(e,CKEDITOR.LINEUTILS_INSIDE,(c.elementRect.top+c.elementRect.bottom)/2);return this.locations}}(),sort:function(){var a,b,c,e;return function(g,h){a=this.locations;b=[];for(var k in a)for(var l in a[k])if(c=Math.abs(g-a[k][l]),b.length){for(e=0;e<b.length;e++)if(c<b[e].dist){b.splice(e,0,{uid:+k,type:l,dist:c});break}e==b.length&&b.push({uid:+k,type:l,dist:c})}else b.push({uid:+k,type:l,dist:c});return"undefined"!=typeof h?b.slice(0,h):b}}(),store:function(a,
b,c){this.locations[a]||(this.locations[a]={});this.locations[a][b]=c}};var h={display:"block",width:"0px",height:"0px","border-color":"transparent","border-style":"solid",position:"absolute",top:"-6px"},k={height:"0px","border-top":"1px dashed red",position:"absolute","z-index":9999};e.prototype={removeAll:function(){for(var a in this.hidden)this.hidden[a].remove(),delete this.hidden[a];for(a in this.visible)this.visible[a].remove(),delete this.visible[a]},hideLine:function(a){var b=a.getUniqueId();
a.hide();this.hidden[b]=a;delete this.visible[b]},showLine:function(a){var b=a.getUniqueId();a.show();this.visible[b]=a;delete this.hidden[b]},hideVisible:function(){for(var a in this.visible)this.hideLine(this.visible[a])},placeLine:function(a,b){var c,e,g;if(c=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(c);b&&b(e)}},getStyle:function(a,b){var c=this.relations[a],e=this.locations[a][b],g={};g.width=c.siblingRect?Math.max(c.siblingRect.width,c.elementRect.width):c.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=c.elementRect.left-this.rect.relativeX:(0<c.elementRect.left?g.left=this.rect.left+c.elementRect.left:(g.width+=c.elementRect.left,g.left=this.rect.left),0<(c=g.left+g.width-(this.rect.left+this.winPane.width))&&(g.width-=c));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(),c=this.container.getComputedStyle("position");a.relativeX=a.relativeY=
0;"static"!=c&&(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 m={left:1,right:1,center:1},l={absolute:1,fixed:1};CKEDITOR.plugins.lineutils={finder:b,locator:g,liner:e}}(),function(){function b(b){return b.getName&&!b.hasAttribute("data-cke-temp")}CKEDITOR.plugins.add("widgetselection",{init:function(b){if(CKEDITOR.env.webkit){var e=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(){e.addFillers(b)||e.removeFillers(b)},0)},null,null,-1);a.on("selectionCheck",function(a){e.removeFillers(a.editor.editable())});a.on("paste",function(a){a.data.dataValue=e.cleanPasteData(a.data.dataValue)});"selectall"in a.plugins&&e.addSelectAllIntegration(a)})}}});CKEDITOR.plugins.widgetselection={startFiller:null,endFiller:null,fillerAttribute:"data-cke-filler-webkit",fillerContent:"\x26nbsp;",
fillerTagName:"div",addFillers:function(g){var e=g.editor;if(!this.isWholeContentSelected(g)&&0<g.getChildCount()){var a=g.getFirst(b),h=g.getLast(b);a&&a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable()&&(this.startFiller=this.createFiller(),g.append(this.startFiller,1));h&&h.type==CKEDITOR.NODE_ELEMENT&&!h.isEditable()&&(this.endFiller=this.createFiller(!0),g.append(this.endFiller,0));if(this.hasFiller(g))return e=e.createRange(),e.selectNodeContents(g),e.select(),!0}return!1},removeFillers:function(b){if(this.hasFiller(b)&&
!this.isWholeContentSelected(b)){var e=b.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dstart]"),a=b.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dend]");this.startFiller&&e&&this.startFiller.equals(e)?this.removeFiller(this.startFiller,b):this.startFiller=e;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 e=b.editor.getSelection().getRanges()[0];return!e||e&&e.collapsed?!1:(e=e.clone(),e.enlarge(CKEDITOR.ENLARGE_ELEMENT),!!(e&&b&&e.startContainer&&e.endContainer&&0===e.startOffset&&e.endOffset===b.getChildCount()&&e.startContainer.equals(b)&&e.endContainer.equals(b)))},hasFiller:function(b){return 0<b.find(this.fillerTagName+"["+this.fillerAttribute+"]").count()},createFiller:function(b){var e=new CKEDITOR.dom.element(this.fillerTagName);e.setHtml(this.fillerContent);
e.setAttribute(this.fillerAttribute,b?"end":"start");e.setAttribute("data-cke-temp",1);e.setStyles({display:"block",width:0,height:0,padding:0,border:0,margin:0,position:"absolute",top:0,left:"-9999px",opacity:0,overflow:"hidden"});return e},removeFiller:function(b,e){if(b){var a=e.editor,h=e.editor.getSelection().getRanges()[0].startPath(),k=a.createRange(),m,l;h.contains(b)&&(m=b.getHtml(),l=!0);h="start"==b.getAttribute(this.fillerAttribute);b.remove();m&&0<m.length&&m!=this.fillerContent?(e.insertHtmlIntoRange(m,
a.getSelection().getRanges()[0]),k.setStartAt(e.getChild(e.getChildCount()-1),CKEDITOR.POSITION_BEFORE_END),a.getSelection().selectRanges([k])):l&&(h?k.setStartAt(e.getFirst().getNext(),CKEDITOR.POSITION_AFTER_START):k.setEndAt(e.getLast().getPrevious(),CKEDITOR.POSITION_BEFORE_END),e.editor.getSelection().selectRanges([k]))}},createFillerRegex:function(b){var e=this.createFiller(b).getOuterHtml().replace(/style="[^"]*"/gi,'style\x3d"[^"]*"').replace(/>[^<]*</gi,"\x3e[^\x3c]*\x3c");return new RegExp((b?
"":"^")+e+(b?"$":""))},addSelectAllIntegration:function(b){var e=this;b.editable().attachListener(b,"beforeCommandExec",function(a){var h=b.editable();"selectAll"==a.data.name&&h&&e.addFillers(h)},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:{}};B(this);J(this);this.on("checkWidgets",m);this.editor.on("contentDomInvalidated",
this.checkWidgets,this);C(this);u(this);p(this);z(this);w(this)}function g(a,b,c,d,e){var f=a.editor;CKEDITOR.tools.extend(this,d,{editor:f,id:b,inline:"span"==c.getParent().getName(),element:c,data:CKEDITOR.tools.extend({},"function"==typeof d.defaults?d.defaults():d.defaults),dataReady:!1,inited:!1,ready:!1,edit:g.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;Y(this);this.fire("data",this.data);this.isInited()&&f.editable().contains(this.wrapper)&&(this.ready=!0,this.fire("ready"))}function e(a,b,c){CKEDITOR.dom.element.call(this,b.$);this.editor=a;this._={};b=this.filter=c.filter;CKEDITOR.dtd[this.getName()].p?
(this.enterMode=b?b.getAllowedEnterMode(a.enterMode):a.enterMode,this.shiftEnterMode=b?b.getAllowedEnterMode(a.shiftEnterMode,!0):a.shiftEnterMode):this.enterMode=this.shiftEnterMode=CKEDITOR.ENTER_BR}function a(a,b){a.addCommand(b.name,{exec:function(a,c){function d(){a.widgets.finalizeCreation(h)}var e=a.widgets.focused;if(e&&e.name==b.name)e.edit();else if(b.insert)b.insert({editor:a,commandData:c});else if(b.template){var e="function"==typeof b.defaults?b.defaults():b.defaults,e=CKEDITOR.tools.object.merge(e||
{},c&&c.startupData||{}),e=CKEDITOR.dom.element.createFromHtml(b.template.output(e),a.document),f,g=a.widgets.wrapElement(e,b.name),h=new CKEDITOR.dom.documentFragment(g.getDocument());h.append(g);(f=a.widgets.initOn(e,b,c&&c.startupData))?(e=f.once("edit",function(b){if(b.data.dialog)f.once("dialog",function(b){b=b.data;var c,e;c=b.once("ok",d,null,null,20);e=b.once("cancel",function(b){b.data&&!1===b.data.hide||a.widgets.destroy(f,!0)});b.once("hide",function(){c.removeListener();e.removeListener()})});
else d()},null,null,999),f.edit(),e.removeListener()):d()}},allowedContent:b.allowedContent,requiredContent:b.requiredContent,contentForms:b.contentForms,contentTransformations:b.contentTransformations})}function h(a,b){function c(a,d){var e=b.upcast.split(","),f,g;for(g=0;g<e.length;g++)if(f=e[g],f===a.name)return b.upcasts[f].call(this,a,d);return!1}function d(b,c,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(b,
c),c.name,e])}var e=b.upcast,f=b.upcastPriority||10;e&&("string"==typeof e?d(c,b,f):d(e,b,f))}function k(a,b){a.focused=null;if(b.isInited()){var c=b.editor.checkDirty();a.fire("widgetBlurred",{widget:b});b.setFocused(!1);!c&&b.editor.resetDirty()}}function m(a){a=a.data;if("wysiwyg"==this.editor.mode){var b=this.editor.editable(),c=this.instances,d,e,f,h;if(b){for(d in c)c[d].isReady()&&!b.contains(c[d].wrapper)&&this.destroy(c[d],!0);if(a&&a.initOnlyNew)c=this.initOnAll();else{var k=b.find(".cke_widget_wrapper"),
c=[];d=0;for(e=k.count();d<e;d++){f=k.getItem(d);if(h=!this.getByElement(f,!0)){a:{h=t;for(var l=f;l=l.getParent();)if(h(l)){h=!0;break a}h=!1}h=!h}h&&b.contains(f)&&(f.addClass("cke_widget_new"),c.push(this.initOn(f.getFirst(g.isDomWidgetElement))))}}a&&a.focusInited&&1==c.length&&c[0].focus()}}}function l(a){if("undefined"!=typeof a.attributes&&a.attributes["data-widget"]){var b=d(a),c=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);c&&c.value&&c.value.match(/\s$/g)&&(c.parent.attributes["data-cke-white-space-last"]=1,c.value=c.value.replace(/\s$/g,"\x26nbsp;"),e=!0);e&&(a.attributes["data-cke-widget-white-space"]=1)}}function d(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 c(a,b,c){if(!c.allowedContent&&!c.disallowedContent)return null;var d=this._.filters[a];d||(this._.filters[a]=d={});a=d[b];a||(a=c.allowedContent?
new CKEDITOR.filter(c.allowedContent):this.editor.filter.clone(),d[b]=a,c.disallowedContent&&a.disallow(c.disallowedContent));return a}function n(a){var b=[],c=a._.upcasts,d=a._.upcastCallbacks;return{toBeWrapped:b,iterator:function(a){var e,f,h,k,l;if("data-cke-widget-wrapper"in a.attributes)return(a=a.getFirst(g.isParserWidgetElement))&&b.push([a]),!1;if("data-widget"in a.attributes)return b.push([a]),!1;if(l=c.length){if(a.attributes["data-cke-widget-upcasted"])return!1;k=0;for(e=d.length;k<e;++k)if(!1===
d[k](a))return;for(k=0;k<l;++k)if(e=c[k],h={},f=e[0](a,h))return f instanceof CKEDITOR.htmlParser.element&&(a=f),a.attributes["data-cke-widget-data"]=encodeURIComponent(JSON.stringify(h)),a.attributes["data-cke-widget-upcasted"]=1,b.push([a,e[1]]),!1}}}}function x(a,b){return{tabindex:-1,contenteditable:"false","data-cke-widget-wrapper":1,"data-cke-filter":"off","class":"cke_widget_wrapper cke_widget_new cke_widget_"+(a?"inline":"block")+(b?" cke_widget_"+b:"")}}function y(a,b,c){if(a.type==CKEDITOR.NODE_ELEMENT){var d=
CKEDITOR.dtd[a.name];if(d&&!d[c.name]){var d=a.split(b),e=a.parent;b=d.getIndex();a.children.length||(--b,a.remove());d.children.length||d.remove();return y(e,b,c)}}a.add(c,b)}function q(a,b){return"boolean"==typeof a.inline?a.inline:!!CKEDITOR.dtd.$inline[b]}function t(a){return a.hasAttribute("data-cke-temp")}function r(a,b,c,d){var e=a.editor;e.fire("lockSnapshot");c?(d=c.data("cke-widget-editable"),d=b.editables[d],a.widgetHoldingFocusedEditable=b,b.focusedEditable=d,c.addClass("cke_widget_editable_focused"),
d.filter&&e.setActiveFilter(d.filter),e.setActiveEnterMode(d.enterMode,d.shiftEnterMode)):(d||b.focusedEditable.removeClass("cke_widget_editable_focused"),b.focusedEditable=null,a.widgetHoldingFocusedEditable=null,e.setActiveFilter(null),e.setActiveEnterMode(null,null));e.fire("unlockSnapshot")}function A(a){a.contextMenu&&a.contextMenu.addListener(function(b){if(b=a.widgets.getByElement(b,!0))return b.fire("contextMenu",{})})}function v(a,b){return CKEDITOR.tools.trim(b)}function z(a){var b=a.editor,
c=CKEDITOR.plugins.lineutils;b.on("dragstart",function(c){var d=c.data.target;g.isDomDragHandler(d)&&(d=a.getByElement(d),c.data.dataTransfer.setData("cke/widget-id",d.id),b.focus(),d.focus())});b.on("drop",function(c){function d(a,b){return a&&b?a.wrapper.equals(b.wrapper)||a.wrapper.contains(b.wrapper):!1}var e=c.data.dataTransfer,f=e.getData("cke/widget-id"),g=e.getTransferType(b),e=b.createRange(),h=function(a){a=a.getBoundaryNodes().startNode;a.type!==CKEDITOR.NODE_ELEMENT&&(a=a.getParent());
return b.widgets.getByElement(a)}(c.data.dropRange);if(""!==f&&g===CKEDITOR.DATA_TRANSFER_CROSS_EDITORS)c.cancel();else if(g==CKEDITOR.DATA_TRANSFER_INTERNAL)if(""===f&&0<b.widgets.selected.length)c.data.dataTransfer.setData("text/html",F(b));else if(f=a.instances[f])d(f,h)?c.cancel():(e.setStartBefore(f.wrapper),e.setEndAfter(f.wrapper),c.data.dragRange=e,delete CKEDITOR.plugins.clipboard.dragStartContainerChildCount,delete CKEDITOR.plugins.clipboard.dragEndContainerChildCount,c.data.dataTransfer.setData("text/html",
f.getClipboardHtml()),b.widgets.destroy(f,!0))});b.on("contentDom",function(){var d=b.editable();CKEDITOR.tools.extend(a,{finder:new c.finder(b,{lookups:{"default":function(b){if(!b.is(CKEDITOR.dtd.$listItem)&&b.is(CKEDITOR.dtd.$block)&&!g.isDomNestedEditable(b)&&!a._.draggedWidget.wrapper.contains(b)){var c=g.getNestedEditable(d,b);if(c){b=a._.draggedWidget;if(a.getByElement(c)==b)return;c=CKEDITOR.filter.instances[c.data("cke-filter")];b=b.requiredContent;if(c&&b&&!c.check(b))return}return CKEDITOR.LINEUTILS_BEFORE|
CKEDITOR.LINEUTILS_AFTER}}}}),locator:new c.locator(b),liner:new c.liner(b,{lineStyle:{cursor:"move !important","border-top-color":"#666"},tipLeftStyle:{"border-left-color":"#666"},tipRightStyle:{"border-right-color":"#666"}})},!0)})}function u(a){var b=a.editor;b.on("contentDom",function(){var c=b.editable(),d=c.isInline()?c:b.document,e,f;c.attachListener(d,"mousedown",function(c){var d=c.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&&b.getSelection().removeAllRanges()):g.getNestedEditable(e.wrapper,d)?e=null:(c.data.preventDefault(),CKEDITOR.env.ie||e.focus()))});c.attachListener(d,"mouseup",function(){f&&e&&e.wrapper&&(f=0,e.focus())});CKEDITOR.env.ie&&c.attachListener(d,"mouseup",function(){setTimeout(function(){e&&e.wrapper&&c.contains(e.wrapper)&&(e.focus(),e=null)})})});b.on("doubleclick",function(b){var c=a.getByElement(b.data.element);if(c&&!g.getNestedEditable(c.wrapper,
b.data.element))return c.fire("doubleclick",{element:b.data.element})},null,null,1)}function p(a){a.editor.on("key",function(b){var c=a.focused,d=a.widgetHoldingFocusedEditable,e;c?e=c.fire("key",{keyCode:b.data.keyCode}):d&&(c=b.data.keyCode,b=d.focusedEditable,c==CKEDITOR.CTRL+65?(c=b.getBogus(),d=d.editor.createRange(),d.selectNodeContents(b),c&&d.setEndAt(c,CKEDITOR.POSITION_BEFORE_START),d.select(),e=!1):8==c||46==c?(e=d.editor.getSelection().getRanges(),d=e[0],e=!(1==e.length&&d.collapsed&&
d.checkBoundaryOfElement(b,CKEDITOR[8==c?"START":"END"]))):e=void 0);return e},null,null,1)}function w(a){function b(d){1>a.selected.length||M(c,"cut"===d.name)}var c=a.editor;c.on("contentDom",function(){var a=c.editable();a.attachListener(a,"copy",b);a.attachListener(a,"cut",b)})}function C(a){function b(){var a=e.getSelection();if(a&&(a=a.getRanges()[0])&&!a.collapsed){var d=c(a.startContainer),f=c(a.endContainer);!d&&f?(a.setEndBefore(f.wrapper),a.select()):d&&!f&&(a.setStartAfter(d.wrapper),
a.select())}}function c(a){return a?a.type==CKEDITOR.NODE_TEXT?c(a.getParent()):e.widgets.getByElement(a):null}function d(){a.fire("checkSelection")}var e=a.editor;e.on("selectionCheck",d);e.on("contentDom",function(){e.editable().attachListener(e,"key",function(){setTimeout(d,10)})});if(!CKEDITOR.env.ie)a.on("checkSelection",b);a.on("checkSelection",a.checkSelection,a);e.on("selectionChange",function(b){var c=(b=g.getNestedEditable(e.editable(),b.data.selection.getStartElement()))&&a.getByElement(b),
d=a.widgetHoldingFocusedEditable;d?d===c&&d.focusedEditable.equals(b)||(r(a,d,null),c&&b&&r(a,c,b)):c&&b&&r(a,c,b)});e.on("dataReady",function(){E(a).commit()});e.on("blur",function(){var b;(b=a.focused)&&k(a,b);(b=a.widgetHoldingFocusedEditable)&&r(a,b,null)})}function J(a){var b=a.editor,c={};b.on("toDataFormat",function(b){var e=CKEDITOR.tools.getNextNumber(),h=[];b.data.downcastingSessionId=e;c[e]=h;b.data.dataValue.forEach(function(b){var c=b.attributes,e;if("data-cke-widget-white-space"in c){e=
d(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 c){if(c=a.instances[c["data-cke-widget-id"]])e=b.getFirst(g.isParserWidgetElement),h.push({wrapper:b,element:e,widget:c,editables:{}}),e&&"1"!=e.attributes["data-cke-widget-keep-attr"]&&delete e.attributes["data-widget"]}else if("data-cke-widget-editable"in c)return 0<h.length&&
(h[h.length-1].editables[c["data-cke-widget-editable"]]=b),!1},CKEDITOR.NODE_ELEMENT,!0)},null,null,8);b.on("toDataFormat",function(a){if(a.data.downcastingSessionId)for(var b=c[a.data.downcastingSessionId],d,e,f,g,h,k;d=b.shift();){e=d.widget;f=d.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 d.editables)h=d.editables[k],delete h.attributes.contenteditable,h.setHtml(e.editables[k].getData());
g||(g=f);g?d.wrapper.replaceWith(g):d.wrapper.remove()}},null,null,13);b.on("contentDomUnload",function(){a.destroyAll(!0)})}function B(a){var b=a.editor,c,d;b.on("toHtml",function(b){var d=n(a),e;for(b.data.dataValue.forEach(d.iterator,CKEDITOR.NODE_ELEMENT,!0);e=d.toBeWrapped.pop();){var f=e[0],h=f.parent;h.type==CKEDITOR.NODE_ELEMENT&&h.attributes["data-cke-widget-wrapper"]&&h.replaceWith(f);a.wrapElement(e[0],e[1])}c=b.data.protectedWhitespaces?3==b.data.dataValue.children.length&&g.isParserWidgetWrapper(b.data.dataValue.children[1]):
1==b.data.dataValue.children.length&&g.isParserWidgetWrapper(b.data.dataValue.children[0])},null,null,8);b.on("dataReady",function(){if(d)for(var c=b.editable().find(".cke_widget_wrapper"),e,f,h=0,k=c.count();h<k;++h)e=c.getItem(h),f=e.getFirst(g.isDomWidgetElement),f.type==CKEDITOR.NODE_ELEMENT&&f.data("widget")?(f.replace(e),a.wrapElement(f)):e.remove();d=0;a.destroyAll(!0);a.initOnAll()});b.on("loadSnapshot",function(b){/data-cke-widget/.test(b.data)&&(d=1);a.destroyAll(!0)},null,null,9);b.on("paste",
function(a){a=a.data;a.dataValue=a.dataValue.replace(ba,v);a.range&&(a=g.getNestedEditable(b.editable(),a.range.startContainer))&&(a=CKEDITOR.filter.instances[a.data("cke-filter")])&&b.setActiveFilter(a)});b.on("afterInsertHtml",function(d){d.data.intoRange?a.checkWidgets({initOnlyNew:!0}):(b.fire("lockSnapshot"),a.checkWidgets({initOnlyNew:!0,focusInited:c}),b.fire("unlockSnapshot"))})}function E(a){var b=a.selected,c=[],d=b.slice(0),e=null;return{select:function(a){0>CKEDITOR.tools.indexOf(b,a)&&
c.push(a);a=CKEDITOR.tools.indexOf(d,a);0<=a&&d.splice(a,1);return this},focus:function(a){e=a;return this},commit:function(){var f=a.focused!==e,g,h;a.editor.fire("lockSnapshot");for(f&&(g=a.focused)&&k(a,g);g=d.pop();)b.splice(CKEDITOR.tools.indexOf(b,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=c.pop();)b.push(g),g.setSelected(!0);
a.editor.fire("unlockSnapshot")}}}function D(a){a&&a.addFilterRule(function(a){return a.replace(/\s*cke_widget_selected/g,"").replace(/\s*cke_widget_focused/g,"")})}function G(a,b,c){var d=0;b=K(b);var e=a.data.classes||{},f;if(b){for(e=CKEDITOR.tools.clone(e);f=b.pop();)c?e[f]||(d=e[f]=1):e[f]&&(delete e[f],d=1);d&&a.setData("classes",e)}}function I(a){a.cancel()}function P(a,b){var c=function(a){return a==CKEDITOR.ENTER_BR?"br":a==CKEDITOR.ENTER_DIV?"div":"p"}(a.editor.config.enterMode),d=new CKEDITOR.dom.element(c);
"br"!==c&&d.appendBogus();"after"===b?d.insertAfter(a.wrapper):d.insertBefore(a.wrapper);(function(b){var c=a.editor.createRange();c.setStart(b,0);a.editor.getSelection().selectRanges([c])})(d)}function M(a,b){var c=a.widgets.focused,d,e,f;R.hasCopyBin(a)||(e=new R(a,{beforeDestroy:function(){!b&&c&&c.focus();f&&a.getSelection().selectBookmarks(f);d&&CKEDITOR.plugins.widgetselection.addFillers(a.editable())},afterDestroy:function(){b&&!a.readOnly&&(c?a.widgets.del(c):a.extractSelectedHtml(),a.fire("saveSnapshot"))}}),
c||(d=CKEDITOR.env.webkit&&CKEDITOR.plugins.widgetselection.isWholeContentSelected(a.editable()),f=a.getSelection().createBookmarks(!0)),e.handle(F(a)))}function K(a){return(a=(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function Q(){var a=CKEDITOR.document.getActive(),b=this.editor,c=b.editable();(c.isInline()?c:b.document.getWindow().getFrame()).equals(a)&&b.focusManager.focus(c)}function H(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),
this.editor.selectionChange(1))}function F(a){var b=a.getSelectedHtml(!0);if(a.widgets.focused)return a.widgets.focused.getClipboardHtml();a.once("toDataFormat",function(a){a.data.widgetsCopy=!0},null,null,-1);return a.dataProcessor.toDataFormat(b)}function N(a,b){var c=a.editor.config.widget_keystrokeInsertLineBefore,d=a.editor.config.widget_keystrokeInsertLineAfter;aa(a);S(a);X(a);ea(a);ja(a);la(a);ma(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart",function(b){var c=b.data.getTarget();
g.getNestedEditable(a,c)||a.inline&&g.isDomDragHandler(c)||b.data.preventDefault()});a.wrapper.removeClass("cke_widget_new");a.element.addClass("cke_widget_element");a.on("key",function(b){b=b.data.keyCode;if(b==c)P(a,"before"),a.editor.fire("saveSnapshot");else if(b==d)P(a,"after"),a.editor.fire("saveSnapshot");else if(13==b)a.edit();else{if(b==CKEDITOR.CTRL+67||b==CKEDITOR.CTRL+88){M(a.editor,b==CKEDITOR.CTRL+88);return}if(b in V||CKEDITOR.CTRL&b||CKEDITOR.ALT&b)return}return!1},null,null,999);
a.on("doubleclick",function(b){a.edit()&&b.cancel()});if(b.data)a.on("data",b.data);if(b.edit)a.on("edit",b.edit)}function aa(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id",a.id)}function S(a,b){a.partSelectors||(a.partSelectors=a.parts);if(a.parts){var c={},d,e;for(e in a.partSelectors)b||!a.parts[e]||"string"==typeof a.parts[e]?(d=a.wrapper.findOne(a.partSelectors[e]),c[e]=d):c[e]=a.parts[e];a.parts=c}}function X(a){var b=a.editables,c,d;a.editables={};if(a.editables)for(c in b)d=
b[c],a.initEditable(c,"string"==typeof d?{selector:d}:d)}function ea(a){if(!0===a.mask)U(a);else if(a.mask){var b=new CKEDITOR.tools.buffers.throttle(250,ia,a),c=CKEDITOR.env.gecko?300:0,d,e;a.on("focus",function(){b.input();d=a.editor.on("change",b.input);e=a.on("blur",function(){d.removeListener();e.removeListener()})});a.editor.on("instanceReady",function(){setTimeout(function(){b.input()},c)});a.editor.on("mode",function(){setTimeout(function(){b.input()},c)});if(CKEDITOR.env.gecko){var f=a.element.find("img");
CKEDITOR.tools.array.forEach(f.toArray(),function(a){a.on("load",function(){b.input()})})}for(var g in a.editables)a.editables[g].on("focus",function(){a.editor.on("change",b.input);e&&e.removeListener()}),a.editables[g].on("blur",function(){a.editor.removeListener("change",b.input)});b.input()}}function U(a){var b=a.wrapper.findOne(".cke_widget_mask");b||(b=new CKEDITOR.dom.element("img",a.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_mask"}),
a.wrapper.append(b));a.mask=b}function ia(){if(this.wrapper){this.maskPart=this.maskPart||this.mask;var a=this.parts[this.maskPart],b;if(a&&"string"!=typeof a){b=this.wrapper.findOne(".cke_widget_partial_mask");b||(b=new CKEDITOR.dom.element("img",this.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_partial_mask"}),this.wrapper.append(b));this.mask=b;var c=b.$,d=a.$,e=!(c.offsetTop==d.offsetTop&&c.offsetLeft==d.offsetLeft);if(c.offsetWidth!=
d.offsetWidth||c.offsetHeight!=d.offsetHeight||e)c=a.getParent(),d=CKEDITOR.plugins.widget.isDomWidget(c),b.setStyles({top:a.$.offsetTop+(d?0:c.$.offsetTop)+"px",left:a.$.offsetLeft+(d?0:c.$.offsetLeft)+"px",width:a.$.offsetWidth+"px",height:a.$.offsetHeight+"px"})}}}function ja(a){if(a.draggable){var b=a.editor,c=a.wrapper.getLast(g.isDomDragHandlerContainer),d;c?d=c.findOne("img"):(c=new CKEDITOR.dom.element("span",b.document),c.setAttributes({"class":"cke_reset cke_widget_drag_handler_container",
style:"background:rgba(220,220,220,0.5);background-image:url("+b.plugins.widget.path+"images/handle.png);display:none;"}),d=new CKEDITOR.dom.element("img",b.document),d.setAttributes({"class":"cke_reset cke_widget_drag_handler","data-cke-widget-drag-handler":"1",src:CKEDITOR.tools.transparentImageData,width:15,title:b.lang.widget.move,height:15,role:"presentation"}),a.inline&&d.setAttribute("draggable","true"),c.append(d),a.wrapper.append(c));a.wrapper.on("dragover",function(a){a.data.preventDefault()});
a.wrapper.on("mouseenter",a.updateDragHandlerPosition,a);setTimeout(function(){a.on("data",a.updateDragHandlerPosition,a)},50);if(!a.inline&&(d.on("mousedown",ka,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))d.on("dragstart",function(a){a.data.preventDefault(!0)});a.dragHandlerContainer=c}}function ka(a){function b(){var c;for(p.reset();c=h.pop();)c.removeListener();var d=k;c=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:c})}if(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT){var c=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=c.greedySearch(),p=CKEDITOR.tools.eventsBuffer(50,function(){l=d.locate(n);k=d.sort(m,1);k.length&&(e.prepare(n,
l),e.placeLine(k[0]),e.cleanup())});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",b,this));g.isInline()||h.push(CKEDITOR.document.once("mouseup",b,this))}}function la(a){var b=null;a.on("data",function(){var a=this.data.classes,c;if(b!=a){for(c in b)a&&a[c]||this.removeClass(c);for(c in a)this.addClass(c);b=a}})}function ma(a){a.on("data",function(){if(a.wrapper){var b=this.getLabel?
this.getLabel():this.editor.lang.widget.label.replace(/%1/,this.pathName||this.element.getName());a.wrapper.setAttribute("role","region");a.wrapper.setAttribute("aria-label",b)}},null,null,9999)}function Y(a){a.element.data("cke-widget-data",encodeURIComponent(JSON.stringify(a.data)))}function Z(){function a(){}function b(a,c,d){return d&&this.checkElement(a)?(a=d.widgets.getByElement(a,!0))&&a.checkStyleActive(this):!1}function c(a){function b(a,c,d){for(var e=a.length,f=0;f<e;){if(c.call(d,a[f],
f,a))return a[f];f++}}function e(a){function b(a,c){var d=CKEDITOR.tools.object.keys(a),e=CKEDITOR.tools.object.keys(c);if(d.length!==e.length)return!1;for(var f in a)if(("object"!==typeof a[f]||"object"!==typeof c[f]||!b(a[f],c[f]))&&a[f]!==c[f])return!1;return!0}return function(c){return b(a.getDefinition(),c.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],b(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)&&c(this)},apply:function(a){var b;a instanceof CKEDITOR.editor&&this.checkApplicable(a.elementPath(),a)&&(b=a.widgets.focused,this.group&&this.removeStylesFromSameGroup(a),b.applyStyle(this))},remove:function(a){a instanceof CKEDITOR.editor&&this.checkApplicable(a.elementPath(),a)&&a.widgets.focused.removeStyle(this)},removeStylesFromSameGroup:function(a){var b=!1,c,e;if(!(a instanceof CKEDITOR.editor))return!1;
e=a.elementPath();if(this.checkApplicable(e,a))for(var f=0,g=this.group.length;f<g;f++){c=d[this.widget][this.group[f]];for(var h=0;h<c.length;h++)c[h]!==this&&c[h].checkActive(e,a)&&(a.widgets.focused.removeStyle(c[h]),b=!0)}return b},checkActive:function(a,b){return this.checkElementMatch(a.lastElement,0,b)},checkApplicable:function(a,b){return b instanceof CKEDITOR.editor?this.checkElement(a.lastElement):!1},checkElementMatch:b,checkElementRemovable:b,checkElement:function(a){return g.isDomWidgetWrapper(a)?
(a=a.getFirst(g.isDomWidgetElement))&&a.data("widget")==this.widget:!1},buildPreview:function(a){return a||this._.definition.name},toAllowedContentRules:function(a){if(!a)return null;a=a.widgets.registered[this.widget];var b,c={};if(!a)return null;if(a.styleableElements){b=this.getClassesArray();if(!b)return null;c[a.styleableElements]={classes:b,propertiesOnly:!0};return c}return a.styleToAllowedContentRules?a.styleToAllowedContentRules(this):null},getClassesArray:function(){var a=this._.definition.attributes&&
this._.definition.attributes["class"];return a?CKEDITOR.tools.trim(a).split(/\s+/):null},applyToRange:a,removeFromRange:a,applyToObject:a})}CKEDITOR.plugins.add("widget",{requires:"lineutils,clipboard,widgetselection",onLoad:function(){void 0!==CKEDITOR.document.$.querySelectorAll&&(CKEDITOR.addCss('.cke_widget_wrapper{position:relative;outline:none}.cke_widget_inline{display:inline-block}.cke_widget_wrapper:hover\x3e.cke_widget_element{outline:2px solid #ffd25c;cursor:default}.cke_widget_wrapper:hover .cke_widget_editable{outline:2px solid #ffd25c}.cke_widget_wrapper.cke_widget_focused\x3e.cke_widget_element,.cke_widget_wrapper .cke_widget_editable.cke_widget_editable_focused{outline:2px solid #47a4f5}.cke_widget_editable{cursor:text}.cke_widget_drag_handler_container{position:absolute;width:15px;height:0;display:block;opacity:0.75;transition:height 0s 0.2s;line-height:0}.cke_widget_wrapper:hover\x3e.cke_widget_drag_handler_container{height:15px;transition:none}.cke_widget_drag_handler_container:hover{opacity:1}.cke_editable[contenteditable\x3d"false"] .cke_widget_drag_handler_container{display:none;}img.cke_widget_drag_handler{cursor:move;width:15px;height:15px;display:inline-block}.cke_widget_mask{position:absolute;top:0;left:0;width:100%;height:100%;display:block}.cke_widget_partial_mask{position:absolute;display:block}.cke_editable.cke_widget_dragging, .cke_editable.cke_widget_dragging *{cursor:move !important}'),
Z())},beforeInit:function(a){void 0!==CKEDITOR.document.$.querySelectorAll&&(a.widgets=new b(a))},afterInit:function(a){if(void 0!==CKEDITOR.document.$.querySelectorAll){var b=a.widgets.registered,c,d,e;for(d in b)c=b[d],(e=c.button)&&a.ui.addButton&&a.ui.addButton(CKEDITOR.tools.capitalize(c.name,!0),{label:e,command:c.name,toolbar:"insert,10"});A(a);D(a.undoManager)}}});b.prototype={MIN_SELECTION_CHECK_INTERVAL:500,add:function(b,c){var d=this.editor;c=CKEDITOR.tools.prototypedCopy(c);c.name=b;
c._=c._||{};d.fire("widgetDefinition",c);c.template&&(c.template=new CKEDITOR.template(c.template));a(d,c);h(this,c);this.registered[b]=c;if(c.dialog&&d.plugins.dialog)var e=CKEDITOR.on("dialogDefinition",function(a){a=a.data.definition;var b=a.dialog;a.getMode||b.getName()!==c.dialog||(a.getMode=function(){var a=b.getModel(d);return a&&a instanceof CKEDITOR.plugins.widget&&a.ready?CKEDITOR.dialog.EDITING_MODE:CKEDITOR.dialog.CREATION_MODE});e.removeListener()});return c},addUpcastCallback:function(a){this._.upcastCallbacks.push(a)},
checkSelection:function(){if(this.editor.getSelection()){var a=this.editor.getSelection(),b=a.getSelectedElement(),c=E(this),d;if(b&&(d=this.getByElement(b,!0)))return c.focus(d).select(d).commit();a=a.getRanges()[0];if(!a||a.collapsed)return c.commit();a=new CKEDITOR.dom.walker(a);for(a.evaluator=g.isDomWidgetWrapper;b=a.next();)c.select(this.getByElement(b));c.commit()}},checkWidgets:function(a){this.fire("checkWidgets",CKEDITOR.tools.copy(a||{}))},del:function(a){if(this.focused===a){var b=a.editor,
c=b.createRange(),d;(d=c.moveToClosestEditablePosition(a.wrapper,!0))||(d=c.moveToClosestEditablePosition(a.wrapper,!1));d&&b.getSelection().selectRanges([c])}a.wrapper.remove();this.destroy(a,!0)},destroy:function(a,b){this.widgetHoldingFocusedEditable===a&&r(this,a,null,b);a.destroy(b);delete this.instances[a.id];this.fire("instanceDestroyed",a)},destroyAll:function(a,b){var c,d,e=this.instances;if(b&&!a){d=b.find(".cke_widget_wrapper");for(var e=d.count(),f=0;f<e;++f)(c=this.getByElement(d.getItem(f),
!0))&&this.destroy(c)}else for(d in e)c=e[d],this.destroy(c,a)},finalizeCreation:function(a){(a=a.getFirst())&&g.isDomWidgetWrapper(a)&&(this.editor.insertElement(a),a=this.getByElement(a),a.ready=!0,a.fire("ready"),a.focus())},getByElement:function(){function a(c){return c.is(b)&&c.data("cke-widget-id")}var b={div:1,span:1};return function(b,c){if(!b)return null;var d=a(b);if(!c&&!d){var e=this.editor.editable();do b=b.getParent();while(b&&!b.equals(e)&&!(d=a(b)))}return this.instances[d]||null}}(),
initOn:function(a,b,c){b?"string"==typeof b&&(b=this.registered[b]):b=this.registered[a.data("widget")];if(!b)return null;var d=this.wrapElement(a,b.name);return d?d.hasClass("cke_widget_new")?(a=new g(this,this._.nextId++,a,b,c),a.isInited()?this.instances[a.id]=a:null):this.getByElement(a):null},initOnAll:function(a){a=(a||this.editor.editable()).find(".cke_widget_new");for(var b=[],c,d=a.count();d--;)(c=this.initOn(a.getItem(d).getFirst(g.isDomWidgetElement)))&&b.push(c);return b},onWidget:function(a){var b=
Array.prototype.slice.call(arguments);b.shift();for(var c in this.instances){var d=this.instances[c];d.name==a&&d.on.apply(d,b)}this.on("instanceCreated",function(c){c=c.data;c.name==a&&c.on.apply(c,b)})},parseElementClasses:function(a){if(!a)return null;a=CKEDITOR.tools.trim(a).split(/\s+/);for(var b,c={},d=0;b=a.pop();)-1==b.indexOf("cke_")&&(c[b]=d=1);return d?c:null},wrapElement:function(a,b){var c=null,d,e;if(a instanceof CKEDITOR.dom.element){b=b||a.data("widget");d=this.registered[b];if(!d)return null;
if((c=a.getParent())&&c.type==CKEDITOR.NODE_ELEMENT&&c.data("cke-widget-wrapper"))return c;a.hasAttribute("data-cke-widget-keep-attr")||a.data("cke-widget-keep-attr",a.data("widget")?1:0);a.data("widget",b);(e=q(d,a.getName()))&&l(a);c=new CKEDITOR.dom.element(e?"span":"div",a.getDocument());c.setAttributes(x(e,b));c.data("cke-display-name",d.pathName?d.pathName:a.getName());a.getParent(!0)&&c.replace(a);a.appendTo(c)}else if(a instanceof CKEDITOR.htmlParser.element){b=b||a.attributes["data-widget"];
d=this.registered[b];if(!d)return null;if((c=a.parent)&&c.type==CKEDITOR.NODE_ELEMENT&&c.attributes["data-cke-widget-wrapper"])return c;"data-cke-widget-keep-attr"in a.attributes||(a.attributes["data-cke-widget-keep-attr"]=a.attributes["data-widget"]?1:0);b&&(a.attributes["data-widget"]=b);(e=q(d,a.name))&&l(a);c=new CKEDITOR.htmlParser.element(e?"span":"div",x(e,b));c.attributes["data-cke-display-name"]=d.pathName?d.pathName:a.name;d=a.parent;var f;d&&(f=a.getIndex(),a.remove());c.add(a);d&&y(d,
f,c)}return c},_tests_createEditableFilter:c};CKEDITOR.event.implementOn(b.prototype);g.prototype={addClass:function(a){this.element.addClass(a);this.wrapper.addClass(g.WRAPPER_CLASS_PREFIX+a)},applyStyle:function(a){G(this,a,1)},checkStyleActive:function(a){a=K(a);var b;if(!a)return!1;for(;b=a.pop();)if(!this.hasClass(b))return!1;return!0},destroy:function(a){this.fire("destroy");if(this.editables)for(var b in this.editables)this.destroyEditable(b,a);a||("0"==this.element.data("cke-widget-keep-attr")&&
this.element.removeAttribute("data-widget"),this.element.removeAttributes(["data-cke-widget-data","data-cke-widget-keep-attr"]),this.element.removeClass("cke_widget_element"),this.element.replace(this.wrapper));this.wrapper=null},destroyEditable:function(a,b){var c=this.editables[a],d=!0;c.removeListener("focus",H);c.removeListener("blur",Q);this.editor.focusManager.remove(c);if(c.filter){for(var e in this.repository.instances){var f=this.repository.instances[e];f.editables&&(f=f.editables[a])&&f!==
c&&c.filter===f.filter&&(d=!1)}d&&(c.filter.destroy(),(d=this.repository._.filters[this.name])&&delete d[a])}b||(this.repository.destroyAll(!1,c),c.removeClass("cke_widget_editable"),c.removeClass("cke_widget_editable_focused"),c.removeAttributes(["contenteditable","data-cke-widget-editable","data-cke-enter-mode"]));delete this.editables[a]},edit:function(){var a={dialog:this.dialog},b=this;if(!1===this.fire("edit",a)||!a.dialog)return!1;this.editor.openDialog(a.dialog,function(a){var c,d;!1!==b.fire("dialog",
a)&&(c=a.on("show",function(){a.setupContent(b)}),d=a.on("ok",function(){var c,d=b.on("data",function(a){c=1;a.cancel()},null,null,0);b.editor.fire("saveSnapshot");a.commitContent(b);d.removeListener();c&&(b.fire("data",b.data),b.editor.fire("saveSnapshot"))}),a.once("hide",function(){c.removeListener();d.removeListener()}))},b);return!0},getClasses:function(){return this.repository.parseElementClasses(this.element.getAttribute("class"))},getClipboardHtml:function(){var a=this.editor.createRange();
a.setStartBefore(this.wrapper);a.setEndAfter(this.wrapper);return this.editor.editable().getHtmlFromRange(a).getHtml()},hasClass:function(a){return this.element.hasClass(a)},initEditable:function(a,b){var d=this._findOneNotNested(b.selector);return d&&d.is(CKEDITOR.dtd.$editable)?(d=new e(this.editor,d,{filter:c.call(this.repository,this.name,a,b)}),this.editables[a]=d,d.setAttributes({contenteditable:"true","data-cke-widget-editable":a,"data-cke-enter-mode":d.enterMode}),d.filter&&d.data("cke-filter",
d.filter.id),d.addClass("cke_widget_editable"),d.removeClass("cke_widget_editable_focused"),b.pathName&&d.data("cke-display-name",b.pathName),this.editor.focusManager.add(d),d.on("focus",H,this),CKEDITOR.env.ie&&d.on("blur",Q,this),d._.initialSetData=!0,d.setData(d.getHtml()),!0):!1},_findOneNotNested:function(a){a=this.wrapper.find(a);for(var b,c,d=0;d<a.count();d++)if(b=a.getItem(d),c=b.getAscendant(g.isDomWidgetWrapper),this.wrapper.equals(c))return b;return null},isInited:function(){return!(!this.wrapper||
!this.inited)},isReady:function(){return this.isInited()&&this.ready},focus:function(){var a=this.editor.getSelection();if(a){var b=this.editor.checkDirty();a.fake(this.wrapper);!b&&this.editor.resetDirty()}this.editor.focus()},refreshMask:function(){ea(this)},refreshParts:function(a){S(this,"undefined"!==typeof a?a:!0)},removeClass:function(a){this.element.removeClass(a);this.wrapper.removeClass(g.WRAPPER_CLASS_PREFIX+a)},removeStyle:function(a){G(this,a,0)},setData:function(a,b){var c=this.data,
d=0;if("string"==typeof a)c[a]!==b&&(c[a]=b,d=1);else{var e=a;for(a in e)c[a]!==e[a]&&(d=1,c[a]=e[a])}d&&this.dataReady&&(Y(this),this.fire("data",c));return this},setFocused:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_focused");this.fire(a?"focus":"blur");return this},setSelected:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_selected");this.fire(a?"select":"deselect");return this},updateDragHandlerPosition:function(){var a=this.editor,b=this.element.$,c=this._.dragHandlerOffset,
b={x:b.offsetLeft,y:b.offsetTop-15};c&&b.x==c.x&&b.y==c.y||(c=a.checkDirty(),a.fire("lockSnapshot"),this.dragHandlerContainer.setStyles({top:b.y+"px",left:b.x+"px"}),this.dragHandlerContainer.removeStyle("display"),a.fire("unlockSnapshot"),!c&&a.resetDirty(),this._.dragHandlerOffset=b)}};CKEDITOR.event.implementOn(g.prototype);g.getNestedEditable=function(a,b){return!b||b.equals(a)?null:g.isDomNestedEditable(b)?b:g.getNestedEditable(a,b.getParent())};g.isDomDragHandler=function(a){return a.type==
CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-drag-handler")};g.isDomDragHandlerContainer=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_widget_drag_handler_container")};g.isDomNestedEditable=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-editable")};g.isDomWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-widget")};g.isDomWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-wrapper")};
g.isDomWidget=function(a){return a?this.isDomWidgetWrapper(a)||this.isDomWidgetElement(a):!1};g.isParserWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-widget"]};g.isParserWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-cke-widget-wrapper"]};g.WRAPPER_CLASS_PREFIX="cke_widget_wrapper_";e.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.dom.element.prototype),{setData:function(a){this._.initialSetData||
this.editor.widgets.destroyAll(!1,this);this._.initialSetData=!1;a=this.editor.dataProcessor.unprotectRealComments(a);a=this.editor.dataProcessor.unprotectSource(a);a=this.editor.dataProcessor.toHtml(a,{context:this.getName(),filter:this.filter,enterMode:this.enterMode});this.setHtml(a);this.editor.widgets.initOnAll(this)},getData:function(){return this.editor.dataProcessor.toDataFormat(this.getHtml(),{context:this.getName(),filter:this.filter,enterMode:this.enterMode})}});var ba=/^(?:<(?: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 R=CKEDITOR.tools.createClass({$:function(a,b){this._.createCopyBin(a,b);this._.createListeners(b)},_:{createCopyBin:function(a){var b=a.document,c=CKEDITOR.env.edge&&16<=CKEDITOR.env.version,d=!a.blockless&&!CKEDITOR.env.ie||c?"div":"span",c=b.createElement(d),b=b.createElement(d);b.setAttributes({id:"cke_copybin","data-cke-temp":"1"});c.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"});c.setStyle("ltr"==a.config.contentsLangDirection?
"left":"right","-5000px");this.editor=a;this.copyBin=c;this.container=b},createListeners:function(a){a&&(a.beforeDestroy&&(this.beforeDestroy=a.beforeDestroy),a.afterDestroy&&(this.afterDestroy=a.afterDestroy))}},proto:{handle:function(a){var b=this.copyBin,c=this.editor,d=this.container,e=CKEDITOR.env.ie&&9>CKEDITOR.env.version,f=c.document.getDocumentElement().$,g=c.createRange(),h=this,k=CKEDITOR.env.mac&&CKEDITOR.env.webkit,l=k?100:0,m=window.requestAnimationFrame&&!k?requestAnimationFrame:setTimeout,
n,p,q;b.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3e​\x3c/span\x3e'+a+'\x3cspan data-cke-copybin-end\x3d"1"\x3e​\x3c/span\x3e');c.fire("lockSnapshot");d.append(b);c.editable().append(d);n=c.on("selectionChange",I,null,null,0);p=c.widgets.on("checkSelection",I,null,null,0);e&&(q=f.scrollTop);g.selectNodeContents(b);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();c.fire("unlockSnapshot");
h.afterDestroy&&h.afterDestroy();a()},l)})}},statics:{hasCopyBin:function(a){return!!R.getCopyBin(a)},getCopyBin:function(a){return a.document.getById("cke_copybin")}}});CKEDITOR.plugins.widget=g;g.repository=b;g.nestedEditable=e}(),CKEDITOR.config.widget_keystrokeInsertLineBefore=CKEDITOR.SHIFT+CKEDITOR.ALT+13,CKEDITOR.config.widget_keystrokeInsertLineAfter=CKEDITOR.SHIFT+13,CKEDITOR.config.plugins="basicstyles,dialogui,dialog,notification,button,toolbar,clipboard,panelbutton,panel,floatpanel,colorbutton,colordialog,divarea,elementspath,enterkey,entities,floatingspace,listblock,richcombo,font,htmlwriter,indent,indentblock,indentlist,justify,list,sourcearea,undo,lineutils,widgetselection,widget",
CKEDITOR.config.skin="moono",function(){var b=function(b,e){var a=CKEDITOR.getUrl("plugins/"+e);b=b.split(",");for(var h=0;h<b.length;h++)CKEDITOR.skin.icons[b[h]]={path:a,offset:-b[++h],bgsize:b[++h]}};CKEDITOR.env.hidpi?b("bold,0,,italic,24,,strike,48,,subscript,72,,superscript,96,,underline,120,,copy-rtl,144,,copy,168,,cut-rtl,192,,cut,216,,paste-rtl,240,,paste,264,,bgcolor,288,,textcolor,312,,indent-rtl,336,,indent,360,,outdent-rtl,384,,outdent,408,,ipscode,432,,ipsemoticon,456,,ipsgiphy,480,,ipsimage,504,,ipslink,528,,unlink,552,,ipspage,1152,auto,pastetext,600,,ipspreview-rtl,624,,ipspreview,648,,ipsquote,672,,ipsspoiler,696,,ipsstockreplies,720,,justifyblock,744,,justifycenter,768,,justifyleft,792,,justifyright,816,,bulletedlist-rtl,840,,bulletedlist,864,,numberedlist-rtl,888,,numberedlist,912,,removeformat,936,,source-rtl,960,,source,984,,redo-rtl,1008,,redo,1032,,undo-rtl,1056,,undo,1080,,simplebox,2208,auto",
"icons_hidpi.png"):b("bold,0,auto,italic,24,auto,strike,48,auto,subscript,72,auto,superscript,96,auto,underline,120,auto,copy-rtl,144,auto,copy,168,auto,cut-rtl,192,auto,cut,216,auto,paste-rtl,240,auto,paste,264,auto,bgcolor,288,auto,textcolor,312,auto,indent-rtl,336,auto,indent,360,auto,outdent-rtl,384,auto,outdent,408,auto,ipscode,432,auto,ipsemoticon,456,auto,ipsgiphy,480,auto,ipsimage,504,auto,ipslink,528,auto,unlink,552,auto,ipspage,576,auto,pastetext,600,auto,ipspreview-rtl,624,auto,ipspreview,648,auto,ipsquote,672,auto,ipsspoiler,696,auto,ipsstockreplies,720,auto,justifyblock,744,auto,justifycenter,768,auto,justifyleft,792,auto,justifyright,816,auto,bulletedlist-rtl,840,auto,bulletedlist,864,auto,numberedlist-rtl,888,auto,numberedlist,912,auto,removeformat,936,auto,source-rtl,960,auto,source,984,auto,redo-rtl,1008,auto,redo,1032,auto,undo-rtl,1056,auto,undo,1080,auto,simplebox,1104,auto",
"icons.png")}(),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: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,fo:1,fr:1,"fr-ca":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: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})})();