formModeler.ckeditor.ckeditor.js Maven / Gradle / Ivy
!function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var e={timestamp:"D6IE",version:"4.2",revision:"f74e558",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var e=window.CKEDITOR_BASEPATH||"";if(!e)for(var t=document.getElementsByTagName("script"),n=0;n=0;u--)if(l[u].priority<=r)return l.splice(u+1,0,a),{removeListener:s};l.unshift(a)}return{removeListener:s}},once:function(){var e=arguments[1];return arguments[1]=function(t){return t.removeListener(),e.apply(this,arguments)},this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var e=this.on.apply(this,arguments);return CKEDITOR.event.useCapture=0,e},fire:function(){var e=0,n=function(){e=1},i=0,o=function(){i=1};return function(r,a,s){var l=t(this)[r],r=e,c=i;if(e=i=0,l){var u=l.listeners;if(u.length)for(var d,u=u.slice(0),h=0;h=0&&i.listeners.splice(o,1)}},removeAllListeners:function(){var e,n=t(this);for(e in n)delete n[e]},hasListeners:function(e){return(e=t(this)[e])&&e.listeners.length>0}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]),CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(e,t){return e in{instanceReady:1,loaded:1}&&(this[e]=!0),CKEDITOR.event.prototype.fire.call(this,e,t,this)},CKEDITOR.editor.prototype.fireOnce=function(e,t){return e in{instanceReady:1,loaded:1}&&(this[e]=!0),CKEDITOR.event.prototype.fireOnce.call(this,e,t,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,a={ie:eval("/*@cc_on!@*/false"),opera:!!c&&c.version,webkit:b.indexOf(" applewebkit/")>-1,air:b.indexOf(" adobeair/")>-1,mac:b.indexOf("macintosh")>-1,quirks:"BackCompat"==document.compatMode,mobile:b.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(b),isCustomDomain:function(){if(!this.ie)return!1;var e=document.domain,t=window.location.hostname;return e!=t&&e!="["+t+"]"},secure:"https:"==location.protocol};a.gecko="Gecko"==navigator.product&&!a.webkit&&!a.opera,a.webkit&&(b.indexOf("chrome")>-1?a.chrome=!0:a.safari=!0);var e=0;if(a.ie&&(e=a.quirks||!document.documentMode?parseFloat(b.match(/msie (\d+)/)[1]):document.documentMode,a.ie9Compat=9==e,a.ie8Compat=8==e,a.ie7Compat=7==e,a.ie6Compat=7>e||a.quirks),a.gecko){var d=b.match(/rv:([\d\.]+)/);d&&(d=d[1].split("."),e=1e4*d[0]+100*(d[1]||0)+1*(d[2]||0))}return a.opera&&(e=parseFloat(c.version())),a.air&&(e=parseFloat(b.match(/ adobeair\/(\d+)/)[1])),a.webkit&&(e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1])),a.version=e,a.isCompatible=a.iOS&&e>=534||!a.mobile&&(a.ie&&e>6||a.gecko&&e>=10801||a.opera&&e>=9.5||a.air&&e>=1||a.webkit&&e>=522||!1),a.hidpi=window.devicePixelRatio>=2,a.cssClass="cke_browser_"+(a.ie?"ie":a.gecko?"gecko":a.opera?"opera":a.webkit?"webkit":"unknown"),a.quirks&&(a.cssClass=a.cssClass+" cke_browser_quirks"),a.ie&&(a.cssClass=a.cssClass+(" cke_browser_ie"+(a.quirks||a.version<7?"6":a.version)),a.quirks&&(a.cssClass=a.cssClass+" cke_browser_iequirks")),a.gecko&&(10900>e?a.cssClass=a.cssClass+" cke_browser_gecko18":11e3>=e&&(a.cssClass=a.cssClass+" cke_browser_gecko19")),a.air&&(a.cssClass=a.cssClass+" cke_browser_air"),a.iOS&&(a.cssClass=a.cssClass+" cke_browser_ios"),a.hidpi&&(a.cssClass=a.cssClass+" cke_hidpi"),a}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR),CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var e=document.createElement("script");e.type="text/javascript",e.src=CKEDITOR.basePath+"ckeditor.js",document.getElementsByTagName("head")[0].appendChild(e)}},CKEDITOR.loadFullCoreTimeout=0,CKEDITOR.add=function(e){(this._.pending||(this._.pending=[])).push(e)},function(){CKEDITOR.domReady(function(){var e=CKEDITOR.loadFullCore,t=CKEDITOR.loadFullCoreTimeout;e&&(CKEDITOR.status="basic_ready",e&&e._load?e():t&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1e3*t))})}(),CKEDITOR.status="basic_loaded"}(),CKEDITOR.dom={},function(){var e=[],t=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){e=[]}),CKEDITOR.tools={arrayCompare:function(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!=t.length)return!1;for(var n=0;no;o++){var r,a=arguments[o];for(r in a)(t===!0||void 0==e[r])&&(!n||r in n)&&(e[r]=a[r])}return e},prototypedCopy:function(e){var t=function(){};return t.prototype=e,new t},copy:function(e){var t,n={};for(t in e)n[t]=e[t];return n},isArray:function(e){return!!e&&e instanceof Array},isEmpty:function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},cssVendorPrefix:function(e,n,i){return i?t+e+":"+n+";"+e+":"+n:(i={},i[e]=n,i[t+e]=n,i)},cssStyleToDomStyle:function(){var e=document.createElement("div").style,t="undefined"!=typeof e.cssFloat?"cssFloat":"undefined"!=typeof e.styleFloat?"styleFloat":"float";return function(e){return"float"==e?t:e.replace(/-./g,function(e){return e.substr(1).toUpperCase()})}}(),buildStyleHtml:function(e){for(var t,e=[].concat(e),n=[],i=0;i"+t+"":'');return n.join("")},htmlEncode:function(e){return(""+e).replace(/&/g,"&").replace(/>/g,">").replace(//g,">")},getNextNumber:function(){var e=0;return function(){return++e}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(e,t){var n=t(e);return n.prototype=e.prototype,n},setTimeout:function(e,t,n,i,o){return o||(o=window),n||(n=o),o.setTimeout(function(){i?e.apply(n,[].concat(i)):e.apply(n)},t||0)},trim:function(){var e=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(t){return t.replace(e,"")}}(),ltrim:function(){var e=/^[ \t\n\r]+/g;return function(t){return t.replace(e,"")}}(),rtrim:function(){var e=/[ \t\n\r]+$/g;return function(t){return t.replace(e,"")}}(),indexOf:function(e,t){if("function"==typeof t){for(var n=0,i=e.length;i>n;n++)if(t(e[n]))return n}else{if(e.indexOf)return e.indexOf(t);for(n=0,i=e.length;i>n;n++)if(e[n]===t)return n}return-1},search:function(e,t){var n=CKEDITOR.tools.indexOf(e,t);return n>=0?e[n]:null},bind:function(e,t){return function(){return e.apply(t,arguments)}},createClass:function(e){var t=e.$,n=e.base,i=e.privates||e._,o=e.proto,e=e.statics;if(!t&&(t=function(){n&&this.base.apply(this,arguments)}),i)var r=t,t=function(){var e,t=this._||(this._={});for(e in i){var n=i[e];t[e]="function"==typeof n?CKEDITOR.tools.bind(n,this):n}r.apply(this,arguments)};return n&&(t.prototype=this.prototypedCopy(n.prototype),t.prototype.constructor=t,t.base=n,t.baseProto=n.prototype,t.prototype.base=function(){this.base=n.prototype.base,n.apply(this,arguments),this.base=arguments.callee}),o&&this.extend(t.prototype,o,!0),e&&this.extend(t,e,!0),t},addFunction:function(t,n){return e.push(function(){return t.apply(n||this,arguments)})-1},removeFunction:function(t){e[t]=null},callFunction:function(t){var n=e[t];return n&&n.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var e,t=/^-?\d+\.?\d*px$/;return function(n){return e=CKEDITOR.tools.trim(n+"")+"px",t.test(e)?e:n||""}}(),convertToPx:function(){var e;return function(t){return e||(e=CKEDITOR.dom.element.createFromHtml('',CKEDITOR.document),CKEDITOR.document.getBody().append(e)),/%$/.test(t)?t:(e.setStyle("width",t),e.$.clientWidth)}}(),repeat:function(e,t){return Array(t+1).join(e)},tryThese:function(){for(var e,t=0,n=arguments.length;n>t;t++){var i=arguments[t];try{e=i();break}catch(o){}}return e},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(e){return function(){var t=arguments,n=this;window.setTimeout(function(){e.apply(n,t)},0)}},normalizeCssText:function(e,t){var n,i=[],o=CKEDITOR.tools.parseCssText(e,!0,t);for(n in o)i.push(n+":"+o[n]);return i.sort(),i.length?i.join(";")+";":""},convertRgbToHex:function(e){return e.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(e,t,n,i){for(e=[t,n,i],t=0;3>t;t++)e[t]=("0"+parseInt(e[t],10).toString(16)).slice(-2);return"#"+e.join("")})},parseCssText:function(e,t,n){var i={};return n&&(n=new CKEDITOR.dom.element("span"),n.setAttribute("style",e),e=CKEDITOR.tools.convertRgbToHex(n.getAttribute("style")||"")),e&&";"!=e?(e.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(e,n,o){t&&(n=n.toLowerCase(),"font-family"==n&&(o=o.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,",")),o=CKEDITOR.tools.trim(o)),i[n]=o}),i):i},writeCssText:function(e,t){var n,i=[];for(n in e)i.push(n+":"+e[n]);return t&&i.sort(),i.join("; ")},objectCompare:function(e,t,n){var i;if(!e&&!t)return!0;if(!e||!t)return!1;for(i in e)if(e[i]!=t[i])return!1;if(!n)for(i in t)if(e[i]!=t[i])return!1;return!0},objectKeys:function(e){var t,n=[];for(t in e)n.push(t);return n},convertArrayToObject:function(e,t){var n={};1==arguments.length&&(t=!0);for(var i=0,o=e.length;o>i;++i)n[e[i]]=t;return n},fixDomain:function(){for(var e;;)try{e=window.parent.document.domain;break}catch(t){if(e=e?e.replace(/.+?(?:\.|$)/,""):document.domain,!e)break;document.domain=e}return!!e}}}(),CKEDITOR.dtd=function(){var e=CKEDITOR.tools.extend,t=function(e,t){for(var n=CKEDITOR.tools.clone(e),i=1;i=i;i++)if(t[i]!=e[i]){if(n>i)return t[i]8)&&t&&(e=t+":"+e),new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(e))},getHead:function(){var e=this.$.getElementsByTagName("head")[0];return e=e?new CKEDITOR.dom.element(e):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(e){this.$.open("text/html","replace"),CKEDITOR.env.ie&&(e=e.replace(/(?:^\s*]*?>)|^/i,'$&\n")),this.$.write(e),this.$.close()}}),CKEDITOR.dom.nodeList=function(e){this.$=e},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(e){return 0>e||e>=this.$.length?null:(e=this.$[e])?new CKEDITOR.dom.node(e):null}},CKEDITOR.dom.element=function(e,t){"string"==typeof e&&(e=(t?t.$:document).createElement(e)),CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.element.get=function(e){return(e="string"==typeof e?document.getElementById(e)||document.getElementsByName(e)[0]:e)&&(e.$?e:new CKEDITOR.dom.element(e))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(e,t){var n=new CKEDITOR.dom.element("div",t);return n.setHtml(e),n.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(e,t,n,i){var o=t.getCustomData("list_marker_id")||t.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),r=t.getCustomData("list_marker_names")||t.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");return e[o]=t,r[n]=1,t.setCustomData(n,i)},CKEDITOR.dom.element.clearAllMarkers=function(e){for(var t in e)CKEDITOR.dom.element.clearMarkers(e,e[t],1)},CKEDITOR.dom.element.clearMarkers=function(e,t,n){var i,o=t.getCustomData("list_marker_names"),r=t.getCustomData("list_marker_id");for(i in o)t.removeCustomData(i);t.removeCustomData("list_marker_names"),n&&(t.removeCustomData("list_marker_id"),delete e[r])},function(){function e(e){for(var n=0,i=0,o=t[e].length;o>i;i++)n+=parseInt(this.getComputedStyle(t[e][i])||0,10)||0;return n}CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:function(e){var t=this.$.className;t&&(RegExp("(?:^|\\s)"+e+"(?:\\s|$)","").test(t)||(t+=" "+e)),this.$.className=t||e},removeClass:function(e){var t=this.getAttribute("class");return t&&(e=RegExp("(?:^|\\s+)"+e+"(?=\\s|$)","i"),e.test(t)&&((t=t.replace(e,"").replace(/^\s+/,""))?this.setAttribute("class",t):this.removeAttribute("class"))),this},hasClass:function(e){return RegExp("(?:^|\\s+)"+e+"(?=\\s|$)","").test(this.getAttribute("class"))},append:function(e,t){return"string"==typeof e&&(e=this.getDocument().createElement(e)),t?this.$.insertBefore(e.$,this.$.firstChild):this.$.appendChild(e.$),e},appendHtml:function(e){if(this.$.childNodes.length){var t=new CKEDITOR.dom.element("div",this.getDocument());t.setHtml(e),t.moveChildren(this)}else this.setHtml(e)},appendText:function(e){void 0!=this.$.text?this.$.text=this.$.text+e:this.append(new CKEDITOR.dom.text(e))},appendBogus:function(){for(var e=this.getLast();e&&e.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(e.getText());)e=e.getPrevious();e&&e.is&&e.is("br")||(e=CKEDITOR.env.opera?this.getDocument().createText(""):this.getDocument().createElement("br"),CKEDITOR.env.gecko&&e.setAttribute("type","_moz"),this.append(e))},breakParent:function(e){var t=new CKEDITOR.dom.range(this.getDocument());t.setStartAfter(this),t.setEndAfter(e),e=t.extractContents(),t.insertNode(this.remove()),e.insertAfterNode(this)},contains:CKEDITOR.env.ie||CKEDITOR.env.webkit?function(e){var t=this.$;return e.type!=CKEDITOR.NODE_ELEMENT?t.contains(e.getParent().$):t!=e.$&&t.contains(e.$)
}:function(e){return!!(16&this.$.compareDocumentPosition(e.$))},focus:function(){function e(){try{this.$.focus()}catch(e){}}return function(t){t?CKEDITOR.tools.setTimeout(e,100,this):e.call(this)}}(),getHtml:function(){var e=this.$.innerHTML;return CKEDITOR.env.ie?e.replace(/<\?[^>]*>/g,""):e},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var e=this.$.ownerDocument.createElement("div");return e.appendChild(this.$.cloneNode(!0)),e.innerHTML},getClientRect:function(){var e=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());return!e.width&&(e.width=e.right-e.left),!e.height&&(e.height=e.bottom-e.top),e},setHtml:function(){var e=function(e){return this.$.innerHTML=e};return CKEDITOR.env.ie&&CKEDITOR.env.version<9?function(e){try{return this.$.innerHTML=e}catch(t){this.$.innerHTML="";var n=new CKEDITOR.dom.element("body",this.getDocument());for(n.$.innerHTML=e,n=n.getChildren();n.count();)this.append(n.getItem(0));return e}}:e}(),setText:function(e){return CKEDITOR.dom.element.prototype.setText=void 0!=this.$.innerText?function(e){return this.$.innerText=e}:function(e){return this.$.textContent=e},this.setText(e)},getAttribute:function(){var e=function(e){return this.$.getAttribute(e,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(e){switch(e){case"class":e="className";break;case"http-equiv":e="httpEquiv";break;case"name":return this.$.name;case"tabindex":return e=this.$.getAttribute(e,2),0!==e&&0===this.$.tabIndex&&(e=null),e;case"checked":return e=this.$.attributes.getNamedItem(e),(e.specified?e.nodeValue:this.$.checked)?"checked":null;case"hspace":case"value":return this.$[e];case"style":return this.$.style.cssText;case"contenteditable":case"contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(e,2)}:e}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:CKEDITOR.env.ie?function(e){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(e)]}:function(e){var t=this.getWindow().$.getComputedStyle(this.$,null);return t?t.getPropertyValue(e):""},getDtd:function(){var e=CKEDITOR.dtd[this.getName()];return this.getDtd=function(){return e},e},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:CKEDITOR.env.ie?function(){var e=this.$.tabIndex;return 0===e&&!CKEDITOR.dtd.$tabIndex[this.getName()]&&0!==parseInt(this.getAttribute("tabindex"),10)&&(e=-1),e}:CKEDITOR.env.webkit?function(){var e=this.$.tabIndex;return void 0==e&&(e=parseInt(this.getAttribute("tabindex"),10),isNaN(e)&&(e=-1)),e}:function(){return this.$.tabIndex},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||null},getName:function(){var e=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&!(document.documentMode>8)){var t=this.$.scopeName;"HTML"!=t&&(e=t.toLowerCase()+":"+e)}return(this.getName=function(){return e})()},getValue:function(){return this.$.value},getFirst:function(e){var t=this.$.firstChild;return(t=t&&new CKEDITOR.dom.node(t))&&e&&!e(t)&&(t=t.getNext(e)),t},getLast:function(e){var t=this.$.lastChild;return(t=t&&new CKEDITOR.dom.node(t))&&e&&!e(t)&&(t=t.getPrevious(e)),t},getStyle:function(e){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(e)]},is:function(){var e=this.getName();if("object"==typeof arguments[0])return!!arguments[0][e];for(var t=0;tt;t++){var i=e.getItem(t);if((i.type!=CKEDITOR.NODE_ELEMENT||!i.data("cke-bookmark"))&&(i.type==CKEDITOR.NODE_ELEMENT&&!i.isEmptyInlineRemoveable()||i.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(i.getText())))return!1}return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(){for(var e=this.$.attributes,t=0;t0&&(t>2||!n[e[0].nodeName]||2==t&&!n[e[1].nodeName])},hasAttribute:function(){function e(e){return e=this.$.attributes.getNamedItem(e),!(!e||!e.specified)}return CKEDITOR.env.ie&&CKEDITOR.env.version<8?function(t){return"name"==t?!!this.$.name:e.call(this,t)}:e}(),hide:function(){this.setStyle("display","none")},moveChildren:function(e,t){var n=this.$,e=e.$;if(n!=e){var i;if(t)for(;i=n.lastChild;)e.insertBefore(n.removeChild(i),e.firstChild);else for(;i=n.firstChild;)e.appendChild(n.removeChild(i))}},mergeSiblings:function(){function e(e,t,n){if(t&&t.type==CKEDITOR.NODE_ELEMENT){for(var i=[];t.data("cke-bookmark")||t.isEmptyInlineRemoveable();)if(i.push(t),t=n?t.getNext():t.getPrevious(),!t||t.type!=CKEDITOR.NODE_ELEMENT)return;if(e.isIdentical(t)){for(var o=n?e.getLast():e.getFirst();i.length;)i.shift().move(e,!n);t.moveChildren(e,!n),t.remove(),o&&o.type==CKEDITOR.NODE_ELEMENT&&o.mergeSiblings()}}}return function(t){(t===!1||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))&&(e(this,this.getNext(),!0),e(this,this.getPrevious()))}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var e=function(e,t){return this.$.setAttribute(e,t),this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(t,n){return"class"==t?this.$.className=n:"style"==t?this.$.style.cssText=n:"tabindex"==t?this.$.tabIndex=n:"checked"==t?this.$.checked=n:"contenteditable"==t?e.call(this,"contentEditable",n):e.apply(this,arguments),this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(t,n){if("src"==t&&n.match(/^http:\/\//))try{e.apply(this,arguments)}catch(i){}else e.apply(this,arguments);return this}:e}(),setAttributes:function(e){for(var t in e)this.setAttribute(t,e[t]);return this},setValue:function(e){return this.$.value=e,this},removeAttribute:function(){var e=function(e){this.$.removeAttribute(e)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(e){"class"==e?e="className":"tabindex"==e?e="tabIndex":"contenteditable"==e&&(e="contentEditable"),this.$.removeAttribute(e)}:e}(),removeAttributes:function(e){if(CKEDITOR.tools.isArray(e))for(var t=0;t=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+e+")")):this.setStyle("opacity",e)},unselectable:function(){if(this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none")),CKEDITOR.env.ie||CKEDITOR.env.opera){this.setAttribute("unselectable","on");for(var e,t=this.getElementsByTag("*"),n=0,i=t.count();i>n;n++)e=t.getItem(n),e.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var e=this;"html"!=e.getName();){if("static"!=e.getComputedStyle("position"))return e;e=e.getParent()}return null},getDocumentPosition:function(e){var t=0,n=0,i=this.getDocument(),o=i.getBody(),r="BackCompat"==i.$.compatMode;if(document.documentElement.getBoundingClientRect){var a=this.$.getBoundingClientRect(),s=i.$.documentElement,l=s.clientTop||o.$.clientTop||0,c=s.clientLeft||o.$.clientLeft||0,u=!0;CKEDITOR.env.ie&&(u=i.getDocumentElement().contains(this),i=i.getBody().contains(this),u=r&&i||!r&&u),u&&(t=a.left+(!r&&s.scrollLeft||o.$.scrollLeft),t-=c,n=a.top+(!r&&s.scrollTop||o.$.scrollTop),n-=l)}else for(o=this,i=null;o&&"body"!=o.getName()&&"html"!=o.getName();){for(t+=o.$.offsetLeft-o.$.scrollLeft,n+=o.$.offsetTop-o.$.scrollTop,o.equals(this)||(t+=o.$.clientLeft||0,n+=o.$.clientTop||0);i&&!i.equals(o);)t-=i.$.scrollLeft,n-=i.$.scrollTop,i=i.getParent();i=o,o=(a=o.$.offsetParent)?new CKEDITOR.dom.element(a):null}return e&&(o=this.getWindow(),i=e.getWindow(),!o.equals(i)&&o.$.frameElement&&(e=new CKEDITOR.dom.element(o.$.frameElement).getDocumentPosition(e),t+=e.x,n+=e.y)),document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||r||(t+=this.$.clientLeft?1:0,n+=this.$.clientTop?1:0),{x:t,y:n}},scrollIntoView:function(e){var t=this.getParent();if(t)do if((t.$.clientWidth&&t.$.clientWidthc||s>0)&&i(0,t===!0?c:t===!1?s:0>c?c:s),n&&(0>l||a>0)&&i(0>l?l:a,0)},setState:function(e,t,n){switch(t=t||"cke",e){case CKEDITOR.TRISTATE_ON:this.addClass(t+"_on"),this.removeClass(t+"_off"),this.removeClass(t+"_disabled"),n&&this.setAttribute("aria-pressed",!0),n&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(t+"_disabled"),this.removeClass(t+"_off"),this.removeClass(t+"_on"),n&&this.setAttribute("aria-disabled",!0),n&&this.removeAttribute("aria-pressed");break;default:this.addClass(t+"_off"),this.removeClass(t+"_on"),this.removeClass(t+"_disabled"),n&&this.removeAttribute("aria-pressed"),n&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var e=this.$;try{e.contentWindow.document}catch(t){e.src=e.src}return e&&new CKEDITOR.dom.document(e.contentWindow.document)},copyAttributes:function(e,t){for(var n=this.$.attributes,t=t||{},i=0;i=0&&t0&&n;)n=e(n,t.shift());else n=e(n,t);return n?new CKEDITOR.dom.node(n):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){this.on("contextmenu",function(e){e.data.getTarget().hasClass("cke_enable_context_menu")||e.data.preventDefault()})},getDirection:function(e){return e?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(e,t){return e="data-"+e,void 0===t?this.getAttribute(e):(t===!1?this.removeAttribute(e):this.setAttribute(e,t),null)},getEditor:function(){var e,t,n=CKEDITOR.instances;for(e in n)if(t=n[e],t.element.equals(this)&&t.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return t;return null}});var t={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};CKEDITOR.dom.element.prototype.setSize=function(t,n,i){"number"==typeof n&&(!i||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(n-=e.call(this,t)),this.setStyle(t,n+"px"))},CKEDITOR.dom.element.prototype.getSize=function(t,n){var i=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(t)],this.$["client"+CKEDITOR.tools.capitalize(t)])||0;return n&&(i-=e.call(this,t)),i}}(),CKEDITOR.dom.documentFragment=function(e){e=e||CKEDITOR.document,this.$=e.type==CKEDITOR.NODE_DOCUMENT?e.$.createDocumentFragment():e},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(e){e=e.$,e.parentNode.insertBefore(this.$,e.nextSibling)}},!0,{append:1,appendBogus:1,getFirst:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1}),function(){function e(e,t){var n=this.range;if(this._.end)return null;if(!this._.start){if(this._.start=1,n.collapsed)return this.end(),null;n.optimize()}var i,o=n.startContainer;i=n.endContainer;var r,a=n.startOffset,s=n.endOffset,l=this.guard,c=this.type,u=e?"getPreviousSourceNode":"getNextSourceNode";if(!e&&!this._.guardLTR){var d=i.type==CKEDITOR.NODE_ELEMENT?i:i.getParent(),h=i.type==CKEDITOR.NODE_ELEMENT?i.getChild(s):i.getNext();this._.guardLTR=function(e,t){return!(t&&d.equals(e)||h&&e.equals(h)||e.type==CKEDITOR.NODE_ELEMENT&&t&&e.equals(n.root))}}if(e&&!this._.guardRTL){var f=o.type==CKEDITOR.NODE_ELEMENT?o:o.getParent(),m=o.type==CKEDITOR.NODE_ELEMENT?a?o.getChild(a-1):null:o.getPrevious();this._.guardRTL=function(e,t){return!(t&&f.equals(e)||m&&e.equals(m)||e.type==CKEDITOR.NODE_ELEMENT&&t&&e.equals(n.root))}}var E=e?this._.guardRTL:this._.guardLTR;for(r=l?function(e,t){return E(e,t)===!1?!1:l(e,t)}:E,this.current?i=this.current[u](!1,c,r):(e?i.type==CKEDITOR.NODE_ELEMENT&&(i=s>0?i.getChild(s-1):r(i,!0)===!1?null:i.getPreviousSourceNode(!0,c,r)):(i=o,i.type!=CKEDITOR.NODE_ELEMENT||(i=i.getChild(a))||(i=r(o,!0)===!1?null:o.getNextSourceNode(!0,c,r))),i&&r(i)===!1&&(i=null));i&&!this._.end;){if(this.current=i,this.evaluator&&this.evaluator(i)===!1){if(t&&this.evaluator)return!1}else if(!t)return i;i=i[u](!1,c,r)}return this.end(),this.current=null}function t(t){for(var n,i=null;n=e.call(this,t);)i=n;return i}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(e){this.range=e,this._={}},proto:{end:function(){this._.end=1},next:function(){return e.call(this)},previous:function(){return e.call(this,1)},checkForward:function(){return e.call(this,0,1)!==!1},checkBackward:function(){return e.call(this,1,1)!==!1},lastForward:function(){return t.call(this)},lastBackward:function(){return t.call(this,1)},reset:function(){delete this.current,this._={}}}});var n={block:1,"list-item":1,table:1,"table-row-group":1,"table-header-group":1,"table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1,"table-caption":1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(e){return e=e?CKEDITOR.tools.extend({},CKEDITOR.dtd.$block,e||{}):CKEDITOR.dtd.$block,"none"==this.getComputedStyle("float")&&n[this.getComputedStyle("display")]||e[this.getName()]},CKEDITOR.dom.walker.blockBoundary=function(e){return function(t){return!(t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary(e))}},CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})},CKEDITOR.dom.walker.bookmark=function(e,t){function n(e){return e&&e.getName&&"span"==e.getName()&&e.data("cke-bookmark")}return function(i){var o,r;return o=i&&i.type!=CKEDITOR.NODE_ELEMENT&&(r=i.getParent())&&n(r),o=e?o:o||n(i),!!(t^o)}},CKEDITOR.dom.walker.whitespaces=function(e){return function(t){var n;return t&&t.type==CKEDITOR.NODE_TEXT&&(n=!CKEDITOR.tools.trim(t.getText())||CKEDITOR.env.webkit&&""==t.getText()),!!(e^n)}},CKEDITOR.dom.walker.invisible=function(e){var t=CKEDITOR.dom.walker.whitespaces();return function(n){return t(n)?n=1:(n.type==CKEDITOR.NODE_TEXT&&(n=n.getParent()),n=!n.$.offsetHeight),!!(e^n)}},CKEDITOR.dom.walker.nodeType=function(e,t){return function(n){return!!(t^n.type==e)}},CKEDITOR.dom.walker.bogus=function(e){function t(e){return!o(e)&&!r(e)}return function(n){var o=CKEDITOR.env.ie?n.getText&&i.test(n.getText()):n.is&&n.is("br");return o&&(o=n.getParent(),n=n.getNext(t),o=o.isBlockBoundary()&&(!n||n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary())),!!(e^o)}};var i=/^[\t\r\n ]*(?: |\xa0)$/,o=CKEDITOR.dom.walker.whitespaces(),r=CKEDITOR.dom.walker.bookmark();CKEDITOR.dom.element.prototype.getBogus=function(){var e=this;do e=e.getPreviousSourceNode();while(r(e)||o(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$inline&&!(e.getName()in CKEDITOR.dtd.$empty));return e&&(CKEDITOR.env.ie?e.getText&&i.test(e.getText()):e.is&&e.is("br"))?e:!1}}(),CKEDITOR.dom.range=function(e){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null,this.collapsed=!0;var t=e instanceof CKEDITOR.dom.document;this.document=t?e:e.getDocument(),this.root=t?e.getBody():e},function(){function e(){var e=!1,t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(!0),i=CKEDITOR.dom.walker.bogus();return function(o){return n(o)||t(o)?!0:i(o)&&!e?e=!0:o.type==CKEDITOR.NODE_TEXT&&(o.hasAscendant("pre")||CKEDITOR.tools.trim(o.getText()).length)||o.type==CKEDITOR.NODE_ELEMENT&&!o.is(r)?!1:!0}}function t(e){var t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(1);return function(i){return n(i)||t(i)?!0:!e&&a(i)||i.type==CKEDITOR.NODE_ELEMENT&&i.is(CKEDITOR.dtd.$removeEmpty)}}function n(e){return!s(e)&&!l(e)}var i=function(e){e.collapsed=e.startContainer&&e.endContainer&&e.startContainer.equals(e.endContainer)&&e.startOffset==e.endOffset},o=function(e,t,n,i){e.optimizeBookmark();var o,r,a=e.startContainer,s=e.endContainer,l=e.startOffset,c=e.endOffset;s.type==CKEDITOR.NODE_TEXT?s=s.split(c):s.getChildCount()>0&&(c>=s.getChildCount()?(s=s.append(e.document.createText("")),r=!0):s=s.getChild(c)),a.type==CKEDITOR.NODE_TEXT?(a.split(l),a.equals(s)&&(s=a.getNext())):l?l>=a.getChildCount()?(a=a.append(e.document.createText("")),o=!0):a=a.getChild(l).getPrevious():(a=a.append(e.document.createText(""),1),o=!0);var u,d,h,l=a.getParents(),c=s.getParents();for(u=0;u0&&!f.equals(s)&&(m=g.append(f.clone())),!l[n]||f.$.parentNode!=l[n].$.parentNode)for(f=f.getPrevious();f&&(!f.equals(l[n])&&!f.equals(a));)E=f.getPrevious(),2==t?g.$.insertBefore(f.$.cloneNode(!0),g.$.firstChild):(f.remove(),1==t&&g.$.insertBefore(f.$,g.$.firstChild)),f=E;g&&(g=m)}2==t?(d=e.startContainer,d.type==CKEDITOR.NODE_TEXT&&(d.$.data=d.$.data+d.$.nextSibling.data,d.$.parentNode.removeChild(d.$.nextSibling)),e=e.endContainer,e.type==CKEDITOR.NODE_TEXT&&e.$.nextSibling&&(e.$.data=e.$.data+e.$.nextSibling.data,e.$.parentNode.removeChild(e.$.nextSibling))):(d&&h&&(a.$.parentNode!=d.$.parentNode||s.$.parentNode!=h.$.parentNode)&&(t=h.getIndex(),o&&h.$.parentNode==a.$.parentNode&&t--,i&&d.type==CKEDITOR.NODE_ELEMENT?(i=CKEDITOR.dom.element.createFromHtml(' ",this.document),o=this.clone();o.optimize(),(n=o.startContainer.type==CKEDITOR.NODE_TEXT)?(t=o.startContainer.getText(),e=o.startContainer.split(o.startOffset),i.insertAfter(o.startContainer)):o.insertNode(i),i.scrollIntoView(),n&&(o.startContainer.setText(t),e.remove()),i.remove()}}}(),CKEDITOR.POSITION_AFTER_START=1,CKEDITOR.POSITION_BEFORE_END=2,CKEDITOR.POSITION_BEFORE_START=3,CKEDITOR.POSITION_AFTER_END=4,CKEDITOR.ENLARGE_ELEMENT=1,CKEDITOR.ENLARGE_BLOCK_CONTENTS=2,CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3,CKEDITOR.ENLARGE_INLINE=4,CKEDITOR.START=1,CKEDITOR.END=2,CKEDITOR.SHRINK_ELEMENT=1,CKEDITOR.SHRINK_TEXT=2,function(){function e(e){arguments.length<1||(this.range=e,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function t(e,t,n){for(e=e.getNextSourceNode(t,null,n);!i(e);)e=e.getNextSourceNode(t,null,n);return e}var n=/^[\r\n\t ]+$/,i=CKEDITOR.dom.walker.bookmark(!1,!0),o=CKEDITOR.dom.walker.whitespaces(!0),r=function(e){return i(e)&&o(e)};e.prototype={getNextParagraph:function(e){if(e=e||"p",!CKEDITOR.dtd[this.range.root.getName()][e])return null;var o,a,s,l,c,u;if(!this._.started){if(a=this.range.clone(),a.shrink(CKEDITOR.NODE_ELEMENT,!0),l=a.endContainer.hasAscendant("pre",!0)||a.startContainer.hasAscendant("pre",!0),a.enlarge(this.forceBrBreak&&!l||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS),!a.collapsed){l=new CKEDITOR.dom.walker(a.clone());var d=CKEDITOR.dom.walker.bookmark(!0,!0);l.evaluator=d,this._.nextNode=l.next(),l=new CKEDITOR.dom.walker(a.clone()),l.evaluator=d,l=l.previous(),this._.lastNode=l.getNextSourceNode(!0),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(d=this.range.clone(),d.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),d.checkEndOfBlock()&&(d=new CKEDITOR.dom.elementPath(d.endContainer,d.root),this._.lastNode=(d.block||d.blockLimit).getNextSourceNode(!0))),this._.lastNode||(this._.lastNode=this._.docEndMarker=a.document.createText(""),this._.lastNode.insertAfter(l)),a=null}this._.started=1}for(d=this._.nextNode,l=this._.lastNode,this._.nextNode=null;d;){var h=0,f=d.hasAscendant("pre"),m=d.type!=CKEDITOR.NODE_ELEMENT,E=0;if(m)d.type==CKEDITOR.NODE_TEXT&&n.test(d.getText())&&(m=0);else{var g=d.getName();if(d.isBlockBoundary(this.forceBrBreak&&!f&&{br:1})){if("br"==g)m=1;else if(!a&&!d.getChildCount()&&"hr"!=g){o=d,s=d.equals(l);break}a&&(a.setEndAt(d,CKEDITOR.POSITION_BEFORE_START),"br"!=g&&(this._.nextNode=d)),h=1}else{if(d.getFirst()){a||(a=this.range.clone(),a.setStartAt(d,CKEDITOR.POSITION_BEFORE_START)),d=d.getFirst();continue}m=1}}if(m&&!a&&(a=this.range.clone(),a.setStartAt(d,CKEDITOR.POSITION_BEFORE_START)),s=(!h||m)&&d.equals(l),a&&!h)for(;!d.getNext(r)&&!s;){if(g=d.getParent(),g.isBlockBoundary(this.forceBrBreak&&!f&&{br:1})){h=1,m=0,s||g.equals(l),a.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);break}d=g,m=1,s=d.equals(l),E=1}if(m&&a.setEndAt(d,CKEDITOR.POSITION_AFTER_END),d=t(d,E,l),(s=!d)||h&&a)break}if(!o){if(!a)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;o=new CKEDITOR.dom.elementPath(a.startContainer,a.root),d=o.blockLimit,h={div:1,th:1,td:1},o=o.block,!o&&d&&!this.enforceRealBlocks&&h[d.getName()]&&a.checkStartOfBlock()&&a.checkEndOfBlock()&&!d.equals(a.root)?o=d:!o||this.enforceRealBlocks&&"li"==o.getName()?(o=this.range.document.createElement(e),a.extractContents().appendTo(o),o.trim(),a.insertNode(o),c=u=!0):"li"!=o.getName()?a.checkStartOfBlock()&&a.checkEndOfBlock()||(o=o.clone(!1),a.extractContents().appendTo(o),o.trim(),u=a.splitBlock(),c=!u.wasStartOfBlock,u=!u.wasEndOfBlock,a.insertNode(o)):s||(this._.nextNode=o.equals(l)?null:t(a.getBoundaryNodes().endNode,1,l))}return c&&(a=o.getPrevious())&&a.type==CKEDITOR.NODE_ELEMENT&&("br"==a.getName()?a.remove():a.getLast()&&"br"==a.getLast().$.nodeName.toLowerCase()&&a.getLast().remove()),u&&(a=o.getLast())&&a.type==CKEDITOR.NODE_ELEMENT&&"br"==a.getName()&&(CKEDITOR.env.ie||a.getPrevious(i)||a.getNext(i))&&a.remove(),this._.nextNode||(this._.nextNode=s||o.equals(l)||!l?null:t(o,1,l)),o}},CKEDITOR.dom.range.prototype.createIterator=function(){return new e(this)}}(),CKEDITOR.command=function(e,t){this.uiItems=[],this.exec=function(n){return this.state!=CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()?(this.editorFocus&&e.focus(),this.fire("exec")===!1?!0:t.exec.call(this,e,n)!==!1):!1},this.refresh=function(e,n){return!this.readOnly&&e.readOnly?!0:this.context&&!n.isContextFor(this.context)?(this.disable(),!0):(this.enable(),this.fire("refresh",{editor:e,path:n})===!1?!0:t.refresh&&t.refresh.apply(this,arguments)!==!1)};var n;this.checkAllowed=function(){return"boolean"==typeof n?n:n=e.filter.checkFeature(this)},CKEDITOR.tools.extend(this,t,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!t.context,state:CKEDITOR.TRISTATE_DISABLED}),CKEDITOR.event.call(this)},CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(e){return this.state!=e&&this.checkAllowed()?(this.previousState=this.state,this.state=e,this.fire("state"),!0):!1},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype),CKEDITOR.ENTER_P=1,CKEDITOR.ENTER_BR=2,CKEDITOR.ENTER_DIV=3,CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"",bodyId:"",bodyClass:"",fullPage:!1,height:200,extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1e4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function e(e,n,i,r,a){var s=n.name;if((r||"function"!=typeof e.elements||e.elements(s))&&(!e.match||e.match(n))){if(r=!a){e:if(e.nothingRequired)r=!0;else{if(a=e.requiredClasses)for(s=n.classes,r=0;ra;++a)l=n[a],r[l]||(r[l]=e(l));n=!1}else n=!1;i.allClasses=n}}}function t(e,t,n){if(!e)return!1;if(e===!0)return!0;for(var i in t)n[i]||(n[i]=e(i,t[i]));return!1}function n(e,t){if(!e)return!1;if(e===!0)return e;if("string"==typeof e)return e=D(e),"*"==e?!0:CKEDITOR.tools.convertArrayToObject(e.split(t));if(CKEDITOR.tools.isArray(e))return e.length?CKEDITOR.tools.convertArrayToObject(e):!1;var n,i={},o=0;for(n in e)i[n]=e[n],o++;return o?i:!1}function i(t){if(t._.filterFunction)return t._.filterFunction;var n=/^cke:(object|embed|param)$/,i=/^(object|embed|param)$/;return t._.filterFunction=function(o,r,a,s,d,h,f){var m,g=o.name,T=!1;if(d&&(o.name=g=g.replace(n,"$1")),a=a&&a[g]){for(l(o),g=0;gg;++g)e(a[g],o,r,!0,h);if(p)for(g=0,m=p.length;m>g;++g)e(p[g],o,r,!1,h);if(!r.valid)return s.push(o),!0;h=r.validAttributes,g=r.validStyles,a=r.validClasses,m=o.attributes;var C,I,p=o.styles,O=m["class"],D=m.style,R=[],v=[],b=/^data-cke-/,K=!1;if(delete m.style,delete m["class"],!r.allAttributes)for(C in m)h[C]||(b.test(C)?C==(I=C.replace(/^data-cke-saved-/,""))||h[I]||(delete m[C],K=!0):(delete m[C],K=!0));if(r.allStyles)D&&(m.style=D);else{for(C in p)g[C]?R.push(C+":"+p[C]):K=!0;R.length&&(m.style=R.sort().join("; "))}if(r.allClasses)O&&(m["class"]=O);else{for(C in a)a[C]&&v.push(C);v.length&&(m["class"]=v.sort().join(" ")),O&&v.lengtha;++a)if(r=i[a],r.type==CKEDITOR.NODE_ELEMENT&&!o[r.name]){o=!1;break e}o=!0}if(o)e.name=t,e.attributes={},n.push({check:"parent-down",el:e});else{o=e.parent;for(var l,a=o.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==o.name,s=i.length;s>0;)r=i[--s],a&&(r.type==CKEDITOR.NODE_TEXT||r.type==CKEDITOR.NODE_ELEMENT&&I.$inline[r.name])?(l||(l=new CKEDITOR.htmlParser.element(t),l.insertAfter(e),n.push({check:"parent-down",el:l})),l.add(r,0)):(l=null,r.insertAfter(e),o.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&r.type==CKEDITOR.NODE_ELEMENT&&!I[o.name][r.name]&&n.push({check:"el-up",el:r}));e.remove()}}else"style"==i?e.remove():(e.parent&&n.push({check:"it",el:e.parent}),e.replaceWithChildren())}function E(e,t,n){var i,o;for(i=0;ir;++r){c=O(i[r]),u=c.classes===!0||c.styles===!0||c.attributes===!0,h=c,f=void 0;for(f in v)h[f]=d(h[f]);m=!0;for(f in b)f=b[f],h[f]=CKEDITOR.tools.objectKeys(h[f]),h[f]&&(m=!1);if(h.nothingRequired=m,c.elements===!0||null===c.elements)c.elements=d(c.elements),e[u?"unshift":"push"](c);else{h=c.elements,delete c.elements;for(o in h)s[o]?s[o][u?"unshift":"push"](c):s[o]=[c]}}return t.elements=s,t.generic=e.length?e:null,!0},applyTo:function(e,t,n){var o=[],r=!n&&this._.rules,a=this._.transformations,s=i(this),l=this.editor&&this.editor.config.protectedSource,c=!1;e.forEach(function(e){if(e.type==CKEDITOR.NODE_ELEMENT)t&&"span"==e.name&&~CKEDITOR.tools.objectKeys(e.attributes).join("|").indexOf("data-cke-")||s(e,r,a,o,t)&&(c=!0);else if(e.type==CKEDITOR.NODE_COMMENT&&e.value.match(/^\{cke_protected\}(?!\{C\})/)){var n;e:{var i=decodeURIComponent(e.value.replace(/^\{cke_protected\}/,""));n=[];var u,d,h;if(l)for(d=0;d",l in this._.cachedChecks)return this._.cachedChecks[l];o=a(e).$1,s=o.styles;var u=o.classes;o.name=o.elements,o.classes=u=u?u.split(/\s*,\s*/):[],o.styles=r(s),o.attributes=r(o.attributes),o.children=[],u.length&&(o.attributes["class"]=u.join(" ")),s&&(o.attributes.style=CKEDITOR.tools.writeCssText(o.styles)),s=o}else o=e.getDefinition(),s=o.styles,u=o.attributes||{},s?(s=O(s),u.style=CKEDITOR.tools.writeCssText(s,!0)):s={},s={name:o.element,attributes:u,classes:u["class"]?u["class"].split(/\s+/):[],styles:s,children:[]};var d,u=CKEDITOR.tools.clone(s),h=[];if(t!==!1&&(d=this._.transformations[s.name])){for(o=0;o0?!1:CKEDITOR.tools.objectCompare(s.attributes,u.attributes,!0)?!0:!1,"string"==typeof e&&(this._.cachedChecks[l]=t),t}};var v={styles:1,attributes:1,classes:1},b={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},K=/^([a-z0-9*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,_={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},y=CKEDITOR.filter.transformationsTools={sizeToStyle:function(e){this.lengthToStyle(e,"width"),this.lengthToStyle(e,"height")},sizeToAttribute:function(e){this.lengthToAttribute(e,"width"),this.lengthToAttribute(e,"height")},lengthToStyle:function(e,t,n){if(n=n||t,!(n in e.styles)){var i=e.attributes[t];i&&(/^\d+$/.test(i)&&(i+="px"),e.styles[n]=i)}delete e.attributes[t]},lengthToAttribute:function(e,t,n){if(n=n||t,!(n in e.attributes)){var i=e.styles[t],o=i&&i.match(/^(\d+)(?:\.\d*)?px$/);o?e.attributes[n]=o[1]:i==R&&(e.attributes[n]=R)}delete e.styles[t]},alignmentToStyle:function(e){if(!("float"in e.styles)){var t=e.attributes.align;("left"==t||"right"==t)&&(e.styles["float"]=t)}delete e.attributes.align},alignmentToAttribute:function(e){if(!("align"in e.attributes)){var t=e.styles["float"];("left"==t||"right"==t)&&(e.attributes.align=t)}delete e.styles["float"]},matchesStyle:g,transform:function(e,t){if("string"==typeof t)e.name=t;else{var n,i,o,r,a=t.getDefinition(),s=a.styles,l=a.attributes;e.name=a.element;for(n in l)if("class"==n)for(a=e.classes.join("|"),o=l[n].split(/\s+/);r=o.pop();)-1==a.indexOf(r)&&e.classes.push(r);else e.attributes[n]=l[n];for(i in s)e.styles[i]=s[i]}}}}(),function(){CKEDITOR.focusManager=function(e){return e.focusManager?e.focusManager:(this.hasFocus=!1,this.currentActive=null,this._={editor:e},this)},CKEDITOR.focusManager._={blurDelay:200},CKEDITOR.focusManager.prototype={focus:function(){if(this._.timer&&clearTimeout(this._.timer),!this.hasFocus&&!this._.locked){var e=CKEDITOR.currentInstance;e&&e.focusManager.blur(1),this.hasFocus=!0,(e=this._.editor.container)&&e.addClass("cke_focus"),this._.editor.fire("focus")}},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(e){function t(){if(this.hasFocus){this.hasFocus=!1;var e=this._.editor.container;e&&e.removeClass("cke_focus"),this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var n=CKEDITOR.focusManager._.blurDelay;e||!n?t.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer,t.call(this)},n,this)}},add:function(e,t){var n=e.getCustomData("focusmanager");if(!n||n!=this){n&&n.remove(e);var n="focus",i="blur";t&&(CKEDITOR.env.ie?(n="focusin",i="focusout"):CKEDITOR.event.useCapture=1);var o={blur:function(){e.equals(this.currentActive)&&this.blur()},focus:function(){this.currentActive=e,this.focus()}};e.on(n,o.focus,this),e.on(i,o.blur,this),t&&(CKEDITOR.event.useCapture=0),e.setCustomData("focusmanager",this),e.setCustomData("focusmanager_handlers",o)}},remove:function(e){e.removeCustomData("focusmanager");var t=e.removeCustomData("focusmanager_handlers");e.removeListener("blur",t.blur),e.removeListener("focus",t.focus)}}}(),CKEDITOR.keystrokeHandler=function(e){return e.keystrokeHandler?e.keystrokeHandler:(this.keystrokes={},this.blockedKeystrokes={},this._={editor:e},this)},function(){var e,t=function(t){var t=t.data,n=t.getKeystroke(),i=this.keystrokes[n],o=this._.editor;return e=o.fire("key",{keyCode:n})===!1,e||(i&&(e=o.execCommand(i,{from:"keystrokeHandler"})!==!1),e||(e=!!this.blockedKeystrokes[n])),e&&t.preventDefault(!0),!e},n=function(t){e&&(e=!1,t.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(e){e.on("keydown",t,this),(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)&&e.on("keypress",n,this)}}}(),function(){CKEDITOR.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},load:function(e,t,n){e&&CKEDITOR.lang.languages[e]||(e=this.detect(t,e)),this[e]?n(e,this[e]):CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+e+".js"),function(){n(e,this[e])},this)},detect:function(e,t){var n=this.languages,t=t||navigator.userLanguage||navigator.language||e,i=t.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),o=i[1],i=i[2];return n[o+"-"+i]?o=o+"-"+i:n[o]||(o=null),CKEDITOR.lang.detect=o?function(){return o}:function(e){return e},o||e}}}(),CKEDITOR.scriptLoader=function(){var e={},t={};return{load:function(n,i,o,r){var a="string"==typeof n;a&&(n=[n]),o||(o=CKEDITOR);var s=n.length,l=[],c=[],u=function(e){i&&(a?i.call(o,e):i.call(o,l,c))};if(0===s)u(!0);else{var d=function(e,t){(t?l:c).push(e),--s<=0&&(r&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),u(t))},h=function(n,i){e[n]=1;var o=t[n];delete t[n];for(var r=0;r1)){var r=new CKEDITOR.dom.element("script");r.setAttributes({type:"text/javascript",src:n}),i&&(CKEDITOR.env.ie?r.$.onreadystatechange=function(){("loaded"==r.$.readyState||"complete"==r.$.readyState)&&(r.$.onreadystatechange=null,h(n,!0))}:(r.$.onload=function(){setTimeout(function(){h(n,!0)},0)},r.$.onerror=function(){h(n,!1)})),r.appendTo(CKEDITOR.document.getHead())}}};r&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var m=0;s>m;m++)f(n[m])}},queue:function(){function e(){var e;(e=t[0])&&this.load(e.scriptUrl,e.callback,CKEDITOR,0)}var t=[];return function(n,i){var o=this;t.push({scriptUrl:n,callback:function(){i&&i.apply(this,arguments),t.shift(),e.call(o)}}),1==t.length&&e.call(this)}}()}}(),CKEDITOR.resourceManager=function(e,t){this.basePath=e,this.fileName=t,this.registered={},this.loaded={},this.externals={},this._={waitingList:{}}},CKEDITOR.resourceManager.prototype={add:function(e,t){if(this.registered[e])throw'[CKEDITOR.resourceManager.add] The resource name "'+e+'" is already registered.';var n=this.registered[e]=t||{};return n.name=e,n.path=this.getPath(e),CKEDITOR.fire(e+CKEDITOR.tools.capitalize(this.fileName)+"Ready",n),this.get(e)},get:function(e){return this.registered[e]||null},getPath:function(e){var t=this.externals[e];return CKEDITOR.getUrl(t&&t.dir||this.basePath+e+"/")},getFilePath:function(e){var t=this.externals[e];return CKEDITOR.getUrl(this.getPath(e)+(t&&"string"==typeof t.file?t.file:this.fileName+".js"))},addExternal:function(e,t,n){for(var e=e.split(","),i=0;i=0?d=e.langCode:(d=e.langCode.replace(/-.*/,""),d=d!=e.langCode&&CKEDITOR.tools.indexOf(u,d)>=0?d:CKEDITOR.tools.indexOf(u,"en")>=0?"en":u[0]),c.langEntries&&c.langEntries[d]?(e.lang[s]=c.langEntries[d],d=null):r.push(CKEDITOR.getUrl(c.path+"lang/"+d+".js"))),o.push(d),i.push(c)}CKEDITOR.scriptLoader.load(r,function(){for(var n=["beforeInit","init","afterInit"],r=0;r]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))","g")}},function(){var e=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,t={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(n){for(var i,o,r,a=0;i=this._.htmlPartsRegex.exec(n);)if(o=i.index,o>a&&(a=n.substring(a,o),r?r.push(a):this.onText(a)),a=this._.htmlPartsRegex.lastIndex,!(o=i[1])||(o=o.toLowerCase(),r&&CKEDITOR.dtd.$cdata[o]&&(this.onCDATA(r.join("")),r=null),r))if(r)r.push(i[0]);else if(o=i[3]){if(o=o.toLowerCase(),!/="/.test(o)){var s,l={};i=i[4];var c=!(!i||"/"!=i.charAt(i.length-1));if(i)for(;s=e.exec(i);){var u=s[1].toLowerCase();s=s[2]||s[3]||s[4]||"",l[u]=!s&&t[u]?u:s}this.onTagOpen(o,l,c),!r&&CKEDITOR.dtd.$cdata[o]&&(r=[])}}else(o=i[2])&&this.onComment(o);else this.onTagClose(o);n.length>a&&this.onText(n.substring(a,n.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(e){this._.output.push("<",e)},openTagClose:function(e,t){this._.output.push(t?" />":">")},attribute:function(e,t){"string"==typeof t&&(t=CKEDITOR.tools.htmlEncodeAttr(t)),this._.output.push(" ",e,'="',t,'"')},closeTag:function(e){this._.output.push("",e,">")},text:function(e){this._.output.push(e)},comment:function(e){this._.output.push("")},write:function(e){this._.output.push(e)},reset:function(){this._.output=[],this._.indent=!1},getHtml:function(e){var t=this._.output.join("");return e&&this.reset(),t}}}),function(){CKEDITOR.htmlParser.node=function(){},CKEDITOR.htmlParser.node.prototype={remove:function(){var e=this.parent.children,t=CKEDITOR.tools.indexOf(e,this),n=this.previous,i=this.next;n&&(n.next=i),i&&(i.previous=n),e.splice(t,1),this.parent=null},replaceWith:function(e){var t=this.parent.children,n=CKEDITOR.tools.indexOf(t,this),i=e.previous=this.previous,o=e.next=this.next;i&&(i.next=e),o&&(o.previous=e),t[n]=e,e.parent=this.parent,this.parent=null},insertAfter:function(e){var t=e.parent.children,n=CKEDITOR.tools.indexOf(t,e),i=e.next;t.splice(n+1,0,this),this.next=e.next,this.previous=e,e.next=this,i&&(i.previous=this),this.parent=e.parent},insertBefore:function(e){var t=e.parent.children,n=CKEDITOR.tools.indexOf(t,e);t.splice(n,0,this),this.next=e,(this.previous=e.previous)&&(e.previous.next=this),e.previous=this,this.parent=e.parent}}}(),CKEDITOR.htmlParser.comment=function(e){this.value=e,this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(e){var t=this.value;return(t=e.onComment(t,this))?"string"!=typeof t?(this.replaceWith(t),!1):(this.value=t,!0):(this.remove(),!1)},writeHtml:function(e,t){t&&this.filter(t),e.comment(this.value)}}),function(){CKEDITOR.htmlParser.text=function(e){this.value=e,this._={isBlockLike:!1}},CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(e){return(this.value=e.onText(this.value,this))?void 0:(this.remove(),!1)},writeHtml:function(e,t){t&&this.filter(t),e.text(this.value)}})}(),function(){CKEDITOR.htmlParser.cdata=function(e){this.value=e},CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(e){e.write(this.value)}})}(),CKEDITOR.htmlParser.fragment=function(){this.children=[],this.parent=null,this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function e(e){return"a"==e.name&&e.attributes.href||CKEDITOR.dtd.$removeEmpty[e.name]}var t=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),n={ol:1,ul:1},i=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1});CKEDITOR.htmlParser.fragment.fromHtml=function(o,r,a){function s(e){var t;if(E.length>0)for(var n=0;n=0;t--)if(e==E[t].name)return void E.splice(t,1);for(var n=[],i=[],o=T;o!=m&&o.name!=e;)o._.isBlockLike||i.unshift(o),n.push(o),o=o.returnPoint||o.parent;if(o!=m){for(t=0;t0?this.children[t-1]:null;if(n){if(e._.isBlockLike&&n.type==CKEDITOR.NODE_TEXT&&(n.value=CKEDITOR.tools.rtrim(n.value),0===n.value.length))return this.children.pop(),void this.add(e);n.next=e}e.previous=n,e.parent=this,this.children.splice(t,0,e),this._.hasInlineStarted||(this._.hasInlineStarted=e.type==CKEDITOR.NODE_TEXT||e.type==CKEDITOR.NODE_ELEMENT&&!e._.isBlockLike)},filter:function(e){e.onRoot(this),this.filterChildren(e)},filterChildren:function(e,t){if(this.childrenFilteredBy!=e.id){t&&!this.parent&&e.onRoot(this),this.childrenFilteredBy=e.id;for(var n=0;nt;t++)n[t].writeHtml(e)},forEach:function(e,t,n){!n&&(!t||this.type==t)&&e(this);for(var i,n=this.children,o=0,r=n.length;r>o;o++)i=n[o],i.type==CKEDITOR.NODE_ELEMENT?i.forEach(e,t):(!t||i.type==t)&&e(i)}}}(),function(){function e(e,t){for(var n=0;e&&ni&&e[i].pri<=n;i++);for(o=r-1;o>=0;o--)(r=t[o])&&(r.pri=n,e.splice(i,0,r))}}function n(e,t,n){if(t)for(var o in t){var r=e[o];e[o]=i(r,t[o],n),r||e.$length++}}function i(e,n,i){return n?(n.pri=i,e?(e.splice?t(e,n,i):(e=e.pri>i?[n,e]:[e,n],e.filter=o),e):n.filter=n):void 0}function o(e){for(var t=e.type||e instanceof CKEDITOR.htmlParser.fragment,n=0;ni;i++)if(t=n[i]){if(t=t.filter(e,this),t===!1)return null;if(t&&t!=e)return this.onNode(t);if(e.parent&&!e.name)break}return e},onNode:function(e){var t=e.type;return t==CKEDITOR.NODE_ELEMENT?this.onElement(e):t==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(e.value)):t==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(e.value)):null},onAttribute:function(e,t,n){if(t=this._.attributes[t]){if(e=t.filter(n,e,this),e===!1)return!1;if("undefined"!=typeof e)return e}return n}}})}(),function(){function e(e,t){function c(e){return e||CKEDITOR.env.ie?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function u(e,t){return function(o){if(o.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var a,s,u=[],h=n(o);if(h)for(d(h,1)&&u.push(h);h;){if(r(h)&&(a=i(h))&&d(a))if((s=i(a))&&!r(s))u.push(a);else{var f=a,E=c(m),g=f.parent.children,T=CKEDITOR.tools.indexOf(g,f);g.splice(T+1,0,E),g=f.next,f.next=E,E.previous=f,E.parent=f.parent,E.next=g,l(a)}h=h.previous}for(h=0;h7||o.name in CKEDITOR.dtd.tr||o.name in CKEDITOR.dtd.$listItem)?u=!1:(u=n(o),u=!u||"form"==o.name&&"input"==u.name)),u&&o.add(c(e))}}}function d(e,t){if(!(m&&CKEDITOR.env.ie||e.type!=CKEDITOR.NODE_ELEMENT||"br"!=e.name||e.attributes["data-cke-eol"]))return!0;var n;if(e.type==CKEDITOR.NODE_TEXT&&(n=e.value.match(C))){if(n.index&&(a(e,new CKEDITOR.htmlParser.text(e.value.substring(0,n.index))),e.value=n[0]),CKEDITOR.env.ie&&m&&(!t||e.parent.name in E))return!0;if(!m&&((n=e.previous)&&"br"==n.name||!n||r(n)))return!0}return!1}var h,f={elements:{}},m="html"==t,E=CKEDITOR.tools.extend({},R);for(h in E)"#"in O[h]||delete E[h];for(h in E)f.elements[h]=u(m,e.config.fillEmptyBlocks!==!1);return f.root=u(m),f.elements.br=function(e){return function(t){if(t.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var n=t.attributes;if("data-cke-bogus"in n||"data-cke-eol"in n)delete n["data-cke-bogus"];else{for(n=t.next;n&&o(n);)n=n.next;var l=i(t);!n&&r(t.parent)?s(t.parent,c(e)):r(n)&&l&&!r(l)&&a(n,c(e))}}}}(m),f}function t(e){return e.enterMode!=CKEDITOR.ENTER_BR&&e.autoParagraph!==!1?e.enterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function n(e){for(e=e.children[e.children.length-1];e&&o(e);)e=e.previous;return e}function i(e){for(e=e.previous;e&&o(e);)e=e.previous;return e}function o(e){return e.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(e.value)||e.type==CKEDITOR.NODE_ELEMENT&&e.attributes["data-cke-bookmark"]}function r(e){return e&&(e.type==CKEDITOR.NODE_ELEMENT&&e.name in R||e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function a(e,t){var n=e.parent.children,i=CKEDITOR.tools.indexOf(n,e);n.splice(i,0,t),n=e.previous,e.previous=t,t.next=e,t.parent=e.parent,n&&(t.previous=n,n.next=t)}function s(e,t){var n=e.children[e.children.length-1];e.children.push(t),t.parent=e,n&&(n.next=t,t.previous=n)}function l(e){var t=e.parent.children,n=CKEDITOR.tools.indexOf(t,e),i=e.previous,e=e.next;i&&(i.next=e),e&&(e.previous=i),t.splice(n,1)}function c(e){var t=e.parent;return t?CKEDITOR.tools.indexOf(t.children,e):-1}function u(e){e=e.attributes,"false"!=e.contenteditable&&(e["data-cke-editable"]=e.contenteditable?"true":1),e.contenteditable="false"}function d(e){switch(e=e.attributes,e["data-cke-editable"]){case"true":e.contenteditable="true";break;case"1":delete e.contenteditable}}function h(e){return e.replace(_,function(e,t,n){return"<"+t+n.replace(y,function(e,t){return/^on/.test(t)||-1!=n.indexOf("data-cke-saved-"+t)?e:(e=e.slice(1)," data-cke-saved-"+e+" data-cke-"+CKEDITOR.rnd+"-"+e)})+">"})}function f(e,t){return e.replace(t,function(e,t,n){return 0===e.indexOf("/g,">")+""),""+encodeURIComponent(e)+" "})}function m(e){return e.replace(w,function(e,t){return decodeURIComponent(t)})}function E(e){return e.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,function(e){return""})}function g(e){return e.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(e,t){return decodeURIComponent(t)})}function T(e,t){var n=t._.dataStore;return e.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(e,t){return decodeURIComponent(t)}).replace(/\{cke_protected_(\d+)\}/g,function(e,t){return n&&n[t]||""})}function p(e,t){for(var n=[],i=t.config.protectedSource,o=t._.dataStore||(t._.dataStore={id:1}),r=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,i=[/"].join("")),n.$.close(),e=0;et-e;n--)if(this._.tabs[this._.tabIdList[n%e]][0].$.offsetHeight)return this._.tabIdList[n%e];return null}function t(){for(var e=this._.tabIdList.length,t=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),n=t+1;t+e>n;n++)if(this._.tabs[this._.tabIdList[n%e]][0].$.offsetHeight)return this._.tabIdList[n%e];return null}function n(e,t){for(var n=e.$.getElementsByTagName("input"),i=0,o=n.length;o>i;i++){var r=new CKEDITOR.dom.element(n[i]);"text"==r.getAttribute("type").toLowerCase()&&(t?(r.setAttribute("value",r.getCustomData("fake_value")||""),r.removeCustomData("fake_value")):(r.setCustomData("fake_value",r.getAttribute("value")),r.setAttribute("value","")))}}function i(e,t){var n=this.getInputElement();n&&(e?n.removeAttribute("aria-invalid"):n.setAttribute("aria-invalid",!0)),e||(this.select?this.select():this.focus()),t&&alert(t),this.fire("validated",{valid:e,msg:t})}function o(){var e=this.getInputElement();e&&e.removeAttribute("aria-invalid")}function r(e){var e=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",E).output({id:CKEDITOR.tools.getNextNumber(),editorId:e.id,langDir:e.lang.dir,langCode:e.langCode,editorDialogClass:"cke_editor_"+e.name.replace(/\./g,"\\.")+"_dialog",closeTitle:e.lang.common.close,hidpi:CKEDITOR.env.hidpi?"cke_hidpi":""})),t=e.getChild([0,0,0,0,0]),n=t.getChild(0),i=t.getChild(1);if(CKEDITOR.env.ie&&!CKEDITOR.env.ie6Compat){var o="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())";CKEDITOR.dom.element.createFromHtml('').appendTo(t.getParent())}return n.unselectable(),i.unselectable(),{element:e,parts:{dialog:e.getChild(0),title:n,close:i,tabs:t.getChild(2),contents:t.getChild([3,0,0,0]),footer:t.getChild([3,0,1,0])}}}function a(e,t,n){this.element=t,this.focusIndex=n,this.tabIndex=0,this.isFocusable=function(){return!t.getAttribute("disabled")&&t.isVisible()},this.focus=function(){e._.currentFocusIndex=this.focusIndex,this.element.focus()},t.on("keydown",function(e){e.data.getKeystroke()in{32:1,13:1}&&this.fire("click")}),t.on("focus",function(){this.fire("mouseover")}),t.on("blur",function(){this.fire("mouseout")})}function s(e){function t(){e.layout()}var n=CKEDITOR.document.getWindow();n.on("resize",t),e.on("hide",function(){n.removeListener("resize",t)})}function l(e,t){this._={dialog:e},CKEDITOR.tools.extend(this,t)}function c(e){function t(t){var n=e.getSize(),l=CKEDITOR.document.getWindow().getViewPaneSize(),c=t.data.$.screenX,u=t.data.$.screenY,d=c-i.x,h=u-i.y;i={x:c,y:u},o.x+=d,o.y+=h,e.move(o.x+s[3]l.width-n.width-a?l.width-n.width+("rtl"==r.lang.dir?0:s[1]):o.x,o.y+s[0]l.height-n.height-a?l.height-n.height+s[2]:o.y,1),t.data.preventDefault()}function n(){if(CKEDITOR.document.removeListener("mousemove",t),CKEDITOR.document.removeListener("mouseup",n),CKEDITOR.env.ie6Compat){var e=D.getChild(0).getFrameDocument();e.removeListener("mousemove",t),e.removeListener("mouseup",n)}}var i=null,o=null;e.getElement().getFirst();var r=e.getParentEditor(),a=r.config.dialog_magnetDistance,s=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof a&&(a=20),e.parts.title.on("mousedown",function(r){if(i={x:r.data.$.screenX,y:r.data.$.screenY},CKEDITOR.document.on("mousemove",t),CKEDITOR.document.on("mouseup",n),o=e.getPosition(),CKEDITOR.env.ie6Compat){var a=D.getChild(0).getFrameDocument();a.on("mousemove",t),a.on("mouseup",n)}r.data.preventDefault()},e)}function u(e){function t(t){var n="rtl"==h.lang.dir,d=u.width,f=u.height,m=d+(t.data.$.screenX-i)*(n?-1:1)*(e._.moved?1:2),E=f+(t.data.$.screenY-o)*(e._.moved?1:2),g=e._.element.getFirst(),g=n&&g.getComputedStyle("right"),T=e.getPosition();T.y+E>c.height&&(E=c.height-T.y),(n?g:T.x)+m>c.width&&(m=c.width-(n?g:T.x)),(a==CKEDITOR.DIALOG_RESIZE_WIDTH||a==CKEDITOR.DIALOG_RESIZE_BOTH)&&(d=Math.max(r.minWidth||0,m-s)),(a==CKEDITOR.DIALOG_RESIZE_HEIGHT||a==CKEDITOR.DIALOG_RESIZE_BOTH)&&(f=Math.max(r.minHeight||0,E-l)),e.resize(d,f),e._.moved||e.layout(),t.data.preventDefault()}function n(){if(CKEDITOR.document.removeListener("mouseup",n),CKEDITOR.document.removeListener("mousemove",t),d&&(d.remove(),d=null),CKEDITOR.env.ie6Compat){var e=D.getChild(0).getFrameDocument();e.removeListener("mouseup",n),e.removeListener("mousemove",t)}}var i,o,r=e.definition,a=r.resizable;if(a!=CKEDITOR.DIALOG_RESIZE_NONE){var s,l,c,u,d,h=e.getParentEditor(),f=CKEDITOR.tools.addFunction(function(r){u=e.getSize();var a=e.parts.contents;a.$.getElementsByTagName("iframe").length&&(d=CKEDITOR.dom.element.createFromHtml(''),a.append(d)),l=u.height-e.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.opera||CKEDITOR.env.ie&&CKEDITOR.env.quirks)),s=u.width-e.parts.contents.getSize("width",1),i=r.screenX,o=r.screenY,c=CKEDITOR.document.getWindow().getViewPaneSize(),CKEDITOR.document.on("mousemove",t),CKEDITOR.document.on("mouseup",n),CKEDITOR.env.ie6Compat&&(a=D.getChild(0).getFrameDocument(),a.on("mousemove",t),a.on("mouseup",n)),r.preventDefault&&r.preventDefault()});e.on("load",function(){var t="";a==CKEDITOR.DIALOG_RESIZE_WIDTH?t=" cke_resizer_horizontal":a==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(t=" cke_resizer_vertical"),t=CKEDITOR.dom.element.createFromHtml(''+("ltr"==h.lang.dir?"◢":"◣")+""),e.parts.footer.append(t,1)}),h.on("destroy",function(){CKEDITOR.tools.removeFunction(f)})}}function d(e){e.data.preventDefault(1)}function h(e){var t=CKEDITOR.document.getWindow(),n=e.config,i=n.dialog_backgroundCoverColor||"white",o=n.dialog_backgroundCoverOpacity,r=n.baseFloatZIndex,n=CKEDITOR.tools.genKey(i,o,r),a=R[n];a?a.show():(r=[''],CKEDITOR.env.ie6Compat&&(i="",r.push('')),r.push(""),a=CKEDITOR.dom.element.createFromHtml(r.join("")),a.setOpacity(void 0!=o?o:.5),a.on("keydown",d),a.on("keypress",d),a.on("keyup",d),a.appendTo(CKEDITOR.document.getBody()),R[n]=a),e.focusManager.add(a),D=a;var e=function(){var e=t.getViewPaneSize();a.setStyles({width:e.width+"px",height:e.height+"px"})},s=function(){var e=t.getScrollPosition(),n=CKEDITOR.dialog._.currentTop;
if(a.setStyles({left:e.x+"px",top:e.y+"px"}),n)do e=n.getPosition(),n.move(e.x,e.y);while(n=n._.parentDialog)};if(O=e,t.on("resize",e),e(),(!CKEDITOR.env.mac||!CKEDITOR.env.webkit)&&a.focus(),CKEDITOR.env.ie6Compat){var l=function(){s(),arguments.callee.prevScrollHandler.apply(this,arguments)};t.$.setTimeout(function(){l.prevScrollHandler=window.onscroll||function(){},window.onscroll=l},0),s()}}function f(e){D&&(e.focusManager.remove(D),e=CKEDITOR.document.getWindow(),D.hide(),e.removeListener("resize",O),CKEDITOR.env.ie6Compat&&e.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),O=null)}var m=CKEDITOR.tools.cssLength,E='';CKEDITOR.dialog=function(n,a){function s(){var e=R._.focusList;e.sort(function(e,t){return e.tabIndex!=t.tabIndex?t.tabIndex-e.tabIndex:e.focusIndex-t.focusIndex});for(var t=e.length,n=0;t>n;n++)e[n].focusIndex=n}function l(e){var t=R._.focusList,e=e||0;if(!(1>t.length)){var n=R._.currentFocusIndex;try{t[n].getInputElement().$.blur()}catch(i){}for(var o=n=(n+e+t.length)%t.length;e&&!t[o].isFocusable()&&(o=(o+e+t.length)%t.length,!(o==n)););t[o].focus(),"text"==t[o].type&&t[o].select()}}function d(i){if(R==CKEDITOR.dialog._.currentTop){var o=i.data.getKeystroke(),r="rtl"==n.lang.dir;if(f=m=0,9==o||o==CKEDITOR.SHIFT+9)o=o==CKEDITOR.SHIFT+9,R._.tabBarMode?(o=o?e.call(R):t.call(R),R.selectPage(o),R._.tabs[o][0].focus()):l(o?-1:1),f=1;else if(o==CKEDITOR.ALT+121&&!R._.tabBarMode&&10?t:0)+"px"},t[o?"right":"left"]=(e>0?e:0)+"px",i.setStyles(t),n&&(this._.moved=1))},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var e=this._.element,t=this.definition;if(e.getParent()&&e.getParent().equals(CKEDITOR.document.getBody())?e.setStyle("display","block"):e.appendTo(CKEDITOR.document.getBody()),CKEDITOR.env.gecko&&10900>CKEDITOR.env.version){var n=this.parts.dialog;n.setStyle("position","absolute"),setTimeout(function(){n.setStyle("position","fixed")},0)}this.resize(this._.contentSize&&this._.contentSize.width||t.width||t.minWidth,this._.contentSize&&this._.contentSize.height||t.height||t.minHeight),this.reset(),this.selectPage(this.definition.contents[0].id),null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex),this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10),null===CKEDITOR.dialog._.currentTop?(CKEDITOR.dialog._.currentTop=this,this._.parentDialog=null,h(this._.editor)):(this._.parentDialog=CKEDITOR.dialog._.currentTop,this._.parentDialog.getElement().getFirst().$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2),CKEDITOR.dialog._.currentTop=this),e.on("keydown",b),e.on(CKEDITOR.env.opera?"keypress":"keyup",K),this._.hasFocus=!1,CKEDITOR.tools.setTimeout(function(){this.layout(),s(this),this.parts.dialog.setStyle("visibility",""),this.fireOnce("load",{}),CKEDITOR.ui.fire("ready",this),this.fire("show",{}),this._.editor.fire("dialogShow",this),this._.parentDialog||this._.editor.focusManager.lock(),this.foreach(function(e){e.setInitValue&&e.setInitValue()})},100,this)},layout:function(){var e=this.parts.dialog,t=this.getSize(),n=CKEDITOR.document.getWindow().getViewPaneSize(),i=(n.width-t.width)/2,o=(n.height-t.height)/2;CKEDITOR.env.ie6Compat||(t.height+(o>0?o:0)>n.height||t.width+(i>0?i:0)>n.width?e.setStyle("position","absolute"):e.setStyle("position","fixed")),this.move(this._.moved?this._.position.x:i,this._.moved?this._.position.y:o)},foreach:function(e){for(var t in this._.contents)for(var n in this._.contents[t])e.call(this,this._.contents[t][n]);return this},reset:function(){var e=function(e){e.reset&&e.reset(1)};return function(){return this.foreach(e),this}}(),setupContent:function(){var e=arguments;this.foreach(function(t){t.setup&&t.setup.apply(t,e)})},commitContent:function(){var e=arguments;this.foreach(function(t){CKEDITOR.env.ie&&this._.currentFocusIndex==t.focusIndex&&t.getInputElement().$.blur(),t.commit&&t.commit.apply(t,e)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{}),this._.editor.fire("dialogHide",this),this.selectPage(this._.tabIdList[0]);var e=this._.element;for(e.setStyle("display","none"),this.parts.dialog.setStyle("visibility","hidden"),y(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var t=this._.parentDialog.getElement().getFirst();t.setStyle("z-index",parseInt(t.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else f(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null,e.removeListener("keydown",b),e.removeListener(CKEDITOR.env.opera?"keypress":"keyup",K);var n=this._.editor;n.focus(),setTimeout(function(){n.focusManager.unlock()},0)}delete this._.parentDialog,this.foreach(function(e){e.resetInitValue&&e.resetInitValue()})}},addPage:function(e){if(!e.requiredContent||this._.editor.filter.check(e.requiredContent)){for(var t=[],n=e.label?' title="'+CKEDITOR.tools.htmlEncode(e.label)+'"':"",i=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:e.elements,expand:!!e.expand,padding:e.padding,style:e.style||"width: 100%;"},t),o=this._.contents[e.id]={},r=i.getChild(),a=0;i=r.shift();)!i.notAllowed&&"hbox"!=i.type&&"vbox"!=i.type&&a++,o[i.id]=i,"function"==typeof i.getChild&&r.push.apply(r,i.getChild());a||(e.hidden=!0),t=CKEDITOR.dom.element.createFromHtml(t.join("")),t.setAttribute("role","tabpanel"),i=CKEDITOR.env,o="cke_"+e.id+"_"+CKEDITOR.tools.getNextNumber(),n=CKEDITOR.dom.element.createFromHtml(['=0;i--)(n[i].dialog==e||n[i].uiElement==e)&&n.splice(i,1);0===n.length&&delete v[t]}},k=function(e,t){e._.accessKeyMap[t]&&e.selectPage(e._.accessKeyMap[t])},N=function(){};!function(){CKEDITOR.ui.dialog={uiElement:function(e,t,n,i,o,r,a){if(!(4>arguments.length)){var s=(i.call?i(t):i)||"div",l=["<",s," "],c=(o&&o.call?o(t):o)||{},u=(r&&r.call?r(t):r)||{},d=(a&&a.call?a.call(this,e,t):a)||"",h=this.domId=u.id||CKEDITOR.tools.getNextId()+"_uiElement";this.id=t.id,t.requiredContent&&!e.getParentEditor().filter.check(t.requiredContent)&&(c.display="none",this.notAllowed=!0),u.id=h;var f={};t.type&&(f["cke_dialog_ui_"+t.type]=1),t.className&&(f[t.className]=1),t.disabled&&(f.cke_disabled=1);for(var m=u["class"]&&u["class"].split?u["class"].split(" "):[],h=0;h=0;h--)""===f[h]&&f.splice(h,1);0",d,"",s,">"),n.push(l.join("")),(this._||(this._={})).dialog=e,"boolean"==typeof t.isChanged&&(this.isChanged=function(){return t.isChanged}),"function"==typeof t.isChanged&&(this.isChanged=t.isChanged),"function"==typeof t.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(e){return function(n){e.call(this,t.setValue.call(this,n))}})),"function"==typeof t.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,function(e){return function(){return t.getValue.call(this,e.call(this))}})),CKEDITOR.event.implementOn(this),this.registerEvents(t),this.accessKeyUp&&this.accessKeyDown&&t.accessKey&&_(this,e,"CTRL+"+t.accessKey);var E=this;e.on("load",function(){var t=E.getInputElement();if(t){var n=E.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&CKEDITOR.env.version<8?"cke_dialog_ui_focused":"";t.on("focus",function(){e._.tabBarMode=!1,e._.hasFocus=!0,E.fire("focus"),n&&this.addClass(n)}),t.on("blur",function(){E.fire("blur"),n&&this.removeClass(n)})}}),this.keyboardFocusable&&(this.tabIndex=t.tabIndex||0,this.focusIndex=e._.focusList.push(this)-1,this.on("focus",function(){e._.currentFocusIndex=E.focusIndex})),CKEDITOR.tools.extend(this,t)}},hbox:function(e,t,n,i,o){if(!(4>arguments.length)){this._||(this._={});var r,a=this._.children=t,s=o&&o.widths||null,l=o&&o.height||null,c={role:"presentation"};o&&o.align&&(c.align=o.align),CKEDITOR.ui.dialog.uiElement.call(this,e,o||{type:"hbox"},i,"table",{},c,function(){var e=[''];for(r=0;r",n[r],"")}return e.push(" "),e.join("")})}},vbox:function(e,t,n,i,o){if(!(3>arguments.length)){this._||(this._={});var r=this._.children=t,a=o&&o.width||null,s=o&&o.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,e,o||{type:"vbox"},i,"div",null,{role:"presentation"},function(){var t=['");for(var i=0;i',n[i]," ")}return t.push("
"),t.join("")})}}}}(),CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(e,t){return this.getInputElement().setValue(e),!t&&this.fire("change",{value:e}),this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var e=this.getInputElement();(e=e.getParent())&&-1==e.$.className.search("cke_dialog_page_contents"););return e?(e=e.getAttribute("name"),this._.dialog._.currentTabId!=e&&this._.dialog.selectPage(e),this):this},focus:function(){return this.selectParentTab().getInputElement().focus(),this},registerEvents:function(e){var t,n,i=/^on([A-Z]\w+)/,o=function(e,t,n,i){t.on("load",function(){e.getInputElement().on(n,i,e)})};for(n in e)(t=n.match(i))&&(this.eventProcessors[n]?this.eventProcessors[n].call(this,this._.dialog,e[n]):o(this,this._.dialog,t[1].toLowerCase(),e[n]));return this},eventProcessors:{onLoad:function(e,t){e.on("load",t,this)},onShow:function(e,t){e.on("show",t,this)},onHide:function(e,t){e.on("hide",t,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var e=this.getElement();this.getInputElement().setAttribute("disabled","true"),e.addClass("cke_disabled")},enable:function(){var e=this.getElement();this.getInputElement().removeAttribute("disabled"),e.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return this.isEnabled()&&this.isVisible()?!0:!1}},CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(e){return 1>arguments.length?this._.children.concat():(e.splice||(e=[e]),2>e.length?this._.children[e[0]]:this._.children[e[0]]&&this._.children[e[0]].getChild?this._.children[e[0]].getChild(e.slice(1,e.length)):null)}},!0),CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox,function(){var e={build:function(e,t,n){for(var i,o=t.children,r=[],a=[],s=0;s=700}]],italic:["em","i",["span",function(e){return"italic"==e.styles["font-style"]}]],underline:["u",["span",function(e){return"underline"==e.styles["text-decoration"]}]],strike:["s","strike",["span",function(e){return"line-through"==e.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},o=e.config,r=e.lang.basicstyles;n("Bold",r.bold,"bold",o.coreStyles_bold),n("Italic",r.italic,"italic",o.coreStyles_italic),n("Underline",r.underline,"underline",o.coreStyles_underline),n("Strike",r.strike,"strike",o.coreStyles_strike),n("Subscript",r.subscript,"subscript",o.coreStyles_subscript),n("Superscript",r.superscript,"superscript",o.coreStyles_superscript),e.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}}),CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"},CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"},CKEDITOR.config.coreStyles_underline={element:"u"},CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"},CKEDITOR.config.coreStyles_subscript={element:"sub"},CKEDITOR.config.coreStyles_superscript={element:"sup"},function(){var e={exec:function(e){var t=e.getCommand("blockquote").state,n=e.getSelection(),i=n&&n.getRanges(!0)[0];if(i){var o=n.createBookmarks();if(CKEDITOR.env.ie){var r,a=o[0].startNode,s=o[0].endNode;if(a&&"blockquote"==a.getParent().getName())for(r=a;r=r.getNext();)if(r.type==CKEDITOR.NODE_ELEMENT&&r.isBlockBoundary()){a.move(r,!0);break}if(s&&"blockquote"==s.getParent().getName())for(r=s;r=r.getPrevious();)if(r.type==CKEDITOR.NODE_ELEMENT&&r.isBlockBoundary()){s.move(r);break}}var l=i.createIterator();if(l.enlargeBr=e.config.enterMode!=CKEDITOR.ENTER_BR,t==CKEDITOR.TRISTATE_OFF){for(a=[];t=l.getNextParagraph();)a.push(t);for(1>a.length&&(t=e.document.createElement(e.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),s=o.shift(),i.insertNode(t),t.append(new CKEDITOR.dom.text("",e.document)),i.moveToBookmark(s),i.selectNodeContents(t),i.collapse(!0),s=i.createBookmark(),a.push(t),o.unshift(s)),r=a[0].getParent(),i=[],s=0;s=0;s--){i=a[s];e:{r=i;for(var l=0,c=r.getChildCount(),u=void 0;c>l&&(u=r.getChild(l));l++)if(u.type==CKEDITOR.NODE_ELEMENT&&u.isBlockBoundary()){r=!1;break e}r=!0}r&&i.remove()}if(e.config.enterMode==CKEDITOR.ENTER_BR)for(i=!0;t.length;)if(l=t.shift(),"div"==l.getName()){for(s=new CKEDITOR.dom.documentFragment(e.document),i&&l.getPrevious()&&!(l.getPrevious().type==CKEDITOR.NODE_ELEMENT&&l.getPrevious().isBlockBoundary())&&s.append(e.document.createElement("br")),i=l.getNext()&&!(l.getNext().type==CKEDITOR.NODE_ELEMENT&&l.getNext().isBlockBoundary());l.getFirst();)l.getFirst().remove().appendTo(s);i&&s.append(e.document.createElement("br")),s.replace(l),i=!1}}n.selectBookmarks(o),e.focus()}},refresh:function(e,t){this.setState(e.elementPath(t.block||t.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(t){t.blockless||(t.addCommand("blockquote",e),t.ui.addButton&&t.ui.addButton("Blockquote",{label:t.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})}(),function(){function e(e){function t(){var t=e.editable();t.on(p,function(e){(!CKEDITOR.env.ie||!E)&&h(e)}),CKEDITOR.env.ie&&t.on("paste",function(t){g||(o(),t.data.preventDefault(),h(t),a("paste")||e.openDialog("paste"))}),CKEDITOR.env.ie&&(t.on("contextmenu",r,null,null,0),t.on("beforepaste",function(e){e.data&&!e.data.$.ctrlKey&&r()},null,null,0)),t.on("beforecut",function(){!E&&l(e)});var n;t.attachListener(CKEDITOR.env.ie?t:e.document.getDocumentElement(),"mouseup",function(){n=setTimeout(function(){f()},0)}),e.on("destroy",function(){clearTimeout(n)}),t.on("keyup",f)}function n(t){return{type:t,canUndo:"cut"==t,startDisabled:!0,exec:function(){"cut"==this.type&&l();var t,n=this.type;if(CKEDITOR.env.ie)t=a(n);else try{t=e.document.$.execCommand(n,!1,null)}catch(i){t=!1}return t||alert(e.lang.clipboard[this.type+"Error"]),t}}}function i(){return{canUndo:!1,async:!0,exec:function(e,t){var n=function(t,n){t&&s(t.type,t.dataValue,!!n),e.fire("afterCommandExec",{name:"paste",command:i,returnValue:!!t})},i=this;"string"==typeof t?n({type:"auto",dataValue:t},1):e.getClipboardData(n)}}}function o(){g=1,setTimeout(function(){g=0},100)}function r(){E=1,setTimeout(function(){E=0},10)}function a(t){var n=e.document,i=n.getBody(),o=!1,r=function(){o=!0};return i.on(t,r),(7=CKEDITOR.env.version;if(!o.getById("cke_pastebin")){var l=e.getSelection(),c=l.createBookmarks(),u=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!r.is("body")||CKEDITOR.env.ie||CKEDITOR.env.opera?"div":"body",o);u.setAttribute("id","cke_pastebin"),CKEDITOR.env.opera&&u.appendBogus();var d=0,o=o.getWindow();s?(u.insertAfter(c[0].startNode),u.setStyle("display","inline")):(CKEDITOR.env.webkit?(r.append(u),u.addClass("cke_editable"),r.is("body")||(s="static"!=r.getComputedStyle("position")?r:CKEDITOR.dom.element.get(r.$.offsetParent),d=s.getDocumentPosition().y)):r.getAscendant(CKEDITOR.env.ie||CKEDITOR.env.opera?"body":"html",1).append(u),u.setStyles({position:"absolute",top:o.getScrollPosition().y-d+10+"px",width:"1px",height:Math.max(1,o.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0})),(s=u.getParent().isReadOnly())?(u.setOpacity(0),u.setAttribute("contenteditable",!0)):u.setStyle("ltr"==e.config.contentsLangDirection?"left":"right","-1000px"),e.on("selectionChange",a,null,null,0),CKEDITOR.env.webkit&&(i=r.once("blur",a,null,null,-100)),s&&u.focus(),s=new CKEDITOR.dom.range(u),s.selectNodeContents(u);var h=s.select();CKEDITOR.env.ie&&(i=r.once("blur",function(){e.lockSelection(h)}));var f=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){(CKEDITOR.env.webkit||CKEDITOR.env.opera)&&(CKEDITOR.document[CKEDITOR.env.webkit?"getBody":"getDocumentElement"]().$.scrollTop=f),i&&i.removeListener(),CKEDITOR.env.ie&&r.focus(),l.selectBookmarks(c),u.remove();var t;CKEDITOR.env.webkit&&(t=u.getFirst())&&t.is&&t.hasClass("Apple-style-span")&&(u=t),e.removeListener("selectionChange",a),n(u.getHtml())},0)}}function u(){if(CKEDITOR.env.ie){e.focus(),o();var t=e.focusManager;if(t.lock(),e.editable().fire(p)&&!a("paste"))return t.unlock(),!1;t.unlock()}else try{if(e.editable().fire(p)&&!e.document.$.execCommand("Paste",!1,null))throw 0}catch(n){return!1}return!0}function d(t){if("wysiwyg"==e.mode)switch(t.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:t=e.editable(),o(),!CKEDITOR.env.ie&&t.fire("beforepaste"),(CKEDITOR.env.opera||CKEDITOR.env.gecko&&10900>CKEDITOR.env.version)&&t.fire("paste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:e.fire("saveSnapshot"),setTimeout(function(){e.fire("saveSnapshot")},0)}}function h(t){var n={type:"auto"},i=e.fire("beforePaste",n);c(t,function(e){e=e.replace(/]+data-cke-bookmark[^<]*?<\/span>/gi,""),i&&s(n.type,e,0,1)})}function f(){if("wysiwyg"==e.mode){var t=m("Paste");e.getCommand("cut").setState(m("Cut")),e.getCommand("copy").setState(m("Copy")),e.getCommand("paste").setState(t),e.fire("pasteState",t)}}function m(t){var n;if(T&&t in{Paste:1,Cut:1})return CKEDITOR.TRISTATE_DISABLED;if("Paste"==t){CKEDITOR.env.ie&&(E=1);try{n=e.document.$.queryCommandEnabled(t)||CKEDITOR.env.webkit}catch(i){}E=0}else t=e.getSelection(),n=t.getRanges(),n=t.getType()!=CKEDITOR.SELECTION_NONE&&!(1==n.length&&n[0].collapsed);return n?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}var E=0,g=0,T=0,p=CKEDITOR.env.ie?"beforepaste":"paste";!function(){e.on("key",d),e.on("contentDom",t),e.on("selectionChange",function(e){T=e.data.selection.getRanges()[0].checkReadOnly(),f()}),e.contextMenu&&e.contextMenu.addListener(function(e,t){return T=t.getRanges()[0].checkReadOnly(),{cut:m("Cut"),copy:m("Copy"),paste:m("Paste")}})}(),function(){function t(t,n,i,o,r){var a=e.lang.clipboard[n];e.addCommand(n,i),e.ui.addButton&&e.ui.addButton(t,{label:a,command:n,toolbar:"clipboard,"+o}),e.addMenuItems&&e.addMenuItem(n,{label:a,command:n,group:"clipboard",order:r})}t("Cut","cut",n("cut"),10,1),t("Copy","copy",n("copy"),20,4),t("Paste","paste",i(),30,8)}(),e.getClipboardData=function(t,n){function i(e){e.removeListener(),e.cancel(),n(e.data)}function o(e){e.removeListener(),e.cancel(),l=!0,n({type:s,dataValue:e.data})}function r(){this.customTitle=t&&t.title}var a=!1,s="auto",l=!1;n||(n=t,t=null),e.on("paste",i,null,null,0),e.on("beforePaste",function(e){e.removeListener(),a=!0,s=e.data.type},null,null,1e3),!1===u()&&(e.removeListener("paste",i),a&&e.fire("pasteDialog",r)?(e.on("pasteDialogCommit",o),e.on("dialogHide",function(e){e.removeListener(),e.data.removeListener("pasteDialogCommit",o),setTimeout(function(){l||n(null)},10)})):n(null))}}function t(e){if(CKEDITOR.env.webkit){if(!e.match(/^[^<]*$/g)&&!e.match(/^(
<\/div>|[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!e.match(/^([^<]|
)*$/gi)&&!e.match(/^(([^<]|
)*<\/p>|(\r\n))*$/gi))return"html"}else{if(!CKEDITOR.env.gecko&&!CKEDITOR.env.opera)return"html";if(!e.match(/^([^<]|
)*$/gi))return"html"}return"htmlifiedtext"}function n(e,t){function n(e){return CKEDITOR.tools.repeat("
",~~(e/2))+(1==e%2?"
":"")}return t=t.replace(/\s+/g," ").replace(/> +<").replace(/
/gi,"
"),t=t.replace(/<\/?[A-Z]+>/g,function(e){return e.toLowerCase()}),t.match(/^[^<]$/)?t:(CKEDITOR.env.webkit&&-1")&&(t=t.replace(/^((
|)<\/div>)(?!$|((
|)<\/div>))/g,"
").replace(/^((
|)<\/div>){2}(?!$)/g,""),t.match(/(
|)<\/div>/)&&(t=""+t.replace(/(
(
|)<\/div>)+/g,function(e){return n(e.split("").length+1)})+""),t=t.replace(/<\/div>/g,"
"),t=t.replace(/<\/?div>/g,"")),(CKEDITOR.env.gecko||CKEDITOR.env.opera)&&e.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(t=t.replace(/^
$/,"
")),-1
")&&(t=""+t.replace(/(
){2,}/g,function(e){return n(e.length/4)})+"
")),r(e,t))}function i(){var e=new CKEDITOR.htmlParser.filter,t={blockquote:1,dl:1,fieldset:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ol:1,p:1,table:1,ul:1},n=CKEDITOR.tools.extend({br:0},CKEDITOR.dtd.$inline),i={p:1,br:1,"cke:br":1},o=CKEDITOR.dtd,r=CKEDITOR.tools.extend({area:1,basefont:1,embed:1,iframe:1,map:1,object:1,param:1},CKEDITOR.dtd.$nonBodyContent,CKEDITOR.dtd.$cdata),a=function(e){delete e.name,e.add(new CKEDITOR.htmlParser.text(" "))},s=function(e){for(var t,n=e;(n=n.next)&&n.name&&n.name.match(/^h\d$/);)for(t=new CKEDITOR.htmlParser.element("cke:br"),t.isEmpty=!0,e.add(t);t=n.children.shift();)e.add(t)};return e.addRules({elements:{h1:s,h2:s,h3:s,h4:s,h5:s,h6:s,img:function(e){var e=CKEDITOR.tools.trim(e.attributes.alt||""),t=" ";return e&&!e.match(/(^http|\.(jpe?g|gif|png))/i)&&(t=" ["+e+"] "),new CKEDITOR.htmlParser.text(t)},td:a,th:a,$:function(e){var a,s=e.name;if(r[s])return!1;if(delete e.attributes,"br"==s)return e;if(t[s])e.name="p";else if(n[s])delete e.name;else if(o[s]){if(a=new CKEDITOR.htmlParser.element("cke:br"),a.isEmpty=!0,CKEDITOR.dtd.$empty[s])return a;e.add(a,0),a=a.clone(),a.isEmpty=!0,e.add(a),delete e.name}return i[e.name]||delete e.name,e}}}),e}function o(e,t,n){var t=new CKEDITOR.htmlParser.fragment.fromHtml(t),i=new CKEDITOR.htmlParser.basicWriter;t.writeHtml(i,n);var t=i.getHtml(),t=t.replace(/\s*(<\/?[a-z:]+ ?\/?>)\s*/g,"$1").replace(/( ){2,}/g," ").replace(/( )(<\/?p>|
)/g,"$2").replace(/(<\/?p>|
)( )/g,"$1").replace(/<(cke:)?br( \/)?>/g,"
").replace(/<\/p>/g,""),o=0,t=t.replace(/<\/?p>/g,function(e){if("
"==e){if(1<++o)return"
"}else if(0<--o)return"
";return e}).replace(/
<\/p>/g,"");return r(e,t)}function r(e,t){return e.enterMode==CKEDITOR.ENTER_BR?t=t.replace(/(<\/p>
)+/g,function(e){return CKEDITOR.tools.repeat("
",2*(e.length/7))}).replace(/<\/?p>/g,""):e.enterMode==CKEDITOR.ENTER_DIV&&(t=t.replace(/<(\/)?p>/g,"<$1div>")),t}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(r){var a;e(r),CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js")),r.on("paste",function(e){var t=e.data.dataValue,n=CKEDITOR.dtd.$block;if(-1 <\/span>/gi," "),"html"!=e.data.type&&(t=t.replace(/]*>([^<]*)<\/span>/gi,function(e,t){return t.replace(/\t/g," ")})),-1')&&(e.data.startsWithEOL=1,e.data.preSniffing="html",t=t.replace(/
/,"")),t=t.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1")),t.match(/^<[^<]+cke_(editable|contents)/i)){var i,o,r=new CKEDITOR.dom.element("div");for(r.setHtml(t);1==r.getChildCount()&&(i=r.getFirst())&&i.type==CKEDITOR.NODE_ELEMENT&&(i.hasClass("cke_editable")||i.hasClass("cke_contents"));)r=o=i;o&&(t=o.getHtml().replace(/
$/i,""))}CKEDITOR.env.ie?t=t.replace(/^ (?: |\r\n)?<(\w+)/g,function(t,i){return i.toLowerCase()in n?(e.data.preSniffing="html","<"+i):t}):CKEDITOR.env.webkit?t=t.replace(/<\/(\w+)>
<\/div>$/,function(t,i){return i in n?(e.data.endsWithEOL=1,""+i+">"):t}):CKEDITOR.env.gecko&&(t=t.replace(/(\s)
$/,"$1")),e.data.dataValue=t},null,null,3),r.on("paste",function(e){var s,e=e.data,l=e.type,c=e.dataValue,u=r.config.clipboard_defaultContentType||"html";s="html"==l||"html"==e.preSniffing?"html":t(c),"htmlifiedtext"==s?c=n(r.config,c):"text"==l&&"html"==s&&(c=o(r.config,c,a||(a=i(r)))),e.startsWithEOL&&(c='
'+c),e.endsWithEOL&&(c+='
'),"auto"==l&&(l="html"==s||"html"==u?"html":"text"),e.type=l,e.dataValue=c,delete e.preSniffing,delete e.startsWithEOL,delete e.endsWithEOL},null,null,6),r.on("paste",function(e){e=e.data,r.insertHtml(e.dataValue,e.type),setTimeout(function(){r.fire("afterPaste")},0)},null,null,1e3),r.on("pasteDialog",function(e){setTimeout(function(){r.openDialog("paste",e.data)},0)})}})}(),function(){CKEDITOR.plugins.add("panel",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}}),CKEDITOR.UI_PANEL="panel",CKEDITOR.ui.panel=function(e,t){t&&CKEDITOR.tools.extend(this,t),CKEDITOR.tools.extend(this,{className:"",css:[]}),this.id=CKEDITOR.tools.getNextId(),this.document=e,this.isFramed=this.forceIFrame||this.css.length,this._={blocks:{}}},CKEDITOR.ui.panel.handler={create:function(e){return new CKEDITOR.ui.panel(e)}};var e=CKEDITOR.addTemplate("panel",'{frame}'),t=CKEDITOR.addTemplate("panel-frame",''),n=CKEDITOR.addTemplate("panel-frame-inner",'{css}');CKEDITOR.ui.panel.prototype={render:function(i,o){this.getHolderElement=function(){var e=this._.holder;if(!e){if(this.isFramed){var e=this.document.getById(this.id+"_frame"),t=e.getParent(),e=e.getFrameDocument();CKEDITOR.env.iOS&&t.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"}),t=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=!0,this.onLoad&&this.onLoad()},this)),e.write(n.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+t+");"},r))),e.getWindow().$.CKEDITOR=CKEDITOR,e.on("key"+(CKEDITOR.env.opera?"press":"down"),function(e){var t=e.data.getKeystroke(),n=this.document.getById(this.id).getAttribute("dir");this._.onKeyDown&&!1===this._.onKeyDown(t)?e.data.preventDefault():(27==t||t==("rtl"==n?39:37))&&this.onEscape&&!1===this.onEscape(t)&&e.data.preventDefault()},this),e=e.getBody(),e.unselectable(),CKEDITOR.env.air&&CKEDITOR.tools.callFunction(t)}else e=this.document.getById(this.id);this._.holder=e}return e};var r={editorId:i.id,id:this.id,langCode:i.langCode,dir:i.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":i.config.baseFloatZIndex+1};if(this.isFramed){var a=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";r.frame=t.output({id:this.id+"_frame",src:a})}return a=e.output(r),o&&o.push(a),a},addBlock:function(e,t){return t=this._.blocks[e]=t instanceof CKEDITOR.ui.panel.block?t:new CKEDITOR.ui.panel.block(this.getHolderElement(),t),this._.currentBlock||this.showBlock(e),t},getBlock:function(e){return this._.blocks[e]},showBlock:function(e){var e=this._.blocks[e],t=this._.currentBlock,n=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");return t&&(n.removeAttributes(t.attributes),t.hide()),this._.currentBlock=e,n.setAttributes(e.attributes),CKEDITOR.fire("ariaWidget",n),e._.focusIndex=-1,this._.onKeyDown=e.onKeyDown&&CKEDITOR.tools.bind(e.onKeyDown,e),e.show(),e},destroy:function(){this.element&&this.element.remove()}},CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(e,t){this.element=e.append(e.getDocument().createElement("div",{attributes:{tabIndex:-1,"class":"cke_panel_block",role:"presentation",tabindex:0},styles:{display:"none"}})),t&&CKEDITOR.tools.extend(this,t),this.element.setAttributes({"aria-label":this.attributes["aria-label"],title:this.attributes.title||this.attributes["aria-label"]}),delete this.attributes["aria-label"],delete this.attributes.title,this.keys={},this._.focusIndex=-1,this.element.disableContextMenu()},_:{markItem:function(e){-1!=e&&(e=this.element.getElementsByTag("a").getItem(this._.focusIndex=e),(CKEDITOR.env.webkit||CKEDITOR.env.opera)&&e.getDocument().getWindow().focus(),e.focus(),this.onMark&&this.onMark(e))}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){(!this.onHide||!0!==this.onHide.call(this))&&this.element.setStyle("display","none")},onKeyDown:function(e){var t=this.keys[e];switch(t){case"next":for(var n,e=this._.focusIndex,t=this.element.getElementsByTag("a");n=t.getItem(++e);)if(n.getAttribute("_cke_focus")&&n.$.offsetWidth){this._.focusIndex=e,n.focus();break}return!1;case"prev":for(e=this._.focusIndex,t=this.element.getElementsByTag("a");e>0&&(n=t.getItem(--e));)if(n.getAttribute("_cke_focus")&&n.$.offsetWidth){this._.focusIndex=e,n.focus();break}return!1;case"click":case"mouseup":return e=this._.focusIndex,(n=e>=0&&this.element.getElementsByTag("a").getItem(e))&&(n.$[t]?n.$[t]():n.$["on"+t]()),!1}return!0}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function e(e,n,i,o,r){var r=CKEDITOR.tools.genKey(n.getUniqueId(),i.getUniqueId(),e.lang.dir,e.uiColor||"",o.css||"",r||""),a=t[r];return a||(a=t[r]=new CKEDITOR.ui.panel(n,o),a.element=i.append(CKEDITOR.dom.element.createFromHtml(a.render(e),n)),a.element.setStyles({display:"none",position:"absolute"})),a}var t={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(t,n,i,o){function r(){c.hide()}i.forceIFrame=1,i.toolbarRelated&&t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(n=CKEDITOR.document.getById("cke_"+t.name));var a=n.getDocument(),o=e(t,a,n,i,o||0),s=o.element,l=s.getFirst(),c=this;s.disableContextMenu(),this.element=s,this._={editor:t,panel:o,parentElement:n,definition:i,document:a,iframe:l,children:[],dir:t.lang.dir},t.on("mode",r),t.on("resize",r),a.getWindow().on("resize",r)},proto:{addBlock:function(e,t){return this._.panel.addBlock(e,t)},addListBlock:function(e,t){return this._.panel.addListBlock(e,t)},getBlock:function(e){return this._.panel.getBlock(e)},showBlock:function(e,t,n,i,o){var r=this._.panel,a=r.showBlock(e);this.allowBlur(!1),e=this._.editor.editable(),this._.returnFocus=e.hasFocus?e:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);var s=this.element,e=this._.iframe,e=CKEDITOR.env.ie?e:new CKEDITOR.dom.window(e.$.contentWindow),l=s.getDocument(),c=this._.parentElement.getPositionedAncestor(),u=t.getDocumentPosition(l),l=c?c.getDocumentPosition(l):{x:0,y:0},d="rtl"==this._.dir,h=u.x+(i||0)-l.x,f=u.y+(o||0)-l.y;!d||1!=n&&4!=n?d||2!=n&&3!=n||(h+=t.$.offsetWidth-1):h+=t.$.offsetWidth,(3==n||4==n)&&(f+=t.$.offsetHeight-1),this._.panel._.offsetParentId=t.getId(),s.setStyles({top:f+"px",left:0,display:""}),s.setOpacity(0),s.getFirst().removeStyle("width"),this._.editor.focusManager.add(e),this._.blurSet||(CKEDITOR.event.useCapture=!0,e.on("blur",function(e){this.allowBlur()&&e.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild&&(delete this._.returnFocus,this.hide())},this),e.on("focus",function(){this._.focused=!0,this.hideChild(),this.allowBlur(!0)},this),CKEDITOR.event.useCapture=!1,this._.blurSet=1),r.onEscape=CKEDITOR.tools.bind(function(e){return this.onEscape&&this.onEscape(e)===!1?!1:void 0},this),CKEDITOR.tools.setTimeout(function(){var e=CKEDITOR.tools.bind(function(){if(s.removeStyle("width"),a.autoSize){var e=a.element.getDocument(),e=(CKEDITOR.env.webkit?a.element:e.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e>0&&(e+=(s.$.offsetWidth||0)-(s.$.clientWidth||0)+3),s.setStyle("width",e+10+"px"),e=a.element.$.scrollHeight,CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e>0&&(e+=(s.$.offsetHeight||0)-(s.$.clientHeight||0)+3),s.setStyle("height",e+"px"),r._.currentBlock.element.setStyle("display","none").removeStyle("display")}else s.removeStyle("height");d&&(h-=s.$.offsetWidth),s.setStyle("left",h+"px");var t=r.element.getWindow(),e=s.$.getBoundingClientRect(),t=t.getViewPaneSize(),n=e.width||e.right-e.left,i=e.height||e.bottom-e.top,o=d?e.right:t.width-e.left,l=d?t.width-e.right:e.left;d?n>o&&(h=l>n?h+n:t.width>n?h-e.left:h-e.right+t.width):n>o&&(h=l>n?h-n:t.width>n?h-e.right+t.width:h-e.left),n=e.top,t.height-e.topi?f-i:t.height>i?f-e.bottom+t.height:f-e.top),CKEDITOR.env.ie&&(t=e=new CKEDITOR.dom.element(s.$.offsetParent),"html"==t.getName()&&(t=t.getDocument().getBody()),"rtl"==t.getComputedStyle("direction")&&(h=CKEDITOR.env.ie8Compat?h-2*s.getDocument().getDocumentElement().$.scrollLeft:h-(e.$.scrollWidth-e.$.clientWidth)));var c,e=s.getFirst();(c=e.getCustomData("activePanel"))&&c.onHide&&c.onHide.call(this,1),e.setCustomData("activePanel",this),s.setStyles({top:f+"px",left:h+"px"}),s.setOpacity(1)},this);r.isLoaded?e():r.onLoad=e,CKEDITOR.tools.setTimeout(function(){this.focus(),this.allowBlur(!0),this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this),this.visible=1,this.onShow&&this.onShow.call(this)},focus:function(){if(CKEDITOR.env.webkit){var e=CKEDITOR.document.getActive();!e.equals(this._.iframe)&&e.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var e=this._.iframe.getFrameDocument().getActive();e.is("a")&&(this._.lastFocused=e)},hide:function(e){!this.visible||this.onHide&&!0===this.onHide.call(this)||(this.hideChild(),CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur(),this.element.setStyle("display","none"),this.visible=0,this.element.getFirst().removeCustomData("activePanel"),(e=e&&this._.returnFocus)&&(CKEDITOR.env.webkit&&e.type&&e.getWindow().$.focus(),e.focus()),delete this._.lastFocused,this._.editor.fire("panelHide",this))},allowBlur:function(e){var t=this._.panel;return void 0!=e&&(t.allowBlur=e),t.allowBlur},showAsChild:function(e,t,n,i,o,r){this._.activeChild==e&&e._.panel._.offsetParentId==n.getId()||(this.hideChild(),e.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=e,this._.focused=!1,e.showBlock(t,n,i,o,r),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){e.element.getChild(0).$.style.cssText+=""},100))},hideChild:function(e){var t=this._.activeChild;t&&(delete t.onHide,delete this._.activeChild,t.hide(),e&&this.focus())}}}),CKEDITOR.on("instanceDestroyed",function(){var e,n=CKEDITOR.tools.isEmpty(CKEDITOR.instances);for(e in t){var i=t[e];n?i.destroy():i.element.hide()}n&&(t={})})}(),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(e){for(var t=e.config.menu_groups.split(","),n=e._.menuGroups={},i=e._.menuItems={},o=0;ot.group?1:e.ordert.order?1:0})}var t=''],u=r.length,d=u&&r[0].group,h=0;u>h;h++){var f=r[h];d!=f.group&&(c.push(''),d=f.group),f.render(this,h,c)}c.push(" '),i=CKEDITOR.addTemplate("menuArrow",' ');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(e,t){t=this._.definition=t||{},this.id=CKEDITOR.tools.getNextId(),this.editor=e,this.items=[],this._.listeners=[],this._.level=t.level||1;var n=CKEDITOR.tools.extend({},t.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),i=n.block.attributes=n.attributes||{};!i.role&&(i.role="menu"),this._.panelDefinition=n},_:{onShow:function(){var e=this.editor.getSelection(),t=e&&e.getStartElement(),n=this.editor.elementPath(),i=this._.listeners;this.removeAll();for(var o=0;o "),l.setHtml(c.join("")),CKEDITOR.ui.fire("ready",this),this.parent?this.parent._.panel.showAsChild(s,this.id,t,n,i,o):s.showBlock(this.id,t,n,i,o),a.fire("menuShow",[s])}},addListener:function(e){this._.listeners.push(e)},hide:function(e){this._.onHide&&this._.onHide(),this._.panel&&this._.panel.hide(e)}}}),CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(e,t,n){CKEDITOR.tools.extend(this,n,{order:0,className:"cke_menubutton__"+t}),this.group=e._.menuGroups[this.group],this.editor=e,this.name=t},proto:{render:function(e,t,o){var r=e.id+(""+t),a="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,s=a==CKEDITOR.TRISTATE_ON?"on":a==CKEDITOR.TRISTATE_DISABLED?"disabled":"off",l=this.getItems,c=""+("rtl"==this.editor.lang.dir?"9668":"9658")+";",u=this.name;this.icon&&!/\./.test(this.icon)&&(u=this.icon),e={id:r,name:this.name,iconName:u,label:this.label,cls:this.className||"",state:s,hasPopup:l?"true":"false",disabled:a==CKEDITOR.TRISTATE_DISABLED,title:this.label,href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:e._.itemOverFn,moveOutFn:e._.itemOutFn,clickFn:e._.itemClickFn,index:t,iconStyle:CKEDITOR.skin.getIconStyle(u,"rtl"==this.editor.lang.dir,u==this.icon?null:this.icon,this.iconOffset),arrowHtml:l?i.output({label:c}):""},n.output(e,o)}}})}(),CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div",CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,$:function(e){this.base.call(this,e,{panel:{className:"cke_menu_panel",attributes:{"aria-label":e.lang.contextmenu.options}}})},proto:{addTarget:function(e,t){if(CKEDITOR.env.opera&&!("oncontextmenu"in document.body)){var n;e.on("mousedown",function(i){if(i=i.data,2!=i.$.button)i.getKeystroke()==CKEDITOR.CTRL+1&&e.fire("contextmenu",i);else if(!t||!(CKEDITOR.env.mac?i.$.metaKey:i.$.ctrlKey)){var o=i.getTarget();n||(o=o.getDocument(),n=o.createElement("input"),n.$.type="button",o.getBody().append(n)),n.setAttribute("style","position:absolute;top:"+(i.$.clientY-2)+"px;left:"+(i.$.clientX-2)+"px;width:5px;height:5px;opacity:0.01")}}),e.on("mouseup",function(t){n&&(n.remove(),n=void 0,e.fire("contextmenu",t.data))})}if(e.on("contextmenu",function(e){if(e=e.data,!t||!(CKEDITOR.env.webkit?i:CKEDITOR.env.mac?e.$.metaKey:e.$.ctrlKey)){e.preventDefault();var n=e.getTarget().getDocument(),o=e.getTarget().getDocument().getDocumentElement(),r=!n.equals(CKEDITOR.document),n=n.getWindow().getScrollPosition(),a=r?e.$.clientX:e.$.pageX||n.x+e.$.clientX,s=r?e.$.clientY:e.$.pageY||n.y+e.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(o,null,a,s)},CKEDITOR.env.ie?200:0,this)}},this),CKEDITOR.env.opera&&e.on("keypress",function(e){e=e.data,0===e.$.keyCode&&e.preventDefault()}),CKEDITOR.env.webkit){var i,o=function(){i=0};e.on("keydown",function(e){i=CKEDITOR.env.mac?e.data.$.metaKey:e.data.$.ctrlKey}),e.on("keyup",o),e.on("contextmenu",o)}},open:function(e,t,n,i){this.editor.focus(),e=e||CKEDITOR.document.getDocumentElement(),this.editor.selectionChange(1),this.show(e,t,n,i)}}})},beforeInit:function(e){var t=e.contextMenu=new CKEDITOR.plugins.contextMenu(e);
e.on("contentDom",function(){t.addTarget(e.editable(),!1!==e.config.browserContextMenuOnCtrl)}),e.addCommand("contextMenu",{exec:function(){e.contextMenu.open(e.document.getBody())}}),e.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu"),e.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),CKEDITOR.plugins.add("resize",{init:function(e){var t,n,i,o,r=e.config,a=e.ui.spaceId("resizer"),s=e.element?e.element.getDirection(1):"ltr";if(!r.resize_dir&&(r.resize_dir="vertical"),void 0==r.resize_maxWidth&&(r.resize_maxWidth=3e3),void 0==r.resize_maxHeight&&(r.resize_maxHeight=3e3),void 0==r.resize_minWidth&&(r.resize_minWidth=750),void 0==r.resize_minHeight&&(r.resize_minHeight=250),!1!==r.resize_enabled){var l=null,c=("both"==r.resize_dir||"horizontal"==r.resize_dir)&&r.resize_minWidth!=r.resize_maxWidth,u=("both"==r.resize_dir||"vertical"==r.resize_dir)&&r.resize_minHeight!=r.resize_maxHeight,d=function(a){var l=t,d=n,h=l+(a.data.$.screenX-i)*("rtl"==s?-1:1),a=d+(a.data.$.screenY-o);c&&(l=Math.max(r.resize_minWidth,Math.min(h,r.resize_maxWidth))),u&&(d=Math.max(r.resize_minHeight,Math.min(a,r.resize_maxHeight))),e.resize(c?l:null,d)},h=function(){CKEDITOR.document.removeListener("mousemove",d),CKEDITOR.document.removeListener("mouseup",h),e.document&&(e.document.removeListener("mousemove",d),e.document.removeListener("mouseup",h))},f=CKEDITOR.tools.addFunction(function(a){l||(l=e.getResizable()),t=l.$.offsetWidth||0,n=l.$.offsetHeight||0,i=a.screenX,o=a.screenY,r.resize_minWidth>t&&(r.resize_minWidth=t),r.resize_minHeight>n&&(r.resize_minHeight=n),CKEDITOR.document.on("mousemove",d),CKEDITOR.document.on("mouseup",h),e.document&&(e.document.on("mousemove",d),e.document.on("mouseup",h)),a.preventDefault&&a.preventDefault()});e.on("destroy",function(){CKEDITOR.tools.removeFunction(f)}),e.on("uiSpace",function(t){if("bottom"==t.data.space){var n="";c&&!u&&(n=" cke_resizer_horizontal"),!c&&u&&(n=" cke_resizer_vertical");var i=''+("ltr"==s?"◢":"◣")+"";"ltr"==s&&"ltr"==n?t.data.html+=i:t.data.html=i+t.data.html}},e,null,100),e.on("maximize",function(t){e.ui.space("resizer")[t.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){var e='{label}{arrowHtml}',t=CKEDITOR.addTemplate("buttonArrow",' "),n=CKEDITOR.addTemplate("button",e);CKEDITOR.plugins.add("button",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}}),CKEDITOR.UI_BUTTON="button",CKEDITOR.ui.button=function(e){CKEDITOR.tools.extend(this,e,{title:e.label,click:e.click||function(t){t.execCommand(e.command)}}),this._={}},CKEDITOR.ui.button.handler={create:function(e){return new CKEDITOR.ui.button(e)}},CKEDITOR.ui.button.prototype={render:function(e,i){var o,r=CKEDITOR.env,a=this._.id=CKEDITOR.tools.getNextId(),s="",l=this.command;this._.editor=e;var c={id:a,button:this,editor:e,focus:function(){CKEDITOR.document.getById(a).focus()},execute:function(){this.button.click(e)},attach:function(e){this.button.attach(e)}},u=CKEDITOR.tools.addFunction(function(e){return c.onkey?(e=new CKEDITOR.dom.event(e),!1!==c.onkey(c,e.getKeystroke())):void 0}),d=CKEDITOR.tools.addFunction(function(e){var t;return c.onfocus&&(t=!1!==c.onfocus(c,new CKEDITOR.dom.event(e))),CKEDITOR.env.gecko&&10900>CKEDITOR.env.version&&e.preventBubble(),t}),h=0,f=CKEDITOR.tools.addFunction(function(){if(CKEDITOR.env.opera){var t=e.editable();t.isInline()&&t.hasFocus&&(e.lockSelection(),h=1)}});if(c.clickFn=o=CKEDITOR.tools.addFunction(function(){h&&(e.unlockSelection(1),h=0),c.execute()}),this.modes){var m={},E=function(){var t=e.mode;t&&(t=this.modes[t]?void 0!=m[t]?m[t]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,this.setState(e.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:t))};e.on("beforeModeUnload",function(){e.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(m[e.mode]=this._.state)},this),e.on("mode",E,this),!this.readOnly&&e.on("readOnly",E,this)}else l&&(l=e.getCommand(l))&&(l.on("state",function(){this.setState(l.state)},this),s+=l.state==CKEDITOR.TRISTATE_ON?"on":l.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");this.directional&&e.on("contentDirChanged",function(t){var n=CKEDITOR.document.getById(this._.id),i=n.getFirst(),t=t.data;t!=e.lang.dir?n.addClass("cke_"+t):n.removeClass("cke_ltr").removeClass("cke_rtl"),i.setAttribute("style",CKEDITOR.skin.getIconStyle(g,"rtl"==t,this.icon,this.iconOffset))},this),l||(s+="off");var g=E=this.name||this.command;return this.icon&&!/\./.test(this.icon)&&(g=this.icon,this.icon=null),r={id:a,name:E,iconName:g,label:this.label,cls:this.className||"",state:s,title:this.title,titleJs:r.gecko&&10900<=r.version&&!r.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:u,mousedownFn:f,focusFn:d,clickFn:o,style:CKEDITOR.skin.getIconStyle(g,"rtl"==e.lang.dir,this.icon,this.iconOffset),arrowHtml:this.hasArrow?t.output():""},n.output(r,i),this.onRender&&this.onRender(),c},setState:function(e){if(this._.state==e)return!1;this._.state=e;var t=CKEDITOR.document.getById(this._.id);return t?(t.setState(e,"cke_button"),e==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled"),e==CKEDITOR.TRISTATE_ON?t.setAttribute("aria-pressed",!0):t.removeAttribute("aria-pressed"),!0):!1},toFeature:function(e){if(this._.feature)return this._.feature;var t=this;return!this.allowedContent&&!this.requiredContent&&this.command&&(t=e.getCommand(this.command)||t),this._.feature=t}},CKEDITOR.ui.prototype.addButton=function(e,t){this.add(e,CKEDITOR.UI_BUTTON,t)}}(),function(){function e(e){function n(){for(var n=i(),r=CKEDITOR.tools.clone(e.config.toolbarGroups)||t(e),a=0;at.order?-1:0>e.order?1:e.order',t.lang.toolbar.toolbars," ",''],s=!1!==t.config.toolbarStartupExpanded;t.config.toolbarCanCollapse&&t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&l.push('":' style="display:none">'));for(var c=t.toolbox.toolbars,u=e(t),d=0;d"),a=o=0),"/"===g)l.push('');else{m=g.items||g;for(var T=0;T'),f&&l.push('',f,""),l.push('');var I=c.push(E)-1;I>0&&(E.previous=c[I-1],E.previous.next=E)}p?o||(l.push(''),o=1):o&&(l.push(""),o=0),h=function(e){e=e.render(t,l),I=E.items.push(e)-1,I>0&&(e.previous=E.items[I-1],e.previous.next=e),e.toolbar=E,e.onkey=r,e.onfocus=function(){t.toolbox.focusCommandExecuted||t.focus()}},a&&(h(a),a=0),h(C)}}o&&(l.push(" "),a=o=0),E&&l.push('')}}if(t.config.toolbarCanCollapse&&l.push(""),t.config.toolbarCanCollapse&&t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var O=CKEDITOR.tools.addFunction(function(){t.execCommand("toolbarCollapse")});t.on("destroy",function(){CKEDITOR.tools.removeFunction(O)}),t.addCommand("toolbarCollapse",{readOnly:1,exec:function(e){var t=e.ui.space("toolbar_collapser"),n=t.getPrevious(),i=e.ui.space("contents"),o=n.getParent(),r=parseInt(i.$.style.height,10),a=o.$.offsetHeight,s=t.hasClass("cke_toolbox_collapser_min");s?(n.show(),t.removeClass("cke_toolbox_collapser_min"),t.setAttribute("title",e.lang.toolbar.toolbarCollapse)):(n.hide(),t.addClass("cke_toolbox_collapser_min"),t.setAttribute("title",e.lang.toolbar.toolbarExpand)),t.getFirst().setText(s?"▲":"◀"),i.setStyle("height",r-(o.$.offsetHeight-a)+"px"),e.fire("resize")},modes:{wysiwyg:1,source:1}}),t.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse"),l.push('','▲',"")}l.push(""),i.data.html+=l.join("")}}),t.on("destroy",function(){if(this.toolbox){var e,t,n,i,o=0;for(e=this.toolbox.toolbars;o'),{}}}}})}}),CKEDITOR.ui.prototype.addToolbarGroup=function(e,n,i){var o=t(this.editor),r=0===n,a={name:e};if(i){if(i=CKEDITOR.tools.search(o,function(e){return e.name==i}))return!i.groups&&(i.groups=[]),n&&(n=CKEDITOR.tools.indexOf(i.groups,n),n>=0)?void i.groups.splice(n+1,0,e):void(r?i.groups.splice(0,0,e):i.groups.push(e));n=null}n&&(n=CKEDITOR.tools.indexOf(o,function(e){return e.name==n})),r?o.splice(0,0,e):"number"==typeof n?o.splice(n+1,0,a):o.push(e)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top",function(){function e(e,i){function r(t){if(t=e._.elementsPath.list[t],t.equals(e.editable())){var n=e.createRange();n.selectNodeContents(t),n.select()}else e.getSelection().selectElement(t);e.focus()}function a(){s&&s.setHtml(n),delete e._.elementsPath.list}var s,l=e.ui.spaceId("path"),c="cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_";e._.elementsPath={idBase:c,filters:[]},i.html+=''+e.lang.elementspath.eleLabel+''+n+"",e.on("uiReady",function(){var t=e.ui.space("path");t&&e.focusManager.add(t,1)});var u=CKEDITOR.tools.addFunction(r),d=CKEDITOR.tools.addFunction(function(t,n){var i,o=e._.elementsPath.idBase,n=new CKEDITOR.dom.event(n);switch(i="rtl"==e.lang.dir,n.getKeystroke()){case i?39:37:case 9:return(i=CKEDITOR.document.getById(o+(t+1)))||(i=CKEDITOR.document.getById(o+"0")),i.focus(),!1;case i?37:39:case CKEDITOR.SHIFT+9:return(i=CKEDITOR.document.getById(o+(t-1)))||(i=CKEDITOR.document.getById(o+(e._.elementsPath.list.length-1))),i.focus(),!1;case 27:return e.focus(),!1;case 13:case 32:return r(t),!1}return!0});e.on("selectionChange",function(t){for(var i=e.editable(),r=t.data.selection.getStartElement(),t=[],a=e._.elementsPath.list=[],h=e._.elementsPath.filters;r;){var f,m=0;f=r.data("cke-display-name")?r.data("cke-display-name"):r.data("cke-real-element-type")?r.data("cke-real-element-type"):r.getName();for(var E=0;ECKEDITOR.env.version?' onfocus="event.preventBubble();"':"")+i+' hidefocus="true" onkeydown="return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );" onclick="CKEDITOR.tools.callFunction({clickFn},{index}); return false;" role="button" aria-label="{label}">{text}');CKEDITOR.plugins.add("elementspath",{init:function(t){t.on("uiSpace",function(n){"bottom"==n.data.space&&e(t,n.data)})}})}(),function(){function e(e,t,n){return n=e.config.forceEnterMode||n,"wysiwyg"!=e.mode?!1:(t||(t=e.config.enterMode),e.elementPath().isContextFor("p")||(t=CKEDITOR.ENTER_BR,n=1),e.fire("saveSnapshot"),t==CKEDITOR.ENTER_BR?r(e,t,null,n):a(e,t,null,n),e.fire("saveSnapshot"),!0)}function t(e){for(var e=e.getSelection().getRanges(!0),t=e.length-1;t>0;t--)e[t].deleteContents();return e[0]}CKEDITOR.plugins.add("enterkey",{init:function(t){t.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(t){e(t)}}),t.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(t){"wysiwyg"==t.mode&&e(t,t.config.shiftEnterMode,1)}}),t.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var n=CKEDITOR.dom.walker.whitespaces(),i=CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(e,o,a,l){if(a=a||t(e)){var c,u=a.document,d=a.checkStartOfBlock(),h=a.checkEndOfBlock(),f=e.elementPath(a.startContainer).block,m=o==CKEDITOR.ENTER_DIV?"div":"p";if(d&&h){if(f&&(f.is("li")||f.getParent().is("li"))){a=f.getParent(),c=a.getParent();var l=!f.hasPrevious(),E=!f.hasNext(),m=e.getSelection(),g=m.createBookmarks(),d=f.getDirection(1),h=f.getAttribute("class"),T=f.getAttribute("style"),p=c.getDirection(1)!=d,e=e.config.enterMode!=CKEDITOR.ENTER_BR||p||T||h;if(c.is("li"))l||E?f[l?"insertBefore":"insertAfter"](c):f.breakParent(c);else{if(e)c=u.createElement(o==CKEDITOR.ENTER_P?"p":"div"),p&&c.setAttribute("dir",d),T&&c.setAttribute("style",T),h&&c.setAttribute("class",h),f.moveChildren(c),l||E?c[l?"insertBefore":"insertAfter"](a):(f.breakParent(a),c.insertAfter(a));else if(f.appendBogus(),l||E)for(;u=f[l?"getFirst":"getLast"]();)u[l?"insertBefore":"insertAfter"](a);else for(f.breakParent(a);u=f.getLast();)u.insertAfter(a);f.remove()}return void m.selectBookmarks(g)}if(f&&f.getParent().is("blockquote"))return f.breakParent(f.getParent()),f.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||f.getPrevious().remove(),f.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||f.getNext().remove(),a.moveToElementEditStart(f),void a.select()}else if(f&&f.is("pre")&&!h)return void r(e,o,a,l);if(h=a.splitBlock(m)){if(o=h.previousBlock,f=h.nextBlock,e=h.wasStartOfBlock,d=h.wasEndOfBlock,f?(g=f.getParent(),g.is("li")&&(f.breakParent(g),f.move(f.getNext(),1))):o&&(g=o.getParent())&&g.is("li")&&(o.breakParent(g),g=o.getNext(),a.moveToElementEditStart(g),o.move(o.getPrevious())),e||d){if(o?(o.is("li")||!s.test(o.getName())&&!o.is("pre"))&&(c=o.clone()):f&&(c=f.clone()),c?l&&!c.is("li")&&c.renameNode(m):g&&g.is("li")?c=g:(c=u.createElement(m),o&&(E=o.getDirection())&&c.setAttribute("dir",E)),u=h.elementPath)for(l=0,m=u.elements.length;m>l&&(g=u.elements[l],!g.equals(u.block)&&!g.equals(u.blockLimit));l++)CKEDITOR.dtd.$removeEmpty[g.getName()]&&(g=g.clone(),c.moveChildren(g),c.append(g));CKEDITOR.env.ie||c.appendBogus(),c.getParent()||a.insertNode(c),c.is("li")&&c.removeAttribute("value"),!CKEDITOR.env.ie||!e||d&&o.getChildCount()||(a.moveToElementEditStart(d?o:c),a.select()),a.moveToElementEditStart(e&&!d?f:c)}else f.is("li")&&(c=a.clone(),c.selectNodeContents(f),c=new CKEDITOR.dom.walker(c),c.evaluator=function(e){return!(i(e)||n(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$inline&&!(e.getName()in CKEDITOR.dtd.$empty))},(g=c.next())&&g.type==CKEDITOR.NODE_ELEMENT&&g.is("ul","ol")&&(CKEDITOR.env.ie?u.createText(" "):u.createElement("br")).insertBefore(g)),f&&a.moveToElementEditStart(f);a.select(),a.scrollIntoView()}}},enterBr:function(e,n,i,o){if(i=i||t(e)){var r=i.document,l=i.checkEndOfBlock(),c=new CKEDITOR.dom.elementPath(e.getSelection().getStartElement()),u=c.block,c=u&&c.block.getName();o||"li"!=c?(!o&&l&&s.test(c)?(l=u.getDirection())?(r=r.createElement("div"),r.setAttribute("dir",l),r.insertAfter(u),i.setStart(r,0)):(r.createElement("br").insertAfter(u),CKEDITOR.env.gecko&&r.createText("").insertAfter(u),i.setStartAt(u.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(u="pre"==c&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?r.createText("\r"):r.createElement("br"),i.deleteContents(),i.insertNode(u),CKEDITOR.env.ie?i.setStartAt(u,CKEDITOR.POSITION_AFTER_END):(r.createText("").insertAfter(u),l&&u.getParent().appendBogus(),u.getNext().$.nodeValue="",i.setStartAt(u.getNext(),CKEDITOR.POSITION_AFTER_START))),i.collapse(!0),i.select(),i.scrollIntoView()):a(e,n,i,o)}}};var o=CKEDITOR.plugins.enterkey,r=o.enterBr,a=o.enterBlock,s=/^h[1-6]$/}(),function(){function e(e,t){var n={},i=[],o={nbsp:" ",shy:"",gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},e=e.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(e,r){var a=t?"&"+r+";":o[r];return n[a]=t?o[r]:"&"+r+";",i.push(a),""});if(!t&&e){var r,e=e.split(","),a=document.createElement("div");for(a.innerHTML="&"+e.join(";&")+";",r=a.innerHTML,a=null,a=0;at&&(t=640),420>n&&(n=420);var o=parseInt((window.screen.height-n)/2,10),r=parseInt((window.screen.width-t)/2,10),i=(i||"location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes")+",width="+t+",height="+n+",top="+o+",left="+r,a=window.open("",null,i,!0);if(!a)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(a.moveTo(r,o),a.resizeTo(t,n)),a.focus(),a.location.href=e}catch(s){window.open(e,null,i,!0)}return!0}}),function(){function e(e,t){var n=[];if(!t)return e;for(var i in t)n.push(i+"="+encodeURIComponent(t[i]));return e+(-1!=e.indexOf("?")?"&":"?")+n.join("&")}function t(e){return e+="",e.charAt(0).toUpperCase()+e.substr(1)}function n(){var n=this.getDialog(),i=n.getParentEditor();i._.filebrowserSe=this;var o=i.config["filebrowser"+t(n.getName())+"WindowWidth"]||i.config.filebrowserWindowWidth||"80%",n=i.config["filebrowser"+t(n.getName())+"WindowHeight"]||i.config.filebrowserWindowHeight||"70%",r=this.filebrowser.params||{};r.CKEditor=i.name,r.CKEditorFuncNum=i._.filebrowserFn,r.langCode||(r.langCode=i.langCode),r=e(this.filebrowser.url,r),i.popup(r,o,n,i.config.filebrowserWindowFeatures||i.config.fileBrowserWindowFeatures)}function i(){var e=this.getDialog();return e.getParentEditor()._.filebrowserSe=this,e.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value&&e.getContentElement(this["for"][0],this["for"][1]).getAction()?!0:!1}function o(t,n,i){var o=i.params||{};o.CKEditor=t.name,o.CKEditorFuncNum=t._.filebrowserFn,o.langCode||(o.langCode=t.langCode),n.action=e(i.url,o),n.filebrowser=i}function r(e,a,s,l){if(l&&l.length)for(var c,u=l.length;u--;)if(c=l[u],("hbox"==c.type||"vbox"==c.type||"fieldset"==c.type)&&r(e,a,s,c.children),c.filebrowser)if("string"==typeof c.filebrowser&&(c.filebrowser={action:"fileButton"==c.type?"QuickUpload":"Browse",target:c.filebrowser}),"Browse"==c.filebrowser.action){var d=c.filebrowser.url;void 0===d&&(d=e.config["filebrowser"+t(a)+"BrowseUrl"],void 0===d&&(d=e.config.filebrowserBrowseUrl)),d&&(c.onClick=n,c.filebrowser.url=d,c.hidden=!1)}else if("QuickUpload"==c.filebrowser.action&&c["for"]&&(d=c.filebrowser.url,void 0===d&&(d=e.config["filebrowser"+t(a)+"UploadUrl"],void 0===d&&(d=e.config.filebrowserUploadUrl)),d)){var h=c.onClick;c.onClick=function(e){var t=e.sender;return h&&h.call(t,e)===!1?!1:i.call(t,e)},c.filebrowser.url=d,c.hidden=!1,o(e,s.getContents(c["for"][0]).get(c["for"][1]),c.filebrowser)}}function a(e,t,n){if(-1!==n.indexOf(";")){for(var n=n.split(";"),i=0;il+T?h("top"):g.bottom-E.bottoml+T?h("top"):g.bottom>2*T+u&&h("pin"));var C,n=i.getViewPaneSize(),I=n.width/2,I=0E.width?"rtl"==t.config.contentsLangDirection?"right":"left":I-g.left>g.right-I?"left":"right";E.width>n.width?(I="left",C=0):(C="left"==I?0n.width&&(I="left"==I?"right":"left",C=0)),m.setStyle(I,o(("pin"==r?c:s)+C+("pin"==r?0:"left"==I?p:-p)))}else r="pin",h("pin"),d(n)}},a=CKEDITOR.document.getBody(),h={id:t.id,name:t.name,langDir:t.lang.dir,langCode:t.langCode},f=t.fire("uiSpace",{space:"top",html:""}).html;if(f){var m=a.append(CKEDITOR.dom.element.createFromHtml(n.output(CKEDITOR.tools.extend({topId:t.ui.spaceId("top"),content:f,style:"display:none;z-index:"+(t.config.baseFloatZIndex-1)},h))));m.unselectable(),m.on("mousedown",function(e){e=e.data,e.getTarget().hasAscendant("a",1)||e.preventDefault()}),t.on("focus",function(e){d(e),i.on("scroll",d),i.on("resize",d)}),t.on("blur",function(){m.hide(),i.removeListener("scroll",d),i.removeListener("resize",d)}),t.on("destroy",function(){i.removeListener("scroll",d),i.removeListener("resize",d),m.clearCustomData(),m.remove()}),t.focusManager.hasFocus&&m.show(),t.focusManager.add(m,1)}}var n=CKEDITOR.addTemplate("floatcontainer",'{content}');CKEDITOR.plugins.add("floatingspace",{init:function(e){e.on("loaded",function(){t(e)},null,null,20)}});var i=CKEDITOR.document.getWindow(),o=CKEDITOR.tools.cssLength}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var e=CKEDITOR.addTemplate("panel-list",'{items}
'),t=CKEDITOR.addTemplate("panel-list-item",'{text} '),n=CKEDITOR.addTemplate("panel-list-group",'{label}
');CKEDITOR.ui.panel.prototype.addListBlock=function(e,t){return this.addBlock(e,new CKEDITOR.ui.listBlock(this.getHolderElement(),t))},CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(e,t){var t=t||{},n=t.attributes||(t.attributes={});(this.multiSelect=!!t.multiSelect)&&(n["aria-multiselectable"]=!0),!n.role&&(n.role="listbox"),this.base.apply(this,arguments),this.element.setAttribute("role",n.role),n=this.keys,n[40]="next",n[9]="next",n[38]="prev",n[CKEDITOR.SHIFT+9]="prev",n[32]=CKEDITOR.env.ie?"mouseup":"click",CKEDITOR.env.ie&&(n[13]="mouseup"),this._.pendingHtml=[],this._.pendingList=[],this._.items={},this._.groups={}},_:{close:function(){if(this._.started){var t=e.output({items:this._.pendingList.join("")});this._.pendingList=[],this._.pendingHtml.push(t),delete this._.started}},getClick:function(){return this._.click||(this._.click=CKEDITOR.tools.addFunction(function(e){var t=this.toggle(e);
this.onClick&&this.onClick(e,t)},this)),this._.click}},proto:{add:function(e,n,i){var o=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0),this._.items[e]=o,e={id:o,val:e,onclick:CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:i||e,text:n||e},this._.pendingList.push(t.output(e))},startGroup:function(e){this._.close();var t=CKEDITOR.tools.getNextId();this._.groups[e]=t,this._.pendingHtml.push(n.output({id:t,label:e}))},commit:function(){this._.close(),this.element.appendHtml(this._.pendingHtml.join("")),delete this._.size,this._.pendingHtml=[]},toggle:function(e){var t=this.isMarked(e);return t?this.unmark(e):this.mark(e),!t},hideGroup:function(e){var t=(e=this.element.getDocument().getById(this._.groups[e]))&&e.getNext();e&&(e.setStyle("display","none"),t&&"ul"==t.getName()&&t.setStyle("display","none"))},hideItem:function(e){this.element.getDocument().getById(this._.items[e]).setStyle("display","none")},showAll:function(){var e,t=this._.items,n=this._.groups,i=this.element.getDocument();for(e in t)i.getById(t[e]).setStyle("display","");for(var o in n)t=i.getById(n[o]),e=t.getNext(),t.setStyle("display",""),e&&"ul"==e.getName()&&e.setStyle("display","")},mark:function(e){this.multiSelect||this.unmarkAll();var e=this._.items[e],t=this.element.getDocument().getById(e);t.addClass("cke_selected"),this.element.getDocument().getById(e+"_option").setAttribute("aria-selected",!0),this.onMark&&this.onMark(t)},unmark:function(e){var t=this.element.getDocument(),e=this._.items[e],n=t.getById(e);n.removeClass("cke_selected"),t.getById(e+"_option").removeAttribute("aria-selected"),this.onUnmark&&this.onUnmark(n)},unmarkAll:function(){var e,t=this._.items,n=this.element.getDocument();for(e in t){var i=t[e];n.getById(i).removeClass("cke_selected"),n.getById(i+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(e){return this.element.getDocument().getById(this._.items[e]).hasClass("cke_selected")},focus:function(e){this._.focusIndex=-1;var t,n=this.element.getElementsByTag("a"),i=-1;if(e){for(t=this.element.getDocument().getById(this._.items[e]).getFirst();e=n.getItem(++i);)if(e.equals(t)){this._.focusIndex=i;break}}else this.element.focus();t&&setTimeout(function(){t.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var e='{label}{label}'+(CKEDITOR.env.hc?"▼":CKEDITOR.env.air?" ":"")+""),t=CKEDITOR.addTemplate("combo",e);CKEDITOR.UI_RICHCOMBO="richcombo",CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(e){CKEDITOR.tools.extend(this,e,{canGroup:!1,title:e.label,modes:{wysiwyg:1},editorFocus:1}),e=this.panel||{},delete this.panel,this.id=CKEDITOR.tools.getNextNumber(),this.document=e.parent&&e.parent.getDocument()||CKEDITOR.document,e.className="cke_combopanel",e.block={multiSelect:e.multiSelect,attributes:e.attributes},e.toolbarRelated=!0,this._={panelDefinition:e,items:{}}},proto:{renderHtml:function(e){var t=[];return this.render(e,t),t.join("")},render:function(e,n){function i(){var t=this.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;this.setState(e.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:t),this.setValue("")}var o=CKEDITOR.env,r="cke_"+this.id,a=CKEDITOR.tools.addFunction(function(t){d&&(e.unlockSelection(1),d=0),l.execute(t)},this),s=this,l={id:r,combo:this,focus:function(){CKEDITOR.document.getById(r).getChild(1).focus()},execute:function(t){var n=s._;if(n.state!=CKEDITOR.TRISTATE_DISABLED)if(s.createPanel(e),n.on)n.panel.hide();else{s.commit();var i=s.getValue();i?n.list.mark(i):n.list.unmarkAll(),n.panel.showBlock(s.id,new CKEDITOR.dom.element(t),4)}},clickFn:a};e.on("mode",i,this),!this.readOnly&&e.on("readOnly",i,this);var c=CKEDITOR.tools.addFunction(function(e,t){var e=new CKEDITOR.dom.event(e),n=e.getKeystroke();switch(n){case 13:case 32:case 40:CKEDITOR.tools.callFunction(a,t);break;default:l.onkey(l,n)}e.preventDefault()}),u=CKEDITOR.tools.addFunction(function(){l.onfocus&&l.onfocus()}),d=0,h=CKEDITOR.tools.addFunction(function(){if(CKEDITOR.env.opera){var t=e.editable();t.isInline()&&t.hasFocus&&(e.lockSelection(),d=1)}});return l.keyDownFn=c,o={id:r,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:o.gecko&&10900<=o.version&&!o.hc?"":(this.title||"").replace("'",""),keydownFn:c,mousedownFn:h,focusFn:u,clickFn:a},t.output(o,n),this.onRender&&this.onRender(),l},createPanel:function(e){if(!this._.panel){var t=this._.panelDefinition,n=this._.panelDefinition.block,i=t.parent||CKEDITOR.document.getBody(),o="cke_combopanel__"+this.name,r=new CKEDITOR.ui.floatPanel(e,i,t),a=r.addListBlock(this.id,n),s=this;r.onShow=function(){this.element.addClass(o),s.setState(CKEDITOR.TRISTATE_ON),s._.on=1,s.editorFocus&&e.focus(),s.onOpen&&s.onOpen(),a.focus(!a.multiSelect&&s.getValue())},r.onHide=function(t){this.element.removeClass(o),s.setState(s.modes&&s.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),s._.on=0,!t&&s.onClose&&s.onClose()},r.onEscape=function(){r.hide(1)},a.onClick=function(e,t){s.onClick&&s.onClick.call(s,e,t),r.hide()},this._.panel=r,this._.list=a,r.getBlock(this.id).onHide=function(){s._.on=0,s.setState(CKEDITOR.TRISTATE_OFF)},this.init&&this.init()}},setValue:function(e,t){this._.value=e;var n=this.document.getById("cke_"+this.id+"_text");n&&(e||t?n.removeClass("cke_combo_inlinelabel"):(t=this.label,n.addClass("cke_combo_inlinelabel")),n.setText("undefined"!=typeof t?t:e))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(e){this._.list.mark(e)},hideItem:function(e){this._.list.hideItem(e)},hideGroup:function(e){this._.list.hideGroup(e)},showAll:function(){this._.list.showAll()},add:function(e,t,n){this._.items[e]=n||e,this._.list.add(e,t,n)},startGroup:function(e){this._.list.startGroup(e)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this)),this._.committed=1},setState:function(e){if(this._.state!=e){var t=this.document.getById("cke_"+this.id);t.setState(e,"cke_combo"),e==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled"),this._.state=e}},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(e){return new CKEDITOR.ui.richCombo(e)}}}}),CKEDITOR.ui.prototype.addRichCombo=function(e,t){this.add(e,CKEDITOR.UI_RICHCOMBO,t)}}(),CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(e){if(!e.blockless){for(var t=e.config,n=e.lang.format,i=t.format_tags.split(";"),o={},r=0,a=[],s=0;s ",this.lineBreakChars="\n",this.sortAttributes=1,this._.indent=0,this._.indentation="",this._.inPre=0,this._.rules={};var e,t=CKEDITOR.dtd;for(e in CKEDITOR.tools.extend({},t.$nonBodyContent,t.$block,t.$listItem,t.$tableContent))this.setRules(e,{indent:!t[e]["#"],breakBeforeOpen:1,breakBeforeClose:!t[e]["#"],breakAfterClose:1,needsSpace:e in t.$block&&!(e in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1}),this.setRules("title",{indent:0,breakAfterOpen:0}),this.setRules("style",{indent:0,breakBeforeClose:1}),this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(e){var t=this._.rules[e];this._.afterCloser&&t&&t.needsSpace&&this._.needsSpace&&this._.output.push("\n"),this._.indent?this.indentation():t&&t.breakBeforeOpen&&(this.lineBreak(),this.indentation()),this._.output.push("<",e),this._.afterCloser=0},openTagClose:function(e,t){var n=this._.rules[e];t?(this._.output.push(this.selfClosingEnd),n&&n.breakAfterClose&&(this._.needsSpace=n.needsSpace)):(this._.output.push(">"),n&&n.indent&&(this._.indentation+=this.indentationChars)),n&&n.breakAfterOpen&&this.lineBreak(),"pre"==e&&(this._.inPre=1)},attribute:function(e,t){"string"==typeof t&&(this.forceSimpleAmpersand&&(t=t.replace(/&/g,"&")),t=CKEDITOR.tools.htmlEncodeAttr(t)),this._.output.push(" ",e,'="',t,'"')},closeTag:function(e){var t=this._.rules[e];t&&t.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length)),this._.indent?this.indentation():t&&t.breakBeforeClose&&(this.lineBreak(),this.indentation()),this._.output.push("",e,">"),"pre"==e&&(this._.inPre=0),t&&t.breakAfterClose&&(this.lineBreak(),this._.needsSpace=t.needsSpace),this._.afterCloser=1},text:function(e){this._.indent&&(this.indentation(),!this._.inPre&&(e=CKEDITOR.tools.ltrim(e))),this._.output.push(e)},comment:function(e){this._.indent&&this.indentation(),this._.output.push("")},lineBreak:function(){!this._.inPre&&0CKEDITOR.env.version&&(i.innerHTML=i.innerHTML.replace(/^.*<\!-- cke-content-start --\>/,""),setTimeout(function(){var e=new CKEDITOR.dom.range(new CKEDITOR.dom.document(n));e.setStart(new CKEDITOR.dom.node(i),0),t.getSelection().selectRanges([e])},0))),i.contentEditable=!0,CKEDITOR.env.ie&&(i.hideFocus=!0,i.disabled=!0,i.removeAttribute("disabled")),delete this._.isLoadingData,this.$=i,n=new CKEDITOR.dom.document(n),this.setup(),CKEDITOR.env.ie&&(n.getDocumentElement().addClass(n.$.compatMode),t.config.enterMode!=CKEDITOR.ENTER_P&&n.on("selectionchange",function(){var e=n.getBody(),i=t.getSelection(),o=i&&i.getRanges()[0];o&&e.getHtml().match(/^ <\/p>$/i)&&o.startContainer.equals(e)&&setTimeout(function(){o=t.getSelection().getRanges()[0],o.startContainer.equals("body")||(e.getFirst().remove(1),o.moveToElementEditEnd(e),o.select())},0)}));try{t.document.$.execCommand("2D-position",!1,!0)}catch(o){}try{t.document.$.execCommand("enableInlineTableEditing",!1,!t.config.disableNativeTableHandles)}catch(r){}if(t.config.disableObjectResizing)try{this.getDocument().$.execCommand("enableObjectResizing",!1,!1)}catch(a){this.attachListener(this,CKEDITOR.env.ie?"resizestart":"resize",function(e){e.data.preventDefault()})}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==t.document.$.compatMode)&&this.attachListener(this,"keydown",function(e){var n=e.data.getKeystroke();if(33==n||34==n)if(CKEDITOR.env.ie)setTimeout(function(){t.getSelection().scrollIntoView()},0);else if(t.window.$.innerHeight>this.$.offsetHeight){var i=t.createRange();i[33==n?"moveToElementEditStart":"moveToElementEditEnd"](this),i.select(),e.data.preventDefault()}}),CKEDITOR.env.ie&&this.attachListener(n,"blur",function(){try{n.$.selection.empty()}catch(e){}}),t.document.getElementsByTag("title").getItem(0).data("cke-title",t.document.$.title),CKEDITOR.env.ie&&(t.document.$.title=this._.docTitle),CKEDITOR.tools.setTimeout(function(){t.fire("contentDom"),this._.isPendingFocus&&(t.focus(),this._.isPendingFocus=!1),setTimeout(function(){t.fire("dataReady")},0),CKEDITOR.env.ie&&setTimeout(function(){if(t.document){var e=t.document.$.body;e.runtimeStyle.marginBottom="0px",e.runtimeStyle.marginBottom=""}},1e3)},0,this)}function t(){var e=[];if(8<=CKEDITOR.document.$.documentMode){e.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}");var t,n=[];for(t in CKEDITOR.dtd.$removeEmpty)n.push("html.CSS1Compat "+t+"[contenteditable=false]");e.push(n.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(e.push("html{height:100% !important}"),e.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));return e.push("html{cursor:text;*cursor:auto}"),e.push("img,input,textarea{cursor:default}"),e.join("\n")}CKEDITOR.plugins.add("wysiwygarea",{init:function(e){e.config.fullPage&&e.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"}),e.addMode("wysiwyg",function(t){function i(i){i&&i.removeListener(),e.editable(new n(e,r.$.contentWindow.document.body)),e.setData(e.getData(1),t)}var o="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",o=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent(o)+"}())":"",r=CKEDITOR.dom.element.createFromHtml('');r.setStyles({width:"100%",height:"100%"}),r.addClass("cke_wysiwyg_frame cke_reset");var a=e.ui.space("contents");a.append(r),(o=CKEDITOR.env.ie||CKEDITOR.env.gecko)&&r.on("load",i);var s=e.title,l=e.lang.common.editorHelp;s&&(CKEDITOR.env.ie&&(s+=", "+l),r.setAttribute("title",s));var s=CKEDITOR.tools.getNextId(),c=CKEDITOR.dom.element.createFromHtml(''+l+"");a.append(c,1),e.on("beforeModeUnload",function(e){e.removeListener(),c.remove()}),r.setAttributes({"aria-describedby":s,tabIndex:e.tabIndex,allowTransparency:"true"}),!o&&i(),CKEDITOR.env.webkit&&(o=function(){a.setStyle("width","100%"),r.hide(),r.setSize("width",a.getSize("width")),a.removeStyle("width"),r.show()},r.setCustomData("onResize",o),CKEDITOR.document.getWindow().on("resize",o)),e.fire("ariaWidget",r)})}});var n=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments),this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(t){CKEDITOR.tools.setTimeout(e,0,this,t)},this),this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(e,n){var i=this.editor;if(n)this.setHtml(e),i.fire("dataReady");else{this._.isLoadingData=!0,i._.dataStore={id:1};var o=i.config,r=o.fullPage,a=o.docType,s=CKEDITOR.tools.buildStyleHtml(t()).replace(/
"].join("")),t.setAttribute("aria-labelledby",o),this._.tabs[e.id]=[n,t],this._.tabIdList.push(e.id),!e.hidden&&this._.pageCount++,this._.lastTab=n,this.updateStyle(),t.setAttribute("name",e.id),t.appendTo(this.parts.contents),n.unselectable(),this.parts.tabs.append(n),e.accessKey&&(_(this,this,"CTRL+"+e.accessKey,N,k),this._.accessKeyMap["CTRL+"+e.accessKey]=e.id)}},selectPage:function(e){if(this._.currentTabId!=e&&!0!==this.fire("selectPage",{page:e,currentPage:this._.currentTabId})){for(var t in this._.tabs){var i=this._.tabs[t][0],o=this._.tabs[t][1];t!=e&&(i.removeClass("cke_dialog_tab_selected"),o.hide()),o.setAttribute("aria-hidden",t!=e)}var r=this._.tabs[e];r[0].addClass("cke_dialog_tab_selected"),CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(n(r[1]),r[1].show(),setTimeout(function(){n(r[1],1)},0)):r[1].show(),this._.currentTabId=e,this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,e)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(t){var n=this._.tabs[t]&&this._.tabs[t][0];n&&1!=this._.pageCount&&n.isVisible()&&(t==this._.currentTabId&&this.selectPage(e.call(this)),n.hide(),this._.pageCount--,this.updateStyle())},showPage:function(e){(e=this._.tabs[e]&&this._.tabs[e][0])&&(e.show(),this._.pageCount++,this.updateStyle())},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(e,t){var n=this._.contents[e];return n&&n[t]},getValueOf:function(e,t){return this.getContentElement(e,t).getValue()},setValueOf:function(e,t,n){return this.getContentElement(e,t).setValue(n)},getButton:function(e){return this._.buttons[e]},click:function(e){return this._.buttons[e].click()},disableButton:function(e){return this._.buttons[e].disable()},enableButton:function(e){return this._.buttons[e].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(e,t){if("undefined"==typeof t)t=this._.focusList.length,this._.focusList.push(new a(this,e,t));else{this._.focusList.splice(t,0,new a(this,e,t));for(var n=t+1;n ',e.document),i.insertAfter(d),d.mergeSiblings(!1),e.moveToBookmark({startNode:i})):e.setStart(h.getParent(),t)),e.collapse(!0)),o&&a.remove(),r&&s.$.parentNode&&s.remove()},r={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},a=CKEDITOR.dom.walker.bogus(),s=new CKEDITOR.dom.walker.whitespaces,l=new CKEDITOR.dom.walker.bookmark,c=/^[\t\r\n ]*(?: |\xa0)$/;CKEDITOR.dom.range.prototype={clone:function(){var e=new CKEDITOR.dom.range(this.root);return e.startContainer=this.startContainer,e.startOffset=this.startOffset,e.endContainer=this.endContainer,e.endOffset=this.endOffset,e.collapsed=this.collapsed,e},collapse:function(e){e?(this.endContainer=this.startContainer,this.endOffset=this.startOffset):(this.startContainer=this.endContainer,this.startOffset=this.endOffset),this.collapsed=!0},cloneContents:function(){var e=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||o(this,2,e),e},deleteContents:function(e){this.collapsed||o(this,0,null,e)},extractContents:function(e){var t=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||o(this,1,t,e),t},createBookmark:function(e){var t,n,i,o,r=this.collapsed;return t=this.document.createElement("span"),t.data("cke-bookmark",1),t.setStyle("display","none"),t.setHtml(" "),e&&(i="cke_bm_"+CKEDITOR.tools.getNextNumber(),t.setAttribute("id",i+(r?"C":"S"))),r||(n=t.clone(),n.setHtml(" "),e&&n.setAttribute("id",i+"E"),o=this.clone(),o.collapse(),o.insertNode(n)),o=this.clone(),o.collapse(!0),o.insertNode(t),n?(this.setStartAfter(t),this.setEndBefore(n)):this.moveToPosition(t,CKEDITOR.POSITION_AFTER_END),{startNode:e?i+(r?"C":"S"):t,endNode:e?i+"E":n,serializable:e,collapsed:r}},createBookmark2:function(e){var t,n,i=this.startContainer,o=this.endContainer,r=this.startOffset,a=this.endOffset,s=this.collapsed;if(!i||!o)return{start:0,end:0};if(e){for(i.type==CKEDITOR.NODE_ELEMENT&&((t=i.getChild(r))&&t.type==CKEDITOR.NODE_TEXT&&r>0&&t.getPrevious().type==CKEDITOR.NODE_TEXT&&(i=t,r=0),t&&t.type==CKEDITOR.NODE_ELEMENT&&(r=t.getIndex(1)));i.type==CKEDITOR.NODE_TEXT&&(n=i.getPrevious())&&n.type==CKEDITOR.NODE_TEXT;)i=n,r+=n.getLength();if(!s)for(o.type==CKEDITOR.NODE_ELEMENT&&((t=o.getChild(a))&&t.type==CKEDITOR.NODE_TEXT&&a>0&&t.getPrevious().type==CKEDITOR.NODE_TEXT&&(o=t,a=0),t&&t.type==CKEDITOR.NODE_ELEMENT&&(a=t.getIndex(1)));o.type==CKEDITOR.NODE_TEXT&&(n=o.getPrevious())&&n.type==CKEDITOR.NODE_TEXT;)o=n,a+=n.getLength()}return{start:i.getAddress(e),end:s?null:o.getAddress(e),startOffset:r,endOffset:a,normalized:e,collapsed:s,is2:!0}},moveToBookmark:function(e){if(e.is2){var t=this.document.getByAddress(e.start,e.normalized),n=e.startOffset,i=e.end&&this.document.getByAddress(e.end,e.normalized),e=e.endOffset;this.setStart(t,n),i?this.setEnd(i,e):this.collapse(!0)}else t=(n=e.serializable)?this.document.getById(e.startNode):e.startNode,e=n?this.document.getById(e.endNode):e.endNode,this.setStartBefore(t),t.remove(),e?(this.setEndBefore(e),e.remove()):this.collapse(!0)},getBoundaryNodes:function(){var e,t=this.startContainer,n=this.endContainer,i=this.startOffset,o=this.endOffset;if(t.type==CKEDITOR.NODE_ELEMENT)if(e=t.getChildCount(),e>i)t=t.getChild(i);else if(1>e)t=t.getPreviousSourceNode();else{for(t=t.$;t.lastChild;)t=t.lastChild;t=new CKEDITOR.dom.node(t),t=t.getNextSourceNode()||t}if(n.type==CKEDITOR.NODE_ELEMENT)if(e=n.getChildCount(),e>o)n=n.getChild(o).getPreviousSourceNode(!0);else if(1>e)n=n.getPreviousSourceNode();else{for(n=n.$;n.lastChild;)n=n.lastChild;n=new CKEDITOR.dom.node(n)}return t.getPosition(n)&CKEDITOR.POSITION_FOLLOWING&&(t=n),{startNode:t,endNode:n}},getCommonAncestor:function(e,t){var n=this.startContainer,i=this.endContainer,n=n.equals(i)?e&&n.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?n.getChild(this.startOffset):n:n.getCommonAncestor(i);return t&&!n.is?n.getParent():n},optimize:function(){var e=this.startContainer,t=this.startOffset;e.type!=CKEDITOR.NODE_ELEMENT&&(t?t>=e.getLength()&&this.setStartAfter(e):this.setStartBefore(e)),e=this.endContainer,t=this.endOffset,e.type!=CKEDITOR.NODE_ELEMENT&&(t?t>=e.getLength()&&this.setEndAfter(e):this.setEndBefore(e))},optimizeBookmark:function(){var e=this.startContainer,t=this.endContainer;e.is&&e.is("span")&&e.data("cke-bookmark")&&this.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),t&&t.is&&t.is("span")&&t.data("cke-bookmark")&&this.setEndAt(t,CKEDITOR.POSITION_AFTER_END)},trim:function(e,t){var n=this.startContainer,i=this.startOffset,o=this.collapsed;if((!e||o)&&n&&n.type==CKEDITOR.NODE_TEXT){if(i)if(i>=n.getLength())i=n.getIndex()+1,n=n.getParent();else{var r=n.split(i),i=n.getIndex()+1,n=n.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(r,this.endOffset-this.startOffset):n.equals(this.endContainer)&&(this.endOffset=this.endOffset+1)}else i=n.getIndex(),n=n.getParent();if(this.setStart(n,i),o)return void this.collapse(!0)}n=this.endContainer,i=this.endOffset,t||o||!n||n.type!=CKEDITOR.NODE_TEXT||(i?(i>=n.getLength()||n.split(i),i=n.getIndex()+1):i=n.getIndex(),n=n.getParent(),this.setEnd(n,i))},enlarge:function(e,t){switch(e){case CKEDITOR.ENLARGE_INLINE:var n=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var i,o,r,a,s,l,c,u=this.getCommonAncestor(),d=this.root,h=!1;for(l=this.startContainer,c=this.startOffset,l.type==CKEDITOR.NODE_TEXT?(c&&(l=!CKEDITOR.tools.trim(l.substring(0,c)).length&&l,h=!!l),l&&!(a=l.getPrevious())&&(r=l.getParent())):(c&&(a=l.getChild(c-1)||l.getLast()),a||(r=l));r||a;){if(r&&!a){if(!s&&r.equals(u)&&(s=!0),n?r.isBlockBoundary():!d.contains(r))break;h&&"inline"==r.getComputedStyle("display")||(h=!1,s?i=r:this.setStartBefore(r)),a=r.getPrevious()}for(;a;)if(l=!1,a.type==CKEDITOR.NODE_COMMENT)a=a.getPrevious();else{if(a.type==CKEDITOR.NODE_TEXT)c=a.getText(),/[^\s\ufeff]/.test(c)&&(a=null),l=/[\s\ufeff]$/.test(c);else if((a.$.offsetWidth>0||t&&a.is("br"))&&!a.data("cke-bookmark"))if(h&&CKEDITOR.dtd.$removeEmpty[a.getName()]){if(c=a.getText(),/[^\s\ufeff]/.test(c))a=null;else for(var f,m=a.$.getElementsByTagName("*"),E=0;f=m[E++];)if(!CKEDITOR.dtd.$removeEmpty[f.nodeName.toLowerCase()]){a=null;break}a&&(l=!!c.length)}else a=null;if(l&&(h?s?i=r:r&&this.setStartBefore(r):h=!0),a){if(l=a.getPrevious(),!r&&!l){r=a,a=null;break}a=l}else r=null}r&&(r=r.getParent())}for(l=this.endContainer,c=this.endOffset,r=a=null,s=h=!1,l.type==CKEDITOR.NODE_TEXT?(l=!CKEDITOR.tools.trim(l.substring(c)).length&&l,h=!(l&&l.getLength()),l&&!(a=l.getNext())&&(r=l.getParent())):(a=l.getChild(c))||(r=l);r||a;){if(r&&!a){if(!s&&r.equals(u)&&(s=!0),n?r.isBlockBoundary():!d.contains(r))break;h&&"inline"==r.getComputedStyle("display")||(h=!1,s?o=r:r&&this.setEndAfter(r)),a=r.getNext()}for(;a;){if(l=!1,a.type==CKEDITOR.NODE_TEXT)c=a.getText(),/[^\s\ufeff]/.test(c)&&(a=null),l=/^[\s\ufeff]/.test(c);else if(a.type==CKEDITOR.NODE_ELEMENT){if((a.$.offsetWidth>0||t&&a.is("br"))&&!a.data("cke-bookmark"))if(h&&CKEDITOR.dtd.$removeEmpty[a.getName()]){if(c=a.getText(),/[^\s\ufeff]/.test(c))a=null;else for(m=a.$.getElementsByTagName("*"),E=0;f=m[E++];)if(!CKEDITOR.dtd.$removeEmpty[f.nodeName.toLowerCase()]){a=null;break}a&&(l=!!c.length)}else a=null}else l=1;if(l&&h&&(s?o=r:this.setEndAfter(r)),a){if(l=a.getNext(),!r&&!l){r=a,a=null;break}a=l}else r=null}r&&(r=r.getParent())}i&&o&&(u=i.contains(o)?o:i,this.setStartBefore(u),this.setEndAfter(u));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:r=new CKEDITOR.dom.range(this.root),d=this.root,r.setStartAt(d,CKEDITOR.POSITION_AFTER_START),r.setEnd(this.startContainer,this.startOffset),r=new CKEDITOR.dom.walker(r);var g,T,p=CKEDITOR.dom.walker.blockBoundary(e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),C=function(e){var t=p(e);return t||(g=e),t},n=function(e){var t=C(e);return!t&&e.is&&e.is("br")&&(T=e),t};if(r.guard=C,r=r.lastBackward(),g=g||d,this.setStartAt(g,!g.is("br")&&(!r&&this.checkStartOfBlock()||r&&g.contains(r))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END),e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){r=this.clone(),r=new CKEDITOR.dom.walker(r);var I=CKEDITOR.dom.walker.whitespaces(),O=CKEDITOR.dom.walker.bookmark();if(r.evaluator=function(e){return!I(e)&&!O(e)},(r=r.previous())&&r.type==CKEDITOR.NODE_ELEMENT&&r.is("br"))break}r=this.clone(),r.collapse(),r.setEndAt(d,CKEDITOR.POSITION_BEFORE_END),r=new CKEDITOR.dom.walker(r),r.guard=e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?n:C,g=null,r=r.lastForward(),g=g||d,this.setEndAt(g,!r&&this.checkEndOfBlock()||r&&g.contains(r)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START),T&&this.setEndAfter(T)}},shrink:function(e,t,n){if(!this.collapsed){var e=e||CKEDITOR.SHRINK_TEXT,i=this.clone(),o=this.startContainer,r=this.endContainer,a=this.startOffset,s=this.endOffset,l=1,c=1;o&&o.type==CKEDITOR.NODE_TEXT&&(a?a>=o.getLength()?i.setStartAfter(o):(i.setStartBefore(o),l=0):i.setStartBefore(o)),r&&r.type==CKEDITOR.NODE_TEXT&&(s?s>=r.getLength()?i.setEndAfter(r):(i.setEndAfter(r),c=0):i.setEndBefore(r));var i=new CKEDITOR.dom.walker(i),u=CKEDITOR.dom.walker.bookmark();i.evaluator=function(t){return t.type==(e==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var d;return i.guard=function(t,i){return u(t)?!0:e==CKEDITOR.SHRINK_ELEMENT&&t.type==CKEDITOR.NODE_TEXT||i&&t.equals(d)||n===!1&&t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary()?!1:(!i&&t.type==CKEDITOR.NODE_ELEMENT&&(d=t),!0)},l&&(o=i[e==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(o,t?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START),c&&(i.reset(),(i=i[e==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(i,t?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)),!(!l&&!c)}},insertNode:function(e){this.optimizeBookmark(),this.trim(!1,!0);var t=this.startContainer,n=t.getChild(this.startOffset);n?e.insertBefore(n):t.append(e),e.getParent()&&e.getParent().equals(this.endContainer)&&this.endOffset++,this.setStartBefore(e)},moveToPosition:function(e,t){this.setStartAt(e,t),this.collapse(!0)},moveToRange:function(e){this.setStart(e.startContainer,e.startOffset),this.setEnd(e.endContainer,e.endOffset)
},selectNodeContents:function(e){this.setStart(e,0),this.setEnd(e,e.type==CKEDITOR.NODE_TEXT?e.getLength():e.getChildCount())},setStart:function(e,t){e.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[e.getName()]&&(t=e.getIndex(),e=e.getParent()),this.startContainer=e,this.startOffset=t,this.endContainer||(this.endContainer=e,this.endOffset=t),i(this)},setEnd:function(e,t){e.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[e.getName()]&&(t=e.getIndex()+1,e=e.getParent()),this.endContainer=e,this.endOffset=t,this.startContainer||(this.startContainer=e,this.startOffset=t),i(this)},setStartAfter:function(e){this.setStart(e.getParent(),e.getIndex()+1)},setStartBefore:function(e){this.setStart(e.getParent(),e.getIndex())},setEndAfter:function(e){this.setEnd(e.getParent(),e.getIndex()+1)},setEndBefore:function(e){this.setEnd(e.getParent(),e.getIndex())},setStartAt:function(e,t){switch(t){case CKEDITOR.POSITION_AFTER_START:this.setStart(e,0);break;case CKEDITOR.POSITION_BEFORE_END:e.type==CKEDITOR.NODE_TEXT?this.setStart(e,e.getLength()):this.setStart(e,e.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(e);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(e)}i(this)},setEndAt:function(e,t){switch(t){case CKEDITOR.POSITION_AFTER_START:this.setEnd(e,0);break;case CKEDITOR.POSITION_BEFORE_END:e.type==CKEDITOR.NODE_TEXT?this.setEnd(e,e.getLength()):this.setEnd(e,e.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(e);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(e)}i(this)},fixBlock:function(e,t){var n=this.createBookmark(),i=this.document.createElement(t);return this.collapse(e),this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),this.extractContents().appendTo(i),i.trim(),CKEDITOR.env.ie||i.appendBogus(),this.insertNode(i),this.moveToBookmark(n),i},splitBlock:function(e){var t=new CKEDITOR.dom.elementPath(this.startContainer,this.root),n=new CKEDITOR.dom.elementPath(this.endContainer,this.root),i=t.block,o=n.block,r=null;return t.blockLimit.equals(n.blockLimit)?("br"!=e&&(i||(i=this.fixBlock(!0,e),o=new CKEDITOR.dom.elementPath(this.endContainer,this.root).block),o||(o=this.fixBlock(!1,e))),e=i&&this.checkStartOfBlock(),t=o&&this.checkEndOfBlock(),this.deleteContents(),i&&i.equals(o)&&(t?(r=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(o,CKEDITOR.POSITION_AFTER_END),o=null):e?(r=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(i,CKEDITOR.POSITION_BEFORE_START),i=null):(o=this.splitElement(i),!CKEDITOR.env.ie&&!i.is("ul","ol")&&i.appendBogus())),{previousBlock:i,nextBlock:o,wasStartOfBlock:e,wasEndOfBlock:t,elementPath:r}):null},splitElement:function(e){if(!this.collapsed)return null;this.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);var t=this.extractContents(),n=e.clone(!1);return t.appendTo(n),n.insertAfter(e),this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END),n},removeEmptyBlocksAtEnd:function(){function e(e){return function(i){return t(i)||n(i)||i.type==CKEDITOR.NODE_ELEMENT&&i.isEmptyInlineRemoveable()||e.is("table")&&i.is("caption")?!1:!0}}var t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(!1);return function(t){for(var n,i=this.createBookmark(),o=this[t?"endPath":"startPath"](),r=o.block||o.blockLimit;r&&!r.equals(o.root)&&!r.getFirst(e(r));)n=r.getParent(),this[t?"setEndAt":"setStartAt"](r,CKEDITOR.POSITION_AFTER_END),r.remove(1),r=n;this.moveToBookmark(i)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(e,n){var i=n==CKEDITOR.START,o=this.clone();return o.collapse(i),o[i?"setStartAt":"setEndAt"](e,i?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),o=new CKEDITOR.dom.walker(o),o.evaluator=t(i),o[i?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var t=this.startContainer,n=this.startOffset;return CKEDITOR.env.ie&&n&&t.type==CKEDITOR.NODE_TEXT&&(t=CKEDITOR.tools.ltrim(t.substring(0,n)),c.test(t)&&this.trim(0,1)),this.trim(),t=new CKEDITOR.dom.elementPath(this.startContainer,this.root),n=this.clone(),n.collapse(!0),n.setStartAt(t.block||t.blockLimit,CKEDITOR.POSITION_AFTER_START),t=new CKEDITOR.dom.walker(n),t.evaluator=e(),t.checkBackward()},checkEndOfBlock:function(){var t=this.endContainer,n=this.endOffset;return CKEDITOR.env.ie&&t.type==CKEDITOR.NODE_TEXT&&(t=CKEDITOR.tools.rtrim(t.substring(n)),c.test(t)&&this.trim(1,0)),this.trim(),t=new CKEDITOR.dom.elementPath(this.endContainer,this.root),n=this.clone(),n.collapse(!1),n.setEndAt(t.block||t.blockLimit,CKEDITOR.POSITION_BEFORE_END),t=new CKEDITOR.dom.walker(n),t.evaluator=e(),t.checkForward()},getPreviousNode:function(e,t,n){var i=this.clone();return i.collapse(1),i.setStartAt(n||this.root,CKEDITOR.POSITION_AFTER_START),n=new CKEDITOR.dom.walker(i),n.evaluator=e,n.guard=t,n.previous()},getNextNode:function(e,t,n){var i=this.clone();return i.collapse(),i.setEndAt(n||this.root,CKEDITOR.POSITION_BEFORE_END),n=new CKEDITOR.dom.walker(i),n.evaluator=e,n.guard=t,n.next()},checkReadOnly:function(){function e(e,t){for(;e;){if(e.type==CKEDITOR.NODE_ELEMENT){if("false"==e.getAttribute("contentEditable")&&!e.data("cke-editable"))return 0;if(e.is("html")||"true"==e.getAttribute("contentEditable")&&(e.contains(t)||e.equals(t)))break}e=e.getParent()}return 1}return function(){var t=this.startContainer,n=this.endContainer;return!(e(t,n)&&e(n,t))}}(),moveToElementEditablePosition:function(e,t){if(e.type==CKEDITOR.NODE_ELEMENT&&!e.isEditable(!1))return this.moveToPosition(e,t?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var i=0;e;){if(e.type==CKEDITOR.NODE_TEXT){t&&this.checkEndOfBlock()&&c.test(e.getText())?this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(e,t?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),i=1;break}e.type==CKEDITOR.NODE_ELEMENT&&(e.isEditable()?(this.moveToPosition(e,t?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),i=1):t&&e.is("br")&&this.checkEndOfBlock()&&this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START));var o=e,r=i,a=void 0;o.type==CKEDITOR.NODE_ELEMENT&&o.isEditable(!1)&&(a=o[t?"getLast":"getFirst"](n)),!r&&!a&&(a=o[t?"getPrevious":"getNext"](n)),e=a}return!!i},moveToElementEditStart:function(e){return this.moveToElementEditablePosition(e)},moveToElementEditEnd:function(e){return this.moveToElementEditablePosition(e,!0)},getEnclosedNode:function(){var e=this.clone();if(e.optimize(),e.startContainer.type!=CKEDITOR.NODE_ELEMENT||e.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var e=new CKEDITOR.dom.walker(e),t=CKEDITOR.dom.walker.bookmark(!1,!0),n=CKEDITOR.dom.walker.whitespaces(!0);e.evaluator=function(e){return n(e)&&t(e)};var i=e.next();return e.reset(),i&&i.equals(e.previous())?i:null},getTouchedStartNode:function(){var e=this.startContainer;return this.collapsed||e.type!=CKEDITOR.NODE_ELEMENT?e:e.getChild(this.startOffset)||e},getTouchedEndNode:function(){var e=this.endContainer;return this.collapsed||e.type!=CKEDITOR.NODE_ELEMENT?e:e.getChild(this.endOffset-1)||e},scrollIntoView:function(){var e,t,n,i=new CKEDITOR.dom.element.createFromHtml("