Вход Регистрация
Файл: templates/backend/default/assets/plugins/ckeditor/ckeditor.min.js
Строк: 20631
!function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var e={timestamp:"D08E",version:"4.0.1",revision:"d02739be4b",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var e=window.CKEDITOR_BASEPATH||"";if(!e)for(var t=document.getElementsByTagName("script"),n=0;n<t.length;n++){var i=t[n].src.match(/(^|.*[\/])ckeditor(?:_basic)?(?:_source)?.js(?:?.*)?$/i);if(i){e=i[1];break}}if(-1==e.indexOf(":/")&&(e=0===e.indexOf("/")?location.href.match(/^.*?://[^/]*/)[0]+e:location.href.match(/^[^?]*/(?:)/)[0]+e),!e)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return e}(),getUrl:function(e){return-1==e.indexOf(":/")&&0!==e.indexOf("/")&&(e=this.basePath+e),this.timestamp&&"/"!=e.charAt(e.length-1)&&!/[&?]t=/.test(e)&&(e+=(0<=e.indexOf("?")?"&":"?")+"t="+this.timestamp),e},domReady:function(){function e(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",e,!1),t()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",e),t())}catch(n){}}function t(){for(var e;e=n.shift();)e()}var n=[];return function(t){if(n.push(t),"complete"===document.readyState&&setTimeout(e,1),1==n.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",e,!1),window.addEventListener("load",e,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",e),window.attachEvent("onload",e),t=!1;try{t=!window.frameElement}catch(i){}if(document.documentElement.doScroll&&t){var o=function(){try{document.documentElement.doScroll("left")}catch(t){return setTimeout(o,1),void 0}e()};o()}}}}()},t=window.CKEDITOR_GETURL;if(t){var n=e.url;e.url=function(i){return t.call(e,i)||n.call(e,i)}}return e}()),CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(e){var t,n=CKEDITOR.event.prototype;for(t in n)void 0==e[t]&&(e[t]=n[t])},CKEDITOR.event.prototype=function(){function e(e){var i=t(this);return i[e]||(i[e]=new n(e))}var t=function(e){return e=e.getPrivate&&e.getPrivate()||e._||(e._={}),e.events||(e.events={})},n=function(e){this.name=e,this.listeners=[]};return n.prototype={getListenerIndex:function(e){for(var t=0,n=this.listeners;t<n.length;t++)if(n[t].fn==e)return t;return-1}},{define:function(t,n){var i=e.call(this,t);CKEDITOR.tools.extend(i,n,!0)},on:function(t,n,i,o,a){function s(e,a,s,l){return e={name:t,sender:this,editor:e,data:a,listenerData:o,stop:s,cancel:l,removeListener:r},n.call(i,e)===!1?!1:e.data}function r(){c.removeListener(t,n)}var l=e.call(this,t);if(l.getListenerIndex(n)<0){l=l.listeners,i||(i=this),isNaN(a)&&(a=10);var c=this;s.fn=n,s.priority=a;for(var d=l.length-1;d>=0;d--)if(l[d].priority<=a)return l.splice(d+1,0,s),{removeListener:r};l.unshift(s)}return{removeListener:r}},once:function(){var e=arguments[1];return arguments[1]=function(t){return t.removeListener(),e.apply(this,arguments)},this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var e=this.on.apply(this,arguments);return CKEDITOR.event.useCapture=0,e},fire:function(){var e=0,n=function(){e=1},i=0,o=function(){i=1};return function(a,s,r){var l=t(this)[a],a=e,c=i;if(e=i=0,l){var d=l.listeners;if(d.length)for(var u,d=d.slice(0),h=0;h<d.length;h++){if(l.errorProof)try{u=d[h].call(this,r,s,n,o)}catch(f){}else u=d[h].call(this,r,s,n,o);if(u===!1?i=1:"undefined"!=typeof u&&(s=u),e||i)break}}return s=i?!1:"undefined"==typeof s?!0:s,e=a,i=c,s}}(),fireOnce:function(e,n,i){return n=this.fire(e,n,i),delete t(this)[e],n},removeListener:function(e,n){var i=t(this)[e];if(i){var o=i.getListenerIndex(n);o>=0&&i.listeners.splice(o,1)}},removeAllListeners:function(){var e,n=t(this);for(e in n)delete n[e]},hasListeners:function(e){return(e=t(this)[e])&&e.listeners.length>0}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]),CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(e,t){return e in{instanceReady:1,loaded:1}&&(this[e]=!0),CKEDITOR.event.prototype.fire.call(this,e,t,this)},CKEDITOR.editor.prototype.fireOnce=function(e,t){return e in{instanceReady:1,loaded:1}&&(this[e]=!0),CKEDITOR.event.prototype.fireOnce.call(this,e,t,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,a={ie:eval("/*@cc_on!@*/false"),opera:!!c&&c.version,webkit:b.indexOf(" applewebkit/")>-1,air:b.indexOf(" adobeair/")>-1,mac:b.indexOf("macintosh")>-1,quirks:"BackCompat"==document.compatMode,mobile:b.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(b),isCustomDomain:function(){if(!this.ie)return!1;var e=document.domain,t=window.location.hostname;return e!=t&&e!="["+t+"]"},secure:"https:"==location.protocol};a.gecko="Gecko"==navigator.product&&!a.webkit&&!a.opera,a.webkit&&(b.indexOf("chrome")>-1?a.chrome=!0:a.safari=!0);var f=0;if(a.ie&&(f=a.quirks||!document.documentMode?parseFloat(b.match(/msie (d+)/)[1]):document.documentMode,a.ie9Compat=9==f,a.ie8Compat=8==f,a.ie7Compat=7==f,a.ie6Compat=7>f||a.quirks),a.gecko){var e=b.match(/rv:([d.]+)/);e&&(e=e[1].split("."),f=1e4*e[0]+100*(e[1]||0)+1*(e[2]||0))}return a.opera&&(f=parseFloat(c.version())),a.air&&(f=parseFloat(b.match(/ adobeair/(d+)/)[1])),a.webkit&&(f=parseFloat(b.match(/ applewebkit/(d+)/)[1])),a.version=f,a.isCompatible=a.iOS&&f>=534||!a.mobile&&(a.ie&&f>6||a.gecko&&f>=10801||a.opera&&f>=9.5||a.air&&f>=1||a.webkit&&f>=522||!1),a.cssClass="cke_browser_"+(a.ie?"ie":a.gecko?"gecko":a.opera?"opera":a.webkit?"webkit":"unknown"),a.quirks&&(a.cssClass=a.cssClass+" cke_browser_quirks"),a.ie&&(a.cssClass=a.cssClass+(" cke_browser_ie"+(a.quirks||a.version<7?"6":a.version)),a.quirks&&(a.cssClass=a.cssClass+" cke_browser_iequirks")),a.gecko&&(10900>f?a.cssClass=a.cssClass+" cke_browser_gecko18":11e3>=f&&(a.cssClass=a.cssClass+" cke_browser_gecko19")),a.air&&(a.cssClass=a.cssClass+" cke_browser_air"),a}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR),CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var e=document.createElement("script");e.type="text/javascript",e.src=CKEDITOR.basePath+"ckeditor.js",document.getElementsByTagName("head")[0].appendChild(e)}},CKEDITOR.loadFullCoreTimeout=0,CKEDITOR.add=function(e){(this._.pending||(this._.pending=[])).push(e)},function(){CKEDITOR.domReady(function(){var e=CKEDITOR.loadFullCore,t=CKEDITOR.loadFullCoreTimeout;e&&(CKEDITOR.status="basic_ready",e&&e._load?e():t&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1e3*t))})}(),CKEDITOR.status="basic_loaded"}(),CKEDITOR.dom={},function(){var e=[],t=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){e=[]}),CKEDITOR.tools={arrayCompare:function(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0},clone:function(e){var t;if(e&&e instanceof Array){t=[];for(var n=0;n<e.length;n++)t[n]=this.clone(e[n]);return t}if(null===e||"object"!=typeof e||e instanceof String||e instanceof Number||e instanceof Boolean||e instanceof Date||e instanceof RegExp)return e;t=new e.constructor;for(n in e)t[n]=this.clone(e[n]);return t},capitalize:function(e){return e.charAt(0).toUpperCase()+e.substring(1).toLowerCase()},extend:function(e){var t,n,i=arguments.length;"boolean"==typeof(t=arguments[i-1])?i--:"boolean"==typeof(t=arguments[i-2])&&(n=arguments[i-1],i-=2);for(var o=1;i>o;o++){var a,s=arguments[o];for(a in s)(t===!0||void 0==e[a])&&(!n||a in n)&&(e[a]=s[a])}return e},prototypedCopy:function(e){var t=function(){};return t.prototype=e,new t},isArray:function(e){return!!e&&e instanceof Array},isEmpty:function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},cssVendorPrefix:function(e,n,i){return i?t+e+":"+n+";"+e+":"+n:(i={},i[e]=n,i[t+e]=n,i)},cssStyleToDomStyle:function(){var e=document.createElement("div").style,t="undefined"!=typeof e.cssFloat?"cssFloat":"undefined"!=typeof e.styleFloat?"styleFloat":"float";return function(e){return"float"==e?t:e.replace(/-./g,function(e){return e.substr(1).toUpperCase()})}}(),buildStyleHtml:function(e){for(var t,e=[].concat(e),n=[],i=0;i<e.length;i++)(t=e[i])&&(/@import|[{}]/.test(t)?n.push("<style>"+t+"</style>"):n.push('<link type="text/css" rel=stylesheet href="'+t+'">'));return n.join("")},htmlEncode:function(e){return(""+e).replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;")},htmlEncodeAttr:function(e){return e.replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},getNextNumber:function(){var e=0;return function(){return++e}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(e,t){var n=t(e);return n.prototype=e.prototype,n},setTimeout:function(e,t,n,i,o){return o||(o=window),n||(n=o),o.setTimeout(function(){i?e.apply(n,[].concat(i)):e.apply(n)},t||0)},trim:function(){var e=/(?:^[ tnr]+)|(?:[ tnr]+$)/g;return function(t){return t.replace(e,"")}}(),ltrim:function(){var e=/^[ tnr]+/g;return function(t){return t.replace(e,"")}}(),rtrim:function(){var e=/[ tnr]+$/g;return function(t){return t.replace(e,"")}}(),indexOf:function(e,t){if("function"==typeof t){for(var n=0,i=e.length;i>n;n++)if(t(e[n]))return n}else{if(e.indexOf)return e.indexOf(t);for(n=0,i=e.length;i>n;n++)if(e[n]===t)return n}return-1},search:function(e,t){var n=CKEDITOR.tools.indexOf(e,t);return n>=0?e[n]:null},bind:function(e,t){return function(){return e.apply(t,arguments)}},createClass:function(e){var t=e.$,n=e.base,i=e.privates||e._,o=e.proto,e=e.statics;if(!t&&(t=function(){n&&this.base.apply(this,arguments)}),i)var a=t,t=function(){var e,t=this._||(this._={});for(e in i){var n=i[e];t[e]="function"==typeof n?CKEDITOR.tools.bind(n,this):n}a.apply(this,arguments)};return n&&(t.prototype=this.prototypedCopy(n.prototype),t.prototype.constructor=t,t.base=n,t.baseProto=n.prototype,t.prototype.base=function(){this.base=n.prototype.base,n.apply(this,arguments),this.base=arguments.callee}),o&&this.extend(t.prototype,o,!0),e&&this.extend(t,e,!0),t},addFunction:function(t,n){return e.push(function(){return t.apply(n||this,arguments)})-1},removeFunction:function(t){e[t]=null},callFunction:function(t){var n=e[t];return n&&n.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var e,t=/^-?d+.?d*px$/;return function(n){return e=CKEDITOR.tools.trim(n+"")+"px",t.test(e)?e:n||""}}(),convertToPx:function(){var e;return function(t){return e||(e=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(e)),/%$/.test(t)?t:(e.setStyle("width",t),e.$.clientWidth)}}(),repeat:function(e,t){return Array(t+1).join(e)},tryThese:function(){for(var e,t=0,n=arguments.length;n>t;t++){var i=arguments[t];try{e=i();break}catch(o){}}return e},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(e){return function(){var t=arguments,n=this;window.setTimeout(function(){e.apply(n,t)},0)}},normalizeCssText:function(e,t){var n,i=[],o=CKEDITOR.tools.parseCssText(e,!0,t);for(n in o)i.push(n+":"+o[n]);return i.sort(),i.length?i.join(";")+";":""},convertRgbToHex:function(e){return e.replace(/(?:rgb(s*(d+)s*,s*(d+)s*,s*(d+)s*))/gi,function(e,t,n,i){for(e=[t,n,i],t=0;3>t;t++)e[t]=("0"+parseInt(e[t],10).toString(16)).slice(-2);return"#"+e.join("")})},parseCssText:function(e,t,n){var i={};return n&&(n=new CKEDITOR.dom.element("span"),n.setAttribute("style",e),e=CKEDITOR.tools.convertRgbToHex(n.getAttribute("style")||"")),e&&";"!=e?(e.replace(/&quot;/g,'"').replace(/s*([^:;s]+)s*:s*([^;]+)s*(?=;|$)/g,function(e,n,o){t&&(n=n.toLowerCase(),"font-family"==n&&(o=o.toLowerCase().replace(/["']/g,"").replace(/s*,s*/g,",")),o=CKEDITOR.tools.trim(o)),i[n]=o}),i):i}}}(),CKEDITOR.dtd=function(){var e=CKEDITOR.tools.extend,t=function(e,t){for(var n=CKEDITOR.tools.clone(e),i=1;i<arguments.length;i++){var o,t=arguments[i];for(o in t)delete n[o]}return n},n={},i={},o={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},a={command:1,link:1,meta:1,noscript:1,script:1,style:1},s={},r={"#":1},l={center:1,dir:1,noframes:1};return e(n,{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},r,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1}),e(i,o,n,l),t={a:t(n,{a:1,button:1}),abbr:n,address:i,area:s,article:e({style:1},i),aside:e({style:1},i),audio:e({source:1,track:1},i),b:n,base:s,bdi:n,bdo:n,blockquote:i,body:i,br:s,button:t(n,{a:1,button:1}),canvas:n,caption:i,cite:n,code:n,col:s,colgroup:{col:1},command:s,datalist:e({option:1},n),dd:i,del:n,details:e({summary:1},i),dfn:n,div:e({style:1},i),dl:{dt:1,dd:1},dt:i,em:n,embed:s,fieldset:e({legend:1},i),figcaption:i,figure:e({figcaption:1},i),footer:i,form:i,h1:n,h2:n,h3:n,h4:n,h5:n,h6:n,head:e({title:1,base:1},a),header:i,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:s,html:e({head:1,body:1},i,a),i:n,iframe:r,img:s,input:s,ins:n,kbd:n,keygen:s,label:n,legend:n,li:i,link:s,map:i,mark:n,menu:e({li:1},i),meta:s,meter:t(n,{meter:1}),nav:i,noscript:e({link:1,meta:1,style:1},n),object:e({param:1},n),ol:{li:1},optgroup:{option:1},option:r,output:n,p:n,param:s,pre:n,progress:t(n,{progress:1}),q:n,rp:n,rt:n,ruby:e({rp:1,rt:1},n),s:n,samp:n,script:r,section:e({style:1},i),select:{optgroup:1,option:1},small:n,source:s,span:n,strong:n,style:r,sub:n,summary:n,sup:n,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:i,textarea:r,tfoot:{tr:1},th:i,thead:{tr:1},time:t(n,{time:1}),title:r,tr:{th:1,td:1},track:s,u:n,ul:{li:1},"var":n,video:e({source:1,track:1},i),wbr:s,acronym:n,applet:e({param:1},i),basefont:s,big:n,center:i,dialog:s,dir:{li:1},font:n,isindex:s,noframes:i,strike:n,tt:n},e(t,{$block:e({audio:1,dd:1,dt:1,li:1,video:1},o,l),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,fieldset: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,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:n,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:e({body:1,head:1,html:1},t.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}}),t}(),CKEDITOR.dom.event=function(e){this.$=e},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var e=this.getKey();return(this.$.ctrlKey||this.$.metaKey)&&(e+=CKEDITOR.CTRL),this.$.shiftKey&&(e+=CKEDITOR.SHIFT),this.$.altKey&&(e+=CKEDITOR.ALT),e},preventDefault:function(e){var t=this.$;t.preventDefault?t.preventDefault():t.returnValue=!1,e&&this.stopPropagation()},stopPropagation:function(){var e=this.$;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},getTarget:function(){var e=this.$.target||this.$.srcElement;return e?new CKEDITOR.dom.node(e):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var e=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(e.documentElement.scrollLeft||e.body.scrollLeft),y:this.$.pageY||this.$.clientY+(e.documentElement.scrollTop||e.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(e){e&&(this.$=e)},CKEDITOR.dom.domObject.prototype=function(){var e=function(e,t){return function(n){"undefined"!=typeof CKEDITOR&&e.fire(t,new CKEDITOR.dom.event(n))}};return{getPrivate:function(){var e;return(e=this.getCustomData("_"))||this.setCustomData("_",e={}),e},on:function(t){var n=this.getCustomData("_cke_nativeListeners");return n||(n={},this.setCustomData("_cke_nativeListeners",n)),n[t]||(n=n[t]=e(this,t),this.$.addEventListener?this.$.addEventListener(t,n,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+t,n)),CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(e){if(CKEDITOR.event.prototype.removeListener.apply(this,arguments),!this.hasListeners(e)){var t=this.getCustomData("_cke_nativeListeners"),n=t&&t[e];n&&(this.$.removeEventListener?this.$.removeEventListener(e,n,!1):this.$.detachEvent&&this.$.detachEvent("on"+e,n),delete t[e])}},removeAllListeners:function(){var e,t=this.getCustomData("_cke_nativeListeners");for(e in t){var n=t[e];this.$.detachEvent?this.$.detachEvent("on"+e,n):this.$.removeEventListener&&this.$.removeEventListener(e,n,!1),delete t[e]}}}}(),function(e){var t={};CKEDITOR.on("reset",function(){t={}}),e.equals=function(e){try{return e&&e.$===this.$}catch(t){return!1}},e.setCustomData=function(e,n){var i=this.getUniqueId();return(t[i]||(t[i]={}))[e]=n,this},e.getCustomData=function(e){var n=this.$["data-cke-expando"];return(n=n&&t[n])&&e in n?n[e]:null},e.removeCustomData=function(e){var n,i,o=this.$["data-cke-expando"],o=o&&t[o];return o&&(n=o[e],i=e in o,delete o[e]),i?n:null},e.clearCustomData=function(){this.removeAllListeners();var e=this.$["data-cke-expando"];e&&delete t[e]},e.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())},CKEDITOR.event.implementOn(e)}(CKEDITOR.dom.domObject.prototype),CKEDITOR.dom.node=function(e){return e?new CKEDITOR.dom[e.nodeType==CKEDITOR.NODE_DOCUMENT?"document":e.nodeType==CKEDITOR.NODE_ELEMENT?"element":e.nodeType==CKEDITOR.NODE_TEXT?"text":e.nodeType==CKEDITOR.NODE_COMMENT?"comment":e.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](e):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(e,t){return e.append(this,t),e},clone:function(e,t){var n=this.$.cloneNode(e),i=function(n){if(n["data-cke-expando"]&&(n["data-cke-expando"]=!1),n.nodeType==CKEDITOR.NODE_ELEMENT&&(t||n.removeAttribute("id",!1),e))for(var n=n.childNodes,o=0;o<n.length;o++)i(n[o])};return i(n),new CKEDITOR.dom.node(n)},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(e){return e.$.parentNode.insertBefore(this.$,e.$.nextSibling),e},insertBefore:function(e){return e.$.parentNode.insertBefore(this.$,e.$),e},insertBeforeMe:function(e){return this.$.parentNode.insertBefore(e.$,this.$),e},getAddress:function(e){for(var t=[],n=this.getDocument().$.documentElement,i=this.$;i&&i!=n;){var o=i.parentNode;o&&t.unshift(this.getIndex.call({$:i},e)),i=o}return t},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(e){var t,n=this.$,i=-1;if(!this.$.parentNode)return i;do(!e||n==this.$||n.nodeType!=CKEDITOR.NODE_TEXT||!t&&n.nodeValue)&&(i++,t=n.nodeType==CKEDITOR.NODE_TEXT);while(n=n.previousSibling);return i},getNextSourceNode:function(e,t,n){if(n&&!n.call)var i=n,n=function(e){return!e.equals(i)};var o,e=!e&&this.getFirst&&this.getFirst();if(!e){if(this.type==CKEDITOR.NODE_ELEMENT&&n&&n(this,!0)===!1)return null;e=this.getNext()}for(;!e&&(o=(o||this).getParent());){if(n&&n(o,!0)===!1)return null;e=o.getNext()}return!e||n&&n(e)===!1?null:t&&t!=e.type?e.getNextSourceNode(!1,t,n):e},getPreviousSourceNode:function(e,t,n){if(n&&!n.call)var i=n,n=function(e){return!e.equals(i)};var o,e=!e&&this.getLast&&this.getLast();if(!e){if(this.type==CKEDITOR.NODE_ELEMENT&&n&&n(this,!0)===!1)return null;e=this.getPrevious()}for(;!e&&(o=(o||this).getParent());){if(n&&n(o,!0)===!1)return null;e=o.getPrevious()}return!e||n&&n(e)===!1?null:t&&e.type!=t?e.getPreviousSourceNode(!1,t,n):e},getPrevious:function(e){var t,n=this.$;do t=(n=n.previousSibling)&&10!=n.nodeType&&new CKEDITOR.dom.node(n);while(t&&e&&!e(t));return t},getNext:function(e){var t,n=this.$;do t=(n=n.nextSibling)&&new CKEDITOR.dom.node(n);while(t&&e&&!e(t));return t},getParent:function(e){var t=this.$.parentNode;return t&&(t.nodeType==CKEDITOR.NODE_ELEMENT||e&&t.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(t):null},getParents:function(e){var t=this,n=[];do n[e?"push":"unshift"](t);while(t=t.getParent());return n},getCommonAncestor:function(e){if(e.equals(this))return this;if(e.contains&&e.contains(this))return e;var t=this.contains?this:this.getParent();do if(t.contains(e))return t;while(t=t.getParent());return null},getPosition:function(e){var t=this.$,n=e.$;if(t.compareDocumentPosition)return t.compareDocumentPosition(n);if(t==n)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&e.type==CKEDITOR.NODE_ELEMENT){if(t.contains){if(t.contains(n))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(n.contains(t))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in t)return t.sourceIndex<0||n.sourceIndex<0?CKEDITOR.POSITION_DISCONNECTED:t.sourceIndex<n.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}for(var t=this.getAddress(),e=e.getAddress(),n=Math.min(t.length,e.length),i=0;n-1>=i;i++)if(t[i]!=e[i]){if(n>i)return t[i]<e[i]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;break}return t.length<e.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(e,t){var n,i=this.$;for(t||(i=i.parentNode);i;){if(i.nodeName&&(n=i.nodeName.toLowerCase(),"string"==typeof e?n==e:n in e))return new CKEDITOR.dom.node(i);i=i.parentNode}return null},hasAscendant:function(e,t){var n=this.$;for(t||(n=n.parentNode);n;){if(n.nodeName&&n.nodeName.toLowerCase()==e)return!0;n=n.parentNode}return!1},move:function(e,t){e.append(this.remove(),t)},remove:function(e){var t=this.$,n=t.parentNode;if(n){if(e)for(;e=t.firstChild;)n.insertBefore(t.removeChild(e),t);n.removeChild(t)}return this},replace:function(e){this.insertBefore(e),e.remove()},trim:function(){this.ltrim(),this.rtrim()},ltrim:function(){for(var e;this.getFirst&&(e=this.getFirst());){if(e.type==CKEDITOR.NODE_TEXT){var t=CKEDITOR.tools.ltrim(e.getText()),n=e.getLength();if(!t){e.remove();continue}t.length<n&&(e.split(n-t.length),this.$.removeChild(this.$.firstChild))}break}},rtrim:function(){for(var e;this.getLast&&(e=this.getLast());){if(e.type==CKEDITOR.NODE_TEXT){var t=CKEDITOR.tools.rtrim(e.getText()),n=e.getLength();if(!t){e.remove();continue}t.length<n&&(e.split(t.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild))}break}CKEDITOR.env.ie||CKEDITOR.env.opera||(e=this.$.lastChild)&&1==e.type&&"br"==e.nodeName.toLowerCase()&&e.parentNode.removeChild(e)},isReadOnly:function(){var e=this;if(this.type!=CKEDITOR.NODE_ELEMENT&&(e=this.getParent()),e&&"undefined"!=typeof e.$.isContentEditable)return!(e.$.isContentEditable||e.data("cke-editable"));for(;e&&!e.data("cke-editable");){if("false"==e.getAttribute("contentEditable"))return!0;if("true"==e.getAttribute("contentEditable"))break;e=e.getParent()}return!e}}),CKEDITOR.dom.window=function(e){CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var e=this.$.document,t="CSS1Compat"==e.compatMode;return{width:(t?e.documentElement.clientWidth:e.body.clientWidth)||0,height:(t?e.documentElement.clientHeight:e.body.clientHeight)||0}},getScrollPosition:function(){var e=this.$;return"pageXOffset"in e?{x:e.pageXOffset||0,y:e.pageYOffset||0}:(e=e.document,{x:e.documentElement.scrollLeft||e.body.scrollLeft||0,y:e.documentElement.scrollTop||e.body.scrollTop||0})},getFrame:function(){var e=this.$.frameElement;return e?new CKEDITOR.dom.element.get(e):null}}),CKEDITOR.dom.document=function(e){CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(e){if(this.$.createStyleSheet)this.$.createStyleSheet(e);else{var t=new CKEDITOR.dom.element("link");t.setAttributes({rel:"stylesheet",type:"text/css",href:e}),this.getHead().append(t)}},appendStyleText:function(e){if(this.$.createStyleSheet){var t=this.$.createStyleSheet("");t.cssText=e}else{var n=new CKEDITOR.dom.element("style",this);n.append(new CKEDITOR.dom.text(e,this)),this.getHead().append(n)}return t||n.$.sheet},createElement:function(e,t){var n=new CKEDITOR.dom.element(e,this);return t&&(t.attributes&&n.setAttributes(t.attributes),t.styles&&n.setStyles(t.styles)),n},createText:function(e){return new CKEDITOR.dom.text(e,this)},focus:function(){this.getWindow().focus()},getActive:function(){return new CKEDITOR.dom.element(this.$.activeElement)},getById:function(e){return(e=this.$.getElementById(e))?new CKEDITOR.dom.element(e):null},getByAddress:function(e,t){for(var n=this.$.documentElement,i=0;n&&i<e.length;i++){var o=e[i];if(t)for(var a=-1,s=0;s<n.childNodes.length;s++){var r=n.childNodes[s];if((t!==!0||3!=r.nodeType||!r.previousSibling||3!=r.previousSibling.nodeType)&&(a++,a==o)){n=r;break}}else n=n.childNodes[o]}return n?new CKEDITOR.dom.node(n):null},getElementsByTag:function(e,t){return(!CKEDITOR.env.ie||document.documentMode>8)&&t&&(e=t+":"+e),new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(e))},getHead:function(){var e=this.$.getElementsByTagName("head")[0];return e=e?new CKEDITOR.dom.element(e):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){var e=new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return e})()},write:function(e){this.$.open("text/html","replace"),CKEDITOR.env.isCustomDomain()&&(this.$.domain=document.domain),this.$.write(e),this.$.close()}}),CKEDITOR.dom.nodeList=function(e){this.$=e},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(e){return 0>e||e>=this.$.length?null:(e=this.$[e])?new CKEDITOR.dom.node(e):null}},CKEDITOR.dom.element=function(e,t){"string"==typeof e&&(e=(t?t.$:document).createElement(e)),CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.element.get=function(e){return(e="string"==typeof e?document.getElementById(e)||document.getElementsByName(e)[0]:e)&&(e.$?e:new CKEDITOR.dom.element(e))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(e,t){var n=new CKEDITOR.dom.element("div",t);return n.setHtml(e),n.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(e,t,n,i){var o=t.getCustomData("list_marker_id")||t.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),a=t.getCustomData("list_marker_names")||t.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");return e[o]=t,a[n]=1,t.setCustomData(n,i)},CKEDITOR.dom.element.clearAllMarkers=function(e){for(var t in e)CKEDITOR.dom.element.clearMarkers(e,e[t],1)},CKEDITOR.dom.element.clearMarkers=function(e,t,n){var i,o=t.getCustomData("list_marker_names"),a=t.getCustomData("list_marker_id");for(i in o)t.removeCustomData(i);t.removeCustomData("list_marker_names"),n&&(t.removeCustomData("list_marker_id"),delete e[a])},function(){function e(e){for(var n=0,i=0,o=t[e].length;o>i;i++)n+=parseInt(this.getComputedStyle(t[e][i])||0,10)||0;return n}CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:function(e){var t=this.$.className;t&&(RegExp("(?:^|\s)"+e+"(?:\s|$)","").test(t)||(t+=" "+e)),this.$.className=t||e},removeClass:function(e){var t=this.getAttribute("class");return t&&(e=RegExp("(?:^|\s+)"+e+"(?=\s|$)","i"),e.test(t)&&((t=t.replace(e,"").replace(/^s+/,""))?this.setAttribute("class",t):this.removeAttribute("class"))),this},hasClass:function(e){return RegExp("(?:^|\s+)"+e+"(?=\s|$)","").test(this.getAttribute("class"))},append:function(e,t){return"string"==typeof e&&(e=this.getDocument().createElement(e)),t?this.$.insertBefore(e.$,this.$.firstChild):this.$.appendChild(e.$),e},appendHtml:function(e){if(this.$.childNodes.length){var t=new CKEDITOR.dom.element("div",this.getDocument());t.setHtml(e),t.moveChildren(this)}else this.setHtml(e)},appendText:function(e){void 0!=this.$.text?this.$.text=this.$.text+e:this.append(new CKEDITOR.dom.text(e))},appendBogus:function(){for(var e=this.getLast();e&&e.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(e.getText());)e=e.getPrevious();e&&e.is&&e.is("br")||(e=CKEDITOR.env.opera?this.getDocument().createText(""):this.getDocument().createElement("br"),CKEDITOR.env.gecko&&e.setAttribute("type","_moz"),this.append(e))},breakParent:function(e){var t=new CKEDITOR.dom.range(this.getDocument());t.setStartAfter(this),t.setEndAfter(e),e=t.extractContents(),t.insertNode(this.remove()),e.insertAfterNode(this)},contains:CKEDITOR.env.ie||CKEDITOR.env.webkit?function(e){var t=this.$;return e.type!=CKEDITOR.NODE_ELEMENT?t.contains(e.getParent().$):t!=e.$&&t.contains(e.$)}:function(e){return!!(16&this.$.compareDocumentPosition(e.$))},focus:function(){function e(){try{this.$.focus()}catch(e){}}return function(t){t?CKEDITOR.tools.setTimeout(e,100,this):e.call(this)}}(),getHtml:function(){var e=this.$.innerHTML;return CKEDITOR.env.ie?e.replace(/<?[^>]*>/g,""):e},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<?[^>]*>/,"");var e=this.$.ownerDocument.createElement("div");return e.appendChild(this.$.cloneNode(!0)),e.innerHTML},getClientRect:function(){var e=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());return!e.width&&(e.width=e.right-e.left),!e.height&&(e.height=e.bottom-e.top),e},setHtml:function(){var e=function(e){return this.$.innerHTML=e};return CKEDITOR.env.ie&&CKEDITOR.env.version<9?function(e){try{return this.$.innerHTML=e}catch(t){this.$.innerHTML="";var n=new CKEDITOR.dom.element("body",this.getDocument());
for(
n.$.innerHTML=e,n=n.getChildren();n.count();)this.append(n.getItem(0));return e}}:e}(),setText:function(e){return CKEDITOR.dom.element.prototype.setText=void 0!=this.$.innerText?function(e){return this.$.innerText=e}:function(e){return this.$.textContent=e},this.setText(e)},getAttribute:function(){var e=function(e){return this.$.getAttribute(e,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(e){switch(e){case"class":e="className";break;case"http-equiv":e="httpEquiv";break;case"name":return this.$.name;case"tabindex":return e=this.$.getAttribute(e,2),0!==e&&0===this.$.tabIndex&&(e=null),e;case"checked":return e=this.$.attributes.getNamedItem(e),(e.specified?e.nodeValue:this.$.checked)?"checked":null;case"hspace":case"value":return this.$[e];case"style":return this.$.style.cssText;case"contenteditable":case"contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(e,2)}:e}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:CKEDITOR.env.ie?function(e){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(e)]}:function(e){var t=this.getWindow().$.getComputedStyle(this.$,null);return t?t.getPropertyValue(e):""},getDtd:function(){var e=CKEDITOR.dtd[this.getName()];return this.getDtd=function(){return e},e},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:CKEDITOR.env.ie?function(){var e=this.$.tabIndex;return 0===e&&!CKEDITOR.dtd.$tabIndex[this.getName()]&&0!==parseInt(this.getAttribute("tabindex"),10)&&(e=-1),e}:CKEDITOR.env.webkit?function(){var e=this.$.tabIndex;return void 0==e&&(e=parseInt(this.getAttribute("tabindex"),10),isNaN(e)&&(e=-1)),e}: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 e=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&!(document.documentMode>8)){var t=this.$.scopeName;"HTML"!=t&&(e=t.toLowerCase()+":"+e)}return(this.getName=function(){return e})()},getValue:function(){return this.$.value},getFirst:function(e){var t=this.$.firstChild;return(t=t&&new CKEDITOR.dom.node(t))&&e&&!e(t)&&(t=t.getNext(e)),t},getLast:function(e){var t=this.$.lastChild;return(t=t&&new CKEDITOR.dom.node(t))&&e&&!e(t)&&(t=t.getPrevious(e)),t},getStyle:function(e){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(e)]},is:function(){var e=this.getName();if("object"==typeof arguments[0])return!!arguments[0][e];for(var t=0;t<arguments.length;t++)if(arguments[t]==e)return!0;return!1},isEditable:function(e){var t=this.getName();return this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||CKEDITOR.dtd.$nonEditable[t]||CKEDITOR.dtd.$empty[t]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:e!==!1?(e=CKEDITOR.dtd[t]||CKEDITOR.dtd.span,!(!e||!e["#"])):!0},isIdentical:function(e){var t=this.clone(0,1),e=e.clone(0,1);if(t.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]),e.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]),t.$.isEqualNode)return t.$.style.cssText=CKEDITOR.tools.normalizeCssText(t.$.style.cssText),e.$.style.cssText=CKEDITOR.tools.normalizeCssText(e.$.style.cssText),t.$.isEqualNode(e.$);if(t=t.getOuterHtml(),e=e.getOuterHtml(),CKEDITOR.env.ie&&CKEDITOR.env.version<9&&this.is("a")){var n=this.getParent();n.type==CKEDITOR.NODE_ELEMENT&&(n=n.clone(),n.setHtml(t),t=n.getHtml(),n.setHtml(e),e=n.getHtml())}return t==e},isVisible:function(){var e,t,n=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility");return n&&(CKEDITOR.env.webkit||CKEDITOR.env.opera)&&(e=this.getWindow(),!e.equals(CKEDITOR.document.getWindow())&&(t=e.$.frameElement)&&(n=new CKEDITOR.dom.element(t).isVisible())),!!n},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var e=this.getChildren(),t=0,n=e.count();n>t;t++){var i=e.getItem(t);if((i.type!=CKEDITOR.NODE_ELEMENT||!i.data("cke-bookmark"))&&(i.type==CKEDITOR.NODE_ELEMENT&&!i.isEmptyInlineRemoveable()||i.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(i.getText())))return!1}return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(){for(var e=this.$.attributes,t=0;t<e.length;t++){var n=e[t];switch(n.nodeName){case"class":if(this.getAttribute("class"))return!0;case"data-cke-expando":continue;default:if(n.specified)return!0}}return!1}:function(){var e=this.$.attributes,t=e.length,n={"data-cke-expando":1,_moz_dirty:1};return t>0&&(t>2||!n[e[0].nodeName]||2==t&&!n[e[1].nodeName])},hasAttribute:function(){function e(e){return e=this.$.attributes.getNamedItem(e),!(!e||!e.specified)}return CKEDITOR.env.ie&&CKEDITOR.env.version<8?function(t){return"name"==t?!!this.$.name:e.call(this,t)}:e}(),hide:function(){this.setStyle("display","none")},moveChildren:function(e,t){var n=this.$,e=e.$;if(n!=e){var i;if(t)for(;i=n.lastChild;)e.insertBefore(n.removeChild(i),e.firstChild);else for(;i=n.firstChild;)e.appendChild(n.removeChild(i))}},mergeSiblings:function(){function e(e,t,n){if(t&&t.type==CKEDITOR.NODE_ELEMENT){for(var i=[];t.data("cke-bookmark")||t.isEmptyInlineRemoveable();)if(i.push(t),t=n?t.getNext():t.getPrevious(),!t||t.type!=CKEDITOR.NODE_ELEMENT)return;if(e.isIdentical(t)){for(var o=n?e.getLast():e.getFirst();i.length;)i.shift().move(e,!n);t.moveChildren(e,!n),t.remove(),o&&o.type==CKEDITOR.NODE_ELEMENT&&o.mergeSiblings()}}}return function(t){(t===!1||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))&&(e(this,this.getNext(),!0),e(this,this.getPrevious()))}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var e=function(e,t){return this.$.setAttribute(e,t),this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(t,n){return"class"==t?this.$.className=n:"style"==t?this.$.style.cssText=n:"tabindex"==t?this.$.tabIndex=n:"checked"==t?this.$.checked=n:"contenteditable"==t?e.call(this,"contentEditable",n):e.apply(this,arguments),this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(t,n){if("src"==t&&n.match(/^http:///))try{e.apply(this,arguments)}catch(i){}else e.apply(this,arguments);return this}:e}(),setAttributes:function(e){for(var t in e)this.setAttribute(t,e[t]);return this},setValue:function(e){return this.$.value=e,this},removeAttribute:function(){var e=function(e){this.$.removeAttribute(e)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(e){"class"==e?e="className":"tabindex"==e?e="tabIndex":"contenteditable"==e&&(e="contentEditable"),this.$.removeAttribute(e)}:e}(),removeAttributes:function(e){if(CKEDITOR.tools.isArray(e))for(var t=0;t<e.length;t++)this.removeAttribute(e[t]);else for(t in e)e.hasOwnProperty(t)&&this.removeAttribute(t)},removeStyle:function(e){var t=this.$.style;if(t.removeProperty||"border"!=e&&"margin"!=e&&"padding"!=e)t.removeProperty?t.removeProperty(e):t.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(e)),this.$.style.cssText||this.removeAttribute("style");else{var n,i=["top","left","right","bottom"];"border"==e&&(n=["color","style","width"]);for(var t=[],o=0;o<i.length;o++)if(n)for(var a=0;a<n.length;a++)t.push([e,i[o],n[a]].join("-"));else t.push([e,i[o]].join("-"));for(e=0;e<t.length;e++)this.removeStyle(t[e])}},setStyle:function(e,t){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(e)]=t,this},setStyles:function(e){for(var t in e)this.setStyle(t,e[t]);return this},setOpacity:function(e){CKEDITOR.env.ie&&CKEDITOR.env.version<9?(e=Math.round(100*e),this.setStyle("filter",e>=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+e+")")):this.setStyle("opacity",e)},unselectable:function(){if(this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none")),CKEDITOR.env.ie||CKEDITOR.env.opera){this.setAttribute("unselectable","on");for(var e,t=this.getElementsByTag("*"),n=0,i=t.count();i>n;n++)e=t.getItem(n),e.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var e=this;"html"!=e.getName();){if("static"!=e.getComputedStyle("position"))return e;e=e.getParent()}return null},getDocumentPosition:function(e){var t=0,n=0,i=this.getDocument(),o=i.getBody(),a="BackCompat"==i.$.compatMode;if(document.documentElement.getBoundingClientRect){var s=this.$.getBoundingClientRect(),r=i.$.documentElement,l=r.clientTop||o.$.clientTop||0,c=r.clientLeft||o.$.clientLeft||0,d=!0;CKEDITOR.env.ie&&(d=i.getDocumentElement().contains(this),i=i.getBody().contains(this),d=a&&i||!a&&d),d&&(t=s.left+(!a&&r.scrollLeft||o.$.scrollLeft),t-=c,n=s.top+(!a&&r.scrollTop||o.$.scrollTop),n-=l)}else for(o=this,i=null;o&&"body"!=o.getName()&&"html"!=o.getName();){for(t+=o.$.offsetLeft-o.$.scrollLeft,n+=o.$.offsetTop-o.$.scrollTop,o.equals(this)||(t+=o.$.clientLeft||0,n+=o.$.clientTop||0);i&&!i.equals(o);)t-=i.$.scrollLeft,n-=i.$.scrollTop,i=i.getParent();i=o,o=(s=o.$.offsetParent)?new CKEDITOR.dom.element(s):null}return e&&(o=this.getWindow(),i=e.getWindow(),!o.equals(i)&&o.$.frameElement&&(e=new CKEDITOR.dom.element(o.$.frameElement).getDocumentPosition(e),t+=e.x,n+=e.y)),document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||a||(t+=this.$.clientLeft?1:0,n+=this.$.clientTop?1:0),{x:t,y:n}},scrollIntoView:function(e){var t=this.getParent();if(t)do if((t.$.clientWidth&&t.$.clientWidth<t.$.scrollWidth||t.$.clientHeight&&t.$.clientHeight<t.$.scrollHeight)&&!t.is("body")&&this.scrollIntoParent(t,e,1),t.is("html")){var n=t.getWindow();try{var i=n.$.frameElement;i&&(t=new CKEDITOR.dom.element(i))}catch(o){}}while(t=t.getParent())},scrollIntoParent:function(e,t,n){function i(t,n){/body|html/.test(e.getName())?e.getWindow().$.scrollBy(t,n):(e.$.scrollLeft=e.$.scrollLeft+t,e.$.scrollTop=e.$.scrollTop+n)}function o(e,t){var n={x:0,y:0};if(!e.is(d?"body":"html")){var i=e.$.getBoundingClientRect();n.x=i.left,n.y=i.top}return i=e.getWindow(),i.equals(t)||(i=o(CKEDITOR.dom.element.get(i.$.frameElement),t),n.x=n.x+i.x,n.y=n.y+i.y),n}function a(e,t){return parseInt(e.getComputedStyle("margin-"+t)||0,10)||0}var s,r,l,c;!e&&(e=this.getWindow()),l=e.getDocument();var d="BackCompat"==l.$.compatMode;e instanceof CKEDITOR.dom.window&&(e=d?l.getBody():l.getDocumentElement()),l=e.getWindow(),r=o(this,l);var u=o(e,l),h=this.$.offsetHeight;s=this.$.offsetWidth;var f=e.$.clientHeight,m=e.$.clientWidth;l=r.x-a(this,"left")-u.x||0,c=r.y-a(this,"top")-u.y||0,s=r.x+s+a(this,"right")-(u.x+m)||0,r=r.y+h+a(this,"bottom")-(u.y+f)||0,(0>c||r>0)&&i(0,t===!0?c:t===!1?r:0>c?c:r),n&&(0>l||s>0)&&i(0>l?l:s,0)},setState:function(e,t,n){switch(t=t||"cke",e){case CKEDITOR.TRISTATE_ON:this.addClass(t+"_on"),this.removeClass(t+"_off"),this.removeClass(t+"_disabled"),n&&this.setAttribute("aria-pressed",!0),n&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(t+"_disabled"),this.removeClass(t+"_off"),this.removeClass(t+"_on"),n&&this.setAttribute("aria-disabled",!0),n&&this.removeAttribute("aria-pressed");break;default:this.addClass(t+"_off"),this.removeClass(t+"_on"),this.removeClass(t+"_disabled"),n&&this.removeAttribute("aria-pressed"),n&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var e=this.$;try{e.contentWindow.document}catch(t){e.src=e.src}return e&&new CKEDITOR.dom.document(e.contentWindow.document)},copyAttributes:function(e,t){for(var n=this.$.attributes,t=t||{},i=0;i<n.length;i++){var o,a=n[i],s=a.nodeName.toLowerCase();s in t||("checked"==s&&(o=this.getAttribute(s))?e.setAttribute(s,o):(a.specified||CKEDITOR.env.ie&&a.nodeValue&&"value"==s)&&(o=this.getAttribute(s),null===o&&(o=a.nodeValue),e.setAttribute(s,o)))}""!==this.$.style.cssText&&(e.$.style.cssText=this.$.style.cssText)},renameNode:function(e){if(this.getName()!=e){var t=this.getDocument(),e=new CKEDITOR.dom.element(e,t);this.copyAttributes(e),this.moveChildren(e),this.getParent()&&this.$.parentNode.replaceChild(e.$,this.$),e.$["data-cke-expando"]=this.$["data-cke-expando"],this.$=e.$}},getChild:function(){function e(e,t){var n=e.childNodes;return t>=0&&t<n.length?n[t]:void 0}return function(t){var n=this.$;if(t.slice)for(;t.length>0&&n;)n=e(n,t.shift());else n=e(n,t);return n?new CKEDITOR.dom.node(n):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){this.on("contextmenu",function(e){e.data.getTarget().hasClass("cke_enable_context_menu")||e.data.preventDefault()})},getDirection:function(e){return e?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(e,t){return e="data-"+e,void 0===t?this.getAttribute(e):(t===!1?this.removeAttribute(e):this.setAttribute(e,t),null)},getEditor:function(){var e,t,n=CKEDITOR.instances;for(e in n)if(t=n[e],t.element.equals(this)&&t.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return t;return null}});var t={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(t,n,i){"number"==typeof n&&(!i||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(n-=e.call(this,t)),this.setStyle(t,n+"px"))},CKEDITOR.dom.element.prototype.getSize=function(t,n){var i=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(t)],this.$["client"+CKEDITOR.tools.capitalize(t)])||0;return n&&(i-=e.call(this,t)),i}}(),CKEDITOR.dom.documentFragment=function(e){e=e||CKEDITOR.document,this.$=e.type==CKEDITOR.NODE_DOCUMENT?e.$.createDocumentFragment():e},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(e){e=e.$,e.parentNode.insertBefore(this.$,e.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 e(e,t){var n=this.range;if(this._.end)return null;if(!this._.start){if(this._.start=1,n.collapsed)return this.end(),null;n.optimize()}var i,o=n.startContainer;i=n.endContainer;var a,s=n.startOffset,r=n.endOffset,l=this.guard,c=this.type,d=e?"getPreviousSourceNode":"getNextSourceNode";if(!e&&!this._.guardLTR){var u=i.type==CKEDITOR.NODE_ELEMENT?i:i.getParent(),h=i.type==CKEDITOR.NODE_ELEMENT?i.getChild(r):i.getNext();this._.guardLTR=function(e,t){return!(t&&u.equals(e)||h&&e.equals(h)||e.type==CKEDITOR.NODE_ELEMENT&&t&&e.equals(n.root))}}if(e&&!this._.guardRTL){var f=o.type==CKEDITOR.NODE_ELEMENT?o:o.getParent(),m=o.type==CKEDITOR.NODE_ELEMENT?s?o.getChild(s-1):null:o.getPrevious();this._.guardRTL=function(e,t){return!(t&&f.equals(e)||m&&e.equals(m)||e.type==CKEDITOR.NODE_ELEMENT&&t&&e.equals(n.root))}}var p=e?this._.guardRTL:this._.guardLTR;for(a=l?function(e,t){return p(e,t)===!1?!1:l(e,t)}:p,this.current?i=this.current[d](!1,c,a):(e?i.type==CKEDITOR.NODE_ELEMENT&&(i=r>0?i.getChild(r-1):a(i,!0)===!1?null:i.getPreviousSourceNode(!0,c,a)):(i=o,i.type!=CKEDITOR.NODE_ELEMENT||(i=i.getChild(s))||(i=a(o,!0)===!1?null:o.getNextSourceNode(!0,c,a))),i&&a(i)===!1&&(i=null));i&&!this._.end;){if(this.current=i,this.evaluator&&this.evaluator(i)===!1){if(t&&this.evaluator)return!1}else if(!t)return i;i=i[d](!1,c,a)}return this.end(),this.current=null}function t(t){for(var n,i=null;n=e.call(this,t);)i=n;return i}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(e){this.range=e,this._={}},proto:{end:function(){this._.end=1},next:function(){return e.call(this)},previous:function(){return e.call(this,1)},checkForward:function(){return e.call(this,0,1)!==!1},checkBackward:function(){return e.call(this,1,1)!==!1},lastForward:function(){return t.call(this)},lastBackward:function(){return t.call(this,1)},reset:function(){delete this.current,this._={}}}});var n={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};CKEDITOR.dom.element.prototype.isBlockBoundary=function(e){return e=e?CKEDITOR.tools.extend({},CKEDITOR.dtd.$block,e||{}):CKEDITOR.dtd.$block,"none"==this.getComputedStyle("float")&&n[this.getComputedStyle("display")]||e[this.getName()]},CKEDITOR.dom.walker.blockBoundary=function(e){return function(t){return!(t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary(e))}},CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})},CKEDITOR.dom.walker.bookmark=function(e,t){function n(e){return e&&e.getName&&"span"==e.getName()&&e.data("cke-bookmark")}return function(i){var o,a;return o=i&&i.type!=CKEDITOR.NODE_ELEMENT&&(a=i.getParent())&&n(a),o=e?o:o||n(i),!!(t^o)}},CKEDITOR.dom.walker.whitespaces=function(e){return function(t){var n;return t&&t.type==CKEDITOR.NODE_TEXT&&(n=!CKEDITOR.tools.trim(t.getText())||CKEDITOR.env.webkit&&"​"==t.getText()),!!(e^n)}},CKEDITOR.dom.walker.invisible=function(e){var t=CKEDITOR.dom.walker.whitespaces();return function(n){return t(n)?n=1:(n.type==CKEDITOR.NODE_TEXT&&(n=n.getParent()),n=!n.$.offsetHeight),!!(e^n)}},CKEDITOR.dom.walker.nodeType=function(e,t){return function(n){return!!(t^n.type==e)}},CKEDITOR.dom.walker.bogus=function(e){function t(e){return!o(e)&&!a(e)}return function(n){var o=CKEDITOR.env.ie?n.getText&&i.test(n.getText()):n.is&&n.is("br");return o&&(o=n.getParent(),n=n.getNext(t),o=o.isBlockBoundary()&&(!n||n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary())),!!(e^o)}};var i=/^[trn ]*(?:&nbsp;|xa0)$/,o=CKEDITOR.dom.walker.whitespaces(),a=CKEDITOR.dom.walker.bookmark();CKEDITOR.dom.element.prototype.getBogus=function(){var e=this;do e=e.getPreviousSourceNode();while(a(e)||o(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$inline&&!(e.getName()in CKEDITOR.dtd.$empty));return e&&(CKEDITOR.env.ie?e.getText&&i.test(e.getText()):e.is&&e.is("br"))?e:!1}}(),CKEDITOR.dom.range=function(e){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null,this.collapsed=!0;var t=e instanceof CKEDITOR.dom.document;this.document=t?e:e.getDocument(),this.root=t?e.getBody():e},function(){function e(){var e=!1,t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(!0),i=CKEDITOR.dom.walker.bogus();return function(o){return n(o)||t(o)?!0:i(o)&&!e?e=!0:o.type==CKEDITOR.NODE_TEXT&&(o.hasAscendant("pre")||CKEDITOR.tools.trim(o.getText()).length)||o.type==CKEDITOR.NODE_ELEMENT&&!o.is(a)?!1:!0}}function t(e){var t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(1);return function(i){return n(i)||t(i)?!0:!e&&s(i)||i.type==CKEDITOR.NODE_ELEMENT&&i.is(CKEDITOR.dtd.$removeEmpty)}}function n(e){return!r(e)&&!l(e)}var i=function(e){e.collapsed=e.startContainer&&e.endContainer&&e.startContainer.equals(e.endContainer)&&e.startOffset==e.endOffset},o=function(e,t,n,i){e.optimizeBookmark();var o,a,s=e.startContainer,r=e.endContainer,l=e.startOffset,c=e.endOffset;r.type==CKEDITOR.NODE_TEXT?r=r.split(c):r.getChildCount()>0&&(c>=r.getChildCount()?(r=r.append(e.document.createText("")),a=!0):r=r.getChild(c)),s.type==CKEDITOR.NODE_TEXT?(s.split(l),s.equals(r)&&(r=s.getNext())):l?l>=s.getChildCount()?(s=s.append(e.document.createText("")),o=!0):s=s.getChild(l).getPrevious():(s=s.append(e.document.createText(""),1),o=!0);var d,u,h,l=s.getParents(),c=r.getParents();for(d=0;d<l.length&&(u=l[d],h=c[d],u.equals(h));d++);for(var f,m,p,g=n,E=d;E<l.length;E++){for(f=l[E],g&&!f.equals(s)&&(m=g.append(f.clone())),f=f.getNext();f&&!f.equals(c[E])&&!f.equals(r);)p=f.getNext(),2==t?g.append(f.clone(!0)):(f.remove(),1==t&&g.append(f)),f=p;g&&(g=m)}for(g=n,n=d;n<c.length;n++){if(f=c[n],t>0&&!f.equals(r)&&(m=g.append(f.clone())),!l[n]||f.$.parentNode!=l[n].$.parentNode)for(f=f.getPrevious();f&&!f.equals(l[n])&&!f.equals(s);)p=f.getPrevious(),2==t?g.$.insertBefore(f.$.cloneNode(!0),g.$.firstChild):(f.remove(),1==t&&g.$.insertBefore(f.$,g.$.firstChild)),f=p;g&&(g=m)}2==t?(u=e.startContainer,u.type==CKEDITOR.NODE_TEXT&&(u.$.data=u.$.data+u.$.nextSibling.data,u.$.parentNode.removeChild(u.$.nextSibling)),e=e.endContainer,e.type==CKEDITOR.NODE_TEXT&&e.$.nextSibling&&(e.$.data=e.$.data+e.$.nextSibling.data,e.$.parentNode.removeChild(e.$.nextSibling))):(u&&h&&(s.$.parentNode!=u.$.parentNode||r.$.parentNode!=h.$.parentNode)&&(t=h.getIndex(),o&&h.$.parentNode==s.$.parentNode&&t--,i&&u.type==CKEDITOR.NODE_ELEMENT?(i=CKEDITOR.dom.element.createFromHtml('<span data-cke-bookmark="1" style="display:none">&nbsp;</span>',e.document),i.insertAfter(u),u.mergeSiblings(!1),e.moveToBookmark({startNode:i})):e.setStart(h.getParent(),t)),e.collapse(!0)),o&&s.remove(),a&&r.$.parentNode&&r.remove()},a={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},s=CKEDITOR.dom.walker.bogus(),r=new CKEDITOR.dom.walker.whitespaces,l=new CKEDITOR.dom.walker.bookmark,c=/^[trn ]*(?:&nbsp;|xa0)$/;CKEDITOR.dom.range.prototype={clone:function(){var e=new CKEDITOR.dom.range(this.root);return e.startContainer=this.startContainer,e.startOffset=this.startOffset,e.endContainer=this.endContainer,e.endOffset=this.endOffset,e.collapsed=this.collapsed,e},collapse:function(e){e?(this.endContainer=this.startContainer,this.endOffset=this.startOffset):(this.startContainer=this.endContainer,this.startOffset=this.endOffset),this.collapsed=!0},cloneContents:function(){var e=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||o(this,2,e),e},deleteContents:function(e){this.collapsed||o(this,0,null,e)},extractContents:function(e){var t=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||o(this,1,t,e),t},createBookmark:function(e){var t,n,i,o,a=this.collapsed;return t=this.document.createElement("span"),t.data("cke-bookmark",1),t.setStyle("display","none"),t.setHtml("&nbsp;"),e&&(i="cke_bm_"+CKEDITOR.tools.getNextNumber(),t.setAttribute("id",i+(a?"C":"S"))),a||(n=t.clone(),n.setHtml("&nbsp;"),e&&n.setAttribute("id",i+"E"),o=this.clone(),o.collapse(),o.insertNode(n)),o=this.clone(),o.collapse(!0),o.insertNode(t),n?(this.setStartAfter(t),this.setEndBefore(n)):this.moveToPosition(t,CKEDITOR.POSITION_AFTER_END),{startNode:e?i+(a?"C":"S"):t,endNode:e?i+"E":n,serializable:e,collapsed:a}},createBookmark2:function(e){var t,n,i=this.startContainer,o=this.endContainer,a=this.startOffset,s=this.endOffset,r=this.collapsed;if(!i||!o)return{start:0,end:0};if(e){for(i.type==CKEDITOR.NODE_ELEMENT&&((t=i.getChild(a))&&t.type==CKEDITOR.NODE_TEXT&&a>0&&t.getPrevious().type==CKEDITOR.NODE_TEXT&&(i=t,a=0),t&&t.type==CKEDITOR.NODE_ELEMENT&&(a=t.getIndex(1)));i.type==CKEDITOR.NODE_TEXT&&(n=i.getPrevious())&&n.type==CKEDITOR.NODE_TEXT;)i=n,a+=n.getLength();if(!r)for(o.type==CKEDITOR.NODE_ELEMENT&&((t=o.getChild(s))&&t.type==CKEDITOR.NODE_TEXT&&s>0&&t.getPrevious().type==CKEDITOR.NODE_TEXT&&(o=t,s=0),t&&t.type==CKEDITOR.NODE_ELEMENT&&(s=t.getIndex(1)));o.type==CKEDITOR.NODE_TEXT&&(n=o.getPrevious())&&n.type==CKEDITOR.NODE_TEXT;)o=n,s+=n.getLength()}return{start:i.getAddress(e),end:r?null:o.getAddress(e),startOffset:a,endOffset:s,normalized:e,collapsed:r,is2:!0}},moveToBookmark:function(e){if(e.is2){var t=this.document.getByAddress(e.start,e.normalized),n=e.startOffset,i=e.end&&this.document.getByAddress(e.end,e.normalized),e=e.endOffset;this.setStart(t,n),i?this.setEnd(i,e):this.collapse(!0)}else t=(n=e.serializable)?this.document.getById(e.startNode):e.startNode,e=n?this.document.getById(e.endNode):e.endNode,this.setStartBefore(t),t.remove(),e?(this.setEndBefore(e),e.remove()):this.collapse(!0)},getBoundaryNodes:function(){var e,t=this.startContainer,n=this.endContainer,i=this.startOffset,o=this.endOffset;if(t.type==CKEDITOR.NODE_ELEMENT)if(e=t.getChildCount(),e>i)t=t.getChild(i);else if(1>e)t=t.getPreviousSourceNode();else{for(t=t.$;t.lastChild;)t=t.lastChild;t=new CKEDITOR.dom.node(t),t=t.getNextSourceNode()||t}if(n.type==CKEDITOR.NODE_ELEMENT)if(e=n.getChildCount(),e>o)n=n.getChild(o).getPreviousSourceNode(!0);else if(1>e)n=n.getPreviousSourceNode();else{for(n=n.$;n.lastChild;)n=n.lastChild;n=new CKEDITOR.dom.node(n)}return t.getPosition(n)&CKEDITOR.POSITION_FOLLOWING&&(t=n),{startNode:t,endNode:n}},getCommonAncestor:function(e,t){var n=this.startContainer,i=this.endContainer,n=n.equals(i)?e&&n.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?n.getChild(this.startOffset):n:n.getCommonAncestor(i);return t&&!n.is?n.getParent():n},optimize:function(){var e=this.startContainer,t=this.startOffset;e.type!=CKEDITOR.NODE_ELEMENT&&(t?t>=e.getLength()&&this.setStartAfter(e):this.setStartBefore(e)),e=this.endContainer,t=this.endOffset,e.type!=CKEDITOR.NODE_ELEMENT&&(t?t>=e.getLength()&&this.setEndAfter(e):this.setEndBefore(e))},optimizeBookmark:function(){var e=this.startContainer,t=this.endContainer;e.is&&e.is("span")&&e.data("cke-bookmark")&&this.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),t&&t.is&&t.is("span")&&t.data("cke-bookmark")&&this.setEndAt(t,CKEDITOR.POSITION_AFTER_END)},trim:function(e,t){var n=this.startContainer,i=this.startOffset,o=this.collapsed;if((!e||o)&&n&&n.type==CKEDITOR.NODE_TEXT){if(i)if(i>=n.getLength())i=n.getIndex()+1,n=n.getParent();else{var a=n.split(i),i=n.getIndex()+1,n=n.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(a,this.endOffset-this.startOffset):n.equals(this.endContainer)&&(this.endOffset=this.endOffset+1)}else i=n.getIndex(),n=n.getParent();if(this.setStart(n,i),o)return this.collapse(!0),void 0}n=this.endContainer,i=this.endOffset,t||o||!n||n.type!=CKEDITOR.NODE_TEXT||(i?(i>=n.getLength()||n.split(i),i=n.getIndex()+1):i=n.getIndex(),n=n.getParent(),this.setEnd(n,i))},enlarge:function(e,t){switch(e){case CKEDITOR.ENLARGE_INLINE:var n=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var i,o,a,s,r,l,c,d=this.getCommonAncestor(),u=this.root,h=!1;for(l=this.startContainer,c=this.startOffset,l.type==CKEDITOR.NODE_TEXT?(c&&(l=!CKEDITOR.tools.trim(l.substring(0,c)).length&&l,h=!!l),l&&!(s=l.getPrevious())&&(a=l.getParent())):(c&&(s=l.getChild(c-1)||l.getLast()),s||(a=l));a||s;){if(a&&!s){if(!r&&a.equals(d)&&(r=!0),n?a.isBlockBoundary():!u.contains(a))break;h&&"inline"==a.getComputedStyle("display")||(h=!1,r?i=a:this.setStartBefore(a)),s=a.getPrevious()}for(;s;)if(l=!1,s.type==CKEDITOR.NODE_COMMENT)s=s.getPrevious();else{if(s.type==CKEDITOR.NODE_TEXT)c=s.getText(),/[^sufeff]/.test(c)&&(s=null),l=/[sufeff]$/.test(c);else if((s.$.offsetWidth>0||t&&s.is("br"))&&!s.data("cke-bookmark"))if(h&&CKEDITOR.dtd.$removeEmpty[s.getName()]){if(c=s.getText(),/[^sufeff]/.test(c))s=null;else for(var f,m=s.$.getElementsByTagName("*"),p=0;f=m[p++];)if(!CKEDITOR.dtd.$removeEmpty[f.nodeName.toLowerCase()]){s=null;break}s&&(l=!!c.length)}else s=null;if(l&&(h?r?i=a:a&&this.setStartBefore(a):h=!0),s){if(l=s.getPrevious(),!a&&!l){a=s,s=null;break}s=l}else a=null}a&&(a=a.getParent())}for(l=this.endContainer,c=this.endOffset,a=s=null,r=h=!1,l.type==CKEDITOR.NODE_TEXT?(l=!CKEDITOR.tools.trim(l.substring(c)).length&&l,h=!(l&&l.getLength()),l&&!(s=l.getNext())&&(a=l.getParent())):(s=l.getChild(c))||(a=l);a||s;){if(a&&!s){if(!r&&a.equals(d)&&(r=!0),n?a.isBlockBoundary():!u.contains(a))break;h&&"inline"==a.getComputedStyle("display")||(h=!1,r?o=a:a&&this.setEndAfter(a)),s=a.getNext()}for(;s;){if(l=!1,s.type==CKEDITOR.NODE_TEXT)c=s.getText(),/[^sufeff]/.test(c)&&(s=null),l=/^[sufeff]/.test(c);else if(s.type==CKEDITOR.NODE_ELEMENT){if((s.$.offsetWidth>0||t&&s.is("br"))&&!s.data("cke-bookmark"))if(h&&CKEDITOR.dtd.$removeEmpty[s.getName()]){if(c=s.getText(),/[^sufeff]/.test(c))s=null;else for(m=s.$.getElementsByTagName("*"),p=0;f=m[p++];)if(!CKEDITOR.dtd.$removeEmpty[f.nodeName.toLowerCase()]){s=null;break}s&&(l=!!c.length)}else s=null}else l=1;if(l&&h&&(r?o=a:this.setEndAfter(a)),s){if(l=s.getNext(),!a&&!l){a=s,s=null;break}s=l}else a=null}a&&(a=a.getParent())}i&&o&&(d=i.contains(o)?o:i,this.setStartBefore(d),this.setEndAfter(d));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:a=new CKEDITOR.dom.range(this.root),u=this.root,a.setStartAt(u,CKEDITOR.POSITION_AFTER_START),a.setEnd(this.startContainer,this.startOffset),a=new CKEDITOR.dom.walker(a);var g,E,v=CKEDITOR.dom.walker.blockBoundary(e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),T=function(e){var t=v(e);return t||(g=e),t},n=function(e){var t=T(e);return!t&&e.is&&e.is("br")&&(E=e),t};if(a.guard=T,a=a.lastBackward(),g=g||u,this.setStartAt(g,!g.is("br")&&(!a&&this.checkStartOfBlock()||a&&g.contains(a))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END),e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){a=this.clone(),a=new CKEDITOR.dom.walker(a);var C=CKEDITOR.dom.walker.whitespaces(),I=CKEDITOR.dom.walker.bookmark();if(a.evaluator=function(e){return!C(e)&&!I(e)},(a=a.previous())&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("br"))break}a=this.clone(),a.collapse(),a.setEndAt(u,CKEDITOR.POSITION_BEFORE_END),a=new CKEDITOR.dom.walker(a),a.guard=e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?n:T,g=null,a=a.lastForward(),g=g||u,this.setEndAt(g,!a&&this.checkEndOfBlock()||a&&g.contains(a)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START),E&&this.setEndAfter(E)}},shrink:function(e,t,n){if(!this.collapsed){var e=e||CKEDITOR.SHRINK_TEXT,i=this.clone(),o=this.startContainer,a=this.endContainer,s=this.startOffset,r=this.endOffset,l=1,c=1;o&&o.type==CKEDITOR.NODE_TEXT&&(s?s>=o.getLength()?i.setStartAfter(o):(i.setStartBefore(o),l=0):i.setStartBefore(o)),a&&a.type==CKEDITOR.NODE_TEXT&&(r?r>=a.getLength()?i.setEndAfter(a):(i.setEndAfter(a),c=0):i.setEndBefore(a));var i=new CKEDITOR.dom.walker(i),d=CKEDITOR.dom.walker.bookmark();i.evaluator=function(t){return t.type==(e==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var u;return i.guard=function(t,i){return d(t)?!0:e==CKEDITOR.SHRINK_ELEMENT&&t.type==CKEDITOR.NODE_TEXT||i&&t.equals(u)||n===!1&&t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary()?!1:(!i&&t.type==CKEDITOR.NODE_ELEMENT&&(u=t),!0)},l&&(o=i[e==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(o,t?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START),c&&(i.reset(),(i=i[e==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(i,t?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)),!(!l&&!c)}},insertNode:function(e){this.optimizeBookmark(),this.trim(!1,!0);var t=this.startContainer,n=t.getChild(this.startOffset);n?e.insertBefore(n):t.append(e),e.getParent()&&e.getParent().equals(this.endContainer)&&this.endOffset++,this.setStartBefore(e)},moveToPosition:function(e,t){this.setStartAt(e,t),this.collapse(!0)},moveToRange:function(e){this.setStart(e.startContainer,e.startOffset),this.setEnd(e.endContainer,e.endOffset)},selectNodeContents:function(e){this.setStart(e,0),this.setEnd(e,e.type==CKEDITOR.NODE_TEXT?e.getLength():e.getChildCount())},setStart:function(e,t){e.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[e.getName()]&&(t=e.getIndex(),e=e.getParent()),this.startContainer=e,this.startOffset=t,this.endContainer||(this.endContainer=e,this.endOffset=t),i(this)},setEnd:function(e,t){e.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[e.getName()]&&(t=e.getIndex()+1,e=e.getParent()),this.endContainer=e,this.endOffset=t,this.startContainer||(this.startContainer=e,this.startOffset=t),i(this)},setStartAfter:function(e){this.setStart(e.getParent(),e.getIndex()+1)},setStartBefore:function(e){this.setStart(e.getParent(),e.getIndex())},setEndAfter:function(e){this.setEnd(e.getParent(),e.getIndex()+1)},setEndBefore:function(e){this.setEnd(e.getParent(),e.getIndex())
},setStartAt:function(e,t){switch(t){case CKEDITOR.POSITION_AFTER_START:this.setStart(e,0);break;case CKEDITOR.POSITION_BEFORE_END:e.type==CKEDITOR.NODE_TEXT?this.setStart(e,e.getLength()):this.setStart(e,e.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(e);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(e)}i(this)},setEndAt:function(e,t){switch(t){case CKEDITOR.POSITION_AFTER_START:this.setEnd(e,0);break;case CKEDITOR.POSITION_BEFORE_END:e.type==CKEDITOR.NODE_TEXT?this.setEnd(e,e.getLength()):this.setEnd(e,e.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(e);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(e)}i(this)},fixBlock:function(e,t){var n=this.createBookmark(),i=this.document.createElement(t);return this.collapse(e),this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),this.extractContents().appendTo(i),i.trim(),CKEDITOR.env.ie||i.appendBogus(),this.insertNode(i),this.moveToBookmark(n),i},splitBlock:function(e){var t=new CKEDITOR.dom.elementPath(this.startContainer,this.root),n=new CKEDITOR.dom.elementPath(this.endContainer,this.root),i=t.block,o=n.block,a=null;return t.blockLimit.equals(n.blockLimit)?("br"!=e&&(i||(i=this.fixBlock(!0,e),o=new CKEDITOR.dom.elementPath(this.endContainer,this.root).block),o||(o=this.fixBlock(!1,e))),e=i&&this.checkStartOfBlock(),t=o&&this.checkEndOfBlock(),this.deleteContents(),i&&i.equals(o)&&(t?(a=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(o,CKEDITOR.POSITION_AFTER_END),o=null):e?(a=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(i,CKEDITOR.POSITION_BEFORE_START),i=null):(o=this.splitElement(i),!CKEDITOR.env.ie&&!i.is("ul","ol")&&i.appendBogus())),{previousBlock:i,nextBlock:o,wasStartOfBlock:e,wasEndOfBlock:t,elementPath:a}):null},splitElement:function(e){if(!this.collapsed)return null;this.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);var t=this.extractContents(),n=e.clone(!1);return t.appendTo(n),n.insertAfter(e),this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END),n},removeEmptyBlocksAtEnd:function(){function e(e){return function(i){return t(i)||n(i)||i.type==CKEDITOR.NODE_ELEMENT&&i.isEmptyInlineRemoveable()||e.is("table")&&i.is("caption")?!1:!0}}var t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(!1);return function(t){for(var n,i=this.createBookmark(),o=this[t?"endPath":"startPath"](),a=o.block||o.blockLimit;a&&!a.equals(o.root)&&!a.getFirst(e(a));)n=a.getParent(),this[t?"setEndAt":"setStartAt"](a,CKEDITOR.POSITION_AFTER_END),a.remove(1),a=n;this.moveToBookmark(i)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(e,n){var i=n==CKEDITOR.START,o=this.clone();return o.collapse(i),o[i?"setStartAt":"setEndAt"](e,i?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),o=new CKEDITOR.dom.walker(o),o.evaluator=t(i),o[i?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var t=this.startContainer,n=this.startOffset;return CKEDITOR.env.ie&&n&&t.type==CKEDITOR.NODE_TEXT&&(t=CKEDITOR.tools.ltrim(t.substring(0,n)),c.test(t)&&this.trim(0,1)),this.trim(),t=new CKEDITOR.dom.elementPath(this.startContainer,this.root),n=this.clone(),n.collapse(!0),n.setStartAt(t.block||t.blockLimit,CKEDITOR.POSITION_AFTER_START),t=new CKEDITOR.dom.walker(n),t.evaluator=e(),t.checkBackward()},checkEndOfBlock:function(){var t=this.endContainer,n=this.endOffset;return CKEDITOR.env.ie&&t.type==CKEDITOR.NODE_TEXT&&(t=CKEDITOR.tools.rtrim(t.substring(n)),c.test(t)&&this.trim(1,0)),this.trim(),t=new CKEDITOR.dom.elementPath(this.endContainer,this.root),n=this.clone(),n.collapse(!1),n.setEndAt(t.block||t.blockLimit,CKEDITOR.POSITION_BEFORE_END),t=new CKEDITOR.dom.walker(n),t.evaluator=e(),t.checkForward()},getPreviousNode:function(e,t,n){var i=this.clone();return i.collapse(1),i.setStartAt(n||this.root,CKEDITOR.POSITION_AFTER_START),n=new CKEDITOR.dom.walker(i),n.evaluator=e,n.guard=t,n.previous()},getNextNode:function(e,t,n){var i=this.clone();return i.collapse(),i.setEndAt(n||this.root,CKEDITOR.POSITION_BEFORE_END),n=new CKEDITOR.dom.walker(i),n.evaluator=e,n.guard=t,n.next()},checkReadOnly:function(){function e(e,t){for(;e;){if(e.type==CKEDITOR.NODE_ELEMENT){if("false"==e.getAttribute("contentEditable")&&!e.data("cke-editable"))return 0;if(e.is("html")||"true"==e.getAttribute("contentEditable")&&(e.contains(t)||e.equals(t)))break}e=e.getParent()}return 1}return function(){var t=this.startContainer,n=this.endContainer;return!(e(t,n)&&e(n,t))}}(),moveToElementEditablePosition:function(e,t){if(e.type==CKEDITOR.NODE_ELEMENT&&!e.isEditable(!1))return this.moveToPosition(e,t?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var i=0;e;){if(e.type==CKEDITOR.NODE_TEXT){t&&this.checkEndOfBlock()&&c.test(e.getText())?this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(e,t?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),i=1;break}e.type==CKEDITOR.NODE_ELEMENT&&(e.isEditable()?(this.moveToPosition(e,t?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),i=1):t&&e.is("br")&&this.checkEndOfBlock()&&this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START));var o=e,a=i,s=void 0;o.type==CKEDITOR.NODE_ELEMENT&&o.isEditable(!1)&&(s=o[t?"getLast":"getFirst"](n)),!a&&!s&&(s=o[t?"getPrevious":"getNext"](n)),e=s}return!!i},moveToElementEditStart:function(e){return this.moveToElementEditablePosition(e)},moveToElementEditEnd:function(e){return this.moveToElementEditablePosition(e,!0)},getEnclosedNode:function(){var e=this.clone();if(e.optimize(),e.startContainer.type!=CKEDITOR.NODE_ELEMENT||e.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var e=new CKEDITOR.dom.walker(e),t=CKEDITOR.dom.walker.bookmark(!1,!0),n=CKEDITOR.dom.walker.whitespaces(!0);e.evaluator=function(e){return n(e)&&t(e)};var i=e.next();return e.reset(),i&&i.equals(e.previous())?i:null},getTouchedStartNode:function(){var e=this.startContainer;return this.collapsed||e.type!=CKEDITOR.NODE_ELEMENT?e:e.getChild(this.startOffset)||e},getTouchedEndNode:function(){var e=this.endContainer;return this.collapsed||e.type!=CKEDITOR.NODE_ELEMENT?e:e.getChild(this.endOffset-1)||e},scrollIntoView:function(){var e,t,n,i=new CKEDITOR.dom.element.createFromHtml("<span>&nbsp;</span>",this.document),o=this.clone();o.optimize(),(n=o.startContainer.type==CKEDITOR.NODE_TEXT)?(t=o.startContainer.getText(),e=o.startContainer.split(o.startOffset),i.insertAfter(o.startContainer)):o.insertNode(i),i.scrollIntoView(),n&&(o.startContainer.setText(t),e.remove()),i.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,function(){function e(e){arguments.length<1||(this.range=e,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function t(e,t,n){for(e=e.getNextSourceNode(t,null,n);!i(e);)e=e.getNextSourceNode(t,null,n);return e}var n=/^[rnt ]+$/,i=CKEDITOR.dom.walker.bookmark(!1,!0),o=CKEDITOR.dom.walker.whitespaces(!0),a=function(e){return i(e)&&o(e)};e.prototype={getNextParagraph:function(e){if(e=e||"p",!CKEDITOR.dtd[this.range.root.getName()][e])return null;var o,s,r,l,c,d;if(!this._.started){if(s=this.range.clone(),s.shrink(CKEDITOR.NODE_ELEMENT,!0),l=s.endContainer.hasAscendant("pre",!0)||s.startContainer.hasAscendant("pre",!0),s.enlarge(this.forceBrBreak&&!l||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS),!s.collapsed){l=new CKEDITOR.dom.walker(s.clone());var u=CKEDITOR.dom.walker.bookmark(!0,!0);l.evaluator=u,this._.nextNode=l.next(),l=new CKEDITOR.dom.walker(s.clone()),l.evaluator=u,l=l.previous(),this._.lastNode=l.getNextSourceNode(!0),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(u=this.range.clone(),u.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),u.checkEndOfBlock()&&(u=new CKEDITOR.dom.elementPath(u.endContainer,u.root),this._.lastNode=(u.block||u.blockLimit).getNextSourceNode(!0))),this._.lastNode||(this._.lastNode=this._.docEndMarker=s.document.createText(""),this._.lastNode.insertAfter(l)),s=null}this._.started=1}for(u=this._.nextNode,l=this._.lastNode,this._.nextNode=null;u;){var h=0,f=u.hasAscendant("pre"),m=u.type!=CKEDITOR.NODE_ELEMENT,p=0;if(m)u.type==CKEDITOR.NODE_TEXT&&n.test(u.getText())&&(m=0);else{var g=u.getName();if(u.isBlockBoundary(this.forceBrBreak&&!f&&{br:1})){if("br"==g)m=1;else if(!s&&!u.getChildCount()&&"hr"!=g){o=u,r=u.equals(l);break}s&&(s.setEndAt(u,CKEDITOR.POSITION_BEFORE_START),"br"!=g&&(this._.nextNode=u)),h=1}else{if(u.getFirst()){s||(s=this.range.clone(),s.setStartAt(u,CKEDITOR.POSITION_BEFORE_START)),u=u.getFirst();continue}m=1}}if(m&&!s&&(s=this.range.clone(),s.setStartAt(u,CKEDITOR.POSITION_BEFORE_START)),r=(!h||m)&&u.equals(l),s&&!h)for(;!u.getNext(a)&&!r;){if(g=u.getParent(),g.isBlockBoundary(this.forceBrBreak&&!f&&{br:1})){h=1,m=0,r||g.equals(l),s.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);break}u=g,m=1,r=u.equals(l),p=1}if(m&&s.setEndAt(u,CKEDITOR.POSITION_AFTER_END),u=t(u,p,l),(r=!u)||h&&s)break}if(!o){if(!s)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;o=new CKEDITOR.dom.elementPath(s.startContainer,s.root),u=o.blockLimit,h={div:1,th:1,td:1},o=o.block,!o&&u&&!this.enforceRealBlocks&&h[u.getName()]&&s.checkStartOfBlock()&&s.checkEndOfBlock()&&!u.equals(s.root)?o=u:!o||this.enforceRealBlocks&&"li"==o.getName()?(o=this.range.document.createElement(e),s.extractContents().appendTo(o),o.trim(),s.insertNode(o),c=d=!0):"li"!=o.getName()?s.checkStartOfBlock()&&s.checkEndOfBlock()||(o=o.clone(!1),s.extractContents().appendTo(o),o.trim(),d=s.splitBlock(),c=!d.wasStartOfBlock,d=!d.wasEndOfBlock,s.insertNode(o)):r||(this._.nextNode=o.equals(l)?null:t(s.getBoundaryNodes().endNode,1,l))}return c&&(s=o.getPrevious())&&s.type==CKEDITOR.NODE_ELEMENT&&("br"==s.getName()?s.remove():s.getLast()&&"br"==s.getLast().$.nodeName.toLowerCase()&&s.getLast().remove()),d&&(s=o.getLast())&&s.type==CKEDITOR.NODE_ELEMENT&&"br"==s.getName()&&(CKEDITOR.env.ie||s.getPrevious(i)||s.getNext(i))&&s.remove(),this._.nextNode||(this._.nextNode=r||o.equals(l)||!l?null:t(o,1,l)),o}},CKEDITOR.dom.range.prototype.createIterator=function(){return new e(this)}}(),CKEDITOR.command=function(e,t){this.uiItems=[],this.exec=function(n){return this.state==CKEDITOR.TRISTATE_DISABLED?!1:(this.editorFocus&&e.focus(),this.fire("exec")===!1?!0:t.exec.call(this,e,n)!==!1)},this.refresh=function(e,n){return!this.readOnly&&e.readOnly?!0:this.context&&!n.isContextFor(this.context)?(this.disable(),!0):(this.enable(),this.fire("refresh",{editor:e,path:n})===!1?!0:t.refresh&&t.refresh.apply(this,arguments)!==!1)},CKEDITOR.tools.extend(this,t,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!t.context,state:CKEDITOR.TRISTATE_OFF}),CKEDITOR.event.call(this)},CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(e){return this.state==e?!1:(this.previousState=this.state,this.state=e,this.fire("state"),!0)},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype),CKEDITOR.ENTER_P=1,CKEDITOR.ENTER_BR=2,CKEDITOR.ENTER_DIV=3,CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"<!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(){CKEDITOR.focusManager=function(e){return e.focusManager?e.focusManager:(this.hasFocus=!1,this.currentActive=null,this._={editor:e},this)},CKEDITOR.focusManager._={blurDelay:200},CKEDITOR.focusManager.prototype={focus:function(){if(this._.timer&&clearTimeout(this._.timer),!this.hasFocus&&!this._.locked){var e=CKEDITOR.currentInstance;e&&e.focusManager.blur(1),this.hasFocus=!0,(e=this._.editor.container)&&e.addClass("cke_focus"),this._.editor.fire("focus")}},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(e){function t(){if(this.hasFocus){this.hasFocus=!1;var e=this._.editor.container;e&&e.removeClass("cke_focus"),this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var n=CKEDITOR.focusManager._.blurDelay;e||!n?t.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer,t.call(this)},n,this)}},add:function(e,t){var n=e.getCustomData("focusmanager");if(!n||n!=this){n&&n.remove(e);var n="focus",i="blur";t&&(CKEDITOR.env.ie?(n="focusin",i="focusout"):CKEDITOR.event.useCapture=1);var o={blur:function(){e.equals(this.currentActive)&&this.blur()},focus:function(){this.currentActive=e,this.focus()}};e.on(n,o.focus,this),e.on(i,o.blur,this),t&&(CKEDITOR.event.useCapture=0),e.setCustomData("focusmanager",this),e.setCustomData("focusmanager_handlers",o)}},remove:function(e){e.removeCustomData("focusmanager");var t=e.removeCustomData("focusmanager_handlers");e.removeListener("blur",t.blur),e.removeListener("focus",t.focus)}}}(),CKEDITOR.keystrokeHandler=function(e){return e.keystrokeHandler?e.keystrokeHandler:(this.keystrokes={},this.blockedKeystrokes={},this._={editor:e},this)},function(){var e,t=function(t){var t=t.data,n=t.getKeystroke(),i=this.keystrokes[n],o=this._.editor;return e=o.fire("key",{keyCode:n})===!1,e||(i&&(e=o.execCommand(i,{from:"keystrokeHandler"})!==!1),e||(e=!!this.blockedKeystrokes[n])),e&&t.preventDefault(!0),!e},n=function(t){e&&(e=!1,t.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(e){e.on("keydown",t,this),(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)&&e.on("keypress",n,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,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,sk:1,sl:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,uk:1,vi:1,"zh-cn":1,zh:1},load:function(e,t,n){e&&CKEDITOR.lang.languages[e]||(e=this.detect(t,e)),this[e]?n(e,this[e]):CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+e+".js"),function(){n(e,this[e])},this)},detect:function(e,t){var n=this.languages,t=t||navigator.userLanguage||navigator.language||e,i=t.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),o=i[1],i=i[2];return n[o+"-"+i]?o=o+"-"+i:n[o]||(o=null),CKEDITOR.lang.detect=o?function(){return o}:function(e){return e},o||e}}}(),CKEDITOR.scriptLoader=function(){var e={},t={};return{load:function(n,i,o,a){var s="string"==typeof n;s&&(n=[n]),o||(o=CKEDITOR);var r=n.length,l=[],c=[],d=function(e){i&&(s?i.call(o,e):i.call(o,l,c))};if(0===r)d(!0);else{var u=function(e,t){(t?l:c).push(e),--r<=0&&(a&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),d(t))},h=function(n,i){e[n]=1;var o=t[n];delete t[n];for(var a=0;a<o.length;a++)o[a](n,i)},f=function(n){if(e[n])u(n,!0);else{var o=t[n]||(t[n]=[]);if(o.push(u),!(o.length>1)){var a=new CKEDITOR.dom.element("script");a.setAttributes({type:"text/javascript",src:n}),i&&(CKEDITOR.env.ie?a.$.onreadystatechange=function(){("loaded"==a.$.readyState||"complete"==a.$.readyState)&&(a.$.onreadystatechange=null,h(n,!0))}:(a.$.onload=function(){setTimeout(function(){h(n,!0)},0)},a.$.onerror=function(){h(n,!1)})),a.appendTo(CKEDITOR.document.getHead())}}};a&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var m=0;r>m;m++)f(n[m])}}}}(),CKEDITOR.resourceManager=function(e,t){this.basePath=e,this.fileName=t,this.registered={},this.loaded={},this.externals={},this._={waitingList:{}}},CKEDITOR.resourceManager.prototype={add:function(e,t){if(this.registered[e])throw'[CKEDITOR.resourceManager.add] The resource name "'+e+'" is already registered.';var n=this.registered[e]=t||{};return n.name=e,n.path=this.getPath(e),CKEDITOR.fire(e+CKEDITOR.tools.capitalize(this.fileName)+"Ready",n),this.get(e)},get:function(e){return this.registered[e]||null},getPath:function(e){var t=this.externals[e];return CKEDITOR.getUrl(t&&t.dir||this.basePath+e+"/")},getFilePath:function(e){var t=this.externals[e];return CKEDITOR.getUrl(this.getPath(e)+(t&&"string"==typeof t.file?t.file:this.fileName+".js"))},addExternal:function(e,t,n){for(var e=e.split(","),i=0;i<e.length;i++)this.externals[e[i]]={dir:t,file:n}},load:function(e,t,n){CKEDITOR.tools.isArray(e)||(e=e?[e]:[]);for(var i=this.loaded,o=this.registered,a=[],s={},r={},l=0;l<e.length;l++){var c=e[l];if(c)if(i[c]||o[c])r[c]=this.get(c);else{var d=this.getFilePath(c);a.push(d),d in s||(s[d]=[]),s[d].push(c)}}CKEDITOR.scriptLoader.load(a,function(e,o){if(o.length)throw'[CKEDITOR.resourceManager.load] Resource name "'+s[o[0]].join(",")+'" was not found at "'+o[0]+'".';for(var a=0;a<e.length;a++)for(var l=s[e[a]],c=0;c<l.length;c++){var d=l[c];r[d]=this.get(d),i[d]=1}t.call(n,r)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(e){var t={};return function(n,i,o){var a={},s=function(n){e.call(this,n,function(e){CKEDITOR.tools.extend(a,e);var n,r=[];for(n in e){var l=e[n],c=l&&l.requires;if(!t[n]){if(l.icons)for(var d=l.icons.split(","),u=0;u<d.length;u++)CKEDITOR.skin.addIcon(d[u],l.path+"icons/"+d[u]+".png");t[n]=1}if(c)for(c.split&&(c=c.split(",")),l=0;l<c.length;l++)a[c[l]]||r.push(c[l])}if(r.length)s.call(this,r);else{for(n in a)l=a[n],l.onLoad&&!l.onLoad._called&&(l.onLoad()===!1&&delete a[n],l.onLoad._called=1);i&&i.call(o||window,a)}},this)};s.call(this,n)}}),CKEDITOR.plugins.setLang=function(e,t,n){var i=this.get(e),e=i.langEntries||(i.langEntries={}),i=i.lang||(i.lang=[]);i.split&&(i=i.split(",")),-1==CKEDITOR.tools.indexOf(i,t)&&i.push(t),e[t]=n},CKEDITOR.ui=function(e){return e.ui?e.ui:(this.items={},this.instances={},this.editor=e,this._={handlers:{}},this)},CKEDITOR.ui.prototype={add:function(e,t,n){n.name=e.toLowerCase();var i=this.items[e]={type:t,command:n.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(i,n)},get:function(e){return this.instances[e]},create:function(e){var t=this.items[e],n=t&&this._.handlers[t.type],i=t&&t.command&&this.editor.getCommand(t.command),n=n&&n.create.apply(this,t.args);return this.instances[e]=n,i&&i.uiItems.push(n),n&&!n.type&&(n.type=t.type),n},addHandler:function(e,t){this._.handlers[e]=t},space:function(e){return CKEDITOR.document.getById(this.spaceId(e))},spaceId:function(e){return this.editor.id+"_"+e}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function e(e,o,s){if(CKEDITOR.event.call(this),e=e&&CKEDITOR.tools.clone(e),void 0!==o){if(!(instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!s)throw Error("One of the element mode must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&s==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(s==CKEDITOR.ELEMENT_MODE_INLINE&&!o.is(CKEDITOR.dtd.$editable)||s==CKEDITOR.ELEMENT_MODE_REPLACE&&o.is(CKEDITOR.dtd.$nonBodyContent))throw Error('The specified element mode is not supported on element: "'+o.getName()+'".');this.element=o,this.elementMode=s,this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(o.getId()||o.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={},this.commands={},this.templates={},this.name=this.name||t(),this.id=CKEDITOR.tools.getNextId(),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("mode",n),this.on("readOnly",n),this.on("selectionChange",i),this.on("instanceReady",function(){this.config.startupFocus&&this.focus()}),CKEDITOR.fire("instanceCreated",null,this),CKEDITOR.add(this),CKEDITOR.tools.setTimeout(function(){a(this,e)},0,this)}function t(){do var e="editor"+ ++d;while(CKEDITOR.instances[e]);return e}function n(){var e,t=this.commands,n=this.mode;if(n)for(var i in t)e=t[i],e[e.startDisabled?"disable":this.readOnly&&!e.readOnly?"disable":e.modes[n]?"enable":"disable"]()}function i(e){var t,n=this.commands,i=e.editor,o=e.data.path;for(t in n)e=n[t],e.contextSensitive&&e.refresh(i,o)}function o(e){var t=e.config.customConfig;if(!t)return!1;var t=CKEDITOR.getUrl(t),n=u[t]||(u[t]={});return n.fn?(n.fn.call(e,e.config),(CKEDITOR.getUrl(e.config.customConfig)==t||!o(e))&&e.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.load(t,function(){n.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){},o(e)}),!0}function a(e,t){e.on("customConfigLoaded",function(){if(t){if(t.on)for(var n in t.on)e.on(n,t.on[n]);CKEDITOR.tools.extend(e.config,t,!0),delete e.config.on}e.readOnly=!(!e.config.readOnly&&!(e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?e.element.isReadOnly():e.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&e.element.getAttribute("disabled"))),e.blockless=e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&!CKEDITOR.dtd[e.element.getName()].p,e.tabIndex=e.config.tabIndex||e.element&&e.element.getAttribute("tabindex")||0,e.config.skin&&(CKEDITOR.skinName=e.config.skin),e.fireOnce("configLoaded"),e.dataProcessor=new CKEDITOR.htmlDataProcessor(e),s(e)}),t&&void 0!=t.customConfig&&(e.config.customConfig=t.customConfig),o(e)||e.fireOnce("customConfigLoaded")}function s(e){CKEDITOR.skin.loadPart("editor",function(){r(e)})}function r(e){CKEDITOR.lang.load(e.config.language,e.config.defaultLanguage,function(t,n){e.langCode=t,e.lang=CKEDITOR.tools.prototypedCopy(n),CKEDITOR.env.gecko&&CKEDITOR.env.version<10900&&"rtl"==e.lang.dir&&(e.lang.dir="ltr"),e.config.contentsLangDirection||(e.config.contentsLangDirection=e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?e.element.getDirection(1):e.lang.dir),e.fire("langLoaded"),l(e)})}function l(e){var t=e.config,n=t.plugins,i=t.extraPlugins,o=t.removePlugins;if(i)var a=RegExp("(?:^|,)(?:"+i.replace(/s*,s*/g,"|")+")(?=,|$)","g"),n=n.replace(a,""),n=n+(","+i);if(o)var s=RegExp("(?:^|,)(?:"+o.replace(/s*,s*/g,"|")+")(?=,|$)","g"),n=n.replace(s,"");CKEDITOR.env.air&&(n+=",adobeair"),CKEDITOR.plugins.load(n.split(","),function(n){var i=[],o=[],a=[];e.plugins=n;for(var r in n){var l,c=n[r],d=c.lang,u=null,h=c.requires;if(CKEDITOR.tools.isArray(h)&&(h=h.join(",")),h&&(l=h.match(s)))for(;h=l.pop();)CKEDITOR.tools.setTimeout(function(e,t){throw Error('Plugin "'+e.replace(",","")+'" cannot be removed from the plugins list, because it's required by "'+t+'" plugin.')},0,null,[h,r]);d&&!e.lang[r]&&(d.split&&(d=d.split(",")),CKEDITOR.tools.indexOf(d,e.langCode)>=0?u=e.langCode:(u=e.langCode.replace(/-.*/,""),u=u!=e.langCode&&CKEDITOR.tools.indexOf(d,u)>=0?u:CKEDITOR.tools.indexOf(d,"en")>=0?"en":d[0]),c.langEntries&&c.langEntries[u]?(e.lang[r]=c.langEntries[u],u=null):a.push(CKEDITOR.getUrl(c.path+"lang/"+u+".js"))),o.push(u),i.push(c)}CKEDITOR.scriptLoader.load(a,function(){for(var n=["beforeInit","init","afterInit"],a=0;a<n.length;a++)for(var s=0;s<i.length;s++){var r=i[s];0===a&&o[s]&&r.lang&&r.langEntries&&(e.lang[r.name]=r.langEntries[o[s]]),r[n[a]]&&r[n[a]](e)}for(e.fireOnce("pluginsLoaded"),t.keystrokes&&e.setKeystroke(e.config.keystrokes),s=0;s<e.config.blockedKeystrokes.length;s++)e.keystrokeHandler.blockedKeystrokes[e.config.blockedKeystrokes[s]]=1;e.fireOnce("loaded"),CKEDITOR.fire("instanceLoaded",null,e)})})}function c(){var e=this.element;if(e&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var t=this.getData();return this.config.htmlEncodeOutput&&(t=CKEDITOR.tools.htmlEncode(t)),e.is("textarea")?e.setValue(t):e.setHtml(t),!0}return!1}e.prototype=CKEDITOR.editor.prototype,CKEDITOR.editor=e;var d=0,u={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(e,t){return this.commands[e]=new CKEDITOR.command(this,t)},destroy:function(e){this.fire("beforeDestroy"),!e&&c.call(this),this.editable(null),this.fire("destroy"),this.removeAllListeners(),CKEDITOR.remove(this),CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(e){return(e=e||this.getSelection().getStartElement())?new CKEDITOR.dom.elementPath(e,this.editable()):null},createRange:function(){var e=this.editable();return e?new CKEDITOR.dom.range(e):null},execCommand:function(e,t){var n=this.getCommand(e),i={name:e,commandData:t,command:n};return n&&n.state!=CKEDITOR.TRISTATE_DISABLED&&this.fire("beforeCommandExec",i)!==!0&&(i.returnValue=n.exec(i.commandData),!n.async&&this.fire("afterCommandExec",i)!==!0)?i.returnValue:!1},getCommand:function(e){return this.commands[e]},getData:function(e){!e&&this.fire("beforeGetData");var t=this._.data;return"string"!=typeof t&&(t=(t=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?t.is("textarea")?t.getValue():t.getHtml():""),t={dataValue:t},!e&&this.fire("getData",t),t.dataValue},getSnapshot:function(){var e=this.fire("getSnapshot");if("string"!=typeof e){var t=this.element;t&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(e=t.is("textarea")?t.getValue():t.getHtml())}return e},loadSnapshot:function(e){this.fire("loadSnapshot",e)},setData:function(e,t,n){t&&this.on("dataReady",function(e){e.removeListener(),t.call(e.editor)}),e={dataValue:e},!n&&this.fire("setData",e),this._.data=e.dataValue,!n&&this.fire("afterSetData",e)},setReadOnly:function(e){e=void 0==e||e,this.readOnly!=e&&(this.readOnly=e,this.editable().setReadOnly(e),this.fire("readOnly"))},insertHtml:function(e,t){this.fire("insertHtml",{dataValue:e,mode:t})},insertText:function(e){this.fire("insertText",e)},insertElement:function(e){this.fire("insertElement",e)},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return c.call(this)},setKeystroke:function(){for(var e,t,n=this.keystrokeHandler.keystrokes,i=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],o=i.length;o--;)e=i[o],t=0,CKEDITOR.tools.isArray(e)&&(t=e[1],e=e[0]),t?n[e]=t:delete n[e]}})}(),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 e=/([w-:.]+)(?:(?:s*=s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^s>]+)))|(?=s|$))/g,t={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(n){for(var i,o,a,s=0;i=this._.htmlPartsRegex.exec(n);)if(o=i.index,o>s&&(s=n.substring(s,o),a?a.push(s):this.onText(s)),s=this._.htmlPartsRegex.lastIndex,!(o=i[1])||(o=o.toLowerCase(),a&&CKEDITOR.dtd.$cdata[o]&&(this.onCDATA(a.join("")),a=null),a))if(a)a.push(i[0]);else if(o=i[3]){if(o=o.toLowerCase(),!/="/.test(o)){var r,l={};i=i[4];var c=!(!i||"/"!=i.charAt(i.length-1));if(i)for(;r=e.exec(i);){var d=r[1].toLowerCase();r=r[2]||r[3]||r[4]||"",l[d]=!r&&t[d]?d:r}this.onTagOpen(o,l,c),!a&&CKEDITOR.dtd.$cdata[o]&&(a=[])}}else(o=i[2])&&this.onComment(o);else this.onTagClose(o);n.length>s&&this.onText(n.substring(s,n.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(e){this._.output.push("<",e)},openTagClose:function(e,t){t?this._.output.push(" />"):this._.output.push(">")},attribute:function(e,t){"string"==typeof t&&(t=CKEDITOR.tools.htmlEncodeAttr(t)),this._.output.push(" ",e,'="',t,'"')},closeTag:function(e){this._.output.push("</",e,">")},text:function(e){this._.output.push(e)},comment:function(e){this._.output.push("<!--",e,"-->")},write:function(e){this._.output.push(e)},reset:function(){this._.output=[],this._.indent=!1},getHtml:function(e){var t=this._.output.join("");return e&&this.reset(),t}}}),CKEDITOR.htmlParser.comment=function(e){this.value=e,this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype={type:CKEDITOR.NODE_COMMENT,writeHtml:function(e,t){var n=this.value;if(t){if(!(n=t.onComment(n,this)))return;if("string"!=typeof n)return n.parent=this.parent,n.writeHtml(e,t),void 0}e.comment(n)}},function(){CKEDITOR.htmlParser.text=function(e){this.value=e,this._={isBlockLike:!1}},CKEDITOR.htmlParser.text.prototype={type:CKEDITOR.NODE_TEXT,writeHtml:function(e,t){var n=this.value;(!t||(n=t.onText(n,this)))&&e.text(n)}}}(),function(){CKEDITOR.htmlParser.cdata=function(e){this.value=e},CKEDITOR.htmlParser.cdata.prototype={type:CKEDITOR.NODE_TEXT,writeHtml:function(e){e.write(this.value)}}}(),CKEDITOR.htmlParser.fragment=function(){this.children=[],this.parent=null,this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function e(e){return"a"==e.name&&e.attributes.href||CKEDITOR.dtd.$removeEmpty[e.name]}var t=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),n={ol:1,ul:1},i=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1});CKEDITOR.htmlParser.fragment.fromHtml=function(o,a,s){function r(e){var t;if(p.length>0)for(var n=0;n<p.length;n++){var i=p[n],o=i.name,a=CKEDITOR.dtd[o],s=E.name&&CKEDITOR.dtd[E.name];s&&!s[o]||e&&a&&!a[e]&&CKEDITOR.dtd[e]?o==E.name&&(d(E,E.parent,1),n--):(t||(l(),t=1),i=i.clone(),i.parent=E,E=i,p.splice(n,1),n--)}}function l(){for(;g.length;)d(g.shift(),E)}function c(e){if(e._.isBlockLike&&"pre"!=e.name&&"textarea"!=e.name){var t,n=e.children.length,i=e.children[n-1];i&&i.type==CKEDITOR.NODE_TEXT&&((t=CKEDITOR.tools.rtrim(i.value))?i.value=t:e.children.length=n-1)}}function d(t,n,i){var n=n||E||m,o=E;void 0===t.previous&&(u(n,t)&&(E=n,f.onTagOpen(s,{}),t.returnPoint=n=E),c(t),(!e(t)||t.children.length)&&n.add(t),"pre"==t.name&&(T=!1),"textarea"==t.name&&(v=!1)),t.returnPoint?(E=t.returnPoint,delete t.returnPoint):E=i?n:o}function u(e,t){if((e==m||"body"==e.name)&&s&&(!e.name||CKEDITOR.dtd[e.name][s])){var n,i;return(n=t.attributes&&(i=t.attributes["data-cke-real-element-type"])?i:t.name)&&n in CKEDITOR.dtd.$inline&&!(n in CKEDITOR.dtd.head)&&!t.isOrphan||t.type==CKEDITOR.NODE_TEXT}}function h(e,t){return e in CKEDITOR.dtd.$listItem||e in CKEDITOR.dtd.$tableContent?e==t||"dt"==e&&"dd"==t||"dd"==e&&"dt"==t:!1}var f=new CKEDITOR.htmlParser,m=instanceof CKEDITOR.htmlParser.element?a:"string"==typeof a?new CKEDITOR.htmlParser.element(a):new CKEDITOR.htmlParser.fragment,p=[],g=[],E=m,v="textarea"==m.name,T="pre"==m.name;f.onTagOpen=function(o,a,s,c){if(a=new CKEDITOR.htmlParser.element(o,a),a.isUnknown&&s&&(a.isEmpty=!0),a.isOptionalClose=c,e(a))p.push(a);else{if("pre"==o)T=!0;else{if("br"==o&&T)return E.add(new CKEDITOR.htmlParser.text("n")),void 0;"textarea"==o&&(v=!0)}if("br"==o)g.push(a);else{for(;c=(s=E.name)?CKEDITOR.dtd[s]||(E._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):i,!(a.isUnknown||E.isUnknown||c[o]);)if(E.isOptionalClose)f.onTagClose(s);else if(o in n&&s in n)s=E.children,(s=s[s.length-1])&&"li"==s.name||d(s=new CKEDITOR.htmlParser.element("li"),E),!a.returnPoint&&(a.returnPoint=E),E=s;
else if(
o in CKEDITOR.dtd.$listItem&&!h(o,s))f.onTagOpen("li"==o?"ul":"dl",{},0,1);else if(s in t&&!h(o,s))!a.returnPoint&&(a.returnPoint=E),E=E.parent;else{if(s in CKEDITOR.dtd.$inline&&p.unshift(E),!E.parent){a.isOrphan=1;break}d(E,E.parent,1)}r(o),l(),a.parent=E,a.isEmpty?d(a):E=a}}},f.onTagClose=function(e){for(var t=p.length-1;t>=0;t--)if(e==p[t].name)return p.splice(t,1),void 0;for(var n=[],i=[],o=E;o!=m&&o.name!=e;)o._.isBlockLike||i.unshift(o),n.push(o),o=o.returnPoint||o.parent;if(o!=m){for(t=0;t<n.length;t++){var a=n[t];d(a,a.parent)}E=o,o._.isBlockLike&&l(),d(o,o.parent),o==E&&(E=E.parent),p=p.concat(i)}"body"==e&&(s=!1)},f.onText=function(e){if(E._.hasInlineStarted&&!g.length||T||v||(e=CKEDITOR.tools.ltrim(e),0!==e.length)){var o=E.name,a=o?CKEDITOR.dtd[o]||(E._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):i;!v&&!a["#"]&&o in t?(f.onTagOpen(o in n?"li":"dl"==o?"dd":"table"==o?"tr":"tr"==o?"td":""),f.onText(e)):(l(),r(),!T&&!v&&(e=e.replace(/[trn ]{2,}|[trn]/g," ")),e=new CKEDITOR.htmlParser.text(e),u(E,e)&&this.onTagOpen(s,{},0,1),E.add(e))}},f.onCDATA=function(e){E.add(new CKEDITOR.htmlParser.cdata(e))},f.onComment=function(e){l(),r(),E.add(new CKEDITOR.htmlParser.comment(e))},f.parse(o);for(l(!CKEDITOR.env.ie&&1);E!=m;)d(E,E.parent,1);return c(m),m},CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(e,t){isNaN(t)&&(t=this.children.length);var n=t>0?this.children[t-1]:null;if(n){if(e._.isBlockLike&&n.type==CKEDITOR.NODE_TEXT&&(n.value=CKEDITOR.tools.rtrim(n.value),0===n.value.length))return this.children.pop(),this.add(e),void 0;n.next=e}e.previous=n,e.parent=this,this.children.splice(t,0,e),this._.hasInlineStarted||(this._.hasInlineStarted=e.type==CKEDITOR.NODE_TEXT||e.type==CKEDITOR.NODE_ELEMENT&&!e._.isBlockLike)},writeHtml:function(e,t){var n;this.filterChildren=function(){var e=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml.call(this,e,t),e=e.getHtml(),this.children=new CKEDITOR.htmlParser.fragment.fromHtml(e).children,n=1},t&&t.onRoot(this),this.writeChildrenHtml(e,n?null:t)},writeChildrenHtml:function(e,t,n){for(n&&!this.parent&&t&&t.onRoot(this),n=0;n<this.children.length;n++)this.children[n].writeHtml(e,t)}}}(),function(){function e(e,t){for(var n=0;e&&n<t.length;n++)var i=t[n],e=e.replace(i[0],i[1]);return e}function t(e,t,n){"function"==typeof t&&(t=[t]);var i,o;o=e.length;var a=t&&t.length;if(a){for(i=0;o>i&&e[i].pri<n;i++);for(o=a-1;o>=0;o--)(a=t[o])&&(a.pri=n,e.splice(i,0,a))}}function n(e,t,n){if(t)for(var o in t){var a=e[o];e[o]=i(a,t[o],n),a||e.$length++}}function i(e,n,i){return n?(n.pri=i,e?(e.splice?t(e,n,i):(e=e.pri>i?[n,e]:[e,n],e.filter=o),e):n.filter=n):void 0}function o(e){for(var t=e.type||instanceof CKEDITOR.htmlParser.fragment,n=0;n<this.length;n++){if(t)var i=e.type,o=e.name;var a=this[n].apply(window,arguments);if(a===!1)return a;if(t){if(a&&(a.name!=o||a.type!=i))return a}else if("string"!=typeof a)return a;void 0!=a&&(e=a)}return e}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(e){this._={elementNames:[],attributeNames:[],elements:{$length:0},attributes:{$length:0}},e&&this.addRules(e,10)},proto:{addRules:function(e,o){"number"!=typeof o&&(o=10),t(this._.elementNames,e.elementNames,o),t(this._.attributeNames,e.attributeNames,o),n(this._.elements,e.elements,o),n(this._.attributes,e.attributes,o),this._.text=i(this._.text,e.text,o)||this._.text,this._.comment=i(this._.comment,e.comment,o)||this._.comment,this._.root=i(this._.root,e.root,o)||this._.root},onElementName:function(t){return e(t,this._.elementNames)},onAttributeName:function(t){return e(t,this._.attributeNames)},onText:function(e){var t=this._.text;return t?t.filter(e):e},onComment:function(e,t){var n=this._.comment;return n?n.filter(e,t):e},onRoot:function(e){var t=this._.root;return t?t.filter(e):e},onElement:function(e){for(var t,n=[this._.elements["^"],this._.elements[e.name],this._.elements.$],i=0;3>i;i++)if(t=n[i]){if(t=t.filter(e,this),t===!1)return null;if(t&&t!=e)return this.onNode(t);if(e.parent&&!e.name)break}return e},onNode:function(e){var t=e.type;return t==CKEDITOR.NODE_ELEMENT?this.onElement(e):t==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(e.value)):t==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(e.value)):null},onAttribute:function(e,t,n){if(t=this._.attributes[t]){if(e=t.filter(n,e,this),e===!1)return!1;if("undefined"!=typeof e)return e}return n}}})}(),function(){function e(e,t){function l(e){return e||CKEDITOR.env.ie?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function c(e,t){return function(o){if(o.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var s,c,u=[],h=n(o);if(h)for(d(h,1)&&u.push(h);h;){if(a(h)&&(s=i(h))&&d(s))if((c=i(s))&&!a(c))u.push(s);else{var m=s,p=l(f),g=m.parent.children,E=CKEDITOR.tools.indexOf(g,m);g.splice(E+1,0,p),g=m.next,m.next=p,p.previous=m,p.parent=m.parent,p.next=g,r(s)}h=h.previous}for(h=0;h<u.length;h++)r(u[h]);(u=CKEDITOR.env.opera&&!e||("function"==typeof t?t(o)!==!1:t))&&(!f&&CKEDITOR.env.ie&&o.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT?u=!1:!f&&CKEDITOR.env.ie&&(document.documentMode>7||o.name in CKEDITOR.dtd.tr||o.name in CKEDITOR.dtd.$listItem)?u=!1:(u=n(o),u=!u||"form"==o.name&&"input"==u.name)),u&&o.add(l(e))}}}function d(e,t){if(!(f&&CKEDITOR.env.ie||e.type!=CKEDITOR.NODE_ELEMENT||"br"!=e.name||e.attributes["data-cke-eol"]))return!0;var n;if(e.type==CKEDITOR.NODE_TEXT&&(n=e.value.match(v))){if(n.index&&(s(e,new CKEDITOR.htmlParser.text(e.value.substring(0,n.index))),e.value=n[0]),CKEDITOR.env.ie&&f&&(!t||e.parent.name in m))return!0;if(!f&&((n=e.previous)&&"br"==n.name||!n||a(n)))return!0}return!1}var u,h={elements:{}},f="html"==t,m=CKEDITOR.tools.extend({},b);for(u in m)"#"in C[u]||delete m[u];for(u in m)h.elements[u]=c(f,e.config.fillEmptyBlocks!==!1);return h.root=c(f),h.elements.br=function(e){return function(t){if(t.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var n=t.attributes;if("data-cke-bogus"in n||"data-cke-eol"in n)delete n["data-cke-bogus"];else{for(n=t.next;n&&o(n);)n=n.next;var r=i(t);!n&&a(t.parent)?(t=t.parent,n=l(e),r=t.children[t.children.length-1],t.children.push(n),n.parent=t,r&&(r.next=n,n.previous=r)):a(n)&&r&&!a(r)&&s(n,l(e))}}}}(f),h}function t(e){return e.enterMode!=CKEDITOR.ENTER_BR&&e.autoParagraph!==!1?e.enterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function n(e){for(e=e.children[e.children.length-1];e&&o(e);)e=e.previous;return e}function i(e){for(e=e.previous;e&&o(e);)e=e.previous;return e}function o(e){return e.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(e.value)||e.type==CKEDITOR.NODE_ELEMENT&&e.attributes["data-cke-bookmark"]}function a(e){return e&&(e.type==CKEDITOR.NODE_ELEMENT&&e.name in b||e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function s(e,t){var n=e.parent.children,i=CKEDITOR.tools.indexOf(n,e);n.splice(i,0,t),n=e.previous,e.previous=t,t.next=e,t.parent=e.parent,n&&(t.previous=n,n.next=t)}function r(e){var t=e.parent.children,n=CKEDITOR.tools.indexOf(t,e),i=e.previous,e=e.next;i&&(i.next=e),e&&(e.previous=i),t.splice(n,1)}function l(e){var t=e.parent;return t?CKEDITOR.tools.indexOf(t.children,e):-1}function c(e){e=e.attributes,"false"!=e.contenteditable&&(e["data-cke-editable"]=e.contenteditable?"true":1),e.contenteditable="false"}function d(e){switch(e=e.attributes,e["data-cke-editable"]){case"true":e.contenteditable="true";break;case"1":delete e.contenteditable}}function u(e){return e.replace(R,function(e,t,n){return"<"+t+n.replace(k,function(e,t){return/^on/.test(t)||-1!=n.indexOf("data-cke-saved-"+t)?e:" data-cke-saved-"+e+" data-cke-"+CKEDITOR.rnd+"-"+e})+">"})}function h(e){return e.replace(w,function(e){return"<cke:encoded>"+encodeURIComponent(e)+"</cke:encoded>"})}function f(e){return e.replace(_,function(e,t){return decodeURIComponent(t)})}function m(e){return e.replace(/<!--(?!{cke_protected})[sS]+?-->/g,function(e){return"<!--"+T+"{C}"+encodeURIComponent(e).replace(/--/g,"%2D%2D")+"-->"})}function p(e){return e.replace(/<!--{cke_protected}{C}([sS]+?)-->/g,function(e,t){return decodeURIComponent(t)})}function g(e,t){var n=t._.dataStore;return e.replace(/<!--{cke_protected}([sS]+?)-->/g,function(e,t){return decodeURIComponent(t)}).replace(/{cke_protected_(d+)}/g,function(e,t){return n&&n[t]||""})}function E(e,t){for(var n=[],i=t.config.protectedSource,o=t._.dataStore||(t._.dataStore={id:1}),a=/<!--{cke_temp(comment)?}(d*?)-->/g,i=[/<script[sS]*?</script>/gi,/<noscript[sS]*?</noscript>/gi].concat(i),e=e.replace(/<!--[sS]*?-->/g,function(e){return"<!--{cke_tempcomment}"+(n.push(e)-1)+"-->"}),s=0;s<i.length;s++)e=e.replace(i[s],function(e){return e=e.replace(a,function(e,t,i){return n[i]}),/cke_temp(comment)?/.test(e)?e:"<!--{cke_temp}"+(n.push(e)-1)+"-->"});return e=e.replace(a,function(e,t,i){return"<!--"+T+(t?"{C}":"")+encodeURIComponent(n[i]).replace(/--/g,"%2D%2D")+"-->"}),e.replace(/(['"]).*?1/g,function(e){return e.replace(/<!--{cke_protected}([sS]+?)-->/g,function(e,t){return o[o.id]=decodeURIComponent(t),"{cke_protected_"+o.id++ +"}"})})}CKEDITOR.htmlDataProcessor=function(t){var n,i;this.editor=t,this.dataFilter=n=new CKEDITOR.htmlParser.filter,this.htmlFilter=i=new CKEDITOR.htmlParser.filter,this.writer=new CKEDITOR.htmlParser.basicWriter,n.addRules(y),n.addRules(e(t,"data")),i.addRules(D),i.addRules(e(t,"html"))},CKEDITOR.htmlDataProcessor.prototype={toHtml:function(e,n,i){var o,e=E(e,this.editor),e=u(e),e=h(e),e=e.replace(S,"$1cke:$2"),e=e.replace(N,"<cke:$1$2></cke:$1>"),e=CKEDITOR.env.opera?e:e.replace(/(<preb[^>]*>)(rn|n)/g,"$1$2$2"),a=this.editor.editable();return!n&&null!==n&&(n=a.getName()),a=n||a.getName(),CKEDITOR.env.ie&&CKEDITOR.env.version<9&&"pre"==a&&(a="div",e="<pre>"+e+"</pre>",o=1),a=this.editor.document.createElement(a),a.setHtml("a"+e),e=a.getHtml().substr(1),e=e.replace(RegExp(" data-cke-"+CKEDITOR.rnd+"-","ig")," "),o&&(e=e.replace(/^<pre>|</pre>$/gi,"")),e=e.replace(K,"$1$2"),e=f(e),e=p(e),e=CKEDITOR.htmlParser.fragment.fromHtml(e,n,i===!1?!1:t(this.editor.config)),n=new CKEDITOR.htmlParser.basicWriter,e.writeChildrenHtml(n,this.dataFilter,1),e=n.getHtml(!0),e=m(e)},toDataFormat:function(e){var n=this.editor.editable(),i=this.writer,e=CKEDITOR.htmlParser.fragment.fromHtml(e,n.getName(),t(this.editor.config));return i.reset(),e.writeChildrenHtml(i,this.htmlFilter,1),i=i.getHtml(!0),i=p(i),i=g(i,this.editor)}};var v=/(?:&nbsp;|xa0)$/,T="{cke_protected}",C=CKEDITOR.dtd,I=["caption","colgroup","col","thead","tfoot","tbody"],b=CKEDITOR.tools.extend({},C.$blockLimit,C.$block),y={elements:{},attributeNames:[[/^on/,"data-cke-pa-on"]]},D={elementNames:[[/^cke:/,""],[/^?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(e){var t=e.attributes;if(t){if(t["data-cke-temp"])return!1;for(var n,i=["name","href","src"],o=0;o<i.length;o++)n="data-cke-saved-"+i[o],n in t&&delete t[i[o]]}return e},table:function(e){e.children.slice(0).sort(function(e,t){var n,i;return e.type==CKEDITOR.NODE_ELEMENT&&t.type==e.type&&(n=CKEDITOR.tools.indexOf(I,e.name),i=CKEDITOR.tools.indexOf(I,t.name)),n>-1&&i>-1&&n!=i||(n=l(e),i=l(t)),n>i?1:-1})},embed:function(e){var t=e.parent;if(t&&"object"==t.name){var n=t.attributes.width,t=t.attributes.height;n&&(e.attributes.width=n),t&&(e.attributes.height=t)}},param:function(e){return e.children=[],e.isEmpty=!0,e},a:function(e){return e.children.length||e.attributes.name||e.attributes["data-cke-saved-name"]?void 0:!1},span:function(e){"Apple-style-span"==e.attributes["class"]&&delete e.name},html:function(e){delete e.attributes.contenteditable,delete e.attributes["class"]},body:function(e){delete e.attributes.spellcheck,delete e.attributes.contenteditable},style:function(e){var t=e.children[0];t&&t.value&&(t.value=CKEDITOR.tools.trim(t.value)),e.attributes.type||(e.attributes.type="text/css")},title:function(e){var t=e.children[0];t&&(t.value=e.attributes["data-cke-title"]||"")}},attributes:{"class":function(e){return CKEDITOR.tools.ltrim(e.replace(/(?:^|s+)cke_[^s]*/g,""))||!1}}};CKEDITOR.env.ie&&(D.attributes.style=function(e){return e.replace(/(^|;)([^:]+)/g,function(e){return e.toLowerCase()})});for(var O in{input:1,textarea:1})y.elements[O]=c,D.elements[O]=d;var R=/<(a|area|img|input|source)b([^>]*)>/gi,k=/b(onw+|href|src|name)s*=s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,w=/(?:<style(?=[ >])[^>]*>[sS]*</style>)|(?:<(:?link|meta|base)[^>]*>)/gi,_=/<cke:encoded>([^<]*)</cke:encoded>/gi,S=/(</?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,K=/(</?)cke:((?:html|body|head|title)[^>]*>)/gi,N=/<cke:(param|embed)([^>]*?)/?>(?!s*</cke:1)/gi}(),CKEDITOR.htmlParser.element=function(e,t){this.name=e,this.attributes=t||{},this.children=[];var n=e||"",i=n.match(/^cke:(.*)/);i&&(n=i[1]),n=!!(CKEDITOR.dtd.$nonBodyContent[n]||CKEDITOR.dtd.$block[n]||CKEDITOR.dtd.$listItem[n]||CKEDITOR.dtd.$tableContent[n]||CKEDITOR.dtd.$nonEditable[n]||"br"==n),this.isEmpty=!!CKEDITOR.dtd.$empty[e],this.isUnknown=!CKEDITOR.dtd[e],this._={isBlockLike:n,hasInlineStarted:this.isEmpty||!n}},CKEDITOR.htmlParser.cssStyle=function(e){var t={};return((e instanceof CKEDITOR.htmlParser.element?e.attributes.style:e)||"").replace(/&quot;/g,'"').replace(/s*([^ :;]+)s*:s*([^;]+)s*(?=;|$)/g,function(e,n,i){"font-family"==n&&(i=i.replace(/["']/g,"")),t[n.toLowerCase()]=i}),{rules:t,populate:function(e){var t=this.toString();t&&(instanceof CKEDITOR.dom.element?e.setAttribute("style",t):instanceof CKEDITOR.htmlParser.element?e.attributes.style=t:e.style=t)},toString:function(){var e,n=[];for(e in t)t[e]&&n.push(e,":",t[e],";");return n.join("")}}},function(){var e=function(e,t){return e=e[0],t=t[0],t>e?-1:e>t?1:0};CKEDITOR.htmlParser.element.prototype={type:CKEDITOR.NODE_ELEMENT,add:CKEDITOR.htmlParser.fragment.prototype.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},writeHtml:function(t,n){var i,o,a,s,r=this.attributes,l=this,c=l.name;if(l.filterChildren=function(){if(!s){var e=new CKEDITOR.htmlParser.basicWriter;CKEDITOR.htmlParser.fragment.prototype.writeChildrenHtml.call(l,e,n),l.children=new CKEDITOR.htmlParser.fragment.fromHtml(e.getHtml(),l.clone(),0).children,s=1}},n){for(this.parent||n.onRoot(this);;){if(!(c=n.onElementName(c)))return;if(l.name=c,!(l=n.onElement(l)))return;if(l.parent=this.parent,l.name==c)break;if(l.type!=CKEDITOR.NODE_ELEMENT)return l.writeHtml(t,n),void 0;if(c=l.name,!c){for(var c=0,d=this.children.length;d>c;c++)this.children[c].parent=l.parent;return this.writeChildrenHtml.call(l,t,s?null:n),void 0}}r=l.attributes}t.openTag(c,r);for(var d=[],u=0;2>u;u++)for(i in r)if(o=i,a=r[i],1==u)d.push([i,a]);else if(n){for(;;){if(!(o=n.onAttributeName(i))){delete r[i];break}if(o==i)break;delete r[i],i=o}o&&((a=n.onAttribute(l,o,a))===!1?delete r[o]:r[o]=a)}for(t.sortAttributes&&d.sort(e),r=d.length,u=0;r>u;u++)i=d[u],t.attribute(i[0],i[1]);t.openTagClose(c,l.isEmpty),l.isEmpty||(this.writeChildrenHtml.call(l,t,s?null:n),t.closeTag(c))},writeChildrenHtml:function(){CKEDITOR.htmlParser.fragment.prototype.writeChildrenHtml.apply(this,arguments)}}}(),function(){var e={};CKEDITOR.template=function(t){if(e[t])this.output=e[t];else{var n=t.replace(/'/g,"\'").replace(/{([^}]+)}/g,function(e,t){return"',data['"+t+"']==undefined?'{"+t+"}':data['"+t+"'],'"});this.output=e[t]=Function("data","buffer","return buffer?buffer.push('"+n+"'):['"+n+"'].join('');")}}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(e){CKEDITOR.instances[e.name]=e,e.on("focus",function(){CKEDITOR.currentInstance!=e&&(CKEDITOR.currentInstance=e,CKEDITOR.fire("currentInstance"))}),e.on("blur",function(){CKEDITOR.currentInstance==e&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))}),CKEDITOR.fire("instance",null,e)},CKEDITOR.remove=function(e){delete CKEDITOR.instances[e.name]},function(){var e={};CKEDITOR.addTemplate=function(t,n){var i=e[t];return i?i:(i={name:t,source:n},CKEDITOR.fire("template",i),e[t]=new CKEDITOR.template(i.source))},CKEDITOR.getTemplate=function(t){return e[t]}}(),function(){var e=[];CKEDITOR.addCss=function(t){e.push(t)},CKEDITOR.getCss=function(){return e.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(e,t){if(!CKEDITOR.env.isCompatible)return null;if(e=CKEDITOR.dom.element.get(e),e.getEditor())throw'The editor instance "'+e.getEditor().name+'" is already attached to the provided element.';var n=new CKEDITOR.editor(t,e,CKEDITOR.ELEMENT_MODE_INLINE);return n.setData(e.getHtml(),null,!0),n.on("loaded",function(){n.fire("uiReady"),n.editable(e),n.container=e,n.setData(n.getData(1)),n.fire("contentDom"),n.mode="wysiwyg",n.fire("mode"),n.fireOnce("instanceReady"),CKEDITOR.fire("instanceReady",null,n),n.resetDirty()},null,null,1e4),n.on("destroy",function(){n.element.clearCustomData(),delete n.element}),n},CKEDITOR.inlineAll=function(){var e,t,n;for(n in CKEDITOR.dtd.$editable)for(var i=CKEDITOR.document.getElementsByTag(n),o=0,a=i.count();a>o;o++)e=i.getItem(o),"true"==e.getAttribute("contenteditable")&&(t={element:e,config:{}},CKEDITOR.fire("inline",t)!==!1&&CKEDITOR.inline(e,t.config))},CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function e(e,o,a,s){if(!CKEDITOR.env.isCompatible)return null;if(e=CKEDITOR.dom.element.get(e),e.getEditor())throw'The editor instance "'+e.getEditor().name+'" is already attached to the provided element.';var r=new CKEDITOR.editor(o,e,s);return s==CKEDITOR.ELEMENT_MODE_REPLACE&&e.setStyle("visibility","hidden"),a&&r.setData(a,null,!0),r.on("loaded",function(){n(r),s==CKEDITOR.ELEMENT_MODE_REPLACE&&r.config.autoUpdateElement&&i(r),r.setMode(r.config.startupMode,function(){r.fireOnce("instanceReady"),CKEDITOR.fire("instanceReady",null,r),r.resetDirty()})}),r.on("destroy",t),r}function t(){var e=this.container,t=this.element;e&&(e.clearCustomData(),e.remove()),t&&(t.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&t.show(),delete this.element)}function n(e){var t=e.name,n=e.element,i=e.elementMode,a=e.fire("uiSpace",{space:"top",html:""}).html,s=e.fireOnce("uiSpace",{space:"bottom",html:""}).html;o||(o=CKEDITOR.addTemplate("maincontainer",'<{outerElid="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}<{outerElid="{contentId}" class="cke_contents cke_reset" role="presentation"></{outerEl}>{bottomHtml}</{outerEl}></{outerEl}>')),t=CKEDITOR.dom.element.createFromHtml(o.output({id:e.id,name:t,langDir:e.lang.dir,langCode:e.langCode,voiceLabel:e.lang.editor,topHtml:a?'<span id="'+e.ui.spaceId("top")+'" class="cke_top cke_reset_all" role="presentation" style="height:auto">'+a+"</span>":"",contentId:e.ui.spaceId("contents"),bottomHtml:s?'<span id="'+e.ui.spaceId("bottom")+'" class="cke_bottom cke_reset_all" role="presentation">'+s+"</span>":"",outerEl:CKEDITOR.env.ie?"span":"div"})),i==CKEDITOR.ELEMENT_MODE_REPLACE?(n.hide(),t.insertAfter(n)):n.append(t),e.container=t,a&&e.ui.space("top").unselectable(),s&&e.ui.space("bottom").unselectable(),n=e.config.width,i=e.config.height,n&&t.setStyle("width",CKEDITOR.tools.cssLength(n)),i&&e.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(i)),t.disableContextMenu(),CKEDITOR.env.webkit&&t.on("focus",function(){e.focus()}),e.fireOnce("uiReady")}function i(e){var t=e.element;if(e.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&t.is("textarea")){var n=t.$.form&&new CKEDITOR.dom.element(t.$.form);if(n){var i=function(){e.updateElement()};n.on("submit",i),n.$.submit.nodeName||n.$.submit.length||(n.$.submit=CKEDITOR.tools.override(n.$.submit,function(t){return function(){e.updateElement(),t.apply?t.apply(this,arguments):t()}})),e.on("destroy",function(){n.removeListener("submit",i)})}}}CKEDITOR.replace=function(t,n){return e(t,n,null,CKEDITOR.ELEMENT_MODE_REPLACE)},CKEDITOR.appendTo=function(t,n,i){return e(t,n,i,CKEDITOR.ELEMENT_MODE_APPENDTO)},CKEDITOR.replaceAll=function(){for(var e=document.getElementsByTagName("textarea"),t=0;t<e.length;t++){var n=null,i=e[t];if(i.name||i.id){if("string"==typeof arguments[0]){if(!RegExp("(?:^|\s)"+arguments[0]+"(?:$|\s)").test(i.className))continue}else if("function"==typeof arguments[0]&&(n={},arguments[0](i,n)===!1))continue;this.replace(i,n)}}},CKEDITOR.editor.prototype.addMode=function(e,t){(this._.modes||(this._.modes={}))[e]=t},CKEDITOR.editor.prototype.setMode=function(e,t){var n=this,i=this._.modes;if(e!=n.mode&&i&&i[e]){if(n.fire("beforeSetMode",e),n.mode){var o=n.checkDirty();n._.previousMode=n.mode,n.fire("beforeModeUnload"),n.editable(0),n.ui.space("contents").setHtml(""),n.mode=""}this._.modes[e](function(){n.mode=e,void 0!==o&&(n.mayBeDirty=!0,!o&&n.resetDirty()),setTimeout(function(){n.fire("mode"),t&&t.call(n)},0)})}},CKEDITOR.editor.prototype.resize=function(e,t,n,i){var o=this.container,a=this.ui.space("contents"),s=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement,i=i?o.getChild(1):o;i.setSize("width",e,!0),s&&(s.style.width="1%"),a.setStyle("height",Math.max(t-(n?0:(i.$.offsetHeight||0)-(a.$.clientHeight||0)),0)+"px"),s&&(s.style.width="100%"),this.fire("resize")},CKEDITOR.editor.prototype.getResizable=function(e){return e?this.ui.space("contents"):this.container};var o;CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),CKEDITOR.config.startupMode="wysiwyg",function(){function e(e){var t=e.editor,i=t.editable(),o=e.data.path,a=o.blockLimit,s=e.data.selection.getRanges()[0],r=t.config.enterMode;if(CKEDITOR.env.gecko){var l=o.block||o.blockLimit||o.root,c=l&&l.getLast(n);!(!l||!l.isBlockBoundary()||c&&c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()||l.is("pre")||l.getBogus()||!l.appendBogus())}t.config.autoParagraph!==!1&&r!=CKEDITOR.ENTER_BR&&s.collapsed&&i.equals(a)&&!o.block&&(i=s.clone(),i.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),o=new CKEDITOR.dom.walker(i),o.guard=function(e){return!n(e)||e.type==CKEDITOR.NODE_COMMENT||e.isReadOnly()},(!o.checkForward()||i.checkStartOfBlock()&&i.checkEndOfBlock())&&(t=s.fixBlock(!0,t.config.enterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.ie&&(t=t.getFirst(n))&&t.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(t.getText()).match(/^(?:&nbsp;|xa0)$/)&&t.remove(),s.select(),e.cancel()))}function t(e){var t=e.data.getTarget();t.is("input")&&(t=t.getAttribute("type"),("submit"==t||"reset"==t)&&e.data.preventDefault())}function n(e){return l(e)&&c(e)}function i(e,t){return function(n){var i=CKEDITOR.dom.element.get(n.data.$.toElement||n.data.$.fromElement||n.data.$.relatedTarget);(!i||!t.equals(i)&&!t.contains(i))&&e.call(this,n)}}function o(e){var t,i=e.getRanges()[0],e=e.root,o=i.startPath(),a={table:1,ul:1,ol:1,dl:1},s=CKEDITOR.dom.walker.bogus();if(o.contains(a)){var r=i.clone();if(r.collapse(1),r.setStartAt(e,CKEDITOR.POSITION_AFTER_START),r=new CKEDITOR.dom.walker(r),o=function(e,i){return function(e,o){return o&&e.type==CKEDITOR.NODE_ELEMENT&&e.is(a)&&(t=e),!n(e)||o||i&&s(e)?void 0:!1}},r.guard=o(r),r.checkBackward(),t)return r=i.clone(),r.collapse(),r.setEndAt(e,CKEDITOR.POSITION_BEFORE_END),r=new CKEDITOR.dom.walker(r),r.guard=o(r,1),t=0,r.checkForward(),t}return null}function a(e){e.editor.focus(),e.editor.fire("saveSnapshot")}function s(e,t){var n=e.editor;!t&&n.getSelection().scrollIntoView(),setTimeout(function(){n.fire("saveSnapshot")},0)}CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(e,t){this.base(t.$||t),this.editor=e,this.hasFocus=!1,this.setup()},proto:{focus:function(){this.$[CKEDITOR.env.ie&&this.getDocument().equals(CKEDITOR.document)?"setActive":"focus"](),CKEDITOR.env.safari&&!this.isInline()&&(CKEDITOR.document.getActive().equals(this.getWindow().getFrame())||this.getWindow().focus())},on:function(e,t){var n=Array.prototype.slice.call(arguments,0);return CKEDITOR.env.ie&&/^focus|blur$/.exec(e)&&(e="focus"==e?"focusin":"focusout",t=i(t,this),n[0]=e,n[1]=t),CKEDITOR.dom.element.prototype.on.apply(this,n)},attachListener:function(e){!this._.listeners&&(this._.listeners=[]);var t=Array.prototype.slice.call(arguments,1);this._.listeners.push(e.on.apply(e,t))},clearListeners:function(){var e=this._.listeners;try{for(;e.length;)e.pop().removeListener()}catch(t){}},restoreAttrs:function(){var e,t,n=this._.attrChanges;for(t in n)n.hasOwnProperty(t)&&(e=n[t],null!==e?this.setAttribute(t,e):this.removeAttribute(t))},attachClass:function(e){var t=this.getCustomData("classes");this.hasClass(e)||(!t&&(t=[]),t.push(e),this.setCustomData("classes",t),this.addClass(e))},changeAttr:function(e,t){var n=this.getAttribute(e);t!==n&&(!this._.attrChanges&&(this._.attrChanges={}),e in this._.attrChanges||(this._.attrChanges[e]=n),this.setAttribute(e,t))},insertHtml:function(e,t){a(this),d(this,"text"==t?"text":"html",e)},insertText:function(e){a(this);var t=this.editor,n=t.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:t.config.enterMode,t=n==CKEDITOR.ENTER_BR,i=CKEDITOR.tools,e=i.htmlEncode(e.replace(/rn/g,"n")),e=e.replace(/t/g,"&nbsp;&nbsp; &nbsp;"),n=n==CKEDITOR.ENTER_P?"p":"div";if(!t){var o=/n{2}/g;if(o.test(e))var s="<"+n+">",r="</"+n+">",e=s+e.replace(o,function(){return r+s})+r}e=e.replace(/n/g,"<br>"),t||(e=e.replace(RegExp("<br>(?=</"+n+">)"),function(e){return i.repeat(e,2)})),e=e.replace(/^ | $/g,"&nbsp;"),e=e.replace(/(>|s) /g,function(e,t){return t+"&nbsp;"}).replace(/ (?=<)/g,"&nbsp;"),d(this,"text",e)},insertElement:function(e){a(this);for(var t,i,o,r=this.editor,l=r.config.enterMode,c=r.getSelection(),d=c.getRanges(),u=e.getName(),h=CKEDITOR.dtd.$block[u],f=d.length-1;f>=0;f--)if(t=d[f],!t.checkReadOnly()){t.deleteContents(1),i=!f&&e||e.clone(1);var m,p;if(h)for(;(m=t.getCommonAncestor(0,1))&&(p=CKEDITOR.dtd[m.getName()])&&(!p||!p[u]);)m.getName()in CKEDITOR.dtd.span?t.splitElement(m):t.checkStartOfBlock()&&t.checkEndOfBlock()?(t.setStartBefore(m),t.collapse(!0),m.remove()):t.splitBlock(l==CKEDITOR.ENTER_DIV?"div":"p",r.editable());t.insertNode(i),o||(o=i)}o&&(t.moveToPosition(o,CKEDITOR.POSITION_AFTER_END),h&&((e=o.getNext(n))&&e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$block)?e.getDtd()["#"]?t.moveToElementEditStart(e):t.moveToElementEditEnd(o):e||l==CKEDITOR.ENTER_BR||(e=t.fixBlock(!0,l==CKEDITOR.ENTER_DIV?"div":"p"),t.moveToElementEditStart(e)))),c.selectRanges([t]),s(this,CKEDITOR.env.opera)},setData:function(e,t){!t&&this.editor.dataProcessor&&(e=this.editor.dataProcessor.toHtml(e)),this.setHtml(e),this.editor.fire("dataReady")},getData:function(e){var t=this.getHtml();return!e&&this.editor.dataProcessor&&(t=this.editor.dataProcessor.toDataFormat(t)),t},setReadOnly:function(e){this.setAttribute("contenteditable",!e)},detach:function(){this.removeClass("cke_editable");var e=this.editor;this._.detach(),delete e.document,delete e.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},setup:function(){var e=this.editor;if(this.attachListener(e,"beforeGetData",function(){var t=this.getData();this.is("textarea")||e.config.ignoreEmptyParagraph!==!1&&(t=t.replace(r,function(e,t){return t})),e.setData(t,null,1)},this),this.attachListener(e,"getSnapshot",function(e){e.data=this.getData(1)},this),this.attachListener(e,"afterSetData",function(){this.setData(e.getData(1))},this),this.attachListener(e,"loadSnapshot",function(e){this.setData(e.data,1)},this),this.attachListener(e,"beforeFocus",function(){var t=e.getSelection();(t=t&&t.getNative())&&"Control"==t.type||this.focus()},this),this.attachListener(e,"insertHtml",function(e){this.insertHtml(e.data.dataValue,e.data.mode)},this),this.attachListener(e,"insertElement",function(e){this.insertElement(e.data)},this),this.attachListener(e,"insertText",function(e){this.insertText(e.data)},this),this.setReadOnly(e.readOnly),this.attachClass("cke_editable"),this.attachClass(e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"cke_editable_inline":e.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE||e.elementMode==CKEDITOR.ELEMENT_MODE_APPENDTO?"cke_editable_themed":""),this.attachClass("cke_contents_"+e.config.contentsLangDirection),e.keystrokeHandler.blockedKeystrokes[8]=e.readOnly,e.keystrokeHandler.attach(this),this.on("blur",function(e){CKEDITOR.env.opera&&CKEDITOR.document.getActive().equals(this.isInline()?this:this.getWindow().getFrame())?e.cancel():this.hasFocus=!1},null,null,-1),this.on("focus",function(){this.hasFocus=!0},null,null,-1),e.focusManager.add(this),this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,e.once("contentDom",function(){e.focusManager.focus()})),this.isInline()&&this.changeAttr("tabindex",e.tabIndex),!this.is("textarea")){e.document=this.getDocument(),e.window=this.getWindow();var n=e.document;this.changeAttr("spellcheck",!e.config.disableNativeSpellChecker);var i=e.config.contentsLangDirection;this.getDirection(1)!=i&&this.changeAttr("dir",i);var a=CKEDITOR.getCss();a&&(i=n.getHead(),i.getCustomData("stylesheet")||(a=n.appendStyleText(a),a=new CKEDITOR.dom.element(a.ownerNode||a.owningElement),i.setCustomData("stylesheet",a),a.data("cke-temp",1))),i=n.getCustomData("stylesheet_ref")||0,n.setCustomData("stylesheet_ref",i+1),this.setCustomData("cke_includeReadonly",!e.config.disableReadonlyStyling),this.attachListener(this,"click",function(e){var e=e.data,t=e.getTarget();t.is("a")&&2!=e.$.button&&t.isReadOnly()&&e.preventDefault()}),this.attachListener(e,"key",function(t){if(e.readOnly)return!0;var n,i=t.data.keyCode;if(i in{8:1,46:1}){var a,s,r,c=e.getSelection(),t=c.getRanges()[0],d=t.startPath(),i=8==i;(c=o(c))?(e.fire("saveSnapshot"),t.moveToPosition(c,CKEDITOR.POSITION_BEFORE_START),c.remove(),t.select(),e.fire("saveSnapshot"),n=1):t.collapsed&&((a=d.block)&&t[i?"checkStartOfBlock":"checkEndOfBlock"]()&&(r=a[i?"getPrevious":"getNext"](l))&&r.is("table")?(e.fire("saveSnapshot"),t[i?"checkEndOfBlock":"checkStartOfBlock"]()&&a.remove(),t["moveToElementEdit"+(i?"End":"Start")](r),t.select(),e.fire("saveSnapshot"),n=1):d.blockLimit&&d.blockLimit.is("td")&&(s=d.blockLimit.getAscendant("table"))&&t.checkBoundaryOfElement(s,i?CKEDITOR.START:CKEDITOR.END)&&(r=s[i?"getPrevious":"getNext"](l))?(e.fire("saveSnapshot"),t["moveToElementEdit"+(i?"End":"Start")](r),t.checkStartOfBlock()&&t.checkEndOfBlock()?r.remove():t.select(),e.fire("saveSnapshot"),n=1):(s=d.contains(["td","th","caption"]))&&t.checkBoundaryOfElement(s,i?CKEDITOR.START:CKEDITOR.END)&&(r=s[i?"getPreviousSourceNode":"getNextSourceNode"](1,CKEDITOR.NODE_ELEMENT))&&!r.isReadOnly()&&t.root.contains(r)&&(t[i?"moveToElementEditEnd":"moveToElementEditStart"](r),t.select(),n=1))}return!n}),CKEDITOR.env.ie&&this.attachListener(this,"click",t),!CKEDITOR.env.ie&&!CKEDITOR.env.opera&&this.attachListener(this,"mousedown",function(t){var n=t.data.getTarget();n.is("img","hr","input","textarea","select")&&(e.getSelection().selectElement(n),n.is("input","textarea","select")&&t.data.preventDefault())}),CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(t){if(2==t.data.$.button&&(t=t.data.getTarget(),!t.getOuterHtml().replace(r,""))){var n=e.createRange();n.moveToElementEditStart(t),n.select(!0)}}),CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(e){e.data.getTarget().is("input","select")&&e.data.preventDefault()}),this.attachListener(this,"mouseup",function(e){e.data.getTarget().is("input","textarea")&&e.data.preventDefault()}))}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1),this.clearListeners(),this.restoreAttrs();
var e;if(e=this.removeCustomData("classes"))for(;e.length;)this.removeClass(e.pop());e=this.getDocument();var t=e.getHead();if(t.getCustomData("stylesheet")){var n=e.getCustomData("stylesheet_ref");--n?e.setCustomData("stylesheet_ref",n):(e.removeCustomData("stylesheet_ref"),t.removeCustomData("stylesheet").remove())}delete this.editor}}}),CKEDITOR.editor.prototype.editable=function(e){var t=this._.editable;return t&&e?0:(arguments.length&&(t=this._.editable=e?e instanceof CKEDITOR.editable?e:new CKEDITOR.editable(this,e):(t&&t.detach(),null)),t)};var r=/(^|<bodyb[^>]*>)s*<(p|div|address|hd|center|pre)[^>]*>s*(?:<br[^>]*>|&nbsp;|u00A0|&#160;)?s*(:?</2>)?s*(?=$|</body>)/gi,l=CKEDITOR.dom.walker.whitespaces(!0),c=CKEDITOR.dom.walker.bookmark(!1,!0);CKEDITOR.on("instanceLoaded",function(t){var n=t.editor;n.on("insertElement",function(e){e=e.data,e.type==CKEDITOR.NODE_ELEMENT&&(e.is("input")||e.is("textarea"))&&("false"!=e.getAttribute("contentEditable")&&e.data("cke-editable",e.hasAttribute("contenteditable")?"true":"1"),e.setAttribute("contentEditable",!1))}),n.on("selectionChange",function(t){if(!n.readOnly){var i=n.getSelection();i&&!i.isLocked&&(i=n.checkDirty(),n.fire("lockSnapshot"),e(t),n.fire("unlockSnapshot"),!i&&n.resetDirty())}})}),CKEDITOR.on("instanceCreated",function(e){var t=e.editor;t.on("mode",function(){var e=t.editable();if(e&&e.isInline()){var n=this.lang.editor+", "+this.name;if(e.changeAttr("role","textbox"),e.changeAttr("aria-label",n),e.changeAttr("title",n),n=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents")){var i=CKEDITOR.tools.getNextId(),o=CKEDITOR.dom.element.createFromHtml('
<span id="'+i+'" class="cke_voice_label">'+this.lang.common.editorHelp+"</span>");n.append(o),e.changeAttr("aria-describedby",i)}}})}),CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");var d=function(){function e(e){return e.type==CKEDITOR.NODE_ELEMENT}function t(n,i){var o,a,s,r,c=[],d=i.range.startContainer;o=i.range.startPath();for(var d=l[d.getName()],u=0,h=n.getChildren(),f=h.count(),m=-1,p=-1,g=0,E=o.contains(l.$list);f>u;++u)o=h.getItem(u),e(o)?(s=o.getName(),E&&s in CKEDITOR.dtd.$list?c=c.concat(t(o,i)):(r=!!d[s],"br"!=s||!o.data("cke-eol")||u&&u!=f-1||(g=(a=u?c[u-1].node:h.getItem(u+1))&&(!e(a)||!a.is("br")),a=a&&e(a)&&l.$block[a.getName()]),-1==m&&!r&&(m=u),r||(p=u),c.push({isElement:1,isLineBreak:g,isBlock:o.isBlockBoundary(),hasBlockSibling:a,node:o,name:s,allowed:r}),a=g=0)):c.push({isElement:0,node:o,allowed:1});return m>-1&&(c[m].firstNotAllowed=1),p>-1&&(c[p].lastNotAllowed=1),c}function i(t,n){var o,a=[],s=t.getChildren(),r=s.count(),c=0,d=l[n],u=!t.is(l.$inline)||t.is("br");for(u&&a.push(" ");r>c;c++)o=s.getItem(c),e(o)&&!o.is(d)?a=a.concat(i(o,n)):a.push(o);return u&&a.push(" "),a}function o(t){return t&&e(t)&&(t.is(l.$removeEmpty)||t.is("a")&&!t.isBlockBoundary())}function a(t,n,i,o){var s,r,l=t.clone();l.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),(s=new CKEDITOR.dom.walker(l).next())&&e(s)&&c[s.getName()]&&(r=s.getPrevious())&&e(r)&&!r.getParent().equals(t.startContainer)&&i.contains(r)&&o.contains(s)&&s.isIdentical(r)&&(s.moveChildren(r),s.remove(),a(t,n,i,o))}function r(t,n){function i(t,n){return n.isBlock&&n.isElement&&!n.node.is("br")&&e(t)&&t.is("br")?(t.remove(),1):void 0}var o=n.endContainer.getChild(n.endOffset),a=n.endContainer.getChild(n.endOffset-1);o&&i(o,t[t.length-1]),a&&i(a,t[0])&&(n.setEnd(n.endContainer,n.endOffset-1),n.collapse())}var l=CKEDITOR.dtd,c={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},d={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},u=CKEDITOR.tools.extend({},l.$inline);return delete u.br,function(c,h,f){var m=c.editor;c.getDocument();var p=m.getSelection().getRanges()[0];if(!p.checkReadOnly()){var g,E,v,T,C,I=new CKEDITOR.dom.elementPath(p.startContainer,p.root).blockLimit||p.root,h={type:h,editable:c,editor:m,range:p,blockLimit:I,mergeCandidates:[],zombies:[]},m=h.range,I=h.mergeCandidates;if("text"==h.type&&m.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(E=CKEDITOR.dom.element.createFromHtml("<span>&nbsp;</span>",m.document),m.insertNode(E),m.setStartAfter(E)),v=new CKEDITOR.dom.elementPath(m.startContainer),h.endPath=T=new CKEDITOR.dom.elementPath(m.endContainer),!m.collapsed){g=T.block||T.blockLimit;var b=m.getCommonAncestor();g&&!g.equals(b)&&!g.contains(b)&&m.checkEndOfBlock()&&h.zombies.push(g),m.deleteContents()}for(;(C=e(m.startContainer)&&m.startContainer.getChild(m.startOffset-1))&&e(C)&&C.isBlockBoundary()&&v.contains(C);)m.moveToPosition(C,CKEDITOR.POSITION_BEFORE_END);for(a(m,h.blockLimit,v,T),E&&(m.setEndBefore(E),m.collapse(),E.remove()),E=m.startPath(),(g=E.contains(o,!1,1))&&(m.splitElement(g),h.inlineStylesRoot=g,h.inlineStylesPeak=E.lastElement),E=m.createBookmark(),(g=E.startNode.getPrevious(n))&&e(g)&&o(g)&&I.push(g),(g=E.startNode.getNext(n))&&e(g)&&o(g)&&I.push(g),g=E.startNode;(g=g.getParent())&&o(g);)I.push(g);if(m.moveToBookmark(E),f){if(C=f,f=h.range,"text"==h.type&&h.inlineStylesRoot){for(E=C,C=h.inlineStylesPeak,m=C.getDocument().createText("{cke-peak}"),I=h.inlineStylesRoot.getParent();!C.equals(I);)m=m.appendTo(C.clone()),C=C.getParent();C=m.getOuterHtml().replace("{cke-peak}",E)}if(E=h.blockLimit.getName(),/^s+|s+$/.test(C)&&"span"in CKEDITOR.dtd[E]){var y='<span data-cke-marker="1">&nbsp;</span>';C=y+C+y}if(C=h.editor.dataProcessor.toHtml(C,null,!1),E=f.document.createElement("body"),E.setHtml(C),y&&(E.getFirst().remove(),E.getLast().remove()),(y=f.startPath().block)&&(1!=y.getChildCount()||!y.getBogus()))e:{var D;if(1==E.getChildCount()&&e(D=E.getFirst())&&D.is(d)){for(y=D.getElementsByTag("*"),f=0,m=y.count();m>f;f++)if(C=y.getItem(f),!C.is(u))break e;D.moveChildren(D.getParent(1)),D.remove()}}h.dataWrapper=E,D=h.range;var O,y=D.document,f=h.blockLimit;E=0;var R;C=[];var k,w,_,S,I=m=0;v=D.startContainer,g=h.endPath.elements[0];var K;for(T=g.getPosition(v),b=!(!g.getCommonAncestor(v)||T==CKEDITOR.POSITION_IDENTICAL||T&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED),v=t(h.dataWrapper,h),r(v,D);E<v.length;E++){if(T=v[E],O=T.isLineBreak){O=D,_=f;var N=void 0,x=void 0;T.hasBlockSibling?O=1:(N=O.startContainer.getAscendant(l.$block,1),N&&N.is({div:1,p:1})?(x=N.getPosition(_),x==CKEDITOR.POSITION_IDENTICAL||x==CKEDITOR.POSITION_CONTAINS?O=0:(_=O.splitElement(N),O.moveToPosition(_,CKEDITOR.POSITION_AFTER_START),O=1)):O=0)}if(O)I=E>0;else{if(O=D.startPath(),!T.isBlock&&(w=h.editor.config.enterMode!=CKEDITOR.ENTER_BR&&h.editor.config.autoParagraph!==!1?h.editor.config.enterMode==CKEDITOR.ENTER_DIV?"div":"p":!1)&&!O.block&&O.blockLimit&&O.blockLimit.equals(D.root)&&(w=y.createElement(w),!CKEDITOR.env.ie&&w.appendBogus(),D.insertNode(w),!CKEDITOR.env.ie&&(R=w.getBogus())&&R.remove(),D.moveToPosition(w,CKEDITOR.POSITION_BEFORE_END)),(O=D.startPath().block)&&!O.equals(k)&&((R=O.getBogus())&&(R.remove(),C.push(O)),k=O),T.firstNotAllowed&&(m=1),m&&T.isElement){for(O=D.startContainer,_=null;O&&!l[O.getName()][T.name];){if(O.equals(f)){O=null;break}_=O,O=O.getParent()}if(O)_&&(S=D.splitElement(_),h.zombies.push(S),h.zombies.push(_));else{_=f.getName(),K=!E,O=E==v.length-1,_=i(T.node,_);for(var N=[],x=_.length,A=0,L=void 0,M=0,P=-1;x>A;A++)L=_[A]," "==L?(M||K&&!A||(N.push(new CKEDITOR.dom.text(" ")),P=N.length),M=1):(N.push(L),M=0);O&&P==N.length&&N.pop(),K=N}}if(K){for(;O=K.pop();)D.insertNode(O);K=0}else D.insertNode(T.node);T.lastNotAllowed&&E<v.length-1&&((S=b?g:S)&&D.setEndAt(S,CKEDITOR.POSITION_AFTER_START),m=0),D.collapse()}}h.dontMoveCaret=I,h.bogusNeededBlocks=C}R=h.range;var $;for(S=h.bogusNeededBlocks,K=R.createBookmark();k=h.zombies.pop();)k.getParent()&&(w=R.clone(),w.moveToElementEditStart(k),w.removeEmptyBlocksAtEnd());if(S)for(;k=S.pop();)k.append(CKEDITOR.env.ie?R.document.createText(" "):R.document.createElement("br"));for(;k=h.mergeCandidates.pop();)k.mergeSiblings();if(R.moveToBookmark(K),!h.dontMoveCaret){for(k=e(R.startContainer)&&R.startContainer.getChild(R.startOffset-1);k&&e(k)&&!k.is(l.$empty);){if(k.isBlockBoundary())R.moveToPosition(k,CKEDITOR.POSITION_BEFORE_END);else{if(o(k)&&k.getHtml().match(/(s|&nbsp;)$/g)){$=null;break}$=R.clone(),$.moveToPosition(k,CKEDITOR.POSITION_BEFORE_END)}k=k.getLast(n)}$&&R.moveToRange($)}p.select(),s(c)}}}()}(),function(){function e(){var e=this.getSelection(1);if(e.getType()!=CKEDITOR.SELECTION_NONE){this.fire("selectionCheck",e);var t=this.elementPath();t.compare(this._.selectionPreviousPath)||(this._.selectionPreviousPath=t,this.fire("selectionChange",{selection:e,path:t}))}}function t(){r=!0,s||(n.call(this),s=CKEDITOR.tools.setTimeout(n,200,this))}function n(){s=null,r&&(CKEDITOR.tools.setTimeout(e,0,this),r=!1)}function i(e){function t(t,n){return t&&t.type!=CKEDITOR.NODE_TEXT?e.clone()["moveToElementEdit"+(n?"End":"Start")](t):!1}if(!(e.root instanceof CKEDITOR.editable))return!1;var n=e.startContainer,i=e.getPreviousNode(l,null,n),o=e.getNextNode(l,null,n);return!t(i)&&!t(o,1)&&(i||o||n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()&&n.getBogus())?!1:!0}function o(e){return e.getCustomData("cke-fillingChar")}function a(e,t){var n=e&&e.removeCustomData("cke-fillingChar");if(n){if(t!==!1){var i,o=e.getDocument().getSelection().getNative(),a=o&&"None"!=o.type&&o.getRangeAt(0);if(n.getLength()>1&&a&&a.intersectsNode(n.$)){i=[o.anchorOffset,o.focusOffset],a=o.focusNode==n.$&&o.focusOffset>0,o.anchorNode==n.$&&o.anchorOffset>0&&i[0]--,a&&i[1]--;var s;a=o,a.isCollapsed||(s=a.getRangeAt(0),s.setStart(a.anchorNode,a.anchorOffset),s.setEnd(a.focusNode,a.focusOffset),s=s.collapsed),s&&i.unshift(i.pop())}}n.setText(n.getText().replace(/u200B/g,"")),i&&(n=o.getRangeAt(0),n.setStart(n.startContainer,i[0]),n.setEnd(n.startContainer,i[1]),o.removeAllRanges(),o.addRange(n))}}var s,r,l=CKEDITOR.dom.walker.invisible(1);CKEDITOR.on("instanceCreated",function(n){function i(){var e=o.getSelection();e&&e.removeAllRanges()}var o=n.editor;o.define("selectionChange",{errorProof:1}),o.on("contentDom",function(){var n=o.document,i=CKEDITOR.document,s=o.editable(),r=n.getBody(),l=n.getDocumentElement(),d=s.isInline();if(CKEDITOR.env.ie||CKEDITOR.env.opera||d){var u;s.attachListener(s,"focus",function(){o.unlockSelection(u),u=0},null,null,-1);var h,f=function(){h=o.getSelection(1),h.lock()};c?s.attachListener(s,"beforedeactivate",f,null,null,-1):s.attachListener(o,"selectionCheck",f,null,null,-1),s.attachListener(s,"blur",function(){o.lockSelection(h),u=1},null,null,-1),s.attachListener(s,"mousedown",function(){u=0})}if(CKEDITOR.env.ie&&!d){var m;if(s.attachListener(s,"mousedown",function(e){2==e.data.$.button&&"None"==o.document.$.selection.type&&(m=o.window.getScrollPosition())}),s.attachListener(s,"mouseup",function(e){2==e.data.$.button&&m&&(o.document.$.documentElement.scrollLeft=m.x,o.document.$.documentElement.scrollTop=m.y),m=null}),"BackCompat"!=n.$.compatMode&&((CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&l.on("mousedown",function(e){function t(e){if(e=e.data.$,o){var t=r.$.createTextRange();try{t.moveToPoint(e.x,e.y)}catch(n){}o.setEndPoint(s.compareEndPoints("StartToStart",t)<0?"EndToEnd":"StartToStart",t),o.select()}}function n(){l.removeListener("mousemove",t),i.removeListener("mouseup",n),l.removeListener("mouseup",n),o.select()}if(e=e.data,e.getTarget().is("html")&&e.$.y<l.$.clientHeight&&e.$.x<l.$.clientWidth){var o=r.$.createTextRange();try{o.moveToPoint(e.$.x,e.$.y)}catch(a){}var s=o.duplicate();l.on("mousemove",t),i.on("mouseup",n),l.on("mouseup",n)}}),CKEDITOR.env.version>7)){l.on("mousedown",function(e){e.data.getTarget().is("html")&&(i.on("mouseup",p),l.on("mouseup",p))});var p=function(){i.removeListener("mouseup",p),l.removeListener("mouseup",p);var e=CKEDITOR.document.$.selection,t=e.createRange();"None"!=e.type&&t.parentElement().ownerDocument==n.$&&t.select()}}}if(s.attachListener(s,"selectionchange",e,o),s.attachListener(s,"keyup",t,o),s.attachListener(s,"focus",function(){o.forceNextSelectionCheck(),o.selectionChange(1)}),s.isInline()?CKEDITOR.env.webkit||CKEDITOR.env.gecko:CKEDITOR.env.opera){var g;s.attachListener(s,"mousedown",function(){g=1}),s.attachListener(n.getDocumentElement(),"mouseup",function(){g&&t.call(o),g=0})}else s.attachListener(s,"mouseup",t,o);CKEDITOR.env.webkit&&n.on("keydown",function(e){switch(e.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:a(o.editable())}},null,null,-1)}),o.on("contentDomUnload",o.forceNextSelectionCheck,o),o.on("dataReady",function(){o.selectionChange(1)}),CKEDITOR.env.ie9Compat&&o.on("beforeDestroy",i,null,null,9),CKEDITOR.env.webkit&&o.on("setData",i),o.on("contentDomUnload",function(){o.unlockSelection()})}),CKEDITOR.on("instanceReady",function(e){var t=e.editor,n=t.editable();if(CKEDITOR.env.webkit){t.on("selectionChange",function(){var e=o(n);e&&(e.getCustomData("ready")?a(n):e.setCustomData("ready",1))},null,null,-1),t.on("beforeSetMode",function(){a(n)},null,null,-1);var i,s,e=function(){var e=t.document,a=o(n);a&&(e=e.$.defaultView.getSelection(),"Caret"==e.type&&e.anchorNode==a.$&&(s=1),i=a.getText(),a.setText(i.replace(/u200B/g,"")))},r=function(){var e=t.document,a=o(n);a&&(a.setText(i),s&&(e.$.defaultView.getSelection().setPosition(a.$,a.getLength()),s=0))};t.on("beforeUndoImage",e),t.on("afterUndoImage",r),t.on("beforeGetData",e,null,null,0),t.on("getData",r)}}),CKEDITOR.editor.prototype.selectionChange=function(n){(n?e:t).call(this)},CKEDITOR.editor.prototype.getSelection=function(e){return this._.savedSelection&&!e?this._.savedSelection:(e=this.editable())?new CKEDITOR.dom.selection(e):null},CKEDITOR.editor.prototype.lockSelection=function(e){return e=e||this.getSelection(1),e.getType()!=CKEDITOR.SELECTION_NONE?(!e.isLocked&&e.lock(),this._.savedSelection=e,!0):!1},CKEDITOR.editor.prototype.unlockSelection=function(e){var t=this._.savedSelection;return t?(t.unlock(e),delete this._.savedSelection,!0):!1},CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath},CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)},CKEDITOR.dom.range.prototype.select=function(){var e=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);return e.selectRanges([this]),e},CKEDITOR.SELECTION_NONE=1,CKEDITOR.SELECTION_TEXT=2,CKEDITOR.SELECTION_ELEMENT=3;var c="function"!=typeof window.getSelection;CKEDITOR.dom.selection=function(e){var t=e instanceof CKEDITOR.dom.element;if(this.document=e instanceof CKEDITOR.dom.document?e:e.getDocument(),this.root=t?e:this.document.getBody(),this.isLocked=0,this._={cache:{}},CKEDITOR.env.webkit&&(e=this.document.getWindow().$.getSelection(),"None"==e.type&&this.document.getActive().equals(this.root)||"Caret"==e.type&&e.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT)){var n=new CKEDITOR.dom.range(this.root);n.moveToPosition(this.root,CKEDITOR.POSITION_AFTER_START),t=this.document.$.createRange(),t.setStart(n.startContainer.$,n.startOffset),t.collapse(1),e.addRange(t)}var i,e=this.getNative();if(e)if(e.getRangeAt)i=(n=e.rangeCount&&e.getRangeAt(0))&&new CKEDITOR.dom.node(n.commonAncestorContainer);else{try{n=e.createRange()}catch(o){}i=n&&CKEDITOR.dom.element.get(n.item&&n.item(0)||n.parentElement())}return i&&(this.root.equals(i)||this.root.contains(i))||(this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList),this};var d={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 void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=c?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:c?function(){var e=this._.cache;if(e.type)return e.type;var t=CKEDITOR.SELECTION_NONE;try{var n=this.getNative(),i=n.type;"Text"==i&&(t=CKEDITOR.SELECTION_TEXT),"Control"==i&&(t=CKEDITOR.SELECTION_ELEMENT),n.createRange().parentElement()&&(t=CKEDITOR.SELECTION_TEXT)}catch(o){}return e.type=t}:function(){var e=this._.cache;if(e.type)return e.type;var t=CKEDITOR.SELECTION_TEXT,n=this.getNative();if(n&&n.rangeCount){if(1==n.rangeCount){var n=n.getRangeAt(0),i=n.startContainer;i==n.endContainer&&1==i.nodeType&&1==n.endOffset-n.startOffset&&d[i.childNodes[n.startOffset].nodeName.toLowerCase()]&&(t=CKEDITOR.SELECTION_ELEMENT)}}else t=CKEDITOR.SELECTION_NONE;return e.type=t},getRanges:function(){var e=c?function(){function e(e){return new CKEDITOR.dom.node(e).getIndex()}var t=function(t,n){t=t.duplicate(),t.collapse(n);var i=t.parentElement(),o=i.ownerDocument;if(!i.hasChildNodes())return{container:i,offset:0};for(var a,s,r,l,c=i.children,d=t.duplicate(),u=0,h=c.length-1,f=-1;h>=u;)if(f=Math.floor((u+h)/2),a=c[f],d.moveToElementText(a),r=d.compareEndPoints("StartToStart",t),r>0)h=f-1;else{if(!(0>r))return CKEDITOR.env.ie9Compat&&"BR"==a.tagName?(c=o.defaultView.getSelection(),{container:c[n?"anchorNode":"focusNode"],offset:c[n?"anchorOffset":"focusOffset"]}):{container:i,offset:e(a)};u=f+1}if(-1==f||f==c.length-1&&0>r){if(d.moveToElementText(i),d.setEndPoint("StartToStart",t),o=d.text.replace(/(rn|r)/g,"n").length,c=i.childNodes,!o)return a=c[c.length-1],a.nodeType!=CKEDITOR.NODE_TEXT?{container:i,offset:c.length}:{container:a,offset:a.nodeValue.length};for(i=c.length;o>0&&i>0;)s=c[--i],s.nodeType==CKEDITOR.NODE_TEXT&&(l=s,o-=s.nodeValue.length);return{container:l,offset:-o}}if(d.collapse(r>0?!0:!1),d.setEndPoint(r>0?"StartToStart":"EndToStart",t),o=d.text.replace(/(rn|r)/g,"n").length,!o)return{container:i,offset:e(a)+(r>0?0:1)};for(;o>0;)try{s=a[r>0?"previousSibling":"nextSibling"],s.nodeType==CKEDITOR.NODE_TEXT&&(o-=s.nodeValue.length,l=s),a=s}catch(m){return{container:i,offset:e(a)}}return{container:l,offset:r>0?-o:l.nodeValue.length+o}};return function(){var e=this.getNative(),n=e&&e.createRange(),i=this.getType();if(!e)return[];if(i==CKEDITOR.SELECTION_TEXT)return e=new CKEDITOR.dom.range(this.root),i=t(n,!0),e.setStart(new CKEDITOR.dom.node(i.container),i.offset),i=t(n),e.setEnd(new CKEDITOR.dom.node(i.container),i.offset),e.endContainer.getPosition(e.startContainer)&CKEDITOR.POSITION_PRECEDING&&e.endOffset<=e.startContainer.getIndex()&&e.collapse(),[e];if(i==CKEDITOR.SELECTION_ELEMENT){for(var i=[],o=0;o<n.length;o++){for(var a=n.item(o),s=a.parentNode,r=0,e=new CKEDITOR.dom.range(this.root);r<s.childNodes.length&&s.childNodes[r]!=a;r++);e.setStart(new CKEDITOR.dom.node(s),r),e.setEnd(new CKEDITOR.dom.node(s),r+1),i.push(e)}return i}return[]}}():function(){var e,t=[],n=this.getNative();if(!n)return t;for(var i=0;i<n.rangeCount;i++){var o=n.getRangeAt(i);e=new CKEDITOR.dom.range(this.root),e.setStart(new CKEDITOR.dom.node(o.startContainer),o.startOffset),e.setEnd(new CKEDITOR.dom.node(o.endContainer),o.endOffset),t.push(e)}return t};return function(t){var n=this._.cache;if(n.ranges&&!t)return n.ranges;if(n.ranges||(n.ranges=new CKEDITOR.dom.rangeList(e.call(this))),t)for(var i=n.ranges,o=0;o<i.length;o++){var a=i[o];if(a.getCommonAncestor().isReadOnly()&&i.splice(o,1),!a.collapsed){if(a.startContainer.isReadOnly())for(var s,t=a.startContainer;t&&!((s=t.type==CKEDITOR.NODE_ELEMENT)&&t.is("body")||!t.isReadOnly());)s&&"false"==t.getAttribute("contentEditable")&&a.setStartAfter(t),t=t.getParent();t=a.startContainer,s=a.endContainer;var r=a.startOffset,l=a.endOffset,c=a.clone();t&&t.type==CKEDITOR.NODE_TEXT&&(r>=t.getLength()?c.setStartAfter(t):c.setStartBefore(t)),s&&s.type==CKEDITOR.NODE_TEXT&&(l?c.setEndAfter(s):c.setEndBefore(s)),t=new CKEDITOR.dom.walker(c),t.evaluator=function(e){if(e.type==CKEDITOR.NODE_ELEMENT&&e.isReadOnly()){var t=a.clone();return a.setEndBefore(e),a.collapsed&&i.splice(o--,1),e.getPosition(c.endContainer)&CKEDITOR.POSITION_CONTAINS||(t.setStartAfter(e),t.collapsed||i.splice(o+1,0,t)),!0}return!1},t.next()}}return n.ranges}}(),getStartElement:function(){var e=this._.cache;if(void 0!==e.startElement)return e.startElement;var t;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var n=this.getRanges()[0];if(n){if(n.collapsed)t=n.startContainer,t.type!=CKEDITOR.NODE_ELEMENT&&(t=t.getParent());else{for(n.optimize();t=n.startContainer,n.startOffset==(t.getChildCount?t.getChildCount():t.getLength())&&!t.isBlockBoundary();)n.setStartAfter(t);if(t=n.startContainer,t.type!=CKEDITOR.NODE_ELEMENT)return t.getParent();if(t=t.getChild(n.startOffset),t&&t.type==CKEDITOR.NODE_ELEMENT)for(n=t.getFirst();n&&n.type==CKEDITOR.NODE_ELEMENT;)t=n,n=n.getFirst();else t=n.startContainer}t=t.$}}return e.startElement=t?new CKEDITOR.dom.element(t):null},getSelectedElement:function(){var e=this._.cache;if(void 0!==e.selectedElement)return e.selectedElement;var t=this,n=CKEDITOR.tools.tryThese(function(){return t.getNative().createRange().item(0)},function(){for(var e,n,i=t.getRanges()[0],o=2;!(!o||(e=i.getEnclosedNode())&&e.type==CKEDITOR.NODE_ELEMENT&&d[e.getName()]&&(n=e));o--)i.shrink(CKEDITOR.SHRINK_ELEMENT);return n.$});return e.selectedElement=n?new CKEDITOR.dom.element(n):null},getSelectedText:function(){var e=this._.cache;if(void 0!==e.selectedText)return e.selectedText;var t=this.getNative(),t=c?"Control"==t.type?"":t.createRange().text:t.toString();return e.selectedText=t},lock:function(){this.getRanges(),this.getStartElement(),this.getSelectedElement(),this.getSelectedText(),this._.cache.nativeSel=null,this.isLocked=1},unlock:function(e){if(this.isLocked){if(e)var t=this.getSelectedElement(),n=!t&&this.getRanges();this.isLocked=0,this.reset(),e&&(e=t||n[0].getCommonAncestor())&&e.getAscendant("body",1)&&(t?this.selectElement(t):this.selectRanges(n))}},reset:function(){this._.cache={}},selectElement:function(e){var t=new CKEDITOR.dom.range(this.root);t.setStartBefore(e),t.setEndAfter(e),this.selectRanges([t])},selectRanges:function(e){if(e.length)if(this.isLocked){var t=CKEDITOR.document.getActive();this.unlock(),this.selectRanges(e),this.lock(),!t.equals(this.root)&&t.focus()}else{if(c){var n=CKEDITOR.dom.walker.whitespaces(!0),o=/ufeff|u00a0/,s={table:1,tbody:1,tr:1};e.length>1&&(t=e[e.length-1],e[0].setEnd(t.endContainer,t.endOffset));var r,l,u,t=e[0],e=t.collapsed,h=t.getEnclosedNode();if(h&&h.type==CKEDITOR.NODE_ELEMENT&&h.getName()in d&&(!h.is("a")||!h.getText()))try{return u=h.$.createControlRange(),u.addElement(h.$),u.select(),void 0}catch(f){}(t.startContainer.type==CKEDITOR.NODE_ELEMENT&&t.startContainer.getName()in s||t.endContainer.type==CKEDITOR.NODE_ELEMENT&&t.endContainer.getName()in s)&&t.shrink(CKEDITOR.NODE_ELEMENT,!0),u=t.createBookmark();var m,s=u.startNode;e||(m=u.endNode),u=t.document.$.body.createTextRange(),u.moveToElementText(s.$),u.moveStart("character",1),m?(o=t.document.$.body.createTextRange(),o.moveToElementText(m.$),u.setEndPoint("EndToEnd",o),u.moveEnd("character",-1)):(r=s.getNext(n),l=s.hasAscendant("pre"),r=!(r&&r.getText&&r.getText().match(o))&&(l||!s.hasPrevious()||s.getPrevious().is&&s.getPrevious().is("br")),l=t.document.createElement("span"),l.setHtml("&#65279;"),l.insertBefore(s),r&&t.document.createText("").insertBefore(s)),t.setStartBefore(s),s.remove(),e?(r?(u.moveStart("character",-1),u.select(),t.document.$.selection.clear()):u.select(),t.moveToPosition(l,CKEDITOR.POSITION_BEFORE_START),l.remove()):(t.setEndBefore(m),m.remove(),u.select())}else{if(m=this.getNative(),!m)return;for(CKEDITOR.env.opera&&(t=this.document.$.createRange(),t.selectNodeContents(this.root.$),m.addRange(t)),this.removeAllRanges(),o=0;o<e.length;o++)if(o<e.length-1&&(t=e[o],u=e[o+1],l=t.clone(),l.setStart(t.endContainer,t.endOffset),l.setEnd(u.startContainer,u.startOffset),!l.collapsed&&(l.shrink(CKEDITOR.NODE_ELEMENT,!0),r=l.getCommonAncestor(),l=l.getEnclosedNode(),r.isReadOnly()||l&&l.isReadOnly())))u.setStart(t.startContainer,t.startOffset),e.splice(o--,1);else{t=e[o],u=this.document.$.createRange(),r=t.startContainer,CKEDITOR.env.opera&&t.collapsed&&r.type==CKEDITOR.NODE_ELEMENT&&(l=r.getChild(t.startOffset-1),n=r.getChild(t.startOffset),(!l&&!n&&r.is(CKEDITOR.dtd.$removeEmpty)||l&&l.type==CKEDITOR.NODE_ELEMENT||n&&n.type==CKEDITOR.NODE_ELEMENT)&&(t.insertNode(this.document.createText("")),t.collapse(1))),t.collapsed&&CKEDITOR.env.webkit&&i(t)&&(r=this.root,a(r,!1),l=r.getDocument().createText("​"),r.setCustomData("cke-fillingChar",l),t.insertNode(l),(r=l.getNext())&&!l.getPrevious()&&r.type==CKEDITOR.NODE_ELEMENT&&"br"==r.getName()?(a(this.root),t.moveToPosition(r,CKEDITOR.POSITION_BEFORE_START)):t.moveToPosition(l,CKEDITOR.POSITION_AFTER_END)),u.setStart(t.startContainer.$,t.startOffset);try{u.setEnd(t.endContainer.$,t.endOffset)}catch(p){if(!(p.toString().indexOf("NS_ERROR_ILLEGAL_VALUE")>=0))throw p;t.collapse(1),u.setEnd(t.endContainer.$,t.endOffset)}m.addRange(u)}}this.reset(),this.root.fire("selectionchange")}},createBookmarks:function(e){return this.getRanges().createBookmarks(e)},createBookmarks2:function(e){return this.getRanges().createBookmarks2(e)},selectBookmarks:function(e){for(var t=[],n=0;n<e.length;n++){var i=new CKEDITOR.dom.range(this.root);i.moveToBookmark(e[n]),t.push(i)}return this.selectRanges(t),this},getCommonAncestor:function(){var e=this.getRanges();return e[0].startContainer.getCommonAncestor(e[e.length-1].endContainer)},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){var e=this.getNative();try{e&&e[c?"empty":"removeAllRanges"]()}catch(t){}this.reset()}}}(),CKEDITOR.editor.prototype.attachStyleStateChange=function(e,t){var n=this._.styleStateChangeCallbacks;n||(n=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(e){for(var t=0;t<n.length;t++){var i=n[t],o=i.style.checkActive(e.data.path)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;i.fn.call(this,o)}})),n.push({style:e,fn:t})},CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function e(e,t){for(var n,i;(e=e.getParent())&&!e.equals(t);)if(e.getAttribute("data-nostyle"))n=e;else if(!i){var o=e.getAttribute("contentEditable");"false"==o?n=e:"true"==o&&(i=1)}return n}function t(t){var n=t.document;if(t.collapsed)n=p(this,n),t.insertNode(n),t.moveToPosition(n,CKEDITOR.POSITION_BEFORE_END);else{var i,o=this.element,a=this._.definition,s=a.ignoreReadonly,r=s||a.includeReadonly;void 0==r&&(r=t.root.getCustomData("cke_includeReadonly"));var l=CKEDITOR.dtd[o]||(i=!0,CKEDITOR.dtd.span);t.enlarge(CKEDITOR.ENLARGE_INLINE,1),t.trim();var c,d=t.createBookmark(),u=d.startNode,f=d.endNode,m=u;if(!s){var g=t.getCommonAncestor(),s=e(u,g),g=e(f,g);s&&(m=s.getNextSourceNode(!0)),g&&(f=g)}for(m.getPosition(f)==CKEDITOR.POSITION_FOLLOWING&&(m=0);m;){if(s=!1,m.equals(f))m=null,s=!0;else{var E=m.type,v=E==CKEDITOR.NODE_ELEMENT?m.getName():null,g=v&&"false"==m.getAttribute("contentEditable"),T=v&&m.getAttribute("data-nostyle");if(v&&m.data("cke-bookmark")){m=m.getNextSourceNode(!0);continue}if(v&&(!l[v]||T||g&&!r||(m.getPosition(f)|CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED)!=CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IDENTICAL+CKEDITOR.POSITION_IS_CONTAINED||a.childRule&&!a.childRule(m)))s=!0;else{var C=m.getParent();if(!C||!(C.getDtd()||CKEDITOR.dtd.span)[o]&&!i||a.parentRule&&!a.parentRule(C))s=!0;else if(c||v&&CKEDITOR.dtd.$removeEmpty[v]&&(m.getPosition(f)|CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED)!=CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IDENTICAL+CKEDITOR.POSITION_IS_CONTAINED||(c=t.clone(),c.setStartBefore(m)),E==CKEDITOR.NODE_TEXT||g||E==CKEDITOR.NODE_ELEMENT&&!m.getChildCount()){for(var I,E=m;(s=!E.getNext(O))&&(I=E.getParent(),l[I.getName()])&&(I.getPosition(u)|CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED)==CKEDITOR.POSITION_FOLLOWING+CKEDITOR.POSITION_IDENTICAL+CKEDITOR.POSITION_IS_CONTAINED&&(!a.childRule||a.childRule(I));)E=I;c.setEndAfter(E)}}m=m.getNextSourceNode(T||g&&!r)}if(s&&c&&!c.collapsed){for(var b,y,D,s=p(this,n),g=s.hasAttributes(),T=c.getCommonAncestor(),E={},v={},C={},R={};s&&T;){if(T.getName()==o){for(b in a.attributes)!R[b]&&(D=T.getAttribute(y))&&(s.getAttribute(b)==D?v[b]=1:R[b]=1);for(y in a.styles)!C[y]&&(D=T.getStyle(y))&&(s.getStyle(y)==D?E[y]=1:C[y]=1)}T=T.getParent()}for(b in v)s.removeAttribute(b);for(y in E)s.removeStyle(y);g&&!s.hasAttributes()&&(s=null),s?(c.extractContents().appendTo(s),h.call(this,s),c.insertNode(s),s.mergeSiblings(),CKEDITOR.env.ie||s.$.normalize()):(s=new CKEDITOR.dom.element("span"),c.extractContents().appendTo(s),c.insertNode(s),h.call(this,s),s.remove(!0)),c=null}}t.moveToBookmark(d),t.shrink(CKEDITOR.SHRINK_TEXT)}}function n(e){e.enlarge(CKEDITOR.ENLARGE_INLINE,1);var t=e.createBookmark(),n=t.startNode;if(e.collapsed){for(var i,o,a=new CKEDITOR.dom.elementPath(n.getParent(),e.root),s=0;s<a.elements.length&&(o=a.elements[s])&&o!=a.block&&o!=a.blockLimit;s++)if(this.checkElementRemovable(o)){var r;e.collapsed&&(e.checkBoundaryOfElement(o,CKEDITOR.END)||(r=e.checkBoundaryOfElement(o,CKEDITOR.START)))?(i=o,i.match=r?"start":"end"):(o.mergeSiblings(),o.getName()==this.element?u.call(this,o):f(o,v(this)[o.getName()]))}if(i){for(o=n,s=0;r=a.elements[s],!r.equals(i);s++)r.match||(r=r.clone(),r.append(o),o=r);o["start"==i.match?"insertBefore":"insertAfter"](i)}}else{var l=t.endNode,c=this,a=function(){for(var e=new CKEDITOR.dom.elementPath(n.getParent()),t=new CKEDITOR.dom.elementPath(l.getParent()),i=null,o=null,a=0;a<e.elements.length;a++){var s=e.elements[a];if(s==e.block||s==e.blockLimit)break;c.checkElementRemovable(s)&&(i=s)}for(a=0;a<t.elements.length&&(s=t.elements[a],s!=t.block&&s!=t.blockLimit);a++)c.checkElementRemovable(s)&&(o=s);o&&l.breakParent(o),i&&n.breakParent(i)};for(a(),i=n;!i.equals(l);)s=i.getNextSourceNode(),i.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(i)&&(i.getName()==this.element?u.call(this,i):f(i,v(this)[i.getName()]),s.type==CKEDITOR.NODE_ELEMENT&&s.contains(n)&&(a(),s=n.getNext())),i=s}e.moveToBookmark(t)}function i(e){var t=e.getEnclosedNode()||e.getCommonAncestor(!1,!0);(e=new CKEDITOR.dom.elementPath(t,e.root).contains(this.element,1))&&!e.isReadOnly()&&g(e,this)}function o(e){var t=e.getCommonAncestor(!0,!0);if(e=new CKEDITOR.dom.elementPath(t,e.root).contains(this.element,1)){var t=this._.definition,n=t.attributes;if(n)for(var i in n)e.removeAttribute(i,n[i]);if(t.styles)for(var o in t.styles)t.styles.hasOwnProperty(o)&&e.removeStyle(o)}}function a(e){var t=e.createBookmark(!0),n=e.createIterator();n.enforceRealBlocks=!0,this._.enterMode&&(n.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var i,o=e.document;i=n.getNextParagraph();)if(!i.isReadOnly()){var a=p(this,o,i);r(i,a)}e.moveToBookmark(t)}function s(e){var t=e.createBookmark(1),n=e.createIterator();n.enforceRealBlocks=!0,n.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var i;i=n.getNextParagraph();)if(this.checkElementRemovable(i))if(i.is("pre")){var o=this._.enterMode==CKEDITOR.ENTER_BR?null:e.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div");o&&i.copyAttributes(o),r(i,o)}else u.call(this,i);e.moveToBookmark(t)}function r(e,t){var n=!t;n&&(t=e.getDocument().createElement("div"),e.copyAttributes(t));var i=t&&t.is("pre"),o=e.is("pre"),a=!i&&o;if(i&&!o){if(o=t,(a=e.getBogus())&&a.remove(),a=e.getHtml(),a=c(a,/(?:^[ tnr]+)|(?:[ tnr]+$)/g,""),a=a.replace(/[ trn]*(<br[^>]*>)[ trn]*/gi,"$1"),a=a.replace(/([ tnr]+|&nbsp;)/g," "),a=a.replace(/<brb[^>]*>/gi,"n"),CKEDITOR.env.ie){var s=e.getDocument().createElement("div");s.append(o),o.$.outerHTML="<pre>"+a+"</pre>",o.copyAttributes(s.getFirst()),o=s.getFirst().remove()}else o.setHtml(a);t=o}else a?t=d(n?[e.getHtml()]:l(e),t):e.moveChildren(t);if(t.replace(e),i){var r,n=t;(r=n.getPrevious(R))&&r.is&&r.is("pre")&&(i=c(r.getHtml(),/n$/,"")+"nn"+c(n.getHtml(),/^n/,""),CKEDITOR.env.ie?n.$.outerHTML="<pre>"+i+"</pre>":n.setHtml(i),r.remove())
}else n&&m(t)}function l(e){e.getName();var t=[];return c(e.getOuterHtml(),/(Ss*)n(?:s|(<span[^>]+data-cke-bookmark.*?/span>))*n(?!$)/gi,function(e,t,n){return t+"</pre>"+n+"<pre>"}).replace(/<preb.*?>([sS]*?)</pre>/gi,function(e,n){t.push(n)}),t}function c(e,t,n){var i="",o="",e=e.replace(/(^<span[^>]+data-cke-bookmark.*?/span>)|(<span[^>]+data-cke-bookmark.*?/span>$)/gi,function(e,t,n){return t&&(i=t),n&&(o=n),""});return i+e.replace(t,n)+o}function d(e,t){var n;e.length>1&&(n=new CKEDITOR.dom.documentFragment(t.getDocument()));for(var i=0;i<e.length;i++){var o=e[i],o=o.replace(/(rn|r)/g,"n"),o=c(o,/^[ t]*n/,""),o=c(o,/n$/,""),o=c(o,/^[ t]+|[ t]+$/g,function(e,t){return 1==e.length?"&nbsp;":t?" "+CKEDITOR.tools.repeat("&nbsp;",e.length-1):CKEDITOR.tools.repeat("&nbsp;",e.length-1)+" "}),o=o.replace(/n/g,"<br>"),o=o.replace(/[ t]{2,}/g,function(e){return CKEDITOR.tools.repeat("&nbsp;",e.length-1)+" "});if(n){var a=t.clone();a.setHtml(o),n.append(a)}else t.setHtml(o)}return n||t}function u(e){var t,n=this._.definition,i=n.attributes,n=n.styles,o=v(this)[e.getName()],a=CKEDITOR.tools.isEmpty(i)&&CKEDITOR.tools.isEmpty(n);for(t in i)("class"!=t&&!this._.definition.fullMatch||e.getAttribute(t)==T(t,i[t]))&&(a=e.hasAttribute(t),e.removeAttribute(t));for(var s in n)this._.definition.fullMatch&&e.getStyle(s)!=T(s,n[s],!0)||(a=a||!!e.getStyle(s),e.removeStyle(s));f(e,o,I[e.getName()]),a&&(this._.definition.alwaysRemoveElement?m(e,1):!CKEDITOR.dtd.$block[e.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!e.hasAttributes()?m(e):e.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function h(e){for(var t=v(this),n=e.getElementsByTag(this.element),i=n.count();--i>=0;)u.call(this,n.getItem(i));for(var o in t)if(o!=this.element)for(n=e.getElementsByTag(o),i=n.count()-1;i>=0;i--){var a=n.getItem(i);f(a,t[o])}}function f(e,t,n){if(t=t&&t.attributes)for(var i=0;i<t.length;i++){var o,a=t[i][0];if(o=e.getAttribute(a)){var s=t[i][1];(null===s||s.test&&s.test(o)||"string"==typeof s&&o==s)&&e.removeAttribute(a)}}n||m(e)}function m(e,t){if(!e.hasAttributes()||t)if(CKEDITOR.dtd.$block[e.getName()]){var n=e.getPrevious(R),i=e.getNext(R);n&&(n.type==CKEDITOR.NODE_TEXT||!n.isBlockBoundary({br:1}))&&e.append("br",1),i&&(i.type==CKEDITOR.NODE_TEXT||!i.isBlockBoundary({br:1}))&&e.append("br"),e.remove(!0)}else n=e.getFirst(),i=e.getLast(),e.remove(!0),n&&(n.type==CKEDITOR.NODE_ELEMENT&&n.mergeSiblings(),i&&!n.equals(i)&&i.type==CKEDITOR.NODE_ELEMENT&&i.mergeSiblings())}function p(e,t,n){var i;return i=e.element,"*"==i&&(i="span"),i=new CKEDITOR.dom.element(i,t),n&&n.copyAttributes(i),i=g(i,e),t.getCustomData("doc_processing_style")&&i.hasAttribute("id")?i.removeAttribute("id"):t.setCustomData("doc_processing_style",1),i}function g(e,t){var n=t._.definition,i=n.attributes,n=CKEDITOR.style.getStyleText(n);if(i)for(var o in i)e.setAttribute(o,i[o]);return n&&e.setAttribute("style",n),e}function E(e,t){for(var n in e)e[n]=e[n].replace(D,function(e,n){return t[n]})}function v(e){if(e._.overrides)return e._.overrides;var t=e._.overrides={},n=e._.definition.overrides;if(n){CKEDITOR.tools.isArray(n)||(n=[n]);for(var i=0;i<n.length;i++){var o,a,s=n[i];if("string"==typeof s?o=s.toLowerCase():(o=s.element?s.element.toLowerCase():e.element,a=s.attributes),s=t[o]||(t[o]={}),a){var r,s=s.attributes=s.attributes||[];for(r in a)s.push([r.toLowerCase(),a[r]])}}}return t}function T(e,t,n){var i=new CKEDITOR.dom.element("span");return i[n?"setStyle":"setAttribute"](e,t),i[n?"getStyle":"getAttribute"](e)}function C(e,t){for(var n,i=e.document,o=e.getRanges(),a=t?this.removeFromRange:this.applyToRange,s=o.createIterator();n=s.getNextRange();)a.call(this,n);e.selectRanges(o),i.removeCustomData("doc_processing_style")}var I={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},b={a:1,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},y=/s*(?:;s*|$)/,D=/#((.+?))/g,O=CKEDITOR.dom.walker.bookmark(0,1),R=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(e,t){var n=e.attributes;n&&n.style&&(e.styles=CKEDITOR.tools.extend({},e.styles,CKEDITOR.tools.parseCssText(n.style)),delete n.style),t&&(e=CKEDITOR.tools.clone(e),E(e.attributes,t),E(e.styles,t)),n=this.element=e.element?"string"==typeof e.element?e.element.toLowerCase():e.element:"*",this.type=e.type||(I[n]?CKEDITOR.STYLE_BLOCK:b[n]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE),"object"==typeof this.element&&(this.type=CKEDITOR.STYLE_OBJECT),this._={definition:e}},CKEDITOR.editor.prototype.applyStyle=function(e){C.call(e,this.getSelection())},CKEDITOR.editor.prototype.removeStyle=function(e){C.call(e,this.getSelection(),1)},CKEDITOR.style.prototype={apply:function(e){C.call(this,e.getSelection())},remove:function(e){C.call(this,e.getSelection(),1)},applyToRange:function(e){return(this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?t:this.type==CKEDITOR.STYLE_BLOCK?a:this.type==CKEDITOR.STYLE_OBJECT?i:null).call(this,e)},removeFromRange:function(e){return(this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?n:this.type==CKEDITOR.STYLE_BLOCK?s:this.type==CKEDITOR.STYLE_OBJECT?o:null).call(this,e)},applyToObject:function(e){g(e,this)},checkActive:function(e){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(e.block||e.blockLimit,!0);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var t,n=e.elements,i=0;i<n.length;i++)if(t=n[i],this.type!=CKEDITOR.STYLE_INLINE||t!=e.block&&t!=e.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var o=t.getName();if(!("string"==typeof this.element?o==this.element:o in this.element))continue}if(this.checkElementRemovable(t,!0))return!0}}return!1},checkApplicable:function(e){switch(this.type){case CKEDITOR.STYLE_OBJECT:return e.contains(this.element)}return!0},checkElementMatch:function(e,t){var n=this._.definition;if(!e||!n.ignoreReadonly&&e.isReadOnly())return!1;var i=e.getName();if("string"==typeof this.element?i==this.element:i in this.element){if(!t&&!e.hasAttributes())return!0;if(i=n._AC)n=i;else{var i={},o=0,a=n.attributes;if(a)for(var s in a)o++,i[s]=a[s];(s=CKEDITOR.style.getStyleText(n))&&(i.style||o++,i.style=s),i._length=o,n=n._AC=i}if(!n._length)return!0;for(var r in n)if("_length"!=r){if(o=e.getAttribute(r)||"","style"==r)e:{i=n[r],"string"==typeof i&&(i=CKEDITOR.tools.parseCssText(i)),"string"==typeof o&&(o=CKEDITOR.tools.parseCssText(o,!0)),s=void 0;for(s in i)if(!(s in o)||o[s]!=i[s]&&"inherit"!=i[s]&&"inherit"!=o[s]){i=!1;break e}i=!0}else i=n[r]==o;if(i){if(!t)return!0}else if(t)return!1}if(t)return!0}return!1},checkElementRemovable:function(e,t){if(this.checkElementMatch(e,t))return!0;var n=v(this)[e.getName()];if(n){var i;if(!(n=n.attributes))return!0;for(var o=0;o<n.length;o++)if(i=n[o][0],i=e.getAttribute(i)){var a=n[o][1];if(null===a||"string"==typeof a&&i==a||a.test(i))return!0}}return!1},buildPreview:function(e){var t=this._.definition,n=[],i=t.element;"bdo"==i&&(i="span");var n=["<",i],o=t.attributes;if(o)for(var a in o)n.push(" ",a,'
="',o[a],'"');return(o=CKEDITOR.style.getStyleText(t))&&n.push(' style="',o,'"'),n.push(">",e||t.name,"</",i,">"),n.join("")}},CKEDITOR.style.getStyleText=function(e){var t=e._ST;if(t)return t;var t=e.styles,n=e.attributes&&e.attributes.style||"",i="";n.length&&(n=n.replace(y,";"));for(var o in t){var a=t[o],s=(o+":"+a).replace(y,";");"inherit"==a?i+=s:n+=s}return n.length&&(n=CKEDITOR.tools.normalizeCssText(n,!0)),e._ST=n+i}}(),CKEDITOR.styleCommand=function(e){this.style=e},CKEDITOR.styleCommand.prototype.exec=function(e){e.focus(),this.state==CKEDITOR.TRISTATE_OFF?e.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&e.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(e,t,n){CKEDITOR.stylesSet.addExternal(e,t,""),CKEDITOR.stylesSet.load(e,n)},CKEDITOR.editor.prototype.getStylesSet=function(e){if(this._.stylesDefinitions)e(this._.stylesDefinitions);else{var t=this,n=t.config.stylesCombo_stylesSet||t.config.stylesSet||"default";if(n instanceof Array)t._.stylesDefinitions=n,e(n);else{var n=n.split(":"),i=n[0];CKEDITOR.stylesSet.addExternal(i,n[1]?n.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),""),CKEDITOR.stylesSet.load(i,function(n){t._.stylesDefinitions=n[i],e(t._.stylesDefinitions)})}}},CKEDITOR.dom.comment=function(e,t){"string"==typeof e&&(e=(t?t.$:document).createComment(e)),CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"<!--"+this.$.nodeValue+"-->"}}),function(){var e,t={};for(e in CKEDITOR.dtd.$blockLimit)e in CKEDITOR.dtd.$list||(t[e]=1);var n={};for(e in CKEDITOR.dtd.$block)e in CKEDITOR.dtd.$blockLimit||e in CKEDITOR.dtd.$empty||(n[e]=1);CKEDITOR.dom.elementPath=function(e,i){var o=null,a=null,s=[],i=i||e.getDocument().getBody(),r=e;do if(r.type==CKEDITOR.NODE_ELEMENT){if(s.push(r),!this.lastElement&&(this.lastElement=r,r.is(CKEDITOR.dtd.$object)))continue;var l=r.getName();if(!a&&(!o&&n[l]&&(o=r),t[l])){var c;if(c=!o){if(l="div"==l){e:{l=r.getChildren(),c=0;for(var d=l.count();d>c;c++){var u=l.getItem(c);if(u.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[u.getName()]){l=!0;break e}}l=!1}l=!l&&!r.equals(i)}c=l}c?o=r:a=r}if(r.equals(i))break}while(r=r.getParent());this.block=o,this.blockLimit=a,this.root=i,this.elements=s}}(),CKEDITOR.dom.elementPath.prototype={compare:function(e){var t=this.elements,e=e&&e.elements;if(!e||t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0},contains:function(e,t,n){var i;"string"==typeof e&&(i=function(t){return t.getName()==e}),e instanceof CKEDITOR.dom.element?i=function(t){return t.equals(e)}:CKEDITOR.tools.isArray(e)?i=function(t){return CKEDITOR.tools.indexOf(e,t.getName())>-1}:"function"==typeof e?i=e:"object"==typeof e&&(i=function(t){return t.getName()in e});var o=this.elements,a=o.length;for(t&&a--,n&&(o=Array.prototype.slice.call(o,0),o.reverse()),t=0;a>t;t++)if(i(o[t]))return o[t];return null},isContextFor:function(e){var t;return e in CKEDITOR.dtd.$block?(t=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!t.getDtd()[e]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(e,t){"string"==typeof e&&(e=(t?t.$:document).createTextNode(e)),this.$=e},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(e){this.$.nodeValue=e},split:function(e){var t=this.$.parentNode,n=t.childNodes.length,i=this.getLength(),o=this.getDocument(),a=new CKEDITOR.dom.text(this.$.splitText(e),o);return t.childNodes.length==n&&(e>=i?(a=o.createText(""),a.insertAfter(this)):(e=o.createText(""),e.insertAfter(a),e.remove())),a},substring:function(e,t){return"number"!=typeof t?this.$.nodeValue.substr(e):this.$.nodeValue.substring(e,t)}}),function(){function e(e,t,n){var i=e.serializable,o=t[n?"endContainer":"startContainer"],a=n?"endOffset":"startOffset",s=i?t.document.getById(e.startNode):e.startNode,e=i?t.document.getById(e.endNode):e.endNode;return o.equals(s.getPrevious())?(t.startOffset=t.startOffset-o.getLength()-e.getPrevious().getLength(),o=e.getNext()):o.equals(e.getPrevious())&&(t.startOffset=t.startOffset-o.getLength(),o=e.getNext()),o.equals(s.getParent())&&t[a]++,o.equals(e.getParent())&&t[a]++,t[n?"endContainer":"startContainer"]=o,t}CKEDITOR.dom.rangeList=function(e){return e instanceof CKEDITOR.dom.rangeList?e:(e?e instanceof CKEDITOR.dom.range&&(e=[e]):e=[],CKEDITOR.tools.extend(e,t))};var t={createIterator:function(){var e,t=this,n=CKEDITOR.dom.walker.bookmark(),i=[];return{getNextRange:function(o){e=void 0==e?0:e+1;var a=t[e];if(a&&t.length>1){if(!e)for(var s=t.length-1;s>=0;s--)i.unshift(t[s].createBookmark(!0));if(o)for(var r=0;t[e+r+1];){for(var l=a.document,o=0,s=l.getById(i[r].endNode),l=l.getById(i[r+1].startNode);;){if(s=s.getNextSourceNode(!1),l.equals(s))o=1;else if(n(s)||s.type==CKEDITOR.NODE_ELEMENT&&s.isBlockBoundary())continue;break}if(!o)break;r++}for(a.moveToBookmark(i.shift());r--;)s=t[++e],s.moveToBookmark(i.shift()),a.setEnd(s.endContainer,s.endOffset)}return a}}},createBookmarks:function(t){for(var n,i=[],o=0;o<this.length;o++){i.push(n=this[o].createBookmark(t,!0));for(var a=o+1;a<this.length;a++)this[a]=e(n,this[a]),this[a]=e(n,this[a],!0)}return i},createBookmarks2:function(e){for(var t=[],n=0;n<this.length;n++)t.push(this[n].createBookmark2(e));return t},moveToBookmarks:function(e){for(var t=0;t<this.length;t++)this[t].moveToBookmark(e[t])}}}(),function(){function e(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function t(t){var n=CKEDITOR.skin["ua_"+t],i=CKEDITOR.env;if(n)for(var o,n=n.split(",").sort(function(e,t){return e>t?-1:1}),a=0;a<n.length;a++)if(o=n[a],i.ie&&(o.replace(/^ie/,"")==i.version||i.quirks&&"iequirks"==o)&&(o="ie"),i[o]){t+="_"+n[a];break}return CKEDITOR.getUrl(e()+t+".css")}function n(e,n){a[e]||(CKEDITOR.document.appendStyleSheet(t(e)),a[e]=1),n&&n()}function i(e){var t=e.getById(s);return t||(t=e.getHead().append("style"),t.setAttribute("id",s),t.setAttribute("type","text/css")),t}function o(e,t,n){var i,o,a;if(CKEDITOR.env.webkit)for(t=t.split("}").slice(0,-1),o=0;o<t.length;o++)t[o]=t[o].split("{");for(var s=0;s<e.length;s++)if(CKEDITOR.env.webkit)for(o=0;o<t.length;o++){for(a=t[o][1],i=0;i<n.length;i++)a=a.replace(n[i][0],n[i][1]);e[s].$.sheet.addRule(t[o][0],a)}else{for(a=t,i=0;i<n.length;i++)a=a.replace(n[i][0],n[i][1]);CKEDITOR.env.ie?e[s].$.styleSheet.cssText=e[s].$.styleSheet.cssText+a:e[s].$.innerHTML=e[s].$.innerHTML+a}}var a={};CKEDITOR.skin={path:e,loadPart:function(t,i){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e()+"skin.js"),function(){n(t,i)}):n(t,i)},getPath:function(e){return CKEDITOR.getUrl(t(e))},icons:{},addIcon:function(e,t,n){e=e.toLowerCase(),this.icons[e]||(this.icons[e]={path:t,offset:n||0})},getIconStyle:function(e,t,n,i){var o;return e&&(e=e.toLowerCase(),t&&(o=this.icons[e+"-rtl"]),o||(o=this.icons[e])),e=n||o&&o.path||"",i=i||o&&o.offset,e&&"background-image:url("+CKEDITOR.getUrl(e)+");background-position:0 "+i+"px;"}},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(e){var t=i(CKEDITOR.document);return(this.setUiColor=function(e){var n=CKEDITOR.skin.chameleon,i=[[l,e]];this.uiColor=e,o([t],n(this,"editor"),i),o(r,n(this,"panel"),i)}).call(this,e)}});var s="cke_ui_color",r=[],l=/$color/g;CKEDITOR.on("instanceLoaded",function(e){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var t=e.editor,e=function(e){if(e=(e.data[0]||e.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument(),!e.getById("cke_ui_color")){e=i(e),r.push(e);var n=t.getUiColor();n&&o([e],CKEDITOR.skin.chameleon(t,"panel"),[[l,n]])}};t.on("panelShow",e),t.on("menuShow",e),t.config.uiColor&&t.setUiColor(t.config.uiColor)}})}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var e=CKEDITOR.dom.element.createFromHtml('<div style="width:0px;height:0px;position:absolute;left:-10000px;border: 1px solid;border-color: red blue;"></div>',CKEDITOR.document);e.appendTo(CKEDITOR.document.getHead());try{CKEDITOR.env.hc=e.getComputedStyle("border-top-color")==e.getComputedStyle("border-right-color")}catch(t){CKEDITOR.env.hc=!1}e.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"),e=CKEDITOR._.pending){delete CKEDITOR._.pending;for(var n=0;n<e.length;n++)CKEDITOR.editor.prototype.constructor.apply(e[n][0],e[n][1]),CKEDITOR.add(e[n][0])}}(),CKEDITOR.skin.name="moono",CKEDITOR.skin.ua_editor="ie,iequirks,ie7,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,iequirks,ie7,ie8,opera",CKEDITOR.skin.chameleon=function(){var e=function(){return function(e,t){for(var n=e.match(/[^#]./g),i=0;3>i;i++){var o,a=n,s=i;o=parseInt(n[i],16),o=("0"+(0>t?0|o*(1+t):0|o+(255-o)*t).toString(16)).slice(-2),a[s]=o}return"#"+n.join("")}}(),t=function(){var e=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(t,n){return e.output({from:t,to:n})}}(),n={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(i,o){var a=i.uiColor,a={id:"."+i.id,defaultBorder:e(a,-.1),defaultGradient:t(e(a,.9),a),lightGradient:t(e(a,1),e(a,.7)),mediumGradient:t(e(a,.8),e(a,.5)),ckeButtonOn:t(e(a,.6),e(a,.7)),ckeResizer:e(a,-.4),ckeToolbarSeparator:e(a,.5),ckeColorauto:e(a,.8),dialogBody:e(a,.7),dialogTabSelected:t("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:e(a,-.6),elementsPathBg:a,menubuttonIcon:e(a,.5),menubuttonIconHover:e(a,.3)};return n[o].output(a).replace(/[/g,"{").replace(/]/g,"}")}}(),CKEDITOR.plugins.add("dialogui",{onLoad:function(){var e=function(e){this._||(this._={}),this._["default"]=this._.initValue=e["default"]||"",this._.required=e.required||!1;for(var t=[this._],n=1;n<arguments.length;n++)t.push(arguments[n]);return t.push(!0),CKEDITOR.tools.extend.apply(CKEDITOR.tools,t),this._},t={build:function(e,t,n){return new CKEDITOR.ui.dialog.textInput(e,t,n)}},n={build:function(e,t,n){return new CKEDITOR.ui.dialog[t.type](e,t,n)}},i={isChanged:function(){return this.getValue()!=this.getInitValue()},reset:function(e){this.setValue(this.getInitValue(),e)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},o=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(e,t){this._.domOnChangeRegistered||(e.on("load",function(){this.getInputElement().on("change",function(){e.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0),this.on("change",t)}},!0),a=/^on([A-Z]w+)/,s=function(e){for(var t in e)(a.test(t)||"title"==t||"type"==t)&&delete e[t];return e};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(t,n,i,o){if(!(4>arguments.length)){var a=e.call(this,n);a.labelId=CKEDITOR.tools.getNextId()+"_label",this._.children=[],CKEDITOR.ui.dialog.uiElement.call(this,t,n,i,"div",null,{role:"presentation"},function(){var e=[],i=n.required?" cke_required":"";return"horizontal"!=n.labelLayout?e.push('<label class="cke_dialog_ui_labeled_label'+i+'" ',' id="'+a.labelId+'"',a.inputId?' for="'+a.inputId+'"':"",(n.labelStyle?' style="'+n.labelStyle+'"':"")+">",n.label,"</label>",'<div class="cke_dialog_ui_labeled_content"'+(n.controlStyle?' style="'+n.controlStyle+'"':"")+' role="presentation">',o.call(this,t,n),"</div>"):(i={type:"hbox",widths:n.widths,padding:0,children:[{type:"html",html:'<label class="cke_dialog_ui_labeled_label'+i+'" id="'+a.labelId+'" for="'+a.inputId+'"'+(n.labelStyle?' style="'+n.labelStyle+'"':"")+">"+CKEDITOR.tools.htmlEncode(n.label)+"</span>"},{type:"html",html:'<span class="cke_dialog_ui_labeled_content"'+(n.controlStyle?' style="'+n.controlStyle+'"':"")+">"+o.call(this,t,n)+"</span>"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(t,i,e)),e.join("")})}},textInput:function(t,n,i){if(!(3>arguments.length)){e.call(this,n);var o=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",a={"class":"cke_dialog_ui_input_"+n.type,id:o,type:n.type};n.validate&&(this.validate=n.validate),n.maxLength&&(a.maxlength=n.maxLength),n.size&&(a.size=n.size),n.inputStyle&&(a.style=n.inputStyle);var s=this,r=!1;t.on("load",function(){s.getInputElement().on("keydown",function(e){13==e.data.getKeystroke()&&(r=!0)}),s.getInputElement().on("keyup",function(e){13==e.data.getKeystroke()&&r&&(t.getButton("ok")&&setTimeout(function(){t.getButton("ok").click()},0),r=!1)},null,null,1e3)}),CKEDITOR.ui.dialog.labeledElement.call(this,t,n,i,function(){var e=['<div class="cke_dialog_ui_input_',n.type,'" role="presentation"'];n.width&&e.push('style="width:'+n.width+'" '),e.push("><input "),a["aria-labelledby"]=this._.labelId,this._.required&&(a["aria-required"]=this._.required);for(var t in a)e.push(t+'="'+a[t]+'" ');return e.push(" /></div>"),e.join("")})}},textarea:function(t,n,i){if(!(3>arguments.length)){e.call(this,n);var o=this,a=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",s={};n.validate&&(this.validate=n.validate),s.rows=n.rows||5,s.cols=n.cols||20,"undefined"!=typeof n.inputStyle&&(s.style=n.inputStyle),CKEDITOR.ui.dialog.labeledElement.call(this,t,n,i,function(){s["aria-labelledby"]=this._.labelId,this._.required&&(s["aria-required"]=this._.required);var e,t=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea class="cke_dialog_ui_input_textarea" id="',a,'" '];for(e in s)t.push(e+'="'+CKEDITOR.tools.htmlEncode(s[e])+'" ');return t.push(">",CKEDITOR.tools.htmlEncode(o._["default"]),"</textarea></div>"),t.join("")})}},checkbox:function(t,n,i){if(!(3>arguments.length)){var o=e.call(this,n,{"default":!!n["default"]});n.validate&&(this.validate=n.validate),CKEDITOR.ui.dialog.uiElement.call(this,t,n,i,"span",null,null,function(){var e=CKEDITOR.tools.extend({},n,{id:n.id?n.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),i=[],a=CKEDITOR.tools.getNextId()+"_label",r={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":a};return s(e),n["default"]&&(r.checked="checked"),"undefined"!=typeof e.inputStyle&&(e.style=e.inputStyle),o.checkbox=new CKEDITOR.ui.dialog.uiElement(t,e,i,"input",null,r),i.push(' <label id="',a,'" for="',r.id,'"'+(n.labelStyle?' style="'+n.labelStyle+'"':"")+">",CKEDITOR.tools.htmlEncode(n.label),"</label>"),i.join("")})}},radio:function(t,n,i){if(!(3>arguments.length)){e.call(this,n),this._["default"]||(this._["default"]=this._.initValue=n.items[0][1]),n.validate&&(this.validate=n.valdiate);var o=[],a=this;CKEDITOR.ui.dialog.labeledElement.call(this,t,n,i,function(){for(var e=[],i=[],r=n.id?n.id+"_radio":CKEDITOR.tools.getNextId()+"_radio",l=0;l<n.items.length;l++){var c=n.items[l],d=void 0!==c[2]?c[2]:c[0],u=void 0!==c[1]?c[1]:c[0],h=CKEDITOR.tools.getNextId()+"_radio_input",f=h+"_label",h=CKEDITOR.tools.extend({},n,{id:h,title:null,type:null},!0),d=CKEDITOR.tools.extend({},h,{title:d},!0),m={type:"radio","class":"cke_dialog_ui_radio_input",name:r,value:u,"aria-labelledby":f},p=[];a._["default"]==u&&(m.checked="checked"),s(h),s(d),"undefined"!=typeof h.inputStyle&&(h.style=h.inputStyle),o.push(new CKEDITOR.ui.dialog.uiElement(t,h,p,"input",null,m)),p.push(" "),new CKEDITOR.ui.dialog.uiElement(t,d,p,"label",null,{id:f,"for":m.id},c[0]),e.push(p.join(""))}return new CKEDITOR.ui.dialog.hbox(t,o,e,i),i.join("")}),this._.children=o}},button:function(t,n,i){if(arguments.length){"function"==typeof n&&(n=n(t.getParentEditor())),e.call(this,n,{disabled:n.disabled||!1}),CKEDITOR.event.implementOn(this);var o=this;t.on("load",function(){var e=this.getElement();!function(){e.on("click",o.click,o),e.on("keydown",function(e){e.data.getKeystroke()in{32:1}&&(o.click(),e.data.preventDefault())})}(),e.unselectable()},this);var a=CKEDITOR.tools.extend({},n);delete a.style;var s=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,t,a,i,"a",null,{style:n.style,href:"javascript:void(0)",title:n.label,hidefocus:"true","class":n["class"],role:"button","aria-labelledby":s},'<span id="'+s+'" class="cke_dialog_ui_button">'+CKEDITOR.tools.htmlEncode(n.label)+"</span>")}},select:function(t,n,i){if(!(3>arguments.length)){var o=e.call(this,n);n.validate&&(this.validate=n.validate),o.inputId=CKEDITOR.tools.getNextId()+"_select",CKEDITOR.ui.dialog.labeledElement.call(this,t,n,i,function(){var e=CKEDITOR.tools.extend({},n,{id:n.id?n.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),i=[],a=[],r={id:o.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};i.push('<div class="cke_dialog_ui_input_',n.type,'" role="presentation"'),n.width&&i.push('style="width:'+n.width+'" '),i.push(">"),void 0!=n.size&&(r.size=n.size),void 0!=n.multiple&&(r.multiple=n.multiple),s(e);for(var l,c=0;c<n.items.length&&(l=n.items[c]);c++)a.push('<option value="',CKEDITOR.tools.htmlEncode(void 0!==l[1]?l[1]:l[0]).replace(/"/g,"&quot;"),'" /> ',CKEDITOR.tools.htmlEncode(l[0]));return"undefined"!=typeof e.inputStyle&&(e.style=e.inputStyle),o.select=new CKEDITOR.ui.dialog.uiElement(t,e,i,"select",null,r,a.join("")),i.push("</div>"),i.join("")})}},file:function(t,n,i){if(!(3>arguments.length)){void 0===n["default"]&&(n["default"]="");var o=CKEDITOR.tools.extend(e.call(this,n),{definition:n,buttons:[]});n.validate&&(this.validate=n.validate),t.on("load",function(){CKEDITOR.document.getById(o.frameId).getParent().addClass("cke_dialog_ui_input_file")}),CKEDITOR.ui.dialog.labeledElement.call(this,t,n,i,function(){o.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var e=CKEDITOR.env.isCustomDomain(),t=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" role="presentation" id="',o.frameId,'" title="',n.label,'" src="javascript:void('];return t.push(e?"(function(){document.open();document.domain='"+document.domain+"';document.close();})()":"0"),t.push(')"></iframe>'),t.join("")})}},fileButton:function(t,n,i){if(!(3>arguments.length)){e.call(this,n);var o=this;n.validate&&(this.validate=n.validate);var a=CKEDITOR.tools.extend({},n),s=a.onClick;a.className=(a.className?a.className+" ":"")+"cke_dialog_ui_button",a.onClick=function(e){var i=n["for"];s&&s.call(this,e)===!1||(t.getContentElement(i[0],i[1]).submit(),this.disable())},t.on("load",function(){t.getContentElement(n["for"][0],n["for"][1])._.buttons.push(o)}),CKEDITOR.ui.dialog.button.call(this,t,a,i)}},html:function(){var e=/^s*<[w:]+s+([^>]*)?>/,t=/^(s*<[w:]+(?:s+[^>]*)?)((?:.|r|n)+)$/,n=//$/;return function(i,o,a){if(!(3>arguments.length)){var s=[],r=o.html;"<"!=r.charAt(0)&&(r="<span>"+r+"</span>");var l=o.focus;l&&(this.focus=function(){this.selectParentTab(),"function"==typeof l&&l.call(this),this.fire("focus")},o.isFocusable&&(this.isFocusable=this.isFocusable),this.keyboardFocusable=!0),CKEDITOR.ui.dialog.uiElement.call(this,i,o,s,"span",null,null,""),s=s.join("").match(e),r=r.match(t)||["","",""],n.test(r[1])&&(r[1]=r[1].slice(0,-1),r[2]="/"+r[2]),a.push([r[1]," ",s[1]||"",r[2]].join(""))}}}(),fieldset:function(e,t,n,i,o){var a=o.label;this._={children:t},CKEDITOR.ui.dialog.uiElement.call(this,e,o,i,"fieldset",null,null,function(){var e=[];a&&e.push("<legend"+(o.labelStyle?' style="'+o.labelStyle+'"':"")+">"+a+"</legend>");for(var t=0;t<n.length;t++)e.push(n[t]);return e.join("")})}},!0),CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement,CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setLabel:function(e){var t=CKEDITOR.document.getById(this._.labelId);return 1>t.getChildCount()?new CKEDITOR.dom.text(e,CKEDITOR.document).appendTo(t):t.getChild(0).$.nodeValue=e,this},getLabel:function(){var e=CKEDITOR.document.getById(this._.labelId);return!e||1>e.getChildCount()?"":e.getChild(0).getText()},eventProcessors:o},!0),CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var e=this.getElement();e&&e.removeClass("cke_disabled")},disable:function(){this._.disabled=!0,this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(e,t){this.on("click",function(){t.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0),CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},focus:function(){var e=this.selectParentTab();setTimeout(function(){var t=e.getInputElement();t&&t.$.focus()},0)},select:function(){var e=this.selectParentTab();setTimeout(function(){var t=e.getInputElement();t&&(t.$.focus(),t.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(e){return!e&&(e=""),CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},keyboardFocusable:!0},i,!0),CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput,CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(e,t,n){var i=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),o=this.getInputElement().$;
return i.$.text=e,i.$.value=void 0===t||null===t?e:t,void 0===n||null===n?CKEDITOR.env.ie?o.add(i.$):o.add(i.$,null):o.add(i.$,n),this},remove:function(e){return this.getInputElement().$.remove(e),this},clear:function(){for(var e=this.getInputElement().$;0<e.length;)e.remove(0);return this},keyboardFocusable:!0},i,!0),CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(e,t){this.getInputElement().$.checked=e,!t&&this.fire("change",{value:e})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(e,t){return!CKEDITOR.env.ie||8<CKEDITOR.env.version?o.onChange.apply(this,arguments):(e.on("load",function(){var e=this._.checkbox.getElement();e.on("propertychange",function(t){t=t.data.$,"checked"==t.propertyName&&this.fire("change",{value:e.$.checked})},this)},this),this.on("change",t),null)}},keyboardFocusable:!0},i,!0),CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(e,t){for(var n,i=this._.children,o=0;o<i.length&&(n=i[o]);o++)n.getElement().$.checked=n.getValue()==e;!t&&this.fire("change",{value:e})},getValue:function(){for(var e=this._.children,t=0;t<e.length;t++)if(e[t].getElement().$.checked)return e[t].getValue();return null},accessKeyUp:function(){var e,t=this._.children;for(e=0;e<t.length;e++)if(t[e].getElement().$.checked)return t[e].getElement().focus(),void 0;t[0].getElement().focus()},eventProcessors:{onChange:function(e,t){return CKEDITOR.env.ie?(e.on("load",function(){for(var e=this._.children,t=this,n=0;n<e.length;n++)e[n].getElement().on("propertychange",function(e){e=e.data.$,"checked"==e.propertyName&&this.$.checked&&t.fire("change",{value:this.getAttribute("value")})})},this),this.on("change",t),null):o.onChange.apply(this,arguments)}},keyboardFocusable:!0},i,!0),CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,i,{getInputElement:function(){var e=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<e.$.forms.length?new CKEDITOR.dom.element(e.$.forms[0].elements[0]):this.getElement()},submit:function(){return this.getInputElement().getParent().$.submit(),this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(e){var t,n,i=/^on([A-Z]w+)/,o=function(e,t,n,i){e.on("formLoaded",function(){e.getInputElement().on(n,i,e)})};for(n in e)(t=n.match(i))&&(this.eventProcessors[n]?this.eventProcessors[n].call(this,this._.dialog,e[n]):o(this,this._.dialog,t[1].toLowerCase(),e[n]));return this},reset:function(){function e(){n.$.open(),CKEDITOR.env.isCustomDomain()&&(n.$.domain=document.domain);var e="";i.size&&(e=i.size-(CKEDITOR.env.ie?7:0));var c=t.frameId+"_input";for(n.$.write(['<html dir="'+r+'" lang="'+l+'"><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">','<form enctype="multipart/form-data" method="POST" dir="'+r+'" lang="'+l+'" action="',CKEDITOR.tools.htmlEncode(i.action),'"><label id="',t.labelId,'" for="',c,'" style="display:none">',CKEDITOR.tools.htmlEncode(i.label),'</label><input id="',c,'" aria-labelledby="',t.labelId,'" type="file" name="',CKEDITOR.tools.htmlEncode(i.id||"cke_upload"),'" size="',CKEDITOR.tools.htmlEncode(e>0?e:""),'" /></form></body></html>',"<script>window.parent.CKEDITOR.tools.callFunction("+a+");","window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction("+s+")}</script>"].join("")),n.$.close(),e=0;e<o.length;e++)o[e].enable()}var t=this._,n=CKEDITOR.document.getById(t.frameId).getFrameDocument(),i=t.definition,o=t.buttons,a=this.formLoadedNumber,s=this.formUnloadNumber,r=t.dialog._.editor.lang.dir,l=t.dialog._.editor.langCode;a||(a=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),s=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(a),CKEDITOR.tools.removeFunction(s)})),CKEDITOR.env.gecko?setTimeout(e,500):e()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(e,t){this._.domOnChangeRegistered||(this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0),this.on("change",t)}},keyboardFocusable:!0},!0),CKEDITOR.ui.dialog.fileButton.prototype=new CKEDITOR.ui.dialog.button,CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype),CKEDITOR.dialog.addUIElement("text",t),CKEDITOR.dialog.addUIElement("password",t),CKEDITOR.dialog.addUIElement("textarea",n),CKEDITOR.dialog.addUIElement("checkbox",n),CKEDITOR.dialog.addUIElement("radio",n),CKEDITOR.dialog.addUIElement("button",n),CKEDITOR.dialog.addUIElement("select",n),CKEDITOR.dialog.addUIElement("file",n),CKEDITOR.dialog.addUIElement("fileButton",n),CKEDITOR.dialog.addUIElement("html",n),CKEDITOR.dialog.addUIElement("fieldset",{build:function(e,t,n){for(var i,o=t.children,a=[],s=[],r=0;r<o.length&&(i=o[r]);r++){var l=[];a.push(l),s.push(CKEDITOR.dialog._.uiElementBuilders[i.type].build(e,i,l))}return new CKEDITOR.ui.dialog[t.type](e,s,a,n,t)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=2,CKEDITOR.DIALOG_RESIZE_BOTH=3,function(){function e(){for(var e=this._.tabIdList.length,t=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+e,n=t-1;n>t-e;n--)if(this._.tabs[this._.tabIdList[n%e]][0].$.offsetHeight)return this._.tabIdList[n%e];return null}function t(){for(var e=this._.tabIdList.length,t=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),n=t+1;t+e>n;n++)if(this._.tabs[this._.tabIdList[n%e]][0].$.offsetHeight)return this._.tabIdList[n%e];return null}function n(e,t){for(var n=e.$.getElementsByTagName("input"),i=0,o=n.length;o>i;i++){var a=new CKEDITOR.dom.element(n[i]);"text"==a.getAttribute("type").toLowerCase()&&(t?(a.setAttribute("value",a.getCustomData("fake_value")||""),a.removeCustomData("fake_value")):(a.setCustomData("fake_value",a.getAttribute("value")),a.setAttribute("value","")))}}function i(e,t){var n=this.getInputElement();n&&(e?n.removeAttribute("aria-invalid"):n.setAttribute("aria-invalid",!0)),e||(this.select?this.select():this.focus()),t&&alert(t),this.fire("validated",{valid:e,msg:t})}function o(){var e=this.getInputElement();e&&e.removeAttribute("aria-invalid")}function a(e){var e=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",p).output({id:CKEDITOR.tools.getNextNumber(),editorId:e.id,langDir:e.lang.dir,langCode:e.langCode,editorDialogClass:"cke_editor_"+e.name.replace(/./g,"\.")+"_dialog",closeTitle:e.lang.common.close})),t=e.getChild([0,0,0,0,0]),n=t.getChild(0),i=t.getChild(1);if(CKEDITOR.env.ie&&!CKEDITOR.env.ie6Compat){var o=CKEDITOR.env.isCustomDomain(),o="javascript:void(function(){"+encodeURIComponent("document.open();"+(o?'document.domain="'+document.domain+'";':"")+"document.close();")+"}())";CKEDITOR.dom.element.createFromHtml('<iframe frameBorder="0" class="cke_iframe_shim" src="'+o+'" tabIndex="-1"></iframe>').appendTo(t.getParent())}return n.unselectable(),i.unselectable(),{element:e,parts:{dialog:e.getChild(0),title:n,close:i,tabs:t.getChild(2),contents:t.getChild([3,0,0,0]),footer:t.getChild([3,0,1,0])}}}function s(e,t,n){this.element=t,this.focusIndex=n,this.tabIndex=0,this.isFocusable=function(){return!t.getAttribute("disabled")&&t.isVisible()},this.focus=function(){e._.currentFocusIndex=this.focusIndex,this.element.focus()},t.on("keydown",function(e){e.data.getKeystroke()in{32:1,13:1}&&this.fire("click")}),t.on("focus",function(){this.fire("mouseover")}),t.on("blur",function(){this.fire("mouseout")})}function r(e){function t(){e.layout()}var n=CKEDITOR.document.getWindow();n.on("resize",t),e.on("hide",function(){n.removeListener("resize",t)})}function l(e,t){this._={dialog:e},CKEDITOR.tools.extend(this,t)}function c(e){function t(t){var n=e.getSize(),l=CKEDITOR.document.getWindow().getViewPaneSize(),c=t.data.$.screenX,d=t.data.$.screenY,u=c-i.x,h=d-i.y;i={x:c,y:d},o.x+=u,o.y+=h,e.move(o.x+r[3]<s?-r[3]:o.x-r[1]>l.width-n.width-s?l.width-n.width+("rtl"==a.lang.dir?0:r[1]):o.x,o.y+r[0]<s?-r[0]:o.y-r[2]>l.height-n.height-s?l.height-n.height+r[2]:o.y,1),t.data.preventDefault()}function n(){if(CKEDITOR.document.removeListener("mousemove",t),CKEDITOR.document.removeListener("mouseup",n),CKEDITOR.env.ie6Compat){var e=b.getChild(0).getFrameDocument();e.removeListener("mousemove",t),e.removeListener("mouseup",n)}}var i=null,o=null;e.getElement().getFirst();var a=e.getParentEditor(),s=a.config.dialog_magnetDistance,r=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof s&&(s=20),e.parts.title.on("mousedown",function(a){if(i={x:a.data.$.screenX,y:a.data.$.screenY},CKEDITOR.document.on("mousemove",t),CKEDITOR.document.on("mouseup",n),o=e.getPosition(),CKEDITOR.env.ie6Compat){var s=b.getChild(0).getFrameDocument();s.on("mousemove",t),s.on("mouseup",n)}a.data.preventDefault()},e)}function d(e){function t(t){var n="rtl"==h.lang.dir,u=d.width,f=d.height,m=u+(t.data.$.screenX-i)*(n?-1:1)*(e._.moved?1:2),p=f+(t.data.$.screenY-o)*(e._.moved?1:2),g=e._.element.getFirst(),g=n&&g.getComputedStyle("right"),E=e.getPosition();E.y+p>c.height&&(p=c.height-E.y),(n?g:E.x)+m>c.width&&(m=c.width-(n?g:E.x)),(s==CKEDITOR.DIALOG_RESIZE_WIDTH||s==CKEDITOR.DIALOG_RESIZE_BOTH)&&(u=Math.max(a.minWidth||0,m-r)),(s==CKEDITOR.DIALOG_RESIZE_HEIGHT||s==CKEDITOR.DIALOG_RESIZE_BOTH)&&(f=Math.max(a.minHeight||0,p-l)),e.resize(u,f),e._.moved||e.layout(),t.data.preventDefault()}function n(){if(CKEDITOR.document.removeListener("mouseup",n),CKEDITOR.document.removeListener("mousemove",t),u&&(u.remove(),u=null),CKEDITOR.env.ie6Compat){var e=b.getChild(0).getFrameDocument();e.removeListener("mouseup",n),e.removeListener("mousemove",t)}}var i,o,a=e.definition,s=a.resizable;if(s!=CKEDITOR.DIALOG_RESIZE_NONE){var r,l,c,d,u,h=e.getParentEditor(),f=CKEDITOR.tools.addFunction(function(a){d=e.getSize();var s=e.parts.contents;s.$.getElementsByTagName("iframe").length&&(u=CKEDITOR.dom.element.createFromHtml('<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%;"></div>'),s.append(u)),l=d.height-e.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.opera||CKEDITOR.env.ie&&CKEDITOR.env.quirks)),r=d.width-e.parts.contents.getSize("width",1),i=a.screenX,o=a.screenY,c=CKEDITOR.document.getWindow().getViewPaneSize(),CKEDITOR.document.on("mousemove",t),CKEDITOR.document.on("mouseup",n),CKEDITOR.env.ie6Compat&&(s=b.getChild(0).getFrameDocument(),s.on("mousemove",t),s.on("mouseup",n)),a.preventDefault&&a.preventDefault()});e.on("load",function(){var t="";s==CKEDITOR.DIALOG_RESIZE_WIDTH?t=" cke_resizer_horizontal":s==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(t=" cke_resizer_vertical"),t=CKEDITOR.dom.element.createFromHtml('<div class="cke_resizer'+t+" cke_resizer_"+h.lang.dir+'" title="'+CKEDITOR.tools.htmlEncode(h.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+f+', event )">'+("ltr"==h.lang.dir?"◢":"◣")+"</div>"),e.parts.footer.append(t,1)}),h.on("destroy",function(){CKEDITOR.tools.removeFunction(f)})}}function u(e){e.data.preventDefault(1)}function h(e){var t=CKEDITOR.document.getWindow(),n=e.config,i=n.dialog_backgroundCoverColor||"white",o=n.dialog_backgroundCoverOpacity,a=n.baseFloatZIndex,n=CKEDITOR.tools.genKey(i,o,a),s=y[n];if(s)s.show();else{if(a=['<div tabIndex="-1" style="position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",a,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+i,'" class="cke_dialog_background_cover">'],CKEDITOR.env.ie6Compat){var r=CKEDITOR.env.isCustomDomain(),i="<html><body style=\'background-color:"+i+";\'></body></html>";a.push('<iframe hidefocus="true" frameborder="0" id="cke_dialog_background_iframe" src="javascript:'),a.push("void((function(){document.open();"+(r?"document.domain='"+document.domain+"';":"")+"document.write( '"+i+"' );document.close();})())"),a.push('" style="position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0)"></iframe>')}a.push("</div>"),s=CKEDITOR.dom.element.createFromHtml(a.join("")),s.setOpacity(void 0!=o?o:.5),s.on("keydown",u),s.on("keypress",u),s.on("keyup",u),s.appendTo(CKEDITOR.document.getBody()),y[n]=s}e.focusManager.add(s),b=s;var e=function(){var e=t.getViewPaneSize();s.setStyles({width:e.width+"px",height:e.height+"px"})},l=function(){var e=t.getScrollPosition(),n=CKEDITOR.dialog._.currentTop;if(s.setStyles({left:e.x+"px",top:e.y+"px"}),n)do e=n.getPosition(),n.move(e.x,e.y);while(n=n._.parentDialog)};if(I=e,t.on("resize",e),e(),(!CKEDITOR.env.mac||!CKEDITOR.env.webkit)&&s.focus(),CKEDITOR.env.ie6Compat){var c=function(){l(),arguments.callee.prevScrollHandler.apply(this,arguments)};t.$.setTimeout(function(){c.prevScrollHandler=window.onscroll||function(){},window.onscroll=c},0),l()}}function f(e){b&&(e.focusManager.remove(b),e=CKEDITOR.document.getWindow(),b.hide(),e.removeListener("resize",I),CKEDITOR.env.ie6Compat&&e.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),I=null)}var m=CKEDITOR.tools.cssLength,p='<div class="cke cke_reset_all {editorId} {editorDialogClass}" dir="{langDir}" lang="{langCode}" role="application"><table class="cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" aria-labelledby="cke_dialog_title_{id}" style="position:absolute" role="dialog"><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(n,s){function r(){var e=y._.focusList;e.sort(function(e,t){return e.tabIndex!=t.tabIndex?t.tabIndex-e.tabIndex:e.focusIndex-t.focusIndex});for(var t=e.length,n=0;t>n;n++)e[n].focusIndex=n}function l(e){var t=y._.focusList,e=e||0;if(!(1>t.length)){var n=y._.currentFocusIndex;try{t[n].getInputElement().$.blur()}catch(i){}for(var o=n=(n+e+t.length)%t.length;e&&!t[o].isFocusable()&&(o=(o+e+t.length)%t.length,!(o==n)););t[o].focus(),"text"==t[o].type&&t[o].select()}}function u(i){if(y==CKEDITOR.dialog._.currentTop){var o=i.data.getKeystroke(),a="rtl"==n.lang.dir;if(f=m=0,9==o||o==CKEDITOR.SHIFT+9)o=o==CKEDITOR.SHIFT+9,y._.tabBarMode?(o=o?e.call(y):t.call(y),y.selectPage(o),y._.tabs[o][0].focus()):l(o?-1:1),f=1;else if(o==CKEDITOR.ALT+121&&!y._.tabBarMode&&1<y.getPageCount())y._.tabBarMode=!0,y._.tabs[y._.currentTabId][0].focus(),f=1;else if(37!=o&&39!=o||!y._.tabBarMode)if(13!=o&&32!=o||!y._.tabBarMode)if(13==o)o=i.data.getTarget(),o.is("a","button","select","textarea")||o.is("input")&&"button"==o.$.type||((o=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(o.click,0,o),f=1),m=1;else{if(27!=o)return;(o=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(o.click,0,o):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),m=1}else this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex=-1,l(1),f=1;else o=o==(a?39:37)?e.call(y):t.call(y),y.selectPage(o),y._.tabs[o][0].focus(),f=1;h(i)}}function h(e){f?e.data.preventDefault(1):m&&e.data.stopPropagation()}var f,m,p=CKEDITOR.dialog._.dialogDefinitions[s],E=CKEDITOR.tools.clone(g),v=n.config.dialog_buttonsOrder||"OS",T=n.lang.dir,I={};if(("OS"==v&&CKEDITOR.env.mac||"rtl"==v&&"ltr"==T||"ltr"==v&&"rtl"==T)&&E.buttons.reverse(),p=CKEDITOR.tools.extend(p(n),E),p=CKEDITOR.tools.clone(p),p=new C(this,p),E=a(n),this._={editor:n,element:E.element,name:s,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1},this.parts=E.parts,CKEDITOR.tools.setTimeout(function(){n.fire("ariaWidget",this.parts.contents)},0,this),E={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"},E["rtl"==T?"right":"left"]=0,this.parts.dialog.setStyles(E),CKEDITOR.event.call(this),this.definition=p=CKEDITOR.fire("dialogDefinition",{name:s,definition:p},n).definition,!("removeDialogTabs"in n._)&&n.config.removeDialogTabs){for(E=n.config.removeDialogTabs.split(";"),T=0;T<E.length;T++)if(v=E[T].split(":"),2==v.length){var b=v[0];I[b]||(I[b]=[]),I[b].push(v[1])}n._.removeDialogTabs=I}if(n._.removeDialogTabs&&(I=n._.removeDialogTabs[s]))for(T=0;T<I.length;T++)p.removeContents(I[T]);p.onLoad&&this.on("load",p.onLoad),p.onShow&&this.on("show",p.onShow),p.onHide&&this.on("hide",p.onHide),p.onOk&&this.on("ok",function(e){n.fire("saveSnapshot"),setTimeout(function(){n.fire("saveSnapshot")},0),!1===p.onOk.call(this,e)&&(e.data.hide=!1)}),p.onCancel&&this.on("cancel",function(e){!1===p.onCancel.call(this,e)&&(e.data.hide=!1)});var y=this,D=function(e){var t,n=y._.contents,i=!1;for(t in n)for(var o in n[t])if(i=e.call(this,n[t][o]))return};this.on("ok",function(e){D(function(t){if(t.validate){var n=t.validate(this),o="string"==typeof n||!1===n;return o&&(e.data.hide=!1,e.stop()),i.call(t,!o,"string"==typeof n?n:void 0),o}})},this,null,0),this.on("cancel",function(e){D(function(t){return t.isChanged()?(confirm(n.lang.common.confirmCancel)||(e.data.hide=!1),!0):void 0})},this,null,0),this.parts.close.on("click",function(e){!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),e.data.preventDefault()},this),this.changeFocus=l;var O=this._.element;for(n.focusManager.add(O,1),this.on("show",function(){O.on("keydown",u,this),(CKEDITOR.env.opera||CKEDITOR.env.gecko)&&O.on("keypress",h,this)}),this.on("hide",function(){O.removeListener("keydown",u),(CKEDITOR.env.opera||CKEDITOR.env.gecko)&&O.removeListener("keypress",h),D(function(e){o.apply(e)})}),this.on("iframeAdded",function(e){new CKEDITOR.dom.document(e.data.iframe.$.contentWindow.document).on("keydown",u,this,null,0)}),this.on("show",function(){if(r(),n.config.dialog_startupFocusTab&&1<y._.pageCount)y._.tabBarMode=!0,y._.tabs[y._.currentTabId][0].focus();else if(!this._.hasFocus)if(this._.currentFocusIndex=-1,p.onFocus){var e=p.onFocus.call(this);e&&e.focus()}else l(1)},this,null,4294967295),CKEDITOR.env.ie6Compat&&this.on("load",function(){var e=this.getElement(),t=e.getFirst();t.remove(),t.appendTo(e)},this),c(this),d(this),new CKEDITOR.dom.text(p.title,CKEDITOR.document).appendTo(this.parts.title),T=0;T<p.contents.length;T++)(I=p.contents[T])&&this.addPage(I);for(this.parts.tabs.on("click",function(e){var t=e.data.getTarget();t.hasClass("cke_dialog_tab")&&(t=t.$.id,this.selectPage(t.substring(4,t.lastIndexOf("_"))),this._.tabBarMode&&(this._.tabBarMode=!1,this._.currentFocusIndex=-1,l(1)),e.data.preventDefault())},this),T=[],I=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:p.buttons},T).getChild(),this.parts.footer.setHtml(T.join("")),T=0;T<I.length;T++)this._.buttons[I[T].id]=I[T]},CKEDITOR.dialog.prototype={destroy:function(){this.hide(),this._.element.remove()},resize:function(){return function(e,t){this._.contentSize&&this._.contentSize.width==e&&this._.contentSize.height==t||(CKEDITOR.dialog.fire("resize",{dialog:this,width:e,height:t},this._.editor),this.fire("resize",{width:e,height:t},this._.editor),this.parts.contents.setStyles({width:e+"px",height:t+"px"}),"rtl"==this._.editor.lang.dir&&this._.position&&(this._.position.x=CKEDITOR.document.getWindow().getViewPaneSize().width-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10)),this._.contentSize={width:e,height:t})}}(),getSize:function(){var e=this._.element.getFirst();return{width:e.$.offsetWidth||0,height:e.$.offsetHeight||0}},move:function(e,t,n){var i=this._.element.getFirst(),o="rtl"==this._.editor.lang.dir,a="fixed"==i.getComputedStyle("position");CKEDITOR.env.ie&&i.setStyle("zoom","100%"),a&&this._.position&&this._.position.x==e&&this._.position.y==t||(this._.position={x:e,y:t},a||(a=CKEDITOR.document.getWindow().getScrollPosition(),e+=a.x,t+=a.y),o&&(a=this.getSize(),e=CKEDITOR.document.getWindow().getViewPaneSize().width-a.width-e),t={top:(t>0?t:0)+"px"},t[o?"right":"left"]=(e>0?e:0)+"px",i.setStyles(t),n&&(this._.moved=1))},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var e=this._.element,t=this.definition;if(e.getParent()&&e.getParent().equals(CKEDITOR.document.getBody())?e.setStyle("display","block"):e.appendTo(CKEDITOR.document.getBody()),CKEDITOR.env.gecko&&10900>CKEDITOR.env.version){var n=this.parts.dialog;n.setStyle("position","absolute"),setTimeout(function(){n.setStyle("position","fixed")},0)}this.resize(this._.contentSize&&this._.contentSize.width||t.width||t.minWidth,this._.contentSize&&this._.contentSize.height||t.height||t.minHeight),this.reset(),this.selectPage(this.definition.contents[0].id),null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex),this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10),null===CKEDITOR.dialog._.currentTop?(CKEDITOR.dialog._.currentTop=this,this._.parentDialog=null,h(this._.editor)):(this._.parentDialog=CKEDITOR.dialog._.currentTop,this._.parentDialog.getElement().getFirst().$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2),CKEDITOR.dialog._.currentTop=this),e.on("keydown",O),e.on(CKEDITOR.env.opera?"keypress":"keyup",R),this._.hasFocus=!1,CKEDITOR.tools.setTimeout(function(){this.layout(),r(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(e){e.setInitValue&&e.setInitValue()})},100,this)},layout:function(){var e=this.parts.dialog,t=this.getSize(),n=CKEDITOR.document.getWindow().getViewPaneSize(),i=(n.width-t.width)/2,o=(n.height-t.height)/2;CKEDITOR.env.ie6Compat||(t.height+(o>0?o:0)>n.height||t.width+(i>0?i:0)>n.width?e.setStyle("position","absolute"):e.setStyle("position","fixed")),this.move(this._.moved?this._.position.x:i,this._.moved?this._.position.y:o)},foreach:function(e){for(var t in this._.contents)for(var n in this._.contents[t])e.call(this,this._.contents[t][n]);return this},reset:function(){var e=function(e){e.reset&&e.reset(1)};return function(){return this.foreach(e),this}}(),setupContent:function(){var e=arguments;this.foreach(function(t){t.setup&&t.setup.apply(t,e)})},commitContent:function(){var e=arguments;this.foreach(function(t){CKEDITOR.env.ie&&this._.currentFocusIndex==t.focusIndex&&t.getInputElement().$.blur(),t.commit&&t.commit.apply(t,e)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{}),this._.editor.fire("dialogHide",this),this.selectPage(this._.tabIdList[0]);var e=this._.element;for(e.setStyle("display","none"),this.parts.dialog.setStyle("visibility","hidden"),w(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var t=this._.parentDialog.getElement().getFirst();t.setStyle("z-index",parseInt(t.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else f(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null,e.removeListener("keydown",O),e.removeListener(CKEDITOR.env.opera?"keypress":"keyup",R);var n=this._.editor;n.focus(),setTimeout(function(){n.focusManager.unlock()},0)}delete this._.parentDialog,this.foreach(function(e){e.resetInitValue&&e.resetInitValue()})}},addPage:function(e){var t=[],n=e.label?' title="'+CKEDITOR.tools.htmlEncode(e.label)+'"':"",i=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:e.elements,expand:!!e.expand,padding:e.padding,style:e.style||"width: 100%;"},t),t=CKEDITOR.dom.element.createFromHtml(t.join(""));t.setAttribute("role","tabpanel");var o=CKEDITOR.env,a="cke_"+e.id+"_"+CKEDITOR.tools.getNextNumber(),n=CKEDITOR.dom.element.createFromHtml(['<a class="cke_dialog_tab"',0<this._.pageCount?" cke_last":"cke_first",n,e.hidden?' style="display:none"':"",' id="',a,'"',o.gecko&&10900<=o.version&&!o.hc?"":' href="javascript:void(0)"',' tabIndex="-1" hidefocus="true" role="tab">',e.label,"</a>"].join(""));for(t.setAttribute("aria-labelledby",a),this._.tabs[e.id]=[n,t],this._.tabIdList.push(e.id),!e.hidden&&this._.pageCount++,this._.lastTab=n,this.updateStyle(),a=this._.contents[e.id]={},o=i.getChild();i=o.shift();)a[i.id]=i,"function"==typeof i.getChild&&o.push.apply(o,i.getChild());t.setAttribute("name",e.id),t.appendTo(this.parts.contents),n.unselectable(),this.parts.tabs.append(n),e.accessKey&&(k(this,this,"CTRL+"+e.accessKey,S,_),this._.accessKeyMap["CTRL+"+e.accessKey]=e.id)},selectPage:function(e){if(this._.currentTabId!=e&&!0!==this.fire("selectPage",{page:e,currentPage:this._.currentTabId})){for(var t in this._.tabs){var i=this._.tabs[t][0],o=this._.tabs[t][1];t!=e&&(i.removeClass("cke_dialog_tab_selected"),o.hide()),o.setAttribute("aria-hidden",t!=e)}var a=this._.tabs[e];a[0].addClass("cke_dialog_tab_selected"),CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(n(a[1]),a[1].show(),setTimeout(function(){n(a[1],1)},0)):a[1].show(),this._.currentTabId=e,this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,e)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(t){var n=this._.tabs[t]&&this._.tabs[t][0];n&&1!=this._.pageCount&&n.isVisible()&&(t==this._.currentTabId&&this.selectPage(e.call(this)),n.hide(),this._.pageCount--,this.updateStyle())},showPage:function(e){(e=this._.tabs[e]&&this._.tabs[e][0])&&(e.show(),this._.pageCount++,this.updateStyle())},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(e,t){var n=this._.contents[e];return n&&n[t]},getValueOf:function(e,t){return this.getContentElement(e,t).getValue()},setValueOf:function(e,t,n){return this.getContentElement(e,t).setValue(n)},getButton:function(e){return this._.buttons[e]},click:function(e){return this._.buttons[e].click()},disableButton:function(e){return this._.buttons[e].disable()},enableButton:function(e){return this._.buttons[e].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(e,t){if("undefined"==typeof t)t=this._.focusList.length,this._.focusList.push(new s(this,e,t));else{this._.focusList.splice(t,0,new s(this,e,t));for(var n=t+1;n<this._.focusList.length;n++)this._.focusList[n].focusIndex++}}},CKEDITOR.tools.extend(CKEDITOR.dialog,{add:function(e,t){this._.dialogDefinitions[e]&&"function"!=typeof t||(this._.dialogDefinitions[e]=t)},exists:function(e){return!!this._.dialogDefinitions[e]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},okButton:function(){var e=function(e,t){return t=t||{},CKEDITOR.tools.extend({id:"ok",type:"button",label:e.lang.common.ok,"class":"cke_dialog_ui_button_ok",onClick:function(e){e=e.data.dialog,!1!==e.fire("ok",{hide:!0}).hide&&e.hide()}},t,!0)};return e.type="button",e.override=function(t){return CKEDITOR.tools.extend(function(n){return e(n,t)},{type:"button"},!0)},e}(),cancelButton:function(){var e=function(e,t){return t=t||{},CKEDITOR.tools.extend({id:"cancel",type:"button",label:e.lang.common.cancel,"class":"cke_dialog_ui_button_cancel",onClick:function(e){e=e.data.dialog,!1!==e.fire("cancel",{hide:!0}).hide&&e.hide()}},t,!0)};return e.type="button",e.override=function(t){return CKEDITOR.tools.extend(function(n){return e(n,t)},{type:"button"},!0)},e}(),addUIElement:function(e,t){this._.uiElementBuilders[e]=t}}),CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null},CKEDITOR.event.implementOn(CKEDITOR.dialog),CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);var g={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},E=function(e,t,n){for(var i,o=0;i=e[o];o++)if(i.id==t||n&&i[n]&&(i=E(i[n],t,n)))return i;return null},v=function(e,t,n,i,o){if(n){for(var a,s=0;a=e[s];s++){if(a.id==n)return e.splice(s,0,t),t;if(i&&a[i]&&(a=v(a[i],t,n,i,!0)))return a}if(o)return null}return e.push(t),t},T=function(e,t,n){for(var i,o=0;i=e[o];o++){if(i.id==t)return e.splice(o,1);if(n&&i[n]&&(i=T(i[n],t,n)))return i}return null},C=function(e,t){this.dialog=e;for(var n,i=t.contents,o=0;n=i[o];o++)i[o]=n&&new l(e,n);CKEDITOR.tools.extend(this,t)};C.prototype={getContents:function(e){return E(this.contents,e)},getButton:function(e){return E(this.buttons,e)},addContents:function(e,t){return v(this.contents,e,t)},addButton:function(e,t){return v(this.buttons,e,t)},removeContents:function(e){T(this.contents,e)},removeButton:function(e){T(this.buttons,e)}},l.prototype={get:function(e){return E(this.elements,e,"children")},add:function(e,t){return v(this.elements,e,t,"children")},remove:function(e){T(this.elements,e,"children")}};var I,b,y={},D={},O=function(e){var t=e.data.$.ctrlKey||e.data.$.metaKey,n=e.data.$.altKey,i=e.data.$.shiftKey,o=String.fromCharCode(e.data.$.keyCode);(t=D[(t?"CTRL+":"")+(n?"ALT+":"")+(i?"SHIFT+":"")+o])&&t.length&&(t=t[t.length-1],t.keydown&&t.keydown.call(t.uiElement,t.dialog,t.key),e.data.preventDefault())},R=function(e){var t=e.data.$.ctrlKey||e.data.$.metaKey,n=e.data.$.altKey,i=e.data.$.shiftKey,o=String.fromCharCode(e.data.$.keyCode);(t=D[(t?"CTRL+":"")+(n?"ALT+":"")+(i?"SHIFT+":"")+o])&&t.length&&(t=t[t.length-1],t.keyup&&(t.keyup.call(t.uiElement,t.dialog,t.key),e.data.preventDefault()))},k=function(e,t,n,i,o){(D[n]||(D[n]=[])).push({uiElement:e,dialog:t,key:n,keyup:o||e.accessKeyUp,keydown:i||e.accessKeyDown})},w=function(e){for(var t in D){for(var n=D[t],i=n.length-1;i>=0;i--)(n[i].dialog==e||n[i].uiElement==e)&&n.splice(i,1);0===n.length&&delete D[t]}},_=function(e,t){e._.accessKeyMap[t]&&e.selectPage(e._.accessKeyMap[t])},S=function(){};!function(){CKEDITOR.ui.dialog={uiElement:function(e,t,n,i,o,a,s){if(!(4>arguments.length)){var r=(i.call?i(t):i)||"div",l=["<",r," "],c=(o&&o.call?o(t):o)||{},d=(a&&a.call?a(t):a)||{},u=(s&&s.call?s.call(this,e,t):s)||"",h=this.domId=d.id||CKEDITOR.tools.getNextId()+"_uiElement";this.id=t.id,d.id=h;var f={};t.type&&(f["cke_dialog_ui_"+t.type]=1),t.className&&(f[t.className]=1),t.disabled&&(f.cke_disabled=1);for(var m=d["class"]&&d["class"].split?d["class"].split(" "):[],h=0;h<m.length;h++)m[h]&&(f[m[h]]=1);m=[];for(h in f)m.push(h);d["class"]=m.join(" "),t.title&&(d.title=t.title),f=(t.style||"").split(";"),t.align&&(m=t.align,c["margin-left"]="left"==m?0:"auto",c["margin-right"]="right"==m?0:"auto");for(h in c)f.push(h+":"+c[h]);for(t.hidden&&f.push("display:none"),h=f.length-1;h>=0;h--)""===f[h]&&f.splice(h,1);0<f.length&&(d.style=(d.style?d.style+"; ":"")+f.join("; "));for(h in d)l.push(h+'="'+CKEDITOR.tools.htmlEncode(d[h])+'" ');l.push(">",u,"</",r,">"),n.push(l.join("")),(this._||(this._={})).dialog=e,"boolean"==typeof t.isChanged&&(this.isChanged=function(){return t.isChanged
}),"function"==typeof t.isChanged&&(this.isChanged=t.isChanged),"function"==typeof t.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(e){return function(n){e.call(this,t.setValue.call(this,n))}})),"function"==typeof t.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,function(e){return function(){return t.getValue.call(this,e.call(this))}})),CKEDITOR.event.implementOn(this),this.registerEvents(t),this.accessKeyUp&&this.accessKeyDown&&t.accessKey&&k(this,e,"CTRL+"+t.accessKey);var p=this;e.on("load",function(){var t=p.getInputElement();if(t){var n=p.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&CKEDITOR.env.version<8?"cke_dialog_ui_focused":"";t.on("focus",function(){e._.tabBarMode=!1,e._.hasFocus=!0,p.fire("focus"),n&&this.addClass(n)}),t.on("blur",function(){p.fire("blur"),n&&this.removeClass(n)})}}),this.keyboardFocusable&&(this.tabIndex=t.tabIndex||0,this.focusIndex=e._.focusList.push(this)-1,this.on("focus",function(){e._.currentFocusIndex=p.focusIndex})),CKEDITOR.tools.extend(this,t)}},hbox:function(e,t,n,i,o){if(!(4>arguments.length)){this._||(this._={});var a,s=this._.children=t,r=o&&o.widths||null,l=o&&o.height||null,c={role:"presentation"};o&&o.align&&(c.align=o.align),CKEDITOR.ui.dialog.uiElement.call(this,e,o||{type:"hbox"},i,"table",{},c,function(){var e=['<tbody><tr class="cke_dialog_ui_hbox">'];for(a=0;a<n.length;a++){var t="cke_dialog_ui_hbox_child",i=[];0===a&&(t="cke_dialog_ui_hbox_first"),a==n.length-1&&(t="cke_dialog_ui_hbox_last"),e.push('<td class="',t,'" role="presentation" '),r?r[a]&&i.push("width:"+m(r[a])):i.push("width:"+Math.floor(100/n.length)+"%"),l&&i.push("height:"+m(l)),o&&void 0!=o.padding&&i.push("padding:"+m(o.padding)),CKEDITOR.env.ie&&CKEDITOR.env.quirks&&s[a].align&&i.push("text-align:"+s[a].align),0<i.length&&e.push('style="'+i.join("; ")+'" '),e.push(">",n[a],"</td>")}return e.push("</tr></tbody>"),e.join("")})}},vbox:function(e,t,n,i,o){if(!(3>arguments.length)){this._||(this._={});var a=this._.children=t,s=o&&o.width||null,r=o&&o.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,e,o||{type:"vbox"},i,"div",null,{role:"presentation"},function(){var t=['<table role="presentation" cellspacing="0" border="0" '];t.push('style="'),o&&o.expand&&t.push("height:100%;"),t.push("width:"+m(s||"100%"),";"),t.push('"'),t.push('align="',CKEDITOR.tools.htmlEncode(o&&o.align||("ltr"==e.getParentEditor().lang.dir?"left":"right")),'" '),t.push("><tbody>");for(var i=0;i<n.length;i++){var l=[];t.push('<tr><td role="presentation" '),s&&l.push("width:"+m(s||"100%")),r?l.push("height:"+m(r[i])):o&&o.expand&&l.push("height:"+Math.floor(100/n.length)+"%"),o&&void 0!=o.padding&&l.push("padding:"+m(o.padding)),CKEDITOR.env.ie&&CKEDITOR.env.quirks&&a[i].align&&l.push("text-align:"+a[i].align),0<l.length&&t.push('style="',l.join("; "),'" '),t.push(' class="cke_dialog_ui_vbox_child">',n[i],"</td></tr>")}return t.push("</tbody></table>"),t.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(e,t){return this.getInputElement().setValue(e),!t&&this.fire("change",{value:e}),this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var e=this.getInputElement();(e=e.getParent())&&-1==e.$.className.search("cke_dialog_page_contents"););return e?(e=e.getAttribute("name"),this._.dialog._.currentTabId!=e&&this._.dialog.selectPage(e),this):this},focus:function(){return this.selectParentTab().getInputElement().focus(),this},registerEvents:function(e){var t,n,i=/^on([A-Z]w+)/,o=function(e,t,n,i){t.on("load",function(){e.getInputElement().on(n,i,e)})};for(n in e)(t=n.match(i))&&(this.eventProcessors[n]?this.eventProcessors[n].call(this,this._.dialog,e[n]):o(this,this._.dialog,t[1].toLowerCase(),e[n]));return this},eventProcessors:{onLoad:function(e,t){e.on("load",t,this)},onShow:function(e,t){e.on("show",t,this)},onHide:function(e,t){e.on("hide",t,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var e=this.getElement();this.getInputElement().setAttribute("disabled","true"),e.addClass("cke_disabled")},enable:function(){var e=this.getElement();this.getInputElement().removeAttribute("disabled"),e.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return this.isEnabled()&&this.isVisible()?!0:!1}},CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(e){return 1>arguments.length?this._.children.concat():(e.splice||(e=[e]),2>e.length?this._.children[e[0]]:this._.children[e[0]]&&this._.children[e[0]].getChild?this._.children[e[0]].getChild(e.slice(1,e.length)):null)}},!0),CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox,function(){var e={build:function(e,t,n){for(var i,o=t.children,a=[],s=[],r=0;r<o.length&&(i=o[r]);r++){var l=[];a.push(l),s.push(CKEDITOR.dialog._.uiElementBuilders[i.type].build(e,i,l))}return new CKEDITOR.ui.dialog[t.type](e,s,a,n,t)}};CKEDITOR.dialog.addUIElement("hbox",e),CKEDITOR.dialog.addUIElement("vbox",e)}(),CKEDITOR.dialogCommand=function(e,t){this.dialogName=e,CKEDITOR.tools.extend(this,t,!0)},CKEDITOR.dialogCommand.prototype={exec:function(e){CKEDITOR.env.opera?CKEDITOR.tools.setTimeout(function(){e.openDialog(this.dialogName)},0,this):e.openDialog(this.dialogName)},canUndo:!1,editorFocus:CKEDITOR.env.ie||CKEDITOR.env.webkit},function(){var e=/^([a]|[^a])+$/,t=/^d*$/,n=/^d*(?:.d+)?$/,i=/^(((d*(.d+))|(d*))(px|%)?)?$/,o=/^(((d*(.d+))|(d*))(px|em|ex|in|cm|mm|pt|pc|%)?)?$/i,a=/^(s*[w-]+s*:s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=1,CKEDITOR.VALIDATE_AND=2,CKEDITOR.dialog.validate={functions:function(){var e=arguments;return function(){var t,n=this&&this.getValue?this.getValue():e[0],i=void 0,o=CKEDITOR.VALIDATE_AND,a=[];for(t=0;t<e.length&&"function"==typeof e[t];t++)a.push(e[t]);t<e.length&&"string"==typeof e[t]&&(i=e[t],t++),t<e.length&&"number"==typeof e[t]&&(o=e[t]);var s=o==CKEDITOR.VALIDATE_AND?!0:!1;for(t=0;t<a.length;t++)s=o==CKEDITOR.VALIDATE_AND?s&&a[t](n):s||a[t](n);return s?!0:i}},regex:function(e,t){return function(n){return n=this&&this.getValue?this.getValue():n,e.test(n)?!0:t}},notEmpty:function(t){return this.regex(e,t)},integer:function(e){return this.regex(t,e)},number:function(e){return this.regex(n,e)},cssLength:function(e){return this.functions(function(e){return o.test(CKEDITOR.tools.trim(e))},e)},htmlLength:function(e){return this.functions(function(e){return i.test(CKEDITOR.tools.trim(e))},e)},inlineStyle:function(e){return this.functions(function(e){return a.test(CKEDITOR.tools.trim(e))},e)},equals:function(e,t){return this.functions(function(t){return t==e},t)},notEqual:function(e,t){return this.functions(function(t){return t!=e},t)}},CKEDITOR.on("instanceDestroyed",function(e){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var t;t=CKEDITOR.dialog._.currentTop;)t.hide();for(var n in y)y[n].remove();y={}}var i,e=e.editor._.storedDialogs;for(i in e)e[i].destroy()})}(),CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(e,t){var n=null,i=CKEDITOR.dialog._.dialogDefinitions[e];if(null===CKEDITOR.dialog._.currentTop&&h(this),"function"==typeof i)n=this._.storedDialogs||(this._.storedDialogs={}),n=n[e]||(n[e]=new CKEDITOR.dialog(this,e)),t&&t.call(n,n),n.show();else{if("failed"==i)throw f(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+e+'" failed when loading definition.');"string"==typeof i&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(i),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[e]&&(CKEDITOR.dialog._.dialogDefinitions[e]="failed"),this.openDialog(e,t)},this,0,1)}return CKEDITOR.skin.loadPart("dialog"),n}})}(),CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(e){e.on("contentDom",function(){var t=e.editable();t.attachListener(t,"dblclick",function(t){return e.readOnly?!1:(t={element:t.data.getTarget()},e.fire("doubleclick",t),t.dialog&&e.openDialog(t.dialog),1)})})}}),CKEDITOR.plugins.add("about",{requires:"dialog",init:function(e){var t=e.addCommand("about",new CKEDITOR.dialogCommand("about"));t.modes={wysiwyg:1,source:1},t.canUndo=!1,t.readOnly=1,e.ui.addButton&&e.ui.addButton("About",{label:e.lang.about.title,command:"about",toolbar:"about"}),CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}}),function(){CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{en:1,ar:1,bg:1,ca:1,et:1,cs:1,cy:1,da:1,de:1,el:1,eo:1,es:1,fa:1,fi:1,fr:1,gu:1,he:1,hi:1,hr:1,hu:1,it:1,ja: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,sk:1,sl:1,sv:1,tr:1,ug:1,uk:1,vi:1,"zh-cn":1},init:function(e){var t=this;e.addCommand("a11yHelp",{exec:function(){var n=e.langCode,n=t.availableLangs[n]?n:t.availableLangs[n.replace(/-.*/,"")]?n.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(t.path+"dialogs/lang/"+n+".js"),function(){e.lang.a11yhelp=t.langEntries[n],e.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:!1}),e.setKeystroke(CKEDITOR.ALT+48,"a11yHelp"),CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js")}})}(),CKEDITOR.plugins.add("basicstyles",{init:function(e){var t=0,n=function(n,i,o,a){a&&(a=new CKEDITOR.style(a),e.attachStyleStateChange(a,function(t){!e.readOnly&&e.getCommand(o).setState(t)}),e.addCommand(o,new CKEDITOR.styleCommand(a)),e.ui.addButton&&e.ui.addButton(n,{label:i,command:o,toolbar:"basicstyles,"+(t+=10)}))},i=e.config,o=e.lang.basicstyles;n("Bold",o.bold,"bold",i.coreStyles_bold),n("Italic",o.italic,"italic",i.coreStyles_italic),n("Underline",o.underline,"underline",i.coreStyles_underline),n("Strike",o.strike,"strike",i.coreStyles_strike),n("Subscript",o.subscript,"subscript",i.coreStyles_subscript),n("Superscript",o.superscript,"superscript",i.coreStyles_superscript),e.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:"strike"},CKEDITOR.config.coreStyles_subscript={element:"sub"},CKEDITOR.config.coreStyles_superscript={element:"sup"},function(){var e={exec:function(e){var t=e.getCommand("blockquote").state,n=e.getSelection(),i=n&&n.getRanges(!0)[0];if(i){var o=n.createBookmarks();if(CKEDITOR.env.ie){var a,s=o[0].startNode,r=o[0].endNode;if(s&&"blockquote"==s.getParent().getName())for(a=s;a=a.getNext();)if(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary()){s.move(a,!0);break}if(r&&"blockquote"==r.getParent().getName())for(a=r;a=a.getPrevious();)if(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary()){r.move(a);break}}var l=i.createIterator();if(l.enlargeBr=e.config.enterMode!=CKEDITOR.ENTER_BR,t==CKEDITOR.TRISTATE_OFF){for(s=[];t=l.getNextParagraph();)s.push(t);for(1>s.length&&(t=e.document.createElement(e.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),r=o.shift(),i.insertNode(t),t.append(new CKEDITOR.dom.text("",e.document)),i.moveToBookmark(r),i.selectNodeContents(t),i.collapse(!0),r=i.createBookmark(),s.push(t),o.unshift(r)),a=s[0].getParent(),i=[],r=0;r<s.length;r++)t=s[r],a=a.getCommonAncestor(t.getParent());for(t={table:1,tbody:1,tr:1,ol:1,ul:1};t[a.getName()];)a=a.getParent();for(r=null;0<s.length;){for(t=s.shift();!t.getParent().equals(a);)t=t.getParent();t.equals(r)||i.push(t),r=t}for(;0<i.length;)if(t=i.shift(),"blockquote"==t.getName()){for(r=new CKEDITOR.dom.documentFragment(e.document);t.getFirst();)r.append(t.getFirst().remove()),s.push(r.getLast());r.replace(t)}else s.push(t);for(i=e.document.createElement("blockquote"),i.insertBefore(s[0]);0<s.length;)t=s.shift(),i.append(t)}else if(t==CKEDITOR.TRISTATE_ON){for(r=[],a={};t=l.getNextParagraph();){for(s=i=null;t.getParent();){if("blockquote"==t.getParent().getName()){i=t.getParent(),s=t;break}t=t.getParent()}i&&s&&!s.getCustomData("blockquote_moveout")&&(r.push(s),CKEDITOR.dom.element.setMarker(a,s,"blockquote_moveout",!0))}for(CKEDITOR.dom.element.clearAllMarkers(a),t=[],s=[],a={};0<r.length;)l=r.shift(),i=l.getParent(),l.getPrevious()?l.getNext()?(l.breakParent(l.getParent()),s.push(l.getNext())):l.remove().insertAfter(i):l.remove().insertBefore(i),i.getCustomData("blockquote_processed")||(s.push(i),CKEDITOR.dom.element.setMarker(a,i,"blockquote_processed",!0)),t.push(l);for(CKEDITOR.dom.element.clearAllMarkers(a),r=s.length-1;r>=0;r--){i=s[r];e:{a=i;for(var l=0,c=a.getChildCount(),d=void 0;c>l&&(d=a.getChild(l));l++)if(d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()){a=!1;break e}a=!0}a&&i.remove()}if(e.config.enterMode==CKEDITOR.ENTER_BR)for(i=!0;t.length;)if(l=t.shift(),"div"==l.getName()){for(r=new CKEDITOR.dom.documentFragment(e.document),i&&l.getPrevious()&&!(l.getPrevious().type==CKEDITOR.NODE_ELEMENT&&l.getPrevious().isBlockBoundary())&&r.append(e.document.createElement("br")),i=l.getNext()&&!(l.getNext().type==CKEDITOR.NODE_ELEMENT&&l.getNext().isBlockBoundary());l.getFirst();)l.getFirst().remove().appendTo(r);i&&r.append(e.document.createElement("br")),r.replace(l),i=!1}}n.selectBookmarks(o),e.focus()}},refresh:function(e,t){this.setState(e.elementPath(t.block||t.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(t){t.blockless||(t.addCommand("blockquote",e),t.ui.addButton&&t.ui.addButton("Blockquote",{label:t.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})}(),function(){function e(e){function t(){var t=e.editable();t.on(v,function(e){(!CKEDITOR.env.ie||!p)&&h(e)}),CKEDITOR.env.ie&&t.on("paste",function(t){g||(o(),t.data.preventDefault(),h(t),s("paste")||e.openDialog("paste"))}),CKEDITOR.env.ie&&(t.on("contextmenu",a,null,null,0),t.on("beforepaste",function(e){e.data&&!e.data.$.ctrlKey&&a()},null,null,0)),t.on("beforecut",function(){!p&&l(e)}),t.on("mouseup",function(){setTimeout(function(){f()},0)}),t.on("keyup",f)}function n(t){return{type:t,canUndo:"cut"==t,startDisabled:!0,exec:function(){"cut"==this.type&&l();var t,n=this.type;if(CKEDITOR.env.ie)t=s(n);else try{t=e.document.$.execCommand(n,!1,null)}catch(i){t=!1}return t||alert(e.lang.clipboard[this.type+"Error"]),t}}}function i(){return{canUndo:!1,async:!0,exec:function(e,t){var n=function(t,n){t&&r(t.type,t.dataValue,!!n),e.fire("afterCommandExec",{name:"paste",command:i,returnValue:!!t})},i=this;"string"==typeof t?n({type:"auto",dataValue:t},1):e.getClipboardData(n)}}}function o(){g=1,setTimeout(function(){g=0},100)}function a(){p=1,setTimeout(function(){p=0},10)}function s(t){var n=e.document,i=n.getBody(),o=!1,a=function(){o=!0};return i.on(t,a),(7<CKEDITOR.env.version?n.$:n.$.selection.createRange()).execCommand(t),i.removeListener(t,a),o}function r(t,n,i){return t={type:t},i&&!e.fire("beforePaste",t)||!n?!1:(t.dataValue=n,e.fire("paste",t))}function l(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var t,n,i,o=e.getSelection();o.getType()==CKEDITOR.SELECTION_ELEMENT&&(t=o.getSelectedElement())&&(n=o.getRanges()[0],i=e.document.createText(""),i.insertBefore(t),n.setStartBefore(i),n.setEndAfter(t),o.selectRanges([n]),setTimeout(function(){t.getParent()&&(i.remove(),o.selectElement(t))},0))}}function c(t,n){var i=e.document,o=e.editable(),a=function(e){e.cancel()},s=CKEDITOR.env.gecko&&10902>=CKEDITOR.env.version;if(!i.getById("cke_pastebin")){var r=e.getSelection(),l=r.createBookmarks(),c=new CKEDITOR.dom.element(!o.is("body")||CKEDITOR.env.ie||CKEDITOR.env.opera?"div":"body",i);c.setAttribute("id","cke_pastebin"),CKEDITOR.env.opera&&c.appendBogus();var d=0,i=i.getWindow();s?(c.insertAfter(l[0].startNode),c.setStyle("display","inline")):(CKEDITOR.env.webkit?(o.append(c),c.addClass("cke_editable"),d=(o.is("body")?o:CKEDITOR.dom.element.get(c.$.offsetParent)).getDocumentPosition().y):o.getAscendant(CKEDITOR.env.ie||CKEDITOR.env.opera?"body":"html",1).append(c),c.setStyles({position:"absolute",top:i.getScrollPosition().y-d+10+"px",width:"1px",height:Math.max(1,i.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0})),(s=c.getParent().isReadOnly())?(c.setOpacity(0),c.setAttribute("contenteditable",!0)):c.setStyle("ltr"==e.config.contentsLangDirection?"left":"right","-1000px"),e.on("selectionChange",a,null,null,0),s&&c.focus(),s=new CKEDITOR.dom.range(c),s.selectNodeContents(c);var u=s.select();if(CKEDITOR.env.ie)var h=o.once("blur",function(){e.lockSelection(u)});var f=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){(CKEDITOR.env.webkit||CKEDITOR.env.opera)&&(CKEDITOR.document[CKEDITOR.env.webkit?"getBody":"getDocumentElement"]().$.scrollTop=f),h&&h.removeListener(),CKEDITOR.env.ie&&o.focus(),r.selectBookmarks(l),c.remove();var t;CKEDITOR.env.webkit&&(t=c.getFirst())&&t.is&&t.hasClass("Apple-style-span")&&(c=t),e.removeListener("selectionChange",a),n(c.getHtml())},0)}}function d(){if(CKEDITOR.env.ie){e.focus(),o();var t=e.focusManager;if(t.lock(),e.editable().fire(v)&&!s("paste"))return t.unlock(),!1;t.unlock()}else try{if(e.editable().fire(v)&&!e.document.$.execCommand("Paste",!1,null))throw 0}catch(n){return!1}return!0}function u(t){if("wysiwyg"==e.mode)switch(t.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:t=e.editable(),o(),!CKEDITOR.env.ie&&t.fire("beforepaste"),(CKEDITOR.env.opera||CKEDITOR.env.gecko&&10900>CKEDITOR.env.version)&&t.fire("paste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:e.fire("saveSnapshot"),setTimeout(function(){e.fire("saveSnapshot")},0)}}function h(t){var n={type:"auto"},i=e.fire("beforePaste",n);c(t,function(e){e=e.replace(/<span[^>]+data-cke-bookmark[^<]*?</span>/gi,""),i&&r(n.type,e,0,1)})}function f(){if("wysiwyg"==e.mode){var t=m("Paste");e.getCommand("cut").setState(m("Cut")),e.getCommand("copy").setState(m("Copy")),e.getCommand("paste").setState(t),e.fire("pasteState",t)}}function m(t){var n;if(E&&t in{Paste:1,Cut:1})return CKEDITOR.TRISTATE_DISABLED;if("Paste"==t){CKEDITOR.env.ie&&(p=1);try{n=e.document.$.queryCommandEnabled(t)||CKEDITOR.env.webkit}catch(i){}p=0}else t=e.getSelection(),n=t.getRanges(),n=t.type!=CKEDITOR.SELECTION_NONE&&!(1==n.length&&n[0].collapsed);return n?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}var p=0,g=0,E=0,v=CKEDITOR.env.ie?"beforepaste":"paste";!function(){e.on("key",u),e.on("contentDom",t),e.on("selectionChange",function(e){E=e.data.selection.getRanges()[0].checkReadOnly(),f()}),e.contextMenu&&e.contextMenu.addListener(function(e,t){return E=t.getRanges()[0].checkReadOnly(),{cut:m("Cut"),copy:m("Copy"),paste:m("Paste")}})}(),function(){function t(t,n,i,o,a){var s=e.lang.clipboard[n];e.addCommand(n,i),e.ui.addButton&&e.ui.addButton(t,{label:s,command:n,toolbar:"clipboard,"+o}),e.addMenuItems&&e.addMenuItem(n,{label:s,command:n,group:"clipboard",order:a})}t("Cut","cut",n("cut"),10,1),t("Copy","copy",n("copy"),20,4),t("Paste","paste",i(),30,8)}(),e.getClipboardData=function(t,n){function i(e){e.removeListener(),e.cancel(),n(e.data)}function o(e){e.removeListener(),e.cancel(),l=!0,n({type:r,dataValue:e.data})}function a(){this.customTitle=t&&t.title}var s=!1,r="auto",l=!1;n||(n=t,t=null),e.on("paste",i,null,null,0),e.on("beforePaste",function(e){e.removeListener(),s=!0,r=e.data.type},null,null,1e3),!1===d()&&(e.removeListener("paste",i),s&&e.fire("pasteDialog",a)?(e.on("pasteDialogCommit",o),e.on("dialogHide",function(e){e.removeListener(),e.data.removeListener("pasteDialogCommit",o),setTimeout(function(){l||n(null)},10)})):n(null))}}function t(e){if(CKEDITOR.env.webkit){if(!e.match(/^[^<]*$/g)&&!e.match(/^(<div><br( ?/)?></div>|<div>[^<]*</div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!e.match(/^([^<]|<br( ?/)?>)*$/gi)&&!e.match(/^(<p>([^<]|<br( ?/)?>)*</p>|(rn))*$/gi))return"html"}else{if(!CKEDITOR.env.gecko&&!CKEDITOR.env.opera)return"html";if(!e.match(/^([^<]|<br( ?/)?>)*$/gi))return"html"}return"htmlifiedtext"}function n(e,t){function n(e){return CKEDITOR.tools.repeat("</p><p>",~~(e/2))+(1==e%2?"<br>":"")}return t=t.replace(/s+/g," ").replace(/> +</g,"><").replace(/<br ?/>/gi,"<br>"),t=t.replace(/</?[A-Z]+>/g,function(e){return e.toLowerCase()}),t.match(/^[^<]$/)?t:(CKEDITOR.env.webkit&&-1<t.indexOf("<div>")&&(t=t.replace(/^(<div>(<br>|)</div>)(?!$|(<div>(<br>|)</div>))/g,"<br>").replace(/^(<div>(<br>|)</div>){2}(?!$)/g,"<div></div>"),t.match(/<div>(<br>|)</div>/)&&(t="<p>"+t.replace(/(<div>(<br>|)</div>)+/g,function(e){return n(e.split("</div><div>").length+1)})+"</p>"),t=t.replace(/</div><div>/g,"<br>"),t=t.replace(/</?div>/g,"")),(CKEDITOR.env.gecko||CKEDITOR.env.opera)&&e.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(t=t.replace(/^<br><br>$/,"<br>")),-1<t.indexOf("<br><br>")&&(t="<p>"+t.replace(/(<br>){2,}/g,function(e){return n(e.length/4)})+"</p>")),a(e,t))}function i(){var e=new CKEDITOR.htmlParser.filter,t={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},n=CKEDITOR.tools.extend({br:0},CKEDITOR.dtd.$inline),i={p:1,br:1,"cke:br":1},o=CKEDITOR.dtd,a=CKEDITOR.tools.extend({area:1,basefont:1,embed:1,iframe:1,map:1,object:1,param:1},CKEDITOR.dtd.$nonBodyContent,CKEDITOR.dtd.$cdata),s=function(e){delete e.name,e.add(new CKEDITOR.htmlParser.text(" "))},r=function(e){for(var t,n=e;(n=n.next)&&n.name&&n.name.match(/^hd$/);)for(t=new CKEDITOR.htmlParser.element("cke:br"),t.isEmpty=!0,e.add(t);t=n.children.shift();)e.add(t)};return e.addRules({elements:{h1:r,h2:r,h3:r,h4:r,h5:r,h6:r,img:function(e){var e=CKEDITOR.tools.trim(e.attributes.alt||""),t=" ";return e&&!e.match(/(^http|.(jpe?g|gif|png))/i)&&(t=" ["+e+"] "),new CKEDITOR.htmlParser.text(t)},td:s,th:s,$:function(e){var s,r=e.name;if(a[r])return!1;if(delete e.attributes,"br"==r)return e;if(t[r])e.name="p";else if(n[r])delete e.name;else if(o[r]){if(s=new CKEDITOR.htmlParser.element("cke:br"),s.isEmpty=!0,CKEDITOR.dtd.$empty[r])return s;e.add(s,0),s=s.clone(),s.isEmpty=!0,e.add(s),delete e.name}return i[e.name]||delete e.name,e}}}),e}function o(e,t,n){var t=new CKEDITOR.htmlParser.fragment.fromHtml(t),i=new CKEDITOR.htmlParser.basicWriter;t.writeHtml(i,n);var t=i.getHtml(),t=t.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,""),o=0,t=t.replace(/</?p>/g,function(e){if("<p>"==e){if(1<++o)return"</p><p>"}else if(0<--o)return"</p><p>";return e}).replace(/<p></p>/g,"");return a(e,t)}function a(e,t){return e.enterMode==CKEDITOR.ENTER_BR?t=t.replace(/(</p><p>)+/g,function(e){return CKEDITOR.tools.repeat("<br>",2*(e.length/7))}).replace(/</?p>/g,""):e.enterMode==CKEDITOR.ENTER_DIV&&(t=t.replace(/<(/)?p>/g,"<$1div>")),t}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(a){var s;e(a),CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js")),a.on("paste",function(e){var t=e.data.dataValue,n=CKEDITOR.dtd.$block;if(-1<t.indexOf("Apple-")&&(t=t.replace(/<span class="Apple-converted-space">&nbsp;</span>/gi," "),"html"!=e.data.type&&(t=t.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)</span>/gi,function(e,t){return t.replace(/t/g,"&nbsp;&nbsp; &nbsp;")})),-1<t.indexOf('<br class="Apple-interchange-newline">')&&(e.data.startsWithEOL=1,e.data.preSniffing="html",t=t.replace(/<br class="Apple-interchange-newline">/,"")),t=t.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1")),t.match(/^<[^<]+cke_(editable|contents)/i)){var i,o,a=new CKEDITOR.dom.element("div");for(a.setHtml(t);1==a.getChildCount()&&(i=a.getFirst())&&i.type==CKEDITOR.NODE_ELEMENT&&(i.hasClass("cke_editable")||i.hasClass("cke_contents"));)a=o=i;o&&(t=o.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?t=t.replace(/^&nbsp;(?: |rn)?<(w+)/g,function(t,i){return i.toLowerCase()in n?(e.data.preSniffing="html","<"+i):t}):CKEDITOR.env.webkit?t=t.replace(/</(w+)><div><br></div>$/,function(t,i){return i in n?(e.data.endsWithEOL=1,"</"+i+">"):t}):CKEDITOR.env.gecko&&(t=t.replace(/(s)<br>$/,"$1")),e.data.dataValue=t},null,null,3),a.on("paste",function(e){var r,e=e.data,l=e.type,c=e.dataValue,d=a.config.clipboard_defaultContentType||"html";r="html"==l||"html"==e.preSniffing?"html":t(c),"htmlifiedtext"==r?c=n(a.config,c):"text"==l&&"html"==r&&(c=o(a.config,c,s||(s=i(a)))),e.startsWithEOL&&(c='<br data-cke-eol="1">'+c),e.endsWithEOL&&(c+='<br data-cke-eol="1">'),"auto"==l&&(l="html"==r||"html"==d?"html":"text"),e.type=l,e.dataValue=c,delete e.preSniffing,delete e.startsWithEOL,delete e.endsWithEOL},null,null,6),a.on("paste",function(e){e=e.data,a.insertHtml(e.dataValue,e.type),setTimeout(function(){a.fire("afterPaste")},0)},null,null,1e3),a.on("pasteDialog",function(e){setTimeout(function(){a.openDialog("paste",e.data)},0)})}})}(),function(){CKEDITOR.plugins.add("panel",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}}),CKEDITOR.UI_PANEL="panel",CKEDITOR.ui.panel=function(e,t){t&&CKEDITOR.tools.extend(this,t),CKEDITOR.tools.extend(this,{className:"",css:[]}),this.id=CKEDITOR.tools.getNextId(),this.document=e,this.isFramed=this.forceIFrame||this.css.length,this._={blocks:{}}},CKEDITOR.ui.panel.handler={create:function(e){return new CKEDITOR.ui.panel(e)}};var e=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>'),t=CKEDITOR.addTemplate("panel-frame",'<iframe id="{id}" class="cke_panel_frame" role="application" frameborder="0" src="{src}"></iframe>'),n=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(i,o){this.getHolderElement=function(){var e=this._.holder;if(!e){if(this.isFramed){var e=this.document.getById(this.id+"_frame"),t=e.getParent(),e=e.getFrameDocument();CKEDITOR.env.iOS&&t.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"}),t=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=!0,this.onLoad&&this.onLoad()},this)),e.write(n.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+t+");"},a))),e.getWindow().$.CKEDITOR=CKEDITOR,e.on("key"+(CKEDITOR.env.opera?"press":"down"),function(e){var t=e.data.getKeystroke(),n=this.document.getById(this.id).getAttribute("dir");this._.onKeyDown&&!1===this._.onKeyDown(t)?e.data.preventDefault():(27==t||t==("rtl"==n?39:37))&&this.onEscape&&!1===this.onEscape(t)&&e.data.preventDefault()},this),e=e.getBody(),e.unselectable(),CKEDITOR.env.air&&CKEDITOR.tools.callFunction(t)}else e=this.document.getById(this.id);this._.holder=e}return e};var a={editorId:i.id,id:this.id,langCode:i.langCode,dir:i.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":i.config.baseFloatZIndex+1};this.isFramed&&(a.frame=t.output({id:this.id+"_frame",src:"javascript:void(document.open(),"+(CKEDITOR.env.isCustomDomain()?"document.domain='"+document.domain+"',":"")+'document.close())">'}));var s=e.output(a);return o&&o.push(s),s},addBlock:function(e,t){return t=this._.blocks[e]=t instanceof CKEDITOR.ui.panel.block?t:new CKEDITOR.ui.panel.block(this.getHolderElement(),t),this._.currentBlock||this.showBlock(e),t},getBlock:function(e){return this._.blocks[e]},showBlock:function(e){var e=this._.blocks[e],t=this._.currentBlock,n=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");return t&&(n.removeAttributes(t.attributes),t.hide()),this._.currentBlock=e,n.setAttributes(e.attributes),CKEDITOR.fire("ariaWidget",n),e._.focusIndex=-1,this._.onKeyDown=e.onKeyDown&&CKEDITOR.tools.bind(e.onKeyDown,e),e.show(),e},destroy:function(){this.element&&this.element.remove()}},CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(e,t){this.element=e.append(e.getDocument().createElement("div",{attributes:{tabIndex:-1,"class":"cke_panel_block",role:"presentation"},styles:{display:"none"}})),t&&CKEDITOR.tools.extend(this,t),this.attributes.title||(this.attributes.title=this.attributes["aria-label"]),this.keys={},this._.focusIndex=-1,this.element.disableContextMenu()},_:{markItem:function(e){-1!=e&&(e=this.element.getElementsByTag("a").getItem(this._.focusIndex=e),(CKEDITOR.env.webkit||CKEDITOR.env.opera)&&e.getDocument().getWindow().focus(),e.focus(),this.onMark&&this.onMark(e))}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){(!this.onHide||!0!==this.onHide.call(this))&&this.element.setStyle("display","none")},onKeyDown:function(e){var t=this.keys[e];switch(t){case"next":for(var n,e=this._.focusIndex,t=this.element.getElementsByTag("a");n=t.getItem(++e);)if(n.getAttribute("_cke_focus")&&n.$.offsetWidth){this._.focusIndex=e,n.focus();break}return!1;case"prev":for(e=this._.focusIndex,t=this.element.getElementsByTag("a");e>0&&(n=t.getItem(--e));)if(n.getAttribute("_cke_focus")&&n.$.offsetWidth){this._.focusIndex=e,n.focus();break}return!1;case"click":case"mouseup":return e=this._.focusIndex,(n=e>=0&&this.element.getElementsByTag("a").getItem(e))&&(n.$[t]?n.$[t]():n.$["on"+t]()),!1}return!0}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function e(e,n,i,o,a){var a=CKEDITOR.tools.genKey(n.getUniqueId(),i.getUniqueId(),e.lang.dir,e.uiColor||"",o.css||"",a||""),s=t[a];return s||(s=t[a]=new CKEDITOR.ui.panel(n,o),s.element=i.append(CKEDITOR.dom.element.createFromHtml(s.render(e),n)),s.element.setStyles({display:"none",position:"absolute"})),s}var t={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(t,n,i,o){function a(){c.hide()}i.forceIFrame=1,i.toolbarRelated&&t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(n=CKEDITOR.document.getById("cke_"+t.name));var s=n.getDocument(),o=e(t,s,n,i,o||0),r=o.element,l=r.getFirst(),c=this;r.disableContextMenu(),r.setAttribute("role","application"),this.element=r,this._={editor:t,panel:o,parentElement:n,definition:i,document:s,iframe:l,children:[],dir:t.lang.dir},t.on("mode",a),t.on("resize",a),s.getWindow().on("resize",a)},proto:{addBlock:function(e,t){return this._.panel.addBlock(e,t)},addListBlock:function(e,t){return this._.panel.addListBlock(e,t)},getBlock:function(e){return this._.panel.getBlock(e)},showBlock:function(e,t,n,i,o){var a=this._.panel,s=a.showBlock(e);this.allowBlur(!1),e=this._.editor.editable(),this._.returnFocus=e.hasFocus?e:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);var r=this.element,e=this._.iframe,e=CKEDITOR.env.ie?e:new CKEDITOR.dom.window(e.$.contentWindow),l=r.getDocument(),c=this._.parentElement.getPositionedAncestor(),d=t.getDocumentPosition(l),l=c?c.getDocumentPosition(l):{x:0,y:0},u="rtl"==this._.dir,h=d.x+(i||0)-l.x,f=d.y+(o||0)-l.y;!u||1!=n&&4!=n?u||2!=n&&3!=n||(h+=t.$.offsetWidth-1):h+=t.$.offsetWidth,(3==n||4==n)&&(f+=t.$.offsetHeight-1),this._.panel._.offsetParentId=t.getId(),r.setStyles({top:f+"px",left:0,display:""}),r.setOpacity(0),r.getFirst().removeStyle("width"),this._.editor.focusManager.add(e),this._.blurSet||(CKEDITOR.event.useCapture=!0,e.on("blur",function(e){this.allowBlur()&&e.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild&&(delete this._.returnFocus,this.hide())},this),e.on("focus",function(){this._.focused=!0,this.hideChild(),this.allowBlur(!0)},this),CKEDITOR.event.useCapture=!1,this._.blurSet=1),a.onEscape=CKEDITOR.tools.bind(function(e){return this.onEscape&&this.onEscape(e)===!1?!1:void 0},this),CKEDITOR.tools.setTimeout(function(){var e=CKEDITOR.tools.bind(function(){if(r.removeStyle("width"),s.autoSize){var e=s.element.getDocument(),e=(CKEDITOR.env.webkit?s.element:e.getBody()).$.scrollWidth;
CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e>0&&(e+=(r.$.offsetWidth||0)-(r.$.clientWidth||0)+3),r.setStyle("width",e+10+"px"),e=s.element.$.scrollHeight,CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e>0&&(e+=(r.$.offsetHeight||0)-(r.$.clientHeight||0)+3),r.setStyle("height",e+"px"),a._.currentBlock.element.setStyle("display","none").removeStyle("display")}else r.removeStyle("height");u&&(h-=r.$.offsetWidth),r.setStyle("left",h+"px");var t=a.element.getWindow(),e=r.$.getBoundingClientRect(),t=t.getViewPaneSize(),n=e.width||e.right-e.left,i=e.height||e.bottom-e.top,o=u?e.right:t.width-e.left,l=u?t.width-e.right:e.left;u?n>o&&(h=l>n?h+n:t.width>n?h-e.left:h-e.right+t.width):n>o&&(h=l>n?h-n:t.width>n?h-e.right+t.width:h-e.left),n=e.top,t.height-e.top<i&&(f=n>i?f-i:t.height>i?f-e.bottom+t.height:f-e.top),CKEDITOR.env.ie&&(t=e=new CKEDITOR.dom.element(r.$.offsetParent),"html"==t.getName()&&(t=t.getDocument().getBody()),"rtl"==t.getComputedStyle("direction")&&(h=CKEDITOR.env.ie8Compat?h-2*r.getDocument().getDocumentElement().$.scrollLeft:h-(e.$.scrollWidth-e.$.clientWidth)));var c,e=r.getFirst();(c=e.getCustomData("activePanel"))&&c.onHide&&c.onHide.call(this,1),e.setCustomData("activePanel",this),r.setStyles({top:f+"px",left:h+"px"}),r.setOpacity(1)},this);a.isLoaded?e():a.onLoad=e,CKEDITOR.tools.setTimeout(function(){this.focus(),this.allowBlur(!0),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 e=CKEDITOR.document.getActive();!e.equals(this._.iframe)&&e.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var e=this._.iframe.getFrameDocument().getActive();e.is("a")&&(this._.lastFocused=e)},hide:function(e){!this.visible||this.onHide&&!0===this.onHide.call(this)||(this.hideChild(),CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur(),this.element.setStyle("display","none"),this.visible=0,this.element.getFirst().removeCustomData("activePanel"),(e=e&&this._.returnFocus)&&(CKEDITOR.env.webkit&&e.type&&e.getWindow().$.focus(),e.focus()),delete this._.lastFocused,this._.editor.fire("panelHide",this))},allowBlur:function(e){var t=this._.panel;return void 0!=e&&(t.allowBlur=e),t.allowBlur},showAsChild:function(e,t,n,i,o,a){this._.activeChild==e&&e._.panel._.offsetParentId==n.getId()||(this.hideChild(),e.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=e,this._.focused=!1,e.showBlock(t,n,i,o,a),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){e.element.getChild(0).$.style.cssText+=""},100))},hideChild:function(e){var t=this._.activeChild;t&&(delete t.onHide,delete this._.activeChild,t.hide(),e&&this.focus())}}}),CKEDITOR.on("instanceDestroyed",function(){var e,n=CKEDITOR.tools.isEmpty(CKEDITOR.instances);for(e in t){var i=t[e];n?i.destroy():i.element.hide()}n&&(t={})})}(),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(e){for(var t=e.config.menu_groups.split(","),n=e._.menuGroups={},i=e._.menuItems={},o=0;o<t.length;o++)n[t[o]]=o+1;e.addMenuGroup=function(e,t){n[e]=t||100},e.addMenuItem=function(e,t){n[t.group]&&(i[e]=new CKEDITOR.menuItem(this,e,t))},e.addMenuItems=function(e){for(var t in e)this.addMenuItem(t,e[t])},e.getMenuItem=function(e){return i[e]},e.removeMenuItem=function(e){delete i[e]}}}),function(){function e(e){e.sort(function(e,t){return e.group<t.group?-1:e.group>t.group?1:e.order<t.order?-1:e.order>t.order?1:0})}var t='<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="menuitem" aria-haspopup="{hasPopup}" aria-disabled="{disabled}" aria-pressed="{pressed}"';(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)&&(t+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(t+=' onblur="this.style.cssText = this.style.cssText;"');var t=t+(' 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;">'),n=CKEDITOR.addTemplate("menuItem",t+'<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>'),i=CKEDITOR.addTemplate("menuArrow",'<span class="cke_menuarrow"><span>{label}</span></span>');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(e,t){t=this._.definition=t||{},this.id=CKEDITOR.tools.getNextId(),this.editor=e,this.items=[],this._.listeners=[],this._.level=t.level||1;var n=CKEDITOR.tools.extend({},t.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),i=n.block.attributes=n.attributes||{};!i.role&&(i.role="menu"),this._.panelDefinition=n},_:{onShow:function(){var e=this.editor.getSelection(),t=e&&e.getStartElement(),n=this.editor.elementPath(),i=this._.listeners;this.removeAll();for(var o=0;o<i.length;o++){var a=i[o](t,e,n);if(a)for(var s in a){var r=this.editor.getMenuItem(s);!r||r.command&&!this.editor.getCommand(r.command).state||(r.state=a[s],this.add(r))}}},onClick:function(e){this.hide(),e.onClick?e.onClick():e.command&&this.editor.execCommand(e.command)},onEscape:function(e){var t=this.parent;return t?t._.panel.hideChild(1):27==e&&this.hide(1),!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(e){var t=this._.subMenu,n=this.items[e];if(n=n.getItems&&n.getItems()){t?t.removeAll():(t=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),t.parent=this,t._.onClick=CKEDITOR.tools.bind(this._.onClick,this));for(var i in n){var o=this.editor.getMenuItem(i);o&&(o.state=n[i],t.add(o))}var a=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+(""+e));setTimeout(function(){t.show(a,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(e){e.order||(e.order=this.items.length),this.items.push(e)},removeAll:function(){this.items=[]},show:function(t,n,i,o){if(this.parent||(this._.onShow(),this.items.length)){var n=n||("rtl"==this.editor.lang.dir?2:1),a=this.items,s=this.editor,r=this._.panel,l=this._.element;if(!r){r=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level),r.onEscape=CKEDITOR.tools.bind(function(e){return!1===this._.onEscape(e)?!1:void 0},this),r.onShow=function(){r._.panel.getHolderElement().getParent().addClass("cke cke_reset_all")},r.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this),l=r.addBlock(this.id,this._.panelDefinition.block),l.autoSize=!0;var c=l.keys;c[40]="next",c[9]="next",c[38]="prev",c[CKEDITOR.SHIFT+9]="prev",c["rtl"==s.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click",c[32]=CKEDITOR.env.ie?"mouseup":"click",CKEDITOR.env.ie&&(c[13]="mouseup"),l=this._.element=l.element,c=l.getDocument(),c.getBody().setStyle("overflow","hidden"),c.getElementsByTag("html").getItem(0).setStyle("overflow","hidden"),this._.itemOverFn=CKEDITOR.tools.addFunction(function(e){clearTimeout(this._.showSubTimeout),this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,s.config.menu_subMenuDelay||400,this,[e])},this),this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this),this._.itemClickFn=CKEDITOR.tools.addFunction(function(e){var t=this.items[e];t.state==CKEDITOR.TRISTATE_DISABLED?this.hide(1):t.getItems?this._.showSubMenu(e):this._.onClick(t)},this)}e(a);for(var c=s.elementPath(),c=['<div class="cke_menu'+(c&&c.direction()!=s.lang.dir?" cke_mixed_dir_content":"")+'" role="presentation">'],d=a.length,u=d&&a[0].group,h=0;d>h;h++){var f=a[h];u!=f.group&&(c.push('<div class="cke_menuseparator" role="separator"></div>'),u=f.group),f.render(this,h,c)}c.push("</div>"),l.setHtml(c.join("")),CKEDITOR.ui.fire("ready",this),this.parent?this.parent._.panel.showAsChild(r,this.id,t,n,i,o):r.showBlock(this.id,t,n,i,o),s.fire("menuShow",[r])}},addListener:function(e){this._.listeners.push(e)},hide:function(e){this._.onHide&&this._.onHide(),this._.panel&&this._.panel.hide(e)}}}),CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(e,t,n){CKEDITOR.tools.extend(this,n,{order:0,className:"cke_menubutton__"+t}),this.group=e._.menuGroups[this.group],this.editor=e,this.name=t},proto:{render:function(e,t,o){var a=e.id+(""+t),s="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,r=s==CKEDITOR.TRISTATE_ON?"on":s==CKEDITOR.TRISTATE_DISABLED?"disabled":"off",l=this.getItems,c="&#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",d=this.name;this.icon&&!/./.test(this.icon)&&(d=this.icon),e={id:a,name:this.name,iconName:d,label:this.label,cls:this.className||"",state:r,hasPopup:l?"true":"false",disabled:s==CKEDITOR.TRISTATE_DISABLED,pressed:s==CKEDITOR.TRISTATE_ON,title:this.label,href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:e._.itemOverFn,moveOutFn:e._.itemOutFn,clickFn:e._.itemClickFn,index:t,iconStyle:CKEDITOR.skin.getIconStyle(d,"rtl"==this.editor.lang.dir,d==this.icon?null:this.icon,this.iconOffset),arrowHtml:l?i.output({label:c}):""},n.output(e,o)}}})}(),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(e){this.base.call(this,e,{panel:{className:"cke_menu_panel",attributes:{"aria-label":e.lang.contextmenu.options}}})},proto:{addTarget:function(e,t){if(CKEDITOR.env.opera&&!("oncontextmenu"in document.body)){var n;e.on("mousedown",function(i){if(i=i.data,2!=i.$.button)i.getKeystroke()==CKEDITOR.CTRL+1&&e.fire("contextmenu",i);else if(!t||!(CKEDITOR.env.mac?i.$.metaKey:i.$.ctrlKey)){var o=i.getTarget();n||(o=o.getDocument(),n=o.createElement("input"),n.$.type="button",o.getBody().append(n)),n.setAttribute("style","position:absolute;top:"+(i.$.clientY-2)+"px;left:"+(i.$.clientX-2)+"px;width:5px;height:5px;opacity:0.01")}}),e.on("mouseup",function(t){n&&(n.remove(),n=void 0,e.fire("contextmenu",t.data))})}if(e.on("contextmenu",function(e){if(e=e.data,!t||!(CKEDITOR.env.webkit?i:CKEDITOR.env.mac?e.$.metaKey:e.$.ctrlKey)){e.preventDefault();var n=e.getTarget().getDocument(),o=e.getTarget().getDocument().getDocumentElement(),a=!n.equals(CKEDITOR.document),n=n.getWindow().getScrollPosition(),s=a?e.$.clientX:e.$.pageX||n.x+e.$.clientX,r=a?e.$.clientY:e.$.pageY||n.y+e.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(o,null,s,r)},CKEDITOR.env.ie?200:0,this)}},this),CKEDITOR.env.opera&&e.on("keypress",function(e){e=e.data,0===e.$.keyCode&&e.preventDefault()}),CKEDITOR.env.webkit){var i,o=function(){i=0};e.on("keydown",function(e){i=CKEDITOR.env.mac?e.data.$.metaKey:e.data.$.ctrlKey}),e.on("keyup",o),e.on("contextmenu",o)}},open:function(e,t,n,i){this.editor.focus(),e=e||CKEDITOR.document.getDocumentElement(),this.editor.selectionChange(1),this.show(e,t,n,i)}}})},beforeInit:function(e){var t=e.contextMenu=new CKEDITOR.plugins.contextMenu(e);e.on("contentDom",function(){t.addTarget(e.editable(),!1!==e.config.browserContextMenuOnCtrl)}),e.addCommand("contextMenu",{exec:function(){e.contextMenu.open(e.document.getBody())}}),e.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu"),e.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),CKEDITOR.plugins.add("resize",{init:function(e){var t,n,i,o,a=e.config,s=e.ui.spaceId("resizer"),r=e.element?e.element.getDirection(1):"ltr";if(!a.resize_dir&&(a.resize_dir="vertical"),void 0==a.resize_maxWidth&&(a.resize_maxWidth=3e3),void 0==a.resize_maxHeight&&(a.resize_maxHeight=3e3),void 0==a.resize_minWidth&&(a.resize_minWidth=750),void 0==a.resize_minHeight&&(a.resize_minHeight=250),!1!==a.resize_enabled){var l=null,c=("both"==a.resize_dir||"horizontal"==a.resize_dir)&&a.resize_minWidth!=a.resize_maxWidth,d=("both"==a.resize_dir||"vertical"==a.resize_dir)&&a.resize_minHeight!=a.resize_maxHeight,u=function(s){var l=t,u=n,h=l+(s.data.$.screenX-i)*("rtl"==r?-1:1),s=u+(s.data.$.screenY-o);c&&(l=Math.max(a.resize_minWidth,Math.min(h,a.resize_maxWidth))),d&&(u=Math.max(a.resize_minHeight,Math.min(s,a.resize_maxHeight))),e.resize(c?l:null,u)},h=function(){CKEDITOR.document.removeListener("mousemove",u),CKEDITOR.document.removeListener("mouseup",h),e.document&&(e.document.removeListener("mousemove",u),e.document.removeListener("mouseup",h))},f=CKEDITOR.tools.addFunction(function(s){l||(l=e.getResizable()),t=l.$.offsetWidth||0,n=l.$.offsetHeight||0,i=s.screenX,o=s.screenY,a.resize_minWidth>t&&(a.resize_minWidth=t),a.resize_minHeight>n&&(a.resize_minHeight=n),CKEDITOR.document.on("mousemove",u),CKEDITOR.document.on("mouseup",h),e.document&&(e.document.on("mousemove",u),e.document.on("mouseup",h)),s.preventDefault&&s.preventDefault()});e.on("destroy",function(){CKEDITOR.tools.removeFunction(f)}),e.on("uiSpace",function(t){if("bottom"==t.data.space){var n="";c&&!d&&(n=" cke_resizer_horizontal"),!c&&d&&(n=" cke_resizer_vertical");var i='<span id="'+s+'" class="cke_resizer'+n+" cke_resizer_"+r+'" title="'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+f+', event)">'+("ltr"==r?"◢":"◣")+"</span>";"ltr"==r&&"ltr"==n?t.data.html+=i:t.data.html=i+t.data.html}},e,null,100),e.on("maximize",function(t){e.ui.space("resizer")[t.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){var e='<a id="{id}" class="cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&10900<=CKEDITOR.env.version&&!CKEDITOR.env.hc?"":'" href="javascript:void('{titleJs}')"')+' title="{title}" tabindex="-1" hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="{hasArrow}"';(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)&&(e+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(e+=' onblur="this.style.cssText = this.style.cssText;"');var e=e+(' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);"  onmousedown="return CKEDITOR.tools.callFunction({mousedownFn},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}"'),e=e+'>&nbsp;</span><span id="{id}_label" class="cke_button_label cke_button__{name}_label">{label}</span>{arrowHtml}</a>',t=CKEDITOR.addTemplate("buttonArrow",'<span class="cke_button_arrow">'+(CKEDITOR.env.hc?"&#9660;":"")+"</span>"),n=CKEDITOR.addTemplate("button",e);CKEDITOR.plugins.add("button",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}}),CKEDITOR.UI_BUTTON="button",CKEDITOR.ui.button=function(e){CKEDITOR.tools.extend(this,e,{title:e.label,click:e.click||function(t){t.execCommand(e.command)}}),this._={}},CKEDITOR.ui.button.handler={create:function(e){return new CKEDITOR.ui.button(e)}},CKEDITOR.ui.button.prototype={render:function(e,i){var o,a=CKEDITOR.env,s=this._.id=CKEDITOR.tools.getNextId(),r="",l=this.command;this._.editor=e;var c={id:s,button:this,editor:e,focus:function(){CKEDITOR.document.getById(s).focus()},execute:function(){this.button.click(e)},attach:function(e){this.button.attach(e)}},d=CKEDITOR.tools.addFunction(function(e){return c.onkey?(e=new CKEDITOR.dom.event(e),!1!==c.onkey(c,e.getKeystroke())):void 0}),u=CKEDITOR.tools.addFunction(function(e){var t;return c.onfocus&&(t=!1!==c.onfocus(c,new CKEDITOR.dom.event(e))),CKEDITOR.env.gecko&&10900>CKEDITOR.env.version&&e.preventBubble(),t}),h=0,f=CKEDITOR.tools.addFunction(function(){if(CKEDITOR.env.opera){var t=e.editable();t.isInline()&&t.hasFocus&&(e.lockSelection(),h=1)}});if(c.clickFn=o=CKEDITOR.tools.addFunction(function(){h&&(e.unlockSelection(1),h=0),c.execute()}),this.modes){var m={},p=function(){var t=e.mode;t&&(t=this.modes[t]?void 0!=m[t]?m[t]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,this.setState(e.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:t))};e.on("beforeModeUnload",function(){e.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(m[e.mode]=this._.state)},this),e.on("mode",p,this),!this.readOnly&&e.on("readOnly",p,this)}else l&&(l=e.getCommand(l))&&(l.on("state",function(){this.setState(l.state)},this),r+=l.state==CKEDITOR.TRISTATE_ON?"on":l.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");this.directional&&e.on("contentDirChanged",function(t){var n=CKEDITOR.document.getById(this._.id),i=n.getFirst(),t=t.data;t!=e.lang.dir?n.addClass("cke_"+t):n.removeClass("cke_ltr").removeClass("cke_rtl"),i.setAttribute("style",CKEDITOR.skin.getIconStyle(g,"rtl"==t,this.icon,this.iconOffset))},this),l||(r+="off");var g=p=this.name||this.command;return this.icon&&!/./.test(this.icon)&&(g=this.icon,this.icon=null),a={id:s,name:p,iconName:g,label:this.label,cls:this.className||"",state:r,title:this.title,titleJs:a.gecko&&10900<=a.version&&!a.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:d,mousedownFn:f,focusFn:u,clickFn:o,style:CKEDITOR.skin.getIconStyle(g,"rtl"==e.lang.dir,this.icon,this.iconOffset),arrowHtml:this.hasArrow?t.output():""},n.output(a,i),this.onRender&&this.onRender(),c},setState:function(e){if(this._.state==e)return!1;this._.state=e;var t=CKEDITOR.document.getById(this._.id);return t?(t.setState(e,"cke_button"),e==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled"),e==CKEDITOR.TRISTATE_ON?t.setAttribute("aria-pressed",!0):t.removeAttribute("aria-pressed"),!0):!1}},CKEDITOR.ui.prototype.addButton=function(e,t){this.add(e,CKEDITOR.UI_BUTTON,t)}}(),function(){function e(e){function n(){for(var n=i(),a=CKEDITOR.tools.clone(e.config.toolbarGroups)||t(e),s=0;s<a.length;s++){var r=a[s];if("/"!=r){"string"==typeof r&&(r=a[s]={name:r});var l,c=r.groups;if(c)for(var d=0;d<c.length;d++)l=c[d],(l=n[l])&&o(r,l);(l=n[r.name])&&o(r,l)}}return a}function i(){var t,n,i,o={};for(t in e.ui.items)n=e.ui.items[t],i=n.toolbar||"others",i=i.split(","),n=i[0],i=parseInt(i[1]||-1,10),o[n]||(o[n]=[]),o[n].push({name:t,order:i});for(n in o)o[n]=o[n].sort(function(e,t){return e.order==t.order?0:0>t.order?-1:0>e.order?1:e.order<t.order?-1:1});return o}function o(e,t){if(t.length){e.items?e.items.push("-"):e.items=[];for(var n;n=t.shift();)e.items.push(n.name)}}var a=e.config.toolbar;return"string"==typeof a&&(a=e.config["toolbar_"+a]),e.toolbar=a||n()}function t(e){return e._.toolbarGroups||(e._.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"]},{name:"links"},{name:"insert"},"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var n=function(){this.toolbars=[],this.focusCommandExecuted=!1};n.prototype.focus=function(){for(var e,t=0;e=this.toolbars[t++];)for(var n,i=0;n=e.items[i++];)if(n.focus)return n.focus(),void 0};var i={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(e){e.toolbox&&(e.toolbox.focusCommandExecuted=!0,CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){e.toolbox.focus()},100):e.toolbox.focus())}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(t){var o,a=function(e,n){var i,s="rtl"==t.lang.dir,r=t.config.toolbarGroupCycling,r=void 0===r||r;switch(n){case 9:case CKEDITOR.SHIFT+9:for(;!i||!i.items.length;)if(i=9==n?(i?i.next:e.toolbar.next)||t.toolbox.toolbars[0]:(i?i.previous:e.toolbar.previous)||t.toolbox.toolbars[t.toolbox.toolbars.length-1],i.items.length)for(e=i.items[o?i.items.length-1:0];e&&!e.focus;)(e=o?e.previous:e.next)||(i=0);return e&&e.focus(),!1;case s?37:39:case 40:i=e;do i=i.next,!i&&r&&(i=e.toolbar.items[0]);while(i&&!i.focus);return i?i.focus():a(e,9),!1;case s?39:37:case 38:i=e;do i=i.previous,!i&&r&&(i=e.toolbar.items[e.toolbar.items.length-1]);while(i&&!i.focus);return i?i.focus():(o=1,a(e,CKEDITOR.SHIFT+9),o=0),!1;case 27:return t.focus(),!1;case 13:case 32:return e.execute(),!1}return!0};t.on("uiSpace",function(i){if(i.data.space==t.config.toolbarLocation){t.toolbox=new n;var o,s,r=CKEDITOR.tools.getNextId(),l=t.config.removeButtons,l=l&&l.split(","),c=['<span id="',r,'" class="cke_voice_label">',t.lang.toolbar.toolbars,"</span>",'<span id="'+t.ui.spaceId("toolbox")+'" class="cke_toolbox" role="group" aria-labelledby="',r,'" onmousedown="return false;">'],r=!1!==t.config.toolbarStartupExpanded;t.config.toolbarCanCollapse&&t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&c.push('<span class="cke_toolbox_main"'+(r?">":' style="display:none">'));for(var d=t.toolbox.toolbars,u=e(t),h=0;h<u.length;h++){var f,m,p,g=0,E=u[h];if(E)if(o&&(c.push("</span>"),s=o=0),"/"===E)c.push('<span class="cke_toolbar_break"></span>');else{p=E.items||E;for(var v=0;v<p.length;v++){var T;T=p[v];var C;if(!(l&&0<=CKEDITOR.tools.indexOf(l,T))&&(T=t.ui.create(T)))if(T.type==CKEDITOR.UI_SEPARATOR)s=o&&T;else{if(C=!1!==T.canGroup,!g){f=CKEDITOR.tools.getNextId(),g={id:f,items:[]},m=E.name&&(t.lang.toolbar.toolbarGroups[E.name]||E.name),c.push('<span id="',f,'" class="cke_toolbar"',m?' aria-labelledby="'+f+'_label"':"",' role="toolbar">'),m&&c.push('<span id="',f,'_label" class="cke_voice_label">',m,"</span>"),c.push('<span class="cke_toolbar_start"></span>');var I=d.push(g)-1;I>0&&(g.previous=d[I-1],g.previous.next=g)}C?o||(c.push('<span class="cke_toolgroup" role="presentation">'),o=1):o&&(c.push("</span>"),o=0),f=function(e){e=e.render(t,c),I=g.items.push(e)-1,I>0&&(e.previous=g.items[I-1],e.previous.next=e),e.toolbar=g,e.onkey=a,e.onfocus=function(){t.toolbox.focusCommandExecuted||t.focus()}},s&&(f(s),s=0),f(T)}}o&&(c.push("</span>"),s=o=0),g&&c.push('<span class="cke_toolbar_end"></span></span>')}}if(t.config.toolbarCanCollapse&&c.push("</span>"),t.config.toolbarCanCollapse&&t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var b=CKEDITOR.tools.addFunction(function(){t.execCommand("toolbarCollapse")});t.on("destroy",function(){CKEDITOR.tools.removeFunction(b)}),t.addCommand("toolbarCollapse",{readOnly:1,exec:function(e){var t=e.ui.space("toolbar_collapser"),n=t.getPrevious(),i=e.ui.space("contents"),o=n.getParent(),a=parseInt(i.$.style.height,10),s=o.$.offsetHeight,r=t.hasClass("cke_toolbox_collapser_min");r?(n.show(),t.removeClass("cke_toolbox_collapser_min"),t.setAttribute("title",e.lang.toolbar.toolbarCollapse)):(n.hide(),t.addClass("cke_toolbox_collapser_min"),t.setAttribute("title",e.lang.toolbar.toolbarExpand)),t.getFirst().setText(r?"▲":"◀"),i.setStyle("height",a-(o.$.offsetHeight-s)+"px"),e.fire("resize")},modes:{wysiwyg:1,source:1}}),t.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse"),c.push('<a title="'+(r?t.lang.toolbar.toolbarCollapse:t.lang.toolbar.toolbarExpand)+'" id="'+t.ui.spaceId("toolbar_collapser")+'" tabIndex="-1" class="cke_toolbox_collapser'),r||c.push(" cke_toolbox_collapser_min"),c.push('" onclick="CKEDITOR.tools.callFunction('+b+')">','<span class="cke_arrow">&#9650;</span>',"</a>")}c.push("</span>"),i.data.html+=c.join("")}}),t.on("destroy",function(){if(this.toolbox){var e,t,n,i,o=0;for(e=this.toolbox.toolbars;o<e.length;o++)for(n=e[o].items,t=0;t<n.length;t++)i=n[t],i.clickFn&&CKEDITOR.tools.removeFunction(i.clickFn),i.keyDownFn&&CKEDITOR.tools.removeFunction(i.keyDownFn)}}),t.on("uiReady",function(){var e=t.ui.space("toolbox");e&&t.focusManager.add(e,1)}),t.addCommand("toolbarFocus",i),t.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus"),t.ui.add("-",CKEDITOR.UI_SEPARATOR,{}),t.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(e,t){return t.push('<span class="cke_toolbar_separator" role="separator"></span>'),{}}}}})}}),CKEDITOR.ui.prototype.addToolbarGroup=function(e,n,i){var o=t(this.editor),a=0===n,s={name:e};if(i){if(i=CKEDITOR.tools.search(o,function(e){return e.name==i}))return!i.groups&&(i.groups=[]),n&&(n=CKEDITOR.tools.indexOf(i.groups,n),n>=0)?(i.groups.splice(n+1,0,e),void 0):(a?i.groups.splice(0,0,e):i.groups.push(e),void 0);n=null}n&&(n=CKEDITOR.tools.indexOf(o,function(e){return e.name==n})),a?o.splice(0,0,e):"number"==typeof n?o.splice(n+1,0,s):o.push(e)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top",function(){var e={editorFocus:!1,readOnly:1,exec:function(e){(e=CKEDITOR.document.getById(e._.elementsPath.idBase+"0"))&&e.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}},t='<span class="cke_path_empty">&nbsp;</span>',n="";(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)&&(n+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(n+=' onblur="this.style.cssText = this.style.cssText;"');var i=CKEDITOR.addTemplate("pathItem",'<a id="{id}" href="{jsTitle}" tabindex="-1" class="cke_path_item" title="{label}"'+(CKEDITOR.env.gecko&&10900>CKEDITOR.env.version?' onfocus="event.preventBubble();"':"")+n+' 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(n){function o(e){if(n.focus(),e=n._.elementsPath.list[e],e.equals(n.editable())){var t=n.createRange();t.selectNodeContents(e),t.select()}else n.getSelection().selectElement(e)}function a(){s&&s.setHtml(t),delete n._.elementsPath.list}if(n.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var s,r=n.ui.spaceId("path"),l="cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_";n._.elementsPath={idBase:l,filters:[]},n.on("uiSpace",function(e){"bottom"==e.data.space&&(e.data.html+='<span id="'+r+'_label" class="cke_voice_label">'+n.lang.elementspath.eleLabel+'</span><span id="'+r+'" class="cke_path" role="group" aria-labelledby="'+r+'_label">'+t+"</span>")}),n.on("uiReady",function(){var e=n.ui.space("path");e&&n.focusManager.add(e,1)});var c=CKEDITOR.tools.addFunction(o),d=CKEDITOR.tools.addFunction(function(e,t){var i,a=n._.elementsPath.idBase,t=new CKEDITOR.dom.event(t);switch(i="rtl"==n.lang.dir,t.getKeystroke()){case i?39:37:case 9:return(i=CKEDITOR.document.getById(a+(e+1)))||(i=CKEDITOR.document.getById(a+"0")),i.focus(),!1;case i?37:39:case CKEDITOR.SHIFT+9:return(i=CKEDITOR.document.getById(a+(e-1)))||(i=CKEDITOR.document.getById(a+(n._.elementsPath.list.length-1))),i.focus(),!1;case 27:return n.focus(),!1;case 13:case 32:return o(e),!1}return!0});n.on("selectionChange",function(e){for(var o=n.editable(),a=e.data.selection.getStartElement(),e=[],u=n._.elementsPath.list=[],h=n._.elementsPath.filters;a;){var f,m=0;f=a.data("cke-display-name")?a.data("cke-display-name"):a.data("cke-real-element-type")?a.data("cke-real-element-type"):a.getName();for(var p=0;p<h.length;p++){var g=h[p](a,f);if(!1===g){m=1;break}f=g||f}if(m||(m=u.push(a)-1,p=n.lang.elementspath.eleTitle.replace(/%1/,f),f=i.output({id:l+m,label:p,text:f,jsTitle:"javascript:void('"+f+"')",index:m,keyDownFn:d,clickFn:c}),e.unshift(f)),a.equals(o))break;a=a.getParent()}s||(s=CKEDITOR.document.getById(r)),o=s,o.setHtml(e.join("")+t),n.fire("elementsPathUpdate",{space:o})}),n.on("readOnly",a),n.on("contentDomUnload",a),n.addCommand("elementsPathFocus",e),n.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}}})}(),function(){function e(e,t,n){function i(n){!(l=d[n?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(c=t.root[n?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||c.is&&c.isBlockBoundary({br:1})||e.document.createElement("br")[n?"insertBefore":"insertAfter"](l)}for(var o=CKEDITOR.plugins.list.listToArray(t.root,n),a=[],s=0;s<t.contents.length;s++){var r=t.contents[s];(r=r.getAscendant("li",!0))&&!r.getCustomData("list_item_processed")&&(a.push(r),CKEDITOR.dom.element.setMarker(n,r,"list_item_processed",!0))}for(r=null,s=0;s<a.length;s++)r=a[s].getCustomData("listarray_index"),o[r].indent=-1;for(s=r+1;s<o.length;s++)if(o[s].indent>o[s-1].indent+1){for(a=o[s-1].indent+1-o[s].indent,r=o[s].indent;o[s]&&o[s].indent>=r;)o[s].indent+=a,s++;s--}var l,c,d=CKEDITOR.plugins.list.arrayToList(o,n,null,e.config.enterMode,t.root.getAttribute("dir")).listNode;i(!0),i(),d.replace(t.root)}function t(e,t){this.name=e,this.context=this.type=t}function n(e,t,n,i){for(var o,a;o=e[i?"getLast":"getFirst"](f);)(a=o.getDirection(1))!==t.getDirection(1)&&o.setAttribute("dir",a),o.remove(),n?o[i?"insertBefore":"insertAfter"](n):t.append(o,i)}function i(e){var t;(t=function(t){var i=e[t?"getPrevious":"getNext"](d);i&&i.type==CKEDITOR.NODE_ELEMENT&&i.is(e.getName())&&(n(e,i,null,!t),e.remove(),e=i)})(),t(1)}function o(e){return e.type==CKEDITOR.NODE_ELEMENT&&(e.getName()in CKEDITOR.dtd.$block||e.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[e.getName()]["#"]}function a(e,t,o){e.fire("saveSnapshot"),o.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var a=o.extractContents();t.trim(!1,!0);var r=t.createBookmark(),l=new CKEDITOR.dom.elementPath(t.startContainer),c=l.block,l=l.lastElement.getAscendant("li",1)||c,h=new CKEDITOR.dom.elementPath(o.startContainer),f=h.contains(CKEDITOR.dtd.$listItem),h=h.contains(CKEDITOR.dtd.$list);for(c?(c=c.getBogus())&&c.remove():h&&(c=h.getPrevious(d))&&u(c)&&c.remove(),(c=a.getLast())&&c.type==CKEDITOR.NODE_ELEMENT&&c.is("br")&&c.remove(),(c=t.startContainer.getChild(t.startOffset))?a.insertBefore(c):t.startContainer.append(a),f&&(a=s(f))&&(l.contains(f)?(n(a,f.getParent(),f),a.remove()):l.append(a));o.checkStartOfBlock()&&o.checkEndOfBlock();)h=o.startPath(),a=h.block,a.is("li")&&(l=a.getParent(),a.equals(l.getLast(d))&&a.equals(l.getFirst(d))&&(a=l)),o.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START),a.remove();o=o.clone(),a=e.editable(),o.setEndAt(a,CKEDITOR.POSITION_BEFORE_END),o=new CKEDITOR.dom.walker(o),o.evaluator=function(e){return d(e)&&!u(e)},(o=o.next())&&o.type==CKEDITOR.NODE_ELEMENT&&o.getName()in CKEDITOR.dtd.$list&&i(o),t.moveToBookmark(r),t.select(),e.fire("saveSnapshot")}function s(e){return(e=e.getLast(d))&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in r?e:null}var r={ol:1,ul:1},l=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(),d=function(e){return!(l(e)||c(e))},u=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(e,t,n,i,o){if(!r[e.getName()])return[];i||(i=0),n||(n=[]);for(var a=0,s=e.getChildCount();s>a;a++){var l=e.getChild(a);if(l.type==CKEDITOR.NODE_ELEMENT&&l.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(l,t,n,i+1),"li"==l.$.nodeName.toLowerCase()){var c={parent:e,indent:i,element:l,contents:[]};o?c.grandparent=o:(c.grandparent=e.getParent(),c.grandparent&&"li"==c.grandparent.$.nodeName.toLowerCase()&&(c.grandparent=c.grandparent.getParent())),t&&CKEDITOR.dom.element.setMarker(t,l,"listarray_index",n.length),n.push(c);for(var d,u=0,h=l.getChildCount();h>u;u++)d=l.getChild(u),d.type==CKEDITOR.NODE_ELEMENT&&r[d.getName()]?CKEDITOR.plugins.list.listToArray(d,t,n,i+1,c.grandparent):c.contents.push(d)}}return n},arrayToList:function(e,t,n,i,o){if(n||(n=0),!e||e.length<n+1)return null;for(var a,s,l,c=e[n].parent.getDocument(),u=new CKEDITOR.dom.documentFragment(c),h=null,f=n,m=Math.max(e[n].indent,0),p=null,g=i==CKEDITOR.ENTER_P?"p":"div";;){var E=e[f];if(a=E.grandparent,s=E.element.getDirection(1),E.indent==m){for(h&&e[f].parent.getName()==h.getName()||(h=e[f].parent.clone(!1,1),o&&h.setAttribute("dir",o),u.append(h)),p=h.append(E.element.clone(0,1)),s!=h.getDirection(1)&&p.setAttribute("dir",s),a=0;a<E.contents.length;a++)p.append(E.contents[a].clone(1,1));f++}else if(E.indent==Math.max(m,0)+1)l=e[f-1].element.getDirection(1),f=CKEDITOR.plugins.list.arrayToList(e,null,f,i,l!=s?s:null),!p.getChildCount()&&CKEDITOR.env.ie&&!(7<c.$.documentMode)&&p.append(c.createText(" ")),p.append(f.listNode),f=f.nextIndex;
else{if(-1!=E.indent||n||!a)return null;r[a.getName()]?(p=E.element.clone(!1,!0),s!=a.getDirection(1)&&p.setAttribute("dir",s)):p=new CKEDITOR.dom.documentFragment(c);var v,h=a.getDirection(1)!=s,T=E.element,C=T.getAttribute("class"),I=T.getAttribute("style"),b=p.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(i!=CKEDITOR.ENTER_BR||h||I||C),y=E.contents.length;for(a=0;y>a;a++){if(v=E.contents[a],v.type==CKEDITOR.NODE_ELEMENT&&v.isBlockBoundary()){h&&!v.getDirection()&&v.setAttribute("dir",s);var D=v,O=T.getAttribute("style");O&&D.setAttribute("style",O.replace(/([^;])$/,"$1;")+(D.getAttribute("style")||"")),C&&v.addClass(C)}else b&&(l||(l=c.createElement(g),h&&l.setAttribute("dir",s)),I&&l.setAttribute("style",I),C&&l.setAttribute("class",C),l.append(v.clone(1,1)));p.append(l||v.clone(1,1))}p.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&f!=e.length-1&&((s=p.getLast())&&s.type==CKEDITOR.NODE_ELEMENT&&"_moz"==s.getAttribute("type")&&s.remove(),!(p.getLast(d)&&s.type==CKEDITOR.NODE_ELEMENT&&s.getName()in CKEDITOR.dtd.$block||!p.append(c.createElement("br")))),s=p.$.nodeName.toLowerCase(),!CKEDITOR.env.ie&&("div"==s||"p"==s)&&p.appendBogus(),u.append(p),h=null,f++}if(l=null,e.length<=f||Math.max(e[f].indent,0)<m)break}if(t)for(e=u.getFirst();e;){if(e.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(t,e),e.getName()in CKEDITOR.dtd.$listItem&&(n=e,c=o=i=void 0,i=n.getDirection()))){for(o=n.getParent();o&&!(c=o.getDirection());)o=o.getParent();i==c&&n.removeAttribute("dir")}e=e.getNextSourceNode()}return{listNode:u,nextIndex:f}}};var h=/^h[1-6]$/,f=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);t.prototype={exec:function(t){this.refresh(t,t.elementPath());var n=t.config,o=t.getSelection(),a=o&&o.getRanges(!0);if(this.state==CKEDITOR.TRISTATE_OFF){var s=t.editable();if(s.getFirst(d)){var l=1==a.length&&a[0];(n=l&&l.getEnclosedNode())&&n.is&&this.type==n.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else n.enterMode==CKEDITOR.ENTER_BR?s.appendBogus():a[0].fixBlock(1,n.enterMode==CKEDITOR.ENTER_P?"p":"div"),o.selectRanges(a)}for(var n=o.createBookmarks(!0),s=[],c={},a=a.createIterator(),u=0;(l=a.getNextRange())&&++u;){var f=l.getBoundaryNodes(),m=f.startNode,p=f.endNode;for(m.type==CKEDITOR.NODE_ELEMENT&&"td"==m.getName()&&l.setStartAt(f.startNode,CKEDITOR.POSITION_AFTER_START),p.type==CKEDITOR.NODE_ELEMENT&&"td"==p.getName()&&l.setEndAt(f.endNode,CKEDITOR.POSITION_BEFORE_END),l=l.createIterator(),l.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;f=l.getNextParagraph();)if(!f.getCustomData("list_block")){CKEDITOR.dom.element.setMarker(c,f,"list_block",1);for(var g,E=t.elementPath(f),m=E.elements,p=0,E=E.blockLimit,v=m.length-1;v>=0&&(g=m[v]);v--)if(r[g.getName()]&&E.contains(g)){E.removeCustomData("list_group_object_"+u),(m=g.getCustomData("list_group_object"))?m.contents.push(f):(m={root:g,contents:[f]},s.push(m),CKEDITOR.dom.element.setMarker(c,g,"list_group_object",m)),p=1;break}p||(p=E,p.getCustomData("list_group_object_"+u)?p.getCustomData("list_group_object_"+u).contents.push(f):(m={root:p,contents:[f]},CKEDITOR.dom.element.setMarker(c,p,"list_group_object_"+u,m),s.push(m)))}}for(g=[];0<s.length;)if(m=s.shift(),this.state==CKEDITOR.TRISTATE_OFF)if(r[m.root.getName()]){for(f=t,a=m,m=c,u=g,p=CKEDITOR.plugins.list.listToArray(a.root,m),E=[],l=0;l<a.contents.length;l++)v=a.contents[l],(v=v.getAscendant("li",!0))&&!v.getCustomData("list_item_processed")&&(E.push(v),CKEDITOR.dom.element.setMarker(m,v,"list_item_processed",!0));for(var v=a.root.getDocument(),T=void 0,C=void 0,l=0;l<E.length;l++){var I=E[l].getCustomData("listarray_index"),T=p[I].parent;T.is(this.type)||(C=v.createElement(this.type),T.copyAttributes(C,{start:1,type:1}),C.removeStyle("list-style-type"),p[I].parent=C)}for(f=CKEDITOR.plugins.list.arrayToList(p,m,null,f.config.enterMode),m=void 0,p=f.listNode.getChildCount(),l=0;p>l&&(m=f.listNode.getChild(l));l++)m.getName()==this.type&&u.push(m);f.listNode.replace(a.root)}else{for(p=t,f=m,l=g,E=f.contents,a=f.root.getDocument(),u=[],1==E.length&&E[0].equals(f.root)&&(m=a.createElement("div"),E[0].moveChildren&&E[0].moveChildren(m),E[0].append(m),E[0]=m),f=f.contents[0].getParent(),v=0;v<E.length;v++)f=f.getCommonAncestor(E[v].getParent());for(T=p.config.useComputedState,p=m=void 0,T=void 0===T||T,v=0;v<E.length;v++)for(C=E[v];I=C.getParent();){if(I.equals(f)){u.push(C),!p&&C.getDirection()&&(p=1),C=C.getDirection(T),null!==m&&(m=m&&m!=C?null:C);break}C=I}if(!(1>u.length)){for(E=u[u.length-1].getNext(),v=a.createElement(this.type),l.push(v),T=l=void 0;u.length;)l=u.shift(),T=a.createElement("li"),l.is("pre")||h.test(l.getName())?l.appendTo(T):(l.copyAttributes(T),m&&l.getDirection()&&(T.removeStyle("direction"),T.removeAttribute("dir")),l.moveChildren(T),l.remove()),T.appendTo(v);m&&p&&v.setAttribute("dir",m),E?v.insertBefore(E):v.appendTo(f)}}else this.state==CKEDITOR.TRISTATE_ON&&r[m.root.getName()]&&e.call(this,t,m,c);for(v=0;v<g.length;v++)i(g[v]);CKEDITOR.dom.element.clearAllMarkers(c),o.selectBookmarks(n),t.focus()},refresh:function(e,t){var n=t.contains(r,1),i=t.blockLimit||t.root;n&&i.contains(n)?this.setState(n.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.plugins.add("list",{init:function(e){e.blockless||(e.addCommand("numberedlist",new t("numberedlist","ol")),e.addCommand("bulletedlist",new t("bulletedlist","ul")),e.ui.addButton&&(e.ui.addButton("NumberedList",{label:e.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),e.ui.addButton("BulletedList",{label:e.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),e.on("key",function(t){var n=t.data.keyCode;if("wysiwyg"==e.mode&&n in{8:1,46:1}){var i=e.getSelection().getRanges()[0],l=i.startPath();if(i.collapsed){var l=new CKEDITOR.dom.elementPath(i.startContainer),c=8==n,h=e.editable(),f=new CKEDITOR.dom.walker(i.clone());if(f.evaluator=function(e){return d(e)&&!u(e)},f.guard=function(e,t){return!(t&&e.type==CKEDITOR.NODE_ELEMENT&&e.is("table"))},n=i.clone(),c){var m,p;(m=l.contains(r))&&i.checkBoundaryOfElement(m,CKEDITOR.START)&&(m=m.getParent())&&m.is("li")&&(m=s(m))?(p=m,m=m.getPrevious(d),n.moveToPosition(m&&u(m)?m:p,CKEDITOR.POSITION_BEFORE_START)):(f.range.setStartAt(h,CKEDITOR.POSITION_AFTER_START),f.range.setEnd(i.startContainer,i.startOffset),(m=f.previous())&&m.type==CKEDITOR.NODE_ELEMENT&&(m.getName()in r||m.is("li"))&&(m.is("li")||(f.range.selectNodeContents(m),f.reset(),f.evaluator=o,m=f.previous()),p=m,n.moveToElementEditEnd(p))),p?(a(e,n,i),t.cancel()):(n=l.contains(r))&&i.checkBoundaryOfElement(n,CKEDITOR.START)&&(p=n.getFirst(d),i.checkBoundaryOfElement(p,CKEDITOR.START)&&(m=n.getPrevious(d),s(p)?m&&(i.moveToElementEditEnd(m),i.select()):e.execCommand("outdent"),t.cancel()))}else(p=l.contains("li"))?(f.range.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),h=(l=p.getLast(d))&&o(l)?l:p,p=0,(m=f.next())&&m.type==CKEDITOR.NODE_ELEMENT&&m.getName()in r&&m.equals(l)?(p=1,m=f.next()):i.checkBoundaryOfElement(h,CKEDITOR.END)&&(p=1),p&&m&&(i=i.clone(),i.moveToElementEditStart(m),a(e,n,i),t.cancel())):(f.range.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),(m=f.next())&&m.type==CKEDITOR.NODE_ELEMENT&&m.is(r)&&(m=m.getFirst(d),l.block&&i.checkStartOfBlock()&&i.checkEndOfBlock()?(l.block.remove(),i.moveToElementEditStart(m),i.select()):s(m)?(i.moveToElementEditStart(m),i.select()):(i=i.clone(),i.moveToElementEditStart(m),a(e,n,i)),t.cancel()));setTimeout(function(){e.selectionChange(1)})}}}))}})}(),function(){function e(e,t){if(this.name=t,this.useIndentClasses=e.config.indentClasses&&0<e.config.indentClasses.length){this.classNameRegex=RegExp("(?:^|\s+)("+e.config.indentClasses.join("|")+")(?=$|\s)"),this.indentClassMap={};for(var n=0;n<e.config.indentClasses.length;n++)this.indentClassMap[e.config.indentClasses[n]]=n+1}this.startDisabled="outdent"==t}function t(e,t){return"ltr"==(t||e.getComputedStyle("direction"))?"margin-left":"margin-right"}function n(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.is("li")}var i={ol:1,ul:1},o=CKEDITOR.dom.walker.whitespaces(!0),a=CKEDITOR.dom.walker.bookmark(!1,!0);e.prototype={context:"p",refresh:function(e,n){var o=n&&n.contains(i),a=n.block||n.blockLimit;o?this.setState(CKEDITOR.TRISTATE_OFF):this.useIndentClasses||"indent"!=this.name?a?this.useIndentClasses?(o=a.$.className.match(this.classNameRegex),a=0,o&&(o=o[1],a=this.indentClassMap[o]),"outdent"==this.name&&!a||"indent"==this.name&&a==e.config.indentClasses.length?this.setState(CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_OFF)):(o=parseInt(a.getStyle(t(a)),10),isNaN(o)&&(o=0),0>=o?this.setState(CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_OFF)):this.setState(CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_OFF)},exec:function(e){function s(t){for(var n=c.startContainer,s=c.endContainer;n&&!n.getParent().equals(t);)n=n.getParent();for(;s&&!s.getParent().equals(t);)s=s.getParent();if(n&&s){for(var r=n,n=[],l=!1;!l;)r.equals(s)&&(l=!0),n.push(r),r=r.getNext();if(!(1>n.length)){for(r=t.getParents(!0),s=0;s<r.length;s++)if(r[s].getName&&i[r[s].getName()]){t=r[s];break}for(var r="indent"==d.name?1:-1,s=n[0],n=n[n.length-1],l=CKEDITOR.plugins.list.listToArray(t,u),h=l[n.getCustomData("listarray_index")].indent,s=s.getCustomData("listarray_index");s<=n.getCustomData("listarray_index");s++)if(l[s].indent+=r,r>0){var f=l[s].parent;l[s].parent=new CKEDITOR.dom.element(f.getName(),f.getDocument())}for(s=n.getCustomData("listarray_index")+1;s<l.length&&l[s].indent>h;s++)l[s].indent+=r;if(n=CKEDITOR.plugins.list.arrayToList(l,u,null,e.config.enterMode,t.getDirection()),"outdent"==d.name){var m;if((m=t.getParent())&&m.is("li"))for(var p,r=n.listNode.getChildren(),g=[],s=r.count()-1;s>=0;s--)(p=r.getItem(s))&&p.is&&p.is("li")&&g.push(p)}if(n&&n.listNode.replace(t),g&&g.length)for(s=0;s<g.length;s++){for(p=t=g[s];(p=p.getNext())&&p.is&&p.getName()in i;)CKEDITOR.env.ie&&!t.getFirst(function(e){return o(e)&&a(e)})&&t.append(c.document.createText(" ")),t.append(p);t.insertAfter(m)}}}}function r(){var t=c.createIterator(),n=e.config.enterMode;t.enforceRealBlocks=!0,t.enlargeBr=n!=CKEDITOR.ENTER_BR;for(var i;i=t.getNextParagraph(n==CKEDITOR.ENTER_P?"p":"div");)l(i)}function l(n,i){if(n.getCustomData("indent_processed"))return!1;if(d.useIndentClasses){var o=n.$.className.match(d.classNameRegex),a=0;if(o&&(o=o[1],a=d.indentClassMap[o]),"outdent"==d.name?a--:a++,0>a)return!1;a=Math.min(a,e.config.indentClasses.length),a=Math.max(a,0),n.$.className=CKEDITOR.tools.ltrim(n.$.className.replace(d.classNameRegex,"")),a>0&&n.addClass(e.config.indentClasses[a-1])}else{o=t(n,i),a=parseInt(n.getStyle(o),10),isNaN(a)&&(a=0);var s=e.config.indentOffset||40,a=a+("indent"==d.name?1:-1)*s;if(0>a)return!1;a=Math.max(a,0),a=Math.ceil(a/s)*s,n.setStyle(o,a?a+(e.config.indentUnit||"px"):""),""===n.getAttribute("style")&&n.removeAttribute("style")}return CKEDITOR.dom.element.setMarker(u,n,"indent_processed",1),!0}for(var c,d=this,u={},h=e.getSelection(),f=h.createBookmarks(1),m=(h&&h.getRanges(1)).createIterator();c=m.getNextRange();){for(var p=c.getCommonAncestor();p&&(p.type!=CKEDITOR.NODE_ELEMENT||!i[p.getName()]);)p=p.getParent();if(!p){var g=c.getEnclosedNode();g&&g.type==CKEDITOR.NODE_ELEMENT&&g.getName()in i&&(c.setStartAt(g,CKEDITOR.POSITION_AFTER_START),c.setEndAt(g,CKEDITOR.POSITION_BEFORE_END),p=g)}if(p&&c.startContainer.type==CKEDITOR.NODE_ELEMENT&&c.startContainer.getName()in i&&(g=new CKEDITOR.dom.walker(c),g.evaluator=n,c.startContainer=g.next()),p&&c.endContainer.type==CKEDITOR.NODE_ELEMENT&&c.endContainer.getName()in i&&(g=new CKEDITOR.dom.walker(c),g.evaluator=n,c.endContainer=g.previous()),p){var g=p.getFirst(n),E=!!g.getNext(n),v=c.startContainer;(!g.equals(v)&&!g.contains(v)||!("indent"==d.name||d.useIndentClasses||parseInt(p.getStyle(t(p)),10))||!l(p,!E&&g.getDirection()))&&s(p)}else r()}CKEDITOR.dom.element.clearAllMarkers(u),e.forceNextSelectionCheck(),h.selectBookmarks(f)}},CKEDITOR.plugins.add("indent",{requires:"list",onLoad:function(){(CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat)&&CKEDITOR.addCss(".cke_editable ul,.cke_editable ol{    margin-left: 0px;    padding-left: 40px;}")},init:function(t){t.blockless||(t.addCommand("indent",new e(t,"indent")),t.addCommand("outdent",new e(t,"outdent")),t.ui.addButton&&(t.ui.addButton("Indent",{label:t.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),t.ui.addButton("Outdent",{label:t.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"})),t.on("dirChanged",function(e){var n=t.createRange();n.setStartBefore(e.data.node),n.setEndAfter(e.data.node);for(var i,o=new CKEDITOR.dom.walker(n);i=o.next();)if(i.type==CKEDITOR.NODE_ELEMENT)if(!i.equals(e.data.node)&&i.getDirection())n.setStartAfter(i),o=new CKEDITOR.dom.walker(n);else{var a=t.config.indentClasses;if(a)for(var s="ltr"==e.data.dir?["_rtl",""]:["","_rtl"],r=0;r<a.length;r++)i.hasClass(a[r]+s[0])&&(i.removeClass(a[r]+s[0]),i.addClass(a[r]+s[1]));a=i.getStyle("margin-right"),s=i.getStyle("margin-left"),a?i.setStyle("margin-left",a):i.removeStyle("margin-left"),s?i.setStyle("margin-right",s):i.removeStyle("margin-right")}}))}})}(),function(){function e(e,t,n){return n=e.config.forceEnterMode||n,"wysiwyg"!=e.mode?!1:(t||(t=e.config.enterMode),e.elementPath().isContextFor("p")||(t=CKEDITOR.ENTER_BR,n=1),e.fire("saveSnapshot"),t==CKEDITOR.ENTER_BR?a(e,t,null,n):s(e,t,null,n),e.fire("saveSnapshot"),!0)}function t(e){for(var e=e.getSelection().getRanges(!0),t=e.length-1;t>0;t--)e[t].deleteContents();return e[0]}CKEDITOR.plugins.add("enterkey",{requires:"indent",init:function(t){t.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(t){e(t)}}),t.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(t){"wysiwyg"==t.mode&&e(t,t.config.shiftEnterMode,1)}}),t.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var n=CKEDITOR.dom.walker.whitespaces(),i=CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(e,o,s,l){if(s=s||t(e)){var c=s.document,d=s.checkStartOfBlock(),u=s.checkEndOfBlock(),h=e.elementPath(s.startContainer).block;if(d&&u){if(h&&(h.is("li")||h.getParent().is("li")))return e.execCommand("outdent"),void 0;if(h&&h.getParent().is("blockquote"))return h.breakParent(h.getParent()),h.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||h.getPrevious().remove(),h.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||h.getNext().remove(),s.moveToElementEditStart(h),s.select(),void 0}else if(h&&h.is("pre")&&!u)return a(e,o,s,l),void 0;var h=o==CKEDITOR.ENTER_DIV?"div":"p",f=s.splitBlock(h);if(f){var m,o=f.previousBlock,e=f.nextBlock,d=f.wasStartOfBlock,u=f.wasEndOfBlock;if(e?(m=e.getParent(),m.is("li")&&(e.breakParent(m),e.move(e.getNext(),1))):o&&(m=o.getParent())&&m.is("li")&&(o.breakParent(m),m=o.getNext(),s.moveToElementEditStart(m),o.move(o.getPrevious())),d||u){var p;if(o?(o.is("li")||!r.test(o.getName())&&!o.is("pre"))&&(g=o.clone()):e&&(g=e.clone()),g?l&&!g.is("li")&&g.renameNode(h):m&&m.is("li")?g=m:(g=c.createElement(h),o&&(p=o.getDirection())&&g.setAttribute("dir",p)),c=f.elementPath)for(l=0,m=c.elements.length;m>l&&(p=c.elements[l],!p.equals(c.block)&&!p.equals(c.blockLimit));l++)CKEDITOR.dtd.$removeEmpty[p.getName()]&&(p=p.clone(),g.moveChildren(p),g.append(p));CKEDITOR.env.ie||g.appendBogus(),g.getParent()||s.insertNode(g),g.is("li")&&g.removeAttribute("value"),!CKEDITOR.env.ie||!d||u&&o.getChildCount()||(s.moveToElementEditStart(u?o:g),s.select()),s.moveToElementEditStart(d&&!u?e:g)}else{if(e.is("li")){var g=s.clone();g.selectNodeContents(e),g=new CKEDITOR.dom.walker(g),g.evaluator=function(e){return!(i(e)||n(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$inline&&!(e.getName()in CKEDITOR.dtd.$empty))},(m=g.next())&&m.type==CKEDITOR.NODE_ELEMENT&&m.is("ul","ol")&&(CKEDITOR.env.ie?c.createText(" "):c.createElement("br")).insertBefore(m)}e&&s.moveToElementEditStart(e)}s.select(),s.scrollIntoView()}}},enterBr:function(e,n,i,o){if(i=i||t(e)){var a=i.document,l=i.checkEndOfBlock(),c=new CKEDITOR.dom.elementPath(e.getSelection().getStartElement()),d=c.block,c=d&&c.block.getName();o||"li"!=c?(!o&&l&&r.test(c)?(l=d.getDirection())?(a=a.createElement("div"),a.setAttribute("dir",l),a.insertAfter(d),i.setStart(a,0)):(a.createElement("br").insertAfter(d),CKEDITOR.env.gecko&&a.createText("").insertAfter(d),i.setStartAt(d.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(d="pre"==c&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?a.createText("r"):a.createElement("br"),i.deleteContents(),i.insertNode(d),CKEDITOR.env.ie?i.setStartAt(d,CKEDITOR.POSITION_AFTER_END):(a.createText("").insertAfter(d),l&&d.getParent().appendBogus(),d.getNext().$.nodeValue="",i.setStartAt(d.getNext(),CKEDITOR.POSITION_AFTER_START))),i.collapse(!0),i.select(),i.scrollIntoView()):s(e,n,i,o)}}};var o=CKEDITOR.plugins.enterkey,a=o.enterBr,s=o.enterBlock,r=/^h[1-6]$/}(),function(){function e(e,t){var n={},i=[],o={nbsp:" ",shy:"­",gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},e=e.replace(/b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(e,a){var s=t?"&"+a+";":o[a];return n[s]=t?o[a]:"&"+a+";",i.push(s),""});if(!t&&e){var a,e=e.split(","),s=document.createElement("div");for(s.innerHTML="&"+e.join(";&")+";",a=s.innerHTML,s=null,s=0;s<a.length;s++){var r=a.charAt(s);n[r]="&"+e[s]+";",i.push(r)}}return n.regex=i.join(t?"|":""),n}CKEDITOR.plugins.add("entities",{afterInit:function(t){var n=t.config;if(t=(t=t.dataProcessor)&&t.htmlFilter){var i=[];!1!==n.basicEntities&&i.push("nbsp,gt,lt,amp"),n.entities&&(i.length&&i.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"),n.entities_latin&&i.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"),n.entities_greek&&i.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"),n.entities_additional&&i.push(n.entities_additional));var o=e(i.join(",")),a=o.regex?"["+o.regex+"]":"a^";delete o.regex,n.entities&&n.entities_processNumerical&&(a="[^ -~]|"+a);var a=RegExp(a,"g"),s=function(e){return"force"!=n.entities_processNumerical&&o[e]?o[e]:"&#"+e.charCodeAt(0)+";"},r=e("nbsp,gt,lt,amp,shy",!0),l=RegExp(r.regex,"g"),c=function(e){return r[e]};t.addRules({text:function(e){return e.replace(l,c).replace(a,s)}})}}})}(),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(e,t,n,i){t=t||"80%",n=n||"70%","string"==typeof t&&1<t.length&&"%"==t.substr(t.length-1,1)&&(t=parseInt(window.screen.width*parseInt(t,10)/100,10)),"string"==typeof n&&1<n.length&&"%"==n.substr(n.length-1,1)&&(n=parseInt(window.screen.height*parseInt(n,10)/100,10)),640>t&&(t=640),420>n&&(n=420);var o=parseInt((window.screen.height-n)/2,10),a=parseInt((window.screen.width-t)/2,10),i=(i||"location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes")+",width="+t+",height="+n+",top="+o+",left="+a,s=window.open("",null,i,!0);if(!s)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(s.moveTo(a,o),s.resizeTo(t,n)),s.focus(),s.location.href=e}catch(r){window.open(e,null,i,!0)}return!0}}),function(){function e(e,t){var n=[];if(!t)return e;for(var i in t)n.push(i+"="+encodeURIComponent(t[i]));return e+(-1!=e.indexOf("?")?"&":"?")+n.join("&")}function t(e){return e+="",e.charAt(0).toUpperCase()+e.substr(1)}function n(){var n=this.getDialog(),i=n.getParentEditor();i._.filebrowserSe=this;var o=i.config["filebrowser"+t(n.getName())+"WindowWidth"]||i.config.filebrowserWindowWidth||"80%",n=i.config["filebrowser"+t(n.getName())+"WindowHeight"]||i.config.filebrowserWindowHeight||"70%",a=this.filebrowser.params||{};a.CKEditor=i.name,a.CKEditorFuncNum=i._.filebrowserFn,a.langCode||(a.langCode=i.langCode),a=e(this.filebrowser.url,a),i.popup(a,o,n,i.config.filebrowserWindowFeatures||i.config.fileBrowserWindowFeatures)}function i(){var e=this.getDialog();return e.getParentEditor()._.filebrowserSe=this,e.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value&&e.getContentElement(this["for"][0],this["for"][1]).getAction()?!0:!1}function o(t,n,i){var o=i.params||{};o.CKEditor=t.name,o.CKEditorFuncNum=t._.filebrowserFn,o.langCode||(o.langCode=t.langCode),n.action=e(i.url,o),n.filebrowser=i}function a(e,s,r,l){var c,d;for(d in l)if(c=l[d],("hbox"==c.type||"vbox"==c.type||"fieldset"==c.type)&&a(e,s,r,c.children),c.filebrowser)if("string"==typeof c.filebrowser&&(c.filebrowser={action:"fileButton"==c.type?"QuickUpload":"Browse",target:c.filebrowser}),"Browse"==c.filebrowser.action){var u=c.filebrowser.url;void 0===u&&(u=e.config["filebrowser"+t(s)+"BrowseUrl"],void 0===u&&(u=e.config.filebrowserBrowseUrl)),u&&(c.onClick=n,c.filebrowser.url=u,c.hidden=!1)}else if("QuickUpload"==c.filebrowser.action&&c["for"]&&(u=c.filebrowser.url,void 0===u&&(u=e.config["filebrowser"+t(s)+"UploadUrl"],void 0===u&&(u=e.config.filebrowserUploadUrl)),u)){var h=c.onClick;c.onClick=function(e){var t=e.sender;return h&&h.call(t,e)===!1?!1:i.call(t,e)},c.filebrowser.url=u,c.hidden=!1,o(e,r.getContents(c["for"][0]).get(c["for"][1]),c.filebrowser)}}function s(e,t,n){if(-1!==n.indexOf(";")){for(var n=n.split(";"),i=0;i<n.length;i++)if(s(e,t,n[i]))return!0;return!1}return(e=e.getContents(t).get(n).filebrowser)&&e.url}function r(e,t){var n=this._.filebrowserSe.getDialog(),i=this._.filebrowserSe["for"],o=this._.filebrowserSe.filebrowser.onSelect;i&&n.getContentElement(i[0],i[1]).reset(),"function"==typeof t&&!1===t.call(this._.filebrowserSe)||o&&!1===o.call(this._.filebrowserSe,e,t)||("string"==typeof t&&t&&alert(t),!(e&&(i=this._.filebrowserSe,n=i.getDialog(),i=i.filebrowser.target||null)))||(i=i.split(":"),(o=n.getContentElement(i[0],i[1]))&&(o.setValue(e),n.selectPage(i[0])))}CKEDITOR.plugins.add("filebrowser",{requires:"popup",init:function(e){e._.filebrowserFn=CKEDITOR.tools.addFunction(r,e),e.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}}),CKEDITOR.on("dialogDefinition",function(e){var t,n,i=e.data.definition;for(n in i.contents)(t=i.contents[n])&&(a(e.editor,e.data.name,i,t.elements),t.hidden&&t.filebrowser&&(t.hidden=!s(i,t.id,t.filebrowser)))})}(),function(){function e(e){var t="left"==e?"pageXOffset":"pageYOffset";return t in i.$?i.$[t]:CKEDITOR.document.$.documentElement["left"==e?"scrollLeft":"scrollTop"]}function t(t){var a,s=t.config,r=s.floatSpaceDockedOffsetX||0,l=s.floatSpaceDockedOffsetY||0,c=s.floatSpacePinnedOffsetX||0,d=s.floatSpacePinnedOffsetY||0,u=function(n){function s(e,t,n){m.setStyle(t,o(n)),m.setStyle("position",e)}function h(e){var t=f.getDocumentPosition();switch(e){case"top":s("absolute","top",t.y-E-l);break;case"pin":s("fixed","top",d);break;case"bottom":s("absolute","top",t.y+(g.height||g.bottom-g.top)+l)}a=e}"focus"==n.name&&m.show(),m.removeStyle("left"),m.removeStyle("right");var f=t.editable(),p=m.getClientRect(),g=f.getClientRect(),E=p.height,v=e("left");if(a){"top"==a&&p.top<d?h("pin"):"pin"==a?g.top>l+E?h("top"):g.bottom-p.bottom<E&&h("bottom"):"bottom"==a&&(g.top>l+E?h("top"):g.bottom>2*E+d&&h("pin"));var T,n=i.getViewPaneSize(),C=n.width/2,C=0<g.left&&g.right<n.width&&g.width>p.width?"rtl"==t.config.contentsLangDirection?"right":"left":C-g.left>g.right-C?"left":"right";p.width>n.width?(C="left",T=0):(T="left"==C?0<g.left?g.left:0:g.right<n.width?n.width-g.right:0,T+p.width>n.width&&(C="left"==C?"right":"left",T=0)),m.setStyle(C,o(("pin"==a?c:r)+T+("pin"==a?0:v)))}else a="pin",h("pin"),u(n)},s=CKEDITOR.document.getBody(),h={id:t.id,name:t.name,langDir:t.lang.dir,langCode:t.langCode},f=t.fire("uiSpace",{space:"top",html:""}).html;if(f){var m=s.append(CKEDITOR.dom.element.createFromHtml(n.output(CKEDITOR.tools.extend({topId:t.ui.spaceId("top"),content:f,style:"display:none;z-index:"+(t.config.baseFloatZIndex-1)},h))));m.unselectable(),m.on("mousedown",function(e){e=e.data,e.getTarget().hasAscendant("a",1)||e.preventDefault()}),t.on("focus",function(e){u(e),i.on("scroll",u),i.on("resize",u)}),t.on("blur",function(){m.hide(),i.removeListener("scroll",u),i.removeListener("resize",u)}),t.on("destroy",function(){i.removeListener("scroll",u),i.removeListener("resize",u),m.clearCustomData(),m.remove()}),t.focusManager.hasFocus&&m.show(),t.focusManager.add(m,1)}}var n=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}"><div class="cke_inner"><div id="{topId}" class="cke_top" role="presentation">{content}</div></div></div>');CKEDITOR.plugins.add("floatingspace",{init:function(e){e.on("contentDom",function(){t(e)})}});var i=CKEDITOR.document.getWindow(),o=CKEDITOR.tools.cssLength}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var e=CKEDITOR.addTemplate("panel-list",'<ul role="presentation" class="cke_panel_list">{items}</ul>'),t=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>'),n=CKEDITOR.addTemplate("panel-list-group",'<h1 id="{id}" class="cke_panel_grouptitle" role="presentation" >{label}</h1>');CKEDITOR.ui.panel.prototype.addListBlock=function(e,t){return this.addBlock(e,new CKEDITOR.ui.listBlock(this.getHolderElement(),t))},CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(e,t){var t=t||{},n=t.attributes||(t.attributes={});(this.multiSelect=!!t.multiSelect)&&(n["aria-multiselectable"]=!0),!n.role&&(n.role="listbox"),this.base.apply(this,arguments),n=this.keys,n[40]="next",n[9]="next",n[38]="prev",n[CKEDITOR.SHIFT+9]="prev",n[32]=CKEDITOR.env.ie?"mouseup":"click",CKEDITOR.env.ie&&(n[13]="mouseup"),this._.pendingHtml=[],this._.pendingList=[],this._.items={},this._.groups={}},_:{close:function(){if(this._.started){var t=e.output({items:this._.pendingList.join("")});this._.pendingList=[],this._.pendingHtml.push(t),delete this._.started}},getClick:function(){return this._.click||(this._.click=CKEDITOR.tools.addFunction(function(e){var t=this.toggle(e);this.onClick&&this.onClick(e,t)},this)),this._.click}},proto:{add:function(e,n,i){var o=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0),this._.items[e]=o,e={id:o,val:e,onclick:CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:i||e,text:n||e},this._.pendingList.push(t.output(e))},startGroup:function(e){this._.close();var t=CKEDITOR.tools.getNextId();this._.groups[e]=t,this._.pendingHtml.push(n.output({id:t,label:e}))},commit:function(){this._.close(),this.element.appendHtml(this._.pendingHtml.join("")),delete this._.size,this._.pendingHtml=[]},toggle:function(e){var t=this.isMarked(e);return t?this.unmark(e):this.mark(e),!t},hideGroup:function(e){var t=(e=this.element.getDocument().getById(this._.groups[e]))&&e.getNext();e&&(e.setStyle("display","none"),t&&"ul"==t.getName()&&t.setStyle("display","none"))},hideItem:function(e){this.element.getDocument().getById(this._.items[e]).setStyle("display","none")},showAll:function(){var e,t=this._.items,n=this._.groups,i=this.element.getDocument();for(e in t)i.getById(t[e]).setStyle("display","");for(var o in n)t=i.getById(n[o]),e=t.getNext(),t.setStyle("display",""),e&&"ul"==e.getName()&&e.setStyle("display","")},mark:function(e){this.multiSelect||this.unmarkAll();var e=this._.items[e],t=this.element.getDocument().getById(e);t.addClass("cke_selected"),this.element.getDocument().getById(e+"_option").setAttribute("aria-selected",!0),this.onMark&&this.onMark(t)},unmark:function(e){var t=this.element.getDocument(),e=this._.items[e],n=t.getById(e);n.removeClass("cke_selected"),t.getById(e+"_option").removeAttribute("aria-selected"),this.onUnmark&&this.onUnmark(n)},unmarkAll:function(){var e,t=this._.items,n=this.element.getDocument();for(e in t){var i=t[e];n.getById(i).removeClass("cke_selected"),n.getById(i+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(e){return this.element.getDocument().getById(this._.items[e]).hasClass("cke_selected")},focus:function(e){if(this._.focusIndex=-1,e){for(var t,n=this.element.getDocument().getById(this._.items[e]).getFirst(),e=this.element.getElementsByTag("a"),i=-1;t=e.getItem(++i);)if(t.equals(n)){this._.focusIndex=i;break}setTimeout(function(){n.focus()},0)}}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var e='<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&&10900<=CKEDITOR.env.version&&!CKEDITOR.env.hc?"":'" href="javascript:void('{titleJs}')"')+' hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="true"';(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)&&(e+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(e+=' onblur="this.style.cssText = this.style.cssText;"');var e=e+(' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event,this);" onmousedown="return CKEDITOR.tools.callFunction({mousedownFn},event);"  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>"),t=CKEDITOR.addTemplate("combo",e);CKEDITOR.UI_RICHCOMBO="richcombo",CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(e){CKEDITOR.tools.extend(this,e,{canGroup:!1,title:e.label,modes:{wysiwyg:1},editorFocus:1}),e=this.panel||{},delete this.panel,this.id=CKEDITOR.tools.getNextNumber(),this.document=e.parent&&e.parent.getDocument()||CKEDITOR.document,e.className="cke_combopanel",e.block={multiSelect:e.multiSelect,attributes:e.attributes},e.toolbarRelated=!0,this._={panelDefinition:e,items:{}}},proto:{renderHtml:function(e){var t=[];return this.render(e,t),t.join("")},render:function(e,n){function i(){var t=this.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;
this.setState(e.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:t),this.setValue("")}var o=CKEDITOR.env,a="cke_"+this.id,s=CKEDITOR.tools.addFunction(function(t){u&&(e.unlockSelection(1),u=0),l.execute(t)},this),r=this,l={id:a,combo:this,focus:function(){CKEDITOR.document.getById(a).getChild(1).focus()},execute:function(t){var n=r._;if(n.state!=CKEDITOR.TRISTATE_DISABLED)if(r.createPanel(e),n.on)n.panel.hide();else{r.commit();var i=r.getValue();i?n.list.mark(i):n.list.unmarkAll(),n.panel.showBlock(r.id,new CKEDITOR.dom.element(t),4)}},clickFn:s};e.on("mode",i,this),!this.readOnly&&e.on("readOnly",i,this);var c=CKEDITOR.tools.addFunction(function(e,t){var e=new CKEDITOR.dom.event(e),n=e.getKeystroke();switch(n){case 13:case 32:case 40:CKEDITOR.tools.callFunction(s,t);break;default:l.onkey(l,n)}e.preventDefault()}),d=CKEDITOR.tools.addFunction(function(){l.onfocus&&l.onfocus()}),u=0,h=CKEDITOR.tools.addFunction(function(){if(CKEDITOR.env.opera){var t=e.editable();t.isInline()&&t.hasFocus&&(e.lockSelection(),u=1)}});return l.keyDownFn=c,o={id:a,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:o.gecko&&10900<=o.version&&!o.hc?"":(this.title||"").replace("'",""),keydownFn:c,mousedownFn:h,focusFn:d,clickFn:s},t.output(o,n),this.onRender&&this.onRender(),l},createPanel:function(e){if(!this._.panel){var t=this._.panelDefinition,n=this._.panelDefinition.block,i=t.parent||CKEDITOR.document.getBody(),o="cke_combopanel__"+this.name,a=new CKEDITOR.ui.floatPanel(e,i,t),s=a.addListBlock(this.id,n),r=this;a.onShow=function(){this.element.addClass(o),r.setState(CKEDITOR.TRISTATE_ON),s.focus(!s.multiSelect&&r.getValue()),r._.on=1,r.editorFocus&&e.focus(),r.onOpen&&r.onOpen()},a.onHide=function(t){this.element.removeClass(o),r.setState(r.modes&&r.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),r._.on=0,!t&&r.onClose&&r.onClose()},a.onEscape=function(){a.hide(1)},s.onClick=function(e,t){r.onClick&&r.onClick.call(r,e,t),a.hide()},this._.panel=a,this._.list=s,a.getBlock(this.id).onHide=function(){r._.on=0,r.setState(CKEDITOR.TRISTATE_OFF)},this.init&&this.init()}},setValue:function(e,t){this._.value=e;var n=this.document.getById("cke_"+this.id+"_text");n&&(e||t?n.removeClass("cke_combo_inlinelabel"):(t=this.label,n.addClass("cke_combo_inlinelabel")),n.setText("undefined"!=typeof t?t:e))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(e){this._.list.mark(e)},hideItem:function(e){this._.list.hideItem(e)},hideGroup:function(e){this._.list.hideGroup(e)},showAll:function(){this._.list.showAll()},add:function(e,t,n){this._.items[e]=n||e,this._.list.add(e,t,n)},startGroup:function(e){this._.list.startGroup(e)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this)),this._.committed=1},setState:function(e){if(this._.state!=e){var t=this.document.getById("cke_"+this.id);t.setState(e,"cke_combo"),e==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled"),this._.state=e}},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},statics:{handler:{create:function(e){return new CKEDITOR.ui.richCombo(e)}}}}),CKEDITOR.ui.prototype.addRichCombo=function(e,t){this.add(e,CKEDITOR.UI_RICHCOMBO,t)}}(),CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(e){if(!e.blockless){for(var t=e.config,n=e.lang.format,i=t.format_tags.split(";"),o={},a=0;a<i.length;a++){var s=i[a];o[s]=new CKEDITOR.style(t["format_"+s]),o[s]._.enterMode=e.config.enterMode}e.ui.addRichCombo("Format",{label:n.label,title:n.panelTitle,toolbar:"styles,20",panel:{css:[CKEDITOR.skin.getPath("editor")].concat(t.contentsCss),multiSelect:!1,attributes:{"aria-label":n.panelTitle}},init:function(){this.startGroup(n.panelTitle);for(var e in o){var t=n["tag_"+e];this.add(e,o[e].buildPreview(t),t)}},onClick:function(t){e.focus(),e.fire("saveSnapshot");var t=o[t],n=e.elementPath();e[t.checkActive(n)?"removeStyle":"applyStyle"](t),setTimeout(function(){e.fire("saveSnapshot")},0)},onRender:function(){e.on("selectionChange",function(t){var n=this.getValue(),t=t.data.path,i=!e.readOnly&&t.isContextFor("p");if(this[i?"enable":"disable"](),i){for(var a in o)if(o[a].checkActive(t))return a!=n&&this.setValue(a,e.lang.format["tag_"+a]),void 0;this.setValue("")}},this)}})}}}),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"},CKEDITOR.plugins.add("htmlwriter",{init:function(e){var t=new CKEDITOR.htmlWriter;t.forceSimpleAmpersand=e.config.forceSimpleAmpersand,t.indentationChars=e.config.dataIndentationChars||"    ",e.dataProcessor.writer=t}}),CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base(),this.indentationChars="    ",this.selfClosingEnd=" />",this.lineBreakChars="n",this.sortAttributes=1,this._.indent=0,this._.indentation="",this._.inPre=0,this._.rules={};var e,t=CKEDITOR.dtd;for(e in CKEDITOR.tools.extend({},t.$nonBodyContent,t.$block,t.$listItem,t.$tableContent))this.setRules(e,{indent:!t[e]["#"],breakBeforeOpen:1,breakBeforeClose:!t[e]["#"],breakAfterClose:1,needsSpace:e in t.$block&&!(e 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(e){var t=this._.rules[e];this._.afterCloser&&t&&t.needsSpace&&this._.needsSpace&&this._.output.push("n"),this._.indent?this.indentation():t&&t.breakBeforeOpen&&(this.lineBreak(),this.indentation()),this._.output.push("<",e),this._.afterCloser=0},openTagClose:function(e,t){var n=this._.rules[e];t?(this._.output.push(this.selfClosingEnd),n&&n.breakAfterClose&&(this._.needsSpace=n.needsSpace)):(this._.output.push(">"),n&&n.indent&&(this._.indentation+=this.indentationChars)),n&&n.breakAfterOpen&&this.lineBreak(),"pre"==e&&(this._.inPre=1)},attribute:function(e,t){"string"==typeof t&&(this.forceSimpleAmpersand&&(t=t.replace(/&amp;/g,"&")),t=CKEDITOR.tools.htmlEncodeAttr(t)),this._.output.push(" ",e,'="',t,'"')},closeTag:function(e){var t=this._.rules[e];t&&t.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length)),this._.indent?this.indentation():t&&t.breakBeforeClose&&(this.lineBreak(),this.indentation()),this._.output.push("</",e,">"),"pre"==e&&(this._.inPre=0),t&&t.breakAfterClose&&(this.lineBreak(),this._.needsSpace=t.needsSpace),this._.afterCloser=1},text:function(e){this._.indent&&(this.indentation(),!this._.inPre&&(e=CKEDITOR.tools.ltrim(e))),this._.output.push(e)},comment:function(e){this._.indent&&this.indentation(),this._.output.push("<!--",e,"-->")},lineBreak:function(){!this._.inPre&&0<this._.output.length&&this._.output.push(this.lineBreakChars),this._.indent=1},indentation:function(){!this._.inPre&&this._.indentation&&this._.output.push(this._.indentation),this._.indent=0},reset:function(){this._.output=[],this._.indent=0,this._.indentation="",this._.afterCloser=0,this._.inPre=0},setRules:function(e,t){var n=this._.rules[e];n?CKEDITOR.tools.extend(n,t,!0):this._.rules[e]=t}}}),function(){var e={canUndo:!1,exec:function(e){var t=e.document.createElement("hr");e.insertElement(t)}};CKEDITOR.plugins.add("horizontalrule",{init:function(t){t.blockless||(t.addCommand("horizontalrule",e),t.ui.addButton&&t.ui.addButton("HorizontalRule",{label:t.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"}))}})}(),function(){function e(e){var t=this.editor,i=e.document,o=i.body;(e=i.getElementById("cke_actscrpt"))&&e.parentNode.removeChild(e),(e=i.getElementById("cke_shimscrpt"))&&e.parentNode.removeChild(e),CKEDITOR.env.gecko&&(o.contentEditable=!1,2e4>CKEDITOR.env.version&&(o.innerHTML=o.innerHTML.replace(/^.*<!-- cke-content-start -->/,""),setTimeout(function(){var e=new CKEDITOR.dom.range(new CKEDITOR.dom.document(i));e.setStart(new CKEDITOR.dom.node(o),0),t.getSelection().selectRanges([e])},0))),o.contentEditable=!0,CKEDITOR.env.ie&&(o.hideFocus=!0,o.disabled=!0,o.removeAttribute("disabled")),delete this._.isLoadingData,this.$=o,i=new CKEDITOR.dom.document(i),this.setup(),CKEDITOR.env.ie&&(i.getDocumentElement().addClass(i.$.compatMode),t.config.enterMode!=CKEDITOR.ENTER_P&&i.on("selectionchange",function(){var e=i.getBody(),n=t.getSelection(),o=n&&n.getRanges()[0];o&&e.getHtml().match(/^<p>&nbsp;</p>$/i)&&o.startContainer.equals(e)&&setTimeout(function(){o=t.getSelection().getRanges()[0],o.startContainer.equals("body")||(e.getFirst().remove(1),o.moveToElementEditEnd(e),o.select())},0)})),CKEDITOR.env.gecko&&CKEDITOR.tools.setTimeout(n,0,this,t);try{t.document.$.execCommand("2D-position",!1,!0)}catch(a){}try{t.document.$.execCommand("enableInlineTableEditing",!1,!t.config.disableNativeTableHandles)}catch(s){}if(t.config.disableObjectResizing)try{this.getDocument().$.execCommand("enableObjectResizing",!1,!1)}catch(r){this.attachListener(this,CKEDITOR.env.ie?"resizestart":"resize",function(e){e.data.preventDefault()})}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==t.document.$.compatMode)&&this.attachListener(this,"keydown",function(e){var n=e.data.getKeystroke();if(33==n||34==n)if(CKEDITOR.env.ie)setTimeout(function(){t.getSelection().scrollIntoView()},0);else if(t.window.$.innerHeight>this.$.offsetHeight){var i=t.createRange();i[33==n?"moveToElementEditStart":"moveToElementEditEnd"](this),i.select(),e.data.preventDefault()}}),CKEDITOR.env.ie&&this.attachListener(i,"blur",function(){try{i.$.selection.empty()}catch(e){}}),t.document.getElementsByTag("title").getItem(0).data("cke-title",t.document.$.title),CKEDITOR.env.ie&&(t.document.$.title=this._.docTitle),CKEDITOR.tools.setTimeout(function(){t.fire("contentDom"),this._.isPendingFocus&&(t.focus(),this._.isPendingFocus=!1),setTimeout(function(){t.fire("dataReady")},0),CKEDITOR.env.ie&&setTimeout(function(){if(t.document){var e=t.document.$.body;e.runtimeStyle.marginBottom="0px",e.runtimeStyle.marginBottom=""}},1e3)},0,this)}function t(e){e.checkDirty()||setTimeout(function(){e.resetDirty()},0)}function n(e){if(!e.readOnly){var n=e.window,i=e.document,o=i.getBody(),a=o.getFirst(),s=o.getChildren().count();if(!s||1==s&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("_moz_editor_bogus_node")){t(e);var a=CKEDITOR.document,r=a.getDocumentElement(),l=r.$.scrollTop,c=r.$.scrollLeft,d=i.$.createEvent("KeyEvents");d.initKeyEvent("keypress",!0,!0,n.$,!1,!1,!1,!1,0,32),i.$.dispatchEvent(d),(l!=r.$.scrollTop||c!=r.$.scrollLeft)&&a.getWindow().$.scrollTo(c,l),s&&o.getFirst().remove(),i.getBody().appendBogus(),e=e.createRange(),e.setStartAt(o,CKEDITOR.POSITION_AFTER_START),e.select()}}}function i(){var e=[];if(8<=CKEDITOR.document.$.documentMode){e.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}");var t,n=[];for(t in CKEDITOR.dtd.$removeEmpty)n.push("html.CSS1Compat "+t+"[contenteditable=false]");e.push(n.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(e.push("html{height:100% !important}"),e.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));return e.push("html{cursor:text;*cursor:auto}"),e.push("img,input,textarea{cursor:default}"),e.join("n")}CKEDITOR.plugins.add("wysiwygarea",{init:function(e){e.addMode("wysiwyg",function(t){function n(n){n&&n.removeListener(),e.editable(new a(e,i.$.contentWindow.document.body)),e.setData(e.getData(1),t)}var i=CKEDITOR.document.createElement("iframe");i.setStyles({width:"100%",height:"100%"}),i.addClass("cke_wysiwyg_frame cke_reset");var s=e.ui.space("contents");s.append(i);var r="document.open();"+(o?'document.domain="'+document.domain+'";':"")+"document.close();",r=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent(r)+"}())":"",l=CKEDITOR.env.ie||CKEDITOR.env.gecko;l&&i.on("load",n);var c=[e.lang.editor,e.name].join(),d=e.lang.common.editorHelp;CKEDITOR.env.ie&&(c+=", "+d);var u=CKEDITOR.tools.getNextId(),h=CKEDITOR.dom.element.createFromHtml('<span id="'+u+'" class="cke_voice_label">'+d+"</span>");s.append(h,1),e.on("beforeModeUnload",function(e){e.removeListener(),h.remove()}),i.setAttributes({frameBorder:0,"aria-describedby":u,title:c,src:r,tabIndex:e.tabIndex,allowTransparency:"true"}),!l&&n(),CKEDITOR.env.webkit&&(r=function(){s.setStyle("width","100%"),i.hide(),i.setSize("width",s.getSize("width")),s.removeStyle("width"),i.show()},i.setCustomData("onResize",r),CKEDITOR.document.getWindow().on("resize",r)),e.fire("ariaWidget",i)})}});var o=CKEDITOR.env.isCustomDomain(),a=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments),this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(t){CKEDITOR.tools.setTimeout(e,0,this,t)},this),this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(e,t){var n=this.editor;if(t)this.setHtml(e);else{this._.isLoadingData=!0,n._.dataStore={id:1};var a=n.config,s=a.fullPage,r=a.docType,l=CKEDITOR.tools.buildStyleHtml(i()).replace(/<style>/,'<style data-cke-temp="1">');s||(l+=CKEDITOR.tools.buildStyleHtml(n.config.contentsCss));var c=a.baseHref?'<base href="'+a.baseHref+'" data-cke-temp="1" />':"";s&&(e=e.replace(/<!DOCTYPE[^>]*>/i,function(e){return n.docType=r=e,""}).replace(/<?xmls[^?]*?>/i,function(e){return n.xmlDeclaration=e,""})),n.dataProcessor&&(e=n.dataProcessor.toHtml(e)),s?(/<body[s|>]/.test(e)||(e="<body>"+e),/<html[s|>]/.test(e)||(e="<html>"+e+"</html>"),/<head[s|>]/.test(e)?/<title[s|>]/.test(e)||(e=e.replace(/<head[^>]*>/,"$&<title></title>")):e=e.replace(/<html[^>]*>/,"$&<head><title></title></head>"),c&&(e=e.replace(/<head>/,"$&"+c)),e=e.replace(/</heads*>/,l+"$&"),e=r+e):e=a.docType+'<html dir="'+a.contentsLangDirection+'" lang="'+(a.contentsLanguage||n.langCode)+'"><head><title>'+this._.docTitle+"</title>"+c+l+"</head><body"+(a.bodyId?' id="'+a.bodyId+'"':"")+(a.bodyClass?' class="'+a.bodyClass+'"':"")+">"+e+"</body></html>",CKEDITOR.env.gecko&&(e=e.replace(/<body/,'<body contenteditable="true" '),2e4>CKEDITOR.env.version&&(e=e.replace(/<body[^>]*>/,"$&<!-- cke-content-start -->"))),a='<script id="cke_actscrpt" type="text/javascript"'+(CKEDITOR.env.ie?' defer="defer" ':"")+">"+(o?'document.domain="'+document.domain+'";':"")+"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&&9>CKEDITOR.env.version&&(a+='<script id="cke_shimscrpt">(function(){var e="abbr,article,aside,audio,bdi,canvas,data,datalist,details,figcaption,figure,footer,header,hgroup,mark,meter,nav,output,progress,section,summary,time,video".split(","),i=e.length;while(i--){document.createElement(e[i])}})()</script>'),e=e.replace(/(?=s*</(:?head)>)/,a),this.clearCustomData(),this.clearListeners(),n.fire("contentDomUnload");var d=this.getDocument();try{d.write(e)}catch(u){setTimeout(function(){d.write(e)},0)}}},getData:function(e){if(e)return this.getHtml();var e=this.editor,t=e.config.fullPage,n=t&&e.docType,i=t&&e.xmlDeclaration,o=this.getDocument(),t=t?o.getDocumentElement().getOuterHtml():o.getBody().getHtml();return CKEDITOR.env.gecko&&(t=t.replace(/<br>(?=s*(:?$|</body>))/,"")),e.dataProcessor&&(t=e.dataProcessor.toDataFormat(t)),i&&(t=i+"n"+t),n&&(t=n+"n"+t),t},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:a.baseProto.focus.call(this)},detach:function(){var e=this.editor,t=e.document,n=e.window.getFrame();a.baseProto.detach.call(this),this.clearCustomData(),t.getDocumentElement().clearCustomData(),n.clearCustomData(),CKEDITOR.tools.removeFunction(this._.frameLoadedHandler),(t=n.removeCustomData("onResize"))&&t.removeListener(),e.fire("contentDomUnload"),n.remove()}}});CKEDITOR.env.gecko&&function(){var e=document.body;if(e){var t=e.getAttribute("onpageshow");e.setAttribute("onpageshow",(t?t+";":"")+'event.persisted&&(function(){var x=CKEDITOR.instances,d,i;for(i in x){d=x[i].document;if(d){d.$.designMode="off";d.$.designMode="on";}}})();')}else window.addEventListener("load",arguments.callee,!1)}()}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=!0,CKEDITOR.config.disableNativeSpellChecker=!0,CKEDITOR.config.contentsCss=CKEDITOR.basePath+"contents.css",function(){function e(e,t){return t||(t=e.getSelection().getSelectedElement()),t&&t.is("img")&&!t.data("cke-realelement")&&!t.isReadOnly()?t:void 0}function t(e){var t=e.getStyle("float");return("inherit"==t||"none"==t)&&(t=0),t||(t=e.getAttribute("align")),t}CKEDITOR.plugins.add("image",{requires:"dialog",init:function(t){CKEDITOR.dialog.add("image",this.path+"dialogs/image.js"),t.addCommand("image",new CKEDITOR.dialogCommand("image")),t.ui.addButton&&t.ui.addButton("Image",{label:t.lang.common.image,command:"image",toolbar:"insert,10"}),t.on("doubleclick",function(e){var t=e.data.element;t.is("img")&&!t.data("cke-realelement")&&!t.isReadOnly()&&(e.data.dialog="image")}),t.addMenuItems&&t.addMenuItems({image:{label:t.lang.image.menu,command:"image",group:"image"}}),t.contextMenu&&t.contextMenu.addListener(function(n){return e(t,n)?{image:CKEDITOR.TRISTATE_OFF}:void 0})},afterInit:function(n){function i(i){var o=n.getCommand("justify"+i);o&&(("left"==i||"right"==i)&&o.on("exec",function(o){var a,s=e(n);s&&(a=t(s),a==i?(s.removeStyle("float"),i==t(s)&&s.removeAttribute("align")):s.setStyle("float",i),o.cancel())}),o.on("refresh",function(o){var a=e(n);a&&(a=t(a),this.setState(a==i?CKEDITOR.TRISTATE_ON:"right"==i||"left"==i?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),o.cancel())}))}i("left"),i("right"),i("center"),i("block")}})}(),CKEDITOR.config.image_removeLinkByEmptyURL=!0,function(){function e(e,t){var n=i.exec(e),o=i.exec(t);if(n){if(!n[2]&&"px"==o[2])return o[1];if("px"==n[2]&&!o[2])return o[1]+"px"}return t}var t=CKEDITOR.htmlParser.cssStyle,n=CKEDITOR.tools.cssLength,i=/^((?:d*(?:.d+))|(?:d+))(.*)?$/i,o={elements:{$:function(n){var i=n.attributes;if((i=(i=(i=i&&i["data-cke-realelement"])&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(i)))&&i.children[0])&&n.attributes["data-cke-resizable"]){var o=new t(n).rules,n=i.attributes,a=o.width,o=o.height;a&&(n.width=e(n.width,a)),o&&(n.height=e(n.height,o))}return i}}},a=CKEDITOR.plugins.add("fakeobjects",{afterInit:function(e){(e=(e=e.dataProcessor)&&e.htmlFilter)&&e.addRules(o)}});CKEDITOR.editor.prototype.createFakeElement=function(e,i,o,s){var r=this.lang.fakeobjects,r=r[o]||r.unknown,i={"class":i,"data-cke-realelement":encodeURIComponent(e.getOuterHtml()),"data-cke-real-node-type":e.type,alt:r,title:r,align:e.getAttribute("align")||""};return CKEDITOR.env.hc||(i.src=CKEDITOR.getUrl(a.path+"images/spacer.gif")),o&&(i["data-cke-real-element-type"]=o),s&&(i["data-cke-resizable"]=s,o=new t,s=e.getAttribute("width"),e=e.getAttribute("height"),s&&(o.rules.width=n(s)),e&&(o.rules.height=n(e)),o.populate(i)),this.document.createElement("img",{attributes:i})},CKEDITOR.editor.prototype.createFakeParserElement=function(e,i,o,s){var r,l=this.lang.fakeobjects,l=l[o]||l.unknown;return r=new CKEDITOR.htmlParser.basicWriter,e.writeHtml(r),r=r.getHtml(),i={"class":i,"data-cke-realelement":encodeURIComponent(r),"data-cke-real-node-type":e.type,alt:l,title:l,align:e.attributes.align||""},CKEDITOR.env.hc||(i.src=CKEDITOR.getUrl(a.path+"images/spacer.gif")),o&&(i["data-cke-real-element-type"]=o),s&&(i["data-cke-resizable"]=s,s=e.attributes,e=new t,o=s.width,s=s.height,void 0!=o&&(e.rules.width=n(o)),void 0!=s&&(e.rules.height=n(s)),e.populate(i)),new CKEDITOR.htmlParser.element("img",i)},CKEDITOR.editor.prototype.restoreRealElement=function(t){if(t.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var n=CKEDITOR.dom.element.createFromHtml(decodeURIComponent(t.data("cke-realelement")),this.document);if(t.data("cke-resizable")){var i=t.getStyle("width"),t=t.getStyle("height");i&&n.setAttribute("width",e(n.getAttribute("width"),i)),t&&n.setAttribute("height",e(n.getAttribute("height"),t))}return n}}(),CKEDITOR.plugins.add("link",{requires:"dialog,fakeobjects",onLoad:function(){function e(e){return n.replace(/%1/g,"rtl"==e?"right":"left").replace(/%2/g,"cke_contents_"+e)}var t="background:url("+CKEDITOR.getUrl(this.path+"images/anchor.png")+") no-repeat %1 center;border:1px dotted #00f;",n=".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{"+t+"padding-%1:18px;cursor:auto;}"+(CKEDITOR.env.ie?"a.cke_anchor_empty{display:inline-block;}":"")+".%2 img.cke_anchor{"+t+"width:16px;min-height:15px;height:1.15em;vertical-align:"+(CKEDITOR.env.opera?"middle":"text-bottom")+";}";CKEDITOR.addCss(e("ltr")+e("rtl"))},init:function(e){e.addCommand("link",new CKEDITOR.dialogCommand("link")),e.addCommand("anchor",new CKEDITOR.dialogCommand("anchor")),e.addCommand("unlink",new CKEDITOR.unlinkCommand),e.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand),e.setKeystroke(CKEDITOR.CTRL+76,"link"),e.ui.addButton&&(e.ui.addButton("Link",{label:e.lang.link.toolbar,command:"link",toolbar:"links,10"}),e.ui.addButton("Unlink",{label:e.lang.link.unlink,command:"unlink",toolbar:"links,20"}),e.ui.addButton("Anchor",{label:e.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"),e.on("doubleclick",function(t){var n=CKEDITOR.plugins.link.getSelectedLink(e)||t.data.element;n.isReadOnly()||(n.is("a")?(t.data.dialog=!n.getAttribute("name")||n.getAttribute("href")&&n.getChildCount()?"link":"anchor",e.getSelection().selectElement(n)):CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,n)&&(t.data.dialog="anchor"))}),e.addMenuItems&&e.addMenuItems({anchor:{label:e.lang.link.anchor.menu,command:"anchor",group:"anchor",order:1},removeAnchor:{label:e.lang.link.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:e.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:e.lang.link.unlink,command:"unlink",group:"link",order:5}}),e.contextMenu&&e.contextMenu.addListener(function(t){if(!t||t.isReadOnly())return null;if(t=CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,t),!t&&!(t=CKEDITOR.plugins.link.getSelectedLink(e)))return null;var n={};return t.getAttribute("href")&&t.getChildCount()&&(n={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF}),t&&t.hasAttribute("name")&&(n.anchor=n.removeAnchor=CKEDITOR.TRISTATE_OFF),n})},afterInit:function(e){var t=e.dataProcessor,n=t&&t.dataFilter,t=t&&t.htmlFilter,i=e._.elementsPath&&e._.elementsPath.filters;n&&n.addRules({elements:{a:function(t){var n=t.attributes;if(!n.name)return null;var i=!t.children.length;if(CKEDITOR.plugins.link.synAnchorSelector){var t=i?"cke_anchor_empty":"cke_anchor",o=n["class"];n.name&&(!o||0>o.indexOf(t))&&(n["class"]=(o||"")+" "+t),i&&CKEDITOR.plugins.link.emptyAnchorFix&&(n.contenteditable="false",n["data-cke-editable"]=1)}else if(CKEDITOR.plugins.link.fakeAnchor&&i)return e.createFakeParserElement(t,"cke_anchor","anchor");return null}}}),CKEDITOR.plugins.link.emptyAnchorFix&&t&&t.addRules({elements:{a:function(e){delete e.attributes.contenteditable}}}),i&&i.push(function(t,n){return"a"!=n||!CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,t)&&(!t.getAttribute("name")||t.getAttribute("href")&&t.getChildCount())?void 0:"anchor"})}}),CKEDITOR.plugins.link={getSelectedLink:function(e){var t=e.getSelection(),n=t.getSelectedElement();return n&&n.is("a")?n:(t=t.getRanges(!0)[0])?(t.shrink(CKEDITOR.SHRINK_TEXT),e.elementPath(t.getCommonAncestor()).contains("a",1)):null},fakeAnchor:CKEDITOR.env.opera||CKEDITOR.env.webkit,synAnchorSelector:CKEDITOR.env.ie,emptyAnchorFix:CKEDITOR.env.ie&&8>CKEDITOR.env.version,tryRestoreFakeAnchor:function(e,t){if(t&&t.data("cke-real-element-type")&&"anchor"==t.data("cke-real-element-type")){var n=e.restoreRealElement(t);if(n.data("cke-saved-name"))return n}}},CKEDITOR.unlinkCommand=function(){},CKEDITOR.unlinkCommand.prototype={exec:function(e){var t=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1});e.removeStyle(t)},refresh:function(e,t){var n=t.lastElement&&t.lastElement.getAscendant("a",!0);n&&"a"==n.getName()&&n.getAttribute("href")&&n.getChildCount()?this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)},contextSensitive:1,startDisabled:1},CKEDITOR.removeAnchorCommand=function(){},CKEDITOR.removeAnchorCommand.prototype={exec:function(e){var t,n=e.getSelection(),i=n.createBookmarks();n&&(t=n.getSelectedElement())&&(CKEDITOR.plugins.link.fakeAnchor&&!t.getChildCount()?CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,t):t.is("a"))?t.remove(1):(t=CKEDITOR.plugins.link.getSelectedLink(e))&&(t.hasAttribute("href")?(t.removeAttributes({name:1,"data-cke-saved-name":1}),t.removeClass("cke_anchor")):t.remove(1)),n.selectBookmarks(i)}},CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0}),function(){function e(e,t,n){return c(t)&&c(n)&&n.equals(t.getNext(function(e){return!(U(e)||V(e)||d(e))}))}function t(e){this.upper=e[0],this.lower=e[1],this.set.apply(this,e.slice(2))}function n(e){var t,n=e.element;return n&&c(n)?!(t=n.getAscendant(e.triggers,!0))||t.contains(e.editable)||t.equals(e.editable)?null:t:null}function i(e,t,n){return E(e,t),E(e,n),e=t.size.bottom,n=n.size.top,e&&n?0|(e+n)/2:e||n}function o(e,t,n){return t=t[n?"getPrevious":"getNext"](function(t){return t&&t.type==CKEDITOR.NODE_TEXT&&!U(t)||c(t)&&!d(t)&&!l(e,t)})}function a(e){var t=e.doc,n=y('<span contenteditable="false" style="'+F+"position:absolute;border-top:1px dashed "+e.boxColor+'"></span>',t);for(I(n,{attach:function(){return this.wrap.getParent()||this.wrap.appendTo(e.editable,!0),this},lineChildren:[I(y('<span title="'+e.editor.lang.magicline.title+'" contenteditable="false">&#8629;</span>',t),{base:F+"height:17px;width:17px;"+(e.rtl?"left":"right")+":17px;background:url("+this.path+"images/icon.png) center no-repeat "+e.boxColor+";cursor:pointer;"+(D.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":""),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)]}),I(y(z,t),{base:H+"left:0px;border-left-color:"+e.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"]}),I(y(z,t),{base:H+"right:0px;border-right-color:"+e.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(){return this.wrap.getParent()&&this.wrap.remove(),this},mouseNear:function(){E(e,this);var t=e.holdDistance,n=this.size;return n&&e.mouse.y>n.top-t&&e.mouse.y<n.bottom+t&&e.mouse.x>n.left-t&&e.mouse.x<n.right+t?!0:!1},place:function(){var t=e.view,n=e.editable,i=e.trigger,o=i.upper,a=i.lower,s=o||a,r=s.getParent(),l={};this.trigger=i,o&&E(e,o,!0),a&&E(e,a,!0),E(e,r,!0),e.inInlineMode&&v(e,!0),r.equals(n)?(l.left=t.scroll.x,l.right=-t.scroll.x,l.width=""):(l.left=s.size.left-s.size.margin.left+t.scroll.x-(e.inInlineMode?t.editable.left+t.editable.border.left:0),l.width=s.size.outerWidth+s.size.margin.left+s.size.margin.right+t.scroll.x,l.right=""),o&&a?l.top=o.size.margin.bottom===a.size.margin.top?0|o.size.bottom+o.size.margin.bottom/2:o.size.margin.bottom<a.size.margin.top?o.size.bottom+o.size.margin.bottom:o.size.bottom+o.size.margin.bottom-a.size.margin.top:o?a||(l.top=o.size.bottom+o.size.margin.bottom):l.top=a.size.top-a.size.margin.top,i.is(K)||l.top>t.scroll.y-15&&l.top<t.scroll.y+5?(l.top=e.inInlineMode?0:t.scroll.y,this.look(K)):i.is(N)||l.top>t.pane.bottom-5&&l.top<t.pane.bottom+15?(l.top=e.inInlineMode?t.editable.height+t.editable.padding.top+t.editable.padding.bottom:t.pane.bottom-1,this.look(N)):(e.inInlineMode&&(l.top-=t.editable.top+t.editable.border.top),this.look(x)),e.inInlineMode&&(l.top--,l.top+=t.editable.scroll.top,l.left+=t.editable.scroll.left);for(var c in l)l[c]=CKEDITOR.tools.cssLength(l[c]);this.setStyles(l)},look:function(e){if(this.oldLook!=e){for(var t,n=this.lineChildren.length;n--;)(t=this.lineChildren[n]).setAttribute("style",t.base+t.looks[0|e/2]);this.oldLook=e}},wrap:new b("span",e.doc)}),t=n.lineChildren.length;t--;)n.lineChildren[t].appendTo(n);n.look(x),n.appendTo(n.wrap),n.unselectable(),n.lineChildren[0].on("mouseup",function(t){n.detach(),s(e,function(t){var n=e.line.trigger;t[n.is(R)?"insertBefore":"insertAfter"](n.is(R)?n.lower:n.upper)},!0),e.editor.focus(),!D.ie&&e.enterMode!=CKEDITOR.ENTER_BR&&e.hotNode.scrollIntoView(),t.data.preventDefault(!0)}),n.on("mousedown",function(e){e.data.preventDefault(!0)}),e.line=n}function s(e,t,n){var i,o=new CKEDITOR.dom.range(e.doc),a=e.editor;D.ie&&e.enterMode==CKEDITOR.ENTER_BR?i=e.doc.createText(A):(i=new b(e.enterBehavior,e.doc),e.enterMode!=CKEDITOR.ENTER_BR&&e.doc.createText(A).appendTo(i)),n&&a.fire("saveSnapshot"),t(i),o.moveToPosition(i,CKEDITOR.POSITION_AFTER_START),a.getSelection().selectRanges([o]),e.hotNode=i,n&&a.fire("saveSnapshot")}function r(e,t){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function i(n){var i=D.ie&&9>D.version?" ":A,o=e.hotNode&&e.hotNode.getText()==i&&e.element.equals(e.hotNode)&&e.lastCmdDirection===!!t;s(e,function(i){o&&e.hotNode&&e.hotNode.remove(),i[t?"insertAfter":"insertBefore"](n),i.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!t}),e.lastCmdDirection=!!t}),!D.ie&&e.enterMode!=CKEDITOR.ENTER_BR&&e.hotNode.scrollIntoView(),e.line.detach()}return function(a){if(a=a.getSelection().getStartElement(),(a=a.getAscendant($,1))&&!a.equals(e.editable)&&!a.contains(e.editable)){e.element=a;var s,r=o(e,a,!t);c(r)&&r.is(e.triggers)&&r.is(P)&&(!o(e,r,!t)||(s=o(e,r,!t))&&c(s)&&s.is(e.triggers))?i(r):(s=n(e,a),c(s)&&(o(e,s,!t)?(a=o(e,s,!t))&&c(a)&&a.is(e.triggers)&&i(s):i(s)))}}}()}}function l(e,t){if(!t||t.type!=CKEDITOR.NODE_ELEMENT||!t.$)return!1;var n=e.line;return n.wrap.equals(t)||n.wrap.contains(t)}function c(e){return e&&e.type==CKEDITOR.NODE_ELEMENT&&e.$}function d(e){if(!c(e))return!1;var t;return(t=u(e))||(c(e)?(t={left:1,right:1,center:1},t=!(!t[e.getComputedStyle("float")]&&!t[e.getAttribute("align")])):t=!1),t}function u(e){return!!{absolute:1,fixed:1,relative:1}[e.getComputedStyle("position")]}function h(e,t){return c(t)?t.is(e.triggers):null}function f(e,t,n){return(t=t[n?"getLast":"getFirst"](function(t){return e.isRelevant(t)&&!t.is(M)}))?(E(e,t),n?t.size.top>e.mouse.y:t.size.bottom<e.mouse.y):!1}function m(e){var n=e.editable,i=e.mouse,o=e.view,a=e.triggerOffset;v(e);var s=i.y>(e.inInlineMode?o.editable.top+o.editable.height/2:Math.min(o.editable.height,o.pane.height)/2),n=n[s?"getLast":"getFirst"](function(e){return!(U(e)||V(e))});return n?(l(e,n)&&(n=e.line.wrap[s?"getPrevious":"getNext"](function(e){return!(U(e)||V(e))})),c(n)&&!d(n)&&h(e,n)?(E(e,n),!s&&0<=n.size.top&&0<i.y&&i.y<n.size.top+a?(e=e.inInlineMode||0===o.scroll.y?K:x,new t([null,n,R,_,e])):s&&n.size.bottom<=o.pane.height&&i.y>n.size.bottom-a&&i.y<o.pane.height?(e=e.inInlineMode||n.size.bottom>o.pane.height-a&&n.size.bottom<o.pane.height?N:x,new t([n,null,k,_,e])):null):null):null
}function p(e){var i=e.mouse,a=e.view,s=e.triggerOffset,r=n(e);if(!r)return null;E(e,r);var l,u,s=Math.min(s,0|r.size.outerHeight/2),m=[];if(i.y>r.size.top-1&&i.y<r.size.top+s)u=!1;else{if(!(i.y>r.size.bottom-s&&i.y<r.size.bottom+1))return null;u=!0}if(d(r)||f(e,r,u)||r.getParent().is(L))return null;var p=o(e,r,!u);if(p){if(p&&p.type==CKEDITOR.NODE_TEXT)return null;if(c(p)){if(d(p)||!h(e,p)||p.getParent().is(L))return null;m=[p,r][u?"reverse":"concat"]().concat([w,_])}}else r.equals(e.editable[u?"getLast":"getFirst"](e.isRelevant))?(v(e),u&&i.y>r.size.bottom-s&&i.y<a.pane.height&&r.size.bottom>a.pane.height-s&&r.size.bottom<a.pane.height?l=N:0<i.y&&i.y<r.size.top+s&&(l=K)):l=x,m=[null,r][u?"reverse":"concat"]().concat([u?k:R,_,l,r.equals(e.editable[u?"getLast":"getFirst"](e.isRelevant))?u?N:K:x]);return 0 in m?new t(m):null}function g(e,t,n,i){for(var o=function(){var n=D.ie?t.$.currentStyle:e.win.$.getComputedStyle(t.$,"");return D.ie?function(e){return n[CKEDITOR.tools.cssStyleToDomStyle(e)]}:function(e){return n.getPropertyValue(e)}}(),a=t.getDocumentPosition(),s={},r={},l={},c={},d=q.length;d--;)s[q[d]]=parseInt(o("border-"+q[d]+"-width"),10)||0,l[q[d]]=parseInt(o("padding-"+q[d]),10)||0,r[q[d]]=parseInt(o("margin-"+q[d]),10)||0;return(!n||i)&&T(e,i),c.top=a.y-(n?0:e.view.scroll.y),c.left=a.x-(n?0:e.view.scroll.x),c.outerWidth=t.$.offsetWidth,c.outerHeight=t.$.offsetHeight,c.height=c.outerHeight-(l.top+l.bottom+s.top+s.bottom),c.width=c.outerWidth-(l.left+l.right+s.left+s.right),c.bottom=c.top+c.outerHeight,c.right=c.left+c.outerWidth,e.inInlineMode&&(c.scroll={top:t.$.scrollTop,left:t.$.scrollLeft}),I({border:s,padding:l,margin:r,ignoreScroll:n},c,!0)}function E(e,t,n){if(!c(t))return t.size=null;if(t.size){if(t.size.ignoreScroll==n&&t.size.date>new Date-B)return null}else t.size={};return I(t.size,g(e,t,n),{date:+new Date},!0)}function v(e,t){e.view.editable=g(e,e.editable,t,!0)}function T(e,t){e.view||(e.view={});var n=e.view;if(t||!(n&&n.date>new Date-B)){var i=e.win,n=i.getScrollPosition(),i=i.getViewPaneSize();I(e.view,{scroll:{x:n.x,y:n.y,width:e.doc.$.documentElement.scrollWidth-i.width,height:e.doc.$.documentElement.scrollHeight-i.height},pane:{width:i.width,height:i.height,bottom:i.height+n.y},date:+new Date},!0)}}function C(e,n,i,o){for(var a=o,s=o,r=0,l=!1,c=!1,d=e.view.pane.height,u=e.mouse;u.y+r<d&&0<u.y-r&&(l||(l=n(a,o)),c||(c=n(s,o)),!l&&0<u.y-r&&(a=i(e,{x:u.x,y:u.y-r})),!c&&u.y+r<d&&(s=i(e,{x:u.x,y:u.y+r})),!l||!c);)r+=2;return new t([a,s,null,null])}CKEDITOR.plugins.add("magicline",{init:function(e){var i={};i[CKEDITOR.ENTER_BR]="br",i[CKEDITOR.ENTER_P]="p",i[CKEDITOR.ENTER_DIV]="div";var h,f,E,C=e.config,b=C.magicline_triggerOffset||30,y=C.enterMode,R={editor:e,enterBehavior:i[y],enterMode:y,triggerOffset:b,holdDistance:0|b*(C.magicline_holdDistance||.5),boxColor:C.magicline_color||"#ff0000",rtl:"rtl"==C.contentsLangDirection,triggers:C.magicline_everywhere?$:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}};R.isRelevant=function(e){return c(e)&&!l(R,e)&&!d(e)},e.on("contentDom",function(){var i=e.editable(),c=e.document,d=e.window;I(R,{editable:i,inInlineMode:i.isInline(),doc:c,win:d},!0),R.boundary=R.inInlineMode?R.editable:R.doc.getDocumentElement(),i.is(O.$inline)||(R.inInlineMode&&!u(i)&&i.setStyles({position:"relative",top:null,left:null}),a.call(this,R),T(R),i.attachListener(e,"beforeUndoImage",function(){R.line.detach()}),i.attachListener(e,"beforeGetData",function(){R.line.wrap.getParent()&&(R.line.detach(),e.once("getData",function(){R.line.attach()},null,null,1e3))},null,null,0),i.attachListener(R.inInlineMode?c:c.getWindow().getFrame(),"mouseout",function(t){if("wysiwyg"==e.mode)if(R.inInlineMode){var n=t.data.$.clientX,t=t.data.$.clientY;T(R),v(R,!0);var i=R.view.editable,o=R.view.scroll;n>i.left-o.x&&n<i.right-o.x&&t>i.top-o.y&&t<i.bottom-o.y||(clearTimeout(E),E=null,R.line.detach())}else clearTimeout(E),E=null,R.line.detach()}),i.attachListener(i,"keyup",function(){R.hiddenMode=0}),i.attachListener(i,"keydown",function(t){if("wysiwyg"==e.mode)switch(t=t.data.getKeystroke(),e.getSelection().getStartElement(),t){case 2228240:case 16:R.hiddenMode=1,R.line.detach()}}),i.attachListener(R.inInlineMode?i:c,"mousemove",function(t){if(f=!0,"wysiwyg"==e.mode&&!E){var n={x:t.data.$.clientX,y:t.data.$.clientY};E=setTimeout(function(){R.mouse=n,E=R.trigger=null,T(R),f&&!R.hiddenMode&&e.focusManager.hasFocus&&!R.line.mouseNear()&&(R.element=j(R,!0))&&((R.trigger=m(R)||p(R)||W(R))?R.line.attach().place():(R.trigger=null,R.line.detach()),f=!1)},30)}}),i.attachListener(d,"scroll",function(){"wysiwyg"==e.mode&&(R.line.detach(),D.webkit&&(R.hiddenMode=1,clearTimeout(h),h=setTimeout(function(){R.hiddenMode=0},50)))}),i.attachListener(d,"mousedown",function(){"wysiwyg"==e.mode&&(R.line.detach(),R.hiddenMode=1)}),i.attachListener(d,"mouseup",function(){R.hiddenMode=0}),e.addCommand("accessPreviousSpace",r(R)),e.addCommand("accessNextSpace",r(R,!0)),e.setKeystroke([[C.magicline_keystrokePrevious,"accessPreviousSpace"],[C.magicline_keystrokeNext,"accessNextSpace"]]),e.on("loadSnapshot",function(){for(var e,t=c.getElementsByTag(R.enterBehavior),n=t.count();n--;)if((e=t.getItem(n)).hasAttribute("data-cke-magicline-hot")){R.hotNode=e,R.lastCmdDirection="true"===e.getAttribute("data-cke-magicline-dir")?!0:!1;break}}),this.backdoor={accessFocusSpace:s,boxTrigger:t,isLine:l,getAscendantTrigger:n,getNonEmptyNeighbour:o,getSize:g,that:R,triggerEdge:p,triggerEditable:m,triggerExpand:W})},this)}});var I=CKEDITOR.tools.extend,b=CKEDITOR.dom.element,y=b.createFromHtml,D=CKEDITOR.env,O=CKEDITOR.dtd,R=128,k=64,w=32,_=16,S=8,K=4,N=2,x=1,A=" ",L=O.$listItem,M=O.$tableContent,P=I({},O.$nonEditable,O.$empty),$=O.$block,B=100,F="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",H=F+"border-color:transparent;display:block;border-style:solid;",z="<span>"+A+"</span>";t.prototype={set:function(e,t,n){return this.properties=e+t+(n||x),this},is:function(e){return(this.properties&e)==e}};var j=function(){return function(e,t,n){if(!e.mouse)return null;var i=e.doc,o=e.line.wrap,n=n||e.mouse,a=new CKEDITOR.dom.element(i.$.elementFromPoint(n.x,n.y));return t&&l(e,a)&&(o.hide(),a=new CKEDITOR.dom.element(i.$.elementFromPoint(n.x,n.y)),o.show()),!a||a.type!=CKEDITOR.NODE_ELEMENT||!a.$||D.ie&&9>D.version&&!e.boundary.equals(a)&&!e.boundary.contains(a)?null:a}}(),U=CKEDITOR.dom.walker.whitespaces(),V=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),W=function(){function t(t){var o,a,s,r=t.element;if(!c(r)||r.contains(t.editable))return null;if(s=C(t,function(e,t){return!t.equals(e)},function(e,t){return j(e,!0,t)},r),o=s.upper,a=s.lower,e(t,o,a))return s.set(w,S);if(o&&r.contains(o))for(;!o.getParent().equals(r);)o=o.getParent();else o=r.getFirst(function(e){return n(t,e)});if(a&&r.contains(a))for(;!a.getParent().equals(r);)a=a.getParent();else a=r.getLast(function(e){return n(t,e)});if(!o||!a)return null;if(E(t,o),E(t,a),!(t.mouse.y>o.size.top&&t.mouse.y<a.size.bottom))return null;for(var l,d,u,h,r=Number.MAX_VALUE;a&&!a.equals(o)&&(d=o.getNext(t.isRelevant));)l=Math.abs(i(t,o,d)-t.mouse.y),r>l&&(r=l,u=o,h=d),o=d,E(t,o);return u&&h&&t.mouse.y>u.size.top&&t.mouse.y<h.size.bottom?(s.upper=u,s.lower=h,s.set(w,S)):null}function n(e,t){return!(t&&t.type==CKEDITOR.NODE_TEXT||V(t)||d(t)||l(e,t)||t.type==CKEDITOR.NODE_ELEMENT&&t.$&&t.is("br"))}return function(n){var i,o=t(n);if(i=o){i=o.upper;var a=o.lower;i=!i||!a||d(a)||d(i)||a.equals(i)||i.equals(a)||a.contains(i)||i.contains(a)?!1:h(n,i)&&h(n,a)&&e(n,i,a)?!0:!1}return i?o:null}}(),q=["top","left","right","bottom"]}(),CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.ALT+219,CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.ALT+221,function(){function e(e){if(!e||e.type!=CKEDITOR.NODE_ELEMENT||"form"!=e.getName())return[];for(var t=[],n=["style","className"],i=0;i<n.length;i++){var o=e.$.elements.namedItem(n[i]);o&&(o=new CKEDITOR.dom.element(o),t.push([o,o.nextSibling]),o.remove())}return t}function t(e,t){if(e&&e.type==CKEDITOR.NODE_ELEMENT&&"form"==e.getName()&&0<t.length)for(var n=t.length-1;n>=0;n--){var i=t[n][0],o=t[n][1];o?i.insertBefore(o):i.appendTo(e)}}function n(n,i){var o=e(n),a={},s=n.$;return i||(a["class"]=s.className||"",s.className=""),a.inline=s.style.cssText||"",i||(s.style.cssText="position: static; overflow: visible"),t(o),a}function i(n,i){var o=e(n),a=n.$;"class"in i&&(a.className=i["class"]),"inline"in i&&(a.style.cssText=i.inline),t(o)}function o(e){var t,n=CKEDITOR.instances;for(t in n){var i=n[t];"wysiwyg"==i.mode&&!i.readOnly&&(i=i.document.getBody(),i.setAttribute("contentEditable",!1),i.setAttribute("contentEditable",!0))}e.editable().hasFocus&&(e.toolbox.focus(),e.focus())}CKEDITOR.plugins.add("maximize",{init:function(e){function t(){var t=d.getViewPaneSize();e.resize(t.width,t.height,null,!0)}if(e.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var a,s,r,l=e.lang,c=CKEDITOR.document,d=c.getWindow(),u=CKEDITOR.TRISTATE_OFF;e.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:!1,exec:function(){var h=e.container.getChild(1),f=e.ui.space("contents");if("wysiwyg"==e.mode){var m=e.getSelection();a=m&&m.getRanges(),s=d.getScrollPosition()}else{var p=e.editable().$;a=!CKEDITOR.env.ie&&[p.selectionStart,p.selectionEnd],s=[p.scrollLeft,p.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){for(d.on("resize",t),r=d.getScrollPosition(),m=e.container;m=m.getParent();)m.setCustomData("maximize_saved_styles",n(m)),m.setStyle("z-index",e.config.baseFloatZIndex-5);f.setCustomData("maximize_saved_styles",n(f,!0)),h.setCustomData("maximize_saved_styles",n(h,!0)),f={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0},c.getDocumentElement().setStyles(f),!CKEDITOR.env.gecko&&c.getDocumentElement().setStyle("position","fixed"),(!CKEDITOR.env.gecko||!CKEDITOR.env.quirks)&&c.getBody().setStyles(f),CKEDITOR.env.ie?setTimeout(function(){d.$.scrollTo(0,0)},0):d.$.scrollTo(0,0),h.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute"),h.$.offsetLeft,h.setStyles({"z-index":e.config.baseFloatZIndex-5,left:"0px",top:"0px"}),h.addClass("cke_maximized"),t(),f=h.getDocumentPosition(),h.setStyles({left:-1*f.x+"px",top:-1*f.y+"px"}),CKEDITOR.env.gecko&&o(e)}else if(this.state==CKEDITOR.TRISTATE_ON){for(d.removeListener("resize",t),f=[f,h],m=0;m<f.length;m++)i(f[m],f[m].getCustomData("maximize_saved_styles")),f[m].removeCustomData("maximize_saved_styles");for(m=e.container;m=m.getParent();)i(m,m.getCustomData("maximize_saved_styles")),m.removeCustomData("maximize_saved_styles");CKEDITOR.env.ie?setTimeout(function(){d.$.scrollTo(r.x,r.y)},0):d.$.scrollTo(r.x,r.y),h.removeClass("cke_maximized"),CKEDITOR.env.webkit&&(h.setStyle("display","inline"),setTimeout(function(){h.setStyle("display","block")},0)),e.fire("resize")}this.toggleState(),(m=this.uiItems[0])&&(f=this.state==CKEDITOR.TRISTATE_OFF?l.maximize.maximize:l.maximize.minimize,m=CKEDITOR.document.getById(m._.id),m.getChild(1).setHtml(f),m.setAttribute("title",f),m.setAttribute("href",'javascript:void("'+f+'");')),"wysiwyg"==e.mode?a?(CKEDITOR.env.gecko&&o(e),e.getSelection().selectRanges(a),(p=e.getSelection().getStartElement())&&p.scrollIntoView(!0)):d.$.scrollTo(s.x,s.y):(a&&(p.selectionStart=a[0],p.selectionEnd=a[1]),p.scrollLeft=s[0],p.scrollTop=s[1]),a=s=null,u=this.state,e.fire("maximize",this.state)},canUndo:!1}),e.ui.addButton&&e.ui.addButton("Maximize",{label:l.maximize.maximize,command:"maximize",toolbar:"tools,10"}),e.on("mode",function(){var t=e.getCommand("maximize");t.setState(t.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:u)},null,null,100)}}})}(),function(){var e={canUndo:!1,async:!0,exec:function(t){t.getClipboardData({title:t.lang.pastetext.title},function(n){n&&t.fire("paste",{type:"text",dataValue:n.dataValue}),t.fire("afterCommandExec",{name:"pastetext",command:e,returnValue:!!n})})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(t){t.addCommand("pastetext",e),t.ui.addButton&&t.ui.addButton("PasteText",{label:t.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"}),t.config.forcePasteAsPlainText&&t.on("beforePaste",function(e){"html"!=e.data.type&&(e.data.type="text")}),t.on("pasteState",function(e){t.getCommand("pastetext").setState(e.data)})}})}(),function(){function e(e,t,n){var i=CKEDITOR.cleanWord;return i?n():(e=CKEDITOR.getUrl(e.config.pasteFromWordCleanupFile||t+"filter/default.js"),CKEDITOR.scriptLoader.load(e,n,null,!0)),!i}function t(e){e.data.type="html"}CKEDITOR.plugins.add("pastefromword",{requires:"clipboard",init:function(n){var i=0,o=this.path;n.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(e){var n=this;i=1,e.once("beforePaste",t),e.getClipboardData({title:e.lang.pastefromword.title},function(t){t&&e.fire("paste",{type:"html",dataValue:t.dataValue}),e.fire("afterCommandExec",{name:"pastefromword",command:n,returnValue:!!t})})}}),n.ui.addButton&&n.ui.addButton("PasteFromWord",{label:n.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"}),n.on("pasteState",function(e){n.getCommand("pastefromword").setState(e.data)}),n.on("paste",function(t){var a=t.data,s=a.dataValue;if(s&&(i||/(class="?Mso|style="[^"]*bmso-|w:WordDocument)/.test(s))){var r=e(n,o,function(){r?n.fire("paste",a):(!n.config.pasteFromWordPromptCleanup||i||confirm(n.lang.pastefromword.confirmCleanup))&&(a.dataValue=CKEDITOR.cleanWord(s,n))});r&&t.cancel()}},null,null,3)}})}(),CKEDITOR.plugins.add("removeformat",{init:function(e){e.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat),e.ui.addButton&&e.ui.addButton("RemoveFormat",{label:e.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(e){for(var t,n=e._.removeFormatRegex||(e._.removeFormatRegex=RegExp("^(?:"+e.config.removeFormatTags.replace(/,/g,"|")+")$","i")),i=e._.removeAttributes||(e._.removeAttributes=e.config.removeFormatAttributes.split(",")),o=CKEDITOR.plugins.removeformat.filter,a=e.getSelection().getRanges(1),s=a.createIterator();t=s.getNextRange();){t.collapsed||t.enlarge(CKEDITOR.ENLARGE_ELEMENT);var r=t.createBookmark(),l=r.startNode,c=r.endNode,d=function(t){for(var i,a=e.elementPath(t),s=a.elements,r=1;(i=s[r])&&!i.equals(a.block)&&!i.equals(a.blockLimit);r++)n.test(i.getName())&&o(e,i)&&t.breakParent(i)};if(d(l),c)for(d(c),l=l.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);l&&!l.equals(c);)d=l.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),!("img"==l.getName()&&l.data("cke-realelement"))&&o(e,l)&&(n.test(l.getName())?l.remove(1):(l.removeAttributes(i),e.fire("removeFormatCleanup",l))),l=d;t.moveToBookmark(r)}e.forceNextSelectionCheck(),e.getSelection().selectRanges(a)}}},filter:function(e,t){for(var n=e._.removeFormatFilters||[],i=0;i<n.length;i++)if(!1===n[i](t))return!1;return!0}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(e){this._.removeFormatFilters||(this._.removeFormatFilters=[]),this._.removeFormatFilters.push(e)},CKEDITOR.config.removeFormatTags="b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var",CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign",function(){CKEDITOR.plugins.add("sourcearea",{init:function(t){function n(){this.hide(),this.setStyle("height",this.getParent().$.clientHeight+"px"),this.setStyle("width",this.getParent().$.clientWidth+"px"),this.show()}if(t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var i=CKEDITOR.plugins.sourcearea;t.addMode("source",function(i){var o=t.ui.space("contents").getDocument().createElement("textarea");o.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",t.config.sourceAreaTabSize||4))),o.addClass("cke_source cke_reset cke_enable_context_menu"),t.ui.space("contents").append(o),o=t.editable(new e(t,o)),o.setData(t.getData(1)),CKEDITOR.env.ie&&(o.attachListener(t,"resize",n,o),o.attachListener(CKEDITOR.document.getWindow(),"resize",n,o),CKEDITOR.tools.setTimeout(n,0,o)),t.fire("ariaWidget",this),i()}),t.addCommand("source",i.commands.source),t.ui.addButton&&t.ui.addButton("Source",{label:t.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"}),t.on("mode",function(){t.getCommand("source").setState("source"==t.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)})}}});var e=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(e){this.setValue(e),this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(e){this[(e?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){e.baseProto.detach.call(this),this.clearCustomData(),this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(e){"wysiwyg"==e.mode&&e.fire("saveSnapshot"),e.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED),e.setMode("source"==e.mode?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("specialchar",{availableLangs:{ca:1,cs:1,cy:1,de:1,en:1,eo:1,et:1,fa:1,fi:1,fr:1,he:1,hr:1,it:1,ku:1,lv:1,nb:1,nl:1,no:1,"pt-br":1,sk:1,sv:1,tr:1,ug:1,"zh-cn":1},requires:"dialog",init:function(e){var t=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js"),e.addCommand("specialchar",{exec:function(){var n=e.langCode,n=t.availableLangs[n]?n:t.availableLangs[n.replace(/-.*/,"")]?n.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(t.path+"dialogs/lang/"+n+".js"),function(){CKEDITOR.tools.extend(e.lang.specialchar,t.langEntries[n]),e.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1}),e.ui.addButton&&e.ui.addButton("SpecialChar",{label:e.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(" "),CKEDITOR.plugins.add("menubutton",{requires:"button,menu",onLoad:function(){var e=function(e){var t=this._;if(t.state!==CKEDITOR.TRISTATE_DISABLED){t.previousState=t.state;var n=t.menu;n||(n=t.menu=new CKEDITOR.menu(e,{panel:{className:"cke_menu_panel",attributes:{"aria-label":e.lang.common.options}}}),n.onHide=CKEDITOR.tools.bind(function(){this.setState(this.modes&&this.modes[e.mode]?t.previousState:CKEDITOR.TRISTATE_DISABLED)},this),this.onMenu&&n.addListener(this.onMenu)),t.on?n.hide():(this.setState(CKEDITOR.TRISTATE_ON),setTimeout(function(){n.show(CKEDITOR.document.getById(t.id),4)},0))}};CKEDITOR.ui.menuButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(t){delete t.panel,this.base(t),this.hasArrow=!0,this.click=e},statics:{handler:{create:function(e){return new CKEDITOR.ui.menuButton(e)}}}})},beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}}),CKEDITOR.UI_MENUBUTTON="menubutton",function(){function e(e,t){var n,i=0;for(n in t)if(t[n]==e){i=1;break}return i}var t="",n=function(){function e(){o.once("focus",a),o.once("blur",n)}function n(t){var t=t.editor,n=i.getScayt(t),o=t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE;n&&(i.setPaused(t,!n.disabled),i.setControlId(t,n.id),n.destroy(!0),delete i.instances[t.name],o&&e())}var o=this,a=function(){if("undefined"==typeof i.instances[o.name]&&null==i.instances[o.name]){var e=o.config,t={};if(t.srcNodeRef="BODY"==o.editable().$.nodeName?o.document.getWindow().$.frameElement:o.editable().$,t.assocApp="CKEDITOR."+CKEDITOR.version+"@"+CKEDITOR.revision,t.customerid=e.scayt_customerid||"1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2",t.customDictionaryIds=e.scayt_customDictionaryIds||"",t.userDictionaryName=e.scayt_userDictionaryName||"",t.sLang=e.scayt_sLang||"en_US",t.onLoad=function(){CKEDITOR.env.ie&&8>CKEDITOR.env.version||this.addStyle(this.selectorCss(),"padding-bottom: 2px !important;"),o.editable().hasFocus&&!i.isControlRestored(o)&&this.focus()},t.onBeforeChange=function(){i.getScayt(o)&&!o.checkDirty()&&setTimeout(function(){o.resetDirty()},0)},e=window.scayt_custom_params,"object"==typeof e)for(var n in e)t[n]=e[n];i.getControlId(o)&&(t.id=i.getControlId(o));var a=new window.scayt(t);a.afterMarkupRemove.push(function(e){new CKEDITOR.dom.element(e,a.document).mergeSiblings()}),(t=i.instances[o.name])&&(a.sLang=t.sLang,a.option(t.option()),a.paused=t.paused),i.instances[o.name]=a;try{a.setDisabled(!1===i.isPaused(o))}catch(s){}o.fire("showScaytState")}};o.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?e():o.on("contentDom",a),o.on("contentDomUnload",function(){for(var e=CKEDITOR.document.getElementsByTag("script"),t=/^dojoIoScript(d+)$/i,n=/^https?://svc.webspellchecker.net/spellcheck/script/ssrv.cgi/i,i=0;i<e.count();i++){var o=e.getItem(i),a=o.getId(),s=o.getAttribute("src");a&&s&&a.match(t)&&s.match(n)&&o.remove()}}),o.on("beforeCommandExec",function(e){"source"==e.data.name&&"source"==o.mode&&i.markControlRestore(o)}),o.on("afterCommandExec",function(e){i.isScaytEnabled(o)&&"wysiwyg"==o.mode&&("undo"==e.data.name||"redo"==e.data.name)&&window.setTimeout(function(){i.getScayt(o).refresh()},10)}),o.on("destroy",n),o.on("setData",n),o.on("insertElement",function(){var e=i.getScayt(o);i.isScaytEnabled(o)&&(CKEDITOR.env.ie&&o.getSelection().unlock(!0),window.setTimeout(function(){e.focus(),e.refresh()},10))},this,null,50),o.on("insertHtml",function(){var e=i.getScayt(o);i.isScaytEnabled(o)&&(CKEDITOR.env.ie&&o.getSelection().unlock(!0),window.setTimeout(function(){e.focus(),e.refresh()},10))},this,null,50),o.on("scaytDialog",function(e){e.data.djConfig=window.djConfig,e.data.scayt_control=i.getScayt(o),e.data.tab=t,e.data.scayt=window.scayt});var s=o.dataProcessor;(s=s&&s.htmlFilter)&&s.addRules({elements:{span:function(e){return e.attributes["data-scayt_word"]&&e.attributes["data-scaytid"]?(delete e.name,e):void 0}}}),s=CKEDITOR.plugins.undo.Image.prototype,s.equals=CKEDITOR.tools.override(s.equals,function(e){return function(t){var n=this.contents,o=t.contents,a=i.getScayt(this.editor);return a&&i.isScaytReady(this.editor)&&(this.contents=a.reset(n)||"",t.contents=a.reset(o)||""),a=e.apply(this,arguments),this.contents=n,t.contents=o,a}}),o.document&&(o.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE||o.focusManager.hasFocus)&&a()};CKEDITOR.plugins.scayt={engineLoaded:!1,instances:{},controlInfo:{},setControlInfo:function(e,t){e&&e.name&&"object"!=typeof this.controlInfo[e.name]&&(this.controlInfo[e.name]={});for(var n in t)this.controlInfo[e.name][n]=t[n]},isControlRestored:function(e){return e&&e.name&&this.controlInfo[e.name]?this.controlInfo[e.name].restored:!1},markControlRestore:function(e){this.setControlInfo(e,{restored:!0})},setControlId:function(e,t){this.setControlInfo(e,{id:t})},getControlId:function(e){return e&&e.name&&this.controlInfo[e.name]&&this.controlInfo[e.name].id?this.controlInfo[e.name].id:null},setPaused:function(e,t){this.setControlInfo(e,{paused:t})},isPaused:function(e){return e&&e.name&&this.controlInfo[e.name]?this.controlInfo[e.name].paused:void 0},getScayt:function(e){return this.instances[e.name]},isScaytReady:function(e){return!0===this.engineLoaded&&"undefined"!=typeof window.scayt&&this.getScayt(e)},isScaytEnabled:function(e){return(e=this.getScayt(e))?!1===e.disabled:!1},getUiTabs:function(e){var t=[],n=e.config.scayt_uiTabs||"1,1,1",n=n.split(",");n[3]="1";for(var i=0;4>i;i++)t[i]="undefined"!=typeof window.scayt&&"undefined"!=typeof window.scayt.uiTags?parseInt(n[i],10)&&window.scayt.uiTags[i]:parseInt(n[i],10);return"object"==typeof e.plugins.wsc?t.push(1):t.push(0),t},loadEngine:function(e){if(CKEDITOR.env.gecko&&10900>CKEDITOR.env.version||CKEDITOR.env.opera||CKEDITOR.env.air)return e.fire("showScaytState");if(!0===this.engineLoaded)return n.apply(e);if(-1==this.engineLoaded)return CKEDITOR.on("scaytReady",function(){n.apply(e)});CKEDITOR.on("scaytReady",n,e),CKEDITOR.on("scaytReady",function(){this.engineLoaded=!0},this,null,0),this.engineLoaded=-1;var t=document.location.protocol,t=-1!=t.search(/https?:/)?t:"http:",t=e.config.scayt_srcUrl||t+"//svc.webspellchecker.net/scayt26/loader__base.js",o=i.parseUrl(t).path+"/";return void 0==window.scayt?(CKEDITOR._djScaytConfig={baseUrl:o,addOnLoad:[function(){CKEDITOR.fireOnce("scaytReady")}],isDebug:!1},CKEDITOR.document.getHead().append(CKEDITOR.document.createElement("script",{attributes:{type:"text/javascript",async:"true",src:t}}))):CKEDITOR.fireOnce("scaytReady"),null},parseUrl:function(e){var t;return e.match&&(t=e.match(/(.*)[/\](.*?.w+)$/))?{path:t[1],file:t[2]}:e}};var i=CKEDITOR.plugins.scayt,o=function(e,t,n,i,o,a,s){e.addCommand(i,o),e.addMenuItem(i,{label:n,command:i,group:a,order:s})},a={preserveState:!0,editorFocus:!1,canUndo:!1,exec:function(e){if(i.isScaytReady(e)){var t=i.isScaytEnabled(e);this.setState(t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_ON),e=i.getScayt(e),e.focus(),e.setDisabled(t)}else!e.config.scayt_autoStartup&&0<=i.engineLoaded&&(e.focus(),this.setState(CKEDITOR.TRISTATE_DISABLED),i.loadEngine(e))}};CKEDITOR.plugins.add("scayt",{requires:"menubutton,dialog",beforeInit:function(e){var t=e.config.scayt_contextMenuItemsOrder||"suggest|moresuggest|control",n="";if((t=t.split("|"))&&t.length)for(var i=0;i<t.length;i++)n+="scayt_"+t[i]+(t.length!=parseInt(i,10)+1?",":"");e.config.menu_groups=n+","+e.config.menu_groups},init:function(n){var s=n.dataProcessor&&n.dataProcessor.dataFilter,r={elements:{span:function(e){var t=e.attributes;t&&t["data-scaytid"]&&delete e.name}}};s&&s.addRules(r);var l={},c={},d=n.addCommand("scaytcheck",a);CKEDITOR.dialog.add("scaytcheck",CKEDITOR.getUrl(this.path+"dialogs/options.js")),s=i.getUiTabs(n),n.addMenuGroup("scaytButton"),n.addMenuGroup("scayt_suggest",-10),n.addMenuGroup("scayt_moresuggest",-9),n.addMenuGroup("scayt_control",-8);var r={},u=n.lang.scayt;r.scaytToggle={label:u.enable,command:"scaytcheck",group:"scaytButton"},1==s[0]&&(r.scaytOptions={label:u.options,group:"scaytButton",onClick:function(){t="options",n.openDialog("scaytcheck")}}),1==s[1]&&(r.scaytLangs={label:u.langs,group:"scaytButton",onClick:function(){t="langs",n.openDialog("scaytcheck")}}),1==s[2]&&(r.scaytDict={label:u.dictionariesTab,group:"scaytButton",onClick:function(){t="dictionaries",n.openDialog("scaytcheck")}}),r.scaytAbout={label:n.lang.scayt.about,group:"scaytButton",onClick:function(){t="about",n.openDialog("scaytcheck")}},1==s[4]&&(r.scaytWSC={label:n.lang.wsc.toolbar,group:"scaytButton",command:"checkspell"}),n.addMenuItems(r),n.ui.add("Scayt",CKEDITOR.UI_MENUBUTTON,{label:u.title,title:CKEDITOR.env.opera?u.opera_title:u.title,modes:{wysiwyg:1},toolbar:"spellchecker,20",onRender:function(){d.on("state",function(){this.setState(d.state)},this)},onMenu:function(){var e=i.isScaytEnabled(n);n.getMenuItem("scaytToggle").label=u[e?"disable":"enable"];var t=i.getUiTabs(n);return{scaytToggle:CKEDITOR.TRISTATE_OFF,scaytOptions:e&&t[0]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytLangs:e&&t[1]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytDict:e&&t[2]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytAbout:e&&t[3]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytWSC:t[4]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}}}),n.contextMenu&&n.addMenuItems&&n.contextMenu.addListener(function(t,a){if(!i.isScaytEnabled(n)||a.getRanges()[0].checkReadOnly())return null;var s=i.getScayt(n),r=s.getScaytNode();if(!r)return null;var d=s.getWord(r);if(!d)return null;var h,f=s.getLang(),m=n.config.scayt_contextCommands||"all",d=window.scayt.getSuggestion(d,f),m=m.split("|");for(h in l)delete n._.menuItems[h],delete n.commands[h];for(h in c)delete n._.menuItems[h],delete n.commands[h];if(d&&d.length){l={},c={},h=n.config.scayt_moreSuggestions||"on";var f=!1,p=n.config.scayt_maxSuggestions;"number"!=typeof p&&(p=5),!p&&(p=d.length);for(var g=0,E=d.length;E>g;g+=1){var v="scayt_suggestion_"+d[g].replace(" ","_"),T=function(e,t){return{exec:function(){s.replace(e,t)}}}(r,d[g]);p>g?(o(n,"button_"+v,d[g],v,T,"scayt_suggest",g+1),c[v]=CKEDITOR.TRISTATE_OFF):"on"==h&&(o(n,"button_"+v,d[g],v,T,"scayt_moresuggest",g+1),l[v]=CKEDITOR.TRISTATE_OFF,f=!0)}f&&(n.addMenuItem("scayt_moresuggest",{label:u.moreSuggestions,group:"scayt_moresuggest",order:10,getItems:function(){return l}}),c.scayt_moresuggest=CKEDITOR.TRISTATE_OFF)}else o(n,"no_sugg",u.noSuggestions,"scayt_no_sugg",{exec:function(){}},"scayt_control",1,!0),c.scayt_no_sugg=CKEDITOR.TRISTATE_OFF;return(e("all",m)||e("ignore",m))&&(o(n,"ignore",u.ignore,"scayt_ignore",{exec:function(){s.ignore(r)}},"scayt_control",2),c.scayt_ignore=CKEDITOR.TRISTATE_OFF),(e("all",m)||e("ignoreall",m))&&(o(n,"ignore_all",u.ignoreAll,"scayt_ignore_all",{exec:function(){s.ignoreAll(r)}},"scayt_control",3),c.scayt_ignore_all=CKEDITOR.TRISTATE_OFF),(e("all",m)||e("add",m))&&(o(n,"add_word",u.addWord,"scayt_add_word",{exec:function(){window.scayt.addWordToUserDictionary(r)}},"scayt_control",4),c.scayt_add_word=CKEDITOR.TRISTATE_OFF),s.fireOnContextMenu&&s.fireOnContextMenu(n),c}),s=function(e){e.removeListener(),CKEDITOR.env.opera||CKEDITOR.env.air?d.setState(CKEDITOR.TRISTATE_DISABLED):d.setState(i.isScaytEnabled(n)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},n.on("showScaytState",s),n.on("instanceReady",s),n.config.scayt_autoStartup&&n.on("instanceReady",function(){i.loadEngine(n)})},afterInit:function(e){var t,n=function(e){return e.hasAttribute("data-scaytid")?!1:void 0};e._.elementsPath&&(t=e._.elementsPath.filters)&&t.push(n),e.addRemoveFormatFilter&&e.addRemoveFormatFilter(n)}})}(),function(){function e(e,t){var n=e.type,i=t.type;return n==i?0:n==CKEDITOR.STYLE_OBJECT?-1:i==CKEDITOR.STYLE_OBJECT?1:i==CKEDITOR.STYLE_BLOCK?1:-1}CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(t){function n(n){t.getStylesSet(function(i){if(!r.length){for(var a,l,c=0,d=i.length;d>c;c++)a=i[c],t.blockless&&a.element in CKEDITOR.dtd.$block||(l=a.name,a=s[l]=new CKEDITOR.style(a),a._name=l,a._.enterMode=o.enterMode,r.push(a));r.sort(e)}n&&n()})}var i,o=t.config,a=t.lang.stylescombo,s={},r=[];t.ui.addRichCombo("Styles",{label:a.label,title:a.panelTitle,toolbar:"styles,10",panel:{css:[CKEDITOR.skin.getPath("editor")].concat(o.contentsCss),multiSelect:!0,attributes:{"aria-label":a.panelTitle}},init:function(){i=this,n(function(){var e,t,n,o,s,l;for(s=0,l=r.length;l>s;s++)e=r[s],t=e._name,o=e.type,o!=n&&(i.startGroup(a["panelTitle"+o]),n=o),i.add(t,e.type==CKEDITOR.STYLE_OBJECT?t:e.buildPreview(),t);i.commit()})},onClick:function(e){t.focus(),t.fire("saveSnapshot");var e=s[e],n=t.elementPath();t[e.checkActive(n)?"removeStyle":"applyStyle"](e),t.fire("saveSnapshot")},onRender:function(){t.on("selectionChange",function(e){for(var t,n=this.getValue(),e=e.data.path.elements,i=0,o=e.length;o>i;i++){t=e[i];
for(var a in s)if(s[a].checkElementRemovable(t,!0))return a!=n&&this.setValue(a),void 0}this.setValue("")},this)},onOpen:function(){var e=t.getSelection().getSelectedElement(),e=t.elementPath(e),n=[0,0,0,0];this.showAll(),this.unmarkAll();for(var i in s){var o=s[i],r=o.type;r!=CKEDITOR.STYLE_BLOCK||e.isContextFor(o.element)?(o.checkActive(e)?this.mark(i):r==CKEDITOR.STYLE_OBJECT&&!o.checkApplicable(e)&&(this.hideItem(i),n[r]--),n[r]++):this.hideItem(i)}n[CKEDITOR.STYLE_BLOCK]||this.hideGroup(a["panelTitle"+CKEDITOR.STYLE_BLOCK]),n[CKEDITOR.STYLE_INLINE]||this.hideGroup(a["panelTitle"+CKEDITOR.STYLE_INLINE]),n[CKEDITOR.STYLE_OBJECT]||this.hideGroup(a["panelTitle"+CKEDITOR.STYLE_OBJECT])},reset:function(){i&&(delete i._.panel,delete i._.list,i._.committed=0,i._.items={},i._.state=CKEDITOR.TRISTATE_OFF),s={},r=[],n()}}),t.on("instanceReady",function(){n()})}})}(),function(){function e(e){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(t){if(t.editable().hasFocus){var n,i=t.getSelection();if(n=new CKEDITOR.dom.elementPath(i.getCommonAncestor(),i.root).contains({td:1,th:1},1)){var i=t.createRange(),o=CKEDITOR.tools.tryThese(function(){var t=n.getParent().$.cells[n.$.cellIndex+(e?-1:1)];return t.parentNode.parentNode,t},function(){var t=n.getParent(),t=t.getAscendant("table").$.rows[t.$.rowIndex+(e?-1:1)];return t.cells[e?t.cells.length-1:0]});if(o||e){if(!o)return!0;o=new CKEDITOR.dom.element(o),i.moveToElementEditStart(o),(!i.checkStartOfBlock()||!i.checkEndOfBlock())&&i.selectNodeContents(o)}else{for(var a=n.getAscendant("table").$,o=n.getParent().$.cells,a=new CKEDITOR.dom.element(a.insertRow(-1),t.document),s=0,r=o.length;r>s;s++){var l=a.append(new CKEDITOR.dom.element(o[s],t.document).clone(!1,!1));!CKEDITOR.env.ie&&l.appendBogus()}i.moveToElementEditStart(a)}return i.select(!0),!0}}return!1}}}var t={editorFocus:!1,modes:{wysiwyg:1,source:1}},n={exec:function(e){e.container.focusNext(!0,e.tabIndex)}},i={exec:function(e){e.container.focusPrevious(!0,e.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(o){for(var a=!1!==o.config.enableTabKeyTools,s=o.config.tabSpaces||0,r="";s--;)r+=" ";r&&o.on("key",function(e){9==e.data.keyCode&&(o.insertHtml(r),e.cancel())}),a&&o.on("key",function(e){(9==e.data.keyCode&&o.execCommand("selectNextCell")||e.data.keyCode==CKEDITOR.SHIFT+9&&o.execCommand("selectPreviousCell"))&&e.cancel()}),o.addCommand("blur",CKEDITOR.tools.extend(n,t)),o.addCommand("blurBack",CKEDITOR.tools.extend(i,t)),o.addCommand("selectNextCell",e()),o.addCommand("selectPreviousCell",e(!0))}})}(),CKEDITOR.dom.element.prototype.focusNext=function(e,t){var n,i,o,a,s,r,l=void 0===t?this.getTabIndex():t;if(0>=l)for(s=this.getNextSourceNode(e,CKEDITOR.NODE_ELEMENT);s;){if(s.isVisible()&&0===s.getTabIndex()){o=s;break}s=s.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(s=this.getDocument().getBody().getFirst();s=s.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!n)if(!i&&s.equals(this)){if(i=!0,e){if(!(s=s.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;n=1}}else i&&!this.contains(s)&&(n=1);if(s.isVisible()&&!(0>(r=s.getTabIndex()))){if(n&&r==l){o=s;break}r>l&&(!o||!a||a>r)?(o=s,a=r):!o&&0===r&&(o=s,a=r)}}o&&o.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(e,t){for(var n,i,o,a,s=void 0===t?this.getTabIndex():t,r=0,l=this.getDocument().getBody().getLast();l=l.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!n)if(!i&&l.equals(this)){if(i=!0,e){if(!(l=l.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;n=1}}else i&&!this.contains(l)&&(n=1);if(l.isVisible()&&!(0>(a=l.getTabIndex())))if(0>=s){if(n&&0===a){o=l;break}a>r&&(o=l,r=a)}else{if(n&&a==s){o=l;break}s>a&&(!o||a>r)&&(o=l,r=a)}}o&&o.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(e){function t(e){return CKEDITOR.tools.extend(e||{},{contextSensitive:1,refresh:function(e,t){this.setState(t.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!e.blockless){var n=e.lang.table;e.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table"})),e.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",t())),e.addCommand("tableDelete",t({exec:function(e){var t=e.elementPath().contains("table",1);if(t){var n=t.getParent();1==n.getChildCount()&&!n.is("body","td","th")&&(t=n),e=e.createRange(),e.moveToPosition(t,CKEDITOR.POSITION_BEFORE_START),t.remove(),e.select()}}})),e.ui.addButton&&e.ui.addButton("Table",{label:n.toolbar,command:"table",toolbar:"insert,30"}),CKEDITOR.dialog.add("table",this.path+"dialogs/table.js"),CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js"),e.addMenuItems&&e.addMenuItems({table:{label:n.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:n.deleteTable,command:"tableDelete",group:"table",order:1}}),e.on("doubleclick",function(e){e.data.element.is("table")&&(e.data.dialog="tableProperties")}),e.contextMenu&&e.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function e(e){function t(e){!(0<n.length)&&e.type==CKEDITOR.NODE_ELEMENT&&h.test(e.getName())&&!e.getCustomData("selected_cell")&&(CKEDITOR.dom.element.setMarker(i,e,"selected_cell",!0),n.push(e))}for(var e=e.getRanges(),n=[],i={},o=0;o<e.length;o++){var a=e[o];if(a.collapsed)a=a.getCommonAncestor(),(a=a.getAscendant("td",!0)||a.getAscendant("th",!0))&&n.push(a);else{var s,a=new CKEDITOR.dom.walker(a);for(a.guard=t;s=a.next();)s.type==CKEDITOR.NODE_ELEMENT&&s.is(CKEDITOR.dtd.table)||(s=s.getAscendant("td",!0)||s.getAscendant("th",!0))&&!s.getCustomData("selected_cell")&&(CKEDITOR.dom.element.setMarker(i,s,"selected_cell",!0),n.push(s))}}return CKEDITOR.dom.element.clearAllMarkers(i),n}function t(t,n){for(var i=e(t),o=i[0],a=o.getAscendant("table"),o=o.getDocument(),s=i[0].getParent(),r=s.$.rowIndex,i=i[i.length-1],l=i.getParent().$.rowIndex+i.$.rowSpan-1,i=new CKEDITOR.dom.element(a.$.rows[l]),r=n?r:l,s=n?s:i,i=CKEDITOR.tools.buildTableMap(a),a=i[r],r=n?i[r-1]:i[r+1],i=i[0].length,o=o.createElement("tr"),l=0;a[l]&&i>l;l++){var c;1<a[l].rowSpan&&r&&a[l]==r[l]?(c=a[l],c.rowSpan+=1):(c=new CKEDITOR.dom.element(a[l]).clone(),c.removeAttribute("rowSpan"),!CKEDITOR.env.ie&&c.appendBogus(),o.append(c),c=c.$),l+=c.colSpan-1}n?o.insertBefore(s):o.insertAfter(s)}function n(t){if(t instanceof CKEDITOR.dom.selection){for(var i=e(t),o=i[0].getAscendant("table"),a=CKEDITOR.tools.buildTableMap(o),t=i[0].getParent().$.rowIndex,i=i[i.length-1],s=i.getParent().$.rowIndex+i.$.rowSpan-1,i=[],r=t;s>=r;r++){for(var l=a[r],c=new CKEDITOR.dom.element(o.$.rows[r]),d=0;d<l.length;d++){var u=new CKEDITOR.dom.element(l[d]),h=u.getParent().$.rowIndex;1==u.$.rowSpan?u.remove():(u.$.rowSpan-=1,h==r&&(h=a[r+1],h[d-1]?u.insertAfter(new CKEDITOR.dom.element(h[d-1])):new CKEDITOR.dom.element(o.$.rows[r+1]).append(u,1))),d+=u.$.colSpan-1}i.push(c)}for(a=o.$.rows,o=new CKEDITOR.dom.element(a[s+1]||(t>0?a[t-1]:null)||o.$.parentNode),r=i.length;r>=0;r--)n(i[r]);return o}return t instanceof CKEDITOR.dom.element&&(o=t.getAscendant("table"),1==o.$.rows.length?o.remove():t.remove()),null}function i(e,t){for(var n=t?1/0:0,i=0;i<e.length;i++){var o;o=e[i];for(var a=t,s=o.getParent().$.cells,r=0,l=0;l<s.length;l++){var c=s[l],r=r+(a?1:c.colSpan);if(c==o.$)break}o=r-1,(t?n>o:o>n)&&(n=o)}return n}function o(t,n){for(var o=e(t),a=o[0].getAscendant("table"),s=i(o,1),o=i(o),s=n?s:o,r=CKEDITOR.tools.buildTableMap(a),a=[],o=[],l=r.length,c=0;l>c;c++)a.push(r[c][s]),o.push(n?r[c][s-1]:r[c][s+1]);for(c=0;l>c;c++)a[c]&&(1<a[c].colSpan&&o[c]==a[c]?(s=a[c],s.colSpan+=1):(s=new CKEDITOR.dom.element(a[c]).clone(),s.removeAttribute("colSpan"),!CKEDITOR.env.ie&&s.appendBogus(),s[n?"insertBefore":"insertAfter"].call(s,new CKEDITOR.dom.element(a[c])),s=s.$),c+=s.rowSpan-1)}function a(e,t){var n=e.getStartElement();if(n=n.getAscendant("td",1)||n.getAscendant("th",1)){var i=n.clone();CKEDITOR.env.ie||i.appendBogus(),t?i.insertBefore(n):i.insertAfter(n)}}function s(t){if(t instanceof CKEDITOR.dom.selection){var n,t=e(t),i=t[0]&&t[0].getAscendant("table");e:{var o=0;n=t.length-1;for(var a,l,c={};a=t[o++];)CKEDITOR.dom.element.setMarker(c,a,"delete_cell",!0);for(o=0;a=t[o++];)if((l=a.getPrevious())&&!l.getCustomData("delete_cell")||(l=a.getNext())&&!l.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(c),n=l;break e}CKEDITOR.dom.element.clearAllMarkers(c),l=t[0].getParent(),(l=l.getPrevious())?n=l.getLast():(l=t[n].getParent(),n=(l=l.getNext())?l.getChild(0):null)}for(l=t.length-1;l>=0;l--)s(t[l]);n?r(n,!0):i&&i.remove()}else t instanceof CKEDITOR.dom.element&&(i=t.getParent(),1==i.getChildCount()?i.remove():t.remove())}function r(e,t){var n=new CKEDITOR.dom.range(e.getDocument());n["moveToElementEdit"+(t?"End":"Start")](e)||(n.selectNodeContents(e),n.collapse(t?!1:!0)),n.select(!0)}function l(e,t,n){if(e=e[t],"undefined"==typeof n)return e;for(t=0;e&&t<e.length;t++){if(n.is&&e[t]==n.$)return t;if(t==n)return new CKEDITOR.dom.element(e[t])}return n.is?-1:null}function c(t,n,i){var o,a=e(t);if((n?1!=a.length:2>a.length)||(o=t.getCommonAncestor())&&o.type==CKEDITOR.NODE_ELEMENT&&o.is("table"))return!1;var s,t=a[0];o=t.getAscendant("table");var r=CKEDITOR.tools.buildTableMap(o),c=r.length,d=r[0].length,u=t.getParent().$.rowIndex,h=l(r,u,t);if(n){var f;try{var m=parseInt(t.getAttribute("rowspan"),10)||1;s=parseInt(t.getAttribute("colspan"),10)||1,f=r["up"==n?u-m:"down"==n?u+m:u]["left"==n?h-s:"right"==n?h+s:h]}catch(p){return!1}if(!f||t.$==f)return!1;a["up"==n||"left"==n?"unshift":"push"](new CKEDITOR.dom.element(f))}for(var n=t.getDocument(),g=u,m=f=0,E=!i&&new CKEDITOR.dom.documentFragment(n),v=0,n=0;n<a.length;n++){s=a[n];var T=s.getParent(),C=s.getFirst(),I=s.$.colSpan,b=s.$.rowSpan,T=T.$.rowIndex,y=l(r,T,s),v=v+I*b,m=Math.max(m,y-h+I);f=Math.max(f,T-u+b),i||(I=s,(b=I.getBogus())&&b.remove(),I.trim(),s.getChildren().count()&&(T==g||!C||C.isBlockBoundary&&C.isBlockBoundary({br:1})||(g=E.getLast(CKEDITOR.dom.walker.whitespaces(!0)))&&(!g.is||!g.is("br"))&&E.append("br"),s.moveChildren(E)),n?s.remove():s.setHtml("")),g=T}if(i)return f*m==v;for(E.moveChildren(t),CKEDITOR.env.ie||t.appendBogus(),m>=d?t.removeAttribute("rowSpan"):t.$.rowSpan=f,f>=c?t.removeAttribute("colSpan"):t.$.colSpan=m,i=new CKEDITOR.dom.nodeList(o.$.rows),a=i.count(),n=a-1;n>=0;n--)o=i.getItem(n),o.$.cells.length||(o.remove(),a++);return t}function d(t,n){var i=e(t);if(1<i.length)return!1;if(n)return!0;var o,i=i[0],a=i.getParent(),s=a.getAscendant("table"),r=CKEDITOR.tools.buildTableMap(s),c=a.$.rowIndex,d=l(r,c,i),u=i.$.rowSpan;if(u>1){o=Math.ceil(u/2);for(var h,u=Math.floor(u/2),a=c+o,s=new CKEDITOR.dom.element(s.$.rows[a]),r=l(r,a),a=i.clone(),c=0;c<r.length;c++){if(h=r[c],h.parentNode==s.$&&c>d){a.insertBefore(new CKEDITOR.dom.element(h));break}h=null}h||s.append(a,!0)}else for(u=o=1,s=a.clone(),s.insertAfter(a),s.append(a=i.clone()),h=l(r,c),d=0;d<h.length;d++)h[d].rowSpan++;return CKEDITOR.env.ie||a.appendBogus(),i.$.rowSpan=o,a.$.rowSpan=u,1==o&&i.removeAttribute("rowSpan"),1==u&&a.removeAttribute("rowSpan"),a}function u(t,n){var i=e(t);if(1<i.length)return!1;if(n)return!0;var i=i[0],o=i.getParent(),a=o.getAscendant("table"),a=CKEDITOR.tools.buildTableMap(a),s=l(a,o.$.rowIndex,i),r=i.$.colSpan;if(r>1)o=Math.ceil(r/2),r=Math.floor(r/2);else{for(var r=o=1,c=[],d=0;d<a.length;d++){var u=a[d];c.push(u[s]),1<u[s].rowSpan&&(d+=u[s].rowSpan-1)}for(a=0;a<c.length;a++)c[a].colSpan++}return a=i.clone(),a.insertAfter(i),CKEDITOR.env.ie||a.appendBogus(),i.$.colSpan=o,a.$.colSpan=r,1==o&&i.removeAttribute("colSpan"),1==r&&a.removeAttribute("colSpan"),a}var h=/^(?:td|th)$/;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(i){function l(e){return CKEDITOR.tools.extend(e||{},{contextSensitive:1,refresh:function(e,t){this.setState(t.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}var h=i.lang.table;i.addCommand("cellProperties",new CKEDITOR.dialogCommand("cellProperties",l())),CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js"),i.addCommand("rowDelete",l({exec:function(e){e=e.getSelection(),r(n(e))}})),i.addCommand("rowInsertBefore",l({exec:function(e){e=e.getSelection(),t(e,!0)}})),i.addCommand("rowInsertAfter",l({exec:function(e){e=e.getSelection(),t(e)}})),i.addCommand("columnDelete",l({exec:function(t){for(var n,i,t=t.getSelection(),t=e(t),o=t[0],a=t[t.length-1],t=o.getAscendant("table"),s=CKEDITOR.tools.buildTableMap(t),l=[],c=0,d=s.length;d>c;c++)for(var u=0,h=s[c].length;h>u;u++)s[c][u]==o.$&&(n=u),s[c][u]==a.$&&(i=u);for(c=n;i>=c;c++)for(u=0;u<s.length;u++)a=s[u],o=new CKEDITOR.dom.element(t.$.rows[u]),a=new CKEDITOR.dom.element(a[c]),a.$&&(1==a.$.colSpan?a.remove():a.$.colSpan-=1,u+=a.$.rowSpan-1,o.$.cells.length||l.push(o));i=t.$.rows[0]&&t.$.rows[0].cells,n=new CKEDITOR.dom.element(i[n]||(n?i[n-1]:t.$.parentNode)),l.length==d&&t.remove(),n&&r(n,!0)}})),i.addCommand("columnInsertBefore",l({exec:function(e){e=e.getSelection(),o(e,!0)}})),i.addCommand("columnInsertAfter",l({exec:function(e){e=e.getSelection(),o(e)}})),i.addCommand("cellDelete",l({exec:function(e){e=e.getSelection(),s(e)}})),i.addCommand("cellMerge",l({exec:function(e){r(c(e.getSelection()),!0)}})),i.addCommand("cellMergeRight",l({exec:function(e){r(c(e.getSelection(),"right"),!0)}})),i.addCommand("cellMergeDown",l({exec:function(e){r(c(e.getSelection(),"down"),!0)}})),i.addCommand("cellVerticalSplit",l({exec:function(e){r(d(e.getSelection()))}})),i.addCommand("cellHorizontalSplit",l({exec:function(e){r(u(e.getSelection()))}})),i.addCommand("cellInsertBefore",l({exec:function(e){e=e.getSelection(),a(e,!0)}})),i.addCommand("cellInsertAfter",l({exec:function(e){e=e.getSelection(),a(e)}})),i.addMenuItems&&i.addMenuItems({tablecell:{label:h.cell.menu,group:"tablecell",order:1,getItems:function(){var t=i.getSelection(),n=e(t);return{tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:c(t,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:c(t,"right",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:c(t,"down",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:d(t,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:u(t,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_properties:0<n.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}}},tablecell_insertBefore:{label:h.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:h.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:h.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:h.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:h.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:h.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:h.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:h.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:h.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:h.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:h.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:h.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:h.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:h.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:h.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:h.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:h.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}}),i.contextMenu&&i.contextMenu.addListener(function(e,t,n){return(e=n.contains({td:1,th:1},1))&&!e.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getSelectedCells:e},CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(e){for(var e=e.$.rows,t=-1,n=[],i=0;i<e.length;i++){t++,!n[t]&&(n[t]=[]);for(var o=-1,a=0;a<e[i].cells.length;a++){var s=e[i].cells[a];for(o++;n[t][o];)o++;for(var r=isNaN(s.colSpan)?1:s.colSpan,s=isNaN(s.rowSpan)?1:s.rowSpan,l=0;s>l;l++){n[t+l]||(n[t+l]=[]);for(var c=0;r>c;c++)n[t+l][o+c]=e[i].cells[a]}o+=r-1}}return n},function(){function e(e){this.editor=e,this.reset()}CKEDITOR.plugins.add("undo",{init:function(t){function n(e){i.enabled&&!1!==e.data.command.canUndo&&i.save()}var i=new e(t),o=t.addCommand("undo",{exec:function(){i.undo()&&(t.selectionChange(),this.fire("afterUndo"))},state:CKEDITOR.TRISTATE_DISABLED,canUndo:!1}),a=t.addCommand("redo",{exec:function(){i.redo()&&(t.selectionChange(),this.fire("afterRedo"))},state:CKEDITOR.TRISTATE_DISABLED,canUndo:!1});t.setKeystroke([[CKEDITOR.CTRL+90,"undo"],[CKEDITOR.CTRL+89,"redo"],[CKEDITOR.CTRL+CKEDITOR.SHIFT+90,"redo"]]),i.onChange=function(){o.setState(i.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),a.setState(i.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)},t.on("beforeCommandExec",n),t.on("afterCommandExec",n),t.on("saveSnapshot",function(e){i.save(e.data&&e.data.contentOnly)}),t.on("contentDom",function(){t.editable().on("keydown",function(e){!e.data.$.ctrlKey&&!e.data.$.metaKey&&i.type(e)})}),t.on("beforeModeUnload",function(){"wysiwyg"==t.mode&&i.save(!0)}),t.on("mode",function(){i.enabled=t.readOnly?!1:"wysiwyg"==t.mode,i.onChange()}),t.ui.addButton&&(t.ui.addButton("Undo",{label:t.lang.undo.undo,command:"undo",toolbar:"undo,10"}),t.ui.addButton("Redo",{label:t.lang.undo.redo,command:"redo",toolbar:"undo,20"})),t.resetUndo=function(){i.reset(),t.fire("saveSnapshot")},t.on("updateSnapshot",function(){i.currentImage&&i.update()}),t.on("lockSnapshot",i.lock,i),t.on("unlockSnapshot",i.unlock,i)}}),CKEDITOR.plugins.undo={};var t=CKEDITOR.plugins.undo.Image=function(e){this.editor=e,e.fire("beforeUndoImage");var t=e.getSnapshot(),n=t&&e.getSelection();CKEDITOR.env.ie&&t&&(t=t.replace(/s+data-cke-expando=".*?"/g,"")),this.contents=t,this.bookmarks=n&&n.createBookmarks2(!0),e.fire("afterUndoImage")},n=/b(?:href|src|name)="[^"]*?"/gi;t.prototype={equals:function(e,t){var i=this.contents,o=e.contents;if(CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&(i=i.replace(n,""),o=o.replace(n,"")),i!=o)return!1;if(t)return!0;if(i=this.bookmarks,o=e.bookmarks,i||o){if(!i||!o||i.length!=o.length)return!1;for(var a=0;a<i.length;a++){var s=i[a],r=o[a];if(s.startOffset!=r.startOffset||s.endOffset!=r.endOffset||!CKEDITOR.tools.arrayCompare(s.start,r.start)||!CKEDITOR.tools.arrayCompare(s.end,r.end))return!1}}return!0}};var i={8:1,46:1},o={16:1,17:1,18:1},a={37:1,38:1,39:1,40:1};e.prototype={type:function(e){var e=e&&e.data.getKey(),n=e in i,s=this.lastKeystroke in i,r=n&&e==this.lastKeystroke,l=e in a,c=this.lastKeystroke in a;if(!(e in o||this.typing)||!n&&!l&&(s||c)||n&&!r){var d=new t(this.editor),u=this.snapshots.length;CKEDITOR.tools.setTimeout(function(){var e=this.editor.getSnapshot();CKEDITOR.env.ie&&(e=e.replace(/s+data-cke-expando=".*?"/g,"")),d.contents!=e&&u==this.snapshots.length&&(this.typing=!0,this.save(!1,d,!1)||this.snapshots.splice(this.index+1,this.snapshots.length-this.index-1),this.hasUndo=!0,this.hasRedo=!1,this.modifiersCount=this.typesCount=1,this.onChange())},0,this)}this.lastKeystroke=e,n?(this.typesCount=0,this.modifiersCount++,25<this.modifiersCount&&(this.save(!1,null,!1),this.modifiersCount=1)):l||(this.modifiersCount=0,this.typesCount++,25<this.typesCount&&(this.save(!1,null,!1),this.typesCount=1))},reset:function(){this.lastKeystroke=0,this.snapshots=[],this.index=-1,this.limit=this.editor.config.undoStackSize||20,this.currentImage=null,this.hasRedo=this.hasUndo=!1,this.locked=null,this.resetType()},resetType:function(){this.typing=!1,delete this.lastKeystroke,this.modifiersCount=this.typesCount=0},fireChange:function(){this.hasUndo=!!this.getNextImage(!0),this.hasRedo=!!this.getNextImage(!1),this.resetType(),this.onChange()},save:function(e,n,i){if(this.locked)return!1;var o=this.snapshots;return n||(n=new t(this.editor)),!1===n.contents||this.currentImage&&n.equals(this.currentImage,e)?!1:(o.splice(this.index+1,o.length-this.index-1),o.length==this.limit&&o.shift(),this.index=o.push(n)-1,this.currentImage=n,!1!==i&&this.fireChange(),!0)},restoreImage:function(e){var t,n=this.editor;e.bookmarks&&(n.focus(),t=n.getSelection()),this.locked=1,this.editor.loadSnapshot(e.contents),e.bookmarks?t.selectBookmarks(e.bookmarks):CKEDITOR.env.ie&&(n=this.editor.document.getBody().$.createTextRange(),n.collapse(!0),n.select()),this.locked=0,this.index=e.index,this.update(),this.fireChange()},getNextImage:function(e){var t,n=this.snapshots,i=this.currentImage;if(i)if(e){for(t=this.index-1;t>=0;t--)if(e=n[t],!i.equals(e,!0))return e.index=t,e}else for(t=this.index+1;t<n.length;t++)if(e=n[t],!i.equals(e,!0))return e.index=t,e;return null},redoable:function(){return this.enabled&&this.hasRedo},undoable:function(){return this.enabled&&this.hasUndo},undo:function(){if(this.undoable()){this.save(!0);var e=this.getNextImage(!0);if(e)return this.restoreImage(e),!0}return!1},redo:function(){if(this.redoable()&&(this.save(!0),this.redoable())){var e=this.getNextImage(!1);if(e)return this.restoreImage(e),!0}return!1},update:function(){this.locked||this.snapshots.splice(this.index,1,this.currentImage=new t(this.editor))},lock:function(){if(!this.locked){var e=this.editor.getSnapshot();this.locked={update:this.currentImage&&e==this.currentImage.contents?e:null}}},unlock:function(){if(this.locked){var e=this.locked.update,t=this.editor.getSnapshot();this.locked=null,"string"==typeof e&&t!=e&&this.update()}}}}(),CKEDITOR.plugins.add("wsc",{requires:"dialog",init:function(e){e.addCommand("checkspell",new CKEDITOR.dialogCommand("checkspell")).modes={wysiwyg:!CKEDITOR.env.opera&&!CKEDITOR.env.air&&document.domain==window.location.hostname},"undefined"==typeof e.plugins.scayt&&e.ui.addButton&&e.ui.addButton("SpellChecker",{label:e.lang.wsc.toolbar,command:"checkspell",toolbar:"spellchecker,10"}),CKEDITOR.dialog.add("checkspell",this.path+"dialogs/wsc.js")}}),CKEDITOR.config.wsc_customerId=CKEDITOR.config.wsc_customerId||"1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk",CKEDITOR.config.wsc_customLoaderScript=CKEDITOR.config.wsc_customLoaderScript||null,CKEDITOR.config.plugins="dialogui,dialog,about,a11yhelp,basicstyles,blockquote,clipboard,panel,floatpanel,menu,contextmenu,resize,button,toolbar,elementspath,list,indent,enterkey,entities,popup,filebrowser,floatingspace,listblock,richcombo,format,htmlwriter,horizontalrule,wysiwygarea,image,fakeobjects,link,magicline,maximize,pastetext,pastefromword,removeformat,sourcearea,specialchar,menubutton,scayt,stylescombo,tab,table,tabletools,undo,wsc",CKEDITOR.config.skin="moono",function(){for(var e="about,0,bold,32,italic,64,strike,96,subscript,128,superscript,160,underline,192,blockquote,224,copy-rtl,256,copy,288,cut-rtl,320,cut,352,paste-rtl,384,paste,416,bulletedlist-rtl,448,bulletedlist,480,numberedlist-rtl,512,numberedlist,544,indent-rtl,576,indent,608,outdent-rtl,640,outdent,672,horizontalrule,704,image,736,anchor-rtl,768,anchor,800,link,832,unlink,864,maximize,896,pastetext-rtl,928,pastetext,960,pastefromword-rtl,992,pastefromword,1024,removeformat,1056,source-rtl,1088,source,1120,specialchar,1152,scayt,1184,table,1216,redo-rtl,1248,redo,1280,undo-rtl,1312,undo,1344,spellchecker,1376",t=CKEDITOR.getUrl("plugins/icons.png"),e=e.split(","),n=0;n<e.length;n++)CKEDITOR.skin.icons[e[n]]={path:t,offset:-e[++n]}}(),CKEDITOR.lang.languages={af:1,ar:1,eu:1,bn:1,bs:1,bg:1,ca:1,"zh-cn":1,zh:1,hr:1,cs:1,da:1,nl:1,en:1,"en-au":1,"en-ca":1,"en-gb":1,eo:1,et:1,fo:1,fi:1,fr:1,"fr-ca":1,gl:1,ka:1,de:1,el:1,gu:1,he:1,hi:1,hu:1,is:1,it:1,ja:1,km:1,ko:1,ku:1,lv:1,lt:1,mk:1,ms:1,mn:1,no:1,nb:1,fa:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,sr:1,"sr-latn":1,sk:1,sl:1,es:1,sv:1,th:1,tr:1,ug:1,uk:1,vi:1,cy:1})}();
Онлайн: 0
Реклама