From 75e266c2f692f8cd1b274249ad657e07bc9072aa Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Wed, 24 Jun 2015 21:48:39 -0400 Subject: [PATCH] vanilla ckeditor-4.4.1_full --- CHANGES.md | 39 +++ ckeditor.js | 463 ++++++++++++++++---------------- contents.css | 7 +- lang/eo.js | 2 +- lang/fa.js | 2 +- lang/km.js | 2 +- lang/tt.js | 2 +- plugins/a11yhelp/dialogs/lang/eo.js | 9 +- plugins/a11yhelp/dialogs/lang/nb.js | 7 +- plugins/a11yhelp/dialogs/lang/pt-br.js | 4 +- plugins/a11yhelp/dialogs/lang/tt.js | 2 +- plugins/a11yhelp/dialogs/lang/vi.js | 4 +- plugins/link/dialogs/link.js | 42 +-- plugins/specialchar/dialogs/lang/ar.js | 2 +- plugins/specialchar/dialogs/lang/tt.js | 18 +- samples/jquery.html | 2 +- samples/sample.css | 41 +-- 17 files changed, 352 insertions(+), 296 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 6cc073f..1813459 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,45 @@ CKEditor 4 Changelog ==================== +## CKEditor 4.4.1 + +New Features: + +* [#9661](http://dev.ckeditor.com/ticket/9661): Added the option to [configure](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-linkJavaScriptLinksAllowed) anchor tags with JavaScript code in `href` attribute. + +Fixed Issues: + +* [#11861](http://dev.ckeditor.com/ticket/11861): Fixed: [Webkit/Blink] Span elements created while joining adjacent elements. **Note:** This patch only covers cases when *Backspace* or *Delete* is pressed on a collapsed (empty) selection. The remaining case, with a non-empty selection, will be fixed in next release. +* [#10714](http://dev.ckeditor.com/ticket/10714): Fixed: [iOS] Selection and drop-downs are broken if touch listener is used due to [Webkit bug](https://bugs.webkit.org/show_bug.cgi?id=128924). Thanks to [Arty Gus](https://github.com/artygus)! +* [#11911](http://dev.ckeditor.com/ticket/11911): Fixed setting the `dir` attribute for preloaded language in [CKEDITOR.lang](http://docs.ckeditor.com/#!/api/CKEDITOR.lang). Thanks to [Akash Mohapatra](https://github.com/akashmohapatra)! +* [#11926](http://dev.ckeditor.com/ticket/11926): Fixed: Code snippet does not decode HTML entities when loading code from the `` element. +* [#11223](http://dev.ckeditor.com/ticket/11223): Fixed: Issue when [Protected Source](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-protectedSource) was not working in the title element. +* [#11859](http://dev.ckeditor.com/ticket/11859): Fixed: Removed [Source Dialog](http://ckeditor.com/addon/sourcedialog) plugin from being required in [Code Snippet](http://ckeditor.com/addon/codesnippet) sample. +* [#11754](http://dev.ckeditor.com/ticket/11754): Fixed: Infinite loop in Google Chrome when content contains not closed attributes. +* [#11848](http://dev.ckeditor.com/ticket/11848): Fixed: [`editor.insertElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertElement) throwing an exception in IE when there was no selection in editor. +* [#11801](http://dev.ckeditor.com/ticket/11801): Fixed: Editor anchors unavailable when linking [Enhanced Image](http://ckeditor.com/addon/image2) widget. +* [#11626](http://dev.ckeditor.com/ticket/11626): Fixed: [Table Resize](http://ckeditor.com/addon/tableresize) sets invalid width. +* [#11872](http://dev.ckeditor.com/ticket/11872): Made [`element.addClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-addClass) chainable symmetrically to [`element.removeClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-removeClass). +* [#11813](http://dev.ckeditor.com/ticket/11813): Fixed: Link lost while pasting captioned image and restoring undo snapshot ([Enhanced Image](http://ckeditor.com/addon/image2)). +* [#11814](http://dev.ckeditor.com/ticket/11814): Fixed: _Link_ and _Unlink_ entries persistently displayed in [Enhanced Image](http://ckeditor.com/addon/image2) context menu. +* [#11839](http://dev.ckeditor.com/ticket/11839): Fixed: [IE9] Caret jumps out of editable area when resizing editor in source mode. +* [#11822](http://dev.ckeditor.com/ticket/11822): Fixed: [Webkit] Editing Anchors by double-click broken in some cases. +* [#11823](http://dev.ckeditor.com/ticket/11823): Fixed: [IE8] [Table Resize](http://ckeditor.com/addon/tableresize) throws error over scrollbar. +* [#11788](http://dev.ckeditor.com/ticket/11788): Fixed: It is not possible to change language back to _Not set_ in [Code Snippet](http://ckeditor.com/addon/codesnippet) dialog. +* [#11788](http://dev.ckeditor.com/ticket/11788): Fixed: [Filter](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter) rules are not applied inside elements with `contenteditable` attribute set to `true`. +* [#11798](http://dev.ckeditor.com/ticket/11798): Fixed: Inserting non-editable element inside a table cell breaks the table badly. +* [#11793](http://dev.ckeditor.com/ticket/11793): Fixed: Drop-down is not "on" when clicking it while editor is blurred. +* [#11850](http://dev.ckeditor.com/ticket/11850): Fixed: Fake objects with contenteditable set to `false` are not downcasted properly. +* [#11811](http://dev.ckeditor.com/ticket/11811): Fixed: Widget's data are not encoded correctly when passed to attribute. +* [#11777](http://dev.ckeditor.com/ticket/11777): Fixed encoding ampersand in the [Mathematical Formulas](http://ckeditor.com/addon/mathjax) plugin. +* [#11880](http://dev.ckeditor.com/ticket/11880): Fixed: [IE8-9] Linked image has a default thick border. + +Other changes: + +* [#11807](http://dev.ckeditor.com/ticket/11807): Updated jQuery version used in sample to 1.11.0 and tested CKEditor jQuery adapter with version 1.11.0 and 2.1.0. +* [#9504](http://dev.ckeditor.com/ticket/9504): Stopped using deprecated attribute.specified in all browsers except IE. +* [#11809](http://dev.ckeditor.com/ticket/11809): Changed tab size in `
` to 4 spaces.
+
 ## CKEditor 4.4
 
 **Important Notes:**
diff --git a/ckeditor.js b/ckeditor.js
index 10bd564..1584acc 100644
--- a/ckeditor.js
+++ b/ckeditor.js
@@ -2,14 +2,14 @@
 Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
-(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a={timestamp:"E3OD",version:"4.4.0",revision:"98daef5",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var d=document.getElementsByTagName("script"),f=0;f=0;q--)if(o[q].priority<=n){o.splice(q+1,0,i);return{removeListener:k}}o.unshift(i)}return{removeListener:k}},
-once:function(){var a=arguments[1];arguments[1]=function(d){d.removeListener();return a.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,d=function(){a=1},f=0,b=function(){f=1};return function(n,i,k){var o=e(this)[n],n=a,s=f;a=f=0;if(o){var q=o.listeners;if(q.length)for(var q=q.slice(0),u,g=0;g=0&&f.listeners.splice(b,1)}},removeAllListeners:function(){var a=e(this),d;for(d in a)delete a[d]},hasListeners:function(a){return(a=e(this)[a])&&a.listeners.length>0}}}());
+return{define:function(b,d){var f=a.call(this,b);CKEDITOR.tools.extend(f,d,true)},on:function(b,d,f,e,n){function i(a,o,s,r){a={name:b,sender:this,editor:a,data:o,listenerData:e,stop:s,cancel:r,removeListener:k};return d.call(f,a)===false?false:a.data}function k(){s.removeListener(b,d)}var o=a.call(this,b);if(o.getListenerIndex(d)<0){o=o.listeners;f||(f=this);isNaN(n)&&(n=10);var s=this;i.fn=d;i.priority=n;for(var r=o.length-1;r>=0;r--)if(o[r].priority<=n){o.splice(r+1,0,i);return{removeListener:k}}o.unshift(i)}return{removeListener:k}},
+once:function(){var a=arguments[1];arguments[1]=function(d){d.removeListener();return a.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,d=function(){a=1},f=0,b=function(){f=1};return function(n,i,k){var o=e(this)[n],n=a,s=f;a=f=0;if(o){var r=o.listeners;if(r.length)for(var r=r.slice(0),v,g=0;g=0&&f.listeners.splice(b,1)}},removeAllListeners:function(){var a=e(this),d;for(d in a)delete a[d]},hasListeners:function(a){return(a=e(this)[a])&&a.listeners.length>0}}}());
 CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,e,this)},CKEDITOR.editor.prototype.fireOnce=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,e,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype));
 CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),e={ie:a.indexOf("trident/")>-1,webkit:a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10),mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var a=document.domain,f=window.location.hostname;return a!=f&&a!="["+f+"]"},secure:location.protocol==
 "https:"};e.gecko=navigator.product=="Gecko"&&!e.webkit&&!e.ie;if(e.webkit)a.indexOf("chrome")>-1?e.chrome=true:e.safari=true;var b=0;if(e.ie){b=e.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;e.ie9Compat=b==9;e.ie8Compat=b==8;e.ie7Compat=b==7;e.ie6Compat=b<7||e.quirks}if(e.gecko){var c=a.match(/rv:([\d\.]+)/);if(c){c=c[1].split(".");b=c[0]*1E4+(c[1]||0)*100+(c[2]||0)*1}}e.air&&(b=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));e.webkit&&(b=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));
@@ -73,7 +73,7 @@ CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node;CKEDITOR.dom.element.create
 CKEDITOR.dom.element.setMarker=function(a,e,b,c){var d=e.getCustomData("list_marker_id")||e.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),f=e.getCustomData("list_marker_names")||e.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[d]=e;f[b]=1;return e.setCustomData(b,c)};CKEDITOR.dom.element.clearAllMarkers=function(a){for(var e in a)CKEDITOR.dom.element.clearMarkers(a,a[e],1)};
 CKEDITOR.dom.element.clearMarkers=function(a,e,b){var c=e.getCustomData("list_marker_names"),d=e.getCustomData("list_marker_id"),f;for(f in c)e.removeCustomData(f);e.removeCustomData("list_marker_names");if(b){e.removeCustomData("list_marker_id");delete a[d]}};
 (function(){function a(a){var f=true;if(!a.$.id){a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber();f=false}return function(){f||a.removeAttribute("id")}}function e(a,f){return"#"+a.$.id+" "+f.split(/,\s*/).join(", #"+a.$.id+" ")}function b(a){for(var f=0,b=0,e=c[a].length;b]*>/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&&
@@ -87,43 +87,44 @@ a)return true;return false},isEditable:function(a){var f=this.getName();if(this.
 "data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);a.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(f.$.isEqualNode){f.$.style.cssText=CKEDITOR.tools.normalizeCssText(f.$.style.cssText);a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText);return f.$.isEqualNode(a.$)}f=f.getOuterHtml();a=a.getOuterHtml();if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&this.is("a")){var b=this.getParent();if(b.type==CKEDITOR.NODE_ELEMENT){b=
 b.clone();b.setHtml(f);f=b.getHtml();b.setHtml(a);a=b.getHtml()}}return f==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&this.getComputedStyle("visibility")!="hidden",f,b;if(a&&CKEDITOR.env.webkit){f=this.getWindow();if(!f.equals(CKEDITOR.document.getWindow())&&(b=f.$.frameElement))a=(new CKEDITOR.dom.element(b)).isVisible()}return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return false;for(var a=this.getChildren(),f=0,b=a.count();f<
 b;f++){var c=a.getItem(f);if(!(c.type==CKEDITOR.NODE_ELEMENT&&c.data("cke-bookmark"))&&(c.type==CKEDITOR.NODE_ELEMENT&&!c.isEmptyInlineRemoveable()||c.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(c.getText())))return false}return true},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var a=this.$.attributes,f=0;f0&&(f>2||!b[a[0].nodeName]||f==2&&!b[a[1].nodeName])},hasAttribute:function(){function a(d){d=this.$.attributes.getNamedItem(d);return!(!d||!d.specified)}return CKEDITOR.env.ie&&CKEDITOR.env.version<8?function(f){return f=="name"?!!this.$.name:a.call(this,f)}:a}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,f){var b=this.$,a=a.$;if(b!=a){var c;if(f)for(;c=b.lastChild;)a.insertBefore(b.removeChild(c),
-a.firstChild);else for(;c=b.firstChild;)a.appendChild(b.removeChild(c))}},mergeSiblings:function(){function a(d,b,c){if(b&&b.type==CKEDITOR.NODE_ELEMENT){for(var e=[];b.data("cke-bookmark")||b.isEmptyInlineRemoveable();){e.push(b);b=c?b.getNext():b.getPrevious();if(!b||b.type!=CKEDITOR.NODE_ELEMENT)return}if(d.isIdentical(b)){for(var k=c?d.getLast():d.getFirst();e.length;)e.shift().move(d,!c);b.moveChildren(d,!c);b.remove();k&&k.type==CKEDITOR.NODE_ELEMENT&&k.mergeSiblings()}}}return function(f){if(f===
-false||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a")){a(this,this.getNext(),true);a(this,this.getPrevious())}}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var a=function(a,d){this.$.setAttribute(a,d);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(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(e){}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.quirks)?
-function(a){a=="class"?a="className":a=="tabindex"?a="tabIndex":a=="contenteditable"&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var 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){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),c=0,e=b.count();c0)s(0,b===true?o:b===false?i:o<0?o:i);if(c&&(k<0||e>0))s(k<0?k:e,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||{},e=0;e=
-0&&d0&&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},find:function(b){var f=a(this),b=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(e(this,b)));f();return b},
-findOne:function(b){var f=a(this),b=this.$.querySelector(e(this,b));f();return b?new CKEDITOR.dom.element(b):null},forEach:function(a,b,c){if(!c&&(!b||this.type==b))var e=a(this);if(e!==false)for(var c=this.getChildren(),i=0;i0&&(f>2||!b[a[0].nodeName]||f==2&&!b[a[1].nodeName])},hasAttribute:function(){function a(d){return(d=this.$.attributes.getNamedItem(d))?CKEDITOR.env.ie?d.specified:true:false}return CKEDITOR.env.ie&&CKEDITOR.env.version<8?function(f){return f=="name"?!!this.$.name:a.call(this,f)}:a}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,f){var b=this.$,a=a.$;if(b!=a){var c;if(f)for(;c=
+b.lastChild;)a.insertBefore(b.removeChild(c),a.firstChild);else for(;c=b.firstChild;)a.appendChild(b.removeChild(c))}},mergeSiblings:function(){function a(d,b,c){if(b&&b.type==CKEDITOR.NODE_ELEMENT){for(var e=[];b.data("cke-bookmark")||b.isEmptyInlineRemoveable();){e.push(b);b=c?b.getNext():b.getPrevious();if(!b||b.type!=CKEDITOR.NODE_ELEMENT)return}if(d.isIdentical(b)){for(var k=c?d.getLast():d.getFirst();e.length;)e.shift().move(d,!c);b.moveChildren(d,!c);b.remove();k&&k.type==CKEDITOR.NODE_ELEMENT&&
+k.mergeSiblings()}}}return function(f){if(f===false||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a")){a(this,this.getNext(),true);a(this,this.getPrevious())}}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var a=function(a,d){this.$.setAttribute(a,d);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(f,b){f=="class"?this.$.className=b:f=="style"?this.$.style.cssText=b:f=="tabindex"?this.$.tabIndex=b:f=="checked"?
+this.$.checked=b:f=="contenteditable"?a.call(this,"contentEditable",b):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(e){}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.quirks)?function(a){a=="class"?a="className":a=="tabindex"?a="tabIndex":a=="contenteditable"&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var 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){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),c=0,e=b.count();c0)s(0,b===true?
+o:b===false?i:o<0?o:i);if(c&&(k<0||e>0))s(k<0?k:e,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||{},e=0;e=0&&d0&&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},find:function(b){var f=a(this),b=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(e(this,
+b)));f();return b},findOne:function(b){var f=a(this),b=this.$.querySelector(e(this,b));f();return b?new CKEDITOR.dom.element(b):null},forEach:function(a,b,c){if(!c&&(!b||this.type==b))var e=a(this);if(e!==false)for(var c=this.getChildren(),i=0;i0?g.getChild(e-1):o(g,true)===false?null:g.getPreviousSourceNode(true,l,o));else{g=d;if(g.type==CKEDITOR.NODE_ELEMENT&&!(g=g.getChild(f)))g=o(d,true)===false?null:d.getNextSourceNode(true,l,o)}g&&o(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[v](false,l,o)}this.end();return this.current=null}function e(b){for(var c,d=null;c=a.call(this,b);)d=c;return d}
-function b(a){if(k(a))return false;if(a.type==CKEDITOR.NODE_TEXT)return true;if(a.type==CKEDITOR.NODE_ELEMENT){if(a.is(CKEDITOR.dtd.$inline)||a.getAttribute("contenteditable")=="false")return true;var b;if(b=!CKEDITOR.env.needsBrFiller)if(b=a.is(o))a:{b=0;for(var c=a.getChildCount();b0?g.getChild(e-1):o(g,true)===false?null:g.getPreviousSourceNode(true,m,o));else{g=d;if(g.type==CKEDITOR.NODE_ELEMENT&&!(g=g.getChild(f)))g=o(d,true)===false?null:d.getNextSourceNode(true,m,o)}g&&o(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[u](false,m,o)}this.end();return this.current=null}function e(b){for(var c,d=null;c=a.call(this,b);)d=c;return d}
+function b(a){if(k(a))return false;if(a.type==CKEDITOR.NODE_TEXT)return true;if(a.type==CKEDITOR.NODE_ELEMENT){if(a.is(CKEDITOR.dtd.$inline)||a.is("hr")||a.getAttribute("contenteditable")=="false")return true;var b;if(b=!CKEDITOR.env.needsBrFiller)if(b=a.is(o))a:{b=0;for(var c=a.getChildCount();b0)if(h>=f.getChildCount()){f=f.append(a.document.createText(""));j=true}else f=f.getChild(h);if(g.type==CKEDITOR.NODE_TEXT){g.split(e);g.equals(f)&&(f=g.getNext())}else if(e)if(e>=g.getChildCount()){g=g.append(a.document.createText(""));m=true}else g=g.getChild(e).getPrevious();else{g=g.append(a.document.createText(""),1);m=true}var e=g.getParents(),h=f.getParents(),l,v,i;for(l=0;l0&&!k.equals(f)&&(H=r.append(k.clone()));if(!e[c]||k.$.parentNode!=e[c].$.parentNode)for(k=k.getPrevious();k;){if(k.equals(e[c])||k.equals(g))break;n=k.getPrevious();if(b==2)r.$.insertBefore(k.$.cloneNode(true),r.$.firstChild);else{k.remove();b==1&&r.$.insertBefore(k.$,
-r.$.firstChild)}k=n}r&&(r=H)}if(b==2){v=a.startContainer;if(v.type==CKEDITOR.NODE_TEXT){v.$.data=v.$.data+v.$.nextSibling.data;v.$.parentNode.removeChild(v.$.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(v&&i&&(g.$.parentNode!=v.$.parentNode||f.$.parentNode!=i.$.parentNode)){b=i.getIndex();m&&i.$.parentNode==g.$.parentNode&&b--;if(d&&v.type==CKEDITOR.NODE_ELEMENT){d=CKEDITOR.dom.element.createFromHtml(' ',
-a.document);d.insertAfter(v);v.mergeSiblings(false);a.moveToBookmark({startNode:d})}else a.setStart(i.getParent(),b)}a.collapse(true)}m&&g.remove();j&&f.$.parentNode&&f.remove()},f={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},h=CKEDITOR.dom.walker.bogus(),n=/^[\t\r\n ]*(?: |\xa0)$/,i=CKEDITOR.dom.walker.editable(),k=CKEDITOR.dom.walker.ignored(true);CKEDITOR.dom.range.prototype=
+d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}}function b(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&k(a)&&(b=a);return i(a)&&!(h(a)&&a.equals(b))})}}var c=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},d=function(a,b,c,d){a.optimizeBookmark();var g=a.startContainer,f=a.endContainer,e=a.startOffset,h=a.endOffset,l,j;if(f.type==CKEDITOR.NODE_TEXT)f=f.split(h);
+else if(f.getChildCount()>0)if(h>=f.getChildCount()){f=f.append(a.document.createText(""));j=true}else f=f.getChild(h);if(g.type==CKEDITOR.NODE_TEXT){g.split(e);g.equals(f)&&(f=g.getNext())}else if(e)if(e>=g.getChildCount()){g=g.append(a.document.createText(""));l=true}else g=g.getChild(e).getPrevious();else{g=g.append(a.document.createText(""),1);l=true}var e=g.getParents(),h=f.getParents(),m,u,i;for(m=0;m0&&!k.equals(f)&&(H=q.append(k.clone()));if(!e[c]||k.$.parentNode!=e[c].$.parentNode)for(k=k.getPrevious();k;){if(k.equals(e[c])||k.equals(g))break;n=k.getPrevious();if(b==2)q.$.insertBefore(k.$.cloneNode(true),q.$.firstChild);else{k.remove();b==1&&q.$.insertBefore(k.$,
+q.$.firstChild)}k=n}q&&(q=H)}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&&i&&(g.$.parentNode!=u.$.parentNode||f.$.parentNode!=i.$.parentNode)){b=i.getIndex();l&&i.$.parentNode==g.$.parentNode&&b--;if(d&&u.type==CKEDITOR.NODE_ELEMENT){d=CKEDITOR.dom.element.createFromHtml(' ',
+a.document);d.insertAfter(u);u.mergeSiblings(false);a.moveToBookmark({startNode:d})}else a.setStart(i.getParent(),b)}a.collapse(true)}l&&g.remove();j&&f.$.parentNode&&f.remove()},f={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},h=CKEDITOR.dom.walker.bogus(),n=/^[\t\r\n ]*(?: |\xa0)$/,i=CKEDITOR.dom.walker.editable(),k=CKEDITOR.dom.walker.ignored(true);CKEDITOR.dom.range.prototype=
 {clone:function(){var a=new CKEDITOR.dom.range(this.root);a.startContainer=this.startContainer;a.startOffset=this.startOffset;a.endContainer=this.endContainer;a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){if(a){this.endContainer=this.startContainer;this.endOffset=this.startOffset}else{this.startContainer=this.endContainer;this.startOffset=this.endOffset}this.collapsed=true},cloneContents:function(){var a=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||
 d(this,2,a);return a},deleteContents:function(a){this.collapsed||d(this,0,null,a)},extractContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||d(this,1,b,a);return b},createBookmark:function(a){var b,c,d,g,f=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml(" ");if(a){d="cke_bm_"+CKEDITOR.tools.getNextNumber();b.setAttribute("id",d+(f?"C":"S"))}if(!f){c=b.clone();c.setHtml(" ");a&&c.setAttribute("id",
 d+"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?d+(f?"C":"S"):b,endNode:a?d+"E":c,serializable:a,collapsed:f}},createBookmark2:function(){function a(b){var c=b.container,d=b.offset,g;g=c;var f=d;g=g.type!=CKEDITOR.NODE_ELEMENT||f===0||f==g.getChildCount()?0:g.getChild(f-1).type==CKEDITOR.NODE_TEXT&&g.getChild(f).type==CKEDITOR.NODE_TEXT;
@@ -133,17 +134,17 @@ getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this
 b.lastChild;b=new CKEDITOR.dom.node(b)}}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,d=this.endContainer,c=c.equals(d)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(d);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):
 this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&(a.is("span")&&a.data("cke-bookmark"))&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&(b.is&&b.is("span")&&b.data("cke-bookmark"))&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var c=this.startContainer,d=this.startOffset,g=this.collapsed;
 if((!a||g)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength()){d=c.getIndex()+1;c=c.getParent()}else{var f=c.split(d),d=c.getIndex()+1,c=c.getParent();if(this.startContainer.equals(this.endContainer))this.setEnd(f,this.endOffset-this.startOffset);else if(c.equals(this.endContainer))this.endOffset=this.endOffset+1}else{d=c.getIndex();c=c.getParent()}this.setStart(c,d);if(g){this.collapse(true);return}}c=this.endContainer;d=this.endOffset;if(!b&&!g&&c&&c.type==CKEDITOR.NODE_TEXT){if(d){d>=c.getLength()||
-c.split(d);d=c.getIndex()+1}else d=c.getIndex();c=c.getParent();this.setEnd(c,d)}},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var d=RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var g=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var f=this.getCommonAncestor(),e=this.root,k,m,j,l,v,h=false,r,i;r=this.startContainer;var n=this.startOffset;if(r.type==CKEDITOR.NODE_TEXT){if(n){r=!CKEDITOR.tools.trim(r.substring(0,
-n)).length&&r;h=!!r}if(r&&!(l=r.getPrevious()))j=r.getParent()}else{n&&(l=r.getChild(n-1)||r.getLast());l||(j=r)}for(j=c(j);j||l;){if(j&&!l){!v&&j.equals(f)&&(v=true);if(g?j.isBlockBoundary():!e.contains(j))break;if(!h||j.getComputedStyle("display")!="inline"){h=false;v?k=j:this.setStartBefore(j)}l=j.getPrevious()}for(;l;){r=false;if(l.type==CKEDITOR.NODE_COMMENT)l=l.getPrevious();else{if(l.type==CKEDITOR.NODE_TEXT){i=l.getText();d.test(i)&&(l=null);r=/[\s\ufeff]$/.test(i)}else if((l.$.offsetWidth>
-0||b&&l.is("br"))&&!l.data("cke-bookmark"))if(h&&CKEDITOR.dtd.$removeEmpty[l.getName()]){i=l.getText();if(d.test(i))l=null;else for(var n=l.$.getElementsByTagName("*"),G=0,C;C=n[G++];)if(!CKEDITOR.dtd.$removeEmpty[C.nodeName.toLowerCase()]){l=null;break}l&&(r=!!i.length)}else l=null;r&&(h?v?k=j:j&&this.setStartBefore(j):h=true);if(l){r=l.getPrevious();if(!j&&!r){j=l;l=null;break}l=r}else j=null}}j&&(j=c(j.getParent()))}r=this.endContainer;n=this.endOffset;j=l=null;v=h=false;var J=function(a,b){var c=
-new CKEDITOR.dom.range(e);c.setStart(a,b);c.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),g;for(c.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};g=c.next();){if(g.type!=CKEDITOR.NODE_TEXT)return false;i=g!=a?g.getText():g.substring(b);if(d.test(i))return false}return true};if(r.type==CKEDITOR.NODE_TEXT)if(CKEDITOR.tools.trim(r.substring(n)).length)h=true;else{h=!r.getLength();if(n==r.getLength()){if(!(l=r.getNext()))j=r.getParent()}else J(r,
-n)&&(j=r.getParent())}else(l=r.getChild(n))||(j=r);for(;j||l;){if(j&&!l){!v&&j.equals(f)&&(v=true);if(g?j.isBlockBoundary():!e.contains(j))break;if(!h||j.getComputedStyle("display")!="inline"){h=false;v?m=j:j&&this.setEndAfter(j)}l=j.getNext()}for(;l;){r=false;if(l.type==CKEDITOR.NODE_TEXT){i=l.getText();J(l,0)||(l=null);r=/^[\s\ufeff]/.test(i)}else if(l.type==CKEDITOR.NODE_ELEMENT){if((l.$.offsetWidth>0||b&&l.is("br"))&&!l.data("cke-bookmark"))if(h&&CKEDITOR.dtd.$removeEmpty[l.getName()]){i=l.getText();
-if(d.test(i))l=null;else{n=l.$.getElementsByTagName("*");for(G=0;C=n[G++];)if(!CKEDITOR.dtd.$removeEmpty[C.nodeName.toLowerCase()]){l=null;break}}l&&(r=!!i.length)}else l=null}else r=1;r&&h&&(v?m=j:this.setEndAfter(j));if(l){r=l.getNext();if(!j&&!r){j=l;l=null;break}l=r}else j=null}j&&(j=c(j.getParent()))}if(k&&m){f=k.contains(m)?m:k;this.setStartBefore(f);this.setEndAfter(f)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:j=new CKEDITOR.dom.range(this.root);e=
+c.split(d);d=c.getIndex()+1}else d=c.getIndex();c=c.getParent();this.setEnd(c,d)}},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var d=RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var g=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var f=this.getCommonAncestor(),e=this.root,k,l,j,m,u,h=false,q,i;q=this.startContainer;var n=this.startOffset;if(q.type==CKEDITOR.NODE_TEXT){if(n){q=!CKEDITOR.tools.trim(q.substring(0,
+n)).length&&q;h=!!q}if(q&&!(m=q.getPrevious()))j=q.getParent()}else{n&&(m=q.getChild(n-1)||q.getLast());m||(j=q)}for(j=c(j);j||m;){if(j&&!m){!u&&j.equals(f)&&(u=true);if(g?j.isBlockBoundary():!e.contains(j))break;if(!h||j.getComputedStyle("display")!="inline"){h=false;u?k=j:this.setStartBefore(j)}m=j.getPrevious()}for(;m;){q=false;if(m.type==CKEDITOR.NODE_COMMENT)m=m.getPrevious();else{if(m.type==CKEDITOR.NODE_TEXT){i=m.getText();d.test(i)&&(m=null);q=/[\s\ufeff]$/.test(i)}else if((m.$.offsetWidth>
+0||b&&m.is("br"))&&!m.data("cke-bookmark"))if(h&&CKEDITOR.dtd.$removeEmpty[m.getName()]){i=m.getText();if(d.test(i))m=null;else for(var n=m.$.getElementsByTagName("*"),G=0,C;C=n[G++];)if(!CKEDITOR.dtd.$removeEmpty[C.nodeName.toLowerCase()]){m=null;break}m&&(q=!!i.length)}else m=null;q&&(h?u?k=j:j&&this.setStartBefore(j):h=true);if(m){q=m.getPrevious();if(!j&&!q){j=m;m=null;break}m=q}else j=null}}j&&(j=c(j.getParent()))}q=this.endContainer;n=this.endOffset;j=m=null;u=h=false;var J=function(a,b){var c=
+new CKEDITOR.dom.range(e);c.setStart(a,b);c.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),g;for(c.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};g=c.next();){if(g.type!=CKEDITOR.NODE_TEXT)return false;i=g!=a?g.getText():g.substring(b);if(d.test(i))return false}return true};if(q.type==CKEDITOR.NODE_TEXT)if(CKEDITOR.tools.trim(q.substring(n)).length)h=true;else{h=!q.getLength();if(n==q.getLength()){if(!(m=q.getNext()))j=q.getParent()}else J(q,
+n)&&(j=q.getParent())}else(m=q.getChild(n))||(j=q);for(;j||m;){if(j&&!m){!u&&j.equals(f)&&(u=true);if(g?j.isBlockBoundary():!e.contains(j))break;if(!h||j.getComputedStyle("display")!="inline"){h=false;u?l=j:j&&this.setEndAfter(j)}m=j.getNext()}for(;m;){q=false;if(m.type==CKEDITOR.NODE_TEXT){i=m.getText();J(m,0)||(m=null);q=/^[\s\ufeff]/.test(i)}else if(m.type==CKEDITOR.NODE_ELEMENT){if((m.$.offsetWidth>0||b&&m.is("br"))&&!m.data("cke-bookmark"))if(h&&CKEDITOR.dtd.$removeEmpty[m.getName()]){i=m.getText();
+if(d.test(i))m=null;else{n=m.$.getElementsByTagName("*");for(G=0;C=n[G++];)if(!CKEDITOR.dtd.$removeEmpty[C.nodeName.toLowerCase()]){m=null;break}}m&&(q=!!i.length)}else m=null}else q=1;q&&h&&(u?l=j:this.setEndAfter(j));if(m){q=m.getNext();if(!j&&!q){j=m;m=null;break}m=q}else j=null}j&&(j=c(j.getParent()))}if(k&&l){f=k.contains(l)?l:k;this.setStartBefore(f);this.setEndAfter(f)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:j=new CKEDITOR.dom.range(this.root);e=
 this.root;j.setStartAt(e,CKEDITOR.POSITION_AFTER_START);j.setEnd(this.startContainer,this.startOffset);j=new CKEDITOR.dom.walker(j);var F,t,x=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),y=null,B=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&a.getAttribute("contenteditable")=="false")if(y){if(y.equals(a)){y=null;return}}else y=a;else if(y)return;var b=x(a);b||(F=a);return b},g=function(a){var b=B(a);!b&&(a.is&&a.is("br"))&&(t=a);return b};j.guard=B;j=j.lastBackward();
 F=F||e;this.setStartAt(F,!F.is("br")&&(!j&&this.checkStartOfBlock()||j&&F.contains(j))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){j=this.clone();j=new CKEDITOR.dom.walker(j);var w=CKEDITOR.dom.walker.whitespaces(),N=CKEDITOR.dom.walker.bookmark();j.evaluator=function(a){return!w(a)&&!N(a)};if((j=j.previous())&&j.type==CKEDITOR.NODE_ELEMENT&&j.is("br"))break}j=this.clone();j.collapse();j.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);j=new CKEDITOR.dom.walker(j);
-j.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?g:B;F=null;j=j.lastForward();F=F||e;this.setEndAt(F,!j&&this.checkEndOfBlock()||j&&F.contains(j)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);t&&this.setEndAfter(t)}},shrink:function(a,b,c){if(!this.collapsed){var a=a||CKEDITOR.SHRINK_TEXT,d=this.clone(),g=this.startContainer,f=this.endContainer,e=this.startOffset,h=this.endOffset,m=1,j=1;if(g&&g.type==CKEDITOR.NODE_TEXT)if(e)if(e>=g.getLength())d.setStartAfter(g);else{d.setStartBefore(g);
-m=0}else d.setStartBefore(g);if(f&&f.type==CKEDITOR.NODE_TEXT)if(h)if(h>=f.getLength())d.setEndAfter(f);else{d.setEndAfter(f);j=0}else d.setEndBefore(f);var d=new CKEDITOR.dom.walker(d),l=CKEDITOR.dom.walker.bookmark();d.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var v;d.guard=function(b,g){if(l(b))return true;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||g&&b.equals(v)||c===false&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||
-b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return false;!g&&b.type==CKEDITOR.NODE_ELEMENT&&(v=b);return true};if(m)(g=d[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(g,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);if(j){d.reset();(d=d[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(d,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!m&&!j)}},insertNode:function(a){this.optimizeBookmark();this.trim(false,
+j.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?g:B;F=y=t=null;j=j.lastForward();F=F||e;this.setEndAt(F,!j&&this.checkEndOfBlock()||j&&F.contains(j)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);t&&this.setEndAfter(t)}},shrink:function(a,b,c){if(!this.collapsed){var a=a||CKEDITOR.SHRINK_TEXT,d=this.clone(),g=this.startContainer,f=this.endContainer,e=this.startOffset,h=this.endOffset,l=1,j=1;if(g&&g.type==CKEDITOR.NODE_TEXT)if(e)if(e>=g.getLength())d.setStartAfter(g);else{d.setStartBefore(g);
+l=0}else d.setStartBefore(g);if(f&&f.type==CKEDITOR.NODE_TEXT)if(h)if(h>=f.getLength())d.setEndAfter(f);else{d.setEndAfter(f);j=0}else d.setEndBefore(f);var d=new CKEDITOR.dom.walker(d),m=CKEDITOR.dom.walker.bookmark();d.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var u;d.guard=function(b,g){if(m(b))return true;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||g&&b.equals(u)||c===false&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||
+b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return false;!g&&b.type==CKEDITOR.NODE_ELEMENT&&(u=b);return true};if(l)(g=d[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(g,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);if(j){d.reset();(d=d[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(d,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!l&&!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}c(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}c(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)}c(this)},
@@ -164,79 +165,79 @@ return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset
 b.remove()}a.remove()}}})();CKEDITOR.POSITION_AFTER_START=1;CKEDITOR.POSITION_BEFORE_END=2;CKEDITOR.POSITION_BEFORE_START=3;CKEDITOR.POSITION_AFTER_END=4;CKEDITOR.ENLARGE_ELEMENT=1;CKEDITOR.ENLARGE_BLOCK_CONTENTS=2;CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3;CKEDITOR.ENLARGE_INLINE=4;CKEDITOR.START=1;CKEDITOR.END=2;CKEDITOR.SHRINK_ELEMENT=1;CKEDITOR.SHRINK_TEXT=2;"use strict";
 (function(){function a(a){if(!(arguments.length<1)){this.range=a;this.forceBrBreak=0;this.enlargeBr=1;this.enforceRealBlocks=0;this._||(this._={})}}function e(a,b,c){for(a=a.getNextSourceNode(b,null,c);!f(a);)a=a.getNextSourceNode(b,null,c);return a}function b(a){var b=[];a.forEach(function(a){if(a.getAttribute("contenteditable")=="true"){b.push(a);return false}},CKEDITOR.NODE_ELEMENT,true);return b}function c(a,d,f,e){a:{e==void 0&&(e=b(f));for(var h;h=e.shift();)if(h.getDtd().p){e={element:h,remaining:e};
 break a}e=null}if(!e)return 0;if((h=CKEDITOR.filter.instances[e.element.data("cke-filter")])&&!h.check(d))return c(a,d,f,e.remaining);d=new CKEDITOR.dom.range(e.element);d.selectNodeContents(e.element);d=d.createIterator();d.enlargeBr=a.enlargeBr;d.enforceRealBlocks=a.enforceRealBlocks;d.activeFilter=d.filter=h;a._.nestedEditable={element:e.element,container:f,remaining:e.remaining,iterator:d};return 1}var d=/^[\r\n\t ]+$/,f=CKEDITOR.dom.walker.bookmark(false,true),h=CKEDITOR.dom.walker.whitespaces(true),
-n=function(a){return f(a)&&h(a)};a.prototype={getNextParagraph:function(a){var b,h,s,q,u,a=a||"p";if(this._.nestedEditable){if(b=this._.nestedEditable.iterator.getNextParagraph(a)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return b}this.activeFilter=this.filter;if(c(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return this._.nestedEditable.iterator.getNextParagraph(a)}this._.nestedEditable=
+n=function(a){return f(a)&&h(a)};a.prototype={getNextParagraph:function(a){var b,h,s,r,v,a=a||"p";if(this._.nestedEditable){if(b=this._.nestedEditable.iterator.getNextParagraph(a)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return b}this.activeFilter=this.filter;if(c(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return this._.nestedEditable.iterator.getNextParagraph(a)}this._.nestedEditable=
 null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var g=this.range.clone();g.shrink(CKEDITOR.SHRINK_ELEMENT,true);h=g.endContainer.hasAscendant("pre",true)||g.startContainer.hasAscendant("pre",true);g.enlarge(this.forceBrBreak&&!h||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(!g.collapsed){h=new CKEDITOR.dom.walker(g.clone());var p=CKEDITOR.dom.walker.bookmark(true,true);h.evaluator=p;this._.nextNode=h.next();h=new CKEDITOR.dom.walker(g.clone());
 h.evaluator=p;h=h.previous();this._.lastNode=h.getNextSourceNode(true);if(this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()){p=this.range.clone();p.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END);if(p.checkEndOfBlock()){p=new CKEDITOR.dom.elementPath(p.endContainer,p.root);this._.lastNode=(p.block||p.blockLimit).getNextSourceNode(true)}}if(!this._.lastNode||!g.root.contains(this._.lastNode)){this._.lastNode=
-this._.docEndMarker=g.document.createText("");this._.lastNode.insertAfter(h)}g=null}this._.started=1;h=g}p=this._.nextNode;g=this._.lastNode;for(this._.nextNode=null;p;){var z=0,A=p.hasAscendant("pre"),m=p.type!=CKEDITOR.NODE_ELEMENT,j=0;if(m)p.type==CKEDITOR.NODE_TEXT&&d.test(p.getText())&&(m=0);else{var l=p.getName();if(CKEDITOR.dtd.$block[l]&&p.getAttribute("contenteditable")=="false"){b=p;c(this,a,b);break}else if(p.isBlockBoundary(this.forceBrBreak&&!A&&{br:1})){if(l=="br")m=1;else if(!h&&!p.getChildCount()&&
-l!="hr"){b=p;s=p.equals(g);break}if(h){h.setEndAt(p,CKEDITOR.POSITION_BEFORE_START);if(l!="br")this._.nextNode=p}z=1}else{if(p.getFirst()){if(!h){h=this.range.clone();h.setStartAt(p,CKEDITOR.POSITION_BEFORE_START)}p=p.getFirst();continue}m=1}}if(m&&!h){h=this.range.clone();h.setStartAt(p,CKEDITOR.POSITION_BEFORE_START)}s=(!z||m)&&p.equals(g);if(h&&!z)for(;!p.getNext(n)&&!s;){l=p.getParent();if(l.isBlockBoundary(this.forceBrBreak&&!A&&{br:1})){z=1;m=0;s||l.equals(g);h.setEndAt(l,CKEDITOR.POSITION_BEFORE_END);
-break}p=l;m=1;s=p.equals(g);j=1}m&&h.setEndAt(p,CKEDITOR.POSITION_AFTER_END);p=e(p,j,g);if((s=!p)||z&&h)break}if(!b){if(!h){this._.docEndMarker&&this._.docEndMarker.remove();return this._.nextNode=null}b=new CKEDITOR.dom.elementPath(h.startContainer,h.root);p=b.blockLimit;z={div:1,th:1,td:1};b=b.block;if(!b&&p&&!this.enforceRealBlocks&&z[p.getName()]&&h.checkStartOfBlock()&&h.checkEndOfBlock()&&!p.equals(h.root))b=p;else if(!b||this.enforceRealBlocks&&b.getName()=="li"){b=this.range.document.createElement(a);
-h.extractContents().appendTo(b);b.trim();h.insertNode(b);q=u=true}else if(b.getName()!="li"){if(!h.checkStartOfBlock()||!h.checkEndOfBlock()){b=b.clone(false);h.extractContents().appendTo(b);b.trim();u=h.splitBlock();q=!u.wasStartOfBlock;u=!u.wasEndOfBlock;h.insertNode(b)}}else if(!s)this._.nextNode=b.equals(g)?null:e(h.getBoundaryNodes().endNode,1,g)}if(q)(q=b.getPrevious())&&q.type==CKEDITOR.NODE_ELEMENT&&(q.getName()=="br"?q.remove():q.getLast()&&q.getLast().$.nodeName.toLowerCase()=="br"&&q.getLast().remove());
-if(u)(q=b.getLast())&&q.type==CKEDITOR.NODE_ELEMENT&&q.getName()=="br"&&(!CKEDITOR.env.needsBrFiller||q.getPrevious(f)||q.getNext(f))&&q.remove();if(!this._.nextNode)this._.nextNode=s||b.equals(g)||!g?null:e(b,1,g);return b}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}})();
+this._.docEndMarker=g.document.createText("");this._.lastNode.insertAfter(h)}g=null}this._.started=1;h=g}p=this._.nextNode;g=this._.lastNode;for(this._.nextNode=null;p;){var z=0,A=p.hasAscendant("pre"),l=p.type!=CKEDITOR.NODE_ELEMENT,j=0;if(l)p.type==CKEDITOR.NODE_TEXT&&d.test(p.getText())&&(l=0);else{var m=p.getName();if(CKEDITOR.dtd.$block[m]&&p.getAttribute("contenteditable")=="false"){b=p;c(this,a,b);break}else if(p.isBlockBoundary(this.forceBrBreak&&!A&&{br:1})){if(m=="br")l=1;else if(!h&&!p.getChildCount()&&
+m!="hr"){b=p;s=p.equals(g);break}if(h){h.setEndAt(p,CKEDITOR.POSITION_BEFORE_START);if(m!="br")this._.nextNode=p}z=1}else{if(p.getFirst()){if(!h){h=this.range.clone();h.setStartAt(p,CKEDITOR.POSITION_BEFORE_START)}p=p.getFirst();continue}l=1}}if(l&&!h){h=this.range.clone();h.setStartAt(p,CKEDITOR.POSITION_BEFORE_START)}s=(!z||l)&&p.equals(g);if(h&&!z)for(;!p.getNext(n)&&!s;){m=p.getParent();if(m.isBlockBoundary(this.forceBrBreak&&!A&&{br:1})){z=1;l=0;s||m.equals(g);h.setEndAt(m,CKEDITOR.POSITION_BEFORE_END);
+break}p=m;l=1;s=p.equals(g);j=1}l&&h.setEndAt(p,CKEDITOR.POSITION_AFTER_END);p=e(p,j,g);if((s=!p)||z&&h)break}if(!b){if(!h){this._.docEndMarker&&this._.docEndMarker.remove();return this._.nextNode=null}b=new CKEDITOR.dom.elementPath(h.startContainer,h.root);p=b.blockLimit;z={div:1,th:1,td:1};b=b.block;if(!b&&p&&!this.enforceRealBlocks&&z[p.getName()]&&h.checkStartOfBlock()&&h.checkEndOfBlock()&&!p.equals(h.root))b=p;else if(!b||this.enforceRealBlocks&&b.getName()=="li"){b=this.range.document.createElement(a);
+h.extractContents().appendTo(b);b.trim();h.insertNode(b);r=v=true}else if(b.getName()!="li"){if(!h.checkStartOfBlock()||!h.checkEndOfBlock()){b=b.clone(false);h.extractContents().appendTo(b);b.trim();v=h.splitBlock();r=!v.wasStartOfBlock;v=!v.wasEndOfBlock;h.insertNode(b)}}else if(!s)this._.nextNode=b.equals(g)?null:e(h.getBoundaryNodes().endNode,1,g)}if(r)(r=b.getPrevious())&&r.type==CKEDITOR.NODE_ELEMENT&&(r.getName()=="br"?r.remove():r.getLast()&&r.getLast().$.nodeName.toLowerCase()=="br"&&r.getLast().remove());
+if(v)(r=b.getLast())&&r.type==CKEDITOR.NODE_ELEMENT&&r.getName()=="br"&&(!CKEDITOR.env.needsBrFiller||r.getPrevious(f)||r.getNext(f))&&r.remove();if(!this._.nextNode)this._.nextNode=s||b.equals(g)||!g?null:e(b,1,g);return b}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}})();
 CKEDITOR.command=function(a,e){this.uiItems=[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return false;this.editorFocus&&a.focus();return this.fire("exec")===false?true:e.exec.call(this,a,b)!==false};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return true;if(this.context&&!b.isContextFor(this.context)){this.disable();return true}if(!this.checkAllowed(true)){this.disable();return true}this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&
 this.disable();return this.fire("refresh",{editor:a,path:b})===false?true:e.refresh&&e.refresh.apply(this,arguments)!==false};var b;this.checkAllowed=function(c){return!c&&typeof b=="boolean"?b:b=a.activeFilter.checkFeature(this)};CKEDITOR.tools.extend(this,e,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!e.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)};
 CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(!this.preserveState||typeof this.previousState=="undefined"?CKEDITOR.TRISTATE_OFF:this.previousState)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return false;this.previousState=this.state;this.state=a;this.fire("state");return true},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?
 this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.event.implementOn(CKEDITOR.command.prototype);CKEDITOR.ENTER_P=1;CKEDITOR.ENTER_BR=2;CKEDITOR.ENTER_DIV=3;
 CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"",bodyId:"",bodyClass:"",fullPage:!1,height:200,extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]};
-(function(){function a(a,b,c,d,g){var f,e,a=[];for(f in b){e=b[f];e=typeof e=="boolean"?{}:typeof e=="function"?{match:e}:J(e);if(f.charAt(0)!="$")e.elements=f;if(c)e.featureName=c.toLowerCase();var j=e;j.elements=h(j.elements,/\s+/)||null;j.propertiesOnly=j.propertiesOnly||j.elements===true;var m=/\s*,\s*/,p=void 0;for(p in y){j[p]=h(j[p],m)||null;var l=j,r=B[p],w=h(j[B[p]],m),t=j[p],v=[],i=true,k=void 0;w?i=false:w={};for(k in t)if(k.charAt(0)=="!"){k=k.slice(1);v.push(k);w[k]=true;i=false}for(;k=
-v.pop();){t[k]=t["!"+k];delete t["!"+k]}l[r]=(i?false:w)||null}j.match=j.match||null;d.push(e);a.push(e)}for(var b=g.elements,g=g.generic,z,c=0,d=a.length;c-1?w.push(RegExp("^"+t.replace(/\*/g,".*")+"$")):w.push(t);r=w;if(r.length){j[m]=r;l=false}}j.nothingRequired=l;j.noProperties=!(j.attributes||j.classes||j.styles);
+(function(){function a(a,b,c,d,g){var f,e,a=[];for(f in b){e=b[f];e=typeof e=="boolean"?{}:typeof e=="function"?{match:e}:J(e);if(f.charAt(0)!="$")e.elements=f;if(c)e.featureName=c.toLowerCase();var j=e;j.elements=h(j.elements,/\s+/)||null;j.propertiesOnly=j.propertiesOnly||j.elements===true;var l=/\s*,\s*/,p=void 0;for(p in y){j[p]=h(j[p],l)||null;var m=j,q=B[p],w=h(j[B[p]],l),u=j[p],t=[],i=true,k=void 0;w?i=false:w={};for(k in u)if(k.charAt(0)=="!"){k=k.slice(1);t.push(k);w[k]=true;i=false}for(;k=
+t.pop();){u[k]=u["!"+k];delete u["!"+k]}m[q]=(i?false:w)||null}j.match=j.match||null;d.push(e);a.push(e)}for(var b=g.elements,g=g.generic,z,c=0,d=a.length;c-1?w.push(RegExp("^"+u.replace(/\*/g,".*")+"$")):w.push(u);q=w;if(q.length){j[l]=q;m=false}}j.nothingRequired=m;j.noProperties=!(j.attributes||j.classes||j.styles);
 if(f.elements===true||f.elements===null)g[e?"unshift":"push"](f);else{j=f.elements;delete f.elements;for(z in j)if(b[z])b[z][e?"unshift":"push"](f);else b[z]=[f]}}}function e(a,c,d,g){if(!a.match||a.match(c))if(g||n(a,c)){if(!a.propertiesOnly)d.valid=true;if(!d.allAttributes)d.allAttributes=b(a.attributes,c.attributes,d.validAttributes);if(!d.allStyles)d.allStyles=b(a.styles,c.styles,d.validStyles);if(!d.allClasses){a=a.classes;c=c.classes;g=d.validClasses;if(a)if(a===true)a=true;else{for(var f=0,
 e=c.length,j;f-1&&b.push(c.replace(/\*/g,".*"));return b.length?RegExp("^(?:"+b.join("|")+")$"):null}function p(a){var b=a.attributes,c;delete b.style;delete b["class"];if(c=CKEDITOR.tools.writeCssText(a.styles,true))b.style=c;a.classes.length&&(b["class"]=a.classes.sort().join(" "))}function z(a){switch(a.name){case "a":if(!a.children.length&&!a.attributes.name)return false;break;case "img":if(!a.attributes.src)return false}return true}function A(a){if(!a)return false;if(a===true)return true;
-var b=g(a);return function(c){return c in a||b&&c.match(b)}}function m(){return new CKEDITOR.htmlParser.element("br")}function j(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.name=="br"||G.$block[a.name])}function l(a,b,c){var d=a.name;if(G.$empty[d]||!a.children.length)if(d=="hr"&&b=="br")a.replaceWith(m());else{a.parent&&c.push({check:"it",el:a.parent});a.remove()}else if(G.$block[d]||d=="tr")if(b=="br"){if(a.previous&&!j(a.previous)){b=m();b.insertBefore(a)}if(a.next&&!j(a.next)){b=m();b.insertAfter(a)}a.replaceWithChildren()}else{var d=
-a.children,g;b:{g=G[b];for(var f=0,e=d.length,l;f0;){l=d[--e];if(f&&(l.type==CKEDITOR.NODE_TEXT||l.type==CKEDITOR.NODE_ELEMENT&&G.$inline[l.name])){if(!p){p=new CKEDITOR.htmlParser.element(b);p.insertAfter(a);c.push({check:"parent-down",el:p})}p.add(l,0)}else{p=
-null;l.insertAfter(a);g.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(l.type==CKEDITOR.NODE_ELEMENT&&!G[g.name][l.name])&&c.push({check:"el-up",el:l})}}a.remove()}}else if(d=="style")a.remove();else{a.parent&&c.push({check:"it",el:a.parent});a.replaceWithChildren()}}function v(a,b,c){var d,g;for(d=0;d0;){m=d[--e];if(f&&(m.type==CKEDITOR.NODE_TEXT||m.type==CKEDITOR.NODE_ELEMENT&&G.$inline[m.name])){if(!p){p=new CKEDITOR.htmlParser.element(b);p.insertAfter(a);c.push({check:"parent-down",el:p})}p.add(m,0)}else{p=
+null;m.insertAfter(a);g.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(m.type==CKEDITOR.NODE_ELEMENT&&!G[g.name][m.name])&&c.push({check:"el-up",el:m})}}a.remove()}}else if(d=="style")a.remove();else{a.parent&&c.push({check:"it",el:a.parent});a.replaceWithChildren()}}function u(a,b,c){var d,g;for(d=0;d";if(f in this._.cachedChecks)return this._.cachedChecks[f];d=o(a).$1;g=d.styles;var e=d.classes;d.name=d.elements;d.classes=e=e?e.split(/\s*,\s*/):[];d.styles=k(g);d.attributes=k(d.attributes);d.children=[];e.length&&(d.attributes["class"]=e.join(" "));if(g)d.attributes.style=
-CKEDITOR.tools.writeCssText(d.styles);g=d}else{d=a.getDefinition();g=d.styles;e=d.attributes||{};if(g){g=J(g);e.style=CKEDITOR.tools.writeCssText(g,true)}else g={};g={name:d.element,attributes:e,classes:e["class"]?e["class"].split(/\s+/):[],styles:g,children:[]}}var e=CKEDITOR.tools.clone(g),j=[],m;if(b!==false&&(m=this._.transformations[g.name])){for(d=0;d0?false:
+CKEDITOR.tools.writeCssText(d.styles);g=d}else{d=a.getDefinition();g=d.styles;e=d.attributes||{};if(g){g=J(g);e.style=CKEDITOR.tools.writeCssText(g,true)}else g={};g={name:d.element,attributes:e,classes:e["class"]?e["class"].split(/\s+/):[],styles:g,children:[]}}var e=CKEDITOR.tools.clone(g),j=[],l;if(b!==false&&(l=this._.transformations[g.name])){for(d=0;d0?false:
 CKEDITOR.tools.objectCompare(g.attributes,e.attributes,true)?true:false;typeof a=="string"&&(this._.cachedChecks[f]=b);return b},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,d){var g=a.slice(),f;if(this.check(x[c]))return c;for(d||(g=g.reverse());f=g.pop();)if(this.check(f))return b[f];return CKEDITOR.ENTER_BR}}()};var y={styles:1,attributes:1,classes:1},B={styles:"requiredStyles",attributes:"requiredAttributes",
 classes:"requiredClasses"},w=/^([a-z0-9*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,N={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},M=/^cke:(object|embed|param)$/,D=/^(object|embed|param)$/,ba=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,
 b,c){c=c||b;if(!(c in a.styles)){var d=a.attributes[b];if(d){/^\d+$/.test(d)&&(d=d+"px");a.styles[c]=d}}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var d=a.styles[b],g=d&&d.match(/^(\d+)(?:\.\d*)?px$/);g?a.attributes[c]=g[1]:d==t&&(a.attributes[c]=t)}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in a.styles)){var b=a.attributes.align;if(b=="left"||b=="right")a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in
-a.attributes)){var b=a.styles["float"];if(b=="left"||b=="right")a.attributes.align=b}delete a.styles["float"]},matchesStyle:P,transform:function(a,b){if(typeof b=="string")a.name=b;else{var c=b.getDefinition(),d=c.styles,g=c.attributes,f,e,j,m;a.name=c.element;for(f in g)if(f=="class"){c=a.classes.join("|");for(j=g[f].split(/\s+/);m=j.pop();)c.indexOf(m)==-1&&a.classes.push(m)}else a.attributes[f]=g[f];for(e in d)a.styles[e]=d[e]}}}})();
+a.attributes)){var b=a.styles["float"];if(b=="left"||b=="right")a.attributes.align=b}delete a.styles["float"]},matchesStyle:P,transform:function(a,b){if(typeof b=="string")a.name=b;else{var c=b.getDefinition(),d=c.styles,g=c.attributes,f,e,j,l;a.name=c.element;for(f in g)if(f=="class"){c=a.classes.join("|");for(j=g[f].split(/\s+/);l=j.pop();)c.indexOf(l)==-1&&a.classes.push(l)}else a.attributes[f]=g[f];for(e in d)a.styles[e]=d[e]}}}})();
 (function(){CKEDITOR.focusManager=function(a){if(a.focusManager)return a.focusManager;this.hasFocus=false;this.currentActive=null;this._={editor:a};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(a){this._.timer&&clearTimeout(this._.timer);if(a)this.currentActive=a;if(!this.hasFocus&&!this._.locked){(a=CKEDITOR.currentInstance)&&a.focusManager.blur(1);this.hasFocus=true;(a=this._.editor.container)&&a.addClass("cke_focus");this._.editor.fire("focus")}},
 lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(a){function e(){if(this.hasFocus){this.hasFocus=false;var a=this._.editor.container;a&&a.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var b=CKEDITOR.focusManager._.blurDelay;a||!b?e.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;e.call(this)},b,this)}},add:function(a,e){var b=a.getCustomData("focusmanager");if(!b||
 b!=this){b&&b.remove(a);var b="focus",c="blur";if(e)if(CKEDITOR.env.ie){b="focusin";c="focusout"}else CKEDITOR.event.useCapture=1;var d={blur:function(){a.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(a)}};a.on(b,d.focus,this);a.on(c,d.blur,this);if(e)CKEDITOR.event.useCapture=0;a.setCustomData("focusmanager",this);a.setCustomData("focusmanager_handlers",d)}},remove:function(a){a.removeCustomData("focusmanager");var e=a.removeCustomData("focusmanager_handlers");a.removeListener("blur",
 e.blur);a.removeListener("focus",e.focus)}}})();CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this};
-(function(){var a,e=function(b){var b=b.data,d=b.getKeystroke(),f=this.keystrokes[d],e=this._.editor;a=e.fire("key",{keyCode:d})===false;if(!a){f&&(a=e.execCommand(f,{from:"keystrokeHandler"})!==false);a||(a=!!this.blockedKeystrokes[d])}a&&b.preventDefault(true);return!a},b=function(b){if(a){a=false;b.data.preventDefault(true)}};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",e,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",b,this)}}})();
+(function(){var a,e=function(b){var b=b.data,d=b.getKeystroke(),f=this.keystrokes[d],e=this._.editor;a=e.fire("key",{keyCode:d,domEvent:b})===false;if(!a){f&&(a=e.execCommand(f,{from:"keystrokeHandler"})!==false);a||(a=!!this.blockedKeystrokes[d])}a&&b.preventDefault(true);return!a},b=function(b){if(a){a=false;b.data.preventDefault(true)}};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",e,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",b,this)}}})();
 (function(){CKEDITOR.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(a,e,b){if(!a||!CKEDITOR.lang.languages[a])a=this.detect(e,
-a);this[a]?b(a,this[a]):CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+a+".js"),function(){this[a].dir=this.rtl[a]?"rtl":"ltr";b(a,this[a])},this)},detect:function(a,e){var b=this.languages,e=e||navigator.userLanguage||navigator.language||a,c=e.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),d=c[1],c=c[2];b[d+"-"+c]?d=d+"-"+c:b[d]||(d=null);CKEDITOR.lang.detect=d?function(){return d}:function(a){return a};return d||a}}})();
-CKEDITOR.scriptLoader=function(){var a={},e={};return{load:function(b,c,d,f){var h=typeof b=="string";h&&(b=[b]);d||(d=CKEDITOR);var n=b.length,i=[],k=[],o=function(a){c&&(h?c.call(d,a):c.call(d,i,k))};if(n===0)o(true);else{var s=function(a,b){(b?i:k).push(a);if(--n<=0){f&&CKEDITOR.document.getDocumentElement().removeStyle("cursor");o(b)}},q=function(b,c){a[b]=1;var d=e[b];delete e[b];for(var g=0;g
-1)){var g=new CKEDITOR.dom.element("script");g.setAttributes({type:"text/javascript",src:b});if(c)if(CKEDITOR.env.ie&&CKEDITOR.env.version<11)g.$.onreadystatechange=function(){if(g.$.readyState=="loaded"||g.$.readyState=="complete"){g.$.onreadystatechange=null;q(b,true)}};else{g.$.onload=function(){setTimeout(function(){q(b,true)},0)};g.$.onerror=function(){q(b,false)}}g.appendTo(CKEDITOR.document.getHead())}}};f&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var g=0;g
+1)){var g=new CKEDITOR.dom.element("script");g.setAttributes({type:"text/javascript",src:b});if(c)if(CKEDITOR.env.ie&&CKEDITOR.env.version<11)g.$.onreadystatechange=function(){if(g.$.readyState=="loaded"||g.$.readyState=="complete"){g.$.onreadystatechange=null;r(b,true)}};else{g.$.onload=function(){setTimeout(function(){r(b,true)},0)};g.$.onerror=function(){r(b,false)}}g.appendTo(CKEDITOR.document.getHead())}}};f&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var g=0;g=
-0)i=a.langCode;else{i=a.langCode.replace(/-.*/,"");i=i!=a.langCode&&CKEDITOR.tools.indexOf(h,i)>=0?i:CKEDITOR.tools.indexOf(h,"en")>=0?"en":h[0]}if(!m.langEntries||!m.langEntries[i])e.push(CKEDITOR.getUrl(m.path+"lang/"+i+".js"));else{a.lang[j]=m.langEntries[i];i=null}}f.push(i);d.push(m)}CKEDITOR.scriptLoader.load(e,function(){for(var c=["beforeInit","init","afterInit"],e=0;e=
+0)i=a.langCode;else{i=a.langCode.replace(/-.*/,"");i=i!=a.langCode&&CKEDITOR.tools.indexOf(h,i)>=0?i:CKEDITOR.tools.indexOf(h,"en")>=0?"en":h[0]}if(!l.langEntries||!l.langEntries[i])e.push(CKEDITOR.getUrl(l.path+"lang/"+i+".js"));else{a.lang[j]=l.langEntries[i];i=null}}f.push(i);d.push(l)}CKEDITOR.scriptLoader.load(e,function(){for(var c=["beforeInit","init","afterInit"],e=0;e0)for(var c=0;c=0;b--)if(a==z[b].name){z.splice(b,1);return}for(var c=[],d=[],f=m;f!=p&&f.name!=a;){f._.isBlockLike||d.unshift(f);c.push(f);f=f.returnPoint||f.parent}if(f!=
-p){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===
+function(f,h,n){function i(a){var b;if(z.length>0)for(var c=0;c=0;b--)if(a==z[b].name){z.splice(b,1);return}for(var c=[],d=[],f=l;f!=p&&f.name!=a;){f._.isBlockLike||d.unshift(f);c.push(f);f=f.returnPoint||f.parent}if(f!=
+p){for(b=0;b0?this.children[b-1]:null;if(c){if(a._.isBlockLike&&c.type==CKEDITOR.NODE_TEXT){c.value=CKEDITOR.tools.rtrim(c.value);if(c.value.length===
 0){this.children.pop();this.add(a);return}}c.next=a}a.previous=c;a.parent=this;this.children.splice(b,0,a);if(!this._.hasInlineStarted)this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike},filter:function(a,b){b=this.getFilterContext(b);a.onRoot(b,this);this.filterChildren(a,false,b)},filterChildren:function(a,b,c){if(this.childrenFilteredBy!=a.id){c=this.getFilterContext(c);if(b&&!this.parent)a.onRoot(c,this);this.childrenFilteredBy=a.id;for(b=0;b=0&&a7||e.name in CKEDITOR.dtd.tr||e.name in CKEDITOR.dtd.$listItem))j=false;else{j=b(e);j=!j||e.name=="form"&&j.name=="input"}j&&e.add(g(a))}}}function t(a,b){if((!p||CKEDITOR.env.needsBrFiller)&&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){(new CKEDITOR.htmlParser.text(a.value.substring(0,
-c.index))).insertBefore(a);a.value=c[0]}if(!CKEDITOR.env.needsBrFiller&&p&&(!b||a.parent.name in i))return true;if(!p)if((c=a.previous)&&c.name=="br"||!c||f(c))return true}return false}var r={elements:{}},p=e=="html",i=CKEDITOR.tools.extend({},l),k;for(k in i)"#"in m[k]||delete i[k];for(k in i)r.elements[k]=j(p,a.config.fillEmptyBlocks!==false);r.root=j(p);r.elements.br=function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var e=b.attributes;if("data-cke-bogus"in e||"data-cke-eol"in
-e)delete e["data-cke-bogus"];else{for(e=b.next;e&&d(e);)e=e.next;var j=c(b);!e&&f(b.parent)?h(b.parent,g(a)):f(e)&&(j&&!f(j))&&g(a).insertBefore(e)}}}}(p);return r}function e(a,b){return a!=CKEDITOR.ENTER_BR&&b!==false?a==CKEDITOR.ENTER_DIV?"div":"p":false}function b(a){for(a=a.children[a.children.length-1];a&&d(a);)a=a.previous;return a}function c(a){for(a=a.previous;a&&d(a);)a=a.previous;return a}function d(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&
-a.attributes["data-cke-bookmark"]}function f(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in l||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function h(a,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;if(c){c.next=b;b.previous=c}}function n(a){a=a.attributes;a.contenteditable!="false"&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function i(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}
-function k(a){return a.replace(H,function(a,b,c){return"<"+b+c.replace(G,function(a,b){return C.test(b)&&c.indexOf("data-cke-saved-"+b)==-1?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+">"})}function o(a,b){return a.replace(b,function(a,b,c){a.indexOf("/g,">")+"");return""+encodeURIComponent(a)+""})}function s(a){return a.replace(t,function(a,b){return decodeURIComponent(b)})}function q(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,
-function(a){return"<\!--"+A+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function u(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function g(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 p(a,b){for(var c=[],d=b.config.protectedSource,f=b._.dataStore||(b._.dataStore=
-{id:1}),e=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,d=[//gi,//gi].concat(d),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(c.push(a)-1)+"--\>"}),g=0;g"});a=a.replace(e,function(a,b,d){return"<\!--"+A+(b?"{C}":"")+encodeURIComponent(c[d]).replace(/--/g,"%2D%2D")+
-"--\>"});return a.replace(/<\w([^'">]+|'[^']*'|"[^"]*")+>/g,function(a){return a.replace(/<\!--\{cke_protected\}([^>]*)--\>/g,function(a,b){f[f.id]=decodeURIComponent(b);return"{cke_protected_"+f.id++ +"}"})})}CKEDITOR.htmlDataProcessor=function(b){var c,d,f=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=d=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(v);c.addRules(P,{applyToAll:true});c.addRules(a(b,"data"),{applyToAll:true});
-d.addRules(r);d.addRules(L,{applyToAll:true});d.addRules(a(b,"html"),{applyToAll:true});b.on("toHtml",function(a){var a=a.data,c=a.dataValue,c=p(c,b),c=o(c,F),c=k(c),c=o(c,J),c=c.replace(x,"$1cke:$2"),c=c.replace(B,""),c=c.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2"),d=a.context||b.editable().getName(),f;if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&d=="pre"){d="div";c="
"+c+"
";f=1}d=b.document.createElement(d); -d.setHtml("a"+c);c=d.getHtml().substr(1);c=c.replace(RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");f&&(c=c.replace(/^
|<\/pre>$/gi,""));c=c.replace(y,"$1$2");c=s(c);c=u(c);a.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,a.fixForBody===false?false:e(a.enterMode,b.config.autoParagraph))},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,true,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(f.dataFilter,
-true)},null,null,10);b.on("toHtml",function(a){var a=a.data,b=a.dataValue,c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(true);a.dataValue=q(b)},null,null,15);b.on("toDataFormat",function(a){var c=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^
/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,e(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(f.htmlFilter, -true)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,false,true)},null,null,11);b.on("toDataFormat",function(a){var c=a.data.dataValue,d=f.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(true);c=u(c);c=g(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var f=this.editor,e,g,j;if(b&&typeof b=="object"){e=b.context;c=b.fixForBody;d=b.dontFilter;g=b.filter;j=b.enterMode}else e=b;!e&&e!==null&&(e=f.editable().getName()); -return f.fire("toHtml",{dataValue:a,context:e,fixForBody:c,dontFilter:d,filter:g||f.filter,enterMode:j||f.enterMode}).dataValue},toDataFormat:function(a,b){var c,d,f;if(b){c=b.context;d=b.filter;f=b.enterMode}!c&&c!==null&&(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:d||this.editor.filter,context:c,enterMode:f||this.editor.enterMode}).dataValue}};var z=/(?: |\xa0)$/,A="{cke_protected}",m=CKEDITOR.dtd,j=["caption","colgroup","col","thead","tfoot", -"tbody"],l=CKEDITOR.tools.extend({},m.$blockLimit,m.$block),v={elements:{input:n,textarea:n}},P={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},r={elements:{embed:function(a){var b=a.parent;if(b&&b.name=="object"){var c=b.attributes.width,b=b.attributes.height;if(c)a.attributes.width=c;if(b)a.attributes.height=b}},a:function(a){if(!a.children.length&&!a.attributes.name&&!a.attributes["data-cke-saved-name"])return false}}},L={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]], -attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return false;for(var c=["name","href","src"],d,f=0;f-1&&d>-1&&c!=d)){c=a.parent?a.getIndex(): --1;d=b.parent?b.getIndex():-1}return c>d?1:-1})},param:function(a){a.children=[];a.isEmpty=true;return a},span:function(a){a.attributes["class"]=="Apple-style-span"&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0];if(b&&b.value)b.value=CKEDITOR.tools.trim(b.value);if(!a.attributes.type)a.attributes.type="text/css"},title:function(a){var b= -a.children[0];!b&&h(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:i,textarea:i},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||false}}};if(CKEDITOR.env.ie)L.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})};var H=/<(a|area|img|input|source)\b([^>]*)>/gi,G=/([\w-]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,C=/^(href|src|name)$/i,J=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi, -F=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,t=/([^<]*)<\/cke:encoded>/gi,x=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,y=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,B=/]*?)\/?>(?!\s*<\/cke:\1)/gi})();"use strict"; +c.index))).insertBefore(a);a.value=c[0]}if(!CKEDITOR.env.needsBrFiller&&p&&(!b||a.parent.name in i))return true;if(!p)if((c=a.previous)&&c.name=="br"||!c||f(c))return true}return false}var q={elements:{}},p=e=="html",i=CKEDITOR.tools.extend({},m),u;for(u in i)"#"in l[u]||delete i[u];for(u in i)q.elements[u]=j(p,a.config.fillEmptyBlocks!==false);q.root=j(p);q.elements.br=function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var e=b.attributes;if("data-cke-bogus"in e||"data-cke-eol"in +e)delete e["data-cke-bogus"];else{for(e=b.next;e&&d(e);)e=e.next;var j=c(b);!e&&f(b.parent)?h(b.parent,g(a)):f(e)&&(j&&!f(j))&&g(a).insertBefore(e)}}}}(p);return q}function e(a,b){return a!=CKEDITOR.ENTER_BR&&b!==false?a==CKEDITOR.ENTER_DIV?"div":"p":false}function b(a){for(a=a.children[a.children.length-1];a&&d(a);)a=a.previous;return a}function c(a){for(a=a.previous;a&&d(a);)a=a.previous;return a}function d(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&& +a.attributes["data-cke-bookmark"]}function f(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in m||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function h(a,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;if(c){c.next=b;b.previous=c}}function n(a){a=a.attributes;a.contenteditable!="false"&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function i(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}} +function k(a){return a.replace(H,function(a,b,c){return"<"+b+c.replace(G,function(a,b){return C.test(b)&&c.indexOf("data-cke-saved-"+b)==-1?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+">"})}function o(a,b){return a.replace(b,function(a,b,c){a.indexOf("/g,">")+"");return""+encodeURIComponent(a)+""})}function s(a){return a.replace(t,function(a,b){return decodeURIComponent(b)})}function r(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g, +function(a){return"<\!--"+A+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function v(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function g(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 p(a,b){for(var c=[],d=b.config.protectedSource,f=b._.dataStore||(b._.dataStore= +{id:1}),e=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,d=[//gi,//gi].concat(d),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(c.push(a)-1)+"--\>"}),j=0;j"});a=a.replace(e,function(a,b,d){return"<\!--"+A+(b?"{C}":"")+encodeURIComponent(c[d]).replace(/--/g,"%2D%2D")+ +"--\>"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=>]+))+\s*>/g,function(a){return a.replace(/<\!--\{cke_protected\}([^>]*)--\>/g,function(a,b){f[f.id]=decodeURIComponent(b);return"{cke_protected_"+f.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,d,f){return"<"+c+d+">"+g(v(f),b)+""})}CKEDITOR.htmlDataProcessor=function(b){var c,d,f=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter= +d=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(u);c.addRules(P,{applyToAll:true});c.addRules(a(b,"data"),{applyToAll:true});d.addRules(q);d.addRules(L,{applyToAll:true});d.addRules(a(b,"html"),{applyToAll:true});b.on("toHtml",function(a){var a=a.data,c=a.dataValue,c=p(c,b),c=o(c,F),c=k(c),c=o(c,J),c=c.replace(x,"$1cke:$2"),c=c.replace(B,""),c=c.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi, +"$1data-cke-"+CKEDITOR.rnd+"-$2"),d=a.context||b.editable().getName(),f;if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&d=="pre"){d="div";c="
"+c+"
";f=1}d=b.document.createElement(d);d.setHtml("a"+c);c=d.getHtml().substr(1);c=c.replace(RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");f&&(c=c.replace(/^
|<\/pre>$/gi,""));c=c.replace(y,"$1$2");c=s(c);c=v(c);a.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,a.fixForBody===false?false:e(a.enterMode,b.config.autoParagraph))},null,null,
+5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,true,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(f.dataFilter,true)},null,null,10);b.on("toHtml",function(a){var a=a.data,b=a.dataValue,c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(true);a.dataValue=r(b)},null,null,15);b.on("toDataFormat",function(a){var c=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^
/i, +""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,e(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(f.htmlFilter,true)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,false,true)},null,null,11);b.on("toDataFormat",function(a){var c=a.data.dataValue,d=f.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(true);c=v(c);c=g(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype= +{toHtml:function(a,b,c,d){var f=this.editor,e,g,j;if(b&&typeof b=="object"){e=b.context;c=b.fixForBody;d=b.dontFilter;g=b.filter;j=b.enterMode}else e=b;!e&&e!==null&&(e=f.editable().getName());return f.fire("toHtml",{dataValue:a,context:e,fixForBody:c,dontFilter:d,filter:g||f.filter,enterMode:j||f.enterMode}).dataValue},toDataFormat:function(a,b){var c,d,f;if(b){c=b.context;d=b.filter;f=b.enterMode}!c&&c!==null&&(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a, +filter:d||this.editor.filter,context:c,enterMode:f||this.editor.enterMode}).dataValue}};var z=/(?: |\xa0)$/,A="{cke_protected}",l=CKEDITOR.dtd,j=["caption","colgroup","col","thead","tfoot","tbody"],m=CKEDITOR.tools.extend({},l.$blockLimit,l.$block),u={elements:{input:n,textarea:n}},P={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},q={elements:{embed:function(a){var b=a.parent;if(b&&b.name=="object"){var c=b.attributes.width,b=b.attributes.height;if(c)a.attributes.width= +c;if(b)a.attributes.height=b}},a:function(a){if(!a.children.length&&!a.attributes.name&&!a.attributes["data-cke-saved-name"])return false}}},L={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return false;for(var c=["name","href","src"],d,f=0;f-1&&d>-1&&c!=d)){c=a.parent?a.getIndex():-1;d=b.parent?b.getIndex():-1}return c>d?1:-1})},param:function(a){a.children=[];a.isEmpty=true;return a},span:function(a){a.attributes["class"]=="Apple-style-span"&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable}, +style:function(a){var b=a.children[0];if(b&&b.value)b.value=CKEDITOR.tools.trim(b.value);if(!a.attributes.type)a.attributes.type="text/css"},title:function(a){var b=a.children[0];!b&&h(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:i,textarea:i},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||false}}};if(CKEDITOR.env.ie)L.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})}; +var H=/<(a|area|img|input|source)\b([^>]*)>/gi,G=/([\w-]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,C=/^(href|src|name)$/i,J=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,F=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,t=/([^<]*)<\/cke:encoded>/gi,x=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,y=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,B=/]*?)\/?>(?!\s*<\/cke:\1)/gi})();"use strict"; CKEDITOR.htmlParser.element=function(a,e){this.name=a;this.attributes=e||{};this.children=[];var b=a||"",c=b.match(/^cke:(.*)/);c&&(b=c[1]);b=!(!CKEDITOR.dtd.$nonBodyContent[b]&&!CKEDITOR.dtd.$block[b]&&!CKEDITOR.dtd.$listItem[b]&&!CKEDITOR.dtd.$tableContent[b]&&!(CKEDITOR.dtd.$nonEditable[b]||b=="br"));this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:b,hasInlineStarted:this.isEmpty||!b}}; CKEDITOR.htmlParser.cssStyle=function(a){var e={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,c,d){c=="font-family"&&(d=d.replace(/["']/g,""));e[c.toLowerCase()]=d});return{rules:e,populate:function(a){var c=this.toString();if(c)a instanceof CKEDITOR.dom.element?a.setAttribute("style",c):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=c:a.style=c},toString:function(){var a=[],c; for(c in e)e[c]&&a.push(c,":",e[c],";");return a.join("")}}}; @@ -300,7 +301,7 @@ f,k,n))===false?delete e[k]:e[k]=n)}f.isEmpty||this.filterChildren(a,false,b);re this.children,b=a.length;b;)a[--b].insertAfter(this);this.remove()},forEach:b.forEach,getFirst:function(b){if(!b)return this.children.length?this.children[0]:null;typeof b!="function"&&(b=a(b));for(var d=0,f=this.children.length;d0)this.children[a-1].next=null;this.parent.add(f,this.getIndex()+1);return f},addClass:function(a){if(!this.hasClass(a)){var b=this.attributes["class"]||"";this.attributes["class"]=b+(b?" ":"")+ a}},removeClass:function(a){var b=this.attributes["class"];if(b)(b=CKEDITOR.tools.trim(b.replace(RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=b:delete this.attributes["class"]},hasClass:function(a){var b=this.attributes["class"];return!b?false:RegExp("(?:^|\\s)"+a+"(?=\\s|$)").test(b)},getFilterContext:function(a){var b=[];a||(a={off:false,nonEditable:false,nestedEditable:false});!a.off&&this.attributes["data-cke-processor"]=="off"&&b.push("off",true);!a.nonEditable&&this.attributes.contenteditable== -"false"?b.push("nonEditable",true):this.name!="body"&&(!a.nestedEditable&&this.attributes.contenteditable=="true")&&b.push("nestedEditable",true);if(b.length)for(var a=CKEDITOR.tools.copy(a),f=0;f",l="",a=f+a.replace(e,function(){return l+f})+l}a=a.replace(/\n/g,"
");b||(a=a.replace(RegExp("
(?=)"),function(a){return d.repeat(a,2)}));a=a.replace(/^ | $/g," ");a=a.replace(/(>|\s) /g,function(a,b){return b+" "}).replace(/ (?=<)/g," ");q(this,"text",a)},insertElement:function(a,b){b?this.insertElementIntoRange(a,b):this.insertElementIntoSelection(a)},insertElementIntoRange:function(a, -b){var c=this.editor,d=c.config.enterMode,e=a.getName(),f=CKEDITOR.dtd.$block[e];if(b.checkReadOnly())return false;b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&b.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})&&u(b);var l,h;if(f)for(;(l=b.getCommonAncestor(0,1))&&(h=CKEDITOR.dtd[l.getName()])&&(!h||!h[e]);)if(l.getName()in CKEDITOR.dtd.span)b.splitElement(l);else if(b.checkStartOfBlock()&&b.checkEndOfBlock()){b.setStartBefore(l);b.collapse(true);l.remove()}else b.splitBlock(d== -CKEDITOR.ENTER_DIV?"div":"p",c.editable());b.insertNode(a);return true},insertElementIntoSelection:function(a){var b=this.editor,d=b.activeEnterMode,b=b.getSelection(),e=b.getRanges()[0],f=a.getName(),f=CKEDITOR.dtd.$block[f];h(this);if(this.insertElementIntoRange(a,e)){e.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);if(f)if((f=a.getNext(function(a){return c(a)&&!i(a)}))&&f.type==CKEDITOR.NODE_ELEMENT&&f.is(CKEDITOR.dtd.$block))f.getDtd()["#"]?e.moveToElementEditStart(f):e.moveToElementEditEnd(a); +var m=Array.prototype.slice.call(arguments,1),m=a.on.apply(a,m);this._.listeners.push(m);return m},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(b){}},restoreAttrs:function(){var a=this._.attrChanges,b,c;for(c in a)if(a.hasOwnProperty(c)){b=a[c];b!==null?this.setAttribute(c,b):this.removeAttribute(c)}},attachClass:function(a){var b=this.getCustomData("classes");if(!this.hasClass(a)){!b&&(b=[]);b.push(a);this.setCustomData("classes",b);this.addClass(a)}}, +changeAttr:function(a,b){var c=this.getAttribute(a);if(b!==c){!this._.attrChanges&&(this._.attrChanges={});a in this._.attrChanges||(this._.attrChanges[a]=c);this.setAttribute(a,b)}},insertHtml:function(a,b){h(this);r(this,b||"html",a)},insertText:function(a){h(this);var b=this.editor,c=b.getSelection().getStartElement().hasAscendant("pre",true)?CKEDITOR.ENTER_BR:b.activeEnterMode,b=c==CKEDITOR.ENTER_BR,d=CKEDITOR.tools,a=d.htmlEncode(a.replace(/\r\n/g,"\n")),a=a.replace(/\t/g,"    "), +c=c==CKEDITOR.ENTER_P?"p":"div";if(!b){var e=/\n{2}/g;if(e.test(a))var f="<"+c+">",m="",a=f+a.replace(e,function(){return m+f})+m}a=a.replace(/\n/g,"
");b||(a=a.replace(RegExp("
(?=)"),function(a){return d.repeat(a,2)}));a=a.replace(/^ | $/g," ");a=a.replace(/(>|\s) /g,function(a,b){return b+" "}).replace(/ (?=<)/g," ");r(this,"text",a)},insertElement:function(a,b){b?this.insertElementIntoRange(a,b):this.insertElementIntoSelection(a)},insertElementIntoRange:function(a, +b){var c=this.editor,d=c.config.enterMode,e=a.getName(),f=CKEDITOR.dtd.$block[e];if(b.checkReadOnly())return false;b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&b.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})&&v(b);var m,h;if(f)for(;(m=b.getCommonAncestor(0,1))&&(h=CKEDITOR.dtd[m.getName()])&&(!h||!h[e]);)if(m.getName()in CKEDITOR.dtd.span)b.splitElement(m);else if(b.checkStartOfBlock()&&b.checkEndOfBlock()){b.setStartBefore(m);b.collapse(true);m.remove()}else b.splitBlock(d== +CKEDITOR.ENTER_DIV?"div":"p",c.editable());b.insertNode(a);return true},insertElementIntoSelection:function(a){h(this);var b=this.editor,d=b.activeEnterMode,b=b.getSelection(),e=b.getRanges()[0],f=a.getName(),f=CKEDITOR.dtd.$block[f];if(this.insertElementIntoRange(a,e)){e.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);if(f)if((f=a.getNext(function(a){return c(a)&&!i(a)}))&&f.type==CKEDITOR.NODE_ELEMENT&&f.is(CKEDITOR.dtd.$block))f.getDtd()["#"]?e.moveToElementEditStart(f):e.moveToElementEditEnd(a); else if(!f&&d!=CKEDITOR.ENTER_BR){f=e.fixBlock(true,d==CKEDITOR.ENTER_DIV?"div":"p");e.moveToElementEditStart(f)}}b.selectRanges([e]);n(this)},setData:function(a,b){b||(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);if(this.status=="unloaded")this.status="ready";this.editor.fire("dataReady")},getData:function(a){var b=this.getHtml();a||(b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute("contenteditable",!a)},detach:function(){this.removeClass("cke_editable"); this.status="detached";var a=this.editor;this._.detach();delete a.document;delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||a.config.ignoreEmptyParagraph!==false&&(b=b.replace(k,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData", function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&b.type=="Control"||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)}, this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");this.attachClass(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"cke_editable_inline":a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE||a.elementMode==CKEDITOR.ELEMENT_MODE_APPENDTO?"cke_editable_themed":"");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=false},null,null,-1);this.on("focus",function(){this.hasFocus= true},null,null,-1);a.focusManager.add(this);if(this.equals(CKEDITOR.document.getActive())){this.hasFocus=true;a.once("contentDom",function(){a.focusManager.focus()})}this.isInline()&&this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var d=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var e=a.config.contentsLangDirection;this.getDirection(1)!=e&&this.changeAttr("dir",e);var h=CKEDITOR.getCss();if(h){e= d.getHead();if(!e.getCustomData("stylesheet")){h=d.appendStyleText(h);h=new CKEDITOR.dom.element(h.ownerNode||h.owningElement);e.setCustomData("stylesheet",h);h.data("cke-temp",1)}}e=d.getCustomData("stylesheet_ref")||0;d.setCustomData("stylesheet_ref",e+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){var a=a.data,b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&(a.$.button!=2&&b.isReadOnly())&&a.preventDefault()}); -var m={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return true;var c=b.data.keyCode,d;if(c in m){var b=a.getSelection(),e,r=b.getRanges()[0],h=r.startPath(),i,k,p,c=c==8;if(CKEDITOR.env.ie&&CKEDITOR.env.version<11&&(e=b.getSelectedElement())||(e=f(b))){a.fire("saveSnapshot");r.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);e.remove();r.select();a.fire("saveSnapshot");d=1}else if(r.collapsed)if((i=h.block)&&(p=i[c?"getPrevious":"getNext"](o))&&p.type==CKEDITOR.NODE_ELEMENT&&p.is("table")&& -r[c?"checkStartOfBlock":"checkEndOfBlock"]()){a.fire("saveSnapshot");r[c?"checkEndOfBlock":"checkStartOfBlock"]()&&i.remove();r["moveToElementEdit"+(c?"End":"Start")](p);r.select();a.fire("saveSnapshot");d=1}else if(h.blockLimit&&h.blockLimit.is("td")&&(k=h.blockLimit.getAscendant("table"))&&r.checkBoundaryOfElement(k,c?CKEDITOR.START:CKEDITOR.END)&&(p=k[c?"getPrevious":"getNext"](o))){a.fire("saveSnapshot");r["moveToElementEdit"+(c?"End":"Start")](p);r.checkStartOfBlock()&&r.checkEndOfBlock()?p.remove(): -r.select();a.fire("saveSnapshot");d=1}else if((k=h.contains(["td","th","caption"]))&&r.checkBoundaryOfElement(k,c?CKEDITOR.START:CKEDITOR.END))d=1}return!d});a.blockless&&(CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)&&this.attachListener(this,"keyup",function(b){if(b.data.getKeystroke()in m&&!this.getFirst(c)){this.appendBogus();b=a.createRange();b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START);b.select()}});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return false;b={element:b.data.getTarget()}; -a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this,"click",b);CKEDITOR.env.ie||this.attachListener(this,"mousedown",function(b){var c=b.data.getTarget();if(c.is("img","hr","input","textarea","select")&&!c.isReadOnly()){a.getSelection().selectElement(c);c.is("input","textarea","select")&&b.data.preventDefault()}});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(b.data.$.button==2){b=b.data.getTarget();if(!b.getOuterHtml().replace(k,"")){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());if(!this.is("textarea")){a= -this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");if(--c)a.setCustomData("stylesheet_ref",c);else{a.removeCustomData("stylesheet_ref");b.removeCustomData("stylesheet").remove()}}}this.editor.fire("contentDomUnload");delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(arguments.length)b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(), -null);return b};var i=CKEDITOR.dom.walker.bogus(),k=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,o=CKEDITOR.dom.walker.whitespaces(true),s=CKEDITOR.dom.walker.bookmark(false,true);CKEDITOR.on("instanceLoaded",function(b){var c=b.editor;c.on("insertElement",function(a){a=a.data;if(a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))){a.getAttribute("contentEditable")!="false"&&a.data("cke-editable",a.hasAttribute("contenteditable")? -"true":"1");a.setAttribute("contentEditable",false)}});c.on("selectionChange",function(b){if(!c.readOnly){var d=c.getSelection();if(d&&!d.isLocked){d=c.checkDirty();c.fire("lockSnapshot");a(b);c.fire("unlockSnapshot");!d&&c.resetDirty()}}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);if(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE? -"top":"contents")){var d=CKEDITOR.tools.getNextId(),e=CKEDITOR.dom.element.createFromHtml(''+this.lang.common.editorHelp+"");c.append(e);a.changeAttr("aria-describedby",d)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");var q=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var e,f,j,m,t=[],r=d.range.startContainer;e=d.range.startPath();for(var r= -l[r.getName()],h=0,k=c.getChildren(),i=k.count(),v=-1,o=-1,n=0,s=e.contains(l.$list);h-1)t[v].firstNotAllowed=1;if(o>-1)t[o].lastNotAllowed=1;return t}function d(b,c){var e=[],f=b.getChildren(),j=f.count(),m,t=0,r=l[c],h=!b.is(l.$inline)||b.is("br");for(h&&e.push(" ");t ",o.document);o.insertNode(x);o.setStartAfter(x)}y=new CKEDITOR.dom.elementPath(o.startContainer);i.endPath=B=new CKEDITOR.dom.elementPath(o.endContainer);if(!o.collapsed){var t=B.block||B.blockLimit,N=o.getCommonAncestor();t&&(!t.equals(N)&&!t.contains(N)&&o.checkEndOfBlock())&&i.zombies.push(t);o.deleteContents()}for(;(w=a(o.startContainer)&& -o.startContainer.getChild(o.startOffset-1))&&a(w)&&w.isBlockBoundary()&&y.contains(w);)o.moveToPosition(w,CKEDITOR.POSITION_BEFORE_END);f(o,i.blockLimit,y,B);if(x){o.setEndBefore(x);o.collapse();x.remove()}x=o.startPath();if(t=x.contains(e,false,1)){o.splitElement(t);i.inlineStylesRoot=t;i.inlineStylesPeak=x.lastElement}x=o.createBookmark();(t=x.startNode.getPrevious(c))&&a(t)&&e(t)&&q.push(t);(t=x.startNode.getNext(c))&&a(t)&&e(t)&&q.push(t);for(t=x.startNode;(t=t.getParent())&&e(t);)q.push(t);o.moveToBookmark(x); -if(x=v){x=i.range;if(i.type=="text"&&i.inlineStylesRoot){w=i.inlineStylesPeak;o=w.getDocument().createText("{cke-peak}");for(q=i.inlineStylesRoot.getParent();!w.equals(q);){o=o.appendTo(w.clone());w=w.getParent()}v=o.getOuterHtml().split("{cke-peak}").join(v)}w=i.blockLimit.getName();if(/^\s+|\s+$/.test(v)&&"span"in CKEDITOR.dtd[w])var M=' ',v=M+v+M;v=i.editor.dataProcessor.toHtml(v,{context:null,fixForBody:false,dontFilter:i.dontFilter,filter:i.editor.activeFilter, -enterMode:i.editor.activeEnterMode});w=x.document.createElement("body");w.setHtml(v);if(M){w.getFirst().remove();w.getLast().remove()}if((M=x.startPath().block)&&!(M.getChildCount()==1&&M.getBogus()))a:{var D;if(w.getChildCount()==1&&a(D=w.getFirst())&&D.is(k)){M=D.getElementsByTag("*");x=0;for(q=M.count();x0;else{u=D.startPath();if(!B.isBlock&&i.editor.config.autoParagraph!==false&&(i.editor.activeEnterMode!=CKEDITOR.ENTER_BR&&i.editor.editable().equals(u.blockLimit)&&!u.block)&&(Q=i.editor.activeEnterMode!=CKEDITOR.ENTER_BR&&i.editor.config.autoParagraph!==false?i.editor.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":false)){Q=M.createElement(Q);Q.appendBogus();D.insertNode(Q);CKEDITOR.env.needsBrFiller&&(I=Q.getBogus())&&I.remove();D.moveToPosition(Q, -CKEDITOR.POSITION_BEFORE_END)}if((u=D.startPath().block)&&!u.equals(E)){if(I=u.getBogus()){I.remove();w.push(u)}E=u}B.firstNotAllowed&&(o=1);if(o&&B.isElement){u=D.startContainer;for(K=null;u&&!l[u.getName()][B.name];){if(u.equals(v)){u=null;break}K=u;u=u.getParent()}if(u){if(K){S=D.splitElement(K);i.zombies.push(S);i.zombies.push(K)}}else{K=v.getName();T=!x;u=x==y.length-1;K=d(B.node,K);for(var O=[],W=K.length,X=0,Z=void 0,$=0,aa=-1;X0;){d=a.getItem(b);if(!CKEDITOR.tools.trim(d.getHtml())){d.appendBogus();CKEDITOR.env.ie&&(CKEDITOR.env.version<9&&d.getChildCount())&&d.getFirst().remove()}}}return function(d){var e= -d.startContainer,f=e.getAscendant("table",1),l=false;c(f.getElementsByTag("td"));c(f.getElementsByTag("th"));f=d.clone();f.setStart(e,0);f=a(f).lastBackward();if(!f){f=d.clone();f.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);f=a(f).lastForward();l=true}f||(f=e);if(f.is("table")){d.setStartAt(f,CKEDITOR.POSITION_BEFORE_START);d.collapse(true);f.remove()}else{f.is({tbody:1,thead:1,tfoot:1})&&(f=b(f,"tr",l));f.is("tr")&&(f=b(f,f.getParent().is("thead")?"th":"td",l));(e=f.getBogus())&&e.remove();d.moveToPosition(f, -l?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END)}}}()})(); -(function(){function a(){var a=this._.fakeSelection,b;if(a){b=this.getSelection(1);if(!b||!b.isHidden()){a.reset();a=0}}if(!a){a=b||this.getSelection(1);if(!a||a.getType()==CKEDITOR.SELECTION_NONE)return}this.fire("selectionCheck",a);b=this.elementPath();if(!b.compare(this._.selectionPreviousPath)){if(CKEDITOR.env.webkit)this._.previousActive=this.document.getActive();this._.selectionPreviousPath=b;this.fire("selectionChange",{selection:a,path:b})}}function e(){q=true;if(!s){b.call(this);s=CKEDITOR.tools.setTimeout(b, -200,this)}}function b(){s=null;if(q){CKEDITOR.tools.setTimeout(a,0,this);q=false}}function c(a){function b(c,d){return!c||c.type==CKEDITOR.NODE_TEXT?false:a.clone()["moveToElementEdit"+(d?"End":"Start")](c)}if(!(a.root instanceof CKEDITOR.editable))return false;var c=a.startContainer,d=a.getPreviousNode(u,null,c),e=a.getNextNode(u,null,c);return b(d)||b(e,1)||!d&&!e&&!(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()&&c.getBogus())?true:false}function d(a){return a.getCustomData("cke-fillingChar")} +var l={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return true;var c=b.data.domEvent.getKey(),d;if(c in l){var b=a.getSelection(),e,q=b.getRanges()[0],h=q.startPath(),i,k,p,c=c==8;if(CKEDITOR.env.ie&&CKEDITOR.env.version<11&&(e=b.getSelectedElement())||(e=f(b))){a.fire("saveSnapshot");q.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);e.remove();q.select();a.fire("saveSnapshot");d=1}else if(q.collapsed)if((i=h.block)&&(p=i[c?"getPrevious":"getNext"](o))&&p.type==CKEDITOR.NODE_ELEMENT&& +p.is("table")&&q[c?"checkStartOfBlock":"checkEndOfBlock"]()){a.fire("saveSnapshot");q[c?"checkEndOfBlock":"checkStartOfBlock"]()&&i.remove();q["moveToElementEdit"+(c?"End":"Start")](p);q.select();a.fire("saveSnapshot");d=1}else if(h.blockLimit&&h.blockLimit.is("td")&&(k=h.blockLimit.getAscendant("table"))&&q.checkBoundaryOfElement(k,c?CKEDITOR.START:CKEDITOR.END)&&(p=k[c?"getPrevious":"getNext"](o))){a.fire("saveSnapshot");q["moveToElementEdit"+(c?"End":"Start")](p);q.checkStartOfBlock()&&q.checkEndOfBlock()? +p.remove():q.select();a.fire("saveSnapshot");d=1}else if((k=h.contains(["td","th","caption"]))&&q.checkBoundaryOfElement(k,c?CKEDITOR.START:CKEDITOR.END))d=1}return!d});a.blockless&&(CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)&&this.attachListener(this,"keyup",function(b){if(b.data.getKeystroke()in l&&!this.getFirst(c)){this.appendBogus();b=a.createRange();b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START);b.select()}});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return false; +b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this,"click",b);CKEDITOR.env.ie||this.attachListener(this,"mousedown",function(b){var c=b.data.getTarget();if(c.is("img","hr","input","textarea","select")&&!c.isReadOnly()){a.getSelection().selectElement(c);c.is("input","textarea","select")&&b.data.preventDefault()}});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(b.data.$.button==2){b=b.data.getTarget();if(!b.getOuterHtml().replace(k, +"")){var c=a.createRange();c.moveToElementEditStart(b);c.select(true)}}});if(CKEDITOR.env.webkit){this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()});this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()})}CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){b=b.data.domEvent.getKey();if(b in l){var b=b==8,c=a.getSelection(),d=c.getRanges()[0],e=d.startPath(),f=e.block;if(d.collapsed&& +f&&d[b?"checkStartOfBlock":"checkEndOfBlock"]()&&d.moveToClosestEditablePosition(f,!b)&&d.collapsed){if(d.startContainer.type==CKEDITOR.NODE_ELEMENT){var h=d.startContainer.getChild(d.startOffset-(b?1:0));if(h&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("hr")){a.fire("saveSnapshot");h.remove();a.fire("saveSnapshot");return false}}if((d=d.startPath().block)&&(!d||!d.contains(f))){a.fire("saveSnapshot");for(var i=f.getCommonAncestor(d),k=b?f:d,h=k;(k=k.getParent())&&!i.equals(k)&&k.getChildCount()==1;)h=k; +var p;(p=(b?d:f).getBogus())&&p.remove();p=c.createBookmarks();(b?f:d).moveChildren(b?d:f,false);e.lastElement.mergeSiblings();h.remove();c.selectBookmarks(p);a.fire("saveSnapshot");return false}}}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());if(!this.is("textarea")){a=this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var c= +a.getCustomData("stylesheet_ref");if(--c)a.setCustomData("stylesheet_ref",c);else{a.removeCustomData("stylesheet_ref");b.removeCustomData("stylesheet").remove()}}}this.editor.fire("contentDomUnload");delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(arguments.length)b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null);return b};var i=CKEDITOR.dom.walker.bogus(),k=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi, +o=CKEDITOR.dom.walker.whitespaces(true),s=CKEDITOR.dom.walker.bookmark(false,true);CKEDITOR.on("instanceLoaded",function(b){var c=b.editor;c.on("insertElement",function(a){a=a.data;if(a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))){a.getAttribute("contentEditable")!="false"&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1");a.setAttribute("contentEditable",false)}});c.on("selectionChange",function(b){if(!c.readOnly){var d=c.getSelection();if(d&&!d.isLocked){d=c.checkDirty(); +c.fire("lockSnapshot");a(b);c.fire("unlockSnapshot");!d&&c.resetDirty()}}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);if(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents")){var d=CKEDITOR.tools.getNextId(),e=CKEDITOR.dom.element.createFromHtml(''+this.lang.common.editorHelp+ +"");c.append(e);a.changeAttr("aria-describedby",d)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");var r=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var e,f,j,l,t=[],q=d.range.startContainer;e=d.range.startPath();for(var q=m[q.getName()],h=0,k=c.getChildren(),i=k.count(),u=-1,o=-1,n=0,s=e.contains(m.$list);h-1)t[u].firstNotAllowed=1;if(o>-1)t[o].lastNotAllowed=1;return t}function d(b,c){var e=[],f=b.getChildren(),j=f.count(),l,t=0,q=m[c],h=!b.is(m.$inline)|| +b.is("br");for(h&&e.push(" ");t ",o.document);o.insertNode(x); +o.setStartAfter(x)}y=new CKEDITOR.dom.elementPath(o.startContainer);i.endPath=B=new CKEDITOR.dom.elementPath(o.endContainer);if(!o.collapsed){var t=B.block||B.blockLimit,N=o.getCommonAncestor();t&&(!t.equals(N)&&!t.contains(N)&&o.checkEndOfBlock())&&i.zombies.push(t);o.deleteContents()}for(;(w=a(o.startContainer)&&o.startContainer.getChild(o.startOffset-1))&&a(w)&&w.isBlockBoundary()&&y.contains(w);)o.moveToPosition(w,CKEDITOR.POSITION_BEFORE_END);f(o,i.blockLimit,y,B);if(x){o.setEndBefore(x);o.collapse(); +x.remove()}x=o.startPath();if(t=x.contains(e,false,1)){o.splitElement(t);i.inlineStylesRoot=t;i.inlineStylesPeak=x.lastElement}x=o.createBookmark();(t=x.startNode.getPrevious(c))&&a(t)&&e(t)&&r.push(t);(t=x.startNode.getNext(c))&&a(t)&&e(t)&&r.push(t);for(t=x.startNode;(t=t.getParent())&&e(t);)r.push(t);o.moveToBookmark(x);if(x=u){x=i.range;if(i.type=="text"&&i.inlineStylesRoot){w=i.inlineStylesPeak;o=w.getDocument().createText("{cke-peak}");for(r=i.inlineStylesRoot.getParent();!w.equals(r);){o=o.appendTo(w.clone()); +w=w.getParent()}u=o.getOuterHtml().split("{cke-peak}").join(u)}w=i.blockLimit.getName();if(/^\s+|\s+$/.test(u)&&"span"in CKEDITOR.dtd[w])var M=' ',u=M+u+M;u=i.editor.dataProcessor.toHtml(u,{context:null,fixForBody:false,dontFilter:i.dontFilter,filter:i.editor.activeFilter,enterMode:i.editor.activeEnterMode});w=x.document.createElement("body");w.setHtml(u);if(M){w.getFirst().remove();w.getLast().remove()}if((M=x.startPath().block)&&!(M.getChildCount()==1&&M.getBogus()))a:{var D; +if(w.getChildCount()==1&&a(D=w.getFirst())&&D.is(k)){M=D.getElementsByTag("*");x=0;for(r=M.count();x0;else{v=D.startPath();if(!B.isBlock&&i.editor.config.autoParagraph!==false&&(i.editor.activeEnterMode!=CKEDITOR.ENTER_BR&&i.editor.editable().equals(v.blockLimit)&& +!v.block)&&(Q=i.editor.activeEnterMode!=CKEDITOR.ENTER_BR&&i.editor.config.autoParagraph!==false?i.editor.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":false)){Q=M.createElement(Q);Q.appendBogus();D.insertNode(Q);CKEDITOR.env.needsBrFiller&&(I=Q.getBogus())&&I.remove();D.moveToPosition(Q,CKEDITOR.POSITION_BEFORE_END)}if((v=D.startPath().block)&&!v.equals(E)){if(I=v.getBogus()){I.remove();w.push(v)}E=v}B.firstNotAllowed&&(o=1);if(o&&B.isElement){v=D.startContainer;for(K=null;v&&!m[v.getName()][B.name];){if(v.equals(u)){v= +null;break}K=v;v=v.getParent()}if(v){if(K){S=D.splitElement(K);i.zombies.push(S);i.zombies.push(K)}}else{K=u.getName();T=!x;v=x==y.length-1;K=d(B.node,K);for(var O=[],W=K.length,X=0,Z=void 0,$=0,aa=-1;X0;){d=a.getItem(b);if(!CKEDITOR.tools.trim(d.getHtml())){d.appendBogus();CKEDITOR.env.ie&&(CKEDITOR.env.version<9&&d.getChildCount())&&d.getFirst().remove()}}}return function(d){var e=d.startContainer,f=e.getAscendant("table",1),m=false;c(f.getElementsByTag("td"));c(f.getElementsByTag("th"));f=d.clone();f.setStart(e,0);f=a(f).lastBackward();if(!f){f=d.clone();f.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);f=a(f).lastForward();m=true}f|| +(f=e);if(f.is("table")){d.setStartAt(f,CKEDITOR.POSITION_BEFORE_START);d.collapse(true);f.remove()}else{f.is({tbody:1,thead:1,tfoot:1})&&(f=b(f,"tr",m));f.is("tr")&&(f=b(f,f.getParent().is("thead")?"th":"td",m));(e=f.getBogus())&&e.remove();d.moveToPosition(f,m?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END)}}}()})(); +(function(){function a(){var a=this._.fakeSelection,b;if(a){b=this.getSelection(1);if(!b||!b.isHidden()){a.reset();a=0}}if(!a){a=b||this.getSelection(1);if(!a||a.getType()==CKEDITOR.SELECTION_NONE)return}this.fire("selectionCheck",a);b=this.elementPath();if(!b.compare(this._.selectionPreviousPath)){if(CKEDITOR.env.webkit)this._.previousActive=this.document.getActive();this._.selectionPreviousPath=b;this.fire("selectionChange",{selection:a,path:b})}}function e(){r=true;if(!s){b.call(this);s=CKEDITOR.tools.setTimeout(b, +200,this)}}function b(){s=null;if(r){CKEDITOR.tools.setTimeout(a,0,this);r=false}}function c(a){function b(c,d){return!c||c.type==CKEDITOR.NODE_TEXT?false:a.clone()["moveToElementEdit"+(d?"End":"Start")](c)}if(!(a.root instanceof CKEDITOR.editable))return false;var c=a.startContainer,d=a.getPreviousNode(v,null,c),e=a.getNextNode(v,null,c);return b(d)||b(e,1)||!d&&!e&&!(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()&&c.getBogus())?true:false}function d(a){return a.getCustomData("cke-fillingChar")} function f(a,b){var c=a&&a.removeCustomData("cke-fillingChar");if(c){if(b!==false){var d,e=a.getDocument().getSelection().getNative(),f=e&&e.type!="None"&&e.getRangeAt(0);if(c.getLength()>1&&f&&f.intersectsNode(c.$)){d=[e.anchorOffset,e.focusOffset];f=e.focusNode==c.$&&e.focusOffset>0;e.anchorNode==c.$&&e.anchorOffset>0&&d[0]--;f&&d[1]--;var g;f=e;if(!f.isCollapsed){g=f.getRangeAt(0);g.setStart(f.anchorNode,f.anchorOffset);g.setEnd(f.focusNode,f.focusOffset);g=g.collapsed}g&&d.unshift(d.pop())}}c.setText(h(c.getText())); if(d){c=e.getRangeAt(0);c.setStart(c.startContainer,d[0]);c.setEnd(c.startContainer,d[1]);e.removeAllRanges();e.addRange(c)}}}function h(a){return a.replace(/\u200B( )?/g,function(a){return a[1]?" ":""})}function n(a,b,c){var d=a.on("focus",function(a){a.cancel()},null,null,-100);if(CKEDITOR.env.ie)var e=a.getDocument().on("selectionchange",function(a){a.cancel()},null,null,-100);else{var f=new CKEDITOR.dom.range(a);f.moveToElementEditStart(a);var g=a.getDocument().$.createRange();g.setStart(f.startContainer.$, f.startOffset);g.collapse(1);b.removeAllRanges();b.addRange(g)}c&&a.focus();d.removeListener();e&&e.removeListener()}function i(a){var b=CKEDITOR.dom.element.createFromHtml('
 
',a.document);a.fire("lockSnapshot");a.editable().append(b);var c=a.getSelection(1),d=a.createRange(),e=c.root.on("selectionchange",function(a){a.cancel()},null,null,0);d.setStartAt(b,CKEDITOR.POSITION_AFTER_START); d.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);c.selectRanges([d]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=b}function k(a){var b={37:1,39:1,8:1,46:1};return function(c){var d=c.data.getKeystroke();if(b[d]){var e=a.getSelection().getRanges(),f=e[0];if(e.length==1&&f.collapsed)if((d=f[d<38?"getPreviousEditableNode":"getNextEditableNode"]())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getAttribute("contenteditable")=="false"){a.getSelection().fake(d);c.data.preventDefault();c.cancel()}}}} function o(a){for(var b=0;b=d.getLength()?h.setStartAfter(d):h.setStartBefore(d)); -e&&e.type==CKEDITOR.NODE_TEXT&&(g?h.setEndAfter(e):h.setEndBefore(e));d=new CKEDITOR.dom.walker(h);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&d.isReadOnly()){var e=c.clone();c.setEndBefore(d);c.collapsed&&a.splice(b--,1);if(!(d.getPosition(h.endContainer)&CKEDITOR.POSITION_CONTAINS)){e.setStartAfter(d);e.collapsed||a.splice(b+1,0,e)}return true}return false};d.next()}}return a}var s,q,u=CKEDITOR.dom.walker.invisible(1),g=function(){function a(b){return function(a){var c=a.editor.createRange(); +e&&e.type==CKEDITOR.NODE_TEXT&&(g?h.setEndAfter(e):h.setEndBefore(e));d=new CKEDITOR.dom.walker(h);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&d.isReadOnly()){var e=c.clone();c.setEndBefore(d);c.collapsed&&a.splice(b--,1);if(!(d.getPosition(h.endContainer)&CKEDITOR.POSITION_CONTAINS)){e.setStartAfter(d);e.collapsed||a.splice(b+1,0,e)}return true}return false};d.next()}}return a}var s,r,v=CKEDITOR.dom.walker.invisible(1),g=function(){function a(b){return function(a){var c=a.editor.createRange(); c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]);return false}}function b(a){return function(b){var c=b.editor,d=c.createRange(),e;if(!(e=d.moveToClosestEditablePosition(b.selected,a)))e=d.moveToClosestEditablePosition(b.selected,!a);e&&c.getSelection().selectRanges([d]);c.fire("saveSnapshot");b.selected.remove();if(!e){d.moveToElementEditablePosition(c.editable());c.getSelection().selectRanges([d])}c.fire("saveSnapshot");return false}}var c=a(),d=a(1);return{37:c, -38:c,39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(b){function c(){var a=d.getSelection();a&&a.removeAllRanges()}var d=b.editor;d.on("contentDom",function(){var b=d.document,c=CKEDITOR.document,g=d.editable(),j=b.getBody(),m=b.getDocumentElement(),h=g.isInline(),i,o;CKEDITOR.env.gecko&&g.attachListener(g,"focus",function(a){a.removeListener();if(i!==0)if((a=d.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==g.$){a=d.createRange();a.moveToElementEditStart(g);a.select()}}, +38:c,39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(b){function c(){var a=d.getSelection();a&&a.removeAllRanges()}var d=b.editor;d.on("contentDom",function(){var b=d.document,c=CKEDITOR.document,g=d.editable(),j=b.getBody(),l=b.getDocumentElement(),h=g.isInline(),i,o;CKEDITOR.env.gecko&&g.attachListener(g,"focus",function(a){a.removeListener();if(i!==0)if((a=d.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==g.$){a=d.createRange();a.moveToElementEditStart(g);a.select()}}, null,null,-2);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){i&&CKEDITOR.env.webkit&&(i=d._.previousActive&&d._.previousActive.equals(b.getActive()));d.unlockSelection(i);i=0},null,null,-1);g.attachListener(g,"mousedown",function(){i=0});if(CKEDITOR.env.ie||h){var n=function(){o=new CKEDITOR.dom.selection(d.getSelection());o.lock()};p?g.attachListener(g,"beforedeactivate",n,null,null,-1):g.attachListener(d,"selectionCheck",n,null,null,-1);g.attachListener(g,CKEDITOR.env.webkit? "DOMFocusOut":"blur",function(){d.lockSelection(o);i=1},null,null,-1);g.attachListener(g,"mousedown",function(){i=0})}if(CKEDITOR.env.ie&&!h){var t;g.attachListener(g,"mousedown",function(a){if(a.data.$.button==2){a=d.document.getSelection();if(!a||a.getType()==CKEDITOR.SELECTION_NONE)t=d.window.getScrollPosition()}});g.attachListener(g,"mouseup",function(a){if(a.data.$.button==2&&t){d.document.$.documentElement.scrollLeft=t.x;d.document.$.documentElement.scrollTop=t.y}t=null});if(b.$.compatMode!= -"BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)m.on("mousedown",function(a){function b(a){a=a.data.$;if(e){var c=j.$.createTextRange();try{c.moveToPoint(a.x,a.y)}catch(d){}e.setEndPoint(g.compareEndPoints("StartToStart",c)<0?"EndToEnd":"StartToStart",c);e.select()}}function d(){m.removeListener("mousemove",b);c.removeListener("mouseup",d);m.removeListener("mouseup",d);e.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y7&&CKEDITOR.env.version<11){m.on("mousedown",function(a){if(a.data.getTarget().is("html")){c.on("mouseup",x);m.on("mouseup",x)}});var x=function(){c.removeListener("mouseup",x);m.removeListener("mouseup",x);var a=CKEDITOR.document.$.selection,d=a.createRange();a.type!="None"&&d.parentElement().ownerDocument==b.$&&d.select()}}}}g.attachListener(g,"selectionchange", +"BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)l.on("mousedown",function(a){function b(a){a=a.data.$;if(e){var c=j.$.createTextRange();try{c.moveToPoint(a.x,a.y)}catch(d){}e.setEndPoint(g.compareEndPoints("StartToStart",c)<0?"EndToEnd":"StartToStart",c);e.select()}}function d(){l.removeListener("mousemove",b);c.removeListener("mouseup",d);l.removeListener("mouseup",d);e.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y7&&CKEDITOR.env.version<11){l.on("mousedown",function(a){if(a.data.getTarget().is("html")){c.on("mouseup",x);l.on("mouseup",x)}});var x=function(){c.removeListener("mouseup",x);l.removeListener("mouseup",x);var a=CKEDITOR.document.$.selection,d=a.createRange();a.type!="None"&&d.parentElement().ownerDocument==b.$&&d.select()}}}}g.attachListener(g,"selectionchange", a,d);g.attachListener(g,"keyup",e,d);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){d.forceNextSelectionCheck();d.selectionChange(1)});if(h&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var y;g.attachListener(g,"mousedown",function(){y=1});g.attachListener(b.getDocumentElement(),"mouseup",function(){y&&e.call(d);y=0})}else g.attachListener(CKEDITOR.env.ie?g:b.getDocumentElement(),"mouseup",e,d);CKEDITOR.env.webkit&&g.attachListener(b,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:f(g)}}, null,null,-1);g.attachListener(g,"keydown",k(d),null,null,-1)});d.on("setData",function(){d.unlockSelection();CKEDITOR.env.webkit&&c()});d.on("contentDomUnload",function(){d.unlockSelection()});if(CKEDITOR.env.ie9Compat)d.on("beforeDestroy",c,null,null,9);d.on("dataReady",function(){delete d._.fakeSelection;delete d._.hiddenSelectionContainer;d.selectionChange(1)});d.on("loadSnapshot",function(){var a=d.editable().getLast(function(a){return a.type==CKEDITOR.NODE_ELEMENT});a&&a.hasAttribute("data-cke-hidden-sel")&& a.remove()},null,null,100);d.on("key",function(a){if(d.mode=="wysiwyg"){var b=d.getSelection();if(b.isFake){var c=g[a.data.keyCode];if(c)return c({editor:d,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});CKEDITOR.on("instanceReady",function(a){var b=a.editor;if(CKEDITOR.env.webkit){b.on("selectionChange",function(){var a=b.editable(),c=d(a);c&&(c.getCustomData("ready")?f(a):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){f(b.editable())},null,null,-1);var c, @@ -384,48 +386,48 @@ if(CKEDITOR.env.webkit)(b.type=="None"&&this.document.getActive().equals(a)||b.t d&&(d.equals(this.document.getDocumentElement())&&b&&(a.equals(b)||a.contains(b)))&&n(a,null,true)}}d=this.getNative();var f,g;if(d)if(d.getRangeAt)f=(g=d.rangeCount&&d.getRangeAt(0))&&new CKEDITOR.dom.node(g.commonAncestorContainer);else{try{g=d.createRange()}catch(h){}f=g&&CKEDITOR.dom.element.get(g.item&&g.item(0)||g.parentElement())}if(!f||!(f.type==CKEDITOR.NODE_ELEMENT||f.type==CKEDITOR.NODE_TEXT)||!this.root.equals(f)&&!this.root.contains(f)){this._.cache.type=CKEDITOR.SELECTION_NONE;this._.cache.startElement= null;this._.cache.selectedElement=null;this._.cache.selectedText="";this._.cache.ranges=new CKEDITOR.dom.rangeList}return this};var A={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=p?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:p?function(){var a= this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),d=c.type;if(d=="Text")b=CKEDITOR.SELECTION_TEXT;if(d=="Control")b=CKEDITOR.SELECTION_ELEMENT;if(c.createRange().parentElement())b=CKEDITOR.SELECTION_TEXT}catch(e){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(c.rangeCount==1){var c=c.getRangeAt(0),d=c.startContainer;if(d==c.endContainer&& -d.nodeType==1&&c.endOffset-c.startOffset==1&&A[d.childNodes[c.startOffset].nodeName.toLowerCase()])b=CKEDITOR.SELECTION_ELEMENT}return a.type=b},getRanges:function(){var a=p?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var e=d.children,f,g,h=b.duplicate(),i=0,m=e.length-1,t=-1,l,k;i<=m;){t=Math.floor((i+m)/2);f=e[t];h.moveToElementText(f);l=h.compareEndPoints("StartToStart", -b);if(l>0)m=t-1;else if(l<0)i=t+1;else return{container:d,offset:a(f)}}if(t==-1||t==e.length-1&&l<0){h.moveToElementText(d);h.setEndPoint("StartToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!h){f=e[e.length-1];return f.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:e.length}:{container:f,offset:f.nodeValue.length}}for(d=e.length;h>0&&d>0;){g=e[--d];if(g.nodeType==CKEDITOR.NODE_TEXT){k=g;h=h-g.nodeValue.length}}return{container:k,offset:-h}}h.collapse(l>0?true:false);h.setEndPoint(l> -0?"StartToStart":"EndToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;if(!h)return{container:d,offset:a(f)+(l>0?0:1)};for(;h>0;)try{g=f[l>0?"previousSibling":"nextSibling"];if(g.nodeType==CKEDITOR.NODE_TEXT){h=h-g.nodeValue.length;k=g}f=g}catch(o){return{container:d,offset:a(f)}}return{container:k,offset:l>0?-h:k.nodeValue.length+h}};return function(){var a=this.getNative(),c=a&&a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT){a=new CKEDITOR.dom.range(this.root); -d=b(c,true);a.setStart(new CKEDITOR.dom.node(d.container),d.offset);d=b(c);a.setEnd(new CKEDITOR.dom.node(d.container),d.offset);a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse();return[a]}if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],e=0;e0)l=t-1;else if(m<0)i=t+1;else return{container:d,offset:a(f)}}if(t==-1||t==e.length-1&&m<0){h.moveToElementText(d);h.setEndPoint("StartToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!h){f=e[e.length-1];return f.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:e.length}:{container:f,offset:f.nodeValue.length}}for(d=e.length;h>0&&d>0;){g=e[--d];if(g.nodeType==CKEDITOR.NODE_TEXT){k=g;h=h-g.nodeValue.length}}return{container:k,offset:-h}}h.collapse(m>0?true:false);h.setEndPoint(m> +0?"StartToStart":"EndToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;if(!h)return{container:d,offset:a(f)+(m>0?0:1)};for(;h>0;)try{g=f[m>0?"previousSibling":"nextSibling"];if(g.nodeType==CKEDITOR.NODE_TEXT){h=h-g.nodeValue.length;k=g}f=g}catch(o){return{container:d,offset:a(f)}}return{container:k,offset:m>0?-h:k.nodeValue.length+h}};return function(){var a=this.getNative(),c=a&&a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT){a=new CKEDITOR.dom.range(this.root); +d=b(c,true);a.setStart(new CKEDITOR.dom.node(d.container),d.offset);d=b(c);a.setEnd(new CKEDITOR.dom.node(d.container),d.offset);a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse();return[a]}if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],e=0;e1){h=a[a.length- -1];a[0].setEnd(h.endContainer,h.endOffset)}h=a[0];var a=h.collapsed,o,n,q;if((d=h.getEnclosedNode())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in A&&(!d.is("a")||!d.getText()))try{q=d.$.createControlRange();q.addElement(d.$);q.select();return}catch(s){}(h.startContainer.type==CKEDITOR.NODE_ELEMENT&&h.startContainer.getName()in b||h.endContainer.type==CKEDITOR.NODE_ELEMENT&&h.endContainer.getName()in b)&&h.shrink(CKEDITOR.NODE_ELEMENT,true);q=h.createBookmark();b=q.startNode;if(!a)g=q.endNode;q=h.document.$.body.createTextRange(); -q.moveToElementText(b.$);q.moveStart("character",1);if(g){i=h.document.$.body.createTextRange();i.moveToElementText(g.$);q.setEndPoint("EndToEnd",i);q.moveEnd("character",-1)}else{o=b.getNext(k);n=b.hasAscendant("pre");o=!(o&&o.getText&&o.getText().match(i))&&(n||!b.hasPrevious()||b.getPrevious().is&&b.getPrevious().is("br"));n=h.document.createElement("span");n.setHtml("");n.insertBefore(b);o&&h.document.createText("").insertBefore(b)}h.setStartBefore(b);b.remove();if(a){if(o){q.moveStart("character", --1);q.select();h.document.$.selection.clear()}else q.select();h.moveToPosition(n,CKEDITOR.POSITION_BEFORE_START);n.remove()}else{h.setEndBefore(g);g.remove();q.select()}}else{g=this.getNative();if(!g)return;this.removeAllRanges();for(q=0;q=0){h.collapse(1);n.setEnd(h.endContainer.$,h.endOffset)}else throw t;}g.addRange(n)}}this.reset();this.root.fire("selectionchange")}}},fake:function(a){var b=this.root.editor;this.reset();i(b);var c=this._.cache,d=new CKEDITOR.dom.range(this.root);d.setStartBefore(a);d.setEndAfter(a);c.ranges=new CKEDITOR.dom.rangeList(d);c.selectedElement=c.startElement=a;c.type=CKEDITOR.SELECTION_ELEMENT; c.selectedText=c.nativeSel=null;this.isFake=1;this.rev=z++;b._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a=this.getCommonAncestor();a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b= [],c=0;c]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+| )/g, +this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&d.copyAttributes(e);i(d,e)}else r.call(this,d);a.moveToBookmark(b)}function i(a,b){var c=!b;if(c){b=a.getDocument().createElement("div");a.copyAttributes(b)}var d=b&&b.is("pre"),e=a.is("pre"),f=!d&&e;if(d&&!e){e=b;(f=a.getBogus())&&f.remove();f=a.getHtml();f=o(f,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");f=f.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+| )/g, " ");f=f.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var g=a.getDocument().createElement("div");g.append(e);e.$.outerHTML="
"+f+"
";e.copyAttributes(g.getFirst());e=g.getFirst().remove()}else e.setHtml(f);b=e}else f?b=s(c?[a.getHtml()]:k(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,h;if((h=c.getPrevious(C))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("pre")){d=o(h.getHtml(),/\n$/,"")+"\n\n"+o(c.getHtml(),/^\n/,"");CKEDITOR.env.ie?c.$.outerHTML="
"+d+"
":c.setHtml(d);h.remove()}}else c&& p(b)}function k(a){a.getName();var b=[];o(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 o(a,b,c){var d="",e="",a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(e=c);return""});return d+a.replace(b,c)+e}function s(a,b){var c;a.length>1&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));
-for(var d=0;d"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat(" ",a.length-1)+" "});if(c){var f=b.clone();f.setHtml(e);c.append(f)}else b.setHtml(e)}return c||b}function q(a,b){var c=this._.definition,
-d=c.attributes,c=c.styles,e=j(this)[a.getName()],f=CKEDITOR.tools.isEmpty(d)&&CKEDITOR.tools.isEmpty(c),h;for(h in d)if(!((h=="class"||this._.definition.fullMatch)&&a.getAttribute(h)!=l(h,d[h]))&&!(b&&h.slice(0,5)=="data-")){f=a.hasAttribute(h);a.removeAttribute(h)}for(var i in c)if(!(this._.definition.fullMatch&&a.getStyle(i)!=l(i,c[i],true))){f=f||!!a.getStyle(i);a.removeStyle(i)}g(a,e,P[a.getName()]);f&&(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 u(a){for(var b=j(this),c=a.getElementsByTag(this.element),d,e=c.count();--e>=0;){d=c.getItem(e);d.isReadOnly()||q.call(this,d,true)}for(var f in b)if(f!=this.element){c=a.getElementsByTag(f);for(e=c.count()-1;e>=0;e--){d=c.getItem(e);d.isReadOnly()||g(d,b[f])}}}function g(a,b,c){if(b=b&&b.attributes)for(var d=0;d"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat(" ",a.length-1)+" "});if(c){var f=b.clone();f.setHtml(e);c.append(f)}else b.setHtml(e)}return c||b}function r(a,b){var c=this._.definition,
+d=c.attributes,c=c.styles,e=j(this)[a.getName()],f=CKEDITOR.tools.isEmpty(d)&&CKEDITOR.tools.isEmpty(c),h;for(h in d)if(!((h=="class"||this._.definition.fullMatch)&&a.getAttribute(h)!=m(h,d[h]))&&!(b&&h.slice(0,5)=="data-")){f=a.hasAttribute(h);a.removeAttribute(h)}for(var i in c)if(!(this._.definition.fullMatch&&a.getStyle(i)!=m(i,c[i],true))){f=f||!!a.getStyle(i);a.removeStyle(i)}g(a,e,P[a.getName()]);f&&(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 v(a){for(var b=j(this),c=a.getElementsByTag(this.element),d,e=c.count();--e>=0;){d=c.getItem(e);d.isReadOnly()||r.call(this,d,true)}for(var f in b)if(f!=this.element){c=a.getElementsByTag(f);for(e=c.count()-1;e>=0;e--){d=c.getItem(e);d.isReadOnly()||g(d,b[f])}}}function g(a,b,c){if(b=b&&b.attributes)for(var d=0;d"}});"use strict";
 (function(){var a={},e={},b;for(b in CKEDITOR.dtd.$blockLimit)b in CKEDITOR.dtd.$list||(a[b]=1);for(b in CKEDITOR.dtd.$block)b in CKEDITOR.dtd.$blockLimit||b in CKEDITOR.dtd.$empty||(e[b]=1);CKEDITOR.dom.elementPath=function(b,d){var f=null,h=null,n=[],i=b,k,d=d||b.getDocument().getBody();do if(i.type==CKEDITOR.NODE_ELEMENT){n.push(i);if(!this.lastElement){this.lastElement=i;if(i.is(CKEDITOR.dtd.$object)||i.getAttribute("contenteditable")=="false")continue}if(i.equals(d))break;if(!h){k=i.getName();
-i.getAttribute("contenteditable")=="true"?h=i:!f&&e[k]&&(f=i);if(a[k]){var o;if(o=!f){if(k=k=="div"){a:{k=i.getChildren();o=0;for(var s=k.count();o-1}:typeof a=="function"?c=a:typeof a=="object"&&(c=
 function(b){return b.getName()in a});var d=this.elements,f=d.length;e&&f--;if(b){d=Array.prototype.slice.call(d,0);d.reverse()}for(e=0;e0)&&(a=a+((d.$.offsetWidth||0)-(d.$.clientWidth||
-0)+3));d.setStyle("width",a+10+"px");a=l.element.$.scrollHeight;CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&a>0)&&(a=a+((d.$.offsetHeight||0)-(d.$.clientHeight||0)+3));d.setStyle("height",a+"px");j._.currentBlock.element.setStyle("display","none").removeStyle("display")}else d.removeStyle("height");m&&(e=e-d.$.offsetWidth);d.setStyle("left",e+"px");var b=j.element.getWindow(),a=d.$.getBoundingClientRect(),b=b.getViewPaneSize(),c=a.width||a.right-a.left,f=a.height||a.bottom-a.top,i=m?a.right:b.width-a.left,
-g=m?b.width-a.right:a.left;m?ic?e+c:b.width>c?e-a.left:e-a.right+b.width):ic?e-c:b.width>c?e-a.right+b.width:e-a.left);c=a.top;b.height-a.topf?k-f:b.height>f?k-a.bottom+b.height:k-a.top);if(CKEDITOR.env.ie){b=a=new CKEDITOR.dom.element(d.$.offsetParent);b.getName()=="html"&&(b=b.getDocument().getBody());b.getComputedStyle("direction")=="rtl"&&(e=CKEDITOR.env.ie8Compat?e-d.getDocument().getDocumentElement().$.scrollLeft*2:e-(a.$.scrollWidth-a.$.clientWidth))}var a=d.getFirst(),
-n;(n=a.getCustomData("activePanel"))&&n.onHide&&n.onHide.call(this,1);a.setCustomData("activePanel",this);d.setStyles({top:k+"px",left:e+"px"});d.setOpacity(1);h&&h()},this);j.isLoaded?a():j.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();l.element.focus();if(CKEDITOR.env.webkit)CKEDITOR.document.getBody().$.scrollTop=a;this.allowBlur(true);this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:
-0,this);this.visible=1;this.onShow&&this.onShow.call(this)},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var a=this._.iframe.getFrameDocument().getActive();a.is("a")&&(this._.lastFocused=a)},hide:function(a){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();
-this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(a=a&&this._.returnFocus)CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus(),a.focus();delete this._.lastFocused;this._.editor.fire("panelHide",this)}},allowBlur:function(a){var b=this._.panel;void 0!=a&&(b.allowBlur=a);return b.allowBlur},showAsChild:function(a,b,c,g,f,h){this._.activeChild==a&&a._.panel._.offsetParentId==c.getId()||(this.hideChild(),a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||
-this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(b,c,g,f,h),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=""},100))},hideChild:function(a){var b=this._.activeChild;b&&(delete b.onHide,delete this._.activeChild,b.hide(),a&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),b;for(b in g){var c=g[b];a?c.destroy():c.element.hide()}a&&(g=
-{})})})();CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(c){function m(l,g,e,h){var j=new CKEDITOR.style(i["colorButton_"+g+"Style"]),k=CKEDITOR.tools.getNextId()+"_colorBox";c.ui.add(l,CKEDITOR.UI_PANELBUTTON,{label:e,title:e,modes:{wysiwyg:1},editorFocus:0,toolbar:"colors,"+h,allowedContent:j,requiredContent:j,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":f.panelTitle}},onBlock:function(a,b){b.autoSize=!0;b.element.addClass("cke_colorblock");
+(function(){function r(a,b,c,i,f){var f=CKEDITOR.tools.genKey(b.getUniqueId(),c.getUniqueId(),a.lang.dir,a.uiColor||"",i.css||"",f||""),h=g[f];h||(h=g[f]=new CKEDITOR.ui.panel(b,i),h.element=c.append(CKEDITOR.dom.element.createFromHtml(h.render(a),b)),h.element.setStyles({display:"none",position:"absolute"}));return h}var g={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(a,b,c,i){function f(){d.hide()}c.forceIFrame=1;c.toolbarRelated&&a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&
+(b=CKEDITOR.document.getById("cke_"+a.name));var h=b.getDocument(),i=r(a,h,b,c,i||0),j=i.element,l=j.getFirst(),d=this;j.disableContextMenu();this.element=j;this._={editor:a,panel:i,parentElement:b,definition:c,document:h,iframe:l,children:[],dir:a.lang.dir};a.on("mode",f);a.on("resize",f);if(!CKEDITOR.env.iOS)h.getWindow().on("resize",f)},proto:{addBlock:function(a,b){return this._.panel.addBlock(a,b)},addListBlock:function(a,b){return this._.panel.addListBlock(a,b)},getBlock:function(a){return this._.panel.getBlock(a)},
+showBlock:function(a,b,c,i,f,h){var j=this._.panel,l=j.showBlock(a);this.allowBlur(!1);a=this._.editor.editable();this._.returnFocus=a.hasFocus?a:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);this._.hideTimeout=0;var d=this.element,a=this._.iframe,a=CKEDITOR.env.ie?a:new CKEDITOR.dom.window(a.$.contentWindow),g=d.getDocument(),o=this._.parentElement.getPositionedAncestor(),p=b.getDocumentPosition(g),g=o?o.getDocumentPosition(g):{x:0,y:0},m="rtl"==this._.dir,e=p.x+(i||0)-g.x,k=p.y+(f||
+0)-g.y;if(m&&(1==c||4==c))e+=b.$.offsetWidth;else if(!m&&(2==c||3==c))e+=b.$.offsetWidth-1;if(3==c||4==c)k+=b.$.offsetHeight-1;this._.panel._.offsetParentId=b.getId();d.setStyles({top:k+"px",left:0,display:""});d.setOpacity(0);d.getFirst().removeStyle("width");this._.editor.focusManager.add(a);this._.blurSet||(CKEDITOR.event.useCapture=!0,a.on("blur",function(a){function q(){delete this._.returnFocus;this.hide()}this.allowBlur()&&a.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&(this.visible&&!this._.activeChild)&&
+(CKEDITOR.env.iOS?this._.hideTimeout||(this._.hideTimeout=CKEDITOR.tools.setTimeout(q,0,this)):q.call(this))},this),a.on("focus",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)},this),CKEDITOR.env.iOS&&(a.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this),a.on("touchend",function(){this._.hideTimeout=0;this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1);j.onEscape=CKEDITOR.tools.bind(function(a){if(this.onEscape&&this.onEscape(a)===false)return false},
+this);CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.tools.bind(function(){d.removeStyle("width");if(l.autoSize){var a=l.element.getDocument(),a=(CKEDITOR.env.webkit?l.element:a.getBody()).$.scrollWidth;CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&a>0)&&(a=a+((d.$.offsetWidth||0)-(d.$.clientWidth||0)+3));d.setStyle("width",a+10+"px");a=l.element.$.scrollHeight;CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&a>0)&&(a=a+((d.$.offsetHeight||0)-(d.$.clientHeight||0)+3));d.setStyle("height",a+"px");j._.currentBlock.element.setStyle("display",
+"none").removeStyle("display")}else d.removeStyle("height");m&&(e=e-d.$.offsetWidth);d.setStyle("left",e+"px");var b=j.element.getWindow(),a=d.$.getBoundingClientRect(),b=b.getViewPaneSize(),c=a.width||a.right-a.left,f=a.height||a.bottom-a.top,i=m?a.right:b.width-a.left,g=m?b.width-a.right:a.left;m?ic?e+c:b.width>c?e-a.left:e-a.right+b.width):ic?e-c:b.width>c?e-a.right+b.width:e-a.left);c=a.top;b.height-a.topf?k-f:b.height>f?k-a.bottom+b.height:k-a.top);if(CKEDITOR.env.ie){b=
+a=new CKEDITOR.dom.element(d.$.offsetParent);b.getName()=="html"&&(b=b.getDocument().getBody());b.getComputedStyle("direction")=="rtl"&&(e=CKEDITOR.env.ie8Compat?e-d.getDocument().getDocumentElement().$.scrollLeft*2:e-(a.$.scrollWidth-a.$.clientWidth))}var a=d.getFirst(),n;(n=a.getCustomData("activePanel"))&&n.onHide&&n.onHide.call(this,1);a.setCustomData("activePanel",this);d.setStyles({top:k+"px",left:e+"px"});d.setOpacity(1);h&&h()},this);j.isLoaded?a():j.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=
+CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();l.element.focus();if(CKEDITOR.env.webkit)CKEDITOR.document.getBody().$.scrollTop=a;this.allowBlur(true);this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},
+blur:function(){var a=this._.iframe.getFrameDocument().getActive();a.is("a")&&(this._.lastFocused=a)},hide:function(a){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(a=a&&this._.returnFocus)CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus(),a.focus();delete this._.lastFocused;
+this._.editor.fire("panelHide",this)}},allowBlur:function(a){var b=this._.panel;void 0!=a&&(b.allowBlur=a);return b.allowBlur},showAsChild:function(a,b,c,g,f,h){this._.activeChild==a&&a._.panel._.offsetParentId==c.getId()||(this.hideChild(),a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(b,c,g,f,h),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=
+""},100))},hideChild:function(a){var b=this._.activeChild;b&&(delete b.onHide,delete this._.activeChild,b.hide(),a&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),b;for(b in g){var c=g[b];a?c.destroy():c.element.hide()}a&&(g={})})})();CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(c){function m(l,g,e,h){var j=new CKEDITOR.style(i["colorButton_"+g+"Style"]),k=CKEDITOR.tools.getNextId()+"_colorBox";c.ui.add(l,CKEDITOR.UI_PANELBUTTON,{label:e,title:e,modes:{wysiwyg:1},editorFocus:0,toolbar:"colors,"+h,allowedContent:j,requiredContent:j,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":f.panelTitle}},onBlock:function(a,b){b.autoSize=!0;b.element.addClass("cke_colorblock");
 b.element.setHtml(o(a,g,k));b.element.getDocument().getBody().setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var d=b.keys,e="rtl"==c.lang.dir;d[e?37:39]="next";d[40]="next";d[9]="next";d[e?39:37]="prev";d[38]="prev";d[CKEDITOR.SHIFT+9]="prev";d[32]="click"},refresh:function(){c.activeFilter.check(j)||this.setState(CKEDITOR.TRISTATE_DISABLED)},onOpen:function(){var a=c.getSelection(),a=a&&a.getStartElement(),a=c.elementPath(a),b;if(a){a=a.block||a.blockLimit||c.document.getBody();do b=
 a&&a.getComputedStyle("back"==g?"background-color":"color")||"transparent";while("back"==g&&"transparent"==b&&a&&(a=a.getParent()));if(!b||"transparent"==b)b="#ffffff";this._.panel._.iframe.getFrameDocument().getById(k).setStyle("background-color",b);return b}}})}function o(l,g,e){var h=[],j=i.colorButton_colors.split(","),k=CKEDITOR.tools.addFunction(function(a,b){if("?"==a){var e=arguments.callee,d=function(a){this.removeListener("ok",d);this.removeListener("cancel",d);"ok"==a.name&&e(this.getContentElement("picker",
 "selectedColor").getValue(),b)};c.openDialog("colordialog",function(){this.on("ok",d);this.on("cancel",d)})}else{c.focus();l.hide();c.fire("saveSnapshot");c.removeStyle(new CKEDITOR.style(i["colorButton_"+b+"Style"],{color:"inherit"}));if(a){var f=i["colorButton_"+b+"Style"];f.childRule="back"==b?function(a){return n(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||n(a)};c.applyStyle(new CKEDITOR.style(f,{color:a}))}c.fire("saveSnapshot")}});h.push('{label}'+(CKEDITOR.env.hc?"▼":CKEDITOR.env.air?" ":"")+""),
 i=CKEDITOR.addTemplate("combo",d);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this,a,{canGroup:!1,title:a.label,modes:{wysiwyg:1},editorFocus:1});a=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=a.parent&&a.parent.getDocument()||CKEDITOR.document;a.className="cke_combopanel";a.block={multiSelect:a.multiSelect,attributes:a.attributes};a.toolbarRelated=!0;this._={panelDefinition:a,items:{}}},
-proto:{renderHtml:function(a){var b=[];this.render(a,b);return b.join("")},render:function(a,b){function g(){var c=this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(c=CKEDITOR.TRISTATE_DISABLED);this.setState(c);this.setValue("");c!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}var d=CKEDITOR.env,h="cke_"+this.id,e=CKEDITOR.tools.addFunction(function(b){j&&(a.unlockSelection(1),j=0);c.execute(b)},this),f=this,c={id:h,combo:this,focus:function(){CKEDITOR.document.getById(h).getChild(1).focus()},
-execute:function(c){var b=f._;if(b.state!=CKEDITOR.TRISTATE_DISABLED)if(f.createPanel(a),b.on)b.panel.hide();else{f.commit();var d=f.getValue();d?b.list.mark(d):b.list.unmarkAll();b.panel.showBlock(f.id,new CKEDITOR.dom.element(c),4)}},clickFn:e};a.on("activeFilterChange",g,this);a.on("mode",g,this);a.on("selectionChange",g,this);!this.readOnly&&a.on("readOnly",g,this);var k=CKEDITOR.tools.addFunction(function(b,d){var b=new CKEDITOR.dom.event(b),g=b.getKeystroke();if(40==g)a.once("panelShow",function(a){a.data._.panel._.currentBlock.onKeyDown(40)});
-switch(g){case 13:case 32:case 40:CKEDITOR.tools.callFunction(e,d);break;default:c.onkey(c,g)}b.preventDefault()}),l=CKEDITOR.tools.addFunction(function(){c.onfocus&&c.onfocus()}),j=0;c.keyDownFn=k;d={id:h,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:d.gecko&&!d.hc?"":(this.title||"").replace("'",""),keydownFn:k,focusFn:l,clickFn:e};i.output(d,b);if(this.onRender)this.onRender();return c},createPanel:function(a){if(!this._.panel){var b=this._.panelDefinition,
-d=this._.panelDefinition.block,i=b.parent||CKEDITOR.document.getBody(),h="cke_combopanel__"+this.name,e=new CKEDITOR.ui.floatPanel(a,i,b),f=e.addListBlock(this.id,d),c=this;e.onShow=function(){this.element.addClass(h);c.setState(CKEDITOR.TRISTATE_ON);c._.on=1;c.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(c.onOpen)c.onOpen();a.once("panelShow",function(){f.focus(!f.multiSelect&&c.getValue())})};e.onHide=function(b){this.element.removeClass(h);c.setState(c.modes&&c.modes[a.mode]?CKEDITOR.TRISTATE_OFF:
-CKEDITOR.TRISTATE_DISABLED);c._.on=0;if(!b&&c.onClose)c.onClose()};e.onEscape=function(){e.hide(1)};f.onClick=function(a,b){c.onClick&&c.onClick.call(c,a,b);e.hide()};this._.panel=e;this._.list=f;e.getBlock(this.id).onHide=function(){c._.on=0;c.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,b){this._.value=a;var d=this.document.getById("cke_"+this.id+"_text");d&&(!a&&!b?(b=this.label,d.addClass("cke_combo_inlinelabel")):d.removeClass("cke_combo_inlinelabel"),d.setText("undefined"!=
-typeof b?b:a))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(a,b,d){this._.items[a]=d||a;this._.list.add(a,b,d)},startGroup:function(a){this._.list.startGroup(a)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));
-this._.committed=1},setState:function(a){if(this._.state!=a){var b=this.document.getById("cke_"+this.id);b.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?b.setAttribute("aria-disabled",!0):b.removeAttribute("aria-disabled");this._.state=a}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},
-statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,b){this.add(a,CKEDITOR.UI_RICHCOMBO,b)}})();(function(){function e(b,a,e,h,j,n,l,o){for(var p=b.config,k=new CKEDITOR.style(l),c=j.split(";"),j=[],g={},d=0;d");"pre"==b&&(this._.inPre=0);a&&a.breakAfterClose&&(this.lineBreak(),this._.needsSpace=a.needsSpace);this._.afterCloser=1},text:function(b){this._.indent&&(this.indentation(),!this._.inPre&&(b=CKEDITOR.tools.ltrim(b)));this._.output.push(b)},comment:function(b){this._.indent&&this.indentation();
 this._.output.push("<\!--",b,"--\>")},lineBreak:function(){!this._.inPre&&0CKEDITOR.env.version&&(c.innerHTML=c.innerHTML.replace(/^.*<\!-- cke-content-start --\>/,""),setTimeout(function(){var a=new CKEDITOR.dom.range(new CKEDITOR.dom.document(b));a.setStart(new CKEDITOR.dom.node(c),0);d.getSelection().selectRanges([a])},0)));c.contentEditable=
+a.contextMenu&&a.contextMenu.addListener(function(a){if(a&&a.is("img")&&"iframe"==a.data("cke-real-element-type"))return{iframe:CKEDITOR.TRISTATE_OFF}})},afterInit:function(a){var b=a.dataProcessor;(b=b&&b.dataFilter)&&b.addRules({elements:{iframe:function(b){return a.createFakeParserElement(b,"cke_iframe","iframe",!0)}}})}})})();(function(){function k(a){var d=this.editor,b=a.document,c=b.body,e=b.getElementById("cke_actscrpt");e&&e.parentNode.removeChild(e);(e=b.getElementById("cke_shimscrpt"))&&e.parentNode.removeChild(e);CKEDITOR.env.gecko&&(c.contentEditable=!1,2E4>CKEDITOR.env.version&&(c.innerHTML=c.innerHTML.replace(/^.*<\!-- cke-content-start --\>/,""),setTimeout(function(){var a=new CKEDITOR.dom.range(new CKEDITOR.dom.document(b));a.setStart(new CKEDITOR.dom.node(c),0);d.getSelection().selectRanges([a])},0)));c.contentEditable=
 !0;CKEDITOR.env.ie&&(c.hideFocus=!0,c.disabled=!0,c.removeAttribute("disabled"));delete this._.isLoadingData;this.$=c;b=new CKEDITOR.dom.document(b);this.setup();CKEDITOR.env.ie&&(b.getDocumentElement().addClass(b.$.compatMode),d.config.enterMode!=CKEDITOR.ENTER_P&&this.attachListener(b,"selectionchange",function(){var a=b.getBody(),c=d.getSelection(),e=c&&c.getRanges()[0];e&&(a.getHtml().match(/^

(?: |
)<\/p>$/i)&&e.startContainer.equals(a))&&setTimeout(function(){e=d.getSelection().getRanges()[0]; -if(!e.startContainer.equals("body")){a.getFirst().remove(1);e.moveToElementEditEnd(a);e.select()}},0)}));if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10this.$.offsetHeight){var c=d.createRange();c[b==33?"moveToElementEditStart":"moveToElementEditEnd"](this); -c.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(b,"blur",function(){try{b.$.selection.empty()}catch(a){}});d.document.getElementsByTag("title").getItem(0).data("cke-title",d.document.$.title);CKEDITOR.env.ie&&(d.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){if(this.status=="unloaded")this.status="ready";d.fire("contentDom");if(this._.isPendingFocus){d.focus();this._.isPendingFocus=false}setTimeout(function(){d.fire("dataReady")},0);CKEDITOR.env.ie&& -setTimeout(function(){if(d.document){var a=d.document.$.body;a.runtimeStyle.marginBottom="0px";a.runtimeStyle.marginBottom=""}},1E3)},0,this)}function l(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}");var d=[],b;for(b in CKEDITOR.dtd.$removeEmpty)d.push("html.CSS1Compat "+b+"[contenteditable=false]");a.push(d.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(a.push("html{height:100% !important}"),a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")); -a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"});a.addMode("wysiwyg",function(d){function b(b){b&&b.removeListener();a.editable(new j(a,e.$.contentWindow.document.body));a.setData(a.getData(1),d)}var c="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+ -")();":"")+"document.close();",c=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent(c)+"}())":"",e=CKEDITOR.dom.element.createFromHtml('');e.setStyles({width:"100%",height:"100%"});e.addClass("cke_wysiwyg_frame cke_reset");var g=a.ui.space("contents");g.append(e);if(c=CKEDITOR.env.ie||CKEDITOR.env.gecko)e.on("load",b);var f=a.title,h=a.lang.common.editorHelp;f&&(CKEDITOR.env.ie&&(f+=", "+h),e.setAttribute("title", -f));var f=CKEDITOR.tools.getNextId(),i=CKEDITOR.dom.element.createFromHtml(''+h+"");g.append(i,1);a.on("beforeModeUnload",function(a){a.removeListener();i.remove()});e.setAttributes({"aria-describedby":f,tabIndex:a.tabIndex,allowTransparency:"true"});!c&&b();CKEDITOR.env.webkit&&(c=function(){g.setStyle("width","100%");e.hide();e.setSize("width",g.getSize("width"));g.removeStyle("width");e.show()},e.setCustomData("onResize",c),CKEDITOR.document.getWindow().on("resize", -c));a.fire("ariaWidget",e)})}});CKEDITOR.editor.prototype.addContentsCss=function(a){var d=this.config,b=d.contentsCss;CKEDITOR.tools.isArray(b)||(d.contentsCss=b?[b]:[]);d.contentsCss.push(a)};var j=CKEDITOR.tools.createClass({$:function(a){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(a){CKEDITOR.tools.setTimeout(k,0,this,a)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,d){var b= -this.editor;if(d)this.setHtml(a),b.fire("dataReady");else{this._.isLoadingData=!0;b._.dataStore={id:1};var c=b.config,e=c.fullPage,g=c.docType,f=CKEDITOR.tools.buildStyleHtml(l()).replace(/