(function(){if(!window.CKEDITOR||!window.CKEDITOR.dom){window.CKEDITOR||(window.CKEDITOR=function(){var n={timestamp:"DAED",version:"4.3",revision:"d2184ac",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var n=window.CKEDITOR_BASEPATH||"",i,t,r;if(!n)for(i=document.getElementsByTagName("script"),t=0;t<i.length;t++)if(r=i[t].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i),r){n=r[1];break}if(-1==n.indexOf(":/")&&(n=0===n.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+n:location.href.match(/^[^\?]*\/(?:)/)[0]+n),!n)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return n}(),getUrl:function(n){return-1==n.indexOf(":/")&&0!==n.indexOf("/")&&(n=this.basePath+n),this.timestamp&&"/"!=n.charAt(n.length-1)&&!/[&?]t=/.test(n)&&(n+=(0<=n.indexOf("?")?"&":"?")+"t="+this.timestamp),n},domReady:function(){function n(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",n,!1),i()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",n),i())}catch(t){}}function i(){for(var n;n=t.shift();)n()}var t=[];return function(i){if(t.push(i),"complete"===document.readyState&&setTimeout(n,1),1==t.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",n);window.attachEvent("onload",n);i=!1;try{i=!window.frameElement}catch(u){}if(document.documentElement.doScroll&&i){var r=function(){try{document.documentElement.doScroll("left")}catch(t){setTimeout(r,1);return}n()};r()}}}}()},t=window.CKEDITOR_GETURL,i;return t&&(i=n.getUrl,n.getUrl=function(r){return t.call(n,r)||i.call(n,r)}),n}());CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(n){var i=CKEDITOR.event.prototype,t;for(t in i)n[t]==void 0&&(n[t]=i[t])},CKEDITOR.event.prototype=function(){function t(t){var r=n(this);return r[t]||(r[t]=new i(t))}var n=function(n){return n=n.getPrivate&&n.getPrivate()||n._||(n._={}),n.events||(n.events={})},i=function(n){this.name=n;this.listeners=[]};return i.prototype={getListenerIndex:function(n){for(var t=0,i=this.listeners;t<i.length;t++)if(i[t].fn==n)return t;return-1}},{define:function(n,i){var r=t.call(this,n);CKEDITOR.tools.extend(r,i,!0)},on:function(n,i,r,u,f){function s(t,f,e,o){return t={name:n,sender:this,editor:t,data:f,listenerData:u,stop:e,cancel:o,removeListener:h},i.call(r,t)===!1?!1:t.data}function h(){c.removeListener(n,i)}var e=t.call(this,n),c,o;if(e.getListenerIndex(i)<0){for(e=e.listeners,r||(r=this),isNaN(f)&&(f=10),c=this,s.fn=i,s.priority=f,o=e.length-1;o>=0;o--)if(e[o].priority<=f)return e.splice(o+1,0,s),{removeListener:h};e.unshift(s)}return{removeListener:h}},once:function(){var n=arguments[1];return arguments[1]=function(t){return t.removeListener(),n.apply(this,arguments)},this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var n=this.on.apply(this,arguments);return CKEDITOR.event.useCapture=0,n},fire:function(){var i=0,r=function(){i=1},t=0,u=function(){t=1};return function(f,e,o){var l=n(this)[f],f=i,a=t,s,h,c;if(i=t=0,l&&(s=l.listeners,s.length))for(s=s.slice(0),c=0;c<s.length;c++){if(l.errorProof)try{h=s[c].call(this,o,e,r,u)}catch(v){}else h=s[c].call(this,o,e,r,u);if(h===!1?t=1:typeof h!="undefined"&&(e=h),i||t)break}return e=t?!1:typeof e=="undefined"?!0:e,i=f,t=a,e}}(),fireOnce:function(t,i,r){return i=this.fire(t,i,r),delete n(this)[t],i},removeListener:function(t,i){var r=n(this)[t],u;r&&(u=r.getListenerIndex(i),u>=0&&r.listeners.splice(u,1))},removeAllListeners:function(){var t=n(this),i;for(i in t)delete t[i]},hasListeners:function(t){return(t=n(this)[t])&&t.listeners.length>0}}}());CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(n,t){return n in{instanceReady:1,loaded:1}&&(this[n]=!0),CKEDITOR.event.prototype.fire.call(this,n,t,this)},CKEDITOR.editor.prototype.fireOnce=function(n,t){return n in{instanceReady:1,loaded:1}&&(this[n]=!0),CKEDITOR.event.prototype.fireOnce.call(this,n,t,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype));CKEDITOR.env||(CKEDITOR.env=function(){var i=navigator.userAgent.toLowerCase(),u=window.opera,n={ie:i.indexOf("trident/")>-1,opera:!!u&&u.version,webkit:i.indexOf(" applewebkit/")>-1,air:i.indexOf(" adobeair/")>-1,mac:i.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat",mobile:i.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(i),isCustomDomain:function(){if(!this.ie)return!1;var n=document.domain,t=window.location.hostname;return n!=t&&n!="["+t+"]"},secure:location.protocol=="https:"},t,r;return n.gecko=navigator.product=="Gecko"&&!n.webkit&&!n.opera&&!n.ie,n.webkit&&(i.indexOf("chrome")>-1?n.chrome=!0:n.safari=!0),t=0,n.ie&&(t=n.quirks||!document.documentMode?parseFloat(i.match(/msie (\d+)/)[1]):document.documentMode,n.ie9Compat=t==9,n.ie8Compat=t==8,n.ie7Compat=t==7,n.ie6Compat=t<7||n.quirks&&t<10),n.gecko&&(r=i.match(/rv:([\d\.]+)/),r&&(r=r[1].split("."),t=r[0]*1e4+(r[1]||0)*100+(r[2]||0)*1)),n.opera&&(t=parseFloat(u.version())),n.air&&(t=parseFloat(i.match(/ adobeair\/(\d+)/)[1])),n.webkit&&(t=parseFloat(i.match(/ applewebkit\/(\d+)/)[1])),n.version=t,n.isCompatible=n.iOS&&t>=534||!n.mobile&&(n.ie&&t>6||n.gecko&&t>=10801||n.opera&&t>=9.5||n.air&&t>=1||n.webkit&&t>=522||!1),n.hidpi=window.devicePixelRatio>=2,n.needsBrFiller=n.gecko||n.webkit||n.ie&&t>10,n.needsNbspFiller=n.ie&&t<11,n.cssClass="cke_browser_"+(n.ie?"ie":n.gecko?"gecko":n.opera?"opera":n.webkit?"webkit":"unknown"),n.quirks&&(n.cssClass=n.cssClass+" cke_browser_quirks"),n.ie&&(n.cssClass=n.cssClass+(" cke_browser_ie"+(n.quirks||n.version<7?"6":n.version)),n.quirks&&(n.cssClass=n.cssClass+" cke_browser_iequirks")),n.gecko&&(t<10900?n.cssClass=n.cssClass+" cke_browser_gecko18":t<=11e3&&(n.cssClass=n.cssClass+" cke_browser_gecko19")),n.air&&(n.cssClass=n.cssClass+" cke_browser_air"),n.iOS&&(n.cssClass=n.cssClass+" cke_browser_ios"),n.hidpi&&(n.cssClass=n.cssClass+" cke_hidpi"),n}());"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var n=document.createElement("script");n.type="text/javascript";n.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(n)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(n){(this._.pending||(this._.pending=[])).push(n)},function(){CKEDITOR.domReady(function(){var n=CKEDITOR.loadFullCore,t=CKEDITOR.loadFullCoreTimeout;n&&(CKEDITOR.status="basic_ready",n&&n._load?n():t&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},t*1e3))})}();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={},function(){var n=[],t=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){n=[]});CKEDITOR.tools={arrayCompare:function(n,t){if(!n&&!t)return!0;if(!n||!t||n.length!=t.length)return!1;for(var i=0;i<n.length;i++)if(n[i]!=t[i])return!1;return!0},clone:function(n){var i,t;if(n&&n instanceof Array){for(i=[],t=0;t<n.length;t++)i[t]=CKEDITOR.tools.clone(n[t]);return i}if(n===null||typeof n!="object"||n instanceof String||n instanceof Number||n instanceof Boolean||n instanceof Date||n instanceof RegExp)return n;i=new n.constructor;for(t in n)i[t]=CKEDITOR.tools.clone(n[t]);return i},capitalize:function(n,t){return n.charAt(0).toUpperCase()+(t?n.slice(1):n.slice(1).toLowerCase())},extend:function(n){var t=arguments.length,u,f,r,e,i;for(typeof(u=arguments[t-1])=="boolean"?t--:typeof(u=arguments[t-2])=="boolean"&&(f=arguments[t-1],t=t-2),r=1;r<t;r++){e=arguments[r];for(i in e)(u===!0||n[i]==void 0)&&(!f||i in f)&&(n[i]=e[i])}return n},prototypedCopy:function(n){var t=function(){};return t.prototype=n,new t},copy:function(n){var i={},t;for(t in n)i[t]=n[t];return i},isArray:function(n){return Object.prototype.toString.call(n)=="[object Array]"},isEmpty:function(n){for(var t in n)if(n.hasOwnProperty(t))return!1;return!0},cssVendorPrefix:function(n,i,r){return r?t+n+":"+i+";"+n+":"+i:(r={},r[n]=i,r[t+n]=i,r)},cssStyleToDomStyle:function(){var n=document.createElement("div").style,t=typeof n.cssFloat!="undefined"?"cssFloat":typeof n.styleFloat!="undefined"?"styleFloat":"float";return function(n){return n=="float"?t:n.replace(/-./g,function(n){return n.substr(1).toUpperCase()})}}(),buildStyleHtml:function(n){for(var n=[].concat(n),t,i=[],r=0;r<n.length;r++)(t=n[r])&&(/@import|[{}]/.test(t)?i.push("<style>"+t+"<\/style>"):i.push('<link type="text/css" rel=stylesheet href="'+t+'">'));return i.join("")},htmlEncode:function(n){return(""+n).replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;")},htmlEncodeAttr:function(n){return n.replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},htmlDecodeAttr:function(n){return n.replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">")},getNextNumber:function(){var n=0;return function(){return++n}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(n,t){var i=t(n);return i.prototype=n.prototype,i},setTimeout:function(n,t,i,r,u){return u||(u=window),i||(i=u),u.setTimeout(function(){r?n.apply(i,[].concat(r)):n.apply(i)},t||0)},trim:function(){var n=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(t){return t.replace(n,"")}}(),ltrim:function(){var n=/^[ \t\n\r]+/g;return function(t){return t.replace(n,"")}}(),rtrim:function(){var n=/[ \t\n\r]+$/g;return function(t){return t.replace(n,"")}}(),indexOf:function(n,t){if(typeof t=="function"){for(var i=0,r=n.length;i<r;i++)if(t(n[i]))return i}else{if(n.indexOf)return n.indexOf(t);for(i=0,r=n.length;i<r;i++)if(n[i]===t)return i}return-1},search:function(n,t){var i=CKEDITOR.tools.indexOf(n,t);return i>=0?n[i]:null},bind:function(n,t){return function(){return n.apply(t,arguments)}},createClass:function(n){var t=n.$,i=n.base,r=n.privates||n._,u=n.proto,n=n.statics,f;return t||(t=function(){i&&this.base.apply(this,arguments)}),r&&(f=t,t=function(){var i=this._||(this._={}),t,n;for(t in r)n=r[t],i[t]=typeof n=="function"?CKEDITOR.tools.bind(n,this):n;f.apply(this,arguments)}),i&&(t.prototype=this.prototypedCopy(i.prototype),t.prototype.constructor=t,t.base=i,t.baseProto=i.prototype,t.prototype.base=function(){this.base=i.prototype.base;i.apply(this,arguments);this.base=arguments.callee}),u&&this.extend(t.prototype,u,!0),n&&this.extend(t,n,!0),t},addFunction:function(t,i){return n.push(function(){return t.apply(i||this,arguments)})-1},removeFunction:function(t){n[t]=null},callFunction:function(t){var i=n[t];return i&&i.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var t=/^-?\d+\.?\d*px$/,n;return function(i){return n=CKEDITOR.tools.trim(i+"")+"px",t.test(n)?n:i||""}}(),convertToPx:function(){var n;return function(t){return(n||(n=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(n)),!/%$/.test(t))?(n.setStyle("width",t),n.$.clientWidth):t}}(),repeat:function(n,t){return Array(t+1).join(n)},tryThese:function(){for(var t,r,n=0,i=arguments.length;n<i;n++){r=arguments[n];try{t=r();break}catch(u){}}return t},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(n){return function(){var t=arguments,i=this;window.setTimeout(function(){n.apply(i,t)},0)}},normalizeCssText:function(n,t){var i=[],r,u=CKEDITOR.tools.parseCssText(n,!0,t);for(r in u)i.push(r+":"+u[r]);return i.sort(),i.length?i.join(";")+";":""},convertRgbToHex:function(n){return n.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(n,t,i,r){for(n=[t,i,r],t=0;t<3;t++)n[t]=("0"+parseInt(n[t],10).toString(16)).slice(-2);return"#"+n.join("")})},parseCssText:function(n,t,i){var r={};return(i&&(i=new CKEDITOR.dom.element("span"),i.setAttribute("style",n),n=CKEDITOR.tools.convertRgbToHex(i.getAttribute("style")||"")),!n||n==";")?r:(n.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(n,i,u){t&&(i=i.toLowerCase(),i=="font-family"&&(u=u.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,",")),u=CKEDITOR.tools.trim(u));r[i]=u}),r)},writeCssText:function(n,t){var i,r=[];for(i in n)r.push(i+":"+n[i]);return t&&r.sort(),r.join("; ")},objectCompare:function(n,t,i){var r;if(!n&&!t)return!0;if(!n||!t)return!1;for(r in n)if(n[r]!=t[r])return!1;if(!i)for(r in t)if(n[r]!=t[r])return!1;return!0},objectKeys:function(n){var t=[],i;for(i in n)t.push(i);return t},convertArrayToObject:function(n,t){var r={},i,u;for(arguments.length==1&&(t=!0),i=0,u=n.length;i<u;++i)r[n[i]]=t;return r},fixDomain:function(){for(var n;;)try{n=window.parent.document.domain;break}catch(t){if(n=n?n.replace(/.+?(?:\.|$)/,""):document.domain,!n)break;document.domain=n}return!!n},eventsBuffer:function(n,t){function u(){r=(new Date).getTime();i=!1;t()}var i,r=0;return{input:function(){if(!i){var t=(new Date).getTime()-r;t<n?i=setTimeout(u,n-t):u()}},reset:function(){i&&clearTimeout(i);i=r=0}}},enableHtml5Elements:function(n,t){for(var i=["abbr","article","aside","audio","bdi","canvas","data","datalist","details","figcaption","figure","footer","header","hgroup","mark","meter","nav","output","progress","section","summary","time","video"],r=i.length,u;r--;)u=n.createElement(i[r]),t&&n.appendChild(u)}}}();CKEDITOR.dtd=function(){var i=CKEDITOR.tools.extend,u=function(n,t){for(var t,u,r=CKEDITOR.tools.clone(n),i=1;i<arguments.length;i++){t=arguments[i];for(u in t)delete r[u]}return r},n={},t={},e={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},o={command:1,link:1,meta:1,noscript:1,script:1,style:1},r={},f={"#":1},s={center:1,dir:1,noframes:1};return i(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},f,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1}),i(t,e,n,s),u={a:u(n,{a:1,button:1}),abbr:n,address:t,area:r,article:i({style:1},t),aside:i({style:1},t),audio:i({source:1,track:1},t),b:n,base:r,bdi:n,bdo:n,blockquote:t,body:t,br:r,button:u(n,{a:1,button:1}),canvas:n,caption:t,cite:n,code:n,col:r,colgroup:{col:1},command:r,datalist:i({option:1},n),dd:t,del:n,details:i({summary:1},t),dfn:n,div:i({style:1},t),dl:{dt:1,dd:1},dt:t,em:n,embed:r,fieldset:i({legend:1},t),figcaption:t,figure:i({figcaption:1},t),footer:t,form:t,h1:n,h2:n,h3:n,h4:n,h5:n,h6:n,head:i({title:1,base:1},o),header:t,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:r,html:i({head:1,body:1},t,o),i:n,iframe:f,img:r,input:r,ins:n,kbd:n,keygen:r,label:n,legend:n,li:t,link:r,map:t,mark:n,menu:i({li:1},t),meta:r,meter:u(n,{meter:1}),nav:t,noscript:i({link:1,meta:1,style:1},n),object:i({param:1},n),ol:{li:1},optgroup:{option:1},option:f,output:n,p:n,param:r,pre:n,progress:u(n,{progress:1}),q:n,rp:n,rt:n,ruby:i({rp:1,rt:1},n),s:n,samp:n,script:f,section:i({style:1},t),select:{optgroup:1,option:1},small:n,source:r,span:n,strong:n,style:f,sub:n,summary:n,sup:n,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:t,textarea:f,tfoot:{tr:1},th:t,thead:{tr:1},time:u(n,{time:1}),title:f,tr:{th:1,td:1},track:r,u:n,ul:{li:1},"var":n,video:i({source:1,track:1},t),wbr:r,acronym:n,applet:i({param:1},t),basefont:r,big:n,center:t,dialog:r,dir:{li:1},font:n,isindex:r,noframes:t,strike:n,tt:n},i(u,{$block:i({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},e,s),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1},$inline:n,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:i({body:1,head:1,html:1},u.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}}),u}();CKEDITOR.dom.event=function(n){this.$=n};CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var n=this.getKey();return(this.$.ctrlKey||this.$.metaKey)&&(n=n+CKEDITOR.CTRL),this.$.shiftKey&&(n=n+CKEDITOR.SHIFT),this.$.altKey&&(n=n+CKEDITOR.ALT),n},preventDefault:function(n){var t=this.$;t.preventDefault?t.preventDefault():t.returnValue=!1;n&&this.stopPropagation()},stopPropagation:function(){var n=this.$;n.stopPropagation?n.stopPropagation():n.cancelBubble=!0},getTarget:function(){var n=this.$.target||this.$.srcElement;return n?new CKEDITOR.dom.node(n):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var n=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(n.documentElement.scrollLeft||n.body.scrollLeft),y:this.$.pageY||this.$.clientY+(n.documentElement.scrollTop||n.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(n){n&&(this.$=n)};CKEDITOR.dom.domObject.prototype=function(){var n=function(n,t){return function(i){typeof CKEDITOR!="undefined"&&n.fire(t,new CKEDITOR.dom.event(i))}};return{getPrivate:function(){var n;return(n=this.getCustomData("_"))||this.setCustomData("_",n={}),n},on:function(t){var i=this.getCustomData("_cke_nativeListeners");return i||(i={},this.setCustomData("_cke_nativeListeners",i)),i[t]||(i=i[t]=n(this,t),this.$.addEventListener?this.$.addEventListener(t,i,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+t,i)),CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(n){if(CKEDITOR.event.prototype.removeListener.apply(this,arguments),!this.hasListeners(n)){var t=this.getCustomData("_cke_nativeListeners"),i=t&&t[n];i&&(this.$.removeEventListener?this.$.removeEventListener(n,i,!1):this.$.detachEvent&&this.$.detachEvent("on"+n,i),delete t[n])}},removeAllListeners:function(){var t=this.getCustomData("_cke_nativeListeners"),n,i;for(n in t)i=t[n],this.$.detachEvent?this.$.detachEvent("on"+n,i):this.$.removeEventListener&&this.$.removeEventListener(n,i,!1),delete t[n]}}}(),function(n){var t={};CKEDITOR.on("reset",function(){t={}});n.equals=function(n){try{return n&&n.$===this.$}catch(t){return!1}};n.setCustomData=function(n,i){var r=this.getUniqueId();return(t[r]||(t[r]={}))[n]=i,this};n.getCustomData=function(n){var i=this.$["data-cke-expando"];return(i=i&&t[i])&&n in i?i[n]:null};n.removeCustomData=function(n){var i=this.$["data-cke-expando"],i=i&&t[i],r,u;return i&&(r=i[n],u=n in i,delete i[n]),u?r:null};n.clearCustomData=function(){this.removeAllListeners();var n=this.$["data-cke-expando"];n&&delete t[n]};n.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(n)}(CKEDITOR.dom.domObject.prototype);CKEDITOR.dom.node=function(n){return n?new CKEDITOR.dom[n.nodeType==CKEDITOR.NODE_DOCUMENT?"document":n.nodeType==CKEDITOR.NODE_ELEMENT?"element":n.nodeType==CKEDITOR.NODE_TEXT?"text":n.nodeType==CKEDITOR.NODE_COMMENT?"comment":n.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](n):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(n,t){return n.append(this,t),n},clone:function(n,t){var i=this.$.cloneNode(n),r=function(i){if(i["data-cke-expando"]&&(i["data-cke-expando"]=!1),i.nodeType==CKEDITOR.NODE_ELEMENT&&(t||i.removeAttribute("id",!1),n))for(var i=i.childNodes,u=0;u<i.length;u++)r(i[u])};return r(i),new CKEDITOR.dom.node(i)},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(n){return n.$.parentNode.insertBefore(this.$,n.$.nextSibling),n},insertBefore:function(n){return n.$.parentNode.insertBefore(this.$,n.$),n},insertBeforeMe:function(n){return this.$.parentNode.insertBefore(n.$,this.$),n},getAddress:function(n){for(var i,r=[],u=this.getDocument().$.documentElement,t=this.$;t&&t!=u;)i=t.parentNode,i&&r.unshift(this.getIndex.call({$:t},n)),t=i;return r},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(n){var t=this.$,i=-1,r;if(!this.$.parentNode)return i;do n&&t!=this.$&&t.nodeType==CKEDITOR.NODE_TEXT&&(r||!t.nodeValue)||(i++,r=t.nodeType==CKEDITOR.NODE_TEXT);while(t=t.previousSibling);return i},getNextSourceNode:function(n,t,i){var u,i,n,r;if(i&&!i.call&&(u=i,i=function(n){return!n.equals(u)}),n=!n&&this.getFirst&&this.getFirst(),!n){if(this.type==CKEDITOR.NODE_ELEMENT&&i&&i(this,!0)===!1)return null;n=this.getNext()}for(;!n&&(r=(r||this).getParent());){if(i&&i(r,!0)===!1)return null;n=r.getNext()}return!n||i&&i(n)===!1?null:t&&t!=n.type?n.getNextSourceNode(!1,t,i):n},getPreviousSourceNode:function(n,t,i){var u,i,n,r;if(i&&!i.call&&(u=i,i=function(n){return!n.equals(u)}),n=!n&&this.getLast&&this.getLast(),!n){if(this.type==CKEDITOR.NODE_ELEMENT&&i&&i(this,!0)===!1)return null;n=this.getPrevious()}for(;!n&&(r=(r||this).getParent());){if(i&&i(r,!0)===!1)return null;n=r.getPrevious()}return!n||i&&i(n)===!1?null:t&&n.type!=t?n.getPreviousSourceNode(!1,t,i):n},getPrevious:function(n){var t=this.$,i;do i=(t=t.previousSibling)&&t.nodeType!=10&&new CKEDITOR.dom.node(t);while(i&&n&&!n(i));return i},getNext:function(n){var i=this.$,t;do t=(i=i.nextSibling)&&new CKEDITOR.dom.node(i);while(t&&n&&!n(t));return t},getParent:function(n){var t=this.$.parentNode;return t&&(t.nodeType==CKEDITOR.NODE_ELEMENT||n&&t.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(t):null},getParents:function(n){var t=this,i=[];do i[n?"push":"unshift"](t);while(t=t.getParent());return i},getCommonAncestor:function(n){if(n.equals(this))return this;if(n.contains&&n.contains(this))return n;var t=this.contains?this:this.getParent();do if(t.contains(n))return t;while(t=t.getParent());return null},getPosition:function(n){var t=this.$,i=n.$;if(t.compareDocumentPosition)return t.compareDocumentPosition(i);if(t==i)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&n.type==CKEDITOR.NODE_ELEMENT){if(t.contains){if(t.contains(i))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(i.contains(t))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in t)return t.sourceIndex<0||i.sourceIndex<0?CKEDITOR.POSITION_DISCONNECTED:t.sourceIndex<i.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}for(var t=this.getAddress(),n=n.getAddress(),i=Math.min(t.length,n.length),r=0;r<=i-1;r++)if(t[r]!=n[r]){if(r<i)return t[r]<n[r]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;break}return t.length<n.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(n,t){var i=this.$,r;for(t||(i=i.parentNode);i;){if(i.nodeName&&(r=i.nodeName.toLowerCase(),typeof n=="string"?r==n:r in n))return new CKEDITOR.dom.node(i);try{i=i.parentNode}catch(u){i=null}}return null},hasAscendant:function(n,t){var i=this.$;for(t||(i=i.parentNode);i;){if(i.nodeName&&i.nodeName.toLowerCase()==n)return!0;i=i.parentNode}return!1},move:function(n,t){n.append(this.remove(),t)},remove:function(n){var t=this.$,i=t.parentNode;if(i){if(n)for(;n=t.firstChild;)i.insertBefore(t.removeChild(n),t);i.removeChild(t)}return this},replace:function(n){this.insertBefore(n);n.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var n,t,i;this.getFirst&&(n=this.getFirst());){if(n.type==CKEDITOR.NODE_TEXT)if(t=CKEDITOR.tools.ltrim(n.getText()),i=n.getLength(),t)t.length<i&&(n.split(i-t.length),this.$.removeChild(this.$.firstChild));else{n.remove();continue}break}},rtrim:function(){for(var n,t,i;this.getLast&&(n=this.getLast());){if(n.type==CKEDITOR.NODE_TEXT)if(t=CKEDITOR.tools.rtrim(n.getText()),i=n.getLength(),t)t.length<i&&(n.split(t.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));else{n.remove();continue}break}CKEDITOR.env.needsBrFiller&&(n=this.$.lastChild)&&n.type==1&&n.nodeName.toLowerCase()=="br"&&n.parentNode.removeChild(n)},isReadOnly:function(){var n=this;if(this.type!=CKEDITOR.NODE_ELEMENT&&(n=this.getParent()),n&&typeof n.$.isContentEditable!="undefined")return!(n.$.isContentEditable||n.data("cke-editable"));for(;n;){if(n.data("cke-editable"))break;if(n.getAttribute("contentEditable")=="false")return!0;if(n.getAttribute("contentEditable")=="true")break;n=n.getParent()}return!n}});CKEDITOR.dom.window=function(n){CKEDITOR.dom.domObject.call(this,n)};CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject;CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var n=this.$.document,t=n.compatMode=="CSS1Compat";return{width:(t?n.documentElement.clientWidth:n.body.clientWidth)||0,height:(t?n.documentElement.clientHeight:n.body.clientHeight)||0}},getScrollPosition:function(){var n=this.$;return"pageXOffset"in n?{x:n.pageXOffset||0,y:n.pageYOffset||0}:(n=n.document,{x:n.documentElement.scrollLeft||n.body.scrollLeft||0,y:n.documentElement.scrollTop||n.body.scrollTop||0})},getFrame:function(){var n=this.$.frameElement;return n?new CKEDITOR.dom.element.get(n):null}});CKEDITOR.dom.document=function(n){CKEDITOR.dom.domObject.call(this,n)};CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject;CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(n){if(this.$.createStyleSheet)this.$.createStyleSheet(n);else{var t=new CKEDITOR.dom.element("link");t.setAttributes({rel:"stylesheet",type:"text/css",href:n});this.getHead().append(t)}},appendStyleText:function(n){var i,t;return this.$.createStyleSheet?(i=this.$.createStyleSheet(""),i.cssText=n):(t=new CKEDITOR.dom.element("style",this),t.append(new CKEDITOR.dom.text(n,this)),this.getHead().append(t)),i||t.$.sheet},createElement:function(n,t){var i=new CKEDITOR.dom.element(n,this);return t&&(t.attributes&&i.setAttributes(t.attributes),t.styles&&i.setStyles(t.styles)),i},createText:function(n){return new CKEDITOR.dom.text(n,this)},focus:function(){this.getWindow().focus()},getActive:function(){return new CKEDITOR.dom.element(this.$.activeElement)},getById:function(n){return(n=this.$.getElementById(n))?new CKEDITOR.dom.element(n):null},getByAddress:function(n,t){for(var e,o,f,r,i=this.$.documentElement,u=0;i&&u<n.length;u++)if(e=n[u],t){for(o=-1,f=0;f<i.childNodes.length;f++)if(r=i.childNodes[f],!(t===!0&&r.nodeType==3&&r.previousSibling&&r.previousSibling.nodeType==3)&&(o++,o==e)){i=r;break}}else i=i.childNodes[e];return i?new CKEDITOR.dom.node(i):null},getElementsByTag:function(n,t){return(!CKEDITOR.env.ie||document.documentMode>8)&&t&&(n=t+":"+n),new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(n))},getHead:function(){var n=this.$.getElementsByTagName("head")[0];return n?new CKEDITOR.dom.element(n):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(n){this.$.open("text/html","replace");CKEDITOR.env.ie&&(n=n.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$&\n<script data-cke-temp="1">('+CKEDITOR.tools.fixDomain+")();<\/script>"));this.$.write(n);this.$.close()},find:function(n){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(n))},findOne:function(n){return(n=this.$.querySelector(n))?new CKEDITOR.dom.element(n):null},_getHtml5ShivFrag:function(){var n=this.getCustomData("html5ShivFrag");return n||(n=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(n,!0),this.setCustomData("html5ShivFrag",n)),n}});CKEDITOR.dom.nodeList=function(n){this.$=n};CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(n){return n<0||n>=this.$.length?null:(n=this.$[n])?new CKEDITOR.dom.node(n):null}};CKEDITOR.dom.element=function(n,t){typeof n=="string"&&(n=(t?t.$:document).createElement(n));CKEDITOR.dom.domObject.call(this,n)};CKEDITOR.dom.element.get=function(n){return(n=typeof n=="string"?document.getElementById(n)||document.getElementsByName(n)[0]:n)&&(n.$?n:new CKEDITOR.dom.element(n))};CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node;CKEDITOR.dom.element.createFromHtml=function(n,t){var i=new CKEDITOR.dom.element("div",t);return i.setHtml(n),i.getFirst().remove()};CKEDITOR.dom.element.setMarker=function(n,t,i,r){var u=t.getCustomData("list_marker_id")||t.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),f=t.getCustomData("list_marker_names")||t.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");return n[u]=t,f[i]=1,t.setCustomData(i,r)};CKEDITOR.dom.element.clearAllMarkers=function(n){for(var t in n)CKEDITOR.dom.element.clearMarkers(n,n[t],1)};CKEDITOR.dom.element.clearMarkers=function(n,t,i){var u=t.getCustomData("list_marker_names"),f=t.getCustomData("list_marker_id"),r;for(r in u)t.removeCustomData(r);t.removeCustomData("list_marker_names");i&&(t.removeCustomData("list_marker_id"),delete n[f])},function(){function n(n){var t=!0;return n.$.id||(n.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),t=!1),function(){t||n.removeAttribute("id")}}function t(n,t){return"#"+n.$.id+" "+t.split(/,\s*/).join(", #"+n.$.id+" ")}function i(n){for(var t=0,i=0,u=r[n].length;i<u;i++)t=t+(parseInt(this.getComputedStyle(r[n][i])||0,10)||0);return t}CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:function(n){var t=this.$.className;t&&(RegExp("(?:^|\\s)"+n+"(?:\\s|$)","").test(t)||(t=t+(" "+n)));this.$.className=t||n},removeClass:function(n){var t=this.getAttribute("class");return t&&(n=RegExp("(?:^|\\s+)"+n+"(?=\\s|$)","i"),n.test(t)&&((t=t.replace(n,"").replace(/^\s+/,""))?this.setAttribute("class",t):this.removeAttribute("class"))),this},hasClass:function(n){return RegExp("(?:^|\\s+)"+n+"(?=\\s|$)","").test(this.getAttribute("class"))},append:function(n,t){return typeof n=="string"&&(n=this.getDocument().createElement(n)),t?this.$.insertBefore(n.$,this.$.firstChild):this.$.appendChild(n.$),n},appendHtml:function(n){if(this.$.childNodes.length){var t=new CKEDITOR.dom.element("div",this.getDocument());t.setHtml(n);t.moveChildren(this)}else this.setHtml(n)},appendText:function(n){this.$.text!=void 0?this.$.text=this.$.text+n:this.append(new CKEDITOR.dom.text(n))},appendBogus:function(n){if(n||CKEDITOR.env.needsBrFiller||CKEDITOR.env.opera){for(n=this.getLast();n&&n.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(n.getText());)n=n.getPrevious();n&&n.is&&n.is("br")||(n=CKEDITOR.env.opera?this.getDocument().createText(""):this.getDocument().createElement("br"),CKEDITOR.env.gecko&&n.setAttribute("type","_moz"),this.append(n))}},breakParent:function(n){var t=new CKEDITOR.dom.range(this.getDocument());t.setStartAfter(this);t.setEndAfter(n);n=t.extractContents();t.insertNode(this.remove());n.insertAfterNode(this)},contains:CKEDITOR.env.ie||CKEDITOR.env.webkit?function(n){var t=this.$;return n.type!=CKEDITOR.NODE_ELEMENT?t.contains(n.getParent().$):t!=n.$&&t.contains(n.$)}:function(n){return!!(this.$.compareDocumentPosition(n.$)&16)},focus:function(){function n(){try{this.$.focus()}catch(n){}}return function(t){t?CKEDITOR.tools.setTimeout(n,100,this):n.call(this)}}(),getHtml:function(){var n=this.$.innerHTML;return CKEDITOR.env.ie?n.replace(/<\?[^>]*>/g,""):n},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var n=this.$.ownerDocument.createElement("div");return n.appendChild(this.$.cloneNode(!0)),n.innerHTML},getClientRect:function(){var n=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());return n.width||(n.width=n.right-n.left),n.height||(n.height=n.bottom-n.top),n},setHtml:CKEDITOR.env.ie&&CKEDITOR.env.version<9?function(n){var t,i;try{return(t=this.$,this.getParent())?t.innerHTML=n:(i=this.getDocument()._getHtml5ShivFrag(),i.appendChild(t),t.innerHTML=n,i.removeChild(t),n)}catch(r){for(this.$.innerHTML="",t=new CKEDITOR.dom.element("body",this.getDocument()),t.$.innerHTML=n,t=t.getChildren();t.count();)this.append(t.getItem(0));return n}}:function(n){return this.$.innerHTML=n},setText:function(n){return CKEDITOR.dom.element.prototype.setText=this.$.innerText!=void 0?function(n){return this.$.innerText=n}:function(n){return this.$.textContent=n},this.setText(n)},getAttribute:function(){var n=function(n){return this.$.getAttribute(n,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(n){switch(n){case"class":n="className";break;case"http-equiv":n="httpEquiv";break;case"name":return this.$.name;case"tabindex":return n=this.$.getAttribute(n,2),n!==0&&this.$.tabIndex===0&&(n=null),n;case"checked":return n=this.$.attributes.getNamedItem(n),(n.specified?n.nodeValue:this.$.checked)?"checked":null;case"hspace":case"value":return this.$[n];case"style":return this.$.style.cssText;case"contenteditable":case"contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(n,2)}:n}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:CKEDITOR.env.ie?function(n){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(n)]}:function(n){var t=this.getWindow().$.getComputedStyle(this.$,null);return t?t.getPropertyValue(n):""},getDtd:function(){var n=CKEDITOR.dtd[this.getName()];return this.getDtd=function(){return n},n},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:CKEDITOR.env.ie?function(){var n=this.$.tabIndex;return n!==0||CKEDITOR.dtd.$tabIndex[this.getName()]||parseInt(this.getAttribute("tabindex"),10)===0||(n=-1),n}:CKEDITOR.env.webkit?function(){var n=this.$.tabIndex;return n==void 0&&(n=parseInt(this.getAttribute("tabindex"),10),isNaN(n)&&(n=-1)),n}: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 n=this.$.nodeName.toLowerCase(),t;return!CKEDITOR.env.ie||document.documentMode>8||(t=this.$.scopeName,t!="HTML"&&(n=t.toLowerCase()+":"+n)),(this.getName=function(){return n})()},getValue:function(){return this.$.value},getFirst:function(n){var t=this.$.firstChild;return(t=t&&new CKEDITOR.dom.node(t))&&n&&!n(t)&&(t=t.getNext(n)),t},getLast:function(n){var t=this.$.lastChild;return(t=t&&new CKEDITOR.dom.node(t))&&n&&!n(t)&&(t=t.getPrevious(n)),t},getStyle:function(n){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(n)]},is:function(){var t=this.getName(),n;if(typeof arguments[0]=="object")return!!arguments[0][t];for(n=0;n<arguments.length;n++)if(arguments[n]==t)return!0;return!1},isEditable:function(n){var t=this.getName();return this.isReadOnly()||this.getComputedStyle("display")=="none"||this.getComputedStyle("visibility")=="hidden"||CKEDITOR.dtd.$nonEditable[t]||CKEDITOR.dtd.$empty[t]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:n!==!1?(n=CKEDITOR.dtd[t]||CKEDITOR.dtd.span,!(!n||!n["#"])):!0},isIdentical:function(n){var t=this.clone(0,1),n=n.clone(0,1),i;return(t.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]),n.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]),t.$.isEqualNode)?(t.$.style.cssText=CKEDITOR.tools.normalizeCssText(t.$.style.cssText),n.$.style.cssText=CKEDITOR.tools.normalizeCssText(n.$.style.cssText),t.$.isEqualNode(n.$)):(t=t.getOuterHtml(),n=n.getOuterHtml(),CKEDITOR.env.ie&&CKEDITOR.env.version<9&&this.is("a")&&(i=this.getParent(),i.type==CKEDITOR.NODE_ELEMENT&&(i=i.clone(),i.setHtml(t),t=i.getHtml(),i.setHtml(n),n=i.getHtml())),t==n)},isVisible:function(){var n=(this.$.offsetHeight||this.$.offsetWidth)&&this.getComputedStyle("visibility")!="hidden",t,i;return n&&(CKEDITOR.env.webkit||CKEDITOR.env.opera)&&(t=this.getWindow(),!t.equals(CKEDITOR.document.getWindow())&&(i=t.$.frameElement)&&(n=new CKEDITOR.dom.element(i).isVisible())),!!n},isEmptyInlineRemoveable:function(){var n;if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var i=this.getChildren(),t=0,r=i.count();t<r;t++)if(n=i.getItem(t),!(n.type==CKEDITOR.NODE_ELEMENT&&n.data("cke-bookmark"))&&(n.type==CKEDITOR.NODE_ELEMENT&&!n.isEmptyInlineRemoveable()||n.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(n.getText())))return!1;return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(){for(var i,t=this.$.attributes,n=0;n<t.length;n++){i=t[n];switch(i.nodeName){case"class":if(this.getAttribute("class"))return!0;case"data-cke-expando":continue;default:if(i.specified)return!0}}return!1}:function(){var n=this.$.attributes,t=n.length,i={"data-cke-expando":1,_moz_dirty:1};return t>0&&(t>2||!i[n[0].nodeName]||t==2&&!i[n[1].nodeName])},hasAttribute:function(){function n(n){return n=this.$.attributes.getNamedItem(n),!(!n||!n.specified)}return CKEDITOR.env.ie&&CKEDITOR.env.version<8?function(t){return t=="name"?!!this.$.name:n.call(this,t)}:n}(),hide:function(){this.setStyle("display","none")},moveChildren:function(n,t){var i=this.$,n=n.$,r;if(i!=n)if(t)for(;r=i.lastChild;)n.insertBefore(i.removeChild(r),n.firstChild);else for(;r=i.firstChild;)n.appendChild(i.removeChild(r))},mergeSiblings:function(){function n(n,t,i){var r,u;if(t&&t.type==CKEDITOR.NODE_ELEMENT){for(r=[];t.data("cke-bookmark")||t.isEmptyInlineRemoveable();)if(r.push(t),t=i?t.getNext():t.getPrevious(),!t||t.type!=CKEDITOR.NODE_ELEMENT)return;if(n.isIdentical(t)){for(u=i?n.getLast():n.getFirst();r.length;)r.shift().move(n,!i);t.moveChildren(n,!i);t.remove();u&&u.type==CKEDITOR.NODE_ELEMENT&&u.mergeSiblings()}}}return function(t){(t===!1||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))&&(n(this,this.getNext(),!0),n(this,this.getPrevious()))}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var n=function(n,t){return this.$.setAttribute(n,t),this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(t,i){return t=="class"?this.$.className=i:t=="style"?this.$.style.cssText=i:t=="tabindex"?this.$.tabIndex=i:t=="checked"?this.$.checked=i:t=="contenteditable"?n.call(this,"contentEditable",i):n.apply(this,arguments),this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(t,i){if(t=="src"&&i.match(/^http:\/\//))try{n.apply(this,arguments)}catch(r){}else n.apply(this,arguments);return this}:n}(),setAttributes:function(n){for(var t in n)this.setAttribute(t,n[t]);return this},setValue:function(n){return this.$.value=n,this},removeAttribute:function(){var n=function(n){this.$.removeAttribute(n)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(n){n=="class"?n="className":n=="tabindex"?n="tabIndex":n=="contenteditable"&&(n="contentEditable");this.$.removeAttribute(n)}:n}(),removeAttributes:function(n){if(CKEDITOR.tools.isArray(n))for(var t=0;t<n.length;t++)this.removeAttribute(n[t]);else for(t in n)n.hasOwnProperty(t)&&this.removeAttribute(t)},removeStyle:function(n){var t=this.$.style,r,u,i,f;if(t.removeProperty||n!="border"&&n!="margin"&&n!="padding")t.removeProperty?t.removeProperty(n):t.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(n)),this.$.style.cssText||this.removeAttribute("style");else{for(r=["top","left","right","bottom"],n=="border"&&(u=["color","style","width"]),t=[],i=0;i<r.length;i++)if(u)for(f=0;f<u.length;f++)t.push([n,r[i],u[f]].join("-"));else t.push([n,r[i]].join("-"));for(n=0;n<t.length;n++)this.removeStyle(t[n])}},setStyle:function(n,t){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(n)]=t,this},setStyles:function(n){for(var t in n)this.setStyle(t,n[t]);return this},setOpacity:function(n){CKEDITOR.env.ie&&CKEDITOR.env.version<9?(n=Math.round(n*100),this.setStyle("filter",n>=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+n+")")):this.setStyle("opacity",n)},unselectable:function(){if(this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none")),CKEDITOR.env.ie||CKEDITOR.env.opera){this.setAttribute("unselectable","on");for(var t,i=this.getElementsByTag("*"),n=0,r=i.count();n<r;n++)t=i.getItem(n),t.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var n=this;n.getName()!="html";){if(n.getComputedStyle("position")!="static")return n;n=n.getParent()}return null},getDocumentPosition:function(n){var r=0,u=0,i=this.getDocument(),t=i.getBody(),f=i.$.compatMode=="BackCompat";if(document.documentElement.getBoundingClientRect){var e=this.$.getBoundingClientRect(),o=i.$.documentElement,h=o.clientTop||t.$.clientTop||0,c=o.clientLeft||t.$.clientLeft||0,s=!0;CKEDITOR.env.ie&&(s=i.getDocumentElement().contains(this),i=i.getBody().contains(this),s=f&&i||!f&&s);s&&(r=e.left+(!f&&o.scrollLeft||t.$.scrollLeft),r=r-c,u=e.top+(!f&&o.scrollTop||t.$.scrollTop),u=u-h)}else for(t=this,i=null;t&&!(t.getName()=="body"||t.getName()=="html");){for(r=r+(t.$.offsetLeft-t.$.scrollLeft),u=u+(t.$.offsetTop-t.$.scrollTop),t.equals(this)||(r=r+(t.$.clientLeft||0),u=u+(t.$.clientTop||0));i&&!i.equals(t);)r=r-i.$.scrollLeft,u=u-i.$.scrollTop,i=i.getParent();i=t;t=(e=t.$.offsetParent)?new CKEDITOR.dom.element(e):null}return n&&(t=this.getWindow(),i=n.getWindow(),!t.equals(i)&&t.$.frameElement&&(n=new CKEDITOR.dom.element(t.$.frameElement).getDocumentPosition(n),r=r+n.x,u=u+n.y)),document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||f||(r=r+(this.$.clientLeft?1:0),u=u+(this.$.clientTop?1:0)),{x:r,y:u}},scrollIntoView:function(n){var t=this.getParent(),r,i;if(t)do if((t.$.clientWidth&&t.$.clientWidth<t.$.scrollWidth||t.$.clientHeight&&t.$.clientHeight<t.$.scrollHeight)&&!t.is("body")&&this.scrollIntoParent(t,n,1),t.is("html")){r=t.getWindow();try{i=r.$.frameElement;i&&(t=new CKEDITOR.dom.element(i))}catch(u){}}while(t=t.getParent())},scrollIntoParent:function(n,t,i){function l(t,i){/body|html/.test(n.getName())?n.getWindow().$.scrollBy(t,i):(n.$.scrollLeft=n.$.scrollLeft+t,n.$.scrollTop=n.$.scrollTop+i)}function h(n,t){var r={x:0,y:0},i;return n.is(c?"body":"html")||(i=n.$.getBoundingClientRect(),r.x=i.left,r.y=i.top),i=n.getWindow(),i.equals(t)||(i=h(CKEDITOR.dom.element.get(i.$.frameElement),t),r.x=r.x+i.x,r.y=r.y+i.y),r}function s(n,t){return parseInt(n.getComputedStyle("margin-"+t)||0,10)||0}var f,u,r,e,c,o,a,v,y;n||(n=this.getWindow());r=n.getDocument();c=r.$.compatMode=="BackCompat";n instanceof CKEDITOR.dom.window&&(n=c?r.getBody():r.getDocumentElement());r=n.getWindow();u=h(this,r);o=h(n,r);a=this.$.offsetHeight;f=this.$.offsetWidth;v=n.$.clientHeight;y=n.$.clientWidth;r=u.x-s(this,"left")-o.x||0;e=u.y-s(this,"top")-o.y||0;f=u.x+f+s(this,"right")-(o.x+y)||0;u=u.y+a+s(this,"bottom")-(o.y+v)||0;(e<0||u>0)&&l(0,t===!0?e:t===!1?u:e<0?e:u);i&&(r<0||f>0)&&l(r<0?r:f,0)},setState:function(n,t,i){t=t||"cke";switch(n){case CKEDITOR.TRISTATE_ON:this.addClass(t+"_on");this.removeClass(t+"_off");this.removeClass(t+"_disabled");i&&this.setAttribute("aria-pressed",!0);i&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(t+"_disabled");this.removeClass(t+"_off");this.removeClass(t+"_on");i&&this.setAttribute("aria-disabled",!0);i&&this.removeAttribute("aria-pressed");break;default:this.addClass(t+"_off");this.removeClass(t+"_on");this.removeClass(t+"_disabled");i&&this.removeAttribute("aria-pressed");i&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var n=this.$;try{n.contentWindow.document}catch(t){n.src=n.src}return n&&new CKEDITOR.dom.document(n.contentWindow.document)},copyAttributes:function(n,t){for(var u,i,r,e=this.$.attributes,t=t||{},f=0;f<e.length;f++)u=e[f],i=u.nodeName.toLowerCase(),i in t||(i=="checked"&&(r=this.getAttribute(i))?n.setAttribute(i,r):(u.specified||CKEDITOR.env.ie&&u.nodeValue&&i=="value")&&(r=this.getAttribute(i),r===null&&(r=u.nodeValue),n.setAttribute(i,r)));this.$.style.cssText!==""&&(n.$.style.cssText=this.$.style.cssText)},renameNode:function(n){if(this.getName()!=n){var t=this.getDocument(),n=new CKEDITOR.dom.element(n,t);this.copyAttributes(n);this.moveChildren(n);this.getParent()&&this.$.parentNode.replaceChild(n.$,this.$);n.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=n.$}},getChild:function(){function n(n,t){var i=n.childNodes;if(t>=0&&t<i.length)return i[t]}return function(t){var i=this.$;if(t.slice)for(;t.length>0&&i;)i=n(i,t.shift());else i=n(i,t);return i?new CKEDITOR.dom.node(i):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){this.on("contextmenu",function(n){n.data.getTarget().hasClass("cke_enable_context_menu")||n.data.preventDefault()})},getDirection:function(n){return n?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(n,t){return(n="data-"+n,t===void 0)?this.getAttribute(n):(t===!1?this.removeAttribute(n):this.setAttribute(n,t),null)},getEditor:function(){var t=CKEDITOR.instances,i,n;for(i in t)if(n=t[i],n.element.equals(this)&&n.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return n;return null},find:function(i){var r=n(this),i=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(t(this,i)));return r(),i},findOne:function(i){var r=n(this),i=this.$.querySelector(t(this,i));return r(),i?new CKEDITOR.dom.element(i):null},forEach:function(n,t,i){var r,i,u;if(i||t&&this.type!=t||(r=n(this)),r!==!1)for(i=this.getChildren(),u=0;u<i.count();u++)r=i.getItem(u),r.type==CKEDITOR.NODE_ELEMENT?r.forEach(n,t):(!t||r.type==t)&&n(r)}});var r={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(n,t,r){typeof t=="number"&&(!r||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(t=t-i.call(this,n)),this.setStyle(n,t+"px"))};CKEDITOR.dom.element.prototype.getSize=function(n,t){var r=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(n)],this.$["client"+CKEDITOR.tools.capitalize(n)])||0;return t&&(r=r-i.call(this,n)),r}}();CKEDITOR.dom.documentFragment=function(n){n=n||CKEDITOR.document;this.$=n.type==CKEDITOR.NODE_DOCUMENT?n.$.createDocumentFragment():n};CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(n){n=n.$;n.parentNode.insertBefore(this.$,n.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 n(n,t){var u=this.range,i,r,y,h,p,c,l;if(this._.end)return null;if(!this._.start){if(this._.start=1,u.collapsed)return this.end(),null;u.optimize()}r=u.startContainer;i=u.endContainer;var o=u.startOffset,s=u.endOffset,f,a=this.guard,e=this.type,v=n?"getPreviousSourceNode":"getNextSourceNode";for(n||this._.guardLTR||(y=i.type==CKEDITOR.NODE_ELEMENT?i:i.getParent(),h=i.type==CKEDITOR.NODE_ELEMENT?i.getChild(s):i.getNext(),this._.guardLTR=function(n,t){return(!t||!y.equals(n))&&(!h||!n.equals(h))&&(n.type!=CKEDITOR.NODE_ELEMENT||!t||!n.equals(u.root))}),n&&!this._.guardRTL&&(p=r.type==CKEDITOR.NODE_ELEMENT?r:r.getParent(),c=r.type==CKEDITOR.NODE_ELEMENT?o?r.getChild(o-1):null:r.getPrevious(),this._.guardRTL=function(n,t){return(!t||!p.equals(n))&&(!c||!n.equals(c))&&(n.type!=CKEDITOR.NODE_ELEMENT||!t||!n.equals(u.root))}),l=n?this._.guardRTL:this._.guardLTR,f=a?function(n,t){return l(n,t)===!1?!1:a(n,t)}:l,this.current?i=this.current[v](!1,e,f):(n?i.type==CKEDITOR.NODE_ELEMENT&&(i=s>0?i.getChild(s-1):f(i,!0)===!1?null:i.getPreviousSourceNode(!0,e,f)):(i=r,i.type!=CKEDITOR.NODE_ELEMENT||(i=i.getChild(o))||(i=f(r,!0)===!1?null:r.getNextSourceNode(!0,e,f))),i&&f(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[v](!1,e,f)}return this.end(),this.current=null}function u(t){for(var i,r=null;i=n.call(this,t);)r=i;return r}function h(n){var t,i;if(r(n))return!1;if(n.type==CKEDITOR.NODE_TEXT)return!0;if(n.type==CKEDITOR.NODE_ELEMENT){if(n.is(CKEDITOR.dtd.$inline)||n.getAttribute("contenteditable")=="false")return!0;if((t=!CKEDITOR.env.needsBrFiller)&&(t=n.is(s)))n:{for(t=0,i=n.getChildCount();t<i;++t)if(!r(n.getChild(t))){t=!1;break n}t=!0}if(t)return!0}return!1}var f,e,r,s;CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(n){this.range=n;this._={}},proto:{end:function(){this._.end=1},next:function(){return n.call(this)},previous:function(){return n.call(this,1)},checkForward:function(){return n.call(this,0,1)!==!1},checkBackward:function(){return n.call(this,1,1)!==!1},lastForward:function(){return u.call(this)},lastBackward:function(){return u.call(this,1)},reset:function(){delete this.current;this._={}}}});f={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};e={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(n){return this.getComputedStyle("float")=="none"&&!(this.getComputedStyle("position")in e)&&f[this.getComputedStyle("display")]?!0:!!(this.is(CKEDITOR.dtd.$block)||n&&this.is(n))};CKEDITOR.dom.walker.blockBoundary=function(n){return function(t){return!(t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary(n))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(n,t){function i(n){return n&&n.getName&&n.getName()=="span"&&n.data("cke-bookmark")}return function(r){var u,f;return u=r&&r.type!=CKEDITOR.NODE_ELEMENT&&(f=r.getParent())&&i(f),u=n?u:u||i(r),!!(t^u)}};CKEDITOR.dom.walker.whitespaces=function(n){return function(t){var i;return t&&t.type==CKEDITOR.NODE_TEXT&&(i=!CKEDITOR.tools.trim(t.getText())||CKEDITOR.env.webkit&&t.getText()=="​"),!!(n^i)}};CKEDITOR.dom.walker.invisible=function(n){var t=CKEDITOR.dom.walker.whitespaces();return function(i){return t(i)?i=1:(i.type==CKEDITOR.NODE_TEXT&&(i=i.getParent()),i=!i.$.offsetHeight),!!(n^i)}};CKEDITOR.dom.walker.nodeType=function(n,t){return function(i){return!!(t^i.type==n)}};CKEDITOR.dom.walker.bogus=function(n){function r(n){return!t(n)&&!i(n)}return function(t){var i=CKEDITOR.env.needsBrFiller?t.is&&t.is("br"):t.getText&&o.test(t.getText());return i&&(i=t.getParent(),t=t.getNext(r),i=i.isBlockBoundary()&&(!t||t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary())),!!(n^i)}};CKEDITOR.dom.walker.temp=function(n){return function(t){return t.type!=CKEDITOR.NODE_ELEMENT&&(t=t.getParent()),t=t&&t.hasAttribute("data-cke-temp"),!!(n^t)}};var o=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,t=CKEDITOR.dom.walker.whitespaces(),i=CKEDITOR.dom.walker.bookmark(),c=CKEDITOR.dom.walker.temp();CKEDITOR.dom.walker.ignored=function(n){return function(r){return r=t(r)||i(r)||c(r),!!(n^r)}};r=CKEDITOR.dom.walker.ignored();s=function(n){var i={},t;for(t in n)CKEDITOR.dtd[t]["#"]&&(i[t]=1);return i}(CKEDITOR.dtd.$block);CKEDITOR.dom.walker.editable=function(n){return function(t){return!!(n^h(t))}};CKEDITOR.dom.element.prototype.getBogus=function(){var n=this;do n=n.getPreviousSourceNode();while(i(n)||t(n)||n.type==CKEDITOR.NODE_ELEMENT&&n.is(CKEDITOR.dtd.$inline)&&!n.is(CKEDITOR.dtd.$empty));return n&&(CKEDITOR.env.needsBrFiller?n.is&&n.is("br"):n.getText&&o.test(n.getText()))?n:!1}}();CKEDITOR.dom.range=function(n){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=!0;var t=n instanceof CKEDITOR.dom.document;this.document=t?n:n.getDocument();this.root=t?n.getBody():n},function(){function u(){var n=!1,t=CKEDITOR.dom.walker.whitespaces(),i=CKEDITOR.dom.walker.bookmark(!0),r=CKEDITOR.dom.walker.bogus();return function(u){return i(u)||t(u)?!0:r(u)&&!n?n=!0:u.type==CKEDITOR.NODE_TEXT&&(u.hasAscendant("pre")||CKEDITOR.tools.trim(u.getText()).length)||u.type==CKEDITOR.NODE_ELEMENT&&!u.is(s)?!1:!0}}function o(n){var t=CKEDITOR.dom.walker.whitespaces(),i=CKEDITOR.dom.walker.bookmark(1);return function(r){return i(r)||t(r)?!0:!n&&e(r)||r.type==CKEDITOR.NODE_ELEMENT&&r.is(CKEDITOR.dtd.$removeEmpty)}}function f(n){return function(){var t;return this[n?"getPreviousNode":"getNextNode"](function(n){return!t&&r(n)&&(t=n),h(n)&&!(e(n)&&n.equals(t))})}}var n=function(n){n.collapsed=n.startContainer&&n.endContainer&&n.startContainer.equals(n.endContainer)&&n.startOffset==n.endOffset},t=function(n,t,i,r){var h,c,l,s,a,o,u,p,w,v;n.optimizeBookmark();var f=n.startContainer,e=n.endContainer,h=n.startOffset,c=n.endOffset,y,b;for(e.type==CKEDITOR.NODE_TEXT?e=e.split(c):e.getChildCount()>0&&(c>=e.getChildCount()?(e=e.append(n.document.createText("")),b=!0):e=e.getChild(c)),f.type==CKEDITOR.NODE_TEXT?(f.split(h),f.equals(e)&&(e=f.getNext())):h?h>=f.getChildCount()?(f=f.append(n.document.createText("")),y=!0):f=f.getChild(h).getPrevious():(f=f.append(n.document.createText(""),1),y=!0),h=f.getParents(),c=e.getParents(),l=0;l<h.length;l++)if(s=h[l],a=c[l],!s.equals(a))break;for(o=i,v=l;v<h.length;v++){for(u=h[v],o&&!u.equals(f)&&(p=o.append(u.clone())),u=u.getNext();u;){if(u.equals(c[v])||u.equals(e))break;w=u.getNext();t==2?o.append(u.clone(!0)):(u.remove(),t==1&&o.append(u));u=w}o&&(o=p)}for(o=i,i=l;i<c.length;i++){if(u=c[i],t>0&&!u.equals(e)&&(p=o.append(u.clone())),!h[i]||u.$.parentNode!=h[i].$.parentNode)for(u=u.getPrevious();u;){if(u.equals(h[i])||u.equals(f))break;w=u.getPrevious();t==2?o.$.insertBefore(u.$.cloneNode(!0),o.$.firstChild):(u.remove(),t==1&&o.$.insertBefore(u.$,o.$.firstChild));u=w}o&&(o=p)}t==2?(s=n.startContainer,s.type==CKEDITOR.NODE_TEXT&&(s.$.data=s.$.data+s.$.nextSibling.data,s.$.parentNode.removeChild(s.$.nextSibling)),n=n.endContainer,n.type==CKEDITOR.NODE_TEXT&&n.$.nextSibling&&(n.$.data=n.$.data+n.$.nextSibling.data,n.$.parentNode.removeChild(n.$.nextSibling))):(s&&a&&(f.$.parentNode!=s.$.parentNode||e.$.parentNode!=a.$.parentNode)&&(t=a.getIndex(),y&&a.$.parentNode==f.$.parentNode&&t--,r&&s.type==CKEDITOR.NODE_ELEMENT?(r=CKEDITOR.dom.element.createFromHtml('<span data-cke-bookmark="1" style="display:none">&nbsp;<\/span>',n.document),r.insertAfter(s),s.mergeSiblings(!1),n.moveToBookmark({startNode:r})):n.setStart(a.getParent(),t)),n.collapse(!0));y&&f.remove();b&&e.$.parentNode&&e.remove()},s={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},e=CKEDITOR.dom.walker.bogus(),i=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,h=CKEDITOR.dom.walker.editable(),r=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var n=new CKEDITOR.dom.range(this.root);return n.startContainer=this.startContainer,n.startOffset=this.startOffset,n.endContainer=this.endContainer,n.endOffset=this.endOffset,n.collapsed=this.collapsed,n},collapse:function(n){n?(this.endContainer=this.startContainer,this.endOffset=this.startOffset):(this.startContainer=this.endContainer,this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(){var n=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||t(this,2,n),n},deleteContents:function(n){this.collapsed||t(this,0,null,n)},extractContents:function(n){var i=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||t(this,1,i,n),i},createBookmark:function(n){var t,i,u,r,f=this.collapsed;return t=this.document.createElement("span"),t.data("cke-bookmark",1),t.setStyle("display","none"),t.setHtml("&nbsp;"),n&&(u="cke_bm_"+CKEDITOR.tools.getNextNumber(),t.setAttribute("id",u+(f?"C":"S"))),f||(i=t.clone(),i.setHtml("&nbsp;"),n&&i.setAttribute("id",u+"E"),r=this.clone(),r.collapse(),r.insertNode(i)),r=this.clone(),r.collapse(!0),r.insertNode(t),i?(this.setStartAfter(t),this.setEndBefore(i)):this.moveToPosition(t,CKEDITOR.POSITION_AFTER_END),{startNode:n?u+(f?"C":"S"):t,endNode:n?u+"E":i,serializable:n,collapsed:f}},createBookmark2:function(){function n(n){var i=n.container,r=n.offset,t,u;if(t=i,u=r,t=t.type!=CKEDITOR.NODE_ELEMENT||u===0||u==t.getChildCount()?0:t.getChild(u-1).type==CKEDITOR.NODE_TEXT&&t.getChild(u).type==CKEDITOR.NODE_TEXT,t&&(i=i.getChild(r-1),r=i.getLength()),i.type==CKEDITOR.NODE_ELEMENT&&r>1&&(r=i.getChild(r-1).getIndex(!0)+1),i.type==CKEDITOR.NODE_TEXT){for(t=i,u=0;(t=t.getPrevious())&&t.type==CKEDITOR.NODE_TEXT;)u=u+t.getLength();r=r+u}n.container=i;n.offset=r}return function(t){var i=this.collapsed,r={container:this.startContainer,offset:this.startOffset},u={container:this.endContainer,offset:this.endOffset};return t&&(n(r),i||n(u)),{start:r.container.getAddress(t),end:i?null:u.container.getAddress(t),startOffset:r.offset,endOffset:u.offset,normalized:t,collapsed:i,is2:!0}}}(),moveToBookmark:function(n){if(n.is2){var t=this.document.getByAddress(n.start,n.normalized),i=n.startOffset,r=n.end&&this.document.getByAddress(n.end,n.normalized),n=n.endOffset;this.setStart(t,i);r?this.setEnd(r,n):this.collapse(!0)}else t=(i=n.serializable)?this.document.getById(n.startNode):n.startNode,n=i?this.document.getById(n.endNode):n.endNode,this.setStartBefore(t),t.remove(),n?(this.setEndBefore(n),n.remove()):this.collapse(!0)},getBoundaryNodes:function(){var n=this.startContainer,t=this.endContainer,r=this.startOffset,u=this.endOffset,i;if(n.type==CKEDITOR.NODE_ELEMENT)if(i=n.getChildCount(),i>r)n=n.getChild(r);else if(i<1)n=n.getPreviousSourceNode();else{for(n=n.$;n.lastChild;)n=n.lastChild;n=new CKEDITOR.dom.node(n);n=n.getNextSourceNode()||n}if(t.type==CKEDITOR.NODE_ELEMENT)if(i=t.getChildCount(),i>u)t=t.getChild(u).getPreviousSourceNode(!0);else if(i<1)t=t.getPreviousSourceNode();else{for(t=t.$;t.lastChild;)t=t.lastChild;t=new CKEDITOR.dom.node(t)}return n.getPosition(t)&CKEDITOR.POSITION_FOLLOWING&&(n=t),{startNode:n,endNode:t}},getCommonAncestor:function(n,t){var i=this.startContainer,r=this.endContainer,i=i.equals(r)?n&&i.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?i.getChild(this.startOffset):i:i.getCommonAncestor(r);return t&&!i.is?i.getParent():i},optimize:function(){var n=this.startContainer,t=this.startOffset;n.type!=CKEDITOR.NODE_ELEMENT&&(t?t>=n.getLength()&&this.setStartAfter(n):this.setStartBefore(n));n=this.endContainer;t=this.endOffset;n.type!=CKEDITOR.NODE_ELEMENT&&(t?t>=n.getLength()&&this.setEndAfter(n):this.setEndBefore(n))},optimizeBookmark:function(){var t=this.startContainer,n=this.endContainer;t.is&&t.is("span")&&t.data("cke-bookmark")&&this.setStartAt(t,CKEDITOR.POSITION_BEFORE_START);n&&n.is&&n.is("span")&&n.data("cke-bookmark")&&this.setEndAt(n,CKEDITOR.POSITION_AFTER_END)},trim:function(n,t){var i=this.startContainer,r=this.startOffset,u=this.collapsed;if((!n||u)&&i&&i.type==CKEDITOR.NODE_TEXT){if(r)if(r>=i.getLength())r=i.getIndex()+1,i=i.getParent();else{var f=i.split(r),r=i.getIndex()+1,i=i.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(f,this.endOffset-this.startOffset):i.equals(this.endContainer)&&(this.endOffset=this.endOffset+1)}else r=i.getIndex(),i=i.getParent();if(this.setStart(i,r),u){this.collapse(!0);return}}i=this.endContainer;r=this.endOffset;t||u||!i||i.type!=CKEDITOR.NODE_TEXT||(r?(r>=i.getLength()||i.split(r),r=i.getIndex()+1):r=i.getIndex(),i=i.getParent(),this.setEnd(i,r))},enlarge:function(n,t){function k(n){return n&&n.type==CKEDITOR.NODE_ELEMENT&&n.hasAttribute("contenteditable")?null:n}var c,p,w,b,nt,tt;switch(n){case CKEDITOR.ENLARGE_INLINE:c=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var l=this.getCommonAncestor(),h=this.root,a,v,i,r,s,e=!1,u,f;for(u=this.startContainer,f=this.startOffset,u.type==CKEDITOR.NODE_TEXT?(f&&(u=!CKEDITOR.tools.trim(u.substring(0,f)).length&&u,e=!!u),!u||(r=u.getPrevious())||(i=u.getParent())):(f&&(r=u.getChild(f-1)||u.getLast()),r||(i=u)),i=k(i);i||r;){if(i&&!r){if(!s&&i.equals(l)&&(s=!0),c?i.isBlockBoundary():!h.contains(i))break;e&&i.getComputedStyle("display")=="inline"||(e=!1,s?a=i:this.setStartBefore(i));r=i.getPrevious()}for(;r;)if(u=!1,r.type==CKEDITOR.NODE_COMMENT)r=r.getPrevious();else{if(r.type==CKEDITOR.NODE_TEXT)f=r.getText(),/[^\s\ufeff]/.test(f)&&(r=null),u=/[\s\ufeff]$/.test(f);else if((r.$.offsetWidth>0||t&&r.is("br"))&&!r.data("cke-bookmark"))if(e&&CKEDITOR.dtd.$removeEmpty[r.getName()]){if(f=r.getText(),/[^\s\ufeff]/.test(f))r=null;else for(p=r.$.getElementsByTagName("*"),w=0;b=p[w++];)if(!CKEDITOR.dtd.$removeEmpty[b.nodeName.toLowerCase()]){r=null;break}r&&(u=!!f.length)}else r=null;if(u&&(e?s?a=i:i&&this.setStartBefore(i):e=!0),r){if(u=r.getPrevious(),!i&&!u){i=r;r=null;break}r=u}else i=null}i&&(i=k(i.getParent()))}for(u=this.endContainer,f=this.endOffset,i=r=null,s=e=!1,u.type==CKEDITOR.NODE_TEXT?(u=!CKEDITOR.tools.trim(u.substring(f)).length&&u,e=!(u&&u.getLength()),!u||(r=u.getNext())||(i=u.getParent())):(r=u.getChild(f))||(i=u);i||r;){if(i&&!r){if(!s&&i.equals(l)&&(s=!0),c?i.isBlockBoundary():!h.contains(i))break;e&&i.getComputedStyle("display")=="inline"||(e=!1,s?v=i:i&&this.setEndAfter(i));r=i.getNext()}for(;r;){if(u=!1,r.type==CKEDITOR.NODE_TEXT)f=r.getText(),/[^\s\ufeff]/.test(f)&&(r=null),u=/^[\s\ufeff]/.test(f);else if(r.type==CKEDITOR.NODE_ELEMENT){if((r.$.offsetWidth>0||t&&r.is("br"))&&!r.data("cke-bookmark"))if(e&&CKEDITOR.dtd.$removeEmpty[r.getName()]){if(f=r.getText(),/[^\s\ufeff]/.test(f))r=null;else for(p=r.$.getElementsByTagName("*"),w=0;b=p[w++];)if(!CKEDITOR.dtd.$removeEmpty[b.nodeName.toLowerCase()]){r=null;break}r&&(u=!!f.length)}else r=null}else u=1;if(u&&e&&(s?v=i:this.setEndAfter(i)),r){if(u=r.getNext(),!i&&!u){i=r;r=null;break}r=u}else i=null}i&&(i=k(i.getParent()))}a&&v&&(l=a.contains(v)?v:a,this.setStartBefore(l),this.setEndAfter(l));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:i=new CKEDITOR.dom.range(this.root);h=this.root;i.setStartAt(h,CKEDITOR.POSITION_AFTER_START);i.setEnd(this.startContainer,this.startOffset);i=new CKEDITOR.dom.walker(i);var o,d,it=CKEDITOR.dom.walker.blockBoundary(n==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),y=null,g=function(n){if(n.type==CKEDITOR.NODE_ELEMENT&&n.getAttribute("contenteditable")=="false")if(y){if(y.equals(n)){y=null;return}}else y=n;else if(y)return;var t=it(n);return t||(o=n),t},c=function(n){var t=g(n);return!t&&n.is&&n.is("br")&&(d=n),t};if(i.guard=g,i=i.lastBackward(),o=o||h,this.setStartAt(o,!o.is("br")&&(!i&&this.checkStartOfBlock()||i&&o.contains(i))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END),n==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS&&(i=this.clone(),i=new CKEDITOR.dom.walker(i),nt=CKEDITOR.dom.walker.whitespaces(),tt=CKEDITOR.dom.walker.bookmark(),i.evaluator=function(n){return!nt(n)&&!tt(n)},(i=i.previous())&&i.type==CKEDITOR.NODE_ELEMENT&&i.is("br")))break;i=this.clone();i.collapse();i.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);i=new CKEDITOR.dom.walker(i);i.guard=n==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?c:g;o=null;i=i.lastForward();o=o||h;this.setEndAt(o,!i&&this.checkEndOfBlock()||i&&o.contains(i)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);d&&this.setEndAfter(d)}},shrink:function(n,t,i){var r,c,l;if(!this.collapsed){var n=n||CKEDITOR.SHRINK_TEXT,r=this.clone(),u=this.startContainer,f=this.endContainer,s=this.startOffset,h=this.endOffset,e=1,o=1;return u&&u.type==CKEDITOR.NODE_TEXT&&(s?s>=u.getLength()?r.setStartAfter(u):(r.setStartBefore(u),e=0):r.setStartBefore(u)),f&&f.type==CKEDITOR.NODE_TEXT&&(h?h>=f.getLength()?r.setEndAfter(f):(r.setEndAfter(f),o=0):r.setEndBefore(f)),r=new CKEDITOR.dom.walker(r),c=CKEDITOR.dom.walker.bookmark(),r.evaluator=function(t){return t.type==(n==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)},r.guard=function(t,r){return c(t)?!0:n==CKEDITOR.SHRINK_ELEMENT&&t.type==CKEDITOR.NODE_TEXT||r&&t.equals(l)||i===!1&&t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary()||t.type==CKEDITOR.NODE_ELEMENT&&t.hasAttribute("contenteditable")?!1:(r||t.type!=CKEDITOR.NODE_ELEMENT||(l=t),!0)},e&&(u=r[n==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(u,t?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START),o&&(r.reset(),(r=r[n==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(r,t?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)),!(!e&&!o)}},insertNode:function(n){this.optimizeBookmark();this.trim(!1,!0);var t=this.startContainer,i=t.getChild(this.startOffset);i?n.insertBefore(i):t.append(n);n.getParent()&&n.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(n)},moveToPosition:function(n,t){this.setStartAt(n,t);this.collapse(!0)},moveToRange:function(n){this.setStart(n.startContainer,n.startOffset);this.setEnd(n.endContainer,n.endOffset)},selectNodeContents:function(n){this.setStart(n,0);this.setEnd(n,n.type==CKEDITOR.NODE_TEXT?n.getLength():n.getChildCount())},setStart:function(t,i){t.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[t.getName()]&&(i=t.getIndex(),t=t.getParent());this.startContainer=t;this.startOffset=i;this.endContainer||(this.endContainer=t,this.endOffset=i);n(this)},setEnd:function(t,i){t.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[t.getName()]&&(i=t.getIndex()+1,t=t.getParent());this.endContainer=t;this.endOffset=i;this.startContainer||(this.startContainer=t,this.startOffset=i);n(this)},setStartAfter:function(n){this.setStart(n.getParent(),n.getIndex()+1)},setStartBefore:function(n){this.setStart(n.getParent(),n.getIndex())},setEndAfter:function(n){this.setEnd(n.getParent(),n.getIndex()+1)},setEndBefore:function(n){this.setEnd(n.getParent(),n.getIndex())},setStartAt:function(t,i){switch(i){case CKEDITOR.POSITION_AFTER_START:this.setStart(t,0);break;case CKEDITOR.POSITION_BEFORE_END:t.type==CKEDITOR.NODE_TEXT?this.setStart(t,t.getLength()):this.setStart(t,t.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(t);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(t)}n(this)},setEndAt:function(t,i){switch(i){case CKEDITOR.POSITION_AFTER_START:this.setEnd(t,0);break;case CKEDITOR.POSITION_BEFORE_END:t.type==CKEDITOR.NODE_TEXT?this.setEnd(t,t.getLength()):this.setEnd(t,t.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(t);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(t)}n(this)},fixBlock:function(n,t){var r=this.createBookmark(),i=this.document.createElement(t);return this.collapse(n),this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),this.extractContents().appendTo(i),i.trim(),i.appendBogus(),this.insertNode(i),this.moveToBookmark(r),i},splitBlock:function(n){var r=new CKEDITOR.dom.elementPath(this.startContainer,this.root),f=new CKEDITOR.dom.elementPath(this.endContainer,this.root),t=r.block,i=f.block,u=null;return r.blockLimit.equals(f.blockLimit)?(n!="br"&&(t||(t=this.fixBlock(!0,n),i=new CKEDITOR.dom.elementPath(this.endContainer,this.root).block),i||(i=this.fixBlock(!1,n))),n=t&&this.checkStartOfBlock(),r=i&&this.checkEndOfBlock(),this.deleteContents(),t&&t.equals(i)&&(r?(u=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(i,CKEDITOR.POSITION_AFTER_END),i=null):n?(u=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(t,CKEDITOR.POSITION_BEFORE_START),t=null):(i=this.splitElement(t),t.is("ul","ol")||t.appendBogus())),{previousBlock:t,nextBlock:i,wasStartOfBlock:n,wasEndOfBlock:r,elementPath:u}):null},splitElement:function(n){if(!this.collapsed)return null;this.setEndAt(n,CKEDITOR.POSITION_BEFORE_END);var i=this.extractContents(),t=n.clone(!1);return i.appendTo(t),t.insertAfter(n),this.moveToPosition(n,CKEDITOR.POSITION_AFTER_END),t},removeEmptyBlocksAtEnd:function(){function n(n){return function(r){return t(r)||i(r)||r.type==CKEDITOR.NODE_ELEMENT&&r.isEmptyInlineRemoveable()||n.is("table")&&r.is("caption")?!1:!0}}var t=CKEDITOR.dom.walker.whitespaces(),i=CKEDITOR.dom.walker.bookmark(!1);return function(t){for(var f=this.createBookmark(),r=this[t?"endPath":"startPath"](),i=r.block||r.blockLimit,u;i&&!i.equals(r.root)&&!i.getFirst(n(i));)u=i.getParent(),this[t?"setEndAt":"setStartAt"](i,CKEDITOR.POSITION_AFTER_END),i.remove(1),i=u;this.moveToBookmark(f)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(n,t){var r=t==CKEDITOR.START,i=this.clone();return i.collapse(r),i[r?"setStartAt":"setEndAt"](n,r?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),i=new CKEDITOR.dom.walker(i),i.evaluator=o(r),i[r?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var n=this.startContainer,t=this.startOffset;return CKEDITOR.env.ie&&t&&n.type==CKEDITOR.NODE_TEXT&&(n=CKEDITOR.tools.ltrim(n.substring(0,t)),i.test(n)&&this.trim(0,1)),this.trim(),n=new CKEDITOR.dom.elementPath(this.startContainer,this.root),t=this.clone(),t.collapse(!0),t.setStartAt(n.block||n.blockLimit,CKEDITOR.POSITION_AFTER_START),n=new CKEDITOR.dom.walker(t),n.evaluator=u(),n.checkBackward()},checkEndOfBlock:function(){var n=this.endContainer,t=this.endOffset;return CKEDITOR.env.ie&&n.type==CKEDITOR.NODE_TEXT&&(n=CKEDITOR.tools.rtrim(n.substring(t)),i.test(n)&&this.trim(1,0)),this.trim(),n=new CKEDITOR.dom.elementPath(this.endContainer,this.root),t=this.clone(),t.collapse(!1),t.setEndAt(n.block||n.blockLimit,CKEDITOR.POSITION_BEFORE_END),n=new CKEDITOR.dom.walker(t),n.evaluator=u(),n.checkForward()},getPreviousNode:function(n,t,i){var r=this.clone();return r.collapse(1),r.setStartAt(i||this.root,CKEDITOR.POSITION_AFTER_START),i=new CKEDITOR.dom.walker(r),i.evaluator=n,i.guard=t,i.previous()},getNextNode:function(n,t,i){var r=this.clone();return r.collapse(),r.setEndAt(i||this.root,CKEDITOR.POSITION_BEFORE_END),i=new CKEDITOR.dom.walker(r),i.evaluator=n,i.guard=t,i.next()},checkReadOnly:function(){function n(n,t){for(;n;){if(n.type==CKEDITOR.NODE_ELEMENT){if(n.getAttribute("contentEditable")=="false"&&!n.data("cke-editable"))return 0;if(n.is("html")||n.getAttribute("contentEditable")=="true"&&(n.contains(t)||n.equals(t)))break}n=n.getParent()}return 1}return function(){var t=this.startContainer,i=this.endContainer;return!(n(t,i)&&n(i,t))}}(),moveToElementEditablePosition:function(n,t){var u;if(n.type==CKEDITOR.NODE_ELEMENT&&!n.isEditable(!1))return this.moveToPosition(n,t?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(u=0;n;){if(n.type==CKEDITOR.NODE_TEXT){t&&this.endContainer&&this.checkEndOfBlock()&&i.test(n.getText())?this.moveToPosition(n,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(n,t?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);u=1;break}if(n.type==CKEDITOR.NODE_ELEMENT)if(n.isEditable())this.moveToPosition(n,t?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),u=1;else if(t&&n.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(n,CKEDITOR.POSITION_BEFORE_START);else if(n.getAttribute("contenteditable")=="false"&&n.is(CKEDITOR.dtd.$block))return this.setStartBefore(n),this.setEndAfter(n),!0;var f=n,o=u,e=void 0;f.type==CKEDITOR.NODE_ELEMENT&&f.isEditable(!1)&&(e=f[t?"getLast":"getFirst"](r));o||e||(e=f[t?"getPrevious":"getNext"](r));n=e}return!!u},moveToClosestEditablePosition:function(n,t){var r=new CKEDITOR.dom.range(this.root),u=0,i,f=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];return r.moveToPosition(n,f[t?0:1]),n.is(CKEDITOR.dtd.$block)?(i=r[t?"getNextEditableNode":"getPreviousEditableNode"]())&&(u=1,i.type==CKEDITOR.NODE_ELEMENT&&i.is(CKEDITOR.dtd.$block)&&i.getAttribute("contenteditable")=="false"?(r.setStartAt(i,CKEDITOR.POSITION_BEFORE_START),r.setEndAt(i,CKEDITOR.POSITION_AFTER_END)):r.moveToPosition(i,f[t?1:0])):u=1,u&&this.moveToRange(r),!!u},moveToElementEditStart:function(n){return this.moveToElementEditablePosition(n)},moveToElementEditEnd:function(n){return this.moveToElementEditablePosition(n,!0)},getEnclosedNode:function(){var n=this.clone(),t;if(n.optimize(),n.startContainer.type!=CKEDITOR.NODE_ELEMENT||n.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var n=new CKEDITOR.dom.walker(n),i=CKEDITOR.dom.walker.bookmark(!1,!0),r=CKEDITOR.dom.walker.whitespaces(!0);return n.evaluator=function(n){return r(n)&&i(n)},t=n.next(),n.reset(),t&&t.equals(n.previous())?t:null},getTouchedStartNode:function(){var n=this.startContainer;return this.collapsed||n.type!=CKEDITOR.NODE_ELEMENT?n:n.getChild(this.startOffset)||n},getTouchedEndNode:function(){var n=this.endContainer;return this.collapsed||n.type!=CKEDITOR.NODE_ELEMENT?n:n.getChild(this.endOffset-1)||n},getNextEditableNode:f(),getPreviousEditableNode:f(1),scrollIntoView:function(){var t=new CKEDITOR.dom.element.createFromHtml("<span>&nbsp;<\/span>",this.document),i,r,u,n=this.clone();n.optimize();(u=n.startContainer.type==CKEDITOR.NODE_TEXT)?(r=n.startContainer.getText(),i=n.startContainer.split(n.startOffset),t.insertAfter(n.startContainer)):n.insertNode(t);t.scrollIntoView();u&&(n.startContainer.setText(r),i.remove());t.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 r(n){arguments.length<1||(this.range=n,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function t(t,i,r){for(t=t.getNextSourceNode(i,null,r);!n(t);)t=t.getNextSourceNode(i,null,r);return t}function u(n){var t=[];return n.forEach(function(n){if(n.getAttribute("contenteditable")=="true")return t.push(n),!1},CKEDITOR.NODE_ELEMENT,!0),t}function i(n,t,r,f){n:{f==void 0&&(f=u(r));for(var e;e=f.shift();)if(e.getDtd().p){f={element:e,remaining:f};break n}f=null}return f?(e=CKEDITOR.filter.instances[f.element.data("cke-filter")])&&!e.check(t)?i(n,t,r,f.remaining):(t=new CKEDITOR.dom.range(f.element),t.selectNodeContents(f.element),t=t.createIterator(),t.enlargeBr=n.enlargeBr,t.enforceRealBlocks=n.enforceRealBlocks,t.activeFilter=t.filter=e,n._.nestedEditable={element:f.element,container:r,remaining:f.remaining,iterator:t},1):0}var f=/^[\r\n\t ]+$/,n=CKEDITOR.dom.walker.bookmark(!1,!0),e=CKEDITOR.dom.walker.whitespaces(!0),o=function(t){return n(t)&&e(t)};r.prototype={getNextParagraph:function(r){var s,e,v,c,p,r=r||"p",h,u,l;if(this._.nestedEditable){if(s=this._.nestedEditable.iterator.getNextParagraph(r))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,s;if(this.activeFilter=this.filter,i(this,r,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(r);this._.nestedEditable=null}if(!this.range.root.getDtd()[r])return null;for(this._.started||(h=this.range.clone(),h.shrink(CKEDITOR.SHRINK_ELEMENT,!0),e=h.endContainer.hasAscendant("pre",!0)||h.startContainer.hasAscendant("pre",!0),h.enlarge(this.forceBrBreak&&!e||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS),h.collapsed||(e=new CKEDITOR.dom.walker(h.clone()),u=CKEDITOR.dom.walker.bookmark(!0,!0),e.evaluator=u,this._.nextNode=e.next(),e=new CKEDITOR.dom.walker(h.clone()),e.evaluator=u,e=e.previous(),this._.lastNode=e.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&&h.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=h.document.createText(""),this._.lastNode.insertAfter(e)),h=null),this._.started=1,e=h),u=this._.nextNode,h=this._.lastNode,this._.nextNode=null;u;){var y=0,w=u.hasAscendant("pre"),a=u.type!=CKEDITOR.NODE_ELEMENT,b=0;if(a)u.type==CKEDITOR.NODE_TEXT&&f.test(u.getText())&&(a=0);else if(l=u.getName(),CKEDITOR.dtd.$block[l]&&u.getAttribute("contenteditable")=="false"){s=u;i(this,r,s);break}else if(u.isBlockBoundary(this.forceBrBreak&&!w&&{br:1})){if(l=="br")a=1;else if(!e&&!u.getChildCount()&&l!="hr"){s=u;v=u.equals(h);break}e&&(e.setEndAt(u,CKEDITOR.POSITION_BEFORE_START),l!="br"&&(this._.nextNode=u));y=1}else{if(u.getFirst()){e||(e=this.range.clone(),e.setStartAt(u,CKEDITOR.POSITION_BEFORE_START));u=u.getFirst();continue}a=1}if(a&&!e&&(e=this.range.clone(),e.setStartAt(u,CKEDITOR.POSITION_BEFORE_START)),v=(!y||a)&&u.equals(h),e&&!y)for(;!u.getNext(o)&&!v;){if(l=u.getParent(),l.isBlockBoundary(this.forceBrBreak&&!w&&{br:1})){y=1;a=0;v||l.equals(h);e.setEndAt(l,CKEDITOR.POSITION_BEFORE_END);break}u=l;a=1;v=u.equals(h);b=1}if(a&&e.setEndAt(u,CKEDITOR.POSITION_AFTER_END),u=t(u,b,h),(v=!u)||y&&e)break}if(!s){if(!e)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;s=new CKEDITOR.dom.elementPath(e.startContainer,e.root);u=s.blockLimit;y={div:1,th:1,td:1};s=s.block;!s&&u&&!this.enforceRealBlocks&&y[u.getName()]&&e.checkStartOfBlock()&&e.checkEndOfBlock()&&!u.equals(e.root)?s=u:!s||this.enforceRealBlocks&&s.getName()=="li"?(s=this.range.document.createElement(r),e.extractContents().appendTo(s),s.trim(),e.insertNode(s),c=p=!0):s.getName()!="li"?e.checkStartOfBlock()&&e.checkEndOfBlock()||(s=s.clone(!1),e.extractContents().appendTo(s),s.trim(),p=e.splitBlock(),c=!p.wasStartOfBlock,p=!p.wasEndOfBlock,e.insertNode(s)):v||(this._.nextNode=s.equals(h)?null:t(e.getBoundaryNodes().endNode,1,h))}return c&&(c=s.getPrevious())&&c.type==CKEDITOR.NODE_ELEMENT&&(c.getName()=="br"?c.remove():c.getLast()&&c.getLast().$.nodeName.toLowerCase()=="br"&&c.getLast().remove()),p&&(c=s.getLast())&&c.type==CKEDITOR.NODE_ELEMENT&&c.getName()=="br"&&(!CKEDITOR.env.needsBrFiller||c.getPrevious(n)||c.getNext(n))&&c.remove(),this._.nextNode||(this._.nextNode=v||s.equals(h)||!h?null:t(s,1,h)),s}};CKEDITOR.dom.range.prototype.createIterator=function(){return new r(this)}}();CKEDITOR.command=function(n,t){this.uiItems=[];this.exec=function(i){return this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed()?!1:(this.editorFocus&&n.focus(),this.fire("exec")===!1?!0:t.exec.call(this,n,i)!==!1)};this.refresh=function(n,i){return!this.readOnly&&n.readOnly?!0:this.context&&!i.isContextFor(this.context)?(this.disable(),!0):this.checkAllowed(!0)?(this.startDisabled||this.enable(),this.modes&&!this.modes[n.mode]&&this.disable(),this.fire("refresh",{editor:n,path:i})===!1?!0:t.refresh&&t.refresh.apply(this,arguments)!==!1):(this.disable(),!0)};var i;this.checkAllowed=function(t){return!t&&typeof i=="boolean"?i:i=n.activeFilter.checkFeature(this)};CKEDITOR.tools.extend(this,t,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!t.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)};CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(!this.preserveState||typeof this.previousState=="undefined"?CKEDITOR.TRISTATE_OFF:this.previousState)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(n){return this.state==n||n!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed()?!1:(this.previousState=this.state,this.state=n,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(){function c(n,t,i,r,u){var f=t.name,u,e;if((r||typeof n.elements!="function"||n.elements(f))&&(!n.match||n.match(t))){if(r=!u){n:if(n.nothingRequired)r=!0;else{if(u=n.requiredClasses)for(f=t.classes,r=0;r<u.length;++r)if(CKEDITOR.tools.indexOf(f,u[r])==-1){r=!1;break n}r=v(t.styles,n.requiredStyles)&&v(t.attributes,n.requiredAttributes)}r=!r}if(!r&&(n.propertiesOnly||(i.valid=!0),i.allAttributes||(i.allAttributes=l(n.attributes,t.attributes,i.validAttributes)),i.allStyles||(i.allStyles=l(n.styles,t.styles,i.validStyles)),!i.allClasses)){if(n=n.classes,t=t.classes,r=i.validClasses,n)if(n===!0)t=!0;else{for(u=0,f=t.length;u<f;++u)e=t[u],r[e]||(r[e]=n(e));t=!1}else t=!1;i.allClasses=t}}}function l(n,t,i){if(!n)return!1;if(n===!0)return!0;for(var r in t)i[r]||(i[r]=n(r,t[r]));return!1}function f(n,t){if(!n)return!1;if(n===!0)return n;if(typeof n=="string")return n=s(n),n=="*"?!0:CKEDITOR.tools.convertArrayToObject(n.split(t));if(CKEDITOR.tools.isArray(n))return n.length?CKEDITOR.tools.convertArrayToObject(n):!1;var r={},u=0,i;for(i in n)r[i]=n[i],u++;return u?r:!1}function a(n){if(n._.filterFunction)return n._.filterFunction;var t=/^cke:(object|embed|param)$/,i=/^(object|embed|param)$/;return n._.filterFunction=function(r,u,f,e,o,s,h){var l=r.name,a,it=!1;if(o&&(r.name=l=l.replace(t,"$1")),f=f&&f[l]){for(w(r),l=0;l<f.length;++l)nt(n,r,f[l]);b(r)}if(u){var l=r.name,f=u.elements[l],y=u.generic,u={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1};if(!f&&!y)return e.push(r),!0;if(w(r),f)for(l=0,a=f.length;l<a;++l)c(f[l],r,u,!0,s);if(y)for(l=0,a=y.length;l<a;++l)c(y[l],r,u,!1,s);if(!u.valid)return e.push(r),!0;s=u.validAttributes;l=u.validStyles;f=u.validClasses;a=r.attributes;var y=r.styles,d=a["class"],rt=a.style,v,ut,tt=[],g=[],p=!1;if(delete a.style,delete a["class"],!u.allAttributes)for(v in a)s[v]||(/^data-cke-/.test(v)?v==(ut=v.replace(/^data-cke-saved-/,""))||s[ut]||(delete a[v],p=!0):(delete a[v],p=!0));if(u.allStyles)rt&&(a.style=rt);else{for(v in y)l[v]?tt.push(v+":"+y[v]):p=!0;tt.length&&(a.style=tt.sort().join("; "))}if(u.allClasses)d&&(a["class"]=d);else{for(v in f)f[v]&&g.push(v);g.length&&(a["class"]=g.sort().join(" "));d&&g.length<d.split(/\s+/).length&&(p=!0)}if(p&&(it=!0),!h&&!k(r))return e.push(r),!0}return o&&(r.name=r.name.replace(i,"cke:$1")),it}}function v(n,t){if(!t)return!0;for(var i=0;i<t.length;++i)if(!(t[i]in n))return!1;return!0}function y(n){if(!n)return{};for(var n=n.split(/\s*,\s*/).sort(),t={};n.length;)t[n.shift()]=h;return t}function p(n){for(var i,t,r,u,f={},o=1,n=s(n);i=n.match(et);)(t=i[2])?(r=e(t,"styles"),u=e(t,"attrs"),t=e(t,"classes")):r=u=t=null,f["$"+o++]={elements:i[1],classes:t,styles:r,attributes:u},n=n.slice(i[0].length);return f}function e(n,t){var i=n.match(ot[t]);return i?s(i[1]):null}function w(n){n.styles||(n.styles=CKEDITOR.tools.parseCssText(n.attributes.style||"",1));n.classes||(n.classes=n.attributes["class"]?n.attributes["class"].split(/\s+/):[])}function b(n){var t=n.attributes,i;delete t.style;delete t["class"];(i=CKEDITOR.tools.writeCssText(n.styles,!0))&&(t.style=i);n.classes.length&&(t["class"]=n.classes.sort().join(" "))}function k(n){switch(n.name){case"a":if(!n.children.length&&!n.attributes.name)return!1;break;case"img":if(!n.attributes.src)return!1}return!0}function d(n){return n?n===!0?!0:function(t){return t in n}:!1}function o(){return new CKEDITOR.htmlParser.element("br")}function g(t){return t.type==CKEDITOR.NODE_ELEMENT&&(t.name=="br"||n.$block[t.name])}function t(t,i,r){var f=t.name,e,u,s,c,h;if(n.$empty[f]||!t.children.length)f=="hr"&&i=="br"?t.replaceWith(o()):(t.parent&&r.push({check:"it",el:t.parent}),t.remove());else if(n.$block[f]||f=="tr")if(i=="br")t.previous&&!g(t.previous)&&(i=o(),i.insertBefore(t)),t.next&&!g(t.next)&&(i=o(),i.insertAfter(t)),t.replaceWithChildren();else{f=t.children;n:{for(e=n[i],s=0,h=f.length;s<h;++s)if(u=f[s],u.type==CKEDITOR.NODE_ELEMENT&&!e[u.name]){e=!1;break n}e=!0}if(e)t.name=i,t.attributes={},r.push({check:"parent-down",el:t});else{for(e=t.parent,s=e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||e.name=="body",h=f.length;h>0;)u=f[--h],s&&(u.type==CKEDITOR.NODE_TEXT||u.type==CKEDITOR.NODE_ELEMENT&&n.$inline[u.name])?(c||(c=new CKEDITOR.htmlParser.element(i),c.insertAfter(t),r.push({check:"parent-down",el:c})),c.add(u,0)):(c=null,u.insertAfter(t),e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||u.type!=CKEDITOR.NODE_ELEMENT||n[e.name][u.name]||r.push({check:"el-up",el:u}));t.remove()}}else f=="style"?t.remove():(t.parent&&r.push({check:"it",el:t.parent}),t.replaceWithChildren())}function nt(n,t,i){for(var r,u=0;u<i.length;++u)if(r=i[u],(!r.check||n.check(r.check,!1))&&(!r.left||r.left(t))){r.right(t,st);break}}function tt(n,t){var i=t.getDefinition(),u=i.attributes,e=i.styles,r,f,o,s;if(n.name!=i.element)return!1;for(r in u)if(r=="class"){for(i=u[r].split(/\s+/),o=n.classes.join("|");s=i.pop();)if(o.indexOf(s)==-1)return!1}else if(n.attributes[r]!=u[r])return!1;for(f in e)if(n.styles[f]!=e[f])return!1;return!0}function rt(n,t){var i,r;return typeof n=="string"?i=n:n instanceof CKEDITOR.style?r=n:(i=n[0],r=n[1]),[{element:i,left:r,right:function(n,i){i.transform(n,t)}}]}function ut(n){return function(t){return tt(t,n)}}function ft(n){return function(t,i){i[n](t)}}var n=CKEDITOR.dtd,i=CKEDITOR.tools.copy,s=CKEDITOR.tools.trim,h="cke-test",r=["","p","br","div"];CKEDITOR.filter=function(n){if(this.allowedContent=[],this.disabled=!1,this.editor=null,this.id=CKEDITOR.tools.getNextNumber(),this._={rules:{},transformations:{},cachedTests:{}},CKEDITOR.filter.instances[this.id]=this,n instanceof CKEDITOR.editor){n=this.editor=n;this.customConfig=!0;var t=n.config.allowedContent;t===!0?this.disabled=!0:(t||(this.customConfig=!1),this.allow(t,"config",1),this.allow(n.config.extraAllowedContent,"extra",1),this.allow(r[n.enterMode]+" "+r[n.shiftEnterMode],"default",1))}else this.customConfig=!1,this.allow(n,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(n,t,r){var y,e,v,r,s,o,c;if(this.disabled||this.customConfig&&!r||!n)return!1;if(this._.cachedChecks={},typeof n=="string")n=p(n);else if(n instanceof CKEDITOR.style)e=n.getDefinition(),r={},n=e.attributes,r[e.element]=e={styles:e.styles,requiredStyles:e.styles&&CKEDITOR.tools.objectKeys(e.styles)},n&&(n=i(n),e.classes=n["class"]?n["class"].split(/\s+/):null,e.requiredClasses=e.classes,delete n["class"],e.attributes=n,e.requiredAttributes=n&&CKEDITOR.tools.objectKeys(n)),n=r;else if(CKEDITOR.tools.isArray(n)){for(y=0;y<n.length;++y)e=this.allow(n[y],t,r);return e}r=[];for(v in n){e=n[v];e=typeof e=="boolean"?{}:typeof e=="function"?{match:e}:i(e);v.charAt(0)!="$"&&(e.elements=v);t&&(e.featureName=t.toLowerCase());s=e;s.elements=f(s.elements,/\s+/)||null;s.propertiesOnly=s.propertiesOnly||s.elements===!0;o=/\s*,\s*/;c=void 0;for(c in it){s[c]=f(s[c],o)||null;var l=s,h=u[c],w=f(s[u[c]],o),b=s[c],g=[],k=!0,a=void 0;w?k=!1:w={};for(a in b)a.charAt(0)=="!"&&(a=a.slice(1),g.push(a),w[a]=!0,k=!1);for(;a=g.pop();)b[a]=b["!"+a],delete b["!"+a];l[h]=(k?!1:w)||null}s.match=s.match||null;this.allowedContent.push(e);r.push(e)}for(t=this._.rules,v=t.elements||{},n=t.generic||[],e=0,s=r.length;e<s;++e){o=i(r[e]);c=o.classes===!0||o.styles===!0||o.attributes===!0;l=o;h=void 0;for(h in it)l[h]=d(l[h]);w=!0;for(h in u)h=u[h],l[h]=CKEDITOR.tools.objectKeys(l[h]),l[h]&&(w=!1);if(l.nothingRequired=w,o.elements===!0||o.elements===null)o.elements=d(o.elements),n[c?"unshift":"push"](o);else{l=o.elements;delete o.elements;for(y in l)v[y]?v[y][c?"unshift":"push"](o):v[y]=[o]}}return t.elements=v,t.generic=n.length?n:null,!0},applyTo:function(i,u,f,e){var c,i,e;if(this.disabled)return!1;var o=[],l=!f&&this._.rules,v=this._.transformations,y=a(this),s=this.editor&&this.editor.config.protectedSource,h=!1;for(i.forEach(function(n){var i,t,f,r,e;if(n.type==CKEDITOR.NODE_ELEMENT){if(n.attributes["data-cke-filter"]=="off")return!1;u&&n.name=="span"&&~CKEDITOR.tools.objectKeys(n.attributes).join("|").indexOf("data-cke-")||y(n,l,v,o,u)&&(h=!0)}else if(n.type==CKEDITOR.NODE_COMMENT&&n.value.match(/^\{cke_protected\}(?!\{C\})/)){n:{if(t=decodeURIComponent(n.value.replace(/^\{cke_protected\}/,"")),i=[],s)for(r=0;r<s.length;++r)if((e=t.match(s[r]))&&e[0].length==t.length){i=!0;break n}t=CKEDITOR.htmlParser.fragment.fromHtml(t);t.children.length==1&&(f=t.children[0]).type==CKEDITOR.NODE_ELEMENT&&y(f,l,v,i,u);i=!i.length}i||o.push(n)}},null,!0),o.length&&(h=!0),i=[],e=r[e||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];f=o.pop();)f.type==CKEDITOR.NODE_ELEMENT?t(f,e,i):f.remove();for(;c=i.pop();)if(f=c.el,f.parent)switch(c.check){case"it":n.$removeEmpty[f.name]&&!f.children.length?t(f,e,i):k(f)||t(f,e,i);break;case"el-up":f.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[f.parent.name][f.name]||t(f,e,i);break;case"parent-down":f.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[f.parent.name][f.name]||t(f.parent,e,i)}return h},checkFeature:function(n){return this.disabled||!n?!0:(n.toFeature&&(n=n.toFeature(this.editor)),!n.requiredContent||this.check(n.requiredContent))},disable:function(){this.disabled=!0},addContentForms:function(n){if(!this.disabled&&n){for(var i,u=[],r,t=0;t<n.length&&!r;++t)i=n[t],(typeof i=="string"||i instanceof CKEDITOR.style)&&this.check(i)&&(r=i);if(r){for(t=0;t<n.length;++t)u.push(rt(n[t],r));this.addTransformations(u)}}},addFeature:function(n){return this.disabled||!n?!0:(n.toFeature&&(n=n.toFeature(this.editor)),this.allow(n.allowedContent,n.name),this.addTransformations(n.contentTransformations),this.addContentForms(n.contentForms),this.customConfig&&n.requiredContent?this.check(n.requiredContent):!0)},addTransformations:function(n){var r,c,o,s;if(!this.disabled&&n)for(o=this._.transformations,s=0;s<n.length;++s){r=n[s];var i=void 0,h=void 0,t=void 0,u=void 0,f=void 0,e=void 0;for(c=[],h=0;h<r.length;++h)t=r[h],typeof t=="string"?(t=t.split(/\s*:\s*/),u=t[0],f=null,e=t[1]):(u=t.check,f=t.left,e=t.right),i||(i=t,i=i.element?i.element:u?u.match(/^([a-z0-9]+)/i)[0]:i.left.getDefinition().element),f instanceof CKEDITOR.style&&(f=ut(f)),c.push({check:u==i?null:u,left:f,right:typeof e=="string"?ft(e):e});r=i;o[r]||(o[r]=[]);o[r].push(c)}},check:function(n,t,r){var u,f,o,e,s,h;if(this.disabled)return!0;if(CKEDITOR.tools.isArray(n)){for(u=n.length;u--;)if(this.check(n[u],t,r))return!0;return!1}if(typeof n=="string"){if(o=n+"<"+(t===!1?"0":"1")+(r?"1":"0")+">",o in this._.cachedChecks)return this._.cachedChecks[o];u=p(n).$1;f=u.styles;e=u.classes;u.name=u.elements;u.classes=e=e?e.split(/\s*,\s*/):[];u.styles=y(f);u.attributes=y(u.attributes);u.children=[];e.length&&(u.attributes["class"]=e.join(" "));f&&(u.attributes.style=CKEDITOR.tools.writeCssText(u.styles));f=u}else u=n.getDefinition(),f=u.styles,e=u.attributes||{},f?(f=i(f),e.style=CKEDITOR.tools.writeCssText(f,!0)):f={},f={name:u.element,attributes:e,classes:e["class"]?e["class"].split(/\s+/):[],styles:f,children:[]};if(e=CKEDITOR.tools.clone(f),s=[],t!==!1&&(h=this._.transformations[f.name])){for(u=0;u<h.length;++u)nt(this,f,h[u]);b(f)}return a(this)(e,this._.rules,t===!1?!1:this._.transformations,s,!1,!r,!r),t=s.length>0?!1:CKEDITOR.tools.objectCompare(f.attributes,e.attributes,!0)?!0:!1,typeof n=="string"&&(this._.cachedChecks[o]=t),t},getAllowedEnterMode:function(){var n=["p","div","br"],t={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(i,u){var f=n.slice(),e;if(this.check(r[i]))return i;for(u||(f=f.reverse());e=f.pop();)if(this.check(e))return t[e];return CKEDITOR.ENTER_BR}}()};var it={styles:1,attributes:1,classes:1},u={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},et=/^([a-z0-9*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,ot={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},st=CKEDITOR.filter.transformationsTools={sizeToStyle:function(n){this.lengthToStyle(n,"width");this.lengthToStyle(n,"height")},sizeToAttribute:function(n){this.lengthToAttribute(n,"width");this.lengthToAttribute(n,"height")},lengthToStyle:function(n,t,i){if(i=i||t,!(i in n.styles)){var r=n.attributes[t];r&&(/^\d+$/.test(r)&&(r=r+"px"),n.styles[i]=r)}delete n.attributes[t]},lengthToAttribute:function(n,t,i){if(i=i||t,!(i in n.attributes)){var r=n.styles[t],u=r&&r.match(/^(\d+)(?:\.\d*)?px$/);u?n.attributes[i]=u[1]:r==h&&(n.attributes[i]=h)}delete n.styles[t]},alignmentToStyle:function(n){if(!("float"in n.styles)){var t=n.attributes.align;(t=="left"||t=="right")&&(n.styles.float=t)}delete n.attributes.align},alignmentToAttribute:function(n){if(!("align"in n.attributes)){var t=n.styles.float;(t=="left"||t=="right")&&(n.attributes.align=t)}delete n.styles.float},matchesStyle:tt,transform:function(n,t){if(typeof t=="string")n.name=t;else{var i=t.getDefinition(),o=i.styles,u=i.attributes,r,f,s,e;n.name=i.element;for(r in u)if(r=="class")for(i=n.classes.join("|"),s=u[r].split(/\s+/);e=s.pop();)i.indexOf(e)==-1&&n.classes.push(e);else n.attributes[r]=u[r];for(f in o)n.styles[f]=o[f]}}}}(),function(){CKEDITOR.focusManager=function(n){return n.focusManager?n.focusManager:(this.hasFocus=!1,this.currentActive=null,this._={editor:n},this)};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(n){this._.timer&&clearTimeout(this._.timer);n&&(this.currentActive=n);this.hasFocus||this._.locked||((n=CKEDITOR.currentInstance)&&n.focusManager.blur(1),this.hasFocus=!0,(n=this._.editor.container)&&n.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(n){function t(){if(this.hasFocus){this.hasFocus=!1;var n=this._.editor.container;n&&n.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var i=CKEDITOR.focusManager._.blurDelay;n||!i?t.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;t.call(this)},i,this)}},add:function(n,t){var i=n.getCustomData("focusmanager"),u,r;if(!i||i!=this){i&&i.remove(n);i="focus";u="blur";t&&(CKEDITOR.env.ie?(i="focusin",u="focusout"):CKEDITOR.event.useCapture=1);r={blur:function(){n.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(n)}};n.on(i,r.focus,this);n.on(u,r.blur,this);t&&(CKEDITOR.event.useCapture=0);n.setCustomData("focusmanager",this);n.setCustomData("focusmanager_handlers",r)}},remove:function(n){n.removeCustomData("focusmanager");var t=n.removeCustomData("focusmanager_handlers");n.removeListener("blur",t.blur);n.removeListener("focus",t.focus)}}}();CKEDITOR.keystrokeHandler=function(n){return n.keystrokeHandler?n.keystrokeHandler:(this.keystrokes={},this.blockedKeystrokes={},this._={editor:n},this)},function(){var n,t=function(t){var t=t.data,i=t.getKeystroke(),r=this.keystrokes[i],u=this._.editor;return n=u.fire("key",{keyCode:i})===!1,n||(r&&(n=u.execCommand(r,{from:"keystrokeHandler"})!==!1),n||(n=!!this.blockedKeystrokes[i])),n&&t.preventDefault(!0),!n},i=function(t){n&&(n=!1,t.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(n){n.on("keydown",t,this);if(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)n.on("keypress",i,this)}}}(),function(){CKEDITOR.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(n,t,i){n&&CKEDITOR.lang.languages[n]||(n=this.detect(t,n));this[n]?i(n,this[n]):CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+n+".js"),function(){this[n].dir=this.rtl[n]?"rtl":"ltr";i(n,this[n])},this)},detect:function(n,t){var u=this.languages,t=t||navigator.userLanguage||navigator.language||n,r=t.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),i=r[1],r=r[2];return u[i+"-"+r]?i=i+"-"+r:u[i]||(i=null),CKEDITOR.lang.detect=i?function(){return i}:function(n){return n},i||n}}}();CKEDITOR.scriptLoader=function(){var t={},n={};return{load:function(i,r,u,f){var h=typeof i=="string",e;h&&(i=[i]);u||(u=CKEDITOR);var o=i.length,c=[],l=[],a=function(n){r&&(h?r.call(u,n):r.call(u,c,l))};if(o===0)a(!0);else{var v=function(n,t){(t?c:l).push(n);--o<=0&&(f&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),a(t))},s=function(i,r){var f,u;for(t[i]=1,f=n[i],delete n[i],u=0;u<f.length;u++)f[u](i,r)},y=function(i){var f,u;t[i]?v(i,!0):(f=n[i]||(n[i]=[]),f.push(v),f.length>1||(u=new CKEDITOR.dom.element("script"),u.setAttributes({type:"text/javascript",src:i}),r&&(CKEDITOR.env.ie&&CKEDITOR.env.version<11?u.$.onreadystatechange=function(){(u.$.readyState=="loaded"||u.$.readyState=="complete")&&(u.$.onreadystatechange=null,s(i,!0))}:(u.$.onload=function(){setTimeout(function(){s(i,!0)},0)},u.$.onerror=function(){s(i,!1)})),u.appendTo(CKEDITOR.document.getHead())))};for(f&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait"),e=0;e<o;e++)y(i[e])}},queue:function(){function t(){var t;(t=n[0])&&this.load(t.scriptUrl,t.callback,CKEDITOR,0)}var n=[];return function(i,r){var u=this;n.push({scriptUrl:i,callback:function(){r&&r.apply(this,arguments);n.shift();t.call(u)}});n.length==1&&t.call(this)}}()}}();CKEDITOR.resourceManager=function(n,t){this.basePath=n;this.fileName=t;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}};CKEDITOR.resourceManager.prototype={add:function(n,t){if(this.registered[n])throw'[CKEDITOR.resourceManager.add] The resource name "'+n+'" is already registered.';var i=this.registered[n]=t||{};return i.name=n,i.path=this.getPath(n),CKEDITOR.fire(n+CKEDITOR.tools.capitalize(this.fileName)+"Ready",i),this.get(n)},get:function(n){return this.registered[n]||null},getPath:function(n){var t=this.externals[n];return CKEDITOR.getUrl(t&&t.dir||this.basePath+n+"/")},getFilePath:function(n){var t=this.externals[n];return CKEDITOR.getUrl(this.getPath(n)+(t?t.file:this.fileName+".js"))},addExternal:function(n,t,i){for(var u,n=n.split(","),r=0;r<n.length;r++)u=n[r],i||(t=t.replace(/[^\/]+$/,function(n){return i=n,""})),this.externals[u]={dir:t,file:i||this.fileName+".js"}},load:function(n,t,i){var r,f;CKEDITOR.tools.isArray(n)||(n=n?[n]:[]);for(var s=this.loaded,c=this.registered,h=[],u={},e={},o=0;o<n.length;o++)r=n[o],r&&(s[r]||c[r]?e[r]=this.get(r):(f=this.getFilePath(r),h.push(f),f in u||(u[f]=[]),u[f].push(r)));CKEDITOR.scriptLoader.load(h,function(n,r){var f,c,o,h;if(r.length)throw'[CKEDITOR.resourceManager.load] Resource name "'+u[r[0]].join(",")+'" was not found at "'+r[0]+'".';for(f=0;f<n.length;f++)for(c=u[n[f]],o=0;o<c.length;o++)h=c[o],e[h]=this.get(h),s[h]=1;t.call(i,e)},this)}};CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin");CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(n){var t={};return function(i,r,u){var f={},e=function(i){n.call(this,i,function(n){var h,s,i,o,c,l;CKEDITOR.tools.extend(f,n);h=[];for(s in n){if(i=n[s],o=i&&i.requires,!t[s]){if(i.icons)for(c=i.icons.split(","),l=c.length;l--;)CKEDITOR.skin.addIcon(c[l],i.path+"icons/"+(CKEDITOR.env.hidpi&&i.hidpi?"hidpi/":"")+c[l]+".png");t[s]=1}if(o)for(o.split&&(o=o.split(",")),i=0;i<o.length;i++)f[o[i]]||h.push(o[i])}if(h.length)e.call(this,h);else{for(s in f)i=f[s],i.onLoad&&!i.onLoad._called&&(i.onLoad()===!1&&delete f[s],i.onLoad._called=1);r&&r.call(u||window,f)}},this)};e.call(this,i)}});CKEDITOR.plugins.setLang=function(n,t,i){var r=this.get(n),n=r.langEntries||(r.langEntries={}),r=r.lang||(r.lang=[]);r.split&&(r=r.split(","));CKEDITOR.tools.indexOf(r,t)==-1&&r.push(t);n[t]=i};CKEDITOR.ui=function(n){return n.ui?n.ui:(this.items={},this.instances={},this.editor=n,this._={handlers:{}},this)};CKEDITOR.ui.prototype={add:function(n,t,i){i.name=n.toLowerCase();var r=this.items[n]={type:t,command:i.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(r,i)},get:function(n){return this.instances[n]},create:function(n){var i=this.items[n],t=i&&this._.handlers[i.type],r=i&&i.command&&this.editor.getCommand(i.command),t=t&&t.create.apply(this,i.args);return this.instances[n]=t,r&&r.uiItems.push(t),t&&!t.type&&(t.type=i.type),t},addHandler:function(n,t){this._.handlers[n]=t},space:function(n){return CKEDITOR.document.getById(this.spaceId(n))},spaceId:function(n){return this.editor.id+"_"+n}};CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function t(n,t,r){if(CKEDITOR.event.call(this),n=n&&CKEDITOR.tools.clone(n),t!==void 0){if(t instanceof CKEDITOR.dom.element){if(!r)throw Error("One of the element modes must be specified.");}else throw Error("Expect element of type CKEDITOR.dom.element.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&r==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!(r==CKEDITOR.ELEMENT_MODE_INLINE?t.is(CKEDITOR.dtd.$editable)||t.is("textarea"):r==CKEDITOR.ELEMENT_MODE_REPLACE?!t.is(CKEDITOR.dtd.$nonBodyContent):1))throw Error('The specified element mode is not supported on element: "'+t.getName()+'".');this.element=t;this.elementMode=r;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(t.getId()||t.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||o();this.id=CKEDITOR.tools.getNextId();this.status="unloaded";this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);this.ui=new CKEDITOR.ui(this);this.focusManager=new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);this.on("readOnly",i);this.on("selectionChange",function(n){u(this,n.data.path)});this.on("activeFilterChange",function(){u(this,this.elementPath(),!0)});this.on("mode",i);this.on("instanceReady",function(){this.config.startupFocus&&this.focus()});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){s(this,n)},0,this)}function o(){do var n="editor"+ ++v;while(CKEDITOR.instances[n]);return n}function i(){var n=this.commands,t;for(t in n)r(this,n[t])}function r(n,t){t[t.startDisabled?"disable":n.readOnly&&!t.readOnly?"disable":t.modes[n.mode]?"enable":"disable"]()}function u(n,t,i){if(t){var r,u,f=n.commands;for(u in f)r=f[u],(i||r.contextSensitive)&&r.refresh(n,t)}}function n(t){var i=t.config.customConfig,r;return i?(i=CKEDITOR.getUrl(i),r=e[i]||(e[i]={}),r.fn?(r.fn.call(t,t.config),CKEDITOR.getUrl(t.config.customConfig)!=i&&n(t)||t.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(i,function(){r.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};n(t)}),!0):!1}function s(t,i){t.on("customConfigLoaded",function(){if(i){if(i.on)for(var n in i.on)t.on(n,i.on[n]);CKEDITOR.tools.extend(t.config,i,!0);delete t.config.on}n=t.config;t.readOnly=!(!n.readOnly&&!(t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?t.element.is("textarea")?t.element.hasAttribute("disabled"):t.element.isReadOnly():t.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&t.element.hasAttribute("disabled")));t.blockless=t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?!(t.element.is("textarea")||CKEDITOR.dtd[t.element.getName()].p):!1;t.tabIndex=n.tabIndex||t.element&&t.element.getAttribute("tabindex")||0;t.activeEnterMode=t.enterMode=t.blockless?CKEDITOR.ENTER_BR:n.enterMode;t.activeShiftEnterMode=t.shiftEnterMode=t.blockless?CKEDITOR.ENTER_BR:n.shiftEnterMode;n.skin&&(CKEDITOR.skinName=n.skin);t.fireOnce("configLoaded");t.dataProcessor=new CKEDITOR.htmlDataProcessor(t);t.filter=t.activeFilter=new CKEDITOR.filter(t);h(t)});i&&i.customConfig!=void 0&&(t.config.customConfig=i.customConfig);n(t)||t.fireOnce("customConfigLoaded")}function h(n){CKEDITOR.skin.loadPart("editor",function(){c(n)})}function c(n){CKEDITOR.lang.load(n.config.language,n.config.defaultLanguage,function(t,i){var r=n.config.title;n.langCode=t;n.lang=CKEDITOR.tools.prototypedCopy(i);n.title=typeof r=="string"||r===!1?r:[n.lang.editor,n.name].join(", ");CKEDITOR.env.gecko&&CKEDITOR.env.version<10900&&n.lang.dir=="rtl"&&(n.lang.dir="ltr");n.config.contentsLangDirection||(n.config.contentsLangDirection=n.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?n.element.getDirection(1):n.lang.dir);n.fire("langLoaded");l(n)})}function l(n){n.getStylesSet(function(t){n.once("loaded",function(){n.fire("stylesSet",{styles:t})},null,null,1);a(n)})}function a(n){var i=n.config,t=i.plugins,r=i.extraPlugins,f=i.removePlugins,u;if(r)var e=RegExp("(?:^|,)(?:"+r.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),t=t.replace(e,""),t=t+(","+r);f&&(u=RegExp("(?:^|,)(?:"+f.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),t=t.replace(u,""));CKEDITOR.env.air&&(t=t+",adobeair");CKEDITOR.plugins.load(t.split(","),function(t){var h=[],c=[],l=[],s;n.plugins=t;for(s in t){var e=t[s],f=e.lang,r=null,o=e.requires,a;if(CKEDITOR.tools.isArray(o)&&(o=o.join(",")),o&&(a=o.match(u)))for(;o=a.pop();)CKEDITOR.tools.setTimeout(function(n,t){throw Error('Plugin "'+n.replace(",","")+'" cannot be removed from the plugins list, because it\'s required by "'+t+'" plugin.');},0,null,[o,s]);f&&!n.lang[s]&&(f.split&&(f=f.split(",")),CKEDITOR.tools.indexOf(f,n.langCode)>=0?r=n.langCode:(r=n.langCode.replace(/-.*/,""),r=r!=n.langCode&&CKEDITOR.tools.indexOf(f,r)>=0?r:CKEDITOR.tools.indexOf(f,"en")>=0?"en":f[0]),e.langEntries&&e.langEntries[r]?(n.lang[s]=e.langEntries[r],r=null):l.push(CKEDITOR.getUrl(e.path+"lang/"+r+".js")));c.push(r);h.push(e)}CKEDITOR.scriptLoader.load(l,function(){for(var t,r,f=["beforeInit","init","afterInit"],u=0;u<f.length;u++)for(t=0;t<h.length;t++)r=h[t],u===0&&c[t]&&r.lang&&r.langEntries&&(n.lang[r.name]=r.langEntries[c[t]]),r[f[u]]&&r[f[u]](n);for(n.fireOnce("pluginsLoaded"),i.keystrokes&&n.setKeystroke(n.config.keystrokes),t=0;t<n.config.blockedKeystrokes.length;t++)n.keystrokeHandler.blockedKeystrokes[n.config.blockedKeystrokes[t]]=1;n.status="loaded";n.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,n)})})}function f(){var t=this.element,n;return t&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO?(n=this.getData(),this.config.htmlEncodeOutput&&(n=CKEDITOR.tools.htmlEncode(n)),t.is("textarea")?t.setValue(n):t.setHtml(n),!0):!1}t.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=t;var v=0,e={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(n,t){t.name=n.toLowerCase();var i=new CKEDITOR.command(this,t);return this.mode&&r(this,i),this.commands[n]=i},_attachToForm:function(){var t=this,r=t.element,n=new CKEDITOR.dom.element(r.$.form),i;if(r.is("textarea")&&n){i=function(n){t.updateElement();t._.required&&!r.getValue()&&t.fire("required")===!1&&n.data.preventDefault()};n.on("submit",i);n.$.submit&&n.$.submit.call&&n.$.submit.apply&&(n.$.submit=CKEDITOR.tools.override(n.$.submit,function(n){return function(){i();n.apply?n.apply(this):n()}}));t.on("destroy",function(){n.removeListener("submit",i)})}},destroy:function(n){this.fire("beforeDestroy");n||f.call(this);this.editable(null);this.status="destroyed";this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(n){return(n=n||this.getSelection().getStartElement())?new CKEDITOR.dom.elementPath(n,this.editable()):null},createRange:function(){var n=this.editable();return n?new CKEDITOR.dom.range(n):null},execCommand:function(n,t){var i=this.getCommand(n),r={name:n,commandData:t,command:i};return i&&i.state!=CKEDITOR.TRISTATE_DISABLED&&this.fire("beforeCommandExec",r)!==!0&&(r.returnValue=i.exec(r.commandData),!i.async&&this.fire("afterCommandExec",r)!==!0)?r.returnValue:!1},getCommand:function(n){return this.commands[n]},getData:function(n){n||this.fire("beforeGetData");var t=this._.data;return typeof t!="string"&&(t=(t=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?t.is("textarea")?t.getValue():t.getHtml():""),t={dataValue:t},n||this.fire("getData",t),t.dataValue},getSnapshot:function(){var t=this.fire("getSnapshot"),n;return typeof t!="string"&&(n=this.element,n&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(t=n.is("textarea")?n.getValue():n.getHtml())),t},loadSnapshot:function(n){this.fire("loadSnapshot",n)},setData:function(n,t,i){if(t)this.on("dataReady",function(n){n.removeListener();t.call(n.editor)});n={dataValue:n};i||this.fire("setData",n);this._.data=n.dataValue;i||this.fire("afterSetData",n)},setReadOnly:function(n){n=n==void 0||n;this.readOnly!=n&&(this.readOnly=n,this.keystrokeHandler.blockedKeystrokes[8]=+n,this.editable().setReadOnly(n),this.fire("readOnly"))},insertHtml:function(n,t){this.fire("insertHtml",{dataValue:n,mode:t})},insertText:function(n){this.fire("insertText",n)},insertElement:function(n){this.fire("insertElement",n)},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return this.status=="ready"&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return f.call(this)},setKeystroke:function(){for(var i=this.keystrokeHandler.keystrokes,r=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],n,t,u=r.length;u--;)n=r[u],t=0,CKEDITOR.tools.isArray(n)&&(t=n[1],n=n[0]),t?i[n]=t:delete i[n]},addFeature:function(n){return this.filter.addFeature(n)},setActiveFilter:function(n){n||(n=this.filter);this.activeFilter!==n&&(this.activeFilter=n,this.fire("activeFilterChange"),n===this.filter?this.setActiveEnterMode(null,null):this.setActiveEnterMode(n.getAllowedEnterMode(this.enterMode),n.getAllowedEnterMode(this.shiftEnterMode,!0)))},setActiveEnterMode:function(n,t){n=n?this.blockless?CKEDITOR.ENTER_BR:n:this.enterMode;t=t?this.blockless?CKEDITOR.ENTER_BR:t:this.shiftEnterMode;(this.activeEnterMode!=n||this.activeShiftEnterMode!=t)&&(this.activeEnterMode=n,this.activeShiftEnterMode=t,this.fire("activeEnterModeChange"))}})}();CKEDITOR.ELEMENT_MODE_NONE=0;CKEDITOR.ELEMENT_MODE_REPLACE=1;CKEDITOR.ELEMENT_MODE_APPENDTO=2;CKEDITOR.ELEMENT_MODE_INLINE=3;CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:RegExp("<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))","g")}},function(){var n=/([\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(i){for(var u,r,f,h,o,c,s,e=0;u=this._.htmlPartsRegex.exec(i);){if(r=u.index,r>e)if(e=i.substring(e,r),f)f.push(e);else this.onText(e);if(e=this._.htmlPartsRegex.lastIndex,r=u[1]){if(r=r.toLowerCase(),f&&CKEDITOR.dtd.$cdata[r]){this.onCDATA(f.join(""));f=null}if(!f){this.onTagClose(r);continue}}if(f)f.push(u[0]);else if(r=u[3]){if(r=r.toLowerCase(),!/="/.test(r)){if(h={},u=u[4],c=!!(u&&u.charAt(u.length-1)=="/"),u)for(;o=n.exec(u);)s=o[1].toLowerCase(),o=o[2]||o[3]||o[4]||"",h[s]=!o&&t[s]?s:CKEDITOR.tools.htmlDecodeAttr(o);this.onTagOpen(r,h,c);!f&&CKEDITOR.dtd.$cdata[r]&&(f=[])}}else if(r=u[2])this.onComment(r)}if(i.length>e)this.onText(i.substring(e,i.length))}}}();CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(n){this._.output.push("<",n)},openTagClose:function(n,t){t?this._.output.push(" />"):this._.output.push(">")},attribute:function(n,t){typeof t=="string"&&(t=CKEDITOR.tools.htmlEncodeAttr(t));this._.output.push(" ",n,'="',t,'"')},closeTag:function(n){this._.output.push("<\/",n,">")},text:function(n){this._.output.push(n)},comment:function(n){this._.output.push("<!--",n,"-->")},write:function(n){this._.output.push(n)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(n){var t=this._.output.join("");return n&&this.reset(),t}}}),function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var i=this.parent.children,r=CKEDITOR.tools.indexOf(i,this),n=this.previous,t=this.next;n&&(n.next=t);t&&(t.previous=n);i.splice(r,1);this.parent=null},replaceWith:function(n){var t=this.parent.children,u=CKEDITOR.tools.indexOf(t,this),i=n.previous=this.previous,r=n.next=this.next;i&&(i.next=n);r&&(r.previous=n);t[u]=n;n.parent=this.parent;this.parent=null},insertAfter:function(n){var t=n.parent.children,r=CKEDITOR.tools.indexOf(t,n),i=n.next;t.splice(r+1,0,this);this.next=n.next;this.previous=n;n.next=this;i&&(i.previous=this);this.parent=n.parent},insertBefore:function(n){var t=n.parent.children,i=CKEDITOR.tools.indexOf(t,n);t.splice(i,0,this);this.next=n;(this.previous=n.previous)&&(n.previous.next=this);n.previous=this;this.parent=n.parent},getAscendant:function(n){for(var i=typeof n=="function"?n:typeof n=="string"?function(t){return t.name==n}:function(t){return t.name in n},t=this.parent;t&&t.type==CKEDITOR.NODE_ELEMENT;){if(i(t))return t;t=t.parent}return null},wrapWith:function(n){return this.replaceWith(n),n.add(this),n},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(n){return n||{}}}}();CKEDITOR.htmlParser.comment=function(n){this.value=n;this._={isBlockLike:!1}};CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(n,t){var i=this.value;return(i=n.onComment(t,i,this))?typeof i!="string"?(this.replaceWith(i),!1):(this.value=i,!0):(this.remove(),!1)},writeHtml:function(n,t){t&&this.filter(t);n.comment(this.value)}}),function(){CKEDITOR.htmlParser.text=function(n){this.value=n;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(n,t){if(!(this.value=n.onText(t,this.value,this)))return this.remove(),!1},writeHtml:function(n,t){t&&this.filter(t);n.text(this.value)}})}(),function(){CKEDITOR.htmlParser.cdata=function(n){this.value=n};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(n){n.write(this.value)}})}();CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function t(n){return n.attributes["data-cke-survive"]?!1:n.name=="a"&&n.attributes.href||CKEDITOR.dtd.$removeEmpty[n.name]}var i=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},r=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1});CKEDITOR.htmlParser.fragment.fromHtml=function(u,f,e){function w(n){var u,t;if(h.length>0)for(t=0;t<h.length;t++){var i=h[t],r=i.name,f=CKEDITOR.dtd[r],e=o.name&&CKEDITOR.dtd[o.name];e&&!e[r]||n&&f&&!f[n]&&CKEDITOR.dtd[n]?r==o.name&&(l(o,o.parent,1),t--):(u||(a(),u=1),i=i.clone(),i.parent=o,o=i,h.splice(t,1),t--)}}function a(){for(;p.length;)l(p.shift(),o)}function b(n){if(n._.isBlockLike&&n.name!="pre"&&n.name!="textarea"){var i=n.children.length,t=n.children[i-1],r;t&&t.type==CKEDITOR.NODE_TEXT&&((r=CKEDITOR.tools.rtrim(t.value))?t.value=r:n.children.length=i-1)}}function l(n,i,r){var i=i||o||c,u=o;if(n.previous===void 0){if(k(i,n)){o=i;s.onTagOpen(e,{});n.returnPoint=i=o}b(n);(!t(n)||n.children.length)&&i.add(n);n.name=="pre"&&(y=!1);n.name=="textarea"&&(v=!1)}n.returnPoint?(o=n.returnPoint,delete n.returnPoint):o=r?i:u}function k(n,t){if((n==c||n.name=="body")&&e&&(!n.name||CKEDITOR.dtd[n.name][e])){var i,r;return(i=t.attributes&&(r=t.attributes["data-cke-real-element-type"])?r:t.name)&&i in CKEDITOR.dtd.$inline&&!(i in CKEDITOR.dtd.head)&&!t.isOrphan||t.type==CKEDITOR.NODE_TEXT}}function d(n,t){return n in CKEDITOR.dtd.$listItem||n in CKEDITOR.dtd.$tableContent?n==t||n=="dt"&&t=="dd"||n=="dd"&&t=="dt":!1}var s=new CKEDITOR.htmlParser,c=f instanceof CKEDITOR.htmlParser.element?f:typeof f=="string"?new CKEDITOR.htmlParser.element(f):new CKEDITOR.htmlParser.fragment,h=[],p=[],o=c,v=c.name=="textarea",y=c.name=="pre";for(s.onTagOpen=function(u,f,e,c){if(f=new CKEDITOR.htmlParser.element(u,f),f.isUnknown&&e&&(f.isEmpty=!0),f.isOptionalClose=c,t(f))h.push(f);else{if(u=="pre")y=!0;else{if(u=="br"&&y){o.add(new CKEDITOR.htmlParser.text("\n"));return}u=="textarea"&&(v=!0)}if(u=="br")p.push(f);else{for(;;)if(c=(e=o.name)?CKEDITOR.dtd[e]||(o._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):r,f.isUnknown||o.isUnknown||c[u])break;else if(o.isOptionalClose)s.onTagClose(e);else if(u in n&&e in n)e=o.children,(e=e[e.length-1])&&e.name=="li"||l(e=new CKEDITOR.htmlParser.element("li"),o),f.returnPoint||(f.returnPoint=o),o=e;else if(u in CKEDITOR.dtd.$listItem&&!d(u,e))s.onTagOpen(u=="li"?"ul":"dl",{},0,1);else if(e in i&&!d(u,e))f.returnPoint||(f.returnPoint=o),o=o.parent;else if(e in CKEDITOR.dtd.$inline&&h.unshift(o),o.parent)l(o,o.parent,1);else{f.isOrphan=1;break}w(u);a();f.parent=o;f.isEmpty?l(f):o=f}}},s.onTagClose=function(n){for(var u,i=h.length-1;i>=0;i--)if(n==h[i].name){h.splice(i,1);return}for(var r=[],f=[],t=o;t!=c&&t.name!=n;)t._.isBlockLike||f.unshift(t),r.push(t),t=t.returnPoint||t.parent;if(t!=c){for(i=0;i<r.length;i++)u=r[i],l(u,u.parent);o=t;t._.isBlockLike&&a();l(t,t.parent);t==o&&(o=o.parent);h=h.concat(f)}n=="body"&&(e=!1)},s.onText=function(t){if(o._.hasInlineStarted&&!p.length||y||v||(t=CKEDITOR.tools.ltrim(t),t.length!==0)){var u=o.name,f=u?CKEDITOR.dtd[u]||(o._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):r;if(!v&&!f["#"]&&u in i){s.onTagOpen(u in n?"li":u=="dl"?"dd":u=="table"?"tr":u=="tr"?"td":"");s.onText(t)}else{if(a(),w(),y||v||(t=t.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," ")),t=new CKEDITOR.htmlParser.text(t),k(o,t))this.onTagOpen(e,{},0,1);o.add(t)}}},s.onCDATA=function(n){o.add(new CKEDITOR.htmlParser.cdata(n))},s.onComment=function(n){a();w();o.add(new CKEDITOR.htmlParser.comment(n))},s.parse(u),a();o!=c;)l(o,o.parent,1);return b(c),c};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(n,t){isNaN(t)&&(t=this.children.length);var i=t>0?this.children[t-1]:null;if(i){if(n._.isBlockLike&&i.type==CKEDITOR.NODE_TEXT&&(i.value=CKEDITOR.tools.rtrim(i.value),i.value.length===0)){this.children.pop();this.add(n);return}i.next=n}n.previous=i;n.parent=this;this.children.splice(t,0,n);this._.hasInlineStarted||(this._.hasInlineStarted=n.type==CKEDITOR.NODE_TEXT||n.type==CKEDITOR.NODE_ELEMENT&&!n._.isBlockLike)},filter:function(n,t){t=this.getFilterContext(t);n.onRoot(t,this);this.filterChildren(n,!1,t)},filterChildren:function(n,t,i){if(this.childrenFilteredBy!=n.id){if(i=this.getFilterContext(i),t&&!this.parent)n.onRoot(i,this);for(this.childrenFilteredBy=n.id,t=0;t<this.children.length;t++)this.children[t].filter(n,i)===!1&&t--}},writeHtml:function(n,t){t&&this.filter(t);this.writeChildrenHtml(n)},writeChildrenHtml:function(n,t,i){var r=this.getFilterContext();if(i&&!this.parent&&t)t.onRoot(r,this);for(t&&this.filterChildren(t,!1,r),t=0,i=this.children,r=i.length;t<r;t++)i[t].writeHtml(n)},forEach:function(n,t,i){var r,i,u;if(i||t&&this.type!=t||(r=n(this)),r!==!1)for(i=this.children,u=0;u<i.length;u++)r=i[u],r.type==CKEDITOR.NODE_ELEMENT?r.forEach(n,t):(!t||r.type==t)&&n(r)},getFilterContext:function(n){return n||{}}}}(),function(){function n(){this.rules=[]}function t(t,i,r,u){var f,e;for(f in i)(e=t[f])||(e=t[f]=new n),e.add(i[f],r,u)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(t){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new n;this.attributeNameRules=new n;this.elementsRules={};this.attributesRules={};this.textRules=new n;this.commentRules=new n;this.rootRules=new n;t&&this.addRules(t,10)},proto:{addRules:function(n,i){var r;typeof i=="number"?r=i:i&&"priority"in i&&(r=i.priority);typeof r!="number"&&(r=10);typeof i!="object"&&(i={});n.elementNames&&this.elementNameRules.addMany(n.elementNames,r,i);n.attributeNames&&this.attributeNameRules.addMany(n.attributeNames,r,i);n.elements&&t(this.elementsRules,n.elements,r,i);n.attributes&&t(this.attributesRules,n.attributes,r,i);n.text&&this.textRules.add(n.text,r,i);n.comment&&this.commentRules.add(n.comment,r,i);n.root&&this.rootRules.add(n.root,r,i)},applyTo:function(n){n.filter(this)},onElementName:function(n,t){return this.elementNameRules.execOnName(n,t)},onAttributeName:function(n,t){return this.attributeNameRules.execOnName(n,t)},onText:function(n,t){return this.textRules.exec(n,t)},onComment:function(n,t,i){return this.commentRules.exec(n,t,i)},onRoot:function(n,t){return this.rootRules.exec(n,t)},onElement:function(n,t){for(var u=[this.elementsRules["^"],this.elementsRules[t.name],this.elementsRules.$],i,r=0;r<3;r++)if(i=u[r]){if(i=i.exec(n,t,this),i===!1)return null;if(i&&i!=t)return this.onNode(n,i);if(t.parent&&!t.name)break}return t},onNode:function(n,t){var i=t.type;return i==CKEDITOR.NODE_ELEMENT?this.onElement(n,t):i==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(n,t.value)):i==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(n,t.value)):null},onAttribute:function(n,t,i,r){return(i=this.attributesRules[i])?i.exec(n,r,t,this):r}}});CKEDITOR.htmlParser.filterRulesGroup=n;n.prototype={add:function(n,t,i){this.rules.splice(this.findIndex(t),0,{value:n,priority:t,options:i})},addMany:function(n,t,i){for(var u=[this.findIndex(t),0],r=0,f=n.length;r<f;r++)u.push({value:n[r],priority:t,options:i});this.rules.splice.apply(this.rules,u)},findIndex:function(n){for(var i=this.rules,t=i.length-1;t>=0&&n<i[t].priority;)t--;return t+1},exec:function(n,t){for(var u=t instanceof CKEDITOR.htmlParser.node||t instanceof CKEDITOR.htmlParser.fragment,f=Array.prototype.slice.call(arguments,1),e=this.rules,h=e.length,o,s,i,r=0;r<h;r++)if(u&&(o=t.type,s=t.name),i=e[r],!n.nonEditable||i.options.applyToAll){if(i=i.value.apply(null,f),i===!1)return i;if(u){if(i&&(i.name!=s||i.type!=o))return i}else if(typeof i!="string")return i;i!=void 0&&(f[0]=t=i)}return t},execOnName:function(n,t){for(var r=0,u=this.rules,f=u.length,i;t&&r<f;r++)i=u[r],(!n.nonEditable||i.options.applyToAll)&&(t=t.replace(i.value[0],i.value[1]));return t}}}(),function(){function f(r,f){function c(n){return n||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function v(i,r){return function(u){if(u.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var f=[],s=o(u),h,l;if(s)for(p(s,1)&&f.push(s);s;)n(s)&&(h=t(s))&&p(h)&&((l=t(h))&&!n(l)?f.push(h):(c(e).insertAfter(h),h.remove())),s=s.previous;for(s=0;s<f.length;s++)f[s].remove();(f=CKEDITOR.env.opera&&!i||(typeof r=="function"?r(u)!==!1:r))&&(e||CKEDITOR.env.needsBrFiller||u.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?e||CKEDITOR.env.needsBrFiller||!(document.documentMode>7||u.name in CKEDITOR.dtd.tr||u.name in CKEDITOR.dtd.$listItem)?(f=o(u),f=!f||u.name=="form"&&f.name=="input"):f=!1:f=!1);f&&u.add(c(i))}}}function p(t,i){if((!e||CKEDITOR.env.needsBrFiller)&&t.type==CKEDITOR.NODE_ELEMENT&&t.name=="br"&&!t.attributes["data-cke-eol"])return!0;var r;return t.type==CKEDITOR.NODE_TEXT&&(r=t.value.match(nt))&&((r.index&&(new CKEDITOR.htmlParser.text(t.value.substring(0,r.index)).insertBefore(t),t.value=r[0]),!CKEDITOR.env.needsBrFiller&&e&&(!i||t.parent.name in a))||!e&&((r=t.previous)&&r.name=="br"||!r||n(r)))?!0:!1}var l={elements:{}},e=f=="html",a=CKEDITOR.tools.extend({},y),h;for(h in a)"#"in u[h]||delete a[h];for(h in a)l.elements[h]=v(e,r.config.fillEmptyBlocks!==!1);return l.root=v(e),l.elements.br=function(r){return function(u){var f,e;if(u.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(f=u.attributes,"data-cke-bogus"in f||"data-cke-eol"in f)delete f["data-cke-bogus"];else{for(f=u.next;f&&i(f);)f=f.next;e=t(u);!f&&n(u.parent)?s(u.parent,c(r)):n(f)&&e&&!n(e)&&c(r).insertBefore(f)}}}(e),l}function e(n,t){return n!=CKEDITOR.ENTER_BR&&t!==!1?n==CKEDITOR.ENTER_DIV?"div":"p":!1}function o(n){for(n=n.children[n.children.length-1];n&&i(n);)n=n.previous;return n}function t(n){for(n=n.previous;n&&i(n);)n=n.previous;return n}function i(n){return n.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(n.value)||n.type==CKEDITOR.NODE_ELEMENT&&n.attributes["data-cke-bookmark"]}function n(n){return n&&(n.type==CKEDITOR.NODE_ELEMENT&&n.name in y||n.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function s(n,t){var i=n.children[n.children.length-1];n.children.push(t);t.parent=n;i&&(i.next=t,t.previous=i)}function h(n){n=n.attributes;n.contenteditable!="false"&&(n["data-cke-editable"]=n.contenteditable?"true":1);n.contenteditable="false"}function c(n){n=n.attributes;switch(n["data-cke-editable"]){case"true":n.contenteditable="true";break;case"1":delete n.contenteditable}}function w(n){return n.replace(ut,function(n,t,i){return"<"+t+i.replace(ft,function(n,t){return!/^on/.test(t)&&i.indexOf("data-cke-saved-"+t)==-1?(n=n.slice(1)," data-cke-saved-"+n+" data-cke-"+CKEDITOR.rnd+"-"+n):n})+">"})}function l(n,t){return n.replace(t,function(n,t,i){return n.indexOf("<textarea")===0&&(n=t+r(i).replace(/</g,"&lt;").replace(/>/g,"&gt;")+"<\/textarea>"),"<cke:encoded>"+encodeURIComponent(n)+"<\/cke:encoded>"})}function b(n){return n.replace(st,function(n,t){return decodeURIComponent(t)})}function k(n){return n.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,function(n){return"<!--"+a+"{C}"+encodeURIComponent(n).replace(/--/g,"%2D%2D")+"-->"})}function r(n){return n.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(n,t){return decodeURIComponent(t)})}function d(n,t){var i=t._.dataStore;return n.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(n,t){return decodeURIComponent(t)}).replace(/\{cke_protected_(\d+)\}/g,function(n,t){return i&&i[t]||""})}function g(n,t){for(var i=[],r=t.config.protectedSource,u=t._.dataStore||(t._.dataStore={id:1}),e=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,r=[/<script[\s\S]*?<\/script>/gi,/<noscript[\s\S]*?<\/noscript>/gi].concat(r),n=n.replace(/<\!--[\s\S]*?--\>/g,function(n){return"<!--{cke_tempcomment}"+(i.push(n)-1)+"-->"}),f=0;f<r.length;f++)n=n.replace(r[f],function(n){return n=n.replace(e,function(n,t,r){return i[r]}),/cke_temp(comment)?/.test(n)?n:"<!--{cke_temp}"+(i.push(n)-1)+"-->"});return n=n.replace(e,function(n,t,r){return"<!--"+a+(t?"{C}":"")+encodeURIComponent(i[r]).replace(/--/g,"%2D%2D")+"-->"}),n.replace(/(['"]).*?\1/g,function(n){return n.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(n,t){return u[u.id]=decodeURIComponent(t),"{cke_protected_"+u.id+++"}"})})}CKEDITOR.htmlDataProcessor=function(n){var t,i,u=this;this.editor=n;this.dataFilter=t=new CKEDITOR.htmlParser.filter;this.htmlFilter=i=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;t.addRules(tt);t.addRules(it,{applyToAll:!0});t.addRules(f(n,"data"),{applyToAll:!0});i.addRules(rt);i.addRules(p,{applyToAll:!0});i.addRules(f(n,"html"),{applyToAll:!0});n.on("toHtml",function(t){var t=t.data,i=t.dataValue,i=g(i,n),i=l(i,ot),i=w(i),i=l(i,et),i=i.replace(ht,"$1cke:$2"),i=i.replace(lt,"<cke:$1$2><\/cke:$1>"),i=CKEDITOR.env.opera?i:i.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),u=t.context||n.editable().getName(),f;CKEDITOR.env.ie&&CKEDITOR.env.version<9&&u=="pre"&&(u="div",i="<pre>"+i+"<\/pre>",f=1);u=n.document.createElement(u);u.setHtml("a"+i);i=u.getHtml().substr(1);i=i.replace(RegExp(" data-cke-"+CKEDITOR.rnd+"-","ig")," ");f&&(i=i.replace(/^<pre>|<\/pre>$/gi,""));i=i.replace(ct,"$1$2");i=b(i);i=r(i);t.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(i,t.context,t.fixForBody===!1?!1:e(t.enterMode,n.config.autoParagraph))},null,null,5);n.on("toHtml",function(t){t.data.filter.applyTo(t.data.dataValue,!0,t.data.dontFilter,t.data.enterMode)&&n.fire("dataFiltered")},null,null,6);n.on("toHtml",function(n){n.data.dataValue.filterChildren(u.dataFilter,!0)},null,null,10);n.on("toHtml",function(n){var n=n.data,t=n.dataValue,i=new CKEDITOR.htmlParser.basicWriter;t.writeChildrenHtml(i);t=i.getHtml(!0);n.dataValue=k(t)},null,null,15);n.on("toDataFormat",function(t){var i=t.data.dataValue;t.data.enterMode!=CKEDITOR.ENTER_BR&&(i=i.replace(/^<br *\/?>/i,""));t.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(i,t.data.context,e(t.data.enterMode,n.config.autoParagraph))},null,null,5);n.on("toDataFormat",function(n){n.data.dataValue.filterChildren(u.htmlFilter,!0)},null,null,10);n.on("toDataFormat",function(n){n.data.filter.applyTo(n.data.dataValue,!1,!0)},null,null,11);n.on("toDataFormat",function(t){var i=t.data.dataValue,f=u.writer;f.reset();i.writeChildrenHtml(f);i=f.getHtml(!0);i=r(i);i=d(i,n);t.data.dataValue=i},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(n,t,i,r){var f=this.editor,u,e,o;return t&&typeof t=="object"?(u=t.context,i=t.fixForBody,r=t.dontFilter,e=t.filter,o=t.enterMode):u=t,u||u===null||(u=f.editable().getName()),f.fire("toHtml",{dataValue:n,context:u,fixForBody:i,dontFilter:r,filter:e||f.filter,enterMode:o||f.enterMode}).dataValue},toDataFormat:function(n,t){var i,r,u;return t&&(i=t.context,r=t.filter,u=t.enterMode),i||i===null||(i=this.editor.editable().getName()),this.editor.fire("toDataFormat",{dataValue:n,filter:r||this.editor.filter,context:i,enterMode:u||this.editor.enterMode}).dataValue}};var nt=/(?:&nbsp;|\xa0)$/,a="{cke_protected}",u=CKEDITOR.dtd,v=["caption","colgroup","col","thead","tfoot","tbody"],y=CKEDITOR.tools.extend({},u.$blockLimit,u.$block),tt={elements:{input:h,textarea:h}},it={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},rt={elements:{embed:function(n){var t=n.parent,i;t&&t.name=="object"&&(i=t.attributes.width,t=t.attributes.height,i&&(n.attributes.width=i),t&&(n.attributes.height=t))},a:function(n){if(!n.children.length&&!n.attributes.name&&!n.attributes["data-cke-saved-name"])return!1}}},p={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(n){var i=n.attributes,r,u,t;if(i){if(i["data-cke-temp"])return!1;for(r=["name","href","src"],t=0;t<r.length;t++)u="data-cke-saved-"+r[t],u in i&&delete i[r[t]]}return n},table:function(n){n.children.slice(0).sort(function(n,t){var i,r;return n.type==CKEDITOR.NODE_ELEMENT&&t.type==n.type&&(i=CKEDITOR.tools.indexOf(v,n.name),r=CKEDITOR.tools.indexOf(v,t.name)),i>-1&&r>-1&&i!=r||(i=n.parent?n.getIndex():-1,r=t.parent?t.getIndex():-1),i>r?1:-1})},param:function(n){return n.children=[],n.isEmpty=!0,n},span:function(n){n.attributes["class"]=="Apple-style-span"&&delete n.name},html:function(n){delete n.attributes.contenteditable;delete n.attributes["class"]},body:function(n){delete n.attributes.spellcheck;delete n.attributes.contenteditable},style:function(n){var t=n.children[0];t&&t.value&&(t.value=CKEDITOR.tools.trim(t.value));n.attributes.type||(n.attributes.type="text/css")},title:function(n){var t=n.children[0];t||s(n,t=new CKEDITOR.htmlParser.text);t.value=n.attributes["data-cke-title"]||""},input:c,textarea:c},attributes:{"class":function(n){return CKEDITOR.tools.ltrim(n.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(p.attributes.style=function(n){return n.replace(/(^|;)([^\:]+)/g,function(n){return n.toLowerCase()})});var ut=/<(a|area|img|input|source)\b([^>]*)>/gi,ft=/\s(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,et=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,ot=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,st=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,ht=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,ct=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,lt=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi}();CKEDITOR.htmlParser.element=function(n,t){this.name=n;this.attributes=t||{};this.children=[];var i=n||"",r=i.match(/^cke:(.*)/);r&&(i=r[1]);i=!(!CKEDITOR.dtd.$nonBodyContent[i]&&!CKEDITOR.dtd.$block[i]&&!CKEDITOR.dtd.$listItem[i]&&!CKEDITOR.dtd.$tableContent[i]&&!(CKEDITOR.dtd.$nonEditable[i]||i=="br"));this.isEmpty=!!CKEDITOR.dtd.$empty[n];this.isUnknown=!CKEDITOR.dtd[n];this._={isBlockLike:i,hasInlineStarted:this.isEmpty||!i}};CKEDITOR.htmlParser.cssStyle=function(n){var t={};return((n instanceof CKEDITOR.htmlParser.element?n.attributes.style:n)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(n,i,r){i=="font-family"&&(r=r.replace(/["']/g,""));t[i.toLowerCase()]=r}),{rules:t,populate:function(n){var t=this.toString();t&&(n instanceof CKEDITOR.dom.element?n.setAttribute("style",t):n instanceof CKEDITOR.htmlParser.element?n.attributes.style=t:n.style=t)},toString:function(){var i=[],n;for(n in t)t[n]&&i.push(n,":",t[n],";");return i.join("")}}},function(){function t(n){return function(t){return t.type==CKEDITOR.NODE_ELEMENT&&(typeof n=="string"?t.name==n:t.name in n)}}var i=function(n,t){return n=n[0],t=t[0],n<t?-1:n>t?1:0},n=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:n.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(n,t){var i=this,r,e,t=i.getFilterContext(t),u,f;if(t.off)return!0;if(!i.parent)n.onRoot(t,i);for(;;){if((r=i.name,!(e=n.onElementName(t,r)))||(i.name=e,!(i=n.onElement(t,i))))return this.remove(),!1;if(i!==this)return this.replaceWith(i),!1;if(i.name==r)break;if(i.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(i),!1;if(!i.name)return this.replaceWithChildren(),!1}r=i.attributes;for(u in r){for(f=u,e=r[u];;)if(f=n.onAttributeName(t,u))if(f!=u)delete r[u],u=f;else break;else{delete r[u];break}f&&((e=n.onAttribute(t,i,f,e))===!1?delete r[f]:r[f]=e)}return i.isEmpty||this.filterChildren(n,!1,t),!0},filterChildren:n.filterChildren,writeHtml:function(n,t){t&&this.filter(t);var e=this.name,f=[],u=this.attributes,r,o;n.openTag(e,u);for(r in u)f.push([r,u[r]]);for(n.sortAttributes&&f.sort(i),r=0,o=f.length;r<o;r++)u=f[r],n.attribute(u[0],u[1]);n.openTagClose(e,this.isEmpty);this.writeChildrenHtml(n);this.isEmpty||n.closeTag(e)},writeChildrenHtml:n.writeChildrenHtml,replaceWithChildren:function(){for(var n=this.children,t=n.length;t;)n[--t].insertAfter(this);this.remove()},forEach:n.forEach,getFirst:function(n){if(!n)return this.children.length?this.children[0]:null;typeof n!="function"&&(n=t(n));for(var i=0,r=this.children.length;i<r;++i)if(n(this.children[i]))return this.children[i];return null},getHtml:function(){var n=new CKEDITOR.htmlParser.basicWriter;return this.writeChildrenHtml(n),n.getHtml()},setHtml:function(n){for(var n=this.children=CKEDITOR.htmlParser.fragment.fromHtml(n).children,t=0,i=n.length;t<i;++t)n[t].parent=this},getOuterHtml:function(){var n=new CKEDITOR.htmlParser.basicWriter;return this.writeHtml(n),n.getHtml()},split:function(n){for(var t=this.children.splice(n,this.children.length-n),i=this.clone(),r=0;r<t.length;++r)t[r].parent=i;return i.children=t,t[0]&&(t[0].previous=null),n>0&&(this.children[n-1].next=null),this.parent.add(i,this.getIndex()+1),i},removeClass:function(n){var t=this.attributes["class"];t&&((t=CKEDITOR.tools.trim(t.replace(RegExp("(?:\\s+|^)"+n+"(?:\\s+|$)")," ")))?this.attributes["class"]=t:delete this.attributes["class"])},hasClass:function(n){var t=this.attributes["class"];return t?RegExp("(?:^|\\s)"+n+"(?=\\s|$)").test(t):!1},getFilterContext:function(n){var t=[],n,i;if(n||(n={off:!1,nonEditable:!1}),n.off||this.attributes["data-cke-processor"]!="off"||t.push("off",!0),n.nonEditable||this.attributes.contenteditable!="false"||t.push("nonEditable",!0),t.length)for(n=CKEDITOR.tools.copy(n),i=0;i<t.length;i=i+2)n[t[i]]=t[i+1];return n}},!0)}(),function(){var n={};CKEDITOR.template=function(t){if(n[t])this.output=n[t];else{var i=t.replace(/'/g,"\\'").replace(/{([^}]+)}/g,function(n,t){return"',data['"+t+"']==undefined?'{"+t+"}':data['"+t+"'],'"});this.output=n[t]=Function("data","buffer","return buffer?buffer.push('"+i+"'):['"+i+"'].join('');")}}}();delete CKEDITOR.loadFullCore;CKEDITOR.instances={};CKEDITOR.document=new CKEDITOR.dom.document(document);CKEDITOR.add=function(n){CKEDITOR.instances[n.name]=n;n.on("focus",function(){CKEDITOR.currentInstance!=n&&(CKEDITOR.currentInstance=n,CKEDITOR.fire("currentInstance"))});n.on("blur",function(){CKEDITOR.currentInstance==n&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))});CKEDITOR.fire("instance",null,n)};CKEDITOR.remove=function(n){delete CKEDITOR.instances[n.name]},function(){var n={};CKEDITOR.addTemplate=function(t,i){var r=n[t];return r?r:(r={name:t,source:i},CKEDITOR.fire("template",r),n[t]=new CKEDITOR.template(r.source))};CKEDITOR.getTemplate=function(t){return n[t]}}(),function(){var n=[];CKEDITOR.addCss=function(t){n.push(t)};CKEDITOR.getCss=function(){return n.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(n,t){if(!CKEDITOR.env.isCompatible)return null;if(n=CKEDITOR.dom.element.get(n),n.getEditor())throw'The editor instance "'+n.getEditor().name+'" is already attached to the provided element.';var i=new CKEDITOR.editor(t,n,CKEDITOR.ELEMENT_MODE_INLINE),r=n.is("textarea")?n:null;r?(i.setData(r.getValue(),null,!0),n=CKEDITOR.dom.element.createFromHtml('<div contenteditable="'+!!i.readOnly+'" class="cke_textarea_inline">'+r.getValue()+"<\/div>",CKEDITOR.document),n.insertAfter(r),r.hide(),r.$.form&&i._attachToForm()):i.setData(n.getHtml(),null,!0);i.on("loaded",function(){i.fire("uiReady");i.editable(n);i.container=n;i.setData(i.getData(1));i.resetDirty();i.fire("contentDom");i.mode="wysiwyg";i.fire("mode");i.status="ready";i.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,i)},null,null,1e4);i.on("destroy",function(){r&&(i.container.clearCustomData(),i.container.remove(),r.show());i.element.clearCustomData();delete i.element});return i};CKEDITOR.inlineAll=function(){var n,t,r;for(r in CKEDITOR.dtd.$editable)for(var u=CKEDITOR.document.getElementsByTag(r),i=0,f=u.count();i<f;i++)n=u.getItem(i),n.getAttribute("contenteditable")=="true"&&(t={element:n,config:{}},CKEDITOR.fire("inline",t)!==!1&&CKEDITOR.inline(n,t.config))};CKEDITOR.domReady(function(){CKEDITOR.disableAutoInline||CKEDITOR.inlineAll()})}();CKEDITOR.replaceClass="ckeditor",function(){function t(n,t,u,f){if(!CKEDITOR.env.isCompatible)return null;if(n=CKEDITOR.dom.element.get(n),n.getEditor())throw'The editor instance "'+n.getEditor().name+'" is already attached to the provided element.';var e=new CKEDITOR.editor(t,n,f);f==CKEDITOR.ELEMENT_MODE_REPLACE&&(n.setStyle("visibility","hidden"),e._.required=n.hasAttribute("required"),n.removeAttribute("required"));u&&e.setData(u,null,!0);e.on("loaded",function(){r(e);f==CKEDITOR.ELEMENT_MODE_REPLACE&&e.config.autoUpdateElement&&n.$.form&&e._attachToForm();e.setMode(e.config.startupMode,function(){e.resetDirty();e.status="ready";e.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,e)})});e.on("destroy",i);return e}function i(){var t=this.container,n=this.element;t&&(t.clearCustomData(),t.remove());n&&(n.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(n.show(),this._.required&&n.setAttribute("required","required")),delete this.element)}function r(t){var i=t.name,r=t.element,u=t.elementMode,f=t.fire("uiSpace",{space:"top",html:""}).html,e=t.fire("uiSpace",{space:"bottom",html:""}).html;n||(n=CKEDITOR.addTemplate("maincontainer",'<{outerEl} id="cke_{name}" class="{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'"  dir="{langDir}" lang="{langCode}" role="application" aria-labelledby="cke_{name}_arialbl"><span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}<\/span><{outerEl} class="cke_inner cke_reset" role="presentation">{topHtml}<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation"><\/{outerEl}>{bottomHtml}<\/{outerEl}><\/{outerEl}>'));i=CKEDITOR.dom.element.createFromHtml(n.output({id:t.id,name:i,langDir:t.lang.dir,langCode:t.langCode,voiceLabel:[t.lang.editor,t.name].join(", "),topHtml:f?'<span id="'+t.ui.spaceId("top")+'" class="cke_top cke_reset_all" role="presentation" style="height:auto">'+f+"<\/span>":"",contentId:t.ui.spaceId("contents"),bottomHtml:e?'<span id="'+t.ui.spaceId("bottom")+'" class="cke_bottom cke_reset_all" role="presentation">'+e+"<\/span>":"",outerEl:CKEDITOR.env.ie?"span":"div"}));u==CKEDITOR.ELEMENT_MODE_REPLACE?(r.hide(),i.insertAfter(r)):r.append(i);t.container=i;f&&t.ui.space("top").unselectable();e&&t.ui.space("bottom").unselectable();r=t.config.width;u=t.config.height;r&&i.setStyle("width",CKEDITOR.tools.cssLength(r));u&&t.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(u));i.disableContextMenu();CKEDITOR.env.webkit&&i.on("focus",function(){t.focus()});t.fireOnce("uiReady")}CKEDITOR.replace=function(n,i){return t(n,i,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(n,i,r){return t(n,i,r,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var i,n,r=document.getElementsByTagName("textarea"),t=0;t<r.length;t++)if(i=null,n=r[t],n.name||n.id){if(typeof arguments[0]=="string"){if(!RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)").test(n.className))continue}else if(typeof arguments[0]=="function"&&(i={},arguments[0](n,i)===!1))continue;this.replace(n,i)}};CKEDITOR.editor.prototype.addMode=function(n,t){(this._.modes||(this._.modes={}))[n]=t};CKEDITOR.editor.prototype.setMode=function(n,t){var i=this,u=this._.modes,r;n==i.mode||!u||!u[n]||(i.fire("beforeSetMode",n),i.mode&&(r=i.checkDirty(),i._.previousMode=i.mode,i.fire("beforeModeUnload"),i.editable(0),i.ui.space("contents").setHtml(""),i.mode=""),this._.modes[n](function(){i.mode=n;r===void 0||r||i.resetDirty();setTimeout(function(){i.fire("mode");t&&t.call(i)},0)}))};CKEDITOR.editor.prototype.resize=function(n,t,i,r){var f=this.container,e=this.ui.space("contents"),u=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement,r=r?f.getChild(1):f;r.setSize("width",n,!0);u&&(u.style.width="1%");e.setStyle("height",Math.max(t-(i?0:(r.$.offsetHeight||0)-(e.$.clientHeight||0)),0)+"px");u&&(u.style.width="100%");this.fire("resize")};CKEDITOR.editor.prototype.getResizable=function(n){return n?this.ui.space("contents"):this.container};var n;CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}();CKEDITOR.config.startupMode="wysiwyg",function(){function o(t){var i=t.editor,r=t.data.path,f=r.blockLimit,e=t.data.selection,u=e.getRanges()[0],o;(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)&&(e=s(e,r))&&(e.appendBogus(),o=CKEDITOR.env.ie);i.config.autoParagraph!==!1&&i.activeEnterMode!=CKEDITOR.ENTER_BR&&i.editable().equals(f)&&!r.block&&u.collapsed&&!u.getCommonAncestor().isReadOnly()&&(r=u.clone(),r.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),f=new CKEDITOR.dom.walker(r),f.guard=function(t){return!n(t)||t.type==CKEDITOR.NODE_COMMENT||t.isReadOnly()},(!f.checkForward()||r.checkStartOfBlock()&&r.checkEndOfBlock())&&(i=u.fixBlock(!0,i.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(i=i.getFirst(n))&&i.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(i.getText()).match(/^(?:&nbsp;|\xa0)$/)&&i.remove(),o=1,t.cancel()));o&&u.select()}function s(t,i){if(t.isFake)return 0;var r=i.block||i.blockLimit,u=r&&r.getLast(n);if(r&&r.isBlockBoundary()&&(!u||!(u.type==CKEDITOR.NODE_ELEMENT&&u.isBlockBoundary()))&&!r.is("pre")&&!r.getBogus())return r}function h(n){var t=n.data.getTarget();t.is("input")&&(t=t.getAttribute("type"),(t=="submit"||t=="reset")&&n.data.preventDefault())}function n(n){return i(n)&&a(n)}function c(n,t){return function(i){var r=CKEDITOR.dom.element.get(i.data.$.toElement||i.data.$.fromElement||i.data.$.relatedTarget);r&&(t.equals(r)||t.contains(r))||n.call(this,i)}}function l(t){var u,e=t.getRanges()[0],r=t.root,o={table:1,ul:1,ol:1,dl:1},t,i;return e.startPath().contains(o)&&(t=function(t){return function(i,r){return r&&i.type==CKEDITOR.NODE_ELEMENT&&i.is(o)&&(u=i),!r&&n(i)&&(!t||!f(i))?!1:void 0}},i=e.clone(),i.collapse(1),i.setStartAt(r,CKEDITOR.POSITION_AFTER_START),r=new CKEDITOR.dom.walker(i),r.guard=t(),r.checkBackward(),u)?(i=e.clone(),i.collapse(),i.setEndAt(u,CKEDITOR.POSITION_AFTER_END),r=new CKEDITOR.dom.walker(i),r.guard=t(!0),u=!1,r.checkForward(),u):null}function t(n){n.editor.focus();n.editor.fire("saveSnapshot")}function u(n,t){var i=n.editor;t||i.getSelection().scrollIntoView();setTimeout(function(){i.fire("saveSnapshot")},0)}var r;CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(n,t){this.base(t.$||t);this.editor=n;this.hasFocus=!1;this.setup()},proto:{focus:function(){var n;if(CKEDITOR.env.webkit&&!this.hasFocus&&(n=this.editor._.previousActive||this.getDocument().getActive(),this.contains(n))){n.focus();return}try{this.$[CKEDITOR.env.ie&&this.getDocument().equals(CKEDITOR.document)?"setActive":"focus"]()}catch(t){if(!CKEDITOR.env.ie)throw t;}CKEDITOR.env.safari&&!this.isInline()&&(n=CKEDITOR.document.getActive(),n.equals(this.getWindow().getFrame())||this.getWindow().focus())},on:function(n,t){var i=Array.prototype.slice.call(arguments,0);return CKEDITOR.env.ie&&/^focus|blur$/.exec(n)&&(n=n=="focus"?"focusin":"focusout",t=c(t,this),i[0]=n,i[1]=t),CKEDITOR.dom.element.prototype.on.apply(this,i)},attachListener:function(n){this._.listeners||(this._.listeners=[]);var t=Array.prototype.slice.call(arguments,1),t=n.on.apply(n,t);return this._.listeners.push(t),t},clearListeners:function(){var n=this._.listeners;try{for(;n.length;)n.pop().removeListener()}catch(t){}},restoreAttrs:function(){var t=this._.attrChanges,i,n;for(n in t)t.hasOwnProperty(n)&&(i=t[n],i!==null?this.setAttribute(n,i):this.removeAttribute(n))},attachClass:function(n){var t=this.getCustomData("classes");this.hasClass(n)||(t||(t=[]),t.push(n),this.setCustomData("classes",t),this.addClass(n))},changeAttr:function(n,t){var i=this.getAttribute(n);t!==i&&(this._.attrChanges||(this._.attrChanges={}),n in this._.attrChanges||(this._.attrChanges[n]=i),this.setAttribute(n,t))},insertHtml:function(n,i){t(this);r(this,i||"html",n)},insertText:function(n){var f;t(this);var u=this.editor,i=u.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:u.activeEnterMode,u=i==CKEDITOR.ENTER_BR,e=CKEDITOR.tools,n=e.htmlEncode(n.replace(/\r\n/g,"\n")),n=n.replace(/\t/g,"&nbsp;&nbsp; &nbsp;"),i=i==CKEDITOR.ENTER_P?"p":"div";if(!u&&(f=/\n{2}/g,f.test(n)))var o="<"+i+">",s="<\/"+i+">",n=o+n.replace(f,function(){return s+o})+s;n=n.replace(/\n/g,"<br>");u||(n=n.replace(RegExp("<br>(?=<\/"+i+">)"),function(n){return e.repeat(n,2)}));n=n.replace(/^ | $/g,"&nbsp;");n=n.replace(/(>|\s) /g,function(n,t){return t+"&nbsp;"}).replace(/ (?=<)/g,"&nbsp;");r(this,"text",n)},insertElement:function(n,t){t?this.insertElementIntoRange(n,t):this.insertElementIntoSelection(n)},insertElementIntoRange:function(n,t){var u=this.editor,e=u.config.enterMode,f=n.getName(),o=CKEDITOR.dtd.$block[f],i,r;if(t.checkReadOnly())return!1;if(t.deleteContents(1),o)for(;(i=t.getCommonAncestor(0,1))&&(r=CKEDITOR.dtd[i.getName()])&&(!r||!r[f]);)i.getName()in CKEDITOR.dtd.span?t.splitElement(i):t.checkStartOfBlock()&&t.checkEndOfBlock()?(t.setStartBefore(i),t.collapse(!0),i.remove()):t.splitBlock(e==CKEDITOR.ENTER_DIV?"div":"p",u.editable());return t.insertNode(n),!0},insertElementIntoSelection:function(i){var o=this.editor,l=o.activeEnterMode,o=o.getSelection(),a=o.getRanges(),h=i.getName(),h=CKEDITOR.dtd.$block[h],c,e,r,s;for(t(this),s=a.length;s--;)r=a[s],c=!s&&i||i.clone(1),this.insertElementIntoRange(c,r)&&!e&&(e=c);e&&(r.moveToPosition(e,CKEDITOR.POSITION_AFTER_END),h&&((i=e.getNext(function(t){return n(t)&&!f(t)}))&&i.type==CKEDITOR.NODE_ELEMENT&&i.is(CKEDITOR.dtd.$block)?i.getDtd()["#"]?r.moveToElementEditStart(i):r.moveToElementEditEnd(e):i||l==CKEDITOR.ENTER_BR||(i=r.fixBlock(!0,l==CKEDITOR.ENTER_DIV?"div":"p"),r.moveToElementEditStart(i))));o.selectRanges([r]);u(this,CKEDITOR.env.opera)},setData:function(n,t){t||(n=this.editor.dataProcessor.toHtml(n));this.setHtml(n);this.editor.fire("dataReady")},getData:function(n){var t=this.getHtml();return n||(t=this.editor.dataProcessor.toDataFormat(t)),t},setReadOnly:function(n){this.setAttribute("contenteditable",!n)},detach:function(){this.removeClass("cke_editable");var n=this.editor;this._.detach();delete n.document;delete n.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},setup:function(){var t=this.editor,f,u,r,o;this.attachListener(t,"beforeGetData",function(){var n=this.getData();this.is("textarea")||t.config.ignoreEmptyParagraph!==!1&&(n=n.replace(e,function(n,t){return t}));t.setData(n,null,1)},this);this.attachListener(t,"getSnapshot",function(n){n.data=this.getData(1)},this);this.attachListener(t,"afterSetData",function(){this.setData(t.getData(1))},this);this.attachListener(t,"loadSnapshot",function(n){this.setData(n.data,1)},this);this.attachListener(t,"beforeFocus",function(){var n=t.getSelection();(n=n&&n.getNative())&&n.type=="Control"||this.focus()},this);this.attachListener(t,"insertHtml",function(n){this.insertHtml(n.data.dataValue,n.data.mode)},this);this.attachListener(t,"insertElement",function(n){this.insertElement(n.data)},this);this.attachListener(t,"insertText",function(n){this.insertText(n.data)},this);this.setReadOnly(t.readOnly);this.attachClass("cke_editable");this.attachClass(t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"cke_editable_inline":t.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE||t.elementMode==CKEDITOR.ELEMENT_MODE_APPENDTO?"cke_editable_themed":"");this.attachClass("cke_contents_"+t.config.contentsLangDirection);t.keystrokeHandler.blockedKeystrokes[8]=+t.readOnly;t.keystrokeHandler.attach(this);this.on("blur",function(n){CKEDITOR.env.opera&&CKEDITOR.document.getActive().equals(this.isInline()?this:this.getWindow().getFrame())?n.cancel():this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);if(t.focusManager.add(this),this.equals(CKEDITOR.document.getActive())){this.hasFocus=!0;t.once("contentDom",function(){t.focusManager.focus()})}this.isInline()&&this.changeAttr("tabindex",t.tabIndex);this.is("textarea")||(t.document=this.getDocument(),t.window=this.getWindow(),f=t.document,this.changeAttr("spellcheck",!t.config.disableNativeSpellChecker),u=t.config.contentsLangDirection,this.getDirection(1)!=u&&this.changeAttr("dir",u),r=CKEDITOR.getCss(),r&&(u=f.getHead(),u.getCustomData("stylesheet")||(r=f.appendStyleText(r),r=new CKEDITOR.dom.element(r.ownerNode||r.owningElement),u.setCustomData("stylesheet",r),r.data("cke-temp",1))),u=f.getCustomData("stylesheet_ref")||0,f.setCustomData("stylesheet_ref",u+1),this.setCustomData("cke_includeReadonly",!t.config.disableReadonlyStyling),this.attachListener(this,"click",function(n){var n=n.data,t=new CKEDITOR.dom.elementPath(n.getTarget(),this).contains("a");t&&n.$.button!=2&&t.isReadOnly()&&n.preventDefault()}),o={8:1,46:1},this.attachListener(t,"key",function(n){var r,f;if(t.readOnly)return!0;if(r=n.data.keyCode,r in o){var e=t.getSelection(),n=e.getRanges()[0],s=n.startPath(),c,h,u,r=r==8;(e=l(e))?(t.fire("saveSnapshot"),n.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),n.select(),t.fire("saveSnapshot"),f=1):n.collapsed&&((c=s.block)&&(u=c[r?"getPrevious":"getNext"](i))&&u.type==CKEDITOR.NODE_ELEMENT&&u.is("table")&&n[r?"checkStartOfBlock":"checkEndOfBlock"]()?(t.fire("saveSnapshot"),n[r?"checkEndOfBlock":"checkStartOfBlock"]()&&c.remove(),n["moveToElementEdit"+(r?"End":"Start")](u),n.select(),t.fire("saveSnapshot"),f=1):s.blockLimit&&s.blockLimit.is("td")&&(h=s.blockLimit.getAscendant("table"))&&n.checkBoundaryOfElement(h,r?CKEDITOR.START:CKEDITOR.END)&&(u=h[r?"getPrevious":"getNext"](i))?(t.fire("saveSnapshot"),n["moveToElementEdit"+(r?"End":"Start")](u),n.checkStartOfBlock()&&n.checkEndOfBlock()?u.remove():n.select(),t.fire("saveSnapshot"),f=1):(h=s.contains(["td","th","caption"]))&&n.checkBoundaryOfElement(h,r?CKEDITOR.START:CKEDITOR.END)&&(f=1))}return!f}),t.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(i){i.data.getKeystroke()in o&&!this.getFirst(n)&&(this.appendBogus(),i=t.createRange(),i.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),i.select())}),this.attachListener(this,"dblclick",function(n){if(t.readOnly)return!1;n={element:n.data.getTarget()};t.fire("doubleclick",n)}),CKEDITOR.env.ie&&this.attachListener(this,"click",h),CKEDITOR.env.ie||CKEDITOR.env.opera||this.attachListener(this,"mousedown",function(n){var i=n.data.getTarget();i.is("img","hr","input","textarea","select")&&(t.getSelection().selectElement(i),i.is("input","textarea","select")&&n.data.preventDefault())}),CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(n){if(n.data.$.button==2&&(n=n.data.getTarget(),!n.getOuterHtml().replace(e,""))){var i=t.createRange();i.moveToElementEditStart(n);i.select(!0)}}),CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(n){n.data.getTarget().is("input","select")&&n.data.preventDefault()}),this.attachListener(this,"mouseup",function(n){n.data.getTarget().is("input","textarea")&&n.data.preventDefault()})))}},_:{detach:function(){var n,t,i;if(this.editor.setData(this.editor.getData(),0,1),this.clearListeners(),this.restoreAttrs(),n=this.removeCustomData("classes"))for(;n.length;)this.removeClass(n.pop());n=this.getDocument();t=n.getHead();t.getCustomData("stylesheet")&&(i=n.getCustomData("stylesheet_ref"),--i?n.setCustomData("stylesheet_ref",i):(n.removeCustomData("stylesheet_ref"),t.removeCustomData("stylesheet").remove()));delete this.editor}}});CKEDITOR.editor.prototype.editable=function(n){var t=this._.editable;return t&&n?0:(arguments.length&&(t=this._.editable=n?n instanceof CKEDITOR.editable?n:new CKEDITOR.editable(this,n):(t&&t.detach(),null)),t)};var f=CKEDITOR.dom.walker.bogus(),e=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,i=CKEDITOR.dom.walker.whitespaces(!0),a=CKEDITOR.dom.walker.bookmark(!1,!0);CKEDITOR.on("instanceLoaded",function(n){var t=n.editor;t.on("insertElement",function(n){n=n.data;n.type==CKEDITOR.NODE_ELEMENT&&(n.is("input")||n.is("textarea"))&&(n.getAttribute("contentEditable")!="false"&&n.data("cke-editable",n.hasAttribute("contenteditable")?"true":"1"),n.setAttribute("contentEditable",!1))});t.on("selectionChange",function(n){if(!t.readOnly){var i=t.getSelection();i&&!i.isLocked&&(i=t.checkDirty(),t.fire("lockSnapshot"),o(n),t.fire("unlockSnapshot"),i||t.resetDirty())}})});CKEDITOR.on("instanceCreated",function(n){var t=n.editor;t.on("mode",function(){var n=t.editable(),i,r,u;n&&n.isInline()&&(i=t.title,n.changeAttr("role","textbox"),n.changeAttr("aria-label",i),i&&n.changeAttr("title",i),(i=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))&&(r=CKEDITOR.tools.getNextId(),u=CKEDITOR.dom.element.createFromHtml('<span id="'+r+'" class="cke_voice_label">'+this.lang.common.editorHelp+"<\/span>"),i.append(u),n.changeAttr("aria-describedby",r)))})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");r=function(){function t(n){return n.type==CKEDITOR.NODE_ELEMENT}function f(n,r){var u,o,h,c,s=[],a=r.range.startContainer;u=r.range.startPath();for(var a=i[a.getName()],e=0,v=n.getChildren(),w=v.count(),l=-1,y=-1,p=0,b=u.contains(i.$list);e<w;++e)u=v.getItem(e),t(u)?(h=u.getName(),b&&h in CKEDITOR.dtd.$list?s=s.concat(f(u,r)):(c=!!a[h],h=="br"&&u.data("cke-eol")&&(!e||e==w-1)&&(p=(o=e?s[e-1].node:v.getItem(e+1))&&(!t(o)||!o.is("br")),o=o&&t(o)&&i.$block[o.getName()]),l!=-1||c||(l=e),c||(y=e),s.push({isElement:1,isLineBreak:p,isBlock:u.isBlockBoundary(),hasBlockSibling:o,node:u,name:h,allowed:c}),o=p=0)):s.push({isElement:0,node:u,allowed:1});return l>-1&&(s[l].firstNotAllowed=1),y>-1&&(s[y].lastNotAllowed=1),s}function e(n,r){var u=[],s=n.getChildren(),c=s.count(),f,o=0,l=i[r],h=!n.is(i.$inline)||n.is("br");for(h&&u.push(" ");o<c;o++)f=s.getItem(o),t(f)&&!f.is(l)?u=u.concat(e(f,r)):u.push(f);return h&&u.push(" "),u}function r(n){return n&&t(n)&&(n.is(i.$removeEmpty)||n.is("a")&&!n.isBlockBoundary())}function o(n,i,r,u){var s=n.clone(),f,e;s.setEndAt(i,CKEDITOR.POSITION_BEFORE_END);(f=new CKEDITOR.dom.walker(s).next())&&t(f)&&c[f.getName()]&&(e=f.getPrevious())&&t(e)&&!e.getParent().equals(n.startContainer)&&r.contains(e)&&u.contains(f)&&f.isIdentical(e)&&(f.moveChildren(e),f.remove(),o(n,i,r,u))}function h(n,i){function r(n,i){if(i.isBlock&&i.isElement&&!i.node.is("br")&&t(n)&&n.is("br"))return n.remove(),1}var u=i.endContainer.getChild(i.endOffset),f=i.endContainer.getChild(i.endOffset-1);u&&r(u,n[n.length-1]);f&&r(f,n[0])&&(i.setEnd(i.endContainer,i.endOffset-1),i.collapse())}var i=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},l={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},s=CKEDITOR.tools.extend({},i.$inline);return delete s.br,function(c,a,v){var y=c.editor,ct,at,d,ut,w,v,it,g,ot,tt,rt,st,b,ht,ft,lt,vt;if(c.getDocument(),ct=y.getSelection().getRanges()[0],tt=!1,a=="unfiltered_html"&&(a="html",tt=!0),!ct.checkReadOnly()){var b=new CKEDITOR.dom.elementPath(ct.startContainer,ct.root).blockLimit||ct.root,a={type:a,dontFilter:tt,editable:c,editor:y,range:ct,blockLimit:b,mergeCandidates:[],zombies:[]},y=a.range,tt=a.mergeCandidates,p,et,nt,k;for(a.type=="text"&&y.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(p=CKEDITOR.dom.element.createFromHtml("<span>&nbsp;<\/span>",y.document),y.insertNode(p),y.setStartAfter(p)),et=new CKEDITOR.dom.elementPath(y.startContainer),a.endPath=nt=new CKEDITOR.dom.elementPath(y.endContainer),y.collapsed||(b=nt.block||nt.blockLimit,at=y.getCommonAncestor(),b&&!b.equals(at)&&!b.contains(at)&&y.checkEndOfBlock()&&a.zombies.push(b),y.deleteContents());(k=t(y.startContainer)&&y.startContainer.getChild(y.startOffset-1))&&t(k)&&k.isBlockBoundary()&&et.contains(k);)y.moveToPosition(k,CKEDITOR.POSITION_BEFORE_END);for(o(y,a.blockLimit,et,nt),p&&(y.setEndBefore(p),y.collapse(),p.remove()),p=y.startPath(),(b=p.contains(r,!1,1))&&(y.splitElement(b),a.inlineStylesRoot=b,a.inlineStylesPeak=p.lastElement),p=y.createBookmark(),(b=p.startNode.getPrevious(n))&&t(b)&&r(b)&&tt.push(b),(b=p.startNode.getNext(n))&&t(b)&&r(b)&&tt.push(b),b=p.startNode;(b=b.getParent())&&r(b);)tt.push(b);if(y.moveToBookmark(p),p=v){if(p=a.range,a.type=="text"&&a.inlineStylesRoot){for(k=a.inlineStylesPeak,y=k.getDocument().createText("{cke-peak}"),tt=a.inlineStylesRoot.getParent();!k.equals(tt);)y=y.appendTo(k.clone()),k=k.getParent();v=y.getOuterHtml().split("{cke-peak}").join(v)}if(k=a.blockLimit.getName(),/^\s+|\s+$/.test(v)&&"span"in CKEDITOR.dtd[k]&&(ut='<span data-cke-marker="1">&nbsp;<\/span>',v=ut+v+ut),v=a.editor.dataProcessor.toHtml(v,{context:null,fixForBody:!1,dontFilter:a.dontFilter,filter:a.editor.activeFilter,enterMode:a.editor.activeEnterMode}),k=p.document.createElement("body"),k.setHtml(v),ut&&(k.getFirst().remove(),k.getLast().remove()),(ut=p.startPath().block)&&!(ut.getChildCount()==1&&ut.getBogus()))n:{if(k.getChildCount()==1&&t(d=k.getFirst())&&d.is(l)){for(ut=d.getElementsByTag("*"),p=0,tt=ut.count();p<tt;p++)if(y=ut.getItem(p),!y.is(s))break n;d.moveChildren(d.getParent(1));d.remove()}}a.dataWrapper=k;p=v}if(p){for(d=a.range,ut=d.document,v=a.blockLimit,p=0,k=[],tt=y=0,et=d.startContainer,b=a.endPath.elements[0],nt=b.getPosition(et),at=!!b.getCommonAncestor(et)&&nt!=CKEDITOR.POSITION_IDENTICAL&&!(nt&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED),et=f(a.dataWrapper,a),h(et,d);p<et.length;p++)if(nt=et[p],(w=nt.isLineBreak)&&(w=d,rt=v,ft=void 0,lt=void 0,nt.hasBlockSibling?w=1:(ft=w.startContainer.getAscendant(i.$block,1),ft&&ft.is({div:1,p:1})?(lt=ft.getPosition(rt),lt==CKEDITOR.POSITION_IDENTICAL||lt==CKEDITOR.POSITION_CONTAINS?w=0:(rt=w.splitElement(ft),w.moveToPosition(rt,CKEDITOR.POSITION_AFTER_START),w=1)):w=0)),w)tt=p>0;else{if(w=d.startPath(),!nt.isBlock&&a.editor.config.autoParagraph!==!1&&a.editor.activeEnterMode!=CKEDITOR.ENTER_BR&&a.editor.editable().equals(w.blockLimit)&&!w.block&&(ot=a.editor.activeEnterMode!=CKEDITOR.ENTER_BR&&a.editor.config.autoParagraph!==!1?a.editor.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1)&&(ot=ut.createElement(ot),ot.appendBogus(),d.insertNode(ot),CKEDITOR.env.needsBrFiller&&(it=ot.getBogus())&&it.remove(),d.moveToPosition(ot,CKEDITOR.POSITION_BEFORE_END)),(w=d.startPath().block)&&!w.equals(g)&&((it=w.getBogus())&&(it.remove(),k.push(w)),g=w),nt.firstNotAllowed&&(y=1),y&&nt.isElement){for(w=d.startContainer,rt=null;w&&!i[w.getName()][nt.name];){if(w.equals(v)){w=null;break}rt=w;w=w.getParent()}if(w)rt&&(st=d.splitElement(rt),a.zombies.push(st),a.zombies.push(rt));else{rt=v.getName();ht=!p;w=p==et.length-1;rt=e(nt.node,rt);for(var ft=[],lt=rt.length,yt=0,pt=void 0,wt=0,bt=-1;yt<lt;yt++)pt=rt[yt],pt==" "?(wt||ht&&!yt||(ft.push(new CKEDITOR.dom.text(" ")),bt=ft.length),wt=1):(ft.push(pt),wt=0);w&&bt==ft.length&&ft.pop();ht=ft}}if(ht){for(;w=ht.pop();)d.insertNode(w);ht=0}else d.insertNode(nt.node);nt.lastNotAllowed&&p<et.length-1&&((st=at?b:st)&&d.setEndAt(st,CKEDITOR.POSITION_AFTER_START),y=0);d.collapse()}a.dontMoveCaret=tt;a.bogusNeededBlocks=k}for(it=a.range,st=a.bogusNeededBlocks,ht=it.createBookmark();g=a.zombies.pop();)g.getParent()&&(ot=it.clone(),ot.moveToElementEditStart(g),ot.removeEmptyBlocksAtEnd());if(st)for(;g=st.pop();)CKEDITOR.env.needsBrFiller?g.appendBogus():g.append(it.document.createText(" "));for(;g=a.mergeCandidates.pop();)g.mergeSiblings();if(it.moveToBookmark(ht),!a.dontMoveCaret){for(g=t(it.startContainer)&&it.startContainer.getChild(it.startOffset-1);g&&t(g)&&!g.is(i.$empty);){if(g.isBlockBoundary())it.moveToPosition(g,CKEDITOR.POSITION_BEFORE_END);else{if(r(g)&&g.getHtml().match(/(\s|&nbsp;)$/g)){vt=null;break}vt=it.clone();vt.moveToPosition(g,CKEDITOR.POSITION_BEFORE_END)}g=g.getLast(n)}vt&&it.moveToRange(vt)}ct.select();u(c)}}}()}(),function(){function e(){var n=this._.fakeSelection,t;(n&&(t=this.getSelection(1),t&&t.isHidden()||(n.reset(),n=0)),n||(n=t||this.getSelection(1),n&&n.getType()!=CKEDITOR.SELECTION_NONE))&&(this.fire("selectionCheck",n),t=this.elementPath(),t.compare(this._.selectionPreviousPath)||(CKEDITOR.env.webkit&&(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=t,this.fire("selectionChange",{selection:n,path:t})))}function i(){h=!0;s||(c.call(this),s=CKEDITOR.tools.setTimeout(c,200,this))}function c(){s=null;h&&(CKEDITOR.tools.setTimeout(e,0,this),h=!1)}function v(n){function i(t,i){return!t||t.type==CKEDITOR.NODE_TEXT?!1:n.clone()["moveToElementEdit"+(i?"End":"Start")](t)}if(!(n.root instanceof CKEDITOR.editable))return!1;var t=n.startContainer,r=n.getPreviousNode(a,null,t),u=n.getNextNode(a,null,t);return i(r)||i(u,1)||!r&&!u&&!(t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary()&&t.getBogus())?!0:!1}function o(n){return n.getCustomData("cke-fillingChar")}function t(n,t){var r=n&&n.removeCustomData("cke-fillingChar"),f,i,u,e;r&&(t!==!1&&(i=n.getDocument().getSelection().getNative(),u=i&&i.type!="None"&&i.getRangeAt(0),r.getLength()>1&&u&&u.intersectsNode(r.$)&&(f=[i.anchorOffset,i.focusOffset],u=i.focusNode==r.$&&i.focusOffset>0,i.anchorNode==r.$&&i.anchorOffset>0&&f[0]--,u&&f[1]--,u=i,u.isCollapsed||(e=u.getRangeAt(0),e.setStart(u.anchorNode,u.anchorOffset),e.setEnd(u.focusNode,u.focusOffset),e=e.collapsed),e&&f.unshift(f.pop()))),r.setText(l(r.getText())),f&&(r=i.getRangeAt(0),r.setStart(r.startContainer,f[0]),r.setEnd(r.startContainer,f[1]),i.removeAllRanges(),i.addRange(r)))}function l(n){return n.replace(/\u200B( )?/g,function(n){return n[1]?" ":""})}function r(n,t,i){var e=n.on("focus",function(n){n.cancel()},null,null,-100),f,r,u;CKEDITOR.env.ie?f=n.getDocument().on("selectionchange",function(n){n.cancel()},null,null,-100):(r=new CKEDITOR.dom.range(n),r.moveToElementEditStart(n),u=n.getDocument().$.createRange(),u.setStart(r.startContainer.$,r.startOffset),u.collapse(1),t.removeAllRanges(),t.addRange(u));i&&n.focus();e.removeListener();f&&f.removeListener()}function y(n){var t=CKEDITOR.dom.element.createFromHtml('<div data-cke-hidden-sel="1" data-cke-temp="1" style="'+(CKEDITOR.env.ie?"display:none":"position:fixed;top:0;left:-1000px")+'">&nbsp;<\/div>',n.document);n.fire("lockSnapshot");n.editable().append(t);var r=n.getSelection(),i=n.createRange(),u=r.root.on("selectionchange",function(n){n.cancel()},null,null,0);i.setStartAt(t,CKEDITOR.POSITION_AFTER_START);i.setEndAt(t,CKEDITOR.POSITION_BEFORE_END);r.selectRanges([i]);u.removeListener();n.fire("unlockSnapshot");n._.hiddenSelectionContainer=t}function p(n){var t={37:1,39:1,8:1,46:1};return function(i){var r=i.data.getKeystroke(),u,f;t[r]&&(u=n.getSelection().getRanges(),f=u[0],u.length==1&&f.collapsed&&(r=f[r<38?"getPreviousEditableNode":"getNextEditableNode"]())&&r.type==CKEDITOR.NODE_ELEMENT&&r.getAttribute("contenteditable")=="false"&&(n.getSelection().fake(r),i.data.preventDefault(),i.cancel()))}}var s,h,a=CKEDITOR.dom.walker.invisible(1),w=function(){function n(n){return function(t){var i=t.editor.createRange();return i.moveToClosestEditablePosition(t.selected,n)&&t.editor.getSelection().selectRanges([i]),!1}}function t(n){return function(t){var i=t.editor,r=i.createRange(),u;return(u=r.moveToClosestEditablePosition(t.selected,n))||(u=r.moveToClosestEditablePosition(t.selected,!n)),u&&i.getSelection().selectRanges([r]),i.fire("saveSnapshot"),t.selected.remove(),u||(r.moveToElementEditablePosition(i.editable()),i.getSelection().selectRanges([r])),i.fire("saveSnapshot"),!1}}var i=n(),r=n(1);return{37:i,38:i,39:r,40:r,8:t(),46:t(1)}}(),n,u,f;CKEDITOR.on("instanceCreated",function(r){function f(){var n=u.getSelection();n&&n.removeAllRanges()}var u=r.editor;u.on("contentDom",function(){var o=u.document,l=CKEDITOR.document,r=u.editable(),b=o.getBody(),f=o.getDocumentElement(),a=r.isInline(),s,v,y,h,c,w;if(CKEDITOR.env.gecko&&r.attachListener(r,"focus",function(n){n.removeListener();s!==0&&(n=u.getSelection().getNative())&&n.isCollapsed&&n.anchorNode==r.$&&(n=u.createRange(),n.moveToElementEditStart(r),n.select())},null,null,-2),r.attachListener(r,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){s&&CKEDITOR.env.webkit&&(s=u._.previousActive&&u._.previousActive.equals(o.getActive()));u.unlockSelection(s);s=0},null,null,-1),r.attachListener(r,"mousedown",function(){s=0}),(CKEDITOR.env.ie||CKEDITOR.env.opera||a)&&(y=function(){v=new CKEDITOR.dom.selection(u.getSelection());v.lock()},n?r.attachListener(r,"beforedeactivate",y,null,null,-1):r.attachListener(u,"selectionCheck",y,null,null,-1),r.attachListener(r,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){u.lockSelection(v);s=1},null,null,-1),r.attachListener(r,"mousedown",function(){s=0})),CKEDITOR.env.ie&&!a&&(r.attachListener(r,"mousedown",function(n){n.data.$.button==2&&(n=u.document.getSelection(),n&&n.getType()!=CKEDITOR.SELECTION_NONE||(h=u.window.getScrollPosition()))}),r.attachListener(r,"mouseup",function(n){n.data.$.button==2&&h&&(u.document.$.documentElement.scrollLeft=h.x,u.document.$.documentElement.scrollTop=h.y);h=null}),o.$.compatMode!="BackCompat")){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)f.on("mousedown",function(n){function r(n){if(n=n.data.$,t){var i=b.$.createTextRange();try{i.moveToPoint(n.x,n.y)}catch(r){}t.setEndPoint(u.compareEndPoints("StartToStart",i)<0?"EndToEnd":"StartToStart",i);t.select()}}function i(){f.removeListener("mousemove",r);l.removeListener("mouseup",i);f.removeListener("mouseup",i);t.select()}var t,u;if(n=n.data,n.getTarget().is("html")&&n.$.y<f.$.clientHeight&&n.$.x<f.$.clientWidth){t=b.$.createTextRange();try{t.moveToPoint(n.$.x,n.$.y)}catch(e){}u=t.duplicate();f.on("mousemove",r);l.on("mouseup",i);f.on("mouseup",i)}});if(CKEDITOR.env.version>7&&CKEDITOR.env.version<11){f.on("mousedown",function(n){if(n.data.getTarget().is("html")){l.on("mouseup",c);f.on("mouseup",c)}});c=function(){l.removeListener("mouseup",c);f.removeListener("mouseup",c);var n=CKEDITOR.document.$.selection,t=n.createRange();n.type!="None"&&t.parentElement().ownerDocument==o.$&&t.select()}}}r.attachListener(r,"selectionchange",e,u);r.attachListener(r,"keyup",i,u);r.attachListener(r,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){u.forceNextSelectionCheck();u.selectionChange(1)});(a?CKEDITOR.env.webkit||CKEDITOR.env.gecko:CKEDITOR.env.opera)?(r.attachListener(r,"mousedown",function(){w=1}),r.attachListener(o.getDocumentElement(),"mouseup",function(){w&&i.call(u);w=0})):r.attachListener(CKEDITOR.env.ie?r:o.getDocumentElement(),"mouseup",i,u);CKEDITOR.env.webkit&&r.attachListener(o,"keydown",function(n){switch(n.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:t(r)}},null,null,-1);r.attachListener(r,"keydown",p(u),null,null,-1)});u.on("contentDomUnload",u.forceNextSelectionCheck,u);u.on("dataReady",function(){delete u._.fakeSelection;delete u._.hiddenSelectionContainer;u.selectionChange(1)});u.on("loadSnapshot",function(){var n=u.editable().getLast(function(n){return n.type==CKEDITOR.NODE_ELEMENT});n&&n.hasAttribute("data-cke-hidden-sel")&&n.remove()},null,null,100);CKEDITOR.env.ie9Compat&&u.on("beforeDestroy",f,null,null,9);CKEDITOR.env.webkit&&u.on("setData",f);u.on("contentDomUnload",function(){u.unlockSelection()});u.on("key",function(n){var t,i;if(u.mode=="wysiwyg"&&(t=u.getSelection(),t.isFake&&(i=w[n.data.keyCode],i)))return i({editor:u,selected:t.getSelectedElement(),selection:t,keyEvent:n})})});CKEDITOR.on("instanceReady",function(n){var i=n.editor,r,u,n,f;if(CKEDITOR.env.webkit){i.on("selectionChange",function(){var r=i.editable(),n=o(r);n&&(n.getCustomData("ready")?t(r):n.setCustomData("ready",1))},null,null,-1);i.on("beforeSetMode",function(){t(i.editable())},null,null,-1);n=function(){var n=i.editable(),t;n&&(n=o(n))&&(t=i.document.$.defaultView.getSelection(),t.type=="Caret"&&t.anchorNode==n.$&&(u=1),r=n.getText(),n.setText(l(r)))};f=function(){var n=i.editable();n&&(n=o(n))&&(n.setText(r),u&&(i.document.$.defaultView.getSelection().setPosition(n.$,n.getLength()),u=0))};i.on("beforeUndoImage",n);i.on("afterUndoImage",f);i.on("beforeGetData",n,null,null,0);i.on("getData",f)}});CKEDITOR.editor.prototype.selectionChange=function(n){(n?e:i).call(this)};CKEDITOR.editor.prototype.getSelection=function(n){return(this._.savedSelection||this._.fakeSelection)&&!n?this._.savedSelection||this._.fakeSelection:(n=this.editable())&&this.mode=="wysiwyg"?new CKEDITOR.dom.selection(n):null};CKEDITOR.editor.prototype.lockSelection=function(n){return(n=n||this.getSelection(1),n.getType()!=CKEDITOR.SELECTION_NONE)?(n.isLocked||n.lock(),this._.savedSelection=n,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(n){var t=this._.savedSelection;return t?(t.unlock(n),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 n=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);return n.selectRanges([this]),n};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;n=typeof window.getSelection!="function";u=1;CKEDITOR.dom.selection=function(t){var i,t,s,f,e,o;if(t instanceof CKEDITOR.dom.selection&&(i=t,t=t.root),s=t instanceof CKEDITOR.dom.element,this.rev=i?i.rev:u++,this.document=t instanceof CKEDITOR.dom.document?t:t.getDocument(),this.root=t=s?t:this.document.getBody(),this.isLocked=0,this._={cache:{}},i)return CKEDITOR.tools.extend(this._.cache,i._.cache),this.isFake=i.isFake,this.isLocked=i.isLocked,this;if(i=n?this.document.$.selection:this.document.getWindow().$.getSelection(),CKEDITOR.env.webkit)(i.type=="None"&&this.document.getActive().equals(t)||i.type=="Caret"&&i.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT)&&r(t,i);else if(CKEDITOR.env.gecko)i&&this.document.getActive().equals(t)&&i.anchorNode&&i.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT&&r(t,i,!0);else if(CKEDITOR.env.ie){try{f=this.document.getActive()}catch(h){}n?i.type=="None"&&f&&f.equals(this.document.getDocumentElement())&&r(t,null,!0):((i=i&&i.anchorNode)&&(i=new CKEDITOR.dom.node(i)),f&&f.equals(this.document.getDocumentElement())&&i&&(t.equals(i)||t.contains(i))&&r(t,null,!0))}if(f=this.getNative(),f)if(f.getRangeAt)e=(o=f.rangeCount&&f.getRangeAt(0))&&new CKEDITOR.dom.node(o.commonAncestorContainer);else{try{o=f.createRange()}catch(c){}e=o&&CKEDITOR.dom.element.get(o.item&&o.item(0)||o.parentElement())}return e&&(e.type==CKEDITOR.NODE_ELEMENT||e.type==CKEDITOR.NODE_TEXT)&&(this.root.equals(e)||this.root.contains(e))||(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};f={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.dom.selection.prototype={getNative:function(){return this._.cache.nativeSel!==void 0?this._.cache.nativeSel:this._.cache.nativeSel=n?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:n?function(){var t=this._.cache,n,i,r;if(t.type)return t.type;n=CKEDITOR.SELECTION_NONE;try{i=this.getNative();r=i.type;r=="Text"&&(n=CKEDITOR.SELECTION_TEXT);r=="Control"&&(n=CKEDITOR.SELECTION_ELEMENT);i.createRange().parentElement()&&(n=CKEDITOR.SELECTION_TEXT)}catch(u){}return t.type=n}:function(){var r=this._.cache,t,n,i;return r.type?r.type:(t=CKEDITOR.SELECTION_TEXT,n=this.getNative(),n&&n.rangeCount?n.rangeCount==1&&(n=n.getRangeAt(0),i=n.startContainer,i==n.endContainer&&i.nodeType==1&&n.endOffset-n.startOffset==1&&f[i.childNodes[n.startOffset].nodeName.toLowerCase()]&&(t=CKEDITOR.SELECTION_ELEMENT)):t=CKEDITOR.SELECTION_NONE,r.type=t)},getRanges:function(){var t=n?function(){function n(n){return new CKEDITOR.dom.node(n).getIndex()}var t=function(t,i){var u;if(t=t.duplicate(),t.collapse(i),u=t.parentElement(),!u.hasChildNodes())return{container:u,offset:0};for(var e=u.children,f,o,r=t.duplicate(),l=0,a=e.length-1,h=-1,s,c;l<=a;)if(h=Math.floor((l+a)/2),f=e[h],r.moveToElementText(f),s=r.compareEndPoints("StartToStart",t),s>0)a=h-1;else if(s<0)l=h+1;else return{container:u,offset:n(f)};if(h==-1||h==e.length-1&&s<0){if(r.moveToElementText(u),r.setEndPoint("StartToStart",t),r=r.text.replace(/(\r\n|\r)/g,"\n").length,e=u.childNodes,!r)return f=e[e.length-1],f.nodeType!=CKEDITOR.NODE_TEXT?{container:u,offset:e.length}:{container:f,offset:f.nodeValue.length};for(u=e.length;r>0&&u>0;)o=e[--u],o.nodeType==CKEDITOR.NODE_TEXT&&(c=o,r=r-o.nodeValue.length);return{container:c,offset:-r}}if(r.collapse(s>0?!0:!1),r.setEndPoint(s>0?"StartToStart":"EndToStart",t),r=r.text.replace(/(\r\n|\r)/g,"\n").length,!r)return{container:u,offset:n(f)+(s>0?0:1)};for(;r>0;)try{o=f[s>0?"previousSibling":"nextSibling"];o.nodeType==CKEDITOR.NODE_TEXT&&(r=r-o.nodeValue.length,c=o);f=o}catch(v){return{container:u,offset:n(f)}}return{container:c,offset:s>0?-r:c.nodeValue.length+r}};return function(){var n=this.getNative(),u=n&&n.createRange(),i=this.getType(),f;if(!n)return[];if(i==CKEDITOR.SELECTION_TEXT)return n=new CKEDITOR.dom.range(this.root),i=t(u,!0),n.setStart(new CKEDITOR.dom.node(i.container),i.offset),i=t(u),n.setEnd(new CKEDITOR.dom.node(i.container),i.offset),n.endContainer.getPosition(n.startContainer)&CKEDITOR.POSITION_PRECEDING&&n.endOffset<=n.startContainer.getIndex()&&n.collapse(),[n];if(i==CKEDITOR.SELECTION_ELEMENT){for(i=[],f=0;f<u.length;f++){for(var o=u.item(f),e=o.parentNode,r=0,n=new CKEDITOR.dom.range(this.root);r<e.childNodes.length&&e.childNodes[r]!=o;r++);n.setStart(new CKEDITOR.dom.node(e),r);n.setEnd(new CKEDITOR.dom.node(e),r+1);i.push(n)}return i}return[]}}():function(){var r=[],t,u=this.getNative(),i,n;if(!u)return r;for(i=0;i<u.rangeCount;i++)n=u.getRangeAt(i),t=new CKEDITOR.dom.range(this.root),t.setStart(new CKEDITOR.dom.node(n.startContainer),n.startOffset),t.setEnd(new CKEDITOR.dom.node(n.endContainer),n.endOffset),r.push(t);return r};return function(n){var f=this._.cache,e,r,i,n,u;if(f.ranges&&!n)return f.ranges;if(f.ranges||(f.ranges=new CKEDITOR.dom.rangeList(t.call(this))),n)for(e=f.ranges,r=0;r<e.length;r++)if(i=e[r],i.getCommonAncestor().isReadOnly()&&e.splice(r,1),!i.collapsed){if(i.startContainer.isReadOnly())for(n=i.startContainer;n;){if((u=n.type==CKEDITOR.NODE_ELEMENT)&&n.is("body")||!n.isReadOnly())break;u&&n.getAttribute("contentEditable")=="false"&&i.setStartAfter(n);n=n.getParent()}n=i.startContainer;u=i.endContainer;var s=i.startOffset,h=i.endOffset,o=i.clone();n&&n.type==CKEDITOR.NODE_TEXT&&(s>=n.getLength()?o.setStartAfter(n):o.setStartBefore(n));u&&u.type==CKEDITOR.NODE_TEXT&&(h?o.setEndAfter(u):o.setEndBefore(u));n=new CKEDITOR.dom.walker(o);n.evaluator=function(n){if(n.type==CKEDITOR.NODE_ELEMENT&&n.isReadOnly()){var t=i.clone();return i.setEndBefore(n),i.collapsed&&e.splice(r--,1),n.getPosition(o.endContainer)&CKEDITOR.POSITION_CONTAINS||(t.setStartAfter(n),t.collapsed||e.splice(r+1,0,t)),!0}return!1};n.next()}return f.ranges}}(),getStartElement:function(){var i=this._.cache,n,t;if(i.startElement!==void 0)return i.startElement;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:if(t=this.getRanges()[0],t){if(t.collapsed)n=t.startContainer,n.type!=CKEDITOR.NODE_ELEMENT&&(n=n.getParent());else{for(t.optimize();;)if(n=t.startContainer,t.startOffset!=(n.getChildCount?n.getChildCount():n.getLength())||n.isBlockBoundary())break;else t.setStartAfter(n);if(n=t.startContainer,n.type!=CKEDITOR.NODE_ELEMENT)return n.getParent();if(n=n.getChild(t.startOffset),n&&n.type==CKEDITOR.NODE_ELEMENT)for(t=n.getFirst();t&&t.type==CKEDITOR.NODE_ELEMENT;)n=t,t=t.getFirst();else n=t.startContainer}n=n.$}}return i.startElement=n?new CKEDITOR.dom.element(n):null},getSelectedElement:function(){var n=this._.cache,t,i;return n.selectedElement!==void 0?n.selectedElement:(t=this,i=CKEDITOR.tools.tryThese(function(){return t.getNative().createRange().item(0)},function(){for(var r=t.getRanges()[0].clone(),n,i,u=2;u&&(!(n=r.getEnclosedNode())||!(n.type==CKEDITOR.NODE_ELEMENT&&f[n.getName()]&&(i=n)));u--)r.shrink(CKEDITOR.SHRINK_ELEMENT);return i&&i.$}),n.selectedElement=i?new CKEDITOR.dom.element(i):null)},getSelectedText:function(){var i=this._.cache,t;return i.selectedText!==void 0?i.selectedText:(t=this.getNative(),t=n?t.type=="Control"?"":t.createRange().text:t.toString(),i.selectedText=t)},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(n){if(this.isLocked){if(n)var t=this.getSelectedElement(),i=!t&&this.getRanges(),r=this.isFake;this.isLocked=0;this.reset();n&&(n=t||i[0]&&i[0].getCommonAncestor())&&n.getAscendant("body",1)&&(r?this.fake(t):t?this.selectElement(t):this.selectRanges(i))}},reset:function(){var n,t;this._.cache={};this.isFake=0;n=this.root.editor;n&&n._.fakeSelection&&this.rev==n._.fakeSelection.rev&&(delete n._.fakeSelection,t=n._.hiddenSelectionContainer,t&&(n.fire("lockSnapshot"),t.remove(),n.fire("unlockSnapshot")),delete n._.hiddenSelectionContainer);this.rev=u++},selectElement:function(n){var t=new CKEDITOR.dom.range(this.root);t.setStartBefore(n);t.setEndAfter(n);this.selectRanges([t])},selectRanges:function(i){var r,s,c;if(this.reset(),i.length)if(this.isLocked)r=CKEDITOR.document.getActive(),this.unlock(),this.selectRanges(i),this.lock(),r.equals(this.root)||r.focus();else if(i.length==1&&!i[0].collapsed&&(r=i[0].getEnclosedNode())&&r.type==CKEDITOR.NODE_ELEMENT&&r.getAttribute("contenteditable")=="false")this.fake(r);else{if(n){var a=CKEDITOR.dom.walker.whitespaces(!0),h=/\ufeff|\u00a0/,s={table:1,tbody:1,tr:1};i.length>1&&(r=i[i.length-1],i[0].setEnd(r.endContainer,r.endOffset));var r=i[0],i=r.collapsed,o,u,e,l=r.getEnclosedNode();if(l&&l.type==CKEDITOR.NODE_ELEMENT&&l.getName()in f&&(!l.is("a")||!l.getText()))try{e=l.$.createControlRange();e.addElement(l.$);e.select();return}catch(p){}(r.startContainer.type==CKEDITOR.NODE_ELEMENT&&r.startContainer.getName()in s||r.endContainer.type==CKEDITOR.NODE_ELEMENT&&r.endContainer.getName()in s)&&r.shrink(CKEDITOR.NODE_ELEMENT,!0);e=r.createBookmark();s=e.startNode;i||(c=e.endNode);e=r.document.$.body.createTextRange();e.moveToElementText(s.$);e.moveStart("character",1);c?(h=r.document.$.body.createTextRange(),h.moveToElementText(c.$),e.setEndPoint("EndToEnd",h),e.moveEnd("character",-1)):(o=s.getNext(a),u=s.hasAscendant("pre"),o=!(o&&o.getText&&o.getText().match(h))&&(u||!s.hasPrevious()||s.getPrevious().is&&s.getPrevious().is("br")),u=r.document.createElement("span"),u.setHtml("&#65279;"),u.insertBefore(s),o&&r.document.createText("﻿").insertBefore(s));r.setStartBefore(s);s.remove();i?(o?(e.moveStart("character",-1),e.select(),r.document.$.selection.clear()):e.select(),r.moveToPosition(u,CKEDITOR.POSITION_BEFORE_START),u.remove()):(r.setEndBefore(c),c.remove(),e.select())}else{if(c=this.getNative(),!c)return;for(CKEDITOR.env.opera&&(r=this.document.$.createRange(),r.selectNodeContents(this.root.$),c.addRange(r)),this.removeAllRanges(),e=0;e<i.length;e++){if(e<i.length-1&&(r=i[e],h=i[e+1],u=r.clone(),u.setStart(r.endContainer,r.endOffset),u.setEnd(h.startContainer,h.startOffset),!u.collapsed&&(u.shrink(CKEDITOR.NODE_ELEMENT,!0),o=u.getCommonAncestor(),u=u.getEnclosedNode(),o.isReadOnly()||u&&u.isReadOnly()))){h.setStart(r.startContainer,r.startOffset);i.splice(e--,1);continue}r=i[e];h=this.document.$.createRange();o=r.startContainer;CKEDITOR.env.opera&&r.collapsed&&o.type==CKEDITOR.NODE_ELEMENT&&(u=o.getChild(r.startOffset-1),a=o.getChild(r.startOffset),(!u&&!a&&o.is(CKEDITOR.dtd.$removeEmpty)||u&&u.type==CKEDITOR.NODE_ELEMENT||a&&a.type==CKEDITOR.NODE_ELEMENT)&&(r.insertNode(this.document.createText("")),r.collapse(1)));r.collapsed&&CKEDITOR.env.webkit&&v(r)&&(o=this.root,t(o,!1),u=o.getDocument().createText("​"),o.setCustomData("cke-fillingChar",u),r.insertNode(u),(o=u.getNext())&&!u.getPrevious()&&o.type==CKEDITOR.NODE_ELEMENT&&o.getName()=="br"?(t(this.root),r.moveToPosition(o,CKEDITOR.POSITION_BEFORE_START)):r.moveToPosition(u,CKEDITOR.POSITION_AFTER_END));h.setStart(r.startContainer.$,r.startOffset);try{h.setEnd(r.endContainer.$,r.endOffset)}catch(y){if(y.toString().indexOf("NS_ERROR_ILLEGAL_VALUE")>=0)r.collapse(1),h.setEnd(r.endContainer.$,r.endOffset);else throw y;}c.addRange(h)}}this.reset();this.root.fire("selectionchange")}},fake:function(n){var r=this.root.editor,t,i;this.reset();y(r);t=this._.cache;i=new CKEDITOR.dom.range(this.root);i.setStartBefore(n);i.setEndAfter(n);t.ranges=new CKEDITOR.dom.rangeList(i);t.selectedElement=t.startElement=n;t.type=CKEDITOR.SELECTION_ELEMENT;t.selectedText=t.nativeSel=null;this.isFake=1;this.rev=u++;r._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var n=this.getCommonAncestor();return n&&n.type==CKEDITOR.NODE_TEXT&&(n=n.getParent()),!(!n||!n.data("cke-hidden-sel"))},createBookmarks:function(n){return n=this.getRanges().createBookmarks(n),this.isFake&&(n.isFake=1),n},createBookmarks2:function(n){return n=this.getRanges().createBookmarks2(n),this.isFake&&(n.isFake=1),n},selectBookmarks:function(n){for(var r,t=[],i=0;i<n.length;i++)r=new CKEDITOR.dom.range(this.root),r.moveToBookmark(n[i]),t.push(r);return n.isFake?this.fake(t[0].getEnclosedNode()):this.selectRanges(t),this},getCommonAncestor:function(){var n=this.getRanges();return n.length?n[0].startContainer.getCommonAncestor(n[n.length-1].endContainer):null},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){var t=this.getNative();try{t&&t[n?"empty":"removeAllRanges"]()}catch(i){}this.reset()}}}();CKEDITOR.editor.prototype.attachStyleStateChange=function(n,t){var i=this._.styleStateChangeCallbacks;if(!i){i=this._.styleStateChangeCallbacks=[];this.on("selectionChange",function(n){for(var r,u,t=0;t<i.length;t++)r=i[t],u=r.style.checkActive(n.data.path)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF,r.fn.call(this,u)})}i.push({style:n,fn:t})};CKEDITOR.STYLE_BLOCK=1;CKEDITOR.STYLE_INLINE=2;CKEDITOR.STYLE_OBJECT=3,function(){function l(n,t){for(var i,u,r;n=n.getParent();){if(n.equals(t))break;n.getAttribute("data-nostyle")?i=n:u||(r=n.getAttribute("contentEditable"),r=="false"?i=n:r=="true"&&(u=1))}return i}function a(n){var d=n.document,nt,w,lt,u,rt;if(n.collapsed)d=o(this,d),n.insertNode(d),n.moveToPosition(d,CKEDITOR.POSITION_BEFORE_END);else{var et=this.element,s=this._.definition,at,t=s.ignoreReadonly,ut=t||s.includeReadonly;ut==void 0&&(ut=n.root.getCustomData("cke_includeReadonly"));nt=CKEDITOR.dtd[et];nt||(at=!0,nt=CKEDITOR.dtd.span);n.enlarge(CKEDITOR.ENLARGE_INLINE,1);n.trim();var ot=n.createBookmark(),ht=ot.startNode,k=ot.endNode,r=ht,f;if(!t){var e=n.getCommonAncestor(),t=l(ht,e),e=l(k,e);t&&(r=t.getNextSourceNode(!0));e&&(k=e)}for(r.getPosition(k)==CKEDITOR.POSITION_FOLLOWING&&(r=0);r;){if(t=!1,r.equals(k))r=null,t=!0;else{var u=r.type==CKEDITOR.NODE_ELEMENT?r.getName():null,e=u&&r.getAttribute("contentEditable")=="false",v=u&&r.getAttribute("data-nostyle");if(u&&r.data("cke-bookmark")){r=r.getNextSourceNode(!0);continue}if(e&&ut&&CKEDITOR.dtd.$block[u])for(var tt=r,h=g(tt),w=void 0,it=h.length,ct=0,tt=it&&new CKEDITOR.dom.range(tt.getDocument());ct<it;++ct)w=h[ct],lt=CKEDITOR.filter.instances[w.data("cke-filter")],(lt?lt.check(this):1)&&(tt.selectNodeContents(w),a.call(this,tt));if(h=u?!nt[u]||v?0:e&&!ut?0:(r.getPosition(k)|i)==i&&(!s.childRule||s.childRule(r)):1,h)if((h=r.getParent())&&((h.getDtd()||CKEDITOR.dtd.span)[et]||at)&&(!s.parentRule||s.parentRule(h))){if(f||u&&CKEDITOR.dtd.$removeEmpty[u]&&(r.getPosition(k)|i)!=i||(f=n.clone(),f.setStartBefore(r)),u=r.type,u==CKEDITOR.NODE_TEXT||e||u==CKEDITOR.NODE_ELEMENT&&!r.getChildCount()){for(u=r;(t=!u.getNext(st))&&(rt=u.getParent(),nt[rt.getName()])&&(rt.getPosition(ht)|c)==c&&(!s.childRule||s.childRule(rt));)u=rt;f.setEndAfter(u)}}else t=!0;else t=!0;r=r.getNextSourceNode(v||e)}if(t&&f&&!f.collapsed){for(var t=o(this,d),e=t.hasAttributes(),v=f.getCommonAncestor(),u={},h={},w={},it={},b,p,ft;t&&v;){if(v.getName()==et){for(b in s.attributes)!it[b]&&(ft=v.getAttribute(p))&&(t.getAttribute(b)==ft?h[b]=1:it[b]=1);for(p in s.styles)!w[p]&&(ft=v.getStyle(p))&&(t.getStyle(p)==ft?u[p]=1:w[p]=1)}v=v.getParent()}for(b in h)t.removeAttribute(b);for(p in u)t.removeStyle(p);e&&!t.hasAttributes()&&(t=null);t?(f.extractContents().appendTo(t),f.insertNode(t),y.call(this,t),t.mergeSiblings(),CKEDITOR.env.ie||t.$.normalize()):(t=new CKEDITOR.dom.element("span"),f.extractContents().appendTo(t),f.insertNode(t),y.call(this,t),t.remove(!0));f=null}}n.moveToBookmark(ot);n.shrink(CKEDITOR.SHRINK_TEXT);n.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function d(n){function v(){for(var n,i=new CKEDITOR.dom.elementPath(s.getParent()),r=new CKEDITOR.dom.elementPath(l.getParent()),u=null,f=null,t=0;t<i.elements.length;t++){if(n=i.elements[t],n==i.block||n==i.blockLimit)break;a.checkElementRemovable(n)&&(u=n)}for(t=0;t<r.elements.length;t++){if(n=r.elements[t],n==r.block||n==r.blockLimit)break;a.checkElementRemovable(n)&&(f=n)}f&&l.breakParent(f);u&&s.breakParent(u)}var c,s,i,e,h,f,o,l,a;if(n.enlarge(CKEDITOR.ENLARGE_INLINE,1),c=n.createBookmark(),s=c.startNode,n.collapsed){for(i=new CKEDITOR.dom.elementPath(s.getParent(),n.root),h=0;h<i.elements.length&&(f=i.elements[h]);h++){if(f==i.block||f==i.blockLimit)break;this.checkElementRemovable(f)&&(n.collapsed&&(n.checkBoundaryOfElement(f,CKEDITOR.END)||(o=n.checkBoundaryOfElement(f,CKEDITOR.START)))?(e=f,e.match=o?"start":"end"):(f.mergeSiblings(),f.is(this.element)?r.call(this,f):u(f,t(this)[f.getName()])))}if(e){for(f=s,h=0;;h++){if(o=i.elements[h],o.equals(e))break;else if(o.match)continue;else o=o.clone();o.append(f);f=o}f[e.match=="start"?"insertBefore":"insertAfter"](e)}}else for(l=c.endNode,a=this,v(),i=s;!i.equals(l);)e=i.getNextSourceNode(),i.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(i)&&(i.getName()==this.element?r.call(this,i):u(i,t(this)[i.getName()]),e.type==CKEDITOR.NODE_ELEMENT&&e.contains(s)&&(v(),e=s.getNext())),i=e;n.moveToBookmark(c);n.shrink(CKEDITOR.NODE_ELEMENT,!0)}function g(n){var t=[];return n.forEach(function(n){if(n.getAttribute("contenteditable")=="true")return t.push(n),!1},CKEDITOR.NODE_ELEMENT,!0),t}function nt(n){var t=n.getEnclosedNode()||n.getCommonAncestor(!1,!0);(n=new CKEDITOR.dom.elementPath(t,n.root).contains(this.element,1))&&!n.isReadOnly()&&s(n,this)}function tt(n){var t=n.getCommonAncestor(!0,!0),i,r,u;if(n=new CKEDITOR.dom.elementPath(t,n.root).contains(this.element,1)){if(t=this._.definition,i=t.attributes,i)for(r in i)n.removeAttribute(r,i[r]);if(t.styles)for(u in t.styles)t.styles.hasOwnProperty(u)&&n.removeStyle(u)}}function it(n){var f=n.createBookmark(!0),t=n.createIterator(),i,r,u;for(t.enforceRealBlocks=!0,this._.enterMode&&(t.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR),r=n.document;i=t.getNextParagraph();)!i.isReadOnly()&&(t.activeFilter?t.activeFilter.check(this):1)&&(u=o(this,r,i),v(i,u));n.moveToBookmark(f)}function rt(n){var f=n.createBookmark(1),i=n.createIterator(),t,u;for(i.enforceRealBlocks=!0,i.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;t=i.getNextParagraph();)this.checkElementRemovable(t)&&(t.is("pre")?((u=this._.enterMode==CKEDITOR.ENTER_BR?null:n.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&t.copyAttributes(u),v(t,u)):r.call(this,t));n.moveToBookmark(f)}function v(t,i){var u=!i,c,s;u&&(i=t.getDocument().createElement("div"),t.copyAttributes(i));var o=i&&i.is("pre"),e=t.is("pre"),r=!o&&e;o&&!e?(e=i,(r=t.getBogus())&&r.remove(),r=t.getHtml(),r=n(r,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,""),r=r.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1"),r=r.replace(/([ \t\n\r]+|&nbsp;)/g," "),r=r.replace(/<br\b[^>]*>/gi,"\n"),CKEDITOR.env.ie?(c=t.getDocument().createElement("div"),c.append(e),e.$.outerHTML="<pre>"+r+"<\/pre>",e.copyAttributes(c.getFirst()),e=c.getFirst().remove()):e.setHtml(r),i=e):r?i=ft(u?[t.getHtml()]:ut(t),i):t.moveChildren(i);i.replace(t);o?(u=i,(s=u.getPrevious(h))&&s.type==CKEDITOR.NODE_ELEMENT&&s.is("pre")&&(o=n(s.getHtml(),/\n$/,"")+"\n\n"+n(u.getHtml(),/^\n/,""),CKEDITOR.env.ie?u.$.outerHTML="<pre>"+o+"<\/pre>":u.setHtml(o),s.remove())):u&&f(i)}function ut(t){t.getName();var i=[];return n(t.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(n,t,i){return t+"<\/pre>"+i+"<pre>"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(n,t){i.push(t)}),i}function n(n,t,i){var r="",u="",n=n.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(n,t,i){return t&&(r=t),i&&(u=i),""});return r+n.replace(t,i)+u}function ft(t,i){var u,f,e;for(t.length>1&&(u=new CKEDITOR.dom.documentFragment(i.getDocument())),f=0;f<t.length;f++){var r=t[f],r=r.replace(/(\r\n|\r)/g,"\n"),r=n(r,/^[ \t]*\n/,""),r=n(r,/\n$/,""),r=n(r,/^[ \t]+|[ \t]+$/g,function(n,t){return n.length==1?"&nbsp;":t?" "+CKEDITOR.tools.repeat("&nbsp;",n.length-1):CKEDITOR.tools.repeat("&nbsp;",n.length-1)+" "}),r=r.replace(/\n/g,"<br>"),r=r.replace(/[ \t]{2,}/g,function(n){return CKEDITOR.tools.repeat("&nbsp;",n.length-1)+" "});u?(e=i.clone(),e.setHtml(r),u.append(e)):i.setHtml(r)}return u||i}function r(n){var r=this._.definition,s=r.attributes,r=r.styles,h=t(this)[n.getName()],o=CKEDITOR.tools.isEmpty(s)&&CKEDITOR.tools.isEmpty(r),i,e;for(i in s)(i=="class"||this._.definition.fullMatch)&&n.getAttribute(i)!=w(i,s[i])||(o=n.hasAttribute(i),n.removeAttribute(i));for(e in r)this._.definition.fullMatch&&n.getStyle(e)!=w(e,r[e],!0)||(o=o||!!n.getStyle(e),n.removeStyle(e));u(n,h,b[n.getName()]);o&&(this._.definition.alwaysRemoveElement?f(n,1):!CKEDITOR.dtd.$block[n.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!n.hasAttributes()?f(n):n.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function y(n){for(var o,s=t(this),e=n.getElementsByTag(this.element),i,f=e.count();--f>=0;)i=e.getItem(f),i.isReadOnly()||r.call(this,i);for(o in s)if(o!=this.element)for(e=n.getElementsByTag(o),f=e.count()-1;f>=0;f--)i=e.getItem(f),i.isReadOnly()||u(i,s[o])}function u(n,t,i){var u,e,o,r;if(t=t&&t.attributes)for(u=0;u<t.length;u++)e=t[u][0],(o=n.getAttribute(e))&&(r=t[u][1],(r===null||r.test&&r.test(o)||typeof r=="string"&&o==r)&&n.removeAttribute(e));i||f(n)}function f(n,t){if(!n.hasAttributes()||t)if(CKEDITOR.dtd.$block[n.getName()]){var i=n.getPrevious(h),r=n.getNext(h);i&&(i.type==CKEDITOR.NODE_TEXT||!i.isBlockBoundary({br:1}))&&n.append("br",1);r&&(r.type==CKEDITOR.NODE_TEXT||!r.isBlockBoundary({br:1}))&&n.append("br");n.remove(!0)}else i=n.getFirst(),r=n.getLast(),n.remove(!0),i&&(i.type==CKEDITOR.NODE_ELEMENT&&i.mergeSiblings(),r&&!i.equals(r)&&r.type==CKEDITOR.NODE_ELEMENT&&r.mergeSiblings())}function o(n,t,i){var r;return r=n.element,r=="*"&&(r="span"),r=new CKEDITOR.dom.element(r,t),i&&i.copyAttributes(r),r=s(r,n),t.getCustomData("doc_processing_style")&&r.hasAttribute("id")?r.removeAttribute("id"):t.setCustomData("doc_processing_style",1),r}function s(n,t){var i=t._.definition,r=i.attributes,i=CKEDITOR.style.getStyleText(i),u;if(r)for(u in r)n.setAttribute(u,r[u]);return i&&n.setAttribute("style",i),n}function p(n,t){for(var i in n)n[i]=n[i].replace(ot,function(n,i){return t[i]})}function t(n){var r,i,u,f,e,t,o;if(n._.overrides)return n._.overrides;if(r=n._.overrides={},i=n._.definition.overrides,i)for(CKEDITOR.tools.isArray(i)||(i=[i]),u=0;u<i.length;u++)if(t=i[u],typeof t=="string"?f=t.toLowerCase():(f=t.element?t.element.toLowerCase():n.element,e=t.attributes),t=r[f]||(r[f]={}),e){t=t.attributes=t.attributes||[];for(o in e)t.push([o.toLowerCase(),e[o]])}return r}function w(n,t,i){var r=new CKEDITOR.dom.element("span");return r[i?"setStyle":"setAttribute"](n,t),r[i?"getStyle":"getAttribute"](n)}function e(n,t){for(var u=n.document,i=n.getRanges(),f=t?this.removeFromRange:this.applyToRange,r,e=i.createIterator();r=e.getNextRange();)f.call(this,r);n.selectRanges(i);u.removeCustomData("doc_processing_style")}var b={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},et={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},k=/\s*(?:;\s*|$)/,ot=/#\((.+?)\)/g,st=CKEDITOR.dom.walker.bookmark(0,1),h=CKEDITOR.dom.walker.whitespaces(1),i,c;CKEDITOR.style=function(n,t){var i=n.attributes;i&&i.style&&(n.styles=CKEDITOR.tools.extend({},n.styles,CKEDITOR.tools.parseCssText(i.style)),delete i.style);t&&(n=CKEDITOR.tools.clone(n),p(n.attributes,t),p(n.styles,t));i=this.element=n.element?typeof n.element=="string"?n.element.toLowerCase():n.element:"*";this.type=n.type||(b[i]?CKEDITOR.STYLE_BLOCK:et[i]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE);typeof this.element=="object"&&(this.type=CKEDITOR.STYLE_OBJECT);this._={definition:n}};CKEDITOR.editor.prototype.applyStyle=function(n){n.checkApplicable(this.elementPath())&&e.call(n,this.getSelection())};CKEDITOR.editor.prototype.removeStyle=function(n){n.checkApplicable(this.elementPath())&&e.call(n,this.getSelection(),1)};CKEDITOR.style.prototype={apply:function(n){e.call(this,n.getSelection())},remove:function(n){e.call(this,n.getSelection(),1)},applyToRange:function(n){return(this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?a:this.type==CKEDITOR.STYLE_BLOCK?it:this.type==CKEDITOR.STYLE_OBJECT?nt:null).call(this,n)},removeFromRange:function(n){return(this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?d:this.type==CKEDITOR.STYLE_BLOCK?rt:this.type==CKEDITOR.STYLE_OBJECT?tt:null).call(this,n)},applyToObject:function(n){s(n,this)},checkActive:function(n){var r,i,t,u;switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(n.block||n.blockLimit,!0);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(r=n.elements,i=0;i<r.length;i++)if(t=r[i],!(this.type==CKEDITOR.STYLE_INLINE&&(t==n.block||t==n.blockLimit))){if(this.type==CKEDITOR.STYLE_OBJECT&&(u=t.getName(),!(typeof this.element=="string"?u==this.element:u in this.element)))continue;if(this.checkElementRemovable(t,!0))return!0}}return!1},checkApplicable:function(n,t){if(t&&!t.check(this))return!1;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!n.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!n.blockLimit.getDtd()[this.element]}return!0},checkElementMatch:function(n,t){var u=this._.definition,i,r,e;if(!n||!u.ignoreReadonly&&n.isReadOnly())return!1;if(i=n.getName(),typeof this.element=="string"?i==this.element:i in this.element){if(!t&&!n.hasAttributes())return!0;if(i=u._AC)u=i;else{var i={},f=0,o=u.attributes;if(o)for(r in o)f++,i[r]=o[r];(r=CKEDITOR.style.getStyleText(u))&&(i.style||f++,i.style=r);i._length=f;u=u._AC=i}if(u._length){for(e in u)if(e!="_length"){if(f=n.getAttribute(e)||"",e=="style")n:{i=u[e];typeof i=="string"&&(i=CKEDITOR.tools.parseCssText(i));typeof f=="string"&&(f=CKEDITOR.tools.parseCssText(f,!0));r=void 0;for(r in i)if(!(r in f&&(f[r]==i[r]||i[r]=="inherit"||f[r]=="inherit"))){i=!1;break n}i=!0}else i=u[e]==f;if(i){if(!t)return!0}else if(t)return!1}if(t)return!0}else return!0}return!1},checkElementRemovable:function(n,i){var r,u,f,e;if(this.checkElementMatch(n,i))return!0;if(r=t(this)[n.getName()],r){if(!(r=r.attributes))return!0;for(f=0;f<r.length;f++)if(u=r[f][0],(u=n.getAttribute(u))&&(e=r[f][1],e===null||typeof e=="string"&&u==e||e.test(u)))return!0}return!1},buildPreview:function(n){var r=this._.definition,t=[],u=r.element,i,f;if(u=="bdo"&&(u="span"),t=["<",u],i=r.attributes,i)for(f in i)t.push(" ",f,'="',i[f],'"');return(i=CKEDITOR.style.getStyleText(r))&&t.push(' style="',i,'"'),t.push(">",n||r.name,"<\/",u,">"),t.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(n){var i=n._ST,u,f,e;if(i)return i;var i=n.styles,t=n.attributes&&n.attributes.style||"",r="";t.length&&(t=t.replace(k,";"));for(u in i)f=i[u],e=(u+":"+f).replace(k,";"),f=="inherit"?r=r+e:t=t+e;return t.length&&(t=CKEDITOR.tools.normalizeCssText(t,!0)),n._ST=t+r};i=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED;c=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}();CKEDITOR.styleCommand=function(n,t){this.requiredContent=this.allowedContent=this.style=n;CKEDITOR.tools.extend(this,t,!0)};CKEDITOR.styleCommand.prototype.exec=function(n){n.focus();this.state==CKEDITOR.TRISTATE_OFF?n.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&n.removeStyle(this.style)};CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet");CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet);CKEDITOR.loadStylesSet=function(n,t,i){CKEDITOR.stylesSet.addExternal(n,t,"");CKEDITOR.stylesSet.load(n,i)};CKEDITOR.editor.prototype.getStylesSet=function(n){var i,t,r;this._.stylesDefinitions?n(this._.stylesDefinitions):(i=this,t=i.config.stylesCombo_stylesSet||i.config.stylesSet,t===!1?n(null):t instanceof Array?(i._.stylesDefinitions=t,n(t)):(t||(t="default"),t=t.split(":"),r=t[0],CKEDITOR.stylesSet.addExternal(r,t[1]?t.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),""),CKEDITOR.stylesSet.load(r,function(t){i._.stylesDefinitions=t[r];n(i._.stylesDefinitions)})))};CKEDITOR.dom.comment=function(n,t){typeof n=="string"&&(n=(t?t.$:document).createComment(n));CKEDITOR.dom.domObject.call(this,n)};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 t={},i={},n;for(n in CKEDITOR.dtd.$blockLimit)n in CKEDITOR.dtd.$list||(t[n]=1);for(n in CKEDITOR.dtd.$block)n in CKEDITOR.dtd.$blockLimit||n in CKEDITOR.dtd.$empty||(i[n]=1);CKEDITOR.dom.elementPath=function(n,r){var s=null,o=null,c=[],u=n,f,r=r||n.getDocument().getBody(),e,l,h;do if(u.type==CKEDITOR.NODE_ELEMENT){if(c.push(u),!this.lastElement&&(this.lastElement=u,u.is(CKEDITOR.dtd.$object)||u.getAttribute("contenteditable")=="false"))continue;if(u.equals(r))break;if(!o&&(f=u.getName(),u.getAttribute("contenteditable")=="true"?o=u:!s&&i[f]&&(s=u),t[f])){if(e=!s){if(f=f=="div"){n:{for(f=u.getChildren(),e=0,l=f.count();e<l;e++)if(h=f.getItem(e),h.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[h.getName()]){f=!0;break n}f=!1}f=!f}e=f}e?s=u:o=u}}while(u=u.getParent());o||(o=r);this.block=s;this.blockLimit=o;this.root=r;this.elements=c}}();CKEDITOR.dom.elementPath.prototype={compare:function(n){var i=this.elements,n=n&&n.elements,t;if(!n||i.length!=n.length)return!1;for(t=0;t<i.length;t++)if(!i[t].equals(n[t]))return!1;return!0},contains:function(n,t,i){var u,r,f;for(typeof n=="string"&&(u=function(t){return t.getName()==n}),n instanceof CKEDITOR.dom.element?u=function(t){return t.equals(n)}:CKEDITOR.tools.isArray(n)?u=function(t){return CKEDITOR.tools.indexOf(n,t.getName())>-1}:typeof n=="function"?u=n:typeof n=="object"&&(u=function(t){return t.getName()in n}),r=this.elements,f=r.length,t&&f--,i&&(r=Array.prototype.slice.call(r,0),r.reverse()),t=0;t<f;t++)if(u(r[t]))return r[t];return null},isContextFor:function(n){var t;return n in CKEDITOR.dtd.$block?(t=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!t.getDtd()[n]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}};CKEDITOR.dom.text=function(n,t){typeof n=="string"&&(n=(t?t.$:document).createTextNode(n));this.$=n};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(n){this.$.nodeValue=n},split:function(n){var r=this.$.parentNode,u=r.childNodes.length,f=this.getLength(),i=this.getDocument(),t=new CKEDITOR.dom.text(this.$.splitText(n),i);return r.childNodes.length==u&&(n>=f?(t=i.createText(""),t.insertAfter(this)):(n=i.createText(""),n.insertAfter(t),n.remove())),t},substring:function(n,t){return typeof t!="number"?this.$.nodeValue.substr(n):this.$.nodeValue.substring(n,t)}}),function(){function n(n,t,i){var u=n.serializable,r=t[i?"endContainer":"startContainer"],f=i?"endOffset":"startOffset",e=u?t.document.getById(n.startNode):n.startNode,n=u?t.document.getById(n.endNode):n.endNode;return r.equals(e.getPrevious())?(t.startOffset=t.startOffset-r.getLength()-n.getPrevious().getLength(),r=n.getNext()):r.equals(n.getPrevious())&&(t.startOffset=t.startOffset-r.getLength(),r=n.getNext()),r.equals(e.getParent())&&t[f]++,r.equals(n.getParent())&&t[f]++,t[i?"endContainer":"startContainer"]=r,t}CKEDITOR.dom.rangeList=function(n){return n instanceof CKEDITOR.dom.rangeList?n:(n?n instanceof CKEDITOR.dom.range&&(n=[n]):n=[],CKEDITOR.tools.extend(n,t))};var t={createIterator:function(){var t=this,r=CKEDITOR.dom.walker.bookmark(),i=[],n;return{getNextRange:function(u){var e,f,o;if(n=n==void 0?0:n+1,e=t[n],e&&t.length>1){if(!n)for(f=t.length-1;f>=0;f--)i.unshift(t[f].createBookmark(!0));if(u)for(o=0;t[n+o+1];){for(var s=e.document,u=0,f=s.getById(i[o].endNode),s=s.getById(i[o+1].startNode);;){if(f=f.getNextSourceNode(!1),s.equals(f))u=1;else if(r(f)||f.type==CKEDITOR.NODE_ELEMENT&&f.isBlockBoundary())continue;break}if(!u)break;o++}for(e.moveToBookmark(i.shift());o--;)f=t[++n],f.moveToBookmark(i.shift()),e.setEnd(f.endContainer,f.endOffset)}return e}}},createBookmarks:function(t){for(var f,i,u=[],r=0;r<this.length;r++)for(u.push(f=this[r].createBookmark(t,!0)),i=r+1;i<this.length;i++)this[i]=n(f,this[i]),this[i]=n(f,this[i],!0);return u},createBookmarks2:function(n){for(var i=[],t=0;t<this.length;t++)i.push(this[t].createBookmark2(n));return i},moveToBookmarks:function(n){for(var t=0;t<this.length;t++)this[t].moveToBookmark(n[t])}}}(),function(){function n(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function i(t){var i=CKEDITOR.skin["ua_"+t],f=CKEDITOR.env,r,u;if(i)for(i=i.split(",").sort(function(n,t){return n>t?-1:1}),r=0;r<i.length;r++)if(u=i[r],f.ie&&(u.replace(/^ie/,"")==f.version||f.quirks&&u=="iequirks")&&(u="ie"),f[u]){t=t+("_"+i[r]);break}return CKEDITOR.getUrl(n()+t+".css")}function r(n,t){f[n]||(CKEDITOR.document.appendStyleSheet(i(n)),f[n]=1);t&&t()}function u(n){var t=n.getById(e);return t||(t=n.getHead().append("style"),t.setAttribute("id",e),t.setAttribute("type","text/css")),t}function t(n,t,i){var r,u,f,e;if(CKEDITOR.env.webkit)for(t=t.split("}").slice(0,-1),u=0;u<t.length;u++)t[u]=t[u].split("{");for(e=0;e<n.length;e++)if(CKEDITOR.env.webkit)for(u=0;u<t.length;u++){for(f=t[u][1],r=0;r<i.length;r++)f=f.replace(i[r][0],i[r][1]);n[e].$.sheet.addRule(t[u][0],f)}else{for(f=t,r=0;r<i.length;r++)f=f.replace(i[r][0],i[r][1]);CKEDITOR.env.ie&&CKEDITOR.env.version<11?n[e].$.styleSheet.cssText=n[e].$.styleSheet.cssText+f:n[e].$.innerHTML=n[e].$.innerHTML+f}}var f={};CKEDITOR.skin={path:n,loadPart:function(t,i){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(n()+"skin.js"),function(){r(t,i)}):r(t,i)},getPath:function(n){return CKEDITOR.getUrl(i(n))},icons:{},addIcon:function(n,t,i,r){n=n.toLowerCase();this.icons[n]||(this.icons[n]={path:t,offset:i||0,bgsize:r||"16px"})},getIconStyle:function(n,t,i,r,u){var f;return n&&(n=n.toLowerCase(),t&&(f=this.icons[n+"-rtl"]),f||(f=this.icons[n])),n=i||f&&f.path||"",r=r||f&&f.offset,u=u||f&&f.bgsize||"16px",n&&"background-image:url("+CKEDITOR.getUrl(n)+");background-position:0 "+r+"px;background-size:"+u+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(n){var i=u(CKEDITOR.document);return(this.setUiColor=function(n){var r=CKEDITOR.skin.chameleon,u=[[s,n]];this.uiColor=n;t([i],r(this,"editor"),u);t(o,r(this,"panel"),u)}).call(this,n)}});var e="cke_ui_color",o=[],s=/\$color/g;CKEDITOR.on("instanceLoaded",function(n){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var i=n.editor,n=function(n){if(n=(n.data[0]||n.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument(),!n.getById("cke_ui_color")){n=u(n);o.push(n);var r=i.getUiColor();r&&t([n],CKEDITOR.skin.chameleon(i,"panel"),[[s,r]])}};i.on("panelShow",n);i.on("menuShow",n);i.config.uiColor&&i.setUiColor(i.config.uiColor)}})}(),function(){var n,t;if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{n=CKEDITOR.dom.element.createFromHtml('<div style="width:0px;height:0px;position:absolute;left:-10000px;border: 1px solid;border-color: red blue;"><\/div>',CKEDITOR.document);n.appendTo(CKEDITOR.document.getHead());try{CKEDITOR.env.hc=n.getComputedStyle("border-top-color")==n.getComputedStyle("border-right-color")}catch(i){CKEDITOR.env.hc=!1}n.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"),n=CKEDITOR._.pending)for(delete CKEDITOR._.pending,t=0;t<n.length;t++)CKEDITOR.editor.prototype.constructor.apply(n[t][0],n[t][1]),CKEDITOR.add(n[t][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 n=function(){return function(n,t){for(var f,e,i,u=n.match(/[^#]./g),r=0;3>r;r++)f=u,e=r,i=parseInt(u[r],16),i=("0"+(0>t?0|i*(1+t):0|i+(255-i)*t).toString(16)).slice(-2),f[e]=i;return"#"+u.join("")}}(),t=function(){var n=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,i){return n.output({from:t,to:i})}}(),i={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(r,u){var f=r.uiColor,f={id:"."+r.id,defaultBorder:n(f,-.1),defaultGradient:t(n(f,.9),f),lightGradient:t(n(f,1),n(f,.7)),mediumGradient:t(n(f,.8),n(f,.5)),ckeButtonOn:t(n(f,.6),n(f,.7)),ckeResizer:n(f,-.4),ckeToolbarSeparator:n(f,.5),ckeColorauto:n(f,.8),dialogBody:n(f,.7),dialogTabSelected:t("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:n(f,-.6),elementsPathBg:f,menubuttonIcon:n(f,.5),menubuttonIconHover:n(f,.3)};return i[u].output(f).replace(/\[/g,"{").replace(/\]/g,"}")}}();CKEDITOR.plugins.add("dialogui",{onLoad:function(){var n=function(n){this._||(this._={});this._["default"]=this._.initValue=n["default"]||"";this._.required=n.required||!1;for(var t=[this._],i=1;i<arguments.length;i++)t.push(arguments[i]);return t.push(!0),CKEDITOR.tools.extend.apply(CKEDITOR.tools,t),this._},f={build:function(n,t,i){return new CKEDITOR.ui.dialog.textInput(n,t,i)}},t={build:function(n,t,i){return new CKEDITOR.ui.dialog[t.type](n,t,i)}},i={isChanged:function(){return this.getValue()!=this.getInitValue()},reset:function(n){this.setValue(this.getInitValue(),n)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},u=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(n,t){this._.domOnChangeRegistered||(n.on("load",function(){this.getInputElement().on("change",function(){n.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0);this.on("change",t)}},!0),e=/^on([A-Z]\w+)/,r=function(n){for(var t in n)(e.test(t)||"title"==t||"type"==t)&&delete n[t];return n};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(t,i,r,u){if(!(4>arguments.length)){var f=n.call(this,i);f.labelId=CKEDITOR.tools.getNextId()+"_label";this._.children=[];CKEDITOR.ui.dialog.uiElement.call(this,t,i,r,"div",null,{role:"presentation"},function(){var r=[],n=i.required?" cke_required":"";return"horizontal"!=i.labelLayout?r.push('<label class="cke_dialog_ui_labeled_label'+n+'" ',' id="'+f.labelId+'"',f.inputId?' for="'+f.inputId+'"':"",(i.labelStyle?' style="'+i.labelStyle+'"':"")+">",i.label,"<\/label>",'<div class="cke_dialog_ui_labeled_content"',i.controlStyle?' style="'+i.controlStyle+'"':"",' role="radiogroup" aria-labelledby="'+f.labelId+'">',u.call(this,t,i),"<\/div>"):(n={type:"hbox",widths:i.widths,padding:0,children:[{type:"html",html:'<label class="cke_dialog_ui_labeled_label'+n+'" id="'+f.labelId+'" for="'+f.inputId+'"'+(i.labelStyle?' style="'+i.labelStyle+'"':"")+">"+CKEDITOR.tools.htmlEncode(i.label)+"<\/span>"},{type:"html",html:'<span class="cke_dialog_ui_labeled_content"'+(i.controlStyle?' style="'+i.controlStyle+'"':"")+">"+u.call(this,t,i)+"<\/span>"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(t,n,r)),r.join("")})}},textInput:function(t,i,r){var o,u,e,f;if(!(3>arguments.length)){n.call(this,i);o=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput";u={"class":"cke_dialog_ui_input_"+i.type,id:o,type:i.type};i.validate&&(this.validate=i.validate);i.maxLength&&(u.maxlength=i.maxLength);i.size&&(u.size=i.size);i.inputStyle&&(u.style=i.inputStyle);e=this;f=!1;t.on("load",function(){e.getInputElement().on("keydown",function(n){n.data.getKeystroke()==13&&(f=!0)});e.getInputElement().on("keyup",function(n){n.data.getKeystroke()==13&&f&&(t.getButton("ok")&&setTimeout(function(){t.getButton("ok").click()},0),f=!1)},null,null,1e3)});CKEDITOR.ui.dialog.labeledElement.call(this,t,i,r,function(){var n=['<div class="cke_dialog_ui_input_',i.type,'" role="presentation"'],t;i.width&&n.push('style="width:'+i.width+'" ');n.push("><input ");u["aria-labelledby"]=this._.labelId;this._.required&&(u["aria-required"]=this._.required);for(t in u)n.push(t+'="'+u[t]+'" ');return n.push(" /><\/div>"),n.join("")})}},textarea:function(t,i,r){if(!(3>arguments.length)){n.call(this,i);var f=this,e=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",u={};i.validate&&(this.validate=i.validate);u.rows=i.rows||5;u.cols=i.cols||20;u["class"]="cke_dialog_ui_input_textarea "+(i["class"]||"");"undefined"!=typeof i.inputStyle&&(u.style=i.inputStyle);i.dir&&(u.dir=i.dir);CKEDITOR.ui.dialog.labeledElement.call(this,t,i,r,function(){u["aria-labelledby"]=this._.labelId;this._.required&&(u["aria-required"]=this._.required);var n=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea id="',e,'" '],t;for(t in u)n.push(t+'="'+CKEDITOR.tools.htmlEncode(u[t])+'" ');return n.push(">",CKEDITOR.tools.htmlEncode(f._["default"]),"<\/textarea><\/div>"),n.join("")})}},checkbox:function(t,i,u){if(!(3>arguments.length)){var f=n.call(this,i,{"default":!!i["default"]});i.validate&&(this.validate=i.validate);CKEDITOR.ui.dialog.uiElement.call(this,t,i,u,"span",null,null,function(){var n=CKEDITOR.tools.extend({},i,{id:i.id?i.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),u=[],o=CKEDITOR.tools.getNextId()+"_label",e={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":o};return r(n),i["default"]&&(e.checked="checked"),typeof n.inputStyle!="undefined"&&(n.style=n.inputStyle),f.checkbox=new CKEDITOR.ui.dialog.uiElement(t,n,u,"input",null,e),u.push(' <label id="',o,'" for="',e.id,'"'+(i.labelStyle?' style="'+i.labelStyle+'"':"")+">",CKEDITOR.tools.htmlEncode(i.label),"<\/label>"),u.join("")})}},radio:function(t,i,u){if(!(3>arguments.length)){n.call(this,i);this._["default"]||(this._["default"]=this._.initValue=i.items[0][1]);i.validate&&(this.validate=i.valdiate);var f=[],e=this;CKEDITOR.ui.dialog.labeledElement.call(this,t,i,u,function(){for(var l=[],a=[],p=(i.id?i.id:CKEDITOR.tools.getNextId())+"_radio",h=0;h<i.items.length;h++){var u=i.items[h],o=u[2]!==void 0?u[2]:u[0],v=u[1]!==void 0?u[1]:u[0],n=CKEDITOR.tools.getNextId()+"_radio_input",y=n+"_label",n=CKEDITOR.tools.extend({},i,{id:n,title:null,type:null},!0),o=CKEDITOR.tools.extend({},n,{title:o},!0),c={type:"radio","class":"cke_dialog_ui_radio_input",name:p,value:v,"aria-labelledby":y},s=[];e._["default"]==v&&(c.checked="checked");r(n);r(o);typeof n.inputStyle!="undefined"&&(n.style=n.inputStyle);n.keyboardFocusable=!0;f.push(new CKEDITOR.ui.dialog.uiElement(t,n,s,"input",null,c));s.push(" ");new CKEDITOR.ui.dialog.uiElement(t,o,s,"label",null,{id:y,"for":c.id},u[0]);l.push(s.join(""))}return new CKEDITOR.ui.dialog.hbox(t,f,l,a),a.join("")});this._.children=f}},button:function(t,i,r){var u,f,e;if(arguments.length){"function"==typeof i&&(i=i(t.getParentEditor()));n.call(this,i,{disabled:i.disabled||!1});CKEDITOR.event.implementOn(this);u=this;t.on("load",function(){var n=this.getElement();(function(){n.on("click",function(n){u.click();n.data.preventDefault()});n.on("keydown",function(n){n.data.getKeystroke()in{32:1}&&(u.click(),n.data.preventDefault())})})();n.unselectable()},this);f=CKEDITOR.tools.extend({},i);delete f.style;e=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,t,f,r,"a",null,{style:i.style,href:"javascript:void(0)",title:i.label,hidefocus:"true","class":i["class"],role:"button","aria-labelledby":e},'<span id="'+e+'" class="cke_dialog_ui_button">'+CKEDITOR.tools.htmlEncode(i.label)+"<\/span>")}},select:function(t,i,u){if(!(3>arguments.length)){var f=n.call(this,i);i.validate&&(this.validate=i.validate);f.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,t,i,u,function(){var u=CKEDITOR.tools.extend({},i,{id:i.id?i.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),n=[],h=[],s={id:f.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId},o,e;for(n.push('<div class="cke_dialog_ui_input_',i.type,'" role="presentation"'),i.width&&n.push('style="width:'+i.width+'" '),n.push(">"),i.size!=void 0&&(s.size=i.size),i.multiple!=void 0&&(s.multiple=i.multiple),r(u),o=0;o<i.items.length&&(e=i.items[o]);o++)h.push('<option value="',CKEDITOR.tools.htmlEncode(e[1]!==void 0?e[1]:e[0]).replace(/"/g,"&quot;"),'" /> ',CKEDITOR.tools.htmlEncode(e[0]));return typeof u.inputStyle!="undefined"&&(u.style=u.inputStyle),f.select=new CKEDITOR.ui.dialog.uiElement(t,u,n,"select",null,s,h.join("")),n.push("<\/div>"),n.join("")})}},file:function(t,i,r){if(!(3>arguments.length)){void 0===i["default"]&&(i["default"]="");var u=CKEDITOR.tools.extend(n.call(this,i),{definition:i,buttons:[]});i.validate&&(this.validate=i.validate);t.on("load",function(){CKEDITOR.document.getById(u.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,t,i,r,function(){u.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var n=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" role="presentation" id="',u.frameId,'" title="',i.label,'" src="javascript:void('];return n.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0"),n.push(')"><\/iframe>'),n.join("")})}},fileButton:function(t,i,r){var e,u,f;if(!(3>arguments.length)){n.call(this,i);e=this;i.validate&&(this.validate=i.validate);u=CKEDITOR.tools.extend({},i);f=u.onClick;u.className=(u.className?u.className+" ":"")+"cke_dialog_ui_button";u.onClick=function(n){var r=i["for"];f&&f.call(this,n)===!1||(t.getContentElement(r[0],r[1]).submit(),this.disable())};t.on("load",function(){t.getContentElement(i["for"][0],i["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,t,u,r)}},html:function(){var n=/^\s*<[\w:]+\s+([^>]*)?>/,t=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,i=/\/$/;return function(r,u,f){var o,e,s,h;3>arguments.length||(o=[],e=u.html,"<"!=e.charAt(0)&&(e="<span>"+e+"<\/span>"),s=u.focus,s&&(h=this.focus,this.focus=function(){("function"==typeof s?s:h).call(this);this.fire("focus")},u.isFocusable&&(this.isFocusable=this.isFocusable),this.keyboardFocusable=!0),CKEDITOR.ui.dialog.uiElement.call(this,r,u,o,"span",null,null,""),o=o.join("").match(n),e=e.match(t)||["","",""],i.test(e[1])&&(e[1]=e[1].slice(0,-1),e[2]="/"+e[2]),f.push([e[1]," ",o[1]||"",e[2]].join("")))}}(),fieldset:function(n,t,i,r,u){var f=u.label;this._={children:t};CKEDITOR.ui.dialog.uiElement.call(this,n,u,r,"fieldset",null,null,function(){var t=[],n;for(f&&t.push("<legend"+(u.labelStyle?' style="'+u.labelStyle+'"':"")+">"+f+"<\/legend>"),n=0;n<i.length;n++)t.push(i[n]);return t.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(n){var t=CKEDITOR.document.getById(this._.labelId);return 1>t.getChildCount()?new CKEDITOR.dom.text(n,CKEDITOR.document).appendTo(t):t.getChild(0).$.nodeValue=n,this},getLabel:function(){var n=CKEDITOR.document.getById(this._.labelId);return!n||1>n.getChildCount()?"":n.getChild(0).getText()},eventProcessors:u},!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 n=this.getElement();n&&n.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(n,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 n=this.selectParentTab();setTimeout(function(){var t=n.getInputElement();t&&t.$.focus()},0)},select:function(){var n=this.selectParentTab();setTimeout(function(){var t=n.getInputElement();t&&(t.$.focus(),t.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(n){return n||(n=""),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(n,t,i){var r=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),u=this.getInputElement().$;return r.$.text=n,r.$.value=void 0===t||null===t?n:t,void 0===i||null===i?CKEDITOR.env.ie?u.add(r.$):u.add(r.$,null):u.add(r.$,i),this},remove:function(n){return this.getInputElement().$.remove(n),this},clear:function(){for(var n=this.getInputElement().$;0<n.length;)n.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(n,t){this.getInputElement().$.checked=n;t||this.fire("change",{value:n})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(n,t){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return u.onChange.apply(this,arguments);n.on("load",function(){var n=this._.checkbox.getElement();n.on("propertychange",function(t){t=t.data.$;"checked"==t.propertyName&&this.fire("change",{value:n.$.checked})},this)},this);this.on("change",t);return null}},keyboardFocusable:!0},i,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(n,t){for(var u=this._.children,i,r=0;r<u.length&&(i=u[r]);r++)i.getElement().$.checked=i.getValue()==n;t||this.fire("change",{value:n})},getValue:function(){for(var t=this._.children,n=0;n<t.length;n++)if(t[n].getElement().$.checked)return t[n].getValue();return null},accessKeyUp:function(){for(var t=this._.children,n=0;n<t.length;n++)if(t[n].getElement().$.checked){t[n].getElement().focus();return}t[0].getElement().focus()},eventProcessors:{onChange:function(n,t){if(CKEDITOR.env.ie)n.on("load",function(){for(var t=this._.children,i=this,n=0;n<t.length;n++)t[n].getElement().on("propertychange",function(n){n=n.data.$;"checked"==n.propertyName&&this.$.checked&&i.fire("change",{value:this.getAttribute("value")})})},this),this.on("change",t);else return u.onChange.apply(this,arguments);return null}}},i,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,i,{getInputElement:function(){var n=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<n.$.forms.length?new CKEDITOR.dom.element(n.$.forms[0].elements[0]):this.getElement()},submit:function(){return this.getInputElement().getParent().$.submit(),this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(n){var i,r=function(n,t,i,r){n.on("formLoaded",function(){n.getInputElement().on(i,r,n)})},t;for(t in n)(i=t.match(/^on([A-Z]\w+)/))&&(this.eventProcessors[t]?this.eventProcessors[t].call(this,this._.dialog,n[t]):r(this,this._.dialog,i[1].toLowerCase(),n[t]));return this},reset:function(){function f(){var f,h;for(r.$.open(),f="",t.size&&(f=t.size-(CKEDITOR.env.ie?7:0)),h=n.frameId+"_input",r.$.write(['<html dir="'+o+'" lang="'+s+'"><head><title><\/title><\/head><body style="margin: 0; overflow: hidden; background: transparent;">','<form enctype="multipart/form-data" method="POST" dir="'+o+'" lang="'+s+'" action="',CKEDITOR.tools.htmlEncode(t.action),'"><label id="',n.labelId,'" for="',h,'" style="display:none">',CKEDITOR.tools.htmlEncode(t.label),'<\/label><input id="',h,'" aria-labelledby="',n.labelId,'" type="file" name="',CKEDITOR.tools.htmlEncode(t.id||"cke_upload"),'" size="',CKEDITOR.tools.htmlEncode(0<f?f:""),'" /><\/form><\/body><\/html><script>',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+i+");","window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction("+u+")}","<\/script>"].join("")),r.$.close(),f=0;f<e.length;f++)e[f].enable()}var n=this._,r=CKEDITOR.document.getById(n.frameId).getFrameDocument(),t=n.definition,e=n.buttons,i=this.formLoadedNumber,u=this.formUnloadNumber,o=n.dialog._.editor.lang.dir,s=n.dialog._.editor.langCode;i||(i=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),u=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(i);CKEDITOR.tools.removeFunction(u)}));CKEDITOR.env.gecko?setTimeout(f,500):f()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(n,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",f);CKEDITOR.dialog.addUIElement("password",f);CKEDITOR.dialog.addUIElement("textarea",t);CKEDITOR.dialog.addUIElement("checkbox",t);CKEDITOR.dialog.addUIElement("radio",t);CKEDITOR.dialog.addUIElement("button",t);CKEDITOR.dialog.addUIElement("select",t);CKEDITOR.dialog.addUIElement("file",t);CKEDITOR.dialog.addUIElement("fileButton",t);CKEDITOR.dialog.addUIElement("html",t);CKEDITOR.dialog.addUIElement("fieldset",{build:function(n,t,i){for(var f,e=t.children,r,o=[],s=[],u=0;u<e.length&&(r=e[u]);u++)f=[],o.push(f),s.push(CKEDITOR.dialog._.uiElementBuilders[r.type].build(n,r,f));return new CKEDITOR.ui.dialog[t.type](n,s,o,i,t)}})}});CKEDITOR.DIALOG_RESIZE_NONE=0;CKEDITOR.DIALOG_RESIZE_WIDTH=1;CKEDITOR.DIALOG_RESIZE_HEIGHT=2;CKEDITOR.DIALOG_RESIZE_BOTH=3,function(){function o(){for(var n=this._.tabIdList.length,i=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+n,t=i-1;t>i-n;t--)if(this._.tabs[this._.tabIdList[t%n]][0].$.offsetHeight)return this._.tabIdList[t%n];return null}function c(){for(var t=this._.tabIdList.length,i=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),n=i+1;n<i+t;n++)if(this._.tabs[this._.tabIdList[n%t]][0].$.offsetHeight)return this._.tabIdList[n%t];return null}function l(n,t){for(var i,u=n.$.getElementsByTagName("input"),r=0,f=u.length;r<f;r++)i=new CKEDITOR.dom.element(u[r]),"text"==i.getAttribute("type").toLowerCase()&&(t?(i.setAttribute("value",i.getCustomData("fake_value")||""),i.removeCustomData("fake_value")):(i.setCustomData("fake_value",i.getAttribute("value")),i.setAttribute("value","")))}function g(n,t){var i=this.getInputElement();i&&(n?i.removeAttribute("aria-invalid"):i.setAttribute("aria-invalid",!0));n||(this.select?this.select():this.focus());t&&alert(t);this.fire("validated",{valid:n,msg:t})}function nt(){var n=this.getInputElement();n&&n.removeAttribute("aria-invalid")}function tt(n){var n=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",ft).output({id:CKEDITOR.tools.getNextNumber(),editorId:n.id,langDir:n.lang.dir,langCode:n.langCode,editorDialogClass:"cke_editor_"+n.name.replace(/\./g,"\\.")+"_dialog",closeTitle:n.lang.common.close,hidpi:CKEDITOR.env.hidpi?"cke_hidpi":""})),t=n.getChild([0,0,0,0,0]),i=t.getChild(0),r=t.getChild(1),u;return CKEDITOR.env.ie&&!CKEDITOR.env.ie6Compat&&(u="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())",CKEDITOR.dom.element.createFromHtml('<iframe frameBorder="0" class="cke_iframe_shim" src="'+u+'" tabIndex="-1"><\/iframe>').appendTo(t.getParent())),i.unselectable(),r.unselectable(),{element:n,parts:{dialog:n.getChild(0),title:i,close:r,tabs:t.getChild(2),contents:t.getChild([3,0,0,0]),footer:t.getChild([3,0,1,0])}}}function a(n,t,i){this.element=t;this.focusIndex=i;this.tabIndex=0;this.isFocusable=function(){return!t.getAttribute("disabled")&&t.isVisible()};this.focus=function(){n._.currentFocusIndex=this.focusIndex;this.element.focus()};t.on("keydown",function(n){n.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 it(n){function t(){n.layout()}var i=CKEDITOR.document.getWindow();i.on("resize",t);n.on("hide",function(){i.removeListener("resize",t)})}function v(n,t){this._={dialog:n};CKEDITOR.tools.extend(this,t)}function rt(t){function f(n){var f=t.getSize(),e=CKEDITOR.document.getWindow().getViewPaneSize(),h=n.data.$.screenX,c=n.data.$.screenY,l=h-o.x,a=c-o.y;o={x:h,y:c};i.x+=l;i.y+=a;t.move(i.x+r[3]<u?-r[3]:i.x-r[1]>e.width-f.width-u?e.width-f.width+("rtl"==s.lang.dir?0:r[1]):i.x,i.y+r[0]<u?-r[0]:i.y-r[2]>e.height-f.height-u?e.height-f.height+r[2]:i.y,1);n.data.preventDefault()}function e(){if(CKEDITOR.document.removeListener("mousemove",f),CKEDITOR.document.removeListener("mouseup",e),CKEDITOR.env.ie6Compat){var t=n.getChild(0).getFrameDocument();t.removeListener("mousemove",f);t.removeListener("mouseup",e)}}var o=null,i=null;t.getElement().getFirst();var s=t.getParentEditor(),u=s.config.dialog_magnetDistance,r=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof u&&(u=20);t.parts.title.on("mousedown",function(r){o={x:r.data.$.screenX,y:r.data.$.screenY};CKEDITOR.document.on("mousemove",f);CKEDITOR.document.on("mouseup",e);if(i=t.getPosition(),CKEDITOR.env.ie6Compat){var u=n.getChild(0).getFrameDocument();u.on("mousemove",f);u.on("mouseup",e)}r.data.preventDefault()},t)}function ut(t){function o(n){var e="rtl"==r.lang.dir,c=f.width,p=f.height,w=c+(n.data.$.screenX-l)*(e?-1:1)*(t._.moved?1:2),b=p+(n.data.$.screenY-a)*(t._.moved?1:2),o=t._.element.getFirst(),o=e&&o.getComputedStyle("right"),s=t.getPosition();s.y+b>u.height&&(b=u.height-s.y);(e?o:s.x)+w>u.width&&(w=u.width-(e?o:s.x));(i==CKEDITOR.DIALOG_RESIZE_WIDTH||i==CKEDITOR.DIALOG_RESIZE_BOTH)&&(c=Math.max(h.minWidth||0,w-v));(i==CKEDITOR.DIALOG_RESIZE_HEIGHT||i==CKEDITOR.DIALOG_RESIZE_BOTH)&&(p=Math.max(h.minHeight||0,b-y));t.resize(c,p);t._.moved||t.layout();n.data.preventDefault()}function s(){if(CKEDITOR.document.removeListener("mouseup",s),CKEDITOR.document.removeListener("mousemove",o),e&&(e.remove(),e=null),CKEDITOR.env.ie6Compat){var t=n.getChild(0).getFrameDocument();t.removeListener("mouseup",s);t.removeListener("mousemove",o)}}var l,a,h=t.definition,i=h.resizable,r,v,y,u,f,e,c;if(i!=CKEDITOR.DIALOG_RESIZE_NONE){r=t.getParentEditor();c=CKEDITOR.tools.addFunction(function(i){f=t.getSize();var r=t.parts.contents;r.$.getElementsByTagName("iframe").length&&(e=CKEDITOR.dom.element.createFromHtml('<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%;"><\/div>'),r.append(e));y=f.height-t.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.opera||CKEDITOR.env.ie&&CKEDITOR.env.quirks));v=f.width-t.parts.contents.getSize("width",1);l=i.screenX;a=i.screenY;u=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",o);CKEDITOR.document.on("mouseup",s);CKEDITOR.env.ie6Compat&&(r=n.getChild(0).getFrameDocument(),r.on("mousemove",o),r.on("mouseup",s));i.preventDefault&&i.preventDefault()});t.on("load",function(){var n="";i==CKEDITOR.DIALOG_RESIZE_WIDTH?n=" cke_resizer_horizontal":i==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(n=" cke_resizer_vertical");n=CKEDITOR.dom.element.createFromHtml('<div class="cke_resizer'+n+" cke_resizer_"+r.lang.dir+'" title="'+CKEDITOR.tools.htmlEncode(r.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+c+', event )">'+("ltr"==r.lang.dir?"◢":"◣")+"<\/div>");t.parts.footer.append(n,1)});r.on("destroy",function(){CKEDITOR.tools.removeFunction(c)})}}function s(n){n.data.preventDefault(1)}function y(t){var o=CKEDITOR.document.getWindow(),f=t.config,e=f.dialog_backgroundCoverColor||"white",c=f.dialog_backgroundCoverOpacity,u=f.baseFloatZIndex,f=CKEDITOR.tools.genKey(e,c,u),i=r[f],t,l,a;i?i.show():(u=['<div tabIndex="-1" style="position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",u,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+e,'" class="cke_dialog_background_cover">'],CKEDITOR.env.ie6Compat&&(e="<html><body style=\\'background-color:"+e+";\\'><\/body><\/html>",u.push('<iframe hidefocus="true" frameborder="0" id="cke_dialog_background_iframe" src="javascript:'),u.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+e+"' );document.close();")+"})())"),u.push('" style="position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0)"><\/iframe>')),u.push("<\/div>"),i=CKEDITOR.dom.element.createFromHtml(u.join("")),i.setOpacity(void 0!=c?c:.5),i.on("keydown",s),i.on("keypress",s),i.on("keyup",s),i.appendTo(CKEDITOR.document.getBody()),r[f]=i);t.focusManager.add(i);n=i;t=function(){var n=o.getViewPaneSize();i.setStyles({width:n.width+"px",height:n.height+"px"})};l=function(){var n=o.getScrollPosition(),t=CKEDITOR.dialog._.currentTop;if(i.setStyles({left:n.x+"px",top:n.y+"px"}),t)do n=t.getPosition(),t.move(n.x,n.y);while(t=t._.parentDialog)};h=t;o.on("resize",t);t();CKEDITOR.env.mac&&CKEDITOR.env.webkit||i.focus();CKEDITOR.env.ie6Compat&&(a=function(){l();arguments.callee.prevScrollHandler.apply(this,arguments)},o.$.setTimeout(function(){a.prevScrollHandler=window.onscroll||function(){};window.onscroll=a},0),l())}function p(t){n&&(t.focusManager.remove(n),t=CKEDITOR.document.getWindow(),n.hide(),t.removeListener("resize",h),CKEDITOR.env.ie6Compat&&t.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),h=null)}var t=CKEDITOR.tools.cssLength,ft='<div class="cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir="{langDir}" lang="{langCode}" role="dialog" aria-labelledby="cke_dialog_title_{id}"><table class="cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="cke_dialog_body" role="presentation"><div id="cke_dialog_title_{id}" class="cke_dialog_title" role="presentation"><\/div><a id="cke_dialog_close_button_{id}" class="cke_dialog_close_button" href="javascript:void(0)" title="{closeTitle}" role="button"><span class="cke_label">X<\/span><\/a><div id="cke_dialog_tabs_{id}" class="cke_dialog_tabs" role="tablist"><\/div><table class="cke_dialog_contents" role="presentation"><tr><td id="cke_dialog_contents_{id}" class="cke_dialog_contents_body" role="presentation"><\/td><\/tr><tr><td id="cke_dialog_footer_{id}" class="cke_dialog_footer" role="presentation"><\/td><\/tr><\/table><\/div><\/td><\/tr><\/table><\/div>';CKEDITOR.dialog=function(n,t){function d(){var t=i._.focusList,r,n;for(t.sort(function(n,t){return n.tabIndex!=t.tabIndex?t.tabIndex-n.tabIndex:n.focusIndex-t.focusIndex}),r=t.length,n=0;n<r;n++)t[n].focusIndex=n}function a(n){var t=i._.focusList,n=n||0,u,r;if(!(1>t.length)){u=i._.currentFocusIndex;try{t[u].getInputElement().$.blur()}catch(f){}for(r=u=(u+n+t.length)%t.length;n&&!t[r].isFocusable()&&!(r=(r+n+t.length)%t.length,r==u););t[r].focus();"text"==t[r].type&&t[r].select()}}function b(t){if(i==CKEDITOR.dialog._.currentTop){var r=t.data.getKeystroke(),u="rtl"==n.lang.dir;if(h=v=0,9==r||r==CKEDITOR.SHIFT+9)r=r==CKEDITOR.SHIFT+9,i._.tabBarMode?(r=r?o.call(i):c.call(i),i.selectPage(r),i._.tabs[r][0].focus()):a(r?-1:1),h=1;else if(r==CKEDITOR.ALT+121&&!i._.tabBarMode&&1<i.getPageCount())i._.tabBarMode=!0,i._.tabs[i._.currentTabId][0].focus(),h=1;else if((37==r||39==r)&&i._.tabBarMode)r=r==(u?39:37)?o.call(i):c.call(i),i.selectPage(r),i._.tabs[r][0].focus(),h=1;else if((13==r||32==r)&&i._.tabBarMode)this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex=-1,a(1),h=1;else if(13==r)r=t.data.getTarget(),r.is("a","button","select","textarea")||r.is("input")&&"button"==r.$.type||((r=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(r.click,0,r),h=1),v=1;else if(27==r)(r=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(r.click,0,r):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),v=1;else return;k(t)}}function k(n){h?n.data.preventDefault(1):v&&n.data.stopPropagation()}var r=CKEDITOR.dialog._.dialogDefinitions[t],e=CKEDITOR.tools.clone(et),s=n.config.dialog_buttonsOrder||"OS",u=n.lang.dir,f={},h,v,y,i,p,l;if(("OS"==s&&CKEDITOR.env.mac||"rtl"==s&&"ltr"==u||"ltr"==s&&"rtl"==u)&&e.buttons.reverse(),r=CKEDITOR.tools.extend(r(n),e),r=CKEDITOR.tools.clone(r),r=new w(this,r),e=tt(n),this._={editor:n,element:e.element,name:t,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"==u?"right":"left"]=0,this.parts.dialog.setStyles(e),CKEDITOR.event.call(this),this.definition=r=CKEDITOR.fire("dialogDefinition",{name:t,definition:r},n).definition,!("removeDialogTabs"in n._)&&n.config.removeDialogTabs){for(e=n.config.removeDialogTabs.split(";"),u=0;u<e.length;u++)(s=e[u].split(":"),2==s.length)&&(y=s[0],f[y]||(f[y]=[]),f[y].push(s[1]));n._.removeDialogTabs=f}if(n._.removeDialogTabs&&(f=n._.removeDialogTabs[t]))for(u=0;u<f.length;u++)r.removeContents(f[u]);if(r.onLoad)this.on("load",r.onLoad);if(r.onShow)this.on("show",r.onShow);if(r.onHide)this.on("hide",r.onHide);if(r.onOk)this.on("ok",function(t){n.fire("saveSnapshot");setTimeout(function(){n.fire("saveSnapshot")},0);!1===r.onOk.call(this,t)&&(t.data.hide=!1)});if(r.onCancel)this.on("cancel",function(n){!1===r.onCancel.call(this,n)&&(n.data.hide=!1)});i=this;p=function(n){var t=i._.contents,f=!1,r,u;for(r in t)for(u in t[r])if(f=n.call(this,t[r][u]))return};this.on("ok",function(n){p(function(t){if(t.validate){var i=t.validate(this),r="string"==typeof i||!1===i;return r&&(n.data.hide=!1,n.stop()),g.call(t,!r,"string"==typeof i?i:void 0),r}})},this,null,0);this.on("cancel",function(t){p(function(i){if(i.isChanged())return!n.config.dialog_noConfirmCancel&&!confirm(n.lang.common.confirmCancel)&&(t.data.hide=!1),!0})},this,null,0);this.parts.close.on("click",function(n){!1!==this.fire("cancel",{hide:!0}).hide&&this.hide();n.data.preventDefault()},this);this.changeFocus=a;l=this._.element;n.focusManager.add(l,1);this.on("show",function(){l.on("keydown",b,this);if(CKEDITOR.env.opera||CKEDITOR.env.gecko)l.on("keypress",k,this)});this.on("hide",function(){l.removeListener("keydown",b);(CKEDITOR.env.opera||CKEDITOR.env.gecko)&&l.removeListener("keypress",k);p(function(n){nt.apply(n)})});this.on("iframeAdded",function(n){new CKEDITOR.dom.document(n.data.iframe.$.contentWindow.document).on("keydown",b,this,null,0)});this.on("show",function(){if(d(),n.config.dialog_startupFocusTab&&1<i._.pageCount)i._.tabBarMode=!0,i._.tabs[i._.currentTabId][0].focus();else if(!this._.hasFocus)if(this._.currentFocusIndex=-1,r.onFocus){var t=r.onFocus.call(this);t&&t.focus()}else a(1)},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var n=this.getElement(),t=n.getFirst();t.remove();t.appendTo(n)},this);for(rt(this),ut(this),new CKEDITOR.dom.text(r.title,CKEDITOR.document).appendTo(this.parts.title),u=0;u<r.contents.length;u++)(f=r.contents[u])&&this.addPage(f);this.parts.tabs.on("click",function(n){var t=n.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,a(1)),n.data.preventDefault())},this);for(u=[],f=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:r.buttons},u).getChild(),this.parts.footer.setHtml(u.join("")),u=0;u<f.length;u++)this._.buttons[f[u].id]=f[u]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(){return function(n,t){this._.contentSize&&this._.contentSize.width==n&&this._.contentSize.height==t||(CKEDITOR.dialog.fire("resize",{dialog:this,width:n,height:t},this._.editor),this.fire("resize",{width:n,height:t},this._.editor),this.parts.contents.setStyles({width:n+"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:n,height:t})}}(),getSize:function(){var n=this._.element.getFirst();return{width:n.$.offsetWidth||0,height:n.$.offsetHeight||0}},move:function(n,t,i){var u=this._.element.getFirst(),f="rtl"==this._.editor.lang.dir,r="fixed"==u.getComputedStyle("position");CKEDITOR.env.ie&&u.setStyle("zoom","100%");r&&this._.position&&this._.position.x==n&&this._.position.y==t||(this._.position={x:n,y:t},r||(r=CKEDITOR.document.getWindow().getScrollPosition(),n+=r.x,t+=r.y),f&&(r=this.getSize(),n=CKEDITOR.document.getWindow().getViewPaneSize().width-r.width-n),t={top:(0<t?t:0)+"px"},t[f?"right":"left"]=(0<n?n:0)+"px",u.setStyles(t),i&&(this._.moved=1))},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var n=this._.element,i=this.definition,r,u,s,t;!n.getParent()||!n.getParent().equals(CKEDITOR.document.getBody())?n.appendTo(CKEDITOR.document.getBody()):n.setStyle("display","block");CKEDITOR.env.gecko&&10900>CKEDITOR.env.version&&(r=this.parts.dialog,r.setStyle("position","absolute"),setTimeout(function(){r.setStyle("position","fixed")},0));this.resize(this._.contentSize&&this._.contentSize.width||i.width||i.minWidth,this._.contentSize&&this._.contentSize.height||i.height||i.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,y(this._.editor)):(this._.parentDialog=CKEDITOR.dialog._.currentTop,this._.parentDialog.getElement().getFirst().$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2),CKEDITOR.dialog._.currentTop=this);n.on("keydown",b);n.on(CKEDITOR.env.opera?"keypress":"keyup",k);this._.hasFocus=!1;for(u in i.contents)if(i.contents[u]){var n=i.contents[u],f=this._.tabs[n.id],e=n.requiredContent,o=0;if(f){for(s in this._.contents[n.id])t=this._.contents[n.id][s],"hbox"!=t.type&&"vbox"!=t.type&&t.getInputElement()&&(t.requiredContent&&!this._.editor.activeFilter.check(t.requiredContent)?t.disable():(t.enable(),o++));!o||e&&!this._.editor.activeFilter.check(e)?f[0].addClass("cke_dialog_tab_disabled"):f[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();it(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(n){n.setInitValue&&n.setInitValue()})},100,this)},layout:function(){var u=this.parts.dialog,n=this.getSize(),t=CKEDITOR.document.getWindow().getViewPaneSize(),i=(t.width-n.width)/2,r=(t.height-n.height)/2;CKEDITOR.env.ie6Compat||(n.height+(0<r?r:0)>t.height||n.width+(0<i?i:0)>t.width?u.setStyle("position","absolute"):u.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:i,this._.moved?this._.position.y:r)},foreach:function(n){var t,i;for(t in this._.contents)for(i in this._.contents[t])n.call(this,this._.contents[t][i]);return this},reset:function(){var n=function(n){n.reset&&n.reset(1)};return function(){return this.foreach(n),this}}(),setupContent:function(){var n=arguments;this.foreach(function(t){t.setup&&t.setup.apply(t,n)})},commitContent:function(){var n=arguments;this.foreach(function(t){CKEDITOR.env.ie&&this._.currentFocusIndex==t.focusIndex&&t.getInputElement().$.blur();t.commit&&t.commit.apply(t,n)})},hide:function(){var n,t,i;if(this.parts.dialog.isVisible()){for(this.fire("hide",{}),this._.editor.fire("dialogHide",this),this.selectPage(this._.tabIdList[0]),n=this._.element,n.setStyle("display","none"),this.parts.dialog.setStyle("visibility","hidden"),ot(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();this._.parentDialog?(t=this._.parentDialog.getElement().getFirst(),t.setStyle("z-index",parseInt(t.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))):p(this._.editor);(CKEDITOR.dialog._.currentTop=this._.parentDialog)?CKEDITOR.dialog._.currentZIndex-=10:(CKEDITOR.dialog._.currentZIndex=null,n.removeListener("keydown",b),n.removeListener(CKEDITOR.env.opera?"keypress":"keyup",k),i=this._.editor,i.focus(),setTimeout(function(){i.focusManager.unlock()},0));delete this._.parentDialog;this.foreach(function(n){n.resetInitValue&&n.resetInitValue()})}},addPage:function(n){if(!n.requiredContent||this._.editor.filter.check(n.requiredContent)){for(var i=[],r=n.label?' title="'+CKEDITOR.tools.htmlEncode(n.label)+'"':"",t=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:n.elements,expand:!!n.expand,padding:n.padding,style:n.style||"width: 100%;"},i),u=this._.contents[n.id]={},f=t.getChild(),e=0;t=f.shift();)t.notAllowed||"hbox"==t.type||"vbox"==t.type||e++,u[t.id]=t,"function"==typeof t.getChild&&f.push.apply(f,t.getChild());e||(n.hidden=!0);i=CKEDITOR.dom.element.createFromHtml(i.join(""));i.setAttribute("role","tabpanel");t=CKEDITOR.env;u="cke_"+n.id+"_"+CKEDITOR.tools.getNextNumber();r=CKEDITOR.dom.element.createFromHtml(['<a class="cke_dialog_tab"',0<this._.pageCount?" cke_last":"cke_first",r,n.hidden?' style="display:none"':"",' id="',u,'"',t.gecko&&10900<=t.version&&!t.hc?"":' href="javascript:void(0)"',' tabIndex="-1" hidefocus="true" role="tab">',n.label,"<\/a>"].join(""));i.setAttribute("aria-labelledby",u);this._.tabs[n.id]=[r,i];this._.tabIdList.push(n.id);n.hidden||this._.pageCount++;this._.lastTab=r;this.updateStyle();i.setAttribute("name",n.id);i.appendTo(this.parts.contents);r.unselectable();this.parts.tabs.append(r);n.accessKey&&(d(this,this,"CTRL+"+n.accessKey,ht,st),this._.accessKeyMap["CTRL+"+n.accessKey]=n.id)}},selectPage:function(n){var i,u,r,t;if(this._.currentTabId!=n&&!this._.tabs[n][0].hasClass("cke_dialog_tab_disabled")&&!0!==this.fire("selectPage",{page:n,currentPage:this._.currentTabId})){for(i in this._.tabs)u=this._.tabs[i][0],r=this._.tabs[i][1],i!=n&&(u.removeClass("cke_dialog_tab_selected"),r.hide()),r.setAttribute("aria-hidden",i!=n);t=this._.tabs[n];t[0].addClass("cke_dialog_tab_selected");CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(l(t[1]),t[1].show(),setTimeout(function(){l(t[1],1)},0)):t[1].show();this._.currentTabId=n;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,n)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(n){var t=this._.tabs[n]&&this._.tabs[n][0];t&&1!=this._.pageCount&&t.isVisible()&&(n==this._.currentTabId&&this.selectPage(o.call(this)),t.hide(),this._.pageCount--,this.updateStyle())},showPage:function(n){(n=this._.tabs[n]&&this._.tabs[n][0])&&(n.show(),this._.pageCount++,this.updateStyle())},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(n,t){var i=this._.contents[n];return i&&i[t]},getValueOf:function(n,t){return this.getContentElement(n,t).getValue()},setValueOf:function(n,t,i){return this.getContentElement(n,t).setValue(i)},getButton:function(n){return this._.buttons[n]},click:function(n){return this._.buttons[n].click()},disableButton:function(n){return this._.buttons[n].disable()},enableButton:function(n){return this._.buttons[n].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(n,t){if("undefined"==typeof t)t=this._.focusList.length,this._.focusList.push(new a(this,n,t));else{this._.focusList.splice(t,0,new a(this,n,t));for(var i=t+1;i<this._.focusList.length;i++)this._.focusList[i].focusIndex++}}};CKEDITOR.tools.extend(CKEDITOR.dialog,{add:function(n,t){this._.dialogDefinitions[n]&&"function"!=typeof t||(this._.dialogDefinitions[n]=t)},exists:function(n){return!!this._.dialogDefinitions[n]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},isTabEnabled:function(n,t,i){return n=n.config.removeDialogTabs,!(n&&n.match(RegExp("(?:^|;)"+t+":"+i+"(?:$|;)","i")))},okButton:function(){var n=function(n,t){return t=t||{},CKEDITOR.tools.extend({id:"ok",type:"button",label:n.lang.common.ok,"class":"cke_dialog_ui_button_ok",onClick:function(n){n=n.data.dialog;!1!==n.fire("ok",{hide:!0}).hide&&n.hide()}},t,!0)};return n.type="button",n.override=function(t){return CKEDITOR.tools.extend(function(i){return n(i,t)},{type:"button"},!0)},n}(),cancelButton:function(){var n=function(n,t){return t=t||{},CKEDITOR.tools.extend({id:"cancel",type:"button",label:n.lang.common.cancel,"class":"cke_dialog_ui_button_cancel",onClick:function(n){n=n.data.dialog;!1!==n.fire("cancel",{hide:!0}).hide&&n.hide()}},t,!0)};return n.type="button",n.override=function(t){return CKEDITOR.tools.extend(function(i){return n(i,t)},{type:"button"},!0)},n}(),addUIElement:function(n,t){this._.uiElementBuilders[n]=t}});CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};CKEDITOR.event.implementOn(CKEDITOR.dialog);CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);var et={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},u=function(n,t,i){for(var f=0,r;r=n[f];f++)if(r.id==t||i&&r[i]&&(r=u(r[i],t,i)))return r;return null},f=function(n,t,i,r,u){if(i){for(var o=0,e;e=n[o];o++){if(e.id==i)return n.splice(o,0,t),t;if(r&&e[r]&&(e=f(e[r],t,i,r,!0)))return e}if(u)return null}return n.push(t),t},e=function(n,t,i){for(var u=0,r;r=n[u];u++){if(r.id==t)return n.splice(u,1);if(i&&r[i]&&(r=e(r[i],t,i)))return r}return null},w=function(n,t){this.dialog=n;for(var u=t.contents,i=0,r;r=u[i];i++)u[i]=r&&new v(n,r);CKEDITOR.tools.extend(this,t)};w.prototype={getContents:function(n){return u(this.contents,n)},getButton:function(n){return u(this.buttons,n)},addContents:function(n,t){return f(this.contents,n,t)},addButton:function(n,t){return f(this.buttons,n,t)},removeContents:function(n){e(this.contents,n)},removeButton:function(n){e(this.buttons,n)}};v.prototype={get:function(n){return u(this.elements,n,"children")},add:function(n,t){return f(this.elements,n,t,"children")},remove:function(n){e(this.elements,n,"children")}};var h,r={},n,i={},b=function(n){var t=n.data.$.ctrlKey||n.data.$.metaKey,r=n.data.$.altKey,u=n.data.$.shiftKey,f=String.fromCharCode(n.data.$.keyCode);(t=i[(t?"CTRL+":"")+(r?"ALT+":"")+(u?"SHIFT+":"")+f])&&t.length&&(t=t[t.length-1],t.keydown&&t.keydown.call(t.uiElement,t.dialog,t.key),n.data.preventDefault())},k=function(n){var t=n.data.$.ctrlKey||n.data.$.metaKey,r=n.data.$.altKey,u=n.data.$.shiftKey,f=String.fromCharCode(n.data.$.keyCode);(t=i[(t?"CTRL+":"")+(r?"ALT+":"")+(u?"SHIFT+":"")+f])&&t.length&&(t=t[t.length-1],t.keyup&&(t.keyup.call(t.uiElement,t.dialog,t.key),n.data.preventDefault()))},d=function(n,t,r,u,f){(i[r]||(i[r]=[])).push({uiElement:n,dialog:t,key:r,keyup:f||n.accessKeyUp,keydown:u||n.accessKeyDown})},ot=function(n){var u,t,r;for(u in i){for(t=i[u],r=t.length-1;0<=r;r--)(t[r].dialog==n||t[r].uiElement==n)&&t.splice(r,1);0===t.length&&delete i[u]}},st=function(n,t){n._.accessKeyMap[t]&&n.selectPage(n._.accessKeyMap[t])},ht=function(){};(function(){CKEDITOR.ui.dialog={uiElement:function(n,t,i,r,u,f,e){var s,c,o,l;if(!(4>arguments.length)){var y=(r.call?r(t):r)||"div",v=["<",y," "],a=(u&&u.call?u(t):u)||{},h=(f&&f.call?f(t):f)||{},p=(e&&e.call?e.call(this,n,t):e)||"",o=this.domId=h.id||CKEDITOR.tools.getNextId()+"_uiElement";for(this.id=t.id,t.requiredContent&&!n.getParentEditor().filter.check(t.requiredContent)&&(a.display="none",this.notAllowed=!0),h.id=o,s={},t.type&&(s["cke_dialog_ui_"+t.type]=1),t.className&&(s[t.className]=1),t.disabled&&(s.cke_disabled=1),c=h["class"]&&h["class"].split?h["class"].split(" "):[],o=0;o<c.length;o++)c[o]&&(s[c[o]]=1);c=[];for(o in s)c.push(o);h["class"]=c.join(" ");t.title&&(h.title=t.title);s=(t.style||"").split(";");t.align&&(c=t.align,a["margin-left"]="left"==c?0:"auto",a["margin-right"]="right"==c?0:"auto");for(o in a)s.push(o+":"+a[o]);for(t.hidden&&s.push("display:none"),o=s.length-1;0<=o;o--)""===s[o]&&s.splice(o,1);0<s.length&&(h.style=(h.style?h.style+"; ":"")+s.join("; "));for(o in h)v.push(o+'="'+CKEDITOR.tools.htmlEncode(h[o])+'" ');v.push(">",p,"<\/",y,">");i.push(v.join(""));(this._||(this._={})).dialog=n;"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(n){return function(i){n.call(this,t.setValue.call(this,i))}}));"function"==typeof t.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,function(n){return function(){return t.getValue.call(this,n.call(this))}}));CKEDITOR.event.implementOn(this);this.registerEvents(t);this.accessKeyUp&&this.accessKeyDown&&t.accessKey&&d(this,n,"CTRL+"+t.accessKey);l=this;n.on("load",function(){var i=l.getInputElement(),t;if(i){t=l.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&CKEDITOR.env.version<8?"cke_dialog_ui_focused":"";i.on("focus",function(){n._.tabBarMode=!1;n._.hasFocus=!0;l.fire("focus");t&&this.addClass(t)});i.on("blur",function(){l.fire("blur");t&&this.removeClass(t)})}});CKEDITOR.tools.extend(this,t);this.keyboardFocusable&&(this.tabIndex=t.tabIndex||0,this.focusIndex=n._.focusList.push(this)-1,this.on("focus",function(){n._.currentFocusIndex=l.focusIndex}))}},hbox:function(n,i,r,u,f){if(!(4>arguments.length)){this._||(this._={});var s=this._.children=i,o=f&&f.widths||null,h=f&&f.height||null,e,c={role:"presentation"};f&&f.align&&(c.align=f.align);CKEDITOR.ui.dialog.uiElement.call(this,n,f||{type:"hbox"},u,"table",{},c,function(){var i=['<tbody><tr class="cke_dialog_ui_hbox">'],u,n;for(e=0;e<r.length;e++)u="cke_dialog_ui_hbox_child",n=[],0===e&&(u="cke_dialog_ui_hbox_first"),e==r.length-1&&(u="cke_dialog_ui_hbox_last"),i.push('<td class="',u,'" role="presentation" '),o?o[e]&&n.push("width:"+t(o[e])):n.push("width:"+Math.floor(100/r.length)+"%"),h&&n.push("height:"+t(h)),f&&void 0!=f.padding&&n.push("padding:"+t(f.padding)),CKEDITOR.env.ie&&CKEDITOR.env.quirks&&s[e].align&&n.push("text-align:"+s[e].align),0<n.length&&i.push('style="'+n.join("; ")+'" '),i.push(">",r[e],"<\/td>");return i.push("<\/tr><\/tbody>"),i.join("")})}},vbox:function(n,i,r,u,f){if(!(3>arguments.length)){this._||(this._={});var o=this._.children=i,e=f&&f.width||null,s=f&&f.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,n,f||{type:"vbox"},u,"div",null,{role:"presentation"},function(){var i=['<table role="presentation" cellspacing="0" border="0" '],h,u;for(i.push('style="'),f&&f.expand&&i.push("height:100%;"),i.push("width:"+t(e||"100%"),";"),CKEDITOR.env.webkit&&i.push("float:none;"),i.push('"'),i.push('align="',CKEDITOR.tools.htmlEncode(f&&f.align||("ltr"==n.getParentEditor().lang.dir?"left":"right")),'" '),i.push("><tbody>"),h=0;h<r.length;h++)u=[],i.push('<tr><td role="presentation" '),e&&u.push("width:"+t(e||"100%")),s?u.push("height:"+t(s[h])):f&&f.expand&&u.push("height:"+Math.floor(100/r.length)+"%"),f&&void 0!=f.padding&&u.push("padding:"+t(f.padding)),CKEDITOR.env.ie&&CKEDITOR.env.quirks&&o[h].align&&u.push("text-align:"+o[h].align),0<u.length&&i.push('style="',u.join("; "),'" '),i.push(' class="cke_dialog_ui_vbox_child">',r[h],"<\/td><\/tr>");return i.push("<\/tbody><\/table>"),i.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(n,t){return this.getInputElement().setValue(n),t||this.fire("change",{value:n}),this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var n=this.getInputElement();(n=n.getParent())&&-1==n.$.className.search("cke_dialog_page_contents"););return n?(n=n.getAttribute("name"),this._.dialog._.currentTabId!=n&&this._.dialog.selectPage(n),this):this},focus:function(){return this.selectParentTab().getInputElement().focus(),this},registerEvents:function(n){var i,r=function(n,t,i,r){t.on("load",function(){n.getInputElement().on(i,r,n)})},t;for(t in n)(i=t.match(/^on([A-Z]\w+)/))&&(this.eventProcessors[t]?this.eventProcessors[t].call(this,this._.dialog,n[t]):r(this,this._.dialog,i[1].toLowerCase(),n[t]));return this},eventProcessors:{onLoad:function(n,t){n.on("load",t,this)},onShow:function(n,t){n.on("show",t,this)},onHide:function(n,t){n.on("hide",t,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var n=this.getElement();this.getInputElement().setAttribute("disabled","true");n.addClass("cke_disabled")},enable:function(){var n=this.getElement();this.getInputElement().removeAttribute("disabled");n.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return!this.isEnabled()||!this.isVisible()?!1:!0}};CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(n){return 1>arguments.length?this._.children.concat():(n.splice||(n=[n]),2>n.length?this._.children[n[0]]:this._.children[n[0]]&&this._.children[n[0]].getChild?this._.children[n[0]].getChild(n.slice(1,n.length)):null)}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox,function(){var n={build:function(n,t,i){for(var f,e=t.children,r,o=[],s=[],u=0;u<e.length&&(r=e[u]);u++)f=[],o.push(f),s.push(CKEDITOR.dialog._.uiElementBuilders[r.type].build(n,r,f));return new CKEDITOR.ui.dialog[t.type](n,s,o,i,t)}};CKEDITOR.dialog.addUIElement("hbox",n);CKEDITOR.dialog.addUIElement("vbox",n)}();CKEDITOR.dialogCommand=function(n,t){this.dialogName=n;CKEDITOR.tools.extend(this,t,!0)};CKEDITOR.dialogCommand.prototype={exec:function(n){CKEDITOR.env.opera?CKEDITOR.tools.setTimeout(function(){n.openDialog(this.dialogName)},0,this):n.openDialog(this.dialogName)},canUndo:!1,editorFocus:1},function(){var n=/^([a]|[^a])+$/,t=/^\d*$/,i=/^\d*(?:\.\d+)?$/,u=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,f=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,e=/^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_AND=2;CKEDITOR.dialog.validate={functions:function(){var n=arguments;return function(){for(var f=this&&this.getValue?this.getValue():n[0],e=void 0,u=CKEDITOR.VALIDATE_AND,r=[],i,t=0;t<n.length;t++)if("function"==typeof n[t])r.push(n[t]);else break;for(t<n.length&&"string"==typeof n[t]&&(e=n[t],t++),t<n.length&&"number"==typeof n[t]&&(u=n[t]),i=u==CKEDITOR.VALIDATE_AND?!0:!1,t=0;t<r.length;t++)i=u==CKEDITOR.VALIDATE_AND?i&&r[t](f):i||r[t](f);return i?!0:e}},regex:function(n,t){return function(i){return i=this&&this.getValue?this.getValue():i,n.test(i)?!0:t}},notEmpty:function(t){return this.regex(n,t)},integer:function(n){return this.regex(t,n)},number:function(n){return this.regex(i,n)},cssLength:function(n){return this.functions(function(n){return f.test(CKEDITOR.tools.trim(n))},n)},htmlLength:function(n){return this.functions(function(n){return u.test(CKEDITOR.tools.trim(n))},n)},inlineStyle:function(n){return this.functions(function(n){return e.test(CKEDITOR.tools.trim(n))},n)},equals:function(n,t){return this.functions(function(t){return t==n},t)},notEqual:function(n,t){return this.functions(function(t){return t!=n},t)}};CKEDITOR.on("instanceDestroyed",function(n){var t,i,n,u;if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(;t=CKEDITOR.dialog._.currentTop;)t.hide();for(i in r)r[i].remove();r={}}n=n.editor._.storedDialogs;for(u in n)n[u].destroy()})}();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(n,t){var i=null,r=CKEDITOR.dialog._.dialogDefinitions[n];if(null===CKEDITOR.dialog._.currentTop&&y(this),"function"==typeof r)i=this._.storedDialogs||(this._.storedDialogs={}),i=i[n]||(i[n]=new CKEDITOR.dialog(this,n)),t&&t.call(i,i),i.show();else{if("failed"==r)throw p(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+n+'" failed when loading definition.');"string"==typeof r&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(r),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[n]&&(CKEDITOR.dialog._.dialogDefinitions[n]="failed");this.openDialog(n,t)},this,0,1)}return CKEDITOR.skin.loadPart("dialog"),i}})}();CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(n){n.on("doubleclick",function(t){t.data.dialog&&n.openDialog(t.data.dialog)},null,null,999)}}),function(){CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{ar:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,en:1,eo:1,es:1,et:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,nb:1,nl:1,no:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,ug:1,uk:1,vi:1,"zh-cn":1},init:function(n){var t=this;n.addCommand("a11yHelp",{exec:function(){var i=n.langCode,i=t.availableLangs[i]?i:t.availableLangs[i.replace(/-.*/,"")]?i.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(t.path+"dialogs/lang/"+i+".js"),function(){n.lang.a11yhelp=t.langEntries[i];n.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:!1});n.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js")}})}();CKEDITOR.plugins.add("basicstyles",{init:function(n){var u=0,t=function(t,i,r,e){if(e){var e=new CKEDITOR.style(e),o=f[r];o.unshift(e);n.attachStyleStateChange(e,function(t){n.readOnly||n.getCommand(r).setState(t)});n.addCommand(r,new CKEDITOR.styleCommand(e,{contentForms:o}));n.ui.addButton&&n.ui.addButton(t,{label:i,command:r,toolbar:"basicstyles,"+(u+=10)})}},f={bold:["strong","b",["span",function(n){return n=n.styles["font-weight"],"bold"==n||700<=+n}]],italic:["em","i",["span",function(n){return"italic"==n.styles["font-style"]}]],underline:["u",["span",function(n){return"underline"==n.styles["text-decoration"]}]],strike:["s","strike",["span",function(n){return"line-through"==n.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},i=n.config,r=n.lang.basicstyles;t("Bold",r.bold,"bold",i.coreStyles_bold);t("Italic",r.italic,"italic",i.coreStyles_italic);t("Underline",r.underline,"underline",i.coreStyles_underline);t("Strike",r.strike,"strike",i.coreStyles_strike);t("Subscript",r.subscript,"subscript",i.coreStyles_subscript);t("Superscript",r.superscript,"superscript",i.coreStyles_superscript);n.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}});CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"};CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"};CKEDITOR.config.coreStyles_underline={element:"u"};CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"};CKEDITOR.config.coreStyles_subscript={element:"sub"};CKEDITOR.config.coreStyles_superscript={element:"sup"},function(){var n={exec:function(n){var t=n.getCommand("blockquote").state,s=n.getSelection(),r=s&&s.getRanges()[0],o,f,i,u,e;if(r){if(o=s.createBookmarks(),CKEDITOR.env.ie){if(f=o[0].startNode,i=o[0].endNode,f&&"blockquote"==f.getParent().getName())for(u=f;u=u.getNext();)if(u.type==CKEDITOR.NODE_ELEMENT&&u.isBlockBoundary()){f.move(u,!0);break}if(i&&"blockquote"==i.getParent().getName())for(u=i;u=u.getPrevious();)if(u.type==CKEDITOR.NODE_ELEMENT&&u.isBlockBoundary()){i.move(u);break}}if(e=r.createIterator(),e.enlargeBr=n.config.enterMode!=CKEDITOR.ENTER_BR,t==CKEDITOR.TRISTATE_OFF){for(f=[];t=e.getNextParagraph();)f.push(t);for(1>f.length&&(t=n.document.createElement(n.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),i=o.shift(),r.insertNode(t),t.append(new CKEDITOR.dom.text("﻿",n.document)),r.moveToBookmark(i),r.selectNodeContents(t),r.collapse(!0),i=r.createBookmark(),f.push(t),o.unshift(i)),u=f[0].getParent(),r=[],i=0;i<f.length;i++)t=f[i],u=u.getCommonAncestor(t.getParent());for(t={table:1,tbody:1,tr:1,ol:1,ul:1};t[u.getName()];)u=u.getParent();for(i=null;0<f.length;){for(t=f.shift();!t.getParent().equals(u);)t=t.getParent();t.equals(i)||r.push(t);i=t}for(;0<r.length;)if(t=r.shift(),"blockquote"==t.getName()){for(i=new CKEDITOR.dom.documentFragment(n.document);t.getFirst();)i.append(t.getFirst().remove()),f.push(i.getLast());i.replace(t)}else f.push(t);for(r=n.document.createElement("blockquote"),r.insertBefore(f[0]);0<f.length;)t=f.shift(),r.append(t)}else if(t==CKEDITOR.TRISTATE_ON){for(i=[],u={};t=e.getNextParagraph();){for(f=r=null;t.getParent();){if("blockquote"==t.getParent().getName()){r=t.getParent();f=t;break}t=t.getParent()}r&&f&&!f.getCustomData("blockquote_moveout")&&(i.push(f),CKEDITOR.dom.element.setMarker(u,f,"blockquote_moveout",!0))}for(CKEDITOR.dom.element.clearAllMarkers(u),t=[],f=[],u={};0<i.length;)e=i.shift(),r=e.getParent(),e.getPrevious()?e.getNext()?(e.breakParent(e.getParent()),f.push(e.getNext())):e.remove().insertAfter(r):e.remove().insertBefore(r),r.getCustomData("blockquote_processed")||(f.push(r),CKEDITOR.dom.element.setMarker(u,r,"blockquote_processed",!0)),t.push(e);for(CKEDITOR.dom.element.clearAllMarkers(u),i=f.length-1;0<=i;i--){r=f[i];n:{u=r;for(var e=0,c=u.getChildCount(),h=void 0;e<c&&(h=u.getChild(e));e++)if(h.type==CKEDITOR.NODE_ELEMENT&&h.isBlockBoundary()){u=!1;break n}u=!0}u&&r.remove()}if(n.config.enterMode==CKEDITOR.ENTER_BR)for(r=!0;t.length;)if(e=t.shift(),"div"==e.getName()){for(i=new CKEDITOR.dom.documentFragment(n.document),!r||!e.getPrevious()||e.getPrevious().type==CKEDITOR.NODE_ELEMENT&&e.getPrevious().isBlockBoundary()||i.append(n.document.createElement("br")),r=e.getNext()&&!(e.getNext().type==CKEDITOR.NODE_ELEMENT&&e.getNext().isBlockBoundary());e.getFirst();)e.getFirst().remove().appendTo(i);r&&i.append(n.document.createElement("br"));i.replace(e);r=!1}}s.selectBookmarks(o);n.focus()}},refresh:function(n,t){this.setState(n.elementPath(t.block||t.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(t){t.blockless||(t.addCommand("blockquote",n),t.ui.addButton&&t.ui.addButton("Blockquote",{label:t.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})}(),function(){function t(n){function y(){var t=n.editable(),o;t.on(s,function(n){CKEDITOR.env.ie&&i||v(n)});CKEDITOR.env.ie&&t.on("paste",function(t){e||(r(),t.data.preventDefault(),v(t),u("paste")||n.openDialog("paste"))});CKEDITOR.env.ie&&(t.on("contextmenu",c,null,null,0),t.on("beforepaste",function(n){n.data&&!n.data.$.ctrlKey&&c()},null,null,0));t.on("beforecut",function(){i||a(n)});t.attachListener(CKEDITOR.env.ie?t:n.document.getDocumentElement(),"mouseup",function(){o=setTimeout(function(){f()},0)});n.on("destroy",function(){clearTimeout(o)});t.on("keyup",f)}function h(t){return{type:t,canUndo:"cut"==t,startDisabled:!0,exec:function(){"cut"==this.type&&a();var t,i=this.type;if(CKEDITOR.env.ie)t=u(i);else try{t=n.document.$.execCommand(i,!1,null)}catch(r){t=!1}return t||alert(n.lang.clipboard[this.type+"Error"]),t}}}function p(){return{canUndo:!1,async:!0,exec:function(n,t){var i=function(t,i){t&&l(t.type,t.dataValue,!!i);n.fire("afterCommandExec",{name:"paste",command:r,returnValue:!!t})},r=this;"string"==typeof t?i({type:"auto",dataValue:t},1):n.getClipboardData(i)}}}function r(){e=1;setTimeout(function(){e=0},100)}function c(){i=1;setTimeout(function(){i=0},10)}function u(t){var i=n.document,r=i.getBody(),u=!1,f=function(){u=!0};r.on(t,f);return(7<CKEDITOR.env.version?i.$:i.$.selection.createRange()).execCommand(t),r.removeListener(t,f),u}function l(t,i,r){return(t={type:t},r&&!n.fire("beforePaste",t)||!i)?!1:(t.dataValue=i,n.fire("paste",t))}function a(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var t=n.getSelection(),i,r,u;t.getType()==CKEDITOR.SELECTION_ELEMENT&&(i=t.getSelectedElement())&&(r=t.getRanges()[0],u=n.document.createText(""),u.insertBefore(i),r.setStartBefore(u),r.setEndAfter(i),t.selectRanges([r]),setTimeout(function(){i.getParent()&&(u.remove(),t.selectElement(i))},0))}}function w(t,i){var e=n.document,u=n.editable(),s=function(n){n.cancel()},f=CKEDITOR.env.gecko&&10902>=CKEDITOR.env.version,o,h,a,v;if(!e.getById("cke_pastebin")){var c=n.getSelection(),l=c.createBookmarks(),r=new CKEDITOR.dom.element((CKEDITOR.env.webkit||u.is("body"))&&!CKEDITOR.env.ie&&!CKEDITOR.env.opera?"body":"div",e);r.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});CKEDITOR.env.opera&&r.appendBogus();h=0;e=e.getWindow();f?(r.insertAfter(l[0].startNode),r.setStyle("display","inline")):(CKEDITOR.env.webkit?(u.append(r),r.addClass("cke_editable"),u.is("body")||(f="static"!=u.getComputedStyle("position")?u:CKEDITOR.dom.element.get(u.$.offsetParent),h=f.getDocumentPosition().y)):u.getAscendant(CKEDITOR.env.ie||CKEDITOR.env.opera?"body":"html",1).append(r),r.setStyles({position:"absolute",top:e.getScrollPosition().y-h+10+"px",width:"1px",height:Math.max(1,e.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0}));(f=r.getParent().isReadOnly())?(r.setOpacity(0),r.setAttribute("contenteditable",!0)):r.setStyle("ltr"==n.config.contentsLangDirection?"left":"right","-1000px");n.on("selectionChange",s,null,null,0);CKEDITOR.env.webkit&&(o=u.once("blur",s,null,null,-100));f&&r.focus();f=new CKEDITOR.dom.range(r);f.selectNodeContents(r);a=f.select();CKEDITOR.env.ie&&(o=u.once("blur",function(){n.lockSelection(a)}));v=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){(CKEDITOR.env.webkit||CKEDITOR.env.opera)&&(CKEDITOR.document[CKEDITOR.env.webkit?"getBody":"getDocumentElement"]().$.scrollTop=v);o&&o.removeListener();CKEDITOR.env.ie&&u.focus();c.selectBookmarks(l);r.remove();var t;CKEDITOR.env.webkit&&(t=r.getFirst())&&t.is&&t.hasClass("Apple-style-span")&&(r=t);n.removeListener("selectionChange",s);i(r.getHtml())},0)}}function b(){if(CKEDITOR.env.ie){n.focus();r();var t=n.focusManager;if(t.lock(),n.editable().fire(s)&&!u("paste"))return t.unlock(),!1;t.unlock()}else try{if(n.editable().fire(s)&&!n.document.$.execCommand("Paste",!1,null))throw 0;}catch(i){return!1}return!0}function k(t){if("wysiwyg"==n.mode)switch(t.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:t=n.editable();r();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:n.fire("saveSnapshot");setTimeout(function(){n.fire("saveSnapshot")},0)}}function v(t){var i={type:"auto"},r=n.fire("beforePaste",i);w(t,function(n){n=n.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");r&&l(i.type,n,0,1)})}function f(){if("wysiwyg"==n.mode){var i=t("paste");n.getCommand("cut").setState(t("cut"));n.getCommand("copy").setState(t("copy"));n.getCommand("paste").setState(i);n.fire("pasteState",i)}}function t(t){if(o&&t in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==t)return CKEDITOR.TRISTATE_OFF;var t=n.getSelection(),i=t.getRanges();return t.getType()==CKEDITOR.SELECTION_NONE||1==i.length&&i[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var i=0,e=0,o=0,s=CKEDITOR.env.ie?"beforepaste":"paste";(function(){n.on("key",k);n.on("contentDom",y);n.on("selectionChange",function(n){o=n.data.selection.getRanges()[0].checkReadOnly();f()});n.contextMenu&&n.contextMenu.addListener(function(n,i){return o=i.getRanges()[0].checkReadOnly(),{cut:t("cut"),copy:t("copy"),paste:t("paste")}})})(),function(){function t(t,i,r,u,f){var e=n.lang.clipboard[i];n.addCommand(i,r);n.ui.addButton&&n.ui.addButton(t,{label:e,command:i,toolbar:"clipboard,"+u});n.addMenuItems&&n.addMenuItem(i,{label:e,command:i,group:"clipboard",order:f})}t("Cut","cut",h("cut"),10,1);t("Copy","copy",h("copy"),20,4);t("Paste","paste",p(),30,8)}();n.getClipboardData=function(t,i){function r(n){n.removeListener();n.cancel();i(n.data)}function u(n){n.removeListener();n.cancel();o=!0;i({type:e,dataValue:n.data})}function s(){this.customTitle=t&&t.title}var f=!1,e="auto",o=!1;i||(i=t,t=null);n.on("paste",r,null,null,0);n.on("beforePaste",function(n){n.removeListener();f=!0;e=n.data.type},null,null,1e3);!1===b()&&(n.removeListener("paste",r),f&&n.fire("pasteDialog",s)?(n.on("pasteDialogCommit",u),n.on("dialogHide",function(n){n.removeListener();n.data.removeListener("pasteDialogCommit",u);setTimeout(function(){o||i(null)},10)})):i(null))}}function i(n){if(CKEDITOR.env.webkit){if(!n.match(/^[^<]*$/g)&&!n.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!n.match(/^([^<]|<br( ?\/)?>)*$/gi)&&!n.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko||CKEDITOR.env.opera){if(!n.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}else return"html";return"htmlifiedtext"}function r(t,i){function r(n){return CKEDITOR.tools.repeat("<\/p><p>",~~(n/2))+(1==n%2?"<br>":"")}return(i=i.replace(/\s+/g," ").replace(/> +</g,"><").replace(/<br ?\/>/gi,"<br>"),i=i.replace(/<\/?[A-Z]+>/g,function(n){return n.toLowerCase()}),i.match(/^[^<]$/))?i:(CKEDITOR.env.webkit&&-1<i.indexOf("<div>")&&(i=i.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"<br>").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"<div><\/div>"),i.match(/<div>(<br>|)<\/div>/)&&(i="<p>"+i.replace(/(<div>(<br>|)<\/div>)+/g,function(n){return r(n.split("<\/div><div>").length+1)})+"<\/p>"),i=i.replace(/<\/div><div>/g,"<br>"),i=i.replace(/<\/?div>/g,"")),(CKEDITOR.env.gecko||CKEDITOR.env.opera)&&t.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(i=i.replace(/^<br><br>$/,"<br>")),-1<i.indexOf("<br><br>")&&(i="<p>"+i.replace(/(<br>){2,}/g,function(n){return r(n.length/4)})+"<\/p>")),n(t,i))}function u(){var t=new CKEDITOR.htmlParser.filter,r={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},u=CKEDITOR.tools.extend({br:0},CKEDITOR.dtd.$inline),f={p:1,br:1,"cke:br":1},e=CKEDITOR.dtd,o=CKEDITOR.tools.extend({area:1,basefont:1,embed:1,iframe:1,map:1,object:1,param:1},CKEDITOR.dtd.$nonBodyContent,CKEDITOR.dtd.$cdata),i=function(n){delete n.name;n.add(new CKEDITOR.htmlParser.text(" "))},n=function(n){for(var t=n,i;(t=t.next)&&t.name&&t.name.match(/^h\d$/);)for(i=new CKEDITOR.htmlParser.element("cke:br"),i.isEmpty=!0,n.add(i);i=t.children.shift();)n.add(i)};return t.addRules({elements:{h1:n,h2:n,h3:n,h4:n,h5:n,h6:n,img:function(n){var n=CKEDITOR.tools.trim(n.attributes.alt||""),t=" ";return n&&!n.match(/(^http|\.(jpe?g|gif|png))/i)&&(t=" ["+n+"] "),new CKEDITOR.htmlParser.text(t)},td:i,th:i,$:function(n){var i=n.name,t;if(o[i])return!1;if(n.attributes=[],"br"==i)return n;if(r[i])n.name="p";else if(u[i])delete n.name;else if(e[i]){if(t=new CKEDITOR.htmlParser.element("cke:br"),t.isEmpty=!0,CKEDITOR.dtd.$empty[i])return t;n.add(t,0);t=t.clone();t.isEmpty=!0;n.add(t);delete n.name}return f[n.name]||delete n.name,n}}},{applyToAll:!0}),t}function f(t,i,r){var i=new CKEDITOR.htmlParser.fragment.fromHtml(i),u=new CKEDITOR.htmlParser.basicWriter;i.writeHtml(u,r);var i=u.getHtml(),i=i.replace(/\s*(<\/?[a-z:]+ ?\/?>)\s*/g,"$1").replace(/(<cke:br \/>){2,}/g,"<cke:br />").replace(/(<cke:br \/>)(<\/?p>|<br \/>)/g,"$2").replace(/(<\/?p>|<br \/>)(<cke:br \/>)/g,"$1").replace(/<(cke:)?br( \/)?>/g,"<br>").replace(/<p><\/p>/g,""),f=0,i=i.replace(/<\/?p>/g,function(n){if("<p>"==n){if(1<++f)return"<\/p><p>"}else if(0<--f)return"<\/p><p>";return n}).replace(/<p><\/p>/g,"");return n(t,i)}function n(n,t){return n.enterMode==CKEDITOR.ENTER_BR?t=t.replace(/(<\/p><p>)+/g,function(n){return CKEDITOR.tools.repeat("<br>",2*(n.length/7))}).replace(/<\/?p>/g,""):n.enterMode==CKEDITOR.ENTER_DIV&&(t=t.replace(/<(\/)?p>/g,"<$1div>")),t}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(n){var e;t(n);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));n.on("paste",function(n){var t=n.data.dataValue,f=CKEDITOR.dtd.$block,i,u,r;if(-1<t.indexOf("Apple-")&&(t=t.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi," "),"html"!=n.data.type&&(t=t.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(n,t){return t.replace(/\t/g,"&nbsp;&nbsp; &nbsp;")})),-1<t.indexOf('<br class="Apple-interchange-newline">')&&(n.data.startsWithEOL=1,n.data.preSniffing="html",t=t.replace(/<br class="Apple-interchange-newline">/,"")),t=t.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1")),t.match(/^<[^<]+cke_(editable|contents)/i)){for(r=new CKEDITOR.dom.element("div"),r.setHtml(t);1==r.getChildCount()&&(i=r.getFirst())&&i.type==CKEDITOR.NODE_ELEMENT&&(i.hasClass("cke_editable")||i.hasClass("cke_contents"));)r=u=i;u&&(t=u.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?t=t.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(t,i){return i.toLowerCase()in f?(n.data.preSniffing="html","<"+i):t}):CKEDITOR.env.webkit?t=t.replace(/<\/(\w+)><div><br><\/div>$/,function(t,i){return i in f?(n.data.endsWithEOL=1,"<\/"+i+">"):t}):CKEDITOR.env.gecko&&(t=t.replace(/(\s)<br>$/,"$1"));n.data.dataValue=t},null,null,3);n.on("paste",function(t){var t=t.data,s=t.type,o=t.dataValue,h,c=n.config.clipboard_defaultContentType||"html";h="html"==s||"html"==t.preSniffing?"html":i(o);"htmlifiedtext"==h?o=r(n.config,o):"text"==s&&"html"==h&&(o=f(n.config,o,e||(e=u(n))));t.startsWithEOL&&(o='<br data-cke-eol="1">'+o);t.endsWithEOL&&(o+='<br data-cke-eol="1">');"auto"==s&&(s="html"==h||"html"==c?"html":"text");t.type=s;t.dataValue=o;delete t.preSniffing;delete t.startsWithEOL;delete t.endsWithEOL},null,null,6);n.on("paste",function(t){t=t.data;n.insertHtml(t.dataValue,t.type);setTimeout(function(){n.fire("afterPaste")},0)},null,null,1e3);n.on("pasteDialog",function(t){setTimeout(function(){n.openDialog("paste",t.data)},0)})}})}(),function(){CKEDITOR.plugins.add("panel",{beforeInit:function(n){n.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}});CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(n,t){t&&CKEDITOR.tools.extend(this,t);CKEDITOR.tools.extend(this,{className:"",css:[]});this.id=CKEDITOR.tools.getNextId();this.document=n;this.isFramed=this.forceIFrame||this.css.length;this._={blocks:{}}};CKEDITOR.ui.panel.handler={create:function(n){return new CKEDITOR.ui.panel(n)}};var n=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="presentation" frameborder="0" src="{src}"><\/iframe>'),i=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(r,u){var e,f;return this.getHolderElement=function(){var n=this._.holder;if(!n){if(this.isFramed){var n=this.document.getById(this.id+"_frame"),t=n.getParent(),n=n.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));n.write(i.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+t+");"},e)));n.getWindow().$.CKEDITOR=CKEDITOR;n.on("key"+(CKEDITOR.env.opera?"press":"down"),function(n){var t=n.data.getKeystroke(),i=this.document.getById(this.id).getAttribute("dir");this._.onKeyDown&&!1===this._.onKeyDown(t)?n.data.preventDefault():(27==t||t==("rtl"==i?39:37))&&this.onEscape&&!1===this.onEscape(t)&&n.data.preventDefault()},this);n=n.getBody();n.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(t)}else n=this.document.getById(this.id);this._.holder=n}return n},e={editorId:r.id,id:this.id,langCode:r.langCode,dir:r.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":r.config.baseFloatZIndex+1},this.isFramed&&(f=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"",e.frame=t.output({id:this.id+"_frame",src:f})),f=n.output(e),u&&u.push(f),f},addBlock:function(n,t){return t=this._.blocks[n]=t instanceof CKEDITOR.ui.panel.block?t:new CKEDITOR.ui.panel.block(this.getHolderElement(),t),this._.currentBlock||this.showBlock(n),t},getBlock:function(n){return this._.blocks[n]},showBlock:function(n){var n=this._.blocks[n],t=this._.currentBlock,i=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");return t&&t.hide(),this._.currentBlock=n,CKEDITOR.fire("ariaWidget",i),n._.focusIndex=-1,this._.onKeyDown=n.onKeyDown&&CKEDITOR.tools.bind(n.onKeyDown,n),n.show(),n},destroy:function(){this.element&&this.element.remove()}};CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(n,t){this.element=n.append(n.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));t&&CKEDITOR.tools.extend(this,t);this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title||this.attributes["aria-label"]});this.keys={};this._.focusIndex=-1;this.element.disableContextMenu()},_:{markItem:function(n){-1!=n&&(n=this.element.getElementsByTag("a").getItem(this._.focusIndex=n),(CKEDITOR.env.webkit||CKEDITOR.env.opera)&&n.getDocument().getWindow().focus(),n.focus(),this.onMark&&this.onMark(n))}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle("display","none")},onKeyDown:function(n){var i=this.keys[n],n,t;switch(i){case"next":for(n=this._.focusIndex,i=this.element.getElementsByTag("a");t=i.getItem(++n);)if(t.getAttribute("_cke_focus")&&t.$.offsetWidth){this._.focusIndex=n;t.focus();break}return!1;case"prev":for(n=this._.focusIndex,i=this.element.getElementsByTag("a");0<n&&(t=i.getItem(--n));)if(t.getAttribute("_cke_focus")&&t.$.offsetWidth){this._.focusIndex=n;t.focus();break}return!1;case"click":case"mouseup":return n=this._.focusIndex,(t=0<=n&&this.element.getElementsByTag("a").getItem(n))&&(t.$[i]?t.$[i]():t.$["on"+i]()),!1}return!0}}})}();CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function t(t,i,r,u,f){var f=CKEDITOR.tools.genKey(i.getUniqueId(),r.getUniqueId(),t.lang.dir,t.uiColor||"",u.css||"",f||""),e=n[f];return e||(e=n[f]=new CKEDITOR.ui.panel(i,u),e.element=r.append(CKEDITOR.dom.element.createFromHtml(e.render(t),i)),e.element.setStyles({display:"none",position:"absolute"})),e}var n={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(n,i,r,u){function f(){h.hide()}r.forceIFrame=1;r.toolbarRelated&&n.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(i=CKEDITOR.document.getById("cke_"+n.name));var e=i.getDocument(),u=t(n,e,i,r,u||0),o=u.element,s=o.getFirst(),h=this;o.disableContextMenu();this.element=o;this._={editor:n,panel:u,parentElement:i,definition:r,document:e,iframe:s,children:[],dir:n.lang.dir};n.on("mode",f);n.on("resize",f);e.getWindow().on("resize",f)},proto:{addBlock:function(n,t){return this._.panel.addBlock(n,t)},addListBlock:function(n,t){return this._.panel.addListBlock(n,t)},getBlock:function(n){return this._.panel.getBlock(n)},showBlock:function(n,t,i,r,u,f){var h=this._.panel,l=h.showBlock(n);this.allowBlur(!1);n=this._.editor.editable();this._.returnFocus=n.hasFocus?n:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);var e=this.element,n=this._.iframe,n=CKEDITOR.env.ie?n:new CKEDITOR.dom.window(n.$.contentWindow),a=e.getDocument(),v=this._.parentElement.getPositionedAncestor(),y=t.getDocumentPosition(a),a=v?v.getDocumentPosition(a):{x:0,y:0},c="rtl"==this._.dir,o=y.x+(r||0)-a.x,s=y.y+(u||0)-a.y;c&&(1==i||4==i)?o+=t.$.offsetWidth:c||2!=i&&3!=i||(o+=t.$.offsetWidth-1);(3==i||4==i)&&(s+=t.$.offsetHeight-1);this._.panel._.offsetParentId=t.getId();e.setStyles({top:s+"px",left:0,display:""});e.setOpacity(0);e.getFirst().removeStyle("width");this._.editor.focusManager.add(n);this._.blurSet||(CKEDITOR.event.useCapture=!0,n.on("blur",function(n){this.allowBlur()&&n.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild&&(delete this._.returnFocus,this.hide())},this),n.on("focus",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)},this),CKEDITOR.event.useCapture=!1,this._.blurSet=1);h.onEscape=CKEDITOR.tools.bind(function(n){if(this.onEscape&&this.onEscape(n)===!1)return!1},this);CKEDITOR.tools.setTimeout(function(){var n=CKEDITOR.tools.bind(function(){var n,u;e.removeStyle("width");l.autoSize?(n=l.element.getDocument(),n=(CKEDITOR.env.webkit?l.element:n.getBody()).$.scrollWidth,CKEDITOR.env.ie&&CKEDITOR.env.quirks&&n>0&&(n=n+((e.$.offsetWidth||0)-(e.$.clientWidth||0)+3)),e.setStyle("width",n+10+"px"),n=l.element.$.scrollHeight,CKEDITOR.env.ie&&CKEDITOR.env.quirks&&n>0&&(n=n+((e.$.offsetHeight||0)-(e.$.clientHeight||0)+3)),e.setStyle("height",n+"px"),h._.currentBlock.element.setStyle("display","none").removeStyle("display")):e.removeStyle("height");c&&(o=o-e.$.offsetWidth);e.setStyle("left",o+"px");var t=h.element.getWindow(),n=e.$.getBoundingClientRect(),t=t.getViewPaneSize(),i=n.width||n.right-n.left,r=n.height||n.bottom-n.top,a=c?n.right:t.width-n.left,v=c?t.width-n.right:n.left;c?a<i&&(o=v>i?o+i:t.width>i?o-n.left:o-n.right+t.width):a<i&&(o=v>i?o-i:t.width>i?o-n.right+t.width:o-n.left);i=n.top;t.height-n.top<r&&(s=i>r?s-r:t.height>r?s-n.bottom+t.height:s-n.top);CKEDITOR.env.ie&&(t=n=new CKEDITOR.dom.element(e.$.offsetParent),t.getName()=="html"&&(t=t.getDocument().getBody()),t.getComputedStyle("direction")=="rtl"&&(o=CKEDITOR.env.ie8Compat?o-e.getDocument().getDocumentElement().$.scrollLeft*2:o-(n.$.scrollWidth-n.$.clientWidth)));n=e.getFirst();(u=n.getCustomData("activePanel"))&&u.onHide&&u.onHide.call(this,1);n.setCustomData("activePanel",this);e.setStyles({top:s+"px",left:o+"px"});e.setOpacity(1);f&&f()},this);h.isLoaded?n():h.onLoad=n;CKEDITOR.tools.setTimeout(function(){var n=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();l.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=n);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 n=CKEDITOR.document.getActive();n.equals(this._.iframe)||n.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var n=this._.iframe.getFrameDocument().getActive();n.is("a")&&(this._.lastFocused=n)},hide:function(n){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"),(n=n&&this._.returnFocus)&&(CKEDITOR.env.webkit&&n.type&&n.getWindow().$.focus(),n.focus()),delete this._.lastFocused,this._.editor.fire("panelHide",this))},allowBlur:function(n){var t=this._.panel;return void 0!=n&&(t.allowBlur=n),t.allowBlur},showAsChild:function(n,t,i,r,u,f){this._.activeChild==n&&n._.panel._.offsetParentId==i.getId()||(this.hideChild(),n.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=n,this._.focused=!1,n.showBlock(t,i,r,u,f),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){n.element.getChild(0).$.style.cssText+=""},100))},hideChild:function(n){var t=this._.activeChild;t&&(delete t.onHide,delete this._.activeChild,t.hide(),n&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var i=CKEDITOR.tools.isEmpty(CKEDITOR.instances),r,t;for(r in n)t=n[r],i?t.destroy():t.element.hide();i&&(n={})})}();CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(n){for(var u=n.config.menu_groups.split(","),i=n._.menuGroups={},r=n._.menuItems={},t=0;t<u.length;t++)i[u[t]]=t+1;n.addMenuGroup=function(n,t){i[n]=t||100};n.addMenuItem=function(n,t){i[t.group]&&(r[n]=new CKEDITOR.menuItem(this,n,t))};n.addMenuItems=function(n){for(var t in n)this.addMenuItem(t,n[t])};n.getMenuItem=function(n){return r[n]};n.removeMenuItem=function(n){delete r[n]}}}),function(){function t(n){n.sort(function(n,t){return n.group<t.group?-1:n.group>t.group?1:n.order<t.order?-1:n.order>t.order?1:0})}var n='<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}"';(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 n=n+(' 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;">'),i=CKEDITOR.addTemplate("menuItem",n+'<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>'),r=CKEDITOR.addTemplate("menuArrow",'<span class="cke_menuarrow"><span>{label}<\/span><\/span>');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(n,t){t=this._.definition=t||{};this.id=CKEDITOR.tools.getNextId();this.editor=n;this.items=[];this._.listeners=[];this._.level=t.level||1;var i=CKEDITOR.tools.extend({},t.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),r=i.block.attributes=i.attributes||{};r.role||(r.role="menu");this._.panelDefinition=i},_:{onShow:function(){var r=this.editor.getSelection(),e=r&&r.getStartElement(),o=this.editor.elementPath(),f=this._.listeners,t,i,u,n;for(this.removeAll(),t=0;t<f.length;t++)if(i=f[t](e,r,o),i)for(u in i)n=this.editor.getMenuItem(u),n&&(!n.command||this.editor.getCommand(n.command).state)&&(n.state=i[u],this.add(n))},onClick:function(n){this.hide();n.onClick?n.onClick():n.command&&this.editor.execCommand(n.command)},onEscape:function(n){var t=this.parent;return t?t._.panel.hideChild(1):27==n&&this.hide(1),!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(n){var t=this._.subMenu,i=this.items[n],u,r,f;if(i=i.getItems&&i.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(u in i)r=this.editor.getMenuItem(u),r&&(r.state=i[u],t.add(r));f=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+(""+n));setTimeout(function(){t.show(f,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(n){n.order||(n.order=this.items.length);this.items.push(n)},removeAll:function(){this.items=[]},show:function(n,i,r,u){var f,l;if(this.parent||(this._.onShow(),this.items.length)){var i=i||("rtl"==this.editor.lang.dir?2:1),h=this.items,s=this.editor,e=this._.panel,o=this._.element;e||(e=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level),e.onEscape=CKEDITOR.tools.bind(function(n){if(!1===this._.onEscape(n))return!1},this),e.onShow=function(){e._.panel.getHolderElement().getParent().addClass("cke cke_reset_all")},e.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this),o=e.addBlock(this.id,this._.panelDefinition.block),o.autoSize=!0,f=o.keys,f[40]="next",f[9]="next",f[38]="prev",f[CKEDITOR.SHIFT+9]="prev",f["rtl"==s.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click",f[32]=CKEDITOR.env.ie?"mouseup":"click",CKEDITOR.env.ie&&(f[13]="mouseup"),o=this._.element=o.element,f=o.getDocument(),f.getBody().setStyle("overflow","hidden"),f.getElementsByTag("html").getItem(0).setStyle("overflow","hidden"),this._.itemOverFn=CKEDITOR.tools.addFunction(function(n){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,s.config.menu_subMenuDelay||400,this,[n])},this),this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this),this._.itemClickFn=CKEDITOR.tools.addFunction(function(n){var t=this.items[n];if(t.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(t.getItems)this._.showSubMenu(n);else this._.onClick(t)},this));t(h);for(var f=s.elementPath(),f=['<div class="cke_menu'+(f&&f.direction()!=s.lang.dir?" cke_mixed_dir_content":"")+'" role="presentation">'],a=h.length,v=a&&h[0].group,c=0;c<a;c++)l=h[c],v!=l.group&&(f.push('<div class="cke_menuseparator" role="separator"><\/div>'),v=l.group),l.render(this,c,f);f.push("<\/div>");o.setHtml(f.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(e,this.id,n,i,r,u):e.showBlock(this.id,n,i,r,u);s.fire("menuShow",[e])}},addListener:function(n){this._.listeners.push(n)},hide:function(n){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(n)}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(n,t,i){CKEDITOR.tools.extend(this,i,{order:0,className:"cke_menubutton__"+t});this.group=n._.menuGroups[this.group];this.editor=n;this.name=t},proto:{render:function(n,t,u){var s=n.id+(""+t),e="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,h=e==CKEDITOR.TRISTATE_ON?"on":e==CKEDITOR.TRISTATE_DISABLED?"disabled":"off",o=this.getItems,c="&#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",f=this.name;this.icon&&!/\./.test(this.icon)&&(f=this.icon);n={id:s,name:this.name,iconName:f,label:this.label,cls:this.className||"",state:h,hasPopup:o?"true":"false",disabled:e==CKEDITOR.TRISTATE_DISABLED,title:this.label,href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:n._.itemOverFn,moveOutFn:n._.itemOutFn,clickFn:n._.itemClickFn,index:t,iconStyle:CKEDITOR.skin.getIconStyle(f,"rtl"==this.editor.lang.dir,f==this.icon?null:this.icon,this.iconOffset),arrowHtml:o?r.output({label:c}):""};i.output(n,u)}}})}();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(n){this.base.call(this,n,{panel:{className:"cke_menu_panel",attributes:{"aria-label":n.lang.contextmenu.options}}})},proto:{addTarget:function(n,t){var i,r,u;if(CKEDITOR.env.opera&&!("oncontextmenu"in document.body)){n.on("mousedown",function(r){if(r=r.data,2!=r.$.button)r.getKeystroke()==CKEDITOR.CTRL+1&&n.fire("contextmenu",r);else if(!t||!(CKEDITOR.env.mac?r.$.metaKey:r.$.ctrlKey)){var u=r.getTarget();i||(u=u.getDocument(),i=u.createElement("input"),i.$.type="button",u.getBody().append(i));i.setAttribute("style","position:absolute;top:"+(r.$.clientY-2)+"px;left:"+(r.$.clientX-2)+"px;width:5px;height:5px;opacity:0.01")}});n.on("mouseup",function(t){i&&(i.remove(),i=void 0,n.fire("contextmenu",t.data))})}n.on("contextmenu",function(n){if(n=n.data,!t||!(CKEDITOR.env.webkit?r:CKEDITOR.env.mac?n.$.metaKey:n.$.ctrlKey)){n.preventDefault();var i=n.getTarget().getDocument(),f=n.getTarget().getDocument().getDocumentElement(),u=!i.equals(CKEDITOR.document),i=i.getWindow().getScrollPosition(),e=u?n.$.clientX:n.$.pageX||i.x+n.$.clientX,o=u?n.$.clientY:n.$.pageY||i.y+n.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(f,null,e,o)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.opera)n.on("keypress",function(n){n=n.data;0===n.$.keyCode&&n.preventDefault()});if(CKEDITOR.env.webkit){u=function(){r=0};n.on("keydown",function(n){r=CKEDITOR.env.mac?n.data.$.metaKey:n.data.$.ctrlKey});n.on("keyup",u);n.on("contextmenu",u)}},open:function(n,t,i,r){this.editor.focus();n=n||CKEDITOR.document.getDocumentElement();this.editor.selectionChange(1);this.show(n,t,i,r)}}})},beforeInit:function(n){var t=n.contextMenu=new CKEDITOR.plugins.contextMenu(n);n.on("contentDom",function(){t.addTarget(n.editable(),!1!==n.config.browserContextMenuOnCtrl)});n.addCommand("contextMenu",{exec:function(){n.contextMenu.open(n.document.getBody())}});n.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");n.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}});CKEDITOR.plugins.add("resize",{init:function(n){var i,r,c,l,t=n.config,v=n.ui.spaceId("resizer"),u=n.element?n.element.getDirection(1):"ltr";if(t.resize_dir||(t.resize_dir="vertical"),void 0==t.resize_maxWidth&&(t.resize_maxWidth=3e3),void 0==t.resize_maxHeight&&(t.resize_maxHeight=3e3),void 0==t.resize_minWidth&&(t.resize_minWidth=750),void 0==t.resize_minHeight&&(t.resize_minHeight=250),!1!==t.resize_enabled){var f=null,e=("both"==t.resize_dir||"horizontal"==t.resize_dir)&&t.resize_minWidth!=t.resize_maxWidth,h=("both"==t.resize_dir||"vertical"==t.resize_dir)&&t.resize_minHeight!=t.resize_maxHeight,o=function(f){var o=i,s=r,a=o+(f.data.$.screenX-c)*("rtl"==u?-1:1),f=s+(f.data.$.screenY-l);e&&(o=Math.max(t.resize_minWidth,Math.min(a,t.resize_maxWidth)));h&&(s=Math.max(t.resize_minHeight,Math.min(f,t.resize_maxHeight)));n.resize(e?o:null,s)},s=function(){CKEDITOR.document.removeListener("mousemove",o);CKEDITOR.document.removeListener("mouseup",s);n.document&&(n.document.removeListener("mousemove",o),n.document.removeListener("mouseup",s))},a=CKEDITOR.tools.addFunction(function(u){f||(f=n.getResizable());i=f.$.offsetWidth||0;r=f.$.offsetHeight||0;c=u.screenX;l=u.screenY;t.resize_minWidth>i&&(t.resize_minWidth=i);t.resize_minHeight>r&&(t.resize_minHeight=r);CKEDITOR.document.on("mousemove",o);CKEDITOR.document.on("mouseup",s);n.document&&(n.document.on("mousemove",o),n.document.on("mouseup",s));u.preventDefault&&u.preventDefault()});n.on("destroy",function(){CKEDITOR.tools.removeFunction(a)});n.on("uiSpace",function(t){var i,r;"bottom"==t.data.space&&(i="",e&&!h&&(i=" cke_resizer_horizontal"),!e&&h&&(i=" cke_resizer_vertical"),r='<span id="'+v+'" class="cke_resizer'+i+" cke_resizer_"+u+'" title="'+CKEDITOR.tools.htmlEncode(n.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+a+', event)">'+("ltr"==u?"◢":"◣")+"<\/span>","ltr"==u&&"ltr"==i?t.data.html+=r:t.data.html=r+t.data.html)},n,null,100);n.on("maximize",function(t){n.ui.space("resizer")[t.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){var n='<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)&&(n+=' onkeypress="return false;"');CKEDITOR.env.gecko&&(n+=' onblur="this.style.cssText = this.style.cssText;"');var n=n+(' 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}"'),n=n+'>&nbsp;<\/span><span id="{id}_label" class="cke_button_label cke_button__{name}_label" aria-hidden="false">{label}<\/span>{arrowHtml}<\/a>',t=CKEDITOR.addTemplate("buttonArrow",'<span class="cke_button_arrow">'+(CKEDITOR.env.hc?"&#9660;":"")+"<\/span>"),i=CKEDITOR.addTemplate("button",n);CKEDITOR.plugins.add("button",{beforeInit:function(n){n.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(n){CKEDITOR.tools.extend(this,n,{title:n.label,click:n.click||function(t){t.execCommand(n.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(n){return new CKEDITOR.ui.button(n)}};CKEDITOR.ui.button.prototype={render:function(n,r){var o=CKEDITOR.env,c=this._.id=CKEDITOR.tools.getNextId(),l="",f=this.command,v,h,e,s;this._.editor=n;var u={id:c,button:this,editor:n,focus:function(){CKEDITOR.document.getById(c).focus()},execute:function(){this.button.click(n)},attach:function(n){this.button.attach(n)}},y=CKEDITOR.tools.addFunction(function(n){if(u.onkey)return n=new CKEDITOR.dom.event(n),!1!==u.onkey(u,n.getKeystroke())}),p=CKEDITOR.tools.addFunction(function(n){var t;return u.onfocus&&(t=!1!==u.onfocus(u,new CKEDITOR.dom.event(n))),CKEDITOR.env.gecko&&10900>CKEDITOR.env.version&&n.preventBubble(),t}),a=0,w=CKEDITOR.tools.addFunction(function(){if(CKEDITOR.env.opera){var t=n.editable();t.isInline()&&t.hasFocus&&(n.lockSelection(),a=1)}});if(u.clickFn=v=CKEDITOR.tools.addFunction(function(){a&&(n.unlockSelection(1),a=0);u.execute()}),this.modes){h={};e=function(){var t=n.mode;t&&(t=this.modes[t]?void 0!=h[t]?h[t]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,t=n.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:t,this.setState(t),this.refresh&&this.refresh())};n.on("beforeModeUnload",function(){n.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(h[n.mode]=this._.state)},this);n.on("activeFilterChange",e,this);n.on("mode",e,this);this.readOnly||n.on("readOnly",e,this)}else f&&(f=n.getCommand(f))&&(f.on("state",function(){this.setState(f.state)},this),l+=f.state==CKEDITOR.TRISTATE_ON?"on":f.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");if(this.directional)n.on("contentDirChanged",function(t){var i=CKEDITOR.document.getById(this._.id),r=i.getFirst(),t=t.data;t!=n.lang.dir?i.addClass("cke_"+t):i.removeClass("cke_ltr").removeClass("cke_rtl");r.setAttribute("style",CKEDITOR.skin.getIconStyle(s,"rtl"==t,this.icon,this.iconOffset))},this);return f||(l+="off"),s=e=this.name||this.command,this.icon&&!/\./.test(this.icon)&&(s=this.icon,this.icon=null),o={id:c,name:e,iconName:s,label:this.label,cls:this.className||"",state:l,title:this.title,titleJs:o.gecko&&10900<=o.version&&!o.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:y,mousedownFn:w,focusFn:p,clickFn:v,style:CKEDITOR.skin.getIconStyle(s,"rtl"==n.lang.dir,this.icon,this.iconOffset),arrowHtml:this.hasArrow?t.output():""},i.output(o,r),this.onRender&&this.onRender(),u},setState:function(n){if(this._.state==n)return!1;this._.state=n;var t=CKEDITOR.document.getById(this._.id);return t?(t.setState(n,"cke_button"),n==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled"),n==CKEDITOR.TRISTATE_ON?t.setAttribute("aria-pressed",!0):t.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(n){if(this._.feature)return this._.feature;var t=this;return this.allowedContent||this.requiredContent||!this.command||(t=n.getCommand(this.command)||t),this._.feature=t}};CKEDITOR.ui.prototype.addButton=function(n,t){this.add(n,CKEDITOR.UI_BUTTON,t)}}(),function(){function r(t){function f(){for(var i,r,s,h,c=e(),f=CKEDITOR.tools.clone(t.config.toolbarGroups)||n(t),o=0;o<f.length;o++)if(i=f[o],"/"!=i){if("string"==typeof i&&(i=f[o]={name:i}),s=i.groups,s)for(h=0;h<s.length;h++)r=s[h],(r=c[r])&&u(i,r);(r=c[i.name])&&u(i,r)}return f}function e(){var i={},u,n,r;for(u in t.ui.items)n=t.ui.items[u],r=n.toolbar||"others",r=r.split(","),n=r[0],r=parseInt(r[1]||-1,10),i[n]||(i[n]=[]),i[n].push({name:u,order:r});for(n in i)i[n]=i[n].sort(function(n,t){return n.order==t.order?0:0>t.order?-1:0>n.order?1:n.order<t.order?-1:1});return i}function u(n,r){if(r.length){n.items?n.items.push(t.ui.create("-")):n.items=[];for(var u;u=r.shift();)(u="string"==typeof u?u:u.name,i&&-1!=CKEDITOR.tools.indexOf(i,u))||(u=t.ui.create(u))&&t.addFeature(u)&&n.items.push(u)}}function o(n){for(var r=[],t,i,f=0;f<n.length;++f)t=n[f],i={},"/"==t?r.push(t):CKEDITOR.tools.isArray(t)?(u(i,CKEDITOR.tools.clone(t)),r.push(i)):t.items&&(u(i,CKEDITOR.tools.clone(t.items)),i.name=t.name,r.push(i));return r}var i=t.config.removeButtons,i=i&&i.split(","),r=t.config.toolbar;return"string"==typeof r&&(r=t.config["toolbar_"+r]),t.toolbar=r?o(r):f()}function n(n){return n._.toolbarGroups||(n._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},"/",{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var t=function(){this.toolbars=[];this.focusCommandExecuted=!1},i;t.prototype.focus=function(){for(var i,r,n,t=0;i=this.toolbars[t++];)for(r=0;n=i.items[r++];)if(n.focus){n.focus();return}};i={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(n){n.toolbox&&(n.toolbox.focusCommandExecuted=!0,CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){n.toolbox.focus()},100):n.toolbox.focus())}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(n){var u,f=function(t,i){var r,o="rtl"==n.lang.dir,e=n.config.toolbarGroupCycling,e=void 0===e||e;switch(i){case 9:case CKEDITOR.SHIFT+9:for(;!r||!r.items.length;)if(r=9==i?(r?r.next:t.toolbar.next)||n.toolbox.toolbars[0]:(r?r.previous:t.toolbar.previous)||n.toolbox.toolbars[n.toolbox.toolbars.length-1],r.items.length)for(t=r.items[u?r.items.length-1:0];t&&!t.focus;)(t=u?t.previous:t.next)||(r=0);return t&&t.focus(),!1;case o?37:39:case 40:r=t;do r=r.next,!r&&e&&(r=t.toolbar.items[0]);while(r&&!r.focus);return r?r.focus():f(t,9),!1;case o?39:37:case 38:r=t;do r=r.previous,!r&&e&&(r=t.toolbar.items[t.toolbar.items.length-1]);while(r&&!r.focus);return r?r.focus():(u=1,f(t,CKEDITOR.SHIFT+9),u=0),!1;case 27:return n.focus(),!1;case 13:case 32:return t.execute(),!1}return!0};n.on("uiSpace",function(i){var s,e,y,h,b,p,a,nt,v,k;if(i.data.space==n.config.toolbarLocation){i.removeListener();n.toolbox=new t;var c=CKEDITOR.tools.getNextId(),u=['<span id="',c,'" class="cke_voice_label">',n.lang.toolbar.toolbars,"<\/span>",'<span id="'+n.ui.spaceId("toolbox")+'" class="cke_toolbox" role="group" aria-labelledby="',c,'" onmousedown="return false;">'],c=!1!==n.config.toolbarStartupExpanded,o,l;n.config.toolbarCanCollapse&&n.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&u.push('<span class="cke_toolbox_main"'+(c?">":' style="display:none">'));for(var d=n.toolbox.toolbars,g=r(n),w=0;w<g.length;w++)if(e=0,h=g[w],h)if(o&&(u.push("<\/span>"),l=o=0),"/"===h)u.push('<span class="cke_toolbar_break"><\/span>');else{for(b=h.items||h,p=0;p<b.length;p++)a=b[p],a&&(a.type==CKEDITOR.UI_SEPARATOR?l=o&&a:(nt=!1!==a.canGroup,e||(s=CKEDITOR.tools.getNextId(),e={id:s,items:[]},y=h.name&&(n.lang.toolbar.toolbarGroups[h.name]||h.name),u.push('<span id="',s,'" class="cke_toolbar"',y?' aria-labelledby="'+s+'_label"':"",' role="toolbar">'),y&&u.push('<span id="',s,'_label" class="cke_voice_label">',y,"<\/span>"),u.push('<span class="cke_toolbar_start"><\/span>'),v=d.push(e)-1,0<v&&(e.previous=d[v-1],e.previous.next=e)),nt?o||(u.push('<span class="cke_toolgroup" role="presentation">'),o=1):o&&(u.push("<\/span>"),o=0),s=function(t){t=t.render(n,u);v=e.items.push(t)-1;v>0&&(t.previous=e.items[v-1],t.previous.next=t);t.toolbar=e;t.onkey=f;t.onfocus=function(){n.toolbox.focusCommandExecuted||n.focus()}},l&&(s(l),l=0),s(a)));o&&(u.push("<\/span>"),l=o=0);e&&u.push('<span class="cke_toolbar_end"><\/span><\/span>')}if(n.config.toolbarCanCollapse&&u.push("<\/span>"),n.config.toolbarCanCollapse&&n.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){k=CKEDITOR.tools.addFunction(function(){n.execCommand("toolbarCollapse")});n.on("destroy",function(){CKEDITOR.tools.removeFunction(k)});n.addCommand("toolbarCollapse",{readOnly:1,exec:function(n){var t=n.ui.space("toolbar_collapser"),i=t.getPrevious(),r=n.ui.space("contents"),u=i.getParent(),e=parseInt(r.$.style.height,10),o=u.$.offsetHeight,f=t.hasClass("cke_toolbox_collapser_min");f?(i.show(),t.removeClass("cke_toolbox_collapser_min"),t.setAttribute("title",n.lang.toolbar.toolbarCollapse)):(i.hide(),t.addClass("cke_toolbox_collapser_min"),t.setAttribute("title",n.lang.toolbar.toolbarExpand));t.getFirst().setText(f?"▲":"◀");r.setStyle("height",e-(u.$.offsetHeight-o)+"px");n.fire("resize")},modes:{wysiwyg:1,source:1}});n.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");u.push('<a title="'+(c?n.lang.toolbar.toolbarCollapse:n.lang.toolbar.toolbarExpand)+'" id="'+n.ui.spaceId("toolbar_collapser")+'" tabIndex="-1" class="cke_toolbox_collapser');c||u.push(" cke_toolbox_collapser_min");u.push('" onclick="CKEDITOR.tools.callFunction('+k+')">','<span class="cke_arrow">&#9650;<\/span>',"<\/a>")}u.push("<\/span>");i.data.html+=u.join("")}});n.on("destroy",function(){if(this.toolbox)for(var r=0,t,u,n,i=this.toolbox.toolbars;r<i.length;r++)for(u=i[r].items,t=0;t<u.length;t++)n=u[t],n.clickFn&&CKEDITOR.tools.removeFunction(n.clickFn),n.keyDownFn&&CKEDITOR.tools.removeFunction(n.keyDownFn)});n.on("uiReady",function(){var t=n.ui.space("toolbox");t&&n.focusManager.add(t,1)});n.addCommand("toolbarFocus",i);n.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");n.ui.add("-",CKEDITOR.UI_SEPARATOR,{});n.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(n,t){return t.push('<span class="cke_toolbar_separator" role="separator"><\/span>'),{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(t,i,r){var u=n(this.editor),f=0===i,e={name:t};if(r){if(r=CKEDITOR.tools.search(u,function(n){return n.name==r})){if(r.groups||(r.groups=[]),i&&(i=CKEDITOR.tools.indexOf(r.groups,i),0<=i)){r.groups.splice(i+1,0,t);return}f?r.groups.splice(0,0,t):r.groups.push(t);return}i=null}i&&(i=CKEDITOR.tools.indexOf(u,function(n){return n.name==i}));f?u.splice(0,0,t):"number"==typeof i?u.splice(i+1,0,e):u.push(t)}}();CKEDITOR.UI_SEPARATOR="separator";CKEDITOR.config.toolbarLocation="top",function(){function u(t,u){function s(n){if(n=f.list[n],n.equals(t.editable())||"true"==n.getAttribute("contenteditable")){var i=t.createRange();i.selectNodeContents(n);i.select()}else t.getSelection().selectElement(n);t.focus()}function h(){e&&e.setHtml(n);delete f.list}var o=t.ui.spaceId("path"),e,f=t._.elementsPath,a=f.idBase,c,l;u.html+='<span id="'+o+'_label" class="cke_voice_label">'+t.lang.elementspath.eleLabel+'<\/span><span id="'+o+'" class="cke_path" role="group" aria-labelledby="'+o+'_label">'+n+"<\/span>";t.on("uiReady",function(){var n=t.ui.space("path");n&&t.focusManager.add(n,1)});f.onClick=s;c=CKEDITOR.tools.addFunction(s);l=CKEDITOR.tools.addFunction(function(n,i){var u=f.idBase,r,i=new CKEDITOR.dom.event(i);r="rtl"==t.lang.dir;switch(i.getKeystroke()){case r?39:37:case 9:return(r=CKEDITOR.document.getById(u+(n+1)))||(r=CKEDITOR.document.getById(u+"0")),r.focus(),!1;case r?37:39:case CKEDITOR.SHIFT+9:return(r=CKEDITOR.document.getById(u+(n-1)))||(r=CKEDITOR.document.getById(u+(f.list.length-1))),r.focus(),!1;case 27:return t.focus(),!1;case 13:case 32:return s(n),!1}return!0});t.on("selectionChange",function(){var u,p,w,b;t.editable();for(var k=[],y=f.list=[],h=[],s=f.filters,v=!0,d=t.elementPath().elements,i,g=d.length;g--;){for(u=d[g],p=0,i=u.data("cke-display-name")?u.data("cke-display-name"):u.data("cke-real-element-type")?u.data("cke-real-element-type"):u.getName(),v=u.hasAttribute("contenteditable")?"true"==u.getAttribute("contenteditable"):v,v||u.hasAttribute("contenteditable")||(p=1),w=0;w<s.length;w++){if(b=s[w](u,i),!1===b){p=1;break}i=b||i}p||(y.unshift(u),h.unshift(i))}for(y=y.length,s=0;s<y;s++)i=h[s],v=t.lang.elementspath.eleTitle.replace(/%1/,i),i=r.output({id:a+s,label:v,text:i,jsTitle:"javascript:void('"+i+"')",index:s,keyDownFn:l,clickFn:c}),k.unshift(i);e||(e=CKEDITOR.document.getById(o));h=e;h.setHtml(k.join("")+n);t.fire("elementsPathUpdate",{space:h})});t.on("readOnly",h);t.on("contentDomUnload",h);t.addCommand("elementsPathFocus",i);t.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}var i,n,t,r;i={editorFocus:!1,readOnly:1,exec:function(n){(n=CKEDITOR.document.getById(n._.elementsPath.idBase+"0"))&&n.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}};n='<span class="cke_path_empty">&nbsp;<\/span>';t="";(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)&&(t+=' onkeypress="return false;"');CKEDITOR.env.gecko&&(t+=' onblur="this.style.cssText = this.style.cssText;"');r=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();"':"")+t+' 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){n._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",filters:[]};n.on("uiSpace",function(t){"bottom"==t.data.space&&u(n,t.data)})}})}(),function(){function n(n,t,i){i=n.config.forceEnterMode||i;"wysiwyg"==n.mode&&(t||(t=n.activeEnterMode),n.elementPath().isContextFor("p")||(t=CKEDITOR.ENTER_BR,i=1),n.fire("saveSnapshot"),t==CKEDITOR.ENTER_BR?f(n,t,null,i):e(n,t,null,i),n.fire("saveSnapshot"))}function t(n){for(var n=n.getSelection().getRanges(!0),t=n.length-1;0<t;t--)n[t].deleteContents();return n[0]}var i,r;CKEDITOR.plugins.add("enterkey",{init:function(t){t.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(t){n(t)}});t.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(t){n(t,t.activeShiftEnterMode,1)}});t.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});i=CKEDITOR.dom.walker.whitespaces();r=CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(n,u,e,s){if(e=e||t(n)){var a=e.document,y=e.checkStartOfBlock(),v=e.checkEndOfBlock(),h=n.elementPath(e.startContainer).block,p=u==CKEDITOR.ENTER_DIV?"div":"p",c;if(y&&v){if(h&&(h.is("li")||h.getParent().is("li"))){e=h.getParent();c=e.getParent();var s=!h.hasPrevious(),w=!h.hasNext(),p=n.getSelection(),l=p.createBookmarks(),y=h.getDirection(1),v=h.getAttribute("class"),b=h.getAttribute("style"),k=c.getDirection(1)!=y,n=n.enterMode!=CKEDITOR.ENTER_BR||k||b||v;if(c.is("li"))s||w?h[s?"insertBefore":"insertAfter"](c):h.breakParent(c);else{if(n)(c=a.createElement(u==CKEDITOR.ENTER_P?"p":"div"),k&&c.setAttribute("dir",y),b&&c.setAttribute("style",b),v&&c.setAttribute("class",v),h.moveChildren(c),s||w)?c[s?"insertBefore":"insertAfter"](e):(h.breakParent(e),c.insertAfter(e));else if(h.appendBogus(!0),s||w)for(;a=h[s?"getFirst":"getLast"]();)a[s?"insertBefore":"insertAfter"](e);else for(h.breakParent(e);a=h.getLast();)a.insertAfter(e);h.remove()}p.selectBookmarks(l);return}if(h&&h.getParent().is("blockquote")){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();e.moveToElementEditStart(h);e.select();return}}else if(h&&h.is("pre")&&!v){f(n,u,e,s);return}if(v=e.splitBlock(p)){if(u=v.previousBlock,h=v.nextBlock,n=v.wasStartOfBlock,y=v.wasEndOfBlock,h?(l=h.getParent(),l.is("li")&&(h.breakParent(l),h.move(h.getNext(),1))):u&&(l=u.getParent())&&l.is("li")&&(u.breakParent(l),l=u.getNext(),e.moveToElementEditStart(l),u.move(u.getPrevious())),n||y){if(u?!u.is("li")&&(o.test(u.getName())||u.is("pre"))||(c=u.clone()):h&&(c=h.clone()),c?s&&!c.is("li")&&c.renameNode(p):l&&l.is("li")?c=l:(c=a.createElement(p),u&&(w=u.getDirection())&&c.setAttribute("dir",w)),a=v.elementPath)for(s=0,p=a.elements.length;s<p;s++){if(l=a.elements[s],l.equals(a.block)||l.equals(a.blockLimit))break;CKEDITOR.dtd.$removeEmpty[l.getName()]&&(l=l.clone(),c.moveChildren(l),c.append(l))}c.appendBogus();c.getParent()||e.insertNode(c);c.is("li")&&c.removeAttribute("value");CKEDITOR.env.ie&&n&&(!y||!u.getChildCount())&&(e.moveToElementEditStart(y?u:c),e.select());e.moveToElementEditStart(n&&!y?h:c)}else h.is("li")&&(c=e.clone(),c.selectNodeContents(h),c=new CKEDITOR.dom.walker(c),c.evaluator=function(n){return!(r(n)||i(n)||n.type==CKEDITOR.NODE_ELEMENT&&n.getName()in CKEDITOR.dtd.$inline&&!(n.getName()in CKEDITOR.dtd.$empty))},(l=c.next())&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?a.createElement("br"):a.createText(" ")).insertBefore(l)),h&&e.moveToElementEditStart(h);e.select();e.scrollIntoView()}}},enterBr:function(n,i,r,u){if(r=r||t(n)){var s=r.document,c=r.checkEndOfBlock(),h=new CKEDITOR.dom.elementPath(n.getSelection().getStartElement()),f=h.block,h=f&&h.block.getName();!u&&"li"==h?e(n,i,r,u):(!u&&c&&o.test(h)?(c=f.getDirection())?(s=s.createElement("div"),s.setAttribute("dir",c),s.insertAfter(f),r.setStart(s,0)):(s.createElement("br").insertAfter(f),CKEDITOR.env.gecko&&s.createText("").insertAfter(f),r.setStartAt(f.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(f="pre"==h&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?s.createText("\r"):s.createElement("br"),r.deleteContents(),r.insertNode(f),CKEDITOR.env.needsBrFiller?(s.createText("﻿").insertAfter(f),c&&f.getParent().appendBogus(),f.getNext().$.nodeValue="",r.setStartAt(f.getNext(),CKEDITOR.POSITION_AFTER_START)):r.setStartAt(f,CKEDITOR.POSITION_AFTER_END)),r.collapse(!0),r.select(),r.scrollIntoView())}}};var u=CKEDITOR.plugins.enterkey,f=u.enterBr,e=u.enterBlock,o=/^h[1-6]$/}(),function(){function n(n,t){var r={},u=[],o={nbsp:" ",shy:"­",gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},n=n.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(n,i){var f=t?"&"+i+";":o[i];return r[f]=t?o[i]:"&"+i+";",u.push(f),""}),i,f,e;if(!t&&n)for(n=n.split(","),i=document.createElement("div"),i.innerHTML="&"+n.join(";&")+";",f=i.innerHTML,i=null,i=0;i<f.length;i++)e=f.charAt(i),r[e]="&"+n[i]+";",u.push(e);return r.regex=u.join(t?"|":""),r}CKEDITOR.plugins.add("entities",{afterInit:function(t){var i=t.config,r,u,f;if(t=(t=t.dataProcessor)&&t.htmlFilter){r=[];!1!==i.basicEntities&&r.push("nbsp,gt,lt,amp");i.entities&&(r.length&&r.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"),i.entities_latin&&r.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"),i.entities_greek&&r.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"),i.entities_additional&&r.push(i.entities_additional));u=n(r.join(","));f=u.regex?"["+u.regex+"]":"a^";delete u.regex;i.entities&&i.entities_processNumerical&&(f="[^ -~]|"+f);var f=RegExp(f,"g"),o=function(n){return i.entities_processNumerical=="force"||!u[n]?"&#"+n.charCodeAt(0)+";":u[n]},e=n("nbsp,gt,lt,amp,shy",!0),s=RegExp(e.regex,"g"),h=function(n){return e[n]};t.addRules({text:function(n){return n.replace(s,h).replace(f,o)}})}}})}();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(n,t,i,r){t=t||"80%";i=i||"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 i&&1<i.length&&"%"==i.substr(i.length-1,1)&&(i=parseInt(window.screen.height*parseInt(i,10)/100,10));640>t&&(t=640);420>i&&(i=420);var f=parseInt((window.screen.height-i)/2,10),e=parseInt((window.screen.width-t)/2,10),r=(r||"location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes")+",width="+t+",height="+i+",top="+f+",left="+e,u=window.open("",null,r,!0);if(!u)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(u.moveTo(e,f),u.resizeTo(t,i));u.focus();u.location.href=n}catch(o){window.open(n,null,r,!0)}return!0}}),function(){function t(n,t){var r=[],i;if(t)for(i in t)r.push(i+"="+encodeURIComponent(t[i]));else return n;return n+(-1!=n.indexOf("?")?"&":"?")+r.join("&")}function n(n){return n+="",n.charAt(0).toUpperCase()+n.substr(1)}function u(){var u=this.getDialog(),i=u.getParentEditor();i._.filebrowserSe=this;var f=i.config["filebrowser"+n(u.getName())+"WindowWidth"]||i.config.filebrowserWindowWidth||"80%",u=i.config["filebrowser"+n(u.getName())+"WindowHeight"]||i.config.filebrowserWindowHeight||"70%",r=this.filebrowser.params||{};r.CKEditor=i.name;r.CKEditorFuncNum=i._.filebrowserFn;r.langCode||(r.langCode=i.langCode);r=t(this.filebrowser.url,r);i.popup(r,f,u,i.config.filebrowserWindowFeatures||i.config.fileBrowserWindowFeatures)}function f(){var n=this.getDialog();return n.getParentEditor()._.filebrowserSe=this,!n.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value||!n.getContentElement(this["for"][0],this["for"][1]).getAction()?!1:!0}function e(n,i,r){var u=r.params||{};u.CKEditor=n.name;u.CKEditorFuncNum=n._.filebrowserFn;u.langCode||(u.langCode=n.langCode);i.action=t(r.url,u);i.filebrowser=r}function i(t,r,o,s){var h,l,c,a;if(s&&s.length)for(l=s.length;l--;)(h=s[l],("hbox"==h.type||"vbox"==h.type||"fieldset"==h.type)&&i(t,r,o,h.children),h.filebrowser)&&(("string"==typeof h.filebrowser&&(h.filebrowser={action:"fileButton"==h.type?"QuickUpload":"Browse",target:h.filebrowser}),"Browse"==h.filebrowser.action)?(c=h.filebrowser.url,void 0===c&&(c=t.config["filebrowser"+n(r)+"BrowseUrl"],void 0===c&&(c=t.config.filebrowserBrowseUrl)),c&&(h.onClick=u,h.filebrowser.url=c,h.hidden=!1)):"QuickUpload"==h.filebrowser.action&&h["for"]&&(c=h.filebrowser.url,void 0===c&&(c=t.config["filebrowser"+n(r)+"UploadUrl"],void 0===c&&(c=t.config.filebrowserUploadUrl)),c)&&(a=h.onClick,h.onClick=function(n){var t=n.sender;return a&&a.call(t,n)===!1?!1:f.call(t,n)},h.filebrowser.url=c,h.hidden=!1,e(t,o.getContents(h["for"][0]).get(h["for"][1]),h.filebrowser)))}function r(n,t,i){if(-1!==i.indexOf(";")){for(var i=i.split(";"),u=0;u<i.length;u++)if(r(n,t,i[u]))return!0;return!1}return(n=n.getContents(t).get(i).filebrowser)&&n.url}function o(n,t){var r=this._.filebrowserSe.getDialog(),i=this._.filebrowserSe["for"],u=this._.filebrowserSe.filebrowser.onSelect;i&&r.getContentElement(i[0],i[1]).reset();"function"==typeof t&&!1===t.call(this._.filebrowserSe)||u&&!1===u.call(this._.filebrowserSe,n,t)||!("string"==typeof t&&t&&alert(t),n&&(i=this._.filebrowserSe,r=i.getDialog(),i=i.filebrowser.target||null))||(i=i.split(":"),u=r.getContentElement(i[0],i[1]))&&(u.setValue(n),r.selectPage(i[0]))}CKEDITOR.plugins.add("filebrowser",{requires:"popup",init:function(n){n._.filebrowserFn=CKEDITOR.tools.addFunction(o,n);n.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}});CKEDITOR.on("dialogDefinition",function(n){for(var u=n.data.definition,t,f=0;f<u.contents.length;++f)(t=u.contents[f])&&(i(n.editor,n.data.name,u,t.elements),t.hidden&&t.filebrowser&&(t.hidden=!r(u,t.id,t.filebrowser)))})}(),function(){function i(i){var e=i.config,s=i.fire("uiSpace",{space:"top",html:""}).html,o=function(){function v(n,i,r){u.setStyle(i,t(r));u.setStyle("position",n)}function c(n){var t=y.getDocumentPosition();switch(n){case"top":v("absolute","top",t.y-l-a);break;case"pin":v("fixed","top",k);break;case"bottom":v("absolute","top",t.y+(r.height||r.bottom-r.top)+a)}s=n}var s,y,h,r,f,l,p,w=e.floatSpaceDockedOffsetX||0,a=e.floatSpaceDockedOffsetY||0,b=e.floatSpacePinnedOffsetX||0,k=e.floatSpacePinnedOffsetY||0;return function(e){if(y=i.editable())if(e&&"focus"==e.name&&u.show(),u.removeStyle("left"),u.removeStyle("right"),h=u.getClientRect(),r=y.getClientRect(),f=n.getViewPaneSize(),l=h.height,p="pageXOffset"in n.$?n.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft,s){l+a<=r.top?c("top"):l+a>f.height-r.bottom?c("pin"):c("bottom");var e=f.width/2,e=0<r.left&&r.right<f.width&&r.width>h.width?"rtl"==i.config.contentsLangDirection?"right":"left":e-r.left>r.right-e?"left":"right",v;h.width>f.width?(e="left",v=0):(v="left"==e?0<r.left?r.left:0:r.right<f.width?f.width-r.right:0,v+h.width>f.width&&(e="left"==e?"right":"left",v=0));u.setStyle(e,t(("pin"==s?b:w)+v+("pin"==s?0:"left"==e?p:-p)))}else s="pin",c("pin"),o(e)}}();if(s){var u=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(r.output({content:s,id:i.id,langDir:i.lang.dir,langCode:i.langCode,name:i.name,style:"display:none;z-index:"+(e.baseFloatZIndex-1),topId:i.ui.spaceId("top"),voiceLabel:i.lang.editorPanel+", "+i.name}))),h=CKEDITOR.tools.eventsBuffer(500,o),f=CKEDITOR.tools.eventsBuffer(100,o);u.unselectable();u.on("mousedown",function(n){n=n.data;n.getTarget().hasAscendant("a",1)||n.preventDefault()});i.on("focus",function(t){o(t);i.on("change",h.input);n.on("scroll",f.input);n.on("resize",f.input)});i.on("blur",function(){u.hide();i.removeListener("change",h.input);n.removeListener("scroll",f.input);n.removeListener("resize",f.input)});i.on("destroy",function(){n.removeListener("scroll",f.input);n.removeListener("resize",f.input);u.clearCustomData();u.remove()});i.focusManager.hasFocus&&u.show();i.focusManager.add(u,1)}}var r=CKEDITOR.addTemplate("floatcontainer",'<div id="cke_{name}" class="cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir="{langDir}" title="'+(CKEDITOR.env.gecko?" ":"")+'" lang="{langCode}" role="application" style="{style}" aria-labelledby="cke_{name}_arialbl"><span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}<\/span><div class="cke_inner"><div id="{topId}" class="cke_top" role="presentation">{content}<\/div><\/div><\/div>'),n=CKEDITOR.document.getWindow(),t=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(n){n.on("loaded",function(){i(this)},null,null,20)}})}();CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var n=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>'),i=CKEDITOR.addTemplate("panel-list-group",'<h1 id="{id}" class="cke_panel_grouptitle" role="presentation" >{label}<\/h1>');CKEDITOR.ui.panel.prototype.addListBlock=function(n,t){return this.addBlock(n,new CKEDITOR.ui.listBlock(this.getHolderElement(),t))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(n,t){var t=t||{},i=t.attributes||(t.attributes={});(this.multiSelect=!!t.multiSelect)&&(i["aria-multiselectable"]=!0);i.role||(i.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",i.role);i=this.keys;i[40]="next";i[9]="next";i[38]="prev";i[CKEDITOR.SHIFT+9]="prev";i[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(i[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var t=n.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(n){var t=this.toggle(n);if(this.onClick)this.onClick(n,t)},this)),this._.click}},proto:{add:function(n,i,r){var u=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[n]=u;n={id:u,val:n,onclick:CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:r||n,text:i||n};this._.pendingList.push(t.output(n))},startGroup:function(n){this._.close();var t=CKEDITOR.tools.getNextId();this._.groups[n]=t;this._.pendingHtml.push(i.output({id:t,label:n}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(n){var t=this.isMarked(n);return t?this.unmark(n):this.mark(n),!t},hideGroup:function(n){var t=(n=this.element.getDocument().getById(this._.groups[n]))&&n.getNext();n&&(n.setStyle("display","none"),t&&"ul"==t.getName()&&t.setStyle("display","none"))},hideItem:function(n){this.element.getDocument().getById(this._.items[n]).setStyle("display","none")},showAll:function(){var t=this._.items,i=this._.groups,r=this.element.getDocument(),n,u;for(n in t)r.getById(t[n]).setStyle("display","");for(u in i)t=r.getById(i[u]),n=t.getNext(),t.setStyle("display",""),n&&"ul"==n.getName()&&n.setStyle("display","")},mark:function(n){this.multiSelect||this.unmarkAll();var n=this._.items[n],t=this.element.getDocument().getById(n);t.addClass("cke_selected");this.element.getDocument().getById(n+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(t)},unmark:function(n){var t=this.element.getDocument(),n=this._.items[n],i=t.getById(n);i.removeClass("cke_selected");t.getById(n+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(i)},unmarkAll:function(){var t=this._.items,i=this.element.getDocument(),r,n;for(r in t)n=t[r],i.getById(n).removeClass("cke_selected"),i.getById(n+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark()},isMarked:function(n){return this.element.getDocument().getById(this._.items[n]).hasClass("cke_selected")},focus:function(n){this._.focusIndex=-1;var r=this.element.getElementsByTag("a"),t,i=-1;if(n){for(t=this.element.getDocument().getById(this._.items[n]).getFirst();n=r.getItem(++i);)if(n.equals(t)){this._.focusIndex=i;break}}else this.element.focus();t&&setTimeout(function(){t.focus()},0)}}})}});CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(n){n.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var n='<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"',t;(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)&&(n+=' onkeypress="return false;"');CKEDITOR.env.gecko&&(n+=' onblur="this.style.cssText = this.style.cssText;"');n=n+(' 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",n);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(n){CKEDITOR.tools.extend(this,n,{canGroup:!1,title:n.label,modes:{wysiwyg:1},editorFocus:1});n=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=n.parent&&n.parent.getDocument()||CKEDITOR.document;n.className="cke_combopanel";n.block={multiSelect:n.multiSelect,attributes:n.attributes};n.toolbarRelated=!0;this._={panelDefinition:n,items:{}}},proto:{renderHtml:function(n){var t=[];return this.render(n,t),t.join("")},render:function(n,i){function e(){var t=this.modes[n.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;n.readOnly&&!this.readOnly&&(t=CKEDITOR.TRISTATE_DISABLED);this.setState(t);this.setValue("");t!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}var u=CKEDITOR.env,o="cke_"+this.id,s=CKEDITOR.tools.addFunction(function(t){h&&(n.unlockSelection(1),h=0);r.execute(t)},this),f=this,r={id:o,combo:this,focus:function(){CKEDITOR.document.getById(o).getChild(1).focus()},execute:function(t){var i=f._,r;i.state!=CKEDITOR.TRISTATE_DISABLED&&((f.createPanel(n),i.on)?i.panel.hide():(f.commit(),r=f.getValue(),r?i.list.mark(r):i.list.unmarkAll(),i.panel.showBlock(f.id,new CKEDITOR.dom.element(t),4)))},clickFn:s};n.on("activeFilterChange",e,this);n.on("mode",e,this);this.readOnly||n.on("readOnly",e,this);var c=CKEDITOR.tools.addFunction(function(n,t){var n=new CKEDITOR.dom.event(n),i=n.getKeystroke();switch(i){case 13:case 32:case 40:CKEDITOR.tools.callFunction(s,t);break;default:r.onkey(r,i)}n.preventDefault()}),l=CKEDITOR.tools.addFunction(function(){r.onfocus&&r.onfocus()}),h=0,a=CKEDITOR.tools.addFunction(function(){if(CKEDITOR.env.opera){var t=n.editable();t.isInline()&&t.hasFocus&&(n.lockSelection(),h=1)}});return r.keyDownFn=c,u={id:o,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:u.gecko&&10900<=u.version&&!u.hc?"":(this.title||"").replace("'",""),keydownFn:c,mousedownFn:a,focusFn:l,clickFn:s},t.output(u,i),this.onRender&&this.onRender(),r},createPanel:function(n){if(!this._.panel){var u=this._.panelDefinition,e=this._.panelDefinition.block,o=u.parent||CKEDITOR.document.getBody(),f="cke_combopanel__"+this.name,i=new CKEDITOR.ui.floatPanel(n,o,u),r=i.addListBlock(this.id,e),t=this;i.onShow=function(){this.element.addClass(f);t.setState(CKEDITOR.TRISTATE_ON);t._.on=1;t.editorFocus&&!n.focusManager.hasFocus&&n.focus();t.onOpen&&t.onOpen();n.once("panelShow",function(){r.focus(!r.multiSelect&&t.getValue())})};i.onHide=function(i){this.element.removeClass(f);t.setState(t.modes&&t.modes[n.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);t._.on=0;!i&&t.onClose&&t.onClose()};i.onEscape=function(){i.hide(1)};r.onClick=function(n,r){t.onClick&&t.onClick.call(t,n,r);i.hide()};this._.panel=i;this._.list=r;i.getBlock(this.id).onHide=function(){t._.on=0;t.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(n,t){this._.value=n;var i=this.document.getById("cke_"+this.id+"_text");i&&(!n&&!t?(t=this.label,i.addClass("cke_combo_inlinelabel")):i.removeClass("cke_combo_inlinelabel"),i.setText("undefined"!=typeof t?t:n))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(n){this._.list.mark(n)},hideItem:function(n){this._.list.hideItem(n)},hideGroup:function(n){this._.list.hideGroup(n)},showAll:function(){this._.list.showAll()},add:function(n,t,i){this._.items[n]=i||n;this._.list.add(n,t,i)},startGroup:function(n){this._.list.startGroup(n)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));this._.committed=1},setState:function(n){if(this._.state!=n){var t=this.document.getById("cke_"+this.id);t.setState(n,"cke_combo");n==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled");this._.state=n}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},statics:{handler:{create:function(n){return new CKEDITOR.ui.richCombo(n)}}}});CKEDITOR.ui.prototype.addRichCombo=function(n,t){this.add(n,CKEDITOR.UI_RICHCOMBO,t)}}();CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(n){var r,u;if(!n.blockless){for(var f=n.config,i=n.lang.format,o=f.format_tags.split(";"),t={},s=0,h=[],e=0;e<o.length;e++)r=o[e],u=new CKEDITOR.style(f["format_"+r]),(!n.filter.customConfig||n.filter.check(u))&&(s++,t[r]=u,t[r]._.enterMode=n.config.enterMode,h.push(u));0!==s&&n.ui.addRichCombo("Format",{label:i.label,title:i.panelTitle,toolbar:"styles,20",allowedContent:h,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(f.contentsCss),multiSelect:!1,attributes:{"aria-label":i.panelTitle}},init:function(){var n,r;this.startGroup(i.panelTitle);for(n in t)r=i["tag_"+n],this.add(n,t[n].buildPreview(r),r)},onClick:function(i){n.focus();n.fire("saveSnapshot");var i=t[i],r=n.elementPath();n[i.checkActive(r)?"removeStyle":"applyStyle"](i);setTimeout(function(){n.fire("saveSnapshot")},0)},onRender:function(){n.on("selectionChange",function(i){var u=this.getValue(),i=i.data.path,r;this.refresh();for(r in t)if(t[r].checkActive(i)){r!=u&&this.setValue(r,n.lang.format["tag_"+r]);return}this.setValue("")},this)},onOpen:function(){this.showAll();for(var i in t)n.activeFilter.check(t[i])||this.hideItem(i)},refresh:function(){var i=n.elementPath(),r;if(i){if(i.isContextFor("p"))for(r in t)if(n.activeFilter.check(t[r]))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}}})}}});CKEDITOR.config.format_tags="p;h1;h2;h3;h4;h5;h6;pre;address;div";CKEDITOR.config.format_p={element:"p"};CKEDITOR.config.format_div={element:"div"};CKEDITOR.config.format_pre={element:"pre"};CKEDITOR.config.format_address={element:"address"};CKEDITOR.config.format_h1={element:"h1"};CKEDITOR.config.format_h2={element:"h2"};CKEDITOR.config.format_h3={element:"h3"};CKEDITOR.config.format_h4={element:"h4"};CKEDITOR.config.format_h5={element:"h5"};CKEDITOR.config.format_h6={element:"h6"},function(){var n={canUndo:!1,exec:function(n){var t=n.document.createElement("hr");n.insertElement(t)},allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",{init:function(t){t.blockless||(t.addCommand("horizontalrule",n),t.ui.addButton&&t.ui.addButton("HorizontalRule",{label:t.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"}))}})}();CKEDITOR.plugins.add("htmlwriter",{init:function(n){var t=new CKEDITOR.htmlWriter;t.forceSimpleAmpersand=n.config.forceSimpleAmpersand;t.indentationChars=n.config.dataIndentationChars||"\t";n.dataProcessor.writer=t}});CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base();this.indentationChars="\t";this.selfClosingEnd=" />";this.lineBreakChars="\n";this.sortAttributes=1;this._.indent=0;this._.indentation="";this._.inPre=0;this._.rules={};var n=CKEDITOR.dtd,t;for(t in CKEDITOR.tools.extend({},n.$nonBodyContent,n.$block,n.$listItem,n.$tableContent))this.setRules(t,{indent:!n[t]["#"],breakBeforeOpen:1,breakBeforeClose:!n[t]["#"],breakAfterClose:1,needsSpace:t in n.$block&&!(t 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(n){var t=this._.rules[n];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("<",n);this._.afterCloser=0},openTagClose:function(n,t){var i=this._.rules[n];t?(this._.output.push(this.selfClosingEnd),i&&i.breakAfterClose&&(this._.needsSpace=i.needsSpace)):(this._.output.push(">"),i&&i.indent&&(this._.indentation+=this.indentationChars));i&&i.breakAfterOpen&&this.lineBreak();"pre"==n&&(this._.inPre=1)},attribute:function(n,t){"string"==typeof t&&(this.forceSimpleAmpersand&&(t=t.replace(/&amp;/g,"&")),t=CKEDITOR.tools.htmlEncodeAttr(t));this._.output.push(" ",n,'="',t,'"')},closeTag:function(n){var t=this._.rules[n];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("<\/",n,">");"pre"==n&&(this._.inPre=0);t&&t.breakAfterClose&&(this.lineBreak(),this._.needsSpace=t.needsSpace);this._.afterCloser=1},text:function(n){this._.indent&&(this.indentation(),!this._.inPre&&(n=CKEDITOR.tools.ltrim(n)));this._.output.push(n)},comment:function(n){this._.indent&&this.indentation();this._.output.push("<!--",n,"-->")},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(n,t){var i=this._.rules[n];i?CKEDITOR.tools.extend(i,t,!0):this._.rules[n]=t}}}),function(){function t(n){var t=this.editor,i=n.document,r=i.body;if((n=i.getElementById("cke_actscrpt"))&&n.parentNode.removeChild(n),(n=i.getElementById("cke_shimscrpt"))&&n.parentNode.removeChild(n),CKEDITOR.env.gecko&&(r.contentEditable=!1,2e4>CKEDITOR.env.version&&(r.innerHTML=r.innerHTML.replace(/^.*<\!-- cke-content-start --\>/,""),setTimeout(function(){var n=new CKEDITOR.dom.range(new CKEDITOR.dom.document(i));n.setStart(new CKEDITOR.dom.node(r),0);t.getSelection().selectRanges([n])},0))),r.contentEditable=!0,CKEDITOR.env.ie&&(r.hideFocus=!0,r.disabled=!0,r.removeAttribute("disabled")),delete this._.isLoadingData,this.$=r,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 r=i.getBody(),u=t.getSelection(),n=u&&u.getRanges()[0];n&&r.getHtml().match(/^<p>(?:&nbsp;|<br>)<\/p>$/i)&&n.startContainer.equals(r)&&setTimeout(function(){n=t.getSelection().getRanges()[0];n.startContainer.equals("body")||(r.getFirst().remove(1),n.moveToElementEditEnd(r),n.select())},0)})),CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)i.getDocumentElement().on("mousedown",function(n){n.data.getTarget().is("html")&&setTimeout(function(){t.editable().focus()})});try{t.document.$.execCommand("2D-position",!1,!0)}catch(u){}try{t.document.$.execCommand("enableInlineTableEditing",!1,!t.config.disableNativeTableHandles)}catch(f){}if(t.config.disableObjectResizing)try{this.getDocument().$.execCommand("enableObjectResizing",!1,!1)}catch(e){this.attachListener(this,CKEDITOR.env.ie?"resizestart":"resize",function(n){n.data.preventDefault()})}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==t.document.$.compatMode)&&this.attachListener(this,"keydown",function(n){var i=n.data.getKeystroke(),r;(i==33||i==34)&&(CKEDITOR.env.ie?setTimeout(function(){t.getSelection().scrollIntoView()},0):t.window.$.innerHeight>this.$.offsetHeight&&(r=t.createRange(),r[i==33?"moveToElementEditStart":"moveToElementEditEnd"](this),r.select(),n.data.preventDefault()))});CKEDITOR.env.ie&&this.attachListener(i,"blur",function(){try{i.$.selection.empty()}catch(n){}});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 n=t.document.$.body;n.runtimeStyle.marginBottom="0px";n.runtimeStyle.marginBottom=""}},1e3)},0,this)}function i(){var n=[],t,i;if(8<=CKEDITOR.document.$.documentMode){n.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}");t=[];for(i in CKEDITOR.dtd.$removeEmpty)t.push("html.CSS1Compat "+i+"[contenteditable=false]");n.push(t.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(n.push("html{height:100% !important}"),n.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));return n.push("html{cursor:text;*cursor:auto}"),n.push("img,input,textarea{cursor:default}"),n.join("\n")}CKEDITOR.plugins.add("wysiwygarea",{init:function(t){t.config.fullPage&&t.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"});t.addMode("wysiwyg",function(i){function h(u){u&&u.removeListener();t.editable(new n(t,r.$.contentWindow.document.body));t.setData(t.getData(1),i)}var u="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",u=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent(u)+"}())":"",r=CKEDITOR.dom.element.createFromHtml('<iframe src="'+u+'" frameBorder="0"><\/iframe>'),e,o,f,s;if(r.setStyles({width:"100%",height:"100%"}),r.addClass("cke_wysiwyg_frame cke_reset"),e=t.ui.space("contents"),e.append(r),u=CKEDITOR.env.ie||CKEDITOR.env.gecko)r.on("load",h);f=t.title;o=t.lang.common.editorHelp;f&&(CKEDITOR.env.ie&&(f+=", "+o),r.setAttribute("title",f));f=CKEDITOR.tools.getNextId();s=CKEDITOR.dom.element.createFromHtml('<span id="'+f+'" class="cke_voice_label">'+o+"<\/span>");e.append(s,1);t.on("beforeModeUnload",function(n){n.removeListener();s.remove()});r.setAttributes({"aria-describedby":f,tabIndex:t.tabIndex,allowTransparency:"true"});u||h();CKEDITOR.env.webkit&&(u=function(){e.setStyle("width","100%");r.hide();r.setSize("width",e.getSize("width"));e.removeStyle("width");r.show()},r.setCustomData("onResize",u),CKEDITOR.document.getWindow().on("resize",u));t.fire("ariaWidget",r)})}});var n=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(n){CKEDITOR.tools.setTimeout(t,0,this,n)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(n,t){var u=this.editor,f,s;if(t)this.setHtml(n),u.fire("dataReady");else{this._.isLoadingData=!0;u._.dataStore={id:1};var r=u.config,e=r.fullPage,h=r.docType,o=CKEDITOR.tools.buildStyleHtml(i()).replace(/<style>/,'<style data-cke-temp="1">');e||(o+=CKEDITOR.tools.buildStyleHtml(u.config.contentsCss));f=r.baseHref?'<base href="'+r.baseHref+'" data-cke-temp="1" />':"";e&&(n=n.replace(/<!DOCTYPE[^>]*>/i,function(n){return u.docType=h=n,""}).replace(/<\?xml\s[^\?]*\?>/i,function(n){return u.xmlDeclaration=n,""}));n=u.dataProcessor.toHtml(n);e?(/<body[\s|>]/.test(n)||(n="<body>"+n),/<html[\s|>]/.test(n)||(n="<html>"+n+"<\/html>"),/<head[\s|>]/.test(n)?/<title[\s|>]/.test(n)||(n=n.replace(/<head[^>]*>/,"$&<title><\/title>")):n=n.replace(/<html[^>]*>/,"$&<head><title><\/title><\/head>"),f&&(n=n.replace(/<head>/,"$&"+f)),n=n.replace(/<\/head\s*>/,o+"$&"),n=h+n):n=r.docType+'<html dir="'+r.contentsLangDirection+'" lang="'+(r.contentsLanguage||u.langCode)+'"><head><title>'+this._.docTitle+"<\/title>"+f+o+"<\/head><body"+(r.bodyId?' id="'+r.bodyId+'"':"")+(r.bodyClass?' class="'+r.bodyClass+'"':"")+">"+n+"<\/body><\/html>";CKEDITOR.env.gecko&&(n=n.replace(/<body/,'<body contenteditable="true" '),2e4>CKEDITOR.env.version&&(n=n.replace(/<body[^>]*>/,"$&<!-- cke-content-start -->")));r='<script id="cke_actscrpt" type="text/javascript"'+(CKEDITOR.env.ie?' defer="defer" ':"")+">var wasLoaded=0;function onload(){if(!wasLoaded)window.parent.CKEDITOR.tools.callFunction("+this._.frameLoadedHandler+",window);wasLoaded=1;}"+(CKEDITOR.env.ie?"onload();":'document.addEventListener("DOMContentLoaded", onload, false );')+"<\/script>";CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(r+='<script id="cke_shimscrpt">window.parent.CKEDITOR.tools.enableHtml5Elements(document)<\/script>');n=n.replace(/(?=\s*<\/(:?head)>)/,r);this.clearCustomData();this.clearListeners();u.fire("contentDomUnload");s=this.getDocument();try{s.write(n)}catch(c){setTimeout(function(){s.write(n)},0)}}},getData:function(n){if(n)return this.getHtml();var n=this.editor,i=n.config,t=i.fullPage,r=t&&n.docType,u=t&&n.xmlDeclaration,f=this.getDocument(),t=t?f.getDocumentElement().getOuterHtml():f.getBody().getHtml();return CKEDITOR.env.gecko&&i.enterMode!=CKEDITOR.ENTER_BR&&(t=t.replace(/<br>(?=\s*(:?$|<\/body>))/,"")),t=n.dataProcessor.toDataFormat(t),u&&(t=u+"\n"+t),r&&(t=r+"\n"+t),t},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:n.baseProto.focus.call(this)},detach:function(){var t=this.editor,i=t.document,r=t.window.getFrame();n.baseProto.detach.call(this);this.clearCustomData();i.getDocumentElement().clearCustomData();r.clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);(i=r.removeCustomData("onResize"))&&i.removeListener();t.fire("contentDomUnload");r.remove()}}})}();CKEDITOR.config.disableObjectResizing=!1;CKEDITOR.config.disableNativeTableHandles=!0;CKEDITOR.config.disableNativeSpellChecker=!0;CKEDITOR.config.contentsCss=CKEDITOR.basePath+"contents.css",function(){function n(n,t){return t||(t=n.getSelection().getSelectedElement()),t&&t.is("img")&&!t.data("cke-realelement")&&!t.isReadOnly()?t:void 0}function t(n){var t=n.getStyle("float");return("inherit"==t||"none"==t)&&(t=0),t||(t=n.getAttribute("align")),t}CKEDITOR.plugins.add("image",{requires:"dialog",init:function(t){CKEDITOR.dialog.add("image",this.path+"dialogs/image.js");var i="img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}";CKEDITOR.dialog.isTabEnabled(t,"image","advanced")&&(i="img[alt,dir,id,lang,longdesc,!src,title]{*}(*)");t.addCommand("image",new CKEDITOR.dialogCommand("image",{allowedContent:i,requiredContent:"img[alt,src]",contentTransformations:[["img{width}: sizeToStyle","img[width]: sizeToAttribute"],["img{float}: alignmentToStyle","img[align]: alignmentToAttribute"]]}));t.ui.addButton&&t.ui.addButton("Image",{label:t.lang.common.image,command:"image",toolbar:"insert,10"});t.on("doubleclick",function(n){var t=n.data.element;!t.is("img")||t.data("cke-realelement")||t.isReadOnly()||(n.data.dialog="image")});t.addMenuItems&&t.addMenuItems({image:{label:t.lang.image.menu,command:"image",group:"image"}});t.contextMenu&&t.contextMenu.addListener(function(i){if(n(t,i))return{image:CKEDITOR.TRISTATE_OFF}})},afterInit:function(i){function r(r){var u=i.getCommand("justify"+r);if(u){if("left"==r||"right"==r)u.on("exec",function(u){var f=n(i),e;f&&(e=t(f),e==r?(f.removeStyle("float"),r==t(f)&&f.removeAttribute("align")):f.setStyle("float",r),u.cancel())});u.on("refresh",function(u){var f=n(i);f&&(f=t(f),this.setState(f==r?CKEDITOR.TRISTATE_ON:"right"==r||"left"==r?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),u.cancel())})}}r("left");r("right");r("center");r("block")}})}();CKEDITOR.config.image_removeLinkByEmptyURL=!0,function(){function t(t,r){var u,f;r.on("refresh",function(t){var r=[n],u;for(u in t.data.states)r.push(t.data.states[u]);this.setState(CKEDITOR.tools.search(r,i)?i:n)},r,null,100);r.on("exec",function(n){u=t.getSelection();f=u.createBookmarks(1);n.data||(n.data={});n.data.done=!1},r,null,0);r.on("exec",function(){t.forceNextSelectionCheck();u.selectBookmarks(f)},r,null,100)}var n=CKEDITOR.TRISTATE_DISABLED,i=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(n){var i=CKEDITOR.plugins.indent.genericDefinition;t(n,n.addCommand("indent",new i(!0)));t(n,n.addCommand("outdent",new i));n.ui.addButton&&(n.ui.addButton("Indent",{label:n.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),n.ui.addButton("Outdent",{label:n.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"}));n.on("dirChanged",function(t){var e=n.createRange(),o=t.data.node,s,i,r,u,f;for(e.setStartBefore(o),e.setEndAfter(o),s=new CKEDITOR.dom.walker(e);i=s.next();)if(i.type==CKEDITOR.NODE_ELEMENT)if(!i.equals(o)&&i.getDirection())e.setStartAfter(i),s=new CKEDITOR.dom.walker(e);else{if(r=n.config.indentClasses,r)for(u=t.data.dir=="ltr"?["_rtl",""]:["","_rtl"],f=0;f<r.length;f++)i.hasClass(r[f]+u[0])&&(i.removeClass(r[f]+u[0]),i.addClass(r[f]+u[1]));r=i.getStyle("margin-right");u=i.getStyle("margin-left");r?i.setStyle("margin-left",r):i.removeStyle("margin-left");u?i.setStyle("margin-right",u):i.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(n){this.isIndent=!!n;this.startDisabled=!this.isIndent},specificDefinition:function(n,t,i){this.name=t;this.editor=n;this.jobs={};this.enterBr=n.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!i;this.relatedGlobal=i?"indent":"outdent";this.indentKey=i?9:CKEDITOR.SHIFT+9;this.database={}},registerCommands:function(n,t){n.on("pluginsLoaded",function(){for(var n in t)(function(n,t){var r=n.getCommand(t.relatedGlobal),i;for(i in t.jobs)r.on("exec",function(r){r.data.done||(n.fire("lockSnapshot"),t.execJob(n,i)&&(r.data.done=!0),n.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(t.database))},this,null,i),r.on("refresh",function(r){r.data.states||(r.data.states={});r.data.states[t.name+"@"+i]=t.refreshJob(n,i,r.data.path)},this,null,i);n.addFeature(t)})(this,t[n])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(t,i){var r=this.jobs[i];if(r.state!=n)return r.exec.call(this,t)},refreshJob:function(t,i,r){return i=this.jobs[i],i.state=t.activeFilter.checkFeature(this)?i.refresh.call(this,t,r):n,i.state},getContext:function(n){return n.contains(this.context)}}}(),function(){function u(t){function c(n){for(var v,y,u=i.startContainer,r=i.endContainer;u&&!u.getParent().equals(n);)u=u.getParent();for(;r&&!r.getParent().equals(n);)r=r.getParent();if(!u||!r)return!1;for(var o=u,u=[],c=!1;!c;)o.equals(r)&&(c=!0),u.push(o),o=o.getNext();if(1>u.length)return!1;for(o=n.getParents(!0),r=0;r<o.length;r++)if(o[r].getName&&e[o[r].getName()]){n=o[r];break}for(var o=s.isIndent?1:-1,r=u[0],u=u[u.length-1],c=CKEDITOR.plugins.list.listToArray(n,h),p=c[u.getCustomData("listarray_index")].indent,r=r.getCustomData("listarray_index");r<=u.getCustomData("listarray_index");r++)(c[r].indent+=o,0<o)&&(v=c[r].parent,c[r].parent=new CKEDITOR.dom.element(v.getName(),v.getDocument()));for(r=u.getCustomData("listarray_index")+1;r<c.length&&c[r].indent>p;r++)c[r].indent+=o;if(u=CKEDITOR.plugins.list.arrayToList(c,h,null,t.config.enterMode,n.getDirection()),!s.isIndent&&(y=n.getParent())&&y.is("li"))for(var o=u.listNode.getChildren(),a=[],l,r=o.count()-1;0<=r;r--)(l=o.getItem(r))&&l.is&&l.is("li")&&a.push(l);if(u&&u.listNode.replace(n),a&&a.length)for(r=0;r<a.length;r++){for(l=n=a[r];(l=l.getNext())&&l.is&&l.getName()in e;)CKEDITOR.env.needsNbspFiller&&!n.getFirst(f)&&n.append(i.document.createText(" ")),n.append(l);n.insertAfter(y)}return u&&t.fire("contentDomInvalidated"),!0}for(var r,u,s=this,h=this.database,e=this.context,o=t.getSelection(),o=(o&&o.getRanges()).createIterator(),i;i=o.getNextRange();){for(r=i.getCommonAncestor();r&&!(r.type==CKEDITOR.NODE_ELEMENT&&e[r.getName()]);)r=r.getParent();if(r||(r=i.startPath().contains(e))&&i.setEndAt(r,CKEDITOR.POSITION_BEFORE_END),r||(u=i.getEnclosedNode(),u&&u.type==CKEDITOR.NODE_ELEMENT&&u.getName()in e&&(i.setStartAt(u,CKEDITOR.POSITION_AFTER_START),i.setEndAt(u,CKEDITOR.POSITION_BEFORE_END),r=u)),r&&i.startContainer.type==CKEDITOR.NODE_ELEMENT&&i.startContainer.getName()in e&&(u=new CKEDITOR.dom.walker(i),u.evaluator=n,i.startContainer=u.next()),r&&i.endContainer.type==CKEDITOR.NODE_ELEMENT&&i.endContainer.getName()in e&&(u=new CKEDITOR.dom.walker(i),u.evaluator=n,i.endContainer=u.previous()),r)return c(r)}return 0}function t(t,i){return i||(i=t.contains(this.context)),i&&t.block&&t.block.equals(i.getFirst(n))}function n(n){return n.type==CKEDITOR.NODE_ELEMENT&&n.is("li")}function f(n){return e(n)&&o(n)}var e=CKEDITOR.dom.walker.whitespaces(!0),o=CKEDITOR.dom.walker.bookmark(!1,!0),i=CKEDITOR.TRISTATE_DISABLED,r=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(n){function f(n){e.specificDefinition.apply(this,arguments);this.requiredContent=["ul","ol"];n.on("key",function(i){if("wysiwyg"==n.mode&&i.data.keyCode==this.indentKey){var r=this.getContext(n.elementPath());!r||this.isIndent&&t.call(this,n.elementPath(),r)||(n.execCommand(this.relatedGlobal),i.cancel())}},this);this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(n,u){var f=this.getContext(u),e=t.call(this,u,f);return!f||!this.isIndent||e?i:r}:function(n,t){return!this.getContext(t)||this.isIndent?i:r},exec:CKEDITOR.tools.bind(u,this)}}var e=CKEDITOR.plugins.indent;e.registerCommands(n,{indentlist:new f(n,"indentlist",!0),outdentlist:new f(n,"outdentlist")});CKEDITOR.tools.extend(f.prototype,e.specificDefinition.prototype,{context:{ol:1,ul:1}})}})}(),function(){function n(n,t){var u=r.exec(n),i=r.exec(t);if(u){if(!u[2]&&"px"==i[2])return i[1];if("px"==u[2]&&!i[2])return i[1]+"px"}return t}var i=CKEDITOR.htmlParser.cssStyle,t=CKEDITOR.tools.cssLength,r=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i,f={elements:{$:function(t){var r=t.attributes;if((r=(r=(r=r&&r["data-cke-realelement"])&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(r)))&&r.children[0])&&t.attributes["data-cke-resizable"]){var u=new i(t).rules,t=r.attributes,f=u.width,u=u.height;f&&(t.width=n(t.width,f));u&&(t.height=n(t.height,u))}return r}}},u=CKEDITOR.plugins.add("fakeobjects",{init:function(n){n.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},afterInit:function(n){(n=(n=n.dataProcessor)&&n.htmlFilter)&&n.addRules(f)}});CKEDITOR.editor.prototype.createFakeElement=function(n,r,f,e){var o=this.lang.fakeobjects,o=o[f]||o.unknown,r={"class":r,"data-cke-realelement":encodeURIComponent(n.getOuterHtml()),"data-cke-real-node-type":n.type,alt:o,title:o,align:n.getAttribute("align")||""};return CKEDITOR.env.hc||(r.src=CKEDITOR.getUrl(u.path+"images/spacer.gif")),f&&(r["data-cke-real-element-type"]=f),e&&(r["data-cke-resizable"]=e,f=new i,e=n.getAttribute("width"),n=n.getAttribute("height"),e&&(f.rules.width=t(e)),n&&(f.rules.height=t(n)),f.populate(r)),this.document.createElement("img",{attributes:r})};CKEDITOR.editor.prototype.createFakeParserElement=function(n,r,f,e){var o=this.lang.fakeobjects,o=o[f]||o.unknown,s;return s=new CKEDITOR.htmlParser.basicWriter,n.writeHtml(s),s=s.getHtml(),r={"class":r,"data-cke-realelement":encodeURIComponent(s),"data-cke-real-node-type":n.type,alt:o,title:o,align:n.attributes.align||""},CKEDITOR.env.hc||(r.src=CKEDITOR.getUrl(u.path+"images/spacer.gif")),f&&(r["data-cke-real-element-type"]=f),e&&(r["data-cke-resizable"]=e,e=n.attributes,n=new i,f=e.width,e=e.height,void 0!=f&&(n.rules.width=t(f)),void 0!=e&&(n.rules.height=t(e)),n.populate(r)),new CKEDITOR.htmlParser.element("img",r)};CKEDITOR.editor.prototype.restoreRealElement=function(t){var i,r,t;return t.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT?null:(i=CKEDITOR.dom.element.createFromHtml(decodeURIComponent(t.data("cke-realelement")),this.document),t.data("cke-resizable")&&(r=t.getStyle("width"),t=t.getStyle("height"),r&&i.setAttribute("width",n(i.getAttribute("width"),r)),t&&i.setAttribute("height",n(i.getAttribute("height"),t))),i)}}();CKEDITOR.plugins.add("link",{requires:"dialog,fakeobjects",onLoad:function(){function n(n){return i.replace(/%1/g,"rtl"==n?"right":"left").replace(/%2/g,"cke_contents_"+n)}var t="background:url("+CKEDITOR.getUrl(this.path+"images"+(CKEDITOR.env.hidpi?"/hidpi":"")+"/anchor.png")+") no-repeat %1 center;border:1px dotted #00f;background-size:16px;",i=".%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.plugins.link.synAnchorSelector?"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(n("ltr")+n("rtl"))},init:function(n){var t="a[!href]";CKEDITOR.dialog.isTabEnabled(n,"link","advanced")&&(t=t.replace("]",",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type]{*}(*)"));CKEDITOR.dialog.isTabEnabled(n,"link","target")&&(t=t.replace("]",",target,onclick]"));n.addCommand("link",new CKEDITOR.dialogCommand("link",{allowedContent:t,requiredContent:"a[href]"}));n.addCommand("anchor",new CKEDITOR.dialogCommand("anchor",{allowedContent:"a[!name,id]",requiredContent:"a[name]"}));n.addCommand("unlink",new CKEDITOR.unlinkCommand);n.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand);n.setKeystroke(CKEDITOR.CTRL+76,"link");n.ui.addButton&&(n.ui.addButton("Link",{label:n.lang.link.toolbar,command:"link",toolbar:"links,10"}),n.ui.addButton("Unlink",{label:n.lang.link.unlink,command:"unlink",toolbar:"links,20"}),n.ui.addButton("Anchor",{label:n.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");n.on("doubleclick",function(t){var i=CKEDITOR.plugins.link.getSelectedLink(n)||t.data.element;i.isReadOnly()||(i.is("a")?(t.data.dialog=i.getAttribute("name")&&(!i.getAttribute("href")||!i.getChildCount())?"anchor":"link",n.getSelection().selectElement(i)):CKEDITOR.plugins.link.tryRestoreFakeAnchor(n,i)&&(t.data.dialog="anchor"))});n.addMenuItems&&n.addMenuItems({anchor:{label:n.lang.link.anchor.menu,command:"anchor",group:"anchor",order:1},removeAnchor:{label:n.lang.link.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:n.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:n.lang.link.unlink,command:"unlink",group:"link",order:5}});n.contextMenu&&n.contextMenu.addListener(function(t){if(!t||t.isReadOnly()||(t=CKEDITOR.plugins.link.tryRestoreFakeAnchor(n,t),!t&&!(t=CKEDITOR.plugins.link.getSelectedLink(n))))return null;var i={};return t.getAttribute("href")&&t.getChildCount()&&(i={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF}),t&&t.hasAttribute("name")&&(i.anchor=i.removeAnchor=CKEDITOR.TRISTATE_OFF),i})},afterInit:function(n){var t=n.dataProcessor,i=t&&t.dataFilter,t=t&&t.htmlFilter,r=n._.elementsPath&&n._.elementsPath.filters;i&&i.addRules({elements:{a:function(t){var i=t.attributes,r,t,u;if(!i.name)return null;if(r=!t.children.length,CKEDITOR.plugins.link.synAnchorSelector)t=r?"cke_anchor_empty":"cke_anchor",u=i["class"],i.name&&(!u||0>u.indexOf(t))&&(i["class"]=(u||"")+" "+t),r&&CKEDITOR.plugins.link.emptyAnchorFix&&(i.contenteditable="false",i["data-cke-editable"]=1);else if(CKEDITOR.plugins.link.fakeAnchor&&r)return n.createFakeParserElement(t,"cke_anchor","anchor");return null}}});CKEDITOR.plugins.link.emptyAnchorFix&&t&&t.addRules({elements:{a:function(n){delete n.attributes.contenteditable}}});r&&r.push(function(t,i){if("a"==i&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(n,t)||t.getAttribute("name")&&(!t.getAttribute("href")||!t.getChildCount())))return"anchor"})}});CKEDITOR.plugins.link={getSelectedLink:function(n){var t=n.getSelection(),i=t.getSelectedElement();return i&&i.is("a")?i:(t=t.getRanges()[0])?(t.shrink(CKEDITOR.SHRINK_TEXT),n.elementPath(t.getCommonAncestor()).contains("a",1)):null},fakeAnchor:CKEDITOR.env.opera||CKEDITOR.env.webkit,synAnchorSelector:CKEDITOR.env.ie&&11>CKEDITOR.env.version,emptyAnchorFix:CKEDITOR.env.ie&&8>CKEDITOR.env.version,tryRestoreFakeAnchor:function(n,t){if(t&&t.data("cke-real-element-type")&&"anchor"==t.data("cke-real-element-type")){var i=n.restoreRealElement(t);if(i.data("cke-saved-name"))return i}}};CKEDITOR.unlinkCommand=function(){};CKEDITOR.unlinkCommand.prototype={exec:function(n){var t=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1});n.removeStyle(t)},refresh:function(n,t){var i=t.lastElement&&t.lastElement.getAscendant("a",!0);i&&"a"==i.getName()&&i.getAttribute("href")&&i.getChildCount()?this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)},contextSensitive:1,startDisabled:1,requiredContent:"a[href]"};CKEDITOR.removeAnchorCommand=function(){};CKEDITOR.removeAnchorCommand.prototype={exec:function(n){var i=n.getSelection(),r=i.createBookmarks(),t;i&&(t=i.getSelectedElement())&&(CKEDITOR.plugins.link.fakeAnchor&&!t.getChildCount()?CKEDITOR.plugins.link.tryRestoreFakeAnchor(n,t):t.is("a"))?t.remove(1):(t=CKEDITOR.plugins.link.getSelectedLink(n))&&(t.hasAttribute("href")?(t.removeAttributes({name:1,"data-cke-saved-name":1}),t.removeClass("cke_anchor")):t.remove(1));i.selectBookmarks(r)},requiredContent:"a[name]"};CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0}),function(){function a(n,t,i){function c(i){!(o=s[i?"getFirst":"getLast"]())||o.is&&o.isBlockBoundary()||!(h=t.root[i?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||h.is&&h.isBlockBoundary({br:1})||n.document.createElement("br")[i?"insertBefore":"insertAfter"](o)}for(var u,s,o,h,f=CKEDITOR.plugins.list.listToArray(t.root,i),e=[],r=0;r<t.contents.length;r++)u=t.contents[r],(u=u.getAscendant("li",!0))&&!u.getCustomData("list_item_processed")&&(e.push(u),CKEDITOR.dom.element.setMarker(i,u,"list_item_processed",!0));for(u=null,r=0;r<e.length;r++)u=e[r].getCustomData("listarray_index"),f[u].indent=-1;for(r=u+1;r<f.length;r++)if(f[r].indent>f[r-1].indent+1){for(e=f[r-1].indent+1-f[r].indent,u=f[r].indent;f[r]&&f[r].indent>=u;)f[r].indent+=e,r++;r--}s=CKEDITOR.plugins.list.arrayToList(f,i,null,n.config.enterMode,t.root.getAttribute("dir")).listNode;c(!0);c();s.replace(t.root);n.fire("contentDomInvalidated")}function u(n,t){this.name=n;this.context=this.type=t;this.allowedContent=t+" li";this.requiredContent=t}function e(n,t,i,r){for(var u,f;u=n[r?"getLast":"getFirst"](l);)(f=u.getDirection(1))!==t.getDirection(1)&&u.setAttribute("dir",f),u.remove(),i?u[r?"insertBefore":"insertAfter"](i):t.append(u,r)}function o(t){var i;(i=function(i){var r=t[i?"getPrevious":"getNext"](n);r&&r.type==CKEDITOR.NODE_ELEMENT&&r.is(t.getName())&&(e(t,r,null,!i),t.remove(),t=r)})();i(1)}function s(n){return n.type==CKEDITOR.NODE_ELEMENT&&(n.getName()in CKEDITOR.dtd.$block||n.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[n.getName()]["#"]}function f(t,u,f){var s;t.fire("saveSnapshot");f.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);s=f.extractContents();u.trim(!1,!0);var v=u.createBookmark(),c=new CKEDITOR.dom.elementPath(u.startContainer),h=c.block,c=c.lastElement.getAscendant("li",1)||h,l=new CKEDITOR.dom.elementPath(f.startContainer),a=l.contains(CKEDITOR.dtd.$listItem),l=l.contains(CKEDITOR.dtd.$list);for(h?(h=h.getBogus())&&h.remove():l&&(h=l.getPrevious(n))&&r(h)&&h.remove(),(h=s.getLast())&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("br")&&h.remove(),(h=u.startContainer.getChild(u.startOffset))?s.insertBefore(h):u.startContainer.append(s),a&&(s=i(a))&&(c.contains(a)?(e(s,a.getParent(),a),s.remove()):c.append(s));f.checkStartOfBlock()&&f.checkEndOfBlock();)l=f.startPath(),s=l.block,s.is("li")&&(c=s.getParent(),s.equals(c.getLast(n))&&s.equals(c.getFirst(n))&&(s=c)),f.moveToPosition(s,CKEDITOR.POSITION_BEFORE_START),s.remove();f=f.clone();s=t.editable();f.setEndAt(s,CKEDITOR.POSITION_BEFORE_END);f=new CKEDITOR.dom.walker(f);f.evaluator=function(t){return n(t)&&!r(t)};(f=f.next())&&f.type==CKEDITOR.NODE_ELEMENT&&f.getName()in CKEDITOR.dtd.$list&&o(f);u.moveToBookmark(v);u.select();t.fire("saveSnapshot")}function i(i){return(i=i.getLast(n))&&i.type==CKEDITOR.NODE_ELEMENT&&i.getName()in t?i:null}var t={ol:1,ul:1},v=CKEDITOR.dom.walker.whitespaces(),h=CKEDITOR.dom.walker.bookmark(),n=function(n){return!(v(n)||h(n))},r=CKEDITOR.dom.walker.bogus(),c,l;CKEDITOR.plugins.list={listToArray:function(n,i,r,u,f){var h,l,o,e,c,a,s;if(!t[n.getName()])return[];for(u||(u=0),r||(r=[]),h=0,l=n.getChildCount();h<l;h++)if(o=n.getChild(h),o.type==CKEDITOR.NODE_ELEMENT&&o.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(o,i,r,u+1),"li"==o.$.nodeName.toLowerCase())for(e={parent:n,indent:u,element:o,contents:[]},f?e.grandparent=f:(e.grandparent=n.getParent(),e.grandparent&&"li"==e.grandparent.$.nodeName.toLowerCase()&&(e.grandparent=e.grandparent.getParent())),i&&CKEDITOR.dom.element.setMarker(i,o,"listarray_index",r.length),r.push(e),c=0,a=o.getChildCount();c<a;c++)s=o.getChild(c),s.type==CKEDITOR.NODE_ELEMENT&&t[s.getName()]?CKEDITOR.plugins.list.listToArray(s,i,r,u+1,e.grandparent):e.contents.push(s);return r},arrayToList:function(i,r,u,f,e){var l,it;if(u||(u=0),!i||i.length<u+1)return null;for(var v,b=i[u].parent.getDocument(),d=new CKEDITOR.dom.documentFragment(b),p=null,c=u,g=Math.max(i[u].indent,0),o=null,s,a,ft=f==CKEDITOR.ENTER_P?"p":"div";;){if(l=i[c],v=l.grandparent,s=l.element.getDirection(1),l.indent==g){for(p&&i[c].parent.getName()==p.getName()||(p=i[c].parent.clone(!1,1),e&&p.setAttribute("dir",e),d.append(p)),o=p.append(l.element.clone(0,1)),s!=p.getDirection(1)&&o.setAttribute("dir",s),v=0;v<l.contents.length;v++)o.append(l.contents[v].clone(1,1));c++}else if(l.indent==Math.max(g,0)+1)l=i[c-1].element.getDirection(1),c=CKEDITOR.plugins.list.arrayToList(i,null,c,f,l!=s?s:null),!o.getChildCount()&&CKEDITOR.env.needsNbspFiller&&!(7<b.$.documentMode)&&o.append(b.createText(" ")),o.append(c.listNode),c=c.nextIndex;else if(-1==l.indent&&!u&&v){t[v.getName()]?(o=l.element.clone(!1,!0),s!=v.getDirection(1)&&o.setAttribute("dir",s)):o=new CKEDITOR.dom.documentFragment(b);var p=v.getDirection(1)!=s,nt=l.element,k=nt.getAttribute("class"),tt=nt.getAttribute("style"),rt=o.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(f!=CKEDITOR.ENTER_BR||p||tt||k),y,ut=l.contents.length,w;for(v=0;v<ut;v++)(y=l.contents[v],h(y)&&1<ut)?rt?w=y.clone(1,1):o.append(y.clone(1,1)):y.type==CKEDITOR.NODE_ELEMENT&&y.isBlockBoundary()?(p&&!y.getDirection()&&y.setAttribute("dir",s),a=y,it=nt.getAttribute("style"),it&&a.setAttribute("style",it.replace(/([^;])$/,"$1;")+(a.getAttribute("style")||"")),k&&y.addClass(k),a=null,w&&(o.append(w),w=null),o.append(y.clone(1,1))):rt?(a||(a=b.createElement(ft),o.append(a),p&&a.setAttribute("dir",s)),tt&&a.setAttribute("style",tt),k&&a.setAttribute("class",k),w&&(a.append(w),w=null),a.append(y.clone(1,1))):o.append(y.clone(1,1));w&&((a||o).append(w),w=null);o.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&c!=i.length-1&&(CKEDITOR.env.needsBrFiller&&(s=o.getLast())&&s.type==CKEDITOR.NODE_ELEMENT&&s.is("br")&&s.remove(),s=o.getLast(n),(!s||!(s.type==CKEDITOR.NODE_ELEMENT&&s.is(CKEDITOR.dtd.$block)))&&o.append(b.createElement("br")));s=o.$.nodeName.toLowerCase();("div"==s||"p"==s)&&o.appendBogus();d.append(o);p=null;c++}else return null;if(a=null,i.length<=c||Math.max(i[c].indent,0)<g)break}if(r)for(i=d.getFirst();i;){if(i.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(r,i),i.getName()in CKEDITOR.dtd.$listItem&&(u=i,b=e=f=void 0,f=u.getDirection()))){for(e=u.getParent();e&&!(b=e.getDirection());)e=e.getParent();f==b&&u.removeAttribute("dir")}i=i.getNextSourceNode()}return{listNode:d,nextIndex:c}}};c=/^h[1-6]$/;l=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);u.prototype={exec:function(i){var b,s,g,v;this.refresh(i,i.elementPath());var k=i.config,nt=i.getSelection(),y=nt&&nt.getRanges();this.state==CKEDITOR.TRISTATE_OFF&&(b=i.editable(),b.getFirst(n)?(s=1==y.length&&y[0],(k=s&&s.getEnclosedNode())&&k.is&&this.type==k.getName()&&this.setState(CKEDITOR.TRISTATE_ON)):(k.enterMode==CKEDITOR.ENTER_BR?b.appendBogus():y[0].fixBlock(1,k.enterMode==CKEDITOR.ENTER_P?"p":"div"),nt.selectRanges(y)));for(var k=nt.createBookmarks(!0),b=[],d={},y=y.createIterator(),l=0;(s=y.getNextRange())&&++l;){var u=s.getBoundaryNodes(),r=u.startNode,h=u.endNode;for(r.type==CKEDITOR.NODE_ELEMENT&&"td"==r.getName()&&s.setStartAt(u.startNode,CKEDITOR.POSITION_AFTER_START),h.type==CKEDITOR.NODE_ELEMENT&&"td"==h.getName()&&s.setEndAt(u.endNode,CKEDITOR.POSITION_BEFORE_END),s=s.createIterator(),s.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;u=s.getNextParagraph();)if(!u.getCustomData("list_block")){CKEDITOR.dom.element.setMarker(d,u,"list_block",1);for(var e=i.elementPath(u),r=e.elements,h=0,e=e.blockLimit,w,f=r.length-1;0<=f&&(w=r[f]);f--)if(t[w.getName()]&&e.contains(w)){e.removeCustomData("list_group_object_"+l);(r=w.getCustomData("list_group_object"))?r.contents.push(u):(r={root:w,contents:[u]},b.push(r),CKEDITOR.dom.element.setMarker(d,w,"list_group_object",r));h=1;break}h||(h=e,h.getCustomData("list_group_object_"+l)?h.getCustomData("list_group_object_"+l).contents.push(u):(r={root:h,contents:[u]},CKEDITOR.dom.element.setMarker(d,h,"list_group_object_"+l,r),b.push(r)))}}for(w=[];0<b.length;)if(r=b.shift(),this.state==CKEDITOR.TRISTATE_OFF)if(t[r.root.getName()]){for(y=i,l=r,r=d,s=w,h=CKEDITOR.plugins.list.listToArray(l.root,r),e=[],u=0;u<l.contents.length;u++)(f=l.contents[u],(f=f.getAscendant("li",!0))&&!f.getCustomData("list_item_processed"))&&(e.push(f),CKEDITOR.dom.element.setMarker(r,f,"list_item_processed",!0));for(var f=l.root.getDocument(),v=void 0,p=void 0,u=0;u<e.length;u++)g=e[u].getCustomData("listarray_index"),v=h[g].parent,v.is(this.type)||(p=f.createElement(this.type),v.copyAttributes(p,{start:1,type:1}),p.removeStyle("list-style-type"),h[g].parent=p);for(r=CKEDITOR.plugins.list.arrayToList(h,r,null,y.config.enterMode),h=void 0,e=r.listNode.getChildCount(),u=0;u<e&&(h=r.listNode.getChild(u));u++)h.getName()==this.type&&s.push(h);r.listNode.replace(l.root);y.fire("contentDomInvalidated")}else{for(h=i,u=r,s=w,e=u.contents,y=u.root.getDocument(),l=[],1==e.length&&e[0].equals(u.root)&&(r=y.createElement("div"),e[0].moveChildren&&e[0].moveChildren(r),e[0].append(r),e[0]=r),u=u.contents[0].getParent(),f=0;f<e.length;f++)u=u.getCommonAncestor(e[f].getParent());for(v=h.config.useComputedState,h=r=void 0,v=void 0===v||v,f=0;f<e.length;f++)for(p=e[f];g=p.getParent();){if(g.equals(u)){l.push(p);!h&&p.getDirection()&&(h=1);p=p.getDirection(v);null!==r&&(r=r&&r!=p?null:p);break}p=g}if(!(1>l.length)){for(e=l[l.length-1].getNext(),f=y.createElement(this.type),s.push(f),v=s=void 0;l.length;)s=l.shift(),v=y.createElement("li"),s.is("pre")||c.test(s.getName())||"false"==s.getAttribute("contenteditable")?s.appendTo(v):(s.copyAttributes(v),r&&s.getDirection()&&(v.removeStyle("direction"),v.removeAttribute("dir")),s.moveChildren(v),s.remove()),v.appendTo(f);r&&h&&f.setAttribute("dir",r);e?f.insertBefore(e):f.appendTo(u)}}else this.state==CKEDITOR.TRISTATE_ON&&t[r.root.getName()]&&a.call(this,i,r,d);for(f=0;f<w.length;f++)o(w[f]);CKEDITOR.dom.element.clearAllMarkers(d);nt.selectBookmarks(k);i.focus()},refresh:function(n,i){var r=i.contains(t,1),u=i.blockLimit||i.root;r&&u.contains(r)?this.setState(r.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(e){e.blockless||(e.addCommand("numberedlist",new u("numberedlist","ol")),e.addCommand("bulletedlist",new u("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(u){var a=u.data.keyCode,h,v,o,c;if(e.mode=="wysiwyg"&&a in{8:1,46:1}&&(h=e.getSelection().getRanges()[0],v=h&&h.startPath(),h&&h.collapsed)){var v=new CKEDITOR.dom.elementPath(h.startContainer),p=a==8,y=e.editable(),l=new CKEDITOR.dom.walker(h.clone());l.evaluator=function(t){return n(t)&&!r(t)};l.guard=function(n,t){return!(t&&n.type==CKEDITOR.NODE_ELEMENT&&n.is("table"))};a=h.clone();p?((o=v.contains(t))&&h.checkBoundaryOfElement(o,CKEDITOR.START)&&(o=o.getParent())&&o.is("li")&&(o=i(o))?(c=o,o=o.getPrevious(n),a.moveToPosition(o&&r(o)?o:c,CKEDITOR.POSITION_BEFORE_START)):(l.range.setStartAt(y,CKEDITOR.POSITION_AFTER_START),l.range.setEnd(h.startContainer,h.startOffset),(o=l.previous())&&o.type==CKEDITOR.NODE_ELEMENT&&(o.getName()in t||o.is("li"))&&(o.is("li")||(l.range.selectNodeContents(o),l.reset(),l.evaluator=s,o=l.previous()),c=o,a.moveToElementEditEnd(c))),c?(f(e,a,h),u.cancel()):(a=v.contains(t))&&h.checkBoundaryOfElement(a,CKEDITOR.START)&&(c=a.getFirst(n),h.checkBoundaryOfElement(c,CKEDITOR.START)&&(o=a.getPrevious(n),i(c)?o&&(h.moveToElementEditEnd(o),h.select()):e.execCommand("outdent"),u.cancel()))):(c=v.contains("li"))?(l.range.setEndAt(y,CKEDITOR.POSITION_BEFORE_END),y=(v=c.getLast(n))&&s(v)?v:c,c=0,(o=l.next())&&o.type==CKEDITOR.NODE_ELEMENT&&o.getName()in t&&o.equals(v)?(c=1,o=l.next()):h.checkBoundaryOfElement(y,CKEDITOR.END)&&(c=1),c&&o&&(h=h.clone(),h.moveToElementEditStart(o),f(e,a,h),u.cancel())):(l.range.setEndAt(y,CKEDITOR.POSITION_BEFORE_END),(o=l.next())&&o.type==CKEDITOR.NODE_ELEMENT&&o.is(t)&&(o=o.getFirst(n),v.block&&h.checkStartOfBlock()&&h.checkEndOfBlock()?(v.block.remove(),h.moveToElementEditStart(o),h.select()):i(o)?(h.moveToElementEditStart(o),h.select()):(h=h.clone(),h.moveToElementEditStart(o),f(e,a,h)),u.cancel()));setTimeout(function(){e.selectionChange(1)})}}))}})}(),function(){function ht(t,i,u){return n(i)&&n(u)&&u.equals(i.getNext(function(n){return!(nt(n)||tt(n)||r(n))}))}function s(n){this.upper=n[0];this.lower=n[1];this.set.apply(this,n.slice(2))}function it(t){var i=t.element,r;if(i&&n(i)&&(i=i.getAscendant(t.triggers,!0))&&t.editable.contains(i)){if(r=rt(i,!0),"true"==r.getAttribute("contenteditable"))return i;if(r.is(t.triggers))return r}return null}function ui(n,t,r){return i(n,t),i(n,r),n=t.size.bottom,r=r.size.top,n&&r?0|(n+r)/2:n||r}function f(t,i,u){return i[u?"getPrevious":"getNext"](function(i){return i&&i.type==CKEDITOR.NODE_TEXT&&!nt(i)||n(i)&&!r(i)&&!h(t,i)})}function rt(n,t){if(n.data("cke-editable"))return null;for(t||(n=n.getParent());n&&!n.data("cke-editable");){if(n.hasAttribute("contenteditable"))return n;n=n.getParent()}return null}function fi(n){var f=n.doc,r=w('<span contenteditable="false" style="'+st+"position:absolute;border-top:1px dashed "+n.boxColor+'"><\/span>',f),o=this.path+"images/"+(t.hidpi?"hidpi/":"")+"icon.png";for(u(r,{attach:function(){return this.wrap.getParent()||this.wrap.appendTo(n.editable,!0),this},lineChildren:[u(w('<span title="'+n.editor.lang.magicline.title+'" contenteditable="false">&#8629;<\/span>',f),{base:st+"height:17px;width:17px;"+(n.rtl?"left":"right")+":17px;background:url("+o+") center no-repeat "+n.boxColor+";cursor:pointer;"+(t.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(t.hidpi?"background-size: 9px 10px;":""),looks:["top:-8px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","2px",1),"top:-17px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","2px 2px 0px 0px",1),"top:-1px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","0px 0px 2px 2px",1)]}),u(w(ti,f),{base:ni+"left:0px;border-left-color:"+n.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"]}),u(w(ti,f),{base:ni+"right:0px;border-right-color:"+n.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(){i(n,this);var r=n.holdDistance,t=this.size;return t&&n.mouse.y>t.top-r&&n.mouse.y<t.bottom+r&&n.mouse.x>t.left-r&&n.mouse.x<t.right+r?!0:!1},place:function(){var r=n.view,v=n.editable,s=n.trigger,u=s.upper,f=s.lower,o=u||f,c=o.getParent(),t={},h;this.trigger=s;u&&i(n,u,!0);f&&i(n,f,!0);i(n,c,!0);n.inInlineMode&&y(n,!0);c.equals(v)?(t.left=r.scroll.x,t.right=-r.scroll.x,t.width=""):(t.left=o.size.left-o.size.margin.left+r.scroll.x-(n.inInlineMode?r.editable.left+r.editable.border.left:0),t.width=o.size.outerWidth+o.size.margin.left+o.size.margin.right+r.scroll.x,t.right="");u&&f?t.top=u.size.margin.bottom===f.size.margin.top?0|u.size.bottom+u.size.margin.bottom/2:u.size.margin.bottom<f.size.margin.top?u.size.bottom+u.size.margin.bottom:u.size.bottom+u.size.margin.bottom-f.size.margin.top:u?f||(t.top=u.size.bottom+u.size.margin.bottom):t.top=f.size.top-f.size.margin.top;s.is(l)||t.top>r.scroll.y-15&&t.top<r.scroll.y+5?(t.top=n.inInlineMode?0:r.scroll.y,this.look(l)):s.is(a)||t.top>r.pane.bottom-5&&t.top<r.pane.bottom+15?(t.top=n.inInlineMode?r.editable.height+r.editable.padding.top+r.editable.padding.bottom:r.pane.bottom-1,this.look(a)):(n.inInlineMode&&(t.top-=r.editable.top+r.editable.border.top),this.look(e));n.inInlineMode&&(t.top--,t.top+=r.editable.scroll.top,t.left+=r.editable.scroll.left);for(h in t)t[h]=CKEDITOR.tools.cssLength(t[h]);this.setStyles(t)},look:function(n){if(this.oldLook!=n){for(var i=this.lineChildren.length,t;i--;)(t=this.lineChildren[i]).setAttribute("style",t.base+t.looks[0|n/2]);this.oldLook=n}},wrap:new et("span",n.doc)}),f=r.lineChildren.length;f--;)r.lineChildren[f].appendTo(r);r.look(e);r.appendTo(r.wrap);r.unselectable();r.lineChildren[0].on("mouseup",function(i){r.detach();ut(n,function(t){var i=n.line.trigger;t[i.is(k)?"insertBefore":"insertAfter"](i.is(k)?i.lower:i.upper)},!0);n.editor.focus();t.ie||n.enterMode==CKEDITOR.ENTER_BR||n.hotNode.scrollIntoView();i.data.preventDefault(!0)});r.on("mousedown",function(n){n.data.preventDefault(!0)});n.line=r}function ut(n,i,r){var e=new CKEDITOR.dom.range(n.doc),f=n.editor,u;t.ie&&n.enterMode==CKEDITOR.ENTER_BR?u=n.doc.createText(g):(u=(u=rt(n.element,!0))&&u.data("cke-enter-mode")||n.enterMode,u=new et(b[u],n.doc),u.is("br")||n.doc.createText(g).appendTo(u));r&&f.fire("saveSnapshot");i(u);e.moveToPosition(u,CKEDITOR.POSITION_AFTER_START);f.getSelection().selectRanges([e]);n.hotNode=u;r&&f.fire("saveSnapshot")}function ct(i,r){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function u(n){var u=t.ie&&9>t.version?" ":g,f=i.hotNode&&i.hotNode.getText()==u&&i.element.equals(i.hotNode)&&i.lastCmdDirection===!!r;ut(i,function(t){f&&i.hotNode&&i.hotNode.remove();t[r?"insertAfter":"insertBefore"](n);t.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!r});i.lastCmdDirection=!!r});t.ie||i.enterMode==CKEDITOR.ENTER_BR||i.hotNode.scrollIntoView();i.line.detach()}return function(t){var t=t.getSelection().getStartElement(),e,t=t.getAscendant(dt,1),o;at(i,t)||!t||t.equals(i.editable)||t.contains(i.editable)||((e=rt(t))&&"false"==e.getAttribute("contenteditable")&&(t=e),i.element=t,e=f(i,t,!r),n(e)&&e.is(i.triggers)&&e.is(hi)&&(!f(i,e,!r)||(o=f(i,e,!r))&&n(o)&&o.is(i.triggers))?u(e):(o=it(i,t),n(o)&&(f(i,o,!r)?(t=f(i,o,!r))&&n(t)&&t.is(i.triggers)&&u(o):u(o))))}}()}}function h(n,t){if(!t||!(t.type==CKEDITOR.NODE_ELEMENT&&t.$))return!1;var i=n.line;return i.wrap.equals(t)||i.wrap.contains(t)}function n(n){return n&&n.type==CKEDITOR.NODE_ELEMENT&&n.$}function r(t){if(!n(t))return!1;var i;return(i=lt(t))||(n(t)?(i={left:1,right:1,center:1},i=!(!i[t.getComputedStyle("float")]&&!i[t.getAttribute("align")])):i=!1),i}function lt(n){return!!{absolute:1,fixed:1}[n.getComputedStyle("position")]}function v(t,i){return n(i)?i.is(t.triggers):null}function at(n,t){var i,r,u;if(!t)return!1;for(i=t.getParents(1),r=i.length;r--;)for(u=n.tabuList.length;u--;)if(i[r].hasAttribute(n.tabuList[u]))return!0;return!1}function ei(n,t,r){return(t=t[r?"getLast":"getFirst"](function(t){return n.isRelevant(t)&&!t.is(si)}),!t)?!1:(i(n,t),r?t.size.top>n.mouse.y:t.size.bottom<n.mouse.y)}function vt(t){var u=t.editable,o=t.mouse,f=t.view,p=t.triggerOffset,c;return(y(t),c=o.y>(t.inInlineMode?f.editable.top+f.editable.height/2:Math.min(f.editable.height,f.pane.height)/2),u=u[c?"getLast":"getFirst"](function(n){return!(nt(n)||tt(n))}),!u)?null:(h(t,u)&&(u=t.line.wrap[c?"getPrevious":"getNext"](function(n){return!(nt(n)||tt(n))})),!n(u)||r(u)||!v(t,u))?null:(i(t,u),!c&&0<=u.size.top&&0<o.y&&o.y<u.size.top+p?(t=t.inInlineMode||0===f.scroll.y?l:e,new s([null,u,k,d,t])):c&&u.size.bottom<=f.pane.height&&o.y>u.size.bottom-p&&o.y<f.pane.height?(t=t.inInlineMode||u.size.bottom>f.pane.height-p&&u.size.bottom<f.pane.height?a:e,new s([u,null,wt,d,t])):null)}function yt(t){var c=t.mouse,g=t.view,p=t.triggerOffset,u=it(t),w,b,o,h;if(!u)return null;if(i(t,u),p=Math.min(p,0|u.size.outerHeight/2),w=[],c.y>u.size.top-1&&c.y<u.size.top+p)o=!1;else if(c.y>u.size.bottom-p&&c.y<u.size.bottom+1)o=!0;else return null;if(r(u)||ei(t,u,o)||u.getParent().is(kt))return null;if(h=f(t,u,!o),h){if(h&&h.type==CKEDITOR.NODE_TEXT)return null;if(n(h)){if(r(h)||!v(t,h)||h.getParent().is(kt))return null;w=[h,u][o?"reverse":"concat"]().concat([ot,d])}}else u.equals(t.editable[o?"getLast":"getFirst"](t.isRelevant))?(y(t),o&&c.y>u.size.bottom-p&&c.y<g.pane.height&&u.size.bottom>g.pane.height-p&&u.size.bottom<g.pane.height?b=a:0<c.y&&c.y<u.size.top+p&&(b=l)):b=e,w=[null,u][o?"reverse":"concat"]().concat([o?wt:k,d,b,u.equals(t.editable[o?"getLast":"getFirst"](t.isRelevant))?o?a:l:e]);return 0 in w?new s(w):null}function ft(n,i,r,f){for(var l=function(){var r=t.ie?i.$.currentStyle:n.win.$.getComputedStyle(i.$,"");return t.ie?function(n){return r[CKEDITOR.tools.cssStyleToDomStyle(n)]}:function(n){return r.getPropertyValue(n)}}(),a=i.getDocumentPosition(),h={},v={},c={},e={},s=o.length;s--;)h[o[s]]=parseInt(l("border-"+o[s]+"-width"),10)||0,c[o[s]]=parseInt(l("padding-"+o[s]),10)||0,v[o[s]]=parseInt(l("margin-"+o[s]),10)||0;return(!r||f)&&p(n,f),e.top=a.y-(r?0:n.view.scroll.y),e.left=a.x-(r?0:n.view.scroll.x),e.outerWidth=i.$.offsetWidth,e.outerHeight=i.$.offsetHeight,e.height=e.outerHeight-(c.top+c.bottom+h.top+h.bottom),e.width=e.outerWidth-(c.left+c.right+h.left+h.right),e.bottom=e.top+e.outerHeight,e.right=e.left+e.outerWidth,n.inInlineMode&&(e.scroll={top:i.$.scrollTop,left:i.$.scrollLeft}),u({border:h,padding:c,margin:v,ignoreScroll:r},e,!0)}function i(t,i,r){if(!n(i))return i.size=null;if(i.size){if(i.size.ignoreScroll==r&&i.size.date>new Date-gt)return null}else i.size={};return u(i.size,ft(t,i,r),{date:+new Date},!0)}function y(n,t){n.view.editable=ft(n,n.editable,t,!0)}function p(n,t){var r;if(n.view||(n.view={}),r=n.view,t||!(r&&r.date>new Date-gt)){var i=n.win,r=i.getScrollPosition(),i=i.getViewPaneSize();u(n.view,{scroll:{x:r.x,y:r.y,width:n.doc.$.documentElement.scrollWidth-i.width,height:n.doc.$.documentElement.scrollHeight-i.height},pane:{width:i.width,height:i.height,bottom:i.height+r.y},date:+new Date},!0)}}function oi(n,t,i,r){for(var h=r,c=r,f=0,e=!1,o=!1,l=n.view.pane.height,u=n.mouse;u.y+f<l&&0<u.y-f;){if(e||(e=t(h,r)),o||(o=t(c,r)),!e&&0<u.y-f&&(h=i(n,{x:u.x,y:u.y-f})),!o&&u.y+f<l&&(c=i(n,{x:u.x,y:u.y+f})),e&&o)break;f+=2}return new s([h,c,null,null])}CKEDITOR.plugins.add("magicline",{init:function(i){var o=i.config,v=o.magicline_triggerOffset||30,e={editor:i,enterMode:o.enterMode,triggerOffset:v,holdDistance:0|v*(o.magicline_holdDistance||.5),boxColor:o.magicline_color||"#ff0000",rtl:"rtl"==o.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(o.magicline_tabuList||[]),triggers:o.magicline_everywhere?dt:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},w,a,l;e.isRelevant=function(t){return n(t)&&!h(e,t)&&!r(t)};i.on("contentDom",function(){var n=i.editable(),r=i.document,v=i.window;u(e,{editable:n,inInlineMode:n.isInline(),doc:r,win:v,hotNode:null},!0);e.boundary=e.inInlineMode?e.editable:e.doc.getDocumentElement();n.is(c.$inline)||(e.inInlineMode&&!lt(n)&&n.setStyles({position:"relative",top:null,left:null}),fi.call(this,e),p(e),n.attachListener(i,"beforeUndoImage",function(){e.line.detach()}),n.attachListener(i,"beforeGetData",function(){e.line.wrap.getParent()&&(e.line.detach(),i.once("getData",function(){e.line.attach()},null,null,1e3))},null,null,0),n.attachListener(e.inInlineMode?r:r.getWindow().getFrame(),"mouseout",function(n){var u,n,t,r;"wysiwyg"==i.mode&&(e.inInlineMode?(u=n.data.$.clientX,n=n.data.$.clientY,p(e),y(e,!0),t=e.view.editable,r=e.view.scroll,u>t.left-r.x&&u<t.right-r.x&&n>t.top-r.y&&n<t.bottom-r.y||(clearTimeout(l),l=null,e.line.detach())):(clearTimeout(l),l=null,e.line.detach()))}),n.attachListener(n,"keyup",function(){e.hiddenMode=0}),n.attachListener(n,"keydown",function(n){if("wysiwyg"==i.mode)switch(n=n.data.getKeystroke(),i.getSelection().getStartElement(),n){case 2228240:case 16:e.hiddenMode=1;e.line.detach()}}),n.attachListener(e.inInlineMode?n:r,"mousemove",function(n){if(a=!0,!("wysiwyg"!=i.mode||i.readOnly||l)){var t={x:n.data.$.clientX,y:n.data.$.clientY};l=setTimeout(function(){e.mouse=t;l=e.trigger=null;p(e);a&&!e.hiddenMode&&i.focusManager.hasFocus&&!e.line.mouseNear()&&(e.element=ii(e,!0))&&((e.trigger=vt(e)||yt(e)||ri(e))&&!at(e,e.trigger.upper||e.trigger.lower)?e.line.attach().place():(e.trigger=null,e.line.detach()),a=!1)},30)}}),n.attachListener(v,"scroll",function(){"wysiwyg"==i.mode&&(e.line.detach(),t.webkit&&(e.hiddenMode=1,clearTimeout(w),w=setTimeout(function(){e.mouseDown||(e.hiddenMode=0)},50)))}),n.attachListener(pt?r:v,"mousedown",function(){"wysiwyg"==i.mode&&(e.line.detach(),e.hiddenMode=1,e.mouseDown=1)}),n.attachListener(pt?r:v,"mouseup",function(){e.hiddenMode=0;e.mouseDown=0}),i.addCommand("accessPreviousSpace",ct(e)),i.addCommand("accessNextSpace",ct(e,!0)),i.setKeystroke([[o.magicline_keystrokePrevious,"accessPreviousSpace"],[o.magicline_keystrokeNext,"accessNextSpace"]]),i.on("loadSnapshot",function(){var n,t,r,u;for(u in{p:1,br:1,div:1})for(n=i.document.getElementsByTag(u),r=n.count();r--;)if((t=n.getItem(r)).data("cke-magicline-hot")){e.hotNode=t;e.lastCmdDirection="true"===t.data("cke-magicline-dir")?!0:!1;return}}),this.backdoor={accessFocusSpace:ut,boxTrigger:s,isLine:h,getAscendantTrigger:it,getNonEmptyNeighbour:f,getSize:ft,that:e,triggerEdge:yt,triggerEditable:vt,triggerExpand:ri})},this)}});var u=CKEDITOR.tools.extend,et=CKEDITOR.dom.element,w=et.createFromHtml,t=CKEDITOR.env,pt=CKEDITOR.env.ie&&9>CKEDITOR.env.version,c=CKEDITOR.dtd,b={},k=128,wt=64,ot=32,d=16,bt=8,l=4,a=2,e=1,g=" ",kt=c.$listItem,si=c.$tableContent,hi=u({},c.$nonEditable,c.$empty),dt=c.$block,gt=100,st="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",ni=st+"border-color:transparent;display:block;border-style:solid;",ti="<span>"+g+"<\/span>";b[CKEDITOR.ENTER_BR]="br";b[CKEDITOR.ENTER_P]="p";b[CKEDITOR.ENTER_DIV]="div";s.prototype={set:function(n,t,i){return this.properties=n+t+(i||e),this},is:function(n){return(this.properties&n)==n}};var ii=function(){return function(n,i,r){if(!n.mouse)return null;var f=n.doc,e=n.line.wrap,r=r||n.mouse,u=new CKEDITOR.dom.element(f.$.elementFromPoint(r.x,r.y));return i&&h(n,u)&&(e.hide(),u=new CKEDITOR.dom.element(f.$.elementFromPoint(r.x,r.y)),e.show()),!u||!(u.type==CKEDITOR.NODE_ELEMENT&&u.$)||t.ie&&9>t.version&&!n.boundary.equals(u)&&!n.boundary.contains(u)?null:u}}(),nt=CKEDITOR.dom.walker.whitespaces(),tt=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),ri=function(){function u(r){var f=r.element,u,e,o,l,s,h,c;if(!n(f)||f.contains(r.editable)||f.isReadOnly())return null;if(o=oi(r,function(n,t){return!t.equals(n)},function(n,t){return ii(n,!0,t)},f),u=o.upper,e=o.lower,ht(r,u,e))return o.set(ot,bt);if(u&&f.contains(u))for(;!u.getParent().equals(f);)u=u.getParent();else u=f.getFirst(function(n){return t(r,n)});if(e&&f.contains(e))for(;!e.getParent().equals(f);)e=e.getParent();else e=f.getLast(function(n){return t(r,n)});if(!u||!e||(i(r,u),i(r,e),!(r.mouse.y>u.size.top&&r.mouse.y<e.size.bottom)))return null;for(f=Number.MAX_VALUE;e&&!e.equals(u)&&(s=u.getNext(r.isRelevant));)l=Math.abs(ui(r,u,s)-r.mouse.y),l<f&&(f=l,h=u,c=s),u=s,i(r,u);return!h||!c||!(r.mouse.y>h.size.top&&r.mouse.y<c.size.bottom)?null:(o.upper=h,o.lower=c,o.set(ot,bt))}function t(n,t){return!(t&&t.type==CKEDITOR.NODE_TEXT||tt(t)||r(t)||h(n,t)||t.type==CKEDITOR.NODE_ELEMENT&&t.$&&t.is("br"))}return function(n){var f=u(n),t,i;return(t=f)&&(t=f.upper,i=f.lower,t=!t||!i||r(i)||r(t)||i.equals(t)||t.equals(i)||i.contains(t)||t.contains(i)?!1:v(n,t)&&v(n,i)&&ht(n,t,i)?!0:!1),t?f:null}}(),o=["top","left","right","bottom"]}();CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51;CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.SHIFT+52,function(){function t(n){var t;if(!n||n.type!=CKEDITOR.NODE_ELEMENT||"form"!=n.getName())return[];for(var r=[],u=["style","className"],i=0;i<u.length;i++)t=n.$.elements.namedItem(u[i]),t&&(t=new CKEDITOR.dom.element(t),r.push([t,t.nextSibling]),t.remove());return r}function i(n,t){var i,r,u;if(n&&!(n.type!=CKEDITOR.NODE_ELEMENT||"form"!=n.getName())&&0<t.length)for(i=t.length-1;0<=i;i--)r=t[i][0],u=t[i][1],u?r.insertBefore(u):r.appendTo(n)}function n(n,r){var e=t(n),f={},u=n.$;return r||(f["class"]=u.className||"",u.className=""),f.inline=u.style.cssText||"",r||(u.style.cssText="position: static; overflow: visible"),i(e),f}function r(n,r){var f=t(n),u=n.$;"class"in r&&(u.className=r["class"]);"inline"in r&&(u.style.cssText=r.inline);i(f)}function u(n){var i,r,t;if(!n.editable().isInline()){i=CKEDITOR.instances;for(r in i)t=i[r],"wysiwyg"!=t.mode||t.readOnly||(t=t.document.getBody(),t.setAttribute("contentEditable",!1),t.setAttribute("contentEditable",!0));n.editable().hasFocus&&(n.toolbox.focus(),n.focus())}}CKEDITOR.plugins.add("maximize",{init:function(t){function h(){var n=i.getViewPaneSize();t.resize(n.width,n.height,null,!0)}if(t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var c=t.lang,s=CKEDITOR.document,i=s.getWindow(),f,e,o,l=CKEDITOR.TRISTATE_OFF;t.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:!1,exec:function(){var y=t.container.getChild(1),v=t.ui.space("contents"),a,p;if("wysiwyg"==t.mode?(a=t.getSelection(),f=a&&a.getRanges(),e=i.getScrollPosition()):(p=t.editable().$,f=!CKEDITOR.env.ie&&[p.selectionStart,p.selectionEnd],e=[p.scrollLeft,p.scrollTop]),this.state==CKEDITOR.TRISTATE_OFF){i.on("resize",h);for(o=i.getScrollPosition(),a=t.container;a=a.getParent();)a.setCustomData("maximize_saved_styles",n(a)),a.setStyle("z-index",t.config.baseFloatZIndex-5);v.setCustomData("maximize_saved_styles",n(v,!0));y.setCustomData("maximize_saved_styles",n(y,!0));v={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0};s.getDocumentElement().setStyles(v);CKEDITOR.env.gecko||s.getDocumentElement().setStyle("position","fixed");CKEDITOR.env.gecko&&CKEDITOR.env.quirks||s.getBody().setStyles(v);CKEDITOR.env.ie?setTimeout(function(){i.$.scrollTo(0,0)},0):i.$.scrollTo(0,0);y.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute");y.$.offsetLeft;y.setStyles({"z-index":t.config.baseFloatZIndex-5,left:"0px",top:"0px"});y.addClass("cke_maximized");h();v=y.getDocumentPosition();y.setStyles({left:-1*v.x+"px",top:-1*v.y+"px"});CKEDITOR.env.gecko&&u(t)}else if(this.state==CKEDITOR.TRISTATE_ON){for(i.removeListener("resize",h),v=[v,y],a=0;a<v.length;a++)r(v[a],v[a].getCustomData("maximize_saved_styles")),v[a].removeCustomData("maximize_saved_styles");for(a=t.container;a=a.getParent();)r(a,a.getCustomData("maximize_saved_styles")),a.removeCustomData("maximize_saved_styles");CKEDITOR.env.ie?setTimeout(function(){i.$.scrollTo(o.x,o.y)},0):i.$.scrollTo(o.x,o.y);y.removeClass("cke_maximized");CKEDITOR.env.webkit&&(y.setStyle("display","inline"),setTimeout(function(){y.setStyle("display","block")},0));t.fire("resize")}this.toggleState();(a=this.uiItems[0])&&(v=this.state==CKEDITOR.TRISTATE_OFF?c.maximize.maximize:c.maximize.minimize,a=CKEDITOR.document.getById(a._.id),a.getChild(1).setHtml(v),a.setAttribute("title",v),a.setAttribute("href",'javascript:void("'+v+'");'));"wysiwyg"==t.mode?f?(CKEDITOR.env.gecko&&u(t),t.getSelection().selectRanges(f),(p=t.getSelection().getStartElement())&&p.scrollIntoView(!0)):i.$.scrollTo(e.x,e.y):(f&&(p.selectionStart=f[0],p.selectionEnd=f[1]),p.scrollLeft=e[0],p.scrollTop=e[1]);f=e=null;l=this.state;t.fire("maximize",this.state)},canUndo:!1});t.ui.addButton&&t.ui.addButton("Maximize",{label:c.maximize.maximize,command:"maximize",toolbar:"tools,10"});t.on("mode",function(){var n=t.getCommand("maximize");n.setState(n.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:l)},null,null,100)}}})}(),function(){var n={canUndo:!1,async:!0,exec:function(t){t.getClipboardData({title:t.lang.pastetext.title},function(i){i&&t.fire("paste",{type:"text",dataValue:i.dataValue});t.fire("afterCommandExec",{name:"pastetext",command:n,returnValue:!!i})})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(t){if(t.addCommand("pastetext",n),t.ui.addButton&&t.ui.addButton("PasteText",{label:t.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"}),t.config.forcePasteAsPlainText)t.on("beforePaste",function(n){"html"!=n.data.type&&(n.data.type="text")});t.on("pasteState",function(n){t.getCommand("pastetext").setState(n.data)})}})}(),function(){function n(n,t,i){var r=CKEDITOR.cleanWord;return r?i():(n=CKEDITOR.getUrl(n.config.pasteFromWordCleanupFile||t+"filter/default.js"),CKEDITOR.scriptLoader.load(n,i,null,!0)),!r}function t(n){n.data.type="html"}CKEDITOR.plugins.add("pastefromword",{requires:"clipboard",init:function(i){var r=0,u=this.path;i.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(n){var i=this;r=1;n.once("beforePaste",t);n.getClipboardData({title:n.lang.pastefromword.title},function(t){t&&n.fire("paste",{type:"html",dataValue:t.dataValue});n.fire("afterCommandExec",{name:"pastefromword",command:i,returnValue:!!t})})}});i.ui.addButton&&i.ui.addButton("PasteFromWord",{label:i.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});i.on("pasteState",function(n){i.getCommand("pastefromword").setState(n.data)});i.on("paste",function(t){var f=t.data,e=f.dataValue,o;e&&(r||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(e))&&(o=n(i,u,function(){o?i.fire("paste",f):(!i.config.pasteFromWordPromptCleanup||r||confirm(i.lang.pastefromword.confirmCleanup))&&(f.dataValue=CKEDITOR.cleanWord(e,i))}),o&&t.cancel())},null,null,3)}})}();CKEDITOR.plugins.add("removeformat",{init:function(n){n.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);n.ui.addButton&&n.ui.addButton("RemoveFormat",{label:n.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}});CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(n){for(var e=n._.removeFormatRegex||(n._.removeFormatRegex=RegExp("^(?:"+n.config.removeFormatTags.replace(/,/g,"|")+")$","i")),h=n._.removeAttributes||(n._.removeAttributes=n.config.removeFormatAttributes.split(",")),o=CKEDITOR.plugins.removeformat.filter,s=n.getSelection().getRanges(1),c=s.createIterator(),i;i=c.getNextRange();){i.collapsed||i.enlarge(CKEDITOR.ENLARGE_ELEMENT);var u=i.createBookmark(),t=u.startNode,f=u.endNode,r=function(t){for(var r=n.elementPath(t),f=r.elements,u=1,i;(i=f[u])&&!i.equals(r.block)&&!i.equals(r.blockLimit);u++)e.test(i.getName())&&o(n,i)&&t.breakParent(i)};if(r(t),f)for(r(f),t=t.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);t&&!t.equals(f);)r=t.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),!("img"==t.getName()&&t.data("cke-realelement"))&&o(n,t)&&(e.test(t.getName())?t.remove(1):(t.removeAttributes(h),n.fire("removeFormatCleanup",t))),t=r;i.moveToBookmark(u)}n.forceNextSelectionCheck();n.getSelection().selectRanges(s)}}},filter:function(n,t){for(var r=n._.removeFormatFilters||[],i=0;i<r.length;i++)if(!1===r[i](t))return!1;return!0}};CKEDITOR.editor.prototype.addRemoveFormatFilter=function(n){this._.removeFormatFilters||(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(n)};CKEDITOR.config.removeFormatTags="b,big,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var";CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign",function(){CKEDITOR.plugins.add("sourcearea",{init:function(t){function i(){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 r=CKEDITOR.plugins.sourcearea;t.addMode("source",function(r){var u=t.ui.space("contents").getDocument().createElement("textarea");u.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)));u.setAttribute("dir","ltr");u.addClass("cke_source cke_reset cke_enable_context_menu");t.ui.space("contents").append(u);u=t.editable(new n(t,u));u.setData(t.getData(1));CKEDITOR.env.ie&&(u.attachListener(t,"resize",i,u),u.attachListener(CKEDITOR.document.getWindow(),"resize",i,u),CKEDITOR.tools.setTimeout(i,0,u));t.fire("ariaWidget",this);r()});t.addCommand("source",r.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 n=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(n){this.setValue(n);this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(n){this[(n?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){n.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})}();CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(n){"wysiwyg"==n.mode&&n.fire("saveSnapshot");n.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);n.setMode("source"==n.mode?"wysiwyg":"source")},canUndo:!1}}};CKEDITOR.plugins.add("specialchar",{availableLangs:{ar:1,bg:1,ca:1,cs:1,cy:1,de:1,el:1,en:1,eo:1,es:1,et:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ku:1,lv:1,nb:1,nl:1,no:1,pl:1,pt:1,"pt-br":1,ru:1,si:1,sk:1,sl:1,sq:1,sv:1,th:1,tr:1,ug:1,uk:1,vi:1,"zh-cn":1},requires:"dialog",init:function(n){var t=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");n.addCommand("specialchar",{exec:function(){var i=n.langCode,i=t.availableLangs[i]?i:t.availableLangs[i.replace(/-.*/,"")]?i.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(t.path+"dialogs/lang/"+i+".js"),function(){CKEDITOR.tools.extend(n.lang.specialchar,t.langEntries[i]);n.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1});n.ui.addButton&&n.ui.addButton("SpecialChar",{label:n.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 n=function(n){var t=this._,i=t.menu;t.state!==CKEDITOR.TRISTATE_DISABLED&&(t.on&&i?i.hide():(t.previousState=t.state,i||(i=t.menu=new CKEDITOR.menu(n,{panel:{className:"cke_menu_panel",attributes:{"aria-label":n.lang.common.options}}}),i.onHide=CKEDITOR.tools.bind(function(){var i=this.command?n.getCommand(this.command).modes:this.modes;this.setState(!i||i[n.mode]?t.previousState:CKEDITOR.TRISTATE_DISABLED);t.on=0},this),this.onMenu&&i.addListener(this.onMenu)),this.setState(CKEDITOR.TRISTATE_ON),t.on=1,setTimeout(function(){i.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=n},statics:{handler:{create:function(n){return new CKEDITOR.ui.menuButton(n)}}}})},beforeInit:function(n){n.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}});CKEDITOR.UI_MENUBUTTON="menubutton",function(){function t(n,t){var i=0,r;for(r in t)if(t[r]==n){i=1;break}return i}var r="",u=function(){function o(){t.once("focus",f);t.once("blur",u)}function u(t){var t=t.editor,i=n.getScayt(t),r=t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE;i&&(n.setPaused(t,!i.disabled),n.setControlId(t,i.id),i.destroy(!0),delete n.instances[t.name],r&&o())}var t=this,f=function(){var r,i,f,u;if(!("undefined"!=typeof n.instances[t.name]||null!=n.instances[t.name])){if(r=t.config,i={},i.srcNodeRef="BODY"==t.editable().$.nodeName?t.document.getWindow().$.frameElement:t.editable().$,i.assocApp="CKEDITOR."+CKEDITOR.version+"@"+CKEDITOR.revision,i.customerid=r.scayt_customerid||"1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2",i.customDictionaryIds=r.scayt_customDictionaryIds||"",i.userDictionaryName=r.scayt_userDictionaryName||"",i.sLang=r.scayt_sLang||"en_US",i.onLoad=function(){CKEDITOR.env.ie&&8>CKEDITOR.env.version||this.addStyle(this.selectorCss(),"padding-bottom: 2px !important;");t.editable().hasFocus&&!n.isControlRestored(t)&&this.focus()},r=window.scayt_custom_params,"object"==typeof r)for(f in r)i[f]=r[f];n.getControlId(t)&&(i.id=n.getControlId(t));u=new window.scayt(i);u.afterMarkupRemove.push(function(n){new CKEDITOR.dom.element(n,u.document).mergeSiblings()});(i=n.instances[t.name])&&(u.sLang=i.sLang,u.option(i.option()),u.paused=i.paused);n.instances[t.name]=u;try{u.setDisabled(!1===n.isPaused(t))}catch(e){}t.fire("showScaytState")}},i,e;t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?o():t.on("contentDom",f);t.on("contentDomUnload",function(){for(var i=CKEDITOR.document.getElementsByTag("script"),n=0;n<i.count();n++){var t=i.getItem(n),r=t.getId(),u=t.getAttribute("src");r&&u&&r.match(/^dojoIoScript(\d+)$/i)&&u.match(/^https?:\/\/svc\.webspellchecker\.net\/spellcheck\/script\/ssrv\.cgi/i)&&t.remove()}});t.on("beforeCommandExec",function(i){"source"==i.data.name&&"source"==t.mode&&n.markControlRestore(t)});t.on("afterCommandExec",function(i){n.isScaytEnabled(t)&&"wysiwyg"==t.mode&&("undo"==i.data.name||"redo"==i.data.name)&&(n.getScayt(t).setDisabled(!0),n.refresh_timeout&&window.clearTimeout(n.refresh_timeout),n.refresh_timeout=window.setTimeout(function(){n.getScayt(t).setDisabled(!1);n.getScayt(t).focus();n.getScayt(t).refresh()},10))});t.on("destroy",u);t.on("setData",u);t.on("insertElement",function(){var i=n.getScayt(t);n.isScaytEnabled(t)&&(CKEDITOR.env.ie&&t.getSelection().unlock(!0),window.setTimeout(function(){i.focus();i.refresh()},10))},this,null,50);t.on("insertHtml",function(){var i=n.getScayt(t);n.isScaytEnabled(t)&&(CKEDITOR.env.ie&&t.getSelection().unlock(!0),window.setTimeout(function(){i.focus();i.refresh()},10))},this,null,50);t.on("scaytDialog",function(i){i.data.djConfig=window.djConfig;i.data.scayt_control=n.getScayt(t);i.data.tab=r;i.data.scayt=window.scayt});i=t.dataProcessor;(i=i&&i.htmlFilter)&&i.addRules({elements:{span:function(n){if(n.attributes["data-scayt_word"]&&n.attributes["data-scaytid"])return delete n.name,n}}});i=CKEDITOR.plugins.undo.Image.prototype;e="function"==typeof i.equalsContent?"equalsContent":"equals";i[e]=CKEDITOR.tools.override(i[e],function(t){return function(i){var u=this.contents,f=i.contents,r=n.getScayt(this.editor);return r&&n.isScaytReady(this.editor)&&(this.contents=r.reset(u)||"",i.contents=r.reset(f)||""),r=t.apply(this,arguments),this.contents=u,i.contents=f,r}});i=CKEDITOR.editor.prototype;i.checkDirty=CKEDITOR.tools.override(i.checkDirty,function(t){return function(){var i=null,r=n.getScayt(this);return r&&n.isScaytReady(this)?(i=r.reset(this.getSnapshot()),r=r.reset(this._.previousValue),i=i!==r):i=t.apply(this),i}});t.document&&(t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE||t.focusManager.hasFocus)&&f()};CKEDITOR.plugins.scayt={engineLoaded:!1,instances:{},controlInfo:{},setControlInfo:function(n,t){n&&n.name&&"object"!=typeof this.controlInfo[n.name]&&(this.controlInfo[n.name]={});for(var i in t)this.controlInfo[n.name][i]=t[i]},isControlRestored:function(n){return n&&n.name&&this.controlInfo[n.name]?this.controlInfo[n.name].restored:!1},markControlRestore:function(n){this.setControlInfo(n,{restored:!0})},setControlId:function(n,t){this.setControlInfo(n,{id:t})},getControlId:function(n){return n&&n.name&&this.controlInfo[n.name]&&this.controlInfo[n.name].id?this.controlInfo[n.name].id:null},setPaused:function(n,t){this.setControlInfo(n,{paused:t})},isPaused:function(n){if(n&&n.name&&this.controlInfo[n.name])return this.controlInfo[n.name].paused},getScayt:function(n){return this.instances[n.name]},isScaytReady:function(n){return!0===this.engineLoaded&&"undefined"!=typeof window.scayt&&this.getScayt(n)},isScaytEnabled:function(n){return(n=this.getScayt(n))?!1===n.disabled:!1},getUiTabs:function(n){var r=[],i=n.config.scayt_uiTabs||"1,1,1",i=i.split(","),t;for(i[3]="1",t=0;4>t;t++)r[t]="undefined"!=typeof window.scayt&&"undefined"!=typeof window.scayt.uiTags?parseInt(i[t],10)&&window.scayt.uiTags[t]:parseInt(i[t],10);return"object"==typeof n.plugins.wsc?r.push(1):r.push(0),r},loadEngine:function(t){if(CKEDITOR.env.gecko&&10900>CKEDITOR.env.version||CKEDITOR.env.opera||CKEDITOR.env.air)return t.fire("showScaytState");if(!0===this.engineLoaded)return u.apply(t);if(-1==this.engineLoaded)return CKEDITOR.on("scaytReady",function(){u.apply(t)});CKEDITOR.on("scaytReady",u,t);CKEDITOR.on("scaytReady",function(){this.engineLoaded=!0},this,null,0);this.engineLoaded=-1;var i=document.location.protocol,i=-1!=i.search(/https?:/)?i:"http:",i=t.config.scayt_srcUrl||i+"//svc.webspellchecker.net/scayt26/loader__base.js",r=n.parseUrl(i).path+"/";return void 0==window.scayt?(CKEDITOR._djScaytConfig={baseUrl:r,addOnLoad:[function(){CKEDITOR.fireOnce("scaytReady")}],isDebug:!1},CKEDITOR.document.getHead().append(CKEDITOR.document.createElement("script",{attributes:{type:"text/javascript",async:"true",src:i}}))):CKEDITOR.fireOnce("scaytReady"),null},parseUrl:function(n){var t;return n.match&&(t=n.match(/(.*)[\/\\](.*?\.\w+)$/))?{path:t[1],file:t[2]}:n}};var n=CKEDITOR.plugins.scayt,i=function(n,t,i,r,u,f,e){n.addCommand(r,u);n.addMenuItem(r,{label:i,command:r,group:f,order:e})},f={preserveState:!0,editorFocus:!1,canUndo:!1,exec:function(t){if(n.isScaytReady(t)){var i=n.isScaytEnabled(t);this.setState(i?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_ON);t=n.getScayt(t);t.focus();t.setDisabled(i)}else!t.config.scayt_autoStartup&&0<=n.engineLoaded&&(t.focus(),this.setState(CKEDITOR.TRISTATE_DISABLED),n.loadEngine(t))}};CKEDITOR.plugins.add("scayt",{requires:"menubutton,dialog",beforeInit:function(n){var t=n.config.scayt_contextMenuItemsOrder||"suggest|moresuggest|control",r="",i;if((t=t.split("|"))&&t.length)for(i=0;i<t.length;i++)r+="scayt_"+t[i]+(t.length!=parseInt(i,10)+1?",":"");n.config.menu_groups=r+","+n.config.menu_groups},checkEnvironment:function(){return CKEDITOR.env.opera||CKEDITOR.env.air?0:1},init:function(u){var o=u.dataProcessor&&u.dataProcessor.dataFilter,s={elements:{span:function(n){var t=n.attributes;t&&t["data-scaytid"]&&delete n.name}}},e;o&&o.addRules(s);var c={},h={},l=u.addCommand("scaytcheck",f);CKEDITOR.dialog.add("scaytcheck",CKEDITOR.getUrl(this.path+"dialogs/options.js"));o=n.getUiTabs(u);u.addMenuGroup("scaytButton");u.addMenuGroup("scayt_suggest",-10);u.addMenuGroup("scayt_moresuggest",-9);u.addMenuGroup("scayt_control",-8);s={};e=u.lang.scayt;s.scaytToggle={label:e.enable,command:"scaytcheck",group:"scaytButton"};1==o[0]&&(s.scaytOptions={label:e.options,group:"scaytButton",onClick:function(){r="options";u.openDialog("scaytcheck")}});1==o[1]&&(s.scaytLangs={label:e.langs,group:"scaytButton",onClick:function(){r="langs";u.openDialog("scaytcheck")}});1==o[2]&&(s.scaytDict={label:e.dictionariesTab,group:"scaytButton",onClick:function(){r="dictionaries";u.openDialog("scaytcheck")}});s.scaytAbout={label:u.lang.scayt.about,group:"scaytButton",onClick:function(){r="about";u.openDialog("scaytcheck")}};1==o[4]&&(s.scaytWSC={label:u.lang.wsc.toolbar,group:"scaytButton",command:"checkspell"});u.addMenuItems(s);u.ui.add("Scayt",CKEDITOR.UI_MENUBUTTON,{label:e.title,title:CKEDITOR.env.opera?e.opera_title:e.title,modes:{wysiwyg:this.checkEnvironment()},toolbar:"spellchecker,20",onRender:function(){l.on("state",function(){this.setState(l.state)},this)},onMenu:function(){var i=n.isScaytEnabled(u),t;return u.getMenuItem("scaytToggle").label=e[i?"disable":"enable"],t=n.getUiTabs(u),{scaytToggle:CKEDITOR.TRISTATE_OFF,scaytOptions:i&&t[0]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytLangs:i&&t[1]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytDict:i&&t[2]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytAbout:i&&t[3]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytWSC:t[4]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}}});u.contextMenu&&u.addMenuItems&&u.contextMenu.addListener(function(r,f){var l,y,o,b,w,s,d,p,k;if(!n.isScaytEnabled(u)||f.getRanges()[0].checkReadOnly()||(l=n.getScayt(u),y=l.getScaytNode(),!y)||(o=l.getWord(y),!o))return null;var b=l.getLang(),a=u.config.scayt_contextCommands||"all",o=window.scayt.getSuggestion(o,b),a=a.split("|"),v;for(v in c)delete u._.menuItems[v],delete u.commands[v];for(v in h)delete u._.menuItems[v],delete u.commands[v];if(o&&o.length){for(c={},h={},v=u.config.scayt_moreSuggestions||"on",b=!1,w=u.config.scayt_maxSuggestions,typeof w!="number"&&(w=5),w||(w=o.length),s=0,d=o.length;s<d;s=s+1)p="scayt_suggestion_"+o[s].replace(" ","_"),k=function(n,t){return{exec:function(){l.replace(n,t)}}}(y,o[s]),s<w?(i(u,"button_"+p,o[s],p,k,"scayt_suggest",s+1),h[p]=CKEDITOR.TRISTATE_OFF):v=="on"&&(i(u,"button_"+p,o[s],p,k,"scayt_moresuggest",s+1),c[p]=CKEDITOR.TRISTATE_OFF,b=!0);b&&(u.addMenuItem("scayt_moresuggest",{label:e.moreSuggestions,group:"scayt_moresuggest",order:10,getItems:function(){return c}}),h.scayt_moresuggest=CKEDITOR.TRISTATE_OFF)}else i(u,"no_sugg",e.noSuggestions,"scayt_no_sugg",{exec:function(){}},"scayt_control",1,!0),h.scayt_no_sugg=CKEDITOR.TRISTATE_OFF;return(t("all",a)||t("ignore",a))&&(i(u,"ignore",e.ignore,"scayt_ignore",{exec:function(){l.ignore(y)}},"scayt_control",2),h.scayt_ignore=CKEDITOR.TRISTATE_OFF),(t("all",a)||t("ignoreall",a))&&(i(u,"ignore_all",e.ignoreAll,"scayt_ignore_all",{exec:function(){l.ignoreAll(y)}},"scayt_control",3),h.scayt_ignore_all=CKEDITOR.TRISTATE_OFF),(t("all",a)||t("add",a))&&(i(u,"add_word",e.addWord,"scayt_add_word",{exec:function(){window.scayt.addWordToUserDictionary(y)}},"scayt_control",4),h.scayt_add_word=CKEDITOR.TRISTATE_OFF),l.fireOnContextMenu&&l.fireOnContextMenu(u),h});o=function(t){t.removeListener();CKEDITOR.env.opera||CKEDITOR.env.air?l.setState(CKEDITOR.TRISTATE_DISABLED):l.setState(n.isScaytEnabled(u)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)};u.on("showScaytState",o);u.on("instanceReady",o);if(u.config.scayt_autoStartup)u.on("instanceReady",function(){n.loadEngine(u)})},afterInit:function(n){var t,i=function(n){if(n.hasAttribute("data-scaytid"))return!1};n._.elementsPath&&(t=n._.elementsPath.filters)&&t.push(i);n.addRemoveFormatFilter&&n.addRemoveFormatFilter(i)}})}(),function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(n){var u=n.config,i=n.lang.stylescombo,t={},r=[],f=[];n.on("stylesSet",function(i){if(i=i.data.styles){for(var e,s,o=0,h=i.length;o<h;o++)(e=i[o],n.blockless&&e.element in CKEDITOR.dtd.$block||(s=e.name,e=new CKEDITOR.style(e),n.filter.customConfig&&!n.filter.check(e)))||(e._name=s,e._.enterMode=u.enterMode,e._.weight=o+1e3*(e.type==CKEDITOR.STYLE_OBJECT?1:e.type==CKEDITOR.STYLE_BLOCK?2:3),t[s]=e,r.push(e),f.push(e));r.sort(function(n,t){return n._.weight-t._.weight})}});n.ui.addRichCombo("Styles",{label:i.label,title:i.panelTitle,toolbar:"styles,10",allowedContent:f,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(u.contentsCss),multiSelect:!0,attributes:{"aria-label":i.panelTitle}},init:function(){for(var n,t,e,u,f=0,o=r.length;f<o;f++)n=r[f],t=n._name,u=n.type,u!=e&&(this.startGroup(i["panelTitle"+u]),e=u),this.add(t,n.type==CKEDITOR.STYLE_OBJECT?t:n.buildPreview(),t);this.commit()},onClick:function(i){n.focus();n.fire("saveSnapshot");var i=t[i],r=n.elementPath();n[i.checkActive(r)?"removeStyle":"applyStyle"](i);n.fire("saveSnapshot")},onRender:function(){n.on("selectionChange",function(n){for(var i,f=this.getValue(),n=n.data.path.elements,r=0,e=n.length,u;r<e;r++){u=n[r];for(i in t)if(t[i].checkElementRemovable(u,!0)){i!=f&&this.setValue(i);return}}this.setValue("")},this)},onOpen:function(){var r=n.getSelection().getSelectedElement(),r=n.elementPath(r),u=[0,0,0,0],f,e,o;this.showAll();this.unmarkAll();for(f in t)e=t[f],o=e.type,e.checkApplicable(r,n.activeFilter)?u[o]++:this.hideItem(f),e.checkActive(r)&&this.mark(f);u[CKEDITOR.STYLE_BLOCK]||this.hideGroup(i["panelTitle"+CKEDITOR.STYLE_BLOCK]);u[CKEDITOR.STYLE_INLINE]||this.hideGroup(i["panelTitle"+CKEDITOR.STYLE_INLINE]);u[CKEDITOR.STYLE_OBJECT]||this.hideGroup(i["panelTitle"+CKEDITOR.STYLE_OBJECT])},refresh:function(){var i=n.elementPath(),r;if(i){for(r in t)if(t[r].checkApplicable(i,n.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){t={};r=[]}})}})}(),function(){function n(n){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(t){var u,i,r;if(t.editable().hasFocus&&(i=t.getSelection(),u=new CKEDITOR.dom.elementPath(i.getCommonAncestor(),i.root).contains({td:1,th:1},1))){if(i=t.createRange(),r=CKEDITOR.tools.tryThese(function(){var t=u.getParent().$.cells[u.$.cellIndex+(n?-1:1)];return t.parentNode.parentNode,t},function(){var t=u.getParent(),t=t.getAscendant("table").$.rows[t.$.rowIndex+(n?-1:1)];return t.cells[n?t.cells.length-1:0]}),r||n)if(r)r=new CKEDITOR.dom.element(r),i.moveToElementEditStart(r),(!i.checkStartOfBlock()||!i.checkEndOfBlock())&&i.selectNodeContents(r);else return!0;else{for(var f=u.getAscendant("table").$,r=u.getParent().$.cells,f=new CKEDITOR.dom.element(f.insertRow(-1),t.document),e=0,o=r.length;e<o;e++)f.append(new CKEDITOR.dom.element(r[e],t.document).clone(!1,!1)).appendBogus();i.moveToElementEditStart(f)}return i.select(!0),!0}return!1}}}var t={editorFocus:!1,modes:{wysiwyg:1,source:1}},i={exec:function(n){n.container.focusNext(!0,n.tabIndex)}},r={exec:function(n){n.container.focusPrevious(!0,n.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(u){for(var e=!1!==u.config.enableTabKeyTools,o=u.config.tabSpaces||0,f="";o--;)f+=" ";if(f)u.on("key",function(n){9==n.data.keyCode&&(u.insertHtml(f),n.cancel())});if(e)u.on("key",function(n){(9==n.data.keyCode&&u.execCommand("selectNextCell")||n.data.keyCode==CKEDITOR.SHIFT+9&&u.execCommand("selectPreviousCell"))&&n.cancel()});u.addCommand("blur",CKEDITOR.tools.extend(i,t));u.addCommand("blurBack",CKEDITOR.tools.extend(r,t));u.addCommand("selectNextCell",n());u.addCommand("selectPreviousCell",n(!0))}})}();CKEDITOR.dom.element.prototype.focusNext=function(n,t){var o=void 0===t?this.getTabIndex():t,f,s,r,e,i,u;if(0>=o)for(i=this.getNextSourceNode(n,CKEDITOR.NODE_ELEMENT);i;){if(i.isVisible()&&0===i.getTabIndex()){r=i;break}i=i.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(i=this.getDocument().getBody().getFirst();i=i.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!f)if(!s&&i.equals(this)){if(s=!0,n){if(!(i=i.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;f=1}}else s&&!this.contains(i)&&(f=1);if(i.isVisible()&&!(0>(u=i.getTabIndex()))){if(f&&u==o){r=i;break}u>o&&(!r||!e||u<e)?(r=i,e=u):!r&&0===u&&(r=i,e=u)}}r&&r.focus()};CKEDITOR.dom.element.prototype.focusPrevious=function(n,t){for(var o=void 0===t?this.getTabIndex():t,f,s,u,e=0,r,i=this.getDocument().getBody().getLast();i=i.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!f)if(!s&&i.equals(this)){if(s=!0,n){if(!(i=i.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;f=1}}else s&&!this.contains(i)&&(f=1);if(i.isVisible()&&!(0>(r=i.getTabIndex())))if(0>=o){if(f&&0===r){u=i;break}r>e&&(u=i,e=r)}else{if(f&&r==o){u=i;break}r<o&&(!u||r>e)&&(u=i,e=r)}}u&&u.focus()};CKEDITOR.plugins.add("table",{requires:"dialog",init:function(n){function i(n){return CKEDITOR.tools.extend(n||{},{contextSensitive:1,refresh:function(n,t){this.setState(t.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!n.blockless){var t=n.lang.table;n.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];"+(n.plugins.dialogadvtab?"table"+n.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"]]}));n.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",i()));n.addCommand("tableDelete",i({exec:function(n){var t=n.elementPath().contains("table",1),i;t&&(i=t.getParent(),1!=i.getChildCount()||i.is("body","td","th")||(t=i),n=n.createRange(),n.moveToPosition(t,CKEDITOR.POSITION_BEFORE_START),t.remove(),n.select())}}));n.ui.addButton&&n.ui.addButton("Table",{label:t.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");n.addMenuItems&&n.addMenuItems({table:{label:t.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:t.deleteTable,command:"tableDelete",group:"table",order:1}});n.on("doubleclick",function(n){n.data.element.is("table")&&(n.data.dialog="tableProperties")});n.contextMenu&&n.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function n(n){function e(n){0<r.length||n.type!=CKEDITOR.NODE_ELEMENT||!a.test(n.getName())||n.getCustomData("selected_cell")||(CKEDITOR.dom.element.setMarker(u,n,"selected_cell",!0),r.push(n))}for(var t,i,n=n.getRanges(),r=[],u={},f=0;f<n.length;f++)if(t=n[f],t.collapsed)t=t.getCommonAncestor(),(t=t.getAscendant("td",!0)||t.getAscendant("th",!0))&&r.push(t);else for(t=new CKEDITOR.dom.walker(t),t.guard=e;i=t.next();)i.type==CKEDITOR.NODE_ELEMENT&&i.is(CKEDITOR.dtd.table)||(i=i.getAscendant("td",!0)||i.getAscendant("th",!0))&&!i.getCustomData("selected_cell")&&(CKEDITOR.dom.element.setMarker(u,i,"selected_cell",!0),r.push(i));return CKEDITOR.dom.element.clearAllMarkers(u),r}function u(t,i){for(var f,r=n(t),e=r[0],o=e.getAscendant("table"),e=e.getDocument(),h=r[0].getParent(),s=h.$.rowIndex,r=r[r.length-1],u=r.getParent().$.rowIndex+r.$.rowSpan-1,r=new CKEDITOR.dom.element(o.$.rows[u]),s=i?s:u,h=i?h:r,r=CKEDITOR.tools.buildTableMap(o),o=r[s],s=i?r[s-1]:r[s+1],r=r[0].length,e=e.createElement("tr"),u=0;o[u]&&u<r;u++)1<o[u].rowSpan&&s&&o[u]==s[u]?(f=o[u],f.rowSpan+=1):(f=new CKEDITOR.dom.element(o[u]).clone(),f.removeAttribute("rowSpan"),f.appendBogus(),e.append(f),f=f.$),u+=f.colSpan-1;i?e.insertBefore(h):e.insertAfter(h)}function f(t){var e,h;if(t instanceof CKEDITOR.dom.selection){for(var i=n(t),u=i[0].getAscendant("table"),s=CKEDITOR.tools.buildTableMap(u),t=i[0].getParent().$.rowIndex,i=i[i.length-1],c=i.getParent().$.rowIndex+i.$.rowSpan-1,i=[],r=t;r<=c;r++){for(var l=s[r],a=new CKEDITOR.dom.element(u.$.rows[r]),o=0;o<l.length;o++)e=new CKEDITOR.dom.element(l[o]),h=e.getParent().$.rowIndex,1==e.$.rowSpan?e.remove():(e.$.rowSpan-=1,h==r&&(h=s[r+1],h[o-1]?e.insertAfter(new CKEDITOR.dom.element(h[o-1])):new CKEDITOR.dom.element(u.$.rows[r+1]).append(e,1))),o+=e.$.colSpan-1;i.push(a)}for(s=u.$.rows,u=new CKEDITOR.dom.element(s[c+1]||(0<t?s[t-1]:null)||u.$.parentNode),r=i.length;0<=r;r--)f(i[r]);return u}return t instanceof CKEDITOR.dom.element&&(u=t.getAscendant("table"),1==u.$.rows.length?u.remove():t.remove()),null}function e(n,t){for(var i,o,f,r=t?Infinity:0,u=0;u<n.length;u++){i=n[u];for(var h=t,s=i.getParent().$.cells,f=0,e=0;e<s.length;e++)if(o=s[e],f=f+(h?1:o.colSpan),o==i.$)break;i=f-1;(t?i<r:i>r)&&(r=i)}return r}function o(t,i){for(var o=n(t),f=o[0].getAscendant("table"),u=e(o,1),o=e(o),u=i?u:o,s=CKEDITOR.tools.buildTableMap(f),f=[],o=[],h=s.length,r=0;r<h;r++)f.push(s[r][u]),o.push(i?s[r][u-1]:s[r][u+1]);for(r=0;r<h;r++)f[r]&&(1<f[r].colSpan&&o[r]==f[r]?(u=f[r],u.colSpan+=1):(u=new CKEDITOR.dom.element(f[r]).clone(),u.removeAttribute("colSpan"),u.appendBogus(),u[i?"insertBefore":"insertAfter"].call(u,new CKEDITOR.dom.element(f[r])),u=u.$),r+=u.rowSpan-1)}function s(n,t){var i=n.getStartElement(),r;(i=i.getAscendant("td",1)||i.getAscendant("th",1))&&(r=i.clone(),r.appendBogus(),t?r.insertBefore(i):r.insertAfter(i))}function h(i){var i,f,u,o,s,e,r;if(i instanceof CKEDITOR.dom.selection){i=n(i);f=i[0]&&i[0].getAscendant("table");n:{for(o=0,u=i.length-1,s={};e=i[o++];)CKEDITOR.dom.element.setMarker(s,e,"delete_cell",!0);for(o=0;e=i[o++];)if((r=e.getPrevious())&&!r.getCustomData("delete_cell")||(r=e.getNext())&&!r.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(s);u=r;break n}CKEDITOR.dom.element.clearAllMarkers(s);r=i[0].getParent();(r=r.getPrevious())?u=r.getLast():(r=i[u].getParent(),u=(r=r.getNext())?r.getChild(0):null)}for(r=i.length-1;0<=r;r--)h(i[r]);u?t(u,!0):f&&f.remove()}else i instanceof CKEDITOR.dom.element&&(f=i.getParent(),1==f.getChildCount()?f.remove():i.remove())}function t(n,t){var i=n.getDocument(),r=CKEDITOR.document;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(r.focus(),i.focus());i=new CKEDITOR.dom.range(i);i["moveToElementEdit"+(t?"End":"Start")](n)||(i.selectNodeContents(n),i.collapse(t?!1:!0));i.select(!0)}function i(n,t,i){if(n=n[t],"undefined"==typeof i)return n;for(t=0;n&&t<n.length;t++){if(i.is&&n[t]==i.$)return t;if(t==i)return new CKEDITOR.dom.element(n[t])}return i.is?-1:null}function r(t,r,u){var o=n(t),s,f,t,e,h;if((r?1!=o.length:2>o.length)||(s=t.getCommonAncestor())&&s.type==CKEDITOR.NODE_ELEMENT&&s.is("table"))return!1;t=o[0];s=t.getAscendant("table");var a=CKEDITOR.tools.buildTableMap(s),g=a.length,nt=a[0].length,c=t.getParent().$.rowIndex,p=i(a,c,t);if(r){try{h=parseInt(t.getAttribute("rowspan"),10)||1;f=parseInt(t.getAttribute("colspan"),10)||1;e=a["up"==r?c-h:"down"==r?c+h:c]["left"==r?p-f:"right"==r?p+f:p]}catch(it){return!1}if(!e||t.$==e)return!1;o["up"==r||"left"==r?"unshift":"push"](new CKEDITOR.dom.element(e))}for(var r=t.getDocument(),v=c,h=e=0,w=!u&&new CKEDITOR.dom.documentFragment(r),k=0,r=0;r<o.length;r++){f=o[r];var l=f.getParent(),d=f.getFirst(),y=f.$.colSpan,b=f.$.rowSpan,l=l.$.rowIndex,tt=i(a,l,f),k=k+y*b,h=Math.max(h,tt-p+y);e=Math.max(e,l-c+b);u||(y=f,(b=y.getBogus())&&b.remove(),y.trim(),f.getChildren().count()&&(l==v||!d||d.isBlockBoundary&&d.isBlockBoundary({br:1})||!(v=w.getLast(CKEDITOR.dom.walker.whitespaces(!0)))||v.is&&v.is("br")||w.append("br"),f.moveChildren(w)),r?f.remove():f.setHtml(""));v=l}if(u)return e*h==k;for(w.moveChildren(t),t.appendBogus(),h>=nt?t.removeAttribute("rowSpan"):t.$.rowSpan=e,e>=g?t.removeAttribute("colSpan"):t.$.colSpan=h,u=new CKEDITOR.dom.nodeList(s.$.rows),o=u.count(),r=o-1;0<=r;r--)s=u.getItem(r),s.$.cells.length||(s.remove(),o++);return t}function c(t,r){var f=n(t);if(1<f.length)return!1;if(r)return!0;var f=f[0],u=f.getParent(),e=u.getAscendant("table"),c=CKEDITOR.tools.buildTableMap(e),o=u.$.rowIndex,l=i(c,o,f),h=f.$.rowSpan,a;if(1<h){a=Math.ceil(h/2);for(var h=Math.floor(h/2),u=o+a,e=new CKEDITOR.dom.element(e.$.rows[u]),c=i(c,u),s,u=f.clone(),o=0;o<c.length;o++)if(s=c[o],s.parentNode==e.$&&o>l){u.insertBefore(new CKEDITOR.dom.element(s));break}else s=null;s||e.append(u,!0)}else for(h=a=1,e=u.clone(),e.insertAfter(u),e.append(u=f.clone()),s=i(c,o),l=0;l<s.length;l++)s[l].rowSpan++;return u.appendBogus(),f.$.rowSpan=a,u.$.rowSpan=h,1==a&&f.removeAttribute("rowSpan"),1==h&&u.removeAttribute("rowSpan"),u}function l(t,r){var f=n(t),h;if(1<f.length)return!1;if(r)return!0;var f=f[0],o=f.getParent(),u=o.getAscendant("table"),u=CKEDITOR.tools.buildTableMap(u),c=i(u,o.$.rowIndex,f),e=f.$.colSpan;if(1<e)o=Math.ceil(e/2),e=Math.floor(e/2);else{for(var e=o=1,l=[],s=0;s<u.length;s++)h=u[s],l.push(h[c]),1<h[c].rowSpan&&(s+=h[c].rowSpan-1);for(u=0;u<l.length;u++)l[u].colSpan++}return u=f.clone(),u.insertAfter(f),u.appendBogus(),f.$.colSpan=o,u.$.colSpan=e,1==o&&f.removeAttribute("colSpan"),1==e&&u.removeAttribute("colSpan"),u}var a=/^(?:td|th)$/;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(i){function a(n){return CKEDITOR.tools.extend(n||{},{contextSensitive:1,refresh:function(n,t){this.setState(t.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function v(n,t){var r=i.addCommand(n,t);i.addFeature(r)}var e=i.lang.table;v("cellProperties",new CKEDITOR.dialogCommand("cellProperties",a({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",requiredContent:"table"})));CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js");v("rowDelete",a({requiredContent:"table",exec:function(n){n=n.getSelection();t(f(n))}}));v("rowInsertBefore",a({requiredContent:"table",exec:function(n){n=n.getSelection();u(n,!0)}}));v("rowInsertAfter",a({requiredContent:"table",exec:function(n){n=n.getSelection();u(n)}}));v("columnDelete",a({requiredContent:"table",exec:function(i){for(var r,a,i=i.getSelection(),i=n(i),s=i[0],u=i[i.length-1],i=s.getAscendant("table"),o=CKEDITOR.tools.buildTableMap(i),e,h,c=[],f=0,l=o.length;f<l;f++)for(r=0,a=o[f].length;r<a;r++)o[f][r]==s.$&&(e=r),o[f][r]==u.$&&(h=r);for(f=e;f<=h;f++)for(r=0;r<o.length;r++)u=o[r],s=new CKEDITOR.dom.element(i.$.rows[r]),u=new CKEDITOR.dom.element(u[f]),u.$&&(1==u.$.colSpan?u.remove():u.$.colSpan-=1,r+=u.$.rowSpan-1,s.$.cells.length||c.push(s));h=i.$.rows[0]&&i.$.rows[0].cells;e=new CKEDITOR.dom.element(h[e]||(e?h[e-1]:i.$.parentNode));c.length==l&&i.remove();e&&t(e,!0)}}));v("columnInsertBefore",a({requiredContent:"table",exec:function(n){n=n.getSelection();o(n,!0)}}));v("columnInsertAfter",a({requiredContent:"table",exec:function(n){n=n.getSelection();o(n)}}));v("cellDelete",a({requiredContent:"table",exec:function(n){n=n.getSelection();h(n)}}));v("cellMerge",a({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(n){t(r(n.getSelection()),!0)}}));v("cellMergeRight",a({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(n){t(r(n.getSelection(),"right"),!0)}}));v("cellMergeDown",a({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(n){t(r(n.getSelection(),"down"),!0)}}));v("cellVerticalSplit",a({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(n){t(c(n.getSelection()))}}));v("cellHorizontalSplit",a({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(n){t(l(n.getSelection()))}}));v("cellInsertBefore",a({requiredContent:"table",exec:function(n){n=n.getSelection();s(n,!0)}}));v("cellInsertAfter",a({requiredContent:"table",exec:function(n){n=n.getSelection();s(n)}}));i.addMenuItems&&i.addMenuItems({tablecell:{label:e.cell.menu,group:"tablecell",order:1,getItems:function(){var t=i.getSelection(),u=n(t);return{tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:r(t,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:r(t,"right",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:r(t,"down",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:c(t,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:l(t,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_properties:0<u.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}}},tablecell_insertBefore:{label:e.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:e.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:e.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:e.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:e.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:e.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:e.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:e.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:e.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:e.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:e.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:e.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:e.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:e.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:e.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:e.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:e.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}});i.contextMenu&&i.contextMenu.addListener(function(n,t,i){return(n=i.contains({td:1,th:1},1))&&!n.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getSelectedCells:n};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}();CKEDITOR.tools.buildTableMap=function(n){for(var u,e,r,s,n=n.$.rows,t=-1,i=[],f=0;f<n.length;f++)for(t++,i[t]||(i[t]=[]),u=-1,e=0;e<n[f].cells.length;e++){for(r=n[f].cells[e],u++;i[t][u];)u++;for(var h=isNaN(r.colSpan)?1:r.colSpan,r=isNaN(r.rowSpan)?1:r.rowSpan,o=0;o<r;o++)for(i[t+o]||(i[t+o]=[]),s=0;s<h;s++)i[t+o][u+s]=n[f].cells[e];u+=h-1}return i},function(){function t(n){this.editor=n;this.reset()}CKEDITOR.plugins.add("undo",{init:function(n){function r(n){i.enabled&&!1!==n.data.command.canUndo&&i.save()}function u(){i.enabled=n.readOnly?!1:"wysiwyg"==n.mode;i.onChange()}var i=n.undoManager=new t(n),f=n.addCommand("undo",{exec:function(){i.undo()&&(n.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),e=n.addCommand("redo",{exec:function(){i.redo()&&(n.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});n.setKeystroke([[CKEDITOR.CTRL+90,"undo"],[CKEDITOR.CTRL+89,"redo"],[CKEDITOR.CTRL+CKEDITOR.SHIFT+90,"redo"]]);i.onChange=function(){f.setState(i.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);e.setState(i.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};n.on("beforeCommandExec",r);n.on("afterCommandExec",r);n.on("saveSnapshot",function(n){i.save(n.data&&n.data.contentOnly)});n.on("contentDom",function(){n.editable().on("keydown",function(n){n=n.data.getKey();(8==n||46==n)&&i.type(n,0)});n.editable().on("keypress",function(n){i.type(n.data.getKey(),1)})});n.on("beforeModeUnload",function(){"wysiwyg"==n.mode&&i.save(!0)});n.on("mode",u);n.on("readOnly",u);n.ui.addButton&&(n.ui.addButton("Undo",{label:n.lang.undo.undo,command:"undo",toolbar:"undo,10"}),n.ui.addButton("Redo",{label:n.lang.undo.redo,command:"redo",toolbar:"undo,20"}));n.resetUndo=function(){i.reset();n.fire("saveSnapshot")};n.on("updateSnapshot",function(){i.currentImage&&i.update()});n.on("lockSnapshot",function(n){i.lock(n.data&&n.data.dontUpdate)});n.on("unlockSnapshot",i.unlock,i)}});CKEDITOR.plugins.undo={};var n=CKEDITOR.plugins.undo.Image=function(n,t){this.editor=n;n.fire("beforeUndoImage");var i=n.getSnapshot();CKEDITOR.env.ie&&i&&(i=i.replace(/\s+data-cke-expando=".*?"/g,""));this.contents=i;t||(this.bookmarks=(i=i&&n.getSelection())&&i.createBookmarks2(!0));n.fire("afterUndoImage")},i=/\b(?:href|src|name)="[^"]*?"/gi;n.prototype={equalsContent:function(n){var t=this.contents,n=n.contents;return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&(t=t.replace(i,""),n=n.replace(i,"")),t!=n?!1:!0},equalsSelection:function(n){var t=this.bookmarks,n=n.bookmarks,i,r,u;if(t||n){if(!t||!n||t.length!=n.length)return!1;for(i=0;i<t.length;i++)if(r=t[i],u=n[i],r.startOffset!=u.startOffset||r.endOffset!=u.endOffset||!CKEDITOR.tools.arrayCompare(r.start,u.start)||!CKEDITOR.tools.arrayCompare(r.end,u.end))return!1}return!0}};t.prototype={type:function(t,i){var e=!i&&t!=this.lastKeystroke,r=this.editor,u,f;(!this.typing||i&&!this.wasCharacter||e)&&(u=new n(r),f=this.snapshots.length,CKEDITOR.tools.setTimeout(function(){var n=r.getSnapshot();CKEDITOR.env.ie&&(n=n.replace(/\s+data-cke-expando=".*?"/g,""));u.contents!=n&&f==this.snapshots.length&&(this.typing=!0,this.save(!1,u,!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=t;(this.wasCharacter=i)?(this.modifiersCount=0,this.typesCount++,25<this.typesCount?(this.save(!1,null,!1),this.typesCount=1):setTimeout(function(){r.fire("change")},0)):(this.typesCount=0,this.modifiersCount++,25<this.modifiersCount?(this.save(!1,null,!1),this.modifiersCount=1):setTimeout(function(){r.fire("change")},0))},reset:function(){this.lastKeystroke=0;this.snapshots=[];this.index=-1;this.limit=this.editor.config.undoStackSize||20;this.currentImage=null;this.hasRedo=this.hasUndo=!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(t,i,r){if(this.locked)return!1;var u=this.snapshots;if(i||(i=new n(this.editor)),!1===i.contents)return!1;if(this.currentImage)if(i.equalsContent(this.currentImage)){if(t||i.equalsSelection(this.currentImage))return!1}else this.editor.fire("change");return u.splice(this.index+1,u.length-this.index-1),u.length==this.limit&&u.shift(),this.index=u.push(i)-1,this.currentImage=i,!1!==r&&this.fireChange(),!0},restoreImage:function(n){var i=this.editor,t;n.bookmarks&&(i.focus(),t=i.getSelection());this.locked=1;this.editor.loadSnapshot(n.contents);n.bookmarks?t.selectBookmarks(n.bookmarks):CKEDITOR.env.ie&&(t=this.editor.document.getBody().$.createTextRange(),t.collapse(!0),t.select());this.locked=0;this.index=n.index;this.currentImage=this.snapshots[this.index];this.update();this.fireChange();i.fire("change")},getNextImage:function(n){var i=this.snapshots,r=this.currentImage,t;if(r)if(n){for(t=this.index-1;0<=t;t--)if(n=i[t],!r.equalsContent(n))return n.index=t,n}else for(t=this.index+1;t<i.length;t++)if(n=i[t],!r.equalsContent(n))return n.index=t,n;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 n=this.getNextImage(!0);if(n)return this.restoreImage(n),!0}return!1},redo:function(){if(this.redoable()&&(this.save(!0),this.redoable())){var n=this.getNextImage(!1);if(n)return this.restoreImage(n),!0}return!1},update:function(t){if(!this.locked){t||(t=new n(this.editor));for(var i=this.index,r=this.snapshots;0<i&&this.currentImage.equalsContent(r[i-1]);)i-=1;r.splice(i,this.index-i+1,t);this.index=i;this.currentImage=t}},lock:function(t){this.locked?this.locked.level++:t?this.locked={level:1}:(t=new n(this.editor,!0),this.locked={update:this.currentImage&&this.currentImage.equalsContent(t)?t:null,level:1})},unlock:function(){if(this.locked&&!--this.locked.level){var t=this.locked.update,i=t&&new n(this.editor,!0);this.locked=null;t&&!t.equalsContent(i)&&this.update()}}}}();CKEDITOR.config.wsc_removeGlobalVariable=!0;CKEDITOR.plugins.add("wsc",{requires:"dialog",parseApi:function(n){n.config.wsc_onFinish="function"==typeof n.config.wsc_onFinish?n.config.wsc_onFinish:function(){};n.config.wsc_onClose="function"==typeof n.config.wsc_onClose?n.config.wsc_onClose:function(){}},parseConfig:function(n){n.config.wsc_customerId=n.config.wsc_customerId||CKEDITOR.config.wsc_customerId||"1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk";n.config.wsc_customDictionaryIds=n.config.wsc_customDictionaryIds||CKEDITOR.config.wsc_customDictionaryIds||"";n.config.wsc_userDictionaryName=n.config.wsc_userDictionaryName||CKEDITOR.config.wsc_userDictionaryName||"";n.config.wsc_customLoaderScript=n.config.wsc_customLoaderScript||CKEDITOR.config.wsc_customLoaderScript;CKEDITOR.config.wsc_cmd=n.config.wsc_cmd||CKEDITOR.config.wsc_cmd||"spell";CKEDITOR.config.wsc_version=CKEDITOR.version+" | %Rev%"},init:function(n){this.parseConfig(n);this.parseApi(n);n.addCommand("checkspell",new CKEDITOR.dialogCommand("checkspell")).modes={wysiwyg:!CKEDITOR.env.opera&&!CKEDITOR.env.air&&document.domain==window.location.hostname};"undefined"==typeof n.plugins.scayt&&n.ui.addButton&&n.ui.addButton("SpellChecker",{label:n.lang.wsc.toolbar,command:"checkspell",toolbar:"spellchecker,10"});CKEDITOR.dialog.add("checkspell",this.path+(CKEDITOR.env.ie&&8>=CKEDITOR.env.version?"dialogs/wsc_ie.js":window.postMessage?"dialogs/wsc.js":"dialogs/wsc_ie.js"))}}),function(){function i(n,t){CKEDITOR.tools.extend(this,{editor:n,editable:n.editable(),doc:n.document,win:n.window},t,!0);this.frame=this.win.getFrame();this.inline=this.editable.isInline();this.target=this[this.inline?"editable":"doc"]}function r(n,t){CKEDITOR.tools.extend(this,t,{editor:n},!0)}function u(n,t){var i=n.editable();CKEDITOR.tools.extend(this,{editor:n,editable:i,doc:n.document,win:n.window,container:CKEDITOR.document.getBody(),winTop:CKEDITOR.document.getWindow()},t,!0);this.hidden={};this.visible={};this.inline=i.isInline();this.inline||(this.frame=this.win.getFrame());this.queryViewport();var r=CKEDITOR.tools.bind(this.queryViewport,this),u=CKEDITOR.tools.bind(this.hideVisible,this),e=CKEDITOR.tools.bind(this.removeAll,this);i.attachListener(this.winTop,"resize",r);i.attachListener(this.winTop,"scroll",r);i.attachListener(this.winTop,"resize",u);i.attachListener(this.win,"scroll",u);i.attachListener(this.inline?i:this.frame,"mouseout",function(n){var t=n.data.$.clientX,n=n.data.$.clientY;this.queryViewport();(t<=this.rect.left||t>=this.rect.right||n<=this.rect.top||n>=this.rect.bottom)&&this.hideVisible();(t<=0||t>=this.winTopPane.width||n<=0||n>=this.winTopPane.height)&&this.hideVisible()},this);i.attachListener(n,"resize",r);i.attachListener(n,"mode",e);n.on("destroy",e);this.lineTpl=new CKEDITOR.template(s).output({lineStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},o,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},f,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},f,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function n(n){return n&&n.type==CKEDITOR.NODE_ELEMENT&&!(t[n.getComputedStyle("float")]||t[n.getAttribute("align")])&&!e[n.getComputedStyle("position")]}var t,e;CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;i.prototype={start:function(n){var r=this,f=this.editor,o=this.doc,u,t,i,e=CKEDITOR.tools.eventsBuffer(50,function(){f.readOnly||"wysiwyg"!=f.mode||(r.relations={},u=new CKEDITOR.dom.element(o.$.elementFromPoint(t,i)),r.traverseSearch(u),isNaN(t+i)||r.pixelSearch(u,t,i),n&&n(r.relations,t,i))});this.listener=this.editable.attachListener(this.target,"mousemove",function(n){t=n.data.$.clientX;i=n.data.$.clientY;e.input()});this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){e.reset()})},stop:function(){this.listener&&this.listener.removeListener()},getRange:function(){var n={};return n[CKEDITOR.LINEUTILS_BEFORE]=CKEDITOR.POSITION_BEFORE_START,n[CKEDITOR.LINEUTILS_AFTER]=CKEDITOR.POSITION_AFTER_END,n[CKEDITOR.LINEUTILS_INSIDE]=CKEDITOR.POSITION_AFTER_START,function(t){var i=this.editor.createRange();return i.moveToPosition(this.relations[t.uid].element,n[t.type]),i}}(),store:function(){function t(n,t,i){var r=n.getUniqueId();r in i?i[r].type|=t:i[r]={element:n,type:t}}return function(i,r){var u;r&CKEDITOR.LINEUTILS_AFTER&&n(u=i.getNext())&&u.isVisible()&&(t(u,CKEDITOR.LINEUTILS_BEFORE,this.relations),r^=CKEDITOR.LINEUTILS_AFTER);r&CKEDITOR.LINEUTILS_INSIDE&&n(u=i.getFirst())&&u.isVisible()&&(t(u,CKEDITOR.LINEUTILS_BEFORE,this.relations),r^=CKEDITOR.LINEUTILS_INSIDE);t(i,r,this.relations)}}(),traverseSearch:function(t){var r,u,i;do if(i=t.$["data-cke-expando"],!(i&&i in this.relations)){if(t.equals(this.editable))break;if(n(t))for(r in this.lookups)(u=this.lookups[r](t))&&this.store(t,u)}while(!(t&&t.type==CKEDITOR.NODE_ELEMENT&&"true"==t.getAttribute("contenteditable"))&&(t=t.getParent()))},pixelSearch:function(){function t(t,r,u,f,e){for(var s=0,o;e(u);){if(u+=f,25==++s)break;if(o=this.doc.$.elementFromPoint(r,u))if(o==t)s=0;else if(i(t,o)&&(s=0,n(o=new CKEDITOR.dom.element(o))))return o}}var i=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(n,t){return n.contains(t)}:function(n,t){return!!(n.compareDocumentPosition(t)&16)};return function(i,r,u){var e=this.win.getViewPaneSize().height,f=t.call(this,i.$,r,u,-1,function(n){return 0<n}),r=t.call(this,i.$,r,u,1,function(n){return n<e});if(f)for(this.traverseSearch(f);!f.getParent().equals(i);)f=f.getParent();if(r)for(this.traverseSearch(r);!r.getParent().equals(i);)r=r.getParent();for(;f||r;){if(f&&(f=f.getNext(n)),!f||f.equals(r))break;if(this.traverseSearch(f),r&&(r=r.getPrevious(n)),!r||r.equals(f))break;this.traverseSearch(r)}}}(),greedySearch:function(){this.relations={};for(var u=this.editable.getElementsByTag("*"),f=0,t,i,r;t=u.getItem(f++);)if(!t.equals(this.editable)&&(t.hasAttribute("contenteditable")||!t.isReadOnly())&&n(t)&&t.isVisible())for(r in this.lookups)(i=this.lookups[r](t))&&this.store(t,i);return this.relations}};r.prototype={locate:function(){function r(t,i){var r=t.element[i===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();return r&&n(r)?(t.siblingRect=r.getClientRect(),i==CKEDITOR.LINEUTILS_BEFORE?(t.siblingRect.bottom+t.elementRect.top)/2:(t.elementRect.bottom+t.siblingRect.top)/2):i==CKEDITOR.LINEUTILS_BEFORE?t.elementRect.top:t.elementRect.bottom}var t,i;return function(n){this.locations={};for(i in n)t=n[i],t.elementRect=t.element.getClientRect(),t.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(i,CKEDITOR.LINEUTILS_BEFORE,r(t,CKEDITOR.LINEUTILS_BEFORE)),t.type&CKEDITOR.LINEUTILS_AFTER&&this.store(i,CKEDITOR.LINEUTILS_AFTER,r(t,CKEDITOR.LINEUTILS_AFTER)),t.type&CKEDITOR.LINEUTILS_INSIDE&&this.store(i,CKEDITOR.LINEUTILS_INSIDE,(t.elementRect.top+t.elementRect.bottom)/2);return this.locations}}(),sort:function(){var f,n,r,t,u,i;return function(e,o){f=this.locations;n=[];for(t in f)for(u in f[t])if(r=Math.abs(e-f[t][u]),n.length){for(i=0;i<n.length;i++)if(r<n[i].dist){n.splice(i,0,{uid:+t,type:u,dist:r});break}i==n.length&&n.push({uid:+t,type:u,dist:r})}else n.push({uid:+t,type:u,dist:r});return"undefined"!=typeof o?n.slice(0,o):n}}(),store:function(n,t,i){this.locations[n]||(this.locations[n]={});this.locations[n][t]=i}};var f={display:"block",width:"0px",height:"0px","border-color":"transparent","border-style":"solid",position:"absolute",top:"-6px"},o={height:"0px","border-top":"1px dashed red",position:"absolute","z-index":9999},s='<div data-cke-lineutils-line="1" class="cke_reset_all" style="{lineStyle}"><span style="{tipLeftStyle}">&nbsp;<\/span><span style="{tipRightStyle}">&nbsp;<\/span><\/div>';u.prototype={removeAll:function(){for(var n in this.hidden)this.hidden[n].remove(),delete this.hidden[n];for(n in this.visible)this.visible[n].remove(),delete this.visible[n]},hideLine:function(n){var t=n.getUniqueId();n.hide();this.hidden[t]=n;delete this.visible[t]},showLine:function(n){var t=n.getUniqueId();n.show();this.visible[t]=n;delete this.hidden[t]},hideVisible:function(){for(var n in this.visible)this.hideLine(this.visible[n])},placeLine:function(n,t){var u,i,r;if(u=this.getStyle(n.uid,n.type)){for(r in this.visible)if(this.visible[r].getCustomData("hash")!==this.hash){i=this.visible[r];break}if(!i)for(r in this.hidden)if(this.hidden[r].getCustomData("hash")!==this.hash){this.showLine(i=this.hidden[r]);break}i||this.showLine(i=this.addLine());i.setCustomData("hash",this.hash);this.visible[i.getUniqueId()]=i;i.setStyles(u);t&&t(i)}},getStyle:function(n,t){var r=this.relations[n],f=this.locations[n][t],i={},u;if(i.width=r.siblingRect?Math.max(r.siblingRect.width,r.elementRect.width):r.elementRect.width,i.top=this.inline?f+this.winTopScroll.y:this.rect.top+this.winTopScroll.y+f,i.top-this.winTopScroll.y<this.rect.top||i.top-this.winTopScroll.y>this.rect.bottom)return!1;this.inline?i.left=r.elementRect.left:(0<r.elementRect.left?i.left=this.rect.left+r.elementRect.left:(i.width+=r.elementRect.left,i.left=this.rect.left),0<(r=i.left+i.width-(this.rect.left+this.winPane.width)))&&(i.width-=r);i.left+=this.winTopScroll.x;for(u in i)i[u]=CKEDITOR.tools.cssLength(i[u]);return i},addLine:function(){var n=CKEDITOR.dom.element.createFromHtml(this.lineTpl);return n.appendTo(this.container),n},prepare:function(n,t){this.relations=n;this.locations=t;this.hash=Math.random()},cleanup:function(){var n,t;for(t in this.visible)n=this.visible[t],n.getCustomData("hash")!==this.hash&&this.hideLine(n)},queryViewport:function(){this.winPane=this.win.getViewPaneSize();this.winTopScroll=this.winTop.getScrollPosition();this.winTopPane=this.winTop.getViewPaneSize();this.rect=this.inline?this.editable.getClientRect():this.frame.getClientRect()}};t={left:1,right:1,center:1};e={absolute:1,fixed:1};CKEDITOR.plugins.lineutils={finder:i,locator:r,liner:u}}(),function(){function u(n){this.editor=n;this.registered={};this.instances={};this.selected=[];this.widgetHoldingFocusedEditable=this.focused=null;this._={nextId:0,upcasts:[],filters:{}};ot(this);pt(this);vt(this);ct(this);lt(this);ht(this);at(this)}function n(t,i,r,u,f){var e=t.editor;CKEDITOR.tools.extend(this,u,{editor:e,id:i,inline:"span"==r.getParent().getName(),element:r,data:CKEDITOR.tools.extend({},"function"==typeof u.defaults?u.defaults():u.defaults),dataReady:!1,inited:!1,ready:!1,edit:n.prototype.edit,focusedEditable:null,definition:u,repository:t,draggable:!1!==u.draggable,_:{downcastFn:u.downcast&&"string"==typeof u.downcast?u.downcasts[u.downcast]:u.downcast}},!0);this.inline&&CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.draggable=!1);t.fire("instanceCreated",this);ni(this,u);this.init&&this.init();this.inited=!0;(t=this.element.data("cke-widget-data"))&&this.setData(JSON.parse(t));f&&this.setData(f);this.dataReady=!0;nt(this);this.fire("data",this.data);this.isInited()&&e.editable().contains(this.wrapper)&&(this.ready=!0,this.fire("ready"))}function f(n,t,i){CKEDITOR.dom.element.call(this,t.$);this.editor=n;t=this.filter=i.filter;CKEDITOR.dtd[this.getName()].p?(this.enterMode=t?t.getAllowedEnterMode(n.enterMode):n.enterMode,this.shiftEnterMode=t?t.getAllowedEnterMode(n.shiftEnterMode,!0):n.shiftEnterMode):this.enterMode=this.shiftEnterMode=CKEDITOR.ENTER_BR}function it(n,i){n.addCommand(i.name,{exec:function(){function u(){n.widgets.finalizeCreation(e)}var t=n.widgets.focused;if(t&&t.name==i.name)t.edit();else if(i.insert)i.insert();else if(i.template){var t="function"==typeof i.defaults?i.defaults():i.defaults,t=CKEDITOR.dom.element.createFromHtml(i.template.output(t)),r,f=n.widgets.wrapElement(t,i.name),e=new CKEDITOR.dom.documentFragment(f.getDocument());e.append(f);(r=n.widgets.initOn(t,i))?(t=r.once("edit",function(t){if(t.data.dialog)r.once("dialog",function(t){var t=t.data,i,f;i=t.once("ok",u,null,null,20);f=t.once("cancel",function(){n.widgets.destroy(r,!0)});t.once("hide",function(){i.removeListener();f.removeListener()})});else u()},null,null,999),r.edit(),t.removeListener()):u()}},refresh:function(n,i){this.setState(t(n.editable(),i.blockLimit)?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF)},context:"div",allowedContent:i.allowedContent,requiredContent:i.requiredContent,contentForms:i.contentForms,contentTransformations:i.contentTransformations})}function o(n,t){n.focused=null;t.isInited()&&(n.fire("widgetBlurred",{widget:t}),t.setFocused(!1))}function rt(n){var t=n.parent;t.type==CKEDITOR.NODE_ELEMENT&&t.attributes["data-cke-widget-wrapper"]&&t.replaceWith(n)}function s(n,t,i){if(!i.allowedContent)return null;var r=this._.filters[n];return r||(this._.filters[n]=r={}),(n=r[t])||(r[t]=n=new CKEDITOR.filter(i.allowedContent)),n}function t(n,i){return!i||i.equals(n)?null:y(i)?i:t(n,i.getParent())}function h(n){return{tabindex:-1,contenteditable:"false","data-cke-widget-wrapper":1,"data-cke-filter":"off","class":"cke_widget_wrapper cke_widget_new cke_widget_"+(n?"inline":"block")}}function c(n,t,i){var r;if(n.type==CKEDITOR.NODE_ELEMENT&&(r=CKEDITOR.dtd[n.name],r&&!r[i.name])){var r=n.split(t),u=n.parent,t=r.getIndex();return n.children.length||(t-=1,n.remove()),r.children.length||r.remove(),c(u,t,i)}n.add(i,t)}function l(n){return n.type==CKEDITOR.NODE_ELEMENT&&!!n.attributes["data-widget"]}function e(n){return n.type==CKEDITOR.NODE_ELEMENT&&n.hasAttribute("data-widget")}function a(n,t){return"boolean"==typeof n.inline?n.inline:!!CKEDITOR.dtd.$inline[t]}function v(n){return n.type==CKEDITOR.NODE_ELEMENT&&n.hasAttribute("data-cke-widget-wrapper")}function y(n){return n.type==CKEDITOR.NODE_ELEMENT&&n.hasAttribute("data-cke-widget-editable")}function ut(n){return n.hasAttribute("data-cke-temp")}function p(n,t){var i=t.wrapper.getOuterHtml();t.wrapper.remove();n.widgets.destroy(t,!0);n.execCommand("paste",i);n.fire("unlockSnapshot")}function r(n,t,i,r){var u=n.editor;u.fire("lockSnapshot");i?(r=i.data("cke-widget-editable"),r=t.editables[r],n.widgetHoldingFocusedEditable=t,t.focusedEditable=r,i.addClass("cke_widget_editable_focused"),r.filter&&u.setActiveFilter(r.filter),u.setActiveEnterMode(r.enterMode,r.shiftEnterMode)):(r||t.focusedEditable.removeClass("cke_widget_editable_focused"),t.focusedEditable=null,n.widgetHoldingFocusedEditable=null,u.setActiveFilter(null),u.setActiveEnterMode(null,null));u.fire("unlockSnapshot")}function ft(n){n.contextMenu&&n.contextMenu.addListener(function(t){if(t=n.widgets.getByElement(t,!0))return t.fire("contextMenu",{})})}function et(n,t){return CKEDITOR.tools.trim(t)}function ot(n){var t=n.editor;yt(n);st(n);t.on("contentDomUnload",function(){n.destroyAll(!0)});t.on("paste",function(n){n.data.dataValue=n.data.dataValue.replace(ii,et)})}function st(n){var t=n.editor,i={};t.on("toDataFormat",function(t){var u=CKEDITOR.tools.getNextNumber(),r=[];t.data.downcastingSessionId=u;i[u]=r;t.data.dataValue.forEach(function(t){var i=t.attributes,u;if("data-cke-widget-id"in i)(i=n.instances[i["data-cke-widget-id"]])&&(u=t.getFirst(l),r.push({wrapper:t,element:u,widget:i}),"1"!=u.attributes["data-cke-widget-keep-attr"]&&delete u.attributes["data-widget"]);else if("data-cke-widget-editable"in i)return delete i.contenteditable,t.setHtml(r[r.length-1].widget.editables[i["data-cke-widget-editable"]].getData()),!1},CKEDITOR.NODE_ELEMENT)},null,null,8);t.on("toDataFormat",function(n){if(n.data.downcastingSessionId)for(var n=i[n.data.downcastingSessionId],r,t,u;r=n.shift();)t=r.widget,u=r.element,(t=t._.downcastFn&&t._.downcastFn.call(t,u))||(t=u),r.wrapper.replaceWith(t)},null,null,13)}function ht(n){var t=n.editor,i=CKEDITOR.plugins.lineutils;t.on("contentDom",function(){var r=t.editable();r.attachListener(r.isInline()?r:t.document,"drop",function(i){var u=i.data.$.dataTransfer.getData("text"),r,f;if(u){try{r=JSON.parse(u)}catch(e){return}"cke-widget"==r.type&&(i.data.preventDefault(),r.editor==t.name&&(f=n.instances[r.id]))&&(f.focus(),t.fire("saveSnapshot"),t.fire("lockSnapshot",{dontUpdate:!0}),r=i.data.$,u=t.createRange(),i.data.testRange?i.data.testRange.select():(document.caretRangeFromPoint?(i=t.document.$.caretRangeFromPoint(r.clientX,r.clientY),u.setStart(CKEDITOR.dom.node(i.startContainer),i.startOffset),u.collapse(!0)):r.rangeParent?(u.setStart(CKEDITOR.dom.node(r.rangeParent),r.rangeOffset),u.collapse(!0)):document.body.createTextRange&&(i=t.document.getBody().$.createTextRange(),i.moveToPoint(r.clientX,r.clientY),r="cke-temp-"+(new Date).getTime(),i.pasteHTML('<span id="'+r+'">​<\/span>'),i=t.document.getById(r),u.moveToPosition(i,CKEDITOR.POSITION_BEFORE_START),i.remove()),u.select()),CKEDITOR.env.gecko?setTimeout(p,0,t,f):p(t,f))}});CKEDITOR.tools.extend(n,{finder:new i.finder(t,{lookups:{"default":function(n){if(!n.is(CKEDITOR.dtd.$listItem)&&n.is(CKEDITOR.dtd.$block)){for(;n;){if(y(n))return;n=n.getParent()}return CKEDITOR.LINEUTILS_BEFORE|CKEDITOR.LINEUTILS_AFTER}}}}),locator:new i.locator(t),liner:new i.liner(t,{lineStyle:{cursor:"move !important","border-top-color":"#666"},tipLeftStyle:{"border-left-color":"#666"},tipRightStyle:{"border-right-color":"#666"}})},!0)})}function ct(n){var i=n.editor;i.on("contentDom",function(){var u=i.editable(),e=u.isInline()?u:i.document,r,f;u.attachListener(e,"mousedown",function(i){var u=i.data.getTarget();if(!u.type)return!1;r=n.getByElement(u);f=0;r&&(r.inline&&u.type==CKEDITOR.NODE_ELEMENT&&u.hasAttribute("data-cke-widget-drag-handler")?f=1:t(r.wrapper,u)?r=null:(i.data.preventDefault(),CKEDITOR.env.ie||r.focus()))});u.attachListener(e,"mouseup",function(){r&&f&&(f=0,r.focus())});CKEDITOR.env.ie&&u.attachListener(e,"mouseup",function(){r&&setTimeout(function(){r.focus();r=null})})});i.on("doubleclick",function(i){var r=n.getByElement(i.data.element);if(r&&!t(r.wrapper,i.data.element))return r.fire("doubleclick",{element:i.data.element})},null,null,1)}function lt(n){n.editor.on("key",function(t){var r=n.focused,i=n.widgetHoldingFocusedEditable,u;return r?u=r.fire("key",{keyCode:t.data.keyCode}):i&&(r=t.data.keyCode,t=i.focusedEditable,r==CKEDITOR.CTRL+65?(r=t.getBogus(),i=i.editor.createRange(),i.selectNodeContents(t),r&&i.setEndAt(r,CKEDITOR.POSITION_BEFORE_START),i.select(),u=!1):8==r||46==r?(u=i.editor.getSelection().getRanges(),i=u[0],u=!(1==u.length&&i.collapsed&&i.checkBoundaryOfElement(t,CKEDITOR[8==r?"START":"END"]))):u=void 0),u},null,null,1)}function at(n){function t(t){n.focused&&k(n.focused,"cut"==t.name)}var i=n.editor;i.on("contentDom",function(){var n=i.editable();n.attachListener(n,"copy",t);n.attachListener(n,"cut",t)})}function vt(n){var i=n.editor;i.on("selectionCheck",function(){n.fire("checkSelection")});n.on("checkSelection",n.checkSelection,n);i.on("selectionChange",function(u){var f=(u=t(i.editable(),u.data.selection.getStartElement()))&&n.getByElement(u),e=n.widgetHoldingFocusedEditable;e?e===f&&e.focusedEditable.equals(u)||(r(n,e,null),f&&u&&r(n,f,u)):f&&u&&r(n,f,u)});i.on("dataReady",function(){w(n).commit()});i.on("blur",function(){var t;(t=n.focused)&&o(n,t);(t=n.widgetHoldingFocusedEditable)&&r(n,t,null)})}function yt(n){var t=n.editor,i=n._.upcasts,u,r;t.on("dataReady",function(){if(r)for(var o=t.editable().find(".cke_widget_wrapper"),u,i,f=0,s=o.count();f<s;++f)u=o.getItem(f),i=u.getFirst(e),i.type==CKEDITOR.NODE_ELEMENT&&i.data("widget")?(i.replace(u),n.wrapElement(i)):u.remove();r=0;n.destroyAll(!0);n.initOnAll()});t.on("afterPaste",function(){t.fire("lockSnapshot");var i=n.initOnAll();u&&1==i.length&&i[0].focus();t.fire("unlockSnapshot")});t.on("loadSnapshot",function(t){/data-cke-widget/.test(t.data)&&(r=1);n.destroyAll(!0)},null,null,9);t.on("toHtml",function(t){var r=[],f;for(t.data.dataValue.forEach(function(n){if("data-cke-widget-wrapper"in n.attributes)return(n=n.getFirst(l))&&r.push([n]),!1;if("data-widget"in n.attributes)return r.push([n]),!1;if(i.length)for(var t,u,f,e=0,o=i.length;e<o;++e)if(t=i[e],f={},u=t[0](n,f))return u instanceof CKEDITOR.htmlParser.element&&(n=u),n.attributes["data-cke-widget-data"]=JSON.stringify(f),r.push([n,t[1]]),!1},CKEDITOR.NODE_ELEMENT);f=r.pop();)rt(f[0]),n.wrapElement(f[0],f[1]);u=1==t.data.dataValue.children.length&&t.data.dataValue.children[0].type==CKEDITOR.NODE_ELEMENT&&t.data.dataValue.children[0].attributes["data-cke-widget-wrapper"]},null,null,8)}function pt(n){function i(){n.fire("checkWidgets")}var t=n.editor,r=CKEDITOR.tools.eventsBuffer(n.MIN_WIDGETS_CHECK_INTERVAL,i),u={16:1,17:1,18:1,37:1,38:1,39:1,40:1,225:1};t.on("contentDom",function(){var n=t.editable();n.attachListener(n.isInline()?n:t.document,"keyup",function(n){n.data.getKey()in u||r.input()},null,null,999)});t.on("contentDomUnload",r.reset);n.on("checkWidgets",n.checkWidgets,n);t.on("contentDomInvalidated",i)}function w(n){var i=n.selected,u=[],r=i.slice(0),t=null;return{select:function(n){return 0>CKEDITOR.tools.indexOf(i,n)&&u.push(n),n=CKEDITOR.tools.indexOf(r,n),0<=n&&r.splice(n,1),this},focus:function(n){return t=n,this},commit:function(){var e=n.focused!==t,f;for(n.editor.fire("lockSnapshot"),e&&(f=n.focused)&&o(n,f);f=r.pop();)i.splice(CKEDITOR.tools.indexOf(i,f),1),f.isInited()&&f.setSelected(!1);for(e&&t&&(n.focused=t,n.fire("widgetFocused",{widget:t}),t.setFocused(!0));f=u.pop();)i.push(f),f.setSelected(!0);n.editor.fire("unlockSnapshot")}}}function b(n){n.cancel()}function k(n,t){var i=n.editor,r=i.document,s,h,o,c;if(!r.getById("cke_copybin")){var u=i.blockless||CKEDITOR.env.ie?"span":"div",f=r.createElement(u),e=r.createElement(u),u=CKEDITOR.env.ie&&9>CKEDITOR.env.version;e.setAttributes({id:"cke_copybin","data-cke-temp":"1"});f.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"});f.setStyle("ltr"==i.config.contentsLangDirection?"left":"right","-5000px");f.setHtml('<span data-cke-copybin-start="1">​<\/span>'+n.wrapper.getOuterHtml()+'<span data-cke-copybin-end="1">​<\/span>');i.fire("saveSnapshot");i.fire("lockSnapshot");e.append(f);i.editable().append(e);s=i.on("selectionChange",b,null,null,0);h=n.repository.on("checkSelection",b,null,null,0);u&&(o=r.getDocumentElement().$,c=o.scrollTop);r=i.createRange();r.selectNodeContents(f);r.select();u&&(o.scrollTop=c);setTimeout(function(){t||n.focus();e.remove();s.removeListener();h.removeListener();i.fire("unlockSnapshot");t&&(n.repository.del(n),i.fire("saveSnapshot"))},100)}}function d(){var i=CKEDITOR.document.getActive(),n=this.editor,t=n.editable();(t.isInline()?t:n.document.getWindow().getFrame()).equals(i)&&n.focusManager.focus(t)}function g(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function wt(n){var t,r,u;if(n.draggable){if(t=n.editor,t.editable(),r=new CKEDITOR.dom.element("img",t.document),u=new CKEDITOR.dom.element("span",t.document),u.setAttributes({"class":"cke_reset cke_widget_drag_handler_container",style:"background:rgba(220,220,220,0.5);background-image:url("+t.plugins.widget.path+"images/handle.png)"}),r.setAttributes({"class":"cke_reset cke_widget_drag_handler","data-cke-widget-drag-handler":"1",src:tt,width:i,title:t.lang.widget.move,height:i}),n.inline)r.setAttribute("draggable","true"),r.on("dragstart",function(i){i.data.$.dataTransfer.setData("text",JSON.stringify({type:"cke-widget",editor:t.name,id:n.id}))});else r.on("mousedown",bt,n);u.append(r);n.wrapper.append(u);n.dragHandlerContainer=u}}function bt(){function r(){var r,u,e,i,f;for(s.reset();r=n.pop();)r.removeListener();u=t;e=this.repository.finder;r=this.repository.liner;i=this.editor;f=this.editor.editable();CKEDITOR.tools.isEmpty(r.visible)||(u=e.getRange(u[0]),this.focus(),i.fire("saveSnapshot"),i.fire("lockSnapshot",{dontUpdate:1}),i.getSelection().reset(),f.insertElementIntoRange(this.wrapper,u),this.focus(),i.fire("unlockSnapshot"),i.fire("saveSnapshot"));f.removeClass("cke_widget_dragging");r.hideVisible()}var l=this.repository.finder,u=this.repository.locator,i=this.repository.liner,f=this.editor,e=f.editable(),n=[],t=[],o=l.greedySearch(),s=CKEDITOR.tools.eventsBuffer(50,function(){h=u.locate(o);t=u.sort(c,1);t.length&&(i.prepare(o,h),i.placeLine(t[0]),i.cleanup())}),h,c;e.addClass("cke_widget_dragging");n.push(e.on("mousemove",function(n){c=n.data.$.clientY;s.input()}));n.push(f.document.once("mouseup",r,this));n.push(CKEDITOR.document.once("mouseup",r,this))}function kt(n){var i,t,r=n.editables;if(n.editables={},n.editables)for(i in r)t=r[i],n.initEditable(i,"string"==typeof t?{selector:t}:t)}function dt(n){if(n.mask){var t=new CKEDITOR.dom.element("img",n.editor.document);t.setAttributes({src:tt,"class":"cke_reset cke_widget_mask"});n.wrapper.append(t);n.mask=t}}function gt(n){if(n.parts){var i={},r,t;for(t in n.parts)r=n.wrapper.findOne(n.parts[t]),i[t]=r;n.parts=i}}function ni(n,r){if(ti(n),gt(n),kt(n),dt(n),wt(n),CKEDITOR.env.ie&&9>CKEDITOR.env.version)n.wrapper.on("dragstart",function(i){t(n,i.data.getTarget())||i.data.preventDefault()});n.wrapper.removeClass("cke_widget_new");n.element.addClass("cke_widget_element");n.on("key",function(t){if(t=t.data.keyCode,13==t)n.edit();else{if(t==CKEDITOR.CTRL+67||t==CKEDITOR.CTRL+88){k(n,t==CKEDITOR.CTRL+88);return}if(t in ri||CKEDITOR.CTRL&t||CKEDITOR.ALT&t)return}return!1},null,null,999);n.on("doubleclick",function(t){n.edit();t.cancel()});if(r.data)n.on("data",r.data);if(r.edit)n.on("edit",r.edit);if(n.draggable)n.on("data",function(){var t=n.dragHandlerContainer;t.setStyle("top",n.element.$.offsetTop-i+"px");t.setStyle("left",n.element.$.offsetLeft+"px")},null,null,999)}function ti(n){(n.wrapper=n.element.getParent()).setAttribute("data-cke-widget-id",n.id)}function nt(n){n.element.data("cke-widget-data",JSON.stringify(n.data))}var i=15;CKEDITOR.plugins.add("widget",{requires:"lineutils",onLoad:function(){CKEDITOR.addCss(".cke_widget_wrapper{position:relative;outline:none}.cke_widget_inline{display:inline-block}.cke_widget_wrapper:hover>.cke_widget_element{outline:2px solid yellow;cursor:default}.cke_widget_wrapper:hover .cke_widget_editable{outline:2px solid yellow}.cke_widget_wrapper.cke_widget_focused>.cke_widget_element,.cke_widget_wrapper .cke_widget_editable.cke_widget_editable_focused{outline:2px solid #ace}.cke_widget_editable{cursor:text}.cke_widget_drag_handler_container{position:absolute;width:"+i+"px;height:0;opacity:0.75;transition:height 0s 0.2s}.cke_widget_wrapper:hover>.cke_widget_drag_handler_container{height:"+i+"px;transition:none}.cke_widget_drag_handler_container:hover{opacity:1}img.cke_widget_drag_handler{cursor:move;width:"+i+"px;height:"+i+"px;display:inline-block}.cke_widget_mask{position:absolute;top:0;left:0;width:100%;height:100%;display:block}.cke_editable.cke_widget_dragging, .cke_editable.cke_widget_dragging *{cursor:move !important}")},beforeInit:function(n){n.widgets=new u(n)},afterInit:function(n){var i=n.widgets.registered,t,r,u;for(r in i)t=i[r],(u=t.button)&&n.ui.addButton&&n.ui.addButton(CKEDITOR.tools.capitalize(t.name,!0),{label:u,command:t.name,toolbar:"insert,10"});ft(n)}});u.prototype={MIN_SELECTION_CHECK_INTERVAL:500,MIN_WIDGETS_CHECK_INTERVAL:1e3,add:function(n,t){t=CKEDITOR.tools.prototypedCopy(t);t.name=n;t._=t._||{};this.editor.fire("widgetDefinition",t);t.template&&(t.template=new CKEDITOR.template(t.template));it(this.editor,t);var r=t,i=r.upcast;if(i)if("string"==typeof i)for(i=i.split(",");i.length;)this._.upcasts.push([r.upcasts[i.pop()],r.name]);else this._.upcasts.push([i,r.name]);return t.button||this.editor.addFeature(t),this.registered[n]=t},checkSelection:function(){var n=this.editor.getSelection(),t=n.getSelectedElement(),i=w(this),r;if(t&&(r=this.getByElement(t,!0)))return i.focus(r).select(r).commit();if(n=n.getRanges()[0],!n||n.collapsed)return i.commit();for(n=new CKEDITOR.dom.walker(n),n.evaluator=v;t=n.next();)i.select(this.getByElement(t));i.commit()},checkWidgets:function(){var r,i,f,n,t,u;if("wysiwyg"==this.editor.mode&&(r=this.editor.editable(),n=this.instances,r)){for(i in n)r.contains(n[i].wrapper)||this.destroy(n[i],!0);for(f=r.find(".cke_widget_wrapper"),i=0,r=f.count();i<r;i++){if(n=f.getItem(i),t=!this.getByElement(n,!0)){n:{for(t=ut,u=n;u=u.getParent();)if(t(u)){t=!0;break n}t=!1}t=!t}t&&(n.addClass("cke_widget_new"),this.initOn(n.getFirst(e)))}}},del:function(n){if(this.focused===n){var r=n.editor,t=r.createRange(),i;(i=t.moveToClosestEditablePosition(n.wrapper,!0))||(i=t.moveToClosestEditablePosition(n.wrapper,!1));i&&r.getSelection().selectRanges([t])}n.wrapper.remove();this.destroy(n,!0)},destroy:function(n,t){this.widgetHoldingFocusedEditable===n&&r(this,n,null,t);n.destroy(t);delete this.instances[n.id];this.fire("instanceDestroyed",n)},destroyAll:function(n){var t=this.instances,i,r;for(r in t)i=t[r],this.destroy(i,n)},finalizeCreation:function(n){(n=n.getFirst())&&v(n)&&(this.editor.insertElement(n),n=this.getByElement(n),n.ready=!0,n.fire("ready"),n.focus())},getByElement:function(n,t){if(!n)return null;var i,r;for(r in this.instances)if(i=this.instances[r].wrapper,i.equals(n)||!t&&i.contains(n))return this.instances[r];return null},initOn:function(t,i,r){if(i?"string"==typeof i&&(i=this.registered[i]):i=this.registered[t.data("widget")],!i)return null;var u=this.wrapElement(t,i.name);return u?u.hasClass("cke_widget_new")?(t=new n(this,this._.nextId++,t,i,r),t.isInited()?this.instances[t.id]=t:null):this.getByElement(t):null},initOnAll:function(n){for(var n=(n||this.editor.editable()).find(".cke_widget_new"),t=[],i,r=n.count();r--;)(i=this.initOn(n.getItem(r).getFirst(e)))&&t.push(i);return t},wrapElement:function(n,t){var i=null,r,u,f;if(n instanceof CKEDITOR.dom.element){if(r=this.registered[t||n.data("widget")],!r)return null;if((i=n.getParent())&&i.type==CKEDITOR.NODE_ELEMENT&&i.data("cke-widget-wrapper"))return i;n.hasAttribute("data-cke-widget-keep-attr")||n.data("cke-widget-keep-attr",n.data("widget")?1:0);t&&n.data("widget",t);u=a(r,n.getName());i=new CKEDITOR.dom.element(u?"span":"div");i.setAttributes(h(u));i.data("cke-display-name",r.pathName?r.pathName:n.getName());n.getParent(!0)&&i.replace(n);n.appendTo(i)}else if(n instanceof CKEDITOR.htmlParser.element){if(r=this.registered[t||n.attributes["data-widget"]],!r)return null;if((i=n.parent)&&i.type==CKEDITOR.NODE_ELEMENT&&i.attributes["data-cke-widget-wrapper"])return i;"data-cke-widget-keep-attr"in n.attributes||(n.attributes["data-cke-widget-keep-attr"]=n.attributes["data-widget"]?1:0);t&&(n.attributes["data-widget"]=t);u=a(r,n.name);i=new CKEDITOR.htmlParser.element(u?"span":"div",h(u));i.attributes["data-cke-display-name"]=r.pathName?r.pathName:n.name;r=n.parent;r&&(f=n.getIndex(),n.remove());i.add(n);r&&c(r,f,i)}return i},_tests_getNestedEditable:t,_tests_createEditableFilter:s};CKEDITOR.event.implementOn(u.prototype);n.prototype={destroy:function(n){if(this.fire("destroy"),this.editables)for(var t in this.editables)this.destroyEditable(t,n);n||("0"==this.element.data("cke-widget-keep-attr")&&this.element.removeAttribute("data-widget"),this.element.removeAttributes(["data-cke-widget-data","data-cke-widget-keep-attr"]),this.element.removeClass("cke_widget_element"),this.element.replace(this.wrapper));this.wrapper=null},destroyEditable:function(n,t){var i=this.editables[n];i.removeListener("focus",g);i.removeListener("blur",d);this.editor.focusManager.remove(i);t||(i.removeClass("cke_widget_editable"),i.removeClass("cke_widget_editable_focused"),i.removeAttributes(["contenteditable","data-cke-widget-editable","data-cke-enter-mode"]));delete this.editables[n]},edit:function(){var t={dialog:this.dialog},n=this;this.fire("edit",t)&&t.dialog&&this.editor.openDialog(t.dialog,function(t){var i,r;n.fire("dialog",t)&&(i=t.on("show",function(){t.setupContent(n)}),r=t.on("ok",function(){var i,r=n.on("data",function(n){i=1;n.cancel()},null,null,0);n.editor.fire("saveSnapshot");t.commitContent(n);r.removeListener();i&&(n.fire("data",n.data),n.editor.fire("saveSnapshot"))}),t.once("hide",function(){i.removeListener();r.removeListener()}))})},initEditable:function(n,t){var i=this.wrapper.findOne(t.selector);return i&&i.is(CKEDITOR.dtd.$editable)?(i=new f(this.editor,i,{filter:s.call(this.repository,this.name,n,t)}),this.editables[n]=i,i.setAttributes({contenteditable:"true","data-cke-widget-editable":n,"data-cke-enter-mode":i.enterMode}),i.filter&&i.data("cke-filter",i.filter.id),i.addClass("cke_widget_editable"),i.removeClass("cke_widget_editable_focused"),t.pathName&&i.data("cke-display-name",t.pathName),this.editor.focusManager.add(i),i.on("focus",g,this),CKEDITOR.env.ie&&i.on("blur",d,this),i.setData(i.getHtml()),!0):!1},isInited:function(){return!(!this.wrapper||!this.inited)},isReady:function(){return this.isInited()&&this.ready},focus:function(){var n=this.editor.getSelection();n&&n.fake(this.wrapper);this.editor.focus()},setData:function(n,t){var i=this.data,u=0,r;if("string"==typeof n)i[n]!==t&&(i[n]=t,u=1);else{r=n;for(n in r)i[n]!==r[n]&&(u=1,i[n]=r[n])}return u&&this.dataReady&&(nt(this),this.fire("data",i)),this},setFocused:function(n){return this.wrapper[n?"addClass":"removeClass"]("cke_widget_focused"),this.fire(n?"focus":"blur"),this},setSelected:function(n){return this.wrapper[n?"addClass":"removeClass"]("cke_widget_selected"),this.fire(n?"select":"deselect"),this}};CKEDITOR.event.implementOn(n.prototype);f.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.dom.element.prototype),{setData:function(n){n=this.editor.dataProcessor.toHtml(n,{context:this.getName(),filter:this.filter,enterMode:this.enterMode});this.setHtml(n)},getData:function(){return this.editor.dataProcessor.toDataFormat(this.getHtml(),{context:this.getName(),filter:this.filter,enterMode:this.enterMode})}});var ii=RegExp('^(?:<(?:div|span)(?: data-cke-temp="1")?(?: id="cke_copybin")?(?: data-cke-temp="1")?>)?(?:<(?:div|span)(?: style="[^"]+")?>)?<span [^>]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\\s\\S]+)<span [^>]*data-cke-copybin-end="1"[^>]*>.?<\/span>(?:<\/(?:div|span)>)?(?:<\/(?:div|span)>)?$'),tt="data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D",ri={37:1,38:1,39:1,40:1,8:1,46:1};CKEDITOR.plugins.widget=n;n.repository=u;n.nestedEditable=f}(),function(){function t(n){var t,i;return(n.name in{div:1,p:1})?(t=n.children,1!==t.length)?!1:(t=t[0],i=t.name,"img"!=i&&!("figure"==i&&t.hasClass("caption"))?!1:"center"==CKEDITOR.tools.parseCssText(n.attributes.style||"",!0)["text-align"]?!0:!1):!1}function r(n){var t=n.data,t={width:t.width,height:t.height},n=n.parts.image,i;for(i in t)t[i]?n.setAttribute(i,t[i]):n.removeAttribute(i)}function u(n){var i=n.editor,e=i.editable(),r=i.document,t=r.createElement("span"),f,u;t.addClass("cke_image2_resizer");t.setAttribute("title",i.lang.image2.resizer);t.append(new CKEDITOR.dom.text("​",r));n.inline?n.wrapper.append(t):(f=n.element.getFirst(),u=r.createElement("span"),u.addClass("cke_image2_resizer_wrapper"),u.append(n.parts.image),u.append(t),n.element.append(u,!0),f.is("span")&&f.remove());t.on("mousedown",function(u){function d(n,t,i){var f=CKEDITOR.document,u=[];if(r.equals(f)||u.push(f.on(n,t)),u.push(r.on(n,t)),i)for(n=u.length;n--;)i.push(u.pop())}function o(){c=g+w*a;l=Math.round(c/h)}function s(){l=nt-f;c=Math.round(l*h)}var p=n.parts.image,w="right"==n.data.align?-1:1,it=u.data.$.screenX,rt=u.data.$.screenY,g=p.$.clientWidth,nt=p.$.clientHeight,h=g/nt,b=[],tt="cke_image2_s"+(~w?"e":"w"),k,c,l,y,a,f,v;i.fire("saveSnapshot");d("mousemove",function(n){k=n.data.$;a=k.screenX-it;f=rt-k.screenY;v=Math.abs(a/f);1==w?0>=a?0>=f?o():v>=h?o():s():0>=f?v>=h?s():o():s():0>=a?0>=f?v>=h?s():o():s():0>=f?o():v>=h?o():s();15<=c&&15<=l?(p.setAttributes({width:c,height:l}),y=!0):y=!1},b);d("mouseup",function(){for(var r;r=b.pop();)r.removeListener();y&&(n.setData({width:c,height:l}),i.fire("saveSnapshot"));e.removeClass(tt);t.removeClass("cke_image2_resizing");y=!1},b);e.addClass(tt);t.addClass("cke_image2_resizing")});n.on("data",function(){t["right"==n.data.align?"addClass":"removeClass"]("cke_image2_resizer_left")})}function f(n){var t=[];return function(r){var u=n.getCommand("justify"+r);if(u){if(t.push(function(){u.refresh(n,n.elementPath())}),r in{right:1,left:1,center:1})u.on("exec",function(u){var f=i(n);if(f){for(f.setData("align",r),f=t.length;f--;)t[f]();u.cancel()}});u.on("refresh",function(t){var u=i(n);u&&(this.setState(u.data.align==r?CKEDITOR.TRISTATE_ON:r in{right:1,left:1,center:1}?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),t.cancel())})}}}function i(n){return(n=n.widgets.focused)&&"image2"==n.name?n:null}var e=/^\s*(\d+\%)\s*$/i,n;CKEDITOR.plugins.add("image2",{requires:"widget,dialog",icons:"image2",hidpi:!0,onLoad:function(){CKEDITOR.addCss(".cke_editable.cke_image2_sw, .cke_editable.cke_image2_sw *{cursor:sw-resize !important}.cke_editable.cke_image2_se, .cke_editable.cke_image2_se *{cursor:se-resize !important}.cke_image2_resizer{display:none;position:absolute;width:10px;height:10px;bottom:-5px;right:-5px;background:#000;outline:1px solid #fff;cursor:se-resize;}.cke_image2_resizer_wrapper{position:relative;display:inline-block;line-height:0;}.cke_image2_resizer.cke_image2_resizer_left{right:auto;left:-5px;cursor:sw-resize;}.cke_widget_wrapper:hover .cke_image2_resizer,.cke_image2_resizer.cke_image2_resizing{display:block}")},init:function(t){var i=t.config,r=t.lang.image2;i.filebrowserImage2BrowseUrl=i.filebrowserImageBrowseUrl;i.filebrowserImage2UploadUrl=i.filebrowserImageUploadUrl;n.pathName=r.pathName;n.editables.caption.pathName=r.pathNameCaption;t.widgets.add("image2",n);t.ui.addButton&&t.ui.addButton("image2",{label:t.lang.common.image,command:"image2",toolbar:"insert,10"});t.contextMenu&&(t.addMenuGroup("image2",10),t.addMenuItem("image2",{label:r.menu,command:"image2",group:"image2"}));CKEDITOR.dialog.add("image2",this.path+"dialogs/image2.js")},afterInit:function(n){var n=f(n),t;for(t in{left:1,right:1,center:1,block:1})n(t)}});n={allowedContent:{div:{match:t,styles:"text-align"},figcaption:!0,figure:{classes:"!caption",styles:"float,display"},img:{attributes:"!src,alt,width,height",styles:"float"},p:{match:t,styles:"text-align"}},contentTransformations:[["img[width]: sizeToAttribute"]],editables:{caption:{selector:"figcaption",allowedContent:"br em strong sub sup u s; a[!href]"}},parts:{image:"img",caption:"figcaption"},dialog:"image2",template:'<img alt="" src="" />',data:function(){var n=this,t=n.editor;n.shiftState({element:n.element,oldState:n.oldData,newState:n.data,destroy:function(){this.destroyed||(t.widgets.focused==n&&(this.focused=!0),t.widgets.destroy(n),this.destroyed=!0)},init:function(i){if(this.destroyed)n=t.widgets.initOn(i,"image2",n.data),this.focused&&(n.focus(),delete this.focused),delete this.destroyed;else{var i=n,r=i.wrapper,u=i.data.align;"center"==u?(i.inline||r.setStyle("text-align","center"),r.removeStyle("float")):(i.inline||r.removeStyle("text-align"),"none"==u?r.removeStyle("float"):r.setStyle("float",u))}}});n.parts.image.setAttributes({src:n.data.src,"data-cke-saved-src":n.data.src,alt:n.data.alt});r(n);n.oldData=CKEDITOR.tools.extend({},n.data)},init:function(){var i=CKEDITOR.plugins.image2,n=this.parts.image,t={hasCaption:!!this.parts.caption,src:n.getAttribute("src"),alt:n.getAttribute("alt")||"",width:n.getAttribute("width")||"",height:n.getAttribute("height")||"",lock:this.ready?i.checkHasNaturalRatio(n):!0};t.align||(t.align=this.element.getStyle("float")||n.getStyle("float")||"none",this.element.removeStyle("float"),n.removeStyle("float"));t.hasCaption||this.wrapper.setStyle("line-height","0");this.setData(t);u(this);this.shiftState=i.stateShifter(this.editor);this.on("contextMenu",function(n){n.data.image2=CKEDITOR.TRISTATE_OFF});this.on("dialog",function(n){n.data.widget=this},this)},upcast:function(n,i){var u=n.name,r,f;if(!n.attributes["data-cke-realelement"]&&(t(n)?("div"==u&&(r=n.getFirst("figure"),n.replaceWith(r),n=r),i.align="center",r=n.getFirst("img")):"figure"==u&&n.hasClass("caption")?r=n.getFirst("img"):"img"==u&&(r=n),r)){for(f in{width:1,height:1})(u=r.attributes[f])&&u.match(e)&&delete r.attributes[f];return n}},downcast:function(n){var r=n.attributes,i=this.data.align,t,u;return this.inline||(t=n.getFirst("span"),u=t.getFirst("img"),t.replaceWith(u)),i&&"none"!=i&&(t=CKEDITOR.tools.parseCssText(r.style||""),"center"==i&&"p"!=n.name?n=n.wrapWith(new CKEDITOR.htmlParser.element("img"==n.name?"p":"div",{style:"text-align:center"})):i in{left:1,right:1}&&(t.float=i),CKEDITOR.tools.isEmpty(t)||(r.style=CKEDITOR.tools.writeCssText(t))),n}};CKEDITOR.plugins.image2={stateShifter:function(n){function t(n,t){return n.oldState?n.oldState[t]!==n.newState[t]:!1}function i(n){var t=u.createElement(e,{styles:{"text-align":"center"}});return r(t,n),n.move(t),t}function r(t,i){if(i.getParent()){var r=n.createRange();r.moveToPosition(i,CKEDITOR.POSITION_BEFORE_START);o.insertElementIntoRange(t,r);i.remove()}else t.replace(i)}var e=n.config.enterMode==CKEDITOR.ENTER_P?"p":"div",u=n.document,o=n.editable(),f=["hasCaption","align"],s={align:function(n,r,u){var e=n.newState.hasCaption,f=n.element;t(n,"align")?e||("center"==u&&(n.destroy(),n.element=i(f)),t(n,"hasCaption")||"center"!=r||"center"==u)||(n.destroy(),r=f.findOne("img"),r.replace(f),n.element=r):"center"==u&&t(n,"hasCaption")&&!e&&(n.destroy(),n.element=i(f));f.is("figure")&&("center"==u?f.setStyle("display","inline-block"):f.removeStyle("display"))},hasCaption:function(n,i,f){if(t(n,"hasCaption"))if(i=n.element,n.destroy(),f){var f=i.findOne("img")||i,e=CKEDITOR.dom.element.createFromHtml('<figure class="caption"><img alt="" src="" /><figcaption>Caption<\/figcaption><\/figure>',u);r(e,i);f.replace(e.findOne("img"));n.element=e}else f=i.findOne("img"),f.replace(i),n.element=f}};return function(n){for(var r=n.oldState,u=n.newState,t,i=0;i<f.length;i++)t=f[i],s[t](n,r?r[t]:null,u[t]);n.init(n.element)}},checkHasNaturalRatio:function(n){var t=n.$,n=this.getNatural(n);return Math.round(t.clientWidth/n.width*n.height)==t.clientHeight||Math.round(t.clientHeight/n.height*n.width)==t.clientWidth},getNatural:function(n){if(n.$.naturalWidth)n={width:n.$.naturalWidth,height:n.$.naturalHeight};else{var t=new Image;t.src=n.getAttribute("src");n={width:t.width,height:t.height}}return n}}}(),function(){function n(n,t,i){for(var o=[],e=[],f,u,r=0;r<n.styleSheets.length;r++)if(u=n.styleSheets[r],!(u.ownerNode||u.owningElement).getAttribute("data-cke-temp")&&!(u.href&&"chrome://"==u.href.substr(0,9)))try{for(f=u.cssRules||u.rules,u=0;u<f.length;u++)e.push(f[u].selectorText)}catch(s){}for(r=e.join(" "),r=r.replace(/(,|>|\+|~)/g," "),r=r.replace(/\[[^\]]*/g,""),r=r.replace(/#[^\s]*/g,""),r=r.replace(/\:{1,2}[^\s]*/g,""),r=r.replace(/\s+/g," "),r=r.split(" "),n=[],e=0;e<r.length;e++)f=r[e],i.test(f)&&!t.test(f)&&-1==CKEDITOR.tools.indexOf(n,f)&&n.push(f);for(r=0;r<n.length;r++)i=n[r].split("."),t=i[0].toLowerCase(),i=i[1],o.push({name:t+"."+i,element:t,attributes:{"class":i}});return o}CKEDITOR.plugins.add("stylesheetparser",{init:function(t){t.filter.disable();var i;t.once("stylesSet",function(r){r.cancel();t.once("contentDom",function(){t.getStylesSet(function(r){i=r.concat(n(t.document.$,t.config.stylesheetParser_skipSelectors||/(^body\.|^\.)/i,t.config.stylesheetParser_validSelectors||/\w+\.\w+/));t.getStylesSet=function(n){if(i)return n(i)};t.fire("stylesSet",{styles:i})})})},null,null,1)}})}(),function(){var n={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(n){this.toggleState();this.refresh(n)},refresh:function(n){if(n.document){var t=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";n.editable()[t]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var n;n=(CKEDITOR.env.ie6Compat?[".%1 table.%2,",".%1 table.%2 td, .%1 table.%2 th","{","border : #d3d3d3 1px dotted","}"]:".%1 table.%2,;.%1 table.%2 > tr > td, .%1 table.%2 > tr > th,;.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,;.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,;.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th;{;border : #d3d3d3 1px dotted;}".split(";")).join("").replace(/%2/g,"cke_show_border").replace(/%1/g,"cke_show_borders ");CKEDITOR.addCss(n)},init:function(t){var i=t.addCommand("showborders",n);i.canUndo=!1;!1!==t.config.startupShowBorders&&i.setState(CKEDITOR.TRISTATE_ON);t.on("mode",function(){i.state!=CKEDITOR.TRISTATE_DISABLED&&i.refresh(t)},null,null,100);t.on("contentDom",function(){i.state!=CKEDITOR.TRISTATE_DISABLED&&i.refresh(t)});t.on("removeFormatCleanup",function(n){n=n.data;t.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&n.is("table")&&(!n.hasAttribute("border")||0>=parseInt(n.getAttribute("border"),10))&&n.addClass("cke_show_border")})},afterInit:function(n){var t=n.dataProcessor,n=t&&t.dataFilter,t=t&&t.htmlFilter;n&&n.addRules({elements:{table:function(n){var n=n.attributes,t=n["class"],i=parseInt(n.border,10);(!i||0>=i)&&(!t||-1==t.indexOf("cke_show_border"))&&(n["class"]=(t||"")+" cke_show_border")}}});t&&t.addRules({elements:{table:function(n){var n=n.attributes,t=n["class"];t&&(n["class"]=t.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,""))}}})}});CKEDITOR.on("dialogDefinition",function(n){var t=n.data.name;("table"==t||"tableProperties"==t)&&(n=n.data.definition,t=n.getContents("info").get("txtBorder"),t.commit=CKEDITOR.tools.override(t.commit,function(n){return function(t,i){n.apply(this,arguments);var r=parseInt(this.getValue(),10);i[!r||0>=r?"addClass":"removeClass"]("cke_show_border")}}),n=(n=n.getContents("advanced"))&&n.get("advCSSClasses"))&&(n.setup=CKEDITOR.tools.override(n.setup,function(n){return function(){n.apply(this,arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}}),n.commit=CKEDITOR.tools.override(n.commit,function(n){return function(t,i){n.apply(this,arguments);parseInt(i.getAttribute("border"),10)||i.addClass("cke_show_border")}}))})}(),function(){CKEDITOR.plugins.add("templates",{requires:"dialog",init:function(n){CKEDITOR.dialog.add("templates",CKEDITOR.getUrl(this.path+"dialogs/templates.js"));n.addCommand("templates",new CKEDITOR.dialogCommand("templates"));n.ui.addButton&&n.ui.addButton("Templates",{label:n.lang.templates.button,command:"templates",toolbar:"doctools,10"})}});var n={},t={};CKEDITOR.addTemplates=function(t,i){n[t]=i};CKEDITOR.getTemplates=function(t){return n[t]};CKEDITOR.loadTemplates=function(n,i){for(var u=[],r=0,f=n.length;r<f;r++)t[n[r]]||(u.push(n[r]),t[n[r]]=1);u.length?CKEDITOR.scriptLoader.load(u,i):setTimeout(i,0)}}();CKEDITOR.config.templates_files=[CKEDITOR.getUrl("plugins/templates/templates/default.js")];CKEDITOR.config.templates_replaceContent=!0;CKEDITOR.plugins.add("divarea",{afterInit:function(n){n.addMode("wysiwyg",function(t){var i=CKEDITOR.dom.element.createFromHtml('<div class="cke_wysiwyg_div cke_reset" hidefocus="true"><\/div>');n.ui.space("contents").append(i);i=n.editable(i);i.detach=CKEDITOR.tools.override(i.detach,function(n){return function(){n.apply(this,arguments);this.remove()}});n.setData(n.getData(1),t);n.fire("contentDom")})}}),function(){function t(n,t){var t=void 0===t||t,i;if(t)i=n.getComputedStyle("text-align");else{for(;!n.hasAttribute||!n.hasAttribute("align")&&!n.getStyle("text-align");){if(i=n.getParent(),!i)break;n=i}i=n.getStyle("text-align")||n.getAttribute("align")||""}return i&&(i=i.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,"")),!i&&t&&(i="rtl"==n.getComputedStyle("direction")?"right":"left"),i}function n(n,t,i){this.editor=n;this.name=t;this.value=i;this.context="p";var t=n.config.justifyClasses,r=n.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(t){switch(i){case"left":this.cssClassName=t[0];break;case"center":this.cssClassName=t[1];break;case"right":this.cssClassName=t[2];break;case"justify":this.cssClassName=t[3]}this.cssClassRegex=RegExp("(?:^|\\s+)(?:"+t.join("|")+")(?=$|\\s)");this.requiredContent=r+"("+this.cssClassName+")"}else this.requiredContent=r+"{text-align}";this.allowedContent={"caption div h1 h2 h3 h4 h5 h6 p pre td th li":{propertiesOnly:!0,styles:this.cssClassName?null:"text-align",classes:this.cssClassName||null}};n.config.enterMode==CKEDITOR.ENTER_BR&&(this.allowedContent.div=!0)}function i(n){var f=n.editor,r=f.createRange(),u,t,i;for(r.setStartBefore(n.data.node),r.setEndAfter(n.data.node),u=new CKEDITOR.dom.walker(r);t=u.next();)t.type==CKEDITOR.NODE_ELEMENT&&(!t.equals(n.data.node)&&t.getDirection()?(r.setStartAfter(t),u=new CKEDITOR.dom.walker(r)):(i=f.config.justifyClasses,i&&(t.hasClass(i[0])?(t.removeClass(i[0]),t.addClass(i[2])):t.hasClass(i[2])&&(t.removeClass(i[2]),t.addClass(i[0]))),i=t.getStyle("text-align"),"left"==i?t.setStyle("text-align","right"):"right"==i&&t.setStyle("text-align","left")))}n.prototype={exec:function(n){var r=n.getSelection(),h=n.config.enterMode,l,s;if(r){for(var a=r.createBookmarks(),c=r.getRanges(),f=this.cssClassName,e,i,u=n.config.useComputedState,u=void 0===u||u,o=c.length-1;0<=o;o--)for(e=c[o].createIterator(),e.enlargeBr=h!=CKEDITOR.ENTER_BR;i=e.getNextParagraph(h==CKEDITOR.ENTER_P?"p":"div");)i.isReadOnly()||(i.removeAttribute("align"),i.removeStyle("text-align"),l=f&&(i.$.className=CKEDITOR.tools.ltrim(i.$.className.replace(this.cssClassRegex,""))),s=this.state==CKEDITOR.TRISTATE_OFF&&(!u||t(i,!0)!=this.value),f?s?i.addClass(f):l||i.removeAttribute("class"):s&&i.setStyle("text-align",this.value));n.focus();n.forceNextSelectionCheck();r.selectBookmarks(a)}},refresh:function(n,i){var r=i.block||i.blockLimit;this.setState("body"!=r.getName()&&t(r,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("justify",{init:function(t){if(!t.blockless){var r=new n(t,"justifyleft","left"),u=new n(t,"justifycenter","center"),f=new n(t,"justifyright","right"),e=new n(t,"justifyblock","justify");t.addCommand("justifyleft",r);t.addCommand("justifycenter",u);t.addCommand("justifyright",f);t.addCommand("justifyblock",e);t.ui.addButton&&(t.ui.addButton("JustifyLeft",{label:t.lang.justify.left,command:"justifyleft",toolbar:"align,10"}),t.ui.addButton("JustifyCenter",{label:t.lang.justify.center,command:"justifycenter",toolbar:"align,20"}),t.ui.addButton("JustifyRight",{label:t.lang.justify.right,command:"justifyright",toolbar:"align,30"}),t.ui.addButton("JustifyBlock",{label:t.lang.justify.block,command:"justifyblock",toolbar:"align,40"}));t.on("dirChanged",i)}}})}();CKEDITOR.config.plugins="dialogui,dialog,a11yhelp,basicstyles,blockquote,clipboard,panel,floatpanel,menu,contextmenu,resize,button,toolbar,elementspath,enterkey,entities,popup,filebrowser,floatingspace,listblock,richcombo,format,horizontalrule,htmlwriter,wysiwygarea,image,indent,indentlist,fakeobjects,link,list,magicline,maximize,pastetext,pastefromword,removeformat,sourcearea,specialchar,menubutton,scayt,stylescombo,tab,table,tabletools,undo,wsc,lineutils,widget,image2,stylesheetparser,showborders,templates,divarea,justify";CKEDITOR.config.skin="moono",function(){var n=function(n,t){var r=CKEDITOR.getUrl("plugins/"+t),i;for(n=n.split(","),i=0;i<n.length;i++)CKEDITOR.skin.icons[n[i]]={path:r,offset:-n[++i],bgsize:n[++i]}};CKEDITOR.env.hidpi?n("bold,0,,italic,24,,strike,48,,subscript,72,,superscript,96,,underline,120,,blockquote,144,,copy-rtl,168,,copy,192,,cut-rtl,216,,cut,240,,paste-rtl,264,,paste,288,,horizontalrule,312,,image,336,,indent-rtl,360,,indent,384,,outdent-rtl,408,,outdent,432,,anchor-rtl,456,,anchor,480,,link,504,,unlink,528,,bulletedlist-rtl,552,,bulletedlist,576,,numberedlist-rtl,600,,numberedlist,624,,maximize,648,,pastetext-rtl,672,,pastetext,696,,pastefromword-rtl,720,,pastefromword,744,,removeformat,768,,source-rtl,792,,source,816,,specialchar,840,,scayt,864,,table,888,,redo-rtl,912,,redo,936,,undo-rtl,960,,undo,984,,spellchecker,1008,,image2,1032,,templates-rtl,1056,,templates,1080,,justifyblock,1104,,justifycenter,1128,,justifyleft,1152,,justifyright,1176,","icons_hidpi.png"):n("bold,0,auto,italic,24,auto,strike,48,auto,subscript,72,auto,superscript,96,auto,underline,120,auto,blockquote,144,auto,copy-rtl,168,auto,copy,192,auto,cut-rtl,216,auto,cut,240,auto,paste-rtl,264,auto,paste,288,auto,horizontalrule,312,auto,image,336,auto,indent-rtl,360,auto,indent,384,auto,outdent-rtl,408,auto,outdent,432,auto,anchor-rtl,456,auto,anchor,480,auto,link,504,auto,unlink,528,auto,bulletedlist-rtl,552,auto,bulletedlist,576,auto,numberedlist-rtl,600,auto,numberedlist,624,auto,maximize,648,auto,pastetext-rtl,672,auto,pastetext,696,auto,pastefromword-rtl,720,auto,pastefromword,744,auto,removeformat,768,auto,source-rtl,792,auto,source,816,auto,specialchar,840,auto,scayt,864,auto,table,888,auto,redo-rtl,912,auto,redo,936,auto,undo-rtl,960,auto,undo,984,auto,spellchecker,1008,auto,image2,1032,auto,templates-rtl,1056,auto,templates,1080,auto,justifyblock,1104,auto,justifycenter,1128,auto,justifyleft,1152,auto,justifyright,1176,auto","icons.png")}();CKEDITOR.lang.languages={en:1,ru:1}}})()