diff --git a/core/misc/ckeditor/CHANGES.md b/core/misc/ckeditor/CHANGES.md index 4370e54..008f815 100644 --- a/core/misc/ckeditor/CHANGES.md +++ b/core/misc/ckeditor/CHANGES.md @@ -1,6 +1,54 @@ CKEditor 4 Changelog ==================== +## CKEditor 4.1 RC + +* [#9829](http://dev.ckeditor.com/ticket/9829): Data and features activation based on editor configuration. + + Brand new data filtering system that works in 2 modes: + + * based on loaded features (toolbar items, plugins) - the data will be filtered according to what the editor in its + current configuration can handle, + * based on `config.allowedContent` rules - the data will be filtered and the editor features (toolbar items, commands, + keystrokes) will be enabled if they are allowed. + + See the `datafiltering.html` sample, [guides](http://docs.ckeditor.com/#!/guide/dev_data_filter) and [`CKEDITOR.filter` API documentation](http://docs.ckeditor.com/#!/api/CKEDITOR.filter). +* [#9387](http://dev.ckeditor.com/ticket/9387): Reintroduced "Shared Spaces" - the ability to display toolbar and bottom editor space in selected locations and to share them by different editor instances. +* [#9907](http://dev.ckeditor.com/ticket/9907): Added the `contentPreview` event for preview data manipulation. +* [#9713](http://dev.ckeditor.com/ticket/9713): Introduced the `sourcedialog` plugin that brings raw HTML editing for inline editor instances. +* Included in [#9829](http://dev.ckeditor.com/ticket/9829): Introduced new events, `toHtml` and `toDataFormat`, allowing for better integration with data processing. See API documentation: [`toHtml`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-toHtml), [`toDataFormat`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-toDataFormat). +* [#9981](http://dev.ckeditor.com/ticket/9981): Added ability to filter `htmlParser.fragment`, `htmlParser.element` etc. by many `htmlParser.filter`s before writing structure to an HTML string. +* Included in [#10103](http://dev.ckeditor.com/ticket/10103): + * Introduced the `editor.status` property to make it easier to check the current status of the editor. See [API documentation](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-status). + * Default `command` state is now `CKEDITOR.TRISTATE_DISABLE`. It will be activated on `editor.instanceReady` or immediately after being added if the editor is already initialized. +* [#9796](http://dev.ckeditor.com/ticket/9796): Introduced `` as a default tag for strikethrough, which replaces obsolete `` in HTML5. + +## CKEditor 4.0.2 + +* [#9779](http://dev.ckeditor.com/ticket/9779): Fixed overriding `CKEDITOR.getUrl` with `CKEDITOR_GETURL`. +* [#9772](http://dev.ckeditor.com/ticket/9772): Custom buttons in dialog window footer have different look and size (Moono, Kama). +* [#9029](http://dev.ckeditor.com/ticket/9029): Custom styles added with `styleSet.add()` are displayed in wrong order. +* [#9887](http://dev.ckeditor.com/ticket/9887): Disable magicline when `editor.readOnly` is set. +* [#9882](http://dev.ckeditor.com/ticket/9882): Fixed empty document title on `getData()` if set via the Document Properties dialog window. +* [#9773](http://dev.ckeditor.com/ticket/9773): Fixed rendering problems with selection fields in the Kama skin. +* [#9851](http://dev.ckeditor.com/ticket/9851): The `selectionChange` event is not fired when mouse selection ended outside editable. +* [#9903](http://dev.ckeditor.com/ticket/9903): [Inline editor] Bad positioning of floating space with page horizontal scroll. +* [#9872](http://dev.ckeditor.com/ticket/9872): `editor.checkDirty()` returns `true` when called onload. Removed the obsolete `editor.mayBeDirty` flag. +* [#9893](http://dev.ckeditor.com/ticket/9893): Fixed broken toolbar when editing mixed direction content in Quirks mode. +* [#9845](http://dev.ckeditor.com/ticket/9845): Fixed TAB navigation in the Link dialog window when the Anchor option is used and no anchors are available. +* [#9883](http://dev.ckeditor.com/ticket/9883): Maximizing was making the entire page editable with divarea-based editors. +* [#9940](http://dev.ckeditor.com/ticket/9940): [Firefox] Navigating back to a page with the editor was making the entire page editable. +* [#9966](http://dev.ckeditor.com/ticket/9966): Fixed: Unable to type square brackets with French keyboard layout. Changed magicline keystrokes. +* [#9507](http://dev.ckeditor.com/ticket/9507): [Firefox] Selection is moved before editable position when the editor is focused for the first time. +* [#9947](http://dev.ckeditor.com/ticket/9947): [Webkit] Editor overflows parent container in some edge cases. +* [#10105](http://dev.ckeditor.com/ticket/10105): Fixed: Broken sourcearea view when an RTL language is set. +* [#10123](http://dev.ckeditor.com/ticket/10123): [Webkit] Fixed: Several dialog windows have broken layout since the latest Webkit release. +* [#10152](http://dev.ckeditor.com/ticket/10152): Fixed: Invalid ARIA property used on menu items. + +## CKEditor 4.0.1.1 + +* Security update: Added protection against XSS attack and possible path disclosure in PHP sample. + ## CKEditor 4.0.1 Fixed issues: @@ -53,4 +101,4 @@ The CKEditor JavaScript API has been kept compatible with CKEditor 4, whenever possible. The list of relevant changes can be found in the [API Changes page of the CKEditor 4 documentation][1]. -[1]: http://docs.ckeditor.com/#!/guide/dev_api_changes "API Changes"" +[1]: http://docs.ckeditor.com/#!/guide/dev_api_changes "API Changes" diff --git a/core/misc/ckeditor/build-config.js b/core/misc/ckeditor/build-config.js index beff402..1536105 100644 --- a/core/misc/ckeditor/build-config.js +++ b/core/misc/ckeditor/build-config.js @@ -1,17 +1,13 @@ - -/** - * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.html or http://ckeditor.com/license - */ - -/** +/** * This is a Drupal-optimized build of CKEditor. * * At the time of writing, this build is identical to the "standard" build of - * CKEditor, includes all languages, and excludes the "placeholder" plugin. + * CKEditor, includes all languages, excludes the "placeholder" and includes the + * "sourcedialog" plugin. * * You may re-use it at any time at http://ckeditor.com/builder to build - * CKEditor again. + * CKEditor again. Alternatively, use the "build.sh" script to build it locally. + * If you do so, be sure to pass it the "-s" flag. So: "sh build.sh -s". * * NOTE: * This file is not used by CKEditor, you may remove it. @@ -21,21 +17,18 @@ var CKBUILDER_CONFIG = { skin: 'moono', ignore: [ + // CKEditor repository structure: unrelated to the usage of CKEditor itself. 'dev', + '.mailmap', '.gitignore', '.gitattributes', + // Parts of CKEditor that we consciously don't ship with Drupal. 'README.md', - '.mailmap', 'config.js', 'contents.css', - /** - * A bug requires us to include this file. - * - * Will be fixed at http://dev.ckeditor.com/ticket/9992#comment:4. - * 'styles.js', - */ - 'samples' + 'samples', + 'skins/moono/readme.md' ], plugins : { 'about' : 1, @@ -86,11 +79,15 @@ var CKBUILDER_CONFIG = { 'showborders' : 1, 'tableresize' : 1, 'sharedspace' : 1, - 'widget' : 1, - 'widgetblockquote' : 1, - 'widgetcaption' : 1, - 'widgettime' : 1, - 'widgetvideo' : 1 + 'sourcedialog' : 1 + // @todo D8: CKEditor Widgets is not available in 4.1 RC, and we're not yet + // using this, so it's commented out for now. However, it will be readded in + // the nearby future. + // 'widget' : 1, + // 'widgetblockquote' : 1, + // 'widgetcaption' : 1, + // 'widgettime' : 1, + // 'widgetvideo' : 1 }, languages : { 'af' : 1, diff --git a/core/misc/ckeditor/ckeditor.js b/core/misc/ckeditor/ckeditor.js index c81ed05..26fdb4c 100644 --- a/core/misc/ckeditor/ckeditor.js +++ b/core/misc/ckeditor/ckeditor.js @@ -2,870 +2,843 @@ Copyright (c) 2003-2013, 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:"D11K",version:"4.0 DEV",revision:"0",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<=g){k.splice(m+1,0,d);return{removeListener:c}}k.unshift(d)}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(g,d,j){var k=c(this)[g],g=a,l=h;a=h=0;if(k){var m=k.listeners;if(m.length)for(var m=m.slice(0),o,p=0;p=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)),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,f=window.location.hostname;return a!=f&&a!="["+f+"]"},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 f=0;if(a.ie){f=a.quirks||!document.documentMode? -parseFloat(b.match(/msie (\d+)/)[1]):document.documentMode;a.ie9Compat=f==9;a.ie8Compat=f==8;a.ie7Compat=f==7;a.ie6Compat=f<7||a.quirks}if(a.gecko){var i=b.match(/rv:([\d\.]+)/);if(i){i=i[1].split(".");f=i[0]*1E4+(i[1]||0)*100+(i[2]||0)*1}}a.opera&&(f=parseFloat(c.version()));a.air&&(f=parseFloat(b.match(/ adobeair\/(\d+)/)[1]));a.webkit&&(f=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]));a.version=f;a.isCompatible=a.iOS&&f>=534||!a.mobile&&(a.ie&&f>6||a.gecko&&f>=10801||a.opera&&f>=9.5||a.air&&f>= -1||a.webkit&&f>=522||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)if(f<10900)a.cssClass=a.cssClass+" cke_browser_gecko18";else if(f<=11E3)a.cssClass=a.cssClass+" cke_browser_gecko19";if(a.air)a.cssClass=a.cssClass+" cke_browser_air"; +(document.removeEventListener("DOMContentLoaded",a,!1),b()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),b())}catch(f){}}function b(){for(var a;a=g.shift();)a()}var g=[];return function(b){g.push(b);"complete"===document.readyState&&setTimeout(a,1);if(1==g.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange", +a);window.attachEvent("onload",a);b=!1;try{b=!window.frameElement}catch(h){}if(document.documentElement.doScroll&&b){var c=function(){try{document.documentElement.doScroll("left")}catch(b){setTimeout(c,1);return}a()};c()}}}}()},d=window.CKEDITOR_GETURL;if(d){var a=b.getUrl;b.getUrl=function(e){return d.call(b,e)||a.call(b,e)}}return b}()),CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(b){var d=CKEDITOR.event.prototype,a;for(a in d)b[a]==void 0&&(b[a]=d[a])},CKEDITOR.event.prototype= +function(){function b(e){var b=d(this);return b[e]||(b[e]=new a(e))}var d=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},a=function(a){this.name=a;this.listeners=[]};a.prototype={getListenerIndex:function(a){for(var b=0,g=this.listeners;b=0;d--)if(l[d].priority<=i){l.splice(d+1,0,c);return{removeListener:j}}l.unshift(c)}return{removeListener:j}},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},g=0,f=function(){g=1};return function(i,c,j){var l=d(this)[i],i=a,m=g;a=g=0;if(l){var n=l.listeners;if(n.length)for(var n=n.slice(0),o,k=0;k=0&&g.listeners.splice(f,1)}},removeAllListeners:function(){var a=d(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=d(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,d){b in{instanceReady:1,loaded:1}&&(this[b]=true);return CKEDITOR.event.prototype.fire.call(this,b,d,this)},CKEDITOR.editor.prototype.fireOnce=function(b,d){b in{instanceReady:1,loaded:1}&&(this[b]=true);return CKEDITOR.event.prototype.fireOnce.call(this,b,d,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var b=navigator.userAgent.toLowerCase(),d=window.opera,a={ie:eval("/*@cc_on!@*/false"),opera:!!d&&d.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,e=window.location.hostname;return a!=e&&a!="["+e+"]"},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 e=0;if(a.ie){e=a.quirks||!document.documentMode? +parseFloat(b.match(/msie (\d+)/)[1]):document.documentMode;a.ie9Compat=e==9;a.ie8Compat=e==8;a.ie7Compat=e==7;a.ie6Compat=e<7||a.quirks}if(a.gecko){var h=b.match(/rv:([\d\.]+)/);if(h){h=h[1].split(".");e=h[0]*1E4+(h[1]||0)*100+(h[2]||0)*1}}a.opera&&(e=parseFloat(d.version()));a.air&&(e=parseFloat(b.match(/ adobeair\/(\d+)/)[1]));a.webkit&&(e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]));a.version=e;a.isCompatible=a.iOS&&e>=534||!a.mobile&&(a.ie&&e>6||a.gecko&&e>=10801||a.opera&&e>=9.5||a.air&&e>= +1||a.webkit&&e>=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)if(e<10900)a.cssClass=a.cssClass+" cke_browser_gecko18";else if(e<=11E3)a.cssClass=a.cssClass+" cke_browser_gecko19";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,f){if(!a&&!f)return true;if(!a||!f||a.length!=f.length)return false; -for(var b=0;b"+f+ -""):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,f){var b=f(a);b.prototype=a.prototype;return b},setTimeout:function(a, -f,b,h,e){e||(e=window);b||(b=e);return e.setTimeout(function(){h?a.apply(b,[].concat(h)):a.apply(b)},f||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(f){return f.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(f){return f.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(f){return f.replace(a,"")}}(),indexOf:function(a,f){if(typeof f=="function")for(var b=0,h=a.length;b=0?a[b]:null},bind:function(a,f){return function(){return a.apply(f,arguments)}},createClass:function(a){var f=a.$,b=a.base,h=a.privates||a._,e=a.proto,a=a.statics;!f&&(f=function(){b&&this.base.apply(this,arguments)});if(h)var g=f,f=function(){var a=this._||(this._={}),f;for(f in h){var b=h[f];a[f]=typeof b=="function"?CKEDITOR.tools.bind(b,this):b}g.apply(this,arguments)};if(b){f.prototype= -this.prototypedCopy(b.prototype);f.prototype.constructor=f;f.base=b;f.baseProto=b.prototype;f.prototype.base=function(){this.base=b.prototype.base;b.apply(this,arguments);this.base=arguments.callee}}e&&this.extend(f.prototype,e,true);a&&this.extend(f,a,true);return f},addFunction:function(a,f){return b.push(function(){return a.apply(f||this,arguments)})-1},removeFunction:function(a){b[a]=null},callFunction:function(a){var f=b[a];return f&&f.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a= -/^-?\d+\.?\d*px$/,f;return function(b){f=CKEDITOR.tools.trim(b+"")+"px";return a.test(f)?f:b||""}}(),convertToPx:function(){var a;return function(f){if(!a){a=CKEDITOR.dom.element.createFromHtml('
',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(f)){a.setStyle("width",f);return a.$.clientWidth}return f}}(),repeat:function(a,f){return Array(f+1).join(a)},tryThese:function(){for(var a, -f=0,b=arguments.length;f8)&&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,f){var i=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[i]=c;h[a]=1;return c.setCustomData(a,f)},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 f=c.getCustomData("list_marker_names"), -i=c.getCustomData("list_marker_id"),h;for(h in f)c.removeCustomData(h);c.removeCustomData("list_marker_names");if(a){c.removeCustomData("list_marker_id");delete b[i]}},function(){function b(a){for(var b=0,i=0,h=c[a].length;i]*>/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 h=new CKEDITOR.dom.element("body",this.getDocument());h.$.innerHTML=a;for(h=h.getChildren();h.count();)this.append(h.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,h){if(b&&b.type==CKEDITOR.NODE_ELEMENT){for(var e=[];b.data("cke-bookmark")||b.isEmptyInlineRemoveable();){e.push(b);b=h?b.getNext():b.getPrevious();if(!b||b.type!=CKEDITOR.NODE_ELEMENT)return}if(a.isIdentical(b)){for(var g=h?a.getLast():a.getFirst();e.length;)e.shift().move(a,!h);b.moveChildren(a,!h);b.remove();g&&g.type==CKEDITOR.NODE_ELEMENT&&g.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? -d:b===false?e:d<0?d:e);if(c&&(g<0||h>0))j(g<0?g: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,i){if(typeof c=="number"){if(i&&(!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 i=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;c&&(i=i-b.call(this,a));return i}}(),CKEDITOR.dom.documentFragment=function(b){b=b||CKEDITOR.document; +CKEDITOR.loadFullCore,d=CKEDITOR.loadFullCoreTimeout;if(b){CKEDITOR.status="basic_ready";b&&b._load?b():d&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},d*1E3)}})})();CKEDITOR.status="basic_loaded"}(),CKEDITOR.dom={},function(){var b=[],d=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,e){if(!a&&!e)return true;if(!a||!e||a.length!=e.length)return false; +for(var b=0;b"+e+ +""):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,e){var b=e(a);b.prototype=a.prototype;return b},setTimeout:function(a, +e,b,g,f){f||(f=window);b||(b=f);return f.setTimeout(function(){g?a.apply(b,[].concat(g)):a.apply(b)},e||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(e){return e.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(e){return e.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(e){return e.replace(a,"")}}(),indexOf:function(a,e){if(typeof e=="function")for(var b=0,g=a.length;b=0?a[b]:null},bind:function(a,e){return function(){return a.apply(e,arguments)}},createClass:function(a){var e=a.$,b=a.base,g=a.privates||a._,f=a.proto,a=a.statics;!e&&(e=function(){b&&this.base.apply(this,arguments)});if(g)var i=e,e=function(){var a=this._||(this._={}),e;for(e in g){var b=g[e];a[e]=typeof b=="function"?CKEDITOR.tools.bind(b,this):b}i.apply(this,arguments)};if(b){e.prototype= +this.prototypedCopy(b.prototype);e.prototype.constructor=e;e.base=b;e.baseProto=b.prototype;e.prototype.base=function(){this.base=b.prototype.base;b.apply(this,arguments);this.base=arguments.callee}}f&&this.extend(e.prototype,f,true);a&&this.extend(e,a,true);return e},addFunction:function(a,e){return b.push(function(){return a.apply(e||this,arguments)})-1},removeFunction:function(a){b[a]=null},callFunction:function(a){var e=b[a];return e&&e.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a= +/^-?\d+\.?\d*px$/,e;return function(b){e=CKEDITOR.tools.trim(b+"")+"px";return a.test(e)?e:b||""}}(),convertToPx:function(){var a;return function(e){if(!a){a=CKEDITOR.dom.element.createFromHtml('
',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(e)){a.setStyle("width",e);return a.$.clientWidth}return e}}(),repeat:function(a,e){return Array(e+1).join(a)},tryThese:function(){for(var a, +e=0,b=arguments.length;e8)&&d)b=d+":"+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,d){typeof b=="string"&&(b=(d?d.$: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,d){var a=new CKEDITOR.dom.element("div",d);a.setHtml(b);return a.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(b,d,a,e){var h=d.getCustomData("list_marker_id")||d.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),g=d.getCustomData("list_marker_names")||d.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");b[h]=d;g[a]=1;return d.setCustomData(a,e)},CKEDITOR.dom.element.clearAllMarkers=function(b){for(var d in b)CKEDITOR.dom.element.clearMarkers(b, +b[d],1)},CKEDITOR.dom.element.clearMarkers=function(b,d,a){var e=d.getCustomData("list_marker_names"),h=d.getCustomData("list_marker_id"),g;for(g in e)d.removeCustomData(g);d.removeCustomData("list_marker_names");if(a){d.removeCustomData("list_marker_id");delete b[h]}},function(){function b(a){for(var b=0,h=0,g=d[a].length;h]*>/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 g=new CKEDITOR.dom.element("body",this.getDocument());g.$.innerHTML=a;for(g=g.getChildren();g.count();)this.append(g.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||!h[a[0].nodeName]||b==2&&!h[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 h=this.$,a=a.$; +if(h!=a){var g;if(b)for(;g=h.lastChild;)a.insertBefore(h.removeChild(g),a.firstChild);else for(;g=h.firstChild;)a.appendChild(h.removeChild(g))}},mergeSiblings:function(){function a(a,b,g){if(b&&b.type==CKEDITOR.NODE_ELEMENT){for(var f=[];b.data("cke-bookmark")||b.isEmptyInlineRemoveable();){f.push(b);b=g?b.getNext():b.getPrevious();if(!b||b.type!=CKEDITOR.NODE_ELEMENT)return}if(a.isIdentical(b)){for(var i=g?a.getLast():a.getFirst();f.length;)f.shift().move(a,!g);b.moveChildren(a,!g);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,h){b=="class"?this.$.className=h:b=="style"?this.$.style.cssText=h:b=="tabindex"? +this.$.tabIndex=h:b=="checked"?this.$.checked=h:b=="contenteditable"?a.call(this,"contentEditable",h):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,h){if(b=="src"&&h.match(/^http:\/\//))try{a.apply(this,arguments)}catch(g){}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("*"),h=0,g=b.count();h0)j(0,b===true?c:b===false?f:c<0?c:f);if(h&&(i<0||g>0))j(i<0?i:g,0)},setState:function(a,b,h){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+"_off");this.removeClass(b+"_disabled");h&&this.setAttribute("aria-pressed",true);h&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");h&&this.setAttribute("aria-disabled",true);h&&this.removeAttribute("aria-pressed"); +break;default:this.addClass(b+"_off");this.removeClass(b+"_on");this.removeClass(b+"_disabled");h&&this.removeAttribute("aria-pressed");h&&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 h=this.$.attributes,b=b||{},g=0;g=0&&b0&&d;)d=a(d,b.shift());else d=a(d,b);return d?new CKEDITOR.dom.node(d):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,d;for(b in a){d=a[b];if(d.element.equals(this)&&d.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return d}return null}});var d={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,e,d){if(typeof e=="number"){if(d&&(!CKEDITOR.env.ie||!CKEDITOR.env.quirks))e=e-b.call(this,a);this.setStyle(a,e+"px")}};CKEDITOR.dom.element.prototype.getSize=function(a,e){var d=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;e&&(d=d-b.call(this,a));return d}}(),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 d=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(d.collapsed){this.end();return null}d.optimize()}var c,k=d.startContainer;c=d.endContainer;var l=d.startOffset,m=d.endOffset,f,h=this.guard,i=this.type,s=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var u=c.type==CKEDITOR.NODE_ELEMENT?c:c.getParent(),q=c.type==CKEDITOR.NODE_ELEMENT?c.getChild(m):c.getNext();this._.guardLTR=function(a,b){return(!b||!u.equals(a))&& -(!q||!a.equals(q))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(d.root))}}if(a&&!this._.guardRTL){var w=k.type==CKEDITOR.NODE_ELEMENT?k:k.getParent(),x=k.type==CKEDITOR.NODE_ELEMENT?l?k.getChild(l-1):null:k.getPrevious();this._.guardRTL=function(a,b){return(!b||!w.equals(a))&&(!x||!a.equals(x))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(d.root))}}var t=a?this._.guardRTL:this._.guardLTR;f=h?function(a,b){return t(a,b)===false?false:h(a,b)}:t;if(this.current)c=this.current[s](false,i,f);else{if(a)c.type== -CKEDITOR.NODE_ELEMENT&&(c=m>0?c.getChild(m-1):f(c,true)===false?null:c.getPreviousSourceNode(true,i,f));else{c=k;if(c.type==CKEDITOR.NODE_ELEMENT&&!(c=c.getChild(l)))c=f(k,true)===false?null:k.getNextSourceNode(true,i,f)}c&&f(c)===false&&(c=null)}for(;c&&!this._.end;){this.current=c;if(!this.evaluator||this.evaluator(c)!==false){if(!b)return c}else if(b&&this.evaluator)return false;c=c[s](false,i,f)}this.end();return this.current=null}function c(a){for(var c,d=null;c=b.call(this,a);)d=c;return d} -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, +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 g,e=c.startContainer;g=c.endContainer;var m=c.startOffset,d=c.endOffset,h,k=this.guard,p=this.type,r=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var q=g.type==CKEDITOR.NODE_ELEMENT?g:g.getParent(),t=g.type==CKEDITOR.NODE_ELEMENT?g.getChild(d):g.getNext();this._.guardLTR=function(a,b){return(!b||!q.equals(a))&& +(!t||!a.equals(t))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}if(a&&!this._.guardRTL){var z=e.type==CKEDITOR.NODE_ELEMENT?e:e.getParent(),x=e.type==CKEDITOR.NODE_ELEMENT?m?e.getChild(m-1):null:e.getPrevious();this._.guardRTL=function(a,b){return(!b||!z.equals(a))&&(!x||!a.equals(x))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}var u=a?this._.guardRTL:this._.guardLTR;h=k?function(a,b){return u(a,b)===false?false:k(a,b)}:u;if(this.current)g=this.current[r](false,p,h);else{if(a)g.type== +CKEDITOR.NODE_ELEMENT&&(g=d>0?g.getChild(d-1):h(g,true)===false?null:g.getPreviousSourceNode(true,p,h));else{g=e;if(g.type==CKEDITOR.NODE_ELEMENT&&!(g=g.getChild(m)))g=h(e,true)===false?null:e.getNextSourceNode(true,p,h)}g&&h(g)===false&&(g=null)}for(;g&&!this._.end;){this.current=g;if(!this.evaluator||this.evaluator(g)!==false){if(!b)return g}else if(b&&this.evaluator)return false;g=g[r](false,p,h)}this.end();return this.current=null}function d(a){for(var g,c=null;g=b.call(this,a);)c=g;return c} +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 d.call(this)},lastBackward:function(){return d.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 d(a){return a&&a.getName&&a.getName()=="span"&&a.data("cke-bookmark")}return function(c){var k,l;k=c&&c.type!=CKEDITOR.NODE_ELEMENT&&(l=c.getParent())&&d(l);k=a?k:k||d(c);return!!(b^k)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var d;b&&b.type==CKEDITOR.NODE_TEXT&&(d=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()=="​");return!!(a^d)}};CKEDITOR.dom.walker.invisible= -function(a){var b=CKEDITOR.dom.walker.whitespaces();return function(d){if(b(d))d=1;else{d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent());d=!d.$.offsetHeight}return!!(a^d)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(d){return!!(b^d.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!i(a)&&!h(a)}return function(d){var c=!CKEDITOR.env.ie?d.is&&d.is("br"):d.getText&&f.test(d.getText());if(c){c=d.getParent();d=d.getNext(b);c=c.isBlockBoundary()&&(!d||d.type==CKEDITOR.NODE_ELEMENT&& -d.isBlockBoundary())}return!!(a^c)}};var f=/^[\t\r\n ]*(?: |\xa0)$/,i=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)||i(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&&f.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(),d=CKEDITOR.dom.walker.bookmark(true),c=CKEDITOR.dom.walker.bogus();return function(e){if(d(e)||b(e))return true;if(c(e)&&!a)return a=true;return e.type==CKEDITOR.NODE_TEXT&&(e.hasAscendant("pre")||CKEDITOR.tools.trim(e.getText()).length)||e.type==CKEDITOR.NODE_ELEMENT&& -!e.is(h)?false:true}}function c(a){var b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(1);return function(c){return d(c)||b(c)?true:!a&&e(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.is(CKEDITOR.dtd.$removeEmpty)}}function a(a){return!g(a)&&!d(a)}var f=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},i=function(a,b,d,e){a.optimizeBookmark();var c=a.startContainer,f=a.endContainer,h=a.startOffset,g=a.endOffset, -j,i;if(f.type==CKEDITOR.NODE_TEXT)f=f.split(g);else if(f.getChildCount()>0)if(g>=f.getChildCount()){f=f.append(a.document.createText(""));i=true}else f=f.getChild(g);if(c.type==CKEDITOR.NODE_TEXT){c.split(h);c.equals(f)&&(f=c.getNext())}else if(h)if(h>=c.getChildCount()){c=c.append(a.document.createText(""));j=true}else c=c.getChild(h).getPrevious();else{c=c.append(a.document.createText(""),1);j=true}var h=c.getParents(),g=f.getParents(),x,t,n;for(x=0;x0&&!v.equals(f)&&(z=B.append(v.clone()));if(!h[d]||v.$.parentNode!=h[d].$.parentNode)for(v=v.getPrevious();v;){if(v.equals(h[d])||v.equals(c))break;A=v.getPrevious();if(b==2)B.$.insertBefore(v.$.cloneNode(true),B.$.firstChild);else{v.remove(); -b==1&&B.$.insertBefore(v.$,B.$.firstChild)}v=A}B&&(B=z)}if(b==2){t=a.startContainer;if(t.type==CKEDITOR.NODE_TEXT){t.$.data=t.$.data+t.$.nextSibling.data;t.$.parentNode.removeChild(t.$.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(t&&n&&(c.$.parentNode!=t.$.parentNode||f.$.parentNode!=n.$.parentNode)){b=n.getIndex();j&&n.$.parentNode==c.$.parentNode&&b--;if(e&&t.type==CKEDITOR.NODE_ELEMENT){e= -CKEDITOR.dom.element.createFromHtml(' ',a.document);e.insertAfter(t);t.mergeSiblings(false);a.moveToBookmark({startNode:e})}else a.setStart(n.getParent(),b)}a.collapse(true)}j&&c.remove();i&&f.$.parentNode&&f.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(),g=new CKEDITOR.dom.walker.whitespaces, -d=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||i(this,2,a);return a},deleteContents:function(a){this.collapsed||i(this,0,null,a)},extractContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||i(this,1,b,a);return b},createBookmark:function(a){var b,d,c,e,f=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml(" ");if(a){c="cke_bm_"+CKEDITOR.tools.getNextNumber(); -b.setAttribute("id",c+(f?"C":"S"))}if(!f){d=b.clone();d.setHtml(" ");a&&d.setAttribute("id",c+"E");e=this.clone();e.collapse();e.insertNode(d)}e=this.clone();e.collapse(true);e.insertNode(b);if(d){this.setStartAfter(b);this.setEndBefore(d)}else this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?c+(f?"C":"S"):b,endNode:a?c+"E":d,serializable:a,collapsed:f}},createBookmark2:function(a){var b=this.startContainer,d=this.endContainer,c=this.startOffset,e=this.endOffset,f=this.collapsed, -h,g;if(!b||!d)return{start:0,end:0};if(a){if(b.type==CKEDITOR.NODE_ELEMENT){if((h=b.getChild(c))&&h.type==CKEDITOR.NODE_TEXT&&c>0&&h.getPrevious().type==CKEDITOR.NODE_TEXT){b=h;c=0}h&&h.type==CKEDITOR.NODE_ELEMENT&&(c=h.getIndex(1))}for(;b.type==CKEDITOR.NODE_TEXT&&(g=b.getPrevious())&&g.type==CKEDITOR.NODE_TEXT;){b=g;c=c+g.getLength()}if(!f){if(d.type==CKEDITOR.NODE_ELEMENT){if((h=d.getChild(e))&&h.type==CKEDITOR.NODE_TEXT&&e>0&&h.getPrevious().type==CKEDITOR.NODE_TEXT){d=h;e=0}h&&h.type==CKEDITOR.NODE_ELEMENT&& -(e=h.getIndex(1))}for(;d.type==CKEDITOR.NODE_TEXT&&(g=d.getPrevious())&&g.type==CKEDITOR.NODE_TEXT;){d=g;e=e+g.getLength()}}}return{start:b.getAddress(a),end:f?null:d.getAddress(a),startOffset:c,endOffset:e,normalized:a,collapsed:f,is2:true}},moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),d=a.startOffset,c=a.end&&this.document.getByAddress(a.end,a.normalized),a=a.endOffset;this.setStart(b,d);c?this.setEnd(c,a):this.collapse(true)}else{b=(d=a.serializable)? -this.document.getById(a.startNode):a.startNode;a=d?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,d=this.startOffset,c=this.endOffset,e;if(a.type==CKEDITOR.NODE_ELEMENT){e=a.getChildCount();if(e>d)a=a.getChild(d);else if(e<1)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()|| -a}}if(b.type==CKEDITOR.NODE_ELEMENT){e=b.getChildCount();if(e>c)b=b.getChild(c).getPreviousSourceNode(true);else if(e<1)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var d=this.startContainer,c=this.endContainer,d=d.equals(c)?a&&d.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?d.getChild(this.startOffset):d:d.getCommonAncestor(c); -return b&&!d.is?d.getParent():d},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 d=this.startContainer,c=this.startOffset,e=this.collapsed;if((!a||e)&&d&&d.type==CKEDITOR.NODE_TEXT){if(c)if(c>=d.getLength()){c=d.getIndex()+1;d=d.getParent()}else{var f=d.split(c),c=d.getIndex()+1,d=d.getParent();if(this.startContainer.equals(this.endContainer))this.setEnd(f,this.endOffset-this.startOffset);else if(d.equals(this.endContainer))this.endOffset=this.endOffset+1}else{c= -d.getIndex();d=d.getParent()}this.setStart(d,c);if(e){this.collapse(true);return}}d=this.endContainer;c=this.endOffset;if(!b&&!e&&d&&d.type==CKEDITOR.NODE_TEXT){if(c){c>=d.getLength()||d.split(c);c=d.getIndex()+1}else c=d.getIndex();d=d.getParent();this.setEnd(d,c)}},enlarge:function(a,b){switch(a){case CKEDITOR.ENLARGE_INLINE:var d=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var c=this.getCommonAncestor(),e=this.root,f,h,g,j,i,x=false,t,n;t=this.startContainer;n=this.startOffset;if(t.type== -CKEDITOR.NODE_TEXT){if(n){t=!CKEDITOR.tools.trim(t.substring(0,n)).length&&t;x=!!t}if(t&&!(j=t.getPrevious()))g=t.getParent()}else{n&&(j=t.getChild(n-1)||t.getLast());j||(g=t)}for(;g||j;){if(g&&!j){!i&&g.equals(c)&&(i=true);if(d?g.isBlockBoundary():!e.contains(g))break;if(!x||g.getComputedStyle("display")!="inline"){x=false;i?f=g:this.setStartBefore(g)}j=g.getPrevious()}for(;j;){t=false;if(j.type==CKEDITOR.NODE_COMMENT)j=j.getPrevious();else{if(j.type==CKEDITOR.NODE_TEXT){n=j.getText();/[^\s\ufeff]/.test(n)&& -(j=null);t=/[\s\ufeff]$/.test(n)}else if((j.$.offsetWidth>0||b&&j.is("br"))&&!j.data("cke-bookmark"))if(x&&CKEDITOR.dtd.$removeEmpty[j.getName()]){n=j.getText();if(/[^\s\ufeff]/.test(n))j=null;else for(var B=j.$.getElementsByTagName("*"),v=0,z;z=B[v++];)if(!CKEDITOR.dtd.$removeEmpty[z.nodeName.toLowerCase()]){j=null;break}j&&(t=!!n.length)}else j=null;t&&(x?i?f=g:g&&this.setStartBefore(g):x=true);if(j){t=j.getPrevious();if(!g&&!t){g=j;j=null;break}j=t}else g=null}}g&&(g=g.getParent())}t=this.endContainer; -n=this.endOffset;g=j=null;i=x=false;if(t.type==CKEDITOR.NODE_TEXT){t=!CKEDITOR.tools.trim(t.substring(n)).length&&t;x=!(t&&t.getLength());if(t&&!(j=t.getNext()))g=t.getParent()}else(j=t.getChild(n))||(g=t);for(;g||j;){if(g&&!j){!i&&g.equals(c)&&(i=true);if(d?g.isBlockBoundary():!e.contains(g))break;if(!x||g.getComputedStyle("display")!="inline"){x=false;i?h=g:g&&this.setEndAfter(g)}j=g.getNext()}for(;j;){t=false;if(j.type==CKEDITOR.NODE_TEXT){n=j.getText();/[^\s\ufeff]/.test(n)&&(j=null);t=/^[\s\ufeff]/.test(n)}else if(j.type== -CKEDITOR.NODE_ELEMENT){if((j.$.offsetWidth>0||b&&j.is("br"))&&!j.data("cke-bookmark"))if(x&&CKEDITOR.dtd.$removeEmpty[j.getName()]){n=j.getText();if(/[^\s\ufeff]/.test(n))j=null;else{B=j.$.getElementsByTagName("*");for(v=0;z=B[v++];)if(!CKEDITOR.dtd.$removeEmpty[z.nodeName.toLowerCase()]){j=null;break}}j&&(t=!!n.length)}else j=null}else t=1;t&&x&&(i?h=g:this.setEndAfter(g));if(j){t=j.getNext();if(!g&&!t){g=j;j=null;break}j=t}else g=null}g&&(g=g.getParent())}if(f&&h){c=f.contains(h)?h:f;this.setStartBefore(c); -this.setEndAfter(c)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:g=new CKEDITOR.dom.range(this.root);e=this.root;g.setStartAt(e,CKEDITOR.POSITION_AFTER_START);g.setEnd(this.startContainer,this.startOffset);g=new CKEDITOR.dom.walker(g);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},d=function(a){var b=D(a);!b&&(a.is&&a.is("br"))&&(y=a);return b};g.guard=D;g=g.lastBackward(); -A=A||e;this.setStartAt(A,!A.is("br")&&(!g&&this.checkStartOfBlock()||g&&A.contains(g))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){g=this.clone();g=new CKEDITOR.dom.walker(g);var E=CKEDITOR.dom.walker.whitespaces(),F=CKEDITOR.dom.walker.bookmark();g.evaluator=function(a){return!E(a)&&!F(a)};if((g=g.previous())&&g.type==CKEDITOR.NODE_ELEMENT&&g.is("br"))break}g=this.clone();g.collapse();g.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);g=new CKEDITOR.dom.walker(g); -g.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?d:D;A=null;g=g.lastForward();A=A||e;this.setEndAt(A,!g&&this.checkEndOfBlock()||g&&A.contains(g)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);y&&this.setEndAfter(y)}},shrink:function(a,b,d){if(!this.collapsed){var a=a||CKEDITOR.SHRINK_TEXT,c=this.clone(),e=this.startContainer,g=this.endContainer,f=this.startOffset,h=this.endOffset,j=1,i=1;if(e&&e.type==CKEDITOR.NODE_TEXT)if(f)if(f>=e.getLength())c.setStartAfter(e);else{c.setStartBefore(e); -j=0}else c.setStartBefore(e);if(g&&g.type==CKEDITOR.NODE_TEXT)if(h)if(h>=g.getLength())c.setEndAfter(g);else{c.setEndAfter(g);i=0}else c.setEndBefore(g);var c=new CKEDITOR.dom.walker(c),x=CKEDITOR.dom.walker.bookmark();c.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var t;c.guard=function(b,c){if(x(b))return true;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||c&&b.equals(t)||d===false&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary())return false; -!c&&b.type==CKEDITOR.NODE_ELEMENT&&(t=b);return true};if(j)(e=c[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(e,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);if(i){c.reset();(c=c[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(c,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!j&&!i)}},insertNode:function(a){this.optimizeBookmark();this.trim(false,true);var b=this.startContainer,d=b.getChild(this.startOffset);d?a.insertBefore(d): +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(g){var e,m;e=g&&g.type!=CKEDITOR.NODE_ELEMENT&&(m=g.getParent())&&c(m);e=a?e:e||c(g);return!!(b^e)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var c;b&&b.type==CKEDITOR.NODE_TEXT&&(c=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()=="​");return!!(a^c)}};CKEDITOR.dom.walker.invisible= +function(a){var b=CKEDITOR.dom.walker.whitespaces();return function(c){if(b(c))c=1;else{c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent());c=!c.$.offsetHeight}return!!(a^c)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(c){return!!(b^c.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!h(a)&&!g(a)}return function(c){var g=!CKEDITOR.env.ie?c.is&&c.is("br"):c.getText&&e.test(c.getText());if(g){g=c.getParent();c=c.getNext(b);g=g.isBlockBoundary()&&(!c||c.type==CKEDITOR.NODE_ELEMENT&& +c.isBlockBoundary())}return!!(a^g)}};var e=/^[\t\r\n ]*(?: |\xa0)$/,h=CKEDITOR.dom.walker.whitespaces(),g=CKEDITOR.dom.walker.bookmark();CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(g(a)||h(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&&e.test(a.getText()))?a:false}}(),CKEDITOR.dom.range=function(b){this.endOffset=this.endContainer= +this.startOffset=this.startContainer=null;this.collapsed=true;var d=b instanceof CKEDITOR.dom.document;this.document=d?b:b.getDocument();this.root=d?b.getBody():b},function(){function b(){var a=false,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(true),f=CKEDITOR.dom.walker.bogus();return function(k){if(c(k)||b(k))return true;if(f(k)&&!a)return a=true;return k.type==CKEDITOR.NODE_TEXT&&(k.hasAscendant("pre")||CKEDITOR.tools.trim(k.getText()).length)||k.type==CKEDITOR.NODE_ELEMENT&& +!k.is(g)?false:true}}function d(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(g){return c(g)||b(g)?true:!a&&f(g)||g.type==CKEDITOR.NODE_ELEMENT&&g.is(CKEDITOR.dtd.$removeEmpty)}}function a(a){return!i(a)&&!c(a)}var e=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},h=function(a,b,c,f){a.optimizeBookmark();var g=a.startContainer,e=a.endContainer,i=a.startOffset,d=a.endOffset, +h,j;if(e.type==CKEDITOR.NODE_TEXT)e=e.split(d);else if(e.getChildCount()>0)if(d>=e.getChildCount()){e=e.append(a.document.createText(""));j=true}else e=e.getChild(d);if(g.type==CKEDITOR.NODE_TEXT){g.split(i);g.equals(e)&&(e=g.getNext())}else if(i)if(i>=g.getChildCount()){g=g.append(a.document.createText(""));h=true}else g=g.getChild(i).getPrevious();else{g=g.append(a.document.createText(""),1);h=true}var i=g.getParents(),d=e.getParents(),x,u,w;for(x=0;x0&&!v.equals(e)&&(A=s.append(v.clone()));if(!i[c]||v.$.parentNode!=i[c].$.parentNode)for(v=v.getPrevious();v;){if(v.equals(i[c])||v.equals(g))break;B=v.getPrevious();if(b==2)s.$.insertBefore(v.$.cloneNode(true),s.$.firstChild);else{v.remove(); +b==1&&s.$.insertBefore(v.$,s.$.firstChild)}v=B}s&&(s=A)}if(b==2){u=a.startContainer;if(u.type==CKEDITOR.NODE_TEXT){u.$.data=u.$.data+u.$.nextSibling.data;u.$.parentNode.removeChild(u.$.nextSibling)}a=a.endContainer;if(a.type==CKEDITOR.NODE_TEXT&&a.$.nextSibling){a.$.data=a.$.data+a.$.nextSibling.data;a.$.parentNode.removeChild(a.$.nextSibling)}}else{if(u&&w&&(g.$.parentNode!=u.$.parentNode||e.$.parentNode!=w.$.parentNode)){b=w.getIndex();h&&w.$.parentNode==g.$.parentNode&&b--;if(f&&u.type==CKEDITOR.NODE_ELEMENT){f= +CKEDITOR.dom.element.createFromHtml(' ',a.document);f.insertAfter(u);u.mergeSiblings(false);a.moveToBookmark({startNode:f})}else a.setStart(w.getParent(),b)}a.collapse(true)}h&&g.remove();j&&e.$.parentNode&&e.remove()},g={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},f=CKEDITOR.dom.walker.bogus(),i=new CKEDITOR.dom.walker.whitespaces, +c=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||h(this,2,a);return a},deleteContents:function(a){this.collapsed||h(this,0,null,a)},extractContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||h(this,1,b,a);return b},createBookmark:function(a){var b,c,f,g,e=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml(" ");if(a){f="cke_bm_"+CKEDITOR.tools.getNextNumber(); +b.setAttribute("id",f+(e?"C":"S"))}if(!e){c=b.clone();c.setHtml(" ");a&&c.setAttribute("id",f+"E");g=this.clone();g.collapse();g.insertNode(c)}g=this.clone();g.collapse(true);g.insertNode(b);if(c){this.setStartAfter(b);this.setEndBefore(c)}else this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?f+(e?"C":"S"):b,endNode:a?f+"E":c,serializable:a,collapsed:e}},createBookmark2:function(a){var b=this.startContainer,c=this.endContainer,f=this.startOffset,g=this.endOffset,e=this.collapsed, +i,d;if(!b||!c)return{start:0,end:0};if(a){if(b.type==CKEDITOR.NODE_ELEMENT){if((i=b.getChild(f))&&i.type==CKEDITOR.NODE_TEXT&&f>0&&i.getPrevious().type==CKEDITOR.NODE_TEXT){b=i;f=0}i&&i.type==CKEDITOR.NODE_ELEMENT&&(f=i.getIndex(1))}for(;b.type==CKEDITOR.NODE_TEXT&&(d=b.getPrevious())&&d.type==CKEDITOR.NODE_TEXT;){b=d;f=f+d.getLength()}if(!e){if(c.type==CKEDITOR.NODE_ELEMENT){if((i=c.getChild(g))&&i.type==CKEDITOR.NODE_TEXT&&g>0&&i.getPrevious().type==CKEDITOR.NODE_TEXT){c=i;g=0}i&&i.type==CKEDITOR.NODE_ELEMENT&& +(g=i.getIndex(1))}for(;c.type==CKEDITOR.NODE_TEXT&&(d=c.getPrevious())&&d.type==CKEDITOR.NODE_TEXT;){c=d;g=g+d.getLength()}}}return{start:b.getAddress(a),end:e?null:c.getAddress(a),startOffset:f,endOffset:g,normalized:a,collapsed:e,is2:true}},moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,f=a.end&&this.document.getByAddress(a.end,a.normalized),a=a.endOffset;this.setStart(b,c);f?this.setEnd(f,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,f=this.endOffset,g;if(a.type==CKEDITOR.NODE_ELEMENT){g=a.getChildCount();if(g>c)a=a.getChild(c);else if(g<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){g=b.getChildCount();if(g>f)b=b.getChild(f).getPreviousSourceNode(true);else if(g<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,f=this.endContainer,c=c.equals(f)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(f); +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,f=this.startOffset,g=this.collapsed;if((!a||g)&&c&&c.type==CKEDITOR.NODE_TEXT){if(f)if(f>=c.getLength()){f=c.getIndex()+1;c=c.getParent()}else{var e=c.split(f),f=c.getIndex()+1,c=c.getParent();if(this.startContainer.equals(this.endContainer))this.setEnd(e,this.endOffset-this.startOffset);else if(c.equals(this.endContainer))this.endOffset=this.endOffset+1}else{f= +c.getIndex();c=c.getParent()}this.setStart(c,f);if(g){this.collapse(true);return}}c=this.endContainer;f=this.endOffset;if(!b&&!g&&c&&c.type==CKEDITOR.NODE_TEXT){if(f){f>=c.getLength()||c.split(f);f=c.getIndex()+1}else f=c.getIndex();c=c.getParent();this.setEnd(c,f)}},enlarge:function(a,b){switch(a){case CKEDITOR.ENLARGE_INLINE:var c=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var f=this.getCommonAncestor(),g=this.root,e,i,d,h,j,x=false,u,w;u=this.startContainer;w=this.startOffset;if(u.type== +CKEDITOR.NODE_TEXT){if(w){u=!CKEDITOR.tools.trim(u.substring(0,w)).length&&u;x=!!u}if(u&&!(h=u.getPrevious()))d=u.getParent()}else{w&&(h=u.getChild(w-1)||u.getLast());h||(d=u)}for(;d||h;){if(d&&!h){!j&&d.equals(f)&&(j=true);if(c?d.isBlockBoundary():!g.contains(d))break;if(!x||d.getComputedStyle("display")!="inline"){x=false;j?e=d:this.setStartBefore(d)}h=d.getPrevious()}for(;h;){u=false;if(h.type==CKEDITOR.NODE_COMMENT)h=h.getPrevious();else{if(h.type==CKEDITOR.NODE_TEXT){w=h.getText();/[^\s\ufeff]/.test(w)&& +(h=null);u=/[\s\ufeff]$/.test(w)}else if((h.$.offsetWidth>0||b&&h.is("br"))&&!h.data("cke-bookmark"))if(x&&CKEDITOR.dtd.$removeEmpty[h.getName()]){w=h.getText();if(/[^\s\ufeff]/.test(w))h=null;else for(var s=h.$.getElementsByTagName("*"),v=0,A;A=s[v++];)if(!CKEDITOR.dtd.$removeEmpty[A.nodeName.toLowerCase()]){h=null;break}h&&(u=!!w.length)}else h=null;u&&(x?j?e=d:d&&this.setStartBefore(d):x=true);if(h){u=h.getPrevious();if(!d&&!u){d=h;h=null;break}h=u}else d=null}}d&&(d=d.getParent())}u=this.endContainer; +w=this.endOffset;d=h=null;j=x=false;if(u.type==CKEDITOR.NODE_TEXT){u=!CKEDITOR.tools.trim(u.substring(w)).length&&u;x=!(u&&u.getLength());if(u&&!(h=u.getNext()))d=u.getParent()}else(h=u.getChild(w))||(d=u);for(;d||h;){if(d&&!h){!j&&d.equals(f)&&(j=true);if(c?d.isBlockBoundary():!g.contains(d))break;if(!x||d.getComputedStyle("display")!="inline"){x=false;j?i=d:d&&this.setEndAfter(d)}h=d.getNext()}for(;h;){u=false;if(h.type==CKEDITOR.NODE_TEXT){w=h.getText();/[^\s\ufeff]/.test(w)&&(h=null);u=/^[\s\ufeff]/.test(w)}else if(h.type== +CKEDITOR.NODE_ELEMENT){if((h.$.offsetWidth>0||b&&h.is("br"))&&!h.data("cke-bookmark"))if(x&&CKEDITOR.dtd.$removeEmpty[h.getName()]){w=h.getText();if(/[^\s\ufeff]/.test(w))h=null;else{s=h.$.getElementsByTagName("*");for(v=0;A=s[v++];)if(!CKEDITOR.dtd.$removeEmpty[A.nodeName.toLowerCase()]){h=null;break}}h&&(u=!!w.length)}else h=null}else u=1;u&&x&&(j?i=d:this.setEndAfter(d));if(h){u=h.getNext();if(!d&&!u){d=h;h=null;break}h=u}else d=null}d&&(d=d.getParent())}if(e&&i){f=e.contains(i)?i:e;this.setStartBefore(f); +this.setEndAfter(f)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:d=new CKEDITOR.dom.range(this.root);g=this.root;d.setStartAt(g,CKEDITOR.POSITION_AFTER_START);d.setEnd(this.startContainer,this.startOffset);d=new CKEDITOR.dom.walker(d);var B,y,C=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),D=function(a){var b=C(a);b||(B=a);return b},c=function(a){var b=D(a);!b&&(a.is&&a.is("br"))&&(y=a);return b};d.guard=D;d=d.lastBackward(); +B=B||g;this.setStartAt(B,!B.is("br")&&(!d&&this.checkStartOfBlock()||d&&B.contains(d))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){d=this.clone();d=new CKEDITOR.dom.walker(d);var F=CKEDITOR.dom.walker.whitespaces(),E=CKEDITOR.dom.walker.bookmark();d.evaluator=function(a){return!F(a)&&!E(a)};if((d=d.previous())&&d.type==CKEDITOR.NODE_ELEMENT&&d.is("br"))break}d=this.clone();d.collapse();d.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d); +d.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?c:D;B=null;d=d.lastForward();B=B||g;this.setEndAt(B,!d&&this.checkEndOfBlock()||d&&B.contains(d)?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,f=this.clone(),g=this.startContainer,e=this.endContainer,i=this.startOffset,d=this.endOffset,h=1,j=1;if(g&&g.type==CKEDITOR.NODE_TEXT)if(i)if(i>=g.getLength())f.setStartAfter(g);else{f.setStartBefore(g); +h=0}else f.setStartBefore(g);if(e&&e.type==CKEDITOR.NODE_TEXT)if(d)if(d>=e.getLength())f.setEndAfter(e);else{f.setEndAfter(e);j=0}else f.setEndBefore(e);var f=new CKEDITOR.dom.walker(f),x=CKEDITOR.dom.walker.bookmark();f.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var u;f.guard=function(b,f){if(x(b))return true;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||f&&b.equals(u)||c===false&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary())return false; +!f&&b.type==CKEDITOR.NODE_ELEMENT&&(u=b);return true};if(h)(g=f[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(g,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);if(j){f.reset();(f=f[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(f,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!h&&!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}f(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}f(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)}f(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)}f(this)},fixBlock:function(a,b){var d=this.createBookmark(),c=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(c); -c.trim();CKEDITOR.env.ie||c.appendBogus();this.insertNode(c);this.moveToBookmark(d);return c},splitBlock:function(a){var b=new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root),c=b.block,e=d.block,g=null;if(!b.blockLimit.equals(d.blockLimit))return null;if(a!="br"){if(!c){c=this.fixBlock(true,a);e=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block}e||(e=this.fixBlock(false,a))}a=c&&this.checkStartOfBlock();b=e&&this.checkEndOfBlock(); -this.deleteContents();if(c&&c.equals(e))if(b){g=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END);e=null}else if(a){g=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(c,CKEDITOR.POSITION_BEFORE_START);c=null}else{e=this.splitElement(c);!CKEDITOR.env.ie&&!c.is("ul","ol")&&c.appendBogus()}return{previousBlock:c,nextBlock:e,wasStartOfBlock:a,wasEndOfBlock:b,elementPath:g}},splitElement:function(a){if(!this.collapsed)return null; -this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var b=this.extractContents(),d=a.clone(false);b.appendTo(d);d.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function a(c){return function(a){return b(a)||(d(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable())||c.is("table")&&a.is("caption")?false:true}}var b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(false);return function(b){for(var d=this.createBookmark(), -c=this[b?"endPath":"startPath"](),e=c.block||c.blockLimit,g;e&&!e.equals(c.root)&&!e.getFirst(a(e));){g=e.getParent();this[b?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END);e.remove(1);e=g}this.moveToBookmark(d)}}(),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 d=b==CKEDITOR.START,e=this.clone();e.collapse(d);e[d?"setStartAt": -"setEndAt"](a,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=c(d);return e[d?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,d=this.startOffset;if(CKEDITOR.env.ie&&d&&a.type==CKEDITOR.NODE_TEXT){a=CKEDITOR.tools.ltrim(a.substring(0,d));j.test(a)&&this.trim(0,1)}this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);d=this.clone();d.collapse(true);d.setStartAt(a.block||a.blockLimit, -CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(d);a.evaluator=b();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,d=this.endOffset;if(CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT){a=CKEDITOR.tools.rtrim(a.substring(d));j.test(a)&&this.trim(1,0)}this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);d=this.clone();d.collapse(false);d.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(d);a.evaluator=b();return a.checkForward()}, -getPreviousNode:function(a,b,d){var c=this.clone();c.collapse(1);c.setStartAt(d||this.root,CKEDITOR.POSITION_AFTER_START);d=new CKEDITOR.dom.walker(c);d.evaluator=a;d.guard=b;return d.previous()},getNextNode:function(a,b,d){var c=this.clone();c.collapse();c.setEndAt(d||this.root,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(c);d.evaluator=a;d.guard=b;return d.next()},checkReadOnly:function(){function a(b,d){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(d)||b.equals(d)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,d=this.endContainer;return!(a(b,d)&&a(d,b))}}(),moveToElementEditablePosition:function(b,d){if(b.type==CKEDITOR.NODE_ELEMENT&&!b.isEditable(false)){this.moveToPosition(b,d?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);return true}for(var c=0;b;){if(b.type==CKEDITOR.NODE_TEXT){d&&this.endContainer&& -this.checkEndOfBlock()&&j.test(b.getText())?this.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(b,d?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(b.type==CKEDITOR.NODE_ELEMENT)if(b.isEditable()){this.moveToPosition(b,d?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START);c=1}else d&&(b.is("br")&&this.endContainer&&this.checkEndOfBlock())&&this.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);var e=b,g=c,f=void 0;e.type==CKEDITOR.NODE_ELEMENT&& -e.isEditable(false)&&(f=e[d?"getLast":"getFirst"](a));!g&&!f&&(f=e[d?"getPrevious":"getNext"](a));b=f}return!!c},moveToClosestEditablePosition:function(b,d){var c;do for(;c=b[d?"getNext":"getPrevious"](a);)if(this.moveToElementEditablePosition(c,!d))return true;while((b=b.getParent())&&!b.equals(this.root));return false},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),d=CKEDITOR.dom.walker.whitespaces(true);a.evaluator=function(a){return d(a)&&b(a)};var c=a.next();a.reset();return c&&c.equals(a.previous())?c: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,d,c,e=this.clone();e.optimize();if(c=e.startContainer.type==CKEDITOR.NODE_TEXT){d=e.startContainer.getText();b=e.startContainer.split(e.startOffset);a.insertAfter(e.startContainer)}else e.insertNode(a);a.scrollIntoView();if(c){e.startContainer.setText(d);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,d){for(a=a.getNextSourceNode(b,null,d);!f(a);)a= -a.getNextSourceNode(b,null,d);return a}var a=/^[\r\n\t ]+$/,f=CKEDITOR.dom.walker.bookmark(false,true),i=CKEDITOR.dom.walker.whitespaces(true),h=function(a){return f(a)&&i(a)};b.prototype={getNextParagraph:function(b){b=b||"p";if(!CKEDITOR.dtd[this.range.root.getName()][b])return null;var g,d,j,i,l,m;if(!this._.started){d=this.range.clone();d.shrink(CKEDITOR.NODE_ELEMENT,true);i=d.endContainer.hasAscendant("pre",true)||d.startContainer.hasAscendant("pre",true);d.enlarge(this.forceBrBreak&&!i||!this.enlargeBr? -CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(!d.collapsed){i=new CKEDITOR.dom.walker(d.clone());var o=CKEDITOR.dom.walker.bookmark(true,true);i.evaluator=o;this._.nextNode=i.next();i=new CKEDITOR.dom.walker(d.clone());i.evaluator=o;i=i.previous();this._.lastNode=i.getNextSourceNode(true);if(this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()){o=this.range.clone();o.moveToPosition(this._.lastNode, -CKEDITOR.POSITION_AFTER_END);if(o.checkEndOfBlock()){o=new CKEDITOR.dom.elementPath(o.endContainer,o.root);this._.lastNode=(o.block||o.blockLimit).getNextSourceNode(true)}}if(!this._.lastNode){this._.lastNode=this._.docEndMarker=d.document.createText("");this._.lastNode.insertAfter(i)}d=null}this._.started=1}o=this._.nextNode;i=this._.lastNode;for(this._.nextNode=null;o;){var p=0,r=o.hasAscendant("pre"),s=o.type!=CKEDITOR.NODE_ELEMENT,u=0;if(s)o.type==CKEDITOR.NODE_TEXT&&a.test(o.getText())&&(s=0); -else{var q=o.getName();if(o.isBlockBoundary(this.forceBrBreak&&!r&&{br:1})){if(q=="br")s=1;else if(!d&&!o.getChildCount()&&q!="hr"){g=o;j=o.equals(i);break}if(d){d.setEndAt(o,CKEDITOR.POSITION_BEFORE_START);if(q!="br")this._.nextNode=o}p=1}else{if(o.getFirst()){if(!d){d=this.range.clone();d.setStartAt(o,CKEDITOR.POSITION_BEFORE_START)}o=o.getFirst();continue}s=1}}if(s&&!d){d=this.range.clone();d.setStartAt(o,CKEDITOR.POSITION_BEFORE_START)}j=(!p||s)&&o.equals(i);if(d&&!p)for(;!o.getNext(h)&&!j;){q= -o.getParent();if(q.isBlockBoundary(this.forceBrBreak&&!r&&{br:1})){p=1;s=0;j||q.equals(i);d.setEndAt(q,CKEDITOR.POSITION_BEFORE_END);break}o=q;s=1;j=o.equals(i);u=1}s&&d.setEndAt(o,CKEDITOR.POSITION_AFTER_END);o=c(o,u,i);if((j=!o)||p&&d)break}if(!g){if(!d){this._.docEndMarker&&this._.docEndMarker.remove();return this._.nextNode=null}g=new CKEDITOR.dom.elementPath(d.startContainer,d.root);o=g.blockLimit;p={div:1,th:1,td:1};g=g.block;if(!g&&o&&!this.enforceRealBlocks&&p[o.getName()]&&d.checkStartOfBlock()&& -d.checkEndOfBlock()&&!o.equals(d.root))g=o;else if(!g||this.enforceRealBlocks&&g.getName()=="li"){g=this.range.document.createElement(b);d.extractContents().appendTo(g);g.trim();d.insertNode(g);l=m=true}else if(g.getName()!="li"){if(!d.checkStartOfBlock()||!d.checkEndOfBlock()){g=g.clone(false);d.extractContents().appendTo(g);g.trim();m=d.splitBlock();l=!m.wasStartOfBlock;m=!m.wasEndOfBlock;d.insertNode(g)}}else if(!j)this._.nextNode=g.equals(i)?null:c(d.getBoundaryNodes().endNode,1,i)}if(l)(d=g.getPrevious())&& -d.type==CKEDITOR.NODE_ELEMENT&&(d.getName()=="br"?d.remove():d.getLast()&&d.getLast().$.nodeName.toLowerCase()=="br"&&d.getLast().remove());if(m)(d=g.getLast())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()=="br"&&(CKEDITOR.env.ie||d.getPrevious(f)||d.getNext(f))&&d.remove();if(!this._.nextNode)this._.nextNode=j||g.equals(i)||!i?null:c(g,1,i);return g}};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||!b.filter.checkFeature(this))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),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(){function b(a,b,d,e){var g=b.name;if(e||!a.elements||a.elements(g)){if(!d.valid)if(a.validate)if(a.validate(b))d.valid=!a.propertiesOnly;else return;else d.valid=!a.propertiesOnly;if(!d.allAttributes)d.allAttributes=c(a.attributes,b.attributes,d.validAttributes);if(!d.allStyles)d.allStyles=c(a.styles,b.styles,d.validStyles);if(!d.allClasses){a= -a.classes;b=b.classes;e=d.validClasses;if(a)if(a===true)a=true;else{for(var g=0,f=b.length,h;g-1};case "regexp":return function(b){return a.test(b)};case "array":return function(b){return l(a,b)>-1};case "object":return function(b){return b in a}}}function d(a,b){var d=a.name;if(j.$empty[d]||!a.children.length)a.remove();else if(j.$block[d]||d=="tr"){var d=a.children, -c;b:{c=j.p;for(var e=0,g=d.length,f;e0;){f=d[--g];if(e&&(f.type==CKEDITOR.NODE_TEXT||f.type==CKEDITOR.NODE_ELEMENT&&j.$inline[f.name])){if(!h){h=new CKEDITOR.htmlParser.element("p");h.insertAfter(a)}h.add(f,0)}else{h=null;f.insertAfter(a);c.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(f.type==CKEDITOR.NODE_ELEMENT&& -!j[c.name][f.name])&&b.push(f)}}a.remove()}}else a.replaceWithChildren()}var j=CKEDITOR.dtd,k=CKEDITOR.tools.copy,l=CKEDITOR.tools.indexOf,m=CKEDITOR.tools.parseCssText,o=CKEDITOR.tools.trim;CKEDITOR.filter=function(a){this.allowedContent=[];this.disabled=false;this.editor=null;this._={rules:{},cachedTests:{}};if(a instanceof CKEDITOR.editor){a=this.editor=a;this.customConfig=true;var b=a.config.allowedContent;if(b===true)this.disabled=true;else{if(!b)this.customConfig=false;this.allow(r,"default", -1);this.allow(b,"config",1);this._.toHtmlListener=a.on("toHtml",function(a){this.applyTo(a.data.dataValue)},this,null,6);this._.toDataFormatListener=a.on("toDataFormat",function(a){this.applyTo(a.data.dataValue)},this,null,11)}}else{this.customConfig=false;this.allow(a,"default",1)}};CKEDITOR.filter.prototype={allow:function(a,b,d){if(this.disabled||this.customConfig&&!d||!a)return false;this._.cachedChecks={};var c,e;if(typeof a=="string")a=h(a);else if(a instanceof CKEDITOR.style){e=a.getDefinition(); -d={};a=e.attributes;d[e.element]=e={styles:e.styles};if(a){a=k(a);e.classes=a["class"]?a["class"].split(/\s+/):null;e.attributes=a}a=d}else if(CKEDITOR.tools.isArray(a)){for(c=0;c0?false:CKEDITOR.tools.objectCompare(d.attributes,c.attributes,true)?true:false;typeof b=="string"&&(this._.cachedChecks[b]=d);return d}};var p={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},r="p br"}(),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",f="blur";if(c)if(CKEDITOR.env.ie){a="focusin";f="focusout"}else CKEDITOR.event.useCapture=1;var i={blur:function(){b.equals(this.currentActive)&& -this.blur()},focus:function(){this.currentActive=b;this.focus()}};b.on(a,i.focus,this);b.on(f,i.blur,this);if(c)CKEDITOR.event.useCapture=0;b.setCustomData("focusmanager",this);b.setCustomData("focusmanager_handlers",i)}},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,f=c.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),i=f[1],f=f[2];a[i+"-"+f]?i=i+"-"+f:a[i]||(i=null);CKEDITOR.lang.detect=i?function(){return i}:function(a){return a};return i||b}}}(),CKEDITOR.scriptLoader=function(){var b={},c={};return{load:function(a,f,i,h){var e=typeof a=="string";e&&(a=[a]);i||(i=CKEDITOR); -var g=a.length,d=[],j=[],k=function(a){f&&(e?f.call(i,a):f.call(i,d,j))};if(g===0)k(true);else{var l=function(a,b){(b?d:j).push(a);if(--g<=0){h&&CKEDITOR.document.getDocumentElement().removeStyle("cursor");k(b)}},m=function(a,d){b[a]=1;var e=c[a];delete c[a];for(var g=0;g1)){var e=new CKEDITOR.dom.element("script");e.setAttributes({type:"text/javascript",src:a});if(f)if(CKEDITOR.env.ie)e.$.onreadystatechange= -function(){if(e.$.readyState=="loaded"||e.$.readyState=="complete"){e.$.onreadystatechange=null;m(a,true)}};else{e.$.onload=function(){setTimeout(function(){m(a,true)},0)};e.$.onerror=function(){m(a,false)}}e.appendTo(CKEDITOR.document.getHead())}}};h&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var p=0;p=0)l=a.langCode;else{l=a.langCode.replace(/-.*/,"");l=l!=a.langCode&&CKEDITOR.tools.indexOf(i,l)>=0?l:CKEDITOR.tools.indexOf(i,"en")>=0?"en":i[0]}if(!j.langEntries||!j.langEntries[l])g.push(CKEDITOR.getUrl(j.path+ -"lang/"+l+".js"));else{a.lang[h]=j.langEntries[l];l=null}}e.push(l);c.push(j)}CKEDITOR.scriptLoader.load(g,function(){for(var d=["beforeInit","init","afterInit"],g=0;g]+)>)|(?:!--([\\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 f,i,h=0,e;f=this._.htmlPartsRegex.exec(a);){i=f.index;if(i>h){h=a.substring(h,i);if(e)e.push(h); -else this.onText(h)}h=this._.htmlPartsRegex.lastIndex;if(i=f[1]){i=i.toLowerCase();if(e&&CKEDITOR.dtd.$cdata[i]){this.onCDATA(e.join(""));e=null}if(!e){this.onTagClose(i);continue}}if(e)e.push(f[0]);else if(i=f[3]){i=i.toLowerCase();if(!/="/.test(i)){var g={},d;f=f[4];var j=!!(f&&f.charAt(f.length-1)=="/");if(f)for(;d=b.exec(f);){var k=d[1].toLowerCase();d=d[2]||d[3]||d[4]||"";g[k]=!d&&c[k]?k:d}this.onTagOpen(i,g,j);!e&&CKEDITOR.dtd.$cdata[i]&&(e=[])}}else if(i=f[2])this.onComment(i)}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}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var b=this.parent.children,c=CKEDITOR.tools.indexOf(b,this),a=this.previous,f=this.next;a&&(a.next=f);f&&(f.previous=a);b.splice(c,1);this.parent=null},replaceWith:function(b){var c=this.parent.children, -a=CKEDITOR.tools.indexOf(c,this),f=b.previous=this.previous,i=b.next=this.next;f&&(f.next=b);i&&(i.previous=b);c[a]=b;b.parent=this.parent;this.parent=null},insertAfter:function(b){var c=b.parent.children,a=CKEDITOR.tools.indexOf(c,b),f=b.next;c.splice(a+1,0,this);this.next=b.next;this.previous=b;b.next=this;f&&(f.previous=this);this.parent=b.parent}}}(),"use strict",CKEDITOR.htmlParser.comment=function(b){this.value=b;this._={isBlockLike:false}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node, -{type:CKEDITOR.NODE_COMMENT,filter:function(b){var c=this.value;if(!(c=b.onComment(c,this))){this.remove();return false}if(typeof c!="string"){this.replaceWith(c);return false}this.value=c},writeHtml:function(b,c){c&&this.filter(c);b.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(b){this.value=b;this._={isBlockLike:false}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(b){if(!(this.value= -b.onText(this.value,this))){this.remove();return false}},writeHtml:function(b,c){c&&this.filter(c);b.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(b){this.value=b};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(b){b.write(this.value)}})}(),"use strict",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},f=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),i=CKEDITOR.NODE_ELEMENT;CKEDITOR.htmlParser.fragment.fromHtml=function(h,e,g){function d(a){var b;if(s.length>0)for(var d=0;d=0;b--)if(a==s[b].name){s.splice(b,1);return}for(var d=[],c=[],e=q;e!=r&&e.name!=a;){e._.isBlockLike||c.unshift(e);d.push(e);e=e.returnPoint||e.parent}if(e!=r){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==i&&!a._.isBlockLike},filter:function(a){a.onRoot(this);this.filterChildren(a)},filterChildren:function(a,b){if(this.childrenFilteredBy!=a.id){if(b&&!this.parent)a.onRoot(this);this.childrenFilteredBy=a.id;for(var c=0;c=0;f--)if(i=b[f]){i.pri=c;a.splice(d,0,i)}}}function a(a,b,c){if(b)for(var d in b){var j=a[d];a[d]=f(j,b[d],c);j||a.$length++}}function f(a,b,g){if(b){b.pri=g;if(a){if(a.splice)c(a,b,g);else{a=a.pri>g?[b,a]:[a,b];a.filter=i}return a}return b.filter=b}}function i(a){for(var b=a.type||a instanceof CKEDITOR.htmlParser.fragment,c=0;c7||e.name in CKEDITOR.dtd.tr||e.name in CKEDITOR.dtd.$listItem))j=false;else{j=a(e);j=!j||e.name=="form"&&j.name=="input"}j&& -e.add(c(b))}}}function l(a,b){if((!m||!CKEDITOR.env.ie)&&a.type==CKEDITOR.NODE_ELEMENT&&a.name=="br"&&!a.attributes["data-cke-eol"])return true;var d;if(a.type==CKEDITOR.NODE_TEXT&&(d=a.value.match(q))){if(d.index){e(a,new CKEDITOR.htmlParser.text(a.value.substring(0,d.index)));a.value=d[0]}if(CKEDITOR.env.ie&&m&&(!b||a.parent.name in o))return true;if(!m)if((d=a.previous)&&d.name=="br"||!d||h(d))return true}return false}var p={elements:{}},m=d=="html",o=CKEDITOR.tools.extend({},n),r;for(r in o)"#"in -x[r]||delete o[r];for(r in o)p.elements[r]=j(m,b.config.fillEmptyBlocks!==false);p.root=j(m);p.elements.br=function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=b.attributes;if("data-cke-bogus"in d||"data-cke-eol"in d)delete d["data-cke-bogus"];else{for(d=b.next;d&&i(d);)d=d.next;var g=f(b);if(!d&&h(b.parent)){b=b.parent;d=c(a);g=b.children[b.children.length-1];b.children.push(d);d.parent=b;if(g){g.next=d;d.previous=g}}else h(d)&&(g&&!h(g))&&e(d,c(a))}}}}(m);return p} -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&&i(a);)a=a.previous;return a}function f(a){for(a=a.previous;a&&i(a);)a=a.previous;return a}function i(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 n||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)} -function e(a,b){var d=a.parent.children,c=CKEDITOR.tools.indexOf(d,a);d.splice(c,0,b);d=a.previous;a.previous=b;b.next=a;b.parent=a.parent;if(d){b.previous=d;d.next=b}}function g(a){var b=a.parent.children,d=CKEDITOR.tools.indexOf(b,a),c=a.previous,a=a.next;c&&(c.next=a);a&&(a.previous=c);b.splice(d,1)}function d(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,d){return"<"+b+d.replace(y,function(a,b){return!/^on/.test(b)&&d.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 o(a){return a.replace(D,function(a, -b){return decodeURIComponent(b)})}function p(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,function(a){return"<\!--"+w+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function r(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function s(a,b){var d=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 d&& -d[b]||""})}function u(a,b){for(var d=[],c=b.config.protectedSource,e=b._.dataStore||(b._.dataStore={id:1}),g=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,c=[//gi,//gi].concat(c),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(d.push(a)-1)+"--\>"}),f=0;f"});a=a.replace(g, -function(a,b,c){return"<\!--"+w+(b?"{C}":"")+encodeURIComponent(d[c]).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 d,e,g=this;this.editor=a;this.dataFilter=d=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter; -d.addRules(B);d.addRules(b(a,"data"));e.addRules(v);e.addRules(b(a,"html"));a.on("toHtml",function(b){var b=b.data,d=b.dataValue,d=u(d,a),d=l(d),d=m(d),d=d.replace(E,"$1cke:$2"),d=d.replace(K,""),d=CKEDITOR.env.opera?d:d.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),e=b.context||a.editable().getName(),g;if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&e=="pre"){e="div";d="
"+d+"
";g=1}e=a.document.createElement(e);e.setHtml("a"+d);d=e.getHtml().substr(1);d=d.replace(RegExp(" data-cke-"+ -CKEDITOR.rnd+"-","ig")," ");g&&(d=d.replace(/^
|<\/pre>$/gi,""));d=d.replace(F,"$1$2");d=o(d);d=r(d);b.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(d,b.context,b.fixForBody===false?false:c(a.config))},null,null,5);a.on("toHtml",function(a){a.data.dataValue.filterChildren(g.dataFilter,true)},null,null,10);a.on("toHtml",function(a){var a=a.data,b=a.dataValue,d=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(d);b=d.getHtml(true);a.dataValue=p(b)},null,null,15);a.on("toDataFormat",function(b){b.data.dataValue=
-CKEDITOR.htmlParser.fragment.fromHtml(b.data.dataValue,a.editable().getName(),c(a.config))},null,null,5);a.on("toDataFormat",function(a){a.data.dataValue.filterChildren(g.htmlFilter,true)},null,null,10);a.on("toDataFormat",function(b){var d=b.data.dataValue,c=g.writer;c.reset();d.writeChildrenHtml(c);d=c.getHtml(true);d=r(d);d=s(d,a);b.data.dataValue=d},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,d){var c=this.editor;!b&&b!==null&&(b=c.editable().getName());return c.fire("toHtml",
-{dataValue:a,context:b,fixForBody:d}).dataValue},toDataFormat:function(a){return this.editor.fire("toDataFormat",{dataValue:a}).dataValue}};var q=/(?: |\xa0)$/,w="{cke_protected}",x=CKEDITOR.dtd,t=["caption","colgroup","col","thead","tfoot","tbody"],n=CKEDITOR.tools.extend({},x.$blockLimit,x.$block),B={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 d=["name","href","src"],c,e=0;e-1&&e>-1&&c!=e)){c=d(a);e=d(b)}return c>e?1:-1})},embed:function(a){var b=a.parent;if(b&&b.name=="object"){var d=
-b.attributes.width,b=b.attributes.height;d&&(a.attributes.width=d);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 z in{input:1,textarea:1}){B.elements[z]=
-j;v.elements[z]=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,E=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,F=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,K=/]*?)\/?>(?!\s*<\/cke:\1)/gi}(),"use strict",CKEDITOR.htmlParser.element=function(b,c){this.name=b;this.attributes=
-c||{};this.children=[];var a=b||"",f=a.match(/^cke:(.*)/);f&&(a=f[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,i){b=="font-family"&&(i=i.replace(/["']/g,""));c[b.toLowerCase()]=i});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(a,b){a=a[0];b=b[0];return ab?1:0},c=CKEDITOR.htmlParser.fragment.prototype;
-CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:c.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a){var b=this,c,h;if(!b.parent)a.onRoot(b);for(;;){c=b.name;if(!(h=a.onElementName(c))){this.remove();return false}b.name=h;if(!(b=a.onElement(b))){this.remove();return false}if(b!==this){this.replaceWith(b);return false}if(b.name==c)break;if(b.type!=CKEDITOR.NODE_ELEMENT){this.replaceWith(b);
-b.filter(a);return}if(!b.name){this.replaceWithChildren();return false}}c=b.attributes;var e,g;for(e in c){g=e;for(h=c[e];;)if(g=a.onAttributeName(e))if(g!=e){delete c[e];e=g}else break;else{delete c[e];break}g&&((h=a.onAttribute(b,g,h))===false?delete c[g]:c[g]=h)}b.isEmpty||this.filterChildren(a)},filterChildren:c.filterChildren,writeHtml:function(a,c){c&&this.filter(c);var i=this.name,h=[],e=this.attributes,g,d;a.openTag(i,e);for(g in e)h.push([g,e[g]]);a.sortAttributes&&h.sort(b);g=0;for(d=h.length;g<
-d;g++){e=h[g];a.attribute(e[0],e[1])}a.openTagClose(i,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(i)},writeChildrenHtml:c.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,b=a.length;b;)a[--b].insertAfter(this);this.remove()},forEach:c.forEach})}(),function(){var b={};CKEDITOR.template=function(c){if(b[c])this.output=b[c];else{var a=c.replace(/'/g,"\\'").replace(/{([^}]+)}/g,function(a,b){return"',data['"+b+"']==undefined?'{"+b+"}':data['"+b+"'],'"});this.output=
-b[c]=Function("data","buffer","return buffer?buffer.push('"+a+"'):['"+a+"'].join('');")}}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(b){CKEDITOR.instances[b.name]=b;b.on("focus",function(){if(CKEDITOR.currentInstance!=b){CKEDITOR.currentInstance=b;CKEDITOR.fire("currentInstance")}});b.on("blur",function(){if(CKEDITOR.currentInstance==b){CKEDITOR.currentInstance=null;CKEDITOR.fire("currentInstance")}});CKEDITOR.fire("instance",
-null,b)},CKEDITOR.remove=function(b){delete CKEDITOR.instances[b.name]},function(){var b={};CKEDITOR.addTemplate=function(c,a){var f=b[c];if(f)return f;f={name:c,source:a};CKEDITOR.fire("template",f);return b[c]=new CKEDITOR.template(f.source)};CKEDITOR.getTemplate=function(c){return b[c]}}(),function(){var b=[];CKEDITOR.addCss=function(c){b.push(c)};CKEDITOR.getCss=function(){return b.join("\n")}}(),CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")}),
-CKEDITOR.TRISTATE_ON=1,CKEDITOR.TRISTATE_OFF=2,CKEDITOR.TRISTATE_DISABLED=0,function(){CKEDITOR.inline=function(b,c){if(!CKEDITOR.env.isCompatible)return null;b=CKEDITOR.dom.element.get(b);if(b.getEditor())throw'The editor instance "'+b.getEditor().name+'" is already attached to the provided element.';var a=new CKEDITOR.editor(c,b,CKEDITOR.ELEMENT_MODE_INLINE);a.setData(b.getHtml(),null,true);a.on("loaded",function(){a.fire("uiReady");a.editable(b);a.container=b;a.setData(a.getData(1));a.fire("contentDom");
-a.mode="wysiwyg";a.fire("mode");a.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,a);a.resetDirty()},null,null,1E4);a.on("destroy",function(){a.element.clearCustomData();delete a.element});return a};CKEDITOR.inlineAll=function(){var b,c,a;for(a in CKEDITOR.dtd.$editable)for(var f=CKEDITOR.document.getElementsByTag(a),i=0,h=f.count();i{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(i.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.lang.editor,topHtml:f?''+f+"":"",contentId:a.ui.spaceId("contents"),bottomHtml:k?''+k+"":"",outerEl:CKEDITOR.env.ie?"span":"div"}));if(d==CKEDITOR.ELEMENT_MODE_REPLACE){c.hide();
-b.insertAfter(c)}else c.append(b);a.container=b;f&&a.ui.space("top").unselectable();k&&a.ui.space("bottom").unselectable();c=a.config.width;d=a.config.height;c&&b.setStyle("width",CKEDITOR.tools.cssLength(c));d&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(d));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}function f(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 d=function(){a.updateElement()};c.on("submit",d);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",d)})}}}CKEDITOR.replace=function(a,c){return b(a,c,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(a,c,g){return b(a,c,g,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),
-b=0;b",f="",a=g+a.replace(e,function(){return f+g})+f}a=a.replace(/\n/g,"
");b||(a=a.replace(RegExp("
(?=)"),function(a){return c.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 d=this.editor,c=d.config.enterMode,g=d.getSelection(),f=g.getRanges(),j=b.getName(),i=CKEDITOR.dtd.$block[j],k,w,x,t=f.length-1;t>=0;t--){k=f[t];if(!k.checkReadOnly()){k.deleteContents(1);w=!t&&b||b.clone(1);var n,B;if(i)for(;(n=k.getCommonAncestor(0,1))&&(B=CKEDITOR.dtd[n.getName()])&&(!B||!B[j]);)if(n.getName()in CKEDITOR.dtd.span)k.splitElement(n);else if(k.checkStartOfBlock()&&k.checkEndOfBlock()){k.setStartBefore(n);k.collapse(true);n.remove()}else k.splitBlock(c== -CKEDITOR.ENTER_DIV?"div":"p",d.editable());k.insertNode(w);x||(x=w)}}if(x){k.moveToPosition(x,CKEDITOR.POSITION_AFTER_END);if(i)if((b=x.getNext(a))&&b.type==CKEDITOR.NODE_ELEMENT&&b.is(CKEDITOR.dtd.$block))b.getDtd()["#"]?k.moveToElementEditStart(b):k.moveToElementEditEnd(x);else if(!b&&c!=CKEDITOR.ENTER_BR){b=k.fixBlock(true,c==CKEDITOR.ENTER_DIV?"div":"p");k.moveToElementEditStart(b)}}g.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(g,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()})}this.isInline()&&this.changeAttr("tabindex",a.tabIndex);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);var f=CKEDITOR.getCss();if(f){e=b.getHead();if(!e.getCustomData("stylesheet")){f=b.appendStyleText(f);f=new CKEDITOR.dom.element(f.ownerNode|| -f.owningElement);e.setCustomData("stylesheet",f);f.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 true;var c=b.data.keyCode,e;if(c in{8:1,46:1}){var g=a.getSelection(),b=g.getRanges()[0], -f=b.startPath(),j,h,p,c=c==8;if(g=i(g)){a.fire("saveSnapshot");b.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START);g.remove();b.select();a.fire("saveSnapshot");e=1}else if(b.collapsed)if((j=f.block)&&b[c?"checkStartOfBlock":"checkEndOfBlock"]()&&(p=j[c?"getPrevious":"getNext"](d))&&p.is("table")){a.fire("saveSnapshot");b[c?"checkEndOfBlock":"checkStartOfBlock"]()&&j.remove();b["moveToElementEdit"+(c?"End":"Start")](p);b.select();a.fire("saveSnapshot");e=1}else if(f.blockLimit&&f.blockLimit.is("td")&& -(h=f.blockLimit.getAscendant("table"))&&b.checkBoundaryOfElement(h,c?CKEDITOR.START:CKEDITOR.END)&&(p=h[c?"getPrevious":"getNext"](d))){a.fire("saveSnapshot");b["moveToElementEdit"+(c?"End":"Start")](p);b.checkStartOfBlock()&&b.checkEndOfBlock()?p.remove():b.select();a.fire("saveSnapshot");e=1}else if((h=f.contains(["td","th","caption"]))&&b.checkBoundaryOfElement(h,c?CKEDITOR.START:CKEDITOR.END))if((p=h[c?"getPreviousSourceNode":"getNextSourceNode"](1,CKEDITOR.NODE_ELEMENT))&&!p.isReadOnly()&&b.root.contains(p)){b[c? -"moveToElementEditEnd":"moveToElementEditStart"](p);b.select();e=1}}return!e});this.attachListener(a,"key",function(b){if(a.readOnly)return false;var d=b.data.keyCode,c;if(d in{8:1,46:1}){var b=a.getSelection().getRanges()[0],e=b.startPath(),g,d=d==8;for(b.checkEndOfBlock()&&b.moveToPosition(e.block,CKEDITOR.POSITION_BEFORE_END);(g=b[d?"getPreviousNode":"getNextNode"]())&&g.type==CKEDITOR.NODE_ELEMENT&&g.isReadOnly();){c=1;b.moveToPosition(g,d?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END)}if(c){b[d? -"moveToElementEditEnd":"moveToElementEditStart"](g);b.select();b.scrollIntoView()}}return!c});CKEDITOR.env.ie&&this.attachListener(this,"click",c);!CKEDITOR.env.ie&&!CKEDITOR.env.opera&&this.attachListener(this,"mousedown",function(b){var d=b.data.getTarget();if(d.is("img","hr","input","textarea","select")){a.getSelection().selectElement(d);d.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(g,"")){var d=a.createRange();d.moveToElementEditStart(b);d.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 d=a.getCustomData("stylesheet_ref");if(--d)a.setCustomData("stylesheet_ref",d);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 g=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi, -d=CKEDITOR.dom.walker.whitespaces(true),j=CKEDITOR.dom.walker.bookmark(false,true);CKEDITOR.on("instanceLoaded",function(a){var d=a.editor;d.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)}});d.on("selectionChange",function(a){if(!d.readOnly){var c=d.getSelection();if(c&&!c.isLocked){c=d.checkDirty(); -d.fire("lockSnapshot");b(a);d.fire("unlockSnapshot");!c&&d.resetDirty()}}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var d=this.lang.editor+", "+this.name;a.changeAttr("role","textbox");a.changeAttr("aria-label",d);a.changeAttr("title",d);if(d=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents")){var c=CKEDITOR.tools.getNextId(),e=CKEDITOR.dom.element.createFromHtml(''+ -this.lang.common.editorHelp+"");d.append(e);a.changeAttr("aria-describedby",c)}}})});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 d(a,c){var e,g,f,j,i=[],p=c.range.startContainer;e=c.range.startPath();for(var p=h[p.getName()],k=0,o=a.getChildren(),r=o.count(),s=-1,x=-1,q=0,w=e.contains(h.$list);k-1)i[s].firstNotAllowed=1;if(x>-1)i[x].lastNotAllowed=1;return i}function c(a,d){var e=[],g=a.getChildren(),f=g.count(), -j,i=0,p=h[d],k=!a.is(h.$inline)||a.is("br");for(k&&e.push(" ");i ",v.document);v.insertNode(C);v.setStartAfter(C)}D=new CKEDITOR.dom.elementPath(v.startContainer); -n.endPath=E=new CKEDITOR.dom.elementPath(v.endContainer);if(!v.collapsed){y=E.block||E.blockLimit;var K=v.getCommonAncestor();y&&(!y.equals(K)&&!y.contains(K)&&v.checkEndOfBlock())&&n.zombies.push(y);v.deleteContents()}for(;(F=b(v.startContainer)&&v.startContainer.getChild(v.startOffset-1))&&b(F)&&F.isBlockBoundary()&&D.contains(F);)v.moveToPosition(F,CKEDITOR.POSITION_BEFORE_END);f(v,n.blockLimit,D,E);if(C){v.setEndBefore(C);v.collapse();C.remove()}C=v.startPath();if(y=C.contains(g,false,1)){v.splitElement(y); -n.inlineStylesRoot=y;n.inlineStylesPeak=C.lastElement}C=v.createBookmark();(y=C.startNode.getPrevious(a))&&b(y)&&g(y)&&A.push(y);(y=C.startNode.getNext(a))&&b(y)&&g(y)&&A.push(y);for(y=C.startNode;(y=y.getParent())&&g(y);)A.push(y);v.moveToBookmark(C);if(q){F=q;q=n.range;if(n.type=="text"&&n.inlineStylesRoot){C=F;F=n.inlineStylesPeak;v=F.getDocument().createText("{cke-peak}");for(A=n.inlineStylesRoot.getParent();!F.equals(A);){v=v.appendTo(F.clone());F=F.getParent()}F=v.getOuterHtml().replace("{cke-peak}", -C)}C=n.blockLimit.getName();if(/^\s+|\s+$/.test(F)&&"span"in CKEDITOR.dtd[C]){var J=' ';F=J+F+J}F=n.editor.dataProcessor.toHtml(F,null,false);C=q.document.createElement("body");C.setHtml(F);if(J){C.getFirst().remove();C.getLast().remove()}if((J=q.startPath().block)&&!(J.getChildCount()==1&&J.getBogus()))a:{var G;if(C.getChildCount()==1&&b(G=C.getFirst())&&G.is(k)){J=G.getElementsByTag("*");q=0;for(v=J.count();q0;else{H=G.startPath();if(!E.isBlock&&(P=n.editor.config.enterMode!=CKEDITOR.ENTER_BR&&n.editor.config.autoParagraph!==false?n.editor.config.enterMode==CKEDITOR.ENTER_DIV?"div":"p":false)&&!H.block&&H.blockLimit&&H.blockLimit.equals(G.root)){P=J.createElement(P);!CKEDITOR.env.ie&&P.appendBogus();G.insertNode(P);!CKEDITOR.env.ie&& -(L=P.getBogus())&&L.remove();G.moveToPosition(P,CKEDITOR.POSITION_BEFORE_END)}if((H=G.startPath().block)&&!H.equals(I)){if(L=H.getBogus()){L.remove();F.push(H)}I=H}E.firstNotAllowed&&(v=1);if(v&&E.isElement){H=G.startContainer;for(M=null;H&&!h[H.getName()][E.name];){if(H.equals(q)){H=null;break}M=H;H=H.getParent()}if(H){if(M){R=G.splitElement(M);n.zombies.push(R);n.zombies.push(M)}}else{M=q.getName();Q=!C;H=C==D.length-1;M=c(E.node,M);for(var N=[],S=M.length,V=0,T=void 0,U=0,W=-1;V1&&g&&g.intersectsNode(d.$)){c=[e.anchorOffset,e.focusOffset];g=e.focusNode==d.$&&e.focusOffset>0;e.anchorNode==d.$&&e.anchorOffset>0&&c[0]--;g&&c[1]--;var f;g=e;if(!g.isCollapsed){f=g.getRangeAt(0);f.setStart(g.anchorNode,g.anchorOffset);f.setEnd(g.focusNode, -g.focusOffset);f=f.collapsed}f&&c.unshift(c.pop())}}d.setText(d.getText().replace(/\u200B/g,""));if(c){d=e.getRangeAt(0);d.setStart(d.startContainer,c[0]);d.setEnd(d.startContainer,c[1]);e.removeAllRanges();e.addRange(d)}}}var e,g,d=CKEDITOR.dom.walker.invisible(1);CKEDITOR.on("instanceCreated",function(a){function d(){var a=e.getSelection();a&&a.removeAllRanges()}var e=a.editor;e.define("selectionChange",{errorProof:1});e.on("contentDom",function(){var a=e.document,d=CKEDITOR.document,g=e.editable(), -f=a.getBody(),i=a.getDocumentElement(),k=g.isInline();if(CKEDITOR.env.ie||CKEDITOR.env.gecko||CKEDITOR.env.opera||k){var l;g.attachListener(g,"focus",function(){e.unlockSelection(l);l=0},null,null,-1);var m,n=function(){m=e.getSelection();m.isFake||(m=e.getSelection(1));m.lock()};j?g.attachListener(g,"beforedeactivate",n,null,null,-1):g.attachListener(e,"selectionCheck",n,null,null,-1);g.attachListener(g,"blur",function(){e.lockSelection(m);l=1},null,null,-1);g.attachListener(g,"DOMFocusIn",function(){e.unlockSelection()}); -g.attachListener(g,"mousedown",function(){l=0})}if(CKEDITOR.env.ie&&!k){var B;g.attachListener(g,"mousedown",function(a){a.data.$.button==2&&e.document.$.selection.type=="None"&&(B=e.window.getScrollPosition())});g.attachListener(g,"mouseup",function(a){if(a.data.$.button==2&&B){e.document.$.documentElement.scrollLeft=B.x;e.document.$.documentElement.scrollTop=B.y}B=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 d=f.$.createTextRange();try{d.moveToPoint(a.x,a.y)}catch(c){}e.setEndPoint(j.compareEndPoints("StartToStart",d)<0?"EndToEnd":"StartToStart",d);e.select()}}function c(){i.removeListener("mousemove",b);d.removeListener("mouseup",c);i.removeListener("mouseup",c);e.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y7){i.on("mousedown",function(a){if(a.data.getTarget().is("html")){d.on("mouseup",v);i.on("mouseup",v)}});var v=function(){d.removeListener("mouseup",v);i.removeListener("mouseup",v);var b=CKEDITOR.document.$.selection,c=b.createRange();b.type!="None"&&c.parentElement().ownerDocument==a.$&&c.select()}}}}g.attachListener(g,"selectionchange",b,e);g.attachListener(g,"keyup",c,e);g.attachListener(g,"focus",function(){e.forceNextSelectionCheck();e.selectionChange(1)}); -if(g.isInline()?CKEDITOR.env.webkit||CKEDITOR.env.gecko:CKEDITOR.env.opera){var z;g.attachListener(g,"mousedown",function(){z=1});g.attachListener(a.getDocumentElement(),"mouseup",function(){z&&c.call(e);z=0})}else g.attachListener(g,"mouseup",c,e);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",d,null,null,9);CKEDITOR.env.webkit&&e.on("setData",d);e.on("contentDomUnload",function(){e.unlockSelection()})});CKEDITOR.on("instanceReady",function(a){var b=a.editor,d=b.editable();if(CKEDITOR.env.webkit){b.on("selectionChange",function(){var a=i(d);a&&(a.getCustomData("ready")?h(d):a.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){h(d)},null,null,-1);var c,e,a=function(){var a=b.document,g=i(d); -if(g){a=a.$.defaultView.getSelection();a.type=="Caret"&&a.anchorNode==g.$&&(e=1);c=g.getText();g.setText(c.replace(/\u200B/g,""))}},g=function(){var a=b.document,g=i(d);if(g){g.setText(c);if(e){a.$.defaultView.getSelection().setPosition(g.$,g.getLength());e=0}}};b.on("beforeUndoImage",a);b.on("afterUndoImage",g);b.on("beforeGetData",a,null,null,0);b.on("getData",g)}});CKEDITOR.editor.prototype.selectionChange=function(a){(a?b:c).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){if((this._.savedSelection|| -this._.fakeSelection)&&!a)return this._.savedSelection||this._.fakeSelection;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= +a.getIndex();a=a.getParent()}this.startContainer=a;this.startOffset=b;if(!this.endContainer){this.endContainer=a;this.endOffset=b}e(this)},setEnd:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex()+1;a=a.getParent()}this.endContainer=a;this.endOffset=b;if(!this.startContainer){this.startContainer=a;this.startOffset=b}e(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())}, +setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}e(this)},setEndAt:function(a, +b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setEnd(a,a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}e(this)},fixBlock:function(a,b){var c=this.createBookmark(),f=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(f); +f.trim();CKEDITOR.env.ie||f.appendBogus();this.insertNode(f);this.moveToBookmark(c);return f},splitBlock:function(a){var b=new CKEDITOR.dom.elementPath(this.startContainer,this.root),c=new CKEDITOR.dom.elementPath(this.endContainer,this.root),f=b.block,g=c.block,e=null;if(!b.blockLimit.equals(c.blockLimit))return null;if(a!="br"){if(!f){f=this.fixBlock(true,a);g=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block}g||(g=this.fixBlock(false,a))}a=f&&this.checkStartOfBlock();b=g&&this.checkEndOfBlock(); +this.deleteContents();if(f&&f.equals(g))if(b){e=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(g,CKEDITOR.POSITION_AFTER_END);g=null}else if(a){e=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f=null}else{g=this.splitElement(f);!CKEDITOR.env.ie&&!f.is("ul","ol")&&f.appendBogus()}return{previousBlock:f,nextBlock:g,wasStartOfBlock:a,wasEndOfBlock:b,elementPath:e}},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(f){return function(a){return b(a)||(c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable())||f.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(), +f=this[b?"endPath":"startPath"](),g=f.block||f.blockLimit,e;g&&!g.equals(f.root)&&!g.getFirst(a(g));){e=g.getParent();this[b?"setEndAt":"setStartAt"](g,CKEDITOR.POSITION_AFTER_END);g.remove(1);g=e}this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,b){var c=b==CKEDITOR.START,f=this.clone();f.collapse(c);f[c?"setStartAt": +"setEndAt"](a,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);f=new CKEDITOR.dom.walker(f);f.evaluator=d(c);return f[c?"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 f=this.clone();f.collapse(1);f.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(f);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var f=this.clone();f.collapse();f.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(f);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 f=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);f=1;break}if(b.type==CKEDITOR.NODE_ELEMENT)if(b.isEditable()){this.moveToPosition(b,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START);f=1}else c&&(b.is("br")&&this.checkEndOfBlock())&&this.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);var g=b,e=f,i=void 0;g.type==CKEDITOR.NODE_ELEMENT&&g.isEditable(false)&&(i=g[c?"getLast":"getFirst"](a)); +!e&&!i&&(i=g[c?"getPrevious":"getNext"](a));b=i}return!!f},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 f=a.next();a.reset();return f&&f.equals(a.previous())?f: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,f,g=this.clone();g.optimize();if(f=g.startContainer.type==CKEDITOR.NODE_TEXT){c=g.startContainer.getText();b=g.startContainer.split(g.startOffset);a.insertAfter(g.startContainer)}else g.insertNode(a);a.scrollIntoView();if(f){g.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 d(a,b,c){for(a=a.getNextSourceNode(b,null,c);!e(a);)a=a.getNextSourceNode(b,null,c);return a}var a=/^[\r\n\t ]+$/,e=CKEDITOR.dom.walker.bookmark(false,true),h=CKEDITOR.dom.walker.whitespaces(true),g=function(a){return e(a)&&h(a)};b.prototype= +{getNextParagraph:function(b){b=b||"p";if(!CKEDITOR.dtd[this.range.root.getName()][b])return null;var i,c,h,l,m,n;if(!this._.started){c=this.range.clone();c.shrink(CKEDITOR.NODE_ELEMENT,true);l=c.endContainer.hasAscendant("pre",true)||c.startContainer.hasAscendant("pre",true);c.enlarge(this.forceBrBreak&&!l||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(!c.collapsed){l=new CKEDITOR.dom.walker(c.clone());var o=CKEDITOR.dom.walker.bookmark(true,true);l.evaluator= +o;this._.nextNode=l.next();l=new CKEDITOR.dom.walker(c.clone());l.evaluator=o;l=l.previous();this._.lastNode=l.getNextSourceNode(true);if(this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()){o=this.range.clone();o.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END);if(o.checkEndOfBlock()){o=new CKEDITOR.dom.elementPath(o.endContainer,o.root);this._.lastNode=(o.block||o.blockLimit).getNextSourceNode(true)}}if(!this._.lastNode){this._.lastNode= +this._.docEndMarker=c.document.createText("");this._.lastNode.insertAfter(l)}c=null}this._.started=1}o=this._.nextNode;l=this._.lastNode;for(this._.nextNode=null;o;){var k=0,p=o.hasAscendant("pre"),r=o.type!=CKEDITOR.NODE_ELEMENT,q=0;if(r)o.type==CKEDITOR.NODE_TEXT&&a.test(o.getText())&&(r=0);else{var t=o.getName();if(o.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){if(t=="br")r=1;else if(!c&&!o.getChildCount()&&t!="hr"){i=o;h=o.equals(l);break}if(c){c.setEndAt(o,CKEDITOR.POSITION_BEFORE_START); +if(t!="br")this._.nextNode=o}k=1}else{if(o.getFirst()){if(!c){c=this.range.clone();c.setStartAt(o,CKEDITOR.POSITION_BEFORE_START)}o=o.getFirst();continue}r=1}}if(r&&!c){c=this.range.clone();c.setStartAt(o,CKEDITOR.POSITION_BEFORE_START)}h=(!k||r)&&o.equals(l);if(c&&!k)for(;!o.getNext(g)&&!h;){t=o.getParent();if(t.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){k=1;r=0;h||t.equals(l);c.setEndAt(t,CKEDITOR.POSITION_BEFORE_END);break}o=t;r=1;h=o.equals(l);q=1}r&&c.setEndAt(o,CKEDITOR.POSITION_AFTER_END); +o=d(o,q,l);if((h=!o)||k&&c)break}if(!i){if(!c){this._.docEndMarker&&this._.docEndMarker.remove();return this._.nextNode=null}i=new CKEDITOR.dom.elementPath(c.startContainer,c.root);o=i.blockLimit;k={div:1,th:1,td:1};i=i.block;if(!i&&o&&!this.enforceRealBlocks&&k[o.getName()]&&c.checkStartOfBlock()&&c.checkEndOfBlock()&&!o.equals(c.root))i=o;else if(!i||this.enforceRealBlocks&&i.getName()=="li"){i=this.range.document.createElement(b);c.extractContents().appendTo(i);i.trim();c.insertNode(i);m=n=true}else if(i.getName()!= +"li"){if(!c.checkStartOfBlock()||!c.checkEndOfBlock()){i=i.clone(false);c.extractContents().appendTo(i);i.trim();n=c.splitBlock();m=!n.wasStartOfBlock;n=!n.wasEndOfBlock;c.insertNode(i)}}else if(!h)this._.nextNode=i.equals(l)?null:d(c.getBoundaryNodes().endNode,1,l)}if(m)(c=i.getPrevious())&&c.type==CKEDITOR.NODE_ELEMENT&&(c.getName()=="br"?c.remove():c.getLast()&&c.getLast().$.nodeName.toLowerCase()=="br"&&c.getLast().remove());if(n)(c=i.getLast())&&c.type==CKEDITOR.NODE_ELEMENT&&c.getName()=="br"&& +(CKEDITOR.env.ie||c.getPrevious(e)||c.getNext(e))&&c.remove();if(!this._.nextNode)this._.nextNode=h||i.equals(l)||!l?null:d(i,1,l);return i}};CKEDITOR.dom.range.prototype.createIterator=function(){return new b(this)}}(),CKEDITOR.command=function(b,d){this.uiItems=[];this.exec=function(a){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return false;this.editorFocus&&b.focus();return this.fire("exec")===false?true:d.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:d.refresh&&d.refresh.apply(this,arguments)!==false};var a;this.checkAllowed=function(){return typeof a=="boolean"?a:a=b.filter.checkFeature(this)};CKEDITOR.tools.extend(this,d,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!d.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)},CKEDITOR.command.prototype={enable:function(){this.state== +CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(!this.preserveState||typeof this.previousState=="undefined"?CKEDITOR.TRISTATE_OFF:this.previousState)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(b){if(this.state==b||!this.checkAllowed())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),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(){function b(a,b,c,f,g){var i=b.name;if((f||!a.elements||a.elements(i))&&(!a.match||a.match(b))){if(f=!g){a:if(f=a.required){var k;if(i=f.classes){k=b.classes;for(g=0;g-1};case "regexp":return function(b){return a.test(b)};case "array":return function(b){return CKEDITOR.tools.indexOf(a,b)>-1};case "object":return function(b){return b in a}}return false}function n(){return new CKEDITOR.htmlParser.element("br")}function o(a){return a.type== +CKEDITOR.NODE_ELEMENT&&(a.name=="br"||x.$block[a.name])}function k(a,b,c){var f=a.name;if(x.$empty[f]||!a.children.length)if(f=="hr"&&b=="br")a.replaceWith(n());else{a.parent&&c.push({check:"it",el:a.parent});a.remove()}else if(x.$block[f]||f=="tr")if(b=="br"){if(a.previous&&!o(a.previous)){b=n();b.insertBefore(a)}if(a.next&&!o(a.next)){b=n();b.insertAfter(a)}a.replaceWithChildren()}else{var f=a.children,g;b:{g=x[b];for(var e=0,i=f.length,d;e0;){d=f[--i];if(e&&(d.type==CKEDITOR.NODE_TEXT||d.type==CKEDITOR.NODE_ELEMENT&&x.$inline[d.name])){if(!k){k=new CKEDITOR.htmlParser.element(b);k.insertAfter(a);c.push({check:"parent-down",el:k})}k.add(d,0)}else{k=null;d.insertAfter(a);g.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(d.type==CKEDITOR.NODE_ELEMENT&&!x[g.name][d.name])&& +c.push({check:"el-up",el:d})}}a.remove()}}else if(f=="style")a.remove();else{a.parent&&c.push({check:"it",el:a.parent});a.replaceWithChildren()}}function p(a,b,c){var f,g;for(f=0;f";if(i in this._.cachedChecks)return this._.cachedChecks[i];e=f(b).$1;var d=e.styles,k=e.classes;e.name=e.elements;e.classes=k=k?k.split(/\s*,\s*/):[];e.styles=h(d);e.attributes=h(e.attributes);e.children=[];k.length&&(e.attributes["class"]=k.join(" "));if(d)e.attributes.style=CKEDITOR.tools.writeCssText(e.styles)}else{e=b.getDefinition(); +d=e.styles;k=e.attributes||{};if(d){d=u(d);k.style=CKEDITOR.tools.writeCssText(d,true)}else d={};e={name:e.element,attributes:k,classes:k["class"]?k["class"].split(/\s+/):[],styles:d,children:[]}}var d=CKEDITOR.tools.clone(e),k=[],m,r;if(c!==false&&(m=this._.transformations[e.name])){for(r=0;r0?false:CKEDITOR.tools.objectCompare(e.attributes,d.attributes,true)?true:false;typeof b== +"string"&&(this._.cachedChecks[i]=c);return c}};var v={elements:1,styles:1,attributes:1,classes:1},A={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},B=/^([a-z0-9*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,y={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},C=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a, +"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,b,c){c=c||b;if(!(c in a.styles)){var f=a.attributes[b];if(f){/^\d+$/.test(f)&&(f=f+"px");a.styles[c]=f}}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var f=a.styles[b],g=f&&f.match(/^(\d+)(?:\.\d*)?px$/);g?a.attributes[c]=g[1]:f==s&&(a.attributes[c]=s)}delete a.styles[b]},matchesStyle:r,transform:function(a,b){if(typeof b=="string")a.name=b;else{var c=b.getDefinition(),f=c.styles,g=c.attributes, +e,i,d,k;a.name=c.element;for(e in g)if(e=="class"){c=a.classes.join("|");for(d=g[e].split(/\s+/);k=d.pop();)c.indexOf(k)==-1&&a.classes.push(k)}else a.attributes[e]=g[e];for(i in f)a.styles[i]=f[i]}}}}(),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 d(){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?d.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;d.call(this)},a,this)}},add:function(b,d){var a=b.getCustomData("focusmanager");if(!a||a!=this){a&&a.remove(b);var a="focus",e="blur";if(d)if(CKEDITOR.env.ie){a="focusin";e="focusout"}else CKEDITOR.event.useCapture=1;var h={blur:function(){b.equals(this.currentActive)&&this.blur()},focus:function(){this.currentActive=b;this.focus()}};b.on(a,h.focus,this);b.on(e,h.blur,this);if(d)CKEDITOR.event.useCapture=0;b.setCustomData("focusmanager", +this);b.setCustomData("focusmanager_handlers",h)}},remove:function(b){b.removeCustomData("focusmanager");var d=b.removeCustomData("focusmanager_handlers");b.removeListener("blur",d.blur);b.removeListener("focus",d.focus)}}}(),CKEDITOR.keystrokeHandler=function(b){if(b.keystrokeHandler)return b.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:b};return this},function(){var b,d=function(a){var a=a.data,d=a.getKeystroke(),g=this.keystrokes[d],f=this._.editor;b=f.fire("key", +{keyCode:d})===false;if(!b){g&&(b=f.execCommand(g,{from:"keystrokeHandler"})!==false);b||(b=!!this.blockedKeystrokes[d])}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",d,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,d,a){if(!b||!CKEDITOR.lang.languages[b])b=this.detect(d,b);this[b]?a(b,this[b]):CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+b+".js"),function(){a(b,this[b])},this)},detect:function(b,d){var a=this.languages,d=d||navigator.userLanguage|| +navigator.language||b,e=d.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),h=e[1],e=e[2];a[h+"-"+e]?h=h+"-"+e:a[h]||(h=null);CKEDITOR.lang.detect=h?function(){return h}:function(a){return a};return h||b}}}(),CKEDITOR.scriptLoader=function(){var b={},d={};return{load:function(a,e,h,g){var f=typeof a=="string";f&&(a=[a]);h||(h=CKEDITOR);var i=a.length,c=[],j=[],l=function(a){e&&(f?e.call(h,a):e.call(h,c,j))};if(i===0)l(true);else{var m=function(a,b){(b?c:j).push(a);if(--i<=0){g&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"); +l(b)}},n=function(a,c){b[a]=1;var f=d[a];delete d[a];for(var g=0;g1)){var f=new CKEDITOR.dom.element("script");f.setAttributes({type:"text/javascript",src:a});if(e)if(CKEDITOR.env.ie)f.$.onreadystatechange=function(){if(f.$.readyState=="loaded"||f.$.readyState=="complete"){f.$.onreadystatechange=null;n(a,true)}};else{f.$.onload=function(){setTimeout(function(){n(a,true)},0)};f.$.onerror=function(){n(a, +false)}}f.appendTo(CKEDITOR.document.getHead())}}};g&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var k=0;k=0)m=a.langCode;else{m=a.langCode.replace(/-.*/,"");m=m!=a.langCode&&CKEDITOR.tools.indexOf(j, +m)>=0?m:CKEDITOR.tools.indexOf(j,"en")>=0?"en":j[0]}if(!h.langEntries||!h.langEntries[m])e.push(CKEDITOR.getUrl(h.path+"lang/"+m+".js"));else{a.lang[d]=h.langEntries[m];m=null}}g.push(m);f.push(h)}CKEDITOR.scriptLoader.load(e,function(){for(var c=["beforeInit","init","afterInit"],e=0;e]+)>)|(?:!--([\\S|\\s]*?)--\>)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))","g")}},function(){var b=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,d={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 e,h,g=0,f;e=this._.htmlPartsRegex.exec(a);){h=e.index;if(h>g){g=a.substring(g,h);if(f)f.push(g);else this.onText(g)}g=this._.htmlPartsRegex.lastIndex;if(h=e[1]){h=h.toLowerCase();if(f&&CKEDITOR.dtd.$cdata[h]){this.onCDATA(f.join(""));f=null}if(!f){this.onTagClose(h);continue}}if(f)f.push(e[0]);else if(h= +e[3]){h=h.toLowerCase();if(!/="/.test(h)){var i={},c;e=e[4];var j=!!(e&&e.charAt(e.length-1)=="/");if(e)for(;c=b.exec(e);){var l=c[1].toLowerCase();c=c[2]||c[3]||c[4]||"";i[l]=!c&&d[l]?l:c}this.onTagOpen(h,i,j);!f&&CKEDITOR.dtd.$cdata[h]&&(f=[])}}else if(h=e[2])this.onComment(h)}if(a.length>g)this.onText(a.substring(g,a.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(b){this._.output.push("<",b)},openTagClose:function(b, +d){d?this._.output.push(" />"):this._.output.push(">")},attribute:function(b,d){typeof d=="string"&&(d=CKEDITOR.tools.htmlEncodeAttr(d));this._.output.push(" ",b,'="',d,'"')},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 d=this._.output.join("");b&&this.reset();return d}}}),"use strict", +function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var b=this.parent.children,d=CKEDITOR.tools.indexOf(b,this),a=this.previous,e=this.next;a&&(a.next=e);e&&(e.previous=a);b.splice(d,1);this.parent=null},replaceWith:function(b){var d=this.parent.children,a=CKEDITOR.tools.indexOf(d,this),e=b.previous=this.previous,h=b.next=this.next;e&&(e.next=b);h&&(h.previous=b);d[a]=b;b.parent=this.parent;this.parent=null},insertAfter:function(b){var d=b.parent.children, +a=CKEDITOR.tools.indexOf(d,b),e=b.next;d.splice(a+1,0,this);this.next=b.next;this.previous=b;b.next=this;e&&(e.previous=this);this.parent=b.parent},insertBefore:function(b){var d=b.parent.children,a=CKEDITOR.tools.indexOf(d,b);d.splice(a,0,this);this.next=b;(this.previous=b.previous)&&(b.previous.next=this);b.previous=this;this.parent=b.parent}}}(),"use strict",CKEDITOR.htmlParser.comment=function(b){this.value=b;this._={isBlockLike:false}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node, +{type:CKEDITOR.NODE_COMMENT,filter:function(b){var d=this.value;if(!(d=b.onComment(d,this))){this.remove();return false}if(typeof d!="string"){this.replaceWith(d);return false}this.value=d;return true},writeHtml:function(b,d){d&&this.filter(d);b.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(b){this.value=b;this._={isBlockLike:false}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(b){if(!(this.value= +b.onText(this.value,this))){this.remove();return false}},writeHtml:function(b,d){d&&this.filter(d);b.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(b){this.value=b};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(b){b.write(this.value)}})}(),"use strict",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 d=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},e=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1});CKEDITOR.htmlParser.fragment.fromHtml=function(h,g,f){function i(a){var b;if(p.length>0)for(var f=0;f=0;b--)if(a==p[b].name){p.splice(b,1);return}for(var g=[],e=[],i=q;i!=k&&i.name!=a;){i._.isBlockLike||e.unshift(i);g.push(i);i=i.returnPoint||i.parent}if(i!=k){for(b=0;b0?this.children[b-1]:null;if(f){if(a._.isBlockLike&&f.type==CKEDITOR.NODE_TEXT){f.value=CKEDITOR.tools.rtrim(f.value);if(f.value.length===0){this.children.pop();this.add(a);return}}f.next=a}a.previous=f;a.parent=this; +this.children.splice(b,0,a);if(!this._.hasInlineStarted)this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike},filter:function(a){a.onRoot(this);this.filterChildren(a)},filterChildren:function(a,b){if(this.childrenFilteredBy!=a.id){if(b&&!this.parent)a.onRoot(this);this.childrenFilteredBy=a.id;for(var f=0;f=0;d--)if(h=b[d]){h.pri=e;a.splice(c,0,h)}}}function a(a,b,i){if(b)for(var c in b){var d=a[c];a[c]=e(d,b[c],i);d||a.$length++}}function e(a,b,e){if(b){b.pri=e;if(a){if(a.splice)d(a,b,e);else{a=a.pri>e?[b,a]:[a,b];a.filter=h}return a}return b.filter=b}}function h(a){for(var b=a.type||a instanceof CKEDITOR.htmlParser.fragment,e=0;e7||d.name in CKEDITOR.dtd.tr||d.name in CKEDITOR.dtd.$listItem))i=false;else{i=a(d);i=!i||d.name=="form"&&i.name=="input"}i&&d.add(j(b))}}}function m(a,b){if((!p|| +!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(z))){if(c.index){f(a,new CKEDITOR.htmlParser.text(a.value.substring(0,c.index)));a.value=c[0]}if(CKEDITOR.env.ie&&p&&(!b||a.parent.name in o))return true;if(!p)if((c=a.previous)&&c.name=="br"||!c||g(c))return true}return false}var n={elements:{}},p=d=="html",o=CKEDITOR.tools.extend({},s),q;for(q in o)"#"in u[q]||delete o[q];for(q in o)n.elements[q]= +k(p,b.config.fillEmptyBlocks!==false);n.root=k(p);n.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&&h(c);)c=c.next;var d=e(b);!c&&g(b.parent)?i(b.parent,j(a)):g(c)&&(d&&!g(d))&&f(c,j(a))}}}}(p);return n}function d(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&&h(a);)a=a.previous;return a}function e(a){for(a=a.previous;a&&h(a);)a=a.previous;return a}function h(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function g(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in s||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function f(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,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;if(c){c.next=b;b.previous=c}}function c(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 j(a){var b=a.parent;return b?CKEDITOR.tools.indexOf(b.children,a):-1}function l(a){a=a.attributes;a.contenteditable!="false"&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable= +"false"}function m(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function n(a){return a.replace(y,function(a,b,c){return"<"+b+c.replace(C,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 o(a){return a.replace(D,function(a){return""+encodeURIComponent(a)+""})}function k(a){return a.replace(F,function(a, +b){return decodeURIComponent(b)})}function p(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,function(a){return"<\!--"+x+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function r(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function q(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 t(a,b){for(var c=[],f=b.config.protectedSource,e=b._.dataStore||(b._.dataStore={id:1}),g=/<\!--\{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)+"--\>"}),d=0;d"});a=a.replace(g, +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,e=this;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(v);c.addRules(b(a,"data"));f.addRules(A);f.addRules(b(a,"html"));a.on("toHtml",function(b){var b=b.data,c=b.dataValue,c=t(c,a),c=n(c),c=o(c),c=c.replace(E,"$1cke:$2"),c=c.replace(I,""),c=CKEDITOR.env.opera?c:c.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),f=b.context||a.editable().getName(),e;if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&f=="pre"){f="div";c="
"+c+"
";e=1}f=a.document.createElement(f);f.setHtml("a"+c);c=f.getHtml().substr(1);c=c.replace(RegExp(" data-cke-"+ +CKEDITOR.rnd+"-","ig")," ");e&&(c=c.replace(/^
|<\/pre>$/gi,""));c=c.replace(K,"$1$2");c=k(c);c=r(c);b.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,b.context,b.fixForBody===false?false:d(a.config))},null,null,5);a.on("toHtml",function(a){a.data.dataValue.filterChildren(e.dataFilter,true)},null,null,10);a.on("toHtml",function(a){var a=a.data,b=a.dataValue,c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(true);a.dataValue=p(b)},null,null,15);a.on("toDataFormat",function(b){b.data.dataValue=
+CKEDITOR.htmlParser.fragment.fromHtml(b.data.dataValue,a.editable().getName(),d(a.config))},null,null,5);a.on("toDataFormat",function(a){a.data.dataValue.filterChildren(e.htmlFilter,true)},null,null,10);a.on("toDataFormat",function(b){var c=b.data.dataValue,f=e.writer;f.reset();c.writeChildrenHtml(f);c=f.getHtml(true);c=r(c);c=q(c,a);b.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,f){var e=this.editor;!b&&b!==null&&(b=e.editable().getName());return e.fire("toHtml",
+{dataValue:a,context:b,fixForBody:c,dontFilter:!!f}).dataValue},toDataFormat:function(a){return this.editor.fire("toDataFormat",{dataValue:a}).dataValue}};var z=/(?: |\xa0)$/,x="{cke_protected}",u=CKEDITOR.dtd,w=["caption","colgroup","col","thead","tfoot","tbody"],s=CKEDITOR.tools.extend({},u.$blockLimit,u.$block),v={elements:{},attributeNames:[[/^on/,"data-cke-pa-on"]]},A={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&&f>-1&&c!=f)){c=j(a);f=j(b)}return c>f?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&&i(a,b=new CKEDITOR.htmlParser.text);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)A.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})};for(var B in{input:1,
+textarea:1}){v.elements[B]=l;A.elements[B]=m}var y=/<(a|area|img|input|source)\b([^>]*)>/gi,C=/\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,D=/(?:])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,F=/([^<]*)<\/cke:encoded>/gi,E=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,K=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,I=/]*?)\/?>(?!\s*<\/cke:\1)/gi}(),"use strict",CKEDITOR.htmlParser.element=function(b,
+d){this.name=b;this.attributes=d||{};this.children=[];var a=b||"",e=a.match(/^cke:(.*)/);e&&(a=e[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 d={};((b instanceof CKEDITOR.htmlParser.element?b.attributes.style:
+b)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,b,h){b=="font-family"&&(h=h.replace(/["']/g,""));d[b.toLowerCase()]=h});return{rules:d,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 d)d[b]&&a.push(b,":",d[b],";");return a.join("")}}},function(){var b=function(a,b){a=a[0];b=b[0];return a<
+b?-1:a>b?1:0},d=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:d.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a){var b=this,d,g;if(!b.parent)a.onRoot(b);for(;;){d=b.name;if(!(g=a.onElementName(d))){this.remove();return false}b.name=g;if(!(b=a.onElement(b))){this.remove();return false}if(b!==this){this.replaceWith(b);return false}if(b.name==
+d)break;if(b.type!=CKEDITOR.NODE_ELEMENT){this.replaceWith(b);return false}if(!b.name){this.replaceWithChildren();return false}}d=b.attributes;var f,i;for(f in d){i=f;for(g=d[f];;)if(i=a.onAttributeName(f))if(i!=f){delete d[f];f=i}else break;else{delete d[f];break}i&&((g=a.onAttribute(b,i,g))===false?delete d[i]:d[i]=g)}b.isEmpty||this.filterChildren(a);return true},filterChildren:d.filterChildren,writeHtml:function(a,e){e&&this.filter(e);var d=this.name,g=[],f=this.attributes,i,c;a.openTag(d,f);
+for(i in f)g.push([i,f[i]]);a.sortAttributes&&g.sort(b);i=0;for(c=g.length;i{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(h.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:l?''+l+"":"",outerEl:CKEDITOR.env.ie?"span":"div"}));if(c==CKEDITOR.ELEMENT_MODE_REPLACE){e.hide();
+b.insertAfter(e)}else e.append(b);a.container=b;d&&a.ui.space("top").unselectable();l&&a.ui.space("bottom").unselectable();e=a.config.width;c=a.config.height;e&&b.setStyle("width",CKEDITOR.tools.cssLength(e));c&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(c));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}function e(a){var b=a.element;if(a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&b.is("textarea")){var e=b.$.form&&new CKEDITOR.dom.element(b.$.form);
+if(e){var c=function(){a.updateElement()};e.on("submit",c);if(!e.$.submit.nodeName&&!e.$.submit.length)e.$.submit=CKEDITOR.tools.override(e.$.submit,function(b){return function(){a.updateElement();b.apply?b.apply(this,arguments):b()}});a.on("destroy",function(){e.removeListener("submit",c)})}}}CKEDITOR.replace=function(a,f){return b(a,f,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(a,f,e){return b(a,f,e,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),
+b=0;b",i="",a=d+a.replace(e,function(){return i+d})+i}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," ");l(this,"text",a)},insertElement:function(b){g(this);for(var c=this.editor,e=c.config.enterMode,d=c.getSelection(),i=d.getRanges(),h=b.getName(),j=CKEDITOR.dtd.$block[h], +l,z,x,u=i.length-1;u>=0;u--){l=i[u];if(!l.checkReadOnly()){l.deleteContents(1);z=!u&&b||b.clone(1);var w,s;if(j)for(;(w=l.getCommonAncestor(0,1))&&(s=CKEDITOR.dtd[w.getName()])&&(!s||!s[h]);)if(w.getName()in CKEDITOR.dtd.span)l.splitElement(w);else if(l.checkStartOfBlock()&&l.checkEndOfBlock()){l.setStartBefore(w);l.collapse(true);w.remove()}else l.splitBlock(e==CKEDITOR.ENTER_DIV?"div":"p",c.editable());l.insertNode(z);x||(x=z)}}if(x){l.moveToPosition(x,CKEDITOR.POSITION_AFTER_END);if(j)if((b=x.getNext(a))&& +b.type==CKEDITOR.NODE_ELEMENT&&b.is(CKEDITOR.dtd.$block))b.getDtd()["#"]?l.moveToElementEditStart(b):l.moveToElementEditEnd(x);else if(!b&&e!=CKEDITOR.ENTER_BR){b=l.fixBlock(true,e==CKEDITOR.ENTER_DIV?"div":"p");l.moveToElementEditStart(b)}}d.selectRanges([l]);f(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()})}this.isInline()&&this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document= +this.getDocument();a.window=this.getWindow();var b=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var f=a.config.contentsLangDirection;this.getDirection(1)!=f&&this.changeAttr("dir",f);var e=CKEDITOR.getCss();if(e){f=b.getHead();if(!f.getCustomData("stylesheet")){e=b.appendStyleText(e);e=new CKEDITOR.dom.element(e.ownerNode||e.owningElement);f.setCustomData("stylesheet",e);e.data("cke-temp",1)}}f=b.getCustomData("stylesheet_ref")||0;b.setCustomData("stylesheet_ref",f+ +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 true;var f=b.data.keyCode,e;if(f in{8:1,46:1}){var d=a.getSelection(),b=d.getRanges()[0],g=b.startPath(),i,j,k,f=f==8;if(d=h(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=g.block)&&b[f?"checkStartOfBlock":"checkEndOfBlock"]()&&(k=i[f?"getPrevious":"getNext"](c))&&k.is("table")){a.fire("saveSnapshot");b[f?"checkEndOfBlock":"checkStartOfBlock"]()&&i.remove();b["moveToElementEdit"+(f?"End":"Start")](k);b.select();a.fire("saveSnapshot");e=1}else if(g.blockLimit&&g.blockLimit.is("td")&&(j=g.blockLimit.getAscendant("table"))&&b.checkBoundaryOfElement(j,f?CKEDITOR.START:CKEDITOR.END)&&(k=j[f?"getPrevious":"getNext"](c))){a.fire("saveSnapshot"); +b["moveToElementEdit"+(f?"End":"Start")](k);b.checkStartOfBlock()&&b.checkEndOfBlock()?k.remove():b.select();a.fire("saveSnapshot");e=1}else if((j=g.contains(["td","th","caption"]))&&b.checkBoundaryOfElement(j,f?CKEDITOR.START:CKEDITOR.END))if((k=j[f?"getPreviousSourceNode":"getNextSourceNode"](1,CKEDITOR.NODE_ELEMENT))&&!k.isReadOnly()&&b.root.contains(k)){b[f?"moveToElementEditEnd":"moveToElementEditStart"](k);b.select();e=1}}return!e});CKEDITOR.env.ie&&this.attachListener(this,"click",d);!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, +c=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.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=this.lang.editor+", "+this.name;a.changeAttr("role","textbox");a.changeAttr("aria-label",c);a.changeAttr("title",c);if(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents")){var f=CKEDITOR.tools.getNextId(),e=CKEDITOR.dom.element.createFromHtml(''+ +this.lang.common.editorHelp+"");c.append(e);a.changeAttr("aria-describedby",f)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");var l=function(){function b(a){return a.type==CKEDITOR.NODE_ELEMENT}function c(a,f){var e,d,g,i,j=[],k=f.range.startContainer;e=f.range.startPath();for(var k=h[k.getName()],l=0,r=a.getChildren(),o=r.count(),p=-1,t=-1,x=0,z=e.contains(h.$list);l-1)j[p].firstNotAllowed=1;if(t>-1)j[t].lastNotAllowed=1;return j}function e(a,c){var f=[],d=a.getChildren(),g=d.count(), +i,j=0,k=h[c],l=!a.is(h.$inline)||a.is("br");for(l&&f.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){var y=F.block||F.blockLimit,K=v.getCommonAncestor();y&&(!y.equals(K)&&!y.contains(K)&&v.checkEndOfBlock())&&t.zombies.push(y);v.deleteContents()}for(;(E=b(v.startContainer)&&v.startContainer.getChild(v.startOffset-1))&&b(E)&&E.isBlockBoundary()&&D.contains(E);)v.moveToPosition(E,CKEDITOR.POSITION_BEFORE_END);g(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)&&B.push(y);(y=C.startNode.getNext(a))&&b(y)&&d(y)&&B.push(y);for(y=C.startNode;(y=y.getParent())&&d(y);)B.push(y);v.moveToBookmark(C);if(s){E=s;s=t.range;if(t.type=="text"&&t.inlineStylesRoot){C=E;E=t.inlineStylesPeak;v=E.getDocument().createText("{cke-peak}");for(B=t.inlineStylesRoot.getParent();!E.equals(B);){v= +v.appendTo(E.clone());E=E.getParent()}E=v.getOuterHtml().replace("{cke-peak}",C)}C=t.blockLimit.getName();if(/^\s+|\s+$/.test(E)&&"span"in CKEDITOR.dtd[C]){var I=' ';E=I+E+I}E=t.editor.dataProcessor.toHtml(E,null,false,t.dontFilter);C=s.document.createElement("body");C.setHtml(E);if(I){C.getFirst().remove();C.getLast().remove()}if((I=s.startPath().block)&&!(I.getChildCount()==1&&I.getBogus()))a:{var G;if(C.getChildCount()==1&&b(G=C.getFirst())&&G.is(l)){I=G.getElementsByTag("*"); +s=0;for(v=I.count();s0;else{H=G.startPath();if(!F.isBlock&&(P=t.editor.config.enterMode!=CKEDITOR.ENTER_BR&&t.editor.config.autoParagraph!==false?t.editor.config.enterMode==CKEDITOR.ENTER_DIV?"div":"p":false)&&!H.block&&H.blockLimit&&H.blockLimit.equals(G.root)){P= +I.createElement(P);!CKEDITOR.env.ie&&P.appendBogus();G.insertNode(P);!CKEDITOR.env.ie&&(L=P.getBogus())&&L.remove();G.moveToPosition(P,CKEDITOR.POSITION_BEFORE_END)}if((H=G.startPath().block)&&!H.equals(J)){if(L=H.getBogus()){L.remove();E.push(H)}J=H}F.firstNotAllowed&&(v=1);if(v&&F.isElement){H=G.startContainer;for(M=null;H&&!h[H.getName()][F.name];){if(H.equals(s)){H=null;break}M=H;H=H.getParent()}if(H){if(M){Q=G.splitElement(M);t.zombies.push(Q);t.zombies.push(M)}}else{M=s.getName();R=!C;H=C== +D.length-1;M=e(F.node,M);for(var N=[],U=M.length,T=0,V=void 0,W=0,S=-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 f,i,c=CKEDITOR.dom.walker.invisible(1);CKEDITOR.on("instanceCreated",function(a){function c(){var a=f.getSelection();a&&a.removeAllRanges()}var f=a.editor;f.define("selectionChange",{errorProof:1});f.on("contentDom",function(){var a=f.document,c=CKEDITOR.document,e=f.editable(),i=a.getBody(),h=a.getDocumentElement(),l=e.isInline(),m;CKEDITOR.env.gecko&&e.attachListener(e,"focus",function(a){a.removeListener(); +if(m!==0){a=f.getSelection().getNative();if(a.isCollapsed&&a.anchorNode==e.$){a=f.createRange();a.moveToElementEditStart(e);a.select()}}},null,null,-2);e.attachListener(e,"focus",function(){f.unlockSelection(m);m=0},null,null,-1);e.attachListener(e,"mousedown",function(){m=0});if(CKEDITOR.env.ie||CKEDITOR.env.opera||l){var n,w=function(){n=f.getSelection(1);n.lock()};j?e.attachListener(e,"beforedeactivate",w,null,null,-1):e.attachListener(f,"selectionCheck",w,null,null,-1);e.attachListener(e,"blur", +function(){f.lockSelection(n);m=1},null,null,-1)}if(CKEDITOR.env.ie&&!l){var s;e.attachListener(e,"mousedown",function(a){a.data.$.button==2&&f.document.$.selection.type=="None"&&(s=f.window.getScrollPosition())});e.attachListener(e,"mouseup",function(a){if(a.data.$.button==2&&s){f.document.$.documentElement.scrollLeft=s.x;f.document.$.documentElement.scrollTop=s.y}s=null});if(a.$.compatMode!="BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)h.on("mousedown",function(a){function b(a){a= +a.data.$;if(e){var c=i.$.createTextRange();try{c.moveToPoint(a.x,a.y)}catch(f){}e.setEndPoint(g.compareEndPoints("StartToStart",c)<0?"EndToEnd":"StartToStart",c);e.select()}}function f(){h.removeListener("mousemove",b);c.removeListener("mouseup",f);h.removeListener("mouseup",f);e.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y7){h.on("mousedown",function(a){if(a.data.getTarget().is("html")){c.on("mouseup",v);h.on("mouseup",v)}});var v=function(){c.removeListener("mouseup",v);h.removeListener("mouseup",v);var b=CKEDITOR.document.$.selection,f=b.createRange();b.type!="None"&&f.parentElement().ownerDocument==a.$&&f.select()}}}}e.attachListener(e,"selectionchange",b,f);e.attachListener(e,"keyup",d,f);e.attachListener(e,"focus",function(){f.forceNextSelectionCheck();f.selectionChange(1)}); +if(l?CKEDITOR.env.webkit||CKEDITOR.env.gecko:CKEDITOR.env.opera){var A;e.attachListener(e,"mousedown",function(){A=1});e.attachListener(a.getDocumentElement(),"mouseup",function(){A&&d.call(f);A=0})}else e.attachListener(CKEDITOR.env.ie?e:a.getDocumentElement(),"mouseup",d,f);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:g(f.editable())}},null,null,-1)});f.on("contentDomUnload",f.forceNextSelectionCheck, +f);f.on("dataReady",function(){f.selectionChange(1)});CKEDITOR.env.ie9Compat&&f.on("beforeDestroy",c,null,null,9);CKEDITOR.env.webkit&&f.on("setData",c);f.on("contentDomUnload",function(){f.unlockSelection()})});CKEDITOR.on("instanceReady",function(a){var b=a.editor,c=b.editable();if(CKEDITOR.env.webkit){b.on("selectionChange",function(){var a=h(c);a&&(a.getCustomData("ready")?g(c):a.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){g(c)},null,null,-1);var f,e,a=function(){var a= +b.document,d=h(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=h(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:d).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 d=new CKEDITOR.dom.range(this.root);d.moveToPosition(this.root,CKEDITOR.POSITION_AFTER_START);b=this.document.$.createRange();b.setStart(d.startContainer.$, -d.startOffset);b.collapse(1);a.addRange(b)}}var a=this.getNative(),c;if(a)if(a.getRangeAt)c=(d=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(d.commonAncestorContainer);else{try{d=a.createRange()}catch(e){}c=d&&CKEDITOR.dom.element.get(d.item&&d.item(0)||d.parentElement())}if(!c||!this.root.equals(c)&&!this.root.contains(c)){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 d=this.getNative(),c=d.type;if(c=="Text")b= -CKEDITOR.SELECTION_TEXT;if(c=="Control")b=CKEDITOR.SELECTION_ELEMENT;if(d.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,d=this.getNative();if(!d||!d.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(d.rangeCount==1){var d=d.getRangeAt(0),c=d.startContainer;if(c==d.endContainer&&c.nodeType==1&&d.endOffset-d.startOffset==1&&k[c.childNodes[d.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,d){b=b.duplicate();b.collapse(d);var c=b.parentElement(),e=c.ownerDocument;if(!c.hasChildNodes())return{container:c,offset:0};for(var g=c.children,f,j,h=b.duplicate(),i=0,k=g.length-1,l=-1,o,A;i<=k;){l=Math.floor((i+k)/2);f=g[l];h.moveToElementText(f);o=h.compareEndPoints("StartToStart",b);if(o>0)k=l-1;else if(o<0)i=l+1;else{if(CKEDITOR.env.ie9Compat&&f.tagName=="BR"){g=e.defaultView.getSelection(); -return{container:g[d?"anchorNode":"focusNode"],offset:g[d?"anchorOffset":"focusOffset"]}}return{container:c,offset:a(f)}}}if(l==-1||l==g.length-1&&o<0){h.moveToElementText(c);h.setEndPoint("StartToStart",b);e=h.text.replace(/(\r\n|\r)/g,"\n").length;g=c.childNodes;if(!e){f=g[g.length-1];return f.nodeType!=CKEDITOR.NODE_TEXT?{container:c,offset:g.length}:{container:f,offset:f.nodeValue.length}}for(c=g.length;e>0&&c>0;){j=g[--c];if(j.nodeType==CKEDITOR.NODE_TEXT){A=j;e=e-j.nodeValue.length}}return{container:A, -offset:-e}}h.collapse(o>0?true:false);h.setEndPoint(o>0?"StartToStart":"EndToStart",b);e=h.text.replace(/(\r\n|\r)/g,"\n").length;if(!e)return{container:c,offset:a(f)+(o>0?0:1)};for(;e>0;)try{j=f[o>0?"previousSibling":"nextSibling"];if(j.nodeType==CKEDITOR.NODE_TEXT){e=e-j.nodeValue.length;A=j}f=j}catch(y){return{container:c,offset:a(f)}}return{container:A,offset:o>0?-e:A.nodeValue.length+e}};return function(){var a=this.getNative(),d=a&&a.createRange(),c=this.getType();if(!a)return[];if(c==CKEDITOR.SELECTION_TEXT){a= -new CKEDITOR.dom.range(this.root);c=b(d,true);a.setStart(new CKEDITOR.dom.node(c.container),c.offset);c=b(d);a.setEnd(new CKEDITOR.dom.node(c.container),c.offset);a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse();return[a]}if(c==CKEDITOR.SELECTION_ELEMENT){for(var c=[],e=0;e=b.getLength()?i.setStartAfter(b):i.setStartBefore(b));f&& -f.type==CKEDITOR.NODE_TEXT&&(h?i.setEndAfter(f):i.setEndBefore(f));b=new CKEDITOR.dom.walker(i);b.evaluator=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&a.isReadOnly()){var b=g.clone();g.setEndBefore(a);g.collapsed&&c.splice(e--,1);if(!(a.getPosition(i.endContainer)&CKEDITOR.POSITION_CONTAINS)){b.setStartAfter(a);b.collapsed||c.splice(e+1,0,b)}return true}return false};b.next()}}return d.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 d=this.getRanges()[0];if(d){if(d.collapsed){b=d.startContainer;b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent())}else{for(d.optimize();;){b=d.startContainer;if(d.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary())d.setStartAfter(b);else break}b=d.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();b=b.getChild(d.startOffset);if(!b|| -b.type!=CKEDITOR.NODE_ELEMENT)b=d.startContainer;else for(d=b.getFirst();d&&d.type==CKEDITOR.NODE_ELEMENT;){b=d;d=d.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,d=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0],d,c,e=2;e&&(!(d=a.getEnclosedNode())||!(d.type==CKEDITOR.NODE_ELEMENT&&k[d.getName()]&& -(c=d)));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return c.$});return a.selectedElement=d?new CKEDITOR.dom.element(d):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(),d=!b&&this.getRanges();this.isLocked=0;this.reset();if(a)(a=b||d[0].getCommonAncestor())&&a.getAscendant("body",1)&&(b?this.selectElement(b):this.selectRanges(d))}},reset:function(){this._.cache={};this.isFake=0;this.root.editor&&delete this.root.editor._.fakeSelection},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){this.reset();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 d=CKEDITOR.dom.walker.whitespaces(true),c=/\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,q,w=b.getEnclosedNode();if(w&&w.type==CKEDITOR.NODE_ELEMENT&&w.getName()in k&&(!w.is("a")||!w.getText()))try{q=w.$.createControlRange();q.addElement(w.$);q.select();return}catch(x){}(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);q=b.createBookmark();var e=q.startNode,t;if(!a)t=q.endNode;q=b.document.$.body.createTextRange();q.moveToElementText(e.$);q.moveStart("character",1);if(t){c=b.document.$.body.createTextRange();c.moveToElementText(t.$);q.setEndPoint("EndToEnd",c);q.moveEnd("character",-1)}else{g=e.getNext(d);i=e.hasAscendant("pre");g=!(g&&g.getText&&g.getText().match(c))&& -(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){q.moveStart("character",-1);q.select();b.document.$.selection.clear()}else q.select();b.moveToPosition(i,CKEDITOR.POSITION_BEFORE_START);i.remove()}else{b.setEndBefore(t);t.remove();q.select()}}else{t=this.getNative();if(!t)return;if(CKEDITOR.env.opera){b=this.document.$.createRange(); -b.selectNodeContents(this.root.$);t.addRange(b)}this.removeAllRanges();for(c=0;c=0){b.collapse(1);q.setEnd(b.endContainer.$,b.endOffset)}else throw n;}t.addRange(q)}}this.reset();this.root.fire("selectionchange")}},fake:function(a){var b=this._.cache;delete b.nativeSel;var d=this.getNative();d.removeAllRanges&& -d.removeAllRanges()||d.empty&&d.empty();d=new CKEDITOR.dom.range(a.getDocument());d.setStartBefore(a);d.setEndAfter(a);b.ranges=new CKEDITOR.dom.rangeList(d);b.selectedElement=b.startElement=a;b.type=CKEDITOR.SELECTION_ELEMENT;b.selectedText=b.nativeSel=null;this.isFake=1;this.root.editor._.fakeSelection=this;this.root.fire("selectionchange")},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a); -this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b=[],d=0;d]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+| )/g," ");f=f.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var i=a.getDocument().createElement("div");i.append(g);g.$.outerHTML="
"+f+"
";g.copyAttributes(i.getFirst());g=i.getFirst().remove()}else g.setHtml(f);b=g}else f?b=k(c?[a.getHtml()]:d(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&&p(b)}function d(a){a.getName();var b=[];j(a.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,d){return b+"
"+d+"
"}).replace(/([\s\S]*?)<\/pre>/gi,function(a,d){b.push(d)});return b}function j(a,b,d){var c="",e="",a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,
-b,d){b&&(c=b);d&&(e=d);return""});return c+a.replace(b,d)+e}function k(a,b){var d;a.length>1&&(d=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var c=0;c"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat(" ",
-a.length-1)+" "});if(d){var g=b.clone();g.setHtml(e);d.append(g)}else b.setHtml(e)}return d||b}function l(a){var b=this._.definition,d=b.attributes,b=b.styles,c=q(this)[a.getName()],e=CKEDITOR.tools.isEmpty(d)&&CKEDITOR.tools.isEmpty(b),g;for(g in d)if(!((g=="class"||this._.definition.fullMatch)&&a.getAttribute(g)!=w(g,d[g]))){e=a.hasAttribute(g);a.removeAttribute(g)}for(var f in b)if(!(this._.definition.fullMatch&&a.getStyle(f)!=w(f,b[f],true))){e=e||!!a.getStyle(f);a.removeStyle(f)}o(a,c,t[a.getName()]);
-e&&(this._.definition.alwaysRemoveElement?p(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?p(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function m(a){for(var b=q(this),d=a.getElementsByTag(this.element),c=d.count();--c>=0;)l.call(this,d.getItem(c));for(var e in b)if(e!=this.element){d=a.getElementsByTag(e);for(c=d.count()-1;c>=0;c--){var g=d.getItem(c);o(g,b[e])}}}function o(a,b,d){if(b=b&&b.attributes)for(var c=0;c",a||b.name,"");return d.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;
-if(b)return b;var b=a.styles,d=a.attributes&&a.attributes.style||"",c="";d.length&&(d=d.replace(B,";"));for(var e in b){var g=b[e],f=(e+":"+g).replace(B,";");g=="inherit"?c=c+f:d=d+f}d.length&&(d=CKEDITOR.tools.normalizeCssText(d,true));return a._ST=d+c}}(),CKEDITOR.styleCommand=function(b){this.requiredContent=this.allowedContent=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(":"),f=a[0];CKEDITOR.stylesSet.addExternal(f,a[1]?a.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(f,function(a){c._.stylesDefinitions=a[f];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,i){var h=null,e=null,g=[],i=i||c.getDocument().getBody(),d=c;do if(d.type==CKEDITOR.NODE_ELEMENT){g.push(d);if(!this.lastElement){this.lastElement=d;if(d.is(CKEDITOR.dtd.$object))continue}var j=d.getName();if(!e){!h&&a[j]&&(h=d);if(b[j]){var k;
-if(k=!h){if(j=j=="div"){a:{j=d.getChildren();k=0;for(var l=j.count();k-1}:typeof b=="function"?f=b:typeof b=="object"&&(f=function(a){return a.getName()in b});var i=this.elements,h=i.length;c&&h--;if(a){i=Array.prototype.slice.call(i,0);i.reverse()}for(c=0;c=f){h=i.createText("");h.insertAfter(this)}else{b=i.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"],g=c?"endOffset":"startOffset",d=h?b.document.getById(a.startNode):a.startNode,a=h?b.document.getById(a.endNode):a.endNode;if(e.equals(d.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(d.getParent())&&b[g]++;e.equals(a.getParent())&&b[g]++;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 g=a[h];if(g&&a.length>1){if(!h)for(var d=a.length-1;d>=0;d--)c.unshift(a[d].createBookmark(true));if(e)for(var j=0;a[h+j+1];){for(var k=g.document,e=0,d=k.getById(c[j].endNode),k=k.getById(c[j+1].startNode);;){d=
-d.getNextSourceNode(false);if(k.equals(d))e=1;else if(b(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary())continue;break}if(!e)break;j++}for(g.moveToBookmark(c.shift());j--;){d=a[++h];d.moveToBookmark(c.shift());g.setEnd(d.endContainer,d.endOffset)}}return g}}},createBookmarks:function(a){for(var c=[],i,h=0;hb?-1:1}),e=0,g;e',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;a0)l=m-1;else if(o<0)j=m+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(m==-1||m==d.length-1&&o<0){h.moveToElementText(f);h.setEndPoint("StartToStart",b);e=h.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;){i=d[--f];if(i.nodeType==CKEDITOR.NODE_TEXT){B=i;e=e-i.nodeValue.length}}return{container:B,offset:-e}}h.collapse(o>0?true:false);h.setEndPoint(o>0?"StartToStart":"EndToStart",b);e=h.text.replace(/(\r\n|\r)/g,"\n").length;if(!e)return{container:f,offset:a(g)+(o>0?0:1)};for(;e>0;)try{i=g[o>0?"previousSibling":"nextSibling"];if(i.nodeType==CKEDITOR.NODE_TEXT){e=e-i.nodeValue.length;B=i}g=i}catch(y){return{container:f,offset:a(g)}}return{container:B,offset:o>0?-e:B.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&&(h?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&&l[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]&&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/,d={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,i,h,t,z=b.getEnclosedNode();if(z&&z.type==CKEDITOR.NODE_ELEMENT&&z.getName()in l&&(!z.is("a")||!z.getText()))try{t=z.$.createControlRange();t.addElement(z.$);t.select();return}catch(x){}(b.startContainer.type==
+CKEDITOR.NODE_ELEMENT&&b.startContainer.getName()in d||b.endContainer.type==CKEDITOR.NODE_ELEMENT&&b.endContainer.getName()in d)&&b.shrink(CKEDITOR.NODE_ELEMENT,true);t=b.createBookmark();var d=t.startNode,u;if(!a)u=t.endNode;t=b.document.$.body.createTextRange();t.moveToElementText(d.$);t.moveStart("character",1);if(u){f=b.document.$.body.createTextRange();f.moveToElementText(u.$);t.setEndPoint("EndToEnd",f);t.moveEnd("character",-1)}else{i=d.getNext(c);h=d.hasAscendant("pre");i=!(i&&i.getText&&
+i.getText().match(f))&&(h||!d.hasPrevious()||d.getPrevious().is&&d.getPrevious().is("br"));h=b.document.createElement("span");h.setHtml("");h.insertBefore(d);i&&b.document.createText("").insertBefore(d)}b.setStartBefore(d);d.remove();if(a){if(i){t.moveStart("character",-1);t.select();b.document.$.selection.clear()}else t.select();b.moveToPosition(h,CKEDITOR.POSITION_BEFORE_START);h.remove()}else{b.setEndBefore(u);u.remove();t.select()}}else{u=this.getNative();if(!u)return;if(CKEDITOR.env.opera){b=
+this.document.$.createRange();b.selectNodeContents(this.root.$);u.addRange(b)}this.removeAllRanges();for(f=0;f=0){b.collapse(1);t.setEnd(b.endContainer.$,b.endOffset)}else throw w;}u.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=l(f?[a.getHtml()]:c(a),b):a.moveChildren(b);b.replace(a);if(e){var f=b,h;if((h=f.getPrevious(B))&&h.is&&h.is("pre")){e=j(h.getHtml(),/\n$/,"")+"\n\n"+j(f.getHtml(),/^\n/,"");CKEDITOR.env.ie?f.$.outerHTML="
"+e+"
":f.setHtml(e);h.remove()}}else f&&k(b)}function c(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 l(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 m(a){var b=this._.definition,c=b.attributes,b=b.styles,f=t(this)[a.getName()],e=CKEDITOR.tools.isEmpty(c)&&CKEDITOR.tools.isEmpty(b),
+d;for(d in c)if(!((d=="class"||this._.definition.fullMatch)&&a.getAttribute(d)!=z(d,c[d]))){e=a.hasAttribute(d);a.removeAttribute(d)}for(var g in b)if(!(this._.definition.fullMatch&&a.getStyle(g)!=z(g,b[g],true))){e=e||!!a.getStyle(g);a.removeStyle(g)}o(a,f,u[a.getName()]);e&&(this._.definition.alwaysRemoveElement?k(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?k(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function n(a){for(var b=
+t(this),c=a.getElementsByTag(this.element),f=c.count();--f>=0;)m.call(this,c.getItem(f));for(var e in b)if(e!=this.element){c=a.getElementsByTag(e);for(f=c.count()-1;f>=0;f--){var d=c.getItem(f);o(d,b[e])}}}function o(a,b,c){if(b=b&&b.attributes)for(var f=0;f",a||b.name,"");return c.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,c=a.attributes&&a.attributes.style||"",f="";c.length&&(c=c.replace(s,";"));for(var e in b){var d=b[e],g=(e+":"+d).replace(s,";");d=="inherit"?f=f+g:c=c+g}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,true));return a._ST=c+f}}(),CKEDITOR.styleCommand=function(b,d){this.requiredContent=this.allowedContent=
+this.style=b;CKEDITOR.tools.extend(this,d,true)},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,d,a){CKEDITOR.stylesSet.addExternal(b,d,"");CKEDITOR.stylesSet.load(b,a)},CKEDITOR.editor.prototype.getStylesSet=
+function(b){if(this._.stylesDefinitions)b(this._.stylesDefinitions);else{var d=this,a=d.config.stylesCombo_stylesSet||d.config.stylesSet;if(a===false)b(null);else if(a instanceof Array){d._.stylesDefinitions=a;b(a)}else{a||(a="default");var a=a.split(":"),e=a[0];CKEDITOR.stylesSet.addExternal(e,a[1]?a.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(e,function(a){d._.stylesDefinitions=a[e];b(d._.stylesDefinitions)})}}},CKEDITOR.dom.comment=function(b,d){typeof b=="string"&&
+(b=(d?d.$: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={},d;for(d in CKEDITOR.dtd.$blockLimit)d in CKEDITOR.dtd.$list||(b[d]=1);var a={};for(d in CKEDITOR.dtd.$block)d in CKEDITOR.dtd.$blockLimit||d in CKEDITOR.dtd.$empty||(a[d]=1);CKEDITOR.dom.elementPath=function(e,
+d){var g=null,f=null,i=[],d=d||e.getDocument().getBody(),c=e;do if(c.type==CKEDITOR.NODE_ELEMENT){i.push(c);if(!this.lastElement){this.lastElement=c;if(c.is(CKEDITOR.dtd.$object))continue}var j=c.getName();if(!f){!g&&a[j]&&(g=c);if(b[j]){var l;if(l=!g){if(j=j=="div"){a:{j=c.getChildren();l=0;for(var m=j.count();l
+-1}:typeof b=="function"?e=b:typeof b=="object"&&(e=function(a){return a.getName()in b});var h=this.elements,g=h.length;d&&g--;if(a){h=Array.prototype.slice.call(h,0);h.reverse()}for(d=0;d=e){g=h.createText("");g.insertAfter(this)}else{b=h.createText("");b.insertAfter(g);b.remove()}return g},substring:function(b,d){return typeof d!="number"?this.$.nodeValue.substr(b):this.$.nodeValue.substring(b,d)}}),function(){function b(a,b,d){var g=a.serializable,f=b[d?"endContainer":"startContainer"],i=d?"endOffset":"startOffset",c=g?b.document.getById(a.startNode):a.startNode,a=g?b.document.getById(a.endNode):a.endNode;if(f.equals(c.getPrevious())){b.startOffset=
+b.startOffset-f.getLength()-a.getPrevious().getLength();f=a.getNext()}else if(f.equals(a.getPrevious())){b.startOffset=b.startOffset-f.getLength();f=a.getNext()}f.equals(c.getParent())&&b[i]++;f.equals(a.getParent())&&b[i]++;b[d?"endContainer":"startContainer"]=f;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,d)};var d={createIterator:function(){var a=this,b=CKEDITOR.dom.walker.bookmark(),
+d=[],g;return{getNextRange:function(f){g=g==void 0?0:g+1;var i=a[g];if(i&&a.length>1){if(!g)for(var c=a.length-1;c>=0;c--)d.unshift(a[c].createBookmark(true));if(f)for(var j=0;a[g+j+1];){for(var l=i.document,f=0,c=l.getById(d[j].endNode),l=l.getById(d[j+1].startNode);;){c=c.getNextSourceNode(false);if(l.equals(c))f=1;else if(b(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary())continue;break}if(!f)break;j++}for(i.moveToBookmark(d.shift());j--;){c=a[++g];c.moveToBookmark(d.shift());i.setEnd(c.endContainer,
+c.endOffset)}}return i}}},createBookmarks:function(a){for(var e=[],d,g=0;gb?-1:1}),e=0,d;e',
+CKEDITOR.document);b.appendTo(CKEDITOR.document.getHead());try{CKEDITOR.env.hc=b.getComputedStyle("border-top-color")==b.getComputedStyle("border-right-color")}catch(d){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",d.label,"",'");else{c={type:"hbox",widths:d.widths,padding:0,children:[{type:"html",html:'",'");else{f={type:"hbox",widths:c.widths,padding:0,children:[{type:"html",html:'