-1)t.data.preventDefault();else{this.keyEventsStack.cleanUp(t),t=this.undoManager,this.keyEventsStack.getLast(i)||this.keyEventsStack.push(i),this.lastKeydownImage=new r(t.editor);if(n.isNavigationKey(i)||this.undoManager.keyGroupChanged(i))if(t.strokesRecorded[0]||t.strokesRecorded[1])t.save(!1,this.lastKeydownImage,!1),t.resetType()}},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=!1;else{var e=this.keyEventsStack.getLast();e||(e=this.keyEventsStack.push(0)),this.keyEventsStack.increment(e.keyCode),this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&(this.undoManager.type(e.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(e){var t=this.undoManager,e=e.data.getKey(),i=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(e);if(!n.ieFunctionalKeysBug(e)||!this.lastKeydownImage||!this.lastKeydownImage.equalsContent(new r(t.editor,!0)))i>0?t.type(e):n.isNavigationKey(e)&&this.onNavigationKey(!0)},onNavigationKey:function(e){var t=this.undoManager;(e||!t.save(!0,null,!1))&&t.updateSelection(new r(t.editor)),t.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},attachListeners:function(){var e=this.undoManager.editor,t=e.editable(),r=this;t.attachListener(t,"keydown",function(e){r.onKeydown(e),n.ieFunctionalKeysBug(e.data.getKey())&&r.onInput()},null,null,999),t.attachListener(t,CKEDITOR.env.ie?"keypress":"input",r.onInput,r,null,999),t.attachListener(t,"keyup",r.onKeyup,r,null,999),t.attachListener(t,"paste",r.ignoreInputEventListener,r,null,999),t.attachListener(t,"drop",r.ignoreInputEventListener,r,null,999),t.attachListener(t.isInline()?t:e.document.getDocumentElement(),"click",function(){r.onNavigationKey()},null,null,999),t.attachListener(this.undoManager.editor,"blur",function(){r.keyEventsStack.remove(9)},null,null,999)}};var o=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=[]};o.prototype={push:function(e){return this.stack[this.stack.push({keyCode:e,inputs:0})-1]},getLastIndex:function(e){if(typeof e!="number")return this.stack.length-1;for(var t=this.stack.length;t--;)if(this.stack[t].keyCode==e)return t;return-1},getLast:function(e){return e=this.getLastIndex(e),e!=-1?this.stack[e]:null},increment:function(e){this.getLast(e).inputs++},remove:function(e){e=this.getLastIndex(e),e!=-1&&this.stack.splice(e,1)},resetInputs:function(e){if(typeof e=="number")this.getLast(e).inputs=0;else for(e=this.stack.length;e--;)this.stack[e].inputs=0},getTotalInputs:function(){for(var e=this.stack.length,t=0;e--;)t+=this.stack[e].inputs;return t},cleanUp:function(e){e=e.data.$,!e.ctrlKey&&!e.metaKey&&this.remove(17),e.shiftKey||this.remove(16),e.altKey||this.remove(18)}}}(),CKEDITOR.plugins.add("wsc",{requires:"dialog",parseApi:function(e){e.config.wsc_onFinish=typeof e.config.wsc_onFinish=="function"?e.config.wsc_onFinish:function(){},e.config.wsc_onClose=typeof e.config.wsc_onClose=="function"?e.config.wsc_onClose:function(){}},parseConfig:function(e){e.config.wsc_customerId=e.config.wsc_customerId||CKEDITOR.config.wsc_customerId||"1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk",e.config.wsc_customDictionaryIds=e.config.wsc_customDictionaryIds||CKEDITOR.config.wsc_customDictionaryIds||"",e.config.wsc_userDictionaryName=e.config.wsc_userDictionaryName||CKEDITOR.config.wsc_userDictionaryName||"",e.config.wsc_customLoaderScript=e.config.wsc_customLoaderScript||CKEDITOR.config.wsc_customLoaderScript,CKEDITOR.config.wsc_cmd=e.config.wsc_cmd||CKEDITOR.config.wsc_cmd||"spell",CKEDITOR.config.wsc_version="v4.3.0-26-g5bcf855",CKEDITOR.config.wsc_removeGlobalVariable=!0},init:function(e){var t=CKEDITOR.env;this.parseConfig(e),this.parseApi(e),e.addCommand("checkspell",new CKEDITOR.dialogCommand("checkspell")).modes={wysiwyg:!CKEDITOR.env.opera&&!CKEDITOR.env.air&&document.domain==window.location.hostname&&(!t.ie||!(t.version<8||t.quirks))},typeof e.plugins.scayt=="undefined"&&e.ui.addButton&&e.ui.addButton("SpellChecker",{label:e.lang.wsc.toolbar,click:function(e){var t=e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?e.container.getText():e.document.getBody().getText();(t=t.replace(/\s/g,""))?e.execCommand("checkspell"):alert("Nothing to check!")},toolbar:"spellchecker,10"}),CKEDITOR.dialog.add("checkspell",this.path+(CKEDITOR.env.ie&&CKEDITOR.env.version<=7?"dialogs/wsc_ie.js":window.postMessage?"dialogs/wsc.js":"dialogs/wsc_ie.js"))}}),function(){function e(e){var n=this.editor,r=e.document,i=r.body,s=r.getElementById("cke_actscrpt");s&&s.parentNode.removeChild(s),(s=r.getElementById("cke_shimscrpt"))&&s.parentNode.removeChild(s),(s=r.getElementById("cke_basetagscrpt"))&&s.parentNode.removeChild(s),i.contentEditable=!0,CKEDITOR.env.ie&&(i.hideFocus=!0,i.disabled=!0,i.removeAttribute("disabled")),delete this._.isLoadingData,this.$=i,r=new CKEDITOR.dom.document(r),this.setup(),this.fixInitialSelection(),CKEDITOR.env.ie&&(r.getDocumentElement().addClass(r.$.compatMode),n.config.enterMode!=CKEDITOR.ENTER_P&&this.attachListener(r,"selectionchange",function(){var e=r.getBody(),t=n.getSelection(),i=t&&t.getRanges()[0];i&&e.getHtml().match(/^(?: | )<\/p>$/i)&&i.startContainer.equals(e)&&setTimeout(function(){i=n.getSelection().getRanges()[0],i.startContainer.equals("body")||(e.getFirst().remove(1),i.moveToElementEditEnd(e),i.select())},0)})),(CKEDITOR.env.webkit||CKEDITOR.env.ie&&CKEDITOR.env.version>10)&&r.getDocumentElement().on("mousedown",function(e){e.data.getTarget().is("html")&&setTimeout(function(){n.editable().focus()})}),t(n);try{n.document.$.execCommand("2D-position",!1,!0)}catch(o){}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&n.document.$.compatMode=="CSS1Compat")&&this.attachListener(this,"keydown",function(e){var t=e.data.getKeystroke();if(t==33||t==34)if(CKEDITOR.env.ie)setTimeout(function(){n.getSelection().scrollIntoView()},0);else if(n.window.$.innerHeight>this.$.offsetHeight){var r=n.createRange();r[t==33?"moveToElementEditStart":"moveToElementEditEnd"](this),r.select(),e.data.preventDefault()}}),CKEDITOR.env.ie&&this.attachListener(r,"blur",function(){try{r.$.selection.empty()}catch(e){}}),CKEDITOR.env.iOS&&this.attachListener(r,"touchend",function(){e.focus()}),i=n.document.getElementsByTag("title").getItem(0),i.data("cke-title",i.getText()),CKEDITOR.env.ie&&(n.document.$.title=this._.docTitle),CKEDITOR.tools.setTimeout(function(){this.status=="unloaded"&&(this.status="ready"),n.fire("contentDom"),this._.isPendingFocus&&(n.focus(),this._.isPendingFocus=!1),setTimeout(function(){n.fire("dataReady")},0),CKEDITOR.env.ie&&setTimeout(function(){if(n.document){var e=n.document.$.body;e.runtimeStyle.marginBottom="0px",e.runtimeStyle.marginBottom=""}},1e3)},0,this)}function t(e){function t(){var t;e.editable().attachListener(e,"selectionChange",function(){var r=e.getSelection().getSelectedElement();r&&(t&&(t.detachEvent("onresizestart",n),t=null),r.$.attachEvent("onresizestart",n),t=r.$)})}function n(e){e.returnValue=!1}if(CKEDITOR.env.gecko)try{var r=e.document.$;r.execCommand("enableObjectResizing",!1,!e.config.disableObjectResizing),r.execCommand("enableInlineTableEditing",!1,!e.config.disableNativeTableHandles)}catch(i){}else CKEDITOR.env.ie&&CKEDITOR.env.version<11&&e.config.disableObjectResizing&&t(e)}function n(){var e=[];if(CKEDITOR.document.$.documentMode>=8){e.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}");var t=[],n;for(n in CKEDITOR.dtd.$removeEmpty)t.push("html.CSS1Compat "+n+"[contenteditable=false]");e.push(t.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 n(n){n&&n.removeListener(),e.editable(new r(e,s.$.contentWindow.document.body)),e.setData(e.getData(1),t)}var i="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",i=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent(i)+"}())":"",s=CKEDITOR.dom.element.createFromHtml('');s.setStyles({width:"100%",height:"100%"}),s.addClass("cke_wysiwyg_frame cke_reset");var o=e.ui.space("contents");o.append(s),(i=CKEDITOR.env.ie||CKEDITOR.env.gecko)&&s.on("load",n);var u=e.title,f=e.fire("ariaEditorHelpLabel",{}).label;u&&(CKEDITOR.env.ie&&f&&(u+=", "+f),s.setAttribute("title",u));if(f){var u=CKEDITOR.tools.getNextId(),l=CKEDITOR.dom.element.createFromHtml(''+f+" ");o.append(l,1),s.setAttribute("aria-describedby",u)}e.on("beforeModeUnload",function(e){e.removeListener(),l&&l.remove()}),s.setAttributes({tabIndex:e.tabIndex,allowTransparency:"true"}),!i&&n(),CKEDITOR.env.webkit&&(i=function(){o.setStyle("width","100%"),s.hide(),s.setSize("width",o.getSize("width")),o.removeStyle("width"),s.show()},s.setCustomData("onResize",i),CKEDITOR.document.getWindow().on("resize",i)),e.fire("ariaWidget",s)})}}),CKEDITOR.editor.prototype.addContentsCss=function(e){var t=this.config,n=t.contentsCss;CKEDITOR.tools.isArray(n)||(t.contentsCss=n?[n]:[]),t.contentsCss.push(e)};var r=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,t){var r=this.editor;if(t)this.setHtml(e),this.fixInitialSelection(),r.fire("dataReady");else{this._.isLoadingData=!0,r._.dataStore={id:1};var i=r.config,s=i.fullPage,o=i.docType,u=CKEDITOR.tools.buildStyleHtml(n()).replace(/"):n.push(' ');return n.join("")},htmlEncode:function(e){return(""+e).replace(n,"&").replace(r,">").replace(i,"<")},htmlDecode:function(e){return e.replace(o,"&").replace(u,">").replace(a,"<")},htmlEncodeAttr:function(e){return e.replace(s,""").replace(i,"<").replace(r,">")},htmlDecodeAttr:function(e){return e.replace(f,'"').replace(a,"<").replace(u,">")},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,r,i){return i||(i=window),n||(n=i),i.setTimeout(function(){r?e.apply(n,[].concat(r)):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(typeof t=="function"){for(var n=0,r=e.length;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,r=e.privates||e._,i=e.proto,e=e.statics;!t&&(t=function(){n&&this.base.apply(this,arguments)});if(r)var s=t,t=function(){var e=this._||(this._={}),t;for(t in r){var n=r[t];e[t]=typeof n=="function"?CKEDITOR.tools.bind(n,this):n}s.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}),i&&this.extend(t.prototype,i,!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=/^-?\d+\.?\d*px$/,t;return function(n){return t=CKEDITOR.tools.trim(n+"")+"px",e.test(t)?t: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;t]*?>)|^/i,'$&\n")),this.$.write(e),this.$.close()},find:function(e){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(e))},findOne:function(e){return(e=this.$.querySelector(e))?new CKEDITOR.dom.element(e):null},_getHtml5ShivFrag:function(){var e=this.getCustomData("html5ShivFrag");return e||(e=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(e,!0),this.setCustomData("html5ShivFrag",e)),e}}),CKEDITOR.dom.nodeList=function(e){this.$=e},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(e){return e<0||e>=this.$.length?null:(e=this.$[e])?new CKEDITOR.dom.node(e):null}},CKEDITOR.dom.element=function(e,t){typeof e=="string"&&(e=(t?t.$:document).createElement(e)),CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.element.get=function(e){return(e=typeof e=="string"?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,r){var i=t.getCustomData("list_marker_id")||t.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),s=t.getCustomData("list_marker_names")||t.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");return e[i]=t,s[n]=1,t.setCustomData(n,r)},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 r=t.getCustomData("list_marker_names"),i=t.getCustomData("list_marker_id"),s;for(s in r)t.removeCustomData(s);t.removeCustomData("list_marker_names"),n&&(t.removeCustomData("list_marker_id"),delete e[i])},function(){function e(e){var t=!0;return e.$.id||(e.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),t=!1),function(){t||e.removeAttribute("id")}}function t(e,t){return"#"+e.$.id+" "+t.split(/,\s*/).join(", #"+e.$.id+" ")}function n(e){for(var t=0,n=0,i=r[e].length;n]*>/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:CKEDITOR.env.ie&&CKEDITOR.env.version<9?function(e){try{var t=this.$;if(this.getParent())return t.innerHTML=e;var n=this.getDocument()._getHtml5ShivFrag();return n.appendChild(t),t.innerHTML=e,n.removeChild(t),e}catch(r){this.$.innerHTML="",t=new CKEDITOR.dom.element("body",this.getDocument()),t.$.innerHTML=e;for(t=t.getChildren();t.count();)this.append(t.getItem(0));return e}}:function(e){return this.$.innerHTML=e},setText:function(){var e=document.createElement("p");return e.innerHTML="x",e=e.textContent,function(t){this.$[e?"textContent":"innerText"]=t}}(),getAttribute:function(){var e=function(e){return this.$.getAttribute(e,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?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),e!==0&&this.$.tabIndex===0&&(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 e===0&&!CKEDITOR.dtd.$tabIndex[this.getName()]&&parseInt(this.getAttribute("tabindex"),10)!==0&&(e=-1),e}:CKEDITOR.env.webkit?function(){var e=this.$.tabIndex;return e===void 0&&(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;t!="HTML"&&(e=t.toLowerCase()+":"+e)}return this.getName=function(){return e},this.getName()},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(typeof arguments[0]=="object")return!!arguments[0][e];for(var t=0;t0&&(t>2||!n[e[0].nodeName]||t==2&&!n[e[1].nodeName])},hasAttribute:function(){function e(e){var t=this.$.attributes.getNamedItem(e);if(this.getName()=="input")switch(e){case"class":return this.$.className.length>0;case"checked":return!!this.$.checked;case"value":return e=this.getAttribute("type"),e=="checkbox"||e=="radio"?this.$.value!="on":!!this.$.value}return t?t.specified:!1}return CKEDITOR.env.ie?CKEDITOR.env.version<8?function(t){return t=="name"?!!this.$.name:e.call(this,t)}:e:function(e){return!!this.$.attributes.getNamedItem(e)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(e,t){var n=this.$,e=e.$;if(n!=e){var r;if(t)for(;r=n.lastChild;)e.insertBefore(n.removeChild(r),e.firstChild);else for(;r=n.firstChild;)e.appendChild(n.removeChild(r))}},mergeSiblings:function(){function e(e,t,n){if(t&&t.type==CKEDITOR.NODE_ELEMENT){for(var r=[];t.data("cke-bookmark")||t.isEmptyInlineRemoveable();){r.push(t),t=n?t.getNext():t.getPrevious();if(!t||t.type!=CKEDITOR.NODE_ELEMENT)return}if(e.isIdentical(t)){for(var i=n?e.getLast():e.getFirst();r.length;)r.shift().move(e,!n);t.moveChildren(e,!n),t.remove(),i&&i.type==CKEDITOR.NODE_ELEMENT&&i.mergeSiblings()}}}return function(t){if(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.quirks)?function(t,n){return t=="class"?this.$.className=n:t=="style"?this.$.style.cssText=n:t=="tabindex"?this.$.tabIndex=n:t=="checked"?this.$.checked=n:t=="contenteditable"?e.call(this,"contentEditable",n):e.apply(this,arguments),this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(t,n){if(t=="src"&&n.match(/^http:\/\//))try{e.apply(this,arguments)}catch(r){}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.quirks)?function(e){e=="class"?e="className":e=="tabindex"?e="tabIndex":e=="contenteditable"&&(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(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var e,t=this.getElementsByTag("*"),n=0,r=t.count();n0)&&u(0,t===!0?o:t===!1?i:o<0?o:i),n&&(s<0||r>0)&&u(s<0?s:r,0)},setState:function(e,t,n){t=t||"cke";switch(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||{},r=0;r=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,t===void 0?this.getAttribute(e):(t===!1?this.removeAttribute(e):this.setAttribute(e,t),null)},getEditor:function(){var e=CKEDITOR.instances,t,n;for(t in e){n=e[t];if(n.element.equals(this)&&n.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return n}return null},find:function(n){var r=e(this),n=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(t(this,n)));return r(),n},findOne:function(n){var r=e(this),n=this.$.querySelector(t(this,n));return r(),n?new CKEDITOR.dom.element(n):null},forEach:function(e,t,n){if(!n&&(!t||this.type==t))var r=e(this);if(r!==!1)for(var n=this.getChildren(),i=0;i0?r.getChild(o-1):u(r,!0)===!1?null:r.getPreviousSourceNode(!0,f,u)):(r=i,r.type==CKEDITOR.NODE_ELEMENT&&!(r=r.getChild(s))&&(r=u(i,!0)===!1?null:i.getNextSourceNode(!0,f,u))),r&&u(r)===!1&&(r=null));for(;r&&!this._.end;){this.current=r;if(!this.evaluator||this.evaluator(r)!==!1){if(!t)return r}else if(t&&this.evaluator)return!1;r=r[l](!1,f,u)}return this.end(),this.current=null}function t(t){for(var n,r=null;n=e.call(this,t);)r=n;return r}function n(e){if(f(e))return!1;if(e.type==CKEDITOR.NODE_TEXT)return!0;if(e.type==CKEDITOR.NODE_ELEMENT){if(e.is(CKEDITOR.dtd.$inline)||e.is("hr")||e.getAttribute("contenteditable")=="false")return!0;var t;if(t=!CKEDITOR.env.needsBrFiller)if(t=e.is(l))e:{t=0;for(var n=e.getChildCount();t0&&(u>=s.getChildCount()?(s=s.append(e.document.createText("")),f=!0):s=s.getChild(u)),i.type==CKEDITOR.NODE_TEXT?(i.split(o),i.equals(s)&&(s=i.getNext())):o?o>=i.getChildCount()?(i=i.append(e.document.createText("")),a=!0):i=i.getChild(o).getPrevious():(i=i.append(e.document.createText(""),1),a=!0);var o=i.getParents(),u=s.getParents(),l,c,h;for(l=0;l0&&!d.equals(s)&&(v=p.append(d.clone()));if(!o[n]||d.$.parentNode!=o[n].$.parentNode)for(d=d.getPrevious();d;){if(d.equals(o[n])||d.equals(i))break;m=d.getPrevious(),t==2?p.$.insertBefore(d.$.cloneNode(!0),p.$.firstChild):(d.remove(),t==1&&p.$.insertBefore(d.$,p.$.firstChild)),d=m}p&&(p=v)}t==2?(c=e.startContainer,c.type==CKEDITOR.NODE_TEXT&&(c.$.data=c.$.data+c.$.nextSibling.data,c.$.parentNode.removeChild(c.$.nextSibling)),e=e.endContainer,e.type==CKEDITOR.NODE_TEXT&&e.$.nextSibling&&(e.$.data=e.$.data+e.$.nextSibling.data,e.$.parentNode.removeChild(e.$.nextSibling))):(c&&h&&(i.$.parentNode!=c.$.parentNode||s.$.parentNode!=h.$.parentNode)&&(t=h.getIndex(),a&&h.$.parentNode==i.$.parentNode&&t--,r&&c.type==CKEDITOR.NODE_ELEMENT?(r=CKEDITOR.dom.element.createFromHtml(' ',e.document),r.insertAfter(c),c.mergeSiblings(!1),e.moveToBookmark({startNode:r})):e.setStart(h.getParent(),t)),e.collapse(!0)),a&&i.remove(),f&&s.$.parentNode&&s.remove()},s={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},o=CKEDITOR.dom.walker.bogus(),u=/^[\t\r\n ]*(?: |\xa0)$/,a=CKEDITOR.dom.walker.editable(),f=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var e=new CKEDITOR.dom.range(this.root);return e._setStartContainer(this.startContainer),e.startOffset=this.startOffset,e._setEndContainer(this.endContainer),e.endOffset=this.endOffset,e.collapsed=this.collapsed,e},collapse:function(e){e?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset),this.collapsed=!0},cloneContents:function(){var e=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||i(this,2,e),e},deleteContents:function(e){this.collapsed||i(this,0,null,e)},extractContents:function(e){var t=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||i(this,1,t,e),t},createBookmark:function(e){var t,n,r,i,s=this.collapsed;return t=this.document.createElement("span"),t.data("cke-bookmark",1),t.setStyle("display","none"),t.setHtml(" "),e&&(r="cke_bm_"+CKEDITOR.tools.getNextNumber(),t.setAttribute("id",r+(s?"C":"S"))),s||(n=t.clone(),n.setHtml(" "),e&&n.setAttribute("id",r+"E"),i=this.clone(),i.collapse(),i.insertNode(n)),i=this.clone(),i.collapse(!0),i.insertNode(t),n?(this.setStartAfter(t),this.setEndBefore(n)):this.moveToPosition(t,CKEDITOR.POSITION_AFTER_END),{startNode:e?r+(s?"C":"S"):t,endNode:e?r+"E":n,serializable:e,collapsed:s}},createBookmark2:function(){function e(e){var n=e.container,r=e.offset,i;i=n;var s=r;i=i.type!=CKEDITOR.NODE_ELEMENT||s===0||s==i.getChildCount()?0:i.getChild(s-1).type==CKEDITOR.NODE_TEXT&&i.getChild(s).type==CKEDITOR.NODE_TEXT,i&&(n=n.getChild(r-1),r=n.getLength()),n.type==CKEDITOR.NODE_ELEMENT&&r>1&&(r=n.getChild(r-1).getIndex(!0)+1);if(n.type==CKEDITOR.NODE_TEXT){i=n;for(s=0;(i=i.getPrevious())&&i.type==CKEDITOR.NODE_TEXT;)s+=i.getLength();i=s,n.getText()?r+=i:(s=n.getPrevious(t),i?(r=i,n=s?s.getNext():n.getParent().getFirst()):(n=n.getParent(),r=s?s.getIndex(!0)+1:0))}e.container=n,e.offset=r}var t=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(t){var n=this.collapsed,r={container:this.startContainer,offset:this.startOffset},i={container:this.endContainer,offset:this.endOffset};return t&&(e(r),n||e(i)),{start:r.container.getAddress(t),end:n?null:i.container.getAddress(t),startOffset:r.offset,endOffset:i.offset,normalized:t,collapsed:n,is2:!0}}}(),moveToBookmark:function(e){if(e.is2){var t=this.document.getByAddress(e.start,e.normalized),n=e.startOffset,r=e.end&&this.document.getByAddress(e.end,e.normalized),e=e.endOffset;this.setStart(t,n),r?this.setEnd(r,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=this.startContainer,t=this.endContainer,n=this.startOffset,r=this.endOffset,i;if(e.type==CKEDITOR.NODE_ELEMENT){i=e.getChildCount();if(i>n)e=e.getChild(n);else if(i<1)e=e.getPreviousSourceNode();else{for(e=e.$;e.lastChild;)e=e.lastChild;e=new CKEDITOR.dom.node(e),e=e.getNextSourceNode()||e}}if(t.type==CKEDITOR.NODE_ELEMENT){i=t.getChildCount();if(i>r)t=t.getChild(r).getPreviousSourceNode(!0);else if(i<1)t=t.getPreviousSourceNode();else{for(t=t.$;t.lastChild;)t=t.lastChild;t=new CKEDITOR.dom.node(t)}}return e.getPosition(t)&CKEDITOR.POSITION_FOLLOWING&&(e=t),{startNode:e,endNode:t}},getCommonAncestor:function(e,t){var n=this.startContainer,r=this.endContainer,n=n.equals(r)?e&&n.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?n.getChild(this.startOffset):n:n.getCommonAncestor(r);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,r=this.startOffset,i=this.collapsed;if((!e||i)&&n&&n.type==CKEDITOR.NODE_TEXT){if(r)if(r>=n.getLength())r=n.getIndex()+1,n=n.getParent();else{var s=n.split(r),r=n.getIndex()+1,n=n.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(s,this.endOffset-this.startOffset):n.equals(this.endContainer)&&(this.endOffset=this.endOffset+1)}else r=n.getIndex(),n=n.getParent();this.setStart(n,r);if(i){this.collapse(!0);return}}n=this.endContainer,r=this.endOffset,!t&&!i&&n&&n.type==CKEDITOR.NODE_TEXT&&(r?(r>=n.getLength()||n.split(r),r=n.getIndex()+1):r=n.getIndex(),n=n.getParent(),this.setEnd(n,r))},enlarge:function(e,t){function n(e){return e&&e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("contenteditable")?null:e}var r=RegExp(/[^\s\ufeff]/);switch(e){case CKEDITOR.ENLARGE_INLINE:var i=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var s=this.getCommonAncestor(),o=this.root,u,a,f,l,c,h=!1,p,d;p=this.startContainer;var v=this.startOffset;p.type==CKEDITOR.NODE_TEXT?(v&&(p=!CKEDITOR.tools.trim(p.substring(0,v)).length&&p,h=!!p),p&&!(l=p.getPrevious())&&(f=p.getParent())):(v&&(l=p.getChild(v-1)||p.getLast()),l||(f=p));for(f=n(f);f||l;){if(f&&!l){!c&&f.equals(s)&&(c=!0);if(i?f.isBlockBoundary():!o.contains(f))break;if(!h||f.getComputedStyle("display")!="inline")h=!1,c?u=f:this.setStartBefore(f);l=f.getPrevious()}for(;l;){p=!1;if(l.type==CKEDITOR.NODE_COMMENT)l=l.getPrevious();else{if(l.type==CKEDITOR.NODE_TEXT)d=l.getText(),r.test(d)&&(l=null),p=/[\s\ufeff]$/.test(d);else if((l.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||t&&l.is("br"))&&!l.data("cke-bookmark"))if(h&&CKEDITOR.dtd.$removeEmpty[l.getName()]){d=l.getText();if(r.test(d))l=null;else for(var v=l.$.getElementsByTagName("*"),m=0,g;g=v[m++];)if(!CKEDITOR.dtd.$removeEmpty[g.nodeName.toLowerCase()]){l=null;break}l&&(p=!!d.length)}else l=null;p&&(h?c?u=f:f&&this.setStartBefore(f):h=!0);if(l){p=l.getPrevious();if(!f&&!p){f=l,l=null;break}l=p}else f=null}}f&&(f=n(f.getParent()))}p=this.endContainer,v=this.endOffset,f=l=null,c=h=!1;var y=function(e,t){var n=new CKEDITOR.dom.range(o);n.setStart(e,t),n.setEndAt(o,CKEDITOR.POSITION_BEFORE_END);var n=new CKEDITOR.dom.walker(n),i;for(n.guard=function(e){return e.type!=CKEDITOR.NODE_ELEMENT||!e.isBlockBoundary()};i=n.next();){if(i.type!=CKEDITOR.NODE_TEXT)return!1;d=i!=e?i.getText():i.substring(t);if(r.test(d))return!1}return!0};p.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(p.substring(v)).length?h=!0:(h=!p.getLength(),v==p.getLength()?(l=p.getNext())||(f=p.getParent()):y(p,v)&&(f=p.getParent())):(l=p.getChild(v))||(f=p);for(;f||l;){if(f&&!l){!c&&f.equals(s)&&(c=!0);if(i?f.isBlockBoundary():!o.contains(f))break;if(!h||f.getComputedStyle("display")!="inline")h=!1,c?a=f:f&&this.setEndAfter(f);l=f.getNext()}for(;l;){p=!1;if(l.type==CKEDITOR.NODE_TEXT)d=l.getText(),y(l,0)||(l=null),p=/^[\s\ufeff]/.test(d);else if(l.type==CKEDITOR.NODE_ELEMENT){if((l.$.offsetWidth>0||t&&l.is("br"))&&!l.data("cke-bookmark"))if(h&&CKEDITOR.dtd.$removeEmpty[l.getName()]){d=l.getText();if(r.test(d))l=null;else{v=l.$.getElementsByTagName("*");for(m=0;g=v[m++];)if(!CKEDITOR.dtd.$removeEmpty[g.nodeName.toLowerCase()]){l=null;break}}l&&(p=!!d.length)}else l=null}else p=1;p&&h&&(c?a=f:this.setEndAfter(f));if(l){p=l.getNext();if(!f&&!p){f=l,l=null;break}l=p}else f=null}f&&(f=n(f.getParent()))}u&&a&&(s=u.contains(a)?a:u,this.setStartBefore(s),this.setEndAfter(s));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:f=new CKEDITOR.dom.range(this.root),o=this.root,f.setStartAt(o,CKEDITOR.POSITION_AFTER_START),f.setEnd(this.startContainer,this.startOffset),f=new CKEDITOR.dom.walker(f);var b,w,E=CKEDITOR.dom.walker.blockBoundary(e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),S=null,x=function(e){if(e.type==CKEDITOR.NODE_ELEMENT&&e.getAttribute("contenteditable")=="false")if(S){if(S.equals(e)){S=null;return}}else S=e;else if(S)return;var t=E(e);return t||(b=e),t},i=function(e){var t=x(e);return!t&&e.is&&e.is("br")&&(w=e),t};f.guard=x,f=f.lastBackward(),b=b||o,this.setStartAt(b,!b.is("br")&&(!f&&this.checkStartOfBlock()||f&&b.contains(f))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){f=this.clone(),f=new CKEDITOR.dom.walker(f);var T=CKEDITOR.dom.walker.whitespaces(),N=CKEDITOR.dom.walker.bookmark();f.evaluator=function(e){return!T(e)&&!N(e)};if((f=f.previous())&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("br"))break}f=this.clone(),f.collapse(),f.setEndAt(o,CKEDITOR.POSITION_BEFORE_END),f=new CKEDITOR.dom.walker(f),f.guard=e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?i:x,b=S=w=null,f=f.lastForward(),b=b||o,this.setEndAt(b,!f&&this.checkEndOfBlock()||f&&b.contains(f)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START),w&&this.setEndAfter(w)}},shrink:function(e,t,n){if(!this.collapsed){var e=e||CKEDITOR.SHRINK_TEXT,r=this.clone(),i=this.startContainer,s=this.endContainer,o=this.startOffset,u=this.endOffset,a=1,f=1;i&&i.type==CKEDITOR.NODE_TEXT&&(o?o>=i.getLength()?r.setStartAfter(i):(r.setStartBefore(i),a=0):r.setStartBefore(i)),s&&s.type==CKEDITOR.NODE_TEXT&&(u?u>=s.getLength()?r.setEndAfter(s):(r.setEndAfter(s),f=0):r.setEndBefore(s));var r=new CKEDITOR.dom.walker(r),l=CKEDITOR.dom.walker.bookmark();r.evaluator=function(t){return t.type==(e==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var c;return r.guard=function(t,r){return l(t)?!0:e==CKEDITOR.SHRINK_ELEMENT&&t.type==CKEDITOR.NODE_TEXT||r&&t.equals(c)||n===!1&&t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary()||t.type==CKEDITOR.NODE_ELEMENT&&t.hasAttribute("contenteditable")?!1:(!r&&t.type==CKEDITOR.NODE_ELEMENT&&(c=t),!0)},a&&(i=r[e==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(i,t?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START),f&&(r.reset(),(r=r[e==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(r,t?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)),!!a||!!f}},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._setStartContainer(e),this.startOffset=t,this.endContainer||(this._setEndContainer(e),this.endOffset=t),r(this)},setEnd:function(e,t){e.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[e.getName()]&&(t=e.getIndex()+1,e=e.getParent()),this._setEndContainer(e),this.endOffset=t,this.startContainer||(this._setStartContainer(e),this.startOffset=t),r(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)}r(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)}r(this)},fixBlock:function(e,t){var n=this.createBookmark(),r=this.document.createElement(t);return this.collapse(e),this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),this.extractContents().appendTo(r),r.trim(),r.appendBogus(),this.insertNode(r),this.moveToBookmark(n),r},splitBlock:function(e){var t=new CKEDITOR.dom.elementPath(this.startContainer,this.root),n=new CKEDITOR.dom.elementPath(this.endContainer,this.root),r=t.block,i=n.block,s=null;return t.blockLimit.equals(n.blockLimit)?(e!="br"&&(r||(r=this.fixBlock(!0,e),i=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),i||(i=this.fixBlock(!1,e))),e=r&&this.checkStartOfBlock(),t=i&&this.checkEndOfBlock(),this.deleteContents(),r&&r.equals(i)&&(t?(s=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(i,CKEDITOR.POSITION_AFTER_END),i=null):e?(s=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(r,CKEDITOR.POSITION_BEFORE_START),r=null):(i=this.splitElement(r),r.is("ul","ol")||r.appendBogus())),{previousBlock:r,nextBlock:i,wasStartOfBlock:e,wasEndOfBlock:t,elementPath:s}):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(r){return t(r)||n(r)||r.type==CKEDITOR.NODE_ELEMENT&&r.isEmptyInlineRemoveable()||e.is("table")&&r.is("caption")?!1:!0}}var t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(!1);return function(t){for(var n=this.createBookmark(),r=this[t?"endPath":"startPath"](),i=r.block||r.blockLimit,s;i&&!i.equals(r.root)&&!i.getFirst(e(i));)s=i.getParent(),this[t?"setEndAt":"setStartAt"](i,CKEDITOR.POSITION_AFTER_END),i.remove(1),i=s;this.moveToBookmark(n)}}(),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 r=n==CKEDITOR.START,i=this.clone();return i.collapse(r),i[r?"setStartAt":"setEndAt"](e,r?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),i=new CKEDITOR.dom.walker(i),i.evaluator=t(r),i[r?"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)),u.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)),u.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 r=this.clone();return r.collapse(1),r.setStartAt(n||this.root,CKEDITOR.POSITION_AFTER_START),n=new CKEDITOR.dom.walker(r),n.evaluator=e,n.guard=t,n.previous()},getNextNode:function(e,t,n){var r=this.clone();return r.collapse(),r.setEndAt(n||this.root,CKEDITOR.POSITION_BEFORE_END),n=new CKEDITOR.dom.walker(r),n.evaluator=e,n.guard=t,n.next()},checkReadOnly:function(){function e(e,t){for(;e;){if(e.type==CKEDITOR.NODE_ELEMENT){if(e.getAttribute("contentEditable")=="false"&&!e.data("cke-editable"))return 0;if(e.is("html")||e.getAttribute("contentEditable")=="true"&&(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 n=0;e;){if(e.type==CKEDITOR.NODE_TEXT){t&&this.endContainer&&this.checkEndOfBlock()&&u.test(e.getText())?this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(e,t?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),n=1;break}if(e.type==CKEDITOR.NODE_ELEMENT)if(e.isEditable())this.moveToPosition(e,t?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),n=1;else if(t&&e.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);else if(e.getAttribute("contenteditable")=="false"&&e.is(CKEDITOR.dtd.$block))return this.setStartBefore(e),this.setEndAfter(e),!0;var r=e,i=n,s=void 0;r.type==CKEDITOR.NODE_ELEMENT&&r.isEditable(!1)&&(s=r[t?"getLast":"getFirst"](f)),!i&&!s&&(s=r[t?"getPrevious":"getNext"](f)),e=s}return!!n},moveToClosestEditablePosition:function(e,t){var n=new CKEDITOR.dom.range(this.root),r=0,i,s=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];n.moveToPosition(e,s[t?0:1]);if(e.is(CKEDITOR.dtd.$block)){if(i=n[t?"getNextEditableNode":"getPreviousEditableNode"]())r=1,i.type==CKEDITOR.NODE_ELEMENT&&i.is(CKEDITOR.dtd.$block)&&i.getAttribute("contenteditable")=="false"?(n.setStartAt(i,CKEDITOR.POSITION_BEFORE_START),n.setEndAt(i,CKEDITOR.POSITION_AFTER_END)):n.moveToPosition(i,s[t?1:0])}else r=1;return r&&this.moveToRange(n),!!r},moveToElementEditStart:function(e){return this.moveToElementEditablePosition(e)},moveToElementEditEnd:function(e){return this.moveToElementEditablePosition(e,!0)},getEnclosedNode:function(){var e=this.clone();e.optimize();if(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 r=e.next();return e.reset(),r&&r.equals(e.previous())?r: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},getNextEditableNode:n(),getPreviousEditableNode:n(1),scrollIntoView:function(){var e=new CKEDITOR.dom.element.createFromHtml(" ",this.document),t,n,r,i=this.clone();i.optimize(),(r=i.startContainer.type==CKEDITOR.NODE_TEXT)?(n=i.startContainer.getText(),t=i.startContainer.split(i.startOffset),e.insertAfter(i.startContainer)):i.insertNode(e),e.scrollIntoView(),r&&(i.startContainer.setText(n),t.remove()),e.remove()},_setStartContainer:function(e){this.startContainer=e},_setEndContainer:function(e){this.endContainer=e}}}(),CKEDITOR.POSITION_AFTER_START=1,CKEDITOR.POSITION_BEFORE_END=2,CKEDITOR.POSITION_BEFORE_START=3,CKEDITOR.POSITION_AFTER_END=4,CKEDITOR.ENLARGE_ELEMENT=1,CKEDITOR.ENLARGE_BLOCK_CONTENTS=2,CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3,CKEDITOR.ENLARGE_INLINE=4,CKEDITOR.START=1,CKEDITOR.END=2,CKEDITOR.SHRINK_ELEMENT=1,CKEDITOR.SHRINK_TEXT=2,"use strict",function(){function e(e){arguments.length<1||(this.range=e,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function t(e){var t=[];return e.forEach(function(e){if(e.getAttribute("contenteditable")=="true")return t.push(e),!1},CKEDITOR.NODE_ELEMENT,!0),t}function n(e,r,i,s){e:{s==null&&(s=t(i));for(var o;o=s.shift();)if(o.getDtd().p){s={element:o,remaining:s};break e}s=null}return s?(o=CKEDITOR.filter.instances[s.element.data("cke-filter")])&&!o.check(r)?n(e,r,i,s.remaining):(r=new CKEDITOR.dom.range(s.element),r.selectNodeContents(s.element),r=r.createIterator(),r.enlargeBr=e.enlargeBr,r.enforceRealBlocks=e.enforceRealBlocks,r.activeFilter=r.filter=o,e._.nestedEditable={element:s.element,container:i,remaining:s.remaining,iterator:r},1):0}function r(e,t,n){return t?(e=e.clone(),e.collapse(!n),e.checkBoundaryOfElement(t,n?CKEDITOR.START:CKEDITOR.END)):!1}var i=/^[\r\n\t ]+$/,s=CKEDITOR.dom.walker.bookmark(!1,!0),o=CKEDITOR.dom.walker.whitespaces(!0),u=function(e){return s(e)&&o(e)},a={dd:1,dt:1,li:1};e.prototype={getNextParagraph:function(e){var t,o,l,p,v,e=e||"p";if(this._.nestedEditable){if(t=this._.nestedEditable.iterator.getNextParagraph(e))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,t;this.activeFilter=this.filter;if(n(this,e,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(e);this._.nestedEditable=null}if(!this.range.root.getDtd()[e])return null;if(!this._.started){var m=this.range.clone();o=m.startPath();var y=m.endPath(),w=!m.collapsed&&r(m,o.block),E=!m.collapsed&&r(m,y.block,1);m.shrink(CKEDITOR.SHRINK_ELEMENT,!0),w&&m.setStartAt(o.block,CKEDITOR.POSITION_BEFORE_END),E&&m.setEndAt(y.block,CKEDITOR.POSITION_AFTER_START),o=m.endContainer.hasAscendant("pre",!0)||m.startContainer.hasAscendant("pre",!0),m.enlarge(this.forceBrBreak&&!o||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(!m.collapsed){o=new CKEDITOR.dom.walker(m.clone()),y=CKEDITOR.dom.walker.bookmark(!0,!0),o.evaluator=y,this._.nextNode=o.next(),o=new CKEDITOR.dom.walker(m.clone()),o.evaluator=y,o=o.previous(),this._.lastNode=o.getNextSourceNode(!0,null,m.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(y=this.range.clone(),y.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),y.checkEndOfBlock()&&(y=new CKEDITOR.dom.elementPath(y.endContainer,y.root),this._.lastNode=(y.block||y.blockLimit).getNextSourceNode(!0)));if(!this._.lastNode||!m.root.contains(this._.lastNode))this._.lastNode=this._.docEndMarker=m.document.createText(""),this._.lastNode.insertAfter(o);m=null}this._.started=1,o=m}y=this._.nextNode,m=this._.lastNode;for(this._.nextNode=null;y;){var w=0,E=y.hasAscendant("pre"),S=y.type!=CKEDITOR.NODE_ELEMENT,x=0;if(S)y.type==CKEDITOR.NODE_TEXT&&i.test(y.getText())&&(S=0);else{var T=y.getName();if(CKEDITOR.dtd.$block[T]&&y.getAttribute("contenteditable")=="false"){t=y,n(this,e,t);break}if(y.isBlockBoundary(this.forceBrBreak&&!E&&{br:1})){if(T=="br")S=1;else if(!o&&!y.getChildCount()&&T!="hr"){t=y,l=y.equals(m);break}o&&(o.setEndAt(y,CKEDITOR.POSITION_BEFORE_START),T!="br"&&(this._.nextNode=y)),w=1}else{if(y.getFirst()){o||(o=this.range.clone(),o.setStartAt(y,CKEDITOR.POSITION_BEFORE_START)),y=y.getFirst();continue}S=1}}S&&!o&&(o=this.range.clone(),o.setStartAt(y,CKEDITOR.POSITION_BEFORE_START)),l=(!w||S)&&y.equals(m);if(o&&!w)for(;!y.getNext(u)&&!l;){T=y.getParent();if(T.isBlockBoundary(this.forceBrBreak&&!E&&{br:1})){w=1,S=0,l||T.equals(m),o.setEndAt(T,CKEDITOR.POSITION_BEFORE_END);break}y=T,S=1,l=y.equals(m),x=1}S&&o.setEndAt(y,CKEDITOR.POSITION_AFTER_END),y=this._getNextSourceNode(y,x,m);if((l=!y)||w&&o)break}if(!t){if(!o)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;t=new CKEDITOR.dom.elementPath(o.startContainer,o.root),y=t.blockLimit,w={div:1,th:1,td:1},t=t.block;if(!t&&y&&!this.enforceRealBlocks&&w[y.getName()]&&o.checkStartOfBlock()&&o.checkEndOfBlock()&&!y.equals(o.root))t=y;else if(!t||this.enforceRealBlocks&&t.is(a))t=this.range.document.createElement(e),o.extractContents().appendTo(t),t.trim(),o.insertNode(t),p=v=!0;else if(t.getName()!="li"){if(!o.checkStartOfBlock()||!o.checkEndOfBlock())t=t.clone(!1),o.extractContents().appendTo(t),t.trim(),v=o.splitBlock(),p=!v.wasStartOfBlock,v=!v.wasEndOfBlock,o.insertNode(t)}else l||(this._.nextNode=t.equals(m)?null:this._getNextSourceNode(o.getBoundaryNodes().endNode,1,m))}return p&&(p=t.getPrevious())&&p.type==CKEDITOR.NODE_ELEMENT&&(p.getName()=="br"?p.remove():p.getLast()&&p.getLast().$.nodeName.toLowerCase()=="br"&&p.getLast().remove()),v&&(p=t.getLast())&&p.type==CKEDITOR.NODE_ELEMENT&&p.getName()=="br"&&(!CKEDITOR.env.needsBrFiller||p.getPrevious(s)||p.getNext(s))&&p.remove(),this._.nextNode||(this._.nextNode=l||t.equals(m)||!m?null:this._getNextSourceNode(t,1,m)),t},_getNextSourceNode:function(e,t,n){function r(e){return!e.equals(n)&&!e.equals(i)}for(var i=this.range.root,e=e.getNextSourceNode(t,null,r);!s(e);)e=e.getNextSourceNode(t,null,r);return e}},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()?!1:(this.editorFocus&&e.focus(),this.fire("exec")===!1?!0:t.exec.call(this,e,n)!==!1)},this.refresh=function(e,n){return!this.readOnly&&e.readOnly?!0:this.context&&!n.isContextFor(this.context)?(this.disable(),!0):this.checkAllowed(!0)?(this.startDisabled||this.enable(),this.modes&&!this.modes[e.mode]&&this.disable(),this.fire("refresh",{editor:e,path:n})===!1?!0:t.refresh&&t.refresh.apply(this,arguments)!==!1):(this.disable(),!0)};var n;this.checkAllowed=function(t){return!t&&typeof n=="boolean"?n:n=e.activeFilter.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||typeof this.previousState=="undefined"?CKEDITOR.TRISTATE_OFF:this.previousState)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(e){return this.state==e||e!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed()?!1:(this.previousState=this.state,this.state=e,this.fire("state"),!0)},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,t,n,r,i){var s,u,e=[];for(s in t){u=t[s],u=typeof u=="boolean"?{}:typeof u=="function"?{match:u}:L(u),s.charAt(0)!="$"&&(u.elements=s),n&&(u.featureName=n.toLowerCase());var a=u;a.elements=o(a.elements,/\s+/)||null,a.propertiesOnly=a.propertiesOnly||a.elements===!0;var f=/\s*,\s*/,l=void 0;for(l in _){a[l]=o(a[l],f)||null;var c=a,h=D[l],p=o(a[D[l]],f),d=a[l],v=[],m=!0,y=void 0;p?m=!1:p={};for(y in d)y.charAt(0)=="!"&&(y=y.slice(1),v.push(y),p[y]=!0,m=!1);for(;y=v.pop();)d[y]=d["!"+y],delete d["!"+y];c[h]=(m?!1:p)||null}a.match=a.match||null,r.push(u),e.push(u)}for(var t=i.elements,i=i.generic,b,n=0,r=e.length;n-1?p.push(RegExp("^"+d.replace(/\*/g,".*")+"$")):p.push(d);h=p,h.length&&(a[f]=h,c=!1)}a.nothingRequired=c,a.noProperties=!(a.attributes||a.classes||a.styles);if(s.elements===!0||s.elements===null)i[u?"unshift":"push"](s);else{a=s.elements,delete s.elements;for(b in a)t[b]?t[b][u?"unshift":"push"](s):t[b]=[s]}}}function t(e,t,r,i){if(!e.match||e.match(t))if(i||u(e,t)){e.propertiesOnly||(r.valid=!0),r.allAttributes||(r.allAttributes=n(e.attributes,t.attributes,r.validAttributes)),r.allStyles||(r.allStyles=n(e.styles,t.styles,r.validStyles));if(!r.allClasses){e=e.classes,t=t.classes,i=r.validClasses;if(e)if(e===!0)e=!0;else{for(var s=0,o=t.length,a;s-1&&t.push(n.replace(/\*/g,".*"));return t.length?RegExp("^(?:"+t.join("|")+")$"):null}function v(e){var t=e.attributes,n;delete t.style,delete t["class"];if(n=CKEDITOR.tools.writeCssText(e.styles,!0))t.style=n;e.classes.length&&(t["class"]=e.classes.sort().join(" "))}function m(e){switch(e.name){case"a":if(!e.children.length&&!e.attributes.name)return!1;break;case"img":if(!e.attributes.src)return!1}return!0}function g(e){if(!e)return!1;if(e===!0)return!0;var t=d(e);return function(n){return n in e||t&&n.match(t)}}function y(){return new CKEDITOR.htmlParser.element("br")}function b(e){return e.type==CKEDITOR.NODE_ELEMENT&&(e.name=="br"||C.$block[e.name])}function w(e,t,n){var r=e.name;if(C.$empty[r]||!e.children.length)r=="hr"&&t=="br"?e.replaceWith(y()):(e.parent&&n.push({check:"it",el:e.parent}),e.remove());else if(C.$block[r]||r=="tr")if(t=="br")e.previous&&!b(e.previous)&&(t=y(),t.insertBefore(e)),e.next&&!b(e.next)&&(t=y(),t.insertAfter(e)),e.replaceWithChildren();else{var r=e.children,i;e:{i=C[t];for(var s=0,o=r.length,u;s0;)u=r[--o],s&&(u.type==CKEDITOR.NODE_TEXT||u.type==CKEDITOR.NODE_ELEMENT&&C.$inline[u.name])?(a||(a=new CKEDITOR.htmlParser.element(t),a.insertAfter(e),n.push({check:"parent-down",el:a})),a.add(u,0)):(a=null,f=C[i.name]||C.span,u.insertAfter(e),i.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&u.type==CKEDITOR.NODE_ELEMENT&&!f[u.name]&&n.push({check:"el-up",el:u}));e.remove()}}else r=="style"?e.remove():(e.parent&&n.push({check:"it",el:e.parent}),e.replaceWithChildren())}function E(e,t,n){var r,i;for(r=0;r";if(s in this._.cachedChecks)return this._.cachedChecks[s];r=l(e).$1,i=r.styles;var o=r.classes;r.name=r.elements,r.classes=o=o?o.split(/\s*,\s*/):[],r.styles=f(i),r.attributes=f(r.attributes),r.children=[],o.length&&(r.attributes["class"]=o.join(" ")),i&&(r.attributes.style=CKEDITOR.tools.writeCssText(r.styles)),i=r}else r=e.getDefinition(),i=r.styles,o=r.attributes||{},i?(i=L(i),o.style=CKEDITOR.tools.writeCssText(i,!0)):i={},i={name:r.element,attributes:o,classes:o["class"]?o["class"].split(/\s+/):[],styles:i,children:[]};var o=CKEDITOR.tools.clone(i),u=[],a;if(t!==!1&&(a=this._.transformations[i.name])){for(r=0;r0?!1:CKEDITOR.tools.objectCompare(i.attributes,o.attributes,!0)?!0:!1,typeof e=="string"&&(this._.cachedChecks[s]=t),t},getAllowedEnterMode:function(){var e=["p","div","br"],t={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(n,r){var i=e.slice(),s;if(this.check(M[n]))return n;for(r||(i=i.reverse());s=i.pop();)if(this.check(s))return t[s];return CKEDITOR.ENTER_BR}}(),destroy:function(){delete CKEDITOR.filter.instances[this.id],delete this._,delete this.allowedContent,delete this.disallowedContent}};var _={styles:1,attributes:1,classes:1},D={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},P=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,H={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},B=/^cke:(object|embed|param)$/,j=/^(object|embed|param)$/,F=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){n=n||t;if(!(n in e.styles)){var r=e.attributes[t];r&&(/^\d+$/.test(r)&&(r+="px"),e.styles[n]=r)}delete e.attributes[t]},lengthToAttribute:function(e,t,n){n=n||t;if(!(n in e.attributes)){var r=e.styles[t],i=r&&r.match(/^(\d+)(?:\.\d*)?px$/);i?e.attributes[n]=i[1]:r==O&&(e.attributes[n]=O)}delete e.styles[t]},alignmentToStyle:function(e){if(!("float"in e.styles)){var t=e.attributes.align;if(t=="left"||t=="right")e.styles["float"]=t}delete e.attributes.align},alignmentToAttribute:function(e){if(!("align"in e.attributes)){var t=e.styles["float"];if(t=="left"||t=="right")e.attributes.align=t}delete e.styles["float"]},matchesStyle:S,transform:function(e,t){if(typeof t=="string")e.name=t;else{var n=t.getDefinition(),r=n.styles,i=n.attributes,s,o,u,a;e.name=n.element;for(s in i)if(s=="class"){n=e.classes.join("|");for(u=i[s].split(/\s+/);a=u.pop();)n.indexOf(a)==-1&&e.classes.push(a)}else e.attributes[s]=i[s];for(o in r)e.styles[o]=r[o]}}}}(),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(e){this._.timer&&clearTimeout(this._.timer),e&&(this.currentActive=e),!this.hasFocus&&!this._.locked&&((e=CKEDITOR.currentInstance)&&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",r="blur";t&&(CKEDITOR.env.ie?(n="focusin",r="focusout"):CKEDITOR.event.useCapture=1);var i={blur:function(){e.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(e)}};e.on(n,i.focus,this),e.on(r,i.blur,this),t&&(CKEDITOR.event.useCapture=0),e.setCustomData("focusmanager",this),e.setCustomData("focusmanager_handlers",i)}},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(),r=this.keystrokes[n],i=this._.editor;return e=i.fire("key",{keyCode:n,domEvent:t})===!1,e||(r&&(e=i.execCommand(r,{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.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,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(e,t,n){if(!e||!CKEDITOR.lang.languages[e])e=this.detect(t,e);var r=this,t=function(){r[e].dir=r.rtl[e]?"rtl":"ltr",n(e,r[e])};this[e]?t():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+e+".js"),t,this)},detect:function(e,t){var n=this.languages,t=t||navigator.userLanguage||navigator.language||e,r=t.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),i=r[1],r=r[2];return n[i+"-"+r]?i=i+"-"+r:n[i]||(i=null),CKEDITOR.lang.detect=i?function(){return i}:function(e){return e},i||e}}}(),CKEDITOR.scriptLoader=function(){var e={},t={};return{load:function(n,r,i,s){var o=typeof n=="string";o&&(n=[n]),i||(i=CKEDITOR);var u=n.length,f=[],l=[],c=function(e){r&&(o?r.call(i,e):r.call(i,f,l))};if(u===0)c(!0);else{var h=function(e,t){(t?f:l).push(e),--u<=0&&(s&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),c(t))},p=function(n,r){e[n]=1;var i=t[n];delete t[n];for(var s=0;s1)){var s=new CKEDITOR.dom.element("script");s.setAttributes({type:"text/javascript",src:n}),r&&(CKEDITOR.env.ie&&CKEDITOR.env.version<11?s.$.onreadystatechange=function(){if(s.$.readyState=="loaded"||s.$.readyState=="complete")s.$.onreadystatechange=null,p(n,!0)}:(s.$.onload=function(){setTimeout(function(){p(n,!0)},0)},s.$.onerror=function(){p(n,!1)})),s.appendTo(CKEDITOR.document.getHead())}}};s&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var v=0;v=0?l=e.langCode:(l=e.langCode.replace(/-.*/,""),l=l!=e.langCode&&CKEDITOR.tools.indexOf(f,l)>=0?l:CKEDITOR.tools.indexOf(f,"en")>=0?"en":f[0]),!a.langEntries||!a.langEntries[l]?s.push(CKEDITOR.getUrl(a.path+"lang/"+l+".js")):(e.lang[u]=a.langEntries[l],l=null)),i.push(l),r.push(a)}CKEDITOR.scriptLoader.load(s,function(){for(var n=["beforeInit","init","afterInit"],s=0;s]+)>)|(?:!--([\S|\s]*?)--\>)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\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 r,i,s=0,o;r=this._.htmlPartsRegex.exec(n);){i=r.index,i>s&&(s=n.substring(s,i),o?o.push(s):this.onText(s)),s=this._.htmlPartsRegex.lastIndex;if(i=r[1]){i=i.toLowerCase(),o&&CKEDITOR.dtd.$cdata[i]&&(this.onCDATA(o.join("")),o=null);if(!o){this.onTagClose(i);continue}}if(o)o.push(r[0]);else if(i=r[3]){i=i.toLowerCase();if(!/="/.test(i)){var u={},f,l=r[4];r=!!r[5];if(l)for(;f=e.exec(l);){var c=f[1].toLowerCase();f=f[2]||f[3]||f[4]||"",u[c]=!f&&t[c]?c:CKEDITOR.tools.htmlDecodeAttr(f)}this.onTagOpen(i,u,r),!o&&CKEDITOR.dtd.$cdata[i]&&(o=[])}}else(i=r[2])&&this.onComment(i)}n.length>s&&this.onText(n.substring(s,n.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(e){this._.output.push("<",e)},openTagClose:function(e,t){t?this._.output.push(" />"):this._.output.push(">")},attribute:function(e,t){typeof t=="string"&&(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}}}),"use strict",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,r=this.next;n&&(n.next=r),r&&(r.previous=n),e.splice(t,1),this.parent=null},replaceWith:function(e){var t=this.parent.children,n=CKEDITOR.tools.indexOf(t,this),r=e.previous=this.previous,i=e.next=this.next;r&&(r.next=e),i&&(i.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),r=e.next;t.splice(n+1,0,this),this.next=e.next,this.previous=e,e.next=this,r&&(r.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},getAscendant:function(e){var t=typeof e=="function"?e:typeof e=="string"?function(t){return t.name==e}:function(t){return t.name in e},n=this.parent;for(;n&&n.type==CKEDITOR.NODE_ELEMENT;){if(t(n))return n;n=n.parent}return null},wrapWith:function(e){return this.replaceWith(e),e.add(this),e},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(e){return e||{}}}}(),"use strict",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,t){var n=this.value;return(n=e.onComment(t,n,this))?typeof n!="string"?(this.replaceWith(n),!1):(this.value=n,!0):(this.remove(),!1)},writeHtml:function(e,t){t&&this.filter(t),e.comment(this.value)}}),"use strict",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,t){if(!(this.value=e.onText(t,this.value,this)))return this.remove(),!1},writeHtml:function(e,t){t&&this.filter(t),e.text(this.value)}})}(),"use strict",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)}})}(),"use strict",CKEDITOR.htmlParser.fragment=function(){this.children=[],this.parent=null,this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function e(e){return e.attributes["data-cke-survive"]?!1:e.name=="a"&&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},r=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),i={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(s,o,u){function f(e){var t;if(w.length>0)for(var n=0;n=0;t--)if(e==w[t].name){w.splice(t,1);return}for(var n=[],r=[],i=S;i!=y&&i.name!=e;)i._.isBlockLike||r.unshift(i),n.push(i),i=i.returnPoint||i.parent;if(i!=y){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);if(n.value.length===0){this.children.pop(),this.add(e);return}}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,t){t=this.getFilterContext(t),e.onRoot(t,this),this.filterChildren(e,!1,t)},filterChildren:function(e,t,n){if(this.childrenFilteredBy!=e.id){n=this.getFilterContext(n),t&&!this.parent&&e.onRoot(n,this),this.childrenFilteredBy=e.id;for(t=0;t=0&&e7||i.name in CKEDITOR.dtd.tr||i.name in CKEDITOR.dtd.$listItem)?o=!1:(o=n(i),o=!o||i.name=="form"&&o.name=="input");o&&i.add(u(e))}}}function f(e,t){if((!c||CKEDITOR.env.needsBrFiller)&&e.type==CKEDITOR.NODE_ELEMENT&&e.name=="br"&&!e.attributes["data-cke-eol"])return!0;var n;if(e.type==CKEDITOR.NODE_TEXT&&(n=e.value.match(m))){n.index&&((new CKEDITOR.htmlParser.text(e.value.substring(0,n.index))).insertBefore(e),e.value=n[0]);if(!CKEDITOR.env.needsBrFiller&&c&&(!t||e.parent.name in h))return!0;if(!c)if((n=e.previous)&&n.name=="br"||!n||s(n))return!0}return!1}var l={elements:{}},c=t=="html",h=CKEDITOR.tools.extend({},w),p;for(p in h)"#"in y[p]||delete h[p];for(p in h)l.elements[p]=a(c,e.config.fillEmptyBlocks);return l.root=a(c,!1),l.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&&i(n);)n=n.next;var a=r(t);!n&&s(t.parent)?o(t.parent,u(e)):s(n)&&a&&!s(a)&&u(e).insertBefore(n)}}}}(c),l}function t(e,t){return e!=CKEDITOR.ENTER_BR&&t!==!1?e==CKEDITOR.ENTER_DIV?"div":"p":!1}function n(e){for(e=e.children[e.children.length-1];e&&i(e);)e=e.previous;return e}function r(e){for(e=e.previous;e&&i(e);)e=e.previous;return e}function i(e){return e.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(e.value)||e.type==CKEDITOR.NODE_ELEMENT&&e.attributes["data-cke-bookmark"]}function s(e){return e&&(e.type==CKEDITOR.NODE_ELEMENT&&e.name in w||e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function o(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 u(e){e=e.attributes,e.contenteditable!="false"&&(e["data-cke-editable"]=e.contenteditable?"true":1),e.contenteditable="false"}function a(e){e=e.attributes;switch(e["data-cke-editable"]){case"true":e.contenteditable="true";break;case"1":delete e.contenteditable}}function f(e){return e.replace(N,function(e,t,n){return"<"+t+n.replace(C,function(e,t){return k.test(t)&&n.indexOf("data-cke-saved-"+t)==-1?" data-cke-saved-"+e+" data-cke-"+CKEDITOR.rnd+"-"+e:e})+">"})}function l(e,t){return e.replace(t,function(e,t,n){return e.indexOf("/g,">")+""),""+encodeURIComponent(e)+" "})}function c(e){return e.replace(O,function(e,t){return decodeURIComponent(t)})}function h(e){return e.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,function(e){return""})}function p(e){return e.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(e,t){return decodeURIComponent(t)})}function d(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 v(e,t){for(var n=[],r=t.config.protectedSource,i=t._.dataStore||(t._.dataStore={id:1}),s=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,r=[/"].join("")),n.$.close();for(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;n').appendTo(t.getParent())}return n.unselectable(),r.unselectable(),{element:e,parts:{dialog:e.getChild(0),title:n,close:r,tabs:t.getChild(2),contents:t.getChild([3,0,0,0]),footer:t.getChild([3,0,1,0])}}}function o(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 u(e){function t(){e.layout()}var n=CKEDITOR.document.getWindow();n.on("resize",t),e.on("hide",function(){n.removeListener("resize",t)})}function a(e,t){this._={dialog:e},CKEDITOR.tools.extend(this,t)}function f(e){function t(t){var n=e.getSize(),a=CKEDITOR.document.getWindow().getViewPaneSize(),f=t.data.$.screenX,l=t.data.$.screenY,c=f-r.x,h=l-r.y;r={x:f,y:l},i.x=i.x+c,i.y=i.y+h,e.move(i.x+u[3]a.width-n.width-o?a.width-n.width+(s.lang.dir=="rtl"?0:u[1]):i.x,i.y+u[0]a.height-n.height-o?a.height-n.height+u[2]:i.y,1),t.data.preventDefault()}function n(){CKEDITOR.document.removeListener("mousemove",t),CKEDITOR.document.removeListener("mouseup",n);if(CKEDITOR.env.ie6Compat){var e=x.getChild(0).getFrameDocument();e.removeListener("mousemove",t),e.removeListener("mouseup",n)}}var r=null,i=null,s=e.getParentEditor(),o=s.config.dialog_magnetDistance,u=CKEDITOR.skin.margins||[0,0,0,0];typeof o=="undefined"&&(o=20),e.parts.title.on("mousedown",function(s){r={x:s.data.$.screenX,y:s.data.$.screenY},CKEDITOR.document.on("mousemove",t),CKEDITOR.document.on("mouseup",n),i=e.getPosition();if(CKEDITOR.env.ie6Compat){var o=x.getChild(0).getFrameDocument();o.on("mousemove",t),o.on("mouseup",n)}s.data.preventDefault()},e)}function l(e){function r(r){var i=u.lang.dir=="rtl",h=c.width,p=c.height,d=h+(r.data.$.screenX-t)*(i?-1:1)*(e._.moved?1:2),v=p+(r.data.$.screenY-n)*(e._.moved?1:2),m=e._.element.getFirst(),m=i&&m.getComputedStyle("right"),g=e.getPosition();g.y+v>l.height&&(v=l.height-g.y),(i?m:g.x)+d>l.width&&(d=l.width-(i?m:g.x));if(o==CKEDITOR.DIALOG_RESIZE_WIDTH||o==CKEDITOR.DIALOG_RESIZE_BOTH)h=Math.max(s.minWidth||0,d-a);if(o==CKEDITOR.DIALOG_RESIZE_HEIGHT||o==CKEDITOR.DIALOG_RESIZE_BOTH)p=Math.max(s.minHeight||0,v-f);e.resize(h,p),e._.moved||e.layout(),r.data.preventDefault()}function i(){CKEDITOR.document.removeListener("mouseup",i),CKEDITOR.document.removeListener("mousemove",r),h&&(h.remove(),h=null);if(CKEDITOR.env.ie6Compat){var e=x.getChild(0).getFrameDocument();e.removeListener("mouseup",i),e.removeListener("mousemove",r)}}var t,n,s=e.definition,o=s.resizable;if(o!=CKEDITOR.DIALOG_RESIZE_NONE){var u=e.getParentEditor(),a,f,l,c,h,p=CKEDITOR.tools.addFunction(function(s){c=e.getSize();var o=e.parts.contents;o.$.getElementsByTagName("iframe").length&&(h=CKEDITOR.dom.element.createFromHtml('
'),o.append(h)),f=c.height-e.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks)),a=c.width-e.parts.contents.getSize("width",1),t=s.screenX,n=s.screenY,l=CKEDITOR.document.getWindow().getViewPaneSize(),CKEDITOR.document.on("mousemove",r),CKEDITOR.document.on("mouseup",i),CKEDITOR.env.ie6Compat&&(o=x.getChild(0).getFrameDocument(),o.on("mousemove",r),o.on("mouseup",i)),s.preventDefault&&s.preventDefault()});e.on("load",function(){var t="";o==CKEDITOR.DIALOG_RESIZE_WIDTH?t=" cke_resizer_horizontal":o==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(t=" cke_resizer_vertical"),t=CKEDITOR.dom.element.createFromHtml(''+(u.lang.dir=="ltr"?"◢":"◣")+"
"),e.parts.footer.append(t,1)}),u.on("destroy",function(){CKEDITOR.tools.removeFunction(p)})}}function c(e){e.data.preventDefault(1)}function h(e){var t=CKEDITOR.document.getWindow(),n=e.config,r=n.dialog_backgroundCoverColor||"white",i=n.dialog_backgroundCoverOpacity,s=n.baseFloatZIndex,n=CKEDITOR.tools.genKey(r,i,s),o=S[n];o?o.show():(s=[''],CKEDITOR.env.ie6Compat&&(r="",s.push('')),s.push("
"),o=CKEDITOR.dom.element.createFromHtml(s.join("")),o.setOpacity(i!==void 0?i:.5),o.on("keydown",c),o.on("keypress",c),o.on("keyup",c),o.appendTo(CKEDITOR.document.getBody()),S[n]=o),e.focusManager.add(o),x=o;var e=function(){var e=t.getViewPaneSize();o.setStyles({width:e.width+"px",height:e.height+"px"})},u=function(){var e=t.getScrollPosition(),n=CKEDITOR.dialog._.currentTop;o.setStyles({left:e.x+"px",top:e.y+"px"});if(n)do e=n.getPosition(),n.move(e.x,e.y);while(n=n._.parentDialog)};E=e,t.on("resize",e),e(),(!CKEDITOR.env.mac||!CKEDITOR.env.webkit)&&o.focus();if(CKEDITOR.env.ie6Compat){var a=function(){u(),arguments.callee.prevScrollHandler.apply(this,arguments)};t.$.setTimeout(function(){a.prevScrollHandler=window.onscroll||function(){},window.onscroll=a},0),u()}}function p(e){x&&(e.focusManager.remove(x),e=CKEDITOR.document.getWindow(),x.hide(),e.removeListener("resize",E),CKEDITOR.env.ie6Compat&&e.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),E=null)}var d=CKEDITOR.tools.cssLength,v='';CKEDITOR.dialog=function(n,o){function u(){var e=x._.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;n1)x._.tabBarMode=!0,x._.tabs[x._.currentTabId][0].focus(),b=1;else if(i!=37&&i!=39||!x._.tabBarMode)if(i!=13&&i!=32||!x._.tabBarMode)if(i==13)i=r.data.getTarget(),!i.is("a","button","select","textarea")&&(!i.is("input")||i.$.type!="button")&&((i=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(i.click,0,i),b=1),E=1;else{if(i!=27)return;(i=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(i.click,0,i):this.fire("cancel",{hide:!0}).hide!==!1&&this.hide(),E=1}else this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex=-1,a(1),b=1;else i=i==(s?39:37)?e.call(x):t.call(x),x.selectPage(i),x._.tabs[i][0].focus(),b=1;h(r)}}function h(e){b?e.data.preventDefault(1):E&&e.data.stopPropagation()}var p=CKEDITOR.dialog._.dialogDefinitions[o],d=CKEDITOR.tools.clone(m),v=n.config.dialog_buttonsOrder||"OS",g=n.lang.dir,y={},b,E;(v=="OS"&&CKEDITOR.env.mac||v=="rtl"&&g=="ltr"||v=="ltr"&&g=="rtl")&&d.buttons.reverse(),p=CKEDITOR.tools.extend(p(n),d),p=CKEDITOR.tools.clone(p),p=new w(this,p),d=s(n),this._={editor:n,element:d.element,name:o,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1},this.parts=d.parts,CKEDITOR.tools.setTimeout(function(){n.fire("ariaWidget",this.parts.contents)},0,this),d={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"},d[g=="rtl"?"right":"left"]=0,this.parts.dialog.setStyles(d),CKEDITOR.event.call(this),this.definition=p=CKEDITOR.fire("dialogDefinition",{name:o,definition:p},n).definition;if(!("removeDialogTabs"in n._)&&n.config.removeDialogTabs){d=n.config.removeDialogTabs.split(";");for(g=0;g1)x._.tabBarMode=!0,x._.tabs[x._.currentTabId][0].focus();else if(!this._.hasFocus){this._.currentFocusIndex=-1;if(p.onFocus){var e=p.onFocus.call(this);e&&e.focus()}else a(1)}},this,null,4294967295),CKEDITOR.env.ie6Compat&&this.on("load",function(){var e=this.getElement(),t=e.getFirst();t.remove(),t.appendTo(e)},this),f(this),l(this),(new CKEDITOR.dom.text(p.title,CKEDITOR.document)).appendTo(this.parts.title);for(g=0;g0?t:0)+"px"},t[i?"right":"left"]=(e>0?e:0)+"px",r.setStyles(t),n&&(this._.moved=1)},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var e=this._.element,t=this.definition;!e.getParent()||!e.getParent().equals(CKEDITOR.document.getBody())?e.appendTo(CKEDITOR.document.getBody()):e.setStyle("display","block"),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),CKEDITOR.dialog._.currentZIndex===null&&(CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex),this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex=CKEDITOR.dialog._.currentZIndex+10),CKEDITOR.dialog._.currentTop===null?(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",N),e.on("keyup",C),this._.hasFocus=!1;for(var n in t.contents)if(t.contents[n]){var e=t.contents[n],r=this._.tabs[e.id],i=e.requiredContent,s=0;if(r){for(var o in this._.contents[e.id]){var a=this._.contents[e.id][o];a.type!="hbox"&&a.type!="vbox"&&!!a.getInputElement()&&(a.requiredContent&&!this._.editor.activeFilter.check(a.requiredContent)?a.disable():(a.enable(),s++))}!s||i&&!this._.editor.activeFilter.check(i)?r[0].addClass("cke_dialog_tab_disabled"):r[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout(),u(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(),r=(n.width-t.width)/2,i=(n.height-t.height)/2;CKEDITOR.env.ie6Compat||(t.height+(i>0?i:0)>n.height||t.width+(r>0?r:0)>n.width?e.setStyle("position","absolute"):e.setStyle("position","fixed")),this.move(this._.moved?this._.position.x:r,this._.moved?this._.position.y:i)},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;e.setStyle("display","none"),this.parts.dialog.setStyle("visibility","hidden");for(L(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 p(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex=CKEDITOR.dialog._.currentZIndex-10;else{CKEDITOR.dialog._.currentZIndex=null,e.removeListener("keydown",N),e.removeListener("keyup",C);var n=this._.editor;n.focus(),setTimeout(function(){n.focusManager.unlock(),CKEDITOR.env.iOS&&n.window.focus()},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)+'"':"",r=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),i=this._.contents[e.id]={},s=r.getChild(),o=0;r=s.shift();)!r.notAllowed&&r.type!="hbox"&&r.type!="vbox"&&o++,i[r.id]=r,typeof r.getChild=="function"&&s.push.apply(s,r.getChild());o||(e.hidden=!0),t=CKEDITOR.dom.element.createFromHtml(t.join("")),t.setAttribute("role","tabpanel"),r=CKEDITOR.env,i="cke_"+e.id+"_"+CKEDITOR.tools.getNextNumber(),n=CKEDITOR.dom.element.createFromHtml(['0?" cke_last":"cke_first",n,e.hidden?' style="display:none"':"",' id="',i,'"',r.gecko&&!r.hc?"":' href="javascript:void(0)"',' tabIndex="-1" hidefocus="true" role="tab">',e.label," "].join("")),t.setAttribute("aria-labelledby",i),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&&(k(this,this,"CTRL+"+e.accessKey,O,A),this._.accessKeyMap["CTRL+"+e.accessKey]=e.id)}},selectPage:function(e){if(this._.currentTabId!=e&&!this._.tabs[e][0].hasClass("cke_dialog_tab_disabled")&&this.fire("selectPage",{page:e,currentPage:this._.currentTabId})!==!1){for(var t in this._.tabs){var r=this._.tabs[t][0],i=this._.tabs[t][1];t!=e&&(r.removeClass("cke_dialog_tab_selected"),i.hide()),i.setAttribute("aria-hidden",t!=e)}var s=this._.tabs[e];s[0].addClass("cke_dialog_tab_selected"),CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(n(s[1]),s[1].show(),setTimeout(function(){n(s[1],1)},0)):s[1].show(),this._.currentTabId=e,this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,e)}},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(t){var n=this._.tabs[t]&&this._.tabs[t][0];n&&this._.pageCount!=1&&n.isVisible()&&(t==this._.currentTabId&&this.selectPage(e.call(this)),n.hide(),this._.pageCount--,this.updateStyle())},showPage:function(e){if(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(typeof t=="undefined")t=this._.focusList.length,this._.focusList.push(new o(this,e,t));else{this._.focusList.splice(t,0,new o(this,e,t));for(var n=t+1;n=0;r--)(n[r].dialog==e||n[r].uiElement==e)&&n.splice(r,1);n.length===0&&delete T[t]}},A=function(e,t){e._.accessKeyMap[t]&&e.selectPage(e._.accessKeyMap[t])},O=function(){};(function(){CKEDITOR.ui.dialog={uiElement:function(e,t,n,r,i,s,o){if(!(arguments.length<4)){var u=(r.call?r(t):r)||"div",a=["<",u," "],f=(i&&i.call?i(t):i)||{},l=(s&&s.call?s(t):s)||{},c=(o&&o.call?o.call(this,e,t):o)||"",h=this.domId=l.id||CKEDITOR.tools.getNextId()+"_uiElement";t.requiredContent&&!e.getParentEditor().filter.check(t.requiredContent)&&(f.display="none",this.notAllowed=!0),l.id=h;var p={};t.type&&(p["cke_dialog_ui_"+t.type]=1),t.className&&(p[t.className]=1),t.disabled&&(p.cke_disabled=1);for(var d=l["class"]&&l["class"].split?l["class"].split(" "):[],h=0;h=0;h--)p[h]===""&&p.splice(h,1);p.length>0&&(l.style=(l.style?l.style+"; ":"")+p.join("; "));for(h in l)a.push(h+'="'+CKEDITOR.tools.htmlEncode(l[h])+'" ');a.push(">",c,"",u,">"),n.push(a.join("")),(this._||(this._={})).dialog=e,typeof t.isChanged=="boolean"&&(this.isChanged=function(){return t.isChanged}),typeof t.isChanged=="function"&&(this.isChanged=t.isChanged),typeof t.setValue=="function"&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(e){return function(n){e.call(this,t.setValue.call(this,n))}})),typeof t.getValue=="function"&&(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&&k(this,e,"CTRL+"+t.accessKey);var v=this;e.on("load",function(){var t=v.getInputElement();if(t){var n=v.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,v.fire("focus"),n&&this.addClass(n)}),t.on("blur",function(){v.fire("blur"),n&&this.removeClass(n)})}}),CKEDITOR.tools.extend(this,t),this.keyboardFocusable&&(this.tabIndex=t.tabIndex||0,this.focusIndex=e._.focusList.push(this)-1,this.on("focus",function(){e._.currentFocusIndex=v.focusIndex}))}},hbox:function(e,t,n,r,i){if(!(arguments.length<4)){this._||(this._={});var s=this._.children=t,o=i&&i.widths||null,u=i&&i.height||null,a,f={role:"presentation"};i&&i.align&&(f.align=i.align),CKEDITOR.ui.dialog.uiElement.call(this,e,i||{type:"hbox"},r,"table",{},f,function(){var e=[''];for(a=0;a0&&e.push('style="'+r.join("; ")+'" '),e.push(">",n[a],"")}return e.push(" "),e.join("")})}},vbox:function(e,t,n,r,i){if(!(arguments.length<3)){this._||(this._={});var s=this._.children=t,o=i&&i.width||null,u=i&&i.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,e,i||{type:"vbox"},r,"div",null,{role:"presentation"},function(){var t=['");for(var r=0;r0&&t.push('style="',a.join("; "),'" '),t.push(' class="cke_dialog_ui_vbox_child">',n[r]," ")}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())&&e.$.className.search("cke_dialog_page_contents")==-1;);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=/^on([A-Z]\w+)/,n,r=function(e,t,n,r){t.on("load",function(){e.getInputElement().on(n,r,e)})},i;for(i in e)if(n=i.match(t))this.eventProcessors[i]?this.eventProcessors[i].call(this,this._.dialog,e[i]):r(this,this._.dialog,n[1].toLowerCase(),e[i]);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()?!1:!0}},CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(e){return arguments.length<1?this._.children.concat():(e.splice||(e=[e]),e.length<2?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 r=t.children,i,s=[],o=[],u=0;u=700}]],italic:["em","i",["span",function(e){return e.styles["font-style"]=="italic"}]],underline:["u",["span",function(e){return e.styles["text-decoration"]=="underline"}]],strike:["s","strike",["span",function(e){return e.styles["text-decoration"]=="line-through"}]],subscript:["sub"],superscript:["sup"]},i=e.config,s=e.lang.basicstyles;n("Bold",s.bold,"bold",i.coreStyles_bold),n("Italic",s.italic,"italic",i.coreStyles_italic),n("Underline",s.underline,"underline",i.coreStyles_underline),n("Strike",s.strike,"strike",i.coreStyles_strike),n("Subscript",s.subscript,"subscript",i.coreStyles_subscript),n("Superscript",s.superscript,"superscript",i.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(),r=n&&n.getRanges()[0];if(r){var i=n.createBookmarks();if(CKEDITOR.env.ie){var s=i[0].startNode,o=i[0].endNode,u;if(s&&s.getParent().getName()=="blockquote")for(u=s;u=u.getNext();)if(u.type==CKEDITOR.NODE_ELEMENT&&u.isBlockBoundary()){s.move(u,!0);break}if(o&&o.getParent().getName()=="blockquote")for(u=o;u=u.getPrevious();)if(u.type==CKEDITOR.NODE_ELEMENT&&u.isBlockBoundary()){o.move(u);break}}var a=r.createIterator();a.enlargeBr=e.config.enterMode!=CKEDITOR.ENTER_BR;if(t==CKEDITOR.TRISTATE_OFF){for(s=[];t=a.getNextParagraph();)s.push(t);s.length<1&&(t=e.document.createElement(e.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),o=i.shift(),r.insertNode(t),t.append(new CKEDITOR.dom.text("",e.document)),r.moveToBookmark(o),r.selectNodeContents(t),r.collapse(!0),o=r.createBookmark(),s.push(t),i.unshift(o)),u=s[0].getParent(),r=[];for(o=0;o0;){for(t=s.shift();!t.getParent().equals(u);)t=t.getParent();t.equals(o)||r.push(t),o=t}for(;r.length>0;){t=r.shift();if(t.getName()=="blockquote"){for(o=new CKEDITOR.dom.documentFragment(e.document);t.getFirst();)o.append(t.getFirst().remove()),s.push(o.getLast());o.replace(t)}else s.push(t)}r=e.document.createElement("blockquote");for(r.insertBefore(s[0]);s.length>0;)t=s.shift(),r.append(t)}else if(t==CKEDITOR.TRISTATE_ON){o=[];for(u={};t=a.getNextParagraph();){for(s=r=null;t.getParent();){if(t.getParent().getName()=="blockquote"){r=t.getParent(),s=t;break}t=t.getParent()}r&&s&&!s.getCustomData("blockquote_moveout")&&(o.push(s),CKEDITOR.dom.element.setMarker(u,s,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(u),t=[],s=[];for(u={};o.length>0;)a=o.shift(),r=a.getParent(),a.getPrevious()?a.getNext()?(a.breakParent(a.getParent()),s.push(a.getNext())):a.remove().insertAfter(r):a.remove().insertBefore(r),r.getCustomData("blockquote_processed")||(s.push(r),CKEDITOR.dom.element.setMarker(u,r,"blockquote_processed",!0)),t.push(a);CKEDITOR.dom.element.clearAllMarkers(u);for(o=s.length-1;o>=0;o--){r=s[o];e:{u=r;for(var a=0,f=u.getChildCount(),l=void 0;a7?n.$:n.$.selection.createRange()).execCommand(t),r.removeListener(t,s),i}function u(t,n,r){return t={type:t},r&&e.fire("beforePaste",t)===!1||!n?!1:(t.dataValue=n,e.fire("paste",t))}function a(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var t=e.getSelection(),n,r,i;t.getType()==CKEDITOR.SELECTION_ELEMENT&&(n=t.getSelectedElement())&&(r=t.getRanges()[0],i=e.document.createText(""),i.insertBefore(n),r.setStartBefore(i),r.setEndAfter(n),t.selectRanges([r]),setTimeout(function(){n.getParent()&&(i.remove(),t.selectElement(n))},0))}}function f(t,n){var r=e.document,i=e.editable(),s=function(e){e.cancel()},o;if(!r.getById("cke_pastebin")){var u=e.getSelection(),a=u.createBookmarks();CKEDITOR.env.ie&&u.root.fire("selectionchange");var f=new CKEDITOR.dom.element((CKEDITOR.env.webkit||i.is("body"))&&!CKEDITOR.env.ie?"body":"div",r);f.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var l=0,r=r.getWindow();CKEDITOR.env.webkit?(i.append(f),f.addClass("cke_editable"),i.is("body")||(l=i.getComputedStyle("position")!="static"?i:CKEDITOR.dom.element.get(i.$.offsetParent),l=l.getDocumentPosition().y)):i.getAscendant(CKEDITOR.env.ie?"body":"html",1).append(f),f.setStyles({position:"absolute",top:r.getScrollPosition().y-l+10+"px",width:"1px",height:Math.max(1,r.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0}),CKEDITOR.env.safari&&f.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text")),(l=f.getParent().isReadOnly())?(f.setOpacity(0),f.setAttribute("contenteditable",!0)):f.setStyle(e.config.contentsLangDirection=="ltr"?"left":"right","-1000px"),e.on("selectionChange",s,null,null,0);if(CKEDITOR.env.webkit||CKEDITOR.env.gecko)o=i.once("blur",s,null,null,-100);l&&f.focus(),l=new CKEDITOR.dom.range(f),l.selectNodeContents(f);var c=l.select();CKEDITOR.env.ie&&(o=i.once("blur",function(){e.lockSelection(c)}));var h=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=h),o&&o.removeListener(),CKEDITOR.env.ie&&i.focus(),u.selectBookmarks(a),f.remove();var t;CKEDITOR.env.webkit&&(t=f.getFirst())&&t.is&&t.hasClass("Apple-style-span")&&(f=t),e.removeListener("selectionChange",s),n(f.getHtml())},0)}}function l(){if(CKEDITOR.env.ie){e.focus(),i();var t=e.focusManager;t.lock();if(e.editable().fire(y)&&!o("paste"))return t.unlock(),!1;t.unlock()}else try{if(e.editable().fire(y)&&!e.document.$.execCommand("Paste",!1,null))throw 0}catch(n){return!1}return!0}function c(t){if(e.mode=="wysiwyg")switch(t.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:t=e.editable(),i(),!CKEDITOR.env.ie&&t.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:e.fire("saveSnapshot"),setTimeout(function(){e.fire("saveSnapshot")},50)}}function h(t){var n={type:"auto"},r=e.fire("beforePaste",n);f(t,function(e){e=e.replace(/]+data-cke-bookmark[^<]*?<\/span>/ig,""),r&&u(n.type,e,0,1)})}function p(){if(e.mode=="wysiwyg"){var t=d("paste");e.getCommand("cut").setState(d("cut")),e.getCommand("copy").setState(d("copy")),e.getCommand("paste").setState(t),e.fire("pasteState",t)}}function d(t){if(g&&t in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if(t=="paste")return CKEDITOR.TRISTATE_OFF;var t=e.getSelection(),n=t.getRanges();return t.getType()==CKEDITOR.SELECTION_NONE||n.length==1&&n[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var v=0,m=0,g=0,y=CKEDITOR.env.ie?"beforepaste":"paste";(function(){e.on("key",c),e.on("contentDom",t),e.on("selectionChange",function(e){g=e.data.selection.getRanges()[0].checkReadOnly(),p()}),e.contextMenu&&e.contextMenu.addListener(function(e,t){return g=t.getRanges()[0].checkReadOnly(),{cut:d("cut"),copy:d("copy"),paste:d("paste")}})})(),function(){function t(t,n,r,i,s){var o=e.lang.clipboard[n];e.addCommand(n,r),e.ui.addButton&&e.ui.addButton(t,{label:o,command:n,toolbar:"clipboard,"+i}),e.addMenuItems&&e.addMenuItem(n,{label:o,command:n,group:"clipboard",order:s})}t("Cut","cut",n("cut"),10,1),t("Copy","copy",n("copy"),20,4),t("Paste","paste",r(),30,8)}(),e.getClipboardData=function(t,n){function r(e){e.removeListener(),e.cancel(),n(e.data)}function i(e){e.removeListener(),e.cancel(),a=!0,n({type:u,dataValue:e.data})}function s(){this.customTitle=t&&t.title}var o=!1,u="auto",a=!1;n||(n=t,t=null),e.on("paste",r,null,null,0),e.on("beforePaste",function(e){e.removeListener(),o=!0,u=e.data.type},null,null,1e3),l()===!1&&(e.removeListener("paste",r),o&&e.fire("pasteDialog",s)?(e.on("pasteDialogCommit",i),e.on("dialogHide",function(e){e.removeListener(),e.data.removeListener("pasteDialogCommit",i),setTimeout(function(){a||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)return"html";if(!e.match(/^([^<]| )*$/gi))return"html"}return"htmlifiedtext"}function n(e,t){function n(e){return CKEDITOR.tools.repeat("
",~~(e/2))+(e%2==1?" ":"")}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&&t.indexOf("
")>-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&&e.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(t=t.replace(/^
$/,"
")),t.indexOf("
")>-1&&(t="
"+t.replace(/( ){2,}/g,function(e){return n(e.length/4)})+"
")),s(e,t))}function r(){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),r={p:1,br:1,"cke:br":1},i=CKEDITOR.dtd,s=CKEDITOR.tools.extend({area:1,basefont:1,embed:1,iframe:1,map:1,object:1,param:1},CKEDITOR.dtd.$nonBodyContent,CKEDITOR.dtd.$cdata),o=function(e){delete e.name,e.add(new CKEDITOR.htmlParser.text(" "))},u=function(e){for(var t=e,n;(t=t.next)&&t.name&&t.name.match(/^h\d$/);){n=new CKEDITOR.htmlParser.element("cke:br"),n.isEmpty=!0;for(e.add(n);n=t.children.shift();)e.add(n)}};return e.addRules({elements:{h1:u,h2:u,h3:u,h4:u,h5:u,h6:u,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:o,th:o,$:function(e){var o=e.name,u;if(s[o])return!1;e.attributes={};if(o=="br")return e;if(t[o])e.name="p";else if(n[o])delete e.name;else if(i[o]){u=new CKEDITOR.htmlParser.element("cke:br"),u.isEmpty=!0;if(CKEDITOR.dtd.$empty[o])return u;e.add(u,0),u=u.clone(),u.isEmpty=!0,e.add(u),delete e.name}return r[e.name]||delete e.name,e}}},{applyToAll:!0}),e}function i(e,t,n){var t=new CKEDITOR.htmlParser.fragment.fromHtml(t),r=new CKEDITOR.htmlParser.basicWriter;t.writeHtml(r,n);var t=r.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,""),i=0,t=t.replace(/<\/?p>/g,function(e){if(e=="
"){if(++i>1)return"
"}else if(--i>0)return"
";return e}).replace(/
<\/p>/g,"");return s(e,t)}function s(e,t){return e.enterMode==CKEDITOR.ENTER_BR?t=t.replace(/(<\/p>
)+/g,function(e){return CKEDITOR.tools.repeat(" ",e.length/7*2)}).replace(/<\/?p>/g,""):e.enterMode==CKEDITOR.ENTER_DIV&&(t=t.replace(/<(\/)?p>/g,"<$1div>")),t}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(s){var o;e(s),CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js")),s.on("paste",function(e){var t=e.data.dataValue,n=CKEDITOR.dtd.$block;t.indexOf("Apple-")>-1&&(t=t.replace(/ <\/span>/gi," "),e.data.type!="html"&&(t=t.replace(/]*>([^<]*)<\/span>/gi,function(e,t){return t.replace(/\t/g," ")})),t.indexOf(' ')>-1&&(e.data.startsWithEOL=1,e.data.preSniffing="html",t=t.replace(/ /,"")),t=t.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));if(t.match(/^<[^<]+cke_(editable|contents)/i)){var r,i,s=new CKEDITOR.dom.element("div");for(s.setHtml(t);s.getChildCount()==1&&(r=s.getFirst())&&r.type==CKEDITOR.NODE_ELEMENT&&(r.hasClass("cke_editable")||r.hasClass("cke_contents"));)s=i=r;i&&(t=i.getHtml().replace(/ $/i,""))}CKEDITOR.env.ie?t=t.replace(/^ (?: |\r\n)?<(\w+)/g,function(t,r){return r.toLowerCase()in n?(e.data.preSniffing="html","<"+r):t}):CKEDITOR.env.webkit?t=t.replace(/<\/(\w+)><\/div>$/,function(t,r){return r in n?(e.data.endsWithEOL=1,""+r+">"):t}):CKEDITOR.env.gecko&&(t=t.replace(/(\s)
$/,"$1")),e.data.dataValue=t},null,null,3),s.on("paste",function(e){var e=e.data,u=e.type,a=e.dataValue,l,h=s.config.clipboard_defaultContentType||"html";l=u=="html"||e.preSniffing=="html"?"html":t(a),l=="htmlifiedtext"?a=n(s.config,a):u=="text"&&l=="html"&&(a=i(s.config,a,o||(o=r(s)))),e.startsWithEOL&&(a='
'+a),e.endsWithEOL&&(a+='
'),u=="auto"&&(u=l=="html"||h=="html"?"html":"text"),e.type=u,e.dataValue=a,delete e.preSniffing,delete e.startsWithEOL,delete e.endsWithEOL},null,null,6),s.on("paste",function(e){e=e.data,s.insertHtml(e.dataValue,e.type),setTimeout(function(){s.fire("afterPaste")},0)},null,null,1e3),s.on("pasteDialog",function(e){setTimeout(function(){s.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(r,i){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+");"},s))),e.getWindow().$.CKEDITOR=CKEDITOR,e.on("keydown",function(e){var t=e.data.getKeystroke(),n=this.document.getById(this.id).getAttribute("dir");this._.onKeyDown&&this._.onKeyDown(t)===!1?e.data.preventDefault():(t==27||t==(n=="rtl"?39:37))&&this.onEscape&&this.onEscape(t)===!1&&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 s={editorId:r.id,id:this.id,langCode:r.langCode,dir:r.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":r.config.baseFloatZIndex+1};if(this.isFramed){var o=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";s.frame=t.output({id:this.id+"_frame",src:o})}return o=e.output(s),i&&i.push(o),o},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&&t.hide(),this._.currentBlock=e,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"},styles:{display:"none"}})),t&&CKEDITOR.tools.extend(this,t),this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title||this.attributes["aria-label"]}),this.keys={},this._.focusIndex=-1,this.element.disableContextMenu()},_:{markItem:function(e){e!=-1&&(e=this.element.getElementsByTag("a").getItem(this._.focusIndex=e),CKEDITOR.env.webkit&&e.getDocument().getWindow().focus(),e.focus(),this.onMark&&this.onMark(e))}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){(!this.onHide||this.onHide.call(this)!==!0)&&this.element.setStyle("display","none")},onKeyDown:function(e,t){var n=this.keys[e];switch(n){case"next":for(var r=this._.focusIndex,n=this.element.getElementsByTag("a"),i;i=n.getItem(++r);)if(i.getAttribute("_cke_focus")&&i.$.offsetWidth){this._.focusIndex=r,i.focus();break}if(!i&&!t)return this._.focusIndex=-1,this.onKeyDown(e,1);return!1;case"prev":r=this._.focusIndex;for(n=this.element.getElementsByTag("a");r>0&&(i=n.getItem(--r));){if(i.getAttribute("_cke_focus")&&i.$.offsetWidth){this._.focusIndex=r,i.focus();break}i=null}if(!i&&!t)return this._.focusIndex=n.count(),this.onKeyDown(e,1);return!1;case"click":case"mouseup":return r=this._.focusIndex,(i=r>=0&&this.element.getElementsByTag("a").getItem(r))&&(i.$[n]?i.$[n]():i.$["on"+n]()),!1}return!0}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function e(e,n,r,i,s){var s=CKEDITOR.tools.genKey(n.getUniqueId(),r.getUniqueId(),e.lang.dir,e.uiColor||"",i.css||"",s||""),o=t[s];return o||(o=t[s]=new CKEDITOR.ui.panel(n,i),o.element=r.append(CKEDITOR.dom.element.createFromHtml(o.render(e),n)),o.element.setStyles({display:"none",position:"absolute"})),o}var t={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(t,n,r,i){function s(){l.hide()}r.forceIFrame=1,r.toolbarRelated&&t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(n=CKEDITOR.document.getById("cke_"+t.name));var o=n.getDocument(),i=e(t,o,n,r,i||0),u=i.element,f=u.getFirst(),l=this;u.disableContextMenu(),this.element=u,this._={editor:t,panel:i,parentElement:n,definition:r,document:o,iframe:f,children:[],dir:t.lang.dir},t.on("mode",s),t.on("resize",s),CKEDITOR.env.iOS||o.getWindow().on("resize",s)},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,r,i,s){var o=this._.panel,u=o.showBlock(e);this.allowBlur(!1),e=this._.editor.editable(),this._.returnFocus=e.hasFocus?e:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement),this._.hideTimeout=0;var a=this.element,e=this._.iframe,e=CKEDITOR.env.ie?e:new CKEDITOR.dom.window(e.$.contentWindow),f=a.getDocument(),l=this._.parentElement.getPositionedAncestor(),c=t.getDocumentPosition(f),f=l?l.getDocumentPosition(f):{x:0,y:0},h=this._.dir=="rtl",p=c.x+(r||0)-f.x,d=c.y+(i||0)-f.y;!h||n!=1&&n!=4?!h&&(n==2||n==3)&&(p+=t.$.offsetWidth-1):p+=t.$.offsetWidth;if(n==3||n==4)d+=t.$.offsetHeight-1;this._.panel._.offsetParentId=t.getId(),a.setStyles({top:d+"px",left:0,display:""}),a.setOpacity(0),a.getFirst().removeStyle("width"),this._.editor.focusManager.add(e),this._.blurSet||(CKEDITOR.event.useCapture=!0,e.on("blur",function(e){function t(){delete this._.returnFocus,this.hide()}this.allowBlur()&&e.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild&&(CKEDITOR.env.iOS?this._.hideTimeout||(this._.hideTimeout=CKEDITOR.tools.setTimeout(t,0,this)):t.call(this))},this),e.on("focus",function(){this._.focused=!0,this.hideChild(),this.allowBlur(!0)},this),CKEDITOR.env.iOS&&(e.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this),e.on("touchend",function(){this._.hideTimeout=0,this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1),o.onEscape=CKEDITOR.tools.bind(function(e){if(this.onEscape&&this.onEscape(e)===!1)return!1},this),CKEDITOR.tools.setTimeout(function(){var e=CKEDITOR.tools.bind(function(){a.removeStyle("width");if(u.autoSize){var e=u.element.getDocument(),e=(CKEDITOR.env.webkit?u.element:e.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e>0&&(e+=(a.$.offsetWidth||0)-(a.$.clientWidth||0)+3),a.setStyle("width",e+10+"px"),e=u.element.$.scrollHeight,CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e>0&&(e+=(a.$.offsetHeight||0)-(a.$.clientHeight||0)+3),a.setStyle("height",e+"px"),o._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");h&&(p-=a.$.offsetWidth),a.setStyle("left",p+"px");var t=o.element.getWindow(),e=a.$.getBoundingClientRect(),t=t.getViewPaneSize(),n=e.width||e.right-e.left,r=e.height||e.bottom-e.top,i=h?e.right:t.width-e.left,f=h?t.width-e.right:e.left;h?i
n?p+n:t.width>n?p-e.left:p-e.right+t.width):in?p-n:t.width>n?p-e.right+t.width:p-e.left),n=e.top,t.height-e.topr?d-r:t.height>r?d-e.bottom+t.height:d-e.top),CKEDITOR.env.ie&&(t=e=new CKEDITOR.dom.element(a.$.offsetParent),t.getName()=="html"&&(t=t.getDocument().getBody()),t.getComputedStyle("direction")=="rtl"&&(p=CKEDITOR.env.ie8Compat?p-a.getDocument().getDocumentElement().$.scrollLeft*2:p-(e.$.scrollWidth-e.$.clientWidth)));var e=a.getFirst(),l;(l=e.getCustomData("activePanel"))&&l.onHide&&l.onHide.call(this,1),e.setCustomData("activePanel",this),a.setStyles({top:d+"px",left:p+"px"}),a.setOpacity(1),s&&s()},this);o.isLoaded?e():o.onLoad=e,CKEDITOR.tools.setTimeout(function(){var e=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus(),u.element.focus(),CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=e),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&&!e.equals(this._.iframe)&&e.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var e=this._.iframe.getFrameDocument().getActive();e&&e.is("a")&&(this._.lastFocused=e)},hide:function(e){if(this.visible&&(!this.onHide||this.onHide.call(this)!==!0)){this.hideChild(),CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur(),this.element.setStyle("display","none"),this.visible=0,this.element.getFirst().removeCustomData("activePanel");if(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 e!==void 0&&(t.allowBlur=e),t.allowBlur},showAsChild:function(e,t,n,r,i,s){if(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,r,i,s),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=CKEDITOR.tools.isEmpty(CKEDITOR.instances),n;for(n in t){var r=t[n];e?r.destroy():r.element.hide()}e&&(t={})})}(),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(e){for(var t=e.config.menu_groups.split(","),n=e._.menuGroups={},r=e._.menuItems={},i=0;it.group?1:e.ordert.order?1:0})}var t=''),r=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:{}}),r=n.block.attributes=n.attributes||{};!r.role&&(r.role="menu"),this._.panelDefinition=n},_:{onShow:function(){var e=this.editor.getSelection(),t=e&&e.getStartElement(),n=this.editor.elementPath(),r=this._.listeners;this.removeAll();for(var i=0;i '),h=d.group),d.render(this,p,l)}l.push("
"),f.setHtml(l.join("")),CKEDITOR.ui.fire("ready",this),this.parent?this.parent._.panel.showAsChild(u,this.id,t,n,r,i):u.showBlock(this.id,t,n,r,i),o.fire("menuShow",[u])},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,i){var s=e.id+(""+t),o=typeof this.state=="undefined"?CKEDITOR.TRISTATE_OFF:this.state,u="",a=o==CKEDITOR.TRISTATE_ON?"on":o==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(u=' aria-checked="'+(o==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var f=this.getItems,l=""+(this.editor.lang.dir=="rtl"?"9668":"9658")+";",c=this.name;this.icon&&!/\./.test(this.icon)&&(c=this.icon),e={id:s,name:this.name,iconName:c,label:this.label,cls:this.className||"",state:a,hasPopup:f?"true":"false",disabled:o==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(c,this.editor.lang.dir=="rtl",c==this.icon?null:this.icon,this.iconOffset),arrowHtml:f?r.output({label:l}):"",role:this.role?this.role:"menuitem",ariaChecked:u},n.output(e,i)}}})}(),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){e.on("contextmenu",function(e){var e=e.data,r=CKEDITOR.env.webkit?n:CKEDITOR.env.mac?e.$.metaKey:e.$.ctrlKey;if(!t||!r){e.preventDefault();if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var r=this.editor,i=(new CKEDITOR.dom.elementPath(e.getTarget(),r.editable())).contains(function(e){return e.hasAttribute("contenteditable")},!0);i&&i.getAttribute("contenteditable")=="false"&&r.getSelection().fake(i)}var i=e.getTarget().getDocument(),s=e.getTarget().getDocument().getDocumentElement(),r=!i.equals(CKEDITOR.document),i=i.getWindow().getScrollPosition(),o=r?e.$.clientX:e.$.pageX||i.x+e.$.clientX,u=r?e.$.clientY:e.$.pageY||i.y+e.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(s,null,o,u)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.webkit){var n,r=function(){n=0};e.on("keydown",function(e){n=CKEDITOR.env.mac?e.data.$.metaKey:e.data.$.ctrlKey}),e.on("keyup",r),e.on("contextmenu",r)}},open:function(e,t,n,r){this.editor.focus(),e=e||CKEDITOR.document.getDocumentElement(),this.editor.selectionChange(1),this.show(e,t,n,r)}}})},beforeInit:function(e){var t=e.contextMenu=new CKEDITOR.plugins.contextMenu(e);e.on("contentDom",function(){t.addTarget(e.editable(),e.config.browserContextMenuOnCtrl!==!1)}),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")}}),function(){function t(t,r){function s(e){e=l.list[e];if(e.equals(t.editable())||e.getAttribute("contenteditable")=="true"){var n=t.createRange();n.selectNodeContents(e),n.select()}else t.getSelection().selectElement(e);t.focus()}function o(){f&&f.setHtml(n),delete l.list}var u=t.ui.spaceId("path"),f,l=t._.elementsPath,h=l.idBase;r.html=r.html+('
'+t.lang.elementspath.eleLabel+' '+n+" "),t.on("uiReady",function(){var e=t.ui.space("path");e&&t.focusManager.add(e,1)}),l.onClick=s;var p=CKEDITOR.tools.addFunction(s),d=CKEDITOR.tools.addFunction(function(e,n){var r=l.idBase,i,n=new CKEDITOR.dom.event(n);i=t.lang.dir=="rtl";switch(n.getKeystroke()){case i?39:37:case 9:return(i=CKEDITOR.document.getById(r+(e+1)))||(i=CKEDITOR.document.getById(r+"0")),i.focus(),!1;case i?37:39:case CKEDITOR.SHIFT+9:return(i=CKEDITOR.document.getById(r+(e-1)))||(i=CKEDITOR.document.getById(r+(l.list.length-1))),i.focus(),!1;case 27:return t.focus(),!1;case 13:case 32:return s(e),!1}return!0});t.on("selectionChange",function(){for(var e=[],r=l.list=[],s=[],o=l.filters,a=!0,v=t.elementPath().elements,g,y=v.length;y--;){var w=v[y],E=0;g=w.data("cke-display-name")?w.data("cke-display-name"):w.data("cke-real-element-type")?w.data("cke-real-element-type"):w.getName(),a=w.hasAttribute("contenteditable")?w.getAttribute("contenteditable")=="true":a,!a&&!w.hasAttribute("contenteditable")&&(E=1);for(var S=0;S
{text}');CKEDITOR.plugins.add("elementspath",{init:function(e){e._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",filters:[]},e.on("uiSpace",function(n){n.data.space=="bottom"&&t(e,n.data)})}})}(),function(){function e(e,r){var i,s;r.on("refresh",function(e){var r=[t],i;for(i in e.data.states)r.push(e.data.states[i]);this.setState(CKEDITOR.tools.search(r,n)?n:t)},r,null,100),r.on("exec",function(t){i=e.getSelection(),s=i.createBookmarks(1),t.data||(t.data={}),t.data.done=!1},r,null,0),r.on("exec",function(){e.forceNextSelectionCheck(),i.selectBookmarks(s)},r,null,100)}var t=CKEDITOR.TRISTATE_DISABLED,n=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(t){var n=CKEDITOR.plugins.indent.genericDefinition;e(t,t.addCommand("indent",new n(!0))),e(t,t.addCommand("outdent",new n)),t.ui.addButton&&(t.ui.addButton("Indent",{label:t.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),t.ui.addButton("Outdent",{label:t.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"})),t.on("dirChanged",function(e){var n=t.createRange(),r=e.data.node;n.setStartBefore(r),n.setEndAfter(r);for(var i=new CKEDITOR.dom.walker(n),s;s=i.next();)if(s.type==CKEDITOR.NODE_ELEMENT)if(!s.equals(r)&&s.getDirection())n.setStartAfter(s),i=new CKEDITOR.dom.walker(n);else{var o=t.config.indentClasses;if(o)for(var u=e.data.dir=="ltr"?["_rtl",""]:["","_rtl"],a=0;a0){var h=l[u].parent;l[u].parent=new CKEDITOR.dom.element(h.getName(),h.getDocument())}}for(u=r.getCustomData("listarray_index")+1;uc;u++)l[u].indent=l[u].indent+f;r=CKEDITOR.plugins.list.arrayToList(l,s,null,e.config.enterMode,t.getDirection());if(!i.isIndent){var p;if((p=t.getParent())&&p.is("li"))for(var f=r.listNode.getChildren(),v=[],m,u=f.count()-1;u>=0;u--)(m=f.getItem(u))&&m.is&&m.is("li")&&v.push(m)}r&&r.listNode.replace(t);if(v&&v.length)for(u=0;ui[o-1].indent+1){s=i[o-1].indent+1-i[o].indent;for(u=i[o].indent;i[o]&&i[o].indent>=u;)i[o].indent=i[o].indent+s,o++;o--}var a=CKEDITOR.plugins.list.arrayToList(i,n,null,e.config.enterMode,t.root.getAttribute("dir")).listNode,f,l;r(!0),r(),a.replace(t.root),e.fire("contentDomInvalidated")}function t(e,t){this.name=e,this.context=this.type=t,this.allowedContent=t+" li",this.requiredContent=t}function n(e,t,n,r){for(var i,s;i=e[r?"getLast":"getFirst"](p);)(s=i.getDirection(1))!==t.getDirection(1)&&i.setAttribute("dir",s),i.remove(),n?i[r?"insertBefore":"insertAfter"](n):t.append(i,r)}function r(e){function t(t){var r=e[t?"getPrevious":"getNext"](l);r&&r.type==CKEDITOR.NODE_ELEMENT&&r.is(e.getName())&&(n(e,r,null,!t),e.remove(),e=r)}t(),t(1)}function i(e){return e.type==CKEDITOR.NODE_ELEMENT&&(e.getName()in CKEDITOR.dtd.$block||e.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[e.getName()]["#"]}function s(e,t,i){e.fire("saveSnapshot"),i.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var s=i.extractContents();t.trim(!1,!0);var u=t.createBookmark(),a=new CKEDITOR.dom.elementPath(t.startContainer),f=a.block,a=a.lastElement.getAscendant("li",1)||f,h=new CKEDITOR.dom.elementPath(i.startContainer),p=h.contains(CKEDITOR.dtd.$listItem),h=h.contains(CKEDITOR.dtd.$list);f?(f=f.getBogus())&&f.remove():h&&(f=h.getPrevious(l))&&c(f)&&f.remove(),(f=s.getLast())&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("br")&&f.remove(),(f=t.startContainer.getChild(t.startOffset))?s.insertBefore(f):t.startContainer.append(s),p&&(s=o(p))&&(a.contains(p)?(n(s,p.getParent(),p),s.remove()):a.append(s));for(;i.checkStartOfBlock()&&i.checkEndOfBlock();){h=i.startPath(),s=h.block;if(!s)break;s.is("li")&&(a=s.getParent(),s.equals(a.getLast(l))&&s.equals(a.getFirst(l))&&(s=a)),i.moveToPosition(s,CKEDITOR.POSITION_BEFORE_START),s.remove()}i=i.clone(),s=e.editable(),i.setEndAt(s,CKEDITOR.POSITION_BEFORE_END),i=new CKEDITOR.dom.walker(i),i.evaluator=function(e){return l(e)&&!c(e)},(i=i.next())&&i.type==CKEDITOR.NODE_ELEMENT&&i.getName()in CKEDITOR.dtd.$list&&r(i),t.moveToBookmark(u),t.select(),e.fire("saveSnapshot")}function o(e){return(e=e.getLast(l))&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in u?e:null}var u={ol:1,ul:1},a=CKEDITOR.dom.walker.whitespaces(),f=CKEDITOR.dom.walker.bookmark(),l=function(e){return!a(e)&&!f(e)},c=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(e,t,n,r,i){if(!u[e.getName()])return[];r||(r=0),n||(n=[]);for(var s=0,o=e.getChildCount();s1)S?N=x.clone(1,1):d.append(x.clone(1,1));else if(x.type==CKEDITOR.NODE_ELEMENT&&x.isBlockBoundary()){c&&!x.getDirection()&&x.setAttribute("dir",v),m=x;var C=b.getAttribute("style");C&&m.setAttribute("style",C.replace(/([^;])$/,"$1;")+(m.getAttribute("style")||"")),w&&x.addClass(w),m=null,N&&(d.append(N),N=null),d.append(x.clone(1,1))}else S?(m||(m=o.createElement(g),d.append(m),c&&m.setAttribute("dir",v)),E&&m.setAttribute("style",E),w&&m.setAttribute("class",w),N&&(m.append(N),N=null),m.append(x.clone(1,1))):d.append(x.clone(1,1))}N&&((m||d).append(N),N=null),d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&h!=e.length-1&&(CKEDITOR.env.needsBrFiller&&(v=d.getLast())&&v.type==CKEDITOR.NODE_ELEMENT&&v.is("br")&&v.remove(),v=d.getLast(l),(!v||v.type!=CKEDITOR.NODE_ELEMENT||!v.is(CKEDITOR.dtd.$block))&&d.append(o.createElement("br"))),v=d.$.nodeName.toLowerCase(),(v=="div"||v=="p")&&d.appendBogus(),a.append(d),c=null,h++}m=null;if(e.length<=h||Math.max(e[h].indent,0)=0&&(y=d[b]);b--)if(u[y.getName()]&&m.contains(y)){m.removeCustomData("list_group_object_"+c),(d=y.getCustomData("list_group_object"))?d.contents.push(p):(d={root:y,contents:[p]},o.push(d),CKEDITOR.dom.element.setMarker(f,y,"list_group_object",d)),v=1;break}v||(v=m,v.getCustomData("list_group_object_"+c)?v.getCustomData("list_group_object_"+c).contents.push(p):(d={root:v,contents:[p]},CKEDITOR.dom.element.setMarker(f,v,"list_group_object_"+c,d),o.push(d)))}}for(y=[];o.length>0;){d=o.shift();if(this.state==CKEDITOR.TRISTATE_OFF)if(u[d.root.getName()]){s=t,c=d,d=f,a=y,v=CKEDITOR.plugins.list.listToArray(c.root,d),m=[];for(p=0;p0;t--)e[t].deleteContents();return e[0]}function n(e){var t=e.startContainer.getAscendant(function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.getAttribute("contenteditable")=="true"},!0);return e.root.equals(t)?e:(t=new CKEDITOR.dom.range(t),t.moveToRange(e),t)}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){e(t,t.activeShiftEnterMode,1)}}),t.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var r=CKEDITOR.dom.walker.whitespaces(),i=CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(e,s,u,f){if(u=u||t(e)){var u=n(u),l=u.document,p=u.checkStartOfBlock(),d=u.checkEndOfBlock(),v=e.elementPath(u.startContainer),m=v.block,y=s==CKEDITOR.ENTER_DIV?"div":"p",w;if(p&&d){if(m&&(m.is("li")||m.getParent().is("li"))){m.is("li")||(m=m.getParent()),u=m.getParent(),w=u.getParent();var f=!m.hasPrevious(),E=!m.hasNext(),y=e.getSelection(),S=y.createBookmarks(),p=m.getDirection(1),d=m.getAttribute("class"),x=m.getAttribute("style"),T=w.getDirection(1)!=p,e=e.enterMode!=CKEDITOR.ENTER_BR||T||x||d;if(w.is("li"))f||E?m[f?"insertBefore":"insertAfter"](w):m.breakParent(w);else{if(e)v.block.is("li")?(w=l.createElement(s==CKEDITOR.ENTER_P?"p":"div"),T&&w.setAttribute("dir",p),x&&w.setAttribute("style",x),d&&w.setAttribute("class",d),m.moveChildren(w)):w=v.block,f||E?w[f?"insertBefore":"insertAfter"](u):(m.breakParent(u),w.insertAfter(u));else{m.appendBogus(!0);if(f||E)for(;l=m[f?"getFirst":"getLast"]();)l[f?"insertBefore":"insertAfter"](u);else for(m.breakParent(u);l=m.getLast();)l.insertAfter(u)}m.remove()}y.selectBookmarks(S);return}if(m&&m.getParent().is("blockquote")){m.breakParent(m.getParent()),m.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||m.getPrevious().remove(),m.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||m.getNext().remove(),u.moveToElementEditStart(m),u.select();return}}else if(m&&m.is("pre")&&!d){o(e,s,u,f);return}if(p=u.splitBlock(y)){s=p.previousBlock,m=p.nextBlock,v=p.wasStartOfBlock,e=p.wasEndOfBlock,m?(S=m.getParent(),S.is("li")&&(m.breakParent(S),m.move(m.getNext(),1))):s&&(S=s.getParent())&&S.is("li")&&(s.breakParent(S),S=s.getNext(),u.moveToElementEditStart(S),s.move(s.getPrevious()));if(!v&&!e)m.is("li")&&(w=u.clone(),w.selectNodeContents(m),w=new CKEDITOR.dom.walker(w),w.evaluator=function(e){return!(i(e)||r(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$inline&&!(e.getName()in CKEDITOR.dtd.$empty))},(S=w.next())&&S.type==CKEDITOR.NODE_ELEMENT&&S.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?l.createElement("br"):l.createText(" ")).insertBefore(S)),m&&u.moveToElementEditStart(m);else{if(s){if(s.is("li")||!a.test(s.getName())&&!s.is("pre"))w=s.clone()}else m&&(w=m.clone());w?f&&!w.is("li")&&w.renameNode(y):S&&S.is("li")?w=S:(w=l.createElement(y),s&&(E=s.getDirection())&&w.setAttribute("dir",E));if(l=p.elementPath){f=0;for(y=l.elements.length;f",lt:"<",amp:"&",apos:"'",quot:'"'},e=e.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(e,s){var o=t?"&"+s+";":i[s];return n[o]=t?i[s]:"&"+s+";",r.push(o),""});if(!t&&e){var e=e.split(","),s=document.createElement("div"),o;s.innerHTML="&"+e.join(";&")+";",o=s.innerHTML,s=null;for(s=0;s1&&t.substr(t.length-1,1)=="%"&&(t=parseInt(window.screen.width*parseInt(t,10)/100,10)),typeof n=="string"&&n.length>1&&n.substr(n.length-1,1)=="%"&&(n=parseInt(window.screen.height*parseInt(n,10)/100,10)),t<640&&(t=640),n<420&&(n=420);var i=parseInt((window.screen.height-n)/2,10),s=parseInt((window.screen.width-t)/2,10),r=(r||"location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes")+",width="+t+",height="+n+",top="+i+",left="+s,o=window.open("",null,r,!0);if(!o)return!1;try{navigator.userAgent.toLowerCase().indexOf(" chrome/")==-1&&(o.moveTo(s,i),o.resizeTo(t,n)),o.focus(),o.location.href=e}catch(u){window.open(e,null,r,!0)}return!0}}),function(){function e(e,t){var n=[];if(!t)return e;for(var r in t)n.push(r+"="+encodeURIComponent(t[r]));return e+(e.indexOf("?")!=-1?"&":"?")+n.join("&")}function t(e){return e+="",e.charAt(0).toUpperCase()+e.substr(1)}function n(){var n=this.getDialog(),r=n.getParentEditor();r._.filebrowserSe=this;var i=r.config["filebrowser"+t(n.getName())+"WindowWidth"]||r.config.filebrowserWindowWidth||"80%",n=r.config["filebrowser"+t(n.getName())+"WindowHeight"]||r.config.filebrowserWindowHeight||"70%",s=this.filebrowser.params||{};s.CKEditor=r.name,s.CKEditorFuncNum=r._.filebrowserFn,s.langCode||(s.langCode=r.langCode),s=e(this.filebrowser.url,s),r.popup(s,i,n,r.config.filebrowserWindowFeatures||r.config.fileBrowserWindowFeatures)}function r(){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()?!1:!0}function i(t,n,r){var i=r.params||{};i.CKEditor=t.name,i.CKEditorFuncNum=t._.filebrowserFn,i.langCode||(i.langCode=t.langCode),n.action=e(r.url,i),n.filebrowser=r}function s(e,o,u,a){if(a&&a.length)for(var f,l=a.length;l--;){f=a[l],(f.type=="hbox"||f.type=="vbox"||f.type=="fieldset")&&s(e,o,u,f.children);if(f.filebrowser){typeof f.filebrowser=="string"&&(f.filebrowser={action:f.type=="fileButton"?"QuickUpload":"Browse",target:f.filebrowser});if(f.filebrowser.action=="Browse"){var h=f.filebrowser.url;h===void 0&&(h=e.config["filebrowser"+t(o)+"BrowseUrl"],h===void 0&&(h=e.config.filebrowserBrowseUrl)),h&&(f.onClick=n,f.filebrowser.url=h,f.hidden=!1)}else if(f.filebrowser.action=="QuickUpload"&&f["for"]){h=f.filebrowser.url,h===void 0&&(h=e.config["filebrowser"+t(o)+"UploadUrl"],h===void 0&&(h=e.config.filebrowserUploadUrl));if(h){var p=f.onClick;f.onClick=function(e){var t=e.sender;return p&&p.call(t,e)===!1?!1:r.call(t,e)},f.filebrowser.url=h,f.hidden=!1,i(e,u.getContents(f["for"][0]).get(f["for"][1]),f.filebrowser)}}}}}function o(e,t,n){if(n.indexOf(";")!==-1){for(var n=n.split(";"),r=0;rd.height-p.bottom?o("pin"):o("bottom");var r=d.width/2,r=p.left>0&&p.rightl.width?e.config.contentsLangDirection=="rtl"?"right":"left":r-p.left>p.right-r?"left":"right",i;l.width>d.width?(r="left",i=0):(i=r=="left"?p.left>0?p.left:0:p.rightd.width&&(r=r=="left"?"right":"left",i=0)),u.setStyle(r,n((a=="pin"?w:g)+i+(a=="pin"?0:r=="left"?m:-m)))}else a="pin",o("pin"),s(r)}}}();if(i){var o=new CKEDITOR.template('"+(e.title?'
{voiceLabel} ':" ")+'
'),u=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(o.output({content:i,id:e.id,langDir:e.lang.dir,langCode:e.langCode,name:e.name,style:"display:none;z-index:"+(r.baseFloatZIndex-1),topId:e.ui.spaceId("top"),voiceLabel:e.title}))),a=CKEDITOR.tools.eventsBuffer(500,s),f=CKEDITOR.tools.eventsBuffer(100,s);u.unselectable(),u.on("mousedown",function(e){e=e.data,e.getTarget().hasAscendant("a",1)||e.preventDefault()}),e.on("focus",function(n){s(n),e.on("change",a.input),t.on("scroll",f.input),t.on("resize",f.input)}),e.on("blur",function(){u.hide(),e.removeListener("change",a.input),t.removeListener("scroll",f.input),t.removeListener("resize",f.input)}),e.on("destroy",function(){t.removeListener("scroll",f.input),t.removeListener("resize",f.input),u.clearCustomData(),u.remove()}),e.focusManager.hasFocus&&u.show(),e.focusManager.add(u,1)}}var t=CKEDITOR.document.getWindow(),n=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(t){t.on("loaded",function(){e(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var e=CKEDITOR.addTemplate("panel-list",''),t=CKEDITOR.addTemplate("panel-list-item",'{text} '),n=CKEDITOR.addTemplate("panel-list-group",'{label} '),r=/\'/g;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 s=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0),this._.items[e]=s;var o;o=CKEDITOR.tools.htmlEncodeAttr(e).replace(r,"\\'"),e={id:s,val:o,onclick:CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(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&&t.getName()=="ul"&&t.setStyle("display","none"))},hideItem:function(e){this.element.getDocument().getById(this._.items[e]).setStyle("display","none")},showAll:function(){var e=this._.items,t=this._.groups,n=this.element.getDocument(),r;for(r in e)n.getById(e[r]).setStyle("display","");for(var i in t)e=n.getById(t[i]),r=e.getNext(),e.setStyle("display",""),r&&r.getName()=="ul"&&r.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=this._.items,t=this.element.getDocument(),n;for(n in e){var r=e[n];t.getById(r).removeClass("cke_selected"),t.getById(r+"_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=this.element.getElementsByTag("a"),n,r=-1;if(e){for(n=this.element.getDocument().getById(this._.items[e]).getFirst();e=t.getItem(++r);)if(e.equals(n)){this._.focusIndex=r;break}}else this.element.focus();n&&setTimeout(function(){n.focus()},0)}}})}}),function(){var e=' {label} {arrowHtml} ',t=CKEDITOR.addTemplate("buttonArrow",''+(CKEDITOR.env.hc?"▼":"")+" "),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,r){function i(){var t=e.mode;t&&(t=this.modes[t]?d[t]!==void 0?d[t]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,t=e.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:t,this.setState(t),this.refresh&&this.refresh())}var s=CKEDITOR.env,o=this._.id=CKEDITOR.tools.getNextId(),u="",a=this.command,f;this._.editor=e;var l={id:o,button:this,editor:e,focus:function(){CKEDITOR.document.getById(o).focus()},execute:function(){this.button.click(e)},attach:function(e){this.button.attach(e)}},c=CKEDITOR.tools.addFunction(function(e){if(l.onkey)return e=new CKEDITOR.dom.event(e),l.onkey(l,e.getKeystroke())!==!1}),h=CKEDITOR.tools.addFunction(function(e){var t;return l.onfocus&&(t=l.onfocus(l,new CKEDITOR.dom.event(e))!==!1),t}),p=0;l.clickFn=f=CKEDITOR.tools.addFunction(function(){p&&(e.unlockSelection(1),p=0),l.execute(),s.iOS&&e.focus()});if(this.modes){var d={};e.on("beforeModeUnload",function(){e.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(d[e.mode]=this._.state)},this),e.on("activeFilterChange",i,this),e.on("mode",i,this),!this.readOnly&&e.on("readOnly",i,this)}else a&&(a=e.getCommand(a))&&(a.on("state",function(){this.setState(a.state)},this),u+=a.state==CKEDITOR.TRISTATE_ON?"on":a.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");this.directional&&e.on("contentDirChanged",function(t){var n=CKEDITOR.document.getById(this._.id),r=n.getFirst(),t=t.data;t!=e.lang.dir?n.addClass("cke_"+t):n.removeClass("cke_ltr").removeClass("cke_rtl"),r.setAttribute("style",CKEDITOR.skin.getIconStyle(m,t=="rtl",this.icon,this.iconOffset))},this),a||(u+="off");var v=this.name||this.command,m=v;return this.icon&&!/\./.test(this.icon)&&(m=this.icon,this.icon=null),u={id:o,name:v,iconName:m,label:this.label,cls:this.className||"",state:u,ariaDisabled:u=="disabled"?"true":"false",title:this.title,titleJs:s.gecko&&!s.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:c,focusFn:h,clickFn:f,style:CKEDITOR.skin.getIconStyle(m,e.lang.dir=="rtl",this.icon,this.iconOffset),arrowHtml:this.hasArrow?t.output():""},n.output(u,r),this.onRender&&this.onRender(),l},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"),this.hasArrow?(e=e==CKEDITOR.TRISTATE_ON?this._.editor.lang.button.selectedLabel.replace(/%1/g,this.label):this.label,CKEDITOR.document.getById(this._.id+"_label").setText(e)):e==CKEDITOR.TRISTATE_ON?t.setAttribute("aria-pressed",!0):t.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},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)}}(),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 r(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var t=this.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;e.readOnly&&!this.readOnly&&(t=CKEDITOR.TRISTATE_DISABLED),this.setState(t),this.setValue(""),t!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var i=CKEDITOR.env,s="cke_"+this.id,o=CKEDITOR.tools.addFunction(function(t){c&&(e.unlockSelection(1),c=0),a.execute(t)},this),u=this,a={id:s,combo:this,focus:function(){CKEDITOR.document.getById(s).getChild(1).focus()},execute:function(t){var n=u._;if(n.state!=CKEDITOR.TRISTATE_DISABLED){u.createPanel(e);if(n.on)n.panel.hide();else{u.commit();var r=u.getValue();r?n.list.mark(r):n.list.unmarkAll(),n.panel.showBlock(u.id,new CKEDITOR.dom.element(t),4)}}},clickFn:o};e.on("activeFilterChange",r,this),e.on("mode",r,this),e.on("selectionChange",r,this),!this.readOnly&&e.on("readOnly",r,this);var f=CKEDITOR.tools.addFunction(function(t,n){var t=new CKEDITOR.dom.event(t),r=t.getKeystroke();r==40&&e.once("panelShow",function(e){e.data._.panel._.currentBlock.onKeyDown(40)});switch(r){case 13:case 32:case 40:CKEDITOR.tools.callFunction(o,n);break;default:a.onkey(a,r)}t.preventDefault()}),l=CKEDITOR.tools.addFunction(function(){a.onfocus&&a.onfocus()}),c=0;return a.keyDownFn=f,i={id:s,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:i.gecko&&!i.hc?"":(this.title||"").replace("'",""),keydownFn:f,focusFn:l,clickFn:o},t.output(i,n),this.onRender&&this.onRender(),a},createPanel:function(e){if(!this._.panel){var t=this._.panelDefinition,n=this._.panelDefinition.block,r=t.parent||CKEDITOR.document.getBody(),i="cke_combopanel__"+this.name,s=new CKEDITOR.ui.floatPanel(e,r,t),o=s.addListBlock(this.id,n),u=this;s.onShow=function(){this.element.addClass(i),u.setState(CKEDITOR.TRISTATE_ON),u._.on=1,u.editorFocus&&!e.focusManager.hasFocus&&e.focus(),u.onOpen&&u.onOpen(),e.once("panelShow",function(){o.focus(!o.multiSelect&&u.getValue())})},s.onHide=function(t){this.element.removeClass(i),u.setState(u.modes&&u.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),u._.on=0,!t&&u.onClose&&u.onClose()},s.onEscape=function(){s.hide(1)},o.onClick=function(e,t){u.onClick&&u.onClick.call(u,e,t),s.hide()},this._.panel=s,this._.list=o,s.getBlock(this.id).onHide=function(){u._.on=0,u.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?(t=this.label,n.addClass("cke_combo_inlinelabel")):n.removeClass("cke_combo_inlinelabel"),n.setText(typeof t!="undefined"?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}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},statics:{handler:{create:function(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,r=t.format_tags.split(";"),i={},s=0,o=[],u=0;u ",this.lineBreakChars="\n",this.sortAttributes=1,this._.indent=0,this._.indentation="",this._.inPre=0,this._.rules={};var e=CKEDITOR.dtd,t;for(t in CKEDITOR.tools.extend({},e.$nonBodyContent,e.$block,e.$listItem,e.$tableContent))this.setRules(t,{indent:!e[t]["#"],breakBeforeOpen:1,breakBeforeClose:!e[t]["#"],breakAfterClose:1,needsSpace:t in e.$block&&!(t 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._.indentation+this.indentationChars)),n&&n.breakAfterOpen&&this.lineBreak(),e=="pre"&&(this._.inPre=1)},attribute:function(e,t){typeof t=="string"&&(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,">"),e=="pre"&&(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&&this._.output.length>0&&this._.output.push(this.lineBreakChars),this._.indent=1},indentation:function(){!this._.inPre&&this._.indentation&&this._.output.push(this._.indentation),this._.indent=0},reset:function(){this._.output=[],this._.indent=0,this._.indentation="",this._.afterCloser=0,this._.inPre=0},setRules:function(e,t){var n=this._.rules[e];n?CKEDITOR.tools.extend(n,t,!0):this._.rules[e]=t}}}),function(){function e(e,t){t||(t=e.getSelection().getSelectedElement());if(t&&t.is("img")&&!t.data("cke-realelement")&&!t.isReadOnly())return t}function t(e){var t=e.getStyle("float");if(t=="inherit"||t=="none")t=0;return t||(t=e.getAttribute("align")),t}CKEDITOR.plugins.add("image",{requires:"dialog",init:function(t){if(!t.plugins.image2){CKEDITOR.dialog.add("image",this.path+"dialogs/image.js");var n="img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}";CKEDITOR.dialog.isTabEnabled(t,"image","advanced")&&(n="img[alt,dir,id,lang,longdesc,!src,title]{*}(*)"),t.addCommand("image",new CKEDITOR.dialogCommand("image",{allowedContent:n,requiredContent:"img[alt,src]",contentTransformations:[["img{width}: sizeToStyle","img[width]: sizeToAttribute"],["img{float}: alignmentToStyle","img[align]: alignmentToAttribute"]]})),t.ui.addButton&&t.ui.addButton("Image",{label:t.lang.common.image,command:"image",toolbar:"insert,10"}),t.on("doubleclick",function(e){var t=e.data.element;t.is("img")&&!t.data("cke-realelement")&&!t.isReadOnly()&&(e.data.dialog="image")}),t.addMenuItems&&t.addMenuItems({image:{label:t.lang.image.menu,command:"image",group:"image"}}),t.contextMenu&&t.contextMenu.addListener(function(n){if(e(t,n))return{image:CKEDITOR.TRISTATE_OFF}})}},afterInit:function(n){function r(r){var i=n.getCommand("justify"+r);i&&((r=="left"||r=="right")&&i.on("exec",function(i){var s=e(n),o;s&&(o=t(s),o==r?(s.removeStyle("float"),r==t(s)&&s.removeAttribute("align")):s.setStyle("float",r),i.cancel())}),i.on("refresh",function(i){var s=e(n);s&&(s=t(s),this.setState(s==r?CKEDITOR.TRISTATE_ON:r=="right"||r=="left"?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),i.cancel())}))}n.plugins.image2||(r("left"),r("right"),r("center"),r("block"))}})}(),CKEDITOR.config.image_removeLinkByEmptyURL=!0,function(){function e(e,t){var n=r.exec(e),i=r.exec(t);if(n){if(!n[2]&&i[2]=="px")return i[1];if(n[2]=="px"&&!i[2])return i[1]+"px"}return t}var t=CKEDITOR.htmlParser.cssStyle,n=CKEDITOR.tools.cssLength,r=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i,i={elements:{$:function(n){var r=n.attributes;if((r=(r=(r=r&&r["data-cke-realelement"])&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(r)))&&r.children[0])&&n.attributes["data-cke-resizable"]){var i=(new t(n)).rules,n=r.attributes,s=i.width,i=i.height;s&&(n.width=e(n.width,s)),i&&(n.height=e(n.height,i))}return r}}};CKEDITOR.plugins.add("fakeobjects",{init:function(e){e.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},afterInit:function(e){(e=(e=e.dataProcessor)&&e.htmlFilter)&&e.addRules(i,{applyToAll:!0})}}),CKEDITOR.editor.prototype.createFakeElement=function(e,r,i,s){var o=this.lang.fakeobjects,o=o[i]||o.unknown,r={"class":r,"data-cke-realelement":encodeURIComponent(e.getOuterHtml()),"data-cke-real-node-type":e.type,alt:o,title:o,align:e.getAttribute("align")||""};return CKEDITOR.env.hc||(r.src=CKEDITOR.tools.transparentImageData),i&&(r["data-cke-real-element-type"]=i),s&&(r["data-cke-resizable"]=s,i=new t,s=e.getAttribute("width"),e=e.getAttribute("height"),s&&(i.rules.width=n(s)),e&&(i.rules.height=n(e)),i.populate(r)),this.document.createElement("img",{attributes:r})},CKEDITOR.editor.prototype.createFakeParserElement=function(e,r,i,s){var o=this.lang.fakeobjects,o=o[i]||o.unknown,u;return u=new CKEDITOR.htmlParser.basicWriter,e.writeHtml(u),u=u.getHtml(),r={"class":r,"data-cke-realelement":encodeURIComponent(u),"data-cke-real-node-type":e.type,alt:o,title:o,align:e.attributes.align||""},CKEDITOR.env.hc||(r.src=CKEDITOR.tools.transparentImageData),i&&(r["data-cke-real-element-type"]=i),s&&(r["data-cke-resizable"]=s,s=e.attributes,e=new t,i=s.width,s=s.height,i!==void 0&&(e.rules.width=n(i)),s!==void 0&&(e.rules.height=n(s)),e.populate(r)),new CKEDITOR.htmlParser.element("img",r)},CKEDITOR.editor.prototype.restoreRealElement=function(t){if(t.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var n=CKEDITOR.dom.element.createFromHtml(decodeURIComponent(t.data("cke-realelement")),this.document);if(t.data("cke-resizable")){var r=t.getStyle("width"),t=t.getStyle("height");r&&n.setAttribute("width",e(n.getAttribute("width"),r)),t&&n.setAttribute("height",e(n.getAttribute("height"),t))}return n}}(),"use strict",function(){function e(e){return e.replace(/'/g,"\\$&")}function t(e){for(var t,n=e.length,r=[],i=0;i0&&o.push(","),o.push("'",s?e(encodeURIComponent(n[r])):"","'");return o.push(")"),o.join("")}function r(e){var e=e.config.emailProtection||"",t;return e&&e!="encode"&&(t={},e.replace(/^([^(]+)\(([^)]+)\)$/,function(e,n,r){t.name=n,t.params=[],r.replace(/[^,\s]+/g,function(e){t.params.push(e)})})),t}CKEDITOR.plugins.add("link",{requires:"dialog,fakeobjects",onLoad:function(){function e(e){return n.replace(/%1/g,e=="rtl"?"right":"left").replace(/%2/g,"cke_contents_"+e)}var t="background:url("+CKEDITOR.getUrl(this.path+"images"+(CKEDITOR.env.hidpi?"/hidpi":"")+"/anchor.png")+") no-repeat %1 center;border:1px dotted #00f;background-size:16px;",n=".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{"+t+"padding-%1:18px;cursor:auto;}.%2 img.cke_anchor{"+t+"width:16px;min-height:15px;height:1.15em;vertical-align:text-bottom;}";CKEDITOR.addCss(e("ltr")+e("rtl"))},init:function(e){var t="a[!href]";CKEDITOR.dialog.isTabEnabled(e,"link","advanced")&&(t=t.replace("]",",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type]{*}(*)")),CKEDITOR.dialog.isTabEnabled(e,"link","target")&&(t=t.replace("]",",target,onclick]")),e.addCommand("link",new CKEDITOR.dialogCommand("link",{allowedContent:t,requiredContent:"a[href]"})),e.addCommand("anchor",new CKEDITOR.dialogCommand("anchor",{allowedContent:"a[!name,id]",requiredContent:"a[name]"})),e.addCommand("unlink",new CKEDITOR.unlinkCommand),e.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand),e.setKeystroke(CKEDITOR.CTRL+76,"link"),e.ui.addButton&&(e.ui.addButton("Link",{label:e.lang.link.toolbar,command:"link",toolbar:"links,10"}),e.ui.addButton("Unlink",{label:e.lang.link.unlink,command:"unlink",toolbar:"links,20"}),e.ui.addButton("Anchor",{label:e.lang.link.anchor.toolbar,command:"anchor",toolbar:"links,30"})),CKEDITOR.dialog.add("link",this.path+"dialogs/link.js"),CKEDITOR.dialog.add("anchor",this.path+"dialogs/anchor.js"),e.on("doubleclick",function(t){var n=CKEDITOR.plugins.link.getSelectedLink(e)||t.data.element;n.isReadOnly()||(n.is("a")?(t.data.dialog=n.getAttribute("name")&&(!n.getAttribute("href")||!n.getChildCount())?"anchor":"link",t.data.link=n):CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,n)&&(t.data.dialog="anchor"))},null,null,0),e.on("doubleclick",function(t){t.data.dialog in{link:1,anchor:1}&&t.data.link&&e.getSelection().selectElement(t.data.link)},null,null,20),e.addMenuItems&&e.addMenuItems({anchor:{label:e.lang.link.anchor.menu,command:"anchor",group:"anchor",order:1},removeAnchor:{label:e.lang.link.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:e.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:e.lang.link.unlink,command:"unlink",group:"link",order:5}}),e.contextMenu&&e.contextMenu.addListener(function(t){if(!t||t.isReadOnly())return null;t=CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,t);if(!t&&!(t=CKEDITOR.plugins.link.getSelectedLink(e)))return null;var n={};return t.getAttribute("href")&&t.getChildCount()&&(n={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF}),t&&t.hasAttribute("name")&&(n.anchor=n.removeAnchor=CKEDITOR.TRISTATE_OFF),n}),this.compiledProtectionFunction=r(e)},afterInit:function(e){e.dataProcessor.dataFilter.addRules({elements:{a:function(t){return t.attributes.name?t.children.length?null:e.createFakeParserElement(t,"cke_anchor","anchor"):null}}});var t=e._.elementsPath&&e._.elementsPath.filters;t&&t.push(function(t,n){if(n=="a"&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,t)||t.getAttribute("name")&&(!t.getAttribute("href")||!t.getChildCount())))return"anchor"})}});var i=/^javascript:/,s=/^mailto:([^?]+)(?:\?(.+))?$/,o=/subject=([^;?:@&=$,\/]*)/,u=/body=([^;?:@&=$,\/]*)/,a=/^#(.*)$/,f=/^((?:http|https|ftp|news):\/\/)?(.*)$/,l=/^(_(?:self|top|parent|blank))$/,c=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,h=/^javascript:([^(]+)\(([^)]+)\)$/,p=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,d=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,v={id:"advId",dir:"advLangDir",accessKey:"advAccessKey",name:"advName",lang:"advLangCode",tabindex:"advTabIndex",title:"advTitle",type:"advContentType","class":"advCSSClasses",charset:"advCharset",style:"advStyles",rel:"advRel"};CKEDITOR.plugins.link={getSelectedLink:function(e){var t=e.getSelection(),n=t.getSelectedElement();return n&&n.is("a")?n:(t=t.getRanges()[0])?(t.shrink(CKEDITOR.SHRINK_TEXT),e.elementPath(t.getCommonAncestor()).contains("a",1)):null},getEditorAnchors:function(e){for(var t=e.editable(),n=t.isInline()&&!e.plugins.divarea?e.document:t,t=n.getElementsByTag("a"),n=n.getElementsByTag("img"),r=[],i=0,s;s=t.getItem(i++);)(s.data("cke-saved-name")||s.hasAttribute("name"))&&r.push({name:s.data("cke-saved-name")||s.getAttribute("name"),id:s.getAttribute("id")});for(i=0;s=n.getItem(i++);)(s=this.tryRestoreFakeAnchor(e,s))&&r.push({name:s.getAttribute("name"),id:s.getAttribute("id")});return r},fakeAnchor:!0,tryRestoreFakeAnchor:function(e,t){if(t&&t.data("cke-real-element-type")&&t.data("cke-real-element-type")=="anchor"){var n=e.restoreRealElement(t);if(n.data("cke-saved-name"))return n}},parseLinkAttributes:function(e,t){var n=t&&(t.data("cke-saved-href")||t.getAttribute("href"))||"",r=e.plugins.link.compiledProtectionFunction,g=e.config.emailProtection,y,b={};n.match(i)&&(g=="encode"?n=n.replace(c,function(e,t,n){return"mailto:"+String.fromCharCode.apply(String,t.split(","))+(n&&n.replace(/\\'/g,"'"))}):g&&n.replace(h,function(e,t,n){if(t==r.name){b.type="email";for(var e=b.email={},t=/(^')|('$)/g,n=n.match(/[^,\s]+/g),i=n.length,s,o,u=0;u',t),r=CKEDITOR.getUrl(this.path+"images/"+(C.hidpi?"hidpi/":"")+"icon"+(e.rtl?"-rtl":"")+".png");x(n,{attach:function(){return this.wrap.getParent()||this.wrap.appendTo(e.editable,!0),this},lineChildren:[x(N('↵ ',t),{base:W+"height:17px;width:17px;"+(e.rtl?"left":"right")+":17px;background:url("+r+") center no-repeat "+e.boxColor+";cursor:pointer;"+(C.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(C.hidpi?"background-size: 9px 10px;":""),looks:["top:-8px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","2px",1),"top:-17px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","2px 2px 0px 0px",1),"top:-1px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","0px 0px 2px 2px",1)]}),x(N(V,t),{base:X+"left:0px;border-left-color:"+e.boxColor+";",looks:["border-width:8px 0 8px 8px;top:-8px","border-width:8px 0 0 8px;top:-8px","border-width:0 0 8px 8px;top:0px"]}),x(N(V,t),{base:X+"right:0px;border-right-color:"+e.boxColor+";",looks:["border-width:8px 8px 8px 0;top:-8px","border-width:8px 8px 0 0;top:-8px","border-width:0 8px 8px 0;top:0px"]})],detach:function(){return this.wrap.getParent()&&this.wrap.remove(),this},mouseNear:function(){b(e,this);var t=e.holdDistance,n=this.size;return n&&e.mouse.y>n.top-t&&e.mouse.yn.left-t&&e.mouse.xt.scroll.y-15&&a.topt.pane.bottom-5&&a.tope.mouse.y:t.size.bottom(e.inInlineMode?i.editable.top+i.editable.height/2:Math.min(i.editable.height,i.pane.height)/2),n=n[o?"getLast":"getFirst"](function(e){return!J(e)&&!K(e)});return n?(f(e,n)&&(n=e.line.wrap[o?"getPrevious":"getNext"](function(e){return!J(e)&&!K(e)})),!l(n)||c(n)||!p(e,n)?null:(b(e,n),!o&&n.size.top>=0&&r.y>0&&r.yn.size.bottom-s&&r.yi.pane.height-s&&n.size.bottomu.size.top-1&&r.yu.size.bottom-o&&r.yu.size.bottom-o&&r.ys.pane.height-o&&u.size.bottom0&&r.ynew Date-z)return null}else t.size={};return x(t.size,y(e,t,n),{date:+(new Date)},!0)}function w(e,t){e.view.editable=y(e,e.editable,t,!0)}function E(e,t){e.view||(e.view={});var n=e.view;if(t||!(n&&n.date>new Date-z)){var r=e.win,n=r.getScrollPosition(),r=r.getViewPaneSize();x(e.view,{scroll:{x:n.x,y:n.y,width:e.doc.$.documentElement.scrollWidth-r.width,height:e.doc.$.documentElement.scrollHeight-r.height},pane:{width:r.width,height:r.height,bottom:r.height+n.y},date:+(new Date)},!0)}}function S(e,n,r,i){for(var s=i,o=i,u=0,a=!1,f=!1,l=e.view.pane.height,c=e.mouse;c.y+u0;){a||(a=n(s,i)),f||(f=n(o,i)),!a&&c.y-u>0&&(s=r(e,{x:c.x,y:c.y-u})),!f&&c.y+ur.left-i.x&&nr.top-i.y&&t"+F+"";A[CKEDITOR.ENTER_BR]="br",A[CKEDITOR.ENTER_P]="p",A[CKEDITOR.ENTER_DIV]="div",t.prototype={set:function(e,t,n){return this.properties=e+t+(n||j),this},is:function(e){return(this.properties&e)==e}};var $=function(){function e(e,t){var n=e.$.elementFromPoint(t.x,t.y);return n&&n.nodeType?new CKEDITOR.dom.element(n):null}return function(t,n,r){if(!t.mouse)return null;var i=t.doc,s=t.line.wrap,r=r||t.mouse,o=e(i,r);return n&&f(t,o)&&(s.hide(),o=e(i,r),s.show()),!o||o.type!=CKEDITOR.NODE_ELEMENT||!o.$||C.ie&&C.version<9&&!t.boundary.equals(o)&&!t.boundary.contains(o)?null:o}}(),J=CKEDITOR.dom.walker.whitespaces(),K=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),Q=function(){function t(t){var i=t.element,s,o,u;if(!l(i)||i.contains(t.editable)||i.isReadOnly())return null;u=S(t,function(e,t){return!t.equals(e)},function(e,t){return $(e,!0,t)},i),s=u.upper,o=u.lower;if(e(t,s,o))return u.set(_,P);if(s&&i.contains(s))for(;!s.getParent().equals(i);)s=s.getParent();else s=i.getFirst(function(e){return n(t,e)});if(o&&i.contains(o))for(;!o.getParent().equals(i);)o=o.getParent();else o=i.getLast(function(e){return n(t,e)});if(!s||!o)return null;b(t,s),b(t,o);if(t.mouse.y>s.size.top&&t.mouse.yc.size.top&&t.mouse.y0)for(var n=t.length-1;n>=0;n--){var r=t[n][0],i=t[n][1];i?r.insertBefore(i):r.appendTo(e)}}function n(n,r){var i=e(n),s={},o=n.$;return r||(s["class"]=o.className||"",o.className=""),s.inline=o.style.cssText||"",r||(o.style.cssText="position: static; overflow: visible"),t(i),s}function r(n,r){var i=e(n),s=n.$;"class"in r&&(s.className=r["class"]),"inline"in r&&(s.style.cssText=r.inline),t(i)}function i(e){if(!e.editable().isInline()){var t=CKEDITOR.instances,n;for(n in t){var r=t[n];r.mode=="wysiwyg"&&!r.readOnly&&(r=r.document.getBody(),r.setAttribute("contentEditable",!1),r.setAttribute("contentEditable",!0))}e.editable().hasFocus&&(e.toolbox.focus(),e.focus())}}CKEDITOR.plugins.add("maximize",{init:function(e){function t(){var t=u.getViewPaneSize();e.resize(t.width,t.height,null,!0)}if(e.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var s=e.lang,o=CKEDITOR.document,u=o.getWindow(),a,f,l,h=CKEDITOR.TRISTATE_OFF;e.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:!1,exec:function(){var p=e.container.getFirst(function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasClass("cke_inner")}),d=e.ui.space("contents");if(e.mode=="wysiwyg"){var v=e.getSelection();a=v&&v.getRanges(),f=u.getScrollPosition()}else{var m=e.editable().$;a=!CKEDITOR.env.ie&&[m.selectionStart,m.selectionEnd],f=[m.scrollLeft,m.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){u.on("resize",t),l=u.getScrollPosition();for(v=e.container;v=v.getParent();)v.setCustomData("maximize_saved_styles",n(v)),v.setStyle("z-index",e.config.baseFloatZIndex-5);d.setCustomData("maximize_saved_styles",n(d,!0)),p.setCustomData("maximize_saved_styles",n(p,!0)),d={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0},o.getDocumentElement().setStyles(d),!CKEDITOR.env.gecko&&o.getDocumentElement().setStyle("position","fixed"),(!CKEDITOR.env.gecko||!CKEDITOR.env.quirks)&&o.getBody().setStyles(d),CKEDITOR.env.ie?setTimeout(function(){u.$.scrollTo(0,0)},0):u.$.scrollTo(0,0),p.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute"),p.$.offsetLeft,p.setStyles({"z-index":e.config.baseFloatZIndex-5,left:"0px",top:"0px"}),p.addClass("cke_maximized"),t(),d=p.getDocumentPosition(),p.setStyles({left:-1*d.x+"px",top:-1*d.y+"px"}),CKEDITOR.env.gecko&&i(e)}else if(this.state==CKEDITOR.TRISTATE_ON){u.removeListener("resize",t),d=[d,p];for(v=0;vt&&(u.resize_minWidth=t),u.resize_minHeight>n&&(u.resize_minHeight=n),CKEDITOR.document.on("mousemove",s),CKEDITOR.document.on("mouseup",o),e.document&&(e.document.on("mousemove",s),e.document.on("mouseup",o)),a.preventDefault&&a.preventDefault()});e.on("destroy",function(){CKEDITOR.tools.removeFunction(p)}),e.on("uiSpace",function(t){if(t.data.space=="bottom"){var n="";c&&!h&&(n=" cke_resizer_horizontal"),!c&&h&&(n=" cke_resizer_vertical");var r=''+(f=="ltr"?"◢":"◣")+" ";f=="ltr"&&n=="ltr"?t.data.html=t.data.html+r:t.data.html=r+t.data.html}},e,null,100),e.on("maximize",function(t){e.ui.space("resizer")[t.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),CKEDITOR.plugins.add("menubutton",{requires:"button,menu",onLoad:function(){var e=function(e){var t=this._,n=t.menu;t.state!==CKEDITOR.TRISTATE_DISABLED&&(t.on&&n?n.hide():(t.previousState=t.state,n||(n=t.menu=new CKEDITOR.menu(e,{panel:{className:"cke_menu_panel",attributes:{"aria-label":e.lang.common.options}}}),n.onHide=CKEDITOR.tools.bind(function(){var n=this.command?e.getCommand(this.command).modes:this.modes;this.setState(!n||n[e.mode]?t.previousState:CKEDITOR.TRISTATE_DISABLED),t.on=0},this),this.onMenu&&n.addListener(this.onMenu)),this.setState(CKEDITOR.TRISTATE_ON),t.on=1,setTimeout(function(){n.show(CKEDITOR.document.getById(t.id),4)},0)))};CKEDITOR.ui.menuButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(t){delete t.panel,this.base(t),this.hasArrow=!0,this.click=e},statics:{handler:{create:function(e){return new CKEDITOR.ui.menuButton(e)}}}})},beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}}),CKEDITOR.UI_MENUBUTTON="menubutton","use strict",CKEDITOR.plugins.add("scayt",{requires:"menubutton,dialog",tabToOpen:null,dialogName:"scaytDialog",init:function(e){var t=this,n=CKEDITOR.plugins.scayt;this.bindEvents(e),this.parseConfig(e),this.addRule(e),CKEDITOR.dialog.add(this.dialogName,CKEDITOR.getUrl(this.path+"dialogs/options.js")),this.addMenuItems(e);var r=e.lang.scayt,i=CKEDITOR.env;e.ui.add("Scayt",CKEDITOR.UI_MENUBUTTON,{label:r.text_title,title:e.plugins.wsc?e.lang.wsc.title:r.text_title,modes:{wysiwyg:!i.ie||!(i.version<8||i.quirks)},toolbar:"spellchecker,20",refresh:function(){var t=e.ui.instances.Scayt.getState();e.scayt&&(t=n.state[e.name]?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),e.fire("scaytButtonState",t)},onRender:function(){var t=this;e.on("scaytButtonState",function(e){typeof e.data!==void 0&&t.setState(e.data)})},onMenu:function(){var t=e.scayt;return e.getMenuItem("scaytToggle").label=e.lang.scayt[t&&n.state[e.name]?"btn_disable":"btn_enable"],t={scaytToggle:CKEDITOR.TRISTATE_OFF,scaytOptions:t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytLangs:t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytDict:t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytAbout:t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,WSC:e.plugins.wsc?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED},e.config.scayt_uiTabs[0]||delete t.scaytOptions,e.config.scayt_uiTabs[1]||delete t.scaytLangs,e.config.scayt_uiTabs[2]||delete t.scaytDict,t}}),e.contextMenu&&e.addMenuItems&&(e.contextMenu.addListener(function(){var n=e.scayt,r;if(n){var i=n.getSelectionNode();if(i=i?i.getAttribute(n.getNodeAttribute()):i)r=t.menuGenerator(e,i,t),n.showBanner("."+e.contextMenu._.definition.panel.className.split(" ").join(" ."))}return r}),e.contextMenu._.onHide=CKEDITOR.tools.override(e.contextMenu._.onHide,function(t){return function(){var n=e.scayt;return n&&n.hideBanner(),t.apply(this)}}))},addMenuItems:function(e){var t=this,n=CKEDITOR.plugins.scayt;e.addMenuGroup("scaytButton");var r=e.config.scayt_contextMenuItemsOrder.split("|");if(r&&r.length)for(var i=0;i0&&t[0]!=="no_any_suggestions")for(var s=0;s tr > td, .%1 table.%2 > tr > th,",".%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,",".%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,",".%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th","{","border : #d3d3d3 1px dotted","}"]).join("").replace(/%2/g,"cke_show_border").replace(/%1/g,"cke_show_borders "),CKEDITOR.addCss(e)},init:function(t){var n=t.addCommand("showborders",e);n.canUndo=!1,t.config.startupShowBorders!==!1&&n.setState(CKEDITOR.TRISTATE_ON),t.on("mode",function(){n.state!=CKEDITOR.TRISTATE_DISABLED&&n.refresh(t)},null,null,100),t.on("contentDom",function(){n.state!=CKEDITOR.TRISTATE_DISABLED&&n.refresh(t)}),t.on("removeFormatCleanup",function(e){e=e.data,t.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&e.is("table")&&(!e.hasAttribute("border")||parseInt(e.getAttribute("border"),10)<=0)&&e.addClass("cke_show_border")})},afterInit:function(e){var t=e.dataProcessor,e=t&&t.dataFilter,t=t&&t.htmlFilter;e&&e.addRules({elements:{table:function(e){var e=e.attributes,t=e["class"],n=parseInt(e.border,10);(!n||n<=0)&&(!t||t.indexOf("cke_show_border")==-1)&&(e["class"]=(t||"")+" cke_show_border")}}}),t&&t.addRules({elements:{table:function(e){var e=e.attributes,t=e["class"];t&&(e["class"]=t.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,""))}}})}}),CKEDITOR.on("dialogDefinition",function(e){var t=e.data.name;if(t=="table"||t=="tableProperties"){e=e.data.definition,t=e.getContents("info").get("txtBorder"),t.commit=CKEDITOR.tools.override(t.commit,function(e){return function(t,n){e.apply(this,arguments);var r=parseInt(this.getValue(),10);n[!r||r<=0?"addClass":"removeClass"]("cke_show_border")}});if(e=(e=e.getContents("advanced"))&&e.get("advCSSClasses"))e.setup=CKEDITOR.tools.override(e.setup,function(e){return function(){e.apply(this,arguments),this.setValue(this.getValue().replace(/cke_show_border/,""))}}),e.commit=CKEDITOR.tools.override(e.commit,function(e){return function(t,n){e.apply(this,arguments),parseInt(n.getAttribute("border"),10)||n.addClass("cke_show_border")}})}})}(),function(){CKEDITOR.plugins.add("sourcearea",{init:function(t){function n(){var e=i&&this.equals(CKEDITOR.document.getActive());this.hide(),this.setStyle("height",this.getParent().$.clientHeight+"px"),this.setStyle("width",this.getParent().$.clientWidth+"px"),this.show(),e&&this.focus()}if(t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var r=CKEDITOR.plugins.sourcearea;t.addMode("source",function(r){var i=t.ui.space("contents").getDocument().createElement("textarea");i.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",t.config.sourceAreaTabSize||4))),i.setAttribute("dir","ltr"),i.addClass("cke_source cke_reset cke_enable_context_menu"),t.ui.space("contents").append(i),i=t.editable(new e(t,i)),i.setData(t.getData(1)),CKEDITOR.env.ie&&(i.attachListener(t,"resize",n,i),i.attachListener(CKEDITOR.document.getWindow(),"resize",n,i),CKEDITOR.tools.setTimeout(n,0,i)),t.fire("ariaWidget",this),r()}),t.addCommand("source",r.commands.source),t.ui.addButton&&t.ui.addButton("Source",{label:t.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"}),t.on("mode",function(){t.getCommand("source").setState(t.mode=="source"?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var i=CKEDITOR.env.ie&&CKEDITOR.env.version==9}}});var e=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(e){this.setValue(e),this.status="ready",this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(e){this[(e?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){e.baseProto.detach.call(this),this.clearCustomData(),this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(e){e.mode=="wysiwyg"&&e.fire("saveSnapshot"),e.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED),e.setMode(e.mode=="source"?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("specialchar",{availableLangs:{af:1,ar:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,en:1,"en-gb":1,eo:1,es:1,et:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ku:1,lt:1,lv:1,nb:1,nl:1,no:1,pl:1,pt:1,"pt-br":1,ru:1,si:1,sk:1,sl:1,sq:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},requires:"dialog",init:function(e){var t=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js"),e.addCommand("specialchar",{exec:function(){var n=e.langCode,n=t.availableLangs[n]?n:t.availableLangs[n.replace(/-.*/,"")]?n.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(t.path+"dialogs/lang/"+n+".js"),function(){CKEDITOR.tools.extend(e.lang.specialchar,t.langEntries[n]),e.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1}),e.ui.addButton&&e.ui.addButton("SpecialChar",{label:e.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}}),CKEDITOR.config.specialChars="! " # $ % & ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ € ‘ ’ “ ” – — ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ Œ œ Ŵ Ŷ ŵ ŷ ‚ ‛ „ … ™ ► • → ⇒ ⇔ ♦ ≈".split(" "),function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(e){var t=e.config,n=e.lang.stylescombo,r={},i=[],s=[];e.on("stylesSet",function(n){if(n=n.data.styles){for(var o,u,f,l=0,h=n.length;ln&&(!s||!o||ao&&(s=a,o=u)}else{if(r&&u==n){s=a;break}uo)&&(s=a,o=u)}}s&&s.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(e){function t(e){return CKEDITOR.tools.extend(e||{},{contextSensitive:1,refresh:function(e,t){this.setState(t.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!e.blockless){var n=e.lang.table;e.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];"+(e.plugins.dialogadvtab?"table"+e.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"]]})),e.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",t())),e.addCommand("tableDelete",t({exec:function(e){var t=e.elementPath().contains("table",1);if(t){var n=t.getParent(),r=e.editable();n.getChildCount()==1&&!n.is("td","th")&&!n.equals(r)&&(t=n),e=e.createRange(),e.moveToPosition(t,CKEDITOR.POSITION_BEFORE_START),t.remove(),e.select()}}})),e.ui.addButton&&e.ui.addButton("Table",{label:n.toolbar,command:"table",toolbar:"insert,30"}),CKEDITOR.dialog.add("table",this.path+"dialogs/table.js"),CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js"),e.addMenuItems&&e.addMenuItems({table:{label:n.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:n.deleteTable,command:"tableDelete",group:"table",order:1}}),e.on("doubleclick",function(e){e.data.element.is("table")&&(e.data.dialog="tableProperties")}),e.contextMenu&&e.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function e(e){function t(e){!(n.length>0)&&e.type==CKEDITOR.NODE_ELEMENT&&h.test(e.getName())&&!e.getCustomData("selected_cell")&&(CKEDITOR.dom.element.setMarker(r,e,"selected_cell",!0),n.push(e))}for(var e=e.getRanges(),n=[],r={},i=0;i1&&u&&s[a]==u[a]?(f=s[a],f.rowSpan=f.rowSpan+1):(f=(new CKEDITOR.dom.element(s[a])).clone(),f.removeAttribute("rowSpan"),f.appendBogus(),i.append(f),f=f.$),a+=f.colSpan-1}n?i.insertBefore(o):i.insertAfter(o)}function n(t){if(t instanceof CKEDITOR.dom.selection){for(var r=e(t),i=r[0].getAscendant("table"),s=CKEDITOR.tools.buildTableMap(i),t=r[0].getParent().$.rowIndex,r=r[r.length-1],o=r.getParent().$.rowIndex+r.$.rowSpan-1,r=[],u=t;u<=o;u++){for(var a=s[u],f=new CKEDITOR.dom.element(i.$.rows[u]),l=0;l0?s[t-1]:null)||i.$.parentNode);for(u=r.length;u>=0;u--)n(r[u]);return i}return t instanceof CKEDITOR.dom.element&&(i=t.getAscendant("table"),i.$.rows.length==1?i.remove():t.remove()),null}function r(e,t){for(var n=t?Infinity:0,r=0;rn)n=i}return n}function i(t,n){for(var i=e(t),s=i[0].getAscendant("table"),o=r(i,1),i=r(i),o=n?o:i,u=CKEDITOR.tools.buildTableMap(s),s=[],i=[],a=u.length,f=0;f1&&i[f]==s[f]?(o=s[f],o.colSpan=o.colSpan+1):(o=(new CKEDITOR.dom.element(s[f])).clone(),o.removeAttribute("colSpan"),o.appendBogus(),o[n?"insertBefore":"insertAfter"].call(o,new CKEDITOR.dom.element(s[f])),o=o.$),f+=o.rowSpan-1)}function s(e,t){var n=e.getStartElement();if(n=n.getAscendant("td",1)||n.getAscendant("th",1)){var r=n.clone();r.appendBogus(),t?r.insertBefore(n):r.insertAfter(n)}}function o(t){if(t instanceof CKEDITOR.dom.selection){var t=e(t),n=t[0]&&t[0].getAscendant("table"),r;e:{var i=0;r=t.length-1;for(var s={},a,f;a=t[i++];)CKEDITOR.dom.element.setMarker(s,a,"delete_cell",!0);for(i=0;a=t[i++];)if((f=a.getPrevious())&&!f.getCustomData("delete_cell")||(f=a.getNext())&&!f.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(s),r=f;break e}CKEDITOR.dom.element.clearAllMarkers(s),f=t[0].getParent(),(f=f.getPrevious())?r=f.getLast():(f=t[r].getParent(),r=(f=f.getNext())?f.getChild(0):null)}for(f=t.length-1;f>=0;f--)o(t[f]);r?u(r,!0):n&&n.remove()}else t instanceof CKEDITOR.dom.element&&(n=t.getParent(),n.getChildCount()==1?n.remove():t.remove())}function u(e,t){var n=e.getDocument(),r=CKEDITOR.document;CKEDITOR.env.ie&&CKEDITOR.env.version==10&&(r.focus(),n.focus()),n=new CKEDITOR.dom.range(n),n["moveToElementEdit"+(t?"End":"Start")](e)||(n.selectNodeContents(e),n.collapse(t?!1:!0)),n.select(!0)}function a(e,t,n){e=e[t];if(typeof n=="undefined")return e;for(t=0;e&&t=l?t.removeAttribute("rowSpan"):t.$.rowSpan=p,p>=f?t.removeAttribute("colSpan"):t.$.colSpan=d,r=new CKEDITOR.dom.nodeList(s.$.rows),i=r.count();for(n=i-1;n>=0;n--)s=r.getItem(n),s.$.cells.length||(s.remove(),i++);return t}function l(t,n){var r=e(t);if(r.length>1)return!1;if(n)return!0;var r=r[0],i=r.getParent(),s=i.getAscendant("table"),o=CKEDITOR.tools.buildTableMap(s),u=i.$.rowIndex,f=a(o,u,r),l=r.$.rowSpan,c;if(l>1){c=Math.ceil(l/2);for(var l=Math.floor(l/2),i=u+c,s=new CKEDITOR.dom.element(s.$.rows[i]),o=a(o,i),h,i=r.clone(),u=0;uf){i.insertBefore(new CKEDITOR.dom.element(h));break}h=null}h||s.append(i)}else{l=c=1,s=i.clone(),s.insertAfter(i),s.append(i=r.clone()),h=a(o,u);for(f=0;f1)return!1;if(n)return!0;var r=r[0],i=r.getParent(),s=i.getAscendant("table"),s=CKEDITOR.tools.buildTableMap(s),o=a(s,i.$.rowIndex,r),u=r.$.colSpan;if(u>1)i=Math.ceil(u/2),u=Math.floor(u/2);else{for(var u=i=1,f=[],l=0;l1&&(l+=c[o].rowSpan-1)}for(s=0;s0?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}}},tablecell_insertBefore:{label:p.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:p.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:p.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:p.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:p.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:p.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:p.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:p.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:p.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:p.row.menu,group:"tablerow",order:1,getItems:function(){return{tablerow_insertBefore:CKEDITOR.TRISTATE_OFF,tablerow_insertAfter:CKEDITOR.TRISTATE_OFF,tablerow_delete:CKEDITOR.TRISTATE_OFF}}},tablerow_insertBefore:{label:p.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:p.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:p.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:p.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:CKEDITOR.TRISTATE_OFF,tablecolumn_insertAfter:CKEDITOR.TRISTATE_OFF,tablecolumn_delete:CKEDITOR.TRISTATE_OFF}}},tablecolumn_insertBefore:{label:p.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:p.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:p.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}}),r.contextMenu&&r.contextMenu.addListener(function(e,t,n){return(e=n.contains({td:1,th:1},1))&&!e.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getSelectedCells:e},CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(e){for(var e=e.$.rows,t=-1,n=[],r=0;r',t.lang.toolbar.toolbars,"",''],i=t.config.toolbarStartupExpanded!==!1,u,f;t.config.toolbarCanCollapse&&t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&o.push('":' style="display:none">'));for(var l=t.toolbox.toolbars,h=e(t),p=0;p"),f=u=0);if(g==="/")o.push(' ');else{y=g.items||g;for(var w=0;w'),m&&o.push('',m," "),o.push(' ');var x=l.push(v)-1;x>0&&(v.previous=l[x-1],v.previous.next=v)}S?u||(o.push(''),u=1):u&&(o.push(" "),u=0),d=function(e){e=e.render(t,o),x=v.items.push(e)-1,x>0&&(e.previous=v.items[x-1],e.previous.next=e),e.toolbar=v,e.onkey=s,e.onfocus=function(){t.toolbox.focusCommandExecuted||t.focus()}},f&&(d(f),f=0),d(E)}}u&&(o.push(" "),f=u=0),v&&o.push(' ')}}}t.config.toolbarCanCollapse&&o.push("");if(t.config.toolbarCanCollapse&&t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var T=CKEDITOR.tools.addFunction(function(){t.execCommand("toolbarCollapse")});t.on("destroy",function(){CKEDITOR.tools.removeFunction(T)}),t.addCommand("toolbarCollapse",{readOnly:1,exec:function(e){var t=e.ui.space("toolbar_collapser"),n=t.getPrevious(),r=e.ui.space("contents"),i=n.getParent(),s=parseInt(r.$.style.height,10),o=i.$.offsetHeight,u=t.hasClass("cke_toolbox_collapser_min");u?(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(u?"▲":"◀"),r.setStyle("height",s-(i.$.offsetHeight-o)+"px"),e.fire("resize")},modes:{wysiwyg:1,source:1}}),t.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse"),o.push('','▲ '," ")}o.push(""),r.data.html=r.data.html+o.join("")}}),t.on("destroy",function(){if(this.toolbox){var e,t=0,n,r,i;for(e=this.toolbox.toolbars;t'),{}}}}})}}),CKEDITOR.ui.prototype.addToolbarGroup=function(e,n,r){var i=t(this.editor),s=n===0,o={name:e};if(r){if(r=CKEDITOR.tools.search(i,function(e){return e.name==r})){!r.groups&&(r.groups=[]);if(n){n=CKEDITOR.tools.indexOf(r.groups,n);if(n>=0){r.groups.splice(n+1,0,e);return}}s?r.groups.splice(0,0,e):r.groups.push(e);return}n=null}n&&(n=CKEDITOR.tools.indexOf(i,function(e){return e.name==n})),s?i.splice(0,0,e):typeof n=="number"?i.splice(n+1,0,o):i.push(e)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top","use strict",function(){var e=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],t={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(t){function r(e){o.enabled&&e.data.command.canUndo!==!1&&o.save()}function i(){o.enabled=t.readOnly?!1:t.mode=="wysiwyg",o.onChange()}var o=t.undoManager=new n(t),u=o.editingHandler=new s(o),f=t.addCommand("undo",{exec:function(){o.undo()&&(t.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),l=t.addCommand("redo",{exec:function(){o.redo()&&(t.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});t.setKeystroke([[e[0],"undo"],[e[1],"redo"],[e[2],"redo"]]),o.onChange=function(){f.setState(o.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),l.setState(o.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)},t.on("beforeCommandExec",r),t.on("afterCommandExec",r),t.on("saveSnapshot",function(e){o.save(e.data&&e.data.contentOnly)}),t.on("contentDom",u.attachListeners,u),t.on("instanceReady",function(){t.fire("saveSnapshot")}),t.on("beforeModeUnload",function(){t.mode=="wysiwyg"&&o.save(!0)}),t.on("mode",i),t.on("readOnly",i),t.ui.addButton&&(t.ui.addButton("Undo",{label:t.lang.undo.undo,command:"undo",toolbar:"undo,10"}),t.ui.addButton("Redo",{label:t.lang.undo.redo,command:"redo",toolbar:"undo,20"})),t.resetUndo=function(){o.reset(),t.fire("saveSnapshot")},t.on("updateSnapshot",function(){o.currentImage&&o.update()}),t.on("lockSnapshot",function(e){e=e.data,o.lock(e&&e.dontUpdate,e&&e.forceUpdate)}),t.on("unlockSnapshot",o.unlock,o)}}),CKEDITOR.plugins.undo={};var n=CKEDITOR.plugins.undo.UndoManager=function(e){this.strokesRecorded=[0,0],this.locked=null,this.previousKeyGroup=-1,this.limit=e.config.undoStackSize||20,this.strokesLimit=25,this.editor=e,this.reset()};n.prototype={type:function(e,t){var r=n.getKeyGroup(e),i=this.strokesRecorded[r]+1,t=t||i>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange()),t?(i=0,this.editor.fire("saveSnapshot")):this.editor.fire("change"),this.strokesRecorded[r]=i,this.previousKeyGroup=r},keyGroupChanged:function(e){return n.getKeyGroup(e)!=this.previousKeyGroup},reset:function(){this.snapshots=[],this.index=-1,this.currentImage=null,this.hasRedo=this.hasUndo=!1,this.locked=null,this.resetType()},resetType:function(){this.strokesRecorded=[0,0],this.typing=!1,this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0),this.hasRedo=!!this.getNextImage(!1),this.resetType(),this.onChange()},save:function(e,t,n){var i=this.editor;if(this.locked||i.status!="ready"||i.mode!="wysiwyg")return!1;var s=i.editable();if(!s||s.status!="ready")return!1;s=this.snapshots,t||(t=new r(i));if(t.contents===!1)return!1;if(this.currentImage)if(t.equalsContent(this.currentImage)){if(e||t.equalsSelection(this.currentImage))return!1}else n!==!1&&i.fire("change");return s.splice(this.index+1,s.length-this.index-1),s.length==this.limit&&s.shift(),this.index=s.push(t)-1,this.currentImage=t,n!==!1&&this.refreshState(),!0},restoreImage:function(e){var t=this.editor,n;e.bookmarks&&(t.focus(),n=t.getSelection()),this.locked={level:999},this.editor.loadSnapshot(e.contents),e.bookmarks?n.selectBookmarks(e.bookmarks):CKEDITOR.env.ie&&(n=this.editor.document.getBody().$.createTextRange(),n.collapse(!0),n.select()),this.locked=null,this.index=e.index,this.currentImage=this.snapshots[this.index],this.update(),this.refreshState(),t.fire("change")},getNextImage:function(e){var t=this.snapshots,n=this.currentImage,r;if(n)if(e)for(r=this.index-1;r>=0;r--){e=t[r];if(!n.equalsContent(e))return e.index=r,e}else for(r=this.index+1;r0&&this.currentImage.equalsContent(n[t-1]);)t-=1;n.splice(t,this.index-t+1,e),this.index=t,this.currentImage=e}},updateSelection:function(e){if(!this.snapshots.length)return!1;var t=this.snapshots,n=t[t.length-1];return n.equalsContent(e)&&!n.equalsSelection(e)?(this.currentImage=t[t.length-1]=e,!0):!1},lock:function(e,t){if(this.locked)this.locked.level++;else if(e)this.locked={level:1};else{var n=null;if(t)n=!0;else{var i=new r(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(i)&&(n=i)}this.locked={update:n,level:1}}},unlock:function(){if(this.locked&&!--this.locked.level){var e=this.locked.update;this.locked=null;if(e===!0)this.update();else if(e){var t=new r(this.editor,!0);e.equalsContent(t)||this.update()}}}},n.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1},n.keyGroups={PRINTABLE:0,FUNCTIONAL:1},n.isNavigationKey=function(e){return!!n.navigationKeyCodes[e]},n.getKeyGroup=function(e){var r=n.keyGroups;return t[e]?r.FUNCTIONAL:r.PRINTABLE},n.getOppositeKeyGroup=function(e){var t=n.keyGroups;return e==t.FUNCTIONAL?t.PRINTABLE:t.FUNCTIONAL},n.ieFunctionalKeysBug=function(e){return CKEDITOR.env.ie&&n.getKeyGroup(e)==n.keyGroups.FUNCTIONAL};var r=CKEDITOR.plugins.undo.Image=function(e,t){this.editor=e,e.fire("beforeUndoImage");var n=e.getSnapshot();CKEDITOR.env.ie&&n&&(n=n.replace(/\s+data-cke-expando=".*?"/g,"")),this.contents=n,t||(this.bookmarks=(n=n&&e.getSelection())&&n.createBookmarks2(!0)),e.fire("afterUndoImage")},i=/\b(?:href|src|name)="[^"]*?"/gi;r.prototype={equalsContent:function(e){var t=this.contents,e=e.contents;return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(t=t.replace(i,""),e=e.replace(i,"")),t!=e?!1:!0},equalsSelection:function(e){var t=this.bookmarks,e=e.bookmarks;if(t||e){if(!t||!e||t.length!=e.length)return!1;for(var n=0;n-1)t.data.preventDefault();else{this.keyEventsStack.cleanUp(t),t=this.undoManager,this.keyEventsStack.getLast(i)||this.keyEventsStack.push(i),this.lastKeydownImage=new r(t.editor);if(n.isNavigationKey(i)||this.undoManager.keyGroupChanged(i))if(t.strokesRecorded[0]||t.strokesRecorded[1])t.save(!1,this.lastKeydownImage,!1),t.resetType()}},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=!1;else{var e=this.keyEventsStack.getLast();e||(e=this.keyEventsStack.push(0)),this.keyEventsStack.increment(e.keyCode),this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&(this.undoManager.type(e.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(e){var t=this.undoManager,e=e.data.getKey(),i=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(e);if(!n.ieFunctionalKeysBug(e)||!this.lastKeydownImage||!this.lastKeydownImage.equalsContent(new r(t.editor,!0)))i>0?t.type(e):n.isNavigationKey(e)&&this.onNavigationKey(!0)},onNavigationKey:function(e){var t=this.undoManager;(e||!t.save(!0,null,!1))&&t.updateSelection(new r(t.editor)),t.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},attachListeners:function(){var e=this.undoManager.editor,t=e.editable(),r=this;t.attachListener(t,"keydown",function(e){r.onKeydown(e),n.ieFunctionalKeysBug(e.data.getKey())&&r.onInput()},null,null,999),t.attachListener(t,CKEDITOR.env.ie?"keypress":"input",r.onInput,r,null,999),t.attachListener(t,"keyup",r.onKeyup,r,null,999),t.attachListener(t,"paste",r.ignoreInputEventListener,r,null,999),t.attachListener(t,"drop",r.ignoreInputEventListener,r,null,999),t.attachListener(t.isInline()?t:e.document.getDocumentElement(),"click",function(){r.onNavigationKey()},null,null,999),t.attachListener(this.undoManager.editor,"blur",function(){r.keyEventsStack.remove(9)},null,null,999)}};var o=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=[]};o.prototype={push:function(e){return this.stack[this.stack.push({keyCode:e,inputs:0})-1]},getLastIndex:function(e){if(typeof e!="number")return this.stack.length-1;for(var t=this.stack.length;t--;)if(this.stack[t].keyCode==e)return t;return-1},getLast:function(e){return e=this.getLastIndex(e),e!=-1?this.stack[e]:null},increment:function(e){this.getLast(e).inputs++},remove:function(e){e=this.getLastIndex(e),e!=-1&&this.stack.splice(e,1)},resetInputs:function(e){if(typeof e=="number")this.getLast(e).inputs=0;else for(e=this.stack.length;e--;)this.stack[e].inputs=0},getTotalInputs:function(){for(var e=this.stack.length,t=0;e--;)t+=this.stack[e].inputs;return t},cleanUp:function(e){e=e.data.$,!e.ctrlKey&&!e.metaKey&&this.remove(17),e.shiftKey||this.remove(16),e.altKey||this.remove(18)}}}(),CKEDITOR.plugins.add("wsc",{requires:"dialog",parseApi:function(e){e.config.wsc_onFinish=typeof e.config.wsc_onFinish=="function"?e.config.wsc_onFinish:function(){},e.config.wsc_onClose=typeof e.config.wsc_onClose=="function"?e.config.wsc_onClose:function(){}},parseConfig:function(e){e.config.wsc_customerId=e.config.wsc_customerId||CKEDITOR.config.wsc_customerId||"1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk",e.config.wsc_customDictionaryIds=e.config.wsc_customDictionaryIds||CKEDITOR.config.wsc_customDictionaryIds||"",e.config.wsc_userDictionaryName=e.config.wsc_userDictionaryName||CKEDITOR.config.wsc_userDictionaryName||"",e.config.wsc_customLoaderScript=e.config.wsc_customLoaderScript||CKEDITOR.config.wsc_customLoaderScript,CKEDITOR.config.wsc_cmd=e.config.wsc_cmd||CKEDITOR.config.wsc_cmd||"spell",CKEDITOR.config.wsc_version="v4.3.0-26-g5bcf855",CKEDITOR.config.wsc_removeGlobalVariable=!0},init:function(e){var t=CKEDITOR.env;this.parseConfig(e),this.parseApi(e),e.addCommand("checkspell",new CKEDITOR.dialogCommand("checkspell")).modes={wysiwyg:!CKEDITOR.env.opera&&!CKEDITOR.env.air&&document.domain==window.location.hostname&&(!t.ie||!(t.version<8||t.quirks))},typeof e.plugins.scayt=="undefined"&&e.ui.addButton&&e.ui.addButton("SpellChecker",{label:e.lang.wsc.toolbar,click:function(e){var t=e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?e.container.getText():e.document.getBody().getText();(t=t.replace(/\s/g,""))?e.execCommand("checkspell"):alert("Nothing to check!")},toolbar:"spellchecker,10"}),CKEDITOR.dialog.add("checkspell",this.path+(CKEDITOR.env.ie&&CKEDITOR.env.version<=7?"dialogs/wsc_ie.js":window.postMessage?"dialogs/wsc.js":"dialogs/wsc_ie.js"))}}),function(){function e(e){var n=this.editor,r=e.document,i=r.body,s=r.getElementById("cke_actscrpt");s&&s.parentNode.removeChild(s),(s=r.getElementById("cke_shimscrpt"))&&s.parentNode.removeChild(s),(s=r.getElementById("cke_basetagscrpt"))&&s.parentNode.removeChild(s),i.contentEditable=!0,CKEDITOR.env.ie&&(i.hideFocus=!0,i.disabled=!0,i.removeAttribute("disabled")),delete this._.isLoadingData,this.$=i,r=new CKEDITOR.dom.document(r),this.setup(),this.fixInitialSelection(),CKEDITOR.env.ie&&(r.getDocumentElement().addClass(r.$.compatMode),n.config.enterMode!=CKEDITOR.ENTER_P&&this.attachListener(r,"selectionchange",function(){var e=r.getBody(),t=n.getSelection(),i=t&&t.getRanges()[0];i&&e.getHtml().match(/^(?: | )<\/p>$/i)&&i.startContainer.equals(e)&&setTimeout(function(){i=n.getSelection().getRanges()[0],i.startContainer.equals("body")||(e.getFirst().remove(1),i.moveToElementEditEnd(e),i.select())},0)})),(CKEDITOR.env.webkit||CKEDITOR.env.ie&&CKEDITOR.env.version>10)&&r.getDocumentElement().on("mousedown",function(e){e.data.getTarget().is("html")&&setTimeout(function(){n.editable().focus()})}),t(n);try{n.document.$.execCommand("2D-position",!1,!0)}catch(o){}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&n.document.$.compatMode=="CSS1Compat")&&this.attachListener(this,"keydown",function(e){var t=e.data.getKeystroke();if(t==33||t==34)if(CKEDITOR.env.ie)setTimeout(function(){n.getSelection().scrollIntoView()},0);else if(n.window.$.innerHeight>this.$.offsetHeight){var r=n.createRange();r[t==33?"moveToElementEditStart":"moveToElementEditEnd"](this),r.select(),e.data.preventDefault()}}),CKEDITOR.env.ie&&this.attachListener(r,"blur",function(){try{r.$.selection.empty()}catch(e){}}),CKEDITOR.env.iOS&&this.attachListener(r,"touchend",function(){e.focus()}),i=n.document.getElementsByTag("title").getItem(0),i.data("cke-title",i.getText()),CKEDITOR.env.ie&&(n.document.$.title=this._.docTitle),CKEDITOR.tools.setTimeout(function(){this.status=="unloaded"&&(this.status="ready"),n.fire("contentDom"),this._.isPendingFocus&&(n.focus(),this._.isPendingFocus=!1),setTimeout(function(){n.fire("dataReady")},0),CKEDITOR.env.ie&&setTimeout(function(){if(n.document){var e=n.document.$.body;e.runtimeStyle.marginBottom="0px",e.runtimeStyle.marginBottom=""}},1e3)},0,this)}function t(e){function t(){var t;e.editable().attachListener(e,"selectionChange",function(){var r=e.getSelection().getSelectedElement();r&&(t&&(t.detachEvent("onresizestart",n),t=null),r.$.attachEvent("onresizestart",n),t=r.$)})}function n(e){e.returnValue=!1}if(CKEDITOR.env.gecko)try{var r=e.document.$;r.execCommand("enableObjectResizing",!1,!e.config.disableObjectResizing),r.execCommand("enableInlineTableEditing",!1,!e.config.disableNativeTableHandles)}catch(i){}else CKEDITOR.env.ie&&CKEDITOR.env.version<11&&e.config.disableObjectResizing&&t(e)}function n(){var e=[];if(CKEDITOR.document.$.documentMode>=8){e.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}");var t=[],n;for(n in CKEDITOR.dtd.$removeEmpty)t.push("html.CSS1Compat "+n+"[contenteditable=false]");e.push(t.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 n(n){n&&n.removeListener(),e.editable(new r(e,s.$.contentWindow.document.body)),e.setData(e.getData(1),t)}var i="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",i=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent(i)+"}())":"",s=CKEDITOR.dom.element.createFromHtml('');s.setStyles({width:"100%",height:"100%"}),s.addClass("cke_wysiwyg_frame cke_reset");var o=e.ui.space("contents");o.append(s),(i=CKEDITOR.env.ie||CKEDITOR.env.gecko)&&s.on("load",n);var u=e.title,f=e.fire("ariaEditorHelpLabel",{}).label;u&&(CKEDITOR.env.ie&&f&&(u+=", "+f),s.setAttribute("title",u));if(f){var u=CKEDITOR.tools.getNextId(),l=CKEDITOR.dom.element.createFromHtml(''+f+" ");o.append(l,1),s.setAttribute("aria-describedby",u)}e.on("beforeModeUnload",function(e){e.removeListener(),l&&l.remove()}),s.setAttributes({tabIndex:e.tabIndex,allowTransparency:"true"}),!i&&n(),CKEDITOR.env.webkit&&(i=function(){o.setStyle("width","100%"),s.hide(),s.setSize("width",o.getSize("width")),o.removeStyle("width"),s.show()},s.setCustomData("onResize",i),CKEDITOR.document.getWindow().on("resize",i)),e.fire("ariaWidget",s)})}}),CKEDITOR.editor.prototype.addContentsCss=function(e){var t=this.config,n=t.contentsCss;CKEDITOR.tools.isArray(n)||(t.contentsCss=n?[n]:[]),t.contentsCss.push(e)};var r=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,t){var r=this.editor;if(t)this.setHtml(e),this.fixInitialSelection(),r.fire("dataReady");else{this._.isLoadingData=!0,r._.dataStore={id:1};var i=r.config,s=i.fullPage,o=i.docType,u=CKEDITOR.tools.buildStyleHtml(n()).replace(/