From f0610347140239143439a511ee2bd48cb784f470 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Mon, 26 Sep 2011 00:59:23 -0400 Subject: [PATCH] vanilla ckeditor-3.6.1 --- CHANGES.html | 72 ++++++ LICENSE.html | 9 +- _samples/autogrow.html | 10 +- _samples/bbcode.html | 13 +- _samples/output_xhtml.html | 12 +- _samples/readonly.html | 6 +- _source/core/ckeditor_base.js | 8 +- _source/core/dom/element.js | 20 +- _source/core/dom/elementpath.js | 4 +- _source/core/dom/event.js | 15 +- _source/core/dom/node.js | 59 ++--- _source/core/dtd.js | 59 +++-- _source/core/editor.js | 240 ++++++++++--------- _source/core/env.js | 11 +- _source/core/htmlparser/element.js | 59 +++++ _source/core/htmlparser/fragment.js | 15 +- _source/core/loader.js | 2 +- _source/core/tools.js | 33 ++- _source/lang/_translationstatus.txt | 116 +++++----- _source/lang/af.js | 66 +++--- _source/lang/ar.js | 70 +++--- _source/lang/bg.js | 56 ++--- _source/lang/bn.js | 56 ++--- _source/lang/bs.js | 10 +- _source/lang/ca.js | 68 +++--- _source/lang/cs.js | 70 +++--- _source/lang/cy.js | 280 ++++++++++++----------- _source/lang/da.js | 64 +++--- _source/lang/de.js | 108 ++++----- _source/lang/el.js | 74 +++--- _source/lang/en-au.js | 6 +- _source/lang/en-ca.js | 6 +- _source/lang/en-gb.js | 6 +- _source/lang/en.js | 10 +- _source/lang/eo.js | 56 ++--- _source/lang/es.js | 6 +- _source/lang/et.js | 72 +++--- _source/lang/eu.js | 66 +++--- _source/lang/fa.js | 74 +++--- _source/lang/fi.js | 70 +++--- _source/lang/fo.js | 70 +++--- _source/lang/fr-ca.js | 70 +++--- _source/lang/fr.js | 72 +++--- _source/lang/gl.js | 52 +++-- _source/lang/gu.js | 74 +++--- _source/lang/he.js | 10 +- _source/lang/hi.js | 74 +++--- _source/lang/hr.js | 68 +++--- _source/lang/hu.js | 70 +++--- _source/lang/is.js | 72 +++--- _source/lang/it.js | 66 +++--- _source/lang/ja.js | 56 ++--- _source/lang/ka.js | 6 +- _source/lang/km.js | 56 ++--- _source/lang/ko.js | 56 ++--- _source/lang/lt.js | 74 +++--- _source/lang/lv.js | 56 ++--- _source/lang/mn.js | 74 +++--- _source/lang/ms.js | 56 ++--- _source/lang/nb.js | 68 +++--- _source/lang/nl.js | 124 +++++----- _source/lang/no.js | 68 +++--- _source/lang/pl.js | 20 +- _source/lang/pt-br.js | 68 +++--- _source/lang/pt.js | 56 ++--- _source/lang/ro.js | 66 +++--- _source/lang/ru.js | 72 +++--- _source/lang/sk.js | 68 +++--- _source/lang/sl.js | 70 +++--- _source/lang/sr-latn.js | 56 ++--- _source/lang/sr.js | 56 ++--- _source/lang/sv.js | 70 +++--- _source/lang/th.js | 56 ++--- _source/lang/tr.js | 70 +++--- _source/lang/uk.js | 72 +++--- _source/lang/vi.js | 70 +++--- _source/lang/zh-cn.js | 70 +++--- _source/lang/zh.js | 68 +++--- _source/plugins/bbcode/plugin.js | 17 +- _source/plugins/bidi/plugin.js | 9 +- _source/plugins/button/plugin.js | 11 +- _source/plugins/clipboard/plugin.js | 7 + _source/plugins/colorbutton/plugin.js | 3 +- _source/plugins/dialog/dialogDefinition.js | 157 +++++++++---- _source/plugins/dialog/plugin.js | 160 ++++++++----- _source/plugins/dialogadvtab/plugin.js | 4 +- _source/plugins/dialogui/plugin.js | 30 +-- _source/plugins/docprops/dialogs/docprops.js | 16 +- _source/plugins/editingblock/plugin.js | 10 +- _source/plugins/enterkey/plugin.js | 20 +- _source/plugins/fakeobjects/plugin.js | 189 +++++++++------ _source/plugins/find/dialogs/find.js | 8 + _source/plugins/flash/dialogs/flash.js | 45 +--- _source/plugins/flash/plugin.js | 16 +- _source/plugins/floatpanel/plugin.js | 37 ++- _source/plugins/forms/dialogs/select.js | 4 - _source/plugins/horizontalrule/plugin.js | 14 +- _source/plugins/iframe/dialogs/iframe.js | 42 +--- _source/plugins/iframe/plugin.js | 21 +- _source/plugins/image/dialogs/image.js | 17 +- _source/plugins/link/dialogs/link.js | 36 ++- _source/plugins/link/plugin.js | 42 +++- _source/plugins/list/plugin.js | 39 ++-- _source/plugins/listblock/plugin.js | 23 +- _source/plugins/liststyle/dialogs/liststyle.js | 27 ++- _source/plugins/menu/plugin.js | 64 ++++-- _source/plugins/pagebreak/plugin.js | 2 +- _source/plugins/panel/plugin.js | 3 +- _source/plugins/panelbutton/plugin.js | 204 ++++++++--------- _source/plugins/pastefromword/filter/default.js | 87 ++++--- _source/plugins/richcombo/plugin.js | 9 +- _source/plugins/selection/plugin.js | 40 +++- _source/plugins/showborders/plugin.js | 2 +- _source/plugins/styles/plugin.js | 34 ++- _source/plugins/stylescombo/plugin.js | 1 - _source/plugins/stylesheetparser/plugin.js | 17 +- _source/plugins/table/dialogs/table.js | 176 +++++--------- _source/plugins/tableresize/plugin.js | 17 +- _source/plugins/tabletools/plugin.js | 25 +- _source/plugins/wysiwygarea/plugin.js | 46 ++-- _source/skins/kama/dialog.css | 23 ++ _source/skins/office2003/dialog.css | 18 ++ _source/skins/v2/dialog.css | 19 ++ _source/themes/default/theme.js | 5 +- ckeditor.asp | 6 +- ckeditor.js | 256 +++++++++++---------- ckeditor.pack | 6 +- ckeditor_basic.js | 6 +- ckeditor_basic_source.js | 2 +- ckeditor_php4.php | 6 +- ckeditor_php5.php | 6 +- ckeditor_source.js | 2 +- contents.css | 4 +- lang/_translationstatus.txt | 116 +++++----- lang/af.js | 2 +- lang/ar.js | 2 +- lang/bg.js | 2 +- lang/bn.js | 2 +- lang/bs.js | 2 +- lang/ca.js | 2 +- lang/cs.js | 2 +- lang/cy.js | 2 +- lang/da.js | 2 +- lang/de.js | 2 +- lang/el.js | 2 +- lang/en-au.js | 2 +- lang/en-ca.js | 2 +- lang/en-gb.js | 2 +- lang/en.js | 2 +- lang/eo.js | 2 +- lang/es.js | 2 +- lang/et.js | 2 +- lang/eu.js | 2 +- lang/fa.js | 2 +- lang/fi.js | 2 +- lang/fo.js | 2 +- lang/fr-ca.js | 2 +- lang/fr.js | 2 +- lang/gl.js | 2 +- lang/gu.js | 2 +- lang/he.js | 2 +- lang/hi.js | 2 +- lang/hr.js | 2 +- lang/hu.js | 2 +- lang/is.js | 2 +- lang/it.js | 2 +- lang/ja.js | 2 +- lang/ka.js | 2 +- lang/km.js | 2 +- lang/ko.js | 2 +- lang/lt.js | 2 +- lang/lv.js | 2 +- lang/mn.js | 2 +- lang/ms.js | 2 +- lang/nb.js | 2 +- lang/nl.js | 2 +- lang/no.js | 2 +- lang/pl.js | 2 +- lang/pt-br.js | 2 +- lang/pt.js | 2 +- lang/ro.js | 2 +- lang/ru.js | 2 +- lang/sk.js | 2 +- lang/sl.js | 2 +- lang/sr-latn.js | 2 +- lang/sr.js | 2 +- lang/sv.js | 2 +- lang/th.js | 2 +- lang/tr.js | 2 +- lang/uk.js | 2 +- lang/vi.js | 2 +- lang/zh-cn.js | 2 +- lang/zh.js | 2 +- plugins/bbcode/plugin.js | 8 +- plugins/docprops/dialogs/docprops.js | 2 +- plugins/find/dialogs/find.js | 3 +- plugins/flash/dialogs/flash.js | 8 +- plugins/forms/dialogs/select.js | 4 +- plugins/iframe/dialogs/iframe.js | 4 +- plugins/image/dialogs/image.js | 10 +- plugins/link/dialogs/link.js | 11 +- plugins/liststyle/dialogs/liststyle.js | 3 +- plugins/pastefromword/filter/default.js | 10 +- plugins/table/dialogs/table.js | 8 +- plugins/tableresize/plugin.js | 4 +- skins/kama/dialog.css | 7 +- skins/office2003/dialog.css | 6 +- skins/v2/dialog.css | 6 +- themes/default/theme.js | 2 +- 209 files changed, 3791 insertions(+), 3086 deletions(-) diff --git a/CHANGES.html b/CHANGES.html index d015d2e..9cb20e6 100644 --- a/CHANGES.html +++ b/CHANGES.html @@ -35,6 +35,78 @@ For licensing, see LICENSE.html or http://ckeditor.com/license CKEditor Changelog

+ CKEditor 3.6.1

+

+ New features:

+ +

+ Fixed issues:

+ +

CKEditor 3.6

New features:

