/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function(){if(!window.CKEDITOR||!window.CKEDITOR.dom)window.CKEDITOR||(window.CKEDITOR=function(){var a={timestamp:"E4KB",version:"4.4.1 (Standard)",revision:"568b5ed",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var d=document.getElementsByTagName("script"),c=0;c<d.length;c++){var b=d[c].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(b){a=b[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);this.timestamp&&("/"!=a.charAt(a.length-1)&&!/[&?]t=/.test(a))&&(a+=(0<=a.indexOf("?")?"&":"?")+"t="+this.timestamp);return a},domReady:function(){function a(){try{document.addEventListener?
(document.removeEventListener("DOMContentLoaded",a,!1),d()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),d())}catch(c){}}function d(){for(var a;a=c.shift();)a()}var c=[];return function(d){c.push(d);"complete"===document.readyState&&setTimeout(a,1);if(1==c.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);d=!1;try{d=!window.frameElement}catch(b){}if(document.documentElement.doScroll&&d){var g=function(){try{document.documentElement.doScroll("left")}catch(d){setTimeout(g,1);return}a()};g()}}}}()},f=window.CKEDITOR_GETURL;if(f){var b=a.getUrl;a.getUrl=function(e){return f.call(a,e)||b.call(a,e)}}return a}()),CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var f=CKEDITOR.event.prototype,b;for(b in f)a[b]==void 0&&(a[b]=f[b])},CKEDITOR.event.prototype=
function(){function a(a){var d=f(this);return d[a]||(d[a]=new b(a))}var f=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},b=function(a){this.name=a;this.listeners=[]};b.prototype={getListenerIndex:function(a){for(var d=0,c=this.listeners;d<c.length;d++)if(c[d].fn==a)return d;return-1}};return{define:function(e,d){var c=a.call(this,e);CKEDITOR.tools.extend(c,d,true)},on:function(e,d,c,b,i){function g(a,k,g,i){a={name:e,sender:this,editor:a,data:k,listenerData:b,
stop:g,cancel:i,removeListener:f};return d.call(c,a)===false?false:a.data}function f(){n.removeListener(e,d)}var k=a.call(this,e);if(k.getListenerIndex(d)<0){k=k.listeners;c||(c=this);isNaN(i)&&(i=10);var n=this;g.fn=d;g.priority=i;for(var o=k.length-1;o>=0;o--)if(k[o].priority<=i){k.splice(o+1,0,g);return{removeListener:f}}k.unshift(g)}return{removeListener:f}},once:function(){var a=arguments[1];arguments[1]=function(d){d.removeListener();return a.apply(this,arguments)};return this.on.apply(this,
arguments)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,d=function(){a=1},c=0,b=function(){c=1};return function(i,g,j){var k=f(this)[i],i=a,n=c;a=c=0;if(k){var o=k.listeners;if(o.length)for(var o=o.slice(0),q,l=0;l<o.length;l++){if(k.errorProof)try{q=o[l].call(this,j,g,d,b)}catch(m){}else q=o[l].call(this,j,g,d,b);q===false?c=1:typeof q!="undefined"&&(g=q);if(a||c)break}}g=c?false:typeof g=="undefined"?
true:g;a=i;c=n;return g}}(),fireOnce:function(a,d,c){d=this.fire(a,d,c);delete f(this)[a];return d},removeListener:function(a,d){var c=f(this)[a];if(c){var b=c.getListenerIndex(d);b>=0&&c.listeners.splice(b,1)}},removeAllListeners:function(){var a=f(this),d;for(d in a)delete a[d]},hasListeners:function(a){return(a=f(this)[a])&&a.listeners.length>0}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=
function(a,f){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,f,this)},CKEDITOR.editor.prototype.fireOnce=function(a,f){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,f,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),f={ie:a.indexOf("trident/")>-1,webkit:a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>
-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10),mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var a=document.domain,c=window.location.hostname;return a!=c&&a!="["+c+"]"},secure:location.protocol=="https:"};f.gecko=navigator.product=="Gecko"&&!f.webkit&&!f.ie;if(f.webkit)a.indexOf("chrome")>-1?f.chrome=true:f.safari=true;var b=0;if(f.ie){b=f.quirks||!document.documentMode?
parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;f.ie9Compat=b==9;f.ie8Compat=b==8;f.ie7Compat=b==7;f.ie6Compat=b<7||f.quirks}if(f.gecko){var e=a.match(/rv:([\d\.]+)/);if(e){e=e[1].split(".");b=e[0]*1E4+(e[1]||0)*100+(e[2]||0)*1}}f.air&&(b=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));f.webkit&&(b=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));f.version=b;f.isCompatible=f.iOS&&b>=534||!f.mobile&&(f.ie&&b>6||f.gecko&&b>=2E4||f.air&&b>=1||f.webkit&&b>=522||false);f.hidpi=window.devicePixelRatio>=
2;f.needsBrFiller=f.gecko||f.webkit||f.ie&&b>10;f.needsNbspFiller=f.ie&&b<11;f.cssClass="cke_browser_"+(f.ie?"ie":f.gecko?"gecko":f.webkit?"webkit":"unknown");if(f.quirks)f.cssClass=f.cssClass+" cke_browser_quirks";if(f.ie)f.cssClass=f.cssClass+(" cke_browser_ie"+(f.quirks?"6 cke_browser_iequirks":f.version));if(f.air)f.cssClass=f.cssClass+" cke_browser_air";if(f.iOS)f.cssClass=f.cssClass+" cke_browser_ios";if(f.hidpi)f.cssClass=f.cssClass+" cke_hidpi";return f}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);
CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a=CKEDITOR.loadFullCore,f=CKEDITOR.loadFullCoreTimeout;if(a){CKEDITOR.status=
"basic_ready";a&&a._load?a():f&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},f*1E3)}})})();CKEDITOR.status="basic_loaded"}(),CKEDITOR.dom={},function(){var a=[],f=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",b=/&/g,e=/>/g,d=/</g,c=/"/g,h=/&amp;/g,i=/&gt;/g,g=/&lt;/g,j=/&quot;/g;CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(a,d){if(!a&&!d)return true;if(!a||!d||a.length!=d.length)return false;for(var c=0;c<
a.length;c++)if(a[c]!=d[c])return false;return true},clone:function(a){var d;if(a&&a instanceof Array){d=[];for(var c=0;c<a.length;c++)d[c]=CKEDITOR.tools.clone(a[c]);return d}if(a===null||typeof a!="object"||a instanceof String||a instanceof Number||a instanceof Boolean||a instanceof Date||a instanceof RegExp)return a;d=new a.constructor;for(c in a)d[c]=CKEDITOR.tools.clone(a[c]);return d},capitalize:function(a,d){return a.charAt(0).toUpperCase()+(d?a.slice(1):a.slice(1).toLowerCase())},extend:function(a){var d=
arguments.length,c,b;if(typeof(c=arguments[d-1])=="boolean")d--;else if(typeof(c=arguments[d-2])=="boolean"){b=arguments[d-1];d=d-2}for(var l=1;l<d;l++){var e=arguments[l],h;for(h in e)if(c===true||a[h]==void 0)if(!b||h in b)a[h]=e[h]}return a},prototypedCopy:function(a){var d=function(){};d.prototype=a;return new d},copy:function(a){var d={},c;for(c in a)d[c]=a[c];return d},isArray:function(a){return Object.prototype.toString.call(a)=="[object Array]"},isEmpty:function(a){for(var d in a)if(a.hasOwnProperty(d))return false;
return true},cssVendorPrefix:function(a,d,c){if(c)return f+a+":"+d+";"+a+":"+d;c={};c[a]=d;c[f+a]=d;return c},cssStyleToDomStyle:function(){var a=document.createElement("div").style,d=typeof a.cssFloat!="undefined"?"cssFloat":typeof a.styleFloat!="undefined"?"styleFloat":"float";return function(a){return a=="float"?d:a.replace(/-./g,function(a){return a.substr(1).toUpperCase()})}}(),buildStyleHtml:function(a){for(var a=[].concat(a),d,c=[],b=0;b<a.length;b++)if(d=a[b])/@import|[{}]/.test(d)?c.push("<style>"+
d+"</style>"):c.push('<link type="text/css" rel=stylesheet href="'+d+'">');return c.join("")},htmlEncode:function(a){return(""+a).replace(b,"&amp;").replace(e,"&gt;").replace(d,"&lt;")},htmlDecode:function(a){return a.replace(h,"&").replace(i,">").replace(g,"<")},htmlEncodeAttr:function(a){return a.replace(c,"&quot;").replace(d,"&lt;").replace(e,"&gt;")},htmlDecodeAttr:function(a){return a.replace(j,'"').replace(g,"<").replace(i,">")},getNextNumber:function(){var a=0;return function(){return++a}}(),
getNextId:function(){return"cke_"+this.getNextNumber()},override:function(a,d){var c=d(a);c.prototype=a.prototype;return c},setTimeout:function(a,d,c,b,l){l||(l=window);c||(c=l);return l.setTimeout(function(){b?a.apply(c,[].concat(b)):a.apply(c)},d||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(d){return d.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(d){return d.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(d){return d.replace(a,
"")}}(),indexOf:function(a,d){if(typeof d=="function")for(var c=0,b=a.length;c<b;c++){if(d(a[c]))return c}else{if(a.indexOf)return a.indexOf(d);c=0;for(b=a.length;c<b;c++)if(a[c]===d)return c}return-1},search:function(a,d){var c=CKEDITOR.tools.indexOf(a,d);return c>=0?a[c]:null},bind:function(a,d){return function(){return a.apply(d,arguments)}},createClass:function(a){var d=a.$,c=a.base,b=a.privates||a._,l=a.proto,a=a.statics;!d&&(d=function(){c&&this.base.apply(this,arguments)});if(b)var e=d,d=function(){var a=
this._||(this._={}),d;for(d in b){var c=b[d];a[d]=typeof c=="function"?CKEDITOR.tools.bind(c,this):c}e.apply(this,arguments)};if(c){d.prototype=this.prototypedCopy(c.prototype);d.prototype.constructor=d;d.base=c;d.baseProto=c.prototype;d.prototype.base=function(){this.base=c.prototype.base;c.apply(this,arguments);this.base=arguments.callee}}l&&this.extend(d.prototype,l,true);a&&this.extend(d,a,true);return d},addFunction:function(d,c){return a.push(function(){return d.apply(c||this,arguments)})-1},
removeFunction:function(d){a[d]=null},callFunction:function(d){var c=a[d];return c&&c.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,d;return function(c){d=CKEDITOR.tools.trim(c+"")+"px";return a.test(d)?d:c||""}}(),convertToPx:function(){var a;return function(d){if(!a){a=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(d)){a.setStyle("width",
d);return a.$.clientWidth}return d}}(),repeat:function(a,d){return Array(d+1).join(a)},tryThese:function(){for(var a,d=0,c=arguments.length;d<c;d++){var b=arguments[d];try{a=b();break}catch(l){}}return a},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var d=arguments,c=this;window.setTimeout(function(){a.apply(c,d)},0)}},normalizeCssText:function(a,d){var c=[],b,l=CKEDITOR.tools.parseCssText(a,true,d);for(b in l)c.push(b+":"+l[b]);c.sort();
return c.length?c.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(a,d,c,b){a=[d,c,b];for(d=0;d<3;d++)a[d]=("0"+parseInt(a[d],10).toString(16)).slice(-2);return"#"+a.join("")})},parseCssText:function(a,d,c){var b={};if(c){c=new CKEDITOR.dom.element("span");c.setAttribute("style",a);a=CKEDITOR.tools.convertRgbToHex(c.getAttribute("style")||"")}if(!a||a==";")return b;a.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,
function(a,c,e){if(d){c=c.toLowerCase();c=="font-family"&&(e=e.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,","));e=CKEDITOR.tools.trim(e)}b[c]=e});return b},writeCssText:function(a,d){var c,b=[];for(c in a)b.push(c+":"+a[c]);d&&b.sort();return b.join("; ")},objectCompare:function(a,d,c){var b;if(!a&&!d)return true;if(!a||!d)return false;for(b in a)if(a[b]!=d[b])return false;if(!c)for(b in d)if(a[b]!=d[b])return false;return true},objectKeys:function(a){var d=[],c;for(c in a)d.push(c);return d},
convertArrayToObject:function(a,d){var c={};arguments.length==1&&(d=true);for(var b=0,l=a.length;b<l;++b)c[a[b]]=d;return c},fixDomain:function(){for(var a;;)try{a=window.parent.document.domain;break}catch(d){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a},eventsBuffer:function(a,d){function c(){l=(new Date).getTime();b=false;d()}var b,l=0;return{input:function(){if(!b){var d=(new Date).getTime()-l;d<a?b=setTimeout(c,a-d):c()}},reset:function(){b&&clearTimeout(b);
b=l=0}}},enableHtml5Elements:function(a,d){for(var c=["abbr","article","aside","audio","bdi","canvas","data","datalist","details","figcaption","figure","footer","header","hgroup","mark","meter","nav","output","progress","section","summary","time","video"],b=c.length,l;b--;){l=a.createElement(c[b]);d&&a.appendChild(l)}},checkIfAnyArrayItemMatches:function(a,d){for(var c=0,b=a.length;c<b;++c)if(a[c].match(d))return true;return false},checkIfAnyObjectPropertyMatches:function(a,d){for(var c in a)if(c.match(d))return true;
return false},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw=="}}(),CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,f=function(a,d){for(var c=CKEDITOR.tools.clone(a),b=1;b<arguments.length;b++){var d=arguments[b],e;for(e in d)delete c[e]}return c},b={},e={},d={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,
table:1,ul:1},c={command:1,link:1,meta:1,noscript:1,script:1,style:1},h={},i={"#":1},g={center:1,dir:1,noframes:1};a(b,{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},i,{acronym:1,applet:1,
basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(e,d,b,g);f={a:f(b,{a:1,button:1}),abbr:b,address:e,area:h,article:a({style:1},e),aside:a({style:1},e),audio:a({source:1,track:1},e),b:b,base:h,bdi:b,bdo:b,blockquote:e,body:e,br:h,button:f(b,{a:1,button:1}),canvas:b,caption:e,cite:b,code:b,col:h,colgroup:{col:1},command:h,datalist:a({option:1},b),dd:e,del:b,details:a({summary:1},e),dfn:b,div:a({style:1},e),dl:{dt:1,dd:1},dt:e,em:b,embed:h,fieldset:a({legend:1},e),figcaption:e,figure:a({figcaption:1},
e),footer:e,form:e,h1:b,h2:b,h3:b,h4:b,h5:b,h6:b,head:a({title:1,base:1},c),header:e,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:h,html:a({head:1,body:1},e,c),i:b,iframe:i,img:h,input:h,ins:b,kbd:b,keygen:h,label:b,legend:b,li:e,link:h,map:e,mark:b,menu:a({li:1},e),meta:h,meter:f(b,{meter:1}),nav:e,noscript:a({link:1,meta:1,style:1},b),object:a({param:1},b),ol:{li:1},optgroup:{option:1},option:i,output:b,p:b,param:h,pre:b,progress:f(b,{progress:1}),q:b,rp:b,rt:b,ruby:a({rp:1,rt:1},b),s:b,samp:b,script:i,
section:a({style:1},e),select:{optgroup:1,option:1},small:b,source:h,span:b,strong:b,style:i,sub:b,summary:b,sup:b,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:e,textarea:i,tfoot:{tr:1},th:e,thead:{tr:1},time:f(b,{time:1}),title:i,tr:{th:1,td:1},track:h,u:b,ul:{li:1},"var":b,video:a({source:1,track:1},e),wbr:h,acronym:b,applet:a({param:1},e),basefont:h,big:b,center:e,dialog:h,dir:{li:1},font:b,isindex:h,noframes:e,strike:b,tt:b};a(f,{$block:a({audio:1,dd:1,dt:1,figcaption:1,
li:1,video:1},d,g),$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,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,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:b,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},f.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 f}(),CKEDITOR.dom.event=function(a){this.$=a},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var a=this.getKey();if(this.$.ctrlKey||this.$.metaKey)a=a+CKEDITOR.CTRL;this.$.shiftKey&&(a=a+CKEDITOR.SHIFT);this.$.altKey&&(a=a+CKEDITOR.ALT);return a},preventDefault:function(a){var f=this.$;f.preventDefault?f.preventDefault():f.returnValue=false;a&&this.stopPropagation()},stopPropagation:function(){var a=
this.$;a.stopPropagation?a.stopPropagation():a.cancelBubble=true},getTarget:function(){var a=this.$.target||this.$.srcElement;return a?new CKEDITOR.dom.node(a):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var a=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(a.documentElement.scrollLeft||a.body.scrollLeft),y:this.$.pageY||this.$.clientY+(a.documentElement.scrollTop||a.body.scrollTop)}}},CKEDITOR.CTRL=1114112,CKEDITOR.SHIFT=2228224,CKEDITOR.ALT=
4456448,CKEDITOR.EVENT_PHASE_CAPTURING=1,CKEDITOR.EVENT_PHASE_AT_TARGET=2,CKEDITOR.EVENT_PHASE_BUBBLING=3,CKEDITOR.dom.domObject=function(a){if(a)this.$=a},CKEDITOR.dom.domObject.prototype=function(){var a=function(a,b){return function(e){typeof CKEDITOR!="undefined"&&a.fire(b,new CKEDITOR.dom.event(e))}};return{getPrivate:function(){var a;if(!(a=this.getCustomData("_")))this.setCustomData("_",a={});return a},on:function(f){var b=this.getCustomData("_cke_nativeListeners");if(!b){b={};this.setCustomData("_cke_nativeListeners",
b)}if(!b[f]){b=b[f]=a(this,f);this.$.addEventListener?this.$.addEventListener(f,b,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+f,b)}return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(a){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(a)){var b=this.getCustomData("_cke_nativeListeners"),e=b&&b[a];if(e){this.$.removeEventListener?this.$.removeEventListener(a,e,false):this.$.detachEvent&&this.$.detachEvent("on"+
a,e);delete b[a]}}},removeAllListeners:function(){var a=this.getCustomData("_cke_nativeListeners"),b;for(b in a){var e=a[b];this.$.detachEvent?this.$.detachEvent("on"+b,e):this.$.removeEventListener&&this.$.removeEventListener(b,e,false);delete a[b]}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),function(a){var f={};CKEDITOR.on("reset",function(){f={}});a.equals=function(a){try{return a&&a.$===this.$}catch(e){return false}};a.setCustomData=function(a,e){var d=this.getUniqueId();(f[d]||
(f[d]={}))[a]=e;return this};a.getCustomData=function(a){var e=this.$["data-cke-expando"];return(e=e&&f[e])&&a in e?e[a]:null};a.removeCustomData=function(a){var e=this.$["data-cke-expando"],e=e&&f[e],d,c;if(e){d=e[a];c=a in e;delete e[a]}return c?d:null};a.clearCustomData=function(){this.removeAllListeners();var a=this.$["data-cke-expando"];a&&delete f[a]};a.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(a)}(CKEDITOR.dom.domObject.prototype),
CKEDITOR.dom.node=function(a){return a?new CKEDITOR.dom[a.nodeType==CKEDITOR.NODE_DOCUMENT?"document":a.nodeType==CKEDITOR.NODE_ELEMENT?"element":a.nodeType==CKEDITOR.NODE_TEXT?"text":a.nodeType==CKEDITOR.NODE_COMMENT?"comment":a.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](a):this},CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject,CKEDITOR.NODE_ELEMENT=1,CKEDITOR.NODE_DOCUMENT=9,CKEDITOR.NODE_TEXT=3,CKEDITOR.NODE_COMMENT=8,CKEDITOR.NODE_DOCUMENT_FRAGMENT=11,CKEDITOR.POSITION_IDENTICAL=
0,CKEDITOR.POSITION_DISCONNECTED=1,CKEDITOR.POSITION_FOLLOWING=2,CKEDITOR.POSITION_PRECEDING=4,CKEDITOR.POSITION_IS_CONTAINED=8,CKEDITOR.POSITION_CONTAINS=16,CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(a,f){a.append(this,f);return a},clone:function(a,f){var b=this.$.cloneNode(a),e=function(d){d["data-cke-expando"]&&(d["data-cke-expando"]=false);if(d.nodeType==CKEDITOR.NODE_ELEMENT){f||d.removeAttribute("id",false);if(a)for(var d=d.childNodes,c=0;c<d.length;c++)e(d[c])}};e(b);
return new CKEDITOR.dom.node(b)},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var f=[],b=this.getDocument().$.documentElement,e=this.$;e&&e!=b;){var d=e.parentNode;d&&f.unshift(this.getIndex.call({$:e},
a));e=d}return f},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){var f=this.$,b=-1,e;if(!this.$.parentNode)return b;do if(!a||!(f!=this.$&&f.nodeType==CKEDITOR.NODE_TEXT&&(e||!f.nodeValue))){b++;e=f.nodeType==CKEDITOR.NODE_TEXT}while(f=f.previousSibling);return b},getNextSourceNode:function(a,f,b){if(b&&!b.call)var e=b,b=function(a){return!a.equals(e)};var a=!a&&this.getFirst&&this.getFirst(),d;if(!a){if(this.type==
CKEDITOR.NODE_ELEMENT&&b&&b(this,true)===false)return null;a=this.getNext()}for(;!a&&(d=(d||this).getParent());){if(b&&b(d,true)===false)return null;a=d.getNext()}return!a||b&&b(a)===false?null:f&&f!=a.type?a.getNextSourceNode(false,f,b):a},getPreviousSourceNode:function(a,f,b){if(b&&!b.call)var e=b,b=function(a){return!a.equals(e)};var a=!a&&this.getLast&&this.getLast(),d;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&b(this,true)===false)return null;a=this.getPrevious()}for(;!a&&(d=(d||this).getParent());){if(b&&
b(d,true)===false)return null;a=d.getPrevious()}return!a||b&&b(a)===false?null:f&&a.type!=f?a.getPreviousSourceNode(false,f,b):a},getPrevious:function(a){var f=this.$,b;do b=(f=f.previousSibling)&&f.nodeType!=10&&new CKEDITOR.dom.node(f);while(b&&a&&!a(b));return b},getNext:function(a){var f=this.$,b;do b=(f=f.nextSibling)&&new CKEDITOR.dom.node(f);while(b&&a&&!a(b));return b},getParent:function(a){var f=this.$.parentNode;return f&&(f.nodeType==CKEDITOR.NODE_ELEMENT||a&&f.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?
new CKEDITOR.dom.node(f):null},getParents:function(a){var f=this,b=[];do b[a?"push":"unshift"](f);while(f=f.getParent());return b},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;var f=this.contains?this:this.getParent();do if(f.contains(a))return f;while(f=f.getParent());return null},getPosition:function(a){var f=this.$,b=a.$;if(f.compareDocumentPosition)return f.compareDocumentPosition(b);if(f==b)return CKEDITOR.POSITION_IDENTICAL;if(this.type==
CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(f.contains){if(f.contains(b))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(b.contains(f))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in f)return f.sourceIndex<0||b.sourceIndex<0?CKEDITOR.POSITION_DISCONNECTED:f.sourceIndex<b.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}for(var f=this.getAddress(),a=a.getAddress(),b=Math.min(f.length,a.length),e=0;e<=b-1;e++)if(f[e]!=
a[e]){if(e<b)return f[e]<a[e]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;break}return f.length<a.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(a,f){var b=this.$,e;if(!f)b=b.parentNode;for(;b;){if(b.nodeName&&(e=b.nodeName.toLowerCase(),typeof a=="string"?e==a:e in a))return new CKEDITOR.dom.node(b);try{b=b.parentNode}catch(d){b=null}}return null},hasAscendant:function(a,f){var b=this.$;if(!f)b=
b.parentNode;for(;b;){if(b.nodeName&&b.nodeName.toLowerCase()==a)return true;b=b.parentNode}return false},move:function(a,f){a.append(this.remove(),f)},remove:function(a){var f=this.$,b=f.parentNode;if(b){if(a)for(;a=f.firstChild;)b.insertBefore(f.removeChild(a),f);b.removeChild(f)}return this},replace:function(a){this.insertBefore(a);a.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var a;this.getFirst&&(a=this.getFirst());){if(a.type==CKEDITOR.NODE_TEXT){var f=CKEDITOR.tools.ltrim(a.getText()),
b=a.getLength();if(f){if(f.length<b){a.split(b-f.length);this.$.removeChild(this.$.firstChild)}}else{a.remove();continue}}break}},rtrim:function(){for(var a;this.getLast&&(a=this.getLast());){if(a.type==CKEDITOR.NODE_TEXT){var f=CKEDITOR.tools.rtrim(a.getText()),b=a.getLength();if(f){if(f.length<b){a.split(f.length);this.$.lastChild.parentNode.removeChild(this.$.lastChild)}}else{a.remove();continue}}break}if(CKEDITOR.env.needsBrFiller)(a=this.$.lastChild)&&(a.type==1&&a.nodeName.toLowerCase()=="br")&&
a.parentNode.removeChild(a)},isReadOnly:function(){var a=this;this.type!=CKEDITOR.NODE_ELEMENT&&(a=this.getParent());if(a&&typeof a.$.isContentEditable!="undefined")return!(a.$.isContentEditable||a.data("cke-editable"));for(;a;){if(a.data("cke-editable"))break;if(a.getAttribute("contentEditable")=="false")return true;if(a.getAttribute("contentEditable")=="true")break;a=a.getParent()}return!a}}),CKEDITOR.dom.window=function(a){CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,
CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var a=this.$.document,f=a.compatMode=="CSS1Compat";return{width:(f?a.documentElement.clientWidth:a.body.clientWidth)||0,height:(f?a.documentElement.clientHeight:a.body.clientHeight)||0}},getScrollPosition:function(){var a=this.$;if("pageXOffset"in a)return{x:a.pageXOffset||0,y:a.pageYOffset||0};a=a.document;return{x:a.documentElement.scrollLeft||a.body.scrollLeft||0,y:a.documentElement.scrollTop||
a.body.scrollTop||0}},getFrame:function(){var a=this.$.frameElement;return a?new CKEDITOR.dom.element.get(a):null}}),CKEDITOR.dom.document=function(a){CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(a){if(this.$.createStyleSheet)this.$.createStyleSheet(a);else{var f=new CKEDITOR.dom.element("link");f.setAttributes({rel:"stylesheet",type:"text/css",
href:a});this.getHead().append(f)}},appendStyleText:function(a){if(this.$.createStyleSheet){var f=this.$.createStyleSheet("");f.cssText=a}else{var b=new CKEDITOR.dom.element("style",this);b.append(new CKEDITOR.dom.text(a,this));this.getHead().append(b)}return f||b.$.sheet},createElement:function(a,f){var b=new CKEDITOR.dom.element(a,this);if(f){f.attributes&&b.setAttributes(f.attributes);f.styles&&b.setStyles(f.styles)}return b},createText:function(a){return new CKEDITOR.dom.text(a,this)},focus:function(){this.getWindow().focus()},
getActive:function(){return new CKEDITOR.dom.element(this.$.activeElement)},getById:function(a){return(a=this.$.getElementById(a))?new CKEDITOR.dom.element(a):null},getByAddress:function(a,f){for(var b=this.$.documentElement,e=0;b&&e<a.length;e++){var d=a[e];if(f)for(var c=-1,h=0;h<b.childNodes.length;h++){var i=b.childNodes[h];if(!(f===true&&i.nodeType==3&&i.previousSibling&&i.previousSibling.nodeType==3)){c++;if(c==d){b=i;break}}}else b=b.childNodes[d]}return b?new CKEDITOR.dom.node(b):null},getElementsByTag:function(a,
f){if((!CKEDITOR.env.ie||document.documentMode>8)&&f)a=f+":"+a;return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a=a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),true)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||
this.$.defaultView)},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$&\n<script data-cke-temp="1">('+CKEDITOR.tools.fixDomain+")();<\/script>"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");if(!a){a=this.$.createDocumentFragment();
CKEDITOR.tools.enableHtml5Elements(a,true);this.setCustomData("html5ShivFrag",a)}return a}}),CKEDITOR.dom.nodeList=function(a){this.$=a},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){if(a<0||a>=this.$.length)return null;return(a=this.$[a])?new CKEDITOR.dom.node(a):null}},CKEDITOR.dom.element=function(a,f){typeof a=="string"&&(a=(f?f.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.element.get=function(a){return(a=typeof a==
"string"?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(a,f){var b=new CKEDITOR.dom.element("div",f);b.setHtml(a);return b.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(a,f,b,e){var d=f.getCustomData("list_marker_id")||f.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),c=f.getCustomData("list_marker_names")||
f.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[d]=f;c[b]=1;return f.setCustomData(b,e)},CKEDITOR.dom.element.clearAllMarkers=function(a){for(var f in a)CKEDITOR.dom.element.clearMarkers(a,a[f],1)},CKEDITOR.dom.element.clearMarkers=function(a,f,b){var e=f.getCustomData("list_marker_names"),d=f.getCustomData("list_marker_id"),c;for(c in e)f.removeCustomData(c);f.removeCustomData("list_marker_names");if(b){f.removeCustomData("list_marker_id");delete a[d]}},function(){function a(a){var c=
true;if(!a.$.id){a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber();c=false}return function(){c||a.removeAttribute("id")}}function f(a,c){return"#"+a.$.id+" "+c.split(/,\s*/).join(", #"+a.$.id+" ")}function b(a){for(var c=0,b=0,i=e[a].length;b<i;b++)c=c+(parseInt(this.getComputedStyle(e[a][b])||0,10)||0);return c}CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:function(a){var c=this.$.className;c&&(RegExp("(?:^|\\s)"+a+"(?:\\s|$)","").test(c)||(c=c+(" "+a)));
this.$.className=c||a;return this},removeClass:function(a){var c=this.getAttribute("class");if(c){a=RegExp("(?:^|\\s+)"+a+"(?=\\s|$)","i");if(a.test(c))(c=c.replace(a,"").replace(/^\s+/,""))?this.setAttribute("class",c):this.removeAttribute("class")}return this},hasClass:function(a){return RegExp("(?:^|\\s+)"+a+"(?=\\s|$)","").test(this.getAttribute("class"))},append:function(a,c){typeof a=="string"&&(a=this.getDocument().createElement(a));c?this.$.insertBefore(a.$,this.$.firstChild):this.$.appendChild(a.$);
return a},appendHtml:function(a){if(this.$.childNodes.length){var c=new CKEDITOR.dom.element("div",this.getDocument());c.setHtml(a);c.moveChildren(this)}else this.setHtml(a)},appendText:function(a){this.$.text!=void 0?this.$.text=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();if(!a||!a.is||!a.is("br")){a=this.getDocument().createElement("br");
CKEDITOR.env.gecko&&a.setAttribute("type","_moz");this.append(a)}}},breakParent:function(a){var c=new CKEDITOR.dom.range(this.getDocument());c.setStartAfter(this);c.setEndAfter(a);a=c.extractContents();c.insertNode(this.remove());a.insertAfterNode(this)},contains:CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a){var c=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?c.contains(a.getParent().$):c!=a.$&&c.contains(a.$)}:function(a){return!!(this.$.compareDocumentPosition(a.$)&16)},focus:function(){function a(){try{this.$.focus()}catch(d){}}
return function(c){c?CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(true));return a.innerHTML},getClientRect:function(){var a=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!a.width&&(a.width=a.right-a.left);!a.height&&
(a.height=a.bottom-a.top);return a},setHtml:CKEDITOR.env.ie&&CKEDITOR.env.version<9?function(a){try{var c=this.$;if(this.getParent())return c.innerHTML=a;var b=this.getDocument()._getHtml5ShivFrag();b.appendChild(c);c.innerHTML=a;b.removeChild(c);return a}catch(e){this.$.innerHTML="";c=new CKEDITOR.dom.element("body",this.getDocument());c.$.innerHTML=a;for(c=c.getChildren();c.count();)this.append(c.getItem(0));return a}}:function(a){return this.$.innerHTML=a},setText:function(a){CKEDITOR.dom.element.prototype.setText=
this.$.innerText!=void 0?function(a){return this.$.innerText=a}:function(a){return this.$.textContent=a};return this.setText(a)},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":a=this.$.getAttribute(a,2);a!==0&&this.$.tabIndex===0&&(a=null);return a;case "checked":a=
this.$.attributes.getNamedItem(a);return(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}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:CKEDITOR.env.ie?function(a){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)]}:
function(a){var c=this.getWindow().$.getComputedStyle(this.$,null);return c?c.getPropertyValue(a):""},getDtd:function(){var a=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return a};return a},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:CKEDITOR.env.ie?function(){var a=this.$.tabIndex;a===0&&(!CKEDITOR.dtd.$tabIndex[this.getName()]&&parseInt(this.getAttribute("tabindex"),10)!==0)&&(a=-1);return a}:CKEDITOR.env.webkit?function(){var a=this.$.tabIndex;if(a==void 0){a=
parseInt(this.getAttribute("tabindex"),10);isNaN(a)&&(a=-1)}return a}:function(){return this.$.tabIndex},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&&!(document.documentMode>8)){var c=this.$.scopeName;c!="HTML"&&(a=c.toLowerCase()+":"+a)}return(this.getName=
function(){return a})()},getValue:function(){return this.$.value},getFirst:function(a){var c=this.$.firstChild;(c=c&&new CKEDITOR.dom.node(c))&&(a&&!a(c))&&(c=c.getNext(a));return c},getLast:function(a){var c=this.$.lastChild;(c=c&&new CKEDITOR.dom.node(c))&&(a&&!a(c))&&(c=c.getPrevious(a));return c},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},is:function(){var a=this.getName();if(typeof arguments[0]=="object")return!!arguments[0][a];for(var c=0;c<arguments.length;c++)if(arguments[c]==
a)return true;return false},isEditable:function(a){var c=this.getName();if(this.isReadOnly()||this.getComputedStyle("display")=="none"||this.getComputedStyle("visibility")=="hidden"||CKEDITOR.dtd.$nonEditable[c]||CKEDITOR.dtd.$empty[c]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount())return false;if(a!==false){a=CKEDITOR.dtd[c]||CKEDITOR.dtd.span;return!(!a||!a["#"])}return true},isIdentical:function(a){var c=this.clone(0,1),a=a.clone(0,1);c.removeAttributes(["_moz_dirty",
"data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);a.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(c.$.isEqualNode){c.$.style.cssText=CKEDITOR.tools.normalizeCssText(c.$.style.cssText);a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText);return c.$.isEqualNode(a.$)}c=c.getOuterHtml();a=a.getOuterHtml();if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&this.is("a")){var b=this.getParent();if(b.type==CKEDITOR.NODE_ELEMENT){b=
b.clone();b.setHtml(c);c=b.getHtml();b.setHtml(a);a=b.getHtml()}}return c==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&this.getComputedStyle("visibility")!="hidden",c,b;if(a&&CKEDITOR.env.webkit){c=this.getWindow();if(!c.equals(CKEDITOR.document.getWindow())&&(b=c.$.frameElement))a=(new CKEDITOR.dom.element(b)).isVisible()}return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return false;for(var a=this.getChildren(),c=0,b=a.count();c<
b;c++){var e=a.getItem(c);if(!(e.type==CKEDITOR.NODE_ELEMENT&&e.data("cke-bookmark"))&&(e.type==CKEDITOR.NODE_ELEMENT&&!e.isEmptyInlineRemoveable()||e.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(e.getText())))return false}return true},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var a=this.$.attributes,c=0;c<a.length;c++){var b=a[c];switch(b.nodeName){case "class":if(this.getAttribute("class"))return true;case "data-cke-expando":continue;default:if(b.specified)return true}}return false}:
function(){var a=this.$.attributes,c=a.length,b={"data-cke-expando":1,_moz_dirty:1};return c>0&&(c>2||!b[a[0].nodeName]||c==2&&!b[a[1].nodeName])},hasAttribute:function(){function a(d){return(d=this.$.attributes.getNamedItem(d))?CKEDITOR.env.ie?d.specified:true:false}return CKEDITOR.env.ie&&CKEDITOR.env.version<8?function(c){return c=="name"?!!this.$.name:a.call(this,c)}:a}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,c){var b=this.$,a=a.$;if(b!=a){var e;if(c)for(;e=
b.lastChild;)a.insertBefore(b.removeChild(e),a.firstChild);else for(;e=b.firstChild;)a.appendChild(b.removeChild(e))}},mergeSiblings:function(){function a(d,b,e){if(b&&b.type==CKEDITOR.NODE_ELEMENT){for(var g=[];b.data("cke-bookmark")||b.isEmptyInlineRemoveable();){g.push(b);b=e?b.getNext():b.getPrevious();if(!b||b.type!=CKEDITOR.NODE_ELEMENT)return}if(d.isIdentical(b)){for(var f=e?d.getLast():d.getFirst();g.length;)g.shift().move(d,!e);b.moveChildren(d,!e);b.remove();f&&f.type==CKEDITOR.NODE_ELEMENT&&
f.mergeSiblings()}}}return function(c){if(c===false||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a")){a(this,this.getNext(),true);a(this,this.getPrevious())}}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var a=function(a,d){this.$.setAttribute(a,d);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(c,b){c=="class"?this.$.className=b:c=="style"?this.$.style.cssText=b:c=="tabindex"?this.$.tabIndex=b:c=="checked"?
this.$.checked=b:c=="contenteditable"?a.call(this,"contentEditable",b):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(c,b){if(c=="src"&&b.match(/^http:\/\//))try{a.apply(this,arguments)}catch(e){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var c in a)this.setAttribute(c,a[c]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&
(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){a=="class"?a="className":a=="tabindex"?a="tabIndex":a=="contenteditable"&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var c=0;c<a.length;c++)this.removeAttribute(a[c]);else for(c in a)a.hasOwnProperty(c)&&this.removeAttribute(c)},removeStyle:function(a){var c=this.$.style;if(!c.removeProperty&&(a=="border"||a=="margin"||a=="padding")){var b=["top","left","right","bottom"],
e;a=="border"&&(e=["color","style","width"]);for(var c=[],g=0;g<b.length;g++)if(e)for(var f=0;f<e.length;f++)c.push([a,b[g],e[f]].join("-"));else c.push([a,b[g]].join("-"));for(a=0;a<c.length;a++)this.removeStyle(c[a])}else{c.removeProperty?c.removeProperty(a):c.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a));this.$.style.cssText||this.removeAttribute("style")}},setStyle:function(a,c){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=c;return this},setStyles:function(a){for(var c in a)this.setStyle(c,
a[c]);return this},setOpacity:function(a){if(CKEDITOR.env.ie&&CKEDITOR.env.version<9){a=Math.round(a*100);this.setStyle("filter",a>=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+a+")")}else this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,c=this.getElementsByTag("*"),b=0,e=c.count();b<e;b++){a=c.getItem(b);a.setAttribute("unselectable","on")}}},getPositionedAncestor:function(){for(var a=
this;a.getName()!="html";){if(a.getComputedStyle("position")!="static")return a;a=a.getParent()}return null},getDocumentPosition:function(a){var c=0,b=0,e=this.getDocument(),g=e.getBody(),f=e.$.compatMode=="BackCompat";if(document.documentElement.getBoundingClientRect){var k=this.$.getBoundingClientRect(),n=e.$.documentElement,o=n.clientTop||g.$.clientTop||0,q=n.clientLeft||g.$.clientLeft||0,l=true;if(CKEDITOR.env.ie){l=e.getDocumentElement().contains(this);e=e.getBody().contains(this);l=f&&e||!f&&
l}if(l){c=k.left+(!f&&n.scrollLeft||g.$.scrollLeft);c=c-q;b=k.top+(!f&&n.scrollTop||g.$.scrollTop);b=b-o}}else{g=this;for(e=null;g&&!(g.getName()=="body"||g.getName()=="html");){c=c+(g.$.offsetLeft-g.$.scrollLeft);b=b+(g.$.offsetTop-g.$.scrollTop);if(!g.equals(this)){c=c+(g.$.clientLeft||0);b=b+(g.$.clientTop||0)}for(;e&&!e.equals(g);){c=c-e.$.scrollLeft;b=b-e.$.scrollTop;e=e.getParent()}e=g;g=(k=g.$.offsetParent)?new CKEDITOR.dom.element(k):null}}if(a){g=this.getWindow();e=a.getWindow();if(!g.equals(e)&&
g.$.frameElement){a=(new CKEDITOR.dom.element(g.$.frameElement)).getDocumentPosition(a);c=c+a.x;b=b+a.y}}if(!document.documentElement.getBoundingClientRect&&CKEDITOR.env.gecko&&!f){c=c+(this.$.clientLeft?1:0);b=b+(this.$.clientTop?1:0)}return{x:c,y:b}},scrollIntoView:function(a){var c=this.getParent();if(c){do{(c.$.clientWidth&&c.$.clientWidth<c.$.scrollWidth||c.$.clientHeight&&c.$.clientHeight<c.$.scrollHeight)&&!c.is("body")&&this.scrollIntoParent(c,a,1);if(c.is("html")){var b=c.getWindow();try{var e=
b.$.frameElement;e&&(c=new CKEDITOR.dom.element(e))}catch(g){}}}while(c=c.getParent())}},scrollIntoParent:function(a,c,b){var e,g,f,k;function n(c,b){if(/body|html/.test(a.getName()))a.getWindow().$.scrollBy(c,b);else{a.$.scrollLeft=a.$.scrollLeft+c;a.$.scrollTop=a.$.scrollTop+b}}function o(a,c){var d={x:0,y:0};if(!a.is(l?"body":"html")){var b=a.$.getBoundingClientRect();d.x=b.left;d.y=b.top}b=a.getWindow();if(!b.equals(c)){b=o(CKEDITOR.dom.element.get(b.$.frameElement),c);d.x=d.x+b.x;d.y=d.y+b.y}return d}
function q(a,c){return parseInt(a.getComputedStyle("margin-"+c)||0,10)||0}!a&&(a=this.getWindow());f=a.getDocument();var l=f.$.compatMode=="BackCompat";a instanceof CKEDITOR.dom.window&&(a=l?f.getBody():f.getDocumentElement());f=a.getWindow();g=o(this,f);var m=o(a,f),v=this.$.offsetHeight;e=this.$.offsetWidth;var t=a.$.clientHeight,s=a.$.clientWidth;f=g.x-q(this,"left")-m.x||0;k=g.y-q(this,"top")-m.y||0;e=g.x+e+q(this,"right")-(m.x+s)||0;g=g.y+v+q(this,"bottom")-(m.y+t)||0;if(k<0||g>0)n(0,c===true?
k:c===false?g:k<0?k:g);if(b&&(f<0||e>0))n(f<0?f:e,0)},setState:function(a,c,b){c=c||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(c+"_on");this.removeClass(c+"_off");this.removeClass(c+"_disabled");b&&this.setAttribute("aria-pressed",true);b&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(c+"_disabled");this.removeClass(c+"_off");this.removeClass(c+"_on");b&&this.setAttribute("aria-disabled",true);b&&this.removeAttribute("aria-pressed");break;default:this.addClass(c+
"_off");this.removeClass(c+"_on");this.removeClass(c+"_disabled");b&&this.removeAttribute("aria-pressed");b&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(c){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,c){for(var b=this.$.attributes,c=c||{},e=0;e<b.length;e++){var g=b[e],f=g.nodeName.toLowerCase(),k;if(!(f in c))if(f=="checked"&&(k=this.getAttribute(f)))a.setAttribute(f,k);
else if(!CKEDITOR.env.ie||this.hasAttribute(f)){k=this.getAttribute(f);if(k===null)k=g.nodeValue;a.setAttribute(f,k)}}if(this.$.style.cssText!=="")a.$.style.cssText=this.$.style.cssText},renameNode:function(a){if(this.getName()!=a){var c=this.getDocument(),a=new CKEDITOR.dom.element(a,c);this.copyAttributes(a);this.moveChildren(a);this.getParent()&&this.$.parentNode.replaceChild(a.$,this.$);a.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=a.$;delete this.getName}},getChild:function(){function a(c,
b){var d=c.childNodes;if(b>=0&&b<d.length)return d[b]}return function(c){var b=this.$;if(c.slice)for(;c.length>0&&b;)b=a(b,c.shift());else b=a(b,c);return b?new CKEDITOR.dom.node(b):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){this.on("contextmenu",function(a){a.data.getTarget().hasClass("cke_enable_context_menu")||a.data.preventDefault()})},getDirection:function(a){return a?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&
this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(a,c){a="data-"+a;if(c===void 0)return this.getAttribute(a);c===false?this.removeAttribute(a):this.setAttribute(a,c);return null},getEditor:function(){var a=CKEDITOR.instances,c,b;for(c in a){b=a[c];if(b.element.equals(this)&&b.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return b}return null},find:function(b){var c=a(this),b=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(f(this,
b)));c();return b},findOne:function(b){var c=a(this),b=this.$.querySelector(f(this,b));c();return b?new CKEDITOR.dom.element(b):null},forEach:function(a,c,b){if(!b&&(!c||this.type==c))var e=a(this);if(e!==false)for(var b=this.getChildren(),g=0;g<b.count();g++){e=b.getItem(g);e.type==CKEDITOR.NODE_ELEMENT?e.forEach(a,c):(!c||e.type==c)&&a(e)}}});var e={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};
CKEDITOR.dom.element.prototype.setSize=function(a,c,e){if(typeof c=="number"){if(e&&(!CKEDITOR.env.ie||!CKEDITOR.env.quirks))c=c-b.call(this,a);this.setStyle(a,c+"px")}};CKEDITOR.dom.element.prototype.getSize=function(a,c){var e=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;c&&(e=e-b.call(this,a));return e}}(),CKEDITOR.dom.documentFragment=function(a){a=a||CKEDITOR.document;this.$=a.type==CKEDITOR.NODE_DOCUMENT?a.$.createDocumentFragment():
a},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(a){a=a.$;a.parentNode.insertBefore(this.$,a.nextSibling)}},!0,{append:1,appendBogus:1,getFirst: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}),function(){function a(a,b){var c=this.range;
if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed){this.end();return null}c.optimize()}var d,e=c.startContainer;d=c.endContainer;var k=c.startOffset,g=c.endOffset,h,f=this.guard,i=this.type,j=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var w=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),r=d.type==CKEDITOR.NODE_ELEMENT?d.getChild(g):d.getNext();this._.guardLTR=function(a,b){return(!b||!w.equals(a))&&(!r||!a.equals(r))&&(a.type!=CKEDITOR.NODE_ELEMENT||
!b||!a.equals(c.root))}}if(a&&!this._.guardRTL){var x=e.type==CKEDITOR.NODE_ELEMENT?e:e.getParent(),y=e.type==CKEDITOR.NODE_ELEMENT?k?e.getChild(k-1):null:e.getPrevious();this._.guardRTL=function(a,b){return(!b||!x.equals(a))&&(!y||!a.equals(y))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}var z=a?this._.guardRTL:this._.guardLTR;h=f?function(a,b){return z(a,b)===false?false:f(a,b)}:z;if(this.current)d=this.current[j](false,i,h);else{if(a)d.type==CKEDITOR.NODE_ELEMENT&&(d=g>0?d.getChild(g-
1):h(d,true)===false?null:d.getPreviousSourceNode(true,i,h));else{d=e;if(d.type==CKEDITOR.NODE_ELEMENT&&!(d=d.getChild(k)))d=h(e,true)===false?null:e.getNextSourceNode(true,i,h)}d&&h(d)===false&&(d=null)}for(;d&&!this._.end;){this.current=d;if(!this.evaluator||this.evaluator(d)!==false){if(!b)return d}else if(b&&this.evaluator)return false;d=d[j](false,i,h)}this.end();return this.current=null}function f(b){for(var c,d=null;c=a.call(this,b);)d=c;return d}function b(a){if(j(a))return false;if(a.type==
CKEDITOR.NODE_TEXT)return true;if(a.type==CKEDITOR.NODE_ELEMENT){if(a.is(CKEDITOR.dtd.$inline)||a.is("hr")||a.getAttribute("contenteditable")=="false")return true;var b;if(b=!CKEDITOR.env.needsBrFiller)if(b=a.is(k))a:{b=0;for(var c=a.getChildCount();b<c;++b)if(!j(a.getChild(b))){b=false;break a}b=true}if(b)return true}return false}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return a.call(this)},previous:function(){return a.call(this,
1)},checkForward:function(){return a.call(this,0,1)!==false},checkBackward:function(){return a.call(this,1,1)!==false},lastForward:function(){return f.call(this)},lastBackward:function(){return f.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},d={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=
function(a){return this.getComputedStyle("float")=="none"&&!(this.getComputedStyle("position")in d)&&e[this.getComputedStyle("display")]?true:!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a))};CKEDITOR.dom.walker.blockBoundary=function(a){return function(b){return!(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,b){function c(a){return a&&a.getName&&a.getName()=="span"&&
a.data("cke-bookmark")}return function(d){var e,k;e=d&&d.type!=CKEDITOR.NODE_ELEMENT&&(k=d.getParent())&&c(k);e=a?e:e||c(d);return!!(b^e)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var c;b&&b.type==CKEDITOR.NODE_TEXT&&(c=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()=="​");return!!(a^c)}};CKEDITOR.dom.walker.invisible=function(a){var b=CKEDITOR.dom.walker.whitespaces();return function(c){if(b(c))c=1;else{c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent());c=!c.$.offsetHeight}return!!(a^
c)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(c){return!!(b^c.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!h(a)&&!i(a)}return function(d){var e=CKEDITOR.env.needsBrFiller?d.is&&d.is("br"):d.getText&&c.test(d.getText());if(e){e=d.getParent();d=d.getNext(b);e=e.isBlockBoundary()&&(!d||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary())}return!!(a^e)}};CKEDITOR.dom.walker.temp=function(a){return function(b){b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b=
b&&b.hasAttribute("data-cke-temp");return!!(a^b)}};var c=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,h=CKEDITOR.dom.walker.whitespaces(),i=CKEDITOR.dom.walker.bookmark(),g=CKEDITOR.dom.walker.temp();CKEDITOR.dom.walker.ignored=function(a){return function(b){b=h(b)||i(b)||g(b);return!!(a^b)}};var j=CKEDITOR.dom.walker.ignored(),k=function(a){var b={},c;for(c in a)CKEDITOR.dtd[c]["#"]&&(b[c]=1);return b}(CKEDITOR.dtd.$block);CKEDITOR.dom.walker.editable=function(a){return function(c){return!!(a^b(c))}};CKEDITOR.dom.element.prototype.getBogus=
function(){var a=this;do a=a.getPreviousSourceNode();while(i(a)||h(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&c.test(a.getText()))?a:false}}(),CKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=true;var f=a instanceof CKEDITOR.dom.document;this.document=f?a:a.getDocument();this.root=f?a.getBody():a},function(){function a(){var a=
false,b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(true),e=CKEDITOR.dom.walker.bogus();return function(l){if(d(l)||b(l))return true;if(e(l)&&!a)return a=true;return l.type==CKEDITOR.NODE_TEXT&&(l.hasAscendant("pre")||CKEDITOR.tools.trim(l.getText()).length)||l.type==CKEDITOR.NODE_ELEMENT&&!l.is(c)?false:true}}function f(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(d){return c(d)||b(d)?true:!a&&h(d)||d.type==CKEDITOR.NODE_ELEMENT&&
d.is(CKEDITOR.dtd.$removeEmpty)}}function b(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&j(a)&&(b=a);return g(a)&&!(h(a)&&a.equals(b))})}}var e=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},d=function(a,b,c,d){a.optimizeBookmark();var e=a.startContainer,g=a.endContainer,h=a.startOffset,f=a.endOffset,i,p;if(g.type==CKEDITOR.NODE_TEXT)g=g.split(f);else if(g.getChildCount()>0)if(f>=
g.getChildCount()){g=g.append(a.document.createText(""));p=true}else g=g.getChild(f);if(e.type==CKEDITOR.NODE_TEXT){e.split(h);e.equals(g)&&(g=e.getNext())}else if(h)if(h>=e.getChildCount()){e=e.append(a.document.createText(""));i=true}else e=e.getChild(h).getPrevious();else{e=e.append(a.document.createText(""),1);i=true}var h=e.getParents(),f=g.getParents(),j,u,w;for(j=0;j<h.length;j++){u=h[j];w=f[j];if(!u.equals(w))break}for(var r=c,x,y,z,B=j;B<h.length;B++){x=h[B];r&&!x.equals(e)&&(y=r.append(x.clone()));
for(x=x.getNext();x;){if(x.equals(f[B])||x.equals(g))break;z=x.getNext();if(b==2)r.append(x.clone(true));else{x.remove();b==1&&r.append(x)}x=z}r&&(r=y)}r=c;for(c=j;c<f.length;c++){x=f[c];b>0&&!x.equals(g)&&(y=r.append(x.clone()));if(!h[c]||x.$.parentNode!=h[c].$.parentNode)for(x=x.getPrevious();x;){if(x.equals(h[c])||x.equals(e))break;z=x.getPrevious();if(b==2)r.$.insertBefore(x.$.cloneNode(true),r.$.firstChild);else{x.remove();b==1&&r.$.insertBefore(x.$,r.$.firstChild)}x=z}r&&(r=y)}if(b==2){u=a.startContainer;
if(u.type==CKEDITOR.NODE_TEXT){u.$.data=u.$.data+u.$.nextSibling.data;u.$.parentNode.removeChild(u.$.nextSibling)}a=a.endContainer;if(a.type==CKEDITOR.NODE_TEXT&&a.$.nextSibling){a.$.data=a.$.data+a.$.nextSibling.data;a.$.parentNode.removeChild(a.$.nextSibling)}}else{if(u&&w&&(e.$.parentNode!=u.$.parentNode||g.$.parentNode!=w.$.parentNode)){b=w.getIndex();i&&w.$.parentNode==e.$.parentNode&&b--;if(d&&u.type==CKEDITOR.NODE_ELEMENT){d=CKEDITOR.dom.element.createFromHtml('<span data-cke-bookmark="1" style="display:none">&nbsp;</span>',
a.document);d.insertAfter(u);u.mergeSiblings(false);a.moveToBookmark({startNode:d})}else a.setStart(w.getParent(),b)}a.collapse(true)}i&&e.remove();p&&g.$.parentNode&&g.remove()},c={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},h=CKEDITOR.dom.walker.bogus(),i=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,g=CKEDITOR.dom.walker.editable(),j=CKEDITOR.dom.walker.ignored(true);CKEDITOR.dom.range.prototype=
{clone:function(){var a=new CKEDITOR.dom.range(this.root);a.startContainer=this.startContainer;a.startOffset=this.startOffset;a.endContainer=this.endContainer;a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){if(a){this.endContainer=this.startContainer;this.endOffset=this.startOffset}else{this.startContainer=this.endContainer;this.startOffset=this.endOffset}this.collapsed=true},cloneContents:function(){var a=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||
d(this,2,a);return a},deleteContents:function(a){this.collapsed||d(this,0,null,a)},extractContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||d(this,1,b,a);return b},createBookmark:function(a){var b,c,d,e,g=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml("&nbsp;");if(a){d="cke_bm_"+CKEDITOR.tools.getNextNumber();b.setAttribute("id",d+(g?"C":"S"))}if(!g){c=b.clone();c.setHtml("&nbsp;");a&&c.setAttribute("id",
d+"E");e=this.clone();e.collapse();e.insertNode(c)}e=this.clone();e.collapse(true);e.insertNode(b);if(c){this.setStartAfter(b);this.setEndBefore(c)}else this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?d+(g?"C":"S"):b,endNode:a?d+"E":c,serializable:a,collapsed:g}},createBookmark2:function(){function a(b){var c=b.container,d=b.offset,e;e=c;var g=d;e=e.type!=CKEDITOR.NODE_ELEMENT||g===0||g==e.getChildCount()?0:e.getChild(g-1).type==CKEDITOR.NODE_TEXT&&e.getChild(g).type==CKEDITOR.NODE_TEXT;
if(e){c=c.getChild(d-1);d=c.getLength()}c.type==CKEDITOR.NODE_ELEMENT&&d>1&&(d=c.getChild(d-1).getIndex(true)+1);if(c.type==CKEDITOR.NODE_TEXT){e=c;for(g=0;(e=e.getPrevious())&&e.type==CKEDITOR.NODE_TEXT;)g=g+e.getLength();d=d+g}b.container=c;b.offset=d}return function(b){var c=this.collapsed,d={container:this.startContainer,offset:this.startOffset},e={container:this.endContainer,offset:this.endOffset};if(b){a(d);c||a(e)}return{start:d.container.getAddress(b),end:c?null:e.container.getAddress(b),
startOffset:d.offset,endOffset:e.offset,normalized:b,collapsed:c,is2:true}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized),a=a.endOffset;this.setStart(b,c);d?this.setEnd(d,a):this.collapse(true)}else{b=(c=a.serializable)?this.document.getById(a.startNode):a.startNode;a=c?this.document.getById(a.endNode):a.endNode;this.setStartBefore(b);b.remove();if(a){this.setEndBefore(a);a.remove()}else this.collapse(true)}},
getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,d=this.endOffset,e;if(a.type==CKEDITOR.NODE_ELEMENT){e=a.getChildCount();if(e>c)a=a.getChild(c);else if(e<1)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}}if(b.type==CKEDITOR.NODE_ELEMENT){e=b.getChildCount();if(e>d)b=b.getChild(d).getPreviousSourceNode(true);else if(e<1)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=
b.lastChild;b=new CKEDITOR.dom.node(b)}}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,d=this.endContainer,c=c.equals(d)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(d);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):
this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&(a.is("span")&&a.data("cke-bookmark"))&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&(b.is&&b.is("span")&&b.data("cke-bookmark"))&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var c=this.startContainer,d=this.startOffset,e=this.collapsed;
if((!a||e)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength()){d=c.getIndex()+1;c=c.getParent()}else{var g=c.split(d),d=c.getIndex()+1,c=c.getParent();if(this.startContainer.equals(this.endContainer))this.setEnd(g,this.endOffset-this.startOffset);else if(c.equals(this.endContainer))this.endOffset=this.endOffset+1}else{d=c.getIndex();c=c.getParent()}this.setStart(c,d);if(e){this.collapse(true);return}}c=this.endContainer;d=this.endOffset;if(!b&&!e&&c&&c.type==CKEDITOR.NODE_TEXT){if(d){d>=c.getLength()||
c.split(d);d=c.getIndex()+1}else d=c.getIndex();c=c.getParent();this.setEnd(c,d)}},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var d=RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var g=this.getCommonAncestor(),h=this.root,f,i,p,j,u,w=false,r,x;r=this.startContainer;var y=this.startOffset;if(r.type==CKEDITOR.NODE_TEXT){if(y){r=!CKEDITOR.tools.trim(r.substring(0,
y)).length&&r;w=!!r}if(r&&!(j=r.getPrevious()))p=r.getParent()}else{y&&(j=r.getChild(y-1)||r.getLast());j||(p=r)}for(p=c(p);p||j;){if(p&&!j){!u&&p.equals(g)&&(u=true);if(e?p.isBlockBoundary():!h.contains(p))break;if(!w||p.getComputedStyle("display")!="inline"){w=false;u?f=p:this.setStartBefore(p)}j=p.getPrevious()}for(;j;){r=false;if(j.type==CKEDITOR.NODE_COMMENT)j=j.getPrevious();else{if(j.type==CKEDITOR.NODE_TEXT){x=j.getText();d.test(x)&&(j=null);r=/[\s\ufeff]$/.test(x)}else if((j.$.offsetWidth>
0||b&&j.is("br"))&&!j.data("cke-bookmark"))if(w&&CKEDITOR.dtd.$removeEmpty[j.getName()]){x=j.getText();if(d.test(x))j=null;else for(var y=j.$.getElementsByTagName("*"),z=0,B;B=y[z++];)if(!CKEDITOR.dtd.$removeEmpty[B.nodeName.toLowerCase()]){j=null;break}j&&(r=!!x.length)}else j=null;r&&(w?u?f=p:p&&this.setStartBefore(p):w=true);if(j){r=j.getPrevious();if(!p&&!r){p=j;j=null;break}j=r}else p=null}}p&&(p=c(p.getParent()))}r=this.endContainer;y=this.endOffset;p=j=null;u=w=false;var G=function(a,b){var c=
new CKEDITOR.dom.range(h);c.setStart(a,b);c.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),e;for(c.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};e=c.next();){if(e.type!=CKEDITOR.NODE_TEXT)return false;x=e!=a?e.getText():e.substring(b);if(d.test(x))return false}return true};if(r.type==CKEDITOR.NODE_TEXT)if(CKEDITOR.tools.trim(r.substring(y)).length)w=true;else{w=!r.getLength();if(y==r.getLength()){if(!(j=r.getNext()))p=r.getParent()}else G(r,
y)&&(p=r.getParent())}else(j=r.getChild(y))||(p=r);for(;p||j;){if(p&&!j){!u&&p.equals(g)&&(u=true);if(e?p.isBlockBoundary():!h.contains(p))break;if(!w||p.getComputedStyle("display")!="inline"){w=false;u?i=p:p&&this.setEndAfter(p)}j=p.getNext()}for(;j;){r=false;if(j.type==CKEDITOR.NODE_TEXT){x=j.getText();G(j,0)||(j=null);r=/^[\s\ufeff]/.test(x)}else if(j.type==CKEDITOR.NODE_ELEMENT){if((j.$.offsetWidth>0||b&&j.is("br"))&&!j.data("cke-bookmark"))if(w&&CKEDITOR.dtd.$removeEmpty[j.getName()]){x=j.getText();
if(d.test(x))j=null;else{y=j.$.getElementsByTagName("*");for(z=0;B=y[z++];)if(!CKEDITOR.dtd.$removeEmpty[B.nodeName.toLowerCase()]){j=null;break}}j&&(r=!!x.length)}else j=null}else r=1;r&&w&&(u?i=p:this.setEndAfter(p));if(j){r=j.getNext();if(!p&&!r){p=j;j=null;break}j=r}else p=null}p&&(p=c(p.getParent()))}if(f&&i){g=f.contains(i)?i:f;this.setStartBefore(g);this.setEndAfter(g)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:p=new CKEDITOR.dom.range(this.root);h=
this.root;p.setStartAt(h,CKEDITOR.POSITION_AFTER_START);p.setEnd(this.startContainer,this.startOffset);p=new CKEDITOR.dom.walker(p);var C,E,D=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),F=null,I=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&a.getAttribute("contenteditable")=="false")if(F){if(F.equals(a)){F=null;return}}else F=a;else if(F)return;var b=D(a);b||(C=a);return b},e=function(a){var b=I(a);!b&&(a.is&&a.is("br"))&&(E=a);return b};p.guard=I;p=p.lastBackward();
C=C||h;this.setStartAt(C,!C.is("br")&&(!p&&this.checkStartOfBlock()||p&&C.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(),O=CKEDITOR.dom.walker.bookmark();p.evaluator=function(a){return!H(a)&&!O(a)};if((p=p.previous())&&p.type==CKEDITOR.NODE_ELEMENT&&p.is("br"))break}p=this.clone();p.collapse();p.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);p=new CKEDITOR.dom.walker(p);
p.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?e:I;C=F=E=null;p=p.lastForward();C=C||h;this.setEndAt(C,!p&&this.checkEndOfBlock()||p&&C.contains(p)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);E&&this.setEndAfter(E)}},shrink:function(a,b,c){if(!this.collapsed){var a=a||CKEDITOR.SHRINK_TEXT,d=this.clone(),e=this.startContainer,g=this.endContainer,h=this.startOffset,f=this.endOffset,i=1,j=1;if(e&&e.type==CKEDITOR.NODE_TEXT)if(h)if(h>=e.getLength())d.setStartAfter(e);else{d.setStartBefore(e);
i=0}else d.setStartBefore(e);if(g&&g.type==CKEDITOR.NODE_TEXT)if(f)if(f>=g.getLength())d.setEndAfter(g);else{d.setEndAfter(g);j=0}else d.setEndBefore(g);var d=new CKEDITOR.dom.walker(d),A=CKEDITOR.dom.walker.bookmark();d.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var u;d.guard=function(b,d){if(A(b))return true;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||d&&b.equals(u)||c===false&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||
b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return false;!d&&b.type==CKEDITOR.NODE_ELEMENT&&(u=b);return true};if(i)(e=d[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(e,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);if(j){d.reset();(d=d[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(d,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!i&&!j)}},insertNode:function(a){this.optimizeBookmark();this.trim(false,
true);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(true)},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,
b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex();a=a.getParent()}this.startContainer=a;this.startOffset=b;if(!this.endContainer){this.endContainer=a;this.endOffset=b}e(this)},setEnd:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex()+1;a=a.getParent()}this.endContainer=a;this.endOffset=b;if(!this.startContainer){this.startContainer=a;this.startOffset=b}e(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,b){switch(b){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)}e(this)},
setEndAt:function(a,b){switch(b){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)}e(this)},fixBlock:function(a,b){var c=this.createBookmark(),d=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);
d.trim();d.appendBogus();this.insertNode(d);this.moveToBookmark(c);return d},splitBlock:function(a){var b=new CKEDITOR.dom.elementPath(this.startContainer,this.root),c=new CKEDITOR.dom.elementPath(this.endContainer,this.root),d=b.block,e=c.block,g=null;if(!b.blockLimit.equals(c.blockLimit))return null;if(a!="br"){if(!d){d=this.fixBlock(true,a);e=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block}e||(e=this.fixBlock(false,a))}a=d&&this.checkStartOfBlock();b=e&&this.checkEndOfBlock();
this.deleteContents();if(d&&d.equals(e))if(b){g=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END);e=null}else if(a){g=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d=null}else{e=this.splitElement(d);d.is("ul","ol")||d.appendBogus()}return{previousBlock:d,nextBlock:e,wasStartOfBlock:a,wasEndOfBlock:b,elementPath:g}},splitElement:function(a){if(!this.collapsed)return null;
this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var b=this.extractContents(),c=a.clone(false);b.appendTo(c);c.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return c},removeEmptyBlocksAtEnd:function(){function a(d){return function(a){return b(a)||(c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable())||d.is("table")&&a.is("caption")?false:true}}var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(false);return function(b){for(var c=this.createBookmark(),
d=this[b?"endPath":"startPath"](),e=d.block||d.blockLimit,g;e&&!e.equals(d.root)&&!e.getFirst(a(e));){g=e.getParent();this[b?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END);e.remove(1);e=g}this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,b){var c=b==CKEDITOR.START,d=this.clone();d.collapse(c);d[c?"setStartAt":
"setEndAt"](a,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=f(c);return d[c?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var b=this.startContainer,c=this.startOffset;if(CKEDITOR.env.ie&&c&&b.type==CKEDITOR.NODE_TEXT){b=CKEDITOR.tools.ltrim(b.substring(0,c));i.test(b)&&this.trim(0,1)}this.trim();b=new CKEDITOR.dom.elementPath(this.startContainer,this.root);c=this.clone();c.collapse(true);c.setStartAt(b.block||b.blockLimit,
CKEDITOR.POSITION_AFTER_START);b=new CKEDITOR.dom.walker(c);b.evaluator=a();return b.checkBackward()},checkEndOfBlock:function(){var b=this.endContainer,c=this.endOffset;if(CKEDITOR.env.ie&&b.type==CKEDITOR.NODE_TEXT){b=CKEDITOR.tools.rtrim(b.substring(c));i.test(b)&&this.trim(1,0)}this.trim();b=new CKEDITOR.dom.elementPath(this.endContainer,this.root);c=this.clone();c.collapse(false);c.setEndAt(b.block||b.blockLimit,CKEDITOR.POSITION_BEFORE_END);b=new CKEDITOR.dom.walker(c);b.evaluator=a();return b.checkForward()},
getPreviousNode:function(a,b,c){var d=this.clone();d.collapse(1);d.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var d=this.clone();d.collapse();d.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,c){for(;b;){if(b.type==CKEDITOR.NODE_ELEMENT){if(b.getAttribute("contentEditable")==
"false"&&!b.data("cke-editable"))return 0;if(b.is("html")||b.getAttribute("contentEditable")=="true"&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(false)){this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);return true}for(var c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&
this.checkEndOfBlock()&&i.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable()){this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START);c=1}else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);else if(a.getAttribute("contenteditable")=="false"&&
a.is(CKEDITOR.dtd.$block)){this.setStartBefore(a);this.setEndAfter(a);return true}var d=a,e=c,g=void 0;d.type==CKEDITOR.NODE_ELEMENT&&d.isEditable(false)&&(g=d[b?"getLast":"getFirst"](j));!e&&!g&&(g=d[b?"getPrevious":"getNext"](j));a=g}return!!c},moveToClosestEditablePosition:function(a,b){var c=new CKEDITOR.dom.range(this.root),d=0,e,g=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];c.moveToPosition(a,g[b?0:1]);if(a.is(CKEDITOR.dtd.$block)){if(e=c[b?"getNextEditableNode":"getPreviousEditableNode"]()){d=
1;if(e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$block)&&e.getAttribute("contenteditable")=="false"){c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START);c.setEndAt(e,CKEDITOR.POSITION_AFTER_END)}else c.moveToPosition(e,g[b?1:0])}}else d=1;d&&this.moveToRange(c);return!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,true)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=
CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(false,true),c=CKEDITOR.dom.walker.whitespaces(true);a.evaluator=function(a){return c(a)&&b(a)};var d=a.next();a.reset();return d&&d.equals(a.previous())?d: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:b(),getPreviousEditableNode:b(1),scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("<span>&nbsp;</span>",this.document),b,c,d,e=this.clone();e.optimize();if(d=e.startContainer.type==CKEDITOR.NODE_TEXT){c=e.startContainer.getText();b=e.startContainer.split(e.startOffset);a.insertAfter(e.startContainer)}else e.insertNode(a);a.scrollIntoView();if(d){e.startContainer.setText(c);
b.remove()}a.remove()}}}(),CKEDITOR.POSITION_AFTER_START=1,CKEDITOR.POSITION_BEFORE_END=2,CKEDITOR.POSITION_BEFORE_START=3,CKEDITOR.POSITION_AFTER_END=4,CKEDITOR.ENLARGE_ELEMENT=1,CKEDITOR.ENLARGE_BLOCK_CONTENTS=2,CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3,CKEDITOR.ENLARGE_INLINE=4,CKEDITOR.START=1,CKEDITOR.END=2,CKEDITOR.SHRINK_ELEMENT=1,CKEDITOR.SHRINK_TEXT=2,"use strict",function(){function a(a){if(!(arguments.length<1)){this.range=a;this.forceBrBreak=0;this.enlargeBr=1;this.enforceRealBlocks=0;this._||
(this._={})}}function f(a,b,d){for(a=a.getNextSourceNode(b,null,d);!c(a);)a=a.getNextSourceNode(b,null,d);return a}function b(a){var b=[];a.forEach(function(a){if(a.getAttribute("contenteditable")=="true"){b.push(a);return false}},CKEDITOR.NODE_ELEMENT,true);return b}function e(a,c,d,h){a:{h==void 0&&(h=b(d));for(var f;f=h.shift();)if(f.getDtd().p){h={element:f,remaining:h};break a}h=null}if(!h)return 0;if((f=CKEDITOR.filter.instances[h.element.data("cke-filter")])&&!f.check(c))return e(a,c,d,h.remaining);
c=new CKEDITOR.dom.range(h.element);c.selectNodeContents(h.element);c=c.createIterator();c.enlargeBr=a.enlargeBr;c.enforceRealBlocks=a.enforceRealBlocks;c.activeFilter=c.filter=f;a._.nestedEditable={element:h.element,container:d,remaining:h.remaining,iterator:c};return 1}var d=/^[\r\n\t ]+$/,c=CKEDITOR.dom.walker.bookmark(false,true),h=CKEDITOR.dom.walker.whitespaces(true),i=function(a){return c(a)&&h(a)};a.prototype={getNextParagraph:function(a){var b,h,n,o,q,a=a||"p";if(this._.nestedEditable){if(b=
this._.nestedEditable.iterator.getNextParagraph(a)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return b}this.activeFilter=this.filter;if(e(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return this._.nestedEditable.iterator.getNextParagraph(a)}this._.nestedEditable=null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var l=this.range.clone();l.shrink(CKEDITOR.SHRINK_ELEMENT,true);
h=l.endContainer.hasAscendant("pre",true)||l.startContainer.hasAscendant("pre",true);l.enlarge(this.forceBrBreak&&!h||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(!l.collapsed){h=new CKEDITOR.dom.walker(l.clone());var m=CKEDITOR.dom.walker.bookmark(true,true);h.evaluator=m;this._.nextNode=h.next();h=new CKEDITOR.dom.walker(l.clone());h.evaluator=m;h=h.previous();this._.lastNode=h.getNextSourceNode(true);if(this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&
!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()){m=this.range.clone();m.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END);if(m.checkEndOfBlock()){m=new CKEDITOR.dom.elementPath(m.endContainer,m.root);this._.lastNode=(m.block||m.blockLimit).getNextSourceNode(true)}}if(!this._.lastNode||!l.root.contains(this._.lastNode)){this._.lastNode=this._.docEndMarker=l.document.createText("");this._.lastNode.insertAfter(h)}l=null}this._.started=1;h=l}m=
this._.nextNode;l=this._.lastNode;for(this._.nextNode=null;m;){var v=0,t=m.hasAscendant("pre"),s=m.type!=CKEDITOR.NODE_ELEMENT,p=0;if(s)m.type==CKEDITOR.NODE_TEXT&&d.test(m.getText())&&(s=0);else{var A=m.getName();if(CKEDITOR.dtd.$block[A]&&m.getAttribute("contenteditable")=="false"){b=m;e(this,a,b);break}else if(m.isBlockBoundary(this.forceBrBreak&&!t&&{br:1})){if(A=="br")s=1;else if(!h&&!m.getChildCount()&&A!="hr"){b=m;n=m.equals(l);break}if(h){h.setEndAt(m,CKEDITOR.POSITION_BEFORE_START);if(A!=
"br")this._.nextNode=m}v=1}else{if(m.getFirst()){if(!h){h=this.range.clone();h.setStartAt(m,CKEDITOR.POSITION_BEFORE_START)}m=m.getFirst();continue}s=1}}if(s&&!h){h=this.range.clone();h.setStartAt(m,CKEDITOR.POSITION_BEFORE_START)}n=(!v||s)&&m.equals(l);if(h&&!v)for(;!m.getNext(i)&&!n;){A=m.getParent();if(A.isBlockBoundary(this.forceBrBreak&&!t&&{br:1})){v=1;s=0;n||A.equals(l);h.setEndAt(A,CKEDITOR.POSITION_BEFORE_END);break}m=A;s=1;n=m.equals(l);p=1}s&&h.setEndAt(m,CKEDITOR.POSITION_AFTER_END);m=
f(m,p,l);if((n=!m)||v&&h)break}if(!b){if(!h){this._.docEndMarker&&this._.docEndMarker.remove();return this._.nextNode=null}b=new CKEDITOR.dom.elementPath(h.startContainer,h.root);m=b.blockLimit;v={div:1,th:1,td:1};b=b.block;if(!b&&m&&!this.enforceRealBlocks&&v[m.getName()]&&h.checkStartOfBlock()&&h.checkEndOfBlock()&&!m.equals(h.root))b=m;else if(!b||this.enforceRealBlocks&&b.getName()=="li"){b=this.range.document.createElement(a);h.extractContents().appendTo(b);b.trim();h.insertNode(b);o=q=true}else if(b.getName()!=
"li"){if(!h.checkStartOfBlock()||!h.checkEndOfBlock()){b=b.clone(false);h.extractContents().appendTo(b);b.trim();q=h.splitBlock();o=!q.wasStartOfBlock;q=!q.wasEndOfBlock;h.insertNode(b)}}else if(!n)this._.nextNode=b.equals(l)?null:f(h.getBoundaryNodes().endNode,1,l)}if(o)(o=b.getPrevious())&&o.type==CKEDITOR.NODE_ELEMENT&&(o.getName()=="br"?o.remove():o.getLast()&&o.getLast().$.nodeName.toLowerCase()=="br"&&o.getLast().remove());if(q)(o=b.getLast())&&o.type==CKEDITOR.NODE_ELEMENT&&o.getName()=="br"&&
(!CKEDITOR.env.needsBrFiller||o.getPrevious(c)||o.getNext(c))&&o.remove();if(!this._.nextNode)this._.nextNode=n||b.equals(l)||!l?null:f(b,1,l);return b}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}}(),CKEDITOR.command=function(a,f){this.uiItems=[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return false;this.editorFocus&&a.focus();return this.fire("exec")===false?true:f.exec.call(this,a,b)!==false};this.refresh=function(a,b){if(!this.readOnly&&
a.readOnly)return true;if(this.context&&!b.isContextFor(this.context)){this.disable();return true}if(!this.checkAllowed(true)){this.disable();return true}this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return this.fire("refresh",{editor:a,path:b})===false?true:f.refresh&&f.refresh.apply(this,arguments)!==false};var b;this.checkAllowed=function(e){return!e&&typeof b=="boolean"?b:b=a.activeFilter.checkFeature(this)};CKEDITOR.tools.extend(this,f,{modes:{wysiwyg:1},editorFocus:1,
contextSensitive:!!f.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||typeof this.previousState=="undefined"?CKEDITOR.TRISTATE_OFF:this.previousState)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return false;this.previousState=this.state;
this.state=a;this.fire("state");return true},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:"<!DOCTYPE html>",bodyId:"",bodyClass:"",fullPage:!1,height:200,extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function a(a,b,c,d,e){var g,l,a=[];for(g in b){l=b[g];l=typeof l=="boolean"?{}:typeof l=="function"?{match:l}:G(l);if(g.charAt(0)!="$")l.elements=g;if(c)l.featureName=c.toLowerCase();var f=l;f.elements=h(f.elements,/\s+/)||null;f.propertiesOnly=f.propertiesOnly||
f.elements===true;var i=/\s*,\s*/,m=void 0;for(m in F){f[m]=h(f[m],i)||null;var p=f,j=I[m],s=h(f[I[m]],i),v=f[m],k=[],D=true,u=void 0;s?D=false:s={};for(u in v)if(u.charAt(0)=="!"){u=u.slice(1);k.push(u);s[u]=true;D=false}for(;u=k.pop();){v[u]=v["!"+u];delete v["!"+u]}p[j]=(D?false:s)||null}f.match=f.match||null;d.push(l);a.push(l)}for(var b=e.elements,e=e.generic,A,c=0,d=a.length;c<d;++c){g=G(a[c]);l=g.classes===true||g.styles===true||g.attributes===true;f=g;m=j=i=void 0;for(i in F)f[i]=t(f[i]);
p=true;for(m in I){i=I[m];j=f[i];s=[];v=void 0;for(v in j)v.indexOf("*")>-1?s.push(RegExp("^"+v.replace(/\*/g,".*")+"$")):s.push(v);j=s;if(j.length){f[i]=j;p=false}}f.nothingRequired=p;f.noProperties=!(f.attributes||f.classes||f.styles);if(g.elements===true||g.elements===null)e[l?"unshift":"push"](g);else{f=g.elements;delete g.elements;for(A in f)if(b[A])b[A][l?"unshift":"push"](g);else b[A]=[g]}}}function f(a,c,d,e){if(!a.match||a.match(c))if(e||i(a,c)){if(!a.propertiesOnly)d.valid=true;if(!d.allAttributes)d.allAttributes=
b(a.attributes,c.attributes,d.validAttributes);if(!d.allStyles)d.allStyles=b(a.styles,c.styles,d.validStyles);if(!d.allClasses){a=a.classes;c=c.classes;e=d.validClasses;if(a)if(a===true)a=true;else{for(var h=0,g=c.length,l;h<g;++h){l=c[h];e[l]||(e[l]=a(l))}a=false}else a=false;d.allClasses=a}}}function b(a,b,c){if(!a)return false;if(a===true)return true;for(var d in b)c[d]||(c[d]=a(d));return false}function e(a,b,c){if(!a.match||a.match(b)){if(a.noProperties)return false;c.hadInvalidAttribute=d(a.attributes,
b.attributes)||c.hadInvalidAttribute;c.hadInvalidStyle=d(a.styles,b.styles)||c.hadInvalidStyle;a=a.classes;b=b.classes;if(a){for(var e=false,h=a===true,g=b.length;g--;)if(h||a(b[g])){b.splice(g,1);e=true}a=e}else a=false;c.hadInvalidClass=a||c.hadInvalidClass}}function d(a,b){if(!a)return false;var c=false,d=a===true,e;for(e in b)if(d||a(e)){delete b[e];c=true}return c}function c(a,b,c){if(a.disabled||a.customConfig&&!c||!b)return false;a._.cachedChecks={};return true}function h(a,b){if(!a)return false;
if(a===true)return a;if(typeof a=="string"){a=C(a);return a=="*"?true:CKEDITOR.tools.convertArrayToObject(a.split(b))}if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a):false;var c={},d=0,e;for(e in a){c[e]=a[e];d++}return d?c:false}function i(a,b){if(a.nothingRequired)return true;var c,d,e,h;if(e=a.requiredClasses){h=b.classes;for(c=0;c<e.length;++c){d=e[c];if(typeof d=="string"){if(CKEDITOR.tools.indexOf(h,d)==-1)return false}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(h,
d))return false}}return g(b.styles,a.requiredStyles)&&g(b.attributes,a.requiredAttributes)}function g(a,b){if(!b)return true;for(var c=0,d;c<b.length;++c){d=b[c];if(typeof d=="string"){if(!(d in a))return false}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,d))return false}return true}function j(a){if(!a)return{};for(var a=a.split(/\s*,\s*/).sort(),b={};a.length;)b[a.shift()]=E;return b}function k(a){for(var b,c,d,e,h={},g=1,a=C(a);b=a.match(H);){if(c=b[2]){d=n(c,"styles");e=n(c,"attrs");
c=n(c,"classes")}else d=e=c=null;h["$"+g++]={elements:b[1],classes:c,styles:d,attributes:e};a=a.slice(b[0].length)}return h}function n(a,b){var c=a.match(O[b]);return c?C(c[1]):null}function o(a){var b=a.styleBackup=a.attributes.style,c=a.classBackup=a.attributes["class"];if(!a.styles)a.styles=CKEDITOR.tools.parseCssText(b||"",1);if(!a.classes)a.classes=c?c.split(/\s+/):[]}function q(a,b,c,d){var h=0,g;if(d.toHtml)b.name=b.name.replace(L,"$1");if(d.doCallbacks&&a.elementCallbacks){a:for(var l=a.elementCallbacks,
i=0,p=l.length,j;i<p;++i)if(j=l[i](b)){g=j;break a}if(g)return g}if(d.doTransform)if(g=a._.transformations[b.name]){o(b);for(l=0;l<g.length;++l)u(a,b,g[l]);m(b)}if(d.doFilter){a:{l=b.name;i=a._;a=i.allowedRules.elements[l];g=i.allowedRules.generic;l=i.disallowedRules.elements[l];i=i.disallowedRules.generic;p=d.skipRequired;j={valid:false,validAttributes:{},validClasses:{},validStyles:{},allAttributes:false,allClasses:false,allStyles:false,hadInvalidAttribute:false,hadInvalidClass:false,hadInvalidStyle:false};
var s,t;if(!a&&!g)a=null;else{o(b);if(l){s=0;for(t=l.length;s<t;++s)if(e(l[s],b,j)===false){a=null;break a}}if(i){s=0;for(t=i.length;s<t;++s)e(i[s],b,j)}if(a){s=0;for(t=a.length;s<t;++s)f(a[s],b,j,p)}if(g){s=0;for(t=g.length;s<t;++s)f(g[s],b,j,p)}a=j}}if(!a){c.push(b);return B}if(!a.valid){c.push(b);return B}t=a.validAttributes;var k=a.validStyles;g=a.validClasses;var l=b.attributes,D=b.styles,i=b.classes,p=b.classBackup,A=b.styleBackup,F,r,n=[];j=[];var H=/^data-cke-/;s=false;delete l.style;delete l["class"];
delete b.classBackup;delete b.styleBackup;if(!a.allAttributes)for(F in l)if(!t[F])if(H.test(F)){if(F!=(r=F.replace(/^data-cke-saved-/,""))&&!t[r]){delete l[F];s=true}}else{delete l[F];s=true}if(!a.allStyles||a.hadInvalidStyle){for(F in D)a.allStyles||k[F]?n.push(F+":"+D[F]):s=true;if(n.length)l.style=n.sort().join("; ")}else if(A)l.style=A;if(!a.allClasses||a.hadInvalidClass){for(F=0;F<i.length;++F)(a.allClasses||g[i[F]])&&j.push(i[F]);j.length&&(l["class"]=j.sort().join(" "));p&&j.length<p.split(/\s+/).length&&
(s=true)}else p&&(l["class"]=p);s&&(h=B);if(!d.skipFinalValidation&&!v(b)){c.push(b);return B}}if(d.toHtml)b.name=b.name.replace(K,"cke:$1");return h}function l(a){var b=[],c;for(c in a)c.indexOf("*")>-1&&b.push(c.replace(/\*/g,".*"));return b.length?RegExp("^(?:"+b.join("|")+")$"):null}function m(a){var b=a.attributes,c;delete b.style;delete b["class"];if(c=CKEDITOR.tools.writeCssText(a.styles,true))b.style=c;a.classes.length&&(b["class"]=a.classes.sort().join(" "))}function v(a){switch(a.name){case "a":if(!a.children.length&&
!a.attributes.name)return false;break;case "img":if(!a.attributes.src)return false}return true}function t(a){if(!a)return false;if(a===true)return true;var b=l(a);return function(c){return c in a||b&&c.match(b)}}function s(){return new CKEDITOR.htmlParser.element("br")}function p(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.name=="br"||z.$block[a.name])}function A(a,b,c){var d=a.name;if(z.$empty[d]||!a.children.length)if(d=="hr"&&b=="br")a.replaceWith(s());else{a.parent&&c.push({check:"it",el:a.parent});
a.remove()}else if(z.$block[d]||d=="tr")if(b=="br"){if(a.previous&&!p(a.previous)){b=s();b.insertBefore(a)}if(a.next&&!p(a.next)){b=s();b.insertAfter(a)}a.replaceWithChildren()}else{var d=a.children,e;b:{e=z[b];for(var h=0,g=d.length,l;h<g;++h){l=d[h];if(l.type==CKEDITOR.NODE_ELEMENT&&!e[l.name]){e=false;break b}}e=true}if(e){a.name=b;a.attributes={};c.push({check:"parent-down",el:a})}else{e=a.parent;for(var h=e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||e.name=="body",f,g=d.length;g>0;){l=d[--g];if(h&&
(l.type==CKEDITOR.NODE_TEXT||l.type==CKEDITOR.NODE_ELEMENT&&z.$inline[l.name])){if(!f){f=new CKEDITOR.htmlParser.element(b);f.insertAfter(a);c.push({check:"parent-down",el:f})}f.add(l,0)}else{f=null;l.insertAfter(a);e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(l.type==CKEDITOR.NODE_ELEMENT&&!z[e.name][l.name])&&c.push({check:"el-up",el:l})}}a.remove()}}else if(d=="style")a.remove();else{a.parent&&c.push({check:"it",el:a.parent});a.replaceWithChildren()}}function u(a,b,c){var d,e;for(d=0;d<c.length;++d){e=
c[d];if((!e.check||a.check(e.check,false))&&(!e.left||e.left(b))){e.right(b,J);break}}}function w(a,b){var c=b.getDefinition(),d=c.attributes,e=c.styles,h,g,l,f;if(a.name!=c.element)return false;for(h in d)if(h=="class"){c=d[h].split(/\s+/);for(l=a.classes.join("|");f=c.pop();)if(l.indexOf(f)==-1)return false}else if(a.attributes[h]!=d[h])return false;for(g in e)if(a.styles[g]!=e[g])return false;return true}function r(a,b){var c,d;if(typeof a=="string")c=a;else if(a instanceof CKEDITOR.style)d=a;
else{c=a[0];d=a[1]}return[{element:c,left:d,right:function(a,c){c.transform(a,b)}}]}function x(a){return function(b){return w(b,a)}}function y(a){return function(b,c){c[a](b)}}var z=CKEDITOR.dtd,B=1,G=CKEDITOR.tools.copy,C=CKEDITOR.tools.trim,E="cke-test",D=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a){this.allowedContent=[];this.disallowedContent=[];this.elementCallbacks=null;this.disabled=false;this.editor=null;this.id=CKEDITOR.tools.getNextNumber();this._={allowedRules:{elements:{},
generic:[]},disallowedRules:{elements:{},generic:[]},transformations:{},cachedTests:{}};CKEDITOR.filter.instances[this.id]=this;if(a instanceof CKEDITOR.editor){a=this.editor=a;this.customConfig=true;var b=a.config.allowedContent;if(b===true)this.disabled=true;else{if(!b)this.customConfig=false;this.allow(b,"config",1);this.allow(a.config.extraAllowedContent,"extra",1);this.allow(D[a.enterMode]+" "+D[a.shiftEnterMode],"default",1);this.disallow(a.config.disallowedContent)}}else{this.customConfig=
false;this.allow(a,"default",1)}};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(b,d,e){if(!c(this,b,e))return false;var h,g;if(typeof b=="string")b=k(b);else if(b instanceof CKEDITOR.style){if(b.toAllowedContentRules)return this.allow(b.toAllowedContentRules(this.editor),d,e);h=b.getDefinition();b={};e=h.attributes;b[h.element]=h={styles:h.styles,requiredStyles:h.styles&&CKEDITOR.tools.objectKeys(h.styles)};if(e){e=G(e);h.classes=e["class"]?e["class"].split(/\s+/):null;h.requiredClasses=
h.classes;delete e["class"];h.attributes=e;h.requiredAttributes=e&&CKEDITOR.tools.objectKeys(e)}}else if(CKEDITOR.tools.isArray(b)){for(h=0;h<b.length;++h)g=this.allow(b[h],d,e);return g}a(this,b,d,this.allowedContent,this._.allowedRules);return true},applyTo:function(a,b,c,d){if(this.disabled)return false;var e=this,h=[],g=this.editor&&this.editor.config.protectedSource,l,f=false,i={doFilter:!c,doTransform:true,doCallbacks:true,toHtml:b};a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if(a.attributes["data-cke-filter"]==
"off")return false;if(!b||!(a.name=="span"&&~CKEDITOR.tools.objectKeys(a.attributes).join("|").indexOf("data-cke-"))){l=q(e,a,h,i);if(l&B)f=true;else if(l&2)return false}}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var c;a:{var d=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));c=[];var m,p,j;if(g)for(p=0;p<g.length;++p)if((j=d.match(g[p]))&&j[0].length==d.length){c=true;break a}d=CKEDITOR.htmlParser.fragment.fromHtml(d);d.children.length==1&&(m=
d.children[0]).type==CKEDITOR.NODE_ELEMENT&&q(e,m,c,i);c=!c.length}c||h.push(a)}},null,true);h.length&&(f=true);for(var m,a=[],d=D[d||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];c=h.pop();)c.type==CKEDITOR.NODE_ELEMENT?A(c,d,a):c.remove();for(;m=a.pop();){c=m.el;if(c.parent)switch(m.check){case "it":z.$removeEmpty[c.name]&&!c.children.length?A(c,d,a):v(c)||A(c,d,a);break;case "el-up":c.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&!z[c.parent.name][c.name]&&A(c,d,a);break;case "parent-down":c.parent.type!=
CKEDITOR.NODE_DOCUMENT_FRAGMENT&&!z[c.parent.name][c.name]&&A(c.parent,d,a)}}return f},checkFeature:function(a){if(this.disabled||!a)return true;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=true},disallow:function(b){if(!c(this,b,true))return false;typeof b=="string"&&(b=k(b));a(this,b,null,this.disallowedContent,this._.disallowedRules);return true},addContentForms:function(a){if(!this.disabled&&a){var b,c,d=[],
e;for(b=0;b<a.length&&!e;++b){c=a[b];if((typeof c=="string"||c instanceof CKEDITOR.style)&&this.check(c))e=c}if(e){for(b=0;b<a.length;++b)d.push(r(a[b],e));this.addTransformations(d)}}},addElementCallback:function(a){if(!this.elementCallbacks)this.elementCallbacks=[];this.elementCallbacks.push(a)},addFeature:function(a){if(this.disabled||!a)return true;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):true},addTransformations:function(a){var b,c;if(!this.disabled&&a){var d=this._.transformations,e;for(e=0;e<a.length;++e){b=a[e];var h=void 0,g=void 0,l=void 0,f=void 0,i=void 0,m=void 0;c=[];for(g=0;g<b.length;++g){l=b[g];if(typeof l=="string"){l=l.split(/\s*:\s*/);f=l[0];i=null;m=l[1]}else{f=l.check;i=l.left;m=l.right}if(!h){h=l;h=h.element?h.element:f?f.match(/^([a-z0-9]+)/i)[0]:h.left.getDefinition().element}i instanceof
CKEDITOR.style&&(i=x(i));c.push({check:f==h?null:f,left:i,right:typeof m=="string"?y(m):m})}b=h;d[b]||(d[b]=[]);d[b].push(c)}}},check:function(a,b,c){if(this.disabled)return true;if(CKEDITOR.tools.isArray(a)){for(var d=a.length;d--;)if(this.check(a[d],b,c))return true;return false}var e,h;if(typeof a=="string"){h=a+"<"+(b===false?"0":"1")+(c?"1":"0")+">";if(h in this._.cachedChecks)return this._.cachedChecks[h];d=k(a).$1;e=d.styles;var l=d.classes;d.name=d.elements;d.classes=l=l?l.split(/\s*,\s*/):
[];d.styles=j(e);d.attributes=j(d.attributes);d.children=[];l.length&&(d.attributes["class"]=l.join(" "));if(e)d.attributes.style=CKEDITOR.tools.writeCssText(d.styles);e=d}else{d=a.getDefinition();e=d.styles;l=d.attributes||{};if(e){e=G(e);l.style=CKEDITOR.tools.writeCssText(e,true)}else e={};e={name:d.element,attributes:l,classes:l["class"]?l["class"].split(/\s+/):[],styles:e,children:[]}}var l=CKEDITOR.tools.clone(e),g=[],f;if(b!==false&&(f=this._.transformations[e.name])){for(d=0;d<f.length;++d)u(this,
e,f[d]);m(e)}q(this,l,g,{doFilter:true,doTransform:b!==false,skipRequired:!c,skipFinalValidation:!c});b=g.length>0?false:CKEDITOR.tools.objectCompare(e.attributes,l.attributes,true)?true:false;typeof a=="string"&&(this._.cachedChecks[h]=b);return b},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,d){var e=a.slice(),h;if(this.check(D[c]))return c;for(d||(e=e.reverse());h=e.pop();)if(this.check(h))return b[h];
return CKEDITOR.ENTER_BR}}()};var F={styles:1,attributes:1,classes:1},I={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},H=/^([a-z0-9*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,O={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},L=/^cke:(object|embed|param)$/,K=/^(object|embed|param)$/,J=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,
"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,b,c){c=c||b;if(!(c in a.styles)){var d=a.attributes[b];if(d){/^\d+$/.test(d)&&(d=d+"px");a.styles[c]=d}}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var d=a.styles[b],e=d&&d.match(/^(\d+)(?:\.\d*)?px$/);e?a.attributes[c]=e[1]:d==E&&(a.attributes[c]=E)}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in a.styles)){var b=
a.attributes.align;if(b=="left"||b=="right")a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in a.attributes)){var b=a.styles["float"];if(b=="left"||b=="right")a.attributes.align=b}delete a.styles["float"]},matchesStyle:w,transform:function(a,b){if(typeof b=="string")a.name=b;else{var c=b.getDefinition(),d=c.styles,e=c.attributes,h,l,g,f;a.name=c.element;for(h in e)if(h=="class"){c=a.classes.join("|");for(g=e[h].split(/\s+/);f=g.pop();)c.indexOf(f)==-1&&
a.classes.push(f)}else a.attributes[h]=e[h];for(l in d)a.styles[l]=d[l]}}}}(),function(){CKEDITOR.focusManager=function(a){if(a.focusManager)return a.focusManager;this.hasFocus=false;this.currentActive=null;this._={editor:a};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(a){this._.timer&&clearTimeout(this._.timer);if(a)this.currentActive=a;if(!this.hasFocus&&!this._.locked){(a=CKEDITOR.currentInstance)&&a.focusManager.blur(1);this.hasFocus=true;
(a=this._.editor.container)&&a.addClass("cke_focus");this._.editor.fire("focus")}},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(a){function f(){if(this.hasFocus){this.hasFocus=false;var a=this._.editor.container;a&&a.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var b=CKEDITOR.focusManager._.blurDelay;a||!b?f.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;
f.call(this)},b,this)}},add:function(a,f){var b=a.getCustomData("focusmanager");if(!b||b!=this){b&&b.remove(a);var b="focus",e="blur";if(f)if(CKEDITOR.env.ie){b="focusin";e="focusout"}else CKEDITOR.event.useCapture=1;var d={blur:function(){a.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(a)}};a.on(b,d.focus,this);a.on(e,d.blur,this);if(f)CKEDITOR.event.useCapture=0;a.setCustomData("focusmanager",this);a.setCustomData("focusmanager_handlers",d)}},remove:function(a){a.removeCustomData("focusmanager");
var f=a.removeCustomData("focusmanager_handlers");a.removeListener("blur",f.blur);a.removeListener("focus",f.focus)}}}(),CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this},function(){var a,f=function(b){var b=b.data,d=b.getKeystroke(),c=this.keystrokes[d],h=this._.editor;a=h.fire("key",{keyCode:d,domEvent:b})===false;if(!a){c&&(a=h.execCommand(c,{from:"keystrokeHandler"})!==false);a||(a=
!!this.blockedKeystrokes[d])}a&&b.preventDefault(true);return!a},b=function(b){if(a){a=false;b.data.preventDefault(true)}};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",f,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",b,this)}}}(),function(){CKEDITOR.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es: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,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(a,f,b){if(!a||!CKEDITOR.lang.languages[a])a=this.detect(f,a);var e=this,f=function(){e[a].dir=e.rtl[a]?"rtl":"ltr";b(a,e[a])};this[a]?f():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+a+".js"),f,this)},detect:function(a,f){var b=this.languages,f=f||navigator.userLanguage||navigator.language||
a,e=f.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),d=e[1],e=e[2];b[d+"-"+e]?d=d+"-"+e:b[d]||(d=null);CKEDITOR.lang.detect=d?function(){return d}:function(a){return a};return d||a}}}(),CKEDITOR.scriptLoader=function(){var a={},f={};return{load:function(b,e,d,c){var h=typeof b=="string";h&&(b=[b]);d||(d=CKEDITOR);var i=b.length,g=[],j=[],k=function(a){e&&(h?e.call(d,a):e.call(d,g,j))};if(i===0)k(true);else{var n=function(a,b){(b?g:j).push(a);if(--i<=0){c&&CKEDITOR.document.getDocumentElement().removeStyle("cursor");
k(b)}},o=function(b,c){a[b]=1;var d=f[b];delete f[b];for(var e=0;e<d.length;e++)d[e](b,c)},q=function(b){if(a[b])n(b,true);else{var c=f[b]||(f[b]=[]);c.push(n);if(!(c.length>1)){var d=new CKEDITOR.dom.element("script");d.setAttributes({type:"text/javascript",src:b});if(e)if(CKEDITOR.env.ie&&CKEDITOR.env.version<11)d.$.onreadystatechange=function(){if(d.$.readyState=="loaded"||d.$.readyState=="complete"){d.$.onreadystatechange=null;o(b,true)}};else{d.$.onload=function(){setTimeout(function(){o(b,true)},
0)};d.$.onerror=function(){o(b,false)}}d.appendTo(CKEDITOR.document.getHead())}}};c&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var l=0;l<i;l++)q(b[l])}},queue:function(){function a(){var b;(b=e[0])&&this.load(b.scriptUrl,b.callback,CKEDITOR,0)}var e=[];return function(d,c){var h=this;e.push({scriptUrl:d,callback:function(){c&&c.apply(this,arguments);e.shift();a.call(h)}});e.length==1&&a.call(this)}}()}}(),CKEDITOR.resourceManager=function(a,f){this.basePath=a;this.fileName=
f;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}},CKEDITOR.resourceManager.prototype={add:function(a,f){if(this.registered[a])throw'[CKEDITOR.resourceManager.add] The resource name "'+a+'" is already registered.';var b=this.registered[a]=f||{};b.name=a;b.path=this.getPath(a);CKEDITOR.fire(a+CKEDITOR.tools.capitalize(this.fileName)+"Ready",b);return this.get(a)},get:function(a){return this.registered[a]||null},getPath:function(a){var f=this.externals[a];return CKEDITOR.getUrl(f&&
f.dir||this.basePath+a+"/")},getFilePath:function(a){var f=this.externals[a];return CKEDITOR.getUrl(this.getPath(a)+(f?f.file:this.fileName+".js"))},addExternal:function(a,f,b){for(var a=a.split(","),e=0;e<a.length;e++){var d=a[e];b||(f=f.replace(/[^\/]+$/,function(a){b=a;return""}));this.externals[d]={dir:f,file:b||this.fileName+".js"}}},load:function(a,f,b){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var e=this.loaded,d=this.registered,c=[],h={},i={},g=0;g<a.length;g++){var j=a[g];if(j)if(!e[j]&&
!d[j]){var k=this.getFilePath(j);c.push(k);k in h||(h[k]=[]);h[k].push(j)}else i[j]=this.get(j)}CKEDITOR.scriptLoader.load(c,function(a,c){if(c.length)throw'[CKEDITOR.resourceManager.load] Resource name "'+h[c[0]].join(",")+'" was not found at "'+c[0]+'".';for(var d=0;d<a.length;d++)for(var l=h[a[d]],g=0;g<l.length;g++){var j=l[g];i[j]=this.get(j);e[j]=1}f.call(b,i)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,
function(a){var f={};return function(b,e,d){var c={},h=function(b){a.call(this,b,function(a){CKEDITOR.tools.extend(c,a);var b=[],i;for(i in a){var n=a[i],o=n&&n.requires;if(!f[i]){if(n.icons)for(var q=n.icons.split(","),l=q.length;l--;)CKEDITOR.skin.addIcon(q[l],n.path+"icons/"+(CKEDITOR.env.hidpi&&n.hidpi?"hidpi/":"")+q[l]+".png");f[i]=1}if(o){o.split&&(o=o.split(","));for(n=0;n<o.length;n++)c[o[n]]||b.push(o[n])}}if(b.length)h.call(this,b);else{for(i in c){n=c[i];if(n.onLoad&&!n.onLoad._called){n.onLoad()===
false&&delete c[i];n.onLoad._called=1}}e&&e.call(d||window,c)}},this)};h.call(this,b)}}),CKEDITOR.plugins.setLang=function(a,f,b){var e=this.get(a),a=e.langEntries||(e.langEntries={}),e=e.lang||(e.lang=[]);e.split&&(e=e.split(","));CKEDITOR.tools.indexOf(e,f)==-1&&e.push(f);a[f]=b},CKEDITOR.ui=function(a){if(a.ui)return a.ui;this.items={};this.instances={};this.editor=a;this._={handlers:{}};return this},CKEDITOR.ui.prototype={add:function(a,f,b){b.name=a.toLowerCase();var e=this.items[a]={type:f,
command:b.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(e,b)},get:function(a){return this.instances[a]},create:function(a){var f=this.items[a],b=f&&this._.handlers[f.type],e=f&&f.command&&this.editor.getCommand(f.command),b=b&&b.create.apply(this,f.args);this.instances[a]=b;e&&e.uiItems.push(b);if(b&&!b.type)b.type=f.type;return b},addHandler:function(a,f){this._.handlers[a]=f},space:function(a){return CKEDITOR.document.getById(this.spaceId(a))},spaceId:function(a){return this.editor.id+
"_"+a}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function a(a,c,e){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);if(c!==void 0){if(c instanceof CKEDITOR.dom.element){if(!e)throw Error("One of the element modes must be specified.");}else throw Error("Expect element of type CKEDITOR.dom.element.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!(e==CKEDITOR.ELEMENT_MODE_INLINE?c.is(CKEDITOR.dtd.$editable)||
c.is("textarea"):e==CKEDITOR.ELEMENT_MODE_REPLACE?!c.is(CKEDITOR.dtd.$nonBodyContent):1))throw Error('The specified element mode is not supported on element: "'+c.getName()+'".');this.element=c;this.elementMode=e;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(c.getId()||c.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||f();this.id=CKEDITOR.tools.getNextId();this.status="unloaded";this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);
this.ui=new CKEDITOR.ui(this);this.focusManager=new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);this.on("readOnly",b);this.on("selectionChange",function(a){d(this,a.data.path)});this.on("activeFilterChange",function(){d(this,this.elementPath(),true)});this.on("mode",b);this.on("instanceReady",function(){this.config.startupFocus&&this.focus()});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){h(this,a)},0,this)}
function f(){do var a="editor"+ ++o;while(CKEDITOR.instances[a]);return a}function b(){var a=this.commands,b;for(b in a)e(this,a[b])}function e(a,b){b[b.startDisabled?"disable":a.readOnly&&!b.readOnly?"disable":b.modes[a.mode]?"enable":"disable"]()}function d(a,b,c){if(b){var d,e,h=a.commands;for(e in h){d=h[e];(c||d.contextSensitive)&&d.refresh(a,b)}}}function c(a){var b=a.config.customConfig;if(!b)return false;var b=CKEDITOR.getUrl(b),d=q[b]||(q[b]={});if(d.fn){d.fn.call(a,a.config);(CKEDITOR.getUrl(a.config.customConfig)==
b||!c(a))&&a.fireOnce("customConfigLoaded")}else CKEDITOR.scriptLoader.queue(b,function(){d.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};c(a)});return true}function h(a,b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var c in b.on)a.on(c,b.on[c]);CKEDITOR.tools.extend(a.config,b,true);delete a.config.on}c=a.config;a.readOnly=!(!c.readOnly&&!(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.is("textarea")?a.element.hasAttribute("disabled"):a.element.isReadOnly():a.elementMode==
CKEDITOR.ELEMENT_MODE_REPLACE&&a.element.hasAttribute("disabled")));a.blockless=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?!(a.element.is("textarea")||CKEDITOR.dtd[a.element.getName()].p):false;a.tabIndex=c.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:c.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:c.shiftEnterMode;if(c.skin)CKEDITOR.skinName=c.skin;a.fireOnce("configLoaded");a.dataProcessor=
new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);i(a)});if(b&&b.customConfig!=void 0)a.config.customConfig=b.customConfig;c(a)||a.fireOnce("customConfigLoaded")}function i(a){CKEDITOR.skin.loadPart("editor",function(){g(a)})}function g(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(b,c){var d=a.config.title;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(c);a.title=typeof d=="string"||d===false?d:[a.lang.editor,a.name].join(", ");if(!a.config.contentsLangDirection)a.config.contentsLangDirection=
a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir;a.fire("langLoaded");j(a)})}function j(a){a.getStylesSet(function(b){a.once("loaded",function(){a.fire("stylesSet",{styles:b})},null,null,1);k(a)})}function k(a){var b=a.config,c=b.plugins,d=b.extraPlugins,e=b.removePlugins;if(d)var h=RegExp("(?:^|,)(?:"+d.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),c=c.replace(h,""),c=c+(","+d);if(e)var g=RegExp("(?:^|,)(?:"+e.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),c=c.replace(g,"");CKEDITOR.env.air&&
(c=c+",adobeair");CKEDITOR.plugins.load(c.split(","),function(c){var d=[],e=[],h=[];a.plugins=c;for(var f in c){var i=c[f],p=i.lang,j=null,s=i.requires,t;CKEDITOR.tools.isArray(s)&&(s=s.join(","));if(s&&(t=s.match(g)))for(;s=t.pop();)CKEDITOR.tools.setTimeout(function(a,b){throw Error('Plugin "'+a.replace(",","")+'" cannot be removed from the plugins list, because it\'s required by "'+b+'" plugin.');},0,null,[s,f]);if(p&&!a.lang[f]){p.split&&(p=p.split(","));if(CKEDITOR.tools.indexOf(p,a.langCode)>=
0)j=a.langCode;else{j=a.langCode.replace(/-.*/,"");j=j!=a.langCode&&CKEDITOR.tools.indexOf(p,j)>=0?j:CKEDITOR.tools.indexOf(p,"en")>=0?"en":p[0]}if(!i.langEntries||!i.langEntries[j])h.push(CKEDITOR.getUrl(i.path+"lang/"+j+".js"));else{a.lang[f]=i.langEntries[j];j=null}}e.push(j);d.push(i)}CKEDITOR.scriptLoader.load(h,function(){for(var c=["beforeInit","init","afterInit"],h=0;h<c.length;h++)for(var g=0;g<d.length;g++){var f=d[g];h===0&&(e[g]&&f.lang&&f.langEntries)&&(a.lang[f.name]=f.langEntries[e[g]]);
if(f[c[h]])f[c[h]](a)}a.fireOnce("pluginsLoaded");b.keystrokes&&a.setKeystroke(a.config.keystrokes);for(g=0;g<a.config.blockedKeystrokes.length;g++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[g]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)})})}function n(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();this.config.htmlEncodeOutput&&(b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b):
a.setHtml(b);return true}return false}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=a;var o=0,q={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(a,b){b.name=a.toLowerCase();var c=new CKEDITOR.command(this,b);this.mode&&e(this,c);return this.commands[a]=c},_attachToForm:function(){var a=this,b=a.element,c=new CKEDITOR.dom.element(b.$.form);if(b.is("textarea")&&c){var d=function(c){a.updateElement();a._.required&&(!b.getValue()&&a.fire("required")===false)&&c.data.preventDefault()};
c.on("submit",d);if(c.$.submit&&c.$.submit.call&&c.$.submit.apply)c.$.submit=CKEDITOR.tools.override(c.$.submit,function(a){return function(){d();a.apply?a.apply(this):a()}});a.on("destroy",function(){c.removeListener("submit",d)})}},destroy:function(a){this.fire("beforeDestroy");!a&&n.call(this);this.editable(null);this.status="destroyed";this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(a){if(!a){a=this.getSelection();
if(!a)return null;a=a.getStartElement()}return a?new CKEDITOR.dom.elementPath(a,this.editable()):null},createRange:function(){var a=this.editable();return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,b){var c=this.getCommand(a),d={name:a,commandData:b,command:c};if(c&&c.state!=CKEDITOR.TRISTATE_DISABLED&&this.fire("beforeCommandExec",d)!==false){d.returnValue=c.exec(d.commandData);if(!c.async&&this.fire("afterCommandExec",d)!==false)return d.returnValue}return false},getCommand:function(a){return this.commands[a]},
getData:function(a){!a&&this.fire("beforeGetData");var b=this._.data;if(typeof b!="string")b=(b=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?b.is("textarea")?b.getValue():b.getHtml():"";b={dataValue:b};!a&&this.fire("getData",b);return b.dataValue},getSnapshot:function(){var a=this.fire("getSnapshot");if(typeof a!="string"){var b=this.element;b&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(a=b.is("textarea")?b.getValue():b.getHtml())}return a},loadSnapshot:function(a){this.fire("loadSnapshot",
a)},setData:function(a,b,c){!c&&this.fire("saveSnapshot");if(b||!c)this.once("dataReady",function(a){c||this.fire("saveSnapshot");b&&b.call(a.editor)});a={dataValue:a};!c&&this.fire("setData",a);this._.data=a.dataValue;!c&&this.fire("afterSetData",a)},setReadOnly:function(a){a=a==void 0||a;if(this.readOnly!=a){this.readOnly=a;this.keystrokeHandler.blockedKeystrokes[8]=+a;this.editable().setReadOnly(a);this.fire("readOnly")}},insertHtml:function(a,b){this.fire("insertHtml",{dataValue:a,mode:b})},insertText:function(a){this.fire("insertText",
a)},insertElement:function(a){this.fire("insertElement",a)},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return this.status=="ready"&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return n.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],c,d,e=b.length;e--;){c=b[e];d=0;if(CKEDITOR.tools.isArray(c)){d=
c[1];c=c[0]}d?a[c]=d:delete a[c]}},addFeature:function(a){return this.filter.addFeature(a)},setActiveFilter:function(a){if(!a)a=this.filter;if(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,true))}},setActiveEnterMode:function(a,b){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;b=b?this.blockless?CKEDITOR.ENTER_BR:
b:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=b){this.activeEnterMode=a;this.activeShiftEnterMode=b;this.fire("activeEnterModeChange")}}})}(),CKEDITOR.ELEMENT_MODE_NONE=0,CKEDITOR.ELEMENT_MODE_REPLACE=1,CKEDITOR.ELEMENT_MODE_APPENDTO=2,CKEDITOR.ELEMENT_MODE_INLINE=3,CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:RegExp("<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)--\>)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))","g")}},function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,
f={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(b){for(var e,d,c=0,h;e=this._.htmlPartsRegex.exec(b);){d=e.index;if(d>c){c=b.substring(c,d);if(h)h.push(c);else this.onText(c)}c=this._.htmlPartsRegex.lastIndex;if(d=e[1]){d=d.toLowerCase();if(h&&CKEDITOR.dtd.$cdata[d]){this.onCDATA(h.join(""));
h=null}if(!h){this.onTagClose(d);continue}}if(h)h.push(e[0]);else if(d=e[3]){d=d.toLowerCase();if(!/="/.test(d)){var i={},g;e=e[4];var j=!!(e&&e.charAt(e.length-1)=="/");if(e)for(;g=a.exec(e);){var k=g[1].toLowerCase();g=g[2]||g[3]||g[4]||"";i[k]=!g&&f[k]?k:CKEDITOR.tools.htmlDecodeAttr(g)}this.onTagOpen(d,i,j);!h&&CKEDITOR.dtd.$cdata[d]&&(h=[])}}else if(d=e[2])this.onComment(d)}if(b.length>c)this.onText(b.substring(c,b.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._=
{output:[]}},proto:{openTag:function(a){this._.output.push("<",a)},openTagClose:function(a,f){f?this._.output.push(" />"):this._.output.push(">")},attribute:function(a,f){typeof f=="string"&&(f=CKEDITOR.tools.htmlEncodeAttr(f));this._.output.push(" ",a,'="',f,'"')},closeTag:function(a){this._.output.push("</",a,">")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("<\!--",a,"--\>")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[];this._.indent=
false},getHtml:function(a){var f=this._.output.join("");a&&this.reset();return f}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,f=CKEDITOR.tools.indexOf(a,this),b=this.previous,e=this.next;b&&(b.next=e);e&&(e.previous=b);a.splice(f,1);this.parent=null},replaceWith:function(a){var f=this.parent.children,b=CKEDITOR.tools.indexOf(f,this),e=a.previous=this.previous,d=a.next=this.next;e&&(e.next=a);d&&(d.previous=
a);f[b]=a;a.parent=this.parent;this.parent=null},insertAfter:function(a){var f=a.parent.children,b=CKEDITOR.tools.indexOf(f,a),e=a.next;f.splice(b+1,0,this);this.next=a.next;this.previous=a;a.next=this;e&&(e.previous=this);this.parent=a.parent},insertBefore:function(a){var f=a.parent.children,b=CKEDITOR.tools.indexOf(f,a);f.splice(b,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var f=typeof a=="function"?a:typeof a==
"string"?function(b){return b.name==a}:function(b){return b.name in a},b=this.parent;for(;b&&b.type==CKEDITOR.NODE_ELEMENT;){if(f(b))return b;b=b.parent}return null},wrapWith:function(a){this.replaceWith(a);a.add(this);return a},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(a){return a||{}}}}(),"use strict",CKEDITOR.htmlParser.comment=function(a){this.value=a;this._={isBlockLike:false}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,
{type:CKEDITOR.NODE_COMMENT,filter:function(a,f){var b=this.value;if(!(b=a.onComment(f,b,this))){this.remove();return false}if(typeof b!="string"){this.replaceWith(b);return false}this.value=b;return true},writeHtml:function(a,f){f&&this.filter(f);a.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:false}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,
f){if(!(this.value=a.onText(f,this.value,this))){this.remove();return false}},writeHtml:function(a,f){f&&this.filter(f);a.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})}(),"use strict",CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,
hasInlineStarted:false}},function(){function a(a){return a.attributes["data-cke-survive"]?false:a.name=="a"&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var f=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),b={ol:1,ul:1},e=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),d={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=
function(c,h,i){function g(a){var b;if(v.length>0)for(var c=0;c<v.length;c++){var d=v[c],e=d.name,h=CKEDITOR.dtd[e],g=s.name&&CKEDITOR.dtd[s.name];if((!g||g[e])&&(!a||!h||h[a]||!CKEDITOR.dtd[a])){if(!b){j();b=1}d=d.clone();d.parent=s;s=d;v.splice(c,1);c--}else if(e==s.name){n(s,s.parent,1);c--}}}function j(){for(;t.length;)n(t.shift(),s)}function k(a){if(a._.isBlockLike&&a.name!="pre"&&a.name!="textarea"){var b=a.children.length,c=a.children[b-1],d;if(c&&c.type==CKEDITOR.NODE_TEXT)(d=CKEDITOR.tools.rtrim(c.value))?
c.value=d:a.children.length=b-1}}function n(b,c,d){var c=c||s||m,e=s;if(b.previous===void 0){if(o(c,b)){s=c;l.onTagOpen(i,{});b.returnPoint=c=s}k(b);(!a(b)||b.children.length)&&c.add(b);b.name=="pre"&&(A=false);b.name=="textarea"&&(p=false)}if(b.returnPoint){s=b.returnPoint;delete b.returnPoint}else s=d?c:e}function o(a,b){if((a==m||a.name=="body")&&i&&(!a.name||CKEDITOR.dtd[a.name][i])){var c,d;return(c=b.attributes&&(d=b.attributes["data-cke-real-element-type"])?d:b.name)&&c in CKEDITOR.dtd.$inline&&
!(c in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function q(a,b){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==b||a=="dt"&&b=="dd"||a=="dd"&&b=="dt":false}var l=new CKEDITOR.htmlParser,m=h instanceof CKEDITOR.htmlParser.element?h:typeof h=="string"?new CKEDITOR.htmlParser.element(h):new CKEDITOR.htmlParser.fragment,v=[],t=[],s=m,p=m.name=="textarea",A=m.name=="pre";l.onTagOpen=function(c,d,h,i){d=new CKEDITOR.htmlParser.element(c,d);if(d.isUnknown&&h)d.isEmpty=
true;d.isOptionalClose=i;if(a(d))v.push(d);else{if(c=="pre")A=true;else{if(c=="br"&&A){s.add(new CKEDITOR.htmlParser.text("\n"));return}c=="textarea"&&(p=true)}if(c=="br")t.push(d);else{for(;;){i=(h=s.name)?CKEDITOR.dtd[h]||(s._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):e;if(!d.isUnknown&&!s.isUnknown&&!i[c])if(s.isOptionalClose)l.onTagClose(h);else if(c in b&&h in b){h=s.children;(h=h[h.length-1])&&h.name=="li"||n(h=new CKEDITOR.htmlParser.element("li"),s);!d.returnPoint&&(d.returnPoint=s);
s=h}else if(c in CKEDITOR.dtd.$listItem&&!q(c,h))l.onTagOpen(c=="li"?"ul":"dl",{},0,1);else if(h in f&&!q(c,h)){!d.returnPoint&&(d.returnPoint=s);s=s.parent}else{h in CKEDITOR.dtd.$inline&&v.unshift(s);if(s.parent)n(s,s.parent,1);else{d.isOrphan=1;break}}else break}g(c);j();d.parent=s;d.isEmpty?n(d):s=d}}};l.onTagClose=function(a){for(var b=v.length-1;b>=0;b--)if(a==v[b].name){v.splice(b,1);return}for(var c=[],d=[],e=s;e!=m&&e.name!=a;){e._.isBlockLike||d.unshift(e);c.push(e);e=e.returnPoint||e.parent}if(e!=
m){for(b=0;b<c.length;b++){var h=c[b];n(h,h.parent)}s=e;e._.isBlockLike&&j();n(e,e.parent);if(e==s)s=s.parent;v=v.concat(d)}a=="body"&&(i=false)};l.onText=function(a){if((!s._.hasInlineStarted||t.length)&&!A&&!p){a=CKEDITOR.tools.ltrim(a);if(a.length===0)return}var b=s.name,c=b?CKEDITOR.dtd[b]||(s._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):e;if(!p&&!c["#"]&&b in f){l.onTagOpen(d[b]||"");l.onText(a)}else{j();g();!A&&!p&&(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a);
if(o(s,a))this.onTagOpen(i,{},0,1);s.add(a)}};l.onCDATA=function(a){s.add(new CKEDITOR.htmlParser.cdata(a))};l.onComment=function(a){j();g();s.add(new CKEDITOR.htmlParser.comment(a))};l.parse(c);for(j();s!=m;)n(s,s.parent,1);k(m);return m};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,b){isNaN(b)&&(b=this.children.length);var d=b>0?this.children[b-1]:null;if(d){if(a._.isBlockLike&&d.type==CKEDITOR.NODE_TEXT){d.value=CKEDITOR.tools.rtrim(d.value);if(d.value.length===
0){this.children.pop();this.add(a);return}}d.next=a}a.previous=d;a.parent=this;this.children.splice(b,0,a);if(!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,false,b)},filterChildren:function(a,b,d){if(this.childrenFilteredBy!=a.id){d=this.getFilterContext(d);if(b&&!this.parent)a.onRoot(d,this);this.childrenFilteredBy=a.id;for(b=0;b<this.children.length;b++)this.children[b].filter(a,
d)===false&&b--}},writeHtml:function(a,b){b&&this.filter(b);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,b,d){var e=this.getFilterContext();if(d&&!this.parent&&b)b.onRoot(e,this);b&&this.filterChildren(b,false,e);b=0;d=this.children;for(e=d.length;b<e;b++)d[b].writeHtml(a)},forEach:function(a,b,d){if(!d&&(!b||this.type==b))var e=a(this);if(e!==false)for(var d=this.children,f=0;f<d.length;f++){e=d[f];e.type==CKEDITOR.NODE_ELEMENT?e.forEach(a,b):(!b||e.type==b)&&a(e)}},getFilterContext:function(a){return a||
{}}}}(),"use strict",function(){function a(){this.rules=[]}function f(b,e,d,c){var h,f;for(h in e){(f=b[h])||(f=b[h]=new a);f.add(e[h],d,c)}}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(b){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new a;this.attributeNameRules=new a;this.elementsRules={};this.attributesRules={};this.textRules=new a;this.commentRules=new a;this.rootRules=new a;b&&this.addRules(b,10)},proto:{addRules:function(a,e){var d;if(typeof e=="number")d=
e;else if(e&&"priority"in e)d=e.priority;typeof d!="number"&&(d=10);typeof e!="object"&&(e={});a.elementNames&&this.elementNameRules.addMany(a.elementNames,d,e);a.attributeNames&&this.attributeNameRules.addMany(a.attributeNames,d,e);a.elements&&f(this.elementsRules,a.elements,d,e);a.attributes&&f(this.attributesRules,a.attributes,d,e);a.text&&this.textRules.add(a.text,d,e);a.comment&&this.commentRules.add(a.comment,d,e);a.root&&this.rootRules.add(a.root,d,e)},applyTo:function(a){a.filter(this)},onElementName:function(a,
e){return this.elementNameRules.execOnName(a,e)},onAttributeName:function(a,e){return this.attributeNameRules.execOnName(a,e)},onText:function(a,e,d){return this.textRules.exec(a,e,d)},onComment:function(a,e,d){return this.commentRules.exec(a,e,d)},onRoot:function(a,e){return this.rootRules.exec(a,e)},onElement:function(a,e){for(var d=[this.elementsRules["^"],this.elementsRules[e.name],this.elementsRules.$],c,h=0;h<3;h++)if(c=d[h]){c=c.exec(a,e,this);if(c===false)return null;if(c&&c!=e)return this.onNode(a,
c);if(e.parent&&!e.name)break}return e},onNode:function(a,e){var d=e.type;return d==CKEDITOR.NODE_ELEMENT?this.onElement(a,e):d==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,e.value)):d==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,e.value)):null},onAttribute:function(a,e,d,c){return(d=this.attributesRules[d])?d.exec(a,c,e,this):c}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype={add:function(a,e,d){this.rules.splice(this.findIndex(e),0,{value:a,priority:e,
options:d})},addMany:function(a,e,d){for(var c=[this.findIndex(e),0],h=0,f=a.length;h<f;h++)c.push({value:a[h],priority:e,options:d});this.rules.splice.apply(this.rules,c)},findIndex:function(a){for(var e=this.rules,d=e.length-1;d>=0&&a<e[d].priority;)d--;return d+1},exec:function(a,e){var d=e instanceof CKEDITOR.htmlParser.node||e instanceof CKEDITOR.htmlParser.fragment,c=Array.prototype.slice.call(arguments,1),h=this.rules,f=h.length,g,j,k,n;for(n=0;n<f;n++){if(d){g=e.type;j=e.name}k=h[n];if(!(a.nonEditable&&
!k.options.applyToAll||a.nestedEditable&&k.options.excludeNestedEditable)){k=k.value.apply(null,c);if(k===false||d&&k&&(k.name!=j||k.type!=g))return k;k!=void 0&&(c[0]=e=k)}}return e},execOnName:function(a,e){for(var d=0,c=this.rules,h=c.length,f;e&&d<h;d++){f=c[d];!(a.nonEditable&&!f.options.applyToAll||a.nestedEditable&&f.options.excludeNestedEditable)&&(e=e.replace(f.value[0],f.value[1]))}return e}}}(),function(){function a(a,g){function f(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):
new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function i(a,d){return function(h){if(h.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var g=[],i=b(h),p,s;if(i)for(l(i,1)&&g.push(i);i;){if(c(i)&&(p=e(i))&&l(p))if((s=e(p))&&!c(s))g.push(p);else{f(j).insertAfter(p);p.remove()}i=i.previous}for(i=0;i<g.length;i++)g[i].remove();if(g=typeof d=="function"?d(h)!==false:d)if(!j&&!CKEDITOR.env.needsBrFiller&&h.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)g=false;else if(!j&&!CKEDITOR.env.needsBrFiller&&(document.documentMode>
7||h.name in CKEDITOR.dtd.tr||h.name in CKEDITOR.dtd.$listItem))g=false;else{g=b(h);g=!g||h.name=="form"&&g.name=="input"}g&&h.add(f(a))}}}function l(a,b){if((!j||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&a.name=="br"&&!a.attributes["data-cke-eol"])return true;var d;if(a.type==CKEDITOR.NODE_TEXT&&(d=a.value.match(v))){if(d.index){(new CKEDITOR.htmlParser.text(a.value.substring(0,d.index))).insertBefore(a);a.value=d[0]}if(!CKEDITOR.env.needsBrFiller&&j&&(!b||a.parent.name in m))return true;
if(!j)if((d=a.previous)&&d.name=="br"||!d||c(d))return true}return false}var p={elements:{}},j=g=="html",m=CKEDITOR.tools.extend({},A),k;for(k in m)"#"in s[k]||delete m[k];for(k in m)p.elements[k]=i(j,a.config.fillEmptyBlocks!==false);p.root=i(j);p.elements.br=function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var g=b.attributes;if("data-cke-bogus"in g||"data-cke-eol"in g)delete g["data-cke-bogus"];else{for(g=b.next;g&&d(g);)g=g.next;var i=e(b);!g&&c(b.parent)?h(b.parent,
f(a)):c(g)&&(i&&!c(i))&&f(a).insertBefore(g)}}}}(j);return p}function f(a,b){return a!=CKEDITOR.ENTER_BR&&b!==false?a==CKEDITOR.ENTER_DIV?"div":"p":false}function b(a){for(a=a.children[a.children.length-1];a&&d(a);)a=a.previous;return a}function e(a){for(a=a.previous;a&&d(a);)a=a.previous;return a}function d(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function c(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in
A||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function h(a,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;if(c){c.next=b;b.previous=c}}function i(a){a=a.attributes;a.contenteditable!="false"&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function g(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function j(a){return a.replace(y,function(a,b,c){return"<"+b+c.replace(z,
function(a,b){return B.test(b)&&c.indexOf("data-cke-saved-"+b)==-1?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+">"})}function k(a,b){return a.replace(b,function(a,b,c){a.indexOf("<textarea")===0&&(a=b+q(c).replace(/</g,"&lt;").replace(/>/g,"&gt;")+"</textarea>");return"<cke:encoded>"+encodeURIComponent(a)+"</cke:encoded>"})}function n(a){return a.replace(E,function(a,b){return decodeURIComponent(b)})}function o(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,function(a){return"<\!--"+
t+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function q(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function l(a,b){var c=b._.dataStore;return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function m(a,b){for(var c=[],d=b.config.protectedSource,e=b._.dataStore||(b._.dataStore={id:1}),h=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,
d=[/<script[\s\S]*?<\/script>/gi,/<noscript[\s\S]*?<\/noscript>/gi].concat(d),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(c.push(a)-1)+"--\>"}),g=0;g<d.length;g++)a=a.replace(d[g],function(a){a=a.replace(h,function(a,b,d){return c[d]});return/cke_temp(comment)?/.test(a)?a:"<\!--{cke_temp}"+(c.push(a)-1)+"--\>"});a=a.replace(h,function(a,b,d){return"<\!--"+t+(b?"{C}":"")+encodeURIComponent(c[d]).replace(/--/g,"%2D%2D")+"--\>"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=>]+))+\s*>/g,
function(a){return a.replace(/<\!--\{cke_protected\}([^>]*)--\>/g,function(a,b){e[e.id]=decodeURIComponent(b);return"{cke_protected_"+e.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,d,e){return"<"+c+d+">"+l(q(e),b)+"</"+c+">"})}CKEDITOR.htmlDataProcessor=function(b){var c,d,e=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=d=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(u);
c.addRules(w,{applyToAll:true});c.addRules(a(b,"data"),{applyToAll:true});d.addRules(r);d.addRules(x,{applyToAll:true});d.addRules(a(b,"html"),{applyToAll:true});b.on("toHtml",function(a){var a=a.data,c=a.dataValue,c=m(c,b),c=k(c,C),c=j(c),c=k(c,G),c=c.replace(D,"$1cke:$2"),c=c.replace(I,"<cke:$1$2></cke:$1>"),c=c.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2"),d=a.context||b.editable().getName(),e;if(CKEDITOR.env.ie&&CKEDITOR.env.version<
9&&d=="pre"){d="div";c="<pre>"+c+"</pre>";e=1}d=b.document.createElement(d);d.setHtml("a"+c);c=d.getHtml().substr(1);c=c.replace(RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");e&&(c=c.replace(/^<pre>|<\/pre>$/gi,""));c=c.replace(F,"$1$2");c=n(c);c=q(c);a.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,a.fixForBody===false?false:f(a.enterMode,b.config.autoParagraph))},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,true,a.data.dontFilter,a.data.enterMode)&&
b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(e.dataFilter,true)},null,null,10);b.on("toHtml",function(a){var a=a.data,b=a.dataValue,c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(true);a.dataValue=o(b)},null,null,15);b.on("toDataFormat",function(a){var c=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^<br *\/?>/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,f(a.data.enterMode,
b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(e.htmlFilter,true)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,false,true)},null,null,11);b.on("toDataFormat",function(a){var c=a.data.dataValue,d=e.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(true);c=q(c);c=l(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var e=this.editor,h,g,f;if(b&&typeof b==
"object"){h=b.context;c=b.fixForBody;d=b.dontFilter;g=b.filter;f=b.enterMode}else h=b;!h&&h!==null&&(h=e.editable().getName());return e.fire("toHtml",{dataValue:a,context:h,fixForBody:c,dontFilter:d,filter:g||e.filter,enterMode:f||e.enterMode}).dataValue},toDataFormat:function(a,b){var c,d,e;if(b){c=b.context;d=b.filter;e=b.enterMode}!c&&c!==null&&(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:d||this.editor.filter,context:c,enterMode:e||this.editor.enterMode}).dataValue}};
var v=/(?:&nbsp;|\xa0)$/,t="{cke_protected}",s=CKEDITOR.dtd,p=["caption","colgroup","col","thead","tfoot","tbody"],A=CKEDITOR.tools.extend({},s.$blockLimit,s.$block),u={elements:{input:i,textarea:i}},w={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},r={elements:{embed:function(a){var b=a.parent;if(b&&b.name=="object"){var c=b.attributes.width,b=b.attributes.height;if(c)a.attributes.width=c;if(b)a.attributes.height=b}},a:function(a){if(!a.children.length&&!a.attributes.name&&
!a.attributes["data-cke-saved-name"])return false}}},x={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return false;for(var c=["name","href","src"],d,e=0;e<c.length;e++){d="data-cke-saved-"+c[e];d in b&&delete b[c[e]]}}return a},table:function(a){a.children.slice(0).sort(function(a,b){var c,d;if(a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type){c=
CKEDITOR.tools.indexOf(p,a.name);d=CKEDITOR.tools.indexOf(p,b.name)}if(!(c>-1&&d>-1&&c!=d)){c=a.parent?a.getIndex():-1;d=b.parent?b.getIndex():-1}return c>d?1:-1})},param:function(a){a.children=[];a.isEmpty=true;return a},span:function(a){a.attributes["class"]=="Apple-style-span"&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0];
if(b&&b.value)b.value=CKEDITOR.tools.trim(b.value);if(!a.attributes.type)a.attributes.type="text/css"},title:function(a){var b=a.children[0];!b&&h(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:g,textarea:g},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||false}}};if(CKEDITOR.env.ie)x.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})};var y=/<(a|area|img|input|source)\b([^>]*)>/gi,
z=/([\w-]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,B=/^(href|src|name)$/i,G=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,C=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,E=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,D=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,F=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,I=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi}(),"use strict",CKEDITOR.htmlParser.element=function(a,f){this.name=a;this.attributes=
f||{};this.children=[];var b=a||"",e=b.match(/^cke:(.*)/);e&&(b=e[1]);b=!(!CKEDITOR.dtd.$nonBodyContent[b]&&!CKEDITOR.dtd.$block[b]&&!CKEDITOR.dtd.$listItem[b]&&!CKEDITOR.dtd.$tableContent[b]&&!(CKEDITOR.dtd.$nonEditable[b]||b=="br"));this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:b,hasInlineStarted:this.isEmpty||!b}},CKEDITOR.htmlParser.cssStyle=function(a){var f={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/&quot;/g,
'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,e,d){e=="font-family"&&(d=d.replace(/["']/g,""));f[e.toLowerCase()]=d});return{rules:f,populate:function(a){var e=this.toString();if(e)a instanceof CKEDITOR.dom.element?a.setAttribute("style",e):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=e:a.style=e},toString:function(){var a=[],e;for(e in f)f[e]&&a.push(e,":",f[e],";");return a.join("")}}},function(){function a(a){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&
(typeof a=="string"?b.name==a:b.name in a)}}var f=function(a,b){a=a[0];b=b[0];return a<b?-1:a>b?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var c=this,h,f,b=c.getFilterContext(b);if(b.off)return true;if(!c.parent)a.onRoot(b,c);for(;;){h=c.name;if(!(f=a.onElementName(b,
h))){this.remove();return false}c.name=f;if(!(c=a.onElement(b,c))){this.remove();return false}if(c!==this){this.replaceWith(c);return false}if(c.name==h)break;if(c.type!=CKEDITOR.NODE_ELEMENT){this.replaceWith(c);return false}if(!c.name){this.replaceWithChildren();return false}}h=c.attributes;var g,j;for(g in h){j=g;for(f=h[g];;)if(j=a.onAttributeName(b,g))if(j!=g){delete h[g];g=j}else break;else{delete h[g];break}j&&((f=a.onAttribute(b,c,j,f))===false?delete h[j]:h[j]=f)}c.isEmpty||this.filterChildren(a,
false,b);return true},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var c=this.name,h=[],i=this.attributes,g,j;a.openTag(c,i);for(g in i)h.push([g,i[g]]);a.sortAttributes&&h.sort(f);g=0;for(j=h.length;g<j;g++){i=h[g];a.attribute(i[0],i[1])}a.openTagClose(c,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(c)},writeChildrenHtml:b.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,b=a.length;b;)a[--b].insertAfter(this);this.remove()},
forEach:b.forEach,getFirst:function(b){if(!b)return this.children.length?this.children[0]:null;typeof b!="function"&&(b=a(b));for(var d=0,c=this.children.length;d<c;++d)if(b(this.children[d]))return this.children[d];return null},getHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml(a);return a.getHtml()},setHtml:function(a){for(var a=this.children=CKEDITOR.htmlParser.fragment.fromHtml(a).children,b=0,c=a.length;b<c;++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),c=this.clone(),h=0;h<b.length;++h)b[h].parent=c;c.children=b;if(b[0])b[0].previous=null;if(a>0)this.children[a-1].next=null;this.parent.add(c,this.getIndex()+1);return c},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"];if(b)(b=
CKEDITOR.tools.trim(b.replace(RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=b:delete this.attributes["class"]},hasClass:function(a){var b=this.attributes["class"];return!b?false:RegExp("(?:^|\\s)"+a+"(?=\\s|$)").test(b)},getFilterContext:function(a){var b=[];a||(a={off:false,nonEditable:false,nestedEditable:false});!a.off&&this.attributes["data-cke-processor"]=="off"&&b.push("off",true);!a.nonEditable&&this.attributes.contenteditable=="false"?b.push("nonEditable",true):a.nonEditable&&
(!a.nestedEditable&&this.attributes.contenteditable=="true")&&b.push("nestedEditable",true);if(b.length)for(var a=CKEDITOR.tools.copy(a),c=0;c<b.length;c=c+2)a[b[c]]=b[c+1];return a}},true)}(),function(){var a={},f=/{([^}]+)}/g,b=/([\\'])/g,e=/\n/g,d=/\r/g;CKEDITOR.template=function(c){if(a[c])this.output=a[c];else{var h=c.replace(b,"\\$1").replace(e,"\\n").replace(d,"\\r").replace(f,function(a,b){return"',data['"+b+"']==undefined?'{"+b+"}':data['"+b+"'],'"});this.output=a[c]=Function("data","buffer",
"return buffer?buffer.push('"+h+"'):['"+h+"'].join('');")}}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(a){CKEDITOR.instances[a.name]=a;a.on("focus",function(){if(CKEDITOR.currentInstance!=a){CKEDITOR.currentInstance=a;CKEDITOR.fire("currentInstance")}});a.on("blur",function(){if(CKEDITOR.currentInstance==a){CKEDITOR.currentInstance=null;CKEDITOR.fire("currentInstance")}});CKEDITOR.fire("instance",null,a)},CKEDITOR.remove=
function(a){delete CKEDITOR.instances[a.name]},function(){var a={};CKEDITOR.addTemplate=function(f,b){var e=a[f];if(e)return e;e={name:f,source:b};CKEDITOR.fire("template",e);return a[f]=new CKEDITOR.template(e.source)};CKEDITOR.getTemplate=function(f){return a[f]}}(),function(){var a=[];CKEDITOR.addCss=function(f){a.push(f)};CKEDITOR.getCss=function(){return a.join("\n")}}(),CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")}),CKEDITOR.TRISTATE_ON=
1,CKEDITOR.TRISTATE_OFF=2,CKEDITOR.TRISTATE_DISABLED=0,function(){CKEDITOR.inline=function(a,f){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var b=new CKEDITOR.editor(f,a,CKEDITOR.ELEMENT_MODE_INLINE),e=a.is("textarea")?a:null;if(e){b.setData(e.getValue(),null,true);a=CKEDITOR.dom.element.createFromHtml('<div contenteditable="'+!!b.readOnly+'" class="cke_textarea_inline">'+
e.getValue()+"</div>",CKEDITOR.document);a.insertAfter(e);e.hide();e.$.form&&b._attachToForm()}else b.setData(a.getHtml(),null,true);b.on("loaded",function(){b.fire("uiReady");b.editable(a);b.container=a;b.setData(b.getData(1));b.resetDirty();b.fire("contentDom");b.mode="wysiwyg";b.fire("mode");b.status="ready";b.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,b)},null,null,1E4);b.on("destroy",function(){if(e){b.container.clearCustomData();b.container.remove();e.show()}b.element.clearCustomData();
delete b.element});return b};CKEDITOR.inlineAll=function(){var a,f,b;for(b in CKEDITOR.dtd.$editable)for(var e=CKEDITOR.document.getElementsByTag(b),d=0,c=e.count();d<c;d++){a=e.getItem(d);if(a.getAttribute("contenteditable")=="true"){f={element:a,config:{}};CKEDITOR.fire("inline",f)!==false&&CKEDITOR.inline(a,f.config)}}};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function a(a,c,e,i){if(!CKEDITOR.env.isCompatible)return null;
a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var g=new CKEDITOR.editor(c,a,i);if(i==CKEDITOR.ELEMENT_MODE_REPLACE){a.setStyle("visibility","hidden");g._.required=a.hasAttribute("required");a.removeAttribute("required")}e&&g.setData(e,null,true);g.on("loaded",function(){b(g);i==CKEDITOR.ELEMENT_MODE_REPLACE&&(g.config.autoUpdateElement&&a.$.form)&&g._attachToForm();g.setMode(g.config.startupMode,function(){g.resetDirty();
g.status="ready";g.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,g)})});g.on("destroy",f);return g}function f(){var a=this.container,b=this.element;if(a){a.clearCustomData();a.remove()}if(b){b.clearCustomData();if(this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE){b.show();this._.required&&b.setAttribute("required","required")}delete this.element}}function b(a){var b=a.name,h=a.element,f=a.elementMode,g=a.fire("uiSpace",{space:"top",html:""}).html,j=a.fire("uiSpace",{space:"bottom",html:""}).html;
e||(e=CKEDITOR.addTemplate("maincontainer",'<{outerEl} id="cke_{name}" class="{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'"  dir="{langDir}" lang="{langCode}" role="application" aria-labelledby="cke_{name}_arialbl"><span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span><{outerEl} class="cke_inner cke_reset" role="presentation">{topHtml}<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation"></{outerEl}>{bottomHtml}</{outerEl}></{outerEl}>'));
b=CKEDITOR.dom.element.createFromHtml(e.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:[a.lang.editor,a.name].join(", "),topHtml:g?'<span id="'+a.ui.spaceId("top")+'" class="cke_top cke_reset_all" role="presentation" style="height:auto">'+g+"</span>":"",contentId:a.ui.spaceId("contents"),bottomHtml:j?'<span id="'+a.ui.spaceId("bottom")+'" class="cke_bottom cke_reset_all" role="presentation">'+j+"</span>":"",outerEl:CKEDITOR.env.ie?"span":"div"}));if(f==CKEDITOR.ELEMENT_MODE_REPLACE){h.hide();
b.insertAfter(h)}else h.append(b);a.container=b;g&&a.ui.space("top").unselectable();j&&a.ui.space("bottom").unselectable();h=a.config.width;f=a.config.height;h&&b.setStyle("width",CKEDITOR.tools.cssLength(h));f&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(f));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(b,c){return a(b,c,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(b,c,e){return a(b,
c,e,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b<a.length;b++){var e=null,f=a[b];if(f.name||f.id){if(typeof arguments[0]=="string"){if(!RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)").test(f.className))continue}else if(typeof arguments[0]=="function"){e={};if(arguments[0](f,e)===false)continue}this.replace(f,e)}}};CKEDITOR.editor.prototype.addMode=function(a,b){(this._.modes||(this._.modes={}))[a]=b};CKEDITOR.editor.prototype.setMode=
function(a,b){var e=this,f=this._.modes;if(!(a==e.mode||!f||!f[a])){e.fire("beforeSetMode",a);if(e.mode){var g=e.checkDirty(),f=e._.previousModeData,j,k=0;e.fire("beforeModeUnload");e.editable(0);e._.previousMode=e.mode;e._.previousModeData=j=e.getData(1);if(e.mode=="source"&&f==j){e.fire("lockSnapshot",{forceUpdate:true});k=1}e.ui.space("contents").setHtml("");e.mode=""}else e._.previousModeData=e.getData(1);this._.modes[a](function(){e.mode=a;g!==void 0&&!g&&e.resetDirty();k?e.fire("unlockSnapshot"):
a=="wysiwyg"&&e.fire("saveSnapshot");setTimeout(function(){e.fire("mode");b&&b.call(e)},0)})}};CKEDITOR.editor.prototype.resize=function(a,b,e,f){var g=this.container,j=this.ui.space("contents"),k=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement,f=f?g.getChild(1):g;f.setSize("width",a,true);k&&(k.style.width="1%");j.setStyle("height",Math.max(b-(e?0:(f.$.offsetHeight||0)-(j.$.clientHeight||0)),0)+"px");k&&(k.style.width="100%");this.fire("resize")};CKEDITOR.editor.prototype.getResizable=
function(a){return a?this.ui.space("contents"):this.container};var e;CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),CKEDITOR.config.startupMode="wysiwyg",function(){function a(a){var b=a.editor,c=a.data.path,d=c.blockLimit,g=a.data.selection,h=g.getRanges()[0],i;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(g=f(g,c)){g.appendBogus();i=CKEDITOR.env.ie}if(b.config.autoParagraph!==false&&b.activeEnterMode!=CKEDITOR.ENTER_BR&&
b.editable().equals(d)&&!c.block&&h.collapsed&&!h.getCommonAncestor().isReadOnly()){c=h.clone();c.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);d=new CKEDITOR.dom.walker(c);d.guard=function(a){return!e(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()};if(!d.checkForward()||c.checkStartOfBlock()&&c.checkEndOfBlock()){b=h.fixBlock(true,b.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p");if(!CKEDITOR.env.needsBrFiller)(b=b.getFirst(e))&&(b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()).match(/^(?:&nbsp;|\xa0)$/))&&
b.remove();i=1;a.cancel()}}i&&h.select()}function f(a,b){if(a.isFake)return 0;var c=b.block||b.blockLimit,d=c&&c.getLast(e);if(c&&c.isBlockBoundary()&&(!d||!(d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()))&&!c.is("pre")&&!c.getBogus())return c}function b(a){var b=a.data.getTarget();if(b.is("input")){b=b.getAttribute("type");(b=="submit"||b=="reset")&&a.data.preventDefault()}}function e(a){return k(a)&&n(a)}function d(a,b){return function(c){var d=CKEDITOR.dom.element.get(c.data.$.toElement||
c.data.$.fromElement||c.data.$.relatedTarget);(!d||!b.equals(d)&&!b.contains(d))&&a.call(this,c)}}function c(a){var b,c=a.getRanges()[0],d=a.root,h={table:1,ul:1,ol:1,dl:1};if(c.startPath().contains(h)){var a=function(a){return function(c,d){d&&(c.type==CKEDITOR.NODE_ELEMENT&&c.is(h))&&(b=c);if(!d&&e(c)&&(!a||!g(c)))return false}},f=c.clone();f.collapse(1);f.setStartAt(d,CKEDITOR.POSITION_AFTER_START);d=new CKEDITOR.dom.walker(f);d.guard=a();d.checkBackward();if(b){f=c.clone();f.collapse();f.setEndAt(b,
CKEDITOR.POSITION_AFTER_END);d=new CKEDITOR.dom.walker(f);d.guard=a(true);b=false;d.checkForward();return b}}return null}function h(a){a.editor.focus();a.editor.fire("saveSnapshot")}function i(a){var b=a.editor;b.getSelection().scrollIntoView();setTimeout(function(){b.fire("saveSnapshot")},0)}CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,b){this.base(b.$||b);this.editor=a;this.status="unloaded";this.hasFocus=false;this.setup()},proto:{focus:function(){var a;
if(CKEDITOR.env.webkit&&!this.hasFocus){a=this.editor._.previousActive||this.getDocument().getActive();if(this.contains(a)){a.focus();return}}try{this.$[CKEDITOR.env.ie&&this.getDocument().equals(CKEDITOR.document)?"setActive":"focus"]()}catch(b){if(!CKEDITOR.env.ie)throw b;}if(CKEDITOR.env.safari&&!this.isInline()){a=CKEDITOR.document.getActive();a.equals(this.getWindow().getFrame())||this.getWindow().focus()}},on:function(a,b){var c=Array.prototype.slice.call(arguments,0);if(CKEDITOR.env.ie&&/^focus|blur$/.exec(a)){a=
a=="focus"?"focusin":"focusout";b=d(b,this);c[0]=a;c[1]=b}return CKEDITOR.dom.element.prototype.on.apply(this,c)},attachListener:function(a,b,c,d,e,h){!this._.listeners&&(this._.listeners=[]);var g=Array.prototype.slice.call(arguments,1),g=a.on.apply(a,g);this._.listeners.push(g);return g},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(b){}},restoreAttrs:function(){var a=this._.attrChanges,b,c;for(c in a)if(a.hasOwnProperty(c)){b=a[c];b!==null?this.setAttribute(c,
b):this.removeAttribute(c)}},attachClass:function(a){var b=this.getCustomData("classes");if(!this.hasClass(a)){!b&&(b=[]);b.push(a);this.setCustomData("classes",b);this.addClass(a)}},changeAttr:function(a,b){var c=this.getAttribute(a);if(b!==c){!this._.attrChanges&&(this._.attrChanges={});a in this._.attrChanges||(this._.attrChanges[a]=c);this.setAttribute(a,b)}},insertHtml:function(a,b){h(this);o(this,b||"html",a)},insertText:function(a){h(this);var b=this.editor,c=b.getSelection().getStartElement().hasAscendant("pre",
true)?CKEDITOR.ENTER_BR:b.activeEnterMode,b=c==CKEDITOR.ENTER_BR,d=CKEDITOR.tools,a=d.htmlEncode(a.replace(/\r\n/g,"\n")),a=a.replace(/\t/g,"&nbsp;&nbsp; &nbsp;"),c=c==CKEDITOR.ENTER_P?"p":"div";if(!b){var e=/\n{2}/g;if(e.test(a))var g="<"+c+">",f="</"+c+">",a=g+a.replace(e,function(){return f+g})+f}a=a.replace(/\n/g,"<br>");b||(a=a.replace(RegExp("<br>(?=</"+c+">)"),function(a){return d.repeat(a,2)}));a=a.replace(/^ | $/g,"&nbsp;");a=a.replace(/(>|\s) /g,function(a,b){return b+"&nbsp;"}).replace(/ (?=<)/g,
"&nbsp;");o(this,"text",a)},insertElement:function(a,b){b?this.insertElementIntoRange(a,b):this.insertElementIntoSelection(a)},insertElementIntoRange:function(a,b){var c=this.editor,d=c.config.enterMode,e=a.getName(),g=CKEDITOR.dtd.$block[e];if(b.checkReadOnly())return false;b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&b.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})&&q(b);var h,f;if(g)for(;(h=b.getCommonAncestor(0,1))&&(f=CKEDITOR.dtd[h.getName()])&&(!f||!f[e]);)if(h.getName()in
CKEDITOR.dtd.span)b.splitElement(h);else if(b.checkStartOfBlock()&&b.checkEndOfBlock()){b.setStartBefore(h);b.collapse(true);h.remove()}else b.splitBlock(d==CKEDITOR.ENTER_DIV?"div":"p",c.editable());b.insertNode(a);return true},insertElementIntoSelection:function(a){h(this);var b=this.editor,c=b.activeEnterMode,b=b.getSelection(),d=b.getRanges()[0],f=a.getName(),f=CKEDITOR.dtd.$block[f];if(this.insertElementIntoRange(a,d)){d.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);if(f)if((f=a.getNext(function(a){return e(a)&&
!g(a)}))&&f.type==CKEDITOR.NODE_ELEMENT&&f.is(CKEDITOR.dtd.$block))f.getDtd()["#"]?d.moveToElementEditStart(f):d.moveToElementEditEnd(a);else if(!f&&c!=CKEDITOR.ENTER_BR){f=d.fixBlock(true,c==CKEDITOR.ENTER_DIV?"div":"p");d.moveToElementEditStart(f)}}b.selectRanges([d]);i(this)},setData:function(a,b){b||(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);if(this.status=="unloaded")this.status="ready";this.editor.fire("dataReady")},getData:function(a){var b=this.getHtml();a||(b=this.editor.dataProcessor.toDataFormat(b));
return b},setReadOnly:function(a){this.setAttribute("contenteditable",!a)},detach:function(){this.removeClass("cke_editable");this.status="detached";var a=this.editor;this._.detach();delete a.document;delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||a.config.ignoreEmptyParagraph!==false&&(b=b.replace(j,function(a,b){return b}));a.setData(b,
null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&b.type=="Control"||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode)},this);this.attachListener(a,
"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");this.attachClass(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"cke_editable_inline":a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE||a.elementMode==CKEDITOR.ELEMENT_MODE_APPENDTO?"cke_editable_themed":"");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=
+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=false},null,null,-1);this.on("focus",function(){this.hasFocus=true},null,null,-1);a.focusManager.add(this);if(this.equals(CKEDITOR.document.getActive())){this.hasFocus=true;a.once("contentDom",function(){a.focusManager.focus()})}this.isInline()&&this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var d=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);
var f=a.config.contentsLangDirection;this.getDirection(1)!=f&&this.changeAttr("dir",f);var g=CKEDITOR.getCss();if(g){f=d.getHead();if(!f.getCustomData("stylesheet")){g=d.appendStyleText(g);g=new CKEDITOR.dom.element(g.ownerNode||g.owningElement);f.setCustomData("stylesheet",g);g.data("cke-temp",1)}}f=d.getCustomData("stylesheet_ref")||0;d.setCustomData("stylesheet_ref",f+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){var a=
a.data,b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&(a.$.button!=2&&b.isReadOnly())&&a.preventDefault()});var h={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return true;var d=b.data.domEvent.getKey(),e;if(d in h){var b=a.getSelection(),f,g=b.getRanges()[0],i=g.startPath(),j,m,t,d=d==8;if(CKEDITOR.env.ie&&CKEDITOR.env.version<11&&(f=b.getSelectedElement())||(f=c(b))){a.fire("saveSnapshot");g.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove();g.select();
a.fire("saveSnapshot");e=1}else if(g.collapsed)if((j=i.block)&&(t=j[d?"getPrevious":"getNext"](k))&&t.type==CKEDITOR.NODE_ELEMENT&&t.is("table")&&g[d?"checkStartOfBlock":"checkEndOfBlock"]()){a.fire("saveSnapshot");g[d?"checkEndOfBlock":"checkStartOfBlock"]()&&j.remove();g["moveToElementEdit"+(d?"End":"Start")](t);g.select();a.fire("saveSnapshot");e=1}else if(i.blockLimit&&i.blockLimit.is("td")&&(m=i.blockLimit.getAscendant("table"))&&g.checkBoundaryOfElement(m,d?CKEDITOR.START:CKEDITOR.END)&&(t=
m[d?"getPrevious":"getNext"](k))){a.fire("saveSnapshot");g["moveToElementEdit"+(d?"End":"Start")](t);g.checkStartOfBlock()&&g.checkEndOfBlock()?t.remove():g.select();a.fire("saveSnapshot");e=1}else if((m=i.contains(["td","th","caption"]))&&g.checkBoundaryOfElement(m,d?CKEDITOR.START:CKEDITOR.END))e=1}return!e});a.blockless&&(CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)&&this.attachListener(this,"keyup",function(b){if(b.data.getKeystroke()in h&&!this.getFirst(e)){this.appendBogus();b=a.createRange();
b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START);b.select()}});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return false;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this,"click",b);CKEDITOR.env.ie||this.attachListener(this,"mousedown",function(b){var c=b.data.getTarget();if(c.is("img","hr","input","textarea","select")&&!c.isReadOnly()){a.getSelection().selectElement(c);c.is("input","textarea","select")&&b.data.preventDefault()}});
CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(b.data.$.button==2){b=b.data.getTarget();if(!b.getOuterHtml().replace(j,"")){var c=a.createRange();c.moveToElementEditStart(b);c.select(true)}}});if(CKEDITOR.env.webkit){this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()});this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()})}CKEDITOR.env.webkit&&this.attachListener(a,
"key",function(b){b=b.data.domEvent.getKey();if(b in h){var b=b==8,c=a.getSelection(),d=c.getRanges()[0],e=d.startPath(),g=e.block;if(d.collapsed&&g&&d[b?"checkStartOfBlock":"checkEndOfBlock"]()&&d.moveToClosestEditablePosition(g,!b)&&d.collapsed){if(d.startContainer.type==CKEDITOR.NODE_ELEMENT){var f=d.startContainer.getChild(d.startOffset-(b?1:0));if(f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("hr")){a.fire("saveSnapshot");f.remove();a.fire("saveSnapshot");return false}}if((d=d.startPath().block)&&(!d||
!d.contains(g))){a.fire("saveSnapshot");for(var i=g.getCommonAncestor(d),j=b?g:d,f=j;(j=j.getParent())&&!i.equals(j)&&j.getChildCount()==1;)f=j;var k;(k=(b?d:g).getBogus())&&k.remove();k=c.createBookmarks();(b?g:d).moveChildren(b?d:g,false);e.lastElement.mergeSiblings();f.remove();c.selectBookmarks(k);a.fire("saveSnapshot");return false}}}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());
if(!this.is("textarea")){a=this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");if(--c)a.setCustomData("stylesheet_ref",c);else{a.removeCustomData("stylesheet_ref");b.removeCustomData("stylesheet").remove()}}}this.editor.fire("contentDomUnload");delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(arguments.length)b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,
a):(b&&b.detach(),null);return b};var g=CKEDITOR.dom.walker.bogus(),j=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,k=CKEDITOR.dom.walker.whitespaces(true),n=CKEDITOR.dom.walker.bookmark(false,true);CKEDITOR.on("instanceLoaded",function(b){var c=b.editor;c.on("insertElement",function(a){a=a.data;if(a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))){a.getAttribute("contentEditable")!="false"&&a.data("cke-editable",
a.hasAttribute("contenteditable")?"true":"1");a.setAttribute("contentEditable",false)}});c.on("selectionChange",function(b){if(!c.readOnly){var d=c.getSelection();if(d&&!d.isLocked){d=c.checkDirty();c.fire("lockSnapshot");a(b);c.fire("unlockSnapshot");!d&&c.resetDirty()}}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);if(c=
this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents")){var d=CKEDITOR.tools.getNextId(),e=CKEDITOR.dom.element.createFromHtml('<span id="'+d+'" class="cke_voice_label">'+this.lang.common.editorHelp+"</span>");c.append(e);a.changeAttr("aria-describedby",d)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");var o=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var e,g,
f,i,j=[],s=d.range.startContainer;e=d.range.startPath();for(var s=h[s.getName()],p=0,k=c.getChildren(),t=k.count(),n=-1,v=-1,u=0,r=e.contains(h.$list);p<t;++p){e=k.getItem(p);if(a(e)){f=e.getName();if(r&&f in CKEDITOR.dtd.$list)j=j.concat(b(e,d));else{i=!!s[f];if(f=="br"&&e.data("cke-eol")&&(!p||p==t-1)){u=(g=p?j[p-1].node:k.getItem(p+1))&&(!a(g)||!g.is("br"));g=g&&a(g)&&h.$block[g.getName()]}n==-1&&!i&&(n=p);i||(v=p);j.push({isElement:1,isLineBreak:u,isBlock:e.isBlockBoundary(),hasBlockSibling:g,
node:e,name:f,allowed:i});g=u=0}}else j.push({isElement:0,node:e,allowed:1})}if(n>-1)j[n].firstNotAllowed=1;if(v>-1)j[v].lastNotAllowed=1;return j}function c(b,d){var e=[],g=b.getChildren(),f=g.count(),i,j=0,p=h[d],s=!b.is(h.$inline)||b.is("br");for(s&&e.push(" ");j<f;j++){i=g.getItem(j);a(i)&&!i.is(p)?e=e.concat(c(i,d)):e.push(i)}s&&e.push(" ");return e}function d(b){return b&&a(b)&&(b.is(h.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function g(b,c,d,e){var f=b.clone(),h,i;f.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);
if((h=(new CKEDITOR.dom.walker(f)).next())&&a(h)&&j[h.getName()]&&(i=h.getPrevious())&&a(i)&&!i.getParent().equals(b.startContainer)&&d.contains(i)&&e.contains(h)&&h.isIdentical(i)){h.moveChildren(i);h.remove();g(b,c,d,e)}}function f(b,c){function d(b,c){if(c.isBlock&&c.isElement&&!c.node.is("br")&&a(b)&&b.is("br")){b.remove();return 1}}var e=c.endContainer.getChild(c.endOffset),g=c.endContainer.getChild(c.endOffset-1);e&&d(e,b[b.length-1]);if(g&&d(g,b[0])){c.setEnd(c.endContainer,c.endOffset-1);
c.collapse()}}var h=CKEDITOR.dtd,j={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},k={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},n=CKEDITOR.tools.extend({},h.$inline);delete n.br;return function(j,u,o){var q=j.editor;j.getDocument();var G=q.getSelection().getRanges()[0],C=false;if(u=="unfiltered_html"){u="html";C=true}if(!G.checkReadOnly()){var E=(new CKEDITOR.dom.elementPath(G.startContainer,G.root)).blockLimit||G.root,u={type:u,dontFilter:C,editable:j,editor:q,range:G,
blockLimit:E,mergeCandidates:[],zombies:[]},q=u.range,C=u.mergeCandidates,D,F,I,H;if(u.type=="text"&&q.shrink(CKEDITOR.SHRINK_ELEMENT,true,false)){D=CKEDITOR.dom.element.createFromHtml("<span>&nbsp;</span>",q.document);q.insertNode(D);q.setStartAfter(D)}F=new CKEDITOR.dom.elementPath(q.startContainer);u.endPath=I=new CKEDITOR.dom.elementPath(q.endContainer);if(!q.collapsed){var E=I.block||I.blockLimit,O=q.getCommonAncestor();E&&(!E.equals(O)&&!E.contains(O)&&q.checkEndOfBlock())&&u.zombies.push(E);
q.deleteContents()}for(;(H=a(q.startContainer)&&q.startContainer.getChild(q.startOffset-1))&&a(H)&&H.isBlockBoundary()&&F.contains(H);)q.moveToPosition(H,CKEDITOR.POSITION_BEFORE_END);g(q,u.blockLimit,F,I);if(D){q.setEndBefore(D);q.collapse();D.remove()}D=q.startPath();if(E=D.contains(d,false,1)){q.splitElement(E);u.inlineStylesRoot=E;u.inlineStylesPeak=D.lastElement}D=q.createBookmark();(E=D.startNode.getPrevious(e))&&a(E)&&d(E)&&C.push(E);(E=D.startNode.getNext(e))&&a(E)&&d(E)&&C.push(E);for(E=
D.startNode;(E=E.getParent())&&d(E);)C.push(E);q.moveToBookmark(D);if(D=o){D=u.range;if(u.type=="text"&&u.inlineStylesRoot){H=u.inlineStylesPeak;q=H.getDocument().createText("{cke-peak}");for(C=u.inlineStylesRoot.getParent();!H.equals(C);){q=q.appendTo(H.clone());H=H.getParent()}o=q.getOuterHtml().split("{cke-peak}").join(o)}H=u.blockLimit.getName();if(/^\s+|\s+$/.test(o)&&"span"in CKEDITOR.dtd[H])var L='<span data-cke-marker="1">&nbsp;</span>',o=L+o+L;o=u.editor.dataProcessor.toHtml(o,{context:null,
fixForBody:false,dontFilter:u.dontFilter,filter:u.editor.activeFilter,enterMode:u.editor.activeEnterMode});H=D.document.createElement("body");H.setHtml(o);if(L){H.getFirst().remove();H.getLast().remove()}if((L=D.startPath().block)&&!(L.getChildCount()==1&&L.getBogus()))a:{var K;if(H.getChildCount()==1&&a(K=H.getFirst())&&K.is(k)){L=K.getElementsByTag("*");D=0;for(C=L.count();D<C;D++){q=L.getItem(D);if(!q.is(n))break a}K.moveChildren(K.getParent(1));K.remove()}}u.dataWrapper=H;D=o}if(D){K=u.range;
var L=K.document,J,o=u.blockLimit;D=0;var N;H=[];var M,S,C=q=0,P,U;F=K.startContainer;var E=u.endPath.elements[0],T;I=E.getPosition(F);O=!!E.getCommonAncestor(F)&&I!=CKEDITOR.POSITION_IDENTICAL&&!(I&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);F=b(u.dataWrapper,u);for(f(F,K);D<F.length;D++){I=F[D];if(J=I.isLineBreak){J=K;P=o;var Q=void 0,W=void 0;if(I.hasBlockSibling)J=1;else{Q=J.startContainer.getAscendant(h.$block,1);if(!Q||!Q.is({div:1,p:1}))J=0;else{W=Q.getPosition(P);if(W==CKEDITOR.POSITION_IDENTICAL||
W==CKEDITOR.POSITION_CONTAINS)J=0;else{P=J.splitElement(Q);J.moveToPosition(P,CKEDITOR.POSITION_AFTER_START);J=1}}}}if(J)C=D>0;else{J=K.startPath();if(!I.isBlock&&u.editor.config.autoParagraph!==false&&(u.editor.activeEnterMode!=CKEDITOR.ENTER_BR&&u.editor.editable().equals(J.blockLimit)&&!J.block)&&(S=u.editor.activeEnterMode!=CKEDITOR.ENTER_BR&&u.editor.config.autoParagraph!==false?u.editor.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":false)){S=L.createElement(S);S.appendBogus();K.insertNode(S);
CKEDITOR.env.needsBrFiller&&(N=S.getBogus())&&N.remove();K.moveToPosition(S,CKEDITOR.POSITION_BEFORE_END)}if((J=K.startPath().block)&&!J.equals(M)){if(N=J.getBogus()){N.remove();H.push(J)}M=J}I.firstNotAllowed&&(q=1);if(q&&I.isElement){J=K.startContainer;for(P=null;J&&!h[J.getName()][I.name];){if(J.equals(o)){J=null;break}P=J;J=J.getParent()}if(J){if(P){U=K.splitElement(P);u.zombies.push(U);u.zombies.push(P)}}else{P=o.getName();T=!D;J=D==F.length-1;P=c(I.node,P);for(var Q=[],W=P.length,Z=0,X=void 0,
Y=0,aa=-1;Z<W;Z++){X=P[Z];if(X==" "){if(!Y&&(!T||Z)){Q.push(new CKEDITOR.dom.text(" "));aa=Q.length}Y=1}else{Q.push(X);Y=0}}J&&aa==Q.length&&Q.pop();T=Q}}if(T){for(;J=T.pop();)K.insertNode(J);T=0}else K.insertNode(I.node);if(I.lastNotAllowed&&D<F.length-1){(U=O?E:U)&&K.setEndAt(U,CKEDITOR.POSITION_AFTER_START);q=0}K.collapse()}}u.dontMoveCaret=C;u.bogusNeededBlocks=H}N=u.range;var R;U=u.bogusNeededBlocks;for(T=N.createBookmark();M=u.zombies.pop();)if(M.getParent()){S=N.clone();S.moveToElementEditStart(M);
S.removeEmptyBlocksAtEnd()}if(U)for(;M=U.pop();)CKEDITOR.env.needsBrFiller?M.appendBogus():M.append(N.document.createText(" "));for(;M=u.mergeCandidates.pop();)M.mergeSiblings();N.moveToBookmark(T);if(!u.dontMoveCaret){for(M=a(N.startContainer)&&N.startContainer.getChild(N.startOffset-1);M&&a(M)&&!M.is(h.$empty);){if(M.isBlockBoundary())N.moveToPosition(M,CKEDITOR.POSITION_BEFORE_END);else{if(d(M)&&M.getHtml().match(/(\s|&nbsp;)$/g)){R=null;break}R=N.clone();R.moveToPosition(M,CKEDITOR.POSITION_BEFORE_END)}M=
M.getLast(e)}R&&N.moveToRange(R)}G.select();i(j)}}}(),q=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return false;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};return b}function b(a,c,d){c=a.getDocument().createElement(c);a.append(c,d);return c}function c(a){var b=a.count(),d;for(b;b-- >0;){d=a.getItem(b);if(!CKEDITOR.tools.trim(d.getHtml())){d.appendBogus();CKEDITOR.env.ie&&
(CKEDITOR.env.version<9&&d.getChildCount())&&d.getFirst().remove()}}}return function(d){var e=d.startContainer,g=e.getAscendant("table",1),f=false;c(g.getElementsByTag("td"));c(g.getElementsByTag("th"));g=d.clone();g.setStart(e,0);g=a(g).lastBackward();if(!g){g=d.clone();g.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);g=a(g).lastForward();f=true}g||(g=e);if(g.is("table")){d.setStartAt(g,CKEDITOR.POSITION_BEFORE_START);d.collapse(true);g.remove()}else{g.is({tbody:1,thead:1,tfoot:1})&&(g=b(g,"tr",f));g.is("tr")&&
(g=b(g,g.getParent().is("thead")?"th":"td",f));(e=g.getBogus())&&e.remove();d.moveToPosition(g,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END)}}}()}(),function(){function a(){var a=this._.fakeSelection,b;if(a){b=this.getSelection(1);if(!b||!b.isHidden()){a.reset();a=0}}if(!a){a=b||this.getSelection(1);if(!a||a.getType()==CKEDITOR.SELECTION_NONE)return}this.fire("selectionCheck",a);b=this.elementPath();if(!b.compare(this._.selectionPreviousPath)){if(CKEDITOR.env.webkit)this._.previousActive=
this.document.getActive();this._.selectionPreviousPath=b;this.fire("selectionChange",{selection:a,path:b})}}function f(){o=true;if(!n){b.call(this);n=CKEDITOR.tools.setTimeout(b,200,this)}}function b(){n=null;if(o){CKEDITOR.tools.setTimeout(a,0,this);o=false}}function e(a){function b(c,d){return!c||c.type==CKEDITOR.NODE_TEXT?false:a.clone()["moveToElementEdit"+(d?"End":"Start")](c)}if(!(a.root instanceof CKEDITOR.editable))return false;var c=a.startContainer,d=a.getPreviousNode(q,null,c),e=a.getNextNode(q,
null,c);return b(d)||b(e,1)||!d&&!e&&!(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()&&c.getBogus())?true:false}function d(a){return a.getCustomData("cke-fillingChar")}function c(a,b){var c=a&&a.removeCustomData("cke-fillingChar");if(c){if(b!==false){var d,e=a.getDocument().getSelection().getNative(),g=e&&e.type!="None"&&e.getRangeAt(0);if(c.getLength()>1&&g&&g.intersectsNode(c.$)){d=[e.anchorOffset,e.focusOffset];g=e.focusNode==c.$&&e.focusOffset>0;e.anchorNode==c.$&&e.anchorOffset>0&&d[0]--;
g&&d[1]--;var f;g=e;if(!g.isCollapsed){f=g.getRangeAt(0);f.setStart(g.anchorNode,g.anchorOffset);f.setEnd(g.focusNode,g.focusOffset);f=f.collapsed}f&&d.unshift(d.pop())}}c.setText(h(c.getText()));if(d){c=e.getRangeAt(0);c.setStart(c.startContainer,d[0]);c.setEnd(c.startContainer,d[1]);e.removeAllRanges();e.addRange(c)}}}function h(a){return a.replace(/\u200B( )?/g,function(a){return a[1]?" ":""})}function i(a,b,c){var d=a.on("focus",function(a){a.cancel()},null,null,-100);if(CKEDITOR.env.ie)var e=
a.getDocument().on("selectionchange",function(a){a.cancel()},null,null,-100);else{var g=new CKEDITOR.dom.range(a);g.moveToElementEditStart(a);var f=a.getDocument().$.createRange();f.setStart(g.startContainer.$,g.startOffset);f.collapse(1);b.removeAllRanges();b.addRange(f)}c&&a.focus();d.removeListener();e&&e.removeListener()}function g(a){var b=CKEDITOR.dom.element.createFromHtml('<div data-cke-hidden-sel="1" data-cke-temp="1" style="'+(CKEDITOR.env.ie?"display:none":"position:fixed;top:0;left:-1000px")+
'">&nbsp;</div>',a.document);a.fire("lockSnapshot");a.editable().append(b);var c=a.getSelection(1),d=a.createRange(),e=c.root.on("selectionchange",function(a){a.cancel()},null,null,0);d.setStartAt(b,CKEDITOR.POSITION_AFTER_START);d.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);c.selectRanges([d]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=b}function j(a){var b={37:1,39:1,8:1,46:1};return function(c){var d=c.data.getKeystroke();if(b[d]){var e=a.getSelection().getRanges(),g=
e[0];if(e.length==1&&g.collapsed)if((d=g[d<38?"getPreviousEditableNode":"getNextEditableNode"]())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getAttribute("contenteditable")=="false"){a.getSelection().fake(d);c.data.preventDefault();c.cancel()}}}}function k(a){for(var b=0;b<a.length;b++){var c=a[b];c.getCommonAncestor().isReadOnly()&&a.splice(b,1);if(!c.collapsed){if(c.startContainer.isReadOnly())for(var d=c.startContainer,e;d;){if((e=d.type==CKEDITOR.NODE_ELEMENT)&&d.is("body")||!d.isReadOnly())break;e&&d.getAttribute("contentEditable")==
"false"&&c.setStartAfter(d);d=d.getParent()}d=c.startContainer;e=c.endContainer;var g=c.startOffset,f=c.endOffset,h=c.clone();d&&d.type==CKEDITOR.NODE_TEXT&&(g>=d.getLength()?h.setStartAfter(d):h.setStartBefore(d));e&&e.type==CKEDITOR.NODE_TEXT&&(f?h.setEndAfter(e):h.setEndBefore(e));d=new CKEDITOR.dom.walker(h);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&d.isReadOnly()){var e=c.clone();c.setEndBefore(d);c.collapsed&&a.splice(b--,1);if(!(d.getPosition(h.endContainer)&CKEDITOR.POSITION_CONTAINS)){e.setStartAfter(d);
e.collapsed||a.splice(b+1,0,e)}return true}return false};d.next()}}return a}var n,o,q=CKEDITOR.dom.walker.invisible(1),l=function(){function a(b){return function(a){var c=a.editor.createRange();c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]);return false}}function b(a){return function(b){var c=b.editor,d=c.createRange(),e;if(!(e=d.moveToClosestEditablePosition(b.selected,a)))e=d.moveToClosestEditablePosition(b.selected,!a);e&&c.getSelection().selectRanges([d]);
c.fire("saveSnapshot");b.selected.remove();if(!e){d.moveToElementEditablePosition(c.editable());c.getSelection().selectRanges([d])}c.fire("saveSnapshot");return false}}var c=a(),d=a(1);return{37:c,38:c,39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(b){function d(){var a=e.getSelection();a&&a.removeAllRanges()}var e=b.editor;e.on("contentDom",function(){var b=e.document,d=CKEDITOR.document,g=e.editable(),h=b.getBody(),i=b.getDocumentElement(),l=g.isInline(),p,s;CKEDITOR.env.gecko&&
g.attachListener(g,"focus",function(a){a.removeListener();if(p!==0)if((a=e.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==g.$){a=e.createRange();a.moveToElementEditStart(g);a.select()}},null,null,-2);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){p&&CKEDITOR.env.webkit&&(p=e._.previousActive&&e._.previousActive.equals(b.getActive()));e.unlockSelection(p);p=0},null,null,-1);g.attachListener(g,"mousedown",function(){p=0});if(CKEDITOR.env.ie||l){var k=function(){s=
new CKEDITOR.dom.selection(e.getSelection());s.lock()};m?g.attachListener(g,"beforedeactivate",k,null,null,-1):g.attachListener(e,"selectionCheck",k,null,null,-1);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){e.lockSelection(s);p=1},null,null,-1);g.attachListener(g,"mousedown",function(){p=0})}if(CKEDITOR.env.ie&&!l){var t;g.attachListener(g,"mousedown",function(a){if(a.data.$.button==2){a=e.document.getSelection();if(!a||a.getType()==CKEDITOR.SELECTION_NONE)t=e.window.getScrollPosition()}});
g.attachListener(g,"mouseup",function(a){if(a.data.$.button==2&&t){e.document.$.documentElement.scrollLeft=t.x;e.document.$.documentElement.scrollTop=t.y}t=null});if(b.$.compatMode!="BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)i.on("mousedown",function(a){function b(a){a=a.data.$;if(e){var c=h.$.createTextRange();try{c.moveToPoint(a.x,a.y)}catch(d){}e.setEndPoint(f.compareEndPoints("StartToStart",c)<0?"EndToEnd":"StartToStart",c);e.select()}}function c(){i.removeListener("mousemove",
b);d.removeListener("mouseup",c);i.removeListener("mouseup",c);e.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<i.$.clientHeight&&a.$.x<i.$.clientWidth){var e=h.$.createTextRange();try{e.moveToPoint(a.$.x,a.$.y)}catch(g){}var f=e.duplicate();i.on("mousemove",b);d.on("mouseup",c);i.on("mouseup",c)}});if(CKEDITOR.env.version>7&&CKEDITOR.env.version<11){i.on("mousedown",function(a){if(a.data.getTarget().is("html")){d.on("mouseup",D);i.on("mouseup",D)}});var D=function(){d.removeListener("mouseup",
D);i.removeListener("mouseup",D);var a=CKEDITOR.document.$.selection,c=a.createRange();a.type!="None"&&c.parentElement().ownerDocument==b.$&&c.select()}}}}g.attachListener(g,"selectionchange",a,e);g.attachListener(g,"keyup",f,e);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){e.forceNextSelectionCheck();e.selectionChange(1)});if(l&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var n;g.attachListener(g,"mousedown",function(){n=1});g.attachListener(b.getDocumentElement(),"mouseup",
function(){n&&f.call(e);n=0})}else g.attachListener(CKEDITOR.env.ie?g:b.getDocumentElement(),"mouseup",f,e);CKEDITOR.env.webkit&&g.attachListener(b,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:c(g)}},null,null,-1);g.attachListener(g,"keydown",j(e),null,null,-1)});e.on("setData",function(){e.unlockSelection();CKEDITOR.env.webkit&&d()});e.on("contentDomUnload",function(){e.unlockSelection()});if(CKEDITOR.env.ie9Compat)e.on("beforeDestroy",
d,null,null,9);e.on("dataReady",function(){delete e._.fakeSelection;delete e._.hiddenSelectionContainer;e.selectionChange(1)});e.on("loadSnapshot",function(){var a=e.editable().getLast(function(a){return a.type==CKEDITOR.NODE_ELEMENT});a&&a.hasAttribute("data-cke-hidden-sel")&&a.remove()},null,null,100);e.on("key",function(a){if(e.mode=="wysiwyg"){var b=e.getSelection();if(b.isFake){var c=l[a.data.keyCode];if(c)return c({editor:e,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});CKEDITOR.on("instanceReady",
function(a){var b=a.editor;if(CKEDITOR.env.webkit){b.on("selectionChange",function(){var a=b.editable(),e=d(a);e&&(e.getCustomData("ready")?c(a):e.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){c(b.editable())},null,null,-1);var e,g,a=function(){var a=b.editable();if(a)if(a=d(a)){var c=b.document.$.defaultView.getSelection();c.type=="Caret"&&c.anchorNode==a.$&&(g=1);e=a.getText();a.setText(h(e))}},f=function(){var a=b.editable();if(a)if(a=d(a)){a.setText(e);if(g){b.document.$.defaultView.getSelection().setPosition(a.$,
a.getLength());g=0}}};b.on("beforeUndoImage",a);b.on("afterUndoImage",f);b.on("beforeGetData",a,null,null,0);b.on("getData",f)}});CKEDITOR.editor.prototype.selectionChange=function(b){(b?a:f).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){if((this._.savedSelection||this._.fakeSelection)&&!a)return this._.savedSelection||this._.fakeSelection;return(a=this.editable())&&this.mode=="wysiwyg"?new CKEDITOR.dom.selection(a):null};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);
if(a.getType()!=CKEDITOR.SELECTION_NONE){!a.isLocked&&a.lock();this._.savedSelection=a;return true}return false};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;if(b){b.unlock(a);delete this._.savedSelection;return true}return false};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;var m=typeof window.getSelection!="function",v=1;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection)var b=a,a=a.root;var c=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:v++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=
a=c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b){CKEDITOR.tools.extend(this._.cache,b._.cache);this.isFake=b.isFake;this.isLocked=b.isLocked;return this}b=m?this.document.$.selection:this.document.getWindow().$.getSelection();if(CKEDITOR.env.webkit)(b.type=="None"&&this.document.getActive().equals(a)||b.type=="Caret"&&b.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT)&&i(a,b);else if(CKEDITOR.env.gecko)b&&(this.document.getActive().equals(a)&&b.anchorNode&&b.anchorNode.nodeType==
CKEDITOR.NODE_DOCUMENT)&&i(a,b,true);else if(CKEDITOR.env.ie){var d;try{d=this.document.getActive()}catch(e){}if(m)b.type=="None"&&(d&&d.equals(this.document.getDocumentElement()))&&i(a,null,true);else{(b=b&&b.anchorNode)&&(b=new CKEDITOR.dom.node(b));d&&(d.equals(this.document.getDocumentElement())&&b&&(a.equals(b)||a.contains(b)))&&i(a,null,true)}}d=this.getNative();var g,f;if(d)if(d.getRangeAt)g=(f=d.rangeCount&&d.getRangeAt(0))&&new CKEDITOR.dom.node(f.commonAncestorContainer);else{try{f=d.createRange()}catch(h){}g=
f&&CKEDITOR.dom.element.get(f.item&&f.item(0)||f.parentElement())}if(!g||!(g.type==CKEDITOR.NODE_ELEMENT||g.type==CKEDITOR.NODE_TEXT)||!this.root.equals(g)&&!this.root.contains(g)){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 t={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.dom.selection.prototype={getNative:function(){return this._.cache.nativeSel!==void 0?this._.cache.nativeSel:this._.cache.nativeSel=m?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:m?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),d=c.type;if(d=="Text")b=CKEDITOR.SELECTION_TEXT;if(d=="Control")b=CKEDITOR.SELECTION_ELEMENT;if(c.createRange().parentElement())b=CKEDITOR.SELECTION_TEXT}catch(e){}return a.type=
b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(c.rangeCount==1){var c=c.getRangeAt(0),d=c.startContainer;if(d==c.endContainer&&d.nodeType==1&&c.endOffset-c.startOffset==1&&t[d.childNodes[c.startOffset].nodeName.toLowerCase()])b=CKEDITOR.SELECTION_ELEMENT}return a.type=b},getRanges:function(){var a=m?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,
c){b=b.duplicate();b.collapse(c);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var e=d.children,g,f,h=b.duplicate(),i=0,j=e.length-1,l=-1,k,s;i<=j;){l=Math.floor((i+j)/2);g=e[l];h.moveToElementText(g);k=h.compareEndPoints("StartToStart",b);if(k>0)j=l-1;else if(k<0)i=l+1;else return{container:d,offset:a(g)}}if(l==-1||l==e.length-1&&k<0){h.moveToElementText(d);h.setEndPoint("StartToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!h){g=e[e.length-
1];return g.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:e.length}:{container:g,offset:g.nodeValue.length}}for(d=e.length;h>0&&d>0;){f=e[--d];if(f.nodeType==CKEDITOR.NODE_TEXT){s=f;h=h-f.nodeValue.length}}return{container:s,offset:-h}}h.collapse(k>0?true:false);h.setEndPoint(k>0?"StartToStart":"EndToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;if(!h)return{container:d,offset:a(g)+(k>0?0:1)};for(;h>0;)try{f=g[k>0?"previousSibling":"nextSibling"];if(f.nodeType==CKEDITOR.NODE_TEXT){h=h-f.nodeValue.length;
s=f}g=f}catch(m){return{container:d,offset:a(g)}}return{container:s,offset:k>0?-h:s.nodeValue.length+h}};return function(){var a=this.getNative(),c=a&&a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT){a=new CKEDITOR.dom.range(this.root);d=b(c,true);a.setStart(new CKEDITOR.dom.node(d.container),d.offset);d=b(c);a.setEnd(new CKEDITOR.dom.node(d.container),d.offset);a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&
a.collapse();return[a]}if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],e=0;e<c.length;e++){for(var g=c.item(e),f=g.parentNode,h=0,a=new CKEDITOR.dom.range(this.root);h<f.childNodes.length&&f.childNodes[h]!=g;h++);a.setStart(new CKEDITOR.dom.node(f),h);a.setEnd(new CKEDITOR.dom.node(f),h+1);d.push(a)}return d}return[]}}():function(){var a=[],b,c=this.getNative();if(!c)return a;for(var d=0;d<c.rangeCount;d++){var e=c.getRangeAt(d);b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(e.startContainer),
e.startOffset);b.setEnd(new CKEDITOR.dom.node(e.endContainer),e.endOffset);a.push(b)}return a};return function(b){var c=this._.cache,d=c.ranges;if(!d)c.ranges=d=new CKEDITOR.dom.rangeList(a.call(this));return!b?d:k(new CKEDITOR.dom.rangeList(d.slice()))}}(),getStartElement:function(){var a=this._.cache;if(a.startElement!==void 0)return a.startElement;var b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];
if(c){if(c.collapsed){b=c.startContainer;b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent())}else{for(c.optimize();;){b=c.startContainer;if(c.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary())c.setStartAfter(b);else break}b=c.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();b=b.getChild(c.startOffset);if(!b||b.type!=CKEDITOR.NODE_ELEMENT)b=c.startContainer;else for(c=b.getFirst();c&&c.type==CKEDITOR.NODE_ELEMENT;){b=c;c=c.getFirst()}}b=b.$}}return a.startElement=
b?new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(a.selectedElement!==void 0)return a.selectedElement;var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0].clone(),c,d,e=2;e&&(!(c=a.getEnclosedNode())||!(c.type==CKEDITOR.NODE_ELEMENT&&t[c.getName()]&&(d=c)));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d&&d.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=
this._.cache;if(a.selectedText!==void 0)return a.selectedText;var b=this.getNative(),b=m?b.type=="Control"?"":b.createRange().text:b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),c=!b&&this.getRanges(),d=this.isFake;this.isLocked=0;this.reset();if(a)(a=b||c[0]&&c[0].getCommonAncestor())&&
a.getAscendant("body",1)&&(d?this.fake(b):b?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection&&this.rev==a._.fakeSelection.rev){delete a._.fakeSelection;var b=a._.hiddenSelectionContainer;if(b){a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot")}delete a._.hiddenSelectionContainer}this.rev=v++},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},
selectRanges:function(a){var b=this.root.editor,b=b&&b._.hiddenSelectionContainer;this.reset();if(b)for(var b=this.root,d,g=0;g<a.length;++g){d=a[g];if(d.endContainer.equals(b))d.endOffset=Math.min(d.endOffset,b.getChildCount())}if(a.length)if(this.isLocked){var f=CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();!f.equals(this.root)&&f.focus()}else{var h;a:{var i,j;if(a.length==1&&!(j=a[0]).collapsed&&(h=j.getEnclosedNode())&&h.type==CKEDITOR.NODE_ELEMENT){j=j.clone();
j.shrink(CKEDITOR.SHRINK_ELEMENT,true);if((i=j.getEnclosedNode())&&i.type==CKEDITOR.NODE_ELEMENT)h=i;if(h.getAttribute("contenteditable")=="false")break a}h=void 0}if(h)this.fake(h);else{if(m){j=CKEDITOR.dom.walker.whitespaces(true);i=/\ufeff|\u00a0/;b={table:1,tbody:1,tr:1};if(a.length>1){h=a[a.length-1];a[0].setEnd(h.endContainer,h.endOffset)}h=a[0];var a=h.collapsed,l,k,n;if((d=h.getEnclosedNode())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in t&&(!d.is("a")||!d.getText()))try{n=d.$.createControlRange();
n.addElement(d.$);n.select();return}catch(v){}(h.startContainer.type==CKEDITOR.NODE_ELEMENT&&h.startContainer.getName()in b||h.endContainer.type==CKEDITOR.NODE_ELEMENT&&h.endContainer.getName()in b)&&h.shrink(CKEDITOR.NODE_ELEMENT,true);n=h.createBookmark();b=n.startNode;if(!a)f=n.endNode;n=h.document.$.body.createTextRange();n.moveToElementText(b.$);n.moveStart("character",1);if(f){i=h.document.$.body.createTextRange();i.moveToElementText(f.$);n.setEndPoint("EndToEnd",i);n.moveEnd("character",-1)}else{l=
b.getNext(j);k=b.hasAscendant("pre");l=!(l&&l.getText&&l.getText().match(i))&&(k||!b.hasPrevious()||b.getPrevious().is&&b.getPrevious().is("br"));k=h.document.createElement("span");k.setHtml("&#65279;");k.insertBefore(b);l&&h.document.createText("﻿").insertBefore(b)}h.setStartBefore(b);b.remove();if(a){if(l){n.moveStart("character",-1);n.select();h.document.$.selection.clear()}else n.select();h.moveToPosition(k,CKEDITOR.POSITION_BEFORE_START);k.remove()}else{h.setEndBefore(f);f.remove();n.select()}}else{f=
this.getNative();if(!f)return;this.removeAllRanges();for(n=0;n<a.length;n++){if(n<a.length-1){l=a[n];k=a[n+1];i=l.clone();i.setStart(l.endContainer,l.endOffset);i.setEnd(k.startContainer,k.startOffset);if(!i.collapsed){i.shrink(CKEDITOR.NODE_ELEMENT,true);h=i.getCommonAncestor();i=i.getEnclosedNode();if(h.isReadOnly()||i&&i.isReadOnly()){k.setStart(l.startContainer,l.startOffset);a.splice(n--,1);continue}}}h=a[n];k=this.document.$.createRange();if(h.collapsed&&CKEDITOR.env.webkit&&e(h)){l=this.root;
c(l,false);i=l.getDocument().createText("​");l.setCustomData("cke-fillingChar",i);h.insertNode(i);if((l=i.getNext())&&!i.getPrevious()&&l.type==CKEDITOR.NODE_ELEMENT&&l.getName()=="br"){c(this.root);h.moveToPosition(l,CKEDITOR.POSITION_BEFORE_START)}else h.moveToPosition(i,CKEDITOR.POSITION_AFTER_END)}k.setStart(h.startContainer.$,h.startOffset);try{k.setEnd(h.endContainer.$,h.endOffset)}catch(q){if(q.toString().indexOf("NS_ERROR_ILLEGAL_VALUE")>=0){h.collapse(1);k.setEnd(h.endContainer.$,h.endOffset)}else throw q;
}f.addRange(k)}}this.reset();this.root.fire("selectionchange")}}},fake:function(a){var b=this.root.editor;this.reset();g(b);var c=this._.cache,d=new CKEDITOR.dom.range(this.root);d.setStartBefore(a);d.setEndAfter(a);c.ranges=new CKEDITOR.dom.rangeList(d);c.selectedElement=c.startElement=a;c.type=CKEDITOR.SELECTION_ELEMENT;c.selectedText=c.nativeSel=null;this.isFake=1;this.rev=v++;b._.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"))},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b=[],c=0;c<a.length;c++){var d=new CKEDITOR.dom.range(this.root);d.moveToBookmark(a[c]);b.push(d)}a.isFake?this.fake(b[0].getEnclosedNode()):this.selectRanges(b);return this},getCommonAncestor:function(){var a=
this.getRanges();return!a.length?null:a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer)},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var a=this.getNative();try{a&&a[m?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}}}(),"use strict",CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function a(a,b){for(var c,d;a=a.getParent();){if(a.equals(b))break;
if(a.getAttribute("data-nostyle"))c=a;else if(!d){var e=a.getAttribute("contentEditable");e=="false"?c=a:e=="true"&&(d=1)}}return c}function f(b){var c=b.document;if(b.collapsed){c=v(this,c);b.insertNode(c);b.moveToPosition(c,CKEDITOR.POSITION_BEFORE_END)}else{var d=this.element,g=this._.definition,h,i=g.ignoreReadonly,j=i||g.includeReadonly;j==void 0&&(j=b.root.getCustomData("cke_includeReadonly"));var l=CKEDITOR.dtd[d];if(!l){h=true;l=CKEDITOR.dtd.span}b.enlarge(CKEDITOR.ENLARGE_INLINE,1);b.trim();
var k=b.createBookmark(),m=k.startNode,t=k.endNode,n=m,s;if(!i){var p=b.getCommonAncestor(),i=a(m,p),p=a(t,p);i&&(n=i.getNextSourceNode(true));p&&(t=p)}for(n.getPosition(t)==CKEDITOR.POSITION_FOLLOWING&&(n=0);n;){i=false;if(n.equals(t)){n=null;i=true}else{var o=n.type==CKEDITOR.NODE_ELEMENT?n.getName():null,p=o&&n.getAttribute("contentEditable")=="false",u=o&&n.getAttribute("data-nostyle");if(o&&n.data("cke-bookmark")){n=n.getNextSourceNode(true);continue}if(p&&j&&CKEDITOR.dtd.$block[o])for(var A=
n,w=e(A),r=void 0,y=w.length,x=0,A=y&&new CKEDITOR.dom.range(A.getDocument());x<y;++x){var r=w[x],B=CKEDITOR.filter.instances[r.data("cke-filter")];if(B?B.check(this):1){A.selectNodeContents(r);f.call(this,A)}}w=o?!l[o]||u?0:p&&!j?0:(n.getPosition(t)|G)==G&&(!g.childRule||g.childRule(n)):1;if(w)if((w=n.getParent())&&((w.getDtd()||CKEDITOR.dtd.span)[d]||h)&&(!g.parentRule||g.parentRule(w))){if(!s&&(!o||!CKEDITOR.dtd.$removeEmpty[o]||(n.getPosition(t)|G)==G)){s=b.clone();s.setStartBefore(n)}o=n.type;
if(o==CKEDITOR.NODE_TEXT||p||o==CKEDITOR.NODE_ELEMENT&&!n.getChildCount()){for(var o=n,ba;(i=!o.getNext(z))&&(ba=o.getParent(),l[ba.getName()])&&(ba.getPosition(m)|C)==C&&(!g.childRule||g.childRule(ba));)o=ba;s.setEndAfter(o)}}else i=true;else i=true;n=n.getNextSourceNode(u||p)}if(i&&s&&!s.collapsed){for(var i=v(this,c),p=i.hasAttributes(),u=s.getCommonAncestor(),o={},w={},r={},y={},$,V,ca;i&&u;){if(u.getName()==d){for($ in g.attributes)if(!y[$]&&(ca=u.getAttribute(V)))i.getAttribute($)==ca?w[$]=
1:y[$]=1;for(V in g.styles)if(!r[V]&&(ca=u.getStyle(V)))i.getStyle(V)==ca?o[V]=1:r[V]=1}u=u.getParent()}for($ in w)i.removeAttribute($);for(V in o)i.removeStyle(V);p&&!i.hasAttributes()&&(i=null);if(i){s.extractContents().appendTo(i);s.insertNode(i);q.call(this,i);i.mergeSiblings();CKEDITOR.env.ie||i.$.normalize()}else{i=new CKEDITOR.dom.element("span");s.extractContents().appendTo(i);s.insertNode(i);q.call(this,i);i.remove(true)}s=null}}b.moveToBookmark(k);b.shrink(CKEDITOR.SHRINK_TEXT);b.shrink(CKEDITOR.NODE_ELEMENT,
true)}}function b(a){function b(){for(var a=new CKEDITOR.dom.elementPath(d.getParent()),c=new CKEDITOR.dom.elementPath(j.getParent()),e=null,g=null,h=0;h<a.elements.length;h++){var f=a.elements[h];if(f==a.block||f==a.blockLimit)break;k.checkElementRemovable(f)&&(e=f)}for(h=0;h<c.elements.length;h++){f=c.elements[h];if(f==c.block||f==c.blockLimit)break;k.checkElementRemovable(f)&&(g=f)}g&&j.breakParent(g);e&&d.breakParent(e)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var c=a.createBookmark(),d=c.startNode;
if(a.collapsed){for(var e=new CKEDITOR.dom.elementPath(d.getParent(),a.root),g,h=0,f;h<e.elements.length&&(f=e.elements[h]);h++){if(f==e.block||f==e.blockLimit)break;if(this.checkElementRemovable(f)){var i;if(a.collapsed&&(a.checkBoundaryOfElement(f,CKEDITOR.END)||(i=a.checkBoundaryOfElement(f,CKEDITOR.START)))){g=f;g.match=i?"start":"end"}else{f.mergeSiblings();f.is(this.element)?o.call(this,f):l(f,p(this)[f.getName()])}}}if(g){f=d;for(h=0;;h++){i=e.elements[h];if(i.equals(g))break;else if(i.match)continue;
else i=i.clone();i.append(f);f=i}f[g.match=="start"?"insertBefore":"insertAfter"](g)}}else{var j=c.endNode,k=this;b();for(e=d;!e.equals(j);){g=e.getNextSourceNode();if(e.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(e)){e.getName()==this.element?o.call(this,e):l(e,p(this)[e.getName()]);if(g.type==CKEDITOR.NODE_ELEMENT&&g.contains(d)){b();g=d.getNext()}}e=g}}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,true)}function e(a){var b=[];a.forEach(function(a){if(a.getAttribute("contenteditable")==
"true"){b.push(a);return false}},CKEDITOR.NODE_ELEMENT,true);return b}function d(a){var b=a.getEnclosedNode()||a.getCommonAncestor(false,true);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&t(a,this)}function c(a){var b=a.getCommonAncestor(true,true);if(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1)){var b=this._.definition,c=b.attributes;if(c)for(var d in c)a.removeAttribute(d,c[d]);if(b.styles)for(var e in b.styles)b.styles.hasOwnProperty(e)&&
a.removeStyle(e)}}function h(a){var b=a.createBookmark(true),c=a.createIterator();c.enforceRealBlocks=true;if(this._.enterMode)c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,e=a.document,f;d=c.getNextParagraph();)if(!d.isReadOnly()&&(c.activeFilter?c.activeFilter.check(this):1)){f=v(this,e,d);g(d,f)}a.moveToBookmark(b)}function i(a){var b=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=true;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,e;d=c.getNextParagraph();)if(this.checkElementRemovable(d))if(d.is("pre")){(e=
this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&d.copyAttributes(e);g(d,e)}else o.call(this,d);a.moveToBookmark(b)}function g(a,b){var c=!b;if(c){b=a.getDocument().createElement("div");a.copyAttributes(b)}var d=b&&b.is("pre"),e=a.is("pre"),g=!d&&e;if(d&&!e){e=b;(g=a.getBogus())&&g.remove();g=a.getHtml();g=k(g,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");g=g.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");g=g.replace(/([ \t\n\r]+|&nbsp;)/g,
" ");g=g.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var f=a.getDocument().createElement("div");f.append(e);e.$.outerHTML="<pre>"+g+"</pre>";e.copyAttributes(f.getFirst());e=f.getFirst().remove()}else e.setHtml(g);b=e}else g?b=n(c?[a.getHtml()]:j(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,h;if((h=c.getPrevious(B))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("pre")){d=k(h.getHtml(),/\n$/,"")+"\n\n"+k(c.getHtml(),/^\n/,"");CKEDITOR.env.ie?c.$.outerHTML="<pre>"+d+"</pre>":c.setHtml(d);h.remove()}}else c&&
m(b)}function j(a){a.getName();var b=[];k(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"</pre>"+c+"<pre>"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function k(a,b,c){var d="",e="",a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(e=c);return""});return d+a.replace(b,c)+e}function n(a,b){var c;a.length>1&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));
for(var d=0;d<a.length;d++){var e=a[d],e=e.replace(/(\r\n|\r)/g,"\n"),e=k(e,/^[ \t]*\n/,""),e=k(e,/\n$/,""),e=k(e,/^[ \t]+|[ \t]+$/g,function(a,b){return a.length==1?"&nbsp;":b?" "+CKEDITOR.tools.repeat("&nbsp;",a.length-1):CKEDITOR.tools.repeat("&nbsp;",a.length-1)+" "}),e=e.replace(/\n/g,"<br>"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("&nbsp;",a.length-1)+" "});if(c){var g=b.clone();g.setHtml(e);c.append(g)}else b.setHtml(e)}return c||b}function o(a,b){var c=this._.definition,
d=c.attributes,c=c.styles,e=p(this)[a.getName()],g=CKEDITOR.tools.isEmpty(d)&&CKEDITOR.tools.isEmpty(c),f;for(f in d)if(!((f=="class"||this._.definition.fullMatch)&&a.getAttribute(f)!=A(f,d[f]))&&!(b&&f.slice(0,5)=="data-")){g=a.hasAttribute(f);a.removeAttribute(f)}for(var h in c)if(!(this._.definition.fullMatch&&a.getStyle(h)!=A(h,c[h],true))){g=g||!!a.getStyle(h);a.removeStyle(h)}l(a,e,w[a.getName()]);g&&(this._.definition.alwaysRemoveElement?m(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==
CKEDITOR.ENTER_BR&&!a.hasAttributes()?m(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function q(a){for(var b=p(this),c=a.getElementsByTag(this.element),d,e=c.count();--e>=0;){d=c.getItem(e);d.isReadOnly()||o.call(this,d,true)}for(var g in b)if(g!=this.element){c=a.getElementsByTag(g);for(e=c.count()-1;e>=0;e--){d=c.getItem(e);d.isReadOnly()||l(d,b[g])}}}function l(a,b,c){if(b=b&&b.attributes)for(var d=0;d<b.length;d++){var e=b[d][0],g;if(g=a.getAttribute(e)){var f=b[d][1];(f===null||
f.test&&f.test(g)||typeof f=="string"&&g==f)&&a.removeAttribute(e)}}c||m(a)}function m(a,b){if(!a.hasAttributes()||b)if(CKEDITOR.dtd.$block[a.getName()]){var c=a.getPrevious(B),d=a.getNext(B);c&&(c.type==CKEDITOR.NODE_TEXT||!c.isBlockBoundary({br:1}))&&a.append("br",1);d&&(d.type==CKEDITOR.NODE_TEXT||!d.isBlockBoundary({br:1}))&&a.append("br");a.remove(true)}else{c=a.getFirst();d=a.getLast();a.remove(true);if(c){c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings();d&&(!c.equals(d)&&d.type==CKEDITOR.NODE_ELEMENT)&&
d.mergeSiblings()}}}function v(a,b,c){var d;d=a.element;d=="*"&&(d="span");d=new CKEDITOR.dom.element(d,b);c&&c.copyAttributes(d);d=t(d,a);b.getCustomData("doc_processing_style")&&d.hasAttribute("id")?d.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return d}function t(a,b){var c=b._.definition,d=c.attributes,c=CKEDITOR.style.getStyleText(c);if(d)for(var e in d)a.setAttribute(e,d[e]);c&&a.setAttribute("style",c);return a}function s(a,b){for(var c in a)a[c]=a[c].replace(y,function(a,
c){return b[c]})}function p(a){if(a._.overrides)return a._.overrides;var b=a._.overrides={},c=a._.definition.overrides;if(c){CKEDITOR.tools.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++){var e=c[d],g,f;if(typeof e=="string")g=e.toLowerCase();else{g=e.element?e.element.toLowerCase():a.element;f=e.attributes}e=b[g]||(b[g]={});if(f){var e=e.attributes=e.attributes||[],h;for(h in f)e.push([h.toLowerCase(),f[h]])}}}return b}function A(a,b,c){var d=new CKEDITOR.dom.element("span");d[c?"setStyle":"setAttribute"](a,
b);return d[c?"getStyle":"getAttribute"](a)}function u(a,b,c){for(var d=a.document,e=a.getRanges(),b=b?this.removeFromRange:this.applyToRange,g,f=e.createIterator();g=f.getNextRange();)b.call(this,g,c);a.selectRanges(e);d.removeCustomData("doc_processing_style")}var w={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},r=
{a: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},x=/\s*(?:;\s*|$)/,y=/#\((.+?)\)/g,z=CKEDITOR.dom.walker.bookmark(0,1),B=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,b){if(typeof a.type=="string")return new CKEDITOR.style.customHandlers[a.type](a);var c=a.attributes;if(c&&c.style){a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(c.style));delete c.style}if(b){a=CKEDITOR.tools.clone(a);s(a.attributes,
b);s(a.styles,b)}c=this.element=a.element?typeof a.element=="string"?a.element.toLowerCase():a.element:"*";this.type=a.type||(w[c]?CKEDITOR.STYLE_BLOCK:r[c]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE);if(typeof this.element=="object")this.type=CKEDITOR.STYLE_OBJECT;this._={definition:a}};CKEDITOR.style.prototype={apply:function(a){if(a instanceof CKEDITOR.dom.document)return u.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;if(!b)this._.enterMode=a.activeEnterMode;
u.call(this,a.getSelection(),0,a);this._.enterMode=b}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return u.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;if(!b)this._.enterMode=a.activeEnterMode;u.call(this,a.getSelection(),1,a);this._.enterMode=b}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?f:this.type==CKEDITOR.STYLE_BLOCK?h:this.type==CKEDITOR.STYLE_OBJECT?d:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange=
this.type==CKEDITOR.STYLE_INLINE?b:this.type==CKEDITOR.STYLE_BLOCK?i:this.type==CKEDITOR.STYLE_OBJECT?c:null;return this.removeFromRange(a)},applyToObject:function(a){t(a,this)},checkActive:function(a,b){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,true,b);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var c=a.elements,d=0,e;d<c.length;d++){e=c[d];if(!(this.type==CKEDITOR.STYLE_INLINE&&(e==a.block||e==a.blockLimit))){if(this.type==
CKEDITOR.STYLE_OBJECT){var g=e.getName();if(!(typeof this.element=="string"?g==this.element:g in this.element))continue}if(this.checkElementRemovable(e,true,b))return true}}}return false},checkApplicable:function(a,b,c){b&&b instanceof CKEDITOR.filter&&(c=b);if(c&&!c.check(this))return false;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!a.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!a.blockLimit.getDtd()[this.element]}return true},checkElementMatch:function(a,b){var c=this._.definition;
if(!a||!c.ignoreReadonly&&a.isReadOnly())return false;var d=a.getName();if(typeof this.element=="string"?d==this.element:d in this.element){if(!b&&!a.hasAttributes())return true;if(d=c._AC)c=d;else{var d={},e=0,g=c.attributes;if(g)for(var f in g){e++;d[f]=g[f]}if(f=CKEDITOR.style.getStyleText(c)){d.style||e++;d.style=f}d._length=e;c=c._AC=d}if(c._length){for(var h in c)if(h!="_length"){e=a.getAttribute(h)||"";if(h=="style")a:{d=c[h];typeof d=="string"&&(d=CKEDITOR.tools.parseCssText(d));typeof e==
"string"&&(e=CKEDITOR.tools.parseCssText(e,true));f=void 0;for(f in d)if(!(f in e&&(e[f]==d[f]||d[f]=="inherit"||e[f]=="inherit"))){d=false;break a}d=true}else d=c[h]==e;if(d){if(!b)return true}else if(b)return false}if(b)return true}else return true}return false},checkElementRemovable:function(a,b,c){if(this.checkElementMatch(a,b,c))return true;if(b=p(this)[a.getName()]){var d;if(!(b=b.attributes))return true;for(c=0;c<b.length;c++){d=b[c][0];if(d=a.getAttribute(d)){var e=b[c][1];if(e===null||typeof e==
"string"&&d==e||e.test(d))return true}}}return false},buildPreview:function(a){var b=this._.definition,c=[],d=b.element;d=="bdo"&&(d="span");var c=["<",d],e=b.attributes;if(e)for(var g in e)c.push(" ",g,'="',e[g],'"');(e=CKEDITOR.style.getStyleText(b))&&c.push(' style="',e,'"');c.push(">",a||b.name,"</",d,">");return c.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,c=a.attributes&&a.attributes.style||"",
d="";c.length&&(c=c.replace(x,";"));for(var e in b){var g=b[e],f=(e+":"+g).replace(x,";");g=="inherit"?d=d+f:c=c+f}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,true));return a._ST=c+d};CKEDITOR.style.customHandlers={};CKEDITOR.style.addCustomHandler=function(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},a,true);return this.customHandlers[a.type]=b};
var G=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,C=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(a,f){this.requiredContent=this.allowedContent=this.style=a;CKEDITOR.tools.extend(this,f,true)},CKEDITOR.styleCommand.prototype.exec=function(a){a.focus();this.state==CKEDITOR.TRISTATE_OFF?a.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&a.removeStyle(this.style)},CKEDITOR.stylesSet=
new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(a,f,b){CKEDITOR.stylesSet.addExternal(a,f,"");CKEDITOR.stylesSet.load(a,b)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(a,f){var b=this._.styleStateChangeCallbacks;if(!b){b=this._.styleStateChangeCallbacks=[];this.on("selectionChange",function(a){for(var d=0;d<b.length;d++){var c=b[d],f=c.style.checkActive(a.data.path,
this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;c.fn.call(this,f)}})}b.push({style:a,fn:f})},applyStyle:function(a){a.apply(this)},removeStyle:function(a){a.remove(this)},getStylesSet:function(a){if(this._.stylesDefinitions)a(this._.stylesDefinitions);else{var f=this,b=f.config.stylesCombo_stylesSet||f.config.stylesSet;if(b===false)a(null);else if(b instanceof Array){f._.stylesDefinitions=b;a(b)}else{b||(b="default");var b=b.split(":"),e=b[0];CKEDITOR.stylesSet.addExternal(e,b[1]?b.slice(1).join(":"):
CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(e,function(b){f._.stylesDefinitions=b[e];a(f._.stylesDefinitions)})}}}}),CKEDITOR.dom.comment=function(a,f){typeof a=="string"&&(a=(f?f.$:document).createComment(a));CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"<\!--"+this.$.nodeValue+"--\>"}}),"use strict",function(){var a={},f={},b;for(b in CKEDITOR.dtd.$blockLimit)b in
CKEDITOR.dtd.$list||(a[b]=1);for(b in CKEDITOR.dtd.$block)b in CKEDITOR.dtd.$blockLimit||b in CKEDITOR.dtd.$empty||(f[b]=1);CKEDITOR.dom.elementPath=function(b,d){var c=null,h=null,i=[],g=b,j,d=d||b.getDocument().getBody();do if(g.type==CKEDITOR.NODE_ELEMENT){i.push(g);if(!this.lastElement){this.lastElement=g;if(g.is(CKEDITOR.dtd.$object)||g.getAttribute("contenteditable")=="false")continue}if(g.equals(d))break;if(!h){j=g.getName();g.getAttribute("contenteditable")=="true"?h=g:!c&&f[j]&&(c=g);if(a[j]){var k;
if(k=!c){if(j=j=="div"){a:{j=g.getChildren();k=0;for(var n=j.count();k<n;k++){var o=j.getItem(k);if(o.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[o.getName()]){j=true;break a}}j=false}j=!j}k=j}k?c=g:h=g}}}while(g=g.getParent());h||(h=d);this.block=c;this.blockLimit=h;this.root=d;this.elements=i}}(),CKEDITOR.dom.elementPath.prototype={compare:function(a){var f=this.elements,a=a&&a.elements;if(!a||f.length!=a.length)return false;for(var b=0;b<f.length;b++)if(!f[b].equals(a[b]))return false;return true},
contains:function(a,f,b){var e;typeof a=="string"&&(e=function(b){return b.getName()==a});a instanceof CKEDITOR.dom.element?e=function(b){return b.equals(a)}:CKEDITOR.tools.isArray(a)?e=function(b){return CKEDITOR.tools.indexOf(a,b.getName())>-1}:typeof a=="function"?e=a:typeof a=="object"&&(e=function(b){return b.getName()in a});var d=this.elements,c=d.length;f&&c--;if(b){d=Array.prototype.slice.call(d,0);d.reverse()}for(f=0;f<c;f++)if(e(d[f]))return d[f];return null},isContextFor:function(a){var f;
if(a in CKEDITOR.dtd.$block){f=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit;return!!f.getDtd()[a]}return true},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(a,f){typeof a=="string"&&(a=(f?f.$:document).createTextNode(a));this.$=a},CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},
getText:function(){return this.$.nodeValue},setText:function(a){this.$.nodeValue=a},split:function(a){var f=this.$.parentNode,b=f.childNodes.length,e=this.getLength(),d=this.getDocument(),c=new CKEDITOR.dom.text(this.$.splitText(a),d);if(f.childNodes.length==b)if(a>=e){c=d.createText("");c.insertAfter(this)}else{a=d.createText("");a.insertAfter(c);a.remove()}return c},substring:function(a,f){return typeof f!="number"?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,f)}}),function(){function a(a,
e,d){var c=a.serializable,f=e[d?"endContainer":"startContainer"],i=d?"endOffset":"startOffset",g=c?e.document.getById(a.startNode):a.startNode,a=c?e.document.getById(a.endNode):a.endNode;if(f.equals(g.getPrevious())){e.startOffset=e.startOffset-f.getLength()-a.getPrevious().getLength();f=a.getNext()}else if(f.equals(a.getPrevious())){e.startOffset=e.startOffset-f.getLength();f=a.getNext()}f.equals(g.getParent())&&e[i]++;f.equals(a.getParent())&&e[i]++;e[d?"endContainer":"startContainer"]=f;return e}
CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,f)};var f={createIterator:function(){var a=this,e=CKEDITOR.dom.walker.bookmark(),d=[],c;return{getNextRange:function(f){c=c==void 0?0:c+1;var i=a[c];if(i&&a.length>1){if(!c)for(var g=a.length-1;g>=0;g--)d.unshift(a[g].createBookmark(true));if(f)for(var j=0;a[c+j+1];){for(var k=i.document,f=0,g=k.getById(d[j].endNode),k=k.getById(d[j+1].startNode);;){g=
g.getNextSourceNode(false);if(k.equals(g))f=1;else if(e(g)||g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary())continue;break}if(!f)break;j++}for(i.moveToBookmark(d.shift());j--;){g=a[++c];g.moveToBookmark(d.shift());i.setEnd(g.endContainer,g.endOffset)}}return i}}},createBookmarks:function(b){for(var e=[],d,c=0;c<this.length;c++){e.push(d=this[c].createBookmark(b,true));for(var f=c+1;f<this.length;f++){this[f]=a(d,this[f]);this[f]=a(d,this[f],true)}}return e},createBookmarks2:function(a){for(var e=
[],d=0;d<this.length;d++)e.push(this[d].createBookmark2(a));return e},moveToBookmarks:function(a){for(var e=0;e<this.length;e++)this[e].moveToBookmark(a[e])}}}(),function(){function a(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function f(b){var c=CKEDITOR.skin["ua_"+b],d=CKEDITOR.env;if(c)for(var c=c.split(",").sort(function(a,b){return a>b?-1:1}),e=0,g;e<c.length;e++){g=c[e];if(d.ie&&(g.replace(/^ie/,"")==d.version||d.quirks&&g=="iequirks"))g=
"ie";if(d[g]){b=b+("_"+c[e]);break}}return CKEDITOR.getUrl(a()+b+".css")}function b(a,b){if(!c[a]){CKEDITOR.document.appendStyleSheet(f(a));c[a]=1}b&&b()}function e(a){var b=a.getById(h);if(!b){b=a.getHead().append("style");b.setAttribute("id",h);b.setAttribute("type","text/css")}return b}function d(a,b,c){var d,e,g;if(CKEDITOR.env.webkit){b=b.split("}").slice(0,-1);for(e=0;e<b.length;e++)b[e]=b[e].split("{")}for(var f=0;f<a.length;f++)if(CKEDITOR.env.webkit)for(e=0;e<b.length;e++){g=b[e][1];for(d=
0;d<c.length;d++)g=g.replace(c[d][0],c[d][1]);a[f].$.sheet.addRule(b[e][0],g)}else{g=b;for(d=0;d<c.length;d++)g=g.replace(c[d][0],c[d][1]);CKEDITOR.env.ie&&CKEDITOR.env.version<11?a[f].$.styleSheet.cssText=a[f].$.styleSheet.cssText+g:a[f].$.innerHTML=a[f].$.innerHTML+g}}var c={};CKEDITOR.skin={path:a,loadPart:function(c,d){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){b(c,d)}):b(c,d)},getPath:function(a){return CKEDITOR.getUrl(f(a))},
icons:{},addIcon:function(a,b,c,d){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:d||"16px"})},getIconStyle:function(a,b,c,d,e){var g;if(a){a=a.toLowerCase();b&&(g=this.icons[a+"-rtl"]);g||(g=this.icons[a])}a=c||g&&g.path||"";d=d||g&&g.offset;e=e||g&&g.bgsize||"16px";return a&&"background-image:url("+CKEDITOR.getUrl(a)+");background-position:0 "+d+"px;background-size:"+e+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var b=
e(CKEDITOR.document);return(this.setUiColor=function(a){var c=CKEDITOR.skin.chameleon,e=[[g,a]];this.uiColor=a;d([b],c(this,"editor"),e);d(i,c(this,"panel"),e)}).call(this,a)}});var h="cke_ui_color",i=[],g=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var b=a.editor,a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){a=e(a);i.push(a);var c=b.getUiColor();c&&d([a],CKEDITOR.skin.chameleon(b,
"panel"),[[g,c]])}};b.on("panelShow",a);b.on("menuShow",a);b.config.uiColor&&b.setUiColor(b.config.uiColor)}})}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=false;else{var a=CKEDITOR.dom.element.createFromHtml('<div style="width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"></div>',CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var f=a.getComputedStyle("border-top-color"),b=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!!(f&&f==
b)}catch(e){CKEDITOR.env.hc=false}a.remove()}if(CKEDITOR.env.hc)CKEDITOR.env.cssClass=CKEDITOR.env.cssClass+" cke_hc";CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending){delete CKEDITOR._.pending;for(f=0;f<a.length;f++){CKEDITOR.editor.prototype.constructor.apply(a[f][0],a[f][1]);CKEDITOR.add(a[f][0])}}}(),CKEDITOR.skin.name="moono",CKEDITOR.skin.ua_editor="ie,iequirks,ie7,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,iequirks,ie7,ie8",
CKEDITOR.skin.chameleon=function(){var a=function(){return function(a,b){for(var c=a.match(/[^#]./g),f=0;f<3;f++){var i=c,g=f,j;j=parseInt(c[f],16);j=("0"+(b<0?0|j*(1+b):0|j+(255-j)*b).toString(16)).slice(-2);i[g]=j}return"#"+c.join("")}}(),f=function(){var a=new CKEDITOR.template("background:#{to};background-image:-webkit-gradient(linear,lefttop,leftbottom,from({from}),to({to}));background-image:-moz-linear-gradient(top,{from},{to});background-image:-webkit-linear-gradient(top,{from},{to});background-image:-o-linear-gradient(top,{from},{to});background-image:-ms-linear-gradient(top,{from},{to});background-image:linear-gradient(top,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='{from}',endColorstr='{to}');");
return function(b,c){return a.output({from:b,to:c})}}(),b={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(e,d){var c=e.uiColor,c={id:"."+e.id,defaultBorder:a(c,-0.1),defaultGradient:f(a(c,0.9),c),lightGradient:f(a(c,1),a(c,0.7)),mediumGradient:f(a(c,0.8),a(c,0.5)),ckeButtonOn:f(a(c,0.6),a(c,0.7)),ckeResizer:a(c,-0.4),ckeToolbarSeparator:a(c,0.5),ckeColorauto:a(c,0.8),dialogBody:a(c,0.7),dialogTabSelected:f("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:a(c,-0.6),elementsPathBg:c,menubuttonIcon:a(c,0.5),menubuttonIconHover:a(c,0.3)};return b[d].output(c).replace(/\[/g,
"{").replace(/\]/g,"}")}}(),CKEDITOR.plugins.add("dialogui",{onLoad:function(){var a=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||false;for(var b=[this._],c=1;c<arguments.length;c++)b.push(arguments[c]);b.push(true);CKEDITOR.tools.extend.apply(CKEDITOR.tools,b);return this._},f={build:function(a,b,c){return new CKEDITOR.ui.dialog.textInput(a,b,c)}},b={build:function(a,b,c){return new CKEDITOR.ui.dialog[b.type](a,b,c)}},e={isChanged:function(){return this.getValue()!=
this.getInitValue()},reset:function(a){this.setValue(this.getInitValue(),a)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},d=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(a,b){if(!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=true}this.on("change",b)}},true),c=/^on([A-Z]\w+)/,h=function(a){for(var b in a)(c.test(b)||b=="title"||b=="type")&&delete a[b];return a};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(b,c,d,e){if(!(arguments.length<4)){var f=a.call(this,c);f.labelId=CKEDITOR.tools.getNextId()+"_label";this._.children=[];CKEDITOR.ui.dialog.uiElement.call(this,b,c,d,"div",null,{role:"presentation"},function(){var a=[],d=c.required?
" cke_required":"";if(c.labelLayout!="horizontal")a.push('<label class="cke_dialog_ui_labeled_label'+d+'" ',' id="'+f.labelId+'"',f.inputId?' for="'+f.inputId+'"':"",(c.labelStyle?' style="'+c.labelStyle+'"':"")+">",c.label,"</label>",'<div class="cke_dialog_ui_labeled_content"',c.controlStyle?' style="'+c.controlStyle+'"':"",' role="radiogroup" aria-labelledby="'+f.labelId+'">',e.call(this,b,c),"</div>");else{d={type:"hbox",widths:c.widths,padding:0,children:[{type:"html",html:'<label class="cke_dialog_ui_labeled_label'+
d+'" id="'+f.labelId+'" for="'+f.inputId+'"'+(c.labelStyle?' style="'+c.labelStyle+'"':"")+">"+CKEDITOR.tools.htmlEncode(c.label)+"</span>"},{type:"html",html:'<span class="cke_dialog_ui_labeled_content"'+(c.controlStyle?' style="'+c.controlStyle+'"':"")+">"+e.call(this,b,c)+"</span>"}]};CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,d,a)}return a.join("")})}},textInput:function(b,c,d){if(!(arguments.length<3)){a.call(this,c);var e=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",f={"class":"cke_dialog_ui_input_"+
c.type,id:e,type:c.type};if(c.validate)this.validate=c.validate;if(c.maxLength)f.maxlength=c.maxLength;if(c.size)f.size=c.size;if(c.inputStyle)f.style=c.inputStyle;var h=this,q=false;b.on("load",function(){h.getInputElement().on("keydown",function(a){a.data.getKeystroke()==13&&(q=true)});h.getInputElement().on("keyup",function(a){if(a.data.getKeystroke()==13&&q){b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0);q=false}},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,
b,c,d,function(){var a=['<div class="cke_dialog_ui_input_',c.type,'" role="presentation"'];c.width&&a.push('style="width:'+c.width+'" ');a.push("><input ");f["aria-labelledby"]=this._.labelId;this._.required&&(f["aria-required"]=this._.required);for(var b in f)a.push(b+'="'+f[b]+'" ');a.push(" /></div>");return a.join("")})}},textarea:function(b,c,d){if(!(arguments.length<3)){a.call(this,c);var e=this,f=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",h={};if(c.validate)this.validate=c.validate;
h.rows=c.rows||5;h.cols=c.cols||20;h["class"]="cke_dialog_ui_input_textarea "+(c["class"]||"");if(typeof c.inputStyle!="undefined")h.style=c.inputStyle;if(c.dir)h.dir=c.dir;CKEDITOR.ui.dialog.labeledElement.call(this,b,c,d,function(){h["aria-labelledby"]=this._.labelId;this._.required&&(h["aria-required"]=this._.required);var a=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea id="',f,'" '],b;for(b in h)a.push(b+'="'+CKEDITOR.tools.htmlEncode(h[b])+'" ');a.push(">",CKEDITOR.tools.htmlEncode(e._["default"]),
"</textarea></div>");return a.join("")})}},checkbox:function(b,c,d){if(!(arguments.length<3)){var e=a.call(this,c,{"default":!!c["default"]});if(c.validate)this.validate=c.validate;CKEDITOR.ui.dialog.uiElement.call(this,b,c,d,"span",null,null,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},true),d=[],f=CKEDITOR.tools.getNextId()+"_label",j={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":f};h(a);if(c["default"])j.checked=
"checked";if(typeof a.inputStyle!="undefined")a.style=a.inputStyle;e.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,d,"input",null,j);d.push(' <label id="',f,'" for="',j.id,'"'+(c.labelStyle?' style="'+c.labelStyle+'"':"")+">",CKEDITOR.tools.htmlEncode(c.label),"</label>");return d.join("")})}},radio:function(b,c,d){if(!(arguments.length<3)){a.call(this,c);if(!this._["default"])this._["default"]=this._.initValue=c.items[0][1];if(c.validate)this.validate=c.valdiate;var e=[],f=this;CKEDITOR.ui.dialog.labeledElement.call(this,
b,c,d,function(){for(var a=[],d=[],j=(c.id?c.id:CKEDITOR.tools.getNextId())+"_radio",m=0;m<c.items.length;m++){var v=c.items[m],t=v[2]!==void 0?v[2]:v[0],s=v[1]!==void 0?v[1]:v[0],p=CKEDITOR.tools.getNextId()+"_radio_input",A=p+"_label",p=CKEDITOR.tools.extend({},c,{id:p,title:null,type:null},true),t=CKEDITOR.tools.extend({},p,{title:t},true),u={type:"radio","class":"cke_dialog_ui_radio_input",name:j,value:s,"aria-labelledby":A},w=[];if(f._["default"]==s)u.checked="checked";h(p);h(t);if(typeof p.inputStyle!=
"undefined")p.style=p.inputStyle;p.keyboardFocusable=true;e.push(new CKEDITOR.ui.dialog.uiElement(b,p,w,"input",null,u));w.push(" ");new CKEDITOR.ui.dialog.uiElement(b,t,w,"label",null,{id:A,"for":u.id},v[0]);a.push(w.join(""))}new CKEDITOR.ui.dialog.hbox(b,e,a,d);return d.join("")});this._.children=e}},button:function(b,c,d){if(arguments.length){typeof c=="function"&&(c=c(b.getParentEditor()));a.call(this,c,{disabled:c.disabled||false});CKEDITOR.event.implementOn(this);var e=this;b.on("load",function(){var a=
this.getElement();(function(){a.on("click",function(a){e.click();a.data.preventDefault()});a.on("keydown",function(a){if(a.data.getKeystroke()in{32:1}){e.click();a.data.preventDefault()}})})();a.unselectable()},this);var f=CKEDITOR.tools.extend({},c);delete f.style;var h=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,b,f,d,"a",null,{style:c.style,href:"javascript:void(0)",title:c.label,hidefocus:"true","class":c["class"],role:"button","aria-labelledby":h},'<span id="'+
h+'" class="cke_dialog_ui_button">'+CKEDITOR.tools.htmlEncode(c.label)+"</span>")}},select:function(b,c,d){if(!(arguments.length<3)){var e=a.call(this,c);if(c.validate)this.validate=c.validate;e.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,c,d,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_select":CKEDITOR.tools.getNextId()+"_select"},true),d=[],f=[],j={id:e.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};d.push('<div class="cke_dialog_ui_input_',
c.type,'" role="presentation"');c.width&&d.push('style="width:'+c.width+'" ');d.push(">");if(c.size!=void 0)j.size=c.size;if(c.multiple!=void 0)j.multiple=c.multiple;h(a);for(var m=0,v;m<c.items.length&&(v=c.items[m]);m++)f.push('<option value="',CKEDITOR.tools.htmlEncode(v[1]!==void 0?v[1]:v[0]).replace(/"/g,"&quot;"),'" /> ',CKEDITOR.tools.htmlEncode(v[0]));if(typeof a.inputStyle!="undefined")a.style=a.inputStyle;e.select=new CKEDITOR.ui.dialog.uiElement(b,a,d,"select",null,j,f.join(""));d.push("</div>");
return d.join("")})}},file:function(b,c,d){if(!(arguments.length<3)){c["default"]===void 0&&(c["default"]="");var e=CKEDITOR.tools.extend(a.call(this,c),{definition:c,buttons:[]});if(c.validate)this.validate=c.validate;b.on("load",function(){CKEDITOR.document.getById(e.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,c,d,function(){e.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" role="presentation" id="',
e.frameId,'" title="',c.label,'" src="javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"></iframe>');return a.join("")})}},fileButton:function(b,c,d){if(!(arguments.length<3)){a.call(this,c);var e=this;if(c.validate)this.validate=c.validate;var f=CKEDITOR.tools.extend({},c),h=f.onClick;f.className=(f.className?f.className+" ":"")+"cke_dialog_ui_button";f.onClick=function(a){var d=
c["for"];if(!h||h.call(this,a)!==false){b.getContentElement(d[0],d[1]).submit();this.disable()}};b.on("load",function(){b.getContentElement(c["for"][0],c["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,b,f,d)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,c=/\/$/;return function(d,e,f){if(!(arguments.length<3)){var h=[],l=e.html;l.charAt(0)!="<"&&(l="<span>"+l+"</span>");var m=e.focus;if(m){var v=this.focus;this.focus=function(){(typeof m==
"function"?m:v).call(this);this.fire("focus")};if(e.isFocusable)this.isFocusable=this.isFocusable;this.keyboardFocusable=true}CKEDITOR.ui.dialog.uiElement.call(this,d,e,h,"span",null,null,"");h=h.join("").match(a);l=l.match(b)||["","",""];if(c.test(l[1])){l[1]=l[1].slice(0,-1);l[2]="/"+l[2]}f.push([l[1]," ",h[1]||"",l[2]].join(""))}}}(),fieldset:function(a,b,c,d,e){var f=e.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,e,d,"fieldset",null,null,function(){var a=[];f&&a.push("<legend"+
(e.labelStyle?' style="'+e.labelStyle+'"':"")+">"+f+"</legend>");for(var b=0;b<c.length;b++)a.push(c[b]);return a.join("")})}},true);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);b.getChildCount()<1?(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||a.getChildCount()<1?"":a.getChild(0).getText()},eventProcessors:d},true);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return!this._.disabled?this.fire("click",{dialog:this._.dialog}):false},enable:function(){this._.disabled=false;var a=this.getElement();a&&a.removeClass("cke_disabled")},disable:function(){this._.disabled=true;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)})}},true),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:true},true);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();if(b){b.$.focus();b.$.select()}},0)},accessKeyUp:function(){this.select()},setValue:function(a){!a&&(a="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},keyboardFocusable:true},e,true);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 d=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),e=this.getInputElement().$;d.$.text=a;d.$.value=b===void 0||b===null?a:b;c===void 0||c===null?CKEDITOR.env.ie?e.add(d.$):e.add(d.$,null):e.add(d.$,c);return this},remove:function(a){this.getInputElement().$.remove(a);return this},clear:function(){for(var a=this.getInputElement().$;a.length>
0;)a.remove(0);return this},keyboardFocusable:true},e,true);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})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(a,b){if(!CKEDITOR.env.ie||CKEDITOR.env.version>
8)return d.onChange.apply(this,arguments);a.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;b.propertyName=="checked"&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",b);return null}},keyboardFocusable:true},e,true);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(a,b){for(var c=this._.children,d,e=0;e<c.length&&(d=c[e]);e++)d.getElement().$.checked=d.getValue()==
a;!b&&this.fire("change",{value:a})},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()},eventProcessors:{onChange:function(a,b){if(CKEDITOR.env.ie){a.on("load",function(){for(var a=this._.children,b=this,c=0;c<a.length;c++)a[c].getElement().on("propertychange",
function(a){a=a.data.$;a.propertyName=="checked"&&this.$.checked&&b.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",b)}else return d.onChange.apply(this,arguments);return null}}},e,true);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,e,{getInputElement:function(){var a=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return a.$.forms.length>0?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,d=function(a,b,c,d){a.on("formLoaded",function(){a.getInputElement().on(c,d,a)})},e;for(e in a)if(c=e.match(b))this.eventProcessors[e]?this.eventProcessors[e].call(this,this._.dialog,a[e]):d(this,this._.dialog,c[1].toLowerCase(),a[e]);return this},reset:function(){function a(){c.$.open();var i="";d.size&&
(i=d.size-(CKEDITOR.env.ie?7:0));var t=b.frameId+"_input";c.$.write(['<html dir="'+l+'" lang="'+m+'"><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">','<form enctype="multipart/form-data" method="POST" dir="'+l+'" lang="'+m+'" action="',CKEDITOR.tools.htmlEncode(d.action),'"><label id="',b.labelId,'" for="',t,'" style="display:none">',CKEDITOR.tools.htmlEncode(d.label),'</label><input style="width:100%" id="',t,'" aria-labelledby="',b.labelId,'" type="file" name="',
CKEDITOR.tools.htmlEncode(d.id||"cke_upload"),'" size="',CKEDITOR.tools.htmlEncode(i>0?i:""),'" /></form></body></html><script>',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+f+");","window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction("+h+")}","<\/script>"].join(""));c.$.close();for(i=0;i<e.length;i++)e[i].enable()}var b=this._,c=CKEDITOR.document.getById(b.frameId).getFrameDocument(),d=b.definition,e=b.buttons,f=this.formLoadedNumber,
h=this.formUnloadNumber,l=b.dialog._.editor.lang.dir,m=b.dialog._.editor.langCode;if(!f){f=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this);h=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this);this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(f);CKEDITOR.tools.removeFunction(h)})}CKEDITOR.env.gecko?setTimeout(a,500):a()},getValue:function(){return this.getInputElement().$.value||
""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(a,b){if(!this._.domOnChangeRegistered){this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this);this._.domOnChangeRegistered=true}this.on("change",b)}},keyboardFocusable:true},true);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",f);CKEDITOR.dialog.addUIElement("password",f);CKEDITOR.dialog.addUIElement("textarea",b);CKEDITOR.dialog.addUIElement("checkbox",b);CKEDITOR.dialog.addUIElement("radio",b);CKEDITOR.dialog.addUIElement("button",b);CKEDITOR.dialog.addUIElement("select",b);CKEDITOR.dialog.addUIElement("file",b);CKEDITOR.dialog.addUIElement("fileButton",b);CKEDITOR.dialog.addUIElement("html",b);CKEDITOR.dialog.addUIElement("fieldset",{build:function(a,b,c){for(var d=b.children,e,f=
[],h=[],l=0;l<d.length&&(e=d[l]);l++){var m=[];f.push(m);h.push(CKEDITOR.dialog._.uiElementBuilders[e.type].build(a,e,m))}return new CKEDITOR.ui.dialog[b.type](a,h,f,c,b)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=2,CKEDITOR.DIALOG_RESIZE_BOTH=3,function(){function a(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+a,c=b-1;c>b-a;c--)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%
a];return null}function f(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),c=b+1;c<b+a;c++)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function b(a,b){for(var c=a.$.getElementsByTagName("input"),d=0,e=c.length;d<e;d++){var f=new CKEDITOR.dom.element(c[d]);if(f.getAttribute("type").toLowerCase()=="text")if(b){f.setAttribute("value",f.getCustomData("fake_value")||"");f.removeCustomData("fake_value")}else{f.setCustomData("fake_value",
f.getAttribute("value"));f.setAttribute("value","")}}}function e(a,b){var c=this.getInputElement();c&&(a?c.removeAttribute("aria-invalid"):c.setAttribute("aria-invalid",true));a||(this.select?this.select():this.focus());b&&alert(b);this.fire("validated",{valid:a,msg:b})}function d(){var a=this.getInputElement();a&&a.removeAttribute("aria-invalid")}function c(a){var a=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",m).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":""})),b=a.getChild([0,0,0,0,0]),c=b.getChild(0),d=b.getChild(1);if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var e="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())";CKEDITOR.dom.element.createFromHtml('<iframe frameBorder="0" class="cke_iframe_shim" src="'+e+'" tabIndex="-1"></iframe>').appendTo(b.getParent())}c.unselectable();
d.unselectable();return{element:a,parts:{dialog:a.getChild(0),title:c,close:d,tabs:b.getChild(2),contents:b.getChild([3,0,0,0]),footer:b.getChild([3,0,1,0])}}}function h(a,b,c){this.element=b;this.focusIndex=c;this.tabIndex=0;this.isFocusable=function(){return!b.getAttribute("disabled")&&b.isVisible()};this.focus=function(){a._.currentFocusIndex=this.focusIndex;this.element.focus()};b.on("keydown",function(a){a.data.getKeystroke()in{32:1,13:1}&&this.fire("click")});b.on("focus",function(){this.fire("mouseover")});
b.on("blur",function(){this.fire("mouseout")})}function i(a){function b(){a.layout()}var c=CKEDITOR.document.getWindow();c.on("resize",b);a.on("hide",function(){c.removeListener("resize",b)})}function g(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function j(a){function b(c){var i=a.getSize(),j=CKEDITOR.document.getWindow().getViewPaneSize(),l=c.data.$.screenX,k=c.data.$.screenY,m=l-d.x,t=k-d.y;d={x:l,y:k};e.x=e.x+m;e.y=e.y+t;a.move(e.x+g[3]<h?-g[3]:e.x-g[1]>j.width-i.width-h?j.width-i.width+
(f.lang.dir=="rtl"?0:g[1]):e.x,e.y+g[0]<h?-g[0]:e.y-g[2]>j.height-i.height-h?j.height-i.height+g[2]:e.y,1);c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=r.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",c)}}var d=null,e=null;a.getElement().getFirst();var f=a.getParentEditor(),h=f.config.dialog_magnetDistance,g=CKEDITOR.skin.margins||[0,0,0,
0];typeof h=="undefined"&&(h=20);a.parts.title.on("mousedown",function(f){d={x:f.data.$.screenX,y:f.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);e=a.getPosition();if(CKEDITOR.env.ie6Compat){var h=r.getChild(0).getFrameDocument();h.on("mousemove",b);h.on("mouseup",c)}f.data.preventDefault()},a)}function k(a){var b,c;function d(e){var m=g.lang.dir=="rtl",t=k.width,s=k.height,p=t+(e.data.$.screenX-b)*(m?-1:1)*(a._.moved?1:2),v=s+(e.data.$.screenY-c)*(a._.moved?
1:2),n=a._.element.getFirst(),n=m&&n.getComputedStyle("right"),u=a.getPosition();u.y+v>l.height&&(v=l.height-u.y);if((m?n:u.x)+p>l.width)p=l.width-(m?n:u.x);if(h==CKEDITOR.DIALOG_RESIZE_WIDTH||h==CKEDITOR.DIALOG_RESIZE_BOTH)t=Math.max(f.minWidth||0,p-i);if(h==CKEDITOR.DIALOG_RESIZE_HEIGHT||h==CKEDITOR.DIALOG_RESIZE_BOTH)s=Math.max(f.minHeight||0,v-j);a.resize(t,s);a._.moved||a.layout();e.data.preventDefault()}function e(){CKEDITOR.document.removeListener("mouseup",e);CKEDITOR.document.removeListener("mousemove",
d);if(m){m.remove();m=null}if(CKEDITOR.env.ie6Compat){var a=r.getChild(0).getFrameDocument();a.removeListener("mouseup",e);a.removeListener("mousemove",d)}}var f=a.definition,h=f.resizable;if(h!=CKEDITOR.DIALOG_RESIZE_NONE){var g=a.getParentEditor(),i,j,l,k,m,t=CKEDITOR.tools.addFunction(function(f){k=a.getSize();var h=a.parts.contents;if(h.$.getElementsByTagName("iframe").length){m=CKEDITOR.dom.element.createFromHtml('<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%;"></div>');
h.append(m)}j=k.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks));i=k.width-a.parts.contents.getSize("width",1);b=f.screenX;c=f.screenY;l=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",d);CKEDITOR.document.on("mouseup",e);if(CKEDITOR.env.ie6Compat){h=r.getChild(0).getFrameDocument();h.on("mousemove",d);h.on("mouseup",e)}f.preventDefault&&f.preventDefault()});a.on("load",function(){var b="";h==CKEDITOR.DIALOG_RESIZE_WIDTH?
b=" cke_resizer_horizontal":h==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('<div class="cke_resizer'+b+" cke_resizer_"+g.lang.dir+'" title="'+CKEDITOR.tools.htmlEncode(g.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+t+', event )">'+(g.lang.dir=="ltr"?"◢":"◣")+"</div>");a.parts.footer.append(b,1)});g.on("destroy",function(){CKEDITOR.tools.removeFunction(t)})}}function n(a){a.data.preventDefault(1)}function o(a){var b=CKEDITOR.document.getWindow(),
c=a.config,d=c.dialog_backgroundCoverColor||"white",e=c.dialog_backgroundCoverOpacity,f=c.baseFloatZIndex,c=CKEDITOR.tools.genKey(d,e,f),h=w[c];if(h)h.show();else{f=['<div tabIndex="-1" style="position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",f,"; top: 0px; left: 0px; ",!CKEDITOR.env.ie6Compat?"background-color: "+d:"",'" class="cke_dialog_background_cover">'];if(CKEDITOR.env.ie6Compat){d="<html><body style=\\'background-color:"+d+";\\'></body></html>";f.push('<iframe hidefocus="true" frameborder="0" id="cke_dialog_background_iframe" src="javascript:');
f.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+d+"' );document.close();")+"})())");f.push('" style="position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0)"></iframe>')}f.push("</div>");h=CKEDITOR.dom.element.createFromHtml(f.join(""));h.setOpacity(e!=void 0?e:0.5);h.on("keydown",n);h.on("keypress",n);h.on("keyup",n);h.appendTo(CKEDITOR.document.getBody());w[c]=h}a.focusManager.add(h);
r=h;var a=function(){var a=b.getViewPaneSize();h.setStyles({width:a.width+"px",height:a.height+"px"})},g=function(){var a=b.getScrollPosition(),c=CKEDITOR.dialog._.currentTop;h.setStyles({left:a.x+"px",top:a.y+"px"});if(c){do{a=c.getPosition();c.move(a.x,a.y)}while(c=c._.parentDialog)}};u=a;b.on("resize",a);a();(!CKEDITOR.env.mac||!CKEDITOR.env.webkit)&&h.focus();if(CKEDITOR.env.ie6Compat){var i=function(){g();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){i.prevScrollHandler=
window.onscroll||function(){};window.onscroll=i},0);g()}}function q(a){if(r){a.focusManager.remove(r);a=CKEDITOR.document.getWindow();r.hide();a.removeListener("resize",u);CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0);u=null}}var l=CKEDITOR.tools.cssLength,m='<div class="cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir="{langDir}" lang="{langCode}" role="dialog" aria-labelledby="cke_dialog_title_{id}"><table class="cke_dialog '+
CKEDITOR.env.cssClass+' cke_{langDir}" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="cke_dialog_body" role="presentation"><div id="cke_dialog_title_{id}" class="cke_dialog_title" role="presentation"></div><a id="cke_dialog_close_button_{id}" class="cke_dialog_close_button" href="javascript:void(0)" title="{closeTitle}" role="button"><span class="cke_label">X</span></a><div id="cke_dialog_tabs_{id}" class="cke_dialog_tabs" role="tablist"></div><table class="cke_dialog_contents" role="presentation"><tr><td id="cke_dialog_contents_{id}" class="cke_dialog_contents_body" role="presentation"></td></tr><tr><td id="cke_dialog_footer_{id}" class="cke_dialog_footer" role="presentation"></td></tr></table></div></td></tr></table></div>';
CKEDITOR.dialog=function(b,h){function g(){var a=r._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,c=0;c<b;c++)a[c].focusIndex=c}function i(a){var b=r._.focusList,a=a||0;if(!(b.length<1)){var c=r._.currentFocusIndex;try{b[c].getInputElement().$.blur()}catch(d){}for(var e=c=(c+a+b.length)%b.length;a&&!b[e].isFocusable();){e=(e+a+b.length)%b.length;if(e==c)break}b[e].focus();b[e].type=="text"&&b[e].select()}}function l(c){if(r==
CKEDITOR.dialog._.currentTop){var d=c.data.getKeystroke(),e=b.lang.dir=="rtl";q=o=0;if(d==9||d==CKEDITOR.SHIFT+9){d=d==CKEDITOR.SHIFT+9;if(r._.tabBarMode){d=d?a.call(r):f.call(r);r.selectPage(d);r._.tabs[d][0].focus()}else i(d?-1:1);q=1}else if(d==CKEDITOR.ALT+121&&!r._.tabBarMode&&r.getPageCount()>1){r._.tabBarMode=true;r._.tabs[r._.currentTabId][0].focus();q=1}else if((d==37||d==39)&&r._.tabBarMode){d=d==(e?39:37)?a.call(r):f.call(r);r.selectPage(d);r._.tabs[d][0].focus();q=1}else if((d==13||d==
32)&&r._.tabBarMode){this.selectPage(this._.currentTabId);this._.tabBarMode=false;this._.currentFocusIndex=-1;i(1);q=1}else if(d==13){d=c.data.getTarget();if(!d.is("a","button","select","textarea")&&(!d.is("input")||d.$.type!="button")){(d=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(d.click,0,d);q=1}o=1}else if(d==27){(d=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(d.click,0,d):this.fire("cancel",{hide:true}).hide!==false&&this.hide();o=1}else return;m(c)}}function m(a){q?a.data.preventDefault(1):
o&&a.data.stopPropagation()}var t=CKEDITOR.dialog._.dialogDefinitions[h],s=CKEDITOR.tools.clone(v),p=b.config.dialog_buttonsOrder||"OS",n=b.lang.dir,u={},q,o;(p=="OS"&&CKEDITOR.env.mac||p=="rtl"&&n=="ltr"||p=="ltr"&&n=="rtl")&&s.buttons.reverse();t=CKEDITOR.tools.extend(t(b),s);t=CKEDITOR.tools.clone(t);t=new A(this,t);s=c(b);this._={editor:b,element:s.element,name:h,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,
currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:false,focusList:[],currentFocusIndex:0,hasFocus:false};this.parts=s.parts;CKEDITOR.tools.setTimeout(function(){b.fire("ariaWidget",this.parts.contents)},0,this);s={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"};s[n=="rtl"?"right":"left"]=0;this.parts.dialog.setStyles(s);CKEDITOR.event.call(this);this.definition=t=CKEDITOR.fire("dialogDefinition",{name:h,definition:t},b).definition;if(!("removeDialogTabs"in b._)&&
b.config.removeDialogTabs){s=b.config.removeDialogTabs.split(";");for(n=0;n<s.length;n++){p=s[n].split(":");if(p.length==2){var w=p[0];u[w]||(u[w]=[]);u[w].push(p[1])}}b._.removeDialogTabs=u}if(b._.removeDialogTabs&&(u=b._.removeDialogTabs[h]))for(n=0;n<u.length;n++)t.removeContents(u[n]);if(t.onLoad)this.on("load",t.onLoad);if(t.onShow)this.on("show",t.onShow);if(t.onHide)this.on("hide",t.onHide);if(t.onOk)this.on("ok",function(a){b.fire("saveSnapshot");setTimeout(function(){b.fire("saveSnapshot")},
0);if(t.onOk.call(this,a)===false)a.data.hide=false});if(t.onCancel)this.on("cancel",function(a){if(t.onCancel.call(this,a)===false)a.data.hide=false});var r=this,y=function(a){var b=r._.contents,c=false,d;for(d in b)for(var e in b[d])if(c=a.call(this,b[d][e]))return};this.on("ok",function(a){y(function(b){if(b.validate){var c=b.validate(this),d=typeof c=="string"||c===false;if(d){a.data.hide=false;a.stop()}e.call(b,!d,typeof c=="string"?c:void 0);return d}})},this,null,0);this.on("cancel",function(a){y(function(c){if(c.isChanged()){if(!b.config.dialog_noConfirmCancel&&
!confirm(b.lang.common.confirmCancel))a.data.hide=false;return true}})},this,null,0);this.parts.close.on("click",function(a){this.fire("cancel",{hide:true}).hide!==false&&this.hide();a.data.preventDefault()},this);this.changeFocus=i;var x=this._.element;b.focusManager.add(x,1);this.on("show",function(){x.on("keydown",l,this);if(CKEDITOR.env.gecko)x.on("keypress",m,this)});this.on("hide",function(){x.removeListener("keydown",l);CKEDITOR.env.gecko&&x.removeListener("keypress",m);y(function(a){d.apply(a)})});
this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",l,this,null,0)});this.on("show",function(){g();if(b.config.dialog_startupFocusTab&&r._.pageCount>1){r._.tabBarMode=true;r._.tabs[r._.currentTabId][0].focus()}else if(!this._.hasFocus){this._.currentFocusIndex=-1;if(t.onFocus){var a=t.onFocus.call(this);a&&a.focus()}else i(1)}},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var a=this.getElement(),b=a.getFirst();
b.remove();b.appendTo(a)},this);j(this);k(this);(new CKEDITOR.dom.text(t.title,CKEDITOR.document)).appendTo(this.parts.title);for(n=0;n<t.contents.length;n++)(u=t.contents[n])&&this.addPage(u);this.parts.tabs.on("click",function(a){var b=a.data.getTarget();if(b.hasClass("cke_dialog_tab")){b=b.$.id;this.selectPage(b.substring(4,b.lastIndexOf("_")));if(this._.tabBarMode){this._.tabBarMode=false;this._.currentFocusIndex=-1;i(1)}a.data.preventDefault()}},this);n=[];u=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,
{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:t.buttons},n).getChild();this.parts.footer.setHtml(n.join(""));for(n=0;n<u.length;n++)this._.buttons[u[n].id]=u[n]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(){return function(a,b){if(!this._.contentSize||!(this._.contentSize.width==a&&this._.contentSize.height==b)){CKEDITOR.dialog.fire("resize",{dialog:this,width:a,height:b},this._.editor);this.fire("resize",{width:a,height:b},
this._.editor);this.parts.contents.setStyles({width:a+"px",height:b+"px"});if(this._.editor.lang.dir=="rtl"&&this._.position)this._.position.x=CKEDITOR.document.getWindow().getViewPaneSize().width-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10);this._.contentSize={width:a,height:b}}}}(),getSize:function(){var a=this._.element.getFirst();return{width:a.$.offsetWidth||0,height:a.$.offsetHeight||0}},move:function(a,b,c){var d=this._.element.getFirst(),e=this._.editor.lang.dir==
"rtl",f=d.getComputedStyle("position")=="fixed";CKEDITOR.env.ie&&d.setStyle("zoom","100%");if(!f||!this._.position||!(this._.position.x==a&&this._.position.y==b)){this._.position={x:a,y:b};if(!f){f=CKEDITOR.document.getWindow().getScrollPosition();a=a+f.x;b=b+f.y}if(e){f=this.getSize();a=CKEDITOR.document.getWindow().getViewPaneSize().width-f.width-a}b={top:(b>0?b:0)+"px"};b[e?"right":"left"]=(a>0?a:0)+"px";d.setStyles(b);c&&(this._.moved=1)}},getPosition:function(){return CKEDITOR.tools.extend({},
this._.position)},show:function(){var a=this._.element,b=this.definition;!a.getParent()||!a.getParent().equals(CKEDITOR.document.getBody())?a.appendTo(CKEDITOR.document.getBody()):a.setStyle("display","block");this.resize(this._.contentSize&&this._.contentSize.width||b.width||b.minWidth,this._.contentSize&&this._.contentSize.height||b.height||b.minHeight);this.reset();this.selectPage(this.definition.contents[0].id);if(CKEDITOR.dialog._.currentZIndex===null)CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex;
this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex=CKEDITOR.dialog._.currentZIndex+10);if(CKEDITOR.dialog._.currentTop===null){CKEDITOR.dialog._.currentTop=this;this._.parentDialog=null;o(this._.editor)}else{this._.parentDialog=CKEDITOR.dialog._.currentTop;this._.parentDialog.getElement().getFirst().$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2);CKEDITOR.dialog._.currentTop=this}a.on("keydown",y);a.on("keyup",z);this._.hasFocus=false;for(var c in b.contents)if(b.contents[c]){var a=
b.contents[c],d=this._.tabs[a.id],e=a.requiredContent,f=0;if(d){for(var h in this._.contents[a.id]){var g=this._.contents[a.id][h];if(!(g.type=="hbox"||g.type=="vbox"||!g.getInputElement()))if(g.requiredContent&&!this._.editor.activeFilter.check(g.requiredContent))g.disable();else{g.enable();f++}}!f||e&&!this._.editor.activeFilter.check(e)?d[0].addClass("cke_dialog_tab_disabled"):d[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();i(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,b=this.getSize(),c=CKEDITOR.document.getWindow().getViewPaneSize(),d=(c.width-b.width)/2,e=(c.height-b.height)/2;CKEDITOR.env.ie6Compat||(b.height+(e>0?e:0)>c.height||b.width+(d>0?d:0)>c.width?a.setStyle("position",
"absolute"):a.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:d,this._.moved?this._.position.y:e)},foreach:function(a){for(var b in this._.contents)for(var c in this._.contents[b])a.call(this,this._.contents[b][c]);return this},reset:function(){var a=function(a){a.reset&&a.reset(1)};return function(){this.foreach(a);return this}}(),setupContent:function(){var a=arguments;this.foreach(function(b){b.setup&&b.setup.apply(b,a)})},commitContent:function(){var a=arguments;this.foreach(function(b){CKEDITOR.env.ie&&
this._.currentFocusIndex==b.focusIndex&&b.getInputElement().$.blur();b.commit&&b.commit.apply(b,a)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{});this._.editor.fire("dialogHide",this);this.selectPage(this._.tabIdList[0]);var a=this._.element;a.setStyle("display","none");this.parts.dialog.setStyle("visibility","hidden");for(G(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();
b.setStyle("z-index",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else q(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex=CKEDITOR.dialog._.currentZIndex-10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",y);a.removeListener("keyup",z);var c=this._.editor;c.focus();setTimeout(function(){c.focusManager.unlock()},0)}delete this._.parentDialog;this.foreach(function(a){a.resetInitValue&&a.resetInitValue()})}},
addPage:function(a){if(!a.requiredContent||this._.editor.filter.check(a.requiredContent)){for(var b=[],c=a.label?' title="'+CKEDITOR.tools.htmlEncode(a.label)+'"':"",d=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:a.elements,expand:!!a.expand,padding:a.padding,style:a.style||"width: 100%;"},b),e=this._.contents[a.id]={},f=d.getChild(),h=0;d=f.shift();){!d.notAllowed&&(d.type!="hbox"&&d.type!="vbox")&&h++;e[d.id]=d;typeof d.getChild==
"function"&&f.push.apply(f,d.getChild())}if(!h)a.hidden=true;b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");d=CKEDITOR.env;e="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();c=CKEDITOR.dom.element.createFromHtml(['<a class="cke_dialog_tab"',this._.pageCount>0?" cke_last":"cke_first",c,a.hidden?' style="display:none"':"",' id="',e,'"',d.gecko&&!d.hc?"":' href="javascript:void(0)"',' tabIndex="-1" hidefocus="true" role="tab">',a.label,"</a>"].join(""));b.setAttribute("aria-labelledby",
e);this._.tabs[a.id]=[c,b];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++;this._.lastTab=c;this.updateStyle();b.setAttribute("name",a.id);b.appendTo(this.parts.contents);c.unselectable();this.parts.tabs.append(c);if(a.accessKey){B(this,this,"CTRL+"+a.accessKey,E,C);this._.accessKeyMap["CTRL+"+a.accessKey]=a.id}}},selectPage:function(a){if(this._.currentTabId!=a&&!this._.tabs[a][0].hasClass("cke_dialog_tab_disabled")&&this.fire("selectPage",{page:a,currentPage:this._.currentTabId})!==false){for(var c in this._.tabs){var d=
this._.tabs[c][0],e=this._.tabs[c][1];if(c!=a){d.removeClass("cke_dialog_tab_selected");e.hide()}e.setAttribute("aria-hidden",c!=a)}var f=this._.tabs[a];f[0].addClass("cke_dialog_tab_selected");if(CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat){b(f[1]);f[1].show();setTimeout(function(){b(f[1],1)},0)}else f[1].show();this._.currentTabId=a;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,a)}},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?"add":"remove")+"Class"]("cke_single_page")},
hidePage:function(b){var c=this._.tabs[b]&&this._.tabs[b][0];if(c&&this._.pageCount!=1&&c.isVisible()){b==this._.currentTabId&&this.selectPage(a.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,b){var c=this._.contents[a];return c&&c[b]},getValueOf:function(a,b){return this.getContentElement(a,
b).getValue()},setValueOf:function(a,b,c){return this.getContentElement(a,b).setValue(c)},getButton:function(a){return this._.buttons[a]},click:function(a){return this._.buttons[a].click()},disableButton:function(a){return this._.buttons[a].disable()},enableButton:function(a){return this._.buttons[a].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},
addFocusable:function(a,b){if(typeof b=="undefined"){b=this._.focusList.length;this._.focusList.push(new h(this,a,b))}else{this._.focusList.splice(b,0,new h(this,a,b));for(var c=b+1;c<this._.focusList.length;c++)this._.focusList[c].focusIndex++}}};CKEDITOR.tools.extend(CKEDITOR.dialog,{add:function(a,b){if(!this._.dialogDefinitions[a]||typeof b=="function")this._.dialogDefinitions[a]=b},exists:function(a){return!!this._.dialogDefinitions[a]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},
isTabEnabled:function(a,b,c){a=a.config.removeDialogTabs;return!(a&&a.match(RegExp("(?:^|;)"+b+":"+c+"(?:$|;)","i")))},okButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"ok",type:"button",label:a.lang.common.ok,"class":"cke_dialog_ui_button_ok",onClick:function(a){a=a.data.dialog;a.fire("ok",{hide:true}).hide!==false&&a.hide()}},b,true)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},true)};return a}(),
cancelButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"cancel",type:"button",label:a.lang.common.cancel,"class":"cke_dialog_ui_button_cancel",onClick:function(a){a=a.data.dialog;a.fire("cancel",{hide:true}).hide!==false&&a.hide()}},b,true)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},true)};return a}(),addUIElement:function(a,b){this._.uiElementBuilders[a]=b}});CKEDITOR.dialog._={uiElementBuilders:{},
dialogDefinitions:{},currentTop:null,currentZIndex:null};CKEDITOR.event.implementOn(CKEDITOR.dialog);CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);var v={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},t=function(a,b,c){for(var d=0,e;e=a[d];d++){if(e.id==b)return e;if(c&&e[c])if(e=t(e[c],b,c))return e}return null},s=function(a,b,c,d,e){if(c){for(var f=0,h;h=a[f];f++){if(h.id==c){a.splice(f,0,b);return b}if(d&&
h[d])if(h=s(h[d],b,c,d,true))return h}if(e)return null}a.push(b);return b},p=function(a,b,c){for(var d=0,e;e=a[d];d++){if(e.id==b)return a.splice(d,1);if(c&&e[c])if(e=p(e[c],b,c))return e}return null},A=function(a,b){this.dialog=a;for(var c=b.contents,d=0,e;e=c[d];d++)c[d]=e&&new g(a,e);CKEDITOR.tools.extend(this,b)};A.prototype={getContents:function(a){return t(this.contents,a)},getButton:function(a){return t(this.buttons,a)},addContents:function(a,b){return s(this.contents,a,b)},addButton:function(a,
b){return s(this.buttons,a,b)},removeContents:function(a){p(this.contents,a)},removeButton:function(a){p(this.buttons,a)}};g.prototype={get:function(a){return t(this.elements,a,"children")},add:function(a,b){return s(this.elements,a,b,"children")},remove:function(a){p(this.elements,a,"children")}};var u,w={},r,x={},y=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode);if((b=x[(b?"CTRL+":"")+(c?"ALT+":"")+(d?"SHIFT+":"")+
e])&&b.length){b=b[b.length-1];b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key);a.data.preventDefault()}},z=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode);if((b=x[(b?"CTRL+":"")+(c?"ALT+":"")+(d?"SHIFT+":"")+e])&&b.length){b=b[b.length-1];if(b.keyup){b.keyup.call(b.uiElement,b.dialog,b.key);a.data.preventDefault()}}},B=function(a,b,c,d,e){(x[c]||(x[c]=[])).push({uiElement:a,dialog:b,key:c,keyup:e||a.accessKeyUp,
keydown:d||a.accessKeyDown})},G=function(a){for(var b in x){for(var c=x[b],d=c.length-1;d>=0;d--)(c[d].dialog==a||c[d].uiElement==a)&&c.splice(d,1);c.length===0&&delete x[b]}},C=function(a,b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])},E=function(){};(function(){CKEDITOR.ui.dialog={uiElement:function(a,b,c,d,e,f,h){if(!(arguments.length<4)){var g=(d.call?d(b):d)||"div",i=["<",g," "],j=(e&&e.call?e(b):e)||{},l=(f&&f.call?f(b):f)||{},t=(h&&h.call?h.call(this,a,b):h)||"",m=this.domId=l.id||
CKEDITOR.tools.getNextId()+"_uiElement";this.id=b.id;if(b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)){j.display="none";this.notAllowed=true}l.id=m;var k={};b.type&&(k["cke_dialog_ui_"+b.type]=1);b.className&&(k[b.className]=1);b.disabled&&(k.cke_disabled=1);for(var s=l["class"]&&l["class"].split?l["class"].split(" "):[],m=0;m<s.length;m++)s[m]&&(k[s[m]]=1);s=[];for(m in k)s.push(m);l["class"]=s.join(" ");if(b.title)l.title=b.title;k=(b.style||"").split(";");if(b.align){s=
b.align;j["margin-left"]=s=="left"?0:"auto";j["margin-right"]=s=="right"?0:"auto"}for(m in j)k.push(m+":"+j[m]);b.hidden&&k.push("display:none");for(m=k.length-1;m>=0;m--)k[m]===""&&k.splice(m,1);if(k.length>0)l.style=(l.style?l.style+"; ":"")+k.join("; ");for(m in l)i.push(m+'="'+CKEDITOR.tools.htmlEncode(l[m])+'" ');i.push(">",t,"</",g,">");c.push(i.join(""));(this._||(this._={})).dialog=a;if(typeof b.isChanged=="boolean")this.isChanged=function(){return b.isChanged};if(typeof b.isChanged=="function")this.isChanged=
b.isChanged;if(typeof b.setValue=="function")this.setValue=CKEDITOR.tools.override(this.setValue,function(a){return function(c){a.call(this,b.setValue.call(this,c))}});if(typeof b.getValue=="function")this.getValue=CKEDITOR.tools.override(this.getValue,function(a){return function(){return b.getValue.call(this,a.call(this))}});CKEDITOR.event.implementOn(this);this.registerEvents(b);this.accessKeyUp&&(this.accessKeyDown&&b.accessKey)&&B(this,a,"CTRL+"+b.accessKey);var p=this;a.on("load",function(){var b=
p.getInputElement();if(b){var c=p.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&CKEDITOR.env.version<8?"cke_dialog_ui_focused":"";b.on("focus",function(){a._.tabBarMode=false;a._.hasFocus=true;p.fire("focus");c&&this.addClass(c)});b.on("blur",function(){p.fire("blur");c&&this.removeClass(c)})}});CKEDITOR.tools.extend(this,b);if(this.keyboardFocusable){this.tabIndex=b.tabIndex||0;this.focusIndex=a._.focusList.push(this)-1;this.on("focus",function(){a._.currentFocusIndex=p.focusIndex})}}},hbox:function(a,
b,c,d,e){if(!(arguments.length<4)){this._||(this._={});var f=this._.children=b,h=e&&e.widths||null,g=e&&e.height||null,i,j={role:"presentation"};e&&e.align&&(j.align=e.align);CKEDITOR.ui.dialog.uiElement.call(this,a,e||{type:"hbox"},d,"table",{},j,function(){var a=['<tbody><tr class="cke_dialog_ui_hbox">'];for(i=0;i<c.length;i++){var b="cke_dialog_ui_hbox_child",d=[];i===0&&(b="cke_dialog_ui_hbox_first");i==c.length-1&&(b="cke_dialog_ui_hbox_last");a.push('<td class="',b,'" role="presentation" ');
h?h[i]&&d.push("width:"+l(h[i])):d.push("width:"+Math.floor(100/c.length)+"%");g&&d.push("height:"+l(g));e&&e.padding!=void 0&&d.push("padding:"+l(e.padding));CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&f[i].align)&&d.push("text-align:"+f[i].align);d.length>0&&a.push('style="'+d.join("; ")+'" ');a.push(">",c[i],"</td>")}a.push("</tr></tbody>");return a.join("")})}},vbox:function(a,b,c,d,e){if(!(arguments.length<3)){this._||(this._={});var f=this._.children=b,h=e&&e.width||null,g=e&&e.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,
a,e||{type:"vbox"},d,"div",null,{role:"presentation"},function(){var b=['<table role="presentation" cellspacing="0" border="0" '];b.push('style="');e&&e.expand&&b.push("height:100%;");b.push("width:"+l(h||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align="',CKEDITOR.tools.htmlEncode(e&&e.align||(a.getParentEditor().lang.dir=="ltr"?"left":"right")),'" ');b.push("><tbody>");for(var d=0;d<c.length;d++){var i=[];b.push('<tr><td role="presentation" ');h&&i.push("width:"+
l(h||"100%"));g?i.push("height:"+l(g[d])):e&&e.expand&&i.push("height:"+Math.floor(100/c.length)+"%");e&&e.padding!=void 0&&i.push("padding:"+l(e.padding));CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&f[d].align)&&i.push("text-align:"+f[d].align);i.length>0&&b.push('style="',i.join("; "),'" ');b.push(' class="cke_dialog_ui_vbox_child">',c[d],"</td></tr>")}b.push("</tbody></table>");return b.join("")})}}}})();CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},
getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(a,b){this.getInputElement().setValue(a);!b&&this.fire("change",{value:a});return this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return false},selectParentTab:function(){for(var a=this.getInputElement();(a=a.getParent())&&a.$.className.search("cke_dialog_page_contents")==-1;);if(!a)return this;a=a.getAttribute("name");this._.dialog._.currentTabId!=
a&&this._.dialog.selectPage(a);return this},focus:function(){this.selectParentTab().getInputElement().focus();return this},registerEvents:function(a){var b=/^on([A-Z]\w+)/,c,d=function(a,b,c,d){b.on("load",function(){a.getInputElement().on(c,d,a)})},e;for(e in a)if(c=e.match(b))this.eventProcessors[e]?this.eventProcessors[e].call(this,this._.dialog,a[e]):d(this,this._.dialog,c[1].toLowerCase(),a[e]);return this},eventProcessors:{onLoad:function(a,b){a.on("load",b,this)},onShow:function(a,b){a.on("show",
b,this)},onHide:function(a,b){a.on("hide",b,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var a=this.getElement();this.getInputElement().setAttribute("disabled","true");a.addClass("cke_disabled")},enable:function(){var a=this.getElement();this.getInputElement().removeAttribute("disabled");a.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},
isFocusable:function(){return!this.isEnabled()||!this.isVisible()?false:true}};CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(a){if(arguments.length<1)return this._.children.concat();a.splice||(a=[a]);return a.length<2?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?this._.children[a[0]].getChild(a.slice(1,a.length)):null}},true);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a=
{build:function(a,b,c){for(var d=b.children,e,f=[],h=[],g=0;g<d.length&&(e=d[g]);g++){var i=[];f.push(i);h.push(CKEDITOR.dialog._.uiElementBuilders[e.type].build(a,e,i))}return new CKEDITOR.ui.dialog[b.type](a,h,f,c,b)}};CKEDITOR.dialog.addUIElement("hbox",a);CKEDITOR.dialog.addUIElement("vbox",a)})();CKEDITOR.dialogCommand=function(a,b){this.dialogName=a;CKEDITOR.tools.extend(this,b,true)};CKEDITOR.dialogCommand.prototype={exec:function(a){a.openDialog(this.dialogName)},canUndo:false,editorFocus:1};
(function(){var a=/^([a]|[^a])+$/,b=/^\d*$/,c=/^\d*(?:\.\d+)?$/,d=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,e=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,f=/^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_AND=2;CKEDITOR.dialog.validate={functions:function(){var a=arguments;return function(){var b=this&&this.getValue?this.getValue():a[0],c=void 0,d=CKEDITOR.VALIDATE_AND,e=[],f;for(f=0;f<a.length;f++)if(typeof a[f]=="function")e.push(a[f]);else break;if(f<a.length&&
typeof a[f]=="string"){c=a[f];f++}f<a.length&&typeof a[f]=="number"&&(d=a[f]);var h=d==CKEDITOR.VALIDATE_AND?true:false;for(f=0;f<e.length;f++)h=d==CKEDITOR.VALIDATE_AND?h&&e[f](b):h||e[f](b);return!h?c:true}},regex:function(a,b){return function(c){c=this&&this.getValue?this.getValue():c;return!a.test(c)?b:true}},notEmpty:function(b){return this.regex(a,b)},integer:function(a){return this.regex(b,a)},number:function(a){return this.regex(c,a)},cssLength:function(a){return this.functions(function(a){return e.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){return f.test(CKEDITOR.tools.trim(a))},a)},equals:function(a,b){return this.functions(function(b){return b==a},b)},notEqual:function(a,b){return this.functions(function(b){return b!=a},b)}};CKEDITOR.on("instanceDestroyed",function(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var b;b=CKEDITOR.dialog._.currentTop;)b.hide();for(var c in w)w[c].remove();
w={}}var a=a.editor._.storedDialogs,d;for(d in a)a[d].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b){var c=null,d=CKEDITOR.dialog._.dialogDefinitions[a];CKEDITOR.dialog._.currentTop===null&&o(this);if(typeof d=="function"){c=this._.storedDialogs||(this._.storedDialogs={});c=c[a]||(c[a]=new CKEDITOR.dialog(this,a));b&&b.call(c,c);c.show()}else{if(d=="failed"){q(this);throw Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');
}typeof d=="string"&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(d),function(){typeof CKEDITOR.dialog._.dialogDefinitions[a]!="function"&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed");this.openDialog(a,b)},this,0,1)}CKEDITOR.skin.loadPart("dialog");return c}})}(),CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(a){a.on("doubleclick",function(f){f.data.dialog&&a.openDialog(f.data.dialog)},null,null,999)}}),function(){CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{ar:1,
bg:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,en:1,"en-gb":1,eo:1,es:1,et:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,nb:1,nl:1,no:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},init:function(a){var f=this;a.addCommand("a11yHelp",{exec:function(){var b=a.langCode,b=f.availableLangs[b]?b:f.availableLangs[b.replace(/-.*/,"")]?b.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(f.path+
"dialogs/lang/"+b+".js"),function(){a.lang.a11yhelp=f.langEntries[b];a.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:false});a.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js")}})}(),CKEDITOR.plugins.add("about",{requires:"dialog",init:function(a){var f=a.addCommand("about",new CKEDITOR.dialogCommand("about"));f.modes={wysiwyg:1,source:1};f.canUndo=false;f.readOnly=1;a.ui.addButton&&a.ui.addButton("About",{label:a.lang.about.title,
command:"about",toolbar:"about"});CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}}),CKEDITOR.plugins.add("basicstyles",{init:function(a){var f=0,b=function(b,c,d,j){if(j){var j=new CKEDITOR.style(j),k=e[d];k.unshift(j);a.attachStyleStateChange(j,function(b){!a.readOnly&&a.getCommand(d).setState(b)});a.addCommand(d,new CKEDITOR.styleCommand(j,{contentForms:k}));a.ui.addButton&&a.ui.addButton(b,{label:c,command:d,toolbar:"basicstyles,"+(f=f+10)})}},e={bold:["strong","b",["span",function(a){a=
a.styles["font-weight"];return a=="bold"||+a>=700}]],italic:["em","i",["span",function(a){return a.styles["font-style"]=="italic"}]],underline:["u",["span",function(a){return a.styles["text-decoration"]=="underline"}]],strike:["s","strike",["span",function(a){return a.styles["text-decoration"]=="line-through"}]],subscript:["sub"],superscript:["sup"]},d=a.config,c=a.lang.basicstyles;b("Bold",c.bold,"bold",d.coreStyles_bold);b("Italic",c.italic,"italic",d.coreStyles_italic);b("Underline",c.underline,
"underline",d.coreStyles_underline);b("Strike",c.strike,"strike",d.coreStyles_strike);b("Subscript",c.subscript,"subscript",d.coreStyles_subscript);b("Superscript",c.superscript,"superscript",d.coreStyles_superscript);a.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}}),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"},function(){var a={exec:function(a){var b=a.getCommand("blockquote").state,e=a.getSelection(),d=e&&e.getRanges()[0];if(d){var c=e.createBookmarks();if(CKEDITOR.env.ie){var h=c[0].startNode,i=c[0].endNode,g;if(h&&h.getParent().getName()=="blockquote")for(g=h;g=g.getNext();)if(g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary()){h.move(g,
true);break}if(i&&i.getParent().getName()=="blockquote")for(g=i;g=g.getPrevious();)if(g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary()){i.move(g);break}}var j=d.createIterator();j.enlargeBr=a.config.enterMode!=CKEDITOR.ENTER_BR;if(b==CKEDITOR.TRISTATE_OFF){for(h=[];b=j.getNextParagraph();)h.push(b);if(h.length<1){b=a.document.createElement(a.config.enterMode==CKEDITOR.ENTER_P?"p":"div");i=c.shift();d.insertNode(b);b.append(new CKEDITOR.dom.text("﻿",a.document));d.moveToBookmark(i);d.selectNodeContents(b);
d.collapse(true);i=d.createBookmark();h.push(b);c.unshift(i)}g=h[0].getParent();d=[];for(i=0;i<h.length;i++){b=h[i];g=g.getCommonAncestor(b.getParent())}for(b={table:1,tbody:1,tr:1,ol:1,ul:1};b[g.getName()];)g=g.getParent();for(i=null;h.length>0;){for(b=h.shift();!b.getParent().equals(g);)b=b.getParent();b.equals(i)||d.push(b);i=b}for(;d.length>0;){b=d.shift();if(b.getName()=="blockquote"){for(i=new CKEDITOR.dom.documentFragment(a.document);b.getFirst();){i.append(b.getFirst().remove());h.push(i.getLast())}i.replace(b)}else h.push(b)}d=
a.document.createElement("blockquote");for(d.insertBefore(h[0]);h.length>0;){b=h.shift();d.append(b)}}else if(b==CKEDITOR.TRISTATE_ON){i=[];for(g={};b=j.getNextParagraph();){for(h=d=null;b.getParent();){if(b.getParent().getName()=="blockquote"){d=b.getParent();h=b;break}b=b.getParent()}if(d&&h&&!h.getCustomData("blockquote_moveout")){i.push(h);CKEDITOR.dom.element.setMarker(g,h,"blockquote_moveout",true)}}CKEDITOR.dom.element.clearAllMarkers(g);b=[];h=[];for(g={};i.length>0;){j=i.shift();d=j.getParent();
if(j.getPrevious())if(j.getNext()){j.breakParent(j.getParent());h.push(j.getNext())}else j.remove().insertAfter(d);else j.remove().insertBefore(d);if(!d.getCustomData("blockquote_processed")){h.push(d);CKEDITOR.dom.element.setMarker(g,d,"blockquote_processed",true)}b.push(j)}CKEDITOR.dom.element.clearAllMarkers(g);for(i=h.length-1;i>=0;i--){d=h[i];a:{g=d;for(var j=0,k=g.getChildCount(),n=void 0;j<k&&(n=g.getChild(j));j++)if(n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()){g=false;break a}g=true}g&&
d.remove()}if(a.config.enterMode==CKEDITOR.ENTER_BR)for(d=true;b.length;){j=b.shift();if(j.getName()=="div"){i=new CKEDITOR.dom.documentFragment(a.document);d&&(j.getPrevious()&&!(j.getPrevious().type==CKEDITOR.NODE_ELEMENT&&j.getPrevious().isBlockBoundary()))&&i.append(a.document.createElement("br"));for(d=j.getNext()&&!(j.getNext().type==CKEDITOR.NODE_ELEMENT&&j.getNext().isBlockBoundary());j.getFirst();)j.getFirst().remove().appendTo(i);d&&i.append(a.document.createElement("br"));i.replace(j);
d=false}}}e.selectBookmarks(c);a.focus()}},refresh:function(a,b){this.setState(a.elementPath(b.block||b.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(f){if(!f.blockless){f.addCommand("blockquote",a);f.ui.addButton&&f.ui.addButton("Blockquote",{label:f.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"})}}})}(),"use strict",
function(){function a(a){function b(){var c=a.editable();c.on(x,function(a){(!CKEDITOR.env.ie||!u)&&s(a)});CKEDITOR.env.ie&&c.on("paste",function(b){if(!w){e();b.data.preventDefault();s(b);o("paste")||a.openDialog("paste")}});if(CKEDITOR.env.ie){c.on("contextmenu",f,null,null,0);c.on("beforepaste",function(a){a.data&&!a.data.$.ctrlKey&&f()},null,null,0)}c.on("beforecut",function(){!u&&l(a)});var d;c.attachListener(CKEDITOR.env.ie?c:a.document.getDocumentElement(),"mouseup",function(){d=setTimeout(function(){p()},
0)});a.on("destroy",function(){clearTimeout(d)});c.on("keyup",p)}function c(b){return{type:b,canUndo:b=="cut",startDisabled:true,exec:function(){this.type=="cut"&&l();var b;var c=this.type;if(CKEDITOR.env.ie)b=o(c);else try{b=a.document.$.execCommand(c,false,null)}catch(d){b=false}b||alert(a.lang.clipboard[this.type+"Error"]);return b}}}function d(){return{canUndo:false,async:true,exec:function(a,b){var c=function(b,c){b&&q(b.type,b.dataValue,!!c);a.fire("afterCommandExec",{name:"paste",command:d,
returnValue:!!b})},d=this;typeof b=="string"?c({type:"auto",dataValue:b},1):a.getClipboardData(c)}}}function e(){w=1;setTimeout(function(){w=0},100)}function f(){u=1;setTimeout(function(){u=0},10)}function o(b){var c=a.document,d=c.getBody(),e=false,f=function(){e=true};d.on(b,f);(CKEDITOR.env.version>7?c.$:c.$.selection.createRange()).execCommand(b);d.removeListener(b,f);return e}function q(b,c,d){b={type:b};if(d&&a.fire("beforePaste",b)===false||!c)return false;b.dataValue=c;return a.fire("paste",
b)}function l(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var b=a.getSelection(),c,d,e;if(b.getType()==CKEDITOR.SELECTION_ELEMENT&&(c=b.getSelectedElement())){d=b.getRanges()[0];e=a.document.createText("");e.insertBefore(c);d.setStartBefore(e);d.setEndAfter(c);b.selectRanges([d]);setTimeout(function(){if(c.getParent()){e.remove();b.selectElement(c)}},0)}}}function m(b,c){var d=a.document,e=a.editable(),f=function(a){a.cancel()},g;if(!d.getById("cke_pastebin")){var i=a.getSelection(),j=i.createBookmarks(),
l=new CKEDITOR.dom.element((CKEDITOR.env.webkit||e.is("body"))&&!CKEDITOR.env.ie?"body":"div",d);l.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var m=0,d=d.getWindow();if(CKEDITOR.env.webkit){e.append(l);l.addClass("cke_editable");if(!e.is("body")){m=e.getComputedStyle("position")!="static"?e:CKEDITOR.dom.element.get(e.$.offsetParent);m=m.getDocumentPosition().y}}else e.getAscendant(CKEDITOR.env.ie?"body":"html",1).append(l);l.setStyles({position:"absolute",top:d.getScrollPosition().y-m+
10+"px",width:"1px",height:Math.max(1,d.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0});if(m=l.getParent().isReadOnly()){l.setOpacity(0);l.setAttribute("contenteditable",true)}else l.setStyle(a.config.contentsLangDirection=="ltr"?"left":"right","-1000px");a.on("selectionChange",f,null,null,0);if(CKEDITOR.env.webkit||CKEDITOR.env.gecko)g=e.once("blur",f,null,null,-100);m&&l.focus();m=new CKEDITOR.dom.range(l);m.selectNodeContents(l);var t=m.select();CKEDITOR.env.ie&&(g=e.once("blur",
function(){a.lockSelection(t)}));var k=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){if(CKEDITOR.env.webkit)CKEDITOR.document.getBody().$.scrollTop=k;g&&g.removeListener();CKEDITOR.env.ie&&e.focus();i.selectBookmarks(j);l.remove();var b;if(CKEDITOR.env.webkit&&(b=l.getFirst())&&b.is&&b.hasClass("Apple-style-span"))l=b;a.removeListener("selectionChange",f);c(l.getHtml())},0)}}function v(){if(CKEDITOR.env.ie){a.focus();e();var b=a.focusManager;b.lock();if(a.editable().fire(x)&&
!o("paste")){b.unlock();return false}b.unlock()}else try{if(a.editable().fire(x)&&!a.document.$.execCommand("Paste",false,null))throw 0;}catch(c){return false}return true}function t(b){if(a.mode=="wysiwyg")switch(b.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:b=a.editable();e();!CKEDITOR.env.ie&&b.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:a.fire("saveSnapshot");setTimeout(function(){a.fire("saveSnapshot")},50)}}function s(b){var c={type:"auto"},d=a.fire("beforePaste",
c);m(b,function(a){a=a.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");d&&q(c.type,a,0,1)})}function p(){if(a.mode=="wysiwyg"){var b=A("paste");a.getCommand("cut").setState(A("cut"));a.getCommand("copy").setState(A("copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function A(b){if(r&&b in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if(b=="paste")return CKEDITOR.TRISTATE_OFF;var b=a.getSelection(),c=b.getRanges();return b.getType()==CKEDITOR.SELECTION_NONE||c.length==
1&&c[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var u=0,w=0,r=0,x=CKEDITOR.env.ie?"beforepaste":"paste";(function(){a.on("key",t);a.on("contentDom",b);a.on("selectionChange",function(a){r=a.data.selection.getRanges()[0].checkReadOnly();p()});a.contextMenu&&a.contextMenu.addListener(function(a,b){r=b.getRanges()[0].checkReadOnly();return{cut:A("cut"),copy:A("copy"),paste:A("paste")}})})();(function(){function b(c,d,e,f,g){var i=a.lang.clipboard[d];a.addCommand(d,e);a.ui.addButton&&
a.ui.addButton(c,{label:i,command:d,toolbar:"clipboard,"+f});a.addMenuItems&&a.addMenuItem(d,{label:i,command:d,group:"clipboard",order:g})}b("Cut","cut",c("cut"),10,1);b("Copy","copy",c("copy"),20,4);b("Paste","paste",d(),30,8)})();a.getClipboardData=function(b,c){function d(a){a.removeListener();a.cancel();c(a.data)}function e(a){a.removeListener();a.cancel();j=true;c({type:i,dataValue:a.data})}function f(){this.customTitle=b&&b.title}var g=false,i="auto",j=false;if(!c){c=b;b=null}a.on("paste",
d,null,null,0);a.on("beforePaste",function(a){a.removeListener();g=true;i=a.data.type},null,null,1E3);if(v()===false){a.removeListener("paste",d);if(g&&a.fire("pasteDialog",f)){a.on("pasteDialogCommit",e);a.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",e);setTimeout(function(){j||c(null)},10)})}else c(null)}}}function f(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi)&&
!a.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}else return"html";return"htmlifiedtext"}function b(a,b){function d(a){return CKEDITOR.tools.repeat("</p><p>",~~(a/2))+(a%2==1?"<br>":"")}b=b.replace(/\s+/g," ").replace(/> +</g,"><").replace(/<br ?\/>/gi,"<br>");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;if(CKEDITOR.env.webkit&&b.indexOf("<div>")>-1){b=
b.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"<br>").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"<div></div>");b.match(/<div>(<br>|)<\/div>/)&&(b="<p>"+b.replace(/(<div>(<br>|)<\/div>)+/g,function(a){return d(a.split("</div><div>").length+1)})+"</p>");b=b.replace(/<\/div><div>/g,"<br>");b=b.replace(/<\/?div>/g,"")}if(CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR){CKEDITOR.env.gecko&&(b=b.replace(/^<br><br>$/,"<br>"));b.indexOf("<br><br>")>-1&&(b="<p>"+b.replace(/(<br>){2,}/g,
function(a){return d(a.length/4)})+"</p>")}return c(a,b)}function e(){var a=new CKEDITOR.htmlParser.filter,b={blockquote:1,dl:1,fieldset:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ol:1,p:1,table:1,ul:1},c=CKEDITOR.tools.extend({br:0},CKEDITOR.dtd.$inline),d={p:1,br:1,"cke:br":1},e=CKEDITOR.dtd,f=CKEDITOR.tools.extend({area:1,basefont:1,embed:1,iframe:1,map:1,object:1,param:1},CKEDITOR.dtd.$nonBodyContent,CKEDITOR.dtd.$cdata),o=function(a){delete a.name;a.add(new CKEDITOR.htmlParser.text(" "))},q=function(a){for(var b=
a,c;(b=b.next)&&b.name&&b.name.match(/^h\d$/);){c=new CKEDITOR.htmlParser.element("cke:br");c.isEmpty=true;for(a.add(c);c=b.children.shift();)a.add(c)}};a.addRules({elements:{h1:q,h2:q,h3:q,h4:q,h5:q,h6:q,img:function(a){var a=CKEDITOR.tools.trim(a.attributes.alt||""),b=" ";a&&!a.match(/(^http|\.(jpe?g|gif|png))/i)&&(b=" ["+a+"] ");return new CKEDITOR.htmlParser.text(b)},td:o,th:o,$:function(a){var h=a.name,v;if(f[h])return false;a.attributes={};if(h=="br")return a;if(b[h])a.name="p";else if(c[h])delete a.name;
else if(e[h]){v=new CKEDITOR.htmlParser.element("cke:br");v.isEmpty=true;if(CKEDITOR.dtd.$empty[h])return v;a.add(v,0);v=v.clone();v.isEmpty=true;a.add(v);delete a.name}d[a.name]||delete a.name;return a}}},{applyToAll:true});return a}function d(a,b,d){var b=new CKEDITOR.htmlParser.fragment.fromHtml(b),e=new CKEDITOR.htmlParser.basicWriter;b.writeHtml(e,d);var b=e.getHtml(),b=b.replace(/\s*(<\/?[a-z:]+ ?\/?>)\s*/g,"$1").replace(/(<cke:br \/>){2,}/g,"<cke:br />").replace(/(<cke:br \/>)(<\/?p>|<br \/>)/g,
"$2").replace(/(<\/?p>|<br \/>)(<cke:br \/>)/g,"$1").replace(/<(cke:)?br( \/)?>/g,"<br>").replace(/<p><\/p>/g,""),f=0,b=b.replace(/<\/?p>/g,function(a){if(a=="<p>"){if(++f>1)return"</p><p>"}else if(--f>0)return"</p><p>";return a}).replace(/<p><\/p>/g,"");return c(a,b)}function c(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat("<br>",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"<$1div>"));return b}
CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(c){var i;a(c);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));c.on("paste",function(a){var b=a.data.dataValue,c=CKEDITOR.dtd.$block;if(b.indexOf("Apple-")>-1){b=b.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi," ");a.data.type!="html"&&(b=b.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g,"&nbsp;&nbsp; &nbsp;")}));if(b.indexOf('<br class="Apple-interchange-newline">')>
-1){a.data.startsWithEOL=1;a.data.preSniffing="html";b=b.replace(/<br class="Apple-interchange-newline">/,"")}b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1")}if(b.match(/^<[^<]+cke_(editable|contents)/i)){var d,e,f=new CKEDITOR.dom.element("div");for(f.setHtml(b);f.getChildCount()==1&&(d=f.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)f=e=d;e&&(b=e.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?b=b.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(b,
d){if(d.toLowerCase()in c){a.data.preSniffing="html";return"<"+d}return b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,function(b,d){if(d in c){a.data.endsWithEOL=1;return"</"+d+">"}return b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$1"));a.data.dataValue=b},null,null,3);c.on("paste",function(a){var a=a.data,j=a.type,k=a.dataValue,n,o=c.config.clipboard_defaultContentType||"html";n=j=="html"||a.preSniffing=="html"?"html":f(k);n=="htmlifiedtext"?k=b(c.config,k):j=="text"&&n==
"html"&&(k=d(c.config,k,i||(i=e(c))));a.startsWithEOL&&(k='<br data-cke-eol="1">'+k);a.endsWithEOL&&(k=k+'<br data-cke-eol="1">');j=="auto"&&(j=n=="html"||o=="html"?"html":"text");a.type=j;a.dataValue=k;delete a.preSniffing;delete a.startsWithEOL;delete a.endsWithEOL},null,null,6);c.on("paste",function(a){a=a.data;c.insertHtml(a.dataValue,a.type);setTimeout(function(){c.fire("afterPaste")},0)},null,null,1E3);c.on("pasteDialog",function(a){setTimeout(function(){c.openDialog("paste",a.data)},0)})}})}(),
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 a=CKEDITOR.addTemplate("panel",
'<div lang="{langCode}" id="{id}" dir={dir} class="cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style="z-index:{z-index}" role="presentation">{frame}</div>'),f=CKEDITOR.addTemplate("panel-frame",'<iframe id="{id}" class="cke_panel_frame" role="presentation" frameborder="0" src="{src}"></iframe>'),b=CKEDITOR.addTemplate("panel-frame-inner",'<!DOCTYPE html><html class="cke_panel_container {env}" dir="{dir}" lang="{langCode}"><head>{css}</head><body class="cke_{dir}" style="margin:0;padding:0" onload="{onload}"></body></html>');
CKEDITOR.ui.panel.prototype={render:function(e,d){this.getHolderElement=function(){var a=this._.holder;if(!a){if(this.isFramed){var a=this.document.getById(this.id+"_frame"),d=a.getParent(),a=a.getFrameDocument();CKEDITOR.env.iOS&&d.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"});d=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=true;if(this.onLoad)this.onLoad()},this));a.write(b.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),
onload:"window.parent.CKEDITOR.tools.callFunction("+d+");"},c)));a.getWindow().$.CKEDITOR=CKEDITOR;a.on("keydown",function(a){var b=a.data.getKeystroke(),c=this.document.getById(this.id).getAttribute("dir");this._.onKeyDown&&this._.onKeyDown(b)===false?a.data.preventDefault():(b==27||b==(c=="rtl"?39:37))&&this.onEscape&&this.onEscape(b)===false&&a.data.preventDefault()},this);a=a.getBody();a.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(d)}else a=this.document.getById(this.id);this._.holder=
a}return a};var c={editorId:e.id,id:this.id,langCode:e.langCode,dir:e.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":e.config.baseFloatZIndex+1};if(this.isFramed){var h=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";c.frame=f.output({id:this.id+"_frame",src:h})}h=a.output(c);d&&d.push(h);return h},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){var a=this._.blocks[a],b=this._.currentBlock,c=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");b&&b.hide();this._.currentBlock=a;CKEDITOR.fire("ariaWidget",c);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){if(a!=-1){a=this.element.getElementsByTag("a").getItem(this._.focusIndex=a);CKEDITOR.env.webkit&&a.getDocument().getWindow().focus();a.focus();this.onMark&&this.onMark(a)}}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){(!this.onHide||this.onHide.call(this)!==true)&&this.element.setStyle("display","none")},onKeyDown:function(a,b){var c=this.keys[a];switch(c){case "next":for(var f=this._.focusIndex,c=this.element.getElementsByTag("a"),
i;i=c.getItem(++f);)if(i.getAttribute("_cke_focus")&&i.$.offsetWidth){this._.focusIndex=f;i.focus();break}if(!i&&!b){this._.focusIndex=-1;return this.onKeyDown(a,1)}return false;case "prev":f=this._.focusIndex;for(c=this.element.getElementsByTag("a");f>0&&(i=c.getItem(--f));){if(i.getAttribute("_cke_focus")&&i.$.offsetWidth){this._.focusIndex=f;i.focus();break}i=null}if(!i&&!b){this._.focusIndex=c.count();return this.onKeyDown(a,1)}return false;case "click":case "mouseup":f=this._.focusIndex;(i=f>=
0&&this.element.getElementsByTag("a").getItem(f))&&(i.$[c]?i.$[c]():i.$["on"+c]());return false}return true}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function a(a,e,d,c,h){var h=CKEDITOR.tools.genKey(e.getUniqueId(),d.getUniqueId(),a.lang.dir,a.uiColor||"",c.css||"",h||""),i=f[h];if(!i){i=f[h]=new CKEDITOR.ui.panel(e,c);i.element=d.append(CKEDITOR.dom.element.createFromHtml(i.render(a),e));i.element.setStyles({display:"none",position:"absolute"})}return i}var f={};CKEDITOR.ui.floatPanel=
CKEDITOR.tools.createClass({$:function(b,e,d,c){function f(){k.hide()}d.forceIFrame=1;d.toolbarRelated&&b.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(e=CKEDITOR.document.getById("cke_"+b.name));var i=e.getDocument(),c=a(b,i,e,d,c||0),g=c.element,j=g.getFirst(),k=this;g.disableContextMenu();this.element=g;this._={editor:b,panel:c,parentElement:e,definition:d,document:i,iframe:j,children:[],dir:b.lang.dir};b.on("mode",f);b.on("resize",f);if(!CKEDITOR.env.iOS)i.getWindow().on("resize",f)},proto:{addBlock:function(a,
e){return this._.panel.addBlock(a,e)},addListBlock:function(a,e){return this._.panel.addListBlock(a,e)},getBlock:function(a){return this._.panel.getBlock(a)},showBlock:function(a,e,d,c,f,i){var g=this._.panel,j=g.showBlock(a);this.allowBlur(false);a=this._.editor.editable();this._.returnFocus=a.hasFocus?a:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);this._.hideTimeout=0;var k=this.element,a=this._.iframe,a=CKEDITOR.env.ie?a:new CKEDITOR.dom.window(a.$.contentWindow),n=k.getDocument(),
o=this._.parentElement.getPositionedAncestor(),q=e.getDocumentPosition(n),n=o?o.getDocumentPosition(n):{x:0,y:0},l=this._.dir=="rtl",m=q.x+(c||0)-n.x,v=q.y+(f||0)-n.y;if(l&&(d==1||d==4))m=m+e.$.offsetWidth;else if(!l&&(d==2||d==3))m=m+(e.$.offsetWidth-1);if(d==3||d==4)v=v+(e.$.offsetHeight-1);this._.panel._.offsetParentId=e.getId();k.setStyles({top:v+"px",left:0,display:""});k.setOpacity(0);k.getFirst().removeStyle("width");this._.editor.focusManager.add(a);if(!this._.blurSet){CKEDITOR.event.useCapture=
true;a.on("blur",function(a){function b(){delete this._.returnFocus;this.hide()}if(this.allowBlur()&&a.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild)if(CKEDITOR.env.iOS){if(!this._.hideTimeout)this._.hideTimeout=CKEDITOR.tools.setTimeout(b,0,this)}else b.call(this)},this);a.on("focus",function(){this._.focused=true;this.hideChild();this.allowBlur(true)},this);if(CKEDITOR.env.iOS){a.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this);a.on("touchend",
function(){this._.hideTimeout=0;this.focus()},this)}CKEDITOR.event.useCapture=false;this._.blurSet=1}g.onEscape=CKEDITOR.tools.bind(function(a){if(this.onEscape&&this.onEscape(a)===false)return false},this);CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.tools.bind(function(){k.removeStyle("width");if(j.autoSize){var a=j.element.getDocument(),a=(CKEDITOR.env.webkit?j.element:a.getBody()).$.scrollWidth;CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&a>0)&&(a=a+((k.$.offsetWidth||0)-(k.$.clientWidth||0)+
3));k.setStyle("width",a+10+"px");a=j.element.$.scrollHeight;CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&a>0)&&(a=a+((k.$.offsetHeight||0)-(k.$.clientHeight||0)+3));k.setStyle("height",a+"px");g._.currentBlock.element.setStyle("display","none").removeStyle("display")}else k.removeStyle("height");l&&(m=m-k.$.offsetWidth);k.setStyle("left",m+"px");var b=g.element.getWindow(),a=k.$.getBoundingClientRect(),b=b.getViewPaneSize(),c=a.width||a.right-a.left,d=a.height||a.bottom-a.top,e=l?a.right:b.width-a.left,
f=l?b.width-a.right:a.left;l?e<c&&(m=f>c?m+c:b.width>c?m-a.left:m-a.right+b.width):e<c&&(m=f>c?m-c:b.width>c?m-a.right+b.width:m-a.left);c=a.top;b.height-a.top<d&&(v=c>d?v-d:b.height>d?v-a.bottom+b.height:v-a.top);if(CKEDITOR.env.ie){b=a=new CKEDITOR.dom.element(k.$.offsetParent);b.getName()=="html"&&(b=b.getDocument().getBody());b.getComputedStyle("direction")=="rtl"&&(m=CKEDITOR.env.ie8Compat?m-k.getDocument().getDocumentElement().$.scrollLeft*2:m-(a.$.scrollWidth-a.$.clientWidth))}var a=k.getFirst(),
h;(h=a.getCustomData("activePanel"))&&h.onHide&&h.onHide.call(this,1);a.setCustomData("activePanel",this);k.setStyles({top:v+"px",left:m+"px"});k.setOpacity(1);i&&i()},this);g.isLoaded?a():g.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();j.element.focus();if(CKEDITOR.env.webkit)CKEDITOR.document.getBody().$.scrollTop=a;this.allowBlur(true);this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:
0,this);this.visible=1;this.onShow&&this.onShow.call(this)},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var a=this._.iframe.getFrameDocument().getActive();a.is("a")&&(this._.lastFocused=a)},hide:function(a){if(this.visible&&(!this.onHide||this.onHide.call(this)!==true)){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();
this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(a=a&&this._.returnFocus){CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus();a.focus()}delete this._.lastFocused;this._.editor.fire("panelHide",this)}},allowBlur:function(a){var e=this._.panel;if(a!=void 0)e.allowBlur=a;return e.allowBlur},showAsChild:function(a,e,d,c,f,i){if(!(this._.activeChild==a&&a._.panel._.offsetParentId==d.getId())){this.hideChild();a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||
this.hide()},0,this)},this);this._.activeChild=a;this._.focused=false;a.showBlock(e,d,c,f,i);this.blur();(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=""},100)}},hideChild:function(a){var e=this._.activeChild;if(e){delete e.onHide;delete this._.activeChild;e.hide();a&&this.focus()}}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),e;for(e in f){var d=f[e];a?d.destroy():d.element.hide()}a&&
(f={})})}(),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(a){for(var f=a.config.menu_groups.split(","),b=a._.menuGroups={},e=a._.menuItems={},d=0;d<f.length;d++)b[f[d]]=d+1;a.addMenuGroup=function(a,d){b[a]=d||100};a.addMenuItem=function(a,d){b[d.group]&&(e[a]=new CKEDITOR.menuItem(this,a,d))};a.addMenuItems=function(a){for(var b in a)this.addMenuItem(b,a[b])};a.getMenuItem=function(a){return e[a]};a.removeMenuItem=function(a){delete e[a]}}}),function(){function a(a){a.sort(function(a,
b){return a.group<b.group?-1:a.group>b.group?1:a.order<b.order?-1:a.order>b.order?1:0})}var f='<span class="cke_menuitem"><a id="{id}" class="cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href="{href}" title="{title}" tabindex="-1"_cke_focus=1 hidefocus="true" role="{role}" aria-haspopup="{hasPopup}" aria-disabled="{disabled}" {ariaChecked}';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(f=f+' onkeypress="return false;"');CKEDITOR.env.gecko&&(f=f+' onblur="this.style.cssText = this.style.cssText;"');
var f=f+(' onmouseover="CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout="CKEDITOR.tools.callFunction({moveOutFn},{index});" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},{index}); return false;">'),b=CKEDITOR.addTemplate("menuItem",f+'<span class="cke_menubutton_inner"><span class="cke_menubutton_icon"><span class="cke_button_icon cke_button__{iconName}_icon" style="{iconStyle}"></span></span><span class="cke_menubutton_label">{label}</span>{arrowHtml}</span></a></span>'),
e=CKEDITOR.addTemplate("menuArrow",'<span class="cke_menuarrow"><span>{label}</span></span>');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,b){b=this._.definition=b||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=b.level||1;var e=CKEDITOR.tools.extend({},b.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),f=e.block.attributes=e.attributes||{};!f.role&&(f.role="menu");this._.panelDefinition=e},_:{onShow:function(){var a=
this.editor.getSelection(),b=a&&a.getStartElement(),e=this.editor.elementPath(),f=this._.listeners;this.removeAll();for(var g=0;g<f.length;g++){var j=f[g](b,a,e);if(j)for(var k in j){var n=this.editor.getMenuItem(k);if(n&&(!n.command||this.editor.getCommand(n.command).state)){n.state=j[k];this.add(n)}}}},onClick:function(a){this.hide();if(a.onClick)a.onClick();else a.command&&this.editor.execCommand(a.command)},onEscape:function(a){var b=this.parent;b?b._.panel.hideChild(1):a==27&&this.hide(1);return false},
onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(a){var b=this._.subMenu,e=this.items[a];if(e=e.getItems&&e.getItems()){if(b)b.removeAll();else{b=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},true));b.parent=this;b._.onClick=CKEDITOR.tools.bind(this._.onClick,this)}for(var f in e){var g=this.editor.getMenuItem(f);if(g){g.state=e[f];b.add(g)}}var j=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+
(""+a));setTimeout(function(){b.show(j,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(a){if(!a.order)a.order=this.items.length;this.items.push(a)},removeAll:function(){this.items=[]},show:function(b,c,e,f){if(!this.parent){this._.onShow();if(!this.items.length)return}var c=c||(this.editor.lang.dir=="rtl"?2:1),g=this.items,j=this.editor,k=this._.panel,n=this._.element;if(!k){k=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);
k.onEscape=CKEDITOR.tools.bind(function(a){if(this._.onEscape(a)===false)return false},this);k.onShow=function(){k._.panel.getHolderElement().getParent().addClass("cke cke_reset_all")};k.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);n=k.addBlock(this.id,this._.panelDefinition.block);n.autoSize=true;var o=n.keys;o[40]="next";o[9]="next";o[38]="prev";o[CKEDITOR.SHIFT+9]="prev";o[j.lang.dir=="rtl"?37:39]=CKEDITOR.env.ie?"mouseup":"click";o[32]=CKEDITOR.env.ie?"mouseup":
"click";CKEDITOR.env.ie&&(o[13]="mouseup");n=this._.element=n.element;o=n.getDocument();o.getBody().setStyle("overflow","hidden");o.getElementsByTag("html").getItem(0).setStyle("overflow","hidden");this._.itemOverFn=CKEDITOR.tools.addFunction(function(a){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,j.config.menu_subMenuDelay||400,this,[a])},this);this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this);
this._.itemClickFn=CKEDITOR.tools.addFunction(function(a){var b=this.items[a];if(b.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(b.getItems)this._.showSubMenu(a);else this._.onClick(b)},this)}a(g);for(var o=j.elementPath(),o=['<div class="cke_menu'+(o&&o.direction()!=j.lang.dir?" cke_mixed_dir_content":"")+'" role="presentation">'],q=g.length,l=q&&g[0].group,m=0;m<q;m++){var v=g[m];if(l!=v.group){o.push('<div class="cke_menuseparator" role="separator"></div>');l=v.group}v.render(this,m,o)}o.push("</div>");
n.setHtml(o.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(k,this.id,b,c,e,f):k.showBlock(this.id,b,c,e,f);j.fire("menuShow",[k])},addListener:function(a){this._.listeners.push(a)},hide:function(a){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(a)}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(a,b,e){CKEDITOR.tools.extend(this,e,{order:0,className:"cke_menubutton__"+b});this.group=a._.menuGroups[this.group];this.editor=a;this.name=
b},proto:{render:function(a,c,f){var i=a.id+(""+c),g=typeof this.state=="undefined"?CKEDITOR.TRISTATE_OFF:this.state,j="",k=g==CKEDITOR.TRISTATE_ON?"on":g==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(j=' aria-checked="'+(g==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var n=this.getItems,o="&#"+(this.editor.lang.dir=="rtl"?"9668":"9658")+";",q=this.name;if(this.icon&&!/\./.test(this.icon))q=this.icon;a={id:i,name:this.name,iconName:q,label:this.label,
cls:this.className||"",state:k,hasPopup:n?"true":"false",disabled:g==CKEDITOR.TRISTATE_DISABLED,title:this.label,href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:a._.itemOverFn,moveOutFn:a._.itemOutFn,clickFn:a._.itemClickFn,index:c,iconStyle:CKEDITOR.skin.getIconStyle(q,this.editor.lang.dir=="rtl",q==this.icon?null:this.icon,this.iconOffset),arrowHtml:n?e.output({label:o}):"",role:this.role?this.role:"menuitem",ariaChecked:j};b.output(a,f)}}})}(),CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div",
CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,$:function(a){this.base.call(this,a,{panel:{className:"cke_menu_panel",attributes:{"aria-label":a.lang.contextmenu.options}}})},proto:{addTarget:function(a,f){a.on("contextmenu",function(a){var a=a.data,c=CKEDITOR.env.webkit?b:CKEDITOR.env.mac?a.$.metaKey:a.$.ctrlKey;if(!f||!c){a.preventDefault();var e=a.getTarget().getDocument(),i=a.getTarget().getDocument().getDocumentElement(),
c=!e.equals(CKEDITOR.document),e=e.getWindow().getScrollPosition(),g=c?a.$.clientX:a.$.pageX||e.x+a.$.clientX,j=c?a.$.clientY:a.$.pageY||e.y+a.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(i,null,g,j)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.webkit){var b,e=function(){b=0};a.on("keydown",function(a){b=CKEDITOR.env.mac?a.data.$.metaKey:a.data.$.ctrlKey});a.on("keyup",e);a.on("contextmenu",e)}},open:function(a,f,b,e){this.editor.focus();a=a||CKEDITOR.document.getDocumentElement();
this.editor.selectionChange(1);this.show(a,f,b,e)}}})},beforeInit:function(a){var f=a.contextMenu=new CKEDITOR.plugins.contextMenu(a);a.on("contentDom",function(){f.addTarget(a.editable(),a.config.browserContextMenuOnCtrl!==false)});a.addCommand("contextMenu",{exec:function(){a.contextMenu.open(a.document.getBody())}});a.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");a.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),function(){var a;function f(c,e){function f(a){a=n.list[a];if(a.equals(c.editable())||
a.getAttribute("contenteditable")=="true"){var b=c.createRange();b.selectNodeContents(a);b.select()}else c.getSelection().selectElement(a);c.focus()}function g(){k&&k.setHtml(b);delete n.list}var j=c.ui.spaceId("path"),k,n=c._.elementsPath,o=n.idBase;e.html=e.html+('<span id="'+j+'_label" class="cke_voice_label">'+c.lang.elementspath.eleLabel+'</span><span id="'+j+'" class="cke_path" role="group" aria-labelledby="'+j+'_label">'+b+"</span>");c.on("uiReady",function(){var a=c.ui.space("path");a&&c.focusManager.add(a,
1)});n.onClick=f;var q=CKEDITOR.tools.addFunction(f),l=CKEDITOR.tools.addFunction(function(a,b){var d=n.idBase,e,b=new CKEDITOR.dom.event(b);e=c.lang.dir=="rtl";switch(b.getKeystroke()){case e?39:37:case 9:(e=CKEDITOR.document.getById(d+(a+1)))||(e=CKEDITOR.document.getById(d+"0"));e.focus();return false;case e?37:39:case CKEDITOR.SHIFT+9:(e=CKEDITOR.document.getById(d+(a-1)))||(e=CKEDITOR.document.getById(d+(n.list.length-1)));e.focus();return false;case 27:c.focus();return false;case 13:case 32:f(a);
return false}return true});c.on("selectionChange",function(){c.editable();for(var a=[],e=n.list=[],f=[],g=n.filters,h=true,i=c.elementPath().elements,u,w=i.length;w--;){var r=i[w],x=0;u=r.data("cke-display-name")?r.data("cke-display-name"):r.data("cke-real-element-type")?r.data("cke-real-element-type"):r.getName();h=r.hasAttribute("contenteditable")?r.getAttribute("contenteditable")=="true":h;!h&&!r.hasAttribute("contenteditable")&&(x=1);for(var y=0;y<g.length;y++){var z=g[y](r,u);if(z===false){x=
1;break}u=z||u}if(!x){e.unshift(r);f.unshift(u)}}e=e.length;for(g=0;g<e;g++){u=f[g];h=c.lang.elementspath.eleTitle.replace(/%1/,u);u=d.output({id:o+g,label:h,text:u,jsTitle:"javascript:void('"+u+"')",index:g,keyDownFn:l,clickFn:q});a.unshift(u)}k||(k=CKEDITOR.document.getById(j));f=k;f.setHtml(a.join("")+b);c.fire("elementsPathUpdate",{space:f})});c.on("readOnly",g);c.on("contentDomUnload",g);c.addCommand("elementsPathFocus",a);c.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}a={editorFocus:false,
readOnly:1,exec:function(a){(a=CKEDITOR.document.getById(a._.elementsPath.idBase+"0"))&&a.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}};var b='<span class="cke_path_empty">&nbsp;</span>',e="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e=e+' onkeypress="return false;"');CKEDITOR.env.gecko&&(e=e+' onblur="this.style.cssText = this.style.cssText;"');var d=CKEDITOR.addTemplate("pathItem",'<a id="{id}" href="{jsTitle}" tabindex="-1" class="cke_path_item" title="{label}"'+e+' hidefocus="true"  onkeydown="return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );" onclick="CKEDITOR.tools.callFunction({clickFn},{index}); return false;" role="button" aria-label="{label}">{text}</a>');
CKEDITOR.plugins.add("elementspath",{init:function(a){a._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",filters:[]};a.on("uiSpace",function(b){b.data.space=="bottom"&&f(a,b.data)})}})}(),function(){function a(a,d){var c,h;d.on("refresh",function(a){var c=[f],d;for(d in a.data.states)c.push(a.data.states[d]);this.setState(CKEDITOR.tools.search(c,b)?b:f)},d,null,100);d.on("exec",function(b){c=a.getSelection();h=c.createBookmarks(1);if(!b.data)b.data={};b.data.done=false},
d,null,0);d.on("exec",function(){a.forceNextSelectionCheck();c.selectBookmarks(h)},d,null,100)}var f=CKEDITOR.TRISTATE_DISABLED,b=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(b){var d=CKEDITOR.plugins.indent.genericDefinition;a(b,b.addCommand("indent",new d(true)));a(b,b.addCommand("outdent",new d));if(b.ui.addButton){b.ui.addButton("Indent",{label:b.lang.indent.indent,command:"indent",directional:true,toolbar:"indent,20"});b.ui.addButton("Outdent",{label:b.lang.indent.outdent,
command:"outdent",directional:true,toolbar:"indent,10"})}b.on("dirChanged",function(a){var d=b.createRange(),f=a.data.node;d.setStartBefore(f);d.setEndAfter(f);for(var g=new CKEDITOR.dom.walker(d),j;j=g.next();)if(j.type==CKEDITOR.NODE_ELEMENT)if(!j.equals(f)&&j.getDirection()){d.setStartAfter(j);g=new CKEDITOR.dom.walker(d)}else{var k=b.config.indentClasses;if(k)for(var n=a.data.dir=="ltr"?["_rtl",""]:["","_rtl"],o=0;o<k.length;o++)if(j.hasClass(k[o]+n[0])){j.removeClass(k[o]+n[0]);j.addClass(k[o]+
n[1])}k=j.getStyle("margin-right");n=j.getStyle("margin-left");k?j.setStyle("margin-left",k):j.removeStyle("margin-left");n?j.setStyle("margin-right",n):j.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(a){this.isIndent=!!a;this.startDisabled=!this.isIndent},specificDefinition:function(a,b,c){this.name=b;this.editor=a;this.jobs={};this.enterBr=a.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!c;this.relatedGlobal=c?"indent":"outdent";this.indentKey=c?9:CKEDITOR.SHIFT+
9;this.database={}},registerCommands:function(a,b){a.on("pluginsLoaded",function(){for(var a in b)(function(a,b){var c=a.getCommand(b.relatedGlobal),d;for(d in b.jobs){c.on("exec",function(c){if(!c.data.done){a.fire("lockSnapshot");if(b.execJob(a,d))c.data.done=true;a.fire("unlockSnapshot");CKEDITOR.dom.element.clearAllMarkers(b.database)}},this,null,d);c.on("refresh",function(c){if(!c.data.states)c.data.states={};c.data.states[b.name+"@"+d]=b.refreshJob(a,d,c.data.path)},this,null,d)}a.addFeature(b)})(this,
b[a])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(a,b){var c=this.jobs[b];if(c.state!=f)return c.exec.call(this,a)},refreshJob:function(a,b,c){b=this.jobs[b];b.state=a.activeFilter.checkFeature(this)?b.refresh.call(this,a,c):f;return b.state},getContext:function(a){return a.contains(this.context)}}}(),function(){function a(a){function c(b){for(var i=l.startContainer,j=l.endContainer;i&&
!i.getParent().equals(b);)i=i.getParent();for(;j&&!j.getParent().equals(b);)j=j.getParent();if(!i||!j)return false;for(var m=i,i=[],v=false;!v;){m.equals(j)&&(v=true);i.push(m);m=m.getNext()}if(i.length<1)return false;m=b.getParents(true);for(j=0;j<m.length;j++)if(m[j].getName&&h[m[j].getName()]){b=m[j];break}for(var m=d.isIndent?1:-1,j=i[0],i=i[i.length-1],v=CKEDITOR.plugins.list.listToArray(b,f),q=v[i.getCustomData("listarray_index")].indent,j=j.getCustomData("listarray_index");j<=i.getCustomData("listarray_index");j++){v[j].indent=
v[j].indent+m;if(m>0){var r=v[j].parent;v[j].parent=new CKEDITOR.dom.element(r.getName(),r.getDocument())}}for(j=i.getCustomData("listarray_index")+1;j<v.length&&v[j].indent>q;j++)v[j].indent=v[j].indent+m;i=CKEDITOR.plugins.list.arrayToList(v,f,null,a.config.enterMode,b.getDirection());if(!d.isIndent){var x;if((x=b.getParent())&&x.is("li"))for(var m=i.listNode.getChildren(),y=[],z,j=m.count()-1;j>=0;j--)(z=m.getItem(j))&&(z.is&&z.is("li"))&&y.push(z)}i&&i.listNode.replace(b);if(y&&y.length)for(j=
0;j<y.length;j++){for(z=b=y[j];(z=z.getNext())&&z.is&&z.getName()in h;){CKEDITOR.env.needsNbspFiller&&!b.getFirst(e)&&b.append(l.document.createText(" "));b.append(z)}b.insertAfter(x)}i&&a.fire("contentDomInvalidated");return true}for(var d=this,f=this.database,h=this.context,i=a.getSelection(),i=(i&&i.getRanges()).createIterator(),l;l=i.getNextRange();){for(var m=l.getCommonAncestor();m&&!(m.type==CKEDITOR.NODE_ELEMENT&&h[m.getName()]);)m=m.getParent();m||(m=l.startPath().contains(h))&&l.setEndAt(m,
CKEDITOR.POSITION_BEFORE_END);if(!m){var v=l.getEnclosedNode();if(v&&v.type==CKEDITOR.NODE_ELEMENT&&v.getName()in h){l.setStartAt(v,CKEDITOR.POSITION_AFTER_START);l.setEndAt(v,CKEDITOR.POSITION_BEFORE_END);m=v}}if(m&&l.startContainer.type==CKEDITOR.NODE_ELEMENT&&l.startContainer.getName()in h){v=new CKEDITOR.dom.walker(l);v.evaluator=b;l.startContainer=v.next()}if(m&&l.endContainer.type==CKEDITOR.NODE_ELEMENT&&l.endContainer.getName()in h){v=new CKEDITOR.dom.walker(l);v.evaluator=b;l.endContainer=
v.previous()}if(m)return c(m)}return 0}function f(a,c){c||(c=a.contains(this.context));return c&&a.block&&a.block.equals(c.getFirst(b))}function b(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")}function e(a){return d(a)&&c(a)}var d=CKEDITOR.dom.walker.whitespaces(true),c=CKEDITOR.dom.walker.bookmark(false,true),h=CKEDITOR.TRISTATE_DISABLED,i=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(b){function c(b,e){d.specificDefinition.apply(this,arguments);this.requiredContent=
["ul","ol"];b.on("key",function(a){if(b.mode=="wysiwyg"&&a.data.keyCode==this.indentKey){var c=this.getContext(b.elementPath());if(c&&(!this.isIndent||!f.call(this,b.elementPath(),c))){b.execCommand(this.relatedGlobal);a.cancel()}}},this);this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(a,b){var c=this.getContext(b),d=f.call(this,b,c);return!c||!this.isIndent||d?h:i}:function(a,b){return!this.getContext(b)||this.isIndent?h:i},exec:CKEDITOR.tools.bind(a,this)}}var d=CKEDITOR.plugins.indent;
d.registerCommands(b,{indentlist:new c(b,"indentlist",true),outdentlist:new c(b,"outdentlist")});CKEDITOR.tools.extend(c.prototype,d.specificDefinition.prototype,{context:{ol:1,ul:1}})}})}(),function(){function a(a,b,c){function d(c){if((j=i[c?"getFirst":"getLast"]())&&(!j.is||!j.isBlockBoundary())&&(k=b.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(true)))&&(!k.is||!k.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](j)}for(var e=CKEDITOR.plugins.list.listToArray(b.root,
c),f=[],g=0;g<b.contents.length;g++){var h=b.contents[g];if((h=h.getAscendant("li",true))&&!h.getCustomData("list_item_processed")){f.push(h);CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",true)}}h=null;for(g=0;g<f.length;g++){h=f[g].getCustomData("listarray_index");e[h].indent=-1}for(g=h+1;g<e.length;g++)if(e[g].indent>e[g-1].indent+1){f=e[g-1].indent+1-e[g].indent;for(h=e[g].indent;e[g]&&e[g].indent>=h;){e[g].indent=e[g].indent+f;g++}g--}var i=CKEDITOR.plugins.list.arrayToList(e,c,null,
a.config.enterMode,b.root.getAttribute("dir")).listNode,j,k;d(true);d();i.replace(b.root);a.fire("contentDomInvalidated")}function f(a,b){this.name=a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function b(a,b,c,d){for(var e,f;e=a[d?"getLast":"getFirst"](q);){(f=e.getDirection(1))!==b.getDirection(1)&&e.setAttribute("dir",f);e.remove();c?e[d?"insertBefore":"insertAfter"](c):b.append(e,d)}}function e(a){var c;(c=function(c){var d=a[c?"getPrevious":"getNext"](k);if(d&&
d.type==CKEDITOR.NODE_ELEMENT&&d.is(a.getName())){b(a,d,null,!c);a.remove();a=d}})();c(1)}function d(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function c(a,c,d){a.fire("saveSnapshot");d.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var f=d.extractContents();c.trim(false,true);var g=c.createBookmark(),i=new CKEDITOR.dom.elementPath(c.startContainer),j=i.block,i=i.lastElement.getAscendant("li",1)||
j,u=new CKEDITOR.dom.elementPath(d.startContainer),q=u.contains(CKEDITOR.dtd.$listItem),u=u.contains(CKEDITOR.dtd.$list);if(j)(j=j.getBogus())&&j.remove();else if(u)(j=u.getPrevious(k))&&n(j)&&j.remove();(j=f.getLast())&&(j.type==CKEDITOR.NODE_ELEMENT&&j.is("br"))&&j.remove();(j=c.startContainer.getChild(c.startOffset))?f.insertBefore(j):c.startContainer.append(f);if(q)if(f=h(q))if(i.contains(q)){b(f,q.getParent(),q);f.remove()}else i.append(f);for(;d.checkStartOfBlock()&&d.checkEndOfBlock();){u=
d.startPath();f=u.block;if(!f)break;if(f.is("li")){i=f.getParent();f.equals(i.getLast(k))&&f.equals(i.getFirst(k))&&(f=i)}d.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove()}d=d.clone();f=a.editable();d.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=function(a){return k(a)&&!n(a)};(d=d.next())&&(d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in CKEDITOR.dtd.$list)&&e(d);c.moveToBookmark(g);c.select();a.fire("saveSnapshot")}function h(a){return(a=a.getLast(k))&&
a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in i?a:null}var i={ol:1,ul:1},g=CKEDITOR.dom.walker.whitespaces(),j=CKEDITOR.dom.walker.bookmark(),k=function(a){return!(g(a)||j(a))},n=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,c,d,e){if(!i[a.getName()])return[];d||(d=0);c||(c=[]);for(var f=0,g=a.getChildCount();f<g;f++){var h=a.getChild(f);h.type==CKEDITOR.NODE_ELEMENT&&h.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(h,b,c,d+1);if(h.$.nodeName.toLowerCase()==
"li"){var j={parent:a,indent:d,element:h,contents:[]};if(e)j.grandparent=e;else{j.grandparent=a.getParent();if(j.grandparent&&j.grandparent.$.nodeName.toLowerCase()=="li")j.grandparent=j.grandparent.getParent()}b&&CKEDITOR.dom.element.setMarker(b,h,"listarray_index",c.length);c.push(j);for(var k=0,n=h.getChildCount(),q;k<n;k++){q=h.getChild(k);q.type==CKEDITOR.NODE_ELEMENT&&i[q.getName()]?CKEDITOR.plugins.list.listToArray(q,b,c,d+1,j.grandparent):j.contents.push(q)}}}return c},arrayToList:function(a,
b,c,d,e){c||(c=0);if(!a||a.length<c+1)return null;for(var f,g=a[c].parent.getDocument(),h=new CKEDITOR.dom.documentFragment(g),n=null,q=c,o=Math.max(a[c].indent,0),y=null,z,B,G=d==CKEDITOR.ENTER_P?"p":"div";;){var C=a[q];f=C.grandparent;z=C.element.getDirection(1);if(C.indent==o){if(!n||a[q].parent.getName()!=n.getName()){n=a[q].parent.clone(false,1);e&&n.setAttribute("dir",e);h.append(n)}y=n.append(C.element.clone(0,1));z!=n.getDirection(1)&&y.setAttribute("dir",z);for(f=0;f<C.contents.length;f++)y.append(C.contents[f].clone(1,
1));q++}else if(C.indent==Math.max(o,0)+1){C=a[q-1].element.getDirection(1);q=CKEDITOR.plugins.list.arrayToList(a,null,q,d,C!=z?z:null);!y.getChildCount()&&(CKEDITOR.env.needsNbspFiller&&!(g.$.documentMode>7))&&y.append(g.createText(" "));y.append(q.listNode);q=q.nextIndex}else if(C.indent==-1&&!c&&f){if(i[f.getName()]){y=C.element.clone(false,true);z!=f.getDirection(1)&&y.setAttribute("dir",z)}else y=new CKEDITOR.dom.documentFragment(g);var n=f.getDirection(1)!=z,E=C.element,D=E.getAttribute("class"),
F=E.getAttribute("style"),I=y.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(d!=CKEDITOR.ENTER_BR||n||F||D),H,O=C.contents.length,L;for(f=0;f<O;f++){H=C.contents[f];if(j(H)&&O>1)I?L=H.clone(1,1):y.append(H.clone(1,1));else if(H.type==CKEDITOR.NODE_ELEMENT&&H.isBlockBoundary()){n&&!H.getDirection()&&H.setAttribute("dir",z);B=H;var K=E.getAttribute("style");K&&B.setAttribute("style",K.replace(/([^;])$/,"$1;")+(B.getAttribute("style")||""));D&&H.addClass(D);B=null;if(L){y.append(L);L=null}y.append(H.clone(1,
1))}else if(I){if(!B){B=g.createElement(G);y.append(B);n&&B.setAttribute("dir",z)}F&&B.setAttribute("style",F);D&&B.setAttribute("class",D);if(L){B.append(L);L=null}B.append(H.clone(1,1))}else y.append(H.clone(1,1))}if(L){(B||y).append(L);L=null}if(y.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&q!=a.length-1){if(CKEDITOR.env.needsBrFiller)(z=y.getLast())&&(z.type==CKEDITOR.NODE_ELEMENT&&z.is("br"))&&z.remove();z=y.getLast(k);(!z||!(z.type==CKEDITOR.NODE_ELEMENT&&z.is(CKEDITOR.dtd.$block)))&&y.append(g.createElement("br"))}z=
y.$.nodeName.toLowerCase();(z=="div"||z=="p")&&y.appendBogus();h.append(y);n=null;q++}else return null;B=null;if(a.length<=q||Math.max(a[q].indent,0)<o)break}if(b)for(a=h.getFirst();a;){if(a.type==CKEDITOR.NODE_ELEMENT){CKEDITOR.dom.element.clearMarkers(b,a);if(a.getName()in CKEDITOR.dtd.$listItem){c=a;g=e=d=void 0;if(d=c.getDirection()){for(e=c.getParent();e&&!(g=e.getDirection());)e=e.getParent();d==g&&c.removeAttribute("dir")}}}a=a.getNextSourceNode()}return{listNode:h,nextIndex:q}}};var o=/^h[1-6]$/,
q=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);f.prototype={exec:function(b){this.refresh(b,b.elementPath());var c=b.config,d=b.getSelection(),f=d&&d.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var g=b.editable();if(g.getFirst(k)){var h=f.length==1&&f[0];(c=h&&h.getEnclosedNode())&&(c.is&&this.type==c.getName())&&this.setState(CKEDITOR.TRISTATE_ON)}else{c.enterMode==CKEDITOR.ENTER_BR?g.appendBogus():f[0].fixBlock(1,c.enterMode==CKEDITOR.ENTER_P?"p":"div");d.selectRanges(f)}}for(var c=
d.createBookmarks(true),g=[],j={},f=f.createIterator(),n=0;(h=f.getNextRange())&&++n;){var q=h.getBoundaryNodes(),r=q.startNode,x=q.endNode;r.type==CKEDITOR.NODE_ELEMENT&&r.getName()=="td"&&h.setStartAt(q.startNode,CKEDITOR.POSITION_AFTER_START);x.type==CKEDITOR.NODE_ELEMENT&&x.getName()=="td"&&h.setEndAt(q.endNode,CKEDITOR.POSITION_BEFORE_END);h=h.createIterator();for(h.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;q=h.getNextParagraph();)if(!q.getCustomData("list_block")){CKEDITOR.dom.element.setMarker(j,
q,"list_block",1);for(var y=b.elementPath(q),r=y.elements,x=0,y=y.blockLimit,z,B=r.length-1;B>=0&&(z=r[B]);B--)if(i[z.getName()]&&y.contains(z)){y.removeCustomData("list_group_object_"+n);if(r=z.getCustomData("list_group_object"))r.contents.push(q);else{r={root:z,contents:[q]};g.push(r);CKEDITOR.dom.element.setMarker(j,z,"list_group_object",r)}x=1;break}if(!x){x=y;if(x.getCustomData("list_group_object_"+n))x.getCustomData("list_group_object_"+n).contents.push(q);else{r={root:x,contents:[q]};CKEDITOR.dom.element.setMarker(j,
x,"list_group_object_"+n,r);g.push(r)}}}}for(z=[];g.length>0;){r=g.shift();if(this.state==CKEDITOR.TRISTATE_OFF)if(i[r.root.getName()]){f=b;n=r;r=j;h=z;x=CKEDITOR.plugins.list.listToArray(n.root,r);y=[];for(q=0;q<n.contents.length;q++){B=n.contents[q];if((B=B.getAscendant("li",true))&&!B.getCustomData("list_item_processed")){y.push(B);CKEDITOR.dom.element.setMarker(r,B,"list_item_processed",true)}}for(var B=n.root.getDocument(),G=void 0,C=void 0,q=0;q<y.length;q++){var E=y[q].getCustomData("listarray_index"),
G=x[E].parent;if(!G.is(this.type)){C=B.createElement(this.type);G.copyAttributes(C,{start:1,type:1});C.removeStyle("list-style-type");x[E].parent=C}}r=CKEDITOR.plugins.list.arrayToList(x,r,null,f.config.enterMode);x=void 0;y=r.listNode.getChildCount();for(q=0;q<y&&(x=r.listNode.getChild(q));q++)x.getName()==this.type&&h.push(x);r.listNode.replace(n.root);f.fire("contentDomInvalidated")}else{x=b;q=r;h=z;y=q.contents;f=q.root.getDocument();n=[];if(y.length==1&&y[0].equals(q.root)){r=f.createElement("div");
y[0].moveChildren&&y[0].moveChildren(r);y[0].append(r);y[0]=r}q=q.contents[0].getParent();for(B=0;B<y.length;B++)q=q.getCommonAncestor(y[B].getParent());G=x.config.useComputedState;x=r=void 0;G=G===void 0||G;for(B=0;B<y.length;B++)for(C=y[B];E=C.getParent();){if(E.equals(q)){n.push(C);!x&&C.getDirection()&&(x=1);C=C.getDirection(G);r!==null&&(r=r&&r!=C?null:C);break}C=E}if(!(n.length<1)){y=n[n.length-1].getNext();B=f.createElement(this.type);h.push(B);for(G=h=void 0;n.length;){h=n.shift();G=f.createElement("li");
if(h.is("pre")||o.test(h.getName())||h.getAttribute("contenteditable")=="false")h.appendTo(G);else{h.copyAttributes(G);if(r&&h.getDirection()){G.removeStyle("direction");G.removeAttribute("dir")}h.moveChildren(G);h.remove()}G.appendTo(B)}r&&x&&B.setAttribute("dir",r);y?B.insertBefore(y):B.appendTo(q)}}else this.state==CKEDITOR.TRISTATE_ON&&i[r.root.getName()]&&a.call(this,b,r,j)}for(B=0;B<z.length;B++)e(z[B]);CKEDITOR.dom.element.clearAllMarkers(j);d.selectBookmarks(c);b.focus()},refresh:function(a,
b){var c=b.contains(i,1),d=b.blockLimit||b.root;c&&d.contains(c)?this.setState(c.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(a){if(!a.blockless){a.addCommand("numberedlist",new f("numberedlist","ol"));a.addCommand("bulletedlist",new f("bulletedlist","ul"));if(a.ui.addButton){a.ui.addButton("NumberedList",{label:a.lang.list.numberedlist,command:"numberedlist",directional:true,toolbar:"list,10"});
a.ui.addButton("BulletedList",{label:a.lang.list.bulletedlist,command:"bulletedlist",directional:true,toolbar:"list,20"})}a.on("key",function(b){var e=b.data.domEvent.getKey();if(a.mode=="wysiwyg"&&e in{8:1,46:1}){var f=a.getSelection().getRanges()[0],g=f&&f.startPath();if(f&&f.collapsed){var j=e==8,q=a.editable(),o=new CKEDITOR.dom.walker(f.clone());o.evaluator=function(a){return k(a)&&!n(a)};o.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};e=f.clone();if(j){var w,
r;if((w=g.contains(i))&&f.checkBoundaryOfElement(w,CKEDITOR.START)&&(w=w.getParent())&&w.is("li")&&(w=h(w))){r=w;w=w.getPrevious(k);e.moveToPosition(w&&n(w)?w:r,CKEDITOR.POSITION_BEFORE_START)}else{o.range.setStartAt(q,CKEDITOR.POSITION_AFTER_START);o.range.setEnd(f.startContainer,f.startOffset);if((w=o.previous())&&w.type==CKEDITOR.NODE_ELEMENT&&(w.getName()in i||w.is("li"))){if(!w.is("li")){o.range.selectNodeContents(w);o.reset();o.evaluator=d;w=o.previous()}r=w;e.moveToElementEditEnd(r)}}if(r){c(a,
e,f);b.cancel()}else if((e=g.contains(i))&&f.checkBoundaryOfElement(e,CKEDITOR.START)){r=e.getFirst(k);if(f.checkBoundaryOfElement(r,CKEDITOR.START)){w=e.getPrevious(k);if(h(r)){if(w){f.moveToElementEditEnd(w);f.select()}}else a.execCommand("outdent");b.cancel()}}}else if(r=g.contains("li")){o.range.setEndAt(q,CKEDITOR.POSITION_BEFORE_END);q=(g=r.getLast(k))&&d(g)?g:r;r=0;if((w=o.next())&&w.type==CKEDITOR.NODE_ELEMENT&&w.getName()in i&&w.equals(g)){r=1;w=o.next()}else f.checkBoundaryOfElement(q,CKEDITOR.END)&&
(r=1);if(r&&w){f=f.clone();f.moveToElementEditStart(w);c(a,e,f);b.cancel()}}else{o.range.setEndAt(q,CKEDITOR.POSITION_BEFORE_END);if((w=o.next())&&w.type==CKEDITOR.NODE_ELEMENT&&w.is(i)){w=w.getFirst(k);if(g.block&&f.checkStartOfBlock()&&f.checkEndOfBlock()){g.block.remove();f.moveToElementEditStart(w);f.select()}else if(h(w)){f.moveToElementEditStart(w);f.select()}else{f=f.clone();f.moveToElementEditStart(w);c(a,e,f)}b.cancel()}}setTimeout(function(){a.selectionChange(1)})}}})}}})}(),function(){function a(a,
b,d){d=a.config.forceEnterMode||d;if(a.mode=="wysiwyg"){if(!b)b=a.activeEnterMode;if(!a.elementPath().isContextFor("p")){b=CKEDITOR.ENTER_BR;d=1}a.fire("saveSnapshot");b==CKEDITOR.ENTER_BR?c(a,b,null,d):h(a,b,null,d);a.fire("saveSnapshot")}}function f(a){for(var a=a.getSelection().getRanges(true),b=a.length-1;b>0;b--)a[b].deleteContents();return a[0]}CKEDITOR.plugins.add("enterkey",{init:function(b){b.addCommand("enter",{modes:{wysiwyg:1},editorFocus:false,exec:function(b){a(b)}});b.addCommand("shiftEnter",
{modes:{wysiwyg:1},editorFocus:false,exec:function(b){a(b,b.activeShiftEnterMode,1)}});b.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var b=CKEDITOR.dom.walker.whitespaces(),e=CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(a,d,h,n){if(h=h||f(a)){var o=h.document,q=h.checkStartOfBlock(),l=h.checkEndOfBlock(),m=a.elementPath(h.startContainer).block,v=d==CKEDITOR.ENTER_DIV?"div":"p",t;if(q&&l){if(m&&(m.is("li")||m.getParent().is("li"))){h=m.getParent();
t=h.getParent();var n=!m.hasPrevious(),s=!m.hasNext(),v=a.getSelection(),p=v.createBookmarks(),q=m.getDirection(1),l=m.getAttribute("class"),A=m.getAttribute("style"),u=t.getDirection(1)!=q,a=a.enterMode!=CKEDITOR.ENTER_BR||u||A||l;if(t.is("li"))if(n||s)m[n?"insertBefore":"insertAfter"](t);else m.breakParent(t);else{if(a){t=o.createElement(d==CKEDITOR.ENTER_P?"p":"div");u&&t.setAttribute("dir",q);A&&t.setAttribute("style",A);l&&t.setAttribute("class",l);m.moveChildren(t);if(n||s)t[n?"insertBefore":
"insertAfter"](h);else{m.breakParent(h);t.insertAfter(h)}}else{m.appendBogus(true);if(n||s)for(;o=m[n?"getFirst":"getLast"]();)o[n?"insertBefore":"insertAfter"](h);else for(m.breakParent(h);o=m.getLast();)o.insertAfter(h)}m.remove()}v.selectBookmarks(p);return}if(m&&m.getParent().is("blockquote")){m.breakParent(m.getParent());m.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||m.getPrevious().remove();m.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||m.getNext().remove();h.moveToElementEditStart(m);
h.select();return}}else if(m&&m.is("pre")&&!l){c(a,d,h,n);return}if(l=h.splitBlock(v)){d=l.previousBlock;m=l.nextBlock;a=l.wasStartOfBlock;q=l.wasEndOfBlock;if(m){p=m.getParent();if(p.is("li")){m.breakParent(p);m.move(m.getNext(),1)}}else if(d&&(p=d.getParent())&&p.is("li")){d.breakParent(p);p=d.getNext();h.moveToElementEditStart(p);d.move(d.getPrevious())}if(!a&&!q){if(m.is("li")){t=h.clone();t.selectNodeContents(m);t=new CKEDITOR.dom.walker(t);t.evaluator=function(a){return!(e(a)||b(a)||a.type==
CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty))};(p=t.next())&&(p.type==CKEDITOR.NODE_ELEMENT&&p.is("ul","ol"))&&(CKEDITOR.env.needsBrFiller?o.createElement("br"):o.createText(" ")).insertBefore(p)}m&&h.moveToElementEditStart(m)}else{if(d){if(d.is("li")||!i.test(d.getName())&&!d.is("pre"))t=d.clone()}else m&&(t=m.clone());if(t)n&&!t.is("li")&&t.renameNode(v);else if(p&&p.is("li"))t=p;else{t=o.createElement(v);d&&(s=d.getDirection())&&t.setAttribute("dir",
s)}if(o=l.elementPath){n=0;for(v=o.elements.length;n<v;n++){p=o.elements[n];if(p.equals(o.block)||p.equals(o.blockLimit))break;if(CKEDITOR.dtd.$removeEmpty[p.getName()]){p=p.clone();t.moveChildren(p);t.append(p)}}}t.appendBogus();t.getParent()||h.insertNode(t);t.is("li")&&t.removeAttribute("value");if(CKEDITOR.env.ie&&a&&(!q||!d.getChildCount())){h.moveToElementEditStart(q?d:t);h.select()}h.moveToElementEditStart(a&&!q?m:t)}h.select();h.scrollIntoView()}}},enterBr:function(a,b,c,d){if(c=c||f(a)){var e=
c.document,q=c.checkEndOfBlock(),l=new CKEDITOR.dom.elementPath(a.getSelection().getStartElement()),m=l.block,l=m&&l.block.getName();if(!d&&l=="li")h(a,b,c,d);else{if(!d&&q&&i.test(l))if(q=m.getDirection()){e=e.createElement("div");e.setAttribute("dir",q);e.insertAfter(m);c.setStart(e,0)}else{e.createElement("br").insertAfter(m);CKEDITOR.env.gecko&&e.createText("").insertAfter(m);c.setStartAt(m.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)}else{m=l=="pre"&&
CKEDITOR.env.ie&&CKEDITOR.env.version<8?e.createText("\r"):e.createElement("br");c.deleteContents();c.insertNode(m);if(CKEDITOR.env.needsBrFiller){e.createText("﻿").insertAfter(m);q&&m.getParent().appendBogus();m.getNext().$.nodeValue="";c.setStartAt(m.getNext(),CKEDITOR.POSITION_AFTER_START)}else c.setStartAt(m,CKEDITOR.POSITION_AFTER_END)}c.collapse(true);c.select();c.scrollIntoView()}}}};var d=CKEDITOR.plugins.enterkey,c=d.enterBr,h=d.enterBlock,i=/^h[1-6]$/}(),function(){function a(a,b){var e=
{},d=[],c={nbsp:" ",shy:"­",gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,f){var h=b?"&"+f+";":c[f];e[h]=b?c[f]:"&"+f+";";d.push(h);return""});if(!b&&a){var a=a.split(","),h=document.createElement("div"),i;h.innerHTML="&"+a.join(";&")+";";i=h.innerHTML;h=null;for(h=0;h<i.length;h++){var g=i.charAt(h);e[g]="&"+a[h]+";";d.push(g)}}e.regex=d.join(b?"|":"");return e}CKEDITOR.plugins.add("entities",{afterInit:function(f){var b=f.config;if(f=
(f=f.dataProcessor)&&f.htmlFilter){var e=[];b.basicEntities!==false&&e.push("nbsp,gt,lt,amp");if(b.entities){e.length&&e.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");
b.entities_latin&&e.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");b.entities_greek&&e.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");
b.entities_additional&&e.push(b.entities_additional)}var d=a(e.join(",")),c=d.regex?"["+d.regex+"]":"a^";delete d.regex;b.entities&&b.entities_processNumerical&&(c="[^ -~]|"+c);var c=RegExp(c,"g"),h=function(a){return b.entities_processNumerical=="force"||!d[a]?"&#"+a.charCodeAt(0)+";":d[a]},i=a("nbsp,gt,lt,amp,shy",true),g=RegExp(i.regex,"g"),j=function(a){return i[a]};f.addRules({text:function(a){return a.replace(g,j).replace(c,h)}},{applyToAll:true,excludeNestedEditable:true})}}})}(),CKEDITOR.config.basicEntities=
!0,CKEDITOR.config.entities=!0,CKEDITOR.config.entities_latin=!0,CKEDITOR.config.entities_greek=!0,CKEDITOR.config.entities_additional="#39",CKEDITOR.plugins.add("popup"),CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{popup:function(a,f,b,e){f=f||"80%";b=b||"70%";typeof f=="string"&&(f.length>1&&f.substr(f.length-1,1)=="%")&&(f=parseInt(window.screen.width*parseInt(f,10)/100,10));typeof b=="string"&&(b.length>1&&b.substr(b.length-1,1)=="%")&&(b=parseInt(window.screen.height*parseInt(b,10)/100,10));
f<640&&(f=640);b<420&&(b=420);var d=parseInt((window.screen.height-b)/2,10),c=parseInt((window.screen.width-f)/2,10),e=(e||"location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes")+",width="+f+",height="+b+",top="+d+",left="+c,h=window.open("",null,e,true);if(!h)return false;try{if(navigator.userAgent.toLowerCase().indexOf(" chrome/")==-1){h.moveTo(c,d);h.resizeTo(f,b)}h.focus();h.location.href=a}catch(i){window.open(a,null,e,true)}return true}}),
function(){function a(a,b){var c=[];if(b)for(var d in b)c.push(d+"="+encodeURIComponent(b[d]));else return a;return a+(a.indexOf("?")!=-1?"&":"?")+c.join("&")}function f(a){a=a+"";return a.charAt(0).toUpperCase()+a.substr(1)}function b(){var b=this.getDialog(),c=b.getParentEditor();c._.filebrowserSe=this;var d=c.config["filebrowser"+f(b.getName())+"WindowWidth"]||c.config.filebrowserWindowWidth||"80%",b=c.config["filebrowser"+f(b.getName())+"WindowHeight"]||c.config.filebrowserWindowHeight||"70%",
e=this.filebrowser.params||{};e.CKEditor=c.name;e.CKEditorFuncNum=c._.filebrowserFn;if(!e.langCode)e.langCode=c.langCode;e=a(this.filebrowser.url,e);c.popup(e,d,b,c.config.filebrowserWindowFeatures||c.config.fileBrowserWindowFeatures)}function e(){var a=this.getDialog();a.getParentEditor()._.filebrowserSe=this;return!a.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value||!a.getContentElement(this["for"][0],this["for"][1]).getAction()?false:true}function d(b,c,d){var e=d.params||
{};e.CKEditor=b.name;e.CKEditorFuncNum=b._.filebrowserFn;if(!e.langCode)e.langCode=b.langCode;c.action=a(d.url,e);c.filebrowser=d}function c(a,h,i,n){if(n&&n.length)for(var o,q=n.length;q--;){o=n[q];(o.type=="hbox"||o.type=="vbox"||o.type=="fieldset")&&c(a,h,i,o.children);if(o.filebrowser){if(typeof o.filebrowser=="string")o.filebrowser={action:o.type=="fileButton"?"QuickUpload":"Browse",target:o.filebrowser};if(o.filebrowser.action=="Browse"){var l=o.filebrowser.url;if(l===void 0){l=a.config["filebrowser"+
f(h)+"BrowseUrl"];if(l===void 0)l=a.config.filebrowserBrowseUrl}if(l){o.onClick=b;o.filebrowser.url=l;o.hidden=false}}else if(o.filebrowser.action=="QuickUpload"&&o["for"]){l=o.filebrowser.url;if(l===void 0){l=a.config["filebrowser"+f(h)+"UploadUrl"];if(l===void 0)l=a.config.filebrowserUploadUrl}if(l){var m=o.onClick;o.onClick=function(a){var b=a.sender;return m&&m.call(b,a)===false?false:e.call(b,a)};o.filebrowser.url=l;o.hidden=false;d(a,i.getContents(o["for"][0]).get(o["for"][1]),o.filebrowser)}}}}}
function h(a,b,c){if(c.indexOf(";")!==-1){for(var c=c.split(";"),d=0;d<c.length;d++)if(h(a,b,c[d]))return true;return false}return(a=a.getContents(b).get(c).filebrowser)&&a.url}function i(a,b){var c=this._.filebrowserSe.getDialog(),d=this._.filebrowserSe["for"],e=this._.filebrowserSe.filebrowser.onSelect;d&&c.getContentElement(d[0],d[1]).reset();if(!(typeof b=="function"&&b.call(this._.filebrowserSe)===false)&&!(e&&e.call(this._.filebrowserSe,a,b)===false)){typeof b=="string"&&b&&alert(b);if(a){d=
this._.filebrowserSe;c=d.getDialog();if(d=d.filebrowser.target||null){d=d.split(":");if(e=c.getContentElement(d[0],d[1])){e.setValue(a);c.selectPage(d[0])}}}}}CKEDITOR.plugins.add("filebrowser",{requires:"popup",init:function(a){a._.filebrowserFn=CKEDITOR.tools.addFunction(i,a);a.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}});CKEDITOR.on("dialogDefinition",function(a){if(a.editor.plugins.filebrowser)for(var b=a.data.definition,d,e=0;e<b.contents.length;++e)if(d=b.contents[e]){c(a.editor,
a.data.name,b,d.elements);if(d.hidden&&d.filebrowser)d.hidden=!h(b,d.id,d.filebrowser)}})}(),function(){function a(a){var c=a.config,h=a.fire("uiSpace",{space:"top",html:""}).html,i=function(){function f(a,b,c){g.setStyle(b,e(c));g.setStyle("position",a)}function h(a){var b=l.getDocumentPosition();switch(a){case "top":f("absolute","top",b.y-s-u);break;case "pin":f("fixed","top",r);break;case "bottom":f("absolute","top",b.y+(k.height||k.bottom-k.top)+u)}j=a}var j,l,m,k,t,s,p,A=c.floatSpaceDockedOffsetX||
0,u=c.floatSpaceDockedOffsetY||0,w=c.floatSpacePinnedOffsetX||0,r=c.floatSpacePinnedOffsetY||0;return function(c){if(l=a.editable()){c&&c.name=="focus"&&g.show();g.removeStyle("left");g.removeStyle("right");m=g.getClientRect();k=l.getClientRect();t=b.getViewPaneSize();s=m.height;p="pageXOffset"in b.$?b.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;if(j){s+u<=k.top?h("top"):s+u>t.height-k.bottom?h("pin"):h("bottom");var c=t.width/2,c=k.left>0&&k.right<t.width&&k.width>m.width?a.config.contentsLangDirection==
"rtl"?"right":"left":c-k.left>k.right-c?"left":"right",f;if(m.width>t.width){c="left";f=0}else{f=c=="left"?k.left>0?k.left:0:k.right<t.width?t.width-k.right:0;if(f+m.width>t.width){c=c=="left"?"right":"left";f=0}}g.setStyle(c,e((j=="pin"?w:A)+f+(j=="pin"?0:c=="left"?p:-p)))}else{j="pin";h("pin");i(c)}}}}();if(h){var g=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(f.output({content:h,id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(c.baseFloatZIndex-
1),topId:a.ui.spaceId("top"),voiceLabel:a.lang.editorPanel+", "+a.name}))),j=CKEDITOR.tools.eventsBuffer(500,i),k=CKEDITOR.tools.eventsBuffer(100,i);g.unselectable();g.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(c){i(c);a.on("change",j.input);b.on("scroll",k.input);b.on("resize",k.input)});a.on("blur",function(){g.hide();a.removeListener("change",j.input);b.removeListener("scroll",k.input);b.removeListener("resize",k.input)});a.on("destroy",
function(){b.removeListener("scroll",k.input);b.removeListener("resize",k.input);g.clearCustomData();g.remove()});a.focusManager.hasFocus&&g.show();a.focusManager.add(g,1)}}var f=CKEDITOR.addTemplate("floatcontainer",'<div id="cke_{name}" class="cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir="{langDir}" title="'+(CKEDITOR.env.gecko?" ":"")+'" lang="{langCode}" role="application" style="{style}" aria-labelledby="cke_{name}_arialbl"><span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span><div class="cke_inner"><div id="{topId}" class="cke_top" role="presentation">{content}</div></div></div>'),
b=CKEDITOR.document.getWindow(),e=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(b){b.on("loaded",function(){a(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var a=CKEDITOR.addTemplate("panel-list",'<ul role="presentation" class="cke_panel_list">{items}</ul>'),f=CKEDITOR.addTemplate("panel-list-item",'<li id="{id}" class="cke_panel_listItem" role=presentation><a id="{id}_option" _cke_focus=1 hidefocus=true title="{title}" href="javascript:void(\'{val}\')"  {onclick}="CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role="option">{text}</a></li>'),
b=CKEDITOR.addTemplate("panel-list-group",'<h1 id="{id}" class="cke_panel_grouptitle" role="presentation" >{label}</h1>'),e=/\'/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){var b=b||{},e=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&&(e["aria-multiselectable"]=true);!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 b=a.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(b);delete this._.started}},getClick:function(){if(!this._.click)this._.click=
CKEDITOR.tools.addFunction(function(a){var b=this.toggle(a);if(this.onClick)this.onClick(a,b)},this);return this._.click}},proto:{add:function(a,b,h){var i=CKEDITOR.tools.getNextId();if(!this._.started){this._.started=1;this._.size=this._.size||0}this._.items[a]=i;var g;g=CKEDITOR.tools.htmlEncodeAttr(a).replace(e,"\\'");a={id:i,val:g,onclick:CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(h||a),text:b||a};this._.pendingList.push(f.output(a))},
startGroup:function(a){this._.close();var c=CKEDITOR.tools.getNextId();this._.groups[a]=c;this._.pendingHtml.push(b.output({id:c,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();if(a){a.setStyle("display","none");b&&b.getName()=="ul"&&
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(),f;for(f in a)e.getById(a[f]).setStyle("display","");for(var g in b){a=e.getById(b[g]);f=a.getNext();a.setStyle("display","");f&&f.getName()=="ul"&&f.setStyle("display","")}},mark:function(a){this.multiSelect||this.unmarkAll();var a=this._.items[a],b=this.element.getDocument().getById(a);
b.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",true);this.onMark&&this.onMark(b)},unmark:function(a){var b=this.element.getDocument(),a=this._.items[a],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 f=a[e];b.getById(f).removeClass("cke_selected");b.getById(f+"_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,f=-1;if(a)for(e=this.element.getDocument().getById(this._.items[a]).getFirst();a=b.getItem(++f);){if(a.equals(e)){this._.focusIndex=f;break}}else this.element.focus();e&&setTimeout(function(){e.focus()},0)}}})}}),function(){var a='<a id="{id}" class="cke_button cke_button__{name} cke_button_{state} {cls}"'+
(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href=\"javascript:void('{titleJs}')\"")+' title="{title}" tabindex="-1" hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="{hasArrow}" aria-disabled="{ariaDisabled}"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(a=a+' onkeypress="return false;"');CKEDITOR.env.gecko&&(a=a+' onblur="this.style.cssText = this.style.cssText;"');var a=a+(' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" '+
(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},this);return false;"><span class="cke_button_icon cke_button__{iconName}_icon" style="{style}"'),a=a+'>&nbsp;</span><span id="{id}_label" class="cke_button_label cke_button__{name}_label" aria-hidden="false">{label}</span>{arrowHtml}</a>',f=CKEDITOR.addTemplate("buttonArrow",'<span class="cke_button_arrow">'+(CKEDITOR.env.hc?"&#9660;":"")+"</span>"),b=CKEDITOR.addTemplate("button",a);CKEDITOR.plugins.add("button",
{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,click:a.click||function(b){b.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};CKEDITOR.ui.button.prototype={render:function(a,d){var c=CKEDITOR.env,h=this._.id=CKEDITOR.tools.getNextId(),i="",g=this.command,j;this._.editor=a;var k={id:h,button:this,
editor:a,focus:function(){CKEDITOR.document.getById(h).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}},n=CKEDITOR.tools.addFunction(function(a){if(k.onkey){a=new CKEDITOR.dom.event(a);return k.onkey(k,a.getKeystroke())!==false}}),o=CKEDITOR.tools.addFunction(function(a){var b;k.onfocus&&(b=k.onfocus(k,new CKEDITOR.dom.event(a))!==false);return b}),q=0;k.clickFn=j=CKEDITOR.tools.addFunction(function(){if(q){a.unlockSelection(1);q=0}k.execute()});if(this.modes){var l=
{},m=function(){var b=a.mode;if(b){b=this.modes[b]?l[b]!=void 0?l[b]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;b=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:b;this.setState(b);this.refresh&&this.refresh()}};a.on("beforeModeUnload",function(){if(a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED)l[a.mode]=this._.state},this);a.on("activeFilterChange",m,this);a.on("mode",m,this);!this.readOnly&&a.on("readOnly",m,this)}else if(g)if(g=a.getCommand(g)){g.on("state",function(){this.setState(g.state)},
this);i=i+(g.state==CKEDITOR.TRISTATE_ON?"on":g.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off")}if(this.directional)a.on("contentDirChanged",function(b){var c=CKEDITOR.document.getById(this._.id),d=c.getFirst(),b=b.data;b!=a.lang.dir?c.addClass("cke_"+b):c.removeClass("cke_ltr").removeClass("cke_rtl");d.setAttribute("style",CKEDITOR.skin.getIconStyle(v,b=="rtl",this.icon,this.iconOffset))},this);g||(i=i+"off");var v=m=this.name||this.command;if(this.icon&&!/\./.test(this.icon)){v=this.icon;this.icon=
null}c={id:h,name:m,iconName:v,label:this.label,cls:this.className||"",state:i,ariaDisabled:i=="disabled"?"true":"false",title:this.title,titleJs:c.gecko&&!c.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:n,focusFn:o,clickFn:j,style:CKEDITOR.skin.getIconStyle(v,a.lang.dir=="rtl",this.icon,this.iconOffset),arrowHtml:this.hasArrow?f.output():""};b.output(c,d);if(this.onRender)this.onRender();return k},setState:function(a){if(this._.state==a)return false;this._.state=
a;var b=CKEDITOR.document.getById(this._.id);if(b){b.setState(a,"cke_button");a==CKEDITOR.TRISTATE_DISABLED?b.setAttribute("aria-disabled",true):b.removeAttribute("aria-disabled");if(this.hasArrow){a=a==CKEDITOR.TRISTATE_ON?this._.editor.lang.button.selectedLabel.replace(/%1/g,this.label):this.label;CKEDITOR.document.getById(this._.id+"_label").setText(a)}else a==CKEDITOR.TRISTATE_ON?b.setAttribute("aria-pressed",true):b.removeAttribute("aria-pressed");return true}return false},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)}}(),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var a='<span id="{id}" class="cke_combo cke_combo__{name} {cls}" role="presentation"><span id="{id}_label" class="cke_combo_label">{label}</span><a class="cke_combo_button" hidefocus=true title="{title}" tabindex="-1"'+
(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":'" href="javascript:void(\'{titleJs}\')"')+' hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="true"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(a=a+' onkeypress="return false;"');CKEDITOR.env.gecko&&(a=a+' onblur="this.style.cssText = this.style.cssText;"');var a=a+(' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':
"onclick")+'="CKEDITOR.tools.callFunction({clickFn},this);return false;"><span id="{id}_text" class="cke_combo_text cke_combo_inlinelabel">{label}</span><span class="cke_combo_open"><span class="cke_combo_arrow">'+(CKEDITOR.env.hc?"&#9660;":CKEDITOR.env.air?"&nbsp;":"")+"</span></span></a></span>"),f=CKEDITOR.addTemplate("combo",a);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this,a,{canGroup:false,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=true;this._={panelDefinition:a,items:{}}},proto:{renderHtml:function(a){var e=[];this.render(a,e);return e.join("")},render:function(a,e){function d(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var c=this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED;if(a.readOnly&&!this.readOnly)c=CKEDITOR.TRISTATE_DISABLED;this.setState(c);this.setValue("");c!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var c=CKEDITOR.env,h="cke_"+this.id,i=CKEDITOR.tools.addFunction(function(c){if(o){a.unlockSelection(1);o=0}j.execute(c)},this),g=this,j={id:h,combo:this,focus:function(){CKEDITOR.document.getById(h).getChild(1).focus()},execute:function(c){var d=g._;if(d.state!=CKEDITOR.TRISTATE_DISABLED){g.createPanel(a);if(d.on)d.panel.hide();
else{g.commit();var e=g.getValue();e?d.list.mark(e):d.list.unmarkAll();d.panel.showBlock(g.id,new CKEDITOR.dom.element(c),4)}}},clickFn:i};a.on("activeFilterChange",d,this);a.on("mode",d,this);a.on("selectionChange",d,this);!this.readOnly&&a.on("readOnly",d,this);var k=CKEDITOR.tools.addFunction(function(c,d){var c=new CKEDITOR.dom.event(c),e=c.getKeystroke();if(e==40)a.once("panelShow",function(a){a.data._.panel._.currentBlock.onKeyDown(40)});switch(e){case 13:case 32:case 40:CKEDITOR.tools.callFunction(i,
d);break;default:j.onkey(j,e)}c.preventDefault()}),n=CKEDITOR.tools.addFunction(function(){j.onfocus&&j.onfocus()}),o=0;j.keyDownFn=k;c={id:h,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:c.gecko&&!c.hc?"":(this.title||"").replace("'",""),keydownFn:k,focusFn:n,clickFn:i};f.output(c,e);if(this.onRender)this.onRender();return j},createPanel:function(a){if(!this._.panel){var e=this._.panelDefinition,d=this._.panelDefinition.block,c=e.parent||CKEDITOR.document.getBody(),
f="cke_combopanel__"+this.name,i=new CKEDITOR.ui.floatPanel(a,c,e),g=i.addListBlock(this.id,d),j=this;i.onShow=function(){this.element.addClass(f);j.setState(CKEDITOR.TRISTATE_ON);j._.on=1;j.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(j.onOpen)j.onOpen();a.once("panelShow",function(){g.focus(!g.multiSelect&&j.getValue())})};i.onHide=function(c){this.element.removeClass(f);j.setState(j.modes&&j.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);j._.on=0;if(!c&&j.onClose)j.onClose()};
i.onEscape=function(){i.hide(1)};g.onClick=function(a,b){j.onClick&&j.onClick.call(j,a,b);i.hide()};this._.panel=i;this._.list=g;i.getBlock(this.id).onHide=function(){j._.on=0;j.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,e){this._.value=a;var d=this.document.getById("cke_"+this.id+"_text");if(d){if(!a&&!e){e=this.label;d.addClass("cke_combo_inlinelabel")}else d.removeClass("cke_combo_inlinelabel");d.setText(typeof e!="undefined"?e:a)}},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,e,d){this._.items[a]=d||a;this._.list.add(a,e,d)},startGroup:function(a){this._.list.startGroup(a)},commit:function(){if(!this._.committed){this._.list.commit();this._.committed=1;CKEDITOR.ui.fire("ready",this)}this._.committed=1},setState:function(a){if(this._.state!=
a){var e=this.document.getById("cke_"+this.id);e.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?e.setAttribute("aria-disabled",true):e.removeAttribute("aria-disabled");this._.state=a}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){if(this._.state!=CKEDITOR.TRISTATE_DISABLED){this._.lastState=this._.state;this.setState(CKEDITOR.TRISTATE_DISABLED)}}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});
CKEDITOR.ui.prototype.addRichCombo=function(a,e){this.add(a,CKEDITOR.UI_RICHCOMBO,e)}}(),CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(a){if(!a.blockless){for(var f=a.config,b=a.lang.format,e=f.format_tags.split(";"),d={},c=0,h=[],i=0;i<e.length;i++){var g=e[i],j=new CKEDITOR.style(f["format_"+g]);if(!a.filter.customConfig||a.filter.check(j)){c++;d[g]=j;d[g]._.enterMode=a.config.enterMode;h.push(j)}}c!==0&&a.ui.addRichCombo("Format",{label:b.label,title:b.panelTitle,toolbar:"styles,20",
allowedContent:h,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(f.contentsCss),multiSelect:false,attributes:{"aria-label":b.panelTitle}},init:function(){this.startGroup(b.panelTitle);for(var a in d){var c=b["tag_"+a];this.add(a,d[a].buildPreview(c),c)}},onClick:function(b){a.focus();a.fire("saveSnapshot");var b=d[b],c=a.elementPath();a[b.checkActive(c,a)?"removeStyle":"applyStyle"](b);setTimeout(function(){a.fire("saveSnapshot")},0)},onRender:function(){a.on("selectionChange",function(b){var c=
this.getValue(),b=b.data.path;this.refresh();for(var e in d)if(d[e].checkActive(b,a)){e!=c&&this.setValue(e,a.lang.format["tag_"+e]);return}this.setValue("")},this)},onOpen:function(){this.showAll();for(var b in d)a.activeFilter.check(d[b])||this.hideItem(b)},refresh:function(){var b=a.elementPath();if(b){if(b.isContextFor("p"))for(var c in d)if(a.activeFilter.check(d[c]))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}}})}}}),CKEDITOR.config.format_tags="p;h1;h2;h3;h4;h5;h6;pre;address;div",CKEDITOR.config.format_p=
{element:"p"},CKEDITOR.config.format_div={element:"div"},CKEDITOR.config.format_pre={element:"pre"},CKEDITOR.config.format_address={element:"address"},CKEDITOR.config.format_h1={element:"h1"},CKEDITOR.config.format_h2={element:"h2"},CKEDITOR.config.format_h3={element:"h3"},CKEDITOR.config.format_h4={element:"h4"},CKEDITOR.config.format_h5={element:"h5"},CKEDITOR.config.format_h6={element:"h6"},function(){var a={canUndo:false,exec:function(a){var b=a.document.createElement("hr");a.insertElement(b)},
allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",{init:function(f){if(!f.blockless){f.addCommand("horizontalrule",a);f.ui.addButton&&f.ui.addButton("HorizontalRule",{label:f.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"})}}})}(),CKEDITOR.plugins.add("htmlwriter",{init:function(a){var f=new CKEDITOR.htmlWriter;f.forceSimpleAmpersand=a.config.forceSimpleAmpersand;f.indentationChars=a.config.dataIndentationChars||"\t";a.dataProcessor.writer=f}}),
CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base();this.indentationChars="\t";this.selfClosingEnd=" />";this.lineBreakChars="\n";this.sortAttributes=1;this._.indent=0;this._.indentation="";this._.inPre=0;this._.rules={};var a=CKEDITOR.dtd,f;for(f in CKEDITOR.tools.extend({},a.$nonBodyContent,a.$block,a.$listItem,a.$tableContent))this.setRules(f,{indent:!a[f]["#"],breakBeforeOpen:1,breakBeforeClose:!a[f]["#"],breakAfterClose:1,needsSpace:f in
a.$block&&!(f in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1});this.setRules("title",{indent:0,breakAfterOpen:0});this.setRules("style",{indent:0,breakBeforeClose:1});this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(a){var f=this._.rules[a];this._.afterCloser&&(f&&f.needsSpace&&this._.needsSpace)&&this._.output.push("\n");if(this._.indent)this.indentation();else if(f&&f.breakBeforeOpen){this.lineBreak();this.indentation()}this._.output.push("<",a);this._.afterCloser=
0},openTagClose:function(a,f){var b=this._.rules[a];if(f){this._.output.push(this.selfClosingEnd);if(b&&b.breakAfterClose)this._.needsSpace=b.needsSpace}else{this._.output.push(">");if(b&&b.indent)this._.indentation=this._.indentation+this.indentationChars}b&&b.breakAfterOpen&&this.lineBreak();a=="pre"&&(this._.inPre=1)},attribute:function(a,f){if(typeof f=="string"){this.forceSimpleAmpersand&&(f=f.replace(/&amp;/g,"&"));f=CKEDITOR.tools.htmlEncodeAttr(f)}this._.output.push(" ",a,'="',f,'"')},closeTag:function(a){var f=
this._.rules[a];if(f&&f.indent)this._.indentation=this._.indentation.substr(this.indentationChars.length);if(this._.indent)this.indentation();else if(f&&f.breakBeforeClose){this.lineBreak();this.indentation()}this._.output.push("</",a,">");a=="pre"&&(this._.inPre=0);if(f&&f.breakAfterClose){this.lineBreak();this._.needsSpace=f.needsSpace}this._.afterCloser=1},text:function(a){if(this._.indent){this.indentation();!this._.inPre&&(a=CKEDITOR.tools.ltrim(a))}this._.output.push(a)},comment:function(a){this._.indent&&
this.indentation();this._.output.push("<\!--",a,"--\>")},lineBreak:function(){!this._.inPre&&this._.output.length>0&&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},setRules:function(a,f){var b=this._.rules[a];b?CKEDITOR.tools.extend(b,f,true):this._.rules[a]=f}}}),function(){function a(a,
e){e||(e=a.getSelection().getSelectedElement());if(e&&e.is("img")&&!e.data("cke-realelement")&&!e.isReadOnly())return e}function f(a){var e=a.getStyle("float");if(e=="inherit"||e=="none")e=0;e||(e=a.getAttribute("align"));return e}CKEDITOR.plugins.add("image",{requires:"dialog",init:function(b){if(!b.plugins.image2){CKEDITOR.dialog.add("image",this.path+"dialogs/image.js");var e="img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}";
CKEDITOR.dialog.isTabEnabled(b,"image","advanced")&&(e="img[alt,dir,id,lang,longdesc,!src,title]{*}(*)");b.addCommand("image",new CKEDITOR.dialogCommand("image",{allowedContent:e,requiredContent:"img[alt,src]",contentTransformations:[["img{width}: sizeToStyle","img[width]: sizeToAttribute"],["img{float}: alignmentToStyle","img[align]: alignmentToAttribute"]]}));b.ui.addButton&&b.ui.addButton("Image",{label:b.lang.common.image,command:"image",toolbar:"insert,10"});b.on("doubleclick",function(a){var b=
a.data.element;if(b.is("img")&&!b.data("cke-realelement")&&!b.isReadOnly())a.data.dialog="image"});b.addMenuItems&&b.addMenuItems({image:{label:b.lang.image.menu,command:"image",group:"image"}});b.contextMenu&&b.contextMenu.addListener(function(d){if(a(b,d))return{image:CKEDITOR.TRISTATE_OFF}})}},afterInit:function(b){function e(d){var c=b.getCommand("justify"+d);if(c){if(d=="left"||d=="right")c.on("exec",function(c){var e=a(b),g;if(e){g=f(e);if(g==d){e.removeStyle("float");d==f(e)&&e.removeAttribute("align")}else e.setStyle("float",
d);c.cancel()}});c.on("refresh",function(c){var e=a(b);if(e){e=f(e);this.setState(e==d?CKEDITOR.TRISTATE_ON:d=="right"||d=="left"?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);c.cancel()}})}}if(!b.plugins.image2){e("left");e("right");e("center");e("block")}}})}(),CKEDITOR.config.image_removeLinkByEmptyURL=!0,function(){function a(a,b){var d=e.exec(a),f=e.exec(b);if(d){if(!d[2]&&f[2]=="px")return f[1];if(d[2]=="px"&&!f[2])return f[1]+"px"}return b}var f=CKEDITOR.htmlParser.cssStyle,b=CKEDITOR.tools.cssLength,
e=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i,d={elements:{$:function(b){var d=b.attributes;if((d=(d=(d=d&&d["data-cke-realelement"])&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(d)))&&d.children[0])&&b.attributes["data-cke-resizable"]){var e=(new f(b)).rules,b=d.attributes,g=e.width,e=e.height;g&&(b.width=a(b.width,g));e&&(b.height=a(b.height,e))}return d}}};CKEDITOR.plugins.add("fakeobjects",{init:function(a){a.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},
afterInit:function(a){(a=(a=a.dataProcessor)&&a.htmlFilter)&&a.addRules(d,{applyToAll:true})}});CKEDITOR.editor.prototype.createFakeElement=function(a,d,e,g){var j=this.lang.fakeobjects,j=j[e]||j.unknown,d={"class":d,"data-cke-realelement":encodeURIComponent(a.getOuterHtml()),"data-cke-real-node-type":a.type,alt:j,title:j,align:a.getAttribute("align")||""};if(!CKEDITOR.env.hc)d.src=CKEDITOR.tools.transparentImageData;e&&(d["data-cke-real-element-type"]=e);if(g){d["data-cke-resizable"]=g;e=new f;g=
a.getAttribute("width");a=a.getAttribute("height");g&&(e.rules.width=b(g));a&&(e.rules.height=b(a));e.populate(d)}return this.document.createElement("img",{attributes:d})};CKEDITOR.editor.prototype.createFakeParserElement=function(a,d,e,g){var j=this.lang.fakeobjects,j=j[e]||j.unknown,k;k=new CKEDITOR.htmlParser.basicWriter;a.writeHtml(k);k=k.getHtml();d={"class":d,"data-cke-realelement":encodeURIComponent(k),"data-cke-real-node-type":a.type,alt:j,title:j,align:a.attributes.align||""};if(!CKEDITOR.env.hc)d.src=
CKEDITOR.tools.transparentImageData;e&&(d["data-cke-real-element-type"]=e);if(g){d["data-cke-resizable"]=g;g=a.attributes;a=new f;e=g.width;g=g.height;e!=void 0&&(a.rules.width=b(e));g!=void 0&&(a.rules.height=b(g));a.populate(d)}return new CKEDITOR.htmlParser.element("img",d)};CKEDITOR.editor.prototype.restoreRealElement=function(b){if(b.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var d=CKEDITOR.dom.element.createFromHtml(decodeURIComponent(b.data("cke-realelement")),this.document);
if(b.data("cke-resizable")){var e=b.getStyle("width"),b=b.getStyle("height");e&&d.setAttribute("width",a(d.getAttribute("width"),e));b&&d.setAttribute("height",a(d.getAttribute("height"),b))}return d}}(),"use strict",function(){function a(a){return a.replace(/'/g,"\\$&")}function f(a){for(var b,c=a.length,d=[],e=0;e<c;e++){b=a.charCodeAt(e);d.push(b)}return"String.fromCharCode("+d.join(",")+")"}function b(b,c){var d=b.plugins.link,e=d.compiledProtectionFunction.params,f,h;h=[d.compiledProtectionFunction.name,
"("];for(var g=0;g<e.length;g++){d=e[g].toLowerCase();f=c[d];g>0&&h.push(",");h.push("'",f?a(encodeURIComponent(c[d])):"","'")}h.push(")");return h.join("")}function e(a){var a=a.config.emailProtection||"",b;if(a&&a!="encode"){b={};a.replace(/^([^(]+)\(([^)]+)\)$/,function(a,c,d){b.name=c;b.params=[];d.replace(/[^,\s]+/g,function(a){b.params.push(a)})})}return b}CKEDITOR.plugins.add("link",{requires:"dialog,fakeobjects",onLoad:function(){function a(b){return c.replace(/%1/g,b=="rtl"?"right":"left").replace(/%2/g,
"cke_contents_"+b)}var b="background:url("+CKEDITOR.getUrl(this.path+"images"+(CKEDITOR.env.hidpi?"/hidpi":"")+"/anchor.png")+") no-repeat %1 center;border:1px dotted #00f;background-size:16px;",c=".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{"+b+"padding-%1:18px;cursor:auto;}.%2 img.cke_anchor{"+b+"width:16px;min-height:15px;height:1.15em;vertical-align:text-bottom;}";CKEDITOR.addCss(a("ltr")+a("rtl"))},init:function(a){var b="a[!href]";
CKEDITOR.dialog.isTabEnabled(a,"link","advanced")&&(b=b.replace("]",",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type]{*}(*)"));CKEDITOR.dialog.isTabEnabled(a,"link","target")&&(b=b.replace("]",",target,onclick]"));a.addCommand("link",new CKEDITOR.dialogCommand("link",{allowedContent:b,requiredContent:"a[href]"}));a.addCommand("anchor",new CKEDITOR.dialogCommand("anchor",{allowedContent:"a[!name,id]",requiredContent:"a[name]"}));a.addCommand("unlink",new CKEDITOR.unlinkCommand);a.addCommand("removeAnchor",
new CKEDITOR.removeAnchorCommand);a.setKeystroke(CKEDITOR.CTRL+76,"link");if(a.ui.addButton){a.ui.addButton("Link",{label:a.lang.link.toolbar,command:"link",toolbar:"links,10"});a.ui.addButton("Unlink",{label:a.lang.link.unlink,command:"unlink",toolbar:"links,20"});a.ui.addButton("Anchor",{label:a.lang.link.anchor.toolbar,command:"anchor",toolbar:"links,30"})}CKEDITOR.dialog.add("link",this.path+"dialogs/link.js");CKEDITOR.dialog.add("anchor",this.path+"dialogs/anchor.js");a.on("doubleclick",function(b){var c=
CKEDITOR.plugins.link.getSelectedLink(a)||b.data.element;if(!c.isReadOnly())if(c.is("a")){b.data.dialog=c.getAttribute("name")&&(!c.getAttribute("href")||!c.getChildCount())?"anchor":"link";b.data.link=c}else if(CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,c))b.data.dialog="anchor"},null,null,0);a.on("doubleclick",function(b){b.data.link&&a.getSelection().selectElement(b.data.link)},null,null,20);a.addMenuItems&&a.addMenuItems({anchor:{label:a.lang.link.anchor.menu,command:"anchor",group:"anchor",
order:1},removeAnchor:{label:a.lang.link.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:a.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:a.lang.link.unlink,command:"unlink",group:"link",order:5}});a.contextMenu&&a.contextMenu.addListener(function(b){if(!b||b.isReadOnly())return null;b=CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,b);if(!b&&!(b=CKEDITOR.plugins.link.getSelectedLink(a)))return null;var c={};b.getAttribute("href")&&b.getChildCount()&&(c={link:CKEDITOR.TRISTATE_OFF,
unlink:CKEDITOR.TRISTATE_OFF});if(b&&b.hasAttribute("name"))c.anchor=c.removeAnchor=CKEDITOR.TRISTATE_OFF;return c});this.compiledProtectionFunction=e(a)},afterInit:function(a){a.dataProcessor.dataFilter.addRules({elements:{a:function(b){return!b.attributes.name?null:!b.children.length?a.createFakeParserElement(b,"cke_anchor","anchor"):null}}});var b=a._.elementsPath&&a._.elementsPath.filters;b&&b.push(function(b,c){if(c=="a"&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,b)||b.getAttribute("name")&&
(!b.getAttribute("href")||!b.getChildCount())))return"anchor"})}});var d=/^javascript:/,c=/^mailto:([^?]+)(?:\?(.+))?$/,h=/subject=([^;?:@&=$,\/]*)/,i=/body=([^;?:@&=$,\/]*)/,g=/^#(.*)$/,j=/^((?:http|https|ftp|news):\/\/)?(.*)$/,k=/^(_(?:self|top|parent|blank))$/,n=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,o=/^javascript:([^(]+)\(([^)]+)\)$/,q=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,
l=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,m={id:"advId",dir:"advLangDir",accessKey:"advAccessKey",name:"advName",lang:"advLangCode",tabindex:"advTabIndex",title:"advTitle",type:"advContentType","class":"advCSSClasses",charset:"advCharset",style:"advStyles",rel:"advRel"};CKEDITOR.plugins.link={getSelectedLink:function(a){var b=a.getSelection(),c=b.getSelectedElement();if(c&&c.is("a"))return c;if(b=b.getRanges()[0]){b.shrink(CKEDITOR.SHRINK_TEXT);return a.elementPath(b.getCommonAncestor()).contains("a",1)}return null},
getEditorAnchors:function(a){for(var b=a.editable(),c=b.isInline()&&!a.plugins.divarea?a.document:b,b=c.getElementsByTag("a"),c=c.getElementsByTag("img"),d=[],e=0,f;f=b.getItem(e++);)if(f.data("cke-saved-name")||f.hasAttribute("name"))d.push({name:f.data("cke-saved-name")||f.getAttribute("name"),id:f.getAttribute("id")});for(e=0;f=c.getItem(e++);)(f=this.tryRestoreFakeAnchor(a,f))&&d.push({name:f.getAttribute("name"),id:f.getAttribute("id")});return d},fakeAnchor:true,tryRestoreFakeAnchor:function(a,
b){if(b&&b.data("cke-real-element-type")&&b.data("cke-real-element-type")=="anchor"){var c=a.restoreRealElement(b);if(c.data("cke-saved-name"))return c}},parseLinkAttributes:function(a,b){var e=b&&(b.data("cke-saved-href")||b.getAttribute("href"))||"",f=a.plugins.link.compiledProtectionFunction,A=a.config.emailProtection,u,w={};e.match(d)&&(A=="encode"?e=e.replace(n,function(a,b,c){return"mailto:"+String.fromCharCode.apply(String,b.split(","))+(c&&c.replace(/\\'/g,"'"))}):A&&e.replace(o,function(a,
b,c){if(b==f.name){w.type="email";for(var a=w.email={},b=/(^')|('$)/g,c=c.match(/[^,\s]+/g),d=c.length,e,h,g=0;g<d;g++){e=decodeURIComponent;h=c[g].replace(b,"").replace(/\\'/g,"'");h=e(h);e=f.params[g].toLowerCase();a[e]=h}a.address=[a.name,a.domain].join("@")}}));if(!w.type)if(A=e.match(g)){w.type="anchor";w.anchor={};w.anchor.name=w.anchor.id=A[1]}else if(A=e.match(c)){u=e.match(h);e=e.match(i);w.type="email";var r=w.email={};r.address=A[1];u&&(r.subject=decodeURIComponent(u[1]));e&&(r.body=decodeURIComponent(e[1]))}else if(e&&
(u=e.match(j))){w.type="url";w.url={};w.url.protocol=u[1];w.url.url=u[2]}if(b){if(e=b.getAttribute("target"))w.target={type:e.match(k)?e:"frame",name:e};else if(e=(e=b.data("cke-pa-onclick")||b.getAttribute("onclick"))&&e.match(q))for(w.target={type:"popup",name:e[1]};A=l.exec(e[2]);)(A[2]=="yes"||A[2]=="1")&&!(A[1]in{height:1,width:1,top:1,left:1})?w.target[A[1]]=true:isFinite(A[2])&&(w.target[A[1]]=A[2]);var e={},x;for(x in m)(A=b.getAttribute(x))&&(e[m[x]]=A);if(x=b.data("cke-saved-name")||e.advName)e.advName=
x;if(!CKEDITOR.tools.isEmpty(e))w.advanced=e}return w},getLinkAttributes:function(c,d){var e=c.config.emailProtection||"",h={};switch(d.type){case "url":var e=d.url&&d.url.protocol!=void 0?d.url.protocol:"http://",g=d.url&&CKEDITOR.tools.trim(d.url.url)||"";h["data-cke-saved-href"]=g.indexOf("/")===0?g:e+g;break;case "anchor":e=d.anchor&&d.anchor.id;h["data-cke-saved-href"]="#"+(d.anchor&&d.anchor.name||e||"");break;case "email":var i=d.email,g=i.address;switch(e){case "":case "encode":var j=encodeURIComponent(i.subject||
""),l=encodeURIComponent(i.body||""),i=[];j&&i.push("subject="+j);l&&i.push("body="+l);i=i.length?"?"+i.join("&"):"";if(e=="encode"){e=["javascript:void(location.href='mailto:'+",f(g)];i&&e.push("+'",a(i),"'");e.push(")")}else e=["mailto:",g,i];break;default:e=g.split("@",2);i.name=e[0];i.domain=e[1];e=["javascript:",b(c,i)]}h["data-cke-saved-href"]=e.join("")}if(d.target)if(d.target.type=="popup"){for(var e=["window.open(this.href, '",d.target.name||"","', '"],k=["resizable","status","location",
"toolbar","menubar","fullscreen","scrollbars","dependent"],g=k.length,j=function(a){d.target[a]&&k.push(a+"="+d.target[a])},i=0;i<g;i++)k[i]=k[i]+(d.target[k[i]]?"=yes":"=no");j("width");j("left");j("height");j("top");e.push(k.join(","),"'); return false;");h["data-cke-pa-onclick"]=e.join("")}else if(d.target.type!="notSet"&&d.target.name)h.target=d.target.name;if(d.advanced){for(var n in m)(e=d.advanced[m[n]])&&(h[n]=e);if(h.name)h["data-cke-saved-name"]=h.name}if(h["data-cke-saved-href"])h.href=
h["data-cke-saved-href"];n=CKEDITOR.tools.extend({target:1,onclick:1,"data-cke-pa-onclick":1,"data-cke-saved-name":1},m);for(var q in h)delete n[q];return{set:h,removed:CKEDITOR.tools.objectKeys(n)}}};CKEDITOR.unlinkCommand=function(){};CKEDITOR.unlinkCommand.prototype={exec:function(a){var b=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1});a.removeStyle(b)},refresh:function(a,b){var c=b.lastElement&&b.lastElement.getAscendant("a",true);c&&c.getName()=="a"&&c.getAttribute("href")&&
c.getChildCount()?this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)},contextSensitive:1,startDisabled:1,requiredContent:"a[href]"};CKEDITOR.removeAnchorCommand=function(){};CKEDITOR.removeAnchorCommand.prototype={exec:function(a){var b=a.getSelection(),c=b.createBookmarks(),d;if(b&&(d=b.getSelectedElement())&&(!d.getChildCount()?CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,d):d.is("a")))d.remove(1);else if(d=CKEDITOR.plugins.link.getSelectedLink(a))if(d.hasAttribute("href")){d.removeAttributes({name:1,
"data-cke-saved-name":1});d.removeClass("cke_anchor")}else d.remove(1);b.selectBookmarks(c)},requiredContent:"a[name]"};CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:true,linkShowTargetTab:true})}(),"use strict",function(){function a(a,b,c){return k(b)&&k(c)&&c.equals(b.getNext(function(a){return!(X(a)||Y(a)||n(a))}))}function f(a){this.upper=a[0];this.lower=a[1];this.set.apply(this,a.slice(2))}function b(a){var b=a.element;if(b&&k(b))if((b=b.getAscendant(a.triggers,true))&&a.editable.contains(b)){var d=
c(b,true);if(d.getAttribute("contenteditable")=="true")return b;if(d.is(a.triggers))return d}return null}function e(a,b,c){p(a,b);p(a,c);a=b.size.bottom;c=c.size.top;return a&&c?0|(a+c)/2:a||c}function d(a,b,c){return b=b[c?"getPrevious":"getNext"](function(b){return b&&b.type==CKEDITOR.NODE_TEXT&&!X(b)||k(b)&&!n(b)&&!j(a,b)})}function c(a,b){if(a.data("cke-editable"))return null;for(b||(a=a.getParent());a;){if(a.data("cke-editable"))break;if(a.hasAttribute("contenteditable"))return a;a=a.getParent()}return null}
function h(a){var b=a.doc,c=y('<span contenteditable="false" style="'+T+"position:absolute;border-top:1px dashed "+a.boxColor+'"></span>',b),d=this.path+"images/"+(z.hidpi?"hidpi/":"")+"icon.png";r(c,{attach:function(){this.wrap.getParent()||this.wrap.appendTo(a.editable,true);return this},lineChildren:[r(y('<span title="'+a.editor.lang.magicline.title+'" contenteditable="false">&#8629;</span>',b),{base:T+"height:17px;width:17px;"+(a.rtl?"left":"right")+":17px;background:url("+d+") center no-repeat "+
a.boxColor+";cursor:pointer;"+(z.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(z.hidpi?"background-size: 9px 10px;":""),looks:["top:-8px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","2px",1),"top:-17px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","2px 2px 0px 0px",1),"top:-1px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","0px 0px 2px 2px",1)]}),r(y(W,b),{base:Q+"left:0px;border-left-color:"+a.boxColor+";",looks:["border-width:8px 0 8px 8px;top:-8px",
"border-width:8px 0 0 8px;top:-8px","border-width:0 0 8px 8px;top:0px"]}),r(y(W,b),{base:Q+"right:0px;border-right-color:"+a.boxColor+";",looks:["border-width:8px 8px 8px 0;top:-8px","border-width:8px 8px 0 0;top:-8px","border-width:0 8px 8px 0;top:0px"]})],detach:function(){this.wrap.getParent()&&this.wrap.remove();return this},mouseNear:function(){p(a,this);var b=a.holdDistance,c=this.size;return c&&a.mouse.y>c.top-b&&a.mouse.y<c.bottom+b&&a.mouse.x>c.left-b&&a.mouse.x<c.right+b?true:false},place:function(){var b=
a.view,c=a.editable,d=a.trigger,e=d.upper,f=d.lower,h=e||f,g=h.getParent(),i={};this.trigger=d;e&&p(a,e,true);f&&p(a,f,true);p(a,g,true);a.inInlineMode&&A(a,true);if(g.equals(c)){i.left=b.scroll.x;i.right=-b.scroll.x;i.width=""}else{i.left=h.size.left-h.size.margin.left+b.scroll.x-(a.inInlineMode?b.editable.left+b.editable.border.left:0);i.width=h.size.outerWidth+h.size.margin.left+h.size.margin.right+b.scroll.x;i.right=""}if(e&&f)i.top=e.size.margin.bottom===f.size.margin.top?0|e.size.bottom+e.size.margin.bottom/
2:e.size.margin.bottom<f.size.margin.top?e.size.bottom+e.size.margin.bottom:e.size.bottom+e.size.margin.bottom-f.size.margin.top;else if(e){if(!f)i.top=e.size.bottom+e.size.margin.bottom}else i.top=f.size.top-f.size.margin.top;if(d.is(O)||i.top>b.scroll.y-15&&i.top<b.scroll.y+5){i.top=a.inInlineMode?0:b.scroll.y;this.look(O)}else if(d.is(L)||i.top>b.pane.bottom-5&&i.top<b.pane.bottom+15){i.top=a.inInlineMode?b.editable.height+b.editable.padding.top+b.editable.padding.bottom:b.pane.bottom-1;this.look(L)}else{if(a.inInlineMode)i.top=
i.top-(b.editable.top+b.editable.border.top);this.look(K)}if(a.inInlineMode){i.top--;i.top=i.top+b.editable.scroll.top;i.left=i.left+b.editable.scroll.left}for(var j in i)i[j]=CKEDITOR.tools.cssLength(i[j]);this.setStyles(i)},look:function(a){if(this.oldLook!=a){for(var b=this.lineChildren.length,c;b--;)(c=this.lineChildren[b]).setAttribute("style",c.base+c.looks[0|a/2]);this.oldLook=a}},wrap:new x("span",a.doc)});for(b=c.lineChildren.length;b--;)c.lineChildren[b].appendTo(c);c.look(K);c.appendTo(c.wrap);
c.unselectable();c.lineChildren[0].on("mouseup",function(b){c.detach();i(a,function(b){var c=a.line.trigger;b[c.is(E)?"insertBefore":"insertAfter"](c.is(E)?c.lower:c.upper)},true);a.editor.focus();!z.ie&&a.enterMode!=CKEDITOR.ENTER_BR&&a.hotNode.scrollIntoView();b.data.preventDefault(true)});c.on("mousedown",function(a){a.data.preventDefault(true)});a.line=c}function i(a,b,d){var e=new CKEDITOR.dom.range(a.doc),f=a.editor,h;if(z.ie&&a.enterMode==CKEDITOR.ENTER_BR)h=a.doc.createText(J);else{h=(h=c(a.element,
true))&&h.data("cke-enter-mode")||a.enterMode;h=new x(C[h],a.doc);h.is("br")||a.doc.createText(J).appendTo(h)}d&&f.fire("saveSnapshot");b(h);e.moveToPosition(h,CKEDITOR.POSITION_AFTER_START);f.getSelection().selectRanges([e]);a.hotNode=h;d&&f.fire("saveSnapshot")}function g(a,e){return{canUndo:true,modes:{wysiwyg:1},exec:function(){function f(b){var c=z.ie&&z.version<9?" ":J,d=a.hotNode&&a.hotNode.getText()==c&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!e;i(a,function(c){d&&a.hotNode&&a.hotNode.remove();
c[e?"insertAfter":"insertBefore"](b);c.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!e});a.lastCmdDirection=!!e});!z.ie&&a.enterMode!=CKEDITOR.ENTER_BR&&a.hotNode.scrollIntoView();a.line.detach()}return function(h){var h=h.getSelection().getStartElement(),g,h=h.getAscendant(P,1);if(!l(a,h)&&h&&!h.equals(a.editable)&&!h.contains(a.editable)){if((g=c(h))&&g.getAttribute("contenteditable")=="false")h=g;a.element=h;g=d(a,h,!e);var i;if(k(g)&&g.is(a.triggers)&&g.is(S)&&(!d(a,g,!e)||
(i=d(a,g,!e))&&k(i)&&i.is(a.triggers)))f(g);else{i=b(a,h);if(k(i))if(d(a,i,!e))(h=d(a,i,!e))&&(k(h)&&h.is(a.triggers))&&f(i);else f(i)}}}}()}}function j(a,b){if(!b||!(b.type==CKEDITOR.NODE_ELEMENT&&b.$))return false;var c=a.line;return c.wrap.equals(b)||c.wrap.contains(b)}function k(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.$}function n(a){if(!k(a))return false;var b;if(!(b=o(a)))if(k(a)){b={left:1,right:1,center:1};b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])}else b=false;
return b}function o(a){return!!{absolute:1,fixed:1}[a.getComputedStyle("position")]}function q(a,b){return k(b)?b.is(a.triggers):null}function l(a,b){if(!b)return false;for(var c=b.getParents(1),d=c.length;d--;)for(var e=a.tabuList.length;e--;)if(c[d].hasAttribute(a.tabuList[e]))return true;return false}function m(a,b,c){b=b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(M)});if(!b)return false;p(a,b);return c?b.size.top>a.mouse.y:b.size.bottom<a.mouse.y}function v(a){var b=a.editable,
c=a.mouse,d=a.view,e=a.triggerOffset;A(a);var h=c.y>(a.inInlineMode?d.editable.top+d.editable.height/2:Math.min(d.editable.height,d.pane.height)/2),b=b[h?"getLast":"getFirst"](function(a){return!(X(a)||Y(a))});if(!b)return null;j(a,b)&&(b=a.line.wrap[h?"getPrevious":"getNext"](function(a){return!(X(a)||Y(a))}));if(!k(b)||n(b)||!q(a,b))return null;p(a,b);if(!h&&b.size.top>=0&&c.y>0&&c.y<b.size.top+e){a=a.inInlineMode||d.scroll.y===0?O:K;return new f([null,b,E,I,a])}if(h&&b.size.bottom<=d.pane.height&&
c.y>b.size.bottom-e&&c.y<d.pane.height){a=a.inInlineMode||b.size.bottom>d.pane.height-e&&b.size.bottom<d.pane.height?L:K;return new f([b,null,D,I,a])}return null}function t(a){var c=a.mouse,e=a.view,h=a.triggerOffset,g=b(a);if(!g)return null;p(a,g);var h=Math.min(h,0|g.size.outerHeight/2),i=[],j,l;if(c.y>g.size.top-1&&c.y<g.size.top+h)l=false;else if(c.y>g.size.bottom-h&&c.y<g.size.bottom+1)l=true;else return null;if(n(g)||m(a,g,l)||g.getParent().is(N))return null;var t=d(a,g,!l);if(t){if(t&&t.type==
CKEDITOR.NODE_TEXT)return null;if(k(t)){if(n(t)||!q(a,t)||t.getParent().is(N))return null;i=[t,g][l?"reverse":"concat"]().concat([F,I])}}else{if(g.equals(a.editable[l?"getLast":"getFirst"](a.isRelevant))){A(a);l&&c.y>g.size.bottom-h&&c.y<e.pane.height&&g.size.bottom>e.pane.height-h&&g.size.bottom<e.pane.height?j=L:c.y>0&&c.y<g.size.top+h&&(j=O)}else j=K;i=[null,g][l?"reverse":"concat"]().concat([l?D:E,I,j,g.equals(a.editable[l?"getLast":"getFirst"](a.isRelevant))?l?L:O:K])}return 0 in i?new f(i):
null}function s(a,b,c,d){for(var e=function(){var c=z.ie?b.$.currentStyle:a.win.$.getComputedStyle(b.$,"");return z.ie?function(a){return c[CKEDITOR.tools.cssStyleToDomStyle(a)]}:function(a){return c.getPropertyValue(a)}}(),f=b.getDocumentPosition(),h={},g={},i={},j={},l=R.length;l--;){h[R[l]]=parseInt(e("border-"+R[l]+"-width"),10)||0;i[R[l]]=parseInt(e("padding-"+R[l]),10)||0;g[R[l]]=parseInt(e("margin-"+R[l]),10)||0}(!c||d)&&u(a,d);j.top=f.y-(c?0:a.view.scroll.y);j.left=f.x-(c?0:a.view.scroll.x);
j.outerWidth=b.$.offsetWidth;j.outerHeight=b.$.offsetHeight;j.height=j.outerHeight-(i.top+i.bottom+h.top+h.bottom);j.width=j.outerWidth-(i.left+i.right+h.left+h.right);j.bottom=j.top+j.outerHeight;j.right=j.left+j.outerWidth;if(a.inInlineMode)j.scroll={top:b.$.scrollTop,left:b.$.scrollLeft};return r({border:h,padding:i,margin:g,ignoreScroll:c},j,true)}function p(a,b,c){if(!k(b))return b.size=null;if(b.size){if(b.size.ignoreScroll==c&&b.size.date>new Date-U)return null}else b.size={};return r(b.size,
s(a,b,c),{date:+new Date},true)}function A(a,b){a.view.editable=s(a,a.editable,b,true)}function u(a,b){if(!a.view)a.view={};var c=a.view;if(b||!(c&&c.date>new Date-U)){var d=a.win,c=d.getScrollPosition(),d=d.getViewPaneSize();r(a.view,{scroll:{x:c.x,y:c.y,width:a.doc.$.documentElement.scrollWidth-d.width,height:a.doc.$.documentElement.scrollHeight-d.height},pane:{width:d.width,height:d.height,bottom:d.height+c.y},date:+new Date},true)}}function w(a,b,c,d){for(var e=d,h=d,g=0,i=false,j=false,l=a.view.pane.height,
m=a.mouse;m.y+g<l&&m.y-g>0;){i||(i=b(e,d));j||(j=b(h,d));!i&&m.y-g>0&&(e=c(a,{x:m.x,y:m.y-g}));!j&&m.y+g<l&&(h=c(a,{x:m.x,y:m.y+g}));if(i&&j)break;g=g+2}return new f([e,h,null,null])}CKEDITOR.plugins.add("magicline",{init:function(a){var c=a.config,e=c.magicline_triggerOffset||30,m={editor:a,enterMode:c.enterMode,triggerOffset:e,holdDistance:0|e*(c.magicline_holdDistance||0.5),boxColor:c.magicline_color||"#ff0000",rtl:c.contentsLangDirection=="rtl",tabuList:["data-cke-hidden-sel"].concat(c.magicline_tabuList||
[]),triggers:c.magicline_everywhere?P:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},q,p,w;m.isRelevant=function(a){return k(a)&&!j(m,a)&&!n(a)};a.on("contentDom",function(){var e=a.editable(),k=a.document,n=a.window;r(m,{editable:e,inInlineMode:e.isInline(),doc:k,win:n,hotNode:null},true);m.boundary=m.inInlineMode?m.editable:m.doc.getDocumentElement();if(!e.is(G.$inline)){m.inInlineMode&&!o(e)&&e.setStyles({position:"relative",top:null,left:null});h.call(this,m);u(m);e.attachListener(a,
"beforeUndoImage",function(){m.line.detach()});e.attachListener(a,"beforeGetData",function(){if(m.line.wrap.getParent()){m.line.detach();a.once("getData",function(){m.line.attach()},null,null,1E3)}},null,null,0);e.attachListener(m.inInlineMode?k:k.getWindow().getFrame(),"mouseout",function(b){if(a.mode=="wysiwyg")if(m.inInlineMode){var c=b.data.$.clientX,b=b.data.$.clientY;u(m);A(m,true);var d=m.view.editable,e=m.view.scroll;if(!(c>d.left-e.x&&c<d.right-e.x)||!(b>d.top-e.y&&b<d.bottom-e.y)){clearTimeout(w);
w=null;m.line.detach()}}else{clearTimeout(w);w=null;m.line.detach()}});e.attachListener(e,"keyup",function(){m.hiddenMode=0});e.attachListener(e,"keydown",function(b){if(a.mode=="wysiwyg"){b=b.data.getKeystroke();a.getSelection().getStartElement();switch(b){case 2228240:case 16:m.hiddenMode=1;m.line.detach()}}});e.attachListener(m.inInlineMode?e:k,"mousemove",function(b){p=true;if(!(a.mode!="wysiwyg"||a.readOnly||w)){var c={x:b.data.$.clientX,y:b.data.$.clientY};w=setTimeout(function(){m.mouse=c;
w=m.trigger=null;u(m);if(p&&!m.hiddenMode&&a.focusManager.hasFocus&&!m.line.mouseNear()&&(m.element=Z(m,true))){if((m.trigger=v(m)||t(m)||aa(m))&&!l(m,m.trigger.upper||m.trigger.lower))m.line.attach().place();else{m.trigger=null;m.line.detach()}p=false}},30)}});e.attachListener(n,"scroll",function(){if(a.mode=="wysiwyg"){m.line.detach();if(z.webkit){m.hiddenMode=1;clearTimeout(q);q=setTimeout(function(){if(!m.mouseDown)m.hiddenMode=0},50)}}});e.attachListener(B?k:n,"mousedown",function(){if(a.mode==
"wysiwyg"){m.line.detach();m.hiddenMode=1;m.mouseDown=1}});e.attachListener(B?k:n,"mouseup",function(){m.hiddenMode=0;m.mouseDown=0});a.addCommand("accessPreviousSpace",g(m));a.addCommand("accessNextSpace",g(m,true));a.setKeystroke([[c.magicline_keystrokePrevious,"accessPreviousSpace"],[c.magicline_keystrokeNext,"accessNextSpace"]]);a.on("loadSnapshot",function(){var b,c,d,e;for(e in{p:1,br:1,div:1}){b=a.document.getElementsByTag(e);for(d=b.count();d--;)if((c=b.getItem(d)).data("cke-magicline-hot")){m.hotNode=
c;m.lastCmdDirection=c.data("cke-magicline-dir")==="true"?true:false;return}}});this.backdoor={accessFocusSpace:i,boxTrigger:f,isLine:j,getAscendantTrigger:b,getNonEmptyNeighbour:d,getSize:s,that:m,triggerEdge:t,triggerEditable:v,triggerExpand:aa}}},this)}});var r=CKEDITOR.tools.extend,x=CKEDITOR.dom.element,y=x.createFromHtml,z=CKEDITOR.env,B=CKEDITOR.env.ie&&CKEDITOR.env.version<9,G=CKEDITOR.dtd,C={},E=128,D=64,F=32,I=16,H=8,O=4,L=2,K=1,J=" ",N=G.$listItem,M=G.$tableContent,S=r({},G.$nonEditable,
G.$empty),P=G.$block,U=100,T="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",Q=T+"border-color:transparent;display:block;border-style:solid;",W="<span>"+J+"</span>";C[CKEDITOR.ENTER_BR]="br";C[CKEDITOR.ENTER_P]="p";C[CKEDITOR.ENTER_DIV]="div";f.prototype={set:function(a,b,c){this.properties=a+b+(c||K);return this},is:function(a){return(this.properties&a)==a}};var Z=function(){return function(a,b,c){if(!a.mouse)return null;
var d=a.doc,e=a.line.wrap,c=c||a.mouse,f=new CKEDITOR.dom.element(d.$.elementFromPoint(c.x,c.y));if(b&&j(a,f)){e.hide();f=new CKEDITOR.dom.element(d.$.elementFromPoint(c.x,c.y));e.show()}return!f||!(f.type==CKEDITOR.NODE_ELEMENT&&f.$)||z.ie&&z.version<9&&!a.boundary.equals(f)&&!a.boundary.contains(f)?null:f}}(),X=CKEDITOR.dom.walker.whitespaces(),Y=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),aa=function(){function b(d){var f=d.element,h,g,i;if(!k(f)||f.contains(d.editable)||f.isReadOnly())return null;
i=w(d,function(a,b){return!b.equals(a)},function(a,b){return Z(a,true,b)},f);h=i.upper;g=i.lower;if(a(d,h,g))return i.set(F,H);if(h&&f.contains(h))for(;!h.getParent().equals(f);)h=h.getParent();else h=f.getFirst(function(a){return c(d,a)});if(g&&f.contains(g))for(;!g.getParent().equals(f);)g=g.getParent();else g=f.getLast(function(a){return c(d,a)});if(!h||!g)return null;p(d,h);p(d,g);if(!(d.mouse.y>h.size.top&&d.mouse.y<g.size.bottom))return null;for(var f=Number.MAX_VALUE,j,m,l,n;g&&!g.equals(h);){if(!(m=
h.getNext(d.isRelevant)))break;j=Math.abs(e(d,h,m)-d.mouse.y);if(j<f){f=j;l=h;n=m}h=m;p(d,h)}if(!l||!n||!(d.mouse.y>l.size.top&&d.mouse.y<n.size.bottom))return null;i.upper=l;i.lower=n;return i.set(F,H)}function c(a,b){return!(b&&b.type==CKEDITOR.NODE_TEXT||Y(b)||n(b)||j(a,b)||b.type==CKEDITOR.NODE_ELEMENT&&b.$&&b.is("br"))}return function(c){var d=b(c),e;if(e=d){e=d.upper;var f=d.lower;e=!e||!f||n(f)||n(e)||f.equals(e)||e.equals(f)||f.contains(e)||e.contains(f)?false:q(c,e)&&q(c,f)&&a(c,e,f)?true:
false}return e?d:null}}(),R=["top","left","right","bottom"]}(),CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51,CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.SHIFT+52,function(){function a(a){if(!a||a.type!=CKEDITOR.NODE_ELEMENT||a.getName()!="form")return[];for(var b=[],d=["style","className"],e=0;e<d.length;e++){var f=a.$.elements.namedItem(d[e]);if(f){f=new CKEDITOR.dom.element(f);b.push([f,f.nextSibling]);f.remove()}}return b}function f(a,b){if(a&&!(a.type!=
CKEDITOR.NODE_ELEMENT||a.getName()!="form")&&b.length>0)for(var d=b.length-1;d>=0;d--){var e=b[d][0],f=b[d][1];f?e.insertBefore(f):e.appendTo(a)}}function b(b,d){var e=a(b),g={},j=b.$;if(!d){g["class"]=j.className||"";j.className=""}g.inline=j.style.cssText||"";if(!d)j.style.cssText="position: static; overflow: visible";f(e);return g}function e(b,d){var e=a(b),g=b.$;if("class"in d)g.className=d["class"];if("inline"in d)g.style.cssText=d.inline;f(e)}function d(a){if(!a.editable().isInline()){var b=
CKEDITOR.instances,d;for(d in b){var e=b[d];if(e.mode=="wysiwyg"&&!e.readOnly){e=e.document.getBody();e.setAttribute("contentEditable",false);e.setAttribute("contentEditable",true)}}if(a.editable().hasFocus){a.toolbox.focus();a.focus()}}}CKEDITOR.plugins.add("maximize",{init:function(a){function f(){var b=j.getViewPaneSize();a.resize(b.width,b.height,null,true)}if(a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var i=a.lang,g=CKEDITOR.document,j=g.getWindow(),k,n,o,q=CKEDITOR.TRISTATE_OFF;a.addCommand("maximize",
{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:false,exec:function(){var l=a.container.getChild(1),m=a.ui.space("contents");if(a.mode=="wysiwyg"){var v=a.getSelection();k=v&&v.getRanges();n=j.getScrollPosition()}else{var t=a.editable().$;k=!CKEDITOR.env.ie&&[t.selectionStart,t.selectionEnd];n=[t.scrollLeft,t.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){j.on("resize",f);o=j.getScrollPosition();for(v=a.container;v=v.getParent();){v.setCustomData("maximize_saved_styles",
b(v));v.setStyle("z-index",a.config.baseFloatZIndex-5)}m.setCustomData("maximize_saved_styles",b(m,true));l.setCustomData("maximize_saved_styles",b(l,true));m={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0};g.getDocumentElement().setStyles(m);!CKEDITOR.env.gecko&&g.getDocumentElement().setStyle("position","fixed");(!CKEDITOR.env.gecko||!CKEDITOR.env.quirks)&&g.getBody().setStyles(m);CKEDITOR.env.ie?setTimeout(function(){j.$.scrollTo(0,0)},0):j.$.scrollTo(0,0);l.setStyle("position",CKEDITOR.env.gecko&&
CKEDITOR.env.quirks?"fixed":"absolute");l.$.offsetLeft;l.setStyles({"z-index":a.config.baseFloatZIndex-5,left:"0px",top:"0px"});l.addClass("cke_maximized");f();m=l.getDocumentPosition();l.setStyles({left:-1*m.x+"px",top:-1*m.y+"px"});CKEDITOR.env.gecko&&d(a)}else if(this.state==CKEDITOR.TRISTATE_ON){j.removeListener("resize",f);m=[m,l];for(v=0;v<m.length;v++){e(m[v],m[v].getCustomData("maximize_saved_styles"));m[v].removeCustomData("maximize_saved_styles")}for(v=a.container;v=v.getParent();){e(v,
v.getCustomData("maximize_saved_styles"));v.removeCustomData("maximize_saved_styles")}CKEDITOR.env.ie?setTimeout(function(){j.$.scrollTo(o.x,o.y)},0):j.$.scrollTo(o.x,o.y);l.removeClass("cke_maximized");if(CKEDITOR.env.webkit){l.setStyle("display","inline");setTimeout(function(){l.setStyle("display","block")},0)}a.fire("resize")}this.toggleState();if(v=this.uiItems[0]){m=this.state==CKEDITOR.TRISTATE_OFF?i.maximize.maximize:i.maximize.minimize;v=CKEDITOR.document.getById(v._.id);v.getChild(1).setHtml(m);
v.setAttribute("title",m);v.setAttribute("href",'javascript:void("'+m+'");')}if(a.mode=="wysiwyg")if(k){CKEDITOR.env.gecko&&d(a);a.getSelection().selectRanges(k);(t=a.getSelection().getStartElement())&&t.scrollIntoView(true)}else j.$.scrollTo(n.x,n.y);else{if(k){t.selectionStart=k[0];t.selectionEnd=k[1]}t.scrollLeft=n[0];t.scrollTop=n[1]}k=n=null;q=this.state;a.fire("maximize",this.state)},canUndo:false});a.ui.addButton&&a.ui.addButton("Maximize",{label:i.maximize.maximize,command:"maximize",toolbar:"tools,10"});
a.on("mode",function(){var b=a.getCommand("maximize");b.setState(b.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:q)},null,null,100)}}})}(),function(){function a(a,e,d){var c=CKEDITOR.cleanWord;if(c)d();else{a=CKEDITOR.getUrl(a.config.pasteFromWordCleanupFile||e+"filter/default.js");CKEDITOR.scriptLoader.load(a,d,null,true)}return!c}function f(a){a.data.type="html"}CKEDITOR.plugins.add("pastefromword",{requires:"clipboard",init:function(b){var e=0,d=this.path;b.addCommand("pastefromword",
{canUndo:false,async:true,exec:function(a){var b=this;e=1;a.once("beforePaste",f);a.getClipboardData({title:a.lang.pastefromword.title},function(d){d&&a.fire("paste",{type:"html",dataValue:d.dataValue});a.fire("afterCommandExec",{name:"pastefromword",command:b,returnValue:!!d})})}});b.ui.addButton&&b.ui.addButton("PasteFromWord",{label:b.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});b.on("pasteState",function(a){b.getCommand("pastefromword").setState(a.data)});b.on("paste",
function(c){var f=c.data,i=f.dataValue;if(i&&(e||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(i))){var g=a(b,d,function(){if(g)b.fire("paste",f);else if(!b.config.pasteFromWordPromptCleanup||e||confirm(b.lang.pastefromword.confirmCleanup))f.dataValue=CKEDITOR.cleanWord(i,b)});g&&c.cancel()}},null,null,3)}})}(),function(){var a={canUndo:false,async:true,exec:function(f){f.getClipboardData({title:f.lang.pastetext.title},function(b){b&&f.fire("paste",{type:"text",dataValue:b.dataValue});
f.fire("afterCommandExec",{name:"pastetext",command:a,returnValue:!!b})})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(f){f.addCommand("pastetext",a);f.ui.addButton&&f.ui.addButton("PasteText",{label:f.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(f.config.forcePasteAsPlainText)f.on("beforePaste",function(a){if(a.data.type!="html")a.data.type="text"});f.on("pasteState",function(a){f.getCommand("pastetext").setState(a.data)})}})}(),CKEDITOR.plugins.add("removeformat",
{init:function(a){a.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);a.ui.addButton&&a.ui.addButton("RemoveFormat",{label:a.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(a){for(var f=a._.removeFormatRegex||(a._.removeFormatRegex=RegExp("^(?:"+a.config.removeFormatTags.replace(/,/g,"|")+")$","i")),b=a._.removeAttributes||(a._.removeAttributes=a.config.removeFormatAttributes.split(",")),
e=CKEDITOR.plugins.removeformat.filter,d=a.getSelection().getRanges(1),c=d.createIterator(),h;h=c.getNextRange();){h.collapsed||h.enlarge(CKEDITOR.ENLARGE_ELEMENT);var i=h.createBookmark(),g=i.startNode,j=i.endNode,k=function(b){for(var c=a.elementPath(b),d=c.elements,h=1,g;g=d[h];h++){if(g.equals(c.block)||g.equals(c.blockLimit))break;f.test(g.getName())&&e(a,g)&&b.breakParent(g)}};k(g);if(j){k(j);for(g=g.getNextSourceNode(true,CKEDITOR.NODE_ELEMENT);g;){if(g.equals(j))break;k=g.getNextSourceNode(false,
CKEDITOR.NODE_ELEMENT);if(!(g.getName()=="img"&&g.data("cke-realelement"))&&e(a,g))if(f.test(g.getName()))g.remove(1);else{g.removeAttributes(b);a.fire("removeFormatCleanup",g)}g=k}}h.moveToBookmark(i)}a.forceNextSelectionCheck();a.getSelection().selectRanges(d)}}},filter:function(a,f){for(var b=a._.removeFormatFilters||[],e=0;e<b.length;e++)if(b[e](f)===false)return false;return true}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(a){if(!this._.removeFormatFilters)this._.removeFormatFilters=
[];this._.removeFormatFilters.push(a)},CKEDITOR.config.removeFormatTags="b,big,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var",CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign",CKEDITOR.plugins.add("resize",{init:function(a){var f,b,e,d,c=a.config,h=a.ui.spaceId("resizer"),i=a.element?a.element.getDirection(1):"ltr";!c.resize_dir&&(c.resize_dir="vertical");c.resize_maxWidth==void 0&&(c.resize_maxWidth=3E3);c.resize_maxHeight==
void 0&&(c.resize_maxHeight=3E3);c.resize_minWidth==void 0&&(c.resize_minWidth=750);c.resize_minHeight==void 0&&(c.resize_minHeight=250);if(c.resize_enabled!==false){var g=null,j=(c.resize_dir=="both"||c.resize_dir=="horizontal")&&c.resize_minWidth!=c.resize_maxWidth,k=(c.resize_dir=="both"||c.resize_dir=="vertical")&&c.resize_minHeight!=c.resize_maxHeight,n=function(h){var g=f,n=b,q=g+(h.data.$.screenX-e)*(i=="rtl"?-1:1),h=n+(h.data.$.screenY-d);j&&(g=Math.max(c.resize_minWidth,Math.min(q,c.resize_maxWidth)));
k&&(n=Math.max(c.resize_minHeight,Math.min(h,c.resize_maxHeight)));a.resize(j?g:null,n)},o=function(){CKEDITOR.document.removeListener("mousemove",n);CKEDITOR.document.removeListener("mouseup",o);if(a.document){a.document.removeListener("mousemove",n);a.document.removeListener("mouseup",o)}},q=CKEDITOR.tools.addFunction(function(h){g||(g=a.getResizable());f=g.$.offsetWidth||0;b=g.$.offsetHeight||0;e=h.screenX;d=h.screenY;c.resize_minWidth>f&&(c.resize_minWidth=f);c.resize_minHeight>b&&(c.resize_minHeight=
b);CKEDITOR.document.on("mousemove",n);CKEDITOR.document.on("mouseup",o);if(a.document){a.document.on("mousemove",n);a.document.on("mouseup",o)}h.preventDefault&&h.preventDefault()});a.on("destroy",function(){CKEDITOR.tools.removeFunction(q)});a.on("uiSpace",function(b){if(b.data.space=="bottom"){var c="";j&&!k&&(c=" cke_resizer_horizontal");!j&&k&&(c=" cke_resizer_vertical");var d='<span id="'+h+'" class="cke_resizer'+c+" cke_resizer_"+i+'" title="'+CKEDITOR.tools.htmlEncode(a.lang.common.resize)+
'" onmousedown="CKEDITOR.tools.callFunction('+q+', event)">'+(i=="ltr"?"◢":"◣")+"</span>";i=="ltr"&&c=="ltr"?b.data.html=b.data.html+d:b.data.html=d+b.data.html}},a,null,100);a.on("maximize",function(b){a.ui.space("resizer")[b.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),CKEDITOR.plugins.add("menubutton",{requires:"button,menu",onLoad:function(){var a=function(a){var b=this._,e=b.menu;if(b.state!==CKEDITOR.TRISTATE_DISABLED)if(b.on&&e)e.hide();else{b.previousState=b.state;if(!e){e=b.menu=new CKEDITOR.menu(a,
{panel:{className:"cke_menu_panel",attributes:{"aria-label":a.lang.common.options}}});e.onHide=CKEDITOR.tools.bind(function(){var d=this.command?a.getCommand(this.command).modes:this.modes;this.setState(!d||d[a.mode]?b.previousState:CKEDITOR.TRISTATE_DISABLED);b.on=0},this);this.onMenu&&e.addListener(this.onMenu)}this.setState(CKEDITOR.TRISTATE_ON);b.on=1;setTimeout(function(){e.show(CKEDITOR.document.getById(b.id),4)},0)}};CKEDITOR.ui.menuButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,
$:function(f){delete f.panel;this.base(f);this.hasArrow=true;this.click=a},statics:{handler:{create:function(a){return new CKEDITOR.ui.menuButton(a)}}}})},beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}}),CKEDITOR.UI_MENUBUTTON="menubutton","use strict",CKEDITOR.plugins.add("scayt",{requires:"menubutton,dialog",tabToOpen:null,dialogName:"scaytDialog",init:function(a){var f=this,b=CKEDITOR.plugins.scayt;this.bindEvents(a);this.parseConfig(a);this.addRule(a);
CKEDITOR.dialog.add(this.dialogName,CKEDITOR.getUrl(this.path+"dialogs/options.js"));this.addMenuItems(a);var e=a.lang.scayt,d=CKEDITOR.env;a.ui.add("Scayt",CKEDITOR.UI_MENUBUTTON,{label:e.text_title,title:e.text_title,modes:{wysiwyg:!(d.ie&&(d.version<8||d.quirks))},toolbar:"spellchecker,20",refresh:function(){var c=a.ui.instances.Scayt.getState();a.scayt&&(c=b.state[a.name]?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF);a.fire("scaytButtonState",c)},onRender:function(){var b=this;a.on("scaytButtonState",
function(a){typeof a.data!==void 0&&b.setState(a.data)})},onMenu:function(){var c=a.scayt;a.getMenuItem("scaytToggle").label=a.lang.scayt[c&&b.state[a.name]?"btn_disable":"btn_enable"];c={scaytToggle:CKEDITOR.TRISTATE_OFF,scaytOptions:c?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytLangs:c?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytDict:c?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytAbout:c?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,WSC:a.plugins.wsc?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED};a.config.scayt_uiTabs[0]||delete c.scaytOptions;a.config.scayt_uiTabs[1]||delete c.scaytLangs;a.config.scayt_uiTabs[2]||delete c.scaytDict;return c}});if(a.contextMenu&&a.addMenuItems){a.contextMenu.addListener(function(){var b=a.scayt,d;if(b){var e=b.getSelectionNode();if(e=e?e.getAttribute(b.getNodeAttribute()):e){d=f.menuGenerator(a,e,f);b.showBanner("."+a.contextMenu._.definition.panel.className.split(" ").join(" ."))}}return d});a.contextMenu._.onHide=CKEDITOR.tools.override(a.contextMenu._.onHide,
function(b){return function(){var d=a.scayt;d&&d.hideBanner();return b.apply(this)}})}},addMenuItems:function(a){var f=this,b=CKEDITOR.plugins.scayt;a.addMenuGroup("scaytButton");var e=a.config.scayt_contextMenuItemsOrder.split("|");if(e&&e.length)for(var d=0;d<e.length;d++)a.addMenuGroup("scayt_"+e[d],d-10);e={scaytToggle:{label:a.lang.scayt.btn_enable,group:"scaytButton",onClick:function(){var c=a.scayt;b.state[a.name]=!b.state[a.name];b.state[a.name]===true?c||b.createScayt(a):c&&b.destroy(a)}},
scaytAbout:{label:a.lang.scayt.btn_about,group:"scaytButton",onClick:function(){a.scayt.tabToOpen="about";a.lockSelection();a.openDialog(f.dialogName)}},scaytOptions:{label:a.lang.scayt.btn_options,group:"scaytButton",onClick:function(){a.scayt.tabToOpen="options";a.lockSelection();a.openDialog(f.dialogName)}},scaytLangs:{label:a.lang.scayt.btn_langs,group:"scaytButton",onClick:function(){a.scayt.tabToOpen="langs";a.lockSelection();a.openDialog(f.dialogName)}},scaytDict:{label:a.lang.scayt.btn_dictionaries,
group:"scaytButton",onClick:function(){a.scayt.tabToOpen="dictionaries";a.lockSelection();a.openDialog(f.dialogName)}}};if(a.plugins.wsc)e.WSC={label:a.lang.wsc.toolbar,group:"scaytButton",onClick:function(){var b=CKEDITOR.plugins.scayt,d=a.scayt,e=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.container.getText():a.document.getBody().getText();if(e=e.replace(/\s/g,"")){d&&(b.state[a.name]&&d.setMarkupPaused)&&d.setMarkupPaused(true);a.lockSelection();a.execCommand("checkspell")}else alert("Nothing to check!")}};
a.addMenuItems(e)},bindEvents:function(a){var f=CKEDITOR.plugins.scayt,b=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE;CKEDITOR.on("dialogDefinition",function(a){if(a.data.name==="scaytDialog")a.data.definition.dialog.on("cancel",function(){return false},this,null,-1)});var e=function(){a.scayt&&f.destroy(a)},d=function(){f.state[a.name]&&!a.readOnly&&f.createScayt(a)},c=function(){if(b){a.on("blur",e);a.on("focus",d);a.focusManager.hasFocus&&d()}else d()};a.on("contentDom",c);a.on("beforeCommandExec",
function(b){if(b.data.name in f.options.disablingCommandExec&&a.mode=="wysiwyg"){if(b=a.scayt){f.destroy(a);a.fire("scaytButtonState",CKEDITOR.TRISTATE_DISABLED)}}else if(b.data.name==="bold"||b.data.name==="italic"||b.data.name==="underline"||b.data.name==="strike"||b.data.name==="subscript"||b.data.name==="superscript")if(b=a.scayt){b.removeMarkupInSelectionNode();b.fire("startSpellCheck")}});a.on("beforeSetMode",function(b){if(b.data=="source")if(b=a.scayt){f.destroy(a);a.fire("scaytButtonState",
CKEDITOR.TRISTATE_DISABLED)}});a.on("afterCommandExec",function(b){var c;if(a.mode=="wysiwyg"&&(b.data.name=="undo"||b.data.name=="redo"))(c=a.scayt)&&setTimeout(function(){c.fire("startSpellCheck")},250)});a.on("readOnly",function(b){var c;if(b){c=a.scayt;if(b.editor.readOnly===true)c&&c.fire("removeMarkupInDocument",{});else if(c)c.fire("startSpellCheck");else if(b.editor.mode=="wysiwyg"&&f.state[b.editor.name]===true){f.createScayt(a);b.editor.fire("scaytButtonState",CKEDITOR.TRISTATE_ON)}}});
a.on("beforeDestroy",e);a.on("setData",function(){e();a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&c()},this,null,50);a.on("insertElement",function(){var b=a.scayt;if(b){b.removeMarkupInSelectionNode();b.fire("startSpellCheck")}},this,null,50);a.on("insertHtml",function(){var b=a.scayt;if(b){b.removeMarkupInSelectionNode();b.fire("startSpellCheck")}},this,null,50);a.on("scaytDialogShown",function(b){b.data.selectPage(a.scayt.tabToOpen)})},parseConfig:function(a){var f=CKEDITOR.plugins.scayt;f.replaceOldOptionsNames(a.config);
if(typeof a.config.scayt_autoStartup!=="boolean")a.config.scayt_autoStartup=false;f.state[a.name]=a.config.scayt_autoStartup;if(!a.config.scayt_contextCommands)a.config.scayt_contextCommands="ignore|ignoreall|add";if(!a.config.scayt_contextMenuItemsOrder)a.config.scayt_contextMenuItemsOrder="suggest|moresuggest|control";if(!a.config.scayt_sLang)a.config.scayt_sLang="en_US";if(a.config.scayt_maxSuggestions===void 0||typeof a.config.scayt_maxSuggestions!="number"||a.config.scayt_maxSuggestions<0)a.config.scayt_maxSuggestions=
5;if(a.config.scayt_customDictionaryIds===void 0||typeof a.config.scayt_customDictionaryIds!=="string")a.config.scayt_customDictionaryIds="";if(a.config.scayt_userDictionaryName===void 0||typeof a.config.scayt_userDictionaryName!=="string")a.config.scayt_userDictionaryName=null;if(typeof a.config.scayt_uiTabs==="string"&&a.config.scayt_uiTabs.split(",").length===3){var b=[],e=[];a.config.scayt_uiTabs=a.config.scayt_uiTabs.split(",");CKEDITOR.tools.search(a.config.scayt_uiTabs,function(a){if(Number(a)===
1||Number(a)===0){e.push(true);b.push(Number(a))}else e.push(false)});a.config.scayt_uiTabs=CKEDITOR.tools.search(e,false)===null?b:[1,1,1]}else a.config.scayt_uiTabs=[1,1,1];if(typeof a.config.scayt_serviceProtocol!="string")a.config.scayt_serviceProtocol=null;if(typeof a.config.scayt_serviceHost!="string")a.config.scayt_serviceHost=null;if(typeof a.config.scayt_servicePort!="string")a.config.scayt_servicePort=null;if(typeof a.config.scayt_servicePath!="string")a.config.scayt_servicePath=null;if(!a.config.scayt_moreSuggestions)a.config.scayt_moreSuggestions=
"on";if(typeof a.config.scayt_customerId!=="string")a.config.scayt_customerId="1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2";if(typeof a.config.scayt_srcUrl!=="string"){f=document.location.protocol;f=f.search(/https?:/)!=-1?f:"http:";a.config.scayt_srcUrl=f+"//svc.webspellchecker.net/spellcheck31/lf/scayt3/ckscayt/ckscayt.js"}if(typeof CKEDITOR.config.scayt_handleCheckDirty!=="boolean")CKEDITOR.config.scayt_handleCheckDirty=true;if(typeof CKEDITOR.config.scayt_handleUndoRedo!==
"boolean")CKEDITOR.config.scayt_handleUndoRedo=true},addRule:function(a){var f=a.dataProcessor,b=f&&f.htmlFilter,e=a._.elementsPath&&a._.elementsPath.filters,f=f&&f.dataFilter,d=a.addRemoveFormatFilter,c=function(b){var c=CKEDITOR.plugins.scayt;if(a.scayt&&b.hasAttribute(c.options.data_attribute_name))return false},h=function(b){var c=CKEDITOR.plugins.scayt,d=true;a.scayt&&b.hasAttribute(c.options.data_attribute_name)&&(d=false);return d};e&&e.push(c);f&&f.addRules({elements:{span:function(b){var c=
CKEDITOR.plugins.scayt;if(c&&c.state[a.name]&&b.classes&&CKEDITOR.tools.search(b.classes,c.options.misspelled_word_class))if(b.classes&&b.parent.type===CKEDITOR.NODE_DOCUMENT_FRAGMENT){delete b.attributes.style;delete b.name}else delete b.classes[CKEDITOR.tools.indexOf(b.classes,c.options.misspelled_word_class)];return b}}});b&&b.addRules({elements:{span:function(b){var c=CKEDITOR.plugins.scayt;if(c&&c.state[a.name]&&b.hasClass(c.options.misspelled_word_class)&&b.attributes[c.options.data_attribute_name]){b.removeClass(c.options.misspelled_word_class);
delete b.attributes[c.options.data_attribute_name];delete b.name}return b}}});d&&d.call(a,h)},scaytMenuDefinition:function(a){var f=this,a=a.scayt;return{scayt_ignore:{label:a.getLocal("btn_ignore"),group:"scayt_control",order:1,exec:function(a){a.scayt.ignoreWord()}},scayt_ignoreall:{label:a.getLocal("btn_ignoreAll"),group:"scayt_control",order:2,exec:function(a){a.scayt.ignoreAllWords()}},scayt_add:{label:a.getLocal("btn_addWord"),group:"scayt_control",order:3,exec:function(a){var e=a.scayt;setTimeout(function(){e.addWordToUserDictionary()},
10)}},option:{label:a.getLocal("btn_options"),group:"scayt_control",order:4,exec:function(a){a.scayt.tabToOpen="options";a.lockSelection();a.openDialog(f.dialogName)},verification:function(a){return a.config.scayt_uiTabs[0]==1?true:false}},language:{label:a.getLocal("btn_langs"),group:"scayt_control",order:5,exec:function(a){a.scayt.tabToOpen="langs";a.lockSelection();a.openDialog(f.dialogName)},verification:function(a){return a.config.scayt_uiTabs[1]==1?true:false}},dictionary:{label:a.getLocal("btn_dictionaries"),
group:"scayt_control",order:6,exec:function(a){a.scayt.tabToOpen="dictionaries";a.lockSelection();a.openDialog(f.dialogName)},verification:function(a){return a.config.scayt_uiTabs[2]==1?true:false}},about:{label:a.getLocal("btn_about"),group:"scayt_control",order:7,exec:function(a){a.scayt.tabToOpen="about";a.lockSelection();a.openDialog(f.dialogName)}}}},buildSuggestionMenuItems:function(a,f){var b={},e={},d=a.scayt;if(f.length>0&&f[0]!=="no_any_suggestions")for(var c=0;c<f.length;c++){var h="scayt_suggest_"+
CKEDITOR.plugins.scayt.suggestions[c].replace(" ","_");a.addCommand(h,this.createCommand(CKEDITOR.plugins.scayt.suggestions[c]));if(c<a.config.scayt_maxSuggestions){a.addMenuItem(h,{label:f[c],command:h,group:"scayt_suggest",order:c+1});b[h]=CKEDITOR.TRISTATE_OFF}else{a.addMenuItem(h,{label:f[c],command:h,group:"scayt_moresuggest",order:c+1});e[h]=CKEDITOR.TRISTATE_OFF;if(a.config.scayt_moreSuggestions==="on"){a.addMenuItem("scayt_moresuggest",{label:d.getLocal("btn_moreSuggestions"),group:"scayt_moresuggest",
order:10,getItems:function(){return e}});b.scayt_moresuggest=CKEDITOR.TRISTATE_OFF}}}else{b.no_scayt_suggest=CKEDITOR.TRISTATE_DISABLED;a.addCommand("no_scayt_suggest",{exec:function(){}});a.addMenuItem("no_scayt_suggest",{label:d.getLocal("btn_noSuggestions")||"no_scayt_suggest",command:"no_scayt_suggest",group:"scayt_suggest",order:0})}return b},menuGenerator:function(a,f){var b=a.scayt,e=this.scaytMenuDefinition(a),d={},c=a.config.scayt_contextCommands.split("|");b.fire("getSuggestionsList",{lang:b.getLang(),
word:f});d=this.buildSuggestionMenuItems(a,CKEDITOR.plugins.scayt.suggestions);if(a.config.scayt_contextCommands=="off")return d;for(var h in e)if(!(CKEDITOR.tools.indexOf(c,h.replace("scayt_",""))==-1&&a.config.scayt_contextCommands!="all")){d[h]=CKEDITOR.TRISTATE_OFF;typeof e[h].verification==="function"&&!e[h].verification(a)&&delete d[h];a.addCommand(h,{exec:e[h].exec});a.addMenuItem(h,{label:a.lang.scayt[e[h].label]||e[h].label,command:h,group:e[h].group,order:e[h].order})}return d},createCommand:function(a){return{exec:function(f){f.scayt.replaceSelectionNode({word:a})}}}}),
CKEDITOR.plugins.scayt={state:{},suggestions:[],loadingHelper:{loadOrder:[]},isLoading:!1,options:{disablingCommandExec:{source:!0,newpage:!0,templates:!0},data_attribute_name:"data-scayt-word",misspelled_word_class:"scayt-misspell-word"},backCompatibilityMap:{scayt_service_protocol:"scayt_serviceProtocol",scayt_service_host:"scayt_serviceHost",scayt_service_port:"scayt_servicePort",scayt_service_path:"scayt_servicePath",scayt_customerid:"scayt_customerId"},replaceOldOptionsNames:function(a){for(var f in a)if(f in
this.backCompatibilityMap){a[this.backCompatibilityMap[f]]=a[f];delete a[f]}},createScayt:function(a){var f=this;this.loadScaytLibrary(a,function(a){var e={lang:a.config.scayt_sLang,container:a.editable().$.nodeName=="BODY"?a.document.getWindow().$.frameElement:a.editable().$,customDictionary:a.config.scayt_customDictionaryIds,userDictionaryName:a.config.scayt_userDictionaryName,localization:a.langCode,customer_id:a.config.scayt_customerId,data_attribute_name:f.options.data_attribute_name,misspelled_word_class:f.options.misspelled_word_class};
if(a.config.scayt_serviceProtocol)e.service_protocol=a.config.scayt_serviceProtocol;if(a.config.scayt_serviceHost)e.service_host=a.config.scayt_serviceHost;if(a.config.scayt_servicePort)e.service_port=a.config.scayt_servicePort;if(a.config.scayt_servicePath)e.service_path=a.config.scayt_servicePath;e=new SCAYT.CKSCAYT(e,function(){},function(){});e.subscribe("suggestionListSend",function(a){for(var b={},e=[],f=0;f<a.suggestionList.length;f++)if(!b[a.suggestionList[f]]){b[a.suggestionList[f]]=a.suggestionList[f];
e.push(a.suggestionList[f])}CKEDITOR.plugins.scayt.suggestions=e});a.scayt=e;a.fire("scaytButtonState",a.readOnly?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_ON)})},destroy:function(a){a.scayt&&a.scayt.destroy();delete a.scayt;a.fire("scaytButtonState",CKEDITOR.TRISTATE_OFF)},loadScaytLibrary:function(a,f){var b=this;if(typeof window.SCAYT==="undefined"||typeof window.SCAYT.CKSCAYT!=="function"){this.loadingHelper[a.name]=f;this.loadingHelper.loadOrder.push(a.name);CKEDITOR.scriptLoader.load(a.config.scayt_srcUrl,
function(){var a;CKEDITOR.fireOnce("scaytReady");for(var d=0;d<b.loadingHelper.loadOrder.length;d++){a=b.loadingHelper.loadOrder[d];if(typeof b.loadingHelper[a]==="function")b.loadingHelper[a](CKEDITOR.instances[a]);delete b.loadingHelper[a]}b.loadingHelper.loadOrder=[]})}else if(window.SCAYT&&typeof window.SCAYT.CKSCAYT==="function"){CKEDITOR.fireOnce("scaytReady");a.scayt||typeof f==="function"&&f(a)}}},CKEDITOR.on("scaytReady",function(){if(CKEDITOR.config.scayt_handleCheckDirty===true){var a=
CKEDITOR.editor.prototype;a.checkDirty=CKEDITOR.tools.override(a.checkDirty,function(a){return function(){var e=null,d=this.scayt;if(!CKEDITOR.plugins.scayt||!CKEDITOR.plugins.scayt.state[this.name]||!this.scayt)e=a.call(this);else if(e=this.status=="ready")var c=d.removeMarkupFromString(this.getSnapshot()),d=d.removeMarkupFromString(this._.previousValue),e=e&&d!==c;return e}});a.resetDirty=CKEDITOR.tools.override(a.resetDirty,function(a){return function(){var e=this.scayt;!CKEDITOR.plugins.scayt||
!CKEDITOR.plugins.scayt.state[this.name]||!this.scayt?a.call(this):this._.previousValue=e.removeMarkupFromString(this.getSnapshot())}})}if(CKEDITOR.config.scayt_handleUndoRedo===true){var a=CKEDITOR.plugins.undo.Image.prototype,f=typeof a.equalsContent=="function"?"equalsContent":"equals";a[f]=CKEDITOR.tools.override(a[f],function(a){return function(e){var d=e.editor.scayt,c=this.contents,f=e.contents,i=null;if(CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state[e.editor.name]&&e.editor.scayt){this.contents=
d.removeMarkupFromString(c)||"";e.contents=d.removeMarkupFromString(f)||""}i=a.apply(this,arguments);this.contents=c;e.contents=f;return i}})}}),function(){var a={preserveState:true,editorFocus:false,readOnly:1,exec:function(a){this.toggleState();this.refresh(a)},refresh:function(a){if(a.document){var b=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";a.editable()[b]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var a;a=(CKEDITOR.env.ie6Compat?
[".%1 table.%2,",".%1 table.%2 td, .%1 table.%2 th","{","border : #d3d3d3 1px dotted","}"]:[".%1 table.%2,",".%1 table.%2 > tr > td, .%1 table.%2 > tr > th,",".%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,",".%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,",".%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th","{","border : #d3d3d3 1px dotted","}"]).join("").replace(/%2/g,"cke_show_border").replace(/%1/g,"cke_show_borders ");CKEDITOR.addCss(a)},init:function(f){var b=
f.addCommand("showborders",a);b.canUndo=false;f.config.startupShowBorders!==false&&b.setState(CKEDITOR.TRISTATE_ON);f.on("mode",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(f)},null,null,100);f.on("contentDom",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(f)});f.on("removeFormatCleanup",function(a){a=a.data;f.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&(a.is("table")&&(!a.hasAttribute("border")||parseInt(a.getAttribute("border"),10)<=0))&&a.addClass("cke_show_border")})},
afterInit:function(a){var b=a.dataProcessor,a=b&&b.dataFilter,b=b&&b.htmlFilter;a&&a.addRules({elements:{table:function(a){var a=a.attributes,b=a["class"],c=parseInt(a.border,10);if((!c||c<=0)&&(!b||b.indexOf("cke_show_border")==-1))a["class"]=(b||"")+" cke_show_border"}}});b&&b.addRules({elements:{table:function(a){var a=a.attributes,b=a["class"];b&&(a["class"]=b.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,""))}}})}});CKEDITOR.on("dialogDefinition",function(a){var b=a.data.name;
if(b=="table"||b=="tableProperties"){a=a.data.definition;b=a.getContents("info").get("txtBorder");b.commit=CKEDITOR.tools.override(b.commit,function(a){return function(b,c){a.apply(this,arguments);var f=parseInt(this.getValue(),10);c[!f||f<=0?"addClass":"removeClass"]("cke_show_border")}});if(a=(a=a.getContents("advanced"))&&a.get("advCSSClasses")){a.setup=CKEDITOR.tools.override(a.setup,function(a){return function(){a.apply(this,arguments);this.setValue(this.getValue().replace(/cke_show_border/,
""))}});a.commit=CKEDITOR.tools.override(a.commit,function(a){return function(b,c){a.apply(this,arguments);parseInt(c.getAttribute("border"),10)||c.addClass("cke_show_border")}})}}})}(),function(){CKEDITOR.plugins.add("sourcearea",{init:function(f){function b(){var a=d&&this.equals(CKEDITOR.document.getActive());this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+"px");this.show();a&&this.focus()}if(f.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var e=
CKEDITOR.plugins.sourcearea;f.addMode("source",function(c){var d=f.ui.space("contents").getDocument().createElement("textarea");d.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",f.config.sourceAreaTabSize||4)));d.setAttribute("dir","ltr");d.addClass("cke_source cke_reset cke_enable_context_menu");f.ui.space("contents").append(d);d=f.editable(new a(f,d));d.setData(f.getData(1));
if(CKEDITOR.env.ie){d.attachListener(f,"resize",b,d);d.attachListener(CKEDITOR.document.getWindow(),"resize",b,d);CKEDITOR.tools.setTimeout(b,0,d)}f.fire("ariaWidget",this);c()});f.addCommand("source",e.commands.source);f.ui.addButton&&f.ui.addButton("Source",{label:f.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});f.on("mode",function(){f.getCommand("source").setState(f.mode=="source"?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var d=CKEDITOR.env.ie&&CKEDITOR.env.version==9}}});var a=
CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(a){this.setValue(a);this.status="ready";this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(a){this[(a?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){a.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,
source:1},editorFocus:!1,readOnly:1,exec:function(a){a.mode=="wysiwyg"&&a.fire("saveSnapshot");a.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);a.setMode(a.mode=="source"?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("specialchar",{availableLangs:{ar:1,bg:1,ca:1,cs:1,cy:1,de:1,el:1,en:1,"en-gb":1,eo:1,es:1,et:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ku:1,lv:1,nb:1,nl:1,no:1,pl:1,pt:1,"pt-br":1,ru:1,si:1,sk:1,sl:1,sq:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,
zh:1,"zh-cn":1},requires:"dialog",init:function(a){var f=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");a.addCommand("specialchar",{exec:function(){var b=a.langCode,b=f.availableLangs[b]?b:f.availableLangs[b.replace(/-.*/,"")]?b.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(f.path+"dialogs/lang/"+b+".js"),function(){CKEDITOR.tools.extend(a.lang.specialchar,f.langEntries[b]);a.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:false});a.ui.addButton&&
a.ui.addButton("SpecialChar",{label:a.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}}),CKEDITOR.config.specialChars="! &quot; # $ % &amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; &lt; = &gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ &euro; &lsquo; &rsquo; &ldquo; &rdquo; &ndash; &mdash; &iexcl; &cent; &pound; &curren; &yen; &brvbar; &sect; &uml; &copy; &ordf; &laquo; &not; &reg; &macr; &deg; &sup2; &sup3; &acute; &micro; &para; &middot; &cedil; &sup1; &ordm; &raquo; &frac14; &frac12; &frac34; &iquest; &Agrave; &Aacute; &Acirc; &Atilde; &Auml; &Aring; &AElig; &Ccedil; &Egrave; &Eacute; &Ecirc; &Euml; &Igrave; &Iacute; &Icirc; &Iuml; &ETH; &Ntilde; &Ograve; &Oacute; &Ocirc; &Otilde; &Ouml; &times; &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; &divide; &oslash; &ugrave; &uacute; &ucirc; &uuml; &yacute; &thorn; &yuml; &OElig; &oelig; &#372; &#374 &#373 &#375; &sbquo; &#8219; &bdquo; &hellip; &trade; &#9658; &bull; &rarr; &rArr; &hArr; &diams; &asymp;".split(" "),
function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(a){var f=a.config,b=a.lang.stylescombo,e={},d=[],c=[];a.on("stylesSet",function(b){if(b=b.data.styles){for(var i,g,j,k=0,n=b.length;k<n;k++){i=b[k];if(!(a.blockless&&i.element in CKEDITOR.dtd.$block)){g=i.name;i=new CKEDITOR.style(i);if(!a.filter.customConfig||a.filter.check(i)){i._name=g;i._.enterMode=f.enterMode;i._.type=j=i.assignedTo||i.type;i._.weight=k+(j==CKEDITOR.STYLE_OBJECT?1:j==CKEDITOR.STYLE_BLOCK?2:3)*1E3;
e[g]=i;d.push(i);c.push(i)}}}d.sort(function(a,b){return a._.weight-b._.weight})}});a.ui.addRichCombo("Styles",{label:b.label,title:b.panelTitle,toolbar:"styles,10",allowedContent:c,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(f.contentsCss),multiSelect:true,attributes:{"aria-label":b.panelTitle}},init:function(){var a,c,e,f,k,n;k=0;for(n=d.length;k<n;k++){a=d[k];c=a._name;f=a._.type;if(f!=e){this.startGroup(b["panelTitle"+f]);e=f}this.add(c,a.type==CKEDITOR.STYLE_OBJECT?c:a.buildPreview(),
c)}this.commit()},onClick:function(b){a.focus();a.fire("saveSnapshot");var b=e[b],c=a.elementPath();a[b.checkActive(c,a)?"removeStyle":"applyStyle"](b);a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(b){for(var c=this.getValue(),b=b.data.path.elements,d=0,f=b.length,k;d<f;d++){k=b[d];for(var n in e)if(e[n].checkElementRemovable(k,true,a)){n!=c&&this.setValue(n);return}}this.setValue("")},this)},onOpen:function(){var c=a.getSelection().getSelectedElement(),c=a.elementPath(c),
d=[0,0,0,0];this.showAll();this.unmarkAll();for(var f in e){var j=e[f],k=j._.type;j.checkApplicable(c,a,a.activeFilter)?d[k]++:this.hideItem(f);j.checkActive(c,a)&&this.mark(f)}d[CKEDITOR.STYLE_BLOCK]||this.hideGroup(b["panelTitle"+CKEDITOR.STYLE_BLOCK]);d[CKEDITOR.STYLE_INLINE]||this.hideGroup(b["panelTitle"+CKEDITOR.STYLE_INLINE]);d[CKEDITOR.STYLE_OBJECT]||this.hideGroup(b["panelTitle"+CKEDITOR.STYLE_OBJECT])},refresh:function(){var b=a.elementPath();if(b){for(var c in e)if(e[c].checkApplicable(b,
a,a.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){e={};d=[]}})}})}(),function(){function a(a){return{editorFocus:false,canUndo:false,modes:{wysiwyg:1},exec:function(b){if(b.editable().hasFocus){var e=b.getSelection(),f;if(f=(new CKEDITOR.dom.elementPath(e.getCommonAncestor(),e.root)).contains({td:1,th:1},1)){var e=b.createRange(),g=CKEDITOR.tools.tryThese(function(){var b=f.getParent().$.cells[f.$.cellIndex+(a?-1:1)];b.parentNode.parentNode;return b},function(){var b=
f.getParent(),b=b.getAscendant("table").$.rows[b.$.rowIndex+(a?-1:1)];return b.cells[a?b.cells.length-1:0]});if(!g&&!a){for(var j=f.getAscendant("table").$,g=f.getParent().$.cells,j=new CKEDITOR.dom.element(j.insertRow(-1),b.document),k=0,n=g.length;k<n;k++)j.append((new CKEDITOR.dom.element(g[k],b.document)).clone(false,false)).appendBogus();e.moveToElementEditStart(j)}else if(g){g=new CKEDITOR.dom.element(g);e.moveToElementEditStart(g);(!e.checkStartOfBlock()||!e.checkEndOfBlock())&&e.selectNodeContents(g)}else return true;
e.select(true);return true}}return false}}}var f={editorFocus:false,modes:{wysiwyg:1,source:1}},b={exec:function(a){a.container.focusNext(true,a.tabIndex)}},e={exec:function(a){a.container.focusPrevious(true,a.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(d){for(var c=d.config.enableTabKeyTools!==false,h=d.config.tabSpaces||0,i="";h--;)i=i+" ";if(i)d.on("key",function(a){if(a.data.keyCode==9){d.insertHtml(i);a.cancel()}});if(c)d.on("key",function(a){(a.data.keyCode==9&&d.execCommand("selectNextCell")||
a.data.keyCode==CKEDITOR.SHIFT+9&&d.execCommand("selectPreviousCell"))&&a.cancel()});d.addCommand("blur",CKEDITOR.tools.extend(b,f));d.addCommand("blurBack",CKEDITOR.tools.extend(e,f));d.addCommand("selectNextCell",a());d.addCommand("selectPreviousCell",a(true))}})}(),CKEDITOR.dom.element.prototype.focusNext=function(a,f){var b=f===void 0?this.getTabIndex():f,e,d,c,h,i,g;if(b<=0)for(i=this.getNextSourceNode(a,CKEDITOR.NODE_ELEMENT);i;){if(i.isVisible()&&i.getTabIndex()===0){c=i;break}i=i.getNextSourceNode(false,
CKEDITOR.NODE_ELEMENT)}else for(i=this.getDocument().getBody().getFirst();i=i.getNextSourceNode(false,CKEDITOR.NODE_ELEMENT);){if(!e)if(!d&&i.equals(this)){d=true;if(a){if(!(i=i.getNextSourceNode(true,CKEDITOR.NODE_ELEMENT)))break;e=1}}else d&&!this.contains(i)&&(e=1);if(i.isVisible()&&!((g=i.getTabIndex())<0)){if(e&&g==b){c=i;break}if(g>b&&(!c||!h||g<h)){c=i;h=g}else if(!c&&g===0){c=i;h=g}}}c&&c.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(a,f){for(var b=f===void 0?this.getTabIndex():
f,e,d,c,h=0,i,g=this.getDocument().getBody().getLast();g=g.getPreviousSourceNode(false,CKEDITOR.NODE_ELEMENT);){if(!e)if(!d&&g.equals(this)){d=true;if(a){if(!(g=g.getPreviousSourceNode(true,CKEDITOR.NODE_ELEMENT)))break;e=1}}else d&&!this.contains(g)&&(e=1);if(g.isVisible()&&!((i=g.getTabIndex())<0))if(b<=0){if(e&&i===0){c=g;break}if(i>h){c=g;h=i}}else{if(e&&i==b){c=g;break}if(i<b&&(!c||i>h)){c=g;h=i}}}c&&c.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(a){function f(a){return CKEDITOR.tools.extend(a||
{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!a.blockless){var b=a.lang.table;a.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];"+(a.plugins.dialogadvtab?"table"+a.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle",
"table[width]: sizeToAttribute"]]}));a.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",f()));a.addCommand("tableDelete",f({exec:function(a){var b=a.elementPath().contains("table",1);if(b){var c=b.getParent();c.getChildCount()==1&&!c.is("body","td","th")&&(b=c);a=a.createRange();a.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);b.remove();a.select()}}}));a.ui.addButton&&a.ui.addButton("Table",{label:b.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",
this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");a.addMenuItems&&a.addMenuItems({table:{label:b.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:b.deleteTable,command:"tableDelete",group:"table",order:1}});a.on("doubleclick",function(a){if(a.data.element.is("table"))a.data.dialog="tableProperties"});a.contextMenu&&a.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),
function(){function a(a){function b(a){if(!(c.length>0)&&a.type==CKEDITOR.NODE_ELEMENT&&o.test(a.getName())&&!a.getCustomData("selected_cell")){CKEDITOR.dom.element.setMarker(d,a,"selected_cell",true);c.push(a)}}for(var a=a.getRanges(),c=[],d={},e=0;e<a.length;e++){var f=a[e];if(f.collapsed){f=f.getCommonAncestor();(f=f.getAscendant("td",true)||f.getAscendant("th",true))&&c.push(f)}else{var f=new CKEDITOR.dom.walker(f),g;for(f.guard=b;g=f.next();)if(g.type!=CKEDITOR.NODE_ELEMENT||!g.is(CKEDITOR.dtd.table))if((g=
g.getAscendant("td",true)||g.getAscendant("th",true))&&!g.getCustomData("selected_cell")){CKEDITOR.dom.element.setMarker(d,g,"selected_cell",true);c.push(g)}}}CKEDITOR.dom.element.clearAllMarkers(d);return c}function f(b,c){for(var d=a(b),e=d[0],f=e.getAscendant("table"),e=e.getDocument(),g=d[0].getParent(),h=g.$.rowIndex,d=d[d.length-1],i=d.getParent().$.rowIndex+d.$.rowSpan-1,d=new CKEDITOR.dom.element(f.$.rows[i]),h=c?h:i,g=c?g:d,d=CKEDITOR.tools.buildTableMap(f),f=d[h],h=c?d[h-1]:d[h+1],d=d[0].length,
e=e.createElement("tr"),i=0;f[i]&&i<d;i++){var j;if(f[i].rowSpan>1&&h&&f[i]==h[i]){j=f[i];j.rowSpan=j.rowSpan+1}else{j=(new CKEDITOR.dom.element(f[i])).clone();j.removeAttribute("rowSpan");j.appendBogus();e.append(j);j=j.$}i=i+(j.colSpan-1)}c?e.insertBefore(g):e.insertAfter(g)}function b(c){if(c instanceof CKEDITOR.dom.selection){for(var d=a(c),e=d[0].getAscendant("table"),f=CKEDITOR.tools.buildTableMap(e),c=d[0].getParent().$.rowIndex,d=d[d.length-1],g=d.getParent().$.rowIndex+d.$.rowSpan-1,d=[],
h=c;h<=g;h++){for(var i=f[h],j=new CKEDITOR.dom.element(e.$.rows[h]),k=0;k<i.length;k++){var n=new CKEDITOR.dom.element(i[k]),o=n.getParent().$.rowIndex;if(n.$.rowSpan==1)n.remove();else{n.$.rowSpan=n.$.rowSpan-1;if(o==h){o=f[h+1];o[k-1]?n.insertAfter(new CKEDITOR.dom.element(o[k-1])):(new CKEDITOR.dom.element(e.$.rows[h+1])).append(n,1)}}k=k+(n.$.colSpan-1)}d.push(j)}f=e.$.rows;e=new CKEDITOR.dom.element(f[g+1]||(c>0?f[c-1]:null)||e.$.parentNode);for(h=d.length;h>=0;h--)b(d[h]);return e}if(c instanceof
CKEDITOR.dom.element){e=c.getAscendant("table");e.$.rows.length==1?e.remove():c.remove()}return null}function e(a,b){for(var c=b?Infinity:0,d=0;d<a.length;d++){var e;e=a[d];for(var f=b,g=e.getParent().$.cells,h=0,i=0;i<g.length;i++){var j=g[i],h=h+(f?1:j.colSpan);if(j==e.$)break}e=h-1;if(b?e<c:e>c)c=e}return c}function d(b,c){for(var d=a(b),f=d[0].getAscendant("table"),g=e(d,1),d=e(d),g=c?g:d,h=CKEDITOR.tools.buildTableMap(f),f=[],d=[],i=h.length,j=0;j<i;j++){f.push(h[j][g]);d.push(c?h[j][g-1]:h[j][g+
1])}for(j=0;j<i;j++)if(f[j]){if(f[j].colSpan>1&&d[j]==f[j]){g=f[j];g.colSpan=g.colSpan+1}else{g=(new CKEDITOR.dom.element(f[j])).clone();g.removeAttribute("colSpan");g.appendBogus();g[c?"insertBefore":"insertAfter"].call(g,new CKEDITOR.dom.element(f[j]));g=g.$}j=j+(g.rowSpan-1)}}function c(a,b){var c=a.getStartElement();if(c=c.getAscendant("td",1)||c.getAscendant("th",1)){var d=c.clone();d.appendBogus();b?d.insertBefore(c):d.insertAfter(c)}}function h(b){if(b instanceof CKEDITOR.dom.selection){var b=
a(b),c=b[0]&&b[0].getAscendant("table"),d;a:{var e=0;d=b.length-1;for(var f={},g,j;g=b[e++];)CKEDITOR.dom.element.setMarker(f,g,"delete_cell",true);for(e=0;g=b[e++];)if((j=g.getPrevious())&&!j.getCustomData("delete_cell")||(j=g.getNext())&&!j.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(f);d=j;break a}CKEDITOR.dom.element.clearAllMarkers(f);j=b[0].getParent();if(j=j.getPrevious())d=j.getLast();else{j=b[d].getParent();d=(j=j.getNext())?j.getChild(0):null}}for(j=b.length-1;j>=
0;j--)h(b[j]);d?i(d,true):c&&c.remove()}else if(b instanceof CKEDITOR.dom.element){c=b.getParent();c.getChildCount()==1?c.remove():b.remove()}}function i(a,b){var c=a.getDocument(),d=CKEDITOR.document;if(CKEDITOR.env.ie&&CKEDITOR.env.version==10){d.focus();c.focus()}c=new CKEDITOR.dom.range(c);if(!c["moveToElementEdit"+(b?"End":"Start")](a)){c.selectNodeContents(a);c.collapse(b?false:true)}c.select(true)}function g(a,b,c){a=a[b];if(typeof c=="undefined")return a;for(b=0;a&&b<a.length;b++){if(c.is&&
a[b]==c.$)return b;if(b==c)return new CKEDITOR.dom.element(a[b])}return c.is?-1:null}function j(b,c,d){var e=a(b),f;if((c?e.length!=1:e.length<2)||(f=b.getCommonAncestor())&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("table"))return false;var h,b=e[0];f=b.getAscendant("table");var i=CKEDITOR.tools.buildTableMap(f),j=i.length,k=i[0].length,n=b.getParent().$.rowIndex,o=g(i,n,b);if(c){var x;try{var y=parseInt(b.getAttribute("rowspan"),10)||1;h=parseInt(b.getAttribute("colspan"),10)||1;x=i[c=="up"?n-y:c=="down"?
n+y:n][c=="left"?o-h:c=="right"?o+h:o]}catch(z){return false}if(!x||b.$==x)return false;e[c=="up"||c=="left"?"unshift":"push"](new CKEDITOR.dom.element(x))}for(var c=b.getDocument(),B=n,y=x=0,G=!d&&new CKEDITOR.dom.documentFragment(c),C=0,c=0;c<e.length;c++){h=e[c];var E=h.getParent(),D=h.getFirst(),F=h.$.colSpan,I=h.$.rowSpan,E=E.$.rowIndex,H=g(i,E,h),C=C+F*I,y=Math.max(y,H-o+F);x=Math.max(x,E-n+I);if(!d){F=h;(I=F.getBogus())&&I.remove();F.trim();if(h.getChildren().count()){if(E!=B&&D&&(!D.isBlockBoundary||
!D.isBlockBoundary({br:1})))(B=G.getLast(CKEDITOR.dom.walker.whitespaces(true)))&&(!B.is||!B.is("br"))&&G.append("br");h.moveChildren(G)}c?h.remove():h.setHtml("")}B=E}if(d)return x*y==C;G.moveChildren(b);b.appendBogus();y>=k?b.removeAttribute("rowSpan"):b.$.rowSpan=x;x>=j?b.removeAttribute("colSpan"):b.$.colSpan=y;d=new CKEDITOR.dom.nodeList(f.$.rows);e=d.count();for(c=e-1;c>=0;c--){f=d.getItem(c);if(!f.$.cells.length){f.remove();e++}}return b}function k(b,c){var d=a(b);if(d.length>1)return false;
if(c)return true;var d=d[0],e=d.getParent(),f=e.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(f),i=e.$.rowIndex,j=g(h,i,d),k=d.$.rowSpan,n;if(k>1){n=Math.ceil(k/2);for(var k=Math.floor(k/2),e=i+n,f=new CKEDITOR.dom.element(f.$.rows[e]),h=g(h,e),o,e=d.clone(),i=0;i<h.length;i++){o=h[i];if(o.parentNode==f.$&&i>j){e.insertBefore(new CKEDITOR.dom.element(o));break}else o=null}o||f.append(e)}else{k=n=1;f=e.clone();f.insertAfter(e);f.append(e=d.clone());o=g(h,i);for(j=0;j<o.length;j++)o[j].rowSpan++}e.appendBogus();
d.$.rowSpan=n;e.$.rowSpan=k;n==1&&d.removeAttribute("rowSpan");k==1&&e.removeAttribute("rowSpan");return e}function n(b,c){var d=a(b);if(d.length>1)return false;if(c)return true;var d=d[0],e=d.getParent(),f=e.getAscendant("table"),f=CKEDITOR.tools.buildTableMap(f),h=g(f,e.$.rowIndex,d),i=d.$.colSpan;if(i>1){e=Math.ceil(i/2);i=Math.floor(i/2)}else{for(var i=e=1,j=[],k=0;k<f.length;k++){var n=f[k];j.push(n[h]);n[h].rowSpan>1&&(k=k+(n[h].rowSpan-1))}for(f=0;f<j.length;f++)j[f].colSpan++}f=d.clone();
f.insertAfter(d);f.appendBogus();d.$.colSpan=e;f.$.colSpan=i;e==1&&d.removeAttribute("colSpan");i==1&&f.removeAttribute("colSpan");return f}var o=/^(?:td|th)$/;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(e){function g(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function m(a,b){var c=e.addCommand(a,b);e.addFeature(c)}var o=e.lang.table;
m("cellProperties",new CKEDITOR.dialogCommand("cellProperties",g({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",requiredContent:"table"})));CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js");m("rowDelete",g({requiredContent:"table",exec:function(a){a=a.getSelection();i(b(a))}}));m("rowInsertBefore",g({requiredContent:"table",exec:function(a){a=a.getSelection();f(a,true)}}));m("rowInsertAfter",g({requiredContent:"table",
exec:function(a){a=a.getSelection();f(a)}}));m("columnDelete",g({requiredContent:"table",exec:function(b){for(var b=b.getSelection(),b=a(b),c=b[0],d=b[b.length-1],b=c.getAscendant("table"),e=CKEDITOR.tools.buildTableMap(b),f,g,h=[],j=0,k=e.length;j<k;j++)for(var l=0,m=e[j].length;l<m;l++){e[j][l]==c.$&&(f=l);e[j][l]==d.$&&(g=l)}for(j=f;j<=g;j++)for(l=0;l<e.length;l++){d=e[l];c=new CKEDITOR.dom.element(b.$.rows[l]);d=new CKEDITOR.dom.element(d[j]);if(d.$){d.$.colSpan==1?d.remove():d.$.colSpan=d.$.colSpan-
1;l=l+(d.$.rowSpan-1);c.$.cells.length||h.push(c)}}g=b.$.rows[0]&&b.$.rows[0].cells;f=new CKEDITOR.dom.element(g[f]||(f?g[f-1]:b.$.parentNode));h.length==k&&b.remove();f&&i(f,true)}}));m("columnInsertBefore",g({requiredContent:"table",exec:function(a){a=a.getSelection();d(a,true)}}));m("columnInsertAfter",g({requiredContent:"table",exec:function(a){a=a.getSelection();d(a)}}));m("cellDelete",g({requiredContent:"table",exec:function(a){a=a.getSelection();h(a)}}));m("cellMerge",g({allowedContent:"td[colspan,rowspan]",
requiredContent:"td[colspan,rowspan]",exec:function(a){i(j(a.getSelection()),true)}}));m("cellMergeRight",g({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){i(j(a.getSelection(),"right"),true)}}));m("cellMergeDown",g({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a){i(j(a.getSelection(),"down"),true)}}));m("cellVerticalSplit",g({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a){i(k(a.getSelection()))}}));m("cellHorizontalSplit",
g({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){i(n(a.getSelection()))}}));m("cellInsertBefore",g({requiredContent:"table",exec:function(a){a=a.getSelection();c(a,true)}}));m("cellInsertAfter",g({requiredContent:"table",exec:function(a){a=a.getSelection();c(a)}}));e.addMenuItems&&e.addMenuItems({tablecell:{label:o.cell.menu,group:"tablecell",order:1,getItems:function(){var b=e.getSelection(),c=a(b);return{tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,
tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:j(b,null,true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:j(b,"right",true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:j(b,"down",true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:k(b,true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:n(b,true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_properties:c.length>0?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED}}},tablecell_insertBefore:{label:o.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:o.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:o.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:o.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:o.cell.mergeRight,group:"tablecell",command:"cellMergeRight",
order:17},tablecell_merge_down:{label:o.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:o.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:o.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:o.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:o.row.menu,group:"tablerow",order:1,getItems:function(){return{tablerow_insertBefore:CKEDITOR.TRISTATE_OFF,
tablerow_insertAfter:CKEDITOR.TRISTATE_OFF,tablerow_delete:CKEDITOR.TRISTATE_OFF}}},tablerow_insertBefore:{label:o.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:o.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:o.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:o.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:CKEDITOR.TRISTATE_OFF,
tablecolumn_insertAfter:CKEDITOR.TRISTATE_OFF,tablecolumn_delete:CKEDITOR.TRISTATE_OFF}}},tablecolumn_insertBefore:{label:o.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:o.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:o.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}});e.contextMenu&&e.contextMenu.addListener(function(a,b,c){return(a=c.contains({td:1,th:1},
1))&&!a.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getSelectedCells:a};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(a){for(var a=a.$.rows,f=-1,b=[],e=0;e<a.length;e++){f++;!b[f]&&(b[f]=[]);for(var d=-1,c=0;c<a[e].cells.length;c++){var h=a[e].cells[c];for(d++;b[f][d];)d++;for(var i=isNaN(h.colSpan)?1:h.colSpan,h=isNaN(h.rowSpan)?1:h.rowSpan,g=0;g<h;g++){b[f+g]||(b[f+
g]=[]);for(var j=0;j<i;j++)b[f+g][d+j]=a[e].cells[c]}d=d+(i-1)}}return b},function(){function a(a){function b(){for(var c=e(),g=CKEDITOR.tools.clone(a.config.toolbarGroups)||f(a),j=0;j<g.length;j++){var k=g[j];if(k!="/"){typeof k=="string"&&(k=g[j]={name:k});var m,v=k.groups;if(v)for(var t=0;t<v.length;t++){m=v[t];(m=c[m])&&i(k,m)}(m=c[k.name])&&i(k,m)}}return g}function e(){var b={},c,f,g;for(c in a.ui.items){f=a.ui.items[c];g=f.toolbar||"others";g=g.split(",");f=g[0];g=parseInt(g[1]||-1,10);b[f]||
(b[f]=[]);b[f].push({name:c,order:g})}for(f in b)b[f]=b[f].sort(function(a,b){return a.order==b.order?0:b.order<0?-1:a.order<0?1:a.order<b.order?-1:1});return b}function i(b,c){if(c.length){b.items?b.items.push(a.ui.create("-")):b.items=[];for(var e;e=c.shift();){e=typeof e=="string"?e:e.name;if(!j||CKEDITOR.tools.indexOf(j,e)==-1)(e=a.ui.create(e))&&a.addFeature(e)&&b.items.push(e)}}}function g(a){var b=[],c,d,e;for(c=0;c<a.length;++c){d=a[c];e={};if(d=="/")b.push(d);else if(CKEDITOR.tools.isArray(d)){i(e,
CKEDITOR.tools.clone(d));b.push(e)}else if(d.items){i(e,CKEDITOR.tools.clone(d.items));e.name=d.name;b.push(e)}}return b}var j=a.config.removeButtons,j=j&&j.split(","),k=a.config.toolbar;typeof k=="string"&&(k=a.config["toolbar_"+k]);return a.toolbar=k?g(k):b()}function f(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 b=function(){this.toolbars=[];this.focusCommandExecuted=false};b.prototype.focus=function(){for(var a=0,b;b=this.toolbars[a++];)for(var e=0,f;f=b.items[e++];)if(f.focus){f.focus();return}};var e={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(a){if(a.toolbox){a.toolbox.focusCommandExecuted=
true;CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){a.toolbox.focus()},100):a.toolbox.focus()}}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(d){var c,f=function(a,b){var e,k=d.lang.dir=="rtl",n=d.config.toolbarGroupCycling,o=k?37:39,k=k?39:37,n=n===void 0||n;switch(b){case 9:case CKEDITOR.SHIFT+9:for(;!e||!e.items.length;){e=b==9?(e?e.next:a.toolbar.next)||d.toolbox.toolbars[0]:(e?e.previous:a.toolbar.previous)||d.toolbox.toolbars[d.toolbox.toolbars.length-1];if(e.items.length)for(a=
e.items[c?e.items.length-1:0];a&&!a.focus;)(a=c?a.previous:a.next)||(e=0)}a&&a.focus();return false;case o:e=a;do{e=e.next;!e&&n&&(e=a.toolbar.items[0])}while(e&&!e.focus);e?e.focus():f(a,9);return false;case 40:if(a.button&&a.button.hasArrow){d.once("panelShow",function(a){a.data._.panel._.currentBlock.onKeyDown(40)});a.execute()}else f(a,b==40?o:k);return false;case k:case 38:e=a;do{e=e.previous;!e&&n&&(e=a.toolbar.items[a.toolbar.items.length-1])}while(e&&!e.focus);if(e)e.focus();else{c=1;f(a,
CKEDITOR.SHIFT+9);c=0}return false;case 27:d.focus();return false;case 13:case 32:a.execute();return false}return true};d.on("uiSpace",function(c){if(c.data.space==d.config.toolbarLocation){c.removeListener();d.toolbox=new b;var e=CKEDITOR.tools.getNextId(),j=['<span id="',e,'" class="cke_voice_label">',d.lang.toolbar.toolbars,"</span>",'<span id="'+d.ui.spaceId("toolbox")+'" class="cke_toolbox" role="group" aria-labelledby="',e,'" onmousedown="return false;">'],e=d.config.toolbarStartupExpanded!==
false,k,n;d.config.toolbarCanCollapse&&d.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&j.push('<span class="cke_toolbox_main"'+(e?">":' style="display:none">'));for(var o=d.toolbox.toolbars,q=a(d),l=0;l<q.length;l++){var m,v=0,t,s=q[l],p;if(s){if(k){j.push("</span>");n=k=0}if(s==="/")j.push('<span class="cke_toolbar_break"></span>');else{p=s.items||s;for(var A=0;A<p.length;A++){var u=p[A],w;if(u)if(u.type==CKEDITOR.UI_SEPARATOR)n=k&&u;else{w=u.canGroup!==false;if(!v){m=CKEDITOR.tools.getNextId();v={id:m,
items:[]};t=s.name&&(d.lang.toolbar.toolbarGroups[s.name]||s.name);j.push('<span id="',m,'" class="cke_toolbar"',t?' aria-labelledby="'+m+'_label"':"",' role="toolbar">');t&&j.push('<span id="',m,'_label" class="cke_voice_label">',t,"</span>");j.push('<span class="cke_toolbar_start"></span>');var r=o.push(v)-1;if(r>0){v.previous=o[r-1];v.previous.next=v}}if(w){if(!k){j.push('<span class="cke_toolgroup" role="presentation">');k=1}}else if(k){j.push("</span>");k=0}m=function(a){a=a.render(d,j);r=v.items.push(a)-
1;if(r>0){a.previous=v.items[r-1];a.previous.next=a}a.toolbar=v;a.onkey=f;a.onfocus=function(){d.toolbox.focusCommandExecuted||d.focus()}};if(n){m(n);n=0}m(u)}}if(k){j.push("</span>");n=k=0}v&&j.push('<span class="cke_toolbar_end"></span></span>')}}}d.config.toolbarCanCollapse&&j.push("</span>");if(d.config.toolbarCanCollapse&&d.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var x=CKEDITOR.tools.addFunction(function(){d.execCommand("toolbarCollapse")});d.on("destroy",function(){CKEDITOR.tools.removeFunction(x)});
d.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b=a.ui.space("toolbar_collapser"),c=b.getPrevious(),d=a.ui.space("contents"),e=c.getParent(),f=parseInt(d.$.style.height,10),g=e.$.offsetHeight,h=b.hasClass("cke_toolbox_collapser_min");if(h){c.show();b.removeClass("cke_toolbox_collapser_min");b.setAttribute("title",a.lang.toolbar.toolbarCollapse)}else{c.hide();b.addClass("cke_toolbox_collapser_min");b.setAttribute("title",a.lang.toolbar.toolbarExpand)}b.getFirst().setText(h?"▲":"◀");
d.setStyle("height",f-(e.$.offsetHeight-g)+"px");a.fire("resize")},modes:{wysiwyg:1,source:1}});d.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");j.push('<a title="'+(e?d.lang.toolbar.toolbarCollapse:d.lang.toolbar.toolbarExpand)+'" id="'+d.ui.spaceId("toolbar_collapser")+'" tabIndex="-1" class="cke_toolbox_collapser');e||j.push(" cke_toolbox_collapser_min");j.push('" onclick="CKEDITOR.tools.callFunction('+x+')">','<span class="cke_arrow">&#9650;</span>',
"</a>")}j.push("</span>");c.data.html=c.data.html+j.join("")}});d.on("destroy",function(){if(this.toolbox){var a,b=0,c,d,e;for(a=this.toolbox.toolbars;b<a.length;b++){d=a[b].items;for(c=0;c<d.length;c++){e=d[c];e.clickFn&&CKEDITOR.tools.removeFunction(e.clickFn);e.keyDownFn&&CKEDITOR.tools.removeFunction(e.keyDownFn)}}}});d.on("uiReady",function(){var a=d.ui.space("toolbox");a&&d.focusManager.add(a,1)});d.addCommand("toolbarFocus",e);d.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");d.ui.add("-",CKEDITOR.UI_SEPARATOR,
{});d.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(a,b){b.push('<span class="cke_toolbar_separator" role="separator"></span>');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(a,b,e){var i=f(this.editor),g=b===0,j={name:a};if(e){if(e=CKEDITOR.tools.search(i,function(a){return a.name==e})){!e.groups&&(e.groups=[]);if(b){b=CKEDITOR.tools.indexOf(e.groups,b);if(b>=0){e.groups.splice(b+1,0,a);return}}g?e.groups.splice(0,0,a):e.groups.push(a);return}b=null}b&&
(b=CKEDITOR.tools.indexOf(i,function(a){return a.name==b}));g?i.splice(0,0,a):typeof b=="number"?i.splice(b+1,0,j):i.push(a)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top",function(){function a(a){this.editor=a;this.reset()}CKEDITOR.plugins.add("undo",{init:function(b){function d(a){f.enabled&&a.data.command.canUndo!==false&&f.save()}function c(){f.enabled=b.readOnly?false:b.mode=="wysiwyg";f.onChange()}var f=b.undoManager=new a(b),i=b.addCommand("undo",{exec:function(){if(f.undo()){b.selectionChange();
this.fire("afterUndo")}},startDisabled:true,canUndo:false}),g=b.addCommand("redo",{exec:function(){if(f.redo()){b.selectionChange();this.fire("afterRedo")}},startDisabled:true,canUndo:false}),j=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90];b.setKeystroke([[j[0],"undo"],[j[1],"redo"],[j[2],"redo"]]);b.on("contentDom",function(){var a=b.editable();a.attachListener(a,"keydown",function(a){CKEDITOR.tools.indexOf(j,a.data.getKeystroke())>-1&&a.data.preventDefault()})});f.onChange=
function(){i.setState(f.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);g.setState(f.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};b.on("beforeCommandExec",d);b.on("afterCommandExec",d);b.on("saveSnapshot",function(a){f.save(a.data&&a.data.contentOnly)});b.on("contentDom",function(){b.editable().on("keydown",function(a){a=a.data.getKey();(a==8||a==46)&&f.type(a,0)});b.editable().on("keypress",function(a){f.type(a.data.getKey(),1)})});b.on("beforeModeUnload",function(){b.mode==
"wysiwyg"&&f.save(true)});b.on("mode",c);b.on("readOnly",c);if(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(){f.reset();b.fire("saveSnapshot")};b.on("updateSnapshot",function(){f.currentImage&&f.update()});b.on("lockSnapshot",function(a){a=a.data;f.lock(a&&a.dontUpdate,a&&a.forceUpdate)});b.on("unlockSnapshot",f.unlock,f)}});CKEDITOR.plugins.undo=
{};var f=CKEDITOR.plugins.undo.Image=function(a,b){this.editor=a;a.fire("beforeUndoImage");var c=a.getSnapshot();CKEDITOR.env.ie&&c&&(c=c.replace(/\s+data-cke-expando=".*?"/g,""));this.contents=c;if(!b)this.bookmarks=(c=c&&a.getSelection())&&c.createBookmarks2(true);a.fire("afterUndoImage")},b=/\b(?:href|src|name)="[^"]*?"/gi;f.prototype={equalsContent:function(a){var d=this.contents,a=a.contents;if(CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)){d=d.replace(b,"");a=a.replace(b,"")}return d!=
a?false:true},equalsSelection:function(a){var b=this.bookmarks,a=a.bookmarks;if(b||a){if(!b||!a||b.length!=a.length)return false;for(var c=0;c<b.length;c++){var f=b[c],i=a[c];if(f.startOffset!=i.startOffset||f.endOffset!=i.endOffset||!CKEDITOR.tools.arrayCompare(f.start,i.start)||!CKEDITOR.tools.arrayCompare(f.end,i.end))return false}}return true}};a.prototype={type:function(a,b){var c=!b&&a!=this.lastKeystroke,h=this.editor;if(!this.typing||b&&!this.wasCharacter||c){var i=new f(h),g=this.snapshots.length;
CKEDITOR.tools.setTimeout(function(){var a=h.getSnapshot();CKEDITOR.env.ie&&(a=a.replace(/\s+data-cke-expando=".*?"/g,""));if(i.contents!=a&&g==this.snapshots.length){this.typing=true;this.save(false,i,false)||this.snapshots.splice(this.index+1,this.snapshots.length-this.index-1);this.hasUndo=true;this.hasRedo=false;this.modifiersCount=this.typesCount=1;this.onChange()}},0,this)}this.lastKeystroke=a;if(this.wasCharacter=b){this.modifiersCount=0;this.typesCount++;if(this.typesCount>25){this.save(false,
null,false);this.typesCount=1}else setTimeout(function(){h.fire("change")},0)}else{this.typesCount=0;this.modifiersCount++;if(this.modifiersCount>25){this.save(false,null,false);this.modifiersCount=1}else setTimeout(function(){h.fire("change")},0)}},reset:function(){this.lastKeystroke=0;this.snapshots=[];this.index=-1;this.limit=this.editor.config.undoStackSize||20;this.currentImage=null;this.hasRedo=this.hasUndo=false;this.locked=null;this.resetType()},resetType:function(){this.typing=false;delete this.lastKeystroke;
this.modifiersCount=this.typesCount=0},fireChange:function(){this.hasUndo=!!this.getNextImage(true);this.hasRedo=!!this.getNextImage(false);this.resetType();this.onChange()},save:function(a,b,c){var h=this.editor;if(this.locked||h.status!="ready"||h.mode!="wysiwyg")return false;var i=h.editable();if(!i||i.status!="ready")return false;i=this.snapshots;b||(b=new f(h));if(b.contents===false)return false;if(this.currentImage)if(b.equalsContent(this.currentImage)){if(a||b.equalsSelection(this.currentImage))return false}else h.fire("change");
i.splice(this.index+1,i.length-this.index-1);i.length==this.limit&&i.shift();this.index=i.push(b)-1;this.currentImage=b;c!==false&&this.fireChange();return true},restoreImage:function(a){var b=this.editor,c;if(a.bookmarks){b.focus();c=b.getSelection()}this.locked=1;this.editor.loadSnapshot(a.contents);if(a.bookmarks)c.selectBookmarks(a.bookmarks);else if(CKEDITOR.env.ie){c=this.editor.document.getBody().$.createTextRange();c.collapse(true);c.select()}this.locked=0;this.index=a.index;this.currentImage=
this.snapshots[this.index];this.update();this.fireChange();b.fire("change")},getNextImage:function(a){var b=this.snapshots,c=this.currentImage,f;if(c)if(a)for(f=this.index-1;f>=0;f--){a=b[f];if(!c.equalsContent(a)){a.index=f;return a}}else for(f=this.index+1;f<b.length;f++){a=b[f];if(!c.equalsContent(a)){a.index=f;return a}}return null},redoable:function(){return this.enabled&&this.hasRedo},undoable:function(){return this.enabled&&this.hasUndo},undo:function(){if(this.undoable()){this.save(true);
var a=this.getNextImage(true);if(a)return this.restoreImage(a),true}return false},redo:function(){if(this.redoable()){this.save(true);if(this.redoable()){var a=this.getNextImage(false);if(a)return this.restoreImage(a),true}}return false},update:function(a){if(!this.locked){a||(a=new f(this.editor));for(var b=this.index,c=this.snapshots;b>0&&this.currentImage.equalsContent(c[b-1]);)b=b-1;c.splice(b,this.index-b+1,a);this.index=b;this.currentImage=a}},lock:function(a,b){if(this.locked)this.locked.level++;
else if(a)this.locked={level:1};else{var c=null;if(b)c=true;else{var h=new f(this.editor,true);this.currentImage&&this.currentImage.equalsContent(h)&&(c=h)}this.locked={update:c,level:1}}},unlock:function(){if(this.locked&&!--this.locked.level){var a=this.locked.update;this.locked=null;if(a===true)this.update();else if(a){var b=new f(this.editor,true);a.equalsContent(b)||this.update()}}}}}(),CKEDITOR.config.wsc_removeGlobalVariable=!0,CKEDITOR.plugins.add("wsc",{requires:"dialog",parseApi:function(a){a.config.wsc_onFinish=
typeof a.config.wsc_onFinish==="function"?a.config.wsc_onFinish:function(){};a.config.wsc_onClose=typeof a.config.wsc_onClose==="function"?a.config.wsc_onClose:function(){}},parseConfig:function(a){a.config.wsc_customerId=a.config.wsc_customerId||CKEDITOR.config.wsc_customerId||"1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk";a.config.wsc_customDictionaryIds=a.config.wsc_customDictionaryIds||CKEDITOR.config.wsc_customDictionaryIds||"";a.config.wsc_userDictionaryName=a.config.wsc_userDictionaryName||
CKEDITOR.config.wsc_userDictionaryName||"";a.config.wsc_customLoaderScript=a.config.wsc_customLoaderScript||CKEDITOR.config.wsc_customLoaderScript;CKEDITOR.config.wsc_cmd=a.config.wsc_cmd||CKEDITOR.config.wsc_cmd||"spell";CKEDITOR.config.wsc_version=CKEDITOR.version+" | %Rev%"},init:function(a){var f=CKEDITOR.env;this.parseConfig(a);this.parseApi(a);a.addCommand("checkspell",new CKEDITOR.dialogCommand("checkspell")).modes={wysiwyg:!CKEDITOR.env.opera&&!CKEDITOR.env.air&&document.domain==window.location.hostname&&
!(f.ie&&(f.version<8||f.quirks))};typeof a.plugins.scayt=="undefined"&&a.ui.addButton&&a.ui.addButton("SpellChecker",{label:a.lang.wsc.toolbar,click:function(a){var e=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.container.getText():a.document.getBody().getText();(e=e.replace(/\s/g,""))?a.execCommand("checkspell"):alert("Nothing to check!")},toolbar:"spellchecker,10"});CKEDITOR.dialog.add("checkspell",this.path+(CKEDITOR.env.ie&&CKEDITOR.env.version<=7?"dialogs/wsc_ie.js":window.postMessage?"dialogs/wsc.js":
"dialogs/wsc_ie.js"))}}),function(){function a(a){var b=this.editor,c=a.document,f=c.body,i=c.getElementById("cke_actscrpt");i&&i.parentNode.removeChild(i);(i=c.getElementById("cke_shimscrpt"))&&i.parentNode.removeChild(i);if(CKEDITOR.env.gecko){f.contentEditable=false;if(CKEDITOR.env.version<2E4){f.innerHTML=f.innerHTML.replace(/^.*<\!-- cke-content-start --\>/,"");setTimeout(function(){var a=new CKEDITOR.dom.range(new CKEDITOR.dom.document(c));a.setStart(new CKEDITOR.dom.node(f),0);b.getSelection().selectRanges([a])},
0)}}f.contentEditable=true;if(CKEDITOR.env.ie){f.hideFocus=true;f.disabled=true;f.removeAttribute("disabled")}delete this._.isLoadingData;this.$=f;c=new CKEDITOR.dom.document(c);this.setup();if(CKEDITOR.env.ie){c.getDocumentElement().addClass(c.$.compatMode);b.config.enterMode!=CKEDITOR.ENTER_P&&this.attachListener(c,"selectionchange",function(){var a=c.getBody(),e=b.getSelection(),f=e&&e.getRanges()[0];f&&(a.getHtml().match(/^<p>(?:&nbsp;|<br>)<\/p>$/i)&&f.startContainer.equals(a))&&setTimeout(function(){f=
b.getSelection().getRanges()[0];if(!f.startContainer.equals("body")){a.getFirst().remove(1);f.moveToElementEditEnd(a);f.select()}},0)})}if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&CKEDITOR.env.version>10)c.getDocumentElement().on("mousedown",function(a){a.data.getTarget().is("html")&&setTimeout(function(){b.editable().focus()})});try{b.document.$.execCommand("2D-position",false,true)}catch(g){}try{b.document.$.execCommand("enableInlineTableEditing",false,!b.config.disableNativeTableHandles)}catch(j){}if(b.config.disableObjectResizing)try{this.getDocument().$.execCommand("enableObjectResizing",
false,false)}catch(k){this.attachListener(this,CKEDITOR.env.ie?"resizestart":"resize",function(a){a.data.preventDefault()})}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&b.document.$.compatMode=="CSS1Compat")&&this.attachListener(this,"keydown",function(a){var c=a.data.getKeystroke();if(c==33||c==34)if(CKEDITOR.env.ie)setTimeout(function(){b.getSelection().scrollIntoView()},0);else if(b.window.$.innerHeight>this.$.offsetHeight){var e=b.createRange();e[c==33?"moveToElementEditStart":"moveToElementEditEnd"](this);
e.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(c,"blur",function(){try{c.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(c,"touchend",function(){a.focus()});b.document.getElementsByTag("title").getItem(0).data("cke-title",b.document.$.title);if(CKEDITOR.env.ie)b.document.$.title=this._.docTitle;CKEDITOR.tools.setTimeout(function(){if(this.status=="unloaded")this.status="ready";b.fire("contentDom");if(this._.isPendingFocus){b.focus();this._.isPendingFocus=
false}setTimeout(function(){b.fire("dataReady")},0);CKEDITOR.env.ie&&setTimeout(function(){if(b.document){var a=b.document.$.body;a.runtimeStyle.marginBottom="0px";a.runtimeStyle.marginBottom=""}},1E3)},0,this)}function f(){var a=[];if(CKEDITOR.document.$.documentMode>=8){a.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}");var b=[],c;for(c in CKEDITOR.dtd.$removeEmpty)b.push("html.CSS1Compat "+c+"[contenteditable=false]");a.push(b.join(",")+"{display:inline-block}")}else if(CKEDITOR.env.gecko){a.push("html{height:100% !important}");
a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"});a.addMode("wysiwyg",function(d){function c(c){c&&c.removeListener();a.editable(new b(a,i.$.contentWindow.document.body));
a.setData(a.getData(1),d)}var f="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",f=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent(f)+"}())":"",i=CKEDITOR.dom.element.createFromHtml('<iframe src="'+f+'" frameBorder="0"></iframe>');i.setStyles({width:"100%",height:"100%"});i.addClass("cke_wysiwyg_frame cke_reset");var g=a.ui.space("contents");g.append(i);if(f=CKEDITOR.env.ie||CKEDITOR.env.gecko)i.on("load",
c);var j=a.title,k=a.lang.common.editorHelp;if(j){CKEDITOR.env.ie&&(j=j+(", "+k));i.setAttribute("title",j)}var j=CKEDITOR.tools.getNextId(),n=CKEDITOR.dom.element.createFromHtml('<span id="'+j+'" class="cke_voice_label">'+k+"</span>");g.append(n,1);a.on("beforeModeUnload",function(a){a.removeListener();n.remove()});i.setAttributes({"aria-describedby":j,tabIndex:a.tabIndex,allowTransparency:"true"});!f&&c();if(CKEDITOR.env.webkit){f=function(){g.setStyle("width","100%");i.hide();i.setSize("width",
g.getSize("width"));g.removeStyle("width");i.show()};i.setCustomData("onResize",f);CKEDITOR.document.getWindow().on("resize",f)}a.fire("ariaWidget",i)})}});CKEDITOR.editor.prototype.addContentsCss=function(a){var b=this.config,c=b.contentsCss;if(!CKEDITOR.tools.isArray(c))b.contentsCss=c?[c]:[];b.contentsCss.push(a)};var b=CKEDITOR.tools.createClass({$:function(b){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(b){CKEDITOR.tools.setTimeout(a,0,this,b)},
this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,b){var c=this.editor;if(b){this.setHtml(a);c.fire("dataReady")}else{this._.isLoadingData=true;c._.dataStore={id:1};var h=c.config,i=h.fullPage,g=h.docType,j=CKEDITOR.tools.buildStyleHtml(f()).replace(/<style>/,'<style data-cke-temp="1">');i||(j=j+CKEDITOR.tools.buildStyleHtml(c.config.contentsCss));var k=h.baseHref?'<base href="'+h.baseHref+'" data-cke-temp="1" />':"";i&&(a=a.replace(/<!DOCTYPE[^>]*>/i,
function(a){c.docType=g=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){c.xmlDeclaration=a;return""}));a=c.dataProcessor.toHtml(a);if(i){/<body[\s|>]/.test(a)||(a="<body>"+a);/<html[\s|>]/.test(a)||(a="<html>"+a+"</html>");/<head[\s|>]/.test(a)?/<title[\s|>]/.test(a)||(a=a.replace(/<head[^>]*>/,"$&<title></title>")):a=a.replace(/<html[^>]*>/,"$&<head><title></title></head>");k&&(a=a.replace(/<head>/,"$&"+k));a=a.replace(/<\/head\s*>/,j+"$&");a=g+a}else a=h.docType+'<html dir="'+h.contentsLangDirection+
'" lang="'+(h.contentsLanguage||c.langCode)+'"><head><title>'+this._.docTitle+"</title>"+k+j+"</head><body"+(h.bodyId?' id="'+h.bodyId+'"':"")+(h.bodyClass?' class="'+h.bodyClass+'"':"")+">"+a+"</body></html>";if(CKEDITOR.env.gecko){a=a.replace(/<body/,'<body contenteditable="true" ');CKEDITOR.env.version<2E4&&(a=a.replace(/<body[^>]*>/,"$&<\!-- cke-content-start --\>"))}h='<script id="cke_actscrpt" type="text/javascript"'+(CKEDITOR.env.ie?' defer="defer" ':"")+">var wasLoaded=0;function onload(){if(!wasLoaded)window.parent.CKEDITOR.tools.callFunction("+
this._.frameLoadedHandler+",window);wasLoaded=1;}"+(CKEDITOR.env.ie?"onload();":'document.addEventListener("DOMContentLoaded", onload, false );')+"<\/script>";CKEDITOR.env.ie&&CKEDITOR.env.version<9&&(h=h+'<script id="cke_shimscrpt">window.parent.CKEDITOR.tools.enableHtml5Elements(document)<\/script>');a=a.replace(/(?=\s*<\/(:?head)>)/,h);this.clearCustomData();this.clearListeners();c.fire("contentDomUnload");var n=this.getDocument();try{n.write(a)}catch(o){setTimeout(function(){n.write(a)},0)}}},
getData:function(a){if(a)return this.getHtml();var a=this.editor,b=a.config,c=b.fullPage,f=c&&a.docType,i=c&&a.xmlDeclaration,g=this.getDocument(),c=c?g.getDocumentElement().getOuterHtml():g.getBody().getHtml();CKEDITOR.env.gecko&&b.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/<br>(?=\s*(:?$|<\/body>))/,""));c=a.dataProcessor.toDataFormat(c);i&&(c=i+"\n"+c);f&&(c=f+"\n"+c);return c},focus:function(){this._.isLoadingData?this._.isPendingFocus=true:b.baseProto.focus.call(this)},detach:function(){var a=
this.editor,d=a.document,a=a.window.getFrame();b.baseProto.detach.call(this);this.clearCustomData();d.getDocumentElement().clearCustomData();a.clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);(d=a.removeCustomData("onResize"))&&d.removeListener();a.remove()}}})}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=!0,CKEDITOR.config.disableNativeSpellChecker=!0,CKEDITOR.config.contentsCss=CKEDITOR.getUrl("contents.css"),CKEDITOR.config.plugins=
"dialogui,dialog,a11yhelp,about,basicstyles,blockquote,clipboard,panel,floatpanel,menu,contextmenu,elementspath,indent,indentlist,list,enterkey,entities,popup,filebrowser,floatingspace,listblock,button,richcombo,format,horizontalrule,htmlwriter,image,fakeobjects,link,magicline,maximize,pastefromword,pastetext,removeformat,resize,menubutton,scayt,showborders,sourcearea,specialchar,stylescombo,tab,table,tabletools,toolbar,undo,wsc,wysiwygarea",CKEDITOR.config.skin="moono",function(){var a=function(a,
b){for(var e=CKEDITOR.getUrl("plugins/"+b),a=a.split(","),d=0;d<a.length;d++)CKEDITOR.skin.icons[a[d]]={path:e,offset:-a[++d],bgsize:a[++d]}};CKEDITOR.env.hidpi?a("about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,bidiltr,168,,bidirtl,192,,blockquote,216,,copy-rtl,240,,copy,264,,cut-rtl,288,,cut,312,,paste-rtl,336,,paste,360,,codesnippet,384,,bgcolor,408,,textcolor,432,,creatediv,456,,docprops-rtl,480,,docprops,504,,find-rtl,528,,find,552,,replace,576,,flash,600,,button,624,,checkbox,648,,form,672,,hiddenfield,696,,imagebutton,720,,radio,744,,select-rtl,768,,select,792,,textarea-rtl,816,,textarea,840,,textfield-rtl,864,,textfield,888,,horizontalrule,912,,iframe,936,,image,960,,indent-rtl,984,,indent,1008,,outdent-rtl,1032,,outdent,1056,,justifyblock,1080,,justifycenter,1104,,justifyleft,1128,,justifyright,1152,,language,1176,,anchor-rtl,1200,,anchor,1224,,link,1248,,unlink,1272,,bulletedlist-rtl,1296,,bulletedlist,1320,,numberedlist-rtl,1344,,numberedlist,1368,,mathjax,1392,,maximize,1416,,newpage-rtl,1440,,newpage,1464,,pagebreak-rtl,1488,,pagebreak,1512,,pastefromword-rtl,1536,,pastefromword,1560,,pastetext-rtl,1584,,pastetext,1608,,placeholder,1632,,preview-rtl,1656,,preview,1680,,print,1704,,removeformat,1728,,save,1752,,scayt,1776,,selectall,1800,,showblocks-rtl,1824,,showblocks,1848,,smiley,1872,,source-rtl,1896,,source,1920,,sourcedialog-rtl,1944,,sourcedialog,1968,,specialchar,1992,,table,2016,,templates-rtl,2040,,templates,2064,,uicolor,2088,,redo-rtl,2112,,redo,2136,,undo-rtl,2160,,undo,2184,,spellchecker,2208,",
"icons_hidpi.png"):a("about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,bidiltr,168,auto,bidirtl,192,auto,blockquote,216,auto,copy-rtl,240,auto,copy,264,auto,cut-rtl,288,auto,cut,312,auto,paste-rtl,336,auto,paste,360,auto,codesnippet,384,auto,bgcolor,408,auto,textcolor,432,auto,creatediv,456,auto,docprops-rtl,480,auto,docprops,504,auto,find-rtl,528,auto,find,552,auto,replace,576,auto,flash,600,auto,button,624,auto,checkbox,648,auto,form,672,auto,hiddenfield,696,auto,imagebutton,720,auto,radio,744,auto,select-rtl,768,auto,select,792,auto,textarea-rtl,816,auto,textarea,840,auto,textfield-rtl,864,auto,textfield,888,auto,horizontalrule,912,auto,iframe,936,auto,image,960,auto,indent-rtl,984,auto,indent,1008,auto,outdent-rtl,1032,auto,outdent,1056,auto,justifyblock,1080,auto,justifycenter,1104,auto,justifyleft,1128,auto,justifyright,1152,auto,language,1176,auto,anchor-rtl,1200,auto,anchor,1224,auto,link,1248,auto,unlink,1272,auto,bulletedlist-rtl,1296,auto,bulletedlist,1320,auto,numberedlist-rtl,1344,auto,numberedlist,1368,auto,mathjax,1392,auto,maximize,1416,auto,newpage-rtl,1440,auto,newpage,1464,auto,pagebreak-rtl,1488,auto,pagebreak,1512,auto,pastefromword-rtl,1536,auto,pastefromword,1560,auto,pastetext-rtl,1584,auto,pastetext,1608,auto,placeholder,1632,auto,preview-rtl,1656,auto,preview,1680,auto,print,1704,auto,removeformat,1728,auto,save,1752,auto,scayt,1776,auto,selectall,1800,auto,showblocks-rtl,1824,auto,showblocks,1848,auto,smiley,1872,auto,source-rtl,1896,auto,source,1920,auto,sourcedialog-rtl,1944,auto,sourcedialog,1968,auto,specialchar,1992,auto,table,2016,auto,templates-rtl,2040,auto,templates,2064,auto,uicolor,2088,auto,redo-rtl,2112,auto,redo,2136,auto,undo-rtl,2160,auto,undo,2184,auto,spellchecker,2208,auto",
"icons.png")}()})();