core/assets/vendor/ckeditor/build-config.js | 3 +- core/assets/vendor/ckeditor/ckeditor.js | 395 +++++++++++---------- .../ckeditor/Plugin/CKEditorPlugin/Internal.php | 1 + .../lib/Drupal/ckeditor/Tests/CKEditorTest.php | 1 + 4 files changed, 203 insertions(+), 197 deletions(-) diff --git a/core/assets/vendor/ckeditor/build-config.js b/core/assets/vendor/ckeditor/build-config.js index 96bcc1c..6225504 100644 --- a/core/assets/vendor/ckeditor/build-config.js +++ b/core/assets/vendor/ckeditor/build-config.js @@ -67,6 +67,7 @@ var CKBUILDER_CONFIG = { 'sharedspace' : 1, 'sourcedialog' : 1, 'widget' : 1, - 'image2' : 1 + 'image2' : 1, + 'autogrow' : 1 } }; diff --git a/core/assets/vendor/ckeditor/ckeditor.js b/core/assets/vendor/ckeditor/ckeditor.js index 89c2a80..be8e7c4 100644 --- a/core/assets/vendor/ckeditor/ckeditor.js +++ b/core/assets/vendor/ckeditor/ckeditor.js @@ -2,12 +2,12 @@ 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)window.CKEDITOR||(window.CKEDITOR=function(){var b={timestamp:"E3P7",version:"4.4.0 DEV",revision:"0",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var c=window.CKEDITOR_BASEPATH||"";if(!c)for(var a=document.getElementsByTagName("script"),e=0;e=0;f--)if(l[f].priority<=i){l.splice(f+1,0,g);return{removeListener:k}}l.unshift(g)}return{removeListener:k}},once:function(){var c=arguments[1];arguments[1]=function(a){a.removeListener();return c.apply(this,arguments)};return this.on.apply(this, +function(){function b(c){var a=f(this);return a[c]||(a[c]=new d(c))}var f=function(c){c=c.getPrivate&&c.getPrivate()||c._||(c._={});return c.events||(c.events={})},d=function(c){this.name=c;this.listeners=[]};d.prototype={getListenerIndex:function(c){for(var a=0,e=this.listeners;a=0;o--)if(l[o].priority<=f){l.splice(o+1,0,g);return{removeListener:k}}l.unshift(g)}return{removeListener:k}},once:function(){var c=arguments[1];arguments[1]=function(a){a.removeListener();return c.apply(this,arguments)};return this.on.apply(this, arguments)},capture:function(){CKEDITOR.event.useCapture=1;var c=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return c},fire:function(){var c=0,a=function(){c=1},e=0,b=function(){e=1};return function(d,g,k){var l=f(this)[d],d=c,n=e;c=e=0;if(l){var o=l.listeners;if(o.length)for(var o=o.slice(0),q,j=0;j=0&&e.listeners.splice(b,1)}},removeAllListeners:function(){var c=f(this),a;for(a in c)delete c[a]},hasListeners:function(c){return(c=f(this)[c])&&c.listeners.length>0}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire= function(b,f){b in{instanceReady:1,loaded:1}&&(this[b]=true);return CKEDITOR.event.prototype.fire.call(this,b,f,this)},CKEDITOR.editor.prototype.fireOnce=function(b,f){b in{instanceReady:1,loaded:1}&&(this[b]=true);return CKEDITOR.event.prototype.fireOnce.call(this,b,f,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var b=navigator.userAgent.toLowerCase(),f={ie:b.indexOf("trident/")>-1,webkit:b.indexOf(" applewebkit/")>-1,air:b.indexOf(" adobeair/")> @@ -19,7 +19,7 @@ CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.load a.length;c++)if(a[c]!=e[c])return false;return true},clone:function(a){var e;if(a&&a instanceof Array){e=[];for(var c=0;c"+ -e+""):c.push('');return c.join("")},htmlEncode:function(l){return(""+l).replace(d,"&").replace(c,">").replace(a,"<")},htmlDecode:function(a){return a.replace(h,"&").replace(i,">").replace(g,"<")},htmlEncodeAttr:function(l){return l.replace(e,""").replace(a,"<").replace(c,">")},htmlDecodeAttr:function(a){return a.replace(k,'"').replace(g,"<").replace(i,">")},getNextNumber:function(){var a=0;return function(){return++a}}(), +e+""):c.push('');return c.join("")},htmlEncode:function(e){return(""+e).replace(d,"&").replace(c,">").replace(a,"<")},htmlDecode:function(a){return a.replace(h,"&").replace(i,">").replace(g,"<")},htmlEncodeAttr:function(l){return l.replace(e,""").replace(a,"<").replace(c,">")},htmlDecodeAttr:function(a){return a.replace(k,'"').replace(g,"<").replace(i,">")},getNextNumber:function(){var a=0;return function(){return++a}}(), getNextId:function(){return"cke_"+this.getNextNumber()},override:function(a,e){var c=e(a);c.prototype=a.prototype;return c},setTimeout:function(a,e,c,b,j){j||(j=window);c||(c=j);return j.setTimeout(function(){b?a.apply(c,[].concat(b)):a.apply(c)},e||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(e){return e.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(e){return e.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(e){return e.replace(a, "")}}(),indexOf:function(a,e){if(typeof e=="function")for(var c=0,b=a.length;c=0?a[c]:null},bind:function(a,e){return function(){return a.apply(e,arguments)}},createClass:function(a){var e=a.$,c=a.base,b=a.privates||a._,j=a.proto,a=a.statics;!e&&(e=function(){c&&this.base.apply(this,arguments)});if(b)var d=e,e=function(){var a= this._||(this._={}),e;for(e in b){var c=b[e];a[e]=typeof c=="function"?CKEDITOR.tools.bind(c,this):c}d.apply(this,arguments)};if(c){e.prototype=this.prototypedCopy(c.prototype);e.prototype.constructor=e;e.base=c;e.baseProto=c.prototype;e.prototype.base=function(){this.base=c.prototype.base;c.apply(this,arguments);this.base=arguments.callee}}j&&this.extend(e.prototype,j,true);a&&this.extend(e,a,true);return e},addFunction:function(a,e){return b.push(function(){return a.apply(e||this,arguments)})-1}, @@ -77,31 +77,31 @@ parseInt(this.getAttribute("tabindex"),10);isNaN(a)&&(a=-1)}return a}:function() function(){return a})()},getValue:function(){return this.$.value},getFirst:function(a){var e=this.$.firstChild;(e=e&&new CKEDITOR.dom.node(e))&&(a&&!a(e))&&(e=e.getNext(a));return e},getLast:function(a){var e=this.$.lastChild;(e=e&&new CKEDITOR.dom.node(e))&&(a&&!a(e))&&(e=e.getPrevious(a));return e},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},is:function(){var a=this.getName();if(typeof arguments[0]=="object")return!!arguments[0][a];for(var e=0;e0&&(c>2||!b[a[0].nodeName]||c==2&&!b[a[1].nodeName])},hasAttribute:function(){function a(a){a=this.$.attributes.getNamedItem(a);return!(!a||!a.specified)}return CKEDITOR.env.ie&&CKEDITOR.env.version<8?function(c){return c=="name"?!!this.$.name:a.call(this,c)}:a}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,c){var b=this.$,a=a.$;if(b!=a){var d;if(c)for(;d=b.lastChild;)a.insertBefore(b.removeChild(d), -a.firstChild);else for(;d=b.firstChild;)a.appendChild(b.removeChild(d))}},mergeSiblings:function(){function a(a,c,b){if(c&&c.type==CKEDITOR.NODE_ELEMENT){for(var d=[];c.data("cke-bookmark")||c.isEmptyInlineRemoveable();){d.push(c);c=b?c.getNext():c.getPrevious();if(!c||c.type!=CKEDITOR.NODE_ELEMENT)return}if(a.isIdentical(c)){for(var k=b?a.getLast():a.getFirst();d.length;)d.shift().move(a,!b);c.moveChildren(a,!b);c.remove();k&&k.type==CKEDITOR.NODE_ELEMENT&&k.mergeSiblings()}}}return function(c){if(c=== +a.firstChild);else for(;d=b.firstChild;)a.appendChild(b.removeChild(d))}},mergeSiblings:function(){function a(a,c,b){if(c&&c.type==CKEDITOR.NODE_ELEMENT){for(var d=[];c.data("cke-bookmark")||c.isEmptyInlineRemoveable();){d.push(c);c=b?c.getNext():c.getPrevious();if(!c||c.type!=CKEDITOR.NODE_ELEMENT)return}if(a.isIdentical(c)){for(var f=b?a.getLast():a.getFirst();d.length;)d.shift().move(a,!b);c.moveChildren(a,!b);c.remove();f&&f.type==CKEDITOR.NODE_ELEMENT&&f.mergeSiblings()}}}return function(c){if(c=== 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,c){this.$.setAttribute(a,c);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(c,b){c=="class"?this.$.className=b:c=="style"?this.$.style.cssText=b:c=="tabindex"?this.$.tabIndex=b:c=="checked"?this.$.checked=b:c=="contenteditable"?a.call(this, "contentEditable",b):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(c,b){if(c=="src"&&b.match(/^http:\/\//))try{a.apply(this,arguments)}catch(d){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var c in a)this.setAttribute(c,a[c]);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 c=0;c=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,c=this.getElementsByTag("*"),b=0,d=c.count();b0)f(0,c===true?l:c===false?g:l<0?l:g);if(b&&(k<0||d>0))f(k<0?k:d,0)},setState:function(a,c, +"static")return a;a=a.getParent()}return null},getDocumentPosition:function(a){var c=0,b=0,d=this.getDocument(),g=d.getBody(),f=d.$.compatMode=="BackCompat";if(document.documentElement.getBoundingClientRect){var l=this.$.getBoundingClientRect(),n=d.$.documentElement,o=n.clientTop||g.$.clientTop||0,q=n.clientLeft||g.$.clientLeft||0,j=true;if(CKEDITOR.env.ie){j=d.getDocumentElement().contains(this);d=d.getBody().contains(this);j=f&&d||!f&&j}if(j){c=l.left+(!f&&n.scrollLeft||g.$.scrollLeft);c=c-q;b= +l.top+(!f&&n.scrollTop||g.$.scrollTop);b=b-o}}else{g=this;for(d=null;g&&!(g.getName()=="body"||g.getName()=="html");){c=c+(g.$.offsetLeft-g.$.scrollLeft);b=b+(g.$.offsetTop-g.$.scrollTop);if(!g.equals(this)){c=c+(g.$.clientLeft||0);b=b+(g.$.clientTop||0)}for(;d&&!d.equals(g);){c=c-d.$.scrollLeft;b=b-d.$.scrollTop;d=d.getParent()}d=g;g=(l=g.$.offsetParent)?new CKEDITOR.dom.element(l):null}}if(a){g=this.getWindow();d=a.getWindow();if(!g.equals(d)&&g.$.frameElement){a=(new CKEDITOR.dom.element(g.$.frameElement)).getDocumentPosition(a); +c=c+a.x;b=b+a.y}}if(!document.documentElement.getBoundingClientRect&&CKEDITOR.env.gecko&&!f){c=c+(this.$.clientLeft?1:0);b=b+(this.$.clientTop?1:0)}return{x:c,y:b}},scrollIntoView:function(a){var c=this.getParent();if(c){do{(c.$.clientWidth&&c.$.clientWidth0)n(0,c===true?l:c===false?g:l<0?l:g);if(b&&(f<0||d>0))n(f<0?f:d,0)},setState:function(a,c, b){c=c||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(c+"_on");this.removeClass(c+"_off");this.removeClass(c+"_disabled");b&&this.setAttribute("aria-pressed",true);b&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(c+"_disabled");this.removeClass(c+"_off");this.removeClass(c+"_on");b&&this.setAttribute("aria-disabled",true);b&&this.removeAttribute("aria-pressed");break;default:this.addClass(c+"_off");this.removeClass(c+"_on");this.removeClass(c+ -"_disabled");b&&this.removeAttribute("aria-pressed");b&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(c){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,c){for(var b=this.$.attributes,c=c||{},d=0;d= +"_disabled");b&&this.removeAttribute("aria-pressed");b&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(c){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,c){for(var b=this.$.attributes,c=c||{},d=0;d= 0&&c0&&b;)b=a(b,c.shift());else b=a(b,c);return b?new CKEDITOR.dom.node(b):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,c){a="data-"+a;if(c===void 0)return this.getAttribute(a);c===false?this.removeAttribute(a):this.setAttribute(a,c);return null},getEditor:function(){var a=CKEDITOR.instances,c,b;for(c in a){b=a[c];if(b.element.equals(this)&&b.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return b}return null},find:function(a){var c=b(this),a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(f(this,a)));c();return a}, findOne:function(a){var c=b(this),a=this.$.querySelector(f(this,a));c();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,c,b){if(!b&&(!c||this.type==c))var d=a(this);if(d!==false)for(var b=this.getChildren(),g=0;g0?j.getChild(d-1):g(j,true)===false?null:j.getPreviousSourceNode(true,f,g));else{j=e;if(j.type== -CKEDITOR.NODE_ELEMENT&&!(j=j.getChild(l)))j=g(e,true)===false?null:e.getNextSourceNode(true,f,g)}j&&g(j)===false&&(j=null)}for(;j&&!this._.end;){this.current=j;if(!this.evaluator||this.evaluator(j)!==false){if(!c)return j}else if(c&&this.evaluator)return false;j=j[h](false,f,g)}this.end();return this.current=null}function f(a){for(var c,e=null;c=b.call(this,a);)e=c;return e}function d(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)|| +return null}b.optimize()}var j,e=b.startContainer;j=b.endContainer;var l=b.startOffset,d=b.endOffset,g,f=this.guard,k=this.type,h=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var i=j.type==CKEDITOR.NODE_ELEMENT?j:j.getParent(),r=j.type==CKEDITOR.NODE_ELEMENT?j.getChild(d):j.getNext();this._.guardLTR=function(a,c){return(!c||!i.equals(a))&&(!r||!a.equals(r))&&(a.type!=CKEDITOR.NODE_ELEMENT||!c||!a.equals(b.root))}}if(a&&!this._.guardRTL){var v=e.type==CKEDITOR.NODE_ELEMENT? +e:e.getParent(),x=e.type==CKEDITOR.NODE_ELEMENT?l?e.getChild(l-1):null:e.getPrevious();this._.guardRTL=function(a,c){return(!c||!v.equals(a))&&(!x||!a.equals(x))&&(a.type!=CKEDITOR.NODE_ELEMENT||!c||!a.equals(b.root))}}var z=a?this._.guardRTL:this._.guardLTR;g=f?function(a,c){return z(a,c)===false?false:f(a,c)}:z;if(this.current)j=this.current[h](false,k,g);else{if(a)j.type==CKEDITOR.NODE_ELEMENT&&(j=d>0?j.getChild(d-1):g(j,true)===false?null:j.getPreviousSourceNode(true,k,g));else{j=e;if(j.type== +CKEDITOR.NODE_ELEMENT&&!(j=j.getChild(l)))j=g(e,true)===false?null:e.getNextSourceNode(true,k,g)}j&&g(j)===false&&(j=null)}for(;j&&!this._.end;){this.current=j;if(!this.evaluator||this.evaluator(j)!==false){if(!c)return j}else if(c&&this.evaluator)return false;j=j[h](false,k,g)}this.end();return this.current=null}function f(a){for(var c,e=null;c=b.call(this,a);)e=c;return e}function d(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 c;if(c=!CKEDITOR.env.needsBrFiller)if(c=a.is(l))a:{c=0;for(var b=a.getChildCount();c0)if(k>=d.getChildCount()){d=d.append(a.document.createText(""));h=true}else d=d.getChild(k); -if(j.type==CKEDITOR.NODE_TEXT){j.split(g);j.equals(d)&&(d=j.getNext())}else if(g)if(g>=j.getChildCount()){j=j.append(a.document.createText(""));f=true}else j=j.getChild(g).getPrevious();else{j=j.append(a.document.createText(""),1);f=true}var g=j.getParents(),k=d.getParents(),i,w,y;for(i=0;i0&&!v.equals(d)&&(x=r.append(v.clone()));if(!g[b]||v.$.parentNode!=g[b].$.parentNode)for(v=v.getPrevious();v;){if(v.equals(g[b])||v.equals(j))break;z=v.getPrevious();if(c==2)r.$.insertBefore(v.$.cloneNode(true),r.$.firstChild);else{v.remove();c==1&&r.$.insertBefore(v.$,r.$.firstChild)}v=z}r&&(r=x)}if(c==2){w=a.startContainer;if(w.type==CKEDITOR.NODE_TEXT){w.$.data=w.$.data+w.$.nextSibling.data; -w.$.parentNode.removeChild(w.$.nextSibling)}a=a.endContainer;if(a.type==CKEDITOR.NODE_TEXT&&a.$.nextSibling){a.$.data=a.$.data+a.$.nextSibling.data;a.$.parentNode.removeChild(a.$.nextSibling)}}else{if(w&&y&&(j.$.parentNode!=w.$.parentNode||d.$.parentNode!=y.$.parentNode)){c=y.getIndex();f&&y.$.parentNode==j.$.parentNode&&c--;if(e&&w.type==CKEDITOR.NODE_ELEMENT){e=CKEDITOR.dom.element.createFromHtml(' ',a.document);e.insertAfter(w);w.mergeSiblings(false); -a.moveToBookmark({startNode:e})}else a.setStart(y.getParent(),c)}a.collapse(true)}f&&j.remove();h&&d.$.parentNode&&d.remove()},e={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(),i=/^[\t\r\n ]*(?: |\xa0)$/,g=CKEDITOR.dom.walker.editable(),k=CKEDITOR.dom.walker.ignored(true);CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root); +"getPreviousNode":"getNextNode"](function(a){!c&&k(a)&&(c=a);return g(a)&&!(h(a)&&a.equals(c))})}}var c=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},a=function(a,c,b,e){a.optimizeBookmark();var j=a.startContainer,d=a.endContainer,g=a.startOffset,f=a.endOffset,k,h;if(d.type==CKEDITOR.NODE_TEXT)d=d.split(f);else if(d.getChildCount()>0)if(f>=d.getChildCount()){d=d.append(a.document.createText(""));h=true}else d=d.getChild(f); +if(j.type==CKEDITOR.NODE_TEXT){j.split(g);j.equals(d)&&(d=j.getNext())}else if(g)if(g>=j.getChildCount()){j=j.append(a.document.createText(""));k=true}else j=j.getChild(g).getPrevious();else{j=j.append(a.document.createText(""),1);k=true}var g=j.getParents(),f=d.getParents(),i,w,y;for(i=0;i0&&!v.equals(d)&&(x=r.append(v.clone()));if(!g[b]||v.$.parentNode!=g[b].$.parentNode)for(v=v.getPrevious();v;){if(v.equals(g[b])||v.equals(j))break;z=v.getPrevious();if(c==2)r.$.insertBefore(v.$.cloneNode(true),r.$.firstChild);else{v.remove();c==1&&r.$.insertBefore(v.$,r.$.firstChild)}v=z}r&&(r=x)}if(c==2){w=a.startContainer;if(w.type==CKEDITOR.NODE_TEXT){w.$.data=w.$.data+w.$.nextSibling.data; +w.$.parentNode.removeChild(w.$.nextSibling)}a=a.endContainer;if(a.type==CKEDITOR.NODE_TEXT&&a.$.nextSibling){a.$.data=a.$.data+a.$.nextSibling.data;a.$.parentNode.removeChild(a.$.nextSibling)}}else{if(w&&y&&(j.$.parentNode!=w.$.parentNode||d.$.parentNode!=y.$.parentNode)){c=y.getIndex();k&&y.$.parentNode==j.$.parentNode&&c--;if(e&&w.type==CKEDITOR.NODE_ELEMENT){e=CKEDITOR.dom.element.createFromHtml(' ',a.document);e.insertAfter(w);w.mergeSiblings(false); +a.moveToBookmark({startNode:e})}else a.setStart(y.getParent(),c)}a.collapse(true)}k&&j.remove();h&&d.$.parentNode&&d.remove()},e={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(),i=/^[\t\r\n ]*(?: |\xa0)$/,g=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 c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||a(this,2,c);return c},deleteContents:function(c){this.collapsed|| a(this,0,null,c)},extractContents:function(c){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||a(this,1,b,c);return b},createBookmark:function(a){var c,b,e,j,d=this.collapsed;c=this.document.createElement("span");c.data("cke-bookmark",1);c.setStyle("display","none");c.setHtml(" ");if(a){e="cke_bm_"+CKEDITOR.tools.getNextNumber();c.setAttribute("id",e+(d?"C":"S"))}if(!d){b=c.clone();b.setHtml(" ");a&&b.setAttribute("id",e+"E");j=this.clone();j.collapse();j.insertNode(b)}j= this.clone();j.collapse(true);j.insertNode(c);if(b){this.setStartAfter(c);this.setEndBefore(b)}else this.moveToPosition(c,CKEDITOR.POSITION_AFTER_END);return{startNode:a?e+(d?"C":"S"):c,endNode:a?e+"E":b,serializable:a,collapsed:d}},createBookmark2:function(){function a(c){var b=c.container,e=c.offset,j;j=b;var d=e;j=j.type!=CKEDITOR.NODE_ELEMENT||d===0||d==j.getChildCount()?0:j.getChild(d-1).type==CKEDITOR.NODE_TEXT&&j.getChild(d).type==CKEDITOR.NODE_TEXT;if(j){b=b.getChild(e-1);e=b.getLength()}b.type== @@ -124,17 +124,17 @@ this.startContainer,c=this.endContainer,b=this.startOffset,e=this.endOffset,j;if CKEDITOR.POSITION_FOLLOWING&&(a=c);return{startNode:a,endNode:c}},getCommonAncestor:function(a,c){var b=this.startContainer,e=this.endContainer,b=b.equals(e)?a&&b.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?b.getChild(this.startOffset):b:b.getCommonAncestor(e);return c&&!b.is?b.getParent():b},optimize:function(){var a=this.startContainer,c=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(c?c>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;c=this.endOffset; a.type!=CKEDITOR.NODE_ELEMENT&&(c?c>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,c=this.endContainer;a.is&&(a.is("span")&&a.data("cke-bookmark"))&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);c&&(c.is&&c.is("span")&&c.data("cke-bookmark"))&&this.setEndAt(c,CKEDITOR.POSITION_AFTER_END)},trim:function(a,c){var b=this.startContainer,e=this.startOffset,j=this.collapsed;if((!a||j)&&b&&b.type==CKEDITOR.NODE_TEXT){if(e)if(e>=b.getLength()){e= b.getIndex()+1;b=b.getParent()}else{var d=b.split(e),e=b.getIndex()+1,b=b.getParent();if(this.startContainer.equals(this.endContainer))this.setEnd(d,this.endOffset-this.startOffset);else if(b.equals(this.endContainer))this.endOffset=this.endOffset+1}else{e=b.getIndex();b=b.getParent()}this.setStart(b,e);if(j){this.collapse(true);return}}b=this.endContainer;e=this.endOffset;if(!c&&!j&&b&&b.type==CKEDITOR.NODE_TEXT){if(e){e>=b.getLength()||b.split(e);e=b.getIndex()+1}else e=b.getIndex();b=b.getParent(); -this.setEnd(b,e)}},enlarge:function(a,c){function b(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var e=RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var j=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var d=this.getCommonAncestor(),g=this.root,k,f,h,i,w,y=false,r,v;r=this.startContainer;var x=this.startOffset;if(r.type==CKEDITOR.NODE_TEXT){if(x){r=!CKEDITOR.tools.trim(r.substring(0,x)).length&&r;y=!!r}if(r&&!(i=r.getPrevious()))h=r.getParent()}else{x&& -(i=r.getChild(x-1)||r.getLast());i||(h=r)}for(h=b(h);h||i;){if(h&&!i){!w&&h.equals(d)&&(w=true);if(j?h.isBlockBoundary():!g.contains(h))break;if(!y||h.getComputedStyle("display")!="inline"){y=false;w?k=h:this.setStartBefore(h)}i=h.getPrevious()}for(;i;){r=false;if(i.type==CKEDITOR.NODE_COMMENT)i=i.getPrevious();else{if(i.type==CKEDITOR.NODE_TEXT){v=i.getText();e.test(v)&&(i=null);r=/[\s\ufeff]$/.test(v)}else if((i.$.offsetWidth>0||c&&i.is("br"))&&!i.data("cke-bookmark"))if(y&&CKEDITOR.dtd.$removeEmpty[i.getName()]){v= -i.getText();if(e.test(v))i=null;else for(var x=i.$.getElementsByTagName("*"),z=0,B;B=x[z++];)if(!CKEDITOR.dtd.$removeEmpty[B.nodeName.toLowerCase()]){i=null;break}i&&(r=!!v.length)}else i=null;r&&(y?w?k=h:h&&this.setStartBefore(h):y=true);if(i){r=i.getPrevious();if(!h&&!r){h=i;i=null;break}i=r}else h=null}}h&&(h=b(h.getParent()))}r=this.endContainer;x=this.endOffset;h=i=null;w=y=false;var F=function(a,c){var b=new CKEDITOR.dom.range(g);b.setStart(a,c);b.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);var b= +this.setEnd(b,e)}},enlarge:function(a,c){function b(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var e=RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var j=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var d=this.getCommonAncestor(),g=this.root,f,k,h,i,w,y=false,r,v;r=this.startContainer;var x=this.startOffset;if(r.type==CKEDITOR.NODE_TEXT){if(x){r=!CKEDITOR.tools.trim(r.substring(0,x)).length&&r;y=!!r}if(r&&!(i=r.getPrevious()))h=r.getParent()}else{x&& +(i=r.getChild(x-1)||r.getLast());i||(h=r)}for(h=b(h);h||i;){if(h&&!i){!w&&h.equals(d)&&(w=true);if(j?h.isBlockBoundary():!g.contains(h))break;if(!y||h.getComputedStyle("display")!="inline"){y=false;w?f=h:this.setStartBefore(h)}i=h.getPrevious()}for(;i;){r=false;if(i.type==CKEDITOR.NODE_COMMENT)i=i.getPrevious();else{if(i.type==CKEDITOR.NODE_TEXT){v=i.getText();e.test(v)&&(i=null);r=/[\s\ufeff]$/.test(v)}else if((i.$.offsetWidth>0||c&&i.is("br"))&&!i.data("cke-bookmark"))if(y&&CKEDITOR.dtd.$removeEmpty[i.getName()]){v= +i.getText();if(e.test(v))i=null;else for(var x=i.$.getElementsByTagName("*"),z=0,B;B=x[z++];)if(!CKEDITOR.dtd.$removeEmpty[B.nodeName.toLowerCase()]){i=null;break}i&&(r=!!v.length)}else i=null;r&&(y?w?f=h:h&&this.setStartBefore(h):y=true);if(i){r=i.getPrevious();if(!h&&!r){h=i;i=null;break}i=r}else h=null}}h&&(h=b(h.getParent()))}r=this.endContainer;x=this.endOffset;h=i=null;w=y=false;var F=function(a,c){var b=new CKEDITOR.dom.range(g);b.setStart(a,c);b.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);var b= new CKEDITOR.dom.walker(b),j;for(b.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};j=b.next();){if(j.type!=CKEDITOR.NODE_TEXT)return false;v=j!=a?j.getText():j.substring(c);if(e.test(v))return false}return true};if(r.type==CKEDITOR.NODE_TEXT)if(CKEDITOR.tools.trim(r.substring(x)).length)y=true;else{y=!r.getLength();if(x==r.getLength()){if(!(i=r.getNext()))h=r.getParent()}else F(r,x)&&(h=r.getParent())}else(i=r.getChild(x))||(h=r);for(;h||i;){if(h&&!i){!w&&h.equals(d)&& -(w=true);if(j?h.isBlockBoundary():!g.contains(h))break;if(!y||h.getComputedStyle("display")!="inline"){y=false;w?f=h:h&&this.setEndAfter(h)}i=h.getNext()}for(;i;){r=false;if(i.type==CKEDITOR.NODE_TEXT){v=i.getText();F(i,0)||(i=null);r=/^[\s\ufeff]/.test(v)}else if(i.type==CKEDITOR.NODE_ELEMENT){if((i.$.offsetWidth>0||c&&i.is("br"))&&!i.data("cke-bookmark"))if(y&&CKEDITOR.dtd.$removeEmpty[i.getName()]){v=i.getText();if(e.test(v))i=null;else{x=i.$.getElementsByTagName("*");for(z=0;B=x[z++];)if(!CKEDITOR.dtd.$removeEmpty[B.nodeName.toLowerCase()]){i= -null;break}}i&&(r=!!v.length)}else i=null}else r=1;r&&y&&(w?f=h:this.setEndAfter(h));if(i){r=i.getNext();if(!h&&!r){h=i;i=null;break}i=r}else h=null}h&&(h=b(h.getParent()))}if(k&&f){d=k.contains(f)?f:k;this.setStartBefore(d);this.setEndAfter(d)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:h=new CKEDITOR.dom.range(this.root);g=this.root;h.setStartAt(g,CKEDITOR.POSITION_AFTER_START);h.setEnd(this.startContainer,this.startOffset);h=new CKEDITOR.dom.walker(h);var C, +(w=true);if(j?h.isBlockBoundary():!g.contains(h))break;if(!y||h.getComputedStyle("display")!="inline"){y=false;w?k=h:h&&this.setEndAfter(h)}i=h.getNext()}for(;i;){r=false;if(i.type==CKEDITOR.NODE_TEXT){v=i.getText();F(i,0)||(i=null);r=/^[\s\ufeff]/.test(v)}else if(i.type==CKEDITOR.NODE_ELEMENT){if((i.$.offsetWidth>0||c&&i.is("br"))&&!i.data("cke-bookmark"))if(y&&CKEDITOR.dtd.$removeEmpty[i.getName()]){v=i.getText();if(e.test(v))i=null;else{x=i.$.getElementsByTagName("*");for(z=0;B=x[z++];)if(!CKEDITOR.dtd.$removeEmpty[B.nodeName.toLowerCase()]){i= +null;break}}i&&(r=!!v.length)}else i=null}else r=1;r&&y&&(w?k=h:this.setEndAfter(h));if(i){r=i.getNext();if(!h&&!r){h=i;i=null;break}i=r}else h=null}h&&(h=b(h.getParent()))}if(f&&k){d=f.contains(k)?k:f;this.setStartBefore(d);this.setEndAfter(d)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:h=new CKEDITOR.dom.range(this.root);g=this.root;h.setStartAt(g,CKEDITOR.POSITION_AFTER_START);h.setEnd(this.startContainer,this.startOffset);h=new CKEDITOR.dom.walker(h);var C, E,D=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),I=null,J=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&a.getAttribute("contenteditable")=="false")if(I){if(I.equals(a)){I=null;return}}else I=a;else if(I)return;var c=D(a);c||(C=a);return c},j=function(a){var c=J(a);!c&&(a.is&&a.is("br"))&&(E=a);return c};h.guard=J;h=h.lastBackward();C=C||g;this.setStartAt(C,!C.is("br")&&(!h&&this.checkStartOfBlock()||h&&C.contains(h))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END); if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){h=this.clone();h=new CKEDITOR.dom.walker(h);var G=CKEDITOR.dom.walker.whitespaces(),U=CKEDITOR.dom.walker.bookmark();h.evaluator=function(a){return!G(a)&&!U(a)};if((h=h.previous())&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("br"))break}h=this.clone();h.collapse();h.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);h=new CKEDITOR.dom.walker(h);h.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?j:J;C=null;h=h.lastForward();C=C||g;this.setEndAt(C,!h&&this.checkEndOfBlock()||h&& -C.contains(h)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);E&&this.setEndAfter(E)}},shrink:function(a,c,b){if(!this.collapsed){var a=a||CKEDITOR.SHRINK_TEXT,e=this.clone(),j=this.startContainer,d=this.endContainer,g=this.startOffset,h=this.endOffset,k=1,f=1;if(j&&j.type==CKEDITOR.NODE_TEXT)if(g)if(g>=j.getLength())e.setStartAfter(j);else{e.setStartBefore(j);k=0}else e.setStartBefore(j);if(d&&d.type==CKEDITOR.NODE_TEXT)if(h)if(h>=d.getLength())e.setEndAfter(d);else{e.setEndAfter(d); -f=0}else e.setEndBefore(d);var e=new CKEDITOR.dom.walker(e),i=CKEDITOR.dom.walker.bookmark();e.evaluator=function(c){return c.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var w;e.guard=function(c,e){if(i(c))return true;if(a==CKEDITOR.SHRINK_ELEMENT&&c.type==CKEDITOR.NODE_TEXT||e&&c.equals(w)||b===false&&c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()||c.type==CKEDITOR.NODE_ELEMENT&&c.hasAttribute("contenteditable"))return false;!e&&c.type==CKEDITOR.NODE_ELEMENT&& -(w=c);return true};if(k)(j=e[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(j,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);if(f){e.reset();(e=e[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(e,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!k&&!f)}},insertNode:function(a){this.optimizeBookmark();this.trim(false,true);var c=this.startContainer,b=c.getChild(this.startOffset);b?a.insertBefore(b):c.append(a);a.getParent()&& +C.contains(h)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);E&&this.setEndAfter(E)}},shrink:function(a,c,b){if(!this.collapsed){var a=a||CKEDITOR.SHRINK_TEXT,e=this.clone(),j=this.startContainer,d=this.endContainer,g=this.startOffset,f=this.endOffset,h=1,i=1;if(j&&j.type==CKEDITOR.NODE_TEXT)if(g)if(g>=j.getLength())e.setStartAfter(j);else{e.setStartBefore(j);h=0}else e.setStartBefore(j);if(d&&d.type==CKEDITOR.NODE_TEXT)if(f)if(f>=d.getLength())e.setEndAfter(d);else{e.setEndAfter(d); +i=0}else e.setEndBefore(d);var e=new CKEDITOR.dom.walker(e),k=CKEDITOR.dom.walker.bookmark();e.evaluator=function(c){return c.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var w;e.guard=function(c,e){if(k(c))return true;if(a==CKEDITOR.SHRINK_ELEMENT&&c.type==CKEDITOR.NODE_TEXT||e&&c.equals(w)||b===false&&c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()||c.type==CKEDITOR.NODE_ELEMENT&&c.hasAttribute("contenteditable"))return false;!e&&c.type==CKEDITOR.NODE_ELEMENT&& +(w=c);return true};if(h)(j=e[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(j,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);if(i){e.reset();(e=e[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(e,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!h&&!i)}},insertNode:function(a){this.optimizeBookmark();this.trim(false,true);var c=this.startContainer,b=c.getChild(this.startOffset);b?a.insertBefore(b):c.append(a);a.getParent()&& a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,c){this.setStartAt(a,c);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)},setEndAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a, @@ -153,32 +153,32 @@ CKEDITOR.POSITION_BEFORE_START);b.setEndAt(j,CKEDITOR.POSITION_AFTER_END)}else b c=CKEDITOR.dom.walker.bookmark(false,true),b=CKEDITOR.dom.walker.whitespaces(true);a.evaluator=function(a){return b(a)&&c(a)};var e=a.next();a.reset();return e&&e.equals(a.previous())?e:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:d(), getPreviousEditableNode:d(1),scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml(" ",this.document),c,b,e,j=this.clone();j.optimize();if(e=j.startContainer.type==CKEDITOR.NODE_TEXT){b=j.startContainer.getText();c=j.startContainer.split(j.startOffset);a.insertAfter(j.startContainer)}else j.insertNode(a);a.scrollIntoView();if(e){j.startContainer.setText(b);c.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 b(a){if(!(arguments.length<1)){this.range=a;this.forceBrBreak=0;this.enlargeBr=1;this.enforceRealBlocks=0;this._||(this._={})}}function f(a,c,b){for(a=a.getNextSourceNode(c,null,b);!e(a);)a=a.getNextSourceNode(c,null,b);return a}function d(a){var c= -[];a.forEach(function(a){if(a.getAttribute("contenteditable")=="true"){c.push(a);return false}},CKEDITOR.NODE_ELEMENT,true);return c}function c(a,b,e,h){a:{h==void 0&&(h=d(e));for(var f;f=h.shift();)if(f.getDtd().p){h={element:f,remaining:h};break a}h=null}if(!h)return 0;if((f=CKEDITOR.filter.instances[h.element.data("cke-filter")])&&!f.check(b))return c(a,b,e,h.remaining);b=new CKEDITOR.dom.range(h.element);b.selectNodeContents(h.element);b=b.createIterator();b.enlargeBr=a.enlargeBr;b.enforceRealBlocks= -a.enforceRealBlocks;b.activeFilter=b.filter=f;a._.nestedEditable={element:h.element,container:e,remaining:h.remaining,iterator:b};return 1}var a=/^[\r\n\t ]+$/,e=CKEDITOR.dom.walker.bookmark(false,true),h=CKEDITOR.dom.walker.whitespaces(true),i=function(a){return e(a)&&h(a)};b.prototype={getNextParagraph:function(b){var d,h,n,o,q,b=b||"p";if(this._.nestedEditable){if(d=this._.nestedEditable.iterator.getNextParagraph(b)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return d}this.activeFilter= +[];a.forEach(function(a){if(a.getAttribute("contenteditable")=="true"){c.push(a);return false}},CKEDITOR.NODE_ELEMENT,true);return c}function c(a,b,e,f){a:{f==void 0&&(f=d(e));for(var h;h=f.shift();)if(h.getDtd().p){f={element:h,remaining:f};break a}f=null}if(!f)return 0;if((h=CKEDITOR.filter.instances[f.element.data("cke-filter")])&&!h.check(b))return c(a,b,e,f.remaining);b=new CKEDITOR.dom.range(f.element);b.selectNodeContents(f.element);b=b.createIterator();b.enlargeBr=a.enlargeBr;b.enforceRealBlocks= +a.enforceRealBlocks;b.activeFilter=b.filter=h;a._.nestedEditable={element:f.element,container:e,remaining:f.remaining,iterator:b};return 1}var a=/^[\r\n\t ]+$/,e=CKEDITOR.dom.walker.bookmark(false,true),h=CKEDITOR.dom.walker.whitespaces(true),i=function(a){return e(a)&&h(a)};b.prototype={getNextParagraph:function(b){var d,h,n,o,q,b=b||"p";if(this._.nestedEditable){if(d=this._.nestedEditable.iterator.getNextParagraph(b)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return d}this.activeFilter= this.filter;if(c(this,b,this._.nestedEditable.container,this._.nestedEditable.remaining)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return this._.nestedEditable.iterator.getNextParagraph(b)}this._.nestedEditable=null}if(!this.range.root.getDtd()[b])return null;if(!this._.started){var j=this.range.clone();j.shrink(CKEDITOR.SHRINK_ELEMENT,true);h=j.endContainer.hasAscendant("pre",true)||j.startContainer.hasAscendant("pre",true);j.enlarge(this.forceBrBreak&&!h||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS: CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(!j.collapsed){h=new CKEDITOR.dom.walker(j.clone());var m=CKEDITOR.dom.walker.bookmark(true,true);h.evaluator=m;this._.nextNode=h.next();h=new CKEDITOR.dom.walker(j.clone());h.evaluator=m;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()){m=this.range.clone();m.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END); -if(m.checkEndOfBlock()){m=new CKEDITOR.dom.elementPath(m.endContainer,m.root);this._.lastNode=(m.block||m.blockLimit).getNextSourceNode(true)}}if(!this._.lastNode||!j.root.contains(this._.lastNode)){this._.lastNode=this._.docEndMarker=j.document.createText("");this._.lastNode.insertAfter(h)}j=null}this._.started=1;h=j}m=this._.nextNode;j=this._.lastNode;for(this._.nextNode=null;m;){var p=0,s=m.hasAscendant("pre"),u=m.type!=CKEDITOR.NODE_ELEMENT,t=0;if(u)m.type==CKEDITOR.NODE_TEXT&&a.test(m.getText())&& -(u=0);else{var A=m.getName();if(CKEDITOR.dtd.$block[A]&&m.getAttribute("contenteditable")=="false"){d=m;c(this,b,d);break}else if(m.isBlockBoundary(this.forceBrBreak&&!s&&{br:1})){if(A=="br")u=1;else if(!h&&!m.getChildCount()&&A!="hr"){d=m;n=m.equals(j);break}if(h){h.setEndAt(m,CKEDITOR.POSITION_BEFORE_START);if(A!="br")this._.nextNode=m}p=1}else{if(m.getFirst()){if(!h){h=this.range.clone();h.setStartAt(m,CKEDITOR.POSITION_BEFORE_START)}m=m.getFirst();continue}u=1}}if(u&&!h){h=this.range.clone(); -h.setStartAt(m,CKEDITOR.POSITION_BEFORE_START)}n=(!p||u)&&m.equals(j);if(h&&!p)for(;!m.getNext(i)&&!n;){A=m.getParent();if(A.isBlockBoundary(this.forceBrBreak&&!s&&{br:1})){p=1;u=0;n||A.equals(j);h.setEndAt(A,CKEDITOR.POSITION_BEFORE_END);break}m=A;u=1;n=m.equals(j);t=1}u&&h.setEndAt(m,CKEDITOR.POSITION_AFTER_END);m=f(m,t,j);if((n=!m)||p&&h)break}if(!d){if(!h){this._.docEndMarker&&this._.docEndMarker.remove();return this._.nextNode=null}d=new CKEDITOR.dom.elementPath(h.startContainer,h.root);m=d.blockLimit; +if(m.checkEndOfBlock()){m=new CKEDITOR.dom.elementPath(m.endContainer,m.root);this._.lastNode=(m.block||m.blockLimit).getNextSourceNode(true)}}if(!this._.lastNode||!j.root.contains(this._.lastNode)){this._.lastNode=this._.docEndMarker=j.document.createText("");this._.lastNode.insertAfter(h)}j=null}this._.started=1;h=j}m=this._.nextNode;j=this._.lastNode;for(this._.nextNode=null;m;){var p=0,t=m.hasAscendant("pre"),u=m.type!=CKEDITOR.NODE_ELEMENT,s=0;if(u)m.type==CKEDITOR.NODE_TEXT&&a.test(m.getText())&& +(u=0);else{var A=m.getName();if(CKEDITOR.dtd.$block[A]&&m.getAttribute("contenteditable")=="false"){d=m;c(this,b,d);break}else if(m.isBlockBoundary(this.forceBrBreak&&!t&&{br:1})){if(A=="br")u=1;else if(!h&&!m.getChildCount()&&A!="hr"){d=m;n=m.equals(j);break}if(h){h.setEndAt(m,CKEDITOR.POSITION_BEFORE_START);if(A!="br")this._.nextNode=m}p=1}else{if(m.getFirst()){if(!h){h=this.range.clone();h.setStartAt(m,CKEDITOR.POSITION_BEFORE_START)}m=m.getFirst();continue}u=1}}if(u&&!h){h=this.range.clone(); +h.setStartAt(m,CKEDITOR.POSITION_BEFORE_START)}n=(!p||u)&&m.equals(j);if(h&&!p)for(;!m.getNext(i)&&!n;){A=m.getParent();if(A.isBlockBoundary(this.forceBrBreak&&!t&&{br:1})){p=1;u=0;n||A.equals(j);h.setEndAt(A,CKEDITOR.POSITION_BEFORE_END);break}m=A;u=1;n=m.equals(j);s=1}u&&h.setEndAt(m,CKEDITOR.POSITION_AFTER_END);m=f(m,s,j);if((n=!m)||p&&h)break}if(!d){if(!h){this._.docEndMarker&&this._.docEndMarker.remove();return this._.nextNode=null}d=new CKEDITOR.dom.elementPath(h.startContainer,h.root);m=d.blockLimit; p={div:1,th:1,td:1};d=d.block;if(!d&&m&&!this.enforceRealBlocks&&p[m.getName()]&&h.checkStartOfBlock()&&h.checkEndOfBlock()&&!m.equals(h.root))d=m;else if(!d||this.enforceRealBlocks&&d.getName()=="li"){d=this.range.document.createElement(b);h.extractContents().appendTo(d);d.trim();h.insertNode(d);o=q=true}else if(d.getName()!="li"){if(!h.checkStartOfBlock()||!h.checkEndOfBlock()){d=d.clone(false);h.extractContents().appendTo(d);d.trim();q=h.splitBlock();o=!q.wasStartOfBlock;q=!q.wasEndOfBlock;h.insertNode(d)}}else if(!n)this._.nextNode= d.equals(j)?null:f(h.getBoundaryNodes().endNode,1,j)}if(o)(o=d.getPrevious())&&o.type==CKEDITOR.NODE_ELEMENT&&(o.getName()=="br"?o.remove():o.getLast()&&o.getLast().$.nodeName.toLowerCase()=="br"&&o.getLast().remove());if(q)(o=d.getLast())&&o.type==CKEDITOR.NODE_ELEMENT&&o.getName()=="br"&&(!CKEDITOR.env.needsBrFiller||o.getPrevious(e)||o.getNext(e))&&o.remove();if(!this._.nextNode)this._.nextNode=n||d.equals(j)||!j?null:f(d,1,j);return d}};CKEDITOR.dom.range.prototype.createIterator=function(){return new b(this)}}(), CKEDITOR.command=function(b,f){this.uiItems=[];this.exec=function(c){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return false;this.editorFocus&&b.focus();return this.fire("exec")===false?true:f.exec.call(this,b,c)!==false};this.refresh=function(c,a){if(!this.readOnly&&c.readOnly)return true;if(this.context&&!a.isContextFor(this.context)){this.disable();return true}if(!this.checkAllowed(true)){this.disable();return true}this.startDisabled||this.enable();this.modes&&!this.modes[c.mode]&& this.disable();return this.fire("refresh",{editor:c,path:a})===false?true:f.refresh&&f.refresh.apply(this,arguments)!==false};var d;this.checkAllowed=function(c){return!c&&typeof d=="boolean"?d:d=b.activeFilter.checkFeature(this)};CKEDITOR.tools.extend(this,f,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!f.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)},CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(!this.preserveState|| typeof this.previousState=="undefined"?CKEDITOR.TRISTATE_OFF:this.previousState)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(b){if(this.state==b||b!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return false;this.previousState=this.state;this.state=b;this.fire("state");return true},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype), CKEDITOR.ENTER_P=1,CKEDITOR.ENTER_BR=2,CKEDITOR.ENTER_DIV=3,CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"",bodyId:"",bodyClass:"",fullPage:!1,height:200,extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function b(a, -c,b,e,d){var j,g,a=[];for(j in c){g=c[j];g=typeof g=="boolean"?{}:typeof g=="function"?{match:g}:F(g);if(j.charAt(0)!="$")g.elements=j;if(b)g.featureName=b.toLowerCase();var f=g;f.elements=h(f.elements,/\s+/)||null;f.propertiesOnly=f.propertiesOnly||f.elements===true;var i=/\s*,\s*/,m=void 0;for(m in I){f[m]=h(f[m],i)||null;var k=f,l=J[m],p=h(f[J[m]],i),t=f[m],u=[],D=true,n=void 0;p?D=false:p={};for(n in t)if(n.charAt(0)=="!"){n=n.slice(1);u.push(n);p[n]=true;D=false}for(;n=u.pop();){t[n]=t["!"+n]; -delete t["!"+n]}k[l]=(D?false:p)||null}f.match=f.match||null;e.push(g);a.push(g)}for(var c=d.elements,d=d.generic,w,b=0,e=a.length;b-1?p.push(RegExp("^"+t.replace(/\*/g,".*")+"$")):p.push(t);l=p;if(l.length){f[i]=l;k=false}}f.nothingRequired=k;f.noProperties=!(f.attributes||f.classes||f.styles);if(j.elements=== -true||j.elements===null)d[g?"unshift":"push"](j);else{f=j.elements;delete j.elements;for(w in f)if(c[w])c[w][g?"unshift":"push"](j);else c[w]=[j]}}}function f(a,c,b,e){if(!a.match||a.match(c))if(e||i(a,c)){if(!a.propertiesOnly)b.valid=true;if(!b.allAttributes)b.allAttributes=d(a.attributes,c.attributes,b.validAttributes);if(!b.allStyles)b.allStyles=d(a.styles,c.styles,b.validStyles);if(!b.allClasses){a=a.classes;c=c.classes;e=b.validClasses;if(a)if(a===true)a=true;else{for(var j=0,g=c.length,h;j< -g;++j){h=c[j];e[h]||(e[h]=a(h))}a=false}else a=false;b.allClasses=a}}}function d(a,c,b){if(!a)return false;if(a===true)return true;for(var e in c)b[e]||(b[e]=a(e));return false}function c(c,b,e){if(!c.match||c.match(b)){if(c.noProperties)return false;e.hadInvalidAttribute=a(c.attributes,b.attributes)||e.hadInvalidAttribute;e.hadInvalidStyle=a(c.styles,b.styles)||e.hadInvalidStyle;c=c.classes;b=b.classes;if(c){for(var j=false,d=c===true,g=b.length;g--;)if(d||c(b[g])){b.splice(g,1);j=true}c=j}else c= +c,b,e,d){var j,g,a=[];for(j in c){g=c[j];g=typeof g=="boolean"?{}:typeof g=="function"?{match:g}:F(g);if(j.charAt(0)!="$")g.elements=j;if(b)g.featureName=b.toLowerCase();var f=g;f.elements=h(f.elements,/\s+/)||null;f.propertiesOnly=f.propertiesOnly||f.elements===true;var i=/\s*,\s*/,m=void 0;for(m in I){f[m]=h(f[m],i)||null;var k=f,p=J[m],l=h(f[J[m]],i),s=f[m],u=[],D=true,n=void 0;l?D=false:l={};for(n in s)if(n.charAt(0)=="!"){n=n.slice(1);u.push(n);l[n]=true;D=false}for(;n=u.pop();){s[n]=s["!"+n]; +delete s["!"+n]}k[p]=(D?false:l)||null}f.match=f.match||null;e.push(g);a.push(g)}for(var c=d.elements,d=d.generic,w,b=0,e=a.length;b-1?l.push(RegExp("^"+s.replace(/\*/g,".*")+"$")):l.push(s);p=l;if(p.length){f[i]=p;k=false}}f.nothingRequired=k;f.noProperties=!(f.attributes||f.classes||f.styles);if(j.elements=== +true||j.elements===null)d[g?"unshift":"push"](j);else{f=j.elements;delete j.elements;for(w in f)if(c[w])c[w][g?"unshift":"push"](j);else c[w]=[j]}}}function f(a,c,b,e){if(!a.match||a.match(c))if(e||i(a,c)){if(!a.propertiesOnly)b.valid=true;if(!b.allAttributes)b.allAttributes=d(a.attributes,c.attributes,b.validAttributes);if(!b.allStyles)b.allStyles=d(a.styles,c.styles,b.validStyles);if(!b.allClasses){a=a.classes;c=c.classes;e=b.validClasses;if(a)if(a===true)a=true;else{for(var j=0,g=c.length,f;j< +g;++j){f=c[j];e[f]||(e[f]=a(f))}a=false}else a=false;b.allClasses=a}}}function d(a,c,b){if(!a)return false;if(a===true)return true;for(var e in c)b[e]||(b[e]=a(e));return false}function c(c,b,e){if(!c.match||c.match(b)){if(c.noProperties)return false;e.hadInvalidAttribute=a(c.attributes,b.attributes)||e.hadInvalidAttribute;e.hadInvalidStyle=a(c.styles,b.styles)||e.hadInvalidStyle;c=c.classes;b=b.classes;if(c){for(var j=false,d=c===true,g=b.length;g--;)if(d||c(b[g])){b.splice(g,1);j=true}c=j}else c= false;e.hadInvalidClass=c||e.hadInvalidClass}}function a(a,c){if(!a)return false;var b=false,e=a===true,j;for(j in c)if(e||a(j)){delete c[j];b=true}return b}function e(a,c,b){if(a.disabled||a.customConfig&&!b||!c)return false;a._.cachedChecks={};return true}function h(a,c){if(!a)return false;if(a===true)return a;if(typeof a=="string"){a=C(a);return a=="*"?true:CKEDITOR.tools.convertArrayToObject(a.split(c))}if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a):false; var b={},e=0,j;for(j in a){b[j]=a[j];e++}return e?b:false}function i(a,c){if(a.nothingRequired)return true;var b,e,j,d;if(j=a.requiredClasses){d=c.classes;for(b=0;b-1&&c.push(b.replace(/\*/g,".*"));return c.length?RegExp("^(?:"+c.join("|")+")$"):null}function m(a){var c=a.attributes,b;delete c.style;delete c["class"];if(b=CKEDITOR.tools.writeCssText(a.styles,true))c.style=b;a.classes.length&&(c["class"]=a.classes.sort().join(" "))}function p(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 s(a){if(!a)return false;if(a===true)return true; -var c=j(a);return function(b){return b in a||c&&b.match(c)}}function u(){return new CKEDITOR.htmlParser.element("br")}function t(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.name=="br"||z.$block[a.name])}function A(a,c,b){var e=a.name;if(z.$empty[e]||!a.children.length)if(e=="hr"&&c=="br")a.replaceWith(u());else{a.parent&&b.push({check:"it",el:a.parent});a.remove()}else if(z.$block[e]||e=="tr")if(c=="br"){if(a.previous&&!t(a.previous)){c=u();c.insertBefore(a)}if(a.next&&!t(a.next)){c=u();c.insertAfter(a)}a.replaceWithChildren()}else{var e= +i=a._;a=i.allowedRules.elements[h];g=i.allowedRules.generic;h=i.disallowedRules.elements[h];i=i.disallowedRules.generic;k=j.skipRequired;l={valid:false,validAttributes:{},validClasses:{},validStyles:{},allAttributes:false,allClasses:false,allStyles:false,hadInvalidAttribute:false,hadInvalidClass:false,hadInvalidStyle:false};var s,u;if(!a&&!g)a=null;else{o(b);if(h){s=0;for(u=h.length;s-1&&c.push(b.replace(/\*/g,".*"));return c.length?RegExp("^(?:"+c.join("|")+")$"):null}function m(a){var c=a.attributes,b;delete c.style;delete c["class"];if(b=CKEDITOR.tools.writeCssText(a.styles,true))c.style=b;a.classes.length&&(c["class"]=a.classes.sort().join(" "))}function p(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 t(a){if(!a)return false;if(a===true)return true; +var c=j(a);return function(b){return b in a||c&&b.match(c)}}function u(){return new CKEDITOR.htmlParser.element("br")}function s(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.name=="br"||z.$block[a.name])}function A(a,c,b){var e=a.name;if(z.$empty[e]||!a.children.length)if(e=="hr"&&c=="br")a.replaceWith(u());else{a.parent&&b.push({check:"it",el:a.parent});a.remove()}else if(z.$block[e]||e=="tr")if(c=="br"){if(a.previous&&!s(a.previous)){c=u();c.insertBefore(a)}if(a.next&&!s(a.next)){c=u();c.insertAfter(a)}a.replaceWithChildren()}else{var e= a.children,j;b:{j=z[c];for(var d=0,g=e.length,h;d0;){h=e[--g];if(d&&(h.type==CKEDITOR.NODE_TEXT||h.type==CKEDITOR.NODE_ELEMENT&&z.$inline[h.name])){if(!f){f=new CKEDITOR.htmlParser.element(c);f.insertAfter(a);b.push({check:"parent-down",el:f})}f.add(h,0)}else{f= null;h.insertAfter(a);j.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(h.type==CKEDITOR.NODE_ELEMENT&&!z[j.name][h.name])&&b.push({check:"el-up",el:h})}}a.remove()}}else if(e=="style")a.remove();else{a.parent&&b.push({check:"it",el:a.parent});a.replaceWithChildren()}}function w(a,c,b){var e,j;for(e=0;e";if(d in this._.cachedChecks)return this._.cachedChecks[d];e=l(a).$1;j=e.styles;var g=e.classes;e.name=e.elements;e.classes=g=g?g.split(/\s*,\s*/):[];e.styles=k(j);e.attributes=k(e.attributes);e.children=[];g.length&&(e.attributes["class"]=g.join(" "));if(j)e.attributes.style= CKEDITOR.tools.writeCssText(e.styles);j=e}else{e=a.getDefinition();j=e.styles;g=e.attributes||{};if(j){j=F(j);g.style=CKEDITOR.tools.writeCssText(j,true)}else j={};j={name:e.element,attributes:g,classes:g["class"]?g["class"].split(/\s+/):[],styles:j,children:[]}}var g=CKEDITOR.tools.clone(j),h=[],f;if(c!==false&&(f=this._.transformations[j.name])){for(e=0;e0?false: CKEDITOR.tools.objectCompare(j.attributes,g.attributes,true)?true:false;typeof a=="string"&&(this._.cachedChecks[d]=c);return c},getAllowedEnterMode:function(){var a=["p","div","br"],c={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(b,e){var j=a.slice(),d;if(this.check(D[b]))return b;for(e||(j=j.reverse());d=j.pop();)if(this.check(d))return c[d];return CKEDITOR.ENTER_BR}}()};var I={styles:1,attributes:1,classes:1},J={styles:"requiredStyles",attributes:"requiredAttributes", @@ -219,8 +219,8 @@ c.data.path)});this.on("activeFilterChange",function(){a(this,this.elementPath() function h(a,c){a.on("customConfigLoaded",function(){if(c){if(c.on)for(var b in c.on)a.on(b,c.on[b]);CKEDITOR.tools.extend(a.config,c,true);delete a.config.on}b=a.config;a.readOnly=!(!b.readOnly&&!(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.is("textarea")?a.element.hasAttribute("disabled"):a.element.isReadOnly():a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&a.element.hasAttribute("disabled")));a.blockless=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?!(a.element.is("textarea")||CKEDITOR.dtd[a.element.getName()].p): false;a.tabIndex=b.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:b.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:b.shiftEnterMode;if(b.skin)CKEDITOR.skinName=b.skin;a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);i(a)});if(c&&c.customConfig!=void 0)a.config.customConfig=c.customConfig;e(a)||a.fireOnce("customConfigLoaded")} function i(a){CKEDITOR.skin.loadPart("editor",function(){g(a)})}function g(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(c,b){var e=a.config.title;a.langCode=c;a.lang=CKEDITOR.tools.prototypedCopy(b);a.title=typeof e=="string"||e===false?e:[a.lang.editor,a.name].join(", ");if(!a.config.contentsLangDirection)a.config.contentsLangDirection=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir;a.fire("langLoaded");k(a)})}function k(a){a.getStylesSet(function(c){a.once("loaded", -function(){a.fire("stylesSet",{styles:c})},null,null,1);l(a)})}function l(a){var c=a.config,b=c.plugins,e=c.extraPlugins,d=c.removePlugins;if(e)var g=RegExp("(?:^|,)(?:"+e.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),b=b.replace(g,""),b=b+(","+e);if(d)var h=RegExp("(?:^|,)(?:"+d.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),b=b.replace(h,"");CKEDITOR.env.air&&(b=b+",adobeair");CKEDITOR.plugins.load(b.split(","),function(b){var e=[],d=[],g=[];a.plugins=b;for(var f in b){var i=b[f],k=i.lang,l=null,t=i.requires, -p;CKEDITOR.tools.isArray(t)&&(t=t.join(","));if(t&&(p=t.match(h)))for(;t=p.pop();)CKEDITOR.tools.setTimeout(function(a,c){throw Error('Plugin "'+a.replace(",","")+'" cannot be removed from the plugins list, because it\'s required by "'+c+'" plugin.');},0,null,[t,f]);if(k&&!a.lang[f]){k.split&&(k=k.split(","));if(CKEDITOR.tools.indexOf(k,a.langCode)>=0)l=a.langCode;else{l=a.langCode.replace(/-.*/,"");l=l!=a.langCode&&CKEDITOR.tools.indexOf(k,l)>=0?l:CKEDITOR.tools.indexOf(k,"en")>=0?"en":k[0]}if(!i.langEntries|| +function(){a.fire("stylesSet",{styles:c})},null,null,1);l(a)})}function l(a){var c=a.config,b=c.plugins,e=c.extraPlugins,d=c.removePlugins;if(e)var g=RegExp("(?:^|,)(?:"+e.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),b=b.replace(g,""),b=b+(","+e);if(d)var h=RegExp("(?:^|,)(?:"+d.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),b=b.replace(h,"");CKEDITOR.env.air&&(b=b+",adobeair");CKEDITOR.plugins.load(b.split(","),function(b){var e=[],d=[],g=[];a.plugins=b;for(var f in b){var i=b[f],k=i.lang,l=null,p=i.requires, +s;CKEDITOR.tools.isArray(p)&&(p=p.join(","));if(p&&(s=p.match(h)))for(;p=s.pop();)CKEDITOR.tools.setTimeout(function(a,c){throw Error('Plugin "'+a.replace(",","")+'" cannot be removed from the plugins list, because it\'s required by "'+c+'" plugin.');},0,null,[p,f]);if(k&&!a.lang[f]){k.split&&(k=k.split(","));if(CKEDITOR.tools.indexOf(k,a.langCode)>=0)l=a.langCode;else{l=a.langCode.replace(/-.*/,"");l=l!=a.langCode&&CKEDITOR.tools.indexOf(k,l)>=0?l:CKEDITOR.tools.indexOf(k,"en")>=0?"en":k[0]}if(!i.langEntries|| !i.langEntries[l])g.push(CKEDITOR.getUrl(i.path+"lang/"+l+".js"));else{a.lang[f]=i.langEntries[l];l=null}}d.push(l);e.push(i)}CKEDITOR.scriptLoader.load(g,function(){for(var b=["beforeInit","init","afterInit"],g=0;g0)for(var b=0;b< -p.length;b++){var e=p[b],d=e.name,j=CKEDITOR.dtd[d],g=u.name&&CKEDITOR.dtd[u.name];if((!g||g[d])&&(!a||!j||j[a]||!CKEDITOR.dtd[a])){if(!c){k();c=1}e=e.clone();e.parent=u;u=e;p.splice(b,1);b--}else if(d==u.name){n(u,u.parent,1);b--}}}function k(){for(;s.length;)n(s.shift(),u)}function l(a){if(a._.isBlockLike&&a.name!="pre"&&a.name!="textarea"){var c=a.children.length,b=a.children[c-1],e;if(b&&b.type==CKEDITOR.NODE_TEXT)(e=CKEDITOR.tools.rtrim(b.value))?b.value=e:a.children.length=c-1}}function n(a, -c,e){var c=c||u||m,d=u;if(a.previous===void 0){if(o(c,a)){u=c;j.onTagOpen(i,{});a.returnPoint=c=u}l(a);(!b(a)||a.children.length)&&c.add(a);a.name=="pre"&&(A=false);a.name=="textarea"&&(t=false)}if(a.returnPoint){u=a.returnPoint;delete a.returnPoint}else u=e?c:d}function o(a,c){if((a==m||a.name=="body")&&i&&(!a.name||CKEDITOR.dtd[a.name][i])){var b,e;return(b=c.attributes&&(e=c.attributes["data-cke-real-element-type"])?e:c.name)&&b in CKEDITOR.dtd.$inline&&!(b in CKEDITOR.dtd.head)&&!c.isOrphan|| -c.type==CKEDITOR.NODE_TEXT}}function q(a,c){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==c||a=="dt"&&c=="dd"||a=="dd"&&c=="dt":false}var j=new CKEDITOR.htmlParser,m=h instanceof CKEDITOR.htmlParser.element?h:typeof h=="string"?new CKEDITOR.htmlParser.element(h):new CKEDITOR.htmlParser.fragment,p=[],s=[],u=m,t=m.name=="textarea",A=m.name=="pre";j.onTagOpen=function(a,e,h,i){e=new CKEDITOR.htmlParser.element(a,e);if(e.isUnknown&&h)e.isEmpty=true;e.isOptionalClose=i;if(b(e))p.push(e); -else{if(a=="pre")A=true;else{if(a=="br"&&A){u.add(new CKEDITOR.htmlParser.text("\n"));return}a=="textarea"&&(t=true)}if(a=="br")s.push(e);else{for(;;){i=(h=u.name)?CKEDITOR.dtd[h]||(u._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):c;if(!e.isUnknown&&!u.isUnknown&&!i[a])if(u.isOptionalClose)j.onTagClose(h);else if(a in d&&h in d){h=u.children;(h=h[h.length-1])&&h.name=="li"||n(h=new CKEDITOR.htmlParser.element("li"),u);!e.returnPoint&&(e.returnPoint=u);u=h}else if(a in CKEDITOR.dtd.$listItem&&!q(a, +p.length;b++){var e=p[b],d=e.name,j=CKEDITOR.dtd[d],g=u.name&&CKEDITOR.dtd[u.name];if((!g||g[d])&&(!a||!j||j[a]||!CKEDITOR.dtd[a])){if(!c){k();c=1}e=e.clone();e.parent=u;u=e;p.splice(b,1);b--}else if(d==u.name){n(u,u.parent,1);b--}}}function k(){for(;t.length;)n(t.shift(),u)}function l(a){if(a._.isBlockLike&&a.name!="pre"&&a.name!="textarea"){var c=a.children.length,b=a.children[c-1],e;if(b&&b.type==CKEDITOR.NODE_TEXT)(e=CKEDITOR.tools.rtrim(b.value))?b.value=e:a.children.length=c-1}}function n(a, +c,e){var c=c||u||m,d=u;if(a.previous===void 0){if(o(c,a)){u=c;j.onTagOpen(i,{});a.returnPoint=c=u}l(a);(!b(a)||a.children.length)&&c.add(a);a.name=="pre"&&(A=false);a.name=="textarea"&&(s=false)}if(a.returnPoint){u=a.returnPoint;delete a.returnPoint}else u=e?c:d}function o(a,c){if((a==m||a.name=="body")&&i&&(!a.name||CKEDITOR.dtd[a.name][i])){var b,e;return(b=c.attributes&&(e=c.attributes["data-cke-real-element-type"])?e:c.name)&&b in CKEDITOR.dtd.$inline&&!(b in CKEDITOR.dtd.head)&&!c.isOrphan|| +c.type==CKEDITOR.NODE_TEXT}}function q(a,c){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==c||a=="dt"&&c=="dd"||a=="dd"&&c=="dt":false}var j=new CKEDITOR.htmlParser,m=h instanceof CKEDITOR.htmlParser.element?h:typeof h=="string"?new CKEDITOR.htmlParser.element(h):new CKEDITOR.htmlParser.fragment,p=[],t=[],u=m,s=m.name=="textarea",A=m.name=="pre";j.onTagOpen=function(a,e,h,i){e=new CKEDITOR.htmlParser.element(a,e);if(e.isUnknown&&h)e.isEmpty=true;e.isOptionalClose=i;if(b(e))p.push(e); +else{if(a=="pre")A=true;else{if(a=="br"&&A){u.add(new CKEDITOR.htmlParser.text("\n"));return}a=="textarea"&&(s=true)}if(a=="br")t.push(e);else{for(;;){i=(h=u.name)?CKEDITOR.dtd[h]||(u._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):c;if(!e.isUnknown&&!u.isUnknown&&!i[a])if(u.isOptionalClose)j.onTagClose(h);else if(a in d&&h in d){h=u.children;(h=h[h.length-1])&&h.name=="li"||n(h=new CKEDITOR.htmlParser.element("li"),u);!e.returnPoint&&(e.returnPoint=u);u=h}else if(a in CKEDITOR.dtd.$listItem&&!q(a, h))j.onTagOpen(a=="li"?"ul":"dl",{},0,1);else if(h in f&&!q(a,h)){!e.returnPoint&&(e.returnPoint=u);u=u.parent}else{h in CKEDITOR.dtd.$inline&&p.unshift(u);if(u.parent)n(u,u.parent,1);else{e.isOrphan=1;break}}else break}g(a);k();e.parent=u;e.isEmpty?n(e):u=e}}};j.onTagClose=function(a){for(var c=p.length-1;c>=0;c--)if(a==p[c].name){p.splice(c,1);return}for(var b=[],e=[],d=u;d!=m&&d.name!=a;){d._.isBlockLike||e.unshift(d);b.push(d);d=d.returnPoint||d.parent}if(d!=m){for(c=0;c0?this.children[c-1]:null;if(b){if(a._.isBlockLike&&b.type==CKEDITOR.NODE_TEXT){b.value=CKEDITOR.tools.rtrim(b.value);if(b.value.length===0){this.children.pop(); this.add(a);return}}b.next=a}a.previous=b;a.parent=this;this.children.splice(c,0,a);if(!this._.hasInlineStarted)this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike},filter:function(a,c){c=this.getFilterContext(c);a.onRoot(c,this);this.filterChildren(a,false,c)},filterChildren:function(a,c,b){if(this.childrenFilteredBy!=a.id){b=this.getFilterContext(b);if(c&&!this.parent)a.onRoot(b,this);this.childrenFilteredBy=a.id;for(c=0;c=0&&b -7||j.name in CKEDITOR.dtd.tr||j.name in CKEDITOR.dtd.$listItem))h=false;else{h=d(j);h=!h||j.name=="form"&&h.name=="input"}h&&j.add(g(a))}}}function i(a,c){if((!l||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&a.name=="br"&&!a.attributes["data-cke-eol"])return true;var b;if(a.type==CKEDITOR.NODE_TEXT&&(b=a.value.match(p))){if(b.index){(new CKEDITOR.htmlParser.text(a.value.substring(0,b.index))).insertBefore(a);a.value=b[0]}if(!CKEDITOR.env.needsBrFiller&&l&&(!c||a.parent.name in m))return true; -if(!l)if((b=a.previous)&&b.name=="br"||!b||e(b))return true}return false}var k={elements:{}},l=j=="html",m=CKEDITOR.tools.extend({},A),t;for(t in m)"#"in u[t]||delete m[t];for(t in m)k.elements[t]=f(l,b.config.fillEmptyBlocks!==false);k.root=f(l);k.elements.br=function(b){return function(d){if(d.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var j=d.attributes;if("data-cke-bogus"in j||"data-cke-eol"in j)delete j["data-cke-bogus"];else{for(j=d.next;j&&a(j);)j=j.next;var f=c(d);!j&&e(d.parent)?h(d.parent, +options:a})},addMany:function(b,c,a){for(var e=[this.findIndex(c),0],f=0,i=b.length;f=0&&b +7||j.name in CKEDITOR.dtd.tr||j.name in CKEDITOR.dtd.$listItem))f=false;else{f=d(j);f=!f||j.name=="form"&&f.name=="input"}f&&j.add(g(a))}}}function i(a,c){if((!l||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&a.name=="br"&&!a.attributes["data-cke-eol"])return true;var b;if(a.type==CKEDITOR.NODE_TEXT&&(b=a.value.match(p))){if(b.index){(new CKEDITOR.htmlParser.text(a.value.substring(0,b.index))).insertBefore(a);a.value=b[0]}if(!CKEDITOR.env.needsBrFiller&&l&&(!c||a.parent.name in m))return true; +if(!l)if((b=a.previous)&&b.name=="br"||!b||e(b))return true}return false}var k={elements:{}},l=j=="html",m=CKEDITOR.tools.extend({},A),s;for(s in m)"#"in u[s]||delete m[s];for(s in m)k.elements[s]=f(l,b.config.fillEmptyBlocks!==false);k.root=f(l);k.elements.br=function(b){return function(d){if(d.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var j=d.attributes;if("data-cke-bogus"in j||"data-cke-eol"in j)delete j["data-cke-bogus"];else{for(j=d.next;j&&a(j);)j=j.next;var f=c(d);!j&&e(d.parent)?h(d.parent, g(b)):e(j)&&(f&&!e(f))&&g(b).insertBefore(j)}}}}(l);return k}function f(a,c){return a!=CKEDITOR.ENTER_BR&&c!==false?a==CKEDITOR.ENTER_DIV?"div":"p":false}function d(c){for(c=c.children[c.children.length-1];c&&a(c);)c=c.previous;return c}function c(c){for(c=c.previous;c&&a(c);)c=c.previous;return c}function a(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function e(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in A||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function h(a,c){var b=a.children[a.children.length-1];a.children.push(c);c.parent=a;if(b){b.next=c;c.previous=b}}function i(a){a=a.attributes;a.contenteditable!="false"&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function g(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(x,function(a,c,b){return"<"+c+b.replace(z, function(a,c){return B.test(c)&&b.indexOf("data-cke-saved-"+c)==-1?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+">"})}function l(a,c){return a.replace(c,function(a,c,b){a.indexOf("/g,">")+"");return""+encodeURIComponent(a)+""})}function n(a){return a.replace(E,function(a,c){return decodeURIComponent(c)})}function o(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,function(a){return"<\!--"+ -s+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function q(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,c){return decodeURIComponent(c)})}function j(a,c){var b=c._.dataStore;return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(a,c){return decodeURIComponent(c)}).replace(/\{cke_protected_(\d+)\}/g,function(a,c){return b&&b[c]||""})}function m(a,c){for(var b=[],e=c.config.protectedSource,d=c._.dataStore||(c._.dataStore={id:1}),j=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g, -e=[//gi,//gi].concat(e),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(b.push(a)-1)+"--\>"}),g=0;g"});a=a.replace(j,function(a,c,e){return"<\!--"+s+(c?"{C}":"")+encodeURIComponent(b[e]).replace(/--/g,"%2D%2D")+"--\>"});return a.replace(/<\w([^'">]+|'[^']*'|"[^"]*")+>/g, +t+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function q(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,c){return decodeURIComponent(c)})}function j(a,c){var b=c._.dataStore;return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(a,c){return decodeURIComponent(c)}).replace(/\{cke_protected_(\d+)\}/g,function(a,c){return b&&b[c]||""})}function m(a,c){for(var b=[],e=c.config.protectedSource,d=c._.dataStore||(c._.dataStore={id:1}),j=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g, +e=[//gi,//gi].concat(e),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(b.push(a)-1)+"--\>"}),g=0;g"});a=a.replace(j,function(a,c,e){return"<\!--"+t+(c?"{C}":"")+encodeURIComponent(b[e]).replace(/--/g,"%2D%2D")+"--\>"});return a.replace(/<\w([^'">]+|'[^']*'|"[^"]*")+>/g, function(a){return a.replace(/<\!--\{cke_protected\}([^>]*)--\>/g,function(a,c){d[d.id]=decodeURIComponent(c);return"{cke_protected_"+d.id++ +"}"})})}CKEDITOR.htmlDataProcessor=function(a){var c,e,d=this;this.editor=a;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(w);c.addRules(y,{applyToAll:true});c.addRules(b(a,"data"),{applyToAll:true});e.addRules(r);e.addRules(v,{applyToAll:true});e.addRules(b(a, "html"),{applyToAll:true});a.on("toHtml",function(c){var c=c.data,b=c.dataValue,b=m(b,a),b=l(b,C),b=k(b),b=l(b,F),b=b.replace(D,"$1cke:$2"),b=b.replace(J,""),b=b.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),b=b.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2"),e=c.context||a.editable().getName(),d;if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&e=="pre"){e="div";b="
"+b+"
";d=1}e=a.document.createElement(e);e.setHtml("a"+b);b=e.getHtml().substr(1); b=b.replace(RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");d&&(b=b.replace(/^
|<\/pre>$/gi,""));b=b.replace(I,"$1$2");b=n(b);b=q(b);c.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(b,c.context,c.fixForBody===false?false:f(c.enterMode,a.config.autoParagraph))},null,null,5);a.on("toHtml",function(c){c.data.filter.applyTo(c.data.dataValue,true,c.data.dontFilter,c.data.enterMode)&&a.fire("dataFiltered")},null,null,6);a.on("toHtml",function(a){a.data.dataValue.filterChildren(d.dataFilter,true)},null,
 null,10);a.on("toHtml",function(a){var a=a.data,c=a.dataValue,b=new CKEDITOR.htmlParser.basicWriter;c.writeChildrenHtml(b);c=b.getHtml(true);a.dataValue=o(c)},null,null,15);a.on("toDataFormat",function(c){var b=c.data.dataValue;c.data.enterMode!=CKEDITOR.ENTER_BR&&(b=b.replace(/^
/i,""));c.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(b,c.data.context,f(c.data.enterMode,a.config.autoParagraph))},null,null,5);a.on("toDataFormat",function(a){a.data.dataValue.filterChildren(d.htmlFilter, -true)},null,null,10);a.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,false,true)},null,null,11);a.on("toDataFormat",function(c){var b=c.data.dataValue,e=d.writer;e.reset();b.writeChildrenHtml(e);b=e.getHtml(true);b=q(b);b=j(b,a);c.data.dataValue=b},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,c,b,e){var d=this.editor,j,g,h;if(c&&typeof c=="object"){j=c.context;b=c.fixForBody;e=c.dontFilter;g=c.filter;h=c.enterMode}else j=c;!j&&j!==null&&(j=d.editable().getName()); -return d.fire("toHtml",{dataValue:a,context:j,fixForBody:b,dontFilter:e,filter:g||d.filter,enterMode:h||d.enterMode}).dataValue},toDataFormat:function(a,c){var b,e,d;if(c){b=c.context;e=c.filter;d=c.enterMode}!b&&b!==null&&(b=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:e||this.editor.filter,context:b,enterMode:d||this.editor.enterMode}).dataValue}};var p=/(?: |\xa0)$/,s="{cke_protected}",u=CKEDITOR.dtd,t=["caption","colgroup","col","thead","tfoot", +true)},null,null,10);a.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,false,true)},null,null,11);a.on("toDataFormat",function(c){var b=c.data.dataValue,e=d.writer;e.reset();b.writeChildrenHtml(e);b=e.getHtml(true);b=q(b);b=j(b,a);c.data.dataValue=b},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,c,b,e){var d=this.editor,j,g,f;if(c&&typeof c=="object"){j=c.context;b=c.fixForBody;e=c.dontFilter;g=c.filter;f=c.enterMode}else j=c;!j&&j!==null&&(j=d.editable().getName()); +return d.fire("toHtml",{dataValue:a,context:j,fixForBody:b,dontFilter:e,filter:g||d.filter,enterMode:f||d.enterMode}).dataValue},toDataFormat:function(a,c){var b,e,d;if(c){b=c.context;e=c.filter;d=c.enterMode}!b&&b!==null&&(b=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:e||this.editor.filter,context:b,enterMode:d||this.editor.enterMode}).dataValue}};var p=/(?: |\xa0)$/,t="{cke_protected}",u=CKEDITOR.dtd,s=["caption","colgroup","col","thead","tfoot", "tbody"],A=CKEDITOR.tools.extend({},u.$blockLimit,u.$block),w={elements:{input:i,textarea:i}},y={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},r={elements:{embed:function(a){var c=a.parent;if(c&&c.name=="object"){var b=c.attributes.width,c=c.attributes.height;if(b)a.attributes.width=b;if(c)a.attributes.height=c}},a:function(a){if(!a.children.length&&!a.attributes.name&&!a.attributes["data-cke-saved-name"])return false}}},v={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]], -attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var c=a.attributes;if(c){if(c["data-cke-temp"])return false;for(var b=["name","href","src"],e,d=0;d-1&&e>-1&&b!=e)){b=a.parent?a.getIndex(): +attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var c=a.attributes;if(c){if(c["data-cke-temp"])return false;for(var b=["name","href","src"],e,d=0;d-1&&e>-1&&b!=e)){b=a.parent?a.getIndex(): -1;e=c.parent?c.getIndex():-1}return b>e?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 c=a.children[0];if(c&&c.value)c.value=CKEDITOR.tools.trim(c.value);if(!a.attributes.type)a.attributes.type="text/css"},title:function(a){var c= a.children[0];!c&&h(a,c=new CKEDITOR.htmlParser.text);c.value=a.attributes["data-cke-title"]||""},input:g,textarea:g},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||false}}};if(CKEDITOR.env.ie)v.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})};var x=/<(a|area|img|input|source)\b([^>]*)>/gi,z=/([\w-]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,B=/^(href|src|name)$/i,F=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi, C=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,E=/([^<]*)<\/cke:encoded>/gi,D=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,I=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,J=/]*?)\/?>(?!\s*<\/cke:\1)/gi}(),"use strict",CKEDITOR.htmlParser.element=function(b,f){this.name=b;this.attributes=f||{};this.children=[];var d=b||"",c=d.match(/^cke:(.*)/);c&&(d=c[1]);d=!(!CKEDITOR.dtd.$nonBodyContent[d]&&!CKEDITOR.dtd.$block[d]&&!CKEDITOR.dtd.$listItem[d]&& @@ -294,35 +294,35 @@ b=CKEDITOR.dom.element.createFromHtml(c.output({id:a.id,name:b,langDir:a.lang.di b.insertAfter(d)}else d.append(b);a.container=b;g&&a.ui.space("top").unselectable();k&&a.ui.space("bottom").unselectable();d=a.config.width;f=a.config.height;d&&b.setStyle("width",CKEDITOR.tools.cssLength(d));f&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(f));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(a,c){return b(a,c,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(a,c,d){return b(a, c,d,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),c=0;c",f="",a=g+a.replace(d,function(){return f+g})+f}a=a.replace(/\n/g,"
");b||(a=a.replace(RegExp("
(?=)"),function(a){return e.repeat(a,2)}));a=a.replace(/^ | $/g," ");a=a.replace(/(>|\s) /g,function(a,b){return b+" "}).replace(/ (?=<)/g, -" ");o(this,"text",a)},insertElement:function(a,b){b?this.insertElementIntoRange(a,b):this.insertElementIntoSelection(a)},insertElementIntoRange:function(a,b){var c=this.editor,e=c.config.enterMode,d=a.getName(),g=CKEDITOR.dtd.$block[d];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})&&q(b);var f,h;if(g)for(;(f=b.getCommonAncestor(0,1))&&(h=CKEDITOR.dtd[f.getName()])&&(!h||!h[d]);)if(f.getName()in -CKEDITOR.dtd.span)b.splitElement(f);else if(b.checkStartOfBlock()&&b.checkEndOfBlock()){b.setStartBefore(f);b.collapse(true);f.remove()}else b.splitBlock(e==CKEDITOR.ENTER_DIV?"div":"p",c.editable());b.insertNode(a);return true},insertElementIntoSelection:function(a){var b=this.editor,e=b.activeEnterMode,b=b.getSelection(),d=b.getRanges()[0],f=a.getName(),f=CKEDITOR.dtd.$block[f];h(this);if(this.insertElementIntoRange(a,d)){d.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);if(f)if((f=a.getNext(function(a){return c(a)&& +true)?CKEDITOR.ENTER_BR:b.activeEnterMode,b=c==CKEDITOR.ENTER_BR,e=CKEDITOR.tools,a=e.htmlEncode(a.replace(/\r\n/g,"\n")),a=a.replace(/\t/g,"    "),c=c==CKEDITOR.ENTER_P?"p":"div";if(!b){var d=/\n{2}/g;if(d.test(a))var f="<"+c+">",g="",a=f+a.replace(d,function(){return g+f})+g}a=a.replace(/\n/g,"
");b||(a=a.replace(RegExp("
(?=)"),function(a){return e.repeat(a,2)}));a=a.replace(/^ | $/g," ");a=a.replace(/(>|\s) /g,function(a,b){return b+" "}).replace(/ (?=<)/g, +" ");o(this,"text",a)},insertElement:function(a,b){b?this.insertElementIntoRange(a,b):this.insertElementIntoSelection(a)},insertElementIntoRange:function(a,b){var c=this.editor,e=c.config.enterMode,d=a.getName(),f=CKEDITOR.dtd.$block[d];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})&&q(b);var g,h;if(f)for(;(g=b.getCommonAncestor(0,1))&&(h=CKEDITOR.dtd[g.getName()])&&(!h||!h[d]);)if(g.getName()in +CKEDITOR.dtd.span)b.splitElement(g);else if(b.checkStartOfBlock()&&b.checkEndOfBlock()){b.setStartBefore(g);b.collapse(true);g.remove()}else b.splitBlock(e==CKEDITOR.ENTER_DIV?"div":"p",c.editable());b.insertNode(a);return true},insertElementIntoSelection:function(a){var b=this.editor,e=b.activeEnterMode,b=b.getSelection(),d=b.getRanges()[0],f=a.getName(),f=CKEDITOR.dtd.$block[f];h(this);if(this.insertElementIntoRange(a,d)){d.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);if(f)if((f=a.getNext(function(a){return c(a)&& !g(a)}))&&f.type==CKEDITOR.NODE_ELEMENT&&f.is(CKEDITOR.dtd.$block))f.getDtd()["#"]?d.moveToElementEditStart(f):d.moveToElementEditEnd(a);else if(!f&&e!=CKEDITOR.ENTER_BR){f=d.fixBlock(true,e==CKEDITOR.ENTER_DIV?"div":"p");d.moveToElementEditStart(f)}}b.selectRanges([d]);i(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 b=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker); -var g=a.config.contentsLangDirection;this.getDirection(1)!=g&&this.changeAttr("dir",g);var f=CKEDITOR.getCss();if(f){g=b.getHead();if(!g.getCustomData("stylesheet")){f=b.appendStyleText(f);f=new CKEDITOR.dom.element(f.ownerNode||f.owningElement);g.setCustomData("stylesheet",f);f.data("cke-temp",1)}}g=b.getCustomData("stylesheet_ref")||0;b.setCustomData("stylesheet_ref",g+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 h={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return true;var c=b.data.keyCode,d;if(c in h){var b=a.getSelection(),g,f=b.getRanges()[0],k=f.startPath(),i,m,p,c=c==8;if(CKEDITOR.env.ie&&CKEDITOR.env.version<11&&(g=b.getSelectedElement())||(g=e(b))){a.fire("saveSnapshot");f.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START);g.remove();f.select();a.fire("saveSnapshot"); -d=1}else if(f.collapsed)if((i=k.block)&&(p=i[c?"getPrevious":"getNext"](l))&&p.type==CKEDITOR.NODE_ELEMENT&&p.is("table")&&f[c?"checkStartOfBlock":"checkEndOfBlock"]()){a.fire("saveSnapshot");f[c?"checkEndOfBlock":"checkStartOfBlock"]()&&i.remove();f["moveToElementEdit"+(c?"End":"Start")](p);f.select();a.fire("saveSnapshot");d=1}else if(k.blockLimit&&k.blockLimit.is("td")&&(m=k.blockLimit.getAscendant("table"))&&f.checkBoundaryOfElement(m,c?CKEDITOR.START:CKEDITOR.END)&&(p=m[c?"getPrevious":"getNext"](l))){a.fire("saveSnapshot"); -f["moveToElementEdit"+(c?"End":"Start")](p);f.checkStartOfBlock()&&f.checkEndOfBlock()?p.remove():f.select();a.fire("saveSnapshot");d=1}else if((m=k.contains(["td","th","caption"]))&&f.checkBoundaryOfElement(m,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 h&&!this.getFirst(c)){this.appendBogus();b=a.createRange();b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START);b.select()}}); +var f=a.config.contentsLangDirection;this.getDirection(1)!=f&&this.changeAttr("dir",f);var g=CKEDITOR.getCss();if(g){f=b.getHead();if(!f.getCustomData("stylesheet")){g=b.appendStyleText(g);g=new CKEDITOR.dom.element(g.ownerNode||g.owningElement);f.setCustomData("stylesheet",g);g.data("cke-temp",1)}}f=b.getCustomData("stylesheet_ref")||0;b.setCustomData("stylesheet_ref",f+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){var a= +a.data,b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&(a.$.button!=2&&b.isReadOnly())&&a.preventDefault()});var h={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return true;var c=b.data.keyCode,d;if(c in h){var b=a.getSelection(),f,g=b.getRanges()[0],i=g.startPath(),k,m,p,c=c==8;if(CKEDITOR.env.ie&&CKEDITOR.env.version<11&&(f=b.getSelectedElement())||(f=e(b))){a.fire("saveSnapshot");g.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove();g.select();a.fire("saveSnapshot"); +d=1}else if(g.collapsed)if((k=i.block)&&(p=k[c?"getPrevious":"getNext"](l))&&p.type==CKEDITOR.NODE_ELEMENT&&p.is("table")&&g[c?"checkStartOfBlock":"checkEndOfBlock"]()){a.fire("saveSnapshot");g[c?"checkEndOfBlock":"checkStartOfBlock"]()&&k.remove();g["moveToElementEdit"+(c?"End":"Start")](p);g.select();a.fire("saveSnapshot");d=1}else if(i.blockLimit&&i.blockLimit.is("td")&&(m=i.blockLimit.getAscendant("table"))&&g.checkBoundaryOfElement(m,c?CKEDITOR.START:CKEDITOR.END)&&(p=m[c?"getPrevious":"getNext"](l))){a.fire("saveSnapshot"); +g["moveToElementEdit"+(c?"End":"Start")](p);g.checkStartOfBlock()&&g.checkEndOfBlock()?p.remove():g.select();a.fire("saveSnapshot");d=1}else if((m=i.contains(["td","th","caption"]))&&g.checkBoundaryOfElement(m,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 h&&!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",d);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 g=CKEDITOR.dom.walker.bogus(),k=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,l=CKEDITOR.dom.walker.whitespaces(true),n=CKEDITOR.dom.walker.bookmark(false,true);CKEDITOR.on("instanceLoaded",function(a){var c=a.editor;c.on("insertElement",function(a){a=a.data;if(a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")|| a.is("textarea"))){a.getAttribute("contentEditable")!="false"&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1");a.setAttribute("contentEditable",false)}});c.on("selectionChange",function(a){if(!c.readOnly){var e=c.getSelection();if(e&&!e.isLocked){e=c.checkDirty();c.fire("lockSnapshot");b(a);c.fire("unlockSnapshot");!e&&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 e=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml(''+this.lang.common.editorHelp+"");c.append(d);a.changeAttr("aria-describedby",e)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");var o=function(){function a(b){return b.type== -CKEDITOR.NODE_ELEMENT}function b(c,e){var d,g,f,k,i=[],l=e.range.startContainer;d=e.range.startPath();for(var l=h[l.getName()],t=0,u=c.getChildren(),p=u.count(),n=-1,s=-1,r=0,o=d.contains(h.$list);t-1)i[n].firstNotAllowed=1;if(s>-1)i[s].lastNotAllowed=1;return i}function e(b,c){var d=[],g=b.getChildren(),f=g.count(),k,i=0,l=h[c],t=!b.is(h.$inline)||b.is("br");for(t&&d.push(" ");i-1)k[n].firstNotAllowed=1;if(t>-1)k[t].lastNotAllowed=1;return k}function e(b,c){var d=[],g=b.getChildren(),f=g.count(),i,k=0,l=h[c],s=!b.is(h.$inline)||b.is("br");for(s&&d.push(" ");k ",q.document);q.insertNode(D);q.setStartAfter(D)}I=new CKEDITOR.dom.elementPath(q.startContainer);o.endPath=J=new CKEDITOR.dom.elementPath(q.endContainer);if(!q.collapsed){var E=J.block||J.blockLimit,U=q.getCommonAncestor();E&&(!E.equals(U)&& @@ -345,10 +345,10 @@ a.getDocument().on("selectionchange",function(a){a.cancel()},null,null,-100);els d[0];if(d.length==1&&g.collapsed)if((e=g[e<38?"getPreviousEditableNode":"getNextEditableNode"]())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getAttribute("contenteditable")=="false"){a.getSelection().fake(e);c.data.preventDefault();c.cancel()}}}}function l(a){for(var b=0;b=e.getLength()?h.setStartAfter(e):h.setStartBefore(e));d&&d.type==CKEDITOR.NODE_TEXT&&(f?h.setEndAfter(d):h.setEndBefore(d));e=new CKEDITOR.dom.walker(h);e.evaluator=function(e){if(e.type==CKEDITOR.NODE_ELEMENT&&e.isReadOnly()){var d=c.clone();c.setEndBefore(e);c.collapsed&&a.splice(b--,1);if(!(e.getPosition(h.endContainer)&CKEDITOR.POSITION_CONTAINS)){d.setStartAfter(e); d.collapsed||a.splice(b+1,0,d)}return true}return false};e.next()}}return a}var n,o,q=CKEDITOR.dom.walker.invisible(1),j=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,e=c.createRange(),d;if(!(d=e.moveToClosestEditablePosition(b.selected,a)))d=e.moveToClosestEditablePosition(b.selected,!a);d&&c.getSelection().selectRanges([e]); -c.fire("saveSnapshot");b.selected.remove();if(!d){e.moveToElementEditablePosition(c.editable());c.getSelection().selectRanges([e])}c.fire("saveSnapshot");return false}}var c=a(),e=a(1);return{37:c,38:c,39:e,40:e,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(a){function c(){var a=d.getSelection();a&&a.removeAllRanges()}var d=a.editor;d.on("contentDom",function(){var a=d.document,c=CKEDITOR.document,g=d.editable(),h=a.getBody(),j=a.getDocumentElement(),i=g.isInline(),l,n;CKEDITOR.env.gecko&& -g.attachListener(g,"focus",function(a){a.removeListener();if(l!==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(){l&&CKEDITOR.env.webkit&&(l=d._.previousActive&&d._.previousActive.equals(a.getActive()));d.unlockSelection(l);l=0},null,null,-1);g.attachListener(g,"mousedown",function(){l=0});if(CKEDITOR.env.ie||i){var p=function(){n= -new CKEDITOR.dom.selection(d.getSelection());n.lock()};m?g.attachListener(g,"beforedeactivate",p,null,null,-1):g.attachListener(d,"selectionCheck",p,null,null,-1);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){d.lockSelection(n);l=1},null,null,-1);g.attachListener(g,"mousedown",function(){l=0})}if(CKEDITOR.env.ie&&!i){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(a.$.compatMode!="BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)j.on("mousedown",function(a){function b(a){a=a.data.$;if(d){var c=h.$.createTextRange();try{c.moveToPoint(a.x,a.y)}catch(e){}d.setEndPoint(f.compareEndPoints("StartToStart",c)<0?"EndToEnd":"StartToStart",c);d.select()}}function e(){j.removeListener("mousemove", +c.fire("saveSnapshot");b.selected.remove();if(!d){e.moveToElementEditablePosition(c.editable());c.getSelection().selectRanges([e])}c.fire("saveSnapshot");return false}}var c=a(),e=a(1);return{37:c,38:c,39:e,40:e,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(a){function c(){var a=d.getSelection();a&&a.removeAllRanges()}var d=a.editor;d.on("contentDom",function(){var a=d.document,c=CKEDITOR.document,g=d.editable(),h=a.getBody(),j=a.getDocumentElement(),i=g.isInline(),l,p;CKEDITOR.env.gecko&& +g.attachListener(g,"focus",function(a){a.removeListener();if(l!==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(){l&&CKEDITOR.env.webkit&&(l=d._.previousActive&&d._.previousActive.equals(a.getActive()));d.unlockSelection(l);l=0},null,null,-1);g.attachListener(g,"mousedown",function(){l=0});if(CKEDITOR.env.ie||i){var n=function(){p= +new CKEDITOR.dom.selection(d.getSelection());p.lock()};m?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(p);l=1},null,null,-1);g.attachListener(g,"mousedown",function(){l=0})}if(CKEDITOR.env.ie&&!i){var s;g.attachListener(g,"mousedown",function(a){if(a.data.$.button==2){a=d.document.getSelection();if(!a||a.getType()==CKEDITOR.SELECTION_NONE)s=d.window.getScrollPosition()}}); +g.attachListener(g,"mouseup",function(a){if(a.data.$.button==2&&s){d.document.$.documentElement.scrollLeft=s.x;d.document.$.documentElement.scrollTop=s.y}s=null});if(a.$.compatMode!="BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)j.on("mousedown",function(a){function b(a){a=a.data.$;if(d){var c=h.$.createTextRange();try{c.moveToPoint(a.x,a.y)}catch(e){}d.setEndPoint(f.compareEndPoints("StartToStart",c)<0?"EndToEnd":"StartToStart",c);d.select()}}function e(){j.removeListener("mousemove", b);c.removeListener("mouseup",e);j.removeListener("mouseup",e);d.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y7&&CKEDITOR.env.version<11){j.on("mousedown",function(a){if(a.data.getTarget().is("html")){c.on("mouseup",D);j.on("mouseup",D)}});var D=function(){c.removeListener("mouseup", D);j.removeListener("mouseup",D);var b=CKEDITOR.document.$.selection,e=b.createRange();b.type!="None"&&e.parentElement().ownerDocument==a.$&&e.select()}}}}g.attachListener(g,"selectionchange",b,d);g.attachListener(g,"keyup",f,d);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){d.forceNextSelectionCheck();d.selectionChange(1)});if(i&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var u;g.attachListener(g,"mousedown",function(){u=1});g.attachListener(a.getDocumentElement(),"mouseup", function(){u&&f.call(d);u=0})}else g.attachListener(CKEDITOR.env.ie?g:a.getDocumentElement(),"mouseup",f,d);CKEDITOR.env.webkit&&g.attachListener(a,"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:e(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", @@ -359,54 +359,54 @@ if(a.getType()!=CKEDITOR.SELECTION_NONE){!a.isLocked&&a.lock();this._.savedSelec this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;var m=typeof window.getSelection!="function",p=1;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection)var b=a,a=a.root;var c=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:p++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root= a=c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b){CKEDITOR.tools.extend(this._.cache,b._.cache);this.isFake=b.isFake;this.isLocked=b.isLocked;return this}b=m?this.document.$.selection:this.document.getWindow().$.getSelection();if(CKEDITOR.env.webkit)(b.type=="None"&&this.document.getActive().equals(a)||b.type=="Caret"&&b.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT)&&i(a,b);else if(CKEDITOR.env.gecko)b&&(this.document.getActive().equals(a)&&b.anchorNode&&b.anchorNode.nodeType== CKEDITOR.NODE_DOCUMENT)&&i(a,b,true);else if(CKEDITOR.env.ie){var e;try{e=this.document.getActive()}catch(d){}if(m)b.type=="None"&&(e&&e.equals(this.document.getDocumentElement()))&&i(a,null,true);else{(b=b&&b.anchorNode)&&(b=new CKEDITOR.dom.node(b));e&&(e.equals(this.document.getDocumentElement())&&b&&(a.equals(b)||a.contains(b)))&&i(a,null,true)}}e=this.getNative();var g,f;if(e)if(e.getRangeAt)g=(f=e.rangeCount&&e.getRangeAt(0))&&new CKEDITOR.dom.node(f.commonAncestorContainer);else{try{f=e.createRange()}catch(h){}g= -f&&CKEDITOR.dom.element.get(f.item&&f.item(0)||f.parentElement())}if(!g||!(g.type==CKEDITOR.NODE_ELEMENT||g.type==CKEDITOR.NODE_TEXT)||!this.root.equals(g)&&!this.root.contains(g)){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 s={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, +f&&CKEDITOR.dom.element.get(f.item&&f.item(0)||f.parentElement())}if(!g||!(g.type==CKEDITOR.NODE_ELEMENT||g.type==CKEDITOR.NODE_TEXT)||!this.root.equals(g)&&!this.root.contains(g)){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 t={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=m?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:m?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),e=c.type;if(e=="Text")b=CKEDITOR.SELECTION_TEXT;if(e=="Control")b=CKEDITOR.SELECTION_ELEMENT;if(c.createRange().parentElement())b=CKEDITOR.SELECTION_TEXT}catch(d){}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),e=c.startContainer;if(e==c.endContainer&&e.nodeType==1&&c.endOffset-c.startOffset==1&&s[e.childNodes[c.startOffset].nodeName.toLowerCase()])b=CKEDITOR.SELECTION_ELEMENT}return a.type=b},getRanges:function(){var a=m?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b, -c){b=b.duplicate();b.collapse(c);var e=b.parentElement();if(!e.hasChildNodes())return{container:e,offset:0};for(var d=e.children,g,f,h=b.duplicate(),j=0,k=d.length-1,i=-1,l,m;j<=k;){i=Math.floor((j+k)/2);g=d[i];h.moveToElementText(g);l=h.compareEndPoints("StartToStart",b);if(l>0)k=i-1;else if(l<0)j=i+1;else return{container:e,offset:a(g)}}if(i==-1||i==d.length-1&&l<0){h.moveToElementText(e);h.setEndPoint("StartToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;d=e.childNodes;if(!h){g=d[d.length- +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),e=c.startContainer;if(e==c.endContainer&&e.nodeType==1&&c.endOffset-c.startOffset==1&&t[e.childNodes[c.startOffset].nodeName.toLowerCase()])b=CKEDITOR.SELECTION_ELEMENT}return a.type=b},getRanges:function(){var a=m?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b, +c){b=b.duplicate();b.collapse(c);var e=b.parentElement();if(!e.hasChildNodes())return{container:e,offset:0};for(var d=e.children,g,f,h=b.duplicate(),j=0,i=d.length-1,k=-1,l,m;j<=i;){k=Math.floor((j+i)/2);g=d[k];h.moveToElementText(g);l=h.compareEndPoints("StartToStart",b);if(l>0)i=k-1;else if(l<0)j=k+1;else return{container:e,offset:a(g)}}if(k==-1||k==d.length-1&&l<0){h.moveToElementText(e);h.setEndPoint("StartToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;d=e.childNodes;if(!h){g=d[d.length- 1];return g.nodeType!=CKEDITOR.NODE_TEXT?{container:e,offset:d.length}:{container:g,offset:g.nodeValue.length}}for(e=d.length;h>0&&e>0;){f=d[--e];if(f.nodeType==CKEDITOR.NODE_TEXT){m=f;h=h-f.nodeValue.length}}return{container:m,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:e,offset:a(g)+(l>0?0:1)};for(;h>0;)try{f=g[l>0?"previousSibling":"nextSibling"];if(f.nodeType==CKEDITOR.NODE_TEXT){h=h-f.nodeValue.length; -m=f}g=f}catch(n){return{container:e,offset:a(g)}}return{container:m,offset:l>0?-h:m.nodeValue.length+h}};return function(){var a=this.getNative(),c=a&&a.createRange(),e=this.getType();if(!a)return[];if(e==CKEDITOR.SELECTION_TEXT){a=new CKEDITOR.dom.range(this.root);e=b(c,true);a.setStart(new CKEDITOR.dom.node(e.container),e.offset);e=b(c);a.setEnd(new CKEDITOR.dom.node(e.container),e.offset);a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&& +m=f}g=f}catch(p){return{container:e,offset:a(g)}}return{container:m,offset:l>0?-h:m.nodeValue.length+h}};return function(){var a=this.getNative(),c=a&&a.createRange(),e=this.getType();if(!a)return[];if(e==CKEDITOR.SELECTION_TEXT){a=new CKEDITOR.dom.range(this.root);e=b(c,true);a.setStart(new CKEDITOR.dom.node(e.container),e.offset);e=b(c);a.setEnd(new CKEDITOR.dom.node(e.container),e.offset);a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&& a.collapse();return[a]}if(e==CKEDITOR.SELECTION_ELEMENT){for(var e=[],d=0;d1){h=a[a.length-1];a[0].setEnd(h.endContainer,h.endOffset)}h=a[0];var a=h.collapsed,i,l,n;if((d=h.getEnclosedNode())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in s&&(!d.is("a")||!d.getText()))try{n=d.$.createControlRange(); -n.addElement(d.$);n.select();return}catch(p){}(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);n=h.createBookmark();b=n.startNode;if(!a)f=n.endNode;n=h.document.$.body.createTextRange();n.moveToElementText(b.$);n.moveStart("character",1);if(f){j=h.document.$.body.createTextRange();j.moveToElementText(f.$);n.setEndPoint("EndToEnd",j);n.moveEnd("character",-1)}else{i= -b.getNext(k);l=b.hasAscendant("pre");i=!(i&&i.getText&&i.getText().match(j))&&(l||!b.hasPrevious()||b.getPrevious().is&&b.getPrevious().is("br"));l=h.document.createElement("span");l.setHtml("");l.insertBefore(b);i&&h.document.createText("").insertBefore(b)}h.setStartBefore(b);b.remove();if(a){if(i){n.moveStart("character",-1);n.select();h.document.$.selection.clear()}else n.select();h.moveToPosition(l,CKEDITOR.POSITION_BEFORE_START);l.remove()}else{h.setEndBefore(f);f.remove();n.select()}}else{f= -this.getNative();if(!f)return;this.removeAllRanges();for(n=0;n=0){h.collapse(1);l.setEnd(h.endContainer.$,h.endOffset)}else throw o; +selectRanges:function(a){var b=this.root.editor,b=b&&b._.hiddenSelectionContainer;this.reset();if(b)for(var b=this.root,d,g=0;g1){h=a[a.length-1];a[0].setEnd(h.endContainer,h.endOffset)}h=a[0];var a=h.collapsed,k,l,p;if((d=h.getEnclosedNode())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in t&&(!d.is("a")||!d.getText()))try{p=d.$.createControlRange(); +p.addElement(d.$);p.select();return}catch(n){}(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);p=h.createBookmark();b=p.startNode;if(!a)f=p.endNode;p=h.document.$.body.createTextRange();p.moveToElementText(b.$);p.moveStart("character",1);if(f){j=h.document.$.body.createTextRange();j.moveToElementText(f.$);p.setEndPoint("EndToEnd",j);p.moveEnd("character",-1)}else{k= +b.getNext(i);l=b.hasAscendant("pre");k=!(k&&k.getText&&k.getText().match(j))&&(l||!b.hasPrevious()||b.getPrevious().is&&b.getPrevious().is("br"));l=h.document.createElement("span");l.setHtml("");l.insertBefore(b);k&&h.document.createText("").insertBefore(b)}h.setStartBefore(b);b.remove();if(a){if(k){p.moveStart("character",-1);p.select();h.document.$.selection.clear()}else p.select();h.moveToPosition(l,CKEDITOR.POSITION_BEFORE_START);l.remove()}else{h.setEndBefore(f);f.remove();p.select()}}else{f= +this.getNative();if(!f)return;this.removeAllRanges();for(p=0;p=0){h.collapse(1);l.setEnd(h.endContainer.$,h.endOffset)}else throw o; }f.addRange(l)}}this.reset();this.root.fire("selectionchange")}}},fake:function(a){var b=this.root.editor;this.reset();g(b);var c=this._.cache,e=new CKEDITOR.dom.range(this.root);e.setStartBefore(a);e.setEndAfter(a);c.ranges=new CKEDITOR.dom.rangeList(e);c.selectedElement=c.startElement=a;c.type=CKEDITOR.SELECTION_ELEMENT;c.selectedText=c.nativeSel=null;this.isFake=1;this.rev=p++;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");g=g.replace(/([ \t\n\r]+| )/g, " ");g=g.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var f=a.getDocument().createElement("div");f.append(d);d.$.outerHTML="
"+g+"
";d.copyAttributes(f.getFirst());d=f.getFirst().remove()}else d.setHtml(g);b=d}else g?b=n(c?[a.getHtml()]:k(a),b):a.moveChildren(b);b.replace(a);if(e){var c=b,h;if((h=c.getPrevious(B))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("pre")){e=l(h.getHtml(),/\n$/,"")+"\n\n"+l(c.getHtml(),/^\n/,"");CKEDITOR.env.ie?c.$.outerHTML="
"+e+"
":c.setHtml(e);h.remove()}}else c&& m(b)}function k(a){a.getName();var b=[];l(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 l(a,b,c){var e="",d="",a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(e=b);c&&(d=c);return""});return e+a.replace(b,c)+d}function n(a,b){var c;a.length>1&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));
 for(var e=0;e"),d=d.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat(" ",a.length-1)+" "});if(c){var g=b.clone();g.setHtml(d);c.append(g)}else b.setHtml(d)}return c||b}function o(a,b){var c=this._.definition,
-e=c.attributes,c=c.styles,d=t(this)[a.getName()],g=CKEDITOR.tools.isEmpty(e)&&CKEDITOR.tools.isEmpty(c),f;for(f in e)if(!((f=="class"||this._.definition.fullMatch)&&a.getAttribute(f)!=A(f,e[f]))&&!(b&&f.slice(0,5)=="data-")){g=a.hasAttribute(f);a.removeAttribute(f)}for(var h in c)if(!(this._.definition.fullMatch&&a.getStyle(h)!=A(h,c[h],true))){g=g||!!a.getStyle(h);a.removeStyle(h)}j(a,d,y[a.getName()]);g&&(this._.definition.alwaysRemoveElement?m(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==
-CKEDITOR.ENTER_BR&&!a.hasAttributes()?m(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function q(a){for(var b=t(this),c=a.getElementsByTag(this.element),e,d=c.count();--d>=0;){e=c.getItem(d);e.isReadOnly()||o.call(this,e,true)}for(var g in b)if(g!=this.element){c=a.getElementsByTag(g);for(d=c.count()-1;d>=0;d--){e=c.getItem(d);e.isReadOnly()||j(e,b[g])}}}function j(a,b,c){if(b=b&&b.attributes)for(var e=0;e=0;){e=c.getItem(d);e.isReadOnly()||o.call(this,e,true)}for(var g in b)if(g!=this.element){c=a.getElementsByTag(g);for(d=c.count()-1;d>=0;d--){e=c.getItem(d);e.isReadOnly()||j(e,b[g])}}}function j(a,b,c){if(b=b&&b.attributes)for(var e=0;e",a||b.name,"");return c.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,c=a.attributes&&a.attributes.style||"",
 e="";c.length&&(c=c.replace(v,";"));for(var d in b){var g=b[d],f=(d+":"+g).replace(v,";");g=="inherit"?e=e+f:c=c+f}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,true));return a._ST=c+e};CKEDITOR.style.customHandlers={};CKEDITOR.style.addCustomHandler=function(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},a,true);return this.customHandlers[a.type]=b};
 var F=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,C=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(b,f){this.requiredContent=this.allowedContent=this.style=b;CKEDITOR.tools.extend(this,f,true)},CKEDITOR.styleCommand.prototype.exec=function(b){b.focus();this.state==CKEDITOR.TRISTATE_OFF?b.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&b.removeStyle(this.style)},CKEDITOR.stylesSet=
@@ -442,8 +442,8 @@ a,c,e,function(){var a=['
");return a.join("")})}},checkbox:function(a,c,e){if(!(arguments.length<3)){var d=b.call(this,c,{"default":!!c["default"]});if(c.validate)this.validate=c.validate;CKEDITOR.ui.dialog.uiElement.call(this,a,c,e,"span",null,null,function(){var b=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},true),e=[],f=CKEDITOR.tools.getNextId()+"_label",j={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":f};h(b);if(c["default"])j.checked= "checked";if(typeof b.inputStyle!="undefined")b.style=b.inputStyle;d.checkbox=new CKEDITOR.ui.dialog.uiElement(a,b,e,"input",null,j);e.push(' ");return e.join("")})}},radio:function(a,c,e){if(!(arguments.length<3)){b.call(this,c);if(!this._["default"])this._["default"]=this._.initValue=c.items[0][1];if(c.validate)this.validate=c.valdiate;var d=[],f=this;CKEDITOR.ui.dialog.labeledElement.call(this, -a,c,e,function(){for(var b=[],e=[],j=(c.id?c.id:CKEDITOR.tools.getNextId())+"_radio",k=0;k'+CKEDITOR.tools.htmlEncode(c.label)+"")}},select:function(a,c,e){if(!(arguments.length<3)){var d=b.call(this,c);if(c.validate)this.validate=c.validate;d.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,a,c,e,function(){var b=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_select":CKEDITOR.tools.getNextId()+"_select"},true),e=[],f=[],j={id:d.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};e.push('"); @@ -461,7 +461,7 @@ CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:fun a;!b&&this.fire("change",{value:a})},getValue:function(){for(var a=this._.children,b=0;b0?new CKEDITOR.dom.element(a.$.forms[0].elements[0]):this.getElement()}, submit:function(){this.getInputElement().getParent().$.submit();return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(a){var b=/^on([A-Z]\w+)/,c,e=function(a,b,c,e){a.on("formLoaded",function(){a.getInputElement().on(c,e,a)})},d;for(d in a)if(c=d.match(b))this.eventProcessors[d]?this.eventProcessors[d].call(this,this._.dialog,a[d]):e(this,this._.dialog,c[1].toLowerCase(),a[d]);return this},reset:function(){function a(){c.$.open();var i="";e.size&& -(i=e.size-(CKEDITOR.env.ie?7:0));var s=b.frameId+"_input";c.$.write(['','
','