diff --git a/LICENSE.html b/LICENSE.html index b049b25..9022242 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -28,9 +28,7 @@ You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your -license choice. In any case, your choice will not restrict any -recipient of your version of this software to use, reproduce, modify -and distribute this software under any of the above licenses. +license choice. Sources of Intellectual Property Included in CKEditor ===================================================== @@ -40,11 +38,6 @@ CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission. -YUI Test: At _source/tests/yuitest.js can be found part of the source -code of YUI, which is licensed under the terms of the BSD License -(http://developer.yahoo.com/yui/license.txt). YUI is Copyright (C) -2008, Yahoo! Inc. - Trademarks ========== diff --git a/_samples/autogrow.html b/_samples/autogrow.html index e5ac0e0..560474f 100644 --- a/_samples/autogrow.html +++ b/_samples/autogrow.html @@ -37,7 +37,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
CKEDITOR.replace( 'textarea_id',
 	{
 		extraPlugins : 'autogrow',
-		autoGrow_maxHeight : 800
+		autoGrow_maxHeight : 800,
+		// Remove the resize plugin, as it doesn't make sense to use it in conjunction with the AutoGrow plugin.
+		removePlugins : 'resize'
 	});

Note that textarea_id in the code above is the id attribute of @@ -64,7 +66,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // @@ -79,7 +82,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license CKEDITOR.replace( 'editor2', { extraPlugins : 'autogrow', - autoGrow_maxHeight : 400 + autoGrow_maxHeight : 400, + removePlugins : 'resize' }); //]]> diff --git a/_samples/bbcode.html b/_samples/bbcode.html index 14a0344..6dafd02 100644 --- a/_samples/bbcode.html +++ b/_samples/bbcode.html @@ -34,7 +34,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license CKEDITOR.replace( 'editor1', { extraPlugins : 'bbcode', - removePlugins : 'bidi,button,dialogadvtab,div,filebrowser,flash,format,forms,horizontalrule,iframe,indent,justify,liststyle,pagebreak,showborders,stylescombo,table,tabletools,templates', toolbar : [ ['Source', '-', 'Save','NewPage','-','Undo','Redo'], @@ -45,17 +44,7 @@ CKEDITOR.replace( 'editor1', ['NumberedList','BulletedList','-','Blockquote'], ['TextColor', '-', 'Smiley','SpecialChar', '-', 'Maximize'] ], - smiley_images : - [ - 'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','tounge_smile.gif', - 'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angel_smile.gif','shades_smile.gif', - 'cry_smile.gif','kiss.gif' - ], - smiley_descriptions : - [ - 'smiley', 'sad', 'wink', 'laugh', 'cheeky', 'blush', 'surprise', - 'indecision', 'angel', 'cool', 'crying', 'kiss' - ] + ... some other configurations omitted here }); diff --git a/_samples/output_xhtml.html b/_samples/output_xhtml.html index f65cd0b..2fcd5b2 100644 --- a/_samples/output_xhtml.html +++ b/_samples/output_xhtml.html @@ -94,8 +94,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license font_style : { element : 'span', - attributes : { 'class' : '#(family)' }, - overrides : [ { element : 'span', attributes : { 'class' : /^Font(?:Comic|Courier|Times)$/ } } ] + attributes : { 'class' : '#(family)' } }, /* @@ -105,8 +104,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license fontSize_style : { element : 'span', - attributes : { 'class' : '#(size)' }, - overrides : [ { element : 'span', attributes : { 'class' : /^Font(?:Smaller|Larger|Small|Big|Double)$/ } } ] + attributes : { 'class' : '#(size)' } } , /* @@ -118,15 +116,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license colorButton_foreStyle : { element : 'span', - attributes : { 'class' : '#(color)' }, - overrides : [ { element : 'span', attributes : { 'class' : /^FontColor(?:1|2|3)$/ } } ] + attributes : { 'class' : '#(color)' } }, colorButton_backStyle : { element : 'span', - attributes : { 'class' : '#(color)BG' }, - overrides : [ { element : 'span', attributes : { 'class' : /^FontColor(?:1|2|3)BG$/ } } ] + attributes : { 'class' : '#(color)BG' } }, /* diff --git a/_samples/readonly.html b/_samples/readonly.html index 283b294..8b6c3a8 100644 --- a/_samples/readonly.html +++ b/_samples/readonly.html @@ -32,11 +32,11 @@ CKEDITOR.on( 'instanceReady', function( ev ) }); }); -function toggleReadOnly( makeEditable ) +function toggleReadOnly( isReadOnly ) { // Change the read-only state of the editor. // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#setReadOnly - editor.setReadOnly( makeEditable ); + editor.setReadOnly( isReadOnly ); } //]]> @@ -74,7 +74,7 @@ function toggleReadOnly( makeEditable )

- +

');if(o.config.toolbarCanCollapse){var K=e.addFunction(function(){o.execCommand('toolbarCollapse');});o.on('destroy',function(){e.removeFunction(K);});var L=e.getNextId();o.addCommand('toolbarCollapse',{readOnly:1,exec:function(M){var N=a.document.getById(L),O=N.getPrevious(),P=M.getThemeSpace('contents'),Q=O.getParent(),R=parseInt(P.$.style.height,10),S=Q.$.offsetHeight,T=!O.isVisible();if(!T){O.hide();N.addClass('cke_toolbox_collapser_min');N.setAttribute('title',M.lang.toolbarExpand);}else{O.show();N.removeClass('cke_toolbox_collapser_min');N.setAttribute('title',M.lang.toolbarCollapse);}N.getFirst().setText(T?'▲':'◀');var U=Q.$.offsetHeight-S;P.setStyle('height',R-U+'px');M.fire('resize');},modes:{wysiwyg:1,source:1}});t.push('','','');}r.data.html+=t.join('');}});o.on('destroy',function(){var r,s=0,t,u,v;r=this.toolbox.toolbars;for(;s');return{};}};}});}});})();a.UI_SEPARATOR='separator';i.toolbarLocation='top';i.toolbar_Basic=[['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink','-','About']];i.toolbar_Full=[{name:'document',items:['Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates']},{name:'clipboard',items:['Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo']},{name:'editing',items:['Find','Replace','-','SelectAll','-','SpellChecker','Scayt']},{name:'forms',items:['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField']},'/',{name:'basicstyles',items:['Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat']},{name:'paragraph',items:['NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl']},{name:'links',items:['Link','Unlink','Anchor']},{name:'insert',items:['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe']},'/',{name:'styles',items:['Styles','Format','Font','FontSize']},{name:'colors',items:['TextColor','BGColor']},{name:'tools',items:['Maximize','ShowBlocks','-','About']}];i.toolbar='Full';i.toolbarCanCollapse=true;(function(){j.add('undo',{requires:['selection','wysiwygarea'],init:function(s){var t=new o(s),u=s.addCommand('undo',{exec:function(){if(t.undo()){s.selectionChange();this.fire('afterUndo');}},state:0,canUndo:false}),v=s.addCommand('redo',{exec:function(){if(t.redo()){s.selectionChange();this.fire('afterRedo');}},state:0,canUndo:false});t.onChange=function(){u.setState(t.undoable()?2:0);v.setState(t.redoable()?2:0);};function w(x){if(t.enabled&&x.data.command.canUndo!==false)t.save();};s.on('beforeCommandExec',w);s.on('afterCommandExec',w);s.on('saveSnapshot',function(){t.save();});s.on('contentDom',function(){s.document.on('keydown',function(x){if(!x.data.$.ctrlKey&&!x.data.$.metaKey)t.type(x);});});s.on('beforeModeUnload',function(){s.mode=='wysiwyg'&&t.save(true);});s.on('mode',function(){t.enabled=s.readOnly?false:s.mode=='wysiwyg';t.onChange();});s.ui.addButton('Undo',{label:s.lang.undo,command:'undo'});s.ui.addButton('Redo',{label:s.lang.redo,command:'redo'});s.resetUndo=function(){t.reset(); s.fire('saveSnapshot');};s.on('updateSnapshot',function(){if(t.currentImage&&new m(s).equals(t.currentImage))setTimeout(function(){t.update();},0);});}});j.undo={};var m=j.undo.Image=function(s){this.editor=s;s.fire('beforeUndoImage');var t=s.getSnapshot(),u=t&&s.getSelection();c&&t&&(t=t.replace(/\s+data-cke-expando=".*?"/g,''));this.contents=t;this.bookmarks=u&&u.createBookmarks2(true);s.fire('afterUndoImage');},n=/\b(?:href|src|name)="[^"]*?"/gi;m.prototype={equals:function(s,t){var u=this.contents,v=s.contents;if(c&&(b.ie7Compat||b.ie6Compat)){u=u.replace(n,'');v=v.replace(n,'');}if(u!=v)return false;if(t)return true;var w=this.bookmarks,x=s.bookmarks;if(w||x){if(!w||!x||w.length!=x.length)return false;for(var y=0;y25){this.save(false,null,false);this.modifiersCount=1;}}else if(!y){this.modifiersCount=0;this.typesCount++;if(this.typesCount>25){this.save(false,null,false);this.typesCount=1;}}},reset:function(){var s=this;s.lastKeystroke=0;s.snapshots=[];s.index=-1;s.limit=s.editor.config.undoStackSize||20;s.currentImage=null;s.hasUndo=false;s.hasRedo=false;s.resetType();},resetType:function(){var s=this;s.typing=false;delete s.lastKeystroke;s.typesCount=0;s.modifiersCount=0;},fireChange:function(){var s=this;s.hasUndo=!!s.getNextImage(true);s.hasRedo=!!s.getNextImage(false);s.resetType();s.onChange();},save:function(s,t,u){var w=this;var v=w.snapshots;if(!t)t=new m(w.editor);if(t.contents===false)return false;if(w.currentImage&&t.equals(w.currentImage,s))return false;v.splice(w.index+1,v.length-w.index-1);if(v.length==w.limit)v.shift(); -w.index=v.push(t)-1;w.currentImage=t;if(u!==false)w.fireChange();return true;},restoreImage:function(s){var u=this;u.editor.loadSnapshot(s.contents);if(s.bookmarks)u.editor.getSelection().selectBookmarks(s.bookmarks);else if(c){var t=u.editor.document.getBody().$.createTextRange();t.collapse(true);t.select();}u.index=s.index;u.update();u.fireChange();},getNextImage:function(s){var x=this;var t=x.snapshots,u=x.currentImage,v,w;if(u)if(s)for(w=x.index-1;w>=0;w--){v=t[w];if(!u.equals(v,true)){v.index=w;return v;}}else for(w=x.index+1;w]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,n=d.walker.whitespaces(true);function o(C){return C.isBlockBoundary()&&f.$empty[C.getName()];};function p(C){return function(D){if(this.mode=='wysiwyg'){this.focus();this.fire('saveSnapshot');C.call(this,D.data);e.setTimeout(function(){this.fire('saveSnapshot');},0,this);}};};function q(C){var I=this;if(I.dataProcessor)C=I.dataProcessor.toHtml(C);var D=I.getSelection(),E=D.getRanges()[0];if(E.checkReadOnly())return;if(c){var F=D.isLocked;if(F)D.unlock();var G=D.getNative();if(G.type=='Control')G.clear();else if(D.getType()==2){E=D.getRanges()[0];var H=E&&E.endContainer;if(H&&H.type==1&&H.getAttribute('contenteditable')=='false'&&E.checkBoundaryOfElement(H,2)){E.setEndAfter(E.endContainer);E.deleteContents();}}try{G.createRange().pasteHTML(C);}catch(J){}if(F)I.getSelection().lock();}else I.document.$.execCommand('inserthtml',false,C);if(b.webkit){D=I.getSelection();D.scrollIntoView();}};function r(C){var D=this.getSelection(),E=D.getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,F=E==2,G=e.htmlEncode(C.replace(/\r\n|\r/g,'\n'));G=G.replace(/^[ \t]+|[ \t]+$/g,function(M,N,O){if(M.length==1)return ' ';else if(!N)return e.repeat(' ',M.length-1)+' ';else return ' '+e.repeat(' ',M.length-1); -});G=G.replace(/[ \t]{2,}/g,function(M){return e.repeat(' ',M.length-1)+' ';});var H=E==1?'p':'div';if(!F)G=G.replace(/(\n{2})([\s\S]*?)(?:$|\1)/g,function(M,N,O){return '<'+H+'>'+O+'';});G=G.replace(/\n/g,'
');if(!(F||c))G=G.replace(new RegExp('
(?=)'),function(M){return e.repeat(M,2);});if(b.gecko||b.webkit){var I=new d.elementPath(D.getStartElement()),J=[];for(var K=0;K/));else if(L in f.$block)break;}G=J.join('')+G;}q.call(this,G);};function s(C){var D=this.getSelection(),E=D.getRanges(),F=C.getName(),G=f.$block[F],H=D.isLocked;if(H)D.unlock();var I,J,K,L;for(var M=E.length-1;M>=0;M--){I=E[M];if(!I.checkReadOnly()){I.deleteContents(1);J=!M&&C||C.clone(1);var N,O;if(G)while((N=I.getCommonAncestor(0,1))&&(O=f[N.getName()])&&!(O&&O[F])){if(N.getName() in f.span)I.splitElement(N);else if(I.checkStartOfBlock()&&I.checkEndOfBlock()){I.setStartBefore(N);I.collapse(true);N.remove();}else I.splitBlock();}I.insertNode(J);if(!K)K=J;}}if(K){I.moveToPosition(K,4);if(G){var P=K.getNext(n),Q=P&&P.type==1&&P.getName();if(Q&&f.$block[Q]&&f[Q]['#'])I.moveToElementEditStart(P);}}D.selectRanges([I]);if(H)this.getSelection().lock();};function t(C){if(!C.checkDirty())setTimeout(function(){C.resetDirty();},0);};var u=d.walker.whitespaces(true),v=d.walker.bookmark(false,true);function w(C){return u(C)&&v(C);};function x(C){return C.type==3&&e.trim(C.getText()).match(/^(?: |\xa0)$/);};function y(C){if(C.isLocked){C.unlock();setTimeout(function(){C.lock();},0);}};function z(C){return C.getOuterHtml().match(m);};u=d.walker.whitespaces(true);function A(C){var D=C.window,E=C.document,F=C.document.getBody(),G=F.getFirst(),H=F.getChildren().count();if(!H||H==1&&G.type==1&&G.hasAttribute('_moz_editor_bogus_node')){t(C);var I=C.element.getDocument(),J=I.getDocumentElement(),K=J.$.scrollTop,L=J.$.scrollLeft,M=E.$.createEvent('KeyEvents');M.initKeyEvent('keypress',true,true,D.$,false,false,false,false,0,32);E.$.dispatchEvent(M);if(K!=J.$.scrollTop||L!=J.$.scrollLeft)I.getWindow().$.scrollTo(L,K);H&&F.getFirst().remove();E.getBody().appendBogus();var N=new d.range(E);N.setStartAt(F,1);N.select();}};function B(C){var D=C.editor,E=C.data.path,F=E.blockLimit,G=C.data.selection,H=G.getRanges()[0],I=D.document.getBody(),J=D.config.enterMode;if(b.gecko){A(D);var K=E.block||E.blockLimit,L=K&&K.getLast(w);if(K&&K.isBlockBoundary()&&!(L&&L.type==1&&L.isBlockBoundary())&&!K.is('pre')&&!K.getBogus()){D.fire('updateSnapshot'); -t(D);K.appendBogus();}}if(D.config.autoParagraph!==false&&J!=2&&H.collapsed&&F.getName()=='body'&&!E.block){D.fire('updateSnapshot');t(D);c&&y(G);var M=H.fixBlock(true,D.config.enterMode==3?'div':'p');if(c){var N=M.getFirst(w);N&&x(N)&&N.remove();}if(z(M)){var O=M.getNext(u);if(O&&O.type==1&&!o(O)){H.moveToElementEditStart(O);M.remove();}else{O=M.getPrevious(u);if(O&&O.type==1&&!o(O)){H.moveToElementEditEnd(O);M.remove();}}}H.select();C.cancel();}var P=new d.range(D.document);P.moveToElementEditEnd(D.document.getBody());var Q=new d.elementPath(P.startContainer);if(!Q.blockLimit.is('body')){D.fire('updateSnapshot');t(D);c&&y(G);var R;if(J!=2)R=I.append(D.document.createElement(J==1?'p':'div'));else R=I;if(!c)R.appendBogus();}};j.add('wysiwygarea',{requires:['editingblock'],init:function(C){var D=C.config.enterMode!=2&&C.config.autoParagraph!==false?C.config.enterMode==3?'div':'p':false,E=C.lang.editorTitle.replace('%1',C.name),F;C.on('editingBlockReady',function(){var L,M,N,O,P,Q,R=b.isCustomDomain(),S=function(V){if(M)M.remove();var W='document.open();'+(R?'document.domain="'+document.domain+'";':'')+'document.close();';W=b.air?'javascript:void(0)':c?'javascript:void(function(){'+encodeURIComponent(W)+'}())':'';M=h.createFromHtml('');if(document.location.protocol=='chrome:')a.event.useCapture=true;M.on('load',function(aa){P=1;aa.removeListener();var ab=M.getFrameDocument();ab.write(V);b.air&&U(ab.getWindow().$);});if(document.location.protocol=='chrome:')a.event.useCapture=false;var X=C.element,Y=b.gecko&&!X.isVisible(),Z={};if(Y){X.show();Z={position:X.getStyle('position'),top:X.getStyle('top')};X.setStyles({position:'absolute',top:'-3000px'});}L.append(M);if(Y)setTimeout(function(){X.hide();X.setStyles(Z);},1000);};F=e.addFunction(U);var T='';function U(V){if(!P)return;P=0;C.fire('ariaWidget',M);var W=V.document,X=W.body,Y=W.getElementById('cke_actscrpt');Y&&Y.parentNode.removeChild(Y);X.spellcheck=!C.config.disableNativeSpellChecker;var Z=!C.readOnly;if(c){X.hideFocus=true;X.disabled=true;X.contentEditable=Z;X.removeAttribute('disabled');}else setTimeout(function(){if(b.gecko&&b.version>=10900||b.opera)W.$.body.contentEditable=Z; -else if(b.webkit)W.$.body.parentNode.contentEditable=Z;else W.$.designMode=Z?'off':'on';},0);Z&&b.gecko&&e.setTimeout(A,0,null,C);V=C.window=new d.window(V);W=C.document=new g(W);Z&&W.on('dblclick',function(af){var ag=af.data.getTarget(),ah={element:ag,dialog:''};C.fire('doubleclick',ah);ah.dialog&&C.openDialog(ah.dialog);});c&&W.on('click',function(af){var ag=af.data.getTarget();if(ag.is('input')){var ah=ag.getAttribute('type');if(ah=='submit'||ah=='reset')af.data.preventDefault();}});if(!(c||b.opera))W.on('mousedown',function(af){var ag=af.data.getTarget();if(ag.is('img','hr','input','textarea','select'))C.getSelection().selectElement(ag);});if(b.gecko)W.on('mouseup',function(af){if(af.data.$.button==2){var ag=af.data.getTarget();if(!ag.getOuterHtml().replace(m,'')){var ah=new d.range(W);ah.moveToElementEditStart(ag);ah.select(true);}}});W.on('click',function(af){af=af.data;if(af.getTarget().is('a')&&af.$.button!=2)af.preventDefault();});if(b.webkit){W.on('mousedown',function(){ac=1;});W.on('click',function(af){if(af.data.getTarget().is('input','select'))af.data.preventDefault();});W.on('mouseup',function(af){if(af.data.getTarget().is('input','textarea'))af.data.preventDefault();});}if(Z&&c&&W.$.compatMode=='CSS1Compat'||b.gecko||b.opera){var aa=W.getDocumentElement();aa.on('mousedown',function(af){if(af.data.getTarget().equals(aa)){if(b.gecko&&b.version>=10900)J();K.focus();}});}var ab=c?M:V;ab.on('blur',function(){C.focusManager.blur();});var ac;ab.on('focus',function(){var af=C.document;if(Z&&b.gecko&&b.version>=10900)J();else if(b.opera)af.getBody().focus();else if(b.webkit)if(!ac){C.document.getDocumentElement().focus();ac=1;}C.focusManager.focus();});var ad=C.keystrokeHandler;ad.blockedKeystrokes[8]=!Z;ad.attach(W);if(c){W.getDocumentElement().addClass(W.$.compatMode);Z&&W.on('keydown',function(af){var ag=af.data.getKeystroke();if(ag in {8:1,46:1}){var ah=C.getSelection(),ai=ah.getSelectedElement();if(ai){C.fire('saveSnapshot');var aj=ah.getRanges()[0].createBookmark();ai.remove();ah.selectBookmarks([aj]);C.fire('saveSnapshot');af.data.preventDefault();}}});if(W.$.compatMode=='CSS1Compat'){var ae={33:1,34:1};W.on('keydown',function(af){if(af.data.getKeystroke() in ae)setTimeout(function(){C.getSelection().scrollIntoView();},0);});}C.config.enterMode!=1&&W.on('selectionchange',function(){var af=W.getBody(),ag=C.getSelection().getRanges()[0];if(af.getHtml().match(/^

 <\/p>$/i)&&ag.startContainer.equals(af))setTimeout(function(){ag=C.getSelection().getRanges()[0]; -if(!ag.startContainer.equals('body')){af.getFirst().remove(1);ag.moveToElementEditEnd(af);ag.select(1);}},0);});}if(C.contextMenu)C.contextMenu.addTarget(W,C.config.browserContextMenuOnCtrl!==false);setTimeout(function(){C.fire('contentDom');if(Q){C.mode='wysiwyg';C.fire('mode');Q=false;}N=false;if(O){C.focus();O=false;}setTimeout(function(){C.fire('dataReady');},0);try{C.document.$.execCommand('enableInlineTableEditing',false,!C.config.disableNativeTableHandles);}catch(af){}if(C.config.disableObjectResizing)try{C.document.$.execCommand('enableObjectResizing',false,false);}catch(ag){C.document.getBody().on(c?'resizestart':'resize',function(ah){ah.data.preventDefault();});}if(c)setTimeout(function(){if(C.document){var ah=C.document.$.body;ah.runtimeStyle.marginBottom='0px';ah.runtimeStyle.marginBottom='';}},1000);},0);};C.addMode('wysiwyg',{load:function(V,W,X){L=V;if(c&&b.quirks)V.setStyle('position','relative');C.mayBeDirty=true;Q=true;if(X)this.loadSnapshotData(W);else this.loadData(W);},loadData:function(V){N=true;C._.dataStore={id:1};var W=C.config,X=W.fullPage,Y=W.docType,Z='';!X&&(Z=e.buildStyleHtml(C.config.contentsCss)+Z);var aa=W.baseHref?'':'';if(X)V=V.replace(/]*>/i,function(ab){C.docType=Y=ab;return '';}).replace(/<\?xml\s[^\?]*\?>/i,function(ab){C.xmlDeclaration=ab;return '';});if(C.dataProcessor)V=C.dataProcessor.toHtml(V,D);if(X){if(!/]/.test(V))V=''+V;if(!/]/.test(V))V=''+V+'';if(!/]/.test(V))V=V.replace(/]*>/,'$&');else if(!/]/.test(V))V=V.replace(/]*>/,'$&');aa&&(V=V.replace(//,'$&'+aa));V=V.replace(/<\/head\s*>/,Z+'$&');V=Y+V;}else V=W.docType+''+''+''+E+''+aa+Z+''+''+V+'';if(b.gecko)V=V.replace(/
(?=\s*<\/(:?html|body)>)/,'$&
');V+=T;this.onDispose();S(V);},getData:function(){var V=C.config,W=V.fullPage,X=W&&C.docType,Y=W&&C.xmlDeclaration,Z=M.getFrameDocument(),aa=W?Z.getDocumentElement().getOuterHtml():Z.getBody().getHtml();if(b.gecko)aa=aa.replace(/
(?=\s*(:?$|<\/body>))/,'');if(C.dataProcessor)aa=C.dataProcessor.toDataFormat(aa,D);if(V.ignoreEmptyParagraph)aa=aa.replace(m,function(ab,ac){return ac; -});if(Y)aa=Y+'\n'+aa;if(X)aa=X+'\n'+aa;return aa;},getSnapshotData:function(){return M.getFrameDocument().getBody().getHtml();},loadSnapshotData:function(V){M.getFrameDocument().getBody().setHtml(V);},onDispose:function(){if(!C.document)return;C.document.getDocumentElement().clearCustomData();C.document.getBody().clearCustomData();C.window.clearCustomData();C.document.clearCustomData();M.clearCustomData();M.remove();},unload:function(V){this.onDispose();C.window=C.document=M=L=O=null;C.fire('contentDomUnload');},focus:function(){var V=C.window;if(N)O=true;else if(b.opera&&C.document){var W=C.window.$.frameElement;W.blur(),W.focus();C.document.getBody().focus();C.selectionChange();}else if(!b.opera&&V){b.air?setTimeout(function(){V.focus();},0):V.focus();C.selectionChange();}}});C.on('insertHtml',p(q),null,null,20);C.on('insertElement',p(s),null,null,20);C.on('insertText',p(r),null,null,20);C.on('selectionChange',B,null,null,1);});var G;C.on('contentDom',function(){var L=C.document.getElementsByTag('title').getItem(0);L.data('cke-title',C.document.$.title);C.document.$.title=E;});C.on('readOnly',function(){if(C.mode=='wysiwyg'){var L=C.getMode();L.loadData(L.getData());}});if(a.document.$.documentMode>=8){C.addCss('html.CSS1Compat [contenteditable=false]{ min-height:0 !important;}');var H=[];for(var I in f.$removeEmpty)H.push('html.CSS1Compat '+I+'[contenteditable=false]');C.addCss(H.join(',')+'{ display:inline-block;}');}else if(b.gecko){C.addCss('html { height: 100% !important; }');C.addCss('img:-moz-broken { -moz-force-broken-image-icon : 1;\twidth : 24px; height : 24px; }');}C.addCss('html {\t_overflow-y: scroll; cursor: text;\t*cursor:auto;}');C.addCss('img, input, textarea { cursor: default;}');function J(L){if(C.readOnly)return;e.tryThese(function(){C.document.$.designMode='on';setTimeout(function(){C.document.$.designMode='off';if(a.currentInstance==C)C.document.getBody().focus();},50);},function(){C.document.$.designMode='off';var M=C.document.getBody();M.setAttribute('contentEditable',false);M.setAttribute('contentEditable',true);!L&&J(1);});};if(b.gecko||c||b.opera){var K;C.on('uiReady',function(){K=C.container.append(h.createFromHtml(''));K.on('focus',function(){C.focus();});C.focusGrabber=K;});C.on('destroy',function(){e.removeFunction(F);K.clearCustomData();delete C.focusGrabber;});}C.on('insertElement',function(L){var M=L.data;if(M.type==1&&(M.is('input')||M.is('textarea'))){if(!M.isReadOnly())M.data('cke-editable',M.hasAttribute('contenteditable')?'true':'1'); -M.setAttribute('contentEditable',false);}});}});if(b.gecko)(function(){var C=document.body;if(!C)window.addEventListener('load',arguments.callee,false);else{var D=C.getAttribute('onpageshow');C.setAttribute('onpageshow',(D?D+';':'')+'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}'+'}'+'})();');}})();})();i.disableObjectResizing=false;i.disableNativeTableHandles=true;i.disableNativeSpellChecker=true;i.ignoreEmptyParagraph=true;j.add('wsc',{requires:['dialog'],init:function(m){var n='checkspell',o=m.addCommand(n,new a.dialogCommand(n));o.modes={wysiwyg:!b.opera&&!b.air&&document.domain==window.location.hostname};m.ui.addButton('SpellChecker',{label:m.lang.spellCheck.toolbar,command:n});a.dialog.add(n,this.path+'dialogs/wsc.js');}});i.wsc_customerId=i.wsc_customerId||'1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk';i.wsc_customLoaderScript=i.wsc_customLoaderScript||null;a.DIALOG_RESIZE_NONE=0;a.DIALOG_RESIZE_WIDTH=1;a.DIALOG_RESIZE_HEIGHT=2;a.DIALOG_RESIZE_BOTH=3;(function(){var m=e.cssLength;function n(Q){return!!this._.tabs[Q][0].$.offsetHeight;};function o(){var U=this;var Q=U._.currentTabId,R=U._.tabIdList.length,S=e.indexOf(U._.tabIdList,Q)+R;for(var T=S-1;T>S-R;T--){if(n.call(U,U._.tabIdList[T%R]))return U._.tabIdList[T%R];}return null;};function p(){var U=this;var Q=U._.currentTabId,R=U._.tabIdList.length,S=e.indexOf(U._.tabIdList,Q);for(var T=S+1;T1){ad._.tabBarMode=true;ad._.tabs[ad._.currentTabId][0].focus();ah=1;}else if((aq==37||aq==39)&&ad._.tabBarMode){at=aq==(ar?39:37)?o.call(ad):p.call(ad);ad.selectPage(at);ad._.tabs[at][0].focus();ah=1;}else if((aq==13||aq==32)&&ad._.tabBarMode){au.selectPage(au._.currentTabId);au._.tabBarMode=false;au._.currentFocusIndex=-1;ag(true);ah=1;}if(ah){ap.stop();ap.data.preventDefault();}};function aj(ap){ah&&ap.data.preventDefault();};var ak=this._.element;this.on('show',function(){ak.on('keydown',ai,this,null,0);if(b.opera||b.gecko&&b.mac)ak.on('keypress',aj,this);});this.on('hide',function(){ak.removeListener('keydown',ai);if(b.opera||b.gecko&&b.mac)ak.removeListener('keypress',aj);});this.on('iframeAdded',function(ap){var aq=new g(ap.data.iframe.$.contentWindow.document);aq.on('keydown',ai,this,null,0);});this.on('show',function(){var at=this;af();if(Q.config.dialog_startupFocusTab&&ad._.pageCount>1){ad._.tabBarMode=true;ad._.tabs[ad._.currentTabId][0].focus();}else if(!at._.hasFocus){at._.currentFocusIndex=-1;if(S.onFocus){var ap=S.onFocus.call(at);ap&&ap.focus();}else ag(true);if(at._.editor.mode=='wysiwyg'&&c){var aq=Q.document.$.selection,ar=aq.createRange();if(ar)if(ar.parentElement&&ar.parentElement().ownerDocument==Q.document.$||ar.item&&ar.item(0).ownerDocument==Q.document.$){var as=document.body.createTextRange();as.moveToElementText(at.getElement().getFirst().$);as.collapse(true);as.select();}}}},this,null,4294967295);if(b.ie6Compat)this.on('load',function(ap){var aq=this.getElement(),ar=aq.getFirst();ar.remove();ar.appendTo(aq);},this);y(this);z(this);new d.text(S.title,a.document).appendTo(this.parts.title);for(var al=0;al0?S:0)+'px'};Z[V?'right':'left']=(R>0?R:0)+'px';U.setStyles(Z);T&&(aa._.moved=1);};})(),getPosition:function(){return e.extend({},this._.position);},show:function(){var Q=this._.element,R=this.definition;if(!(Q.getParent()&&Q.getParent().equals(a.document.getBody())))Q.appendTo(a.document.getBody());else Q.setStyle('display','block');if(b.gecko&&b.version<10900){var S=this.parts.dialog;S.setStyle('position','absolute');setTimeout(function(){S.setStyle('position','fixed');},0);}this.resize(this._.contentSize&&this._.contentSize.width||R.width||R.minWidth,this._.contentSize&&this._.contentSize.height||R.height||R.minHeight);this.reset();this.selectPage(this.definition.contents[0].id);if(a.dialog._.currentZIndex===null)a.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex;this._.element.getFirst().setStyle('z-index',a.dialog._.currentZIndex+=10);if(a.dialog._.currentTop===null){a.dialog._.currentTop=this;this._.parentDialog=null;E(this._.editor);Q.on('keydown',I);Q.on(b.opera?'keypress':'keyup',J);for(var T in {keyup:1,keydown:1,keypress:1})Q.on(T,P);}else{this._.parentDialog=a.dialog._.currentTop; -var U=this._.parentDialog.getElement().getFirst();U.$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2);a.dialog._.currentTop=this;}K(this,this,'\x1b',null,function(){this.getButton('cancel')&&this.getButton('cancel').click();});this._.hasFocus=false;e.setTimeout(function(){this.layout();this.parts.dialog.setStyle('visibility','');this.fireOnce('load',{});k.fire('ready',this);this.fire('show',{});this._.editor.fire('dialogShow',this);this.foreach(function(V){V.setInitValue&&V.setInitValue();});},100,this);},layout:function(){var S=this;var Q=a.document.getWindow().getViewPaneSize(),R=S.getSize();S.move(S._.moved?S._.position.x:(Q.width-R.width)/2,S._.moved?S._.position.y:(Q.height-R.height)/2);},foreach:function(Q){var T=this;for(var R in T._.contents)for(var S in T._.contents[R])Q(T._.contents[R][S]);return T;},reset:(function(){var Q=function(R){if(R.reset)R.reset(1);};return function(){this.foreach(Q);return this;};})(),setupContent:function(){var Q=arguments;this.foreach(function(R){if(R.setup)R.setup.apply(R,Q);});},commitContent:function(){var Q=arguments;this.foreach(function(R){if(R.commit)R.commit.apply(R,Q);});},hide:function(){if(!this.parts.dialog.isVisible())return;this.fire('hide',{});this._.editor.fire('dialogHide',this);var Q=this._.element;Q.setStyle('display','none');this.parts.dialog.setStyle('visibility','hidden');L(this);while(a.dialog._.currentTop!=this)a.dialog._.currentTop.hide();if(!this._.parentDialog)F();else{var R=this._.parentDialog.getElement().getFirst();R.setStyle('z-index',parseInt(R.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2));}a.dialog._.currentTop=this._.parentDialog;if(!this._.parentDialog){a.dialog._.currentZIndex=null;Q.removeListener('keydown',I);Q.removeListener(b.opera?'keypress':'keyup',J);for(var S in {keyup:1,keydown:1,keypress:1})Q.removeListener(S,P);var T=this._.editor;T.focus();if(T.mode=='wysiwyg'&&c){var U=T.getSelection();U&&U.unlock(true);}}else a.dialog._.currentZIndex-=10;delete this._.parentDialog;this.foreach(function(V){V.resetInitValue&&V.resetInitValue();});},addPage:function(Q){var ac=this;var R=[],S=Q.label?' title="'+e.htmlEncode(Q.label)+'"':'',T=Q.elements,U=a.dialog._.uiElementBuilders.vbox.build(ac,{type:'vbox',className:'cke_dialog_page_contents',children:Q.elements,expand:!!Q.expand,padding:Q.padding,style:Q.style||'width: 100%;height:100%'},R),V=h.createFromHtml(R.join(''));V.setAttribute('role','tabpanel');var W=b,X='cke_'+Q.id+'_'+e.getNextNumber(),Y=h.createFromHtml(['0?' cke_last':'cke_first',S,!!Q.hidden?' style="display:none"':'',' id="',X,'"',W.gecko&&W.version>=10900&&!W.hc?'':' href="javascript:void(0)"',' tabIndex="-1"',' hidefocus="true"',' role="tab">',Q.label,''].join('')); -V.setAttribute('aria-labelledby',X);ac._.tabs[Q.id]=[Y,V];ac._.tabIdList.push(Q.id);!Q.hidden&&ac._.pageCount++;ac._.lastTab=Y;ac.updateStyle();var Z=ac._.contents[Q.id]={},aa,ab=U.getChild();while(aa=ab.shift()){Z[aa.id]=aa;if(typeof aa.getChild=='function')ab.push.apply(ab,aa.getChild());}V.setAttribute('name',Q.id);V.appendTo(ac.parts.contents);Y.unselectable();ac.parts.tabs.append(Y);if(Q.accessKey){K(ac,ac,'CTRL+'+Q.accessKey,N,M);ac._.accessKeyMap['CTRL+'+Q.accessKey]=Q.id;}},selectPage:function(Q){if(this._.currentTabId==Q)return;if(this.fire('selectPage',{page:Q,currentPage:this._.currentTabId})===true)return;for(var R in this._.tabs){var S=this._.tabs[R][0],T=this._.tabs[R][1];if(R!=Q){S.removeClass('cke_dialog_tab_selected');T.hide();}T.setAttribute('aria-hidden',R!=Q);}var U=this._.tabs[Q];U[0].addClass('cke_dialog_tab_selected');if(b.ie6Compat||b.ie7Compat){q(U[1]);U[1].show();setTimeout(function(){q(U[1],1);},0);}else U[1].show();this._.currentTabId=Q;this._.currentTabIndex=e.indexOf(this._.tabIdList,Q);},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?'add':'remove')+'Class']('cke_single_page');},hidePage:function(Q){var S=this;var R=S._.tabs[Q]&&S._.tabs[Q][0];if(!R||S._.pageCount==1||!R.isVisible())return;else if(Q==S._.currentTabId)S.selectPage(o.call(S));R.hide();S._.pageCount--;S.updateStyle();},showPage:function(Q){var S=this;var R=S._.tabs[Q]&&S._.tabs[Q][0];if(!R)return;R.show();S._.pageCount++;S.updateStyle();},getElement:function(){return this._.element;},getName:function(){return this._.name;},getContentElement:function(Q,R){var S=this._.contents[Q];return S&&S[R];},getValueOf:function(Q,R){return this.getContentElement(Q,R).getValue();},setValueOf:function(Q,R,S){return this.getContentElement(Q,R).setValue(S);},getButton:function(Q){return this._.buttons[Q];},click:function(Q){return this._.buttons[Q].click();},disableButton:function(Q){return this._.buttons[Q].disable();},enableButton:function(Q){return this._.buttons[Q].enable();},getPageCount:function(){return this._.pageCount;},getParentEditor:function(){return this._.editor;},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement();},addFocusable:function(Q,R){var T=this;if(typeof R=='undefined'){R=T._.focusList.length;T._.focusList.push(new r(T,Q,R));}else{T._.focusList.splice(R,0,new r(T,Q,R));for(var S=R+1;Sab.width-aa.width-V)ag=ab.width-aa.width+(U.lang.dir=='rtl'?0:W[1]);else ag=S.x;if(S.y+W[0]ab.height-aa.height-V)ah=ab.height-aa.height+W[2];else ah=S.y;Q.move(ag,ah,1);Z.data.preventDefault();};function Y(Z){a.document.removeListener('mousemove',X);a.document.removeListener('mouseup',Y);if(b.ie6Compat){var aa=C.getChild(0).getFrameDocument();aa.removeListener('mousemove',X);aa.removeListener('mouseup',Y);}};Q.parts.title.on('mousedown',function(Z){R={x:Z.data.$.screenX,y:Z.data.$.screenY};a.document.on('mousemove',X);a.document.on('mouseup',Y);S=Q.getPosition();if(b.ie6Compat){var aa=C.getChild(0).getFrameDocument();aa.on('mousemove',X);aa.on('mouseup',Y);}Z.data.preventDefault();},Q);};function z(Q){var R=Q.definition,S=R.resizable;if(S==0)return;var T=Q.getParentEditor(),U,V,W,X,Y,Z,aa=e.addFunction(function(ad){Y=Q.getSize();var ae=Q.parts.contents,af=ae.$.getElementsByTagName('iframe').length;if(af){Z=h.createFromHtml('

');ae.append(Z);}V=Y.height-Q.parts.contents.getSize('height',!(b.gecko||b.opera||c&&b.quirks));U=Y.width-Q.parts.contents.getSize('width',1);X={x:ad.screenX,y:ad.screenY};W=a.document.getWindow().getViewPaneSize();a.document.on('mousemove',ab);a.document.on('mouseup',ac);if(b.ie6Compat){var ag=C.getChild(0).getFrameDocument();ag.on('mousemove',ab);ag.on('mouseup',ac);}ad.preventDefault&&ad.preventDefault();});Q.on('load',function(){var ad='';if(S==1)ad=' cke_resizer_horizontal';else if(S==2)ad=' cke_resizer_vertical';var ae=h.createFromHtml('
');Q.parts.footer.append(ae,1);});T.on('destroy',function(){e.removeFunction(aa);});function ab(ad){var ae=T.lang.dir=='rtl',af=(ad.data.$.screenX-X.x)*(ae?-1:1),ag=ad.data.$.screenY-X.y,ah=Y.width,ai=Y.height,aj=ah+af*(Q._.moved?1:2),ak=ai+ag*(Q._.moved?1:2),al=Q._.element.getFirst(),am=ae&&al.getComputedStyle('right'),an=Q.getPosition();if(an.y+ak>W.height)ak=W.height-an.y;if((ae?am:an.x)+aj>W.width)aj=W.width-(ae?am:an.x);if(S==1||S==3)ah=Math.max(R.minWidth||0,aj-U);if(S==2||S==3)ai=Math.max(R.minHeight||0,ak-V);Q.resize(ah,ai);if(!Q._.moved)Q.layout();ad.data.preventDefault();};function ac(){a.document.removeListener('mouseup',ac);a.document.removeListener('mousemove',ab); -if(Z){Z.remove();Z=null;}if(b.ie6Compat){var ad=C.getChild(0).getFrameDocument();ad.removeListener('mouseup',ac);ad.removeListener('mousemove',ab);}};};var A,B={},C;function D(Q){Q.data.preventDefault(1);};function E(Q){var R=a.document.getWindow(),S=Q.config,T=S.dialog_backgroundCoverColor||'white',U=S.dialog_backgroundCoverOpacity,V=S.baseFloatZIndex,W=e.genKey(T,U,V),X=B[W];if(!X){var Y=['
'];if(b.ie6Compat){var Z=b.isCustomDomain(),aa="";Y.push('');}Y.push('
');X=h.createFromHtml(Y.join(''));X.setOpacity(U!=undefined?U:0.5);X.on('keydown',D);X.on('keypress',D);X.on('keyup',D);X.appendTo(a.document.getBody());B[W]=X;}else X.show();C=X;var ab=function(){var ae=R.getViewPaneSize();X.setStyles({width:ae.width+'px',height:ae.height+'px'});},ac=function(){var ae=R.getScrollPosition(),af=a.dialog._.currentTop;X.setStyles({left:ae.x+'px',top:ae.y+'px'});if(af)do{var ag=af.getPosition();af.move(ag.x,ag.y);}while(af=af._.parentDialog)};A=ab;R.on('resize',ab);ab();if(!(b.mac&&b.webkit))X.focus();if(b.ie6Compat){var ad=function(){ac();arguments.callee.prevScrollHandler.apply(this,arguments);};R.$.setTimeout(function(){ad.prevScrollHandler=window.onscroll||(function(){});window.onscroll=ad;},0);ac();}};function F(){if(!C)return;var Q=a.document.getWindow();C.hide();Q.removeListener('resize',A);if(b.ie6Compat)Q.$.setTimeout(function(){var R=window.onscroll&&window.onscroll.prevScrollHandler;window.onscroll=R||null;},0);A=null;};function G(){for(var Q in B)B[Q].remove();B={};};var H={},I=function(Q){var R=Q.data.$.ctrlKey||Q.data.$.metaKey,S=Q.data.$.altKey,T=Q.data.$.shiftKey,U=String.fromCharCode(Q.data.$.keyCode),V=H[(R?'CTRL+':'')+(S?'ALT+':'')+(T?'SHIFT+':'')+U];if(!V||!V.length)return;V=V[V.length-1];V.keydown&&V.keydown.call(V.uiElement,V.dialog,V.key);Q.data.preventDefault();},J=function(Q){var R=Q.data.$.ctrlKey||Q.data.$.metaKey,S=Q.data.$.altKey,T=Q.data.$.shiftKey,U=String.fromCharCode(Q.data.$.keyCode),V=H[(R?'CTRL+':'')+(S?'ALT+':'')+(T?'SHIFT+':'')+U]; -if(!V||!V.length)return;V=V[V.length-1];if(V.keyup){V.keyup.call(V.uiElement,V.dialog,V.key);Q.data.preventDefault();}},K=function(Q,R,S,T,U){var V=H[S]||(H[S]=[]);V.push({uiElement:Q,dialog:R,key:S,keyup:U||Q.accessKeyUp,keydown:T||Q.accessKeyDown});},L=function(Q){for(var R in H){var S=H[R];for(var T=S.length-1;T>=0;T--){if(S[T].dialog==Q||S[T].uiElement==Q)S.splice(T,1);}if(S.length===0)delete H[R];}},M=function(Q,R){if(Q._.accessKeyMap[R])Q.selectPage(Q._.accessKeyMap[R]);},N=function(Q,R){},O={27:1,13:1},P=function(Q){if(Q.data.getKeystroke() in O)Q.data.stopPropagation();};(function(){k.dialog={uiElement:function(Q,R,S,T,U,V,W){if(arguments.length<4)return;var X=(T.call?T(R):T)||'div',Y=['<',X,' '],Z=(U&&U.call?U(R):U)||{},aa=(V&&V.call?V(R):V)||{},ab=(W&&W.call?W.call(this,Q,R):W)||'',ac=this.domId=aa.id||e.getNextId()+'_uiElement',ad=this.id=R.id,ae;aa.id=ac;var af={};if(R.type)af['cke_dialog_ui_'+R.type]=1;if(R.className)af[R.className]=1;if(R.disabled)af.cke_disabled=1;var ag=aa['class']&&aa['class'].split?aa['class'].split(' '):[];for(ae=0;ae=0;ae--){if(ai[ae]==='')ai.splice(ae,1);}if(ai.length>0)aa.style=(aa.style?aa.style+'; ':'')+ai.join('; ');for(ae in aa)Y.push(ae+'="'+e.htmlEncode(aa[ae])+'" ');Y.push('>',ab,'');S.push(Y.join(''));(this._||(this._={})).dialog=Q;if(typeof R.isChanged=='boolean')this.isChanged=function(){return R.isChanged;};if(typeof R.isChanged=='function')this.isChanged=R.isChanged;a.event.implementOn(this);this.registerEvents(R);if(this.accessKeyUp&&this.accessKeyDown&&R.accessKey)K(this,Q,'CTRL+'+R.accessKey);var aj=this;Q.on('load',function(){if(aj.getInputElement())aj.getInputElement().on('focus',function(){Q._.tabBarMode=false;Q._.hasFocus=true;aj.fire('focus');},aj);});if(this.keyboardFocusable){this.tabIndex=R.tabIndex||0;this.focusIndex=Q._.focusList.push(this)-1;this.on('focus',function(){Q._.currentFocusIndex=aj.focusIndex;});}e.extend(this,R);},hbox:function(Q,R,S,T,U){if(arguments.length<4)return;this._||(this._={});var V=this._.children=R,W=U&&U.widths||null,X=U&&U.height||null,Y={},Z,aa=function(){var ac=[''];for(Z=0;Z0)ac.push('style="'+ae.join('; ')+'" ');ac.push('>',S[Z],'');}ac.push('');return ac.join('');},ab={role:'presentation'};U&&U.align&&(ab.align=U.align);k.dialog.uiElement.call(this,Q,U||{type:'hbox'},T,'table',Y,ab,aa);},vbox:function(Q,R,S,T,U){if(arguments.length<3)return;this._||(this._={});var V=this._.children=R,W=U&&U.width||null,X=U&&U.heights||null,Y=function(){var Z=['');for(var aa=0;aa');}Z.push('
0)Z.push('style="',ab.join('; '),'" ');Z.push(' class="cke_dialog_ui_vbox_child">',S[aa],'
');return Z.join('');};k.dialog.uiElement.call(this,Q,U||{type:'vbox'},T,'div',null,{role:'presentation'},Y);}};})();k.dialog.uiElement.prototype={getElement:function(){return a.document.getById(this.domId);},getInputElement:function(){return this.getElement();},getDialog:function(){return this._.dialog;},setValue:function(Q,R){this.getInputElement().setValue(Q);!R&&this.fire('change',{value:Q});return this;},getValue:function(){return this.getInputElement().getValue();},isChanged:function(){return false;},selectParentTab:function(){var T=this;var Q=T.getInputElement(),R=Q,S;while((R=R.getParent())&&R.$.className.search('cke_dialog_page_contents')==-1){}if(!R)return T;S=R.getAttribute('name');if(T._.dialog._.currentTabId!=S)T._.dialog.selectPage(S);return T;},focus:function(){this.selectParentTab().getInputElement().focus();return this;},registerEvents:function(Q){var R=/^on([A-Z]\w+)/,S,T=function(V,W,X,Y){W.on('load',function(){V.getInputElement().on(X,Y,V);});};for(var U in Q){if(!(S=U.match(R)))continue;if(this.eventProcessors[U])this.eventProcessors[U].call(this,this._.dialog,Q[U]);else T(this,this._.dialog,S[1].toLowerCase(),Q[U]);}return this; -},eventProcessors:{onLoad:function(Q,R){Q.on('load',R,this);},onShow:function(Q,R){Q.on('show',R,this);},onHide:function(Q,R){Q.on('hide',R,this);}},accessKeyDown:function(Q,R){this.focus();},accessKeyUp:function(Q,R){},disable:function(){var Q=this.getElement();Q.setAttribute('disabled','true');Q.addClass('cke_disabled');},enable:function(){var Q=this.getElement();Q.removeAttribute('disabled');Q.removeClass('cke_disabled');},isEnabled:function(){return!this.getInputElement().getAttribute('disabled');},isVisible:function(){return this.getInputElement().isVisible();},isFocusable:function(){if(!this.isEnabled()||!this.isVisible())return false;return true;}};k.dialog.hbox.prototype=e.extend(new k.dialog.uiElement(),{getChild:function(Q){var R=this;if(arguments.length<1)return R._.children.concat();if(!Q.splice)Q=[Q];if(Q.length<2)return R._.children[Q[0]];else return R._.children[Q[0]]&&R._.children[Q[0]].getChild?R._.children[Q[0]].getChild(Q.slice(1,Q.length)):null;}},true);k.dialog.vbox.prototype=new k.dialog.hbox();(function(){var Q={build:function(R,S,T){var U=S.children,V,W=[],X=[];for(var Y=0;Y',T||U.name,'');return V.join('');}};a.style.getStyleText=function(T){var U=T._ST;if(U)return U;U=T.styles;var V=T.attributes&&T.attributes.style||'',W='';if(V.length)V=V.replace(o,';');for(var X in U){var Y=U[X],Z=(X+':'+Y).replace(o,';');if(Y=='inherit')W+=Z;else V+=Z;}if(V.length)V=P(V);V+=W;return T._ST=V;};function s(T){var U,V;while(T=T.getParent()){if(T.getName()=='body')break;if(T.getAttribute('data-nostyle'))U=T;else if(!V){var W=T.getAttribute('contentEditable');if(W=='false')U=T;else if(W=='true')V=1;}}return U;};function t(T){var ax=this;var U=T.document;if(T.collapsed){var V=J(ax,U);T.insertNode(V);T.moveToPosition(V,2);return;}var W=ax.element,X=ax._.definition,Y,Z=X.includeReadonly;if(Z==undefined)Z=U.getCustomData('cke_includeReadonly');var aa=f[W]||(Y=true,f.span);T.enlarge(1,1);T.trim();var ab=T.createBookmark(),ac=ab.startNode,ad=ab.endNode,ae=ac,af,ag=s(ac),ah=s(ad);if(ag)ae=ag.getNextSourceNode(true);if(ah)ad=ah;if(ae.getPosition(ad)==2)ae=0;while(ae){var ai=false;if(ae.equals(ad)){ae=null;ai=true;}else{var aj=ae.type,ak=aj==1?ae.getName():null,al=ak&&ae.getAttribute('contentEditable')=='false',am=ak&&ae.getAttribute('data-nostyle'); -if(ak&&ae.data('cke-bookmark')){ae=ae.getNextSourceNode(true);continue;}if(!ak||aa[ak]&&!am&&(!al||Z)&&(ae.getPosition(ad)|4|0|8)==4+0+8&&(!X.childRule||X.childRule(ae))){var an=ae.getParent();if(an&&((an.getDtd()||f.span)[W]||Y)&&(!X.parentRule||X.parentRule(an))){if(!af&&(!ak||!f.$removeEmpty[ak]||(ae.getPosition(ad)|4|0|8)==4+0+8)){af=new d.range(U);af.setStartBefore(ae);}if(aj==3||al||aj==1&&!ae.getChildCount()){var ao=ae,ap;while((ai=!ao.getNext(q))&&(ap=ao.getParent(),aa[ap.getName()])&&(ap.getPosition(ac)|2|0|8)==2+0+8&&(!X.childRule||X.childRule(ap)))ao=ap;af.setEndAfter(ao);}}else ai=true;}else ai=true;ae=ae.getNextSourceNode(am||al);}if(ai&&af&&!af.collapsed){var aq=J(ax,U),ar=aq.hasAttributes(),as=af.getCommonAncestor(),at={styles:{},attrs:{},blockedStyles:{},blockedAttrs:{}},au,av,aw;while(aq&&as){if(as.getName()==W){for(au in X.attributes){if(at.blockedAttrs[au]||!(aw=as.getAttribute(av)))continue;if(aq.getAttribute(au)==aw)at.attrs[au]=1;else at.blockedAttrs[au]=1;}for(av in X.styles){if(at.blockedStyles[av]||!(aw=as.getStyle(av)))continue;if(aq.getStyle(av)==aw)at.styles[av]=1;else at.blockedStyles[av]=1;}}as=as.getParent();}for(au in at.attrs)aq.removeAttribute(au);for(av in at.styles)aq.removeStyle(av);if(ar&&!aq.hasAttributes())aq=null;if(aq){af.extractContents().appendTo(aq);G(ax,aq);af.insertNode(aq);aq.mergeSiblings();if(!c)aq.$.normalize();}else{aq=new h('span');af.extractContents().appendTo(aq);af.insertNode(aq);G(ax,aq);aq.remove(true);}af=null;}}T.moveToBookmark(ab);T.shrink(2);};function u(T){T.enlarge(1,1);var U=T.createBookmark(),V=U.startNode;if(T.collapsed){var W=new d.elementPath(V.getParent()),X;for(var Y=0,Z;Y'+V+'';else T.setHtml(V);U.remove();};function B(T){var U=/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,V=T.getName(),W=C(T.getOuterHtml(),U,function(Y,Z,aa){return Z+''+aa+'
';}),X=[];W.replace(/([\s\S]*?)<\/pre>/gi,function(Y,Z){X.push(Z);});return X;};function C(T,U,V){var W='',X='';T=T.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(Y,Z,aa){Z&&(W=Z);aa&&(X=aa);return '';});return W+T.replace(U,V)+X;};function D(T,U){var V;if(T.length>1)V=new d.documentFragment(U.getDocument());for(var W=0;
-W');X=X.replace(/[ \t]{2,}/g,function(Z){return e.repeat(' ',Z.length-1)+' ';});if(V){var Y=U.clone();Y.setHtml(X);V.append(Y);}else U.setHtml(X);}return V||U;};function E(T,U){var V=T.getBogus();V&&V.remove();var W=T.getHtml();W=C(W,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');W=W.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'$1');W=W.replace(/([ \t\n\r]+| )/g,' ');W=W.replace(/]*>/gi,'\n');if(c){var X=T.getDocument().createElement('div');X.append(U);U.$.outerHTML='
'+W+'
';U.copyAttributes(X.getFirst());U=X.getFirst().remove();}else U.setHtml(W);return U;};function F(T,U){var V=T._.definition,W=e.extend({},V.attributes,N(T)[U.getName()]),X=V.styles,Y=e.isEmpty(W)&&e.isEmpty(X);for(var Z in W){if((Z=='class'||T._.definition.fullMatch)&&U.getAttribute(Z)!=O(Z,W[Z]))continue;Y=U.hasAttribute(Z);U.removeAttribute(Z);}for(var aa in X){if(T._.definition.fullMatch&&U.getStyle(aa)!=O(aa,X[aa],true))continue;Y=Y||!!U.getStyle(aa);U.removeStyle(aa);}if(Y)!f.$block[U.getName()]||T._.enterMode==2&&!U.hasAttributes()?I(U):U.renameNode(T._.enterMode==1?'p':'div');};function G(T,U){var V=T._.definition,W=V.attributes,X=V.styles,Y=N(T),Z=U.getElementsByTag(T.element);for(var aa=Z.count();--aa>=0;)F(T,Z.getItem(aa));for(var ab in Y){if(ab!=T.element){Z=U.getElementsByTag(ab);for(aa=Z.count()-1;aa>=0;aa--){var ac=Z.getItem(aa);H(ac,Y[ab]);}}}};function H(T,U){var V=U&&U.attributes;if(V)for(var W=0;W0)H+=(F.$.offsetWidth||0)-(F.$.clientWidth||0);H+=4;F.setStyle('width',H+'px');v.element.addClass('cke_frameLoaded');var I=v.element.$.scrollHeight;if(c&&b.quirks&&I>0)I+=(F.$.offsetHeight||0)-(F.$.clientHeight||0);F.setStyle('height',I+'px');u._.currentBlock.element.setStyle('display','none').removeStyle('display');}else F.removeStyle('height');var J=u.element,K=J.getWindow(),L=K.getScrollPosition(),M=K.getViewPaneSize(),N={height:J.$.offsetHeight,width:J.$.offsetWidth};if(A?B<0:B+N.width>M.width+L.x)B+=N.width*(A?1:-1);if(C+N.height>M.height+L.y)C-=N.height;if(c){var O=new h(w.$.offsetParent),P=O;if(P.getName()=='html')P=P.getDocument().getBody();if(P.getComputedStyle('direction')=='rtl')if(b.ie8Compat)B-=w.getDocument().getDocumentElement().$.scrollLeft*2;else B-=O.$.scrollWidth-O.$.clientWidth; -}var Q=w.getFirst(),R;if(R=Q.getCustomData('activePanel'))R.onHide&&R.onHide.call(this,1);Q.setCustomData('activePanel',this);w.setStyles({top:C+'px',left:B+'px'});w.setOpacity(1);},this);u.isLoaded?E():u.onLoad=E;e.setTimeout(function(){x.$.contentWindow.focus();this.allowBlur(true);},0,this);},b.air?200:0,this);this.visible=1;if(this.onShow)this.onShow.call(this);n=0;},hide:function(){var p=this;if(p.visible&&(!p.onHide||p.onHide.call(p)!==true)){p.hideChild();p.element.setStyle('display','none');p.visible=0;p.element.getFirst().removeCustomData('activePanel');}},allowBlur:function(p){var q=this._.panel;if(p!=undefined)q.allowBlur=p;return q.allowBlur;},showAsChild:function(p,q,r,s,t,u){if(this._.activeChild==p&&p._.panel._.offsetParentId==r.getId())return;this.hideChild();p.onHide=e.bind(function(){e.setTimeout(function(){if(!this._.focused)this.hide();},0,this);},this);this._.activeChild=p;this._.focused=false;p.showBlock(q,r,s,t,u);if(b.ie7Compat||b.ie8&&b.ie6Compat)setTimeout(function(){p.element.getChild(0).$.style.cssText+='';},100);},hideChild:function(){var p=this._.activeChild;if(p){delete p.onHide;delete this._.activeChild;p.hide();}}}});a.on('instanceDestroyed',function(){var p=e.isEmpty(a.instances);for(var q in m){var r=m[q];if(p)r.destroy();else r.element.hide();}p&&(m={});});})();j.add('menu',{beforeInit:function(m){var n=m.config.menu_groups.split(','),o=m._.menuGroups={},p=m._.menuItems={};for(var q=0;q'],B=r.length,C=B&&r[0].group;for(var D=0;D');C=E.group;}E.render(this,D,A);}A.push('');u.setHtml(A.join('')); -k.fire('ready',this);if(this.parent)this.parent._.panel.showAsChild(t,this.id,n,o,p,q);else t.showBlock(this.id,n,o,p,q);s.fire('menuShow',[t]);},addListener:function(n){this._.listeners.push(n);},hide:function(){var n=this;n._.onHide&&n._.onHide();n._.panel&&n._.panel.hide();}}});function m(n){n.sort(function(o,p){if(o.groupp.group)return 1;return o.orderp.order?1:0;});};a.menuItem=e.createClass({$:function(n,o,p){var q=this;e.extend(q,p,{order:0,className:'cke_button_'+o});q.group=n._.menuGroups[q.group];q.editor=n;q.name=o;},proto:{render:function(n,o,p){var w=this;var q=n.id+String(o),r=typeof w.state=='undefined'?2:w.state,s=' cke_'+(r==1?'on':r==0?'disabled':'off'),t=w.label;if(w.className)s+=' '+w.className;var u=w.getItems;p.push(''+''+'');if(u)p.push('','&#',w.editor.lang.dir=='rtl'?'9668':'9658',';','');p.push(t,'');}}});})();i.menu_groups='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div';(function(){var m;j.add('editingblock',{init:function(n){if(!n.config.editingBlock)return;n.on('themeSpace',function(o){if(o.data.space=='contents')o.data.html+='
';});n.on('themeLoaded',function(){n.fireOnce('editingBlockReady');});n.on('uiReady',function(){n.setMode(n.config.startupMode);});n.on('afterSetData',function(){if(!m){function o(){m=true;n.getMode().loadData(n.getData());m=false;};if(n.mode)o(); -else n.on('mode',function(){if(n.mode){o();n.removeListener('mode',arguments.callee);}});}});n.on('beforeGetData',function(){if(!m&&n.mode){m=true;n.setData(n.getMode().getData(),null,1);m=false;}});n.on('getSnapshot',function(o){if(n.mode)o.data=n.getMode().getSnapshotData();});n.on('loadSnapshot',function(o){if(n.mode)n.getMode().loadSnapshotData(o.data);});n.on('mode',function(o){o.removeListener();b.webkit&&n.container.on('focus',function(){n.focus();});if(n.config.startupFocus)n.focus();setTimeout(function(){n.fireOnce('instanceReady');a.fire('instanceReady',null,n);},0);});n.on('destroy',function(){var o=this;if(o.mode)o._.modes[o.mode].unload(o.getThemeSpace('contents'));});}});a.editor.prototype.mode='';a.editor.prototype.addMode=function(n,o){o.name=n;(this._.modes||(this._.modes={}))[n]=o;};a.editor.prototype.setMode=function(n){this.fire('beforeSetMode',{newMode:n});var o,p=this.getThemeSpace('contents'),q=this.checkDirty();if(this.mode){if(n==this.mode)return;this.fire('beforeModeUnload');var r=this.getMode();o=r.getData();r.unload(p);this.mode='';}p.setHtml('');var s=this.getMode(n);if(!s)throw '[CKEDITOR.editor.setMode] Unknown mode "'+n+'".';if(!q)this.on('mode',function(){this.resetDirty();this.removeListener('mode',arguments.callee);});s.load(p,typeof o!='string'?this.getData():o);};a.editor.prototype.getMode=function(n){return this._.modes&&this._.modes[n||this.mode];};a.editor.prototype.focus=function(){this.forceNextSelectionCheck();var n=this.getMode();if(n)n.focus();};})();i.startupMode='wysiwyg';i.editingBlock=true;(function(){function m(){var B=this;try{var y=B.getSelection();if(!y||!y.document.getWindow().$)return;var z=y.getStartElement(),A=new d.elementPath(z);if(!A.compare(B._.selectionPreviousPath)){B._.selectionPreviousPath=A;B.fire('selectionChange',{selection:y,path:A,element:z});}}catch(C){}};var n,o;function p(){o=true;if(n)return;q.call(this);n=e.setTimeout(q,200,this);};function q(){n=null;if(o){e.setTimeout(m,0,this);o=false;}};function r(y){function z(C){return C&&C.type==1&&C.getName() in f.$removeEmpty;};var A=y.startContainer,B=y.startOffset;if(A.type==3)return false;return!e.trim(A.getHtml())?z(A):z(A.getChild(B-1))||z(A.getChild(B));};var s={modes:{wysiwyg:1,source:1},readOnly:c||b.webkit,exec:function(y){switch(y.mode){case 'wysiwyg':y.document.$.execCommand('SelectAll',false,null);y.forceNextSelectionCheck();y.selectionChange();break;case 'source':var z=y.textarea.$;if(c)z.createTextRange().execCommand('SelectAll'); -else{z.selectionStart=0;z.selectionEnd=z.value.length;}z.focus();}},canUndo:false};function t(y){w(y);var z=y.createText('​');y.setCustomData('cke-fillingChar',z);return z;};function u(y){return y&&y.getCustomData('cke-fillingChar');};function v(y){var z=y&&u(y);if(z)if(z.getCustomData('ready'))w(y);else z.setCustomData('ready',1);};function w(y){var z=y&&y.removeCustomData('cke-fillingChar');if(z){z.setText(z.getText().replace(/\u200B/g,''));z=0;}};j.add('selection',{init:function(y){if(b.webkit){y.on('selectionChange',function(){v(y.document);});y.on('beforeSetMode',function(){w(y.document);});y.on('key',function(D){switch(D.data.keyCode){case 13:case 2000+13:case 37:case 39:case 8:w(y.document);}},null,null,10);var z,A;function B(){var D=y.document,E=u(D);if(E){var F=D.$.defaultView.getSelection();if(F.type=='Caret'&&F.anchorNode==E.$)A=1;z=E.getText();E.setText(z.replace(/\u200B/g,''));}};function C(){var D=y.document,E=u(D);if(E){E.setText(z);if(A){D.$.defaultView.getSelection().setPosition(E.$,E.getLength());A=0;}}};y.on('beforeUndoImage',B);y.on('afterUndoImage',C);y.on('beforeGetData',B,null,null,0);y.on('getData',C);}y.on('contentDom',function(){var D=y.document,E=D.getBody(),F=D.getDocumentElement();if(c){var G,H,I=1;E.on('focusin',function(M){if(M.data.$.srcElement.nodeName!='BODY')return;if(G){if(I){try{G.select();}catch(O){}var N=D.getCustomData('cke_locked_selection');if(N){N.unlock();N.lock();}}G=null;}});E.on('focus',function(){H=1;L();});E.on('beforedeactivate',function(M){if(M.data.$.toElement)return;H=0;I=1;});if(c&&b.version<8)y.on('blur',function(M){try{y.document&&y.document.$.selection.empty();}catch(N){}});F.on('mousedown',function(){I=0;});F.on('mouseup',function(){I=1;});if(c&&(b.ie7Compat||b.version<8||b.quirks))F.on('click',function(M){if(M.data.getTarget().getName()=='html')y.getSelection().getRanges()[0].select();});var J;E.on('mousedown',function(M){if(M.data.$.button==2){var N=y.document.$.selection;if(N.type=='None')J=y.window.getScrollPosition();}K();});E.on('mouseup',function(M){if(M.data.$.button==2&&J){y.document.$.documentElement.scrollLeft=J.x;y.document.$.documentElement.scrollTop=J.y;}J=null;H=1;setTimeout(function(){L(true);},0);});E.on('keydown',K);E.on('keyup',function(){H=1;L();});D.on('selectionchange',L);function K(){H=0;};function L(M){if(H){var N=y.document,O=y.getSelection(),P=O&&O.getNative();if(M&&P&&P.type=='None')if(!N.$.queryCommandEnabled('InsertImage')){e.setTimeout(L,50,this,true);return;}var Q;if(P&&P.type&&P.type!='Control'&&(Q=P.createRange())&&(Q=Q.parentElement())&&(Q=Q.nodeName)&&Q.toLowerCase() in {input:1,textarea:1})return; -G=P&&O.getRanges()[0];p.call(y);}};}else{D.on('mouseup',p,y);D.on('keyup',p,y);}});y.on('contentDomUnload',y.forceNextSelectionCheck,y);y.addCommand('selectAll',s);y.ui.addButton('SelectAll',{label:y.lang.selectAll,command:'selectAll'});y.selectionChange=p;}});a.editor.prototype.getSelection=function(){return this.document&&this.document.getSelection();};a.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath;};g.prototype.getSelection=function(){var y=new d.selection(this);return!y||y.isInvalid?null:y;};a.SELECTION_NONE=1;a.SELECTION_TEXT=2;a.SELECTION_ELEMENT=3;d.selection=function(y){var B=this;var z=y.getCustomData('cke_locked_selection');if(z)return z;B.document=y;B.isLocked=0;B._={cache:{}};if(c){var A=B.getNative().createRange();if(!A||A.item&&A.item(0).ownerDocument!=B.document.$||A.parentElement&&A.parentElement().ownerDocument!=B.document.$)B.isInvalid=true;}return B;};var x={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};d.selection.prototype={getNative:c?function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.$.selection);}:function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.getWindow().$.getSelection());},getType:c?function(){var y=this._.cache;if(y.type)return y.type;var z=1;try{var A=this.getNative(),B=A.type;if(B=='Text')z=2;if(B=='Control')z=3;if(A.createRange().parentElement)z=2;}catch(C){}return y.type=z;}:function(){var y=this._.cache;if(y.type)return y.type;var z=2,A=this.getNative();if(!A)z=1;else if(A.rangeCount==1){var B=A.getRangeAt(0),C=B.startContainer;if(C==B.endContainer&&C.nodeType==1&&B.endOffset-B.startOffset==1&&x[C.childNodes[B.startOffset].nodeName.toLowerCase()])z=3;}return y.type=z;},getRanges:(function(){var y=c?(function(){function z(B){return new d.node(B).getIndex();};var A=function(B,C){B=B.duplicate();B.collapse(C);var D=B.parentElement(),E=D.ownerDocument;if(!D.hasChildNodes())return{container:D,offset:0};var F=D.children,G,H,I=B.duplicate(),J=0,K=F.length-1,L=-1,M,N;while(J<=K){L=Math.floor((J+K)/2);G=F[L];I.moveToElementText(G);M=I.compareEndPoints('StartToStart',B);if(M>0)K=L-1;else if(M<0)J=L+1;else if(b.ie9Compat&&G.tagName=='BR'){var O='cke_range_marker';B.execCommand('CreateBookmark',false,O);G=E.getElementsByName(O)[0];var P=z(G);D.removeChild(G);return{container:D,offset:P};}else return{container:D,offset:z(G)};}if(L==-1||L==F.length-1&&M<0){I.moveToElementText(D); -I.setEndPoint('StartToStart',B);N=I.text.replace(/(\r\n|\r)/g,'\n').length;F=D.childNodes;if(!N){G=F[F.length-1];if(G.nodeType==1)return{container:D,offset:F.length};else return{container:G,offset:G.nodeValue.length};}var Q=F.length;while(N>0)N-=F[--Q].nodeValue.length;return{container:F[Q],offset:-N};}else{I.collapse(M>0?true:false);I.setEndPoint(M>0?'StartToStart':'EndToStart',B);N=I.text.replace(/(\r\n|\r)/g,'\n').length;if(!N)return{container:D,offset:z(G)+(M>0?0:1)};while(N>0)try{H=G[M>0?'previousSibling':'nextSibling'];N-=H.nodeValue.length;G=H;}catch(R){return{container:D,offset:z(G)};}return{container:G,offset:M>0?-N:G.nodeValue.length+N};}};return function(){var L=this;var B=L.getNative(),C=B&&B.createRange(),D=L.getType(),E;if(!B)return[];if(D==2){E=new d.range(L.document);var F=A(C,true);E.setStart(new d.node(F.container),F.offset);F=A(C);E.setEnd(new d.node(F.container),F.offset);if(E.endContainer.getPosition(E.startContainer)&4&&E.endOffset<=E.startContainer.getIndex())E.collapse();return[E];}else if(D==3){var G=[];for(var H=0;H=F.getLength())J.setStartAfter(F);else J.setStartBefore(F);if(G&&G.type==3)if(!I)J.setEndBefore(G);else J.setEndAfter(G);var L=new d.walker(J);L.evaluator=function(M){if(M.type==1&&M.isReadOnly()){var N=D.clone();D.setEndBefore(M);if(D.collapsed)B.splice(C--,1);if(!(M.getPosition(J.endContainer)&16)){N.setStartAfter(M);if(!N.collapsed)B.splice(C+1,0,N);}return true;}return false;};L.next();}}return A.ranges;};})(),getStartElement:function(){var F=this;var y=F._.cache; -if(y.startElement!==undefined)return y.startElement;var z,A=F.getNative();switch(F.getType()){case 3:return F.getSelectedElement();case 2:var B=F.getRanges()[0];if(B){if(!B.collapsed){B.optimize();while(1){var C=B.startContainer,D=B.startOffset;if(D==(C.getChildCount?C.getChildCount():C.getLength())&&!C.isBlockBoundary())B.setStartAfter(C);else break;}z=B.startContainer;if(z.type!=1)return z.getParent();z=z.getChild(B.startOffset);if(!z||z.type!=1)z=B.startContainer;else{var E=z.getFirst();while(E&&E.type==1){z=E;E=E.getFirst();}}}else{z=B.startContainer;if(z.type!=1)z=z.getParent();}z=z.$;}}return y.startElement=z?new h(z):null;},getSelectedElement:function(){var y=this._.cache;if(y.selectedElement!==undefined)return y.selectedElement;var z=this,A=e.tryThese(function(){return z.getNative().createRange().item(0);},function(){var B=z.getRanges()[0],C,D;for(var E=2;E&&!((C=B.getEnclosedNode())&&C.type==1&&x[C.getName()]&&(D=C));E--)B.shrink(1);return D.$;});return y.selectedElement=A?new h(A):null;},lock:function(){var y=this;y.getRanges();y.getStartElement();y.getSelectedElement();y._.cache.nativeSel={};y.isLocked=1;y.document.setCustomData('cke_locked_selection',y);},unlock:function(y){var D=this;var z=D.document,A=z.getCustomData('cke_locked_selection');if(A){z.setCustomData('cke_locked_selection',null);if(y){var B=A.getSelectedElement(),C=!B&&A.getRanges();D.isLocked=0;D.reset();z.getBody().focus();if(B)D.selectElement(B);else D.selectRanges(C);}}if(!A||!y){D.isLocked=0;D.reset();}},reset:function(){this._.cache={};},selectElement:function(y){var A=this;if(A.isLocked){var z=new d.range(A.document);z.setStartBefore(y);z.setEndAfter(y);A._.cache.selectedElement=y;A._.cache.startElement=y;A._.cache.ranges=new d.rangeList(z);A._.cache.type=3;return;}z=new d.range(y.getDocument());z.setStartBefore(y);z.setEndAfter(y);z.select();A.document.fire('selectionchange');A.reset();},selectRanges:function(y){var M=this;if(M.isLocked){M._.cache.selectedElement=null;M._.cache.startElement=y[0]&&y[0].getTouchedStartNode();M._.cache.ranges=new d.rangeList(y);M._.cache.type=2;return;}if(c){if(y.length>1){var z=y[y.length-1];y[0].setEnd(z.endContainer,z.endOffset);y.length=1;}if(y[0])y[0].select();M.reset();}else{var A=M.getNative();if(!A)return;if(y.length){A.removeAllRanges();b.webkit&&w(M.document);}for(var B=0;B=0){H.collapse(1);I.setEnd(H.endContainer.$,H.endOffset);}else throw N;}A.addRange(I);}M.reset();}},createBookmarks:function(y){return this.getRanges().createBookmarks(y);},createBookmarks2:function(y){return this.getRanges().createBookmarks2(y);},selectBookmarks:function(y){var z=[];for(var A=0;A','','',this.label,'','=10900&&!o.hc?'':" href=\"javascript:void('"+this.label+"')\"",' role="button" aria-labelledby="',p,'_label" aria-describedby="',p,'_text" aria-haspopup="true"');if(b.opera||b.gecko&&b.mac)n.push(' onkeypress="return false;"');if(b.gecko)n.push(' onblur="this.style.cssText = this.style.cssText;"');n.push(' onkeydown="CKEDITOR.tools.callFunction( ',t,', event, this );" onclick="CKEDITOR.tools.callFunction(',q,', this); return false;">'+this.label+''+''+''+(b.hc?'▼':b.air?' ':'')+''+''+''+'');if(this.onRender)this.onRender();return r;},createPanel:function(m){if(this._.panel)return;var n=this._.panelDefinition,o=this._.panelDefinition.block,p=n.parent||a.document.getBody(),q=new k.floatPanel(m,p,n),r=q.addListBlock(this.id,o),s=this;q.onShow=function(){if(s.className)this.element.getFirst().addClass(s.className+'_panel');s.setState(1);r.focus(!s.multiSelect&&s.getValue());s._.on=1;if(s.onOpen)s.onOpen();};q.onHide=function(t){if(s.className)this.element.getFirst().removeClass(s.className+'_panel');s.setState(s.modes&&s.modes[m.mode]?2:0);s._.on=0;if(!t&&s.onClose)s.onClose();};q.onEscape=function(){q.hide();s.document.getById('cke_'+s.id).getFirst().getNext().focus();};r.onClick=function(t,u){s.document.getWindow().focus();if(s.onClick)s.onClick.call(s,t,u);if(u)s.setValue(t,s._.items[t]);else s.setValue('');q.hide();};this._.panel=q;this._.list=r;q.getBlock(this.id).onHide=function(){s._.on=0;s.setState(2);};if(this.init)this.init(); -},setValue:function(m,n){var p=this;p._.value=m;var o=p.document.getById('cke_'+p.id+'_text');if(o){if(!(m||n)){n=p.label;o.addClass('cke_inline_label');}else o.removeClass('cke_inline_label');o.setHtml(typeof n!='undefined'?n:m);}},getValue:function(){return this._.value||'';},unmarkAll:function(){this._.list.unmarkAll();},mark:function(m){this._.list.mark(m);},hideItem:function(m){this._.list.hideItem(m);},hideGroup:function(m){this._.list.hideGroup(m);},showAll:function(){this._.list.showAll();},add:function(m,n,o){this._.items[m]=o||m;this._.list.add(m,n,o);},startGroup:function(m){this._.list.startGroup(m);},commit:function(){var m=this;if(!m._.committed){m._.list.commit();m._.committed=1;k.fire('ready',m);}m._.committed=1;},setState:function(m){var n=this;if(n._.state==m)return;n.document.getById('cke_'+n.id).setState(m);n._.state=m;}}});k.prototype.addRichCombo=function(m,n){this.add(m,'richcombo',n);};j.add('htmlwriter');a.htmlWriter=e.createClass({base:a.htmlParser.basicWriter,$:function(){var o=this;o.base();o.indentationChars='\t';o.selfClosingEnd=' />';o.lineBreakChars='\n';o.forceSimpleAmpersand=0;o.sortAttributes=1;o._.indent=0;o._.indentation='';o._.inPre=0;o._.rules={};var m=f;for(var n in e.extend({},m.$nonBodyContent,m.$block,m.$listItem,m.$tableContent))o.setRules(n,{indent:1,breakBeforeOpen:1,breakAfterOpen:1,breakBeforeClose:!m[n]['#'],breakAfterClose:1});o.setRules('br',{breakAfterOpen:1});o.setRules('title',{indent:0,breakAfterOpen:0});o.setRules('style',{indent:0,breakBeforeClose:1});o.setRules('pre',{indent:0});},proto:{openTag:function(m,n){var p=this;var o=p._.rules[m];if(p._.indent)p.indentation();else if(o&&o.breakBeforeOpen){p.lineBreak();p.indentation();}p._.output.push('<',m);},openTagClose:function(m,n){var p=this;var o=p._.rules[m];if(n)p._.output.push(p.selfClosingEnd);else{p._.output.push('>');if(o&&o.indent)p._.indentation+=p.indentationChars;}if(o&&o.breakAfterOpen)p.lineBreak();m=='pre'&&(p._.inPre=1);},attribute:function(m,n){if(typeof n=='string'){this.forceSimpleAmpersand&&(n=n.replace(/&/g,'&'));n=e.htmlEncodeAttr(n);}this._.output.push(' ',m,'="',n,'"');},closeTag:function(m){var o=this;var n=o._.rules[m];if(n&&n.indent)o._.indentation=o._.indentation.substr(o.indentationChars.length);if(o._.indent)o.indentation();else if(n&&n.breakBeforeClose){o.lineBreak();o.indentation();}o._.output.push('');m=='pre'&&(o._.inPre=0);if(n&&n.breakAfterClose)o.lineBreak();},text:function(m){var n=this;if(n._.indent){n.indentation(); -!n._.inPre&&(m=e.ltrim(m));}n._.output.push(m);},comment:function(m){if(this._.indent)this.indentation();this._.output.push('');},lineBreak:function(){var m=this;if(!m._.inPre&&m._.output.length>0)m._.output.push(m.lineBreakChars);m._.indent=1;},indentation:function(){var m=this;if(!m._.inPre)m._.output.push(m._.indentation);m._.indent=0;},setRules:function(m,n){var o=this._.rules[m];if(o)e.extend(o,n,true);else this._.rules[m]=n;}}});j.add('menubutton',{requires:['button','menu'],beforeInit:function(m){m.ui.addHandler('menubutton',k.menuButton.handler);}});a.UI_MENUBUTTON='menubutton';(function(){var m=function(n){var o=this._;if(o.state===0)return;o.previousState=o.state;var p=o.menu;if(!p){p=o.menu=new a.menu(n,{panel:{className:n.skinClass+' cke_contextmenu',attributes:{'aria-label':n.lang.common.options}}});p.onHide=e.bind(function(){this.setState(this.modes&&this.modes[n.mode]?o.previousState:0);},this);if(this.onMenu)p.addListener(this.onMenu);}if(o.on){p.hide();return;}this.setState(1);p.show(a.document.getById(this._.id),4);};k.menuButton=e.createClass({base:k.button,$:function(n){var o=n.panel;delete n.panel;this.base(n);this.hasArrow=true;this.click=m;},statics:{handler:{create:function(n){return new k.menuButton(n);}}}});})();j.add('dialogui');(function(){var m=function(u){var x=this;x._||(x._={});x._['default']=x._.initValue=u['default']||'';x._.required=u.required||false;var v=[x._];for(var w=1;w',v.label,'','');else{var D={type:'hbox',widths:v.widths,padding:0,children:[{type:'html',html:'
';else T.setHtml(V);U.remove();};function B(T){var U=/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,V=T.getName(),W=C(T.getOuterHtml(),U,function(Y,Z,aa){return Z+''+aa+'
';}),X=[];W.replace(/([\s\S]*?)<\/pre>/gi,function(Y,Z){X.push(Z);});return X;};function C(T,U,V){var W='',X='';T=T.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(Y,Z,aa){Z&&(W=Z);aa&&(X=aa);return '';});return W+T.replace(U,V)+X;};function D(T,U){var V;if(T.length>1)V=new d.documentFragment(U.getDocument());for(var W=0;W');X=X.replace(/[ \t]{2,}/g,function(Z){return e.repeat(' ',Z.length-1)+' ';
+});if(V){var Y=U.clone();Y.setHtml(X);V.append(Y);}else U.setHtml(X);}return V||U;};function E(T,U){var V=T.getBogus();V&&V.remove();var W=T.getHtml();W=C(W,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');W=W.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'$1');W=W.replace(/([ \t\n\r]+| )/g,' ');W=W.replace(/]*>/gi,'\n');if(c){var X=T.getDocument().createElement('div');X.append(U);U.$.outerHTML='
'+W+'
';U.copyAttributes(X.getFirst());U=X.getFirst().remove();}else U.setHtml(W);return U;};function F(T,U){var V=T._.definition,W=e.extend({},V.attributes,N(T)[U.getName()]),X=V.styles,Y=e.isEmpty(W)&&e.isEmpty(X);for(var Z in W){if((Z=='class'||T._.definition.fullMatch)&&U.getAttribute(Z)!=O(Z,W[Z]))continue;Y=U.hasAttribute(Z);U.removeAttribute(Z);}for(var aa in X){if(T._.definition.fullMatch&&U.getStyle(aa)!=O(aa,X[aa],true))continue;Y=Y||!!U.getStyle(aa);U.removeStyle(aa);}if(Y)!f.$block[U.getName()]||T._.enterMode==2&&!U.hasAttributes()?I(U):U.renameNode(T._.enterMode==1?'p':'div');};function G(T,U){var V=T._.definition,W=V.attributes,X=V.styles,Y=N(T),Z=U.getElementsByTag(T.element);for(var aa=Z.count();--aa>=0;)F(T,Z.getItem(aa));for(var ab in Y){if(ab!=T.element){Z=U.getElementsByTag(ab);for(aa=Z.count()-1;aa>=0;aa--){var ac=Z.getItem(aa);H(ac,Y[ab]);}}}};function H(T,U){var V=U&&U.attributes;if(V)for(var W=0;W0)H+=(F.$.offsetWidth||0)-(F.$.clientWidth||0)+3;H+=4;F.setStyle('width',H+'px');v.element.addClass('cke_frameLoaded');var I=v.element.$.scrollHeight;if(c&&b.quirks&&I>0)I+=(F.$.offsetHeight||0)-(F.$.clientHeight||0)+3;F.setStyle('height',I+'px');u._.currentBlock.element.setStyle('display','none').removeStyle('display');}else F.removeStyle('height');var J=u.element,K=J.getWindow(),L=K.getScrollPosition(),M=K.getViewPaneSize(),N={height:J.$.offsetHeight,width:J.$.offsetWidth};if(A?B<0:B+N.width>M.width+L.x)B+=N.width*(A?1:-1);if(C+N.height>M.height+L.y)C-=N.height;if(c){var O=new h(w.$.offsetParent),P=O;if(P.getName()=='html')P=P.getDocument().getBody();if(P.getComputedStyle('direction')=='rtl')if(b.ie8Compat)B-=w.getDocument().getDocumentElement().$.scrollLeft*2;else B-=O.$.scrollWidth-O.$.clientWidth;}var Q=w.getFirst(),R;if(R=Q.getCustomData('activePanel'))R.onHide&&R.onHide.call(this,1);Q.setCustomData('activePanel',this); +w.setStyles({top:C+'px',left:B+'px'});w.setOpacity(1);},this);u.isLoaded?E():u.onLoad=E;e.setTimeout(function(){x.$.contentWindow.focus();this.allowBlur(true);},0,this);},b.air?200:0,this);this.visible=1;if(this.onShow)this.onShow.call(this);n=0;},hide:function(p){var r=this;if(r.visible&&(!r.onHide||r.onHide.call(r)!==true)){r.hideChild();b.gecko&&r._.iframe.getFrameDocument().$.activeElement.blur();r.element.setStyle('display','none');r.visible=0;r.element.getFirst().removeCustomData('activePanel');var q=p!==false&&r._.returnFocus;if(q){if(b.webkit&&q.type)q.getWindow().$.focus();q.focus();}}},allowBlur:function(p){var q=this._.panel;if(p!=undefined)q.allowBlur=p;return q.allowBlur;},showAsChild:function(p,q,r,s,t,u){if(this._.activeChild==p&&p._.panel._.offsetParentId==r.getId())return;this.hideChild();p.onHide=e.bind(function(){e.setTimeout(function(){if(!this._.focused)this.hide();},0,this);},this);this._.activeChild=p;this._.focused=false;p.showBlock(q,r,s,t,u);if(b.ie7Compat||b.ie8&&b.ie6Compat)setTimeout(function(){p.element.getChild(0).$.style.cssText+='';},100);},hideChild:function(){var p=this._.activeChild;if(p){delete p.onHide;delete p._.returnFocus;delete this._.activeChild;p.hide();}}}});a.on('instanceDestroyed',function(){var p=e.isEmpty(a.instances);for(var q in m){var r=m[q];if(p)r.destroy();else r.element.hide();}p&&(m={});});})();j.add('menu',{beforeInit:function(m){var n=m.config.menu_groups.split(','),o=m._.menuGroups={},p=m._.menuItems={};for(var q=0;q'],B=r.length,C=B&&r[0].group;for(var D=0;D'); +C=E.group;}E.render(this,D,A);}A.push('');u.setHtml(A.join(''));k.fire('ready',this);if(this.parent)this.parent._.panel.showAsChild(t,this.id,n,o,p,q);else t.showBlock(this.id,n,o,p,q);s.fire('menuShow',[t]);},addListener:function(n){this._.listeners.push(n);},hide:function(n){var o=this;o._.onHide&&o._.onHide();o._.panel&&o._.panel.hide(n);}}});function m(n){n.sort(function(o,p){if(o.groupp.group)return 1;return o.orderp.order?1:0;});};a.menuItem=e.createClass({$:function(n,o,p){var q=this;e.extend(q,p,{order:0,className:'cke_button_'+o});q.group=n._.menuGroups[q.group];q.editor=n;q.name=o;},proto:{render:function(n,o,p){var w=this;var q=n.id+String(o),r=typeof w.state=='undefined'?2:w.state,s=' cke_'+(r==1?'on':r==0?'disabled':'off'),t=w.label;if(w.className)s+=' '+w.className;var u=w.getItems;p.push(''+''+'');if(u)p.push('','&#',w.editor.lang.dir=='rtl'?'9668':'9658',';','');p.push(t,'');}}});})();i.menu_groups='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div';(function(){var m;j.add('editingblock',{init:function(n){if(!n.config.editingBlock)return;n.on('themeSpace',function(o){if(o.data.space=='contents')o.data.html+='
';});n.on('themeLoaded',function(){n.fireOnce('editingBlockReady');});n.on('uiReady',function(){n.setMode(n.config.startupMode); +});n.on('afterSetData',function(){if(!m){function o(){m=true;n.getMode().loadData(n.getData());m=false;};if(n.mode)o();else n.on('mode',function(){if(n.mode){o();n.removeListener('mode',arguments.callee);}});}});n.on('beforeGetData',function(){if(!m&&n.mode){m=true;n.setData(n.getMode().getData(),null,1);m=false;}});n.on('getSnapshot',function(o){if(n.mode)o.data=n.getMode().getSnapshotData();});n.on('loadSnapshot',function(o){if(n.mode)n.getMode().loadSnapshotData(o.data);});n.on('mode',function(o){o.removeListener();b.webkit&&n.container.on('focus',function(){n.focus();});if(n.config.startupFocus)n.focus();setTimeout(function(){n.fireOnce('instanceReady');a.fire('instanceReady',null,n);},0);});n.on('destroy',function(){var o=this;if(o.mode)o._.modes[o.mode].unload(o.getThemeSpace('contents'));});}});a.editor.prototype.mode='';a.editor.prototype.addMode=function(n,o){o.name=n;(this._.modes||(this._.modes={}))[n]=o;};a.editor.prototype.setMode=function(n){this.fire('beforeSetMode',{newMode:n});var o,p=this.getThemeSpace('contents'),q=this.checkDirty();if(this.mode){if(n==this.mode)return;this.fire('beforeModeUnload');var r=this.getMode();o=r.getData();r.unload(p);this.mode='';}p.setHtml('');var s=this.getMode(n);if(!s)throw '[CKEDITOR.editor.setMode] Unknown mode "'+n+'".';if(!q)this.on('mode',function(){this.resetDirty();this.removeListener('mode',arguments.callee);});s.load(p,typeof o!='string'?this.getData():o);};a.editor.prototype.getMode=function(n){return this._.modes&&this._.modes[n||this.mode];};a.editor.prototype.focus=function(){this.forceNextSelectionCheck();var n=this.getMode();if(n)n.focus();};})();i.startupMode='wysiwyg';i.editingBlock=true;(function(){function m(){var B=this;try{var y=B.getSelection();if(!y||!y.document.getWindow().$)return;var z=y.getStartElement(),A=new d.elementPath(z);if(!A.compare(B._.selectionPreviousPath)){B._.selectionPreviousPath=A;B.fire('selectionChange',{selection:y,path:A,element:z});}}catch(C){}};var n,o;function p(){o=true;if(n)return;q.call(this);n=e.setTimeout(q,200,this);};function q(){n=null;if(o){e.setTimeout(m,0,this);o=false;}};function r(y){function z(D){return D&&D.type==1&&D.getName() in f.$removeEmpty;};function A(D){var E=y.document.getBody();return!D.is('body')&&E.getChildCount()==1;};var B=y.startContainer,C=y.startOffset;if(B.type==3)return false;return!e.trim(B.getHtml())?z(B)||A(B):z(B.getChild(C-1))||z(B.getChild(C));};var s={modes:{wysiwyg:1,source:1},readOnly:c||b.webkit,exec:function(y){switch(y.mode){case 'wysiwyg':y.document.$.execCommand('SelectAll',false,null); +y.forceNextSelectionCheck();y.selectionChange();break;case 'source':var z=y.textarea.$;if(c)z.createTextRange().execCommand('SelectAll');else{z.selectionStart=0;z.selectionEnd=z.value.length;}z.focus();}},canUndo:false};function t(y){w(y);var z=y.createText('​');y.setCustomData('cke-fillingChar',z);return z;};function u(y){return y&&y.getCustomData('cke-fillingChar');};function v(y){var z=y&&u(y);if(z)if(z.getCustomData('ready'))w(y);else z.setCustomData('ready',1);};function w(y){var z=y&&y.removeCustomData('cke-fillingChar');if(z){z.setText(z.getText().replace(/\u200B/g,''));z=0;}};j.add('selection',{init:function(y){if(b.webkit){y.on('selectionChange',function(){v(y.document);});y.on('beforeSetMode',function(){w(y.document);});y.on('key',function(D){switch(D.data.keyCode){case 13:case 2228224+13:case 37:case 39:case 8:w(y.document);}},null,null,10);var z,A;function B(){var D=y.document,E=u(D);if(E){var F=D.$.defaultView.getSelection();if(F.type=='Caret'&&F.anchorNode==E.$)A=1;z=E.getText();E.setText(z.replace(/\u200B/g,''));}};function C(){var D=y.document,E=u(D);if(E){E.setText(z);if(A){D.$.defaultView.getSelection().setPosition(E.$,E.getLength());A=0;}}};y.on('beforeUndoImage',B);y.on('afterUndoImage',C);y.on('beforeGetData',B,null,null,0);y.on('getData',C);}y.on('contentDom',function(){var D=y.document,E=D.getBody(),F=D.getDocumentElement();if(c){var G,H,I=1;E.on('focusin',function(M){if(M.data.$.srcElement.nodeName!='BODY')return;if(G){if(I){try{G.select();}catch(O){}var N=D.getCustomData('cke_locked_selection');if(N){N.unlock();N.lock();}}G=null;}});E.on('focus',function(){H=1;L();});E.on('beforedeactivate',function(M){if(M.data.$.toElement)return;H=0;I=1;});if(c&&b.version<8)y.on('blur',function(M){try{y.document&&y.document.$.selection.empty();}catch(N){}});F.on('mousedown',function(){I=0;});F.on('mouseup',function(){I=1;});if(c&&(b.ie7Compat||b.version<8||b.quirks))F.on('click',function(M){if(M.data.getTarget().getName()=='html')y.getSelection().getRanges()[0].select();});var J;E.on('mousedown',function(M){if(M.data.$.button==2){var N=y.document.$.selection;if(N.type=='None')J=y.window.getScrollPosition();}K();});E.on('mouseup',function(M){if(M.data.$.button==2&&J){y.document.$.documentElement.scrollLeft=J.x;y.document.$.documentElement.scrollTop=J.y;}J=null;H=1;setTimeout(function(){L(true);},0);});E.on('keydown',K);E.on('keyup',function(){H=1;L();});D.on('selectionchange',L);function K(){H=0;};function L(M){if(H){var N=y.document,O=y.getSelection(),P=O&&O.getNative(); +if(M&&P&&P.type=='None')if(!N.$.queryCommandEnabled('InsertImage')){e.setTimeout(L,50,this,true);return;}var Q;if(P&&P.type&&P.type!='Control'&&(Q=P.createRange())&&(Q=Q.parentElement())&&(Q=Q.nodeName)&&Q.toLowerCase() in {input:1,textarea:1})return;G=P&&O.getRanges()[0];p.call(y);}};}else{D.on('mouseup',p,y);D.on('keyup',p,y);}});y.on('contentDomUnload',y.forceNextSelectionCheck,y);y.addCommand('selectAll',s);y.ui.addButton('SelectAll',{label:y.lang.selectAll,command:'selectAll'});y.selectionChange=p;b.ie9Compat&&y.on('destroy',function(){var D=y.getSelection();D&&D.getNative().clear();},null,null,9);}});a.editor.prototype.getSelection=function(){return this.document&&this.document.getSelection();};a.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath;};g.prototype.getSelection=function(){var y=new d.selection(this);return!y||y.isInvalid?null:y;};a.SELECTION_NONE=1;a.SELECTION_TEXT=2;a.SELECTION_ELEMENT=3;d.selection=function(y){var B=this;var z=y.getCustomData('cke_locked_selection');if(z)return z;B.document=y;B.isLocked=0;B._={cache:{}};if(c){var A=B.getNative().createRange();if(!A||A.item&&A.item(0).ownerDocument!=B.document.$||A.parentElement&&A.parentElement().ownerDocument!=B.document.$)B.isInvalid=true;}return B;};var x={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};d.selection.prototype={getNative:c?function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.$.selection);}:function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.getWindow().$.getSelection());},getType:c?function(){var y=this._.cache;if(y.type)return y.type;var z=1;try{var A=this.getNative(),B=A.type;if(B=='Text')z=2;if(B=='Control')z=3;if(A.createRange().parentElement)z=2;}catch(C){}return y.type=z;}:function(){var y=this._.cache;if(y.type)return y.type;var z=2,A=this.getNative();if(!A)z=1;else if(A.rangeCount==1){var B=A.getRangeAt(0),C=B.startContainer;if(C==B.endContainer&&C.nodeType==1&&B.endOffset-B.startOffset==1&&x[C.childNodes[B.startOffset].nodeName.toLowerCase()])z=3;}return y.type=z;},getRanges:(function(){var y=c?(function(){function z(B){return new d.node(B).getIndex();};var A=function(B,C){B=B.duplicate();B.collapse(C);var D=B.parentElement(),E=D.ownerDocument;if(!D.hasChildNodes())return{container:D,offset:0};var F=D.children,G,H,I=B.duplicate(),J=0,K=F.length-1,L=-1,M,N;while(J<=K){L=Math.floor((J+K)/2); +G=F[L];I.moveToElementText(G);M=I.compareEndPoints('StartToStart',B);if(M>0)K=L-1;else if(M<0)J=L+1;else if(b.ie9Compat&&G.tagName=='BR'){var O='cke_range_marker';B.execCommand('CreateBookmark',false,O);G=E.getElementsByName(O)[0];var P=z(G);D.removeChild(G);return{container:D,offset:P};}else return{container:D,offset:z(G)};}if(L==-1||L==F.length-1&&M<0){I.moveToElementText(D);I.setEndPoint('StartToStart',B);N=I.text.replace(/(\r\n|\r)/g,'\n').length;F=D.childNodes;if(!N){G=F[F.length-1];if(G.nodeType==1)return{container:D,offset:F.length};else return{container:G,offset:G.nodeValue.length};}var Q=F.length;while(N>0)N-=F[--Q].nodeValue.length;return{container:F[Q],offset:-N};}else{I.collapse(M>0?true:false);I.setEndPoint(M>0?'StartToStart':'EndToStart',B);N=I.text.replace(/(\r\n|\r)/g,'\n').length;if(!N)return{container:D,offset:z(G)+(M>0?0:1)};while(N>0)try{H=G[M>0?'previousSibling':'nextSibling'];N-=H.nodeValue.length;G=H;}catch(R){return{container:D,offset:z(G)};}return{container:G,offset:M>0?-N:G.nodeValue.length+N};}};return function(){var L=this;var B=L.getNative(),C=B&&B.createRange(),D=L.getType(),E;if(!B)return[];if(D==2){E=new d.range(L.document);var F=A(C,true);E.setStart(new d.node(F.container),F.offset);F=A(C);E.setEnd(new d.node(F.container),F.offset);if(E.endContainer.getPosition(E.startContainer)&4&&E.endOffset<=E.startContainer.getIndex())E.collapse();return[E];}else if(D==3){var G=[];for(var H=0;H=F.getLength())J.setStartAfter(F);else J.setStartBefore(F);if(G&&G.type==3)if(!I)J.setEndBefore(G); +else J.setEndAfter(G);var L=new d.walker(J);L.evaluator=function(M){if(M.type==1&&M.isReadOnly()){var N=D.clone();D.setEndBefore(M);if(D.collapsed)B.splice(C--,1);if(!(M.getPosition(J.endContainer)&16)){N.setStartAfter(M);if(!N.collapsed)B.splice(C+1,0,N);}return true;}return false;};L.next();}}return A.ranges;};})(),getStartElement:function(){var F=this;var y=F._.cache;if(y.startElement!==undefined)return y.startElement;var z,A=F.getNative();switch(F.getType()){case 3:return F.getSelectedElement();case 2:var B=F.getRanges()[0];if(B){if(!B.collapsed){B.optimize();while(1){var C=B.startContainer,D=B.startOffset;if(D==(C.getChildCount?C.getChildCount():C.getLength())&&!C.isBlockBoundary())B.setStartAfter(C);else break;}z=B.startContainer;if(z.type!=1)return z.getParent();z=z.getChild(B.startOffset);if(!z||z.type!=1)z=B.startContainer;else{var E=z.getFirst();while(E&&E.type==1){z=E;E=E.getFirst();}}}else{z=B.startContainer;if(z.type!=1)z=z.getParent();}z=z.$;}}return y.startElement=z?new h(z):null;},getSelectedElement:function(){var y=this._.cache;if(y.selectedElement!==undefined)return y.selectedElement;var z=this,A=e.tryThese(function(){return z.getNative().createRange().item(0);},function(){var B=z.getRanges()[0],C,D;for(var E=2;E&&!((C=B.getEnclosedNode())&&C.type==1&&x[C.getName()]&&(D=C));E--)B.shrink(1);return D.$;});return y.selectedElement=A?new h(A):null;},getSelectedText:function(){var y=this._.cache;if(y.selectedText!==undefined)return y.selectedText;var z='',A=this.getNative();if(this.getType()==2)z=c?A.createRange().text:A.toString();return y.selectedText=z;},lock:function(){var y=this;y.getRanges();y.getStartElement();y.getSelectedElement();y.getSelectedText();y._.cache.nativeSel={};y.isLocked=1;y.document.setCustomData('cke_locked_selection',y);},unlock:function(y){var D=this;var z=D.document,A=z.getCustomData('cke_locked_selection');if(A){z.setCustomData('cke_locked_selection',null);if(y){var B=A.getSelectedElement(),C=!B&&A.getRanges();D.isLocked=0;D.reset();z.getBody().focus();if(B)D.selectElement(B);else D.selectRanges(C);}}if(!A||!y){D.isLocked=0;D.reset();}},reset:function(){this._.cache={};},selectElement:function(y){var A=this;if(A.isLocked){var z=new d.range(A.document);z.setStartBefore(y);z.setEndAfter(y);A._.cache.selectedElement=y;A._.cache.startElement=y;A._.cache.ranges=new d.rangeList(z);A._.cache.type=3;return;}z=new d.range(y.getDocument());z.setStartBefore(y);z.setEndAfter(y);z.select();A.document.fire('selectionchange');A.reset(); +},selectRanges:function(y){var M=this;if(M.isLocked){M._.cache.selectedElement=null;M._.cache.startElement=y[0]&&y[0].getTouchedStartNode();M._.cache.ranges=new d.rangeList(y);M._.cache.type=2;return;}if(c){if(y.length>1){var z=y[y.length-1];y[0].setEnd(z.endContainer,z.endOffset);y.length=1;}if(y[0])y[0].select();M.reset();}else{var A=M.getNative();if(!A)return;if(y.length){A.removeAllRanges();b.webkit&&w(M.document);}for(var B=0;B=0){H.collapse(1);I.setEnd(H.endContainer.$,H.endOffset);}else throw N;}A.addRange(I);}M.reset();}},createBookmarks:function(y){return this.getRanges().createBookmarks(y);},createBookmarks2:function(y){return this.getRanges().createBookmarks2(y);},selectBookmarks:function(y){var z=[];for(var A=0;A','','',this.label,'','=10900&&!o.hc?'':" href=\"javascript:void('"+this.label+"')\"",' role="button" aria-labelledby="',p,'_label" aria-describedby="',p,'_text" aria-haspopup="true"');if(b.opera||b.gecko&&b.mac)n.push(' onkeypress="return false;"');if(b.gecko)n.push(' onblur="this.style.cssText = this.style.cssText;"');n.push(' onkeydown="CKEDITOR.tools.callFunction( ',t,', event, this );" onfocus="return CKEDITOR.tools.callFunction(',u,', event);" '+(c?'onclick="return false;" onmouseup':'onclick')+'="CKEDITOR.tools.callFunction(',q,', this); return false;">'+this.label+''+''+''+(b.hc?'▼':b.air?' ':'')+''+''+''+''); +if(this.onRender)this.onRender();return r;},createPanel:function(m){if(this._.panel)return;var n=this._.panelDefinition,o=this._.panelDefinition.block,p=n.parent||a.document.getBody(),q=new k.floatPanel(m,p,n),r=q.addListBlock(this.id,o),s=this;q.onShow=function(){if(s.className)this.element.getFirst().addClass(s.className+'_panel');s.setState(1);r.focus(!s.multiSelect&&s.getValue());s._.on=1;if(s.onOpen)s.onOpen();};q.onHide=function(t){if(s.className)this.element.getFirst().removeClass(s.className+'_panel');s.setState(s.modes&&s.modes[m.mode]?2:0);s._.on=0;if(!t&&s.onClose)s.onClose();};q.onEscape=function(){q.hide();};r.onClick=function(t,u){s.document.getWindow().focus();if(s.onClick)s.onClick.call(s,t,u);if(u)s.setValue(t,s._.items[t]);else s.setValue('');q.hide(false);};this._.panel=q;this._.list=r;q.getBlock(this.id).onHide=function(){s._.on=0;s.setState(2);};if(this.init)this.init();},setValue:function(m,n){var p=this;p._.value=m;var o=p.document.getById('cke_'+p.id+'_text');if(o){if(!(m||n)){n=p.label;o.addClass('cke_inline_label');}else o.removeClass('cke_inline_label');o.setHtml(typeof n!='undefined'?n:m);}},getValue:function(){return this._.value||'';},unmarkAll:function(){this._.list.unmarkAll();},mark:function(m){this._.list.mark(m);},hideItem:function(m){this._.list.hideItem(m);},hideGroup:function(m){this._.list.hideGroup(m);},showAll:function(){this._.list.showAll();},add:function(m,n,o){this._.items[m]=o||m;this._.list.add(m,n,o);},startGroup:function(m){this._.list.startGroup(m);},commit:function(){var m=this;if(!m._.committed){m._.list.commit();m._.committed=1;k.fire('ready',m);}m._.committed=1;},setState:function(m){var n=this;if(n._.state==m)return;n.document.getById('cke_'+n.id).setState(m);n._.state=m;}}});k.prototype.addRichCombo=function(m,n){this.add(m,'richcombo',n);};j.add('htmlwriter');a.htmlWriter=e.createClass({base:a.htmlParser.basicWriter,$:function(){var o=this;o.base();o.indentationChars='\t';o.selfClosingEnd=' />';o.lineBreakChars='\n';o.forceSimpleAmpersand=0;o.sortAttributes=1;o._.indent=0;o._.indentation='';o._.inPre=0;o._.rules={};var m=f;for(var n in e.extend({},m.$nonBodyContent,m.$block,m.$listItem,m.$tableContent))o.setRules(n,{indent:1,breakBeforeOpen:1,breakAfterOpen:1,breakBeforeClose:!m[n]['#'],breakAfterClose:1});o.setRules('br',{breakAfterOpen:1});o.setRules('title',{indent:0,breakAfterOpen:0});o.setRules('style',{indent:0,breakBeforeClose:1});o.setRules('pre',{indent:0});},proto:{openTag:function(m,n){var p=this; +var o=p._.rules[m];if(p._.indent)p.indentation();else if(o&&o.breakBeforeOpen){p.lineBreak();p.indentation();}p._.output.push('<',m);},openTagClose:function(m,n){var p=this;var o=p._.rules[m];if(n)p._.output.push(p.selfClosingEnd);else{p._.output.push('>');if(o&&o.indent)p._.indentation+=p.indentationChars;}if(o&&o.breakAfterOpen)p.lineBreak();m=='pre'&&(p._.inPre=1);},attribute:function(m,n){if(typeof n=='string'){this.forceSimpleAmpersand&&(n=n.replace(/&/g,'&'));n=e.htmlEncodeAttr(n);}this._.output.push(' ',m,'="',n,'"');},closeTag:function(m){var o=this;var n=o._.rules[m];if(n&&n.indent)o._.indentation=o._.indentation.substr(o.indentationChars.length);if(o._.indent)o.indentation();else if(n&&n.breakBeforeClose){o.lineBreak();o.indentation();}o._.output.push('');m=='pre'&&(o._.inPre=0);if(n&&n.breakAfterClose)o.lineBreak();},text:function(m){var n=this;if(n._.indent){n.indentation();!n._.inPre&&(m=e.ltrim(m));}n._.output.push(m);},comment:function(m){if(this._.indent)this.indentation();this._.output.push('');},lineBreak:function(){var m=this;if(!m._.inPre&&m._.output.length>0)m._.output.push(m.lineBreakChars);m._.indent=1;},indentation:function(){var m=this;if(!m._.inPre)m._.output.push(m._.indentation);m._.indent=0;},setRules:function(m,n){var o=this._.rules[m];if(o)e.extend(o,n,true);else this._.rules[m]=n;}}});j.add('menubutton',{requires:['button','menu'],beforeInit:function(m){m.ui.addHandler('menubutton',k.menuButton.handler);}});a.UI_MENUBUTTON='menubutton';(function(){var m=function(n){var o=this._;if(o.state===0)return;o.previousState=o.state;var p=o.menu;if(!p){p=o.menu=new a.menu(n,{panel:{className:n.skinClass+' cke_contextmenu',attributes:{'aria-label':n.lang.common.options}}});p.onHide=e.bind(function(){this.setState(this.modes&&this.modes[n.mode]?o.previousState:0);},this);if(this.onMenu)p.addListener(this.onMenu);}if(o.on){p.hide();return;}this.setState(1);p.show(a.document.getById(this._.id),4);};k.menuButton=e.createClass({base:k.button,$:function(n){var o=n.panel;delete n.panel;this.base(n);this.hasArrow=true;this.click=m;},statics:{handler:{create:function(n){return new k.menuButton(n);}}}});})();j.add('dialogui');(function(){var m=function(u){var x=this;x._||(x._={});x._['default']=x._.initValue=u['default']||'';x._.required=u.required||false;var v=[x._];for(var w=1;w',v.label,'','');else{var D={type:'hbox',widths:v.widths,padding:0,children:[{type:'html',html:'