Lines Matching defs:m

9 1);if(1==b.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);d=!1;try{d=!window.frameElement}catch(m){}document.documentElement.doScroll&&d&&c()}}}()},b=window.CKEDITOR_GETURL;if(b){var c=f.getUrl;f.getUrl=function(a){return b.call(f,a)||c.call(f,a)}}return f}()),CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=
11 b,!0)},on:function(c,b,f,k,d){function h(a,g,d,h){a={name:c,sender:this,editor:a,data:g,listenerData:k,stop:d,cancel:h,removeListener:m};return!1===b.call(f,a)?!1:a.data}function m(){n.removeListener(c,b)}var g=a.call(this,c);if(0>g.getListenerIndex(b)){g=g.listeners;f||(f=this);isNaN(d)&&(d=10);var n=this;h.fn=b;h.priority=d;for(var p=g.length-1;0<=p;p--)if(g[p].priority<=d)return g.splice(p+1,0,h),{removeListener:m};g.unshift(h)}return{removeListener:m}},once:function(){var a=Array.prototype.slice.call(arguments),
12 b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},l=0,k=function(){l=1};return function(d,h,m){var g=f(this)[d];d=a;var n=l;a=l=0;if(g){var p=g.listeners;if(p.length)for(var p=p.slice(0),t,w=0;w<p.length;w++){if(g.errorProof)try{t=p[w].call(this,m,h,b,k)}catch(q){}else t=p[w].call(this,
13 m,h,b,k);!1===t?l=1:"undefined"!=typeof t&&(h=t);if(a||l)break}}h=l?!1:"undefined"==typeof h?!0:h;a=d;l=n;return h}}(),fireOnce:function(a,b,l){b=this.fire(a,b,l);delete f(this)[a];return b},removeListener:function(a,b){var l=f(this)[a];if(l){var k=l.getListenerIndex(b);0<=k&&l.listeners.splice(k,1)}},removeAllListeners:function(){var a=f(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=f(this)[a])&&0<a.listeners.length}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,
32 genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var g=arguments,d=this;window.setTimeout(function(){a.apply(d,g)},0)}},normalizeCssText:function(a,g){var d=[],b,h=CKEDITOR.tools.parseCssText(a,!0,g);for(b in h)d.push(b+":"+h[b]);d.sort();return d.length?d.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(a,d,b,m){a=[d,b,m];for(d=0;3>d;d++)a[d]=("0"+parseInt(a[d],10).toString(16)).slice(-2);
33 return"#"+a.join("")})},normalizeHex:function(a){return a.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(a,d,b,m){a=d.toLowerCase();3==a.length&&(a=a.split(""),a=[a[0],a[0],a[1],a[1],a[2],a[2]].join(""));return"#"+a+m})},parseCssText:function(a,g,d){var b={};d&&(a=(new CKEDITOR.dom.element("span")).setAttribute("style",a).getAttribute("style")||"");a&&(a=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(a)));if(!a||";"==a)return b;a.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,
34 function(a,d,m){g&&(d=d.toLowerCase(),"font-family"==d&&(m=m.replace(/\s*,\s*/g,",")),m=CKEDITOR.tools.trim(m));b[d]=m});return b},writeCssText:function(a,g){var d,b=[];for(d in a)b.push(d+":"+a[d]);g&&b.sort();return b.join("; ")},objectCompare:function(a,g,d){var b;if(!a&&!g)return!0;if(!a||!g)return!1;for(b in a)if(a[b]!=g[b])return!1;if(!d)for(b in g)if(a[b]!=g[b])return!1;return!0},objectKeys:function(a){var g=[],d;for(d in a)g.push(d);return g},convertArrayToObject:function(a,g){var d={};1==
122 getChildCount:1,getChild:1,getChildren:1}),function(){function a(a,b){var g=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(g.collapsed)return this.end(),null;g.optimize()}var c,d=g.startContainer;c=g.endContainer;var e=g.startOffset,f=g.endOffset,m,h=this.guard,k=this.type,n=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var l=c.type==CKEDITOR.NODE_ELEMENT?c:c.getParent(),D=c.type==CKEDITOR.NODE_ELEMENT?c.getChild(f):c.getNext();this._.guardLTR=function(a,
123 b){return(!b||!l.equals(a))&&(!D||!a.equals(D))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(g.root))}}if(a&&!this._.guardRTL){var C=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),F=d.type==CKEDITOR.NODE_ELEMENT?e?d.getChild(e-1):null:d.getPrevious();this._.guardRTL=function(a,b){return(!b||!C.equals(a))&&(!F||!a.equals(F))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(g.root))}}var E=a?this._.guardRTL:this._.guardLTR;m=h?function(a,b){return!1===E(a,b)?!1:h(a,b)}:E;this.current?c=this.current[n](!1,
124 k,m):(a?c.type==CKEDITOR.NODE_ELEMENT&&(c=0<f?c.getChild(f-1):!1===m(c,!0)?null:c.getPreviousSourceNode(!0,k,m)):(c=d,c.type==CKEDITOR.NODE_ELEMENT&&((c=c.getChild(e))||(c=!1===m(d,!0)?null:d.getNextSourceNode(!0,k,m)))),c&&!1===m(c)&&(c=null));for(;c&&!this._.end;){this.current=c;if(!this.evaluator||!1!==this.evaluator(c)){if(!b)return c}else if(b&&this.evaluator)return!1;c=c[n](!1,k,m)}this.end();return this.current=null}function f(b){for(var g,c=null;g=a.call(this,b);)c=g;return c}CKEDITOR.dom.walker=
130 CKEDITOR.dom.walker.ignored=function(a){return function(b){b=l(b)||k(b)||d(b);return!!(a^b)}};var m=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(a){return function(b){for(var g=0,c=b.getChildCount();g<c;++g)if(!m(b.getChild(g)))return!!a;return!a}};var g=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var b={},g;for(g in a)CKEDITOR.dtd[g]["#"]&&(b[g]=1);return b}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=
131 function(a){return function(b){b=m(b)?!1:b.type==CKEDITOR.NODE_TEXT||b.type==CKEDITOR.NODE_ELEMENT&&(b.is(CKEDITOR.dtd.$inline)||b.is("hr")||"false"==b.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&b.is(n)&&g(b))?!0:!1;return!!(a^b)}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(h(a));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&e.test(a.getText()))?a:!1}}(),CKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=
132 this.startOffset=this.startContainer=null;this.collapsed=!0;var f=a instanceof CKEDITOR.dom.document;this.document=f?a:a.getDocument();this.root=f?a.getBody():a},function(){function a(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function f(a,b,c,d,e){function f(a,b,g,c){var d=g?a.getPrevious():a.getNext();if(c&&k)return d;r||c?b.append(a.clone(!0,e),g):(a.remove(),l&&b.append(a));return d}function m(){var a,b,g,c=Math.min(N.length,
135 0===y?(z=z.getChild(y),C=!0):z=z.getChild(y-1):E=C=!0;for(var N=z.getParents(),G=A.getParents(),V=m(),J=N.length-1,P=G.length-1,K=c,S,O,ca,fa=-1,Q=V;Q<=J;Q++){O=N[Q];ca=O.getNext();for(Q!=J||O.equals(G[Q])&&J<P?b&&(S=K.append(O.clone(0,e))):C?f(O,K,!1,E):H&&K.append(a.document.createText(O.substring(y)));ca;){if(ca.equals(G[Q])){fa=Q;break}ca=f(ca,K)}K=S}K=c;for(Q=V;Q<=P;Q++)if(c=G[Q],ca=c.getPrevious(),c.equals(N[Q]))b&&(K=K.getChild(0));else{Q!=P||c.equals(N[Q])&&P<J?b&&(S=K.append(c.clone(0,e))):
137 return function(d){return c(d)||b(d)?!0:!a&&k(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}}function e(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&m(a)&&(b=a);return h(a)&&!(k(a)&&a.equals(b))})}}var l={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},k=CKEDITOR.dom.walker.bogus(),d=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,
138 h=CKEDITOR.dom.walker.editable(),m=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);
149 c.setStart(a,b);c.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),g;for(c.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};g=c.next();){if(g.type!=CKEDITOR.NODE_TEXT)return!1;C=g!=a?g.getText():g.substring(b);if(d.test(C))return!1}return!0};if(this.collapsed)break;var m=this.getCommonAncestor(),h=this.root,k,l,r,z,A,y=!1,D,C;D=this.startContainer;var F=this.startOffset;D.type==CKEDITOR.NODE_TEXT?(F&&(D=!CKEDITOR.tools.trim(D.substring(0,F)).length&&
150 D,y=!!D),D&&((z=D.getPrevious())||(r=D.getParent()))):(F&&(z=D.getChild(F-1)||D.getLast()),z||(r=D));for(r=c(r);r||z;){if(r&&!z){!A&&r.equals(m)&&(A=!0);if(e?r.isBlockBoundary():!h.contains(r))break;y&&"inline"==r.getComputedStyle("display")||(y=!1,A?k=r:this.setStartBefore(r));z=r.getPrevious()}for(;z;)if(D=!1,z.type==CKEDITOR.NODE_COMMENT)z=z.getPrevious();else{if(z.type==CKEDITOR.NODE_TEXT)C=z.getText(),d.test(C)&&(z=null),D=/[\s\ufeff]$/.test(C);else if((z.$.offsetWidth>(CKEDITOR.env.webkit?1:
152 CKEDITOR.tools.trim(D.substring(F)).length?y=!0:(y=!D.getLength(),F==D.getLength()?(z=D.getNext())||(r=D.getParent()):f(D,F)&&(r=D.getParent())):(z=D.getChild(F))||(r=D);for(;r||z;){if(r&&!z){!A&&r.equals(m)&&(A=!0);if(e?r.isBlockBoundary():!h.contains(r))break;y&&"inline"==r.getComputedStyle("display")||(y=!1,A?l=r:r&&this.setEndAfter(r));z=r.getNext()}for(;z;){D=!1;if(z.type==CKEDITOR.NODE_TEXT)C=z.getText(),f(z,0)||(z=null),D=/^[\s\ufeff]/.test(C);else if(z.type==CKEDITOR.NODE_ELEMENT){if((0<z.$.offsetWidth||
153 b&&z.is("br"))&&!z.data("cke-bookmark"))if(y&&CKEDITOR.dtd.$removeEmpty[z.getName()]){C=z.getText();if(d.test(C))z=null;else for(F=z.$.getElementsByTagName("*"),E=0;I=F[E++];)if(!CKEDITOR.dtd.$removeEmpty[I.nodeName.toLowerCase()]){z=null;break}z&&(D=!!C.length)}else z=null}else D=1;D&&y&&(A?l=r:this.setEndAfter(r));if(z){D=z.getNext();if(!r&&!D){r=z;z=null;break}z=D}else r=null}r&&(r=c(r.getParent()))}k&&l&&(m=k.contains(l)?l:k,this.setStartBefore(m),this.setEndAfter(m));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:r=
156 CKEDITOR.POSITION_BEFORE_END);r=new CKEDITOR.dom.walker(r);r.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?e:V;H=G=L=null;r=r.lastForward();H=H||h;this.setEndAt(H,!r&&this.checkEndOfBlock()||r&&H.contains(r)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);L&&this.setEndAfter(L)}},shrink:function(a,b,c){var d="boolean"===typeof c?c:c&&"boolean"===typeof c.shrinkOnBlockBoundary?c.shrinkOnBlockBoundary:!0,e=c&&c.skipBogus;if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var f=this.clone(),m=
157 this.startContainer,h=this.endContainer,k=this.startOffset,l=this.endOffset,r=c=1;m&&m.type==CKEDITOR.NODE_TEXT&&(k?k>=m.getLength()?f.setStartAfter(m):(f.setStartBefore(m),c=0):f.setStartBefore(m));h&&h.type==CKEDITOR.NODE_TEXT&&(l?l>=h.getLength()?f.setEndAfter(h):(f.setEndAfter(h),r=0):f.setEndBefore(h));var f=new CKEDITOR.dom.walker(f),z=CKEDITOR.dom.walker.bookmark(),A=CKEDITOR.dom.walker.bogus();f.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};
158 var y;f.guard=function(b,c){if(e&&A(b)||z(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||c&&b.equals(y)||!1===d&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;c||b.type!=CKEDITOR.NODE_ELEMENT||(y=b);return!0};c&&(m=f[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(m,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);r&&(f.reset(),(f=f[a==CKEDITOR.SHRINK_ELEMENT?
164 e=c.block,f=d.block,m=null;if(!c.blockLimit.equals(d.blockLimit))return null;"br"!=a&&(e||(e=this.fixBlock(!0,a),f=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),f||(f=this.fixBlock(!1,a)));c=e&&this.checkStartOfBlock();d=f&&this.checkEndOfBlock();this.deleteContents();e&&e.equals(f)&&(d?(m=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(f,CKEDITOR.POSITION_AFTER_END),f=null):c?(m=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,
165 CKEDITOR.POSITION_BEFORE_START),e=null):(f=this.splitElement(e,b||!1),e.is("ul","ol")||e.appendBogus()));return{previousBlock:e,nextBlock:f,wasStartOfBlock:c,wasEndOfBlock:d,elementPath:m}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var c=this.extractContents(!1,b||!1),d=a.clone(!1,b||!1);c.appendTo(d);d.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function a(g){return function(a){return b(a)||
172 this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var e=a,f=c,h=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(!1)&&(h=e[b?"getLast":"getFirst"](m));f||h||(h=e[b?"getPrevious":"getNext"](m));a=h}return!!c},moveToClosestEditablePosition:function(a,b){var c,d=0,e,f,m=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(c=new CKEDITOR.dom.range(this.root),
173 c.moveToPosition(a,m[b?0:1])):c=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))d=1;else if(e=c[b?"getNextEditableNode":"getPreviousEditableNode"]())d=1,(f=e.type==CKEDITOR.NODE_ELEMENT)&&e.is(CKEDITOR.dtd.$block)&&"false"==e.getAttribute("contenteditable")?(c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),c.setEndAt(e,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&f&&e.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(c.setEnd(e,0),c.collapse()):c.moveToPosition(e,m[b?1:0]);d&&this.moveToRange(c);
177 b=e.startContainer.split(e.startOffset),a.insertAfter(e.startContainer)):e.insertNode(a);a.scrollIntoView();d&&(e.startContainer.setText(c),b.remove());a.remove()},_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,b){var c=this.getCommonAncestor(),d=this.getBoundaryNodes(),e=[],f,m,h,k;if(c&&c.find)for(m=c.find(a),f=0;f<m.count();f++)if(c=m.getItem(f),b||!c.isReadOnly())h=c.getPosition(d.startNode)&CKEDITOR.POSITION_FOLLOWING||
194 extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function a(a,b,c,d,g){var e,f;a=[];for(e in b){f=b[e];f="boolean"==typeof f?{}:"function"==typeof f?{match:f}:E(f);"$"!=e.charAt(0)&&(f.elements=e);c&&(f.featureName=c.toLowerCase());var h=f;h.elements=k(h.elements,/\s+/)||null;h.propertiesOnly=h.propertiesOnly||!0===h.elements;var m=/\s*,\s*/,l=void 0;for(l in L){h[l]=k(h[l],
195 m)||null;var r=h,v=N[l],n=k(h[N[l]],m),z=h[l],G=[],x=!0,A=void 0;n?x=!1:n={};for(A in z)"!"==A.charAt(0)&&(A=A.slice(1),G.push(A),n[A]=!0,x=!1);for(;A=G.pop();)z[A]=z["!"+A],delete z["!"+A];r[v]=(x?!1:n)||null}h.match=h.match||null;d.push(f);a.push(f)}b=g.elements;g=g.generic;var C;c=0;for(d=a.length;c<d;++c){e=E(a[c]);f=!0===e.classes||!0===e.styles||!0===e.attributes;h=e;l=v=m=void 0;for(m in L)h[m]=u(h[m]);r=!0;for(l in N){m=N[l];v=h[m];n=[];z=void 0;for(z in v)-1<z.indexOf("*")?n.push(new RegExp("^"+
196 z.replace(/\*/g,".*")+"$")):n.push(z);v=n;v.length&&(h[m]=v,r=!1)}h.nothingRequired=r;h.noProperties=!(h.attributes||h.classes||h.styles);if(!0===e.elements||null===e.elements)g[f?"unshift":"push"](e);else for(C in h=e.elements,delete e.elements,h)if(b[C])b[C][f?"unshift":"push"](e);else b[C]=[e]}}function f(a,c,e,g){if(!a.match||a.match(c))if(g||d(a,c))if(a.propertiesOnly||(e.valid=!0),e.allAttributes||(e.allAttributes=b(a.attributes,c.attributes,e.validAttributes)),e.allStyles||(e.allStyles=b(a.styles,
197 c.styles,e.validStyles)),!e.allClasses){a=a.classes;c=c.classes;g=e.validClasses;if(a)if(!0===a)a=!0;else{for(var f=0,h=c.length,m;f<h;++f)m=c[f],g[m]||(g[m]=a(m));a=!1}else a=!1;e.allClasses=a}}function b(a,b,c){if(!a)return!1;if(!0===a)return!0;for(var d in b)c[d]||(c[d]=a(d));return!1}function c(a,b,c){if(!a.match||a.match(b)){if(a.noProperties)return!1;c.hadInvalidAttribute=e(a.attributes,b.attributes)||c.hadInvalidAttribute;c.hadInvalidStyle=e(a.styles,b.styles)||c.hadInvalidStyle;a=a.classes;
200 typeof d){if(!(d in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,d))return!1;return!0}function m(a){if(!a)return{};a=a.split(/\s*,\s*/).sort();for(var b={};a.length;)b[a.shift()]="cke-test";return b}function g(a){var b,c,d,e,g={},f=1;for(a=I(a);b=a.match(G);)(c=b[2])?(d=n(c,"styles"),e=n(c,"attrs"),c=n(c,"classes")):d=e=c=null,g["$"+f++]={elements:b[1],classes:c,styles:d,attributes:e},a=a.slice(b[0].length);return g}function n(a,b){var c=a.match(V[b]);return c?I(c[1]):null}
201 function p(a){var b=a.styleBackup=a.attributes.style,c=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(b||"",1));a.classes||(a.classes=c?c.split(/\s+/):[])}function t(a,b,d,e){var g=0,h;e.toHtml&&(b.name=b.name.replace(J,"$1"));if(e.doCallbacks&&a.elementCallbacks){a:{h=a.elementCallbacks;for(var m=0,k=h.length,l;m<k;++m)if(l=h[m](b)){h=l;break a}h=void 0}if(h)return h}if(e.doTransform&&(h=a._.transformations[b.name])){p(b);for(m=0;m<h.length;++m)z(a,b,h[m]);q(b)}if(e.doFilter){a:{m=
202 b.name;k=a._;a=k.allowedRules.elements[m];h=k.allowedRules.generic;m=k.disallowedRules.elements[m];k=k.disallowedRules.generic;l=e.skipRequired;var r={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},n,u;if(a||h){p(b);if(m)for(n=0,u=m.length;n<u;++n)if(!1===c(m[n],b,r)){a=null;break a}if(k)for(n=0,u=k.length;n<u;++n)c(k[n],b,r);if(a)for(n=0,u=a.length;n<u;++n)f(a[n],b,r,l);if(h)for(n=
203 0,u=h.length;n<u;++n)f(h[n],b,r,l);a=r}else a=null}if(!a||!a.valid)return d.push(b),1;u=a.validAttributes;var G=a.validStyles;h=a.validClasses;var m=b.attributes,x=b.styles,k=b.classes;l=b.classBackup;var N=b.styleBackup,A,C,y=[],r=[],E=/^data-cke-/;n=!1;delete m.style;delete m["class"];delete b.classBackup;delete b.styleBackup;if(!a.allAttributes)for(A in m)u[A]||(E.test(A)?A==(C=A.replace(/^data-cke-saved-/,""))||u[C]||(delete m[A],n=!0):(delete m[A],n=!0));if(!a.allStyles||a.hadInvalidStyle){for(A in x)a.allStyles||
204 G[A]?y.push(A+":"+x[A]):n=!0;y.length&&(m.style=y.sort().join("; "))}else N&&(m.style=N);if(!a.allClasses||a.hadInvalidClass){for(A=0;A<k.length;++A)(a.allClasses||h[k[A]])&&r.push(k[A]);r.length&&(m["class"]=r.sort().join(" "));l&&r.length<l.split(/\s+/).length&&(n=!0)}else l&&(m["class"]=l);n&&(g=1);if(!e.skipFinalValidation&&!v(b))return d.push(b),1}e.toHtml&&(b.name=b.name.replace(P,"cke:$1"));return g}function w(a){var b=[],c;for(c in a)-1<c.indexOf("*")&&b.push(c.replace(/\*/g,".*"));return b.length?
207 !e[h.name]){e=!1;break b}e=!0}if(e)a.name=b,a.attributes={},c.push({check:"parent-down",el:a});else{e=a.parent;for(var g=e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==e.name,m,k,f=d.length;0<f;)h=d[--f],g&&(h.type==CKEDITOR.NODE_TEXT||h.type==CKEDITOR.NODE_ELEMENT&&F.$inline[h.name])?(m||(m=new CKEDITOR.htmlParser.element(b),m.insertAfter(a),c.push({check:"parent-down",el:m})),m.add(h,0)):(m=null,k=F[e.name]||F.span,h.insertAfter(a),e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||h.type!=CKEDITOR.NODE_ELEMENT||
208 k[h.name]||c.push({check:"el-up",el:h}));a.remove()}}else d in{style:1,script:1}?a.remove():(a.parent&&c.push({check:"it",el:a.parent}),a.replaceWithChildren())}function z(a,b,c){var d,e;for(d=0;d<c.length;++d)if(e=c[d],!(e.check&&!a.check(e.check,!1)||e.left&&!e.left(b))){e.right(b,K);break}}function A(a,b){var c=b.getDefinition(),d=c.attributes,e=c.styles,g,f,h,m;if(a.name!=c.element)return!1;for(g in d)if("class"==g)for(c=d[g].split(/\s+/),h=a.classes.join("|");m=c.pop();){if(-1==h.indexOf(m))return!1}else if(a.attributes[g]!=
212 d&&(d=E(d),e.classes=d["class"]?d["class"].split(/\s+/):null,e.requiredClasses=e.classes,delete d["class"],e.attributes=d,e.requiredAttributes=d&&CKEDITOR.tools.objectKeys(d))}else if(CKEDITOR.tools.isArray(b)){for(e=0;e<b.length;++e)f=this.allow(b[e],c,d);return f}a(this,b,c,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,c,d){if(this.disabled)return!1;var e=this,g=[],f=this.editor&&this.editor.config.protectedSource,h,m=!1,k={doFilter:!c,doTransform:!0,doCallbacks:!0,toHtml:b};
213 a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1;if(!b||"span"!=a.name||!~CKEDITOR.tools.objectKeys(a.attributes).join("|").indexOf("data-cke-"))if(h=t(e,a,g,k),h&1)m=!0;else if(h&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var c;a:{var d=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));c=[];var l,r,v;if(f)for(r=0;r<f.length;++r)if((v=d.match(f[r]))&&v[0].length==d.length){c=!0;
214 break a}d=CKEDITOR.htmlParser.fragment.fromHtml(d);1==d.children.length&&(l=d.children[0]).type==CKEDITOR.NODE_ELEMENT&&t(e,l,c,k);c=!c.length}c||g.push(a)}},null,!0);g.length&&(m=!0);var l;a=[];d=H[d||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var n;c=g.pop();)c.type==CKEDITOR.NODE_ELEMENT?r(c,d,a):c.remove();for(;l=a.pop();)if(c=l.el,c.parent)switch(n=F[c.parent.name]||F.span,l.check){case "it":F.$removeEmpty[c.name]&&!c.children.length?r(c,d,a):v(c)||r(c,d,a);break;case "el-up":c.parent.type==
215 CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[c.name]||r(c,d,a);break;case "parent-down":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[c.name]||r(c.parent,d,a)}return m},checkFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=!0},disallow:function(b){if(!l(this,b,!0))return!1;"string"==typeof b&&(b=g(b));a(this,b,null,this.disallowedContent,this._.disallowedRules);return!0},
217 this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?this.check(a.requiredContent):!0},addTransformations:function(a){var b,c;if(!this.disabled&&a){var d=this._.transformations,e;for(e=0;e<a.length;++e){b=a[e];var g=void 0,f=void 0,h=void 0,m=void 0,k=void 0,l=void 0;c=[];for(f=0;f<b.length;++f)h=b[f],"string"==typeof h?(h=h.split(/\s*:\s*/),m=h[0],k=null,l=h[1]):(m=h.check,k=h.left,l=h.right),g||(g=h,g=g.element?g.element:m?m.match(/^([a-z0-9]+)/i)[0]:
218 g.left.getDefinition().element),k instanceof CKEDITOR.style&&(k=D(k)),c.push({check:m==g?null:m,left:k,right:"string"==typeof l?C(l):l});b=g;d[b]||(d[b]=[]);d[b].push(c)}}},check:function(a,b,c){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var d=a.length;d--;)if(this.check(a[d],b,c))return!0;return!1}var e,f;if("string"==typeof a){f=a+"\x3c"+(!1===b?"0":"1")+(c?"1":"0")+"\x3e";if(f in this._.cachedChecks)return this._.cachedChecks[f];d=g(a).$1;e=d.styles;var h=d.classes;d.name=d.elements;
219 d.classes=h=h?h.split(/\s*,\s*/):[];d.styles=m(e);d.attributes=m(d.attributes);d.children=[];h.length&&(d.attributes["class"]=h.join(" "));e&&(d.attributes.style=CKEDITOR.tools.writeCssText(d.styles));e=d}else d=a.getDefinition(),e=d.styles,h=d.attributes||{},e&&!CKEDITOR.tools.isEmpty(e)?(e=E(e),h.style=CKEDITOR.tools.writeCssText(e,!0)):e={},e={name:d.element,attributes:h,classes:h["class"]?h["class"].split(/\s+/):[],styles:e,children:[]};var h=CKEDITOR.tools.clone(e),k=[],l;if(!1!==b&&(l=this._.transformations[e.name])){for(d=
226 c[d[0]];a.styles["margin-right"]=c[d[1]];a.styles["margin-bottom"]=c[d[2]];a.styles["margin-left"]=c[d[3]]}if(a.styles.margin){var c=a.styles.margin.match(/(\-?[\.\d]+\w+)/g)||["0px"];switch(c.length){case 1:a.styles.margin=c[0];break;case 2:b([0,1,0,1]);break;case 3:b([0,1,2,1]);break;case 4:b([0,1,2,3])}delete a.styles.margin}},matchesStyle:A,transform:function(a,b){if("string"==typeof b)a.name=b;else{var c=b.getDefinition(),d=c.styles,e=c.attributes,g,f,h,m;a.name=c.element;for(g in e)if("class"==
227 g)for(c=a.classes.join("|"),h=e[g].split(/\s+/);m=h.pop();)-1==c.indexOf(m)&&a.classes.push(m);else a.attributes[g]=e[g];for(f in d)a.styles[f]=d[f]}}}}(),function(){CKEDITOR.focusManager=function(a){if(a.focusManager)return a.focusManager;this.hasFocus=!1;this.currentActive=null;this._={editor:a};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(a){this._.timer&&clearTimeout(this._.timer);a&&(this.currentActive=a);this.hasFocus||this._.locked||((a=
234 h=[],m=[],g=function(a){c&&(k?c.call(e,a):c.call(e,h,m))};if(0===d)g(!0);else{var n=function(a,b){(b?h:m).push(a);0>=--d&&(l&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),g(b))},p=function(b,c){a[b]=1;var d=f[b];delete f[b];for(var e=0;e<d.length;e++)d[e](b,c)},t=function(b){if(a[b])n(b,!0);else{var d=f[b]||(f[b]=[]);d.push(n);if(!(1<d.length)){var e=new CKEDITOR.dom.element("script");e.setAttributes({type:"text/javascript",src:b});c&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?
238 file:b||this.fileName+".js"}}},load:function(a,f,b){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var c=this.loaded,e=this.registered,l=[],k={},d={},h=0;h<a.length;h++){var m=a[h];if(m)if(c[m]||e[m])d[m]=this.get(m);else{var g=this.getFilePath(m);l.push(g);g in k||(k[g]=[]);k[g].push(m)}}CKEDITOR.scriptLoader.load(l,function(a,e){if(e.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+k[e[0]].join(",")+'" was not found at "'+e[0]+'".');for(var g=0;g<a.length;g++)for(var h=k[a[g]],
239 m=0;m<h.length;m++){var l=h[m];d[l]=this.get(l);c[l]=1}f.call(b,d)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(a){var f={};return function(b,c,e){var l={},k=function(b){a.call(this,b,function(a){CKEDITOR.tools.extend(l,a);var b=[],d;for(d in a){var n=a[d],p=n&&n.requires;if(!f[d]){if(n.icons)for(var t=n.icons.split(","),w=t.length;w--;)CKEDITOR.skin.addIcon(t[w],n.path+"icons/"+(CKEDITOR.env.hidpi&&
249 b.customConfig);k(a)||a.fireOnce("customConfigLoaded")}function h(a){CKEDITOR.skin.loadPart("editor",function(){m(a)})}function m(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(b,c){var d=a.config.title;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(c);a.title="string"==typeof d||!1===d?d:[a.lang.editor,a.name].join(", ");a.config.contentsLangDirection||(a.config.contentsLangDirection=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir);a.fire("langLoaded");
251 e=[],g=[];a.plugins=c;for(var h in c){var m=c[h],k=m.lang,l=null,r=m.requires,n;CKEDITOR.tools.isArray(r)&&(r=r.join(","));if(r&&(n=r.match(f)))for(;r=n.pop();)CKEDITOR.error("editor-plugin-required",{plugin:r.replace(",",""),requiredBy:h});k&&!a.lang[h]&&(k.split&&(k=k.split(",")),0<=CKEDITOR.tools.indexOf(k,a.langCode)?l=a.langCode:(l=a.langCode.replace(/-.*/,""),l=l!=a.langCode&&0<=CKEDITOR.tools.indexOf(k,l)?l:0<=CKEDITOR.tools.indexOf(k,"en")?"en":k[0]),m.langEntries&&m.langEntries[l]?(a.lang[h]=
252 m.langEntries[l],l=null):g.push(CKEDITOR.getUrl(m.path+"lang/"+l+".js")));e.push(l);d.push(m)}CKEDITOR.scriptLoader.load(g,function(){for(var c=["beforeInit","init","afterInit"],g=0;g<c.length;g++)for(var f=0;f<d.length;f++){var h=d[f];0===g&&e[f]&&h.lang&&h.langEntries&&(a.lang[h.name]=h.langEntries[e[f]]);if(h[c[g]])h[c[g]](a)}a.fireOnce("pluginsLoaded");b.keystrokes&&a.setKeystroke(a.config.keystrokes);for(f=0;f<a.config.blockedKeystrokes.length;f++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[f]]=
254 return b.is("tr")?a.cloneContents():b.clone(!0)}for(var e=new CKEDITOR.dom.documentFragment,g,f,h,m=0;m<a.length;m++){var k=a[m],l=k.startContainer.getAscendant("tr",!0);c(k)?(g||(g=l.getAscendant("table").clone(),g.append(l.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),e.append(g),g=g.findOne("thead, tbody, tfoot")),f&&f.equals(l)||(f=l,h=l.clone(),g.append(h)),h.append(d(k))):e.append(k.cloneContents())}return g?e:b.getHtmlFromRange(a[0])}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=
266 {},h,m=c[4];c=!!c[5];if(m)for(;h=a.exec(m);){var g=h[1].toLowerCase();h=h[2]||h[3]||h[4]||"";d[g]=!h&&f[g]?g:CKEDITOR.tools.htmlDecodeAttr(h)}this.onTagOpen(e,d,c);!k&&CKEDITOR.dtd.$cdata[e]&&(k=[])}}else if(e=c[2])this.onComment(e)}if(b.length>l)this.onText(b.substring(l,b.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c",a)},openTagClose:function(a,f){f?this._.output.push(" /\x3e"):this._.output.push("\x3e")},
274 f&&!f[e]||a&&g&&!g[a]&&CKEDITOR.dtd[a]?e==x.name&&(n(x,x.parent,1),c--):(b||(m(),b=1),d=d.clone(),d.parent=x,x=d,v.splice(c,1),c--)}}function m(){for(;u.length;)n(u.shift(),x)}function g(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var b=a.children.length,c=a.children[b-1],d;c&&c.type==CKEDITOR.NODE_TEXT&&((d=CKEDITOR.tools.rtrim(c.value))?c.value=d:a.children.length=b-1)}}function n(b,c,e){c=c||x||q;var f=x;void 0===b.previous&&(p(c,b)&&(x=c,w.onTagOpen(d,{}),b.returnPoint=c=x),g(b),
278 v.unshift(x),x.parent)n(x,x.parent,1);else{e.isOrphan=1;break}h(d);m();e.parent=x;e.isEmpty?n(e):x=e}}};w.onTagClose=function(a){for(var b=v.length-1;0<=b;b--)if(a==v[b].name){v.splice(b,1);return}for(var c=[],e=[],g=x;g!=q&&g.name!=a;)g._.isBlockLike||e.unshift(g),c.push(g),g=g.returnPoint||g.parent;if(g!=q){for(b=0;b<c.length;b++){var f=c[b];n(f,f.parent)}x=g;g._.isBlockLike&&m();n(g,g.parent);g==x&&(x=x.parent);v=v.concat(e)}"body"==a&&(d=!1)};w.onText=function(a){if(!(x._.hasInlineStarted&&!u.length||
279 r||B)&&(a=CKEDITOR.tools.ltrim(a),0===a.length))return;var b=x.name,g=b?CKEDITOR.dtd[b]||(x._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):c;if(!B&&!g["#"]&&b in f)w.onTagOpen(e[b]||""),w.onText(a);else{m();h();r||B||(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a);if(p(x,a))this.onTagOpen(d,{},0,1);x.add(a)}};w.onCDATA=function(a){x.add(new CKEDITOR.htmlParser.cdata(a))};w.onComment=function(a){m();h();x.add(new CKEDITOR.htmlParser.comment(a))};w.parse(l);for(m();x!=
287 this.rules,e=c.length-1;0<=e&&a<c[e].priority;)e--;return e+1},exec:function(a,c){var e=c instanceof CKEDITOR.htmlParser.node||c instanceof CKEDITOR.htmlParser.fragment,f=Array.prototype.slice.call(arguments,1),k=this.rules,d=k.length,h,m,g,n;for(n=0;n<d;n++)if(e&&(h=c.type,m=c.name),g=k[n],!(a.nonEditable&&!g.options.applyToAll||a.nestedEditable&&g.options.excludeNestedEditable)){g=g.value.apply(null,f);if(!1===g||e&&g&&(g.name!=m||g.type!=h))return g;null!=g&&(f[0]=c=g)}return c},execOnName:function(a,
288 c){for(var e=0,f=this.rules,k=f.length,d;c&&e<k;e++)d=f[e],a.nonEditable&&!d.options.applyToAll||a.nestedEditable&&d.options.excludeNestedEditable||(c=c.replace(d.value[0],d.value[1]));return c}}}(),function(){function a(a,d){function g(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function f(a,d){return function(e){if(e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var f=[],m=b(e),k,r;if(m)for(h(m,1)&&f.push(m);m;)l(m)&&
289 (k=c(m))&&h(k)&&((r=c(k))&&!l(r)?f.push(k):(g(n).insertAfter(k),k.remove())),m=m.previous;for(m=0;m<f.length;m++)f[m].remove();if(f=!a||!1!==("function"==typeof d?d(e):d))n||CKEDITOR.env.needsBrFiller||e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?n||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||e.name in CKEDITOR.dtd.tr||e.name in CKEDITOR.dtd.$listItem)?(f=b(e),f=!f||"form"==e.name&&"input"==f.name):f=!1:f=!1;f&&e.add(g(a))}}}function h(a,b){if((!n||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&
290 "br"==a.name&&!a.attributes["data-cke-eol"])return!0;var c;return a.type==CKEDITOR.NODE_TEXT&&(c=a.value.match(v))&&(c.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,c.index))).insertBefore(a),a.value=c[0]),!CKEDITOR.env.needsBrFiller&&n&&(!b||a.parent.name in G)||!n&&((c=a.previous)&&"br"==c.name||!c||l(c)))?!0:!1}var m={elements:{}},n="html"==d,G=CKEDITOR.tools.extend({},r),z;for(z in G)"#"in x[z]||delete G[z];for(z in G)m.elements[z]=f(n,a.config.fillEmptyBlocks);m.root=f(n,!1);m.elements.br=
291 function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=b.attributes;if("data-cke-bogus"in d||"data-cke-eol"in d)delete d["data-cke-bogus"];else{for(d=b.next;d&&e(d);)d=d.next;var f=c(b);!d&&l(b.parent)?k(b.parent,g(a)):l(d)&&f&&!l(f)&&g(a).insertBefore(d)}}}}(n);return m}function f(a,b){return a!=CKEDITOR.ENTER_BR&&!1!==b?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function b(a){for(a=a.children[a.children.length-1];a&&e(a);)a=a.previous;return a}function c(a){for(a=a.previous;a&&
293 a.contenteditable="false"}function h(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function m(a){return a.replace(C,function(a,b,c){return"\x3c"+b+c.replace(F,function(a,b){return E.test(b)&&-1==c.indexOf("data-cke-saved-"+b)?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+"\x3e"})}function g(a,b){return a.replace(b,function(a,b,c){0===a.indexOf("\x3ctextarea")&&(a=b+t(c).replace(/</g,"\x26lt;").replace(/>/g,
298 d.addRules(y);d.addRules(D,{applyToAll:!0});d.addRules(a(b,"html"),{applyToAll:!0});b.on("toHtml",function(a){a=a.data;var c=a.dataValue,d,c=q(c,b),c=g(c,H),c=m(c),c=g(c,I),c=c.replace(N,"$1cke:$2"),c=c.replace(V,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),c=c.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");d=a.context||b.editable().getName();var e;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==d&&(d="div",c="\x3cpre\x3e"+c+"\x3c/pre\x3e",
302 g,f,h,m;b&&"object"==typeof b?(g=b.context,c=b.fixForBody,d=b.dontFilter,f=b.filter,h=b.enterMode,m=b.protectedWhitespaces):g=b;g||null===g||(g=e.editable().getName());return e.fire("toHtml",{dataValue:a,context:g,fixForBody:c,dontFilter:d,filter:f||e.filter,enterMode:h||e.enterMode,protectedWhitespaces:m}).dataValue},toDataFormat:function(a,b){var c,d,e;b&&(c=b.context,d=b.filter,e=b.enterMode);c||null===c||(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,
311 a.onElementName(b,k)))return this.remove(),!1;f.name=d;if(!(f=a.onElement(b,f)))return this.remove(),!1;if(f!==this)return this.replaceWith(f),!1;if(f.name==k)break;if(f.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(f),!1;if(!f.name)return this.replaceWithChildren(),!1}k=f.attributes;var h,m;for(h in k){for(d=k[h];;)if(m=a.onAttributeName(b,h))if(m!=h)delete k[h],h=m;else break;else{delete k[h];break}m&&(!1===(d=a.onAttribute(b,f,m,d))?delete k[m]:k[m]=d)}f.isEmpty||this.filterChildren(a,!1,
312 b);return!0},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var l=this.name,k=[],d=this.attributes,h,m;a.openTag(l,d);for(h in d)k.push([h,d[h]]);a.sortAttributes&&k.sort(f);h=0;for(m=k.length;h<m;h++)d=k[h],a.attribute(d[0],d[1]);a.openTagClose(l,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(l)},writeChildrenHtml:b.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,b=a.length;b;)a[--b].insertAfter(this);this.remove()},forEach:b.forEach,
324 html:""}).html,h=a.fire("uiSpace",{space:"bottom",html:""}).html,m=new CKEDITOR.template('\x3c{outerEl} id\x3d"cke_{name}" class\x3d"{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"application"'+(a.title?' aria-labelledby\x3d"cke_{name}_arialbl"':"")+"\x3e"+(a.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':"")+'\x3c{outerEl} class\x3d"cke_inner cke_reset" role\x3d"presentation"\x3e{topHtml}\x3c{outerEl} id\x3d"{contentId}" class\x3d"cke_contents cke_reset" role\x3d"presentation"\x3e\x3c/{outerEl}\x3e{bottomHtml}\x3c/{outerEl}\x3e\x3c/{outerEl}\x3e'),
325 b=CKEDITOR.dom.element.createFromHtml(m.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.title,topHtml:d?'\x3cspan id\x3d"'+a.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+d+"\x3c/span\x3e":"",contentId:a.ui.spaceId("contents"),bottomHtml:h?'\x3cspan id\x3d"'+a.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+h+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));k==CKEDITOR.ELEMENT_MODE_REPLACE?
328 {}))[a]=b};CKEDITOR.editor.prototype.setMode=function(a,b){var f=this,k=this._.modes;if(a!=f.mode&&k&&k[a]){f.fire("beforeSetMode",a);if(f.mode){var d=f.checkDirty(),k=f._.previousModeData,h,m=0;f.fire("beforeModeUnload");f.editable(0);f._.previousMode=f.mode;f._.previousModeData=h=f.getData(1);"source"==f.mode&&k==h&&(f.fire("lockSnapshot",{forceUpdate:!0}),m=1);f.ui.space("contents").setHtml("");f.mode=""}else f._.previousModeData=f.getData(1);this._.modes[a](function(){f.mode=a;void 0!==d&&!d&&
329 f.resetDirty();m?f.fire("unlockSnapshot"):"wysiwyg"==a&&f.fire("saveSnapshot");setTimeout(function(){f.fire("mode");b&&b.call(f)},0)})}};CKEDITOR.editor.prototype.resize=function(a,b,f,k){var d=this.container,h=this.ui.space("contents"),m=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;k=k?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):d;k.setSize("width",a,!0);m&&(m.style.width="1%");var g=(k.$.offsetHeight||0)-(h.$.clientHeight||
330 0),d=Math.max(b-(f?0:g),0);b=f?b+g:b;h.setStyle("height",d+"px");m&&(m.style.width="100%");this.fire("resize",{outerHeight:b,contentsHeight:d,outerWidth:a||k.getSize("width")})};CKEDITOR.editor.prototype.getResizable=function(a){return a?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),CKEDITOR.config.startupMode="wysiwyg",function(){function a(a){var b=a.editor,d=a.data.path,e=d.blockLimit,g=a.data.selection,
331 h=g.getRanges()[0],m;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(g=f(g,d))g.appendBogus(),m=CKEDITOR.env.ie;k(b,d.block,e)&&h.collapsed&&!h.getCommonAncestor().isReadOnly()&&(d=h.clone(),d.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),e=new CKEDITOR.dom.walker(d),e.guard=function(a){return!c(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!e.checkForward()||d.checkStartOfBlock()&&d.checkEndOfBlock())&&(b=h.fixBlock(!0,b.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||
332 (b=b.getFirst(c))&&b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()).match(/^(?:&nbsp;|\xa0)$/)&&b.remove(),m=1,a.cancel());m&&h.select()}function f(a,b){if(a.isFake)return 0;var d=b.block||b.blockLimit,e=d&&d.getLast(c);if(!(!d||!d.isBlockBoundary()||e&&e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary()||d.is("pre")||d.getBogus()))return d}function b(a){var b=a.data.getTarget();b.is("input")&&(b=b.getAttribute("type"),"submit"!=b&&"reset"!=b||a.data.preventDefault())}function c(a){return g(a)&&
335 a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function h(a){var b=a.editor;b.getSelection().scrollIntoView();setTimeout(function(){b.fire("saveSnapshot")},0)}function m(a,b,c){var d=a.getCommonAncestor(b);for(b=a=c?b:a;(a=a.getParent())&&!d.equals(a)&&1==a.getChildCount();)b=a;b.remove()}var g,n,p,t,w,q,v,u,x,B;CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,b){this.base(b.$||b);this.editor=a;this.status="unloaded";this.hasFocus=!1;this.setup()},proto:{focus:function(){var a;
354 f+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var n={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var c=b.data.domEvent.getKey(),d;if(c in n){b=a.getSelection();var e,f=b.getRanges()[0],h=f.startPath(),m,k,u,c=8==c;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(e=
355 b.getSelectedElement())||(e=l(b))?(a.fire("saveSnapshot"),f.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),f.select(),a.fire("saveSnapshot"),d=1):f.collapsed&&((m=h.block)&&(u=m[c?"getPrevious":"getNext"](g))&&u.type==CKEDITOR.NODE_ELEMENT&&u.is("table")&&f[c?"checkStartOfBlock":"checkEndOfBlock"]()?(a.fire("saveSnapshot"),f[c?"checkEndOfBlock":"checkStartOfBlock"]()&&m.remove(),f["moveToElementEdit"+(c?"End":"Start")](u),f.select(),a.fire("saveSnapshot"),d=1):h.blockLimit&&h.blockLimit.is("td")&&
360 !c)&&d.collapsed){if(d.startContainer.type==CKEDITOR.NODE_ELEMENT){var g=d.startContainer.getChild(d.startOffset-(c?1:0));if(g&&g.type==CKEDITOR.NODE_ELEMENT&&g.is("hr")){a.fire("saveSnapshot");g.remove();b=!0;break a}}d=d.startPath().block;if(!d||d&&d.contains(e))b=void 0;else{a.fire("saveSnapshot");var f;(f=(c?d:e).getBogus())&&f.remove();f=a.getSelection();g=f.createBookmarks();(c?e:d).moveChildren(c?d:e,!1);b.lastElement.mergeSiblings();m(e,d,!c);f.selectBookmarks(g);b=!0}}else b=!1}else c=d,
361 f=b.block,d=c.endPath().block,f&&d&&!f.equals(d)?(a.fire("saveSnapshot"),(e=f.getBogus())&&e.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),d.getParent()&&(d.moveChildren(f,!1),b.lastElement.mergeSiblings(),m(f,d,!0)),c=a.getSelection().getRanges()[0],c.collapse(1),c.optimize(),""===c.startContainer.getHtml()&&c.startContainer.appendBogus(),c.select(),b=!0):b=!1;if(!b)return;a.getSelection().scrollIntoView();a.fire("saveSnapshot");return!1}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),
366 q=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var e,g,f,h,m=[],k=d.range.startContainer;e=d.range.startPath();for(var k=l[k.getName()],n=0,u=c.getChildren(),v=u.count(),x=-1,p=-1,C=0,q=e.contains(l.$list);n<v;++n)e=u.getItem(n),a(e)?(f=e.getName(),q&&f in CKEDITOR.dtd.$list?m=m.concat(b(e,d)):(h=!!k[f],"br"!=f||!e.data("cke-eol")||n&&n!=v-1||(C=(g=n?m[n-1].node:u.getItem(n+1))&&(!a(g)||!g.is("br")),g=g&&a(g)&&l.$block[g.getName()]),-1!=x||h||(x=n),h||(p=n),m.push({isElement:1,
367 isLineBreak:C,isBlock:e.isBlockBoundary(),hasBlockSibling:g,node:e,name:f,allowed:h}),g=C=0)):m.push({isElement:0,node:e,allowed:1});-1<x&&(m[x].firstNotAllowed=1);-1<p&&(m[p].lastNotAllowed=1);return m}function e(b,c){var d=[],g=b.getChildren(),f=g.count(),h,m=0,k=l[c],n=!b.is(l.$inline)||b.is("br");for(n&&d.push(" ");m<f;m++)h=g.getItem(m),a(h)&&!h.is(k)?d=d.concat(e(h,c)):d.push(h);n&&d.push(" ");return d}function g(b){return a(b.startContainer)&&b.startContainer.getChild(b.startOffset-1)}function f(b){return b&&
368 a(b)&&(b.is(l.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function h(b,c,d,e){var g=b.clone(),f,m;g.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);(f=(new CKEDITOR.dom.walker(g)).next())&&a(f)&&n[f.getName()]&&(m=f.getPrevious())&&a(m)&&!m.getParent().equals(b.startContainer)&&d.contains(m)&&e.contains(f)&&f.isIdentical(m)&&(f.moveChildren(m),f.remove(),h(b,c,d,e))}function m(b,c){function d(b,c){if(c.isBlock&&c.isElement&&!c.node.is("br")&&a(b)&&b.is("br"))return b.remove(),1}var e=c.endContainer.getChild(c.endOffset),
374 R.remove()}}n.dataWrapper=I;B=x}if(B){R=n.range;B=R.document;var M;I=n.blockLimit;p=0;var U,Q=[],T,Y;x=q=0;var W,Z;G=R.startContainer;var w=n.endPath.elements[0],aa,t=w.getPosition(G),fa=!!w.getCommonAncestor(G)&&t!=CKEDITOR.POSITION_IDENTICAL&&!(t&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);G=b(n.dataWrapper,n);for(m(G,R);p<G.length;p++){t=G[p];if(M=t.isLineBreak){M=R;W=I;var X=void 0,ba=void 0;t.hasBlockSibling?M=1:(X=M.startContainer.getAscendant(l.$block,1))&&X.is({div:1,p:1})?
385 c=c.contains(CKEDITOR.dtd.$list),!g.equals(c))){var m=e.contains(CKEDITOR.dtd.$list).getParent();f=function(a){return!a.equals(m)}}f||(f=function(a){return!a.equals(e.block)&&!a.equals(e.blockLimit)});this.rebuildFragment(a,b,d,f)},rebuildFragment:function(a,b,c,d){for(var e;c&&!c.equals(b)&&d(c);)e=c.clone(0,1),a.fragment.appendTo(e),a.fragment=e,c=c.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,c=a.endContainer,d=a.startOffset,e=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&
388 c),f=new CKEDITOR.dom.elementPath(e,c);if(a.mergeList){var h=g.contains(CKEDITOR.dtd.$list),m=f.contains(CKEDITOR.dtd.$list);h.equals(m)||(m.moveChildren(h),m.remove())}a.mergeListItems&&(g=g.contains(CKEDITOR.dtd.$listItem),f=f.contains(CKEDITOR.dtd.$listItem),g.equals(f)||b(f,d,e));d.remove();e.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var c=new CKEDITOR.dom.range(b);c.setStartBefore(a.bookmark.startNode);c.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=
389 c.createBookmark()}},merge:function(a,c){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var d=a.mergeBlockBookmark.startNode,e=a.mergeBlockBookmark.endNode,g=new CKEDITOR.dom.elementPath(d,c),f=new CKEDITOR.dom.elementPath(e,c),g=g.block,f=f.block;g&&f&&!g.equals(f)&&b(f,d,e);d.remove();e.remove()}}},table:function(){function a(c){var e=[],g,f=new CKEDITOR.dom.walker(c),h=c.startPath().contains(d),m=c.endPath().contains(d),k={};f.guard=function(a,f){if(a.type==CKEDITOR.NODE_ELEMENT){var l="visited_"+
390 (f?"out":"in");if(a.getCustomData(l))return;CKEDITOR.dom.element.setMarker(k,a,l,1)}if(f&&h&&a.equals(h))g=c.clone(),g.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),e.push(g);else if(!f&&m&&a.equals(m))g=c.clone(),g.setStartAt(m,CKEDITOR.POSITION_AFTER_START),e.push(g);else{if(l=!f)l=a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&(!h||b(a,h))&&(!m||b(a,m));l&&(g=c.clone(),g.selectNodeContents(a),e.push(g))}};f.lastForward();CKEDITOR.dom.element.clearAllMarkers(k);return e}function b(a,c){var d=CKEDITOR.POSITION_CONTAINS+
392 CKEDITOR.END)&&(b=a.range.clone(),b.setStartBefore(c),b.setEndAfter(g),a.purgeTableBookmark=b.createBookmark())}},detectRanges:function(e,g){var f=c(g,e.bookmark),h=f.clone(),m,k,l=f.getCommonAncestor();l.is(CKEDITOR.dtd.$tableContent)&&!l.is(d)&&(l=l.getAscendant("table",!0));k=l;l=new CKEDITOR.dom.elementPath(f.startContainer,k);k=new CKEDITOR.dom.elementPath(f.endContainer,k);l=l.contains("table");k=k.contains("table");if(l||k)l&&k&&b(l,k)?(e.tableSurroundingRange=h,h.setStartAt(l,CKEDITOR.POSITION_AFTER_END),
393 h.setEndAt(k,CKEDITOR.POSITION_BEFORE_START),h=f.clone(),h.setEndAt(l,CKEDITOR.POSITION_AFTER_END),m=f.clone(),m.setStartAt(k,CKEDITOR.POSITION_BEFORE_START),m=a(h).concat(a(m))):l?k||(e.tableSurroundingRange=h,h.setStartAt(l,CKEDITOR.POSITION_AFTER_END),f.setEndAt(l,CKEDITOR.POSITION_AFTER_END)):(e.tableSurroundingRange=h,h.setEndAt(k,CKEDITOR.POSITION_BEFORE_START),f.setStartAt(k,CKEDITOR.POSITION_AFTER_START)),e.tableContentsRanges=m?m:a(f)},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();)b.extractContents(),
398 d.selectedText=b(a);d.nativeSel=null;this.isFake=1;this.rev=v++;c._.fakeSelection=this;B=!1;this.root.fire("selectionchange")}function e(){var b=this._.fakeSelection,c;if(b){c=this.getSelection(1);var d;if(!(d=!c)&&(d=!c.isHidden())){d=b;var e=c.getRanges(),g=d.getRanges(),f=e.length&&e[0]._getTableElement()&&e[0]._getTableElement().getAscendant("table",!0),h=g.length&&g[0]._getTableElement()&&g[0]._getTableElement().getAscendant("table",!0),m=1===e.length&&e[0]._getTableElement()&&e[0]._getTableElement().is("table"),
399 k=1===g.length&&g[0]._getTableElement()&&g[0]._getTableElement().is("table"),l=1===e.length&&e[0].collapsed,g=a(e,!!CKEDITOR.env.webkit)&&a(g);f=f&&h?f.equals(h)||h.contains(f):!1;f&&(l||g)?(m&&!k&&d.selectRanges(e),d=!0):d=!1;d=!d}d&&(b.reset(),b=0)}if(!b&&(b=c||this.getSelection(1),!b||b.getType()==CKEDITOR.SELECTION_NONE))return;this.fire("selectionCheck",b);c=this.elementPath();c.compare(this._.selectionPreviousPath)||(d=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(c.blockLimit),
401 !1}if(!(a.root instanceof CKEDITOR.editable))return!1;var c=a.startContainer,e=a.getPreviousNode(d,null,c),g=a.getNextNode(d,null,c);return b(e)||b(g,1)||!(e||g||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()&&c.getBogus())?!0:!1}function m(a){g(a,!1);var b=a.getDocument().createText(u);a.setCustomData("cke-fillingChar",b);return b}function g(a,b){var c=a&&a.removeCustomData("cke-fillingChar");if(c){if(!1!==b){var d=a.getDocument().getSelection().getNative(),e=d&&"None"!=d.type&&d.getRangeAt(0),
409 function d(a){if(CKEDITOR.env.ie){var b=(a=a.getRanges()[0])?a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&("false"==a.getAttribute("contenteditable")||"true"==a.getAttribute("contenteditable"))},!0):null;return a&&"false"==b.getAttribute("contenteditable")&&b}}var f=c.document,h=CKEDITOR.document,m=c.editable(),k=f.getBody(),n=f.getDocumentElement(),r=m.isInline(),u,v;CKEDITOR.env.gecko&&m.attachListener(m,"focus",function(a){a.removeListener();0!==u&&(a=c.getSelection().getNative())&&
410 a.isCollapsed&&a.anchorNode==m.$&&(a=c.createRange(),a.moveToElementEditStart(m),a.select())},null,null,-2);m.attachListener(m,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){u&&CKEDITOR.env.webkit&&(u=c._.previousActive&&c._.previousActive.equals(f.getActive()))&&null!=c._.previousScrollTop&&c._.previousScrollTop!=m.$.scrollTop&&(m.$.scrollTop=c._.previousScrollTop);c.unlockSelection(u);u=0},null,null,-1);m.attachListener(m,"mousedown",function(){u=0});if(CKEDITOR.env.ie||r)q?m.attachListener(m,
411 "beforedeactivate",a,null,null,-1):m.attachListener(c,"selectionCheck",a,null,null,-1),m.attachListener(m,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){c.lockSelection(v);u=1},null,null,-1),m.attachListener(m,"mousedown",function(){u=0});if(CKEDITOR.env.ie&&!r){var x;m.attachListener(m,"mousedown",function(a){2==a.data.$.button&&((a=c.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(x=c.window.getScrollPosition()))});m.attachListener(m,"mouseup",function(a){2==a.data.$.button&&
413 c);p.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<n.$.clientHeight&&a.$.x<n.$.clientWidth){p=k.$.createTextRange();try{p.moveToPoint(a.$.clientX,a.$.clientY)}catch(d){}w=p.duplicate();n.on("mousemove",b);h.on("mouseup",c);n.on("mouseup",c)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)n.on("mousedown",function(a){a.data.getTarget().is("html")&&(h.on("mouseup",b),n.on("mouseup",b))})}}m.attachListener(m,"selectionchange",e,c);m.attachListener(m,"keyup",l,c);m.attachListener(m,"keydown",
414 function(a){var b=this.getSelection(1);d(b)&&(b.selectElement(d(b)),a.data.preventDefault())},c);m.attachListener(m,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){c.forceNextSelectionCheck();c.selectionChange(1)});if(r&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var B;m.attachListener(m,"mousedown",function(){B=1});m.attachListener(f.getDocumentElement(),"mouseup",function(){B&&l.call(c);B=0})}else m.attachListener(CKEDITOR.env.ie?m:f.getDocumentElement(),"mouseup",l,c);CKEDITOR.env.webkit&&
415 m.attachListener(f,"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:m.hasFocus&&g(m)}},null,null,-1);m.attachListener(m,"keydown",t(c),null,null,-1)});c.on("setData",function(){c.unlockSelection();CKEDITOR.env.webkit&&b()});c.on("contentDomUnload",function(){c.unlockSelection()});if(CKEDITOR.env.ie9Compat)c.on("beforeDestroy",b,null,null,9);c.on("dataReady",function(){delete c._.fakeSelection;delete c._.hiddenSelectionContainer;
422 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.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:n,_createFillingCharSequenceNode:m,FILLING_CHAR_SEQUENCE:u});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=q?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:q?function(){var a=this._.cache;if(a.type)return a.type;
424 c.startOffset&&D[d.childNodes[c.startOffset].nodeName.toLowerCase()]&&(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=q?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var e=d.children,g,f,h=b.duplicate(),m=0,k=e.length-1,l=-1,n,r;m<=k;)if(l=Math.floor((m+k)/2),g=e[l],h.moveToElementText(g),n=h.compareEndPoints("StartToStart",
425 b),0<n)k=l-1;else if(0>n)m=l+1;else return{container:d,offset:a(g)};if(-1==l||l==e.length-1&&0>n){h.moveToElementText(d);h.setEndPoint("StartToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!h)return g=e[e.length-1],g.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:e.length}:{container:g,offset:g.nodeValue.length};for(d=e.length;0<h&&0<d;)f=e[--d],f.nodeType==CKEDITOR.NODE_TEXT&&(r=f,h-=f.nodeValue.length);return{container:r,offset:-h}}h.collapse(0<n?!0:!1);h.setEndPoint(0<
438 b.length-1&&(v=b[p],x=b[p+1],n=v.clone(),n.setStart(v.endContainer,v.endOffset),n.setEnd(x.startContainer,x.startOffset),!n.collapsed&&(n.shrink(CKEDITOR.NODE_ELEMENT,!0),d=n.getCommonAncestor(),n=n.getEnclosedNode(),d.isReadOnly()||n&&n.isReadOnly()))){x.setStart(v.startContainer,v.startOffset);b.splice(p--,1);continue}d=b[p];x=this.document.$.createRange();d.collapsed&&CKEDITOR.env.webkit&&h(d)&&(n=m(this.root),d.insertNode(n),(v=n.getNext())&&!n.getPrevious()&&v.type==CKEDITOR.NODE_ELEMENT&&"br"==
443 2,CKEDITOR.STYLE_OBJECT=3,function(){function a(a,b){for(var c,d;(a=a.getParent())&&!a.equals(b);)if(a.getAttribute("data-nostyle"))c=a;else if(!d){var e=a.getAttribute("contentEditable");"false"==e?c=a:"true"==e&&(d=1)}return c}function f(a,b,c,d){return(a.getPosition(b)|d)==d&&(!c.childRule||c.childRule(a))}function b(c){var d=c.document;if(c.collapsed)d=u(this,d),c.insertNode(d),c.moveToPosition(d,CKEDITOR.POSITION_BEFORE_END);else{var g=this.element,h=this._.definition,m,k=h.ignoreReadonly,l=
444 k||h.includeReadonly;null==l&&(l=c.root.getCustomData("cke_includeReadonly"));var n=CKEDITOR.dtd[g];n||(m=!0,n=CKEDITOR.dtd.span);c.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.trim();var r=c.createBookmark(),v=r.startNode,p=r.endNode,x=v,q;if(!k){var t=c.getCommonAncestor(),k=a(v,t),t=a(p,t);k&&(x=k.getNextSourceNode(!0));t&&(p=t)}for(x.getPosition(p)==CKEDITOR.POSITION_FOLLOWING&&(x=0);x;){k=!1;if(x.equals(p))x=null,k=!0;else{var B=x.type==CKEDITOR.NODE_ELEMENT?x.getName():null,t=B&&"false"==x.getAttribute("contentEditable"),
445 z=B&&x.getAttribute("data-nostyle");if(B&&x.data("cke-bookmark")){x=x.getNextSourceNode(!0);continue}if(t&&l&&CKEDITOR.dtd.$block[B])for(var A=x,y=e(A),D=void 0,C=y.length,da=0,A=C&&new CKEDITOR.dom.range(A.getDocument());da<C;++da){var D=y[da],H=CKEDITOR.filter.instances[D.data("cke-filter")];if(H?H.check(this):1)A.selectNodeContents(D),b.call(this,A)}y=B?!n[B]||z?0:t&&!l?0:f(x,p,h,L):1;if(y)if(D=x.getParent(),y=h,C=g,da=m,!D||!(D.getDtd()||CKEDITOR.dtd.span)[C]&&!da||y.parentRule&&!y.parentRule(D))k=
449 1);var c=a.createBookmark(),d=c.startNode,e=this._.definition.alwaysRemoveElement;if(a.collapsed){for(var g=new CKEDITOR.dom.elementPath(d.getParent(),a.root),f,h=0,m;h<g.elements.length&&(m=g.elements[h])&&m!=g.block&&m!=g.blockLimit;h++)if(this.checkElementRemovable(m)){var k;!e&&a.collapsed&&(a.checkBoundaryOfElement(m,CKEDITOR.END)||(k=a.checkBoundaryOfElement(m,CKEDITOR.START)))?(f=m,f.match=k?"start":"end"):(m.mergeSiblings(),m.is(this.element)?t.call(this,m):q(m,r(this)[m.getName()]))}if(f){e=
450 d;for(h=0;;h++){m=g.elements[h];if(m.equals(f))break;else if(m.match)continue;else m=m.clone();m.append(e);e=m}e["start"==f.match?"insertBefore":"insertAfter"](f)}}else{var l=c.endNode,n=this;b();for(g=d;!g.equals(l);)f=g.getNextSourceNode(),g.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(g)&&(g.getName()==this.element?t.call(this,g):q(g,r(this)[g.getName()]),f.type==CKEDITOR.NODE_ELEMENT&&f.contains(d)&&(b(),f=d.getNext())),g=f}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function e(a){var b=
452 a.removeStyle(e)}}function d(a){var b=a.createBookmark(!0),c=a.createIterator();c.enforceRealBlocks=!0;this._.enterMode&&(c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var d,e=a.document,g;d=c.getNextParagraph();)!d.isReadOnly()&&(c.activeFilter?c.activeFilter.check(this):1)&&(g=u(this,e,d),m(d,g));a.moveToBookmark(b)}function h(a){var b=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=!0;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,e;d=c.getNextParagraph();)this.checkElementRemovable(d)&&
453 (d.is("pre")?((e=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&d.copyAttributes(e),m(d,e)):t.call(this,d));a.moveToBookmark(b)}function m(a,b){var c=!b;c&&(b=a.getDocument().createElement("div"),a.copyAttributes(b));var d=b&&b.is("pre"),e=a.is("pre"),f=!d&&e;if(d&&!e){e=b;(f=a.getBogus())&&f.remove();f=a.getHtml();f=n(f,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");f=f.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+|&nbsp;)/g,
454 " ");f=f.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var h=a.getDocument().createElement("div");h.append(e);e.$.outerHTML="\x3cpre\x3e"+f+"\x3c/pre\x3e";e.copyAttributes(h.getFirst());e=h.getFirst().remove()}else e.setHtml(f);b=e}else f?b=p(c?[a.getHtml()]:g(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,m;(m=c.getPrevious(H))&&m.type==CKEDITOR.NODE_ELEMENT&&m.is("pre")&&(d=n(m.getHtml(),/\n$/,"")+"\n\n"+n(c.getHtml(),/^\n/,""),CKEDITOR.env.ie?c.$.outerHTML="\x3cpre\x3e"+d+"\x3c/pre\x3e":
455 c.setHtml(d),m.remove())}else c&&v(b)}function g(a){var b=[];n(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"\x3c/pre\x3e"+c+"\x3cpre\x3e"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function n(a,b,c){var d="",e="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(e=c);return""});return d+a.replace(b,c)+e}function p(a,b){var c;
476 this.$.nodeValue+"--\x3e"}}),"use strict",function(){var a={},f={},b;for(b in CKEDITOR.dtd.$blockLimit)b in CKEDITOR.dtd.$list||(a[b]=1);for(b in CKEDITOR.dtd.$block)b in CKEDITOR.dtd.$blockLimit||b in CKEDITOR.dtd.$empty||(f[b]=1);CKEDITOR.dom.elementPath=function(b,e){var l=null,k=null,d=[],h=b,m;e=e||b.getDocument().getBody();do if(h.type==CKEDITOR.NODE_ELEMENT){d.push(h);if(!this.lastElement&&(this.lastElement=h,h.is(CKEDITOR.dtd.$object)||"false"==h.getAttribute("contenteditable")))continue;
477 if(h.equals(e))break;if(!k&&(m=h.getName(),"true"==h.getAttribute("contenteditable")?k=h:!l&&f[m]&&(l=h),a[m])){if(m=!l&&"div"==m){a:{m=h.getChildren();for(var g=0,n=m.count();g<n;g++){var p=m.getItem(g);if(p.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[p.getName()]){m=!0;break a}}m=!1}m=!m}m?l=h:k=h}}while(h=h.getParent());k||(k=e);this.block=l;this.blockLimit=k;this.root=e;this.elements=d}}(),CKEDITOR.dom.elementPath.prototype={compare:function(a){var f=this.elements;a=a&&a.elements;if(!a||
482 "startContainer"]=k;return c}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,f)};var f={createIterator:function(){var a=this,c=CKEDITOR.dom.walker.bookmark(),e=[],f;return{getNextRange:function(k){f=void 0===f?0:f+1;var d=a[f];if(d&&1<a.length){if(!f)for(var h=a.length-1;0<=h;h--)e.unshift(a[h].createBookmark(!0));if(k)for(var m=0;a[f+m+1];){var g=d.document;k=0;h=g.getById(e[m].endNode);
483 for(g=g.getById(e[m+1].startNode);;){h=h.getNextSourceNode(!1);if(g.equals(h))k=1;else if(c(h)||h.type==CKEDITOR.NODE_ELEMENT&&h.isBlockBoundary())continue;break}if(!k)break;m++}for(d.moveToBookmark(e.shift());m--;)h=a[++f],h.moveToBookmark(e.shift()),d.setEnd(h.endContainer,h.endOffset)}return d}}},createBookmarks:function(b){for(var c=[],e,f=0;f<this.length;f++){c.push(e=this[f].createBookmark(b,!0));for(var k=f+1;k<this.length;k++)this[k]=a(e,this[k]),this[k]=a(e,this[k],!0)}return c},createBookmarks2:function(a){for(var c=
488 c(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var c=CKEDITOR.skin.chameleon,f="",m="";"function"==typeof c&&(f=c(this,"editor"),m=c(this,"panel"));a=[[h,a]];e([b],f,a);e(d,m,a)}).call(this,a)}});var k="cke_ui_color",d=[],h=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var b=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){a=c(a);d.push(a);
536 b)})}function h(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function m(a){function b(c){var k=a.getSize(),m=CKEDITOR.document.getWindow().getViewPaneSize(),l=c.data.$.screenX,n=c.data.$.screenY,r=l-d.x,u=n-d.y;d={x:l,y:n};e.x+=r;e.y+=u;a.move(e.x+h[3]<g?-h[3]:e.x-h[1]>m.width-k.width-g?m.width-k.width+("rtl"==f.lang.dir?0:h[1]):e.x,e.y+h[0]<g?-h[0]:e.y-h[2]>m.height-k.height-g?m.height-k.height+h[2]:e.y,1);c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mousemove",
538 y.getChild(0).getFrameDocument();g.on("mousemove",b);g.on("mouseup",c)}f.data.preventDefault()},a)}function g(a){function b(c){var n="rtl"==f.lang.dir,r=l.width,u=l.height,x=r+(c.data.$.screenX-m.x)*(n?-1:1)*(a._.moved?1:2),v=u+(c.data.$.screenY-m.y)*(a._.moved?1:2),p=a._.element.getFirst(),p=n&&p.getComputedStyle("right"),B=a.getPosition();B.y+v>k.height&&(v=k.height-B.y);(n?p:B.x)+x>k.width&&(x=k.width-(n?p:B.x));if(e==CKEDITOR.DIALOG_RESIZE_WIDTH||e==CKEDITOR.DIALOG_RESIZE_BOTH)r=Math.max(d.minWidth||
540 g,h,k,m,l,n,r=CKEDITOR.tools.addFunction(function(d){l=a.getSize();var e=a.parts.contents;e.$.getElementsByTagName("iframe").length&&(n=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%;"\x3e\x3c/div\x3e'),e.append(n));h=l.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks));g=l.width-a.parts.contents.getSize("width",1);m={x:d.screenX,y:d.screenY};k=CKEDITOR.document.getWindow().getViewPaneSize();
557 (a=x.onFocus.call(this))&&a.focus():k(1))},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var a=this.getElement(),b=a.getFirst();b.remove();b.appendTo(a)},this);m(this);g(this);(new CKEDITOR.dom.text(x.title,CKEDITOR.document)).appendTo(this.parts.title);for(q=0;q<x.contents.length;q++)(z=x.contents[q])&&this.addPage(z);this.parts.tabs.on("click",function(a){var b=a.data.getTarget();b.hasClass("cke_dialog_tab")&&(b=b.$.id,this.selectPage(b.substring(4,b.lastIndexOf("_"))),
583 k=["\x3c",h," "],m=(e&&e.call?e(b):e)||{},l=(f&&f.call?f(b):f)||{},n=(g&&g.call?g.call(this,a,b):g)||"",r=this.domId=l.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(m.display="none",this.notAllowed=!0);l.id=r;var x={};b.type&&(x["cke_dialog_ui_"+b.type]=1);b.className&&(x[b.className]=1);b.disabled&&(x.cke_disabled=1);for(var u=l["class"]&&l["class"].split?l["class"].split(" "):[],r=0;r<u.length;r++)u[r]&&(x[u[r]]=1);u=[];for(r in x)u.push(r);
584 l["class"]=u.join(" ");b.title&&(l.title=b.title);x=(b.style||"").split(";");b.align&&(u=b.align,m["margin-left"]="left"==u?0:"auto",m["margin-right"]="right"==u?0:"auto");for(r in m)x.push(r+":"+m[r]);b.hidden&&x.push("display:none");for(r=x.length-1;0<=r;r--)""===x[r]&&x.splice(r,1);0<x.length&&(l.style=(l.style?l.style+"; ":"")+x.join("; "));for(r in l)k.push(r+'\x3d"'+CKEDITOR.tools.htmlEncode(l[r])+'" ');k.push("\x3e",n,"\x3c/",h,"\x3e");c.push(k.join(""));(this._||(this._={})).dialog=a;"boolean"==
587 a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=v.focusIndex}))}},hbox:function(a,b,c,d,e){if(!(4>arguments.length)){this._||(this._={});var f=this._.children=b,g=e&&e.widths||null,h=e&&e.height||null,k,m={role:"presentation"};e&&e.align&&(m.align=e.align);CKEDITOR.ui.dialog.uiElement.call(this,a,e||{type:"hbox"},d,"table",{},m,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(k=0;k<c.length;k++){var b="cke_dialog_ui_hbox_child",d=[];0===k&&
603 a.lang.common.editorHelp})}})}(),CKEDITOR.plugins.add("about",{requires:"dialog",init:function(a){var f=a.addCommand("about",new CKEDITOR.dialogCommand("about"));f.modes={wysiwyg:1,source:1};f.canUndo=!1;f.readOnly=1;a.ui.addButton&&a.ui.addButton("About",{label:a.lang.about.title,command:"about",toolbar:"about"});CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}}),CKEDITOR.plugins.add("basicstyles",{init:function(a){var f=0,b=function(b,d,e,m){if(m){m=new CKEDITOR.style(m);var g=c[e];g.unshift(m);
604 a.attachStyleStateChange(m,function(b){!a.readOnly&&a.getCommand(e).setState(b)});a.addCommand(e,new CKEDITOR.styleCommand(m,{contentForms:g}));a.ui.addButton&&a.ui.addButton(b,{label:d,command:e,toolbar:"basicstyles,"+(f+=10)})}},c={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"==a.styles["font-style"]}]],underline:["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]],strike:["s",
610 c?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),a.getCommand("bidiltr").setState("ltr"==c?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF));c=(b.block||b.blockLimit||a.editable()).getDirection(1);c!=(a._.selDir||a.lang.dir)&&(a._.selDir=c,a.fire("contentDirChanged",c))},exec:function(c){var d=c.getSelection(),h=c.config.enterMode,k=d.getRanges();if(k&&k.length){for(var m={},v=d.createBookmarks(),k=k.createIterator(),u,x=0;u=k.getNextRange(1);){var B=u.getEnclosedNode();B&&(!B||B.type==CKEDITOR.NODE_ELEMENT&&
611 B.getName()in l)||(B=f(u,e,h));B&&a(B,b,c,m);var r=new CKEDITOR.dom.walker(u),z=v[x].startNode,A=v[x++].endNode;r.evaluator=function(a){var b=h==CKEDITOR.ENTER_P?"p":"div",c;if(c=(a?a.type==CKEDITOR.NODE_ELEMENT:!1)&&a.getName()in e){if(b=a.is(b))b=(b=a.getParent())?b.type==CKEDITOR.NODE_ELEMENT:!1;c=!(b&&a.getParent().is("blockquote"))}return!!(c&&a.getPosition(z)&CKEDITOR.POSITION_FOLLOWING&&(a.getPosition(A)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_CONTAINS)==CKEDITOR.POSITION_PRECEDING)};
612 for(;B=r.next();)a(B,b,c,m);u=u.createIterator();for(u.enlargeBr=h!=CKEDITOR.ENTER_BR;B=u.getNextParagraph(h==CKEDITOR.ENTER_P?"p":"div");)a(B,b,c,m)}CKEDITOR.dom.element.clearAllMarkers(m);c.forceNextSelectionCheck();d.selectBookmarks(v);c.focus()}}}}function c(a){var b=a==d.setAttribute,c=a==d.removeAttribute,e=/\bdirection\s*:\s*(.*?)\s*(:?$|;)/;return function(d,f){if(!this.isReadOnly()){var h;if(h=d==(b||c?"dir":"direction")||"style"==d&&(c||e.test(f))){a:{h=this;for(var k=h.getDocument().getBody().getParent();h;){if(h.equals(k)){h=
615 "setAttribute","removeAttribute"],m=0;m<h.length;m++)d[h[m]]=CKEDITOR.tools.override(d[h[m]],c)}(),function(){var a={exec:function(a){var b=a.getCommand("blockquote").state,c=a.getSelection(),e=c&&c.getRanges()[0];if(e){var l=c.createBookmarks();if(CKEDITOR.env.ie){var k=l[0].startNode,d=l[0].endNode,h;if(k&&"blockquote"==k.getParent().getName())for(h=k;h=h.getNext();)if(h.type==CKEDITOR.NODE_ELEMENT&&h.isBlockBoundary()){k.move(h,!0);break}if(d&&"blockquote"==d.getParent().getName())for(h=d;h=h.getPrevious();)if(h.type==
616 CKEDITOR.NODE_ELEMENT&&h.isBlockBoundary()){d.move(h);break}}var m=e.createIterator();m.enlargeBr=a.config.enterMode!=CKEDITOR.ENTER_BR;if(b==CKEDITOR.TRISTATE_OFF){for(k=[];b=m.getNextParagraph();)k.push(b);1>k.length&&(b=a.document.createElement(a.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),d=l.shift(),e.insertNode(b),b.append(new CKEDITOR.dom.text("",a.document)),e.moveToBookmark(d),e.selectNodeContents(b),e.collapse(!0),d=e.createBookmark(),k.push(b),l.unshift(d));h=k[0].getParent();e=[];for(d=
618 k.length;)b=k.shift(),e.append(b)}else if(b==CKEDITOR.TRISTATE_ON){d=[];for(h={};b=m.getNextParagraph();){for(k=e=null;b.getParent();){if("blockquote"==b.getParent().getName()){e=b.getParent();k=b;break}b=b.getParent()}e&&k&&!k.getCustomData("blockquote_moveout")&&(d.push(k),CKEDITOR.dom.element.setMarker(h,k,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(h);b=[];k=[];for(h={};0<d.length;)m=d.shift(),e=m.getParent(),m.getPrevious()?m.getNext()?(m.breakParent(m.getParent()),k.push(m.getNext())):
619 m.remove().insertAfter(e):m.remove().insertBefore(e),e.getCustomData("blockquote_processed")||(k.push(e),CKEDITOR.dom.element.setMarker(h,e,"blockquote_processed",!0)),b.push(m);CKEDITOR.dom.element.clearAllMarkers(h);for(d=k.length-1;0<=d;d--){e=k[d];a:{h=e;for(var m=0,g=h.getChildCount(),n=void 0;m<g&&(n=h.getChild(m));m++)if(n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()){h=!1;break a}h=!0}h&&e.remove()}if(a.config.enterMode==CKEDITOR.ENTER_BR)for(e=!0;b.length;)if(m=b.shift(),"div"==m.getName()){d=
620 new CKEDITOR.dom.documentFragment(a.document);!e||!m.getPrevious()||m.getPrevious().type==CKEDITOR.NODE_ELEMENT&&m.getPrevious().isBlockBoundary()||d.append(a.document.createElement("br"));for(e=m.getNext()&&!(m.getNext().type==CKEDITOR.NODE_ELEMENT&&m.getNext().isBlockBoundary());m.getFirst();)m.getFirst().remove().appendTo(d);e&&d.append(a.document.createElement("br"));d.replace(m);e=!1}}c.selectBookmarks(l);a.focus()}},refresh:function(a,b){this.setState(a.elementPath(b.block||b.blockLimit).contains("blockquote",
625 CKEDITOR.ui.button.prototype={render:function(a,e){function l(){var b=a.mode;b&&(b=this.modes[b]?void 0!==u[b]?u[b]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,b=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:b,this.setState(b),this.refresh&&this.refresh())}var k=CKEDITOR.env,d=this._.id=CKEDITOR.tools.getNextId(),h="",m=this.command,g,n,p;this._.editor=a;var t={id:d,button:this,editor:a,focus:function(){CKEDITOR.document.getById(d).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}},
627 l,this);a.on("mode",l,this);!this.readOnly&&a.on("readOnly",l,this)}else m&&(m=a.getCommand(m))&&(m.on("state",function(){this.setState(m.state)},this),h+=m.state==CKEDITOR.TRISTATE_ON?"on":m.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");if(this.directional)a.on("contentDirChanged",function(b){var d=CKEDITOR.document.getById(this._.id),e=d.getFirst();b=b.data;b!=a.lang.dir?d.addClass("cke_"+b):d.removeClass("cke_ltr").removeClass("cke_rtl");e.setAttribute("style",CKEDITOR.skin.getIconStyle(x,
628 "rtl"==b,this.icon,this.iconOffset))},this);m?(n=a.getCommandKeystroke(m))&&(p=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,n)):h+="off";var x=n=this.name||this.command;this.icon&&!/\./.test(this.icon)&&(x=this.icon,this.icon=null);h={id:d,name:n,iconName:x,label:this.label,cls:this.className||"",state:h,ariaDisabled:"disabled"==h?"true":"false",title:this.title+(p?" ("+p.display+")":""),ariaShortcut:p?a.lang.common.keyboardShortcut+" "+p.aria:"",titleJs:k.gecko&&!k.hc?"":(this.title||
631 b}};CKEDITOR.ui.prototype.addButton=function(a,b){this.add(a,CKEDITOR.UI_BUTTON,b)}}(),function(){function a(a){function b(){for(var g=c(),h=CKEDITOR.tools.clone(a.config.toolbarGroups)||f(a),m=0;m<h.length;m++){var l=h[m];if("/"!=l){"string"==typeof l&&(l=h[m]={name:l});var q,v=l.groups;if(v)for(var u=0;u<v.length;u++)q=v[u],(q=g[q])&&d(l,q);(q=g[l.name])&&d(l,q)}}return h}function c(){var b={},d,f,g;for(d in a.ui.items)f=a.ui.items[d],g=f.toolbar||"others",g=g.split(","),f=g[0],g=parseInt(g[1]||
632 -1,10),b[f]||(b[f]=[]),b[f].push({name:d,order:g});for(f in b)b[f]=b[f].sort(function(a,b){return a.order==b.order?0:0>b.order?-1:0>a.order?1:a.order<b.order?-1:1});return b}function d(b,c){if(c.length){b.items?b.items.push(a.ui.create("-")):b.items=[];for(var d;d=c.shift();)d="string"==typeof d?d:d.name,m&&-1!=CKEDITOR.tools.indexOf(m,d)||(d=a.ui.create(d))&&a.addFeature(d)&&b.items.push(d)}}function h(a){var b=[],c,e,f;for(c=0;c<a.length;++c)e=a[c],f={},"/"==e?b.push(e):CKEDITOR.tools.isArray(e)?
633 (d(f,CKEDITOR.tools.clone(e)),b.push(f)):e.items&&(d(f,CKEDITOR.tools.clone(e.items)),f.name=e.name,b.push(f));return b}var m=a.config.removeButtons,m=m&&m.split(","),g=a.config.toolbar;"string"==typeof g&&(g=a.config["toolbar_"+g]);return a.toolbar=g?h(g):b()}function f(a){return a._.toolbarGroups||(a._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},"/",
637 e.on("uiSpace",function(c){if(c.data.space==e.config.toolbarLocation){c.removeListener();e.toolbox=new b;var f=CKEDITOR.tools.getNextId(),m=['\x3cspan id\x3d"',f,'" class\x3d"cke_voice_label"\x3e',e.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+e.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',f,'" onmousedown\x3d"return false;"\x3e'],f=!1!==e.config.toolbarStartupExpanded,g,l;e.config.toolbarCanCollapse&&e.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&
638 m.push('\x3cspan class\x3d"cke_toolbox_main"'+(f?"\x3e":' style\x3d"display:none"\x3e'));for(var p=e.toolbox.toolbars,t=a(e),w=t.length,q=0;q<w;q++){var v,u=0,x,B=t[q],r="/"!==B&&("/"===t[q+1]||q==w-1),z;if(B)if(g&&(m.push("\x3c/span\x3e"),l=g=0),"/"===B)m.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{z=B.items||B;for(var A=0;A<z.length;A++){var y=z[A],D;if(y){var C=function(a){a=a.render(e,m);F=u.items.push(a)-1;0<F&&(a.previous=u.items[F-1],a.previous.next=a);a.toolbar=u;a.onkey=
639 k;a.onfocus=function(){e.toolbox.focusCommandExecuted||e.focus()}};if(y.type==CKEDITOR.UI_SEPARATOR)l=g&&y;else{D=!1!==y.canGroup;if(!u){v=CKEDITOR.tools.getNextId();u={id:v,items:[]};x=B.name&&(e.lang.toolbar.toolbarGroups[B.name]||B.name);m.push('\x3cspan id\x3d"',v,'" class\x3d"cke_toolbar'+(r?' cke_toolbar_last"':'"'),x?' aria-labelledby\x3d"'+v+'_label"':"",' role\x3d"toolbar"\x3e');x&&m.push('\x3cspan id\x3d"',v,'_label" class\x3d"cke_voice_label"\x3e',x,"\x3c/span\x3e");m.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');
640 var F=p.push(u)-1;0<F&&(u.previous=p[F-1],u.previous.next=u)}D?g||(m.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),g=1):g&&(m.push("\x3c/span\x3e"),g=0);l&&(C(l),l=0);C(y)}}}g&&(m.push("\x3c/span\x3e"),l=g=0);u&&m.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}e.config.toolbarCanCollapse&&m.push("\x3c/span\x3e");if(e.config.toolbarCanCollapse&&e.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var E=CKEDITOR.tools.addFunction(function(){e.execCommand("toolbarCollapse")});
642 b.getFirst().setText(h?"▲":"◀");d.setStyle("height",f-(e.$.offsetHeight-g)+"px");a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:d.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});e.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");m.push('\x3ca title\x3d"'+(f?e.lang.toolbar.toolbarCollapse:e.lang.toolbar.toolbarExpand)+'" id\x3d"'+e.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');
643 f||m.push(" cke_toolbox_collapser_min");m.push('" onclick\x3d"CKEDITOR.tools.callFunction('+E+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',"\x3c/a\x3e")}m.push("\x3c/span\x3e");c.data.html+=m.join("")}});e.on("destroy",function(){if(this.toolbox){var a,b=0,c,e,f;for(a=this.toolbox.toolbars;b<a.length;b++)for(e=a[b].items,c=0;c<e.length;c++)f=e[c],f.clickFn&&CKEDITOR.tools.removeFunction(f.clickFn),f.keyDownFn&&CKEDITOR.tools.removeFunction(f.keyDownFn)}});e.on("uiReady",function(){var a=
644 e.ui.space("toolbox");a&&e.focusManager.add(a,1)});e.addCommand("toolbarFocus",c);e.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");e.ui.add("-",CKEDITOR.UI_SEPARATOR,{});e.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(a,b){b.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(a,b,c){var d=f(this.editor),h=0===b,m={name:a};if(c){if(c=CKEDITOR.tools.search(d,function(a){return a.name==
645 c})){!c.groups&&(c.groups=[]);if(b&&(b=CKEDITOR.tools.indexOf(c.groups,b),0<=b)){c.groups.splice(b+1,0,a);return}h?c.groups.splice(0,0,a):c.groups.push(a);return}b=null}b&&(b=CKEDITOR.tools.indexOf(d,function(a){return a.name==b}));h?d.splice(0,0,a):"number"==typeof b?d.splice(b+1,0,m):d.push(a)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top","use strict",CKEDITOR.plugins.add("notification",{requires:"toolbar",init:function(a){function f(a){var c=new CKEDITOR.dom.element("div");
654 this,null,20)},_removeListeners:function(){var a=CKEDITOR.document.getWindow(),f=this.editor;a.removeListener("scroll",this._uiBuffer.input);a.removeListener("resize",this._uiBuffer.input);f.removeListener("change",this._changeBuffer.input);f.removeListener("floatingSpaceLayout",this._layout);f.removeListener("blur",this._layout)},_layout:function(){function a(){f.setStyle("left",w(q+c.width-h-m))}var f=this.element,b=this.editor,c=b.ui.contentsElement.getClientRect(),e=b.ui.contentsElement.getDocumentPosition(),
655 b=b.ui.space("top"),l=b.getClientRect(),k=f.getClientRect(),d,h=this._notificationWidth,m=this._notificationMargin;d=CKEDITOR.document.getWindow();var g=d.getScrollPosition(),n=d.getViewPaneSize(),p=CKEDITOR.document.getBody(),t=p.getDocumentPosition(),w=CKEDITOR.tools.cssLength;h&&m||(d=this.element.getChild(0),h=this._notificationWidth=d.getClientRect().width,m=this._notificationMargin=parseInt(d.getComputedStyle("margin-left"),10)+parseInt(d.getComputedStyle("margin-right"),10));b.isVisible()&&
656 l.bottom>c.top&&l.bottom<c.bottom-k.height?f.setStyles({position:"fixed",top:w(l.bottom)}):0<c.top?f.setStyles({position:"absolute",top:w(e.y)}):e.y+c.height-k.height>g.y?f.setStyles({position:"fixed",top:0}):f.setStyles({position:"absolute",top:w(e.y+c.height-k.height)});var q="fixed"==f.getStyle("position")?c.left:"static"!=p.getComputedStyle("position")?e.x-t.x:e.x;c.width<h+m?e.x+h+m>g.x+n.width?a():f.setStyle("left",w(q)):e.x+h+m>g.x+n.width?f.setStyle("left",w(q)):e.x+c.width/2+h/2+m>g.x+n.width?
657 f.setStyle("left",w(q-e.x+g.x+n.width-h-m)):0>c.left+c.width-h-m?a():0>c.left+c.width/2-h/2?f.setStyle("left",w(q-e.x+g.x)):f.setStyle("left",w(q+c.width/2-h/2-m/2))}},CKEDITOR.plugins.notification=ka,"use strict",function(){function a(a,b,c){b.type||(b.type="auto");if(c&&!1===a.fire("beforePaste",b)||!b.dataValue&&b.dataTransfer.isEmpty())return!1;b.dataValue||(b.dataValue="");if(CKEDITOR.env.gecko&&"drop"==b.method&&a.toolbox)a.once("afterPaste",function(){a.toolbox.focus()});return a.fire("paste",
659 h,null,null,0),a.on("beforepaste",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||h()},null,null,0));a.on("beforecut",function(){!C&&m(b)});var e;a.attachListener(CKEDITOR.env.ie?a:b.document.getDocumentElement(),"mouseup",function(){e=setTimeout(function(){A()},0)});b.on("destroy",function(){clearTimeout(e)});a.on("keyup",A)}function d(a){return{type:a,canUndo:"cut"==a,startDisabled:!0,fakeKeystroke:"cut"==a?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==this.type&&m();var a;
662 function f(){F=1;setTimeout(function(){F=0},100)}function h(){C=1;setTimeout(function(){C=0},10)}function k(a){var c=b.document,d=c.getBody(),e=!1,f=function(){e=!0};d.on(a,f);7<CKEDITOR.env.version?c.$.execCommand(a):c.$.selection.createRange().execCommand(a);d.removeListener(a,f);return e}function m(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var a=b.getSelection(),c,d,e;a.getType()==CKEDITOR.SELECTION_ELEMENT&&(c=a.getSelectedElement())&&(d=a.getRanges()[0],e=b.document.createText(""),e.insertBefore(c),
663 d.setStartBefore(e),d.setEndAfter(c),a.selectRanges([d]),setTimeout(function(){c.getParent()&&(e.remove(),a.selectElement(c))},0))}}function l(a,c){var d=b.document,e=b.editable(),f=function(a){a.cancel()},h;if(!d.getById("cke_pastebin")){var k=b.getSelection(),m=k.createBookmarks();CKEDITOR.env.ie&&k.root.fire("selectionchange");var n=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!e.is("body")||CKEDITOR.env.ie?"div":"body",d);n.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var r=0,d=d.getWindow();
666 (CKEDITOR.document.getBody().$.scrollTop=u);h&&h.removeListener();CKEDITOR.env.ie&&e.focus();k.selectBookmarks(m);n.remove();var a;CKEDITOR.env.webkit&&(a=n.getFirst())&&a.is&&a.hasClass("Apple-style-span")&&(n=a);b.removeListener("selectionChange",f);c(n.getHtml())},0)}}function B(){if("paste"==D.mainPasteEvent)return b.fire("beforePaste",{type:"auto",method:"paste"}),!1;b.focus();f();var a=b.focusManager;a.lock();if(b.editable().fire(D.mainPasteEvent)&&!k("paste"))return a.unlock(),!1;a.unlock();
676 function e(d,f){d.select();a(b,{dataTransfer:f,method:"drop"},1);c.resetDragDataTransfer()}function f(a,c,d){var e={$:a.data.$,target:a.data.getTarget()};c&&(e.dragRange=c);d&&(e.dropRange=d);!1===b.fire(a.name,e)&&a.data.preventDefault()}function h(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}var k=b.editable(),m=CKEDITOR.plugins.clipboard.getDropTarget(b),l=b.ui.space("top"),B=b.ui.space("bottom");c.preventDefaultDropOnElement(l);c.preventDefaultDropOnElement(B);
677 k.attachListener(m,"dragstart",f);k.attachListener(b,"dragstart",c.resetDragDataTransfer,c,null,1);k.attachListener(b,"dragstart",function(a){c.initDragDataTransfer(a,b)},null,null,2);k.attachListener(b,"dragstart",function(){var a=c.dragRange=b.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(c.dragStartContainerChildCount=a?h(a.startContainer):null,c.dragEndContainerChildCount=a?h(a.endContainer):null)},null,null,100);k.attachListener(m,"dragend",f);k.attachListener(b,"dragend",
678 c.initDragDataTransfer,c,null,1);k.attachListener(b,"dragend",c.resetDragDataTransfer,c,null,100);k.attachListener(m,"dragover",function(a){if(CKEDITOR.env.edge)a.data.preventDefault();else{var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()}});k.attachListener(m,"drop",function(a){if(!a.data.$.defaultPrevented){a.data.preventDefault();var d=a.data.getTarget();
680 CKEDITOR.plugins.add("clipboard",{requires:"notification",init:function(a){var d,k=e();a.config.forcePasteAsPlainText?d="plain-text":a.config.pasteFilter?d=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(d="semantic-content");a.pasteFilter=k.get(d);f(a);h(a);if(CKEDITOR.env.gecko){var m=["image/png","image/jpeg","image/gif"],w;a.on("paste",function(b){var c=b.data,d=c.dataTransfer;if(!c.dataValue&&"paste"==c.method&&d&&1==d.getFilesCount()&&w!=d.id&&(d=d.getFile(0),-1!=CKEDITOR.tools.indexOf(m,
684 ""))}CKEDITOR.env.ie?b=b.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(b,d){return d.toLowerCase()in c?(a.data.preSniffing="html","\x3c"+d):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,function(b,d){return d in c?(a.data.endsWithEOL=1,"\x3c/"+d+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$1"));a.data.dataValue=b},null,null,3);a.on("paste",function(d){d=d.data;var e=a._.nextPasteType||d.type,f=d.dataValue,h,m=a.config.clipboard_defaultContentType||"html",n=d.dataTransfer.getTransferType(a);
685 h="html"==e||"html"==d.preSniffing?"html":b(f);delete a._.nextPasteType;"htmlifiedtext"==h&&(f=c(a.config,f));"text"==e&&"html"==h?f=l(a,f,k.get("plain-text")):n==CKEDITOR.DATA_TRANSFER_EXTERNAL&&a.pasteFilter&&!d.dontFilter&&(f=l(a,f,a.pasteFilter));d.startsWithEOL&&(f='\x3cbr data-cke-eol\x3d"1"\x3e'+f);d.endsWithEOL&&(f+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==e&&(e="html"==h||"html"==m?"html":"text");d.type=e;d.dataValue=f;delete d.preSniffing;delete d.startsWithEOL;delete d.endsWithEOL},null,
689 d||a.endContainer.getParent().equals(c)&&a.endContainer.getIndex()<d?!0:!1},internalDrop:function(b,c,d,e){var f=CKEDITOR.plugins.clipboard,h=e.editable(),k,m;e.fire("saveSnapshot");e.fire("lockSnapshot",{dontUpdate:1});CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(b,c,f.dragStartContainerChildCount,f.dragEndContainerChildCount);(m=this.isDropRangeAffectedByDragRange(b,c))||(k=b.createBookmark(!1));f=c.clone().createBookmark(!1);m&&(k=b.createBookmark(!1));b=k.startNode;c=
690 k.endNode;m=f.startNode;c&&b.getPosition(m)&CKEDITOR.POSITION_PRECEDING&&c.getPosition(m)&CKEDITOR.POSITION_FOLLOWING&&m.insertBefore(b);b=e.createRange();b.moveToBookmark(k);h.extractHtmlFromRange(b,1);c=e.createRange();c.moveToBookmark(f);a(e,{dataTransfer:d,method:"drop",range:c},1);e.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var c=a.data.$,d=c.clientX,e=c.clientY,f=b.getSelection(!0).getRanges()[0],h=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&
691 b.document.$.caretRangeFromPoint(d,e))c=b.document.$.caretRangeFromPoint(d,e),h.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),h.collapse(!0);else if(c.rangeParent)h.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),h.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&f&&b.editable().hasFocus)return f;if(document.body.createTextRange){b.focus();c=b.document.getBody().$.createTextRange();try{for(var k=!1,m=0;20>m&&!k;m++){if(!k)try{c.moveToPoint(d,e-m),k=!0}catch(l){}if(!k)try{c.moveToPoint(d,
692 e+m),k=!0}catch(r){}}if(k){var z="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+z+'"\x3e​\x3c/span\x3e');var A=b.document.getById(z);h.moveToPosition(A,CKEDITOR.POSITION_BEFORE_START);A.remove()}else{var y=b.document.$.elementFromPoint(d,e),D=new CKEDITOR.dom.element(y),C;if(D.equals(b.editable())||"html"==D.getName())return f&&f.startContainer&&!f.startContainer.equals(b.editable())?f:null;C=D.getClientRect();d<C.left?h.setStartAt(D,CKEDITOR.POSITION_AFTER_START):h.setStartAt(D,
694 b);this.copyCutData&&c.id==this.copyCutData.id?(c=this.copyCutData,c.$=a.data.$.clipboardData):this.copyCutData=c;return c}return new this.dataTransfer(null,b)}return new this.dataTransfer(CKEDITOR.env.edge&&a&&a.data.$&&a.data.$.clipboardData||null,b)},preventDefaultDropOnElement:function(a){a&&a.on("dragover",d)}};var m=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?"cke/id":"Text";CKEDITOR.plugins.clipboard.dataTransfer=function(a,b){a&&(this.$=a);this._={metaRegExp:/^<meta.*?>/i,bodyRegExp:/<body(?:[\s\S]*?)>([\s\S]*)<\/body>/i,
695 fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/g,data:{},files:[],normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":a}};this.id=this.getData(m);this.id||(this.id="Text"==m?"":"cke-"+CKEDITOR.tools.getUniqueId());if("Text"!=m)try{this.$.setData(m,this.id)}catch(c){}b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==m||this.getData("text/plain")||this.setData("text/plain",b.getSelection().getSelectedText()))};CKEDITOR.DATA_TRANSFER_INTERNAL=
697 "")));"string"===typeof c&&(d=c.indexOf("\x3c/html\x3e"),c=-1!==d?c.substring(0,d+7):c);return c},setData:function(a,b){a=this._.normalizeType(a);this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a){"Text"==m&&"Text"==a&&(this.id=b);try{this.$.setData(a,b)}catch(c){}}},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(c){c=
700 1}else a.Text=1,a.URL=1;"Text"!=m&&(a[m]=0);for(b in a)if(a[b]&&""!==this.getData(b))return!1;return!0},_getImageFromClipboard:function(){var a;if(this.$&&this.$.items&&this.$.items[0])try{if((a=this.$.items[0].getAsFile())&&a.type)return a}catch(b){}}}}(),CKEDITOR.config.clipboard_notificationDuration=1E4,CKEDITOR.plugins.add("panelbutton",{requires:"button",onLoad:function(){function a(a){var b=this._;b.state!=CKEDITOR.TRISTATE_DISABLED&&(this.createPanel(a),b.on?b.panel.hide():b.panel.showBlock(this._.id,
715 b.name));var d=c.getDocument();f=a(b,d,c,e,f||0);var h=f.element,m=h.getFirst(),g=this;h.disableContextMenu();this.element=h;this._={editor:b,panel:f,parentElement:c,definition:e,document:d,iframe:m,children:[],dir:b.lang.dir,showBlockParams:null};b.on("mode",k);b.on("resize",k);d.getWindow().on("resize",function(){this.reposition()},this)},proto:{addBlock:function(a,c){return this._.panel.addBlock(a,c)},addListBlock:function(a,c){return this._.panel.addListBlock(a,c)},getBlock:function(a){return this._.panel.getBlock(a)},
716 showBlock:function(a,c,e,f,k,d){var h=this._.panel,m=h.showBlock(a);this._.showBlockParams=[].slice.call(arguments);this.allowBlur(!1);var g=this._.editor.editable();this._.returnFocus=g.hasFocus?g:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);this._.hideTimeout=0;var n=this.element,g=this._.iframe,g=CKEDITOR.env.ie&&!CKEDITOR.env.edge?g:new CKEDITOR.dom.window(g.$.contentWindow),p=n.getDocument(),t=this._.parentElement.getPositionedAncestor(),w=c.getDocumentPosition(p),p=t?t.getDocumentPosition(p):
719 !1===this.onEscape(a))return!1},this);CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.tools.bind(function(){var a=n;a.removeStyle("width");if(m.autoSize){var b=m.element.getDocument(),b=(CKEDITOR.env.webkit||CKEDITOR.env.edge?m.element:b.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetWidth||0)-(a.$.clientWidth||0)+3);a.setStyle("width",b+10+"px");b=m.element.$.scrollHeight;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetHeight||0)-(a.$.clientHeight||
722 d&&d()},this);h.isLoaded?a():h.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();m.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){m.markFirstDisplayed?m.markFirstDisplayed():m._.markFirstDisplayed()},0):m.markFirstDisplayed?m.markFirstDisplayed():m._.markFirstDisplayed();this._.editor.fire("panelShow",this)},
758 b,[e]),b.moveToBookmark(g)},_applyStylesToTableContext:function(a,b,c){function m(a,b){a.getName()!==b.element&&(b=b.getDefinition(),b.element=a.getName(),b=new CKEDITOR.style(b));b.applyToObject(a)}var g,l,p;for(p=0;p<c.length;p++)g=c[p],l=b.createBookmark(),-1!==e(["table","tr"],g.element)?f(b,g.element,function(a){g.applyToObject(a)}):-1!==e(["td","th"],g.element)?f(b,{td:1,th:1},function(a){m(a,g)}):-1!==e(["thead","tbody"],g.element)?f(b,{thead:1,tbody:1},function(a){m(a,g)}):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(a,
774 b,c){CKEDITOR.tools.extend(this,c,{order:0,className:"cke_menubutton__"+b});this.group=a._.menuGroups[this.group];this.editor=a;this.name=b},proto:{render:function(a,f,d){var h=a.id+String(f),m="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,g="",n=this.editor,p,t,w=m==CKEDITOR.TRISTATE_ON?"on":m==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(g=' aria-checked\x3d"'+(m==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var q=this.getItems,v=
775 "\x26#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",u=this.name;this.icon&&!/\./.test(this.icon)&&(u=this.icon);this.command&&(p=n.getCommand(this.command),(p=n.getCommandKeystroke(p))&&(t=CKEDITOR.tools.keystrokeToString(n.lang.common.keyboard,p)));a={id:h,name:this.name,iconName:u,label:this.label,cls:this.className||"",state:w,hasPopup:q?"true":"false",disabled:m==CKEDITOR.TRISTATE_DISABLED,title:this.label+(t?" ("+t.display+")":""),ariaShortcut:t?n.lang.common.keyboardShortcut+" "+t.aria:
778 k=(new CKEDITOR.dom.elementPath(a.getTarget(),c.editable())).contains(function(a){return a.hasAttribute("contenteditable")},!0);k&&"false"==k.getAttribute("contenteditable")&&c.getSelection().fake(k)}var k=a.getTarget().getDocument(),d=a.getTarget().getDocument().getDocumentElement(),c=!k.equals(CKEDITOR.document),k=k.getWindow().getScrollPosition(),h=c?a.$.clientX:a.$.pageX||k.x+a.$.clientX,m=c?a.$.clientY:a.$.pageY||k.y+a.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(d,null,h,m)},CKEDITOR.env.ie?
786 d))&&!d.data("cke-div-added")&&(m.push(d),d.data("cke-div-added"))}for(var f=a.getSelection(),k=f&&f.getRanges(),d,h=f.createBookmarks(),m=[],g=0;g<k.length;g++)d=k[g],d.collapsed?b(f.getStartElement()):(d=new CKEDITOR.dom.walker(d),d.evaluator=b,d.lastForward());for(g=0;g<m.length;g++)m[g].remove(!0);f.selectBookmarks(h)}});a.ui.addButton&&a.ui.addButton("CreateDiv",{label:f.toolbar,command:"creatediv",toolbar:"blocks,50"});a.addMenuItems&&(a.addMenuItems({editdiv:{label:f.edit,command:"editdiv",
788 !a.isReadOnly()},1)}}}(),function(){function a(a,b){function k(b){b=g.list[b];var c;b.equals(a.editable())||"true"==b.getAttribute("contenteditable")?(c=a.createRange(),c.selectNodeContents(b),c=c.select()):(c=a.getSelection(),c.selectElement(b));CKEDITOR.env.ie&&a.fire("selectionChange",{selection:c,path:new CKEDITOR.dom.elementPath(b)});a.focus()}function d(){m&&m.setHtml('\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');delete g.list}var h=a.ui.spaceId("path"),m,g=a._.elementsPath,
792 r+"')",index:k,keyDownFn:t,clickFn:p}),b.unshift(r);m||(m=CKEDITOR.document.getById(h));f=m;f.setHtml(b.join("")+'\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');a.fire("elementsPathUpdate",{space:f})});a.on("readOnly",d);a.on("contentDomUnload",d);a.addCommand("elementsPathFocus",f.toolbarFocus);a.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}var f={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(a){(a=CKEDITOR.document.getById(a._.elementsPath.idBase+"0"))&&a.focus(CKEDITOR.env.ie||
807 e.entities_additional&&l.push(e.entities_additional));var k=a(l.join(",")),d=k.regex?"["+k.regex+"]":"a^";delete k.regex;e.entities&&e.entities_processNumerical&&(d="[^ -~]|"+d);var d=new RegExp(d,"g"),h=a("nbsp,gt,lt,amp,shy",!0),m=new RegExp(h.regex,"g");f.addRules({text:function(a){return a.replace(m,b).replace(d,c)}},{applyToAll:!0,excludeNestedEditable:!0})}}})}(),CKEDITOR.config.basicEntities=!0,CKEDITOR.config.entities=!0,CKEDITOR.config.entities_latin=!0,CKEDITOR.config.entities_greek=!0,
819 d))}return c}}};CKEDITOR.plugins.add("fakeobjects",{init:function(a){a.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},afterInit:function(a){(a=(a=a.dataProcessor)&&a.htmlFilter)&&a.addRules(e,{applyToAll:!0})}});CKEDITOR.editor.prototype.createFakeElement=function(a,c,d,e){var m=this.lang.fakeobjects,m=m[d]||m.unknown;c={"class":c,"data-cke-realelement":encodeURIComponent(a.getOuterHtml()),"data-cke-real-node-type":a.type,alt:m,title:m,align:a.getAttribute("align")||
820 ""};CKEDITOR.env.hc||(c.src=CKEDITOR.tools.transparentImageData);d&&(c["data-cke-real-element-type"]=d);e&&(c["data-cke-resizable"]=e,d=new f,e=a.getAttribute("width"),a=a.getAttribute("height"),e&&(d.rules.width=b(e)),a&&(d.rules.height=b(a)),d.populate(c));return this.document.createElement("img",{attributes:c})};CKEDITOR.editor.prototype.createFakeParserElement=function(a,c,d,e){var m=this.lang.fakeobjects,m=m[d]||m.unknown,g;g=new CKEDITOR.htmlParser.basicWriter;a.writeHtml(g);g=g.getHtml();c=
821 {"class":c,"data-cke-realelement":encodeURIComponent(g),"data-cke-real-node-type":a.type,alt:m,title:m,align:a.attributes.align||""};CKEDITOR.env.hc||(c.src=CKEDITOR.tools.transparentImageData);d&&(c["data-cke-real-element-type"]=d);e&&(c["data-cke-resizable"]=e,e=a.attributes,a=new f,d=e.width,e=e.height,void 0!==d&&(a.rules.width=b(d)),void 0!==e&&(a.rules.height=b(e)),a.populate(c));return new CKEDITOR.htmlParser.element("img",c)};CKEDITOR.editor.prototype.restoreRealElement=function(b){if(b.data("cke-real-node-type")!=
827 switch(a){case "top":d("absolute","top",b.y-x-z);break;case "pin":d("fixed","top",y);break;case "bottom":d("absolute","top",b.y+(v.height||v.bottom-v.top)+z)}m=a}var m,l,q,v,u,x,B,r=e.floatSpaceDockedOffsetX||0,z=e.floatSpaceDockedOffsetY||0,A=e.floatSpacePinnedOffsetX||0,y=e.floatSpacePinnedOffsetY||0;return function(d){if(l=a.editable()){var n=d&&"focus"==d.name;n&&h.show();a.fire("floatingSpaceLayout",{show:n});h.removeStyle("left");h.removeStyle("right");q=h.getClientRect();v=l.getClientRect();
828 u=f.getViewPaneSize();x=q.height;B="pageXOffset"in f.$?f.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;m?(x+z<=v.top?g("top"):x+z>u.height-v.bottom?g("pin"):g("bottom"),d=u.width/2,d=e.floatSpacePreferRight?"right":0<v.left&&v.right<u.width&&v.width>q.width?"rtl"==e.contentsLangDirection?"right":"left":d-v.left>v.right-d?"left":"right",q.width>u.width?(d="left",n=0):(n="left"==d?0<v.left?v.left:0:v.right<u.width?u.width-v.right:0,n+q.width>u.width&&(d="left"==d?"right":"left",n=0)),
829 h.setStyle(d,b(("pin"==m?A:r)+n+("pin"==m?0:"left"==d?B:-B)))):(m="pin",g("pin"),k(d))}}}();if(l){var d=new CKEDITOR.template('\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+(CKEDITOR.env.gecko?" ":"")+'" lang\x3d"{langCode}" role\x3d"application" style\x3d"{style}"'+(a.title?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(a.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':
830 " ")+'\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),h=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(d.output({content:l,id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(e.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.title}))),m=CKEDITOR.tools.eventsBuffer(500,k),g=CKEDITOR.tools.eventsBuffer(100,k);h.unselectable();h.on("mousedown",
831 function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(b){k(b);a.on("change",m.input);f.on("scroll",g.input);f.on("resize",g.input)});a.on("blur",function(){h.hide();a.removeListener("change",m.input);f.removeListener("scroll",g.input);f.removeListener("resize",g.input)});a.on("destroy",function(){f.removeListener("scroll",g.input);f.removeListener("resize",g.input);h.clearCustomData();h.remove()});a.focusManager.hasFocus&&h.show();a.focusManager.add(h,
844 this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(c=CKEDITOR.TRISTATE_DISABLED);this.setState(c);this.setValue("");c!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var l=CKEDITOR.env,k="cke_"+this.id,d=CKEDITOR.tools.addFunction(function(c){p&&(a.unlockSelection(1),p=0);m.execute(c)},this),h=this,m={id:k,combo:this,focus:function(){CKEDITOR.document.getById(k).getChild(1).focus()},execute:function(c){var d=h._;if(d.state!=CKEDITOR.TRISTATE_DISABLED)if(h.createPanel(a),
845 d.on)d.panel.hide();else{h.commit();var e=h.getValue();e?d.list.mark(e):d.list.unmarkAll();d.panel.showBlock(h.id,new CKEDITOR.dom.element(c),4)}},clickFn:d};a.on("activeFilterChange",e,this);a.on("mode",e,this);a.on("selectionChange",e,this);!this.readOnly&&a.on("readOnly",e,this);var g=CKEDITOR.tools.addFunction(function(a,b){a=new CKEDITOR.dom.event(a);var c=a.getKeystroke();switch(c){case 13:case 32:case 40:CKEDITOR.tools.callFunction(d,b);break;default:m.onkey(m,c)}a.preventDefault()}),n=CKEDITOR.tools.addFunction(function(){m.onfocus&&
846 m.onfocus()}),p=0;m.keyDownFn=g;l={id:k,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:l.gecko&&!l.hc?"":(this.title||"").replace("'",""),keydownFn:g,focusFn:n,clickFn:d};f.output(l,c);if(this.onRender)this.onRender();return m},createPanel:function(a){if(!this._.panel){var c=this._.panelDefinition,e=this._.panelDefinition.block,f=c.parent||CKEDITOR.document.getBody(),k="cke_combopanel__"+this.name,d=new CKEDITOR.ui.floatPanel(a,f,c),c=d.addListBlock(this.id,
850 a}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,c){this.add(a,CKEDITOR.UI_RICHCOMBO,c)}}(),function(){function a(a,c,e,l,k,d,h,m){var g=a.config,n=new CKEDITOR.style(h),
851 p=k.split(";");k=[];for(var t={},w=0;w<p.length;w++){var q=p[w];if(q){var q=q.split("/"),v={},u=p[w]=q[0];v[e]=k[w]=q[1]||u;t[u]=new CKEDITOR.style(h,v);t[u]._.definition.name=u}else p.splice(w--,1)}a.ui.addRichCombo(c,{label:l.label,title:l.panelTitle,toolbar:"styles,"+m,allowedContent:n,requiredContent:n,contentTransformations:[[{element:"font",check:"span",left:function(a){return!!a.attributes.size||!!a.attributes.align||!!a.attributes.face},right:function(a){var b=" x-small small medium large x-large xx-large 48px".split(" ");
853 t[b].buildPreview(),b)}},onClick:function(c){a.focus();a.fire("saveSnapshot");var d=this.getValue(),e=t[c];if(d&&c!=d){var g=t[d],h=a.getSelection().getRanges()[0];if(h.collapsed){var k=a.elementPath(),m=k.contains(function(a){return g.checkElementRemovable(a)});if(m){var l=h.checkBoundaryOfElement(m,CKEDITOR.START),u=h.checkBoundaryOfElement(m,CKEDITOR.END);if(l&&u){for(l=h.createBookmark();k=m.getFirst();)k.insertBefore(m);m.remove();h.moveToBookmark(l)}else l||u?h.moveToPosition(m,l?CKEDITOR.POSITION_BEFORE_START:
854 CKEDITOR.POSITION_AFTER_END):(h.splitElement(m),h.moveToPosition(m,CKEDITOR.POSITION_AFTER_END)),f(h,k.elements.slice(),m);a.getSelection().selectRanges([h])}}else a.removeStyle(g)}a[d==c?"removeStyle":"applyStyle"](e);a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(c){var e=this.getValue();c=c.data.path.elements;for(var f=0,g;f<c.length;f++){g=c[f];for(var h in t)if(t[h].checkElementMatch(g,!0,a)){h!=e&&this.setValue(h);return}}this.setValue("",d)},this)},refresh:function(){a.activeFilter.check(n)||
858 e={},l=0,k=[],d=0;d<c.length;d++){var h=c[d],m=new CKEDITOR.style(f["format_"+h]);if(!a.filter.customConfig||a.filter.check(m))l++,e[h]=m,e[h]._.enterMode=a.config.enterMode,k.push(m)}0!==l&&a.ui.addRichCombo("Format",{label:b.label,title:b.panelTitle,toolbar:"styles,20",allowedContent:k,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(f.contentsCss),multiSelect:!1,attributes:{"aria-label":b.panelTitle}},init:function(){this.startGroup(b.panelTitle);for(var a in e){var c=b["tag_"+a];this.add(a,
884 function(a){var e=b.createRange(),d=a.data.node;e.setStartBefore(d);e.setEndAfter(d);for(var f=new CKEDITOR.dom.walker(e),m;m=f.next();)if(m.type==CKEDITOR.NODE_ELEMENT)if(!m.equals(d)&&m.getDirection())e.setStartAfter(m),f=new CKEDITOR.dom.walker(e);else{var g=b.config.indentClasses;if(g)for(var n="ltr"==a.data.dir?["_rtl",""]:["","_rtl"],p=0;p<g.length;p++)m.hasClass(g[p]+n[0])&&(m.removeClass(g[p]+n[0]),m.addClass(g[p]+n[1]));g=m.getStyle("margin-right");n=m.getStyle("margin-left");g?m.setStyle("margin-left",
885 g):m.removeStyle("margin-left");n?m.setStyle("margin-right",n):m.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(a){this.isIndent=!!a;this.startDisabled=!this.isIndent},specificDefinition:function(a,b,f){this.name=b;this.editor=a;this.jobs={};this.enterBr=a.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!f;this.relatedGlobal=f?"indent":"outdent";this.indentKey=f?9:CKEDITOR.SHIFT+9;this.database={}},registerCommands:function(a,b){a.on("pluginsLoaded",function(){for(var a in b)(function(a,
889 (b||a.getComputedStyle("direction"))?"margin-left":"margin-right"}var b=CKEDITOR.dtd.$listItem,c=CKEDITOR.dtd.$list,e=CKEDITOR.TRISTATE_DISABLED,l=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(k){function d(){h.specificDefinition.apply(this,arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,styles:m?null:"margin-left,margin-right",classes:m||null}};this.contentTransformations=[["div: splitMarginShorthand"],["h1: splitMarginShorthand"],
890 ["h2: splitMarginShorthand"],["h3: splitMarginShorthand"],["h4: splitMarginShorthand"],["h5: splitMarginShorthand"],["h6: splitMarginShorthand"],["ol: splitMarginShorthand"],["p: splitMarginShorthand"],["pre: splitMarginShorthand"],["ul: splitMarginShorthand"]];this.enterBr&&(this.allowedContent.div=!0);this.requiredContent=(this.enterBr?"div":"p")+(m?"("+m.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,c){var d=c.block||c.blockLimit;if(!d.is(b))var h=d.getAscendant(b),d=h&&c.contains(h)||
891 d;d.is(b)&&(d=d.getParent());if(this.enterBr||this.getContext(c)){if(m){var h=m,d=d.$.className.match(this.classNameRegex),k=this.isIndent,h=d?k?d[1]!=h.slice(-1):!0:k;return h?l:e}return this.isIndent?l:d?CKEDITOR[0>=(parseInt(d.getStyle(f(d)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:e}return e},exec:function(b){var d=b.getSelection(),d=d&&d.getRanges()[0],e;if(e=b.elementPath().contains(c))a.call(this,e,m);else for(d=d.createIterator(),b=b.config.enterMode,d.enforceRealBlocks=!0,d.enlargeBr=
892 b!=CKEDITOR.ENTER_BR;e=d.getNextParagraph(b==CKEDITOR.ENTER_P?"p":"div");)e.isReadOnly()||a.call(this,e,m);return!0}}}}var h=CKEDITOR.plugins.indent,m=k.config.indentClasses;h.registerCommands(k,{indentblock:new d(k,"indentblock",!0),outdentblock:new d(k,"outdentblock")});CKEDITOR.tools.extend(d.prototype,h.specificDefinition.prototype,{context:{div:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:m?new RegExp("(?:^|\\s+)("+m.join("|")+")(?\x3d$|\\s)"):null})}})}(),
903 "right"):"right"==h&&d.setStyle("text-align","left")}}f.prototype={exec:function(b){var f=b.getSelection(),l=b.config.enterMode;if(f){for(var k=f.createBookmarks(),d=f.getRanges(),h=this.cssClassName,m,g,n=b.config.useComputedState,n=void 0===n||n,p=d.length-1;0<=p;p--)for(m=d[p].createIterator(),m.enlargeBr=l!=CKEDITOR.ENTER_BR;g=m.getNextParagraph(l==CKEDITOR.ENTER_P?"p":"div");)if(!g.isReadOnly()){g.removeAttribute("align");g.removeStyle("text-align");var t=h&&(g.$.className=CKEDITOR.tools.ltrim(g.$.className.replace(this.cssClassRegex,
919 null:a.createFakeParserElement(b,"cke_anchor","anchor"):null}}});var b=a._.elementsPath&&a._.elementsPath.filters;b&&b.push(function(b,c){if("a"==c&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,b)||b.getAttribute("name")&&(!b.getAttribute("href")||!b.getChildCount())))return"anchor"})}});var e=/^javascript:/,l=/^mailto:([^?]+)(?:\?(.+))?$/,k=/subject=([^;?:@&=$,\/]*)/i,d=/body=([^;?:@&=$,\/]*)/i,h=/^#(.*)$/,m=/^((?:http|https|ftp|news):\/\/)?(.*)$/,g=/^(_(?:self|top|parent|blank))$/,n=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,
924 "anchor",A.anchor={},A.anchor.name=A.anchor.id=r[1];else if(r=c.match(l)){z=c.match(k);c=c.match(d);A.type="email";var y=A.email={};y.address=r[1];z&&(y.subject=decodeURIComponent(z[1]));c&&(y.body=decodeURIComponent(c[1]))}else c&&(z=c.match(m))&&(A.type="url",A.url={},A.url.protocol=z[1],A.url.url=z[2]);if(b){if(c=b.getAttribute("target"))A.target={type:c.match(g)?c:"frame",name:c};else if(c=(c=b.data("cke-pa-onclick")||b.getAttribute("onclick"))&&c.match(t))for(A.target={type:"popup",name:c[1]};r=
926 h=d.url&&CKEDITOR.tools.trim(d.url.url)||"";g["data-cke-saved-href"]=0===h.indexOf("/")?h:e+h;break;case "anchor":e=d.anchor&&d.anchor.id;g["data-cke-saved-href"]="#"+(d.anchor&&d.anchor.name||e||"");break;case "email":var k=d.email,h=k.address;switch(e){case "":case "encode":var l=encodeURIComponent(k.subject||""),m=encodeURIComponent(k.body||""),k=[];l&&k.push("subject\x3d"+l);m&&k.push("body\x3d"+m);k=k.length?"?"+k.join("\x26"):"";"encode"==e?(e=["javascript:void(location.href\x3d'mailto:'+",
932 d.remove(1);b.selectBookmarks(c)},requiredContent:"a[name]"};CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0})}(),function(){function a(a,b,c){function d(c){if(!(!(l=k[c?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(m=b.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||m.is&&m.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](l)}for(var e=CKEDITOR.plugins.list.listToArray(b.root,c),f=[],g=0;g<b.contents.length;g++){var h=
933 b.contents[g];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(f.push(h),CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",!0))}h=null;for(g=0;g<f.length;g++)h=f[g].getCustomData("listarray_index"),e[h].indent=-1;for(g=h+1;g<e.length;g++)if(e[g].indent>e[g-1].indent+1){f=e[g-1].indent+1-e[g].indent;for(h=e[g].indent;e[g]&&e[g].indent>=h;)e[g].indent+=f,g++;g--}var k=CKEDITOR.plugins.list.arrayToList(e,c,null,a.config.enterMode,b.root.getAttribute("dir")).listNode,l,m;
935 a=e)}c();c(1)}function e(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function l(a,d,e){a.fire("saveSnapshot");e.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var f=e.extractContents();d.trim(!1,!0);var h=d.createBookmark(),l=new CKEDITOR.dom.elementPath(d.startContainer),m=l.block,l=l.lastElement.getAscendant("li",1)||m,z=new CKEDITOR.dom.elementPath(e.startContainer),p=z.contains(CKEDITOR.dtd.$listItem),
936 z=z.contains(CKEDITOR.dtd.$list);m?(m=m.getBogus())&&m.remove():z&&(m=z.getPrevious(g))&&n(m)&&m.remove();(m=f.getLast())&&m.type==CKEDITOR.NODE_ELEMENT&&m.is("br")&&m.remove();(m=d.startContainer.getChild(d.startOffset))?f.insertBefore(m):d.startContainer.append(f);p&&(f=k(p))&&(l.contains(p)?(b(f,p.getParent(),p),f.remove()):l.append(f));for(;e.checkStartOfBlock()&&e.checkEndOfBlock();){z=e.startPath();f=z.block;if(!f)break;f.is("li")&&(l=f.getParent(),f.equals(l.getLast(g))&&f.equals(l.getFirst(g))&&
937 (f=l));e.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove()}e=e.clone();f=a.editable();e.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=function(a){return g(a)&&!n(a)};(e=e.next())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$list&&c(e);d.moveToBookmark(h);d.select();a.fire("saveSnapshot")}function k(a){return(a=a.getLast(g))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in d?a:null}var d={ol:1,ul:1},h=CKEDITOR.dom.walker.whitespaces(),m=CKEDITOR.dom.walker.bookmark(),
938 g=function(a){return!(h(a)||m(a))},n=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,c,e,f){if(!d[a.getName()])return[];e||(e=0);c||(c=[]);for(var g=0,h=a.getChildCount();g<h;g++){var k=a.getChild(g);k.type==CKEDITOR.NODE_ELEMENT&&k.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(k,b,c,e+1);if("li"==k.$.nodeName.toLowerCase()){var l={parent:a,indent:e,element:k,contents:[]};f?l.grandparent=f:(l.grandparent=a.getParent(),l.grandparent&&"li"==l.grandparent.$.nodeName.toLowerCase()&&
939 (l.grandparent=l.grandparent.getParent()));b&&CKEDITOR.dom.element.setMarker(b,k,"listarray_index",c.length);c.push(l);for(var m=0,n=k.getChildCount(),p;m<n;m++)p=k.getChild(m),p.type==CKEDITOR.NODE_ELEMENT&&d[p.getName()]?CKEDITOR.plugins.list.listToArray(p,b,c,e+1,l.grandparent):l.contents.push(p)}}return c},arrayToList:function(a,b,c,e,f){c||(c=0);if(!a||a.length<c+1)return null;for(var h,k=a[c].parent.getDocument(),l=new CKEDITOR.dom.documentFragment(k),n=null,p=c,t=Math.max(a[c].indent,0),C=
941 CKEDITOR.env.needsNbspFiller&&7>=k.$.documentMode&&C.append(k.createText(" ")),C.append(p.listNode),p=p.nextIndex;else if(-1==H.indent&&!c&&h){d[h.getName()]?(C=H.element.clone(!1,!0),F!=h.getDirection(1)&&C.setAttribute("dir",F)):C=new CKEDITOR.dom.documentFragment(k);var n=h.getDirection(1)!=F,L=H.element,N=L.getAttribute("class"),G=L.getAttribute("style"),V=C.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(e!=CKEDITOR.ENTER_BR||n||G||N),J,P=H.contents.length,K;for(h=0;h<P;h++)if(J=H.contents[h],m(J)&&
945 b.editable();if(k.getFirst(g)){var l=1==h.length&&h[0];(e=l&&l.getEnclosedNode())&&e.is&&this.type==e.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else e.enterMode==CKEDITOR.ENTER_BR?k.appendBogus():h[0].fixBlock(1,e.enterMode==CKEDITOR.ENTER_P?"p":"div"),f.selectRanges(h)}for(var e=f.createBookmarks(!0),k=[],m={},h=h.createIterator(),n=0;(l=h.getNextRange())&&++n;){var A=l.getBoundaryNodes(),y=A.startNode,t=A.endNode;y.type==CKEDITOR.NODE_ELEMENT&&"td"==y.getName()&&l.setStartAt(A.startNode,CKEDITOR.POSITION_AFTER_START);
946 t.type==CKEDITOR.NODE_ELEMENT&&"td"==t.getName()&&l.setEndAt(A.endNode,CKEDITOR.POSITION_BEFORE_END);l=l.createIterator();for(l.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;A=l.getNextParagraph();)if(!A.getCustomData("list_block")){CKEDITOR.dom.element.setMarker(m,A,"list_block",1);for(var C=b.elementPath(A),y=C.elements,t=0,C=C.blockLimit,F,E=y.length-1;0<=E&&(F=y[E]);E--)if(d[F.getName()]&&C.contains(F)){C.removeCustomData("list_group_object_"+n);(y=F.getCustomData("list_group_object"))?y.contents.push(A):
947 (y={root:F,contents:[A]},k.push(y),CKEDITOR.dom.element.setMarker(m,F,"list_group_object",y));t=1;break}t||(t=C,t.getCustomData("list_group_object_"+n)?t.getCustomData("list_group_object_"+n).contents.push(A):(y={root:t,contents:[A]},CKEDITOR.dom.element.setMarker(m,t,"list_group_object_"+n,y),k.push(y)))}}for(F=[];0<k.length;)if(y=k.shift(),this.state==CKEDITOR.TRISTATE_OFF)if(d[y.root.getName()]){h=b;n=y;y=m;l=F;t=CKEDITOR.plugins.list.listToArray(n.root,y);C=[];for(A=0;A<n.contents.length;A++)E=
951 E.appendTo(l)}}else this.state==CKEDITOR.TRISTATE_ON&&d[y.root.getName()]&&a.call(this,b,y,m);for(E=0;E<F.length;E++)c(F[E]);CKEDITOR.dom.element.clearAllMarkers(m);f.selectBookmarks(e);b.focus()},refresh:function(a,b){var c=b.contains(d,1),e=b.blockLimit||b.root;c&&e.contains(c)?this.setState(c.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(a){a.blockless||(a.addCommand("numberedlist",
952 new f("numberedlist","ol")),a.addCommand("bulletedlist",new f("bulletedlist","ul")),a.ui.addButton&&(a.ui.addButton("NumberedList",{label:a.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),a.ui.addButton("BulletedList",{label:a.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),a.on("key",function(b){var c=b.data.domEvent.getKey(),f;if("wysiwyg"==a.mode&&c in{8:1,46:1}){var h=a.getSelection().getRanges()[0],m=h&&h.startPath();if(h&&h.collapsed){var r=
953 8==c,p=a.editable(),A=new CKEDITOR.dom.walker(h.clone());A.evaluator=function(a){return g(a)&&!n(a)};A.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};c=h.clone();if(r){var y;(y=m.contains(d))&&h.checkBoundaryOfElement(y,CKEDITOR.START)&&(y=y.getParent())&&y.is("li")&&(y=k(y))?(f=y,y=y.getPrevious(g),c.moveToPosition(y&&n(y)?y:f,CKEDITOR.POSITION_BEFORE_START)):(A.range.setStartAt(p,CKEDITOR.POSITION_AFTER_START),A.range.setEnd(h.startContainer,h.startOffset),(y=A.previous())&&
954 y.type==CKEDITOR.NODE_ELEMENT&&(y.getName()in d||y.is("li"))&&(y.is("li")||(A.range.selectNodeContents(y),A.reset(),A.evaluator=e,y=A.previous()),f=y,c.moveToElementEditEnd(f),c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END)));if(f)l(a,c,h),b.cancel();else{var t=m.contains(d);t&&h.checkBoundaryOfElement(t,CKEDITOR.START)&&(f=t.getFirst(g),h.checkBoundaryOfElement(f,CKEDITOR.START)&&(y=t.getPrevious(g),k(f)?y&&(h.moveToElementEditEnd(y),h.select()):a.execCommand("outdent"),b.cancel()))}}else if(f=
955 m.contains("li")){if(A.range.setEndAt(p,CKEDITOR.POSITION_BEFORE_END),r=(p=f.getLast(g))&&e(p)?p:f,m=0,(y=A.next())&&y.type==CKEDITOR.NODE_ELEMENT&&y.getName()in d&&y.equals(p)?(m=1,y=A.next()):h.checkBoundaryOfElement(r,CKEDITOR.END)&&(m=2),m&&y){h=h.clone();h.moveToElementEditStart(y);if(1==m&&(c.optimize(),!c.startContainer.equals(f))){for(f=c.startContainer;f.is(CKEDITOR.dtd.$inline);)t=f,f=f.getParent();t&&c.moveToPosition(t,CKEDITOR.POSITION_AFTER_END)}2==m&&(c.moveToPosition(c.endPath().block,
956 CKEDITOR.POSITION_BEFORE_END),h.endPath().block&&h.moveToPosition(h.endPath().block,CKEDITOR.POSITION_AFTER_START));l(a,c,h);b.cancel()}}else A.range.setEndAt(p,CKEDITOR.POSITION_BEFORE_END),(y=A.next())&&y.type==CKEDITOR.NODE_ELEMENT&&y.is(d)&&(y=y.getFirst(g),m.block&&h.checkStartOfBlock()&&h.checkEndOfBlock()?(m.block.remove(),h.moveToElementEditStart(y),h.select()):k(y)?(h.moveToElementEditStart(y),h.select()):(h=h.clone(),h.moveToElementEditStart(y),l(a,c,h)),b.cancel());setTimeout(function(){a.selectionChange(1)})}}}))}})}(),
966 this.look(S));a.inInlineMode&&(k.top--,k.top+=b.editable.scroll.top,k.left+=b.editable.scroll.left);for(var m in k)k[m]=CKEDITOR.tools.cssLength(k[m]);this.setStyles(k)},look:function(a){if(this.oldLook!=a){for(var b=this.lineChildren.length,c;b--;)(c=this.lineChildren[b]).setAttribute("style",c.base+c.looks[0|a/2]);this.oldLook=a}},wrap:new C("span",a.doc)});for(b=c.lineChildren.length;b--;)c.lineChildren[b].appendTo(c);c.look(S);c.appendTo(c.wrap);c.unselectable();c.lineChildren[0].on("mouseup",
968 a.doc),f.is("br")||a.doc.createText(O).appendTo(f));c&&e.fire("saveSnapshot");b(f);d.moveToPosition(f,CKEDITOR.POSITION_AFTER_START);e.getSelection().selectRanges([d]);a.hotNode=f;c&&e.fire("saveSnapshot")}function m(a,c){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function d(b){var e=E.ie&&9>E.version?" ":O,f=a.hotNode&&a.hotNode.getText()==e&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!c;h(a,function(d){f&&a.hotNode&&a.hotNode.remove();d[c?"insertAfter":"insertBefore"](b);d.setAttributes({"data-cke-magicline-hot":1,
973 a.mouse,d=a.view,g=a.triggerOffset,h=b(a);if(!h)return null;r(a,h);var g=Math.min(g,0|h.size.outerHeight/2),k=[],m,q;if(l(c.y,h.size.top-1,h.size.top+g))q=!1;else if(l(c.y,h.size.bottom-g,h.size.bottom+1))q=!0;else return null;if(p(h)||v(a,h,q)||h.getParent().is(ca))return null;var u=e(a,h,!q);if(u){if(u&&u.type==CKEDITOR.NODE_TEXT)return null;if(n(u)){if(p(u)||!w(a,u)||u.getParent().is(ca))return null;k=[u,h][q?"reverse":"concat"]().concat([V,J])}}else h.equals(a.editable[q?"getLast":"getFirst"](a.isRelevant))?
974 (z(a),q&&l(c.y,h.size.bottom-g,d.pane.height)&&l(h.size.bottom,d.pane.height-g,d.pane.height)?m=K:l(c.y,0,h.size.top+g)&&(m=P)):m=S,k=[null,h][q?"reverse":"concat"]().concat([q?G:N,J,m,h.equals(a.editable[q?"getLast":"getFirst"](a.isRelevant))?q?K:P:S]);return 0 in k?new f(k):null}function B(a,b,c,d){for(var f=b.getDocumentPosition(),e={},g={},h={},k={},l=ba.length;l--;)e[ba[l]]=parseInt(b.getComputedStyle.call(b,"border-"+ba[l]+"-width"),10)||0,h[ba[l]]=parseInt(b.getComputedStyle.call(b,"padding-"+
977 d.height},pane:{width:d.width,height:d.height,bottom:d.height+c.y},date:+new Date},!0)}}function y(a,b,c,d){for(var e=d,g=d,h=0,k=!1,l=!1,m=a.view.pane.height,r=a.mouse;r.y+h<m&&0<r.y-h;){k||(k=b(e,d));l||(l=b(g,d));!k&&0<r.y-h&&(e=c(a,{x:r.x,y:r.y-h}));!l&&r.y+h<m&&(g=c(a,{x:r.x,y:r.y+h}));if(k&&l)break;h+=2}return new f([e,g,null,null])}CKEDITOR.plugins.add("magicline",{init:function(a){var c=a.config,k=c.magicline_triggerOffset||30,l={editor:a,enterMode:c.enterMode,triggerOffset:k,holdDistance:0|
982 0)},50)))}),k.attachListener(I?n:p,"mousedown",function(){"wysiwyg"==a.mode&&(l.line.detach(),l.hiddenMode=1,l.mouseDown=1)}),k.attachListener(I?n:p,"mouseup",function(){l.hiddenMode=0;l.mouseDown=0}),a.addCommand("accessPreviousSpace",m(l)),a.addCommand("accessNextSpace",m(l,!0)),a.setKeystroke([[c.magicline_keystrokePrevious,"accessPreviousSpace"],[c.magicline_keystrokeNext,"accessNextSpace"]]),a.on("loadSnapshot",function(){var b,c,d,e;for(e in{p:1,br:1,div:1})for(b=a.document.getElementsByTag(e),
987 for(var f=Number.MAX_VALUE,m,q,p,u;h&&!h.equals(g)&&(q=g.getNext(e.isRelevant));)m=Math.abs(c(e,g,q)-e.mouse.y),m<f&&(f=m,p=g,u=q),g=q,r(e,g);if(!p||!u||!l(e.mouse.y,p.size.top,u.size.bottom))return null;k.upper=p;k.lower=u;return k.set(V,8)}function d(a,b){return!(b&&b.type==CKEDITOR.NODE_TEXT||aa(b)||p(b)||g(a,b)||b.type==CKEDITOR.NODE_ELEMENT&&b.$&&b.is("br"))}return function(c){var d=b(c),e;if(e=d){e=d.upper;var f=d.lower;e=!e||!f||p(f)||p(e)||f.equals(e)||e.equals(f)||f.contains(e)||e.contains(f)?
989 function f(a,b){if(a&&a.type==CKEDITOR.NODE_ELEMENT&&"form"==a.getName()&&0<b.length)for(var c=b.length-1;0<=c;c--){var e=b[c][0],f=b[c][1];f?e.insertBefore(f):e.appendTo(a)}}function b(b,c){var d=a(b),e={},m=b.$;c||(e["class"]=m.className||"",m.className="");e.inline=m.style.cssText||"";c||(m.style.cssText="position: static; overflow: visible");f(d);return e}function c(b,c){var d=a(b),e=b.$;"class"in c&&(e.className=c["class"]);"inline"in c&&(e.style.cssText=c.inline);f(d)}function e(a){if(!a.editable().isInline()){var b=
990 CKEDITOR.instances,c;for(c in b){var e=b[c];"wysiwyg"!=e.mode||e.readOnly||(e=e.document.getBody(),e.setAttribute("contentEditable",!1),e.setAttribute("contentEditable",!0))}a.editable().hasFocus&&(a.toolbox.focus(),a.focus())}}CKEDITOR.plugins.add("maximize",{init:function(a){function f(){var b=m.getViewPaneSize();a.resize(b.width,b.height,null,!0)}if(a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var d=a.lang,h=CKEDITOR.document,m=h.getWindow(),g,n,p,t=CKEDITOR.TRISTATE_OFF;a.addCommand("maximize",
991 {modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:!1,exec:function(){var w=a.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}),q=a.ui.space("contents");if("wysiwyg"==a.mode){var v=a.getSelection();g=v&&v.getRanges();n=m.getScrollPosition()}else{var u=a.editable().$;g=!CKEDITOR.env.ie&&[u.selectionStart,u.selectionEnd];n=[u.scrollLeft,u.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){m.on("resize",f);p=m.getScrollPosition();
992 for(v=a.container;v=v.getParent();)v.setCustomData("maximize_saved_styles",b(v)),v.setStyle("z-index",a.config.baseFloatZIndex-5);q.setCustomData("maximize_saved_styles",b(q,!0));w.setCustomData("maximize_saved_styles",b(w,!0));q={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0};h.getDocumentElement().setStyles(q);!CKEDITOR.env.gecko&&h.getDocumentElement().setStyle("position","fixed");CKEDITOR.env.gecko&&CKEDITOR.env.quirks||h.getBody().setStyles(q);CKEDITOR.env.ie?setTimeout(function(){m.$.scrollTo(0,
993 0)},0):m.$.scrollTo(0,0);w.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute");w.$.offsetLeft;w.setStyles({"z-index":a.config.baseFloatZIndex-5,left:"0px",top:"0px"});w.addClass("cke_maximized");f();q=w.getDocumentPosition();w.setStyles({left:-1*q.x+"px",top:-1*q.y+"px"});CKEDITOR.env.gecko&&e(a)}else if(this.state==CKEDITOR.TRISTATE_ON){m.removeListener("resize",f);for(var v=[q,w],x=0;x<v.length;x++)c(v[x],v[x].getCustomData("maximize_saved_styles")),v[x].removeCustomData("maximize_saved_styles");
994 for(v=a.container;v=v.getParent();)c(v,v.getCustomData("maximize_saved_styles")),v.removeCustomData("maximize_saved_styles");CKEDITOR.env.ie?setTimeout(function(){m.$.scrollTo(p.x,p.y)},0):m.$.scrollTo(p.x,p.y);w.removeClass("cke_maximized");CKEDITOR.env.webkit&&(w.setStyle("display","inline"),setTimeout(function(){w.setStyle("display","block")},0));a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:q.$.offsetHeight,outerWidth:a.container.$.offsetWidth})}this.toggleState();if(v=
995 this.uiItems[0])q=this.state==CKEDITOR.TRISTATE_OFF?d.maximize.maximize:d.maximize.minimize,v=CKEDITOR.document.getById(v._.id),v.getChild(1).setHtml(q),v.setAttribute("title",q),v.setAttribute("href",'javascript:void("'+q+'");');"wysiwyg"==a.mode?g?(CKEDITOR.env.gecko&&e(a),a.getSelection().selectRanges(g),(u=a.getSelection().getStartElement())&&u.scrollIntoView(!0)):m.$.scrollTo(n.x,n.y):(g&&(u.selectionStart=g[0],u.selectionEnd=g[1]),u.scrollLeft=n[0],u.scrollTop=n[1]);g=n=null;t=this.state;a.fire("maximize",
1003 if(k&&(b||h.test(k))&&(!1!==f.fire("pasteFromWord",d)||b)){l.dontFilter=!0;var m=a(f,c,function(){if(m)f.fire("paste",l);else if(!f.config.pasteFromWordPromptCleanup||b||confirm(f.lang.pastefromword.confirmCleanup))d.dataValue=CKEDITOR.cleanWord(d.dataValue,f),f.fire("afterPasteFromWord",d),l.dataValue=d.dataValue;b=0});m&&e.cancel()}},null,null,3)}})}(),function(){var a={canUndo:!1,async:!0,exec:function(a,b){var c=a.lang,e=CKEDITOR.tools.keystrokeToString(c.common.keyboard,a.getCommandKeystroke(CKEDITOR.env.ie?
1007 CKEDITOR.tools.buildStyleHtml(b.config.contentsCss)+"\x3c/head\x3e"+e+b.getData()+"\x3c/body\x3e\x3c/html\x3e"}f=640;e=420;k=80;try{var d=window.screen,f=Math.round(.8*d.width),e=Math.round(.7*d.height),k=Math.round(.1*d.width)}catch(h){}if(!1===b.fire("contentPreview",b={dataValue:c}))return!1;var d="",m;CKEDITOR.env.ie&&(window._cke_htmlToLoad=b.dataValue,m="javascript:void( (function(){document.open();"+("("+CKEDITOR.tools.fixDomain+")();").replace(/\/\/.*?\n/g,"").replace(/parent\./g,"window.opener.")+
1008 "document.write( window.opener._cke_htmlToLoad );document.close();window.opener._cke_htmlToLoad \x3d null;})() )",d="");CKEDITOR.env.gecko&&(window._cke_htmlToLoad=b.dataValue,d=CKEDITOR.getUrl(a+"preview.html"));d=window.open(d,null,"toolbar\x3dyes,location\x3dno,status\x3dyes,menubar\x3dyes,scrollbars\x3dyes,resizable\x3dyes,width\x3d"+f+",height\x3d"+e+",left\x3d"+k);CKEDITOR.env.ie&&d&&(d.location=m);CKEDITOR.env.ie||CKEDITOR.env.gecko||(m=d.document,m.open(),m.write(b.dataValue),m.close());return!0}};
1011 a._.removeFormatRegex||(a._.removeFormatRegex=new RegExp("^(?:"+a.config.removeFormatTags.replace(/,/g,"|")+")$","i")),b=a._.removeAttributes||(a._.removeAttributes=a.config.removeFormatAttributes.split(",")),c=CKEDITOR.plugins.removeformat.filter,e=a.getSelection().getRanges(),l=e.createIterator(),k=function(a){return a.type==CKEDITOR.NODE_ELEMENT},d;d=l.getNextRange();){d.collapsed||d.enlarge(CKEDITOR.ENLARGE_ELEMENT);var h=d.createBookmark(),m=h.startNode,g=h.endNode,n=function(b){for(var d=a.elementPath(b),
1012 e=d.elements,g=1,h;(h=e[g])&&!h.equals(d.block)&&!h.equals(d.blockLimit);g++)f.test(h.getName())&&c(a,h)&&b.breakParent(h)};n(m);if(g)for(n(g),m=m.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);m&&!m.equals(g);)if(m.isReadOnly()){if(m.getPosition(g)&CKEDITOR.POSITION_CONTAINS)break;m=m.getNext(k)}else n=m.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==m.getName()&&m.data("cke-realelement")||!c(a,m)||(f.test(m.getName())?m.remove(1):(m.removeAttributes(b),a.fire("removeFormatCleanup",m))),m=n;d.moveToBookmark(h)}a.forceNextSelectionCheck();
1014 CKEDITOR.plugins.add("resize",{init:function(a){function f(b){var e=h.width,f=h.height,k=e+(b.data.$.screenX-d.x)*("rtl"==l?-1:1);b=f+(b.data.$.screenY-d.y);m&&(e=Math.max(c.resize_minWidth,Math.min(k,c.resize_maxWidth)));g&&(f=Math.max(c.resize_minHeight,Math.min(b,c.resize_maxHeight)));a.resize(m?e:null,f)}function b(){CKEDITOR.document.removeListener("mousemove",f);CKEDITOR.document.removeListener("mouseup",b);a.document&&(a.document.removeListener("mousemove",f),a.document.removeListener("mouseup",
1015 b))}var c=a.config,e=a.ui.spaceId("resizer"),l=a.element?a.element.getDirection(1):"ltr";!c.resize_dir&&(c.resize_dir="vertical");void 0===c.resize_maxWidth&&(c.resize_maxWidth=3E3);void 0===c.resize_maxHeight&&(c.resize_maxHeight=3E3);void 0===c.resize_minWidth&&(c.resize_minWidth=750);void 0===c.resize_minHeight&&(c.resize_minHeight=250);if(!1!==c.resize_enabled){var k=null,d,h,m=("both"==c.resize_dir||"horizontal"==c.resize_dir)&&c.resize_minWidth!=c.resize_maxWidth,g=("both"==c.resize_dir||"vertical"==
1017 function(){CKEDITOR.tools.removeFunction(n)});a.on("uiSpace",function(b){if("bottom"==b.data.space){var c="";m&&!g&&(c=" cke_resizer_horizontal");!m&&g&&(c=" cke_resizer_vertical");var d='\x3cspan id\x3d"'+e+'" class\x3d"cke_resizer'+c+" cke_resizer_"+l+'" title\x3d"'+CKEDITOR.tools.htmlEncode(a.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event)"\x3e'+("ltr"==l?"◢":"◣")+"\x3c/span\x3e";"ltr"==l&&"ltr"==c?b.data.html+=d:b.data.html=d+b.data.html}},a,null,100);a.on("maximize",
1022 CKEDITOR.TRISTATE_DISABLED};a.config.scayt_uiTabs[0]||delete e.scaytOptions;a.config.scayt_uiTabs[1]||delete e.scaytLangs;a.config.scayt_uiTabs[2]||delete e.scaytDict;c&&!CKEDITOR.plugins.scayt.isNewUdSupported(c)&&(delete e.scaytDict,a.config.scayt_uiTabs[2]=0,CKEDITOR.plugins.scayt.alarmCompatibilityMessage());return e}});a.contextMenu&&a.addMenuItems&&(a.contextMenu.addListener(function(b,c){var d=a.scayt,e,m;d&&(m=d.getSelectionNode())&&(e=f.menuGenerator(a,m),d.showBanner("."+a.contextMenu._.definition.panel.className.split(" ").join(" .")));
1051 a.config.scayt_contextCommands)return e;for(var m in c)d&&-1==CKEDITOR.tools.indexOf(l,m.replace("scayt_",""))&&"all"!=a.config.scayt_contextCommands||(e[m]="undefined"!=typeof c[m].state?c[m].state:CKEDITOR.TRISTATE_OFF,"function"!==typeof c[m].verification||c[m].verification(a)||delete e[m],a.addCommand(m,{exec:c[m].exec}),a.addMenuItem(m,{label:a.lang.scayt[c[m].label]||c[m].label,command:m,group:c[m].group,order:c[m].order}));return e},createCommand:function(a,f,b){return{exec:function(c){c=c.scayt;
1067 a.editable()[b]("cke_show_blocks")}}};CKEDITOR.plugins.add("showblocks",{onLoad:function(){var a="p div pre address blockquote h1 h2 h3 h4 h5 h6".split(" "),b,c,e,l,k=CKEDITOR.getUrl(this.path),d=!(CKEDITOR.env.ie&&9>CKEDITOR.env.version),h=d?":not([contenteditable\x3dfalse]):not(.cke_show_blocks_off)":"",m,g;for(b=c=e=l="";m=a.pop();)g=a.length?",":"",b+=".cke_show_blocks "+m+h+g,e+=".cke_show_blocks.cke_contents_ltr "+m+h+g,l+=".cke_show_blocks.cke_contents_rtl "+m+h+g,c+=".cke_show_blocks "+m+
1068 h+"{background-image:url("+CKEDITOR.getUrl(k+"images/block_"+m+".png")+")}";CKEDITOR.addCss((b+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(c,e+"{background-position:top left;padding-left:8px}",l+"{background-position:top right;padding-right:8px}"));d||CKEDITOR.addCss(".cke_show_blocks [contenteditable\x3dfalse],.cke_show_blocks .cke_show_blocks_off{border:none;padding-top:0;background-image:none}.cke_show_blocks.cke_contents_rtl [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_rtl .cke_show_blocks_off{padding-right:0}.cke_show_blocks.cke_contents_ltr [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_ltr .cke_show_blocks_off{padding-left:0}")},
1082 modes:{wysiwyg:1},canUndo:!1});a.ui.addButton&&a.ui.addButton("SpecialChar",{label:a.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}}),CKEDITOR.config.specialChars="! \x26quot; # $ % \x26amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; \x26lt; \x3d \x26gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x26euro; \x26lsquo; \x26rsquo; \x26ldquo; \x26rdquo; \x26ndash; \x26mdash; \x26iexcl; \x26cent; \x26pound; \x26curren; \x26yen; \x26brvbar; \x26sect; \x26uml; \x26copy; \x26ordf; \x26laquo; \x26not; \x26reg; \x26macr; \x26deg; \x26sup2; \x26sup3; \x26acute; \x26micro; \x26para; \x26middot; \x26cedil; \x26sup1; \x26ordm; \x26raquo; \x26frac14; \x26frac12; \x26frac34; \x26iquest; \x26Agrave; \x26Aacute; \x26Acirc; \x26Atilde; \x26Auml; \x26Aring; \x26AElig; \x26Ccedil; \x26Egrave; \x26Eacute; \x26Ecirc; \x26Euml; \x26Igrave; \x26Iacute; \x26Icirc; \x26Iuml; \x26ETH; \x26Ntilde; \x26Ograve; \x26Oacute; \x26Ocirc; \x26Otilde; \x26Ouml; \x26times; \x26Oslash; \x26Ugrave; \x26Uacute; \x26Ucirc; \x26Uuml; \x26Yacute; \x26THORN; \x26szlig; \x26agrave; \x26aacute; \x26acirc; \x26atilde; \x26auml; \x26aring; \x26aelig; \x26ccedil; \x26egrave; \x26eacute; \x26ecirc; \x26euml; \x26igrave; \x26iacute; \x26icirc; \x26iuml; \x26eth; \x26ntilde; \x26ograve; \x26oacute; \x26ocirc; \x26otilde; \x26ouml; \x26divide; \x26oslash; \x26ugrave; \x26uacute; \x26ucirc; \x26uuml; \x26yacute; \x26thorn; \x26yuml; \x26OElig; \x26oelig; \x26#372; \x26#374 \x26#373 \x26#375; \x26sbquo; \x26#8219; \x26bdquo; \x26hellip; \x26trade; \x26#9658; \x26bull; \x26rarr; \x26rArr; \x26hArr; \x26diams; \x26asymp;".split(" "),
1083 function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(a){var f=a.config,b=a.lang.stylescombo,c={},e=[],l=[];a.on("stylesSet",function(b){if(b=b.data.styles){for(var d,h,m,g=0,n=b.length;g<n;g++)(d=b[g],a.blockless&&d.element in CKEDITOR.dtd.$block||"string"==typeof d.type&&!CKEDITOR.style.customHandlers[d.type]||(h=d.name,d=new CKEDITOR.style(d),a.filter.customConfig&&!a.filter.check(d)))||(d._name=h,d._.enterMode=f.enterMode,d._.type=m=d.assignedTo||d.type,d._.weight=
1084 g+1E3*(m==CKEDITOR.STYLE_OBJECT?1:m==CKEDITOR.STYLE_BLOCK?2:3),c[h]=d,e.push(d),l.push(d));e.sort(function(a,b){return a._.weight-b._.weight})}});a.ui.addRichCombo("Styles",{label:b.label,title:b.panelTitle,toolbar:"styles,10",allowedContent:l,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(f.contentsCss),multiSelect:!0,attributes:{"aria-label":b.panelTitle}},init:function(){var a,c,f,l,g,n;g=0;for(n=e.length;g<n;g++)a=e[g],c=a._name,l=a._.type,l!=f&&(this.startGroup(b["panelTitle"+String(l)]),
1088 f=CKEDITOR.tools.tryThese(function(){var b=d.getParent().$.cells[d.$.cellIndex+(a?-1:1)];b.parentNode.parentNode;return b},function(){var b=d.getParent(),b=b.getAscendant("table").$.rows[b.$.rowIndex+(a?-1:1)];return b.cells[a?b.cells.length-1:0]});if(f||a)if(f)f=new CKEDITOR.dom.element(f),c.moveToElementEditStart(f),c.checkStartOfBlock()&&c.checkEndOfBlock()||c.selectNodeContents(f);else return!0;else{for(var m=d.getAscendant("table").$,f=d.getParent().$.cells,m=new CKEDITOR.dom.element(m.insertRow(-1),
1089 b.document),g=0,n=f.length;g<n;g++)m.append((new CKEDITOR.dom.element(f[g],b.document)).clone(!1,!1)).appendBogus();c.moveToElementEditStart(m)}c.select(!0);return!0}}return!1}}}var f={editorFocus:!1,modes:{wysiwyg:1,source:1}},b={exec:function(a){a.container.focusNext(!0,a.tabIndex)}},c={exec:function(a){a.container.focusPrevious(!0,a.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(e){for(var l=!1!==e.config.enableTabKeyTools,k=e.config.tabSpaces||0,d="";k--;)d+=" ";if(d)e.on("key",function(a){9==
1099 l.removeAttribute("rowSpan"),l.appendBogus(),e.append(l),l=l.$);k+=l.colSpan-1}c?e.insertBefore(g):e.insertAfter(g)}function b(c){if(c instanceof CKEDITOR.dom.selection){var d=c.getRanges(),e=a(c),f=e[0].getAscendant("table"),g=CKEDITOR.tools.buildTableMap(f),h=e[0].getParent().$.rowIndex,e=e[e.length-1],k=e.getParent().$.rowIndex+e.$.rowSpan-1,e=[];c.reset();for(c=h;c<=k;c++){for(var l=g[c],m=new CKEDITOR.dom.element(f.$.rows[c]),n=0;n<l.length;n++){var p=new CKEDITOR.dom.element(l[n]),t=p.getParent().$.rowIndex;
1100 1==p.$.rowSpan?p.remove():(--p.$.rowSpan,t==c&&(t=g[c+1],t[n-1]?p.insertAfter(new CKEDITOR.dom.element(t[n-1])):(new CKEDITOR.dom.element(f.$.rows[c+1])).append(p,1)));n+=p.$.colSpan-1}e.push(m)}g=f.$.rows;d[0].moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);h=new CKEDITOR.dom.element(g[k+1]||(0<h?g[h-1]:null)||f.$.parentNode);for(c=e.length;0<=c;c--)b(e[c]);return f.$.parentNode?h:(d[0].select(),null)}c instanceof CKEDITOR.dom.element&&(f=c.getAscendant("table"),1==f.$.rows.length?f.remove():c.remove());
1102 k.colSpan+=1):(h=new CKEDITOR.dom.element(f[l]),k=h.clone(),k.removeAttribute("colSpan"),k.appendBogus(),k[c?"insertBefore":"insertAfter"].call(k,h),k=k.$),l+=k.rowSpan-1)}function k(a,b){var c=a.getStartElement().getAscendant({td:1,th:1},!0);if(c){var d=c.clone();d.appendBogus();b?d.insertBefore(c):d.insertAfter(c)}}function d(b){if(b instanceof CKEDITOR.dom.selection){var c=b.getRanges(),e=a(b),f=e[0]&&e[0].getAscendant("table"),g;a:{var k=0;g=e.length-1;for(var l={},m,n;m=e[k++];)CKEDITOR.dom.element.setMarker(l,
1103 m,"delete_cell",!0);for(k=0;m=e[k++];)if((n=m.getPrevious())&&!n.getCustomData("delete_cell")||(n=m.getNext())&&!n.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(l);g=n;break a}CKEDITOR.dom.element.clearAllMarkers(l);k=e[0].getParent();(k=k.getPrevious())?g=k.getLast():(k=e[g].getParent(),g=(k=k.getNext())?k.getChild(0):null)}b.reset();for(b=e.length-1;0<=b;b--)d(e[b]);g?h(g,!0):f&&(c[0].moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),c[0].select(),f.remove())}else b instanceof
1104 CKEDITOR.dom.element&&(c=b.getParent(),1==c.getChildCount()?c.remove():b.remove())}function h(a,b){var c=a.getDocument(),d=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&(d.focus(),c.focus());c=new CKEDITOR.dom.range(c);c["moveToElementEdit"+(b?"End":"Start")](a)||(c.selectNodeContents(a),c.collapse(b?!1:!0));c.select(!0)}function m(a,b,c){a=a[b];if("undefined"==typeof c)return a;for(b=0;a&&b<a.length;b++){if(c.is&&a[b]==c.$)return b;if(b==c)return new CKEDITOR.dom.element(a[b])}return c.is?
1105 -1:null}function g(b,c,d){var e=a(b),f;if((c?1!=e.length:2>e.length)||(f=b.getCommonAncestor())&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("table"))return!1;var g;b=e[0];f=b.getAscendant("table");var h=CKEDITOR.tools.buildTableMap(f),k=h.length,l=h[0].length,n=b.getParent().$.rowIndex,p=m(h,n,b);if(c){var t;try{var w=parseInt(b.getAttribute("rowspan"),10)||1;g=parseInt(b.getAttribute("colspan"),10)||1;t=h["up"==c?n-w:"down"==c?n+w:n]["left"==c?p-g:"right"==c?p+g:p]}catch(I){return!1}if(!t||b.$==t)return!1;
1106 e["up"==c||"left"==c?"unshift":"push"](new CKEDITOR.dom.element(t))}c=b.getDocument();var H=n,w=t=0,L=!d&&new CKEDITOR.dom.documentFragment(c),N=0;for(c=0;c<e.length;c++){g=e[c];var G=g.getParent(),V=g.getFirst(),J=g.$.colSpan,P=g.$.rowSpan,G=G.$.rowIndex,K=m(h,G,g),N=N+J*P,w=Math.max(w,K-p+J);t=Math.max(t,G-n+P);d||(J=g,(P=J.getBogus())&&P.remove(),J.trim(),g.getChildren().count()&&(G==H||!V||V.isBlockBoundary&&V.isBlockBoundary({br:1})||(H=L.getLast(CKEDITOR.dom.walker.whitespaces(!0)),!H||H.is&&
1108 h=e.$.rowIndex,k=m(g,h,d),l=d.$.rowSpan,n;if(1<l){n=Math.ceil(l/2);for(var l=Math.floor(l/2),e=h+n,f=new CKEDITOR.dom.element(f.$.rows[e]),g=m(g,e),p,e=d.clone(),h=0;h<g.length;h++)if(p=g[h],p.parentNode==f.$&&h>k){e.insertBefore(new CKEDITOR.dom.element(p));break}else p=null;p||f.append(e)}else for(l=n=1,f=e.clone(),f.insertAfter(e),f.append(e=d.clone()),p=m(g,h),k=0;k<p.length;k++)p[k].rowSpan++;e.appendBogus();d.$.rowSpan=n;e.$.rowSpan=l;1==n&&d.removeAttribute("rowSpan");1==l&&e.removeAttribute("rowSpan");
1109 return e}function p(b,c){var d=a(b);if(1<d.length)return!1;if(c)return!0;var d=d[0],e=d.getParent(),f=e.getAscendant("table"),f=CKEDITOR.tools.buildTableMap(f),g=m(f,e.$.rowIndex,d),h=d.$.colSpan;if(1<h)e=Math.ceil(h/2),h=Math.floor(h/2);else{for(var h=e=1,k=[],l=0;l<f.length;l++){var n=f[l];k.push(n[g]);1<n[g].rowSpan&&(l+=n[g].rowSpan-1)}for(f=0;f<k.length;f++)k[f].colSpan++}f=d.clone();f.insertAfter(d);f.appendBogus();d.$.colSpan=e;f.$.colSpan=h;1==e&&d.removeAttribute("colSpan");1==h&&f.removeAttribute("colSpan");
1110 return f}var t=/^(?:td|th)$/,w=CKEDITOR.tools.isArray;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(c){function e(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function m(a,b){var d=c.addCommand(a,b);c.addFeature(d)}var t=c.lang.table,w=CKEDITOR.tools.style.parse;m("cellProperties",new CKEDITOR.dialogCommand("cellProperties",e({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",
1112 a.styles.height},right:function(a){CKEDITOR.tools.array.forEach(a.children,function(b){b.name in{td:1,th:1}&&(b.attributes["cke-row-height"]=a.styles.height)});delete a.styles.height}}],[{element:"td",check:"td{height}",left:function(a){return(a=a.attributes)&&a["cke-row-height"]},right:function(a){a.styles.height=a.attributes["cke-row-height"];delete a.attributes["cke-row-height"]}}]]})));CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js");m("rowDelete",e({requiredContent:"table",
1113 exec:function(a){a=a.getSelection();(a=b(a))&&h(a)}}));m("rowInsertBefore",e({requiredContent:"table",exec:function(b){b=b.getSelection();b=a(b);f(b,!0)}}));m("rowInsertAfter",e({requiredContent:"table",exec:function(b){b=b.getSelection();b=a(b);f(b)}}));m("columnDelete",e({requiredContent:"table",exec:function(b){var c=b.getSelection();b=c.getRanges();var d=a(c),e=d[0],f=d[d.length-1],d=e.getAscendant("table"),g=CKEDITOR.tools.buildTableMap(d),k,l,m=[];c.reset();for(var n=0,c=g.length;n<c;n++)for(var p=
1114 0,t=g[n].length;p<t;p++)g[n][p]==e.$&&(k=p),g[n][p]==f.$&&(l=p);for(n=k;n<=l;n++)for(p=0;p<g.length;p++)f=g[p],e=new CKEDITOR.dom.element(d.$.rows[p]),f=new CKEDITOR.dom.element(f[n]),f.$&&(1==f.$.colSpan?f.remove():--f.$.colSpan,p+=f.$.rowSpan-1,e.$.cells.length||m.push(e));l=d.$.rows[0]&&d.$.rows[0].cells;k=new CKEDITOR.dom.element(l[k]||(k?l[k-1]:d.$.parentNode));m.length==c&&(b[0].moveToPosition(d,CKEDITOR.POSITION_AFTER_END),b[0].select(),d.remove());k&&h(k,!0)}}));m("columnInsertBefore",e({requiredContent:"table",
1115 exec:function(b){b=b.getSelection();b=a(b);l(b,!0)}}));m("columnInsertAfter",e({requiredContent:"table",exec:function(b){b=b.getSelection();b=a(b);l(b)}}));m("cellDelete",e({requiredContent:"table",exec:function(a){a=a.getSelection();d(a)}}));m("cellMerge",e({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(a,b){b.cell=g(a.getSelection());h(b.cell,!0)}}));m("cellMergeRight",e({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a,b){b.cell=
1116 g(a.getSelection(),"right");h(b.cell,!0)}}));m("cellMergeDown",e({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a,b){b.cell=g(a.getSelection(),"down");h(b.cell,!0)}}));m("cellVerticalSplit",e({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a){h(p(a.getSelection()))}}));m("cellHorizontalSplit",e({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){h(n(a.getSelection()))}}));m("cellInsertBefore",e({requiredContent:"table",
1117 exec:function(a){a=a.getSelection();k(a,!0)}}));m("cellInsertAfter",e({requiredContent:"table",exec:function(a){a=a.getSelection();k(a)}}));c.addMenuItems&&c.addMenuItems({tablecell:{label:t.cell.menu,group:"tablecell",order:1,getItems:function(){var b=c.getSelection(),d=a(b);return{tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:g(b,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:g(b,
1123 insertRow:f,insertColumn:l,getSelectedCells:a};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(a,f,b,c,e){a=a.$.rows;b=b||0;c="number"===typeof c?c:a.length-1;e="number"===typeof e?e:-1;var l=-1,k=[];for(f=f||0;f<=c;f++){l++;!k[l]&&(k[l]=[]);for(var d=-1,h=b;h<=(-1===e?a[f].cells.length-1:e);h++){var m=a[f].cells[h];if(!m)break;for(d++;k[l][d];)d++;for(var g=isNaN(m.colSpan)?1:m.colSpan,m=isNaN(m.rowSpan)?1:m.rowSpan,n=0;n<m&&!(f+n>c);n++){k[l+
1124 n]||(k[l+n]=[]);for(var p=0;p<g;p++)k[l+n][d+p]=a[f].cells[h]}d+=g-1;if(-1!==e&&d>=e)break}}return k},function(){function a(a,b){var c=a.getAscendant("table"),d=b.getAscendant("table"),e=CKEDITOR.tools.buildTableMap(c),f=a.getAscendant("tr",!0).$.rowIndex,g=b.getAscendant("tr",!0).$.rowIndex,h=[],k={},l,m;c.contains(d)&&(b=b.getAscendant({td:1,th:1}),g=b.getAscendant("tr",!0).$.rowIndex);f>g&&(c=f,f=g,g=c,c=a,a=b,b=c);for(c=0;c<e[f].length;c++)if(a.$===e[f][c]){l=c;break}for(c=0;c<e[g].length;c++)if(b.$===
1125 e[g][c]){m=c;break}l>m&&(c=l,l=m,m=c);for(c=f;c<=g;c++)for(f=l;f<=m;f++)d=new CKEDITOR.dom.element(e[c][f]),d.$&&!d.getCustomData("selected_cell")&&(h.push(d),CKEDITOR.dom.element.setMarker(k,d,"selected_cell",!0));CKEDITOR.dom.element.clearAllMarkers(k);return h}function f(a){a=a.data.$;return CKEDITOR.env.ie&&9>CKEDITOR.env.version?1===a.button:0===a.button}function b(a){return(a=a.editable().findOne(".cke_table-faked-selection"))&&a.getAscendant("table")}function c(a,b){var c=a.editable().find(".cke_table-faked-selection"),
1129 b){return a&&b?a.equals(b)||a.contains(b)||b.contains(a)||a.getCommonAncestor(b).is(q):!1}function e(a){return!a.getAscendant("table",!0)&&a.getDocument().equals(g.document)}var g=a.editor||a.listenerData.editor,m=g.getSelection(1),n=b(g),p=a.data.getTarget(),t=p&&p.getAscendant({td:1,th:1},!0),p=p&&p.getAscendant("table",!0),q={table:1,thead:1,tbody:1,tfoot:1,tr:1,td:1,th:1};(function(a,b,c,g){return"mousedown"===a.name&&(f(a)||!g)||"mouseup"===a.name&&!e(a.data.getTarget())&&!d(c,g)?!0:!1})(a,m,
1130 n,p)&&c(g,!0);!w.active&&"mousedown"===a.name&&f(a)&&p&&(w={active:!0},CKEDITOR.document.on("mouseup",h,null,{editor:g}));(t||p)&&k(g,t||p,a);"mouseup"===a.name&&(f(a)&&(e(a.data.getTarget())||d(n,p))&&l(g),w={active:!1},CKEDITOR.document.removeListener("mouseup",h))}function m(a){var b=a.data.getTarget().getAscendant({td:1,th:1},!0);b&&!b.hasClass("cke_table-faked-selection")&&(a.cancel(),a.data.preventDefault())}function g(a,b){function c(a){a.cancel()}var d=a.getSelection(),e=d.createBookmarks(),
1131 f=a.document,g=a.createRange(),h=f.getDocumentElement().$,k=CKEDITOR.env.ie&&9>CKEDITOR.env.version,l=a.blockless||CKEDITOR.env.ie?"span":"div",m,n,p,t;f.getById("cke_table_copybin")||(m=f.createElement(l),n=f.createElement(l),n.setAttributes({id:"cke_table_copybin","data-cke-temp":"1"}),m.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"}),m.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-5000px"),m.setHtml(a.getSelectedHtml(!0)),a.fire("lockSnapshot"),n.append(m),
1132 a.editable().append(n),t=a.on("selectionChange",c,null,null,0),k&&(p=h.scrollTop),g.selectNodeContents(m),g.select(),k&&(h.scrollTop=p),setTimeout(function(){n.remove();d.selectBookmarks(e);t.removeListener();a.fire("unlockSnapshot");b&&(a.extractSelectedHtml(),a.fire("saveSnapshot"))},100))}function n(a){var b=a.editor||a.sender.editor;b.getSelection().isInTable()&&g(b,"cut"===a.name)}function p(b){function c(a){a=a.getRanges()[0];var b=a.endContainer.getAscendant("tr",!0);if(b&&a.collapsed){if(a.checkBoundaryOfElement(b,
1133 CKEDITOR.START))return 1;if(a.checkBoundaryOfElement(b,CKEDITOR.END))return 2}return 0}function d(a){var b=0,c;for(c=0;c<a.length;c++)a[c].length>b&&(b=a[c].length);return b}function f(a){var b=a.getAscendant("table"),c=a.getParent().$.rowIndex,b=CKEDITOR.tools.buildTableMap(b),d;for(d=0;d<b[c].length;d++)if((new CKEDITOR.dom.element(b[c][d])).equals(a))return d}var g=b.editor,h=g.getSelection(),k=new CKEDITOR.dom.element("body"),l=0,m=0,n=0,p=0,t={},q,w,J,P,K,S,O;k.setHtml(b.data.dataValue);p=k.findOne("table");
1135 h.selectElement(n);w=v(h)}q=CKEDITOR.tools.buildTableMap(b,n.$.rowIndex,u(J,!0),K.$.rowIndex,f(P));h=CKEDITOR.tools.buildTableMap(p);n=d(h);p=d(q);if(h.length>q.length)for(l=h.length-q.length,O=0;O<l;O++)x(w);if(n>p)for(m=n-p,O=0;O<m;O++)B(w);J=w[0];n=J.getParent();P=w[w.length-1];K=new CKEDITOR.dom.element(b.$.rows[P.getParent().$.rowIndex+l]);P=K.getChild(P.$.cellIndex+m);l=u(w[0],!0);w=f(P);q=CKEDITOR.tools.buildTableMap(b,n.$.rowIndex,l,K.$.rowIndex,w);for(O=0;O<h.length;O++)for(m=new CKEDITOR.dom.element(b.$.rows[n.$.rowIndex+
1136 O]),w=0;w<h[O].length;w++)if(S=new CKEDITOR.dom.element(h[O][w]),k=q[O]&&q[O][w]?new CKEDITOR.dom.element(q[O][w]):null,S&&!S.getCustomData("processed")){if(k&&k.getParent())S.replace(k);else if(0===w||h[O][w-1])(k=0!==w?new CKEDITOR.dom.element(h[O][w-1]):null)&&m.equals(k.getParent())?S.insertAfter(k):0<l?S.insertAfter(new CKEDITOR.dom.element(m.$.cells[l])):m.append(S,!0);CKEDITOR.dom.element.setMarker(t,S,"processed",!0)}else S.getCustomData("processed")&&k&&k.remove();CKEDITOR.dom.element.clearAllMarkers(t);
1138 a.getEnclosedNode().setText(""):a.deleteContents();CKEDITOR.tools.array.forEach(a._find("td"),function(a){a.appendBogus()})}var c=a.editable();c.attachListener(c,"keydown",function(a){function c(b,d){if(!d.length)return null;var f=a.createRange(),g=CKEDITOR.dom.range.mergeRanges(d);CKEDITOR.tools.array.forEach(g,function(a){a.enlarge(CKEDITOR.ENLARGE_ELEMENT)});var h=g[0].getBoundaryNodes(),k=h.startNode,h=h.endNode;if(k&&k.is&&k.is(e)){for(var l=k.getAscendant("table",!0),m=k.getPreviousSourceNode(!1,
1139 CKEDITOR.NODE_ELEMENT,l),n=!1,p=function(a){return!k.contains(a)&&a.is&&a.is("td","th")};m&&!p(m);)m=m.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT,l);!m&&h&&h.is&&!h.is("table")&&h.getNext()&&(m=h.getNext().findOne("td, th"),n=!0);if(m)f["moveToElementEdit"+(n?"Start":"End")](m);else f.setStartBefore(k.getAscendant("table",!0)),f.collapse(!0);g[0].deleteContents();return[f]}if(k)return f.moveToElementEditablePosition(k),[f]}var d={37:1,38:1,39:1,40:1,8:1,46:1},e=CKEDITOR.tools.extend({table:1},
1140 CKEDITOR.dtd.$tableContent);delete e.td;delete e.th;return function(e){var f=e.data.getKey(),g,h=37===f||38==f,k,l,m;if(d[f]&&(g=a.getSelection())&&g.isInTable()&&g.isFake)if(k=g.getRanges(),l=k[0]._getTableElement(),m=k[k.length-1]._getTableElement(),e.data.preventDefault(),e.cancel(),8<f&&46>f)k[0].moveToElementEditablePosition(h?l:m,!h),g.selectRanges([k[0]]);else{for(e=0;e<k.length;e++)b(k[e]);(e=c(l,k))?k=e:k[0].moveToElementEditablePosition(l);g.selectRanges(k);a.fire("saveSnapshot")}}}(a),
1143 "mouseup",h,null,e);b.attachListener(b,"dragstart",m);b.attachListener(a,"selectionCheck",d);CKEDITOR.plugins.tableselection.keyboardIntegration(a);CKEDITOR.plugins.clipboard&&!CKEDITOR.plugins.clipboard.isCustomCopyCutSupported&&(b.attachListener(b,"cut",n),b.attachListener(b,"copy",n))}),a.on("paste",p),t(a,"rowInsertBefore rowInsertAfter columnInsertBefore columnInsertAfter cellInsertBefore cellInsertAfter".split(" "),function(a,b){e(a,b.selectedCells)}),t(a,["cellMerge","cellMergeRight","cellMergeDown"],
1168 b.getItem(0).hasAttribute("data-cke-temp")||b.getItem(0).remove(1),c=!1)})}var c=this.editor,d=a.document,h=d.body,m=d.getElementById("cke_actscrpt");m&&m.parentNode.removeChild(m);(m=d.getElementById("cke_shimscrpt"))&&m.parentNode.removeChild(m);(m=d.getElementById("cke_basetagscrpt"))&&m.parentNode.removeChild(m);h.contentEditable=!0;CKEDITOR.env.ie&&(h.hideFocus=!0,h.disabled=!0,h.removeAttribute("disabled"));delete this._.isLoadingData;this.$=h;d=new CKEDITOR.dom.document(d);this.setup();this.fixInitialSelection();
1175 h.setStyles({width:"100%",height:"100%"});h.addClass("cke_wysiwyg_frame").addClass("cke_reset");d=a.ui.space("contents");d.append(h);var m=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(m)h.on("load",f);var g=a.title,n=a.fire("ariaEditorHelpLabel",{}).label;g&&(CKEDITOR.env.ie&&n&&(g+=", "+n),h.setAttribute("title",g));if(n){var g=CKEDITOR.tools.getNextId(),p=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+g+'" class\x3d"cke_voice_label"\x3e'+n+"\x3c/span\x3e");d.append(p,1);h.setAttribute("aria-describedby",
1176 g)}a.on("beforeModeUnload",function(a){a.removeListener();p&&p.remove()});h.setAttributes({tabIndex:a.tabIndex,allowTransparency:"true"});!m&&f();a.fire("ariaWidget",h)})}});CKEDITOR.editor.prototype.addContentsCss=function(a){var b=this.config,c=b.contentsCss;CKEDITOR.tools.isArray(c)||(b.contentsCss=c?[c]:[]);b.contentsCss.push(a)};c=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(b){CKEDITOR.tools.setTimeout(a,
1177 0,this,b)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,c){var f=this.editor;if(c)this.setHtml(a),this.fixInitialSelection(),f.fire("dataReady");else{this._.isLoadingData=!0;f._.dataStore={id:1};var d=f.config,h=d.fullPage,m=d.docType,g=CKEDITOR.tools.buildStyleHtml(b()).replace(/<style>/,'\x3cstyle data-cke-temp\x3d"1"\x3e');h||(g+=CKEDITOR.tools.buildStyleHtml(f.config.contentsCss));var n=d.baseHref?'\x3cbase href\x3d"'+
1178 d.baseHref+'" data-cke-temp\x3d"1" /\x3e':"";h&&(a=a.replace(/<!DOCTYPE[^>]*>/i,function(a){f.docType=m=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){f.xmlDeclaration=a;return""}));a=f.dataProcessor.toHtml(a);h?(/<body[\s|>]/.test(a)||(a="\x3cbody\x3e"+a),/<html[\s|>]/.test(a)||(a="\x3chtml\x3e"+a+"\x3c/html\x3e"),/<head[\s|>]/.test(a)?/<title[\s|>]/.test(a)||(a=a.replace(/<head[^>]*>/,"$\x26\x3ctitle\x3e\x3c/title\x3e")):a=a.replace(/<html[^>]*>/,"$\x26\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e"),
1179 n&&(a=a.replace(/<head[^>]*?>/,"$\x26"+n)),a=a.replace(/<\/head\s*>/,g+"$\x26"),a=m+a):a=d.docType+'\x3chtml dir\x3d"'+d.contentsLangDirection+'" lang\x3d"'+(d.contentsLanguage||f.langCode)+'"\x3e\x3chead\x3e\x3ctitle\x3e'+this._.docTitle+"\x3c/title\x3e"+n+g+"\x3c/head\x3e\x3cbody"+(d.bodyId?' id\x3d"'+d.bodyId+'"':"")+(d.bodyClass?' class\x3d"'+d.bodyClass+'"':"")+"\x3e"+a+"\x3c/body\x3e\x3c/html\x3e";CKEDITOR.env.gecko&&(a=a.replace(/<body/,'\x3cbody contenteditable\x3d"true" '),2E4>CKEDITOR.env.version&&
1182 m=this.getDocument(),c=c?m.getDocumentElement().getOuterHtml():m.getBody().getHtml();CKEDITOR.env.gecko&&b.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/<br>(?=\s*(:?$|<\/body>))/,""));c=a.dataProcessor.toDataFormat(c);f&&(c=f+"\n"+c);d&&(c=d+"\n"+c);return c},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:c.baseProto.focus.call(this)},detach:function(){var a=this.editor,b=a.document,f;try{f=a.window.getFrame()}catch(d){}c.baseProto.detach.call(this);this.clearCustomData();b.getDocumentElement().clearCustomData();