/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function(){if(!window.CKEDITOR||!window.CKEDITOR.dom)window.CKEDITOR||(window.CKEDITOR=function(){var b={timestamp:"CBDD",version:"4.0",revision:"769d96134b",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var b=document.getElementsByTagName("script"),h=0;h=0;m--)if(k[m].priority<=i){k.splice(m+1,0,f);return{removeListener:c}}k.unshift(f)}return{removeListener:c}},once:function(){var a=arguments[1];arguments[1]=function(b){b.removeListener();return a.apply(this,arguments)};return this.on.apply(this, arguments)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},h=0,e=function(){h=1};return function(i,f,j){var k=c(this)[i],i=a,l=h;a=h=0;if(k){var m=k.listeners;if(m.length)for(var m=m.slice(0),n,o=0;o=0&&h.listeners.splice(e,1)}},removeAllListeners:function(){var a=c(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=c(this)[a])&&a.listeners.length>0}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire= function(b,c){b in{instanceReady:1,loaded:1}&&(this[b]=true);return CKEDITOR.event.prototype.fire.call(this,b,c,this)},CKEDITOR.editor.prototype.fireOnce=function(b,c){b in{instanceReady:1,loaded:1}&&(this[b]=true);return CKEDITOR.event.prototype.fireOnce.call(this,b,c,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype,!0)),CKEDITOR.env||(CKEDITOR.env=function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,a={ie:eval("/*@cc_on!@*/false"),opera:!!c&&c.version,webkit:b.indexOf(" applewebkit/")> -1,air:b.indexOf(" adobeair/")>-1,mac:b.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat",mobile:b.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(b),isCustomDomain:function(){if(!this.ie)return false;var a=document.domain,d=window.location.hostname;return a!=d&&a!="["+d+"]"},secure:location.protocol=="https:"};a.gecko=navigator.product=="Gecko"&&!a.webkit&&!a.opera;if(a.webkit)b.indexOf("chrome")>-1?a.chrome=true:a.safari=true;var d=0;if(a.ie){d=a.quirks||!document.documentMode? parseFloat(b.match(/msie (\d+)/)[1]):document.documentMode;a.ie9Compat=d==9;a.ie8Compat=d==8;a.ie7Compat=d==7;a.ie6Compat=d<7||a.quirks}if(a.gecko){var g=b.match(/rv:([\d\.]+)/);if(g){g=g[1].split(".");d=g[0]*1E4+(g[1]||0)*100+(g[2]||0)*1}}a.opera&&(d=parseFloat(c.version()));a.air&&(d=parseFloat(b.match(/ adobeair\/(\d+)/)[1]));a.webkit&&(d=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]));a.version=d;a.isCompatible=a.iOS&&d>=534||!a.mobile&&(a.ie&&d>6||a.gecko&&d>=10801||a.opera&&d>=9.5||a.air&&d>= 1||a.webkit&&d>=522||false);a.cssClass="cke_browser_"+(a.ie?"ie":a.gecko?"gecko":a.opera?"opera":a.webkit?"webkit":"unknown");if(a.quirks)a.cssClass=a.cssClass+" cke_browser_quirks";if(a.ie){a.cssClass=a.cssClass+(" cke_browser_ie"+(a.quirks||a.version<7?"6":a.version));if(a.quirks)a.cssClass=a.cssClass+" cke_browser_iequirks"}if(a.gecko&&d<10900)a.cssClass=a.cssClass+" cke_browser_gecko18";if(a.air)a.cssClass=a.cssClass+" cke_browser_air";return a}()),"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 b=document.createElement("script");b.type="text/javascript";b.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(b)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(b){(this._.pending||(this._.pending=[])).push(b)};(function(){CKEDITOR.domReady(function(){var b=CKEDITOR.loadFullCore,c=CKEDITOR.loadFullCoreTimeout;if(b){CKEDITOR.status= "basic_ready";b&&b._load?b():c&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},c*1E3)}})})();CKEDITOR.status="basic_loaded"}(),CKEDITOR.dom={},function(){var b=[],c=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){b=[]});CKEDITOR.tools={arrayCompare:function(a,d){if(!a&&!d)return true;if(!a||!d||a.length!=d.length)return false;for(var b=0;b"+d+""):b.push('');return b.join("")},htmlEncode:function(a){return(""+a).replace(/&/g, "&").replace(/>/g,">").replace(//g,">")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(a,d){var b=d(a);b.prototype=a.prototype;return b},setTimeout:function(a,b,g,c,e){e||(e=window);g||(g=e);return e.setTimeout(function(){c?a.apply(g,[].concat(c)):a.apply(g)},b||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g; return function(b){return b.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(b){return b.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(b){return b.replace(a,"")}}(),indexOf:function(a,b){if(typeof b=="function")for(var g=0,c=a.length;g=0?a[g]:null},bind:function(a, b){return function(){return a.apply(b,arguments)}},createClass:function(a){var b=a.$,g=a.base,c=a.privates||a._,e=a.proto,a=a.statics;!b&&(b=function(){g&&this.base.apply(this,arguments)});if(c)var i=b,b=function(){var a=this._||(this._={}),b;for(b in c){var d=c[b];a[b]=typeof d=="function"?CKEDITOR.tools.bind(d,this):d}i.apply(this,arguments)};if(g){b.prototype=this.prototypedCopy(g.prototype);b.prototype.constructor=b;b.base=g;b.baseProto=g.prototype;b.prototype.base=function(){this.base=g.prototype.base; g.apply(this,arguments);this.base=arguments.callee}}e&&this.extend(b.prototype,e,true);a&&this.extend(b,a,true);return b},addFunction:function(a,d){return b.push(function(){return a.apply(d||this,arguments)})-1},removeFunction:function(a){b[a]=null},callFunction:function(a){var d=b[a];return d&&d.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,b;return function(c){b=CKEDITOR.tools.trim(c+"")+"px";return a.test(b)?b:c||""}}(),convertToPx:function(){var a; return function(b){if(!a){a=CKEDITOR.dom.element.createFromHtml('
',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(b)){a.setStyle("width",b);return a.$.clientWidth}return b}}(),repeat:function(a,b){return Array(b+1).join(a)},tryThese:function(){for(var a,b=0,c=arguments.length;b8)&&c)b=c+":"+b;return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(b))},getHead:function(){var b=this.$.getElementsByTagName("head")[0];return b=b?new CKEDITOR.dom.element(b):this.getDocumentElement().append(new CKEDITOR.dom.element("head"), true)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){var b=new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return b})()},write:function(b){this.$.open("text/html","replace");CKEDITOR.env.isCustomDomain()&&(this.$.domain=document.domain);this.$.write(b);this.$.close()}}),CKEDITOR.dom.nodeList=function(b){this.$=b},CKEDITOR.dom.nodeList.prototype= {count:function(){return this.$.length},getItem:function(b){if(b<0||b>=this.$.length)return null;return(b=this.$[b])?new CKEDITOR.dom.node(b):null}},CKEDITOR.dom.element=function(b,c){typeof b=="string"&&(b=(c?c.$:document).createElement(b));CKEDITOR.dom.domObject.call(this,b)},CKEDITOR.dom.element.get=function(b){return(b=typeof b=="string"?document.getElementById(b)||document.getElementsByName(b)[0]:b)&&(b.$?b:new CKEDITOR.dom.element(b))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml= function(b,c){var a=new CKEDITOR.dom.element("div",c);a.setHtml(b);return a.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(b,c,a,d){var g=c.getCustomData("list_marker_id")||c.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),h=c.getCustomData("list_marker_names")||c.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");b[g]=c;h[a]=1;return c.setCustomData(a,d)},CKEDITOR.dom.element.clearAllMarkers=function(b){for(var c in b)CKEDITOR.dom.element.clearMarkers(b, b[c],1)},CKEDITOR.dom.element.clearMarkers=function(b,c,a){var d=c.getCustomData("list_marker_names"),g=c.getCustomData("list_marker_id"),h;for(h in d)c.removeCustomData(h);c.removeCustomData("list_marker_names");if(a){c.removeCustomData("list_marker_id");delete b[g]}},function(){function b(a){for(var b=0,g=0,h=c[a].length;g]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(true));return a.innerHTML},getClientRect:function(){var a= CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a},setHtml:function(){var a=function(a){return this.$.innerHTML=a};return CKEDITOR.env.ie&&CKEDITOR.env.version<9?function(a){try{return this.$.innerHTML=a}catch(b){this.$.innerHTML="";var c=new CKEDITOR.dom.element("body",this.getDocument());c.$.innerHTML=a;for(c=c.getChildren();c.count();)this.append(c.getItem(0));return a}}:a}(),setText:function(a){CKEDITOR.dom.element.prototype.setText= this.$.innerText!=void 0?function(a){return this.$.innerText=a}:function(a){return this.$.textContent=a};return this.setText(a)},getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":a=this.$.getAttribute(a,2);a!==0&&this.$.tabIndex===0&&(a=null);return a;case "checked":a= this.$.attributes.getNamedItem(a);return(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:CKEDITOR.env.ie?function(a){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)]}: function(a){var b=this.getWindow().$.getComputedStyle(this.$,null);return b?b.getPropertyValue(a):""},getDtd:function(){var a=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return a};return a},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:CKEDITOR.env.ie?function(){var a=this.$.tabIndex;a===0&&(!CKEDITOR.dtd.$tabIndex[this.getName()]&&parseInt(this.getAttribute("tabindex"),10)!==0)&&(a=-1);return a}:CKEDITOR.env.webkit?function(){var a=this.$.tabIndex;if(a==void 0){a= parseInt(this.getAttribute("tabindex"),10);isNaN(a)&&(a=-1)}return a}:function(){return this.$.tabIndex},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||null},getName:function(){var a=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&!(document.documentMode>8)){var b=this.$.scopeName;b!="HTML"&&(a=b.toLowerCase()+":"+a)}return(this.getName= function(){return a})()},getValue:function(){return this.$.value},getFirst:function(a){var b=this.$.firstChild;(b=b&&new CKEDITOR.dom.node(b))&&(a&&!a(b))&&(b=b.getNext(a));return b},getLast:function(a){var b=this.$.lastChild;(b=b&&new CKEDITOR.dom.node(b))&&(a&&!a(b))&&(b=b.getPrevious(a));return b},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},is:function(){var a=this.getName();if(typeof arguments[0]=="object")return!!arguments[0][a];for(var b=0;b0&&(b>2||!c[a[0].nodeName]||b==2&&!c[a[1].nodeName])},hasAttribute:function(){function a(a){a=this.$.attributes.getNamedItem(a);return!(!a||!a.specified)}return CKEDITOR.env.ie&&CKEDITOR.env.version<8?function(b){return b=="name"?!!this.$.name:a.call(this,b)}:a}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,b){var c=this.$,a=a.$; if(c!=a){var h;if(b)for(;h=c.lastChild;)a.insertBefore(c.removeChild(h),a.firstChild);else for(;h=c.firstChild;)a.appendChild(c.removeChild(h))}},mergeSiblings:function(){function a(a,b,c){if(b&&b.type==CKEDITOR.NODE_ELEMENT){for(var e=[];b.data("cke-bookmark")||b.isEmptyInlineRemoveable();){e.push(b);b=c?b.getNext():b.getPrevious();if(!b||b.type!=CKEDITOR.NODE_ELEMENT)return}if(a.isIdentical(b)){for(var i=c?a.getLast():a.getFirst();e.length;)e.shift().move(a,!c);b.moveChildren(a,!c);b.remove();i&& i.type==CKEDITOR.NODE_ELEMENT&&i.mergeSiblings()}}}return function(b){if(b===false||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a")){a(this,this.getNext(),true);a(this,this.getPrevious())}}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var a=function(a,b){this.$.setAttribute(a,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(b,c){b=="class"?this.$.className=c:b=="style"?this.$.style.cssText=c:b=="tabindex"? this.$.tabIndex=c:b=="checked"?this.$.checked=c:b=="contenteditable"?a.call(this,"contentEditable",c):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,c){if(b=="src"&&c.match(/^http:\/\//))try{a.apply(this,arguments)}catch(h){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,a[b]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)}; return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(a){a=="class"?a="className":a=="tabindex"?a="tabIndex":a=="contenteditable"&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b=0;b=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+a+")")}else this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));if(CKEDITOR.env.ie||CKEDITOR.env.opera){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),c=0,h=b.count();c0)j(0,b===true?f:b===false?e:f<0?f:e);if(c&&(i<0||h>0))j(i<0?i:h,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+"_off");this.removeClass(b+"_disabled");c&&this.setAttribute("aria-pressed",true);c&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");c&&this.setAttribute("aria-disabled",true);c&&this.removeAttribute("aria-pressed"); break;default:this.addClass(b+"_off");this.removeClass(b+"_on");this.removeClass(b+"_disabled");c&&this.removeAttribute("aria-pressed");c&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,b){for(var c=this.$.attributes,b=b||{},h=0;h=0&&b0&&c;)c=a(c,b.shift());else c=a(c,b);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){this.on("contextmenu",function(a){a.data.getTarget().hasClass("cke_enable_context_menu")||a.data.preventDefault()})},getDirection:function(a){return a?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&& this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(a,b){a="data-"+a;if(b===void 0)return this.getAttribute(a);b===false?this.removeAttribute(a):this.setAttribute(a,b);return null},getEditor:function(){var a=CKEDITOR.instances,b,c;for(b in a){c=a[b];if(c.element.equals(this)&&c.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return c}return null}});var c={width:["border-left-width","border-right-width","padding-left","padding-right"], height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};CKEDITOR.dom.element.prototype.setSize=function(a,c,g){if(typeof c=="number"){if(g&&(!CKEDITOR.env.ie||!CKEDITOR.env.quirks))c=c-b.call(this,a);this.setStyle(a,c+"px")}};CKEDITOR.dom.element.prototype.getSize=function(a,c){var g=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;c&&(g=g-b.call(this,a));return g}}(),CKEDITOR.dom.documentFragment=function(b){b=b||CKEDITOR.document; this.$=b.type==CKEDITOR.NODE_DOCUMENT?b.$.createDocumentFragment():b},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(b){b=b.$;b.parentNode.insertBefore(this.$,b.nextSibling)}},!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 b(a,b){var c=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed){this.end();return null}c.optimize()}var d,k=c.startContainer;d=c.endContainer;var l=c.startOffset,m=c.endOffset,h,o=this.guard,g=this.type,r=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var s=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),t=d.type==CKEDITOR.NODE_ELEMENT?d.getChild(m):d.getNext();this._.guardLTR=function(a,b){return(!b||!s.equals(a))&& (!t||!a.equals(t))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}if(a&&!this._.guardRTL){var x=k.type==CKEDITOR.NODE_ELEMENT?k:k.getParent(),z=k.type==CKEDITOR.NODE_ELEMENT?l?k.getChild(l-1):null:k.getPrevious();this._.guardRTL=function(a,b){return(!b||!x.equals(a))&&(!z||!a.equals(z))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}var w=a?this._.guardRTL:this._.guardLTR;h=o?function(a,b){return w(a,b)===false?false:o(a,b)}:w;if(this.current)d=this.current[r](false,g,h);else{if(a)d.type== CKEDITOR.NODE_ELEMENT&&(d=m>0?d.getChild(m-1):h(d,true)===false?null:d.getPreviousSourceNode(true,g,h));else{d=k;if(d.type==CKEDITOR.NODE_ELEMENT&&!(d=d.getChild(l)))d=h(k,true)===false?null:k.getNextSourceNode(true,g,h)}d&&h(d)===false&&(d=null)}for(;d&&!this._.end;){this.current=d;if(!this.evaluator||this.evaluator(d)!==false){if(!b)return d}else if(b&&this.evaluator)return false;d=d[r](false,g,h)}this.end();return this.current=null}function c(a){for(var c,f=null;c=b.call(this,a);)f=c;return f} CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return b.call(this)},previous:function(){return b.call(this,1)},checkForward:function(){return b.call(this,0,1)!==false},checkBackward:function(){return b.call(this,1,1)!==false},lastForward:function(){return c.call(this)},lastBackward:function(){return c.call(this,1)},reset:function(){delete this.current;this._={}}}});var a={block:1,"list-item":1,table:1,"table-row-group":1, "table-header-group":1,"table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1,"table-caption":1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(b){b=b?CKEDITOR.tools.extend({},CKEDITOR.dtd.$block,b||{}):CKEDITOR.dtd.$block;return this.getComputedStyle("float")=="none"&&a[this.getComputedStyle("display")]||b[this.getName()]};CKEDITOR.dom.walker.blockBoundary=function(a){return function(b){return!(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary= function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,b){function c(a){return a&&a.getName&&a.getName()=="span"&&a.data("cke-bookmark")}return function(d){var k,l;k=d&&d.type!=CKEDITOR.NODE_ELEMENT&&(l=d.getParent())&&c(l);k=a?k:k||c(d);return!!(b^k)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var c;b&&b.type==CKEDITOR.NODE_TEXT&&(c=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()=="​");return!!(a^c)}};CKEDITOR.dom.walker.invisible= function(a){var b=CKEDITOR.dom.walker.whitespaces();return function(c){if(b(c))c=1;else{c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent());c=!c.$.offsetHeight}return!!(a^c)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(c){return!!(b^c.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!g(a)&&!h(a)}return function(c){var h=!CKEDITOR.env.ie?c.is&&c.is("br"):c.getText&&d.test(c.getText());if(h){h=c.getParent();c=c.getNext(b);h=h.isBlockBoundary()&&(!c||c.type==CKEDITOR.NODE_ELEMENT&& c.isBlockBoundary())}return!!(a^h)}};var d=/^[\t\r\n ]*(?: |\xa0)$/,g=CKEDITOR.dom.walker.whitespaces(),h=CKEDITOR.dom.walker.bookmark();CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(h(a)||g(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty));return a&&(!CKEDITOR.env.ie?a.is&&a.is("br"):a.getText&&d.test(a.getText()))?a:false}}(),CKEDITOR.dom.range=function(b){this.endOffset=this.endContainer= this.startOffset=this.startContainer=null;this.collapsed=true;var c=b instanceof CKEDITOR.dom.document;this.document=c?b:b.getDocument();this.root=c?b.getBody():b},function(){function b(){var a=false,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(true),e=CKEDITOR.dom.walker.bogus();return function(f){if(c(f)||b(f))return true;if(e(f)&&!a)return a=true;return f.type==CKEDITOR.NODE_TEXT&&(f.hasAscendant("pre")||CKEDITOR.tools.trim(f.getText()).length)||f.type==CKEDITOR.NODE_ELEMENT&& !f.is(h)?false:true}}function c(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(f){return c(f)||b(f)?true:!a&&e(f)||f.type==CKEDITOR.NODE_ELEMENT&&f.is(CKEDITOR.dtd.$removeEmpty)}}function a(a){return!i(a)&&!f(a)}var d=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},g=function(a,b,c,e){a.optimizeBookmark();var f=a.startContainer,d=a.endContainer,i=a.startOffset,h=a.endOffset, g,j;if(d.type==CKEDITOR.NODE_TEXT)d=d.split(h);else if(d.getChildCount()>0)if(h>=d.getChildCount()){d=d.append(a.document.createText(""));j=true}else d=d.getChild(h);if(f.type==CKEDITOR.NODE_TEXT){f.split(i);f.equals(d)&&(d=f.getNext())}else if(i)if(i>=f.getChildCount()){f=f.append(a.document.createText(""));g=true}else f=f.getChild(i).getPrevious();else{f=f.append(a.document.createText(""),1);g=true}var i=f.getParents(),h=d.getParents(),z,w,u;for(z=0;z0&&!v.equals(d)&&(B=q.append(v.clone()));if(!i[c]||v.$.parentNode!=i[c].$.parentNode)for(v=v.getPrevious();v;){if(v.equals(i[c])||v.equals(f))break;A=v.getPrevious();if(b==2)q.$.insertBefore(v.$.cloneNode(true),q.$.firstChild);else{v.remove(); b==1&&q.$.insertBefore(v.$,q.$.firstChild)}v=A}q&&(q=B)}if(b==2){w=a.startContainer;if(w.type==CKEDITOR.NODE_TEXT){w.$.data=w.$.data+w.$.nextSibling.data;w.$.parentNode.removeChild(w.$.nextSibling)}a=a.endContainer;if(a.type==CKEDITOR.NODE_TEXT&&a.$.nextSibling){a.$.data=a.$.data+a.$.nextSibling.data;a.$.parentNode.removeChild(a.$.nextSibling)}}else{if(w&&u&&(f.$.parentNode!=w.$.parentNode||d.$.parentNode!=u.$.parentNode)){b=u.getIndex();g&&u.$.parentNode==f.$.parentNode&&b--;if(e&&w.type==CKEDITOR.NODE_ELEMENT){e= CKEDITOR.dom.element.createFromHtml(' ',a.document);e.insertAfter(w);w.mergeSiblings(false);a.moveToBookmark({startNode:e})}else a.setStart(u.getParent(),b)}a.collapse(true)}g&&f.remove();j&&d.$.parentNode&&d.remove()},h={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=new CKEDITOR.dom.walker.whitespaces, f=new CKEDITOR.dom.walker.bookmark,j=/^[\t\r\n ]*(?: |\xa0)$/;CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root);a.startContainer=this.startContainer;a.startOffset=this.startOffset;a.endContainer=this.endContainer;a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){if(a){this.endContainer=this.startContainer;this.endOffset=this.startOffset}else{this.startContainer=this.endContainer;this.startOffset=this.endOffset}this.collapsed= true},cloneContents:function(){var a=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||g(this,2,a);return a},deleteContents:function(a){this.collapsed||g(this,0,null,a)},extractContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||g(this,1,b,a);return b},createBookmark:function(a){var b,c,e,f,d=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml(" ");if(a){e="cke_bm_"+CKEDITOR.tools.getNextNumber(); b.setAttribute("id",e+(d?"C":"S"))}if(!d){c=b.clone();c.setHtml(" ");a&&c.setAttribute("id",e+"E");f=this.clone();f.collapse();f.insertNode(c)}f=this.clone();f.collapse(true);f.insertNode(b);if(c){this.setStartAfter(b);this.setEndBefore(c)}else this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?e+(d?"C":"S"):b,endNode:a?e+"E":c,serializable:a,collapsed:d}},createBookmark2:function(a){var b=this.startContainer,c=this.endContainer,e=this.startOffset,f=this.endOffset,d=this.collapsed, i,h;if(!b||!c)return{start:0,end:0};if(a){if(b.type==CKEDITOR.NODE_ELEMENT){if((i=b.getChild(e))&&i.type==CKEDITOR.NODE_TEXT&&e>0&&i.getPrevious().type==CKEDITOR.NODE_TEXT){b=i;e=0}i&&i.type==CKEDITOR.NODE_ELEMENT&&(e=i.getIndex(1))}for(;b.type==CKEDITOR.NODE_TEXT&&(h=b.getPrevious())&&h.type==CKEDITOR.NODE_TEXT;){b=h;e=e+h.getLength()}if(!d){if(c.type==CKEDITOR.NODE_ELEMENT){if((i=c.getChild(f))&&i.type==CKEDITOR.NODE_TEXT&&f>0&&i.getPrevious().type==CKEDITOR.NODE_TEXT){c=i;f=0}i&&i.type==CKEDITOR.NODE_ELEMENT&& (f=i.getIndex(1))}for(;c.type==CKEDITOR.NODE_TEXT&&(h=c.getPrevious())&&h.type==CKEDITOR.NODE_TEXT;){c=h;f=f+h.getLength()}}}return{start:b.getAddress(a),end:d?null:c.getAddress(a),startOffset:e,endOffset:f,normalized:a,collapsed:d,is2:true}},moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,e=a.end&&this.document.getByAddress(a.end,a.normalized),a=a.endOffset;this.setStart(b,c);e?this.setEnd(e,a):this.collapse(true)}else{b=(c=a.serializable)? this.document.getById(a.startNode):a.startNode;a=c?this.document.getById(a.endNode):a.endNode;this.setStartBefore(b);b.remove();if(a){this.setEndBefore(a);a.remove()}else this.collapse(true)}},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,e=this.endOffset,f;if(a.type==CKEDITOR.NODE_ELEMENT){f=a.getChildCount();if(f>c)a=a.getChild(c);else if(f<1)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()|| a}}if(b.type==CKEDITOR.NODE_ELEMENT){f=b.getChildCount();if(f>e)b=b.getChild(e).getPreviousSourceNode(true);else if(f<1)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,e=this.endContainer,c=c.equals(e)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(e); return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&(a.is("span")&&a.data("cke-bookmark"))&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&& (b.is&&b.is("span")&&b.data("cke-bookmark"))&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var c=this.startContainer,e=this.startOffset,f=this.collapsed;if((!a||f)&&c&&c.type==CKEDITOR.NODE_TEXT){if(e)if(e>=c.getLength()){e=c.getIndex()+1;c=c.getParent()}else{var d=c.split(e),e=c.getIndex()+1,c=c.getParent();if(this.startContainer.equals(this.endContainer))this.setEnd(d,this.endOffset-this.startOffset);else if(c.equals(this.endContainer))this.endOffset=this.endOffset+1}else{e= c.getIndex();c=c.getParent()}this.setStart(c,e);if(f){this.collapse(true);return}}c=this.endContainer;e=this.endOffset;if(!b&&!f&&c&&c.type==CKEDITOR.NODE_TEXT){if(e){e>=c.getLength()||c.split(e);e=c.getIndex()+1}else e=c.getIndex();c=c.getParent();this.setEnd(c,e)}},enlarge:function(a,b){switch(a){case CKEDITOR.ENLARGE_INLINE:var c=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var e=this.getCommonAncestor(),f=this.root,d,i,h,g,j,z=false,w,u;w=this.startContainer;u=this.startOffset;if(w.type== CKEDITOR.NODE_TEXT){if(u){w=!CKEDITOR.tools.trim(w.substring(0,u)).length&&w;z=!!w}if(w&&!(g=w.getPrevious()))h=w.getParent()}else{u&&(g=w.getChild(u-1)||w.getLast());g||(h=w)}for(;h||g;){if(h&&!g){!j&&h.equals(e)&&(j=true);if(c?h.isBlockBoundary():!f.contains(h))break;if(!z||h.getComputedStyle("display")!="inline"){z=false;j?d=h:this.setStartBefore(h)}g=h.getPrevious()}for(;g;){w=false;if(g.type==CKEDITOR.NODE_COMMENT)g=g.getPrevious();else{if(g.type==CKEDITOR.NODE_TEXT){u=g.getText();/[^\s\ufeff]/.test(u)&& (g=null);w=/[\s\ufeff]$/.test(u)}else if((g.$.offsetWidth>0||b&&g.is("br"))&&!g.data("cke-bookmark"))if(z&&CKEDITOR.dtd.$removeEmpty[g.getName()]){u=g.getText();if(/[^\s\ufeff]/.test(u))g=null;else for(var q=g.$.getElementsByTagName("*"),v=0,B;B=q[v++];)if(!CKEDITOR.dtd.$removeEmpty[B.nodeName.toLowerCase()]){g=null;break}g&&(w=!!u.length)}else g=null;w&&(z?j?d=h:h&&this.setStartBefore(h):z=true);if(g){w=g.getPrevious();if(!h&&!w){h=g;g=null;break}g=w}else h=null}}h&&(h=h.getParent())}w=this.endContainer; u=this.endOffset;h=g=null;j=z=false;if(w.type==CKEDITOR.NODE_TEXT){w=!CKEDITOR.tools.trim(w.substring(u)).length&&w;z=!(w&&w.getLength());if(w&&!(g=w.getNext()))h=w.getParent()}else(g=w.getChild(u))||(h=w);for(;h||g;){if(h&&!g){!j&&h.equals(e)&&(j=true);if(c?h.isBlockBoundary():!f.contains(h))break;if(!z||h.getComputedStyle("display")!="inline"){z=false;j?i=h:h&&this.setEndAfter(h)}g=h.getNext()}for(;g;){w=false;if(g.type==CKEDITOR.NODE_TEXT){u=g.getText();/[^\s\ufeff]/.test(u)&&(g=null);w=/^[\s\ufeff]/.test(u)}else if(g.type== CKEDITOR.NODE_ELEMENT){if((g.$.offsetWidth>0||b&&g.is("br"))&&!g.data("cke-bookmark"))if(z&&CKEDITOR.dtd.$removeEmpty[g.getName()]){u=g.getText();if(/[^\s\ufeff]/.test(u))g=null;else{q=g.$.getElementsByTagName("*");for(v=0;B=q[v++];)if(!CKEDITOR.dtd.$removeEmpty[B.nodeName.toLowerCase()]){g=null;break}}g&&(w=!!u.length)}else g=null}else w=1;w&&z&&(j?i=h:this.setEndAfter(h));if(g){w=g.getNext();if(!h&&!w){h=g;g=null;break}g=w}else h=null}h&&(h=h.getParent())}if(d&&i){e=d.contains(i)?i:d;this.setStartBefore(e); this.setEndAfter(e)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:h=new CKEDITOR.dom.range(this.root);f=this.root;h.setStartAt(f,CKEDITOR.POSITION_AFTER_START);h.setEnd(this.startContainer,this.startOffset);h=new CKEDITOR.dom.walker(h);var A,y,C=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),D=function(a){var b=C(a);b||(A=a);return b},c=function(a){var b=D(a);!b&&(a.is&&a.is("br"))&&(y=a);return b};h.guard=D;h=h.lastBackward(); A=A||f;this.setStartAt(A,!A.is("br")&&(!h&&this.checkStartOfBlock()||h&&A.contains(h))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){h=this.clone();h=new CKEDITOR.dom.walker(h);var F=CKEDITOR.dom.walker.whitespaces(),G=CKEDITOR.dom.walker.bookmark();h.evaluator=function(a){return!F(a)&&!G(a)};if((h=h.previous())&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("br"))break}h=this.clone();h.collapse();h.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);h=new CKEDITOR.dom.walker(h); h.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?c:D;A=null;h=h.lastForward();A=A||f;this.setEndAt(A,!h&&this.checkEndOfBlock()||h&&A.contains(h)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);y&&this.setEndAfter(y)}},shrink:function(a,b,c){if(!this.collapsed){var a=a||CKEDITOR.SHRINK_TEXT,e=this.clone(),f=this.startContainer,h=this.endContainer,d=this.startOffset,i=this.endOffset,g=1,j=1;if(f&&f.type==CKEDITOR.NODE_TEXT)if(d)if(d>=f.getLength())e.setStartAfter(f);else{e.setStartBefore(f); g=0}else e.setStartBefore(f);if(h&&h.type==CKEDITOR.NODE_TEXT)if(i)if(i>=h.getLength())e.setEndAfter(h);else{e.setEndAfter(h);j=0}else e.setEndBefore(h);var e=new CKEDITOR.dom.walker(e),z=CKEDITOR.dom.walker.bookmark();e.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var w;e.guard=function(b,e){if(z(b))return true;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||e&&b.equals(w)||c===false&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary())return false; !e&&b.type==CKEDITOR.NODE_ELEMENT&&(w=b);return true};if(g)(f=e[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(f,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);if(j){e.reset();(e=e[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(e,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!g&&!j)}},insertNode:function(a){this.optimizeBookmark();this.trim(false,true);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c): b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(true)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b= a.getIndex();a=a.getParent()}this.startContainer=a;this.startOffset=b;if(!this.endContainer){this.endContainer=a;this.endOffset=b}d(this)},setEnd:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex()+1;a=a.getParent()}this.endContainer=a;this.endOffset=b;if(!this.startContainer){this.startContainer=a;this.startOffset=b}d(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())}, setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}d(this)},setEndAt:function(a, b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setEnd(a,a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}d(this)},fixBlock:function(a,b){var c=this.createBookmark(),e=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(e); e.trim();CKEDITOR.env.ie||e.appendBogus();this.insertNode(e);this.moveToBookmark(c);return e},splitBlock:function(a){var b=new CKEDITOR.dom.elementPath(this.startContainer,this.root),c=new CKEDITOR.dom.elementPath(this.endContainer,this.root),e=b.block,f=c.block,h=null;if(!b.blockLimit.equals(c.blockLimit))return null;if(a!="br"){if(!e){e=this.fixBlock(true,a);f=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block}f||(f=this.fixBlock(false,a))}a=e&&this.checkStartOfBlock();b=f&&this.checkEndOfBlock(); this.deleteContents();if(e&&e.equals(f))if(b){h=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(f,CKEDITOR.POSITION_AFTER_END);f=null}else if(a){h=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);e=null}else{f=this.splitElement(e);!CKEDITOR.env.ie&&!e.is("ul","ol")&&e.appendBogus()}return{previousBlock:e,nextBlock:f,wasStartOfBlock:a,wasEndOfBlock:b,elementPath:h}},splitElement:function(a){if(!this.collapsed)return null; this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var b=this.extractContents(),c=a.clone(false);b.appendTo(c);c.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return c},removeEmptyBlocksAtEnd:function(){function a(e){return function(a){return b(a)||(c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable())||e.is("table")&&a.is("caption")?false:true}}var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(false);return function(b){for(var c=this.createBookmark(), e=this[b?"endPath":"startPath"](),f=e.block||e.blockLimit,h;f&&!f.equals(e.root)&&!f.getFirst(a(f));){h=f.getParent();this[b?"setEndAt":"setStartAt"](f,CKEDITOR.POSITION_AFTER_END);f.remove(1);f=h}this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,b){var e=b==CKEDITOR.START,f=this.clone();f.collapse(e);f[e?"setStartAt": "setEndAt"](a,e?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);f=new CKEDITOR.dom.walker(f);f.evaluator=c(e);return f[e?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,c=this.startOffset;if(CKEDITOR.env.ie&&c&&a.type==CKEDITOR.NODE_TEXT){a=CKEDITOR.tools.ltrim(a.substring(0,c));j.test(a)&&this.trim(0,1)}this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);c=this.clone();c.collapse(true);c.setStartAt(a.block||a.blockLimit, CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,c=this.endOffset;if(CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT){a=CKEDITOR.tools.rtrim(a.substring(c));j.test(a)&&this.trim(1,0)}this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);c=this.clone();c.collapse(false);c.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkForward()}, getPreviousNode:function(a,b,c){var e=this.clone();e.collapse(1);e.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(e);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var e=this.clone();e.collapse();e.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(e);c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,c){for(;b;){if(b.type==CKEDITOR.NODE_ELEMENT){if(b.getAttribute("contentEditable")== "false"&&!b.data("cke-editable"))return 0;if(b.is("html")||b.getAttribute("contentEditable")=="true"&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(b,c){if(b.type==CKEDITOR.NODE_ELEMENT&&!b.isEditable(false)){this.moveToPosition(b,c?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);return true}for(var e=0;b;){if(b.type==CKEDITOR.NODE_TEXT){c&&this.checkEndOfBlock()&& j.test(b.getText())?this.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(b,c?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);e=1;break}if(b.type==CKEDITOR.NODE_ELEMENT)if(b.isEditable()){this.moveToPosition(b,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START);e=1}else c&&(b.is("br")&&this.checkEndOfBlock())&&this.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);var f=b,h=e,d=void 0;f.type==CKEDITOR.NODE_ELEMENT&&f.isEditable(false)&&(d=f[c?"getLast":"getFirst"](a)); !h&&!d&&(d=f[c?"getPrevious":"getNext"](a));b=d}return!!e},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,true)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(false,true),c=CKEDITOR.dom.walker.whitespaces(true); a.evaluator=function(a){return c(a)&&b(a)};var e=a.next();a.reset();return e&&e.equals(a.previous())?e:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml(" ",this.document), b,c,e,f=this.clone();f.optimize();if(e=f.startContainer.type==CKEDITOR.NODE_TEXT){c=f.startContainer.getText();b=f.startContainer.split(f.startOffset);a.insertAfter(f.startContainer)}else f.insertNode(a);a.scrollIntoView();if(e){f.startContainer.setText(c);b.remove()}a.remove()}}}(),CKEDITOR.POSITION_AFTER_START=1,CKEDITOR.POSITION_BEFORE_END=2,CKEDITOR.POSITION_BEFORE_START=3,CKEDITOR.POSITION_AFTER_END=4,CKEDITOR.ENLARGE_ELEMENT=1,CKEDITOR.ENLARGE_BLOCK_CONTENTS=2,CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS= 3,CKEDITOR.ENLARGE_INLINE=4,CKEDITOR.START=1,CKEDITOR.END=2,CKEDITOR.SHRINK_ELEMENT=1,CKEDITOR.SHRINK_TEXT=2,function(){function b(a){if(!(arguments.length<1)){this.range=a;this.forceBrBreak=0;this.enlargeBr=1;this.enforceRealBlocks=0;this._||(this._={})}}function c(a,b,c){for(a=a.getNextSourceNode(b,null,c);!d(a);)a=a.getNextSourceNode(b,null,c);return a}var a=/^[\r\n\t ]+$/,d=CKEDITOR.dom.walker.bookmark(false,true),g=CKEDITOR.dom.walker.whitespaces(true),h=function(a){return d(a)&&g(a)};b.prototype= {getNextParagraph:function(b){b=b||"p";if(!CKEDITOR.dtd[this.range.root.getName()][b])return null;var i,f,g,k,l,m;if(!this._.started){f=this.range.clone();f.shrink(CKEDITOR.NODE_ELEMENT,true);k=f.endContainer.hasAscendant("pre",true)||f.startContainer.hasAscendant("pre",true);f.enlarge(this.forceBrBreak&&!k||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(!f.collapsed){k=new CKEDITOR.dom.walker(f.clone());var n=CKEDITOR.dom.walker.bookmark(true,true);k.evaluator= n;this._.nextNode=k.next();k=new CKEDITOR.dom.walker(f.clone());k.evaluator=n;k=k.previous();this._.lastNode=k.getNextSourceNode(true);if(this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()){n=this.range.clone();n.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END);if(n.checkEndOfBlock()){n=new CKEDITOR.dom.elementPath(n.endContainer,n.root);this._.lastNode=(n.block||n.blockLimit).getNextSourceNode(true)}}if(!this._.lastNode){this._.lastNode= this._.docEndMarker=f.document.createText("");this._.lastNode.insertAfter(k)}f=null}this._.started=1}n=this._.nextNode;k=this._.lastNode;for(this._.nextNode=null;n;){var o=0,p=n.hasAscendant("pre"),r=n.type!=CKEDITOR.NODE_ELEMENT,s=0;if(r)n.type==CKEDITOR.NODE_TEXT&&a.test(n.getText())&&(r=0);else{var t=n.getName();if(n.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){if(t=="br")r=1;else if(!f&&!n.getChildCount()&&t!="hr"){i=n;g=n.equals(k);break}if(f){f.setEndAt(n,CKEDITOR.POSITION_BEFORE_START); if(t!="br")this._.nextNode=n}o=1}else{if(n.getFirst()){if(!f){f=this.range.clone();f.setStartAt(n,CKEDITOR.POSITION_BEFORE_START)}n=n.getFirst();continue}r=1}}if(r&&!f){f=this.range.clone();f.setStartAt(n,CKEDITOR.POSITION_BEFORE_START)}g=(!o||r)&&n.equals(k);if(f&&!o)for(;!n.getNext(h)&&!g;){t=n.getParent();if(t.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){o=1;r=0;g||t.equals(k);f.setEndAt(t,CKEDITOR.POSITION_BEFORE_END);break}n=t;r=1;g=n.equals(k);s=1}r&&f.setEndAt(n,CKEDITOR.POSITION_AFTER_END); n=c(n,s,k);if((g=!n)||o&&f)break}if(!i){if(!f){this._.docEndMarker&&this._.docEndMarker.remove();return this._.nextNode=null}i=new CKEDITOR.dom.elementPath(f.startContainer,f.root);n=i.blockLimit;o={div:1,th:1,td:1};i=i.block;if(!i&&n&&!this.enforceRealBlocks&&o[n.getName()]&&f.checkStartOfBlock()&&f.checkEndOfBlock()&&!n.equals(f.root))i=n;else if(!i||this.enforceRealBlocks&&i.getName()=="li"){i=this.range.document.createElement(b);f.extractContents().appendTo(i);i.trim();f.insertNode(i);l=m=true}else if(i.getName()!= "li"){if(!f.checkStartOfBlock()||!f.checkEndOfBlock()){i=i.clone(false);f.extractContents().appendTo(i);i.trim();m=f.splitBlock();l=!m.wasStartOfBlock;m=!m.wasEndOfBlock;f.insertNode(i)}}else if(!g)this._.nextNode=i.equals(k)?null:c(f.getBoundaryNodes().endNode,1,k)}if(l)(f=i.getPrevious())&&f.type==CKEDITOR.NODE_ELEMENT&&(f.getName()=="br"?f.remove():f.getLast()&&f.getLast().$.nodeName.toLowerCase()=="br"&&f.getLast().remove());if(m)(f=i.getLast())&&f.type==CKEDITOR.NODE_ELEMENT&&f.getName()=="br"&& (CKEDITOR.env.ie||f.getPrevious(d)||f.getNext(d))&&f.remove();if(!this._.nextNode)this._.nextNode=g||i.equals(k)||!k?null:c(i,1,k);return i}};CKEDITOR.dom.range.prototype.createIterator=function(){return new b(this)}}(),CKEDITOR.command=function(b,c){this.uiItems=[];this.exec=function(a){if(this.state==CKEDITOR.TRISTATE_DISABLED)return false;this.editorFocus&&b.focus();return this.fire("exec")===false?true:c.exec.call(this,b,a)!==false};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return true; if(this.context&&!b.isContextFor(this.context)){this.disable();return true}this.enable();return this.fire("refresh",{editor:a,path:b})===false?true:c.refresh&&c.refresh.apply(this,arguments)!==false};CKEDITOR.tools.extend(this,c,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!c.context,state:CKEDITOR.TRISTATE_OFF});CKEDITOR.event.call(this)},CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(!this.preserveState||typeof this.previousState=="undefined"? CKEDITOR.TRISTATE_OFF:this.previousState)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(b){if(this.state==b)return false;this.previousState=this.state;this.state=b;this.fire("state");return true},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype,!0),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:"",bodyId:"",bodyClass:"",fullPage:!1,height:200,extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){CKEDITOR.focusManager=function(b){if(b.focusManager)return b.focusManager; this.hasFocus=false;this.currentActive=null;this._={editor:b};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(){this._.timer&&clearTimeout(this._.timer);if(!this.hasFocus&&!this._.locked){var b=CKEDITOR.currentInstance;b&&b.focusManager.blur(1);this.hasFocus=true;(b=this._.editor.container)&&b.addClass("cke_focus");this._.editor.fire("focus")}},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(b){function c(){if(this.hasFocus){this.hasFocus= false;var a=this._.editor.container;a&&a.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var a=CKEDITOR.focusManager._.blurDelay;b||!a?c.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;c.call(this)},a,this)}},add:function(b,c){var a=b.getCustomData("focusmanager");if(!a||a!=this){a&&a.remove(b);var a="focus",d="blur";if(c)if(CKEDITOR.env.ie){a="focusin";d="focusout"}else CKEDITOR.event.useCapture=1;var g= {blur:function(){b.equals(this.currentActive)&&this.blur()},focus:function(){this.currentActive=b;this.focus()}};b.on(a,g.focus,this);b.on(d,g.blur,this);if(c)CKEDITOR.event.useCapture=0;b.setCustomData("focusmanager",this);b.setCustomData("focusmanager_handlers",g)}},remove:function(b){b.removeCustomData("focusmanager");var c=b.removeCustomData("focusmanager_handlers");b.removeListener("blur",c.blur);b.removeListener("focus",c.focus)}}}(),CKEDITOR.keystrokeHandler=function(b){if(b.keystrokeHandler)return b.keystrokeHandler; this.keystrokes={};this.blockedKeystrokes={};this._={editor:b};return this},function(){var b,c=function(a){var a=a.data,c=a.getKeystroke(),h=this.keystrokes[c],e=this._.editor;b=e.fire("key",{keyCode:c})===false;if(!b){h&&(b=e.execCommand(h,{from:"keystrokeHandler"})!==false);b||(b=!!this.blockedKeystrokes[c])}b&&a.preventDefault(true);return!b},a=function(a){if(b){b=false;a.data.preventDefault(true)}};CKEDITOR.keystrokeHandler.prototype={attach:function(b){b.on("keydown",c,this);if(CKEDITOR.env.opera|| CKEDITOR.env.gecko&&CKEDITOR.env.mac)b.on("keypress",a,this)}}}(),function(){CKEDITOR.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,sk:1,sl:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,uk:1,vi:1,"zh-cn":1,zh:1},load:function(b,c,a){if(!b||!CKEDITOR.lang.languages[b])b=this.detect(c, b);this[b]?a(b,this[b]):CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+b+".js"),function(){a(b,this[b])},this)},detect:function(b,c){var a=this.languages,c=c||navigator.userLanguage||navigator.language||b,d=c.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),g=d[1],d=d[2];a[g+"-"+d]?g=g+"-"+d:a[g]||(g=null);CKEDITOR.lang.detect=g?function(){return g}:function(a){return a};return g||b}}}(),CKEDITOR.scriptLoader=function(){var b={},c={};return{load:function(a,d,g,h){var e=typeof a=="string";e&&(a=[a]); g||(g=CKEDITOR);var i=a.length,f=[],j=[],k=function(a){d&&(e?d.call(g,a):d.call(g,f,j))};if(i===0)k(true);else{var l=function(a,b){(b?f:j).push(a);if(--i<=0){h&&CKEDITOR.document.getDocumentElement().removeStyle("cursor");k(b)}},m=function(a,e){b[a]=1;var f=c[a];delete c[a];for(var h=0;h1)){var f=new CKEDITOR.dom.element("script");f.setAttributes({type:"text/javascript",src:a});if(d)if(CKEDITOR.env.ie)f.$.onreadystatechange= function(){if(f.$.readyState=="loaded"||f.$.readyState=="complete"){f.$.onreadystatechange=null;m(a,true)}};else{f.$.onload=function(){setTimeout(function(){m(a,true)},0)};f.$.onerror=function(){m(a,false)}}f.appendTo(CKEDITOR.document.getHead())}}};h&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var o=0;o=0)j=a.langCode;else{j=a.langCode.replace(/-.*/,"");j=j!=a.langCode&&CKEDITOR.tools.indexOf(l,j)>=0?j:CKEDITOR.tools.indexOf(l,"en")>=0?"en":l[0]}if(!g.langEntries||!g.langEntries[j])h.push(CKEDITOR.getUrl(g.path+ "lang/"+j+".js"));else{a.lang[i]=g.langEntries[j];j=null}}f.push(j);e.push(g)}CKEDITOR.scriptLoader.load(h,function(){for(var c=["beforeInit","init","afterInit"],h=0;h]+)>)|(?:!--([\\S|\\s]*?)--\>)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))", "g")}},function(){var b=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,c={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(a){for(var d,g,h=0,e;d=this._.htmlPartsRegex.exec(a);){g=d.index;if(g>h){h=a.substring(h,g);if(e)e.push(h); else this.onText(h)}h=this._.htmlPartsRegex.lastIndex;if(g=d[1]){g=g.toLowerCase();if(e&&CKEDITOR.dtd.$cdata[g]){this.onCDATA(e.join(""));e=null}if(!e){this.onTagClose(g);continue}}if(e)e.push(d[0]);else if(g=d[3]){g=g.toLowerCase();if(!/="/.test(g)){var i={},f;d=d[4];var j=!!(d&&d.charAt(d.length-1)=="/");if(d)for(;f=b.exec(d);){var k=f[1].toLowerCase();f=f[2]||f[3]||f[4]||"";i[k]=!f&&c[k]?k:f}this.onTagOpen(g,i,j);!e&&CKEDITOR.dtd.$cdata[g]&&(e=[])}}else if(g=d[2])this.onComment(g)}if(a.length> h)this.onText(a.substring(h,a.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(b){this._.output.push("<",b)},openTagClose:function(b,c){c?this._.output.push(" />"):this._.output.push(">")},attribute:function(b,c){typeof c=="string"&&(c=CKEDITOR.tools.htmlEncodeAttr(c));this._.output.push(" ",b,'="',c,'"')},closeTag:function(b){this._.output.push("")},text:function(b){this._.output.push(b)},comment:function(b){this._.output.push("<\!--", b,"--\>")},write:function(b){this._.output.push(b)},reset:function(){this._.output=[];this._.indent=false},getHtml:function(b){var c=this._.output.join("");b&&this.reset();return c}}}),CKEDITOR.htmlParser.comment=function(b){this.value=b;this._={isBlockLike:false}},CKEDITOR.htmlParser.comment.prototype={type:CKEDITOR.NODE_COMMENT,writeHtml:function(b,c){var a=this.value;if(c){if(!(a=c.onComment(a,this)))return;if(typeof a!="string"){a.parent=this.parent;a.writeHtml(b,c);return}}b.comment(a)}},function(){CKEDITOR.htmlParser.text= function(b){this.value=b;this._={isBlockLike:false}};CKEDITOR.htmlParser.text.prototype={type:CKEDITOR.NODE_TEXT,writeHtml:function(b,c){var a=this.value;(!c||(a=c.onText(a,this)))&&b.text(a)}}}(),function(){CKEDITOR.htmlParser.cdata=function(b){this.value=b};CKEDITOR.htmlParser.cdata.prototype={type:CKEDITOR.NODE_TEXT,writeHtml:function(b){b.write(this.value)}}}(),CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false}},function(){function b(a){return a.name== "a"&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var c=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),a={ol:1,ul:1},d=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1});CKEDITOR.htmlParser.fragment.fromHtml=function(g,h,e){function i(a){var b;if(p.length>0)for(var c=0;c=0;b--)if(a==p[b].name){p.splice(b,1);return}for(var c=[],h=[],d=s;d!=o&&d.name!=a;){d._.isBlockLike||h.unshift(d);c.push(d);d=d.returnPoint||d.parent}if(d!=o){for(b=0;b0?this.children[b-1]:null;if(c){if(a._.isBlockLike&&c.type==CKEDITOR.NODE_TEXT){c.value=CKEDITOR.tools.rtrim(c.value);if(c.value.length===0){this.children.pop();this.add(a);return}}c.next=a}a.previous=c;a.parent=this; this.children.splice(b,0,a);if(!this._.hasInlineStarted)this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike},writeHtml:function(a,b){var c;this.filterChildren=function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml.call(this,a,b);a=a.getHtml();this.children=(new CKEDITOR.htmlParser.fragment.fromHtml(a)).children;c=1};b&&b.onRoot(this);this.writeChildrenHtml(a,c?null:b)},writeChildrenHtml:function(a,b,c){if(c&&!this.parent&&b)b.onRoot(this); for(c=0;c=0;d--)if(g=b[d]){g.pri=c;a.splice(f,0,g)}}}function a(a,b,c){if(b)for(var f in b){var g=a[f];a[f]=d(g,b[f],c);g||a.$length++}}function d(a,b,d){if(b){b.pri=d;if(a){if(a.splice)c(a,b,d);else{a=a.pri> d?[b,a]:[a,b];a.filter=g}return a}return b.filter=b}}function g(a){for(var b=a.type||a instanceof CKEDITOR.htmlParser.fragment,c=0;c 7||e.name in CKEDITOR.dtd.tr||e.name in CKEDITOR.dtd.$listItem))g=false;else{g=a(e);g=!g||e.name=="form"&&g.name=="input"}g&&e.add(f(b))}}}function j(a,b){if((!m||!CKEDITOR.env.ie)&&a.type==CKEDITOR.NODE_ELEMENT&&a.name=="br"&&!a.attributes["data-cke-eol"])return true;var c;if(a.type==CKEDITOR.NODE_TEXT&&(c=a.value.match(t))){if(c.index){e(a,new CKEDITOR.htmlParser.text(a.value.substring(0,c.index)));a.value=c[0]}if(CKEDITOR.env.ie&&m&&(!b||a.parent.name in n))return true;if(!m)if((c=a.previous)&& c.name=="br"||!c||h(c))return true}return false}var o={elements:{}},m=c=="html",n=CKEDITOR.tools.extend({},u),k;for(k in n)"#"in z[k]||delete n[k];for(k in n)o.elements[k]=l(m,b.config.fillEmptyBlocks!==false);o.root=l(m);o.elements.br=function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var c=b.attributes;if("data-cke-bogus"in c||"data-cke-eol"in c)delete c["data-cke-bogus"];else{for(c=b.next;c&&g(c);)c=c.next;var i=d(b);if(!c&&h(b.parent)){b=b.parent;c=f(a);i=b.children[b.children.length- 1];b.children.push(c);c.parent=b;if(i){i.next=c;c.previous=i}}else h(c)&&(i&&!h(i))&&e(c,f(a))}}}}(m);return o}function c(a){return a.enterMode!=CKEDITOR.ENTER_BR&&a.autoParagraph!==false?a.enterMode==CKEDITOR.ENTER_DIV?"div":"p":false}function a(a){for(a=a.children[a.children.length-1];a&&g(a);)a=a.previous;return a}function d(a){for(a=a.previous;a&&g(a);)a=a.previous;return a}function g(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]} function h(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in u||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function e(a,b){var c=a.parent.children,f=CKEDITOR.tools.indexOf(c,a);c.splice(f,0,b);c=a.previous;a.previous=b;b.next=a;b.parent=a.parent;if(c){b.previous=c;c.next=b}}function i(a){var b=a.parent.children,c=CKEDITOR.tools.indexOf(b,a),f=a.previous,a=a.next;f&&(f.next=a);a&&(a.previous=f);b.splice(c,1)}function f(a){var b=a.parent;return b?CKEDITOR.tools.indexOf(b.children,a):-1}function j(a){a= a.attributes;a.contenteditable!="false"&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function k(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function l(a){return a.replace(A,function(a,b,c){return"<"+b+c.replace(y,function(a,b){return!/^on/.test(b)&&c.indexOf("data-cke-saved-"+b)==-1?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+">"})}function m(a){return a.replace(C,function(a){return""+ encodeURIComponent(a)+""})}function n(a){return a.replace(D,function(a,b){return decodeURIComponent(b)})}function o(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,function(a){return"<\!--"+x+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function p(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function r(a,b){var c=b._.dataStore;return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(a, b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function s(a,b){for(var c=[],f=b.config.protectedSource,e=b._.dataStore||(b._.dataStore={id:1}),d=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,f=[//gi,//gi].concat(f),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(c.push(a)-1)+"--\>"}),h=0;h"});a=a.replace(d,function(a,b,f){return"<\!--"+x+(b?"{C}":"")+encodeURIComponent(c[f]).replace(/--/g,"%2D%2D")+"--\>"});return a.replace(/(['"]).*?\1/g,function(a){return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(a,b){e[e.id]=decodeURIComponent(b);return"{cke_protected_"+e.id++ +"}"})})}CKEDITOR.htmlDataProcessor=function(a){var c,f;this.editor=a;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter= f=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(q);c.addRules(b(a,"data"));f.addRules(v);f.addRules(b(a,"html"))};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,f){var a=s(a,this.editor),a=l(a),a=m(a),a=a.replace(F,"$1cke:$2"),a=a.replace(L,""),a=CKEDITOR.env.opera?a:a.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),e=this.editor.editable(),d;!b&&b!==null&&(b=e.getName());e=b||e.getName();if(CKEDITOR.env.ie&&CKEDITOR.env.version< 9&&e=="pre"){e="div";a="
"+a+"
";d=1}e=this.editor.document.createElement(e);e.setHtml("a"+a);a=e.getHtml().substr(1);a=a.replace(RegExp(" data-cke-"+CKEDITOR.rnd+"-","ig")," ");d&&(a=a.replace(/^
|<\/pre>$/gi,""));a=a.replace(G,"$1$2");a=n(a);a=p(a);a=CKEDITOR.htmlParser.fragment.fromHtml(a,b,f===false?false:c(this.editor.config));b=new CKEDITOR.htmlParser.basicWriter;a.writeChildrenHtml(b,this.dataFilter,1);a=b.getHtml(true);return a=o(a)},toDataFormat:function(a){var b=this.editor.editable(),
f=this.writer,a=CKEDITOR.htmlParser.fragment.fromHtml(a,b.getName(),c(this.editor.config));f.reset();a.writeChildrenHtml(f,this.htmlFilter,1);f=f.getHtml(true);f=p(f);return f=r(f,this.editor)}};var t=/(?: |\xa0)$/,x="{cke_protected}",z=CKEDITOR.dtd,w=["caption","colgroup","col","thead","tfoot","tbody"],u=CKEDITOR.tools.extend({},z.$blockLimit,z.$block),q={elements:{},attributeNames:[[/^on/,"data-cke-pa-on"]]},v={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,
""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return false;for(var c=["name","href","src"],f,e=0;e-1&&e>-1&&c!=e)){c=f(a);e=f(b)}return c>e?1:-1})},embed:function(a){var b=
a.parent;if(b&&b.name=="object"){var c=b.attributes.width,b=b.attributes.height;c&&(a.attributes.width=c);b&&(a.attributes.height=b)}},param:function(a){a.children=[];a.isEmpty=true;return a},a:function(a){if(!a.children.length&&!a.attributes.name&&!a.attributes["data-cke-saved-name"])return false},span:function(a){a.attributes["class"]=="Apple-style-span"&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;
delete a.attributes.contenteditable},style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));if(!a.attributes.type)a.attributes.type="text/css"},title:function(a){var b=a.children[0];b&&(b.value=a.attributes["data-cke-title"]||"")}},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||false}}};if(CKEDITOR.env.ie)v.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})};for(var B in{input:1,
textarea:1}){q.elements[B]=j;v.elements[B]=k}var A=/<(a|area|img|input|source)\b([^>]*)>/gi,y=/\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,C=/(?:])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,D=/([^<]*)<\/cke:encoded>/gi,F=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,G=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,L=/]*?)\/?>(?!\s*<\/cke:\1)/gi}(),CKEDITOR.htmlParser.element=function(b,c){this.name=
b;this.attributes=c||{};this.children=[];var a=b||"",d=a.match(/^cke:(.*)/);d&&(a=d[1]);a=!(!CKEDITOR.dtd.$nonBodyContent[a]&&!CKEDITOR.dtd.$block[a]&&!CKEDITOR.dtd.$listItem[a]&&!CKEDITOR.dtd.$tableContent[a]&&!(CKEDITOR.dtd.$nonEditable[a]||a=="br"));this.isEmpty=!!CKEDITOR.dtd.$empty[b];this.isUnknown=!CKEDITOR.dtd[b];this._={isBlockLike:a,hasInlineStarted:this.isEmpty||!a}},CKEDITOR.htmlParser.cssStyle=function(b){var c={};((b instanceof CKEDITOR.htmlParser.element?b.attributes.style:b)||"").replace(/"/g,
'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,b,g){b=="font-family"&&(g=g.replace(/["']/g,""));c[b.toLowerCase()]=g});return{rules:c,populate:function(a){var b=this.toString();if(b)a instanceof CKEDITOR.dom.element?a.setAttribute("style",b):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=b:a.style=b},toString:function(){var a=[],b;for(b in c)c[b]&&a.push(b,":",c[b],";");return a.join("")}}},function(){var b=function(b,a){b=b[0];a=a[0];return ba?1:0};CKEDITOR.htmlParser.element.prototype=
{type:CKEDITOR.NODE_ELEMENT,add:CKEDITOR.htmlParser.fragment.prototype.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},writeHtml:function(c,a){var d=this.attributes,g=this,h=g.name,e,i,f,j;g.filterChildren=function(){if(!j){var b=new CKEDITOR.htmlParser.basicWriter;CKEDITOR.htmlParser.fragment.prototype.writeChildrenHtml.call(g,b,a);g.children=(new CKEDITOR.htmlParser.fragment.fromHtml(b.getHtml(),g.clone(),0)).children;j=1}};if(a){if(!this.parent)a.onRoot(this);
for(;;){if(!(h=a.onElementName(h)))return;g.name=h;if(!(g=a.onElement(g)))return;g.parent=this.parent;if(g.name==h)break;if(g.type!=CKEDITOR.NODE_ELEMENT){g.writeHtml(c,a);return}h=g.name;if(!h){for(var h=0,k=this.children.length;h{voiceLabel}<{outerEl} class="cke_inner cke_reset" role="presentation">{topHtml}<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation">{bottomHtml}'));
b=CKEDITOR.dom.element.createFromHtml(g.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.lang.editor,topHtml:d?''+d+"":"",contentId:a.ui.spaceId("contents"),bottomHtml:k?''+k+"":"",outerEl:CKEDITOR.env.ie?"span":"div"}));if(f==CKEDITOR.ELEMENT_MODE_REPLACE){c.hide();
b.insertAfter(c)}else c.append(b);a.container=b;d&&a.ui.space("top").unselectable();k&&a.ui.space("bottom").unselectable();c=a.config.width;f=a.config.height;c&&b.setStyle("width",CKEDITOR.tools.cssLength(c));f&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(f));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}function d(a){var b=a.element;if(a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&b.is("textarea")){var c=b.$.form&&new CKEDITOR.dom.element(b.$.form);
if(c){var f=function(){a.updateElement()};c.on("submit",f);if(!c.$.submit.nodeName&&!c.$.submit.length)c.$.submit=CKEDITOR.tools.override(c.$.submit,function(b){return function(){a.updateElement();b.apply?b.apply(this,arguments):b()}});a.on("destroy",function(){c.removeListener("submit",f)})}}}CKEDITOR.replace=function(a,c){return b(a,c,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(a,c,d){return b(a,c,d,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),
b=0;b",g="",a=d+a.replace(e,function(){return g+d})+g}a=a.replace(/\n/g,"
");b||(a=a.replace(RegExp("
(?=)"),function(a){return f.repeat(a,2)}));a=a.replace(/^ | $/g," ");a=a.replace(/(>|\s) /g,function(a,b){return b+" "}).replace(/ (?=<)/g," ");k(this,"text",a)},insertElement:function(b){h(this);for(var c=this.editor,f=c.config.enterMode,d=c.getSelection(),g=d.getRanges(),i=b.getName(),j=CKEDITOR.dtd.$block[i], k,x,z,w=g.length-1;w>=0;w--){k=g[w];if(!k.checkReadOnly()){k.deleteContents(1);x=!w&&b||b.clone(1);var u,q;if(j)for(;(u=k.getCommonAncestor(0,1))&&(q=CKEDITOR.dtd[u.getName()])&&(!q||!q[i]);)if(u.getName()in CKEDITOR.dtd.span)k.splitElement(u);else if(k.checkStartOfBlock()&&k.checkEndOfBlock()){k.setStartBefore(u);k.collapse(true);u.remove()}else k.splitBlock(f==CKEDITOR.ENTER_DIV?"div":"p",c.editable());k.insertNode(x);z||(z=x)}}if(z){k.moveToPosition(z,CKEDITOR.POSITION_AFTER_END);if(j)if((b=z.getNext(a))&& b.type==CKEDITOR.NODE_ELEMENT&&b.is(CKEDITOR.dtd.$block))b.getDtd()["#"]?k.moveToElementEditStart(b):k.moveToElementEditEnd(z);else if(!b&&f!=CKEDITOR.ENTER_BR){b=k.fixBlock(true,f==CKEDITOR.ENTER_DIV?"div":"p");k.moveToElementEditStart(b)}}d.selectRanges([k]);e(this,CKEDITOR.env.opera)},setData:function(a,b){!b&&this.editor.dataProcessor&&(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.editor.fire("dataReady")},getData:function(a){var b=this.getHtml();!a&&this.editor.dataProcessor&& (b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute("contenteditable",!a)},detach:function(){this.removeClass("cke_editable");var a=this.editor;this._.detach();delete a.document;delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||a.config.ignoreEmptyParagraph!==false&&(b=b.replace(i,function(a, b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&b.type=="Control"||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode)}, this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");this.attachClass(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"cke_editable_inline":a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE||a.elementMode==CKEDITOR.ELEMENT_MODE_APPENDTO?"cke_editable_themed":"");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]= a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(a){CKEDITOR.env.opera&&CKEDITOR.document.getActive().equals(this.isInline()?this:this.getWindow().getFrame())?a.cancel():this.hasFocus=false},null,null,-1);this.on("focus",function(){this.hasFocus=true},null,null,-1);a.focusManager.add(this);if(this.equals(CKEDITOR.document.getActive())){this.hasFocus=true;a.once("contentDom",function(){a.focusManager.focus()})}if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow(); var b=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var e=a.config.contentsLangDirection;this.getDirection(1)!=e&&this.changeAttr("dir",e);a.document.equals(CKEDITOR.document)&&this.changeAttr("tabindex",a.tabIndex);var d=CKEDITOR.getCss();if(d){e=b.getHead();if(!e.getCustomData("stylesheet")){d=b.appendStyleText(d);d=new CKEDITOR.dom.element(d.ownerNode||d.owningElement);e.setCustomData("stylesheet",d);d.data("cke-temp",1)}}e=b.getCustomData("stylesheet_ref")||0;b.setCustomData("stylesheet_ref", e+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){var a=a.data,b=a.getTarget();b.is("a")&&(a.$.button!=2&&b.isReadOnly())&&a.preventDefault()});this.attachListener(a,"key",function(b){if(a.readOnly)return false;var c=b.data.keyCode,e;if(c in{8:1,46:1}){var d=a.getSelection(),b=d.getRanges()[0],h=b.startPath(),i,j,o,c=c==8;if(d=g(d)){a.fire("saveSnapshot");b.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d.remove();b.select(); a.fire("saveSnapshot");e=1}else if(b.collapsed)if((i=h.block)&&b[c?"checkStartOfBlock":"checkEndOfBlock"]()&&(o=i[c?"getPrevious":"getNext"](f))&&o.is("table")){a.fire("saveSnapshot");b[c?"checkEndOfBlock":"checkStartOfBlock"]()&&i.remove();b["moveToElementEdit"+(c?"End":"Start")](o);b.select();a.fire("saveSnapshot");e=1}else if(h.blockLimit&&h.blockLimit.is("td")&&(j=h.blockLimit.getAscendant("table"))&&b.checkBoundaryOfElement(j,c?CKEDITOR.START:CKEDITOR.END)&&(o=j[c?"getPrevious":"getNext"](f))){a.fire("saveSnapshot"); b["moveToElementEdit"+(c?"End":"Start")](o);b.checkStartOfBlock()&&b.checkEndOfBlock()?o.remove():b.select();a.fire("saveSnapshot");e=1}else if((j=h.contains(["td","th","caption"]))&&b.checkBoundaryOfElement(j,c?CKEDITOR.START:CKEDITOR.END))if((o=j[c?"getPreviousSourceNode":"getNextSourceNode"](1,CKEDITOR.NODE_ELEMENT))&&!o.isReadOnly()&&b.root.contains(o)){b[c?"moveToElementEditEnd":"moveToElementEditStart"](o);b.select();e=1}}return!e});CKEDITOR.env.ie&&this.attachListener(this,"click",c);!CKEDITOR.env.ie&& !CKEDITOR.env.opera&&this.attachListener(this,"mousedown",function(b){var c=b.data.getTarget();if(c.is("img","hr","input","textarea","select")){a.getSelection().selectElement(c);c.is("input","textarea","select")&&b.data.preventDefault()}});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(b.data.$.button==2){b=b.data.getTarget();if(!b.getOuterHtml().replace(i,"")){var c=a.createRange();c.moveToElementEditStart(b);c.select(true)}}});if(CKEDITOR.env.webkit){this.attachListener(this, "click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()});this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()})}}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());a=this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref"); if(--c)a.setCustomData("stylesheet_ref",c);else{a.removeCustomData("stylesheet_ref");b.removeCustomData("stylesheet").remove()}}delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(arguments.length)b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null);return b};var i=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi, f=CKEDITOR.dom.walker.whitespaces(true),j=CKEDITOR.dom.walker.bookmark(false,true);CKEDITOR.on("instanceLoaded",function(a){var c=a.editor;c.on("insertElement",function(a){a=a.data;if(a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))){a.getAttribute("contentEditable")!="false"&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1");a.setAttribute("contentEditable",false)}});c.on("selectionChange",function(a){if(!c.readOnly){var f=c.getSelection();if(f&&!f.isLocked){f=c.checkDirty(); c.fire("lockSnapshot");b(a);c.fire("unlockSnapshot");!f&&c.resetDirty()}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");var k=function(){function b(a){return a.type==CKEDITOR.NODE_ELEMENT}function c(a,f){var e,d,h,g,j=[],o=f.range.startContainer;e=f.range.startPath();for(var o=i[o.getName()],k=0,n=a.getChildren(),r=n.count(),p=-1,t=-1,z=0,x=e.contains(i.$list);k-1)j[p].firstNotAllowed=1;if(t>-1)j[t].lastNotAllowed=1;return j}function f(a,c){var e=[],d=a.getChildren(),h=d.count(),g,j=0,k=i[c],o=!a.is(i.$inline)|| a.is("br");for(o&&e.push(" ");j ",v.document);v.insertNode(C);v.setStartAfter(C)}D=new CKEDITOR.dom.elementPath(v.startContainer); t.endPath=F=new CKEDITOR.dom.elementPath(v.endContainer);if(!v.collapsed){y=F.block||F.blockLimit;var L=v.getCommonAncestor();y&&(!y.equals(L)&&!y.contains(L)&&v.checkEndOfBlock())&&t.zombies.push(y);v.deleteContents()}for(;(G=b(v.startContainer)&&v.startContainer.getChild(v.startOffset-1))&&b(G)&&G.isBlockBoundary()&&D.contains(G);)v.moveToPosition(G,CKEDITOR.POSITION_BEFORE_END);h(v,t.blockLimit,D,F);if(C){v.setEndBefore(C);v.collapse();C.remove()}C=v.startPath();if(y=C.contains(d,false,1)){v.splitElement(y); t.inlineStylesRoot=y;t.inlineStylesPeak=C.lastElement}C=v.createBookmark();(y=C.startNode.getPrevious(a))&&b(y)&&d(y)&&A.push(y);(y=C.startNode.getNext(a))&&b(y)&&d(y)&&A.push(y);for(y=C.startNode;(y=y.getParent())&&d(y);)A.push(y);v.moveToBookmark(C);if(q){G=q;q=t.range;if(t.type=="text"&&t.inlineStylesRoot){C=G;G=t.inlineStylesPeak;v=G.getDocument().createText("{cke-peak}");for(A=t.inlineStylesRoot.getParent();!G.equals(A);){v=v.appendTo(G.clone());G=G.getParent()}G=v.getOuterHtml().replace("{cke-peak}", C)}C=t.blockLimit.getName();if(/^\s+|\s+$/.test(G)&&"span"in CKEDITOR.dtd[C]){var K=' ';G=K+G+K}G=t.editor.dataProcessor.toHtml(G,null,false);C=q.document.createElement("body");C.setHtml(G);if(K){C.getFirst().remove();C.getLast().remove()}if((K=q.startPath().block)&&!(K.getChildCount()==1&&K.getBogus()))a:{var H;if(C.getChildCount()==1&&b(H=C.getFirst())&&H.is(k)){K=H.getElementsByTag("*");q=0;for(v=K.count();q0;else{E=H.startPath();if(!F.isBlock&&(M=t.editor.config.enterMode!=CKEDITOR.ENTER_BR&&t.editor.config.autoParagraph!==false?t.editor.config.enterMode==CKEDITOR.ENTER_DIV?"div":"p":false)&&!E.block&&E.blockLimit&&E.blockLimit.equals(H.root)){M=K.createElement(M);!CKEDITOR.env.ie&&M.appendBogus();H.insertNode(M);!CKEDITOR.env.ie&& (J=M.getBogus())&&J.remove();H.moveToPosition(M,CKEDITOR.POSITION_BEFORE_END)}if((E=H.startPath().block)&&!E.equals(I)){if(J=E.getBogus()){J.remove();G.push(E)}I=E}F.firstNotAllowed&&(v=1);if(v&&F.isElement){E=H.startContainer;for(N=null;E&&!i[E.getName()][F.name];){if(E.equals(q)){E=null;break}N=E;E=E.getParent()}if(E){if(N){Q=H.splitElement(N);t.zombies.push(Q);t.zombies.push(N)}}else{N=q.getName();R=!C;E=C==D.length-1;N=f(F.node,N);for(var O=[],P=N.length,T=0,V=void 0,W=0,X=-1;T1&&d&&d.intersectsNode(c.$)){f=[e.anchorOffset,e.focusOffset];d=e.focusNode==c.$&&e.focusOffset>0;e.anchorNode==c.$&&e.anchorOffset>0&&f[0]--;d&&f[1]--;var g;d=e;if(!d.isCollapsed){g=d.getRangeAt(0);g.setStart(d.anchorNode,d.anchorOffset);g.setEnd(d.focusNode,d.focusOffset);g=g.collapsed}g&&f.unshift(f.pop())}}c.setText(c.getText().replace(/\u200B/g,""));if(f){c=e.getRangeAt(0);c.setStart(c.startContainer,f[0]);c.setEnd(c.startContainer,f[1]);e.removeAllRanges(); e.addRange(c)}}}var e,i,f=CKEDITOR.dom.walker.invisible(1);CKEDITOR.on("instanceCreated",function(a){function f(){var a=e.getSelection();a&&a.removeAllRanges()}var e=a.editor;e.define("selectionChange",{errorProof:1});e.on("contentDom",function(){var a=e.document,f=CKEDITOR.document,d=e.editable(),g=a.getBody(),i=a.getDocumentElement(),k=d.isInline();if(CKEDITOR.env.ie||CKEDITOR.env.opera||k){var l;d.attachListener(d,"focus",function(){e.unlockSelection(l);l=0},null,null,-1);var m,u=function(){m= e.getSelection(1);m.lock()};j?d.attachListener(d,"beforedeactivate",u,null,null,-1):d.attachListener(e,"selectionCheck",u,null,null,-1);d.attachListener(d,"blur",function(){e.lockSelection(m);l=1},null,null,-1);d.attachListener(d,"mousedown",function(){l=0})}if(CKEDITOR.env.ie&&!k){var q;d.attachListener(d,"mousedown",function(a){a.data.$.button==2&&e.document.$.selection.type=="None"&&(q=e.window.getScrollPosition())});d.attachListener(d,"mouseup",function(a){if(a.data.$.button==2&&q){e.document.$.documentElement.scrollLeft= q.x;e.document.$.documentElement.scrollTop=q.y}q=null});if(a.$.compatMode!="BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)i.on("mousedown",function(a){function b(a){a=a.data.$;if(e){var c=g.$.createTextRange();try{c.moveToPoint(a.x,a.y)}catch(f){}e.setEndPoint(h.compareEndPoints("StartToStart",c)<0?"EndToEnd":"StartToStart",c);e.select()}}function c(){i.removeListener("mousemove",b);f.removeListener("mouseup",c);i.removeListener("mouseup",c);e.select()}a=a.data;if(a.getTarget().is("html")&& a.$.y7){i.on("mousedown",function(a){if(a.data.getTarget().is("html")){f.on("mouseup",v);i.on("mouseup",v)}});var v=function(){f.removeListener("mouseup",v);i.removeListener("mouseup",v);var b=CKEDITOR.document.$.selection,c=b.createRange();b.type!="None"&&c.parentElement().ownerDocument== a.$&&c.select()}}}}d.attachListener(d,"selectionchange",b,e);d.attachListener(d,"mouseup",c,e);d.attachListener(d,"keyup",c,e);d.attachListener(d,"focus",function(){e.forceNextSelectionCheck();e.selectionChange(1)});if(CKEDITOR.env.webkit)a.on("keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:h(e.editable())}},null,null,-1)});e.on("contentDomUnload",e.forceNextSelectionCheck,e);e.on("dataReady",function(){e.selectionChange(1)}); CKEDITOR.env.ie9Compat&&e.on("beforeDestroy",f,null,null,9);CKEDITOR.env.webkit&&e.on("setData",f);e.on("contentDomUnload",function(){e.unlockSelection()})});CKEDITOR.on("instanceReady",function(a){var b=a.editor,c=b.editable();if(CKEDITOR.env.webkit){b.on("selectionChange",function(){var a=g(c);a&&(a.getCustomData("ready")?h(c):a.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){h(c)},null,null,-1);var f,e,a=function(){var a=b.document,d=g(c);if(d){a=a.$.defaultView.getSelection(); a.type=="Caret"&&a.anchorNode==d.$&&(e=1);f=d.getText();d.setText(f.replace(/\u200B/g,""))}},d=function(){var a=b.document,d=g(c);if(d){d.setText(f);if(e){a.$.defaultView.getSelection().setPosition(d.$,d.getLength());e=0}}};b.on("beforeUndoImage",a);b.on("afterUndoImage",d);b.on("beforeGetData",a,null,null,0);b.on("getData",d)}});CKEDITOR.editor.prototype.selectionChange=function(a){(a?b:c).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){if(this._.savedSelection&&!a)return this._.savedSelection; return(a=this.editable())?new CKEDITOR.dom.selection(a):null};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);if(a.getType()!=CKEDITOR.SELECTION_NONE){!a.isLocked&&a.lock();this._.savedSelection=a;return true}return false};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;if(b){b.unlock(a);delete this._.savedSelection;return true}return false};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath}; CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;var j=typeof window.getSelection!="function";CKEDITOR.dom.selection=function(a){var b=a instanceof CKEDITOR.dom.element;this.document= a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=b?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(CKEDITOR.env.webkit){a=this.document.getWindow().$.getSelection();if(a.type=="None"&&this.document.getActive().equals(this.root)||a.type=="Caret"&&a.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT){var c=new CKEDITOR.dom.range(this.root);c.moveToPosition(this.root,CKEDITOR.POSITION_AFTER_START);b=this.document.$.createRange();b.setStart(c.startContainer.$,c.startOffset);b.collapse(1); a.addRange(b)}}var a=this.getNative(),f;if(a)if(a.getRangeAt)f=(c=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(c.commonAncestorContainer);else{try{c=a.createRange()}catch(e){}f=c&&CKEDITOR.dom.element.get(c.item&&c.item(0)||c.parentElement())}if(!f||!this.root.equals(f)&&!this.root.contains(f)){this._.cache.type=CKEDITOR.SELECTION_NONE;this._.cache.startElement=null;this._.cache.selectedElement=null;this._.cache.selectedText="";this._.cache.ranges=new CKEDITOR.dom.rangeList}return this}; var k={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=j?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:j?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),f=c.type;if(f=="Text")b= CKEDITOR.SELECTION_TEXT;if(f=="Control")b=CKEDITOR.SELECTION_ELEMENT;if(c.createRange().parentElement())b=CKEDITOR.SELECTION_TEXT}catch(e){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(c.rangeCount==1){var c=c.getRangeAt(0),f=c.startContainer;if(f==c.endContainer&&f.nodeType==1&&c.endOffset-c.startOffset==1&&k[f.childNodes[c.startOffset].nodeName.toLowerCase()])b=CKEDITOR.SELECTION_ELEMENT}return a.type= b},getRanges:function(){var a=j?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,c){b=b.duplicate();b.collapse(c);var f=b.parentElement(),e=f.ownerDocument;if(!f.hasChildNodes())return{container:f,offset:0};for(var d=f.children,g,h,i=b.duplicate(),j=0,k=d.length-1,l=-1,n,A;j<=k;){l=Math.floor((j+k)/2);g=d[l];i.moveToElementText(g);n=i.compareEndPoints("StartToStart",b);if(n>0)k=l-1;else if(n<0)j=l+1;else{if(CKEDITOR.env.ie9Compat&&g.tagName=="BR"){d=e.defaultView.getSelection(); return{container:d[c?"anchorNode":"focusNode"],offset:d[c?"anchorOffset":"focusOffset"]}}return{container:f,offset:a(g)}}}if(l==-1||l==d.length-1&&n<0){i.moveToElementText(f);i.setEndPoint("StartToStart",b);e=i.text.replace(/(\r\n|\r)/g,"\n").length;d=f.childNodes;if(!e){g=d[d.length-1];return g.nodeType!=CKEDITOR.NODE_TEXT?{container:f,offset:d.length}:{container:g,offset:g.nodeValue.length}}for(f=d.length;e>0&&f>0;){h=d[--f];if(h.nodeType==CKEDITOR.NODE_TEXT){A=h;e=e-h.nodeValue.length}}return{container:A, offset:-e}}i.collapse(n>0?true:false);i.setEndPoint(n>0?"StartToStart":"EndToStart",b);e=i.text.replace(/(\r\n|\r)/g,"\n").length;if(!e)return{container:f,offset:a(g)+(n>0?0:1)};for(;e>0;)try{h=g[n>0?"previousSibling":"nextSibling"];if(h.nodeType==CKEDITOR.NODE_TEXT){e=e-h.nodeValue.length;A=h}g=h}catch(y){return{container:f,offset:a(g)}}return{container:A,offset:n>0?-e:A.nodeValue.length+e}};return function(){var a=this.getNative(),c=a&&a.createRange(),f=this.getType();if(!a)return[];if(f==CKEDITOR.SELECTION_TEXT){a= new CKEDITOR.dom.range(this.root);f=b(c,true);a.setStart(new CKEDITOR.dom.node(f.container),f.offset);f=b(c);a.setEnd(new CKEDITOR.dom.node(f.container),f.offset);a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse();return[a]}if(f==CKEDITOR.SELECTION_ELEMENT){for(var f=[],e=0;e=b.getLength()?j.setStartAfter(b):j.setStartBefore(b));g&& g.type==CKEDITOR.NODE_TEXT&&(i?j.setEndAfter(g):j.setEndBefore(g));b=new CKEDITOR.dom.walker(j);b.evaluator=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&a.isReadOnly()){var b=d.clone();d.setEndBefore(a);d.collapsed&&f.splice(e--,1);if(!(a.getPosition(j.endContainer)&CKEDITOR.POSITION_CONTAINS)){b.setStartAfter(a);b.collapsed||f.splice(e+1,0,b)}return true}return false};b.next()}}return c.ranges}}(),getStartElement:function(){var a=this._.cache;if(a.startElement!==void 0)return a.startElement;var b; switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];if(c){if(c.collapsed){b=c.startContainer;b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent())}else{for(c.optimize();;){b=c.startContainer;if(c.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary())c.setStartAfter(b);else break}b=c.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();b=b.getChild(c.startOffset);if(!b|| b.type!=CKEDITOR.NODE_ELEMENT)b=c.startContainer;else for(c=b.getFirst();c&&c.type==CKEDITOR.NODE_ELEMENT;){b=c;c=c.getFirst()}}b=b.$}}return a.startElement=b?new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(a.selectedElement!==void 0)return a.selectedElement;var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0],c,f,e=2;e&&(!(c=a.getEnclosedNode())||!(c.type==CKEDITOR.NODE_ELEMENT&&k[c.getName()]&& (f=c)));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return f.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=this._.cache;if(a.selectedText!==void 0)return a.selectedText;var b=this.getNative(),b=j?b.type=="Control"?"":b.createRange().text:b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b= this.getSelectedElement(),c=!b&&this.getRanges();this.isLocked=0;this.reset();if(a)(a=b||c[0].getCommonAncestor())&&a.getAscendant("body",1)&&(b?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={}},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){if(a.length)if(this.isLocked){var b=CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();!b.equals(this.root)&& b.focus()}else{if(j){var c=CKEDITOR.dom.walker.whitespaces(true),f=/\ufeff|\u00a0/,e={table:1,tbody:1,tr:1};if(a.length>1){b=a[a.length-1];a[0].setEnd(b.endContainer,b.endOffset)}var b=a[0],a=b.collapsed,g,i,t,x=b.getEnclosedNode();if(x&&x.type==CKEDITOR.NODE_ELEMENT&&x.getName()in k&&(!x.is("a")||!x.getText()))try{t=x.$.createControlRange();t.addElement(x.$);t.select();return}catch(z){}(b.startContainer.type==CKEDITOR.NODE_ELEMENT&&b.startContainer.getName()in e||b.endContainer.type==CKEDITOR.NODE_ELEMENT&& b.endContainer.getName()in e)&&b.shrink(CKEDITOR.NODE_ELEMENT,true);t=b.createBookmark();var e=t.startNode,w;if(!a)w=t.endNode;t=b.document.$.body.createTextRange();t.moveToElementText(e.$);t.moveStart("character",1);if(w){f=b.document.$.body.createTextRange();f.moveToElementText(w.$);t.setEndPoint("EndToEnd",f);t.moveEnd("character",-1)}else{g=e.getNext(c);i=e.hasAscendant("pre");g=!(g&&g.getText&&g.getText().match(f))&&(i||!e.hasPrevious()||e.getPrevious().is&&e.getPrevious().is("br"));i=b.document.createElement("span"); i.setHtml("");i.insertBefore(e);g&&b.document.createText("").insertBefore(e)}b.setStartBefore(e);e.remove();if(a){if(g){t.moveStart("character",-1);t.select();b.document.$.selection.clear()}else t.select();b.moveToPosition(i,CKEDITOR.POSITION_BEFORE_START);i.remove()}else{b.setEndBefore(w);w.remove();t.select()}}else{w=this.getNative();if(!w)return;if(CKEDITOR.env.opera){b=this.document.$.createRange();b.selectNodeContents(this.root.$);w.addRange(b)}this.removeAllRanges();for(f=0;f=0){b.collapse(1);t.setEnd(b.endContainer.$,b.endOffset)}else throw u;}w.addRange(t)}}this.reset();this.root.fire("selectionchange")}},createBookmarks:function(a){return this.getRanges().createBookmarks(a)},createBookmarks2:function(a){return this.getRanges().createBookmarks2(a)},selectBookmarks:function(a){for(var b=[],c=0;c]*>)[ \t\r\n]*/gi,"$1");g=g.replace(/([ \t\n\r]+| )/g," ");g=g.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var i=a.getDocument().createElement("div");i.append(d);d.$.outerHTML="
"+g+"
";d.copyAttributes(i.getFirst()); d=i.getFirst().remove()}else d.setHtml(g);b=d}else g?b=k(c?[a.getHtml()]:f(a),b):a.moveChildren(b);b.replace(a);if(e){var c=b,h;if((h=c.getPrevious(A))&&h.is&&h.is("pre")){e=j(h.getHtml(),/\n$/,"")+"\n\n"+j(c.getHtml(),/^\n/,"");CKEDITOR.env.ie?c.$.outerHTML="
"+e+"
":c.setHtml(e);h.remove()}}else c&&o(b)}function f(a){a.getName();var b=[];j(a.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"
"+c+"
"}).replace(/([\s\S]*?)<\/pre>/gi,
function(a,c){b.push(c)});return b}function j(a,b,c){var f="",e="",a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(f=b);c&&(e=c);return""});return f+a.replace(b,c)+e}function k(a,b){var c;a.length>1&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var f=0;f"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat(" ",a.length-1)+" "});if(c){var d=b.clone();d.setHtml(e);c.append(d)}else b.setHtml(e)}return c||b}function l(a){var b=this._.definition,c=b.attributes,b=b.styles,e=t(this)[a.getName()],f=CKEDITOR.tools.isEmpty(c)&&CKEDITOR.tools.isEmpty(b),d;for(d in c)if(!((d=="class"||this._.definition.fullMatch)&&a.getAttribute(d)!=
x(d,c[d]))){f=a.hasAttribute(d);a.removeAttribute(d)}for(var g in b)if(!(this._.definition.fullMatch&&a.getStyle(g)!=x(g,b[g],true))){f=f||!!a.getStyle(g);a.removeStyle(g)}n(a,e,w[a.getName()]);f&&(this._.definition.alwaysRemoveElement?o(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?o(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function m(a){for(var b=t(this),c=a.getElementsByTag(this.element),e=c.count();--e>=0;)l.call(this,c.getItem(e));
for(var f in b)if(f!=this.element){c=a.getElementsByTag(f);for(e=c.count()-1;e>=0;e--){var d=c.getItem(e);n(d,b[f])}}}function n(a,b,c){if(b=b&&b.attributes)for(var e=0;e",a||b.name,"");return c.join("")}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,c=a.attributes&&a.attributes.style||"",e="";c.length&&(c=c.replace(q,";"));for(var f in b){var d=b[f],g=(f+":"+d).replace(q,";");d=="inherit"?e=e+g:c=c+g}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,true));return a._ST=c+e}}(),CKEDITOR.styleCommand=function(b){this.style=b},CKEDITOR.styleCommand.prototype.exec=function(b){b.focus();this.state==
CKEDITOR.TRISTATE_OFF?b.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&b.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(b,c,a){CKEDITOR.stylesSet.addExternal(b,c,"");CKEDITOR.stylesSet.load(b,a)},CKEDITOR.editor.prototype.getStylesSet=function(b){if(this._.stylesDefinitions)b(this._.stylesDefinitions);else{var c=this,a=c.config.stylesCombo_stylesSet||
c.config.stylesSet||"default";if(a instanceof Array){c._.stylesDefinitions=a;b(a)}else{var a=a.split(":"),d=a[0];CKEDITOR.stylesSet.addExternal(d,a[1]?a.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(d,function(a){c._.stylesDefinitions=a[d];b(c._.stylesDefinitions)})}}},CKEDITOR.dom.comment=function(b,c){typeof b=="string"&&(b=(c?c.$:document).createComment(b));CKEDITOR.dom.domObject.call(this,b)},CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,
{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"<\!--"+this.$.nodeValue+"--\>"}}),function(){var b={},c;for(c in CKEDITOR.dtd.$blockLimit)c in CKEDITOR.dtd.$list||(b[c]=1);var a={};for(c in CKEDITOR.dtd.$block)c in CKEDITOR.dtd.$blockLimit||c in CKEDITOR.dtd.$empty||(a[c]=1);CKEDITOR.dom.elementPath=function(c,g){var h=null,e=null,i=[],g=g||c.getDocument().getBody(),f=c;do if(f.type==CKEDITOR.NODE_ELEMENT){i.push(f);if(!this.lastElement){this.lastElement=f;if(f.is(CKEDITOR.dtd.$object))continue}var j=
f.getName();if(!e){!h&&a[j]&&(h=f);if(b[j]){var k;if(k=!h){if(j=j=="div"){a:{j=f.getChildren();k=0;for(var l=j.count();k-1}:typeof b=="function"?d=b:typeof b=="object"&&(d=function(a){return a.getName()in b});var g=this.elements,h=g.length;c&&h--;if(a){g=Array.prototype.slice.call(g,0);g.reverse()}for(c=
0;c=d){h=g.createText("");h.insertAfter(this)}else{b=g.createText("");b.insertAfter(h);b.remove()}return h},substring:function(b,c){return typeof c!="number"?this.$.nodeValue.substr(b):this.$.nodeValue.substring(b,c)}}),function(){function b(a,
b,c){var h=a.serializable,e=b[c?"endContainer":"startContainer"],i=c?"endOffset":"startOffset",f=h?b.document.getById(a.startNode):a.startNode,a=h?b.document.getById(a.endNode):a.endNode;if(e.equals(f.getPrevious())){b.startOffset=b.startOffset-e.getLength()-a.getPrevious().getLength();e=a.getNext()}else if(e.equals(a.getPrevious())){b.startOffset=b.startOffset-e.getLength();e=a.getNext()}e.equals(f.getParent())&&b[i]++;e.equals(a.getParent())&&b[i]++;b[c?"endContainer":"startContainer"]=e;return b}
CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,c)};var c={createIterator:function(){var a=this,b=CKEDITOR.dom.walker.bookmark(),c=[],h;return{getNextRange:function(e){h=h==void 0?0:h+1;var i=a[h];if(i&&a.length>1){if(!h)for(var f=a.length-1;f>=0;f--)c.unshift(a[f].createBookmark(true));if(e)for(var j=0;a[h+j+1];){for(var k=i.document,e=0,f=k.getById(c[j].endNode),k=k.getById(c[j+1].startNode);;){f=
f.getNextSourceNode(false);if(k.equals(f))e=1;else if(b(f)||f.type==CKEDITOR.NODE_ELEMENT&&f.isBlockBoundary())continue;break}if(!e)break;j++}for(i.moveToBookmark(c.shift());j--;){f=a[++h];f.moveToBookmark(c.shift());i.setEnd(f.endContainer,f.endOffset)}}return i}}},createBookmarks:function(a){for(var c=[],g,h=0;hb?-1:1}),f=0,d;f',CKEDITOR.document);b.appendTo(CKEDITOR.document.getHead());try{CKEDITOR.env.hc=b.getComputedStyle("border-top-color")==b.getComputedStyle("border-right-color")}catch(c){CKEDITOR.env.hc=false}b.remove()}if(CKEDITOR.env.hc)CKEDITOR.env.cssClass=CKEDITOR.env.cssClass+
" cke_hc";CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(b=CKEDITOR._.pending){delete CKEDITOR._.pending;for(var a=0;a",c.label,"",'");else{e={type:"hbox",widths:c.widths,padding:0,children:[{type:"html",html:'