(function(){var a=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,b=CKEDITOR.dom.walker.whitespaces(true);function c(q){return q.isBlockBoundary()&&CKEDITOR.dtd.$empty[q.getName()];};function d(q){return function(r){if(this.mode=='wysiwyg'){this.focus();this.fire('saveSnapshot');q.call(this,r.data);CKEDITOR.tools.setTimeout(function(){this.fire('saveSnapshot');},0,this);}};};function e(q){var w=this;if(w.dataProcessor)q=w.dataProcessor.toHtml(q);var r=w.getSelection(),s=r.getRanges()[0];if(s.checkReadOnly())return;if(CKEDITOR.env.ie){var t=r.isLocked;if(t)r.unlock();var u=r.getNative();if(u.type=='Control')u.clear();else if(r.getType()==CKEDITOR.SELECTION_TEXT){s=r.getRanges()[0];var v=s&&s.endContainer;if(v&&v.type==CKEDITOR.NODE_ELEMENT&&v.getAttribute('contenteditable')=='false'&&s.checkBoundaryOfElement(v,CKEDITOR.END)){s.setEndAfter(s.endContainer);s.deleteContents();}}try{u.createRange().pasteHTML(q);}catch(x){}if(t)w.getSelection().lock();}else w.document.$.execCommand('inserthtml',false,q);if(CKEDITOR.env.webkit){r=w.getSelection();r.scrollIntoView();}};function f(q){var r=this.getSelection(),s=r.getStartElement().hasAscendant('pre',true)?CKEDITOR.ENTER_BR:this.config.enterMode,t=s==CKEDITOR.ENTER_BR,u=CKEDITOR.tools.htmlEncode(q.replace(/\r\n|\r/g,'\n'));u=u.replace(/^[ \t]+|[ \t]+$/g,function(A,B,C){if(A.length==1)return '&nbsp;';else if(!B)return CKEDITOR.tools.repeat('&nbsp;',A.length-1)+' ';else return ' '+CKEDITOR.tools.repeat('&nbsp;',A.length-1);});u=u.replace(/[ \t]{2,}/g,function(A){return CKEDITOR.tools.repeat('&nbsp;',A.length-1)+' ';});var v=s==CKEDITOR.ENTER_P?'p':'div';if(!t)u=u.replace(/(\n{2})([\s\S]*?)(?:$|\1)/g,function(A,B,C){return '<'+v+'>'+C+'</'+v+'>';});u=u.replace(/\n/g,'<br>');if(!(t||CKEDITOR.env.ie))u=u.replace(new RegExp('<br>(?=</'+v+'>)'),function(A){return CKEDITOR.tools.repeat(A,2);});if(CKEDITOR.env.gecko||CKEDITOR.env.webkit){var w=new CKEDITOR.dom.elementPath(r.getStartElement()),x=[];for(var y=0;y<w.elements.length;y++){var z=w.elements[y].getName();if(z in CKEDITOR.dtd.$inline)x.unshift(w.elements[y].getOuterHtml().match(/^<.*?>/));else if(z in CKEDITOR.dtd.$block)break;}u=x.join('')+u;}e.call(this,u);};function g(q){var r=this.getSelection(),s=r.getRanges(),t=q.getName(),u=CKEDITOR.dtd.$block[t],v=r.isLocked;if(v)r.unlock();var w,x,y,z;for(var A=s.length-1;A>=0;A--){w=s[A];if(!w.checkReadOnly()){w.deleteContents(1);x=!A&&q||q.clone(1);
var B,C;if(u)while((B=w.getCommonAncestor(0,1))&&(C=CKEDITOR.dtd[B.getName()])&&!(C&&C[t])){if(B.getName() in CKEDITOR.dtd.span)w.splitElement(B);else if(w.checkStartOfBlock()&&w.checkEndOfBlock()){w.setStartBefore(B);w.collapse(true);B.remove();}else w.splitBlock();}w.insertNode(x);if(!y)y=x;}}if(y){w.moveToPosition(y,CKEDITOR.POSITION_AFTER_END);if(u){var D=y.getNext(b),E=D&&D.type==CKEDITOR.NODE_ELEMENT&&D.getName();if(E&&CKEDITOR.dtd.$block[E]&&CKEDITOR.dtd[E]['#'])w.moveToElementEditStart(D);}}r.selectRanges([w]);if(v)this.getSelection().lock();};function h(q){if(!q.checkDirty())setTimeout(function(){q.resetDirty();},0);};var i=CKEDITOR.dom.walker.whitespaces(true),j=CKEDITOR.dom.walker.bookmark(false,true);function k(q){return i(q)&&j(q);};function l(q){return q.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(q.getText()).match(/^(?:&nbsp;|\xa0)$/);};function m(q){if(q.isLocked){q.unlock();setTimeout(function(){q.lock();},0);}};function n(q){return q.getOuterHtml().match(a);};i=CKEDITOR.dom.walker.whitespaces(true);function o(q){var r=q.window,s=q.document,t=q.document.getBody(),u=t.getFirst(),v=t.getChildren().count();if(!v||v==1&&u.type==CKEDITOR.NODE_ELEMENT&&u.hasAttribute('_moz_editor_bogus_node')){h(q);var w=q.element.getDocument(),x=w.getDocumentElement(),y=x.$.scrollTop,z=x.$.scrollLeft,A=s.$.createEvent('KeyEvents');A.initKeyEvent('keypress',true,true,r.$,false,false,false,false,0,32);s.$.dispatchEvent(A);if(y!=x.$.scrollTop||z!=x.$.scrollLeft)w.getWindow().$.scrollTo(z,y);v&&t.getFirst().remove();s.getBody().appendBogus();var B=new CKEDITOR.dom.range(s);B.setStartAt(t,CKEDITOR.POSITION_AFTER_START);B.select();}};function p(q){var r=q.editor,s=q.data.path,t=s.blockLimit,u=q.data.selection,v=u.getRanges()[0],w=r.document.getBody(),x=r.config.enterMode;if(CKEDITOR.env.gecko){o(r);var y=s.block||s.blockLimit,z=y&&y.getLast(k);if(y&&y.isBlockBoundary()&&!(z&&z.type==CKEDITOR.NODE_ELEMENT&&z.isBlockBoundary())&&!y.is('pre')&&!y.getBogus()){r.fire('updateSnapshot');h(r);y.appendBogus();}}if(r.config.autoParagraph!==false&&x!=CKEDITOR.ENTER_BR&&v.collapsed&&t.getName()=='body'&&!s.block){r.fire('updateSnapshot');h(r);CKEDITOR.env.ie&&m(u);var A=v.fixBlock(true,r.config.enterMode==CKEDITOR.ENTER_DIV?'div':'p');if(CKEDITOR.env.ie){var B=A.getFirst(k);B&&l(B)&&B.remove();}if(n(A)){var C=A.getNext(i);if(C&&C.type==CKEDITOR.NODE_ELEMENT&&!c(C)){v.moveToElementEditStart(C);A.remove();}else{C=A.getPrevious(i);if(C&&C.type==CKEDITOR.NODE_ELEMENT&&!c(C)){v.moveToElementEditEnd(C);
A.remove();}}}v.select();q.cancel();}var D=new CKEDITOR.dom.range(r.document);D.moveToElementEditEnd(r.document.getBody());var E=new CKEDITOR.dom.elementPath(D.startContainer);if(!E.blockLimit.is('body')){r.fire('updateSnapshot');h(r);CKEDITOR.env.ie&&m(u);var F;if(x!=CKEDITOR.ENTER_BR)F=w.append(r.document.createElement(x==CKEDITOR.ENTER_P?'p':'div'));else F=w;if(!CKEDITOR.env.ie)F.appendBogus();}};CKEDITOR.plugins.add('wysiwygarea',{requires:['editingblock'],init:function(q){var r=q.config.enterMode!=CKEDITOR.ENTER_BR&&q.config.autoParagraph!==false?q.config.enterMode==CKEDITOR.ENTER_DIV?'div':'p':false,s=q.lang.editorTitle.replace('%1',q.name),t;q.on('editingBlockReady',function(){var z,A,B,C,D,E,F=CKEDITOR.env.isCustomDomain(),G=function(J){if(A)A.remove();var K='document.open();'+(F?'document.domain="'+document.domain+'";':'')+'document.close();';K=CKEDITOR.env.air?'javascript:void(0)':CKEDITOR.env.ie?'javascript:void(function(){'+encodeURIComponent(K)+'}())':'';A=CKEDITOR.dom.element.createFromHtml('<iframe style="width:100%;height:100%" frameBorder="0" title="'+s+'"'+' src="'+K+'"'+' tabIndex="'+(CKEDITOR.env.webkit?-1:q.tabIndex)+'"'+' allowTransparency="true"'+'></iframe>');if(document.location.protocol=='chrome:')CKEDITOR.event.useCapture=true;A.on('load',function(O){D=1;O.removeListener();var P=A.getFrameDocument();P.write(J);CKEDITOR.env.air&&I(P.getWindow().$);});if(document.location.protocol=='chrome:')CKEDITOR.event.useCapture=false;var L=q.element,M=CKEDITOR.env.gecko&&!L.isVisible(),N={};if(M){L.show();N={position:L.getStyle('position'),top:L.getStyle('top')};L.setStyles({position:'absolute',top:'-3000px'});}z.append(A);if(M)setTimeout(function(){L.hide();L.setStyles(N);},1000);};t=CKEDITOR.tools.addFunction(I);var H='<script id="cke_actscrpt" type="text/javascript" data-cke-temp="1">'+(F?'document.domain="'+document.domain+'";':'')+'window.parent.CKEDITOR.tools.callFunction( '+t+', window );'+'</script>';function I(J){if(!D)return;D=0;q.fire('ariaWidget',A);var K=J.document,L=K.body,M=K.getElementById('cke_actscrpt');M&&M.parentNode.removeChild(M);L.spellcheck=!q.config.disableNativeSpellChecker;var N=!q.readOnly;if(CKEDITOR.env.ie){L.hideFocus=true;L.disabled=true;L.contentEditable=N;L.removeAttribute('disabled');}else setTimeout(function(){if(CKEDITOR.env.gecko&&CKEDITOR.env.version>=10900||CKEDITOR.env.opera)K.$.body.contentEditable=N;else if(CKEDITOR.env.webkit)K.$.body.parentNode.contentEditable=N;else K.$.designMode=N?'off':'on';},0);
N&&CKEDITOR.env.gecko&&CKEDITOR.tools.setTimeout(o,0,null,q);J=q.window=new CKEDITOR.dom.window(J);K=q.document=new CKEDITOR.dom.document(K);N&&K.on('dblclick',function(T){var U=T.data.getTarget(),V={element:U,dialog:''};q.fire('doubleclick',V);V.dialog&&q.openDialog(V.dialog);});CKEDITOR.env.ie&&K.on('click',function(T){var U=T.data.getTarget();if(U.is('input')){var V=U.getAttribute('type');if(V=='submit'||V=='reset')T.data.preventDefault();}});if(!(CKEDITOR.env.ie||CKEDITOR.env.opera))K.on('mousedown',function(T){var U=T.data.getTarget();if(U.is('img','hr','input','textarea','select'))q.getSelection().selectElement(U);});if(CKEDITOR.env.gecko)K.on('mouseup',function(T){if(T.data.$.button==2){var U=T.data.getTarget();if(!U.getOuterHtml().replace(a,'')){var V=new CKEDITOR.dom.range(K);V.moveToElementEditStart(U);V.select(true);}}});K.on('click',function(T){T=T.data;if(T.getTarget().is('a')&&T.$.button!=2)T.preventDefault();});if(CKEDITOR.env.webkit){K.on('mousedown',function(){Q=1;});K.on('click',function(T){if(T.data.getTarget().is('input','select'))T.data.preventDefault();});K.on('mouseup',function(T){if(T.data.getTarget().is('input','textarea'))T.data.preventDefault();});}if(N&&CKEDITOR.env.ie&&K.$.compatMode=='CSS1Compat'||CKEDITOR.env.gecko||CKEDITOR.env.opera){var O=K.getDocumentElement();O.on('mousedown',function(T){if(T.data.getTarget().equals(O)){if(CKEDITOR.env.gecko&&CKEDITOR.env.version>=10900)x();y.focus();}});}var P=CKEDITOR.env.ie?A:J;P.on('blur',function(){q.focusManager.blur();});var Q;P.on('focus',function(){var T=q.document;if(N&&CKEDITOR.env.gecko&&CKEDITOR.env.version>=10900)x();else if(CKEDITOR.env.opera)T.getBody().focus();else if(CKEDITOR.env.webkit)if(!Q){q.document.getDocumentElement().focus();Q=1;}q.focusManager.focus();});var R=q.keystrokeHandler;R.blockedKeystrokes[8]=!N;R.attach(K);if(CKEDITOR.env.ie){K.getDocumentElement().addClass(K.$.compatMode);N&&K.on('keydown',function(T){var U=T.data.getKeystroke();if(U in {8:1,46:1}){var V=q.getSelection(),W=V.getSelectedElement();if(W){q.fire('saveSnapshot');var X=V.getRanges()[0].createBookmark();W.remove();V.selectBookmarks([X]);q.fire('saveSnapshot');T.data.preventDefault();}}});if(K.$.compatMode=='CSS1Compat'){var S={33:1,34:1};K.on('keydown',function(T){if(T.data.getKeystroke() in S)setTimeout(function(){q.getSelection().scrollIntoView();},0);});}q.config.enterMode!=CKEDITOR.ENTER_P&&K.on('selectionchange',function(){var T=K.getBody(),U=q.getSelection().getRanges()[0];if(T.getHtml().match(/^<p>&nbsp;<\/p>$/i)&&U.startContainer.equals(T))setTimeout(function(){U=q.getSelection().getRanges()[0];
if(!U.startContainer.equals('body')){T.getFirst().remove(1);U.moveToElementEditEnd(T);U.select(1);}},0);});}if(q.contextMenu)q.contextMenu.addTarget(K,q.config.browserContextMenuOnCtrl!==false);setTimeout(function(){q.fire('contentDom');if(E){q.mode='wysiwyg';q.fire('mode');E=false;}B=false;if(C){q.focus();C=false;}setTimeout(function(){q.fire('dataReady');},0);try{q.document.$.execCommand('enableInlineTableEditing',false,!q.config.disableNativeTableHandles);}catch(T){}if(q.config.disableObjectResizing)try{q.document.$.execCommand('enableObjectResizing',false,false);}catch(U){q.document.getBody().on(CKEDITOR.env.ie?'resizestart':'resize',function(V){V.data.preventDefault();});}if(CKEDITOR.env.ie)setTimeout(function(){if(q.document){var V=q.document.$.body;V.runtimeStyle.marginBottom='0px';V.runtimeStyle.marginBottom='';}},1000);},0);};q.addMode('wysiwyg',{load:function(J,K,L){z=J;if(CKEDITOR.env.ie&&CKEDITOR.env.quirks)J.setStyle('position','relative');q.mayBeDirty=true;E=true;if(L)this.loadSnapshotData(K);else this.loadData(K);},loadData:function(J){B=true;q._.dataStore={id:1};var K=q.config,L=K.fullPage,M=K.docType,N='<style type="text/css" data-cke-temp="1">'+q._.styles.join('\n')+'</style>';!L&&(N=CKEDITOR.tools.buildStyleHtml(q.config.contentsCss)+N);var O=K.baseHref?'<base href="'+K.baseHref+'" data-cke-temp="1" />':'';if(L)J=J.replace(/<!DOCTYPE[^>]*>/i,function(P){q.docType=M=P;return '';}).replace(/<\?xml\s[^\?]*\?>/i,function(P){q.xmlDeclaration=P;return '';});if(q.dataProcessor)J=q.dataProcessor.toHtml(J,r);if(L){if(!/<body[\s|>]/.test(J))J='<body>'+J;if(!/<html[\s|>]/.test(J))J='<html>'+J+'</html>';if(!/<head[\s|>]/.test(J))J=J.replace(/<html[^>]*>/,'$&<head><title></title></head>');else if(!/<title[\s|>]/.test(J))J=J.replace(/<head[^>]*>/,'$&<title></title>');O&&(J=J.replace(/<head>/,'$&'+O));J=J.replace(/<\/head\s*>/,N+'$&');J=M+J;}else J=K.docType+'<html dir="'+K.contentsLangDirection+'"'+' lang="'+(K.contentsLanguage||q.langCode)+'">'+'<head>'+'<title>'+s+'</title>'+O+N+'</head>'+'<body'+(K.bodyId?' id="'+K.bodyId+'"':'')+(K.bodyClass?' class="'+K.bodyClass+'"':'')+'>'+J+'</html>';if(CKEDITOR.env.gecko)J=J.replace(/<br \/>(?=\s*<\/(:?html|body)>)/,'$&<br type="_moz" />');J+=H;this.onDispose();G(J);},getData:function(){var J=q.config,K=J.fullPage,L=K&&q.docType,M=K&&q.xmlDeclaration,N=A.getFrameDocument(),O=K?N.getDocumentElement().getOuterHtml():N.getBody().getHtml();if(CKEDITOR.env.gecko)O=O.replace(/<br>(?=\s*(:?$|<\/body>))/,'');if(q.dataProcessor)O=q.dataProcessor.toDataFormat(O,r);
if(J.ignoreEmptyParagraph)O=O.replace(a,function(P,Q){return Q;});if(M)O=M+'\n'+O;if(L)O=L+'\n'+O;return O;},getSnapshotData:function(){return A.getFrameDocument().getBody().getHtml();},loadSnapshotData:function(J){A.getFrameDocument().getBody().setHtml(J);},onDispose:function(){if(!q.document)return;q.document.getDocumentElement().clearCustomData();q.document.getBody().clearCustomData();q.window.clearCustomData();q.document.clearCustomData();A.clearCustomData();A.remove();},unload:function(J){this.onDispose();q.window=q.document=A=z=C=null;q.fire('contentDomUnload');},focus:function(){var J=q.window;if(B)C=true;else if(CKEDITOR.env.opera&&q.document){var K=q.window.$.frameElement;K.blur(),K.focus();q.document.getBody().focus();q.selectionChange();}else if(!CKEDITOR.env.opera&&J){CKEDITOR.env.air?setTimeout(function(){J.focus();},0):J.focus();q.selectionChange();}}});q.on('insertHtml',d(e),null,null,20);q.on('insertElement',d(g),null,null,20);q.on('insertText',d(f),null,null,20);q.on('selectionChange',p,null,null,1);});var u;q.on('contentDom',function(){var z=q.document.getElementsByTag('title').getItem(0);z.data('cke-title',q.document.$.title);q.document.$.title=s;});q.on('readOnly',function(){if(q.mode=='wysiwyg'){var z=q.getMode();z.loadData(z.getData());}});if(CKEDITOR.document.$.documentMode>=8){q.addCss('html.CSS1Compat [contenteditable=false]{ min-height:0 !important;}');var v=[];for(var w in CKEDITOR.dtd.$removeEmpty)v.push('html.CSS1Compat '+w+'[contenteditable=false]');q.addCss(v.join(',')+'{ display:inline-block;}');}else if(CKEDITOR.env.gecko){q.addCss('html { height: 100% !important; }');q.addCss('img:-moz-broken { -moz-force-broken-image-icon : 1;\twidth : 24px; height : 24px; }');}q.addCss('html {\t_overflow-y: scroll; cursor: text;\t*cursor:auto;}');q.addCss('img, input, textarea { cursor: default;}');function x(z){if(q.readOnly)return;CKEDITOR.tools.tryThese(function(){q.document.$.designMode='on';setTimeout(function(){q.document.$.designMode='off';if(CKEDITOR.currentInstance==q)q.document.getBody().focus();},50);},function(){q.document.$.designMode='off';var A=q.document.getBody();A.setAttribute('contentEditable',false);A.setAttribute('contentEditable',true);!z&&x(1);});};if(CKEDITOR.env.gecko||CKEDITOR.env.ie||CKEDITOR.env.opera){var y;q.on('uiReady',function(){y=q.container.append(CKEDITOR.dom.element.createFromHtml('<span tabindex="-1" style="position:absolute;" role="presentation"></span>'));y.on('focus',function(){q.focus();});q.focusGrabber=y;
});q.on('destroy',function(){CKEDITOR.tools.removeFunction(t);y.clearCustomData();delete q.focusGrabber;});}q.on('insertElement',function(z){var A=z.data;if(A.type==CKEDITOR.NODE_ELEMENT&&(A.is('input')||A.is('textarea'))){if(!A.isReadOnly())A.data('cke-editable',A.hasAttribute('contenteditable')?'true':'1');A.setAttribute('contentEditable',false);}});}});if(CKEDITOR.env.gecko)(function(){var q=document.body;if(!q)window.addEventListener('load',arguments.callee,false);else{var r=q.getAttribute('onpageshow');q.setAttribute('onpageshow',(r?r+';':'')+'event.persisted && (function(){'+'var allInstances = CKEDITOR.instances, editor, doc;'+'for ( var i in allInstances )'+'{'+'\teditor = allInstances[ i ];'+'\tdoc = editor.document;'+'\tif ( doc )'+'\t{'+'\t\tdoc.$.designMode = "off";'+'\t\tdoc.$.designMode = "on";'+'\t}'+'}'+'})();');}})();})();CKEDITOR.config.disableObjectResizing=false;CKEDITOR.config.disableNativeTableHandles=true;CKEDITOR.config.disableNativeSpellChecker=true;CKEDITOR.config.ignoreEmptyParagraph=true;
